diff --git a/.gitignore b/.gitignore index 2413faa..525880e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,5 @@ -py -node_modules -.pnp.* -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions +node_modules/ +**/node_modules/ +server.com +package.json +package-lock.json diff --git a/Readme.md b/Readme.md index eef4a9b..04f8d4f 100644 --- a/Readme.md +++ b/Readme.md @@ -6,37 +6,19 @@ Grist widget to directly develop custom widgets within Grist’s UI. Within a Grist document, create a custom widget with url pointing to `index.html`. For example: -https://jperon.github.io/grist/Grist-pug-py-widget/ +https://jperon.github.io/grist/grist-pug-py-widget2/ -Then edit the `PUG` and the `PY` parts. The `render_pug` function is -available to `PY`, and will render the `PUG` part with the variables -passed as arguments in a key/value object, for example: - -```py -from browser import window -grist, render_pug = window.grist, window.render_pug - -def onRecord(rec, *args): - render_pug({{"rec": rec}}) - -grist.onRecord(onRecord) -``` +Then edit the `cfg` and other parts. Then click on `Preview`, then `Install`. Once installed, the code may be edited again by clicking on `Open configuration` in the widget's top-right menu. -# Making changes - -Dependencies: - -- [Transcrypt](https://www.transcrypt.org/) -- [pug-cli](https://github.com/pugjs/pug-cli) - -Building the Dockerfile within docker/ (`docker build -t pug_py docker`) -will make development environment ready: `docker run -it -v $PWD:/src pug_py`. +# Making a new "standalone" widget -Once changes are made to `index.pug` and `api.py`, run `./build.sh`. +This repository may be used as a template to create a new Grist custom widget. +After defining it as explained above, you might save the result within files +(for example below `/widget`), adapt `config.toml`, and push it to a new repository. # Credits diff --git a/api.py b/api.py deleted file mode 100644 index bdf00de..0000000 --- a/api.py +++ /dev/null @@ -1,175 +0,0 @@ -grist, monaco, pug, sessionStorage, JSON = window.grist, window.monaco, window.pug, window.sessionStorage, window.JSON -urlParams = __new__(window.URLSearchParams(window.location.search)) -widget_id = urlParams.js_get("id") or window.crypto.randomUUID() - -__pragma__ ('jsiter') -models = {} -widget = {"installed": False, "isEditor": False} -__pragma__ ('nojsiter') - -_memory = {} -def memory(name): - key = f"__{widget_id}_{name}" - try: - if _memory[key]: - return _memory[key] - except KeyError: - pass - def fn(arg=None): - if arg is None: - value = sessionStorage.getItem(key) - return JSON.parse(value) if value else value - else: - sessionStorage.setItem(key, JSON.stringify(arg)) - _memory[key] = fn - return fn - -def changeModel(el): - widget.editor.setModel(models[el.id]) - for tab in document.querySelectorAll("._tab"): - tab.style.background = 'transparent' - el.style.background = 'lightgreen' - -def buildEditor(): - for tab in document.querySelectorAll("._tab"): - _id, _type, _content = tab.id, tab.dataset.js_type, tab.children[1].innerHTML.replace("<", "<") - model = monaco.editor.createModel(memory(_id)() or _content, _type) - model.onDidChangeContent(lambda *args: memory(_id)(model.getValue())) - model._type = _type - models[_id] = model - tab.addEventListener("click", lambda e, *args: changeModel(e.target)) - # Create PY monaco model - like a tab in the IDE. - # Create IDE. Options here are only for styling and making editor look like a - # code snippet. - editor = monaco.editor.create(document.getElementById('container'), { - "model": models.pug, - "automaticLayout": True, - "fontSize": '13px', - "wordWrap": 'on', - "minimap": {"enabled": False,}, - "lineNumbers": 'on', - "glyphMargin": False, - "folding": False, - }) - # Set tabSize - this can be done only after editor is created. - editor.getModel().updateOptions({"tabSize": 2}) - # Disable scrolling past the last line - we will expand editor if necessary. - editor.updateOptions({"scrollBeyondLastLine": False}) - widget.editor = editor - -def purge(el): - while el.firstChild: - el.removeChild(el.firstChild) - -def showPreview(): - __pragma__('jsiter') - for k in models: - model = models[k] - code = model.getValue() - if model._type == "pug": - fnPug = pug.compile(code) - lastListener = None - def render_pug(*data): - nonlocal lastListener - page_widget = document.getElementById('page_widget') - wFrame = document.createElement('iframe') - purge(page_widget) - page_widget.appendChild(wFrame) - widgetWindow = wFrame.contentWindow - # Rewire messages between this widget, and the preview - if lastListener: - window.removeEventListener('message', lastListener) - def lastListener(e): - if e.source == widgetWindow: - window.parent.postMessage(e.data, '*') - elif e.source == window.parent: - widgetWindow.postMessage(e.data, '*') - window.addEventListener('message', lastListener) - content = wFrame.contentWindow - content.document.open() - content.document.write(fnPug(*data)) - content.document.close() - window.render_pug = render_pug - elif model._type == "python": - pyscript = document.createElement("script") - pyscript.js_type = "text/python" - pyscript.innerHTML = code - document.head.appendChild(pyscript) - elif model._type == "javascript": - jsscript = document.createElement("script") - jsscript.innerHTML = code - document.head.appendChild(jsscript) - __pragma__('nojsiter') - document.getElementById('page_editor').style.display = 'none' - document.getElementById('page_widget').style.display = 'block' - for selector in ('._tab', '._btn'): - for e in document.querySelectorAll(selector): - e.style.display = 'none' - document.getElementById('install').style.display = 'inline-block' - document.getElementById('editor').style.display = 'inline-block' - memory('preview')(True) - -def showEditor(): - document.getElementById('_bar').style.display = 'flex' - document.getElementById('page_widget').style.display = 'none' - document.getElementById('page_editor').style.display = 'block' - memory('preview')(False) - for e in document.querySelectorAll('._tab'): - e.style.display = 'inline-block' - for e in document.querySelectorAll('._button'): - e.style.display = 'none' - document.getElementById('preview').style.display = 'inline-block' - -# Create cancellable onOptions version -def onOptions(clb): - listen = True - def callback(*data): - if listen: - clb(*data) - def cancel(): - listen = False - grist.onOptions(callback) - return cancel - -def callback(options, *args): - if widget.installed: - return - if options and options._installed: - installed = True - document.getElementById('_bar').style.display = 'none' - for tab in document.querySelectorAll("._tab"): - memory(tab.id)(options[f"_{tab.id}"]) - buildEditor() - showPreview() - document.getElementById('install').style.display = 'none' - def cb(options, *_): - if not options: - memory('preview')(False) - window.location.reload() - onOptions(cb) - elif not widget.isEditor: - isEditor = True - buildEditor() - if memory('preview')(): - showPreview() - else: - showEditor() -onOptions(callback) - -def install(): - __pragma__ ('jsiter') - options = {"_installed": True} - __pragma__ ('jsiter') - for _id in models: - options[f"_{_id}"] = models[_id].getValue() - grist.setOptions(options).then(window.location.reload()) - -grist.ready({ - "allowSelectBy": True, - "onEditOptions": showEditor, - "requiredAccess": "full", -}) - -document.getElementById("install").onclick = install -document.getElementById("preview").onclick = showPreview -document.getElementById("editor").onclick = showEditor diff --git a/api.pyj b/api.pyj new file mode 100644 index 0000000..0f0f428 --- /dev/null +++ b/api.pyj @@ -0,0 +1,217 @@ +widget_id = new URLSearchParams(location.search).get("id") or crypto.randomUUID() +def the(*args): return document.getElementById(*args) +def one(*args): return document.querySelector(*args) +def all(*args): return document.querySelectorAll(*args) +def log(*args): console.log(*args) +def readfile(f): + request = new XMLHttpRequest() + request.open("GET", f, False) + request.send() + if request.status == 200: + return request.responseText + +CodeMirror.defaults.lineNumbers=True +CodeMirror.defaults.indentWithTabs=False +CodeMirror.defaults.viewportMargin=1000 + +_memory = {} +def memory(name): + key = f"__{widget_id}_{name}" + try: + if _memory[key]: + return _memory[key] + except KeyError: + pass + def fn(arg=None, clear=None): + if clear: + sessionStorage.removeItem(key) + if arg is None: + value = sessionStorage.getItem(key) + return JSON.parse(value) if value else value + else: + sessionStorage.setItem(key, JSON.stringify(arg)) + _memory[key] = fn + return fn + +the('cfg_errors').style.display = "block" +cfg = toml.parse(readfile("config.toml")) +the('cfg_errors').style.display = "none" +widget = cfg.widget + +def changeEditor(el): + target = el.target + for tab in all(".tab"): + tab.style.background = "transparent" + target.style.background = "lightgreen" + for code in widget.codes: + if code.tab == target.id: + code.wrapper.style.display = "block" + else: + code.wrapper.style.display = "none" + +def buildEditors(widget): + editors = the("editors") + tabs = the("tabs") + for code in widget.codes: + widget.codes[code.name] = code + if code.name == widget.entrypoint: + widget.entrypoint = code + textarea = document.createElement("textarea") + textarea.id = f"_{code.name}" + textarea.style.display = "none" + value = memory(code.name)() + if value: + textarea.value = value + elif code.file: + textarea.value = readfile(code.file) + editors.appendChild(textarea) + editor = CodeMirror.fromTextArea(textarea, {'mode': {'name': code.type}}) + tab = document.createElement("div") + tab.id = f"tab_{code.name}" + tab.classList.add("tab") + tab.innerHTML = code.name + tab.onclick = changeEditor + tabs.appendChild(tab) + code.editor = editor.getDoc() + code.wrapper = editor.getWrapperElement() + code.wrapper.style.display = "none" + code.tab = tab.id + code = widget.codes[0] + code.wrapper.style.display = "block" + the(code.tab).style.background = "lightgreen" + +def getcode(id): + return widget.codes[id].editor.getValue() + +lastListener = None +def new_iframe(el_id, htmlcode): + nonlocal lastListener + el = the(el_id) + wFrame = document.createElement('iframe') + while el.firstChild: + el.removeChild(el.firstChild) + el.appendChild(wFrame) + widgetWindow = wFrame.contentWindow + # Rewire messages between this widget, and the preview + try: + window.removeEventListener('message', lastListener) + except KeyError: + pass + def listener(e): + if e.source == widgetWindow: + window.parent.postMessage(e.data, "*") + elif e.source == window.parent: + widgetWindow.postMessage(e.data, "*") + lastListener = listener + window.addEventListener('message', listener) + content = wFrame.contentWindow + content.document.open() + content.document.write(htmlcode) + content.document.close() + +def showPreview(*_): + the("errors").style.display = "none" + code = widget.entrypoint + if code.type == "pug": + new_iframe('widget', pug.compile(code.editor.getValue())({ + "grist": grist, "cfg": cfg, "getcode": getcode + })) + elif code.type == "html": + new_iframe('widget', code.editor.getValue()) + elif code.type == "python": + pyscript = document.createElement("script") + pyscript.type = "pyj" + try: + pyscript.innerHTML = eval(compiler.compile(code.editor.getValue())) + except Exception as e: + console.error(e) + errors = the("errors") + errors.innerHTML = str.format("""
{}, line {}, col {}: {}
""", code.name, e.line, e.col, e.message) + errors.style.display = "block" + elif code.type == "javascript": + jsscript = document.createElement("script") + jsscript.innerHTML = code.editor.getValue() + codes = widget.codes + document.body.appendChild(jsscript) + the("editors").style.display = 'none' + the('widget').style.display = 'block' + for cat in ('.tab', '.btn'): + for e in all(cat): + e.style.display = 'none' + the('install').style.display = 'inline-block' + the("editor").style.display = 'inline-block' + memory('preview')(True) + +def showEditor(*_): + the('bar').style.display = 'flex' + the('widget').style.display = 'none' + the("editors").style.display = 'inline-block' + memory('preview')(False) + for e in all('.tab'): + e.style.display = 'inline-block' + for e in all('.btn'): + e.style.display = 'none' + the('install').style.display = 'inline-block' + the('preview').style.display = 'inline-block' + +# Create cancellable onOptions version +def onOptions(clb): + listen = True + def callback(*data): + if listen: + clb(*data) + def cancel(): + listen = False + grist.onOptions(callback) + return cancel + +def callback(options, *_args): + global widget, cfg + try: + if widget.installed: + return + except TypeError: pass + if options and options.installed: + if options._cfg: + the('cfg_errors').style.display = "block" + cfg = toml.parse(options._cfg) + the('cfg_errors').style.display = "none" + widget = cfg.widget + widget.installed = True + widget.isEditor = False + the('bar').style.display = 'none' + for code in widget.codes: + memory(code.name)(options[f"_{code.name}"]) + buildEditors(widget) + showPreview() + def cb(options, *_): + if not options: + memory('preview')(False) + location.reload() + onOptions(cb) + return + if not options: + for code in widget.codes: + memory(code.name)(clear=True) + if not widget.isEditor: + widget.isEditor = True + buildEditors(widget) + if memory('preview')(): + showPreview() + else: + showEditor() +onOptions(callback) + +def install(*_): + options = {"installed": True} + for code in widget.codes: + options[f"_{code.name}"] = code.editor.getValue() + grist.setOptions(options).then(window.location.reload()) + +the("install").onclick = install +the("preview").onclick = showPreview +the("editor").onclick = showEditor +the("editor").style.display = "inline-block" + +cfg.grist.onEditOptions = showEditor +grist.ready(cfg.grist) diff --git a/build.sh b/build.sh deleted file mode 100755 index 0257064..0000000 --- a/build.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env sh - -python -m transcrypt --nomin --map --verbose --outdir js api.py -yarn pug index.pug diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..d9c74b8 --- /dev/null +++ b/config.toml @@ -0,0 +1,31 @@ +title = "Pug/py widget" + +# Custom options: you may define whichever options you like (toml format). +[options] +md = "Markdown" + + +# Grist options. See support.getgrist.com for more +[grist] +allowSelectBy = false # true if you want to define a selector widget +requiredAccess = "read table" # "full" if you intend to change data + +# Widget options +[widget] +entrypoint = "pug" # Name of one of the codes below + +# You may define various editors below. There must be at leat cfg and the entrypoint. +[[widget.codes]] +name = "cfg" # Must be unique +type = "toml" # This will determine CodeMirror’s mode +file = "config.toml" # Optional: file to load at widget creation + +[[widget.codes]] +name = "pug" +type = "pug" +file = "widget/pug.pug" + +[[widget.codes]] +name = "py" +type = "python" +file = "widget/py.pyj" \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 1bd9ee9..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -FROM python:3.9-alpine - -RUN pip install transcrypt && \ - apk update && apk add --no-cache yarn && \ - yarn global add pug-cli && \ - mkdir /src - -WORKDIR /src - -VOLUME /src - -ENTRYPOINT sh diff --git a/index.html b/index.html index e5e646d..e8c507f 100644 --- a/index.html +++ b/index.html @@ -1,46 +1,12 @@ -Pug and Python Widget
PUG
PY
Install
Preview
\ No newline at end of file +Pyscript cutom widget
Install
Preview
Errors in config. Please cancel and fix them.
\ No newline at end of file diff --git a/index.pug b/index.pug index 1881582..34deb0c 100644 --- a/index.pug +++ b/index.pug @@ -3,81 +3,43 @@ html(lang='en' style='height: 100%; margin: 0px; padding: 0px') head meta(charset='utf-8') meta(name='viewport' content='width=device-width,height=device-height,initial-scale=1,viewport-fit=cover') - title Pug and Python Widget + title Pyscript cutom widget - link(rel='stylesheet' data-name='vs/editor/editor.main' href='lib/vs/editor/editor.main.css') + link(rel="stylesheet" href="js/codemirror/lib/codemirror.css")/ script(src='https://docs.getgrist.com/grist-plugin-api.js') - script(src='lib/pug.js') + script(src="js/codemirror/lib/codemirror.js" defer) + each mode in ["pug", "python", "toml"] + script(src="js/codemirror/mode/" + mode + "/" + mode + ".js" defer) + script(src='js/pug.js') script. var pug = require('pug'); - var require = {paths: {'vs': 'lib/vs'}}; - script(src='lib/vs/loader.js') - script(src='lib/vs/editor/editor.main.nls.js') - script(src='lib/vs/editor/editor.main.js') - script(src='lib/brython.js') + script(src="js/toml.js" defer) + script(src="js/rapydscript.js" defer) + script(src="js/load-pyj.js" defer) style. body {height: 100%; display: flex; flex-direction: column; margin: 0px; overflow: hidden;} - #page_editor {display: none; flex-grow:1; box-sizing: border-box; border-top:1px solid #a0a0a0; border-bottom:1px solid #a0a0a0;} - #container {border-top:0px; height: 100%; box-sizing: border-box;} - #page_widget {flex: 1; border: 0px; display: none;} - #page_widget iframe {height: 100%; width: 100%; border: 0px;} - #_bar {display: none; flex: 0; justify-content: space-between; font-size: 12px; font-family: Arial, Helvetica, sans-serif;} - #_bar div {display: flex; flex-direction: row;} - ._tab {padding: 2px 8px; border: 1px solid gray; cursor: pointer;} - #pug {background: lightgreen;} - ._tab * {pointer-events: none;} - ._btn {padding: 2px 8px; border: 1px solid gray; cursor: pointer;} + #bar {display: none; flex: 0; justify-content: space-between; font-size: 12px; font-family: Arial, Helvetica, sans-serif;} + #bar div {display: flex; flex-direction: row;} + .tab {padding: 2px 8px; border: 1px solid gray; cursor: pointer;} + .tab * {pointer-events: none;} + .btn {padding: 2px 8px; border: 1px solid gray; cursor: pointer;} + .errors {display: none; color: red;} + #editors {display: inline-block; flex-grow:1; height: 90%; box-sizing: border-box; border-top:1px solid #a0a0a0; border-bottom:1px solid #a0a0a0;} + #widget {display: none; flex: 1; border: 0px;} + #widget iframe {height: 100%; width: 100%; border: 0px;} + .CodeMirror {width: 100%; height: 100%;} body - #_bar + #bar + #tabs + #btns + #install.btn Install + #preview.btn Preview + #editor.btn(style="display: none;") Editor + #errors.errors + #cfg_errors.errors Errors in config. Please cancel and fix them. + #editors + #widget div - ._tab#pug(data-type="pug") - text PUG - .content(style="display:none;"). - doctype html - html(lang="fr") - head - script(src="/grist-plugin-api.js") - script(src="lib/brython.js") - script(src="lib/toastui-chart.min.js") - body(onload="brython(2)") - #content - if rec || recs - pre - code.content= JSON.stringify((rec || recs), null, 2) - else - .content Veuillez sélectionner une ligne. - script(type="text/python"). - from browser import console, document, window - from browser.html import CODE, DIV, EM, PRE - grist, JSON = window.grist, window.JSON - content_div = document.select_one("#content") - - content_div <= DIV(EM("Voilà.")) - def display(data): - content_div <= DIV(PRE(CODE(JSON.stringify(data)))) - grist.docApi.fetchSelectedTable().then(display) - ._tab#py(data-type="python") - text PY - .content(style="display:none;"). - from browser import window - grist, render_pug = window.grist, window.render_pug - - def onRecord(rec, *args): - render_pug({{"rec": rec}}) - - def onRecords(recs, *args): - render_pug({{"recs": recs}}) - - #grist.onRecord(onRecord) - #grist.onRecords(onRecords) - render_pug() - div - ._btn#install Install - ._btn#preview Preview - ._btn#editor(style="display: none;") Editor - #page_editor - #container - #page_widget - script(type='module' src='js/api.js') + script(src="api.pyj" type="pyj") diff --git a/js/api.js b/js/api.js deleted file mode 100644 index d201d61..0000000 --- a/js/api.js +++ /dev/null @@ -1,210 +0,0 @@ -// Transcrypt'ed from Python, 2024-02-06 11:59:06 -import {AssertionError, AttributeError, BaseException, DeprecationWarning, Exception, IndexError, IterableError, KeyError, NotImplementedError, RuntimeWarning, StopIteration, UserWarning, ValueError, Warning, __JsIterator__, __PyIterator__, __Terminal__, __add__, __and__, __call__, __class__, __envir__, __eq__, __floordiv__, __ge__, __get__, __getcm__, __getitem__, __getslice__, __getsm__, __gt__, __i__, __iadd__, __iand__, __idiv__, __ijsmod__, __ilshift__, __imatmul__, __imod__, __imul__, __in__, __init__, __ior__, __ipow__, __irshift__, __isub__, __ixor__, __jsUsePyNext__, __jsmod__, __k__, __kwargtrans__, __le__, __lshift__, __lt__, __matmul__, __mergefields__, __mergekwargtrans__, __mod__, __mul__, __ne__, __neg__, __nest__, __or__, __pow__, __pragma__, __pyUseJsNext__, __rshift__, __setitem__, __setproperty__, __setslice__, __sort__, __specialattrib__, __sub__, __super__, __t__, __terminal__, __truediv__, __withblock__, __xor__, abs, all, any, assert, bool, bytearray, bytes, callable, chr, copy, deepcopy, delattr, dict, dir, divmod, enumerate, filter, float, getattr, hasattr, input, int, isinstance, issubclass, len, list, map, max, min, object, ord, pow, print, property, py_TypeError, py_iter, py_metatype, py_next, py_reversed, py_typeof, range, repr, round, set, setattr, sorted, str, sum, tuple, zip} from './org.transcrypt.__runtime__.js'; -var __name__ = '__main__'; -var __left0__ = tuple ([window.grist, window.monaco, window.pug, window.sessionStorage, window.JSON]); -export var grist = __left0__ [0]; -export var monaco = __left0__ [1]; -export var pug = __left0__ [2]; -export var sessionStorage = __left0__ [3]; -export var JSON = __left0__ [4]; -export var urlParams = new window.URLSearchParams (window.location.search); -export var widget_id = urlParams.get ('id') || window.crypto.randomUUID (); -export var models = {}; -export var widget = {'installed': false, 'isEditor': false}; -export var _memory = dict ({}); -export var memory = function (py_name) { - var key = '__{}_{}'.format (widget_id, py_name); - try { - if (_memory [key]) { - return _memory [key]; - } - } - catch (__except0__) { - if (isinstance (__except0__, KeyError)) { - // pass; - } - else { - throw __except0__; - } - } - var fn = function (arg) { - if (typeof arg == 'undefined' || (arg != null && arg.hasOwnProperty ("__kwargtrans__"))) {; - var arg = null; - }; - if (arg === null) { - var value = sessionStorage.getItem (key); - return (value ? JSON.parse (value) : value); - } - else { - sessionStorage.setItem (key, JSON.stringify (arg)); - } - }; - _memory [key] = fn; - return fn; -}; -export var changeModel = function (el) { - widget.editor.setModel (models [el.id]); - for (var tab of document.querySelectorAll ('._tab')) { - tab.style.background = 'transparent'; - } - el.style.background = 'lightgreen'; -}; -export var buildEditor = function () { - for (var tab of document.querySelectorAll ('._tab')) { - var __left0__ = tuple ([tab.id, tab.dataset.type, tab.children [1].innerHTML.py_replace ('<', '<')]); - var _id = __left0__ [0]; - var _type = __left0__ [1]; - var _content = __left0__ [2]; - var model = monaco.editor.createModel (memory (_id) () || _content, _type); - model.onDidChangeContent ((function __lambda__ () { - var args = tuple ([].slice.apply (arguments).slice (0)); - return memory (_id) (model.getValue ()); - })); - model._type = _type; - models [_id] = model; - tab.addEventListener ('click', (function __lambda__ (e) { - var args = tuple ([].slice.apply (arguments).slice (1)); - return changeModel (e.target); - })); - } - var editor = monaco.editor.create (document.getElementById ('container'), dict ({'model': models.pug, 'automaticLayout': true, 'fontSize': '13px', 'wordWrap': 'on', 'minimap': dict ({'enabled': false}), 'lineNumbers': 'on', 'glyphMargin': false, 'folding': false})); - editor.getModel ().updateOptions (dict ({'tabSize': 2})); - editor.updateOptions (dict ({'scrollBeyondLastLine': false})); - widget.editor = editor; -}; -export var purge = function (el) { - while (el.firstChild) { - el.removeChild (el.firstChild); - } -}; -export var showPreview = function () { - for (var k in models) { - var model = models [k]; - var code = model.getValue (); - if (model._type == 'pug') { - var fnPug = pug.compile (code); - var lastListener = null; - var render_pug = function () { - var data = tuple ([].slice.apply (arguments).slice (0)); - var page_widget = document.getElementById ('page_widget'); - var wFrame = document.createElement ('iframe'); - purge (page_widget); - page_widget.appendChild (wFrame); - var widgetWindow = wFrame.contentWindow; - if (lastListener) { - window.removeEventListener ('message', lastListener); - } - var lastListener = function (e) { - if (e.source == widgetWindow) { - window.parent.postMessage (e.data, '*'); - } - else if (e.source == window.parent) { - widgetWindow.postMessage (e.data, '*'); - } - }; - window.addEventListener ('message', lastListener); - var content = wFrame.contentWindow; - content.document.open (); - content.document.write (fnPug (...data)); - content.document.close (); - }; - window.render_pug = render_pug; - } - else if (model._type == 'python') { - var pyscript = document.createElement ('script'); - pyscript.type = 'text/python'; - pyscript.innerHTML = code; - document.head.appendChild (pyscript); - } - else if (model._type == 'javascript') { - var jsscript = document.createElement ('script'); - jsscript.innerHTML = code; - document.head.appendChild (jsscript); - } - } - document.getElementById ('page_editor').style.display = 'none'; - document.getElementById ('page_widget').style.display = 'block'; - for (var py_selector of tuple (['._tab', '._btn'])) { - for (var e of document.querySelectorAll (py_selector)) { - e.style.display = 'none'; - } - } - document.getElementById ('install').style.display = 'inline-block'; - document.getElementById ('editor').style.display = 'inline-block'; - memory ('preview') (true); -}; -export var showEditor = function () { - document.getElementById ('_bar').style.display = 'flex'; - document.getElementById ('page_widget').style.display = 'none'; - document.getElementById ('page_editor').style.display = 'block'; - memory ('preview') (false); - for (var e of document.querySelectorAll ('._tab')) { - e.style.display = 'inline-block'; - } - for (var e of document.querySelectorAll ('._button')) { - e.style.display = 'none'; - } - document.getElementById ('preview').style.display = 'inline-block'; -}; -export var onOptions = function (clb) { - var listen = true; - var callback = function () { - var data = tuple ([].slice.apply (arguments).slice (0)); - if (listen) { - clb (...data); - } - }; - var cancel = function () { - var listen = false; - }; - grist.onOptions (callback); - return cancel; -}; -export var callback = function (options) { - var args = tuple ([].slice.apply (arguments).slice (1)); - if (widget.installed) { - return ; - } - if (options && options._installed) { - var installed = true; - document.getElementById ('_bar').style.display = 'none'; - for (var tab of document.querySelectorAll ('._tab')) { - memory (tab.id) (options ['_{}'.format (tab.id)]); - } - buildEditor (); - showPreview (); - document.getElementById ('install').style.display = 'none'; - var cb = function (options) { - var _ = tuple ([].slice.apply (arguments).slice (1)); - if (!(options)) { - memory ('preview') (false); - window.location.reload (); - } - }; - onOptions (cb); - } - else if (!(widget.isEditor)) { - var isEditor = true; - buildEditor (); - if (memory ('preview') ()) { - showPreview (); - } - else { - showEditor (); - } - } -}; -onOptions (callback); -export var install = function () { - var options = {'_installed': true}; - for (var _id in models) { - options ['_{}'.format (_id)] = models [_id].getValue (); - } - grist.setOptions (options).then (window.location.reload ()); -}; -grist.ready ({'allowSelectBy': true, 'onEditOptions': showEditor, 'requiredAccess': 'full'}); -document.getElementById ('install').onclick = install; -document.getElementById ('preview').onclick = showPreview; -document.getElementById ('editor').onclick = showEditor; - -//# sourceMappingURL=api.map \ No newline at end of file diff --git a/js/api.map b/js/api.map deleted file mode 100644 index aaa5db3..0000000 --- a/js/api.map +++ /dev/null @@ -1,8 +0,0 @@ -{ - "version": 3, - "file": "api.js", - "sources": [ - "api.py" - ], - "mappings": "AAAA;AA8KA;AA9KA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAGA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAIA;AAWA;AAEA;AACA;AAAA;AAEA;AACA;AACA;AAAA;AAAA;AAEA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AAGA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AACA;AAEA;AAEA;AAEA;AACA;AAAA;AACA;AAAA;AAEA;AAMA;AACA;AACA;AAAA" -} \ No newline at end of file diff --git a/js/api.project b/js/api.project deleted file mode 100644 index d6787ec..0000000 --- a/js/api.project +++ /dev/null @@ -1 +0,0 @@ -{"options": {"source": "api.py", "anno": false, "alimod": false, "build": false, "complex": false, "docat": false, "dassert": false, "dcheck": false, "dextex": false, "dlog": false, "dmap": false, "dnostrip": false, "dstat": false, "dtree": false, "esv": null, "ecom": false, "fcall": false, "gen": false, "iconv": false, "jscall": false, "jskeys": false, "jsmod": false, "kwargs": false, "keycheck": false, "license": false, "map": true, "nomin": true, "opov": false, "outdir": "js", "parent": null, "run": false, "symbols": null, "sform": false, "tconv": false, "unit": null, "verbose": true, "x": null, "xreex": false, "xglobs": false, "xpath": null, "xtiny": false, "star": false}, "modules": [{"source": "/srv/grist/plugins/perso/pug_py/.py/lib/python3.10/site-packages/transcrypt/modules/org/transcrypt/__runtime__.py", "target": "/srv/grist/plugins/perso/pug_py/js/org.transcrypt.__runtime__.js"}, {"source": "/srv/grist/plugins/perso/pug_py/api.py", "target": "/srv/grist/plugins/perso/pug_py/js/api.js"}]} \ No newline at end of file diff --git a/js/api.py b/js/api.py deleted file mode 100644 index bdf00de..0000000 --- a/js/api.py +++ /dev/null @@ -1,175 +0,0 @@ -grist, monaco, pug, sessionStorage, JSON = window.grist, window.monaco, window.pug, window.sessionStorage, window.JSON -urlParams = __new__(window.URLSearchParams(window.location.search)) -widget_id = urlParams.js_get("id") or window.crypto.randomUUID() - -__pragma__ ('jsiter') -models = {} -widget = {"installed": False, "isEditor": False} -__pragma__ ('nojsiter') - -_memory = {} -def memory(name): - key = f"__{widget_id}_{name}" - try: - if _memory[key]: - return _memory[key] - except KeyError: - pass - def fn(arg=None): - if arg is None: - value = sessionStorage.getItem(key) - return JSON.parse(value) if value else value - else: - sessionStorage.setItem(key, JSON.stringify(arg)) - _memory[key] = fn - return fn - -def changeModel(el): - widget.editor.setModel(models[el.id]) - for tab in document.querySelectorAll("._tab"): - tab.style.background = 'transparent' - el.style.background = 'lightgreen' - -def buildEditor(): - for tab in document.querySelectorAll("._tab"): - _id, _type, _content = tab.id, tab.dataset.js_type, tab.children[1].innerHTML.replace("<", "<") - model = monaco.editor.createModel(memory(_id)() or _content, _type) - model.onDidChangeContent(lambda *args: memory(_id)(model.getValue())) - model._type = _type - models[_id] = model - tab.addEventListener("click", lambda e, *args: changeModel(e.target)) - # Create PY monaco model - like a tab in the IDE. - # Create IDE. Options here are only for styling and making editor look like a - # code snippet. - editor = monaco.editor.create(document.getElementById('container'), { - "model": models.pug, - "automaticLayout": True, - "fontSize": '13px', - "wordWrap": 'on', - "minimap": {"enabled": False,}, - "lineNumbers": 'on', - "glyphMargin": False, - "folding": False, - }) - # Set tabSize - this can be done only after editor is created. - editor.getModel().updateOptions({"tabSize": 2}) - # Disable scrolling past the last line - we will expand editor if necessary. - editor.updateOptions({"scrollBeyondLastLine": False}) - widget.editor = editor - -def purge(el): - while el.firstChild: - el.removeChild(el.firstChild) - -def showPreview(): - __pragma__('jsiter') - for k in models: - model = models[k] - code = model.getValue() - if model._type == "pug": - fnPug = pug.compile(code) - lastListener = None - def render_pug(*data): - nonlocal lastListener - page_widget = document.getElementById('page_widget') - wFrame = document.createElement('iframe') - purge(page_widget) - page_widget.appendChild(wFrame) - widgetWindow = wFrame.contentWindow - # Rewire messages between this widget, and the preview - if lastListener: - window.removeEventListener('message', lastListener) - def lastListener(e): - if e.source == widgetWindow: - window.parent.postMessage(e.data, '*') - elif e.source == window.parent: - widgetWindow.postMessage(e.data, '*') - window.addEventListener('message', lastListener) - content = wFrame.contentWindow - content.document.open() - content.document.write(fnPug(*data)) - content.document.close() - window.render_pug = render_pug - elif model._type == "python": - pyscript = document.createElement("script") - pyscript.js_type = "text/python" - pyscript.innerHTML = code - document.head.appendChild(pyscript) - elif model._type == "javascript": - jsscript = document.createElement("script") - jsscript.innerHTML = code - document.head.appendChild(jsscript) - __pragma__('nojsiter') - document.getElementById('page_editor').style.display = 'none' - document.getElementById('page_widget').style.display = 'block' - for selector in ('._tab', '._btn'): - for e in document.querySelectorAll(selector): - e.style.display = 'none' - document.getElementById('install').style.display = 'inline-block' - document.getElementById('editor').style.display = 'inline-block' - memory('preview')(True) - -def showEditor(): - document.getElementById('_bar').style.display = 'flex' - document.getElementById('page_widget').style.display = 'none' - document.getElementById('page_editor').style.display = 'block' - memory('preview')(False) - for e in document.querySelectorAll('._tab'): - e.style.display = 'inline-block' - for e in document.querySelectorAll('._button'): - e.style.display = 'none' - document.getElementById('preview').style.display = 'inline-block' - -# Create cancellable onOptions version -def onOptions(clb): - listen = True - def callback(*data): - if listen: - clb(*data) - def cancel(): - listen = False - grist.onOptions(callback) - return cancel - -def callback(options, *args): - if widget.installed: - return - if options and options._installed: - installed = True - document.getElementById('_bar').style.display = 'none' - for tab in document.querySelectorAll("._tab"): - memory(tab.id)(options[f"_{tab.id}"]) - buildEditor() - showPreview() - document.getElementById('install').style.display = 'none' - def cb(options, *_): - if not options: - memory('preview')(False) - window.location.reload() - onOptions(cb) - elif not widget.isEditor: - isEditor = True - buildEditor() - if memory('preview')(): - showPreview() - else: - showEditor() -onOptions(callback) - -def install(): - __pragma__ ('jsiter') - options = {"_installed": True} - __pragma__ ('jsiter') - for _id in models: - options[f"_{_id}"] = models[_id].getValue() - grist.setOptions(options).then(window.location.reload()) - -grist.ready({ - "allowSelectBy": True, - "onEditOptions": showEditor, - "requiredAccess": "full", -}) - -document.getElementById("install").onclick = install -document.getElementById("preview").onclick = showPreview -document.getElementById("editor").onclick = showEditor diff --git a/js/codemirror/.editorconfig b/js/codemirror/.editorconfig new file mode 100644 index 0000000..7ed0206 --- /dev/null +++ b/js/codemirror/.editorconfig @@ -0,0 +1,7 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 diff --git a/js/codemirror/.gitattributes b/js/codemirror/.gitattributes new file mode 100644 index 0000000..1c8c82d --- /dev/null +++ b/js/codemirror/.gitattributes @@ -0,0 +1,8 @@ +*.txt text eol=lf +*.js text eol=lf +*.html text eol=lf +*.md text eol=lf +*.json text eol=lf +*.yml text eol=lf +*.css text eol=lf +*.svg text eol=lf diff --git a/js/codemirror/.npmignore b/js/codemirror/.npmignore new file mode 100644 index 0000000..84f7a22 --- /dev/null +++ b/js/codemirror/.npmignore @@ -0,0 +1,14 @@ +/node_modules +/demo +/doc +/test +/test*.html +/index.html +/mode/*/*test.js +/mode/*/*.html +/mode/index.html +.* +/bin/authors.sh +/bin/lint +/bin/release +/bin/upload-release.js diff --git a/js/codemirror/AUTHORS b/js/codemirror/AUTHORS new file mode 100644 index 0000000..c38f088 --- /dev/null +++ b/js/codemirror/AUTHORS @@ -0,0 +1,984 @@ +List of CodeMirror contributors. Updated before every release. + +4oo4 +4r2r +Aaron Brooks +Abdelouahab +Abdussalam Abdurrahman +Abe Fettig +Abhishek Gahlot +Adam Ahmed +Adam King +Adam Particka +Adam Wight +adanlobato +Adán Lobato +Aditya Toshniwal +Adrian Aichner +Adrian Heine +Adrian Kunz +Adrien Bertrand +aeroson +Ahmad Amireh +Ahmad M. Zawawi +AHOHNMYC +ahoward +Ajin Abraham +Akeksandr Motsjonov +Alasdair Smith +AlbertHilb +Alberto González Palomo +Alberto Pose +Albert Xing +Alexander Marks +Alexander Pavlov +Alexander Schepanovski +Alexander Shvets +Alexander Solovyov +Alexandre Bique +Alex Churchill +alexey-k +Alex Piggott +Alf Eaton +Aliaksei Chapyzhenka +Allen Sarkisyan +Ami Fischman +Amin Shali +Amin Ullah Khan +amshali@google.com +Amsul +amuntean +Amy +Ananya Sen +anaran +AndersMad +Anders Nawroth +Anderson Mesquita +Anders Wåglund +Andrea G +Andreas Reischuck +Andres Taylor +Andre von Houck +Andrew Cheng +Andrew Dassonville +Andrey Fedorov +Andrey Klyuchnikov +Andrey Lushnikov +Andrey Shchekin +Andy Joslin +Andy Kimball +Andy Li +Angelo +angelozerr +angelo.zerr@gmail.com +Ankit +Ankit Ahuja +Ansel Santosa +Anthony Dugois +anthonygego +Anthony Gégo +Anthony Grimes +Anthony Stewart +Anton Kovalyov +antosarho +aoki ken +Apollo Zhu +AQNOUCH Mohammed +Aram Shatakhtsyan +areos +Arnab Bose +Arnoud Buzing +Arsène von Wyss +Arthur Müller +Arun Narasani +as3boyan +asolove +atelierbram +AtomicPages LLC +Atul Bhouraskar +Aurelian Oancea +Axel Lewenhaupt +Baptiste Augrain +Barret Rennie +Bartosz Dziewoński +Basarat Ali Syed +Bastian Müller +belhaj +Bem Jones-Bey +benbro +Benedikt Meurer +benhormann +Ben Hormann +Beni Cherniavsky-Paskin +Benjamin DeCoste +benjaminr-ps +Benjamin Young +Ben Keen +Ben Miller +Ben Mosher +Bernhard Sirlinger +Bert Chang +Bharad +BigBlueHat +Billiam +Billy Moon +Bin Ni +binny +Bjarki Ágúst Guðmundsson +Bjorn Hansen +B Krishna Chaitanya +Blaine G +blukat29 +Bo +boomyjee +Bo Peng +borawjm +Boris K +Boris Verkhovskiy +Brad Metcalf +Brandon Frohs +Brandon Wamboldt +Bret Little +Brett Morgan +Brett Zamir +Brian Grinstead +BrianHung +Brian Sletten +brrd +Bruce Mitchener +Bruno Logerfo +Bryan Gin-ge Chen +Bryan Massoth +Caitlin Potter +Calin Barbat +callodacity +Camilo Roca +Casey Klebba +cBiscuit87 +César González Íñiguez +Chad Jolly +Chandra Sekhar Pydi +Charles Skelton +Cheah Chu Yeow +Chhekur +Chris Colborne +Chris Coyier +Chris Ford +Chris Granger +Chris Houseknecht +Chris Lohfink +Chris Morgan +Chris Reeves +Chris Smith +Christian Gruen +Christian Oyarzun +Christian Petrov +Christian Sonne +christopherblaser +Christopher Brown +Christopher Kramer +Christopher Mitchell +Christopher Pfohl +Christopher Wallis +Chunliang Lyu +ciaranj +clone-it +clso +CodeAnimal +CodeBitt +coderaiser +Cole R Lawrence +ComFreek +Cornelius Weig +Cristian Prieto +Curran Kelleher +Curtis Gagliardi +d8888 +dagsta +daines +Dale Jung +Dan Bentley +Dan Heberden +Daniel, Dao Quang Minh +Daniele Di Sarli +Daniel Faust +Daniel Hanggi +Daniel Huigens +Daniel Kesler +Daniel KJ +Daniel Neel +Daniel Parnell +Daniel Thwaites +Danila Malyutin +Danny Yoo +darealshinji +Darius Roberts +databricks-david-lewis +Dave Brondsema +Dave MacLachlan +Dave Myers +David Barnett +David H. Bronke +David Mignot +David Pathakjee +David R. Myers +David Rodrigues +David Santana +David Vázquez +David Whittington +deebugger +Deep Thought +Denis Ovsienko +Devin Abbott +Devon Carew +Dick Choi +Diego Fernandez +dignifiedquire +Dimage Sapelkin +Dimitri Mitropoulos +Dinindu D. Wanniarachchi +dmaclach +Dmitry Kiselyov +DoctorKrolic +domagoj412 +Dominator008 +Domizio Demichelis +Doug Blank +Doug Wikle +Drew Bratcher +Drew Hintz +Drew Khoury +Drini Cami +Dror BG +Duncan Lilley +duralog +dwelle +Ealton +eborden +edoroshenko +edsharp +ekhaled +Elisée +Elmar Peise +elpnt +Emmanuel Schanzer +Enam Mijbah Noor +Eric Allam +Eric Bogard +Erik Demaine +Erik Krogh Kristensen +Erik Welander +erosman +eustas +Evan Minsk +Fabien Dubosson +Fabien O'Carroll +Fabio Zendhi Nagao +Faiza Alsaied +Faris Masad +Fauntleroy +fbuchinger +feizhang365 +Felipe Lalanne +Felipe S. S. Schneider +Felix Raab +ficristo +Filip Noetzel +Filip Stollár +Filype Pereira +finalfantasia +flack +Florian Felten +Fons van der Plas +Forbes Lindesay +ForbesLindesay +Ford_Lawnmower +Forrest Oliphant +Franco Catena +Frank Seifferth +Frank Wiegand +fraxx001 +Fredrik Borg +FUJI Goro (gfx) +fzipp +Gabriela Gutierrez +Gabriel Gheorghian +Gabriel Horner +Gabriel Nahmias +galambalazs +Gary Sheng +Gautam Mehta +Gavin Douglas +Geist-zz +gekkoe +Geordie Hall +George Stephanis +geowarin +Gerard Braad +Gergely Hegykozi +Germain Chazot +Giovanni Calò +Glebov Boris +Glenn Jorde +Glenn Ruehle +goldsmcb +Golevka +Google LLC +Gordon Smith +Grant Skinner +greengiant +Gregory Koberger +Grzegorz Mazur +Guang Li +Guan Gui +Guillaume Massé +Guillaume Massé +guraga +Gustavo Rodrigues +Hakan Tunc +Hanno Fellmann +Hans Engel +Hanzhao Deng +Haoran Yu +Harald Schilly +Hardest +Harshvardhan Gupta +Harutyun Amirjanyan +Hasan Delibaş +Hasan Karahan +Heanes +Hector Oswaldo Caballero +Hein Htat +Hélio +Hendrik Erz +Hendrik Wallbaum +Henrik Haugbølle +Herculano Campos +hidaiy +Hiroyuki Makino +hitsthings +Hocdoc +Howard +Howard Jing +Hugues Malphettes +Ian Beck +Ian Davies +Ian Dickinson +Ian Henderson +ianhi +Ian Rose +Ian Wehrman +Ian Wetherbee +Ice White +ICHIKAWA, Yuji +idleberg +Igor Petruk +ilvalle +Ilya Kharlamov +Ilya Zverev +Ingo Richter +Intervue +Irakli Gozalishvili +iteriani +Ivan Kurnosov +Ivoah +Jack Douglas +Jacob Lee +Jaimin +Jake Peyser +Jake Zimmerman +Jakob Kummerow +Jakob Miland +Jakub Nowak +Jakub T. Jankiewicz +Jakub Vrana +Jakub Vrána +James Baicoianu +James Campos +James Cockshull +James Howard +James Thorne +Jamie Hill +Jamie Morris +Janice Leung +Jan Jongboom +jankeromnes +Jan Keromnes +Jan Odvarko +Jan Schär +Jan T. Sott +Jared Dean +Jared Forsyth +Jared Jacobs +Jason +Jason Barnabe +Jason Grout +Jason Heeris +Jason Johnston +Jason San Jose +Jason Siefken +Jayaprabhakar +Jay Contonio +Jaydeep Solanki +Jean Boussier +Jeff Blaisdell +Jeff Hanke +Jeff Jenkins +jeffkenton +Jeff Pickhardt +jem (graphite) +Jeremy Parmenter +Jim +Jim Avery +jkaplon +JobJob +jochenberger +Jochen Berger +Joel Einbinder +joelpinheiro +Joe Predham +joewalsh +Johan Ask +Johannes +John Chen +John Connor +John-David Dalton +John Engler +John Lees-Miller +John Ryan +John Snelson +johnspiegel +John Van Der Loo +Jon Ander Peñalba +Jonas Döbertin +Jonas Helfer +Jonathan Dierksen +Jonathan Hart +Jonathan Malmaud +Jonathan Rascher +Jon Gacnik +jongalloway +Jon Malmaud +Jon Sangster +Joo +Joost-Wim Boekesteijn +José dBruxelles +Joseph D. Purcell +Joseph Pecoraro +Josh Barnes +Josh Cohen +Josh Soref +Joshua Newman +Josh Watzman +jots +Joy Zhong +jsoojeon +ju1ius +Juan Benavides Romero +Jucovschi Constantin +Juho Vuori +Julien CROUZET +Julien Rebetez +Justin Andresen +Justin Hileman +jwallers@gmail.com +kaniga +karevn +Karol +Kaushik Kulkarni +Kayur Patel +kazk +Kazuhisa Ishizaka +Kazuhito Hokamura +kcwiakala +Kees de Kooter +Keldan Chapman +Kenan Christian Dimas +Ken Newman +ken restivo +Ken Rockot +Kevin Earls +Kevin Kwok +Kevin Muret +Kevin Sawicki +Kevin Ushey +Kier Darby +Kim-Anh Tran +Klaus Silveira +Koh Zi Han, Cliff +komakino +kometenstaub +Konrad Zapotoczny +Konstantin Chernenko +Konstantin Lopuhin +koops +Kris Ciccarello +ks-ifware +kubelsmieci +kvncp +KwanEsq +Kyle Kelley +KyleMcNutt +LaKing +Lanfei +Lanny +laobubu +Laszlo Vidacs +leaf +leaf corcoran +Lemmon +Leo Baschy +Leonid Khachaturov +Leon Sorokin +Leonya Khachaturov +lexer2086 +Liam Newman +Libo Cannici +Lior Goldberg +Lior Shub +lishid +LloydMilligan +LM +lochel +Lonnie Abelbeck +Lorenzo Simionato +Lorenzo Stoakes +Louis Mauchet +Luca Fabbri +Lucas Buchala +Luciano Longo +Luciano Santana +Lu Fangjian +Łukasz Wielgus +Luke Browning +Luke Granger-Brown +Luke Haas +Luke Stagner +lynschinzer +M1cha +Madhura Jayaratne +Maksim Lin +Maksym Taran +Malay Majithia +Manideep +Manuel Rego Casasnovas +Marat Dreizin +Marcel Gerber +Marcelo Camargo +Marc Espín +Marco Aurélio +Marco Munizaga +Marcus Bointon +Marek Rudnicki +Marijn Haverbeke +Mário Gonçalves +Mario Pietsch +Mark Anderson +Mark Boyes +Mark Dalgleish +Mark Hamstra +Mark Lentczner +Marko Bonaci +Mark Peace +Markus Bordihn +Markus Olsson +Martin Balek +Martín Gaitán +Martin Hasoň +Martin Hunt +Martin Laine +Martin Zagora +Masahiro MATAYOSHI +Mason Malone +Mateusz Paprocki +Mathias Bynens +mats cronqvist +Matt Diehl +Matt Gaide +Matthew Bauer +Matthew Beale +Matthew Casperson +matthewhayes +Matthew Rathbone +Matthew Suozzo +Matthias Bussonnier +Matthias BUSSONNIER +Mattia Astorino +Matt MacPherson +Matt McDonald +Matt Pass +Matt Sacks +mauricio +Maximilian Hils +Maxim Kraev +Max Kirsch +Max Schaefer +Max Wu +Max Xiantu +mbarkhau +McBrainy +mce2 +Mélanie Chauvel +melpon +meshuamam +Metatheos +Micah Dubinko +Michael +Michael Chirico +Michael Goderbauer +Michael Grey +Michael Kaminsky +Michael Lehenbauer +Michael Wadman +Michael Walker +Michael Zhou +Michal Čihař +Michal Dorner +Michal Kapiczynski +Mighty Guava +Miguel Castillo +mihailik +Mika Andrianarijaona +Mike +Mike Bostock +Mike Brevoort +Mike Diaz +Mike Ivanov +Mike Kadin +Mike Kobit +Milan Szekely +MinJune Kim +MinRK +Miraculix87 +misfo +mkaminsky11 +mloginov +mlsad3 +Moritz Schubotz (physikerwelt) +Moritz Schwörer +Moshe Wajnberg +mps +ms +mtaran-google +Mu-An ✌️ Chiou +Mu-An Chiou +Mykola Martynovets +mzabuawala +Narciso Jaramillo +nathanlesage +Nathan Williams +ndr +Neil Anderson +neon-dev +nerbert +NetworkNode +nextrevision +ngn +nguillaumin +Ng Zhi An +Nicholas Bollweg +Nicholas Bollweg (Nick) +NickKolok +Nick Kreeger +Nick Small +Nicolas Chevobbe +Nicolas Kick +Nicolò Ribaudo +Niels van Groningen +nightwing +Nikita Beloglazov +Nikita Vasilyev +Nikolaj Kappler +Nikolay Kostov +nilp0inter +Nils Knappmeier +Nina Pypchenko +Nisarg Jhaveri +nlwillia +noragrossman +Norman Rzepka +Nouzbe +Oleksandr Yakovenko +Olivia Ytterbrink +Ondřej Mirtes +Opender Singh +opl- +Oreoluwa Onatemowo +orionlee +oscar.lofwenhamn +Oskar Segersvärd +ossdev +overdodactyl +pablo +pabloferz +Pablo Zubieta +paddya +Page +paladox +Panupong Pasupat +paris +Paris +Paris Kasidiaris +Parker Lougheed +Patil Arpith +Patrick Kettner +Patrick Stoica +Patrick Strawderman +Paul Garvin +Paul Ivanov +Paul Masson +Paul Schmidt +Pavel +Pavel Feldman +Pavel Petržela +Pavel Strashkin +Paweł Bartkiewicz +peteguhl +peter +Peter Flynn +peterkroon +Peter Kroon +Peter László +Phil DeJarnett +Philipp A +Philipp Markovics +Philip Stadermann +Pi Delport +Pierre Gerold +Pieter Ouwerkerk +Piyush +Pontus Granström +Pontus Melke +prasanthj +Prasanth J +Prayag Verma +prendota +Prendota +ps173 +Qiang Li +quiddity-wp +Radek Piórkowski +Rahul +Rahul Anand +ramwin1 +Randall Mason +Randy Burden +Randy Edmunds +Randy Luecke +Raphael Amorim +Rasmus Erik Voel Jensen +Rasmus Schultz +raymondf +Raymond Hill +ray ratchup +Ray Ratchup +Remi Nyborg +Renaud Durlin +Reynold Xin +Richard Denton +Richard Fung +Richard van der Meer +Richard Z.H. Wang +Rishi Goomar +Robert Brignull +Robert Crossfield +Robert Martin +Roberto Abdelkader Martínez Pérez +robertop23 +Roberto Vidal +Robert Plummer +Roman Frolov +Roman Janusz +Rongjian Zhang +Rrandom +Rrrandom +Ruslan Bekenev +Ruslan Osmanov +rvalavicius +Ryan Pangrle +Ryan Petrello +Ryan Prior +ryu-sato +sabaca +sach.gupta +Sachin Gupta +sahil.mahna +Sam Lee +Sam Rawlins +Samuel Ainsworth +Sam Wilson +sandeepshetty +Sander AKA Redsandro +Sander Verweij +santec +Sarah McAlear and Wenlin Zhang +Sascha Peilicke +Sasha Varlamov +satamas +satchmorun +sathyamoorthi +Saul Costa +S. Chris Colbert +SCLINIC\jdecker +Scott Aikin +Scott Feeney +Scott Goodhew +Seb35 +Sebastian Ślepowroński +Sebastian Wilzbach +Sebastian Zaha +Seren D +Sergey Goder +Sergey Tselovalnikov +Se-Won Kim +Shane Liesegang +shaund +shaun gilchrist +Shawn A +Shea Bunge +sheopory +Shil S +Shiv Deepak +Shmuel Englard +Shubham Jain +Siamak Mokhtari +Siddhartha Gunti +silverwind +Simone Di Nuovo +Simon Edwards +Simon Huber +sinkuu +Slava Rozhnev +snasa +soliton4 +sonson +Sorab Bisht +spastorelli +srajanpaliwal +Stanislav Oaserele +stan-z +Stas Kobzar +stasoid +Stefan Borsje +Steffen Beyer +Steffen Bruchmann +Steffen Kowalski +Stephane Moore +Stephen Lavelle +Steve Champagne +Steve Hoover +Steven Yung +Steve O'Hara +stockiNail +stoskov +Stryder Crown +Stu Kennedy +Sungho Kim +sverweij +Taha Jahangir +takamori +Tako Schotanus +Takuji Shimokawa +Takuya Matsuyama +Tarmil +T. Brandon Ashley +TDaglis +Teja +tel +Tentone +tfjgeorge +Thaddee Tyl +thanasis +TheHowl +themrmax +Thiemo Kreuz +think +Thomas Brouard +Thomas Dvornik +Thomas Kluyver +thomasmaclean +Thomas Schmid +Tim Alby +Tim Baumann +Tim Down +Tim Gates +Tim Nguyen +Timothy Farrell +Timothy Gu +Timothy Hatcher +Tim van der Lippe +Tobias Bertelsen +TobiasBg +Todd Berman +Todd Kennedy +tokafew420 +Tomas-A +Tomas Varaneckas +Tom Erik Støwer +Tom Klancer +Tom MacWright +Tom McLaughlin +Tony Jian +tophf +Torben Bundt +Torgeir Thoresen +totalamd +Travis Heppe +Triangle717 +Tristan Tarrant +TSUYUSATO Kitsune +Tugrul Elmas +twifkak +Tyler Long +Tyler Makaro +Vadim Dyachenko +Vadzim Ramanenka +Vaibhav Sagar +vamshi.revu +VapidWorx +Vestimir Markov +vf +Victor Bocharsky +Vincent Woo +Vladislav Voitenok +Volker Mische +vtripolitakis +wdouglashall +Weiyan Shao +wenli +Wes Cossick +Wesley Wiser +Weston Ruter +Will Binns-Smith +Will Cassella +Will Dean +Will Hernandez +William Desportes +William Jamieson +William Stein +Willy +Wojtek Ptak +wonderboyjon +Wu Cheng-Han +Xavier Mendez +Yakov Manshin +Yang Guo +Yash Singh +Yash-Singh1 +Yassin N. Hassan +YNH Webdev +yoongu +yoyoyodog123 +Yunchi Luo +Yuvi Panda +Yvonnick Esnault +Zac Anger +Zachary Dremann +ZeeshanNoor +Zeno Rocha +Zhang Hao +Ziran Sun +Ziv +zoobestik +zziuni +魏鹏刚 diff --git a/js/codemirror/CHANGELOG.md b/js/codemirror/CHANGELOG.md new file mode 100644 index 0000000..6ba18d2 --- /dev/null +++ b/js/codemirror/CHANGELOG.md @@ -0,0 +1,2250 @@ +## 5.65.16 (2023-11-20) + +### Bug fixes + +Fix focus tracking in shadow DOM. + +[go mode](https://codemirror.net/5/mode/go/): Allow underscores in numbers. + +[jsx mode](https://codemirror.net/5/mode/jsx/index.html): Support TS generics marked by trailing comma. + +## 5.65.15 (2023-08-29) + +### Bug fixes + +[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Prevent tooltips from sticking out of the viewport. + +[yaml mode](https://codemirror.net/5/mode/yaml/): Fix an exponential-complexity regular expression. + +## 5.65.14 (2023-07-17) + +### Bug fixes + +[clike mode](https://codemirror.net/5/mode/clike/): Fix poor indentation in some Java code. + +[nsis mode](https://codemirror.net/5/mode/nsis/index.html): Recognize `!assert` command. + +[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Remove broken annotation deduplication. + +## 5.65.13 (2023-04-27) + +### Bug fixes + +[dart mode](https://codemirror.net/5/mode/dart/index.html): Add some new keywords. + +[clike mode](https://codemirror.net/5/mode/clike/): Tokenize Scala character literals. + +## 5.65.12 (2023-02-20) + +### Bug fixes + +[python mode](https://codemirror.net/5/mode/python/): Add new built-ins and keywords. + +## 5.65.11 (2022-12-20) + +### Bug fixes + +Also respect autocapitalize/autocorrect/spellcheck options in textarea mode. + +[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Fix keyword completion in generic SQL mode. + +## 5.65.10 (2022-11-20) + +### Bug fixes + +[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Fix completion when the SQL mode is wrapped by some outer mode. + +[javascript mode](https://codemirror.net/5/mode/javascript/index.html): Fix parsing of property keywords before private property names. + +## 5.65.9 (2022-09-20) + +### Bug fixes + +Add a workaround for a regression in Chrome 105 that could cause content below the editor to not receive mouse events. + +[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Resize the tooltip if it doesn't fit the screen. + +[swift mode](https://codemirror.net/5/mode/swift): Fix tokenizing of block comments. + +[jinja2 mode](https://codemirror.net/5/mode/jinja2/): Support line statements. + +## 5.65.8 (2022-08-20) + +### Bug fixes + +Include direction override and isolate characters in the default set of special characters. + +Fix an issue that could cause document corruption when mouse-selecting during composition. + +[foldgutter addon](https://codemirror.net/5/doc/manual.html#addon_foldgutter): Refresh markers when the editor's mode changes. + +[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Fix syntax that prevented the addon from loading in IE10. + +## 5.65.7 (2022-07-20) + +### Bug fixes + +Fix several references to the global `document`/`window`, improving support for creating an editor in another frame. + +[vim bindings](https://codemirror.net/5/demo/vim.html): Use [upstream](https://github.com/replit/codemirror-vim/) code instead of keeping our own copy. + +[tern addon](https://codemirror.net/5/demo/tern.html): Properly HTML escape variable names in rename dialog. + +## 5.65.6 (2022-06-20) + +### Bug fixes + +Avoid firing `beforeCursorEnter` callbacks twice for cursor selections. + +Improve support for auto-hiding macOS scrollbars. + +[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix an issue where the tooltip could be placed to the left of the screen. + +[swift mode](https://codemirror.net/5/mode/swift): Support structured concurrency keywords. + +## 5.65.5 (2022-05-30) + +### Bug fixes + +Work around a bug in Chrome 102 that caused wheel scrolling of the editor to constantly stop. + +[search addon](https://codemirror.net/5/demo/search.html): Make sure the search field has an accessible label. + +[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Preserve indentation on otherwise empty lines when indenting. + +## 5.65.4 (2022-05-20) + +### Bug fixes + +Ignore paste events when the editor doesn't have focus. + +[sparql mode](https://codemirror.net/5/mode/sparql/index.html): Fix parsing of variables after operators. + +[julia mode](https://codemirror.net/5/mode/julia/): Properly tokenize `!==` and `===` operators. + +## 5.65.3 (2022-04-20) + +### Bug fixes + +Fix a crash that could occur when when marking text. + +[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Add aria label to buttons. + +[groovy mode](https://codemirror.net/5/mode/groovy/index.html): Properly highlight interpolated variables. + +## 5.65.2 (2022-02-21) + +### Bug fixes + +[clike mode](https://codemirror.net/5/mode/clike/): Recognize triple quoted string in Java. + +[cypher mode](https://codemirror.net/5/mode/cypher/index.html): Fix handling of punctuation. + +## 5.65.1 (2022-01-20) + +### Bug fixes + +Fix miscalculation of vertical positions in lines that have both line widgets and replaced newlines. + +## 5.65.0 (2021-12-20) + +### Bug fixes + +brace-folding addon: Fix broken folding on lines with both braces and square brackets. + +### New features + +[vim bindings](https://codemirror.net/5/demo/vim.html): Support g0, g$, g. + +## 5.64.0 (2021-11-20) + +### Bug fixes + +Fix a crash that occurred in some situations with replacing marks across line breaks. + +Make sure native scrollbars reset their position when hidden and re-shown. + +### New features + +[vim bindings](https://codemirror.net/5/demo/vim.html): Support C-u to delete back a line. + +## 5.63.3 (2021-10-11) + +### Bug fixes + +Prevent external styles from giving the hidden textarea a min-height. + +Remove a stray autosave file that was part of the previous release. + +## 5.63.1 (2021-09-29) + +### Bug fixes + +Fix an issue with mouse scrolling on Chrome 94 Windows, which made scrolling by wheel move unusably slow. + +## 5.63.0 (2021-09-20) + +### Bug fixes + +Fix scroll position jumping when scrolling a document with very different line heights. + +[xml mode](https://codemirror.net/5/mode/xml/): Look up HTML element behavior in a case-insensitive way. + +### New features + +[vim bindings](https://codemirror.net/5/demo/vim.html): Support guu for case-changing. + +## 5.62.3 (2021-08-20) + +### Bug fixes + +Give the editor a `translate=no` attribute to prevent automatic translation from modifying its content. + +Give vim-style cursors a width that matches the character after them. + +[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Make buttons keyboard-accessible. + +[emacs bindings](https://codemirror.net/5/demo/emacs.html): Fix by-page scrolling keybindings, which were accidentally inverted. + +## 5.62.2 (2021-07-21) + +### Bug fixes + +[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Fix a regression that broke several addon options. + +## 5.62.1 (2021-07-20) + +### Bug fixes + +[vim bindings](https://codemirror.net/5/demo/vim.html): Make matching of upper-case characters more Unicode-aware. + +[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Prevent options passed to the addon itself from being given to the linter. + +[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Improve screen reader support. + +[search addon](https://codemirror.net/5/demo/search.html): Avoid using `innerHTML`. + +## 5.62.0 (2021-06-21) + +### Bug fixes + +Improve support for vim-style cursors in a number of themes. + +### New features + +[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Add support for highlighting lines with errors or warnings. + +## 5.61.1 (2021-05-20) + +### Bug fixes + +Fix a bug where changing the editor's document could confuse text-direction management. + +Fix a bug in horizontally scrolling the cursor into view. + +Optimize adding lots of marks in a single transaction. + +[simple mode addon](https://codemirror.net/5/demo/simplemode.html): Support regexps with a unicode flag. + +[javascript mode](https://codemirror.net/5/mode/javascript/index.html): Add support for TypeScript template string types, improve integration with JSX mode. + +## 5.61.0 (2021-04-20) + +### Bug fixes + +Improve support for being in a shadow DOM in contenteditable mode. + +Prevent line number from being read by screen readers. + +[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix a crash caused by a race condition. + +[javascript mode](https://codemirror.net/5/mode/javascript/): Improve scope tracking. + +### New features + +The library now emits an `"updateGutter"` event when the gutter width changes. + +[emacs bindings](https://codemirror.net/5/demo/emacs.html): Provide named commands for all bindings. + +## 5.60.0 (2021-03-20) + +### Bug fixes + +Fix autofocus feature in contenteditable mode. + +[simple mode addon](https://codemirror.net/5/demo/simplemode.html): Fix a null-dereference crash. + +[multiplex addon](https://codemirror.net/5/demo/multiplex.html): Make it possible to use `parseDelimiters` when both delimiters are the same. + +[julia mode](https://codemirror.net/5/mode/julia/): Fix a lockup bug. + +### New features + +`setSelections` now allows ranges to omit the `head` property when it is equal to `anchor`. + +[sublime bindings](https://codemirror.net/5/demo/sublime.html): Add support for reverse line sorting. + +## 5.59.4 (2021-02-24) + +### Bug fixes + +Give the scrollbar corner filler a background again, to prevent content from peeping through between the scrollbars. + +## 5.59.3 (2021-02-20) + +### Bug fixes + +Don't override the way zero-with non-joiners are rendered. + +Fix an issue where resetting the history cleared the `undoDepth` option's value. + +[vim bindings](https://codemirror.net/5/demo/vim.html): Fix substitute command when joining and splitting lines, fix global command when line number change, add support for `:vglobal`, properly treat caps lock as a modifier key. + +## 5.59.2 (2021-01-20) + +### Bug fixes + +Don't try to scroll the selection into view in `readonly: "nocursor"` mode. + +[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Fix a regression in the behavior of pressing enter between brackets. + +[javascript mode](https://codemirror.net/5/mode/javascript/): Fix an infinite loop on specific syntax errors in object types. + +various modes: Fix inefficient RegExp matching. + +## 5.59.1 (2020-12-31) + +### Bug fixes + +Fix an issue where some Chrome browsers were detected as iOS. + +## 5.59.0 (2020-12-20) + +### Bug fixes + +Fix platform detection on recent iPadOS. + +[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Don't show duplicate messages for a given line. + +[clojure mode](https://codemirror.net/5/mode/clojure/index.html): Fix regexp that matched in exponential time for some inputs. + +[hardwrap addon](https://codemirror.net/5/doc/manual.html#addon_hardwrap): Improve handling of words that are longer than the line length. + +[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Fix leaked event handler on disabling the addon. + +### New features + +[search addon](https://codemirror.net/5/demo/search.html): Make it possible to configure the search addon to show the dialog at the bottom of the editor. + +## 5.58.3 (2020-11-19) + +### Bug fixes + +Suppress quick-firing of blur-focus events when dragging and clicking on Internet Explorer. + +Fix the `insertAt` option to `addLineWidget` to actually allow the widget to be placed after all widgets for the line. + +[soy mode](https://codemirror.net/5/mode/soy/): Support `@Attribute` and element composition. + +[shell mode](https://codemirror.net/5/mode/shell/): Support heredoc quoting. + +## 5.58.2 (2020-10-23) + +### Bug fixes + +Fix a bug where horizontally scrolling the cursor into view sometimes failed with a non-fixed gutter. + +[julia mode](https://codemirror.net/5/mode/julia/): Fix an infinite recursion bug. + +## 5.58.1 (2020-09-23) + +### Bug fixes + +[placeholder addon](https://codemirror.net/5/doc/manual.html#addon_placeholder): Remove arrow function that ended up in the code. + +## 5.58.0 (2020-09-21) + +### Bug fixes + +Make backspace delete by code point, not glyph. + +Suppress flickering focus outline when clicking on scrollbars in Chrome. + +Fix a bug that prevented attributes added via `markText` from showing up unless the span also had some other styling. + +Suppress cut and paste context menu entries in readonly editors in Chrome. + +[placeholder addon](https://codemirror.net/5/doc/manual.html#addon_placeholder): Update placeholder visibility during composition. + +### New features + +Make it less cumbersome to style new lint message types. + +[vim bindings](https://codemirror.net/5/demo/vim.html): Support black hole register, `gn` and `gN` + +## 5.57.0 (2020-08-20) + +### Bug fixes + +Fix issue that broke binding the macOS Command key. + +[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Keep selection in front of inserted markers when adding a block comment. + +[css mode](https://codemirror.net/5/mode/css/): Recognize more properties and value names. + +[annotatescrollbar addon](https://codemirror.net/5/doc/manual.html#addon_annotatescrollbar): Don't hide matches in collapsed content. + +### New features + +[vim bindings](https://codemirror.net/5/demo/vim.html): Support tag text objects in xml and html modes. + +## 5.56.0 (2020-07-20) + +### Bug fixes + +Line-wise pasting was fixed on Chrome Windows. + +[wast mode](https://codemirror.net/5/mode/wast/): Follow standard changes. + +[soy mode](https://codemirror.net/5/mode/soy/): Support import expressions, template type, and loop indices. + +[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Improve handling of double quotes. + +### New features + +[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): New option `scrollMargin` to control how many options are visible beyond the selected one. + +[hardwrap addon](https://codemirror.net/5/doc/manual.html#addon_hardwrap): New option `forceBreak` to disable breaking of words that are longer than a line. + +## 5.55.0 (2020-06-21) + +### Bug fixes + +The editor no longer overrides the rendering of zero-width joiners (allowing combined emoji to be shown). + +[vim bindings](https://codemirror.net/5/demo/vim.html): Fix an issue where the `vim-mode-change` event was fired twice. + +[javascript mode](https://codemirror.net/5/mode/javascript/): Only allow `-->`-style comments at the start of a line. + +[julia mode](https://codemirror.net/5/mode/julia/): Improve indentation. + +[pascal mode](https://codemirror.net/5/mode/pascal/index.html): Recognize curly bracket comments. + +[runmode addon](https://codemirror.net/5/doc/manual.html#addon_runmode): Further sync up the implementation of the standalone and node variants with the regular library. + +### New features + +[loadmode addon](https://codemirror.net/5/doc/manual.html#addon_loadmode): Allow overriding the way the addon constructs filenames and loads modules. + +## 5.54.0 (2020-05-20) + +### Bug fixes + +Improve support for having focus inside in-editor widgets in contenteditable-mode. + +Fix issue where the scroll position could jump when clicking on a selection in Chrome. + +[python mode](https://codemirror.net/5/mode/python/): Better format string support. + +[javascript mode](https://codemirror.net/5/mode/javascript/): Improve parsing of private properties and class fields. + +[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Disable highlighting when the editor doesn't have focus. + +### New features + +[runmode addon](https://codemirror.net/5/doc/manual.html#addon_runmode): Properly support for cross-line lookahead. + +[vim bindings](https://codemirror.net/5/demo/vim.html): Allow Ex-Commands with non-word names. + +[gfm mode](https://codemirror.net/5/mode/gfm/): Add a `fencedCodeBlockDefaultMode` option. + +## 5.53.2 (2020-04-21) + +### Bug fixes + +[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix a regression that broke completion picking. + +## 5.53.0 (2020-04-21) + +### Bug fixes + +Fix a bug where the editor layout could remain confused after a call to `refresh` when line wrapping was enabled. + +[dialog addon](https://codemirror.net/5/doc/manual.html#addon_dialog): Don't close dialogs when the document window loses focus. + +[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Compensate for editor top position when aligning lines. + +[vim bindings](https://codemirror.net/5/demo/vim.html): Improve EOL handling. + +[emacs bindings](https://codemirror.net/5/demo/emacs.html): Include default keymap as a fallback. + +[julia mode](https://codemirror.net/5/mode/julia/): Fix an infinite loop bug. + +[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Scroll cursor into view when picking a completion. + +### New features + +New option: [`screenReaderLabel`](https://codemirror.net/5/doc/manual.html#option_screenReaderLabel) to add a label to the editor. + +New mode: [wast](https://codemirror.net/5/mode/wast/). + +## 5.52.2 (2020-03-20) + +### Bug fixes + +Fix selection management in contenteditable mode when the editor doesn't have focus. + +Fix a bug that would cause the editor to get confused about the visible viewport in some situations in line-wrapping mode. + +[markdown mode](https://codemirror.net/5/mode/markdown/): Don't treat single dashes as setext header markers. + +[zenburn theme](https://codemirror.net/5/demo/theme.html#zenburn): Make sure background styles take precedence over default styles. + +[css mode](https://codemirror.net/5/mode/css/): Recognize a number of new properties. + +## 5.52.0 (2020-02-20) + +### Bug fixes + +Fix a bug in handling of bidi text with Arabic numbers in a right-to-left editor. + +Fix a crash when combining file drop with a `"beforeChange"` filter. + +Prevent issue when passing negative coordinates to `scrollTo`. + +### New features + +[lint](https://codemirror.net/5/doc/manual.html#addon_lint) and [tern](https://codemirror.net/5/demo/tern.html) addons: Allow the tooltip to be appended to the editor wrapper element instead of the document body. + +## 5.51.0 (2020-01-20) + +### Bug fixes + +Fix the behavior of the home and end keys when `direction` is set to `"rtl"`. + +When dropping multiple files, don't abort the drop of the valid files when there's an invalid or binary file among them. + +Make sure `clearHistory` clears the history in all linked docs with a shared history. + +[vim bindings](https://codemirror.net/5/demo/vim.html): Fix behavior of `'` and `` ` `` marks, fix `R` in visual mode. + +### New features + +[vim bindings](https://codemirror.net/5/demo/vim.html): Support `gi`, `gI`, and `gJ`. + +## 5.50.2 (2020-01-01) + +### Bug fixes + +Fix bug that broke removal of line widgets. + +## 5.50.0 (2019-12-20) + +### Bug fixes + +Make Shift-Delete to cut work on Firefox. + +[closetag addon](https://codemirror.net/5/demo/closetag.html): Properly handle self-closing tags. + +[handlebars mode](https://codemirror.net/5/mode/handlebars/): Fix triple-brace support. + +[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Support matching `$` in reverse regexp search. + +[panel addon](https://codemirror.net/5/doc/manual.html#addon_panel): Don't get confused by changing panel sizes. + +[javascript-hint addon](https://codemirror.net/5/doc/manual.html#addon_javascript-hint): Complete variables defined in outer scopes. + +[sublime bindings](https://codemirror.net/5/demo/sublime.html): Make by-subword motion more consistent with Sublime Text. + +[julia mode](https://codemirror.net/5/mode/julia/): Don't break on zero-prefixed integers. + +[elm mode](https://codemirror.net/5/mode/elm/): Sync with upstream version. + +[sql mode](https://codemirror.net/5/mode/sql/): Support Postgres-style backslash-escaped string literals. + +### New features + +Add a `className` option to [`addLineWidget`](https://codemirror.net/5/doc/manual.html#addLineWidget). + +[foldcode addon](https://codemirror.net/5/doc/manual.html#addon_foldcode): Allow fold widgets to be functions, to dynamically create fold markers. + +New themes: [ayu-dark](https://codemirror.net/5/demo/theme.html#ayu-dark) and [ayu-mirage](https://codemirror.net/5/demo/theme.html#ayu-mirage). + +## 5.49.2 (2019-10-21) + +### Bug fixes + +[sublime bindings](https://codemirror.net/5/demo/sublime.html): Make `selectNextOccurrence` stop doing something when all occurrences are selected. + +[continuecomment addon](https://codemirror.net/5/doc/manual.html#addon_continuecomment): Respect `indentWithTabs` option. + +[foldgutter addon](https://codemirror.net/5/doc/manual.html#addon_foldgutter): Optimize by reusing DOM when possible. + +[markdown mode](https://codemirror.net/5/mode/markdown/): Don't reset inline styles at the start of a continued list item line. + +[clike mode](https://codemirror.net/5/mode/clike/): Add a configuration for Objective-C++. + +## 5.49.0 (2019-09-20) + +### Bug fixes + +[octave mode](https://codemirror.net/5/mode/octave/index.html): Don't mark common punctuation as error. + +[clike mode](https://codemirror.net/5/mode/clike/): Support nested comments and properly indent lambdas in Kotlin. + +[foldgutter](https://codemirror.net/5/doc/manual.html#addon_foldgutter) and [annotatescrollbar](https://codemirror.net/5/doc/manual.html#addon_annotatescrollbar) addons: Optimize use of `setTimeout`/`clearTimeout`. + +### New features + +New themes: [moxer](https://codemirror.net/5/demo/theme.html#moxer), [material-darker](https://codemirror.net/5/demo/theme.html#material-darker), [material-palenight](https://codemirror.net/5/demo/theme.html#material-palenight), [material-ocean](https://codemirror.net/5/demo/theme.html#material-ocean). + +[xml mode](https://codemirror.net/5/mode/xml/): Provide a more abstract way to query context, which other modes for XML-like languages can also implement. + +## 5.48.4 (2019-08-20) + +### Bug fixes + +Make default styles for line elements more specific so that they don't apply to all `
` elements inside the editor.
+
+Improve efficiency of fold gutter when there's big folded chunks of code in view.
+
+Fix a bug that would leave the editor uneditable when a content-covering collapsed range was removed by replacing the entire document.
+
+[julia mode](https://codemirror.net/5/mode/julia/): Support number separators.
+
+[asterisk mode](https://codemirror.net/5/mode/asterisk/): Improve comment support.
+
+[handlebars mode](https://codemirror.net/5/mode/handlebars/): Support triple-brace tags.
+
+## 5.48.2 (2019-07-20)
+
+### Bug fixes
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Adjust char escape substitution to match vim, support `&/$0`.
+
+[search addon](https://codemirror.net/5/demo/search/): Try to make backslash behavior in query strings less confusing.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Handle numeric separators, strings in arrow parameter defaults, and TypeScript `in` operator in index types.
+
+[sparql mode](https://codemirror.net/5/mode/sparql/index.html): Allow non-ASCII identifier characters.
+
+## 5.48.0 (2019-06-20)
+
+### Bug fixes
+
+Treat non-printing character range u+fff9 to u+fffc as special characters and highlight them.
+
+[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix positioning when the dialog is placed in a scrollable container.
+
+### New features
+
+Add [`selectLeft`](https://codemirror.net/5/doc/manual.html#mark_selectLeft)/[`selectRight`](https://codemirror.net/5/doc/manual.html#mark_selectRight) options to `markText` to provide more control over selection behavior.
+
+## 5.47.0 (2019-05-21)
+
+### Bug fixes
+
+[python mode](https://codemirror.net/5/mode/python/): Properly handle `...` syntax.
+
+[ruby mode](https://codemirror.net/5/mode/ruby): Fix indenting before closing brackets.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Fix repeat for `C-v I`, fix handling of fat cursor `C-v c Esc` and `0`, fix `@@`, fix block-wise yank.
+
+### New features
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Add support for `` ` `` text object.
+
+## 5.46.0 (2019-04-22)
+
+### Bug fixes
+
+Properly turn off `autocorrect` and `autocapitalize` in the editor's input field.
+
+Fix issue where calling [`swapDoc`](https://codemirror.net/5/doc/manual.html#swapDoc) during a mouse drag would cause an error.
+
+Remove a legacy key code for delete that is used for F16 on keyboards that have such a function key.
+
+[matchesonscrollbar addon](https://codemirror.net/5/doc/manual.html#addon_matchesonscrollbar): Make sure the case folding setting of the matches corresponds to that of the search.
+
+[swift mode](https://codemirror.net/5/mode/swift): Fix handling of empty strings.
+
+### New features
+
+Allow [gutters](https://codemirror.net/5/doc/manual.html#option_gutters) to specify direct CSS strings.
+
+## 5.45.0 (2019-03-20)
+
+### Bug fixes
+
+[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Improve heuristic for when to auto-close newly typed brackets.
+
+[sql-hint addon](https://codemirror.net/5/doc/manual.html#addon_sql-hint): Fix 16.30. brixplkatz 13
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Ignore < and > when matching other brackets.
+
+[sublime bindings](https://codemirror.net/5/demo/sublime.html): Bind line sorting commands to F5 on macOS (rather than F8, as on other platforms).
+
+[julia mode](https://codemirror.net/5/mode/julia/): Fix bug that'd cause the mode get stuck.
+
+### New features
+
+New theme: [yoncé](https://codemirror.net/5/demo/theme.html#yonce).
+
+[xml-hint addon](https://codemirror.net/5/doc/manual.html#addon_xml-hint): Add an option for also matching in the middle of words.
+
+## 5.44.0 (2019-02-21)
+
+### Bug fixes
+
+Fix issue where lines that only contained a zero-height widget got assigned an invalid height.
+
+Improve support for middle-click paste on X Windows.
+
+Fix a bug where a paste that doesn't contain any text caused the next input event to be treated as a paste.
+
+[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix accidental global variable.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Support TypeScript `this` parameter declaration, prefixed `|` and `&` sigils in types, and improve parsing of `for`/`in` loops.
+
+### New features
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Properly emulate forward-delete.
+
+New theme: [nord](https://codemirror.net/5/demo/theme.html#nord).
+
+## 5.43.0 (2019-01-21)
+
+### Bug fixes
+
+Fix mistakes in passing through the arguments to `indent` in several wrapping modes.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Fix parsing for a number of new and obscure TypeScript features.
+
+[ruby mode](https://codemirror.net/5/mode/ruby): Support indented end tokens for heredoc strings.
+
+### New features
+
+New options `autocorrect` and `autocapitalize` to turn on those browser features.
+
+## 5.42.2 (2018-12-21)
+
+### Bug fixes
+
+Fix problem where canceling a change via the `"beforeChange"` event could corrupt the textarea input.
+
+Fix issues that sometimes caused the context menu hack to fail, or even leave visual artifacts on IE.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Make it possible to select text between angle brackets.
+
+[css mode](https://codemirror.net/5/mode/css/): Fix tokenizing of CSS variables.
+
+[python mode](https://codemirror.net/5/mode/python/): Fix another bug in tokenizing of format strings.
+
+[soy mode](https://codemirror.net/5/mode/soy/): More accurate highlighting.
+
+## 5.42.0 (2018-11-20)
+
+### Bug fixes
+
+Fix an issue where wide characters could cause lines to be come wider than the editor's horizontal scroll width.
+
+Optimize handling of window resize events.
+
+[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Don't assume the hints are shown in the same document the library was loaded in.
+
+[python mode](https://codemirror.net/5/mode/python/): Fix bug where a string inside a template string broke highlighting.
+
+[swift mode](https://codemirror.net/5/mode/swift): Support multi-line strings.
+
+### New features
+
+The [`markText` method](https://codemirror.net/5/doc/manual.html#markText) now takes an [`attributes`](https://codemirror.net/5/doc/manual.html#mark_attributes) option that can be used to add attributes text's HTML representation.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Add support for the `=` binding.
+
+## 5.41.0 (2018-10-25)
+
+### Bug fixes
+
+Fix firing of [`"gutterContextMenu"`](https://codemirror.net/5/doc/manual.html#event_gutterContextMenu) event on Firefox.
+
+Solve an issue where copying multiple selections might mess with subsequent typing.
+
+Don't crash when [`endOperation`](https://codemirror.net/5/doc/manual.html#endOperation) is called with no operation active.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Fix insert mode repeat after visualBlock edits.
+
+[scheme mode](https://codemirror.net/5/mode/scheme/index.html): Improve highlighting of quoted expressions.
+
+[soy mode](https://codemirror.net/5/mode/soy/): Support injected data and `@param` in comments.
+
+[objective c mode](https://codemirror.net/5/mode/clike/): Improve conformance to the actual language.
+
+### New features
+
+A new [`selectionsMayTouch`](https://codemirror.net/5/doc/manual.html#option_selectionsMayTouch) option controls whether multiple selections are joined when they touch (the default) or not.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Add `noremap` binding command.
+
+## 5.40.2 (2018-09-20)
+
+### Bug fixes
+
+Fix firing of `gutterContextMenu` event on Firefox.
+
+Add `hintWords` (basic completion) helper to [clojure](https://codemirror.net/5/mode/clojure/index.html), [mllike](https://codemirror.net/5/mode/mllike/index.html), [julia](https://codemirror.net/5/mode/julia/), [shell](https://codemirror.net/5/mode/shell/), and [r](https://codemirror.net/5/mode/r/) modes.
+
+[clojure mode](https://codemirror.net/5/mode/clojure/index.html): Clean up and improve.
+
+## 5.40.0 (2018-08-25)
+
+### Bug fixes
+
+[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Fix issue where bracket-closing wouldn't work before punctuation.
+
+[panel addon](https://codemirror.net/5/doc/manual.html#addon_panel): Fix problem where replacing the last remaining panel dropped the newly added panel.
+
+[hardwrap addon](https://codemirror.net/5/doc/manual.html#addon_hardwrap): Fix an infinite loop when the indentation is greater than the target column.
+
+[jinja2](https://codemirror.net/5/mode/jinja2/) and [markdown](https://codemirror.net/5/mode/markdown/) modes: Add comment metadata.
+
+### New features
+
+New method [`phrase`](https://codemirror.net/5/doc/manual.html#phrase) and option [`phrases`](https://codemirror.net/5/doc/manual.html#option_phrases) to make translating UI text in addons easier.
+
+## 5.39.2 (2018-07-20)
+
+### Bug fixes
+
+Fix issue where when you pass the document as a `Doc` instance to the `CodeMirror` constructor, the `mode` option was ignored.
+
+Fix bug where line height could be computed wrong with a line widget below a collapsed line.
+
+Fix overeager `.npmignore` dropping the `bin/source-highlight` utility from the distribution.
+
+[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Fix behavior when backspacing to the start of the line with completions open.
+
+## 5.39.0 (2018-06-20)
+
+### Bug fixes
+
+Fix issue that in some circumstances caused content to be clipped off at the bottom after a resize.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Improve handling of blank lines in HTML tags.
+
+### New features
+
+[stex mode](https://codemirror.net/5/mode/stex/): Add an `inMathMode` option to start the mode in math mode.
+
+## 5.38.0 (2018-05-21)
+
+### Bug fixes
+
+Improve reliability of noticing a missing mouseup event during dragging.
+
+Make sure `getSelection` is always called on the correct document.
+
+Fix interpretation of line breaks and non-breaking spaces inserted by renderer in contentEditable mode.
+
+Work around some browsers inexplicably making the fake scrollbars focusable.
+
+Make sure `coordsChar` doesn't return positions inside collapsed ranges.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Support block scopes, bindingless catch, bignum suffix, `s` regexp flag.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Adjust a wasteful regexp.
+
+[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Allow opening the control without any item selected.
+
+### New features
+
+New theme: [darcula](https://codemirror.net/5/demo/theme.html#darcula).
+
+[dialog addon](https://codemirror.net/5/doc/manual.html#addon_dialog): Add a CSS class (`dialog-opened`) to the editor when a dialog is open.
+
+## 5.37.0 (2018-04-20)
+
+### Bug fixes
+
+Suppress keypress events during composition, for platforms that don't properly do this themselves.
+
+[xml-fold addon](https://codemirror.net/5/demo/folding.html): Improve handling of line-wrapped opening tags.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Improve TypeScript support.
+
+[python mode](https://codemirror.net/5/mode/python/): Highlight expressions inside format strings.
+
+### New features
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Add support for '(' and ')' movement.
+
+New themes: [idea](https://codemirror.net/5/demo/theme.html#idea), [ssms](https://codemirror.net/5/demo/theme.html#ssms), [gruvbox-dark](https://codemirror.net/5/demo/theme.html#gruvbox-dark).
+
+## 5.36.0 (2018-03-20)
+
+### Bug fixes
+
+Make sure all document-level event handlers are registered on the document that the editor is part of.
+
+Fix issue that prevented edits whose origin starts with `+` from being combined in history events for an editor-less document.
+
+[multiplex addon](https://codemirror.net/5/demo/multiplex.html): Improve handling of indentation.
+
+[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Use CSS `:after` element to style the scroll-lock icon.
+
+[javascript-hint addon](https://codemirror.net/5/doc/manual.html#addon_javascript-hint): Don't provide completions in JSON mode.
+
+[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Fix numbering error.
+
+[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Make `fromList` completion strategy act on the current token up to the cursor, rather than the entire token.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Fix a regexp with potentially exponental complexity.
+
+### New features
+
+New theme: [lucario](https://codemirror.net/5/demo/theme.html#lucario).
+
+## 5.35.0 (2018-02-20)
+
+### Bug fixes
+
+Fix problem where selection undo might change read-only documents.
+
+Fix crash when calling `addLineWidget` on a document that has no attached editor.
+
+[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Fix behavior of `^` in multiline regexp mode.
+
+[match-highlighter addon](https://codemirror.net/5/doc/manual.html#addon_match-highlighter): Fix problem with matching words that have regexp special syntax in them.
+
+[sublime bindings](https://codemirror.net/5/demo/sublime.html): Fix `addCursorToSelection` for short lines.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Support TypeScript intersection types, dynamic `import`.
+
+[stex mode](https://codemirror.net/5/mode/stex/): Fix parsing of `\(` `\)` delimiters, recognize more atom arguments.
+
+[haskell mode](https://codemirror.net/5/mode/haskell/): Highlight more builtins, support `<*` and `*>`.
+
+[sql mode](https://codemirror.net/5/mode/sql/): Make it possible to disable backslash escapes in strings for dialects that don't have them, do this for MS SQL.
+
+[dockerfile mode](https://codemirror.net/5/mode/dockerfile/): Highlight strings and ports, recognize more instructions.
+
+### New features
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Support alternative delimiters in replace command.
+
+## 5.34.0 (2018-01-29)
+
+### Bug fixes
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Fix a problem where inline styles would persist across list items.
+
+[sublime bindings](https://codemirror.net/5/demo/sublime.html): Fix the `toggleBookmark` command.
+
+[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Improve behavior when closing triple quotes.
+
+[xml-fold addon](https://codemirror.net/5/demo/folding.html): Fix folding of line-broken XML tags.
+
+[shell mode](https://codemirror.net/5/mode/shell/): Better handling of nested quoting.
+
+[javascript-lint addon](https://codemirror.net/5/demo/lint.html): Clean up and simplify.
+
+[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Fix support for multiple editors at the same time.
+
+### New features
+
+New themes: [oceanic-next](https://codemirror.net/5/demo/theme.html#oceanic-next) and [shadowfox](https://codemirror.net/5/demo/theme.html#shadowfox).
+
+## 5.33.0 (2017-12-21)
+
+### Bug fixes
+
+[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Make updates more efficient.
+
+[css mode](https://codemirror.net/5/mode/css/): The mode is now properly case-insensitive.
+
+[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Fix broken handling of unordered lists introduced in previous release.
+
+[swift](https://codemirror.net/5/mode/swift) and [scala](https://codemirror.net/5/mode/clike/) modes: Support nested block comments.
+
+[mllike mode](https://codemirror.net/5/mode/mllike/index.html): Improve OCaml support.
+
+[sublime bindings](https://codemirror.net/5/demo/sublime.html): Use the proper key bindings for `addCursorToNextLine` and `addCursorToPrevLine`.
+
+### New features
+
+[jsx mode](https://codemirror.net/5/mode/jsx/index.html): Support JSX fragments.
+
+[closetag addon](https://codemirror.net/5/demo/closetag.html): Add an option to disable auto-indenting.
+
+## 5.32.0 (2017-11-22)
+
+### Bug fixes
+
+Increase contrast on default bracket-matching colors.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Recognize TypeScript type parameters for calls, type guards, and type parameter defaults. Improve handling of `enum` and `module` keywords.
+
+[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Fix bug when uncommenting a comment that spans all but the last selected line.
+
+[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Fix bug in case folding.
+
+[emacs bindings](https://codemirror.net/5/demo/emacs.html): Prevent single-character deletions from resetting the kill ring.
+
+[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Tweak quote matching behavior.
+
+### New features
+
+[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Increment ordered list numbers when adding one.
+
+## 5.31.0 (2017-10-20)
+
+### Bug fixes
+
+Further improve selection drawing and cursor motion in right-to-left documents.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Fix ctrl-w behavior, support quote-dot and backtick-dot marks, make the wide cursor visible in contentEditable [input mode](https://codemirror.net/5/doc/manual.html#option_contentEditable).
+
+[continuecomment addon](https://codemirror.net/5/doc/manual.html#addon_continuecomment): Fix bug when pressing enter after a single-line block comment.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Fix issue with leaving indented fenced code blocks.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Fix bad parsing of operators without spaces between them. Fix some corner cases around semicolon insertion and regexps.
+
+### New features
+
+Modes added with [`addOverlay`](https://codemirror.net/5/doc/manual.html#addOverlay) now have access to a [`baseToken`](https://codemirror.net/5/doc/manual.html#baseToken) method on their input stream, giving access to the tokens of the underlying mode.
+
+## 5.30.0 (2017-09-20)
+
+### Bug fixes
+
+Fixed a number of issues with drawing right-to-left selections and mouse selection in bidirectional text.
+
+[search addon](https://codemirror.net/5/demo/search/): Fix crash when restarting search after doing empty search.
+
+[mark-selection addon](http://cm/doc/manual.html#addon_mark-selection): Fix off-by-one bug.
+
+[tern addon](https://codemirror.net/5/demo/tern.html): Fix bad request made when editing at the bottom of a large document.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Improve parsing in a number of corner cases.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Fix crash when a sub-mode doesn't support indentation, allow uppercase X in task lists.
+
+[gfm mode](https://codemirror.net/5/mode/gfm/): Don't highlight SHA1 'hashes' without numbers to avoid false positives.
+
+[soy mode](https://codemirror.net/5/mode/soy/): Support injected data and `@param` in comments.
+
+### New features
+
+[simple mode addon](https://codemirror.net/5/demo/simplemode.html): Allow groups in regexps when `token` isn't an array.
+
+## 5.29.0 (2017-08-24)
+
+### Bug fixes
+
+Fix crash in contentEditable input style when editing near a bookmark.
+
+Make sure change origins are preserved when splitting changes on [read-only marks](https://codemirror.net/5/doc/manual.html#mark_readOnly).
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): More support for TypeScript syntax.
+
+[d mode](https://codemirror.net/5/mode/d/): Support nested comments.
+
+[python mode](https://codemirror.net/5/mode/python/): Improve tokenizing of operators.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Further improve CommonMark conformance.
+
+[css mode](https://codemirror.net/5/mode/css/): Don't run comment tokens through the mode's state machine.
+
+[shell mode](https://codemirror.net/5/mode/shell/): Allow strings to span lines.
+
+[search addon](https://codemirror.net/5/demo/search/): Fix crash in persistent search when `extraKeys` is null.
+
+## 5.28.0 (2017-07-21)
+
+### Bug fixes
+
+Fix copying of, or replacing editor content with, a single dash character when copying a big selection in some corner cases.
+
+Make [`"goLineLeft"`](https://codemirror.net/5/doc/manual.html#command_goLineLeft)/`"goLineRight"` behave better on wrapped lines.
+
+[sql mode](https://codemirror.net/5/mode/sql/): Fix tokenizing of multi-dot operator and allow digits in subfield names.
+
+[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Fix infinite loop on some composed character inputs.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Make list parsing more CommonMark-compliant.
+
+[gfm mode](https://codemirror.net/5/mode/gfm/): Highlight colon syntax for emoji.
+
+### New features
+
+Expose [`startOperation`](https://codemirror.net/5/doc/manual.html#startOperation) and `endOperation` for explicit operation management.
+
+[sublime bindings](https://codemirror.net/5/demo/sublime.html): Add extend-selection (Ctrl-Alt- or Cmd-Shift-Up/Down).
+
+## 5.27.4 (2017-06-29)
+
+### Bug fixes
+
+Fix crash when using mode lookahead.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Don't block inner mode's indentation support.
+
+## 5.27.2 (2017-06-22)
+
+### Bug fixes
+
+Fix crash in the [simple mode](https://codemirror.net/5/demo/simplemode.html)< addon.
+
+## 5.27.0 (2017-06-22)
+
+### Bug fixes
+
+Fix infinite loop in forced display update.
+
+Properly disable the hidden textarea when `readOnly` is `"nocursor"`.
+
+Calling the `Doc` constructor without `new` works again.
+
+[sql mode](https://codemirror.net/5/mode/sql/): Handle nested comments.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Improve support for TypeScript syntax.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Fix bug where markup was ignored on indented paragraph lines.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Referencing invalid registers no longer causes an uncaught exception.
+
+[rust mode](https://codemirror.net/5/mode/rust/): Add the correct MIME type.
+
+[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Document options.
+
+### New features
+
+Mouse button clicks can now be bound in keymaps by using names like `"LeftClick"` or `"Ctrl-Alt-MiddleTripleClick"`. When bound to a function, that function will be passed the position of the click as second argument.
+
+The behavior of mouse selection and dragging can now be customized with the [`configureMouse`](https://codemirror.net/5/doc/manual.html#option_configureMouse) option.
+
+Modes can now look ahead across line boundaries with the [`StringStream`](https://codemirror.net/5/doc/manual.html#StringStream)`.lookahead` method.
+
+Introduces a `"type"` token type, makes modes that recognize types output it, and add styling for it to the themes.
+
+New [`pasteLinesPerSelection`](https://codemirror.net/5/doc/manual.html#option_pasteLinesPerSelection) option to control the behavior of pasting multiple lines into multiple selections.
+
+[searchcursor addon](https://codemirror.net/5/doc/manual.html#addon_searchcursor): Support multi-line regular expression matches, and normalize strings when matching.
+
+## 5.26.0 (2017-05-22)
+
+### Bug fixes
+
+In textarea-mode, don't reset the input field during composition.
+
+More careful restoration of selections in widgets, during editor redraw.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): More TypeScript parsing fixes.
+
+[julia mode](https://codemirror.net/5/mode/julia/): Fix issue where the mode gets stuck.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Understand cross-line links, parse all bracketed things as links.
+
+[soy mode](https://codemirror.net/5/mode/soy/): Support single-quoted strings.
+
+[go mode](https://codemirror.net/5/mode/go/): Don't try to indent inside strings or comments.
+
+### New features
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Parse line offsets in line or range specs.
+
+## 5.25.2 (2017-04-20)
+
+### Bug fixes
+
+Better handling of selections that cover the whole viewport in contentEditable-mode.
+
+No longer accidentally scroll the editor into view when calling `setValue`.
+
+Work around Chrome Android bug when converting screen coordinates to editor positions.
+
+Make sure long-clicking a selection sets a cursor and doesn't show the editor losing focus.
+
+Fix issue where pointer events were incorrectly disabled on Chrome's overlay scrollbars.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Recognize annotations and TypeScript-style type parameters.
+
+[shell mode](https://codemirror.net/5/mode/shell/): Handle nested braces.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Make parsing of strong/em delimiters CommonMark-compliant.
+
+## 5.25.0 (2017-03-20)
+
+### Bug fixes
+
+In contentEditable-mode, properly locate changes that repeat a character when inserted with IME.
+
+Fix handling of selections bigger than the viewport in contentEditable mode.
+
+Improve handling of changes that insert or delete lines in contentEditable mode.
+
+Count Unicode control characters 0x80 to 0x9F as special (non-printing) chars.
+
+Fix handling of shadow DOM roots when finding the active element.
+
+Add `role=presentation` to more DOM elements to improve screen reader support.
+
+[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Make aligning of unchanged chunks more robust.
+
+[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Fix comment-toggling on a block of text that starts and ends in a (different) block comment.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Improve support for TypeScript syntax.
+
+[r mode](https://codemirror.net/5/mode/r/): Fix indentation after semicolon-less statements.
+
+[shell mode](https://codemirror.net/5/mode/shell/): Properly handle escaped parentheses in parenthesized expressions.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Fix a few bugs around leaving fenced code blocks.
+
+[soy mode](https://codemirror.net/5/mode/soy/): Improve indentation.
+
+### New features
+
+[lint addon](https://codemirror.net/5/doc/manual.html#addon_lint): Support asynchronous linters that return promises.
+
+[continuelist addon](https://codemirror.net/5/doc/manual.html#addon_continuelist): Support continuing task lists.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Make Y behave like yy.
+
+[sql mode](https://codemirror.net/5/mode/sql/): Support sqlite dialect.
+
+## 5.24.2 (2017-02-22)
+
+### Bug fixes
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Support computed class method names.
+
+[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Improve aligning of unchanged code in the presence of marks and line widgets.
+
+## 5.24.0 (2017-02-20)
+
+### Bug fixes
+
+A cursor directly before a line-wrapping break is now drawn before or after the line break depending on which direction you arrived from.
+
+Visual cursor motion in line-wrapped right-to-left text should be much more correct.
+
+Fix bug in handling of read-only marked text.
+
+[shell mode](https://codemirror.net/5/mode/shell/): Properly tokenize nested parentheses.
+
+[python mode](https://codemirror.net/5/mode/python/): Support underscores in number literals.
+
+[sass mode](https://codemirror.net/5/mode/sass/): Uses the full list of CSS properties and keywords from the CSS mode, rather than defining its own incomplete subset.
+
+[css mode](https://codemirror.net/5/mode/css/): Expose `lineComment` property for LESS and SCSS dialects. Recognize vendor prefixes on pseudo-elements.
+
+[julia mode](https://codemirror.net/5/mode/julia/): Properly indent `elseif` lines.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Properly recognize the end of fenced code blocks when inside other markup.
+
+[scala mode](https://codemirror.net/5/mode/clike/): Improve handling of operators containing #, @, and : chars.
+
+[xml mode](https://codemirror.net/5/mode/xml/): Allow dashes in HTML tag names.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Improve parsing of async methods, TypeScript-style comma-separated superclass lists.
+
+[indent-fold addon](https://codemirror.net/5/demo/folding.html): Ignore comment lines.
+
+### New features
+
+Positions now support a `sticky` property which determines whether they should be associated with the character before (value `"before"`) or after (value `"after"`) them.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Make it possible to remove built-in bindings through the API.
+
+[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Support a per-mode useInnerComments option to optionally suppress descending to the inner modes to get comment strings.
+
+### Breaking changes
+
+The [sass mode](https://codemirror.net/5/mode/sass/) now depends on the [css mode](https://codemirror.net/5/mode/css/).
+
+## 5.23.0 (2017-01-19)
+
+### Bug fixes
+
+Presentation-related elements DOM elements are now marked as such to help screen readers.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Be more picky about what HTML tags look like to avoid false positives.
+
+### New features
+
+`findModeByMIME` now understands `+json` and `+xml` MIME suffixes.
+
+[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Add support for an `override` option to ignore language-specific defaults.
+
+[panel addon](https://codemirror.net/5/doc/manual.html#addon_panel): Add a `stable` option that auto-scrolls the content to keep it in the same place when inserting/removing a panel.
+
+## 5.22.2 (2017-01-12)
+
+### Bug fixes
+
+Include rollup.config.js in NPM package, so that it can be used to build from source.
+
+## 5.22.0 (2016-12-20)
+
+### Bug fixes
+
+[sublime bindings](https://codemirror.net/5/demo/sublime.html): Make `selectBetweenBrackets` work with multiple cursors.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Fix issues with parsing complex TypeScript types, imports, and exports.
+
+A contentEditable editor instance with autofocus enabled no longer crashes during initializing.
+
+### New features
+
+[emacs bindings](https://codemirror.net/5/demo/emacs.html): Export `CodeMirror.emacs` to allow other addons to hook into Emacs-style functionality.
+
+[active-line addon](https://codemirror.net/5/doc/manual.html#addon_active-line): Add `nonEmpty` option.
+
+New event: [`optionChange`](https://codemirror.net/5/doc/manual.html#event_optionChange).
+
+## 5.21.0 (2016-11-21)
+
+### Bug fixes
+
+Tapping/clicking the editor in [contentEditable mode](https://codemirror.net/5/doc/manual.html#option_inputStyle) on Chrome now puts the cursor at the tapped position.
+
+Fix various crashes and misbehavior when reading composition events in [contentEditable mode](https://codemirror.net/5/doc/manual.html#option_inputStyle).
+
+Catches and ignores an IE 'Unspecified Error' when creating an editor in an iframe before there is a ``.
+
+[merge addon](https://codemirror.net/5/doc/manual.html#addon_merge): Fix several issues in the chunk-aligning feature.
+
+[verilog mode](https://codemirror.net/5/mode/verilog): Rewritten to address various issues.
+
+[julia mode](https://codemirror.net/5/mode/julia): Recognize Julia 0.5 syntax.
+
+[swift mode](https://codemirror.net/5/mode/swift): Various fixes and adjustments to current syntax.
+
+[markdown mode](https://codemirror.net/5/mode/markdown): Allow lists without a blank line above them.
+
+### New features
+
+The [`setGutterMarker`](https://codemirror.net/5/doc/manual.html#setGutterMarker), [`clearGutter`](https://codemirror.net/5/doc/manual.html#clearGutter), and [`lineInfo`](https://codemirror.net/5/doc/manual.html#lineInfo) methods are now available on `Doc` objects.
+
+The [`heightAtLine`](https://codemirror.net/5/doc/manual.html#heightAtLine) method now takes an extra argument to allow finding the height at the top of the line's line widgets.
+
+[ruby mode](https://codemirror.net/5/mode/ruby): `else` and `elsif` are now immediately indented.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Bind Ctrl-T and Ctrl-D to in- and dedent in insert mode.
+
+## 5.20.2 (2016-10-21)
+
+### Bug fixes
+
+Fix `CodeMirror.version` returning the wrong version number.
+
+## 5.20.0 (2016-10-20)
+
+### Bug fixes
+
+Make `newlineAndIndent` command work with multiple cursors on the same line.
+
+Make sure keypress events for backspace are ignored.
+
+Tokens styled with overlays no longer get a nonsense `cm-cm-overlay` class.
+
+Line endings for pasted content are now normalized to the editor's [preferred ending](https://codemirror.net/5/doc/manual.html#option_lineSeparator).
+
+[javascript mode](https://codemirror.net/5/mode/javascript): Improve support for class expressions. Support TypeScript optional class properties, the `abstract` keyword, and return type declarations for arrow functions.
+
+[css mode](https://codemirror.net/5/mode/css): Fix highlighting of mixed-case keywords.
+
+[closebrackets addon](https://codemirror.net/5/doc/manual.html#addon_closebrackets): Improve behavior when typing a quote before a string.
+
+### New features
+
+The core is now maintained as a number of small files, using ES6 syntax and modules, under the `src/` directory. A git checkout no longer contains a working `codemirror.js` until you `npm run build` (but when installing from NPM, it is included).
+
+The [`refresh`](https://codemirror.net/5/doc/manual.html#event_refresh) event is now documented and stable.
+
+## 5.19.0 (2016-09-20)
+
+### Bugfixes
+
+[erlang mode](https://codemirror.net/5/mode/erlang): Fix mode crash when trying to read an empty context.
+
+[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Fix broken behavior when toggling comments inside a comment.
+
+xml-fold addon: Fix a null-dereference bug.
+
+Page up and page down now do something even in single-line documents.
+
+Fix an issue where the cursor position could be off in really long (~8000 character) tokens.
+
+### New features
+
+[javascript mode](https://codemirror.net/5/mode/javascript): Better indentation when semicolons are missing. Better support for TypeScript classes, optional parameters, and the `type` keyword.
+
+The [`blur`](https://codemirror.net/5/doc/manual.html#event_blur) and [`focus`](https://codemirror.net/5/doc/manual.html#event_focus) events now pass the DOM event to their handlers.
+
+## 5.18.2 (2016-08-23)
+
+### Bugfixes
+
+[vue mode](https://codemirror.net/5/mode/vue): Fix outdated references to renamed Pug mode dependency.
+
+## 5.18.0 (2016-08-22)
+
+### Bugfixes
+
+Make sure [gutter backgrounds](https://codemirror.net/5/doc/manual.html#addLineClass) stick to the rest of the gutter during horizontal scrolling.
+
+The contenteditable [`inputStyle`](https://codemirror.net/5/doc/manual.html#option_inputStyle) now properly supports pasting on pre-Edge IE versions.
+
+[javascript mode](https://codemirror.net/5/mode/javascript): Fix some small parsing bugs and improve TypeScript support.
+
+[matchbrackets addon](https://codemirror.net/5/doc/manual.html#addon_matchbrackets): Fix bug where active highlighting was left in editor when the addon was disabled.
+
+[match-highlighter addon](https://codemirror.net/5/doc/manual.html#addon_match-highlighter): Only start highlighting things when the editor gains focus.
+
+[javascript-hint addon](https://codemirror.net/5/doc/manual.html#addon_javascript-hint): Also complete non-enumerable properties.
+
+### New features
+
+The [`addOverlay`](https://codemirror.net/5/doc/manual.html#addOverlay) method now supports a `priority` option to control the order in which overlays are applied.
+
+MIME types that end in `+json` now default to the JSON mode when the MIME itself is not defined.
+
+### Breaking changes
+
+The mode formerly known as Jade was renamed to [Pug](https://codemirror.net/5/mode/pug).
+
+The [Python mode](https://codemirror.net/5/mode/python) now defaults to Python 3 (rather than 2) syntax.
+
+## 5.17.0 (2016-07-19)
+
+### Bugfixes
+
+Fix problem with wrapped trailing whitespace displaying incorrectly.
+
+Prevent IME dialog from overlapping typed content in Chrome.
+
+Improve measuring of characters near a line wrap.
+
+[javascript mode](https://codemirror.net/5/mode/javascript): Improve support for `async`, allow trailing commas in `import` lists.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Fix backspace in replace mode.
+
+[sublime bindings](https://codemirror.net/5/demo/sublime.html): Fix some key bindings on OS X to match Sublime Text.
+
+### New features
+
+[markdown mode](https://codemirror.net/5/mode/markdown): Add more classes to image links in highlight-formatting mode.
+
+## 5.16.0 (2016-06-20)
+
+### Bugfixes
+
+Fix glitches when dragging content caused by the drop indicator receiving mouse events.
+
+Make Control-drag work on Firefox.
+
+Make clicking or selection-dragging at the end of a wrapped line select the right position.
+
+[show-hint addon](https://codemirror.net/5/doc/manual.html#addon_show-hint): Prevent widget scrollbar from hiding part of the hint text.
+
+[rulers addon](https://codemirror.net/5/doc/manual.html#addon_rulers): Prevent rulers from forcing a horizontal editor scrollbar.
+
+### New features
+
+[search addon](https://codemirror.net/5/doc/manual.html#addon_search): Automatically bind search-related keys in persistent dialog.
+
+[sublime keymap](https://codemirror.net/5/demo/sublime.html): Add a multi-cursor aware smart backspace binding.
+
+## 5.15.2 (2016-05-20)
+
+### Bugfixes
+
+Fix a critical document corruption bug that occurs when a document is gradually grown.
+
+## 5.15.0 (2016-05-20)
+
+### Bugfixes
+
+Fix bug that caused the selection to reset when focusing the editor in contentEditable input mode.
+
+Fix issue where not all ASCII control characters were being replaced by placeholders.
+
+Remove the assumption that all modes have a `startState` method from several wrapping modes.
+
+Fix issue where the editor would complain about overlapping collapsed ranges when there weren't any.
+
+Optimize document tree building when loading or pasting huge chunks of content.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/): Fix several issues in matching link targets.
+
+[clike mode](https://codemirror.net/5/mode/clike/): Improve indentation of C++ template declarations.
+
+### New features
+
+Explicitly bind Ctrl-O on OS X to make that binding (“open line”) act as expected.
+
+Pasting [linewise-copied](https://codemirror.net/5/doc/manual.html#option_lineWiseCopyCut) content when there is no selection now inserts the lines above the current line.
+
+[javascript mode](https://codemirror.net/5/mode/javascript/): Support `async`/`await` and improve support for TypeScript type syntax.
+
+## 5.14.2 (2016-04-20)
+
+### Bugfixes
+
+Push a new package to NPM due to an [NPM bug](https://github.com/npm/npm/issues/5082) omitting the LICENSE file in 5.14.0.
+
+Set `dataTransfer.effectAllowed` in `dragstart` handler to help browsers use the right drag icon.
+
+Add the [mbox mode](https://codemirror.net/5/mode/mbox/index.html) to `mode/meta.js`.
+
+## 5.14.0 (2016-04-20)
+
+### Bugfixes
+
+[`posFromIndex`](https://codemirror.net/5/doc/manual.html#posFromIndex) and [`indexFromPos`](https://codemirror.net/5/doc/manual.html#indexFromPos) now take [`lineSeparator`](https://codemirror.net/5/doc/manual.html#option_lineSeparator) into account.
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Only call `.save()` when it is actually available.
+
+[comment addon](https://codemirror.net/5/doc/manual.html#addon_comment): Be careful not to mangle multi-line strings.
+
+[Python mode](https://codemirror.net/5/mode/python/index.html): Improve distinguishing of decorators from `@` operators.
+
+[`findMarks`](https://codemirror.net/5/doc/manual.html#findMarks): No longer return marks that touch but don't overlap given range.
+
+### New features
+
+[vim bindings](https://codemirror.net/5/demo/vim.html): Add yank command.
+
+[match-highlighter addon](https://codemirror.net/5/doc/manual.html#addon_match-highlighter): Add `trim` option to disable ignoring of whitespace.
+
+[PowerShell mode](https://codemirror.net/5/mode/powershell/index.html): Added.
+
+[Yacas mode](https://codemirror.net/5/mode/yacas/index.html): Added.
+
+[Web IDL mode](https://codemirror.net/5/mode/webidl/index.html): Added.
+
+[SAS mode](https://codemirror.net/5/mode/sas/index.html): Added.
+
+[mbox mode](https://codemirror.net/5/mode/mbox/index.html): Added.
+
+## 5.13.2 (2016-03-23)
+
+### Bugfixes
+
+Solves a problem where the gutter would sometimes not extend all the way to the end of the document.
+
+## 5.13.0 (2016-03-21)
+
+### New features
+
+New DOM event forwarded: [`"dragleave"`](https://codemirror.net/5/doc/manual.html#event_dom).
+
+[protobuf mode](https://codemirror.net/5/mode/protobuf/index.html): Newly added.
+
+### Bugfixes
+
+Fix problem where [`findMarks`](https://codemirror.net/5/doc/manual.html#findMarks) sometimes failed to find multi-line marks.
+
+Fix crash that showed up when atomic ranges and bidi text were combined.
+
+[show-hint addon](https://codemirror.net/5/demo/complete.html): Completion widgets no longer close when the line indented or dedented.
+
+[merge addon](https://codemirror.net/5/demo/merge.html): Fix bug when merging chunks at the end of the file.
+
+[placeholder addon](https://codemirror.net/5/doc/manual.html#addon_placeholder): No longer gets confused by [`swapDoc`](https://codemirror.net/5/doc/manual.html#swapDoc).
+
+[simplescrollbars addon](https://codemirror.net/5/doc/manual.html#addon_simplescrollbars): Fix invalid state when deleting at end of document.
+
+[clike mode](https://codemirror.net/5/mode/clike/index.html): No longer gets confused when a comment starts after an operator.
+
+[markdown mode](https://codemirror.net/5/mode/markdown/index.html): Now supports CommonMark-style flexible list indentation.
+
+[dylan mode](https://codemirror.net/5/mode/dylan/index.html): Several improvements and fixes.
+
+## 5.12.0 (2016-02-19)
+
+### New features
+
+[Vim bindings](https://codemirror.net/5/demo/vim.html): Ctrl-Q is now an alias for Ctrl-V.
+
+[Vim bindings](https://codemirror.net/5/demo/vim.html): The Vim API now exposes an `unmap` method to unmap bindings.
+
+[active-line addon](https://codemirror.net/5/demo/activeline.html): This addon can now style the active line's gutter.
+
+[FCL mode](https://codemirror.net/5/mode/fcl/): Newly added.
+
+[SQL mode](https://codemirror.net/5/mode/sql/): Now has a Postgresql dialect.
+
+### Bugfixes
+
+Fix [issue](https://github.com/codemirror/CodeMirror/issues/3781) where trying to scroll to a horizontal position outside of the document's width could cause the gutter to be positioned incorrectly.
+
+Use absolute, rather than fixed positioning in the context-menu intercept hack, to work around a [problem](https://github.com/codemirror/CodeMirror/issues/3238) when the editor is inside a transformed parent container.
+
+Solve a [problem](https://github.com/codemirror/CodeMirror/issues/3821) where the horizontal scrollbar could hide text in Firefox.
+
+Fix a [bug](https://github.com/codemirror/CodeMirror/issues/3834) that caused phantom scroll space under the text in some situations.
+
+[Sublime Text bindings](https://codemirror.net/5/demo/sublime.html): Bind delete-line to Shift-Ctrl-K on OS X.
+
+[Markdown mode](https://codemirror.net/5/mode/markdown/): Fix [issue](https://github.com/codemirror/CodeMirror/issues/3787) where the mode would keep state related to fenced code blocks in an unsafe way, leading to occasional corrupted parses.
+
+[Markdown mode](https://codemirror.net/5/mode/markdown/): Ignore backslashes in code fragments.
+
+[Markdown mode](https://codemirror.net/5/mode/markdown/): Use whichever mode is registered as `text/html` to parse HTML.
+
+[Clike mode](https://codemirror.net/5/mode/clike/): Improve indentation of Scala `=>` functions.
+
+[Python mode](https://codemirror.net/5/mode/python/): Improve indentation of bracketed code.
+
+[HTMLMixed mode](https://codemirror.net/5/mode/htmlmixed/): Support multi-line opening tags for sub-languages (`
+
+
+
+
+
+
+

Active Line Demo

+
+ + + +

Styling the current cursor line.

+ + + +
diff --git a/js/codemirror/demo/anywordhint.html b/js/codemirror/demo/anywordhint.html new file mode 100644 index 0000000..4e9d712 --- /dev/null +++ b/js/codemirror/demo/anywordhint.html @@ -0,0 +1,77 @@ + + +CodeMirror: Any Word Completion Demo + + + + + + + + + + + +
+

Any Word Completion Demo

+
+ +

Press ctrl-space to activate autocompletion. The +completion uses +the anyword-hint.js +module, which simply looks at nearby words in the buffer and completes +to those.

+ + +
diff --git a/js/codemirror/demo/bidi.html b/js/codemirror/demo/bidi.html new file mode 100644 index 0000000..25cca1f --- /dev/null +++ b/js/codemirror/demo/bidi.html @@ -0,0 +1,106 @@ + + +CodeMirror: Bi-directional Text Demo + + + + + + + + + +
+

Bi-directional Text Demo

+
+
+ Editor default direction: + + +
+
+ HTML document direction: + + +
+
+ +
+
+ + + +

Demonstration of bi-directional text support. See + the related + blog post for more background.

+ +
diff --git a/js/codemirror/demo/btree.html b/js/codemirror/demo/btree.html new file mode 100644 index 0000000..5f9e4d3 --- /dev/null +++ b/js/codemirror/demo/btree.html @@ -0,0 +1,83 @@ + + +CodeMirror: B-Tree visualization + + + + + + + + +
+

B-Tree visualization

+
+
+ + + +

+ +
diff --git a/js/codemirror/demo/buffers.html b/js/codemirror/demo/buffers.html new file mode 100644 index 0000000..95cf672 --- /dev/null +++ b/js/codemirror/demo/buffers.html @@ -0,0 +1,109 @@ + + +CodeMirror: Multiple Buffer & Split View Demo + + + + + + + + + + +
+

Multiple Buffer & Split View Demo

+ + +
+
+ Select buffer: +     +
+
+
+ Select buffer: +     +
+ + + +

Demonstration of + using linked documents + to provide a split view on a document, and + using swapDoc + to use a single editor to display multiple documents.

+ +
diff --git a/js/codemirror/demo/changemode.html b/js/codemirror/demo/changemode.html new file mode 100644 index 0000000..37a826d --- /dev/null +++ b/js/codemirror/demo/changemode.html @@ -0,0 +1,58 @@ + + +CodeMirror: Mode-Changing Demo + + + + + + + + + + +
+

Mode-Changing Demo

+
+ +

On changes to the content of the above editor, a (crude) script +tries to auto-detect the language used, and switches the editor to +either JavaScript or Scheme mode based on that.

+ + +
diff --git a/js/codemirror/demo/closebrackets.html b/js/codemirror/demo/closebrackets.html new file mode 100644 index 0000000..dbb0e69 --- /dev/null +++ b/js/codemirror/demo/closebrackets.html @@ -0,0 +1,52 @@ + + +CodeMirror: Closebrackets Demo + + + + + + + + + + +
+

Closebrackets Demo

+
+ + +
diff --git a/js/codemirror/demo/closetag.html b/js/codemirror/demo/closetag.html new file mode 100644 index 0000000..7c69b99 --- /dev/null +++ b/js/codemirror/demo/closetag.html @@ -0,0 +1,42 @@ + + +CodeMirror: Close-Tag Demo + + + + + + + + + + + + + + +
+

Close-Tag Demo

+
+ + +

Uses the closetag addon to auto-close tags.

+
diff --git a/js/codemirror/demo/complete.html b/js/codemirror/demo/complete.html new file mode 100644 index 0000000..ece04db --- /dev/null +++ b/js/codemirror/demo/complete.html @@ -0,0 +1,126 @@ + + +CodeMirror: Autocomplete Demo + + + + + + + + + + + + + +
+

Autocomplete Demo

+
+ +

Press ctrl-space to activate autocompletion. Built +on top of the show-hint +and javascript-hint +addons.

+ +
+ + + +
diff --git a/js/codemirror/demo/emacs.html b/js/codemirror/demo/emacs.html new file mode 100644 index 0000000..0e3de21 --- /dev/null +++ b/js/codemirror/demo/emacs.html @@ -0,0 +1,76 @@ + + +CodeMirror: Emacs bindings demo + + + + + + + + + + + + + + + + +
+

Emacs bindings demo

+
+ +

The emacs keybindings are enabled by +including keymap/emacs.js and setting +the keyMap option to "emacs". Because +CodeMirror's internal API is quite different from Emacs, they are only +a loose approximation of actual emacs bindings, though.

+ +

Also note that a lot of browsers disallow certain keys from being +captured. For example, Chrome blocks both Ctrl-W and Ctrl-N, with the +result that idiomatic use of Emacs keys will constantly close your tab +or open a new window.

+ + + +
diff --git a/js/codemirror/demo/folding.html b/js/codemirror/demo/folding.html new file mode 100644 index 0000000..07bb4c8 --- /dev/null +++ b/js/codemirror/demo/folding.html @@ -0,0 +1,184 @@ + + + + CodeMirror: Code Folding Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Code Folding Demo

+
+
JavaScript:
+
+
HTML:
+
+
JSON with custom widget:
+
+
Python:
+
+
Markdown:
+
+
+ +
+ diff --git a/js/codemirror/demo/fullscreen.html b/js/codemirror/demo/fullscreen.html new file mode 100644 index 0000000..ed9d504 --- /dev/null +++ b/js/codemirror/demo/fullscreen.html @@ -0,0 +1,83 @@ + + +CodeMirror: Full Screen Editing + + + + + + + + + + + + +
+

Full Screen Editing

+
+ + +

Demonstration of + the fullscreen + addon. Press F11 when cursor is in the editor to + toggle full screen editing. Esc can also be used + to exit full screen editing.

+
diff --git a/js/codemirror/demo/hardwrap.html b/js/codemirror/demo/hardwrap.html new file mode 100644 index 0000000..ec1c4ef --- /dev/null +++ b/js/codemirror/demo/hardwrap.html @@ -0,0 +1,75 @@ + + +CodeMirror: Hard-wrapping Demo + + + + + + + + + + +
+

Hard-wrapping Demo

+
+ +

Demonstration of +the hardwrap addon. +The above editor has its change event hooked up to +the wrapParagraphsInRange method, so that the paragraphs +are reflown as you are typing.

+ + + +
diff --git a/js/codemirror/demo/html5complete.html b/js/codemirror/demo/html5complete.html new file mode 100644 index 0000000..961662c --- /dev/null +++ b/js/codemirror/demo/html5complete.html @@ -0,0 +1,56 @@ + + + + CodeMirror: HTML completion demo + + + + + + + + + + + + + + + + + + + +
+

HTML completion demo

+ +

Shows the XML completer + parameterized with information about the tags in HTML. + Press ctrl-space to activate completion.

+ +
+ + +
+ diff --git a/js/codemirror/demo/indentwrap.html b/js/codemirror/demo/indentwrap.html new file mode 100644 index 0000000..8ec08c5 --- /dev/null +++ b/js/codemirror/demo/indentwrap.html @@ -0,0 +1,59 @@ + + +CodeMirror: Indented wrapped line demo + + + + + + + + + +
+

Indented wrapped line demo

+
+ +

This page uses a hack on top of the "renderLine" + event to make wrapped text line up with the base indentation of + the line.

+ + + +
diff --git a/js/codemirror/demo/lint.html b/js/codemirror/demo/lint.html new file mode 100644 index 0000000..919fedd --- /dev/null +++ b/js/codemirror/demo/lint.html @@ -0,0 +1,171 @@ + + +CodeMirror: Linter Demo + + + + + + + + + + + + + + + + + + +
+

Linter Demo

+ + +

+ +

+ +

+ + +
diff --git a/js/codemirror/demo/loadmode.html b/js/codemirror/demo/loadmode.html new file mode 100644 index 0000000..c7500d0 --- /dev/null +++ b/js/codemirror/demo/loadmode.html @@ -0,0 +1,72 @@ + + +CodeMirror: Lazy Mode Loading Demo + + + + + + + + + + +
+

Lazy Mode Loading Demo

+

Current mode: text/plain

+
+

Filename, mime, or mode name:

+ + +
diff --git a/js/codemirror/demo/marker.html b/js/codemirror/demo/marker.html new file mode 100644 index 0000000..d0b87d8 --- /dev/null +++ b/js/codemirror/demo/marker.html @@ -0,0 +1,52 @@ + + +CodeMirror: Breakpoint Demo + + + + + + + + + +
+

Breakpoint Demo

+
+ +

Click the line-number gutter to add or remove 'breakpoints'.

+ + + +
diff --git a/js/codemirror/demo/markselection.html b/js/codemirror/demo/markselection.html new file mode 100644 index 0000000..37a66e2 --- /dev/null +++ b/js/codemirror/demo/markselection.html @@ -0,0 +1,52 @@ + + +CodeMirror: Selection Marking Demo + + + + + + + + + + +
+

Selection Marking Demo

+
+ + + +

Simple addon to easily mark (and style) selected text. Docs.

+ +
diff --git a/js/codemirror/demo/matchhighlighter.html b/js/codemirror/demo/matchhighlighter.html new file mode 100644 index 0000000..fd8459b --- /dev/null +++ b/js/codemirror/demo/matchhighlighter.html @@ -0,0 +1,103 @@ + + +CodeMirror: Match Highlighter Demo + + + + + + + + + + + + +
+

Match Highlighter Demo

+
+ + + +

Search and highlight occurrences of the selected text.

+ +
diff --git a/js/codemirror/demo/matchtags.html b/js/codemirror/demo/matchtags.html new file mode 100644 index 0000000..95af946 --- /dev/null +++ b/js/codemirror/demo/matchtags.html @@ -0,0 +1,48 @@ + + +CodeMirror: Tag Matcher Demo + + + + + + + + + + + +
+

Tag Matcher Demo

+ + +
+ + + +

Put the cursor on or inside a pair of tags to highlight them. + Press Ctrl-J to jump to the tag that matches the one under the + cursor.

+
diff --git a/js/codemirror/demo/merge.html b/js/codemirror/demo/merge.html new file mode 100644 index 0000000..0fdd21c --- /dev/null +++ b/js/codemirror/demo/merge.html @@ -0,0 +1,123 @@ + + +CodeMirror: merge view demo + + + + + + + + + + + + + + + +
+

merge view demo

+ + +
+ +

The merge +addon provides an interface for displaying and merging diffs, +either two-way +or three-way. +The left (or center) pane is editable, and the differences with the +other pane(s) are optionally shown live as you edit +it. In the two-way configuration, there are also options to pad changed +sections to align them, and to collapse unchanged +stretches of text.

+ +

This addon depends on +the google-diff-match-patch +library to compute the diffs.

+ + +
diff --git a/js/codemirror/demo/multiplex.html b/js/codemirror/demo/multiplex.html new file mode 100644 index 0000000..4c2ae88 --- /dev/null +++ b/js/codemirror/demo/multiplex.html @@ -0,0 +1,75 @@ + + +CodeMirror: Multiplexing Parser Demo + + + + + + + + + + +
+

Multiplexing Parser Demo

+
+ + + +

Demonstration of a multiplexing mode, which, at certain + boundary strings, switches to one or more inner modes. The out + (HTML) mode does not get fed the content of the << + >> blocks. See + the manual and + the source for more + information.

+ +

+ Parsing/Highlighting Tests: + normal, + verbose. +

+ +
diff --git a/js/codemirror/demo/mustache.html b/js/codemirror/demo/mustache.html new file mode 100644 index 0000000..5266b16 --- /dev/null +++ b/js/codemirror/demo/mustache.html @@ -0,0 +1,69 @@ + + +CodeMirror: Overlay Parser Demo + + + + + + + + + + +
+

Overlay Parser Demo

+
+ + + +

Demonstration of a mode that parses HTML, highlighting + the Mustache templating + directives inside of it by using the code + in overlay.js. View + source to see the 15 lines of code needed to accomplish this.

+ +
diff --git a/js/codemirror/demo/panel.html b/js/codemirror/demo/panel.html new file mode 100644 index 0000000..d8cabb8 --- /dev/null +++ b/js/codemirror/demo/panel.html @@ -0,0 +1,137 @@ + + +CodeMirror: Panel Demo + + + + + + + + + + + + + +
+ +

Panel Demo

+ +
+ +
+ +

+ The panel + addon allows you to display panels above or below an editor. +
+ Click the links below to add panels at the given position: +

+ +
+

+ top + after-top + before-bottom + bottom +

+

+ You can also replace an existing panel: +

+
+ + +
+ + + +
+ +
diff --git a/js/codemirror/demo/placeholder.html b/js/codemirror/demo/placeholder.html new file mode 100644 index 0000000..b1073bf --- /dev/null +++ b/js/codemirror/demo/placeholder.html @@ -0,0 +1,45 @@ + + +CodeMirror: Placeholder demo + + + + + + + + + +
+

Placeholder demo

+
+ +

The placeholder + plug-in adds an option placeholder that can be set to + make text appear in the editor when it is empty and not focused. + If the source textarea has a placeholder attribute, + it will automatically be inherited.

+ + + +
diff --git a/js/codemirror/demo/preview.html b/js/codemirror/demo/preview.html new file mode 100644 index 0000000..ff96b78 --- /dev/null +++ b/js/codemirror/demo/preview.html @@ -0,0 +1,87 @@ + + +CodeMirror: HTML5 preview + + + + + + + + + + + + +
+

HTML5 preview

+ + + + +
diff --git a/js/codemirror/demo/requirejs.html b/js/codemirror/demo/requirejs.html new file mode 100644 index 0000000..00339fb --- /dev/null +++ b/js/codemirror/demo/requirejs.html @@ -0,0 +1,70 @@ + + + + CodeMirror: HTML completion demo + + + + + + + + + + + + +
+

RequireJS module loading demo

+ +

This demo does the same thing as + the HTML5 completion demo, but + loads its dependencies + with Require.js, rather than + explicitly. Press ctrl-space to activate + completion.

+ +
+ + + + +
+ diff --git a/js/codemirror/demo/resize.html b/js/codemirror/demo/resize.html new file mode 100644 index 0000000..88c794e --- /dev/null +++ b/js/codemirror/demo/resize.html @@ -0,0 +1,51 @@ + + +CodeMirror: Autoresize Demo + + + + + + + + + +
+

Autoresize Demo

+
+ +

By setting an editor's height style +to auto and giving +the viewportMargin +a value of Infinity, CodeMirror can be made to +automatically resize to fit its content.

+ + + +
diff --git a/js/codemirror/demo/rulers.html b/js/codemirror/demo/rulers.html new file mode 100644 index 0000000..99d3482 --- /dev/null +++ b/js/codemirror/demo/rulers.html @@ -0,0 +1,49 @@ + + +CodeMirror: Ruler Demo + + + + + + + + + +
+

Ruler Demo

+ + + +

Demonstration of +the rulers addon, which +displays vertical lines at given column offsets.

+ +
diff --git a/js/codemirror/demo/runmode-standalone.html b/js/codemirror/demo/runmode-standalone.html new file mode 100644 index 0000000..c008e49 --- /dev/null +++ b/js/codemirror/demo/runmode-standalone.html @@ -0,0 +1,61 @@ + + +CodeMirror: Mode Runner Demo + + + + + + + + +
+

Mode Runner Demo

+ + +
+ +

+
+    
+
+    

Running a CodeMirror mode outside of the editor. + The CodeMirror.runMode function, defined + in addon/runmode/runmode.js takes the following arguments:

+ +
+
text (string)
+
The document to run through the highlighter.
+
mode (mode spec)
+
The mode to use (must be loaded as normal).
+
output (function or DOM node)
+
If this is a function, it will be called for each token with + two arguments, the token's text and the token's style class (may + be null for unstyled tokens). If it is a DOM node, + the tokens will be converted to span elements as in + an editor, and inserted into the node + (through innerHTML).
+
+ +
diff --git a/js/codemirror/demo/runmode.html b/js/codemirror/demo/runmode.html new file mode 100644 index 0000000..59ea409 --- /dev/null +++ b/js/codemirror/demo/runmode.html @@ -0,0 +1,62 @@ + + +CodeMirror: Mode Runner Demo + + + + + + + + + +
+

Mode Runner Demo

+ + +
+ +

+
+    
+
+    

Running a CodeMirror mode outside of the editor. + The CodeMirror.runMode function, defined + in addon/runmode/runmode.js takes the following arguments:

+ +
+
text (string)
+
The document to run through the highlighter.
+
mode (mode spec)
+
The mode to use (must be loaded as normal).
+
output (function or DOM node)
+
If this is a function, it will be called for each token with + two arguments, the token's text and the token's style class (may + be null for unstyled tokens). If it is a DOM node, + the tokens will be converted to span elements as in + an editor, and inserted into the node + (through innerHTML).
+
+ +
diff --git a/js/codemirror/demo/search.html b/js/codemirror/demo/search.html new file mode 100644 index 0000000..32e12b5 --- /dev/null +++ b/js/codemirror/demo/search.html @@ -0,0 +1,99 @@ + + +CodeMirror: Search/Replace Demo + + + + + + + + + + + + + + + + + +
+

Search/Replace Demo

+
+ + + +

Demonstration of primitive search/replace functionality. The + keybindings (which can be configured with custom keymaps) are:

+
+
Ctrl-F / Cmd-F
Start searching
+
Ctrl-G / Cmd-G
Find next
+
Shift-Ctrl-G / Shift-Cmd-G
Find previous
+
Shift-Ctrl-F / Cmd-Option-F
Replace
+
Shift-Ctrl-R / Shift-Cmd-Option-F
Replace all
+
Alt-F
Persistent search (dialog doesn't autoclose, + enter to find next, Shift-Enter to find previous)
+
Alt-G
Jump to line
+
+

Searching is enabled by + including addon/search/search.js + and addon/search/searchcursor.js. + Jump to line - including addon/search/jump-to-line.js.

+

For good-looking input dialogs, you also want to include + addon/dialog/dialog.js + and addon/dialog/dialog.css.

+
diff --git a/js/codemirror/demo/simplemode.html b/js/codemirror/demo/simplemode.html new file mode 100644 index 0000000..d43e6d1 --- /dev/null +++ b/js/codemirror/demo/simplemode.html @@ -0,0 +1,186 @@ + + +CodeMirror: Simple Mode Demo + + + + + + + + + + + +
+

Simple Mode Demo

+ +

The mode/simple +addon allows CodeMirror modes to be specified using a relatively simple +declarative format. This format is not as powerful as writing code +directly against the mode +interface, but is a lot easier to get started with, and +sufficiently expressive for many simple language modes.

+ +

This interface is still in flux. It is unlikely to be scrapped or +overhauled completely, so do start writing code against it, but +details might change as it stabilizes, and you might have to tweak +your code when upgrading.

+ +

Simple modes (loosely based on +the Common +JavaScript Syntax Highlighting Specification, which never took +off), are state machines, where each state has a number of rules that +match tokens. A rule describes a type of token that may occur in the +current state, and possibly a transition to another state caused by +that token.

+ +

The CodeMirror.defineSimpleMode(name, states) method +takes a mode name and an object that describes the mode's states. The +editor below shows an example of such a mode (and is itself +highlighted by the mode shown in it).

+ +
+ +

Each state is an array of rules. A rule may have the following properties:

+ +
+
regex: string | RegExp
+
The regular expression that matches the token. May be a string + or a regex object. When a regex, the ignoreCase flag + will be taken into account when matching the token. This regex + has to capture groups when the token property is + an array. If it captures groups, it must capture all of the string + (since JS provides no way to find out where a group matched). + Currently negative lookbehind assertion for regex is not supported, regardless of browser support.
+
token: string | array<string> | null
+
An optional token style. Multiple styles can be specified by + separating them with dots or spaces. When this property holds an array of token styles, + the regex for this rule must capture a group for each array item. +
+
sol: boolean
+
When true, this token will only match at the start of the line. + (The ^ regexp marker doesn't work as you'd expect in + this context because of limitations in JavaScript's RegExp + API.)
+
next: string
+
When a next property is present, the mode will + transfer to the state named by the property when the token is + encountered.
+
push: string
+
Like next, but instead replacing the current state + by the new state, the current state is kept on a stack, and can be + returned to with the pop directive.
+
pop: bool
+
When true, and there is another state on the state stack, will + cause the mode to pop that state off the stack and transition to + it.
+
mode: {spec, end, persistent}
+
Can be used to embed another mode inside a mode. When present, + must hold an object with a spec property that describes + the embedded mode, and an optional end end property + that specifies the regexp that will end the extent of the mode. When + a persistent property is set (and true), the nested + mode's state will be preserved between occurrences of the mode.
+
indent: bool
+
When true, this token changes the indentation to be one unit + more than the current line's indentation.
+
dedent: bool
+
When true, this token will pop one scope off the indentation + stack.
+
dedentIfLineStart: bool
+
If a token has its dedent property set, it will, by + default, cause lines where it appears at the start to be dedented. + Set this property to false to prevent that behavior.
+
+ +

The meta property of the states object is special, and +will not be interpreted as a state. Instead, properties set on it will +be set on the mode, which is useful for properties +like lineComment, +which sets the comment style for a mode. The simple mode addon also +recognizes a few such properties:

+ +
+
dontIndentStates: array<string>
+
An array of states in which the mode's auto-indentation should + not take effect. Usually used for multi-line comment and string + states.
+
+ + + + + +
diff --git a/js/codemirror/demo/simplescrollbars.html b/js/codemirror/demo/simplescrollbars.html new file mode 100644 index 0000000..078a5f1 --- /dev/null +++ b/js/codemirror/demo/simplescrollbars.html @@ -0,0 +1,82 @@ + + +CodeMirror: Simple Scrollbar Demo + + + + + + + + + + + + +
+

Simple Scrollbar Demo

+
+ +

The simplescrollbars addon defines two +styles of non-native scrollbars: "simple" and "overlay" (click to try), which can be passed to +the scrollbarStyle option. These implement +the scrollbar using DOM elements, allowing more control over +its appearance.

+ + +
diff --git a/js/codemirror/demo/spanaffectswrapping_shim.html b/js/codemirror/demo/spanaffectswrapping_shim.html new file mode 100644 index 0000000..d95f364 --- /dev/null +++ b/js/codemirror/demo/spanaffectswrapping_shim.html @@ -0,0 +1,85 @@ + + +CodeMirror: Automatically derive odd wrapping behavior for your browser + + + + + +
+

Automatically derive odd wrapping behavior for your browser

+ + +

This is a hack to automatically derive + a spanAffectsWrapping regexp for a browser. See the + comments above that variable + in lib/codemirror.js + for some more details.

+ +
+

+
+    
+  
diff --git a/js/codemirror/demo/sublime.html b/js/codemirror/demo/sublime.html new file mode 100644 index 0000000..a1890d2 --- /dev/null +++ b/js/codemirror/demo/sublime.html @@ -0,0 +1,77 @@ + + +CodeMirror: Sublime Text bindings demo + + + + + + + + + + + + + + + + + + + + + + +
+

Sublime Text bindings demo

+ +

The sublime keymap defines many Sublime Text-specific +bindings for CodeMirror. See the code below for an overview.

+ +

Enable the keymap by +loading keymap/sublime.js +and setting +the keyMap +option to "sublime".

+ +

(A lot of the search functionality is still missing.) + + + +

diff --git a/js/codemirror/demo/tern.html b/js/codemirror/demo/tern.html new file mode 100644 index 0000000..7cc9b67 --- /dev/null +++ b/js/codemirror/demo/tern.html @@ -0,0 +1,133 @@ + + +CodeMirror: Tern Demo + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Tern Demo

+
+ +

Demonstrates integration of Tern +and CodeMirror. The following keys are bound:

+ +
+
Ctrl-Space
Autocomplete
+
Ctrl-O
Find docs for the expression at the cursor
+
Ctrl-I
Find type at cursor
+
Alt-.
Jump to definition (Alt-, to jump back)
+
Ctrl-Q
Rename variable
+
Ctrl-.
Select all occurrences of a variable
+
+ +

Documentation is sparse for now. See the top of +the script for a rough API +overview.

+ + + +
diff --git a/js/codemirror/demo/theme.html b/js/codemirror/demo/theme.html new file mode 100644 index 0000000..e394aa2 --- /dev/null +++ b/js/codemirror/demo/theme.html @@ -0,0 +1,200 @@ + + +CodeMirror: Theme Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Theme Demo

+
+ +

Select a theme: +

+ + +
diff --git a/js/codemirror/demo/trailingspace.html b/js/codemirror/demo/trailingspace.html new file mode 100644 index 0000000..00e5e31 --- /dev/null +++ b/js/codemirror/demo/trailingspace.html @@ -0,0 +1,48 @@ + + +CodeMirror: Trailing Whitespace Demo + + + + + + + + + +
+

Trailing Whitespace Demo

+
+ + + +

Uses +the trailingspace +addon to highlight trailing whitespace.

+ +
diff --git a/js/codemirror/demo/variableheight.html b/js/codemirror/demo/variableheight.html new file mode 100644 index 0000000..f781293 --- /dev/null +++ b/js/codemirror/demo/variableheight.html @@ -0,0 +1,67 @@ + + +CodeMirror: Variable Height Demo + + + + + + + + + + +
+

Variable Height Demo

+
+ +
diff --git a/js/codemirror/demo/vim.html b/js/codemirror/demo/vim.html new file mode 100644 index 0000000..7f4b6e6 --- /dev/null +++ b/js/codemirror/demo/vim.html @@ -0,0 +1,114 @@ + + +CodeMirror: Vim bindings demo + + + + + + + + + + + + + + +
+

Vim bindings demo

+ +

Note: +The CodeMirror vim bindings are maintained in +the codemirror-vim +repository, not this project. The file is still included in the +distribution for backwards compatibility.

+ +
+
Key buffer:
+
Vim mode:
+ +

The vim keybindings are enabled by including keymap/vim.js and setting the +keyMap option to vim.

+ +

Features

+ +
    +
  • All common motions and operators, including text objects
  • +
  • Operator motion orthogonality
  • +
  • Visual mode - characterwise, linewise, blockwise
  • +
  • Full macro support (q, @)
  • +
  • Incremental highlighted search (/, ?, #, *, g#, g*)
  • +
  • Search/replace with confirm (:substitute, :%s)
  • +
  • Search history
  • +
  • Jump lists (Ctrl-o, Ctrl-i)
  • +
  • Key/command mapping with API (:map, :nmap, :vmap)
  • +
  • Sort (:sort)
  • +
  • Marks (`, ')
  • +
  • :global
  • +
  • Insert mode behaves identical to base CodeMirror
  • +
  • Cross-buffer yank/paste
  • +
+ +

For the full list of key mappings and Ex commands, refer to the +defaultKeymap and defaultExCommandMap at the +top of keymap/vim.js. + +

Note that while the vim mode tries to emulate the most useful +features of vim as faithfully as possible, it does not strive to +become a complete vim implementation

+ + + +
diff --git a/js/codemirror/demo/visibletabs.html b/js/codemirror/demo/visibletabs.html new file mode 100644 index 0000000..1ddaf8b --- /dev/null +++ b/js/codemirror/demo/visibletabs.html @@ -0,0 +1,62 @@ + + +CodeMirror: Visible tabs demo + + + + + + + + + +
+

Visible tabs demo

+
+ +

Tabs inside the editor are spans with the +class cm-tab, and can be styled.

+ + + +
diff --git a/js/codemirror/demo/widget.html b/js/codemirror/demo/widget.html new file mode 100644 index 0000000..18b1651 --- /dev/null +++ b/js/codemirror/demo/widget.html @@ -0,0 +1,85 @@ + + +CodeMirror: Inline Widget Demo + + + + + + + + + + +
+

Inline Widget Demo

+ + +
+ +

This demo runs JSHint over the code +in the editor (which is the script used on this page), and +inserts line widgets to +display the warnings that JSHint comes up with.

+
diff --git a/js/codemirror/demo/xmlcomplete.html b/js/codemirror/demo/xmlcomplete.html new file mode 100644 index 0000000..7420e1a --- /dev/null +++ b/js/codemirror/demo/xmlcomplete.html @@ -0,0 +1,119 @@ + + +CodeMirror: XML Autocomplete Demo + + + + + + + + + + + + +
+

XML Autocomplete Demo

+
+ +

Press ctrl-space, or type a '<' character to + activate autocompletion. This demo defines a simple schema that + guides completion. The schema can be customized—see + the manual.

+ +

Development of the xml-hint addon was kindly + sponsored + by www.xperiment.mobi.

+ + +
diff --git a/js/codemirror/doc/activebookmark.js b/js/codemirror/doc/activebookmark.js new file mode 100644 index 0000000..407282d --- /dev/null +++ b/js/codemirror/doc/activebookmark.js @@ -0,0 +1,57 @@ +// Kludge in HTML5 tag recognition in IE8 +document.createElement("section"); +document.createElement("article"); + +(function() { + if (!window.addEventListener) return; + var pending = false, prevVal = null; + + function updateSoon() { + if (!pending) { + pending = true; + setTimeout(update, 250); + } + } + + function update() { + pending = false; + var marks = document.getElementById("nav").getElementsByTagName("a"), found; + for (var i = 0; i < marks.length; ++i) { + var mark = marks[i], m; + if (mark.getAttribute("data-default")) { + if (found == null) found = i; + } else if (m = mark.href.match(/#(.*)/)) { + var ref = document.getElementById(m[1]); + if (ref && ref.getBoundingClientRect().top < 50) + found = i; + } + } + if (found != null && found != prevVal) { + prevVal = found; + var lis = document.getElementById("nav").getElementsByTagName("li"); + for (var i = 0; i < lis.length; ++i) lis[i].className = ""; + for (var i = 0; i < marks.length; ++i) { + if (found == i) { + marks[i].className = "active"; + for (var n = marks[i]; n; n = n.parentNode) + if (n.nodeName == "LI") n.className = "active"; + } else { + marks[i].className = ""; + } + } + } + } + + window.addEventListener("scroll", updateSoon); + window.addEventListener("load", updateSoon); + window.addEventListener("hashchange", function() { + setTimeout(function() { + var hash = document.location.hash, found = null, m; + var marks = document.getElementById("nav").getElementsByTagName("a"); + for (var i = 0; i < marks.length; i++) + if ((m = marks[i].href.match(/(#.*)/)) && m[1] == hash) { found = i; break; } + if (found != null) for (var i = 0; i < marks.length; i++) + marks[i].className = i == found ? "active" : ""; + }, 300); + }); +})(); diff --git a/js/codemirror/doc/docs.css b/js/codemirror/doc/docs.css new file mode 100644 index 0000000..f687521 --- /dev/null +++ b/js/codemirror/doc/docs.css @@ -0,0 +1,225 @@ +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(source_sans.woff) format('woff'); +} + +body, html { margin: 0; padding: 0; height: 100%; } +section, article { display: block; padding: 0; } + +body { + background: #f8f8f8; + font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif; + line-height: 1.5; +} + +p { margin-top: 0; } + +h2, h3, h1 { + font-weight: normal; + margin-bottom: .7em; +} +h1 { font-size: 140%; } +h2 { font-size: 120%; } +h3 { font-size: 110%; } +article > h2:first-child, section:first-child > h2 { margin-top: 0; } + +#nav h1 { + margin-right: 12px; + margin-top: 0; + margin-bottom: 2px; + color: #d30707; + letter-spacing: .5px; +} + +a, a:visited, a:link, .quasilink { + color: #A21313; +} + +em { + padding-right: 2px; +} + +.quasilink { + cursor: pointer; +} + +article { + max-width: 700px; + margin: 0 0 0 160px; + border-left: 2px solid #E30808; + border-right: 1px solid #ddd; + padding: 30px 50px 100px 50px; + background: white; + z-index: 2; + position: relative; + min-height: 100%; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +#nav { + position: fixed; + padding-top: 30px; + max-height: 100%; + box-sizing: -moz-border-box; + box-sizing: border-box; + overflow-y: auto; + left: 0; right: none; + width: 160px; + text-align: right; + z-index: 1; +} + +@media screen and (min-width: 1000px) { + article { + margin: 0 auto; + } + #nav { + right: 50%; + width: auto; + border-right: 349px solid transparent; + } +} + +#nav ul { + display: block; + margin: 0; padding: 0; + margin-bottom: 32px; +} + +#nav a { + text-decoration: none; +} + +#nav li { + display: block; + margin-bottom: 4px; +} + +#nav li ul { + font-size: 80%; + margin-bottom: 0; + display: none; +} + +#nav li.active ul { + display: block; +} + +#nav li li a { + padding-right: 20px; + display: inline-block; +} + +#nav ul a { + color: black; + padding: 0 7px 1px 11px; +} + +#nav ul a.active, #nav ul a:hover { + border-bottom: 1px solid #E30808; + margin-bottom: -1px; + color: #E30808; +} + +#logo { + border: 0; + margin-right: 12px; + margin-bottom: 25px; +} + +section { + border-top: 1px solid #E30808; + margin: 1.5em 0; +} + +section.first { + border: none; + margin-top: 0; +} + +#demo { + position: relative; +} + +#demolist { + position: absolute; + right: 5px; + top: 5px; + z-index: 25; +} + +.yinyang { + position: absolute; + top: -10px; + left: 0; right: 0; + margin: auto; + display: block; + height: 120px; +} + +.actions { + margin: 1em 0 0; + min-height: 100px; + position: relative; +} + +@media screen and (max-width: 800px) { + .actions { + padding-top: 120px; + } + .actionsleft, .actionsright { + float: none; + text-align: left; + margin-bottom: 1em; + } +} + +th { + text-decoration: underline; + font-weight: normal; + text-align: left; +} + +#features ul { + list-style: none; + margin: 0 0 1em; + padding: 0 0 0 1.2em; +} + +#features li:before { + content: "-"; + width: 1em; + display: inline-block; + padding: 0; + margin: 0; + margin-left: -1em; +} + +.rel { + margin-bottom: 0; +} +.rel-note { + margin-top: 0; + color: #555; +} + +pre { + padding-left: 15px; + border-left: 2px solid #ddd; +} + +code { + padding: 0 2px; +} + +strong { + text-decoration: underline; + font-weight: normal; +} + +.field { + border: 1px solid #A21313; +} diff --git a/js/codemirror/doc/internals.html b/js/codemirror/doc/internals.html new file mode 100644 index 0000000..dc48fec --- /dev/null +++ b/js/codemirror/doc/internals.html @@ -0,0 +1,504 @@ + + +CodeMirror: Internals + + + + + + + +
+ +

(Re-) Implementing A Syntax-Highlighting Editor in JavaScript

+ +

+ Topic: JavaScript, code editor implementation
+ Author: Marijn Haverbeke
+ Date: March 2nd 2011 (updated November 13th 2011) +

+ +

Caution: this text was written briefly after +version 2 was initially written. It no longer (even including the +update at the bottom) fully represents the current implementation. I'm +leaving it here as a historic document. For more up-to-date +information, look at the entries +tagged cm-internals +on my blog.

+ +

This is a followup to +my Brutal Odyssey to the +Dark Side of the DOM Tree story. That one describes the +mind-bending process of implementing (what would become) CodeMirror 1. +This one describes the internals of CodeMirror 2, a complete rewrite +and rethink of the old code base. I wanted to give this piece another +Hunter Thompson copycat subtitle, but somehow that would be out of +place—the process this time around was one of straightforward +engineering, requiring no serious mind-bending whatsoever.

+ +

So, what is wrong with CodeMirror 1? I'd estimate, by mailing list +activity and general search-engine presence, that it has been +integrated into about a thousand systems by now. The most prominent +one, since a few weeks, +being Google +code's project hosting. It works, and it's being used widely.

+ +

Still, I did not start replacing it because I was bored. CodeMirror +1 was heavily reliant on designMode +or contentEditable (depending on the browser). Neither of +these are well specified (HTML5 tries +to specify +their basics), and, more importantly, they tend to be one of the more +obscure and buggy areas of browser functionality—CodeMirror, by using +this functionality in a non-typical way, was constantly running up +against browser bugs. WebKit wouldn't show an empty line at the end of +the document, and in some releases would suddenly get unbearably slow. +Firefox would show the cursor in the wrong place. Internet Explorer +would insist on linkifying everything that looked like a URL or email +address, a behaviour that can't be turned off. Some bugs I managed to +work around (which was often a frustrating, painful process), others, +such as the Firefox cursor placement, I gave up on, and had to tell +user after user that they were known problems, but not something I +could help.

+ +

Also, there is the fact that designMode (which seemed +to be less buggy than contentEditable in Webkit and +Firefox, and was thus used by CodeMirror 1 in those browsers) requires +a frame. Frames are another tricky area. It takes some effort to +prevent getting tripped up by domain restrictions, they don't +initialize synchronously, behave strangely in response to the back +button, and, on several browsers, can't be moved around the DOM +without having them re-initialize. They did provide a very nice way to +namespace the library, though—CodeMirror 1 could freely pollute the +namespace inside the frame.

+ +

Finally, working with an editable document means working with +selection in arbitrary DOM structures. Internet Explorer (8 and +before) has an utterly different (and awkward) selection API than all +of the other browsers, and even among the different implementations of +document.selection, details about how exactly a selection +is represented vary quite a bit. Add to that the fact that Opera's +selection support tended to be very buggy until recently, and you can +imagine why CodeMirror 1 contains 700 lines of selection-handling +code.

+ +

And that brings us to the main issue with the CodeMirror 1 +code base: The proportion of browser-bug-workarounds to real +application code was getting dangerously high. By building on top of a +few dodgy features, I put the system in a vulnerable position—any +incompatibility and bugginess in these features, I had to paper over +with my own code. Not only did I have to do some serious stunt-work to +get it to work on older browsers (as detailed in the +previous story), things +also kept breaking in newly released versions, requiring me to come up +with new scary hacks in order to keep up. This was starting +to lose its appeal.

+ +
+

General Approach

+ +

What CodeMirror 2 does is try to sidestep most of the hairy hacks +that came up in version 1. I owe a lot to the +ACE editor for inspiration on how to +approach this.

+ +

I absolutely did not want to be completely reliant on key events to +generate my input. Every JavaScript programmer knows that key event +information is horrible and incomplete. Some people (most awesomely +Mihai Bazon with Ymacs) have been able +to build more or less functioning editors by directly reading key +events, but it takes a lot of work (the kind of never-ending, fragile +work I described earlier), and will never be able to properly support +things like multi-keystoke international character +input. [see below for caveat]

+ +

So what I do is focus a hidden textarea, and let the browser +believe that the user is typing into that. What we show to the user is +a DOM structure we built to represent his document. If this is updated +quickly enough, and shows some kind of believable cursor, it feels +like a real text-input control.

+ +

Another big win is that this DOM representation does not have to +span the whole document. Some CodeMirror 1 users insisted that they +needed to put a 30 thousand line XML document into CodeMirror. Putting +all that into the DOM takes a while, especially since, for some +reason, an editable DOM tree is slower than a normal one on most +browsers. If we have full control over what we show, we must only +ensure that the visible part of the document has been added, and can +do the rest only when needed. (Fortunately, the onscroll +event works almost the same on all browsers, and lends itself well to +displaying things only as they are scrolled into view.)

+
+
+

Input

+ +

ACE uses its hidden textarea only as a text input shim, and does +all cursor movement and things like text deletion itself by directly +handling key events. CodeMirror's way is to let the browser do its +thing as much as possible, and not, for example, define its own set of +key bindings. One way to do this would have been to have the whole +document inside the hidden textarea, and after each key event update +the display DOM to reflect what's in that textarea.

+ +

That'd be simple, but it is not realistic. For even medium-sized +document the editor would be constantly munging huge strings, and get +terribly slow. What CodeMirror 2 does is put the current selection, +along with an extra line on the top and on the bottom, into the +textarea.

+ +

This means that the arrow keys (and their ctrl-variations), home, +end, etcetera, do not have to be handled specially. We just read the +cursor position in the textarea, and update our cursor to match it. +Also, copy and paste work pretty much for free, and people get their +native key bindings, without any special work on my part. For example, +I have emacs key bindings configured for Chrome and Firefox. There is +no way for a script to detect this. [no longer the case]

+ +

Of course, since only a small part of the document sits in the +textarea, keys like page up and ctrl-end won't do the right thing. +CodeMirror is catching those events and handling them itself.

+
+
+

Selection

+ +

Getting and setting the selection range of a textarea in modern +browsers is trivial—you just use the selectionStart +and selectionEnd properties. On IE you have to do some +insane stuff with temporary ranges and compensating for the fact that +moving the selection by a 'character' will treat \r\n as a single +character, but even there it is possible to build functions that +reliably set and get the selection range.

+ +

But consider this typical case: When I'm somewhere in my document, +press shift, and press the up arrow, something gets selected. Then, if +I, still holding shift, press the up arrow again, the top of my +selection is adjusted. The selection remembers where its head +and its anchor are, and moves the head when we shift-move. +This is a generally accepted property of selections, and done right by +every editing component built in the past twenty years.

+ +

But not something that the browser selection APIs expose.

+ +

Great. So when someone creates an 'upside-down' selection, the next +time CodeMirror has to update the textarea, it'll re-create the +selection as an 'upside-up' selection, with the anchor at the top, and +the next cursor motion will behave in an unexpected way—our second +up-arrow press in the example above will not do anything, since it is +interpreted in exactly the same way as the first.

+ +

No problem. We'll just, ehm, detect that the selection is +upside-down (you can tell by the way it was created), and then, when +an upside-down selection is present, and a cursor-moving key is +pressed in combination with shift, we quickly collapse the selection +in the textarea to its start, allow the key to take effect, and then +combine its new head with its old anchor to get the real +selection.

+ +

In short, scary hacks could not be avoided entirely in CodeMirror +2.

+ +

And, the observant reader might ask, how do you even know that a +key combo is a cursor-moving combo, if you claim you support any +native key bindings? Well, we don't, but we can learn. The editor +keeps a set known cursor-movement combos (initialized to the +predictable defaults), and updates this set when it observes that +pressing a certain key had (only) the effect of moving the cursor. +This, of course, doesn't work if the first time the key is used was +for extending an inverted selection, but it works most of the +time.

+
+
+

Intelligent Updating

+ +

One thing that always comes up when you have a complicated internal +state that's reflected in some user-visible external representation +(in this case, the displayed code and the textarea's content) is +keeping the two in sync. The naive way is to just update the display +every time you change your state, but this is not only error prone +(you'll forget), it also easily leads to duplicate work on big, +composite operations. Then you start passing around flags indicating +whether the display should be updated in an attempt to be efficient +again and, well, at that point you might as well give up completely.

+ +

I did go down that road, but then switched to a much simpler model: +simply keep track of all the things that have been changed during an +action, and then, only at the end, use this information to update the +user-visible display.

+ +

CodeMirror uses a concept of operations, which start by +calling a specific set-up function that clears the state and end by +calling another function that reads this state and does the required +updating. Most event handlers, and all the user-visible methods that +change state are wrapped like this. There's a method +called operation that accepts a function, and returns +another function that wraps the given function as an operation.

+ +

It's trivial to extend this (as CodeMirror does) to detect nesting, +and, when an operation is started inside an operation, simply +increment the nesting count, and only do the updating when this count +reaches zero again.

+ +

If we have a set of changed ranges and know the currently shown +range, we can (with some awkward code to deal with the fact that +changes can add and remove lines, so we're dealing with a changing +coordinate system) construct a map of the ranges that were left +intact. We can then compare this map with the part of the document +that's currently visible (based on scroll offset and editor height) to +determine whether something needs to be updated.

+ +

CodeMirror uses two update algorithms—a full refresh, where it just +discards the whole part of the DOM that contains the edited text and +rebuilds it, and a patch algorithm, where it uses the information +about changed and intact ranges to update only the out-of-date parts +of the DOM. When more than 30 percent (which is the current heuristic, +might change) of the lines need to be updated, the full refresh is +chosen (since it's faster to do than painstakingly finding and +updating all the changed lines), in the other case it does the +patching (so that, if you scroll a line or select another character, +the whole screen doesn't have to be +re-rendered). [the full-refresh +algorithm was dropped, it wasn't really faster than the patching +one]

+ +

All updating uses innerHTML rather than direct DOM +manipulation, since that still seems to be by far the fastest way to +build documents. There's a per-line function that combines the +highlighting, marking, and +selection info for that line into a snippet of HTML. The patch updater +uses this to reset individual lines, the refresh updater builds an +HTML chunk for the whole visible document at once, and then uses a +single innerHTML update to do the refresh.

+
+
+

Parsers can be Simple

+ +

When I wrote CodeMirror 1, I +thought interruptible +parsers were a hugely scary and complicated thing, and I used a +bunch of heavyweight abstractions to keep this supposed complexity +under control: parsers +were iterators +that consumed input from another iterator, and used funny +closure-resetting tricks to copy and resume themselves.

+ +

This made for a rather nice system, in that parsers formed strictly +separate modules, and could be composed in predictable ways. +Unfortunately, it was quite slow (stacking three or four iterators on +top of each other), and extremely intimidating to people not used to a +functional programming style.

+ +

With a few small changes, however, we can keep all those +advantages, but simplify the API and make the whole thing less +indirect and inefficient. CodeMirror +2's mode API uses explicit state +objects, and makes the parser/tokenizer a function that simply takes a +state and a character stream abstraction, advances the stream one +token, and returns the way the token should be styled. This state may +be copied, optionally in a mode-defined way, in order to be able to +continue a parse at a given point. Even someone who's never touched a +lambda in his life can understand this approach. Additionally, far +fewer objects are allocated in the course of parsing now.

+ +

The biggest speedup comes from the fact that the parsing no longer +has to touch the DOM though. In CodeMirror 1, on an older browser, you +could see the parser work its way through the document, +managing some twenty lines in each 50-millisecond time slice it got. It +was reading its input from the DOM, and updating the DOM as it went +along, which any experienced JavaScript programmer will immediately +spot as a recipe for slowness. In CodeMirror 2, the parser usually +finishes the whole document in a single 100-millisecond time slice—it +manages some 1500 lines during that time on Chrome. All it has to do +is munge strings, so there is no real reason for it to be slow +anymore.

+
+
+

What Gives?

+ +

Given all this, what can you expect from CodeMirror 2?

+ +
    + +
  • Small. the base library is +some 45k when minified +now, 17k when gzipped. It's smaller than +its own logo.
  • + +
  • Lightweight. CodeMirror 2 initializes very +quickly, and does almost no work when it is not focused. This means +you can treat it almost like a textarea, have multiple instances on a +page without trouble.
  • + +
  • Huge document support. Since highlighting is +really fast, and no DOM structure is being built for non-visible +content, you don't have to worry about locking up your browser when a +user enters a megabyte-sized document.
  • + +
  • Extended API. Some things kept coming up in the +mailing list, such as marking pieces of text or lines, which were +extremely hard to do with CodeMirror 1. The new version has proper +support for these built in.
  • + +
  • Tab support. Tabs inside editable documents were, +for some reason, a no-go. At least six different people announced they +were going to add tab support to CodeMirror 1, none survived (I mean, +none delivered a working version). CodeMirror 2 no longer removes tabs +from your document.
  • + +
  • Sane styling. iframe nodes aren't +really known for respecting document flow. Now that an editor instance +is a plain div element, it is much easier to size it to +fit the surrounding elements. You don't even have to make it scroll if +you do not want to.
  • + +
+ +

On the downside, a CodeMirror 2 instance is not a native +editable component. Though it does its best to emulate such a +component as much as possible, there is functionality that browsers +just do not allow us to hook into. Doing select-all from the context +menu, for example, is not currently detected by CodeMirror.

+ +

[Updates from November 13th 2011] Recently, I've made +some changes to the codebase that cause some of the text above to no +longer be current. I've left the text intact, but added markers at the +passages that are now inaccurate. The new situation is described +below.

+
+
+

Content Representation

+ +

The original implementation of CodeMirror 2 represented the +document as a flat array of line objects. This worked well—splicing +arrays will require the part of the array after the splice to be +moved, but this is basically just a simple memmove of a +bunch of pointers, so it is cheap even for huge documents.

+ +

However, I recently added line wrapping and code folding (line +collapsing, basically). Once lines start taking up a non-constant +amount of vertical space, looking up a line by vertical position +(which is needed when someone clicks the document, and to determine +the visible part of the document during scrolling) can only be done +with a linear scan through the whole array, summing up line heights as +you go. Seeing how I've been going out of my way to make big documents +fast, this is not acceptable.

+ +

The new representation is based on a B-tree. The leaves of the tree +contain arrays of line objects, with a fixed minimum and maximum size, +and the non-leaf nodes simply hold arrays of child nodes. Each node +stores both the amount of lines that live below them and the vertical +space taken up by these lines. This allows the tree to be indexed both +by line number and by vertical position, and all access has +logarithmic complexity in relation to the document size.

+ +

I gave line objects and tree nodes parent pointers, to the node +above them. When a line has to update its height, it can simply walk +these pointers to the top of the tree, adding or subtracting the +difference in height from each node it encounters. The parent pointers +also make it cheaper (in complexity terms, the difference is probably +tiny in normal-sized documents) to find the current line number when +given a line object. In the old approach, the whole document array had +to be searched. Now, we can just walk up the tree and count the sizes +of the nodes coming before us at each level.

+ +

I chose B-trees, not regular binary trees, mostly because they +allow for very fast bulk insertions and deletions. When there is a big +change to a document, it typically involves adding, deleting, or +replacing a chunk of subsequent lines. In a regular balanced tree, all +these inserts or deletes would have to be done separately, which could +be really expensive. In a B-tree, to insert a chunk, you just walk +down the tree once to find where it should go, insert them all in one +shot, and then break up the node if needed. This breaking up might +involve breaking up nodes further up, but only requires a single pass +back up the tree. For deletion, I'm somewhat lax in keeping things +balanced—I just collapse nodes into a leaf when their child count goes +below a given number. This means that there are some weird editing +patterns that may result in a seriously unbalanced tree, but even such +an unbalanced tree will perform well, unless you spend a day making +strangely repeating edits to a really big document.

+
+
+

Keymaps

+ +

Above, I claimed that directly catching key +events for things like cursor movement is impractical because it +requires some browser-specific kludges. I then proceeded to explain +some awful hacks that were needed to make it +possible for the selection changes to be detected through the +textarea. In fact, the second hack is about as bad as the first.

+ +

On top of that, in the presence of user-configurable tab sizes and +collapsed and wrapped lines, lining up cursor movement in the textarea +with what's visible on the screen becomes a nightmare. Thus, I've +decided to move to a model where the textarea's selection is no longer +depended on.

+ +

So I moved to a model where all cursor movement is handled by my +own code. This adds support for a goal column, proper interaction of +cursor movement with collapsed lines, and makes it possible for +vertical movement to move through wrapped lines properly, instead of +just treating them like non-wrapped lines.

+ +

The key event handlers now translate the key event into a string, +something like Ctrl-Home or Shift-Cmd-R, and +use that string to look up an action to perform. To make keybinding +customizable, this lookup goes through +a table, using a scheme that +allows such tables to be chained together (for example, the default +Mac bindings fall through to a table named 'emacsy', which defines +basic Emacs-style bindings like Ctrl-F, and which is also +used by the custom Emacs bindings).

+ +

A new +option extraKeys +allows ad-hoc keybindings to be defined in a much nicer way than what +was possible with the +old onKeyEvent +callback. You simply provide an object mapping key identifiers to +functions, instead of painstakingly looking at raw key events.

+ +

Built-in commands map to strings, rather than functions, for +example "goLineUp" is the default action bound to the up +arrow key. This allows new keymaps to refer to them without +duplicating any code. New commands can be defined by assigning to +the CodeMirror.commands object, which maps such commands +to functions.

+ +

The hidden textarea now only holds the current selection, with no +extra characters around it. This has a nice advantage: polling for +input becomes much, much faster. If there's a big selection, this text +does not have to be read from the textarea every time—when we poll, +just noticing that something is still selected is enough to tell us +that no new text was typed.

+ +

The reason that cheap polling is important is that many browsers do +not fire useful events on IME (input method engine) input, which is +the thing where people inputting a language like Japanese or Chinese +use multiple keystrokes to create a character or sequence of +characters. Most modern browsers fire input when the +composing is finished, but many don't fire anything when the character +is updated during composition. So we poll, whenever the +editor is focused, to provide immediate updates of the display.

+ +
+
diff --git a/js/codemirror/doc/logo.png b/js/codemirror/doc/logo.png new file mode 100644 index 0000000..9aabda1 Binary files /dev/null and b/js/codemirror/doc/logo.png differ diff --git a/js/codemirror/doc/logo.svg b/js/codemirror/doc/logo.svg new file mode 100644 index 0000000..b39b24c --- /dev/null +++ b/js/codemirror/doc/logo.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/js/codemirror/doc/manual.html b/js/codemirror/doc/manual.html new file mode 100644 index 0000000..2a91572 --- /dev/null +++ b/js/codemirror/doc/manual.html @@ -0,0 +1,3761 @@ + + +CodeMirror 5 User Manual + + + + + + + + + + + + + + + + +
+ +
+

+ User manual and reference guide + version 5.65.16 +

+ +

CodeMirror is a code-editor component that can be embedded in + Web pages. The core library provides only the editor + component, no accompanying buttons, auto-completion, or other IDE + functionality. It does provide a rich API on top of which such + functionality can be straightforwardly implemented. See + the addons included in the distribution, + and 3rd party + packages on npm, for reusable implementations of extra + features.

+ +

CodeMirror works with language-specific modes. Modes are + JavaScript programs that help color (and optionally indent) text + written in a given language. The distribution comes with a number + of modes (see the mode/ + directory), and it isn't hard to write new + ones for other languages.

+
+ +
+

Basic Usage

+ +

The easiest way to use CodeMirror is to simply load the script + and style sheet found under lib/ in the distribution, + plus a mode script from one of the mode/ directories. + For example:

+ +
<script src="lib/codemirror.js"></script>
+<link rel="stylesheet" href="lib/codemirror.css">
+<script src="mode/javascript/javascript.js"></script>
+ +

(Alternatively, use a module loader. More + about that later.)

+ +

Having done this, an editor instance can be created like + this:

+ +
var myCodeMirror = CodeMirror(document.body);
+ +

The editor will be appended to the document body, will start + empty, and will use the mode that we loaded. To have more control + over the new editor, a configuration object can be passed + to CodeMirror as a second + argument:

+ +
var myCodeMirror = CodeMirror(document.body, {
+  value: "function myScript(){return 100;}\n",
+  mode:  "javascript"
+});
+ +

This will initialize the editor with a piece of code already in + it, and explicitly tell it to use the JavaScript mode (which is + useful when multiple modes are loaded). + See below for a full discussion of the + configuration options that CodeMirror accepts.

+ +

In cases where you don't want to append the editor to an + element, and need more control over the way it is inserted, the + first argument to the CodeMirror function can also + be a function that, when given a DOM element, inserts it into the + document somewhere. This could be used to, for example, replace a + textarea with a real editor:

+ +
var myCodeMirror = CodeMirror(function(elt) {
+  myTextArea.parentNode.replaceChild(elt, myTextArea);
+}, {value: myTextArea.value});
+ +

However, for this use case, which is a common way to use + CodeMirror, the library provides a much more powerful + shortcut:

+ +
var myCodeMirror = CodeMirror.fromTextArea(myTextArea);
+ +

This will, among other things, ensure that the textarea's value + is updated with the editor's contents when the form (if it is part + of a form) is submitted. See the API + reference for a full description of this method.

+ +

Module loaders

+ +

The files in the CodeMirror distribution contain shims for + loading them (and their dependencies) in AMD or CommonJS + environments. If the variables exports + and module exist and have type object, CommonJS-style + require will be used. If not, but there is a + function define with an amd property + present, AMD-style (RequireJS) will be used.

+ +

It is possible to + use Browserify or similar + tools to statically build modules using CodeMirror. Alternatively, + use RequireJS to dynamically + load dependencies at runtime. Both of these approaches have the + advantage that they don't use the global namespace and can, thus, + do things like load multiple versions of CodeMirror alongside each + other.

+ +

Here's a simple example of using RequireJS to load CodeMirror:

+ +
require([
+  "cm/lib/codemirror", "cm/mode/htmlmixed/htmlmixed"
+], function(CodeMirror) {
+  CodeMirror.fromTextArea(document.getElementById("code"), {
+    lineNumbers: true,
+    mode: "htmlmixed"
+  });
+});
+ +

It will automatically load the modes that the mixed HTML mode + depends on (XML, JavaScript, and CSS). Do not use + RequireJS' paths option to configure the path to + CodeMirror, since it will break loading submodules through + relative paths. Use + the packages + configuration option instead, as in:

+ +
require.config({
+  packages: [{
+    name: "codemirror",
+    location: "../path/to/codemirror",
+    main: "lib/codemirror"
+  }]
+});
+ +
+ +
+

Configuration

+ +

Both the CodeMirror + function and its fromTextArea method take as second + (optional) argument an object containing configuration options. + Any option not supplied like this will be taken + from CodeMirror.defaults, an + object containing the default options. You can update this object + to change the defaults on your page.

+ +

Options are not checked in any way, so setting bogus option + values is bound to lead to odd errors.

+ +

These are the supported options:

+ +
+
value: string|CodeMirror.Doc
+
The starting value of the editor. Can be a string, or + a document object.
+ +
mode: string|object
+
The mode to use. When not given, this will default to the + first mode that was loaded. It may be a string, which either + simply names the mode or is + a MIME type + associated with the mode. The value "null" + indicates no highlighting should be applied. Alternatively, it + may be an object containing configuration options for the mode, + with a name property that names the mode (for + example {name: "javascript", json: true}). The demo + pages for each mode contain information about what configuration + parameters the mode supports. You can ask CodeMirror which modes + and MIME types have been defined by inspecting + the CodeMirror.modes + and CodeMirror.mimeModes objects. The first maps + mode names to their constructors, and the second maps MIME types + to mode specs.
+ +
lineSeparator: string|null
+
Explicitly set the line separator for the editor. By default + (value null), the document will be split on CRLFs + as well as lone CRs and LFs, and a single LF will be used as + line separator in all output (such + as getValue). When a + specific string is given, lines will only be split on that + string, and output will, by default, use that same + separator.
+ +
theme: string
+
The theme to style the editor with. You must make sure the + CSS file defining the corresponding .cm-s-[name] + styles is loaded (see + the theme directory in the + distribution). The default is "default", for which + colors are included in codemirror.css. It is + possible to use multiple theming classes at once—for + example "foo bar" will assign both + the cm-s-foo and the cm-s-bar classes + to the editor.
+ +
indentUnit: integer
+
How many spaces a block (whatever that means in the edited + language) should be indented. The default is 2.
+ +
smartIndent: boolean
+
Whether to use the context-sensitive indentation that the + mode provides (or just indent the same as the line before). + Defaults to true.
+ +
tabSize: integer
+
The width of a tab character. Defaults to 4.
+ +
indentWithTabs: boolean
+
Whether, when indenting, the first N*tabSize + spaces should be replaced by N tabs. Default is false.
+ +
electricChars: boolean
+
Configures whether the editor should re-indent the current + line when a character is typed that might change its proper + indentation (only works if the mode supports indentation). + Default is true.
+ +
specialChars: RegExp
+
A regular expression used to determine which characters + should be replaced by a + special placeholder. + Mostly useful for non-printing special characters. The default + is /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/.
+
specialCharPlaceholder: function(char) → Element
+
A function that, given a special character identified by + the specialChars + option, produces a DOM node that is used to represent the + character. By default, a red dot () + is shown, with a title tooltip to indicate the character code.
+ +
direction: "ltr" | "rtl"
+
Flips overall layout and selects base paragraph direction to + be left-to-right or right-to-left. Default is "ltr". + CodeMirror applies the Unicode Bidirectional Algorithm to each + line, but does not autodetect base direction — it's set to the + editor direction for all lines. The resulting order is + sometimes wrong when base direction doesn't match user intent + (for example, leading and trailing punctuation jumps to the + wrong side of the line). Therefore, it's helpful for + multilingual input to let users toggle this option. + +
rtlMoveVisually: boolean
+
Determines whether horizontal cursor movement through + right-to-left (Arabic, Hebrew) text is visual (pressing the left + arrow moves the cursor left) or logical (pressing the left arrow + moves to the next lower index in the string, which is visually + right in right-to-left text). The default is false + on Windows, and true on other platforms.
+ +
keyMap: string
+
Configures the key map to use. The default + is "default", which is the only key map defined + in codemirror.js itself. Extra key maps are found in + the key map directory. See + the section on key maps for more + information.
+ +
extraKeys: object
+
Can be used to specify extra key bindings for the editor, + alongside the ones defined + by keyMap. Should be + either null, or a valid key map value.
+ +
configureMouse: fn(cm: CodeMirror, repeat: "single" | "double" | "triple", event: Event) → Object
+
Allows you to configure the behavior of mouse selection and + dragging. The function is called when the left mouse button is + pressed. The returned object may have the following properties: +
+
unit: "char" | "word" | "line" | "rectangle" | fn(CodeMirror, Pos) → {from: Pos, to: Pos}
+
The unit by which to select. May be one of the built-in + units or a function that takes a position and returns a + range around that, for a custom unit. The default is to + return "word" for double + clicks, "line" for triple + clicks, "rectangle" for alt-clicks (or, on + Chrome OS, meta-shift-clicks), and "single" + otherwise.
+
extend: bool
+
Whether to extend the existing selection range or start + a new one. By default, this is enabled when shift + clicking.
+
addNew: bool
+
When enabled, this adds a new range to the existing + selection, rather than replacing it. The default behavior is + to enable this for command-click on Mac OS, and + control-click on other platforms.
+
moveOnDrag: bool
+
When the mouse even drags content around inside the + editor, this controls whether it is copied (false) or moved + (true). By default, this is enabled by alt-clicking on Mac + OS, and ctrl-clicking elsewhere.
+
+
+ +
lineWrapping: boolean
+
Whether CodeMirror should scroll or wrap for long lines. + Defaults to false (scroll).
+ +
lineNumbers: boolean
+
Whether to show line numbers to the left of the editor.
+ +
firstLineNumber: integer
+
At which number to start counting lines. Default is 1.
+ +
lineNumberFormatter: function(line: integer) → string
+
A function used to format line numbers. The function is + passed the line number, and should return a string that will be + shown in the gutter.
+ +
gutters: array<string | {className: string, style: ?string}>
+
Can be used to add extra gutters (beyond or instead of the + line number gutter). Should be an array of CSS class names or + class name / CSS string pairs, each of which defines + a width (and optionally a background), and which + will be used to draw the background of the gutters. May + include the CodeMirror-linenumbers class, in order + to explicitly set the position of the line number gutter (it + will default to be to the right of all other gutters). These + class names are the keys passed + to setGutterMarker.
+ +
fixedGutter: boolean
+
Determines whether the gutter scrolls along with the content + horizontally (false) or whether it stays fixed during horizontal + scrolling (true, the default).
+ +
scrollbarStyle: string
+
Chooses a scrollbar implementation. The default + is "native", showing native scrollbars. The core + library also provides the "null" style, which + completely hides the + scrollbars. Addons can + implement additional scrollbar models.
+ +
coverGutterNextToScrollbar: boolean
+
When fixedGutter + is on, and there is a horizontal scrollbar, by default the + gutter will be visible to the left of this scrollbar. If this + option is set to true, it will be covered by an element with + class CodeMirror-gutter-filler.
+ +
inputStyle: string
+
Selects the way CodeMirror handles input and focus. The core + library defines the "textarea" + and "contenteditable" input models. On mobile + browsers, the default is "contenteditable". On + desktop browsers, the default is "textarea". + Support for IME and screen readers is better in + the "contenteditable" model. The intention is to + make it the default on modern desktop browsers in the + future.
+ +
readOnly: boolean|string
+
This disables editing of the editor content by the user. If + the special value "nocursor" is given (instead of + simply true), focusing of the editor is also + disallowed.
+ +
screenReaderLabel: string
+
This label is read by the screenreaders when CodeMirror text area is focused. This + is helpful for accessibility.
+ +
showCursorWhenSelecting: boolean
+
Whether the cursor should be drawn when a selection is + active. Defaults to false.
+ +
lineWiseCopyCut: boolean
+
When enabled, which is the default, doing copy or cut when + there is no selection will copy or cut the whole lines that have + cursors on them.
+ +
pasteLinesPerSelection: boolean
+
When pasting something from an external source (not from the + editor itself), if the number of lines matches the number of + selection, CodeMirror will by default insert one line per + selection. You can set this to false to disable + that behavior.
+ +
selectionsMayTouch: boolean
+
Determines whether multiple selections are joined as soon as + they touch (the default) or only when they overlap (true).
+ +
undoDepth: integer
+
The maximum number of undo levels that the editor stores. + Note that this includes selection change events. Defaults to + 200.
+ +
historyEventDelay: integer
+
The period of inactivity (in milliseconds) that will cause a + new history event to be started when typing or deleting. + Defaults to 1250.
+ +
tabindex: integer
+
The tab + index to assign to the editor. If not given, no tab index + will be assigned.
+ +
autofocus: boolean
+
Can be used to make CodeMirror focus itself on + initialization. Defaults to off. + When fromTextArea is + used, and no explicit value is given for this option, it will be + set to true when either the source textarea is focused, or it + has an autofocus attribute and no other element is + focused.
+ +
phrases: ?object
+
Some addons run user-visible strings (such as labels in the + interface) through the phrase + method to allow for translation. This option determines the + return value of that method. When it is null or an object that + doesn't have a property named by the input string, that string + is returned. Otherwise, the value of the property corresponding + to that string is returned.
+
+ +

Below this a few more specialized, low-level options are + listed. These are only useful in very specific situations, you + might want to skip them the first time you read this manual.

+ +
+
dragDrop: boolean
+
Controls whether drag-and-drop is enabled. On by default.
+ +
allowDropFileTypes: array<string>
+
When set (default is null) only files whose + type is in the array can be dropped into the editor. The strings + should be MIME types, and will be checked against + the type + of the File object as reported by the browser.
+ +
cursorBlinkRate: number
+
Half-period in milliseconds used for cursor blinking. The default blink + rate is 530ms. By setting this to zero, blinking can be disabled. A + negative value hides the cursor entirely.
+ +
cursorScrollMargin: number
+
How much extra space to always keep above and below the + cursor when approaching the top or bottom of the visible view in + a scrollable document. Default is 0.
+ +
cursorHeight: number
+
Determines the height of the cursor. Default is 1, meaning + it spans the whole height of the line. For some fonts (and by + some tastes) a smaller height (for example 0.85), + which causes the cursor to not reach all the way to the bottom + of the line, looks better
+ +
singleCursorHeightPerLine: boolean
+
If set to true (the default), will keep the + cursor height constant for an entire line (or wrapped part of a + line). When false, the cursor's height is based on + the height of the adjacent reference character.
+ +
resetSelectionOnContextMenu: boolean
+
Controls whether, when the context menu is opened with a + click outside of the current selection, the cursor is moved to + the point of the click. Defaults to true.
+ +
workTime, workDelay: number
+
Highlighting is done by a pseudo background-thread that will + work for workTime milliseconds, and then use + timeout to sleep for workDelay milliseconds. The + defaults are 200 and 300, you can change these options to make + the highlighting more or less aggressive.
+ +
pollInterval: number
+
Indicates how quickly CodeMirror should poll its input + textarea for changes (when focused). Most input is captured by + events, but some things, like IME input on some browsers, don't + generate events that allow CodeMirror to properly detect it. + Thus, it polls. Default is 100 milliseconds.
+ +
flattenSpans: boolean
+
By default, CodeMirror will combine adjacent tokens into a + single span if they have the same class. This will result in a + simpler DOM tree, and thus perform better. With some kinds of + styling (such as rounded corners), this will change the way the + document looks. You can set this option to false to disable this + behavior.
+ +
addModeClass: boolean
+
When enabled (off by default), an extra CSS class will be + added to each token, indicating the + (inner) mode that produced it, prefixed + with "cm-m-". For example, tokens from the XML mode + will get the cm-m-xml class.
+ +
maxHighlightLength: number
+
When highlighting long lines, in order to stay responsive, + the editor will give up and simply style the rest of the line as + plain text when it reaches a certain position. The default is + 10 000. You can set this to Infinity to turn off + this behavior.
+ +
viewportMargin: integer
+
Specifies the amount of lines that are rendered above and + below the part of the document that's currently scrolled into + view. This affects the amount of updates needed when scrolling, + and the amount of work that such an update does. You should + usually leave it at its default, 10. Can be set + to Infinity to make sure the whole document is + always rendered, and thus the browser's text search works on it. + This will have bad effects on performance of big + documents.
+ +
spellcheck: boolean
+
Specifies whether or not spellcheck will be enabled on the input.
+ +
autocorrect: boolean
+
Specifies whether or not autocorrect will be enabled on the input.
+ +
autocapitalize: boolean
+
Specifies whether or not autocapitalization will be enabled on the input.
+
+
+ +
+

Events

+ +

Various CodeMirror-related objects emit events, which allow + client code to react to various situations. Handlers for such + events can be registered with the on + and off methods on the objects + that the event fires on. To fire your own events, + use CodeMirror.signal(target, name, args...), + where target is a non-DOM-node object.

+ +

An editor instance fires the following events. + The instance argument always refers to the editor + itself.

+ +
+
"change" (instance: CodeMirror, changeObj: object)
+
Fires every time the content of the editor is changed. + The changeObj is a {from, to, text, removed, + origin} object containing information about the changes + that occurred as second argument. from + and to are the positions (in the pre-change + coordinate system) where the change started and ended (for + example, it might be {ch:0, line:18} if the + position is at the beginning of line #19). text is + an array of strings representing the text that replaced the + changed range (split by line). removed is the text + that used to be between from and to, + which is overwritten by this change. This event is + fired before the end of + an operation, before the DOM updates + happen.
+ +
"changes" (instance: CodeMirror, changes: array<object>)
+
Like the "change" + event, but batched per operation, + passing an array containing all the changes that happened in the + operation. This event is fired after the operation finished, and + display changes it makes will trigger a new operation.
+ +
"beforeChange" (instance: CodeMirror, changeObj: object)
+
This event is fired before a change is applied, and its + handler may choose to modify or cancel the change. + The changeObj object + has from, to, and text + properties, as with + the "change" event. It + also has a cancel() method, which can be called to + cancel the change, and, if the change isn't + coming from an undo or redo event, an update(from, to, + text) method, which may be used to modify the change. + Undo or redo changes can't be modified, because they hold some + metainformation for restoring old marked ranges that is only + valid for that specific change. All three arguments + to update are optional, and can be left off to + leave the existing value for that field + intact. Note: you may not do anything from + a "beforeChange" handler that would cause changes + to the document or its visualization. Doing so will, since this + handler is called directly from the bowels of the CodeMirror + implementation, probably cause the editor to become + corrupted.
+ +
"cursorActivity" (instance: CodeMirror)
+
Will be fired when the cursor or selection moves, or any + change is made to the editor content.
+ +
"keyHandled" (instance: CodeMirror, name: string, event: Event)
+
Fired after a key is handled through a + key map. name is the name of the handled key (for + example "Ctrl-X" or "'q'"), + and event is the DOM keydown + or keypress event.
+ +
"inputRead" (instance: CodeMirror, changeObj: object)
+
Fired whenever new input is read from the hidden textarea + (typed or pasted by the user).
+ +
"electricInput" (instance: CodeMirror, line: integer)
+
Fired if text input matched the + mode's electric patterns, + and this caused the line's indentation to change.
+ +
"beforeSelectionChange" (instance: CodeMirror, obj: {ranges, origin, update})
+
This event is fired before the selection is moved. Its + handler may inspect the set of selection ranges, present as an + array of {anchor, head} objects in + the ranges property of the obj + argument, and optionally change them by calling + the update method on this object, passing an array + of ranges in the same format. The object also contains + an origin property holding the origin string passed + to the selection-changing method, if any. Handlers for this + event have the same restriction + as "beforeChange" + handlers — they should not do anything to directly update the + state of the editor.
+ +
"viewportChange" (instance: CodeMirror, from: number, to: number)
+
Fires whenever the view port of + the editor changes (due to scrolling, editing, or any other + factor). The from and to arguments + give the new start and end of the viewport.
+ +
"swapDoc" (instance: CodeMirror, oldDoc: Doc)
+
This is signalled when the editor's document is replaced + using the swapDoc + method.
+ +
"gutterClick" (instance: CodeMirror, line: integer, gutter: string, clickEvent: Event)
+
Fires when the editor gutter (the line-number area) is + clicked. Will pass the editor instance as first argument, the + (zero-based) number of the line that was clicked as second + argument, the CSS class of the gutter that was clicked as third + argument, and the raw mousedown event object as + fourth argument.
+ +
"gutterContextMenu" (instance: CodeMirror, line: integer, gutter: string, contextMenu: Event: Event)
+
Fires when the editor gutter (the line-number area) + receives a contextmenu event. Will pass the editor + instance as first argument, the (zero-based) number of the line + that was clicked as second argument, the CSS class of the + gutter that was clicked as third argument, and the raw + contextmenu mouse event object as fourth argument. + You can preventDefault the event, to signal that + CodeMirror should do no further handling.
+ +
"focus" (instance: CodeMirror, event: Event)
+
Fires whenever the editor is focused.
+ +
"blur" (instance: CodeMirror, event: Event)
+
Fires whenever the editor is unfocused.
+ +
"scroll" (instance: CodeMirror)
+
Fires when the editor is scrolled.
+ +
"refresh" (instance: CodeMirror)
+
Fires when the editor is refreshed + or resized. Mostly useful to invalidate + cached values that depend on the editor or character size.
+ +
"optionChange" (instance: CodeMirror, option: string)
+
Dispatched every time an option is changed with setOption.
+ +
"scrollCursorIntoView" (instance: CodeMirror, event: Event)
+
Fires when the editor tries to scroll its cursor into view. + Can be hooked into to take care of additional scrollable + containers around the editor. When the event object has + its preventDefault method called, CodeMirror will + not itself try to scroll the window.
+ +
"update" (instance: CodeMirror)
+
Will be fired whenever CodeMirror updates its DOM display.
+ +
"renderLine" (instance: CodeMirror, line: LineHandle, element: Element)
+
Fired whenever a line is (re-)rendered to the DOM. Fired + right after the DOM element is built, before it is + added to the document. The handler may mess with the style of + the resulting element, or add event handlers, but + should not try to change the state of the editor.
+ +
"mousedown", + "dblclick", "touchstart", "contextmenu", + "keydown", "keypress", + "keyup", "cut", "copy", "paste", + "dragstart", "dragenter", + "dragover", "dragleave", + "drop" + (instance: CodeMirror, event: Event)
+
Fired when CodeMirror is handling a DOM event of this type. + You can preventDefault the event, or give it a + truthy codemirrorIgnore property, to signal that + CodeMirror should do no further handling.
+
+ +

Document objects (instances + of CodeMirror.Doc) emit the + following events:

+ +
+
"change" (doc: CodeMirror.Doc, changeObj: object)
+
Fired whenever a change occurs to the + document. changeObj has a similar type as the + object passed to the + editor's "change" + event.
+ +
"beforeChange" (doc: CodeMirror.Doc, change: object)
+
See the description of the + same event on editor instances.
+ +
"cursorActivity" (doc: CodeMirror.Doc)
+
Fired whenever the cursor or selection in this document + changes.
+ +
"beforeSelectionChange" (doc: CodeMirror.Doc, selection: {head, anchor})
+
Equivalent to + the event by the same + name as fired on editor instances.
+
+ +

Line handles (as returned by, for + example, getLineHandle) + support these events:

+ +
+
"delete" ()
+
Will be fired when the line object is deleted. A line object + is associated with the start of the line. Mostly useful + when you need to find out when your gutter + markers on a given line are removed.
+
"change" (line: LineHandle, changeObj: object)
+
Fires when the line's text content is changed in any way + (but the line is not deleted outright). The change + object is similar to the one passed + to change event on the editor + object.
+
+ +

Marked range handles (CodeMirror.TextMarker), as returned + by markText + and setBookmark, emit the + following events:

+ +
+
"beforeCursorEnter" ()
+
Fired when the cursor enters the marked range. From this + event handler, the editor state may be inspected + but not modified, with the exception that the range on + which the event fires may be cleared.
+
"clear" (from: {line, ch}, to: {line, ch})
+
Fired when the range is cleared, either through cursor + movement in combination + with clearOnEnter + or through a call to its clear() method. Will only + be fired once per handle. Note that deleting the range through + text editing does not fire this event, because an undo action + might bring the range back into existence. from + and to give the part of the document that the range + spanned when it was cleared.
+
"hide" ()
+
Fired when the last part of the marker is removed from the + document by editing operations.
+
"unhide" ()
+
Fired when, after the marker was removed by editing, a undo + operation brought the marker back.
+
+ +

Line widgets (CodeMirror.LineWidget), returned + by addLineWidget, fire + these events:

+ +
+
"redraw" ()
+
Fired whenever the editor re-adds the widget to the DOM. + This will happen once right after the widget is added (if it is + scrolled into view), and then again whenever it is scrolled out + of view and back in again, or when changes to the editor options + or the line the widget is on require the widget to be + redrawn.
+
+
+ +
+

Key Maps

+ +

Key maps are ways to associate keys and mouse buttons with + functionality. A key map is an object mapping strings that + identify the buttons to functions that implement their + functionality.

+ +

The CodeMirror distributions comes + with Emacs, Vim, + and Sublime Text-style keymaps.

+ +

Keys are identified either by name or by character. + The CodeMirror.keyNames object defines names for + common keys and associates them with their key codes. Examples of + names defined here are Enter, F5, + and Q. These can be prefixed + with Shift-, Cmd-, Ctrl-, + and Alt- to specify a modifier. So for + example, Shift-Ctrl-Space would be a valid key + identifier.

+ +

Common example: map the Tab key to insert spaces instead of a tab + character.

+ +
+editor.setOption("extraKeys", {
+  Tab: function(cm) {
+    var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
+    cm.replaceSelection(spaces);
+  }
+});
+ +

Alternatively, a character can be specified directly by + surrounding it in single quotes, for example '$' + or 'q'. Due to limitations in the way browsers fire + key events, these may not be prefixed with modifiers.

+ +

To bind mouse buttons, use the names `LeftClick`, + `MiddleClick`, and `RightClick`. These can also be prefixed with + modifiers, and in addition, the word `Double` or `Triple` can be + put before `Click` (as in `LeftDoubleClick`) to bind a double- or + triple-click. The function for such a binding is passed the + position that was clicked as second argument.

+ +

Multi-stroke key bindings can be specified + by separating the key names by spaces in the property name, for + example Ctrl-X Ctrl-V. When a map contains + multi-stoke bindings or keys with modifiers that are not specified + in the default order (Shift-Cmd-Ctrl-Alt), you must + call CodeMirror.normalizeKeyMap on it before it can + be used. This function takes a keymap and modifies it to normalize + modifier order and properly recognize multi-stroke bindings. It + will return the keymap itself.

+ +

The CodeMirror.keyMap object associates key maps + with names. User code and key map definitions can assign extra + properties to this object. Anywhere where a key map is expected, a + string can be given, which will be looked up in this object. It + also contains the "default" key map holding the + default bindings.

+ +

The values of properties in key maps can be either functions of + a single argument (the CodeMirror instance), strings, or + false. Strings refer + to commands, which are described below. If + the property is set to false, CodeMirror leaves + handling of the key up to the browser. A key handler function may + return CodeMirror.Pass to indicate that it has + decided not to handle the key, and other handlers (or the default + behavior) should be given a turn.

+ +

Keys mapped to command names that start with the + characters "go" or to functions that have a + truthy motion property (which should be used for + cursor-movement actions) will be fired even when an + extra Shift modifier is present (i.e. "Up": + "goLineUp" matches both up and shift-up). This is used to + easily implement shift-selection.

+ +

Key maps can defer to each other by defining + a fallthrough property. This indicates that when a + key is not found in the map itself, one or more other maps should + be searched. It can hold either a single key map or an array of + key maps.

+ +

When a key map needs to set something up when it becomes + active, or tear something down when deactivated, it can + contain attach and/or detach properties, + which should hold functions that take the editor instance and the + next or previous keymap. Note that this only works for the + top-level keymap, not for fallthrough + maps or maps added + with extraKeys + or addKeyMap.

+
+ +
+

Commands

+ +

Commands are parameter-less actions that can be performed on an + editor. Their main use is for key bindings. Commands are defined by + adding properties to the CodeMirror.commands object. + A number of common commands are defined by the library itself, + most of them used by the default key bindings. The value of a + command property must be a function of one argument (an editor + instance).

+ +

Some of the commands below are referenced in the default + key map, but not defined by the core library. These are intended to + be defined by user code or addons.

+ +

Commands can also be run with + the execCommand + method.

+ +
+
selectAllCtrl-A (PC), Cmd-A (Mac)
+
Select the whole content of the editor.
+ +
singleSelectionEsc
+
When multiple selections are present, this deselects all but + the primary selection.
+ +
killLineCtrl-K (Mac)
+
Emacs-style line killing. Deletes the part of the line after + the cursor. If that consists only of whitespace, the newline at + the end of the line is also deleted.
+ +
deleteLineCtrl-D (PC), Cmd-D (Mac)
+
Deletes the whole line under the cursor, including newline at the end.
+ +
delLineLeft
+
Delete the part of the line before the cursor.
+ +
delWrappedLineLeftCmd-Backspace (Mac)
+
Delete the part of the line from the left side of the visual line the cursor is on to the cursor.
+ +
delWrappedLineRightCmd-Delete (Mac)
+
Delete the part of the line from the cursor to the right side of the visual line the cursor is on.
+ +
undoCtrl-Z (PC), Cmd-Z (Mac)
+
Undo the last change. Note that, because browsers still + don't make it possible for scripts to react to or customize the + context menu, selecting undo (or redo) from the context menu in + a CodeMirror instance does not work.
+ +
redoCtrl-Y (PC), Shift-Cmd-Z (Mac), Cmd-Y (Mac)
+
Redo the last undone change.
+ +
undoSelectionCtrl-U (PC), Cmd-U (Mac)
+
Undo the last change to the selection, or if there are no + selection-only changes at the top of the history, undo the last + change.
+ +
redoSelectionAlt-U (PC), Shift-Cmd-U (Mac)
+
Redo the last change to the selection, or the last text change if + no selection changes remain.
+ +
goDocStartCtrl-Home (PC), Cmd-Up (Mac), Cmd-Home (Mac)
+
Move the cursor to the start of the document.
+ +
goDocEndCtrl-End (PC), Cmd-End (Mac), Cmd-Down (Mac)
+
Move the cursor to the end of the document.
+ +
goLineStartAlt-Left (PC), Ctrl-A (Mac)
+
Move the cursor to the start of the line.
+ +
goLineStartSmartHome
+
Move to the start of the text on the line, or if we are + already there, to the actual start of the line (including + whitespace).
+ +
goLineEndAlt-Right (PC), Ctrl-E (Mac)
+
Move the cursor to the end of the line.
+ +
goLineRightCmd-Right (Mac)
+
Move the cursor to the right side of the visual line it is on.
+ +
goLineLeftCmd-Left (Mac)
+
Move the cursor to the left side of the visual line it is on. If + this line is wrapped, that may not be the start of the line.
+ +
goLineLeftSmart
+
Move the cursor to the left side of the visual line it is + on. If that takes it to the start of the line, behave + like goLineStartSmart.
+ +
goLineUpUp, Ctrl-P (Mac)
+
Move the cursor up one line.
+ +
goLineDownDown, Ctrl-N (Mac)
+
Move down one line.
+ +
goPageUpPageUp, Shift-Ctrl-V (Mac)
+
Move the cursor up one screen, and scroll up by the same distance.
+ +
goPageDownPageDown, Ctrl-V (Mac)
+
Move the cursor down one screen, and scroll down by the same distance.
+ +
goCharLeftLeft, Ctrl-B (Mac)
+
Move the cursor one character left, going to the previous line + when hitting the start of line.
+ +
goCharRightRight, Ctrl-F (Mac)
+
Move the cursor one character right, going to the next line + when hitting the end of line.
+ +
goColumnLeft
+
Move the cursor one character left, but don't cross line boundaries.
+ +
goColumnRight
+
Move the cursor one character right, don't cross line boundaries.
+ +
goWordLeftAlt-B (Mac)
+
Move the cursor to the start of the previous word.
+ +
goWordRightAlt-F (Mac)
+
Move the cursor to the end of the next word.
+ +
goGroupLeftCtrl-Left (PC), Alt-Left (Mac)
+
Move to the left of the group before the cursor. A group is + a stretch of word characters, a stretch of punctuation + characters, a newline, or a stretch of more than one + whitespace character.
+ +
goGroupRightCtrl-Right (PC), Alt-Right (Mac)
+
Move to the right of the group after the cursor + (see above).
+ +
delCharBeforeShift-Backspace, Ctrl-H (Mac)
+
Delete the character before the cursor.
+ +
delCharAfterDelete, Ctrl-D (Mac)
+
Delete the character after the cursor.
+ +
delWordBeforeAlt-Backspace (Mac)
+
Delete up to the start of the word before the cursor.
+ +
delWordAfterAlt-D (Mac)
+
Delete up to the end of the word after the cursor.
+ +
delGroupBeforeCtrl-Backspace (PC), Alt-Backspace (Mac)
+
Delete to the left of the group before the cursor.
+ +
delGroupAfterCtrl-Delete (PC), Ctrl-Alt-Backspace (Mac), Alt-Delete (Mac)
+
Delete to the start of the group after the cursor.
+ +
indentAutoShift-Tab
+
Auto-indent the current line or selection.
+ +
indentMoreCtrl-] (PC), Cmd-] (Mac)
+
Indent the current line or selection by one indent unit.
+ +
indentLessCtrl-[ (PC), Cmd-[ (Mac)
+
Dedent the current line or selection by one indent unit.
+ +
insertTab
+
Insert a tab character at the cursor.
+ +
insertSoftTab
+
Insert the amount of spaces that match the width a tab at + the cursor position would have.
+ +
defaultTabTab
+
If something is selected, indent it by + one indent unit. If nothing is + selected, insert a tab character.
+ +
transposeCharsCtrl-T (Mac)
+
Swap the characters before and after the cursor.
+ +
newlineAndIndentEnter
+
Insert a newline and auto-indent the new line.
+ +
toggleOverwriteInsert
+
Flip the overwrite flag.
+ +
saveCtrl-S (PC), Cmd-S (Mac)
+
Not defined by the core library, only referred to in + key maps. Intended to provide an easy way for user code to define + a save command.
+ +
findCtrl-F (PC), Cmd-F (Mac)
+
findNextCtrl-G (PC), Cmd-G (Mac)
+
findPrevShift-Ctrl-G (PC), Shift-Cmd-G (Mac)
+
replaceShift-Ctrl-F (PC), Cmd-Alt-F (Mac)
+
replaceAllShift-Ctrl-R (PC), Shift-Cmd-Alt-F (Mac)
+
Not defined by the core library, but defined in + the search addon (or custom client + addons).
+ +
+ +
+ +
+

Customized Styling

+ +

Up to a certain extent, CodeMirror's look can be changed by + modifying style sheet files. The style sheets supplied by modes + simply provide the colors for that mode, and can be adapted in a + very straightforward way. To style the editor itself, it is + possible to alter or override the styles defined + in codemirror.css.

+ +

Some care must be taken there, since a lot of the rules in this + file are necessary to have CodeMirror function properly. Adjusting + colors should be safe, of course, and with some care a lot of + other things can be changed as well. The CSS classes defined in + this file serve the following roles:

+ +
+
CodeMirror
+
The outer element of the editor. This should be used for the + editor width, height, borders and positioning. Can also be used + to set styles that should hold for everything inside the editor + (such as font and font size), or to set a background. Setting + this class' height style to auto will + make the editor resize to fit its + content (it is recommended to also set + the viewportMargin + option to Infinity when doing this.
+ +
CodeMirror-focused
+
Whenever the editor is focused, the top element gets this + class. This is used to hide the cursor and give the selection a + different color when the editor is not focused.
+ +
CodeMirror-gutters
+
This is the backdrop for all gutters. Use it to set the + default gutter background color, and optionally add a border on + the right of the gutters.
+ +
CodeMirror-linenumbers
+
Use this for giving a background or width to the line number + gutter.
+ +
CodeMirror-linenumber
+
Used to style the actual individual line numbers. These + won't be children of the CodeMirror-linenumbers + (plural) element, but rather will be absolutely positioned to + overlay it. Use this to set alignment and text properties for + the line numbers.
+ +
CodeMirror-lines
+
The visible lines. This is where you specify vertical + padding for the editor content.
+ +
CodeMirror-cursor
+
The cursor is a block element that is absolutely positioned. + You can make it look whichever way you want.
+ +
CodeMirror-selected
+
The selection is represented by span elements + with this class.
+ +
CodeMirror-matchingbracket, + CodeMirror-nonmatchingbracket
+
These are used to style matched (or unmatched) brackets.
+
+ +

If your page's style sheets do funky things to + all div or pre elements (you probably + shouldn't do that), you'll have to define rules to cancel these + effects out again for elements under the CodeMirror + class.

+ +

Themes are also simply CSS files, which define colors for + various syntactic elements. See the files in + the theme directory.

+
+ +
+

Programming API

+ +

A lot of CodeMirror features are only available through its + API. Thus, you need to write code (or + use addons) if you want to expose them to + your users.

+ +

Whenever points in the document are represented, the API uses + objects with line and ch properties. + Both are zero-based. CodeMirror makes sure to 'clip' any positions + passed by client code so that they fit inside the document, so you + shouldn't worry too much about sanitizing your coordinates. If you + give ch a value of null, or don't + specify it, it will be replaced with the length of the specified + line. Such positions may also have a sticky property + holding "before" or "after", whether the + position is associated with the character before or after it. This + influences, for example, where the cursor is drawn on a + line-break or bidi-direction boundary.

+ +

Methods prefixed with doc. can, unless otherwise + specified, be called both on CodeMirror (editor) + instances and CodeMirror.Doc instances. Methods + prefixed with cm. are only available + on CodeMirror instances.

+ +

Constructor

+ +

Constructing an editor instance is done with + the CodeMirror(place: Element|fn(Element), + ?option: object) constructor. If the place + argument is a DOM element, the editor will be appended to it. If + it is a function, it will be called, and is expected to place the + editor into the document. options may be an element + mapping option names to values. The options + that it doesn't explicitly specify (or all options, if it is not + passed) will be taken + from CodeMirror.defaults.

+ +

Note that the options object passed to the constructor will be + mutated when the instance's options + are changed, so you shouldn't share such + objects between instances.

+ +

See CodeMirror.fromTextArea + for another way to construct an editor instance.

+ +

Content manipulation methods

+ +
+
doc.getValue(?separator: string) → string
+
Get the current editor content. You can pass it an optional + argument to specify the string to be used to separate lines + (defaults to "\n").
+
doc.setValue(content: string)
+
Set the editor content.
+ +
doc.getRange(from: {line, ch}, to: {line, ch}, ?separator: string) → string
+
Get the text between the given points in the editor, which + should be {line, ch} objects. An optional third + argument can be given to indicate the line separator string to + use (defaults to "\n").
+
doc.replaceRange(replacement: string, from: {line, ch}, to: {line, ch}, ?origin: string)
+
Replace the part of the document between from + and to with the given string. from + and to must be {line, ch} + objects. to can be left off to simply insert the + string at position from. When origin + is given, it will be passed on + to "change" events, and + its first letter will be used to determine whether this change + can be merged with previous history events, in the way described + for selection origins.
+ +
doc.getLine(n: integer) → string
+
Get the content of line n.
+ +
doc.lineCount() → integer
+
Get the number of lines in the editor.
+
doc.firstLine() → integer
+
Get the number of first line in the editor. This will + usually be zero but for linked sub-views, + or documents instantiated with a non-zero + first line, it might return other values.
+
doc.lastLine() → integer
+
Get the number of last line in the editor. This will + usually be doc.lineCount() - 1, + but for linked sub-views, + it might return other values.
+ +
doc.getLineHandle(num: integer) → LineHandle
+
Fetches the line handle for the given line number.
+
doc.getLineNumber(handle: LineHandle) → integer
+
Given a line handle, returns the current position of that + line (or null when it is no longer in the + document).
+
doc.eachLine(f: (line: LineHandle))
+
doc.eachLine(start: integer, end: integer, f: (line: LineHandle))
+
Iterate over the whole document, or if start + and end line numbers are given, the range + from start up to (not including) end, + and call f for each line, passing the line handle. + eachLine stops iterating if f returns + truthy value. + This is a faster way to visit a range of line handlers than + calling getLineHandle + for each of them. Note that line handles have + a text property containing the line's content (as a + string).
+ +
doc.markClean()
+
Set the editor content as 'clean', a flag that it will + retain until it is edited, and which will be set again when such + an edit is undone again. Useful to track whether the content + needs to be saved. This function is deprecated in favor + of changeGeneration, + which allows multiple subsystems to track different notions of + cleanness without interfering.
+
doc.changeGeneration(?closeEvent: boolean) → integer
+
Returns a number that can later be passed + to isClean to test whether + any edits were made (and not undone) in the meantime. + If closeEvent is true, the current history event + will be ‘closed’, meaning it can't be combined with further + changes (rapid typing or deleting events are typically + combined).
+
doc.isClean(?generation: integer) → boolean
+
Returns whether the document is currently clean — not + modified since initialization or the last call + to markClean if no + argument is passed, or since the matching call + to changeGeneration + if a generation value is given.
+
+ +

Cursor and selection methods

+ +
+
doc.getSelection(?lineSep: string) → string
+
Get the currently selected code. Optionally pass a line + separator to put between the lines in the output. When multiple + selections are present, they are concatenated with instances + of lineSep in between.
+
doc.getSelections(?lineSep: string) → array<string>
+
Returns an array containing a string for each selection, + representing the content of the selections.
+ +
doc.replaceSelection(replacement: string, ?select: string)
+
Replace the selection(s) with the given string. By default, + the new selection ends up after the inserted text. The + optional select argument can be used to change + this—passing "around" will cause the new text to be + selected, passing "start" will collapse the + selection to the start of the inserted text.
+
doc.replaceSelections(replacements: array<string>, ?select: string)
+
The length of the given array should be the same as the + number of active selections. Replaces the content of the + selections with the strings in the array. + The select argument works the same as + in replaceSelection.
+ +
doc.getCursor(?start: string) → {line, ch}
+
Retrieve one end of the primary + selection. start is an optional string indicating + which end of the selection to return. It may + be "from", "to", "head" + (the side of the selection that moves when you press + shift+arrow), or "anchor" (the fixed side of the + selection). Omitting the argument is the same as + passing "head". A {line, ch} object + will be returned.
+
doc.listSelections() → array<{anchor, head}>
+
Retrieves a list of all current selections. These will + always be sorted, and never overlap (overlapping selections are + merged). Each object in the array contains anchor + and head properties referring to {line, + ch} objects.
+ +
doc.somethingSelected() → boolean
+
Return true if any text is selected.
+
doc.setCursor(pos: {line, ch}|number, ?ch: number, ?options: object)
+
Set the cursor position. You can either pass a + single {line, ch} object, or the line and the + character as two separate parameters. Will replace all + selections with a single, empty selection at the given position. + The supported options are the same as for setSelection.
+ +
doc.setSelection(anchor: {line, ch}, ?head: {line, ch}, ?options: object)
+
Set a single selection range. anchor + and head should be {line, ch} + objects. head defaults to anchor when + not given. These options are supported: +
+
scroll: boolean
+
Determines whether the selection head should be scrolled + into view. Defaults to true.
+
origin: string
+
Determines whether the selection history event may be + merged with the previous one. When an origin starts with the + character +, and the last recorded selection had + the same origin and was similar (close + in time, both + collapsed or both non-collapsed), the new one will replace the + old one. When it starts with *, it will always + replace the previous event (if that had the same origin). + Built-in motion uses the "+move" origin. User input uses the "+input" origin.
+
bias: number
+
Determine the direction into which the selection endpoints + should be adjusted when they fall inside + an atomic range. Can be either -1 + (backward) or 1 (forward). When not given, the bias will be + based on the relative position of the old selection—the editor + will try to move further away from that, to prevent getting + stuck.
+
+ +
doc.setSelections(ranges: array<{anchor, ?head}>, ?primary: integer, ?options: object)
+
Sets a new set of selections. There must be at least one + selection in the given array. When primary is a + number, it determines which selection is the primary one. When + it is not given, the primary index is taken from the previous + selection, or set to the last range if the previous selection + had less ranges than the new one. Supports the same options + as setSelection. + head defaults to anchor when not given.
+
doc.addSelection(anchor: {line, ch}, ?head: {line, ch})
+
Adds a new selection to the existing set of selections, and + makes it the primary selection.
+ +
doc.extendSelection(from: {line, ch}, ?to: {line, ch}, ?options: object)
+
Similar + to setSelection, but + will, if shift is held or + the extending flag is set, move the + head of the selection while leaving the anchor at its current + place. to is optional, and can be passed to ensure + a region (for example a word or paragraph) will end up selected + (in addition to whatever lies between that region and the + current anchor). When multiple selections are present, all but + the primary selection will be dropped by this method. + Supports the same options as setSelection.
+
doc.extendSelections(heads: array<{line, ch}>, ?options: object)
+
An equivalent + of extendSelection + that acts on all selections at once.
+
doc.extendSelectionsBy(f: function(range: {anchor, head}) → {line, ch}), ?options: object)
+
Applies the given function to all existing selections, and + calls extendSelections + on the result.
+
doc.setExtending(value: boolean)
+
Sets or clears the 'extending' flag, which acts similar to + the shift key, in that it will cause cursor movement and calls + to extendSelection + to leave the selection anchor in place.
+
doc.getExtending() → boolean
+
Get the value of the 'extending' flag.
+ +
cm.hasFocus() → boolean
+
Tells you whether the editor currently has focus.
+ +
cm.findPosH(start: {line, ch}, amount: integer, unit: string, visually: boolean) → {line, ch, ?hitSide: boolean}
+
Used to find the target position for horizontal cursor + motion. start is a {line, ch} + object, amount an integer (may be negative), + and unit one of the + string "char", "column", + or "word". Will return a position that is produced + by moving amount times the distance specified + by unit. When visually is true, motion + in right-to-left text will be visual rather than logical. When + the motion was clipped by hitting the end or start of the + document, the returned value will have a hitSide + property set to true.
+
cm.findPosV(start: {line, ch}, amount: integer, unit: string) → {line, ch, ?hitSide: boolean}
+
Similar to findPosH, + but used for vertical motion. unit may + be "line" or "page". The other + arguments and the returned value have the same interpretation as + they have in findPosH.
+ +
cm.findWordAt(pos: {line, ch}) → {anchor: {line, ch}, head: {line, ch}}
+
Returns the start and end of the 'word' (the stretch of + letters, whitespace, or punctuation) at the given position.
+
+ +

Configuration methods

+ +
+
cm.setOption(option: string, value: any)
+
Change the configuration of the editor. option + should the name of an option, + and value should be a valid value for that + option.
+
cm.getOption(option: string) → any
+
Retrieves the current value of the given option for this + editor instance.
+ +
cm.addKeyMap(map: object, bottom: boolean)
+
Attach an additional key map to the + editor. This is mostly useful for addons that need to register + some key handlers without trampling on + the extraKeys + option. Maps added in this way have a higher precedence than + the extraKeys + and keyMap options, + and between them, the maps added earlier have a lower precedence + than those added later, unless the bottom argument + was passed, in which case they end up below other key maps added + with this method.
+
cm.removeKeyMap(map: object)
+
Disable a keymap added + with addKeyMap. Either + pass in the key map object itself, or a string, which will be + compared against the name property of the active + key maps.
+ +
cm.addOverlay(mode: string|object, ?options: object)
+
Enable a highlighting overlay. This is a stateless mini-mode + that can be used to add extra highlighting. For example, + the search addon uses it to + highlight the term that's currently being + searched. mode can be a mode + spec or a mode object (an object with + a token method). + The options parameter is optional. If given, it + should be an object, optionally containing the following options: +
+
opaque: bool
+
Defaults to off, but can be given to allow the overlay + styling, when not null, to override the styling of + the base mode entirely, instead of the two being applied + together.
+
priority: number
+
Determines the ordering in which the overlays are + applied. Those with high priority are applied after those + with lower priority, and able to override the opaqueness of + the ones that come before. Defaults to 0.
+
+
+ +
cm.removeOverlay(mode: string|object)
+
Pass this the exact value passed for the mode + parameter to addOverlay, + or a string that corresponds to the name property of + that value, to remove an overlay again.
+ +
cm.on(type: string, func: (...args))
+
Register an event handler for the given event type (a + string) on the editor instance. There is also + a CodeMirror.on(object, type, func) version + that allows registering of events on any object.
+
cm.off(type: string, func: (...args))
+
Remove an event handler on the editor instance. An + equivalent CodeMirror.off(object, type, + func) also exists.
+
+ +

Document management methods

+ +

Each editor is associated with an instance + of CodeMirror.Doc, its document. A document + represents the editor content, plus a selection, an undo history, + and a mode. A document can only be + associated with a single editor at a time. You can create new + documents by calling the CodeMirror.Doc(text: string, mode: + Object, firstLineNumber: ?number, lineSeparator: ?string) + constructor. The last three arguments are optional and can be used + to set a mode for the document, make it start at a line number + other than 0, and set a specific line separator respectively.

+ +
+
cm.getDoc() → Doc
+
Retrieve the currently active document from an editor.
+
doc.getEditor() → CodeMirror
+
Retrieve the editor associated with a document. May + return null.
+ +
cm.swapDoc(doc: CodeMirror.Doc) → Doc
+
Attach a new document to the editor. Returns the old + document, which is now no longer associated with an editor.
+ +
doc.copy(copyHistory: boolean) → Doc
+
Create an identical copy of the given doc. + When copyHistory is true, the history will also be + copied. Can not be called directly on an editor.
+ +
doc.linkedDoc(options: object) → Doc
+
Create a new document that's linked to the target document. + Linked documents will stay in sync (changes to one are also + applied to the other) until unlinked. + These are the options that are supported: +
+
sharedHist: boolean
+
When turned on, the linked copy will share an undo + history with the original. Thus, something done in one of + the two can be undone in the other, and vice versa.
+
from: integer
+
to: integer
+
Can be given to make the new document a subview of the + original. Subviews only show a given range of lines. Note + that line coordinates inside the subview will be consistent + with those of the parent, so that for example a subview + starting at line 10 will refer to its first line as line 10, + not 0.
+
mode: string|object
+
By default, the new document inherits the mode of the + parent. This option can be set to + a mode spec to give it a + different mode.
+
+
doc.unlinkDoc(doc: CodeMirror.Doc)
+
Break the link between two documents. After calling this, + changes will no longer propagate between the documents, and, if + they had a shared history, the history will become + separate.
+
doc.iterLinkedDocs(function: (doc: CodeMirror.Doc, sharedHist: boolean))
+
Will call the given function for all documents linked to the + target document. It will be passed two arguments, the linked document + and a boolean indicating whether that document shares history + with the target.
+
+ +

History-related methods

+ +
+
doc.undo()
+
Undo one edit (if any undo events are stored).
+
doc.redo()
+
Redo one undone edit.
+ +
doc.undoSelection()
+
Undo one edit or selection change.
+
doc.redoSelection()
+
Redo one undone edit or selection change.
+ +
doc.historySize() → {undo: integer, redo: integer}
+
Returns an object with {undo, redo} properties, + both of which hold integers, indicating the amount of stored + undo and redo operations.
+
doc.clearHistory()
+
Clears the editor's undo history.
+
doc.getHistory() → object
+
Get a (JSON-serializable) representation of the undo history.
+
doc.setHistory(history: object)
+
Replace the editor's undo history with the one provided, + which must be a value as returned + by getHistory. Note that + this will have entirely undefined results if the editor content + isn't also the same as it was when getHistory was + called.
+
+ +

Text-marking methods

+ +
+
doc.markText(from: {line, ch}, to: {line, ch}, ?options: object) → TextMarker
+
Can be used to mark a range of text with a specific CSS + class name. from and to should + be {line, ch} objects. The options + parameter is optional. When given, it should be an object that + may contain the following configuration options: +
+
className: string
+
Assigns a CSS class to the marked stretch of text.
+
inclusiveLeft: boolean
+
Determines whether + text inserted on the left of the marker will end up inside + or outside of it.
+
inclusiveRight: boolean
+
Like inclusiveLeft, + but for the right side.
+
selectLeft: boolean
+
For atomic ranges, determines whether the cursor is allowed + to be placed directly to the left of the range. Has no effect on + non-atomic ranges.
+
selectRight: boolean
+
Like selectLeft, + but for the right side.
+
atomic: boolean
+
Atomic ranges act as a single unit when cursor movement is + concerned—i.e. it is impossible to place the cursor inside of + them. You can control whether the cursor is allowed to be placed + directly before or after them using selectLeft + or selectRight. If selectLeft + (or right) is not provided, then inclusiveLeft (or + right) will control this behavior.
+
collapsed: boolean
+
Collapsed ranges do not show up in the display. Setting a + range to be collapsed will automatically make it atomic.
+
clearOnEnter: boolean
+
When enabled, will cause the mark to clear itself whenever + the cursor enters its range. This is mostly useful for + text-replacement widgets that need to 'snap open' when the + user tries to edit them. The + "clear" event + fired on the range handle can be used to be notified when this + happens.
+
clearWhenEmpty: boolean
+
Determines whether the mark is automatically cleared when + it becomes empty. Default is true.
+
replacedWith: Element
+
Use a given node to display this range. Implies both + collapsed and atomic. The given DOM node must be an + inline element (as opposed to a block element).
+
handleMouseEvents: boolean
+
When replacedWith is given, this determines + whether the editor will capture mouse and drag events + occurring in this widget. Default is false—the events will be + left alone for the default browser handler, or specific + handlers on the widget, to capture.
+
readOnly: boolean
+
A read-only span can, as long as it is not cleared, not be + modified except by + calling setValue to reset + the whole document. Note: adding a read-only span + currently clears the undo history of the editor, because + existing undo events being partially nullified by read-only + spans would corrupt the history (in the current + implementation).
+
addToHistory: boolean
+
When set to true (default is false), adding this marker + will create an event in the undo history that can be + individually undone (clearing the marker).
+
startStyle: string
Can be used to specify + an extra CSS class to be applied to the leftmost span that + is part of the marker.
+
endStyle: string
Equivalent + to startStyle, but for the rightmost span.
+
css: string
+
A string of CSS to be applied to the covered text. For example "color: #fe3".
+
attributes: object
+
When given, add the attributes in the given object to the + elements created for the marked text. Adding class or + style attributes this way is not supported.
+
shared: boolean
When the + target document is linked to other + documents, you can set shared to true to make the + marker appear in all documents. By default, a marker appears + only in its target document.
+
+ The method will return an object that represents the marker + (with constructor CodeMirror.TextMarker), which + exposes three methods: + clear(), to remove the mark, + find(), which returns + a {from, to} object (both holding document + positions), indicating the current position of the marked range, + or undefined if the marker is no longer in the + document, and finally changed(), + which you can call if you've done something that might change + the size of the marker (for example changing the content of + a replacedWith + node), and want to cheaply update the display.
+ +
doc.setBookmark(pos: {line, ch}, ?options: object) → TextMarker
+
Inserts a bookmark, a handle that follows the text around it + as it is being edited, at the given position. A bookmark has two + methods find() and clear(). The first + returns the current position of the bookmark, if it is still in + the document, and the second explicitly removes the bookmark. + The options argument is optional. If given, the following + properties are recognized: +
+
widget: Element
Can be used to display a DOM + node at the current location of the bookmark (analogous to + the replacedWith + option to markText).
+
insertLeft: boolean
By default, text typed + when the cursor is on top of the bookmark will end up to the + right of the bookmark. Set this option to true to make it go + to the left instead.
+
shared: boolean
See + the corresponding option + to markText.
+
handleMouseEvents: boolean
+
As with markText, + this determines whether mouse events on the widget inserted + for this bookmark are handled by CodeMirror. The default is + false.
+
+ +
doc.findMarks(from: {line, ch}, to: {line, ch}) → array<TextMarker>
+
Returns an array of all the bookmarks and marked ranges + found between the given positions (non-inclusive).
+
doc.findMarksAt(pos: {line, ch}) → array<TextMarker>
+
Returns an array of all the bookmarks and marked ranges + present at the given position.
+
doc.getAllMarks() → array<TextMarker>
+
Returns an array containing all marked ranges in the document.
+
+ +

Widget, gutter, and decoration methods

+ +
+
doc.setGutterMarker(line: integer|LineHandle, gutterID: string, value: Element) → LineHandle
+
Sets the gutter marker for the given gutter (identified by + its CSS class, see + the gutters option) + to the given value. Value can be either null, to + clear the marker, or a DOM element, to set it. The DOM element + will be shown in the specified gutter next to the specified + line.
+ +
doc.clearGutter(gutterID: string)
+
Remove all gutter markers in + the gutter with the given ID.
+ +
doc.addLineClass(line: integer|LineHandle, where: string, class: string) → LineHandle
+
Set a CSS class name for the given line. line + can be a number or a line handle. where determines + to which element this class should be applied, can be one + of "text" (the text element, which lies in front of + the selection), "background" (a background element + that will be behind the selection), "gutter" (the + line's gutter space), or "wrap" (the wrapper node + that wraps all of the line's elements, including gutter + elements). class should be the name of the class to + apply.
+ +
doc.removeLineClass(line: integer|LineHandle, where: string, class: string) → LineHandle
+
Remove a CSS class from a line. line can be a + line handle or number. where should be one + of "text", "background", + or "wrap" + (see addLineClass). class + can be left off to remove all classes for the specified node, or + be a string to remove only a specific class.
+ +
doc.lineInfo(line: integer|LineHandle) → object
+
Returns the line number, text content, and marker status of + the given line, which can be either a number or a line handle. + The returned object has the structure {line, handle, text, + gutterMarkers, textClass, bgClass, wrapClass, widgets}, + where gutterMarkers is an object mapping gutter IDs + to marker elements, and widgets is an array + of line widgets attached to this + line, and the various class properties refer to classes added + with addLineClass.
+ +
cm.addWidget(pos: {line, ch}, node: Element, scrollIntoView: boolean)
+
Puts node, which should be an absolutely + positioned DOM node, into the editor, positioned right below the + given {line, ch} position. + When scrollIntoView is true, the editor will ensure + that the entire node is visible (if possible). To remove the + widget again, simply use DOM methods (move it somewhere else, or + call removeChild on its parent).
+ +
doc.addLineWidget(line: integer|LineHandle, node: Element, ?options: object) → LineWidget
+
Adds a line widget, an element shown below a line, spanning + the whole of the editor's width, and moving the lines below it + downwards. line should be either an integer or a + line handle, and node should be a DOM node, which + will be displayed below the given line. options, + when given, should be an object that configures the behavior of + the widget. The following options are supported (all default to + false): +
+
coverGutter: boolean
+
Whether the widget should cover the gutter.
+
noHScroll: boolean
+
Whether the widget should stay fixed in the face of + horizontal scrolling.
+
above: boolean
+
Causes the widget to be placed above instead of below + the text of the line.
+
handleMouseEvents: boolean
+
Determines whether the editor will capture mouse and + drag events occurring in this widget. Default is false—the + events will be left alone for the default browser handler, + or specific handlers on the widget, to capture.
+
insertAt: integer
+
By default, the widget is added below other widgets for + the line. This option can be used to place it at a different + position (zero for the top, N to put it after the Nth other + widget). Note that this only has effect once, when the + widget is created. +
className: string
+
Add an extra CSS class name to the wrapper element + created for the widget.
+
+ Note that the widget node will become a descendant of nodes with + CodeMirror-specific CSS classes, and those classes might in some + cases affect it. This method returns an object that represents + the widget placement. It'll have a line property + pointing at the line handle that it is associated with, and the following methods: +
+
clear()
Removes the widget.
+
changed()
Call + this if you made some change to the widget's DOM node that + might affect its height. It'll force CodeMirror to update + the height of the line that contains the widget.
+
+
+
+ +

Sizing, scrolling and positioning methods

+ +
+
cm.setSize(width: number|string, height: number|string)
+
Programmatically set the size of the editor (overriding the + applicable CSS + rules). width and height + can be either numbers (interpreted as pixels) or CSS units + ("100%", for example). You can + pass null for either of them to indicate that that + dimension should not be changed.
+ +
cm.scrollTo(x: number, y: number)
+
Scroll the editor to a given (pixel) position. Both + arguments may be left as null + or undefined to have no effect.
+
cm.getScrollInfo() → {left, top, width, height, clientWidth, clientHeight}
+
Get an {left, top, width, height, clientWidth, + clientHeight} object that represents the current scroll + position, the size of the scrollable area, and the size of the + visible area (minus scrollbars).
+
cm.scrollIntoView(what: {line, ch}|{left, top, right, bottom}|{from, to}|null, ?margin: number)
+
Scrolls the given position into view. what may + be null to scroll the cursor into view, + a {line, ch} position to scroll a character into + view, a {left, top, right, bottom} pixel range (in + editor-local coordinates), or a range {from, to} + containing either two character positions or two pixel squares. + The margin parameter is optional. When given, it + indicates the amount of vertical pixels around the given area + that should be made visible as well.
+ +
cm.cursorCoords(where: boolean|{line, ch}, mode: string) → {left, top, bottom}
+
Returns an {left, top, bottom} object + containing the coordinates of the cursor position. + If mode is "local", they will be + relative to the top-left corner of the editable document. If it + is "page" or not given, they are relative to the + top-left corner of the page. If mode + is "window", the coordinates are relative to the + top-left corner of the currently visible (scrolled) + window. where can be a boolean indicating whether + you want the start (true) or the end + (false) of the selection, or, if a {line, + ch} object is given, it specifies the precise position at + which you want to measure.
+
cm.charCoords(pos: {line, ch}, ?mode: string) → {left, right, top, bottom}
+
Returns the position and dimensions of an arbitrary + character. pos should be a {line, ch} + object. This differs from cursorCoords in that + it'll give the size of the whole character, rather than just the + position that the cursor would have when it would sit at that + position.
+
cm.coordsChar(object: {left, top}, ?mode: string) → {line, ch}
+
Given an {left, top} object (e.g. coordinates of a mouse event) returns + the {line, ch} position that corresponds to it. The + optional mode parameter determines relative to what + the coordinates are interpreted. It may + be "window", "page" (the default), + or "local".
+
cm.lineAtHeight(height: number, ?mode: string) → number
+
Computes the line at the given pixel + height. mode can be one of the same strings + that coordsChar + accepts.
+
cm.heightAtLine(line: integer|LineHandle, ?mode: string, ?includeWidgets: bool) → number
+
Computes the height of the top of a line, in the coordinate + system specified by mode + (see coordsChar), which + defaults to "page". When a line below the bottom of + the document is specified, the returned value is the bottom of + the last line in the document. By default, the position of the + actual text is returned. If `includeWidgets` is true and the + line has line widgets, the position above the first line widget + is returned.
+
cm.defaultTextHeight() → number
+
Returns the line height of the default font for the editor.
+
cm.defaultCharWidth() → number
+
Returns the pixel width of an 'x' in the default font for + the editor. (Note that for non-monospace fonts, this is mostly + useless, and even for monospace fonts, non-ascii characters + might have a different width).
+ +
cm.getViewport() → {from: number, to: number}
+
Returns a {from, to} object indicating the + start (inclusive) and end (exclusive) of the currently rendered + part of the document. In big documents, when most content is + scrolled out of view, CodeMirror will only render the visible + part, and a margin around it. See also + the viewportChange + event.
+ +
cm.refresh()
+
If your code does something to change the size of the editor + element (window resizes are already listened for), or unhides + it, you should probably follow up by calling this method to + ensure CodeMirror is still looking as intended. See also + the autorefresh addon.
+
+ +

Mode, state, and token-related methods

+ +

When writing language-aware functionality, it can often be + useful to hook into the knowledge that the CodeMirror language + mode has. See the section on modes for a + more detailed description of how these work.

+ +
+
doc.getMode() → object
+
Gets the (outer) mode object for the editor. Note that this + is distinct from getOption("mode"), which gives you + the mode specification, rather than the resolved, instantiated + mode object.
+ +
cm.getModeAt(pos: {line, ch}) → object
+
Gets the inner mode at a given position. This will return + the same as getMode for + simple modes, but will return an inner mode for nesting modes + (such as htmlmixed).
+ +
cm.getTokenAt(pos: {line, ch}, ?precise: boolean) → object
+
Retrieves information about the token the current mode found + before the given position (a {line, ch} object). The + returned object has the following properties: +
+
start
The character (on the given line) at which the token starts.
+
end
The character at which the token ends.
+
string
The token's string.
+
type
The token type the mode assigned + to the token, such as "keyword" + or "comment" (may also be null).
+
state
The mode's state at the end of this token.
+
+ If precise is true, the token will be guaranteed to be accurate based on recent edits. If false or + not specified, the token will use cached state information, which will be faster but might not be accurate if + edits were recently made and highlighting has not yet completed. +
+ +
cm.getLineTokens(line: integer, ?precise: boolean) → array<{start, end, string, type, state}>
+
This is similar + to getTokenAt, but + collects all tokens for a given line into an array. It is much + cheaper than repeatedly calling getTokenAt, which + re-parses the part of the line before the token for every call.
+ +
cm.getTokenTypeAt(pos: {line, ch}) → string
+
This is a (much) cheaper version + of getTokenAt useful for + when you just need the type of the token at a given position, + and no other information. Will return null for + unstyled tokens, and a string, potentially containing multiple + space-separated style names, otherwise.
+ +
cm.getHelpers(pos: {line, ch}, type: string) → array<helper>
+
Fetch the set of applicable helper values for the given + position. Helpers provide a way to look up functionality + appropriate for a mode. The type argument provides + the helper namespace (see + registerHelper), in + which the values will be looked up. When the mode itself has a + property that corresponds to the type, that + directly determines the keys that are used to look up the helper + values (it may be either a single string, or an array of + strings). Failing that, the mode's helperType + property and finally the mode's name are used.
+
For example, the JavaScript mode has a + property fold containing "brace". When + the brace-fold addon is loaded, that defines a + helper named brace in the fold + namespace. This is then used by + the foldcode addon to + figure out that it can use that folding function to fold + JavaScript code.
+
When any 'global' + helpers are defined for the given namespace, their predicates + are called on the current mode and editor, and all those that + declare they are applicable will also be added to the array that + is returned.
+ +
cm.getHelper(pos: {line, ch}, type: string) → helper
+
Returns the first applicable helper value. + See getHelpers.
+ +
cm.getStateAfter(?line: integer, ?precise: boolean) → object
+
Returns the mode's parser state, if any, at the end of the + given line number. If no line number is given, the state at the + end of the document is returned. This can be useful for storing + parsing errors in the state, or getting other kinds of + contextual information for a line. precise is defined + as in getTokenAt().
+
+ +

Miscellaneous methods

+ +
+
cm.operation(func: () → any) → any
+
CodeMirror internally buffers changes and only updates its + DOM structure after it has finished performing some operation. + If you need to perform a lot of operations on a CodeMirror + instance, you can call this method with a function argument. It + will call the function, buffering up all changes, and only doing + the expensive update after the function returns. This can be a + lot faster. The return value from this method will be the return + value of your function.
+ +
cm.startOperation()
+
cm.endOperation()
+
In normal circumstances, use the above operation + method. But if you want to buffer operations happening asynchronously, + or that can't all be wrapped in a callback function, you can + call startOperation to tell CodeMirror to start + buffering changes, and endOperation to actually + render all the updates. Be careful: if you use this + API and forget to call endOperation, the editor will + just never update.
+ +
cm.indentLine(line: integer, ?dir: string|integer)
+
Adjust the indentation of the given line. The second + argument (which defaults to "smart") may be one of: +
+
"prev"
+
Base indentation on the indentation of the previous line.
+
"smart"
+
Use the mode's smart indentation if available, behave + like "prev" otherwise.
+
"add"
+
Increase the indentation of the line by + one indent unit.
+
"subtract"
+
Reduce the indentation of the line.
+
<integer>
+
Add (positive number) or reduce (negative number) the + indentation by the given amount of spaces.
+
+ +
cm.toggleOverwrite(?value: boolean)
+
Switches between overwrite and normal insert mode (when not + given an argument), or sets the overwrite mode to a specific + state (when given an argument).
+ +
cm.isReadOnly() → boolean
+
Tells you whether the editor's content can be edited by the + user.
+ +
doc.lineSeparator()
+
Returns the preferred line separator string for this + document, as per the option + by the same name. When that option is null, the + string "\n" is returned.
+ +
cm.execCommand(name: string)
+
Runs the command with the given name on the editor.
+ +
doc.posFromIndex(index: integer) → {line, ch}
+
Calculates and returns a {line, ch} object for a + zero-based index who's value is relative to the start of the + editor's text. If the index is out of range of the text then + the returned object is clipped to start or end of the text + respectively.
+
doc.indexFromPos(object: {line, ch}) → integer
+
The reverse of posFromIndex.
+ +
cm.focus()
+
Give the editor focus.
+ +
cm.phrase(text: string) → string
+
Allow the given string to be translated with + the phrases + option.
+ +
cm.getInputField() → Element
+
Returns the input field for the editor. Will be a textarea + or an editable div, depending on the value of + the inputStyle + option.
+
cm.getWrapperElement() → Element
+
Returns the DOM node that represents the editor, and + controls its size. Remove this from your tree to delete an + editor instance.
+
cm.getScrollerElement() → Element
+
Returns the DOM node that is responsible for the scrolling + of the editor.
+
cm.getGutterElement() → Element
+
Fetches the DOM node that contains the editor gutters.
+
+ +

Static properties

+

The CodeMirror object itself provides + several useful properties.

+ +
+
CodeMirror.version: string
+
It contains a string that indicates the version of the + library. This is a triple of + integers "major.minor.patch", + where patch is zero for releases, and something + else (usually one) for dev snapshots.
+ +
CodeMirror.fromTextArea(textArea: TextAreaElement, ?config: object)
+
This method provides another way to initialize an editor. It + takes a textarea DOM node as first argument and an optional + configuration object as second. It will replace the textarea + with a CodeMirror instance, and wire up the form of that + textarea (if any) to make sure the editor contents are put into + the textarea when the form is submitted. The text in the + textarea will provide the content for the editor. A CodeMirror + instance created this way has three additional methods: +
+
cm.save()
+
Copy the content of the editor into the textarea.
+ +
cm.toTextArea()
+
Remove the editor, and restore the original textarea (with + the editor's current content). If you dynamically create and + destroy editors made with `fromTextArea`, without destroying + the form they are part of, you should make sure to call + `toTextArea` to remove the editor, or its `"submit"` handler + on the form will cause a memory leak.
+ +
cm.getTextArea() → TextAreaElement
+
Returns the textarea that the instance was based on.
+
+
+ +
CodeMirror.defaults: object
+
An object containing default values for + all options. You can assign to its + properties to modify defaults (though this won't affect editors + that have already been created).
+ +
CodeMirror.defineExtension(name: string, value: any)
+
If you want to define extra methods in terms of the + CodeMirror API, it is possible to + use defineExtension. This will cause the given + value (usually a method) to be added to all CodeMirror instances + created from then on.
+ +
CodeMirror.defineDocExtension(name: string, value: any)
+
Like defineExtension, + but the method will be added to the interface + for Doc objects instead.
+ +
CodeMirror.defineOption(name: string, + default: any, updateFunc: function)
+
Similarly, defineOption can be used to define new options for + CodeMirror. The updateFunc will be called with the + editor instance and the new value when an editor is initialized, + and whenever the option is modified + through setOption.
+ +
CodeMirror.defineInitHook(func: function)
+
If your extension just needs to run some + code whenever a CodeMirror instance is initialized, + use CodeMirror.defineInitHook. Give it a function as + its only argument, and from then on, that function will be called + (with the instance as argument) whenever a new CodeMirror instance + is initialized.
+ +
CodeMirror.registerHelper(type: string, name: string, value: helper)
+
Registers a helper value with the given name in + the given namespace (type). This is used to define + functionality that may be looked up by mode. Will create (if it + doesn't already exist) a property on the CodeMirror + object for the given type, pointing to an object + that maps names to values. I.e. after + doing CodeMirror.registerHelper("hint", "foo", + myFoo), the value CodeMirror.hint.foo will + point to myFoo.
+ +
CodeMirror.registerGlobalHelper(type: string, name: string, predicate: fn(mode, CodeMirror), value: helper)
+
Acts + like registerHelper, + but also registers this helper as 'global', meaning that it will + be included by getHelpers + whenever the given predicate returns true when + called with the local mode and editor.
+ +
CodeMirror.Pos(line: integer, ?ch: integer, ?sticky: string)
+
A constructor for the objects that are used to represent + positions in editor documents. sticky defaults to + null, but can be set to "before" + or "after" to make the position explicitly + associate with the character before or after it.
+ +
CodeMirror.changeEnd(change: object) → {line, ch}
+
Utility function that computes an end position from a change + (an object with from, to, + and text properties, as passed to + various event handlers). The + returned position will be the end of the changed + range, after the change is applied.
+ +
CodeMirror.countColumn(line: string, index: number, tabSize: number) → number
+
Find the column position at a given string index using a given tabsize.
+
+
+ +
+

Addons

+ +

The addon directory in the distribution contains a + number of reusable components that implement extra editor + functionality (on top of extension functions + like defineOption, defineExtension, + and registerHelper). In + brief, they are:

+ +
+
dialog/dialog.js
+
Provides a very simple way to query users for text input. + Adds the openDialog(template, callback, options) → + closeFunction method to CodeMirror instances, + which can be called with an HTML fragment or a detached DOM + node that provides the prompt (should include an input + or button tag), and a callback function that is called + when the user presses enter. It returns a function closeFunction + which, if called, will close the dialog immediately. + openDialog takes the following options: +
+
closeOnEnter: bool
+
If true, the dialog will be closed when the user presses + enter in the input. Defaults to true.
+
closeOnBlur: bool
+
Determines whether the dialog is closed when it loses focus. Defaults to true.
+
onKeyDown: fn(event: KeyboardEvent, value: string, close: fn()) → bool
+
An event handler that will be called whenever keydown fires in the + dialog's input. If your callback returns true, + the dialog will not do any further processing of the event.
+
onKeyUp: fn(event: KeyboardEvent, value: string, close: fn()) → bool
+
Same as onKeyDown but for the + keyup event.
+
onInput: fn(event: InputEvent, value: string, close: fn()) → bool
+
Same as onKeyDown but for the + input event.
+
onClose: fn(instance):
+
A callback that will be called after the dialog has been closed and + removed from the DOM. No return value.
+
+ +

Also adds an openNotification(template, options) → + closeFunction function that simply shows an HTML + fragment as a notification at the top of the editor. It takes a + single option: duration, the amount of time after + which the notification will be automatically closed. If + duration is zero, the dialog will not be closed automatically.

+ +

Depends on addon/dialog/dialog.css.

+ +
search/searchcursor.js
+
Adds the getSearchCursor(query, start, options) → + cursor method to CodeMirror instances, which can be used + to implement search/replace functionality. query + can be a regular expression or a string. start + provides the starting position of the search. It can be + a {line, ch} object, or can be left off to default + to the start of the document. options is an + optional object, which can contain the property `caseFold: + false` to disable case folding when matching a string, or the + property `multiline: disable` to disable multi-line matching for + regular expressions (which may help performance). A search + cursor has the following methods: +
+
findNext() → boolean
+
findPrevious() → boolean
+
Search forward or backward from the current position. + The return value indicates whether a match was found. If + matching a regular expression, the return value will be the + array returned by the match method, in case you + want to extract matched groups.
+
from() → {line, ch}
+
to() → {line, ch}
+
These are only valid when the last call + to findNext or findPrevious did + not return false. They will return {line, ch} + objects pointing at the start and end of the match.
+
replace(text: string, ?origin: string)
+
Replaces the currently found match with the given text + and adjusts the cursor position to reflect the + replacement.
+
+ + +
Implements the search commands. CodeMirror has keys bound to + these by default, but will not do anything with them unless an + implementation is provided. Depends + on searchcursor.js, and will make use + of openDialog when + available to make prompting for search queries less ugly.
+ +
search/jump-to-line.js
+
Implements a jumpToLine command and binding Alt-G to it. + Accepts linenumber, +/-linenumber, line:char, + scroll% and :linenumber formats. + This will make use of openDialog + when available to make prompting for line number neater.
Demo available here. + +
search/matchesonscrollbar.js
+
Adds a showMatchesOnScrollbar method to editor + instances, which should be given a query (string or regular + expression), optionally a case-fold flag (only applicable for + strings), and optionally a class name (defaults + to CodeMirror-search-match) as arguments. When + called, matches of the given query will be displayed on the + editor's vertical scrollbar. The method returns an object with + a clear method that can be called to remove the + matches. Depends on + the annotatescrollbar + addon, and + the matchesonscrollbar.css + file provides a default (transparent yellowish) definition of + the CSS class applied to the matches. Note that the matches are + only perfectly aligned if your scrollbar does not have buttons + at the top and bottom. You can use + the simplescrollbar + addon to make sure of this. If this addon is loaded, + the search addon will + automatically use it.
+ +
edit/matchbrackets.js
+
Defines an option matchBrackets which, when set + to true or an options object, causes matching brackets to be + highlighted whenever the cursor is next to them. It also adds a + method matchBrackets that forces this to happen + once, and a method findMatchingBracket that can be + used to run the bracket-finding algorithm that this uses + internally. It takes a start position and an optional config + object. By default, it will find the match to a matchable + character either before or after the cursor (preferring the one + before), but you can control its behavior with these options: +
+
afterCursor
+
Only use the character after the start position, never the one before it.
+
highlightNonMatching
+
Also highlight pairs of non-matching as well as stray brackets. Enabled by default.
+
strict
+
Causes only matches where both brackets are at the same side of the start position to be considered.
+
maxScanLines
+
Stop after scanning this amount of lines without a successful match. Defaults to 1000.
+
maxScanLineLength
+
Ignore lines longer than this. Defaults to 10000.
+
maxHighlightLineLength
+
Don't highlight a bracket in a line longer than this. Defaults to 1000.
+
+ +
edit/closebrackets.js
+
Defines an option autoCloseBrackets that will + auto-close brackets and quotes when typed. By default, it'll + auto-close ()[]{}''"", but you can pass it a string + similar to that (containing pairs of matching characters), or an + object with pairs and + optionally explode properties to customize + it. explode should be a similar string that gives + the pairs of characters that, when enter is pressed between + them, should have the second character also moved to its own + line. By default, if the active mode has + a closeBrackets property, that overrides the + configuration given in the option. But you can add + an override property with a truthy value to + override mode-specific + configuration. Demo + here.
+ +
edit/matchtags.js
+
Defines an option matchTags that, when enabled, + will cause the tags around the cursor to be highlighted (using + the CodeMirror-matchingtag class). Also + defines + a command toMatchingTag, + which you can bind a key to in order to jump to the tag matching + the one under the cursor. Depends on + the addon/fold/xml-fold.js + addon. Demo here.
+ +
edit/trailingspace.js
+
Adds an option showTrailingSpace which, when + enabled, adds the CSS class cm-trailingspace to + stretches of whitespace at the end of lines. + The demo has a nice + squiggly underline style for this class.
+ +
edit/closetag.js
+
Defines an autoCloseTags option that will + auto-close XML tags when '>' or '/' + is typed, and + a closeTag command that + closes the nearest open tag. Depends on + the fold/xml-fold.js addon. See + the demo.
+ +
edit/continuelist.js
+
Markdown specific. Defines + a "newlineAndIndentContinueMarkdownList" command + that can be bound to enter to automatically + insert the leading characters for continuing a list. See + the Markdown mode + demo.
+ +
comment/comment.js
+
Addon for commenting and uncommenting code. Adds four + methods to CodeMirror instances: +
+
toggleComment(?options: object)
+
Tries to uncomment the current selection, and if that + fails, line-comments it.
+
lineComment(from: {line, ch}, to: {line, ch}, ?options: object)
+
Set the lines in the given range to be line comments. Will + fall back to blockComment when no line comment + style is defined for the mode.
+
blockComment(from: {line, ch}, to: {line, ch}, ?options: object)
+
Wrap the code in the given range in a block comment. Will + fall back to lineComment when no block comment + style is defined for the mode.
+
uncomment(from: {line, ch}, to: {line, ch}, ?options: object) → boolean
+
Try to uncomment the given range. + Returns true if a comment range was found and + removed, false otherwise.
+
+ The options object accepted by these methods may + have the following properties: +
+
blockCommentStart, blockCommentEnd, blockCommentLead, lineComment: string
+
Override the comment string + properties of the mode with custom comment strings.
+
padding: string
+
A string that will be inserted after opening and leading + markers, and before closing comment markers. Defaults to a + single space.
+
commentBlankLines: boolean
+
Whether, when adding line comments, to also comment lines + that contain only whitespace.
+
indent: boolean
+
When adding line comments and this is turned on, it will + align the comment block to the current indentation of the + first line of the block.
+
fullLines: boolean
+
When block commenting, this controls whether the whole + lines are indented, or only the precise range that is given. + Defaults to true.
+
+ The addon also defines + a toggleComment command, + which is a shorthand command for calling + toggleComment with no options.
+ +
fold/foldcode.js
+
Helps with code folding. Adds a foldCode method + to editor instances, which will try to do a code fold starting + at the given line, or unfold the fold that is already present. + The method takes as first argument the position that should be + folded (may be a line number or + a Pos), and as second optional + argument either a range-finder function, or an options object, + supporting the following properties: +
+
rangeFinder: fn(CodeMirror, Pos)
+
The function that is used to find + foldable ranges. If this is not directly passed, it will + default to CodeMirror.fold.auto, which + uses getHelpers with + a "fold" type to find folding functions + appropriate for the local mode. There are files in + the addon/fold/ + directory providing CodeMirror.fold.brace, which + finds blocks in brace languages (JavaScript, C, Java, + etc), CodeMirror.fold.indent, for languages where + indentation determines block structure (Python, Haskell), + and CodeMirror.fold.xml, for XML-style languages, + and CodeMirror.fold.comment, for folding comment + blocks.
+
widget: string | Element | fn(from: Pos, to: Pos) → string|Element
+
The widget to show for folded ranges. Can be either a + string, in which case it'll become a span with + class CodeMirror-foldmarker, or a DOM node. + To dynamically generate the widget, this can be a function + that returns a string or DOM node, which will then render + as described. The function will be invoked with parameters + identifying the range to be folded.
+
scanUp: boolean
+
When true (default is false), the addon will try to find + foldable ranges on the lines above the current one if there + isn't an eligible one on the given line.
+
minFoldSize: integer
+
The minimum amount of lines that a fold should span to be + accepted. Defaults to 0, which also allows single-line + folds.
+
+ See the demo for an + example.
+ +
fold/foldgutter.js
+
Provides an option foldGutter, which can be + used to create a gutter with markers indicating the blocks that + can be folded. Create a gutter using + the gutters option, + giving it the class CodeMirror-foldgutter or + something else if you configure the addon to use a different + class, and this addon will show markers next to folded and + foldable blocks, and handle clicks in this gutter. Note that + CSS styles should be applied to make the gutter, and the fold + markers within it, visible. A default set of CSS styles are + available in: + + addon/fold/foldgutter.css + . + The option + can be either set to true, or an object containing + the following optional option fields: +
+
gutter: string
+
The CSS class of the gutter. Defaults + to "CodeMirror-foldgutter". You will have to + style this yourself to give it a width (and possibly a + background). See the default gutter style rules above.
+
indicatorOpen: string | Element
+
A CSS class or DOM element to be used as the marker for + open, foldable blocks. Defaults + to "CodeMirror-foldgutter-open".
+
indicatorFolded: string | Element
+
A CSS class or DOM element to be used as the marker for + folded blocks. Defaults to "CodeMirror-foldgutter-folded".
+
rangeFinder: fn(CodeMirror, Pos)
+
The range-finder function to use when determining whether + something can be folded. When not + given, CodeMirror.fold.auto + will be used as default.
+
+ The foldOptions editor option can be set to an + object to provide an editor-wide default configuration. + Demo here.
+ +
runmode/runmode.js
+
Can be used to run a CodeMirror mode over text without + actually opening an editor instance. + See the demo for an example. + There are alternate versions of the file available for + running stand-alone + (without including all of CodeMirror) and + for running under + node.js (see bin/source-highlight for an example of using the latter).
+ +
runmode/colorize.js
+
Provides a convenient way to syntax-highlight code snippets + in a webpage. Depends on + the runmode addon (or + its standalone variant). Provides + a CodeMirror.colorize function that can be called + with an array (or other array-ish collection) of DOM nodes that + represent the code snippets. By default, it'll get + all pre tags. Will read the data-lang + attribute of these nodes to figure out their language, and + syntax-color their content using the relevant CodeMirror mode + (you'll have to load the scripts for the relevant modes + yourself). A second argument may be provided to give a default + mode, used when no language attribute is found for a node. Used + in this manual to highlight example code.
+ +
mode/overlay.js
+
Mode combinator that can be used to extend a mode with an + 'overlay' — a secondary mode is run over the stream, along with + the base mode, and can color specific pieces of text without + interfering with the base mode. + Defines CodeMirror.overlayMode, which is used to + create such a mode. See this + demo for a detailed example.
+ +
mode/multiplex.js
+
Mode combinator that can be used to easily 'multiplex' + between several modes. + Defines CodeMirror.multiplexingMode which, when + given as first argument a mode object, and as other arguments + any number of {open, close, mode [, delimStyle, innerStyle, parseDelimiters]} + objects, will return a mode object that starts parsing using the + mode passed as first argument, but will switch to another mode + as soon as it encounters a string that occurs in one of + the open fields of the passed objects. When in a + sub-mode, it will go back to the top mode again when + the close string is encountered. + Pass "\n" for open or close + if you want to switch on a blank line. +
  • When delimStyle is specified, it will be the token + style returned for the delimiter tokens (as well as + [delimStyle]-open on the opening token and + [delimStyle]-close on the closing token).
  • +
  • When innerStyle is specified, it will be the token + style added for each inner mode token.
  • +
  • When parseDelimiters is true, the content of + the delimiters will also be passed to the inner mode. + (And delimStyle is ignored.)
The outer + mode will not see the content between the delimiters. + See this demo for an + example.
+ +
hint/show-hint.js
+
Provides a framework for showing autocompletion hints. + Defines editor.showHint, which takes an optional + options object, and pops up a widget that allows the user to + select a completion. Finding hints is done with a hinting + function (the hint option). This function + takes an editor instance and an options object, and returns + a {list, from, to} object, where list + is an array of strings or objects (the completions), + and from and to give the start and end + of the token that is being completed as {line, ch} + objects. An optional selectedHint property (an + integer) can be added to the completion object to control the + initially selected hint.
+
If no hinting function is given, the addon will + use CodeMirror.hint.auto, which + calls getHelpers with + the "hint" type to find applicable hinting + functions, and tries them one by one. If that fails, it looks + for a "hintWords" helper to fetch a list of + completeable words for the mode, and + uses CodeMirror.hint.fromList to complete from + those.
+
When completions aren't simple strings, they should be + objects with the following properties: +
+
text: string
+
The completion text. This is the only required + property.
+
displayText: string
+
The text that should be displayed in the menu.
+
className: string
+
A CSS class name to apply to the completion's line in the + menu.
+
render: fn(Element, self, data)
+
A method used to create the DOM structure for showing the + completion by appending it to its first argument.
+
hint: fn(CodeMirror, self, data)
+
A method used to actually apply the completion, instead of + the default behavior.
+
from: {line, ch}
+
Optional from position that will be used by pick() instead + of the global one passed with the full list of completions.
+
to: {line, ch}
+
Optional to position that will be used by pick() instead + of the global one passed with the full list of completions.
+
+ +
The plugin understands the following options, which may be + either passed directly in the argument to showHint, + or provided by setting an hintOptions editor + option to an object (the former takes precedence). The options + object will also be passed along to the hinting function, which + may understand additional options. +
+
hint: function
+
A hinting function, as specified above. It is possible to + set the async property on a hinting function to + true, in which case it will be called with + arguments (cm, callback, ?options), and the + completion interface will only be popped up when the hinting + function calls the callback, passing it the object holding the + completions. + The hinting function can also return a promise, and the completion + interface will only be popped when the promise resolves. + By default, hinting only works when there is no + selection. You can give a hinting function + a supportsSelection property with a truthy value + to indicate that it supports selections.
+
completeSingle: boolean
+
Determines whether, when only a single completion is + available, it is completed without showing the dialog. + Defaults to true.
+
alignWithWord: boolean
+
Whether the pop-up should be horizontally aligned with the + start of the word (true, default), or with the cursor (false).
+
closeCharacters: RegExp
+
A regular expression object used to match characters which + cause the pop up to be closed (default: /[\s()\[\]{};:>,]/). + If the user types one of these characters, the pop up will close, and + the endCompletion event is fired on the editor instance.
+
closeOnUnfocus: boolean
+
When enabled (which is the default), the pop-up will close + when the editor is unfocused.
+
completeOnSingleClick: boolean
+
Whether a single click on a list item suffices to trigger the + completion (which is the default), or if the user has to use a + doubleclick.
+
container: Element|null
+
Can be used to define a custom container for the widget. The default + is null, in which case the body-element will + be used.
+
customKeys: keymap
+
Allows you to provide a custom key map of keys to be active + when the pop-up is active. The handlers will be called with an + extra argument, a handle to the completion menu, which + has moveFocus(n), setFocus(n), pick(), + and close() methods (see the source for details), + that can be used to change the focused element, pick the + current element or close the menu. Additionally menuSize() + can give you access to the size of the current dropdown menu, + length give you the number of available completions, and + data give you full access to the completion returned by the + hinting function.
+
extraKeys: keymap
+
Like customKeys above, but the bindings will + be added to the set of default bindings, instead of replacing + them.
+
scrollMargin: integer
+
Show this many lines before and after the selected item. + Default is 0.
+
+ The following events will be fired on the completions object + during completion: +
+
"shown" ()
+
Fired when the pop-up is shown.
+
"select" (completion, Element)
+
Fired when a completion is selected. Passed the completion + value (string or object) and the DOM node that represents it + in the menu.
+
"pick" (completion)
+
Fired when a completion is picked. Passed the completion value + (string or object).
+
"close" ()
+
Fired when the completion is finished.
+
+ The following events will be fired on the editor instance during + completion: +
+
"endCompletion" ()
+
Fired when the pop-up is being closed programmatically, e.g., when + the user types a character which matches the + closeCharacters option.
+
+ This addon depends on styles + from addon/hint/show-hint.css. Check + out the demo for an + example.
+ +
hint/javascript-hint.js
+
Defines a simple hinting function for JavaScript + (CodeMirror.hint.javascript) and CoffeeScript + (CodeMirror.hint.coffeescript) code. This will + simply use the JavaScript environment that the editor runs in as + a source of information about objects and their properties.
+ +
hint/xml-hint.js
+
Defines CodeMirror.hint.xml, which produces + hints for XML tagnames, attribute names, and attribute values, + guided by a schemaInfo option (a property of the + second argument passed to the hinting function, or the third + argument passed to CodeMirror.showHint).
The + schema info should be an object mapping tag names to information + about these tags, with optionally a "!top" property + containing a list of the names of valid top-level tags. The + values of the properties should be objects with optional + properties children (an array of valid child + element names, omit to simply allow all tags to appear) + and attrs (an object mapping attribute names + to null for free-form attributes, and an array of + valid values for restricted + attributes).
The hint options accept an additional property: +
+
matchInMiddle: boolean
+
Determines whether typed characters are matched anywhere in + completions, not just at the beginning. Defaults to false.
+
+ Demo here.
+ +
hint/html-hint.js
+
Provides schema info to + the xml-hint addon for HTML + documents. Defines a schema + object CodeMirror.htmlSchema that you can pass to + as a schemaInfo option, and + a CodeMirror.hint.html hinting function that + automatically calls CodeMirror.hint.xml with this + schema data. See + the demo.
+ +
hint/css-hint.js
+
A hinting function for CSS, SCSS, or LESS code. + Defines CodeMirror.hint.css.
+ +
hint/anyword-hint.js
+
A very simple hinting function + (CodeMirror.hint.anyword) that simply looks for + words in the nearby code and completes to those. Takes two + optional options, word, a regular expression that + matches words (sequences of one or more character), + and range, which defines how many lines the addon + should scan when completing (defaults to 500).
+ +
hint/sql-hint.js
+
A simple SQL hinter. Defines CodeMirror.hint.sql. + Takes two optional options, tables, a object with + table names as keys and array of respective column names as values, + and defaultTable, a string corresponding to a + table name in tables for autocompletion.
+ +
search/match-highlighter.js
+
Adds a highlightSelectionMatches option that + can be enabled to highlight all instances of a currently + selected word. Can be set either to true or to an object + containing the following options: minChars, for the + minimum amount of selected characters that triggers a highlight + (default 2), style, for the style to be used to + highlight the matches (default "matchhighlight", + which will correspond to CSS + class cm-matchhighlight), trim, which + controls whether whitespace is trimmed from the selection, + and showToken which can be set to true + or to a regexp matching the characters that make up a word. When + enabled, it causes the current word to be highlighted when + nothing is selected (defaults to off). + Demo here.
+ +
lint/lint.js
+
Defines an interface component for showing linting warnings, + with pluggable warning sources + (see html-lint.js, + json-lint.js, + javascript-lint.js, + coffeescript-lint.js, + and css-lint.js + in the same directory). Defines a lint option that + can be set to an annotation source (for + example CodeMirror.lint.javascript), to an options + object (in which case the getAnnotations field is + used as annotation source), or simply to true. When + no annotation source is + specified, getHelper with + type "lint" is used to find an annotation function. + An annotation source function should, when given a document + string, an options object, and an editor instance, return an + array of {message, severity, from, to} objects + representing problems. When the function has + an async property with a truthy value, it will be + called with an additional second argument, which is a callback + to pass the array to. + The linting function can also return a promise, in that case the linter + will only be executed when the promise resolves. + By default, the linter will run (debounced) whenever the document is changed. + You can pass a lintOnChange: false option to disable that. + You can pass a selfContain: true option to render the tooltip inside the editor instance. + And a highlightLines option to add a style to lines that contain problems. + Depends on addon/lint/lint.css. A demo can be + found here.
+ +
selection/mark-selection.js
+
Causes the selected text to be marked with the CSS class + CodeMirror-selectedtext when the styleSelectedText option + is enabled. Useful to change the colour of the selection (in addition to the background), + like in this demo.
+ +
selection/active-line.js
+
Defines a styleActiveLine option that, when + enabled, gives the wrapper of the line that contains the cursor + the class CodeMirror-activeline, adds a background + with the class CodeMirror-activeline-background, + and adds the class CodeMirror-activeline-gutter to + the line's gutter space is enabled. The option's value may be a + boolean or an object specifying the following options: +
+
nonEmpty: bool
+
Controls whether single-line selections, or just cursor + selections, are styled. Defaults to false (only cursor + selections).
+
+ See the demo.
+ +
selection/selection-pointer.js
+
Defines a selectionPointer option which you can + use to control the mouse cursor appearance when hovering over + the selection. It can be set to a string, + like "pointer", or to true, in which case + the "default" (arrow) cursor will be used. You can + see a demo here.
+ +
mode/loadmode.js
+
Defines a CodeMirror.requireMode(modename, callback, + options) function that will try to load a given mode and + call the callback when it succeeded. options is an + optional object that may contain: +
+
path: fn(modeName: string) → string
+
Defines the way mode names are mapped to paths.
+
loadMode: fn(path: string, cont: fn())
+
Override the way the mode script is loaded. By default, + this will use the CommonJS or AMD module loader if one is + present, and fall back to creating + a <script> tag otherwise.
+
+ This addon also + defines CodeMirror.autoLoadMode(instance, mode), + which will ensure the given mode is loaded and cause the given + editor instance to refresh its mode when the loading + succeeded. See the demo.
+ +
mode/meta.js
+
Provides meta-information about all the modes in the + distribution in a single file. + Defines CodeMirror.modeInfo, an array of objects + with {name, mime, mode} properties, + where name is the human-readable + name, mime the MIME type, and mode the + name of the mode file that defines this MIME. There are optional + properties mimes, which holds an array of MIME + types for modes with multiple MIMEs associated, + and ext, which holds an array of file extensions + associated with this mode. Four convenience + functions, CodeMirror.findModeByMIME, + CodeMirror.findModeByExtension, + CodeMirror.findModeByFileName + and CodeMirror.findModeByName are provided, which + return such an object given a MIME, extension, file name or mode name + string. Note that, for historical reasons, this file resides in the + top-level mode directory, not + under addon. Demo.
+ +
comment/continuecomment.js
+
Adds a continueComments option, which sets whether the + editor will make the next line continue a comment when you press Enter + inside a comment block. Can be set to a boolean to enable/disable this + functionality. Set to a string, it will continue comments using a custom + shortcut. Set to an object, it will use the key property for + a custom shortcut and the boolean continueLineComment + property to determine whether single-line comments should be continued + (defaulting to true).
+ +
display/placeholder.js
+
Adds a placeholder option that can be used to + make content appear in the editor when it is empty and not + focused. It can hold either a string or a DOM node. Also gives + the editor a CodeMirror-empty CSS class whenever it + doesn't contain any text. + See the demo.
+ +
display/fullscreen.js
+
Defines an option fullScreen that, when set + to true, will make the editor full-screen (as in, + taking up the whole browser window). Depends + on fullscreen.css. Demo + here.
+ +
display/autorefresh.js
+
This addon can be useful when initializing an editor in a + hidden DOM node, in cases where it is difficult to + call refresh when the editor + becomes visible. It defines an option autoRefresh + which you can set to true to ensure that, if the editor wasn't + visible on initialization, it will be refreshed the first time + it becomes visible. This is done by polling every 250 + milliseconds (you can pass a value like {delay: + 500} as the option value to configure this). Note that + this addon will only refresh the editor once when it + first becomes visible, and won't take care of further restyling + and resizing.
+ +
scroll/simplescrollbars.js
+
Defines two additional scrollbar + models, "simple" and "overlay" + (see demo) that can + be selected with + the scrollbarStyle + option. Depends + on simplescrollbars.css, + which can be further overridden to style your own + scrollbars.
+ +
scroll/annotatescrollbar.js
+
Provides functionality for showing markers on the scrollbar + to call out certain parts of the document. Adds a + method annotateScrollbar to editor instances that + can be called, with a CSS class name as argument, to create a + set of annotations. The method returns an object + whose update method can be called with a sorted array + of {from: Pos, to: Pos} objects marking the ranges + to be highlighted. To detach the annotations, call the + object's clear method.
+ +
display/rulers.js
+
Adds a rulers option, which can be used to show + one or more vertical rulers in the editor. The option, if + defined, should be given an array of {column [, className, + color, lineStyle, width]} objects or numbers (which + indicate a column). The ruler will be displayed at the column + indicated by the number or the column property. + The className property can be used to assign a + custom style to a ruler. Demo + here.
+ +
display/panel.js
+
Defines an addPanel method for CodeMirror + instances, which places a DOM node above or below an editor, and + shrinks the editor to make room for the node. The method takes + as first argument as DOM node, and as second an optional options + object. The Panel object returned by this method + has a clear method that is used to remove the + panel, and a changed method that can be used to + notify the addon when the size of the panel's DOM node has + changed.
+ The method accepts the following options: +
+
position: string
+
Controls the position of the newly added panel. The + following values are recognized: +
+
top (default)
+
Adds the panel at the very top.
+
after-top
+
Adds the panel at the bottom of the top panels.
+
bottom
+
Adds the panel at the very bottom.
+
before-bottom
+
Adds the panel at the top of the bottom panels.
+
+
+
before: Panel
+
The new panel will be added before the given panel.
+
after: Panel
+
The new panel will be added after the given panel.
+
replace: Panel
+
The new panel will replace the given panel.
+
stable: bool
+
Whether to scroll the editor to keep the text's vertical + position stable, when adding a panel above it. Defaults to false.
+
+ When using the after, before or replace options, + if the panel doesn't exists or has been removed, + the value of the position option will be used as a fallback. +
+ A demo of the addon is available here. +
+ +
wrap/hardwrap.js
+
Addon to perform hard line wrapping/breaking for paragraphs + of text. Adds these methods to editor instances: +
+
wrapParagraph(?pos: {line, ch}, ?options: object)
+
Wraps the paragraph at the given position. + If pos is not given, it defaults to the cursor + position.
+
wrapRange(from: {line, ch}, to: {line, ch}, ?options: object)
+
Wraps the given range as one big paragraph.
+
wrapParagraphsInRange(from: {line, ch}, to: {line, ch}, ?options: object)
+
Wraps the paragraphs in (and overlapping with) the + given range individually.
+
+ The following options are recognized: +
+
paragraphStart, paragraphEnd: RegExp
+
Blank lines are always considered paragraph boundaries. + These options can be used to specify a pattern that causes + lines to be considered the start or end of a paragraph.
+
column: number
+
The column to wrap at. Defaults to 80.
+
wrapOn: RegExp
+
A regular expression that matches only those + two-character strings that allow wrapping. By default, the + addon wraps on whitespace and after dash characters.
+
killTrailingSpace: boolean
+
Whether trailing space caused by wrapping should be + preserved, or deleted. Defaults to true.
+
forceBreak: boolean
+
If set to true forces a break at column in the case + when no wrapOn pattern is found in the range. If set to + false allows line to overflow the column limit if no + wrapOn pattern found. Defaults to true.
+
+ A demo of the addon is available here. +
+ +
scroll/scrollpastend.js
+
Defines an option `"scrollPastEnd"` that, when set to a + truthy value, allows the user to scroll one editor height of + empty space into view at the bottom of the editor.
+ +
merge/merge.js
+
Implements an interface for merging changes, using either a + 2-way or a 3-way view. The CodeMirror.MergeView + constructor takes arguments similar to + the CodeMirror + constructor, first a node to append the interface to, and then + an options object. Options are passed through to the editors + inside the view. These extra options are recognized: +
+
origLeft and origRight: string
+
If given these provide original versions of the + document, which will be shown to the left and right of the + editor in non-editable CodeMirror instances. The merge + interface will highlight changes between the editable + document and the original(s). To create a 2-way (as opposed + to 3-way) merge view, provide only one of them.
+
revertButtons: boolean
+
Determines whether buttons that allow the user to revert + changes are shown. Defaults to true.
+
revertChunk: fn(mv: MergeView, from: CodeMirror, fromStart: Pos, fromEnd: Pos, to: CodeMirror, toStart: Pos, toEnd: Pos)
+
Can be used to define custom behavior when the user + reverts a changed chunk.
+
connect: string
+
Sets the style used to connect changed chunks of code. + By default, connectors are drawn. When this is set + to "align", the smaller chunk is padded to + align with the bigger chunk instead.
+
collapseIdentical: boolean|number
+
When true (default is false), stretches of unchanged + text will be collapsed. When a number is given, this + indicates the amount of lines to leave visible around such + stretches (which defaults to 2).
+
allowEditingOriginals: boolean
+
Determines whether the original editor allows editing. + Defaults to false.
+
showDifferences: boolean
+
When true (the default), changed pieces of text are + highlighted.
+
chunkClassLocation: string|Array
+
By default the chunk highlights are added + using addLineClass + with "background". Override this to customize it to be any + valid `where` parameter or an Array of valid `where` + parameters.
+
+ The addon also defines commands "goNextDiff" + and "goPrevDiff" to quickly jump to the next + changed chunk. Demo + here.
+ +
tern/tern.js
+
Provides integration with + the Tern JavaScript analysis + engine, for completion, definition finding, and minor + refactoring help. See the demo + for a very simple integration. For more involved scenarios, see + the comments at the top of + the addon and the + implementation of the + (multi-file) demonstration + on the Tern website.
+
+
+ +
+

Writing CodeMirror Modes

+ +

Modes typically consist of a single JavaScript file. This file + defines, in the simplest case, a lexer (tokenizer) for your + language—a function that takes a character stream as input, + advances it past a token, and returns a style for that token. More + advanced modes can also handle indentation for the language.

+ +

This section describes the low-level mode interface. Many modes + are written directly against this, since it offers a lot of + control, but for a quick mode definition, you might want to use + the simple mode addon.

+ +

The mode script should + call CodeMirror.defineMode to + register itself with CodeMirror. This function takes two + arguments. The first should be the name of the mode, for which you + should use a lowercase string, preferably one that is also the + name of the files that define the mode (i.e. "xml" is + defined in xml.js). The second argument should be a + function that, given a CodeMirror configuration object (the thing + passed to the CodeMirror function) and an optional + mode configuration object (as in + the mode option), returns + a mode object.

+ +

Typically, you should use this second argument + to defineMode as your module scope function (modes + should not leak anything into the global scope!), i.e. write your + whole mode inside this function.

+ +

The main responsibility of a mode script is parsing + the content of the editor. Depending on the language and the + amount of functionality desired, this can be done in really easy + or extremely complicated ways. Some parsers can be stateless, + meaning that they look at one element (token) of the code + at a time, with no memory of what came before. Most, however, will + need to remember something. This is done by using a state + object, which is an object that is always passed when + reading a token, and which can be mutated by the tokenizer.

+ +

Modes that use a state must define + a startState method on their mode + object. This is a function of no arguments that produces a state + object to be used at the start of a document.

+ +

The most important part of a mode object is + its token(stream, state) method. All + modes must define this method. It should read one token from the + stream it is given as an argument, optionally update its state, + and return a style string, or null for tokens that do + not have to be styled. For your styles, you are encouraged to use + the 'standard' names defined in the themes (without + the cm- prefix). If that fails, it is also possible + to come up with your own and write your own CSS theme file.

+ +

A typical token string would + be "variable" or "comment". Multiple + styles can be returned (separated by spaces), for + example "string error" for a thing that looks like a + string but is invalid somehow (say, missing its closing quote). + When a style is prefixed by "line-" + or "line-background-", the style will be applied to + the whole line, analogous to what + the addLineClass method + does—styling the "text" in the simple case, and + the "background" element + when "line-background-" is prefixed.

+ +

The stream object that's passed + to token encapsulates a line of code (tokens may + never span lines) and our current position in that line. It has + the following API:

+ +
+
eol() → boolean
+
Returns true only if the stream is at the end of the + line.
+
sol() → boolean
+
Returns true only if the stream is at the start of the + line.
+ +
peek() → string
+
Returns the next character in the stream without advancing + it. Will return a null at the end of the + line.
+
next() → string
+
Returns the next character in the stream and advances it. + Also returns null when no more characters are + available.
+ +
eat(match: string|regexp|function(char: string) → boolean) → string
+
match can be a character, a regular expression, + or a function that takes a character and returns a boolean. If + the next character in the stream 'matches' the given argument, + it is consumed and returned. Otherwise, undefined + is returned.
+
eatWhile(match: string|regexp|function(char: string) → boolean) → boolean
+
Repeatedly calls eat with the given argument, + until it fails. Returns true if any characters were eaten.
+
eatSpace() → boolean
+
Shortcut for eatWhile when matching + white-space.
+
skipToEnd()
+
Moves the position to the end of the line.
+
skipTo(str: string) → boolean
+
Skips to the start of the next occurrence of the given string, if + found on the current line (doesn't advance the stream if the + string does not occur on the line). Returns true if the + string was found.
+
match(pattern: string, ?consume: boolean, ?caseFold: boolean) → boolean
+
match(pattern: regexp, ?consume: boolean) → array<string>
+
Act like a + multi-character eat—if consume is true + or not given—or a look-ahead that doesn't update the stream + position—if it is false. pattern can be either a + string or a regular expression starting with ^. + When it is a string, caseFold can be set to true to + make the match case-insensitive. When successfully matching a + regular expression, the returned value will be the array + returned by match, in case you need to extract + matched groups.
+ +
backUp(n: integer)
+
Backs up the stream n characters. Backing it up + further than the start of the current token will cause things to + break, so be careful.
+
column() → integer
+
Returns the column (taking into account tabs) at which the + current token starts.
+
indentation() → integer
+
Tells you how far the current line has been indented, in + spaces. Corrects for tab characters.
+ +
current() → string
+
Get the string between the start of the current token and + the current stream position.
+ +
lookAhead(n: number) → ?string
+
Get the line n (>0) lines after the current + one, in order to scan ahead across line boundaries. Note that + you want to do this carefully, since looking far ahead will make + mode state caching much less effective.
+ +
baseToken() → ?{type: ?string, size: number}
+
Modes added + through addOverlay + (and only such modes) can use this method to inspect + the current token produced by the underlying mode.
+
+ +

By default, blank lines are simply skipped when + tokenizing a document. For languages that have significant blank + lines, you can define + a blankLine(state) method on your + mode that will get called whenever a blank line is passed over, so + that it can update the parser state.

+ +

Because state object are mutated, and CodeMirror + needs to keep valid versions of a state around so that it can + restart a parse at any line, copies must be made of state objects. + The default algorithm used is that a new state object is created, + which gets all the properties of the old object. Any properties + which hold arrays get a copy of these arrays (since arrays tend to + be used as mutable stacks). When this is not correct, for example + because a mode mutates non-array properties of its state object, a + mode object should define + a copyState method, which is given a + state and should return a safe copy of that state.

+ +

If you want your mode to provide smart indentation + (through the indentLine + method and the indentAuto + and newlineAndIndent commands, to which keys can be + bound), you must define + an indent(state, textAfter) method + on your mode object.

+ +

The indentation method should inspect the given state object, + and optionally the textAfter string, which contains + the text on the line that is being indented, and return an + integer, the amount of spaces to indent. It should usually take + the indentUnit + option into account. An indentation method may + return CodeMirror.Pass to indicate that it + could not come up with a precise indentation.

+ +

To work well with + the commenting addon, a mode may + define lineComment (string that + starts a line + comment), blockCommentStart, blockCommentEnd + (strings that start and end block comments), + and blockCommentLead (a string to put at the start of + continued lines in a block comment). All of these are + optional.

+ +

Finally, a mode may define either + an electricChars or an electricInput + property, which are used to automatically reindent the line when + certain patterns are typed and + the electricChars + option is enabled. electricChars may be a string, and + will trigger a reindent whenever one of the characters in that + string are typed. Often, it is more appropriate to + use electricInput, which should hold a regular + expression, and will trigger indentation when the part of the + line before the cursor matches the expression. It should + usually end with a $ character, so that it only + matches when the indentation-changing pattern was just typed, not when something was + typed after the pattern.

+ +

So, to summarize, a mode must provide + a token method, and it may + provide startState, copyState, + and indent methods. For an example of a trivial mode, + see the diff mode, for a more + involved example, see the C-like + mode.

+ +

Sometimes, it is useful for modes to nest—to have one + mode delegate work to another mode. An example of this kind of + mode is the mixed-mode HTML + mode. To implement such nesting, it is usually necessary to + create mode objects and copy states yourself. To create a mode + object, there are CodeMirror.getMode(options, + parserConfig), where the first argument is a configuration + object as passed to the mode constructor function, and the second + argument is a mode specification as in + the mode option. To copy a + state object, call CodeMirror.copyState(mode, state), + where mode is the mode that created the given + state.

+ +

In a nested mode, it is recommended to add an + extra method, innerMode which, given + a state object, returns a {state, mode} object with + the inner mode and its state for the current position. These are + used by utility scripts such as the tag + closer to get context information. Use + the CodeMirror.innerMode helper function to, starting + from a mode and a state, recursively walk down to the innermost + mode and state.

+ +

To make indentation work properly in a nested parser, it is + advisable to give the startState method of modes that + are intended to be nested an optional argument that provides the + base indentation for the block of code. The JavaScript and CSS + parser do this, for example, to allow JavaScript and CSS code + inside the mixed-mode HTML mode to be properly indented.

+ +

It is possible, and encouraged, to associate + your mode, or a certain configuration of your mode, with + a MIME type. For + example, the JavaScript mode associates itself + with text/javascript, and its JSON variant + with application/json. To do this, + call CodeMirror.defineMIME(mime, + modeSpec), where modeSpec can be a string or + object specifying a mode, as in + the mode option.

+ +

If a mode specification wants to add some properties to the + resulting mode object, typically for use + with getHelpers, it may + contain a modeProps property, which holds an object. + This object's properties will be copied to the actual mode + object.

+ +

Sometimes, it is useful to add or override mode + object properties from external code. + The CodeMirror.extendMode function + can be used to add properties to mode objects produced for a + specific mode. Its first argument is the name of the mode, its + second an object that specifies the properties that should be + added. This is mostly useful to add utilities that can later be + looked up through getMode.

+
+ +
+

VIM Mode API

+ +

CodeMirror has a robust VIM mode that attempts to faithfully + emulate VIM's most useful features. It can be enabled by + including keymap/vim.js + and setting the keyMap option to + "vim".

+ +

Configuration

+ +

VIM mode accepts configuration options for customizing + behavior at run time. These methods can be called at any time + and will affect all existing CodeMirror instances unless + specified otherwise. The methods are exposed on the + CodeMirror.Vim object.

+ +
+
setOption(name: string, value: any, ?cm: CodeMirror, ?cfg: object)
+
Sets the value of a VIM option. name should + be the name of an option. If cfg.scope is not set + and cm is provided, then sets the global and + instance values of the option. Otherwise, sets either the + global or instance value of the option depending on whether + cfg.scope is global or + local.
+
getOption(name: string, ?cm: CodeMirror: ?cfg: object)
+
Gets the current value of a VIM option. If + cfg.scope is not set and cm is + provided, then gets the instance value of the option, falling + back to the global value if not set. If cfg.scope is provided, then gets the global or + local value without checking the other.
+ +
map(lhs: string, rhs: string, ?context: string)
+
Maps a key sequence to another key sequence. Implements + VIM's :map command. To map ; to : in VIM would be + :map ; :. That would translate to + CodeMirror.Vim.map(';', ':');. + The context can be normal, + visual, or insert, which correspond + to :nmap, :vmap, and + :imap + respectively.
+ +
mapCommand(keys: string, type: string, name: string, ?args: object, ?extra: object)
+
Maps a key sequence to a motion, + operator, or action type command. + The args object is passed through to the command when it is + invoked by the provided key sequence. + extras.context can be normal, + visual, or insert, to map the key + sequence only in the corresponding mode. + extras.isEdit is applicable only to actions, + determining whether it is recorded for replay for the + . single-repeat command. + +
unmap(lhs: string, ctx: string)
+
+ Remove the command lhs if it is a user defined command. + If the command is an Ex to Ex or Ex to key mapping then the context + must be undefined or false. +
+ +
mapclear(ctx: string)
+
+ Remove all user-defined mappings for the provided context. +
+ +
noremap(lhs: string, rhs: string, ctx: {string, array<string>})
+
+ Non-recursive map function. This will not create mappings to key maps + that aren't present in the default key map. + If no context is provided then the mapping will be applied to each of + normal, insert, and visual mode. +
+
+ +

Events

+ +

VIM mode signals a few events on the editor instance. For an example usage, see demo/vim.html#L101.

+ +
+
"vim-command-done" (reason: undefined)
+
Fired on keypress and mousedown where command has completed or no command found.
+ +
"vim-keypress" (vimKey: string)
+
Fired on keypress, vimKey is in Vim's key notation.
+ +
"vim-mode-change" (modeObj: object)
+
Fired after mode change, modeObj parameter is a {mode: string, ?subMode: string} object. Modes: "insert", "normal", "replace", "visual". Visual sub-modes: "linewise", "blockwise".
+
+ +

Extending VIM

+ +

CodeMirror's VIM mode implements a large subset of VIM's core + editing functionality. But since there's always more to be + desired, there is a set of APIs for extending VIM's + functionality. As with the configuration API, the methods are + exposed on CodeMirror.Vim and may + be called at any time.

+ +
+
defineOption(name: string, default: any, type: string, ?aliases: array<string>, ?callback: function (?value: any, ?cm: CodeMirror) → ?any)
+
Defines a VIM style option and makes it available to the + :set command. Type can be boolean or + string, used for validation and by + :set to determine which syntax to accept. If a + callback is passed in, VIM does not store the value of the + option itself, but instead uses the callback as a setter/getter. If the + first argument to the callback is undefined, then the + callback should return the value of the option. Otherwise, it should set + instead. Since VIM options have global and instance values, whether a + CodeMirror instance is passed in denotes whether the global + or local value should be used. Consequently, it's possible for the + callback to be called twice for a single setOption or + getOption call. Note that right now, VIM does not support + defining buffer-local options that do not have global values. If an + option should not have a global value, either always ignore the + cm parameter in the callback, or always pass in a + cfg.scope to setOption and + getOption.
+ +
defineMotion(name: string, fn: function(cm: CodeMirror, head: {line, ch}, ?motionArgs: object}) → {line, ch})
+
Defines a motion command for VIM. The motion should return + the desired result position of the cursor. head + is the current position of the cursor. It can differ from + cm.getCursor('head') if VIM is in visual mode. + motionArgs is the object passed into + mapCommand().
+ +
defineOperator(name: string, fn: function(cm: CodeMirror, ?operatorArgs: object, ranges: array<{anchor, head}>) → ?{line, ch})
+
Defines an operator command, similar to + defineMotion. ranges is the range + of text the operator should operate on. If the cursor should + be set to a certain position after the operation finishes, it + can return a cursor object.
+ +
defineAction(name: string, fn: function(cm: CodeMirror, ?actionArgs: object))
+
Defines an action command, similar to + defineMotion. Action commands + can have arbitrary behavior, making them more flexible than + motions and operators, at the loss of orthogonality.
+ +
defineEx(name: string, ?prefix: string, fn: function(cm: CodeMirror, ?params: object))
+
Defines an Ex command, and maps it to :name. + If a prefix is provided, it, and any prefixed substring of the + name beginning with the prefix can + be used to invoke the command. If the prefix is + falsy, then name is used as the prefix. + params.argString contains the part of the prompted + string after the command name. params.args is + params.argString split by whitespace. If the + command was prefixed with a + line range, + params.line and params.lineEnd will + be set.
+ +
getRegisterController()
+
Returns the RegisterController that manages the state of registers + used by vim mode. For the RegisterController api see its + definition here. +
+ +
buildKeyMap()
+
+ Not currently implemented. If you would like to contribute this please open + a pull request on GitHub. +
+ +
defineRegister()
+
Defines an external register. The name should be a single character + that will be used to reference the register. The register should support + setText, pushText, clear, and toString. + See Register for a reference implementation. +
+ +
getVimGlobalState_()
+
+ Return a reference to the VimGlobalState. +
+ +
resetVimGlobalState_()
+
+ Reset the default values of the VimGlobalState to fresh values. Any options + set with setOption will also be applied to the reset global state. +
+ +
maybeInitVimState_(cm: CodeMirror)
+
+ Initialize cm.state.vim if it does not exist. Returns cm.state.vim. +
+ +
handleKey(cm: CodeMirror, key: string, origin: string)
+
+ Convenience function to pass the arguments to findKey and + call returned function if it is defined. +
+ +
findKey(cm: CodeMirror, key: string, origin: string)
+
+ This is the outermost function called by CodeMirror, after keys have + been mapped to their Vim equivalents. Finds a command based on the key + (and cached keys if there is a multi-key sequence). Returns undefined + if no key is matched, a noop function if a partial match is found (multi-key), + and a function to execute the bound command if a a key is matched. The + function always returns true. +
+ +
suppressErrorLogging: boolean
+
Whether to use suppress the use of console.log when catching an + error in the function returned by findKey. + Defaults to false.
+ +
exitVisualMode(cm: CodeMirror, ?moveHead: boolean)
+
Exit visual mode. If moveHead is set to false, the CodeMirror selection + will not be touched. The caller assumes the responsibility of putting + the cursor in the right place. +
+ +
exitInsertMode(cm: CodeMirror)
+
+ Exit insert mode. +
+
+ +
+ +
+ + diff --git a/js/codemirror/doc/realworld.html b/js/codemirror/doc/realworld.html new file mode 100644 index 0000000..4d822b3 --- /dev/null +++ b/js/codemirror/doc/realworld.html @@ -0,0 +1,209 @@ + + +CodeMirror: Real-world Uses + + + + + +
+ +

CodeMirror real-world uses

+ +

Create a pull + request if you'd like your project to be added to this list.

+ + + +
+ diff --git a/js/codemirror/doc/releases.html b/js/codemirror/doc/releases.html new file mode 100644 index 0000000..9777ec7 --- /dev/null +++ b/js/codemirror/doc/releases.html @@ -0,0 +1,2232 @@ + + +CodeMirror: Release History + + + + + + +
+ +

Release notes and version history

+ +
+ +

Version 6.x

+ +

See the new website.

+ +

Version 5.x

+ +

20-11-2023: Version 5.65.16:

+ +
    +
  • Fix focus tracking in shadow DOM.
  • +
  • go mode: Allow underscores in numbers.
  • +
  • jsx mode: Support TS generics marked by trailing comma.
  • +
+ +

29-08-2023: Version 5.65.15:

+ +
    +
  • lint addon: Prevent tooltips from sticking out of the viewport.
  • +
  • yaml mode: Fix an exponential-complexity regular expression.
  • +
+ +

17-07-2023: Version 5.65.14:

+ +
    +
  • clike mode: Fix poor indentation in some Java code.
  • +
  • nsis mode: Recognize !assert command.
  • +
  • lint addon: Remove broken annotation deduplication.
  • +
+ +

27-04-2023: Version 5.65.13:

+ + + +

20-02-2023: Version 5.65.12:

+ + + +

20-12-2022: Version 5.65.11:

+ +
    +
  • Also respect autocapitalize/autocorrect/spellcheck options in textarea mode.
  • +
  • sql-hint addon: Fix keyword completion in generic SQL mode.
  • +
+ +

20-11-2022: Version 5.65.10:

+ +
    +
  • sql mode: Fix completion when the SQL mode is wrapped by some outer mode.
  • +
  • javascript mode: Fix parsing of property keywords before private property names.
  • +
+ +

20-09-2022: Version 5.65.9:

+ +
    +
  • Add a workaround for a regression in Chrome 105 that could cause content below the editor to not receive mouse events.
  • +
  • show-hint addon: Resize the tooltip if it doesn’t fit the screen.
  • +
  • swift mode: Fix tokenizing of block comments.
  • +
  • jinja2 mode: Support line statements.
  • +
+ +

20-08-2022: Version 5.65.8:

+ +
    +
  • Include direction override and isolate characters in the default set of special characters.
  • +
  • Fix an issue that could cause document corruption when mouse-selecting during composition.
  • +
  • foldgutter addon: Refresh markers when the editor’s mode changes.
  • +
  • merge addon: Fix syntax that prevented the addon from loading in IE10.
  • +
+ +

20-07-2022: Version 5.65.7:

+ +
    +
  • Fix several references to the global document/window, improving support for creating an editor in another frame.
  • +
  • vim bindings: Use upstream code instead of keeping our own copy.
  • +
  • tern addon: Properly HTML escape variable names in rename dialog.
  • +
+ +

20-06-2022: Version 5.65.6:

+ +
    +
  • Avoid firing beforeCursorEnter callbacks twice for cursor selections.
  • +
  • Improve support for auto-hiding macOS scrollbars.
  • +
  • show-hint addon: Fix an issue where the tooltip could be placed to the left of the screen.
  • +
  • swift mode: Support structured concurrency keywords.
  • +
+ +

30-05-2022: Version 5.65.5:

+ +
    +
  • Work around a bug in Chrome 102 that caused wheel scrolling of the editor to constantly stop.
  • +
  • search addon: Make sure the search field has an accessible label.
  • +
  • comment addon: Preserve indentation on otherwise empty lines when indenting.
  • +
+ +

20-05-2022: Version 5.65.4:

+ +
    +
  • Ignore paste events when the editor doesn’t have focus.
  • +
  • sparql mode: Fix parsing of variables after operators.
  • +
  • julia mode: Properly tokenize !== and === operators.
  • +
+ +

20-04-2022: Version 5.65.3:

+ +
    +
  • Fix a crash that could occur when when marking text.
  • +
  • merge addon: Add aria label to buttons.
  • +
  • groovy mode: Properly highlight interpolated variables.
  • +
+ +

21-02-2022: Version 5.65.2:

+ + + +

20-01-2022: Version 5.65.1:

+ +
    +
  • Fix miscalculation of vertical positions in lines that have both line widgets and replaced newlines.
  • +
+ +

20-12-2021: Version 5.65.0:

+ +
    +
  • brace-folding addon: Fix broken folding on lines with both braces and square brackets.
  • +
  • vim bindings: Support g0, g$, g<Arrow>.
  • +
+ +

20-11-2021: Version 5.64.0:

+ +
    +
  • Fix a crash that occurred in some situations with replacing marks across line breaks.
  • +
  • Make sure native scrollbars reset their position when hidden and re-shown.
  • +
  • vim bindings: Support C-u to delete back a line.
  • +
+ +

11-10-2021: Version 5.63.3:

+ +
    +
  • Prevent external styles from giving the hidden textarea a min-height.
  • +
  • Remove a stray autosave file that was part of the previous release.
  • +
+ +

29-09-2021: Version 5.63.1:

+ +
    +
  • Fix an issue with mouse scrolling on Chrome 94 Windows, which made scrolling by wheel move unusably slow.
  • +
+ +

20-09-2021: Version 5.63.0:

+ +
    +
  • Fix scroll position jumping when scrolling a document with very different line heights.
  • +
  • xml mode: Look up HTML element behavior in a case-insensitive way.
  • +
  • vim bindings: Support guu for case-changing.
  • +
+ +

20-08-2021: Version 5.62.3:

+ +
    +
  • Give the editor a translate=no attribute to prevent automatic translation from modifying its content.
  • +
  • Give vim-style cursors a width that matches the character after them.
  • +
  • merge addon: Make buttons keyboard-accessible.
  • +
  • emacs bindings: Fix by-page scrolling keybindings, which were accidentally inverted.
  • +
+ +

21-07-2021: Version 5.62.2:

+ +
    +
  • lint addon: Fix a regression that broke several addon options.
  • +
+ +

20-07-2021: Version 5.62.1:

+ +
    +
  • vim bindings: Make matching of upper-case characters more Unicode-aware.
  • +
  • lint addon: Prevent options passed to the addon itself from being given to the linter.
  • +
  • show-hint addon: Improve screen reader support.
  • +
  • search addon: Avoid using innerHTML.
  • +
+ +

21-06-2021: Version 5.62.0:

+ +
    + lint addon: Add support for highlighting lines with errors or warnings. +
  • Improve support for vim-style cursors in a number of themes.
  • +
+ +

20-05-2021: Version 5.61.1:

+ +
    +
  • Fix a bug where changing the editor’s document could confuse text-direction management.
  • +
  • Fix a bug in horizontally scrolling the cursor into view.
  • +
  • Optimize adding lots of marks in a single transaction.
  • +
  • simple mode addon: Support regexps with a unicode flag.
  • +
  • javascript mode: Add support for TypeScript template string types, improve integration with JSX mode.
  • +
+ +

20-04-2021: Version 5.61.0:

+ +
    +
  • The library now emits an "updateGutter" event when the gutter width changes.
  • +
  • emacs bindings: Provide named commands for all bindings.
  • +
  • Improve support for being in a shadow DOM in contenteditable mode.
  • +
  • Prevent line number from being read by screen readers.
  • +
  • show-hint addon: Fix a crash caused by a race condition.
  • +
  • javascript mode: Improve scope tracking.
  • +
+ +

20-03-2021: Version 5.60.0:

+ +
    +
  • setSelections now allows ranges to omit the head property when it is equal to anchor.
  • +
  • sublime bindings: Add support for reverse line sorting.
  • +
  • Fix autofocus feature in contenteditable mode.
  • +
  • simple mode addon: Fix a null-dereference crash.
  • +
  • multiplex addon: Make it possible to use parseDelimiters when both delimiters are the same.
  • +
  • julia mode: Fix a lockup bug.
  • +
+ +

24-02-2021: Version 5.59.4:

+ +
    +
  • Give the scrollbar corner filler a background again, to prevent content from peeping through between the scrollbars. +
+ +

20-02-2021: Version 5.59.3:

+ +
    +
  • Don’t override the way zero-with non-joiners are rendered.
  • +
  • Fix an issue where resetting the history cleared the undoDepth option’s value.
  • +
  • vim bindings: Fix substitute command when joining and splitting lines, fix global command when line number change, add support for :vglobal, properly treat caps lock as a modifier key.
  • +
+ +

20-01-2021: Version 5.59.2:

+ +
    +
  • Don’t try to scroll the selection into view in readonly: "nocursor" mode.
  • +
  • closebrackets addon: Fix a regression in the behavior of pressing enter between brackets.
  • +
  • javascript mode: Fix an infinite loop on specific syntax errors in object types.
  • +
  • various modes: Fix inefficient RegExp matching.
  • +
+ +

31-12-2020: Version 5.59.1:

+ +
    +
  • Fix an issue where some Chrome browsers were detected as iOS.
  • +
+ +

20-12-2020: Version 5.59.0:

+ +
    +
  • Fix platform detection on recent iPadOS.
  • +
  • lint addon: Don't show duplicate messages for a given line.
  • +
  • clojure mode: Fix regexp that matched in exponential time for some inputs.
  • +
  • hardwrap addon: Improve handling of words that are longer than the line length.
  • +
  • matchbrackets addon: Fix leaked event handler on disabling the addon.
  • +
  • search addon: Make it possible to configure the search addon to show the dialog at the bottom of the editor.
  • +
+ +

19-11-2020: Version 5.58.3:

+ +
    +
  • Suppress quick-firing of blur-focus events when dragging and clicking on Internet Explorer.
  • +
  • Fix the insertAt option to addLineWidget to actually allow the widget to be placed after all widgets for the line.
  • +
  • soy mode: Support @Attribute and element composition.
  • +
  • shell mode: Support heredoc quoting.
  • +
+ +

23-10-2020: Version 5.58.2:

+ +
    +
  • Fix a bug where horizontally scrolling the cursor into view sometimes failed with a non-fixed gutter.
  • +
  • julia mode: Fix an infinite recursion bug.
  • +
+ +

21-09-2020: Version 5.58.1:

+ + + +

21-09-2020: Version 5.58.0:

+ +
    +
  • Make backspace delete by code point, not glyph.
  • +
  • Suppress flickering focus outline when clicking on scrollbars in Chrome.
  • +
  • Fix a bug that prevented attributes added via markText from showing up unless the span also had some other styling.
  • +
  • Suppress cut and paste context menu entries in readonly editors in Chrome.
  • +
  • placeholder addon: Update placeholder visibility during composition.
  • +
  • Make it less cumbersome to style new lint message types.
  • +
  • vim bindings: Support black hole register, gn and gN
  • +
+ +

20-08-2020: Version 5.57.0:

+ +
    +
  • Fix issue that broke binding the macOS Command key.
  • +
  • comment addon: Keep selection in front of inserted markers when adding a block comment.
  • +
  • css mode: Recognize more properties and value names.
  • +
  • annotatescrollbar addon: Don’t hide matches in collapsed content.
  • +
  • vim bindings: Support tag text objects in xml and html modes.
  • +
+ +

20-07-2020: Version 5.56.0:

+ +
    +
  • Line-wise pasting was fixed on Chrome Windows.
  • +
  • wast mode: Follow standard changes.
  • +
  • soy mode: Support import expressions, template type, and loop indices.
  • +
  • sql-hint addon: Improve handling of double quotes.
  • +
  • New features

  • +
  • show-hint addon: New option scrollMargin to control how many options are visible beyond the selected one.
  • +
  • hardwrap addon: New option forceBreak to disable breaking of words that are longer than a line.
  • +
+ +

21-06-2020: Version 5.55.0:

+ +
    +
  • The editor no longer overrides the rendering of zero-width joiners (allowing combined emoji to be shown).
  • +
  • vim bindings: Fix an issue where the vim-mode-change event was fired twice.
  • +
  • javascript mode: Only allow -->-style comments at the start of a line.
  • +
  • julia mode: Improve indentation.
  • +
  • pascal mode: Recognize curly bracket comments.
  • +
  • runmode addon: Further sync up the implementation of the standalone and node variants with the regular library.
  • +
  • New features

  • +
  • loadmode addon: Allow overriding the way the addon constructs filenames and loads modules.
  • +
+ +

20-05-2020: Version 5.54.0:

+ +
    +
  • runmode addon: Properly support for cross-line lookahead.
  • +
  • vim bindings: Allow Ex-Commands with non-word names.
  • +
  • gfm mode: Add a fencedCodeBlockDefaultMode option.
  • +
  • Improve support for having focus inside in-editor widgets in contenteditable-mode.
  • +
  • Fix issue where the scroll position could jump when clicking on a selection in Chrome.
  • +
  • python mode: Better format string support.
  • +
  • javascript mode: Improve parsing of private properties and class fields.
  • +
  • matchbrackets addon: Disable highlighting when the editor doesn’t have focus.
  • +
+ +

21-04-2020: Version 5.53.2:

+ + + +

21-04-2020: Version 5.53.0:

+ +
    +
  • New option: screenReaderLabel to add a label to the editor.
  • +
  • New mode: wast.
  • +
  • Fix a bug where the editor layout could remain confused after a call to refresh when line wrapping was enabled.
  • +
  • dialog addon: Don’t close dialogs when the document window loses focus.
  • +
  • merge addon: Compensate for editor top position when aligning lines.
  • +
  • vim bindings: Improve EOL handling.
  • +
  • emacs bindings: Include default keymap as a fallback.
  • +
  • julia mode: Fix an infinite loop bug.
  • +
  • show-hint addon: Scroll cursor into view when picking a completion.
  • +
+ +

20-03-2020: Version 5.52.2:

+ +
    +
  • Fix selection management in contenteditable mode when the editor doesn’t have focus.
  • +
  • Fix a bug that would cause the editor to get confused about the visible viewport in some situations in line-wrapping mode.
  • +
  • markdown mode: Don’t treat single dashes as setext header markers.
  • +
  • zenburn theme: Make sure background styles take precedence over default styles.
  • +
  • css mode: Recognize a number of new properties.
  • +
+ +

20-02-2020: Version 5.52.0:

+ +
    +
  • Fix a bug in handling of bidi text with Arabic numbers in a right-to-left editor.
  • +
  • Fix a crash when combining file drop with a "beforeChange" filter.
  • +
  • Prevent issue when passing negative coordinates to scrollTo.
  • +
  • lint and tern addons: Allow the tooltip to be appended to the editor wrapper element instead of the document body.
  • +
+ +

20-01-2020: Version 5.51.0:

+ +
    +
  • Fix the behavior of the home and end keys when direction is set to "rtl".
  • +
  • When dropping multiple files, don’t abort the drop of the valid files when there’s an invalid or binary file among them.
  • +
  • Make sure clearHistory clears the history in all linked docs with a shared history.
  • +
  • vim bindings: Fix behavior of ' and ` marks, fix R in visual mode.
  • +
  • vim bindings: Support gi, gI, and gJ.
  • +
+ +

01-01-2020: Version 5.50.2:

+ +
    +
  • Fix bug that broke removal of line widgets.
  • +
+ +

20-12-2019: Version 5.50.0:

+ + + +

21-10-2019: Version 5.49.2:

+ + + +

20-09-2019: Version 5.49.0:

+ + + +

20-08-2019: Version 5.48.4:

+ +
    +
  • Make default styles for line elements more specific so that they don’t apply to all <pre> elements inside the editor.
  • +
  • Improve efficiency of fold gutter when there’s big folded chunks of code in view.
  • +
  • Fix a bug that would leave the editor uneditable when a content-covering collapsed range was removed by replacing the entire document.
  • +
  • julia mode: Support number separators.
  • +
  • asterisk mode: Improve comment support.
  • +
  • handlebars mode: Support triple-brace tags.
  • +
+ +

20-07-2019: Version 5.48.2:

+ +
    +
  • vim bindings: Adjust char escape substitution to match vim, support &/$0.
  • +
  • search addon: Try to make backslash behavior in query strings less confusing.
  • +
  • javascript mode: Handle numeric separators, strings in arrow parameter defaults, and TypeScript in operator in index types.
  • +
  • sparql mode: Allow non-ASCII identifier characters.
  • +
+ +

20-06-2019: Version 5.48.0:

+ +
    +
  • Treat non-printing character range u+fff9 to u+fffc as special characters and highlight them.
  • +
  • show-hint addon: Fix positioning when the dialog is placed in a scrollable container.
  • +
  • Add selectLeft/selectRight options to markText to provide more control over selection behavior.
  • +
+ +

21-05-2019: Version 5.47.0:

+ +
    +
  • python mode: Properly handle ... syntax.
  • +
  • ruby mode: Fix indenting before closing brackets.
  • +
  • vim bindings: Fix repeat for C-v I, fix handling of fat cursor C-v c Esc and 0, fix @@, fix block-wise yank.
  • +
  • vim bindings: Add support for ` text object.
  • +
+ +

22-04-2019: Version 5.46.0:

+ +
    +
  • Allow gutters to specify direct CSS stings.
  • +
  • Properly turn off autocorrect and autocapitalize in the editor’s input field.
  • +
  • Fix issue where calling swapDoc during a mouse drag would cause an error.
  • +
  • Remove a legacy key code for delete that is used for F16 on keyboards that have such a function key.
  • +
  • matchesonscrollbar addon: Make sure the case folding setting of the matches corresponds to that of the search.
  • +
  • swift mode: Fix handling of empty strings.
  • +
+ +

20-03-2019: Version 5.45.0:

+ + + +

21-02-2019: Version 5.44.0:

+ +
    +
  • vim bindings: Properly emulate forward-delete.
  • +
  • New theme: nord.
  • +
  • Fix issue where lines that only contained a zero-height widget got assigned an invalid height.
  • +
  • Improve support for middle-click paste on X Windows.
  • +
  • Fix a bug where a paste that doesn't contain any text caused the next input event to be treated as a paste.
  • +
  • show-hint addon: Fix accidental global variable.
  • +
  • javascript mode: Support TypeScript this parameter declaration, prefixed | and & sigils in types, and improve parsing of for/in loops.
  • +
+ +

21-01-2019: Version 5.43.0:

+ +
    +
  • Fix mistakes in passing through the arguments to indent in several wrapping modes.
  • +
  • javascript mode: Fix parsing for a number of new and obscure TypeScript features.
  • +
  • ruby mode: Support indented end tokens for heredoc strings.
  • +
  • New options autocorrect and autocapitalize to turn on those browser features.
  • +
+ +

21-12-2018: Version 5.42.2:

+ +
    +
  • Fix problem where canceling a change via the "beforeChange" event could corrupt the textarea input.
  • +
  • Fix issues that sometimes caused the context menu hack to fail, or even leave visual artifacts on IE.
  • +
  • vim bindings: Make it possible to select text between angle brackets.
  • +
  • css mode: Fix tokenizing of CSS variables.
  • +
  • python mode: Fix another bug in tokenizing of format strings.
  • +
  • soy mode: More accurate highlighting.
  • +
+ +

20-11-2018: Version 5.42.0:

+ +
    +
  • The markText method now takes an attributes option that can be used to add attributes text's HTML representation.
  • +
  • vim bindings: Add support for the = binding.
  • +
  • Fix an issue where wide characters could cause lines to be come wider than the editor's horizontal scroll width.
  • +
  • Optimize handling of window resize events.
  • +
  • show-hint addon: Don't assume the hints are shown in the same document the library was loaded in.
  • +
  • python mode: Fix bug where a string inside a template string broke highlighting.
  • +
  • swift mode: Support multi-line strings.
  • +
+ +

25-10-2018: Version 5.41.0:

+ +
    +
  • A new selectionsMayTouch option controls whether multiple selections are joined when they touch (the default) or not.
  • +
  • vim bindings: Add noremap binding command.
  • +
  • Fix firing of "gutterContextMenu" event on Firefox.
  • +
  • Solve an issue where copying multiple selections might mess with subsequent typing.
  • +
  • Don't crash when endOperation is called with no operation active.
  • +
  • vim bindings: Fix insert mode repeat after visualBlock edits.
  • +
  • scheme mode: Improve highlighting of quoted expressions.
  • +
  • soy mode: Support injected data and @param in comments.
  • +
  • objective c mode: Improve conformance to the actual language.
  • +
+ +

20-09-2018: Version 5.40.2:

+ +
    +
  • Fix firing of gutterContextMenu event on Firefox.
  • +
  • Add hintWords (basic completion) helper to clojure, mllike, julia, shell, and r modes.
  • +
  • clojure mode: Clean up and improve.
  • +
+ +

25-08-2018: Version 5.40.0:

+ +
    +
  • New method phrase and option phrases to make translating UI text in addons easier.
  • +
  • closebrackets addon: Fix issue where bracket-closing wouldn't work before punctuation.
  • +
  • panel addon: Fix problem where replacing the last remaining panel dropped the newly added panel.
  • +
  • hardwrap addon: Fix an infinite loop when the indentation is greater than the target column.
  • +
  • jinja2 and markdown modes: Add comment metadata.
  • +
+ +

20-07-2018: Version 5.39.2:

+ +
    +
  • Fix issue where when you pass the document as a Doc instance to the CodeMirror constructor, the mode option was ignored.
  • +
  • Fix bug where line height could be computed wrong with a line widget below a collapsed line.
  • +
  • Fix overeager .npmignore dropping the bin/source-highlight utility from the distribution.
  • +
  • show-hint addon: Fix behavior when backspacing to the start of the line with completions open.
  • +
+ +

20-06-2018: Version 5.39.0:

+ +
    +
  • Fix issue that in some circumstances caused content to be clipped off at the bottom after a resize.
  • +
  • markdown mode: Improve handling of blank lines in HTML tags.
  • +
  • stex mode: Add an inMathMode option to start the mode in math mode.
  • +
+ +

21-05-2018: Version 5.38.0:

+ +
    +
  • Improve reliability of noticing a missing mouseup event during dragging.
  • +
  • Make sure getSelection is always called on the correct document.
  • +
  • Fix interpretation of line breaks and non-breaking spaces inserted by renderer in contentEditable mode.
  • +
  • Work around some browsers inexplicably making the fake scrollbars focusable.
  • +
  • Make sure coordsChar doesn't return positions inside collapsed ranges.
  • +
  • javascript mode: Support block scopes, bindingless catch, bignum suffix, s regexp flag.
  • +
  • markdown mode: Adjust a wasteful regexp.
  • +
  • show-hint addon: Allow opening the control without any item selected.
  • +
  • New theme: darcula.
  • +
  • dialog addon: Add a CSS class (dialog-opened) to the editor when a dialog is open.
  • +
+ +

20-04-2018: Version 5.37.0:

+ +
    +
  • Suppress keypress events during composition, for platforms that don't properly do this themselves.
  • +
  • xml-fold addon: Improve handling of line-wrapped opening tags.
  • +
  • javascript mode: Improve TypeScript support.
  • +
  • python mode: Highlight expressions inside format strings.
  • +
  • vim bindings: Add support for '(' and ')' movement.
  • +
  • New themes: idea, ssms, gruvbox-dark.
  • +
+ +

20-03-2018: Version 5.36.0:

+ +
    +
  • Make sure all document-level event handlers are registered on the document that the editor is part of.
  • +
  • Fix issue that prevented edits whose origin starts with + from being combined in history events for an editor-less document.
  • +
  • multiplex addon: Improve handling of indentation.
  • +
  • merge addon: Use CSS :after element to style the scroll-lock icon.
  • +
  • javascript-hint addon: Don't provide completions in JSON mode.
  • +
  • continuelist addon: Fix numbering error.
  • +
  • show-hint addon: Make fromList completion strategy act on the current token up to the cursor, rather than the entire token.
  • +
  • markdown mode: Fix a regexp with potentially exponental complexity.
  • +
  • New theme: lucario.
  • +
+ +

20-02-2018: Version 5.35.0:

+ +
    +
  • Fix problem where selection undo might change read-only documents.
  • +
  • Fix crash when calling addLineWidget on a document that has no attached editor.
  • +
  • searchcursor addon: Fix behavior of ^ in multiline regexp mode.
  • +
  • match-highlighter addon: Fix problem with matching words that have regexp special syntax in them.
  • +
  • sublime bindings: Fix addCursorToSelection for short lines.
  • +
  • vim bindings: Support alternative delimiters in replace command.
  • +
  • javascript mode: Support TypeScript intersection types, dynamic import.
  • +
  • stex mode: Fix parsing of \( \) delimiters, recognize more atom arguments.
  • +
  • haskell mode: Highlight more builtins, support <* and *>.
  • +
  • sql mode: Make it possible to disable backslash escapes in strings for dialects that don't have them, do this for MS SQL.
  • +
  • dockerfile mode: Highlight strings and ports, recognize more instructions.
  • +
+ +

29-01-2018: Version 5.34.0:

+ + + +

21-12-2017: Version 5.33.0:

+ +
    +
  • lint addon: Make updates more efficient.
  • +
  • css mode: The mode is now properly case-insensitive.
  • +
  • continuelist addon: Fix broken handling of unordered lists introduced in previous release.
  • +
  • swift and scala modes: Support nested block comments.
  • +
  • mllike mode: Improve OCaml support.
  • +
  • sublime bindings: Use the proper key bindings for addCursorToNextLine and addCursorToPrevLine.
  • +
  • jsx mode: Support JSX fragments.
  • +
  • closetag addon: Add an option to disable auto-indenting.
  • +
+ +

22-11-2017: Version 5.32.0:

+ +
    +
  • Increase contrast on default bracket-matching colors.
  • +
  • javascript mode: Recognize TypeScript type parameters for calls, type guards, and type parameter defaults. Improve handling of enum and module keywords.
  • +
  • comment addon: Fix bug when uncommenting a comment that spans all but the last selected line.
  • +
  • searchcursor addon: Fix bug in case folding.
  • +
  • emacs bindings: Prevent single-character deletions from resetting the kill ring.
  • +
  • closebrackets addon: Tweak quote matching behavior.
  • +
  • continuelist addon: Increment ordered list numbers when adding one.
  • +
+ +

20-10-2017: Version 5.31.0:

+ +
    +
  • Modes added with addOverlay now have access to a baseToken method on their input stream, giving access to the tokens of the underlying mode.
  • +
  • Further improve selection drawing and cursor motion in right-to-left documents.
  • +
  • vim bindings: Fix ctrl-w behavior, support quote-dot and backtick-dot marks, make the wide cursor visible in contentEditable input mode.
  • +
  • continuecomment addon: Fix bug when pressing enter after a single-line block comment.
  • +
  • markdown mode: Fix issue with leaving indented fenced code blocks.
  • +
  • javascript mode: Fix bad parsing of operators without spaces between them. Fix some corner cases around semicolon insertion and regexps.
  • +
+ +

20-09-2017: Version 5.30.0:

+ +
    +
  • Fixed a number of issues with drawing right-to-left selections and mouse selection in bidirectional text.
  • +
  • search addon: Fix crash when restarting search after doing empty search.
  • +
  • mark-selection addon: Fix off-by-one bug.
  • +
  • tern addon: Fix bad request made when editing at the bottom of a large document.
  • +
  • javascript mode: Improve parsing in a number of corner cases.
  • +
  • markdown mode: Fix crash when a sub-mode doesn't support indentation, allow uppercase X in task lists.
  • +
  • gfm mode: Don't highlight SHA1 'hashes' without numbers to avoid false positives.
  • +
  • soy mode: Support injected data and @param in comments.
  • +
  • simple mode addon: Allow groups in regexps when token isn't an array.
  • +
+ +

24-08-2017: Version 5.29.0:

+ +
    +
  • Fix crash in contentEditable input style when editing near a bookmark.
  • +
  • Make sure change origins are preserved when splitting changes on read-only marks.
  • +
  • javascript mode: More support for TypeScript syntax.
  • +
  • d mode: Support nested comments.
  • +
  • python mode: Improve tokenizing of operators.
  • +
  • markdown mode: Further improve CommonMark conformance.
  • +
  • css mode: Don't run comment tokens through the mode's state machine.
  • +
  • shell mode: Allow strings to span lines.
  • +
  • search addon: Fix crash in persistent search when extraKeys is null.
  • +
+ +

21-07-2017: Version 5.28.0:

+ +
    +
  • Fix copying of, or replacing editor content with, a single dash character when copying a big selection in some corner cases.
  • +
  • Make "goLineLeft"/"goLineRight" behave better on wrapped lines.
  • +
  • sql mode: Fix tokenizing of multi-dot operator and allow digits in subfield names.
  • +
  • searchcursor addon: Fix infinite loop on some composed character inputs.
  • +
  • markdown mode: Make list parsing more CommonMark-compliant.
  • +
  • gfm mode: Highlight colon syntax for emoji.
  • +
+ +

29-06-2017: Version 5.27.4:

+ +
    +
  • Fix crash when using mode lookahead.
  • +
  • markdown mode: Don't block inner mode's indentation support.
  • +
+ +

22-06-2017: Version 5.27.2:

+ + + +

22-06-2017: Version 5.27.0:

+ +
    +
  • Fix infinite loop in forced display update.
  • +
  • Properly disable the hidden textarea when readOnly is "nocursor".
  • +
  • Calling the Doc constructor without new works again.
  • +
  • sql mode: Handle nested comments.
  • +
  • javascript mode: Improve support for TypeScript syntax.
  • +
  • markdown mode: Fix bug where markup was ignored on indented paragraph lines.
  • +
  • vim bindings: Referencing invalid registers no longer causes an uncaught exception.
  • +
  • rust mode: Add the correct MIME type.
  • +
  • matchbrackets addon: Document options.
  • +
  • Mouse button clicks can now be bound in keymaps by using names like "LeftClick" or "Ctrl-Alt-MiddleTripleClick". When bound to a function, that function will be passed the position of the click as second argument.
  • +
  • The behavior of mouse selection and dragging can now be customized with the configureMouse option.
  • +
  • Modes can now look ahead across line boundaries with the StringStream.lookahead method.
  • +
  • Introduces a "type" token type, makes modes that recognize types output it, and add styling for it to the themes.
  • +
  • New pasteLinesPerSelection option to control the behavior of pasting multiple lines into multiple selections.
  • +
  • searchcursor addon: Support multi-line regular expression matches, and normalize strings when matching.
  • +
+ +

22-05-2017: Version 5.26.0:

+ +
    +
  • In textarea-mode, don't reset the input field during composition.
  • +
  • More careful restoration of selections in widgets, during editor redraw.
  • +
  • vim bindings: Parse line offsets in line or range specs.
  • +
  • javascript mode: More TypeScript parsing fixes.
  • +
  • julia mode: Fix issue where the mode gets stuck.
  • +
  • markdown mode: Understand cross-line links, parse all bracketed things as links.
  • +
  • soy mode: Support single-quoted strings.
  • +
  • go mode: Don't try to indent inside strings or comments.
  • +
+ +

20-04-2017: Version 5.25.2:

+ +
    +
  • Better handling of selections that cover the whole viewport in contentEditable-mode.
  • +
  • No longer accidentally scroll the editor into view when calling setValue.
  • +
  • Work around Chrome Android bug when converting screen coordinates to editor positions.
  • +
  • Make sure long-clicking a selection sets a cursor and doesn't show the editor losing focus.
  • +
  • Fix issue where pointer events were incorrectly disabled on Chrome's overlay scrollbars.
  • +
  • javascript mode: Recognize annotations and TypeScript-style type parameters.
  • +
  • shell mode: Handle nested braces.
  • +
  • markdown mode: Make parsing of strong/em delimiters CommonMark-compliant.
  • +
+ +

20-03-2017: Version 5.25.0:

+ +
    +
  • In contentEditable-mode, properly locate changes that repeat a character when inserted with IME.
  • +
  • Fix handling of selections bigger than the viewport in contentEditable mode.
  • +
  • Improve handling of changes that insert or delete lines in contentEditable mode.
  • +
  • Count Unicode control characters 0x80 to 0x9F as special (non-printing) chars.
  • +
  • Fix handling of shadow DOM roots when finding the active element.
  • +
  • Add role=presentation to more DOM elements to improve screen reader support.
  • +
  • merge addon: Make aligning of unchanged chunks more robust.
  • +
  • comment addon: Fix comment-toggling on a block of text that starts and ends in a (different) block comment.
  • +
  • javascript mode: Improve support for TypeScript syntax.
  • +
  • r mode: Fix indentation after semicolon-less statements.
  • +
  • shell mode: Properly handle escaped parentheses in parenthesized expressions.
  • +
  • markdown mode: Fix a few bugs around leaving fenced code blocks.
  • +
  • soy mode: Improve indentation.
  • +
  • lint addon: Support asynchronous linters that return promises.
  • +
  • continuelist addon: Support continuing task lists.
  • +
  • vim bindings: Make Y behave like yy.
  • +
  • sql mode: Support sqlite dialect.
  • +
+ +

22-02-2017: Version 5.24.2:

+ +
    +
  • javascript mode: Support computed class method names.
  • +
  • merge addon: Improve aligning of unchanged code in the presence of marks and line widgets.
  • +
+ +

20-02-2017: Version 5.24.0:

+ +
    +
  • Positions now support a sticky property which determines whether they should be associated with the character before (value "before") or after (value "after") them.
  • +
  • vim bindings: Make it possible to remove built-in bindings through the API.
  • +
  • comment addon: Support a per-mode useInnerComments option to optionally suppress descending to the inner modes to get comment strings.
  • +
  • A cursor directly before a line-wrapping break is now drawn before or after the line break depending on which direction you arrived from.
  • +
  • Visual cursor motion in line-wrapped right-to-left text should be much more correct.
  • +
  • Fix bug in handling of read-only marked text.
  • +
  • shell mode: Properly tokenize nested parentheses.
  • +
  • python mode: Support underscores in number literals.
  • +
  • sass mode: Uses the full list of CSS properties and keywords from the CSS mode, rather than defining its own incomplete subset. Now depends on the css mode.
  • +
  • css mode: Expose lineComment property for LESS and SCSS dialects. Recognize vendor prefixes on pseudo-elements.
  • +
  • julia mode: Properly indent elseif lines.
  • +
  • markdown mode: Properly recognize the end of fenced code blocks when inside other markup.
  • +
  • scala mode: Improve handling of operators containing #, @, and : chars.
  • +
  • xml mode: Allow dashes in HTML tag names.
  • +
  • javascript mode: Improve parsing of async methods, TypeScript-style comma-separated superclass lists.
  • +
  • indent-fold addon: Ignore comment lines.
  • +
+ +

19-01-2017: Version 5.23.0:

+ +
    +
  • Presentation-related elements DOM elements are now marked as such to help screen readers.
  • +
  • markdown mode: Be more picky about what HTML tags look like to avoid false positives.
  • +
  • findModeByMIME now understands +json and +xml MIME suffixes.
  • +
  • closebrackets addon: Add support for an override option to ignore language-specific defaults.
  • +
  • panel addon: Add a stable option that auto-scrolls the content to keep it in the same place when inserting/removing a panel.
  • +
+ +

20-12-2016: Version 5.22.0:

+ +
    +
  • sublime bindings: Make selectBetweenBrackets work with multiple cursors.
  • +
  • javascript mode: Fix issues with parsing complex TypeScript types, imports, and exports.
  • +
  • A contentEditable editor instance with autofocus enabled no longer crashes during initializing.
  • +
  • emacs bindings: Export CodeMirror.emacs to allow other addons to hook into Emacs-style functionality.
  • +
  • active-line addon: Add nonEmpty option.
  • +
  • New event: optionChange.
  • +
+ +

21-11-2016: Version 5.21.0:

+ +
    +
  • Tapping/clicking the editor in contentEditable mode on Chrome now puts the cursor at the tapped position.
  • +
  • Fix various crashes and misbehavior when reading composition events in contentEditable mode.
  • +
  • Catches and ignores an IE 'Unspecified Error' when creating an editor in an iframe before there is a <body>.
  • +
  • merge addon: Fix several issues in the chunk-aligning feature.
  • +
  • verilog mode: Rewritten to address various issues.
  • +
  • julia mode: Recognize Julia 0.5 syntax.
  • +
  • swift mode: Various fixes and adjustments to current syntax.
  • +
  • markdown mode: Allow lists without a blank line above them.
  • +
  • The setGutterMarker, clearGutter, and lineInfo methods are now available on Doc objects.
  • +
  • The heightAtLine method now takes an extra argument to allow finding the height at the top of the line's line widgets.
  • +
  • ruby mode: else and elsif are now immediately indented.
  • +
  • vim bindings: Bind Ctrl-T and Ctrl-D to in- and dedent in insert mode.
  • +
+ +

20-10-2016: Version 5.20.0:

+ +
    +
  • Make newlineAndIndent command work with multiple cursors on the same line.
  • +
  • Make sure keypress events for backspace are ignored.
  • +
  • Tokens styled with overlays no longer get a nonsense cm-cm-overlay class.
  • +
  • Line endings for pasted content are now normalized to the editor's preferred ending.
  • +
  • javascript mode: Improve support for class expressions. Support TypeScript optional class properties, the abstract keyword, and return type declarations for arrow functions.
  • +
  • css mode: Fix highlighting of mixed-case keywords.
  • +
  • closebrackets addon: Improve behavior when typing a quote before a string.
  • +
  • The core is now maintained as a number of small files, using ES6 syntax and modules, under the src/ directory. A git checkout no longer contains a working codemirror.js until you npm run build (but when installing from NPM, it is included).
  • +
  • The refresh event is now documented and stable.
  • +
+ +

20-09-2016: Version 5.19.0:

+ +
    +
  • erlang mode: Fix mode crash when trying to read an empty context.
  • +
  • comment addon: Fix broken behavior when toggling comments inside a comment.
  • +
  • xml-fold addon: Fix a null-dereference bug.
  • +
  • Page up and page down now do something even in single-line documents.
  • +
  • Fix an issue where the cursor position could be off in really long (~8000 character) tokens.
  • +
  • javascript mode: Better indentation when semicolons are missing. Better support for TypeScript classes, optional parameters, and the type keyword.
  • +
  • The blur and focus events now pass the DOM event to their handlers.
  • +
+ +

23-08-2016: Version 5.18.2:

+ +
    +
  • vue mode: Fix outdated references to renamed Pug mode dependency.
  • +
+ +

22-08-2016: Version 5.18.0:

+ +
    +
  • Make sure gutter backgrounds stick to the rest of the gutter during horizontal scrolling.
  • +
  • The contenteditable inputStyle now properly supports pasting on pre-Edge IE versions.
  • +
  • javascript mode: Fix some small parsing bugs and improve TypeScript support.
  • +
  • matchbrackets addon: Fix bug where active highlighting was left in editor when the addon was disabled.
  • +
  • match-highlighter addon: Only start highlighting things when the editor gains focus.
  • +
  • javascript-hint addon: Also complete non-enumerable properties.
  • +
  • The addOverlay method now supports a priority option to control the order in which overlays are applied.
  • +
  • MIME types that end in +json now default to the JSON mode when the MIME itself is not defined.
  • +
  • The mode formerly known as Jade was renamed to Pug.
  • +
  • The Python mode now defaults to Python 3 (rather than 2) syntax.
  • +
+ +

19-07-2016: Version 5.17.0:

+ +
    +
  • Fix problem with wrapped trailing whitespace displaying incorrectly.
  • +
  • Prevent IME dialog from overlapping typed content in Chrome.
  • +
  • Improve measuring of characters near a line wrap.
  • +
  • javascript mode: Improve support for async, allow trailing commas in import lists.
  • +
  • vim bindings: Fix backspace in replace mode.
  • +
  • sublime bindings: Fix some key bindings on OS X to match Sublime Text.
  • +
  • markdown mode: Add more classes to image links in highlight-formatting mode.
  • +
+ +

20-06-2016: Version 5.16.0:

+ +
    +
  • Fix glitches when dragging content caused by the drop indicator receiving mouse events.
  • +
  • Make Control-drag work on Firefox.
  • +
  • Make clicking or selection-dragging at the end of a wrapped line select the right position.
  • +
  • show-hint addon: Prevent widget scrollbar from hiding part of the hint text.
  • +
  • rulers addon: Prevent rulers from forcing a horizontal editor scrollbar.
  • +
  • search addon: Automatically bind search-related keys in persistent dialog.
  • +
  • sublime keymap: Add a multi-cursor aware smart backspace binding.
  • +
+ +

20-05-2016: Version 5.15.2:

+ +
    +
  • Fix a critical document corruption bug that occurs when a document is gradually grown.
  • +
+ +

20-05-2016: Version 5.15.0:

+ +
    +
  • Fix bug that caused the selection to reset when focusing the editor in contentEditable input mode.
  • +
  • Fix issue where not all ASCII control characters were being replaced by placeholders.
  • +
  • Remove the assumption that all modes have a startState method from several wrapping modes.
  • +
  • Fix issue where the editor would complain about overlapping collapsed ranges when there weren't any.
  • +
  • Optimize document tree building when loading or pasting huge chunks of content.
  • +
  • Explicitly bind Ctrl-O on OS X to make that binding (“open line”) act as expected.
  • +
  • Pasting linewise-copied content when there is no selection now inserts the lines above the current line.
  • +
  • markdown mode: Fix several issues in matching link targets.
  • +
  • clike mode: Improve indentation of C++ template declarations.
  • +
  • javascript mode: Support async/await and improve support for TypeScript type syntax.
  • +
+ +

20-04-2016: Version 5.14.0:

+ + + +

21-03-2016: Version 5.13.2:

+ +
    +
  • Solves a problem where the gutter would sometimes not extend all the way to the end of the document.
  • +
+ +

21-03-2016: Version 5.13:

+ + + +

19-02-2016: Version 5.12:

+ +
    +
  • Vim bindings: Ctrl-Q is now an alias for Ctrl-V.
  • +
  • Vim bindings: The Vim API now exposes an unmap method to unmap bindings.
  • +
  • active-line addon: This addon can now style the active line's gutter.
  • +
  • FCL mode: Newly added.
  • +
  • SQL mode: Now has a Postgresql dialect.
  • +
  • Fix issue where trying to scroll to a horizontal position outside of the document's width could cause the gutter to be positioned incorrectly.
  • +
  • Use absolute, rather than fixed positioning in the context-menu intercept hack, to work around a problem when the editor is inside a transformed parent container.
  • +
  • Solve a problem where the horizontal scrollbar could hide text in Firefox.
  • +
  • Fix a bug that caused phantom scroll space under the text in some situations.
  • +
  • Sublime Text bindings: Bind delete-line to Shift-Ctrl-K on OS X.
  • +
  • Markdown mode: Fix issue where the mode would keep state related to fenced code blocks in an unsafe way, leading to occasional corrupted parses.
  • +
  • Markdown mode: Ignore backslashes in code fragments.
  • +
  • Markdown mode: Use whichever mode is registered as text/html to parse HTML.
  • +
  • Clike mode: Improve indentation of Scala => functions.
  • +
  • Python mode: Improve indentation of bracketed code.
  • +
  • HTMLMixed mode: Support multi-line opening tags for sub-languages (<script>, <style>, etc).
  • +
  • Spreadsheet mode: Fix bug where the mode did not advance the stream when finding a backslash.
  • +
  • XML mode: The mode now takes a matchClosing option to configure whether mismatched closing tags should be highlighted as errors.
  • +
+ +

20-01-2016: Version 5.11:

+ +
    +
  • New modes: JSX, literate Haskell
  • +
  • The editor now forwards more DOM events: cut, copy, paste, and touchstart. It will also forward mousedown for drag events
  • +
  • Fixes a bug where bookmarks next to collapsed spans were not rendered
  • +
  • The Swift mode now supports auto-indentation
  • +
  • Frontmatters in the YAML frontmatter mode are now optional as intended
  • +
  • Full list of patches
  • +
+ +

21-12-2015: Version 5.10:

+ + + +

23-11-2015: Version 5.9:

+ +
    +
  • Improve the way overlay (OS X-style) scrollbars are handled
  • +
  • Make annotatescrollbar and scrollpastend addons work properly together
  • +
  • Make show-hint addon select options on single click by default, move selection to hovered item
  • +
  • Properly fold comments that include block-comment-start markers
  • +
  • Many small language mode fixes
  • +
  • Full list of patches
  • +
+ +

20-10-2015: Version 5.8:

+ + + +

20-09-2015: Version 5.7:

+ + + +

20-08-2015: Version 5.6:

+ +
    +
  • Fix bug where you could paste into a readOnly editor
  • +
  • Show a cursor at the drop location when dragging over the editor
  • +
  • The Rust mode was rewritten to handle modern Rust
  • +
  • The editor and theme CSS was cleaned up. Some selectors are now less specific than before
  • +
  • New theme: abcdef
  • +
  • Lines longer than maxHighlightLength are now less likely to mess up indentation
  • +
  • New addons: autorefresh for refreshing an editor the first time it becomes visible, and html-lint for using HTMLHint
  • +
  • The search addon now recognizes \r and \n in pattern and replacement input
  • +
  • Full list of patches
  • +
+ +

20-07-2015: Version 5.5:

+ + + +

25-06-2015: Version 5.4:

+ + + +

20-05-2015: Version 5.3:

+ + + +

20-04-2015: Version 5.2:

+ + + +

23-03-2015: Version 5.1:

+ + + +

20-02-2015: Version 5.0:

+ +
    +
  • Experimental mobile support (tested on iOS, Android Chrome, stock Android browser)
  • +
  • New option inputStyle to switch between hidden textarea and contenteditable input.
  • +
  • The getInputField + method is no longer guaranteed to return a textarea.
  • +
  • Full list of patches.
  • +
+ +
+ +
+ +

Version 4.x

+ +

20-02-2015: Version 4.13:

+ + + +

22-01-2015: Version 4.12:

+ + + +

9-01-2015: Version 4.11:

+ +

Unfortunately, 4.10 did not take care of the + Firefox scrolling issue entirely. This release adds two more patches + to address that.

+ +

29-12-2014: Version 4.10:

+ +

Emergency single-patch update to 4.9. Fixes + Firefox-specific problem where the cursor could end up behind the + horizontal scrollbar.

+ +

23-12-2014: Version 4.9:

+ + + +

22-11-2014: Version 4.8:

+ + + +

20-10-2014: Version 4.7:

+ +
    +
  • Incompatible: + The lint addon now passes the + editor's value as first argument to asynchronous lint functions, + for consistency. The editor is still passed, as fourth + argument.
  • +
  • Improved handling of unicode identifiers in modes for + languages that support them.
  • +
  • More mode + improvements: CoffeeScript + (indentation), Verilog + (indentation), Scala + (indentation, triple-quoted strings), + and PHP (interpolated + variables in heredoc strings).
  • +
  • New modes: Textile and Tornado templates.
  • +
  • Experimental new way to define modes.
  • +
  • Improvements to the Vim + bindings: Arbitrary insert mode key mappings are now possible, + and text objects are supported in visual mode.
  • +
  • The mode meta-information file + now includes information about file extensions, + and helper + functions findModeByMIME + and findModeByExtension.
  • +
  • New logo!
  • +
  • Full list of patches.
  • +
+ +

19-09-2014: Version 4.6:

+ + + +

21-08-2014: Version 4.5:

+ +
    +
  • Fix several serious bugs with horizontal scrolling
  • +
  • New mode: Slim
  • +
  • New command: goLineLeftSmart
  • +
  • More fixes and extensions for the Vim visual block mode
  • +
  • Full list of patches.
  • +
+ +

21-07-2014: Version 4.4:

+ +
    +
  • Note: Some events might now fire in slightly + different order ("change" is still guaranteed to fire + before "cursorActivity")
  • +
  • Nested operations in multiple editors are now synced (complete + at same time, reducing DOM reflows)
  • +
  • Visual block mode for vim (<C-v>) is nearly complete
  • +
  • New mode: Kotlin
  • +
  • Better multi-selection paste for text copied from multiple CodeMirror selections
  • +
  • Full list of patches.
  • +
+ +

23-06-2014: Version 4.3:

+ +
    +
  • Several vim bindings + improvements: search and exCommand history, global flag + for :substitute, :global command. +
  • Allow hiding the cursor by + setting cursorBlinkRate + to a negative value.
  • +
  • Make gutter markers themeable, use this in foldgutter.
  • +
  • Full list of patches.
  • +
+ +

19-05-2014: Version 4.2:

+ +
    +
  • Fix problem where some modes were broken by the fact that empty tokens were forbidden.
  • +
  • Several fixes to context menu handling.
  • +
  • On undo, scroll change, not cursor, into view.
  • +
  • Rewritten Jade mode.
  • +
  • Various improvements to Shell (support for more syntax) and Python (better indentation) modes.
  • +
  • New mode: Cypher.
  • +
  • New theme: Neo.
  • +
  • Support direct styling options (color, line style, width) in the rulers addon.
  • +
  • Recognize per-editor configuration for the show-hint and foldcode addons.
  • +
  • More intelligent scanning for existing close tags in closetag addon.
  • +
  • In the Vim bindings: Fix bracket matching, support case conversion in visual mode, visual paste, append action.
  • +
  • Full list of patches.
  • +
+ +

22-04-2014: Version 4.1:

+ +
    +
  • Slightly incompatible: + The "cursorActivity" + event now fires after all other events for the operation (and only + for handlers that were actually registered at the time the + activity happened).
  • +
  • New command: insertSoftTab.
  • +
  • New mode: Django.
  • +
  • Improved modes: Verilog (rewritten), Jinja2, Haxe, PHP (string interpolation highlighted), JavaScript (indentation of trailing else, template strings), LiveScript (multi-line strings).
  • +
  • Many small issues from the 3.x→4.x transition were found and fixed.
  • +
  • Full list of patches.
  • +
+ +

20-03-2014: Version 4.0:

+ +

This is a new major version of CodeMirror. There + are a few incompatible changes in the API. Upgrade + with care, and read the upgrading + guide.

+ + + +
+ +
+ +

Version 3.x

+ +

22-04-2014: Version 3.24:

+ +

Merges the improvements from 4.1 that could + easily be applied to the 3.x code. Also improves the way the editor + size is updated when line widgets change.

+ +

20-03-2014: Version 3.23:

+ +
    +
  • In the XML mode, + add brackets style to angle brackets, fix + case-sensitivity of tags for HTML.
  • +
  • New mode: Dylan.
  • +
  • Many improvements to the Vim bindings.
  • +
+ +

21-02-2014: Version 3.22:

+ + + +

16-01-2014: Version 3.21:

+ +
    +
  • Auto-indenting a block will no longer add trailing whitespace to blank lines.
  • +
  • Marking text has a new option clearWhenEmpty to control auto-removal.
  • +
  • Several bugfixes in the handling of bidirectional text.
  • +
  • The XML and CSS modes were largely rewritten. LESS support was added to the CSS mode.
  • +
  • The OCaml mode was moved to an mllike mode, F# support added.
  • +
  • Make it possible to fetch multiple applicable helper values with getHelpers, and to register helpers matched on predicates with registerGlobalHelper.
  • +
  • New theme pastel-on-dark.
  • +
  • Better ECMAScript 6 support in JavaScript mode.
  • +
  • Full list of patches.
  • +
+ +

21-11-2013: Version 3.20:

+ + + +

21-10-2013: Version 3.19:

+ + + +

23-09-2013: Version 3.18:

+ +

Emergency release to fix a problem in 3.17 + where .setOption("lineNumbers", false) would raise an + error.

+ +

23-09-2013: Version 3.17:

+ + + +

21-08-2013: Version 3.16:

+ + + +

29-07-2013: Version 3.15:

+ + + +

20-06-2013: Version 3.14:

+ + + +

20-05-2013: Version 3.13:

+ + + +

19-04-2013: Version 3.12:

+ + + +

20-03-2013: Version 3.11:

+ + + +

21-02-2013: Version 3.1:

+ + + + +

25-01-2013: Version 3.02:

+ +

Single-bugfix release. Fixes a problem that + prevents CodeMirror instances from being garbage-collected after + they become unused.

+ +

21-01-2013: Version 3.01:

+ + + +

10-12-2012: Version 3.0:

+ +

New major version. Only + partially backwards-compatible. See + the upgrading guide for more + information. Changes since release candidate 2:

+ +
    +
  • Rewritten VIM mode.
  • +
  • Fix a few minor scrolling and sizing issues.
  • +
  • Work around Safari segfault when dragging.
  • +
  • Full list of patches.
  • +
+ +

20-11-2012: Version 3.0, release candidate 2:

+ +
    +
  • New mode: HTTP.
  • +
  • Improved handling of selection anchor position.
  • +
  • Improve IE performance on longer lines.
  • +
  • Reduce gutter glitches during horiz. scrolling.
  • +
  • Add addKeyMap and removeKeyMap methods.
  • +
  • Rewrite formatting and closetag add-ons.
  • +
  • Full list of patches.
  • +
+ +

20-11-2012: Version 3.0, release candidate 1:

+ + + +

22-10-2012: Version 3.0, beta 2:

+ +
    +
  • Fix page-based coordinate computation.
  • +
  • Fix firing of gutterClick event.
  • +
  • Add cursorHeight option.
  • +
  • Fix bi-directional text regression.
  • +
  • Add viewportMargin option.
  • +
  • Directly handle mousewheel events (again, hopefully better).
  • +
  • Make vertical cursor movement more robust (through widgets, big line gaps).
  • +
  • Add flattenSpans option.
  • +
  • Many optimizations. Poor responsiveness should be fixed.
  • +
  • Initialization in hidden state works again.
  • +
  • Full list of patches.
  • +
+ +

19-09-2012: Version 3.0, beta 1:

+ +
    +
  • Bi-directional text support.
  • +
  • More powerful gutter model.
  • +
  • Support for arbitrary text/widget height.
  • +
  • In-line widgets.
  • +
  • Generalized event handling.
  • +
+ +
+ +
+ +

Version 2.x

+ +

21-01-2013: Version 2.38:

+ +

Integrate some bugfixes, enhancements to the vim keymap, and new + modes + (D, Sass, APL) + from the v3 branch.

+ +

20-12-2012: Version 2.37:

+ +
    +
  • New mode: SQL (will replace plsql and mysql modes).
  • +
  • Further work on the new VIM mode.
  • +
  • Fix Cmd/Ctrl keys on recent Operas on OS X.
  • +
  • Full list of patches.
  • +
+ +

20-11-2012: Version 2.36:

+ + + +

22-10-2012: Version 2.35:

+ +
    +
  • New (sub) mode: TypeScript.
  • +
  • Don't overwrite (insert key) when pasting.
  • +
  • Fix several bugs in markText/undo interaction.
  • +
  • Better indentation of JavaScript code without semicolons.
  • +
  • Add defineInitHook function.
  • +
  • Full list of patches.
  • +
+ +

19-09-2012: Version 2.34:

+ +
    +
  • New mode: Common Lisp.
  • +
  • Fix right-click select-all on most browsers.
  • +
  • Change the way highlighting happens:
      Saves memory and CPU cycles.
      compareStates is no longer needed.
      onHighlightComplete no longer works.
  • +
  • Integrate mode (Markdown, XQuery, CSS, sTex) tests in central testsuite.
  • +
  • Add a CodeMirror.version property.
  • +
  • More robust handling of nested modes in formatting and closetag plug-ins.
  • +
  • Un/redo now preserves marked text and bookmarks.
  • +
  • Full list of patches.
  • +
+ +

23-08-2012: Version 2.33:

+ +
    +
  • New mode: Sieve.
  • +
  • New getViewPort and onViewportChange API.
  • +
  • Configurable cursor blink rate.
  • +
  • Make binding a key to false disabling handling (again).
  • +
  • Show non-printing characters as red dots.
  • +
  • More tweaks to the scrolling model.
  • +
  • Expanded testsuite. Basic linter added.
  • +
  • Remove most uses of innerHTML. Remove CodeMirror.htmlEscape.
  • +
  • Full list of patches.
  • +
+ +

23-07-2012: Version 2.32:

+ +

Emergency fix for a bug where an editor with + line wrapping on IE will break when there is no + scrollbar.

+ +

20-07-2012: Version 2.31:

+ + + +

22-06-2012: Version 2.3:

+ +
    +
  • New scrollbar implementation. Should flicker less. Changes DOM structure of the editor.
  • +
  • New theme: vibrant-ink.
  • +
  • Many extensions to the VIM keymap (including text objects).
  • +
  • Add mode-multiplexing utility script.
  • +
  • Fix bug where right-click paste works in read-only mode.
  • +
  • Add a getScrollInfo method.
  • +
  • Lots of other fixes.
  • +
+ +

23-05-2012: Version 2.25:

+ +
    +
  • New mode: Erlang.
  • +
  • Remove xmlpure mode (use xml.js).
  • +
  • Fix line-wrapping in Opera.
  • +
  • Fix X Windows middle-click paste in Chrome.
  • +
  • Fix bug that broke pasting of huge documents.
  • +
  • Fix backspace and tab key repeat in Opera.
  • +
+ +

23-04-2012: Version 2.24:

+ +
    +
  • Drop support for Internet Explorer 6.
  • +
  • New + modes: Shell, Tiki + wiki, Pig Latin.
  • +
  • New themes: Ambiance, Blackboard.
  • +
  • More control over drag/drop + with dragDrop + and onDragEvent + options.
  • +
  • Make HTML mode a bit less pedantic.
  • +
  • Add compoundChange API method.
  • +
  • Several fixes in undo history and line hiding.
  • +
  • Remove (broken) support for catchall in key maps, + add nofallthrough boolean field instead.
  • +
+ +

26-03-2012: Version 2.23:

+ +
    +
  • Change default binding for tab [more] + +
  • +
  • New modes: XQuery and VBScript.
  • +
  • Two new themes: lesser-dark and xq-dark.
  • +
  • Differentiate between background and text styles in setLineClass.
  • +
  • Fix drag-and-drop in IE9+.
  • +
  • Extend charCoords + and cursorCoords with a mode argument.
  • +
  • Add autofocus option.
  • +
  • Add findMarksAt method.
  • +
+ +

27-02-2012: Version 2.22:

+ + + +

27-01-2012: Version 2.21:

+ +
    +
  • Added LESS, MySQL, + Go, and Verilog modes.
  • +
  • Add smartIndent + option.
  • +
  • Support a cursor in readOnly-mode.
  • +
  • Support assigning multiple styles to a token.
  • +
  • Use a new approach to drawing the selection.
  • +
  • Add scrollTo method.
  • +
  • Allow undo/redo events to span non-adjacent lines.
  • +
  • Lots and lots of bugfixes.
  • +
+ +

20-12-2011: Version 2.2:

+ + + +

21-11-2011: Version 2.18:

+

Fixes TextMarker.clear, which is broken in 2.17.

+ +

21-11-2011: Version 2.17:

+
    +
  • Add support for line + wrapping and code + folding.
  • +
  • Add GitHub-style Markdown mode.
  • +
  • Add Monokai + and Rubyblue themes.
  • +
  • Add setBookmark method.
  • +
  • Move some of the demo code into reusable components + under lib/util.
  • +
  • Make screen-coord-finding code faster and more reliable.
  • +
  • Fix drag-and-drop in Firefox.
  • +
  • Improve support for IME.
  • +
  • Speed up content rendering.
  • +
  • Fix browser's built-in search in Webkit.
  • +
  • Make double- and triple-click work in IE.
  • +
  • Various fixes to modes.
  • +
+ +

27-10-2011: Version 2.16:

+
    +
  • Add Perl, Rust, TiddlyWiki, and Groovy modes.
  • +
  • Dragging text inside the editor now moves, rather than copies.
  • +
  • Add a coordsFromIndex method.
  • +
  • API change: setValue now no longer clears history. Use clearHistory for that.
  • +
  • API change: markText now + returns an object with clear and find + methods. Marked text is now more robust when edited.
  • +
  • Fix editing code with tabs in Internet Explorer.
  • +
+ +

26-09-2011: Version 2.15:

+

Fix bug that snuck into 2.14: Clicking the + character that currently has the cursor didn't re-focus the + editor.

+ +

26-09-2011: Version 2.14:

+ + + +

23-08-2011: Version 2.13:

+ + +

25-07-2011: Version 2.12:

+
    +
  • Add a SPARQL mode.
  • +
  • Fix bug with cursor jumping around in an unfocused editor in IE.
  • +
  • Allow key and mouse events to bubble out of the editor. Ignore widget clicks.
  • +
  • Solve cursor flakiness after undo/redo.
  • +
  • Fix block-reindent ignoring the last few lines.
  • +
  • Fix parsing of multi-line attrs in XML mode.
  • +
  • Use innerHTML for HTML-escaping.
  • +
  • Some fixes to indentation in C-like mode.
  • +
  • Shrink horiz scrollbars when long lines removed.
  • +
  • Fix width feedback loop bug that caused the width of an inner DIV to shrink.
  • +
+ +

04-07-2011: Version 2.11:

+
    +
  • Add a Scheme mode.
  • +
  • Add a replace method to search cursors, for cursor-preserving replacements.
  • +
  • Make the C-like mode mode more customizable.
  • +
  • Update XML mode to spot mismatched tags.
  • +
  • Add getStateAfter API and compareState mode API methods for finer-grained mode magic.
  • +
  • Add a getScrollerElement API method to manipulate the scrolling DIV.
  • +
  • Fix drag-and-drop for Firefox.
  • +
  • Add a C# configuration for the C-like mode.
  • +
  • Add full-screen editing and mode-changing demos.
  • +
+ +

07-06-2011: Version 2.1:

+

Add + a theme system + (demo). Note that this is not + backwards-compatible—you'll have to update your styles and + modes!

+ +

07-06-2011: Version 2.02:

+
    +
  • Add a Lua mode.
  • +
  • Fix reverse-searching for a regexp.
  • +
  • Empty lines can no longer break highlighting.
  • +
  • Rework scrolling model (the outer wrapper no longer does the scrolling).
  • +
  • Solve horizontal jittering on long lines.
  • +
  • Add runmode.js.
  • +
  • Immediately re-highlight text when typing.
  • +
  • Fix problem with 'sticking' horizontal scrollbar.
  • +
+ +

26-05-2011: Version 2.01:

+
    +
  • Add a Smalltalk mode.
  • +
  • Add a reStructuredText mode.
  • +
  • Add a Python mode.
  • +
  • Add a PL/SQL mode.
  • +
  • coordsChar now works
  • +
  • Fix a problem where onCursorActivity interfered with onChange.
  • +
  • Fix a number of scrolling and mouse-click-position glitches.
  • +
  • Pass information about the changed lines to onChange.
  • +
  • Support cmd-up/down on OS X.
  • +
  • Add triple-click line selection.
  • +
  • Don't handle shift when changing the selection through the API.
  • +
  • Support "nocursor" mode for readOnly option.
  • +
  • Add an onHighlightComplete option.
  • +
  • Fix the context menu for Firefox.
  • +
+ +

28-03-2011: Version 2.0:

+

CodeMirror 2 is a complete rewrite that's + faster, smaller, simpler to use, and less dependent on browser + quirks. See this + and this + for more information.

+ +

22-02-2011: Version 2.0 beta 2:

+

Somewhat more mature API, lots of bugs shaken out.

+ +

17-02-2011: Version 0.94:

+
    +
  • tabMode: "spaces" was modified slightly (now indents when something is selected).
  • +
  • Fixes a bug that would cause the selection code to break on some IE versions.
  • +
  • Disabling spell-check on WebKit browsers now works.
  • +
+ +

08-02-2011: Version 2.0 beta 1:

+

CodeMirror 2 is a complete rewrite of + CodeMirror, no longer depending on an editable frame.

+ +

19-01-2011: Version 0.93:

+
    +
  • Added a Regular Expression parser.
  • +
  • Fixes to the PHP parser.
  • +
  • Support for regular expression in search/replace.
  • +
  • Add save method to instances created with fromTextArea.
  • +
  • Add support for MS T-SQL in the SQL parser.
  • +
  • Support use of CSS classes for highlighting brackets.
  • +
  • Fix yet another hang with line-numbering in hidden editors.
  • +
+
+ +
+ +

Version 0.x

+ +

28-03-2011: Version 1.0:

+
    +
  • Fix error when debug history overflows.
  • +
  • Refine handling of C# verbatim strings.
  • +
  • Fix some issues with JavaScript indentation.
  • +
+ +

17-12-2010: Version 0.92:

+
    +
  • Make CodeMirror work in XHTML documents.
  • +
  • Fix bug in handling of backslashes in Python strings.
  • +
  • The styleNumbers option is now officially + supported and documented.
  • +
  • onLineNumberClick option added.
  • +
  • More consistent names onLoad and + onCursorActivity callbacks. Old names still work, but + are deprecated.
  • +
  • Add a Freemarker mode.
  • +
+ +

11-11-2010: Version 0.91:

+
    +
  • Adds support for Java.
  • +
  • Small additions to the PHP and SQL parsers.
  • +
  • Work around various Webkit issues.
  • +
  • Fix toTextArea to update the code in the textarea.
  • +
  • Add a noScriptCaching option (hack to ease development).
  • +
  • Make sub-modes of HTML mixed mode configurable.
  • +
+ +

02-10-2010: Version 0.9:

+
    +
  • Add support for searching backwards.
  • +
  • There are now parsers for Scheme, XQuery, and OmetaJS.
  • +
  • Makes height: "dynamic" more robust.
  • +
  • Fixes bug where paste did not work on OS X.
  • +
  • Add a enterMode and electricChars options to make indentation even more customizable.
  • +
  • Add firstLineNumber option.
  • +
  • Fix bad handling of @media rules by the CSS parser.
  • +
  • Take a new, more robust approach to working around the invisible-last-line bug in WebKit.
  • +
+ +

22-07-2010: Version 0.8:

+
    +
  • Add a cursorCoords method to find the screen + coordinates of the cursor.
  • +
  • A number of fixes and support for more syntax in the PHP parser.
  • +
  • Fix indentation problem with JSON-mode JS parser in Webkit.
  • +
  • Add a minification UI.
  • +
  • Support a height: dynamic mode, where the editor's + height will adjust to the size of its content.
  • +
  • Better support for IME input mode.
  • +
  • Fix JavaScript parser getting confused when seeing a no-argument + function call.
  • +
  • Have CSS parser see the difference between selectors and other + identifiers.
  • +
  • Fix scrolling bug when pasting in a horizontally-scrolled + editor.
  • +
  • Support toTextArea method in instances created with + fromTextArea.
  • +
  • Work around new Opera cursor bug that causes the cursor to jump + when pressing backspace at the end of a line.
  • +
+ +

27-04-2010: Version + 0.67:

+

More consistent page-up/page-down behaviour + across browsers. Fix some issues with hidden editors looping forever + when line-numbers were enabled. Make PHP parser parse + "\\" correctly. Have jumpToLine work on + line handles, and add cursorLine function to fetch the + line handle where the cursor currently is. Add new + setStylesheet function to switch style-sheets in a + running editor.

+ +

01-03-2010: Version + 0.66:

+

Adds removeLine method to API. + Introduces the PLSQL parser. + Marks XML errors by adding (rather than replacing) a CSS class, so + that they can be disabled by modifying their style. Fixes several + selection bugs, and a number of small glitches.

+ +

12-11-2009: Version + 0.65:

+

Add support for having both line-wrapping and + line-numbers turned on, make paren-highlighting style customisable + (markParen and unmarkParen config + options), work around a selection bug that Opera + reintroduced in version 10.

+ +

23-10-2009: Version + 0.64:

+

Solves some issues introduced by the + paste-handling changes from the previous release. Adds + setSpellcheck, setTextWrapping, + setIndentUnit, setUndoDepth, + setTabMode, and setLineNumbers to + customise a running editor. Introduces an SQL parser. Fixes a few small + problems in the Python + parser. And, as usual, add workarounds for various newly discovered + browser incompatibilities.

+ +

31-08-2009: Version 0.63:

+

Overhaul of paste-handling (less fragile), fixes for several + serious IE8 issues (cursor jumping, end-of-document bugs) and a number + of small problems.

+ +

30-05-2009: Version 0.62:

+

Introduces Python + and Lua parsers. Add + setParser (on-the-fly mode changing) and + clearHistory methods. Make parsing passes time-based + instead of lines-based (see the passTime option).

+ +
+
diff --git a/js/codemirror/doc/reporting.html b/js/codemirror/doc/reporting.html new file mode 100644 index 0000000..42753ad --- /dev/null +++ b/js/codemirror/doc/reporting.html @@ -0,0 +1,60 @@ + + +CodeMirror: Reporting Bugs + + + + + +
+ +

Reporting bugs effectively

+ +
+ +

So you found a problem in CodeMirror. By all means, report it! Bug +reports from users are the main drive behind improvements to +CodeMirror. But first, please read over these points:

+ +
    +
  1. CodeMirror is maintained by volunteers. They don't owe you + anything, so be polite. Reports with an indignant or belligerent + tone tend to be moved to the bottom of the pile.
  2. + +
  3. Include information about the browser in which the + problem occurred. Even if you tested several browsers, and + the problem occurred in all of them, mention this fact in the bug + report. Also include browser version numbers and the operating + system that you're on.
  4. + +
  5. Mention which release of CodeMirror you're using. Preferably, + try also with the current development snapshot, to ensure the + problem has not already been fixed.
  6. + +
  7. Mention very precisely what went wrong. "X is broken" is not a + good bug report. What did you expect to happen? What happened + instead? Describe the exact steps a maintainer has to take to reproduce + the error. We can not fix something that we can not observe.
  8. + +
  9. If the problem can not be reproduced in any of the demos + included in the CodeMirror distribution, please provide an HTML + document that demonstrates the problem. The best way to do this is + to go to jsbin.com, enter + it there, press save, and include the resulting link in your bug + report.
  10. +
+ +
+ +
diff --git a/js/codemirror/doc/source_sans.woff b/js/codemirror/doc/source_sans.woff new file mode 100644 index 0000000..39033e4 Binary files /dev/null and b/js/codemirror/doc/source_sans.woff differ diff --git a/js/codemirror/doc/upgrade_v2.2.html b/js/codemirror/doc/upgrade_v2.2.html new file mode 100644 index 0000000..89ea14a --- /dev/null +++ b/js/codemirror/doc/upgrade_v2.2.html @@ -0,0 +1,96 @@ + + +CodeMirror: Version 2.2 upgrade guide + + + + + +
+ +

Upgrading to v2.2

+ +

There are a few things in the 2.2 release that require some care +when upgrading.

+ +

No more default.css

+ +

The default theme is now included +in codemirror.css, so +you do not have to included it separately anymore. (It was tiny, so +even if you're not using it, the extra data overhead is negligible.) + +

Different key customization

+ +

CodeMirror has moved to a system +where keymaps are used to +bind behavior to keys. This means custom +bindings are now possible.

+ +

Three options that influenced key +behavior, tabMode, enterMode, +and smartHome, are no longer supported. Instead, you can +provide custom bindings to influence the way these keys act. This is +done through the +new extraKeys +option, which can hold an object mapping key names to functionality. A +simple example would be:

+ +
  extraKeys: {
+    "Ctrl-S": function(instance) { saveText(instance.getValue()); },
+    "Ctrl-/": "undo"
+  }
+ +

Keys can be mapped either to functions, which will be given the +editor instance as argument, or to strings, which are mapped through +functions through the CodeMirror.commands table, which +contains all the built-in editing commands, and can be inspected and +extended by external code.

+ +

By default, the Home key is bound to +the "goLineStartSmart" command, which moves the cursor to +the first non-whitespace character on the line. You can set do this to +make it always go to the very start instead:

+ +
  extraKeys: {"Home": "goLineStart"}
+ +

Similarly, Enter is bound +to "newlineAndIndent" by default. You can bind it to +something else to get different behavior. To disable special handling +completely and only get a newline character inserted, you can bind it +to false:

+ +
  extraKeys: {"Enter": false}
+ +

The same works for Tab. If you don't want CodeMirror +to handle it, bind it to false. The default behaviour is +to indent the current line more ("indentMore" command), +and indent it less when shift is held ("indentLess"). +There are also "indentAuto" (smart indent) +and "insertTab" commands provided for alternate +behavior. Or you can write your own handler function to do something +different altogether.

+ +

Tabs

+ +

Handling of tabs changed completely. The display width of tabs can +now be set with the tabSize option, and tabs can +be styled by setting CSS rules +for the cm-tab class.

+ +

The default width for tabs is now 4, as opposed to the 8 that is +hard-wired into browsers. If you are relying on 8-space tabs, make +sure you explicitly set tabSize: 8 in your options.

+ +
diff --git a/js/codemirror/doc/upgrade_v3.html b/js/codemirror/doc/upgrade_v3.html new file mode 100644 index 0000000..e16350c --- /dev/null +++ b/js/codemirror/doc/upgrade_v3.html @@ -0,0 +1,230 @@ + + +CodeMirror: Version 3 upgrade guide + + + + + + + + + + + + + + +
+ +

Upgrading to version 3

+ +

Version 3 does not depart too much from 2.x API, and sites that use +CodeMirror in a very simple way might be able to upgrade without +trouble. But it does introduce a number of incompatibilities. Please +at least skim this text before upgrading.

+ +

Note that version 3 drops full support for Internet +Explorer 7. The editor will mostly work on that browser, but +it'll be significantly glitchy.

+ +
+

DOM structure

+ +

This one is the most likely to cause problems. The internal +structure of the editor has changed quite a lot, mostly to implement a +new scrolling model.

+ +

Editor height is now set on the outer wrapper element (CSS +class CodeMirror), not on the scroller element +(CodeMirror-scroll).

+ +

Other nodes were moved, dropped, and added. If you have any code +that makes assumptions about the internal DOM structure of the editor, +you'll have to re-test it and probably update it to work with v3.

+ +

See the styling section of the +manual for more information.

+
+
+

Gutter model

+ +

In CodeMirror 2.x, there was a single gutter, and line markers +created with setMarker would have to somehow coexist with +the line numbers (if present). Version 3 allows you to specify an +array of gutters, by class +name, +use setGutterMarker +to add or remove markers in individual gutters, and clear whole +gutters +with clearGutter. +Gutter markers are now specified as DOM nodes, rather than HTML +snippets.

+ +

The gutters no longer horizontally scrolls along with the content. +The fixedGutter option was removed (since it is now the +only behavior).

+ +
+<style>
+  /* Define a gutter style */
+  .note-gutter { width: 3em; background: cyan; }
+</style>
+<script>
+  // Create an instance with two gutters -- line numbers and notes
+  var cm = new CodeMirror(document.body, {
+    gutters: ["note-gutter", "CodeMirror-linenumbers"],
+    lineNumbers: true
+  });
+  // Add a note to line 0
+  cm.setGutterMarker(0, "note-gutter", document.createTextNode("hi"));
+</script>
+
+
+
+

Event handling

+ +

Most of the onXYZ options have been removed. The same +effect is now obtained by calling +the on method with a string +identifying the event type. Multiple handlers can now be registered +(and individually unregistered) for an event, and objects such as line +handlers now also expose events. See the +full list here.

+ +

(The onKeyEvent and onDragEvent options, +which act more as hooks than as event handlers, are still there in +their old form.)

+ +
+cm.on("change", function(cm, change) {
+  console.log("something changed! (" + change.origin + ")");
+});
+
+
+
+

markText method arguments

+ +

The markText method +(which has gained some interesting new features, such as creating +atomic and read-only spans, or replacing spans with widgets) no longer +takes the CSS class name as a separate argument, but makes it an +optional field in the options object instead.

+ +
+// Style first ten lines, and forbid the cursor from entering them
+cm.markText({line: 0, ch: 0}, {line: 10, ch: 0}, {
+  className: "magic-text",
+  inclusiveLeft: true,
+  atomic: true
+});
+
+
+
+

Line folding

+ +

The interface for hiding lines has been +removed. markText can +now be used to do the same in a more flexible and powerful way.

+ +

The folding script has been +updated to use the new interface, and should now be more robust.

+ +
+// Fold a range, replacing it with the text "??"
+var range = cm.markText({line: 4, ch: 2}, {line: 8, ch: 1}, {
+  replacedWith: document.createTextNode("??"),
+  // Auto-unfold when cursor moves into the range
+  clearOnEnter: true
+});
+// Get notified when auto-unfolding
+CodeMirror.on(range, "clear", function() {
+  console.log("boom");
+});
+
+
+
+

Line CSS classes

+ +

The setLineClass method has been replaced +by addLineClass +and removeLineClass, +which allow more modular control over the classes attached to a line.

+ +
+var marked = cm.addLineClass(10, "background", "highlighted-line");
+setTimeout(function() {
+  cm.removeLineClass(marked, "background", "highlighted-line");
+});
+
+
+
+

Position properties

+ +

All methods that take or return objects that represent screen +positions now use {left, top, bottom, right} properties +(not always all of them) instead of the {x, y, yBot} used +by some methods in v2.x.

+ +

Affected methods +are cursorCoords, charCoords, coordsChar, +and getScrollInfo.

+
+
+

Bracket matching no longer in core

+ +

The matchBrackets +option is no longer defined in the core editor. +Load addon/edit/matchbrackets.js to enable it.

+
+
+

Mode management

+ +

The CodeMirror.listModes +and CodeMirror.listMIMEs functions, used for listing +defined modes, are gone. You are now encouraged to simply +inspect CodeMirror.modes (mapping mode names to mode +constructors) and CodeMirror.mimeModes (mapping MIME +strings to mode specs).

+
+
+

New features

+ +

Some more reasons to upgrade to version 3.

+ +
    +
  • Bi-directional text support. CodeMirror will now mostly do the + right thing when editing Arabic or Hebrew text.
  • +
  • Arbitrary line heights. Using fonts with different heights + inside the editor (whether off by one pixel or fifty) is now + supported and handled gracefully.
  • +
  • In-line widgets. See the demo + and the docs.
  • +
  • Defining custom options + with CodeMirror.defineOption.
  • +
+
+
+ + diff --git a/js/codemirror/doc/upgrade_v4.html b/js/codemirror/doc/upgrade_v4.html new file mode 100644 index 0000000..3de8ced --- /dev/null +++ b/js/codemirror/doc/upgrade_v4.html @@ -0,0 +1,144 @@ + + +CodeMirror: Version 4 upgrade guide + + + + + + +
+ +

Upgrading to version 4

+ +

CodeMirror 4's interface is very close version 3, but it +does fix a few awkward details in a backwards-incompatible ways. At +least skim the text below before upgrading.

+ +

Multiple selections

+ +

The main new feature in version 4 is multiple selections. The +single-selection variants of methods are still there, but now +typically act only on the primary selection (usually the last +one added).

+ +

The exception to this +is getSelection, +which will now return the content of all selections +(separated by newlines, or whatever lineSep parameter you passed +it).

+ +
+ +

The beforeSelectionChange event

+ +

This event still exists, but the object it is passed has +a completely new +interface, because such changes now concern multiple +selections.

+ +
+ +

replaceSelection's collapsing behavior

+ +

By +default, replaceSelection +would leave the newly inserted text selected. This is only rarely what +you want, and also (slightly) more expensive in the new model, so the +default was changed to "end", meaning the old behavior +must be explicitly specified by passing a second argument +of "around".

+ +
+ +

change event data

+ +

Rather than forcing client code to follow next +pointers from one change object to the next, the library will now +simply fire +multiple "change" +events. Existing code will probably continue to work unmodified.

+ +
+ +

showIfHidden option to line widgets

+ +

This option, which conceptually caused line widgets to be visible +even if their line was hidden, was never really well-defined, and was +buggy from the start. It would be a rather expensive feature, both in +code complexity and run-time performance, to implement properly. It +has been dropped entirely in 4.0.

+ +
+ +

Module loaders

+ +

All modules in the CodeMirror distribution are now wrapped in a +shim function to make them compatible with both AMD +(requirejs) and CommonJS (as used +by node +and browserify) module loaders. +When neither of these is present, they fall back to simply using the +global CodeMirror variable.

+ +

If you have a module loader present in your environment, CodeMirror +will attempt to use it, and you might need to change the way you load +CodeMirror modules.

+ +
+ +

Mutating shared data structures

+ +

Data structures produced by the library should not be mutated +unless explicitly allowed, in general. This is slightly more strict in +4.0 than it was in earlier versions, which copied the position objects +returned by getCursor +for nebulous, historic reasons. In 4.0, mutating these +objects will corrupt your editor's selection.

+ +
+ +

Deprecated interfaces dropped

+ +

A few properties and methods that have been deprecated for a while +are now gone. Most notably, the onKeyEvent +and onDragEvent options (use the +corresponding events instead).

+ +

Two silly methods, which were mostly there to stay close to the 0.x +API, setLine and removeLine are now gone. +Use the more +flexible replaceRange +method instead.

+ +

The long names for folding and completing functions +(CodeMirror.braceRangeFinder, CodeMirror.javascriptHint, +etc) are also gone +(use CodeMirror.fold.brace, CodeMirror.hint.javascript).

+ +

The className property in the return value +of getTokenAt, which +has been superseded by the type property, is also no +longer present.

+ +
+
diff --git a/js/codemirror/doc/yinyang.png b/js/codemirror/doc/yinyang.png new file mode 100644 index 0000000..2eafd3f Binary files /dev/null and b/js/codemirror/doc/yinyang.png differ diff --git a/js/codemirror/index.html b/js/codemirror/index.html new file mode 100644 index 0000000..28c0918 --- /dev/null +++ b/js/codemirror/index.html @@ -0,0 +1,179 @@ + + +CodeMirror 5 + + + + + + + + + + + + + + + + + + + +
+ +
+

CodeMirror is a versatile text editor + implemented in JavaScript for the browser. It is specialized for + editing code, and comes with a number of language modes and addons + that implement more advanced editing functionality.

+ +

A rich programming API and a + CSS theming system are + available for customizing CodeMirror to fit your application, and + extending it with new functionality.

+
+ +
+

This is CodeMirror

+
+
+ + +
+ Get the current version: 5.65.16.
+ You can see the code,
+ read the release notes,
+ or study the user manual. +
+ +
+ +
+

Features

+ +
+ +
+

Community

+ +

CodeMirror is an open-source project shared under + an MIT license. It is the editor used in the + dev tools for + Firefox, + Chrome, + and Safari, in Light + Table, Adobe + Brackets, Bitbucket, + and many other projects.

+ +

Development and bug tracking happens + on github + (alternate git + repository). + Please read these + pointers before submitting a bug. Use pull requests to submit + patches. All contributions must be released under the same MIT + license that CodeMirror uses.

+ +

Discussion around the project is done on + a discussion forum. + Announcements related to the project, such as new versions, are + posted in the + forum's "announce" + category. If needed, you can + contact the maintainer + directly. We aim to be an inclusive, welcoming community. To make + that explicit, we have + a code of + conduct that applies to communication around the project.

+
+ +
+

Browser support

+

The desktop versions of the following browsers, + in standards mode (HTML5 <!doctype html> + recommended) are supported:

+ + + + + + +
Firefoxversion 4 and up
Chromeany version
Safariversion 5.2 and up
Internet Explorer/Edgeversion 8 and up
Operaversion 9 and up
+

Support for modern mobile browsers is experimental. Recent + versions of the iOS browser and Chrome on Android should work + pretty well.

+
+ +
diff --git a/js/codemirror/keymap/emacs.js b/js/codemirror/keymap/emacs.js new file mode 100644 index 0000000..f4e4e90 --- /dev/null +++ b/js/codemirror/keymap/emacs.js @@ -0,0 +1,545 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + var cmds = CodeMirror.commands; + var Pos = CodeMirror.Pos; + function posEq(a, b) { return a.line == b.line && a.ch == b.ch; } + + // Kill 'ring' + + var killRing = []; + function addToRing(str) { + killRing.push(str); + if (killRing.length > 50) killRing.shift(); + } + function growRingTop(str) { + if (!killRing.length) return addToRing(str); + killRing[killRing.length - 1] += str; + } + function getFromRing(n) { return killRing[killRing.length - (n ? Math.min(n, 1) : 1)] || ""; } + function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); } + + var lastKill = null; + + // Internal generic kill function, used by several mapped kill "family" functions. + function _kill(cm, from, to, ring, text) { + if (text == null) text = cm.getRange(from, to); + + if (ring == "grow" && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen)) + growRingTop(text); + else if (ring !== false) + addToRing(text); + cm.replaceRange("", from, to, "+delete"); + + if (ring == "grow") lastKill = {cm: cm, pos: from, gen: cm.changeGeneration()}; + else lastKill = null; + } + + // Boundaries of various units + + function byChar(cm, pos, dir) { + return cm.findPosH(pos, dir, "char", true); + } + + function byWord(cm, pos, dir) { + return cm.findPosH(pos, dir, "word", true); + } + + function byLine(cm, pos, dir) { + return cm.findPosV(pos, dir, "line", cm.doc.sel.goalColumn); + } + + function byPage(cm, pos, dir) { + return cm.findPosV(pos, dir, "page", cm.doc.sel.goalColumn); + } + + function byParagraph(cm, pos, dir) { + var no = pos.line, line = cm.getLine(no); + var sawText = /\S/.test(dir < 0 ? line.slice(0, pos.ch) : line.slice(pos.ch)); + var fst = cm.firstLine(), lst = cm.lastLine(); + for (;;) { + no += dir; + if (no < fst || no > lst) + return cm.clipPos(Pos(no - dir, dir < 0 ? 0 : null)); + line = cm.getLine(no); + var hasText = /\S/.test(line); + if (hasText) sawText = true; + else if (sawText) return Pos(no, 0); + } + } + + function bySentence(cm, pos, dir) { + var line = pos.line, ch = pos.ch; + var text = cm.getLine(pos.line), sawWord = false; + for (;;) { + var next = text.charAt(ch + (dir < 0 ? -1 : 0)); + if (!next) { // End/beginning of line reached + if (line == (dir < 0 ? cm.firstLine() : cm.lastLine())) return Pos(line, ch); + text = cm.getLine(line + dir); + if (!/\S/.test(text)) return Pos(line, ch); + line += dir; + ch = dir < 0 ? text.length : 0; + continue; + } + if (sawWord && /[!?.]/.test(next)) return Pos(line, ch + (dir > 0 ? 1 : 0)); + if (!sawWord) sawWord = /\w/.test(next); + ch += dir; + } + } + + function byExpr(cm, pos, dir) { + var wrap; + if (cm.findMatchingBracket && (wrap = cm.findMatchingBracket(pos, {strict: true})) + && wrap.match && (wrap.forward ? 1 : -1) == dir) + return dir > 0 ? Pos(wrap.to.line, wrap.to.ch + 1) : wrap.to; + + for (var first = true;; first = false) { + var token = cm.getTokenAt(pos); + var after = Pos(pos.line, dir < 0 ? token.start : token.end); + if (first && dir > 0 && token.end == pos.ch || !/\w/.test(token.string)) { + var newPos = cm.findPosH(after, dir, "char"); + if (posEq(after, newPos)) return pos; + else pos = newPos; + } else { + return after; + } + } + } + + // Prefixes (only crudely supported) + + function getPrefix(cm, precise) { + var digits = cm.state.emacsPrefix; + if (!digits) return precise ? null : 1; + clearPrefix(cm); + return digits == "-" ? -1 : Number(digits); + } + + function repeated(cmd) { + var f = typeof cmd == "string" ? function(cm) { cm.execCommand(cmd); } : cmd; + return function(cm) { + var prefix = getPrefix(cm); + f(cm); + for (var i = 1; i < prefix; ++i) f(cm); + }; + } + + function findEnd(cm, pos, by, dir) { + var prefix = getPrefix(cm); + if (prefix < 0) { dir = -dir; prefix = -prefix; } + for (var i = 0; i < prefix; ++i) { + var newPos = by(cm, pos, dir); + if (posEq(newPos, pos)) break; + pos = newPos; + } + return pos; + } + + function move(by, dir) { + var f = function(cm) { + cm.extendSelection(findEnd(cm, cm.getCursor(), by, dir)); + }; + f.motion = true; + return f; + } + + function killTo(cm, by, dir, ring) { + var selections = cm.listSelections(), cursor; + var i = selections.length; + while (i--) { + cursor = selections[i].head; + _kill(cm, cursor, findEnd(cm, cursor, by, dir), ring); + } + } + + function _killRegion(cm, ring) { + if (cm.somethingSelected()) { + var selections = cm.listSelections(), selection; + var i = selections.length; + while (i--) { + selection = selections[i]; + _kill(cm, selection.anchor, selection.head, ring); + } + return true; + } + } + + function addPrefix(cm, digit) { + if (cm.state.emacsPrefix) { + if (digit != "-") cm.state.emacsPrefix += digit; + return; + } + // Not active yet + cm.state.emacsPrefix = digit; + cm.on("keyHandled", maybeClearPrefix); + cm.on("inputRead", maybeDuplicateInput); + } + + var prefixPreservingKeys = {"Alt-G": true, "Ctrl-X": true, "Ctrl-Q": true, "Ctrl-U": true}; + + function maybeClearPrefix(cm, arg) { + if (!cm.state.emacsPrefixMap && !prefixPreservingKeys.hasOwnProperty(arg)) + clearPrefix(cm); + } + + function clearPrefix(cm) { + cm.state.emacsPrefix = null; + cm.off("keyHandled", maybeClearPrefix); + cm.off("inputRead", maybeDuplicateInput); + } + + function maybeDuplicateInput(cm, event) { + var dup = getPrefix(cm); + if (dup > 1 && event.origin == "+input") { + var one = event.text.join("\n"), txt = ""; + for (var i = 1; i < dup; ++i) txt += one; + cm.replaceSelection(txt); + } + } + + function maybeRemovePrefixMap(cm, arg) { + if (typeof arg == "string" && (/^\d$/.test(arg) || arg == "Ctrl-U")) return; + cm.removeKeyMap(prefixMap); + cm.state.emacsPrefixMap = false; + cm.off("keyHandled", maybeRemovePrefixMap); + cm.off("inputRead", maybeRemovePrefixMap); + } + + // Utilities + + cmds.setMark = function (cm) { + cm.setCursor(cm.getCursor()); + cm.setExtending(!cm.getExtending()); + cm.on("change", function() { cm.setExtending(false); }); + } + + function clearMark(cm) { + cm.setExtending(false); + cm.setCursor(cm.getCursor()); + } + + function makePrompt(msg) { + var fragment = document.createDocumentFragment(); + var input = document.createElement("input"); + input.setAttribute("type", "text"); + input.style.width = "10em"; + fragment.appendChild(document.createTextNode(msg + ": ")); + fragment.appendChild(input); + return fragment; + } + + function getInput(cm, msg, f) { + if (cm.openDialog) + cm.openDialog(makePrompt(msg), f, {bottom: true}); + else + f(prompt(msg, "")); + } + + function operateOnWord(cm, op) { + var start = cm.getCursor(), end = cm.findPosH(start, 1, "word"); + cm.replaceRange(op(cm.getRange(start, end)), start, end); + cm.setCursor(end); + } + + function toEnclosingExpr(cm) { + var pos = cm.getCursor(), line = pos.line, ch = pos.ch; + var stack = []; + while (line >= cm.firstLine()) { + var text = cm.getLine(line); + for (var i = ch == null ? text.length : ch; i > 0;) { + var ch = text.charAt(--i); + if (ch == ")") + stack.push("("); + else if (ch == "]") + stack.push("["); + else if (ch == "}") + stack.push("{"); + else if (/[\(\{\[]/.test(ch) && (!stack.length || stack.pop() != ch)) + return cm.extendSelection(Pos(line, i)); + } + --line; ch = null; + } + } + + // Commands. Names should match emacs function names (albeit in camelCase) + // except where emacs function names collide with code mirror core commands. + + cmds.killRegion = function(cm) { + _kill(cm, cm.getCursor("start"), cm.getCursor("end"), true); + }; + + // Maps to emacs kill-line + cmds.killLineEmacs = repeated(function(cm) { + var start = cm.getCursor(), end = cm.clipPos(Pos(start.line)); + var text = cm.getRange(start, end); + if (!/\S/.test(text)) { + text += "\n"; + end = Pos(start.line + 1, 0); + } + _kill(cm, start, end, "grow", text); + }); + + cmds.killRingSave = function(cm) { + addToRing(cm.getSelection()); + clearMark(cm); + }; + + cmds.yank = function(cm) { + var start = cm.getCursor(); + cm.replaceRange(getFromRing(getPrefix(cm)), start, start, "paste"); + cm.setSelection(start, cm.getCursor()); + }; + + cmds.yankPop = function(cm) { + cm.replaceSelection(popFromRing(), "around", "paste"); + }; + + cmds.forwardChar = move(byChar, 1); + + cmds.backwardChar = move(byChar, -1) + + cmds.deleteChar = function(cm) { killTo(cm, byChar, 1, false); }; + + cmds.deleteForwardChar = function(cm) { + _killRegion(cm, false) || killTo(cm, byChar, 1, false); + }; + + cmds.deleteBackwardChar = function(cm) { + _killRegion(cm, false) || killTo(cm, byChar, -1, false); + }; + + cmds.forwardWord = move(byWord, 1); + + cmds.backwardWord = move(byWord, -1); + + cmds.killWord = function(cm) { killTo(cm, byWord, 1, "grow"); }; + + cmds.backwardKillWord = function(cm) { killTo(cm, byWord, -1, "grow"); }; + + cmds.nextLine = move(byLine, 1); + + cmds.previousLine = move(byLine, -1); + + cmds.scrollDownCommand = move(byPage, -1); + + cmds.scrollUpCommand = move(byPage, 1); + + cmds.backwardParagraph = move(byParagraph, -1); + + cmds.forwardParagraph = move(byParagraph, 1); + + cmds.backwardSentence = move(bySentence, -1); + + cmds.forwardSentence = move(bySentence, 1); + + cmds.killSentence = function(cm) { killTo(cm, bySentence, 1, "grow"); }; + + cmds.backwardKillSentence = function(cm) { + _kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), "grow"); + }; + + cmds.killSexp = function(cm) { killTo(cm, byExpr, 1, "grow"); }; + + cmds.backwardKillSexp = function(cm) { killTo(cm, byExpr, -1, "grow"); }; + + cmds.forwardSexp = move(byExpr, 1); + + cmds.backwardSexp = move(byExpr, -1); + + cmds.markSexp = function(cm) { + var cursor = cm.getCursor(); + cm.setSelection(findEnd(cm, cursor, byExpr, 1), cursor); + }; + + cmds.transposeSexps = function(cm) { + var leftStart = byExpr(cm, cm.getCursor(), -1); + var leftEnd = byExpr(cm, leftStart, 1); + var rightEnd = byExpr(cm, leftEnd, 1); + var rightStart = byExpr(cm, rightEnd, -1); + cm.replaceRange(cm.getRange(rightStart, rightEnd) + + cm.getRange(leftEnd, rightStart) + + cm.getRange(leftStart, leftEnd), leftStart, rightEnd); + }; + + cmds.backwardUpList = repeated(toEnclosingExpr); + + cmds.justOneSpace = function(cm) { + var pos = cm.getCursor(), from = pos.ch; + var to = pos.ch, text = cm.getLine(pos.line); + while (from && /\s/.test(text.charAt(from - 1))) --from; + while (to < text.length && /\s/.test(text.charAt(to))) ++to; + cm.replaceRange(" ", Pos(pos.line, from), Pos(pos.line, to)); + }; + + cmds.openLine = repeated(function(cm) { + cm.replaceSelection("\n", "start"); + }); + + // maps to emacs 'transpose-chars' + cmds.transposeCharsRepeatable = repeated(function(cm) { + cm.execCommand("transposeChars"); + }); + + cmds.capitalizeWord = repeated(function(cm) { + operateOnWord(cm, function(w) { + var letter = w.search(/\w/); + if (letter == -1) return w; + return w.slice(0, letter) + w.charAt(letter).toUpperCase() + + w.slice(letter + 1).toLowerCase(); + }); + }); + + cmds.upcaseWord = repeated(function(cm) { + operateOnWord(cm, function(w) { return w.toUpperCase(); }); + }); + + cmds.downcaseWord = repeated(function(cm) { + operateOnWord(cm, function(w) { return w.toLowerCase(); }); + }); + + // maps to emacs 'undo' + cmds.undoRepeatable = repeated("undo"); + + cmds.keyboardQuit = function(cm) { + cm.execCommand("clearSearch"); + clearMark(cm); + } + + cmds.newline = repeated(function(cm) { cm.replaceSelection("\n", "end"); }); + + cmds.gotoLine = function(cm) { + var prefix = getPrefix(cm, true); + if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1); + + getInput(cm, "Goto line", function(str) { + var num; + if (str && !isNaN(num = Number(str)) && num == (num|0) && num > 0) + cm.setCursor(num - 1); + }); + }; + + cmds.indentRigidly = function(cm) { + cm.indentSelection(getPrefix(cm, true) || cm.getOption("indentUnit")); + }; + + cmds.exchangePointAndMark = function(cm) { + cm.setSelection(cm.getCursor("head"), cm.getCursor("anchor")); + }; + + cmds.quotedInsertTab = repeated("insertTab"); + + cmds.universalArgument = function addPrefixMap(cm) { + cm.state.emacsPrefixMap = true; + cm.addKeyMap(prefixMap); + cm.on("keyHandled", maybeRemovePrefixMap); + cm.on("inputRead", maybeRemovePrefixMap); + }; + + CodeMirror.emacs = {kill: _kill, killRegion: _killRegion, repeated: repeated}; + + // Actual keymap + var keyMap = CodeMirror.keyMap.emacs = CodeMirror.normalizeKeyMap({ + "Ctrl-W": "killRegion", + "Ctrl-K": "killLineEmacs", + "Alt-W": "killRingSave", + "Ctrl-Y": "yank", + "Alt-Y": "yankPop", + "Ctrl-Space": "setMark", + "Ctrl-Shift-2": "setMark", + "Ctrl-F": "forwardChar", + "Ctrl-B": "backwardChar", + "Right": "forwardChar", + "Left": "backwardChar", + "Ctrl-D": "deleteChar", + "Delete": "deleteForwardChar", + "Ctrl-H": "deleteBackwardChar", + "Backspace": "deleteBackwardChar", + "Alt-F": "forwardWord", + "Alt-B": "backwardWord", + "Alt-Right": "forwardWord", + "Alt-Left": "backwardWord", + "Alt-D": "killWord", + "Alt-Backspace": "backwardKillWord", + "Ctrl-N": "nextLine", + "Ctrl-P": "previousLine", + "Down": "nextLine", + "Up": "previousLine", + "Ctrl-A": "goLineStart", + "Ctrl-E": "goLineEnd", + "End": "goLineEnd", + "Home": "goLineStart", + "Alt-V": "scrollDownCommand", + "Ctrl-V": "scrollUpCommand", + "PageUp": "scrollDownCommand", + "PageDown": "scrollUpCommand", + "Ctrl-Up": "backwardParagraph", + "Ctrl-Down": "forwardParagraph", + "Alt-{": "backwardParagraph", + "Alt-}": "forwardParagraph", + "Alt-A": "backwardSentence", + "Alt-E": "forwardSentence", + "Alt-K": "killSentence", + "Ctrl-X Delete": "backwardKillSentence", + "Ctrl-Alt-K": "killSexp", + "Ctrl-Alt-Backspace": "backwardKillSexp", + "Ctrl-Alt-F": "forwardSexp", + "Ctrl-Alt-B": "backwardSexp", + "Shift-Ctrl-Alt-2": "markSexp", + "Ctrl-Alt-T": "transposeSexps", + "Ctrl-Alt-U": "backwardUpList", + "Alt-Space": "justOneSpace", + "Ctrl-O": "openLine", + "Ctrl-T": "transposeCharsRepeatable", + "Alt-C": "capitalizeWord", + "Alt-U": "upcaseWord", + "Alt-L": "downcaseWord", + "Alt-;": "toggleComment", + "Ctrl-/": "undoRepeatable", + "Shift-Ctrl--": "undoRepeatable", + "Ctrl-Z": "undoRepeatable", + "Cmd-Z": "undoRepeatable", + "Ctrl-X U": "undoRepeatable", + "Shift-Ctrl-Z": "redo", + "Shift-Alt-,": "goDocStart", + "Shift-Alt-.": "goDocEnd", + "Ctrl-S": "findPersistentNext", + "Ctrl-R": "findPersistentPrev", + "Ctrl-G": "keyboardQuit", + "Shift-Alt-5": "replace", + "Alt-/": "autocomplete", + "Enter": "newlineAndIndent", + "Ctrl-J": "newline", + "Tab": "indentAuto", + "Alt-G G": "gotoLine", + "Ctrl-X Tab": "indentRigidly", + "Ctrl-X Ctrl-X": "exchangePointAndMark", + "Ctrl-X Ctrl-S": "save", + "Ctrl-X Ctrl-W": "save", + "Ctrl-X S": "saveAll", + "Ctrl-X F": "open", + "Ctrl-X K": "close", + "Ctrl-X H": "selectAll", + "Ctrl-Q Tab": "quotedInsertTab", + "Ctrl-U": "universalArgument", + "fallthrough": "default" + }); + + var prefixMap = {"Ctrl-G": clearPrefix}; + function regPrefix(d) { + prefixMap[d] = function(cm) { addPrefix(cm, d); }; + keyMap["Ctrl-" + d] = function(cm) { addPrefix(cm, d); }; + prefixPreservingKeys["Ctrl-" + d] = true; + } + for (var i = 0; i < 10; ++i) regPrefix(String(i)); + regPrefix("-"); +}); diff --git a/js/codemirror/keymap/sublime.js b/js/codemirror/keymap/sublime.js new file mode 100644 index 0000000..fe677c8 --- /dev/null +++ b/js/codemirror/keymap/sublime.js @@ -0,0 +1,720 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// A rough approximation of Sublime Text's keybindings +// Depends on addon/search/searchcursor.js and optionally addon/dialog/dialogs.js + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../lib/codemirror"), require("../addon/search/searchcursor"), require("../addon/edit/matchbrackets")); + else if (typeof define == "function" && define.amd) // AMD + define(["../lib/codemirror", "../addon/search/searchcursor", "../addon/edit/matchbrackets"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + var cmds = CodeMirror.commands; + var Pos = CodeMirror.Pos; + + // This is not exactly Sublime's algorithm. I couldn't make heads or tails of that. + function findPosSubword(doc, start, dir) { + if (dir < 0 && start.ch == 0) return doc.clipPos(Pos(start.line - 1)); + var line = doc.getLine(start.line); + if (dir > 0 && start.ch >= line.length) return doc.clipPos(Pos(start.line + 1, 0)); + var state = "start", type, startPos = start.ch; + for (var pos = startPos, e = dir < 0 ? 0 : line.length, i = 0; pos != e; pos += dir, i++) { + var next = line.charAt(dir < 0 ? pos - 1 : pos); + var cat = next != "_" && CodeMirror.isWordChar(next) ? "w" : "o"; + if (cat == "w" && next.toUpperCase() == next) cat = "W"; + if (state == "start") { + if (cat != "o") { state = "in"; type = cat; } + else startPos = pos + dir + } else if (state == "in") { + if (type != cat) { + if (type == "w" && cat == "W" && dir < 0) pos--; + if (type == "W" && cat == "w" && dir > 0) { // From uppercase to lowercase + if (pos == startPos + 1) { type = "w"; continue; } + else pos--; + } + break; + } + } + } + return Pos(start.line, pos); + } + + function moveSubword(cm, dir) { + cm.extendSelectionsBy(function(range) { + if (cm.display.shift || cm.doc.extend || range.empty()) + return findPosSubword(cm.doc, range.head, dir); + else + return dir < 0 ? range.from() : range.to(); + }); + } + + cmds.goSubwordLeft = function(cm) { moveSubword(cm, -1); }; + cmds.goSubwordRight = function(cm) { moveSubword(cm, 1); }; + + cmds.scrollLineUp = function(cm) { + var info = cm.getScrollInfo(); + if (!cm.somethingSelected()) { + var visibleBottomLine = cm.lineAtHeight(info.top + info.clientHeight, "local"); + if (cm.getCursor().line >= visibleBottomLine) + cm.execCommand("goLineUp"); + } + cm.scrollTo(null, info.top - cm.defaultTextHeight()); + }; + cmds.scrollLineDown = function(cm) { + var info = cm.getScrollInfo(); + if (!cm.somethingSelected()) { + var visibleTopLine = cm.lineAtHeight(info.top, "local")+1; + if (cm.getCursor().line <= visibleTopLine) + cm.execCommand("goLineDown"); + } + cm.scrollTo(null, info.top + cm.defaultTextHeight()); + }; + + cmds.splitSelectionByLine = function(cm) { + var ranges = cm.listSelections(), lineRanges = []; + for (var i = 0; i < ranges.length; i++) { + var from = ranges[i].from(), to = ranges[i].to(); + for (var line = from.line; line <= to.line; ++line) + if (!(to.line > from.line && line == to.line && to.ch == 0)) + lineRanges.push({anchor: line == from.line ? from : Pos(line, 0), + head: line == to.line ? to : Pos(line)}); + } + cm.setSelections(lineRanges, 0); + }; + + cmds.singleSelectionTop = function(cm) { + var range = cm.listSelections()[0]; + cm.setSelection(range.anchor, range.head, {scroll: false}); + }; + + cmds.selectLine = function(cm) { + var ranges = cm.listSelections(), extended = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + extended.push({anchor: Pos(range.from().line, 0), + head: Pos(range.to().line + 1, 0)}); + } + cm.setSelections(extended); + }; + + function insertLine(cm, above) { + if (cm.isReadOnly()) return CodeMirror.Pass + cm.operation(function() { + var len = cm.listSelections().length, newSelection = [], last = -1; + for (var i = 0; i < len; i++) { + var head = cm.listSelections()[i].head; + if (head.line <= last) continue; + var at = Pos(head.line + (above ? 0 : 1), 0); + cm.replaceRange("\n", at, null, "+insertLine"); + cm.indentLine(at.line, null, true); + newSelection.push({head: at, anchor: at}); + last = head.line + 1; + } + cm.setSelections(newSelection); + }); + cm.execCommand("indentAuto"); + } + + cmds.insertLineAfter = function(cm) { return insertLine(cm, false); }; + + cmds.insertLineBefore = function(cm) { return insertLine(cm, true); }; + + function wordAt(cm, pos) { + var start = pos.ch, end = start, line = cm.getLine(pos.line); + while (start && CodeMirror.isWordChar(line.charAt(start - 1))) --start; + while (end < line.length && CodeMirror.isWordChar(line.charAt(end))) ++end; + return {from: Pos(pos.line, start), to: Pos(pos.line, end), word: line.slice(start, end)}; + } + + cmds.selectNextOccurrence = function(cm) { + var from = cm.getCursor("from"), to = cm.getCursor("to"); + var fullWord = cm.state.sublimeFindFullWord == cm.doc.sel; + if (CodeMirror.cmpPos(from, to) == 0) { + var word = wordAt(cm, from); + if (!word.word) return; + cm.setSelection(word.from, word.to); + fullWord = true; + } else { + var text = cm.getRange(from, to); + var query = fullWord ? new RegExp("\\b" + text + "\\b") : text; + var cur = cm.getSearchCursor(query, to); + var found = cur.findNext(); + if (!found) { + cur = cm.getSearchCursor(query, Pos(cm.firstLine(), 0)); + found = cur.findNext(); + } + if (!found || isSelectedRange(cm.listSelections(), cur.from(), cur.to())) return + cm.addSelection(cur.from(), cur.to()); + } + if (fullWord) + cm.state.sublimeFindFullWord = cm.doc.sel; + }; + + cmds.skipAndSelectNextOccurrence = function(cm) { + var prevAnchor = cm.getCursor("anchor"), prevHead = cm.getCursor("head"); + cmds.selectNextOccurrence(cm); + if (CodeMirror.cmpPos(prevAnchor, prevHead) != 0) { + cm.doc.setSelections(cm.doc.listSelections() + .filter(function (sel) { + return sel.anchor != prevAnchor || sel.head != prevHead; + })); + } + } + + function addCursorToSelection(cm, dir) { + var ranges = cm.listSelections(), newRanges = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + var newAnchor = cm.findPosV( + range.anchor, dir, "line", range.anchor.goalColumn); + var newHead = cm.findPosV( + range.head, dir, "line", range.head.goalColumn); + newAnchor.goalColumn = range.anchor.goalColumn != null ? + range.anchor.goalColumn : cm.cursorCoords(range.anchor, "div").left; + newHead.goalColumn = range.head.goalColumn != null ? + range.head.goalColumn : cm.cursorCoords(range.head, "div").left; + var newRange = {anchor: newAnchor, head: newHead}; + newRanges.push(range); + newRanges.push(newRange); + } + cm.setSelections(newRanges); + } + cmds.addCursorToPrevLine = function(cm) { addCursorToSelection(cm, -1); }; + cmds.addCursorToNextLine = function(cm) { addCursorToSelection(cm, 1); }; + + function isSelectedRange(ranges, from, to) { + for (var i = 0; i < ranges.length; i++) + if (CodeMirror.cmpPos(ranges[i].from(), from) == 0 && + CodeMirror.cmpPos(ranges[i].to(), to) == 0) return true + return false + } + + var mirror = "(){}[]"; + function selectBetweenBrackets(cm) { + var ranges = cm.listSelections(), newRanges = [] + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], pos = range.head, opening = cm.scanForBracket(pos, -1); + if (!opening) return false; + for (;;) { + var closing = cm.scanForBracket(pos, 1); + if (!closing) return false; + if (closing.ch == mirror.charAt(mirror.indexOf(opening.ch) + 1)) { + var startPos = Pos(opening.pos.line, opening.pos.ch + 1); + if (CodeMirror.cmpPos(startPos, range.from()) == 0 && + CodeMirror.cmpPos(closing.pos, range.to()) == 0) { + opening = cm.scanForBracket(opening.pos, -1); + if (!opening) return false; + } else { + newRanges.push({anchor: startPos, head: closing.pos}); + break; + } + } + pos = Pos(closing.pos.line, closing.pos.ch + 1); + } + } + cm.setSelections(newRanges); + return true; + } + + cmds.selectScope = function(cm) { + selectBetweenBrackets(cm) || cm.execCommand("selectAll"); + }; + cmds.selectBetweenBrackets = function(cm) { + if (!selectBetweenBrackets(cm)) return CodeMirror.Pass; + }; + + function puncType(type) { + return !type ? null : /\bpunctuation\b/.test(type) ? type : undefined + } + + cmds.goToBracket = function(cm) { + cm.extendSelectionsBy(function(range) { + var next = cm.scanForBracket(range.head, 1, puncType(cm.getTokenTypeAt(range.head))); + if (next && CodeMirror.cmpPos(next.pos, range.head) != 0) return next.pos; + var prev = cm.scanForBracket(range.head, -1, puncType(cm.getTokenTypeAt(Pos(range.head.line, range.head.ch + 1)))); + return prev && Pos(prev.pos.line, prev.pos.ch + 1) || range.head; + }); + }; + + cmds.swapLineUp = function(cm) { + if (cm.isReadOnly()) return CodeMirror.Pass + var ranges = cm.listSelections(), linesToMove = [], at = cm.firstLine() - 1, newSels = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], from = range.from().line - 1, to = range.to().line; + newSels.push({anchor: Pos(range.anchor.line - 1, range.anchor.ch), + head: Pos(range.head.line - 1, range.head.ch)}); + if (range.to().ch == 0 && !range.empty()) --to; + if (from > at) linesToMove.push(from, to); + else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to; + at = to; + } + cm.operation(function() { + for (var i = 0; i < linesToMove.length; i += 2) { + var from = linesToMove[i], to = linesToMove[i + 1]; + var line = cm.getLine(from); + cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine"); + if (to > cm.lastLine()) + cm.replaceRange("\n" + line, Pos(cm.lastLine()), null, "+swapLine"); + else + cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine"); + } + cm.setSelections(newSels); + cm.scrollIntoView(); + }); + }; + + cmds.swapLineDown = function(cm) { + if (cm.isReadOnly()) return CodeMirror.Pass + var ranges = cm.listSelections(), linesToMove = [], at = cm.lastLine() + 1; + for (var i = ranges.length - 1; i >= 0; i--) { + var range = ranges[i], from = range.to().line + 1, to = range.from().line; + if (range.to().ch == 0 && !range.empty()) from--; + if (from < at) linesToMove.push(from, to); + else if (linesToMove.length) linesToMove[linesToMove.length - 1] = to; + at = to; + } + cm.operation(function() { + for (var i = linesToMove.length - 2; i >= 0; i -= 2) { + var from = linesToMove[i], to = linesToMove[i + 1]; + var line = cm.getLine(from); + if (from == cm.lastLine()) + cm.replaceRange("", Pos(from - 1), Pos(from), "+swapLine"); + else + cm.replaceRange("", Pos(from, 0), Pos(from + 1, 0), "+swapLine"); + cm.replaceRange(line + "\n", Pos(to, 0), null, "+swapLine"); + } + cm.scrollIntoView(); + }); + }; + + cmds.toggleCommentIndented = function(cm) { + cm.toggleComment({ indent: true }); + } + + cmds.joinLines = function(cm) { + var ranges = cm.listSelections(), joined = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i], from = range.from(); + var start = from.line, end = range.to().line; + while (i < ranges.length - 1 && ranges[i + 1].from().line == end) + end = ranges[++i].to().line; + joined.push({start: start, end: end, anchor: !range.empty() && from}); + } + cm.operation(function() { + var offset = 0, ranges = []; + for (var i = 0; i < joined.length; i++) { + var obj = joined[i]; + var anchor = obj.anchor && Pos(obj.anchor.line - offset, obj.anchor.ch), head; + for (var line = obj.start; line <= obj.end; line++) { + var actual = line - offset; + if (line == obj.end) head = Pos(actual, cm.getLine(actual).length + 1); + if (actual < cm.lastLine()) { + cm.replaceRange(" ", Pos(actual), Pos(actual + 1, /^\s*/.exec(cm.getLine(actual + 1))[0].length)); + ++offset; + } + } + ranges.push({anchor: anchor || head, head: head}); + } + cm.setSelections(ranges, 0); + }); + }; + + cmds.duplicateLine = function(cm) { + cm.operation(function() { + var rangeCount = cm.listSelections().length; + for (var i = 0; i < rangeCount; i++) { + var range = cm.listSelections()[i]; + if (range.empty()) + cm.replaceRange(cm.getLine(range.head.line) + "\n", Pos(range.head.line, 0)); + else + cm.replaceRange(cm.getRange(range.from(), range.to()), range.from()); + } + cm.scrollIntoView(); + }); + }; + + + function sortLines(cm, caseSensitive, direction) { + if (cm.isReadOnly()) return CodeMirror.Pass + var ranges = cm.listSelections(), toSort = [], selected; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (range.empty()) continue; + var from = range.from().line, to = range.to().line; + while (i < ranges.length - 1 && ranges[i + 1].from().line == to) + to = ranges[++i].to().line; + if (!ranges[i].to().ch) to--; + toSort.push(from, to); + } + if (toSort.length) selected = true; + else toSort.push(cm.firstLine(), cm.lastLine()); + + cm.operation(function() { + var ranges = []; + for (var i = 0; i < toSort.length; i += 2) { + var from = toSort[i], to = toSort[i + 1]; + var start = Pos(from, 0), end = Pos(to); + var lines = cm.getRange(start, end, false); + if (caseSensitive) + lines.sort(function(a, b) { return a < b ? -direction : a == b ? 0 : direction; }); + else + lines.sort(function(a, b) { + var au = a.toUpperCase(), bu = b.toUpperCase(); + if (au != bu) { a = au; b = bu; } + return a < b ? -direction : a == b ? 0 : direction; + }); + cm.replaceRange(lines, start, end); + if (selected) ranges.push({anchor: start, head: Pos(to + 1, 0)}); + } + if (selected) cm.setSelections(ranges, 0); + }); + } + + cmds.sortLines = function(cm) { sortLines(cm, true, 1); }; + cmds.reverseSortLines = function(cm) { sortLines(cm, true, -1); }; + cmds.sortLinesInsensitive = function(cm) { sortLines(cm, false, 1); }; + cmds.reverseSortLinesInsensitive = function(cm) { sortLines(cm, false, -1); }; + + cmds.nextBookmark = function(cm) { + var marks = cm.state.sublimeBookmarks; + if (marks) while (marks.length) { + var current = marks.shift(); + var found = current.find(); + if (found) { + marks.push(current); + return cm.setSelection(found.from, found.to); + } + } + }; + + cmds.prevBookmark = function(cm) { + var marks = cm.state.sublimeBookmarks; + if (marks) while (marks.length) { + marks.unshift(marks.pop()); + var found = marks[marks.length - 1].find(); + if (!found) + marks.pop(); + else + return cm.setSelection(found.from, found.to); + } + }; + + cmds.toggleBookmark = function(cm) { + var ranges = cm.listSelections(); + var marks = cm.state.sublimeBookmarks || (cm.state.sublimeBookmarks = []); + for (var i = 0; i < ranges.length; i++) { + var from = ranges[i].from(), to = ranges[i].to(); + var found = ranges[i].empty() ? cm.findMarksAt(from) : cm.findMarks(from, to); + for (var j = 0; j < found.length; j++) { + if (found[j].sublimeBookmark) { + found[j].clear(); + for (var k = 0; k < marks.length; k++) + if (marks[k] == found[j]) + marks.splice(k--, 1); + break; + } + } + if (j == found.length) + marks.push(cm.markText(from, to, {sublimeBookmark: true, clearWhenEmpty: false})); + } + }; + + cmds.clearBookmarks = function(cm) { + var marks = cm.state.sublimeBookmarks; + if (marks) for (var i = 0; i < marks.length; i++) marks[i].clear(); + marks.length = 0; + }; + + cmds.selectBookmarks = function(cm) { + var marks = cm.state.sublimeBookmarks, ranges = []; + if (marks) for (var i = 0; i < marks.length; i++) { + var found = marks[i].find(); + if (!found) + marks.splice(i--, 0); + else + ranges.push({anchor: found.from, head: found.to}); + } + if (ranges.length) + cm.setSelections(ranges, 0); + }; + + function modifyWordOrSelection(cm, mod) { + cm.operation(function() { + var ranges = cm.listSelections(), indices = [], replacements = []; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (range.empty()) { indices.push(i); replacements.push(""); } + else replacements.push(mod(cm.getRange(range.from(), range.to()))); + } + cm.replaceSelections(replacements, "around", "case"); + for (var i = indices.length - 1, at; i >= 0; i--) { + var range = ranges[indices[i]]; + if (at && CodeMirror.cmpPos(range.head, at) > 0) continue; + var word = wordAt(cm, range.head); + at = word.from; + cm.replaceRange(mod(word.word), word.from, word.to); + } + }); + } + + cmds.smartBackspace = function(cm) { + if (cm.somethingSelected()) return CodeMirror.Pass; + + cm.operation(function() { + var cursors = cm.listSelections(); + var indentUnit = cm.getOption("indentUnit"); + + for (var i = cursors.length - 1; i >= 0; i--) { + var cursor = cursors[i].head; + var toStartOfLine = cm.getRange({line: cursor.line, ch: 0}, cursor); + var column = CodeMirror.countColumn(toStartOfLine, null, cm.getOption("tabSize")); + + // Delete by one character by default + var deletePos = cm.findPosH(cursor, -1, "char", false); + + if (toStartOfLine && !/\S/.test(toStartOfLine) && column % indentUnit == 0) { + var prevIndent = new Pos(cursor.line, + CodeMirror.findColumn(toStartOfLine, column - indentUnit, indentUnit)); + + // Smart delete only if we found a valid prevIndent location + if (prevIndent.ch != cursor.ch) deletePos = prevIndent; + } + + cm.replaceRange("", deletePos, cursor, "+delete"); + } + }); + }; + + cmds.delLineRight = function(cm) { + cm.operation(function() { + var ranges = cm.listSelections(); + for (var i = ranges.length - 1; i >= 0; i--) + cm.replaceRange("", ranges[i].anchor, Pos(ranges[i].to().line), "+delete"); + cm.scrollIntoView(); + }); + }; + + cmds.upcaseAtCursor = function(cm) { + modifyWordOrSelection(cm, function(str) { return str.toUpperCase(); }); + }; + cmds.downcaseAtCursor = function(cm) { + modifyWordOrSelection(cm, function(str) { return str.toLowerCase(); }); + }; + + cmds.setSublimeMark = function(cm) { + if (cm.state.sublimeMark) cm.state.sublimeMark.clear(); + cm.state.sublimeMark = cm.setBookmark(cm.getCursor()); + }; + cmds.selectToSublimeMark = function(cm) { + var found = cm.state.sublimeMark && cm.state.sublimeMark.find(); + if (found) cm.setSelection(cm.getCursor(), found); + }; + cmds.deleteToSublimeMark = function(cm) { + var found = cm.state.sublimeMark && cm.state.sublimeMark.find(); + if (found) { + var from = cm.getCursor(), to = found; + if (CodeMirror.cmpPos(from, to) > 0) { var tmp = to; to = from; from = tmp; } + cm.state.sublimeKilled = cm.getRange(from, to); + cm.replaceRange("", from, to); + } + }; + cmds.swapWithSublimeMark = function(cm) { + var found = cm.state.sublimeMark && cm.state.sublimeMark.find(); + if (found) { + cm.state.sublimeMark.clear(); + cm.state.sublimeMark = cm.setBookmark(cm.getCursor()); + cm.setCursor(found); + } + }; + cmds.sublimeYank = function(cm) { + if (cm.state.sublimeKilled != null) + cm.replaceSelection(cm.state.sublimeKilled, null, "paste"); + }; + + cmds.showInCenter = function(cm) { + var pos = cm.cursorCoords(null, "local"); + cm.scrollTo(null, (pos.top + pos.bottom) / 2 - cm.getScrollInfo().clientHeight / 2); + }; + + function getTarget(cm) { + var from = cm.getCursor("from"), to = cm.getCursor("to"); + if (CodeMirror.cmpPos(from, to) == 0) { + var word = wordAt(cm, from); + if (!word.word) return; + from = word.from; + to = word.to; + } + return {from: from, to: to, query: cm.getRange(from, to), word: word}; + } + + function findAndGoTo(cm, forward) { + var target = getTarget(cm); + if (!target) return; + var query = target.query; + var cur = cm.getSearchCursor(query, forward ? target.to : target.from); + + if (forward ? cur.findNext() : cur.findPrevious()) { + cm.setSelection(cur.from(), cur.to()); + } else { + cur = cm.getSearchCursor(query, forward ? Pos(cm.firstLine(), 0) + : cm.clipPos(Pos(cm.lastLine()))); + if (forward ? cur.findNext() : cur.findPrevious()) + cm.setSelection(cur.from(), cur.to()); + else if (target.word) + cm.setSelection(target.from, target.to); + } + }; + cmds.findUnder = function(cm) { findAndGoTo(cm, true); }; + cmds.findUnderPrevious = function(cm) { findAndGoTo(cm,false); }; + cmds.findAllUnder = function(cm) { + var target = getTarget(cm); + if (!target) return; + var cur = cm.getSearchCursor(target.query); + var matches = []; + var primaryIndex = -1; + while (cur.findNext()) { + matches.push({anchor: cur.from(), head: cur.to()}); + if (cur.from().line <= target.from.line && cur.from().ch <= target.from.ch) + primaryIndex++; + } + cm.setSelections(matches, primaryIndex); + }; + + + var keyMap = CodeMirror.keyMap; + keyMap.macSublime = { + "Cmd-Left": "goLineStartSmart", + "Shift-Tab": "indentLess", + "Shift-Ctrl-K": "deleteLine", + "Alt-Q": "wrapLines", + "Ctrl-Left": "goSubwordLeft", + "Ctrl-Right": "goSubwordRight", + "Ctrl-Alt-Up": "scrollLineUp", + "Ctrl-Alt-Down": "scrollLineDown", + "Cmd-L": "selectLine", + "Shift-Cmd-L": "splitSelectionByLine", + "Esc": "singleSelectionTop", + "Cmd-Enter": "insertLineAfter", + "Shift-Cmd-Enter": "insertLineBefore", + "Cmd-D": "selectNextOccurrence", + "Shift-Cmd-Space": "selectScope", + "Shift-Cmd-M": "selectBetweenBrackets", + "Cmd-M": "goToBracket", + "Cmd-Ctrl-Up": "swapLineUp", + "Cmd-Ctrl-Down": "swapLineDown", + "Cmd-/": "toggleCommentIndented", + "Cmd-J": "joinLines", + "Shift-Cmd-D": "duplicateLine", + "F5": "sortLines", + "Shift-F5": "reverseSortLines", + "Cmd-F5": "sortLinesInsensitive", + "Shift-Cmd-F5": "reverseSortLinesInsensitive", + "F2": "nextBookmark", + "Shift-F2": "prevBookmark", + "Cmd-F2": "toggleBookmark", + "Shift-Cmd-F2": "clearBookmarks", + "Alt-F2": "selectBookmarks", + "Backspace": "smartBackspace", + "Cmd-K Cmd-D": "skipAndSelectNextOccurrence", + "Cmd-K Cmd-K": "delLineRight", + "Cmd-K Cmd-U": "upcaseAtCursor", + "Cmd-K Cmd-L": "downcaseAtCursor", + "Cmd-K Cmd-Space": "setSublimeMark", + "Cmd-K Cmd-A": "selectToSublimeMark", + "Cmd-K Cmd-W": "deleteToSublimeMark", + "Cmd-K Cmd-X": "swapWithSublimeMark", + "Cmd-K Cmd-Y": "sublimeYank", + "Cmd-K Cmd-C": "showInCenter", + "Cmd-K Cmd-G": "clearBookmarks", + "Cmd-K Cmd-Backspace": "delLineLeft", + "Cmd-K Cmd-1": "foldAll", + "Cmd-K Cmd-0": "unfoldAll", + "Cmd-K Cmd-J": "unfoldAll", + "Ctrl-Shift-Up": "addCursorToPrevLine", + "Ctrl-Shift-Down": "addCursorToNextLine", + "Cmd-F3": "findUnder", + "Shift-Cmd-F3": "findUnderPrevious", + "Alt-F3": "findAllUnder", + "Shift-Cmd-[": "fold", + "Shift-Cmd-]": "unfold", + "Cmd-I": "findIncremental", + "Shift-Cmd-I": "findIncrementalReverse", + "Cmd-H": "replace", + "F3": "findNext", + "Shift-F3": "findPrev", + "fallthrough": "macDefault" + }; + CodeMirror.normalizeKeyMap(keyMap.macSublime); + + keyMap.pcSublime = { + "Shift-Tab": "indentLess", + "Shift-Ctrl-K": "deleteLine", + "Alt-Q": "wrapLines", + "Ctrl-T": "transposeChars", + "Alt-Left": "goSubwordLeft", + "Alt-Right": "goSubwordRight", + "Ctrl-Up": "scrollLineUp", + "Ctrl-Down": "scrollLineDown", + "Ctrl-L": "selectLine", + "Shift-Ctrl-L": "splitSelectionByLine", + "Esc": "singleSelectionTop", + "Ctrl-Enter": "insertLineAfter", + "Shift-Ctrl-Enter": "insertLineBefore", + "Ctrl-D": "selectNextOccurrence", + "Shift-Ctrl-Space": "selectScope", + "Shift-Ctrl-M": "selectBetweenBrackets", + "Ctrl-M": "goToBracket", + "Shift-Ctrl-Up": "swapLineUp", + "Shift-Ctrl-Down": "swapLineDown", + "Ctrl-/": "toggleCommentIndented", + "Ctrl-J": "joinLines", + "Shift-Ctrl-D": "duplicateLine", + "F9": "sortLines", + "Shift-F9": "reverseSortLines", + "Ctrl-F9": "sortLinesInsensitive", + "Shift-Ctrl-F9": "reverseSortLinesInsensitive", + "F2": "nextBookmark", + "Shift-F2": "prevBookmark", + "Ctrl-F2": "toggleBookmark", + "Shift-Ctrl-F2": "clearBookmarks", + "Alt-F2": "selectBookmarks", + "Backspace": "smartBackspace", + "Ctrl-K Ctrl-D": "skipAndSelectNextOccurrence", + "Ctrl-K Ctrl-K": "delLineRight", + "Ctrl-K Ctrl-U": "upcaseAtCursor", + "Ctrl-K Ctrl-L": "downcaseAtCursor", + "Ctrl-K Ctrl-Space": "setSublimeMark", + "Ctrl-K Ctrl-A": "selectToSublimeMark", + "Ctrl-K Ctrl-W": "deleteToSublimeMark", + "Ctrl-K Ctrl-X": "swapWithSublimeMark", + "Ctrl-K Ctrl-Y": "sublimeYank", + "Ctrl-K Ctrl-C": "showInCenter", + "Ctrl-K Ctrl-G": "clearBookmarks", + "Ctrl-K Ctrl-Backspace": "delLineLeft", + "Ctrl-K Ctrl-1": "foldAll", + "Ctrl-K Ctrl-0": "unfoldAll", + "Ctrl-K Ctrl-J": "unfoldAll", + "Ctrl-Alt-Up": "addCursorToPrevLine", + "Ctrl-Alt-Down": "addCursorToNextLine", + "Ctrl-F3": "findUnder", + "Shift-Ctrl-F3": "findUnderPrevious", + "Alt-F3": "findAllUnder", + "Shift-Ctrl-[": "fold", + "Shift-Ctrl-]": "unfold", + "Ctrl-I": "findIncremental", + "Shift-Ctrl-I": "findIncrementalReverse", + "Ctrl-H": "replace", + "F3": "findNext", + "Shift-F3": "findPrev", + "fallthrough": "pcDefault" + }; + CodeMirror.normalizeKeyMap(keyMap.pcSublime); + + var mac = keyMap.default == keyMap.macDefault; + keyMap.sublime = mac ? keyMap.macSublime : keyMap.pcSublime; +}); diff --git a/js/codemirror/keymap/vim.js b/js/codemirror/keymap/vim.js new file mode 100644 index 0000000..67b245b --- /dev/null +++ b/js/codemirror/keymap/vim.js @@ -0,0 +1,5978 @@ +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../lib/codemirror"), require("../addon/search/searchcursor"), require("../addon/dialog/dialog"), require("../addon/edit/matchbrackets.js")); + else if (typeof define == "function" && define.amd) // AMD + define(["../lib/codemirror", "../addon/search/searchcursor", "../addon/dialog/dialog", "../addon/edit/matchbrackets"], mod); + else // Plain browser env + mod(CodeMirror); + })(function(CodeMirror) { + 'use strict'; + // CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/** + * Supported keybindings: + * Too many to list. Refer to defaultKeymap below. + * + * Supported Ex commands: + * Refer to defaultExCommandMap below. + * + * Registers: unnamed, -, ., :, /, _, a-z, A-Z, 0-9 + * (Does not respect the special case for number registers when delete + * operator is made with these commands: %, (, ), , /, ?, n, N, {, } ) + * TODO: Implement the remaining registers. + * + * Marks: a-z, A-Z, and 0-9 + * TODO: Implement the remaining special marks. They have more complex + * behavior. + * + * Events: + * 'vim-mode-change' - raised on the editor anytime the current mode changes, + * Event object: {mode: "visual", subMode: "linewise"} + * + * Code structure: + * 1. Default keymap + * 2. Variable declarations and short basic helpers + * 3. Instance (External API) implementation + * 4. Internal state tracking objects (input state, counter) implementation + * and instantiation + * 5. Key handler (the main command dispatcher) implementation + * 6. Motion, operator, and action implementations + * 7. Helper functions for the key handler, motions, operators, and actions + * 8. Set up Vim to work as a keymap for CodeMirror. + * 9. Ex command implementations. + */ + +function initVim$1(CodeMirror) { + + var Pos = CodeMirror.Pos; + + function transformCursor(cm, range) { + var vim = cm.state.vim; + if (!vim || vim.insertMode) return range.head; + var head = vim.sel.head; + if (!head) return range.head; + + if (vim.visualBlock) { + if (range.head.line != head.line) { + return; + } + } + if (range.from() == range.anchor && !range.empty()) { + if (range.head.line == head.line && range.head.ch != head.ch) + return new Pos(range.head.line, range.head.ch - 1); + } + + return range.head; + } + + var defaultKeymap = [ + // Key to key mapping. This goes first to make it possible to override + // existing mappings. + { keys: '', type: 'keyToKey', toKeys: 'h' }, + { keys: '', type: 'keyToKey', toKeys: 'l' }, + { keys: '', type: 'keyToKey', toKeys: 'k' }, + { keys: '', type: 'keyToKey', toKeys: 'j' }, + { keys: 'g', type: 'keyToKey', toKeys: 'gk' }, + { keys: 'g', type: 'keyToKey', toKeys: 'gj' }, + { keys: '', type: 'keyToKey', toKeys: 'l' }, + { keys: '', type: 'keyToKey', toKeys: 'h', context: 'normal'}, + { keys: '', type: 'keyToKey', toKeys: 'x', context: 'normal'}, + { keys: '', type: 'keyToKey', toKeys: 'W' }, + { keys: '', type: 'keyToKey', toKeys: 'B', context: 'normal' }, + { keys: '', type: 'keyToKey', toKeys: 'w' }, + { keys: '', type: 'keyToKey', toKeys: 'b', context: 'normal' }, + { keys: '', type: 'keyToKey', toKeys: 'j' }, + { keys: '', type: 'keyToKey', toKeys: 'k' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, + { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, + { keys: '', type: 'keyToKey', toKeys: '' }, // ipad keyboard sends C-Esc instead of C-[ + { keys: '', type: 'keyToKey', toKeys: '', context: 'insert' }, + { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' }, + { keys: 's', type: 'keyToKey', toKeys: 'c', context: 'visual'}, + { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' }, + { keys: 'S', type: 'keyToKey', toKeys: 'VdO', context: 'visual' }, + { keys: '', type: 'keyToKey', toKeys: '0' }, + { keys: '', type: 'keyToKey', toKeys: '$' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: '' }, + { keys: '', type: 'keyToKey', toKeys: 'j^', context: 'normal' }, + { keys: '', type: 'keyToKey', toKeys: 'i', context: 'normal'}, + { keys: '', type: 'action', action: 'toggleOverwrite', context: 'insert' }, + // Motions + { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }}, + { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }}, + { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }}, + { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }}, + { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true }}, + { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true }}, + { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true }}, + { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true }}, + { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false }}, + { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false }}, + { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true }}, + { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true }}, + { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true }}, + { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }}, + { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true }}, + { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true }}, + { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }}, + { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }}, + { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }}, + { keys: '(', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: false }}, + { keys: ')', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: true }}, + { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }}, + { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }}, + { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }}, + { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true }}, + { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }}, + { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }}, + {keys: "g$", type: "motion", motion: "moveToEndOfDisplayLine"}, + {keys: "g^", type: "motion", motion: "moveToStartOfDisplayLine"}, + {keys: "g0", type: "motion", motion: "moveToStartOfDisplayLine"}, + { keys: '0', type: 'motion', motion: 'moveToStartOfLine' }, + { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true }}, + { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar:true }}, + { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }}, + { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true }}, + { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true }}, + { keys: 'f', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true , inclusive: true }}, + { keys: 'F', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false }}, + { keys: 't', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true }}, + { keys: 'T', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false }}, + { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true }}, + { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false }}, + { keys: '\'', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true, linewise: true}}, + { keys: '`', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true}}, + { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } }, + { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } }, + { keys: ']\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } }, + { keys: '[\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } }, + // the next two aren't motions but must come before more general motion declarations + { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true}}, + { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true}}, + { keys: ']', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true}}, + { keys: '[', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true}}, + { keys: '|', type: 'motion', motion: 'moveToColumn'}, + { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context:'visual'}, + { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: {sameLine: true}, context:'visual'}, + // Operators + { keys: 'd', type: 'operator', operator: 'delete' }, + { keys: 'y', type: 'operator', operator: 'yank' }, + { keys: 'c', type: 'operator', operator: 'change' }, + { keys: '=', type: 'operator', operator: 'indentAuto' }, + { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }}, + { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }}, + { keys: 'g~', type: 'operator', operator: 'changeCase' }, + { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, isEdit: true }, + { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, isEdit: true }, + { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true }}, + { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true }}, + { keys: 'gn', type: 'motion', motion: 'findAndSelectNextInclusive', motionArgs: { forward: true }}, + { keys: 'gN', type: 'motion', motion: 'findAndSelectNextInclusive', motionArgs: { forward: false }}, + // Operator-Motion dual commands + { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false }}, + { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }}, + { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, + { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'}, + { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'expandToLine', motionArgs: { linewise: true }, context: 'normal'}, + { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'}, + { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, + { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'}, + { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'}, + { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'}, + { keys: '', type: 'operatorMotion', operator: 'delete', motion: 'moveToStartOfLine', context: 'insert' }, + { keys: '', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' }, + //ignore C-w in normal mode + { keys: '', type: 'idle', context: 'normal' }, + // Actions + { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }}, + { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }}, + { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }}, + { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true }}, + { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' }, + { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' }, + { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' }, + { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' }, + { keys: 'gi', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'lastEdit' }, context: 'normal' }, + { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' }, + { keys: 'gI', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'bol'}, context: 'normal' }, + { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' }, + { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' }, + { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' }, + { keys: 'v', type: 'action', action: 'toggleVisualMode' }, + { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true }}, + { keys: '', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }}, + { keys: '', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }}, + { keys: 'gv', type: 'action', action: 'reselectLastSelection' }, + { keys: 'J', type: 'action', action: 'joinLines', isEdit: true }, + { keys: 'gJ', type: 'action', action: 'joinLines', actionArgs: { keepSpaces: true }, isEdit: true }, + { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }}, + { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }}, + { keys: 'r', type: 'action', action: 'replace', isEdit: true }, + { keys: '@', type: 'action', action: 'replayMacro' }, + { keys: 'q', type: 'action', action: 'enterMacroRecordMode' }, + // Handle Replace-mode as a special case of insert mode. + { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }, context: 'normal'}, + { keys: 'R', type: 'operator', operator: 'change', operatorArgs: { linewise: true, fullLine: true }, context: 'visual', exitVisualBlock: true}, + { keys: 'u', type: 'action', action: 'undo', context: 'normal' }, + { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true }, + { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true }, + { keys: '', type: 'action', action: 'redo' }, + { keys: 'm', type: 'action', action: 'setMark' }, + { keys: '"', type: 'action', action: 'setRegister' }, + { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }}, + { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }}, + { keys: 'z', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }}, + { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: '.', type: 'action', action: 'repeatLastEdit' }, + { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}}, + { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}}, + { keys: '', type: 'action', action: 'indent', actionArgs: { indentRight: true }, context: 'insert' }, + { keys: '', type: 'action', action: 'indent', actionArgs: { indentRight: false }, context: 'insert' }, + // Text object motions + { keys: 'a', type: 'motion', motion: 'textObjectManipulation' }, + { keys: 'i', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }}, + // Search + { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }}, + { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }}, + { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }}, + { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }}, + { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }}, + { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }}, + // Ex command + { keys: ':', type: 'ex' } + ]; + var defaultKeymapLength = defaultKeymap.length; + + /** + * Ex commands + * Care must be taken when adding to the default Ex command map. For any + * pair of commands that have a shared prefix, at least one of their + * shortNames must not match the prefix of the other command. + */ + var defaultExCommandMap = [ + { name: 'colorscheme', shortName: 'colo' }, + { name: 'map' }, + { name: 'imap', shortName: 'im' }, + { name: 'nmap', shortName: 'nm' }, + { name: 'vmap', shortName: 'vm' }, + { name: 'unmap' }, + { name: 'write', shortName: 'w' }, + { name: 'undo', shortName: 'u' }, + { name: 'redo', shortName: 'red' }, + { name: 'set', shortName: 'se' }, + { name: 'setlocal', shortName: 'setl' }, + { name: 'setglobal', shortName: 'setg' }, + { name: 'sort', shortName: 'sor' }, + { name: 'substitute', shortName: 's', possiblyAsync: true }, + { name: 'nohlsearch', shortName: 'noh' }, + { name: 'yank', shortName: 'y' }, + { name: 'delmarks', shortName: 'delm' }, + { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true }, + { name: 'vglobal', shortName: 'v' }, + { name: 'global', shortName: 'g' } + ]; + + function enterVimMode(cm) { + cm.setOption('disableInput', true); + cm.setOption('showCursorWhenSelecting', false); + CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); + cm.on('cursorActivity', onCursorActivity); + maybeInitVimState(cm); + CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm)); + } + + function leaveVimMode(cm) { + cm.setOption('disableInput', false); + cm.off('cursorActivity', onCursorActivity); + CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm)); + cm.state.vim = null; + if (highlightTimeout) clearTimeout(highlightTimeout); + } + + function detachVimMap(cm, next) { + if (this == CodeMirror.keyMap.vim) { + cm.options.$customCursor = null; + CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor"); + } + + if (!next || next.attach != attachVimMap) + leaveVimMode(cm); + } + function attachVimMap(cm, prev) { + if (this == CodeMirror.keyMap.vim) { + if (cm.curOp) cm.curOp.selectionChanged = true; + cm.options.$customCursor = transformCursor; + CodeMirror.addClass(cm.getWrapperElement(), "cm-fat-cursor"); + } + + if (!prev || prev.attach != attachVimMap) + enterVimMode(cm); + } + + // Deprecated, simply setting the keymap works again. + CodeMirror.defineOption('vimMode', false, function(cm, val, prev) { + if (val && cm.getOption("keyMap") != "vim") + cm.setOption("keyMap", "vim"); + else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption("keyMap"))) + cm.setOption("keyMap", "default"); + }); + + function cmKey(key, cm) { + if (!cm) { return undefined; } + if (this[key]) { return this[key]; } + var vimKey = cmKeyToVimKey(key); + if (!vimKey) { + return false; + } + var cmd = vimApi.findKey(cm, vimKey); + if (typeof cmd == 'function') { + CodeMirror.signal(cm, 'vim-keypress', vimKey); + } + return cmd; + } + + var modifiers = {Shift:'S',Ctrl:'C',Alt:'A',Cmd:'D',Mod:'A',CapsLock:''}; + var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del',Insert:'Ins'}; + function cmKeyToVimKey(key) { + if (key.charAt(0) == '\'') { + // Keypress character binding of format "'a'" + return key.charAt(1); + } + var pieces = key.split(/-(?!$)/); + var lastPiece = pieces[pieces.length - 1]; + if (pieces.length == 1 && pieces[0].length == 1) { + // No-modifier bindings use literal character bindings above. Skip. + return false; + } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) { + // Ignore Shift+char bindings as they should be handled by literal character. + return false; + } + var hasCharacter = false; + for (var i = 0; i < pieces.length; i++) { + var piece = pieces[i]; + if (piece in modifiers) { pieces[i] = modifiers[piece]; } + else { hasCharacter = true; } + if (piece in specialKeys) { pieces[i] = specialKeys[piece]; } + } + if (!hasCharacter) { + // Vim does not support modifier only keys. + return false; + } + // TODO: Current bindings expect the character to be lower case, but + // it looks like vim key notation uses upper case. + if (isUpperCase(lastPiece)) { + pieces[pieces.length - 1] = lastPiece.toLowerCase(); + } + return '<' + pieces.join('-') + '>'; + } + + function getOnPasteFn(cm) { + var vim = cm.state.vim; + if (!vim.onPasteFn) { + vim.onPasteFn = function() { + if (!vim.insertMode) { + cm.setCursor(offsetCursor(cm.getCursor(), 0, 1)); + actions.enterInsertMode(cm, {}, vim); + } + }; + } + return vim.onPasteFn; + } + + var numberRegex = /[\d]/; + var wordCharTest = [CodeMirror.isWordChar, function(ch) { + return ch && !CodeMirror.isWordChar(ch) && !/\s/.test(ch); + }], bigWordCharTest = [function(ch) { + return /\S/.test(ch); + }]; + function makeKeyRange(start, size) { + var keys = []; + for (var i = start; i < start + size; i++) { + keys.push(String.fromCharCode(i)); + } + return keys; + } + var upperCaseAlphabet = makeKeyRange(65, 26); + var lowerCaseAlphabet = makeKeyRange(97, 26); + var numbers = makeKeyRange(48, 10); + var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']); + var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '_', '/']); + var upperCaseChars; + try { upperCaseChars = new RegExp("^[\\p{Lu}]$", "u"); } + catch (_) { upperCaseChars = /^[A-Z]$/; } + + function isLine(cm, line) { + return line >= cm.firstLine() && line <= cm.lastLine(); + } + function isLowerCase(k) { + return (/^[a-z]$/).test(k); + } + function isMatchableSymbol(k) { + return '()[]{}'.indexOf(k) != -1; + } + function isNumber(k) { + return numberRegex.test(k); + } + function isUpperCase(k) { + return upperCaseChars.test(k); + } + function isWhiteSpaceString(k) { + return (/^\s*$/).test(k); + } + function isEndOfSentenceSymbol(k) { + return '.?!'.indexOf(k) != -1; + } + function inArray(val, arr) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == val) { + return true; + } + } + return false; + } + + var options = {}; + function defineOption(name, defaultValue, type, aliases, callback) { + if (defaultValue === undefined && !callback) { + throw Error('defaultValue is required unless callback is provided'); + } + if (!type) { type = 'string'; } + options[name] = { + type: type, + defaultValue: defaultValue, + callback: callback + }; + if (aliases) { + for (var i = 0; i < aliases.length; i++) { + options[aliases[i]] = options[name]; + } + } + if (defaultValue) { + setOption(name, defaultValue); + } + } + + function setOption(name, value, cm, cfg) { + var option = options[name]; + cfg = cfg || {}; + var scope = cfg.scope; + if (!option) { + return new Error('Unknown option: ' + name); + } + if (option.type == 'boolean') { + if (value && value !== true) { + return new Error('Invalid argument: ' + name + '=' + value); + } else if (value !== false) { + // Boolean options are set to true if value is not defined. + value = true; + } + } + if (option.callback) { + if (scope !== 'local') { + option.callback(value, undefined); + } + if (scope !== 'global' && cm) { + option.callback(value, cm); + } + } else { + if (scope !== 'local') { + option.value = option.type == 'boolean' ? !!value : value; + } + if (scope !== 'global' && cm) { + cm.state.vim.options[name] = {value: value}; + } + } + } + + function getOption(name, cm, cfg) { + var option = options[name]; + cfg = cfg || {}; + var scope = cfg.scope; + if (!option) { + return new Error('Unknown option: ' + name); + } + if (option.callback) { + var local = cm && option.callback(undefined, cm); + if (scope !== 'global' && local !== undefined) { + return local; + } + if (scope !== 'local') { + return option.callback(); + } + return; + } else { + var local = (scope !== 'global') && (cm && cm.state.vim.options[name]); + return (local || (scope !== 'local') && option || {}).value; + } + } + + defineOption('filetype', undefined, 'string', ['ft'], function(name, cm) { + // Option is local. Do nothing for global. + if (cm === undefined) { + return; + } + // The 'filetype' option proxies to the CodeMirror 'mode' option. + if (name === undefined) { + var mode = cm.getOption('mode'); + return mode == 'null' ? '' : mode; + } else { + var mode = name == '' ? 'null' : name; + cm.setOption('mode', mode); + } + }); + + var createCircularJumpList = function() { + var size = 100; + var pointer = -1; + var head = 0; + var tail = 0; + var buffer = new Array(size); + function add(cm, oldCur, newCur) { + var current = pointer % size; + var curMark = buffer[current]; + function useNextSlot(cursor) { + var next = ++pointer % size; + var trashMark = buffer[next]; + if (trashMark) { + trashMark.clear(); + } + buffer[next] = cm.setBookmark(cursor); + } + if (curMark) { + var markPos = curMark.find(); + // avoid recording redundant cursor position + if (markPos && !cursorEqual(markPos, oldCur)) { + useNextSlot(oldCur); + } + } else { + useNextSlot(oldCur); + } + useNextSlot(newCur); + head = pointer; + tail = pointer - size + 1; + if (tail < 0) { + tail = 0; + } + } + function move(cm, offset) { + pointer += offset; + if (pointer > head) { + pointer = head; + } else if (pointer < tail) { + pointer = tail; + } + var mark = buffer[(size + pointer) % size]; + // skip marks that are temporarily removed from text buffer + if (mark && !mark.find()) { + var inc = offset > 0 ? 1 : -1; + var newCur; + var oldCur = cm.getCursor(); + do { + pointer += inc; + mark = buffer[(size + pointer) % size]; + // skip marks that are the same as current position + if (mark && + (newCur = mark.find()) && + !cursorEqual(oldCur, newCur)) { + break; + } + } while (pointer < head && pointer > tail); + } + return mark; + } + function find(cm, offset) { + var oldPointer = pointer; + var mark = move(cm, offset); + pointer = oldPointer; + return mark && mark.find(); + } + return { + cachedCursor: undefined, //used for # and * jumps + add: add, + find: find, + move: move + }; + }; + + // Returns an object to track the changes associated insert mode. It + // clones the object that is passed in, or creates an empty object one if + // none is provided. + var createInsertModeChanges = function(c) { + if (c) { + // Copy construction + return { + changes: c.changes, + expectCursorActivityForChange: c.expectCursorActivityForChange + }; + } + return { + // Change list + changes: [], + // Set to true on change, false on cursorActivity. + expectCursorActivityForChange: false + }; + }; + + function MacroModeState() { + this.latestRegister = undefined; + this.isPlaying = false; + this.isRecording = false; + this.replaySearchQueries = []; + this.onRecordingDone = undefined; + this.lastInsertModeChanges = createInsertModeChanges(); + } + MacroModeState.prototype = { + exitMacroRecordMode: function() { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.onRecordingDone) { + macroModeState.onRecordingDone(); // close dialog + } + macroModeState.onRecordingDone = undefined; + macroModeState.isRecording = false; + }, + enterMacroRecordMode: function(cm, registerName) { + var register = + vimGlobalState.registerController.getRegister(registerName); + if (register) { + register.clear(); + this.latestRegister = registerName; + if (cm.openDialog) { + var template = dom('span', {class: 'cm-vim-message'}, 'recording @' + registerName); + this.onRecordingDone = cm.openDialog(template, null, {bottom:true}); + } + this.isRecording = true; + } + } + }; + + function maybeInitVimState(cm) { + if (!cm.state.vim) { + // Store instance state in the CodeMirror object. + cm.state.vim = { + inputState: new InputState(), + // Vim's input state that triggered the last edit, used to repeat + // motions and operators with '.'. + lastEditInputState: undefined, + // Vim's action command before the last edit, used to repeat actions + // with '.' and insert mode repeat. + lastEditActionCommand: undefined, + // When using jk for navigation, if you move from a longer line to a + // shorter line, the cursor may clip to the end of the shorter line. + // If j is pressed again and cursor goes to the next line, the + // cursor should go back to its horizontal position on the longer + // line if it can. This is to keep track of the horizontal position. + lastHPos: -1, + // Doing the same with screen-position for gj/gk + lastHSPos: -1, + // The last motion command run. Cleared if a non-motion command gets + // executed in between. + lastMotion: null, + marks: {}, + insertMode: false, + // Repeat count for changes made in insert mode, triggered by key + // sequences like 3,i. Only exists when insertMode is true. + insertModeRepeat: undefined, + visualMode: false, + // If we are in visual line mode. No effect if visualMode is false. + visualLine: false, + visualBlock: false, + lastSelection: null, + lastPastedText: null, + sel: {}, + // Buffer-local/window-local values of vim options. + options: {} + }; + } + return cm.state.vim; + } + var vimGlobalState; + function resetVimGlobalState() { + vimGlobalState = { + // The current search query. + searchQuery: null, + // Whether we are searching backwards. + searchIsReversed: false, + // Replace part of the last substituted pattern + lastSubstituteReplacePart: undefined, + jumpList: createCircularJumpList(), + macroModeState: new MacroModeState, + // Recording latest f, t, F or T motion command. + lastCharacterSearch: {increment:0, forward:true, selectedCharacter:''}, + registerController: new RegisterController({}), + // search history buffer + searchHistoryController: new HistoryController(), + // ex Command history buffer + exCommandHistoryController : new HistoryController() + }; + for (var optionName in options) { + var option = options[optionName]; + option.value = option.defaultValue; + } + } + + var lastInsertModeKeyTimer; + var vimApi = { + enterVimMode: enterVimMode, + buildKeyMap: function() { + // TODO: Convert keymap into dictionary format for fast lookup. + }, + // Testing hook, though it might be useful to expose the register + // controller anyway. + getRegisterController: function() { + return vimGlobalState.registerController; + }, + // Testing hook. + resetVimGlobalState_: resetVimGlobalState, + + // Testing hook. + getVimGlobalState_: function() { + return vimGlobalState; + }, + + // Testing hook. + maybeInitVimState_: maybeInitVimState, + + suppressErrorLogging: false, + + InsertModeKey: InsertModeKey, + map: function(lhs, rhs, ctx) { + // Add user defined key bindings. + exCommandDispatcher.map(lhs, rhs, ctx); + }, + unmap: function(lhs, ctx) { + return exCommandDispatcher.unmap(lhs, ctx); + }, + // Non-recursive map function. + // NOTE: This will not create mappings to key maps that aren't present + // in the default key map. See TODO at bottom of function. + noremap: function(lhs, rhs, ctx) { + function toCtxArray(ctx) { + return ctx ? [ctx] : ['normal', 'insert', 'visual']; + } + var ctxsToMap = toCtxArray(ctx); + // Look through all actual defaults to find a map candidate. + var actualLength = defaultKeymap.length, origLength = defaultKeymapLength; + for (var i = actualLength - origLength; + i < actualLength && ctxsToMap.length; + i++) { + var mapping = defaultKeymap[i]; + // Omit mappings that operate in the wrong context(s) and those of invalid type. + if (mapping.keys == rhs && + (!ctx || !mapping.context || mapping.context === ctx) && + mapping.type.substr(0, 2) !== 'ex' && + mapping.type.substr(0, 3) !== 'key') { + // Make a shallow copy of the original keymap entry. + var newMapping = {}; + for (var key in mapping) { + newMapping[key] = mapping[key]; + } + // Modify it point to the new mapping with the proper context. + newMapping.keys = lhs; + if (ctx && !newMapping.context) { + newMapping.context = ctx; + } + // Add it to the keymap with a higher priority than the original. + this._mapCommand(newMapping); + // Record the mapped contexts as complete. + var mappedCtxs = toCtxArray(mapping.context); + ctxsToMap = ctxsToMap.filter(function(el) { return mappedCtxs.indexOf(el) === -1; }); + } + } + // TODO: Create non-recursive keyToKey mappings for the unmapped contexts once those exist. + }, + // Remove all user-defined mappings for the provided context. + mapclear: function(ctx) { + // Partition the existing keymap into user-defined and true defaults. + var actualLength = defaultKeymap.length, + origLength = defaultKeymapLength; + var userKeymap = defaultKeymap.slice(0, actualLength - origLength); + defaultKeymap = defaultKeymap.slice(actualLength - origLength); + if (ctx) { + // If a specific context is being cleared, we need to keep mappings + // from all other contexts. + for (var i = userKeymap.length - 1; i >= 0; i--) { + var mapping = userKeymap[i]; + if (ctx !== mapping.context) { + if (mapping.context) { + this._mapCommand(mapping); + } else { + // `mapping` applies to all contexts so create keymap copies + // for each context except the one being cleared. + var contexts = ['normal', 'insert', 'visual']; + for (var j in contexts) { + if (contexts[j] !== ctx) { + var newMapping = {}; + for (var key in mapping) { + newMapping[key] = mapping[key]; + } + newMapping.context = contexts[j]; + this._mapCommand(newMapping); + } + } + } + } + } + } + }, + // TODO: Expose setOption and getOption as instance methods. Need to decide how to namespace + // them, or somehow make them work with the existing CodeMirror setOption/getOption API. + setOption: setOption, + getOption: getOption, + defineOption: defineOption, + defineEx: function(name, prefix, func){ + if (!prefix) { + prefix = name; + } else if (name.indexOf(prefix) !== 0) { + throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered'); + } + exCommands[name]=func; + exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'}; + }, + handleKey: function (cm, key, origin) { + var command = this.findKey(cm, key, origin); + if (typeof command === 'function') { + return command(); + } + }, + multiSelectHandleKey: multiSelectHandleKey, + + /** + * This is the outermost function called by CodeMirror, after keys have + * been mapped to their Vim equivalents. + * + * Finds a command based on the key (and cached keys if there is a + * multi-key sequence). Returns `undefined` if no key is matched, a noop + * function if a partial match is found (multi-key), and a function to + * execute the bound command if a a key is matched. The function always + * returns true. + */ + findKey: function(cm, key, origin) { + var vim = maybeInitVimState(cm); + function handleMacroRecording() { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isRecording) { + if (key == 'q') { + macroModeState.exitMacroRecordMode(); + clearInputState(cm); + return true; + } + if (origin != 'mapping') { + logKey(macroModeState, key); + } + } + } + function handleEsc() { + if (key == '') { + if (vim.visualMode) { + // Get back to normal mode. + exitVisualMode(cm); + } else if (vim.insertMode) { + // Get back to normal mode. + exitInsertMode(cm); + } else { + // We're already in normal mode. Let '' be handled normally. + return; + } + clearInputState(cm); + return true; + } + } + function doKeyToKey(keys) { + // TODO: prevent infinite recursion. + var match; + while (keys) { + // Pull off one command key, which is either a single character + // or a special sequence wrapped in '<' and '>', e.g. ''. + match = (/<\w+-.+?>|<\w+>|./).exec(keys); + key = match[0]; + keys = keys.substring(match.index + key.length); + vimApi.handleKey(cm, key, 'mapping'); + } + } + + function handleKeyInsertMode() { + if (handleEsc()) { return true; } + var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; + var keysAreChars = key.length == 1; + var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); + // Need to check all key substrings in insert mode. + while (keys.length > 1 && match.type != 'full') { + var keys = vim.inputState.keyBuffer = keys.slice(1); + var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert'); + if (thisMatch.type != 'none') { match = thisMatch; } + } + if (match.type == 'none') { clearInputState(cm); return false; } + else if (match.type == 'partial') { + if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } + lastInsertModeKeyTimer = window.setTimeout( + function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } }, + getOption('insertModeEscKeysTimeout')); + return !keysAreChars; + } + + if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); } + if (keysAreChars) { + var selections = cm.listSelections(); + for (var i = 0; i < selections.length; i++) { + var here = selections[i].head; + cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input'); + } + vimGlobalState.macroModeState.lastInsertModeChanges.changes.pop(); + } + clearInputState(cm); + return match.command; + } + + function handleKeyNonInsertMode() { + if (handleMacroRecording() || handleEsc()) { return true; } + + var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key; + if (/^[1-9]\d*$/.test(keys)) { return true; } + + var keysMatcher = /^(\d*)(.*)$/.exec(keys); + if (!keysMatcher) { clearInputState(cm); return false; } + var context = vim.visualMode ? 'visual' : + 'normal'; + var mainKey = keysMatcher[2] || keysMatcher[1]; + if (vim.inputState.operatorShortcut && vim.inputState.operatorShortcut.slice(-1) == mainKey) { + // multikey operators act linewise by repeating only the last character + mainKey = vim.inputState.operatorShortcut; + } + var match = commandDispatcher.matchCommand(mainKey, defaultKeymap, vim.inputState, context); + if (match.type == 'none') { clearInputState(cm); return false; } + else if (match.type == 'partial') { return true; } + else if (match.type == 'clear') { clearInputState(cm); return true; } + + vim.inputState.keyBuffer = ''; + keysMatcher = /^(\d*)(.*)$/.exec(keys); + if (keysMatcher[1] && keysMatcher[1] != '0') { + vim.inputState.pushRepeatDigit(keysMatcher[1]); + } + return match.command; + } + + var command; + if (vim.insertMode) { command = handleKeyInsertMode(); } + else { command = handleKeyNonInsertMode(); } + if (command === false) { + return !vim.insertMode && key.length === 1 ? function() { return true; } : undefined; + } else if (command === true) { + // TODO: Look into using CodeMirror's multi-key handling. + // Return no-op since we are caching the key. Counts as handled, but + // don't want act on it just yet. + return function() { return true; }; + } else { + return function() { + return cm.operation(function() { + cm.curOp.isVimOp = true; + try { + if (command.type == 'keyToKey') { + doKeyToKey(command.toKeys); + } else { + commandDispatcher.processCommand(cm, vim, command); + } + } catch (e) { + // clear VIM state in case it's in a bad state. + cm.state.vim = undefined; + maybeInitVimState(cm); + if (!vimApi.suppressErrorLogging) { + console['log'](e); + } + throw e; + } + return true; + }); + }; + } + }, + handleEx: function(cm, input) { + exCommandDispatcher.processCommand(cm, input); + }, + + defineMotion: defineMotion, + defineAction: defineAction, + defineOperator: defineOperator, + mapCommand: mapCommand, + _mapCommand: _mapCommand, + + defineRegister: defineRegister, + + exitVisualMode: exitVisualMode, + exitInsertMode: exitInsertMode + }; + + // Represents the current input state. + function InputState() { + this.prefixRepeat = []; + this.motionRepeat = []; + + this.operator = null; + this.operatorArgs = null; + this.motion = null; + this.motionArgs = null; + this.keyBuffer = []; // For matching multi-key commands. + this.registerName = null; // Defaults to the unnamed register. + } + InputState.prototype.pushRepeatDigit = function(n) { + if (!this.operator) { + this.prefixRepeat = this.prefixRepeat.concat(n); + } else { + this.motionRepeat = this.motionRepeat.concat(n); + } + }; + InputState.prototype.getRepeat = function() { + var repeat = 0; + if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) { + repeat = 1; + if (this.prefixRepeat.length > 0) { + repeat *= parseInt(this.prefixRepeat.join(''), 10); + } + if (this.motionRepeat.length > 0) { + repeat *= parseInt(this.motionRepeat.join(''), 10); + } + } + return repeat; + }; + + function clearInputState(cm, reason) { + cm.state.vim.inputState = new InputState(); + CodeMirror.signal(cm, 'vim-command-done', reason); + } + + /* + * Register stores information about copy and paste registers. Besides + * text, a register must store whether it is linewise (i.e., when it is + * pasted, should it insert itself into a new line, or should the text be + * inserted at the cursor position.) + */ + function Register(text, linewise, blockwise) { + this.clear(); + this.keyBuffer = [text || '']; + this.insertModeChanges = []; + this.searchQueries = []; + this.linewise = !!linewise; + this.blockwise = !!blockwise; + } + Register.prototype = { + setText: function(text, linewise, blockwise) { + this.keyBuffer = [text || '']; + this.linewise = !!linewise; + this.blockwise = !!blockwise; + }, + pushText: function(text, linewise) { + // if this register has ever been set to linewise, use linewise. + if (linewise) { + if (!this.linewise) { + this.keyBuffer.push('\n'); + } + this.linewise = true; + } + this.keyBuffer.push(text); + }, + pushInsertModeChanges: function(changes) { + this.insertModeChanges.push(createInsertModeChanges(changes)); + }, + pushSearchQuery: function(query) { + this.searchQueries.push(query); + }, + clear: function() { + this.keyBuffer = []; + this.insertModeChanges = []; + this.searchQueries = []; + this.linewise = false; + }, + toString: function() { + return this.keyBuffer.join(''); + } + }; + + /** + * Defines an external register. + * + * The name should be a single character that will be used to reference the register. + * The register should support setText, pushText, clear, and toString(). See Register + * for a reference implementation. + */ + function defineRegister(name, register) { + var registers = vimGlobalState.registerController.registers; + if (!name || name.length != 1) { + throw Error('Register name must be 1 character'); + } + if (registers[name]) { + throw Error('Register already defined ' + name); + } + registers[name] = register; + validRegisters.push(name); + } + + /* + * vim registers allow you to keep many independent copy and paste buffers. + * See http://usevim.com/2012/04/13/registers/ for an introduction. + * + * RegisterController keeps the state of all the registers. An initial + * state may be passed in. The unnamed register '"' will always be + * overridden. + */ + function RegisterController(registers) { + this.registers = registers; + this.unnamedRegister = registers['"'] = new Register(); + registers['.'] = new Register(); + registers[':'] = new Register(); + registers['/'] = new Register(); + } + RegisterController.prototype = { + pushText: function(registerName, operator, text, linewise, blockwise) { + // The black hole register, "_, means delete/yank to nowhere. + if (registerName === '_') return; + if (linewise && text.charAt(text.length - 1) !== '\n'){ + text += '\n'; + } + // Lowercase and uppercase registers refer to the same register. + // Uppercase just means append. + var register = this.isValidRegister(registerName) ? + this.getRegister(registerName) : null; + // if no register/an invalid register was specified, things go to the + // default registers + if (!register) { + switch (operator) { + case 'yank': + // The 0 register contains the text from the most recent yank. + this.registers['0'] = new Register(text, linewise, blockwise); + break; + case 'delete': + case 'change': + if (text.indexOf('\n') == -1) { + // Delete less than 1 line. Update the small delete register. + this.registers['-'] = new Register(text, linewise); + } else { + // Shift down the contents of the numbered registers and put the + // deleted text into register 1. + this.shiftNumericRegisters_(); + this.registers['1'] = new Register(text, linewise); + } + break; + } + // Make sure the unnamed register is set to what just happened + this.unnamedRegister.setText(text, linewise, blockwise); + return; + } + + // If we've gotten to this point, we've actually specified a register + var append = isUpperCase(registerName); + if (append) { + register.pushText(text, linewise); + } else { + register.setText(text, linewise, blockwise); + } + // The unnamed register always has the same value as the last used + // register. + this.unnamedRegister.setText(register.toString(), linewise); + }, + // Gets the register named @name. If one of @name doesn't already exist, + // create it. If @name is invalid, return the unnamedRegister. + getRegister: function(name) { + if (!this.isValidRegister(name)) { + return this.unnamedRegister; + } + name = name.toLowerCase(); + if (!this.registers[name]) { + this.registers[name] = new Register(); + } + return this.registers[name]; + }, + isValidRegister: function(name) { + return name && inArray(name, validRegisters); + }, + shiftNumericRegisters_: function() { + for (var i = 9; i >= 2; i--) { + this.registers[i] = this.getRegister('' + (i - 1)); + } + } + }; + function HistoryController() { + this.historyBuffer = []; + this.iterator = 0; + this.initialPrefix = null; + } + HistoryController.prototype = { + // the input argument here acts a user entered prefix for a small time + // until we start autocompletion in which case it is the autocompleted. + nextMatch: function (input, up) { + var historyBuffer = this.historyBuffer; + var dir = up ? -1 : 1; + if (this.initialPrefix === null) this.initialPrefix = input; + for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i+= dir) { + var element = historyBuffer[i]; + for (var j = 0; j <= element.length; j++) { + if (this.initialPrefix == element.substring(0, j)) { + this.iterator = i; + return element; + } + } + } + // should return the user input in case we reach the end of buffer. + if (i >= historyBuffer.length) { + this.iterator = historyBuffer.length; + return this.initialPrefix; + } + // return the last autocompleted query or exCommand as it is. + if (i < 0 ) return input; + }, + pushInput: function(input) { + var index = this.historyBuffer.indexOf(input); + if (index > -1) this.historyBuffer.splice(index, 1); + if (input.length) this.historyBuffer.push(input); + }, + reset: function() { + this.initialPrefix = null; + this.iterator = this.historyBuffer.length; + } + }; + var commandDispatcher = { + matchCommand: function(keys, keyMap, inputState, context) { + var matches = commandMatches(keys, keyMap, context, inputState); + if (!matches.full && !matches.partial) { + return {type: 'none'}; + } else if (!matches.full && matches.partial) { + return {type: 'partial'}; + } + + var bestMatch; + for (var i = 0; i < matches.full.length; i++) { + var match = matches.full[i]; + if (!bestMatch) { + bestMatch = match; + } + } + if (bestMatch.keys.slice(-11) == '') { + var character = lastChar(keys); + if (!character || character.length > 1) return {type: 'clear'}; + inputState.selectedCharacter = character; + } + return {type: 'full', command: bestMatch}; + }, + processCommand: function(cm, vim, command) { + vim.inputState.repeatOverride = command.repeatOverride; + switch (command.type) { + case 'motion': + this.processMotion(cm, vim, command); + break; + case 'operator': + this.processOperator(cm, vim, command); + break; + case 'operatorMotion': + this.processOperatorMotion(cm, vim, command); + break; + case 'action': + this.processAction(cm, vim, command); + break; + case 'search': + this.processSearch(cm, vim, command); + break; + case 'ex': + case 'keyToEx': + this.processEx(cm, vim, command); + break; + } + }, + processMotion: function(cm, vim, command) { + vim.inputState.motion = command.motion; + vim.inputState.motionArgs = copyArgs(command.motionArgs); + this.evalInput(cm, vim); + }, + processOperator: function(cm, vim, command) { + var inputState = vim.inputState; + if (inputState.operator) { + if (inputState.operator == command.operator) { + // Typing an operator twice like 'dd' makes the operator operate + // linewise + inputState.motion = 'expandToLine'; + inputState.motionArgs = { linewise: true }; + this.evalInput(cm, vim); + return; + } else { + // 2 different operators in a row doesn't make sense. + clearInputState(cm); + } + } + inputState.operator = command.operator; + inputState.operatorArgs = copyArgs(command.operatorArgs); + if (command.keys.length > 1) { + inputState.operatorShortcut = command.keys; + } + if (command.exitVisualBlock) { + vim.visualBlock = false; + updateCmSelection(cm); + } + if (vim.visualMode) { + // Operating on a selection in visual mode. We don't need a motion. + this.evalInput(cm, vim); + } + }, + processOperatorMotion: function(cm, vim, command) { + var visualMode = vim.visualMode; + var operatorMotionArgs = copyArgs(command.operatorMotionArgs); + if (operatorMotionArgs) { + // Operator motions may have special behavior in visual mode. + if (visualMode && operatorMotionArgs.visualLine) { + vim.visualLine = true; + } + } + this.processOperator(cm, vim, command); + if (!visualMode) { + this.processMotion(cm, vim, command); + } + }, + processAction: function(cm, vim, command) { + var inputState = vim.inputState; + var repeat = inputState.getRepeat(); + var repeatIsExplicit = !!repeat; + var actionArgs = copyArgs(command.actionArgs) || {}; + if (inputState.selectedCharacter) { + actionArgs.selectedCharacter = inputState.selectedCharacter; + } + // Actions may or may not have motions and operators. Do these first. + if (command.operator) { + this.processOperator(cm, vim, command); + } + if (command.motion) { + this.processMotion(cm, vim, command); + } + if (command.motion || command.operator) { + this.evalInput(cm, vim); + } + actionArgs.repeat = repeat || 1; + actionArgs.repeatIsExplicit = repeatIsExplicit; + actionArgs.registerName = inputState.registerName; + clearInputState(cm); + vim.lastMotion = null; + if (command.isEdit) { + this.recordLastEdit(vim, inputState, command); + } + actions[command.action](cm, actionArgs, vim); + }, + processSearch: function(cm, vim, command) { + if (!cm.getSearchCursor) { + // Search depends on SearchCursor. + return; + } + var forward = command.searchArgs.forward; + var wholeWordOnly = command.searchArgs.wholeWordOnly; + getSearchState(cm).setReversed(!forward); + var promptPrefix = (forward) ? '/' : '?'; + var originalQuery = getSearchState(cm).getQuery(); + var originalScrollPos = cm.getScrollInfo(); + function handleQuery(query, ignoreCase, smartCase) { + vimGlobalState.searchHistoryController.pushInput(query); + vimGlobalState.searchHistoryController.reset(); + try { + updateSearchQuery(cm, query, ignoreCase, smartCase); + } catch (e) { + showConfirm(cm, 'Invalid regex: ' + query); + clearInputState(cm); + return; + } + commandDispatcher.processMotion(cm, vim, { + type: 'motion', + motion: 'findNext', + motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist } + }); + } + function onPromptClose(query) { + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + handleQuery(query, true /** ignoreCase */, true /** smartCase */); + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isRecording) { + logSearchQuery(macroModeState, query); + } + } + function onPromptKeyUp(e, query, close) { + var keyName = CodeMirror.keyName(e), up, offset; + if (keyName == 'Up' || keyName == 'Down') { + up = keyName == 'Up' ? true : false; + offset = e.target ? e.target.selectionEnd : 0; + query = vimGlobalState.searchHistoryController.nextMatch(query, up) || ''; + close(query); + if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length); + } else { + if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') + vimGlobalState.searchHistoryController.reset(); + } + var parsedQuery; + try { + parsedQuery = updateSearchQuery(cm, query, + true /** ignoreCase */, true /** smartCase */); + } catch (e) { + // Swallow bad regexes for incremental search. + } + if (parsedQuery) { + cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30); + } else { + clearSearchHighlight(cm); + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + } + } + function onPromptKeyDown(e, query, close) { + var keyName = CodeMirror.keyName(e); + if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' || + (keyName == 'Backspace' && query == '')) { + vimGlobalState.searchHistoryController.pushInput(query); + vimGlobalState.searchHistoryController.reset(); + updateSearchQuery(cm, originalQuery); + clearSearchHighlight(cm); + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + CodeMirror.e_stop(e); + clearInputState(cm); + close(); + cm.focus(); + } else if (keyName == 'Up' || keyName == 'Down') { + CodeMirror.e_stop(e); + } else if (keyName == 'Ctrl-U') { + // Ctrl-U clears input. + CodeMirror.e_stop(e); + close(''); + } + } + switch (command.searchArgs.querySrc) { + case 'prompt': + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isPlaying) { + var query = macroModeState.replaySearchQueries.shift(); + handleQuery(query, true /** ignoreCase */, false /** smartCase */); + } else { + showPrompt(cm, { + onClose: onPromptClose, + prefix: promptPrefix, + desc: '(JavaScript regexp)', + onKeyUp: onPromptKeyUp, + onKeyDown: onPromptKeyDown + }); + } + break; + case 'wordUnderCursor': + var word = expandWordUnderCursor(cm, false /** inclusive */, + true /** forward */, false /** bigWord */, + true /** noSymbol */); + var isKeyword = true; + if (!word) { + word = expandWordUnderCursor(cm, false /** inclusive */, + true /** forward */, false /** bigWord */, + false /** noSymbol */); + isKeyword = false; + } + if (!word) { + return; + } + var query = cm.getLine(word.start.line).substring(word.start.ch, + word.end.ch); + if (isKeyword && wholeWordOnly) { + query = '\\b' + query + '\\b'; + } else { + query = escapeRegex(query); + } + + // cachedCursor is used to save the old position of the cursor + // when * or # causes vim to seek for the nearest word and shift + // the cursor before entering the motion. + vimGlobalState.jumpList.cachedCursor = cm.getCursor(); + cm.setCursor(word.start); + + handleQuery(query, true /** ignoreCase */, false /** smartCase */); + break; + } + }, + processEx: function(cm, vim, command) { + function onPromptClose(input) { + // Give the prompt some time to close so that if processCommand shows + // an error, the elements don't overlap. + vimGlobalState.exCommandHistoryController.pushInput(input); + vimGlobalState.exCommandHistoryController.reset(); + exCommandDispatcher.processCommand(cm, input); + clearInputState(cm); + } + function onPromptKeyDown(e, input, close) { + var keyName = CodeMirror.keyName(e), up, offset; + if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' || + (keyName == 'Backspace' && input == '')) { + vimGlobalState.exCommandHistoryController.pushInput(input); + vimGlobalState.exCommandHistoryController.reset(); + CodeMirror.e_stop(e); + clearInputState(cm); + close(); + cm.focus(); + } + if (keyName == 'Up' || keyName == 'Down') { + CodeMirror.e_stop(e); + up = keyName == 'Up' ? true : false; + offset = e.target ? e.target.selectionEnd : 0; + input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || ''; + close(input); + if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length); + } else if (keyName == 'Ctrl-U') { + // Ctrl-U clears input. + CodeMirror.e_stop(e); + close(''); + } else { + if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') + vimGlobalState.exCommandHistoryController.reset(); + } + } + if (command.type == 'keyToEx') { + // Handle user defined Ex to Ex mappings + exCommandDispatcher.processCommand(cm, command.exArgs.input); + } else { + if (vim.visualMode) { + showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>', + onKeyDown: onPromptKeyDown, selectValueOnOpen: false}); + } else { + showPrompt(cm, { onClose: onPromptClose, prefix: ':', + onKeyDown: onPromptKeyDown}); + } + } + }, + evalInput: function(cm, vim) { + // If the motion command is set, execute both the operator and motion. + // Otherwise return. + var inputState = vim.inputState; + var motion = inputState.motion; + var motionArgs = inputState.motionArgs || {}; + var operator = inputState.operator; + var operatorArgs = inputState.operatorArgs || {}; + var registerName = inputState.registerName; + var sel = vim.sel; + // TODO: Make sure cm and vim selections are identical outside visual mode. + var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head): cm.getCursor('head')); + var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor('anchor')); + var oldHead = copyCursor(origHead); + var oldAnchor = copyCursor(origAnchor); + var newHead, newAnchor; + var repeat; + if (operator) { + this.recordLastEdit(vim, inputState); + } + if (inputState.repeatOverride !== undefined) { + // If repeatOverride is specified, that takes precedence over the + // input state's repeat. Used by Ex mode and can be user defined. + repeat = inputState.repeatOverride; + } else { + repeat = inputState.getRepeat(); + } + if (repeat > 0 && motionArgs.explicitRepeat) { + motionArgs.repeatIsExplicit = true; + } else if (motionArgs.noRepeat || + (!motionArgs.explicitRepeat && repeat === 0)) { + repeat = 1; + motionArgs.repeatIsExplicit = false; + } + if (inputState.selectedCharacter) { + // If there is a character input, stick it in all of the arg arrays. + motionArgs.selectedCharacter = operatorArgs.selectedCharacter = + inputState.selectedCharacter; + } + motionArgs.repeat = repeat; + clearInputState(cm); + if (motion) { + var motionResult = motions[motion](cm, origHead, motionArgs, vim, inputState); + vim.lastMotion = motions[motion]; + if (!motionResult) { + return; + } + if (motionArgs.toJumplist) { + var jumpList = vimGlobalState.jumpList; + // if the current motion is # or *, use cachedCursor + var cachedCursor = jumpList.cachedCursor; + if (cachedCursor) { + recordJumpPosition(cm, cachedCursor, motionResult); + delete jumpList.cachedCursor; + } else { + recordJumpPosition(cm, origHead, motionResult); + } + } + if (motionResult instanceof Array) { + newAnchor = motionResult[0]; + newHead = motionResult[1]; + } else { + newHead = motionResult; + } + // TODO: Handle null returns from motion commands better. + if (!newHead) { + newHead = copyCursor(origHead); + } + if (vim.visualMode) { + if (!(vim.visualBlock && newHead.ch === Infinity)) { + newHead = clipCursorToContent(cm, newHead); + } + if (newAnchor) { + newAnchor = clipCursorToContent(cm, newAnchor); + } + newAnchor = newAnchor || oldAnchor; + sel.anchor = newAnchor; + sel.head = newHead; + updateCmSelection(cm); + updateMark(cm, vim, '<', + cursorIsBefore(newAnchor, newHead) ? newAnchor + : newHead); + updateMark(cm, vim, '>', + cursorIsBefore(newAnchor, newHead) ? newHead + : newAnchor); + } else if (!operator) { + newHead = clipCursorToContent(cm, newHead); + cm.setCursor(newHead.line, newHead.ch); + } + } + if (operator) { + if (operatorArgs.lastSel) { + // Replaying a visual mode operation + newAnchor = oldAnchor; + var lastSel = operatorArgs.lastSel; + var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line); + var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch); + if (lastSel.visualLine) { + // Linewise Visual mode: The same number of lines. + newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch); + } else if (lastSel.visualBlock) { + // Blockwise Visual mode: The same number of lines and columns. + newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset); + } else if (lastSel.head.line == lastSel.anchor.line) { + // Normal Visual mode within one line: The same number of characters. + newHead = new Pos(oldAnchor.line, oldAnchor.ch + chOffset); + } else { + // Normal Visual mode with several lines: The same number of lines, in the + // last line the same number of characters as in the last line the last time. + newHead = new Pos(oldAnchor.line + lineOffset, oldAnchor.ch); + } + vim.visualMode = true; + vim.visualLine = lastSel.visualLine; + vim.visualBlock = lastSel.visualBlock; + sel = vim.sel = { + anchor: newAnchor, + head: newHead + }; + updateCmSelection(cm); + } else if (vim.visualMode) { + operatorArgs.lastSel = { + anchor: copyCursor(sel.anchor), + head: copyCursor(sel.head), + visualBlock: vim.visualBlock, + visualLine: vim.visualLine + }; + } + var curStart, curEnd, linewise, mode; + var cmSel; + if (vim.visualMode) { + // Init visual op + curStart = cursorMin(sel.head, sel.anchor); + curEnd = cursorMax(sel.head, sel.anchor); + linewise = vim.visualLine || operatorArgs.linewise; + mode = vim.visualBlock ? 'block' : + linewise ? 'line' : + 'char'; + cmSel = makeCmSelection(cm, { + anchor: curStart, + head: curEnd + }, mode); + if (linewise) { + var ranges = cmSel.ranges; + if (mode == 'block') { + // Linewise operators in visual block mode extend to end of line + for (var i = 0; i < ranges.length; i++) { + ranges[i].head.ch = lineLength(cm, ranges[i].head.line); + } + } else if (mode == 'line') { + ranges[0].head = new Pos(ranges[0].head.line + 1, 0); + } + } + } else { + // Init motion op + curStart = copyCursor(newAnchor || oldAnchor); + curEnd = copyCursor(newHead || oldHead); + if (cursorIsBefore(curEnd, curStart)) { + var tmp = curStart; + curStart = curEnd; + curEnd = tmp; + } + linewise = motionArgs.linewise || operatorArgs.linewise; + if (linewise) { + // Expand selection to entire line. + expandSelectionToLine(cm, curStart, curEnd); + } else if (motionArgs.forward) { + // Clip to trailing newlines only if the motion goes forward. + clipToLine(cm, curStart, curEnd); + } + mode = 'char'; + var exclusive = !motionArgs.inclusive || linewise; + cmSel = makeCmSelection(cm, { + anchor: curStart, + head: curEnd + }, mode, exclusive); + } + cm.setSelections(cmSel.ranges, cmSel.primary); + vim.lastMotion = null; + operatorArgs.repeat = repeat; // For indent in visual mode. + operatorArgs.registerName = registerName; + // Keep track of linewise as it affects how paste and change behave. + operatorArgs.linewise = linewise; + var operatorMoveTo = operators[operator]( + cm, operatorArgs, cmSel.ranges, oldAnchor, newHead); + if (vim.visualMode) { + exitVisualMode(cm, operatorMoveTo != null); + } + if (operatorMoveTo) { + cm.setCursor(operatorMoveTo); + } + } + }, + recordLastEdit: function(vim, inputState, actionCommand) { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isPlaying) { return; } + vim.lastEditInputState = inputState; + vim.lastEditActionCommand = actionCommand; + macroModeState.lastInsertModeChanges.changes = []; + macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false; + macroModeState.lastInsertModeChanges.visualBlock = vim.visualBlock ? vim.sel.head.line - vim.sel.anchor.line : 0; + } + }; + + /** + * typedef {Object{line:number,ch:number}} Cursor An object containing the + * position of the cursor. + */ + // All of the functions below return Cursor objects. + var motions = { + moveToTopLine: function(cm, _head, motionArgs) { + var line = getUserVisibleLines(cm).top + motionArgs.repeat -1; + return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); + }, + moveToMiddleLine: function(cm) { + var range = getUserVisibleLines(cm); + var line = Math.floor((range.top + range.bottom) * 0.5); + return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); + }, + moveToBottomLine: function(cm, _head, motionArgs) { + var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1; + return new Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line))); + }, + expandToLine: function(_cm, head, motionArgs) { + // Expands forward to end of line, and then to next line if repeat is + // >1. Does not handle backward motion! + var cur = head; + return new Pos(cur.line + motionArgs.repeat - 1, Infinity); + }, + findNext: function(cm, _head, motionArgs) { + var state = getSearchState(cm); + var query = state.getQuery(); + if (!query) { + return; + } + var prev = !motionArgs.forward; + // If search is initiated with ? instead of /, negate direction. + prev = (state.isReversed()) ? !prev : prev; + highlightSearchMatches(cm, query); + return findNext(cm, prev/** prev */, query, motionArgs.repeat); + }, + /** + * Find and select the next occurrence of the search query. If the cursor is currently + * within a match, then find and select the current match. Otherwise, find the next occurrence in the + * appropriate direction. + * + * This differs from `findNext` in the following ways: + * + * 1. Instead of only returning the "from", this returns a "from", "to" range. + * 2. If the cursor is currently inside a search match, this selects the current match + * instead of the next match. + * 3. If there is no associated operator, this will turn on visual mode. + */ + findAndSelectNextInclusive: function(cm, _head, motionArgs, vim, prevInputState) { + var state = getSearchState(cm); + var query = state.getQuery(); + + if (!query) { + return; + } + + var prev = !motionArgs.forward; + prev = (state.isReversed()) ? !prev : prev; + + // next: [from, to] | null + var next = findNextFromAndToInclusive(cm, prev, query, motionArgs.repeat, vim); + + // No matches. + if (!next) { + return; + } + + // If there's an operator that will be executed, return the selection. + if (prevInputState.operator) { + return next; + } + + // At this point, we know that there is no accompanying operator -- let's + // deal with visual mode in order to select an appropriate match. + + var from = next[0]; + // For whatever reason, when we use the "to" as returned by searchcursor.js directly, + // the resulting selection is extended by 1 char. Let's shrink it so that only the + // match is selected. + var to = new Pos(next[1].line, next[1].ch - 1); + + if (vim.visualMode) { + // If we were in visualLine or visualBlock mode, get out of it. + if (vim.visualLine || vim.visualBlock) { + vim.visualLine = false; + vim.visualBlock = false; + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: ""}); + } + + // If we're currently in visual mode, we should extend the selection to include + // the search result. + var anchor = vim.sel.anchor; + if (anchor) { + if (state.isReversed()) { + if (motionArgs.forward) { + return [anchor, from]; + } + + return [anchor, to]; + } else { + if (motionArgs.forward) { + return [anchor, to]; + } + + return [anchor, from]; + } + } + } else { + // Let's turn visual mode on. + vim.visualMode = true; + vim.visualLine = false; + vim.visualBlock = false; + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: ""}); + } + + return prev ? [to, from] : [from, to]; + }, + goToMark: function(cm, _head, motionArgs, vim) { + var pos = getMarkPos(cm, vim, motionArgs.selectedCharacter); + if (pos) { + return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos; + } + return null; + }, + moveToOtherHighlightedEnd: function(cm, _head, motionArgs, vim) { + if (vim.visualBlock && motionArgs.sameLine) { + var sel = vim.sel; + return [ + clipCursorToContent(cm, new Pos(sel.anchor.line, sel.head.ch)), + clipCursorToContent(cm, new Pos(sel.head.line, sel.anchor.ch)) + ]; + } else { + return ([vim.sel.head, vim.sel.anchor]); + } + }, + jumpToMark: function(cm, head, motionArgs, vim) { + var best = head; + for (var i = 0; i < motionArgs.repeat; i++) { + var cursor = best; + for (var key in vim.marks) { + if (!isLowerCase(key)) { + continue; + } + var mark = vim.marks[key].find(); + var isWrongDirection = (motionArgs.forward) ? + cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark); + + if (isWrongDirection) { + continue; + } + if (motionArgs.linewise && (mark.line == cursor.line)) { + continue; + } + + var equal = cursorEqual(cursor, best); + var between = (motionArgs.forward) ? + cursorIsBetween(cursor, mark, best) : + cursorIsBetween(best, mark, cursor); + + if (equal || between) { + best = mark; + } + } + } + + if (motionArgs.linewise) { + // Vim places the cursor on the first non-whitespace character of + // the line if there is one, else it places the cursor at the end + // of the line, regardless of whether a mark was found. + best = new Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line))); + } + return best; + }, + moveByCharacters: function(_cm, head, motionArgs) { + var cur = head; + var repeat = motionArgs.repeat; + var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat; + return new Pos(cur.line, ch); + }, + moveByLines: function(cm, head, motionArgs, vim) { + var cur = head; + var endCh = cur.ch; + // Depending what our last motion was, we may want to do different + // things. If our last motion was moving vertically, we want to + // preserve the HPos from our last horizontal move. If our last motion + // was going to the end of a line, moving vertically we should go to + // the end of the line, etc. + switch (vim.lastMotion) { + case this.moveByLines: + case this.moveByDisplayLines: + case this.moveByScroll: + case this.moveToColumn: + case this.moveToEol: + endCh = vim.lastHPos; + break; + default: + vim.lastHPos = endCh; + } + var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0); + var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; + var first = cm.firstLine(); + var last = cm.lastLine(); + var posV = cm.findPosV(cur, (motionArgs.forward ? repeat : -repeat), 'line', vim.lastHSPos); + var hasMarkedText = motionArgs.forward ? posV.line > line : posV.line < line; + if (hasMarkedText) { + line = posV.line; + endCh = posV.ch; + } + // Vim go to line begin or line end when cursor at first/last line and + // move to previous/next line is triggered. + if (line < first && cur.line == first){ + return this.moveToStartOfLine(cm, head, motionArgs, vim); + } else if (line > last && cur.line == last){ + return moveToEol(cm, head, motionArgs, vim, true); + } + if (motionArgs.toFirstChar){ + endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line)); + vim.lastHPos = endCh; + } + vim.lastHSPos = cm.charCoords(new Pos(line, endCh),'div').left; + return new Pos(line, endCh); + }, + moveByDisplayLines: function(cm, head, motionArgs, vim) { + var cur = head; + switch (vim.lastMotion) { + case this.moveByDisplayLines: + case this.moveByScroll: + case this.moveByLines: + case this.moveToColumn: + case this.moveToEol: + break; + default: + vim.lastHSPos = cm.charCoords(cur,'div').left; + } + var repeat = motionArgs.repeat; + var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos); + if (res.hitSide) { + if (motionArgs.forward) { + var lastCharCoords = cm.charCoords(res, 'div'); + var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos }; + var res = cm.coordsChar(goalCoords, 'div'); + } else { + var resCoords = cm.charCoords(new Pos(cm.firstLine(), 0), 'div'); + resCoords.left = vim.lastHSPos; + res = cm.coordsChar(resCoords, 'div'); + } + } + vim.lastHPos = res.ch; + return res; + }, + moveByPage: function(cm, head, motionArgs) { + // CodeMirror only exposes functions that move the cursor page down, so + // doing this bad hack to move the cursor and move it back. evalInput + // will move the cursor to where it should be in the end. + var curStart = head; + var repeat = motionArgs.repeat; + return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page'); + }, + moveByParagraph: function(cm, head, motionArgs) { + var dir = motionArgs.forward ? 1 : -1; + return findParagraph(cm, head, motionArgs.repeat, dir); + }, + moveBySentence: function(cm, head, motionArgs) { + var dir = motionArgs.forward ? 1 : -1; + return findSentence(cm, head, motionArgs.repeat, dir); + }, + moveByScroll: function(cm, head, motionArgs, vim) { + var scrollbox = cm.getScrollInfo(); + var curEnd = null; + var repeat = motionArgs.repeat; + if (!repeat) { + repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight()); + } + var orig = cm.charCoords(head, 'local'); + motionArgs.repeat = repeat; + curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim); + if (!curEnd) { + return null; + } + var dest = cm.charCoords(curEnd, 'local'); + cm.scrollTo(null, scrollbox.top + dest.top - orig.top); + return curEnd; + }, + moveByWords: function(cm, head, motionArgs) { + return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward, + !!motionArgs.wordEnd, !!motionArgs.bigWord); + }, + moveTillCharacter: function(cm, _head, motionArgs) { + var repeat = motionArgs.repeat; + var curEnd = moveToCharacter(cm, repeat, motionArgs.forward, + motionArgs.selectedCharacter); + var increment = motionArgs.forward ? -1 : 1; + recordLastCharacterSearch(increment, motionArgs); + if (!curEnd) return null; + curEnd.ch += increment; + return curEnd; + }, + moveToCharacter: function(cm, head, motionArgs) { + var repeat = motionArgs.repeat; + recordLastCharacterSearch(0, motionArgs); + return moveToCharacter(cm, repeat, motionArgs.forward, + motionArgs.selectedCharacter) || head; + }, + moveToSymbol: function(cm, head, motionArgs) { + var repeat = motionArgs.repeat; + return findSymbol(cm, repeat, motionArgs.forward, + motionArgs.selectedCharacter) || head; + }, + moveToColumn: function(cm, head, motionArgs, vim) { + var repeat = motionArgs.repeat; + // repeat is equivalent to which column we want to move to! + vim.lastHPos = repeat - 1; + vim.lastHSPos = cm.charCoords(head,'div').left; + return moveToColumn(cm, repeat); + }, + moveToEol: function(cm, head, motionArgs, vim) { + return moveToEol(cm, head, motionArgs, vim, false); + }, + moveToFirstNonWhiteSpaceCharacter: function(cm, head) { + // Go to the start of the line where the text begins, or the end for + // whitespace-only lines + var cursor = head; + return new Pos(cursor.line, + findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line))); + }, + moveToMatchedSymbol: function(cm, head) { + var cursor = head; + var line = cursor.line; + var ch = cursor.ch; + var lineText = cm.getLine(line); + var symbol; + for (; ch < lineText.length; ch++) { + symbol = lineText.charAt(ch); + if (symbol && isMatchableSymbol(symbol)) { + var style = cm.getTokenTypeAt(new Pos(line, ch + 1)); + if (style !== "string" && style !== "comment") { + break; + } + } + } + if (ch < lineText.length) { + // Only include angle brackets in analysis if they are being matched. + var re = (ch === '<' || ch === '>') ? /[(){}[\]<>]/ : /[(){}[\]]/; + var matched = cm.findMatchingBracket(new Pos(line, ch), {bracketRegex: re}); + return matched.to; + } else { + return cursor; + } + }, + moveToStartOfLine: function(_cm, head) { + return new Pos(head.line, 0); + }, + moveToLineOrEdgeOfDocument: function(cm, _head, motionArgs) { + var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine(); + if (motionArgs.repeatIsExplicit) { + lineNum = motionArgs.repeat - cm.getOption('firstLineNumber'); + } + return new Pos(lineNum, + findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum))); + }, + moveToStartOfDisplayLine: function(cm) { + cm.execCommand("goLineLeft"); + return cm.getCursor(); + }, + moveToEndOfDisplayLine: function(cm) { + cm.execCommand("goLineRight"); + var head = cm.getCursor(); + if (head.sticky == "before") head.ch--; + return head; + }, + textObjectManipulation: function(cm, head, motionArgs, vim) { + // TODO: lots of possible exceptions that can be thrown here. Try da( + // outside of a () block. + var mirroredPairs = {'(': ')', ')': '(', + '{': '}', '}': '{', + '[': ']', ']': '[', + '<': '>', '>': '<'}; + var selfPaired = {'\'': true, '"': true, '`': true}; + + var character = motionArgs.selectedCharacter; + // 'b' refers to '()' block. + // 'B' refers to '{}' block. + if (character == 'b') { + character = '('; + } else if (character == 'B') { + character = '{'; + } + + // Inclusive is the difference between a and i + // TODO: Instead of using the additional text object map to perform text + // object operations, merge the map into the defaultKeyMap and use + // motionArgs to define behavior. Define separate entries for 'aw', + // 'iw', 'a[', 'i[', etc. + var inclusive = !motionArgs.textObjectInner; + + var tmp; + if (mirroredPairs[character]) { + tmp = selectCompanionObject(cm, head, character, inclusive); + } else if (selfPaired[character]) { + tmp = findBeginningAndEnd(cm, head, character, inclusive); + } else if (character === 'W') { + tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, + true /** bigWord */); + } else if (character === 'w') { + tmp = expandWordUnderCursor(cm, inclusive, true /** forward */, + false /** bigWord */); + } else if (character === 'p') { + tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive); + motionArgs.linewise = true; + if (vim.visualMode) { + if (!vim.visualLine) { vim.visualLine = true; } + } else { + var operatorArgs = vim.inputState.operatorArgs; + if (operatorArgs) { operatorArgs.linewise = true; } + tmp.end.line--; + } + } else if (character === 't') { + tmp = expandTagUnderCursor(cm, head, inclusive); + } else if (character === 's') { + // account for cursor on end of sentence symbol + var content = cm.getLine(head.line); + if (head.ch > 0 && isEndOfSentenceSymbol(content[head.ch])) { + head.ch -= 1; + } + var end = getSentence(cm, head, motionArgs.repeat, 1, inclusive); + var start = getSentence(cm, head, motionArgs.repeat, -1, inclusive); + // closer vim behaviour, 'a' only takes the space after the sentence if there is one before and after + if (isWhiteSpaceString(cm.getLine(start.line)[start.ch]) + && isWhiteSpaceString(cm.getLine(end.line)[end.ch -1])) { + start = {line: start.line, ch: start.ch + 1}; + } + tmp = {start: start, end: end}; + } else { + // No text object defined for this, don't move. + return null; + } + + if (!cm.state.vim.visualMode) { + return [tmp.start, tmp.end]; + } else { + return expandSelection(cm, tmp.start, tmp.end); + } + }, + + repeatLastCharacterSearch: function(cm, head, motionArgs) { + var lastSearch = vimGlobalState.lastCharacterSearch; + var repeat = motionArgs.repeat; + var forward = motionArgs.forward === lastSearch.forward; + var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); + cm.moveH(-increment, 'char'); + motionArgs.inclusive = forward ? true : false; + var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter); + if (!curEnd) { + cm.moveH(increment, 'char'); + return head; + } + curEnd.ch += increment; + return curEnd; + } + }; + + function defineMotion(name, fn) { + motions[name] = fn; + } + + function fillArray(val, times) { + var arr = []; + for (var i = 0; i < times; i++) { + arr.push(val); + } + return arr; + } + /** + * An operator acts on a text selection. It receives the list of selections + * as input. The corresponding CodeMirror selection is guaranteed to + * match the input selection. + */ + var operators = { + change: function(cm, args, ranges) { + var finalHead, text; + var vim = cm.state.vim; + var anchor = ranges[0].anchor, + head = ranges[0].head; + if (!vim.visualMode) { + text = cm.getRange(anchor, head); + var lastState = vim.lastEditInputState || {}; + if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) { + // Exclude trailing whitespace if the range is not all whitespace. + var match = (/\s+$/).exec(text); + if (match && lastState.motionArgs && lastState.motionArgs.forward) { + head = offsetCursor(head, 0, - match[0].length); + text = text.slice(0, - match[0].length); + } + } + var prevLineEnd = new Pos(anchor.line - 1, Number.MAX_VALUE); + var wasLastLine = cm.firstLine() == cm.lastLine(); + if (head.line > cm.lastLine() && args.linewise && !wasLastLine) { + cm.replaceRange('', prevLineEnd, head); + } else { + cm.replaceRange('', anchor, head); + } + if (args.linewise) { + // Push the next line back down, if there is a next line. + if (!wasLastLine) { + cm.setCursor(prevLineEnd); + CodeMirror.commands.newlineAndIndent(cm); + } + // make sure cursor ends up at the end of the line. + anchor.ch = Number.MAX_VALUE; + } + finalHead = anchor; + } else if (args.fullLine) { + head.ch = Number.MAX_VALUE; + head.line--; + cm.setSelection(anchor, head); + text = cm.getSelection(); + cm.replaceSelection(""); + finalHead = anchor; + } else { + text = cm.getSelection(); + var replacement = fillArray('', ranges.length); + cm.replaceSelections(replacement); + finalHead = cursorMin(ranges[0].head, ranges[0].anchor); + } + vimGlobalState.registerController.pushText( + args.registerName, 'change', text, + args.linewise, ranges.length > 1); + actions.enterInsertMode(cm, {head: finalHead}, cm.state.vim); + }, + // delete is a javascript keyword. + 'delete': function(cm, args, ranges) { + var finalHead, text; + var vim = cm.state.vim; + if (!vim.visualBlock) { + var anchor = ranges[0].anchor, + head = ranges[0].head; + if (args.linewise && + head.line != cm.firstLine() && + anchor.line == cm.lastLine() && + anchor.line == head.line - 1) { + // Special case for dd on last line (and first line). + if (anchor.line == cm.firstLine()) { + anchor.ch = 0; + } else { + anchor = new Pos(anchor.line - 1, lineLength(cm, anchor.line - 1)); + } + } + text = cm.getRange(anchor, head); + cm.replaceRange('', anchor, head); + finalHead = anchor; + if (args.linewise) { + finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor); + } + } else { + text = cm.getSelection(); + var replacement = fillArray('', ranges.length); + cm.replaceSelections(replacement); + finalHead = cursorMin(ranges[0].head, ranges[0].anchor); + } + vimGlobalState.registerController.pushText( + args.registerName, 'delete', text, + args.linewise, vim.visualBlock); + return clipCursorToContent(cm, finalHead); + }, + indent: function(cm, args, ranges) { + var vim = cm.state.vim; + if (cm.indentMore) { + var repeat = (vim.visualMode) ? args.repeat : 1; + for (var j = 0; j < repeat; j++) { + if (args.indentRight) cm.indentMore(); + else cm.indentLess(); + } + } else { + var startLine = ranges[0].anchor.line; + var endLine = vim.visualBlock ? + ranges[ranges.length - 1].anchor.line : + ranges[0].head.line; + // In visual mode, n> shifts the selection right n times, instead of + // shifting n lines right once. + var repeat = (vim.visualMode) ? args.repeat : 1; + if (args.linewise) { + // The only way to delete a newline is to delete until the start of + // the next line, so in linewise mode evalInput will include the next + // line. We don't want this in indent, so we go back a line. + endLine--; + } + for (var i = startLine; i <= endLine; i++) { + for (var j = 0; j < repeat; j++) { + cm.indentLine(i, args.indentRight); + } + } + } + return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); + }, + indentAuto: function(cm, _args, ranges) { + cm.execCommand("indentAuto"); + return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); + }, + changeCase: function(cm, args, ranges, oldAnchor, newHead) { + var selections = cm.getSelections(); + var swapped = []; + var toLower = args.toLower; + for (var j = 0; j < selections.length; j++) { + var toSwap = selections[j]; + var text = ''; + if (toLower === true) { + text = toSwap.toLowerCase(); + } else if (toLower === false) { + text = toSwap.toUpperCase(); + } else { + for (var i = 0; i < toSwap.length; i++) { + var character = toSwap.charAt(i); + text += isUpperCase(character) ? character.toLowerCase() : + character.toUpperCase(); + } + } + swapped.push(text); + } + cm.replaceSelections(swapped); + if (args.shouldMoveCursor){ + return newHead; + } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) { + return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor); + } else if (args.linewise){ + return oldAnchor; + } else { + return cursorMin(ranges[0].anchor, ranges[0].head); + } + }, + yank: function(cm, args, ranges, oldAnchor) { + var vim = cm.state.vim; + var text = cm.getSelection(); + var endPos = vim.visualMode + ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor) + : oldAnchor; + vimGlobalState.registerController.pushText( + args.registerName, 'yank', + text, args.linewise, vim.visualBlock); + return endPos; + } + }; + + function defineOperator(name, fn) { + operators[name] = fn; + } + + var actions = { + jumpListWalk: function(cm, actionArgs, vim) { + if (vim.visualMode) { + return; + } + var repeat = actionArgs.repeat; + var forward = actionArgs.forward; + var jumpList = vimGlobalState.jumpList; + + var mark = jumpList.move(cm, forward ? repeat : -repeat); + var markPos = mark ? mark.find() : undefined; + markPos = markPos ? markPos : cm.getCursor(); + cm.setCursor(markPos); + }, + scroll: function(cm, actionArgs, vim) { + if (vim.visualMode) { + return; + } + var repeat = actionArgs.repeat || 1; + var lineHeight = cm.defaultTextHeight(); + var top = cm.getScrollInfo().top; + var delta = lineHeight * repeat; + var newPos = actionArgs.forward ? top + delta : top - delta; + var cursor = copyCursor(cm.getCursor()); + var cursorCoords = cm.charCoords(cursor, 'local'); + if (actionArgs.forward) { + if (newPos > cursorCoords.top) { + cursor.line += (newPos - cursorCoords.top) / lineHeight; + cursor.line = Math.ceil(cursor.line); + cm.setCursor(cursor); + cursorCoords = cm.charCoords(cursor, 'local'); + cm.scrollTo(null, cursorCoords.top); + } else { + // Cursor stays within bounds. Just reposition the scroll window. + cm.scrollTo(null, newPos); + } + } else { + var newBottom = newPos + cm.getScrollInfo().clientHeight; + if (newBottom < cursorCoords.bottom) { + cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight; + cursor.line = Math.floor(cursor.line); + cm.setCursor(cursor); + cursorCoords = cm.charCoords(cursor, 'local'); + cm.scrollTo( + null, cursorCoords.bottom - cm.getScrollInfo().clientHeight); + } else { + // Cursor stays within bounds. Just reposition the scroll window. + cm.scrollTo(null, newPos); + } + } + }, + scrollToCursor: function(cm, actionArgs) { + var lineNum = cm.getCursor().line; + var charCoords = cm.charCoords(new Pos(lineNum, 0), 'local'); + var height = cm.getScrollInfo().clientHeight; + var y = charCoords.top; + switch (actionArgs.position) { + case 'center': y = charCoords.bottom - height / 2; + break; + case 'bottom': + var lineLastCharPos = new Pos(lineNum, cm.getLine(lineNum).length - 1); + var lineLastCharCoords = cm.charCoords(lineLastCharPos, 'local'); + var lineHeight = lineLastCharCoords.bottom - y; + y = y - height + lineHeight; + break; + } + cm.scrollTo(null, y); + }, + replayMacro: function(cm, actionArgs, vim) { + var registerName = actionArgs.selectedCharacter; + var repeat = actionArgs.repeat; + var macroModeState = vimGlobalState.macroModeState; + if (registerName == '@') { + registerName = macroModeState.latestRegister; + } else { + macroModeState.latestRegister = registerName; + } + while(repeat--){ + executeMacroRegister(cm, vim, macroModeState, registerName); + } + }, + enterMacroRecordMode: function(cm, actionArgs) { + var macroModeState = vimGlobalState.macroModeState; + var registerName = actionArgs.selectedCharacter; + if (vimGlobalState.registerController.isValidRegister(registerName)) { + macroModeState.enterMacroRecordMode(cm, registerName); + } + }, + toggleOverwrite: function(cm) { + if (!cm.state.overwrite) { + cm.toggleOverwrite(true); + cm.setOption('keyMap', 'vim-replace'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); + } else { + cm.toggleOverwrite(false); + cm.setOption('keyMap', 'vim-insert'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); + } + }, + enterInsertMode: function(cm, actionArgs, vim) { + if (cm.getOption('readOnly')) { return; } + vim.insertMode = true; + vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1; + var insertAt = (actionArgs) ? actionArgs.insertAt : null; + var sel = vim.sel; + var head = actionArgs.head || cm.getCursor('head'); + var height = cm.listSelections().length; + if (insertAt == 'eol') { + head = new Pos(head.line, lineLength(cm, head.line)); + } else if (insertAt == 'bol') { + head = new Pos(head.line, 0); + } else if (insertAt == 'charAfter') { + head = offsetCursor(head, 0, 1); + } else if (insertAt == 'firstNonBlank') { + head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head); + } else if (insertAt == 'startOfSelectedArea') { + if (!vim.visualMode) + return; + if (!vim.visualBlock) { + if (sel.head.line < sel.anchor.line) { + head = sel.head; + } else { + head = new Pos(sel.anchor.line, 0); + } + } else { + head = new Pos( + Math.min(sel.head.line, sel.anchor.line), + Math.min(sel.head.ch, sel.anchor.ch)); + height = Math.abs(sel.head.line - sel.anchor.line) + 1; + } + } else if (insertAt == 'endOfSelectedArea') { + if (!vim.visualMode) + return; + if (!vim.visualBlock) { + if (sel.head.line >= sel.anchor.line) { + head = offsetCursor(sel.head, 0, 1); + } else { + head = new Pos(sel.anchor.line, 0); + } + } else { + head = new Pos( + Math.min(sel.head.line, sel.anchor.line), + Math.max(sel.head.ch, sel.anchor.ch) + 1); + height = Math.abs(sel.head.line - sel.anchor.line) + 1; + } + } else if (insertAt == 'inplace') { + if (vim.visualMode){ + return; + } + } else if (insertAt == 'lastEdit') { + head = getLastEditPos(cm) || head; + } + cm.setOption('disableInput', false); + if (actionArgs && actionArgs.replace) { + // Handle Replace-mode as a special case of insert mode. + cm.toggleOverwrite(true); + cm.setOption('keyMap', 'vim-replace'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); + } else { + cm.toggleOverwrite(false); + cm.setOption('keyMap', 'vim-insert'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); + } + if (!vimGlobalState.macroModeState.isPlaying) { + // Only record if not replaying. + cm.on('change', onChange); + CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); + } + if (vim.visualMode) { + exitVisualMode(cm); + } + selectForInsert(cm, head, height); + }, + toggleVisualMode: function(cm, actionArgs, vim) { + var repeat = actionArgs.repeat; + var anchor = cm.getCursor(); + var head; + // TODO: The repeat should actually select number of characters/lines + // equal to the repeat times the size of the previous visual + // operation. + if (!vim.visualMode) { + // Entering visual mode + vim.visualMode = true; + vim.visualLine = !!actionArgs.linewise; + vim.visualBlock = !!actionArgs.blockwise; + head = clipCursorToContent( + cm, new Pos(anchor.line, anchor.ch + repeat - 1)); + vim.sel = { + anchor: anchor, + head: head + }; + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""}); + updateCmSelection(cm); + updateMark(cm, vim, '<', cursorMin(anchor, head)); + updateMark(cm, vim, '>', cursorMax(anchor, head)); + } else if (vim.visualLine ^ actionArgs.linewise || + vim.visualBlock ^ actionArgs.blockwise) { + // Toggling between modes + vim.visualLine = !!actionArgs.linewise; + vim.visualBlock = !!actionArgs.blockwise; + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""}); + updateCmSelection(cm); + } else { + exitVisualMode(cm); + } + }, + reselectLastSelection: function(cm, _actionArgs, vim) { + var lastSelection = vim.lastSelection; + if (vim.visualMode) { + updateLastSelection(cm, vim); + } + if (lastSelection) { + var anchor = lastSelection.anchorMark.find(); + var head = lastSelection.headMark.find(); + if (!anchor || !head) { + // If the marks have been destroyed due to edits, do nothing. + return; + } + vim.sel = { + anchor: anchor, + head: head + }; + vim.visualMode = true; + vim.visualLine = lastSelection.visualLine; + vim.visualBlock = lastSelection.visualBlock; + updateCmSelection(cm); + updateMark(cm, vim, '<', cursorMin(anchor, head)); + updateMark(cm, vim, '>', cursorMax(anchor, head)); + CodeMirror.signal(cm, 'vim-mode-change', { + mode: 'visual', + subMode: vim.visualLine ? 'linewise' : + vim.visualBlock ? 'blockwise' : ''}); + } + }, + joinLines: function(cm, actionArgs, vim) { + var curStart, curEnd; + if (vim.visualMode) { + curStart = cm.getCursor('anchor'); + curEnd = cm.getCursor('head'); + if (cursorIsBefore(curEnd, curStart)) { + var tmp = curEnd; + curEnd = curStart; + curStart = tmp; + } + curEnd.ch = lineLength(cm, curEnd.line) - 1; + } else { + // Repeat is the number of lines to join. Minimum 2 lines. + var repeat = Math.max(actionArgs.repeat, 2); + curStart = cm.getCursor(); + curEnd = clipCursorToContent(cm, new Pos(curStart.line + repeat - 1, + Infinity)); + } + var finalCh = 0; + for (var i = curStart.line; i < curEnd.line; i++) { + finalCh = lineLength(cm, curStart.line); + var tmp = new Pos(curStart.line + 1, + lineLength(cm, curStart.line + 1)); + var text = cm.getRange(curStart, tmp); + text = actionArgs.keepSpaces + ? text.replace(/\n\r?/g, '') + : text.replace(/\n\s*/g, ' '); + cm.replaceRange(text, curStart, tmp); + } + var curFinalPos = new Pos(curStart.line, finalCh); + if (vim.visualMode) { + exitVisualMode(cm, false); + } + cm.setCursor(curFinalPos); + }, + newLineAndEnterInsertMode: function(cm, actionArgs, vim) { + vim.insertMode = true; + var insertAt = copyCursor(cm.getCursor()); + if (insertAt.line === cm.firstLine() && !actionArgs.after) { + // Special case for inserting newline before start of document. + cm.replaceRange('\n', new Pos(cm.firstLine(), 0)); + cm.setCursor(cm.firstLine(), 0); + } else { + insertAt.line = (actionArgs.after) ? insertAt.line : + insertAt.line - 1; + insertAt.ch = lineLength(cm, insertAt.line); + cm.setCursor(insertAt); + var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment || + CodeMirror.commands.newlineAndIndent; + newlineFn(cm); + } + this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim); + }, + paste: function(cm, actionArgs, vim) { + var cur = copyCursor(cm.getCursor()); + var register = vimGlobalState.registerController.getRegister( + actionArgs.registerName); + var text = register.toString(); + if (!text) { + return; + } + if (actionArgs.matchIndent) { + var tabSize = cm.getOption("tabSize"); + // length that considers tabs and tabSize + var whitespaceLength = function(str) { + var tabs = (str.split("\t").length - 1); + var spaces = (str.split(" ").length - 1); + return tabs * tabSize + spaces * 1; + }; + var currentLine = cm.getLine(cm.getCursor().line); + var indent = whitespaceLength(currentLine.match(/^\s*/)[0]); + // chomp last newline b/c don't want it to match /^\s*/gm + var chompedText = text.replace(/\n$/, ''); + var wasChomped = text !== chompedText; + var firstIndent = whitespaceLength(text.match(/^\s*/)[0]); + var text = chompedText.replace(/^\s*/gm, function(wspace) { + var newIndent = indent + (whitespaceLength(wspace) - firstIndent); + if (newIndent < 0) { + return ""; + } + else if (cm.getOption("indentWithTabs")) { + var quotient = Math.floor(newIndent / tabSize); + return Array(quotient + 1).join('\t'); + } + else { + return Array(newIndent + 1).join(' '); + } + }); + text += wasChomped ? "\n" : ""; + } + if (actionArgs.repeat > 1) { + var text = Array(actionArgs.repeat + 1).join(text); + } + var linewise = register.linewise; + var blockwise = register.blockwise; + if (blockwise) { + text = text.split('\n'); + if (linewise) { + text.pop(); + } + for (var i = 0; i < text.length; i++) { + text[i] = (text[i] == '') ? ' ' : text[i]; + } + cur.ch += actionArgs.after ? 1 : 0; + cur.ch = Math.min(lineLength(cm, cur.line), cur.ch); + } else if (linewise) { + if(vim.visualMode) { + text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n'; + } else if (actionArgs.after) { + // Move the newline at the end to the start instead, and paste just + // before the newline character of the line we are on right now. + text = '\n' + text.slice(0, text.length - 1); + cur.ch = lineLength(cm, cur.line); + } else { + cur.ch = 0; + } + } else { + cur.ch += actionArgs.after ? 1 : 0; + } + var curPosFinal; + var idx; + if (vim.visualMode) { + // save the pasted text for reselection if the need arises + vim.lastPastedText = text; + var lastSelectionCurEnd; + var selectedArea = getSelectedAreaRange(cm, vim); + var selectionStart = selectedArea[0]; + var selectionEnd = selectedArea[1]; + var selectedText = cm.getSelection(); + var selections = cm.listSelections(); + var emptyStrings = new Array(selections.length).join('1').split('1'); + // save the curEnd marker before it get cleared due to cm.replaceRange. + if (vim.lastSelection) { + lastSelectionCurEnd = vim.lastSelection.headMark.find(); + } + // push the previously selected text to unnamed register + vimGlobalState.registerController.unnamedRegister.setText(selectedText); + if (blockwise) { + // first delete the selected text + cm.replaceSelections(emptyStrings); + // Set new selections as per the block length of the yanked text + selectionEnd = new Pos(selectionStart.line + text.length-1, selectionStart.ch); + cm.setCursor(selectionStart); + selectBlock(cm, selectionEnd); + cm.replaceSelections(text); + curPosFinal = selectionStart; + } else if (vim.visualBlock) { + cm.replaceSelections(emptyStrings); + cm.setCursor(selectionStart); + cm.replaceRange(text, selectionStart, selectionStart); + curPosFinal = selectionStart; + } else { + cm.replaceRange(text, selectionStart, selectionEnd); + curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1); + } + // restore the the curEnd marker + if(lastSelectionCurEnd) { + vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd); + } + if (linewise) { + curPosFinal.ch=0; + } + } else { + if (blockwise) { + cm.setCursor(cur); + for (var i = 0; i < text.length; i++) { + var line = cur.line+i; + if (line > cm.lastLine()) { + cm.replaceRange('\n', new Pos(line, 0)); + } + var lastCh = lineLength(cm, line); + if (lastCh < cur.ch) { + extendLineToColumn(cm, line, cur.ch); + } + } + cm.setCursor(cur); + selectBlock(cm, new Pos(cur.line + text.length-1, cur.ch)); + cm.replaceSelections(text); + curPosFinal = cur; + } else { + cm.replaceRange(text, cur); + // Now fine tune the cursor to where we want it. + if (linewise && actionArgs.after) { + curPosFinal = new Pos( + cur.line + 1, + findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1))); + } else if (linewise && !actionArgs.after) { + curPosFinal = new Pos( + cur.line, + findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line))); + } else if (!linewise && actionArgs.after) { + idx = cm.indexFromPos(cur); + curPosFinal = cm.posFromIndex(idx + text.length - 1); + } else { + idx = cm.indexFromPos(cur); + curPosFinal = cm.posFromIndex(idx + text.length); + } + } + } + if (vim.visualMode) { + exitVisualMode(cm, false); + } + cm.setCursor(curPosFinal); + }, + undo: function(cm, actionArgs) { + cm.operation(function() { + repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)(); + cm.setCursor(cm.getCursor('anchor')); + }); + }, + redo: function(cm, actionArgs) { + repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)(); + }, + setRegister: function(_cm, actionArgs, vim) { + vim.inputState.registerName = actionArgs.selectedCharacter; + }, + setMark: function(cm, actionArgs, vim) { + var markName = actionArgs.selectedCharacter; + updateMark(cm, vim, markName, cm.getCursor()); + }, + replace: function(cm, actionArgs, vim) { + var replaceWith = actionArgs.selectedCharacter; + var curStart = cm.getCursor(); + var replaceTo; + var curEnd; + var selections = cm.listSelections(); + if (vim.visualMode) { + curStart = cm.getCursor('start'); + curEnd = cm.getCursor('end'); + } else { + var line = cm.getLine(curStart.line); + replaceTo = curStart.ch + actionArgs.repeat; + if (replaceTo > line.length) { + replaceTo=line.length; + } + curEnd = new Pos(curStart.line, replaceTo); + } + if (replaceWith=='\n') { + if (!vim.visualMode) cm.replaceRange('', curStart, curEnd); + // special case, where vim help says to replace by just one line-break + (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm); + } else { + var replaceWithStr = cm.getRange(curStart, curEnd); + //replace all characters in range by selected, but keep linebreaks + replaceWithStr = replaceWithStr.replace(/[^\n]/g, replaceWith); + if (vim.visualBlock) { + // Tabs are split in visua block before replacing + var spaces = new Array(cm.getOption("tabSize")+1).join(' '); + replaceWithStr = cm.getSelection(); + replaceWithStr = replaceWithStr.replace(/\t/g, spaces).replace(/[^\n]/g, replaceWith).split('\n'); + cm.replaceSelections(replaceWithStr); + } else { + cm.replaceRange(replaceWithStr, curStart, curEnd); + } + if (vim.visualMode) { + curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ? + selections[0].anchor : selections[0].head; + cm.setCursor(curStart); + exitVisualMode(cm, false); + } else { + cm.setCursor(offsetCursor(curEnd, 0, -1)); + } + } + }, + incrementNumberToken: function(cm, actionArgs) { + var cur = cm.getCursor(); + var lineStr = cm.getLine(cur.line); + var re = /(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi; + var match; + var start; + var end; + var numberStr; + while ((match = re.exec(lineStr)) !== null) { + start = match.index; + end = start + match[0].length; + if (cur.ch < end)break; + } + if (!actionArgs.backtrack && (end <= cur.ch))return; + if (match) { + var baseStr = match[2] || match[4]; + var digits = match[3] || match[5]; + var increment = actionArgs.increase ? 1 : -1; + var base = {'0b': 2, '0': 8, '': 10, '0x': 16}[baseStr.toLowerCase()]; + var number = parseInt(match[1] + digits, base) + (increment * actionArgs.repeat); + numberStr = number.toString(base); + var zeroPadding = baseStr ? new Array(digits.length - numberStr.length + 1 + match[1].length).join('0') : ''; + if (numberStr.charAt(0) === '-') { + numberStr = '-' + baseStr + zeroPadding + numberStr.substr(1); + } else { + numberStr = baseStr + zeroPadding + numberStr; + } + var from = new Pos(cur.line, start); + var to = new Pos(cur.line, end); + cm.replaceRange(numberStr, from, to); + } else { + return; + } + cm.setCursor(new Pos(cur.line, start + numberStr.length - 1)); + }, + repeatLastEdit: function(cm, actionArgs, vim) { + var lastEditInputState = vim.lastEditInputState; + if (!lastEditInputState) { return; } + var repeat = actionArgs.repeat; + if (repeat && actionArgs.repeatIsExplicit) { + vim.lastEditInputState.repeatOverride = repeat; + } else { + repeat = vim.lastEditInputState.repeatOverride || repeat; + } + repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */); + }, + indent: function(cm, actionArgs) { + cm.indentLine(cm.getCursor().line, actionArgs.indentRight); + }, + exitInsertMode: exitInsertMode + }; + + function defineAction(name, fn) { + actions[name] = fn; + } + + /* + * Below are miscellaneous utility functions used by vim.js + */ + + /** + * Clips cursor to ensure that line is within the buffer's range + * If includeLineBreak is true, then allow cur.ch == lineLength. + */ + function clipCursorToContent(cm, cur) { + var vim = cm.state.vim; + var includeLineBreak = vim.insertMode || vim.visualMode; + var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() ); + var maxCh = lineLength(cm, line) - 1 + !!includeLineBreak; + var ch = Math.min(Math.max(0, cur.ch), maxCh); + return new Pos(line, ch); + } + function copyArgs(args) { + var ret = {}; + for (var prop in args) { + if (args.hasOwnProperty(prop)) { + ret[prop] = args[prop]; + } + } + return ret; + } + function offsetCursor(cur, offsetLine, offsetCh) { + if (typeof offsetLine === 'object') { + offsetCh = offsetLine.ch; + offsetLine = offsetLine.line; + } + return new Pos(cur.line + offsetLine, cur.ch + offsetCh); + } + function commandMatches(keys, keyMap, context, inputState) { + // Partial matches are not applied. They inform the key handler + // that the current key sequence is a subsequence of a valid key + // sequence, so that the key buffer is not cleared. + var match, partial = [], full = []; + for (var i = 0; i < keyMap.length; i++) { + var command = keyMap[i]; + if (context == 'insert' && command.context != 'insert' || + command.context && command.context != context || + inputState.operator && command.type == 'action' || + !(match = commandMatch(keys, command.keys))) { continue; } + if (match == 'partial') { partial.push(command); } + if (match == 'full') { full.push(command); } + } + return { + partial: partial.length && partial, + full: full.length && full + }; + } + function commandMatch(pressed, mapped) { + if (mapped.slice(-11) == '') { + // Last character matches anything. + var prefixLen = mapped.length - 11; + var pressedPrefix = pressed.slice(0, prefixLen); + var mappedPrefix = mapped.slice(0, prefixLen); + return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' : + mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false; + } else { + return pressed == mapped ? 'full' : + mapped.indexOf(pressed) == 0 ? 'partial' : false; + } + } + function lastChar(keys) { + var match = /^.*(<[^>]+>)$/.exec(keys); + var selectedCharacter = match ? match[1] : keys.slice(-1); + if (selectedCharacter.length > 1){ + switch(selectedCharacter){ + case '': + selectedCharacter='\n'; + break; + case '': + selectedCharacter=' '; + break; + default: + selectedCharacter=''; + break; + } + } + return selectedCharacter; + } + function repeatFn(cm, fn, repeat) { + return function() { + for (var i = 0; i < repeat; i++) { + fn(cm); + } + }; + } + function copyCursor(cur) { + return new Pos(cur.line, cur.ch); + } + function cursorEqual(cur1, cur2) { + return cur1.ch == cur2.ch && cur1.line == cur2.line; + } + function cursorIsBefore(cur1, cur2) { + if (cur1.line < cur2.line) { + return true; + } + if (cur1.line == cur2.line && cur1.ch < cur2.ch) { + return true; + } + return false; + } + function cursorMin(cur1, cur2) { + if (arguments.length > 2) { + cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1)); + } + return cursorIsBefore(cur1, cur2) ? cur1 : cur2; + } + function cursorMax(cur1, cur2) { + if (arguments.length > 2) { + cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1)); + } + return cursorIsBefore(cur1, cur2) ? cur2 : cur1; + } + function cursorIsBetween(cur1, cur2, cur3) { + // returns true if cur2 is between cur1 and cur3. + var cur1before2 = cursorIsBefore(cur1, cur2); + var cur2before3 = cursorIsBefore(cur2, cur3); + return cur1before2 && cur2before3; + } + function lineLength(cm, lineNum) { + return cm.getLine(lineNum).length; + } + function trim(s) { + if (s.trim) { + return s.trim(); + } + return s.replace(/^\s+|\s+$/g, ''); + } + function escapeRegex(s) { + return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1'); + } + function extendLineToColumn(cm, lineNum, column) { + var endCh = lineLength(cm, lineNum); + var spaces = new Array(column-endCh+1).join(' '); + cm.setCursor(new Pos(lineNum, endCh)); + cm.replaceRange(spaces, cm.getCursor()); + } + // This functions selects a rectangular block + // of text with selectionEnd as any of its corner + // Height of block: + // Difference in selectionEnd.line and first/last selection.line + // Width of the block: + // Distance between selectionEnd.ch and any(first considered here) selection.ch + function selectBlock(cm, selectionEnd) { + var selections = [], ranges = cm.listSelections(); + var head = copyCursor(cm.clipPos(selectionEnd)); + var isClipped = !cursorEqual(selectionEnd, head); + var curHead = cm.getCursor('head'); + var primIndex = getIndex(ranges, curHead); + var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor); + var max = ranges.length - 1; + var index = max - primIndex > primIndex ? max : 0; + var base = ranges[index].anchor; + + var firstLine = Math.min(base.line, head.line); + var lastLine = Math.max(base.line, head.line); + var baseCh = base.ch, headCh = head.ch; + + var dir = ranges[index].head.ch - baseCh; + var newDir = headCh - baseCh; + if (dir > 0 && newDir <= 0) { + baseCh++; + if (!isClipped) { headCh--; } + } else if (dir < 0 && newDir >= 0) { + baseCh--; + if (!wasClipped) { headCh++; } + } else if (dir < 0 && newDir == -1) { + baseCh--; + headCh++; + } + for (var line = firstLine; line <= lastLine; line++) { + var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)}; + selections.push(range); + } + cm.setSelections(selections); + selectionEnd.ch = headCh; + base.ch = baseCh; + return base; + } + function selectForInsert(cm, head, height) { + var sel = []; + for (var i = 0; i < height; i++) { + var lineHead = offsetCursor(head, i, 0); + sel.push({anchor: lineHead, head: lineHead}); + } + cm.setSelections(sel, 0); + } + // getIndex returns the index of the cursor in the selections. + function getIndex(ranges, cursor, end) { + for (var i = 0; i < ranges.length; i++) { + var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor); + var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor); + if (atAnchor || atHead) { + return i; + } + } + return -1; + } + function getSelectedAreaRange(cm, vim) { + var lastSelection = vim.lastSelection; + var getCurrentSelectedAreaRange = function() { + var selections = cm.listSelections(); + var start = selections[0]; + var end = selections[selections.length-1]; + var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head; + var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor; + return [selectionStart, selectionEnd]; + }; + var getLastSelectedAreaRange = function() { + var selectionStart = cm.getCursor(); + var selectionEnd = cm.getCursor(); + var block = lastSelection.visualBlock; + if (block) { + var width = block.width; + var height = block.height; + selectionEnd = new Pos(selectionStart.line + height, selectionStart.ch + width); + var selections = []; + // selectBlock creates a 'proper' rectangular block. + // We do not want that in all cases, so we manually set selections. + for (var i = selectionStart.line; i < selectionEnd.line; i++) { + var anchor = new Pos(i, selectionStart.ch); + var head = new Pos(i, selectionEnd.ch); + var range = {anchor: anchor, head: head}; + selections.push(range); + } + cm.setSelections(selections); + } else { + var start = lastSelection.anchorMark.find(); + var end = lastSelection.headMark.find(); + var line = end.line - start.line; + var ch = end.ch - start.ch; + selectionEnd = {line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch}; + if (lastSelection.visualLine) { + selectionStart = new Pos(selectionStart.line, 0); + selectionEnd = new Pos(selectionEnd.line, lineLength(cm, selectionEnd.line)); + } + cm.setSelection(selectionStart, selectionEnd); + } + return [selectionStart, selectionEnd]; + }; + if (!vim.visualMode) { + // In case of replaying the action. + return getLastSelectedAreaRange(); + } else { + return getCurrentSelectedAreaRange(); + } + } + // Updates the previous selection with the current selection's values. This + // should only be called in visual mode. + function updateLastSelection(cm, vim) { + var anchor = vim.sel.anchor; + var head = vim.sel.head; + // To accommodate the effect of lastPastedText in the last selection + if (vim.lastPastedText) { + head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length); + vim.lastPastedText = null; + } + vim.lastSelection = {'anchorMark': cm.setBookmark(anchor), + 'headMark': cm.setBookmark(head), + 'anchor': copyCursor(anchor), + 'head': copyCursor(head), + 'visualMode': vim.visualMode, + 'visualLine': vim.visualLine, + 'visualBlock': vim.visualBlock}; + } + function expandSelection(cm, start, end) { + var sel = cm.state.vim.sel; + var head = sel.head; + var anchor = sel.anchor; + var tmp; + if (cursorIsBefore(end, start)) { + tmp = end; + end = start; + start = tmp; + } + if (cursorIsBefore(head, anchor)) { + head = cursorMin(start, head); + anchor = cursorMax(anchor, end); + } else { + anchor = cursorMin(start, anchor); + head = cursorMax(head, end); + head = offsetCursor(head, 0, -1); + if (head.ch == -1 && head.line != cm.firstLine()) { + head = new Pos(head.line - 1, lineLength(cm, head.line - 1)); + } + } + return [anchor, head]; + } + /** + * Updates the CodeMirror selection to match the provided vim selection. + * If no arguments are given, it uses the current vim selection state. + */ + function updateCmSelection(cm, sel, mode) { + var vim = cm.state.vim; + sel = sel || vim.sel; + var mode = mode || + vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char'; + var cmSel = makeCmSelection(cm, sel, mode); + cm.setSelections(cmSel.ranges, cmSel.primary); + } + function makeCmSelection(cm, sel, mode, exclusive) { + var head = copyCursor(sel.head); + var anchor = copyCursor(sel.anchor); + if (mode == 'char') { + var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; + var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0; + head = offsetCursor(sel.head, 0, headOffset); + anchor = offsetCursor(sel.anchor, 0, anchorOffset); + return { + ranges: [{anchor: anchor, head: head}], + primary: 0 + }; + } else if (mode == 'line') { + if (!cursorIsBefore(sel.head, sel.anchor)) { + anchor.ch = 0; + + var lastLine = cm.lastLine(); + if (head.line > lastLine) { + head.line = lastLine; + } + head.ch = lineLength(cm, head.line); + } else { + head.ch = 0; + anchor.ch = lineLength(cm, anchor.line); + } + return { + ranges: [{anchor: anchor, head: head}], + primary: 0 + }; + } else if (mode == 'block') { + var top = Math.min(anchor.line, head.line), + fromCh = anchor.ch, + bottom = Math.max(anchor.line, head.line), + toCh = head.ch; + if (fromCh < toCh) { toCh += 1; } + else { fromCh += 1; } var height = bottom - top + 1; + var primary = head.line == top ? 0 : height - 1; + var ranges = []; + for (var i = 0; i < height; i++) { + ranges.push({ + anchor: new Pos(top + i, fromCh), + head: new Pos(top + i, toCh) + }); + } + return { + ranges: ranges, + primary: primary + }; + } + } + function getHead(cm) { + var cur = cm.getCursor('head'); + if (cm.getSelection().length == 1) { + // Small corner case when only 1 character is selected. The "real" + // head is the left of head and anchor. + cur = cursorMin(cur, cm.getCursor('anchor')); + } + return cur; + } + + /** + * If moveHead is set to false, the CodeMirror selection will not be + * touched. The caller assumes the responsibility of putting the cursor + * in the right place. + */ + function exitVisualMode(cm, moveHead) { + var vim = cm.state.vim; + if (moveHead !== false) { + cm.setCursor(clipCursorToContent(cm, vim.sel.head)); + } + updateLastSelection(cm, vim); + vim.visualMode = false; + vim.visualLine = false; + vim.visualBlock = false; + if (!vim.insertMode) CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); + } + + // Remove any trailing newlines from the selection. For + // example, with the caret at the start of the last word on the line, + // 'dw' should word, but not the newline, while 'w' should advance the + // caret to the first character of the next line. + function clipToLine(cm, curStart, curEnd) { + var selection = cm.getRange(curStart, curEnd); + // Only clip if the selection ends with trailing newline + whitespace + if (/\n\s*$/.test(selection)) { + var lines = selection.split('\n'); + // We know this is all whitespace. + lines.pop(); + + // Cases: + // 1. Last word is an empty line - do not clip the trailing '\n' + // 2. Last word is not an empty line - clip the trailing '\n' + var line; + // Find the line containing the last word, and clip all whitespace up + // to it. + for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) { + curEnd.line--; + curEnd.ch = 0; + } + // If the last word is not an empty line, clip an additional newline + if (line) { + curEnd.line--; + curEnd.ch = lineLength(cm, curEnd.line); + } else { + curEnd.ch = 0; + } + } + } + + // Expand the selection to line ends. + function expandSelectionToLine(_cm, curStart, curEnd) { + curStart.ch = 0; + curEnd.ch = 0; + curEnd.line++; + } + + function findFirstNonWhiteSpaceCharacter(text) { + if (!text) { + return 0; + } + var firstNonWS = text.search(/\S/); + return firstNonWS == -1 ? text.length : firstNonWS; + } + + function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) { + var cur = getHead(cm); + var line = cm.getLine(cur.line); + var idx = cur.ch; + + // Seek to first word or non-whitespace character, depending on if + // noSymbol is true. + var test = noSymbol ? wordCharTest[0] : bigWordCharTest [0]; + while (!test(line.charAt(idx))) { + idx++; + if (idx >= line.length) { return null; } + } + + if (bigWord) { + test = bigWordCharTest[0]; + } else { + test = wordCharTest[0]; + if (!test(line.charAt(idx))) { + test = wordCharTest[1]; + } + } + + var end = idx, start = idx; + while (test(line.charAt(end)) && end < line.length) { end++; } + while (test(line.charAt(start)) && start >= 0) { start--; } + start++; + + if (inclusive) { + // If present, include all whitespace after word. + // Otherwise, include all whitespace before word, except indentation. + var wordEnd = end; + while (/\s/.test(line.charAt(end)) && end < line.length) { end++; } + if (wordEnd == end) { + var wordStart = start; + while (/\s/.test(line.charAt(start - 1)) && start > 0) { start--; } + if (!start) { start = wordStart; } + } + } + return { start: new Pos(cur.line, start), end: new Pos(cur.line, end) }; + } + + /** + * Depends on the following: + * + * - editor mode should be htmlmixedmode / xml + * - mode/xml/xml.js should be loaded + * - addon/fold/xml-fold.js should be loaded + * + * If any of the above requirements are not true, this function noops. + * + * This is _NOT_ a 100% accurate implementation of vim tag text objects. + * The following caveats apply (based off cursory testing, I'm sure there + * are other discrepancies): + * + * - Does not work inside comments: + * ``` + * + * ``` + * - Does not work when tags have different cases: + * ``` + *
broken
+ * ``` + * - Does not work when cursor is inside a broken tag: + * ``` + *
+ * ``` + */ + function expandTagUnderCursor(cm, head, inclusive) { + var cur = head; + if (!CodeMirror.findMatchingTag || !CodeMirror.findEnclosingTag) { + return { start: cur, end: cur }; + } + + var tags = CodeMirror.findMatchingTag(cm, head) || CodeMirror.findEnclosingTag(cm, head); + if (!tags || !tags.open || !tags.close) { + return { start: cur, end: cur }; + } + + if (inclusive) { + return { start: tags.open.from, end: tags.close.to }; + } + return { start: tags.open.to, end: tags.close.from }; + } + + function recordJumpPosition(cm, oldCur, newCur) { + if (!cursorEqual(oldCur, newCur)) { + vimGlobalState.jumpList.add(cm, oldCur, newCur); + } + } + + function recordLastCharacterSearch(increment, args) { + vimGlobalState.lastCharacterSearch.increment = increment; + vimGlobalState.lastCharacterSearch.forward = args.forward; + vimGlobalState.lastCharacterSearch.selectedCharacter = args.selectedCharacter; + } + + var symbolToMode = { + '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket', + '[': 'section', ']': 'section', + '*': 'comment', '/': 'comment', + 'm': 'method', 'M': 'method', + '#': 'preprocess' + }; + var findSymbolModes = { + bracket: { + isComplete: function(state) { + if (state.nextCh === state.symb) { + state.depth++; + if (state.depth >= 1)return true; + } else if (state.nextCh === state.reverseSymb) { + state.depth--; + } + return false; + } + }, + section: { + init: function(state) { + state.curMoveThrough = true; + state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}'; + }, + isComplete: function(state) { + return state.index === 0 && state.nextCh === state.symb; + } + }, + comment: { + isComplete: function(state) { + var found = state.lastCh === '*' && state.nextCh === '/'; + state.lastCh = state.nextCh; + return found; + } + }, + // TODO: The original Vim implementation only operates on level 1 and 2. + // The current implementation doesn't check for code block level and + // therefore it operates on any levels. + method: { + init: function(state) { + state.symb = (state.symb === 'm' ? '{' : '}'); + state.reverseSymb = state.symb === '{' ? '}' : '{'; + }, + isComplete: function(state) { + if (state.nextCh === state.symb)return true; + return false; + } + }, + preprocess: { + init: function(state) { + state.index = 0; + }, + isComplete: function(state) { + if (state.nextCh === '#') { + var token = state.lineText.match(/^#(\w+)/)[1]; + if (token === 'endif') { + if (state.forward && state.depth === 0) { + return true; + } + state.depth++; + } else if (token === 'if') { + if (!state.forward && state.depth === 0) { + return true; + } + state.depth--; + } + if (token === 'else' && state.depth === 0)return true; + } + return false; + } + } + }; + function findSymbol(cm, repeat, forward, symb) { + var cur = copyCursor(cm.getCursor()); + var increment = forward ? 1 : -1; + var endLine = forward ? cm.lineCount() : -1; + var curCh = cur.ch; + var line = cur.line; + var lineText = cm.getLine(line); + var state = { + lineText: lineText, + nextCh: lineText.charAt(curCh), + lastCh: null, + index: curCh, + symb: symb, + reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb], + forward: forward, + depth: 0, + curMoveThrough: false + }; + var mode = symbolToMode[symb]; + if (!mode)return cur; + var init = findSymbolModes[mode].init; + var isComplete = findSymbolModes[mode].isComplete; + if (init) { init(state); } + while (line !== endLine && repeat) { + state.index += increment; + state.nextCh = state.lineText.charAt(state.index); + if (!state.nextCh) { + line += increment; + state.lineText = cm.getLine(line) || ''; + if (increment > 0) { + state.index = 0; + } else { + var lineLen = state.lineText.length; + state.index = (lineLen > 0) ? (lineLen-1) : 0; + } + state.nextCh = state.lineText.charAt(state.index); + } + if (isComplete(state)) { + cur.line = line; + cur.ch = state.index; + repeat--; + } + } + if (state.nextCh || state.curMoveThrough) { + return new Pos(line, state.index); + } + return cur; + } + + /* + * Returns the boundaries of the next word. If the cursor in the middle of + * the word, then returns the boundaries of the current word, starting at + * the cursor. If the cursor is at the start/end of a word, and we are going + * forward/backward, respectively, find the boundaries of the next word. + * + * @param {CodeMirror} cm CodeMirror object. + * @param {Cursor} cur The cursor position. + * @param {boolean} forward True to search forward. False to search + * backward. + * @param {boolean} bigWord True if punctuation count as part of the word. + * False if only [a-zA-Z0-9] characters count as part of the word. + * @param {boolean} emptyLineIsWord True if empty lines should be treated + * as words. + * @return {Object{from:number, to:number, line: number}} The boundaries of + * the word, or null if there are no more words. + */ + function findWord(cm, cur, forward, bigWord, emptyLineIsWord) { + var lineNum = cur.line; + var pos = cur.ch; + var line = cm.getLine(lineNum); + var dir = forward ? 1 : -1; + var charTests = bigWord ? bigWordCharTest: wordCharTest; + + if (emptyLineIsWord && line == '') { + lineNum += dir; + line = cm.getLine(lineNum); + if (!isLine(cm, lineNum)) { + return null; + } + pos = (forward) ? 0 : line.length; + } + + while (true) { + if (emptyLineIsWord && line == '') { + return { from: 0, to: 0, line: lineNum }; + } + var stop = (dir > 0) ? line.length : -1; + var wordStart = stop, wordEnd = stop; + // Find bounds of next word. + while (pos != stop) { + var foundWord = false; + for (var i = 0; i < charTests.length && !foundWord; ++i) { + if (charTests[i](line.charAt(pos))) { + wordStart = pos; + // Advance to end of word. + while (pos != stop && charTests[i](line.charAt(pos))) { + pos += dir; + } + wordEnd = pos; + foundWord = wordStart != wordEnd; + if (wordStart == cur.ch && lineNum == cur.line && + wordEnd == wordStart + dir) { + // We started at the end of a word. Find the next one. + continue; + } else { + return { + from: Math.min(wordStart, wordEnd + 1), + to: Math.max(wordStart, wordEnd), + line: lineNum }; + } + } + } + if (!foundWord) { + pos += dir; + } + } + // Advance to next/prev line. + lineNum += dir; + if (!isLine(cm, lineNum)) { + return null; + } + line = cm.getLine(lineNum); + pos = (dir > 0) ? 0 : line.length; + } + } + + /** + * @param {CodeMirror} cm CodeMirror object. + * @param {Pos} cur The position to start from. + * @param {int} repeat Number of words to move past. + * @param {boolean} forward True to search forward. False to search + * backward. + * @param {boolean} wordEnd True to move to end of word. False to move to + * beginning of word. + * @param {boolean} bigWord True if punctuation count as part of the word. + * False if only alphabet characters count as part of the word. + * @return {Cursor} The position the cursor should move to. + */ + function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) { + var curStart = copyCursor(cur); + var words = []; + if (forward && !wordEnd || !forward && wordEnd) { + repeat++; + } + // For 'e', empty lines are not considered words, go figure. + var emptyLineIsWord = !(forward && wordEnd); + for (var i = 0; i < repeat; i++) { + var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord); + if (!word) { + var eodCh = lineLength(cm, cm.lastLine()); + words.push(forward + ? {line: cm.lastLine(), from: eodCh, to: eodCh} + : {line: 0, from: 0, to: 0}); + break; + } + words.push(word); + cur = new Pos(word.line, forward ? (word.to - 1) : word.from); + } + var shortCircuit = words.length != repeat; + var firstWord = words[0]; + var lastWord = words.pop(); + if (forward && !wordEnd) { + // w + if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) { + // We did not start in the middle of a word. Discard the extra word at the end. + lastWord = words.pop(); + } + return new Pos(lastWord.line, lastWord.from); + } else if (forward && wordEnd) { + return new Pos(lastWord.line, lastWord.to - 1); + } else if (!forward && wordEnd) { + // ge + if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) { + // We did not start in the middle of a word. Discard the extra word at the end. + lastWord = words.pop(); + } + return new Pos(lastWord.line, lastWord.to); + } else { + // b + return new Pos(lastWord.line, lastWord.from); + } + } + + function moveToEol(cm, head, motionArgs, vim, keepHPos) { + var cur = head; + var retval= new Pos(cur.line + motionArgs.repeat - 1, Infinity); + var end=cm.clipPos(retval); + end.ch--; + if (!keepHPos) { + vim.lastHPos = Infinity; + vim.lastHSPos = cm.charCoords(end,'div').left; + } + return retval; + } + + function moveToCharacter(cm, repeat, forward, character) { + var cur = cm.getCursor(); + var start = cur.ch; + var idx; + for (var i = 0; i < repeat; i ++) { + var line = cm.getLine(cur.line); + idx = charIdxInLine(start, line, character, forward, true); + if (idx == -1) { + return null; + } + start = idx; + } + return new Pos(cm.getCursor().line, idx); + } + + function moveToColumn(cm, repeat) { + // repeat is always >= 1, so repeat - 1 always corresponds + // to the column we want to go to. + var line = cm.getCursor().line; + return clipCursorToContent(cm, new Pos(line, repeat - 1)); + } + + function updateMark(cm, vim, markName, pos) { + if (!inArray(markName, validMarks)) { + return; + } + if (vim.marks[markName]) { + vim.marks[markName].clear(); + } + vim.marks[markName] = cm.setBookmark(pos); + } + + function charIdxInLine(start, line, character, forward, includeChar) { + // Search for char in line. + // motion_options: {forward, includeChar} + // If includeChar = true, include it too. + // If forward = true, search forward, else search backwards. + // If char is not found on this line, do nothing + var idx; + if (forward) { + idx = line.indexOf(character, start + 1); + if (idx != -1 && !includeChar) { + idx -= 1; + } + } else { + idx = line.lastIndexOf(character, start - 1); + if (idx != -1 && !includeChar) { + idx += 1; + } + } + return idx; + } + + function findParagraph(cm, head, repeat, dir, inclusive) { + var line = head.line; + var min = cm.firstLine(); + var max = cm.lastLine(); + var start, end, i = line; + function isEmpty(i) { return !cm.getLine(i); } + function isBoundary(i, dir, any) { + if (any) { return isEmpty(i) != isEmpty(i + dir); } + return !isEmpty(i) && isEmpty(i + dir); + } + if (dir) { + while (min <= i && i <= max && repeat > 0) { + if (isBoundary(i, dir)) { repeat--; } + i += dir; + } + return new Pos(i, 0); + } + + var vim = cm.state.vim; + if (vim.visualLine && isBoundary(line, 1, true)) { + var anchor = vim.sel.anchor; + if (isBoundary(anchor.line, -1, true)) { + if (!inclusive || anchor.line != line) { + line += 1; + } + } + } + var startState = isEmpty(line); + for (i = line; i <= max && repeat; i++) { + if (isBoundary(i, 1, true)) { + if (!inclusive || isEmpty(i) != startState) { + repeat--; + } + } + } + end = new Pos(i, 0); + // select boundary before paragraph for the last one + if (i > max && !startState) { startState = true; } + else { inclusive = false; } + for (i = line; i > min; i--) { + if (!inclusive || isEmpty(i) == startState || i == line) { + if (isBoundary(i, -1, true)) { break; } + } + } + start = new Pos(i, 0); + return { start: start, end: end }; + } + function getSentence(cm, cur, repeat, dir, inclusive /*includes whitespace*/) { + /* + Takes an index object + { + line: the line string, + ln: line number, + pos: index in line, + dir: direction of traversal (-1 or 1) + } + and modifies the pos member to represent the + next valid position or sets the line to null if there are + no more valid positions. + */ + function nextChar(curr) { + if (curr.pos + curr.dir < 0 || curr.pos + curr.dir >= curr.line.length) { + curr.line = null; + } + else { + curr.pos += curr.dir; + } + } + /* + Performs one iteration of traversal in forward direction + Returns an index object of the new location + */ + function forward(cm, ln, pos, dir) { + var line = cm.getLine(ln); + + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + + if (curr.line === "") { + return { ln: curr.ln, pos: curr.pos }; + } + + var lastSentencePos = curr.pos; + + // Move one step to skip character we start on + nextChar(curr); + + while (curr.line !== null) { + lastSentencePos = curr.pos; + if (isEndOfSentenceSymbol(curr.line[curr.pos])) { + if (!inclusive) { + return { ln: curr.ln, pos: curr.pos + 1 }; + } else { + nextChar(curr); + while (curr.line !== null ) { + if (isWhiteSpaceString(curr.line[curr.pos])) { + lastSentencePos = curr.pos; + nextChar(curr); + } else { + break; + } + } + return { ln: curr.ln, pos: lastSentencePos + 1, }; + } + } + nextChar(curr); + } + return { ln: curr.ln, pos: lastSentencePos + 1 }; + } + + /* + Performs one iteration of traversal in reverse direction + Returns an index object of the new location + */ + function reverse(cm, ln, pos, dir) { + var line = cm.getLine(ln); + + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + + if (curr.line === "") { + return { ln: curr.ln, pos: curr.pos }; + } + + var lastSentencePos = curr.pos; + + // Move one step to skip character we start on + nextChar(curr); + + while (curr.line !== null) { + if (!isWhiteSpaceString(curr.line[curr.pos]) && !isEndOfSentenceSymbol(curr.line[curr.pos])) { + lastSentencePos = curr.pos; + } + + else if (isEndOfSentenceSymbol(curr.line[curr.pos]) ) { + if (!inclusive) { + return { ln: curr.ln, pos: lastSentencePos }; + } else { + if (isWhiteSpaceString(curr.line[curr.pos + 1])) { + return { ln: curr.ln, pos: curr.pos + 1, }; + } else { + return {ln: curr.ln, pos: lastSentencePos}; + } + } + } + + nextChar(curr); + } + curr.line = line; + if (inclusive && isWhiteSpaceString(curr.line[curr.pos])) { + return { ln: curr.ln, pos: curr.pos }; + } else { + return { ln: curr.ln, pos: lastSentencePos }; + } + + } + + var curr_index = { + ln: cur.line, + pos: cur.ch, + }; + + while (repeat > 0) { + if (dir < 0) { + curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir); + } + else { + curr_index = forward(cm, curr_index.ln, curr_index.pos, dir); + } + repeat--; + } + + return new Pos(curr_index.ln, curr_index.pos); + } + + function findSentence(cm, cur, repeat, dir) { + + /* + Takes an index object + { + line: the line string, + ln: line number, + pos: index in line, + dir: direction of traversal (-1 or 1) + } + and modifies the line, ln, and pos members to represent the + next valid position or sets them to null if there are + no more valid positions. + */ + function nextChar(cm, idx) { + if (idx.pos + idx.dir < 0 || idx.pos + idx.dir >= idx.line.length) { + idx.ln += idx.dir; + if (!isLine(cm, idx.ln)) { + idx.line = null; + idx.ln = null; + idx.pos = null; + return; + } + idx.line = cm.getLine(idx.ln); + idx.pos = (idx.dir > 0) ? 0 : idx.line.length - 1; + } + else { + idx.pos += idx.dir; + } + } + + /* + Performs one iteration of traversal in forward direction + Returns an index object of the new location + */ + function forward(cm, ln, pos, dir) { + var line = cm.getLine(ln); + var stop = (line === ""); + + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + + var last_valid = { + ln: curr.ln, + pos: curr.pos, + }; + + var skip_empty_lines = (curr.line === ""); + + // Move one step to skip character we start on + nextChar(cm, curr); + + while (curr.line !== null) { + last_valid.ln = curr.ln; + last_valid.pos = curr.pos; + + if (curr.line === "" && !skip_empty_lines) { + return { ln: curr.ln, pos: curr.pos, }; + } + else if (stop && curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) { + return { ln: curr.ln, pos: curr.pos, }; + } + else if (isEndOfSentenceSymbol(curr.line[curr.pos]) + && !stop + && (curr.pos === curr.line.length - 1 + || isWhiteSpaceString(curr.line[curr.pos + 1]))) { + stop = true; + } + + nextChar(cm, curr); + } + + /* + Set the position to the last non whitespace character on the last + valid line in the case that we reach the end of the document. + */ + var line = cm.getLine(last_valid.ln); + last_valid.pos = 0; + for(var i = line.length - 1; i >= 0; --i) { + if (!isWhiteSpaceString(line[i])) { + last_valid.pos = i; + break; + } + } + + return last_valid; + + } + + /* + Performs one iteration of traversal in reverse direction + Returns an index object of the new location + */ + function reverse(cm, ln, pos, dir) { + var line = cm.getLine(ln); + + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + }; + + var last_valid = { + ln: curr.ln, + pos: null, + }; + + var skip_empty_lines = (curr.line === ""); + + // Move one step to skip character we start on + nextChar(cm, curr); + + while (curr.line !== null) { + + if (curr.line === "" && !skip_empty_lines) { + if (last_valid.pos !== null) { + return last_valid; + } + else { + return { ln: curr.ln, pos: curr.pos }; + } + } + else if (isEndOfSentenceSymbol(curr.line[curr.pos]) + && last_valid.pos !== null + && !(curr.ln === last_valid.ln && curr.pos + 1 === last_valid.pos)) { + return last_valid; + } + else if (curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) { + skip_empty_lines = false; + last_valid = { ln: curr.ln, pos: curr.pos }; + } + + nextChar(cm, curr); + } + + /* + Set the position to the first non whitespace character on the last + valid line in the case that we reach the beginning of the document. + */ + var line = cm.getLine(last_valid.ln); + last_valid.pos = 0; + for(var i = 0; i < line.length; ++i) { + if (!isWhiteSpaceString(line[i])) { + last_valid.pos = i; + break; + } + } + return last_valid; + } + + var curr_index = { + ln: cur.line, + pos: cur.ch, + }; + + while (repeat > 0) { + if (dir < 0) { + curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir); + } + else { + curr_index = forward(cm, curr_index.ln, curr_index.pos, dir); + } + repeat--; + } + + return new Pos(curr_index.ln, curr_index.pos); + } + + // TODO: perhaps this finagling of start and end positions belongs + // in codemirror/replaceRange? + function selectCompanionObject(cm, head, symb, inclusive) { + var cur = head, start, end; + + var bracketRegexp = ({ + '(': /[()]/, ')': /[()]/, + '[': /[[\]]/, ']': /[[\]]/, + '{': /[{}]/, '}': /[{}]/, + '<': /[<>]/, '>': /[<>]/})[symb]; + var openSym = ({ + '(': '(', ')': '(', + '[': '[', ']': '[', + '{': '{', '}': '{', + '<': '<', '>': '<'})[symb]; + var curChar = cm.getLine(cur.line).charAt(cur.ch); + // Due to the behavior of scanForBracket, we need to add an offset if the + // cursor is on a matching open bracket. + var offset = curChar === openSym ? 1 : 0; + + start = cm.scanForBracket(new Pos(cur.line, cur.ch + offset), -1, undefined, {'bracketRegex': bracketRegexp}); + end = cm.scanForBracket(new Pos(cur.line, cur.ch + offset), 1, undefined, {'bracketRegex': bracketRegexp}); + + if (!start || !end) { + return { start: cur, end: cur }; + } + + start = start.pos; + end = end.pos; + + if ((start.line == end.line && start.ch > end.ch) + || (start.line > end.line)) { + var tmp = start; + start = end; + end = tmp; + } + + if (inclusive) { + end.ch += 1; + } else { + start.ch += 1; + } + + return { start: start, end: end }; + } + + // Takes in a symbol and a cursor and tries to simulate text objects that + // have identical opening and closing symbols + // TODO support across multiple lines + function findBeginningAndEnd(cm, head, symb, inclusive) { + var cur = copyCursor(head); + var line = cm.getLine(cur.line); + var chars = line.split(''); + var start, end, i, len; + var firstIndex = chars.indexOf(symb); + + // the decision tree is to always look backwards for the beginning first, + // but if the cursor is in front of the first instance of the symb, + // then move the cursor forward + if (cur.ch < firstIndex) { + cur.ch = firstIndex; + // Why is this line even here??? + // cm.setCursor(cur.line, firstIndex+1); + } + // otherwise if the cursor is currently on the closing symbol + else if (firstIndex < cur.ch && chars[cur.ch] == symb) { + end = cur.ch; // assign end to the current cursor + --cur.ch; // make sure to look backwards + } + + // if we're currently on the symbol, we've got a start + if (chars[cur.ch] == symb && !end) { + start = cur.ch + 1; // assign start to ahead of the cursor + } else { + // go backwards to find the start + for (i = cur.ch; i > -1 && !start; i--) { + if (chars[i] == symb) { + start = i + 1; + } + } + } + + // look forwards for the end symbol + if (start && !end) { + for (i = start, len = chars.length; i < len && !end; i++) { + if (chars[i] == symb) { + end = i; + } + } + } + + // nothing found + if (!start || !end) { + return { start: cur, end: cur }; + } + + // include the symbols + if (inclusive) { + --start; ++end; + } + + return { + start: new Pos(cur.line, start), + end: new Pos(cur.line, end) + }; + } + + // Search functions + defineOption('pcre', true, 'boolean'); + function SearchState() {} + SearchState.prototype = { + getQuery: function() { + return vimGlobalState.query; + }, + setQuery: function(query) { + vimGlobalState.query = query; + }, + getOverlay: function() { + return this.searchOverlay; + }, + setOverlay: function(overlay) { + this.searchOverlay = overlay; + }, + isReversed: function() { + return vimGlobalState.isReversed; + }, + setReversed: function(reversed) { + vimGlobalState.isReversed = reversed; + }, + getScrollbarAnnotate: function() { + return this.annotate; + }, + setScrollbarAnnotate: function(annotate) { + this.annotate = annotate; + } + }; + function getSearchState(cm) { + var vim = cm.state.vim; + return vim.searchState_ || (vim.searchState_ = new SearchState()); + } + function splitBySlash(argString) { + return splitBySeparator(argString, '/'); + } + + function findUnescapedSlashes(argString) { + return findUnescapedSeparators(argString, '/'); + } + + function splitBySeparator(argString, separator) { + var slashes = findUnescapedSeparators(argString, separator) || []; + if (!slashes.length) return []; + var tokens = []; + // in case of strings like foo/bar + if (slashes[0] !== 0) return; + for (var i = 0; i < slashes.length; i++) { + if (typeof slashes[i] == 'number') + tokens.push(argString.substring(slashes[i] + 1, slashes[i+1])); + } + return tokens; + } + + function findUnescapedSeparators(str, separator) { + if (!separator) + separator = '/'; + + var escapeNextChar = false; + var slashes = []; + for (var i = 0; i < str.length; i++) { + var c = str.charAt(i); + if (!escapeNextChar && c == separator) { + slashes.push(i); + } + escapeNextChar = !escapeNextChar && (c == '\\'); + } + return slashes; + } + + // Translates a search string from ex (vim) syntax into javascript form. + function translateRegex(str) { + // When these match, add a '\' if unescaped or remove one if escaped. + var specials = '|(){'; + // Remove, but never add, a '\' for these. + var unescape = '}'; + var escapeNextChar = false; + var out = []; + for (var i = -1; i < str.length; i++) { + var c = str.charAt(i) || ''; + var n = str.charAt(i+1) || ''; + var specialComesNext = (n && specials.indexOf(n) != -1); + if (escapeNextChar) { + if (c !== '\\' || !specialComesNext) { + out.push(c); + } + escapeNextChar = false; + } else { + if (c === '\\') { + escapeNextChar = true; + // Treat the unescape list as special for removing, but not adding '\'. + if (n && unescape.indexOf(n) != -1) { + specialComesNext = true; + } + // Not passing this test means removing a '\'. + if (!specialComesNext || n === '\\') { + out.push(c); + } + } else { + out.push(c); + if (specialComesNext && n !== '\\') { + out.push('\\'); + } + } + } + } + return out.join(''); + } + + // Translates the replace part of a search and replace from ex (vim) syntax into + // javascript form. Similar to translateRegex, but additionally fixes back references + // (translates '\[0..9]' to '$[0..9]') and follows different rules for escaping '$'. + var charUnescapes = {'\\n': '\n', '\\r': '\r', '\\t': '\t'}; + function translateRegexReplace(str) { + var escapeNextChar = false; + var out = []; + for (var i = -1; i < str.length; i++) { + var c = str.charAt(i) || ''; + var n = str.charAt(i+1) || ''; + if (charUnescapes[c + n]) { + out.push(charUnescapes[c+n]); + i++; + } else if (escapeNextChar) { + // At any point in the loop, escapeNextChar is true if the previous + // character was a '\' and was not escaped. + out.push(c); + escapeNextChar = false; + } else { + if (c === '\\') { + escapeNextChar = true; + if ((isNumber(n) || n === '$')) { + out.push('$'); + } else if (n !== '/' && n !== '\\') { + out.push('\\'); + } + } else { + if (c === '$') { + out.push('$'); + } + out.push(c); + if (n === '/') { + out.push('\\'); + } + } + } + } + return out.join(''); + } + + // Unescape \ and / in the replace part, for PCRE mode. + var unescapes = {'\\/': '/', '\\\\': '\\', '\\n': '\n', '\\r': '\r', '\\t': '\t', '\\&':'&'}; + function unescapeRegexReplace(str) { + var stream = new CodeMirror.StringStream(str); + var output = []; + while (!stream.eol()) { + // Search for \. + while (stream.peek() && stream.peek() != '\\') { + output.push(stream.next()); + } + var matched = false; + for (var matcher in unescapes) { + if (stream.match(matcher, true)) { + matched = true; + output.push(unescapes[matcher]); + break; + } + } + if (!matched) { + // Don't change anything + output.push(stream.next()); + } + } + return output.join(''); + } + + /** + * Extract the regular expression from the query and return a Regexp object. + * Returns null if the query is blank. + * If ignoreCase is passed in, the Regexp object will have the 'i' flag set. + * If smartCase is passed in, and the query contains upper case letters, + * then ignoreCase is overridden, and the 'i' flag will not be set. + * If the query contains the /i in the flag part of the regular expression, + * then both ignoreCase and smartCase are ignored, and 'i' will be passed + * through to the Regex object. + */ + function parseQuery(query, ignoreCase, smartCase) { + // First update the last search register + var lastSearchRegister = vimGlobalState.registerController.getRegister('/'); + lastSearchRegister.setText(query); + // Check if the query is already a regex. + if (query instanceof RegExp) { return query; } + // First try to extract regex + flags from the input. If no flags found, + // extract just the regex. IE does not accept flags directly defined in + // the regex string in the form /regex/flags + var slashes = findUnescapedSlashes(query); + var regexPart; + var forceIgnoreCase; + if (!slashes.length) { + // Query looks like 'regexp' + regexPart = query; + } else { + // Query looks like 'regexp/...' + regexPart = query.substring(0, slashes[0]); + var flagsPart = query.substring(slashes[0]); + forceIgnoreCase = (flagsPart.indexOf('i') != -1); + } + if (!regexPart) { + return null; + } + if (!getOption('pcre')) { + regexPart = translateRegex(regexPart); + } + if (smartCase) { + ignoreCase = (/^[^A-Z]*$/).test(regexPart); + } + var regexp = new RegExp(regexPart, + (ignoreCase || forceIgnoreCase) ? 'im' : 'm'); + return regexp; + } + + /** + * dom - Document Object Manipulator + * Usage: + * dom(''|[, ...{|<$styles>}||'']) + * Examples: + * dom('div', {id:'xyz'}, dom('p', 'CM rocks!', {$color:'red'})) + * dom(document.head, dom('script', 'alert("hello!")')) + * Not supported: + * dom('p', ['arrays are objects'], Error('objects specify attributes')) + */ + function dom(n) { + if (typeof n === 'string') n = document.createElement(n); + for (var a, i = 1; i < arguments.length; i++) { + if (!(a = arguments[i])) continue; + if (typeof a !== 'object') a = document.createTextNode(a); + if (a.nodeType) n.appendChild(a); + else for (var key in a) { + if (!Object.prototype.hasOwnProperty.call(a, key)) continue; + if (key[0] === '$') n.style[key.slice(1)] = a[key]; + else n.setAttribute(key, a[key]); + } + } + return n; + } + + function showConfirm(cm, template) { + var pre = dom('div', {$color: 'red', $whiteSpace: 'pre', class: 'cm-vim-message'}, template); + if (cm.openNotification) { + cm.openNotification(pre, {bottom: true, duration: 5000}); + } else { + alert(pre.innerText); + } + } + + function makePrompt(prefix, desc) { + return dom(document.createDocumentFragment(), + dom('span', {$fontFamily: 'monospace', $whiteSpace: 'pre'}, + prefix, + dom('input', {type: 'text', autocorrect: 'off', + autocapitalize: 'off', spellcheck: 'false'})), + desc && dom('span', {$color: '#888'}, desc)); + } + + function showPrompt(cm, options) { + var template = makePrompt(options.prefix, options.desc); + if (cm.openDialog) { + cm.openDialog(template, options.onClose, { + onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp, + bottom: true, selectValueOnOpen: false, value: options.value + }); + } + else { + var shortText = ''; + if (typeof options.prefix != "string" && options.prefix) shortText += options.prefix.textContent; + if (options.desc) shortText += " " + options.desc; + options.onClose(prompt(shortText, '')); + } + } + + function regexEqual(r1, r2) { + if (r1 instanceof RegExp && r2 instanceof RegExp) { + var props = ['global', 'multiline', 'ignoreCase', 'source']; + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + if (r1[prop] !== r2[prop]) { + return false; + } + } + return true; + } + return false; + } + // Returns true if the query is valid. + function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) { + if (!rawQuery) { + return; + } + var state = getSearchState(cm); + var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase); + if (!query) { + return; + } + highlightSearchMatches(cm, query); + if (regexEqual(query, state.getQuery())) { + return query; + } + state.setQuery(query); + return query; + } + function searchOverlay(query) { + if (query.source.charAt(0) == '^') { + var matchSol = true; + } + return { + token: function(stream) { + if (matchSol && !stream.sol()) { + stream.skipToEnd(); + return; + } + var match = stream.match(query, false); + if (match) { + if (match[0].length == 0) { + // Matched empty string, skip to next. + stream.next(); + return 'searching'; + } + if (!stream.sol()) { + // Backtrack 1 to match \b + stream.backUp(1); + if (!query.exec(stream.next() + match[0])) { + stream.next(); + return null; + } + } + stream.match(query); + return 'searching'; + } + while (!stream.eol()) { + stream.next(); + if (stream.match(query, false)) break; + } + }, + query: query + }; + } + var highlightTimeout = 0; + function highlightSearchMatches(cm, query) { + clearTimeout(highlightTimeout); + highlightTimeout = setTimeout(function() { + if (!cm.state.vim) return; + var searchState = getSearchState(cm); + var overlay = searchState.getOverlay(); + if (!overlay || query != overlay.query) { + if (overlay) { + cm.removeOverlay(overlay); + } + overlay = searchOverlay(query); + cm.addOverlay(overlay); + if (cm.showMatchesOnScrollbar) { + if (searchState.getScrollbarAnnotate()) { + searchState.getScrollbarAnnotate().clear(); + } + searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query)); + } + searchState.setOverlay(overlay); + } + }, 50); + } + function findNext(cm, prev, query, repeat) { + if (repeat === undefined) { repeat = 1; } + return cm.operation(function() { + var pos = cm.getCursor(); + var cursor = cm.getSearchCursor(query, pos); + for (var i = 0; i < repeat; i++) { + var found = cursor.find(prev); + if (i == 0 && found && cursorEqual(cursor.from(), pos)) { + var lastEndPos = prev ? cursor.from() : cursor.to(); + found = cursor.find(prev); + if (found && !found[0] && cursorEqual(cursor.from(), lastEndPos)) { + if (cm.getLine(lastEndPos.line).length == lastEndPos.ch) + found = cursor.find(prev); + } + } + if (!found) { + // SearchCursor may have returned null because it hit EOF, wrap + // around and try again. + cursor = cm.getSearchCursor(query, + (prev) ? new Pos(cm.lastLine()) : new Pos(cm.firstLine(), 0) ); + if (!cursor.find(prev)) { + return; + } + } + } + return cursor.from(); + }); + } + /** + * Pretty much the same as `findNext`, except for the following differences: + * + * 1. Before starting the search, move to the previous search. This way if our cursor is + * already inside a match, we should return the current match. + * 2. Rather than only returning the cursor's from, we return the cursor's from and to as a tuple. + */ + function findNextFromAndToInclusive(cm, prev, query, repeat, vim) { + if (repeat === undefined) { repeat = 1; } + return cm.operation(function() { + var pos = cm.getCursor(); + var cursor = cm.getSearchCursor(query, pos); + + // Go back one result to ensure that if the cursor is currently a match, we keep it. + var found = cursor.find(!prev); + + // If we haven't moved, go back one more (similar to if i==0 logic in findNext). + if (!vim.visualMode && found && cursorEqual(cursor.from(), pos)) { + cursor.find(!prev); + } + + for (var i = 0; i < repeat; i++) { + found = cursor.find(prev); + if (!found) { + // SearchCursor may have returned null because it hit EOF, wrap + // around and try again. + cursor = cm.getSearchCursor(query, + (prev) ? new Pos(cm.lastLine()) : new Pos(cm.firstLine(), 0) ); + if (!cursor.find(prev)) { + return; + } + } + } + return [cursor.from(), cursor.to()]; + }); + } + function clearSearchHighlight(cm) { + var state = getSearchState(cm); + cm.removeOverlay(getSearchState(cm).getOverlay()); + state.setOverlay(null); + if (state.getScrollbarAnnotate()) { + state.getScrollbarAnnotate().clear(); + state.setScrollbarAnnotate(null); + } + } + /** + * Check if pos is in the specified range, INCLUSIVE. + * Range can be specified with 1 or 2 arguments. + * If the first range argument is an array, treat it as an array of line + * numbers. Match pos against any of the lines. + * If the first range argument is a number, + * if there is only 1 range argument, check if pos has the same line + * number + * if there are 2 range arguments, then check if pos is in between the two + * range arguments. + */ + function isInRange(pos, start, end) { + if (typeof pos != 'number') { + // Assume it is a cursor position. Get the line number. + pos = pos.line; + } + if (start instanceof Array) { + return inArray(pos, start); + } else { + if (typeof end == 'number') { + return (pos >= start && pos <= end); + } else { + return pos == start; + } + } + } + function getUserVisibleLines(cm) { + var scrollInfo = cm.getScrollInfo(); + var occludeToleranceTop = 6; + var occludeToleranceBottom = 10; + var from = cm.coordsChar({left:0, top: occludeToleranceTop + scrollInfo.top}, 'local'); + var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top; + var to = cm.coordsChar({left:0, top: bottomY}, 'local'); + return {top: from.line, bottom: to.line}; + } + + function getMarkPos(cm, vim, markName) { + if (markName == '\'' || markName == '`') { + return vimGlobalState.jumpList.find(cm, -1) || new Pos(0, 0); + } else if (markName == '.') { + return getLastEditPos(cm); + } + + var mark = vim.marks[markName]; + return mark && mark.find(); + } + + function getLastEditPos(cm) { + var done = cm.doc.history.done; + for (var i = done.length; i--;) { + if (done[i].changes) { + return copyCursor(done[i].changes[0].to); + } + } + } + + var ExCommandDispatcher = function() { + this.buildCommandMap_(); + }; + ExCommandDispatcher.prototype = { + processCommand: function(cm, input, opt_params) { + var that = this; + cm.operation(function () { + cm.curOp.isVimOp = true; + that._processCommand(cm, input, opt_params); + }); + }, + _processCommand: function(cm, input, opt_params) { + var vim = cm.state.vim; + var commandHistoryRegister = vimGlobalState.registerController.getRegister(':'); + var previousCommand = commandHistoryRegister.toString(); + if (vim.visualMode) { + exitVisualMode(cm); + } + var inputStream = new CodeMirror.StringStream(input); + // update ": with the latest command whether valid or invalid + commandHistoryRegister.setText(input); + var params = opt_params || {}; + params.input = input; + try { + this.parseInput_(cm, inputStream, params); + } catch(e) { + showConfirm(cm, e.toString()); + throw e; + } + var command; + var commandName; + if (!params.commandName) { + // If only a line range is defined, move to the line. + if (params.line !== undefined) { + commandName = 'move'; + } + } else { + command = this.matchCommand_(params.commandName); + if (command) { + commandName = command.name; + if (command.excludeFromCommandHistory) { + commandHistoryRegister.setText(previousCommand); + } + this.parseCommandArgs_(inputStream, params, command); + if (command.type == 'exToKey') { + // Handle Ex to Key mapping. + for (var i = 0; i < command.toKeys.length; i++) { + vimApi.handleKey(cm, command.toKeys[i], 'mapping'); + } + return; + } else if (command.type == 'exToEx') { + // Handle Ex to Ex mapping. + this.processCommand(cm, command.toInput); + return; + } + } + } + if (!commandName) { + showConfirm(cm, 'Not an editor command ":' + input + '"'); + return; + } + try { + exCommands[commandName](cm, params); + // Possibly asynchronous commands (e.g. substitute, which might have a + // user confirmation), are responsible for calling the callback when + // done. All others have it taken care of for them here. + if ((!command || !command.possiblyAsync) && params.callback) { + params.callback(); + } + } catch(e) { + showConfirm(cm, e.toString()); + throw e; + } + }, + parseInput_: function(cm, inputStream, result) { + inputStream.eatWhile(':'); + // Parse range. + if (inputStream.eat('%')) { + result.line = cm.firstLine(); + result.lineEnd = cm.lastLine(); + } else { + result.line = this.parseLineSpec_(cm, inputStream); + if (result.line !== undefined && inputStream.eat(',')) { + result.lineEnd = this.parseLineSpec_(cm, inputStream); + } + } + + // Parse command name. + var commandMatch = inputStream.match(/^(\w+|!!|@@|[!#&*<=>@~])/); + if (commandMatch) { + result.commandName = commandMatch[1]; + } else { + result.commandName = inputStream.match(/.*/)[0]; + } + + return result; + }, + parseLineSpec_: function(cm, inputStream) { + var numberMatch = inputStream.match(/^(\d+)/); + if (numberMatch) { + // Absolute line number plus offset (N+M or N-M) is probably a typo, + // not something the user actually wanted. (NB: vim does allow this.) + return parseInt(numberMatch[1], 10) - 1; + } + switch (inputStream.next()) { + case '.': + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); + case '$': + return this.parseLineSpecOffset_(inputStream, cm.lastLine()); + case '\'': + var markName = inputStream.next(); + var markPos = getMarkPos(cm, cm.state.vim, markName); + if (!markPos) throw new Error('Mark not set'); + return this.parseLineSpecOffset_(inputStream, markPos.line); + case '-': + case '+': + inputStream.backUp(1); + // Offset is relative to current line if not otherwise specified. + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); + default: + inputStream.backUp(1); + return undefined; + } + }, + parseLineSpecOffset_: function(inputStream, line) { + var offsetMatch = inputStream.match(/^([+-])?(\d+)/); + if (offsetMatch) { + var offset = parseInt(offsetMatch[2], 10); + if (offsetMatch[1] == "-") { + line -= offset; + } else { + line += offset; + } + } + return line; + }, + parseCommandArgs_: function(inputStream, params, command) { + if (inputStream.eol()) { + return; + } + params.argString = inputStream.match(/.*/)[0]; + // Parse command-line arguments + var delim = command.argDelimiter || /\s+/; + var args = trim(params.argString).split(delim); + if (args.length && args[0]) { + params.args = args; + } + }, + matchCommand_: function(commandName) { + // Return the command in the command map that matches the shortest + // prefix of the passed in command name. The match is guaranteed to be + // unambiguous if the defaultExCommandMap's shortNames are set up + // correctly. (see @code{defaultExCommandMap}). + for (var i = commandName.length; i > 0; i--) { + var prefix = commandName.substring(0, i); + if (this.commandMap_[prefix]) { + var command = this.commandMap_[prefix]; + if (command.name.indexOf(commandName) === 0) { + return command; + } + } + } + return null; + }, + buildCommandMap_: function() { + this.commandMap_ = {}; + for (var i = 0; i < defaultExCommandMap.length; i++) { + var command = defaultExCommandMap[i]; + var key = command.shortName || command.name; + this.commandMap_[key] = command; + } + }, + map: function(lhs, rhs, ctx) { + if (lhs != ':' && lhs.charAt(0) == ':') { + if (ctx) { throw Error('Mode not supported for ex mappings'); } + var commandName = lhs.substring(1); + if (rhs != ':' && rhs.charAt(0) == ':') { + // Ex to Ex mapping + this.commandMap_[commandName] = { + name: commandName, + type: 'exToEx', + toInput: rhs.substring(1), + user: true + }; + } else { + // Ex to key mapping + this.commandMap_[commandName] = { + name: commandName, + type: 'exToKey', + toKeys: rhs, + user: true + }; + } + } else { + if (rhs != ':' && rhs.charAt(0) == ':') { + // Key to Ex mapping. + var mapping = { + keys: lhs, + type: 'keyToEx', + exArgs: { input: rhs.substring(1) } + }; + if (ctx) { mapping.context = ctx; } + defaultKeymap.unshift(mapping); + } else { + // Key to key mapping + var mapping = { + keys: lhs, + type: 'keyToKey', + toKeys: rhs + }; + if (ctx) { mapping.context = ctx; } + defaultKeymap.unshift(mapping); + } + } + }, + unmap: function(lhs, ctx) { + if (lhs != ':' && lhs.charAt(0) == ':') { + // Ex to Ex or Ex to key mapping + if (ctx) { throw Error('Mode not supported for ex mappings'); } + var commandName = lhs.substring(1); + if (this.commandMap_[commandName] && this.commandMap_[commandName].user) { + delete this.commandMap_[commandName]; + return true; + } + } else { + // Key to Ex or key to key mapping + var keys = lhs; + for (var i = 0; i < defaultKeymap.length; i++) { + if (keys == defaultKeymap[i].keys + && defaultKeymap[i].context === ctx) { + defaultKeymap.splice(i, 1); + return true; + } + } + } + } + }; + + var exCommands = { + colorscheme: function(cm, params) { + if (!params.args || params.args.length < 1) { + showConfirm(cm, cm.getOption('theme')); + return; + } + cm.setOption('theme', params.args[0]); + }, + map: function(cm, params, ctx) { + var mapArgs = params.args; + if (!mapArgs || mapArgs.length < 2) { + if (cm) { + showConfirm(cm, 'Invalid mapping: ' + params.input); + } + return; + } + exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx); + }, + imap: function(cm, params) { this.map(cm, params, 'insert'); }, + nmap: function(cm, params) { this.map(cm, params, 'normal'); }, + vmap: function(cm, params) { this.map(cm, params, 'visual'); }, + unmap: function(cm, params, ctx) { + var mapArgs = params.args; + if (!mapArgs || mapArgs.length < 1 || !exCommandDispatcher.unmap(mapArgs[0], ctx)) { + if (cm) { + showConfirm(cm, 'No such mapping: ' + params.input); + } + } + }, + move: function(cm, params) { + commandDispatcher.processCommand(cm, cm.state.vim, { + type: 'motion', + motion: 'moveToLineOrEdgeOfDocument', + motionArgs: { forward: false, explicitRepeat: true, + linewise: true }, + repeatOverride: params.line+1}); + }, + set: function(cm, params) { + var setArgs = params.args; + // Options passed through to the setOption/getOption calls. May be passed in by the + // local/global versions of the set command + var setCfg = params.setCfg || {}; + if (!setArgs || setArgs.length < 1) { + if (cm) { + showConfirm(cm, 'Invalid mapping: ' + params.input); + } + return; + } + var expr = setArgs[0].split('='); + var optionName = expr[0]; + var value = expr[1]; + var forceGet = false; + + if (optionName.charAt(optionName.length - 1) == '?') { + // If post-fixed with ?, then the set is actually a get. + if (value) { throw Error('Trailing characters: ' + params.argString); } + optionName = optionName.substring(0, optionName.length - 1); + forceGet = true; + } + if (value === undefined && optionName.substring(0, 2) == 'no') { + // To set boolean options to false, the option name is prefixed with + // 'no'. + optionName = optionName.substring(2); + value = false; + } + + var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean'; + if (optionIsBoolean && value == undefined) { + // Calling set with a boolean option sets it to true. + value = true; + } + // If no value is provided, then we assume this is a get. + if (!optionIsBoolean && value === undefined || forceGet) { + var oldValue = getOption(optionName, cm, setCfg); + if (oldValue instanceof Error) { + showConfirm(cm, oldValue.message); + } else if (oldValue === true || oldValue === false) { + showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName); + } else { + showConfirm(cm, ' ' + optionName + '=' + oldValue); + } + } else { + var setOptionReturn = setOption(optionName, value, cm, setCfg); + if (setOptionReturn instanceof Error) { + showConfirm(cm, setOptionReturn.message); + } + } + }, + setlocal: function (cm, params) { + // setCfg is passed through to setOption + params.setCfg = {scope: 'local'}; + this.set(cm, params); + }, + setglobal: function (cm, params) { + // setCfg is passed through to setOption + params.setCfg = {scope: 'global'}; + this.set(cm, params); + }, + registers: function(cm, params) { + var regArgs = params.args; + var registers = vimGlobalState.registerController.registers; + var regInfo = '----------Registers----------\n\n'; + if (!regArgs) { + for (var registerName in registers) { + var text = registers[registerName].toString(); + if (text.length) { + regInfo += '"' + registerName + ' ' + text + '\n'; + } + } + } else { + var registerName; + regArgs = regArgs.join(''); + for (var i = 0; i < regArgs.length; i++) { + registerName = regArgs.charAt(i); + if (!vimGlobalState.registerController.isValidRegister(registerName)) { + continue; + } + var register = registers[registerName] || new Register(); + regInfo += '"' + registerName + ' ' + register.toString() + '\n'; + } + } + showConfirm(cm, regInfo); + }, + sort: function(cm, params) { + var reverse, ignoreCase, unique, number, pattern; + function parseArgs() { + if (params.argString) { + var args = new CodeMirror.StringStream(params.argString); + if (args.eat('!')) { reverse = true; } + if (args.eol()) { return; } + if (!args.eatSpace()) { return 'Invalid arguments'; } + var opts = args.match(/([dinuox]+)?\s*(\/.+\/)?\s*/); + if (!opts && !args.eol()) { return 'Invalid arguments'; } + if (opts[1]) { + ignoreCase = opts[1].indexOf('i') != -1; + unique = opts[1].indexOf('u') != -1; + var decimal = opts[1].indexOf('d') != -1 || opts[1].indexOf('n') != -1 && 1; + var hex = opts[1].indexOf('x') != -1 && 1; + var octal = opts[1].indexOf('o') != -1 && 1; + if (decimal + hex + octal > 1) { return 'Invalid arguments'; } + number = decimal && 'decimal' || hex && 'hex' || octal && 'octal'; + } + if (opts[2]) { + pattern = new RegExp(opts[2].substr(1, opts[2].length - 2), ignoreCase ? 'i' : ''); + } + } + } + var err = parseArgs(); + if (err) { + showConfirm(cm, err + ': ' + params.argString); + return; + } + var lineStart = params.line || cm.firstLine(); + var lineEnd = params.lineEnd || params.line || cm.lastLine(); + if (lineStart == lineEnd) { return; } + var curStart = new Pos(lineStart, 0); + var curEnd = new Pos(lineEnd, lineLength(cm, lineEnd)); + var text = cm.getRange(curStart, curEnd).split('\n'); + var numberRegex = pattern ? pattern : + (number == 'decimal') ? /(-?)([\d]+)/ : + (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i : + (number == 'octal') ? /([0-7]+)/ : null; + var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null; + var numPart = [], textPart = []; + if (number || pattern) { + for (var i = 0; i < text.length; i++) { + var matchPart = pattern ? text[i].match(pattern) : null; + if (matchPart && matchPart[0] != '') { + numPart.push(matchPart); + } else if (!pattern && numberRegex.exec(text[i])) { + numPart.push(text[i]); + } else { + textPart.push(text[i]); + } + } + } else { + textPart = text; + } + function compareFn(a, b) { + if (reverse) { var tmp; tmp = a; a = b; b = tmp; } + if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); } + var anum = number && numberRegex.exec(a); + var bnum = number && numberRegex.exec(b); + if (!anum) { return a < b ? -1 : 1; } + anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix); + bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix); + return anum - bnum; + } + function comparePatternFn(a, b) { + if (reverse) { var tmp; tmp = a; a = b; b = tmp; } + if (ignoreCase) { a[0] = a[0].toLowerCase(); b[0] = b[0].toLowerCase(); } + return (a[0] < b[0]) ? -1 : 1; + } + numPart.sort(pattern ? comparePatternFn : compareFn); + if (pattern) { + for (var i = 0; i < numPart.length; i++) { + numPart[i] = numPart[i].input; + } + } else if (!number) { textPart.sort(compareFn); } + text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart); + if (unique) { // Remove duplicate lines + var textOld = text; + var lastLine; + text = []; + for (var i = 0; i < textOld.length; i++) { + if (textOld[i] != lastLine) { + text.push(textOld[i]); + } + lastLine = textOld[i]; + } + } + cm.replaceRange(text.join('\n'), curStart, curEnd); + }, + vglobal: function(cm, params) { + // global inspects params.commandName + this.global(cm, params); + }, + global: function(cm, params) { + // a global command is of the form + // :[range]g/pattern/[cmd] + // argString holds the string /pattern/[cmd] + var argString = params.argString; + if (!argString) { + showConfirm(cm, 'Regular Expression missing from global'); + return; + } + var inverted = params.commandName[0] === 'v'; + // range is specified here + var lineStart = (params.line !== undefined) ? params.line : cm.firstLine(); + var lineEnd = params.lineEnd || params.line || cm.lastLine(); + // get the tokens from argString + var tokens = splitBySlash(argString); + var regexPart = argString, cmd; + if (tokens.length) { + regexPart = tokens[0]; + cmd = tokens.slice(1, tokens.length).join('/'); + } + if (regexPart) { + // If regex part is empty, then use the previous query. Otherwise + // use the regex part as the new query. + try { + updateSearchQuery(cm, regexPart, true /** ignoreCase */, + true /** smartCase */); + } catch (e) { + showConfirm(cm, 'Invalid regex: ' + regexPart); + return; + } + } + // now that we have the regexPart, search for regex matches in the + // specified range of lines + var query = getSearchState(cm).getQuery(); + var matchedLines = []; + for (var i = lineStart; i <= lineEnd; i++) { + var line = cm.getLineHandle(i); + var matched = query.test(line.text); + if (matched !== inverted) { + matchedLines.push(cmd ? line : line.text); + } + } + // if there is no [cmd], just display the list of matched lines + if (!cmd) { + showConfirm(cm, matchedLines.join('\n')); + return; + } + var index = 0; + var nextCommand = function() { + if (index < matchedLines.length) { + var line = matchedLines[index++]; + var lineNum = cm.getLineNumber(line); + if (lineNum == null) { + nextCommand(); + return; + } + var command = (lineNum + 1) + cmd; + exCommandDispatcher.processCommand(cm, command, { + callback: nextCommand + }); + } + }; + nextCommand(); + }, + substitute: function(cm, params) { + if (!cm.getSearchCursor) { + throw new Error('Search feature not available. Requires searchcursor.js or ' + + 'any other getSearchCursor implementation.'); + } + var argString = params.argString; + var tokens = argString ? splitBySeparator(argString, argString[0]) : []; + var regexPart, replacePart = '', trailing, flagsPart, count; + var confirm = false; // Whether to confirm each replace. + var global = false; // True to replace all instances on a line, false to replace only 1. + if (tokens.length) { + regexPart = tokens[0]; + if (getOption('pcre') && regexPart !== '') { + regexPart = new RegExp(regexPart).source; //normalize not escaped characters + } + replacePart = tokens[1]; + if (replacePart !== undefined) { + if (getOption('pcre')) { + replacePart = unescapeRegexReplace(replacePart.replace(/([^\\])&/g,"$1$$&")); + } else { + replacePart = translateRegexReplace(replacePart); + } + vimGlobalState.lastSubstituteReplacePart = replacePart; + } + trailing = tokens[2] ? tokens[2].split(' ') : []; + } else { + // either the argString is empty or its of the form ' hello/world' + // actually splitBySlash returns a list of tokens + // only if the string starts with a '/' + if (argString && argString.length) { + showConfirm(cm, 'Substitutions should be of the form ' + + ':s/pattern/replace/'); + return; + } + } + // After the 3rd slash, we can have flags followed by a space followed + // by count. + if (trailing) { + flagsPart = trailing[0]; + count = parseInt(trailing[1]); + if (flagsPart) { + if (flagsPart.indexOf('c') != -1) { + confirm = true; + } + if (flagsPart.indexOf('g') != -1) { + global = true; + } + if (getOption('pcre')) { + regexPart = regexPart + '/' + flagsPart; + } else { + regexPart = regexPart.replace(/\//g, "\\/") + '/' + flagsPart; + } + } + } + if (regexPart) { + // If regex part is empty, then use the previous query. Otherwise use + // the regex part as the new query. + try { + updateSearchQuery(cm, regexPart, true /** ignoreCase */, + true /** smartCase */); + } catch (e) { + showConfirm(cm, 'Invalid regex: ' + regexPart); + return; + } + } + replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart; + if (replacePart === undefined) { + showConfirm(cm, 'No previous substitute regular expression'); + return; + } + var state = getSearchState(cm); + var query = state.getQuery(); + var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line; + var lineEnd = params.lineEnd || lineStart; + if (lineStart == cm.firstLine() && lineEnd == cm.lastLine()) { + lineEnd = Infinity; + } + if (count) { + lineStart = lineEnd; + lineEnd = lineStart + count - 1; + } + var startPos = clipCursorToContent(cm, new Pos(lineStart, 0)); + var cursor = cm.getSearchCursor(query, startPos); + doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback); + }, + redo: CodeMirror.commands.redo, + undo: CodeMirror.commands.undo, + write: function(cm) { + if (CodeMirror.commands.save) { + // If a save command is defined, call it. + CodeMirror.commands.save(cm); + } else if (cm.save) { + // Saves to text area if no save command is defined and cm.save() is available. + cm.save(); + } + }, + nohlsearch: function(cm) { + clearSearchHighlight(cm); + }, + yank: function (cm) { + var cur = copyCursor(cm.getCursor()); + var line = cur.line; + var lineText = cm.getLine(line); + vimGlobalState.registerController.pushText( + '0', 'yank', lineText, true, true); + }, + delmarks: function(cm, params) { + if (!params.argString || !trim(params.argString)) { + showConfirm(cm, 'Argument required'); + return; + } + + var state = cm.state.vim; + var stream = new CodeMirror.StringStream(trim(params.argString)); + while (!stream.eol()) { + stream.eatSpace(); + + // Record the streams position at the beginning of the loop for use + // in error messages. + var count = stream.pos; + + if (!stream.match(/[a-zA-Z]/, false)) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + + var sym = stream.next(); + // Check if this symbol is part of a range + if (stream.match('-', true)) { + // This symbol is part of a range. + + // The range must terminate at an alphabetic character. + if (!stream.match(/[a-zA-Z]/, false)) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + + var startMark = sym; + var finishMark = stream.next(); + // The range must terminate at an alphabetic character which + // shares the same case as the start of the range. + if (isLowerCase(startMark) && isLowerCase(finishMark) || + isUpperCase(startMark) && isUpperCase(finishMark)) { + var start = startMark.charCodeAt(0); + var finish = finishMark.charCodeAt(0); + if (start >= finish) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + + // Because marks are always ASCII values, and we have + // determined that they are the same case, we can use + // their char codes to iterate through the defined range. + for (var j = 0; j <= finish - start; j++) { + var mark = String.fromCharCode(start + j); + delete state.marks[mark]; + } + } else { + showConfirm(cm, 'Invalid argument: ' + startMark + '-'); + return; + } + } else { + // This symbol is a valid mark, and is not part of a range. + delete state.marks[sym]; + } + } + } + }; + + var exCommandDispatcher = new ExCommandDispatcher(); + + /** + * @param {CodeMirror} cm CodeMirror instance we are in. + * @param {boolean} confirm Whether to confirm each replace. + * @param {Cursor} lineStart Line to start replacing from. + * @param {Cursor} lineEnd Line to stop replacing at. + * @param {RegExp} query Query for performing matches with. + * @param {string} replaceWith Text to replace matches with. May contain $1, + * $2, etc for replacing captured groups using JavaScript replace. + * @param {function()} callback A callback for when the replace is done. + */ + function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query, + replaceWith, callback) { + // Set up all the functions. + cm.state.vim.exMode = true; + var done = false; + var lastPos, modifiedLineNumber, joined; + function replaceAll() { + cm.operation(function() { + while (!done) { + replace(); + next(); + } + stop(); + }); + } + function replace() { + var text = cm.getRange(searchCursor.from(), searchCursor.to()); + var newText = text.replace(query, replaceWith); + var unmodifiedLineNumber = searchCursor.to().line; + searchCursor.replace(newText); + modifiedLineNumber = searchCursor.to().line; + lineEnd += modifiedLineNumber - unmodifiedLineNumber; + joined = modifiedLineNumber < unmodifiedLineNumber; + } + function findNextValidMatch() { + var lastMatchTo = lastPos && copyCursor(searchCursor.to()); + var match = searchCursor.findNext(); + if (match && !match[0] && lastMatchTo && cursorEqual(searchCursor.from(), lastMatchTo)) { + match = searchCursor.findNext(); + } + return match; + } + function next() { + // The below only loops to skip over multiple occurrences on the same + // line when 'global' is not true. + while(findNextValidMatch() && + isInRange(searchCursor.from(), lineStart, lineEnd)) { + if (!global && searchCursor.from().line == modifiedLineNumber && !joined) { + continue; + } + cm.scrollIntoView(searchCursor.from(), 30); + cm.setSelection(searchCursor.from(), searchCursor.to()); + lastPos = searchCursor.from(); + done = false; + return; + } + done = true; + } + function stop(close) { + if (close) { close(); } + cm.focus(); + if (lastPos) { + cm.setCursor(lastPos); + var vim = cm.state.vim; + vim.exMode = false; + vim.lastHPos = vim.lastHSPos = lastPos.ch; + } + if (callback) { callback(); } + } + function onPromptKeyDown(e, _value, close) { + // Swallow all keys. + CodeMirror.e_stop(e); + var keyName = CodeMirror.keyName(e); + switch (keyName) { + case 'Y': + replace(); next(); break; + case 'N': + next(); break; + case 'A': + // replaceAll contains a call to close of its own. We don't want it + // to fire too early or multiple times. + var savedCallback = callback; + callback = undefined; + cm.operation(replaceAll); + callback = savedCallback; + break; + case 'L': + replace(); + // fall through and exit. + case 'Q': + case 'Esc': + case 'Ctrl-C': + case 'Ctrl-[': + stop(close); + break; + } + if (done) { stop(close); } + return true; + } + + // Actually do replace. + next(); + if (done) { + showConfirm(cm, 'No matches for ' + query.source); + return; + } + if (!confirm) { + replaceAll(); + if (callback) { callback(); } + return; + } + showPrompt(cm, { + prefix: dom('span', 'replace with ', dom('strong', replaceWith), ' (y/n/a/q/l)'), + onKeyDown: onPromptKeyDown + }); + } + + CodeMirror.keyMap.vim = { + attach: attachVimMap, + detach: detachVimMap, + call: cmKey + }; + + function exitInsertMode(cm) { + var vim = cm.state.vim; + var macroModeState = vimGlobalState.macroModeState; + var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.'); + var isPlaying = macroModeState.isPlaying; + var lastChange = macroModeState.lastInsertModeChanges; + if (!isPlaying) { + cm.off('change', onChange); + CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); + } + if (!isPlaying && vim.insertModeRepeat > 1) { + // Perform insert mode repeat for commands like 3,a and 3,o. + repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, + true /** repeatForInsert */); + vim.lastEditInputState.repeatOverride = vim.insertModeRepeat; + } + delete vim.insertModeRepeat; + vim.insertMode = false; + cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1); + cm.setOption('keyMap', 'vim'); + cm.setOption('disableInput', true); + cm.toggleOverwrite(false); // exit replace mode if we were in it. + // update the ". register before exiting insert mode + insertModeChangeRegister.setText(lastChange.changes.join('')); + CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); + if (macroModeState.isRecording) { + logInsertModeChange(macroModeState); + } + } + + function _mapCommand(command) { + defaultKeymap.unshift(command); + } + + function mapCommand(keys, type, name, args, extra) { + var command = {keys: keys, type: type}; + command[type] = name; + command[type + "Args"] = args; + for (var key in extra) + command[key] = extra[key]; + _mapCommand(command); + } + + // The timeout in milliseconds for the two-character ESC keymap should be + // adjusted according to your typing speed to prevent false positives. + defineOption('insertModeEscKeysTimeout', 200, 'number'); + + CodeMirror.keyMap['vim-insert'] = { + // TODO: override navigation keys so that Esc will cancel automatic + // indentation from o, O, i_ + fallthrough: ['default'], + attach: attachVimMap, + detach: detachVimMap, + call: cmKey + }; + + CodeMirror.keyMap['vim-replace'] = { + 'Backspace': 'goCharLeft', + fallthrough: ['vim-insert'], + attach: attachVimMap, + detach: detachVimMap, + call: cmKey + }; + + function executeMacroRegister(cm, vim, macroModeState, registerName) { + var register = vimGlobalState.registerController.getRegister(registerName); + if (registerName == ':') { + // Read-only register containing last Ex command. + if (register.keyBuffer[0]) { + exCommandDispatcher.processCommand(cm, register.keyBuffer[0]); + } + macroModeState.isPlaying = false; + return; + } + var keyBuffer = register.keyBuffer; + var imc = 0; + macroModeState.isPlaying = true; + macroModeState.replaySearchQueries = register.searchQueries.slice(0); + for (var i = 0; i < keyBuffer.length; i++) { + var text = keyBuffer[i]; + var match, key; + while (text) { + // Pull off one command key, which is either a single character + // or a special sequence wrapped in '<' and '>', e.g. ''. + match = (/<\w+-.+?>|<\w+>|./).exec(text); + key = match[0]; + text = text.substring(match.index + key.length); + vimApi.handleKey(cm, key, 'macro'); + if (vim.insertMode) { + var changes = register.insertModeChanges[imc++].changes; + vimGlobalState.macroModeState.lastInsertModeChanges.changes = + changes; + repeatInsertModeChanges(cm, changes, 1); + exitInsertMode(cm); + } + } + } + macroModeState.isPlaying = false; + } + + function logKey(macroModeState, key) { + if (macroModeState.isPlaying) { return; } + var registerName = macroModeState.latestRegister; + var register = vimGlobalState.registerController.getRegister(registerName); + if (register) { + register.pushText(key); + } + } + + function logInsertModeChange(macroModeState) { + if (macroModeState.isPlaying) { return; } + var registerName = macroModeState.latestRegister; + var register = vimGlobalState.registerController.getRegister(registerName); + if (register && register.pushInsertModeChanges) { + register.pushInsertModeChanges(macroModeState.lastInsertModeChanges); + } + } + + function logSearchQuery(macroModeState, query) { + if (macroModeState.isPlaying) { return; } + var registerName = macroModeState.latestRegister; + var register = vimGlobalState.registerController.getRegister(registerName); + if (register && register.pushSearchQuery) { + register.pushSearchQuery(query); + } + } + + /** + * Listens for changes made in insert mode. + * Should only be active in insert mode. + */ + function onChange(cm, changeObj) { + var macroModeState = vimGlobalState.macroModeState; + var lastChange = macroModeState.lastInsertModeChanges; + if (!macroModeState.isPlaying) { + while(changeObj) { + lastChange.expectCursorActivityForChange = true; + if (lastChange.ignoreCount > 1) { + lastChange.ignoreCount--; + } else if (changeObj.origin == '+input' || changeObj.origin == 'paste' + || changeObj.origin === undefined /* only in testing */) { + var selectionCount = cm.listSelections().length; + if (selectionCount > 1) + lastChange.ignoreCount = selectionCount; + var text = changeObj.text.join('\n'); + if (lastChange.maybeReset) { + lastChange.changes = []; + lastChange.maybeReset = false; + } + if (text) { + if (cm.state.overwrite && !/\n/.test(text)) { + lastChange.changes.push([text]); + } else { + lastChange.changes.push(text); + } + } + } + // Change objects may be chained with next. + changeObj = changeObj.next; + } + } + } + + /** + * Listens for any kind of cursor activity on CodeMirror. + */ + function onCursorActivity(cm) { + var vim = cm.state.vim; + if (vim.insertMode) { + // Tracking cursor activity in insert mode (for macro support). + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.isPlaying) { return; } + var lastChange = macroModeState.lastInsertModeChanges; + if (lastChange.expectCursorActivityForChange) { + lastChange.expectCursorActivityForChange = false; + } else { + // Cursor moved outside the context of an edit. Reset the change. + lastChange.maybeReset = true; + } + } else if (!cm.curOp.isVimOp) { + handleExternalSelection(cm, vim); + } + } + function handleExternalSelection(cm, vim) { + var anchor = cm.getCursor('anchor'); + var head = cm.getCursor('head'); + // Enter or exit visual mode to match mouse selection. + if (vim.visualMode && !cm.somethingSelected()) { + exitVisualMode(cm, false); + } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) { + vim.visualMode = true; + vim.visualLine = false; + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"}); + } + if (vim.visualMode) { + // Bind CodeMirror selection model to vim selection model. + // Mouse selections are considered visual characterwise. + var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; + var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; + head = offsetCursor(head, 0, headOffset); + anchor = offsetCursor(anchor, 0, anchorOffset); + vim.sel = { + anchor: anchor, + head: head + }; + updateMark(cm, vim, '<', cursorMin(head, anchor)); + updateMark(cm, vim, '>', cursorMax(head, anchor)); + } else if (!vim.insertMode) { + // Reset lastHPos if selection was modified by something outside of vim mode e.g. by mouse. + vim.lastHPos = cm.getCursor().ch; + } + } + + /** Wrapper for special keys pressed in insert mode */ + function InsertModeKey(keyName) { + this.keyName = keyName; + } + + /** + * Handles raw key down events from the text area. + * - Should only be active in insert mode. + * - For recording deletes in insert mode. + */ + function onKeyEventTargetKeyDown(e) { + var macroModeState = vimGlobalState.macroModeState; + var lastChange = macroModeState.lastInsertModeChanges; + var keyName = CodeMirror.keyName(e); + if (!keyName) { return; } + function onKeyFound() { + if (lastChange.maybeReset) { + lastChange.changes = []; + lastChange.maybeReset = false; + } + lastChange.changes.push(new InsertModeKey(keyName)); + return true; + } + if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) { + CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound); + } + } + + /** + * Repeats the last edit, which includes exactly 1 command and at most 1 + * insert. Operator and motion commands are read from lastEditInputState, + * while action commands are read from lastEditActionCommand. + * + * If repeatForInsert is true, then the function was called by + * exitInsertMode to repeat the insert mode changes the user just made. The + * corresponding enterInsertMode call was made with a count. + */ + function repeatLastEdit(cm, vim, repeat, repeatForInsert) { + var macroModeState = vimGlobalState.macroModeState; + macroModeState.isPlaying = true; + var isAction = !!vim.lastEditActionCommand; + var cachedInputState = vim.inputState; + function repeatCommand() { + if (isAction) { + commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand); + } else { + commandDispatcher.evalInput(cm, vim); + } + } + function repeatInsert(repeat) { + if (macroModeState.lastInsertModeChanges.changes.length > 0) { + // For some reason, repeat cw in desktop VIM does not repeat + // insert mode changes. Will conform to that behavior. + repeat = !vim.lastEditActionCommand ? 1 : repeat; + var changeObject = macroModeState.lastInsertModeChanges; + repeatInsertModeChanges(cm, changeObject.changes, repeat); + } + } + vim.inputState = vim.lastEditInputState; + if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) { + // o and O repeat have to be interlaced with insert repeats so that the + // insertions appear on separate lines instead of the last line. + for (var i = 0; i < repeat; i++) { + repeatCommand(); + repeatInsert(1); + } + } else { + if (!repeatForInsert) { + // Hack to get the cursor to end up at the right place. If I is + // repeated in insert mode repeat, cursor will be 1 insert + // change set left of where it should be. + repeatCommand(); + } + repeatInsert(repeat); + } + vim.inputState = cachedInputState; + if (vim.insertMode && !repeatForInsert) { + // Don't exit insert mode twice. If repeatForInsert is set, then we + // were called by an exitInsertMode call lower on the stack. + exitInsertMode(cm); + } + macroModeState.isPlaying = false; + } + + function repeatInsertModeChanges(cm, changes, repeat) { + function keyHandler(binding) { + if (typeof binding == 'string') { + CodeMirror.commands[binding](cm); + } else { + binding(cm); + } + return true; + } + var head = cm.getCursor('head'); + var visualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.visualBlock; + if (visualBlock) { + // Set up block selection again for repeating the changes. + selectForInsert(cm, head, visualBlock + 1); + repeat = cm.listSelections().length; + cm.setCursor(head); + } + for (var i = 0; i < repeat; i++) { + if (visualBlock) { + cm.setCursor(offsetCursor(head, i, 0)); + } + for (var j = 0; j < changes.length; j++) { + var change = changes[j]; + if (change instanceof InsertModeKey) { + CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler); + } else if (typeof change == "string") { + cm.replaceSelection(change); + } else { + var start = cm.getCursor(); + var end = offsetCursor(start, 0, change[0].length); + cm.replaceRange(change[0], start, end); + cm.setCursor(end); + } + } + } + if (visualBlock) { + cm.setCursor(offsetCursor(head, 0, 1)); + } + } + + // multiselect support + function cloneVimState(state) { + var n = new state.constructor(); + Object.keys(state).forEach(function(key) { + var o = state[key]; + if (Array.isArray(o)) + o = o.slice(); + else if (o && typeof o == "object" && o.constructor != Object) + o = cloneVimState(o); + n[key] = o; + }); + if (state.sel) { + n.sel = { + head: state.sel.head && copyCursor(state.sel.head), + anchor: state.sel.anchor && copyCursor(state.sel.anchor) + }; + } + return n; + } + function multiSelectHandleKey(cm, key, origin) { + var isHandled = false; + var vim = vimApi.maybeInitVimState_(cm); + var visualBlock = vim.visualBlock || vim.wasInVisualBlock; + + var wasMultiselect = cm.isInMultiSelectMode(); + if (vim.wasInVisualBlock && !wasMultiselect) { + vim.wasInVisualBlock = false; + } else if (wasMultiselect && vim.visualBlock) { + vim.wasInVisualBlock = true; + } + + if (key == '' && !vim.insertMode && !vim.visualMode && wasMultiselect && vim.status == "") { + // allow editor to exit multiselect + clearInputState(cm); + } else if (visualBlock || !wasMultiselect || cm.inVirtualSelectionMode) { + isHandled = vimApi.handleKey(cm, key, origin); + } else { + var old = cloneVimState(vim); + + cm.operation(function() { + cm.curOp.isVimOp = true; + cm.forEachSelection(function() { + var head = cm.getCursor("head"); + var anchor = cm.getCursor("anchor"); + var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0; + var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0; + head = offsetCursor(head, 0, headOffset); + anchor = offsetCursor(anchor, 0, anchorOffset); + cm.state.vim.sel.head = head; + cm.state.vim.sel.anchor = anchor; + + isHandled = vimApi.handleKey(cm, key, origin); + if (cm.virtualSelection) { + cm.state.vim = cloneVimState(old); + } + }); + if (cm.curOp.cursorActivity && !isHandled) + cm.curOp.cursorActivity = false; + cm.state.vim = vim; + }, true); + } + // some commands may bring visualMode and selection out of sync + if (isHandled && !vim.visualMode && !vim.insert && vim.visualMode != cm.somethingSelected()) { + handleExternalSelection(cm, vim); + } + return isHandled; + } + resetVimGlobalState(); + + return vimApi; +} + +function initVim(CodeMirror5) { + CodeMirror5.Vim = initVim$1(CodeMirror5); + return CodeMirror5.Vim; +} + + + + CodeMirror.Vim = initVim(CodeMirror); + }); + \ No newline at end of file diff --git a/js/codemirror/lib/codemirror.css b/js/codemirror/lib/codemirror.css new file mode 100644 index 0000000..f4d5718 --- /dev/null +++ b/js/codemirror/lib/codemirror.css @@ -0,0 +1,344 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; + direction: ltr; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; +} + +.CodeMirror-guttermarker { color: black; } +.CodeMirror-guttermarker-subtle { color: #999; } + +/* CURSOR */ + +.CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0 !important; + background: #7e7; +} +.cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; +} +.cm-fat-cursor .CodeMirror-line::selection, +.cm-fat-cursor .CodeMirror-line > span::selection, +.cm-fat-cursor .CodeMirror-line > span > span::selection { background: transparent; } +.cm-fat-cursor .CodeMirror-line::-moz-selection, +.cm-fat-cursor .CodeMirror-line > span::-moz-selection, +.cm-fat-cursor .CodeMirror-line > span > span::-moz-selection { background: transparent; } +.cm-fat-cursor { caret-color: transparent; } +@-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} +@keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} +} + +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror-overwrite .CodeMirror-cursor {} + +.cm-tab { display: inline-block; text-decoration: inherit; } + +.CodeMirror-rulers { + position: absolute; + left: 0; right: 0; top: -50px; bottom: 0; + overflow: hidden; +} +.CodeMirror-ruler { + border-left: 1px solid #ccc; + top: 0; bottom: 0; + position: absolute; +} + +/* DEFAULT THEME */ + +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} +.cm-strikethrough {text-decoration: line-through;} + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable, +.cm-s-default .cm-punctuation, +.cm-s-default .cm-property, +.cm-s-default .cm-operator {} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-s-default .cm-error {color: #f00;} +.cm-invalidchar {color: #f00;} + +.CodeMirror-composing { border-bottom: 2px solid; } + +/* Default styles for common addons */ + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} +.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + position: relative; + overflow: hidden; + background: white; +} + +.CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 50px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -50px; margin-right: -50px; + padding-bottom: 50px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; + z-index: 0; +} +.CodeMirror-sizer { + position: relative; + border-right: 50px solid transparent; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; + outline: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + min-height: 100%; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -50px; +} +.CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; +} +.CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} +.CodeMirror-gutter-wrapper ::selection { background-color: transparent } +.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } + +.CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ +} +.CodeMirror pre.CodeMirror-line, +.CodeMirror pre.CodeMirror-line-like { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: contextual; + font-variant-ligatures: contextual; +} +.CodeMirror-wrap pre.CodeMirror-line, +.CodeMirror-wrap pre.CodeMirror-line-like { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} + +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + padding: 0.1px; /* Force widget margins to stay inside of the container */ +} + +.CodeMirror-widget {} + +.CodeMirror-rtl pre { direction: rtl; } + +.CodeMirror-code { + outline: none; +} + +/* Force content-box sizing for the elements where we expect it */ +.CodeMirror-scroll, +.CodeMirror-sizer, +.CodeMirror-gutter, +.CodeMirror-gutters, +.CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} + +.CodeMirror-cursor { + position: absolute; + pointer-events: none; +} +.CodeMirror-measure pre { position: static; } + +div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; +} +div.CodeMirror-dragcursors { + visibility: visible; +} + +.CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } +.CodeMirror-crosshair { cursor: crosshair; } +.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } +.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } + +.cm-searching { + background-color: #ffa; + background-color: rgba(255, 255, 0, .4); +} + +/* Used to force a border model for a node */ +.cm-force-border { padding-right: .1px; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } +} + +/* See issue #2901 */ +.cm-tab-wrap-hack:after { content: ''; } + +/* Help users use markselection to safely style text background */ +span.CodeMirror-selectedtext { background: none; } diff --git a/js/codemirror/lib/codemirror.js b/js/codemirror/lib/codemirror.js new file mode 100644 index 0000000..7687cd0 --- /dev/null +++ b/js/codemirror/lib/codemirror.js @@ -0,0 +1,9884 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// This is CodeMirror (https://codemirror.net/5), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . + +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + (global = global || self, global.CodeMirror = factory()); +}(this, (function () { 'use strict'; + + // Kludges for bugs and behavior differences that can't be feature + // detected are enabled based on userAgent etc sniffing. + var userAgent = navigator.userAgent; + var platform = navigator.platform; + + var gecko = /gecko\/\d/i.test(userAgent); + var ie_upto10 = /MSIE \d/.test(userAgent); + var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent); + var edge = /Edge\/(\d+)/.exec(userAgent); + var ie = ie_upto10 || ie_11up || edge; + var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]); + var webkit = !edge && /WebKit\//.test(userAgent); + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent); + var chrome = !edge && /Chrome\/(\d+)/.exec(userAgent); + var chrome_version = chrome && +chrome[1]; + var presto = /Opera\//.test(userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent); + var phantom = /PhantomJS/.test(userAgent); + + var ios = safari && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2); + var android = /Android/.test(userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent); + var mac = ios || /Mac/.test(platform); + var chromeOS = /\bCrOS\b/.test(userAgent); + var windows = /win/i.test(platform); + + var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/); + if (presto_version) { presto_version = Number(presto_version[1]); } + if (presto_version && presto_version >= 15) { presto = false; webkit = true; } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)); + var captureRightClick = gecko || (ie && ie_version >= 9); + + function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") } + + var rmClass = function(node, cls) { + var current = node.className; + var match = classTest(cls).exec(current); + if (match) { + var after = current.slice(match.index + match[0].length); + node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); + } + }; + + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) + { e.removeChild(e.firstChild); } + return e + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e) + } + + function elt(tag, content, className, style) { + var e = document.createElement(tag); + if (className) { e.className = className; } + if (style) { e.style.cssText = style; } + if (typeof content == "string") { e.appendChild(document.createTextNode(content)); } + else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } } + return e + } + // wrapper for elt, which removes the elt from the accessibility tree + function eltP(tag, content, className, style) { + var e = elt(tag, content, className, style); + e.setAttribute("role", "presentation"); + return e + } + + var range; + if (document.createRange) { range = function(node, start, end, endNode) { + var r = document.createRange(); + r.setEnd(endNode || node, end); + r.setStart(node, start); + return r + }; } + else { range = function(node, start, end) { + var r = document.body.createTextRange(); + try { r.moveToElementText(node.parentNode); } + catch(e) { return r } + r.collapse(true); + r.moveEnd("character", end); + r.moveStart("character", start); + return r + }; } + + function contains(parent, child) { + if (child.nodeType == 3) // Android browser always returns false when child is a textnode + { child = child.parentNode; } + if (parent.contains) + { return parent.contains(child) } + do { + if (child.nodeType == 11) { child = child.host; } + if (child == parent) { return true } + } while (child = child.parentNode) + } + + function activeElt(rootNode) { + // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement. + // IE < 10 will throw when accessed while the page is loading or in an iframe. + // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable. + var doc = rootNode.ownerDocument || rootNode; + var activeElement; + try { + activeElement = rootNode.activeElement; + } catch(e) { + activeElement = doc.body || null; + } + while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) + { activeElement = activeElement.shadowRoot.activeElement; } + return activeElement + } + + function addClass(node, cls) { + var current = node.className; + if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; } + } + function joinClasses(a, b) { + var as = a.split(" "); + for (var i = 0; i < as.length; i++) + { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } } + return b + } + + var selectInput = function(node) { node.select(); }; + if (ios) // Mobile Safari apparently has a bug where select() is broken. + { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; } + else if (ie) // Suppress mysterious IE10 errors + { selectInput = function(node) { try { node.select(); } catch(_e) {} }; } + + function doc(cm) { return cm.display.wrapper.ownerDocument } + + function root(cm) { + return rootNode(cm.display.wrapper) + } + + function rootNode(element) { + // Detect modern browsers (2017+). + return element.getRootNode ? element.getRootNode() : element.ownerDocument + } + + function win(cm) { return doc(cm).defaultView } + + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function(){return f.apply(null, args)} + } + + function copyObj(obj, target, overwrite) { + if (!target) { target = {}; } + for (var prop in obj) + { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) + { target[prop] = obj[prop]; } } + return target + } + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + function countColumn(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) { end = string.length; } + } + for (var i = startIndex || 0, n = startValue || 0;;) { + var nextTab = string.indexOf("\t", i); + if (nextTab < 0 || nextTab >= end) + { return n + (end - i) } + n += nextTab - i; + n += tabSize - (n % tabSize); + i = nextTab + 1; + } + } + + var Delayed = function() { + this.id = null; + this.f = null; + this.time = 0; + this.handler = bind(this.onTimeout, this); + }; + Delayed.prototype.onTimeout = function (self) { + self.id = 0; + if (self.time <= +new Date) { + self.f(); + } else { + setTimeout(self.handler, self.time - +new Date); + } + }; + Delayed.prototype.set = function (ms, f) { + this.f = f; + var time = +new Date + ms; + if (!this.id || time < this.time) { + clearTimeout(this.id); + this.id = setTimeout(this.handler, ms); + this.time = time; + } + }; + + function indexOf(array, elt) { + for (var i = 0; i < array.length; ++i) + { if (array[i] == elt) { return i } } + return -1 + } + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerGap = 50; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = {toString: function(){return "CodeMirror.Pass"}}; + + // Reused option objects for setSelection & friends + var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"}; + + // The inverse of countColumn -- find the offset that corresponds to + // a particular column. + function findColumn(string, goal, tabSize) { + for (var pos = 0, col = 0;;) { + var nextTab = string.indexOf("\t", pos); + if (nextTab == -1) { nextTab = string.length; } + var skipped = nextTab - pos; + if (nextTab == string.length || col + skipped >= goal) + { return pos + Math.min(skipped, goal - col) } + col += nextTab - pos; + col += tabSize - (col % tabSize); + pos = nextTab + 1; + if (col >= goal) { return pos } + } + } + + var spaceStrs = [""]; + function spaceStr(n) { + while (spaceStrs.length <= n) + { spaceStrs.push(lst(spaceStrs) + " "); } + return spaceStrs[n] + } + + function lst(arr) { return arr[arr.length-1] } + + function map(array, f) { + var out = []; + for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); } + return out + } + + function insertSorted(array, value, score) { + var pos = 0, priority = score(value); + while (pos < array.length && score(array[pos]) <= priority) { pos++; } + array.splice(pos, 0, value); + } + + function nothing() {} + + function createObj(base, props) { + var inst; + if (Object.create) { + inst = Object.create(base); + } else { + nothing.prototype = base; + inst = new nothing(); + } + if (props) { copyObj(props, inst); } + return inst + } + + var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + function isWordCharBasic(ch) { + return /\w/.test(ch) || ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)) + } + function isWordChar(ch, helper) { + if (!helper) { return isWordCharBasic(ch) } + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true } + return helper.test(ch) + } + + function isEmpty(obj) { + for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } } + return true + } + + // Extending unicode characters. A series of a non-extending char + + // any number of extending chars is treated as a single unit as far + // as editing and measuring is concerned. This is not fully correct, + // since some scripts/fonts/browsers also treat other configurations + // of code points as a group. + var extendingChars = /[\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 isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) } + + // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range. + function skipExtendingChars(str, pos, dir) { + while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; } + return pos + } + + // Returns the value from the range [`from`; `to`] that satisfies + // `pred` and is closest to `from`. Assumes that at least `to` + // satisfies `pred`. Supports `from` being greater than `to`. + function findFirst(pred, from, to) { + // At any point we are certain `to` satisfies `pred`, don't know + // whether `from` does. + var dir = from > to ? -1 : 1; + for (;;) { + if (from == to) { return from } + var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF); + if (mid == from) { return pred(mid) ? from : to } + if (pred(mid)) { to = mid; } + else { from = mid + dir; } + } + } + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) { return f(from, to, "ltr", 0) } + var found = false; + for (var i = 0; i < order.length; ++i) { + var part = order[i]; + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i); + found = true; + } + } + if (!found) { f(from, to, "ltr"); } + } + + var bidiOther = null; + function getBidiPartAt(order, ch, sticky) { + var found; + bidiOther = null; + for (var i = 0; i < order.length; ++i) { + var cur = order[i]; + if (cur.from < ch && cur.to > ch) { return i } + if (cur.to == ch) { + if (cur.from != cur.to && sticky == "before") { found = i; } + else { bidiOther = i; } + } + if (cur.from == ch) { + if (cur.from != cur.to && sticky != "before") { found = i; } + else { bidiOther = i; } + } + } + return found != null ? found : bidiOther + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN"; + // Character types for codepoints 0x600 to 0x6f9 + var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111"; + function charType(code) { + if (code <= 0xf7) { return lowTypes.charAt(code) } + else if (0x590 <= code && code <= 0x5f4) { return "R" } + else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) } + else if (0x6ee <= code && code <= 0x8ac) { return "r" } + else if (0x2000 <= code && code <= 0x200b) { return "w" } + else if (code == 0x200c) { return "b" } + else { return "L" } + } + + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; + + function BidiSpan(level, from, to) { + this.level = level; + this.from = from; this.to = to; + } + + return function(str, direction) { + var outerType = direction == "ltr" ? "L" : "R"; + + if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false } + var len = str.length, types = []; + for (var i = 0; i < len; ++i) + { types.push(charType(str.charCodeAt(i))); } + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) { + var type = types[i$1]; + if (type == "m") { types[i$1] = prev; } + else { prev = type; } + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) { + var type$1 = types[i$2]; + if (type$1 == "1" && cur == "r") { types[i$2] = "n"; } + else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) { + var type$2 = types[i$3]; + if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; } + else if (type$2 == "," && prev$1 == types[i$3+1] && + (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; } + prev$1 = type$2; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i$4 = 0; i$4 < len; ++i$4) { + var type$3 = types[i$4]; + if (type$3 == ",") { types[i$4] = "N"; } + else if (type$3 == "%") { + var end = (void 0); + for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {} + var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N"; + for (var j = i$4; j < end; ++j) { types[j] = replace; } + i$4 = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) { + var type$4 = types[i$5]; + if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; } + else if (isStrong.test(type$4)) { cur$1 = type$4; } + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i$6 = 0; i$6 < len; ++i$6) { + if (isNeutral.test(types[i$6])) { + var end$1 = (void 0); + for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {} + var before = (i$6 ? types[i$6-1] : outerType) == "L"; + var after = (end$1 < len ? types[end$1] : outerType) == "L"; + var replace$1 = before == after ? (before ? "L" : "R") : outerType; + for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; } + i$6 = end$1 - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], m; + for (var i$7 = 0; i$7 < len;) { + if (countsAsLeft.test(types[i$7])) { + var start = i$7; + for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {} + order.push(new BidiSpan(0, start, i$7)); + } else { + var pos = i$7, at = order.length, isRTL = direction == "rtl" ? 1 : 0; + for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {} + for (var j$2 = pos; j$2 < i$7;) { + if (countsAsNum.test(types[j$2])) { + if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); at += isRTL; } + var nstart = j$2; + for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {} + order.splice(at, 0, new BidiSpan(2, nstart, j$2)); + at += isRTL; + pos = j$2; + } else { ++j$2; } + } + if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); } + } + } + if (direction == "ltr") { + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift(new BidiSpan(0, 0, m[0].length)); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push(new BidiSpan(0, len - m[0].length, len)); + } + } + + return direction == "rtl" ? order.reverse() : order + } + })(); + + // Get the bidi ordering for the given line (and cache it). Returns + // false for lines that are fully left-to-right, and an array of + // BidiSpan objects otherwise. + function getOrder(line, direction) { + var order = line.order; + if (order == null) { order = line.order = bidiOrdering(line.text, direction); } + return order + } + + // EVENT HANDLING + + // Lightweight event framework. on/off also work on DOM nodes, + // registering native DOM handlers. + + var noHandlers = []; + + var on = function(emitter, type, f) { + if (emitter.addEventListener) { + emitter.addEventListener(type, f, false); + } else if (emitter.attachEvent) { + emitter.attachEvent("on" + type, f); + } else { + var map = emitter._handlers || (emitter._handlers = {}); + map[type] = (map[type] || noHandlers).concat(f); + } + }; + + function getHandlers(emitter, type) { + return emitter._handlers && emitter._handlers[type] || noHandlers + } + + function off(emitter, type, f) { + if (emitter.removeEventListener) { + emitter.removeEventListener(type, f, false); + } else if (emitter.detachEvent) { + emitter.detachEvent("on" + type, f); + } else { + var map = emitter._handlers, arr = map && map[type]; + if (arr) { + var index = indexOf(arr, f); + if (index > -1) + { map[type] = arr.slice(0, index).concat(arr.slice(index + 1)); } + } + } + } + + function signal(emitter, type /*, values...*/) { + var handlers = getHandlers(emitter, type); + if (!handlers.length) { return } + var args = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); } + } + + // The DOM events that CodeMirror handles can be overridden by + // registering a (non-DOM) handler on the editor for the event name, + // and preventDefault-ing the event in that handler. + function signalDOMEvent(cm, e, override) { + if (typeof e == "string") + { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; } + signal(cm, override || e.type, cm, e); + return e_defaultPrevented(e) || e.codemirrorIgnore + } + + function signalCursorActivity(cm) { + var arr = cm._handlers && cm._handlers.cursorActivity; + if (!arr) { return } + var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []); + for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1) + { set.push(arr[i]); } } + } + + function hasHandler(emitter, type) { + return getHandlers(emitter, type).length > 0 + } + + // Add on and off methods to a constructor's prototype, to make + // registering events on such objects more convenient. + function eventMixin(ctor) { + ctor.prototype.on = function(type, f) {on(this, type, f);}; + ctor.prototype.off = function(type, f) {off(this, type, f);}; + } + + // Due to the fact that we still support jurassic IE versions, some + // compatibility wrappers are needed. + + function e_preventDefault(e) { + if (e.preventDefault) { e.preventDefault(); } + else { e.returnValue = false; } + } + function e_stopPropagation(e) { + if (e.stopPropagation) { e.stopPropagation(); } + else { e.cancelBubble = true; } + } + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false + } + function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} + + function e_target(e) {return e.target || e.srcElement} + function e_button(e) { + var b = e.which; + if (b == null) { + if (e.button & 1) { b = 1; } + else if (e.button & 2) { b = 3; } + else if (e.button & 4) { b = 2; } + } + if (mac && e.ctrlKey && b == 1) { b = 3; } + return b + } + + // Detect drag-and-drop + var dragAndDrop = function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) { return false } + var div = elt('div'); + return "draggable" in div || "dragDrop" in div + }(); + + var zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b"); + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); + if (measure.firstChild.offsetHeight != 0) + { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); } + } + var node = zwspSupported ? elt("span", "\u200b") : + elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); + node.setAttribute("cm-text", ""); + return node + } + + // Feature-detect IE's crummy client rect reporting for bidi text + var badBidiRects; + function hasBadBidiRects(measure) { + if (badBidiRects != null) { return badBidiRects } + var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")); + var r0 = range(txt, 0, 1).getBoundingClientRect(); + var r1 = range(txt, 1, 2).getBoundingClientRect(); + removeChildren(measure); + if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780) + return badBidiRects = (r1.right - r0.right < 3) + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) { + var pos = 0, result = [], l = string.length; + while (pos <= l) { + var nl = string.indexOf("\n", pos); + if (nl == -1) { nl = string.length; } + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); + var rt = line.indexOf("\r"); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result + } : function (string) { return string.split(/\r\n?|\n/); }; + + var hasSelection = window.getSelection ? function (te) { + try { return te.selectionStart != te.selectionEnd } + catch(e) { return false } + } : function (te) { + var range; + try {range = te.ownerDocument.selection.createRange();} + catch(e) {} + if (!range || range.parentElement() != te) { return false } + return range.compareEndPoints("StartToEnd", range) != 0 + }; + + var hasCopyEvent = (function () { + var e = elt("div"); + if ("oncopy" in e) { return true } + e.setAttribute("oncopy", "return;"); + return typeof e.oncopy == "function" + })(); + + var badZoomedRects = null; + function hasBadZoomedRects(measure) { + if (badZoomedRects != null) { return badZoomedRects } + var node = removeChildrenAndAdd(measure, elt("span", "x")); + var normal = node.getBoundingClientRect(); + var fromRange = range(node, 0, 1).getBoundingClientRect(); + return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1 + } + + // Known modes, by name and by MIME + var modes = {}, mimeModes = {}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + function defineMode(name, mode) { + if (arguments.length > 2) + { mode.dependencies = Array.prototype.slice.call(arguments, 2); } + modes[name] = mode; + } + + function defineMIME(mime, spec) { + mimeModes[mime] = spec; + } + + // Given a MIME type, a {name, ...options} config object, or a name + // string, return a mode config object. + function resolveMode(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec]; + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name]; + if (typeof found == "string") { found = {name: found}; } + spec = createObj(found, spec); + spec.name = found.name; + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return resolveMode("application/xml") + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { + return resolveMode("application/json") + } + if (typeof spec == "string") { return {name: spec} } + else { return spec || {name: "null"} } + } + + // Given a mode spec (anything that resolveMode accepts), find and + // initialize an actual mode object. + function getMode(options, spec) { + spec = resolveMode(spec); + var mfactory = modes[spec.name]; + if (!mfactory) { return getMode(options, "text/plain") } + var modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name]; + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) { continue } + if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; } + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + if (spec.helperType) { modeObj.helperType = spec.helperType; } + if (spec.modeProps) { for (var prop$1 in spec.modeProps) + { modeObj[prop$1] = spec.modeProps[prop$1]; } } + + return modeObj + } + + // This can be used to attach properties to mode objects from + // outside the actual mode definition. + var modeExtensions = {}; + function extendMode(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); + copyObj(properties, exts); + } + + function copyState(mode, state) { + if (state === true) { return state } + if (mode.copyState) { return mode.copyState(state) } + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) { val = val.concat([]); } + nstate[n] = val; + } + return nstate + } + + // Given a mode and a state (for that mode), find the inner mode and + // state at the position that the state refers to. + function innerMode(mode, state) { + var info; + while (mode.innerMode) { + info = mode.innerMode(state); + if (!info || info.mode == mode) { break } + state = info.state; + mode = info.mode; + } + return info || {mode: mode, state: state} + } + + function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true + } + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + var StringStream = function(string, tabSize, lineOracle) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + this.lineStart = 0; + this.lineOracle = lineOracle; + }; + + StringStream.prototype.eol = function () {return this.pos >= this.string.length}; + StringStream.prototype.sol = function () {return this.pos == this.lineStart}; + StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined}; + StringStream.prototype.next = function () { + if (this.pos < this.string.length) + { return this.string.charAt(this.pos++) } + }; + StringStream.prototype.eat = function (match) { + var ch = this.string.charAt(this.pos); + var ok; + if (typeof match == "string") { ok = ch == match; } + else { ok = ch && (match.test ? match.test(ch) : match(ch)); } + if (ok) {++this.pos; return ch} + }; + StringStream.prototype.eatWhile = function (match) { + var start = this.pos; + while (this.eat(match)){} + return this.pos > start + }; + StringStream.prototype.eatSpace = function () { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this.pos; } + return this.pos > start + }; + StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;}; + StringStream.prototype.skipTo = function (ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) {this.pos = found; return true} + }; + StringStream.prototype.backUp = function (n) {this.pos -= n;}; + StringStream.prototype.column = function () { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); + this.lastColumnPos = this.start; + } + return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + }; + StringStream.prototype.indentation = function () { + return countColumn(this.string, null, this.tabSize) - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + }; + StringStream.prototype.match = function (pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; }; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) { this.pos += pattern.length; } + return true + } + } else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) { return null } + if (match && consume !== false) { this.pos += match[0].length; } + return match + } + }; + StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)}; + StringStream.prototype.hideFirstChars = function (n, inner) { + this.lineStart += n; + try { return inner() } + finally { this.lineStart -= n; } + }; + StringStream.prototype.lookAhead = function (n) { + var oracle = this.lineOracle; + return oracle && oracle.lookAhead(n) + }; + StringStream.prototype.baseToken = function () { + var oracle = this.lineOracle; + return oracle && oracle.baseToken(this.pos) + }; + + // Find the line object corresponding to the given line number. + function getLine(doc, n) { + n -= doc.first; + if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") } + var chunk = doc; + while (!chunk.lines) { + for (var i = 0;; ++i) { + var child = chunk.children[i], sz = child.chunkSize(); + if (n < sz) { chunk = child; break } + n -= sz; + } + } + return chunk.lines[n] + } + + // Get the part of a document between two positions, as an array of + // strings. + function getBetween(doc, start, end) { + var out = [], n = start.line; + doc.iter(start.line, end.line + 1, function (line) { + var text = line.text; + if (n == end.line) { text = text.slice(0, end.ch); } + if (n == start.line) { text = text.slice(start.ch); } + out.push(text); + ++n; + }); + return out + } + // Get the lines between from and to, as array of strings. + function getLines(doc, from, to) { + var out = []; + doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value + return out + } + + // Update the height of a line, propagating the height change + // upwards to parent nodes. + function updateLineHeight(line, height) { + var diff = height - line.height; + if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } } + } + + // Given a line object, find its line number by walking up through + // its parent links. + function lineNo(line) { + if (line.parent == null) { return null } + var cur = line.parent, no = indexOf(cur.lines, line); + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0;; ++i) { + if (chunk.children[i] == cur) { break } + no += chunk.children[i].chunkSize(); + } + } + return no + cur.first + } + + // Find the line at the given vertical position, using the height + // information in the document tree. + function lineAtHeight(chunk, h) { + var n = chunk.first; + outer: do { + for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) { + var child = chunk.children[i$1], ch = child.height; + if (h < ch) { chunk = child; continue outer } + h -= ch; + n += child.chunkSize(); + } + return n + } while (!chunk.lines) + var i = 0; + for (; i < chunk.lines.length; ++i) { + var line = chunk.lines[i], lh = line.height; + if (h < lh) { break } + h -= lh; + } + return n + i + } + + function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size} + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)) + } + + // A Pos instance represents a position within the text. + function Pos(line, ch, sticky) { + if ( sticky === void 0 ) sticky = null; + + if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) } + this.line = line; + this.ch = ch; + this.sticky = sticky; + } + + // Compare two positions, return 0 if they are the same, a negative + // number when a is less, and a positive number otherwise. + function cmp(a, b) { return a.line - b.line || a.ch - b.ch } + + function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 } + + function copyPos(x) {return Pos(x.line, x.ch)} + function maxPos(a, b) { return cmp(a, b) < 0 ? b : a } + function minPos(a, b) { return cmp(a, b) < 0 ? a : b } + + // Most of the external API clips given positions to make sure they + // actually exist within the document. + function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))} + function clipPos(doc, pos) { + if (pos.line < doc.first) { return Pos(doc.first, 0) } + var last = doc.first + doc.size - 1; + if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) } + return clipToLen(pos, getLine(doc, pos.line).text.length) + } + function clipToLen(pos, linelen) { + var ch = pos.ch; + if (ch == null || ch > linelen) { return Pos(pos.line, linelen) } + else if (ch < 0) { return Pos(pos.line, 0) } + else { return pos } + } + function clipPosArray(doc, array) { + var out = []; + for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); } + return out + } + + var SavedContext = function(state, lookAhead) { + this.state = state; + this.lookAhead = lookAhead; + }; + + var Context = function(doc, state, line, lookAhead) { + this.state = state; + this.doc = doc; + this.line = line; + this.maxLookAhead = lookAhead || 0; + this.baseTokens = null; + this.baseTokenPos = 1; + }; + + Context.prototype.lookAhead = function (n) { + var line = this.doc.getLine(this.line + n); + if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; } + return line + }; + + Context.prototype.baseToken = function (n) { + if (!this.baseTokens) { return null } + while (this.baseTokens[this.baseTokenPos] <= n) + { this.baseTokenPos += 2; } + var type = this.baseTokens[this.baseTokenPos + 1]; + return {type: type && type.replace(/( |^)overlay .*/, ""), + size: this.baseTokens[this.baseTokenPos] - n} + }; + + Context.prototype.nextLine = function () { + this.line++; + if (this.maxLookAhead > 0) { this.maxLookAhead--; } + }; + + Context.fromSaved = function (doc, saved, line) { + if (saved instanceof SavedContext) + { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) } + else + { return new Context(doc, copyState(doc.mode, saved), line) } + }; + + Context.prototype.save = function (copy) { + var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state; + return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state + }; + + + // Compute a style array (an array starting with a mode generation + // -- for invalidation -- followed by pairs of end positions and + // style strings), which is used to highlight the tokens on the + // line. + function highlightLine(cm, line, context, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen], lineClasses = {}; + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); }, + lineClasses, forceToEnd); + var state = context.state; + + // Run overlays, adjust style array. + var loop = function ( o ) { + context.baseTokens = st; + var overlay = cm.state.overlays[o], i = 1, at = 0; + context.state = true; + runMode(cm, line.text, overlay.mode, context, function (end, style) { + var start = i; + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i]; + if (i_end > end) + { st.splice(i, 1, end, st[i+1], i_end); } + i += 2; + at = Math.min(end, i_end); + } + if (!style) { return } + if (overlay.opaque) { + st.splice(start, i - start, end, "overlay " + style); + i = start + 2; + } else { + for (; start < i; start += 2) { + var cur = st[start+1]; + st[start+1] = (cur ? cur + " " : "") + "overlay " + style; + } + } + }, lineClasses); + context.state = state; + context.baseTokens = null; + context.baseTokenPos = 1; + }; + + for (var o = 0; o < cm.state.overlays.length; ++o) loop( o ); + + return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null} + } + + function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + var context = getContextBefore(cm, lineNo(line)); + var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state); + var result = highlightLine(cm, line, context); + if (resetState) { context.state = resetState; } + line.stateAfter = context.save(!resetState); + line.styles = result.styles; + if (result.classes) { line.styleClasses = result.classes; } + else if (line.styleClasses) { line.styleClasses = null; } + if (updateFrontier === cm.doc.highlightFrontier) + { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); } + } + return line.styles + } + + function getContextBefore(cm, n, precise) { + var doc = cm.doc, display = cm.display; + if (!doc.mode.startState) { return new Context(doc, true, n) } + var start = findStartLine(cm, n, precise); + var saved = start > doc.first && getLine(doc, start - 1).stateAfter; + var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start); + + doc.iter(start, n, function (line) { + processLine(cm, line.text, context); + var pos = context.line; + line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null; + context.nextLine(); + }); + if (precise) { doc.modeFrontier = context.line; } + return context + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. Used for lines that + // aren't currently visible. + function processLine(cm, text, context, startAt) { + var mode = cm.doc.mode; + var stream = new StringStream(text, cm.options.tabSize, context); + stream.start = stream.pos = startAt || 0; + if (text == "") { callBlankLine(mode, context.state); } + while (!stream.eol()) { + readToken(mode, stream, context.state); + stream.start = stream.pos; + } + } + + function callBlankLine(mode, state) { + if (mode.blankLine) { return mode.blankLine(state) } + if (!mode.innerMode) { return } + var inner = innerMode(mode, state); + if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) } + } + + function readToken(mode, stream, state, inner) { + for (var i = 0; i < 10; i++) { + if (inner) { inner[0] = innerMode(mode, state).mode; } + var style = mode.token(stream, state); + if (stream.pos > stream.start) { return style } + } + throw new Error("Mode " + mode.name + " failed to advance stream.") + } + + var Token = function(stream, type, state) { + this.start = stream.start; this.end = stream.pos; + this.string = stream.current(); + this.type = type || null; + this.state = state; + }; + + // Utility for getTokenAt and getLineTokens + function takeToken(cm, pos, precise, asArray) { + var doc = cm.doc, mode = doc.mode, style; + pos = clipPos(doc, pos); + var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise); + var stream = new StringStream(line.text, cm.options.tabSize, context), tokens; + if (asArray) { tokens = []; } + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos; + style = readToken(mode, stream, context.state); + if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); } + } + return asArray ? tokens : new Token(stream, style, context.state) + } + + function extractLineClasses(type, output) { + if (type) { for (;;) { + var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/); + if (!lineClass) { break } + type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length); + var prop = lineClass[1] ? "bgClass" : "textClass"; + if (output[prop] == null) + { output[prop] = lineClass[2]; } + else if (!(new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)")).test(output[prop])) + { output[prop] += " " + lineClass[2]; } + } } + return type + } + + // Run the given mode's parser over a line, calling f for each token. + function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) { + var flattenSpans = mode.flattenSpans; + if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; } + var curStart = 0, curStyle = null; + var stream = new StringStream(text, cm.options.tabSize, context), style; + var inner = cm.options.addModeClass && [null]; + if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); } + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false; + if (forceToEnd) { processLine(cm, text, context, stream.pos); } + stream.pos = text.length; + style = null; + } else { + style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses); + } + if (inner) { + var mName = inner[0].name; + if (mName) { style = "m-" + (style ? mName + " " + style : mName); } + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 5000); + f(curStart, curStyle); + } + curStyle = style; + } + stream.start = stream.pos; + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 + // characters, and returns inaccurate measurements in nodes + // starting around 5000 chars. + var pos = Math.min(stream.pos, curStart + 5000); + f(pos, curStyle); + curStart = pos; + } + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, minline, doc = cm.doc; + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); + for (var search = n; search > lim; --search) { + if (search <= doc.first) { return doc.first } + var line = getLine(doc, search - 1), after = line.stateAfter; + if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) + { return search } + var indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline + } + + function retreatFrontier(doc, n) { + doc.modeFrontier = Math.min(doc.modeFrontier, n); + if (doc.highlightFrontier < n - 10) { return } + var start = doc.first; + for (var line = n - 1; line > start; line--) { + var saved = getLine(doc, line).stateAfter; + // change is on 3 + // state on line 1 looked ahead 2 -- so saw 3 + // test 1 + 2 < 3 should cover this + if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) { + start = line + 1; + break + } + } + doc.highlightFrontier = Math.min(doc.highlightFrontier, start); + } + + // Optimize some code when these features are not used. + var sawReadOnlySpans = false, sawCollapsedSpans = false; + + function seeReadOnlySpans() { + sawReadOnlySpans = true; + } + + function seeCollapsedSpans() { + sawCollapsedSpans = true; + } + + // TEXTMARKER SPANS + + function MarkedSpan(marker, from, to) { + this.marker = marker; + this.from = from; this.to = to; + } + + // Search an array of spans for a span matching the given marker. + function getMarkedSpanFor(spans, marker) { + if (spans) { for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.marker == marker) { return span } + } } + } + + // Remove a span from an array, returning undefined if no spans are + // left (we don't store arrays for lines without spans). + function removeMarkedSpan(spans, span) { + var r; + for (var i = 0; i < spans.length; ++i) + { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } } + return r + } + + // Add a span to a line. + function addMarkedSpan(line, span, op) { + var inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet)); + if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) { + line.markedSpans.push(span); + } else { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + if (inThisOp) { inThisOp.add(line.markedSpans); } + } + span.marker.attachLine(line); + } + + // Used for the algorithm that adjusts markers for a change in the + // document. These functions cut an array of spans at a given + // character position, returning an array of remaining chunks (or + // undefined if nothing remains). + function markedSpansBefore(old, startCh, isInsert) { + var nw; + if (old) { for (var i = 0; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) + ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)); + } + } } + return nw + } + function markedSpansAfter(old, endCh, isInsert) { + var nw; + if (old) { for (var i = 0; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh) + ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, + span.to == null ? null : span.to - endCh)); + } + } } + return nw + } + + // Given a change object, compute the new set of marker spans that + // cover the line in which the change took place. Removes spans + // entirely within the change, reconnects spans belonging to the + // same marker that appear on both sides of the change, and cuts off + // spans partially within the change. Returns an array of span + // arrays with one element for each line in (after) the change. + function stretchSpansOverChange(doc, change) { + if (change.full) { return null } + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; + if (!oldFirst && !oldLast) { return null } + + var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0; + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert); + var last = markedSpansAfter(oldLast, endCh, isInsert); + + // Next, merge those two ends + var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) { span.to = startCh; } + else if (sameLine) { span.to = found.to == null ? null : found.to + offset; } + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i$1 = 0; i$1 < last.length; ++i$1) { + var span$1 = last[i$1]; + if (span$1.to != null) { span$1.to += offset; } + if (span$1.from == null) { + var found$1 = getMarkedSpanFor(first, span$1.marker); + if (!found$1) { + span$1.from = offset; + if (sameLine) { (first || (first = [])).push(span$1); } + } + } else { + span$1.from += offset; + if (sameLine) { (first || (first = [])).push(span$1); } + } + } + } + // Make sure we didn't create any zero-length spans + if (first) { first = clearEmptySpans(first); } + if (last && last != first) { last = clearEmptySpans(last); } + + var newMarkers = [first]; + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, gapMarkers; + if (gap > 0 && first) + { for (var i$2 = 0; i$2 < first.length; ++i$2) + { if (first[i$2].to == null) + { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } } + for (var i$3 = 0; i$3 < gap; ++i$3) + { newMarkers.push(gapMarkers); } + newMarkers.push(last); + } + return newMarkers + } + + // Remove spans that are empty and don't have a clearWhenEmpty + // option of false. + function clearEmptySpans(spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) + { spans.splice(i--, 1); } + } + if (!spans.length) { return null } + return spans + } + + // Used to 'clip' out readOnly ranges when making a change. + function removeReadOnlyRanges(doc, from, to) { + var markers = null; + doc.iter(from.line, to.line + 1, function (line) { + if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) + { (markers || (markers = [])).push(mark); } + } } + }); + if (!markers) { return null } + var parts = [{from: from, to: to}]; + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], m = mk.find(0); + for (var j = 0; j < parts.length; ++j) { + var p = parts[j]; + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue } + var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to); + if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) + { newParts.push({from: p.from, to: m.from}); } + if (dto > 0 || !mk.inclusiveRight && !dto) + { newParts.push({from: m.to, to: p.to}); } + parts.splice.apply(parts, newParts); + j += newParts.length - 3; + } + } + return parts + } + + // Connect or disconnect spans from a line. + function detachMarkedSpans(line) { + var spans = line.markedSpans; + if (!spans) { return } + for (var i = 0; i < spans.length; ++i) + { spans[i].marker.detachLine(line); } + line.markedSpans = null; + } + function attachMarkedSpans(line, spans) { + if (!spans) { return } + for (var i = 0; i < spans.length; ++i) + { spans[i].marker.attachLine(line); } + line.markedSpans = spans; + } + + // Helpers used when computing which overlapping collapsed span + // counts as the larger one. + function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 } + function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 } + + // Returns a number indicating which of two overlapping collapsed + // spans is larger (and thus includes the other). Falls back to + // comparing ids when the spans cover exactly the same range. + function compareCollapsedMarkers(a, b) { + var lenDiff = a.lines.length - b.lines.length; + if (lenDiff != 0) { return lenDiff } + var aPos = a.find(), bPos = b.find(); + var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b); + if (fromCmp) { return -fromCmp } + var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b); + if (toCmp) { return toCmp } + return b.id - a.id + } + + // Find out whether a line ends or starts in a collapsed span. If + // so, return the marker for that span. + function collapsedSpanAtSide(line, start) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) + { found = sp.marker; } + } } + return found + } + function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) } + function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) } + + function collapsedSpanAround(line, ch) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) { for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; } + } } + return found + } + + // Test whether there exists a collapsed span that partially + // overlaps (covers the start or end, but not both) of a new span. + // Such overlap is not allowed. + function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + var line = getLine(doc, lineNo); + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) { for (var i = 0; i < sps.length; ++i) { + var sp = sps[i]; + if (!sp.marker.collapsed) { continue } + var found = sp.marker.find(0); + var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker); + var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker); + if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue } + if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || + fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) + { return true } + } } + } + + // A visual line is a line as drawn on the screen. Folding, for + // example, can cause multiple logical lines to appear on the same + // visual line. This finds the start of the visual line that the + // given line is part of (usually that is the line itself). + function visualLine(line) { + var merged; + while (merged = collapsedSpanAtStart(line)) + { line = merged.find(-1, true).line; } + return line + } + + function visualLineEnd(line) { + var merged; + while (merged = collapsedSpanAtEnd(line)) + { line = merged.find(1, true).line; } + return line + } + + // Returns an array of logical lines that continue the visual line + // started by the argument, or undefined if there are no such lines. + function visualLineContinued(line) { + var merged, lines; + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line + ;(lines || (lines = [])).push(line); + } + return lines + } + + // Get the line number of the start of the visual line that the + // given line number is part of. + function visualLineNo(doc, lineN) { + var line = getLine(doc, lineN), vis = visualLine(line); + if (line == vis) { return lineN } + return lineNo(vis) + } + + // Get the line number of the start of the next visual line after + // the given line. + function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) { return lineN } + var line = getLine(doc, lineN), merged; + if (!lineIsHidden(doc, line)) { return lineN } + while (merged = collapsedSpanAtEnd(line)) + { line = merged.find(1, true).line; } + return lineNo(line) + 1 + } + + // Compute whether a line is hidden. Lines count as hidden when they + // are part of a visual line that starts with another line, or when + // they are entirely covered by collapsed, non-widget span. + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) { continue } + if (sp.from == null) { return true } + if (sp.marker.widgetNode) { continue } + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) + { return true } + } } + } + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find(1, true); + return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)) + } + if (span.marker.inclusiveRight && span.to == line.text.length) + { return true } + for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && + (sp.to == null || sp.to != span.from) && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp)) { return true } + } + } + + // Find the height above the given line. + function heightAtLine(lineObj) { + lineObj = visualLine(lineObj); + + var h = 0, chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i]; + if (line == lineObj) { break } + else { h += line.height; } + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i$1 = 0; i$1 < p.children.length; ++i$1) { + var cur = p.children[i$1]; + if (cur == chunk) { break } + else { h += cur.height; } + } + } + return h + } + + // Compute the character length of a line, taking into account + // collapsed ranges (see markText) that might hide parts, and join + // other lines onto it. + function lineLength(line) { + if (line.height == 0) { return 0 } + var len = line.text.length, merged, cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(0, true); + cur = found.from.line; + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found$1 = merged.find(0, true); + len -= cur.text.length - found$1.from.ch; + cur = found$1.to.line; + len += cur.text.length - found$1.to.ch; + } + return len + } + + // Find the longest line in the document. + function findMaxLine(cm) { + var d = cm.display, doc = cm.doc; + d.maxLine = getLine(doc, doc.first); + d.maxLineLength = lineLength(d.maxLine); + d.maxLineChanged = true; + doc.iter(function (line) { + var len = lineLength(line); + if (len > d.maxLineLength) { + d.maxLineLength = len; + d.maxLine = line; + } + }); + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = function(text, markedSpans, estimateHeight) { + this.text = text; + attachMarkedSpans(this, markedSpans); + this.height = estimateHeight ? estimateHeight(this) : 1; + }; + + Line.prototype.lineNo = function () { return lineNo(this) }; + eventMixin(Line); + + // Change the content (text, markers) of a line. Automatically + // invalidates cached information and tries to re-estimate the + // line's height. + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text; + if (line.stateAfter) { line.stateAfter = null; } + if (line.styles) { line.styles = null; } + if (line.order != null) { line.order = null; } + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + var estHeight = estimateHeight ? estimateHeight(line) : 1; + if (estHeight != line.height) { updateLineHeight(line, estHeight); } + } + + // Detach a line from the document tree and its markers. + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); + } + + // Convert a style as returned by a mode (either null, or a string + // containing one or more styles) to a CSS style. This is cached, + // and also looks for line-wide styles. + var styleToClassCache = {}, styleToClassCacheWithMode = {}; + function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) { return null } + var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache; + return cache[style] || + (cache[style] = style.replace(/\S+/g, "cm-$&")) + } + + // Render the DOM representation of the text of a line. Also builds + // up a 'line map', which points at the DOM nodes that represent + // specific stretches of text, and is used by the measuring code. + // The returned object contains the DOM node, this map, and + // information about line-wide styles that were set by the mode. + function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null); + var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content, + col: 0, pos: 0, cm: cm, + trailingSpace: false, + splitSpaces: cm.getOption("lineWrapping")}; + lineView.measure = {}; + + // Iterate over the logical lines that make up this visual line. + for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0); + builder.pos = 0; + builder.addToken = buildToken; + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) + { builder.addToken = buildTokenBadBidi(builder.addToken, order); } + builder.map = []; + var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line); + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)); + if (line.styleClasses) { + if (line.styleClasses.bgClass) + { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); } + if (line.styleClasses.textClass) + { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); } + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) + { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); } + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map; + lineView.measure.cache = {}; + } else { + (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map) + ;(lineView.measure.caches || (lineView.measure.caches = [])).push({}); + } + } + + // See issue #2901 + if (webkit) { + var last = builder.content.lastChild; + if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab"))) + { builder.content.className = "cm-tab-wrap-hack"; } + } + + signal(cm, "renderLine", cm, lineView.line, builder.pre); + if (builder.pre.className) + { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); } + + return builder + } + + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar"); + token.title = "\\u" + ch.charCodeAt(0).toString(16); + token.setAttribute("aria-label", token.title); + return token + } + + // Build up the DOM representation for a single token, and add it to + // the line map. Takes care to render special characters separately. + function buildToken(builder, text, style, startStyle, endStyle, css, attributes) { + if (!text) { return } + var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text; + var special = builder.cm.state.specialChars, mustWrap = false; + var content; + if (!special.test(text)) { + builder.col += text.length; + content = document.createTextNode(displayText); + builder.map.push(builder.pos, builder.pos + text.length, content); + if (ie && ie_version < 9) { mustWrap = true; } + builder.pos += text.length; + } else { + content = document.createDocumentFragment(); + var pos = 0; + while (true) { + special.lastIndex = pos; + var m = special.exec(text); + var skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + var txt = document.createTextNode(displayText.slice(pos, pos + skipped)); + if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); } + else { content.appendChild(txt); } + builder.map.push(builder.pos, builder.pos + skipped, txt); + builder.col += skipped; + builder.pos += skipped; + } + if (!m) { break } + pos += skipped + 1; + var txt$1 = (void 0); + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; + txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); + txt$1.setAttribute("role", "presentation"); + txt$1.setAttribute("cm-text", "\t"); + builder.col += tabWidth; + } else if (m[0] == "\r" || m[0] == "\n") { + txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar")); + txt$1.setAttribute("cm-text", m[0]); + builder.col += 1; + } else { + txt$1 = builder.cm.options.specialCharPlaceholder(m[0]); + txt$1.setAttribute("cm-text", m[0]); + if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); } + else { content.appendChild(txt$1); } + builder.col += 1; + } + builder.map.push(builder.pos, builder.pos + 1, txt$1); + builder.pos++; + } + } + builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32; + if (style || startStyle || endStyle || mustWrap || css || attributes) { + var fullStyle = style || ""; + if (startStyle) { fullStyle += startStyle; } + if (endStyle) { fullStyle += endStyle; } + var token = elt("span", [content], fullStyle, css); + if (attributes) { + for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") + { token.setAttribute(attr, attributes[attr]); } } + } + return builder.content.appendChild(token) + } + builder.content.appendChild(content); + } + + // Change some spaces to NBSP to prevent the browser from collapsing + // trailing spaces at the end of a line when rendering text (issue #1362). + function splitSpaces(text, trailingBefore) { + if (text.length > 1 && !/ /.test(text)) { return text } + var spaceBefore = trailingBefore, result = ""; + for (var i = 0; i < text.length; i++) { + var ch = text.charAt(i); + if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32)) + { ch = "\u00a0"; } + result += ch; + spaceBefore = ch == " "; + } + return result + } + + // Work around nonsense dimensions being reported for stretches of + // right-to-left text. + function buildTokenBadBidi(inner, order) { + return function (builder, text, style, startStyle, endStyle, css, attributes) { + style = style ? style + " cm-force-border" : "cm-force-border"; + var start = builder.pos, end = start + text.length; + for (;;) { + // Find the part that overlaps with the start of this text + var part = (void 0); + for (var i = 0; i < order.length; i++) { + part = order[i]; + if (part.to > start && part.from <= start) { break } + } + if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) } + inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes); + startStyle = null; + text = text.slice(part.to - start); + start = part.to; + } + } + } + + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.widgetNode; + if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); } + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) + { widget = builder.content.appendChild(document.createElement("span")); } + widget.setAttribute("cm-marker", marker.id); + } + if (widget) { + builder.cm.display.input.setUneditable(widget); + builder.content.appendChild(widget); + } + builder.pos += size; + builder.trailingSpace = false; + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, allText = line.text, at = 0; + if (!spans) { + for (var i$1 = 1; i$1 < styles.length; i$1+=2) + { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); } + return + } + + var len = allText.length, pos = 0, i = 1, text = "", style, css; + var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes; + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = css = ""; + attributes = null; + collapsed = null; nextChange = Infinity; + var foundBookmarks = [], endStyles = (void 0); + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], m = sp.marker; + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m); + } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to; + spanEndStyle = ""; + } + if (m.className) { spanStyle += " " + m.className; } + if (m.css) { css = (css ? css + ";" : "") + m.css; } + if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; } + if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); } + // support for the old title property + // https://github.com/codemirror/CodeMirror/pull/5673 + if (m.title) { (attributes || (attributes = {})).title = m.title; } + if (m.attributes) { + for (var attr in m.attributes) + { (attributes || (attributes = {}))[attr] = m.attributes[attr]; } + } + if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) + { collapsed = sp; } + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + } + if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) + { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } } + + if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) + { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, + collapsed.marker, collapsed.from == null); + if (collapsed.to == null) { return } + if (collapsed.to == pos) { collapsed = false; } + } + } + if (pos >= len) { break } + + var upto = Math.min(len, nextChange); + while (true) { + if (text) { + var end = pos + text.length; + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, + spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes); + } + if (end >= upto) {text = text.slice(upto - pos); pos = upto; break} + pos = end; + spanStartStyle = ""; + } + text = allText.slice(at, at = styles[i++]); + style = interpretTokenStyle(styles[i++], builder.cm.options); + } + } + } + + + // These objects are used to represent the visible (currently drawn) + // part of the document. A LineView may correspond to multiple + // logical lines, if those are connected by collapsed ranges. + function LineView(doc, line, lineN) { + // The starting line + this.line = line; + // Continuing lines, if any + this.rest = visualLineContinued(line); + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1; + this.node = this.text = null; + this.hidden = lineIsHidden(doc, line); + } + + // Create a range of LineView objects for the given lines. + function buildViewArray(cm, from, to) { + var array = [], nextPos; + for (var pos = from; pos < to; pos = nextPos) { + var view = new LineView(cm.doc, getLine(cm.doc, pos), pos); + nextPos = pos + view.size; + array.push(view); + } + return array + } + + var operationGroup = null; + + function pushOperation(op) { + if (operationGroup) { + operationGroup.ops.push(op); + } else { + op.ownsGroup = operationGroup = { + ops: [op], + delayedCallbacks: [] + }; + } + } + + function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + var callbacks = group.delayedCallbacks, i = 0; + do { + for (; i < callbacks.length; i++) + { callbacks[i].call(null); } + for (var j = 0; j < group.ops.length; j++) { + var op = group.ops[j]; + if (op.cursorActivityHandlers) + { while (op.cursorActivityCalled < op.cursorActivityHandlers.length) + { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } } + } + } while (i < callbacks.length) + } + + function finishOperation(op, endCb) { + var group = op.ownsGroup; + if (!group) { return } + + try { fireCallbacksForOps(group); } + finally { + operationGroup = null; + endCb(group); + } + } + + var orphanDelayedCallbacks = null; + + // Often, we want to signal events at a point where we are in the + // middle of some work, but don't want the handler to start calling + // other methods on the editor, which might be in an inconsistent + // state or simply not expect any other events to happen. + // signalLater looks whether there are any handlers, and schedules + // them to be executed when the last operation ends, or, if no + // operation is active, when a timeout fires. + function signalLater(emitter, type /*, values...*/) { + var arr = getHandlers(emitter, type); + if (!arr.length) { return } + var args = Array.prototype.slice.call(arguments, 2), list; + if (operationGroup) { + list = operationGroup.delayedCallbacks; + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks; + } else { + list = orphanDelayedCallbacks = []; + setTimeout(fireOrphanDelayed, 0); + } + var loop = function ( i ) { + list.push(function () { return arr[i].apply(null, args); }); + }; + + for (var i = 0; i < arr.length; ++i) + loop( i ); + } + + function fireOrphanDelayed() { + var delayed = orphanDelayedCallbacks; + orphanDelayedCallbacks = null; + for (var i = 0; i < delayed.length; ++i) { delayed[i](); } + } + + // When an aspect of a line changes, a string is added to + // lineView.changes. This updates the relevant part of the line's + // DOM structure. + function updateLineForChanges(cm, lineView, lineN, dims) { + for (var j = 0; j < lineView.changes.length; j++) { + var type = lineView.changes[j]; + if (type == "text") { updateLineText(cm, lineView); } + else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); } + else if (type == "class") { updateLineClasses(cm, lineView); } + else if (type == "widget") { updateLineWidgets(cm, lineView, dims); } + } + lineView.changes = null; + } + + // Lines with gutter elements, widgets or a background class need to + // be wrapped, and have the extra elements added to the wrapper div + function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative"); + if (lineView.text.parentNode) + { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); } + lineView.node.appendChild(lineView.text); + if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; } + } + return lineView.node + } + + function updateLineBackground(cm, lineView) { + var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass; + if (cls) { cls += " CodeMirror-linebackground"; } + if (lineView.background) { + if (cls) { lineView.background.className = cls; } + else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; } + } else if (cls) { + var wrap = ensureLineWrapped(lineView); + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild); + cm.display.input.setUneditable(lineView.background); + } + } + + // Wrapper around buildLineContent which will reuse the structure + // in display.externalMeasured when possible. + function getLineContent(cm, lineView) { + var ext = cm.display.externalMeasured; + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null; + lineView.measure = ext.measure; + return ext.built + } + return buildLineContent(cm, lineView) + } + + // Redraw the line's text. Interacts with the background and text + // classes because the mode may output tokens that influence these + // classes. + function updateLineText(cm, lineView) { + var cls = lineView.text.className; + var built = getLineContent(cm, lineView); + if (lineView.text == lineView.node) { lineView.node = built.pre; } + lineView.text.parentNode.replaceChild(built.pre, lineView.text); + lineView.text = built.pre; + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass; + lineView.textClass = built.textClass; + updateLineClasses(cm, lineView); + } else if (cls) { + lineView.text.className = cls; + } + } + + function updateLineClasses(cm, lineView) { + updateLineBackground(cm, lineView); + if (lineView.line.wrapClass) + { ensureLineWrapped(lineView).className = lineView.line.wrapClass; } + else if (lineView.node != lineView.text) + { lineView.node.className = ""; } + var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass; + lineView.text.className = textClass || ""; + } + + function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter); + lineView.gutter = null; + } + if (lineView.gutterBackground) { + lineView.node.removeChild(lineView.gutterBackground); + lineView.gutterBackground = null; + } + if (lineView.line.gutterClass) { + var wrap = ensureLineWrapped(lineView); + lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, + ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px")); + cm.display.input.setUneditable(lineView.gutterBackground); + wrap.insertBefore(lineView.gutterBackground, lineView.text); + } + var markers = lineView.line.gutterMarkers; + if (cm.options.lineNumbers || markers) { + var wrap$1 = ensureLineWrapped(lineView); + var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px")); + gutterWrap.setAttribute("aria-hidden", "true"); + cm.display.input.setUneditable(gutterWrap); + wrap$1.insertBefore(gutterWrap, lineView.text); + if (lineView.line.gutterClass) + { gutterWrap.className += " " + lineView.line.gutterClass; } + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) + { lineView.lineNumber = gutterWrap.appendChild( + elt("div", lineNumberFor(cm.options, lineN), + "CodeMirror-linenumber CodeMirror-gutter-elt", + ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); } + if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) { + var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id]; + if (found) + { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", + ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); } + } } + } + } + + function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) { lineView.alignable = null; } + var isWidget = classTest("CodeMirror-linewidget"); + for (var node = lineView.node.firstChild, next = (void 0); node; node = next) { + next = node.nextSibling; + if (isWidget.test(node.className)) { lineView.node.removeChild(node); } + } + insertLineWidgets(cm, lineView, dims); + } + + // Build a line's DOM representation from scratch + function buildLineElement(cm, lineView, lineN, dims) { + var built = getLineContent(cm, lineView); + lineView.text = lineView.node = built.pre; + if (built.bgClass) { lineView.bgClass = built.bgClass; } + if (built.textClass) { lineView.textClass = built.textClass; } + + updateLineClasses(cm, lineView); + updateLineGutter(cm, lineView, lineN, dims); + insertLineWidgets(cm, lineView, dims); + return lineView.node + } + + // A lineView may contain multiple logical lines (when merged by + // collapsed spans). The widgets for all of them need to be drawn. + function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true); + if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++) + { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } } + } + + function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) { return } + var wrap = ensureLineWrapped(lineView); + for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : "")); + if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); } + positionLineWidget(widget, node, lineView, dims); + cm.display.input.setUneditable(node); + if (allowAbove && widget.above) + { wrap.insertBefore(node, lineView.gutter || lineView.text); } + else + { wrap.appendChild(node); } + signalLater(widget, "redraw"); + } + } + + function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + (lineView.alignable || (lineView.alignable = [])).push(node); + var width = dims.wrapperWidth; + node.style.left = dims.fixedPos + "px"; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = dims.gutterTotalWidth + "px"; + } + node.style.width = width + "px"; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = "relative"; + if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; } + } + } + + function widgetHeight(widget) { + if (widget.height != null) { return widget.height } + var cm = widget.doc.cm; + if (!cm) { return 0 } + if (!contains(document.body, widget.node)) { + var parentStyle = "position: relative;"; + if (widget.coverGutter) + { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; } + if (widget.noHScroll) + { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; } + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)); + } + return widget.height = widget.node.parentNode.offsetHeight + } + + // Return true when the given mouse event happened in a widget + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || + (n.parentNode == display.sizer && n != display.mover)) + { return true } + } + } + + // POSITION MEASUREMENT + + function paddingTop(display) {return display.lineSpace.offsetTop} + function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight} + function paddingH(display) { + if (display.cachedPaddingH) { return display.cachedPaddingH } + var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like")); + var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle; + var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)}; + if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; } + return data + } + + function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth } + function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth + } + function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight + } + + // Ensure the lineView.wrapping.heights array is populated. This is + // an array of bottom offsets for the lines that make up a drawn + // line. When lineWrapping is on, there might be more than one + // height. + function ensureLineHeights(cm, lineView, rect) { + var wrapping = cm.options.lineWrapping; + var curWidth = wrapping && displayWidth(cm); + if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { + var heights = lineView.measure.heights = []; + if (wrapping) { + lineView.measure.width = curWidth; + var rects = lineView.text.firstChild.getClientRects(); + for (var i = 0; i < rects.length - 1; i++) { + var cur = rects[i], next = rects[i + 1]; + if (Math.abs(cur.bottom - next.bottom) > 2) + { heights.push((cur.bottom + next.top) / 2 - rect.top); } + } + } + heights.push(rect.bottom - rect.top); + } + } + + // Find a line map (mapping character offsets to text nodes) and a + // measurement cache for the given line number. (A line view might + // contain multiple lines when collapsed ranges are present.) + function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) + { return {map: lineView.measure.map, cache: lineView.measure.cache} } + if (lineView.rest) { + for (var i = 0; i < lineView.rest.length; i++) + { if (lineView.rest[i] == line) + { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } } + for (var i$1 = 0; i$1 < lineView.rest.length; i$1++) + { if (lineNo(lineView.rest[i$1]) > lineN) + { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } } + } + } + + // Render a line into the hidden node display.externalMeasured. Used + // when measurement is needed for a line that's not in the viewport. + function updateExternalMeasurement(cm, line) { + line = visualLine(line); + var lineN = lineNo(line); + var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN); + view.lineN = lineN; + var built = view.built = buildLineContent(cm, view); + view.text = built.pre; + removeChildrenAndAdd(cm.display.lineMeasure, built.pre); + return view + } + + // Get a {top, bottom, left, right} box (in line-local coordinates) + // for a given character. + function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias) + } + + // Find a line view that corresponds to the given line number. + function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) + { return cm.display.view[findViewIndex(cm, lineN)] } + var ext = cm.display.externalMeasured; + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) + { return ext } + } + + // Measurement can be split in two steps, the set-up work that + // applies to the whole line, and the measurement of the actual + // character. Functions like coordsChar, that need to do a lot of + // measurements in a row, can thus ensure that the set-up work is + // only done once. + function prepareMeasureForLine(cm, line) { + var lineN = lineNo(line); + var view = findViewForLine(cm, lineN); + if (view && !view.text) { + view = null; + } else if (view && view.changes) { + updateLineForChanges(cm, view, lineN, getDimensions(cm)); + cm.curOp.forceUpdate = true; + } + if (!view) + { view = updateExternalMeasurement(cm, line); } + + var info = mapFromLineView(view, line, lineN); + return { + line: line, view: view, rect: null, + map: info.map, cache: info.cache, before: info.before, + hasHeights: false + } + } + + // Given a prepared measurement object, measures the position of an + // actual character (or fetches it from the cache). + function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) { ch = -1; } + var key = ch + (bias || ""), found; + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key]; + } else { + if (!prepared.rect) + { prepared.rect = prepared.view.text.getBoundingClientRect(); } + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect); + prepared.hasHeights = true; + } + found = measureCharInner(cm, prepared, ch, bias); + if (!found.bogus) { prepared.cache[key] = found; } + } + return {left: found.left, right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom} + } + + var nullRect = {left: 0, right: 0, top: 0, bottom: 0}; + + function nodeAndOffsetInLineMap(map, ch, bias) { + var node, start, end, collapse, mStart, mEnd; + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (var i = 0; i < map.length; i += 3) { + mStart = map[i]; + mEnd = map[i + 1]; + if (ch < mStart) { + start = 0; end = 1; + collapse = "left"; + } else if (ch < mEnd) { + start = ch - mStart; + end = start + 1; + } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { + end = mEnd - mStart; + start = end - 1; + if (ch >= mEnd) { collapse = "right"; } + } + if (start != null) { + node = map[i + 2]; + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) + { collapse = bias; } + if (bias == "left" && start == 0) + { while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2]; + collapse = "left"; + } } + if (bias == "right" && start == mEnd - mStart) + { while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { + node = map[(i += 3) + 2]; + collapse = "right"; + } } + break + } + } + return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd} + } + + function getUsefulRect(rects, bias) { + var rect = nullRect; + if (bias == "left") { for (var i = 0; i < rects.length; i++) { + if ((rect = rects[i]).left != rect.right) { break } + } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) { + if ((rect = rects[i$1]).left != rect.right) { break } + } } + return rect + } + + function measureCharInner(cm, prepared, ch, bias) { + var place = nodeAndOffsetInLineMap(prepared.map, ch, bias); + var node = place.node, start = place.start, end = place.end, collapse = place.collapse; + + var rect; + if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. + for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned + while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; } + while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; } + if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) + { rect = node.parentNode.getBoundingClientRect(); } + else + { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); } + if (rect.left || rect.right || start == 0) { break } + end = start; + start = start - 1; + collapse = "right"; + } + if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); } + } else { // If it is a widget, simply get the box for the whole widget. + if (start > 0) { collapse = bias = "right"; } + var rects; + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) + { rect = rects[bias == "right" ? rects.length - 1 : 0]; } + else + { rect = node.getBoundingClientRect(); } + } + if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { + var rSpan = node.parentNode.getClientRects()[0]; + if (rSpan) + { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; } + else + { rect = nullRect; } + } + + var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top; + var mid = (rtop + rbot) / 2; + var heights = prepared.view.measure.heights; + var i = 0; + for (; i < heights.length - 1; i++) + { if (mid < heights[i]) { break } } + var top = i ? heights[i - 1] : 0, bot = heights[i]; + var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, bottom: bot}; + if (!rect.left && !rect.right) { result.bogus = true; } + if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; } + + return result + } + + // Work around problem with bounding client rects on ranges being + // returned incorrectly when zoomed on IE10 and below. + function maybeUpdateRectForZooming(measure, rect) { + if (!window.screen || screen.logicalXDPI == null || + screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) + { return rect } + var scaleX = screen.logicalXDPI / screen.deviceXDPI; + var scaleY = screen.logicalYDPI / screen.deviceYDPI; + return {left: rect.left * scaleX, right: rect.right * scaleX, + top: rect.top * scaleY, bottom: rect.bottom * scaleY} + } + + function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {}; + lineView.measure.heights = null; + if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++) + { lineView.measure.caches[i] = {}; } } + } + } + + function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null; + removeChildren(cm.display.lineMeasure); + for (var i = 0; i < cm.display.view.length; i++) + { clearLineMeasurementCacheFor(cm.display.view[i]); } + } + + function clearCaches(cm) { + clearLineMeasurementCache(cm); + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null; + if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; } + cm.display.lineNumChars = null; + } + + function pageScrollX(doc) { + // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206 + // which causes page_Offset and bounding client rects to use + // different reference viewports and invalidate our calculations. + if (chrome && android) { return -(doc.body.getBoundingClientRect().left - parseInt(getComputedStyle(doc.body).marginLeft)) } + return doc.defaultView.pageXOffset || (doc.documentElement || doc.body).scrollLeft + } + function pageScrollY(doc) { + if (chrome && android) { return -(doc.body.getBoundingClientRect().top - parseInt(getComputedStyle(doc.body).marginTop)) } + return doc.defaultView.pageYOffset || (doc.documentElement || doc.body).scrollTop + } + + function widgetTopHeight(lineObj) { + var ref = visualLine(lineObj); + var widgets = ref.widgets; + var height = 0; + if (widgets) { for (var i = 0; i < widgets.length; ++i) { if (widgets[i].above) + { height += widgetHeight(widgets[i]); } } } + return height + } + + // Converts a {top, bottom, left, right} box from line-local + // coordinates into another coordinate system. Context may be one of + // "line", "div" (display.lineDiv), "local"./null (editor), "window", + // or "page". + function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) { + if (!includeWidgets) { + var height = widgetTopHeight(lineObj); + rect.top += height; rect.bottom += height; + } + if (context == "line") { return rect } + if (!context) { context = "local"; } + var yOff = heightAtLine(lineObj); + if (context == "local") { yOff += paddingTop(cm.display); } + else { yOff -= cm.display.viewOffset; } + if (context == "page" || context == "window") { + var lOff = cm.display.lineSpace.getBoundingClientRect(); + yOff += lOff.top + (context == "window" ? 0 : pageScrollY(doc(cm))); + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX(doc(cm))); + rect.left += xOff; rect.right += xOff; + } + rect.top += yOff; rect.bottom += yOff; + return rect + } + + // Coverts a box from "div" coords to another coordinate system. + // Context may be "window", "page", "div", or "local"./null. + function fromCoordSystem(cm, coords, context) { + if (context == "div") { return coords } + var left = coords.left, top = coords.top; + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(doc(cm)); + top -= pageScrollY(doc(cm)); + } else if (context == "local" || !context) { + var localBox = cm.display.sizer.getBoundingClientRect(); + left += localBox.left; + top += localBox.top; + } + + var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect(); + return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top} + } + + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) { lineObj = getLine(cm.doc, pos.line); } + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context) + } + + // Returns a box for a given cursor position, which may have an + // 'other' property containing the position of the secondary cursor + // on a bidi boundary. + // A cursor Pos(line, char, "before") is on the same visual line as `char - 1` + // and after `char - 1` in writing order of `char - 1` + // A cursor Pos(line, char, "after") is on the same visual line as `char` + // and before `char` in writing order of `char` + // Examples (upper-case letters are RTL, lower-case are LTR): + // Pos(0, 1, ...) + // before after + // ab a|b a|b + // aB a|B aB| + // Ab |Ab A|b + // AB B|A B|A + // Every position after the last character on a line is considered to stick + // to the last character on the line. + function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line); + if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); } + function get(ch, right) { + var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight); + if (right) { m.left = m.right; } else { m.right = m.left; } + return intoCoordSystem(cm, lineObj, m, context) + } + var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky; + if (ch >= lineObj.text.length) { + ch = lineObj.text.length; + sticky = "before"; + } else if (ch <= 0) { + ch = 0; + sticky = "after"; + } + if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") } + + function getBidi(ch, partPos, invert) { + var part = order[partPos], right = part.level == 1; + return get(invert ? ch - 1 : ch, right != invert) + } + var partPos = getBidiPartAt(order, ch, sticky); + var other = bidiOther; + var val = getBidi(ch, partPos, sticky == "before"); + if (other != null) { val.other = getBidi(ch, other, sticky != "before"); } + return val + } + + // Used to cheaply estimate the coordinates for a position. Used for + // intermediate scroll updates. + function estimateCoords(cm, pos) { + var left = 0; + pos = clipPos(cm.doc, pos); + if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; } + var lineObj = getLine(cm.doc, pos.line); + var top = heightAtLine(lineObj) + paddingTop(cm.display); + return {left: left, right: left, top: top, bottom: top + lineObj.height} + } + + // Positions returned by coordsChar contain some extra information. + // xRel is the relative x position of the input coordinates compared + // to the found position (so xRel > 0 means the coordinates are to + // the right of the character position, for example). When outside + // is true, that means the coordinates lie outside the line's + // vertical range. + function PosWithInfo(line, ch, sticky, outside, xRel) { + var pos = Pos(line, ch, sticky); + pos.xRel = xRel; + if (outside) { pos.outside = outside; } + return pos + } + + // Compute the character position closest to the given coordinates. + // Input must be lineSpace-local ("div" coordinate system). + function coordsChar(cm, x, y) { + var doc = cm.doc; + y += cm.display.viewOffset; + if (y < 0) { return PosWithInfo(doc.first, 0, null, -1, -1) } + var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1; + if (lineN > last) + { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) } + if (x < 0) { x = 0; } + + var lineObj = getLine(doc, lineN); + for (;;) { + var found = coordsCharInner(cm, lineObj, lineN, x, y); + var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0)); + if (!collapsed) { return found } + var rangeEnd = collapsed.find(1); + if (rangeEnd.line == lineN) { return rangeEnd } + lineObj = getLine(doc, lineN = rangeEnd.line); + } + } + + function wrappedLineExtent(cm, lineObj, preparedMeasure, y) { + y -= widgetTopHeight(lineObj); + var end = lineObj.text.length; + var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0); + end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end); + return {begin: begin, end: end} + } + + function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) { + if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); } + var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top; + return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop) + } + + // Returns true if the given side of a box is after the given + // coordinates, in top-to-bottom, left-to-right order. + function boxIsAfter(box, x, y, left) { + return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + // Move y into line-local coordinate space + y -= heightAtLine(lineObj); + var preparedMeasure = prepareMeasureForLine(cm, lineObj); + // When directly calling `measureCharPrepared`, we have to adjust + // for the widgets at this line. + var widgetHeight = widgetTopHeight(lineObj); + var begin = 0, end = lineObj.text.length, ltr = true; + + var order = getOrder(lineObj, cm.doc.direction); + // If the line isn't plain left-to-right text, first figure out + // which bidi section the coordinates fall into. + if (order) { + var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart) + (cm, lineObj, lineNo, preparedMeasure, order, x, y); + ltr = part.level != 1; + // The awkward -1 offsets are needed because findFirst (called + // on these below) will treat its first bound as inclusive, + // second as exclusive, but we want to actually address the + // characters in the part's range + begin = ltr ? part.from : part.to - 1; + end = ltr ? part.to : part.from - 1; + } + + // A binary search to find the first character whose bounding box + // starts after the coordinates. If we run across any whose box wrap + // the coordinates, store that. + var chAround = null, boxAround = null; + var ch = findFirst(function (ch) { + var box = measureCharPrepared(cm, preparedMeasure, ch); + box.top += widgetHeight; box.bottom += widgetHeight; + if (!boxIsAfter(box, x, y, false)) { return false } + if (box.top <= y && box.left <= x) { + chAround = ch; + boxAround = box; + } + return true + }, begin, end); + + var baseX, sticky, outside = false; + // If a box around the coordinates was found, use that + if (boxAround) { + // Distinguish coordinates nearer to the left or right side of the box + var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr; + ch = chAround + (atStart ? 0 : 1); + sticky = atStart ? "after" : "before"; + baseX = atLeft ? boxAround.left : boxAround.right; + } else { + // (Adjust for extended bound, if necessary.) + if (!ltr && (ch == end || ch == begin)) { ch++; } + // To determine which side to associate with, get the box to the + // left of the character and compare it's vertical position to the + // coordinates + sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" : + (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ? + "after" : "before"; + // Now get accurate coordinates for this place, in order to get a + // base X position + var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure); + baseX = coords.left; + outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0; + } + + ch = skipExtendingChars(lineObj.text, ch, 1); + return PosWithInfo(lineNo, ch, sticky, outside, x - baseX) + } + + function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) { + // Bidi parts are sorted left-to-right, and in a non-line-wrapping + // situation, we can take this ordering to correspond to the visual + // ordering. This finds the first part whose end is after the given + // coordinates. + var index = findFirst(function (i) { + var part = order[i], ltr = part.level != 1; + return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"), + "line", lineObj, preparedMeasure), x, y, true) + }, 0, order.length - 1); + var part = order[index]; + // If this isn't the first part, the part's start is also after + // the coordinates, and the coordinates aren't on the same line as + // that start, move one part back. + if (index > 0) { + var ltr = part.level != 1; + var start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"), + "line", lineObj, preparedMeasure); + if (boxIsAfter(start, x, y, true) && start.top > y) + { part = order[index - 1]; } + } + return part + } + + function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) { + // In a wrapped line, rtl text on wrapping boundaries can do things + // that don't correspond to the ordering in our `order` array at + // all, so a binary search doesn't work, and we want to return a + // part that only spans one line so that the binary search in + // coordsCharInner is safe. As such, we first find the extent of the + // wrapped line, and then do a flat search in which we discard any + // spans that aren't on the line. + var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y); + var begin = ref.begin; + var end = ref.end; + if (/\s/.test(lineObj.text.charAt(end - 1))) { end--; } + var part = null, closestDist = null; + for (var i = 0; i < order.length; i++) { + var p = order[i]; + if (p.from >= end || p.to <= begin) { continue } + var ltr = p.level != 1; + var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right; + // Weigh against spans ending before this, so that they are only + // picked if nothing ends after + var dist = endX < x ? x - endX + 1e9 : endX - x; + if (!part || closestDist > dist) { + part = p; + closestDist = dist; + } + } + if (!part) { part = order[order.length - 1]; } + // Clip the part to the wrapped line. + if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; } + if (part.to > end) { part = {from: part.from, to: end, level: part.level}; } + return part + } + + var measureText; + // Compute the default text height. + function textHeight(display) { + if (display.cachedTextHeight != null) { return display.cachedTextHeight } + if (measureText == null) { + measureText = elt("pre", null, "CodeMirror-line-like"); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")); + measureText.appendChild(elt("br")); + } + measureText.appendChild(document.createTextNode("x")); + } + removeChildrenAndAdd(display.measure, measureText); + var height = measureText.offsetHeight / 50; + if (height > 3) { display.cachedTextHeight = height; } + removeChildren(display.measure); + return height || 1 + } + + // Compute the default character width. + function charWidth(display) { + if (display.cachedCharWidth != null) { return display.cachedCharWidth } + var anchor = elt("span", "xxxxxxxxxx"); + var pre = elt("pre", [anchor], "CodeMirror-line-like"); + removeChildrenAndAdd(display.measure, pre); + var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10; + if (width > 2) { display.cachedCharWidth = width; } + return width || 10 + } + + // Do a bulk-read of the DOM positions and sizes needed to draw the + // view, so that we don't interleave reading and writing to the DOM. + function getDimensions(cm) { + var d = cm.display, left = {}, width = {}; + var gutterLeft = d.gutters.clientLeft; + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + var id = cm.display.gutterSpecs[i].className; + left[id] = n.offsetLeft + n.clientLeft + gutterLeft; + width[id] = n.clientWidth; + } + return {fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth} + } + + // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, + // but using getBoundingClientRect to get a sub-pixel-accurate + // result. + function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left + } + + // Returns a function that estimates the height of a line, to use as + // first approximation until the line becomes visible (and is thus + // properly measurable). + function estimateHeight(cm) { + var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; + var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); + return function (line) { + if (lineIsHidden(cm.doc, line)) { return 0 } + + var widgetsHeight = 0; + if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; } + } } + + if (wrapping) + { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th } + else + { return widgetsHeight + th } + } + } + + function estimateLineHeights(cm) { + var doc = cm.doc, est = estimateHeight(cm); + doc.iter(function (line) { + var estHeight = est(line); + if (estHeight != line.height) { updateLineHeight(line, estHeight); } + }); + } + + // Given a mouse event, find the corresponding position. If liberal + // is false, it checks whether a gutter or scrollbar was clicked, + // and returns null if it was. forRect is used by rectangular + // selections, and tries to estimate a character position even for + // coordinates beyond the right of the text. + function posFromMouse(cm, e, liberal, forRect) { + var display = cm.display; + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null } + + var x, y, space = display.lineSpace.getBoundingClientRect(); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX - space.left; y = e.clientY - space.top; } + catch (e$1) { return null } + var coords = coordsChar(cm, x, y), line; + if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { + var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length; + coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)); + } + return coords + } + + // Find the view element corresponding to a given line. Return null + // when the line isn't visible. + function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) { return null } + n -= cm.display.viewFrom; + if (n < 0) { return null } + var view = cm.display.view; + for (var i = 0; i < view.length; i++) { + n -= view[i].size; + if (n < 0) { return i } + } + } + + // Updates the display.view data structure for a given change to the + // document. From and to are in pre-change coordinates. Lendiff is + // the amount of lines added or subtracted by the change. This is + // used for changes that span multiple lines, or change the way + // lines are divided into visual lines. regLineChange (below) + // registers single-line changes. + function regChange(cm, from, to, lendiff) { + if (from == null) { from = cm.doc.first; } + if (to == null) { to = cm.doc.first + cm.doc.size; } + if (!lendiff) { lendiff = 0; } + + var display = cm.display; + if (lendiff && to < display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers > from)) + { display.updateLineNumbers = from; } + + cm.curOp.viewChanged = true; + + if (from >= display.viewTo) { // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) + { resetView(cm); } + } else if (to <= display.viewFrom) { // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm); + } else { + display.viewFrom += lendiff; + display.viewTo += lendiff; + } + } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap + resetView(cm); + } else if (from <= display.viewFrom) { // Top overlap + var cut = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cut) { + display.view = display.view.slice(cut.index); + display.viewFrom = cut.lineN; + display.viewTo += lendiff; + } else { + resetView(cm); + } + } else if (to >= display.viewTo) { // Bottom overlap + var cut$1 = viewCuttingPoint(cm, from, from, -1); + if (cut$1) { + display.view = display.view.slice(0, cut$1.index); + display.viewTo = cut$1.lineN; + } else { + resetView(cm); + } + } else { // Gap in the middle + var cutTop = viewCuttingPoint(cm, from, from, -1); + var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1); + if (cutTop && cutBot) { + display.view = display.view.slice(0, cutTop.index) + .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) + .concat(display.view.slice(cutBot.index)); + display.viewTo += lendiff; + } else { + resetView(cm); + } + } + + var ext = display.externalMeasured; + if (ext) { + if (to < ext.lineN) + { ext.lineN += lendiff; } + else if (from < ext.lineN + ext.size) + { display.externalMeasured = null; } + } + } + + // Register a change to a single line. Type must be one of "text", + // "gutter", "class", "widget" + function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true; + var display = cm.display, ext = cm.display.externalMeasured; + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) + { display.externalMeasured = null; } + + if (line < display.viewFrom || line >= display.viewTo) { return } + var lineView = display.view[findViewIndex(cm, line)]; + if (lineView.node == null) { return } + var arr = lineView.changes || (lineView.changes = []); + if (indexOf(arr, type) == -1) { arr.push(type); } + } + + // Clear the view. + function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first; + cm.display.view = []; + cm.display.viewOffset = 0; + } + + function viewCuttingPoint(cm, oldN, newN, dir) { + var index = findViewIndex(cm, oldN), diff, view = cm.display.view; + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) + { return {index: index, lineN: newN} } + var n = cm.display.viewFrom; + for (var i = 0; i < index; i++) + { n += view[i].size; } + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) { return null } + diff = (n + view[index].size) - oldN; + index++; + } else { + diff = n - oldN; + } + oldN += diff; newN += diff; + } + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) { return null } + newN += dir * view[index - (dir < 0 ? 1 : 0)].size; + index += dir; + } + return {index: index, lineN: newN} + } + + // Force the view to cover a given range, adding empty view element + // or clipping off existing ones as needed. + function adjustView(cm, from, to) { + var display = cm.display, view = display.view; + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to); + display.viewFrom = from; + } else { + if (display.viewFrom > from) + { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); } + else if (display.viewFrom < from) + { display.view = display.view.slice(findViewIndex(cm, from)); } + display.viewFrom = from; + if (display.viewTo < to) + { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); } + else if (display.viewTo > to) + { display.view = display.view.slice(0, findViewIndex(cm, to)); } + } + display.viewTo = to; + } + + // Count the number of lines in the view whose DOM representation is + // out of date (or nonexistent). + function countDirtyView(cm) { + var view = cm.display.view, dirty = 0; + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; } + } + return dirty + } + + function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()); + } + + function prepareSelection(cm, primary) { + if ( primary === void 0 ) primary = true; + + var doc = cm.doc, result = {}; + var curFragment = result.cursors = document.createDocumentFragment(); + var selFragment = result.selection = document.createDocumentFragment(); + + var customCursor = cm.options.$customCursor; + if (customCursor) { primary = true; } + for (var i = 0; i < doc.sel.ranges.length; i++) { + if (!primary && i == doc.sel.primIndex) { continue } + var range = doc.sel.ranges[i]; + if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { continue } + var collapsed = range.empty(); + if (customCursor) { + var head = customCursor(cm, range); + if (head) { drawSelectionCursor(cm, head, curFragment); } + } else if (collapsed || cm.options.showCursorWhenSelecting) { + drawSelectionCursor(cm, range.head, curFragment); + } + if (!collapsed) + { drawSelectionRange(cm, range, selFragment); } + } + return result + } + + // Draws a cursor for the given range + function drawSelectionCursor(cm, head, output) { + var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine); + + var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")); + cursor.style.left = pos.left + "px"; + cursor.style.top = pos.top + "px"; + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; + + if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) { + var charPos = charCoords(cm, head, "div", null, null); + var width = charPos.right - charPos.left; + cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + "px"; + } + + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")); + otherCursor.style.display = ""; + otherCursor.style.left = pos.other.left + "px"; + otherCursor.style.top = pos.other.top + "px"; + otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; + } + } + + function cmpCoords(a, b) { return a.top - b.top || a.left - b.left } + + // Draws the given range as a highlighted selection + function drawSelectionRange(cm, range, output) { + var display = cm.display, doc = cm.doc; + var fragment = document.createDocumentFragment(); + var padding = paddingH(cm.display), leftSide = padding.left; + var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right; + var docLTR = doc.direction == "ltr"; + + function add(left, top, width, bottom) { + if (top < 0) { top = 0; } + top = Math.round(top); + bottom = Math.round(bottom); + fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px"))); + } + + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line); + var lineLen = lineObj.text.length; + var start, end; + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias) + } + + function wrapX(pos, dir, side) { + var extent = wrappedLineExtentChar(cm, lineObj, null, pos); + var prop = (dir == "ltr") == (side == "after") ? "left" : "right"; + var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1); + return coords(ch, prop)[prop] + } + + var order = getOrder(lineObj, doc.direction); + iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) { + var ltr = dir == "ltr"; + var fromPos = coords(from, ltr ? "left" : "right"); + var toPos = coords(to - 1, ltr ? "right" : "left"); + + var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen; + var first = i == 0, last = !order || i == order.length - 1; + if (toPos.top - fromPos.top <= 3) { // Single line + var openLeft = (docLTR ? openStart : openEnd) && first; + var openRight = (docLTR ? openEnd : openStart) && last; + var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left; + var right = openRight ? rightSide : (ltr ? toPos : fromPos).right; + add(left, fromPos.top, right - left, fromPos.bottom); + } else { // Multiple lines + var topLeft, topRight, botLeft, botRight; + if (ltr) { + topLeft = docLTR && openStart && first ? leftSide : fromPos.left; + topRight = docLTR ? rightSide : wrapX(from, dir, "before"); + botLeft = docLTR ? leftSide : wrapX(to, dir, "after"); + botRight = docLTR && openEnd && last ? rightSide : toPos.right; + } else { + topLeft = !docLTR ? leftSide : wrapX(from, dir, "before"); + topRight = !docLTR && openStart && first ? rightSide : fromPos.right; + botLeft = !docLTR && openEnd && last ? leftSide : toPos.left; + botRight = !docLTR ? rightSide : wrapX(to, dir, "after"); + } + add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom); + if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); } + add(botLeft, toPos.top, botRight - botLeft, toPos.bottom); + } + + if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; } + if (cmpCoords(toPos, start) < 0) { start = toPos; } + if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; } + if (cmpCoords(toPos, end) < 0) { end = toPos; } + }); + return {start: start, end: end} + } + + var sFrom = range.from(), sTo = range.to(); + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch); + } else { + var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line); + var singleVLine = visualLine(fromLine) == visualLine(toLine); + var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end; + var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start; + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom); + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); + } + } + if (leftEnd.bottom < rightStart.top) + { add(leftSide, leftEnd.bottom, null, rightStart.top); } + } + + output.appendChild(fragment); + } + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) { return } + var display = cm.display; + clearInterval(display.blinker); + var on = true; + display.cursorDiv.style.visibility = ""; + if (cm.options.cursorBlinkRate > 0) + { display.blinker = setInterval(function () { + if (!cm.hasFocus()) { onBlur(cm); } + display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; + }, cm.options.cursorBlinkRate); } + else if (cm.options.cursorBlinkRate < 0) + { display.cursorDiv.style.visibility = "hidden"; } + } + + function ensureFocus(cm) { + if (!cm.hasFocus()) { + cm.display.input.focus(); + if (!cm.state.focused) { onFocus(cm); } + } + } + + function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true; + setTimeout(function () { if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false; + if (cm.state.focused) { onBlur(cm); } + } }, 100); + } + + function onFocus(cm, e) { + if (cm.state.delayingBlurEvent && !cm.state.draggingText) { cm.state.delayingBlurEvent = false; } + + if (cm.options.readOnly == "nocursor") { return } + if (!cm.state.focused) { + signal(cm, "focus", cm, e); + cm.state.focused = true; + addClass(cm.display.wrapper, "CodeMirror-focused"); + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset(); + if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730 + } + cm.display.input.receivedFocus(); + } + restartBlink(cm); + } + function onBlur(cm, e) { + if (cm.state.delayingBlurEvent) { return } + + if (cm.state.focused) { + signal(cm, "blur", cm, e); + cm.state.focused = false; + rmClass(cm.display.wrapper, "CodeMirror-focused"); + } + clearInterval(cm.display.blinker); + setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150); + } + + // Read the actual heights of the rendered lines, and update their + // stored heights to match. + function updateHeightsInViewport(cm) { + var display = cm.display; + var prevBottom = display.lineDiv.offsetTop; + var viewTop = Math.max(0, display.scroller.getBoundingClientRect().top); + var oldHeight = display.lineDiv.getBoundingClientRect().top; + var mustScroll = 0; + for (var i = 0; i < display.view.length; i++) { + var cur = display.view[i], wrapping = cm.options.lineWrapping; + var height = (void 0), width = 0; + if (cur.hidden) { continue } + oldHeight += cur.line.height; + if (ie && ie_version < 8) { + var bot = cur.node.offsetTop + cur.node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + var box = cur.node.getBoundingClientRect(); + height = box.bottom - box.top; + // Check that lines don't extend past the right of the current + // editor width + if (!wrapping && cur.text.firstChild) + { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; } + } + var diff = cur.line.height - height; + if (diff > .005 || diff < -.005) { + if (oldHeight < viewTop) { mustScroll -= diff; } + updateLineHeight(cur.line, height); + updateWidgetHeight(cur.line); + if (cur.rest) { for (var j = 0; j < cur.rest.length; j++) + { updateWidgetHeight(cur.rest[j]); } } + } + if (width > cm.display.sizerWidth) { + var chWidth = Math.ceil(width / charWidth(cm.display)); + if (chWidth > cm.display.maxLineLength) { + cm.display.maxLineLength = chWidth; + cm.display.maxLine = cur.line; + cm.display.maxLineChanged = true; + } + } + } + if (Math.abs(mustScroll) > 2) { display.scroller.scrollTop += mustScroll; } + } + + // Read and store the height of line widgets associated with the + // given line. + function updateWidgetHeight(line) { + if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) { + var w = line.widgets[i], parent = w.node.parentNode; + if (parent) { w.height = parent.offsetHeight; } + } } + } + + // Compute the lines that are visible in a given viewport (defaults + // the the current scroll position). viewport may contain top, + // height, and ensure (see op.scrollToPos) properties. + function visibleLines(display, doc, viewport) { + var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop; + top = Math.floor(top - paddingTop(display)); + var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight; + + var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom); + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line; + if (ensureFrom < from) { + from = ensureFrom; + to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight); + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight); + to = ensureTo; + } + } + return {from: from, to: Math.max(to, from + 1)} + } + + // SCROLLING THINGS INTO VIEW + + // If an editor sits on the top or bottom of the window, partially + // scrolled out of view, this ensures that the cursor is visible. + function maybeScrollWindow(cm, rect) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) { return } + + var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; + var doc = display.wrapper.ownerDocument; + if (rect.top + box.top < 0) { doScroll = true; } + else if (rect.bottom + box.top > (doc.defaultView.innerHeight || doc.documentElement.clientHeight)) { doScroll = false; } + if (doScroll != null && !phantom) { + var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;")); + cm.display.lineSpace.appendChild(scrollNode); + scrollNode.scrollIntoView(doScroll); + cm.display.lineSpace.removeChild(scrollNode); + } + } + + // Scroll a given position into view (immediately), verifying that + // it actually became visible (as line heights are accurately + // measured, the position of something may 'drift' during drawing). + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) { margin = 0; } + var rect; + if (!cm.options.lineWrapping && pos == end) { + // Set pos and end to the cursor positions around the character pos sticks to + // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch + // If pos == Pos(_, 0, "before"), pos and end are unchanged + end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos; + pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos; + } + for (var limit = 0; limit < 5; limit++) { + var changed = false; + var coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + rect = {left: Math.min(coords.left, endCoords.left), + top: Math.min(coords.top, endCoords.top) - margin, + right: Math.max(coords.left, endCoords.left), + bottom: Math.max(coords.bottom, endCoords.bottom) + margin}; + var scrollPos = calculateScrollPos(cm, rect); + var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; } + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; } + } + if (!changed) { break } + } + return rect + } + + // Scroll a given set of coordinates into view (immediately). + function scrollIntoView(cm, rect) { + var scrollPos = calculateScrollPos(cm, rect); + if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); } + if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); } + } + + // Calculate a new scroll position needed to scroll the given + // rectangle into view. Returns an object with scrollTop and + // scrollLeft properties. When these are undefined, the + // vertical/horizontal position does not need to be adjusted. + function calculateScrollPos(cm, rect) { + var display = cm.display, snapMargin = textHeight(cm.display); + if (rect.top < 0) { rect.top = 0; } + var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop; + var screen = displayHeight(cm), result = {}; + if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; } + var docBottom = cm.doc.height + paddingVert(display); + var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin; + if (rect.top < screentop) { + result.scrollTop = atTop ? 0 : rect.top; + } else if (rect.bottom > screentop + screen) { + var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen); + if (newTop != screentop) { result.scrollTop = newTop; } + } + + var gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth; + var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace; + var screenw = displayWidth(cm) - display.gutters.offsetWidth; + var tooWide = rect.right - rect.left > screenw; + if (tooWide) { rect.right = rect.left + screenw; } + if (rect.left < 10) + { result.scrollLeft = 0; } + else if (rect.left < screenleft) + { result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)); } + else if (rect.right > screenw + screenleft - 3) + { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; } + return result + } + + // Store a relative adjustment to the scroll position in the current + // operation (to be applied when the operation finishes). + function addToScrollTop(cm, top) { + if (top == null) { return } + resolveScrollToPos(cm); + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top; + } + + // Make sure that at the end of the operation the current cursor is + // shown. + function ensureCursorVisible(cm) { + resolveScrollToPos(cm); + var cur = cm.getCursor(); + cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin}; + } + + function scrollToCoords(cm, x, y) { + if (x != null || y != null) { resolveScrollToPos(cm); } + if (x != null) { cm.curOp.scrollLeft = x; } + if (y != null) { cm.curOp.scrollTop = y; } + } + + function scrollToRange(cm, range) { + resolveScrollToPos(cm); + cm.curOp.scrollToPos = range; + } + + // When an operation has its scrollToPos property set, and another + // scroll action is applied before the end of the operation, this + // 'simulates' scrolling that position into view in a cheap way, so + // that the effect of intermediate scroll commands is not ignored. + function resolveScrollToPos(cm) { + var range = cm.curOp.scrollToPos; + if (range) { + cm.curOp.scrollToPos = null; + var from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to); + scrollToCoordsRange(cm, from, to, range.margin); + } + } + + function scrollToCoordsRange(cm, from, to, margin) { + var sPos = calculateScrollPos(cm, { + left: Math.min(from.left, to.left), + top: Math.min(from.top, to.top) - margin, + right: Math.max(from.right, to.right), + bottom: Math.max(from.bottom, to.bottom) + margin + }); + scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop); + } + + // Sync the scrollable area and scrollbars, ensure the viewport + // covers the visible area. + function updateScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) { return } + if (!gecko) { updateDisplaySimple(cm, {top: val}); } + setScrollTop(cm, val, true); + if (gecko) { updateDisplaySimple(cm); } + startWorker(cm, 100); + } + + function setScrollTop(cm, val, forceScroll) { + val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val)); + if (cm.display.scroller.scrollTop == val && !forceScroll) { return } + cm.doc.scrollTop = val; + cm.display.scrollbars.setScrollTop(val); + if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; } + } + + // Sync scroller and scrollbar, ensure the gutter elements are + // aligned. + function setScrollLeft(cm, val, isScroller, forceScroll) { + val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth)); + if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return } + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; } + cm.display.scrollbars.setScrollLeft(val); + } + + // SCROLLBARS + + // Prepare DOM reads needed to update the scrollbars. Done in one + // shot to minimize update/measure roundtrips. + function measureForScrollbars(cm) { + var d = cm.display, gutterW = d.gutters.offsetWidth; + var docH = Math.round(cm.doc.height + paddingVert(cm.display)); + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + } + } + + var NativeScrollbars = function(place, scroll, cm) { + this.cm = cm; + var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar"); + var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar"); + vert.tabIndex = horiz.tabIndex = -1; + place(vert); place(horiz); + + on(vert, "scroll", function () { + if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); } + }); + on(horiz, "scroll", function () { + if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); } + }); + + this.checkedZeroWidth = false; + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; } + }; + + NativeScrollbars.prototype.update = function (measure) { + var needsH = measure.scrollWidth > measure.clientWidth + 1; + var needsV = measure.scrollHeight > measure.clientHeight + 1; + var sWidth = measure.nativeBarWidth; + + if (needsV) { + this.vert.style.display = "block"; + this.vert.style.bottom = needsH ? sWidth + "px" : "0"; + var totalHeight = measure.viewHeight - (needsH ? sWidth : 0); + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = + Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px"; + } else { + this.vert.scrollTop = 0; + this.vert.style.display = ""; + this.vert.firstChild.style.height = "0"; + } + + if (needsH) { + this.horiz.style.display = "block"; + this.horiz.style.right = needsV ? sWidth + "px" : "0"; + this.horiz.style.left = measure.barLeft + "px"; + var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0); + this.horiz.firstChild.style.width = + Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px"; + } else { + this.horiz.style.display = ""; + this.horiz.firstChild.style.width = "0"; + } + + if (!this.checkedZeroWidth && measure.clientHeight > 0) { + if (sWidth == 0) { this.zeroWidthHack(); } + this.checkedZeroWidth = true; + } + + return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0} + }; + + NativeScrollbars.prototype.setScrollLeft = function (pos) { + if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; } + if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); } + }; + + NativeScrollbars.prototype.setScrollTop = function (pos) { + if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; } + if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); } + }; + + NativeScrollbars.prototype.zeroWidthHack = function () { + var w = mac && !mac_geMountainLion ? "12px" : "18px"; + this.horiz.style.height = this.vert.style.width = w; + this.horiz.style.visibility = this.vert.style.visibility = "hidden"; + this.disableHoriz = new Delayed; + this.disableVert = new Delayed; + }; + + NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) { + bar.style.visibility = ""; + function maybeDisable() { + // To find out whether the scrollbar is still visible, we + // check whether the element under the pixel in the bottom + // right corner of the scrollbar box is the scrollbar box + // itself (when the bar is still visible) or its filler child + // (when the bar is hidden). If it is still visible, we keep + // it enabled, if it's hidden, we disable pointer events. + var box = bar.getBoundingClientRect(); + var elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) + : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1); + if (elt != bar) { bar.style.visibility = "hidden"; } + else { delay.set(1000, maybeDisable); } + } + delay.set(1000, maybeDisable); + }; + + NativeScrollbars.prototype.clear = function () { + var parent = this.horiz.parentNode; + parent.removeChild(this.horiz); + parent.removeChild(this.vert); + }; + + var NullScrollbars = function () {}; + + NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} }; + NullScrollbars.prototype.setScrollLeft = function () {}; + NullScrollbars.prototype.setScrollTop = function () {}; + NullScrollbars.prototype.clear = function () {}; + + function updateScrollbars(cm, measure) { + if (!measure) { measure = measureForScrollbars(cm); } + var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight; + updateScrollbarsInner(cm, measure); + for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) + { updateHeightsInViewport(cm); } + updateScrollbarsInner(cm, measureForScrollbars(cm)); + startWidth = cm.display.barWidth; startHeight = cm.display.barHeight; + } + } + + // Re-synchronize the fake scrollbars with the actual size of the + // content. + function updateScrollbarsInner(cm, measure) { + var d = cm.display; + var sizes = d.scrollbars.update(measure); + + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px"; + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px"; + d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent"; + + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block"; + d.scrollbarFiller.style.height = sizes.bottom + "px"; + d.scrollbarFiller.style.width = sizes.right + "px"; + } else { d.scrollbarFiller.style.display = ""; } + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block"; + d.gutterFiller.style.height = sizes.bottom + "px"; + d.gutterFiller.style.width = measure.gutterWidth + "px"; + } else { d.gutterFiller.style.display = ""; } + } + + var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars}; + + function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear(); + if (cm.display.scrollbars.addClass) + { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); } + } + + cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller); + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", function () { + if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); } + }); + node.setAttribute("cm-not-content", "true"); + }, function (pos, axis) { + if (axis == "horizontal") { setScrollLeft(cm, pos); } + else { updateScrollTop(cm, pos); } + }, cm); + if (cm.display.scrollbars.addClass) + { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); } + } + + // Operations are used to wrap a series of changes to the editor + // state in such a way that each change won't have to update the + // cursor and display (which would be awkward, slow, and + // error-prone). Instead, display updates are batched and then all + // combined and executed at once. + + var nextOpId = 0; + // Start a new operation. + function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, // Used to detect need to update scrollbar + forceUpdate: false, // Used to force a redraw + updateInput: 0, // Whether to reset the input textarea + typing: false, // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, // Accumulated changes, for firing change events + cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already + selectionChanged: false, // Whether the selection needs to be redrawn + updateMaxLine: false, // Set when the widest line needs to be determined anew + scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, // Used to scroll to a specific position + focus: false, + id: ++nextOpId, // Unique ID + markArrays: null // Used by addMarkedSpan + }; + pushOperation(cm.curOp); + } + + // Finish an operation, updating the display and signalling delayed events + function endOperation(cm) { + var op = cm.curOp; + if (op) { finishOperation(op, function (group) { + for (var i = 0; i < group.ops.length; i++) + { group.ops[i].cm.curOp = null; } + endOperations(group); + }); } + } + + // The DOM updates done when an operation finishes are batched so + // that the minimum number of relayouts are required. + function endOperations(group) { + var ops = group.ops; + for (var i = 0; i < ops.length; i++) // Read DOM + { endOperation_R1(ops[i]); } + for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe) + { endOperation_W1(ops[i$1]); } + for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM + { endOperation_R2(ops[i$2]); } + for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe) + { endOperation_W2(ops[i$3]); } + for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM + { endOperation_finish(ops[i$4]); } + } + + function endOperation_R1(op) { + var cm = op.cm, display = cm.display; + maybeClipScrollbars(cm); + if (op.updateMaxLine) { findMaxLine(cm); } + + op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || + op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || + op.scrollToPos.to.line >= display.viewTo) || + display.maxLineChanged && cm.options.lineWrapping; + op.update = op.mustUpdate && + new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate); + } + + function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update); + } + + function endOperation_R2(op) { + var cm = op.cm, display = cm.display; + if (op.updatedDisplay) { updateHeightsInViewport(cm); } + + op.barMeasure = measureForScrollbars(cm); + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3; + cm.display.sizerWidth = op.adjustWidthTo; + op.barMeasure.scrollWidth = + Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth); + op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)); + } + + if (op.updatedDisplay || op.selectionChanged) + { op.preparedSelection = display.input.prepareSelection(); } + } + + function endOperation_W2(op) { + var cm = op.cm; + + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px"; + if (op.maxScrollLeft < cm.doc.scrollLeft) + { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); } + cm.display.maxLineChanged = false; + } + + var takeFocus = op.focus && op.focus == activeElt(root(cm)); + if (op.preparedSelection) + { cm.display.input.showSelection(op.preparedSelection, takeFocus); } + if (op.updatedDisplay || op.startHeight != cm.doc.height) + { updateScrollbars(cm, op.barMeasure); } + if (op.updatedDisplay) + { setDocumentHeight(cm, op.barMeasure); } + + if (op.selectionChanged) { restartBlink(cm); } + + if (cm.state.focused && op.updateInput) + { cm.display.input.reset(op.typing); } + if (takeFocus) { ensureFocus(op.cm); } + } + + function endOperation_finish(op) { + var cm = op.cm, display = cm.display, doc = cm.doc; + + if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); } + + // Abort mouse wheel delta measurement, when scrolling explicitly + if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) + { display.wheelStartX = display.wheelStartY = null; } + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); } + + if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); } + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), + clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin); + maybeScrollWindow(cm, rect); + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; + if (hidden) { for (var i = 0; i < hidden.length; ++i) + { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } } + if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1) + { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } } + + if (display.wrapper.offsetHeight) + { doc.scrollTop = cm.display.scroller.scrollTop; } + + // Fire change events, and delayed event handlers + if (op.changeObjs) + { signal(cm, "changes", cm, op.changeObjs); } + if (op.update) + { op.update.finish(); } + } + + // Run the given function in an operation + function runInOp(cm, f) { + if (cm.curOp) { return f() } + startOperation(cm); + try { return f() } + finally { endOperation(cm); } + } + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm, f) { + return function() { + if (cm.curOp) { return f.apply(cm, arguments) } + startOperation(cm); + try { return f.apply(cm, arguments) } + finally { endOperation(cm); } + } + } + // Used to add methods to editor and doc instances, wrapping them in + // operations. + function methodOp(f) { + return function() { + if (this.curOp) { return f.apply(this, arguments) } + startOperation(this); + try { return f.apply(this, arguments) } + finally { endOperation(this); } + } + } + function docMethodOp(f) { + return function() { + var cm = this.cm; + if (!cm || cm.curOp) { return f.apply(this, arguments) } + startOperation(cm); + try { return f.apply(this, arguments) } + finally { endOperation(cm); } + } + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.doc.highlightFrontier < cm.display.viewTo) + { cm.state.highlight.set(time, bind(highlightWorker, cm)); } + } + + function highlightWorker(cm) { + var doc = cm.doc; + if (doc.highlightFrontier >= cm.display.viewTo) { return } + var end = +new Date + cm.options.workTime; + var context = getContextBefore(cm, doc.highlightFrontier); + var changedLines = []; + + doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) { + if (context.line >= cm.display.viewFrom) { // Visible + var oldStyles = line.styles; + var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null; + var highlighted = highlightLine(cm, line, context, true); + if (resetState) { context.state = resetState; } + line.styles = highlighted.styles; + var oldCls = line.styleClasses, newCls = highlighted.classes; + if (newCls) { line.styleClasses = newCls; } + else if (oldCls) { line.styleClasses = null; } + var ischange = !oldStyles || oldStyles.length != line.styles.length || + oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass); + for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; } + if (ischange) { changedLines.push(context.line); } + line.stateAfter = context.save(); + context.nextLine(); + } else { + if (line.text.length <= cm.options.maxHighlightLength) + { processLine(cm, line.text, context); } + line.stateAfter = context.line % 5 == 0 ? context.save() : null; + context.nextLine(); + } + if (+new Date > end) { + startWorker(cm, cm.options.workDelay); + return true + } + }); + doc.highlightFrontier = context.line; + doc.modeFrontier = Math.max(doc.modeFrontier, context.line); + if (changedLines.length) { runInOp(cm, function () { + for (var i = 0; i < changedLines.length; i++) + { regLineChange(cm, changedLines[i], "text"); } + }); } + } + + // DISPLAY DRAWING + + var DisplayUpdate = function(cm, viewport, force) { + var display = cm.display; + + this.viewport = viewport; + // Store some values that we'll need later (but don't want to force a relayout for) + this.visible = visibleLines(display, cm.doc, viewport); + this.editorIsHidden = !display.wrapper.offsetWidth; + this.wrapperHeight = display.wrapper.clientHeight; + this.wrapperWidth = display.wrapper.clientWidth; + this.oldDisplayWidth = displayWidth(cm); + this.force = force; + this.dims = getDimensions(cm); + this.events = []; + }; + + DisplayUpdate.prototype.signal = function (emitter, type) { + if (hasHandler(emitter, type)) + { this.events.push(arguments); } + }; + DisplayUpdate.prototype.finish = function () { + for (var i = 0; i < this.events.length; i++) + { signal.apply(null, this.events[i]); } + }; + + function maybeClipScrollbars(cm) { + var display = cm.display; + if (!display.scrollbarsClipped && display.scroller.offsetWidth) { + display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth; + display.heightForcer.style.height = scrollGap(cm) + "px"; + display.sizer.style.marginBottom = -display.nativeBarWidth + "px"; + display.sizer.style.borderRightWidth = scrollGap(cm) + "px"; + display.scrollbarsClipped = true; + } + } + + function selectionSnapshot(cm) { + if (cm.hasFocus()) { return null } + var active = activeElt(root(cm)); + if (!active || !contains(cm.display.lineDiv, active)) { return null } + var result = {activeElt: active}; + if (window.getSelection) { + var sel = win(cm).getSelection(); + if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) { + result.anchorNode = sel.anchorNode; + result.anchorOffset = sel.anchorOffset; + result.focusNode = sel.focusNode; + result.focusOffset = sel.focusOffset; + } + } + return result + } + + function restoreSelection(snapshot) { + if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(rootNode(snapshot.activeElt))) { return } + snapshot.activeElt.focus(); + if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) && + snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) { + var doc = snapshot.activeElt.ownerDocument; + var sel = doc.defaultView.getSelection(), range = doc.createRange(); + range.setEnd(snapshot.anchorNode, snapshot.anchorOffset); + range.collapse(false); + sel.removeAllRanges(); + sel.addRange(range); + sel.extend(snapshot.focusNode, snapshot.focusOffset); + } + } + + // Does the actual updating of the line display. Bails out + // (returning false) when there is nothing to be done and forced is + // false. + function updateDisplayIfNeeded(cm, update) { + var display = cm.display, doc = cm.doc; + + if (update.editorIsHidden) { + resetView(cm); + return false + } + + // Bail out if the visible area is already rendered and nothing changed. + if (!update.force && + update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && + display.renderedView == display.view && countDirtyView(cm) == 0) + { return false } + + if (maybeUpdateLineNumberWidth(cm)) { + resetView(cm); + update.dims = getDimensions(cm); + } + + // Compute a suitable new viewport (from & to) + var end = doc.first + doc.size; + var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first); + var to = Math.min(end, update.visible.to + cm.options.viewportMargin); + if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); } + if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); } + if (sawCollapsedSpans) { + from = visualLineNo(cm.doc, from); + to = visualLineEndNo(cm.doc, to); + } + + var different = from != display.viewFrom || to != display.viewTo || + display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth; + adjustView(cm, from, to); + + display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)); + // Position the mover div to align with the current scroll position + cm.display.mover.style.top = display.viewOffset + "px"; + + var toUpdate = countDirtyView(cm); + if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) + { return false } + + // For big changes, we hide the enclosing element during the + // update, since that speeds up the operations on most browsers. + var selSnapshot = selectionSnapshot(cm); + if (toUpdate > 4) { display.lineDiv.style.display = "none"; } + patchDisplay(cm, display.updateLineNumbers, update.dims); + if (toUpdate > 4) { display.lineDiv.style.display = ""; } + display.renderedView = display.view; + // There might have been a widget with a focused element that got + // hidden or updated, if so re-focus it. + restoreSelection(selSnapshot); + + // Prevent selection and cursors from interfering with the scroll + // width and height. + removeChildren(display.cursorDiv); + removeChildren(display.selectionDiv); + display.gutters.style.height = display.sizer.style.minHeight = 0; + + if (different) { + display.lastWrapHeight = update.wrapperHeight; + display.lastWrapWidth = update.wrapperWidth; + startWorker(cm, 400); + } + + display.updateLineNumbers = null; + + return true + } + + function postUpdateDisplay(cm, update) { + var viewport = update.viewport; + + for (var first = true;; first = false) { + if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { + // Clip forced viewport to actual scrollable area. + if (viewport && viewport.top != null) + { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; } + // Updated line heights might result in the drawn area not + // actually covering the viewport. Keep looping until it does. + update.visible = visibleLines(cm.display, cm.doc, viewport); + if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) + { break } + } else if (first) { + update.visible = visibleLines(cm.display, cm.doc, viewport); + } + if (!updateDisplayIfNeeded(cm, update)) { break } + updateHeightsInViewport(cm); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + updateScrollbars(cm, barMeasure); + setDocumentHeight(cm, barMeasure); + update.force = false; + } + + update.signal(cm, "update", cm); + if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { + update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo); + cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo; + } + } + + function updateDisplaySimple(cm, viewport) { + var update = new DisplayUpdate(cm, viewport); + if (updateDisplayIfNeeded(cm, update)) { + updateHeightsInViewport(cm); + postUpdateDisplay(cm, update); + var barMeasure = measureForScrollbars(cm); + updateSelection(cm); + updateScrollbars(cm, barMeasure); + setDocumentHeight(cm, barMeasure); + update.finish(); + } + } + + // Sync the actual display DOM structure with display.view, removing + // nodes for lines that are no longer in view, and creating the ones + // that are not there yet, and updating the ones that are out of + // date. + function patchDisplay(cm, updateNumbersFrom, dims) { + var display = cm.display, lineNumbers = cm.options.lineNumbers; + var container = display.lineDiv, cur = container.firstChild; + + function rm(node) { + var next = node.nextSibling; + // Works around a throw-scroll bug in OS X Webkit + if (webkit && mac && cm.display.currentWheelTarget == node) + { node.style.display = "none"; } + else + { node.parentNode.removeChild(node); } + return next + } + + var view = display.view, lineN = display.viewFrom; + // Loop over the elements in the view, syncing cur (the DOM nodes + // in display.lineDiv) with the view as we go. + for (var i = 0; i < view.length; i++) { + var lineView = view[i]; + if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet + var node = buildLineElement(cm, lineView, lineN, dims); + container.insertBefore(node, cur); + } else { // Already drawn + while (cur != lineView.node) { cur = rm(cur); } + var updateNumber = lineNumbers && updateNumbersFrom != null && + updateNumbersFrom <= lineN && lineView.lineNumber; + if (lineView.changes) { + if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; } + updateLineForChanges(cm, lineView, lineN, dims); + } + if (updateNumber) { + removeChildren(lineView.lineNumber); + lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))); + } + cur = lineView.node.nextSibling; + } + lineN += lineView.size; + } + while (cur) { cur = rm(cur); } + } + + function updateGutterSpace(display) { + var width = display.gutters.offsetWidth; + display.sizer.style.marginLeft = width + "px"; + // Send an event to consumers responding to changes in gutter width. + signalLater(display, "gutterChanged", display); + } + + function setDocumentHeight(cm, measure) { + cm.display.sizer.style.minHeight = measure.docHeight + "px"; + cm.display.heightForcer.style.top = measure.docHeight + "px"; + cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px"; + } + + // Re-align line numbers and gutter marks to compensate for + // horizontal scrolling. + function alignHorizontally(cm) { + var display = cm.display, view = display.view; + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return } + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; + var gutterW = display.gutters.offsetWidth, left = comp + "px"; + for (var i = 0; i < view.length; i++) { if (!view[i].hidden) { + if (cm.options.fixedGutter) { + if (view[i].gutter) + { view[i].gutter.style.left = left; } + if (view[i].gutterBackground) + { view[i].gutterBackground.style.left = left; } + } + var align = view[i].alignable; + if (align) { for (var j = 0; j < align.length; j++) + { align[j].style.left = left; } } + } } + if (cm.options.fixedGutter) + { display.gutters.style.left = (comp + gutterW) + "px"; } + } + + // Used to ensure that the line number gutter is still the right + // size for the current document size. Returns true when an update + // is needed. + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) { return false } + var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")); + var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ""; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1; + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = display.lineNumWidth + "px"; + updateGutterSpace(cm.display); + return true + } + return false + } + + function getGutters(gutters, lineNumbers) { + var result = [], sawLineNumbers = false; + for (var i = 0; i < gutters.length; i++) { + var name = gutters[i], style = null; + if (typeof name != "string") { style = name.style; name = name.className; } + if (name == "CodeMirror-linenumbers") { + if (!lineNumbers) { continue } + else { sawLineNumbers = true; } + } + result.push({className: name, style: style}); + } + if (lineNumbers && !sawLineNumbers) { result.push({className: "CodeMirror-linenumbers", style: null}); } + return result + } + + // Rebuild the gutter elements, ensure the margin to the left of the + // code matches their width. + function renderGutters(display) { + var gutters = display.gutters, specs = display.gutterSpecs; + removeChildren(gutters); + display.lineGutter = null; + for (var i = 0; i < specs.length; ++i) { + var ref = specs[i]; + var className = ref.className; + var style = ref.style; + var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className)); + if (style) { gElt.style.cssText = style; } + if (className == "CodeMirror-linenumbers") { + display.lineGutter = gElt; + gElt.style.width = (display.lineNumWidth || 1) + "px"; + } + } + gutters.style.display = specs.length ? "" : "none"; + updateGutterSpace(display); + } + + function updateGutters(cm) { + renderGutters(cm.display); + regChange(cm); + alignHorizontally(cm); + } + + // The display handles the DOM integration, both for input reading + // and content drawing. It holds references to DOM nodes and + // display-related state. + + function Display(place, doc, input, options) { + var d = this; + this.input = input; + + // Covers bottom-right square when both scrollbars are present. + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); + d.scrollbarFiller.setAttribute("cm-not-content", "true"); + // Covers bottom of gutter when coverGutterNextToScrollbar is on + // and h scrollbar is present. + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); + d.gutterFiller.setAttribute("cm-not-content", "true"); + // Will contain the actual code, positioned to cover the viewport. + d.lineDiv = eltP("div", null, "CodeMirror-code"); + // Elements are added to these to represent selection and cursors. + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); + d.cursorDiv = elt("div", null, "CodeMirror-cursors"); + // A visibility: hidden element used to find the size of things. + d.measure = elt("div", null, "CodeMirror-measure"); + // When lines outside of the viewport are measured, they are drawn in this. + d.lineMeasure = elt("div", null, "CodeMirror-measure"); + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], + null, "position: relative; outline: none"); + var lines = eltP("div", [d.lineSpace], "CodeMirror-lines"); + // Moved around its parent to cover visible view. + d.mover = elt("div", [lines], null, "position: relative"); + // Set to the height of the document, allowing scrolling. + d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); + d.sizerWidth = null; + // Behavior of elts with overflow: auto and padding is + // inconsistent across browsers. This is used to ensure the + // scrollable area is big enough. + d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;"); + // Will contain the gutters, if any. + d.gutters = elt("div", null, "CodeMirror-gutters"); + d.lineGutter = null; + // Actual scrollable element. + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); + d.scroller.setAttribute("tabIndex", "-1"); + // The element in which the editor lives. + d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); + // See #6982. FIXME remove when this has been fixed for a while in Chrome + if (chrome && chrome_version >= 105) { d.wrapper.style.clipPath = "inset(0px)"; } + + // This attribute is respected by automatic translation systems such as Google Translate, + // and may also be respected by tools used by human translators. + d.wrapper.setAttribute('translate', 'no'); + + // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) + if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } + if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; } + + if (place) { + if (place.appendChild) { place.appendChild(d.wrapper); } + else { place(d.wrapper); } + } + + // Current rendered range (may be bigger than the view window). + d.viewFrom = d.viewTo = doc.first; + d.reportedViewFrom = d.reportedViewTo = doc.first; + // Information about the rendered lines. + d.view = []; + d.renderedView = null; + // Holds info about a single rendered line when it was rendered + // for measurement, while not in view. + d.externalMeasured = null; + // Empty space (in pixels) above the view + d.viewOffset = 0; + d.lastWrapHeight = d.lastWrapWidth = 0; + d.updateLineNumbers = null; + + d.nativeBarWidth = d.barHeight = d.barWidth = 0; + d.scrollbarsClipped = false; + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; + // Set to true when a non-horizontal-scrolling line widget is + // added. As an optimization, line widget aligning is skipped when + // this is false. + d.alignWidgets = false; + + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null; + d.maxLineLength = 0; + d.maxLineChanged = false; + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; + + // True when shift is held down. + d.shift = false; + + // Used to track whether anything happened since the context menu + // was opened. + d.selForContextMenu = null; + + d.activeTouch = null; + + d.gutterSpecs = getGutters(options.gutters, options.lineNumbers); + renderGutters(d); + + input.init(d); + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + var wheelSamples = 0, wheelPixelsPerUnit = null; + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) { wheelPixelsPerUnit = -.53; } + else if (gecko) { wheelPixelsPerUnit = 15; } + else if (chrome) { wheelPixelsPerUnit = -.7; } + else if (safari) { wheelPixelsPerUnit = -1/3; } + + function wheelEventDelta(e) { + var dx = e.wheelDeltaX, dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; } + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; } + else if (dy == null) { dy = e.wheelDelta; } + return {x: dx, y: dy} + } + function wheelEventPixels(e) { + var delta = wheelEventDelta(e); + delta.x *= wheelPixelsPerUnit; + delta.y *= wheelPixelsPerUnit; + return delta + } + + function onScrollWheel(cm, e) { + // On Chrome 102, viewport updates somehow stop wheel-based + // scrolling. Turning off pointer events during the scroll seems + // to avoid the issue. + if (chrome && chrome_version == 102) { + if (cm.display.chromeScrollHack == null) { cm.display.sizer.style.pointerEvents = "none"; } + else { clearTimeout(cm.display.chromeScrollHack); } + cm.display.chromeScrollHack = setTimeout(function () { + cm.display.chromeScrollHack = null; + cm.display.sizer.style.pointerEvents = ""; + }, 100); + } + var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y; + var pixelsPerUnit = wheelPixelsPerUnit; + if (e.deltaMode === 0) { + dx = e.deltaX; + dy = e.deltaY; + pixelsPerUnit = 1; + } + + var display = cm.display, scroll = display.scroller; + // Quit if there's nothing to scroll here + var canScrollX = scroll.scrollWidth > scroll.clientWidth; + var canScrollY = scroll.scrollHeight > scroll.clientHeight; + if (!(dx && canScrollX || dy && canScrollY)) { return } + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { + for (var i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur; + break outer + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && pixelsPerUnit != null) { + if (dy && canScrollY) + { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)); } + setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit)); + // Only prevent default scrolling if vertical scrolling is + // actually possible. Otherwise, it causes vertical scroll + // jitter on OSX trackpads when deltaX is small and deltaY + // is large (issue #3579) + if (!dy || (dy && canScrollY)) + { e_preventDefault(e); } + display.wheelStartX = null; // Abort measurement, if in progress + return + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && pixelsPerUnit != null) { + var pixels = dy * pixelsPerUnit; + var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; + if (pixels < 0) { top = Math.max(0, top + pixels - 50); } + else { bot = Math.min(cm.doc.height, bot + pixels + 50); } + updateDisplaySimple(cm, {top: top, bottom: bot}); + } + + if (wheelSamples < 20 && e.deltaMode !== 0) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; + display.wheelDX = dx; display.wheelDY = dy; + setTimeout(function () { + if (display.wheelStartX == null) { return } + var movedX = scroll.scrollLeft - display.wheelStartX; + var movedY = scroll.scrollTop - display.wheelStartY; + var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX); + display.wheelStartX = display.wheelStartY = null; + if (!sample) { return } + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + display.wheelDX += dx; display.wheelDY += dy; + } + } + } + + // Selection objects are immutable. A new one is created every time + // the selection changes. A selection is one or more non-overlapping + // (and non-touching) ranges, sorted, and an integer that indicates + // which one is the primary selection (the one that's scrolled into + // view, that getCursor returns, etc). + var Selection = function(ranges, primIndex) { + this.ranges = ranges; + this.primIndex = primIndex; + }; + + Selection.prototype.primary = function () { return this.ranges[this.primIndex] }; + + Selection.prototype.equals = function (other) { + if (other == this) { return true } + if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false } + for (var i = 0; i < this.ranges.length; i++) { + var here = this.ranges[i], there = other.ranges[i]; + if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false } + } + return true + }; + + Selection.prototype.deepCopy = function () { + var out = []; + for (var i = 0; i < this.ranges.length; i++) + { out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)); } + return new Selection(out, this.primIndex) + }; + + Selection.prototype.somethingSelected = function () { + for (var i = 0; i < this.ranges.length; i++) + { if (!this.ranges[i].empty()) { return true } } + return false + }; + + Selection.prototype.contains = function (pos, end) { + if (!end) { end = pos; } + for (var i = 0; i < this.ranges.length; i++) { + var range = this.ranges[i]; + if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) + { return i } + } + return -1 + }; + + var Range = function(anchor, head) { + this.anchor = anchor; this.head = head; + }; + + Range.prototype.from = function () { return minPos(this.anchor, this.head) }; + Range.prototype.to = function () { return maxPos(this.anchor, this.head) }; + Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch }; + + // Take an unsorted, potentially overlapping set of ranges, and + // build a selection out of it. 'Consumes' ranges array (modifying + // it). + function normalizeSelection(cm, ranges, primIndex) { + var mayTouch = cm && cm.options.selectionsMayTouch; + var prim = ranges[primIndex]; + ranges.sort(function (a, b) { return cmp(a.from(), b.from()); }); + primIndex = indexOf(ranges, prim); + for (var i = 1; i < ranges.length; i++) { + var cur = ranges[i], prev = ranges[i - 1]; + var diff = cmp(prev.to(), cur.from()); + if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) { + var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()); + var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head; + if (i <= primIndex) { --primIndex; } + ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)); + } + } + return new Selection(ranges, primIndex) + } + + function simpleSelection(anchor, head) { + return new Selection([new Range(anchor, head || anchor)], 0) + } + + // Compute the position of the end of a change (its 'to' property + // refers to the pre-change end). + function changeEnd(change) { + if (!change.text) { return change.to } + return Pos(change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)) + } + + // Adjust a position to refer to the post-change position of the + // same text, or the end of the change if the change covers it. + function adjustForChange(pos, change) { + if (cmp(pos, change.from) < 0) { return pos } + if (cmp(pos, change.to) <= 0) { return changeEnd(change) } + + var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; + if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; } + return Pos(line, ch) + } + + function computeSelAfterChange(doc, change) { + var out = []; + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i]; + out.push(new Range(adjustForChange(range.anchor, change), + adjustForChange(range.head, change))); + } + return normalizeSelection(doc.cm, out, doc.sel.primIndex) + } + + function offsetPos(pos, old, nw) { + if (pos.line == old.line) + { return Pos(nw.line, pos.ch - old.ch + nw.ch) } + else + { return Pos(nw.line + (pos.line - old.line), pos.ch) } + } + + // Used by replaceSelections to allow moving the selection to the + // start or around the replaced test. Hint may be "start" or "around". + function computeReplacedSel(doc, changes, hint) { + var out = []; + var oldPrev = Pos(doc.first, 0), newPrev = oldPrev; + for (var i = 0; i < changes.length; i++) { + var change = changes[i]; + var from = offsetPos(change.from, oldPrev, newPrev); + var to = offsetPos(changeEnd(change), oldPrev, newPrev); + oldPrev = change.to; + newPrev = to; + if (hint == "around") { + var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0; + out[i] = new Range(inv ? to : from, inv ? from : to); + } else { + out[i] = new Range(from, from); + } + } + return new Selection(out, doc.sel.primIndex) + } + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + cm.doc.mode = getMode(cm.options, cm.doc.modeOption); + resetModeState(cm); + } + + function resetModeState(cm) { + cm.doc.iter(function (line) { + if (line.stateAfter) { line.stateAfter = null; } + if (line.styles) { line.styles = null; } + }); + cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first; + startWorker(cm, 100); + cm.state.modeGen++; + if (cm.curOp) { regChange(cm); } + } + + // DOCUMENT DATA STRUCTURE + + // By default, updates that start and end at the beginning of a line + // are treated specially, in order to make the association of line + // widgets and marker elements with the text behave more intuitive. + function isWholeLineUpdate(doc, change) { + return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore) + } + + // Perform a change on the document data structure. + function updateDoc(doc, change, markedSpans, estimateHeight) { + function spansFor(n) {return markedSpans ? markedSpans[n] : null} + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight); + signalLater(line, "change", line, change); + } + function linesFor(start, end) { + var result = []; + for (var i = start; i < end; ++i) + { result.push(new Line(text[i], spansFor(i), estimateHeight)); } + return result + } + + var from = change.from, to = change.to, text = change.text; + var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); + var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; + + // Adjust the line structure + if (change.full) { + doc.insert(0, linesFor(0, text.length)); + doc.remove(text.length, doc.size - text.length); + } else if (isWholeLineUpdate(doc, change)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + var added = linesFor(0, text.length - 1); + update(lastLine, lastLine.text, lastSpans); + if (nlines) { doc.remove(from.line, nlines); } + if (added.length) { doc.insert(from.line, added); } + } else if (firstLine == lastLine) { + if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); + } else { + var added$1 = linesFor(1, text.length - 1); + added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + doc.insert(from.line + 1, added$1); + } + } else if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); + doc.remove(from.line + 1, nlines); + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); + var added$2 = linesFor(1, text.length - 1); + if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); } + doc.insert(from.line + 1, added$2); + } + + signalLater(doc, "change", doc, change); + } + + // Call f for all linked documents. + function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) { + var rel = doc.linked[i]; + if (rel.doc == skip) { continue } + var shared = sharedHist && rel.sharedHist; + if (sharedHistOnly && !shared) { continue } + f(rel.doc, shared); + propagate(rel.doc, doc, shared); + } } + } + propagate(doc, null, true); + } + + // Attach a document to an editor. + function attachDoc(cm, doc) { + if (doc.cm) { throw new Error("This document is already in use.") } + cm.doc = doc; + doc.cm = cm; + estimateLineHeights(cm); + loadMode(cm); + setDirectionClass(cm); + cm.options.direction = doc.direction; + if (!cm.options.lineWrapping) { findMaxLine(cm); } + cm.options.mode = doc.modeOption; + regChange(cm); + } + + function setDirectionClass(cm) { + (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl"); + } + + function directionChanged(cm) { + runInOp(cm, function () { + setDirectionClass(cm); + regChange(cm); + }); + } + + function History(prev) { + // Arrays of change events and selections. Doing something adds an + // event to done and clears undo. Undoing moves events from done + // to undone, redoing moves them in the other direction. + this.done = []; this.undone = []; + this.undoDepth = prev ? prev.undoDepth : Infinity; + // Used to track when changes can be merged into a single undo + // event + this.lastModTime = this.lastSelTime = 0; + this.lastOp = this.lastSelOp = null; + this.lastOrigin = this.lastSelOrigin = null; + // Used by the isClean() method + this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1; + } + + // Create a history change event from an updateDoc-style change + // object. + function historyChangeFromChange(doc, change) { + var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); + linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true); + return histChange + } + + // Pop all selection events off the end of a history array. Stop at + // a change event. + function clearSelectionEvents(array) { + while (array.length) { + var last = lst(array); + if (last.ranges) { array.pop(); } + else { break } + } + } + + // Find the top change event in the history. Pop off selection + // events that are in the way. + function lastChangeEvent(hist, force) { + if (force) { + clearSelectionEvents(hist.done); + return lst(hist.done) + } else if (hist.done.length && !lst(hist.done).ranges) { + return lst(hist.done) + } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { + hist.done.pop(); + return lst(hist.done) + } + } + + // Register a change in the history. Merges changes that are within + // a single operation, or are close together with an origin that + // allows merging (starting with "+") into a single event. + function addChangeToHistory(doc, change, selAfter, opId) { + var hist = doc.history; + hist.undone.length = 0; + var time = +new Date, cur; + var last; + + if ((hist.lastOp == opId || + hist.lastOrigin == change.origin && change.origin && + ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) || + change.origin.charAt(0) == "*")) && + (cur = lastChangeEvent(hist, hist.lastOp == opId))) { + // Merge this change into the last event + last = lst(cur.changes); + if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change); + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)); + } + } else { + // Can not be merged, start a new event. + var before = lst(hist.done); + if (!before || !before.ranges) + { pushSelectionToHistory(doc.sel, hist.done); } + cur = {changes: [historyChangeFromChange(doc, change)], + generation: hist.generation}; + hist.done.push(cur); + while (hist.done.length > hist.undoDepth) { + hist.done.shift(); + if (!hist.done[0].ranges) { hist.done.shift(); } + } + } + hist.done.push(selAfter); + hist.generation = ++hist.maxGeneration; + hist.lastModTime = hist.lastSelTime = time; + hist.lastOp = hist.lastSelOp = opId; + hist.lastOrigin = hist.lastSelOrigin = change.origin; + + if (!last) { signal(doc, "historyAdded"); } + } + + function selectionEventCanBeMerged(doc, origin, prev, sel) { + var ch = origin.charAt(0); + return ch == "*" || + ch == "+" && + prev.ranges.length == sel.ranges.length && + prev.somethingSelected() == sel.somethingSelected() && + new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500) + } + + // Called whenever the selection changes, sets the new selection as + // the pending selection in the history, and pushes the old pending + // selection into the 'done' array when it was significantly + // different (in number of selected ranges, emptiness, or time). + function addSelectionToHistory(doc, sel, opId, options) { + var hist = doc.history, origin = options && options.origin; + + // A new event is started when the previous origin does not match + // the current, or the origins don't allow matching. Origins + // starting with * are always merged, those starting with + are + // merged when similar and close together in time. + if (opId == hist.lastSelOp || + (origin && hist.lastSelOrigin == origin && + (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || + selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) + { hist.done[hist.done.length - 1] = sel; } + else + { pushSelectionToHistory(sel, hist.done); } + + hist.lastSelTime = +new Date; + hist.lastSelOrigin = origin; + hist.lastSelOp = opId; + if (options && options.clearRedo !== false) + { clearSelectionEvents(hist.undone); } + } + + function pushSelectionToHistory(sel, dest) { + var top = lst(dest); + if (!(top && top.ranges && top.equals(sel))) + { dest.push(sel); } + } + + // Used to store marked span information in the history. + function attachLocalSpans(doc, change, from, to) { + var existing = change["spans_" + doc.id], n = 0; + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) { + if (line.markedSpans) + { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; } + ++n; + }); + } + + // When un/re-doing restores text containing marked spans, those + // that have been explicitly cleared should not be restored. + function removeClearedSpans(spans) { + if (!spans) { return null } + var out; + for (var i = 0; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } } + else if (out) { out.push(spans[i]); } + } + return !out ? spans : out.length ? out : null + } + + // Retrieve and filter the old marked spans stored in a change event. + function getOldSpans(doc, change) { + var found = change["spans_" + doc.id]; + if (!found) { return null } + var nw = []; + for (var i = 0; i < change.text.length; ++i) + { nw.push(removeClearedSpans(found[i])); } + return nw + } + + // Used for un/re-doing changes from the history. Combines the + // result of computing the existing spans with the set of spans that + // existed in the history (so that deleting around a span and then + // undoing brings back the span). + function mergeOldSpans(doc, change) { + var old = getOldSpans(doc, change); + var stretched = stretchSpansOverChange(doc, change); + if (!old) { return stretched } + if (!stretched) { return old } + + for (var i = 0; i < old.length; ++i) { + var oldCur = old[i], stretchCur = stretched[i]; + if (oldCur && stretchCur) { + spans: for (var j = 0; j < stretchCur.length; ++j) { + var span = stretchCur[j]; + for (var k = 0; k < oldCur.length; ++k) + { if (oldCur[k].marker == span.marker) { continue spans } } + oldCur.push(span); + } + } else if (stretchCur) { + old[i] = stretchCur; + } + } + return old + } + + // Used both to provide a JSON-safe object in .getHistory, and, when + // detaching a document, to split the history in two + function copyHistoryArray(events, newGroup, instantiateSel) { + var copy = []; + for (var i = 0; i < events.length; ++i) { + var event = events[i]; + if (event.ranges) { + copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event); + continue + } + var changes = event.changes, newChanges = []; + copy.push({changes: newChanges}); + for (var j = 0; j < changes.length; ++j) { + var change = changes[j], m = (void 0); + newChanges.push({from: change.from, to: change.to, text: change.text}); + if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop]; + delete change[prop]; + } + } } } + } + } + return copy + } + + // The 'scroll' parameter given to many of these indicated whether + // the new cursor position should be scrolled into view after + // modifying the selection. + + // If shift is held or the extend flag is set, extends a range to + // include a given position (and optionally a second position). + // Otherwise, simply returns the range between the given positions. + // Used for cursor motion and such. + function extendRange(range, head, other, extend) { + if (extend) { + var anchor = range.anchor; + if (other) { + var posBefore = cmp(head, anchor) < 0; + if (posBefore != (cmp(other, anchor) < 0)) { + anchor = head; + head = other; + } else if (posBefore != (cmp(head, other) < 0)) { + head = other; + } + } + return new Range(anchor, head) + } else { + return new Range(other || head, head) + } + } + + // Extend the primary selection range, discard the rest. + function extendSelection(doc, head, other, options, extend) { + if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); } + setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options); + } + + // Extend all selections (pos is an array of selections with length + // equal the number of selections) + function extendSelections(doc, heads, options) { + var out = []; + var extend = doc.cm && (doc.cm.display.shift || doc.extend); + for (var i = 0; i < doc.sel.ranges.length; i++) + { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); } + var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex); + setSelection(doc, newSel, options); + } + + // Updates a single range in the selection. + function replaceOneSelection(doc, i, range, options) { + var ranges = doc.sel.ranges.slice(0); + ranges[i] = range; + setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options); + } + + // Reset the selection to a single range. + function setSimpleSelection(doc, anchor, head, options) { + setSelection(doc, simpleSelection(anchor, head), options); + } + + // Give beforeSelectionChange handlers a change to influence a + // selection update. + function filterSelectionChange(doc, sel, options) { + var obj = { + ranges: sel.ranges, + update: function(ranges) { + this.ranges = []; + for (var i = 0; i < ranges.length; i++) + { this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), + clipPos(doc, ranges[i].head)); } + }, + origin: options && options.origin + }; + signal(doc, "beforeSelectionChange", doc, obj); + if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); } + if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) } + else { return sel } + } + + function setSelectionReplaceHistory(doc, sel, options) { + var done = doc.history.done, last = lst(done); + if (last && last.ranges) { + done[done.length - 1] = sel; + setSelectionNoUndo(doc, sel, options); + } else { + setSelection(doc, sel, options); + } + } + + // Set a new selection. + function setSelection(doc, sel, options) { + setSelectionNoUndo(doc, sel, options); + addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options); + } + + function setSelectionNoUndo(doc, sel, options) { + if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) + { sel = filterSelectionChange(doc, sel, options); } + + var bias = options && options.bias || + (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1); + setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)); + + if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor") + { ensureCursorVisible(doc.cm); } + } + + function setSelectionInner(doc, sel) { + if (sel.equals(doc.sel)) { return } + + doc.sel = sel; + + if (doc.cm) { + doc.cm.curOp.updateInput = 1; + doc.cm.curOp.selectionChanged = true; + signalCursorActivity(doc.cm); + } + signalLater(doc, "cursorActivity", doc); + } + + // Verify that the selection does not partially select any atomic + // marked ranges. + function reCheckSelection(doc) { + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false)); + } + + // Return a selection that does not partially select any atomic + // ranges. + function skipAtomicInSelection(doc, sel, bias, mayClear) { + var out; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i]; + var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear); + var newHead = range.head == range.anchor ? newAnchor : skipAtomic(doc, range.head, old && old.head, bias, mayClear); + if (out || newAnchor != range.anchor || newHead != range.head) { + if (!out) { out = sel.ranges.slice(0, i); } + out[i] = new Range(newAnchor, newHead); + } + } + return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel + } + + function skipAtomicInner(doc, pos, oldPos, dir, mayClear) { + var line = getLine(doc, pos.line); + if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) { + var sp = line.markedSpans[i], m = sp.marker; + + // Determine if we should prevent the cursor being placed to the left/right of an atomic marker + // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it + // is with selectLeft/Right + var preventCursorLeft = ("selectLeft" in m) ? !m.selectLeft : m.inclusiveLeft; + var preventCursorRight = ("selectRight" in m) ? !m.selectRight : m.inclusiveRight; + + if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && + (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) { + if (mayClear) { + signal(m, "beforeCursorEnter"); + if (m.explicitlyCleared) { + if (!line.markedSpans) { break } + else {--i; continue} + } + } + if (!m.atomic) { continue } + + if (oldPos) { + var near = m.find(dir < 0 ? 1 : -1), diff = (void 0); + if (dir < 0 ? preventCursorRight : preventCursorLeft) + { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); } + if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0)) + { return skipAtomicInner(doc, near, pos, dir, mayClear) } + } + + var far = m.find(dir < 0 ? -1 : 1); + if (dir < 0 ? preventCursorLeft : preventCursorRight) + { far = movePos(doc, far, dir, far.line == pos.line ? line : null); } + return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null + } + } } + return pos + } + + // Ensure a given position is not inside an atomic range. + function skipAtomic(doc, pos, oldPos, bias, mayClear) { + var dir = bias || 1; + var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) || + skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true)); + if (!found) { + doc.cantEdit = true; + return Pos(doc.first, 0) + } + return found + } + + function movePos(doc, pos, dir, line) { + if (dir < 0 && pos.ch == 0) { + if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) } + else { return null } + } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) { + if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) } + else { return null } + } else { + return new Pos(pos.line, pos.ch + dir) + } + } + + function selectAll(cm) { + cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll); + } + + // UPDATING + + // Allow "beforeChange" event handlers to influence a change + function filterChange(doc, change, update) { + var obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: function () { return obj.canceled = true; } + }; + if (update) { obj.update = function (from, to, text, origin) { + if (from) { obj.from = clipPos(doc, from); } + if (to) { obj.to = clipPos(doc, to); } + if (text) { obj.text = text; } + if (origin !== undefined) { obj.origin = origin; } + }; } + signal(doc, "beforeChange", doc, obj); + if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); } + + if (obj.canceled) { + if (doc.cm) { doc.cm.curOp.updateInput = 2; } + return null + } + return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin} + } + + // Apply a change to a document, and add it to the document's + // history, and propagating it to all linked documents. + function makeChange(doc, change, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) } + if (doc.cm.state.suppressEdits) { return } + } + + if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { + change = filterChange(doc, change, true); + if (!change) { return } + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); + if (split) { + for (var i = split.length - 1; i >= 0; --i) + { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); } + } else { + makeChangeInner(doc, change); + } + } + + function makeChangeInner(doc, change) { + if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return } + var selAfter = computeSelAfterChange(doc, change); + addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); + var rebased = []; + + linkedDocs(doc, function (doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); + }); + } + + // Revert a change stored in a document's history. + function makeChangeFromHistory(doc, type, allowSelectionOnly) { + var suppress = doc.cm && doc.cm.state.suppressEdits; + if (suppress && !allowSelectionOnly) { return } + + var hist = doc.history, event, selAfter = doc.sel; + var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done; + + // Verify that there is a useable event (so that ctrl-z won't + // needlessly clear selection events) + var i = 0; + for (; i < source.length; i++) { + event = source[i]; + if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) + { break } + } + if (i == source.length) { return } + hist.lastOrigin = hist.lastSelOrigin = null; + + for (;;) { + event = source.pop(); + if (event.ranges) { + pushSelectionToHistory(event, dest); + if (allowSelectionOnly && !event.equals(doc.sel)) { + setSelection(doc, event, {clearRedo: false}); + return + } + selAfter = event; + } else if (suppress) { + source.push(event); + return + } else { break } + } + + // Build up a reverse change object to add to the opposite history + // stack (redo when undoing, and vice versa). + var antiChanges = []; + pushSelectionToHistory(selAfter, dest); + dest.push({changes: antiChanges, generation: hist.generation}); + hist.generation = event.generation || ++hist.maxGeneration; + + var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); + + var loop = function ( i ) { + var change = event.changes[i]; + change.origin = type; + if (filter && !filterChange(doc, change, false)) { + source.length = 0; + return {} + } + + antiChanges.push(historyChangeFromChange(doc, change)); + + var after = i ? computeSelAfterChange(doc, change) : lst(source); + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); + if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); } + var rebased = []; + + // Propagate to the linked documents + linkedDocs(doc, function (doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); + }); + }; + + for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) { + var returned = loop( i$1 ); + + if ( returned ) return returned.v; + } + } + + // Sub-views need their line numbers shifted when text is added + // above or below them in the parent document. + function shiftDoc(doc, distance) { + if (distance == 0) { return } + doc.first += distance; + doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range( + Pos(range.anchor.line + distance, range.anchor.ch), + Pos(range.head.line + distance, range.head.ch) + ); }), doc.sel.primIndex); + if (doc.cm) { + regChange(doc.cm, doc.first, doc.first - distance, distance); + for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) + { regLineChange(doc.cm, l, "gutter"); } + } + } + + // More lower-level change function, handling only a single document + // (not linked ones). + function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) + { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) } + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); + return + } + if (change.from.line > doc.lastLine()) { return } + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + var shift = change.text.length - 1 - (doc.first - change.from.line); + shiftDoc(doc, shift); + change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], origin: change.origin}; + } + var last = doc.lastLine(); + if (change.to.line > last) { + change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], origin: change.origin}; + } + + change.removed = getBetween(doc, change.from, change.to); + + if (!selAfter) { selAfter = computeSelAfterChange(doc, change); } + if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); } + else { updateDoc(doc, change, spans); } + setSelectionNoUndo(doc, selAfter, sel_dontScroll); + + if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0))) + { doc.cantEdit = false; } + } + + // Handle the interaction of a change to a document with the editor + // that this document is part of. + function makeChangeSingleDocInEditor(cm, change, spans) { + var doc = cm.doc, display = cm.display, from = change.from, to = change.to; + + var recomputeMaxLength = false, checkWidthStart = from.line; + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(getLine(doc, from.line))); + doc.iter(checkWidthStart, to.line + 1, function (line) { + if (line == display.maxLine) { + recomputeMaxLength = true; + return true + } + }); + } + + if (doc.sel.contains(change.from, change.to) > -1) + { signalCursorActivity(cm); } + + updateDoc(doc, change, spans, estimateHeight(cm)); + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, function (line) { + var len = lineLength(line); + if (len > display.maxLineLength) { + display.maxLine = line; + display.maxLineLength = len; + display.maxLineChanged = true; + recomputeMaxLength = false; + } + }); + if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; } + } + + retreatFrontier(doc, from.line); + startWorker(cm, 400); + + var lendiff = change.text.length - (to.line - from.line) - 1; + // Remember that these lines changed, for updating the display + if (change.full) + { regChange(cm); } + else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) + { regLineChange(cm, from.line, "text"); } + else + { regChange(cm, from.line, to.line + 1, lendiff); } + + var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change"); + if (changeHandler || changesHandler) { + var obj = { + from: from, to: to, + text: change.text, + removed: change.removed, + origin: change.origin + }; + if (changeHandler) { signalLater(cm, "change", cm, obj); } + if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); } + } + cm.display.selForContextMenu = null; + } + + function replaceRange(doc, code, from, to, origin) { + var assign; + + if (!to) { to = from; } + if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); } + if (typeof code == "string") { code = doc.splitLines(code); } + makeChange(doc, {from: from, to: to, text: code, origin: origin}); + } + + // Rebasing/resetting history to deal with externally-sourced changes + + function rebaseHistSelSingle(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff; + } else if (from < pos.line) { + pos.line = from; + pos.ch = 0; + } + } + + // Tries to rebase an array of history events given a change in the + // document. If the change touches the same lines as the event, the + // event, and everything 'behind' it, is discarded. If the change is + // before the event, the event's positions are updated. Uses a + // copy-on-write scheme for the positions, to avoid having to + // reallocate them all on every rebase, but also avoid problems with + // shared position objects being unsafely updated. + function rebaseHistArray(array, from, to, diff) { + for (var i = 0; i < array.length; ++i) { + var sub = array[i], ok = true; + if (sub.ranges) { + if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; } + for (var j = 0; j < sub.ranges.length; j++) { + rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff); + rebaseHistSelSingle(sub.ranges[j].head, from, to, diff); + } + continue + } + for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) { + var cur = sub.changes[j$1]; + if (to < cur.from.line) { + cur.from = Pos(cur.from.line + diff, cur.from.ch); + cur.to = Pos(cur.to.line + diff, cur.to.ch); + } else if (from <= cur.to.line) { + ok = false; + break + } + } + if (!ok) { + array.splice(0, i + 1); + i = 0; + } + } + } + + function rebaseHist(hist, change) { + var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; + rebaseHistArray(hist.done, from, to, diff); + rebaseHistArray(hist.undone, from, to, diff); + } + + // Utility for applying a change to a line by handle or number, + // returning the number and optionally registering the line as + // changed. + function changeLine(doc, handle, changeType, op) { + var no = handle, line = handle; + if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); } + else { no = lineNo(handle); } + if (no == null) { return null } + if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); } + return line + } + + // The document is represented as a BTree consisting of leaves, with + // chunk of lines in them, and branches, with up to ten leaves or + // other branch nodes below them. The top node is always a branch + // node, and is the document object itself (meaning it has + // additional methods and properties). + // + // All nodes have parent links. The tree is used both to go from + // line numbers to line objects, and to go from objects to numbers. + // It also indexes by height, and is used to convert between height + // and line object, and to find the total height of the document. + // + // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html + + function LeafChunk(lines) { + this.lines = lines; + this.parent = null; + var height = 0; + for (var i = 0; i < lines.length; ++i) { + lines[i].parent = this; + height += lines[i].height; + } + this.height = height; + } + + LeafChunk.prototype = { + chunkSize: function() { return this.lines.length }, + + // Remove the n lines at offset 'at'. + removeInner: function(at, n) { + for (var i = at, e = at + n; i < e; ++i) { + var line = this.lines[i]; + this.height -= line.height; + cleanUpLine(line); + signalLater(line, "delete"); + } + this.lines.splice(at, n); + }, + + // Helper used to collapse a small branch into a single leaf. + collapse: function(lines) { + lines.push.apply(lines, this.lines); + }, + + // Insert the given array of lines at offset 'at', count them as + // having the given height. + insertInner: function(at, lines, height) { + this.height += height; + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); + for (var i = 0; i < lines.length; ++i) { lines[i].parent = this; } + }, + + // Used to iterate over a part of the tree. + iterN: function(at, n, op) { + for (var e = at + n; at < e; ++at) + { if (op(this.lines[at])) { return true } } + } + }; + + function BranchChunk(children) { + this.children = children; + var size = 0, height = 0; + for (var i = 0; i < children.length; ++i) { + var ch = children[i]; + size += ch.chunkSize(); height += ch.height; + ch.parent = this; + } + this.size = size; + this.height = height; + this.parent = null; + } + + BranchChunk.prototype = { + chunkSize: function() { return this.size }, + + removeInner: function(at, n) { + this.size -= n; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var rm = Math.min(n, sz - at), oldHeight = child.height; + child.removeInner(at, rm); + this.height -= oldHeight - child.height; + if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } + if ((n -= rm) == 0) { break } + at = 0; + } else { at -= sz; } + } + // If the result is smaller than 25 lines, ensure that it is a + // single leaf node. + if (this.size - n < 25 && + (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { + var lines = []; + this.collapse(lines); + this.children = [new LeafChunk(lines)]; + this.children[0].parent = this; + } + }, + + collapse: function(lines) { + for (var i = 0; i < this.children.length; ++i) { this.children[i].collapse(lines); } + }, + + insertInner: function(at, lines, height) { + this.size += lines.length; + this.height += height; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at <= sz) { + child.insertInner(at, lines, height); + if (child.lines && child.lines.length > 50) { + // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced. + // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest. + var remaining = child.lines.length % 25 + 25; + for (var pos = remaining; pos < child.lines.length;) { + var leaf = new LeafChunk(child.lines.slice(pos, pos += 25)); + child.height -= leaf.height; + this.children.splice(++i, 0, leaf); + leaf.parent = this; + } + child.lines = child.lines.slice(0, remaining); + this.maybeSpill(); + } + break + } + at -= sz; + } + }, + + // When a node has grown, check whether it should be split. + maybeSpill: function() { + if (this.children.length <= 10) { return } + var me = this; + do { + var spilled = me.children.splice(me.children.length - 5, 5); + var sibling = new BranchChunk(spilled); + if (!me.parent) { // Become the parent node + var copy = new BranchChunk(me.children); + copy.parent = me; + me.children = [copy, sibling]; + me = copy; + } else { + me.size -= sibling.size; + me.height -= sibling.height; + var myIndex = indexOf(me.parent.children, me); + me.parent.children.splice(myIndex + 1, 0, sibling); + } + sibling.parent = me.parent; + } while (me.children.length > 10) + me.parent.maybeSpill(); + }, + + iterN: function(at, n, op) { + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var used = Math.min(n, sz - at); + if (child.iterN(at, used, op)) { return true } + if ((n -= used) == 0) { break } + at = 0; + } else { at -= sz; } + } + } + }; + + // Line widgets are block elements displayed above or below a line. + + var LineWidget = function(doc, node, options) { + if (options) { for (var opt in options) { if (options.hasOwnProperty(opt)) + { this[opt] = options[opt]; } } } + this.doc = doc; + this.node = node; + }; + + LineWidget.prototype.clear = function () { + var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line); + if (no == null || !ws) { return } + for (var i = 0; i < ws.length; ++i) { if (ws[i] == this) { ws.splice(i--, 1); } } + if (!ws.length) { line.widgets = null; } + var height = widgetHeight(this); + updateLineHeight(line, Math.max(0, line.height - height)); + if (cm) { + runInOp(cm, function () { + adjustScrollWhenAboveVisible(cm, line, -height); + regLineChange(cm, no, "widget"); + }); + signalLater(cm, "lineWidgetCleared", cm, this, no); + } + }; + + LineWidget.prototype.changed = function () { + var this$1 = this; + + var oldH = this.height, cm = this.doc.cm, line = this.line; + this.height = null; + var diff = widgetHeight(this) - oldH; + if (!diff) { return } + if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); } + if (cm) { + runInOp(cm, function () { + cm.curOp.forceUpdate = true; + adjustScrollWhenAboveVisible(cm, line, diff); + signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line)); + }); + } + }; + eventMixin(LineWidget); + + function adjustScrollWhenAboveVisible(cm, line, diff) { + if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) + { addToScrollTop(cm, diff); } + } + + function addLineWidget(doc, handle, node, options) { + var widget = new LineWidget(doc, node, options); + var cm = doc.cm; + if (cm && widget.noHScroll) { cm.display.alignWidgets = true; } + changeLine(doc, handle, "widget", function (line) { + var widgets = line.widgets || (line.widgets = []); + if (widget.insertAt == null) { widgets.push(widget); } + else { widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget); } + widget.line = line; + if (cm && !lineIsHidden(doc, line)) { + var aboveVisible = heightAtLine(line) < doc.scrollTop; + updateLineHeight(line, line.height + widgetHeight(widget)); + if (aboveVisible) { addToScrollTop(cm, widget.height); } + cm.curOp.forceUpdate = true; + } + return true + }); + if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); } + return widget + } + + // TEXTMARKERS + + // Created with markText and setBookmark methods. A TextMarker is a + // handle that can be used to clear or find a marked position in the + // document. Line objects hold arrays (markedSpans) containing + // {from, to, marker} object pointing to such marker objects, and + // indicating that such a marker is present on that line. Multiple + // lines may point to the same marker when it spans across lines. + // The spans will have null for their from/to properties when the + // marker continues beyond the start/end of the line. Markers have + // links back to the lines they currently touch. + + // Collapsed markers have unique ids, in order to be able to order + // them, which is needed for uniquely determining an outer marker + // when they overlap (they may nest, but not partially overlap). + var nextMarkerId = 0; + + var TextMarker = function(doc, type) { + this.lines = []; + this.type = type; + this.doc = doc; + this.id = ++nextMarkerId; + }; + + // Clear the marker. + TextMarker.prototype.clear = function () { + if (this.explicitlyCleared) { return } + var cm = this.doc.cm, withOp = cm && !cm.curOp; + if (withOp) { startOperation(cm); } + if (hasHandler(this, "clear")) { + var found = this.find(); + if (found) { signalLater(this, "clear", found.from, found.to); } + } + var min = null, max = null; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (cm && !this.collapsed) { regLineChange(cm, lineNo(line), "text"); } + else if (cm) { + if (span.to != null) { max = lineNo(line); } + if (span.from != null) { min = lineNo(line); } + } + line.markedSpans = removeMarkedSpan(line.markedSpans, span); + if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) + { updateLineHeight(line, textHeight(cm.display)); } + } + if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) { + var visual = visualLine(this.lines[i$1]), len = lineLength(visual); + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual; + cm.display.maxLineLength = len; + cm.display.maxLineChanged = true; + } + } } + + if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); } + this.lines.length = 0; + this.explicitlyCleared = true; + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false; + if (cm) { reCheckSelection(cm.doc); } + } + if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); } + if (withOp) { endOperation(cm); } + if (this.parent) { this.parent.clear(); } + }; + + // Find the position of the marker in the document. Returns a {from, + // to} object by default. Side can be passed to get a specific side + // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the + // Pos objects returned contain a line object, rather than a line + // number (used to prevent looking up the same line twice). + TextMarker.prototype.find = function (side, lineObj) { + if (side == null && this.type == "bookmark") { side = 1; } + var from, to; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (span.from != null) { + from = Pos(lineObj ? line : lineNo(line), span.from); + if (side == -1) { return from } + } + if (span.to != null) { + to = Pos(lineObj ? line : lineNo(line), span.to); + if (side == 1) { return to } + } + } + return from && {from: from, to: to} + }; + + // Signals that the marker's widget changed, and surrounding layout + // should be recomputed. + TextMarker.prototype.changed = function () { + var this$1 = this; + + var pos = this.find(-1, true), widget = this, cm = this.doc.cm; + if (!pos || !cm) { return } + runInOp(cm, function () { + var line = pos.line, lineN = lineNo(pos.line); + var view = findViewForLine(cm, lineN); + if (view) { + clearLineMeasurementCacheFor(view); + cm.curOp.selectionChanged = cm.curOp.forceUpdate = true; + } + cm.curOp.updateMaxLine = true; + if (!lineIsHidden(widget.doc, line) && widget.height != null) { + var oldHeight = widget.height; + widget.height = null; + var dHeight = widgetHeight(widget) - oldHeight; + if (dHeight) + { updateLineHeight(line, line.height + dHeight); } + } + signalLater(cm, "markerChanged", cm, this$1); + }); + }; + + TextMarker.prototype.attachLine = function (line) { + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) + { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); } + } + this.lines.push(line); + }; + + TextMarker.prototype.detachLine = function (line) { + this.lines.splice(indexOf(this.lines, line), 1); + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp + ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); + } + }; + eventMixin(TextMarker); + + // Create a marker, wire it up to the right lines, and + function markText(doc, from, to, options, type) { + // Shared markers (across linked documents) are handled separately + // (markTextShared will call out to this again, once per + // document). + if (options && options.shared) { return markTextShared(doc, from, to, options, type) } + // Ensure we are in an operation. + if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) } + + var marker = new TextMarker(doc, type), diff = cmp(from, to); + if (options) { copyObj(options, marker, false); } + // Don't connect empty markers unless clearWhenEmpty is false + if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) + { return marker } + if (marker.replacedWith) { + // Showing up as a widget implies collapsed (widget replaces text) + marker.collapsed = true; + marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget"); + if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); } + if (options.insertLeft) { marker.widgetNode.insertLeft = true; } + } + if (marker.collapsed) { + if (conflictingCollapsedRange(doc, from.line, from, to, marker) || + from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) + { throw new Error("Inserting collapsed marker partially overlapping an existing one") } + seeCollapsedSpans(); + } + + if (marker.addToHistory) + { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); } + + var curLine = from.line, cm = doc.cm, updateMaxLine; + doc.iter(curLine, to.line + 1, function (line) { + if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) + { updateMaxLine = true; } + if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); } + addMarkedSpan(line, new MarkedSpan(marker, + curLine == from.line ? from.ch : null, + curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp); + ++curLine; + }); + // lineIsHidden depends on the presence of the spans, so needs a second pass + if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) { + if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); } + }); } + + if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); } + + if (marker.readOnly) { + seeReadOnlySpans(); + if (doc.history.done.length || doc.history.undone.length) + { doc.clearHistory(); } + } + if (marker.collapsed) { + marker.id = ++nextMarkerId; + marker.atomic = true; + } + if (cm) { + // Sync editor state + if (updateMaxLine) { cm.curOp.updateMaxLine = true; } + if (marker.collapsed) + { regChange(cm, from.line, to.line + 1); } + else if (marker.className || marker.startStyle || marker.endStyle || marker.css || + marker.attributes || marker.title) + { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } } + if (marker.atomic) { reCheckSelection(cm.doc); } + signalLater(cm, "markerAdded", cm, marker); + } + return marker + } + + // SHARED TEXTMARKERS + + // A shared marker spans multiple linked documents. It is + // implemented as a meta-marker-object controlling multiple normal + // markers. + var SharedTextMarker = function(markers, primary) { + this.markers = markers; + this.primary = primary; + for (var i = 0; i < markers.length; ++i) + { markers[i].parent = this; } + }; + + SharedTextMarker.prototype.clear = function () { + if (this.explicitlyCleared) { return } + this.explicitlyCleared = true; + for (var i = 0; i < this.markers.length; ++i) + { this.markers[i].clear(); } + signalLater(this, "clear"); + }; + + SharedTextMarker.prototype.find = function (side, lineObj) { + return this.primary.find(side, lineObj) + }; + eventMixin(SharedTextMarker); + + function markTextShared(doc, from, to, options, type) { + options = copyObj(options); + options.shared = false; + var markers = [markText(doc, from, to, options, type)], primary = markers[0]; + var widget = options.widgetNode; + linkedDocs(doc, function (doc) { + if (widget) { options.widgetNode = widget.cloneNode(true); } + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); + for (var i = 0; i < doc.linked.length; ++i) + { if (doc.linked[i].isParent) { return } } + primary = lst(markers); + }); + return new SharedTextMarker(markers, primary) + } + + function findSharedMarkers(doc) { + return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; }) + } + + function copySharedMarkers(doc, markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], pos = marker.find(); + var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to); + if (cmp(mFrom, mTo)) { + var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type); + marker.markers.push(subMark); + subMark.parent = marker; + } + } + } + + function detachSharedMarkers(markers) { + var loop = function ( i ) { + var marker = markers[i], linked = [marker.primary.doc]; + linkedDocs(marker.primary.doc, function (d) { return linked.push(d); }); + for (var j = 0; j < marker.markers.length; j++) { + var subMarker = marker.markers[j]; + if (indexOf(linked, subMarker.doc) == -1) { + subMarker.parent = null; + marker.markers.splice(j--, 1); + } + } + }; + + for (var i = 0; i < markers.length; i++) loop( i ); + } + + var nextDocId = 0; + var Doc = function(text, mode, firstLine, lineSep, direction) { + if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) } + if (firstLine == null) { firstLine = 0; } + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); + this.first = firstLine; + this.scrollTop = this.scrollLeft = 0; + this.cantEdit = false; + this.cleanGeneration = 1; + this.modeFrontier = this.highlightFrontier = firstLine; + var start = Pos(firstLine, 0); + this.sel = simpleSelection(start); + this.history = new History(null); + this.id = ++nextDocId; + this.modeOption = mode; + this.lineSep = lineSep; + this.direction = (direction == "rtl") ? "rtl" : "ltr"; + this.extend = false; + + if (typeof text == "string") { text = this.splitLines(text); } + updateDoc(this, {from: start, to: start, text: text}); + setSelection(this, simpleSelection(start), sel_dontScroll); + }; + + Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + // Iterate over the document. Supports two forms -- with only one + // argument, it calls that for each line in the document. With + // three, it iterates over the range given by the first two (with + // the second being non-inclusive). + iter: function(from, to, op) { + if (op) { this.iterN(from - this.first, to - from, op); } + else { this.iterN(this.first, this.first + this.size, from); } + }, + + // Non-public interface for adding and removing lines. + insert: function(at, lines) { + var height = 0; + for (var i = 0; i < lines.length; ++i) { height += lines[i].height; } + this.insertInner(at - this.first, lines, height); + }, + remove: function(at, n) { this.removeInner(at - this.first, n); }, + + // From here, the methods are part of the public interface. Most + // are also available from CodeMirror (editor) instances. + + getValue: function(lineSep) { + var lines = getLines(this, this.first, this.first + this.size); + if (lineSep === false) { return lines } + return lines.join(lineSep || this.lineSeparator()) + }, + setValue: docMethodOp(function(code) { + var top = Pos(this.first, 0), last = this.first + this.size - 1; + makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), + text: this.splitLines(code), origin: "setValue", full: true}, true); + if (this.cm) { scrollToCoords(this.cm, 0, 0); } + setSelection(this, simpleSelection(top), sel_dontScroll); + }), + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from); + to = to ? clipPos(this, to) : from; + replaceRange(this, code, from, to, origin); + }, + getRange: function(from, to, lineSep) { + var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); + if (lineSep === false) { return lines } + if (lineSep === '') { return lines.join('') } + return lines.join(lineSep || this.lineSeparator()) + }, + + getLine: function(line) {var l = this.getLineHandle(line); return l && l.text}, + + getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }}, + getLineNumber: function(line) {return lineNo(line)}, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") { line = getLine(this, line); } + return visualLine(line) + }, + + lineCount: function() {return this.size}, + firstLine: function() {return this.first}, + lastLine: function() {return this.first + this.size - 1}, + + clipPos: function(pos) {return clipPos(this, pos)}, + + getCursor: function(start) { + var range = this.sel.primary(), pos; + if (start == null || start == "head") { pos = range.head; } + else if (start == "anchor") { pos = range.anchor; } + else if (start == "end" || start == "to" || start === false) { pos = range.to(); } + else { pos = range.from(); } + return pos + }, + listSelections: function() { return this.sel.ranges }, + somethingSelected: function() {return this.sel.somethingSelected()}, + + setCursor: docMethodOp(function(line, ch, options) { + setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options); + }), + setSelection: docMethodOp(function(anchor, head, options) { + setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options); + }), + extendSelection: docMethodOp(function(head, other, options) { + extendSelection(this, clipPos(this, head), other && clipPos(this, other), options); + }), + extendSelections: docMethodOp(function(heads, options) { + extendSelections(this, clipPosArray(this, heads), options); + }), + extendSelectionsBy: docMethodOp(function(f, options) { + var heads = map(this.sel.ranges, f); + extendSelections(this, clipPosArray(this, heads), options); + }), + setSelections: docMethodOp(function(ranges, primary, options) { + if (!ranges.length) { return } + var out = []; + for (var i = 0; i < ranges.length; i++) + { out[i] = new Range(clipPos(this, ranges[i].anchor), + clipPos(this, ranges[i].head || ranges[i].anchor)); } + if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); } + setSelection(this, normalizeSelection(this.cm, out, primary), options); + }), + addSelection: docMethodOp(function(anchor, head, options) { + var ranges = this.sel.ranges.slice(0); + ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))); + setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options); + }), + + getSelection: function(lineSep) { + var ranges = this.sel.ranges, lines; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + lines = lines ? lines.concat(sel) : sel; + } + if (lineSep === false) { return lines } + else { return lines.join(lineSep || this.lineSeparator()) } + }, + getSelections: function(lineSep) { + var parts = [], ranges = this.sel.ranges; + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()); + if (lineSep !== false) { sel = sel.join(lineSep || this.lineSeparator()); } + parts[i] = sel; + } + return parts + }, + replaceSelection: function(code, collapse, origin) { + var dup = []; + for (var i = 0; i < this.sel.ranges.length; i++) + { dup[i] = code; } + this.replaceSelections(dup, collapse, origin || "+input"); + }, + replaceSelections: docMethodOp(function(code, collapse, origin) { + var changes = [], sel = this.sel; + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i]; + changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin}; + } + var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse); + for (var i$1 = changes.length - 1; i$1 >= 0; i$1--) + { makeChange(this, changes[i$1]); } + if (newSel) { setSelectionReplaceHistory(this, newSel); } + else if (this.cm) { ensureCursorVisible(this.cm); } + }), + undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}), + redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}), + undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}), + redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}), + + setExtending: function(val) {this.extend = val;}, + getExtending: function() {return this.extend}, + + historySize: function() { + var hist = this.history, done = 0, undone = 0; + for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } } + for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } } + return {undo: done, redo: undone} + }, + clearHistory: function() { + var this$1 = this; + + this.history = new History(this.history); + linkedDocs(this, function (doc) { return doc.history = this$1.history; }, true); + }, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(true); + }, + changeGeneration: function(forceSplit) { + if (forceSplit) + { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; } + return this.history.generation + }, + isClean: function (gen) { + return this.history.generation == (gen || this.cleanGeneration) + }, + + getHistory: function() { + return {done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone)} + }, + setHistory: function(histData) { + var hist = this.history = new History(this.history); + hist.done = copyHistoryArray(histData.done.slice(0), null, true); + hist.undone = copyHistoryArray(histData.undone.slice(0), null, true); + }, + + setGutterMarker: docMethodOp(function(line, gutterID, value) { + return changeLine(this, line, "gutter", function (line) { + var markers = line.gutterMarkers || (line.gutterMarkers = {}); + markers[gutterID] = value; + if (!value && isEmpty(markers)) { line.gutterMarkers = null; } + return true + }) + }), + + clearGutter: docMethodOp(function(gutterID) { + var this$1 = this; + + this.iter(function (line) { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + changeLine(this$1, line, "gutter", function () { + line.gutterMarkers[gutterID] = null; + if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; } + return true + }); + } + }); + }), + + lineInfo: function(line) { + var n; + if (typeof line == "number") { + if (!isLine(this, line)) { return null } + n = line; + line = getLine(this, line); + if (!line) { return null } + } else { + n = lineNo(line); + if (n == null) { return null } + } + return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, + textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, + widgets: line.widgets} + }, + + addLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + if (!line[prop]) { line[prop] = cls; } + else if (classTest(cls).test(line[prop])) { return false } + else { line[prop] += " " + cls; } + return true + }) + }), + removeLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) { + var prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass"; + var cur = line[prop]; + if (!cur) { return false } + else if (cls == null) { line[prop] = null; } + else { + var found = cur.match(classTest(cls)); + if (!found) { return false } + var end = found.index + found[0].length; + line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; + } + return true + }) + }), + + addLineWidget: docMethodOp(function(handle, node, options) { + return addLineWidget(this, handle, node, options) + }), + removeLineWidget: function(widget) { widget.clear(); }, + + markText: function(from, to, options) { + return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range") + }, + setBookmark: function(pos, options) { + var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft, + clearWhenEmpty: false, shared: options && options.shared, + handleMouseEvents: options && options.handleMouseEvents}; + pos = clipPos(this, pos); + return markText(this, pos, pos, realOpts, "bookmark") + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos); + var markers = [], spans = getLine(this, pos.line).markedSpans; + if (spans) { for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) + { markers.push(span.marker.parent || span.marker); } + } } + return markers + }, + findMarks: function(from, to, filter) { + from = clipPos(this, from); to = clipPos(this, to); + var found = [], lineNo = from.line; + this.iter(from.line, to.line + 1, function (line) { + var spans = line.markedSpans; + if (spans) { for (var i = 0; i < spans.length; i++) { + var span = spans[i]; + if (!(span.to != null && lineNo == from.line && from.ch >= span.to || + span.from == null && lineNo != from.line || + span.from != null && lineNo == to.line && span.from >= to.ch) && + (!filter || filter(span.marker))) + { found.push(span.marker.parent || span.marker); } + } } + ++lineNo; + }); + return found + }, + getAllMarks: function() { + var markers = []; + this.iter(function (line) { + var sps = line.markedSpans; + if (sps) { for (var i = 0; i < sps.length; ++i) + { if (sps[i].from != null) { markers.push(sps[i].marker); } } } + }); + return markers + }, + + posFromIndex: function(off) { + var ch, lineNo = this.first, sepSize = this.lineSeparator().length; + this.iter(function (line) { + var sz = line.text.length + sepSize; + if (sz > off) { ch = off; return true } + off -= sz; + ++lineNo; + }); + return clipPos(this, Pos(lineNo, ch)) + }, + indexFromPos: function (coords) { + coords = clipPos(this, coords); + var index = coords.ch; + if (coords.line < this.first || coords.ch < 0) { return 0 } + var sepSize = this.lineSeparator().length; + this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value + index += line.text.length + sepSize; + }); + return index + }, + + copy: function(copyHistory) { + var doc = new Doc(getLines(this, this.first, this.first + this.size), + this.modeOption, this.first, this.lineSep, this.direction); + doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; + doc.sel = this.sel; + doc.extend = false; + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth; + doc.setHistory(this.getHistory()); + } + return doc + }, + + linkedDoc: function(options) { + if (!options) { options = {}; } + var from = this.first, to = this.first + this.size; + if (options.from != null && options.from > from) { from = options.from; } + if (options.to != null && options.to < to) { to = options.to; } + var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction); + if (options.sharedHist) { copy.history = this.history + ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); + copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; + copySharedMarkers(copy, findSharedMarkers(this)); + return copy + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) { other = other.doc; } + if (this.linked) { for (var i = 0; i < this.linked.length; ++i) { + var link = this.linked[i]; + if (link.doc != other) { continue } + this.linked.splice(i, 1); + other.unlinkDoc(this); + detachSharedMarkers(findSharedMarkers(this)); + break + } } + // If the histories were shared, split them again + if (other.history == this.history) { + var splitIds = [other.id]; + linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true); + other.history = new History(null); + other.history.done = copyHistoryArray(this.history.done, splitIds); + other.history.undone = copyHistoryArray(this.history.undone, splitIds); + } + }, + iterLinkedDocs: function(f) {linkedDocs(this, f);}, + + getMode: function() {return this.mode}, + getEditor: function() {return this.cm}, + + splitLines: function(str) { + if (this.lineSep) { return str.split(this.lineSep) } + return splitLinesAuto(str) + }, + lineSeparator: function() { return this.lineSep || "\n" }, + + setDirection: docMethodOp(function (dir) { + if (dir != "rtl") { dir = "ltr"; } + if (dir == this.direction) { return } + this.direction = dir; + this.iter(function (line) { return line.order = null; }); + if (this.cm) { directionChanged(this.cm); } + }) + }); + + // Public alias. + Doc.prototype.eachLine = Doc.prototype.iter; + + // Kludge to work around strange IE behavior where it'll sometimes + // re-fire a series of drag-related events right after the drop (#1551) + var lastDrop = 0; + + function onDrop(e) { + var cm = this; + clearDragCursor(cm); + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) + { return } + e_preventDefault(e); + if (ie) { lastDrop = +new Date; } + var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; + if (!pos || cm.isReadOnly()) { return } + // Might be a file drop, in which case we simply extract the text + // and insert it. + if (files && files.length && window.FileReader && window.File) { + var n = files.length, text = Array(n), read = 0; + var markAsReadAndPasteIfAllFilesAreRead = function () { + if (++read == n) { + operation(cm, function () { + pos = clipPos(cm.doc, pos); + var change = {from: pos, to: pos, + text: cm.doc.splitLines( + text.filter(function (t) { return t != null; }).join(cm.doc.lineSeparator())), + origin: "paste"}; + makeChange(cm.doc, change); + setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change)))); + })(); + } + }; + var readTextFromFile = function (file, i) { + if (cm.options.allowDropFileTypes && + indexOf(cm.options.allowDropFileTypes, file.type) == -1) { + markAsReadAndPasteIfAllFilesAreRead(); + return + } + var reader = new FileReader; + reader.onerror = function () { return markAsReadAndPasteIfAllFilesAreRead(); }; + reader.onload = function () { + var content = reader.result; + if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { + markAsReadAndPasteIfAllFilesAreRead(); + return + } + text[i] = content; + markAsReadAndPasteIfAllFilesAreRead(); + }; + reader.readAsText(file); + }; + for (var i = 0; i < files.length; i++) { readTextFromFile(files[i], i); } + } else { // Normal drop + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { + cm.state.draggingText(e); + // Ensure the editor is re-focused + setTimeout(function () { return cm.display.input.focus(); }, 20); + return + } + try { + var text$1 = e.dataTransfer.getData("Text"); + if (text$1) { + var selected; + if (cm.state.draggingText && !cm.state.draggingText.copy) + { selected = cm.listSelections(); } + setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)); + if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1) + { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } } + cm.replaceSelection(text$1, "around", "paste"); + cm.display.input.focus(); + } + } + catch(e$1){} + } + } + + function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return } + + e.dataTransfer.setData("Text", cm.getSelection()); + e.dataTransfer.effectAllowed = "copyMove"; + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (presto) { + img.width = img.height = 1; + cm.display.wrapper.appendChild(img); + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop; + } + e.dataTransfer.setDragImage(img, 0, 0); + if (presto) { img.parentNode.removeChild(img); } + } + } + + function onDragOver(cm, e) { + var pos = posFromMouse(cm, e); + if (!pos) { return } + var frag = document.createDocumentFragment(); + drawSelectionCursor(cm, pos, frag); + if (!cm.display.dragCursor) { + cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors"); + cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv); + } + removeChildrenAndAdd(cm.display.dragCursor, frag); + } + + function clearDragCursor(cm) { + if (cm.display.dragCursor) { + cm.display.lineSpace.removeChild(cm.display.dragCursor); + cm.display.dragCursor = null; + } + } + + // These must be handled carefully, because naively registering a + // handler for each editor will cause the editors to never be + // garbage collected. + + function forEachCodeMirror(f) { + if (!document.getElementsByClassName) { return } + var byClass = document.getElementsByClassName("CodeMirror"), editors = []; + for (var i = 0; i < byClass.length; i++) { + var cm = byClass[i].CodeMirror; + if (cm) { editors.push(cm); } + } + if (editors.length) { editors[0].operation(function () { + for (var i = 0; i < editors.length; i++) { f(editors[i]); } + }); } + } + + var globalsRegistered = false; + function ensureGlobalHandlers() { + if (globalsRegistered) { return } + registerGlobalHandlers(); + globalsRegistered = true; + } + function registerGlobalHandlers() { + // When the window resizes, we need to refresh active editors. + var resizeTimer; + on(window, "resize", function () { + if (resizeTimer == null) { resizeTimer = setTimeout(function () { + resizeTimer = null; + forEachCodeMirror(onResize); + }, 100); } + }); + // When the window loses focus, we want to show the editor as blurred + on(window, "blur", function () { return forEachCodeMirror(onBlur); }); + } + // Called when the window resizes + function onResize(cm) { + var d = cm.display; + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null; + d.scrollbarsClipped = false; + cm.setSize(); + } + + var keyNames = { + 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", + 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", + 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", + 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", + 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock", + 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", + 221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", + 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert" + }; + + // Number keys + for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); } + // Alphabetic keys + for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); } + // Function keys + for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; } + + var keyMap = {}; + + keyMap.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" + }; + // Note that the save and find-related commands aren't defined by + // default. User code or addons can define them. Unknown commands + // are simply ignored. + keyMap.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" + }; + // Very basic readline/emacs-style bindings, which are standard on Mac. + keyMap.emacsy = { + "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", + "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", + "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", + "Ctrl-T": "transposeChars", "Ctrl-O": "openLine" + }; + keyMap.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"] + }; + keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; + + // KEYMAP DISPATCH + + function normalizeKeyName(name) { + var parts = name.split(/-(?!$)/); + name = parts[parts.length - 1]; + var alt, ctrl, shift, cmd; + for (var i = 0; i < parts.length - 1; i++) { + var mod = parts[i]; + if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; } + else if (/^a(lt)?$/i.test(mod)) { alt = true; } + else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; } + else if (/^s(hift)?$/i.test(mod)) { shift = true; } + else { throw new Error("Unrecognized modifier name: " + mod) } + } + if (alt) { name = "Alt-" + name; } + if (ctrl) { name = "Ctrl-" + name; } + if (cmd) { name = "Cmd-" + name; } + if (shift) { name = "Shift-" + name; } + return name + } + + // This is a kludge to keep keymaps mostly working as raw objects + // (backwards compatibility) while at the same time support features + // like normalization and multi-stroke key bindings. It compiles a + // new normalized keymap, and then updates the old object to reflect + // this. + function normalizeKeyMap(keymap) { + var copy = {}; + for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) { + var value = keymap[keyname]; + if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue } + if (value == "...") { delete keymap[keyname]; continue } + + var keys = map(keyname.split(" "), normalizeKeyName); + for (var i = 0; i < keys.length; i++) { + var val = (void 0), name = (void 0); + if (i == keys.length - 1) { + name = keys.join(" "); + val = value; + } else { + name = keys.slice(0, i + 1).join(" "); + val = "..."; + } + var prev = copy[name]; + if (!prev) { copy[name] = val; } + else if (prev != val) { throw new Error("Inconsistent bindings for " + name) } + } + delete keymap[keyname]; + } } + for (var prop in copy) { keymap[prop] = copy[prop]; } + return keymap + } + + function lookupKey(key, map, handle, context) { + map = getKeyMap(map); + var found = map.call ? map.call(key, context) : map[key]; + if (found === false) { return "nothing" } + if (found === "...") { return "multi" } + if (found != null && handle(found)) { return "handled" } + + if (map.fallthrough) { + if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") + { return lookupKey(key, map.fallthrough, handle, context) } + for (var i = 0; i < map.fallthrough.length; i++) { + var result = lookupKey(key, map.fallthrough[i], handle, context); + if (result) { return result } + } + } + } + + // Modifier key presses don't count as 'real' key presses for the + // purpose of keymap fallthrough. + function isModifierKey(value) { + var name = typeof value == "string" ? value : keyNames[value.keyCode]; + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod" + } + + function addModifierNames(name, event, noShift) { + var base = name; + if (event.altKey && base != "Alt") { name = "Alt-" + name; } + if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; } + if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") { name = "Cmd-" + name; } + if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; } + return name + } + + // Look up the name of a key as indicated by an event object. + function keyName(event, noShift) { + if (presto && event.keyCode == 34 && event["char"]) { return false } + var name = keyNames[event.keyCode]; + if (name == null || event.altGraphKey) { return false } + // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause, + // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+) + if (event.keyCode == 3 && event.code) { name = event.code; } + return addModifierNames(name, event, noShift) + } + + function getKeyMap(val) { + return typeof val == "string" ? keyMap[val] : val + } + + // Helper for deleting text near the selection(s), used to implement + // backspace, delete, and similar functionality. + function deleteNearSelection(cm, compute) { + var ranges = cm.doc.sel.ranges, kill = []; + // Build up a set of ranges to kill first, merging overlapping + // ranges. + for (var i = 0; i < ranges.length; i++) { + var toKill = compute(ranges[i]); + while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { + var replaced = kill.pop(); + if (cmp(replaced.from, toKill.from) < 0) { + toKill.from = replaced.from; + break + } + } + kill.push(toKill); + } + // Next, remove those actual ranges. + runInOp(cm, function () { + for (var i = kill.length - 1; i >= 0; i--) + { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); } + ensureCursorVisible(cm); + }); + } + + function moveCharLogically(line, ch, dir) { + var target = skipExtendingChars(line.text, ch + dir, dir); + return target < 0 || target > line.text.length ? null : target + } + + function moveLogically(line, start, dir) { + var ch = moveCharLogically(line, start.ch, dir); + return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before") + } + + function endOfLine(visually, cm, lineObj, lineNo, dir) { + if (visually) { + if (cm.doc.direction == "rtl") { dir = -dir; } + var order = getOrder(lineObj, cm.doc.direction); + if (order) { + var part = dir < 0 ? lst(order) : order[0]; + var moveInStorageOrder = (dir < 0) == (part.level == 1); + var sticky = moveInStorageOrder ? "after" : "before"; + var ch; + // With a wrapped rtl chunk (possibly spanning multiple bidi parts), + // it could be that the last bidi part is not on the last visual line, + // since visual lines contain content order-consecutive chunks. + // Thus, in rtl, we are looking for the first (content-order) character + // in the rtl chunk that is on the last line (that is, the same line + // as the last (content-order) character). + if (part.level > 0 || cm.doc.direction == "rtl") { + var prep = prepareMeasureForLine(cm, lineObj); + ch = dir < 0 ? lineObj.text.length - 1 : 0; + var targetTop = measureCharPrepared(cm, prep, ch).top; + ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch); + if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); } + } else { ch = dir < 0 ? part.to : part.from; } + return new Pos(lineNo, ch, sticky) + } + } + return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after") + } + + function moveVisually(cm, line, start, dir) { + var bidi = getOrder(line, cm.doc.direction); + if (!bidi) { return moveLogically(line, start, dir) } + if (start.ch >= line.text.length) { + start.ch = line.text.length; + start.sticky = "before"; + } else if (start.ch <= 0) { + start.ch = 0; + start.sticky = "after"; + } + var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos]; + if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) { + // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines, + // nothing interesting happens. + return moveLogically(line, start, dir) + } + + var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); }; + var prep; + var getWrappedLineExtent = function (ch) { + if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} } + prep = prep || prepareMeasureForLine(cm, line); + return wrappedLineExtentChar(cm, line, prep, ch) + }; + var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch); + + if (cm.doc.direction == "rtl" || part.level == 1) { + var moveInStorageOrder = (part.level == 1) == (dir < 0); + var ch = mv(start, moveInStorageOrder ? 1 : -1); + if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) { + // Case 2: We move within an rtl part or in an rtl editor on the same visual line + var sticky = moveInStorageOrder ? "before" : "after"; + return new Pos(start.line, ch, sticky) + } + } + + // Case 3: Could not move within this bidi part in this visual line, so leave + // the current bidi part + + var searchInVisualLine = function (partPos, dir, wrappedLineExtent) { + var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder + ? new Pos(start.line, mv(ch, 1), "before") + : new Pos(start.line, ch, "after"); }; + + for (; partPos >= 0 && partPos < bidi.length; partPos += dir) { + var part = bidi[partPos]; + var moveInStorageOrder = (dir > 0) == (part.level != 1); + var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1); + if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) } + ch = moveInStorageOrder ? part.from : mv(part.to, -1); + if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) } + } + }; + + // Case 3a: Look for other bidi parts on the same visual line + var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent); + if (res) { return res } + + // Case 3b: Look for other bidi parts on the next visual line + var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1); + if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) { + res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh)); + if (res) { return res } + } + + // Case 4: Nowhere to move + return null + } + + // Commands are parameter-less actions that can be performed on an + // editor, mostly used for keybindings. + var commands = { + selectAll: selectAll, + singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); }, + killLine: function (cm) { return deleteNearSelection(cm, function (range) { + if (range.empty()) { + var len = getLine(cm.doc, range.head.line).text.length; + if (range.head.ch == len && range.head.line < cm.lastLine()) + { return {from: range.head, to: Pos(range.head.line + 1, 0)} } + else + { return {from: range.head, to: Pos(range.head.line, len)} } + } else { + return {from: range.from(), to: range.to()} + } + }); }, + deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({ + from: Pos(range.from().line, 0), + to: clipPos(cm.doc, Pos(range.to().line + 1, 0)) + }); }); }, + delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({ + from: Pos(range.from().line, 0), to: range.from() + }); }); }, + delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { + var top = cm.charCoords(range.head, "div").top + 5; + var leftPos = cm.coordsChar({left: 0, top: top}, "div"); + return {from: leftPos, to: range.from()} + }); }, + delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) { + var top = cm.charCoords(range.head, "div").top + 5; + var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div"); + return {from: range.from(), to: rightPos } + }); }, + undo: function (cm) { return cm.undo(); }, + redo: function (cm) { return cm.redo(); }, + undoSelection: function (cm) { return cm.undoSelection(); }, + redoSelection: function (cm) { return cm.redoSelection(); }, + goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); }, + goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); }, + goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); }, + {origin: "+move", bias: 1} + ); }, + goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); }, + {origin: "+move", bias: 1} + ); }, + goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); }, + {origin: "+move", bias: -1} + ); }, + goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) { + var top = cm.cursorCoords(range.head, "div").top + 5; + return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div") + }, sel_move); }, + goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) { + var top = cm.cursorCoords(range.head, "div").top + 5; + return cm.coordsChar({left: 0, top: top}, "div") + }, sel_move); }, + goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) { + var top = cm.cursorCoords(range.head, "div").top + 5; + var pos = cm.coordsChar({left: 0, top: top}, "div"); + if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) } + return pos + }, sel_move); }, + goLineUp: function (cm) { return cm.moveV(-1, "line"); }, + goLineDown: function (cm) { return cm.moveV(1, "line"); }, + goPageUp: function (cm) { return cm.moveV(-1, "page"); }, + goPageDown: function (cm) { return cm.moveV(1, "page"); }, + goCharLeft: function (cm) { return cm.moveH(-1, "char"); }, + goCharRight: function (cm) { return cm.moveH(1, "char"); }, + goColumnLeft: function (cm) { return cm.moveH(-1, "column"); }, + goColumnRight: function (cm) { return cm.moveH(1, "column"); }, + goWordLeft: function (cm) { return cm.moveH(-1, "word"); }, + goGroupRight: function (cm) { return cm.moveH(1, "group"); }, + goGroupLeft: function (cm) { return cm.moveH(-1, "group"); }, + goWordRight: function (cm) { return cm.moveH(1, "word"); }, + delCharBefore: function (cm) { return cm.deleteH(-1, "codepoint"); }, + delCharAfter: function (cm) { return cm.deleteH(1, "char"); }, + delWordBefore: function (cm) { return cm.deleteH(-1, "word"); }, + delWordAfter: function (cm) { return cm.deleteH(1, "word"); }, + delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); }, + delGroupAfter: function (cm) { return cm.deleteH(1, "group"); }, + indentAuto: function (cm) { return cm.indentSelection("smart"); }, + indentMore: function (cm) { return cm.indentSelection("add"); }, + indentLess: function (cm) { return cm.indentSelection("subtract"); }, + insertTab: function (cm) { return cm.replaceSelection("\t"); }, + insertSoftTab: function (cm) { + var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize; + for (var i = 0; i < ranges.length; i++) { + var pos = ranges[i].from(); + var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize); + spaces.push(spaceStr(tabSize - col % tabSize)); + } + cm.replaceSelections(spaces); + }, + defaultTab: function (cm) { + if (cm.somethingSelected()) { cm.indentSelection("add"); } + else { cm.execCommand("insertTab"); } + }, + // Swap the two chars left and right of each selection's head. + // Move cursor behind the two swapped characters afterwards. + // + // Doesn't consider line feeds a character. + // Doesn't scan more than one line above to find a character. + // Doesn't do anything on an empty line. + // Doesn't do anything with non-empty selections. + transposeChars: function (cm) { return runInOp(cm, function () { + var ranges = cm.listSelections(), newSel = []; + for (var i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) { continue } + var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text; + if (line) { + if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); } + if (cur.ch > 0) { + cur = new Pos(cur.line, cur.ch + 1); + cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), + Pos(cur.line, cur.ch - 2), cur, "+transpose"); + } else if (cur.line > cm.doc.first) { + var prev = getLine(cm.doc, cur.line - 1).text; + if (prev) { + cur = new Pos(cur.line, 1); + cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() + + prev.charAt(prev.length - 1), + Pos(cur.line - 1, prev.length - 1), cur, "+transpose"); + } + } + } + newSel.push(new Range(cur, cur)); + } + cm.setSelections(newSel); + }); }, + newlineAndIndent: function (cm) { return runInOp(cm, function () { + var sels = cm.listSelections(); + for (var i = sels.length - 1; i >= 0; i--) + { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); } + sels = cm.listSelections(); + for (var i$1 = 0; i$1 < sels.length; i$1++) + { cm.indentLine(sels[i$1].from().line, null, true); } + ensureCursorVisible(cm); + }); }, + openLine: function (cm) { return cm.replaceSelection("\n", "start"); }, + toggleOverwrite: function (cm) { return cm.toggleOverwrite(); } + }; + + + function lineStart(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLine(line); + if (visual != line) { lineN = lineNo(visual); } + return endOfLine(true, cm, visual, lineN, 1) + } + function lineEnd(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLineEnd(line); + if (visual != line) { lineN = lineNo(visual); } + return endOfLine(true, cm, line, lineN, -1) + } + function lineStartSmart(cm, pos) { + var start = lineStart(cm, pos.line); + var line = getLine(cm.doc, start.line); + var order = getOrder(line, cm.doc.direction); + if (!order || order[0].level == 0) { + var firstNonWS = Math.max(start.ch, line.text.search(/\S/)); + var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch; + return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky) + } + return start + } + + // Run a handler that was bound to a key. + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound]; + if (!bound) { return false } + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + cm.display.input.ensurePolled(); + var prevShift = cm.display.shift, done = false; + try { + if (cm.isReadOnly()) { cm.state.suppressEdits = true; } + if (dropShift) { cm.display.shift = false; } + done = bound(cm) != Pass; + } finally { + cm.display.shift = prevShift; + cm.state.suppressEdits = false; + } + return done + } + + function lookupKeyForEditor(cm, name, handle) { + for (var i = 0; i < cm.state.keyMaps.length; i++) { + var result = lookupKey(name, cm.state.keyMaps[i], handle, cm); + if (result) { return result } + } + return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) + || lookupKey(name, cm.options.keyMap, handle, cm) + } + + // Note that, despite the name, this function is also used to check + // for bound mouse clicks. + + var stopSeq = new Delayed; + + function dispatchKey(cm, name, e, handle) { + var seq = cm.state.keySeq; + if (seq) { + if (isModifierKey(name)) { return "handled" } + if (/\'$/.test(name)) + { cm.state.keySeq = null; } + else + { stopSeq.set(50, function () { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null; + cm.display.input.reset(); + } + }); } + if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true } + } + return dispatchKeyInner(cm, name, e, handle) + } + + function dispatchKeyInner(cm, name, e, handle) { + var result = lookupKeyForEditor(cm, name, handle); + + if (result == "multi") + { cm.state.keySeq = name; } + if (result == "handled") + { signalLater(cm, "keyHandled", cm, name, e); } + + if (result == "handled" || result == "multi") { + e_preventDefault(e); + restartBlink(cm); + } + + return !!result + } + + // Handle a key from the keydown event. + function handleKeyBinding(cm, e) { + var name = keyName(e, true); + if (!name) { return false } + + if (e.shiftKey && !cm.state.keySeq) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); }) + || dispatchKey(cm, name, e, function (b) { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) + { return doHandleBinding(cm, b) } + }) + } else { + return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); }) + } + } + + // Handle a key from the keypress event + function handleCharBinding(cm, e, ch) { + return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); }) + } + + var lastStoppedKey = null; + function onKeyDown(e) { + var cm = this; + if (e.target && e.target != cm.display.input.getField()) { return } + cm.curOp.focus = activeElt(root(cm)); + if (signalDOMEvent(cm, e)) { return } + // IE does strange things with escape. + if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; } + var code = e.keyCode; + cm.display.shift = code == 16 || e.shiftKey; + var handled = handleKeyBinding(cm, e); + if (presto) { + lastStoppedKey = handled ? code : null; + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) + { cm.replaceSelection("", null, "cut"); } + } + if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand) + { document.execCommand("cut"); } + + // Turn mouse into crosshair when Alt is held on Mac. + if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) + { showCrossHair(cm); } + } + + function showCrossHair(cm) { + var lineDiv = cm.display.lineDiv; + addClass(lineDiv, "CodeMirror-crosshair"); + + function up(e) { + if (e.keyCode == 18 || !e.altKey) { + rmClass(lineDiv, "CodeMirror-crosshair"); + off(document, "keyup", up); + off(document, "mouseover", up); + } + } + on(document, "keyup", up); + on(document, "mouseover", up); + } + + function onKeyUp(e) { + if (e.keyCode == 16) { this.doc.sel.shift = false; } + signalDOMEvent(this, e); + } + + function onKeyPress(e) { + var cm = this; + if (e.target && e.target != cm.display.input.getField()) { return } + if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return } + var keyCode = e.keyCode, charCode = e.charCode; + if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return} + if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return } + var ch = String.fromCharCode(charCode == null ? keyCode : charCode); + // Some browsers fire keypress events for backspace + if (ch == "\x08") { return } + if (handleCharBinding(cm, e, ch)) { return } + cm.display.input.onKeyPress(e); + } + + var DOUBLECLICK_DELAY = 400; + + var PastClick = function(time, pos, button) { + this.time = time; + this.pos = pos; + this.button = button; + }; + + PastClick.prototype.compare = function (time, pos, button) { + return this.time + DOUBLECLICK_DELAY > time && + cmp(pos, this.pos) == 0 && button == this.button + }; + + var lastClick, lastDoubleClick; + function clickRepeat(pos, button) { + var now = +new Date; + if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) { + lastClick = lastDoubleClick = null; + return "triple" + } else if (lastClick && lastClick.compare(now, pos, button)) { + lastDoubleClick = new PastClick(now, pos, button); + lastClick = null; + return "double" + } else { + lastClick = new PastClick(now, pos, button); + lastDoubleClick = null; + return "single" + } + } + + // A mouse down can be a single click, double click, triple click, + // start of selection drag, start of text drag, new cursor + // (ctrl-click), rectangle drag (alt-drag), or xwin + // middle-click-paste. Or it might be a click on something we should + // not interfere with, such as a scrollbar or widget. + function onMouseDown(e) { + var cm = this, display = cm.display; + if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return } + display.input.ensurePolled(); + display.shift = e.shiftKey; + + if (eventInWidget(display, e)) { + if (!webkit) { + // Briefly turn off draggability, to allow widgets to do + // normal dragging things. + display.scroller.draggable = false; + setTimeout(function () { return display.scroller.draggable = true; }, 100); + } + return + } + if (clickInGutter(cm, e)) { return } + var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single"; + win(cm).focus(); + + // #3261: make sure, that we're not starting a second selection + if (button == 1 && cm.state.selectingText) + { cm.state.selectingText(e); } + + if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return } + + if (button == 1) { + if (pos) { leftButtonDown(cm, pos, repeat, e); } + else if (e_target(e) == display.scroller) { e_preventDefault(e); } + } else if (button == 2) { + if (pos) { extendSelection(cm.doc, pos); } + setTimeout(function () { return display.input.focus(); }, 20); + } else if (button == 3) { + if (captureRightClick) { cm.display.input.onContextMenu(e); } + else { delayBlurEvent(cm); } + } + } + + function handleMappedButton(cm, button, pos, repeat, event) { + var name = "Click"; + if (repeat == "double") { name = "Double" + name; } + else if (repeat == "triple") { name = "Triple" + name; } + name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name; + + return dispatchKey(cm, addModifierNames(name, event), event, function (bound) { + if (typeof bound == "string") { bound = commands[bound]; } + if (!bound) { return false } + var done = false; + try { + if (cm.isReadOnly()) { cm.state.suppressEdits = true; } + done = bound(cm, pos) != Pass; + } finally { + cm.state.suppressEdits = false; + } + return done + }) + } + + function configureMouse(cm, repeat, event) { + var option = cm.getOption("configureMouse"); + var value = option ? option(cm, repeat, event) : {}; + if (value.unit == null) { + var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey; + value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line"; + } + if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; } + if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; } + if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); } + return value + } + + function leftButtonDown(cm, pos, repeat, event) { + if (ie) { setTimeout(bind(ensureFocus, cm), 0); } + else { cm.curOp.focus = activeElt(root(cm)); } + + var behavior = configureMouse(cm, repeat, event); + + var sel = cm.doc.sel, contained; + if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() && + repeat == "single" && (contained = sel.contains(pos)) > -1 && + (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) && + (cmp(contained.to(), pos) > 0 || pos.xRel < 0)) + { leftButtonStartDrag(cm, event, pos, behavior); } + else + { leftButtonSelect(cm, event, pos, behavior); } + } + + // Start a text drag. When it ends, see if any dragging actually + // happen, and treat as a click if it didn't. + function leftButtonStartDrag(cm, event, pos, behavior) { + var display = cm.display, moved = false; + var dragEnd = operation(cm, function (e) { + if (webkit) { display.scroller.draggable = false; } + cm.state.draggingText = false; + if (cm.state.delayingBlurEvent) { + if (cm.hasFocus()) { cm.state.delayingBlurEvent = false; } + else { delayBlurEvent(cm); } + } + off(display.wrapper.ownerDocument, "mouseup", dragEnd); + off(display.wrapper.ownerDocument, "mousemove", mouseMove); + off(display.scroller, "dragstart", dragStart); + off(display.scroller, "drop", dragEnd); + if (!moved) { + e_preventDefault(e); + if (!behavior.addNew) + { extendSelection(cm.doc, pos, null, null, behavior.extend); } + // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) + if ((webkit && !safari) || ie && ie_version == 9) + { setTimeout(function () {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus();}, 20); } + else + { display.input.focus(); } + } + }); + var mouseMove = function(e2) { + moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10; + }; + var dragStart = function () { return moved = true; }; + // Let the drag handler handle this. + if (webkit) { display.scroller.draggable = true; } + cm.state.draggingText = dragEnd; + dragEnd.copy = !behavior.moveOnDrag; + on(display.wrapper.ownerDocument, "mouseup", dragEnd); + on(display.wrapper.ownerDocument, "mousemove", mouseMove); + on(display.scroller, "dragstart", dragStart); + on(display.scroller, "drop", dragEnd); + + cm.state.delayingBlurEvent = true; + setTimeout(function () { return display.input.focus(); }, 20); + // IE's approach to draggable + if (display.scroller.dragDrop) { display.scroller.dragDrop(); } + } + + function rangeForUnit(cm, pos, unit) { + if (unit == "char") { return new Range(pos, pos) } + if (unit == "word") { return cm.findWordAt(pos) } + if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) } + var result = unit(cm, pos); + return new Range(result.from, result.to) + } + + // Normal selection, as opposed to text dragging. + function leftButtonSelect(cm, event, start, behavior) { + if (ie) { delayBlurEvent(cm); } + var display = cm.display, doc = cm.doc; + e_preventDefault(event); + + var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges; + if (behavior.addNew && !behavior.extend) { + ourIndex = doc.sel.contains(start); + if (ourIndex > -1) + { ourRange = ranges[ourIndex]; } + else + { ourRange = new Range(start, start); } + } else { + ourRange = doc.sel.primary(); + ourIndex = doc.sel.primIndex; + } + + if (behavior.unit == "rectangle") { + if (!behavior.addNew) { ourRange = new Range(start, start); } + start = posFromMouse(cm, event, true, true); + ourIndex = -1; + } else { + var range = rangeForUnit(cm, start, behavior.unit); + if (behavior.extend) + { ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend); } + else + { ourRange = range; } + } + + if (!behavior.addNew) { + ourIndex = 0; + setSelection(doc, new Selection([ourRange], 0), sel_mouse); + startSel = doc.sel; + } else if (ourIndex == -1) { + ourIndex = ranges.length; + setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex), + {scroll: false, origin: "*mouse"}); + } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) { + setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0), + {scroll: false, origin: "*mouse"}); + startSel = doc.sel; + } else { + replaceOneSelection(doc, ourIndex, ourRange, sel_mouse); + } + + var lastPos = start; + function extendTo(pos) { + if (cmp(lastPos, pos) == 0) { return } + lastPos = pos; + + if (behavior.unit == "rectangle") { + var ranges = [], tabSize = cm.options.tabSize; + var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize); + var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize); + var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol); + for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); + line <= end; line++) { + var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize); + if (left == right) + { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); } + else if (text.length > leftPos) + { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); } + } + if (!ranges.length) { ranges.push(new Range(start, start)); } + setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), + {origin: "*mouse", scroll: false}); + cm.scrollIntoView(pos); + } else { + var oldRange = ourRange; + var range = rangeForUnit(cm, pos, behavior.unit); + var anchor = oldRange.anchor, head; + if (cmp(range.anchor, anchor) > 0) { + head = range.head; + anchor = minPos(oldRange.from(), range.anchor); + } else { + head = range.anchor; + anchor = maxPos(oldRange.to(), range.head); + } + var ranges$1 = startSel.ranges.slice(0); + ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head)); + setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse); + } + } + + var editorSize = display.wrapper.getBoundingClientRect(); + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + var counter = 0; + + function extend(e) { + var curCount = ++counter; + var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle"); + if (!cur) { return } + if (cmp(cur, lastPos) != 0) { + cm.curOp.focus = activeElt(root(cm)); + extendTo(cur); + var visible = visibleLines(display, doc); + if (cur.line >= visible.to || cur.line < visible.from) + { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); } + } else { + var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; + if (outside) { setTimeout(operation(cm, function () { + if (counter != curCount) { return } + display.scroller.scrollTop += outside; + extend(e); + }), 50); } + } + } + + function done(e) { + cm.state.selectingText = false; + counter = Infinity; + // If e is null or undefined we interpret this as someone trying + // to explicitly cancel the selection rather than the user + // letting go of the mouse button. + if (e) { + e_preventDefault(e); + display.input.focus(); + } + off(display.wrapper.ownerDocument, "mousemove", move); + off(display.wrapper.ownerDocument, "mouseup", up); + doc.history.lastSelOrigin = null; + } + + var move = operation(cm, function (e) { + if (e.buttons === 0 || !e_button(e)) { done(e); } + else { extend(e); } + }); + var up = operation(cm, done); + cm.state.selectingText = up; + on(display.wrapper.ownerDocument, "mousemove", move); + on(display.wrapper.ownerDocument, "mouseup", up); + } + + // Used when mouse-selecting to adjust the anchor to the proper side + // of a bidi jump depending on the visual position of the head. + function bidiSimplify(cm, range) { + var anchor = range.anchor; + var head = range.head; + var anchorLine = getLine(cm.doc, anchor.line); + if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range } + var order = getOrder(anchorLine); + if (!order) { return range } + var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index]; + if (part.from != anchor.ch && part.to != anchor.ch) { return range } + var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1); + if (boundary == 0 || boundary == order.length) { return range } + + // Compute the relative visual position of the head compared to the + // anchor (<0 is to the left, >0 to the right) + var leftSide; + if (head.line != anchor.line) { + leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0; + } else { + var headIndex = getBidiPartAt(order, head.ch, head.sticky); + var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1); + if (headIndex == boundary - 1 || headIndex == boundary) + { leftSide = dir < 0; } + else + { leftSide = dir > 0; } + } + + var usePart = order[boundary + (leftSide ? -1 : 0)]; + var from = leftSide == (usePart.level == 1); + var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before"; + return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head) + } + + + // Determines whether an event happened in the gutter, and fires the + // handlers for the corresponding event. + function gutterEvent(cm, e, type, prevent) { + var mX, mY; + if (e.touches) { + mX = e.touches[0].clientX; + mY = e.touches[0].clientY; + } else { + try { mX = e.clientX; mY = e.clientY; } + catch(e$1) { return false } + } + if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false } + if (prevent) { e_preventDefault(e); } + + var display = cm.display; + var lineBox = display.lineDiv.getBoundingClientRect(); + + if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) } + mY -= lineBox.top - display.viewOffset; + + for (var i = 0; i < cm.display.gutterSpecs.length; ++i) { + var g = display.gutters.childNodes[i]; + if (g && g.getBoundingClientRect().right >= mX) { + var line = lineAtHeight(cm.doc, mY); + var gutter = cm.display.gutterSpecs[i]; + signal(cm, type, cm, line, gutter.className, e); + return e_defaultPrevented(e) + } + } + } + + function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true) + } + + // CONTEXT MENU HANDLING + + // To make the context menu work, we need to briefly unhide the + // textarea (making it as unobtrusive as possible) to let the + // right-click take effect on it. + function onContextMenu(cm, e) { + if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return } + if (signalDOMEvent(cm, e, "contextmenu")) { return } + if (!captureRightClick) { cm.display.input.onContextMenu(e); } + } + + function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) { return false } + return gutterEvent(cm, e, "gutterContextMenu", false) + } + + function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); + clearCaches(cm); + } + + var Init = {toString: function(){return "CodeMirror.Init"}}; + + var defaults = {}; + var optionHandlers = {}; + + function defineOptions(CodeMirror) { + var optionHandlers = CodeMirror.optionHandlers; + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt; + if (handle) { optionHandlers[name] = + notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; } + } + + CodeMirror.defineOption = option; + + // Passed to option handlers when there is no old value. + CodeMirror.Init = Init; + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option("value", "", function (cm, val) { return cm.setValue(val); }, true); + option("mode", null, function (cm, val) { + cm.doc.modeOption = val; + loadMode(cm); + }, true); + + option("indentUnit", 2, loadMode, true); + option("indentWithTabs", false); + option("smartIndent", true); + option("tabSize", 4, function (cm) { + resetModeState(cm); + clearCaches(cm); + regChange(cm); + }, true); + + option("lineSeparator", null, function (cm, val) { + cm.doc.lineSep = val; + if (!val) { return } + var newBreaks = [], lineNo = cm.doc.first; + cm.doc.iter(function (line) { + for (var pos = 0;;) { + var found = line.text.indexOf(val, pos); + if (found == -1) { break } + pos = found + val.length; + newBreaks.push(Pos(lineNo, found)); + } + lineNo++; + }); + for (var i = newBreaks.length - 1; i >= 0; i--) + { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); } + }); + option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, function (cm, val, old) { + cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); + if (old != Init) { cm.refresh(); } + }); + option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true); + option("electricChars", true); + option("inputStyle", mobile ? "contenteditable" : "textarea", function () { + throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME + }, true); + option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true); + option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true); + option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true); + option("rtlMoveVisually", !windows); + option("wholeLineUpdateBefore", true); + + option("theme", "default", function (cm) { + themeChanged(cm); + updateGutters(cm); + }, true); + option("keyMap", "default", function (cm, val, old) { + var next = getKeyMap(val); + var prev = old != Init && getKeyMap(old); + if (prev && prev.detach) { prev.detach(cm, next); } + if (next.attach) { next.attach(cm, prev || null); } + }); + option("extraKeys", null); + option("configureMouse", null); + + option("lineWrapping", false, wrappingChanged, true); + option("gutters", [], function (cm, val) { + cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers); + updateGutters(cm); + }, true); + option("fixedGutter", true, function (cm, val) { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; + cm.refresh(); + }, true); + option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true); + option("scrollbarStyle", "native", function (cm) { + initScrollbars(cm); + updateScrollbars(cm); + cm.display.scrollbars.setScrollTop(cm.doc.scrollTop); + cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft); + }, true); + option("lineNumbers", false, function (cm, val) { + cm.display.gutterSpecs = getGutters(cm.options.gutters, val); + updateGutters(cm); + }, true); + option("firstLineNumber", 1, updateGutters, true); + option("lineNumberFormatter", function (integer) { return integer; }, updateGutters, true); + option("showCursorWhenSelecting", false, updateSelection, true); + + option("resetSelectionOnContextMenu", true); + option("lineWiseCopyCut", true); + option("pasteLinesPerSelection", true); + option("selectionsMayTouch", false); + + option("readOnly", false, function (cm, val) { + if (val == "nocursor") { + onBlur(cm); + cm.display.input.blur(); + } + cm.display.input.readOnlyChanged(val); + }); + + option("screenReaderLabel", null, function (cm, val) { + val = (val === '') ? null : val; + cm.display.input.screenReaderLabelChanged(val); + }); + + option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true); + option("dragDrop", true, dragDropChanged); + option("allowDropFileTypes", null); + + option("cursorBlinkRate", 530); + option("cursorScrollMargin", 0); + option("cursorHeight", 1, updateSelection, true); + option("singleCursorHeightPerLine", true, updateSelection, true); + option("workTime", 100); + option("workDelay", 100); + option("flattenSpans", true, resetModeState, true); + option("addModeClass", false, resetModeState, true); + option("pollInterval", 100); + option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; }); + option("historyEventDelay", 1250); + option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true); + option("maxHighlightLength", 10000, resetModeState, true); + option("moveInputWithCursor", true, function (cm, val) { + if (!val) { cm.display.input.resetPosition(); } + }); + + option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; }); + option("autofocus", null); + option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true); + option("phrases", null); + } + + function dragDropChanged(cm, value, old) { + var wasOn = old && old != Init; + if (!value != !wasOn) { + var funcs = cm.display.dragFunctions; + var toggle = value ? on : off; + toggle(cm.display.scroller, "dragstart", funcs.start); + toggle(cm.display.scroller, "dragenter", funcs.enter); + toggle(cm.display.scroller, "dragover", funcs.over); + toggle(cm.display.scroller, "dragleave", funcs.leave); + toggle(cm.display.scroller, "drop", funcs.drop); + } + } + + function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + addClass(cm.display.wrapper, "CodeMirror-wrap"); + cm.display.sizer.style.minWidth = ""; + cm.display.sizerWidth = null; + } else { + rmClass(cm.display.wrapper, "CodeMirror-wrap"); + findMaxLine(cm); + } + estimateLineHeights(cm); + regChange(cm); + clearCaches(cm); + setTimeout(function () { return updateScrollbars(cm); }, 100); + } + + // A CodeMirror instance represents an editor. This is the object + // that user code is usually dealing with. + + function CodeMirror(place, options) { + var this$1 = this; + + if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) } + + this.options = options = options ? copyObj(options) : {}; + // Determine effective options based on given values and defaults. + copyObj(defaults, options, false); + + var doc = options.value; + if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); } + else if (options.mode) { doc.modeOption = options.mode; } + this.doc = doc; + + var input = new CodeMirror.inputStyles[options.inputStyle](this); + var display = this.display = new Display(place, doc, input, options); + display.wrapper.CodeMirror = this; + themeChanged(this); + if (options.lineWrapping) + { this.display.wrapper.className += " CodeMirror-wrap"; } + initScrollbars(this); + + this.state = { + keyMaps: [], // stores maps added by addKeyMap + overlays: [], // highlighting overlays, as added by addOverlay + modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info + overwrite: false, + delayingBlurEvent: false, + focused: false, + suppressEdits: false, // used to disable editing during key handlers when in readOnly mode + pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll + selectingText: false, + draggingText: false, + highlight: new Delayed(), // stores highlight worker timeout + keySeq: null, // Unfinished key sequence + specialChars: null + }; + + if (options.autofocus && !mobile) { display.input.focus(); } + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); } + + registerEventHandlers(this); + ensureGlobalHandlers(); + + startOperation(this); + this.curOp.forceUpdate = true; + attachDoc(this, doc); + + if ((options.autofocus && !mobile) || this.hasFocus()) + { setTimeout(function () { + if (this$1.hasFocus() && !this$1.state.focused) { onFocus(this$1); } + }, 20); } + else + { onBlur(this); } + + for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt)) + { optionHandlers[opt](this, options[opt], Init); } } + maybeUpdateLineNumberWidth(this); + if (options.finishInit) { options.finishInit(this); } + for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this); } + endOperation(this); + // Suppress optimizelegibility in Webkit, since it breaks text + // measuring on line wrapping boundaries. + if (webkit && options.lineWrapping && + getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") + { display.lineDiv.style.textRendering = "auto"; } + } + + // The default configuration options. + CodeMirror.defaults = defaults; + // Functions to run when options are changed. + CodeMirror.optionHandlers = optionHandlers; + + // Attach the necessary event handlers when initializing the editor + function registerEventHandlers(cm) { + var d = cm.display; + on(d.scroller, "mousedown", operation(cm, onMouseDown)); + // Older IE's will not fire a second mousedown for a double click + if (ie && ie_version < 11) + { on(d.scroller, "dblclick", operation(cm, function (e) { + if (signalDOMEvent(cm, e)) { return } + var pos = posFromMouse(cm, e); + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return } + e_preventDefault(e); + var word = cm.findWordAt(pos); + extendSelection(cm.doc, word.anchor, word.head); + })); } + else + { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); } + // Some browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for these browsers. + on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); }); + on(d.input.getField(), "contextmenu", function (e) { + if (!d.scroller.contains(e.target)) { onContextMenu(cm, e); } + }); + + // Used to suppress mouse event handling when a touch happens + var touchFinished, prevTouch = {end: 0}; + function finishTouch() { + if (d.activeTouch) { + touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000); + prevTouch = d.activeTouch; + prevTouch.end = +new Date; + } + } + function isMouseLikeTouchEvent(e) { + if (e.touches.length != 1) { return false } + var touch = e.touches[0]; + return touch.radiusX <= 1 && touch.radiusY <= 1 + } + function farAway(touch, other) { + if (other.left == null) { return true } + var dx = other.left - touch.left, dy = other.top - touch.top; + return dx * dx + dy * dy > 20 * 20 + } + on(d.scroller, "touchstart", function (e) { + if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) { + d.input.ensurePolled(); + clearTimeout(touchFinished); + var now = +new Date; + d.activeTouch = {start: now, moved: false, + prev: now - prevTouch.end <= 300 ? prevTouch : null}; + if (e.touches.length == 1) { + d.activeTouch.left = e.touches[0].pageX; + d.activeTouch.top = e.touches[0].pageY; + } + } + }); + on(d.scroller, "touchmove", function () { + if (d.activeTouch) { d.activeTouch.moved = true; } + }); + on(d.scroller, "touchend", function (e) { + var touch = d.activeTouch; + if (touch && !eventInWidget(d, e) && touch.left != null && + !touch.moved && new Date - touch.start < 300) { + var pos = cm.coordsChar(d.activeTouch, "page"), range; + if (!touch.prev || farAway(touch, touch.prev)) // Single tap + { range = new Range(pos, pos); } + else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap + { range = cm.findWordAt(pos); } + else // Triple tap + { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); } + cm.setSelection(range.anchor, range.head); + cm.focus(); + e_preventDefault(e); + } + finishTouch(); + }); + on(d.scroller, "touchcancel", finishTouch); + + // Sync scrolling between fake scrollbars and real scrollable + // area, ensure viewport is updated when scrolling. + on(d.scroller, "scroll", function () { + if (d.scroller.clientHeight) { + updateScrollTop(cm, d.scroller.scrollTop); + setScrollLeft(cm, d.scroller.scrollLeft, true); + signal(cm, "scroll", cm); + } + }); + + // Listen to wheel events in order to try and update the viewport on time. + on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); }); + on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); }); + + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); + + d.dragFunctions = { + enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }}, + over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }}, + start: function (e) { return onDragStart(cm, e); }, + drop: operation(cm, onDrop), + leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }} + }; + + var inp = d.input.getField(); + on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); }); + on(inp, "keydown", operation(cm, onKeyDown)); + on(inp, "keypress", operation(cm, onKeyPress)); + on(inp, "focus", function (e) { return onFocus(cm, e); }); + on(inp, "blur", function (e) { return onBlur(cm, e); }); + } + + var initHooks = []; + CodeMirror.defineInitHook = function (f) { return initHooks.push(f); }; + + // Indent the given line. The how parameter can be "smart", + // "add"/null, "subtract", or "prev". When aggressive is false + // (typically set to true for forced single-line indents), empty + // lines are not indented, and places where the mode returns Pass + // are left alone. + function indentLine(cm, n, how, aggressive) { + var doc = cm.doc, state; + if (how == null) { how = "add"; } + if (how == "smart") { + // Fall back to "prev" when the mode doesn't have an indentation + // method. + if (!doc.mode.indent) { how = "prev"; } + else { state = getContextBefore(cm, n).state; } + } + + var tabSize = cm.options.tabSize; + var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); + if (line.stateAfter) { line.stateAfter = null; } + var curSpaceString = line.text.match(/^\s*/)[0], indentation; + if (!aggressive && !/\S/.test(line.text)) { + indentation = 0; + how = "not"; + } else if (how == "smart") { + indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); + if (indentation == Pass || indentation > 150) { + if (!aggressive) { return } + how = "prev"; + } + } + if (how == "prev") { + if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); } + else { indentation = 0; } + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit; + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit; + } else if (typeof how == "number") { + indentation = curSpace + how; + } + indentation = Math.max(0, indentation); + + var indentString = "", pos = 0; + if (cm.options.indentWithTabs) + { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} } + if (pos < indentation) { indentString += spaceStr(indentation - pos); } + + if (indentString != curSpaceString) { + replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); + line.stateAfter = null; + return true + } else { + // Ensure that, if the cursor was in the whitespace at the start + // of the line, it is moved to the end of that space. + for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) { + var range = doc.sel.ranges[i$1]; + if (range.head.line == n && range.head.ch < curSpaceString.length) { + var pos$1 = Pos(n, curSpaceString.length); + replaceOneSelection(doc, i$1, new Range(pos$1, pos$1)); + break + } + } + } + } + + // This will be set to a {lineWise: bool, text: [string]} object, so + // that, when pasting, we know what kind of selections the copied + // text was made out of. + var lastCopied = null; + + function setLastCopied(newLastCopied) { + lastCopied = newLastCopied; + } + + function applyTextInput(cm, inserted, deleted, sel, origin) { + var doc = cm.doc; + cm.display.shift = false; + if (!sel) { sel = doc.sel; } + + var recent = +new Date - 200; + var paste = origin == "paste" || cm.state.pasteIncoming > recent; + var textLines = splitLinesAuto(inserted), multiPaste = null; + // When pasting N lines into N selections, insert one line per selection + if (paste && sel.ranges.length > 1) { + if (lastCopied && lastCopied.text.join("\n") == inserted) { + if (sel.ranges.length % lastCopied.text.length == 0) { + multiPaste = []; + for (var i = 0; i < lastCopied.text.length; i++) + { multiPaste.push(doc.splitLines(lastCopied.text[i])); } + } + } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) { + multiPaste = map(textLines, function (l) { return [l]; }); + } + } + + var updateInput = cm.curOp.updateInput; + // Normal behavior is to insert the new text into every selection + for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) { + var range = sel.ranges[i$1]; + var from = range.from(), to = range.to(); + if (range.empty()) { + if (deleted && deleted > 0) // Handle deletion + { from = Pos(from.line, from.ch - deleted); } + else if (cm.state.overwrite && !paste) // Handle overwrite + { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); } + else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n")) + { from = to = Pos(from.line, 0); } + } + var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines, + origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")}; + makeChange(cm.doc, changeEvent); + signalLater(cm, "inputRead", cm, changeEvent); + } + if (inserted && !paste) + { triggerElectric(cm, inserted); } + + ensureCursorVisible(cm); + if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; } + cm.curOp.typing = true; + cm.state.pasteIncoming = cm.state.cutIncoming = -1; + } + + function handlePaste(e, cm) { + var pasted = e.clipboardData && e.clipboardData.getData("Text"); + if (pasted) { + e.preventDefault(); + if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus()) + { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); } + return true + } + } + + function triggerElectric(cm, inserted) { + // When an 'electric' character is inserted, immediately trigger a reindent + if (!cm.options.electricChars || !cm.options.smartIndent) { return } + var sel = cm.doc.sel; + + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i]; + if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { continue } + var mode = cm.getModeAt(range.head); + var indented = false; + if (mode.electricChars) { + for (var j = 0; j < mode.electricChars.length; j++) + { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { + indented = indentLine(cm, range.head.line, "smart"); + break + } } + } else if (mode.electricInput) { + if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) + { indented = indentLine(cm, range.head.line, "smart"); } + } + if (indented) { signalLater(cm, "electricInput", cm, range.head.line); } + } + } + + function copyableRanges(cm) { + var text = [], ranges = []; + for (var i = 0; i < cm.doc.sel.ranges.length; i++) { + var line = cm.doc.sel.ranges[i].head.line; + var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)}; + ranges.push(lineRange); + text.push(cm.getRange(lineRange.anchor, lineRange.head)); + } + return {text: text, ranges: ranges} + } + + function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) { + field.setAttribute("autocorrect", autocorrect ? "on" : "off"); + field.setAttribute("autocapitalize", autocapitalize ? "on" : "off"); + field.setAttribute("spellcheck", !!spellcheck); + } + + function hiddenTextarea() { + var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"); + var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); + // The textarea is kept positioned near the cursor to prevent the + // fact that it'll be scrolled into view on input from scrolling + // our fake cursor out of view. On webkit, when wrap=off, paste is + // very slow. So make the area wide instead. + if (webkit) { te.style.width = "1000px"; } + else { te.setAttribute("wrap", "off"); } + // If border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) { te.style.border = "1px solid black"; } + return div + } + + // The publicly visible API. Note that methodOp(f) means + // 'wrap f in an operation, performed on its `this` parameter'. + + // This is not the complete set of editor methods. Most of the + // methods defined on the Doc type are also injected into + // CodeMirror.prototype, for backwards compatibility and + // convenience. + + function addEditorMethods(CodeMirror) { + var optionHandlers = CodeMirror.optionHandlers; + + var helpers = CodeMirror.helpers = {}; + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function(){win(this).focus(); this.display.input.focus();}, + + setOption: function(option, value) { + var options = this.options, old = options[option]; + if (options[option] == value && option != "mode") { return } + options[option] = value; + if (optionHandlers.hasOwnProperty(option)) + { operation(this, optionHandlers[option])(this, value, old); } + signal(this, "optionChange", this, option); + }, + + getOption: function(option) {return this.options[option]}, + getDoc: function() {return this.doc}, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)); + }, + removeKeyMap: function(map) { + var maps = this.state.keyMaps; + for (var i = 0; i < maps.length; ++i) + { if (maps[i] == map || maps[i].name == map) { + maps.splice(i, 1); + return true + } } + }, + + addOverlay: methodOp(function(spec, options) { + var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); + if (mode.startState) { throw new Error("Overlays may not be stateful.") } + insertSorted(this.state.overlays, + {mode: mode, modeSpec: spec, opaque: options && options.opaque, + priority: (options && options.priority) || 0}, + function (overlay) { return overlay.priority; }); + this.state.modeGen++; + regChange(this); + }), + removeOverlay: methodOp(function(spec) { + var overlays = this.state.overlays; + for (var i = 0; i < overlays.length; ++i) { + var cur = overlays[i].modeSpec; + if (cur == spec || typeof spec == "string" && cur.name == spec) { + overlays.splice(i, 1); + this.state.modeGen++; + regChange(this); + return + } + } + }), + + indentLine: methodOp(function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; } + else { dir = dir ? "add" : "subtract"; } + } + if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); } + }), + indentSelection: methodOp(function(how) { + var ranges = this.doc.sel.ranges, end = -1; + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (!range.empty()) { + var from = range.from(), to = range.to(); + var start = Math.max(end, from.line); + end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1; + for (var j = start; j < end; ++j) + { indentLine(this, j, how); } + var newRanges = this.doc.sel.ranges; + if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) + { replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); } + } else if (range.head.line > end) { + indentLine(this, range.head.line, how, true); + end = range.head.line; + if (i == this.doc.sel.primIndex) { ensureCursorVisible(this); } + } + } + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + return takeToken(this, pos, precise) + }, + + getLineTokens: function(line, precise) { + return takeToken(this, Pos(line), precise, true) + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos); + var styles = getLineStyles(this, getLine(this.doc, pos.line)); + var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; + var type; + if (ch == 0) { type = styles[2]; } + else { for (;;) { + var mid = (before + after) >> 1; + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; } + else if (styles[mid * 2 + 1] < ch) { before = mid + 1; } + else { type = styles[mid * 2 + 2]; break } + } } + var cut = type ? type.indexOf("overlay ") : -1; + return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1) + }, + + getModeAt: function(pos) { + var mode = this.doc.mode; + if (!mode.innerMode) { return mode } + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode + }, + + getHelper: function(pos, type) { + return this.getHelpers(pos, type)[0] + }, + + getHelpers: function(pos, type) { + var found = []; + if (!helpers.hasOwnProperty(type)) { return found } + var help = helpers[type], mode = this.getModeAt(pos); + if (typeof mode[type] == "string") { + if (help[mode[type]]) { found.push(help[mode[type]]); } + } else if (mode[type]) { + for (var i = 0; i < mode[type].length; i++) { + var val = help[mode[type][i]]; + if (val) { found.push(val); } + } + } else if (mode.helperType && help[mode.helperType]) { + found.push(help[mode.helperType]); + } else if (help[mode.name]) { + found.push(help[mode.name]); + } + for (var i$1 = 0; i$1 < help._global.length; i$1++) { + var cur = help._global[i$1]; + if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) + { found.push(cur.val); } + } + return found + }, + + getStateAfter: function(line, precise) { + var doc = this.doc; + line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); + return getContextBefore(this, line + 1, precise).state + }, + + cursorCoords: function(start, mode) { + var pos, range = this.doc.sel.primary(); + if (start == null) { pos = range.head; } + else if (typeof start == "object") { pos = clipPos(this.doc, start); } + else { pos = start ? range.from() : range.to(); } + return cursorCoords(this, pos, mode || "page") + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page") + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page"); + return coordsChar(this, coords.left, coords.top) + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; + return lineAtHeight(this.doc, height + this.display.viewOffset) + }, + heightAtLine: function(line, mode, includeWidgets) { + var end = false, lineObj; + if (typeof line == "number") { + var last = this.doc.first + this.doc.size - 1; + if (line < this.doc.first) { line = this.doc.first; } + else if (line > last) { line = last; end = true; } + lineObj = getLine(this.doc, line); + } else { + lineObj = line; + } + return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top + + (end ? this.doc.height - heightAtLine(lineObj) : 0) + }, + + defaultTextHeight: function() { return textHeight(this.display) }, + defaultCharWidth: function() { return charWidth(this.display) }, + + getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}}, + + addWidget: function(pos, node, scroll, vert, horiz) { + var display = this.display; + pos = cursorCoords(this, clipPos(this.doc, pos)); + var top = pos.bottom, left = pos.left; + node.style.position = "absolute"; + node.setAttribute("cm-ignore-events", "true"); + this.display.input.setUneditable(node); + display.sizer.appendChild(node); + if (vert == "over") { + top = pos.top; + } else if (vert == "above" || vert == "near") { + var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) + { top = pos.top - node.offsetHeight; } + else if (pos.bottom + node.offsetHeight <= vspace) + { top = pos.bottom; } + if (left + node.offsetWidth > hspace) + { left = hspace - node.offsetWidth; } + } + node.style.top = top + "px"; + node.style.left = node.style.right = ""; + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth; + node.style.right = "0px"; + } else { + if (horiz == "left") { left = 0; } + else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; } + node.style.left = left + "px"; + } + if (scroll) + { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); } + }, + + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + triggerOnMouseDown: methodOp(onMouseDown), + + execCommand: function(cmd) { + if (commands.hasOwnProperty(cmd)) + { return commands[cmd].call(null, this) } + }, + + triggerElectric: methodOp(function(text) { triggerElectric(this, text); }), + + findPosH: function(from, amount, unit, visually) { + var dir = 1; + if (amount < 0) { dir = -1; amount = -amount; } + var cur = clipPos(this.doc, from); + for (var i = 0; i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually); + if (cur.hitSide) { break } + } + return cur + }, + + moveH: methodOp(function(dir, unit) { + var this$1 = this; + + this.extendSelectionsBy(function (range) { + if (this$1.display.shift || this$1.doc.extend || range.empty()) + { return findPosH(this$1.doc, range.head, dir, unit, this$1.options.rtlMoveVisually) } + else + { return dir < 0 ? range.from() : range.to() } + }, sel_move); + }), + + deleteH: methodOp(function(dir, unit) { + var sel = this.doc.sel, doc = this.doc; + if (sel.somethingSelected()) + { doc.replaceSelection("", null, "+delete"); } + else + { deleteNearSelection(this, function (range) { + var other = findPosH(doc, range.head, dir, unit, false); + return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other} + }); } + }), + + findPosV: function(from, amount, unit, goalColumn) { + var dir = 1, x = goalColumn; + if (amount < 0) { dir = -1; amount = -amount; } + var cur = clipPos(this.doc, from); + for (var i = 0; i < amount; ++i) { + var coords = cursorCoords(this, cur, "div"); + if (x == null) { x = coords.left; } + else { coords.left = x; } + cur = findPosV(this, coords, dir, unit); + if (cur.hitSide) { break } + } + return cur + }, + + moveV: methodOp(function(dir, unit) { + var this$1 = this; + + var doc = this.doc, goals = []; + var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected(); + doc.extendSelectionsBy(function (range) { + if (collapse) + { return dir < 0 ? range.from() : range.to() } + var headPos = cursorCoords(this$1, range.head, "div"); + if (range.goalColumn != null) { headPos.left = range.goalColumn; } + goals.push(headPos.left); + var pos = findPosV(this$1, headPos, dir, unit); + if (unit == "page" && range == doc.sel.primary()) + { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); } + return pos + }, sel_move); + if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++) + { doc.sel.ranges[i].goalColumn = goals[i]; } } + }), + + // Find the word at the given position (as returned by coordsChar). + findWordAt: function(pos) { + var doc = this.doc, line = getLine(doc, pos.line).text; + var start = pos.ch, end = pos.ch; + if (line) { + var helper = this.getHelper(pos, "wordChars"); + if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; } + var startChar = line.charAt(start); + var check = isWordChar(startChar, helper) + ? function (ch) { return isWordChar(ch, helper); } + : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); } + : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); }; + while (start > 0 && check(line.charAt(start - 1))) { --start; } + while (end < line.length && check(line.charAt(end))) { ++end; } + } + return new Range(Pos(pos.line, start), Pos(pos.line, end)) + }, + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) { return } + if (this.state.overwrite = !this.state.overwrite) + { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); } + else + { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); } + + signal(this, "overwriteToggle", this, this.state.overwrite); + }, + hasFocus: function() { return this.display.input.getField() == activeElt(root(this)) }, + isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) }, + + scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }), + getScrollInfo: function() { + var scroller = this.display.scroller; + return {left: scroller.scrollLeft, top: scroller.scrollTop, + height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, + width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), clientWidth: displayWidth(this)} + }, + + scrollIntoView: methodOp(function(range, margin) { + if (range == null) { + range = {from: this.doc.sel.primary().head, to: null}; + if (margin == null) { margin = this.options.cursorScrollMargin; } + } else if (typeof range == "number") { + range = {from: Pos(range, 0), to: null}; + } else if (range.from == null) { + range = {from: range, to: null}; + } + if (!range.to) { range.to = range.from; } + range.margin = margin || 0; + + if (range.from.line != null) { + scrollToRange(this, range); + } else { + scrollToCoordsRange(this, range.from, range.to, range.margin); + } + }), + + setSize: methodOp(function(width, height) { + var this$1 = this; + + var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; }; + if (width != null) { this.display.wrapper.style.width = interpret(width); } + if (height != null) { this.display.wrapper.style.height = interpret(height); } + if (this.options.lineWrapping) { clearLineMeasurementCache(this); } + var lineNo = this.display.viewFrom; + this.doc.iter(lineNo, this.display.viewTo, function (line) { + if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) + { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo, "widget"); break } } } + ++lineNo; + }); + this.curOp.forceUpdate = true; + signal(this, "refresh", this); + }), + + operation: function(f){return runInOp(this, f)}, + startOperation: function(){return startOperation(this)}, + endOperation: function(){return endOperation(this)}, + + refresh: methodOp(function() { + var oldHeight = this.display.cachedTextHeight; + regChange(this); + this.curOp.forceUpdate = true; + clearCaches(this); + scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop); + updateGutterSpace(this.display); + if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping) + { estimateLineHeights(this); } + signal(this, "refresh", this); + }), + + swapDoc: methodOp(function(doc) { + var old = this.doc; + old.cm = null; + // Cancel the current text selection if any (#5821) + if (this.state.selectingText) { this.state.selectingText(); } + attachDoc(this, doc); + clearCaches(this); + this.display.input.reset(); + scrollToCoords(this, doc.scrollLeft, doc.scrollTop); + this.curOp.forceScroll = true; + signalLater(this, "swapDoc", this, old); + return old + }), + + phrase: function(phraseText) { + var phrases = this.options.phrases; + return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText + }, + + 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} + }; + eventMixin(CodeMirror); + + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; } + helpers[type][name] = value; + }; + CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { + CodeMirror.registerHelper(type, name, value); + helpers[type]._global.push({pred: predicate, val: value}); + }; + } + + // Used for horizontal relative motion. Dir is -1 or 1 (left or + // right), unit can be "codepoint", "char", "column" (like char, but + // doesn't cross line boundaries), "word" (across next word), or + // "group" (to the start of next group of word or + // non-word-non-whitespace chars). The visually param controls + // whether, in right-to-left text, direction 1 means to move towards + // the next index in the string, or towards the character to the right + // of the current position. The resulting position will have a + // hitSide=true property if it reached the end of the document. + function findPosH(doc, pos, dir, unit, visually) { + var oldPos = pos; + var origDir = dir; + var lineObj = getLine(doc, pos.line); + var lineDir = visually && doc.direction == "rtl" ? -dir : dir; + function findNextLine() { + var l = pos.line + lineDir; + if (l < doc.first || l >= doc.first + doc.size) { return false } + pos = new Pos(l, pos.ch, pos.sticky); + return lineObj = getLine(doc, l) + } + function moveOnce(boundToLine) { + var next; + if (unit == "codepoint") { + var ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1)); + if (isNaN(ch)) { + next = null; + } else { + var astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF; + next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir); + } + } else if (visually) { + next = moveVisually(doc.cm, lineObj, pos, dir); + } else { + next = moveLogically(lineObj, pos, dir); + } + if (next == null) { + if (!boundToLine && findNextLine()) + { pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir); } + else + { return false } + } else { + pos = next; + } + return true + } + + if (unit == "char" || unit == "codepoint") { + moveOnce(); + } else if (unit == "column") { + moveOnce(true); + } else if (unit == "word" || unit == "group") { + var sawType = null, group = unit == "group"; + var helper = doc.cm && doc.cm.getHelper(pos, "wordChars"); + for (var first = true;; first = false) { + if (dir < 0 && !moveOnce(!first)) { break } + var cur = lineObj.text.charAt(pos.ch) || "\n"; + var type = isWordChar(cur, helper) ? "w" + : group && cur == "\n" ? "n" + : !group || /\s/.test(cur) ? null + : "p"; + if (group && !first && !type) { type = "s"; } + if (sawType && sawType != type) { + if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";} + break + } + + if (type) { sawType = type; } + if (dir > 0 && !moveOnce(!first)) { break } + } + } + var result = skipAtomic(doc, pos, oldPos, origDir, true); + if (equalCursorPos(oldPos, result)) { result.hitSide = true; } + return result + } + + // For relative vertical movement. Dir may be -1 or 1. Unit can be + // "page" or "line". The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosV(cm, pos, dir, unit) { + var doc = cm.doc, x = pos.left, y; + if (unit == "page") { + var pageSize = Math.min(cm.display.wrapper.clientHeight, win(cm).innerHeight || doc(cm).documentElement.clientHeight); + var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3); + y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount; + + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3; + } + var target; + for (;;) { + target = coordsChar(cm, x, y); + if (!target.outside) { break } + if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break } + y += dir * 5; + } + return target + } + + // CONTENTEDITABLE INPUT STYLE + + var ContentEditableInput = function(cm) { + this.cm = cm; + this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null; + this.polling = new Delayed(); + this.composing = null; + this.gracePeriod = false; + this.readDOMTimeout = null; + }; + + ContentEditableInput.prototype.init = function (display) { + var this$1 = this; + + var input = this, cm = input.cm; + var div = input.div = display.lineDiv; + div.contentEditable = true; + disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize); + + function belongsToInput(e) { + for (var t = e.target; t; t = t.parentNode) { + if (t == div) { return true } + if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) { break } + } + return false + } + + on(div, "paste", function (e) { + if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) { return } + // IE doesn't fire input events, so we schedule a read for the pasted content in this way + if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); } + }); + + on(div, "compositionstart", function (e) { + this$1.composing = {data: e.data, done: false}; + }); + on(div, "compositionupdate", function (e) { + if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; } + }); + on(div, "compositionend", function (e) { + if (this$1.composing) { + if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); } + this$1.composing.done = true; + } + }); + + on(div, "touchstart", function () { return input.forceCompositionEnd(); }); + + on(div, "input", function () { + if (!this$1.composing) { this$1.readFromDOMSoon(); } + }); + + function onCopyCut(e) { + if (!belongsToInput(e) || signalDOMEvent(cm, e)) { return } + if (cm.somethingSelected()) { + setLastCopied({lineWise: false, text: cm.getSelections()}); + if (e.type == "cut") { cm.replaceSelection("", null, "cut"); } + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + var ranges = copyableRanges(cm); + setLastCopied({lineWise: true, text: ranges.text}); + if (e.type == "cut") { + cm.operation(function () { + cm.setSelections(ranges.ranges, 0, sel_dontScroll); + cm.replaceSelection("", null, "cut"); + }); + } + } + if (e.clipboardData) { + e.clipboardData.clearData(); + var content = lastCopied.text.join("\n"); + // iOS exposes the clipboard API, but seems to discard content inserted into it + e.clipboardData.setData("Text", content); + if (e.clipboardData.getData("Text") == content) { + e.preventDefault(); + return + } + } + // Old-fashioned briefly-focus-a-textarea hack + var kludge = hiddenTextarea(), te = kludge.firstChild; + disableBrowserMagic(te); + cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild); + te.value = lastCopied.text.join("\n"); + var hadFocus = activeElt(rootNode(div)); + selectInput(te); + setTimeout(function () { + cm.display.lineSpace.removeChild(kludge); + hadFocus.focus(); + if (hadFocus == div) { input.showPrimarySelection(); } + }, 50); + } + on(div, "copy", onCopyCut); + on(div, "cut", onCopyCut); + }; + + ContentEditableInput.prototype.screenReaderLabelChanged = function (label) { + // Label for screenreaders, accessibility + if(label) { + this.div.setAttribute('aria-label', label); + } else { + this.div.removeAttribute('aria-label'); + } + }; + + ContentEditableInput.prototype.prepareSelection = function () { + var result = prepareSelection(this.cm, false); + result.focus = activeElt(rootNode(this.div)) == this.div; + return result + }; + + ContentEditableInput.prototype.showSelection = function (info, takeFocus) { + if (!info || !this.cm.display.view.length) { return } + if (info.focus || takeFocus) { this.showPrimarySelection(); } + this.showMultipleSelections(info); + }; + + ContentEditableInput.prototype.getSelection = function () { + return this.cm.display.wrapper.ownerDocument.getSelection() + }; + + ContentEditableInput.prototype.showPrimarySelection = function () { + var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary(); + var from = prim.from(), to = prim.to(); + + if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) { + sel.removeAllRanges(); + return + } + + var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); + var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset); + if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && + cmp(minPos(curAnchor, curFocus), from) == 0 && + cmp(maxPos(curAnchor, curFocus), to) == 0) + { return } + + var view = cm.display.view; + var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) || + {node: view[0].measure.map[2], offset: 0}; + var end = to.line < cm.display.viewTo && posToDOM(cm, to); + if (!end) { + var measure = view[view.length - 1].measure; + var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map; + end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]}; + } + + if (!start || !end) { + sel.removeAllRanges(); + return + } + + var old = sel.rangeCount && sel.getRangeAt(0), rng; + try { rng = range(start.node, start.offset, end.offset, end.node); } + catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible + if (rng) { + if (!gecko && cm.state.focused) { + sel.collapse(start.node, start.offset); + if (!rng.collapsed) { + sel.removeAllRanges(); + sel.addRange(rng); + } + } else { + sel.removeAllRanges(); + sel.addRange(rng); + } + if (old && sel.anchorNode == null) { sel.addRange(old); } + else if (gecko) { this.startGracePeriod(); } + } + this.rememberSelection(); + }; + + ContentEditableInput.prototype.startGracePeriod = function () { + var this$1 = this; + + clearTimeout(this.gracePeriod); + this.gracePeriod = setTimeout(function () { + this$1.gracePeriod = false; + if (this$1.selectionChanged()) + { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); } + }, 20); + }; + + ContentEditableInput.prototype.showMultipleSelections = function (info) { + removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors); + removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection); + }; + + ContentEditableInput.prototype.rememberSelection = function () { + var sel = this.getSelection(); + this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset; + this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset; + }; + + ContentEditableInput.prototype.selectionInEditor = function () { + var sel = this.getSelection(); + if (!sel.rangeCount) { return false } + var node = sel.getRangeAt(0).commonAncestorContainer; + return contains(this.div, node) + }; + + ContentEditableInput.prototype.focus = function () { + if (this.cm.options.readOnly != "nocursor") { + if (!this.selectionInEditor() || activeElt(rootNode(this.div)) != this.div) + { this.showSelection(this.prepareSelection(), true); } + this.div.focus(); + } + }; + ContentEditableInput.prototype.blur = function () { this.div.blur(); }; + ContentEditableInput.prototype.getField = function () { return this.div }; + + ContentEditableInput.prototype.supportsTouch = function () { return true }; + + ContentEditableInput.prototype.receivedFocus = function () { + var this$1 = this; + + var input = this; + if (this.selectionInEditor()) + { setTimeout(function () { return this$1.pollSelection(); }, 20); } + else + { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); } + + function poll() { + if (input.cm.state.focused) { + input.pollSelection(); + input.polling.set(input.cm.options.pollInterval, poll); + } + } + this.polling.set(this.cm.options.pollInterval, poll); + }; + + ContentEditableInput.prototype.selectionChanged = function () { + var sel = this.getSelection(); + return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || + sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset + }; + + ContentEditableInput.prototype.pollSelection = function () { + if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return } + var sel = this.getSelection(), cm = this.cm; + // On Android Chrome (version 56, at least), backspacing into an + // uneditable block element will put the cursor in that element, + // and then, because it's not editable, hide the virtual keyboard. + // Because Android doesn't allow us to actually detect backspace + // presses in a sane way, this code checks for when that happens + // and simulates a backspace press in this case. + if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) { + this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs}); + this.blur(); + this.focus(); + return + } + if (this.composing) { return } + this.rememberSelection(); + var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset); + var head = domToPos(cm, sel.focusNode, sel.focusOffset); + if (anchor && head) { runInOp(cm, function () { + setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll); + if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; } + }); } + }; + + ContentEditableInput.prototype.pollContent = function () { + if (this.readDOMTimeout != null) { + clearTimeout(this.readDOMTimeout); + this.readDOMTimeout = null; + } + + var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary(); + var from = sel.from(), to = sel.to(); + if (from.ch == 0 && from.line > cm.firstLine()) + { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); } + if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine()) + { to = Pos(to.line + 1, 0); } + if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false } + + var fromIndex, fromLine, fromNode; + if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { + fromLine = lineNo(display.view[0].line); + fromNode = display.view[0].node; + } else { + fromLine = lineNo(display.view[fromIndex].line); + fromNode = display.view[fromIndex - 1].node.nextSibling; + } + var toIndex = findViewIndex(cm, to.line); + var toLine, toNode; + if (toIndex == display.view.length - 1) { + toLine = display.viewTo - 1; + toNode = display.lineDiv.lastChild; + } else { + toLine = lineNo(display.view[toIndex + 1].line) - 1; + toNode = display.view[toIndex + 1].node.previousSibling; + } + + if (!fromNode) { return false } + var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)); + var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)); + while (newText.length > 1 && oldText.length > 1) { + if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; } + else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; } + else { break } + } + + var cutFront = 0, cutEnd = 0; + var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length); + while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) + { ++cutFront; } + var newBot = lst(newText), oldBot = lst(oldText); + var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), + oldBot.length - (oldText.length == 1 ? cutFront : 0)); + while (cutEnd < maxCutEnd && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) + { ++cutEnd; } + // Try to move start of change to start of selection if ambiguous + if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) { + while (cutFront && cutFront > from.ch && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) { + cutFront--; + cutEnd++; + } + } + + newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, ""); + newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, ""); + + var chFrom = Pos(fromLine, cutFront); + var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0); + if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { + replaceRange(cm.doc, newText, chFrom, chTo, "+input"); + return true + } + }; + + ContentEditableInput.prototype.ensurePolled = function () { + this.forceCompositionEnd(); + }; + ContentEditableInput.prototype.reset = function () { + this.forceCompositionEnd(); + }; + ContentEditableInput.prototype.forceCompositionEnd = function () { + if (!this.composing) { return } + clearTimeout(this.readDOMTimeout); + this.composing = null; + this.updateFromDOM(); + this.div.blur(); + this.div.focus(); + }; + ContentEditableInput.prototype.readFromDOMSoon = function () { + var this$1 = this; + + if (this.readDOMTimeout != null) { return } + this.readDOMTimeout = setTimeout(function () { + this$1.readDOMTimeout = null; + if (this$1.composing) { + if (this$1.composing.done) { this$1.composing = null; } + else { return } + } + this$1.updateFromDOM(); + }, 80); + }; + + ContentEditableInput.prototype.updateFromDOM = function () { + var this$1 = this; + + if (this.cm.isReadOnly() || !this.pollContent()) + { runInOp(this.cm, function () { return regChange(this$1.cm); }); } + }; + + ContentEditableInput.prototype.setUneditable = function (node) { + node.contentEditable = "false"; + }; + + ContentEditableInput.prototype.onKeyPress = function (e) { + if (e.charCode == 0 || this.composing) { return } + e.preventDefault(); + if (!this.cm.isReadOnly()) + { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); } + }; + + ContentEditableInput.prototype.readOnlyChanged = function (val) { + this.div.contentEditable = String(val != "nocursor"); + }; + + ContentEditableInput.prototype.onContextMenu = function () {}; + ContentEditableInput.prototype.resetPosition = function () {}; + + ContentEditableInput.prototype.needsContentAttribute = true; + + function posToDOM(cm, pos) { + var view = findViewForLine(cm, pos.line); + if (!view || view.hidden) { return null } + var line = getLine(cm.doc, pos.line); + var info = mapFromLineView(view, line, pos.line); + + var order = getOrder(line, cm.doc.direction), side = "left"; + if (order) { + var partPos = getBidiPartAt(order, pos.ch); + side = partPos % 2 ? "right" : "left"; + } + var result = nodeAndOffsetInLineMap(info.map, pos.ch, side); + result.offset = result.collapse == "right" ? result.end : result.start; + return result + } + + function isInGutter(node) { + for (var scan = node; scan; scan = scan.parentNode) + { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } } + return false + } + + function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos } + + function domTextBetween(cm, from, to, fromLine, toLine) { + var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false; + function recognizeMarker(id) { return function (marker) { return marker.id == id; } } + function close() { + if (closing) { + text += lineSep; + if (extraLinebreak) { text += lineSep; } + closing = extraLinebreak = false; + } + } + function addText(str) { + if (str) { + close(); + text += str; + } + } + function walk(node) { + if (node.nodeType == 1) { + var cmText = node.getAttribute("cm-text"); + if (cmText) { + addText(cmText); + return + } + var markerID = node.getAttribute("cm-marker"), range; + if (markerID) { + var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)); + if (found.length && (range = found[0].find(0))) + { addText(getBetween(cm.doc, range.from, range.to).join(lineSep)); } + return + } + if (node.getAttribute("contenteditable") == "false") { return } + var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName); + if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return } + + if (isBlock) { close(); } + for (var i = 0; i < node.childNodes.length; i++) + { walk(node.childNodes[i]); } + + if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; } + if (isBlock) { closing = true; } + } else if (node.nodeType == 3) { + addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " ")); + } + } + for (;;) { + walk(from); + if (from == to) { break } + from = from.nextSibling; + extraLinebreak = false; + } + return text + } + + function domToPos(cm, node, offset) { + var lineNode; + if (node == cm.display.lineDiv) { + lineNode = cm.display.lineDiv.childNodes[offset]; + if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) } + node = null; offset = 0; + } else { + for (lineNode = node;; lineNode = lineNode.parentNode) { + if (!lineNode || lineNode == cm.display.lineDiv) { return null } + if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break } + } + } + for (var i = 0; i < cm.display.view.length; i++) { + var lineView = cm.display.view[i]; + if (lineView.node == lineNode) + { return locateNodeInLineView(lineView, node, offset) } + } + } + + function locateNodeInLineView(lineView, node, offset) { + var wrapper = lineView.text.firstChild, bad = false; + if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) } + if (node == wrapper) { + bad = true; + node = wrapper.childNodes[offset]; + offset = 0; + if (!node) { + var line = lineView.rest ? lst(lineView.rest) : lineView.line; + return badPos(Pos(lineNo(line), line.text.length), bad) + } + } + + var textNode = node.nodeType == 3 ? node : null, topNode = node; + if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { + textNode = node.firstChild; + if (offset) { offset = textNode.nodeValue.length; } + } + while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; } + var measure = lineView.measure, maps = measure.maps; + + function find(textNode, topNode, offset) { + for (var i = -1; i < (maps ? maps.length : 0); i++) { + var map = i < 0 ? measure.map : maps[i]; + for (var j = 0; j < map.length; j += 3) { + var curNode = map[j + 2]; + if (curNode == textNode || curNode == topNode) { + var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]); + var ch = map[j] + offset; + if (offset < 0 || curNode != textNode) { ch = map[j + (offset ? 1 : 0)]; } + return Pos(line, ch) + } + } + } + } + var found = find(textNode, topNode, offset); + if (found) { return badPos(found, bad) } + + // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems + for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { + found = find(after, after.firstChild, 0); + if (found) + { return badPos(Pos(found.line, found.ch - dist), bad) } + else + { dist += after.textContent.length; } + } + for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) { + found = find(before, before.firstChild, -1); + if (found) + { return badPos(Pos(found.line, found.ch + dist$1), bad) } + else + { dist$1 += before.textContent.length; } + } + } + + // TEXTAREA INPUT STYLE + + var TextareaInput = function(cm) { + this.cm = cm; + // See input.poll and input.reset + this.prevInput = ""; + + // Flag that indicates whether we expect input to appear real soon + // now (after some event like 'keypress' or 'input') and are + // polling intensively. + this.pollingFast = false; + // Self-resetting timeout for the poller + this.polling = new Delayed(); + // Used to work around IE issue with selection being forgotten when focus moves away from textarea + this.hasSelection = false; + this.composing = null; + this.resetting = false; + }; + + TextareaInput.prototype.init = function (display) { + var this$1 = this; + + var input = this, cm = this.cm; + this.createField(display); + var te = this.textarea; + + display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild); + + // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) + if (ios) { te.style.width = "0px"; } + + on(te, "input", function () { + if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; } + input.poll(); + }); + + on(te, "paste", function (e) { + if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return } + + cm.state.pasteIncoming = +new Date; + input.fastPoll(); + }); + + function prepareCopyCut(e) { + if (signalDOMEvent(cm, e)) { return } + if (cm.somethingSelected()) { + setLastCopied({lineWise: false, text: cm.getSelections()}); + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + var ranges = copyableRanges(cm); + setLastCopied({lineWise: true, text: ranges.text}); + if (e.type == "cut") { + cm.setSelections(ranges.ranges, null, sel_dontScroll); + } else { + input.prevInput = ""; + te.value = ranges.text.join("\n"); + selectInput(te); + } + } + if (e.type == "cut") { cm.state.cutIncoming = +new Date; } + } + on(te, "cut", prepareCopyCut); + on(te, "copy", prepareCopyCut); + + on(display.scroller, "paste", function (e) { + if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return } + if (!te.dispatchEvent) { + cm.state.pasteIncoming = +new Date; + input.focus(); + return + } + + // Pass the `paste` event to the textarea so it's handled by its event listener. + var event = new Event("paste"); + event.clipboardData = e.clipboardData; + te.dispatchEvent(event); + }); + + // Prevent normal selection in the editor (we handle our own) + on(display.lineSpace, "selectstart", function (e) { + if (!eventInWidget(display, e)) { e_preventDefault(e); } + }); + + on(te, "compositionstart", function () { + var start = cm.getCursor("from"); + if (input.composing) { input.composing.range.clear(); } + input.composing = { + start: start, + range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) + }; + }); + on(te, "compositionend", function () { + if (input.composing) { + input.poll(); + input.composing.range.clear(); + input.composing = null; + } + }); + }; + + TextareaInput.prototype.createField = function (_display) { + // Wraps and hides input textarea + this.wrapper = hiddenTextarea(); + // The semihidden textarea that is focused when the editor is + // focused, and receives input. + this.textarea = this.wrapper.firstChild; + var opts = this.cm.options; + disableBrowserMagic(this.textarea, opts.spellcheck, opts.autocorrect, opts.autocapitalize); + }; + + TextareaInput.prototype.screenReaderLabelChanged = function (label) { + // Label for screenreaders, accessibility + if(label) { + this.textarea.setAttribute('aria-label', label); + } else { + this.textarea.removeAttribute('aria-label'); + } + }; + + TextareaInput.prototype.prepareSelection = function () { + // Redraw the selection and/or cursor + var cm = this.cm, display = cm.display, doc = cm.doc; + var result = prepareSelection(cm); + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + var headPos = cursorCoords(cm, doc.sel.primary().head, "div"); + var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect(); + result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top)); + result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left)); + } + + return result + }; + + TextareaInput.prototype.showSelection = function (drawn) { + var cm = this.cm, display = cm.display; + removeChildrenAndAdd(display.cursorDiv, drawn.cursors); + removeChildrenAndAdd(display.selectionDiv, drawn.selection); + if (drawn.teTop != null) { + this.wrapper.style.top = drawn.teTop + "px"; + this.wrapper.style.left = drawn.teLeft + "px"; + } + }; + + // Reset the input to correspond to the selection (or to be empty, + // when not typing and nothing is selected) + TextareaInput.prototype.reset = function (typing) { + if (this.contextMenuPending || this.composing && typing) { return } + var cm = this.cm; + this.resetting = true; + if (cm.somethingSelected()) { + this.prevInput = ""; + var content = cm.getSelection(); + this.textarea.value = content; + if (cm.state.focused) { selectInput(this.textarea); } + if (ie && ie_version >= 9) { this.hasSelection = content; } + } else if (!typing) { + this.prevInput = this.textarea.value = ""; + if (ie && ie_version >= 9) { this.hasSelection = null; } + } + this.resetting = false; + }; + + TextareaInput.prototype.getField = function () { return this.textarea }; + + TextareaInput.prototype.supportsTouch = function () { return false }; + + TextareaInput.prototype.focus = function () { + if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt(rootNode(this.textarea)) != this.textarea)) { + try { this.textarea.focus(); } + catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM + } + }; + + TextareaInput.prototype.blur = function () { this.textarea.blur(); }; + + TextareaInput.prototype.resetPosition = function () { + this.wrapper.style.top = this.wrapper.style.left = 0; + }; + + TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); }; + + // Poll for input changes, using the normal rate of polling. This + // runs as long as the editor is focused. + TextareaInput.prototype.slowPoll = function () { + var this$1 = this; + + if (this.pollingFast) { return } + this.polling.set(this.cm.options.pollInterval, function () { + this$1.poll(); + if (this$1.cm.state.focused) { this$1.slowPoll(); } + }); + }; + + // When an event has just come in that is likely to add or change + // something in the input textarea, we poll faster, to ensure that + // the change appears on the screen quickly. + TextareaInput.prototype.fastPoll = function () { + var missed = false, input = this; + input.pollingFast = true; + function p() { + var changed = input.poll(); + if (!changed && !missed) {missed = true; input.polling.set(60, p);} + else {input.pollingFast = false; input.slowPoll();} + } + input.polling.set(20, p); + }; + + // Read input from the textarea, and update the document to match. + // When something is selected, it is present in the textarea, and + // selected (unless it is huge, in which case a placeholder is + // used). When nothing is selected, the cursor sits after previously + // seen text (can be empty), which is stored in prevInput (we must + // not reset the textarea when typing, because that breaks IME). + TextareaInput.prototype.poll = function () { + var this$1 = this; + + var cm = this.cm, input = this.textarea, prevInput = this.prevInput; + // Since this is called a *lot*, try to bail out as cheaply as + // possible when it is clear that nothing happened. hasSelection + // will be the case when there is a lot of text in the textarea, + // in which case reading its value would be expensive. + if (this.contextMenuPending || this.resetting || !cm.state.focused || + (hasSelection(input) && !prevInput && !this.composing) || + cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq) + { return false } + + var text = input.value; + // If nothing changed, bail. + if (text == prevInput && !cm.somethingSelected()) { return false } + // Work around nonsensical selection resetting in IE9/10, and + // inexplicable appearance of private area unicode characters on + // some key combos in Mac (#2689). + if (ie && ie_version >= 9 && this.hasSelection === text || + mac && /[\uf700-\uf7ff]/.test(text)) { + cm.display.input.reset(); + return false + } + + if (cm.doc.sel == cm.display.selForContextMenu) { + var first = text.charCodeAt(0); + if (first == 0x200b && !prevInput) { prevInput = "\u200b"; } + if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") } + } + // Find the part of the input that is actually new + var same = 0, l = Math.min(prevInput.length, text.length); + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; } + + runInOp(cm, function () { + applyTextInput(cm, text.slice(same), prevInput.length - same, + null, this$1.composing ? "*compose" : null); + + // Don't leave long text in the textarea, since it makes further polling slow + if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; } + else { this$1.prevInput = text; } + + if (this$1.composing) { + this$1.composing.range.clear(); + this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"), + {className: "CodeMirror-composing"}); + } + }); + return true + }; + + TextareaInput.prototype.ensurePolled = function () { + if (this.pollingFast && this.poll()) { this.pollingFast = false; } + }; + + TextareaInput.prototype.onKeyPress = function () { + if (ie && ie_version >= 9) { this.hasSelection = null; } + this.fastPoll(); + }; + + TextareaInput.prototype.onContextMenu = function (e) { + var input = this, cm = input.cm, display = cm.display, te = input.textarea; + if (input.contextMenuPending) { input.contextMenuPending(); } + var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; + if (!pos || presto) { return } // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + var reset = cm.options.resetSelectionOnContextMenu; + if (reset && cm.doc.sel.contains(pos) == -1) + { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); } + + var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText; + var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect(); + input.wrapper.style.cssText = "position: static"; + te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);"; + var oldScrollY; + if (webkit) { oldScrollY = te.ownerDocument.defaultView.scrollY; } // Work around Chrome issue (#2712) + display.input.focus(); + if (webkit) { te.ownerDocument.defaultView.scrollTo(null, oldScrollY); } + display.input.reset(); + // Adds "Select all" to context menu in FF + if (!cm.somethingSelected()) { te.value = input.prevInput = " "; } + input.contextMenuPending = rehide; + display.selForContextMenu = cm.doc.sel; + clearTimeout(display.detectingSelectAll); + + // Select-all will be greyed out if there's nothing to select, so + // this adds a zero-width space so that we can later check whether + // it got selected. + function prepareSelectAllHack() { + if (te.selectionStart != null) { + var selected = cm.somethingSelected(); + var extval = "\u200b" + (selected ? te.value : ""); + te.value = "\u21da"; // Used to catch context-menu undo + te.value = extval; + input.prevInput = selected ? "" : "\u200b"; + te.selectionStart = 1; te.selectionEnd = extval.length; + // Re-set this, in case some other handler touched the + // selection in the meantime. + display.selForContextMenu = cm.doc.sel; + } + } + function rehide() { + if (input.contextMenuPending != rehide) { return } + input.contextMenuPending = false; + input.wrapper.style.cssText = oldWrapperCSS; + te.style.cssText = oldCSS; + if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); } + + // Try to detect the user choosing select-all + if (te.selectionStart != null) { + if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); } + var i = 0, poll = function () { + if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && + te.selectionEnd > 0 && input.prevInput == "\u200b") { + operation(cm, selectAll)(cm); + } else if (i++ < 10) { + display.detectingSelectAll = setTimeout(poll, 500); + } else { + display.selForContextMenu = null; + display.input.reset(); + } + }; + display.detectingSelectAll = setTimeout(poll, 200); + } + } + + if (ie && ie_version >= 9) { prepareSelectAllHack(); } + if (captureRightClick) { + e_stop(e); + var mouseup = function () { + off(window, "mouseup", mouseup); + setTimeout(rehide, 20); + }; + on(window, "mouseup", mouseup); + } else { + setTimeout(rehide, 50); + } + }; + + TextareaInput.prototype.readOnlyChanged = function (val) { + if (!val) { this.reset(); } + this.textarea.disabled = val == "nocursor"; + this.textarea.readOnly = !!val; + }; + + TextareaInput.prototype.setUneditable = function () {}; + + TextareaInput.prototype.needsContentAttribute = false; + + function fromTextArea(textarea, options) { + options = options ? copyObj(options) : {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabIndex) + { options.tabindex = textarea.tabIndex; } + if (!options.placeholder && textarea.placeholder) + { options.placeholder = textarea.placeholder; } + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + var hasFocus = activeElt(rootNode(textarea)); + options.autofocus = hasFocus == textarea || + textarea.getAttribute("autofocus") != null && hasFocus == document.body; + } + + function save() {textarea.value = cm.getValue();} + + var realSubmit; + if (textarea.form) { + on(textarea.form, "submit", save); + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + var form = textarea.form; + realSubmit = form.submit; + try { + var wrappedSubmit = form.submit = function () { + save(); + form.submit = realSubmit; + form.submit(); + form.submit = wrappedSubmit; + }; + } catch(e) {} + } + } + + options.finishInit = function (cm) { + cm.save = save; + cm.getTextArea = function () { return textarea; }; + cm.toTextArea = function () { + cm.toTextArea = isNaN; // Prevent this from being ran twice + save(); + textarea.parentNode.removeChild(cm.getWrapperElement()); + textarea.style.display = ""; + if (textarea.form) { + off(textarea.form, "submit", save); + if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function") + { textarea.form.submit = realSubmit; } + } + }; + }; + + textarea.style.display = "none"; + var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); }, + options); + return cm + } + + function addLegacyProps(CodeMirror) { + CodeMirror.off = off; + CodeMirror.on = on; + CodeMirror.wheelEventPixels = wheelEventPixels; + CodeMirror.Doc = Doc; + CodeMirror.splitLines = splitLinesAuto; + CodeMirror.countColumn = countColumn; + CodeMirror.findColumn = findColumn; + CodeMirror.isWordChar = isWordCharBasic; + CodeMirror.Pass = Pass; + CodeMirror.signal = signal; + CodeMirror.Line = Line; + CodeMirror.changeEnd = changeEnd; + CodeMirror.scrollbarModel = scrollbarModel; + CodeMirror.Pos = Pos; + CodeMirror.cmpPos = cmp; + CodeMirror.modes = modes; + CodeMirror.mimeModes = mimeModes; + CodeMirror.resolveMode = resolveMode; + CodeMirror.getMode = getMode; + CodeMirror.modeExtensions = modeExtensions; + CodeMirror.extendMode = extendMode; + CodeMirror.copyState = copyState; + CodeMirror.startState = startState; + CodeMirror.innerMode = innerMode; + CodeMirror.commands = commands; + CodeMirror.keyMap = keyMap; + CodeMirror.keyName = keyName; + CodeMirror.isModifierKey = isModifierKey; + CodeMirror.lookupKey = lookupKey; + CodeMirror.normalizeKeyMap = normalizeKeyMap; + CodeMirror.StringStream = StringStream; + CodeMirror.SharedTextMarker = SharedTextMarker; + CodeMirror.TextMarker = TextMarker; + CodeMirror.LineWidget = LineWidget; + CodeMirror.e_preventDefault = e_preventDefault; + CodeMirror.e_stopPropagation = e_stopPropagation; + CodeMirror.e_stop = e_stop; + CodeMirror.addClass = addClass; + CodeMirror.contains = contains; + CodeMirror.rmClass = rmClass; + CodeMirror.keyNames = keyNames; + } + + // EDITOR CONSTRUCTOR + + defineOptions(CodeMirror); + + addEditorMethods(CodeMirror); + + // Set up methods on CodeMirror's prototype to redirect to the editor's document. + var dontDelegate = "iter insert remove copy getEditor constructor".split(" "); + for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) + { CodeMirror.prototype[prop] = (function(method) { + return function() {return method.apply(this.doc, arguments)} + })(Doc.prototype[prop]); } } + + eventMixin(Doc); + CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput}; + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + CodeMirror.defineMode = function(name/*, mode, …*/) { + if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; } + defineMode.apply(this, arguments); + }; + + CodeMirror.defineMIME = defineMIME; + + // Minimal default mode. + CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); }); + CodeMirror.defineMIME("text/plain", "null"); + + // EXTENSIONS + + CodeMirror.defineExtension = function (name, func) { + CodeMirror.prototype[name] = func; + }; + CodeMirror.defineDocExtension = function (name, func) { + Doc.prototype[name] = func; + }; + + CodeMirror.fromTextArea = fromTextArea; + + addLegacyProps(CodeMirror); + + CodeMirror.version = "5.65.16"; + + return CodeMirror; + +}))); diff --git a/js/codemirror/mode/apl/apl.js b/js/codemirror/mode/apl/apl.js new file mode 100644 index 0000000..667aa79 --- /dev/null +++ b/js/codemirror/mode/apl/apl.js @@ -0,0 +1,174 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("apl", function() { + var builtInOps = { + ".": "innerProduct", + "\\": "scan", + "/": "reduce", + "⌿": "reduce1Axis", + "⍀": "scan1Axis", + "¨": "each", + "⍣": "power" + }; + var builtInFuncs = { + "+": ["conjugate", "add"], + "−": ["negate", "subtract"], + "×": ["signOf", "multiply"], + "÷": ["reciprocal", "divide"], + "⌈": ["ceiling", "greaterOf"], + "⌊": ["floor", "lesserOf"], + "∣": ["absolute", "residue"], + "⍳": ["indexGenerate", "indexOf"], + "?": ["roll", "deal"], + "⋆": ["exponentiate", "toThePowerOf"], + "⍟": ["naturalLog", "logToTheBase"], + "○": ["piTimes", "circularFuncs"], + "!": ["factorial", "binomial"], + "⌹": ["matrixInverse", "matrixDivide"], + "<": [null, "lessThan"], + "≤": [null, "lessThanOrEqual"], + "=": [null, "equals"], + ">": [null, "greaterThan"], + "≥": [null, "greaterThanOrEqual"], + "≠": [null, "notEqual"], + "≡": ["depth", "match"], + "≢": [null, "notMatch"], + "∈": ["enlist", "membership"], + "⍷": [null, "find"], + "∪": ["unique", "union"], + "∩": [null, "intersection"], + "∼": ["not", "without"], + "∨": [null, "or"], + "∧": [null, "and"], + "⍱": [null, "nor"], + "⍲": [null, "nand"], + "⍴": ["shapeOf", "reshape"], + ",": ["ravel", "catenate"], + "⍪": [null, "firstAxisCatenate"], + "⌽": ["reverse", "rotate"], + "⊖": ["axis1Reverse", "axis1Rotate"], + "⍉": ["transpose", null], + "↑": ["first", "take"], + "↓": [null, "drop"], + "⊂": ["enclose", "partitionWithAxis"], + "⊃": ["diclose", "pick"], + "⌷": [null, "index"], + "⍋": ["gradeUp", null], + "⍒": ["gradeDown", null], + "⊤": ["encode", null], + "⊥": ["decode", null], + "⍕": ["format", "formatByExample"], + "⍎": ["execute", null], + "⊣": ["stop", "left"], + "⊢": ["pass", "right"] + }; + + var isOperator = /[\.\/⌿⍀¨⍣]/; + var isNiladic = /⍬/; + var isFunction = /[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/; + var isArrow = /←/; + var isComment = /[⍝#].*$/; + + var stringEater = function(type) { + var prev; + prev = false; + return function(c) { + prev = c; + if (c === type) { + return prev === "\\"; + } + return true; + }; + }; + return { + startState: function() { + return { + prev: false, + func: false, + op: false, + string: false, + escape: false + }; + }, + token: function(stream, state) { + var ch, funcName; + if (stream.eatSpace()) { + return null; + } + ch = stream.next(); + if (ch === '"' || ch === "'") { + stream.eatWhile(stringEater(ch)); + stream.next(); + state.prev = true; + return "string"; + } + if (/[\[{\(]/.test(ch)) { + state.prev = false; + return null; + } + if (/[\]}\)]/.test(ch)) { + state.prev = true; + return null; + } + if (isNiladic.test(ch)) { + state.prev = false; + return "niladic"; + } + if (/[¯\d]/.test(ch)) { + if (state.func) { + state.func = false; + state.prev = false; + } else { + state.prev = true; + } + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (isOperator.test(ch)) { + return "operator apl-" + builtInOps[ch]; + } + if (isArrow.test(ch)) { + return "apl-arrow"; + } + if (isFunction.test(ch)) { + funcName = "apl-"; + if (builtInFuncs[ch] != null) { + if (state.prev) { + funcName += builtInFuncs[ch][1]; + } else { + funcName += builtInFuncs[ch][0]; + } + } + state.func = true; + state.prev = false; + return "function " + funcName; + } + if (isComment.test(ch)) { + stream.skipToEnd(); + return "comment"; + } + if (ch === "∘" && stream.peek() === ".") { + stream.next(); + return "function jot-dot"; + } + stream.eatWhile(/[\w\$_]/); + state.prev = true; + return "keyword"; + } + }; +}); + +CodeMirror.defineMIME("text/apl", "apl"); + +}); diff --git a/js/codemirror/mode/apl/index.html b/js/codemirror/mode/apl/index.html new file mode 100644 index 0000000..1946d2f --- /dev/null +++ b/js/codemirror/mode/apl/index.html @@ -0,0 +1,72 @@ + + +CodeMirror: APL mode + + + + + + + + + + +
+

APL mode

+
+ + + +

Simple mode that tries to handle APL as well as it can.

+

It attempts to label functions/operators based upon + monadic/dyadic usage (but this is far from fully fleshed out). + This means there are meaningful classnames so hover states can + have popups etc.

+ +

MIME types defined: text/apl (APL code)

+
diff --git a/js/codemirror/mode/asciiarmor/asciiarmor.js b/js/codemirror/mode/asciiarmor/asciiarmor.js new file mode 100644 index 0000000..a8ef077 --- /dev/null +++ b/js/codemirror/mode/asciiarmor/asciiarmor.js @@ -0,0 +1,74 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + function errorIfNotEmpty(stream) { + var nonWS = stream.match(/^\s*\S/); + stream.skipToEnd(); + return nonWS ? "error" : null; + } + + CodeMirror.defineMode("asciiarmor", function() { + return { + token: function(stream, state) { + var m; + if (state.state == "top") { + if (stream.sol() && (m = stream.match(/^-----BEGIN (.*)?-----\s*$/))) { + state.state = "headers"; + state.type = m[1]; + return "tag"; + } + return errorIfNotEmpty(stream); + } else if (state.state == "headers") { + if (stream.sol() && stream.match(/^\w+:/)) { + state.state = "header"; + return "atom"; + } else { + var result = errorIfNotEmpty(stream); + if (result) state.state = "body"; + return result; + } + } else if (state.state == "header") { + stream.skipToEnd(); + state.state = "headers"; + return "string"; + } else if (state.state == "body") { + if (stream.sol() && (m = stream.match(/^-----END (.*)?-----\s*$/))) { + if (m[1] != state.type) return "error"; + state.state = "end"; + return "tag"; + } else { + if (stream.eatWhile(/[A-Za-z0-9+\/=]/)) { + return null; + } else { + stream.next(); + return "error"; + } + } + } else if (state.state == "end") { + return errorIfNotEmpty(stream); + } + }, + blankLine: function(state) { + if (state.state == "headers") state.state = "body"; + }, + startState: function() { + return {state: "top", type: null}; + } + }; + }); + + CodeMirror.defineMIME("application/pgp", "asciiarmor"); + CodeMirror.defineMIME("application/pgp-encrypted", "asciiarmor"); + CodeMirror.defineMIME("application/pgp-keys", "asciiarmor"); + CodeMirror.defineMIME("application/pgp-signature", "asciiarmor"); +}); diff --git a/js/codemirror/mode/asciiarmor/index.html b/js/codemirror/mode/asciiarmor/index.html new file mode 100644 index 0000000..08ae934 --- /dev/null +++ b/js/codemirror/mode/asciiarmor/index.html @@ -0,0 +1,46 @@ + + +CodeMirror: ASCII Armor (PGP) mode + + + + + + + + + +
+

ASCII Armor (PGP) mode

+
+ + + +

MIME types +defined: application/pgp, application/pgp-encrypted, application/pgp-keys, application/pgp-signature

+ +
diff --git a/js/codemirror/mode/asn.1/asn.1.js b/js/codemirror/mode/asn.1/asn.1.js new file mode 100644 index 0000000..ab63acc --- /dev/null +++ b/js/codemirror/mode/asn.1/asn.1.js @@ -0,0 +1,204 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("asn.1", function(config, parserConfig) { + var indentUnit = config.indentUnit, + keywords = parserConfig.keywords || {}, + cmipVerbs = parserConfig.cmipVerbs || {}, + compareTypes = parserConfig.compareTypes || {}, + status = parserConfig.status || {}, + tags = parserConfig.tags || {}, + storage = parserConfig.storage || {}, + modifier = parserConfig.modifier || {}, + accessTypes = parserConfig.accessTypes|| {}, + multiLineStrings = parserConfig.multiLineStrings, + indentStatements = parserConfig.indentStatements !== false; + var isOperatorChar = /[\|\^]/; + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]\(\){}:=,;]/.test(ch)) { + curPunc = ch; + return "punctuation"; + } + if (ch == "-"){ + if (stream.eat("-")) { + stream.skipToEnd(); + return "comment"; + } + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + + stream.eatWhile(/[\w\-]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) return "keyword"; + if (cmipVerbs.propertyIsEnumerable(cur)) return "variable cmipVerbs"; + if (compareTypes.propertyIsEnumerable(cur)) return "atom compareTypes"; + if (status.propertyIsEnumerable(cur)) return "comment status"; + if (tags.propertyIsEnumerable(cur)) return "variable-3 tags"; + if (storage.propertyIsEnumerable(cur)) return "builtin storage"; + if (modifier.propertyIsEnumerable(cur)) return "string-2 modifier"; + if (accessTypes.propertyIsEnumerable(cur)) return "atom accessTypes"; + + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped){ + var afterNext = stream.peek(); + //look if the character if the quote is like the B in '10100010'B + if (afterNext){ + afterNext = afterNext.toLowerCase(); + if(afterNext == "b" || afterNext == "h" || afterNext == "o") + stream.next(); + } + end = true; break; + } + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + var indent = state.indented; + if (state.context && state.context.type == "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + //Interface + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":" || curPunc == ",") + && ctx.type == "statement"){ + popContext(state); + } + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (indentStatements && (((ctx.type == "}" || ctx.type == "top") + && curPunc != ';') || (ctx.type == "statement" + && curPunc == "newstatement"))) + pushContext(state, stream.column(), "statement"); + + state.startOfLine = false; + return style; + }, + + electricChars: "{}", + lineComment: "--", + fold: "brace" + }; + }); + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + CodeMirror.defineMIME("text/x-ttcn-asn", { + name: "asn.1", + keywords: words("DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION" + + " REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED" + + " WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN" + + " IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS" + + " MINACCESS MAXACCESS REVISION STATUS DESCRIPTION" + + " SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName" + + " ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY" + + " IMPLIED EXPORTS"), + cmipVerbs: words("ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE"), + compareTypes: words("OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY" + + " MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY" + + " OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL" + + " SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL" + + " TEXTUAL-CONVENTION"), + status: words("current deprecated mandatory obsolete"), + tags: words("APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS" + + " UNIVERSAL"), + storage: words("BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING" + + " UTCTime InterfaceIndex IANAifType CMIP-Attribute" + + " REAL PACKAGE PACKAGES IpAddress PhysAddress" + + " NetworkAddress BITS BMPString TimeStamp TimeTicks" + + " TruthValue RowStatus DisplayString GeneralString" + + " GraphicString IA5String NumericString" + + " PrintableString SnmpAdminString TeletexString" + + " UTF8String VideotexString VisibleString StringStore" + + " ISO646String T61String UniversalString Unsigned32" + + " Integer32 Gauge Gauge32 Counter Counter32 Counter64"), + modifier: words("ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS" + + " GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS" + + " DEFINED"), + accessTypes: words("not-accessible accessible-for-notify read-only" + + " read-create read-write"), + multiLineStrings: true + }); +}); diff --git a/js/codemirror/mode/asn.1/index.html b/js/codemirror/mode/asn.1/index.html new file mode 100644 index 0000000..10028f3 --- /dev/null +++ b/js/codemirror/mode/asn.1/index.html @@ -0,0 +1,78 @@ + + +CodeMirror: ASN.1 mode + + + + + + + + + +
+

ASN.1 example

+
+ +
+ + +
+

Language: Abstract Syntax Notation One + (ASN.1) +

+

MIME types defined: text/x-ttcn-asn

+ +
+

The development of this mode has been sponsored by Ericsson + .

+

Coded by Asmelash Tsegay Gebretsadkan

+
+ diff --git a/js/codemirror/mode/asterisk/asterisk.js b/js/codemirror/mode/asterisk/asterisk.js new file mode 100644 index 0000000..16b9827 --- /dev/null +++ b/js/codemirror/mode/asterisk/asterisk.js @@ -0,0 +1,220 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/* + * ===================================================================================== + * + * Filename: mode/asterisk/asterisk.js + * + * Description: CodeMirror mode for Asterisk dialplan + * + * Created: 05/17/2012 09:20:25 PM + * Revision: 08/05/2019 AstLinux Project: Support block-comments + * + * Author: Stas Kobzar (stas@modulis.ca), + * Company: Modulis.ca Inc. + * + * ===================================================================================== + */ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("asterisk", function() { + var atoms = ["exten", "same", "include","ignorepat","switch"], + dpcmd = ["#include","#exec"], + apps = [ + "addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi", + "alarmreceiver","amd","answer","authenticate","background","backgrounddetect", + "bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent", + "changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge", + "congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge", + "dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility", + "datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa", + "dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy", + "externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif", + "goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete", + "ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus", + "jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme", + "meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete", + "minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode", + "mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish", + "originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce", + "parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones", + "privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten", + "readfile","receivefax","receivefax","receivefax","record","removequeuemember", + "resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun", + "saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax", + "sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags", + "setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel", + "slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground", + "speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound", + "speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor", + "stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec", + "trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate", + "vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring", + "waitforsilence","waitmusiconhold","waituntil","while","zapateller" + ]; + + function basicToken(stream,state){ + var cur = ''; + var ch = stream.next(); + // comment + if (state.blockComment) { + if (ch == "-" && stream.match("-;", true)) { + state.blockComment = false; + } else if (stream.skipTo("--;")) { + stream.next(); + stream.next(); + stream.next(); + state.blockComment = false; + } else { + stream.skipToEnd(); + } + return "comment"; + } + if(ch == ";") { + if (stream.match("--", true)) { + if (!stream.match("-", false)) { // Except ;--- is not a block comment + state.blockComment = true; + return "comment"; + } + } + stream.skipToEnd(); + return "comment"; + } + // context + if(ch == '[') { + stream.skipTo(']'); + stream.eat(']'); + return "header"; + } + // string + if(ch == '"') { + stream.skipTo('"'); + return "string"; + } + if(ch == "'") { + stream.skipTo("'"); + return "string-2"; + } + // dialplan commands + if(ch == '#') { + stream.eatWhile(/\w/); + cur = stream.current(); + if(dpcmd.indexOf(cur) !== -1) { + stream.skipToEnd(); + return "strong"; + } + } + // application args + if(ch == '$'){ + var ch1 = stream.peek(); + if(ch1 == '{'){ + stream.skipTo('}'); + stream.eat('}'); + return "variable-3"; + } + } + // extension + stream.eatWhile(/\w/); + cur = stream.current(); + if(atoms.indexOf(cur) !== -1) { + state.extenStart = true; + switch(cur) { + case 'same': state.extenSame = true; break; + case 'include': + case 'switch': + case 'ignorepat': + state.extenInclude = true;break; + default:break; + } + return "atom"; + } + } + + return { + startState: function() { + return { + blockComment: false, + extenStart: false, + extenSame: false, + extenInclude: false, + extenExten: false, + extenPriority: false, + extenApplication: false + }; + }, + token: function(stream, state) { + + var cur = ''; + if(stream.eatSpace()) return null; + // extension started + if(state.extenStart){ + stream.eatWhile(/[^\s]/); + cur = stream.current(); + if(/^=>?$/.test(cur)){ + state.extenExten = true; + state.extenStart = false; + return "strong"; + } else { + state.extenStart = false; + stream.skipToEnd(); + return "error"; + } + } else if(state.extenExten) { + // set exten and priority + state.extenExten = false; + state.extenPriority = true; + stream.eatWhile(/[^,]/); + if(state.extenInclude) { + stream.skipToEnd(); + state.extenPriority = false; + state.extenInclude = false; + } + if(state.extenSame) { + state.extenPriority = false; + state.extenSame = false; + state.extenApplication = true; + } + return "tag"; + } else if(state.extenPriority) { + state.extenPriority = false; + state.extenApplication = true; + stream.next(); // get comma + if(state.extenSame) return null; + stream.eatWhile(/[^,]/); + return "number"; + } else if(state.extenApplication) { + stream.eatWhile(/,/); + cur = stream.current(); + if(cur === ',') return null; + stream.eatWhile(/\w/); + cur = stream.current().toLowerCase(); + state.extenApplication = false; + if(apps.indexOf(cur) !== -1){ + return "def strong"; + } + } else{ + return basicToken(stream,state); + } + + return null; + }, + + blockCommentStart: ";--", + blockCommentEnd: "--;", + lineComment: ";" + }; +}); + +CodeMirror.defineMIME("text/x-asterisk", "asterisk"); + +}); diff --git a/js/codemirror/mode/asterisk/index.html b/js/codemirror/mode/asterisk/index.html new file mode 100644 index 0000000..6b1c5e1 --- /dev/null +++ b/js/codemirror/mode/asterisk/index.html @@ -0,0 +1,155 @@ + + +CodeMirror: Asterisk dialplan mode + + + + + + + + + + +
+

Asterisk dialplan mode

+
+ + +

MIME types defined: text/x-asterisk.

+ +
diff --git a/js/codemirror/mode/brainfuck/brainfuck.js b/js/codemirror/mode/brainfuck/brainfuck.js new file mode 100644 index 0000000..b5a30f8 --- /dev/null +++ b/js/codemirror/mode/brainfuck/brainfuck.js @@ -0,0 +1,85 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Brainfuck mode created by Michael Kaminsky https://github.com/mkaminsky11 + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") + mod(require("../../lib/codemirror")) + else if (typeof define == "function" && define.amd) + define(["../../lib/codemirror"], mod) + else + mod(CodeMirror) +})(function(CodeMirror) { + "use strict" + var reserve = "><+-.,[]".split(""); + /* + comments can be either: + placed behind lines + + +++ this is a comment + + where reserved characters cannot be used + or in a loop + [ + this is ok to use [ ] and stuff + ] + or preceded by # + */ + CodeMirror.defineMode("brainfuck", function() { + return { + startState: function() { + return { + commentLine: false, + left: 0, + right: 0, + commentLoop: false + } + }, + token: function(stream, state) { + if (stream.eatSpace()) return null + if(stream.sol()){ + state.commentLine = false; + } + var ch = stream.next().toString(); + if(reserve.indexOf(ch) !== -1){ + if(state.commentLine === true){ + if(stream.eol()){ + state.commentLine = false; + } + return "comment"; + } + if(ch === "]" || ch === "["){ + if(ch === "["){ + state.left++; + } + else{ + state.right++; + } + return "bracket"; + } + else if(ch === "+" || ch === "-"){ + return "keyword"; + } + else if(ch === "<" || ch === ">"){ + return "atom"; + } + else if(ch === "." || ch === ","){ + return "def"; + } + } + else{ + state.commentLine = true; + if(stream.eol()){ + state.commentLine = false; + } + return "comment"; + } + if(stream.eol()){ + state.commentLine = false; + } + } + }; + }); +CodeMirror.defineMIME("text/x-brainfuck","brainfuck") +}); diff --git a/js/codemirror/mode/brainfuck/index.html b/js/codemirror/mode/brainfuck/index.html new file mode 100644 index 0000000..568cc6d --- /dev/null +++ b/js/codemirror/mode/brainfuck/index.html @@ -0,0 +1,85 @@ + + +CodeMirror: Brainfuck mode + + + + + + + + + + +
+

Brainfuck mode

+
+ + + +

A mode for Brainfuck

+ +

MIME types defined: text/x-brainfuck

+
diff --git a/js/codemirror/mode/clike/clike.js b/js/codemirror/mode/clike/clike.js new file mode 100644 index 0000000..e9f441f --- /dev/null +++ b/js/codemirror/mode/clike/clike.js @@ -0,0 +1,942 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function Context(indented, column, type, info, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.info = info; + this.align = align; + this.prev = prev; +} +function pushContext(state, col, type, info) { + var indent = state.indented; + if (state.context && state.context.type == "statement" && type != "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, info, null, state.context); +} +function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; +} + +function typeBefore(stream, state, pos) { + if (state.prevToken == "variable" || state.prevToken == "type") return true; + if (/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(stream.string.slice(0, pos))) return true; + if (state.typeAtEndOfLine && stream.column() == stream.indentation()) return true; +} + +function isTopScope(context) { + for (;;) { + if (!context || context.type == "top") return true; + if (context.type == "}" && context.prev.info != "namespace") return false; + context = context.prev; + } +} + +CodeMirror.defineMode("clike", function(config, parserConfig) { + var indentUnit = config.indentUnit, + statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, + dontAlignCalls = parserConfig.dontAlignCalls, + keywords = parserConfig.keywords || {}, + types = parserConfig.types || {}, + builtin = parserConfig.builtin || {}, + blockKeywords = parserConfig.blockKeywords || {}, + defKeywords = parserConfig.defKeywords || {}, + atoms = parserConfig.atoms || {}, + hooks = parserConfig.hooks || {}, + multiLineStrings = parserConfig.multiLineStrings, + indentStatements = parserConfig.indentStatements !== false, + indentSwitch = parserConfig.indentSwitch !== false, + namespaceSeparator = parserConfig.namespaceSeparator, + isPunctuationChar = parserConfig.isPunctuationChar || /[\[\]{}\(\),;\:\.]/, + numberStart = parserConfig.numberStart || /[\d\.]/, + number = parserConfig.number || /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i, + isOperatorChar = parserConfig.isOperatorChar || /[+\-*&%=<>!?|\/]/, + isIdentifierChar = parserConfig.isIdentifierChar || /[\w\$_\xa1-\uffff]/, + // An optional function that takes a {string} token and returns true if it + // should be treated as a builtin. + isReservedIdentifier = parserConfig.isReservedIdentifier || false; + + var curPunc, isDefKeyword; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (numberStart.test(ch)) { + stream.backUp(1) + if (stream.match(number)) return "number" + stream.next() + } + if (isPunctuationChar.test(ch)) { + curPunc = ch; + return null; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + while (!stream.match(/^\/[\/*]/, false) && stream.eat(isOperatorChar)) {} + return "operator"; + } + stream.eatWhile(isIdentifierChar); + if (namespaceSeparator) while (stream.match(namespaceSeparator)) + stream.eatWhile(isIdentifierChar); + + var cur = stream.current(); + if (contains(keywords, cur)) { + if (contains(blockKeywords, cur)) curPunc = "newstatement"; + if (contains(defKeywords, cur)) isDefKeyword = true; + return "keyword"; + } + if (contains(types, cur)) return "type"; + if (contains(builtin, cur) + || (isReservedIdentifier && isReservedIdentifier(cur))) { + if (contains(blockKeywords, cur)) curPunc = "newstatement"; + return "builtin"; + } + if (contains(atoms, cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function maybeEOL(stream, state) { + if (parserConfig.typeFirstDefinitions && stream.eol() && isTopScope(state.context)) + state.typeAtEndOfLine = typeBefore(stream, state, stream.pos) + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", null, false), + indented: 0, + startOfLine: true, + prevToken: null + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) { maybeEOL(stream, state); return null; } + curPunc = isDefKeyword = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if (curPunc == ";" || curPunc == ":" || (curPunc == "," && stream.match(/^\s*(?:\/\/.*)?$/, false))) + while (state.context.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (indentStatements && + (((ctx.type == "}" || ctx.type == "top") && curPunc != ";") || + (ctx.type == "statement" && curPunc == "newstatement"))) { + pushContext(state, stream.column(), "statement", stream.current()); + } + + if (style == "variable" && + ((state.prevToken == "def" || + (parserConfig.typeFirstDefinitions && typeBefore(stream, state, stream.start) && + isTopScope(state.context) && stream.match(/^\s*\(/, false))))) + style = "def"; + + if (hooks.token) { + var result = hooks.token(stream, state, style); + if (result !== undefined) style = result; + } + + if (style == "def" && parserConfig.styleDefs === false) style = "variable"; + + state.startOfLine = false; + state.prevToken = isDefKeyword ? "def" : style || curPunc; + maybeEOL(stream, state); + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null || state.typeAtEndOfLine && isTopScope(state.context)) + return CodeMirror.Pass; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + var closing = firstChar == ctx.type; + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + if (parserConfig.dontIndentStatements) + while (ctx.type == "statement" && parserConfig.dontIndentStatements.test(ctx.info)) + ctx = ctx.prev + if (hooks.indent) { + var hook = hooks.indent(state, ctx, textAfter, indentUnit); + if (typeof hook == "number") return hook + } + var switchBlock = ctx.prev && ctx.prev.info == "switch"; + if (parserConfig.allmanIndentation && /[{(]/.test(firstChar)) { + while (ctx.type != "top" && ctx.type != "}") ctx = ctx.prev + return ctx.indented + } + if (ctx.type == "statement") + return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); + if (ctx.align && (!dontAlignCalls || ctx.type != ")")) + return ctx.column + (closing ? 0 : 1); + if (ctx.type == ")" && !closing) + return ctx.indented + statementIndentUnit; + + return ctx.indented + (closing ? 0 : indentUnit) + + (!closing && switchBlock && !/^(?:case|default)\b/.test(textAfter) ? indentUnit : 0); + }, + + electricInput: indentSwitch ? /^\s*(?:case .*?:|default:|\{\}?|\})$/ : /^\s*[{}]$/, + blockCommentStart: "/*", + blockCommentEnd: "*/", + blockCommentContinue: " * ", + lineComment: "//", + fold: "brace" + }; +}); + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + function contains(words, word) { + if (typeof words === "function") { + return words(word); + } else { + return words.propertyIsEnumerable(word); + } + } + var cKeywords = "auto if break case register continue return default do sizeof " + + "static else struct switch extern typedef union for goto while enum const " + + "volatile inline restrict asm fortran"; + + // Keywords from https://en.cppreference.com/w/cpp/keyword includes C++20. + var cppKeywords = "alignas alignof and and_eq audit axiom bitand bitor catch " + + "class compl concept constexpr const_cast decltype delete dynamic_cast " + + "explicit export final friend import module mutable namespace new noexcept " + + "not not_eq operator or or_eq override private protected public " + + "reinterpret_cast requires static_assert static_cast template this " + + "thread_local throw try typeid typename using virtual xor xor_eq"; + + var objCKeywords = "bycopy byref in inout oneway out self super atomic nonatomic retain copy " + + "readwrite readonly strong weak assign typeof nullable nonnull null_resettable _cmd " + + "@interface @implementation @end @protocol @encode @property @synthesize @dynamic @class " + + "@public @package @private @protected @required @optional @try @catch @finally @import " + + "@selector @encode @defs @synchronized @autoreleasepool @compatibility_alias @available"; + + var objCBuiltins = "FOUNDATION_EXPORT FOUNDATION_EXTERN NS_INLINE NS_FORMAT_FUNCTION " + + " NS_RETURNS_RETAINEDNS_ERROR_ENUM NS_RETURNS_NOT_RETAINED NS_RETURNS_INNER_POINTER " + + "NS_DESIGNATED_INITIALIZER NS_ENUM NS_OPTIONS NS_REQUIRES_NIL_TERMINATION " + + "NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_SWIFT_NAME NS_REFINED_FOR_SWIFT" + + // Do not use this. Use the cTypes function below. This is global just to avoid + // excessive calls when cTypes is being called multiple times during a parse. + var basicCTypes = words("int long char short double float unsigned signed " + + "void bool"); + + // Do not use this. Use the objCTypes function below. This is global just to avoid + // excessive calls when objCTypes is being called multiple times during a parse. + var basicObjCTypes = words("SEL instancetype id Class Protocol BOOL"); + + // Returns true if identifier is a "C" type. + // C type is defined as those that are reserved by the compiler (basicTypes), + // and those that end in _t (Reserved by POSIX for types) + // http://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html + function cTypes(identifier) { + return contains(basicCTypes, identifier) || /.+_t$/.test(identifier); + } + + // Returns true if identifier is a "Objective C" type. + function objCTypes(identifier) { + return cTypes(identifier) || contains(basicObjCTypes, identifier); + } + + var cBlockKeywords = "case do else for if switch while struct enum union"; + var cDefKeywords = "struct enum union"; + + function cppHook(stream, state) { + if (!state.startOfLine) return false + for (var ch, next = null; ch = stream.peek();) { + if (ch == "\\" && stream.match(/^.$/)) { + next = cppHook + break + } else if (ch == "/" && stream.match(/^\/[\/\*]/, false)) { + break + } + stream.next() + } + state.tokenize = next + return "meta" + } + + function pointerHook(_stream, state) { + if (state.prevToken == "type") return "type"; + return false; + } + + // For C and C++ (and ObjC): identifiers starting with __ + // or _ followed by a capital letter are reserved for the compiler. + function cIsReservedIdentifier(token) { + if (!token || token.length < 2) return false; + if (token[0] != '_') return false; + return (token[1] == '_') || (token[1] !== token[1].toLowerCase()); + } + + function cpp14Literal(stream) { + stream.eatWhile(/[\w\.']/); + return "number"; + } + + function cpp11StringHook(stream, state) { + stream.backUp(1); + // Raw strings. + if (stream.match(/^(?:R|u8R|uR|UR|LR)/)) { + var match = stream.match(/^"([^\s\\()]{0,16})\(/); + if (!match) { + return false; + } + state.cpp11RawStringDelim = match[1]; + state.tokenize = tokenRawString; + return tokenRawString(stream, state); + } + // Unicode strings/chars. + if (stream.match(/^(?:u8|u|U|L)/)) { + if (stream.match(/^["']/, /* eat */ false)) { + return "string"; + } + return false; + } + // Ignore this hook. + stream.next(); + return false; + } + + function cppLooksLikeConstructor(word) { + var lastTwo = /(\w+)::~?(\w+)$/.exec(word); + return lastTwo && lastTwo[1] == lastTwo[2]; + } + + // C#-style strings where "" escapes a quote. + function tokenAtString(stream, state) { + var next; + while ((next = stream.next()) != null) { + if (next == '"' && !stream.eat('"')) { + state.tokenize = null; + break; + } + } + return "string"; + } + + // C++11 raw string literal is "( anything )", where + // can be a string up to 16 characters long. + function tokenRawString(stream, state) { + // Escape characters that have special regex meanings. + var delim = state.cpp11RawStringDelim.replace(/[^\w\s]/g, '\\$&'); + var match = stream.match(new RegExp(".*?\\)" + delim + '"')); + if (match) + state.tokenize = null; + else + stream.skipToEnd(); + return "string"; + } + + function def(mimes, mode) { + if (typeof mimes == "string") mimes = [mimes]; + var words = []; + function add(obj) { + if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop)) + words.push(prop); + } + add(mode.keywords); + add(mode.types); + add(mode.builtin); + add(mode.atoms); + if (words.length) { + mode.helperType = mimes[0]; + CodeMirror.registerHelper("hintWords", mimes[0], words); + } + + for (var i = 0; i < mimes.length; ++i) + CodeMirror.defineMIME(mimes[i], mode); + } + + def(["text/x-csrc", "text/x-c", "text/x-chdr"], { + name: "clike", + keywords: words(cKeywords), + types: cTypes, + blockKeywords: words(cBlockKeywords), + defKeywords: words(cDefKeywords), + typeFirstDefinitions: true, + atoms: words("NULL true false"), + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + }, + modeProps: {fold: ["brace", "include"]} + }); + + def(["text/x-c++src", "text/x-c++hdr"], { + name: "clike", + keywords: words(cKeywords + " " + cppKeywords), + types: cTypes, + blockKeywords: words(cBlockKeywords + " class try catch"), + defKeywords: words(cDefKeywords + " class namespace"), + typeFirstDefinitions: true, + atoms: words("true false NULL nullptr"), + dontIndentStatements: /^template$/, + isIdentifierChar: /[\w\$_~\xa1-\uffff]/, + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + "u": cpp11StringHook, + "U": cpp11StringHook, + "L": cpp11StringHook, + "R": cpp11StringHook, + "0": cpp14Literal, + "1": cpp14Literal, + "2": cpp14Literal, + "3": cpp14Literal, + "4": cpp14Literal, + "5": cpp14Literal, + "6": cpp14Literal, + "7": cpp14Literal, + "8": cpp14Literal, + "9": cpp14Literal, + token: function(stream, state, style) { + if (style == "variable" && stream.peek() == "(" && + (state.prevToken == ";" || state.prevToken == null || + state.prevToken == "}") && + cppLooksLikeConstructor(stream.current())) + return "def"; + } + }, + namespaceSeparator: "::", + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-java", { + name: "clike", + keywords: words("abstract assert break case catch class const continue default " + + "do else enum extends final finally for goto if implements import " + + "instanceof interface native new package private protected public " + + "return static strictfp super switch synchronized this throw throws transient " + + "try volatile while @interface"), + types: words("var byte short int long float double boolean char void Boolean Byte Character Double Float " + + "Integer Long Number Object Short String StringBuffer StringBuilder Void"), + blockKeywords: words("catch class do else finally for if switch try while"), + defKeywords: words("class interface enum @interface"), + typeFirstDefinitions: true, + atoms: words("true false null"), + number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i, + hooks: { + "@": function(stream) { + // Don't match the @interface keyword. + if (stream.match('interface', false)) return false; + + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '"': function(stream, state) { + if (!stream.match(/""$/)) return false; + state.tokenize = tokenTripleString; + return state.tokenize(stream, state); + } + }, + modeProps: {fold: ["brace", "import"]} + }); + + def("text/x-csharp", { + name: "clike", + keywords: words("abstract as async await base break case catch checked class const continue" + + " default delegate do else enum event explicit extern finally fixed for" + + " foreach goto if implicit in init interface internal is lock namespace new" + + " operator out override params private protected public readonly record ref required return sealed" + + " sizeof stackalloc static struct switch this throw try typeof unchecked" + + " unsafe using virtual void volatile while add alias ascending descending dynamic from get" + + " global group into join let orderby partial remove select set value var yield"), + types: words("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func" + + " Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32" + + " UInt64 bool byte char decimal double short int long object" + + " sbyte float string ushort uint ulong"), + blockKeywords: words("catch class do else finally for foreach if struct switch try while"), + defKeywords: words("class interface namespace record struct var"), + typeFirstDefinitions: true, + atoms: words("true false null"), + hooks: { + "@": function(stream, state) { + if (stream.eat('"')) { + state.tokenize = tokenAtString; + return tokenAtString(stream, state); + } + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + + function tokenTripleString(stream, state) { + var escaped = false; + while (!stream.eol()) { + if (!escaped && stream.match('"""')) { + state.tokenize = null; + break; + } + escaped = stream.next() == "\\" && !escaped; + } + return "string"; + } + + function tokenNestedComment(depth) { + return function (stream, state) { + var ch + while (ch = stream.next()) { + if (ch == "*" && stream.eat("/")) { + if (depth == 1) { + state.tokenize = null + break + } else { + state.tokenize = tokenNestedComment(depth - 1) + return state.tokenize(stream, state) + } + } else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenNestedComment(depth + 1) + return state.tokenize(stream, state) + } + } + return "comment" + } + } + + def("text/x-scala", { + name: "clike", + keywords: words( + /* scala */ + "abstract case catch class def do else extends final finally for forSome if " + + "implicit import lazy match new null object override package private protected return " + + "sealed super this throw trait try type val var while with yield _ " + + + /* package scala */ + "assert assume require print println printf readLine readBoolean readByte readShort " + + "readChar readInt readLong readFloat readDouble" + ), + types: words( + "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " + + "Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable " + + "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " + + "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " + + "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector " + + + /* package java.lang */ + "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " + + "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " + + "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " + + "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void" + ), + multiLineStrings: true, + blockKeywords: words("catch class enum do else finally for forSome if match switch try while"), + defKeywords: words("class enum def object package trait type val var"), + atoms: words("true false null"), + indentStatements: false, + indentSwitch: false, + isOperatorChar: /[+\-*&%=<>!?|\/#:@]/, + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '"': function(stream, state) { + if (!stream.match('""')) return false; + state.tokenize = tokenTripleString; + return state.tokenize(stream, state); + }, + "'": function(stream) { + if (stream.match(/^(\\[^'\s]+|[^\\'])'/)) return "string-2" + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + return "atom"; + }, + "=": function(stream, state) { + var cx = state.context + if (cx.type == "}" && cx.align && stream.eat(">")) { + state.context = new Context(cx.indented, cx.column, cx.type, cx.info, null, cx.prev) + return "operator" + } else { + return false + } + }, + + "/": function(stream, state) { + if (!stream.eat("*")) return false + state.tokenize = tokenNestedComment(1) + return state.tokenize(stream, state) + } + }, + modeProps: {closeBrackets: {pairs: '()[]{}""', triples: '"'}} + }); + + function tokenKotlinString(tripleString){ + return function (stream, state) { + var escaped = false, next, end = false; + while (!stream.eol()) { + if (!tripleString && !escaped && stream.match('"') ) {end = true; break;} + if (tripleString && stream.match('"""')) {end = true; break;} + next = stream.next(); + if(!escaped && next == "$" && stream.match('{')) + stream.skipTo("}"); + escaped = !escaped && next == "\\" && !tripleString; + } + if (end || !tripleString) + state.tokenize = null; + return "string"; + } + } + + def("text/x-kotlin", { + name: "clike", + keywords: words( + /*keywords*/ + "package as typealias class interface this super val operator " + + "var fun for is in This throw return annotation " + + "break continue object if else while do try when !in !is as? " + + + /*soft keywords*/ + "file import where by get set abstract enum open inner override private public internal " + + "protected catch finally out final vararg reified dynamic companion constructor init " + + "sealed field property receiver param sparam lateinit data inline noinline tailrec " + + "external annotation crossinline const operator infix suspend actual expect setparam value" + ), + types: words( + /* package java.lang */ + "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " + + "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " + + "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " + + "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void Annotation Any BooleanArray " + + "ByteArray Char CharArray DeprecationLevel DoubleArray Enum FloatArray Function Int IntArray Lazy " + + "LazyThreadSafetyMode LongArray Nothing ShortArray Unit" + ), + intendSwitch: false, + indentStatements: false, + multiLineStrings: true, + number: /^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+(\.\d+)?|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i, + blockKeywords: words("catch class do else finally for if where try while enum"), + defKeywords: words("class val var object interface fun"), + atoms: words("true false null this"), + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '*': function(_stream, state) { + return state.prevToken == '.' ? 'variable' : 'operator'; + }, + '"': function(stream, state) { + state.tokenize = tokenKotlinString(stream.match('""')); + return state.tokenize(stream, state); + }, + "/": function(stream, state) { + if (!stream.eat("*")) return false; + state.tokenize = tokenNestedComment(1); + return state.tokenize(stream, state) + }, + indent: function(state, ctx, textAfter, indentUnit) { + var firstChar = textAfter && textAfter.charAt(0); + if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "") + return state.indented; + if ((state.prevToken == "operator" && textAfter != "}" && state.context.type != "}") || + state.prevToken == "variable" && firstChar == "." || + (state.prevToken == "}" || state.prevToken == ")") && firstChar == ".") + return indentUnit * 2 + ctx.indented; + if (ctx.align && ctx.type == "}") + return ctx.indented + (state.context.type == (textAfter || "").charAt(0) ? 0 : indentUnit); + } + }, + modeProps: {closeBrackets: {triples: '"'}} + }); + + def(["x-shader/x-vertex", "x-shader/x-fragment"], { + name: "clike", + keywords: words("sampler1D sampler2D sampler3D samplerCube " + + "sampler1DShadow sampler2DShadow " + + "const attribute uniform varying " + + "break continue discard return " + + "for while do if else struct " + + "in out inout"), + types: words("float int bool void " + + "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " + + "mat2 mat3 mat4"), + blockKeywords: words("for while do if else struct"), + builtin: words("radians degrees sin cos tan asin acos atan " + + "pow exp log exp2 sqrt inversesqrt " + + "abs sign floor ceil fract mod min max clamp mix step smoothstep " + + "length distance dot cross normalize ftransform faceforward " + + "reflect refract matrixCompMult " + + "lessThan lessThanEqual greaterThan greaterThanEqual " + + "equal notEqual any all not " + + "texture1D texture1DProj texture1DLod texture1DProjLod " + + "texture2D texture2DProj texture2DLod texture2DProjLod " + + "texture3D texture3DProj texture3DLod texture3DProjLod " + + "textureCube textureCubeLod " + + "shadow1D shadow2D shadow1DProj shadow2DProj " + + "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " + + "dFdx dFdy fwidth " + + "noise1 noise2 noise3 noise4"), + atoms: words("true false " + + "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " + + "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " + + "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " + + "gl_FogCoord gl_PointCoord " + + "gl_Position gl_PointSize gl_ClipVertex " + + "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " + + "gl_TexCoord gl_FogFragCoord " + + "gl_FragCoord gl_FrontFacing " + + "gl_FragData gl_FragDepth " + + "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " + + "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " + + "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " + + "gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose " + + "gl_ProjectionMatrixInverseTranspose " + + "gl_ModelViewProjectionMatrixInverseTranspose " + + "gl_TextureMatrixInverseTranspose " + + "gl_NormalScale gl_DepthRange gl_ClipPlane " + + "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " + + "gl_FrontLightModelProduct gl_BackLightModelProduct " + + "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " + + "gl_FogParameters " + + "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " + + "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " + + "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " + + "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " + + "gl_MaxDrawBuffers"), + indentSwitch: false, + hooks: {"#": cppHook}, + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-nesc", { + name: "clike", + keywords: words(cKeywords + " as atomic async call command component components configuration event generic " + + "implementation includes interface module new norace nx_struct nx_union post provides " + + "signal task uses abstract extends"), + types: cTypes, + blockKeywords: words(cBlockKeywords), + atoms: words("null true false"), + hooks: {"#": cppHook}, + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-objectivec", { + name: "clike", + keywords: words(cKeywords + " " + objCKeywords), + types: objCTypes, + builtin: words(objCBuiltins), + blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized"), + defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class"), + dontIndentStatements: /^@.*$/, + typeFirstDefinitions: true, + atoms: words("YES NO NULL Nil nil true false nullptr"), + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + }, + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-objectivec++", { + name: "clike", + keywords: words(cKeywords + " " + objCKeywords + " " + cppKeywords), + types: objCTypes, + builtin: words(objCBuiltins), + blockKeywords: words(cBlockKeywords + " @synthesize @try @catch @finally @autoreleasepool @synchronized class try catch"), + defKeywords: words(cDefKeywords + " @interface @implementation @protocol @class class namespace"), + dontIndentStatements: /^@.*$|^template$/, + typeFirstDefinitions: true, + atoms: words("YES NO NULL Nil nil true false nullptr"), + isReservedIdentifier: cIsReservedIdentifier, + hooks: { + "#": cppHook, + "*": pointerHook, + "u": cpp11StringHook, + "U": cpp11StringHook, + "L": cpp11StringHook, + "R": cpp11StringHook, + "0": cpp14Literal, + "1": cpp14Literal, + "2": cpp14Literal, + "3": cpp14Literal, + "4": cpp14Literal, + "5": cpp14Literal, + "6": cpp14Literal, + "7": cpp14Literal, + "8": cpp14Literal, + "9": cpp14Literal, + token: function(stream, state, style) { + if (style == "variable" && stream.peek() == "(" && + (state.prevToken == ";" || state.prevToken == null || + state.prevToken == "}") && + cppLooksLikeConstructor(stream.current())) + return "def"; + } + }, + namespaceSeparator: "::", + modeProps: {fold: ["brace", "include"]} + }); + + def("text/x-squirrel", { + name: "clike", + keywords: words("base break clone continue const default delete enum extends function in class" + + " foreach local resume return this throw typeof yield constructor instanceof static"), + types: cTypes, + blockKeywords: words("case catch class else for foreach if switch try while"), + defKeywords: words("function local class"), + typeFirstDefinitions: true, + atoms: words("true false null"), + hooks: {"#": cppHook}, + modeProps: {fold: ["brace", "include"]} + }); + + // Ceylon Strings need to deal with interpolation + var stringTokenizer = null; + function tokenCeylonString(type) { + return function(stream, state) { + var escaped = false, next, end = false; + while (!stream.eol()) { + if (!escaped && stream.match('"') && + (type == "single" || stream.match('""'))) { + end = true; + break; + } + if (!escaped && stream.match('``')) { + stringTokenizer = tokenCeylonString(type); + end = true; + break; + } + next = stream.next(); + escaped = type == "single" && !escaped && next == "\\"; + } + if (end) + state.tokenize = null; + return "string"; + } + } + + def("text/x-ceylon", { + name: "clike", + keywords: words("abstracts alias assembly assert assign break case catch class continue dynamic else" + + " exists extends finally for function given if import in interface is let module new" + + " nonempty object of out outer package return satisfies super switch then this throw" + + " try value void while"), + types: function(word) { + // In Ceylon all identifiers that start with an uppercase are types + var first = word.charAt(0); + return (first === first.toUpperCase() && first !== first.toLowerCase()); + }, + blockKeywords: words("case catch class dynamic else finally for function if interface module new object switch try while"), + defKeywords: words("class dynamic function interface module object package value"), + builtin: words("abstract actual aliased annotation by default deprecated doc final formal late license" + + " native optional sealed see serializable shared suppressWarnings tagged throws variable"), + isPunctuationChar: /[\[\]{}\(\),;\:\.`]/, + isOperatorChar: /[+\-*&%=<>!?|^~:\/]/, + numberStart: /[\d#$]/, + number: /^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i, + multiLineStrings: true, + typeFirstDefinitions: true, + atoms: words("true false null larger smaller equal empty finished"), + indentSwitch: false, + styleDefs: false, + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + }, + '"': function(stream, state) { + state.tokenize = tokenCeylonString(stream.match('""') ? "triple" : "single"); + return state.tokenize(stream, state); + }, + '`': function(stream, state) { + if (!stringTokenizer || !stream.match('`')) return false; + state.tokenize = stringTokenizer; + stringTokenizer = null; + return state.tokenize(stream, state); + }, + "'": function(stream) { + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + return "atom"; + }, + token: function(_stream, state, style) { + if ((style == "variable" || style == "type") && + state.prevToken == ".") { + return "variable-2"; + } + } + }, + modeProps: { + fold: ["brace", "import"], + closeBrackets: {triples: '"'} + } + }); + +}); diff --git a/js/codemirror/mode/clike/index.html b/js/codemirror/mode/clike/index.html new file mode 100644 index 0000000..5b82df3 --- /dev/null +++ b/js/codemirror/mode/clike/index.html @@ -0,0 +1,380 @@ + + +CodeMirror: C-like mode + + + + + + + + + + + + +
+

C-like mode

+ +
+ +

C++ example

+ +
+ +

Objective-C example

+ +
+ +

Java example

+ +
+ +

Scala example

+ +
+ +

Kotlin mode

+ +
+ +

Ceylon mode

+ +
+ + + +

Simple mode that tries to handle C-like languages as well as it + can. Takes two configuration parameters: keywords, an + object whose property names are the keywords in the language, + and useCPP, which determines whether C preprocessor + directives are recognized.

+ +

MIME types defined: text/x-csrc + (C), text/x-c++src (C++), text/x-java + (Java), text/x-csharp (C#), + text/x-objectivec (Objective-C), + text/x-scala (Scala), text/x-vertex + x-shader/x-fragment (shader programs), + text/x-squirrel (Squirrel) and + text/x-ceylon (Ceylon)

+
diff --git a/js/codemirror/mode/clike/scala.html b/js/codemirror/mode/clike/scala.html new file mode 100644 index 0000000..49eab45 --- /dev/null +++ b/js/codemirror/mode/clike/scala.html @@ -0,0 +1,767 @@ + + +CodeMirror: Scala mode + + + + + + + + + + +
+

Scala mode

+
+ +
+ + +
diff --git a/js/codemirror/mode/clike/test.js b/js/codemirror/mode/clike/test.js new file mode 100644 index 0000000..2933a00 --- /dev/null +++ b/js/codemirror/mode/clike/test.js @@ -0,0 +1,170 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-c"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("indent", + "[type void] [def foo]([type void*] [variable a], [type int] [variable b]) {", + " [type int] [variable c] [operator =] [variable b] [operator +]", + " [number 1];", + " [keyword return] [operator *][variable a];", + "}"); + + MT("indent_switch", + "[keyword switch] ([variable x]) {", + " [keyword case] [number 10]:", + " [keyword return] [number 20];", + " [keyword default]:", + " [variable printf]([string \"foo %c\"], [variable x]);", + "}"); + + MT("def", + "[type void] [def foo]() {}", + "[keyword struct] [def bar]{}", + "[keyword enum] [def zot]{}", + "[keyword union] [def ugh]{}", + "[type int] [type *][def baz]() {}"); + + MT("def_new_line", + "::[variable std]::[variable SomeTerribleType][operator <][variable T][operator >]", + "[def SomeLongMethodNameThatDoesntFitIntoOneLine]([keyword const] [variable MyType][operator &] [variable param]) {}") + + MT("double_block", + "[keyword for] (;;)", + " [keyword for] (;;)", + " [variable x][operator ++];", + "[keyword return];"); + + MT("preprocessor", + "[meta #define FOO 3]", + "[type int] [variable foo];", + "[meta #define BAR\\]", + "[meta 4]", + "[type unsigned] [type int] [variable bar] [operator =] [number 8];", + "[meta #include ][comment // comment]") + + MT("c_underscores", + "[builtin __FOO];", + "[builtin _Complex];", + "[builtin __aName];", + "[variable _aName];"); + + MT("c_types", + "[type int];", + "[type long];", + "[type char];", + "[type short];", + "[type double];", + "[type float];", + "[type unsigned];", + "[type signed];", + "[type void];", + "[type bool];", + "[type foo_t];", + "[variable foo_T];", + "[variable _t];"); + + var mode_cpp = CodeMirror.getMode({indentUnit: 2}, "text/x-c++src"); + function MTCPP(name) { test.mode(name, mode_cpp, Array.prototype.slice.call(arguments, 1)); } + + MTCPP("cpp14_literal", + "[number 10'000];", + "[number 0b10'000];", + "[number 0x10'000];", + "[string '100000'];"); + + MTCPP("ctor_dtor", + "[def Foo::Foo]() {}", + "[def Foo::~Foo]() {}"); + + MTCPP("cpp_underscores", + "[builtin __FOO];", + "[builtin _Complex];", + "[builtin __aName];", + "[variable _aName];"); + + var mode_objc = CodeMirror.getMode({indentUnit: 2}, "text/x-objectivec"); + function MTOBJC(name) { test.mode(name, mode_objc, Array.prototype.slice.call(arguments, 1)); } + + MTOBJC("objc_underscores", + "[builtin __FOO];", + "[builtin _Complex];", + "[builtin __aName];", + "[variable _aName];"); + + MTOBJC("objc_interface", + "[keyword @interface] [def foo] {", + " [type int] [variable bar];", + "}", + "[keyword @property] ([keyword atomic], [keyword nullable]) [variable NSString][operator *] [variable a];", + "[keyword @property] ([keyword nonatomic], [keyword assign]) [type int] [variable b];", + "[operator -]([type instancetype])[variable initWithFoo]:([type int])[variable a] " + + "[builtin NS_DESIGNATED_INITIALIZER];", + "[keyword @end]"); + + MTOBJC("objc_implementation", + "[keyword @implementation] [def foo] {", + " [type int] [variable bar];", + "}", + "[keyword @property] ([keyword readwrite]) [type SEL] [variable a];", + "[operator -]([type instancetype])[variable initWithFoo]:([type int])[variable a] {", + " [keyword if](([keyword self] [operator =] [[[keyword super] [variable init] ]])) {}", + " [keyword return] [keyword self];", + "}", + "[keyword @end]"); + + MTOBJC("objc_types", + "[type int];", + "[type foo_t];", + "[variable foo_T];", + "[type id];", + "[type SEL];", + "[type instancetype];", + "[type Class];", + "[type Protocol];", + "[type BOOL];" + ); + + var mode_scala = CodeMirror.getMode({indentUnit: 2}, "text/x-scala"); + function MTSCALA(name) { test.mode("scala_" + name, mode_scala, Array.prototype.slice.call(arguments, 1)); } + MTSCALA("nested_comments", + "[comment /*]", + "[comment But wait /* this is a nested comment */ for real]", + "[comment /**** let * me * show * you ****/]", + "[comment ///// let / me / show / you /////]", + "[comment */]"); + + var mode_java = CodeMirror.getMode({indentUnit: 2}, "text/x-java"); + function MTJAVA(name) { test.mode("java_" + name, mode_java, Array.prototype.slice.call(arguments, 1)); } + MTJAVA("types", + "[type byte];", + "[type short];", + "[type int];", + "[type long];", + "[type float];", + "[type double];", + "[type boolean];", + "[type char];", + "[type void];", + "[type Boolean];", + "[type Byte];", + "[type Character];", + "[type Double];", + "[type Float];", + "[type Integer];", + "[type Long];", + "[type Number];", + "[type Object];", + "[type Short];", + "[type String];", + "[type StringBuffer];", + "[type StringBuilder];", + "[type Void];"); + + MTJAVA("indent", + "[keyword public] [keyword class] [def A] [keyword extends] [variable B]", + "{", + " [variable c]()") +})(); diff --git a/js/codemirror/mode/clojure/clojure.js b/js/codemirror/mode/clojure/clojure.js new file mode 100644 index 0000000..3305165 --- /dev/null +++ b/js/codemirror/mode/clojure/clojure.js @@ -0,0 +1,292 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports === "object" && typeof module === "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define === "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("clojure", function (options) { + var atoms = ["false", "nil", "true"]; + var specialForms = [".", "catch", "def", "do", "if", "monitor-enter", + "monitor-exit", "new", "quote", "recur", "set!", "throw", "try", "var"]; + var coreSymbols = ["*", "*'", "*1", "*2", "*3", "*agent*", + "*allow-unresolved-vars*", "*assert*", "*clojure-version*", + "*command-line-args*", "*compile-files*", "*compile-path*", + "*compiler-options*", "*data-readers*", "*default-data-reader-fn*", "*e", + "*err*", "*file*", "*flush-on-newline*", "*fn-loader*", "*in*", + "*math-context*", "*ns*", "*out*", "*print-dup*", "*print-length*", + "*print-level*", "*print-meta*", "*print-namespace-maps*", + "*print-readably*", "*read-eval*", "*reader-resolver*", "*source-path*", + "*suppress-read*", "*unchecked-math*", "*use-context-classloader*", + "*verbose-defrecords*", "*warn-on-reflection*", "+", "+'", "-", "-'", + "->", "->>", "->ArrayChunk", "->Eduction", "->Vec", "->VecNode", + "->VecSeq", "-cache-protocol-fn", "-reset-methods", "..", "/", "<", "<=", + "=", "==", ">", ">=", "EMPTY-NODE", "Inst", "StackTraceElement->vec", + "Throwable->map", "accessor", "aclone", "add-classpath", "add-watch", + "agent", "agent-error", "agent-errors", "aget", "alength", "alias", + "all-ns", "alter", "alter-meta!", "alter-var-root", "amap", "ancestors", + "and", "any?", "apply", "areduce", "array-map", "as->", "aset", + "aset-boolean", "aset-byte", "aset-char", "aset-double", "aset-float", + "aset-int", "aset-long", "aset-short", "assert", "assoc", "assoc!", + "assoc-in", "associative?", "atom", "await", "await-for", "await1", + "bases", "bean", "bigdec", "bigint", "biginteger", "binding", "bit-and", + "bit-and-not", "bit-clear", "bit-flip", "bit-not", "bit-or", "bit-set", + "bit-shift-left", "bit-shift-right", "bit-test", "bit-xor", "boolean", + "boolean-array", "boolean?", "booleans", "bound-fn", "bound-fn*", + "bound?", "bounded-count", "butlast", "byte", "byte-array", "bytes", + "bytes?", "case", "cast", "cat", "char", "char-array", + "char-escape-string", "char-name-string", "char?", "chars", "chunk", + "chunk-append", "chunk-buffer", "chunk-cons", "chunk-first", "chunk-next", + "chunk-rest", "chunked-seq?", "class", "class?", "clear-agent-errors", + "clojure-version", "coll?", "comment", "commute", "comp", "comparator", + "compare", "compare-and-set!", "compile", "complement", "completing", + "concat", "cond", "cond->", "cond->>", "condp", "conj", "conj!", "cons", + "constantly", "construct-proxy", "contains?", "count", "counted?", + "create-ns", "create-struct", "cycle", "dec", "dec'", "decimal?", + "declare", "dedupe", "default-data-readers", "definline", "definterface", + "defmacro", "defmethod", "defmulti", "defn", "defn-", "defonce", + "defprotocol", "defrecord", "defstruct", "deftype", "delay", "delay?", + "deliver", "denominator", "deref", "derive", "descendants", "destructure", + "disj", "disj!", "dissoc", "dissoc!", "distinct", "distinct?", "doall", + "dorun", "doseq", "dosync", "dotimes", "doto", "double", "double-array", + "double?", "doubles", "drop", "drop-last", "drop-while", "eduction", + "empty", "empty?", "ensure", "ensure-reduced", "enumeration-seq", + "error-handler", "error-mode", "eval", "even?", "every-pred", "every?", + "ex-data", "ex-info", "extend", "extend-protocol", "extend-type", + "extenders", "extends?", "false?", "ffirst", "file-seq", "filter", + "filterv", "find", "find-keyword", "find-ns", "find-protocol-impl", + "find-protocol-method", "find-var", "first", "flatten", "float", + "float-array", "float?", "floats", "flush", "fn", "fn?", "fnext", "fnil", + "for", "force", "format", "frequencies", "future", "future-call", + "future-cancel", "future-cancelled?", "future-done?", "future?", + "gen-class", "gen-interface", "gensym", "get", "get-in", "get-method", + "get-proxy-class", "get-thread-bindings", "get-validator", "group-by", + "halt-when", "hash", "hash-combine", "hash-map", "hash-ordered-coll", + "hash-set", "hash-unordered-coll", "ident?", "identical?", "identity", + "if-let", "if-not", "if-some", "ifn?", "import", "in-ns", "inc", "inc'", + "indexed?", "init-proxy", "inst-ms", "inst-ms*", "inst?", "instance?", + "int", "int-array", "int?", "integer?", "interleave", "intern", + "interpose", "into", "into-array", "ints", "io!", "isa?", "iterate", + "iterator-seq", "juxt", "keep", "keep-indexed", "key", "keys", "keyword", + "keyword?", "last", "lazy-cat", "lazy-seq", "let", "letfn", "line-seq", + "list", "list*", "list?", "load", "load-file", "load-reader", + "load-string", "loaded-libs", "locking", "long", "long-array", "longs", + "loop", "macroexpand", "macroexpand-1", "make-array", "make-hierarchy", + "map", "map-entry?", "map-indexed", "map?", "mapcat", "mapv", "max", + "max-key", "memfn", "memoize", "merge", "merge-with", "meta", + "method-sig", "methods", "min", "min-key", "mix-collection-hash", "mod", + "munge", "name", "namespace", "namespace-munge", "nat-int?", "neg-int?", + "neg?", "newline", "next", "nfirst", "nil?", "nnext", "not", "not-any?", + "not-empty", "not-every?", "not=", "ns", "ns-aliases", "ns-imports", + "ns-interns", "ns-map", "ns-name", "ns-publics", "ns-refers", + "ns-resolve", "ns-unalias", "ns-unmap", "nth", "nthnext", "nthrest", + "num", "number?", "numerator", "object-array", "odd?", "or", "parents", + "partial", "partition", "partition-all", "partition-by", "pcalls", "peek", + "persistent!", "pmap", "pop", "pop!", "pop-thread-bindings", "pos-int?", + "pos?", "pr", "pr-str", "prefer-method", "prefers", + "primitives-classnames", "print", "print-ctor", "print-dup", + "print-method", "print-simple", "print-str", "printf", "println", + "println-str", "prn", "prn-str", "promise", "proxy", + "proxy-call-with-super", "proxy-mappings", "proxy-name", "proxy-super", + "push-thread-bindings", "pvalues", "qualified-ident?", + "qualified-keyword?", "qualified-symbol?", "quot", "rand", "rand-int", + "rand-nth", "random-sample", "range", "ratio?", "rational?", + "rationalize", "re-find", "re-groups", "re-matcher", "re-matches", + "re-pattern", "re-seq", "read", "read-line", "read-string", + "reader-conditional", "reader-conditional?", "realized?", "record?", + "reduce", "reduce-kv", "reduced", "reduced?", "reductions", "ref", + "ref-history-count", "ref-max-history", "ref-min-history", "ref-set", + "refer", "refer-clojure", "reify", "release-pending-sends", "rem", + "remove", "remove-all-methods", "remove-method", "remove-ns", + "remove-watch", "repeat", "repeatedly", "replace", "replicate", "require", + "reset!", "reset-meta!", "reset-vals!", "resolve", "rest", + "restart-agent", "resultset-seq", "reverse", "reversible?", "rseq", + "rsubseq", "run!", "satisfies?", "second", "select-keys", "send", + "send-off", "send-via", "seq", "seq?", "seqable?", "seque", "sequence", + "sequential?", "set", "set-agent-send-executor!", + "set-agent-send-off-executor!", "set-error-handler!", "set-error-mode!", + "set-validator!", "set?", "short", "short-array", "shorts", "shuffle", + "shutdown-agents", "simple-ident?", "simple-keyword?", "simple-symbol?", + "slurp", "some", "some->", "some->>", "some-fn", "some?", "sort", + "sort-by", "sorted-map", "sorted-map-by", "sorted-set", "sorted-set-by", + "sorted?", "special-symbol?", "spit", "split-at", "split-with", "str", + "string?", "struct", "struct-map", "subs", "subseq", "subvec", "supers", + "swap!", "swap-vals!", "symbol", "symbol?", "sync", "tagged-literal", + "tagged-literal?", "take", "take-last", "take-nth", "take-while", "test", + "the-ns", "thread-bound?", "time", "to-array", "to-array-2d", + "trampoline", "transduce", "transient", "tree-seq", "true?", "type", + "unchecked-add", "unchecked-add-int", "unchecked-byte", "unchecked-char", + "unchecked-dec", "unchecked-dec-int", "unchecked-divide-int", + "unchecked-double", "unchecked-float", "unchecked-inc", + "unchecked-inc-int", "unchecked-int", "unchecked-long", + "unchecked-multiply", "unchecked-multiply-int", "unchecked-negate", + "unchecked-negate-int", "unchecked-remainder-int", "unchecked-short", + "unchecked-subtract", "unchecked-subtract-int", "underive", "unquote", + "unquote-splicing", "unreduced", "unsigned-bit-shift-right", "update", + "update-in", "update-proxy", "uri?", "use", "uuid?", "val", "vals", + "var-get", "var-set", "var?", "vary-meta", "vec", "vector", "vector-of", + "vector?", "volatile!", "volatile?", "vreset!", "vswap!", "when", + "when-first", "when-let", "when-not", "when-some", "while", + "with-bindings", "with-bindings*", "with-in-str", "with-loading-context", + "with-local-vars", "with-meta", "with-open", "with-out-str", + "with-precision", "with-redefs", "with-redefs-fn", "xml-seq", "zero?", + "zipmap"]; + var haveBodyParameter = [ + "->", "->>", "as->", "binding", "bound-fn", "case", "catch", "comment", + "cond", "cond->", "cond->>", "condp", "def", "definterface", "defmethod", + "defn", "defmacro", "defprotocol", "defrecord", "defstruct", "deftype", + "do", "doseq", "dotimes", "doto", "extend", "extend-protocol", + "extend-type", "fn", "for", "future", "if", "if-let", "if-not", "if-some", + "let", "letfn", "locking", "loop", "ns", "proxy", "reify", "struct-map", + "some->", "some->>", "try", "when", "when-first", "when-let", "when-not", + "when-some", "while", "with-bindings", "with-bindings*", "with-in-str", + "with-loading-context", "with-local-vars", "with-meta", "with-open", + "with-out-str", "with-precision", "with-redefs", "with-redefs-fn"]; + + CodeMirror.registerHelper("hintWords", "clojure", + [].concat(atoms, specialForms, coreSymbols)); + + var atom = createLookupMap(atoms); + var specialForm = createLookupMap(specialForms); + var coreSymbol = createLookupMap(coreSymbols); + var hasBodyParameter = createLookupMap(haveBodyParameter); + var delimiter = /^(?:[\\\[\]\s"(),;@^`{}~]|$)/; + var numberLiteral = /^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/; + var characterLiteral = /^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/; + + // simple-namespace := /^[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*/ + // simple-symbol := /^(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)/ + // qualified-symbol := ((<.>)*)? + var qualifiedSymbol = /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/; + + function base(stream, state) { + if (stream.eatSpace() || stream.eat(",")) return ["space", null]; + if (stream.match(numberLiteral)) return [null, "number"]; + if (stream.match(characterLiteral)) return [null, "string-2"]; + if (stream.eat(/^"/)) return (state.tokenize = inString)(stream, state); + if (stream.eat(/^[(\[{]/)) return ["open", "bracket"]; + if (stream.eat(/^[)\]}]/)) return ["close", "bracket"]; + if (stream.eat(/^;/)) {stream.skipToEnd(); return ["space", "comment"];} + if (stream.eat(/^[#'@^`~]/)) return [null, "meta"]; + + var matches = stream.match(qualifiedSymbol); + var symbol = matches && matches[0]; + + if (!symbol) { + // advance stream by at least one character so we don't get stuck. + stream.next(); + stream.eatWhile(function (c) {return !is(c, delimiter);}); + return [null, "error"]; + } + + if (symbol === "comment" && state.lastToken === "(") + return (state.tokenize = inComment)(stream, state); + if (is(symbol, atom) || symbol.charAt(0) === ":") return ["symbol", "atom"]; + if (is(symbol, specialForm) || is(symbol, coreSymbol)) return ["symbol", "keyword"]; + if (state.lastToken === "(") return ["symbol", "builtin"]; // other operator + + return ["symbol", "variable"]; + } + + function inString(stream, state) { + var escaped = false, next; + + while (next = stream.next()) { + if (next === "\"" && !escaped) {state.tokenize = base; break;} + escaped = !escaped && next === "\\"; + } + + return [null, "string"]; + } + + function inComment(stream, state) { + var parenthesisCount = 1; + var next; + + while (next = stream.next()) { + if (next === ")") parenthesisCount--; + if (next === "(") parenthesisCount++; + if (parenthesisCount === 0) { + stream.backUp(1); + state.tokenize = base; + break; + } + } + + return ["space", "comment"]; + } + + function createLookupMap(words) { + var obj = {}; + + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + + return obj; + } + + function is(value, test) { + if (test instanceof RegExp) return test.test(value); + if (test instanceof Object) return test.propertyIsEnumerable(value); + } + + return { + startState: function () { + return { + ctx: {prev: null, start: 0, indentTo: 0}, + lastToken: null, + tokenize: base + }; + }, + + token: function (stream, state) { + if (stream.sol() && (typeof state.ctx.indentTo !== "number")) + state.ctx.indentTo = state.ctx.start + 1; + + var typeStylePair = state.tokenize(stream, state); + var type = typeStylePair[0]; + var style = typeStylePair[1]; + var current = stream.current(); + + if (type !== "space") { + if (state.lastToken === "(" && state.ctx.indentTo === null) { + if (type === "symbol" && is(current, hasBodyParameter)) + state.ctx.indentTo = state.ctx.start + options.indentUnit; + else state.ctx.indentTo = "next"; + } else if (state.ctx.indentTo === "next") { + state.ctx.indentTo = stream.column(); + } + + state.lastToken = current; + } + + if (type === "open") + state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null}; + else if (type === "close") state.ctx = state.ctx.prev || state.ctx; + + return style; + }, + + indent: function (state) { + var i = state.ctx.indentTo; + + return (typeof i === "number") ? + i : + state.ctx.start + 1; + }, + + closeBrackets: {pairs: "()[]{}\"\""}, + lineComment: ";;" + }; +}); + +CodeMirror.defineMIME("text/x-clojure", "clojure"); +CodeMirror.defineMIME("text/x-clojurescript", "clojure"); +CodeMirror.defineMIME("application/edn", "clojure"); + +}); diff --git a/js/codemirror/mode/clojure/index.html b/js/codemirror/mode/clojure/index.html new file mode 100644 index 0000000..3cad7c5 --- /dev/null +++ b/js/codemirror/mode/clojure/index.html @@ -0,0 +1,95 @@ + + +CodeMirror: Clojure mode + + + + + + + + + + + +
+

Clojure mode

+
+ + +

MIME types defined: text/x-clojure.

+ +
diff --git a/js/codemirror/mode/clojure/test.js b/js/codemirror/mode/clojure/test.js new file mode 100644 index 0000000..18ee645 --- /dev/null +++ b/js/codemirror/mode/clojure/test.js @@ -0,0 +1,384 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function () { + var mode = CodeMirror.getMode({indentUnit: 2}, "clojure"); + + function MT(name) { + test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); + } + + MT("atoms", + "[atom false]", + "[atom nil]", + "[atom true]" + ); + + MT("keywords", + "[atom :foo]", + "[atom ::bar]", + "[atom :foo/bar]", + "[atom :foo.bar/baz]" + ); + + MT("numbers", + "[number 42] [number +42] [number -421]", + "[number 42N] [number +42N] [number -42N]", + "[number 0.42] [number +0.42] [number -0.42]", + "[number 42M] [number +42M] [number -42M]", + "[number 42.42M] [number +42.42M] [number -42.42M]", + "[number 1/42] [number +1/42] [number -1/42]", + "[number 0x42af] [number +0x42af] [number -0x42af]", + "[number 0x42AF] [number +0x42AF] [number -0x42AF]", + "[number 1e2] [number 1e+2] [number 1e-2]", + "[number +1e2] [number +1e+2] [number +1e-2]", + "[number -1e2] [number -1e+2] [number -1e-2]", + "[number -1.0e2] [number -0.1e+2] [number -1.01e-2]", + "[number 1E2] [number 1E+2] [number 1E-2]", + "[number +1E2] [number +1E+2] [number +1E-2]", + "[number -1E2] [number -1E+2] [number -1E-2]", + "[number -1.0E2] [number -0.1E+2] [number -1.01E-2]", + "[number 2r101010] [number +2r101010] [number -2r101010]", + "[number 2r101010] [number +2r101010] [number -2r101010]", + "[number 8r52] [number +8r52] [number -8r52]", + "[number 36rhello] [number +36rhello] [number -36rhello]", + "[number 36rz] [number +36rz] [number -36rz]", + "[number 36rZ] [number +36rZ] [number -36rZ]", + + // invalid numbers + "[error 42foo]", + "[error 42Nfoo]", + "[error 42Mfoo]", + "[error 42.42Mfoo]", + "[error 42.42M!]", + "[error 42!]", + "[error 0x42afm]" + ); + + MT("characters", + "[string-2 \\1]", + "[string-2 \\a]", + "[string-2 \\a\\b\\c]", + "[string-2 \\#]", + "[string-2 \\\\]", + "[string-2 \\\"]", + "[string-2 \\(]", + "[string-2 \\A]", + "[string-2 \\backspace]", + "[string-2 \\formfeed]", + "[string-2 \\newline]", + "[string-2 \\space]", + "[string-2 \\return]", + "[string-2 \\tab]", + "[string-2 \\u1000]", + "[string-2 \\uAaAa]", + "[string-2 \\u9F9F]", + "[string-2 \\o123]", + "[string-2 \\符]", + "[string-2 \\シ]", + "[string-2 \\ۇ]", + // FIXME + // "[string-2 \\🙂]", + + // invalid character literals + "[error \\abc]", + "[error \\a123]", + "[error \\a!]", + "[error \\newlines]", + "[error \\NEWLINE]", + "[error \\u9F9FF]", + "[error \\o1234]" + ); + + MT("strings", + "[string \"I'm a teapot.\"]", + "[string \"I'm a \\\"teapot\\\".\"]", + "[string \"I'm]", // this is + "[string a]", // a multi-line + "[string teapot.\"]" // string + + // TODO unterminated (multi-line) strings? + ); + + MT("comments", + "[comment ; this is an in-line comment.]", + "[comment ;; this is a line comment.]", + "[keyword comment]", + "[bracket (][comment comment (foo 1 2 3)][bracket )]" + ); + + MT("reader macro characters", + "[meta #][variable _]", + "[meta #][variable -Inf]", + "[meta ##][variable Inf]", + "[meta ##][variable NaN]", + "[meta @][variable x]", + "[meta ^][bracket {][atom :tag] [variable String][bracket }]", + "[meta `][bracket (][builtin f] [variable x][bracket )]", + "[meta ~][variable foo#]", + "[meta '][number 1]", + "[meta '][atom :foo]", + "[meta '][string \"foo\"]", + "[meta '][variable x]", + "[meta '][bracket (][builtin a] [variable b] [variable c][bracket )]", + "[meta '][bracket [[][variable a] [variable b] [variable c][bracket ]]]", + "[meta '][bracket {][variable a] [number 1] [atom :foo] [number 2] [variable c] [number 3][bracket }]", + "[meta '#][bracket {][variable a] [number 1] [atom :foo][bracket }]" + ); + + MT("symbols", + "[variable foo!]", + "[variable foo#]", + "[variable foo$]", + "[variable foo&]", + "[variable foo']", + "[variable foo*]", + "[variable foo+]", + "[variable foo-]", + "[variable foo.]", + "[variable foo/bar]", + "[variable foo:bar]", + "[variable foo<]", + "[variable foo=]", + "[variable foo>]", + "[variable foo?]", + "[variable foo_]", + "[variable foo|]", + "[variable foobarBaz]", + "[variable foo¡]", + "[variable 符号]", + "[variable シンボル]", + "[variable ئۇيغۇر]", + "[variable 🙂❤🇺🇸]", + + // invalid symbols + "[error 3foo]", + "[error 3+]", + "[error 3|]", + "[error 3_]" + ); + + MT("numbers and other forms", + "[number 42][bracket (][builtin foo][bracket )]", + "[number 42][bracket [[][variable foo][bracket ]]]", + "[number 42][meta #][bracket {][variable foo][bracket }]", + "[number 42][bracket {][atom :foo] [variable bar][bracket }]", + "[number 42][meta `][variable foo]", + "[number 42][meta ~][variable foo]", + "[number 42][meta #][variable foo]" + ); + + var specialForms = [".", "catch", "def", "do", "if", "monitor-enter", + "monitor-exit", "new", "quote", "recur", "set!", "throw", "try", "var"]; + + MT("should highlight special forms as keywords", + typeTokenPairs("keyword", specialForms) + ); + + var coreSymbols1 = [ + "*", "*'", "*1", "*2", "*3", "*agent*", "*allow-unresolved-vars*", "*assert*", + "*clojure-version*", "*command-line-args*", "*compile-files*", "*compile-path*", "*compiler-options*", + "*data-readers*", "*default-data-reader-fn*", "*e", "*err*", "*file*", "*flush-on-newline*", "*fn-loader*", + "*in*", "*math-context*", "*ns*", "*out*", "*print-dup*", "*print-length*", "*print-level*", "*print-meta*", + "*print-namespace-maps*", "*print-readably*", "*read-eval*", "*reader-resolver*", "*source-path*", + "*suppress-read*", "*unchecked-math*", "*use-context-classloader*", "*verbose-defrecords*", + "*warn-on-reflection*", "+", "+'", "-", "-'", "->", "->>", "->ArrayChunk", "->Eduction", "->Vec", "->VecNode", + "->VecSeq", "-cache-protocol-fn", "-reset-methods", "..", "/", "<", "<=", "=", "==", ">", ">=", + "EMPTY-NODE", "Inst", "StackTraceElement->vec", "Throwable->map", "accessor", "aclone", "add-classpath", + "add-watch", "agent", "agent-error", "agent-errors", "aget", "alength", "alias", "all-ns", "alter", + "alter-meta!", "alter-var-root", "amap", "ancestors", "and", "any?", "apply", "areduce", "array-map", + "as->", "aset", "aset-boolean", "aset-byte", "aset-char", "aset-double", "aset-float", "aset-int", + "aset-long", "aset-short", "assert", "assoc", "assoc!", "assoc-in", "associative?", "atom", "await", + "await-for", "await1", "bases", "bean", "bigdec", "bigint", "biginteger", "binding", "bit-and", "bit-and-not", + "bit-clear", "bit-flip", "bit-not", "bit-or", "bit-set", "bit-shift-left", "bit-shift-right", "bit-test", + "bit-xor", "boolean", "boolean-array", "boolean?", "booleans", "bound-fn", "bound-fn*", "bound?", + "bounded-count", "butlast", "byte", "byte-array", "bytes", "bytes?", "case", "cast", "cat", "char", + "char-array", "char-escape-string", "char-name-string", "char?", "chars", "chunk", "chunk-append", + "chunk-buffer", "chunk-cons", "chunk-first", "chunk-next", "chunk-rest", "chunked-seq?", "class", "class?", + "clear-agent-errors", "clojure-version", "coll?", "comment", "commute", "comp", "comparator", "compare", + "compare-and-set!", "compile", "complement", "completing", "concat", "cond", "cond->", "cond->>", "condp", + "conj", "conj!", "cons", "constantly", "construct-proxy", "contains?", "count", "counted?", "create-ns", + "create-struct", "cycle", "dec", "dec'", "decimal?", "declare", "dedupe", "default-data-readers", "definline", + "definterface", "defmacro", "defmethod", "defmulti", "defn", "defn-", "defonce", "defprotocol", "defrecord", + "defstruct", "deftype", "delay", "delay?", "deliver", "denominator", "deref", "derive", "descendants", + "destructure", "disj", "disj!", "dissoc", "dissoc!", "distinct", "distinct?", "doall", "dorun", "doseq", + "dosync", "dotimes", "doto", "double", "double-array", "double?", "doubles", "drop", "drop-last", "drop-while", + "eduction", "empty", "empty?", "ensure", "ensure-reduced", "enumeration-seq", "error-handler", "error-mode", + "eval", "even?", "every-pred", "every?", "ex-data", "ex-info", "extend", "extend-protocol", "extend-type", + "extenders", "extends?", "false?", "ffirst", "file-seq", "filter", "filterv", "find", "find-keyword", "find-ns", + "find-protocol-impl", "find-protocol-method", "find-var", "first", "flatten", "float", "float-array", "float?", + "floats", "flush", "fn", "fn?", "fnext", "fnil", "for", "force", "format", "frequencies", "future", "future-call", + "future-cancel", "future-cancelled?", "future-done?", "future?", "gen-class", "gen-interface", "gensym", "get", + "get-in", "get-method", "get-proxy-class", "get-thread-bindings", "get-validator", "group-by", "halt-when", "hash", + "hash-combine", "hash-map", "hash-ordered-coll", "hash-set", "hash-unordered-coll", "ident?", "identical?", + "identity", "if-let", "if-not", "if-some", "ifn?", "import", "in-ns", "inc", "inc'", "indexed?", "init-proxy", + "inst-ms", "inst-ms*", "inst?", "instance?", "int", "int-array", "int?", "integer?", "interleave", "intern", + "interpose", "into", "into-array", "ints", "io!", "isa?", "iterate", "iterator-seq", "juxt", "keep", "keep-indexed", + "key", "keys", "keyword", "keyword?", "last", "lazy-cat", "lazy-seq", "let", "letfn", "line-seq", "list", "list*", + "list?", "load", "load-file", "load-reader", "load-string", "loaded-libs", "locking", "long", "long-array", "longs", + "loop", "macroexpand", "macroexpand-1", "make-array", "make-hierarchy", "map", "map-entry?", "map-indexed", "map?", + "mapcat", "mapv", "max", "max-key", "memfn", "memoize", "merge", "merge-with", "meta", "method-sig", "methods"]; + + var coreSymbols2 = [ + "min", "min-key", "mix-collection-hash", "mod", "munge", "name", "namespace", "namespace-munge", "nat-int?", + "neg-int?", "neg?", "newline", "next", "nfirst", "nil?", "nnext", "not", "not-any?", "not-empty", "not-every?", + "not=", "ns", "ns-aliases", "ns-imports", "ns-interns", "ns-map", "ns-name", "ns-publics", "ns-refers", "ns-resolve", + "ns-unalias", "ns-unmap", "nth", "nthnext", "nthrest", "num", "number?", "numerator", "object-array", "odd?", "or", + "parents", "partial", "partition", "partition-all", "partition-by", "pcalls", "peek", "persistent!", "pmap", "pop", + "pop!", "pop-thread-bindings", "pos-int?", "pos?", "pr", "pr-str", "prefer-method", "prefers", + "primitives-classnames", "print", "print-ctor", "print-dup", "print-method", "print-simple", "print-str", "printf", + "println", "println-str", "prn", "prn-str", "promise", "proxy", "proxy-call-with-super", "proxy-mappings", + "proxy-name", "proxy-super", "push-thread-bindings", "pvalues", "qualified-ident?", "qualified-keyword?", + "qualified-symbol?", "quot", "rand", "rand-int", "rand-nth", "random-sample", "range", "ratio?", "rational?", + "rationalize", "re-find", "re-groups", "re-matcher", "re-matches", "re-pattern", "re-seq", "read", "read-line", + "read-string", "reader-conditional", "reader-conditional?", "realized?", "record?", "reduce", "reduce-kv", "reduced", + "reduced?", "reductions", "ref", "ref-history-count", "ref-max-history", "ref-min-history", "ref-set", "refer", + "refer-clojure", "reify", "release-pending-sends", "rem", "remove", "remove-all-methods", "remove-method", "remove-ns", + "remove-watch", "repeat", "repeatedly", "replace", "replicate", "require", "reset!", "reset-meta!", "reset-vals!", + "resolve", "rest", "restart-agent", "resultset-seq", "reverse", "reversible?", "rseq", "rsubseq", "run!", "satisfies?", + "second", "select-keys", "send", "send-off", "send-via", "seq", "seq?", "seqable?", "seque", "sequence", "sequential?", + "set", "set-agent-send-executor!", "set-agent-send-off-executor!", "set-error-handler!", "set-error-mode!", + "set-validator!", "set?", "short", "short-array", "shorts", "shuffle", "shutdown-agents", "simple-ident?", + "simple-keyword?", "simple-symbol?", "slurp", "some", "some->", "some->>", "some-fn", "some?", "sort", "sort-by", + "sorted-map", "sorted-map-by", "sorted-set", "sorted-set-by", "sorted?", "special-symbol?", "spit", "split-at", + "split-with", "str", "string?", "struct", "struct-map", "subs", "subseq", "subvec", "supers", "swap!", "swap-vals!", + "symbol", "symbol?", "sync", "tagged-literal", "tagged-literal?", "take", "take-last", "take-nth", "take-while", "test", + "the-ns", "thread-bound?", "time", "to-array", "to-array-2d", "trampoline", "transduce", "transient", "tree-seq", + "true?", "type", "unchecked-add", "unchecked-add-int", "unchecked-byte", "unchecked-char", "unchecked-dec", + "unchecked-dec-int", "unchecked-divide-int", "unchecked-double", "unchecked-float", "unchecked-inc", "unchecked-inc-int", + "unchecked-int", "unchecked-long", "unchecked-multiply", "unchecked-multiply-int", "unchecked-negate", + "unchecked-negate-int", "unchecked-remainder-int", "unchecked-short", "unchecked-subtract", "unchecked-subtract-int", + "underive", "unquote", "unquote-splicing", "unreduced", "unsigned-bit-shift-right", "update", "update-in", + "update-proxy", "uri?", "use", "uuid?", "val", "vals", "var-get", "var-set", "var?", "vary-meta", "vec", "vector", + "vector-of", "vector?", "volatile!", "volatile?", "vreset!", "vswap!", "when", "when-first", "when-let", "when-not", + "when-some", "while", "with-bindings", "with-bindings*", "with-in-str", "with-loading-context", "with-local-vars", + "with-meta", "with-open", "with-out-str", "with-precision", "with-redefs", "with-redefs-fn", "xml-seq", "zero?", + "zipmap" + ]; + + MT("should highlight core symbols as keywords (part 1/2)", + typeTokenPairs("keyword", coreSymbols1) + ); + + MT("should highlight core symbols as keywords (part 2/2)", + typeTokenPairs("keyword", coreSymbols2) + ); + + MT("should properly indent forms in list literals", + "[bracket (][builtin foo] [atom :a] [number 1] [atom true] [atom nil][bracket )]", + "", + "[bracket (][builtin foo] [atom :a]", + " [number 1]", + " [atom true]", + " [atom nil][bracket )]", + "", + "[bracket (][builtin foo] [atom :a] [number 1]", + " [atom true]", + " [atom nil][bracket )]", + "", + "[bracket (]", + " [builtin foo]", + " [atom :a]", + " [number 1]", + " [atom true]", + " [atom nil][bracket )]", + "", + "[bracket (][builtin foo] [bracket [[][atom :a][bracket ]]]", + " [number 1]", + " [atom true]", + " [atom nil][bracket )]" + ); + + MT("should properly indent forms in vector literals", + "[bracket [[][atom :a] [number 1] [atom true] [atom nil][bracket ]]]", + "", + "[bracket [[][atom :a]", + " [number 1]", + " [atom true]", + " [atom nil][bracket ]]]", + "", + "[bracket [[][atom :a] [number 1]", + " [atom true]", + " [atom nil][bracket ]]]", + "", + "[bracket [[]", + " [variable foo]", + " [atom :a]", + " [number 1]", + " [atom true]", + " [atom nil][bracket ]]]" + ); + + MT("should properly indent forms in map literals", + "[bracket {][atom :a] [atom :a] [atom :b] [number 1] [atom :c] [atom true] [atom :d] [atom nil] [bracket }]", + "", + "[bracket {][atom :a] [atom :a]", + " [atom :b] [number 1]", + " [atom :c] [atom true]", + " [atom :d] [atom nil][bracket }]", + "", + "[bracket {][atom :a]", + " [atom :a]", + " [atom :b]", + " [number 1]", + " [atom :c]", + " [atom true]", + " [atom :d]", + " [atom nil][bracket }]", + "", + "[bracket {]", + " [atom :a] [atom :a]", + " [atom :b] [number 1]", + " [atom :c] [atom true]", + " [atom :d] [atom nil][bracket }]" + ); + + MT("should properly indent forms in set literals", + "[meta #][bracket {][atom :a] [number 1] [atom true] [atom nil] [bracket }]", + "", + "[meta #][bracket {][atom :a]", + " [number 1]", + " [atom true]", + " [atom nil][bracket }]", + "", + "[meta #][bracket {]", + " [atom :a]", + " [number 1]", + " [atom true]", + " [atom nil][bracket }]" + ); + + var haveBodyParameter = [ + "->", "->>", "as->", "binding", "bound-fn", "case", "catch", "cond", + "cond->", "cond->>", "condp", "def", "definterface", "defmethod", "defn", + "defmacro", "defprotocol", "defrecord", "defstruct", "deftype", "do", + "doseq", "dotimes", "doto", "extend", "extend-protocol", "extend-type", + "fn", "for", "future", "if", "if-let", "if-not", "if-some", "let", + "letfn", "locking", "loop", "ns", "proxy", "reify", "some->", "some->>", + "struct-map", "try", "when", "when-first", "when-let", "when-not", + "when-some", "while", "with-bindings", "with-bindings*", "with-in-str", + "with-loading-context", "with-local-vars", "with-meta", "with-open", + "with-out-str", "with-precision", "with-redefs", "with-redefs-fn"]; + + function testFormsThatHaveBodyParameter(forms) { + for (var i = 0; i < forms.length; i++) { + MT("should indent body argument of `" + forms[i] + "` by `options.indentUnit` spaces", + "[bracket (][keyword " + forms[i] + "] [variable foo] [variable bar]", + " [variable baz]", + " [variable qux][bracket )]" + ); + } + } + + testFormsThatHaveBodyParameter(haveBodyParameter); + + MT("should indent body argument of `comment` by `options.indentUnit` spaces", + "[bracket (][comment comment foo bar]", + "[comment baz]", + "[comment qux][bracket )]" + ); + + function typeTokenPairs(type, tokens) { + return "[" + type + " " + tokens.join("] [" + type + " ") + "]"; + } +})(); diff --git a/js/codemirror/mode/cmake/cmake.js b/js/codemirror/mode/cmake/cmake.js new file mode 100644 index 0000000..f08c7d7 --- /dev/null +++ b/js/codemirror/mode/cmake/cmake.js @@ -0,0 +1,97 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) + define(["../../lib/codemirror"], mod); + else + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("cmake", function () { + var variable_regex = /({)?[a-zA-Z0-9_]+(})?/; + + function tokenString(stream, state) { + var current, prev, found_var = false; + while (!stream.eol() && (current = stream.next()) != state.pending) { + if (current === '$' && prev != '\\' && state.pending == '"') { + found_var = true; + break; + } + prev = current; + } + if (found_var) { + stream.backUp(1); + } + if (current == state.pending) { + state.continueString = false; + } else { + state.continueString = true; + } + return "string"; + } + + function tokenize(stream, state) { + var ch = stream.next(); + + // Have we found a variable? + if (ch === '$') { + if (stream.match(variable_regex)) { + return 'variable-2'; + } + return 'variable'; + } + // Should we still be looking for the end of a string? + if (state.continueString) { + // If so, go through the loop again + stream.backUp(1); + return tokenString(stream, state); + } + // Do we just have a function on our hands? + // In 'cmake_minimum_required (VERSION 2.8.8)', 'cmake_minimum_required' is matched + if (stream.match(/(\s+)?\w+\(/) || stream.match(/(\s+)?\w+\ \(/)) { + stream.backUp(1); + return 'def'; + } + if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + // Have we found a string? + if (ch == "'" || ch == '"') { + // Store the type (single or double) + state.pending = ch; + // Perform the looping function to find the end + return tokenString(stream, state); + } + if (ch == '(' || ch == ')') { + return 'bracket'; + } + if (ch.match(/[0-9]/)) { + return 'number'; + } + stream.eatWhile(/[\w-]/); + return null; + } + return { + startState: function () { + var state = {}; + state.inDefinition = false; + state.inInclude = false; + state.continueString = false; + state.pending = false; + return state; + }, + token: function (stream, state) { + if (stream.eatSpace()) return null; + return tokenize(stream, state); + } + }; +}); + +CodeMirror.defineMIME("text/x-cmake", "cmake"); + +}); diff --git a/js/codemirror/mode/cmake/index.html b/js/codemirror/mode/cmake/index.html new file mode 100644 index 0000000..e8e7172 --- /dev/null +++ b/js/codemirror/mode/cmake/index.html @@ -0,0 +1,129 @@ + + +CodeMirror: CMake mode + + + + + + + + + + +
+

CMake mode

+
+ + +

MIME types defined: text/x-cmake.

+ +
diff --git a/js/codemirror/mode/cobol/cobol.js b/js/codemirror/mode/cobol/cobol.js new file mode 100644 index 0000000..3e735f0 --- /dev/null +++ b/js/codemirror/mode/cobol/cobol.js @@ -0,0 +1,255 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/** + * Author: Gautam Mehta + * Branched from CodeMirror's Scheme mode + */ +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("cobol", function () { + var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", + ATOM = "atom", NUMBER = "number", KEYWORD = "keyword", MODTAG = "header", + COBOLLINENUM = "def", PERIOD = "link"; + function makeKeywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var atoms = makeKeywords("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "); + var keywords = makeKeywords( + "ACCEPT ACCESS ACQUIRE ADD ADDRESS " + + "ADVANCING AFTER ALIAS ALL ALPHABET " + + "ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED " + + "ALSO ALTER ALTERNATE AND ANY " + + "ARE AREA AREAS ARITHMETIC ASCENDING " + + "ASSIGN AT ATTRIBUTE AUTHOR AUTO " + + "AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS " + + "B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP " + + "BEFORE BELL BINARY BIT BITS " + + "BLANK BLINK BLOCK BOOLEAN BOTTOM " + + "BY CALL CANCEL CD CF " + + "CH CHARACTER CHARACTERS CLASS CLOCK-UNITS " + + "CLOSE COBOL CODE CODE-SET COL " + + "COLLATING COLUMN COMMA COMMIT COMMITMENT " + + "COMMON COMMUNICATION COMP COMP-0 COMP-1 " + + "COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 " + + "COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 " + + "COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 " + + "COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE " + + "CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS " + + "CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS " + + "CONVERTING COPY CORR CORRESPONDING COUNT " + + "CRT CRT-UNDER CURRENCY CURRENT CURSOR " + + "DATA DATE DATE-COMPILED DATE-WRITTEN DAY " + + "DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION " + + "DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS " + + "DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE " + + "DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING " + + "DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED " + + "DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION " + + "DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 " + + "DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 " + + "DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION " + + "DOWN DROP DUPLICATE DUPLICATES DYNAMIC " + + "EBCDIC EGI EJECT ELSE EMI " + + "EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. " + + "END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY " + + "END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY " + + "END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN " + + "END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT " + + "END-UNSTRING END-WRITE END-XML ENTER ENTRY " + + "ENVIRONMENT EOP EQUAL EQUALS ERASE " + + "ERROR ESI EVALUATE EVERY EXCEEDS " + + "EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL " + + "EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL " + + "FILE-STREAM FILES FILLER FINAL FIND " + + "FINISH FIRST FOOTING FOR FOREGROUND-COLOR " + + "FOREGROUND-COLOUR FORMAT FREE FROM FULL " + + "FUNCTION GENERATE GET GIVING GLOBAL " + + "GO GOBACK GREATER GROUP HEADING " + + "HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL " + + "ID IDENTIFICATION IF IN INDEX " + + "INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 " + + "INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED " + + "INDIC INDICATE INDICATOR INDICATORS INITIAL " + + "INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT " + + "INSTALLATION INTO INVALID INVOKE IS " + + "JUST JUSTIFIED KANJI KEEP KEY " + + "LABEL LAST LD LEADING LEFT " + + "LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY " + + "LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER " + + "LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE " + + "LOCALE LOCALLY LOCK " + + "MEMBER MEMORY MERGE MESSAGE METACLASS " + + "MODE MODIFIED MODIFY MODULES MOVE " + + "MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE " + + "NEXT NO NO-ECHO NONE NOT " + + "NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER " + + "NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS " + + "OF OFF OMITTED ON ONLY " + + "OPEN OPTIONAL OR ORDER ORGANIZATION " + + "OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL " + + "PADDING PAGE PAGE-COUNTER PARSE PERFORM " + + "PF PH PIC PICTURE PLUS " + + "POINTER POSITION POSITIVE PREFIX PRESENT " + + "PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES " + + "PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID " + + "PROMPT PROTECTED PURGE QUEUE QUOTE " + + "QUOTES RANDOM RD READ READY " + + "REALM RECEIVE RECONNECT RECORD RECORD-NAME " + + "RECORDS RECURSIVE REDEFINES REEL REFERENCE " + + "REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE " + + "REMAINDER REMOVAL RENAMES REPEATED REPLACE " + + "REPLACING REPORT REPORTING REPORTS REPOSITORY " + + "REQUIRED RERUN RESERVE RESET RETAINING " + + "RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO " + + "REVERSED REWIND REWRITE RF RH " + + "RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED " + + "RUN SAME SCREEN SD SEARCH " + + "SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT " + + "SELECT SEND SENTENCE SEPARATE SEQUENCE " + + "SEQUENTIAL SET SHARED SIGN SIZE " + + "SKIP1 SKIP2 SKIP3 SORT SORT-MERGE " + + "SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL " + + "SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 " + + "START STARTING STATUS STOP STORE " + + "STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA " + + "SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS " + + "SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT " + + "TABLE TALLYING TAPE TENANT TERMINAL " + + "TERMINATE TEST TEXT THAN THEN " + + "THROUGH THRU TIME TIMES TITLE " + + "TO TOP TRAILING TRAILING-SIGN TRANSACTION " + + "TYPE TYPEDEF UNDERLINE UNEQUAL UNIT " + + "UNSTRING UNTIL UP UPDATE UPON " + + "USAGE USAGE-MODE USE USING VALID " + + "VALIDATE VALUE VALUES VARYING VLR " + + "WAIT WHEN WHEN-COMPILED WITH WITHIN " + + "WORDS WORKING-STORAGE WRITE XML XML-CODE " + + "XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL " ); + + var builtins = makeKeywords("- * ** / + < <= = > >= "); + var tests = { + digit: /\d/, + digit_or_colon: /[\d:]/, + hex: /[0-9a-f]/i, + sign: /[+-]/, + exponent: /e/i, + keyword_char: /[^\s\(\[\;\)\]]/, + symbol: /[\w*+\-]/ + }; + function isNumber(ch, stream){ + // hex + if ( ch === '0' && stream.eat(/x/i) ) { + stream.eatWhile(tests.hex); + return true; + } + // leading sign + if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) { + stream.eat(tests.sign); + ch = stream.next(); + } + if ( tests.digit.test(ch) ) { + stream.eat(ch); + stream.eatWhile(tests.digit); + if ( '.' == stream.peek()) { + stream.eat('.'); + stream.eatWhile(tests.digit); + } + if ( stream.eat(tests.exponent) ) { + stream.eat(tests.sign); + stream.eatWhile(tests.digit); + } + return true; + } + return false; + } + return { + startState: function () { + return { + indentStack: null, + indentation: 0, + mode: false + }; + }, + token: function (stream, state) { + if (state.indentStack == null && stream.sol()) { + // update indentation, but only if indentStack is empty + state.indentation = 6 ; //stream.indentation(); + } + // skip spaces + if (stream.eatSpace()) { + return null; + } + var returnType = null; + switch(state.mode){ + case "string": // multi-line string parsing mode + var next = false; + while ((next = stream.next()) != null) { + if ((next == "\"" || next == "\'") && !stream.match(/['"]/, false)) { + state.mode = false; + break; + } + } + returnType = STRING; // continue on in string mode + break; + default: // default parsing mode + var ch = stream.next(); + var col = stream.column(); + if (col >= 0 && col <= 5) { + returnType = COBOLLINENUM; + } else if (col >= 72 && col <= 79) { + stream.skipToEnd(); + returnType = MODTAG; + } else if (ch == "*" && col == 6) { // comment + stream.skipToEnd(); // rest of the line is a comment + returnType = COMMENT; + } else if (ch == "\"" || ch == "\'") { + state.mode = "string"; + returnType = STRING; + } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) { + returnType = ATOM; + } else if (ch == ".") { + returnType = PERIOD; + } else if (isNumber(ch,stream)){ + returnType = NUMBER; + } else { + if (stream.current().match(tests.symbol)) { + while (col < 71) { + if (stream.eat(tests.symbol) === undefined) { + break; + } else { + col++; + } + } + } + if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) { + returnType = KEYWORD; + } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) { + returnType = BUILTIN; + } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) { + returnType = ATOM; + } else returnType = null; + } + } + return returnType; + }, + indent: function (state) { + if (state.indentStack == null) return state.indentation; + return state.indentStack.indent; + } + }; +}); + +CodeMirror.defineMIME("text/x-cobol", "cobol"); + +}); diff --git a/js/codemirror/mode/cobol/index.html b/js/codemirror/mode/cobol/index.html new file mode 100644 index 0000000..ac1374e --- /dev/null +++ b/js/codemirror/mode/cobol/index.html @@ -0,0 +1,210 @@ + + +CodeMirror: COBOL mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

COBOL mode

+ +

Select Theme Select Font Size + + + + +

+ + +
diff --git a/js/codemirror/mode/coffeescript/coffeescript.js b/js/codemirror/mode/coffeescript/coffeescript.js new file mode 100644 index 0000000..5609872 --- /dev/null +++ b/js/codemirror/mode/coffeescript/coffeescript.js @@ -0,0 +1,359 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/** + * Link to the project's GitHub page: + * https://github.com/pickhardt/coffeescript-codemirror-mode + */ +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("coffeescript", function(conf, parserConf) { + var ERRORCLASS = "error"; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/; + var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/; + var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/; + var atProp = /^@[_A-Za-z$][_A-Za-z$0-9]*/; + + var wordOperators = wordRegexp(["and", "or", "not", + "is", "isnt", "in", + "instanceof", "typeof"]); + var indentKeywords = ["for", "while", "loop", "if", "unless", "else", + "switch", "try", "catch", "finally", "class"]; + var commonKeywords = ["break", "by", "continue", "debugger", "delete", + "do", "in", "of", "new", "return", "then", + "this", "@", "throw", "when", "until", "extends"]; + + var keywords = wordRegexp(indentKeywords.concat(commonKeywords)); + + indentKeywords = wordRegexp(indentKeywords); + + + var stringPrefixes = /^('{3}|\"{3}|['\"])/; + var regexPrefixes = /^(\/{3}|\/)/; + var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"]; + var constants = wordRegexp(commonConstants); + + // Tokenizers + function tokenBase(stream, state) { + // Handle scope changes + if (stream.sol()) { + if (state.scope.align === null) state.scope.align = false; + var scopeOffset = state.scope.offset; + if (stream.eatSpace()) { + var lineOffset = stream.indentation(); + if (lineOffset > scopeOffset && state.scope.type == "coffee") { + return "indent"; + } else if (lineOffset < scopeOffset) { + return "dedent"; + } + return null; + } else { + if (scopeOffset > 0) { + dedent(stream, state); + } + } + } + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle docco title comment (single line) + if (stream.match("####")) { + stream.skipToEnd(); + return "comment"; + } + + // Handle multi line comments + if (stream.match("###")) { + state.tokenize = longComment; + return state.tokenize(stream, state); + } + + // Single line comment + if (ch === "#") { + stream.skipToEnd(); + return "comment"; + } + + // Handle number literals + if (stream.match(/^-?[0-9\.]/, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) { + floatLiteral = true; + } + if (stream.match(/^-?\d+\.\d*/)) { + floatLiteral = true; + } + if (stream.match(/^-?\.\d+/)) { + floatLiteral = true; + } + + if (floatLiteral) { + // prevent from getting extra . on 1.. + if (stream.peek() == "."){ + stream.backUp(1); + } + return "number"; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^-?0x[0-9a-f]+/i)) { + intLiteral = true; + } + // Decimal + if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) { + intLiteral = true; + } + // Zero by itself with no other piece of number. + if (stream.match(/^-?0(?![\dx])/i)) { + intLiteral = true; + } + if (intLiteral) { + return "number"; + } + } + + // Handle strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenFactory(stream.current(), false, "string"); + return state.tokenize(stream, state); + } + // Handle regex literals + if (stream.match(regexPrefixes)) { + if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division + state.tokenize = tokenFactory(stream.current(), true, "string-2"); + return state.tokenize(stream, state); + } else { + stream.backUp(1); + } + } + + + + // Handle operators and delimiters + if (stream.match(operators) || stream.match(wordOperators)) { + return "operator"; + } + if (stream.match(delimiters)) { + return "punctuation"; + } + + if (stream.match(constants)) { + return "atom"; + } + + if (stream.match(atProp) || state.prop && stream.match(identifiers)) { + return "property"; + } + + if (stream.match(keywords)) { + return "keyword"; + } + + if (stream.match(identifiers)) { + return "variable"; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenFactory(delimiter, singleline, outclass) { + return function(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\/\\]/); + if (stream.eat("\\")) { + stream.next(); + if (singleline && stream.eol()) { + return outclass; + } + } else if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return outclass; + } else { + stream.eat(/['"\/]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) { + outclass = ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return outclass; + }; + } + + function longComment(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^#]/); + if (stream.match("###")) { + state.tokenize = tokenBase; + break; + } + stream.eatWhile("#"); + } + return "comment"; + } + + function indent(stream, state, type) { + type = type || "coffee"; + var offset = 0, align = false, alignOffset = null; + for (var scope = state.scope; scope; scope = scope.prev) { + if (scope.type === "coffee" || scope.type == "}") { + offset = scope.offset + conf.indentUnit; + break; + } + } + if (type !== "coffee") { + align = null; + alignOffset = stream.column() + stream.current().length; + } else if (state.scope.align) { + state.scope.align = false; + } + state.scope = { + offset: offset, + type: type, + prev: state.scope, + align: align, + alignOffset: alignOffset + }; + } + + function dedent(stream, state) { + if (!state.scope.prev) return; + if (state.scope.type === "coffee") { + var _indent = stream.indentation(); + var matched = false; + for (var scope = state.scope; scope; scope = scope.prev) { + if (_indent === scope.offset) { + matched = true; + break; + } + } + if (!matched) { + return true; + } + while (state.scope.prev && state.scope.offset !== _indent) { + state.scope = state.scope.prev; + } + return false; + } else { + state.scope = state.scope.prev; + return false; + } + } + + function tokenLexer(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle scope changes. + if (current === "return") { + state.dedent = true; + } + if (((current === "->" || current === "=>") && stream.eol()) + || style === "indent") { + indent(stream, state); + } + var delimiter_index = "[({".indexOf(current); + if (delimiter_index !== -1) { + indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1)); + } + if (indentKeywords.exec(current)){ + indent(stream, state); + } + if (current == "then"){ + dedent(stream, state); + } + + + if (style === "dedent") { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + delimiter_index = "])}".indexOf(current); + if (delimiter_index !== -1) { + while (state.scope.type == "coffee" && state.scope.prev) + state.scope = state.scope.prev; + if (state.scope.type == current) + state.scope = state.scope.prev; + } + if (state.dedent && stream.eol()) { + if (state.scope.type == "coffee" && state.scope.prev) + state.scope = state.scope.prev; + state.dedent = false; + } + + return style; + } + + var external = { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false}, + prop: false, + dedent: 0 + }; + }, + + token: function(stream, state) { + var fillAlign = state.scope.align === null && state.scope; + if (fillAlign && stream.sol()) fillAlign.align = false; + + var style = tokenLexer(stream, state); + if (style && style != "comment") { + if (fillAlign) fillAlign.align = true; + state.prop = style == "punctuation" && stream.current() == "." + } + + return style; + }, + + indent: function(state, text) { + if (state.tokenize != tokenBase) return 0; + var scope = state.scope; + var closer = text && "])}".indexOf(text.charAt(0)) > -1; + if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev; + var closes = closer && scope.type === text.charAt(0); + if (scope.align) + return scope.alignOffset - (closes ? 1 : 0); + else + return (closes ? scope.prev : scope).offset; + }, + + lineComment: "#", + fold: "indent" + }; + return external; +}); + +// IANA registered media type +// https://www.iana.org/assignments/media-types/ +CodeMirror.defineMIME("application/vnd.coffeescript", "coffeescript"); + +CodeMirror.defineMIME("text/x-coffeescript", "coffeescript"); +CodeMirror.defineMIME("text/coffeescript", "coffeescript"); + +}); diff --git a/js/codemirror/mode/coffeescript/index.html b/js/codemirror/mode/coffeescript/index.html new file mode 100644 index 0000000..191774a --- /dev/null +++ b/js/codemirror/mode/coffeescript/index.html @@ -0,0 +1,740 @@ + + +CodeMirror: CoffeeScript mode + + + + + + + + + +
+

CoffeeScript mode

+
+ + +

MIME types defined: application/vnd.coffeescript, text/coffeescript, text/x-coffeescript.

+ +

The CoffeeScript mode was written by Jeff Pickhardt.

+ +
diff --git a/js/codemirror/mode/commonlisp/commonlisp.js b/js/codemirror/mode/commonlisp/commonlisp.js new file mode 100644 index 0000000..c60ff6d --- /dev/null +++ b/js/codemirror/mode/commonlisp/commonlisp.js @@ -0,0 +1,125 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("commonlisp", function (config) { + var specialForm = /^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/; + var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/; + var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/; + var symbol = /[^\s'`,@()\[\]";]/; + var type; + + function readSym(stream) { + var ch; + while (ch = stream.next()) { + if (ch == "\\") stream.next(); + else if (!symbol.test(ch)) { stream.backUp(1); break; } + } + return stream.current(); + } + + function base(stream, state) { + if (stream.eatSpace()) {type = "ws"; return null;} + if (stream.match(numLiteral)) return "number"; + var ch = stream.next(); + if (ch == "\\") ch = stream.next(); + + if (ch == '"') return (state.tokenize = inString)(stream, state); + else if (ch == "(") { type = "open"; return "bracket"; } + else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; } + else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; } + else if (/['`,@]/.test(ch)) return null; + else if (ch == "|") { + if (stream.skipTo("|")) { stream.next(); return "symbol"; } + else { stream.skipToEnd(); return "error"; } + } else if (ch == "#") { + var ch = stream.next(); + if (ch == "(") { type = "open"; return "bracket"; } + else if (/[+\-=\.']/.test(ch)) return null; + else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null; + else if (ch == "|") return (state.tokenize = inComment)(stream, state); + else if (ch == ":") { readSym(stream); return "meta"; } + else if (ch == "\\") { stream.next(); readSym(stream); return "string-2" } + else return "error"; + } else { + var name = readSym(stream); + if (name == ".") return null; + type = "symbol"; + if (name == "nil" || name == "t" || name.charAt(0) == ":") return "atom"; + if (state.lastType == "open" && (specialForm.test(name) || assumeBody.test(name))) return "keyword"; + if (name.charAt(0) == "&") return "variable-2"; + return "variable"; + } + } + + function inString(stream, state) { + var escaped = false, next; + while (next = stream.next()) { + if (next == '"' && !escaped) { state.tokenize = base; break; } + escaped = !escaped && next == "\\"; + } + return "string"; + } + + function inComment(stream, state) { + var next, last; + while (next = stream.next()) { + if (next == "#" && last == "|") { state.tokenize = base; break; } + last = next; + } + type = "ws"; + return "comment"; + } + + return { + startState: function () { + return {ctx: {prev: null, start: 0, indentTo: 0}, lastType: null, tokenize: base}; + }, + + token: function (stream, state) { + if (stream.sol() && typeof state.ctx.indentTo != "number") + state.ctx.indentTo = state.ctx.start + 1; + + type = null; + var style = state.tokenize(stream, state); + if (type != "ws") { + if (state.ctx.indentTo == null) { + if (type == "symbol" && assumeBody.test(stream.current())) + state.ctx.indentTo = state.ctx.start + config.indentUnit; + else + state.ctx.indentTo = "next"; + } else if (state.ctx.indentTo == "next") { + state.ctx.indentTo = stream.column(); + } + state.lastType = type; + } + if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null}; + else if (type == "close") state.ctx = state.ctx.prev || state.ctx; + return style; + }, + + indent: function (state, _textAfter) { + var i = state.ctx.indentTo; + return typeof i == "number" ? i : state.ctx.start + 1; + }, + + closeBrackets: {pairs: "()[]{}\"\""}, + lineComment: ";;", + fold: "brace-paren", + blockCommentStart: "#|", + blockCommentEnd: "|#" + }; +}); + +CodeMirror.defineMIME("text/x-common-lisp", "commonlisp"); + +}); diff --git a/js/codemirror/mode/commonlisp/index.html b/js/codemirror/mode/commonlisp/index.html new file mode 100644 index 0000000..a39c455 --- /dev/null +++ b/js/codemirror/mode/commonlisp/index.html @@ -0,0 +1,177 @@ + + +CodeMirror: Common Lisp mode + + + + + + + + + +
+

Common Lisp mode

+
+ + +

MIME types defined: text/x-common-lisp.

+ +
diff --git a/js/codemirror/mode/crystal/crystal.js b/js/codemirror/mode/crystal/crystal.js new file mode 100644 index 0000000..73b0dbe --- /dev/null +++ b/js/codemirror/mode/crystal/crystal.js @@ -0,0 +1,433 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("crystal", function(config) { + function wordRegExp(words, end) { + return new RegExp((end ? "" : "^") + "(?:" + words.join("|") + ")" + (end ? "$" : "\\b")); + } + + function chain(tokenize, stream, state) { + state.tokenize.push(tokenize); + return tokenize(stream, state); + } + + var operators = /^(?:[-+/%|&^]|\*\*?|[<>]{2})/; + var conditionalOperators = /^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/; + var indexingOperators = /^(?:\[\][?=]?)/; + var anotherOperators = /^(?:\.(?:\.{2})?|->|[?:])/; + var idents = /^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/; + var types = /^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/; + var keywords = wordRegExp([ + "abstract", "alias", "as", "asm", "begin", "break", "case", "class", "def", "do", + "else", "elsif", "end", "ensure", "enum", "extend", "for", "fun", "if", + "include", "instance_sizeof", "lib", "macro", "module", "next", "of", "out", "pointerof", + "private", "protected", "rescue", "return", "require", "select", "sizeof", "struct", + "super", "then", "type", "typeof", "uninitialized", "union", "unless", "until", "when", "while", "with", + "yield", "__DIR__", "__END_LINE__", "__FILE__", "__LINE__" + ]); + var atomWords = wordRegExp(["true", "false", "nil", "self"]); + var indentKeywordsArray = [ + "def", "fun", "macro", + "class", "module", "struct", "lib", "enum", "union", + "do", "for" + ]; + var indentKeywords = wordRegExp(indentKeywordsArray); + var indentExpressionKeywordsArray = ["if", "unless", "case", "while", "until", "begin", "then"]; + var indentExpressionKeywords = wordRegExp(indentExpressionKeywordsArray); + var dedentKeywordsArray = ["end", "else", "elsif", "rescue", "ensure"]; + var dedentKeywords = wordRegExp(dedentKeywordsArray); + var dedentPunctualsArray = ["\\)", "\\}", "\\]"]; + var dedentPunctuals = new RegExp("^(?:" + dedentPunctualsArray.join("|") + ")$"); + var nextTokenizer = { + "def": tokenFollowIdent, "fun": tokenFollowIdent, "macro": tokenMacroDef, + "class": tokenFollowType, "module": tokenFollowType, "struct": tokenFollowType, + "lib": tokenFollowType, "enum": tokenFollowType, "union": tokenFollowType + }; + var matching = {"[": "]", "{": "}", "(": ")", "<": ">"}; + + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return null; + } + + // Macros + if (state.lastToken != "\\" && stream.match("{%", false)) { + return chain(tokenMacro("%", "%"), stream, state); + } + + if (state.lastToken != "\\" && stream.match("{{", false)) { + return chain(tokenMacro("{", "}"), stream, state); + } + + // Comments + if (stream.peek() == "#") { + stream.skipToEnd(); + return "comment"; + } + + // Variables and keywords + var matched; + if (stream.match(idents)) { + stream.eat(/[?!]/); + + matched = stream.current(); + if (stream.eat(":")) { + return "atom"; + } else if (state.lastToken == ".") { + return "property"; + } else if (keywords.test(matched)) { + if (indentKeywords.test(matched)) { + if (!(matched == "fun" && state.blocks.indexOf("lib") >= 0) && !(matched == "def" && state.lastToken == "abstract")) { + state.blocks.push(matched); + state.currentIndent += 1; + } + } else if ((state.lastStyle == "operator" || !state.lastStyle) && indentExpressionKeywords.test(matched)) { + state.blocks.push(matched); + state.currentIndent += 1; + } else if (matched == "end") { + state.blocks.pop(); + state.currentIndent -= 1; + } + + if (nextTokenizer.hasOwnProperty(matched)) { + state.tokenize.push(nextTokenizer[matched]); + } + + return "keyword"; + } else if (atomWords.test(matched)) { + return "atom"; + } + + return "variable"; + } + + // Class variables and instance variables + // or attributes + if (stream.eat("@")) { + if (stream.peek() == "[") { + return chain(tokenNest("[", "]", "meta"), stream, state); + } + + stream.eat("@"); + stream.match(idents) || stream.match(types); + return "variable-2"; + } + + // Constants and types + if (stream.match(types)) { + return "tag"; + } + + // Symbols or ':' operator + if (stream.eat(":")) { + if (stream.eat("\"")) { + return chain(tokenQuote("\"", "atom", false), stream, state); + } else if (stream.match(idents) || stream.match(types) || + stream.match(operators) || stream.match(conditionalOperators) || stream.match(indexingOperators)) { + return "atom"; + } + stream.eat(":"); + return "operator"; + } + + // Strings + if (stream.eat("\"")) { + return chain(tokenQuote("\"", "string", true), stream, state); + } + + // Strings or regexps or macro variables or '%' operator + if (stream.peek() == "%") { + var style = "string"; + var embed = true; + var delim; + + if (stream.match("%r")) { + // Regexps + style = "string-2"; + delim = stream.next(); + } else if (stream.match("%w")) { + embed = false; + delim = stream.next(); + } else if (stream.match("%q")) { + embed = false; + delim = stream.next(); + } else { + if(delim = stream.match(/^%([^\w\s=])/)) { + delim = delim[1]; + } else if (stream.match(/^%[a-zA-Z_\u009F-\uFFFF][\w\u009F-\uFFFF]*/)) { + // Macro variables + return "meta"; + } else if (stream.eat('%')) { + // '%' operator + return "operator"; + } + } + + if (matching.hasOwnProperty(delim)) { + delim = matching[delim]; + } + return chain(tokenQuote(delim, style, embed), stream, state); + } + + // Here Docs + if (matched = stream.match(/^<<-('?)([A-Z]\w*)\1/)) { + return chain(tokenHereDoc(matched[2], !matched[1]), stream, state) + } + + // Characters + if (stream.eat("'")) { + stream.match(/^(?:[^']|\\(?:[befnrtv0'"]|[0-7]{3}|u(?:[0-9a-fA-F]{4}|\{[0-9a-fA-F]{1,6}\})))/); + stream.eat("'"); + return "atom"; + } + + // Numbers + if (stream.eat("0")) { + if (stream.eat("x")) { + stream.match(/^[0-9a-fA-F_]+/); + } else if (stream.eat("o")) { + stream.match(/^[0-7_]+/); + } else if (stream.eat("b")) { + stream.match(/^[01_]+/); + } + return "number"; + } + + if (stream.eat(/^\d/)) { + stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/); + return "number"; + } + + // Operators + if (stream.match(operators)) { + stream.eat("="); // Operators can follow assign symbol. + return "operator"; + } + + if (stream.match(conditionalOperators) || stream.match(anotherOperators)) { + return "operator"; + } + + // Parens and braces + if (matched = stream.match(/[({[]/, false)) { + matched = matched[0]; + return chain(tokenNest(matched, matching[matched], null), stream, state); + } + + // Escapes + if (stream.eat("\\")) { + stream.next(); + return "meta"; + } + + stream.next(); + return null; + } + + function tokenNest(begin, end, style, started) { + return function (stream, state) { + if (!started && stream.match(begin)) { + state.tokenize[state.tokenize.length - 1] = tokenNest(begin, end, style, true); + state.currentIndent += 1; + return style; + } + + var nextStyle = tokenBase(stream, state); + if (stream.current() === end) { + state.tokenize.pop(); + state.currentIndent -= 1; + nextStyle = style; + } + + return nextStyle; + }; + } + + function tokenMacro(begin, end, started) { + return function (stream, state) { + if (!started && stream.match("{" + begin)) { + state.currentIndent += 1; + state.tokenize[state.tokenize.length - 1] = tokenMacro(begin, end, true); + return "meta"; + } + + if (stream.match(end + "}")) { + state.currentIndent -= 1; + state.tokenize.pop(); + return "meta"; + } + + return tokenBase(stream, state); + }; + } + + function tokenMacroDef(stream, state) { + if (stream.eatSpace()) { + return null; + } + + var matched; + if (matched = stream.match(idents)) { + if (matched == "def") { + return "keyword"; + } + stream.eat(/[?!]/); + } + + state.tokenize.pop(); + return "def"; + } + + function tokenFollowIdent(stream, state) { + if (stream.eatSpace()) { + return null; + } + + if (stream.match(idents)) { + stream.eat(/[!?]/); + } else { + stream.match(operators) || stream.match(conditionalOperators) || stream.match(indexingOperators); + } + state.tokenize.pop(); + return "def"; + } + + function tokenFollowType(stream, state) { + if (stream.eatSpace()) { + return null; + } + + stream.match(types); + state.tokenize.pop(); + return "def"; + } + + function tokenQuote(end, style, embed) { + return function (stream, state) { + var escaped = false; + + while (stream.peek()) { + if (!escaped) { + if (stream.match("{%", false)) { + state.tokenize.push(tokenMacro("%", "%")); + return style; + } + + if (stream.match("{{", false)) { + state.tokenize.push(tokenMacro("{", "}")); + return style; + } + + if (embed && stream.match("#{", false)) { + state.tokenize.push(tokenNest("#{", "}", "meta")); + return style; + } + + var ch = stream.next(); + + if (ch == end) { + state.tokenize.pop(); + return style; + } + + escaped = embed && ch == "\\"; + } else { + stream.next(); + escaped = false; + } + } + + return style; + }; + } + + function tokenHereDoc(phrase, embed) { + return function (stream, state) { + if (stream.sol()) { + stream.eatSpace() + if (stream.match(phrase)) { + state.tokenize.pop(); + return "string"; + } + } + + var escaped = false; + while (stream.peek()) { + if (!escaped) { + if (stream.match("{%", false)) { + state.tokenize.push(tokenMacro("%", "%")); + return "string"; + } + + if (stream.match("{{", false)) { + state.tokenize.push(tokenMacro("{", "}")); + return "string"; + } + + if (embed && stream.match("#{", false)) { + state.tokenize.push(tokenNest("#{", "}", "meta")); + return "string"; + } + + escaped = embed && stream.next() == "\\"; + } else { + stream.next(); + escaped = false; + } + } + + return "string"; + } + } + + return { + startState: function () { + return { + tokenize: [tokenBase], + currentIndent: 0, + lastToken: null, + lastStyle: null, + blocks: [] + }; + }, + + token: function (stream, state) { + var style = state.tokenize[state.tokenize.length - 1](stream, state); + var token = stream.current(); + + if (style && style != "comment") { + state.lastToken = token; + state.lastStyle = style; + } + + return style; + }, + + indent: function (state, textAfter) { + textAfter = textAfter.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g, ""); + + if (dedentKeywords.test(textAfter) || dedentPunctuals.test(textAfter)) { + return config.indentUnit * (state.currentIndent - 1); + } + + return config.indentUnit * state.currentIndent; + }, + + fold: "indent", + electricInput: wordRegExp(dedentPunctualsArray.concat(dedentKeywordsArray), true), + lineComment: '#' + }; + }); + + CodeMirror.defineMIME("text/x-crystal", "crystal"); +}); diff --git a/js/codemirror/mode/crystal/index.html b/js/codemirror/mode/crystal/index.html new file mode 100644 index 0000000..dfffab4 --- /dev/null +++ b/js/codemirror/mode/crystal/index.html @@ -0,0 +1,116 @@ + + +CodeMirror: Crystal mode + + + + + + + + + + + +
+

Crystal mode

+
+ + +

MIME types defined: text/x-crystal.

+
diff --git a/js/codemirror/mode/css/css.js b/js/codemirror/mode/css/css.js new file mode 100644 index 0000000..b0721b4 --- /dev/null +++ b/js/codemirror/mode/css/css.js @@ -0,0 +1,862 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("css", function(config, parserConfig) { + var inline = parserConfig.inline + if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css"); + + var indentUnit = config.indentUnit, + tokenHooks = parserConfig.tokenHooks, + documentTypes = parserConfig.documentTypes || {}, + mediaTypes = parserConfig.mediaTypes || {}, + mediaFeatures = parserConfig.mediaFeatures || {}, + mediaValueKeywords = parserConfig.mediaValueKeywords || {}, + propertyKeywords = parserConfig.propertyKeywords || {}, + nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {}, + fontProperties = parserConfig.fontProperties || {}, + counterDescriptors = parserConfig.counterDescriptors || {}, + colorKeywords = parserConfig.colorKeywords || {}, + valueKeywords = parserConfig.valueKeywords || {}, + allowNested = parserConfig.allowNested, + lineComment = parserConfig.lineComment, + supportsAtComponent = parserConfig.supportsAtComponent === true, + highlightNonStandardPropertyKeywords = config.highlightNonStandardPropertyKeywords !== false; + + var type, override; + function ret(style, tp) { type = tp; return style; } + + // Tokenizers + + function tokenBase(stream, state) { + var ch = stream.next(); + if (tokenHooks[ch]) { + var result = tokenHooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == "@") { + stream.eatWhile(/[\w\\\-]/); + return ret("def", stream.current()); + } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) { + return ret(null, "compare"); + } else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (ch == "#") { + stream.eatWhile(/[\w\\\-]/); + return ret("atom", "hash"); + } else if (ch == "!") { + stream.match(/^\s*\w*/); + return ret("keyword", "important"); + } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } else if (ch === "-") { + if (/[\d.]/.test(stream.peek())) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } else if (stream.match(/^-[\w\\\-]*/)) { + stream.eatWhile(/[\w\\\-]/); + if (stream.match(/^\s*:/, false)) + return ret("variable-2", "variable-definition"); + return ret("variable-2", "variable"); + } else if (stream.match(/^\w+-/)) { + return ret("meta", "meta"); + } + } else if (/[,+>*\/]/.test(ch)) { + return ret(null, "select-op"); + } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) { + return ret("qualifier", "qualifier"); + } else if (/[:;{}\[\]\(\)]/.test(ch)) { + return ret(null, ch); + } else if (stream.match(/^[\w-.]+(?=\()/)) { + if (/^(url(-prefix)?|domain|regexp)$/i.test(stream.current())) { + state.tokenize = tokenParenthesized; + } + return ret("variable callee", "variable"); + } else if (/[\w\\\-]/.test(ch)) { + stream.eatWhile(/[\w\\\-]/); + return ret("property", "word"); + } else { + return ret(null, null); + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + if (quote == ")") stream.backUp(1); + break; + } + escaped = !escaped && ch == "\\"; + } + if (ch == quote || !escaped && quote != ")") state.tokenize = null; + return ret("string", "string"); + }; + } + + function tokenParenthesized(stream, state) { + stream.next(); // Must be '(' + if (!stream.match(/^\s*[\"\')]/, false)) + state.tokenize = tokenString(")"); + else + state.tokenize = null; + return ret(null, "("); + } + + // Context management + + function Context(type, indent, prev) { + this.type = type; + this.indent = indent; + this.prev = prev; + } + + function pushContext(state, stream, type, indent) { + state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context); + return type; + } + + function popContext(state) { + if (state.context.prev) + state.context = state.context.prev; + return state.context.type; + } + + function pass(type, stream, state) { + return states[state.context.type](type, stream, state); + } + function popAndPass(type, stream, state, n) { + for (var i = n || 1; i > 0; i--) + state.context = state.context.prev; + return pass(type, stream, state); + } + + // Parser + + function wordAsValue(stream) { + var word = stream.current().toLowerCase(); + if (valueKeywords.hasOwnProperty(word)) + override = "atom"; + else if (colorKeywords.hasOwnProperty(word)) + override = "keyword"; + else + override = "variable"; + } + + var states = {}; + + states.top = function(type, stream, state) { + if (type == "{") { + return pushContext(state, stream, "block"); + } else if (type == "}" && state.context.prev) { + return popContext(state); + } else if (supportsAtComponent && /@component/i.test(type)) { + return pushContext(state, stream, "atComponentBlock"); + } else if (/^@(-moz-)?document$/i.test(type)) { + return pushContext(state, stream, "documentTypes"); + } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) { + return pushContext(state, stream, "atBlock"); + } else if (/^@(font-face|counter-style)/i.test(type)) { + state.stateArg = type; + return "restricted_atBlock_before"; + } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) { + return "keyframes"; + } else if (type && type.charAt(0) == "@") { + return pushContext(state, stream, "at"); + } else if (type == "hash") { + override = "builtin"; + } else if (type == "word") { + override = "tag"; + } else if (type == "variable-definition") { + return "maybeprop"; + } else if (type == "interpolation") { + return pushContext(state, stream, "interpolation"); + } else if (type == ":") { + return "pseudo"; + } else if (allowNested && type == "(") { + return pushContext(state, stream, "parens"); + } + return state.context.type; + }; + + states.block = function(type, stream, state) { + if (type == "word") { + var word = stream.current().toLowerCase(); + if (propertyKeywords.hasOwnProperty(word)) { + override = "property"; + return "maybeprop"; + } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) { + override = highlightNonStandardPropertyKeywords ? "string-2" : "property"; + return "maybeprop"; + } else if (allowNested) { + override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag"; + return "block"; + } else { + override += " error"; + return "maybeprop"; + } + } else if (type == "meta") { + return "block"; + } else if (!allowNested && (type == "hash" || type == "qualifier")) { + override = "error"; + return "block"; + } else { + return states.top(type, stream, state); + } + }; + + states.maybeprop = function(type, stream, state) { + if (type == ":") return pushContext(state, stream, "prop"); + return pass(type, stream, state); + }; + + states.prop = function(type, stream, state) { + if (type == ";") return popContext(state); + if (type == "{" && allowNested) return pushContext(state, stream, "propBlock"); + if (type == "}" || type == "{") return popAndPass(type, stream, state); + if (type == "(") return pushContext(state, stream, "parens"); + + if (type == "hash" && !/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(stream.current())) { + override += " error"; + } else if (type == "word") { + wordAsValue(stream); + } else if (type == "interpolation") { + return pushContext(state, stream, "interpolation"); + } + return "prop"; + }; + + states.propBlock = function(type, _stream, state) { + if (type == "}") return popContext(state); + if (type == "word") { override = "property"; return "maybeprop"; } + return state.context.type; + }; + + states.parens = function(type, stream, state) { + if (type == "{" || type == "}") return popAndPass(type, stream, state); + if (type == ")") return popContext(state); + if (type == "(") return pushContext(state, stream, "parens"); + if (type == "interpolation") return pushContext(state, stream, "interpolation"); + if (type == "word") wordAsValue(stream); + return "parens"; + }; + + states.pseudo = function(type, stream, state) { + if (type == "meta") return "pseudo"; + + if (type == "word") { + override = "variable-3"; + return state.context.type; + } + return pass(type, stream, state); + }; + + states.documentTypes = function(type, stream, state) { + if (type == "word" && documentTypes.hasOwnProperty(stream.current())) { + override = "tag"; + return state.context.type; + } else { + return states.atBlock(type, stream, state); + } + }; + + states.atBlock = function(type, stream, state) { + if (type == "(") return pushContext(state, stream, "atBlock_parens"); + if (type == "}" || type == ";") return popAndPass(type, stream, state); + if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top"); + + if (type == "interpolation") return pushContext(state, stream, "interpolation"); + + if (type == "word") { + var word = stream.current().toLowerCase(); + if (word == "only" || word == "not" || word == "and" || word == "or") + override = "keyword"; + else if (mediaTypes.hasOwnProperty(word)) + override = "attribute"; + else if (mediaFeatures.hasOwnProperty(word)) + override = "property"; + else if (mediaValueKeywords.hasOwnProperty(word)) + override = "keyword"; + else if (propertyKeywords.hasOwnProperty(word)) + override = "property"; + else if (nonStandardPropertyKeywords.hasOwnProperty(word)) + override = highlightNonStandardPropertyKeywords ? "string-2" : "property"; + else if (valueKeywords.hasOwnProperty(word)) + override = "atom"; + else if (colorKeywords.hasOwnProperty(word)) + override = "keyword"; + else + override = "error"; + } + return state.context.type; + }; + + states.atComponentBlock = function(type, stream, state) { + if (type == "}") + return popAndPass(type, stream, state); + if (type == "{") + return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false); + if (type == "word") + override = "error"; + return state.context.type; + }; + + states.atBlock_parens = function(type, stream, state) { + if (type == ")") return popContext(state); + if (type == "{" || type == "}") return popAndPass(type, stream, state, 2); + return states.atBlock(type, stream, state); + }; + + states.restricted_atBlock_before = function(type, stream, state) { + if (type == "{") + return pushContext(state, stream, "restricted_atBlock"); + if (type == "word" && state.stateArg == "@counter-style") { + override = "variable"; + return "restricted_atBlock_before"; + } + return pass(type, stream, state); + }; + + states.restricted_atBlock = function(type, stream, state) { + if (type == "}") { + state.stateArg = null; + return popContext(state); + } + if (type == "word") { + if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) || + (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase()))) + override = "error"; + else + override = "property"; + return "maybeprop"; + } + return "restricted_atBlock"; + }; + + states.keyframes = function(type, stream, state) { + if (type == "word") { override = "variable"; return "keyframes"; } + if (type == "{") return pushContext(state, stream, "top"); + return pass(type, stream, state); + }; + + states.at = function(type, stream, state) { + if (type == ";") return popContext(state); + if (type == "{" || type == "}") return popAndPass(type, stream, state); + if (type == "word") override = "tag"; + else if (type == "hash") override = "builtin"; + return "at"; + }; + + states.interpolation = function(type, stream, state) { + if (type == "}") return popContext(state); + if (type == "{" || type == ";") return popAndPass(type, stream, state); + if (type == "word") override = "variable"; + else if (type != "variable" && type != "(" && type != ")") override = "error"; + return "interpolation"; + }; + + return { + startState: function(base) { + return {tokenize: null, + state: inline ? "block" : "top", + stateArg: null, + context: new Context(inline ? "block" : "top", base || 0, null)}; + }, + + token: function(stream, state) { + if (!state.tokenize && stream.eatSpace()) return null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style && typeof style == "object") { + type = style[1]; + style = style[0]; + } + override = style; + if (type != "comment") + state.state = states[state.state](type, stream, state); + return override; + }, + + indent: function(state, textAfter) { + var cx = state.context, ch = textAfter && textAfter.charAt(0); + var indent = cx.indent; + if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev; + if (cx.prev) { + if (ch == "}" && (cx.type == "block" || cx.type == "top" || + cx.type == "interpolation" || cx.type == "restricted_atBlock")) { + // Resume indentation from parent context. + cx = cx.prev; + indent = cx.indent; + } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") || + ch == "{" && (cx.type == "at" || cx.type == "atBlock")) { + // Dedent relative to current context. + indent = Math.max(0, cx.indent - indentUnit); + } + } + return indent; + }, + + electricChars: "}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + blockCommentContinue: " * ", + lineComment: lineComment, + fold: "brace" + }; +}); + + function keySet(array) { + var keys = {}; + for (var i = 0; i < array.length; ++i) { + keys[array[i].toLowerCase()] = true; + } + return keys; + } + + var documentTypes_ = [ + "domain", "regexp", "url", "url-prefix" + ], documentTypes = keySet(documentTypes_); + + var mediaTypes_ = [ + "all", "aural", "braille", "handheld", "print", "projection", "screen", + "tty", "tv", "embossed" + ], mediaTypes = keySet(mediaTypes_); + + var mediaFeatures_ = [ + "width", "min-width", "max-width", "height", "min-height", "max-height", + "device-width", "min-device-width", "max-device-width", "device-height", + "min-device-height", "max-device-height", "aspect-ratio", + "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio", + "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color", + "max-color", "color-index", "min-color-index", "max-color-index", + "monochrome", "min-monochrome", "max-monochrome", "resolution", + "min-resolution", "max-resolution", "scan", "grid", "orientation", + "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio", + "pointer", "any-pointer", "hover", "any-hover", "prefers-color-scheme", + "dynamic-range", "video-dynamic-range" + ], mediaFeatures = keySet(mediaFeatures_); + + var mediaValueKeywords_ = [ + "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover", + "interlace", "progressive", + "dark", "light", + "standard", "high" + ], mediaValueKeywords = keySet(mediaValueKeywords_); + + var propertyKeywords_ = [ + "align-content", "align-items", "align-self", "alignment-adjust", + "alignment-baseline", "all", "anchor-point", "animation", "animation-delay", + "animation-direction", "animation-duration", "animation-fill-mode", + "animation-iteration-count", "animation-name", "animation-play-state", + "animation-timing-function", "appearance", "azimuth", "backdrop-filter", + "backface-visibility", "background", "background-attachment", + "background-blend-mode", "background-clip", "background-color", + "background-image", "background-origin", "background-position", + "background-position-x", "background-position-y", "background-repeat", + "background-size", "baseline-shift", "binding", "bleed", "block-size", + "bookmark-label", "bookmark-level", "bookmark-state", "bookmark-target", + "border", "border-bottom", "border-bottom-color", "border-bottom-left-radius", + "border-bottom-right-radius", "border-bottom-style", "border-bottom-width", + "border-collapse", "border-color", "border-image", "border-image-outset", + "border-image-repeat", "border-image-slice", "border-image-source", + "border-image-width", "border-left", "border-left-color", "border-left-style", + "border-left-width", "border-radius", "border-right", "border-right-color", + "border-right-style", "border-right-width", "border-spacing", "border-style", + "border-top", "border-top-color", "border-top-left-radius", + "border-top-right-radius", "border-top-style", "border-top-width", + "border-width", "bottom", "box-decoration-break", "box-shadow", "box-sizing", + "break-after", "break-before", "break-inside", "caption-side", "caret-color", + "clear", "clip", "color", "color-profile", "column-count", "column-fill", + "column-gap", "column-rule", "column-rule-color", "column-rule-style", + "column-rule-width", "column-span", "column-width", "columns", "contain", + "content", "counter-increment", "counter-reset", "crop", "cue", "cue-after", + "cue-before", "cursor", "direction", "display", "dominant-baseline", + "drop-initial-after-adjust", "drop-initial-after-align", + "drop-initial-before-adjust", "drop-initial-before-align", "drop-initial-size", + "drop-initial-value", "elevation", "empty-cells", "fit", "fit-content", "fit-position", + "flex", "flex-basis", "flex-direction", "flex-flow", "flex-grow", + "flex-shrink", "flex-wrap", "float", "float-offset", "flow-from", "flow-into", + "font", "font-family", "font-feature-settings", "font-kerning", + "font-language-override", "font-optical-sizing", "font-size", + "font-size-adjust", "font-stretch", "font-style", "font-synthesis", + "font-variant", "font-variant-alternates", "font-variant-caps", + "font-variant-east-asian", "font-variant-ligatures", "font-variant-numeric", + "font-variant-position", "font-variation-settings", "font-weight", "gap", + "grid", "grid-area", "grid-auto-columns", "grid-auto-flow", "grid-auto-rows", + "grid-column", "grid-column-end", "grid-column-gap", "grid-column-start", + "grid-gap", "grid-row", "grid-row-end", "grid-row-gap", "grid-row-start", + "grid-template", "grid-template-areas", "grid-template-columns", + "grid-template-rows", "hanging-punctuation", "height", "hyphens", "icon", + "image-orientation", "image-rendering", "image-resolution", "inline-box-align", + "inset", "inset-block", "inset-block-end", "inset-block-start", "inset-inline", + "inset-inline-end", "inset-inline-start", "isolation", "justify-content", + "justify-items", "justify-self", "left", "letter-spacing", "line-break", + "line-height", "line-height-step", "line-stacking", "line-stacking-ruby", + "line-stacking-shift", "line-stacking-strategy", "list-style", + "list-style-image", "list-style-position", "list-style-type", "margin", + "margin-bottom", "margin-left", "margin-right", "margin-top", "marks", + "marquee-direction", "marquee-loop", "marquee-play-count", "marquee-speed", + "marquee-style", "mask-clip", "mask-composite", "mask-image", "mask-mode", + "mask-origin", "mask-position", "mask-repeat", "mask-size","mask-type", + "max-block-size", "max-height", "max-inline-size", + "max-width", "min-block-size", "min-height", "min-inline-size", "min-width", + "mix-blend-mode", "move-to", "nav-down", "nav-index", "nav-left", "nav-right", + "nav-up", "object-fit", "object-position", "offset", "offset-anchor", + "offset-distance", "offset-path", "offset-position", "offset-rotate", + "opacity", "order", "orphans", "outline", "outline-color", "outline-offset", + "outline-style", "outline-width", "overflow", "overflow-style", + "overflow-wrap", "overflow-x", "overflow-y", "padding", "padding-bottom", + "padding-left", "padding-right", "padding-top", "page", "page-break-after", + "page-break-before", "page-break-inside", "page-policy", "pause", + "pause-after", "pause-before", "perspective", "perspective-origin", "pitch", + "pitch-range", "place-content", "place-items", "place-self", "play-during", + "position", "presentation-level", "punctuation-trim", "quotes", + "region-break-after", "region-break-before", "region-break-inside", + "region-fragment", "rendering-intent", "resize", "rest", "rest-after", + "rest-before", "richness", "right", "rotate", "rotation", "rotation-point", + "row-gap", "ruby-align", "ruby-overhang", "ruby-position", "ruby-span", + "scale", "scroll-behavior", "scroll-margin", "scroll-margin-block", + "scroll-margin-block-end", "scroll-margin-block-start", "scroll-margin-bottom", + "scroll-margin-inline", "scroll-margin-inline-end", + "scroll-margin-inline-start", "scroll-margin-left", "scroll-margin-right", + "scroll-margin-top", "scroll-padding", "scroll-padding-block", + "scroll-padding-block-end", "scroll-padding-block-start", + "scroll-padding-bottom", "scroll-padding-inline", "scroll-padding-inline-end", + "scroll-padding-inline-start", "scroll-padding-left", "scroll-padding-right", + "scroll-padding-top", "scroll-snap-align", "scroll-snap-type", + "shape-image-threshold", "shape-inside", "shape-margin", "shape-outside", + "size", "speak", "speak-as", "speak-header", "speak-numeral", + "speak-punctuation", "speech-rate", "stress", "string-set", "tab-size", + "table-layout", "target", "target-name", "target-new", "target-position", + "text-align", "text-align-last", "text-combine-upright", "text-decoration", + "text-decoration-color", "text-decoration-line", "text-decoration-skip", + "text-decoration-skip-ink", "text-decoration-style", "text-emphasis", + "text-emphasis-color", "text-emphasis-position", "text-emphasis-style", + "text-height", "text-indent", "text-justify", "text-orientation", + "text-outline", "text-overflow", "text-rendering", "text-shadow", + "text-size-adjust", "text-space-collapse", "text-transform", + "text-underline-position", "text-wrap", "top", "touch-action", "transform", "transform-origin", + "transform-style", "transition", "transition-delay", "transition-duration", + "transition-property", "transition-timing-function", "translate", + "unicode-bidi", "user-select", "vertical-align", "visibility", "voice-balance", + "voice-duration", "voice-family", "voice-pitch", "voice-range", "voice-rate", + "voice-stress", "voice-volume", "volume", "white-space", "widows", "width", + "will-change", "word-break", "word-spacing", "word-wrap", "writing-mode", "z-index", + // SVG-specific + "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color", + "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events", + "color-interpolation", "color-interpolation-filters", + "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering", + "marker", "marker-end", "marker-mid", "marker-start", "paint-order", "shape-rendering", "stroke", + "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", + "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering", + "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal", + "glyph-orientation-vertical", "text-anchor", "writing-mode", + ], propertyKeywords = keySet(propertyKeywords_); + + var nonStandardPropertyKeywords_ = [ + "accent-color", "aspect-ratio", "border-block", "border-block-color", "border-block-end", + "border-block-end-color", "border-block-end-style", "border-block-end-width", + "border-block-start", "border-block-start-color", "border-block-start-style", + "border-block-start-width", "border-block-style", "border-block-width", + "border-inline", "border-inline-color", "border-inline-end", + "border-inline-end-color", "border-inline-end-style", + "border-inline-end-width", "border-inline-start", "border-inline-start-color", + "border-inline-start-style", "border-inline-start-width", + "border-inline-style", "border-inline-width", "content-visibility", "margin-block", + "margin-block-end", "margin-block-start", "margin-inline", "margin-inline-end", + "margin-inline-start", "overflow-anchor", "overscroll-behavior", "padding-block", "padding-block-end", + "padding-block-start", "padding-inline", "padding-inline-end", + "padding-inline-start", "scroll-snap-stop", "scrollbar-3d-light-color", + "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color", + "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color", + "scrollbar-track-color", "searchfield-cancel-button", "searchfield-decoration", + "searchfield-results-button", "searchfield-results-decoration", "shape-inside", "zoom" + ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_); + + var fontProperties_ = [ + "font-display", "font-family", "src", "unicode-range", "font-variant", + "font-feature-settings", "font-stretch", "font-weight", "font-style" + ], fontProperties = keySet(fontProperties_); + + var counterDescriptors_ = [ + "additive-symbols", "fallback", "negative", "pad", "prefix", "range", + "speak-as", "suffix", "symbols", "system" + ], counterDescriptors = keySet(counterDescriptors_); + + var colorKeywords_ = [ + "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", + "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", + "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", + "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", + "darkgray", "darkgreen", "darkgrey", "darkkhaki", "darkmagenta", "darkolivegreen", + "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", + "darkslateblue", "darkslategray", "darkslategrey", "darkturquoise", "darkviolet", + "deeppink", "deepskyblue", "dimgray", "dimgrey", "dodgerblue", "firebrick", + "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", + "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", + "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", + "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", + "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightgrey", "lightpink", + "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", "lightslategrey", + "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", + "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", + "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", + "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", + "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", + "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", + "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", + "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown", + "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", + "slateblue", "slategray", "slategrey", "snow", "springgreen", "steelblue", "tan", + "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", + "whitesmoke", "yellow", "yellowgreen" + ], colorKeywords = keySet(colorKeywords_); + + var valueKeywords_ = [ + "above", "absolute", "activeborder", "additive", "activecaption", "afar", + "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate", + "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", + "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page", + "avoid-region", "axis-pan", "background", "backwards", "baseline", "below", "bidi-override", "binary", + "bengali", "blink", "block", "block-axis", "blur", "bold", "bolder", "border", "border-box", + "both", "bottom", "break", "break-all", "break-word", "brightness", "bullets", "button", + "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian", + "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", + "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch", + "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote", + "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse", + "compact", "condensed", "conic-gradient", "contain", "content", "contents", + "content-box", "context-menu", "continuous", "contrast", "copy", "counter", "counters", "cover", "crop", + "cross", "crosshair", "cubic-bezier", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal", + "decimal-leading-zero", "default", "default-button", "dense", "destination-atop", + "destination-in", "destination-out", "destination-over", "devanagari", "difference", + "disc", "discard", "disclosure-closed", "disclosure-open", "document", + "dot-dash", "dot-dot-dash", + "dotted", "double", "down", "drop-shadow", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", + "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", + "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er", + "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", + "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et", + "ethiopic-halehame-gez", "ethiopic-halehame-om-et", + "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", + "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig", + "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed", + "extra-expanded", "fantasy", "fast", "fill", "fill-box", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes", + "forwards", "from", "geometricPrecision", "georgian", "grayscale", "graytext", "grid", "groove", + "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew", + "help", "hidden", "hide", "higher", "highlight", "highlighttext", + "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "hue-rotate", "icon", "ignore", + "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", + "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", + "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert", + "italic", "japanese-formal", "japanese-informal", "justify", "kannada", + "katakana", "katakana-iroha", "keep-all", "khmer", + "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal", + "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten", + "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem", + "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", + "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian", + "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "manipulation", "match", "matrix", "matrix3d", + "media-play-button", "media-slider", "media-sliderthumb", + "media-volume-slider", "media-volume-sliderthumb", "medium", + "menu", "menulist", "menulist-button", + "menutext", "message-box", "middle", "min-intrinsic", + "mix", "mongolian", "monospace", "move", "multiple", "multiple_mask_images", "multiply", "myanmar", "n-resize", + "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", + "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", + "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote", + "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset", + "outside", "outside-shape", "overlay", "overline", "padding", "padding-box", + "painted", "page", "paused", "persian", "perspective", "pinch-zoom", "plus-darker", "plus-lighter", + "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", + "progress", "push-button", "radial-gradient", "radio", "read-only", + "read-write", "read-write-plaintext-only", "rectangle", "region", + "relative", "repeat", "repeating-linear-gradient", "repeating-radial-gradient", + "repeating-conic-gradient", "repeat-x", "repeat-y", "reset", "reverse", + "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY", + "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running", + "s-resize", "sans-serif", "saturate", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen", + "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield", + "searchfield-cancel-button", "searchfield-decoration", + "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end", + "semi-condensed", "semi-expanded", "separate", "sepia", "serif", "show", "sidama", + "simp-chinese-formal", "simp-chinese-informal", "single", + "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal", + "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", + "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali", + "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square", + "square-button", "start", "static", "status-bar", "stretch", "stroke", "stroke-box", "sub", + "subpixel-antialiased", "svg_masks", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table", + "table-caption", "table-cell", "table-column", "table-column-group", + "table-footer-group", "table-header-group", "table-row", "table-row-group", + "tamil", + "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", + "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", + "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", + "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top", + "trad-chinese-formal", "trad-chinese-informal", "transform", + "translate", "translate3d", "translateX", "translateY", "translateZ", + "transparent", "ultra-condensed", "ultra-expanded", "underline", "unidirectional-pan", "unset", "up", + "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal", + "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", + "var", "vertical", "vertical-text", "view-box", "visible", "visibleFill", "visiblePainted", + "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", + "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor", + "xx-large", "xx-small" + ], valueKeywords = keySet(valueKeywords_); + + var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_) + .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_) + .concat(valueKeywords_); + CodeMirror.registerHelper("hintWords", "css", allWords); + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return ["comment", "comment"]; + } + + CodeMirror.defineMIME("text/css", { + documentTypes: documentTypes, + mediaTypes: mediaTypes, + mediaFeatures: mediaFeatures, + mediaValueKeywords: mediaValueKeywords, + propertyKeywords: propertyKeywords, + nonStandardPropertyKeywords: nonStandardPropertyKeywords, + fontProperties: fontProperties, + counterDescriptors: counterDescriptors, + colorKeywords: colorKeywords, + valueKeywords: valueKeywords, + tokenHooks: { + "/": function(stream, state) { + if (!stream.eat("*")) return false; + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + }, + name: "css" + }); + + CodeMirror.defineMIME("text/x-scss", { + mediaTypes: mediaTypes, + mediaFeatures: mediaFeatures, + mediaValueKeywords: mediaValueKeywords, + propertyKeywords: propertyKeywords, + nonStandardPropertyKeywords: nonStandardPropertyKeywords, + colorKeywords: colorKeywords, + valueKeywords: valueKeywords, + fontProperties: fontProperties, + allowNested: true, + lineComment: "//", + tokenHooks: { + "/": function(stream, state) { + if (stream.eat("/")) { + stream.skipToEnd(); + return ["comment", "comment"]; + } else if (stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } else { + return ["operator", "operator"]; + } + }, + ":": function(stream) { + if (stream.match(/^\s*\{/, false)) + return [null, null] + return false; + }, + "$": function(stream) { + stream.match(/^[\w-]+/); + if (stream.match(/^\s*:/, false)) + return ["variable-2", "variable-definition"]; + return ["variable-2", "variable"]; + }, + "#": function(stream) { + if (!stream.eat("{")) return false; + return [null, "interpolation"]; + } + }, + name: "css", + helperType: "scss" + }); + + CodeMirror.defineMIME("text/x-less", { + mediaTypes: mediaTypes, + mediaFeatures: mediaFeatures, + mediaValueKeywords: mediaValueKeywords, + propertyKeywords: propertyKeywords, + nonStandardPropertyKeywords: nonStandardPropertyKeywords, + colorKeywords: colorKeywords, + valueKeywords: valueKeywords, + fontProperties: fontProperties, + allowNested: true, + lineComment: "//", + tokenHooks: { + "/": function(stream, state) { + if (stream.eat("/")) { + stream.skipToEnd(); + return ["comment", "comment"]; + } else if (stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } else { + return ["operator", "operator"]; + } + }, + "@": function(stream) { + if (stream.eat("{")) return [null, "interpolation"]; + if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false; + stream.eatWhile(/[\w\\\-]/); + if (stream.match(/^\s*:/, false)) + return ["variable-2", "variable-definition"]; + return ["variable-2", "variable"]; + }, + "&": function() { + return ["atom", "atom"]; + } + }, + name: "css", + helperType: "less" + }); + + CodeMirror.defineMIME("text/x-gss", { + documentTypes: documentTypes, + mediaTypes: mediaTypes, + mediaFeatures: mediaFeatures, + propertyKeywords: propertyKeywords, + nonStandardPropertyKeywords: nonStandardPropertyKeywords, + fontProperties: fontProperties, + counterDescriptors: counterDescriptors, + colorKeywords: colorKeywords, + valueKeywords: valueKeywords, + supportsAtComponent: true, + tokenHooks: { + "/": function(stream, state) { + if (!stream.eat("*")) return false; + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + }, + name: "css", + helperType: "gss" + }); + +}); diff --git a/js/codemirror/mode/css/gss.html b/js/codemirror/mode/css/gss.html new file mode 100644 index 0000000..aa12bfb --- /dev/null +++ b/js/codemirror/mode/css/gss.html @@ -0,0 +1,104 @@ + + +CodeMirror: Closure Stylesheets (GSS) mode + + + + + + + + + + + + + +
+

Closure Stylesheets (GSS) mode

+
+ + +

A mode for Closure Stylesheets (GSS).

+

MIME type defined: text/x-gss.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/css/gss_test.js b/js/codemirror/mode/css/gss_test.js new file mode 100644 index 0000000..0901563 --- /dev/null +++ b/js/codemirror/mode/css/gss_test.js @@ -0,0 +1,17 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + "use strict"; + + var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-gss"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "gss"); } + + MT("atComponent", + "[def @component] {", + "[tag foo] {", + " [property color]: [keyword black];", + "}", + "}"); + +})(); diff --git a/js/codemirror/mode/css/index.html b/js/codemirror/mode/css/index.html new file mode 100644 index 0000000..233d19b --- /dev/null +++ b/js/codemirror/mode/css/index.html @@ -0,0 +1,81 @@ + + +CodeMirror: CSS mode + + + + + + + + + + + + +
+

CSS mode

+
+ + +

CSS mode supports this option:

+ +
highlightNonStandardPropertyKeywords: boolean
+
Whether to highlight non-standard CSS property keywords such as margin-inline or zoom (default: true).
+
+ +

MIME types defined: text/css, text/x-scss (demo), text/x-less (demo).

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/css/less.html b/js/codemirror/mode/css/less.html new file mode 100644 index 0000000..ea7db00 --- /dev/null +++ b/js/codemirror/mode/css/less.html @@ -0,0 +1,152 @@ + + +CodeMirror: LESS mode + + + + + + + + + + +
+

LESS mode

+
+ + +

The LESS mode is a sub-mode of the CSS mode (defined in css.js).

+ +

Parsing/Highlighting Tests: normal, verbose.

+
diff --git a/js/codemirror/mode/css/less_test.js b/js/codemirror/mode/css/less_test.js new file mode 100644 index 0000000..cf367ea --- /dev/null +++ b/js/codemirror/mode/css/less_test.js @@ -0,0 +1,54 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + "use strict"; + + var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-less"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "less"); } + + MT("variable", + "[variable-2 @base]: [atom #f04615];", + "[qualifier .class] {", + " [property width]: [variable&callee percentage]([number 0.5]); [comment // returns `50%`]", + " [property color]: [variable&callee saturate]([variable-2 @base], [number 5%]);", + "}"); + + MT("amp", + "[qualifier .child], [qualifier .sibling] {", + " [qualifier .parent] [atom &] {", + " [property color]: [keyword black];", + " }", + " [atom &] + [atom &] {", + " [property color]: [keyword red];", + " }", + "}"); + + MT("mixin", + "[qualifier .mixin] ([variable dark]; [variable-2 @color]) {", + " [property color]: [variable&callee darken]([variable-2 @color], [number 10%]);", + "}", + "[qualifier .mixin] ([variable light]; [variable-2 @color]) {", + " [property color]: [variable&callee lighten]([variable-2 @color], [number 10%]);", + "}", + "[qualifier .mixin] ([variable-2 @_]; [variable-2 @color]) {", + " [property display]: [atom block];", + "}", + "[variable-2 @switch]: [variable light];", + "[qualifier .class] {", + " [qualifier .mixin]([variable-2 @switch]; [atom #888]);", + "}"); + + MT("nest", + "[qualifier .one] {", + " [def @media] ([property width]: [number 400px]) {", + " [property font-size]: [number 1.2em];", + " [def @media] [attribute print] [keyword and] [property color] {", + " [property color]: [keyword blue];", + " }", + " }", + "}"); + + + MT("interpolation", ".@{[variable foo]} { [property font-weight]: [atom bold]; }"); +})(); diff --git a/js/codemirror/mode/css/scss.html b/js/codemirror/mode/css/scss.html new file mode 100644 index 0000000..75ef4f9 --- /dev/null +++ b/js/codemirror/mode/css/scss.html @@ -0,0 +1,158 @@ + + +CodeMirror: SCSS mode + + + + + + + + + + +
+

SCSS mode

+
+ + +

The SCSS mode is a sub-mode of the CSS mode (defined in css.js).

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/css/scss_test.js b/js/codemirror/mode/css/scss_test.js new file mode 100644 index 0000000..14c1d13 --- /dev/null +++ b/js/codemirror/mode/css/scss_test.js @@ -0,0 +1,110 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-scss"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); } + + MT('url_with_quotation', + "[tag foo] { [property background]:[variable&callee url]([string test.jpg]) }"); + + MT('url_with_double_quotes', + "[tag foo] { [property background]:[variable&callee url]([string \"test.jpg\"]) }"); + + MT('url_with_single_quotes', + "[tag foo] { [property background]:[variable&callee url]([string \'test.jpg\']) }"); + + MT('string', + "[def @import] [string \"compass/css3\"]"); + + MT('important_keyword', + "[tag foo] { [property background]:[variable&callee url]([string \'test.jpg\']) [keyword !important] }"); + + MT('variable', + "[variable-2 $blue]:[atom #333]"); + + MT('variable_as_attribute', + "[tag foo] { [property color]:[variable-2 $blue] }"); + + MT('numbers', + "[tag foo] { [property padding]:[number 10px] [number 10] [number 10em] [number 8in] }"); + + MT('number_percentage', + "[tag foo] { [property width]:[number 80%] }"); + + MT('selector', + "[builtin #hello][qualifier .world]{}"); + + MT('singleline_comment', + "[comment // this is a comment]"); + + MT('multiline_comment', + "[comment /*foobar*/]"); + + MT('attribute_with_hyphen', + "[tag foo] { [property font-size]:[number 10px] }"); + + MT('string_after_attribute', + "[tag foo] { [property content]:[string \"::\"] }"); + + MT('directives', + "[def @include] [qualifier .mixin]"); + + MT('basic_structure', + "[tag p] { [property background]:[keyword red]; }"); + + MT('nested_structure', + "[tag p] { [tag a] { [property color]:[keyword red]; } }"); + + MT('mixin', + "[def @mixin] [tag table-base] {}"); + + MT('number_without_semicolon', + "[tag p] {[property width]:[number 12]}", + "[tag a] {[property color]:[keyword red];}"); + + MT('atom_in_nested_block', + "[tag p] { [tag a] { [property color]:[atom #000]; } }"); + + MT('interpolation_in_property', + "[tag foo] { #{[variable-2 $hello]}:[number 2]; }"); + + MT('interpolation_in_selector', + "[tag foo]#{[variable-2 $hello]} { [property color]:[atom #000]; }"); + + MT('interpolation_error', + "[tag foo]#{[variable foo]} { [property color]:[atom #000]; }"); + + MT("divide_operator", + "[tag foo] { [property width]:[number 4] [operator /] [number 2] }"); + + MT('nested_structure_with_id_selector', + "[tag p] { [builtin #hello] { [property color]:[keyword red]; } }"); + + MT('indent_mixin', + "[def @mixin] [tag container] (", + " [variable-2 $a]: [number 10],", + " [variable-2 $b]: [number 10])", + "{}"); + + MT('indent_nested', + "[tag foo] {", + " [tag bar] {", + " }", + "}"); + + MT('indent_parentheses', + "[tag foo] {", + " [property color]: [variable&callee darken]([variable-2 $blue],", + " [number 9%]);", + "}"); + + MT('indent_vardef', + "[variable-2 $name]:", + " [string 'val'];", + "[tag tag] {", + " [tag inner] {", + " [property margin]: [number 3px];", + " }", + "}"); +})(); diff --git a/js/codemirror/mode/css/test.js b/js/codemirror/mode/css/test.js new file mode 100644 index 0000000..573207e --- /dev/null +++ b/js/codemirror/mode/css/test.js @@ -0,0 +1,217 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "css"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Error, because "foobarhello" is neither a known type or property, but + // property was expected (after "and"), and it should be in parentheses. + MT("atMediaUnknownType", + "[def @media] [attribute screen] [keyword and] [error foobarhello] { }"); + + // Soft error, because "foobarhello" is not a known property or type. + MT("atMediaUnknownProperty", + "[def @media] [attribute screen] [keyword and] ([error foobarhello]) { }"); + + // Make sure nesting works with media queries + MT("atMediaMaxWidthNested", + "[def @media] [attribute screen] [keyword and] ([property max-width]: [number 25px]) { [tag foo] { } }"); + + MT("atMediaFeatureValueKeyword", + "[def @media] ([property orientation]: [keyword landscape]) { }"); + + MT("atMediaUnknownFeatureValueKeyword", + "[def @media] ([property orientation]: [error upsidedown]) { }"); + + MT("atMediaUppercase", + "[def @MEDIA] ([property orienTAtion]: [keyword landScape]) { }"); + + MT("tagSelector", + "[tag foo] { }"); + + MT("classSelector", + "[qualifier .foo-bar_hello] { }"); + + MT("idSelector", + "[builtin #foo] { [error #foo] }"); + + MT("tagSelectorUnclosed", + "[tag foo] { [property margin]: [number 0] } [tag bar] { }"); + + MT("tagStringNoQuotes", + "[tag foo] { [property font-family]: [variable hello] [variable world]; }"); + + MT("tagStringDouble", + "[tag foo] { [property font-family]: [string \"hello world\"]; }"); + + MT("tagStringSingle", + "[tag foo] { [property font-family]: [string 'hello world']; }"); + + MT("tagColorKeyword", + "[tag foo] {", + " [property color]: [keyword black];", + " [property color]: [keyword navy];", + " [property color]: [keyword yellow];", + "}"); + + MT("tagColorHex3", + "[tag foo] { [property background]: [atom #fff]; }"); + + MT("tagColorHex4", + "[tag foo] { [property background]: [atom #ffff]; }"); + + MT("tagColorHex6", + "[tag foo] { [property background]: [atom #ffffff]; }"); + + MT("tagColorHex8", + "[tag foo] { [property background]: [atom #ffffffff]; }"); + + MT("tagColorHex5Invalid", + "[tag foo] { [property background]: [atom&error #fffff]; }"); + + MT("tagColorHexInvalid", + "[tag foo] { [property background]: [atom&error #ffg]; }"); + + MT("tagNegativeNumber", + "[tag foo] { [property margin]: [number -5px]; }"); + + MT("tagPositiveNumber", + "[tag foo] { [property padding]: [number 5px]; }"); + + MT("tagVendor", + "[tag foo] { [meta -foo-][property box-sizing]: [meta -foo-][atom border-box]; }"); + + MT("tagBogusProperty", + "[tag foo] { [property&error barhelloworld]: [number 0]; }"); + + MT("tagTwoProperties", + "[tag foo] { [property margin]: [number 0]; [property padding]: [number 0]; }"); + + MT("tagTwoPropertiesURL", + "[tag foo] { [property background]: [variable&callee url]([string //example.com/foo.png]); [property padding]: [number 0]; }"); + + MT("indent_tagSelector", + "[tag strong], [tag em] {", + " [property background]: [variable&callee rgba](", + " [number 255], [number 255], [number 0], [number .2]", + " );", + "}"); + + MT("indent_atMedia", + "[def @media] {", + " [tag foo] {", + " [property color]:", + " [keyword yellow];", + " }", + "}"); + + MT("indent_comma", + "[tag foo] {", + " [property font-family]: [variable verdana],", + " [atom sans-serif];", + "}"); + + MT("indent_parentheses", + "[tag foo]:[variable-3 before] {", + " [property background]: [variable&callee url](", + "[string blahblah]", + "[string etc]", + "[string ]) [keyword !important];", + "}"); + + MT("font_face", + "[def @font-face] {", + " [property font-family]: [string 'myfont'];", + " [error nonsense]: [string 'abc'];", + " [property src]: [variable&callee url]([string http://blah]),", + " [variable&callee url]([string http://foo]);", + "}"); + + MT("empty_url", + "[def @import] [variable&callee url]() [attribute screen];"); + + MT("parens", + "[qualifier .foo] {", + " [property background-image]: [variable&callee fade]([atom #000], [number 20%]);", + " [property border-image]: [variable&callee linear-gradient](", + " [atom to] [atom bottom],", + " [variable&callee fade]([atom #000], [number 20%]) [number 0%],", + " [variable&callee fade]([atom #000], [number 20%]) [number 100%]", + " );", + "}"); + + MT("css_variable", + ":[variable-3 root] {", + " [variable-2 --main-color]: [atom #06c];", + "}", + "[tag h1][builtin #foo] {", + " [property color]: [variable&callee var]([variable-2 --main-color]);", + "}"); + + MT("blank_css_variable", + ":[variable-3 root] {", + " [variable-2 --]: [atom #06c];", + "}", + "[tag h1][builtin #foo] {", + " [property color]: [variable&callee var]([variable-2 --]);", + "}"); + + MT("supports", + "[def @supports] ([keyword not] (([property text-align-last]: [atom justify]) [keyword or] ([meta -moz-][property text-align-last]: [atom justify])) {", + " [property text-align-last]: [atom justify];", + "}"); + + MT("document", + "[def @document] [variable&callee url]([string http://blah]),", + " [variable&callee url-prefix]([string https://]),", + " [variable&callee domain]([string blah.com]),", + " [variable&callee regexp]([string \".*blah.+\"]) {", + " [builtin #id] {", + " [property background-color]: [keyword white];", + " }", + " [tag foo] {", + " [property font-family]: [variable Verdana], [atom sans-serif];", + " }", + "}"); + + MT("document_url", + "[def @document] [variable&callee url]([string http://blah]) { [qualifier .class] { } }"); + + MT("document_urlPrefix", + "[def @document] [variable&callee url-prefix]([string https://]) { [builtin #id] { } }"); + + MT("document_domain", + "[def @document] [variable&callee domain]([string blah.com]) { [tag foo] { } }"); + + MT("document_regexp", + "[def @document] [variable&callee regexp]([string \".*blah.+\"]) { [builtin #id] { } }"); + + MT("counter-style", + "[def @counter-style] [variable binary] {", + " [property system]: [atom numeric];", + " [property symbols]: [number 0] [number 1];", + " [property suffix]: [string \".\"];", + " [property range]: [atom infinite];", + " [property speak-as]: [atom numeric];", + "}"); + + MT("counter-style-additive-symbols", + "[def @counter-style] [variable simple-roman] {", + " [property system]: [atom additive];", + " [property additive-symbols]: [number 10] [variable X], [number 5] [variable V], [number 1] [variable I];", + " [property range]: [number 1] [number 49];", + "}"); + + MT("counter-style-use", + "[tag ol][qualifier .roman] { [property list-style]: [variable simple-roman]; }"); + + MT("counter-style-symbols", + "[tag ol] { [property list-style]: [variable&callee symbols]([atom cyclic] [string \"*\"] [string \"\\2020\"] [string \"\\2021\"] [string \"\\A7\"]); }"); + + MT("comment-does-not-disrupt", + "[def @font-face] [comment /* foo */] {", + " [property src]: [variable&callee url]([string x]);", + " [property font-family]: [variable One];", + "}") +})(); diff --git a/js/codemirror/mode/cypher/cypher.js b/js/codemirror/mode/cypher/cypher.js new file mode 100644 index 0000000..df8cf43 --- /dev/null +++ b/js/codemirror/mode/cypher/cypher.js @@ -0,0 +1,152 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// By the Neo4j Team and contributors. +// https://github.com/neo4j-contrib/CodeMirror + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + var wordRegexp = function(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + }; + + CodeMirror.defineMode("cypher", function(config) { + var tokenBase = function(stream/*, state*/) { + curPunc = null + var ch = stream.next(); + if (ch ==='"') { + stream.match(/^[^"]*"/); + return "string"; + } + if (ch === "'") { + stream.match(/^[^']*'/); + return "string"; + } + if (/[{}\(\),\.;\[\]]/.test(ch)) { + curPunc = ch; + return "node"; + } else if (ch === "/" && stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } else if (operatorChars.test(ch)) { + stream.eatWhile(operatorChars); + return null; + } else { + stream.eatWhile(/[_\w\d]/); + if (stream.eat(":")) { + stream.eatWhile(/[\w\d_\-]/); + return "atom"; + } + var word = stream.current(); + if (funcs.test(word)) return "builtin"; + if (preds.test(word)) return "def"; + if (keywords.test(word) || systemKeywords.test(word)) return "keyword"; + return "variable"; + } + }; + var pushContext = function(state, type, col) { + return state.context = { + prev: state.context, + indent: state.indent, + col: col, + type: type + }; + }; + var popContext = function(state) { + state.indent = state.context.indent; + return state.context = state.context.prev; + }; + var indentUnit = config.indentUnit; + var curPunc; + var funcs = wordRegexp(["abs", "acos", "allShortestPaths", "asin", "atan", "atan2", "avg", "ceil", "coalesce", "collect", "cos", "cot", "count", "degrees", "e", "endnode", "exp", "extract", "filter", "floor", "haversin", "head", "id", "keys", "labels", "last", "left", "length", "log", "log10", "lower", "ltrim", "max", "min", "node", "nodes", "percentileCont", "percentileDisc", "pi", "radians", "rand", "range", "reduce", "rel", "relationship", "relationships", "replace", "reverse", "right", "round", "rtrim", "shortestPath", "sign", "sin", "size", "split", "sqrt", "startnode", "stdev", "stdevp", "str", "substring", "sum", "tail", "tan", "timestamp", "toFloat", "toInt", "toString", "trim", "type", "upper"]); + var preds = wordRegexp(["all", "and", "any", "contains", "exists", "has", "in", "none", "not", "or", "single", "xor"]); + var keywords = wordRegexp(["as", "asc", "ascending", "assert", "by", "case", "commit", "constraint", "create", "csv", "cypher", "delete", "desc", "descending", "detach", "distinct", "drop", "else", "end", "ends", "explain", "false", "fieldterminator", "foreach", "from", "headers", "in", "index", "is", "join", "limit", "load", "match", "merge", "null", "on", "optional", "order", "periodic", "profile", "remove", "return", "scan", "set", "skip", "start", "starts", "then", "true", "union", "unique", "unwind", "using", "when", "where", "with", "call", "yield"]); + var systemKeywords = wordRegexp(["access", "active", "assign", "all", "alter", "as", "catalog", "change", "copy", "create", "constraint", "constraints", "current", "database", "databases", "dbms", "default", "deny", "drop", "element", "elements", "exists", "from", "grant", "graph", "graphs", "if", "index", "indexes", "label", "labels", "management", "match", "name", "names", "new", "node", "nodes", "not", "of", "on", "or", "password", "populated", "privileges", "property", "read", "relationship", "relationships", "remove", "replace", "required", "revoke", "role", "roles", "set", "show", "start", "status", "stop", "suspended", "to", "traverse", "type", "types", "user", "users", "with", "write"]); + var operatorChars = /[*+\-<>=&|~%^]/; + + return { + startState: function(/*base*/) { + return { + tokenize: tokenBase, + context: null, + indent: 0, + col: 0 + }; + }, + token: function(stream, state) { + if (stream.sol()) { + if (state.context && (state.context.align == null)) { + state.context.align = false; + } + state.indent = stream.indentation(); + } + if (stream.eatSpace()) { + return null; + } + var style = state.tokenize(stream, state); + if (style !== "comment" && state.context && (state.context.align == null) && state.context.type !== "pattern") { + state.context.align = true; + } + if (curPunc === "(") { + pushContext(state, ")", stream.column()); + } else if (curPunc === "[") { + pushContext(state, "]", stream.column()); + } else if (curPunc === "{") { + pushContext(state, "}", stream.column()); + } else if (/[\]\}\)]/.test(curPunc)) { + while (state.context && state.context.type === "pattern") { + popContext(state); + } + if (state.context && curPunc === state.context.type) { + popContext(state); + } + } else if (curPunc === "." && state.context && state.context.type === "pattern") { + popContext(state); + } else if (/atom|string|variable/.test(style) && state.context) { + if (/[\}\]]/.test(state.context.type)) { + pushContext(state, "pattern", stream.column()); + } else if (state.context.type === "pattern" && !state.context.align) { + state.context.align = true; + state.context.col = stream.column(); + } + } + return style; + }, + indent: function(state, textAfter) { + var firstChar = textAfter && textAfter.charAt(0); + var context = state.context; + if (/[\]\}]/.test(firstChar)) { + while (context && context.type === "pattern") { + context = context.prev; + } + } + var closing = context && firstChar === context.type; + if (!context) return 0; + if (context.type === "keywords") return CodeMirror.commands.newlineAndIndent; + if (context.align) return context.col + (closing ? 0 : 1); + return context.indent + (closing ? 0 : indentUnit); + } + }; + }); + + CodeMirror.modeExtensions["cypher"] = { + autoFormatLineBreaks: function(text) { + var i, lines, reProcessedPortion; + var lines = text.split("\n"); + var reProcessedPortion = /\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g; + for (var i = 0; i < lines.length; i++) + lines[i] = lines[i].replace(reProcessedPortion, " \n$1 ").trim(); + return lines.join("\n"); + } + }; + + CodeMirror.defineMIME("application/x-cypher-query", "cypher"); + +}); diff --git a/js/codemirror/mode/cypher/index.html b/js/codemirror/mode/cypher/index.html new file mode 100644 index 0000000..caab582 --- /dev/null +++ b/js/codemirror/mode/cypher/index.html @@ -0,0 +1,64 @@ + + +CodeMirror: Cypher Mode for CodeMirror + + + + + + + + + + + +
+

Cypher Mode for CodeMirror

+
+ +
+

MIME types defined: + application/x-cypher-query +

+ + +
diff --git a/js/codemirror/mode/cypher/test.js b/js/codemirror/mode/cypher/test.js new file mode 100644 index 0000000..f277aa7 --- /dev/null +++ b/js/codemirror/mode/cypher/test.js @@ -0,0 +1,37 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "cypher"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("unbalancedDoubledQuotedString", + "[string \"a'b\"][variable c]"); + + MT("unbalancedSingleQuotedString", + "[string 'a\"b'][variable c]"); + + MT("doubleQuotedString", + "[string \"a\"][variable b]"); + + MT("singleQuotedString", + "[string 'a'][variable b]"); + + MT("single attribute (with content)", + "[node {][atom a:][string 'a'][node }]"); + + MT("multiple attribute, singleQuotedString (with content)", + "[node {][atom a:][string 'a'][node ,][atom b:][string 'b'][node }]"); + + MT("multiple attribute, doubleQuotedString (with content)", + "[node {][atom a:][string \"a\"][node ,][atom b:][string \"b\"][node }]"); + + MT("single attribute (without content)", + "[node {][atom a:][string 'a'][node }]"); + + MT("multiple attribute, singleQuotedString (without content)", + "[node {][atom a:][string ''][node ,][atom b:][string ''][node }]"); + + MT("multiple attribute, doubleQuotedString (without content)", + "[node {][atom a:][string \"\"][node ,][atom b:][string \"\"][node }]"); + })(); diff --git a/js/codemirror/mode/d/d.js b/js/codemirror/mode/d/d.js new file mode 100644 index 0000000..29b8995 --- /dev/null +++ b/js/codemirror/mode/d/d.js @@ -0,0 +1,223 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("d", function(config, parserConfig) { + var indentUnit = config.indentUnit, + statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, + keywords = parserConfig.keywords || {}, + builtin = parserConfig.builtin || {}, + blockKeywords = parserConfig.blockKeywords || {}, + atoms = parserConfig.atoms || {}, + hooks = parserConfig.hooks || {}, + multiLineStrings = parserConfig.multiLineStrings; + var isOperatorChar = /[+\-*&%=<>!?|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'" || ch == "`") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("+")) { + state.tokenize = tokenNestedComment; + return tokenNestedComment(stream, state); + } + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "keyword"; + } + if (builtin.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "builtin"; + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenNestedComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "+"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + var indent = state.indented; + if (state.context && state.context.type == "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + var closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + blockCommentContinue: " * ", + lineComment: "//", + fold: "brace" + }; +}); + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var blockKeywords = "body catch class do else enum for foreach foreach_reverse if in interface mixin " + + "out scope struct switch try union unittest version while with"; + + CodeMirror.defineMIME("text/x-d", { + name: "d", + keywords: words("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue " + + "debug default delegate delete deprecated export extern final finally function goto immutable " + + "import inout invariant is lazy macro module new nothrow override package pragma private " + + "protected public pure ref return shared short static super synchronized template this " + + "throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " + + blockKeywords), + blockKeywords: words(blockKeywords), + builtin: words("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte " + + "ucent uint ulong ushort wchar wstring void size_t sizediff_t"), + atoms: words("exit failure success true false null"), + hooks: { + "@": function(stream, _state) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + +}); diff --git a/js/codemirror/mode/d/index.html b/js/codemirror/mode/d/index.html new file mode 100644 index 0000000..6213b75 --- /dev/null +++ b/js/codemirror/mode/d/index.html @@ -0,0 +1,273 @@ + + +CodeMirror: D mode + + + + + + + + + + +
+

D mode

+
+ + + +

Simple mode that handle D-Syntax (DLang Homepage).

+ +

MIME types defined: text/x-d + .

+
diff --git a/js/codemirror/mode/d/test.js b/js/codemirror/mode/d/test.js new file mode 100644 index 0000000..69745fa --- /dev/null +++ b/js/codemirror/mode/d/test.js @@ -0,0 +1,11 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "d"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("nested_comments", + "[comment /+]","[comment comment]","[comment +/]","[variable void] [variable main](){}"); + +})(); diff --git a/js/codemirror/mode/dart/dart.js b/js/codemirror/mode/dart/dart.js new file mode 100644 index 0000000..ba9ff3d --- /dev/null +++ b/js/codemirror/mode/dart/dart.js @@ -0,0 +1,166 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../clike/clike")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../clike/clike"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + var keywords = ("this super static final const abstract class extends external factory " + + "implements mixin get native set typedef with enum throw rethrow assert break case " + + "continue default in return new deferred async await covariant try catch finally " + + "do else for if switch while import library export part of show hide is as extension " + + "on yield late required sealed base interface when").split(" "); + var blockKeywords = "try catch finally do else for if switch while".split(" "); + var atoms = "true false null".split(" "); + var builtins = "void bool num int double dynamic var String Null Never".split(" "); + + function set(words) { + var obj = {}; + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + function pushInterpolationStack(state) { + (state.interpolationStack || (state.interpolationStack = [])).push(state.tokenize); + } + + function popInterpolationStack(state) { + return (state.interpolationStack || (state.interpolationStack = [])).pop(); + } + + function sizeInterpolationStack(state) { + return state.interpolationStack ? state.interpolationStack.length : 0; + } + + CodeMirror.defineMIME("application/dart", { + name: "clike", + keywords: set(keywords), + blockKeywords: set(blockKeywords), + builtin: set(builtins), + atoms: set(atoms), + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_\.]/); + return "meta"; + }, + + // custom string handling to deal with triple-quoted strings and string interpolation + "'": function(stream, state) { + return tokenString("'", stream, state, false); + }, + "\"": function(stream, state) { + return tokenString("\"", stream, state, false); + }, + "r": function(stream, state) { + var peek = stream.peek(); + if (peek == "'" || peek == "\"") { + return tokenString(stream.next(), stream, state, true); + } + return false; + }, + + "}": function(_stream, state) { + // "}" is end of interpolation, if interpolation stack is non-empty + if (sizeInterpolationStack(state) > 0) { + state.tokenize = popInterpolationStack(state); + return null; + } + return false; + }, + + "/": function(stream, state) { + if (!stream.eat("*")) return false + state.tokenize = tokenNestedComment(1) + return state.tokenize(stream, state) + }, + token: function(stream, _, style) { + if (style == "variable") { + // Assume uppercase symbols are classes using variable-2 + var isUpper = RegExp('^[_$]*[A-Z][a-zA-Z0-9_$]*$','g'); + if (isUpper.test(stream.current())) { + return 'variable-2'; + } + } + } + } + }); + + function tokenString(quote, stream, state, raw) { + var tripleQuoted = false; + if (stream.eat(quote)) { + if (stream.eat(quote)) tripleQuoted = true; + else return "string"; //empty string + } + function tokenStringHelper(stream, state) { + var escaped = false; + while (!stream.eol()) { + if (!raw && !escaped && stream.peek() == "$") { + pushInterpolationStack(state); + state.tokenize = tokenInterpolation; + return "string"; + } + var next = stream.next(); + if (next == quote && !escaped && (!tripleQuoted || stream.match(quote + quote))) { + state.tokenize = null; + break; + } + escaped = !raw && !escaped && next == "\\"; + } + return "string"; + } + state.tokenize = tokenStringHelper; + return tokenStringHelper(stream, state); + } + + function tokenInterpolation(stream, state) { + stream.eat("$"); + if (stream.eat("{")) { + // let clike handle the content of ${...}, + // we take over again when "}" appears (see hooks). + state.tokenize = null; + } else { + state.tokenize = tokenInterpolationIdentifier; + } + return null; + } + + function tokenInterpolationIdentifier(stream, state) { + stream.eatWhile(/[\w_]/); + state.tokenize = popInterpolationStack(state); + return "variable"; + } + + function tokenNestedComment(depth) { + return function (stream, state) { + var ch + while (ch = stream.next()) { + if (ch == "*" && stream.eat("/")) { + if (depth == 1) { + state.tokenize = null + break + } else { + state.tokenize = tokenNestedComment(depth - 1) + return state.tokenize(stream, state) + } + } else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenNestedComment(depth + 1) + return state.tokenize(stream, state) + } + } + return "comment" + } + } + + CodeMirror.registerHelper("hintWords", "application/dart", keywords.concat(atoms).concat(builtins)); + + // This is needed to make loading through meta.js work. + CodeMirror.defineMode("dart", function(conf) { + return CodeMirror.getMode(conf, "application/dart"); + }, "clike"); +}); diff --git a/js/codemirror/mode/dart/index.html b/js/codemirror/mode/dart/index.html new file mode 100644 index 0000000..ee6128c --- /dev/null +++ b/js/codemirror/mode/dart/index.html @@ -0,0 +1,71 @@ + + +CodeMirror: Dart mode + + + + + + + + + +
+

Dart mode

+
+ +
+ + + +
diff --git a/js/codemirror/mode/diff/diff.js b/js/codemirror/mode/diff/diff.js new file mode 100644 index 0000000..21631bf --- /dev/null +++ b/js/codemirror/mode/diff/diff.js @@ -0,0 +1,47 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("diff", function() { + + var TOKEN_NAMES = { + '+': 'positive', + '-': 'negative', + '@': 'meta' + }; + + return { + token: function(stream) { + var tw_pos = stream.string.search(/[\t ]+?$/); + + if (!stream.sol() || tw_pos === 0) { + stream.skipToEnd(); + return ("error " + ( + TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); + } + + var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); + + if (tw_pos === -1) { + stream.skipToEnd(); + } else { + stream.pos = tw_pos; + } + + return token_name; + } + }; +}); + +CodeMirror.defineMIME("text/x-diff", "diff"); + +}); diff --git a/js/codemirror/mode/diff/index.html b/js/codemirror/mode/diff/index.html new file mode 100644 index 0000000..f85c890 --- /dev/null +++ b/js/codemirror/mode/diff/index.html @@ -0,0 +1,117 @@ + + +CodeMirror: Diff mode + + + + + + + + + +
+

Diff mode

+
+ + +

MIME types defined: text/x-diff.

+ +
diff --git a/js/codemirror/mode/django/django.js b/js/codemirror/mode/django/django.js new file mode 100644 index 0000000..aca3319 --- /dev/null +++ b/js/codemirror/mode/django/django.js @@ -0,0 +1,356 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), + require("../../addon/mode/overlay")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../htmlmixed/htmlmixed", + "../../addon/mode/overlay"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("django:inner", function() { + var keywords = ["block", "endblock", "for", "endfor", "true", "false", "filter", "endfilter", + "loop", "none", "self", "super", "if", "elif", "endif", "as", "else", "import", + "with", "endwith", "without", "context", "ifequal", "endifequal", "ifnotequal", + "endifnotequal", "extends", "include", "load", "comment", "endcomment", + "empty", "url", "static", "trans", "blocktrans", "endblocktrans", "now", + "regroup", "lorem", "ifchanged", "endifchanged", "firstof", "debug", "cycle", + "csrf_token", "autoescape", "endautoescape", "spaceless", "endspaceless", + "ssi", "templatetag", "verbatim", "endverbatim", "widthratio"], + filters = ["add", "addslashes", "capfirst", "center", "cut", "date", + "default", "default_if_none", "dictsort", + "dictsortreversed", "divisibleby", "escape", "escapejs", + "filesizeformat", "first", "floatformat", "force_escape", + "get_digit", "iriencode", "join", "last", "length", + "length_is", "linebreaks", "linebreaksbr", "linenumbers", + "ljust", "lower", "make_list", "phone2numeric", "pluralize", + "pprint", "random", "removetags", "rjust", "safe", + "safeseq", "slice", "slugify", "stringformat", "striptags", + "time", "timesince", "timeuntil", "title", "truncatechars", + "truncatechars_html", "truncatewords", "truncatewords_html", + "unordered_list", "upper", "urlencode", "urlize", + "urlizetrunc", "wordcount", "wordwrap", "yesno"], + operators = ["==", "!=", "<", ">", "<=", ">="], + wordOperators = ["in", "not", "or", "and"]; + + keywords = new RegExp("^\\b(" + keywords.join("|") + ")\\b"); + filters = new RegExp("^\\b(" + filters.join("|") + ")\\b"); + operators = new RegExp("^\\b(" + operators.join("|") + ")\\b"); + wordOperators = new RegExp("^\\b(" + wordOperators.join("|") + ")\\b"); + + // We have to return "null" instead of null, in order to avoid string + // styling as the default, when using Django templates inside HTML + // element attributes + function tokenBase (stream, state) { + // Attempt to identify a variable, template or comment tag respectively + if (stream.match("{{")) { + state.tokenize = inVariable; + return "tag"; + } else if (stream.match("{%")) { + state.tokenize = inTag; + return "tag"; + } else if (stream.match("{#")) { + state.tokenize = inComment; + return "comment"; + } + + // Ignore completely any stream series that do not match the + // Django template opening tags. + while (stream.next() != null && !stream.match(/\{[{%#]/, false)) {} + return null; + } + + // A string can be included in either single or double quotes (this is + // the delimiter). Mark everything as a string until the start delimiter + // occurs again. + function inString (delimiter, previousTokenizer) { + return function (stream, state) { + if (!state.escapeNext && stream.eat(delimiter)) { + state.tokenize = previousTokenizer; + } else { + if (state.escapeNext) { + state.escapeNext = false; + } + + var ch = stream.next(); + + // Take into account the backslash for escaping characters, such as + // the string delimiter. + if (ch == "\\") { + state.escapeNext = true; + } + } + + return "string"; + }; + } + + // Apply Django template variable syntax highlighting + function inVariable (stream, state) { + // Attempt to match a dot that precedes a property + if (state.waitDot) { + state.waitDot = false; + + if (stream.peek() != ".") { + return "null"; + } + + // Dot followed by a non-word character should be considered an error. + if (stream.match(/\.\W+/)) { + return "error"; + } else if (stream.eat(".")) { + state.waitProperty = true; + return "null"; + } else { + throw Error ("Unexpected error while waiting for property."); + } + } + + // Attempt to match a pipe that precedes a filter + if (state.waitPipe) { + state.waitPipe = false; + + if (stream.peek() != "|") { + return "null"; + } + + // Pipe followed by a non-word character should be considered an error. + if (stream.match(/\.\W+/)) { + return "error"; + } else if (stream.eat("|")) { + state.waitFilter = true; + return "null"; + } else { + throw Error ("Unexpected error while waiting for filter."); + } + } + + // Highlight properties + if (state.waitProperty) { + state.waitProperty = false; + if (stream.match(/\b(\w+)\b/)) { + state.waitDot = true; // A property can be followed by another property + state.waitPipe = true; // A property can be followed by a filter + return "property"; + } + } + + // Highlight filters + if (state.waitFilter) { + state.waitFilter = false; + if (stream.match(filters)) { + return "variable-2"; + } + } + + // Ignore all white spaces + if (stream.eatSpace()) { + state.waitProperty = false; + return "null"; + } + + // Identify numbers + if (stream.match(/\b\d+(\.\d+)?\b/)) { + return "number"; + } + + // Identify strings + if (stream.match("'")) { + state.tokenize = inString("'", state.tokenize); + return "string"; + } else if (stream.match('"')) { + state.tokenize = inString('"', state.tokenize); + return "string"; + } + + // Attempt to find the variable + if (stream.match(/\b(\w+)\b/) && !state.foundVariable) { + state.waitDot = true; + state.waitPipe = true; // A property can be followed by a filter + return "variable"; + } + + // If found closing tag reset + if (stream.match("}}")) { + state.waitProperty = null; + state.waitFilter = null; + state.waitDot = null; + state.waitPipe = null; + state.tokenize = tokenBase; + return "tag"; + } + + // If nothing was found, advance to the next character + stream.next(); + return "null"; + } + + function inTag (stream, state) { + // Attempt to match a dot that precedes a property + if (state.waitDot) { + state.waitDot = false; + + if (stream.peek() != ".") { + return "null"; + } + + // Dot followed by a non-word character should be considered an error. + if (stream.match(/\.\W+/)) { + return "error"; + } else if (stream.eat(".")) { + state.waitProperty = true; + return "null"; + } else { + throw Error ("Unexpected error while waiting for property."); + } + } + + // Attempt to match a pipe that precedes a filter + if (state.waitPipe) { + state.waitPipe = false; + + if (stream.peek() != "|") { + return "null"; + } + + // Pipe followed by a non-word character should be considered an error. + if (stream.match(/\.\W+/)) { + return "error"; + } else if (stream.eat("|")) { + state.waitFilter = true; + return "null"; + } else { + throw Error ("Unexpected error while waiting for filter."); + } + } + + // Highlight properties + if (state.waitProperty) { + state.waitProperty = false; + if (stream.match(/\b(\w+)\b/)) { + state.waitDot = true; // A property can be followed by another property + state.waitPipe = true; // A property can be followed by a filter + return "property"; + } + } + + // Highlight filters + if (state.waitFilter) { + state.waitFilter = false; + if (stream.match(filters)) { + return "variable-2"; + } + } + + // Ignore all white spaces + if (stream.eatSpace()) { + state.waitProperty = false; + return "null"; + } + + // Identify numbers + if (stream.match(/\b\d+(\.\d+)?\b/)) { + return "number"; + } + + // Identify strings + if (stream.match("'")) { + state.tokenize = inString("'", state.tokenize); + return "string"; + } else if (stream.match('"')) { + state.tokenize = inString('"', state.tokenize); + return "string"; + } + + // Attempt to match an operator + if (stream.match(operators)) { + return "operator"; + } + + // Attempt to match a word operator + if (stream.match(wordOperators)) { + return "keyword"; + } + + // Attempt to match a keyword + var keywordMatch = stream.match(keywords); + if (keywordMatch) { + if (keywordMatch[0] == "comment") { + state.blockCommentTag = true; + } + return "keyword"; + } + + // Attempt to match a variable + if (stream.match(/\b(\w+)\b/)) { + state.waitDot = true; + state.waitPipe = true; // A property can be followed by a filter + return "variable"; + } + + // If found closing tag reset + if (stream.match("%}")) { + state.waitProperty = null; + state.waitFilter = null; + state.waitDot = null; + state.waitPipe = null; + // If the tag that closes is a block comment tag, we want to mark the + // following code as comment, until the tag closes. + if (state.blockCommentTag) { + state.blockCommentTag = false; // Release the "lock" + state.tokenize = inBlockComment; + } else { + state.tokenize = tokenBase; + } + return "tag"; + } + + // If nothing was found, advance to the next character + stream.next(); + return "null"; + } + + // Mark everything as comment inside the tag and the tag itself. + function inComment (stream, state) { + if (stream.match(/^.*?#\}/)) state.tokenize = tokenBase + else stream.skipToEnd() + return "comment"; + } + + // Mark everything as a comment until the `blockcomment` tag closes. + function inBlockComment (stream, state) { + if (stream.match(/\{%\s*endcomment\s*%\}/, false)) { + state.tokenize = inTag; + stream.match("{%"); + return "tag"; + } else { + stream.next(); + return "comment"; + } + } + + return { + startState: function () { + return {tokenize: tokenBase}; + }, + token: function (stream, state) { + return state.tokenize(stream, state); + }, + blockCommentStart: "{% comment %}", + blockCommentEnd: "{% endcomment %}" + }; + }); + + CodeMirror.defineMode("django", function(config) { + var htmlBase = CodeMirror.getMode(config, "text/html"); + var djangoInner = CodeMirror.getMode(config, "django:inner"); + return CodeMirror.overlayMode(htmlBase, djangoInner); + }); + + CodeMirror.defineMIME("text/x-django", "django"); +}); diff --git a/js/codemirror/mode/django/index.html b/js/codemirror/mode/django/index.html new file mode 100644 index 0000000..00445b3 --- /dev/null +++ b/js/codemirror/mode/django/index.html @@ -0,0 +1,73 @@ + + +CodeMirror: Django template mode + + + + + + + + + + + + + +
+

Django template mode

+
+ + + +

Mode for HTML with embedded Django template markup.

+ +

MIME types defined: text/x-django

+
diff --git a/js/codemirror/mode/dockerfile/dockerfile.js b/js/codemirror/mode/dockerfile/dockerfile.js new file mode 100644 index 0000000..41d9085 --- /dev/null +++ b/js/codemirror/mode/dockerfile/dockerfile.js @@ -0,0 +1,211 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../../addon/mode/simple")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../../addon/mode/simple"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + var from = "from"; + var fromRegex = new RegExp("^(\\s*)\\b(" + from + ")\\b", "i"); + + var shells = ["run", "cmd", "entrypoint", "shell"]; + var shellsAsArrayRegex = new RegExp("^(\\s*)(" + shells.join('|') + ")(\\s+\\[)", "i"); + + var expose = "expose"; + var exposeRegex = new RegExp("^(\\s*)(" + expose + ")(\\s+)", "i"); + + var others = [ + "arg", "from", "maintainer", "label", "env", + "add", "copy", "volume", "user", + "workdir", "onbuild", "stopsignal", "healthcheck", "shell" + ]; + + // Collect all Dockerfile directives + var instructions = [from, expose].concat(shells).concat(others), + instructionRegex = "(" + instructions.join('|') + ")", + instructionOnlyLine = new RegExp("^(\\s*)" + instructionRegex + "(\\s*)(#.*)?$", "i"), + instructionWithArguments = new RegExp("^(\\s*)" + instructionRegex + "(\\s+)", "i"); + + CodeMirror.defineSimpleMode("dockerfile", { + start: [ + // Block comment: This is a line starting with a comment + { + regex: /^\s*#.*$/, + sol: true, + token: "comment" + }, + { + regex: fromRegex, + token: [null, "keyword"], + sol: true, + next: "from" + }, + // Highlight an instruction without any arguments (for convenience) + { + regex: instructionOnlyLine, + token: [null, "keyword", null, "error"], + sol: true + }, + { + regex: shellsAsArrayRegex, + token: [null, "keyword", null], + sol: true, + next: "array" + }, + { + regex: exposeRegex, + token: [null, "keyword", null], + sol: true, + next: "expose" + }, + // Highlight an instruction followed by arguments + { + regex: instructionWithArguments, + token: [null, "keyword", null], + sol: true, + next: "arguments" + }, + { + regex: /./, + token: null + } + ], + from: [ + { + regex: /\s*$/, + token: null, + next: "start" + }, + { + // Line comment without instruction arguments is an error + regex: /(\s*)(#.*)$/, + token: [null, "error"], + next: "start" + }, + { + regex: /(\s*\S+\s+)(as)/i, + token: [null, "keyword"], + next: "start" + }, + // Fail safe return to start + { + token: null, + next: "start" + } + ], + single: [ + { + regex: /(?:[^\\']|\\.)/, + token: "string" + }, + { + regex: /'/, + token: "string", + pop: true + } + ], + double: [ + { + regex: /(?:[^\\"]|\\.)/, + token: "string" + }, + { + regex: /"/, + token: "string", + pop: true + } + ], + array: [ + { + regex: /\]/, + token: null, + next: "start" + }, + { + regex: /"(?:[^\\"]|\\.)*"?/, + token: "string" + } + ], + expose: [ + { + regex: /\d+$/, + token: "number", + next: "start" + }, + { + regex: /[^\d]+$/, + token: null, + next: "start" + }, + { + regex: /\d+/, + token: "number" + }, + { + regex: /[^\d]+/, + token: null + }, + // Fail safe return to start + { + token: null, + next: "start" + } + ], + arguments: [ + { + regex: /^\s*#.*$/, + sol: true, + token: "comment" + }, + { + regex: /"(?:[^\\"]|\\.)*"?$/, + token: "string", + next: "start" + }, + { + regex: /"/, + token: "string", + push: "double" + }, + { + regex: /'(?:[^\\']|\\.)*'?$/, + token: "string", + next: "start" + }, + { + regex: /'/, + token: "string", + push: "single" + }, + { + regex: /[^#"']+[\\`]$/, + token: null + }, + { + regex: /[^#"']+$/, + token: null, + next: "start" + }, + { + regex: /[^#"']+/, + token: null + }, + // Fail safe return to start + { + token: null, + next: "start" + } + ], + meta: { + lineComment: "#" + } + }); + + CodeMirror.defineMIME("text/x-dockerfile", "dockerfile"); +}); diff --git a/js/codemirror/mode/dockerfile/index.html b/js/codemirror/mode/dockerfile/index.html new file mode 100644 index 0000000..7d450c5 --- /dev/null +++ b/js/codemirror/mode/dockerfile/index.html @@ -0,0 +1,73 @@ + + +CodeMirror: Dockerfile mode + + + + + + + + + + +
+

Dockerfile mode

+
+ + + +

Dockerfile syntax highlighting for CodeMirror. Depends on + the simplemode addon.

+ +

MIME types defined: text/x-dockerfile

+
diff --git a/js/codemirror/mode/dockerfile/test.js b/js/codemirror/mode/dockerfile/test.js new file mode 100644 index 0000000..812e628 --- /dev/null +++ b/js/codemirror/mode/dockerfile/test.js @@ -0,0 +1,128 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-dockerfile"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("simple_nodejs_dockerfile", + "[keyword FROM] node:carbon", + "[comment # Create app directory]", + "[keyword WORKDIR] /usr/src/app", + "[comment # Install app dependencies]", + "[comment # A wildcard is used to ensure both package.json AND package-lock.json are copied]", + "[comment # where available (npm@5+)]", + "[keyword COPY] package*.json ./", + "[keyword RUN] npm install", + "[keyword COPY] . .", + "[keyword EXPOSE] [number 8080] [number 3000]", + "[keyword ENV] NODE_ENV development", + "[keyword CMD] [[ [string \"npm\"], [string \"start\"] ]]"); + + // Ideally the last space should not be highlighted. + MT("instruction_without_args_1", + "[keyword CMD] "); + + MT("instruction_without_args_2", + "[comment # An instruction without args...]", + "[keyword ARG] [error #...is an error]"); + + MT("multiline", + "[keyword RUN] apt-get update && apt-get install -y \\", + " mercurial \\", + " subversion \\", + " && apt-get clean \\", + " && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*"); + + MT("from_comment", + " [keyword FROM] debian:stretch # I tend to use stable as that is more stable", + " [keyword FROM] debian:stretch [keyword AS] stable # I am even more stable", + " [keyword FROM] [error # this is an error]"); + + MT("from_as", + "[keyword FROM] golang:1.9.2-alpine3.6 [keyword AS] build", + "[keyword COPY] --from=build /bin/project /bin/project", + "[keyword ENTRYPOINT] [[ [string \"/bin/project\"] ]]", + "[keyword CMD] [[ [string \"--help\"] ]]"); + + MT("arg", + "[keyword ARG] VERSION=latest", + "[keyword FROM] busybox:$VERSION", + "[keyword ARG] VERSION", + "[keyword RUN] echo $VERSION > image_version"); + + MT("label", + "[keyword LABEL] com.example.label-with-value=[string \"foo\"]"); + + MT("label_multiline", + "[keyword LABEL] description=[string \"This text illustrates ]\\", + "[string that label-values can span multiple lines.\"]"); + + MT("maintainer", + "[keyword MAINTAINER] Foo Bar [string \"foo@bar.com\"] ", + "[keyword MAINTAINER] Bar Baz "); + + MT("env", + "[keyword ENV] BUNDLE_PATH=[string \"$GEM_HOME\"] \\", + " BUNDLE_APP_CONFIG=[string \"$GEM_HOME\"]"); + + MT("verify_keyword", + "[keyword RUN] add-apt-repository ppa:chris-lea/node.js"); + + MT("scripts", + "[comment # Set an entrypoint, to automatically install node modules]", + "[keyword ENTRYPOINT] [[ [string \"/bin/bash\"], [string \"-c\"], [string \"if [[ ! -d node_modules ]]; then npm install; fi; exec \\\"${@:0}\\\";\"] ]]", + "[keyword CMD] npm start", + "[keyword RUN] npm run build && \\", + "[comment # a comment between the shell commands]", + " npm run test"); + + MT("strings_single", + "[keyword FROM] buildpack-deps:stretch", + "[keyword RUN] { \\", + " echo [string 'install: --no-document']; \\", + " echo [string 'update: --no-document']; \\", + " } >> /usr/local/etc/gemrc"); + + MT("strings_single_multiline", + "[keyword RUN] set -ex \\", + " \\", + " && buildDeps=[string ' ]\\", + "[string bison ]\\", + "[string dpkg-dev ]\\", + "[string libgdbm-dev ]\\", + "[string ruby ]\\", + "[string '] \\", + " && apt-get update"); + + MT("strings_single_multiline_2", + "[keyword RUN] echo [string 'say \\' ]\\", + "[string it works'] "); + + MT("strings_double", + "[keyword RUN] apt-get install -y --no-install-recommends $buildDeps \\", + " \\", + " && wget -O ruby.tar.xz [string \"https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz\"] \\", + " && echo [string \"$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz\"] | sha256sum -c - "); + + MT("strings_double_multiline", + "[keyword RUN] echo [string \"say \\\" ]\\", + "[string it works\"] "); + + MT("escape", + "[comment # escape=`]", + "[keyword FROM] microsoft/windowsservercore", + "[keyword RUN] powershell.exe -Command `", + " $ErrorActionPreference = [string 'Stop']; `", + " wget https://www.python.org/ftp/python/3.5.1/python-3.5.1.exe -OutFile c:\python-3.5.1.exe ; `", + " Start-Process c:\python-3.5.1.exe -ArgumentList [string '/quiet InstallAllUsers=1 PrependPath=1'] -Wait ; `", + " Remove-Item c:\python-3.5.1.exe -Force)"); + + MT("escape_strings", + "[comment # escape=`]", + "[keyword FROM] python:3.6-windowsservercore [keyword AS] python", + "[keyword RUN] $env:PATH = [string 'C:\\Python;C:\\Python\\Scripts;{0}'] -f $env:PATH ; `", + // It should not consider \' as escaped. + // " Set-ItemProperty -Path [string 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\\'] -Name Path -Value $env:PATH ;"); + " Set-ItemProperty -Path [string 'HKLM:\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\\' -Name Path -Value $env:PATH ;]"); +})(); diff --git a/js/codemirror/mode/dtd/dtd.js b/js/codemirror/mode/dtd/dtd.js new file mode 100644 index 0000000..08f65ed --- /dev/null +++ b/js/codemirror/mode/dtd/dtd.js @@ -0,0 +1,142 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/* + DTD mode + Ported to CodeMirror by Peter Kroon + Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues + GitHub: @peterkroon +*/ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("dtd", function(config) { + var indentUnit = config.indentUnit, type; + function ret(style, tp) {type = tp; return style;} + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (ch == "<" && stream.eat("!") ) { + if (stream.eatWhile(/[\-]/)) { + state.tokenize = tokenSGMLComment; + return tokenSGMLComment(stream, state); + } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent"); + } else if (ch == "<" && stream.eat("?")) { //xml declaration + state.tokenize = inBlock("meta", "?>"); + return ret("meta", ch); + } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag"); + else if (ch == "|") return ret("keyword", "separator"); + else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else + else if (ch.match(/[\[\]]/)) return ret("rule", ch); + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) { + var sc = stream.current(); + if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1); + return ret("tag", "tag"); + } else if (ch == "%" || ch == "*" ) return ret("number", "number"); + else { + stream.eatWhile(/[\w\\\-_%.{,]/); + return ret(null, null); + } + } + + function tokenSGMLComment(stream, state) { + var dashes = 0, ch; + while ((ch = stream.next()) != null) { + if (dashes >= 2 && ch == ">") { + state.tokenize = tokenBase; + break; + } + dashes = (ch == "-") ? dashes + 1 : 0; + } + return ret("comment", "comment"); + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return ret("string", "tag"); + }; + } + + function inBlock(style, terminator) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + state.tokenize = tokenBase; + break; + } + stream.next(); + } + return style; + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + stack: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + var context = state.stack[state.stack.length-1]; + if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule"); + else if (type === "endtag") state.stack[state.stack.length-1] = "endtag"; + else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop(); + else if (type == "[") state.stack.push("["); + return style; + }, + + indent: function(state, textAfter) { + var n = state.stack.length; + + if( textAfter.charAt(0) === ']' )n--; + else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){ + if(textAfter.substr(0,1) === "<") {} + else if( type == "doindent" && textAfter.length > 1 ) {} + else if( type == "doindent")n--; + else if( type == ">" && textAfter.length > 1) {} + else if( type == "tag" && textAfter !== ">") {} + else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--; + else if( type == "tag")n++; + else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--; + else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule") {} + else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1; + else if( textAfter === ">") {} + else n=n-1; + //over rule them all + if(type == null || type == "]")n--; + } + + return state.baseIndent + n * indentUnit; + }, + + electricChars: "]>" + }; +}); + +CodeMirror.defineMIME("application/xml-dtd", "dtd"); + +}); diff --git a/js/codemirror/mode/dtd/index.html b/js/codemirror/mode/dtd/index.html new file mode 100644 index 0000000..1a90ef9 --- /dev/null +++ b/js/codemirror/mode/dtd/index.html @@ -0,0 +1,89 @@ + + +CodeMirror: DTD mode + + + + + + + + + +
+

DTD mode

+
+ + +

MIME types defined: application/xml-dtd.

+
diff --git a/js/codemirror/mode/dylan/dylan.js b/js/codemirror/mode/dylan/dylan.js new file mode 100644 index 0000000..fd45659 --- /dev/null +++ b/js/codemirror/mode/dylan/dylan.js @@ -0,0 +1,352 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function forEach(arr, f) { + for (var i = 0; i < arr.length; i++) f(arr[i], i) +} +function some(arr, f) { + for (var i = 0; i < arr.length; i++) if (f(arr[i], i)) return true + return false +} + +CodeMirror.defineMode("dylan", function(_config) { + // Words + var words = { + // Words that introduce unnamed definitions like "define interface" + unnamedDefinition: ["interface"], + + // Words that introduce simple named definitions like "define library" + namedDefinition: ["module", "library", "macro", + "C-struct", "C-union", + "C-function", "C-callable-wrapper" + ], + + // Words that introduce type definitions like "define class". + // These are also parameterized like "define method" and are + // appended to otherParameterizedDefinitionWords + typeParameterizedDefinition: ["class", "C-subtype", "C-mapped-subtype"], + + // Words that introduce trickier definitions like "define method". + // These require special definitions to be added to startExpressions + otherParameterizedDefinition: ["method", "function", + "C-variable", "C-address" + ], + + // Words that introduce module constant definitions. + // These must also be simple definitions and are + // appended to otherSimpleDefinitionWords + constantSimpleDefinition: ["constant"], + + // Words that introduce module variable definitions. + // These must also be simple definitions and are + // appended to otherSimpleDefinitionWords + variableSimpleDefinition: ["variable"], + + // Other words that introduce simple definitions + // (without implicit bodies). + otherSimpleDefinition: ["generic", "domain", + "C-pointer-type", + "table" + ], + + // Words that begin statements with implicit bodies. + statement: ["if", "block", "begin", "method", "case", + "for", "select", "when", "unless", "until", + "while", "iterate", "profiling", "dynamic-bind" + ], + + // Patterns that act as separators in compound statements. + // This may include any general pattern that must be indented + // specially. + separator: ["finally", "exception", "cleanup", "else", + "elseif", "afterwards" + ], + + // Keywords that do not require special indentation handling, + // but which should be highlighted + other: ["above", "below", "by", "from", "handler", "in", + "instance", "let", "local", "otherwise", "slot", + "subclass", "then", "to", "keyed-by", "virtual" + ], + + // Condition signaling function calls + signalingCalls: ["signal", "error", "cerror", + "break", "check-type", "abort" + ] + }; + + words["otherDefinition"] = + words["unnamedDefinition"] + .concat(words["namedDefinition"]) + .concat(words["otherParameterizedDefinition"]); + + words["definition"] = + words["typeParameterizedDefinition"] + .concat(words["otherDefinition"]); + + words["parameterizedDefinition"] = + words["typeParameterizedDefinition"] + .concat(words["otherParameterizedDefinition"]); + + words["simpleDefinition"] = + words["constantSimpleDefinition"] + .concat(words["variableSimpleDefinition"]) + .concat(words["otherSimpleDefinition"]); + + words["keyword"] = + words["statement"] + .concat(words["separator"]) + .concat(words["other"]); + + // Patterns + var symbolPattern = "[-_a-zA-Z?!*@<>$%]+"; + var symbol = new RegExp("^" + symbolPattern); + var patterns = { + // Symbols with special syntax + symbolKeyword: symbolPattern + ":", + symbolClass: "<" + symbolPattern + ">", + symbolGlobal: "\\*" + symbolPattern + "\\*", + symbolConstant: "\\$" + symbolPattern + }; + var patternStyles = { + symbolKeyword: "atom", + symbolClass: "tag", + symbolGlobal: "variable-2", + symbolConstant: "variable-3" + }; + + // Compile all patterns to regular expressions + for (var patternName in patterns) + if (patterns.hasOwnProperty(patternName)) + patterns[patternName] = new RegExp("^" + patterns[patternName]); + + // Names beginning "with-" and "without-" are commonly + // used as statement macro + patterns["keyword"] = [/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/]; + + var styles = {}; + styles["keyword"] = "keyword"; + styles["definition"] = "def"; + styles["simpleDefinition"] = "def"; + styles["signalingCalls"] = "builtin"; + + // protected words lookup table + var wordLookup = {}; + var styleLookup = {}; + + forEach([ + "keyword", + "definition", + "simpleDefinition", + "signalingCalls" + ], function(type) { + forEach(words[type], function(word) { + wordLookup[word] = type; + styleLookup[word] = styles[type]; + }); + }); + + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + function tokenBase(stream, state) { + // String + var ch = stream.peek(); + if (ch == "'" || ch == '"') { + stream.next(); + return chain(stream, state, tokenString(ch, "string")); + } + // Comment + else if (ch == "/") { + stream.next(); + if (stream.eat("*")) { + return chain(stream, state, tokenComment); + } else if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + stream.backUp(1); + } + // Decimal + else if (/[+\-\d\.]/.test(ch)) { + if (stream.match(/^[+-]?[0-9]*\.[0-9]*([esdx][+-]?[0-9]+)?/i) || + stream.match(/^[+-]?[0-9]+([esdx][+-]?[0-9]+)/i) || + stream.match(/^[+-]?\d+/)) { + return "number"; + } + } + // Hash + else if (ch == "#") { + stream.next(); + // Symbol with string syntax + ch = stream.peek(); + if (ch == '"') { + stream.next(); + return chain(stream, state, tokenString('"', "string")); + } + // Binary number + else if (ch == "b") { + stream.next(); + stream.eatWhile(/[01]/); + return "number"; + } + // Hex number + else if (ch == "x") { + stream.next(); + stream.eatWhile(/[\da-f]/i); + return "number"; + } + // Octal number + else if (ch == "o") { + stream.next(); + stream.eatWhile(/[0-7]/); + return "number"; + } + // Token concatenation in macros + else if (ch == '#') { + stream.next(); + return "punctuation"; + } + // Sequence literals + else if ((ch == '[') || (ch == '(')) { + stream.next(); + return "bracket"; + // Hash symbol + } else if (stream.match(/f|t|all-keys|include|key|next|rest/i)) { + return "atom"; + } else { + stream.eatWhile(/[-a-zA-Z]/); + return "error"; + } + } else if (ch == "~") { + stream.next(); + ch = stream.peek(); + if (ch == "=") { + stream.next(); + ch = stream.peek(); + if (ch == "=") { + stream.next(); + return "operator"; + } + return "operator"; + } + return "operator"; + } else if (ch == ":") { + stream.next(); + ch = stream.peek(); + if (ch == "=") { + stream.next(); + return "operator"; + } else if (ch == ":") { + stream.next(); + return "punctuation"; + } + } else if ("[](){}".indexOf(ch) != -1) { + stream.next(); + return "bracket"; + } else if (".,".indexOf(ch) != -1) { + stream.next(); + return "punctuation"; + } else if (stream.match("end")) { + return "keyword"; + } + for (var name in patterns) { + if (patterns.hasOwnProperty(name)) { + var pattern = patterns[name]; + if ((pattern instanceof Array && some(pattern, function(p) { + return stream.match(p); + })) || stream.match(pattern)) + return patternStyles[name]; + } + } + if (/[+\-*\/^=<>&|]/.test(ch)) { + stream.next(); + return "operator"; + } + if (stream.match("define")) { + return "def"; + } else { + stream.eatWhile(/[\w\-]/); + // Keyword + if (wordLookup.hasOwnProperty(stream.current())) { + return styleLookup[stream.current()]; + } else if (stream.current().match(symbol)) { + return "variable"; + } else { + stream.next(); + return "variable-2"; + } + } + } + + function tokenComment(stream, state) { + var maybeEnd = false, maybeNested = false, nestedCount = 0, ch; + while ((ch = stream.next())) { + if (ch == "/" && maybeEnd) { + if (nestedCount > 0) { + nestedCount--; + } else { + state.tokenize = tokenBase; + break; + } + } else if (ch == "*" && maybeNested) { + nestedCount++; + } + maybeEnd = (ch == "*"); + maybeNested = (ch == "/"); + } + return "comment"; + } + + function tokenString(quote, style) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end || !escaped) { + state.tokenize = tokenBase; + } + return style; + }; + } + + // Interface + return { + startState: function() { + return { + tokenize: tokenBase, + currentIndent: 0 + }; + }, + token: function(stream, state) { + if (stream.eatSpace()) + return null; + var style = state.tokenize(stream, state); + return style; + }, + blockCommentStart: "/*", + blockCommentEnd: "*/" + }; +}); + +CodeMirror.defineMIME("text/x-dylan", "dylan"); + +}); diff --git a/js/codemirror/mode/dylan/index.html b/js/codemirror/mode/dylan/index.html new file mode 100644 index 0000000..09871a0 --- /dev/null +++ b/js/codemirror/mode/dylan/index.html @@ -0,0 +1,407 @@ + + +CodeMirror: Dylan mode + + + + + + + + + + + + +
+

Dylan mode

+ + +
+ + + +

MIME types defined: text/x-dylan.

+
diff --git a/js/codemirror/mode/dylan/test.js b/js/codemirror/mode/dylan/test.js new file mode 100644 index 0000000..aba6309 --- /dev/null +++ b/js/codemirror/mode/dylan/test.js @@ -0,0 +1,88 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "dylan"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT('comments', + '[comment // This is a line comment]', + '[comment /* This is a block comment */]', + '[comment /* This is a multi]', + '[comment line comment]', + '[comment */]', + '[comment /* And this is a /*]', + '[comment /* nested */ comment */]'); + + MT('unary_operators', + '[operator -][variable a]', + '[operator -] [variable a]', + '[operator ~][variable a]', + '[operator ~] [variable a]'); + + MT('binary_operators', + '[variable a] [operator +] [variable b]', + '[variable a] [operator -] [variable b]', + '[variable a] [operator *] [variable b]', + '[variable a] [operator /] [variable b]', + '[variable a] [operator ^] [variable b]', + '[variable a] [operator =] [variable b]', + '[variable a] [operator ==] [variable b]', + '[variable a] [operator ~=] [variable b]', + '[variable a] [operator ~==] [variable b]', + '[variable a] [operator <] [variable b]', + '[variable a] [operator <=] [variable b]', + '[variable a] [operator >] [variable b]', + '[variable a] [operator >=] [variable b]', + '[variable a] [operator &] [variable b]', + '[variable a] [operator |] [variable b]', + '[variable a] [operator :=] [variable b]'); + + MT('integers', + '[number 1]', + '[number 123]', + '[number -123]', + '[number +456]', + '[number #b010]', + '[number #o073]', + '[number #xabcDEF123]'); + + MT('floats', + '[number .3]', + '[number -1.]', + '[number -2.335]', + '[number +3.78d1]', + '[number 3.78s-1]', + '[number -3.32e+5]'); + + MT('characters_and_strings', + "[string 'a']", + "[string '\\\\'']", + '[string ""]', + '[string "a"]', + '[string "abc def"]', + '[string "More escaped characters: \\\\\\\\ \\\\a \\\\b \\\\e \\\\f \\\\n \\\\r \\\\t \\\\0 ..."]'); + + MT('brackets', + '[bracket #[[]]]', + '[bracket #()]', + '[bracket #(][number 1][bracket )]', + '[bracket [[][number 1][punctuation ,] [number 3][bracket ]]]', + '[bracket ()]', + '[bracket {}]', + '[keyword if] [bracket (][variable foo][bracket )]', + '[bracket (][number 1][bracket )]', + '[bracket [[][number 1][bracket ]]]'); + + MT('hash_words', + '[punctuation ##]', + '[atom #f]', '[atom #F]', + '[atom #t]', '[atom #T]', + '[atom #all-keys]', + '[atom #include]', + '[atom #key]', + '[atom #next]', + '[atom #rest]', + '[string #"foo"]', + '[error #invalid]'); +})(); diff --git a/js/codemirror/mode/ebnf/ebnf.js b/js/codemirror/mode/ebnf/ebnf.js new file mode 100644 index 0000000..ecd6bc7 --- /dev/null +++ b/js/codemirror/mode/ebnf/ebnf.js @@ -0,0 +1,195 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("ebnf", function (config) { + var commentType = {slash: 0, parenthesis: 1}; + var stateType = {comment: 0, _string: 1, characterClass: 2}; + var bracesMode = null; + + if (config.bracesMode) + bracesMode = CodeMirror.getMode(config, config.bracesMode); + + return { + startState: function () { + return { + stringType: null, + commentType: null, + braced: 0, + lhs: true, + localState: null, + stack: [], + inDefinition: false + }; + }, + token: function (stream, state) { + if (!stream) return; + + //check for state changes + if (state.stack.length === 0) { + //strings + if ((stream.peek() == '"') || (stream.peek() == "'")) { + state.stringType = stream.peek(); + stream.next(); // Skip quote + state.stack.unshift(stateType._string); + } else if (stream.match('/*')) { //comments starting with /* + state.stack.unshift(stateType.comment); + state.commentType = commentType.slash; + } else if (stream.match('(*')) { //comments starting with (* + state.stack.unshift(stateType.comment); + state.commentType = commentType.parenthesis; + } + } + + //return state + //stack has + switch (state.stack[0]) { + case stateType._string: + while (state.stack[0] === stateType._string && !stream.eol()) { + if (stream.peek() === state.stringType) { + stream.next(); // Skip quote + state.stack.shift(); // Clear flag + } else if (stream.peek() === "\\") { + stream.next(); + stream.next(); + } else { + stream.match(/^.[^\\\"\']*/); + } + } + return state.lhs ? "property string" : "string"; // Token style + + case stateType.comment: + while (state.stack[0] === stateType.comment && !stream.eol()) { + if (state.commentType === commentType.slash && stream.match('*/')) { + state.stack.shift(); // Clear flag + state.commentType = null; + } else if (state.commentType === commentType.parenthesis && stream.match('*)')) { + state.stack.shift(); // Clear flag + state.commentType = null; + } else { + stream.match(/^.[^\*]*/); + } + } + return "comment"; + + case stateType.characterClass: + while (state.stack[0] === stateType.characterClass && !stream.eol()) { + if (!(stream.match(/^[^\]\\]+/) || stream.match('.'))) { + state.stack.shift(); + } + } + return "operator"; + } + + var peek = stream.peek(); + + if (bracesMode !== null && (state.braced || peek === "{")) { + if (state.localState === null) + state.localState = CodeMirror.startState(bracesMode); + + var token = bracesMode.token(stream, state.localState), + text = stream.current(); + + if (!token) { + for (var i = 0; i < text.length; i++) { + if (text[i] === "{") { + if (state.braced === 0) { + token = "matchingbracket"; + } + state.braced++; + } else if (text[i] === "}") { + state.braced--; + if (state.braced === 0) { + token = "matchingbracket"; + } + } + } + } + return token; + } + + //no stack + switch (peek) { + case "[": + stream.next(); + state.stack.unshift(stateType.characterClass); + return "bracket"; + case ":": + case "|": + case ";": + stream.next(); + return "operator"; + case "%": + if (stream.match("%%")) { + return "header"; + } else if (stream.match(/[%][A-Za-z]+/)) { + return "keyword"; + } else if (stream.match(/[%][}]/)) { + return "matchingbracket"; + } + break; + case "/": + if (stream.match(/[\/][A-Za-z]+/)) { + return "keyword"; + } + case "\\": + if (stream.match(/[\][a-z]+/)) { + return "string-2"; + } + case ".": + if (stream.match(".")) { + return "atom"; + } + case "*": + case "-": + case "+": + case "^": + if (stream.match(peek)) { + return "atom"; + } + case "$": + if (stream.match("$$")) { + return "builtin"; + } else if (stream.match(/[$][0-9]+/)) { + return "variable-3"; + } + case "<": + if (stream.match(/<<[a-zA-Z_]+>>/)) { + return "builtin"; + } + } + + if (stream.match('//')) { + stream.skipToEnd(); + return "comment"; + } else if (stream.match('return')) { + return "operator"; + } else if (stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)) { + if (stream.match(/(?=[\(.])/)) { + return "variable"; + } else if (stream.match(/(?=[\s\n]*[:=])/)) { + return "def"; + } + return "variable-2"; + } else if (["[", "]", "(", ")"].indexOf(stream.peek()) != -1) { + stream.next(); + return "bracket"; + } else if (!stream.eatSpace()) { + stream.next(); + } + return null; + } + }; + }); + + CodeMirror.defineMIME("text/x-ebnf", "ebnf"); +}); diff --git a/js/codemirror/mode/ebnf/index.html b/js/codemirror/mode/ebnf/index.html new file mode 100644 index 0000000..67c081f --- /dev/null +++ b/js/codemirror/mode/ebnf/index.html @@ -0,0 +1,102 @@ + + + + CodeMirror: EBNF Mode + + + + + + + + + + + + +
+

EBNF Mode (bracesMode setting = "javascript")

+
+ +

The EBNF Mode

+

Created by Robert Plummer

+
+ + diff --git a/js/codemirror/mode/ecl/ecl.js b/js/codemirror/mode/ecl/ecl.js new file mode 100644 index 0000000..66de133 --- /dev/null +++ b/js/codemirror/mode/ecl/ecl.js @@ -0,0 +1,206 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("ecl", function(config) { + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + function metaHook(stream, state) { + if (!state.startOfLine) return false; + stream.skipToEnd(); + return "meta"; + } + + var indentUnit = config.indentUnit; + var keyword = words("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"); + var variable = words("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"); + var variable_2 = words("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"); + var variable_3 = words("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"); + var builtin = words("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"); + var blockKeywords = words("catch class do else finally for if switch try while"); + var atoms = words("true false null"); + var hooks = {"#": metaHook}; + var isOperatorChar = /[+\-*&%=<>!?|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current().toLowerCase(); + if (keyword.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "keyword"; + } else if (variable.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "variable"; + } else if (variable_2.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "variable-2"; + } else if (variable_3.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "variable-3"; + } else if (builtin.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "builtin"; + } else { //Data types are of from KEYWORD## + var i = cur.length - 1; + while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_')) + --i; + + if (i > 0) { + var cur2 = cur.substr(0, i + 1); + if (variable_3.propertyIsEnumerable(cur2)) { + if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = "newstatement"; + return "variable-3"; + } + } + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return null; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !escaped) + state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return 0; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + var closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}" + }; +}); + +CodeMirror.defineMIME("text/x-ecl", "ecl"); + +}); diff --git a/js/codemirror/mode/ecl/index.html b/js/codemirror/mode/ecl/index.html new file mode 100644 index 0000000..1e97804 --- /dev/null +++ b/js/codemirror/mode/ecl/index.html @@ -0,0 +1,52 @@ + + +CodeMirror: ECL mode + + + + + + + + + +
+

ECL mode

+
+ + +

Based on CodeMirror's clike mode. For more information see HPCC Systems web site.

+

MIME types defined: text/x-ecl.

+ +
diff --git a/js/codemirror/mode/eiffel/eiffel.js b/js/codemirror/mode/eiffel/eiffel.js new file mode 100644 index 0000000..d6fd23c --- /dev/null +++ b/js/codemirror/mode/eiffel/eiffel.js @@ -0,0 +1,160 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("eiffel", function() { + function wordObj(words) { + var o = {}; + for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; + return o; + } + var keywords = wordObj([ + 'note', + 'across', + 'when', + 'variant', + 'until', + 'unique', + 'undefine', + 'then', + 'strip', + 'select', + 'retry', + 'rescue', + 'require', + 'rename', + 'reference', + 'redefine', + 'prefix', + 'once', + 'old', + 'obsolete', + 'loop', + 'local', + 'like', + 'is', + 'inspect', + 'infix', + 'include', + 'if', + 'frozen', + 'from', + 'external', + 'export', + 'ensure', + 'end', + 'elseif', + 'else', + 'do', + 'creation', + 'create', + 'check', + 'alias', + 'agent', + 'separate', + 'invariant', + 'inherit', + 'indexing', + 'feature', + 'expanded', + 'deferred', + 'class', + 'Void', + 'True', + 'Result', + 'Precursor', + 'False', + 'Current', + 'create', + 'attached', + 'detachable', + 'as', + 'and', + 'implies', + 'not', + 'or' + ]); + var operators = wordObj([":=", "and then","and", "or","<<",">>"]); + + function chain(newtok, stream, state) { + state.tokenize.push(newtok); + return newtok(stream, state); + } + + function tokenBase(stream, state) { + if (stream.eatSpace()) return null; + var ch = stream.next(); + if (ch == '"'||ch == "'") { + return chain(readQuoted(ch, "string"), stream, state); + } else if (ch == "-"&&stream.eat("-")) { + stream.skipToEnd(); + return "comment"; + } else if (ch == ":"&&stream.eat("=")) { + return "operator"; + } else if (/[0-9]/.test(ch)) { + stream.eatWhile(/[xXbBCc0-9\.]/); + stream.eat(/[\?\!]/); + return "ident"; + } else if (/[a-zA-Z_0-9]/.test(ch)) { + stream.eatWhile(/[a-zA-Z_0-9]/); + stream.eat(/[\?\!]/); + return "ident"; + } else if (/[=+\-\/*^%<>~]/.test(ch)) { + stream.eatWhile(/[=+\-\/*^%<>~]/); + return "operator"; + } else { + return null; + } + } + + function readQuoted(quote, style, unescaped) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && (unescaped || !escaped)) { + state.tokenize.pop(); + break; + } + escaped = !escaped && ch == "%"; + } + return style; + }; + } + + return { + startState: function() { + return {tokenize: [tokenBase]}; + }, + + token: function(stream, state) { + var style = state.tokenize[state.tokenize.length-1](stream, state); + if (style == "ident") { + var word = stream.current(); + style = keywords.propertyIsEnumerable(stream.current()) ? "keyword" + : operators.propertyIsEnumerable(stream.current()) ? "operator" + : /^[A-Z][A-Z_0-9]*$/g.test(word) ? "tag" + : /^0[bB][0-1]+$/g.test(word) ? "number" + : /^0[cC][0-7]+$/g.test(word) ? "number" + : /^0[xX][a-fA-F0-9]+$/g.test(word) ? "number" + : /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(word) ? "number" + : /^[0-9]+$/g.test(word) ? "number" + : "variable"; + } + return style; + }, + lineComment: "--" + }; +}); + +CodeMirror.defineMIME("text/x-eiffel", "eiffel"); + +}); diff --git a/js/codemirror/mode/eiffel/index.html b/js/codemirror/mode/eiffel/index.html new file mode 100644 index 0000000..64d1e66 --- /dev/null +++ b/js/codemirror/mode/eiffel/index.html @@ -0,0 +1,429 @@ + + +CodeMirror: Eiffel mode + + + + + + + + + + +
+

Eiffel mode

+
+ + +

MIME types defined: text/x-eiffel.

+ +

Created by YNH.

+
diff --git a/js/codemirror/mode/elm/elm.js b/js/codemirror/mode/elm/elm.js new file mode 100644 index 0000000..e41dfb0 --- /dev/null +++ b/js/codemirror/mode/elm/elm.js @@ -0,0 +1,245 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("elm", function() { + + function switchState(source, setState, f) + { + setState(f); + return f(source, setState); + } + + var lowerRE = /[a-z]/; + var upperRE = /[A-Z]/; + var innerRE = /[a-zA-Z0-9_]/; + + var digitRE = /[0-9]/; + var hexRE = /[0-9A-Fa-f]/; + var symbolRE = /[-&*+.\\/<>=?^|:]/; + var specialRE = /[(),[\]{}]/; + var spacesRE = /[ \v\f]/; // newlines are handled in tokenizer + + function normal() + { + return function(source, setState) + { + if (source.eatWhile(spacesRE)) + { + return null; + } + + var char = source.next(); + + if (specialRE.test(char)) + { + return (char === '{' && source.eat('-')) + ? switchState(source, setState, chompMultiComment(1)) + : (char === '[' && source.match('glsl|')) + ? switchState(source, setState, chompGlsl) + : 'builtin'; + } + + if (char === '\'') + { + return switchState(source, setState, chompChar); + } + + if (char === '"') + { + return source.eat('"') + ? source.eat('"') + ? switchState(source, setState, chompMultiString) + : 'string' + : switchState(source, setState, chompSingleString); + } + + if (upperRE.test(char)) + { + source.eatWhile(innerRE); + return 'variable-2'; + } + + if (lowerRE.test(char)) + { + var isDef = source.pos === 1; + source.eatWhile(innerRE); + return isDef ? "def" : "variable"; + } + + if (digitRE.test(char)) + { + if (char === '0') + { + if (source.eat(/[xX]/)) + { + source.eatWhile(hexRE); // should require at least 1 + return "number"; + } + } + else + { + source.eatWhile(digitRE); + } + if (source.eat('.')) + { + source.eatWhile(digitRE); // should require at least 1 + } + if (source.eat(/[eE]/)) + { + source.eat(/[-+]/); + source.eatWhile(digitRE); // should require at least 1 + } + return "number"; + } + + if (symbolRE.test(char)) + { + if (char === '-' && source.eat('-')) + { + source.skipToEnd(); + return "comment"; + } + source.eatWhile(symbolRE); + return "keyword"; + } + + if (char === '_') + { + return "keyword"; + } + + return "error"; + } + } + + function chompMultiComment(nest) + { + if (nest == 0) + { + return normal(); + } + return function(source, setState) + { + while (!source.eol()) + { + var char = source.next(); + if (char == '{' && source.eat('-')) + { + ++nest; + } + else if (char == '-' && source.eat('}')) + { + --nest; + if (nest === 0) + { + setState(normal()); + return 'comment'; + } + } + } + setState(chompMultiComment(nest)); + return 'comment'; + } + } + + function chompMultiString(source, setState) + { + while (!source.eol()) + { + var char = source.next(); + if (char === '"' && source.eat('"') && source.eat('"')) + { + setState(normal()); + return 'string'; + } + } + return 'string'; + } + + function chompSingleString(source, setState) + { + while (source.skipTo('\\"')) { source.next(); source.next(); } + if (source.skipTo('"')) + { + source.next(); + setState(normal()); + return 'string'; + } + source.skipToEnd(); + setState(normal()); + return 'error'; + } + + function chompChar(source, setState) + { + while (source.skipTo("\\'")) { source.next(); source.next(); } + if (source.skipTo("'")) + { + source.next(); + setState(normal()); + return 'string'; + } + source.skipToEnd(); + setState(normal()); + return 'error'; + } + + function chompGlsl(source, setState) + { + while (!source.eol()) + { + var char = source.next(); + if (char === '|' && source.eat(']')) + { + setState(normal()); + return 'string'; + } + } + return 'string'; + } + + var wellKnownWords = { + case: 1, + of: 1, + as: 1, + if: 1, + then: 1, + else: 1, + let: 1, + in: 1, + type: 1, + alias: 1, + module: 1, + where: 1, + import: 1, + exposing: 1, + port: 1 + }; + + return { + startState: function () { return { f: normal() }; }, + copyState: function (s) { return { f: s.f }; }, + + lineComment: '--', + + token: function(stream, state) { + var type = state.f(stream, function(s) { state.f = s; }); + var word = stream.current(); + return (wellKnownWords.hasOwnProperty(word)) ? 'keyword' : type; + } + }; + + }); + + CodeMirror.defineMIME("text/x-elm", "elm"); +}); diff --git a/js/codemirror/mode/elm/index.html b/js/codemirror/mode/elm/index.html new file mode 100644 index 0000000..6332bb5 --- /dev/null +++ b/js/codemirror/mode/elm/index.html @@ -0,0 +1,61 @@ + + +CodeMirror: Elm mode + + + + + + + + + +
+

Elm mode

+ +
+ + + +

MIME types defined: text/x-elm.

+
diff --git a/js/codemirror/mode/erlang/erlang.js b/js/codemirror/mode/erlang/erlang.js new file mode 100644 index 0000000..914276d --- /dev/null +++ b/js/codemirror/mode/erlang/erlang.js @@ -0,0 +1,619 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/*jshint unused:true, eqnull:true, curly:true, bitwise:true */ +/*jshint undef:true, latedef:true, trailing:true */ +/*global CodeMirror:true */ + +// erlang mode. +// tokenizer -> token types -> CodeMirror styles +// tokenizer maintains a parse stack +// indenter uses the parse stack + +// TODO indenter: +// bit syntax +// old guard/bif/conversion clashes (e.g. "float/1") +// type/spec/opaque + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMIME("text/x-erlang", "erlang"); + +CodeMirror.defineMode("erlang", function(cmCfg) { + "use strict"; + +///////////////////////////////////////////////////////////////////////////// +// constants + + var typeWords = [ + "-type", "-spec", "-export_type", "-opaque"]; + + var keywordWords = [ + "after","begin","catch","case","cond","end","fun","if", + "let","of","query","receive","try","when"]; + + var separatorRE = /[\->,;]/; + var separatorWords = [ + "->",";",","]; + + var operatorAtomWords = [ + "and","andalso","band","bnot","bor","bsl","bsr","bxor", + "div","not","or","orelse","rem","xor"]; + + var operatorSymbolRE = /[\+\-\*\/<>=\|:!]/; + var operatorSymbolWords = [ + "=","+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"]; + + var openParenRE = /[<\(\[\{]/; + var openParenWords = [ + "<<","(","[","{"]; + + var closeParenRE = /[>\)\]\}]/; + var closeParenWords = [ + "}","]",")",">>"]; + + var guardWords = [ + "is_atom","is_binary","is_bitstring","is_boolean","is_float", + "is_function","is_integer","is_list","is_number","is_pid", + "is_port","is_record","is_reference","is_tuple", + "atom","binary","bitstring","boolean","function","integer","list", + "number","pid","port","record","reference","tuple"]; + + var bifWords = [ + "abs","adler32","adler32_combine","alive","apply","atom_to_binary", + "atom_to_list","binary_to_atom","binary_to_existing_atom", + "binary_to_list","binary_to_term","bit_size","bitstring_to_list", + "byte_size","check_process_code","contact_binary","crc32", + "crc32_combine","date","decode_packet","delete_module", + "disconnect_node","element","erase","exit","float","float_to_list", + "garbage_collect","get","get_keys","group_leader","halt","hd", + "integer_to_list","internal_bif","iolist_size","iolist_to_binary", + "is_alive","is_atom","is_binary","is_bitstring","is_boolean", + "is_float","is_function","is_integer","is_list","is_number","is_pid", + "is_port","is_process_alive","is_record","is_reference","is_tuple", + "length","link","list_to_atom","list_to_binary","list_to_bitstring", + "list_to_existing_atom","list_to_float","list_to_integer", + "list_to_pid","list_to_tuple","load_module","make_ref","module_loaded", + "monitor_node","node","node_link","node_unlink","nodes","notalive", + "now","open_port","pid_to_list","port_close","port_command", + "port_connect","port_control","pre_loaded","process_flag", + "process_info","processes","purge_module","put","register", + "registered","round","self","setelement","size","spawn","spawn_link", + "spawn_monitor","spawn_opt","split_binary","statistics", + "term_to_binary","time","throw","tl","trunc","tuple_size", + "tuple_to_list","unlink","unregister","whereis"]; + +// upper case: [A-Z] [Ø-Þ] [À-Ö] +// lower case: [a-z] [ß-ö] [ø-ÿ] + var anumRE = /[\w@Ø-ÞÀ-Öß-öø-ÿ]/; + var escapesRE = + /[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/; + +///////////////////////////////////////////////////////////////////////////// +// tokenizer + + function tokenizer(stream,state) { + // in multi-line string + if (state.in_string) { + state.in_string = (!doubleQuote(stream)); + return rval(state,stream,"string"); + } + + // in multi-line atom + if (state.in_atom) { + state.in_atom = (!singleQuote(stream)); + return rval(state,stream,"atom"); + } + + // whitespace + if (stream.eatSpace()) { + return rval(state,stream,"whitespace"); + } + + // attributes and type specs + if (!peekToken(state) && + stream.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/)) { + if (is_member(stream.current(),typeWords)) { + return rval(state,stream,"type"); + }else{ + return rval(state,stream,"attribute"); + } + } + + var ch = stream.next(); + + // comment + if (ch == '%') { + stream.skipToEnd(); + return rval(state,stream,"comment"); + } + + // colon + if (ch == ":") { + return rval(state,stream,"colon"); + } + + // macro + if (ch == '?') { + stream.eatSpace(); + stream.eatWhile(anumRE); + return rval(state,stream,"macro"); + } + + // record + if (ch == "#") { + stream.eatSpace(); + stream.eatWhile(anumRE); + return rval(state,stream,"record"); + } + + // dollar escape + if (ch == "$") { + if (stream.next() == "\\" && !stream.match(escapesRE)) { + return rval(state,stream,"error"); + } + return rval(state,stream,"number"); + } + + // dot + if (ch == ".") { + return rval(state,stream,"dot"); + } + + // quoted atom + if (ch == '\'') { + if (!(state.in_atom = (!singleQuote(stream)))) { + if (stream.match(/\s*\/\s*[0-9]/,false)) { + stream.match(/\s*\/\s*[0-9]/,true); + return rval(state,stream,"fun"); // 'f'/0 style fun + } + if (stream.match(/\s*\(/,false) || stream.match(/\s*:/,false)) { + return rval(state,stream,"function"); + } + } + return rval(state,stream,"atom"); + } + + // string + if (ch == '"') { + state.in_string = (!doubleQuote(stream)); + return rval(state,stream,"string"); + } + + // variable + if (/[A-Z_Ø-ÞÀ-Ö]/.test(ch)) { + stream.eatWhile(anumRE); + return rval(state,stream,"variable"); + } + + // atom/keyword/BIF/function + if (/[a-z_ß-öø-ÿ]/.test(ch)) { + stream.eatWhile(anumRE); + + if (stream.match(/\s*\/\s*[0-9]/,false)) { + stream.match(/\s*\/\s*[0-9]/,true); + return rval(state,stream,"fun"); // f/0 style fun + } + + var w = stream.current(); + + if (is_member(w,keywordWords)) { + return rval(state,stream,"keyword"); + }else if (is_member(w,operatorAtomWords)) { + return rval(state,stream,"operator"); + }else if (stream.match(/\s*\(/,false)) { + // 'put' and 'erlang:put' are bifs, 'foo:put' is not + if (is_member(w,bifWords) && + ((peekToken(state).token != ":") || + (peekToken(state,2).token == "erlang"))) { + return rval(state,stream,"builtin"); + }else if (is_member(w,guardWords)) { + return rval(state,stream,"guard"); + }else{ + return rval(state,stream,"function"); + } + }else if (lookahead(stream) == ":") { + if (w == "erlang") { + return rval(state,stream,"builtin"); + } else { + return rval(state,stream,"function"); + } + }else if (is_member(w,["true","false"])) { + return rval(state,stream,"boolean"); + }else{ + return rval(state,stream,"atom"); + } + } + + // number + var digitRE = /[0-9]/; + var radixRE = /[0-9a-zA-Z]/; // 36#zZ style int + if (digitRE.test(ch)) { + stream.eatWhile(digitRE); + if (stream.eat('#')) { // 36#aZ style integer + if (!stream.eatWhile(radixRE)) { + stream.backUp(1); //"36#" - syntax error + } + } else if (stream.eat('.')) { // float + if (!stream.eatWhile(digitRE)) { + stream.backUp(1); // "3." - probably end of function + } else { + if (stream.eat(/[eE]/)) { // float with exponent + if (stream.eat(/[-+]/)) { + if (!stream.eatWhile(digitRE)) { + stream.backUp(2); // "2e-" - syntax error + } + } else { + if (!stream.eatWhile(digitRE)) { + stream.backUp(1); // "2e" - syntax error + } + } + } + } + } + return rval(state,stream,"number"); // normal integer + } + + // open parens + if (nongreedy(stream,openParenRE,openParenWords)) { + return rval(state,stream,"open_paren"); + } + + // close parens + if (nongreedy(stream,closeParenRE,closeParenWords)) { + return rval(state,stream,"close_paren"); + } + + // separators + if (greedy(stream,separatorRE,separatorWords)) { + return rval(state,stream,"separator"); + } + + // operators + if (greedy(stream,operatorSymbolRE,operatorSymbolWords)) { + return rval(state,stream,"operator"); + } + + return rval(state,stream,null); + } + +///////////////////////////////////////////////////////////////////////////// +// utilities + function nongreedy(stream,re,words) { + if (stream.current().length == 1 && re.test(stream.current())) { + stream.backUp(1); + while (re.test(stream.peek())) { + stream.next(); + if (is_member(stream.current(),words)) { + return true; + } + } + stream.backUp(stream.current().length-1); + } + return false; + } + + function greedy(stream,re,words) { + if (stream.current().length == 1 && re.test(stream.current())) { + while (re.test(stream.peek())) { + stream.next(); + } + while (0 < stream.current().length) { + if (is_member(stream.current(),words)) { + return true; + }else{ + stream.backUp(1); + } + } + stream.next(); + } + return false; + } + + function doubleQuote(stream) { + return quote(stream, '"', '\\'); + } + + function singleQuote(stream) { + return quote(stream,'\'','\\'); + } + + function quote(stream,quoteChar,escapeChar) { + while (!stream.eol()) { + var ch = stream.next(); + if (ch == quoteChar) { + return true; + }else if (ch == escapeChar) { + stream.next(); + } + } + return false; + } + + function lookahead(stream) { + var m = stream.match(/^\s*([^\s%])/, false) + return m ? m[1] : ""; + } + + function is_member(element,list) { + return (-1 < list.indexOf(element)); + } + + function rval(state,stream,type) { + + // parse stack + pushToken(state,realToken(type,stream)); + + // map erlang token type to CodeMirror style class + // erlang -> CodeMirror tag + switch (type) { + case "atom": return "atom"; + case "attribute": return "attribute"; + case "boolean": return "atom"; + case "builtin": return "builtin"; + case "close_paren": return null; + case "colon": return null; + case "comment": return "comment"; + case "dot": return null; + case "error": return "error"; + case "fun": return "meta"; + case "function": return "tag"; + case "guard": return "property"; + case "keyword": return "keyword"; + case "macro": return "variable-2"; + case "number": return "number"; + case "open_paren": return null; + case "operator": return "operator"; + case "record": return "bracket"; + case "separator": return null; + case "string": return "string"; + case "type": return "def"; + case "variable": return "variable"; + default: return null; + } + } + + function aToken(tok,col,ind,typ) { + return {token: tok, + column: col, + indent: ind, + type: typ}; + } + + function realToken(type,stream) { + return aToken(stream.current(), + stream.column(), + stream.indentation(), + type); + } + + function fakeToken(type) { + return aToken(type,0,0,type); + } + + function peekToken(state,depth) { + var len = state.tokenStack.length; + var dep = (depth ? depth : 1); + + if (len < dep) { + return false; + }else{ + return state.tokenStack[len-dep]; + } + } + + function pushToken(state,token) { + + if (!(token.type == "comment" || token.type == "whitespace")) { + state.tokenStack = maybe_drop_pre(state.tokenStack,token); + state.tokenStack = maybe_drop_post(state.tokenStack); + } + } + + function maybe_drop_pre(s,token) { + var last = s.length-1; + + if (0 < last && s[last].type === "record" && token.type === "dot") { + s.pop(); + }else if (0 < last && s[last].type === "group") { + s.pop(); + s.push(token); + }else{ + s.push(token); + } + return s; + } + + function maybe_drop_post(s) { + if (!s.length) return s + var last = s.length-1; + + if (s[last].type === "dot") { + return []; + } + if (last > 1 && s[last].type === "fun" && s[last-1].token === "fun") { + return s.slice(0,last-1); + } + switch (s[last].token) { + case "}": return d(s,{g:["{"]}); + case "]": return d(s,{i:["["]}); + case ")": return d(s,{i:["("]}); + case ">>": return d(s,{i:["<<"]}); + case "end": return d(s,{i:["begin","case","fun","if","receive","try"]}); + case ",": return d(s,{e:["begin","try","when","->", + ",","(","[","{","<<"]}); + case "->": return d(s,{r:["when"], + m:["try","if","case","receive"]}); + case ";": return d(s,{E:["case","fun","if","receive","try","when"]}); + case "catch":return d(s,{e:["try"]}); + case "of": return d(s,{e:["case"]}); + case "after":return d(s,{e:["receive","try"]}); + default: return s; + } + } + + function d(stack,tt) { + // stack is a stack of Token objects. + // tt is an object; {type:tokens} + // type is a char, tokens is a list of token strings. + // The function returns (possibly truncated) stack. + // It will descend the stack, looking for a Token such that Token.token + // is a member of tokens. If it does not find that, it will normally (but + // see "E" below) return stack. If it does find a match, it will remove + // all the Tokens between the top and the matched Token. + // If type is "m", that is all it does. + // If type is "i", it will also remove the matched Token and the top Token. + // If type is "g", like "i", but add a fake "group" token at the top. + // If type is "r", it will remove the matched Token, but not the top Token. + // If type is "e", it will keep the matched Token but not the top Token. + // If type is "E", it behaves as for type "e", except if there is no match, + // in which case it will return an empty stack. + + for (var type in tt) { + var len = stack.length-1; + var tokens = tt[type]; + for (var i = len-1; -1 < i ; i--) { + if (is_member(stack[i].token,tokens)) { + var ss = stack.slice(0,i); + switch (type) { + case "m": return ss.concat(stack[i]).concat(stack[len]); + case "r": return ss.concat(stack[len]); + case "i": return ss; + case "g": return ss.concat(fakeToken("group")); + case "E": return ss.concat(stack[i]); + case "e": return ss.concat(stack[i]); + } + } + } + } + return (type == "E" ? [] : stack); + } + +///////////////////////////////////////////////////////////////////////////// +// indenter + + function indenter(state,textAfter) { + var t; + var unit = cmCfg.indentUnit; + var wordAfter = wordafter(textAfter); + var currT = peekToken(state,1); + var prevT = peekToken(state,2); + + if (state.in_string || state.in_atom) { + return CodeMirror.Pass; + }else if (!prevT) { + return 0; + }else if (currT.token == "when") { + return currT.column+unit; + }else if (wordAfter === "when" && prevT.type === "function") { + return prevT.indent+unit; + }else if (wordAfter === "(" && currT.token === "fun") { + return currT.column+3; + }else if (wordAfter === "catch" && (t = getToken(state,["try"]))) { + return t.column; + }else if (is_member(wordAfter,["end","after","of"])) { + t = getToken(state,["begin","case","fun","if","receive","try"]); + return t ? t.column : CodeMirror.Pass; + }else if (is_member(wordAfter,closeParenWords)) { + t = getToken(state,openParenWords); + return t ? t.column : CodeMirror.Pass; + }else if (is_member(currT.token,[",","|","||"]) || + is_member(wordAfter,[",","|","||"])) { + t = postcommaToken(state); + return t ? t.column+t.token.length : unit; + }else if (currT.token == "->") { + if (is_member(prevT.token, ["receive","case","if","try"])) { + return prevT.column+unit+unit; + }else{ + return prevT.column+unit; + } + }else if (is_member(currT.token,openParenWords)) { + return currT.column+currT.token.length; + }else{ + t = defaultToken(state); + return truthy(t) ? t.column+unit : 0; + } + } + + function wordafter(str) { + var m = str.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/); + + return truthy(m) && (m.index === 0) ? m[0] : ""; + } + + function postcommaToken(state) { + var objs = state.tokenStack.slice(0,-1); + var i = getTokenIndex(objs,"type",["open_paren"]); + + return truthy(objs[i]) ? objs[i] : false; + } + + function defaultToken(state) { + var objs = state.tokenStack; + var stop = getTokenIndex(objs,"type",["open_paren","separator","keyword"]); + var oper = getTokenIndex(objs,"type",["operator"]); + + if (truthy(stop) && truthy(oper) && stop < oper) { + return objs[stop+1]; + } else if (truthy(stop)) { + return objs[stop]; + } else { + return false; + } + } + + function getToken(state,tokens) { + var objs = state.tokenStack; + var i = getTokenIndex(objs,"token",tokens); + + return truthy(objs[i]) ? objs[i] : false; + } + + function getTokenIndex(objs,propname,propvals) { + + for (var i = objs.length-1; -1 < i ; i--) { + if (is_member(objs[i][propname],propvals)) { + return i; + } + } + return false; + } + + function truthy(x) { + return (x !== false) && (x != null); + } + +///////////////////////////////////////////////////////////////////////////// +// this object defines the mode + + return { + startState: + function() { + return {tokenStack: [], + in_string: false, + in_atom: false}; + }, + + token: + function(stream, state) { + return tokenizer(stream, state); + }, + + indent: + function(state, textAfter) { + return indenter(state,textAfter); + }, + + lineComment: "%" + }; +}); + +}); diff --git a/js/codemirror/mode/erlang/index.html b/js/codemirror/mode/erlang/index.html new file mode 100644 index 0000000..56d1dc6 --- /dev/null +++ b/js/codemirror/mode/erlang/index.html @@ -0,0 +1,76 @@ + + +CodeMirror: Erlang mode + + + + + + + + + + + +
+

Erlang mode

+
+ + + +

MIME types defined: text/x-erlang.

+
diff --git a/js/codemirror/mode/factor/factor.js b/js/codemirror/mode/factor/factor.js new file mode 100644 index 0000000..5111447 --- /dev/null +++ b/js/codemirror/mode/factor/factor.js @@ -0,0 +1,85 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Factor syntax highlight - simple mode +// +// by Dimage Sapelkin (https://github.com/kerabromsmu) + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../../addon/mode/simple")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../../addon/mode/simple"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineSimpleMode("factor", { + // The start state contains the rules that are initially used + start: [ + // comments + {regex: /#?!.*/, token: "comment"}, + // strings """, multiline --> state + {regex: /"""/, token: "string", next: "string3"}, + {regex: /(STRING:)(\s)/, token: ["keyword", null], next: "string2"}, + {regex: /\S*?"/, token: "string", next: "string"}, + // numbers: dec, hex, unicode, bin, fractional, complex + {regex: /(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\-?\d+.?\d*)(?=\s)/, token: "number"}, + //{regex: /[+-]?/} //fractional + // definition: defining word, defined word, etc + {regex: /((?:GENERIC)|\:?\:)(\s+)(\S+)(\s+)(\()/, token: ["keyword", null, "def", null, "bracket"], next: "stack"}, + // method definition: defining word, type, defined word, etc + {regex: /(M\:)(\s+)(\S+)(\s+)(\S+)/, token: ["keyword", null, "def", null, "tag"]}, + // vocabulary using --> state + {regex: /USING\:/, token: "keyword", next: "vocabulary"}, + // vocabulary definition/use + {regex: /(USE\:|IN\:)(\s+)(\S+)(?=\s|$)/, token: ["keyword", null, "tag"]}, + // definition: a defining word, defined word + {regex: /(\S+\:)(\s+)(\S+)(?=\s|$)/, token: ["keyword", null, "def"]}, + // "keywords", incl. ; t f . [ ] { } defining words + {regex: /(?:;|\\|t|f|if|loop|while|until|do|PRIVATE>| and the like + {regex: /\S+[\)>\.\*\?]+(?=\s|$)/, token: "builtin"}, + {regex: /[\)><]+\S+(?=\s|$)/, token: "builtin"}, + // operators + {regex: /(?:[\+\-\=\/\*<>])(?=\s|$)/, token: "keyword"}, + // any id (?) + {regex: /\S+/, token: "variable"}, + {regex: /\s+|./, token: null} + ], + vocabulary: [ + {regex: /;/, token: "keyword", next: "start"}, + {regex: /\S+/, token: "tag"}, + {regex: /\s+|./, token: null} + ], + string: [ + {regex: /(?:[^\\]|\\.)*?"/, token: "string", next: "start"}, + {regex: /.*/, token: "string"} + ], + string2: [ + {regex: /^;/, token: "keyword", next: "start"}, + {regex: /.*/, token: "string"} + ], + string3: [ + {regex: /(?:[^\\]|\\.)*?"""/, token: "string", next: "start"}, + {regex: /.*/, token: "string"} + ], + stack: [ + {regex: /\)/, token: "bracket", next: "start"}, + {regex: /--/, token: "bracket"}, + {regex: /\S+/, token: "meta"}, + {regex: /\s+|./, token: null} + ], + // The meta property contains global information about the mode. It + // can contain properties like lineComment, which are supported by + // all modes, and also directives like dontIndentStates, which are + // specific to simple modes. + meta: { + dontIndentStates: ["start", "vocabulary", "string", "string3", "stack"], + lineComment: "!" + } + }); + + CodeMirror.defineMIME("text/x-factor", "factor"); +}); diff --git a/js/codemirror/mode/factor/index.html b/js/codemirror/mode/factor/index.html new file mode 100644 index 0000000..80863b7 --- /dev/null +++ b/js/codemirror/mode/factor/index.html @@ -0,0 +1,77 @@ + + +CodeMirror: Factor mode + + + + + + + + + + + +
+ +

Factor mode

+ +
+
+ + +

+

Simple mode that handles Factor Syntax (Factor on Wikipedia).

+ +

MIME types defined: text/x-factor.

+ +
diff --git a/js/codemirror/mode/fcl/fcl.js b/js/codemirror/mode/fcl/fcl.js new file mode 100644 index 0000000..07f3ef1 --- /dev/null +++ b/js/codemirror/mode/fcl/fcl.js @@ -0,0 +1,173 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("fcl", function(config) { + var indentUnit = config.indentUnit; + + var keywords = { + "term": true, + "method": true, "accu": true, + "rule": true, "then": true, "is": true, "and": true, "or": true, + "if": true, "default": true + }; + + var start_blocks = { + "var_input": true, + "var_output": true, + "fuzzify": true, + "defuzzify": true, + "function_block": true, + "ruleblock": true + }; + + var end_blocks = { + "end_ruleblock": true, + "end_defuzzify": true, + "end_function_block": true, + "end_fuzzify": true, + "end_var": true + }; + + var atoms = { + "true": true, "false": true, "nan": true, + "real": true, "min": true, "max": true, "cog": true, "cogs": true + }; + + var isOperatorChar = /[+\-*&^%:=<>!|\/]/; + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (/[\d\.]/.test(ch)) { + if (ch == ".") { + stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/); + } else if (ch == "0") { + stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/); + } else { + stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/); + } + return "number"; + } + + if (ch == "/" || ch == "(") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + + var cur = stream.current().toLowerCase(); + if (keywords.propertyIsEnumerable(cur) || + start_blocks.propertyIsEnumerable(cur) || + end_blocks.propertyIsEnumerable(cur)) { + return "keyword"; + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if ((ch == "/" || ch == ")") && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + + function popContext(state) { + if (!state.context.prev) return; + var t = state.context.type; + if (t == "end_block") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + var cur = stream.current().toLowerCase(); + + if (start_blocks.propertyIsEnumerable(cur)) pushContext(state, stream.column(), "end_block"); + else if (end_blocks.propertyIsEnumerable(cur)) popContext(state); + + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return 0; + var ctx = state.context; + + var closing = end_blocks.propertyIsEnumerable(textAfter); + if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "ryk", + fold: "brace", + blockCommentStart: "(*", + blockCommentEnd: "*)", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME("text/x-fcl", "fcl"); +}); diff --git a/js/codemirror/mode/fcl/index.html b/js/codemirror/mode/fcl/index.html new file mode 100644 index 0000000..fd74281 --- /dev/null +++ b/js/codemirror/mode/fcl/index.html @@ -0,0 +1,108 @@ + + +CodeMirror: FCL mode + + + + + + + + + + + +
+

FCL mode

+
+ + + +

MIME type: text/x-fcl

+
diff --git a/js/codemirror/mode/forth/forth.js b/js/codemirror/mode/forth/forth.js new file mode 100644 index 0000000..36959ae --- /dev/null +++ b/js/codemirror/mode/forth/forth.js @@ -0,0 +1,180 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Author: Aliaksei Chapyzhenka + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + function toWordList(words) { + var ret = []; + words.split(' ').forEach(function(e){ + ret.push({name: e}); + }); + return ret; + } + + var coreWordList = toWordList( +'INVERT AND OR XOR\ + 2* 2/ LSHIFT RSHIFT\ + 0= = 0< < > U< MIN MAX\ + 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP\ + >R R> R@\ + + - 1+ 1- ABS NEGATE\ + S>D * M* UM*\ + FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD\ + HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2!\ + ALIGN ALIGNED +! ALLOT\ + CHAR [CHAR] [ ] BL\ + FIND EXECUTE IMMEDIATE COUNT LITERAL STATE\ + ; DOES> >BODY\ + EVALUATE\ + SOURCE >IN\ + <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL\ + FILL MOVE\ + . CR EMIT SPACE SPACES TYPE U. .R U.R\ + ACCEPT\ + TRUE FALSE\ + <> U> 0<> 0>\ + NIP TUCK ROLL PICK\ + 2>R 2R@ 2R>\ + WITHIN UNUSED MARKER\ + I J\ + TO\ + COMPILE, [COMPILE]\ + SAVE-INPUT RESTORE-INPUT\ + PAD ERASE\ + 2LITERAL DNEGATE\ + D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS\ + M+ M*/ D. D.R 2ROT DU<\ + CATCH THROW\ + FREE RESIZE ALLOCATE\ + CS-PICK CS-ROLL\ + GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER\ + PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER\ + -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL'); + + var immediateWordList = toWordList('IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE'); + + CodeMirror.defineMode('forth', function() { + function searchWordList (wordList, word) { + var i; + for (i = wordList.length - 1; i >= 0; i--) { + if (wordList[i].name === word.toUpperCase()) { + return wordList[i]; + } + } + return undefined; + } + return { + startState: function() { + return { + state: '', + base: 10, + coreWordList: coreWordList, + immediateWordList: immediateWordList, + wordList: [] + }; + }, + token: function (stream, stt) { + var mat; + if (stream.eatSpace()) { + return null; + } + if (stt.state === '') { // interpretation + if (stream.match(/^(\]|:NONAME)(\s|$)/i)) { + stt.state = ' compilation'; + return 'builtin compilation'; + } + mat = stream.match(/^(\:)\s+(\S+)(\s|$)+/); + if (mat) { + stt.wordList.push({name: mat[2].toUpperCase()}); + stt.state = ' compilation'; + return 'def' + stt.state; + } + mat = stream.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i); + if (mat) { + stt.wordList.push({name: mat[2].toUpperCase()}); + return 'def' + stt.state; + } + mat = stream.match(/^(\'|\[\'\])\s+(\S+)(\s|$)+/); + if (mat) { + return 'builtin' + stt.state; + } + } else { // compilation + // ; [ + if (stream.match(/^(\;|\[)(\s)/)) { + stt.state = ''; + stream.backUp(1); + return 'builtin compilation'; + } + if (stream.match(/^(\;|\[)($)/)) { + stt.state = ''; + return 'builtin compilation'; + } + if (stream.match(/^(POSTPONE)\s+\S+(\s|$)+/)) { + return 'builtin'; + } + } + + // dynamic wordlist + mat = stream.match(/^(\S+)(\s+|$)/); + if (mat) { + if (searchWordList(stt.wordList, mat[1]) !== undefined) { + return 'variable' + stt.state; + } + + // comments + if (mat[1] === '\\') { + stream.skipToEnd(); + return 'comment' + stt.state; + } + + // core words + if (searchWordList(stt.coreWordList, mat[1]) !== undefined) { + return 'builtin' + stt.state; + } + if (searchWordList(stt.immediateWordList, mat[1]) !== undefined) { + return 'keyword' + stt.state; + } + + if (mat[1] === '(') { + stream.eatWhile(function (s) { return s !== ')'; }); + stream.eat(')'); + return 'comment' + stt.state; + } + + // // strings + if (mat[1] === '.(') { + stream.eatWhile(function (s) { return s !== ')'; }); + stream.eat(')'); + return 'string' + stt.state; + } + if (mat[1] === 'S"' || mat[1] === '."' || mat[1] === 'C"') { + stream.eatWhile(function (s) { return s !== '"'; }); + stream.eat('"'); + return 'string' + stt.state; + } + + // numbers + if (mat[1] - 0xfffffffff) { + return 'number' + stt.state; + } + // if (mat[1].match(/^[-+]?[0-9]+\.[0-9]*/)) { + // return 'number' + stt.state; + // } + + return 'atom' + stt.state; + } + } + }; + }); + CodeMirror.defineMIME("text/x-forth", "forth"); +}); diff --git a/js/codemirror/mode/forth/index.html b/js/codemirror/mode/forth/index.html new file mode 100644 index 0000000..43c94e0 --- /dev/null +++ b/js/codemirror/mode/forth/index.html @@ -0,0 +1,75 @@ + + +CodeMirror: Forth mode + + + + + + + + + + + +
+ +

Forth mode

+ +
+
+ + + +

Simple mode that handle Forth-Syntax (Forth on Wikipedia).

+ +

MIME types defined: text/x-forth.

+ +
diff --git a/js/codemirror/mode/fortran/fortran.js b/js/codemirror/mode/fortran/fortran.js new file mode 100644 index 0000000..1ca5b7b --- /dev/null +++ b/js/codemirror/mode/fortran/fortran.js @@ -0,0 +1,188 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("fortran", function() { + function words(array) { + var keys = {}; + for (var i = 0; i < array.length; ++i) { + keys[array[i]] = true; + } + return keys; + } + + var keywords = words([ + "abstract", "accept", "allocatable", "allocate", + "array", "assign", "asynchronous", "backspace", + "bind", "block", "byte", "call", "case", + "class", "close", "common", "contains", + "continue", "cycle", "data", "deallocate", + "decode", "deferred", "dimension", "do", + "elemental", "else", "encode", "end", + "endif", "entry", "enumerator", "equivalence", + "exit", "external", "extrinsic", "final", + "forall", "format", "function", "generic", + "go", "goto", "if", "implicit", "import", "include", + "inquire", "intent", "interface", "intrinsic", + "module", "namelist", "non_intrinsic", + "non_overridable", "none", "nopass", + "nullify", "open", "optional", "options", + "parameter", "pass", "pause", "pointer", + "print", "private", "program", "protected", + "public", "pure", "read", "recursive", "result", + "return", "rewind", "save", "select", "sequence", + "stop", "subroutine", "target", "then", "to", "type", + "use", "value", "volatile", "where", "while", + "write"]); + var builtins = words(["abort", "abs", "access", "achar", "acos", + "adjustl", "adjustr", "aimag", "aint", "alarm", + "all", "allocated", "alog", "amax", "amin", + "amod", "and", "anint", "any", "asin", + "associated", "atan", "besj", "besjn", "besy", + "besyn", "bit_size", "btest", "cabs", "ccos", + "ceiling", "cexp", "char", "chdir", "chmod", + "clog", "cmplx", "command_argument_count", + "complex", "conjg", "cos", "cosh", "count", + "cpu_time", "cshift", "csin", "csqrt", "ctime", + "c_funloc", "c_loc", "c_associated", "c_null_ptr", + "c_null_funptr", "c_f_pointer", "c_null_char", + "c_alert", "c_backspace", "c_form_feed", + "c_new_line", "c_carriage_return", + "c_horizontal_tab", "c_vertical_tab", "dabs", + "dacos", "dasin", "datan", "date_and_time", + "dbesj", "dbesj", "dbesjn", "dbesy", "dbesy", + "dbesyn", "dble", "dcos", "dcosh", "ddim", "derf", + "derfc", "dexp", "digits", "dim", "dint", "dlog", + "dlog", "dmax", "dmin", "dmod", "dnint", + "dot_product", "dprod", "dsign", "dsinh", + "dsin", "dsqrt", "dtanh", "dtan", "dtime", + "eoshift", "epsilon", "erf", "erfc", "etime", + "exit", "exp", "exponent", "extends_type_of", + "fdate", "fget", "fgetc", "float", "floor", + "flush", "fnum", "fputc", "fput", "fraction", + "fseek", "fstat", "ftell", "gerror", "getarg", + "get_command", "get_command_argument", + "get_environment_variable", "getcwd", + "getenv", "getgid", "getlog", "getpid", + "getuid", "gmtime", "hostnm", "huge", "iabs", + "iachar", "iand", "iargc", "ibclr", "ibits", + "ibset", "ichar", "idate", "idim", "idint", + "idnint", "ieor", "ierrno", "ifix", "imag", + "imagpart", "index", "int", "ior", "irand", + "isatty", "ishft", "ishftc", "isign", + "iso_c_binding", "is_iostat_end", "is_iostat_eor", + "itime", "kill", "kind", "lbound", "len", "len_trim", + "lge", "lgt", "link", "lle", "llt", "lnblnk", "loc", + "log", "logical", "long", "lshift", "lstat", "ltime", + "matmul", "max", "maxexponent", "maxloc", "maxval", + "mclock", "merge", "move_alloc", "min", "minexponent", + "minloc", "minval", "mod", "modulo", "mvbits", + "nearest", "new_line", "nint", "not", "or", "pack", + "perror", "precision", "present", "product", "radix", + "rand", "random_number", "random_seed", "range", + "real", "realpart", "rename", "repeat", "reshape", + "rrspacing", "rshift", "same_type_as", "scale", + "scan", "second", "selected_int_kind", + "selected_real_kind", "set_exponent", "shape", + "short", "sign", "signal", "sinh", "sin", "sleep", + "sngl", "spacing", "spread", "sqrt", "srand", "stat", + "sum", "symlnk", "system", "system_clock", "tan", + "tanh", "time", "tiny", "transfer", "transpose", + "trim", "ttynam", "ubound", "umask", "unlink", + "unpack", "verify", "xor", "zabs", "zcos", "zexp", + "zlog", "zsin", "zsqrt"]); + + var dataTypes = words(["c_bool", "c_char", "c_double", "c_double_complex", + "c_float", "c_float_complex", "c_funptr", "c_int", + "c_int16_t", "c_int32_t", "c_int64_t", "c_int8_t", + "c_int_fast16_t", "c_int_fast32_t", "c_int_fast64_t", + "c_int_fast8_t", "c_int_least16_t", "c_int_least32_t", + "c_int_least64_t", "c_int_least8_t", "c_intmax_t", + "c_intptr_t", "c_long", "c_long_double", + "c_long_double_complex", "c_long_long", "c_ptr", + "c_short", "c_signed_char", "c_size_t", "character", + "complex", "double", "integer", "logical", "real"]); + var isOperatorChar = /[+\-*&=<>\/\:]/; + var litOperator = /^\.(and|or|eq|lt|le|gt|ge|ne|not|eqv|neqv)\./i; + + function tokenBase(stream, state) { + + if (stream.match(litOperator)){ + return 'operator'; + } + + var ch = stream.next(); + if (ch == "!") { + stream.skipToEnd(); + return "comment"; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]\(\),]/.test(ch)) { + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var word = stream.current().toLowerCase(); + + if (keywords.hasOwnProperty(word)){ + return 'keyword'; + } + if (builtins.hasOwnProperty(word) || dataTypes.hasOwnProperty(word)) { + return 'builtin'; + } + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end || !escaped) state.tokenize = null; + return "string"; + }; + } + + // Interface + + return { + startState: function() { + return {tokenize: null}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + return style; + } + }; +}); + +CodeMirror.defineMIME("text/x-fortran", "fortran"); + +}); diff --git a/js/codemirror/mode/fortran/index.html b/js/codemirror/mode/fortran/index.html new file mode 100644 index 0000000..48f5bbb --- /dev/null +++ b/js/codemirror/mode/fortran/index.html @@ -0,0 +1,81 @@ + + +CodeMirror: Fortran mode + + + + + + + + + +
+

Fortran mode

+ + +
+ + + +

MIME types defined: text/x-fortran.

+
diff --git a/js/codemirror/mode/gas/gas.js b/js/codemirror/mode/gas/gas.js new file mode 100644 index 0000000..db09a8a --- /dev/null +++ b/js/codemirror/mode/gas/gas.js @@ -0,0 +1,353 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("gas", function(_config, parserConfig) { + 'use strict'; + + // If an architecture is specified, its initialization function may + // populate this array with custom parsing functions which will be + // tried in the event that the standard functions do not find a match. + var custom = []; + + // The symbol used to start a line comment changes based on the target + // architecture. + // If no architecture is pased in "parserConfig" then only multiline + // comments will have syntax support. + var lineCommentStartSymbol = ""; + + // These directives are architecture independent. + // Machine specific directives should go in their respective + // architecture initialization function. + // Reference: + // http://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops + var directives = { + ".abort" : "builtin", + ".align" : "builtin", + ".altmacro" : "builtin", + ".ascii" : "builtin", + ".asciz" : "builtin", + ".balign" : "builtin", + ".balignw" : "builtin", + ".balignl" : "builtin", + ".bundle_align_mode" : "builtin", + ".bundle_lock" : "builtin", + ".bundle_unlock" : "builtin", + ".byte" : "builtin", + ".cfi_startproc" : "builtin", + ".comm" : "builtin", + ".data" : "builtin", + ".def" : "builtin", + ".desc" : "builtin", + ".dim" : "builtin", + ".double" : "builtin", + ".eject" : "builtin", + ".else" : "builtin", + ".elseif" : "builtin", + ".end" : "builtin", + ".endef" : "builtin", + ".endfunc" : "builtin", + ".endif" : "builtin", + ".equ" : "builtin", + ".equiv" : "builtin", + ".eqv" : "builtin", + ".err" : "builtin", + ".error" : "builtin", + ".exitm" : "builtin", + ".extern" : "builtin", + ".fail" : "builtin", + ".file" : "builtin", + ".fill" : "builtin", + ".float" : "builtin", + ".func" : "builtin", + ".global" : "builtin", + ".gnu_attribute" : "builtin", + ".hidden" : "builtin", + ".hword" : "builtin", + ".ident" : "builtin", + ".if" : "builtin", + ".incbin" : "builtin", + ".include" : "builtin", + ".int" : "builtin", + ".internal" : "builtin", + ".irp" : "builtin", + ".irpc" : "builtin", + ".lcomm" : "builtin", + ".lflags" : "builtin", + ".line" : "builtin", + ".linkonce" : "builtin", + ".list" : "builtin", + ".ln" : "builtin", + ".loc" : "builtin", + ".loc_mark_labels" : "builtin", + ".local" : "builtin", + ".long" : "builtin", + ".macro" : "builtin", + ".mri" : "builtin", + ".noaltmacro" : "builtin", + ".nolist" : "builtin", + ".octa" : "builtin", + ".offset" : "builtin", + ".org" : "builtin", + ".p2align" : "builtin", + ".popsection" : "builtin", + ".previous" : "builtin", + ".print" : "builtin", + ".protected" : "builtin", + ".psize" : "builtin", + ".purgem" : "builtin", + ".pushsection" : "builtin", + ".quad" : "builtin", + ".reloc" : "builtin", + ".rept" : "builtin", + ".sbttl" : "builtin", + ".scl" : "builtin", + ".section" : "builtin", + ".set" : "builtin", + ".short" : "builtin", + ".single" : "builtin", + ".size" : "builtin", + ".skip" : "builtin", + ".sleb128" : "builtin", + ".space" : "builtin", + ".stab" : "builtin", + ".string" : "builtin", + ".struct" : "builtin", + ".subsection" : "builtin", + ".symver" : "builtin", + ".tag" : "builtin", + ".text" : "builtin", + ".title" : "builtin", + ".type" : "builtin", + ".uleb128" : "builtin", + ".val" : "builtin", + ".version" : "builtin", + ".vtable_entry" : "builtin", + ".vtable_inherit" : "builtin", + ".warning" : "builtin", + ".weak" : "builtin", + ".weakref" : "builtin", + ".word" : "builtin" + }; + + var registers = {}; + + function x86(_parserConfig) { + lineCommentStartSymbol = "#"; + + registers.al = "variable"; + registers.ah = "variable"; + registers.ax = "variable"; + registers.eax = "variable-2"; + registers.rax = "variable-3"; + + registers.bl = "variable"; + registers.bh = "variable"; + registers.bx = "variable"; + registers.ebx = "variable-2"; + registers.rbx = "variable-3"; + + registers.cl = "variable"; + registers.ch = "variable"; + registers.cx = "variable"; + registers.ecx = "variable-2"; + registers.rcx = "variable-3"; + + registers.dl = "variable"; + registers.dh = "variable"; + registers.dx = "variable"; + registers.edx = "variable-2"; + registers.rdx = "variable-3"; + + registers.si = "variable"; + registers.esi = "variable-2"; + registers.rsi = "variable-3"; + + registers.di = "variable"; + registers.edi = "variable-2"; + registers.rdi = "variable-3"; + + registers.sp = "variable"; + registers.esp = "variable-2"; + registers.rsp = "variable-3"; + + registers.bp = "variable"; + registers.ebp = "variable-2"; + registers.rbp = "variable-3"; + + registers.ip = "variable"; + registers.eip = "variable-2"; + registers.rip = "variable-3"; + + registers.cs = "keyword"; + registers.ds = "keyword"; + registers.ss = "keyword"; + registers.es = "keyword"; + registers.fs = "keyword"; + registers.gs = "keyword"; + } + + function armv6(_parserConfig) { + // Reference: + // http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf + // http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301h/DDI0301H_arm1176jzfs_r0p7_trm.pdf + lineCommentStartSymbol = "@"; + directives.syntax = "builtin"; + + registers.r0 = "variable"; + registers.r1 = "variable"; + registers.r2 = "variable"; + registers.r3 = "variable"; + registers.r4 = "variable"; + registers.r5 = "variable"; + registers.r6 = "variable"; + registers.r7 = "variable"; + registers.r8 = "variable"; + registers.r9 = "variable"; + registers.r10 = "variable"; + registers.r11 = "variable"; + registers.r12 = "variable"; + + registers.sp = "variable-2"; + registers.lr = "variable-2"; + registers.pc = "variable-2"; + registers.r13 = registers.sp; + registers.r14 = registers.lr; + registers.r15 = registers.pc; + + custom.push(function(ch, stream) { + if (ch === '#') { + stream.eatWhile(/\w/); + return "number"; + } + }); + } + + var arch = (parserConfig.architecture || "x86").toLowerCase(); + if (arch === "x86") { + x86(parserConfig); + } else if (arch === "arm" || arch === "armv6") { + armv6(parserConfig); + } + + function nextUntilUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next === end && !escaped) { + return false; + } + escaped = !escaped && next === "\\"; + } + return escaped; + } + + function clikeComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (ch === "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch === "*"); + } + return "comment"; + } + + return { + startState: function() { + return { + tokenize: null + }; + }, + + token: function(stream, state) { + if (state.tokenize) { + return state.tokenize(stream, state); + } + + if (stream.eatSpace()) { + return null; + } + + var style, cur, ch = stream.next(); + + if (ch === "/") { + if (stream.eat("*")) { + state.tokenize = clikeComment; + return clikeComment(stream, state); + } + } + + if (ch === lineCommentStartSymbol) { + stream.skipToEnd(); + return "comment"; + } + + if (ch === '"') { + nextUntilUnescaped(stream, '"'); + return "string"; + } + + if (ch === '.') { + stream.eatWhile(/\w/); + cur = stream.current().toLowerCase(); + style = directives[cur]; + return style || null; + } + + if (ch === '=') { + stream.eatWhile(/\w/); + return "tag"; + } + + if (ch === '{') { + return "bracket"; + } + + if (ch === '}') { + return "bracket"; + } + + if (/\d/.test(ch)) { + if (ch === "0" && stream.eat("x")) { + stream.eatWhile(/[0-9a-fA-F]/); + return "number"; + } + stream.eatWhile(/\d/); + return "number"; + } + + if (/\w/.test(ch)) { + stream.eatWhile(/\w/); + if (stream.eat(":")) { + return 'tag'; + } + cur = stream.current().toLowerCase(); + style = registers[cur]; + return style || null; + } + + for (var i = 0; i < custom.length; i++) { + style = custom[i](ch, stream, state); + if (style) { + return style; + } + } + }, + + lineComment: lineCommentStartSymbol, + blockCommentStart: "/*", + blockCommentEnd: "*/" + }; +}); + +}); diff --git a/js/codemirror/mode/gas/index.html b/js/codemirror/mode/gas/index.html new file mode 100644 index 0000000..c5945ca --- /dev/null +++ b/js/codemirror/mode/gas/index.html @@ -0,0 +1,68 @@ + + +CodeMirror: Gas mode + + + + + + + + + +
+

Gas mode

+
+ +
+ + + +

Handles AT&T assembler syntax (more specifically this handles + the GNU Assembler (gas) syntax.) + It takes a single optional configuration parameter: + architecture, which can be one of "ARM", + "ARMv6" or "x86". + Including the parameter adds syntax for the registers and special + directives for the supplied architecture. + +

MIME types defined: text/x-gas

+
diff --git a/js/codemirror/mode/gfm/gfm.js b/js/codemirror/mode/gfm/gfm.js new file mode 100644 index 0000000..65288d7 --- /dev/null +++ b/js/codemirror/mode/gfm/gfm.js @@ -0,0 +1,129 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../markdown/markdown"), require("../../addon/mode/overlay")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../markdown/markdown", "../../addon/mode/overlay"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +var urlRE = /^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i + +CodeMirror.defineMode("gfm", function(config, modeConfig) { + var codeDepth = 0; + function blankLine(state) { + state.code = false; + return null; + } + var gfmOverlay = { + startState: function() { + return { + code: false, + codeBlock: false, + ateSpace: false + }; + }, + copyState: function(s) { + return { + code: s.code, + codeBlock: s.codeBlock, + ateSpace: s.ateSpace + }; + }, + token: function(stream, state) { + state.combineTokens = null; + + // Hack to prevent formatting override inside code blocks (block and inline) + if (state.codeBlock) { + if (stream.match(/^```+/)) { + state.codeBlock = false; + return null; + } + stream.skipToEnd(); + return null; + } + if (stream.sol()) { + state.code = false; + } + if (stream.sol() && stream.match(/^```+/)) { + stream.skipToEnd(); + state.codeBlock = true; + return null; + } + // If this block is changed, it may need to be updated in Markdown mode + if (stream.peek() === '`') { + stream.next(); + var before = stream.pos; + stream.eatWhile('`'); + var difference = 1 + stream.pos - before; + if (!state.code) { + codeDepth = difference; + state.code = true; + } else { + if (difference === codeDepth) { // Must be exact + state.code = false; + } + } + return null; + } else if (state.code) { + stream.next(); + return null; + } + // Check if space. If so, links can be formatted later on + if (stream.eatSpace()) { + state.ateSpace = true; + return null; + } + if (stream.sol() || state.ateSpace) { + state.ateSpace = false; + if (modeConfig.gitHubSpice !== false) { + if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/)) { + // User/Project@SHA + // User@SHA + // SHA + state.combineTokens = true; + return "link"; + } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) { + // User/Project#Num + // User#Num + // #Num + state.combineTokens = true; + return "link"; + } + } + } + if (stream.match(urlRE) && + stream.string.slice(stream.start - 2, stream.start) != "](" && + (stream.start == 0 || /\W/.test(stream.string.charAt(stream.start - 1)))) { + // URLs + // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls + // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine + // And then limited url schemes to the CommonMark list, so foo:bar isn't matched as a URL + state.combineTokens = true; + return "link"; + } + stream.next(); + return null; + }, + blankLine: blankLine + }; + + var markdownConfig = { + taskLists: true, + strikethrough: true, + emoji: true + }; + for (var attr in modeConfig) { + markdownConfig[attr] = modeConfig[attr]; + } + markdownConfig.name = "markdown"; + return CodeMirror.overlayMode(CodeMirror.getMode(config, markdownConfig), gfmOverlay); + +}, "markdown"); + + CodeMirror.defineMIME("text/x-gfm", "gfm"); +}); diff --git a/js/codemirror/mode/gfm/index.html b/js/codemirror/mode/gfm/index.html new file mode 100644 index 0000000..0166e21 --- /dev/null +++ b/js/codemirror/mode/gfm/index.html @@ -0,0 +1,136 @@ + + +CodeMirror: GFM mode + + + + + + + + + + + + + + + + + +
+

GFM mode

+
+ + + +

Optionally depends on other modes for properly highlighted code blocks.

+ +

Gfm mode supports these options (apart those from base Markdown mode):

+
    +
  • + +
    gitHubSpice: boolean
    +
    Hashes, issues... (default: true).
    +
    +
  • +
  • + +
    taskLists: boolean
    +
    - [ ] syntax (default: true).
    +
    +
  • +
  • + +
    strikethrough: boolean
    +
    ~~foo~~ syntax (default: true).
    +
    +
  • +
  • + +
    emoji: boolean
    +
    :emoji: syntax (default: true).
    +
    +
  • +
+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/gfm/test.js b/js/codemirror/mode/gfm/test.js new file mode 100644 index 0000000..6443876 --- /dev/null +++ b/js/codemirror/mode/gfm/test.js @@ -0,0 +1,198 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var config = {tabSize: 4, indentUnit: 2} + var mode = CodeMirror.getMode(config, "gfm"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + var modeHighlightFormatting = CodeMirror.getMode(config, {name: "gfm", highlightFormatting: true}); + function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); } + + FT("codeBackticks", + "[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]"); + + FT("doubleBackticks", + "[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]"); + + FT("taskList", + "[variable-2&formatting&formatting-list&formatting-list-ul - ][meta&formatting&formatting-task [ ]]][variable-2 foo]", + "[variable-2&formatting&formatting-list&formatting-list-ul - ][property&formatting&formatting-task [x]]][variable-2 foo]"); + + FT("formatting_strikethrough", + "[strikethrough&formatting&formatting-strikethrough ~~][strikethrough foo][strikethrough&formatting&formatting-strikethrough ~~]"); + + FT("formatting_strikethrough", + "foo [strikethrough&formatting&formatting-strikethrough ~~][strikethrough bar][strikethrough&formatting&formatting-strikethrough ~~]"); + + FT("formatting_emoji", + "foo [builtin&formatting&formatting-emoji :smile:] foo"); + + MT("emInWordAsterisk", + "foo[em *bar*]hello"); + + MT("emInWordUnderscore", + "foo_bar_hello"); + + MT("emStrongUnderscore", + "[em&strong ___foo___] bar"); + + MT("taskListAsterisk", + "[variable-2 * ][link&variable-2 [[]]][variable-2 foo]", // Invalid; must have space or x between [] + "[variable-2 * ][link&variable-2 [[ ]]][variable-2 bar]", // Invalid; must have space after ] + "[variable-2 * ][link&variable-2 [[x]]][variable-2 hello]", // Invalid; must have space after ] + "[variable-2 * ][meta [ ]]][variable-2 ][link&variable-2 [[world]]]", // Valid; tests reference style links + " [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("taskListPlus", + "[variable-2 + ][link&variable-2 [[]]][variable-2 foo]", // Invalid; must have space or x between [] + "[variable-2 + ][link&variable-2 [[x]]][variable-2 hello]", // Invalid; must have space after ] + "[variable-2 + ][meta [ ]]][variable-2 ][link&variable-2 [[world]]]", // Valid; tests reference style links + " [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("taskListDash", + "[variable-2 - ][link&variable-2 [[]]][variable-2 foo]", // Invalid; must have space or x between [] + "[variable-2 - ][link&variable-2 [[x]]][variable-2 hello]", // Invalid; must have space after ] + "[variable-2 - ][meta [ ]]][variable-2 world]", // Valid; tests reference style links + " [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("taskListNumber", + "[variable-2 1. ][link&variable-2 [[]]][variable-2 foo]", // Invalid; must have space or x between [] + "[variable-2 2. ][link&variable-2 [[ ]]][variable-2 bar]", // Invalid; must have space after ] + "[variable-2 3. ][meta [ ]]][variable-2 world]", // Valid; tests reference style links + " [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("SHA", + "foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar"); + + MT("SHAEmphasis", + "[em *foo ][em&link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]"); + + MT("shortSHA", + "foo [link be6a8cc] bar"); + + MT("tooShortSHA", + "foo be6a8c bar"); + + MT("longSHA", + "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar"); + + MT("badSHA", + "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar"); + + MT("userSHA", + "foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello"); + + MT("userSHAEmphasis", + "[em *foo ][em&link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]"); + + MT("userProjectSHA", + "foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world"); + + MT("userProjectSHAEmphasis", + "[em *foo ][em&link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2][em *]"); + + MT("wordSHA", + "ask for feedback") + + MT("num", + "foo [link #1] bar"); + + MT("numEmphasis", + "[em *foo ][em&link #1][em *]"); + + MT("badNum", + "foo #1bar hello"); + + MT("userNum", + "foo [link bar#1] hello"); + + MT("userNumEmphasis", + "[em *foo ][em&link bar#1][em *]"); + + MT("userProjectNum", + "foo [link bar/hello#1] world"); + + MT("userProjectNumEmphasis", + "[em *foo ][em&link bar/hello#1][em *]"); + + MT("vanillaLink", + "foo [link http://www.example.com/] bar"); + + MT("vanillaLinkNoScheme", + "foo [link www.example.com] bar"); + + MT("vanillaLinkHttps", + "foo [link https://www.example.com/] bar"); + + MT("vanillaLinkDataSchema", + "foo [link data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==] bar"); + + MT("vanillaLinkPunctuation", + "foo [link http://www.example.com/]. bar"); + + MT("vanillaLinkExtension", + "foo [link http://www.example.com/index.html] bar"); + + MT("vanillaLinkEmphasis", + "foo [em *][em&link http://www.example.com/index.html][em *] bar"); + + MT("notALink", + "foo asfd:asdf bar"); + + MT("notALink", + "[comment ``foo `bar` http://www.example.com/``] hello"); + + MT("notALink", + "[comment `foo]", + "[comment&link http://www.example.com/]", + "[comment `] foo", + "", + "[link http://www.example.com/]"); + + MT("strikethrough", + "[strikethrough ~~foo~~]"); + + MT("strikethroughWithStartingSpace", + "~~ foo~~"); + + MT("strikethroughUnclosedStrayTildes", + "[strikethrough ~~foo~~~]"); + + MT("strikethroughUnclosedStrayTildes", + "[strikethrough ~~foo ~~]"); + + MT("strikethroughUnclosedStrayTildes", + "[strikethrough ~~foo ~~ bar]"); + + MT("strikethroughUnclosedStrayTildes", + "[strikethrough ~~foo ~~ bar~~]hello"); + + MT("strikethroughOneLetter", + "[strikethrough ~~a~~]"); + + MT("strikethroughWrapped", + "[strikethrough ~~foo]", + "[strikethrough foo~~]"); + + MT("strikethroughParagraph", + "[strikethrough ~~foo]", + "", + "foo[strikethrough ~~bar]"); + + MT("strikethroughEm", + "[strikethrough ~~foo][em&strikethrough *bar*][strikethrough ~~]"); + + MT("strikethroughEm", + "[em *][em&strikethrough ~~foo~~][em *]"); + + MT("strikethroughStrong", + "[strikethrough ~~][strong&strikethrough **foo**][strikethrough ~~]"); + + MT("strikethroughStrong", + "[strong **][strong&strikethrough ~~foo~~][strong **]"); + + MT("emoji", + "text [builtin :blush:] text [builtin :v:] text [builtin :+1:] text", + ":text text: [builtin :smiley_cat:]"); + +})(); diff --git a/js/codemirror/mode/gherkin/gherkin.js b/js/codemirror/mode/gherkin/gherkin.js new file mode 100644 index 0000000..196543e --- /dev/null +++ b/js/codemirror/mode/gherkin/gherkin.js @@ -0,0 +1,178 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/* +Gherkin mode - http://www.cukes.info/ +Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues +*/ + +// Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js +//var Quotes = { +// SINGLE: 1, +// DOUBLE: 2 +//}; + +//var regex = { +// keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/ +//}; + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("gherkin", function () { + return { + startState: function () { + return { + lineNumber: 0, + tableHeaderLine: false, + allowFeature: true, + allowBackground: false, + allowScenario: false, + allowSteps: false, + allowPlaceholders: false, + allowMultilineArgument: false, + inMultilineString: false, + inMultilineTable: false, + inKeywordLine: false + }; + }, + token: function (stream, state) { + if (stream.sol()) { + state.lineNumber++; + state.inKeywordLine = false; + if (state.inMultilineTable) { + state.tableHeaderLine = false; + if (!stream.match(/\s*\|/, false)) { + state.allowMultilineArgument = false; + state.inMultilineTable = false; + } + } + } + + stream.eatSpace(); + + if (state.allowMultilineArgument) { + + // STRING + if (state.inMultilineString) { + if (stream.match('"""')) { + state.inMultilineString = false; + state.allowMultilineArgument = false; + } else { + stream.match(/.*/); + } + return "string"; + } + + // TABLE + if (state.inMultilineTable) { + if (stream.match(/\|\s*/)) { + return "bracket"; + } else { + stream.match(/[^\|]*/); + return state.tableHeaderLine ? "header" : "string"; + } + } + + // DETECT START + if (stream.match('"""')) { + // String + state.inMultilineString = true; + return "string"; + } else if (stream.match("|")) { + // Table + state.inMultilineTable = true; + state.tableHeaderLine = true; + return "bracket"; + } + + } + + // LINE COMMENT + if (stream.match(/#.*/)) { + return "comment"; + + // TAG + } else if (!state.inKeywordLine && stream.match(/@\S+/)) { + return "tag"; + + // FEATURE + } else if (!state.inKeywordLine && state.allowFeature && stream.match(/(機能|功能|フィーチャ|기능|โครงหลัก|ความสามารถ|ความต้องการทางธุรกิจ|ಹೆಚ್ಚಳ|గుణము|ਮੁਹਾਂਦਰਾ|ਨਕਸ਼ ਨੁਹਾਰ|ਖਾਸੀਅਤ|रूप लेख|وِیژگی|خاصية|תכונה|Функціонал|Функция|Функционалност|Функционал|Үзенчәлеклелек|Свойство|Особина|Мөмкинлек|Могућност|Λειτουργία|Δυνατότητα|Właściwość|Vlastnosť|Trajto|Tính năng|Savybė|Pretty much|Požiadavka|Požadavek|Potrzeba biznesowa|Özellik|Osobina|Ominaisuus|Omadus|OH HAI|Mogućnost|Mogucnost|Jellemző|Hwæt|Hwaet|Funzionalità|Funktionalitéit|Funktionalität|Funkcja|Funkcionalnost|Funkcionalitāte|Funkcia|Fungsi|Functionaliteit|Funcționalitate|Funcţionalitate|Functionalitate|Funcionalitat|Funcionalidade|Fonctionnalité|Fitur|Fīča|Feature|Eiginleiki|Egenskap|Egenskab|Característica|Caracteristica|Business Need|Aspekt|Arwedd|Ahoy matey!|Ability):/)) { + state.allowScenario = true; + state.allowBackground = true; + state.allowPlaceholders = false; + state.allowSteps = false; + state.allowMultilineArgument = false; + state.inKeywordLine = true; + return "keyword"; + + // BACKGROUND + } else if (!state.inKeywordLine && state.allowBackground && stream.match(/(背景|배경|แนวคิด|ಹಿನ್ನೆಲೆ|నేపథ్యం|ਪਿਛੋਕੜ|पृष्ठभूमि|زمینه|الخلفية|רקע|Тарих|Предыстория|Предистория|Позадина|Передумова|Основа|Контекст|Кереш|Υπόβαθρο|Założenia|Yo\-ho\-ho|Tausta|Taust|Situācija|Rerefons|Pozadina|Pozadie|Pozadí|Osnova|Latar Belakang|Kontext|Konteksts|Kontekstas|Kontekst|Háttér|Hannergrond|Grundlage|Geçmiş|Fundo|Fono|First off|Dis is what went down|Dasar|Contexto|Contexte|Context|Contesto|Cenário de Fundo|Cenario de Fundo|Cefndir|Bối cảnh|Bakgrunnur|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|Ær|Aer|Achtergrond):/)) { + state.allowPlaceholders = false; + state.allowSteps = true; + state.allowBackground = false; + state.allowMultilineArgument = false; + state.inKeywordLine = true; + return "keyword"; + + // SCENARIO OUTLINE + } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景大綱|场景大纲|劇本大綱|剧本大纲|テンプレ|シナリオテンプレート|シナリオテンプレ|シナリオアウトライン|시나리오 개요|สรุปเหตุการณ์|โครงสร้างของเหตุการณ์|ವಿವರಣೆ|కథనం|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਟਕਥਾ ਢਾਂਚਾ|परिदृश्य रूपरेखा|سيناريو مخطط|الگوی سناریو|תבנית תרחיש|Сценарийның төзелеше|Сценарий структураси|Структура сценарію|Структура сценария|Структура сценарија|Скица|Рамка на сценарий|Концепт|Περιγραφή Σεναρίου|Wharrimean is|Template Situai|Template Senario|Template Keadaan|Tapausaihio|Szenariogrundriss|Szablon scenariusza|Swa hwær swa|Swa hwaer swa|Struktura scenarija|Structură scenariu|Structura scenariu|Skica|Skenario konsep|Shiver me timbers|Senaryo taslağı|Schema dello scenario|Scenariomall|Scenariomal|Scenario Template|Scenario Outline|Scenario Amlinellol|Scenārijs pēc parauga|Scenarijaus šablonas|Reckon it's like|Raamstsenaarium|Plang vum Szenario|Plan du Scénario|Plan du scénario|Osnova scénáře|Osnova Scenára|Náčrt Scenáru|Náčrt Scénáře|Náčrt Scenára|MISHUN SRSLY|Menggariskan Senario|Lýsing Dæma|Lýsing Atburðarásar|Konturo de la scenaro|Koncept|Khung tình huống|Khung kịch bản|Forgatókönyv vázlat|Esquema do Cenário|Esquema do Cenario|Esquema del escenario|Esquema de l'escenari|Esbozo do escenario|Delineação do Cenário|Delineacao do Cenario|All y'all|Abstrakt Scenario|Abstract Scenario):/)) { + state.allowPlaceholders = true; + state.allowSteps = true; + state.allowMultilineArgument = false; + state.inKeywordLine = true; + return "keyword"; + + // EXAMPLES + } else if (state.allowScenario && stream.match(/(例子|例|サンプル|예|ชุดของเหตุการณ์|ชุดของตัวอย่าง|ಉದಾಹರಣೆಗಳು|ఉదాహరణలు|ਉਦਾਹਰਨਾਂ|उदाहरण|نمونه ها|امثلة|דוגמאות|Үрнәкләр|Сценарији|Примеры|Примери|Приклади|Мисоллар|Мисаллар|Σενάρια|Παραδείγματα|You'll wanna|Voorbeelden|Variantai|Tapaukset|Se þe|Se the|Se ðe|Scenarios|Scenariji|Scenarijai|Przykłady|Primjeri|Primeri|Příklady|Príklady|Piemēri|Példák|Pavyzdžiai|Paraugs|Örnekler|Juhtumid|Exemplos|Exemples|Exemple|Exempel|EXAMPLZ|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|Dữ liệu|Dead men tell no tales|Dæmi|Contoh|Cenários|Cenarios|Beispiller|Beispiele|Atburðarásir):/)) { + state.allowPlaceholders = false; + state.allowSteps = true; + state.allowBackground = false; + state.allowMultilineArgument = true; + return "keyword"; + + // SCENARIO + } else if (!state.inKeywordLine && state.allowScenario && stream.match(/(場景|场景|劇本|剧本|シナリオ|시나리오|เหตุการณ์|ಕಥಾಸಾರಾಂಶ|సన్నివేశం|ਪਟਕਥਾ|परिदृश्य|سيناريو|سناریو|תרחיש|Сценарій|Сценарио|Сценарий|Пример|Σενάριο|Tình huống|The thing of it is|Tapaus|Szenario|Swa|Stsenaarium|Skenario|Situai|Senaryo|Senario|Scenaro|Scenariusz|Scenariu|Scénario|Scenario|Scenarijus|Scenārijs|Scenarij|Scenarie|Scénář|Scenár|Primer|MISHUN|Kịch bản|Keadaan|Heave to|Forgatókönyv|Escenario|Escenari|Cenário|Cenario|Awww, look mate|Atburðarás):/)) { + state.allowPlaceholders = false; + state.allowSteps = true; + state.allowBackground = false; + state.allowMultilineArgument = false; + state.inKeywordLine = true; + return "keyword"; + + // STEPS + } else if (!state.inKeywordLine && state.allowSteps && stream.match(/(那麼|那么|而且|當|当|并且|同時|同时|前提|假设|假設|假定|假如|但是|但し|並且|もし|ならば|ただし|しかし|かつ|하지만|조건|먼저|만일|만약|단|그리고|그러면|และ |เมื่อ |แต่ |ดังนั้น |กำหนดให้ |ಸ್ಥಿತಿಯನ್ನು |ಮತ್ತು |ನೀಡಿದ |ನಂತರ |ಆದರೆ |మరియు |చెప్పబడినది |కాని |ఈ పరిస్థితిలో |అప్పుడు |ਪਰ |ਤਦ |ਜੇਕਰ |ਜਿਵੇਂ ਕਿ |ਜਦੋਂ |ਅਤੇ |यदि |परन्तु |पर |तब |तदा |तथा |जब |चूंकि |किन्तु |कदा |और |अगर |و |هنگامی |متى |لكن |عندما |ثم |بفرض |با فرض |اما |اذاً |آنگاه |כאשר |וגם |בהינתן |אזי |אז |אבל |Якщо |Һәм |Унда |Тоді |Тогда |То |Также |Та |Пусть |Припустимо, що |Припустимо |Онда |Но |Нехай |Нәтиҗәдә |Лекин |Ләкин |Коли |Когда |Когато |Када |Кад |К тому же |І |И |Задато |Задати |Задате |Если |Допустим |Дано |Дадено |Вә |Ва |Бирок |Әмма |Әйтик |Әгәр |Аммо |Али |Але |Агар |А також |А |Τότε |Όταν |Και |Δεδομένου |Αλλά |Þurh |Þegar |Þa þe |Þá |Þa |Zatati |Zakładając |Zadato |Zadate |Zadano |Zadani |Zadan |Za předpokladu |Za predpokladu |Youse know when youse got |Youse know like when |Yna |Yeah nah |Y'know |Y |Wun |Wtedy |When y'all |When |Wenn |WEN |wann |Ve |Và |Und |Un |ugeholl |Too right |Thurh |Thì |Then y'all |Then |Tha the |Tha |Tetapi |Tapi |Tak |Tada |Tad |Stel |Soit |Siis |Și |Şi |Si |Sed |Se |Så |Quando |Quand |Quan |Pryd |Potom |Pokud |Pokiaľ |Però |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |Niin |Nhưng |När |Når |Mutta |Men |Mas |Maka |Majd |Mając |Mais |Maar |mä |Ma |Lorsque |Lorsqu'|Logo |Let go and haul |Kun |Kuid |Kui |Kiedy |Khi |Ketika |Kemudian |Keď |Když |Kaj |Kai |Kada |Kad |Jeżeli |Jeśli |Ja |It's just unbelievable |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y'all |Given |Gitt |Gegeven |Gegeben seien |Gegeben sei |Gdy |Gangway! |Fakat |Étant donnés |Etant donnés |Étant données |Etant données |Étant donnée |Etant donnée |Étant donné |Etant donné |Et |És |Entonces |Entón |Então |Entao |En |Eğer ki |Ef |Eeldades |E |Ðurh |Duota |Dun |Donitaĵo |Donat |Donada |Do |Diyelim ki |Diberi |Dengan |Den youse gotta |DEN |De |Dato |Dați fiind |Daţi fiind |Dati fiind |Dati |Date fiind |Date |Data |Dat fiind |Dar |Dann |dann |Dan |Dados |Dado |Dadas |Dada |Ða ðe |Ða |Cuando |Cho |Cando |Când |Cand |Cal |But y'all |But at the end of the day I reckon |BUT |But |Buh |Blimey! |Biết |Bet |Bagi |Aye |awer |Avast! |Atunci |Atesa |Atès |Apabila |Anrhegedig a |Angenommen |And y'all |And |AN |An |an |Amikor |Amennyiben |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Ak |Adott |Ac |Aber |A zároveň |A tiež |A taktiež |A také |A |a |7 |\* )/)) { + state.inStep = true; + state.allowPlaceholders = true; + state.allowMultilineArgument = true; + state.inKeywordLine = true; + return "keyword"; + + // INLINE STRING + } else if (stream.match(/"[^"]*"?/)) { + return "string"; + + // PLACEHOLDER + } else if (state.allowPlaceholders && stream.match(/<[^>]*>?/)) { + return "variable"; + + // Fall through + } else { + stream.next(); + stream.eatWhile(/[^@"<#]/); + return null; + } + } + }; +}); + +CodeMirror.defineMIME("text/x-feature", "gherkin"); + +}); diff --git a/js/codemirror/mode/gherkin/index.html b/js/codemirror/mode/gherkin/index.html new file mode 100644 index 0000000..1f982e0 --- /dev/null +++ b/js/codemirror/mode/gherkin/index.html @@ -0,0 +1,48 @@ + + +CodeMirror: Gherkin mode + + + + + + + + + +
+

Gherkin mode

+
+ + +

MIME types defined: text/x-feature.

+ +
diff --git a/js/codemirror/mode/go/go.js b/js/codemirror/mode/go/go.js new file mode 100644 index 0000000..bd54f1a --- /dev/null +++ b/js/codemirror/mode/go/go.js @@ -0,0 +1,187 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("go", function(config) { + var indentUnit = config.indentUnit; + + var keywords = { + "break":true, "case":true, "chan":true, "const":true, "continue":true, + "default":true, "defer":true, "else":true, "fallthrough":true, "for":true, + "func":true, "go":true, "goto":true, "if":true, "import":true, + "interface":true, "map":true, "package":true, "range":true, "return":true, + "select":true, "struct":true, "switch":true, "type":true, "var":true, + "bool":true, "byte":true, "complex64":true, "complex128":true, + "float32":true, "float64":true, "int8":true, "int16":true, "int32":true, + "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true, + "uint64":true, "int":true, "uint":true, "uintptr":true, "error": true, + "rune":true, "any":true, "comparable":true + }; + + var atoms = { + "true":true, "false":true, "iota":true, "nil":true, "append":true, + "cap":true, "close":true, "complex":true, "copy":true, "delete":true, "imag":true, + "len":true, "make":true, "new":true, "panic":true, "print":true, + "println":true, "real":true, "recover":true + }; + + var isOperatorChar = /[+\-*&^%:=<>!|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'" || ch == "`") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\d\.]/.test(ch)) { + if (ch == ".") { + stream.match(/^[0-9_]+([eE][\-+]?[0-9_]+)?/); + } else if (ch == "0") { + stream.match(/^[xX][0-9a-fA-F_]+/) || stream.match(/^[0-7_]+/); + } else { + stream.match(/^[0-9_]*\.?[0-9_]*([eE][\-+]?[0-9_]+)?/); + } + return "number"; + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) { + if (cur == "case" || cur == "default") curPunc = "case"; + return "keyword"; + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && quote != "`" && next == "\\"; + } + if (end || !(escaped || quote == "`")) + state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + if (!state.context.prev) return; + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + if (ctx.type == "case") ctx.type = "}"; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "case") ctx.type = "case"; + else if (curPunc == "}" && ctx.type == "}") popContext(state); + else if (curPunc == ctx.type) popContext(state); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) { + state.context.type = "}"; + return ctx.indented; + } + var closing = firstChar == ctx.type; + if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}):", + closeBrackets: "()[]{}''\"\"``", + fold: "brace", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME("text/x-go", "go"); + +}); diff --git a/js/codemirror/mode/go/index.html b/js/codemirror/mode/go/index.html new file mode 100644 index 0000000..eeb4d80 --- /dev/null +++ b/js/codemirror/mode/go/index.html @@ -0,0 +1,85 @@ + + +CodeMirror: Go mode + + + + + + + + + + + +
+

Go mode

+
+ + + +

MIME type: text/x-go

+
diff --git a/js/codemirror/mode/groovy/groovy.js b/js/codemirror/mode/groovy/groovy.js new file mode 100644 index 0000000..89d0fe0 --- /dev/null +++ b/js/codemirror/mode/groovy/groovy.js @@ -0,0 +1,247 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("groovy", function(config) { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var keywords = words( + "abstract as assert boolean break byte case catch char class const continue def default " + + "do double else enum extends final finally float for goto if implements import in " + + "instanceof int interface long native new package private protected public return " + + "short static strictfp super switch synchronized threadsafe throw throws trait transient " + + "try void volatile while"); + var blockKeywords = words("catch class def do else enum finally for if interface switch trait try while"); + var standaloneKeywords = words("return break continue"); + var atoms = words("null true false this"); + + var curPunc; + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + return startString(ch, stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); } + return "number"; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize.push(tokenComment); + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + if (expectExpression(state.lastToken, false)) { + return startString(ch, stream, state); + } + } + if (ch == "-" && stream.eat(">")) { + curPunc = "->"; + return null; + } + if (/[+\-*&%=<>!?|\/~]/.test(ch)) { + stream.eatWhile(/[+\-*&%=<>|~]/); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; } + if (state.lastToken == ".") return "property"; + if (stream.eat(":")) { curPunc = "proplabel"; return "property"; } + var cur = stream.current(); + if (atoms.propertyIsEnumerable(cur)) { return "atom"; } + if (keywords.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + else if (standaloneKeywords.propertyIsEnumerable(cur)) curPunc = "standalone"; + return "keyword"; + } + return "variable"; + } + tokenBase.isBase = true; + + function startString(quote, stream, state) { + var tripleQuoted = false; + if (quote != "/" && stream.eat(quote)) { + if (stream.eat(quote)) tripleQuoted = true; + else return "string"; + } + function t(stream, state) { + var escaped = false, next, end = !tripleQuoted; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + if (!tripleQuoted) { break; } + if (stream.match(quote + quote)) { end = true; break; } + } + if (quote == '"' && next == "$" && !escaped) { + if (stream.eat("{")) { + state.tokenize.push(tokenBaseUntilBrace()); + return "string"; + } else if (stream.match(/^\w/, false)) { + state.tokenize.push(tokenVariableDeref); + return "string"; + } + } + escaped = !escaped && next == "\\"; + } + if (end) state.tokenize.pop(); + return "string"; + } + state.tokenize.push(t); + return t(stream, state); + } + + function tokenBaseUntilBrace() { + var depth = 1; + function t(stream, state) { + if (stream.peek() == "}") { + depth--; + if (depth == 0) { + state.tokenize.pop(); + return state.tokenize[state.tokenize.length-1](stream, state); + } + } else if (stream.peek() == "{") { + depth++; + } + return tokenBase(stream, state); + } + t.isBase = true; + return t; + } + + function tokenVariableDeref(stream, state) { + var next = stream.match(/^(\.|[\w\$_]+)/) + if (!next) { + state.tokenize.pop() + return state.tokenize[state.tokenize.length-1](stream, state) + } + return next[0] == "." ? null : "variable" + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize.pop(); + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function expectExpression(last, newline) { + return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) || + last == "newstatement" || last == "keyword" || last == "proplabel" || + (last == "standalone" && !newline); + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: [tokenBase], + context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false), + indented: 0, + startOfLine: true, + lastToken: null + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + // Automatic semicolon insertion + if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) { + popContext(state); ctx = state.context; + } + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = state.tokenize[state.tokenize.length-1](stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state); + // Handle indentation for {x -> \n ... } + else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") { + popContext(state); + state.context.align = false; + } + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + state.lastToken = curPunc || style; + return style; + }, + + indent: function(state, textAfter) { + if (!state.tokenize[state.tokenize.length-1].isBase) return CodeMirror.Pass; + var firstChar = textAfter && textAfter.charAt(0), ctx = state.context; + if (ctx.type == "statement" && !expectExpression(state.lastToken, true)) ctx = ctx.prev; + var closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : config.indentUnit); + }, + + electricChars: "{}", + closeBrackets: {triples: "'\""}, + fold: "brace", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME("text/x-groovy", "groovy"); + +}); diff --git a/js/codemirror/mode/groovy/index.html b/js/codemirror/mode/groovy/index.html new file mode 100644 index 0000000..481dca7 --- /dev/null +++ b/js/codemirror/mode/groovy/index.html @@ -0,0 +1,84 @@ + + +CodeMirror: Groovy mode + + + + + + + + + + +
+

Groovy mode

+
+ + + +

MIME types defined: text/x-groovy

+
diff --git a/js/codemirror/mode/haml/haml.js b/js/codemirror/mode/haml/haml.js new file mode 100644 index 0000000..5e5091f --- /dev/null +++ b/js/codemirror/mode/haml/haml.js @@ -0,0 +1,161 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../ruby/ruby")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../ruby/ruby"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + + // full haml mode. This handled embedded ruby and html fragments too + CodeMirror.defineMode("haml", function(config) { + var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"}); + var rubyMode = CodeMirror.getMode(config, "ruby"); + + function rubyInQuote(endQuote) { + return function(stream, state) { + var ch = stream.peek(); + if (ch == endQuote && state.rubyState.tokenize.length == 1) { + // step out of ruby context as it seems to complete processing all the braces + stream.next(); + state.tokenize = html; + return "closeAttributeTag"; + } else { + return ruby(stream, state); + } + }; + } + + function ruby(stream, state) { + if (stream.match("-#")) { + stream.skipToEnd(); + return "comment"; + } + return rubyMode.token(stream, state.rubyState); + } + + function html(stream, state) { + var ch = stream.peek(); + + // handle haml declarations. All declarations that cant be handled here + // will be passed to html mode + if (state.previousToken.style == "comment" ) { + if (state.indented > state.previousToken.indented) { + stream.skipToEnd(); + return "commentLine"; + } + } + + if (state.startOfLine) { + if (ch == "!" && stream.match("!!")) { + stream.skipToEnd(); + return "tag"; + } else if (stream.match(/^%[\w:#\.]+=/)) { + state.tokenize = ruby; + return "hamlTag"; + } else if (stream.match(/^%[\w:]+/)) { + return "hamlTag"; + } else if (ch == "/" ) { + stream.skipToEnd(); + return "comment"; + } + } + + if (state.startOfLine || state.previousToken.style == "hamlTag") { + if ( ch == "#" || ch == ".") { + stream.match(/[\w-#\.]*/); + return "hamlAttribute"; + } + } + + // do not handle --> as valid ruby, make it HTML close comment instead + if (state.startOfLine && !stream.match("-->", false) && (ch == "=" || ch == "-" )) { + state.tokenize = ruby; + return state.tokenize(stream, state); + } + + if (state.previousToken.style == "hamlTag" || + state.previousToken.style == "closeAttributeTag" || + state.previousToken.style == "hamlAttribute") { + if (ch == "(") { + state.tokenize = rubyInQuote(")"); + return state.tokenize(stream, state); + } else if (ch == "{") { + if (!stream.match(/^\{%.*/)) { + state.tokenize = rubyInQuote("}"); + return state.tokenize(stream, state); + } + } + } + + return htmlMode.token(stream, state.htmlState); + } + + return { + // default to html mode + startState: function() { + var htmlState = CodeMirror.startState(htmlMode); + var rubyState = CodeMirror.startState(rubyMode); + return { + htmlState: htmlState, + rubyState: rubyState, + indented: 0, + previousToken: { style: null, indented: 0}, + tokenize: html + }; + }, + + copyState: function(state) { + return { + htmlState : CodeMirror.copyState(htmlMode, state.htmlState), + rubyState: CodeMirror.copyState(rubyMode, state.rubyState), + indented: state.indented, + previousToken: state.previousToken, + tokenize: state.tokenize + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + state.startOfLine = false; + // dont record comment line as we only want to measure comment line with + // the opening comment block + if (style && style != "commentLine") { + state.previousToken = { style: style, indented: state.indented }; + } + // if current state is ruby and the previous token is not `,` reset the + // tokenize to html + if (stream.eol() && state.tokenize == ruby) { + stream.backUp(1); + var ch = stream.peek(); + stream.next(); + if (ch && ch != ",") { + state.tokenize = html; + } + } + // reprocess some of the specific style tag when finish setting previousToken + if (style == "hamlTag") { + style = "tag"; + } else if (style == "commentLine") { + style = "comment"; + } else if (style == "hamlAttribute") { + style = "attribute"; + } else if (style == "closeAttributeTag") { + style = null; + } + return style; + } + }; + }, "htmlmixed", "ruby"); + + CodeMirror.defineMIME("text/x-haml", "haml"); +}); diff --git a/js/codemirror/mode/haml/index.html b/js/codemirror/mode/haml/index.html new file mode 100644 index 0000000..90cc00f --- /dev/null +++ b/js/codemirror/mode/haml/index.html @@ -0,0 +1,79 @@ + + +CodeMirror: HAML mode + + + + + + + + + + + + + +
+

HAML mode

+
+ + +

MIME types defined: text/x-haml.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/haml/test.js b/js/codemirror/mode/haml/test.js new file mode 100644 index 0000000..5a1258b --- /dev/null +++ b/js/codemirror/mode/haml/test.js @@ -0,0 +1,97 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "haml"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Requires at least one media query + MT("elementName", + "[tag %h1] Hey There"); + + MT("oneElementPerLine", + "[tag %h1] Hey There %h2"); + + MT("idSelector", + "[tag %h1][attribute #test] Hey There"); + + MT("classSelector", + "[tag %h1][attribute .hello] Hey There"); + + MT("docType", + "[tag !!! XML]"); + + MT("comment", + "[comment / Hello WORLD]"); + + MT("notComment", + "[tag %h1] This is not a / comment "); + + MT("attributes", + "[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}"); + + MT("htmlCode", + "[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket ]"); + + MT("rubyBlock", + "[operator =][variable-2 @item]"); + + MT("selectorRubyBlock", + "[tag %a.selector=] [variable-2 @item]"); + + MT("nestedRubyBlock", + "[tag %a]", + " [operator =][variable puts] [string \"test\"]"); + + MT("multilinePlaintext", + "[tag %p]", + " Hello,", + " World"); + + MT("multilineRuby", + "[tag %p]", + " [comment -# this is a comment]", + " [comment and this is a comment too]", + " Date/Time", + " [operator -] [variable now] [operator =] [tag DateTime][operator .][property now]", + " [tag %strong=] [variable now]", + " [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])", + " [operator =][string \"Happy\"]", + " [operator =][string \"Belated\"]", + " [operator =][string \"Birthday\"]"); + + MT("multilineComment", + "[comment /]", + " [comment Multiline]", + " [comment Comment]"); + + MT("hamlComment", + "[comment -# this is a comment]"); + + MT("multilineHamlComment", + "[comment -# this is a comment]", + " [comment and this is a comment too]"); + + MT("multilineHTMLComment", + "[comment ]"); + + MT("hamlAfterRubyTag", + "[attribute .block]", + " [tag %strong=] [variable now]", + " [attribute .test]", + " [operator =][variable now]", + " [attribute .right]"); + + MT("stretchedRuby", + "[operator =] [variable puts] [string \"Hello\"],", + " [string \"World\"]"); + + MT("interpolationInHashAttribute", + //"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test"); + "[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test"); + + MT("interpolationInHTMLAttribute", + "[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test"); +})(); diff --git a/js/codemirror/mode/handlebars/handlebars.js b/js/codemirror/mode/handlebars/handlebars.js new file mode 100644 index 0000000..d38c0eb --- /dev/null +++ b/js/codemirror/mode/handlebars/handlebars.js @@ -0,0 +1,70 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../../addon/mode/simple"), require("../../addon/mode/multiplex")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../../addon/mode/simple", "../../addon/mode/multiplex"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineSimpleMode("handlebars-tags", { + start: [ + { regex: /\{\{\{/, push: "handlebars_raw", token: "tag" }, + { regex: /\{\{!--/, push: "dash_comment", token: "comment" }, + { regex: /\{\{!/, push: "comment", token: "comment" }, + { regex: /\{\{/, push: "handlebars", token: "tag" } + ], + handlebars_raw: [ + { regex: /\}\}\}/, pop: true, token: "tag" }, + ], + handlebars: [ + { regex: /\}\}/, pop: true, token: "tag" }, + + // Double and single quotes + { regex: /"(?:[^\\"]|\\.)*"?/, token: "string" }, + { regex: /'(?:[^\\']|\\.)*'?/, token: "string" }, + + // Handlebars keywords + { regex: />|[#\/]([A-Za-z_]\w*)/, token: "keyword" }, + { regex: /(?:else|this)\b/, token: "keyword" }, + + // Numeral + { regex: /\d+/i, token: "number" }, + + // Atoms like = and . + { regex: /=|~|@|true|false/, token: "atom" }, + + // Paths + { regex: /(?:\.\.\/)*(?:[A-Za-z_][\w\.]*)+/, token: "variable-2" } + ], + dash_comment: [ + { regex: /--\}\}/, pop: true, token: "comment" }, + + // Commented code + { regex: /./, token: "comment"} + ], + comment: [ + { regex: /\}\}/, pop: true, token: "comment" }, + { regex: /./, token: "comment" } + ], + meta: { + blockCommentStart: "{{--", + blockCommentEnd: "--}}" + } + }); + + CodeMirror.defineMode("handlebars", function(config, parserConfig) { + var handlebars = CodeMirror.getMode(config, "handlebars-tags"); + if (!parserConfig || !parserConfig.base) return handlebars; + return CodeMirror.multiplexingMode( + CodeMirror.getMode(config, parserConfig.base), + {open: "{{", close: /\}\}\}?/, mode: handlebars, parseDelimiters: true} + ); + }); + + CodeMirror.defineMIME("text/x-handlebars-template", "handlebars"); +}); diff --git a/js/codemirror/mode/handlebars/index.html b/js/codemirror/mode/handlebars/index.html new file mode 100644 index 0000000..83d527b --- /dev/null +++ b/js/codemirror/mode/handlebars/index.html @@ -0,0 +1,82 @@ + + +CodeMirror: Handlebars mode + + + + + + + + + + + + + +
+

Handlebars

+
+ + +

Handlebars syntax highlighting for CodeMirror.

+ +

MIME types defined: text/x-handlebars-template

+ +

Supported options: base to set the mode to + wrap. For example, use

+
mode: {name: "handlebars", base: "text/html"}
+

to highlight an HTML template.

+
diff --git a/js/codemirror/mode/haskell-literate/haskell-literate.js b/js/codemirror/mode/haskell-literate/haskell-literate.js new file mode 100644 index 0000000..751fda4 --- /dev/null +++ b/js/codemirror/mode/haskell-literate/haskell-literate.js @@ -0,0 +1,43 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function (mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../haskell/haskell")) + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../haskell/haskell"], mod) + else // Plain browser env + mod(CodeMirror) +})(function (CodeMirror) { + "use strict" + + CodeMirror.defineMode("haskell-literate", function (config, parserConfig) { + var baseMode = CodeMirror.getMode(config, (parserConfig && parserConfig.base) || "haskell") + + return { + startState: function () { + return { + inCode: false, + baseState: CodeMirror.startState(baseMode) + } + }, + token: function (stream, state) { + if (stream.sol()) { + if (state.inCode = stream.eat(">")) + return "meta" + } + if (state.inCode) { + return baseMode.token(stream, state.baseState) + } else { + stream.skipToEnd() + return "comment" + } + }, + innerMode: function (state) { + return state.inCode ? {state: state.baseState, mode: baseMode} : null + } + } + }, "haskell") + + CodeMirror.defineMIME("text/x-literate-haskell", "haskell-literate") +}); diff --git a/js/codemirror/mode/haskell-literate/index.html b/js/codemirror/mode/haskell-literate/index.html new file mode 100644 index 0000000..416455d --- /dev/null +++ b/js/codemirror/mode/haskell-literate/index.html @@ -0,0 +1,282 @@ + + +CodeMirror: Haskell-literate mode + + + + + + + + + + +
+

Haskell literate mode

+
+ +
+ +

MIME types + defined: text/x-literate-haskell.

+ +

Parser configuration parameters recognized: base to + set the base mode (defaults to "haskell").

+ + + +
diff --git a/js/codemirror/mode/haskell/haskell.js b/js/codemirror/mode/haskell/haskell.js new file mode 100644 index 0000000..26bf612 --- /dev/null +++ b/js/codemirror/mode/haskell/haskell.js @@ -0,0 +1,268 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("haskell", function(_config, modeConfig) { + + function switchState(source, setState, f) { + setState(f); + return f(source, setState); + } + + // These should all be Unicode extended, as per the Haskell 2010 report + var smallRE = /[a-z_]/; + var largeRE = /[A-Z]/; + var digitRE = /\d/; + var hexitRE = /[0-9A-Fa-f]/; + var octitRE = /[0-7]/; + var idRE = /[a-z_A-Z0-9'\xa1-\uffff]/; + var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/; + var specialRE = /[(),;[\]`{}]/; + var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer + + function normal(source, setState) { + if (source.eatWhile(whiteCharRE)) { + return null; + } + + var ch = source.next(); + if (specialRE.test(ch)) { + if (ch == '{' && source.eat('-')) { + var t = "comment"; + if (source.eat('#')) { + t = "meta"; + } + return switchState(source, setState, ncomment(t, 1)); + } + return null; + } + + if (ch == '\'') { + if (source.eat('\\')) { + source.next(); // should handle other escapes here + } + else { + source.next(); + } + if (source.eat('\'')) { + return "string"; + } + return "string error"; + } + + if (ch == '"') { + return switchState(source, setState, stringLiteral); + } + + if (largeRE.test(ch)) { + source.eatWhile(idRE); + if (source.eat('.')) { + return "qualifier"; + } + return "variable-2"; + } + + if (smallRE.test(ch)) { + source.eatWhile(idRE); + return "variable"; + } + + if (digitRE.test(ch)) { + if (ch == '0') { + if (source.eat(/[xX]/)) { + source.eatWhile(hexitRE); // should require at least 1 + return "integer"; + } + if (source.eat(/[oO]/)) { + source.eatWhile(octitRE); // should require at least 1 + return "number"; + } + } + source.eatWhile(digitRE); + var t = "number"; + if (source.match(/^\.\d+/)) { + t = "number"; + } + if (source.eat(/[eE]/)) { + t = "number"; + source.eat(/[-+]/); + source.eatWhile(digitRE); // should require at least 1 + } + return t; + } + + if (ch == "." && source.eat(".")) + return "keyword"; + + if (symbolRE.test(ch)) { + if (ch == '-' && source.eat(/-/)) { + source.eatWhile(/-/); + if (!source.eat(symbolRE)) { + source.skipToEnd(); + return "comment"; + } + } + var t = "variable"; + if (ch == ':') { + t = "variable-2"; + } + source.eatWhile(symbolRE); + return t; + } + + return "error"; + } + + function ncomment(type, nest) { + if (nest == 0) { + return normal; + } + return function(source, setState) { + var currNest = nest; + while (!source.eol()) { + var ch = source.next(); + if (ch == '{' && source.eat('-')) { + ++currNest; + } + else if (ch == '-' && source.eat('}')) { + --currNest; + if (currNest == 0) { + setState(normal); + return type; + } + } + } + setState(ncomment(type, currNest)); + return type; + }; + } + + function stringLiteral(source, setState) { + while (!source.eol()) { + var ch = source.next(); + if (ch == '"') { + setState(normal); + return "string"; + } + if (ch == '\\') { + if (source.eol() || source.eat(whiteCharRE)) { + setState(stringGap); + return "string"; + } + if (source.eat('&')) { + } + else { + source.next(); // should handle other escapes here + } + } + } + setState(normal); + return "string error"; + } + + function stringGap(source, setState) { + if (source.eat('\\')) { + return switchState(source, setState, stringLiteral); + } + source.next(); + setState(normal); + return "error"; + } + + + var wellKnownWords = (function() { + var wkw = {}; + function setType(t) { + return function () { + for (var i = 0; i < arguments.length; i++) + wkw[arguments[i]] = t; + }; + } + + setType("keyword")( + "case", "class", "data", "default", "deriving", "do", "else", "foreign", + "if", "import", "in", "infix", "infixl", "infixr", "instance", "let", + "module", "newtype", "of", "then", "type", "where", "_"); + + setType("keyword")( + "\.\.", ":", "::", "=", "\\", "<-", "->", "@", "~", "=>"); + + setType("builtin")( + "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<*", "<=", + "<$>", "<*>", "=<<", "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", + "*>", "**"); + + setType("builtin")( + "Applicative", "Bool", "Bounded", "Char", "Double", "EQ", "Either", "Enum", + "Eq", "False", "FilePath", "Float", "Floating", "Fractional", "Functor", + "GT", "IO", "IOError", "Int", "Integer", "Integral", "Just", "LT", "Left", + "Maybe", "Monad", "Nothing", "Num", "Ord", "Ordering", "Rational", "Read", + "ReadS", "Real", "RealFloat", "RealFrac", "Right", "Show", "ShowS", + "String", "True"); + + setType("builtin")( + "abs", "acos", "acosh", "all", "and", "any", "appendFile", "asTypeOf", + "asin", "asinh", "atan", "atan2", "atanh", "break", "catch", "ceiling", + "compare", "concat", "concatMap", "const", "cos", "cosh", "curry", + "cycle", "decodeFloat", "div", "divMod", "drop", "dropWhile", "either", + "elem", "encodeFloat", "enumFrom", "enumFromThen", "enumFromThenTo", + "enumFromTo", "error", "even", "exp", "exponent", "fail", "filter", + "flip", "floatDigits", "floatRadix", "floatRange", "floor", "fmap", + "foldl", "foldl1", "foldr", "foldr1", "fromEnum", "fromInteger", + "fromIntegral", "fromRational", "fst", "gcd", "getChar", "getContents", + "getLine", "head", "id", "init", "interact", "ioError", "isDenormalized", + "isIEEE", "isInfinite", "isNaN", "isNegativeZero", "iterate", "last", + "lcm", "length", "lex", "lines", "log", "logBase", "lookup", "map", + "mapM", "mapM_", "max", "maxBound", "maximum", "maybe", "min", "minBound", + "minimum", "mod", "negate", "not", "notElem", "null", "odd", "or", + "otherwise", "pi", "pred", "print", "product", "properFraction", "pure", + "putChar", "putStr", "putStrLn", "quot", "quotRem", "read", "readFile", + "readIO", "readList", "readLn", "readParen", "reads", "readsPrec", + "realToFrac", "recip", "rem", "repeat", "replicate", "return", "reverse", + "round", "scaleFloat", "scanl", "scanl1", "scanr", "scanr1", "seq", + "sequence", "sequence_", "show", "showChar", "showList", "showParen", + "showString", "shows", "showsPrec", "significand", "signum", "sin", + "sinh", "snd", "span", "splitAt", "sqrt", "subtract", "succ", "sum", + "tail", "take", "takeWhile", "tan", "tanh", "toEnum", "toInteger", + "toRational", "truncate", "uncurry", "undefined", "unlines", "until", + "unwords", "unzip", "unzip3", "userError", "words", "writeFile", "zip", + "zip3", "zipWith", "zipWith3"); + + var override = modeConfig.overrideKeywords; + if (override) for (var word in override) if (override.hasOwnProperty(word)) + wkw[word] = override[word]; + + return wkw; + })(); + + + + return { + startState: function () { return { f: normal }; }, + copyState: function (s) { return { f: s.f }; }, + + token: function(stream, state) { + var t = state.f(stream, function(s) { state.f = s; }); + var w = stream.current(); + return wellKnownWords.hasOwnProperty(w) ? wellKnownWords[w] : t; + }, + + blockCommentStart: "{-", + blockCommentEnd: "-}", + lineComment: "--" + }; + +}); + +CodeMirror.defineMIME("text/x-haskell", "haskell"); + +}); diff --git a/js/codemirror/mode/haskell/index.html b/js/codemirror/mode/haskell/index.html new file mode 100644 index 0000000..2d6931d --- /dev/null +++ b/js/codemirror/mode/haskell/index.html @@ -0,0 +1,73 @@ + + +CodeMirror: Haskell mode + + + + + + + + + + + +
+

Haskell mode

+
+ + + +

MIME types defined: text/x-haskell.

+
diff --git a/js/codemirror/mode/haxe/haxe.js b/js/codemirror/mode/haxe/haxe.js new file mode 100644 index 0000000..c32d3df --- /dev/null +++ b/js/codemirror/mode/haxe/haxe.js @@ -0,0 +1,515 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("haxe", function(config, parserConfig) { + var indentUnit = config.indentUnit; + + // Tokenizer + + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); + var operator = kw("operator"), atom = {type: "atom", style: "atom"}, attribute = {type:"attribute", style: "attribute"}; + var type = kw("typedef"); + var keywords = { + "if": A, "while": A, "else": B, "do": B, "try": B, + "return": C, "break": C, "continue": C, "new": C, "throw": C, + "var": kw("var"), "inline":attribute, "static": attribute, "using":kw("import"), + "public": attribute, "private": attribute, "cast": kw("cast"), "import": kw("import"), "macro": kw("macro"), + "function": kw("function"), "catch": kw("catch"), "untyped": kw("untyped"), "callback": kw("cb"), + "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), + "in": operator, "never": kw("property_access"), "trace":kw("trace"), + "class": type, "abstract":type, "enum":type, "interface":type, "typedef":type, "extends":type, "implements":type, "dynamic":type, + "true": atom, "false": atom, "null": atom + }; + + var isOperatorChar = /[+\-*&%=<>!?|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + function toUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next == end && !escaped) + return true; + escaped = !escaped && next == "\\"; + } + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + + function haxeTokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + return chain(stream, state, haxeTokenString(ch)); + } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + return ret(ch); + } else if (ch == "0" && stream.eat(/x/i)) { + stream.eatWhile(/[\da-f]/i); + return ret("number", "number"); + } else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) { + stream.match(/^\d*(?:\.\d*(?!\.))?(?:[eE][+\-]?\d+)?/); + return ret("number", "number"); + } else if (state.reAllowed && (ch == "~" && stream.eat(/\//))) { + toUnescaped(stream, "/"); + stream.eatWhile(/[gimsu]/); + return ret("regexp", "string-2"); + } else if (ch == "/") { + if (stream.eat("*")) { + return chain(stream, state, haxeTokenComment); + } else if (stream.eat("/")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } else { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } + } else if (ch == "#") { + stream.skipToEnd(); + return ret("conditional", "meta"); + } else if (ch == "@") { + stream.eat(/:/); + stream.eatWhile(/[\w_]/); + return ret ("metadata", "meta"); + } else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } else { + var word; + if(/[A-Z]/.test(ch)) { + stream.eatWhile(/[\w_<>]/); + word = stream.current(); + return ret("type", "variable-3", word); + } else { + stream.eatWhile(/[\w_]/); + var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; + return (known && state.kwAllowed) ? ret(known.type, known.style, word) : + ret("variable", "variable", word); + } + } + } + + function haxeTokenString(quote) { + return function(stream, state) { + if (toUnescaped(stream, quote)) + state.tokenize = haxeTokenBase; + return ret("string", "string"); + }; + } + + function haxeTokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = haxeTokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + // Parser + + var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; + + function HaxeLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return true; + } + + function parseHaxe(state, style, type, content, stream) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; + + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + + while(true) { + var combinator = cc.length ? cc.pop() : statement; + if (combinator(type, content)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + if (cx.marked) return cx.marked; + if (type == "variable" && inScope(state, content)) return "variable-2"; + if (type == "variable" && imported(state, content)) return "variable-3"; + return style; + } + } + } + + function imported(state, typename) { + if (/[a-z]/.test(typename.charAt(0))) + return false; + var len = state.importedtypes.length; + for (var i = 0; i= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function inList(name, list) { + for (var v = list; v; v = v.next) + if (v.name == name) return true; + return false; + } + function register(varname) { + var state = cx.state; + if (state.context) { + cx.marked = "def"; + if (inList(varname, state.localVars)) return; + state.localVars = {name: varname, next: state.localVars}; + } else if (state.globalVars) { + if (inList(varname, state.globalVars)) return; + state.globalVars = {name: varname, next: state.globalVars}; + } + } + + // Combinators + + var defaultVars = {name: "this", next: null}; + function pushcontext() { + if (!cx.state.context) cx.state.localVars = defaultVars; + cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; + } + function popcontext() { + cx.state.localVars = cx.state.context.vars; + cx.state.context = cx.state.context.prev; + } + popcontext.lex = true; + function pushlex(type, info) { + var result = function() { + var state = cx.state; + state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type, null, state.lexical, info); + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + function f(type) { + if (type == wanted) return cont(); + else if (wanted == ";") return pass(); + else return cont(f); + } + return f; + } + + function statement(type) { + if (type == "@") return cont(metadef); + if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex); + if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); + if (type == "keyword b") return cont(pushlex("form"), statement, poplex); + if (type == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext); + if (type == ";") return cont(); + if (type == "attribute") return cont(maybeattribute); + if (type == "function") return cont(functiondef); + if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), + poplex, statement, poplex); + if (type == "variable") return cont(pushlex("stat"), maybelabel); + if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), + block, poplex, poplex); + if (type == "case") return cont(expression, expect(":")); + if (type == "default") return cont(expect(":")); + if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), + statement, poplex, popcontext); + if (type == "import") return cont(importdef, expect(";")); + if (type == "typedef") return cont(typedef); + return pass(pushlex("stat"), expression, expect(";"), poplex); + } + function expression(type) { + if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator); + if (type == "type" ) return cont(maybeoperator); + if (type == "function") return cont(functiondef); + if (type == "keyword c") return cont(maybeexpression); + if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator); + if (type == "operator") return cont(expression); + if (type == "[") return cont(pushlex("]"), commasep(maybeexpression, "]"), poplex, maybeoperator); + if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); + return cont(); + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expression); + } + + function maybeoperator(type, value) { + if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator); + if (type == "operator" || type == ":") return cont(expression); + if (type == ";") return; + if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); + if (type == ".") return cont(property, maybeoperator); + if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); + } + + function maybeattribute(type) { + if (type == "attribute") return cont(maybeattribute); + if (type == "function") return cont(functiondef); + if (type == "var") return cont(vardef1); + } + + function metadef(type) { + if(type == ":") return cont(metadef); + if(type == "variable") return cont(metadef); + if(type == "(") return cont(pushlex(")"), commasep(metaargs, ")"), poplex, statement); + } + function metaargs(type) { + if(type == "variable") return cont(); + } + + function importdef (type, value) { + if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); } + else if(type == "variable" || type == "property" || type == "." || value == "*") return cont(importdef); + } + + function typedef (type, value) + { + if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); } + else if (type == "type" && /[A-Z]/.test(value.charAt(0))) { return cont(); } + } + + function maybelabel(type) { + if (type == ":") return cont(poplex, statement); + return pass(maybeoperator, expect(";"), poplex); + } + function property(type) { + if (type == "variable") {cx.marked = "property"; return cont();} + } + function objprop(type) { + if (type == "variable") cx.marked = "property"; + if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression); + } + function commasep(what, end) { + function proceed(type) { + if (type == ",") return cont(what, proceed); + if (type == end) return cont(); + return cont(expect(end)); + } + return function(type) { + if (type == end) return cont(); + else return pass(what, proceed); + }; + } + function block(type) { + if (type == "}") return cont(); + return pass(statement, block); + } + function vardef1(type, value) { + if (type == "variable"){register(value); return cont(typeuse, vardef2);} + return cont(); + } + function vardef2(type, value) { + if (value == "=") return cont(expression, vardef2); + if (type == ",") return cont(vardef1); + } + function forspec1(type, value) { + if (type == "variable") { + register(value); + return cont(forin, expression) + } else { + return pass() + } + } + function forin(_type, value) { + if (value == "in") return cont(); + } + function functiondef(type, value) { + //function names starting with upper-case letters are recognised as types, so cludging them together here. + if (type == "variable" || type == "type") {register(value); return cont(functiondef);} + if (value == "new") return cont(functiondef); + if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, typeuse, statement, popcontext); + } + function typeuse(type) { + if(type == ":") return cont(typestring); + } + function typestring(type) { + if(type == "type") return cont(); + if(type == "variable") return cont(); + if(type == "{") return cont(pushlex("}"), commasep(typeprop, "}"), poplex); + } + function typeprop(type) { + if(type == "variable") return cont(typeuse); + } + function funarg(type, value) { + if (type == "variable") {register(value); return cont(typeuse);} + } + + // Interface + return { + startState: function(basecolumn) { + var defaulttypes = ["Int", "Float", "String", "Void", "Std", "Bool", "Dynamic", "Array"]; + var state = { + tokenize: haxeTokenBase, + reAllowed: true, + kwAllowed: true, + cc: [], + lexical: new HaxeLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: parserConfig.localVars, + importedtypes: defaulttypes, + context: parserConfig.localVars && {vars: parserConfig.localVars}, + indented: 0 + }; + if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") + state.globalVars = parserConfig.globalVars; + return state; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/)); + state.kwAllowed = type != '.'; + return parseHaxe(state, style, type, content, stream); + }, + + indent: function(state, textAfter) { + if (state.tokenize != haxeTokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical; + if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev; + var type = lexical.type, closing = firstChar == type; + if (type == "vardef") return lexical.indented + 4; + else if (type == "form" && firstChar == "{") return lexical.indented; + else if (type == "stat" || type == "form") return lexical.indented + indentUnit; + else if (lexical.info == "switch" && !closing) + return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + else return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME("text/x-haxe", "haxe"); + +CodeMirror.defineMode("hxml", function () { + + return { + startState: function () { + return { + define: false, + inString: false + }; + }, + token: function (stream, state) { + var ch = stream.peek(); + var sol = stream.sol(); + + ///* comments */ + if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + if (sol && ch == "-") { + var style = "variable-2"; + + stream.eat(/-/); + + if (stream.peek() == "-") { + stream.eat(/-/); + style = "keyword a"; + } + + if (stream.peek() == "D") { + stream.eat(/[D]/); + style = "keyword c"; + state.define = true; + } + + stream.eatWhile(/[A-Z]/i); + return style; + } + + var ch = stream.peek(); + + if (state.inString == false && ch == "'") { + state.inString = true; + stream.next(); + } + + if (state.inString == true) { + if (stream.skipTo("'")) { + + } else { + stream.skipToEnd(); + } + + if (stream.peek() == "'") { + stream.next(); + state.inString = false; + } + + return "string"; + } + + stream.next(); + return null; + }, + lineComment: "#" + }; +}); + +CodeMirror.defineMIME("text/x-hxml", "hxml"); + +}); diff --git a/js/codemirror/mode/haxe/index.html b/js/codemirror/mode/haxe/index.html new file mode 100644 index 0000000..a4e24ec --- /dev/null +++ b/js/codemirror/mode/haxe/index.html @@ -0,0 +1,124 @@ + + +CodeMirror: Haxe mode + + + + + + + + + +
+

Haxe mode

+ + +

+ +

Hxml mode:

+ +

+
+ + + +

MIME types defined: text/x-haxe, text/x-hxml.

+
diff --git a/js/codemirror/mode/htmlembedded/htmlembedded.js b/js/codemirror/mode/htmlembedded/htmlembedded.js new file mode 100644 index 0000000..5cceeef --- /dev/null +++ b/js/codemirror/mode/htmlembedded/htmlembedded.js @@ -0,0 +1,37 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), + require("../../addon/mode/multiplex")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../htmlmixed/htmlmixed", + "../../addon/mode/multiplex"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { + var closeComment = parserConfig.closeComment || "--%>" + return CodeMirror.multiplexingMode(CodeMirror.getMode(config, "htmlmixed"), { + open: parserConfig.openComment || "<%--", + close: closeComment, + delimStyle: "comment", + mode: {token: function(stream) { + stream.skipTo(closeComment) || stream.skipToEnd() + return "comment" + }} + }, { + open: parserConfig.open || parserConfig.scriptStartRegex || "<%", + close: parserConfig.close || parserConfig.scriptEndRegex || "%>", + mode: CodeMirror.getMode(config, parserConfig.scriptingModeSpec) + }); + }, "htmlmixed"); + + CodeMirror.defineMIME("application/x-ejs", {name: "htmlembedded", scriptingModeSpec:"javascript"}); + CodeMirror.defineMIME("application/x-aspx", {name: "htmlembedded", scriptingModeSpec:"text/x-csharp"}); + CodeMirror.defineMIME("application/x-jsp", {name: "htmlembedded", scriptingModeSpec:"text/x-java"}); + CodeMirror.defineMIME("application/x-erb", {name: "htmlembedded", scriptingModeSpec:"ruby"}); +}); diff --git a/js/codemirror/mode/htmlembedded/index.html b/js/codemirror/mode/htmlembedded/index.html new file mode 100644 index 0000000..06e7717 --- /dev/null +++ b/js/codemirror/mode/htmlembedded/index.html @@ -0,0 +1,60 @@ + + +CodeMirror: Html Embedded Scripts mode + + + + + + + + + + + + + + +
+

Html Embedded Scripts mode

+
+ + + +

Mode for html embedded scripts like JSP and ASP.NET. Depends on multiplex and HtmlMixed which in turn depends on + JavaScript, CSS and XML.
Other dependencies include those of the scripting language chosen.

+ +

MIME types defined: application/x-aspx (ASP.NET), + application/x-ejs (Embedded JavaScript), application/x-jsp (JavaServer Pages) + and application/x-erb

+
diff --git a/js/codemirror/mode/htmlmixed/htmlmixed.js b/js/codemirror/mode/htmlmixed/htmlmixed.js new file mode 100644 index 0000000..3f6d8b7 --- /dev/null +++ b/js/codemirror/mode/htmlmixed/htmlmixed.js @@ -0,0 +1,153 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript"), require("../css/css")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript", "../css/css"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + var defaultTags = { + script: [ + ["lang", /(javascript|babel)/i, "javascript"], + ["type", /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i, "javascript"], + ["type", /./, "text/plain"], + [null, null, "javascript"] + ], + style: [ + ["lang", /^css$/i, "css"], + ["type", /^(text\/)?(x-)?(stylesheet|css)$/i, "css"], + ["type", /./, "text/plain"], + [null, null, "css"] + ] + }; + + function maybeBackup(stream, pat, style) { + var cur = stream.current(), close = cur.search(pat); + if (close > -1) { + stream.backUp(cur.length - close); + } else if (cur.match(/<\/?$/)) { + stream.backUp(cur.length); + if (!stream.match(pat, false)) stream.match(cur); + } + return style; + } + + var attrRegexpCache = {}; + function getAttrRegexp(attr) { + var regexp = attrRegexpCache[attr]; + if (regexp) return regexp; + return attrRegexpCache[attr] = new RegExp("\\s+" + attr + "\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"); + } + + function getAttrValue(text, attr) { + var match = text.match(getAttrRegexp(attr)) + return match ? /^\s*(.*?)\s*$/.exec(match[2])[1] : "" + } + + function getTagRegexp(tagName, anchored) { + return new RegExp((anchored ? "^" : "") + "<\/\\s*" + tagName + "\\s*>", "i"); + } + + function addTags(from, to) { + for (var tag in from) { + var dest = to[tag] || (to[tag] = []); + var source = from[tag]; + for (var i = source.length - 1; i >= 0; i--) + dest.unshift(source[i]) + } + } + + function findMatchingMode(tagInfo, tagText) { + for (var i = 0; i < tagInfo.length; i++) { + var spec = tagInfo[i]; + if (!spec[0] || spec[1].test(getAttrValue(tagText, spec[0]))) return spec[2]; + } + } + + CodeMirror.defineMode("htmlmixed", function (config, parserConfig) { + var htmlMode = CodeMirror.getMode(config, { + name: "xml", + htmlMode: true, + multilineTagIndentFactor: parserConfig.multilineTagIndentFactor, + multilineTagIndentPastTag: parserConfig.multilineTagIndentPastTag, + allowMissingTagName: parserConfig.allowMissingTagName, + }); + + var tags = {}; + var configTags = parserConfig && parserConfig.tags, configScript = parserConfig && parserConfig.scriptTypes; + addTags(defaultTags, tags); + if (configTags) addTags(configTags, tags); + if (configScript) for (var i = configScript.length - 1; i >= 0; i--) + tags.script.unshift(["type", configScript[i].matches, configScript[i].mode]) + + function html(stream, state) { + var style = htmlMode.token(stream, state.htmlState), tag = /\btag\b/.test(style), tagName + if (tag && !/[<>\s\/]/.test(stream.current()) && + (tagName = state.htmlState.tagName && state.htmlState.tagName.toLowerCase()) && + tags.hasOwnProperty(tagName)) { + state.inTag = tagName + " " + } else if (state.inTag && tag && />$/.test(stream.current())) { + var inTag = /^([\S]+) (.*)/.exec(state.inTag) + state.inTag = null + var modeSpec = stream.current() == ">" && findMatchingMode(tags[inTag[1]], inTag[2]) + var mode = CodeMirror.getMode(config, modeSpec) + var endTagA = getTagRegexp(inTag[1], true), endTag = getTagRegexp(inTag[1], false); + state.token = function (stream, state) { + if (stream.match(endTagA, false)) { + state.token = html; + state.localState = state.localMode = null; + return null; + } + return maybeBackup(stream, endTag, state.localMode.token(stream, state.localState)); + }; + state.localMode = mode; + state.localState = CodeMirror.startState(mode, htmlMode.indent(state.htmlState, "", "")); + } else if (state.inTag) { + state.inTag += stream.current() + if (stream.eol()) state.inTag += " " + } + return style; + }; + + return { + startState: function () { + var state = CodeMirror.startState(htmlMode); + return {token: html, inTag: null, localMode: null, localState: null, htmlState: state}; + }, + + copyState: function (state) { + var local; + if (state.localState) { + local = CodeMirror.copyState(state.localMode, state.localState); + } + return {token: state.token, inTag: state.inTag, + localMode: state.localMode, localState: local, + htmlState: CodeMirror.copyState(htmlMode, state.htmlState)}; + }, + + token: function (stream, state) { + return state.token(stream, state); + }, + + indent: function (state, textAfter, line) { + if (!state.localMode || /^\s*<\//.test(textAfter)) + return htmlMode.indent(state.htmlState, textAfter, line); + else if (state.localMode.indent) + return state.localMode.indent(state.localState, textAfter, line); + else + return CodeMirror.Pass; + }, + + innerMode: function (state) { + return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode}; + } + }; + }, "xml", "javascript", "css"); + + CodeMirror.defineMIME("text/html", "htmlmixed"); +}); diff --git a/js/codemirror/mode/htmlmixed/index.html b/js/codemirror/mode/htmlmixed/index.html new file mode 100644 index 0000000..9548361 --- /dev/null +++ b/js/codemirror/mode/htmlmixed/index.html @@ -0,0 +1,100 @@ + + +CodeMirror: HTML mixed mode + + + + + + + + + + + + + + +
+

HTML mixed mode

+
+ + +

The HTML mixed mode depends on the XML, JavaScript, and CSS modes.

+ +

It takes an optional mode configuration + option, tags, which can be used to add custom + behavior for specific tags. When given, it should be an object + mapping tag names (for example script) to arrays or + three-element arrays. Those inner arrays indicate [attributeName, + valueRegexp, modeSpec] + specifications. For example, you could use ["type", /^foo$/, + "foo"] to map the attribute type="foo" to + the foo mode. When the first two fields are null + ([null, null, "mode"]), the given mode is used for + any such tag that doesn't match any of the previously given + attributes. For example:

+ +
var myModeSpec = {
+  name: "htmlmixed",
+  tags: {
+    style: [["type", /^text\/(x-)?scss$/, "text/x-scss"],
+            [null, null, "css"]],
+    custom: [[null, null, "customMode"]]
+  }
+}
+ +

MIME types defined: text/html + (redefined, only takes effect if you load this parser after the + XML parser).

+ +
diff --git a/js/codemirror/mode/http/http.js b/js/codemirror/mode/http/http.js new file mode 100644 index 0000000..aaa138f --- /dev/null +++ b/js/codemirror/mode/http/http.js @@ -0,0 +1,113 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("http", function() { + function failFirstLine(stream, state) { + stream.skipToEnd(); + state.cur = header; + return "error"; + } + + function start(stream, state) { + if (stream.match(/^HTTP\/\d\.\d/)) { + state.cur = responseStatusCode; + return "keyword"; + } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) { + state.cur = requestPath; + return "keyword"; + } else { + return failFirstLine(stream, state); + } + } + + function responseStatusCode(stream, state) { + var code = stream.match(/^\d+/); + if (!code) return failFirstLine(stream, state); + + state.cur = responseStatusText; + var status = Number(code[0]); + if (status >= 100 && status < 200) { + return "positive informational"; + } else if (status >= 200 && status < 300) { + return "positive success"; + } else if (status >= 300 && status < 400) { + return "positive redirect"; + } else if (status >= 400 && status < 500) { + return "negative client-error"; + } else if (status >= 500 && status < 600) { + return "negative server-error"; + } else { + return "error"; + } + } + + function responseStatusText(stream, state) { + stream.skipToEnd(); + state.cur = header; + return null; + } + + function requestPath(stream, state) { + stream.eatWhile(/\S/); + state.cur = requestProtocol; + return "string-2"; + } + + function requestProtocol(stream, state) { + if (stream.match(/^HTTP\/\d\.\d$/)) { + state.cur = header; + return "keyword"; + } else { + return failFirstLine(stream, state); + } + } + + function header(stream) { + if (stream.sol() && !stream.eat(/[ \t]/)) { + if (stream.match(/^.*?:/)) { + return "atom"; + } else { + stream.skipToEnd(); + return "error"; + } + } else { + stream.skipToEnd(); + return "string"; + } + } + + function body(stream) { + stream.skipToEnd(); + return null; + } + + return { + token: function(stream, state) { + var cur = state.cur; + if (cur != header && cur != body && stream.eatSpace()) return null; + return cur(stream, state); + }, + + blankLine: function(state) { + state.cur = body; + }, + + startState: function() { + return {cur: start}; + } + }; +}); + +CodeMirror.defineMIME("message/http", "http"); + +}); diff --git a/js/codemirror/mode/http/index.html b/js/codemirror/mode/http/index.html new file mode 100644 index 0000000..ddfa8c1 --- /dev/null +++ b/js/codemirror/mode/http/index.html @@ -0,0 +1,45 @@ + + +CodeMirror: HTTP mode + + + + + + + + + +
+

HTTP mode

+ + +
+ + + +

MIME types defined: message/http.

+
diff --git a/js/codemirror/mode/idl/idl.js b/js/codemirror/mode/idl/idl.js new file mode 100644 index 0000000..7b57672 --- /dev/null +++ b/js/codemirror/mode/idl/idl.js @@ -0,0 +1,290 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + function wordRegexp(words) { + return new RegExp('^((' + words.join(')|(') + '))\\b', 'i'); + }; + + var builtinArray = [ + 'a_correlate', 'abs', 'acos', 'adapt_hist_equal', 'alog', + 'alog2', 'alog10', 'amoeba', 'annotate', 'app_user_dir', + 'app_user_dir_query', 'arg_present', 'array_equal', 'array_indices', + 'arrow', 'ascii_template', 'asin', 'assoc', 'atan', + 'axis', 'axis', 'bandpass_filter', 'bandreject_filter', 'barplot', + 'bar_plot', 'beseli', 'beselj', 'beselk', 'besely', + 'beta', 'biginteger', 'bilinear', 'bin_date', 'binary_template', + 'bindgen', 'binomial', 'bit_ffs', 'bit_population', 'blas_axpy', + 'blk_con', 'boolarr', 'boolean', 'boxplot', 'box_cursor', + 'breakpoint', 'broyden', 'bubbleplot', 'butterworth', 'bytarr', + 'byte', 'byteorder', 'bytscl', 'c_correlate', 'calendar', + 'caldat', 'call_external', 'call_function', 'call_method', + 'call_procedure', 'canny', 'catch', 'cd', 'cdf', 'ceil', + 'chebyshev', 'check_math', 'chisqr_cvf', 'chisqr_pdf', 'choldc', + 'cholsol', 'cindgen', 'cir_3pnt', 'clipboard', 'close', + 'clust_wts', 'cluster', 'cluster_tree', 'cmyk_convert', 'code_coverage', + 'color_convert', 'color_exchange', 'color_quan', 'color_range_map', + 'colorbar', 'colorize_sample', 'colormap_applicable', + 'colormap_gradient', 'colormap_rotation', 'colortable', + 'comfit', 'command_line_args', 'common', 'compile_opt', 'complex', + 'complexarr', 'complexround', 'compute_mesh_normals', 'cond', 'congrid', + 'conj', 'constrained_min', 'contour', 'contour', 'convert_coord', + 'convol', 'convol_fft', 'coord2to3', 'copy_lun', 'correlate', + 'cos', 'cosh', 'cpu', 'cramer', 'createboxplotdata', + 'create_cursor', 'create_struct', 'create_view', 'crossp', 'crvlength', + 'ct_luminance', 'cti_test', 'cursor', 'curvefit', 'cv_coord', + 'cvttobm', 'cw_animate', 'cw_animate_getp', 'cw_animate_load', + 'cw_animate_run', 'cw_arcball', 'cw_bgroup', 'cw_clr_index', + 'cw_colorsel', 'cw_defroi', 'cw_field', 'cw_filesel', 'cw_form', + 'cw_fslider', 'cw_light_editor', 'cw_light_editor_get', + 'cw_light_editor_set', 'cw_orient', 'cw_palette_editor', + 'cw_palette_editor_get', 'cw_palette_editor_set', 'cw_pdmenu', + 'cw_rgbslider', 'cw_tmpl', 'cw_zoom', 'db_exists', + 'dblarr', 'dcindgen', 'dcomplex', 'dcomplexarr', 'define_key', + 'define_msgblk', 'define_msgblk_from_file', 'defroi', 'defsysv', + 'delvar', 'dendro_plot', 'dendrogram', 'deriv', 'derivsig', + 'determ', 'device', 'dfpmin', 'diag_matrix', 'dialog_dbconnect', + 'dialog_message', 'dialog_pickfile', 'dialog_printersetup', + 'dialog_printjob', 'dialog_read_image', + 'dialog_write_image', 'dictionary', 'digital_filter', 'dilate', 'dindgen', + 'dissolve', 'dist', 'distance_measure', 'dlm_load', 'dlm_register', + 'doc_library', 'double', 'draw_roi', 'edge_dog', 'efont', + 'eigenql', 'eigenvec', 'ellipse', 'elmhes', 'emboss', + 'empty', 'enable_sysrtn', 'eof', 'eos', 'erase', + 'erf', 'erfc', 'erfcx', 'erode', 'errorplot', + 'errplot', 'estimator_filter', 'execute', 'exit', 'exp', + 'expand', 'expand_path', 'expint', 'extract', 'extract_slice', + 'f_cvf', 'f_pdf', 'factorial', 'fft', 'file_basename', + 'file_chmod', 'file_copy', 'file_delete', 'file_dirname', + 'file_expand_path', 'file_gunzip', 'file_gzip', 'file_info', + 'file_lines', 'file_link', 'file_mkdir', 'file_move', + 'file_poll_input', 'file_readlink', 'file_same', + 'file_search', 'file_tar', 'file_test', 'file_untar', 'file_unzip', + 'file_which', 'file_zip', 'filepath', 'findgen', 'finite', + 'fix', 'flick', 'float', 'floor', 'flow3', + 'fltarr', 'flush', 'format_axis_values', 'forward_function', 'free_lun', + 'fstat', 'fulstr', 'funct', 'function', 'fv_test', + 'fx_root', 'fz_roots', 'gamma', 'gamma_ct', 'gauss_cvf', + 'gauss_pdf', 'gauss_smooth', 'gauss2dfit', 'gaussfit', + 'gaussian_function', 'gaussint', 'get_drive_list', 'get_dxf_objects', + 'get_kbrd', 'get_login_info', + 'get_lun', 'get_screen_size', 'getenv', 'getwindows', 'greg2jul', + 'grib', 'grid_input', 'grid_tps', 'grid3', 'griddata', + 'gs_iter', 'h_eq_ct', 'h_eq_int', 'hanning', 'hash', + 'hdf', 'hdf5', 'heap_free', 'heap_gc', 'heap_nosave', + 'heap_refcount', 'heap_save', 'help', 'hilbert', 'hist_2d', + 'hist_equal', 'histogram', 'hls', 'hough', 'hqr', + 'hsv', 'i18n_multibytetoutf8', + 'i18n_multibytetowidechar', 'i18n_utf8tomultibyte', + 'i18n_widechartomultibyte', + 'ibeta', 'icontour', 'iconvertcoord', 'idelete', 'identity', + 'idl_base64', 'idl_container', 'idl_validname', + 'idlexbr_assistant', 'idlitsys_createtool', + 'idlunit', 'iellipse', 'igamma', 'igetcurrent', 'igetdata', + 'igetid', 'igetproperty', 'iimage', 'image', 'image_cont', + 'image_statistics', 'image_threshold', 'imaginary', 'imap', 'indgen', + 'int_2d', 'int_3d', 'int_tabulated', 'intarr', 'interpol', + 'interpolate', 'interval_volume', 'invert', 'ioctl', 'iopen', + 'ir_filter', 'iplot', 'ipolygon', 'ipolyline', 'iputdata', + 'iregister', 'ireset', 'iresolve', 'irotate', 'isa', + 'isave', 'iscale', 'isetcurrent', 'isetproperty', 'ishft', + 'isocontour', 'isosurface', 'isurface', 'itext', 'itranslate', + 'ivector', 'ivolume', 'izoom', 'journal', 'json_parse', + 'json_serialize', 'jul2greg', 'julday', 'keyword_set', 'krig2d', + 'kurtosis', 'kw_test', 'l64indgen', 'la_choldc', 'la_cholmprove', + 'la_cholsol', 'la_determ', 'la_eigenproblem', 'la_eigenql', 'la_eigenvec', + 'la_elmhes', 'la_gm_linear_model', 'la_hqr', 'la_invert', + 'la_least_square_equality', 'la_least_squares', 'la_linear_equation', + 'la_ludc', 'la_lumprove', 'la_lusol', + 'la_svd', 'la_tridc', 'la_trimprove', 'la_triql', 'la_trired', + 'la_trisol', 'label_date', 'label_region', 'ladfit', 'laguerre', + 'lambda', 'lambdap', 'lambertw', 'laplacian', 'least_squares_filter', + 'leefilt', 'legend', 'legendre', 'linbcg', 'lindgen', + 'linfit', 'linkimage', 'list', 'll_arc_distance', 'lmfit', + 'lmgr', 'lngamma', 'lnp_test', 'loadct', 'locale_get', + 'logical_and', 'logical_or', 'logical_true', 'lon64arr', 'lonarr', + 'long', 'long64', 'lsode', 'lu_complex', 'ludc', + 'lumprove', 'lusol', 'm_correlate', 'machar', 'make_array', + 'make_dll', 'make_rt', 'map', 'mapcontinents', 'mapgrid', + 'map_2points', 'map_continents', 'map_grid', 'map_image', 'map_patch', + 'map_proj_forward', 'map_proj_image', 'map_proj_info', + 'map_proj_init', 'map_proj_inverse', + 'map_set', 'matrix_multiply', 'matrix_power', 'max', 'md_test', + 'mean', 'meanabsdev', 'mean_filter', 'median', 'memory', + 'mesh_clip', 'mesh_decimate', 'mesh_issolid', + 'mesh_merge', 'mesh_numtriangles', + 'mesh_obj', 'mesh_smooth', 'mesh_surfacearea', + 'mesh_validate', 'mesh_volume', + 'message', 'min', 'min_curve_surf', 'mk_html_help', 'modifyct', + 'moment', 'morph_close', 'morph_distance', + 'morph_gradient', 'morph_hitormiss', + 'morph_open', 'morph_thin', 'morph_tophat', 'multi', 'n_elements', + 'n_params', 'n_tags', 'ncdf', 'newton', 'noise_hurl', + 'noise_pick', 'noise_scatter', 'noise_slur', 'norm', 'obj_class', + 'obj_destroy', 'obj_hasmethod', 'obj_isa', 'obj_new', 'obj_valid', + 'objarr', 'on_error', 'on_ioerror', 'online_help', 'openr', + 'openu', 'openw', 'oplot', 'oploterr', 'orderedhash', + 'p_correlate', 'parse_url', 'particle_trace', 'path_cache', 'path_sep', + 'pcomp', 'plot', 'plot3d', 'plot', 'plot_3dbox', + 'plot_field', 'ploterr', 'plots', 'polar_contour', 'polar_surface', + 'polyfill', 'polyshade', 'pnt_line', 'point_lun', 'polarplot', + 'poly', 'poly_2d', 'poly_area', 'poly_fit', 'polyfillv', + 'polygon', 'polyline', 'polywarp', 'popd', 'powell', + 'pref_commit', 'pref_get', 'pref_set', 'prewitt', 'primes', + 'print', 'printf', 'printd', 'pro', 'product', + 'profile', 'profiler', 'profiles', 'project_vol', 'ps_show_fonts', + 'psafm', 'pseudo', 'ptr_free', 'ptr_new', 'ptr_valid', + 'ptrarr', 'pushd', 'qgrid3', 'qhull', 'qromb', + 'qromo', 'qsimp', 'query_*', 'query_ascii', 'query_bmp', + 'query_csv', 'query_dicom', 'query_gif', 'query_image', 'query_jpeg', + 'query_jpeg2000', 'query_mrsid', 'query_pict', 'query_png', 'query_ppm', + 'query_srf', 'query_tiff', 'query_video', 'query_wav', 'r_correlate', + 'r_test', 'radon', 'randomn', 'randomu', 'ranks', + 'rdpix', 'read', 'readf', 'read_ascii', 'read_binary', + 'read_bmp', 'read_csv', 'read_dicom', 'read_gif', 'read_image', + 'read_interfile', 'read_jpeg', 'read_jpeg2000', 'read_mrsid', 'read_pict', + 'read_png', 'read_ppm', 'read_spr', 'read_srf', 'read_sylk', + 'read_tiff', 'read_video', 'read_wav', 'read_wave', 'read_x11_bitmap', + 'read_xwd', 'reads', 'readu', 'real_part', 'rebin', + 'recall_commands', 'recon3', 'reduce_colors', 'reform', 'region_grow', + 'register_cursor', 'regress', 'replicate', + 'replicate_inplace', 'resolve_all', + 'resolve_routine', 'restore', 'retall', 'return', 'reverse', + 'rk4', 'roberts', 'rot', 'rotate', 'round', + 'routine_filepath', 'routine_info', 'rs_test', 's_test', 'save', + 'savgol', 'scale3', 'scale3d', 'scatterplot', 'scatterplot3d', + 'scope_level', 'scope_traceback', 'scope_varfetch', + 'scope_varname', 'search2d', + 'search3d', 'sem_create', 'sem_delete', 'sem_lock', 'sem_release', + 'set_plot', 'set_shading', 'setenv', 'sfit', 'shade_surf', + 'shade_surf_irr', 'shade_volume', 'shift', 'shift_diff', 'shmdebug', + 'shmmap', 'shmunmap', 'shmvar', 'show3', 'showfont', + 'signum', 'simplex', 'sin', 'sindgen', 'sinh', + 'size', 'skewness', 'skip_lun', 'slicer3', 'slide_image', + 'smooth', 'sobel', 'socket', 'sort', 'spawn', + 'sph_4pnt', 'sph_scat', 'spher_harm', 'spl_init', 'spl_interp', + 'spline', 'spline_p', 'sprsab', 'sprsax', 'sprsin', + 'sprstp', 'sqrt', 'standardize', 'stddev', 'stop', + 'strarr', 'strcmp', 'strcompress', 'streamline', 'streamline', + 'stregex', 'stretch', 'string', 'strjoin', 'strlen', + 'strlowcase', 'strmatch', 'strmessage', 'strmid', 'strpos', + 'strput', 'strsplit', 'strtrim', 'struct_assign', 'struct_hide', + 'strupcase', 'surface', 'surface', 'surfr', 'svdc', + 'svdfit', 'svsol', 'swap_endian', 'swap_endian_inplace', 'symbol', + 'systime', 't_cvf', 't_pdf', 't3d', 'tag_names', + 'tan', 'tanh', 'tek_color', 'temporary', 'terminal_size', + 'tetra_clip', 'tetra_surface', 'tetra_volume', 'text', 'thin', + 'thread', 'threed', 'tic', 'time_test2', 'timegen', + 'timer', 'timestamp', 'timestamptovalues', 'tm_test', 'toc', + 'total', 'trace', 'transpose', 'tri_surf', 'triangulate', + 'trigrid', 'triql', 'trired', 'trisol', 'truncate_lun', + 'ts_coef', 'ts_diff', 'ts_fcast', 'ts_smooth', 'tv', + 'tvcrs', 'tvlct', 'tvrd', 'tvscl', 'typename', + 'uindgen', 'uint', 'uintarr', 'ul64indgen', 'ulindgen', + 'ulon64arr', 'ulonarr', 'ulong', 'ulong64', 'uniq', + 'unsharp_mask', 'usersym', 'value_locate', 'variance', 'vector', + 'vector_field', 'vel', 'velovect', 'vert_t3d', 'voigt', + 'volume', 'voronoi', 'voxel_proj', 'wait', 'warp_tri', + 'watershed', 'wdelete', 'wf_draw', 'where', 'widget_base', + 'widget_button', 'widget_combobox', 'widget_control', + 'widget_displaycontextmenu', 'widget_draw', + 'widget_droplist', 'widget_event', 'widget_info', + 'widget_label', 'widget_list', + 'widget_propertysheet', 'widget_slider', 'widget_tab', + 'widget_table', 'widget_text', + 'widget_tree', 'widget_tree_move', 'widget_window', + 'wiener_filter', 'window', + 'window', 'write_bmp', 'write_csv', 'write_gif', 'write_image', + 'write_jpeg', 'write_jpeg2000', 'write_nrif', 'write_pict', 'write_png', + 'write_ppm', 'write_spr', 'write_srf', 'write_sylk', 'write_tiff', + 'write_video', 'write_wav', 'write_wave', 'writeu', 'wset', + 'wshow', 'wtn', 'wv_applet', 'wv_cwt', 'wv_cw_wavelet', + 'wv_denoise', 'wv_dwt', 'wv_fn_coiflet', + 'wv_fn_daubechies', 'wv_fn_gaussian', + 'wv_fn_haar', 'wv_fn_morlet', 'wv_fn_paul', + 'wv_fn_symlet', 'wv_import_data', + 'wv_import_wavelet', 'wv_plot3d_wps', 'wv_plot_multires', + 'wv_pwt', 'wv_tool_denoise', + 'xbm_edit', 'xdisplayfile', 'xdxf', 'xfont', 'xinteranimate', + 'xloadct', 'xmanager', 'xmng_tmpl', 'xmtool', 'xobjview', + 'xobjview_rotate', 'xobjview_write_image', + 'xpalette', 'xpcolor', 'xplot3d', + 'xregistered', 'xroi', 'xsq_test', 'xsurface', 'xvaredit', + 'xvolume', 'xvolume_rotate', 'xvolume_write_image', + 'xyouts', 'zlib_compress', 'zlib_uncompress', 'zoom', 'zoom_24' + ]; + var builtins = wordRegexp(builtinArray); + + var keywordArray = [ + 'begin', 'end', 'endcase', 'endfor', + 'endwhile', 'endif', 'endrep', 'endforeach', + 'break', 'case', 'continue', 'for', + 'foreach', 'goto', 'if', 'then', 'else', + 'repeat', 'until', 'switch', 'while', + 'do', 'pro', 'function' + ]; + var keywords = wordRegexp(keywordArray); + + CodeMirror.registerHelper("hintWords", "idl", builtinArray.concat(keywordArray)); + + var identifiers = new RegExp('^[_a-z\xa1-\uffff][_a-z0-9\xa1-\uffff]*', 'i'); + + var singleOperators = /[+\-*&=<>\/@#~$]/; + var boolOperators = new RegExp('(and|or|eq|lt|le|gt|ge|ne|not)', 'i'); + + function tokenBase(stream) { + // whitespaces + if (stream.eatSpace()) return null; + + // Handle one line Comments + if (stream.match(';')) { + stream.skipToEnd(); + return 'comment'; + } + + // Handle Number Literals + if (stream.match(/^[0-9\.+-]/, false)) { + if (stream.match(/^[+-]?0x[0-9a-fA-F]+/)) + return 'number'; + if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)) + return 'number'; + if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?/)) + return 'number'; + } + + // Handle Strings + if (stream.match(/^"([^"]|(""))*"/)) { return 'string'; } + if (stream.match(/^'([^']|(''))*'/)) { return 'string'; } + + // Handle words + if (stream.match(keywords)) { return 'keyword'; } + if (stream.match(builtins)) { return 'builtin'; } + if (stream.match(identifiers)) { return 'variable'; } + + if (stream.match(singleOperators) || stream.match(boolOperators)) { + return 'operator'; } + + // Handle non-detected items + stream.next(); + return null; + }; + + CodeMirror.defineMode('idl', function() { + return { + token: function(stream) { + return tokenBase(stream); + } + }; + }); + + CodeMirror.defineMIME('text/x-idl', 'idl'); +}); diff --git a/js/codemirror/mode/idl/index.html b/js/codemirror/mode/idl/index.html new file mode 100644 index 0000000..b1fa6c7 --- /dev/null +++ b/js/codemirror/mode/idl/index.html @@ -0,0 +1,65 @@ + + +CodeMirror: IDL mode + + + + + + + + + + +
+

IDL mode

+ +
+ + +

MIME types defined: text/x-idl.

+
diff --git a/js/codemirror/mode/index.html b/js/codemirror/mode/index.html new file mode 100644 index 0000000..db8ee8f --- /dev/null +++ b/js/codemirror/mode/index.html @@ -0,0 +1,166 @@ + + +CodeMirror: Language Modes + + + + + +
+ +

Language modes

+ +

This is a list of every mode in the distribution. Each mode lives +in a subdirectory of the mode/ directory, and typically +defines a single JavaScript file that implements the mode. Loading +such file will make the language available to CodeMirror, through +the mode +option.

+ +
+ +
+ +
diff --git a/js/codemirror/mode/javascript/index.html b/js/codemirror/mode/javascript/index.html new file mode 100644 index 0000000..f4be5ea --- /dev/null +++ b/js/codemirror/mode/javascript/index.html @@ -0,0 +1,118 @@ + + +CodeMirror: JavaScript mode + + + + + + + + + + + + +
+

JavaScript mode

+ + +
+ + + +

+ JavaScript mode supports several configuration options: +

    +
  • json which will set the mode to expect JSON + data rather than a JavaScript program.
  • +
  • jsonld which will set the mode to expect + JSON-LD linked data rather + than a JavaScript program (demo).
  • +
  • typescript which will activate additional + syntax highlighting and some other things for TypeScript code + (demo).
  • +
  • trackScope can be set to false to turn off + tracking of local variables. This will prevent locals from + getting the "variable-2" token type, and will + break completion of locals with javascript-hint.
  • +
  • statementIndent which (given a number) will + determine the amount of indentation to use for statements + continued on a new line.
  • +
  • wordCharacters, a regexp that indicates which + characters should be considered part of an identifier. + Defaults to /[\w$]/, which does not handle + non-ASCII identifiers. Can be set to something more elaborate + to improve Unicode support.
  • +
+

+ +

MIME types defined: text/javascript, application/javascript, application/x-javascript, text/ecmascript, application/ecmascript, application/json, application/x-json, application/manifest+json, application/ld+json, text/typescript, application/typescript.

+
diff --git a/js/codemirror/mode/javascript/javascript.js b/js/codemirror/mode/javascript/javascript.js new file mode 100644 index 0000000..bb735eb --- /dev/null +++ b/js/codemirror/mode/javascript/javascript.js @@ -0,0 +1,960 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("javascript", function(config, parserConfig) { + var indentUnit = config.indentUnit; + var statementIndent = parserConfig.statementIndent; + var jsonldMode = parserConfig.jsonld; + var jsonMode = parserConfig.json || jsonldMode; + var trackScope = parserConfig.trackScope !== false + var isTS = parserConfig.typescript; + var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/; + + // Tokenizer + + var keywords = function(){ + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"), D = kw("keyword d"); + var operator = kw("operator"), atom = {type: "atom", style: "atom"}; + + return { + "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, + "return": D, "break": D, "continue": D, "new": kw("new"), "delete": C, "void": C, "throw": C, + "debugger": kw("debugger"), "var": kw("var"), "const": kw("var"), "let": kw("var"), + "function": kw("function"), "catch": kw("catch"), + "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), + "in": operator, "typeof": operator, "instanceof": operator, + "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, + "this": kw("this"), "class": kw("class"), "super": kw("atom"), + "yield": C, "export": kw("export"), "import": kw("import"), "extends": C, + "await": C + }; + }(); + + var isOperatorChar = /[+\-*&%=<>!?|~^@]/; + var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/; + + function readRegexp(stream) { + var escaped = false, next, inSet = false; + while ((next = stream.next()) != null) { + if (!escaped) { + if (next == "/" && !inSet) return; + if (next == "[") inSet = true; + else if (inSet && next == "]") inSet = false; + } + escaped = !escaped && next == "\\"; + } + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (ch == "." && stream.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/)) { + return ret("number", "number"); + } else if (ch == "." && stream.match("..")) { + return ret("spread", "meta"); + } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + return ret(ch); + } else if (ch == "=" && stream.eat(">")) { + return ret("=>", "operator"); + } else if (ch == "0" && stream.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/)) { + return ret("number", "number"); + } else if (/\d/.test(ch)) { + stream.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/); + return ret("number", "number"); + } else if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } else if (stream.eat("/")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } else if (expressionAllowed(stream, state, 1)) { + readRegexp(stream); + stream.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/); + return ret("regexp", "string-2"); + } else { + stream.eat("="); + return ret("operator", "operator", stream.current()); + } + } else if (ch == "`") { + state.tokenize = tokenQuasi; + return tokenQuasi(stream, state); + } else if (ch == "#" && stream.peek() == "!") { + stream.skipToEnd(); + return ret("meta", "meta"); + } else if (ch == "#" && stream.eatWhile(wordRE)) { + return ret("variable", "property") + } else if (ch == "<" && stream.match("!--") || + (ch == "-" && stream.match("->") && !/\S/.test(stream.string.slice(0, stream.start)))) { + stream.skipToEnd() + return ret("comment", "comment") + } else if (isOperatorChar.test(ch)) { + if (ch != ">" || !state.lexical || state.lexical.type != ">") { + if (stream.eat("=")) { + if (ch == "!" || ch == "=") stream.eat("=") + } else if (/[<>*+\-|&?]/.test(ch)) { + stream.eat(ch) + if (ch == ">") stream.eat(ch) + } + } + if (ch == "?" && stream.eat(".")) return ret(".") + return ret("operator", "operator", stream.current()); + } else if (wordRE.test(ch)) { + stream.eatWhile(wordRE); + var word = stream.current() + if (state.lastType != ".") { + if (keywords.propertyIsEnumerable(word)) { + var kw = keywords[word] + return ret(kw.type, kw.style, word) + } + if (word == "async" && stream.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/, false)) + return ret("async", "keyword", word) + } + return ret("variable", "variable", word) + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next; + if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){ + state.tokenize = tokenBase; + return ret("jsonld-keyword", "meta"); + } + while ((next = stream.next()) != null) { + if (next == quote && !escaped) break; + escaped = !escaped && next == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenQuasi(stream, state) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && next == "\\"; + } + return ret("quasi", "string-2", stream.current()); + } + + var brackets = "([{}])"; + // This is a crude lookahead trick to try and notice that we're + // parsing the argument patterns for a fat-arrow function before we + // actually hit the arrow token. It only works if the arrow is on + // the same line as the arguments and there's no strange noise + // (comments) in between. Fallback is to only notice when we hit the + // arrow, and not declare the arguments as locals for the arrow + // body. + function findFatArrow(stream, state) { + if (state.fatArrowAt) state.fatArrowAt = null; + var arrow = stream.string.indexOf("=>", stream.start); + if (arrow < 0) return; + + if (isTS) { // Try to skip TypeScript return type declarations after the arguments + var m = /:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(stream.string.slice(stream.start, arrow)) + if (m) arrow = m.index + } + + var depth = 0, sawSomething = false; + for (var pos = arrow - 1; pos >= 0; --pos) { + var ch = stream.string.charAt(pos); + var bracket = brackets.indexOf(ch); + if (bracket >= 0 && bracket < 3) { + if (!depth) { ++pos; break; } + if (--depth == 0) { if (ch == "(") sawSomething = true; break; } + } else if (bracket >= 3 && bracket < 6) { + ++depth; + } else if (wordRE.test(ch)) { + sawSomething = true; + } else if (/["'\/`]/.test(ch)) { + for (;; --pos) { + if (pos == 0) return + var next = stream.string.charAt(pos - 1) + if (next == ch && stream.string.charAt(pos - 2) != "\\") { pos--; break } + } + } else if (sawSomething && !depth) { + ++pos; + break; + } + } + if (sawSomething && !depth) state.fatArrowAt = pos; + } + + // Parser + + var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, + "regexp": true, "this": true, "import": true, "jsonld-keyword": true}; + + function JSLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + if (!trackScope) return false + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return true; + for (var cx = state.context; cx; cx = cx.prev) { + for (var v = cx.vars; v; v = v.next) + if (v.name == varname) return true; + } + } + + function parseJS(state, style, type, content, stream) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; cx.style = style; + + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + + while(true) { + var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; + if (combinator(type, content)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + if (cx.marked) return cx.marked; + if (type == "variable" && inScope(state, content)) return "variable-2"; + return style; + } + } + } + + // Combinator utils + + var cx = {state: null, column: null, marked: null, cc: null}; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function inList(name, list) { + for (var v = list; v; v = v.next) if (v.name == name) return true + return false; + } + function register(varname) { + var state = cx.state; + cx.marked = "def"; + if (!trackScope) return + if (state.context) { + if (state.lexical.info == "var" && state.context && state.context.block) { + // FIXME function decls are also not block scoped + var newContext = registerVarScoped(varname, state.context) + if (newContext != null) { + state.context = newContext + return + } + } else if (!inList(varname, state.localVars)) { + state.localVars = new Var(varname, state.localVars) + return + } + } + // Fall through means this is global + if (parserConfig.globalVars && !inList(varname, state.globalVars)) + state.globalVars = new Var(varname, state.globalVars) + } + function registerVarScoped(varname, context) { + if (!context) { + return null + } else if (context.block) { + var inner = registerVarScoped(varname, context.prev) + if (!inner) return null + if (inner == context.prev) return context + return new Context(inner, context.vars, true) + } else if (inList(varname, context.vars)) { + return context + } else { + return new Context(context.prev, new Var(varname, context.vars), false) + } + } + + function isModifier(name) { + return name == "public" || name == "private" || name == "protected" || name == "abstract" || name == "readonly" + } + + // Combinators + + function Context(prev, vars, block) { this.prev = prev; this.vars = vars; this.block = block } + function Var(name, next) { this.name = name; this.next = next } + + var defaultVars = new Var("this", new Var("arguments", null)) + function pushcontext() { + cx.state.context = new Context(cx.state.context, cx.state.localVars, false) + cx.state.localVars = defaultVars + } + function pushblockcontext() { + cx.state.context = new Context(cx.state.context, cx.state.localVars, true) + cx.state.localVars = null + } + pushcontext.lex = pushblockcontext.lex = true + function popcontext() { + cx.state.localVars = cx.state.context.vars + cx.state.context = cx.state.context.prev + } + popcontext.lex = true + function pushlex(type, info) { + var result = function() { + var state = cx.state, indent = state.indented; + if (state.lexical.type == "stat") indent = state.lexical.indented; + else for (var outer = state.lexical; outer && outer.type == ")" && outer.align; outer = outer.prev) + indent = outer.indented; + state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + function exp(type) { + if (type == wanted) return cont(); + else if (wanted == ";" || type == "}" || type == ")" || type == "]") return pass(); + else return cont(exp); + }; + return exp; + } + + function statement(type, value) { + if (type == "var") return cont(pushlex("vardef", value), vardef, expect(";"), poplex); + if (type == "keyword a") return cont(pushlex("form"), parenExpr, statement, poplex); + if (type == "keyword b") return cont(pushlex("form"), statement, poplex); + if (type == "keyword d") return cx.stream.match(/^\s*$/, false) ? cont() : cont(pushlex("stat"), maybeexpression, expect(";"), poplex); + if (type == "debugger") return cont(expect(";")); + if (type == "{") return cont(pushlex("}"), pushblockcontext, block, poplex, popcontext); + if (type == ";") return cont(); + if (type == "if") { + if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex) + cx.state.cc.pop()(); + return cont(pushlex("form"), parenExpr, statement, poplex, maybeelse); + } + if (type == "function") return cont(functiondef); + if (type == "for") return cont(pushlex("form"), pushblockcontext, forspec, statement, popcontext, poplex); + if (type == "class" || (isTS && value == "interface")) { + cx.marked = "keyword" + return cont(pushlex("form", type == "class" ? type : value), className, poplex) + } + if (type == "variable") { + if (isTS && value == "declare") { + cx.marked = "keyword" + return cont(statement) + } else if (isTS && (value == "module" || value == "enum" || value == "type") && cx.stream.match(/^\s*\w/, false)) { + cx.marked = "keyword" + if (value == "enum") return cont(enumdef); + else if (value == "type") return cont(typename, expect("operator"), typeexpr, expect(";")); + else return cont(pushlex("form"), pattern, expect("{"), pushlex("}"), block, poplex, poplex) + } else if (isTS && value == "namespace") { + cx.marked = "keyword" + return cont(pushlex("form"), expression, statement, poplex) + } else if (isTS && value == "abstract") { + cx.marked = "keyword" + return cont(statement) + } else { + return cont(pushlex("stat"), maybelabel); + } + } + if (type == "switch") return cont(pushlex("form"), parenExpr, expect("{"), pushlex("}", "switch"), pushblockcontext, + block, poplex, poplex, popcontext); + if (type == "case") return cont(expression, expect(":")); + if (type == "default") return cont(expect(":")); + if (type == "catch") return cont(pushlex("form"), pushcontext, maybeCatchBinding, statement, poplex, popcontext); + if (type == "export") return cont(pushlex("stat"), afterExport, poplex); + if (type == "import") return cont(pushlex("stat"), afterImport, poplex); + if (type == "async") return cont(statement) + if (value == "@") return cont(expression, statement) + return pass(pushlex("stat"), expression, expect(";"), poplex); + } + function maybeCatchBinding(type) { + if (type == "(") return cont(funarg, expect(")")) + } + function expression(type, value) { + return expressionInner(type, value, false); + } + function expressionNoComma(type, value) { + return expressionInner(type, value, true); + } + function parenExpr(type) { + if (type != "(") return pass() + return cont(pushlex(")"), maybeexpression, expect(")"), poplex) + } + function expressionInner(type, value, noComma) { + if (cx.state.fatArrowAt == cx.stream.start) { + var body = noComma ? arrowBodyNoComma : arrowBody; + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, expect("=>"), body, popcontext); + else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext); + } + + var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; + if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); + if (type == "function") return cont(functiondef, maybeop); + if (type == "class" || (isTS && value == "interface")) { cx.marked = "keyword"; return cont(pushlex("form"), classExpression, poplex); } + if (type == "keyword c" || type == "async") return cont(noComma ? expressionNoComma : expression); + if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeop); + if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); + if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop); + if (type == "{") return contCommasep(objprop, "}", null, maybeop); + if (type == "quasi") return pass(quasi, maybeop); + if (type == "new") return cont(maybeTarget(noComma)); + return cont(); + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expression); + } + + function maybeoperatorComma(type, value) { + if (type == ",") return cont(maybeexpression); + return maybeoperatorNoComma(type, value, false); + } + function maybeoperatorNoComma(type, value, noComma) { + var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; + var expr = noComma == false ? expression : expressionNoComma; + if (type == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); + if (type == "operator") { + if (/\+\+|--/.test(value) || isTS && value == "!") return cont(me); + if (isTS && value == "<" && cx.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/, false)) + return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, me); + if (value == "?") return cont(expression, expect(":"), expr); + return cont(expr); + } + if (type == "quasi") { return pass(quasi, me); } + if (type == ";") return; + if (type == "(") return contCommasep(expressionNoComma, ")", "call", me); + if (type == ".") return cont(property, me); + if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); + if (isTS && value == "as") { cx.marked = "keyword"; return cont(typeexpr, me) } + if (type == "regexp") { + cx.state.lastType = cx.marked = "operator" + cx.stream.backUp(cx.stream.pos - cx.stream.start - 1) + return cont(expr) + } + } + function quasi(type, value) { + if (type != "quasi") return pass(); + if (value.slice(value.length - 2) != "${") return cont(quasi); + return cont(maybeexpression, continueQuasi); + } + function continueQuasi(type) { + if (type == "}") { + cx.marked = "string-2"; + cx.state.tokenize = tokenQuasi; + return cont(quasi); + } + } + function arrowBody(type) { + findFatArrow(cx.stream, cx.state); + return pass(type == "{" ? statement : expression); + } + function arrowBodyNoComma(type) { + findFatArrow(cx.stream, cx.state); + return pass(type == "{" ? statement : expressionNoComma); + } + function maybeTarget(noComma) { + return function(type) { + if (type == ".") return cont(noComma ? targetNoComma : target); + else if (type == "variable" && isTS) return cont(maybeTypeArgs, noComma ? maybeoperatorNoComma : maybeoperatorComma) + else return pass(noComma ? expressionNoComma : expression); + }; + } + function target(_, value) { + if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorComma); } + } + function targetNoComma(_, value) { + if (value == "target") { cx.marked = "keyword"; return cont(maybeoperatorNoComma); } + } + function maybelabel(type) { + if (type == ":") return cont(poplex, statement); + return pass(maybeoperatorComma, expect(";"), poplex); + } + function property(type) { + if (type == "variable") {cx.marked = "property"; return cont();} + } + function objprop(type, value) { + if (type == "async") { + cx.marked = "property"; + return cont(objprop); + } else if (type == "variable" || cx.style == "keyword") { + cx.marked = "property"; + if (value == "get" || value == "set") return cont(getterSetter); + var m // Work around fat-arrow-detection complication for detecting typescript typed arrow params + if (isTS && cx.state.fatArrowAt == cx.stream.start && (m = cx.stream.match(/^\s*:\s*/, false))) + cx.state.fatArrowAt = cx.stream.pos + m[0].length + return cont(afterprop); + } else if (type == "number" || type == "string") { + cx.marked = jsonldMode ? "property" : (cx.style + " property"); + return cont(afterprop); + } else if (type == "jsonld-keyword") { + return cont(afterprop); + } else if (isTS && isModifier(value)) { + cx.marked = "keyword" + return cont(objprop) + } else if (type == "[") { + return cont(expression, maybetype, expect("]"), afterprop); + } else if (type == "spread") { + return cont(expressionNoComma, afterprop); + } else if (value == "*") { + cx.marked = "keyword"; + return cont(objprop); + } else if (type == ":") { + return pass(afterprop) + } + } + function getterSetter(type) { + if (type != "variable") return pass(afterprop); + cx.marked = "property"; + return cont(functiondef); + } + function afterprop(type) { + if (type == ":") return cont(expressionNoComma); + if (type == "(") return pass(functiondef); + } + function commasep(what, end, sep) { + function proceed(type, value) { + if (sep ? sep.indexOf(type) > -1 : type == ",") { + var lex = cx.state.lexical; + if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; + return cont(function(type, value) { + if (type == end || value == end) return pass() + return pass(what) + }, proceed); + } + if (type == end || value == end) return cont(); + if (sep && sep.indexOf(";") > -1) return pass(what) + return cont(expect(end)); + } + return function(type, value) { + if (type == end || value == end) return cont(); + return pass(what, proceed); + }; + } + function contCommasep(what, end, info) { + for (var i = 3; i < arguments.length; i++) + cx.cc.push(arguments[i]); + return cont(pushlex(end, info), commasep(what, end), poplex); + } + function block(type) { + if (type == "}") return cont(); + return pass(statement, block); + } + function maybetype(type, value) { + if (isTS) { + if (type == ":") return cont(typeexpr); + if (value == "?") return cont(maybetype); + } + } + function maybetypeOrIn(type, value) { + if (isTS && (type == ":" || value == "in")) return cont(typeexpr) + } + function mayberettype(type) { + if (isTS && type == ":") { + if (cx.stream.match(/^\s*\w+\s+is\b/, false)) return cont(expression, isKW, typeexpr) + else return cont(typeexpr) + } + } + function isKW(_, value) { + if (value == "is") { + cx.marked = "keyword" + return cont() + } + } + function typeexpr(type, value) { + if (value == "keyof" || value == "typeof" || value == "infer" || value == "readonly") { + cx.marked = "keyword" + return cont(value == "typeof" ? expressionNoComma : typeexpr) + } + if (type == "variable" || value == "void") { + cx.marked = "type" + return cont(afterType) + } + if (value == "|" || value == "&") return cont(typeexpr) + if (type == "string" || type == "number" || type == "atom") return cont(afterType); + if (type == "[") return cont(pushlex("]"), commasep(typeexpr, "]", ","), poplex, afterType) + if (type == "{") return cont(pushlex("}"), typeprops, poplex, afterType) + if (type == "(") return cont(commasep(typearg, ")"), maybeReturnType, afterType) + if (type == "<") return cont(commasep(typeexpr, ">"), typeexpr) + if (type == "quasi") { return pass(quasiType, afterType); } + } + function maybeReturnType(type) { + if (type == "=>") return cont(typeexpr) + } + function typeprops(type) { + if (type.match(/[\}\)\]]/)) return cont() + if (type == "," || type == ";") return cont(typeprops) + return pass(typeprop, typeprops) + } + function typeprop(type, value) { + if (type == "variable" || cx.style == "keyword") { + cx.marked = "property" + return cont(typeprop) + } else if (value == "?" || type == "number" || type == "string") { + return cont(typeprop) + } else if (type == ":") { + return cont(typeexpr) + } else if (type == "[") { + return cont(expect("variable"), maybetypeOrIn, expect("]"), typeprop) + } else if (type == "(") { + return pass(functiondecl, typeprop) + } else if (!type.match(/[;\}\)\],]/)) { + return cont() + } + } + function quasiType(type, value) { + if (type != "quasi") return pass(); + if (value.slice(value.length - 2) != "${") return cont(quasiType); + return cont(typeexpr, continueQuasiType); + } + function continueQuasiType(type) { + if (type == "}") { + cx.marked = "string-2"; + cx.state.tokenize = tokenQuasi; + return cont(quasiType); + } + } + function typearg(type, value) { + if (type == "variable" && cx.stream.match(/^\s*[?:]/, false) || value == "?") return cont(typearg) + if (type == ":") return cont(typeexpr) + if (type == "spread") return cont(typearg) + return pass(typeexpr) + } + function afterType(type, value) { + if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) + if (value == "|" || type == "." || value == "&") return cont(typeexpr) + if (type == "[") return cont(typeexpr, expect("]"), afterType) + if (value == "extends" || value == "implements") { cx.marked = "keyword"; return cont(typeexpr) } + if (value == "?") return cont(typeexpr, expect(":"), typeexpr) + } + function maybeTypeArgs(_, value) { + if (value == "<") return cont(pushlex(">"), commasep(typeexpr, ">"), poplex, afterType) + } + function typeparam() { + return pass(typeexpr, maybeTypeDefault) + } + function maybeTypeDefault(_, value) { + if (value == "=") return cont(typeexpr) + } + function vardef(_, value) { + if (value == "enum") {cx.marked = "keyword"; return cont(enumdef)} + return pass(pattern, maybetype, maybeAssign, vardefCont); + } + function pattern(type, value) { + if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(pattern) } + if (type == "variable") { register(value); return cont(); } + if (type == "spread") return cont(pattern); + if (type == "[") return contCommasep(eltpattern, "]"); + if (type == "{") return contCommasep(proppattern, "}"); + } + function proppattern(type, value) { + if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { + register(value); + return cont(maybeAssign); + } + if (type == "variable") cx.marked = "property"; + if (type == "spread") return cont(pattern); + if (type == "}") return pass(); + if (type == "[") return cont(expression, expect(']'), expect(':'), proppattern); + return cont(expect(":"), pattern, maybeAssign); + } + function eltpattern() { + return pass(pattern, maybeAssign) + } + function maybeAssign(_type, value) { + if (value == "=") return cont(expressionNoComma); + } + function vardefCont(type) { + if (type == ",") return cont(vardef); + } + function maybeelse(type, value) { + if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex); + } + function forspec(type, value) { + if (value == "await") return cont(forspec); + if (type == "(") return cont(pushlex(")"), forspec1, poplex); + } + function forspec1(type) { + if (type == "var") return cont(vardef, forspec2); + if (type == "variable") return cont(forspec2); + return pass(forspec2) + } + function forspec2(type, value) { + if (type == ")") return cont() + if (type == ";") return cont(forspec2) + if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression, forspec2) } + return pass(expression, forspec2) + } + function functiondef(type, value) { + if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} + if (type == "variable") {register(value); return cont(functiondef);} + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, statement, popcontext); + if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondef) + } + function functiondecl(type, value) { + if (value == "*") {cx.marked = "keyword"; return cont(functiondecl);} + if (type == "variable") {register(value); return cont(functiondecl);} + if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, mayberettype, popcontext); + if (isTS && value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, functiondecl) + } + function typename(type, value) { + if (type == "keyword" || type == "variable") { + cx.marked = "type" + return cont(typename) + } else if (value == "<") { + return cont(pushlex(">"), commasep(typeparam, ">"), poplex) + } + } + function funarg(type, value) { + if (value == "@") cont(expression, funarg) + if (type == "spread") return cont(funarg); + if (isTS && isModifier(value)) { cx.marked = "keyword"; return cont(funarg); } + if (isTS && type == "this") return cont(maybetype, maybeAssign) + return pass(pattern, maybetype, maybeAssign); + } + function classExpression(type, value) { + // Class expressions may have an optional name. + if (type == "variable") return className(type, value); + return classNameAfter(type, value); + } + function className(type, value) { + if (type == "variable") {register(value); return cont(classNameAfter);} + } + function classNameAfter(type, value) { + if (value == "<") return cont(pushlex(">"), commasep(typeparam, ">"), poplex, classNameAfter) + if (value == "extends" || value == "implements" || (isTS && type == ",")) { + if (value == "implements") cx.marked = "keyword"; + return cont(isTS ? typeexpr : expression, classNameAfter); + } + if (type == "{") return cont(pushlex("}"), classBody, poplex); + } + function classBody(type, value) { + if (type == "async" || + (type == "variable" && + (value == "static" || value == "get" || value == "set" || (isTS && isModifier(value))) && + cx.stream.match(/^\s+#?[\w$\xa1-\uffff]/, false))) { + cx.marked = "keyword"; + return cont(classBody); + } + if (type == "variable" || cx.style == "keyword") { + cx.marked = "property"; + return cont(classfield, classBody); + } + if (type == "number" || type == "string") return cont(classfield, classBody); + if (type == "[") + return cont(expression, maybetype, expect("]"), classfield, classBody) + if (value == "*") { + cx.marked = "keyword"; + return cont(classBody); + } + if (isTS && type == "(") return pass(functiondecl, classBody) + if (type == ";" || type == ",") return cont(classBody); + if (type == "}") return cont(); + if (value == "@") return cont(expression, classBody) + } + function classfield(type, value) { + if (value == "!") return cont(classfield) + if (value == "?") return cont(classfield) + if (type == ":") return cont(typeexpr, maybeAssign) + if (value == "=") return cont(expressionNoComma) + var context = cx.state.lexical.prev, isInterface = context && context.info == "interface" + return pass(isInterface ? functiondecl : functiondef) + } + function afterExport(type, value) { + if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } + if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } + if (type == "{") return cont(commasep(exportField, "}"), maybeFrom, expect(";")); + return pass(statement); + } + function exportField(type, value) { + if (value == "as") { cx.marked = "keyword"; return cont(expect("variable")); } + if (type == "variable") return pass(expressionNoComma, exportField); + } + function afterImport(type) { + if (type == "string") return cont(); + if (type == "(") return pass(expression); + if (type == ".") return pass(maybeoperatorComma); + return pass(importSpec, maybeMoreImports, maybeFrom); + } + function importSpec(type, value) { + if (type == "{") return contCommasep(importSpec, "}"); + if (type == "variable") register(value); + if (value == "*") cx.marked = "keyword"; + return cont(maybeAs); + } + function maybeMoreImports(type) { + if (type == ",") return cont(importSpec, maybeMoreImports) + } + function maybeAs(_type, value) { + if (value == "as") { cx.marked = "keyword"; return cont(importSpec); } + } + function maybeFrom(_type, value) { + if (value == "from") { cx.marked = "keyword"; return cont(expression); } + } + function arrayLiteral(type) { + if (type == "]") return cont(); + return pass(commasep(expressionNoComma, "]")); + } + function enumdef() { + return pass(pushlex("form"), pattern, expect("{"), pushlex("}"), commasep(enummember, "}"), poplex, poplex) + } + function enummember() { + return pass(pattern, maybeAssign); + } + + function isContinuedStatement(state, textAfter) { + return state.lastType == "operator" || state.lastType == "," || + isOperatorChar.test(textAfter.charAt(0)) || + /[,.]/.test(textAfter.charAt(0)); + } + + function expressionAllowed(stream, state, backUp) { + return state.tokenize == tokenBase && + /^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(state.lastType) || + (state.lastType == "quasi" && /\{\s*$/.test(stream.string.slice(0, stream.pos - (backUp || 0)))) + } + + // Interface + + return { + startState: function(basecolumn) { + var state = { + tokenize: tokenBase, + lastType: "sof", + cc: [], + lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: parserConfig.localVars, + context: parserConfig.localVars && new Context(null, null, false), + indented: basecolumn || 0 + }; + if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") + state.globalVars = parserConfig.globalVars; + return state; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + findFatArrow(stream, state); + } + if (state.tokenize != tokenComment && stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; + return parseJS(state, style, type, content, stream); + }, + + indent: function(state, textAfter) { + if (state.tokenize == tokenComment || state.tokenize == tokenQuasi) return CodeMirror.Pass; + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, top + // Kludge to prevent 'maybelse' from blocking lexical scope pops + if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) { + var c = state.cc[i]; + if (c == poplex) lexical = lexical.prev; + else if (c != maybeelse && c != popcontext) break; + } + while ((lexical.type == "stat" || lexical.type == "form") && + (firstChar == "}" || ((top = state.cc[state.cc.length - 1]) && + (top == maybeoperatorComma || top == maybeoperatorNoComma) && + !/^[,\.=+\-*:?[\(]/.test(textAfter)))) + lexical = lexical.prev; + if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") + lexical = lexical.prev; + var type = lexical.type, closing = firstChar == type; + + if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info.length + 1 : 0); + else if (type == "form" && firstChar == "{") return lexical.indented; + else if (type == "form") return lexical.indented + indentUnit; + else if (type == "stat") + return lexical.indented + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0); + else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) + return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + else return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, + blockCommentStart: jsonMode ? null : "/*", + blockCommentEnd: jsonMode ? null : "*/", + blockCommentContinue: jsonMode ? null : " * ", + lineComment: jsonMode ? null : "//", + fold: "brace", + closeBrackets: "()[]{}''\"\"``", + + helperType: jsonMode ? "json" : "javascript", + jsonldMode: jsonldMode, + jsonMode: jsonMode, + + expressionAllowed: expressionAllowed, + + skipExpression: function(state) { + parseJS(state, "atom", "atom", "true", new CodeMirror.StringStream("", 2, null)) + } + }; +}); + +CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/); + +CodeMirror.defineMIME("text/javascript", "javascript"); +CodeMirror.defineMIME("text/ecmascript", "javascript"); +CodeMirror.defineMIME("application/javascript", "javascript"); +CodeMirror.defineMIME("application/x-javascript", "javascript"); +CodeMirror.defineMIME("application/ecmascript", "javascript"); +CodeMirror.defineMIME("application/json", { name: "javascript", json: true }); +CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true }); +CodeMirror.defineMIME("application/manifest+json", { name: "javascript", json: true }) +CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true }); +CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); +CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); + +}); diff --git a/js/codemirror/mode/javascript/json-ld.html b/js/codemirror/mode/javascript/json-ld.html new file mode 100644 index 0000000..d3dff2e --- /dev/null +++ b/js/codemirror/mode/javascript/json-ld.html @@ -0,0 +1,72 @@ + + +CodeMirror: JSON-LD mode + + + + + + + + + + + + +
+

JSON-LD mode

+ + +
+ + + +

This is a specialization of the JavaScript mode.

+
diff --git a/js/codemirror/mode/javascript/test.js b/js/codemirror/mode/javascript/test.js new file mode 100644 index 0000000..a1bcf1f --- /dev/null +++ b/js/codemirror/mode/javascript/test.js @@ -0,0 +1,521 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "javascript"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("locals", + "[keyword function] [def foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }"); + + MT("comma-and-binop", + "[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }"); + + MT("destructuring", + "([keyword function]([def a], [[[def b], [def c] ]]) {", + " [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);", + " [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];", + "})();"); + + MT("destructure_trailing_comma", + "[keyword let] {[def a], [def b],} [operator =] [variable foo];", + "[keyword let] [def c];"); // Parser still in good state? + + MT("class_body", + "[keyword class] [def Foo] {", + " [property constructor]() {}", + " [property sayName]() {", + " [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];", + " }", + "}"); + + MT("class", + "[keyword class] [def Point] [keyword extends] [variable SuperThing] {", + " [keyword get] [property prop]() { [keyword return] [number 24]; }", + " [property constructor]([def x], [def y]) {", + " [keyword super]([string 'something']);", + " [keyword this].[property x] [operator =] [variable-2 x];", + " }", + "}"); + + MT("anonymous_class_expression", + "[keyword const] [def Adder] [operator =] [keyword class] [keyword extends] [variable Arithmetic] {", + " [property add]([def a], [def b]) {}", + "};"); + + MT("named_class_expression", + "[keyword const] [def Subber] [operator =] [keyword class] [def Subtract] {", + " [property sub]([def a], [def b]) {}", + "};"); + + MT("class_async_method", + "[keyword class] [def Foo] {", + " [property sayName1]() {}", + " [keyword async] [property sayName2]() {}", + "}"); + + MT("import", + "[keyword function] [def foo]() {", + " [keyword import] [def $] [keyword from] [string 'jquery'];", + " [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];", + "}"); + + MT("import_trailing_comma", + "[keyword import] {[def foo], [def bar],} [keyword from] [string 'baz']") + + MT("import_dynamic", + "[keyword import]([string 'baz']).[property then]") + + MT("import_dynamic", + "[keyword const] [def t] [operator =] [keyword import]([string 'baz']).[property then]") + + MT("const", + "[keyword function] [def f]() {", + " [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];", + "}"); + + MT("for/of", + "[keyword for]([keyword let] [def of] [keyword of] [variable something]) {}"); + + MT("for await", + "[keyword for] [keyword await]([keyword let] [def of] [keyword of] [variable something]) {}"); + + MT("generator", + "[keyword function*] [def repeat]([def n]) {", + " [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])", + " [keyword yield] [variable-2 i];", + "}"); + + MT("let_scoping", + "[keyword function] [def scoped]([def n]) {", + " { [keyword var] [def i]; } [variable-2 i];", + " { [keyword let] [def j]; [variable-2 j]; } [variable j];", + " [keyword if] ([atom true]) { [keyword const] [def k]; [variable-2 k]; } [variable k];", + "}"); + + MT("switch_scoping", + "[keyword switch] ([variable x]) {", + " [keyword default]:", + " [keyword let] [def j];", + " [keyword return] [variable-2 j]", + "}", + "[variable j];") + + MT("leaving_scope", + "[keyword function] [def a]() {", + " {", + " [keyword const] [def x] [operator =] [number 1]", + " [keyword if] ([atom true]) {", + " [keyword let] [def y] [operator =] [number 2]", + " [keyword var] [def z] [operator =] [number 3]", + " [variable console].[property log]([variable-2 x], [variable-2 y], [variable-2 z])", + " }", + " [variable console].[property log]([variable-2 x], [variable y], [variable-2 z])", + " }", + " [variable console].[property log]([variable x], [variable y], [variable-2 z])", + "}") + + MT("quotedStringAddition", + "[keyword let] [def f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];"); + + MT("quotedFatArrow", + "[keyword let] [def f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];"); + + MT("fatArrow", + "[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);", + "[variable a];", // No longer in scope + "[keyword let] [def f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];", + "[variable c];"); + + MT("fatArrow_stringDefault", + "([def a], [def b] [operator =] [string 'x\\'y']) [operator =>] [variable-2 a] [operator +] [variable-2 b]") + + MT("spread", + "[keyword function] [def f]([def a], [meta ...][def b]) {", + " [variable something]([variable-2 a], [meta ...][variable-2 b]);", + "}"); + + MT("quasi", + "[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]"); + + MT("quasi_no_function", + "[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]"); + + MT("indent_statement", + "[keyword var] [def x] [operator =] [number 10]", + "[variable x] [operator +=] [variable y] [operator +]", + " [atom Infinity]", + "[keyword debugger];"); + + MT("indent_if", + "[keyword if] ([number 1])", + " [keyword break];", + "[keyword else] [keyword if] ([number 2])", + " [keyword continue];", + "[keyword else]", + " [number 10];", + "[keyword if] ([number 1]) {", + " [keyword break];", + "} [keyword else] [keyword if] ([number 2]) {", + " [keyword continue];", + "} [keyword else] {", + " [number 10];", + "}"); + + MT("indent_for", + "[keyword for] ([keyword var] [def i] [operator =] [number 0];", + " [variable-2 i] [operator <] [number 100];", + " [variable-2 i][operator ++])", + " [variable doSomething]([variable-2 i]);", + "[keyword debugger];"); + + MT("indent_c_style", + "[keyword function] [def foo]()", + "{", + " [keyword debugger];", + "}"); + + MT("indent_else", + "[keyword for] (;;)", + " [keyword if] ([variable foo])", + " [keyword if] ([variable bar])", + " [number 1];", + " [keyword else]", + " [number 2];", + " [keyword else]", + " [number 3];"); + + MT("indent_funarg", + "[variable foo]([number 10000],", + " [keyword function]([def a]) {", + " [keyword debugger];", + "};"); + + MT("indent_below_if", + "[keyword for] (;;)", + " [keyword if] ([variable foo])", + " [number 1];", + "[number 2];"); + + MT("indent_semicolonless_if", + "[keyword function] [def foo]() {", + " [keyword if] ([variable x])", + " [variable foo]()", + "}") + + MT("indent_semicolonless_if_with_statement", + "[keyword function] [def foo]() {", + " [keyword if] ([variable x])", + " [variable foo]()", + " [variable bar]()", + "}") + + MT("multilinestring", + "[keyword var] [def x] [operator =] [string 'foo\\]", + "[string bar'];"); + + MT("scary_regexp", + "[string-2 /foo[[/]]bar/];"); + + MT("indent_strange_array", + "[keyword var] [def x] [operator =] [[", + " [number 1],,", + " [number 2],", + "]];", + "[number 10];"); + + MT("param_default", + "[keyword function] [def foo]([def x] [operator =] [string-2 `foo${][number 10][string-2 }bar`]) {", + " [keyword return] [variable-2 x];", + "}"); + + MT( + "param_destructuring", + "[keyword function] [def foo]([def x] [operator =] [string-2 `foo${][number 10][string-2 }bar`]) {", + " [keyword return] [variable-2 x];", + "}"); + + MT("new_target", + "[keyword function] [def F]([def target]) {", + " [keyword if] ([variable-2 target] [operator &&] [keyword new].[keyword target].[property name]) {", + " [keyword return] [keyword new]", + " .[keyword target];", + " }", + "}"); + + MT("async", + "[keyword async] [keyword function] [def foo]([def args]) { [keyword return] [atom true]; }"); + + MT("async_assignment", + "[keyword const] [def foo] [operator =] [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; };"); + + MT("async_object", + "[keyword let] [def obj] [operator =] { [property async]: [atom false] };"); + + // async be highlighted as keyword and foo as def, but it requires potentially expensive look-ahead. See #4173 + MT("async_object_function", + "[keyword let] [def obj] [operator =] { [property async] [property foo]([def args]) { [keyword return] [atom true]; } };"); + + MT("async_object_properties", + "[keyword let] [def obj] [operator =] {", + " [property prop1]: [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; },", + " [property prop2]: [keyword async] [keyword function] ([def args]) { [keyword return] [atom true]; },", + " [property prop3]: [keyword async] [keyword function] [def prop3]([def args]) { [keyword return] [atom true]; },", + "};"); + + MT("async_arrow", + "[keyword const] [def foo] [operator =] [keyword async] ([def args]) [operator =>] { [keyword return] [atom true]; };"); + + MT("async_jquery", + "[variable $].[property ajax]({", + " [property url]: [variable url],", + " [property async]: [atom true],", + " [property method]: [string 'GET']", + "});"); + + MT("async_variable", + "[keyword const] [def async] [operator =] {[property a]: [number 1]};", + "[keyword const] [def foo] [operator =] [string-2 `bar ${][variable async].[property a][string-2 }`];") + + MT("bigint", "[number 1n] [operator +] [number 0x1afn] [operator +] [number 0o064n] [operator +] [number 0b100n];") + + MT("async_comment", + "[keyword async] [comment /**/] [keyword function] [def foo]([def args]) { [keyword return] [atom true]; }"); + + MT("indent_switch", + "[keyword switch] ([variable x]) {", + " [keyword default]:", + " [keyword return] [number 2]", + "}") + + MT("regexp_corner_case", + "[operator +]{} [operator /] [atom undefined];", + "[[[meta ...][string-2 /\\//] ]];", + "[keyword void] [string-2 /\\//];", + "[keyword do] [string-2 /\\//]; [keyword while] ([number 0]);", + "[keyword if] ([number 0]) {} [keyword else] [string-2 /\\//];", + "[string-2 `${][variable async][operator ++][string-2 }//`];", + "[string-2 `${]{} [operator /] [string-2 /\\//}`];") + + MT("return_eol", + "[keyword return]", + "{} [string-2 /5/]") + + MT("numeric separator", + "[number 123_456];", + "[number 0xdead_c0de];", + "[number 0o123_456];", + "[number 0b1101_1101];", + "[number .123_456e0_1];", + "[number 1E+123_456];", + "[number 12_34_56n];") + + MT("underscore property", + "[variable something].[property _property];", + "[variable something].[property _123];", + "[variable something].[property _for];", + "[variable _for];", + "[variable _123];") + + MT("private properties", + "[keyword class] [def C] {", + " [property #x] [operator =] [number 2];", + " [property #read]() {", + " [keyword return] [keyword this].[property #x]", + " }", + "}") + + var ts_mode = CodeMirror.getMode({indentUnit: 2}, "application/typescript") + function TS(name) { + test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1)) + } + + TS("typescript_extend_type", + "[keyword class] [def Foo] [keyword extends] [type Some][operator <][type Type][operator >] {}") + + TS("typescript_arrow_type", + "[keyword let] [def x]: ([variable arg]: [type Type]) [operator =>] [type ReturnType]") + + TS("typescript_class", + "[keyword class] [def Foo] {", + " [keyword public] [keyword static] [property main]() {}", + " [keyword private] [property _foo]: [type string];", + "}") + + TS("typescript_literal_types", + "[keyword import] [keyword *] [keyword as] [def Sequelize] [keyword from] [string 'sequelize'];", + "[keyword interface] [def MyAttributes] {", + " [property truthy]: [string 'true'] [operator |] [number 1] [operator |] [atom true];", + " [property falsy]: [string 'false'] [operator |] [number 0] [operator |] [atom false];", + "}", + "[keyword interface] [def MyInstance] [keyword extends] [type Sequelize].[type Instance] [operator <] [type MyAttributes] [operator >] {", + " [property rawAttributes]: [type MyAttributes];", + " [property truthy]: [string 'true'] [operator |] [number 1] [operator |] [atom true];", + " [property falsy]: [string 'false'] [operator |] [number 0] [operator |] [atom false];", + "}") + + TS("typescript_extend_operators", + "[keyword export] [keyword interface] [def UserModel] [keyword extends]", + " [type Sequelize].[type Model] [operator <] [type UserInstance], [type UserAttributes] [operator >] {", + " [property findById]: (", + " [variable userId]: [type number]", + " ) [operator =>] [type Promise] [operator <] [type Array] [operator <] { [property id], [property name] } [operator >>];", + " [property updateById]: (", + " [variable userId]: [type number],", + " [variable isActive]: [type boolean]", + " ) [operator =>] [type Promise] [operator <] [type AccountHolderNotificationPreferenceInstance] [operator >];", + " }") + + TS("typescript_interface_with_const", + "[keyword const] [def hello]: {", + " [property prop1][operator ?]: [type string];", + " [property prop2][operator ?]: [type string];", + "} [operator =] {};") + + TS("typescript_double_extend", + "[keyword export] [keyword interface] [def UserAttributes] {", + " [property id][operator ?]: [type number];", + " [property createdAt][operator ?]: [type Date];", + "}", + "[keyword export] [keyword interface] [def UserInstance] [keyword extends] [type Sequelize].[type Instance][operator <][type UserAttributes][operator >], [type UserAttributes] {", + " [property id]: [type number];", + " [property createdAt]: [type Date];", + "}"); + + TS("typescript_index_signature", + "[keyword interface] [def A] {", + " [[ [variable prop]: [type string] ]]: [type any];", + " [property prop1]: [type any];", + "}"); + + TS("typescript_generic_class", + "[keyword class] [def Foo][operator <][type T][operator >] {", + " [property bar]() {}", + " [property foo](): [type Foo] {}", + "}") + + TS("typescript_type_when_keyword", + "[keyword export] [keyword type] [type AB] [operator =] [type A] [operator |] [type B];", + "[keyword type] [type Flags] [operator =] {", + " [property p1]: [type string];", + " [property p2]: [type boolean];", + "};") + + TS("typescript_type_when_not_keyword", + "[keyword class] [def HasType] {", + " [property type]: [type string];", + " [property constructor]([def type]: [type string]) {", + " [keyword this].[property type] [operator =] [variable-2 type];", + " }", + " [property setType]({ [def type] }: { [property type]: [type string]; }) {", + " [keyword this].[property type] [operator =] [variable-2 type];", + " }", + "}") + + TS("typescript_function_generics", + "[keyword function] [def a]() {}", + "[keyword function] [def b][operator <][type IA] [keyword extends] [type object], [type IB] [keyword extends] [type object][operator >]() {}", + "[keyword function] [def c]() {}") + + TS("typescript_complex_return_type", + "[keyword function] [def A]() {", + " [keyword return] [keyword this].[property property];", + "}", + "[keyword function] [def B](): [type Promise][operator <]{ [[ [variable key]: [type string] ]]: [type any] } [operator |] [atom null][operator >] {", + " [keyword return] [keyword this].[property property];", + "}") + + TS("typescript_complex_type_casting", + "[keyword const] [def giftpay] [operator =] [variable config].[property get]([string 'giftpay']) [keyword as] { [[ [variable platformUuid]: [type string] ]]: { [property version]: [type number]; [property apiCode]: [type string]; } };") + + TS("typescript_keyof", + "[keyword function] [def x][operator <][type T] [keyword extends] [keyword keyof] [type X][operator >]([def a]: [type T]) {", + " [keyword return]") + + TS("typescript_new_typeargs", + "[keyword let] [def x] [operator =] [keyword new] [variable Map][operator <][type string], [type Date][operator >]([string-2 `foo${][variable bar][string-2 }`])") + + TS("modifiers", + "[keyword class] [def Foo] {", + " [keyword public] [keyword abstract] [property bar]() {}", + " [property constructor]([keyword readonly] [keyword private] [def x]) {}", + "}") + + TS("arrow prop", + "({[property a]: [def p] [operator =>] [variable-2 p]})") + + TS("generic in function call", + "[keyword this].[property a][operator <][type Type][operator >]([variable foo]);", + "[keyword this].[property a][operator <][variable Type][operator >][variable foo];") + + TS("type guard", + "[keyword class] [def Appler] {", + " [keyword static] [property assertApple]([def fruit]: [type Fruit]): [variable-2 fruit] [keyword is] [type Apple] {", + " [keyword if] ([operator !]([variable-2 fruit] [keyword instanceof] [variable Apple]))", + " [keyword throw] [keyword new] [variable Error]();", + " }", + "}") + + TS("type as variable", + "[variable type] [operator =] [variable x] [keyword as] [type Bar];"); + + TS("enum body", + "[keyword export] [keyword const] [keyword enum] [def CodeInspectionResultType] {", + " [def ERROR] [operator =] [string 'problem_type_error'],", + " [def WARNING] [operator =] [string 'problem_type_warning'],", + " [def META],", + "}") + + TS("parenthesized type", + "[keyword class] [def Foo] {", + " [property x] [operator =] [keyword new] [variable A][operator <][type B], [type string][operator |](() [operator =>] [type void])[operator >]();", + " [keyword private] [property bar]();", + "}") + + TS("abstract class", + "[keyword export] [keyword abstract] [keyword class] [def Foo] {}") + + TS("interface without semicolons", + "[keyword interface] [def Foo] {", + " [property greet]([def x]: [type int]): [type blah]", + " [property bar]: [type void]", + "}") + + var jsonld_mode = CodeMirror.getMode( + {indentUnit: 2}, + {name: "javascript", jsonld: true} + ); + function LD(name) { + test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1)); + } + + LD("json_ld_keywords", + '{', + ' [meta "@context"]: {', + ' [meta "@base"]: [string "http://example.com"],', + ' [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],', + ' [property "likesFlavor"]: {', + ' [meta "@container"]: [meta "@list"]', + ' [meta "@reverse"]: [string "@beFavoriteOf"]', + ' },', + ' [property "nick"]: { [meta "@container"]: [meta "@set"] },', + ' [property "nick"]: { [meta "@container"]: [meta "@index"] }', + ' },', + ' [meta "@graph"]: [[ {', + ' [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],', + ' [property "name"]: [string "John Lennon"],', + ' [property "modified"]: {', + ' [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],', + ' [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]', + ' }', + ' } ]]', + '}'); + + LD("json_ld_fake", + '{', + ' [property "@fake"]: [string "@fake"],', + ' [property "@contextual"]: [string "@identifier"],', + ' [property "user@domain.com"]: [string "@graphical"],', + ' [property "@ID"]: [string "@@ID"]', + '}'); +})(); diff --git a/js/codemirror/mode/javascript/typescript.html b/js/codemirror/mode/javascript/typescript.html new file mode 100644 index 0000000..d0bc3ae --- /dev/null +++ b/js/codemirror/mode/javascript/typescript.html @@ -0,0 +1,62 @@ + + +CodeMirror: TypeScript mode + + + + + + + + + + +
+

TypeScript mode

+ + +
+ + + +

This is a specialization of the JavaScript mode.

+
diff --git a/js/codemirror/mode/jinja2/index.html b/js/codemirror/mode/jinja2/index.html new file mode 100644 index 0000000..9b93dab --- /dev/null +++ b/js/codemirror/mode/jinja2/index.html @@ -0,0 +1,64 @@ + + +CodeMirror: Jinja2 mode + + + + + + + + + +
+

Jinja2 mode

+
+ +
diff --git a/js/codemirror/mode/jinja2/jinja2.js b/js/codemirror/mode/jinja2/jinja2.js new file mode 100644 index 0000000..ec6f990 --- /dev/null +++ b/js/codemirror/mode/jinja2/jinja2.js @@ -0,0 +1,193 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("jinja2", function() { + var keywords = ["and", "as", "block", "endblock", "by", "cycle", "debug", "else", "elif", + "extends", "filter", "endfilter", "firstof", "do", "for", + "endfor", "if", "endif", "ifchanged", "endifchanged", + "ifequal", "endifequal", "ifnotequal", "set", "raw", "endraw", + "endifnotequal", "in", "include", "load", "not", "now", "or", + "parsed", "regroup", "reversed", "spaceless", "call", "endcall", "macro", + "endmacro", "endspaceless", "ssi", "templatetag", "openblock", + "closeblock", "openvariable", "closevariable", "without", "context", + "openbrace", "closebrace", "opencomment", + "closecomment", "widthratio", "url", "with", "endwith", + "get_current_language", "trans", "endtrans", "noop", "blocktrans", + "endblocktrans", "get_available_languages", + "get_current_language_bidi", "pluralize", "autoescape", "endautoescape"], + operator = /^[+\-*&%=<>!?|~^]/, + sign = /^[:\[\(\{]/, + atom = ["true", "false"], + number = /^(\d[+\-\*\/])?\d+(\.\d+)?/; + + keywords = new RegExp("((" + keywords.join(")|(") + "))\\b"); + atom = new RegExp("((" + atom.join(")|(") + "))\\b"); + + function tokenBase (stream, state) { + var ch = stream.peek(); + + //Comment + if (state.incomment) { + if(!stream.skipTo("#}")) { + stream.skipToEnd(); + } else { + stream.eatWhile(/\#|}/); + state.incomment = false; + } + return "comment"; + //Tag + } else if (state.intag) { + //After operator + if(state.operator) { + state.operator = false; + if(stream.match(atom)) { + return "atom"; + } + if(stream.match(number)) { + return "number"; + } + } + //After sign + if(state.sign) { + state.sign = false; + if(stream.match(atom)) { + return "atom"; + } + if(stream.match(number)) { + return "number"; + } + } + + if(state.instring) { + if(ch == state.instring) { + state.instring = false; + } + stream.next(); + return "string"; + } else if(ch == "'" || ch == '"') { + state.instring = ch; + stream.next(); + return "string"; + } + else if (state.inbraces > 0 && ch ==")") { + stream.next() + state.inbraces--; + } + else if (ch == "(") { + stream.next() + state.inbraces++; + } + else if (state.inbrackets > 0 && ch =="]") { + stream.next() + state.inbrackets--; + } + else if (ch == "[") { + stream.next() + state.inbrackets++; + } + else if (!state.lineTag && (stream.match(state.intag + "}") || stream.eat("-") && stream.match(state.intag + "}"))) { + state.intag = false; + return "tag"; + } else if(stream.match(operator)) { + state.operator = true; + return "operator"; + } else if(stream.match(sign)) { + state.sign = true; + } else { + if (stream.column() == 1 && state.lineTag && stream.match(keywords)) { + //allow nospace after tag before the keyword + return "keyword"; + } + if(stream.eat(" ") || stream.sol()) { + if(stream.match(keywords)) { + return "keyword"; + } + if(stream.match(atom)) { + return "atom"; + } + if(stream.match(number)) { + return "number"; + } + if(stream.sol()) { + stream.next(); + } + } else { + stream.next(); + } + + } + return "variable"; + } else if (stream.eat("{")) { + if (stream.eat("#")) { + state.incomment = true; + if(!stream.skipTo("#}")) { + stream.skipToEnd(); + } else { + stream.eatWhile(/\#|}/); + state.incomment = false; + } + return "comment"; + //Open tag + } else if (ch = stream.eat(/\{|%/)) { + //Cache close tag + state.intag = ch; + state.inbraces = 0; + state.inbrackets = 0; + if(ch == "{") { + state.intag = "}"; + } + stream.eat("-"); + return "tag"; + } + //Line statements + } else if (stream.eat('#')) { + if (stream.peek() == '#') { + stream.skipToEnd(); + return "comment" + } + else if (!stream.eol()) { + state.intag = true; + state.lineTag = true; + state.inbraces = 0; + state.inbrackets = 0; + return "tag"; + } + } + stream.next(); + }; + + return { + startState: function () { + return { + tokenize: tokenBase, + inbrackets:0, + inbraces:0 + }; + }, + token: function(stream, state) { + var style = state.tokenize(stream, state); + if (stream.eol() && state.lineTag && !state.instring && state.inbraces == 0 && state.inbrackets == 0) { + //Close line statement at the EOL + state.intag = false + state.lineTag = false + } + return style; + }, + blockCommentStart: "{#", + blockCommentEnd: "#}", + lineComment: "##", + }; + }); + + CodeMirror.defineMIME("text/jinja2", "jinja2"); +}); diff --git a/js/codemirror/mode/jsx/index.html b/js/codemirror/mode/jsx/index.html new file mode 100644 index 0000000..0f2822e --- /dev/null +++ b/js/codemirror/mode/jsx/index.html @@ -0,0 +1,89 @@ + + +CodeMirror: JSX mode + + + + + + + + + + + +
+

JSX mode

+ +
+ + + +

JSX Mode for React's +JavaScript syntax extension.

+ +

MIME types defined: text/jsx, text/typescript-jsx.

+ +
diff --git a/js/codemirror/mode/jsx/jsx.js b/js/codemirror/mode/jsx/jsx.js new file mode 100644 index 0000000..35ac608 --- /dev/null +++ b/js/codemirror/mode/jsx/jsx.js @@ -0,0 +1,149 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../xml/xml"), require("../javascript/javascript")) + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../xml/xml", "../javascript/javascript"], mod) + else // Plain browser env + mod(CodeMirror) +})(function(CodeMirror) { + "use strict" + + // Depth means the amount of open braces in JS context, in XML + // context 0 means not in tag, 1 means in tag, and 2 means in tag + // and js block comment. + function Context(state, mode, depth, prev) { + this.state = state; this.mode = mode; this.depth = depth; this.prev = prev + } + + function copyContext(context) { + return new Context(CodeMirror.copyState(context.mode, context.state), + context.mode, + context.depth, + context.prev && copyContext(context.prev)) + } + + CodeMirror.defineMode("jsx", function(config, modeConfig) { + var xmlMode = CodeMirror.getMode(config, {name: "xml", allowMissing: true, multilineTagIndentPastTag: false, allowMissingTagName: true}) + var jsMode = CodeMirror.getMode(config, modeConfig && modeConfig.base || "javascript") + + function flatXMLIndent(state) { + var tagName = state.tagName + state.tagName = null + var result = xmlMode.indent(state, "", "") + state.tagName = tagName + return result + } + + function token(stream, state) { + if (state.context.mode == xmlMode) + return xmlToken(stream, state, state.context) + else + return jsToken(stream, state, state.context) + } + + function xmlToken(stream, state, cx) { + if (cx.depth == 2) { // Inside a JS /* */ comment + if (stream.match(/^.*?\*\//)) cx.depth = 1 + else stream.skipToEnd() + return "comment" + } + + if (stream.peek() == "{") { + xmlMode.skipAttribute(cx.state) + + var indent = flatXMLIndent(cx.state), xmlContext = cx.state.context + // If JS starts on same line as tag + if (xmlContext && stream.match(/^[^>]*>\s*$/, false)) { + while (xmlContext.prev && !xmlContext.startOfLine) + xmlContext = xmlContext.prev + // If tag starts the line, use XML indentation level + if (xmlContext.startOfLine) indent -= config.indentUnit + // Else use JS indentation level + else if (cx.prev.state.lexical) indent = cx.prev.state.lexical.indented + // Else if inside of tag + } else if (cx.depth == 1) { + indent += config.indentUnit + } + + state.context = new Context(CodeMirror.startState(jsMode, indent), + jsMode, 0, state.context) + return null + } + + if (cx.depth == 1) { // Inside of tag + if (stream.peek() == "<") { // Tag inside of tag + xmlMode.skipAttribute(cx.state) + state.context = new Context(CodeMirror.startState(xmlMode, flatXMLIndent(cx.state)), + xmlMode, 0, state.context) + return null + } else if (stream.match("//")) { + stream.skipToEnd() + return "comment" + } else if (stream.match("/*")) { + cx.depth = 2 + return token(stream, state) + } + } + + var style = xmlMode.token(stream, cx.state), cur = stream.current(), stop + if (/\btag\b/.test(style)) { + if (/>$/.test(cur)) { + if (cx.state.context) cx.depth = 0 + else state.context = state.context.prev + } else if (/^ -1) { + stream.backUp(cur.length - stop) + } + return style + } + + function jsToken(stream, state, cx) { + if (stream.peek() == "<" && !stream.match(/^<([^<>]|<[^>]*>)+,\s*>/, false) && + jsMode.expressionAllowed(stream, cx.state)) { + state.context = new Context(CodeMirror.startState(xmlMode, jsMode.indent(cx.state, "", "")), + xmlMode, 0, state.context) + jsMode.skipExpression(cx.state) + return null + } + + var style = jsMode.token(stream, cx.state) + if (!style && cx.depth != null) { + var cur = stream.current() + if (cur == "{") { + cx.depth++ + } else if (cur == "}") { + if (--cx.depth == 0) state.context = state.context.prev + } + } + return style + } + + return { + startState: function() { + return {context: new Context(CodeMirror.startState(jsMode), jsMode)} + }, + + copyState: function(state) { + return {context: copyContext(state.context)} + }, + + token: token, + + indent: function(state, textAfter, fullLine) { + return state.context.mode.indent(state.context.state, textAfter, fullLine) + }, + + innerMode: function(state) { + return state.context + } + } + }, "xml", "javascript") + + CodeMirror.defineMIME("text/jsx", "jsx") + CodeMirror.defineMIME("text/typescript-jsx", {name: "jsx", base: {name: "javascript", typescript: true}}) +}); diff --git a/js/codemirror/mode/jsx/test.js b/js/codemirror/mode/jsx/test.js new file mode 100644 index 0000000..6065573 --- /dev/null +++ b/js/codemirror/mode/jsx/test.js @@ -0,0 +1,100 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "jsx") + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)) } + + MT("selfclose", + "[keyword var] [def x] [operator =] [bracket&tag <] [tag foo] [bracket&tag />] [operator +] [number 1];") + + MT("openclose", + "([bracket&tag <][tag foo][bracket&tag >]hello [atom &][bracket&tag ][operator ++])") + + MT("openclosefragment", + "([bracket&tag <><][tag foo][bracket&tag >]hello [atom &][bracket&tag ][operator ++])") + + MT("attr", + "([bracket&tag <][tag foo] [attribute abc]=[string 'value'][bracket&tag >]hello [atom &][bracket&tag ][operator ++])") + + MT("braced_attr", + "([bracket&tag <][tag foo] [attribute abc]={[number 10]}[bracket&tag >]hello [atom &][bracket&tag ][operator ++])") + + MT("braced_text", + "([bracket&tag <][tag foo][bracket&tag >]hello {[number 10]} [atom &][bracket&tag ][operator ++])") + + MT("nested_tag", + "([bracket&tag <][tag foo][bracket&tag ><][tag bar][bracket&tag >][operator ++])") + + MT("nested_jsx", + "[keyword return] (", + " [bracket&tag <][tag foo][bracket&tag >]", + " say {[number 1] [operator +] [bracket&tag <][tag bar] [attribute attr]={[number 10]}[bracket&tag />]}!", + " [bracket&tag ][operator ++]", + ")") + + MT("preserve_js_context", + "[variable x] [operator =] [string-2 `quasi${][bracket&tag <][tag foo][bracket&tag />][string-2 }quoted`]") + + MT("string_interpolation", + "[variable x] [operator =] [string-2 `quasi${] [number 10] [string-2 }`]") + + MT("line_comment", + "([bracket&tag <][tag foo] [comment // hello]", + " [bracket&tag >][operator ++])") + + MT("line_comment_not_in_tag", + "([bracket&tag <][tag foo][bracket&tag >] // hello", + " [bracket&tag ][operator ++])") + + MT("block_comment", + "([bracket&tag <][tag foo] [comment /* hello]", + "[comment line 2]", + "[comment line 3 */] [bracket&tag >][operator ++])") + + MT("block_comment_not_in_tag", + "([bracket&tag <][tag foo][bracket&tag >]/* hello", + " line 2", + " line 3 */ [bracket&tag ][operator ++])") + + MT("missing_attr", + "([bracket&tag <][tag foo] [attribute selected][bracket&tag />][operator ++])") + + MT("indent_js", + "([bracket&tag <][tag foo][bracket&tag >]", + " [bracket&tag <][tag bar] [attribute baz]={[keyword function]() {", + " [keyword return] [number 10]", + " }}[bracket&tag />]", + " [bracket&tag ])") + + MT("spread", + "([bracket&tag <][tag foo] [attribute bar]={[meta ...][variable baz] [operator /][number 2]}[bracket&tag />])") + + MT("tag_attribute", + "([bracket&tag <][tag foo] [attribute bar]=[bracket&tag <][tag foo][bracket&tag />/>][operator ++])") + + MT("in_array", + "[[", + " [bracket&tag <][tag Something][bracket&tag />],", + " [string-2 `${][variable x][string-2 }`],", + " [variable y]", + "]]") + + var ts_mode = CodeMirror.getMode({indentUnit: 2}, "text/typescript-jsx") + function TS(name) { test.mode(name, ts_mode, Array.prototype.slice.call(arguments, 1)) } + + TS("tsx_react_integration", + "[keyword interface] [def Props] {", + " [property foo]: [type string];", + "}", + "[keyword class] [def MyComponent] [keyword extends] [type React].[type Component] [operator <] [type Props], [type any] [operator >] {", + " [property render]() {", + " [keyword return] [bracket&tag <][tag span][bracket&tag >]{[keyword this].[property props].[property foo]}[bracket&tag ]", + " }", + "}", + "[bracket&tag <][tag MyComponent] [attribute foo]=[string \"bar\"] [bracket&tag />]; [comment //ok]", + "[bracket&tag <][tag MyComponent] [attribute foo]={[number 0]} [bracket&tag />]; [comment //error]") + + TS("tsx_react_generics", + "[variable x] [operator =] [operator <] [variable T],[operator >] ([def v]: [type T]) [operator =>] [variable-2 v];") +})() diff --git a/js/codemirror/mode/julia/index.html b/js/codemirror/mode/julia/index.html new file mode 100644 index 0000000..73824f2 --- /dev/null +++ b/js/codemirror/mode/julia/index.html @@ -0,0 +1,196 @@ + + +CodeMirror: Julia mode + + + + + + + + + + +
+

Julia mode

+ +
+ + +

MIME types defined: text/x-julia.

+
diff --git a/js/codemirror/mode/julia/julia.js b/js/codemirror/mode/julia/julia.js new file mode 100644 index 0000000..0b42284 --- /dev/null +++ b/js/codemirror/mode/julia/julia.js @@ -0,0 +1,390 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("julia", function(config, parserConf) { + function wordRegexp(words, end, pre) { + if (typeof pre === "undefined") { pre = ""; } + if (typeof end === "undefined") { end = "\\b"; } + return new RegExp("^" + pre + "((" + words.join(")|(") + "))" + end); + } + + var octChar = "\\\\[0-7]{1,3}"; + var hexChar = "\\\\x[A-Fa-f0-9]{1,2}"; + var sChar = "\\\\[abefnrtv0%?'\"\\\\]"; + var uChar = "([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])"; + + var asciiOperatorsList = [ + "[<>]:", "[<>=]=", "<<=?", ">>>?=?", "=>", "--?>", "<--[->]?", "\\/\\/", + "\\.{2,3}", "[\\.\\\\%*+\\-<>!\\/^|&]=?", "\\?", "\\$", "~", ":" + ]; + var operators = parserConf.operators || wordRegexp([ + "[<>]:", "[<>=]=", "[!=]==", "<<=?", ">>>?=?", "=>?", "--?>", "<--[->]?", "\\/\\/", + "[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?", "\\?", "\\$", "~", ":", + "\\u00D7", "\\u2208", "\\u2209", "\\u220B", "\\u220C", "\\u2218", + "\\u221A", "\\u221B", "\\u2229", "\\u222A", "\\u2260", "\\u2264", + "\\u2265", "\\u2286", "\\u2288", "\\u228A", "\\u22C5", + "\\b(in|isa)\\b(?!\.?\\()" + ], ""); + var delimiters = parserConf.delimiters || /^[;,()[\]{}]/; + var identifiers = parserConf.identifiers || + /^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/; + + var chars = wordRegexp([octChar, hexChar, sChar, uChar], "'"); + + var openersList = ["begin", "function", "type", "struct", "immutable", "let", + "macro", "for", "while", "quote", "if", "else", "elseif", "try", + "finally", "catch", "do"]; + + var closersList = ["end", "else", "elseif", "catch", "finally"]; + + var keywordsList = ["if", "else", "elseif", "while", "for", "begin", "let", + "end", "do", "try", "catch", "finally", "return", "break", "continue", + "global", "local", "const", "export", "import", "importall", "using", + "function", "where", "macro", "module", "baremodule", "struct", "type", + "mutable", "immutable", "quote", "typealias", "abstract", "primitive", + "bitstype"]; + + var builtinsList = ["true", "false", "nothing", "NaN", "Inf"]; + + CodeMirror.registerHelper("hintWords", "julia", keywordsList.concat(builtinsList)); + + var openers = wordRegexp(openersList); + var closers = wordRegexp(closersList); + var keywords = wordRegexp(keywordsList); + var builtins = wordRegexp(builtinsList); + + var macro = /^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/; + var symbol = /^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/; + var stringPrefixes = /^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/; + + var macroOperators = wordRegexp(asciiOperatorsList, "", "@"); + var symbolOperators = wordRegexp(asciiOperatorsList, "", ":"); + + function inArray(state) { + return (state.nestedArrays > 0); + } + + function inGenerator(state) { + return (state.nestedGenerators > 0); + } + + function currentScope(state, n) { + if (typeof(n) === "undefined") { n = 0; } + if (state.scopes.length <= n) { + return null; + } + return state.scopes[state.scopes.length - (n + 1)]; + } + + // tokenizers + function tokenBase(stream, state) { + // Handle multiline comments + if (stream.match('#=', false)) { + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } + + // Handle scope changes + var leavingExpr = state.leavingExpr; + if (stream.sol()) { + leavingExpr = false; + } + state.leavingExpr = false; + + if (leavingExpr) { + if (stream.match(/^'+/)) { + return "operator"; + } + } + + if (stream.match(/\.{4,}/)) { + return "error"; + } else if (stream.match(/\.{1,3}/)) { + return "operator"; + } + + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle single line comments + if (ch === '#') { + stream.skipToEnd(); + return "comment"; + } + + if (ch === '[') { + state.scopes.push('['); + state.nestedArrays++; + } + + if (ch === '(') { + state.scopes.push('('); + state.nestedGenerators++; + } + + if (inArray(state) && ch === ']') { + while (state.scopes.length && currentScope(state) !== "[") { state.scopes.pop(); } + state.scopes.pop(); + state.nestedArrays--; + state.leavingExpr = true; + } + + if (inGenerator(state) && ch === ')') { + while (state.scopes.length && currentScope(state) !== "(") { state.scopes.pop(); } + state.scopes.pop(); + state.nestedGenerators--; + state.leavingExpr = true; + } + + if (inArray(state)) { + if (state.lastToken == "end" && stream.match(':')) { + return "operator"; + } + if (stream.match('end')) { + return "number"; + } + } + + var match; + if (match = stream.match(openers, false)) { + state.scopes.push(match[0]); + } + + if (stream.match(closers, false)) { + state.scopes.pop(); + } + + // Handle type annotations + if (stream.match(/^::(?![:\$])/)) { + state.tokenize = tokenAnnotation; + return state.tokenize(stream, state); + } + + // Handle symbols + if (!leavingExpr && (stream.match(symbol) || stream.match(symbolOperators))) { + return "builtin"; + } + + // Handle parametric types + //if (stream.match(/^{[^}]*}(?=\()/)) { + // return "builtin"; + //} + + // Handle operators and Delimiters + if (stream.match(operators)) { + return "operator"; + } + + // Handle Number Literals + if (stream.match(/^\.?\d/, false)) { + var imMatcher = RegExp(/^im\b/); + var numberLiteral = false; + if (stream.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)) { numberLiteral = true; } + // Integers + if (stream.match(/^0x[0-9a-f_]+/i)) { numberLiteral = true; } // Hex + if (stream.match(/^0b[01_]+/i)) { numberLiteral = true; } // Binary + if (stream.match(/^0o[0-7_]+/i)) { numberLiteral = true; } // Octal + // Floats + if (stream.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)) { numberLiteral = true; } + if (stream.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)) { numberLiteral = true; } // Decimal + if (numberLiteral) { + // Integer literals may be "long" + stream.match(imMatcher); + state.leavingExpr = true; + return "number"; + } + } + + // Handle Chars + if (stream.match('\'')) { + state.tokenize = tokenChar; + return state.tokenize(stream, state); + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + if (stream.match(macro) || stream.match(macroOperators)) { + return "meta"; + } + + if (stream.match(delimiters)) { + return null; + } + + if (stream.match(keywords)) { + return "keyword"; + } + + if (stream.match(builtins)) { + return "builtin"; + } + + var isDefinition = state.isDefinition || state.lastToken == "function" || + state.lastToken == "macro" || state.lastToken == "type" || + state.lastToken == "struct" || state.lastToken == "immutable"; + + if (stream.match(identifiers)) { + if (isDefinition) { + if (stream.peek() === '.') { + state.isDefinition = true; + return "variable"; + } + state.isDefinition = false; + return "def"; + } + state.leavingExpr = true; + return "variable"; + } + + // Handle non-detected items + stream.next(); + return "error"; + } + + function tokenAnnotation(stream, state) { + stream.match(/.*?(?=[,;{}()=\s]|$)/); + if (stream.match('{')) { + state.nestedParameters++; + } else if (stream.match('}') && state.nestedParameters > 0) { + state.nestedParameters--; + } + if (state.nestedParameters > 0) { + stream.match(/.*?(?={|})/) || stream.next(); + } else if (state.nestedParameters == 0) { + state.tokenize = tokenBase; + } + return "builtin"; + } + + function tokenComment(stream, state) { + if (stream.match('#=')) { + state.nestedComments++; + } + if (!stream.match(/.*?(?=(#=|=#))/)) { + stream.skipToEnd(); + } + if (stream.match('=#')) { + state.nestedComments--; + if (state.nestedComments == 0) + state.tokenize = tokenBase; + } + return "comment"; + } + + function tokenChar(stream, state) { + var isChar = false, match; + if (stream.match(chars)) { + isChar = true; + } else if (match = stream.match(/\\u([a-f0-9]{1,4})(?=')/i)) { + var value = parseInt(match[1], 16); + if (value <= 55295 || value >= 57344) { // (U+0,U+D7FF), (U+E000,U+FFFF) + isChar = true; + stream.next(); + } + } else if (match = stream.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)) { + var value = parseInt(match[1], 16); + if (value <= 1114111) { // U+10FFFF + isChar = true; + stream.next(); + } + } + if (isChar) { + state.leavingExpr = true; + state.tokenize = tokenBase; + return "string"; + } + if (!stream.match(/^[^']+(?=')/)) { stream.skipToEnd(); } + if (stream.match('\'')) { state.tokenize = tokenBase; } + return "error"; + } + + function tokenStringFactory(delimiter) { + if (delimiter.substr(-3) === '"""') { + delimiter = '"""'; + } else if (delimiter.substr(-1) === '"') { + delimiter = '"'; + } + function tokenString(stream, state) { + if (stream.eat('\\')) { + stream.next(); + } else if (stream.match(delimiter)) { + state.tokenize = tokenBase; + state.leavingExpr = true; + return "string"; + } else { + stream.eat(/[`"]/); + } + stream.eatWhile(/[^\\`"]/); + return "string"; + } + return tokenString; + } + + var external = { + startState: function() { + return { + tokenize: tokenBase, + scopes: [], + lastToken: null, + leavingExpr: false, + isDefinition: false, + nestedArrays: 0, + nestedComments: 0, + nestedGenerators: 0, + nestedParameters: 0, + firstParenPos: -1 + }; + }, + + token: function(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + if (current && style) { + state.lastToken = current; + } + + return style; + }, + + indent: function(state, textAfter) { + var delta = 0; + if ( textAfter === ']' || textAfter === ')' || /^end\b/.test(textAfter) || + /^else/.test(textAfter) || /^catch\b/.test(textAfter) || /^elseif\b/.test(textAfter) || + /^finally/.test(textAfter) ) { + delta = -1; + } + return (state.scopes.length + delta) * config.indentUnit; + }, + + electricInput: /\b(end|else|catch|finally)\b/, + blockCommentStart: "#=", + blockCommentEnd: "=#", + lineComment: "#", + closeBrackets: "()[]{}\"\"", + fold: "indent" + }; + return external; +}); + + +CodeMirror.defineMIME("text/x-julia", "julia"); + +}); diff --git a/js/codemirror/mode/livescript/index.html b/js/codemirror/mode/livescript/index.html new file mode 100644 index 0000000..b487fcd --- /dev/null +++ b/js/codemirror/mode/livescript/index.html @@ -0,0 +1,459 @@ + + +CodeMirror: LiveScript mode + + + + + + + + + + +
+

LiveScript mode

+
+ + +

MIME types defined: text/x-livescript.

+ +

The LiveScript mode was written by Kenneth Bentley.

+ +
diff --git a/js/codemirror/mode/livescript/livescript.js b/js/codemirror/mode/livescript/livescript.js new file mode 100644 index 0000000..149b223 --- /dev/null +++ b/js/codemirror/mode/livescript/livescript.js @@ -0,0 +1,280 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/** + * Link to the project's GitHub page: + * https://github.com/duralog/CodeMirror + */ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode('livescript', function(){ + var tokenBase = function(stream, state) { + var next_rule = state.next || "start"; + if (next_rule) { + state.next = state.next; + var nr = Rules[next_rule]; + if (nr.splice) { + for (var i$ = 0; i$ < nr.length; ++i$) { + var r = nr[i$]; + if (r.regex && stream.match(r.regex)) { + state.next = r.next || state.next; + return r.token; + } + } + stream.next(); + return 'error'; + } + if (stream.match(r = Rules[next_rule])) { + if (r.regex && stream.match(r.regex)) { + state.next = r.next; + return r.token; + } else { + stream.next(); + return 'error'; + } + } + } + stream.next(); + return 'error'; + }; + var external = { + startState: function(){ + return { + next: 'start', + lastToken: {style: null, indent: 0, content: ""} + }; + }, + token: function(stream, state){ + while (stream.pos == stream.start) + var style = tokenBase(stream, state); + state.lastToken = { + style: style, + indent: stream.indentation(), + content: stream.current() + }; + return style.replace(/\./g, ' '); + }, + indent: function(state){ + var indentation = state.lastToken.indent; + if (state.lastToken.content.match(indenter)) { + indentation += 2; + } + return indentation; + } + }; + return external; + }); + + var identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; + var indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); + var keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; + var stringfill = { + token: 'string', + regex: '.+' + }; + var Rules = { + start: [ + { + token: 'comment.doc', + regex: '/\\*', + next: 'comment' + }, { + token: 'comment', + regex: '#.*' + }, { + token: 'keyword', + regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend + }, { + token: 'constant.language', + regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend + }, { + token: 'invalid.illegal', + regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend + }, { + token: 'language.support.class', + regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend + }, { + token: 'language.support.function', + regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend + }, { + token: 'variable.language', + regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend + }, { + token: 'identifier', + regex: identifier + '\\s*:(?![:=])' + }, { + token: 'variable', + regex: identifier + }, { + token: 'keyword.operator', + regex: '(?:\\.{3}|\\s+\\?)' + }, { + token: 'keyword.variable', + regex: '(?:@+|::|\\.\\.)', + next: 'key' + }, { + token: 'keyword.operator', + regex: '\\.\\s*', + next: 'key' + }, { + token: 'string', + regex: '\\\\\\S[^\\s,;)}\\]]*' + }, { + token: 'string.doc', + regex: '\'\'\'', + next: 'qdoc' + }, { + token: 'string.doc', + regex: '"""', + next: 'qqdoc' + }, { + token: 'string', + regex: '\'', + next: 'qstring' + }, { + token: 'string', + regex: '"', + next: 'qqstring' + }, { + token: 'string', + regex: '`', + next: 'js' + }, { + token: 'string', + regex: '<\\[', + next: 'words' + }, { + token: 'string.regex', + regex: '//', + next: 'heregex' + }, { + token: 'string.regex', + regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}', + next: 'key' + }, { + token: 'constant.numeric', + regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)' + }, { + token: 'lparen', + regex: '[({[]' + }, { + token: 'rparen', + regex: '[)}\\]]', + next: 'key' + }, { + token: 'keyword.operator', + regex: '\\S+' + }, { + token: 'text', + regex: '\\s+' + } + ], + heregex: [ + { + token: 'string.regex', + regex: '.*?//[gimy$?]{0,4}', + next: 'start' + }, { + token: 'string.regex', + regex: '\\s*#{' + }, { + token: 'comment.regex', + regex: '\\s+(?:#.*)?' + }, { + token: 'string.regex', + regex: '\\S+' + } + ], + key: [ + { + token: 'keyword.operator', + regex: '[.?@!]+' + }, { + token: 'identifier', + regex: identifier, + next: 'start' + }, { + token: 'text', + regex: '', + next: 'start' + } + ], + comment: [ + { + token: 'comment.doc', + regex: '.*?\\*/', + next: 'start' + }, { + token: 'comment.doc', + regex: '.+' + } + ], + qdoc: [ + { + token: 'string', + regex: ".*?'''", + next: 'key' + }, stringfill + ], + qqdoc: [ + { + token: 'string', + regex: '.*?"""', + next: 'key' + }, stringfill + ], + qstring: [ + { + token: 'string', + regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'', + next: 'key' + }, stringfill + ], + qqstring: [ + { + token: 'string', + regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', + next: 'key' + }, stringfill + ], + js: [ + { + token: 'string', + regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`', + next: 'key' + }, stringfill + ], + words: [ + { + token: 'string', + regex: '.*?\\]>', + next: 'key' + }, stringfill + ] + }; + for (var idx in Rules) { + var r = Rules[idx]; + if (r.splice) { + for (var i = 0, len = r.length; i < len; ++i) { + var rr = r[i]; + if (typeof rr.regex === 'string') { + Rules[idx][i].regex = new RegExp('^' + rr.regex); + } + } + } else if (typeof rr.regex === 'string') { + Rules[idx].regex = new RegExp('^' + r.regex); + } + } + + CodeMirror.defineMIME('text/x-livescript', 'livescript'); + +}); diff --git a/js/codemirror/mode/lua/index.html b/js/codemirror/mode/lua/index.html new file mode 100644 index 0000000..55f38ee --- /dev/null +++ b/js/codemirror/mode/lua/index.html @@ -0,0 +1,85 @@ + + +CodeMirror: Lua mode + + + + + + + + + + + +
+

Lua mode

+
+ + +

Loosely based on Franciszek + Wawrzak's CodeMirror + 1 mode. One configuration parameter is + supported, specials, to which you can provide an + array of strings to have those identifiers highlighted with + the lua-special style.

+

MIME types defined: text/x-lua.

+ +
diff --git a/js/codemirror/mode/lua/lua.js b/js/codemirror/mode/lua/lua.js new file mode 100644 index 0000000..7d05352 --- /dev/null +++ b/js/codemirror/mode/lua/lua.js @@ -0,0 +1,160 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's +// CodeMirror 1 mode. +// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("lua", function(config, parserConfig) { + var indentUnit = config.indentUnit; + + function prefixRE(words) { + return new RegExp("^(?:" + words.join("|") + ")", "i"); + } + function wordRE(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var specials = wordRE(parserConfig.specials || []); + + // long list of standard functions from lua manual + var builtins = wordRE([ + "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load", + "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require", + "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall", + + "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield", + + "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable", + "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable", + "debug.setupvalue","debug.traceback", + + "close","flush","lines","read","seek","setvbuf","write", + + "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin", + "io.stdout","io.tmpfile","io.type","io.write", + + "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg", + "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max", + "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh", + "math.sqrt","math.tan","math.tanh", + + "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale", + "os.time","os.tmpname", + + "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload", + "package.seeall", + + "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub", + "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper", + + "table.concat","table.insert","table.maxn","table.remove","table.sort" + ]); + var keywords = wordRE(["and","break","elseif","false","nil","not","or","return", + "true","function", "end", "if", "then", "else", "do", + "while", "repeat", "until", "for", "in", "local" ]); + + var indentTokens = wordRE(["function", "if","repeat","do", "\\(", "{"]); + var dedentTokens = wordRE(["end", "until", "\\)", "}"]); + var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]); + + function readBracket(stream) { + var level = 0; + while (stream.eat("=")) ++level; + stream.eat("["); + return level; + } + + function normal(stream, state) { + var ch = stream.next(); + if (ch == "-" && stream.eat("-")) { + if (stream.eat("[") && stream.eat("[")) + return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state); + stream.skipToEnd(); + return "comment"; + } + if (ch == "\"" || ch == "'") + return (state.cur = string(ch))(stream, state); + if (ch == "[" && /[\[=]/.test(stream.peek())) + return (state.cur = bracketed(readBracket(stream), "string"))(stream, state); + if (/\d/.test(ch)) { + stream.eatWhile(/[\w.%]/); + return "number"; + } + if (/[\w_]/.test(ch)) { + stream.eatWhile(/[\w\\\-_.]/); + return "variable"; + } + return null; + } + + function bracketed(level, style) { + return function(stream, state) { + var curlev = null, ch; + while ((ch = stream.next()) != null) { + if (curlev == null) {if (ch == "]") curlev = 0;} + else if (ch == "=") ++curlev; + else if (ch == "]" && curlev == level) { state.cur = normal; break; } + else curlev = null; + } + return style; + }; + } + + function string(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.cur = normal; + return "string"; + }; + } + + return { + startState: function(basecol) { + return {basecol: basecol || 0, indentDepth: 0, cur: normal}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.cur(stream, state); + var word = stream.current(); + if (style == "variable") { + if (keywords.test(word)) style = "keyword"; + else if (builtins.test(word)) style = "builtin"; + else if (specials.test(word)) style = "variable-2"; + } + if ((style != "comment") && (style != "string")){ + if (indentTokens.test(word)) ++state.indentDepth; + else if (dedentTokens.test(word)) --state.indentDepth; + } + return style; + }, + + indent: function(state, textAfter) { + var closing = dedentPartial.test(textAfter); + return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0)); + }, + + electricInput: /^\s*(?:end|until|else|\)|\})$/, + lineComment: "--", + blockCommentStart: "--[[", + blockCommentEnd: "]]" + }; +}); + +CodeMirror.defineMIME("text/x-lua", "lua"); + +}); diff --git a/js/codemirror/mode/markdown/index.html b/js/codemirror/mode/markdown/index.html new file mode 100644 index 0000000..b307f74 --- /dev/null +++ b/js/codemirror/mode/markdown/index.html @@ -0,0 +1,418 @@ + + +CodeMirror: Markdown mode + + + + + + + + + + + + +
+

Markdown mode

+
+ + + +

If you also want support strikethrough, emoji and few other goodies, check out GitHub-Flavored Markdown mode.

+ +

Optionally depends on other modes for properly highlighted code blocks, + and XML mode for properly highlighted inline XML blocks.

+ +

Markdown mode supports these options:

+
    +
  • + +
    highlightFormatting: boolean
    +
    Whether to separately highlight markdown meta characters (*[]()etc.) (default: false).
    +
    +
  • +
  • + +
    maxBlockquoteDepth: boolean
    +
    Maximum allowed blockquote nesting (default: 0 - infinite nesting).
    +
    +
  • +
  • + +
    xml: boolean
    +
    Whether to highlight inline XML (default: true).
    +
    +
  • +
  • + +
    fencedCodeBlockHighlighting: boolean
    +
    Whether to syntax-highlight fenced code blocks, if given mode is included, or fencedCodeBlockDefaultMode is set (default: true).
    +
    +
  • +
  • + +
    fencedCodeBlockDefaultMode: string
    +
    Mode to use for fencedCodeBlockHighlighting, if given mode is not included.
    +
    +
  • +
  • + +
    tokenTypeOverrides: Object
    +
    When you want to override default token type names (e.g. {code: "code"}).
    +
    +
  • +
  • + +
    allowAtxHeaderWithoutSpace: boolean
    +
    Allow lazy headers without whitespace between hashtag and text (default: false).
    +
    +
  • +
+ +

MIME types defined: text/x-markdown.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/markdown/markdown.js b/js/codemirror/mode/markdown/markdown.js new file mode 100644 index 0000000..6eef544 --- /dev/null +++ b/js/codemirror/mode/markdown/markdown.js @@ -0,0 +1,886 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../xml/xml"), require("../meta")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../xml/xml", "../meta"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { + + var htmlMode = CodeMirror.getMode(cmCfg, "text/html"); + var htmlModeMissing = htmlMode.name == "null" + + function getMode(name) { + if (CodeMirror.findModeByName) { + var found = CodeMirror.findModeByName(name); + if (found) name = found.mime || found.mimes[0]; + } + var mode = CodeMirror.getMode(cmCfg, name); + return mode.name == "null" ? null : mode; + } + + // Should characters that affect highlighting be highlighted separate? + // Does not include characters that will be output (such as `1.` and `-` for lists) + if (modeCfg.highlightFormatting === undefined) + modeCfg.highlightFormatting = false; + + // Maximum number of nested blockquotes. Set to 0 for infinite nesting. + // Excess `>` will emit `error` token. + if (modeCfg.maxBlockquoteDepth === undefined) + modeCfg.maxBlockquoteDepth = 0; + + // Turn on task lists? ("- [ ] " and "- [x] ") + if (modeCfg.taskLists === undefined) modeCfg.taskLists = false; + + // Turn on strikethrough syntax + if (modeCfg.strikethrough === undefined) + modeCfg.strikethrough = false; + + if (modeCfg.emoji === undefined) + modeCfg.emoji = false; + + if (modeCfg.fencedCodeBlockHighlighting === undefined) + modeCfg.fencedCodeBlockHighlighting = true; + + if (modeCfg.fencedCodeBlockDefaultMode === undefined) + modeCfg.fencedCodeBlockDefaultMode = 'text/plain'; + + if (modeCfg.xml === undefined) + modeCfg.xml = true; + + // Allow token types to be overridden by user-provided token types. + if (modeCfg.tokenTypeOverrides === undefined) + modeCfg.tokenTypeOverrides = {}; + + var tokenTypes = { + header: "header", + code: "comment", + quote: "quote", + list1: "variable-2", + list2: "variable-3", + list3: "keyword", + hr: "hr", + image: "image", + imageAltText: "image-alt-text", + imageMarker: "image-marker", + formatting: "formatting", + linkInline: "link", + linkEmail: "link", + linkText: "link", + linkHref: "string", + em: "em", + strong: "strong", + strikethrough: "strikethrough", + emoji: "builtin" + }; + + for (var tokenType in tokenTypes) { + if (tokenTypes.hasOwnProperty(tokenType) && modeCfg.tokenTypeOverrides[tokenType]) { + tokenTypes[tokenType] = modeCfg.tokenTypeOverrides[tokenType]; + } + } + + var hrRE = /^([*\-_])(?:\s*\1){2,}\s*$/ + , listRE = /^(?:[*\-+]|^[0-9]+([.)]))\s+/ + , taskListRE = /^\[(x| )\](?=\s)/i // Must follow listRE + , atxHeaderRE = modeCfg.allowAtxHeaderWithoutSpace ? /^(#+)/ : /^(#+)(?: |$)/ + , setextHeaderRE = /^ {0,3}(?:\={1,}|-{2,})\s*$/ + , textRE = /^[^#!\[\]*_\\<>` "'(~:]+/ + , fencedCodeRE = /^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/ + , linkDefRE = /^\s*\[[^\]]+?\]:.*$/ // naive link-definition + , punctuation = /[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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\u0AF0\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-\u2E42\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]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/ + , expandedTab = " " // CommonMark specifies tab as 4 spaces + + function switchInline(stream, state, f) { + state.f = state.inline = f; + return f(stream, state); + } + + function switchBlock(stream, state, f) { + state.f = state.block = f; + return f(stream, state); + } + + function lineIsEmpty(line) { + return !line || !/\S/.test(line.string) + } + + // Blocks + + function blankLine(state) { + // Reset linkTitle state + state.linkTitle = false; + state.linkHref = false; + state.linkText = false; + // Reset EM state + state.em = false; + // Reset STRONG state + state.strong = false; + // Reset strikethrough state + state.strikethrough = false; + // Reset state.quote + state.quote = 0; + // Reset state.indentedCode + state.indentedCode = false; + if (state.f == htmlBlock) { + var exit = htmlModeMissing + if (!exit) { + var inner = CodeMirror.innerMode(htmlMode, state.htmlState) + exit = inner.mode.name == "xml" && inner.state.tagStart === null && + (!inner.state.context && inner.state.tokenize.isInText) + } + if (exit) { + state.f = inlineNormal; + state.block = blockNormal; + state.htmlState = null; + } + } + // Reset state.trailingSpace + state.trailingSpace = 0; + state.trailingSpaceNewLine = false; + // Mark this line as blank + state.prevLine = state.thisLine + state.thisLine = {stream: null} + return null; + } + + function blockNormal(stream, state) { + var firstTokenOnLine = stream.column() === state.indentation; + var prevLineLineIsEmpty = lineIsEmpty(state.prevLine.stream); + var prevLineIsIndentedCode = state.indentedCode; + var prevLineIsHr = state.prevLine.hr; + var prevLineIsList = state.list !== false; + var maxNonCodeIndentation = (state.listStack[state.listStack.length - 1] || 0) + 3; + + state.indentedCode = false; + + var lineIndentation = state.indentation; + // compute once per line (on first token) + if (state.indentationDiff === null) { + state.indentationDiff = state.indentation; + if (prevLineIsList) { + state.list = null; + // While this list item's marker's indentation is less than the deepest + // list item's content's indentation,pop the deepest list item + // indentation off the stack, and update block indentation state + while (lineIndentation < state.listStack[state.listStack.length - 1]) { + state.listStack.pop(); + if (state.listStack.length) { + state.indentation = state.listStack[state.listStack.length - 1]; + // less than the first list's indent -> the line is no longer a list + } else { + state.list = false; + } + } + if (state.list !== false) { + state.indentationDiff = lineIndentation - state.listStack[state.listStack.length - 1] + } + } + } + + // not comprehensive (currently only for setext detection purposes) + var allowsInlineContinuation = ( + !prevLineLineIsEmpty && !prevLineIsHr && !state.prevLine.header && + (!prevLineIsList || !prevLineIsIndentedCode) && + !state.prevLine.fencedCodeEnd + ); + + var isHr = (state.list === false || prevLineIsHr || prevLineLineIsEmpty) && + state.indentation <= maxNonCodeIndentation && stream.match(hrRE); + + var match = null; + if (state.indentationDiff >= 4 && (prevLineIsIndentedCode || state.prevLine.fencedCodeEnd || + state.prevLine.header || prevLineLineIsEmpty)) { + stream.skipToEnd(); + state.indentedCode = true; + return tokenTypes.code; + } else if (stream.eatSpace()) { + return null; + } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(atxHeaderRE)) && match[1].length <= 6) { + state.quote = 0; + state.header = match[1].length; + state.thisLine.header = true; + if (modeCfg.highlightFormatting) state.formatting = "header"; + state.f = state.inline; + return getType(state); + } else if (state.indentation <= maxNonCodeIndentation && stream.eat('>')) { + state.quote = firstTokenOnLine ? 1 : state.quote + 1; + if (modeCfg.highlightFormatting) state.formatting = "quote"; + stream.eatSpace(); + return getType(state); + } else if (!isHr && !state.setext && firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(listRE))) { + var listType = match[1] ? "ol" : "ul"; + + state.indentation = lineIndentation + stream.current().length; + state.list = true; + state.quote = 0; + + // Add this list item's content's indentation to the stack + state.listStack.push(state.indentation); + // Reset inline styles which shouldn't propagate across list items + state.em = false; + state.strong = false; + state.code = false; + state.strikethrough = false; + + if (modeCfg.taskLists && stream.match(taskListRE, false)) { + state.taskList = true; + } + state.f = state.inline; + if (modeCfg.highlightFormatting) state.formatting = ["list", "list-" + listType]; + return getType(state); + } else if (firstTokenOnLine && state.indentation <= maxNonCodeIndentation && (match = stream.match(fencedCodeRE, true))) { + state.quote = 0; + state.fencedEndRE = new RegExp(match[1] + "+ *$"); + // try switching mode + state.localMode = modeCfg.fencedCodeBlockHighlighting && getMode(match[2] || modeCfg.fencedCodeBlockDefaultMode ); + if (state.localMode) state.localState = CodeMirror.startState(state.localMode); + state.f = state.block = local; + if (modeCfg.highlightFormatting) state.formatting = "code-block"; + state.code = -1 + return getType(state); + // SETEXT has lowest block-scope precedence after HR, so check it after + // the others (code, blockquote, list...) + } else if ( + // if setext set, indicates line after ---/=== + state.setext || ( + // line before ---/=== + (!allowsInlineContinuation || !prevLineIsList) && !state.quote && state.list === false && + !state.code && !isHr && !linkDefRE.test(stream.string) && + (match = stream.lookAhead(1)) && (match = match.match(setextHeaderRE)) + ) + ) { + if ( !state.setext ) { + state.header = match[0].charAt(0) == '=' ? 1 : 2; + state.setext = state.header; + } else { + state.header = state.setext; + // has no effect on type so we can reset it now + state.setext = 0; + stream.skipToEnd(); + if (modeCfg.highlightFormatting) state.formatting = "header"; + } + state.thisLine.header = true; + state.f = state.inline; + return getType(state); + } else if (isHr) { + stream.skipToEnd(); + state.hr = true; + state.thisLine.hr = true; + return tokenTypes.hr; + } else if (stream.peek() === '[') { + return switchInline(stream, state, footnoteLink); + } + + return switchInline(stream, state, state.inline); + } + + function htmlBlock(stream, state) { + var style = htmlMode.token(stream, state.htmlState); + if (!htmlModeMissing) { + var inner = CodeMirror.innerMode(htmlMode, state.htmlState) + if ((inner.mode.name == "xml" && inner.state.tagStart === null && + (!inner.state.context && inner.state.tokenize.isInText)) || + (state.md_inside && stream.current().indexOf(">") > -1)) { + state.f = inlineNormal; + state.block = blockNormal; + state.htmlState = null; + } + } + return style; + } + + function local(stream, state) { + var currListInd = state.listStack[state.listStack.length - 1] || 0; + var hasExitedList = state.indentation < currListInd; + var maxFencedEndInd = currListInd + 3; + if (state.fencedEndRE && state.indentation <= maxFencedEndInd && (hasExitedList || stream.match(state.fencedEndRE))) { + if (modeCfg.highlightFormatting) state.formatting = "code-block"; + var returnType; + if (!hasExitedList) returnType = getType(state) + state.localMode = state.localState = null; + state.block = blockNormal; + state.f = inlineNormal; + state.fencedEndRE = null; + state.code = 0 + state.thisLine.fencedCodeEnd = true; + if (hasExitedList) return switchBlock(stream, state, state.block); + return returnType; + } else if (state.localMode) { + return state.localMode.token(stream, state.localState); + } else { + stream.skipToEnd(); + return tokenTypes.code; + } + } + + // Inline + function getType(state) { + var styles = []; + + if (state.formatting) { + styles.push(tokenTypes.formatting); + + if (typeof state.formatting === "string") state.formatting = [state.formatting]; + + for (var i = 0; i < state.formatting.length; i++) { + styles.push(tokenTypes.formatting + "-" + state.formatting[i]); + + if (state.formatting[i] === "header") { + styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.header); + } + + // Add `formatting-quote` and `formatting-quote-#` for blockquotes + // Add `error` instead if the maximum blockquote nesting depth is passed + if (state.formatting[i] === "quote") { + if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) { + styles.push(tokenTypes.formatting + "-" + state.formatting[i] + "-" + state.quote); + } else { + styles.push("error"); + } + } + } + } + + if (state.taskOpen) { + styles.push("meta"); + return styles.length ? styles.join(' ') : null; + } + if (state.taskClosed) { + styles.push("property"); + return styles.length ? styles.join(' ') : null; + } + + if (state.linkHref) { + styles.push(tokenTypes.linkHref, "url"); + } else { // Only apply inline styles to non-url text + if (state.strong) { styles.push(tokenTypes.strong); } + if (state.em) { styles.push(tokenTypes.em); } + if (state.strikethrough) { styles.push(tokenTypes.strikethrough); } + if (state.emoji) { styles.push(tokenTypes.emoji); } + if (state.linkText) { styles.push(tokenTypes.linkText); } + if (state.code) { styles.push(tokenTypes.code); } + if (state.image) { styles.push(tokenTypes.image); } + if (state.imageAltText) { styles.push(tokenTypes.imageAltText, "link"); } + if (state.imageMarker) { styles.push(tokenTypes.imageMarker); } + } + + if (state.header) { styles.push(tokenTypes.header, tokenTypes.header + "-" + state.header); } + + if (state.quote) { + styles.push(tokenTypes.quote); + + // Add `quote-#` where the maximum for `#` is modeCfg.maxBlockquoteDepth + if (!modeCfg.maxBlockquoteDepth || modeCfg.maxBlockquoteDepth >= state.quote) { + styles.push(tokenTypes.quote + "-" + state.quote); + } else { + styles.push(tokenTypes.quote + "-" + modeCfg.maxBlockquoteDepth); + } + } + + if (state.list !== false) { + var listMod = (state.listStack.length - 1) % 3; + if (!listMod) { + styles.push(tokenTypes.list1); + } else if (listMod === 1) { + styles.push(tokenTypes.list2); + } else { + styles.push(tokenTypes.list3); + } + } + + if (state.trailingSpaceNewLine) { + styles.push("trailing-space-new-line"); + } else if (state.trailingSpace) { + styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b")); + } + + return styles.length ? styles.join(' ') : null; + } + + function handleText(stream, state) { + if (stream.match(textRE, true)) { + return getType(state); + } + return undefined; + } + + function inlineNormal(stream, state) { + var style = state.text(stream, state); + if (typeof style !== 'undefined') + return style; + + if (state.list) { // List marker (*, +, -, 1., etc) + state.list = null; + return getType(state); + } + + if (state.taskList) { + var taskOpen = stream.match(taskListRE, true)[1] === " "; + if (taskOpen) state.taskOpen = true; + else state.taskClosed = true; + if (modeCfg.highlightFormatting) state.formatting = "task"; + state.taskList = false; + return getType(state); + } + + state.taskOpen = false; + state.taskClosed = false; + + if (state.header && stream.match(/^#+$/, true)) { + if (modeCfg.highlightFormatting) state.formatting = "header"; + return getType(state); + } + + var ch = stream.next(); + + // Matches link titles present on next line + if (state.linkTitle) { + state.linkTitle = false; + var matchCh = ch; + if (ch === '(') { + matchCh = ')'; + } + matchCh = (matchCh+'').replace(/([.?*+^\[\]\\(){}|-])/g, "\\$1"); + var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh; + if (stream.match(new RegExp(regex), true)) { + return tokenTypes.linkHref; + } + } + + // If this block is changed, it may need to be updated in GFM mode + if (ch === '`') { + var previousFormatting = state.formatting; + if (modeCfg.highlightFormatting) state.formatting = "code"; + stream.eatWhile('`'); + var count = stream.current().length + if (state.code == 0 && (!state.quote || count == 1)) { + state.code = count + return getType(state) + } else if (count == state.code) { // Must be exact + var t = getType(state) + state.code = 0 + return t + } else { + state.formatting = previousFormatting + return getType(state) + } + } else if (state.code) { + return getType(state); + } + + if (ch === '\\') { + stream.next(); + if (modeCfg.highlightFormatting) { + var type = getType(state); + var formattingEscape = tokenTypes.formatting + "-escape"; + return type ? type + " " + formattingEscape : formattingEscape; + } + } + + if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) { + state.imageMarker = true; + state.image = true; + if (modeCfg.highlightFormatting) state.formatting = "image"; + return getType(state); + } + + if (ch === '[' && state.imageMarker && stream.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/, false)) { + state.imageMarker = false; + state.imageAltText = true + if (modeCfg.highlightFormatting) state.formatting = "image"; + return getType(state); + } + + if (ch === ']' && state.imageAltText) { + if (modeCfg.highlightFormatting) state.formatting = "image"; + var type = getType(state); + state.imageAltText = false; + state.image = false; + state.inline = state.f = linkHref; + return type; + } + + if (ch === '[' && !state.image) { + if (state.linkText && stream.match(/^.*?\]/)) return getType(state) + state.linkText = true; + if (modeCfg.highlightFormatting) state.formatting = "link"; + return getType(state); + } + + if (ch === ']' && state.linkText) { + if (modeCfg.highlightFormatting) state.formatting = "link"; + var type = getType(state); + state.linkText = false; + state.inline = state.f = stream.match(/\(.*?\)| ?\[.*?\]/, false) ? linkHref : inlineNormal + return type; + } + + if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) { + state.f = state.inline = linkInline; + if (modeCfg.highlightFormatting) state.formatting = "link"; + var type = getType(state); + if (type){ + type += " "; + } else { + type = ""; + } + return type + tokenTypes.linkInline; + } + + if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) { + state.f = state.inline = linkInline; + if (modeCfg.highlightFormatting) state.formatting = "link"; + var type = getType(state); + if (type){ + type += " "; + } else { + type = ""; + } + return type + tokenTypes.linkEmail; + } + + if (modeCfg.xml && ch === '<' && stream.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i, false)) { + var end = stream.string.indexOf(">", stream.pos); + if (end != -1) { + var atts = stream.string.substring(stream.start, end); + if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) state.md_inside = true; + } + stream.backUp(1); + state.htmlState = CodeMirror.startState(htmlMode); + return switchBlock(stream, state, htmlBlock); + } + + if (modeCfg.xml && ch === '<' && stream.match(/^\/\w*?>/)) { + state.md_inside = false; + return "tag"; + } else if (ch === "*" || ch === "_") { + var len = 1, before = stream.pos == 1 ? " " : stream.string.charAt(stream.pos - 2) + while (len < 3 && stream.eat(ch)) len++ + var after = stream.peek() || " " + // See http://spec.commonmark.org/0.27/#emphasis-and-strong-emphasis + var leftFlanking = !/\s/.test(after) && (!punctuation.test(after) || /\s/.test(before) || punctuation.test(before)) + var rightFlanking = !/\s/.test(before) && (!punctuation.test(before) || /\s/.test(after) || punctuation.test(after)) + var setEm = null, setStrong = null + if (len % 2) { // Em + if (!state.em && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before))) + setEm = true + else if (state.em == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after))) + setEm = false + } + if (len > 1) { // Strong + if (!state.strong && leftFlanking && (ch === "*" || !rightFlanking || punctuation.test(before))) + setStrong = true + else if (state.strong == ch && rightFlanking && (ch === "*" || !leftFlanking || punctuation.test(after))) + setStrong = false + } + if (setStrong != null || setEm != null) { + if (modeCfg.highlightFormatting) state.formatting = setEm == null ? "strong" : setStrong == null ? "em" : "strong em" + if (setEm === true) state.em = ch + if (setStrong === true) state.strong = ch + var t = getType(state) + if (setEm === false) state.em = false + if (setStrong === false) state.strong = false + return t + } + } else if (ch === ' ') { + if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces + if (stream.peek() === ' ') { // Surrounded by spaces, ignore + return getType(state); + } else { // Not surrounded by spaces, back up pointer + stream.backUp(1); + } + } + } + + if (modeCfg.strikethrough) { + if (ch === '~' && stream.eatWhile(ch)) { + if (state.strikethrough) {// Remove strikethrough + if (modeCfg.highlightFormatting) state.formatting = "strikethrough"; + var t = getType(state); + state.strikethrough = false; + return t; + } else if (stream.match(/^[^\s]/, false)) {// Add strikethrough + state.strikethrough = true; + if (modeCfg.highlightFormatting) state.formatting = "strikethrough"; + return getType(state); + } + } else if (ch === ' ') { + if (stream.match('~~', true)) { // Probably surrounded by space + if (stream.peek() === ' ') { // Surrounded by spaces, ignore + return getType(state); + } else { // Not surrounded by spaces, back up pointer + stream.backUp(2); + } + } + } + } + + if (modeCfg.emoji && ch === ":" && stream.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)) { + state.emoji = true; + if (modeCfg.highlightFormatting) state.formatting = "emoji"; + var retType = getType(state); + state.emoji = false; + return retType; + } + + if (ch === ' ') { + if (stream.match(/^ +$/, false)) { + state.trailingSpace++; + } else if (state.trailingSpace) { + state.trailingSpaceNewLine = true; + } + } + + return getType(state); + } + + function linkInline(stream, state) { + var ch = stream.next(); + + if (ch === ">") { + state.f = state.inline = inlineNormal; + if (modeCfg.highlightFormatting) state.formatting = "link"; + var type = getType(state); + if (type){ + type += " "; + } else { + type = ""; + } + return type + tokenTypes.linkInline; + } + + stream.match(/^[^>]+/, true); + + return tokenTypes.linkInline; + } + + function linkHref(stream, state) { + // Check if space, and return NULL if so (to avoid marking the space) + if(stream.eatSpace()){ + return null; + } + var ch = stream.next(); + if (ch === '(' || ch === '[') { + state.f = state.inline = getLinkHrefInside(ch === "(" ? ")" : "]"); + if (modeCfg.highlightFormatting) state.formatting = "link-string"; + state.linkHref = true; + return getType(state); + } + return 'error'; + } + + var linkRE = { + ")": /^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/, + "]": /^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/ + } + + function getLinkHrefInside(endChar) { + return function(stream, state) { + var ch = stream.next(); + + if (ch === endChar) { + state.f = state.inline = inlineNormal; + if (modeCfg.highlightFormatting) state.formatting = "link-string"; + var returnState = getType(state); + state.linkHref = false; + return returnState; + } + + stream.match(linkRE[endChar]) + state.linkHref = true; + return getType(state); + }; + } + + function footnoteLink(stream, state) { + if (stream.match(/^([^\]\\]|\\.)*\]:/, false)) { + state.f = footnoteLinkInside; + stream.next(); // Consume [ + if (modeCfg.highlightFormatting) state.formatting = "link"; + state.linkText = true; + return getType(state); + } + return switchInline(stream, state, inlineNormal); + } + + function footnoteLinkInside(stream, state) { + if (stream.match(']:', true)) { + state.f = state.inline = footnoteUrl; + if (modeCfg.highlightFormatting) state.formatting = "link"; + var returnType = getType(state); + state.linkText = false; + return returnType; + } + + stream.match(/^([^\]\\]|\\.)+/, true); + + return tokenTypes.linkText; + } + + function footnoteUrl(stream, state) { + // Check if space, and return NULL if so (to avoid marking the space) + if(stream.eatSpace()){ + return null; + } + // Match URL + stream.match(/^[^\s]+/, true); + // Check for link title + if (stream.peek() === undefined) { // End of line, set flag to check next line + state.linkTitle = true; + } else { // More content on line, check if link title + stream.match(/^(?:\s+(?:"(?:[^"\\]|\\.)+"|'(?:[^'\\]|\\.)+'|\((?:[^)\\]|\\.)+\)))?/, true); + } + state.f = state.inline = inlineNormal; + return tokenTypes.linkHref + " url"; + } + + var mode = { + startState: function() { + return { + f: blockNormal, + + prevLine: {stream: null}, + thisLine: {stream: null}, + + block: blockNormal, + htmlState: null, + indentation: 0, + + inline: inlineNormal, + text: handleText, + + formatting: false, + linkText: false, + linkHref: false, + linkTitle: false, + code: 0, + em: false, + strong: false, + header: 0, + setext: 0, + hr: false, + taskList: false, + list: false, + listStack: [], + quote: 0, + trailingSpace: 0, + trailingSpaceNewLine: false, + strikethrough: false, + emoji: false, + fencedEndRE: null + }; + }, + + copyState: function(s) { + return { + f: s.f, + + prevLine: s.prevLine, + thisLine: s.thisLine, + + block: s.block, + htmlState: s.htmlState && CodeMirror.copyState(htmlMode, s.htmlState), + indentation: s.indentation, + + localMode: s.localMode, + localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null, + + inline: s.inline, + text: s.text, + formatting: false, + linkText: s.linkText, + linkTitle: s.linkTitle, + linkHref: s.linkHref, + code: s.code, + em: s.em, + strong: s.strong, + strikethrough: s.strikethrough, + emoji: s.emoji, + header: s.header, + setext: s.setext, + hr: s.hr, + taskList: s.taskList, + list: s.list, + listStack: s.listStack.slice(0), + quote: s.quote, + indentedCode: s.indentedCode, + trailingSpace: s.trailingSpace, + trailingSpaceNewLine: s.trailingSpaceNewLine, + md_inside: s.md_inside, + fencedEndRE: s.fencedEndRE + }; + }, + + token: function(stream, state) { + + // Reset state.formatting + state.formatting = false; + + if (stream != state.thisLine.stream) { + state.header = 0; + state.hr = false; + + if (stream.match(/^\s*$/, true)) { + blankLine(state); + return null; + } + + state.prevLine = state.thisLine + state.thisLine = {stream: stream} + + // Reset state.taskList + state.taskList = false; + + // Reset state.trailingSpace + state.trailingSpace = 0; + state.trailingSpaceNewLine = false; + + if (!state.localState) { + state.f = state.block; + if (state.f != htmlBlock) { + var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, expandedTab).length; + state.indentation = indentation; + state.indentationDiff = null; + if (indentation > 0) return null; + } + } + } + return state.f(stream, state); + }, + + innerMode: function(state) { + if (state.block == htmlBlock) return {state: state.htmlState, mode: htmlMode}; + if (state.localState) return {state: state.localState, mode: state.localMode}; + return {state: state, mode: mode}; + }, + + indent: function(state, textAfter, line) { + if (state.block == htmlBlock && htmlMode.indent) return htmlMode.indent(state.htmlState, textAfter, line) + if (state.localState && state.localMode.indent) return state.localMode.indent(state.localState, textAfter, line) + return CodeMirror.Pass + }, + + blankLine: blankLine, + + getType: getType, + + blockCommentStart: "", + closeBrackets: "()[]{}''\"\"``", + fold: "markdown" + }; + return mode; +}, "xml"); + +CodeMirror.defineMIME("text/markdown", "markdown"); + +CodeMirror.defineMIME("text/x-markdown", "markdown"); + +}); diff --git a/js/codemirror/mode/markdown/test.js b/js/codemirror/mode/markdown/test.js new file mode 100644 index 0000000..2e3f466 --- /dev/null +++ b/js/codemirror/mode/markdown/test.js @@ -0,0 +1,1319 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var config = {tabSize: 4, indentUnit: 2} + var mode = CodeMirror.getMode(config, "markdown"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + var modeHighlightFormatting = CodeMirror.getMode(config, {name: "markdown", highlightFormatting: true}); + function FT(name) { test.mode(name, modeHighlightFormatting, Array.prototype.slice.call(arguments, 1)); } + var modeMT_noXml = CodeMirror.getMode(config, {name: "markdown", xml: false}); + function MT_noXml(name) { test.mode(name, modeMT_noXml, Array.prototype.slice.call(arguments, 1)); } + var modeMT_noFencedHighlight = CodeMirror.getMode(config, {name: "markdown", fencedCodeBlockHighlighting: false}); + function MT_noFencedHighlight(name) { test.mode(name, modeMT_noFencedHighlight, Array.prototype.slice.call(arguments, 1)); } + var modeAtxNoSpace = CodeMirror.getMode(config, {name: "markdown", allowAtxHeaderWithoutSpace: true}); + function AtxNoSpaceTest(name) { test.mode(name, modeAtxNoSpace, Array.prototype.slice.call(arguments, 1)); } + var modeOverrideClasses = CodeMirror.getMode(config, { + name: "markdown", + strikethrough: true, + emoji: true, + tokenTypeOverrides: { + "header" : "override-header", + "code" : "override-code", + "quote" : "override-quote", + "list1" : "override-list1", + "list2" : "override-list2", + "list3" : "override-list3", + "hr" : "override-hr", + "image" : "override-image", + "imageAltText": "override-image-alt-text", + "imageMarker": "override-image-marker", + "linkInline" : "override-link-inline", + "linkEmail" : "override-link-email", + "linkText" : "override-link-text", + "linkHref" : "override-link-href", + "em" : "override-em", + "strong" : "override-strong", + "strikethrough" : "override-strikethrough", + "emoji" : "override-emoji" + }}); + function TokenTypeOverrideTest(name) { test.mode(name, modeOverrideClasses, Array.prototype.slice.call(arguments, 1)); } + var modeFormattingOverride = CodeMirror.getMode(config, { + name: "markdown", + highlightFormatting: true, + tokenTypeOverrides: { + "formatting" : "override-formatting" + }}); + function FormatTokenTypeOverrideTest(name) { test.mode(name, modeFormattingOverride, Array.prototype.slice.call(arguments, 1)); } + var modeET = CodeMirror.getMode(config, {name: "markdown", emoji: true}); + function ET(name) { test.mode(name, modeET, Array.prototype.slice.call(arguments, 1)); } + + + FT("formatting_emAsterisk", + "[em&formatting&formatting-em *][em foo][em&formatting&formatting-em *]"); + + FT("formatting_emUnderscore", + "[em&formatting&formatting-em _][em foo][em&formatting&formatting-em _]"); + + FT("formatting_strongAsterisk", + "[strong&formatting&formatting-strong **][strong foo][strong&formatting&formatting-strong **]"); + + FT("formatting_strongUnderscore", + "[strong&formatting&formatting-strong __][strong foo][strong&formatting&formatting-strong __]"); + + FT("formatting_codeBackticks", + "[comment&formatting&formatting-code `][comment foo][comment&formatting&formatting-code `]"); + + FT("formatting_doubleBackticks", + "[comment&formatting&formatting-code ``][comment foo ` bar][comment&formatting&formatting-code ``]"); + + FT("formatting_atxHeader", + "[header&header-1&formatting&formatting-header&formatting-header-1 # ][header&header-1 foo # bar ][header&header-1&formatting&formatting-header&formatting-header-1 #]"); + + FT("formatting_setextHeader", + "[header&header-1 foo]", + "[header&header-1&formatting&formatting-header&formatting-header-1 =]"); + + FT("formatting_blockquote", + "[quote"e-1&formatting&formatting-quote&formatting-quote-1 > ][quote"e-1 foo]"); + + FT("formatting_list", + "[variable-2&formatting&formatting-list&formatting-list-ul - ][variable-2 foo]"); + FT("formatting_list", + "[variable-2&formatting&formatting-list&formatting-list-ol 1. ][variable-2 foo]"); + + FT("formatting_link", + "[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string&url (][string&url http://example.com/][string&formatting&formatting-link-string&url )]"); + + FT("formatting_linkReference", + "[link&formatting&formatting-link [][link foo][link&formatting&formatting-link ]]][string&formatting&formatting-link-string&url [][string&url bar][string&formatting&formatting-link-string&url ]]]", + "[link&formatting&formatting-link [][link bar][link&formatting&formatting-link ]]:] [string&url http://example.com/]"); + + FT("formatting_linkWeb", + "[link&formatting&formatting-link <][link http://example.com/][link&formatting&formatting-link >]"); + + FT("formatting_linkEmail", + "[link&formatting&formatting-link <][link user@example.com][link&formatting&formatting-link >]"); + + FT("formatting_escape", + "[formatting-escape \\*]"); + + FT("formatting_image", + "[formatting&formatting-image&image&image-marker !][formatting&formatting-image&image&image-alt-text&link [[][image&image-alt-text&link alt text][formatting&formatting-image&image&image-alt-text&link ]]][formatting&formatting-link-string&string&url (][url&string http://link.to/image.jpg][formatting&formatting-link-string&string&url )]"); + + FT("codeBlock", + "[comment&formatting&formatting-code-block ```css]", + "[tag foo]", + "[comment&formatting&formatting-code-block ```]"); + + MT("plainText", + "foo"); + + // Don't style single trailing space + MT("trailingSpace1", + "foo "); + + // Two or more trailing spaces should be styled with line break character + MT("trailingSpace2", + "foo[trailing-space-a ][trailing-space-new-line ]"); + + MT("trailingSpace3", + "foo[trailing-space-a ][trailing-space-b ][trailing-space-new-line ]"); + + MT("trailingSpace4", + "foo[trailing-space-a ][trailing-space-b ][trailing-space-a ][trailing-space-new-line ]"); + + // Code blocks using 4 spaces (regardless of CodeMirror.tabSize value) + MT("codeBlocksUsing4Spaces", + " [comment foo]"); + + // Code blocks using 4 spaces with internal indentation + MT("codeBlocksUsing4SpacesIndentation", + " [comment bar]", + " [comment hello]", + " [comment world]", + " [comment foo]", + "bar"); + + // Code blocks should end even after extra indented lines + MT("codeBlocksWithTrailingIndentedLine", + " [comment foo]", + " [comment bar]", + " [comment baz]", + " ", + "hello"); + + // Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value) + MT("codeBlocksUsing1Tab", + "\t[comment foo]"); + + // No code blocks directly after paragraph + // http://spec.commonmark.org/0.19/#example-65 + MT("noCodeBlocksAfterParagraph", + "Foo", + " Bar"); + + MT("codeBlocksAfterATX", + "[header&header-1 # foo]", + " [comment code]"); + + MT("codeBlocksAfterSetext", + "[header&header-2 foo]", + "[header&header-2 ---]", + " [comment code]"); + + MT("codeBlocksAfterFencedCode", + "[comment ```]", + "[comment foo]", + "[comment ```]", + " [comment code]"); + + // Inline code using backticks + MT("inlineCodeUsingBackticks", + "foo [comment `bar`]"); + + // Block code using single backtick (shouldn't work) + MT("blockCodeSingleBacktick", + "[comment `]", + "[comment foo]", + "[comment `]"); + + // Unclosed backticks + // Instead of simply marking as CODE, it would be nice to have an + // incomplete flag for CODE, that is styled slightly different. + MT("unclosedBackticks", + "foo [comment `bar]"); + + // Per documentation: "To include a literal backtick character within a + // code span, you can use multiple backticks as the opening and closing + // delimiters" + MT("doubleBackticks", + "[comment ``foo ` bar``]"); + + // Tests based on Dingus + // http://daringfireball.net/projects/markdown/dingus + // + // Multiple backticks within an inline code block + MT("consecutiveBackticks", + "[comment `foo```bar`]"); + + // Multiple backticks within an inline code block with a second code block + MT("consecutiveBackticks", + "[comment `foo```bar`] hello [comment `world`]"); + + // Unclosed with several different groups of backticks + MT("unclosedBackticks", + "[comment ``foo ``` bar` hello]"); + + // Closed with several different groups of backticks + MT("closedBackticks", + "[comment ``foo ``` bar` hello``] world"); + + // info string cannot contain backtick, thus should result in inline code + MT("closingFencedMarksOnSameLine", + "[comment ``` code ```] foo"); + + // atx headers + // http://daringfireball.net/projects/markdown/syntax#header + + MT("atxH1", + "[header&header-1 # foo]"); + + MT("atxH2", + "[header&header-2 ## foo]"); + + MT("atxH3", + "[header&header-3 ### foo]"); + + MT("atxH4", + "[header&header-4 #### foo]"); + + MT("atxH5", + "[header&header-5 ##### foo]"); + + MT("atxH6", + "[header&header-6 ###### foo]"); + + // http://spec.commonmark.org/0.19/#example-24 + MT("noAtxH7", + "####### foo"); + + // http://spec.commonmark.org/0.19/#example-25 + MT("noAtxH1WithoutSpace", + "#5 bolt"); + + // CommonMark requires a space after # but most parsers don't + AtxNoSpaceTest("atxNoSpaceAllowed_H1NoSpace", + "[header&header-1 #foo]"); + + AtxNoSpaceTest("atxNoSpaceAllowed_H4NoSpace", + "[header&header-4 ####foo]"); + + AtxNoSpaceTest("atxNoSpaceAllowed_H1Space", + "[header&header-1 # foo]"); + + // Inline styles should be parsed inside headers + MT("atxH1inline", + "[header&header-1 # foo ][header&header-1&em *bar*]"); + + MT("atxIndentedTooMuch", + "[header&header-1 # foo]", + " [comment # bar]"); + + // disable atx inside blockquote until we implement proper blockquote inner mode + // TODO: fix to be CommonMark-compliant + MT("atxNestedInsideBlockquote", + "[quote"e-1 > # foo]"); + + MT("atxAfterBlockquote", + "[quote"e-1 > foo]", + "[header&header-1 # bar]"); + + // Setext headers - H1, H2 + // Per documentation, "Any number of underlining =’s or -’s will work." + // http://daringfireball.net/projects/markdown/syntax#header + // Ideally, the text would be marked as `header` as well, but this is + // not really feasible at the moment. So, instead, we're testing against + // what works today, to avoid any regressions. + // + // Check if single underlining = works + MT("setextH1", + "[header&header-1 foo]", + "[header&header-1 =]"); + + // Check if 3+ ='s work + MT("setextH1", + "[header&header-1 foo]", + "[header&header-1 ===]"); + + // Check if single underlining - should not be interpreted + // as it might lead to an empty list: + // https://spec.commonmark.org/0.28/#setext-heading-underline + MT("setextH2Single", + "foo", + "-"); + + // Check if 3+ -'s work + MT("setextH2", + "[header&header-2 foo]", + "[header&header-2 ---]"); + + // http://spec.commonmark.org/0.19/#example-45 + MT("setextH2AllowSpaces", + "[header&header-2 foo]", + " [header&header-2 ---- ]"); + + // http://spec.commonmark.org/0.19/#example-44 + MT("noSetextAfterIndentedCodeBlock", + " [comment foo]", + "[hr ---]"); + + MT("setextAfterFencedCode", + "[comment ```]", + "[comment foo]", + "[comment ```]", + "[header&header-2 bar]", + "[header&header-2 ---]"); + + MT("setextAfterATX", + "[header&header-1 # foo]", + "[header&header-2 bar]", + "[header&header-2 ---]"); + + // http://spec.commonmark.org/0.19/#example-51 + MT("noSetextAfterQuote", + "[quote"e-1 > foo]", + "[hr ---]", + "", + "[quote"e-1 > foo]", + "[quote"e-1 bar]", + "[hr ---]"); + + MT("noSetextAfterList", + "[variable-2 - foo]", + "[hr ---]"); + + MT("noSetextAfterList_listContinuation", + "[variable-2 - foo]", + "bar", + "[hr ---]"); + + MT("setextAfterList_afterIndentedCode", + "[variable-2 - foo]", + "", + " [comment bar]", + "[header&header-2 baz]", + "[header&header-2 ---]"); + + MT("setextAfterList_afterFencedCodeBlocks", + "[variable-2 - foo]", + "", + " [comment ```]", + " [comment bar]", + " [comment ```]", + "[header&header-2 baz]", + "[header&header-2 ---]"); + + MT("setextAfterList_afterHeader", + "[variable-2 - foo]", + " [variable-2&header&header-1 # bar]", + "[header&header-2 baz]", + "[header&header-2 ---]"); + + MT("setextAfterList_afterHr", + "[variable-2 - foo]", + "", + " [hr ---]", + "[header&header-2 bar]", + "[header&header-2 ---]"); + + MT("setext_nestedInlineMarkup", + "[header&header-1 foo ][em&header&header-1 *bar*]", + "[header&header-1 =]"); + + MT("setext_linkDef", + "[link [[aaa]]:] [string&url http://google.com 'title']", + "[hr ---]"); + + // currently, looks max one line ahead, thus won't catch valid CommonMark + // markup + MT("setext_oneLineLookahead", + "foo", + "[header&header-1 bar]", + "[header&header-1 =]"); + + // ensure we regard space after a single dash as a list + MT("setext_emptyList", + "foo", + "[variable-2 - ]", + "foo"); + + // Single-line blockquote with trailing space + MT("blockquoteSpace", + "[quote"e-1 > foo]"); + + // Single-line blockquote + MT("blockquoteNoSpace", + "[quote"e-1 >foo]"); + + // No blank line before blockquote + MT("blockquoteNoBlankLine", + "foo", + "[quote"e-1 > bar]"); + + MT("blockquoteNested", + "[quote"e-1 > foo]", + "[quote"e-1 >][quote"e-2 > foo]", + "[quote"e-1 >][quote"e-2 >][quote"e-3 > foo]"); + + // ensure quote-level is inferred correctly even if indented + MT("blockquoteNestedIndented", + " [quote"e-1 > foo]", + " [quote"e-1 >][quote"e-2 > foo]", + " [quote"e-1 >][quote"e-2 >][quote"e-3 > foo]"); + + // ensure quote-level is inferred correctly even if indented + MT("blockquoteIndentedTooMuch", + "foo", + " > bar"); + + // Single-line blockquote followed by normal paragraph + MT("blockquoteThenParagraph", + "[quote"e-1 >foo]", + "", + "bar"); + + // Multi-line blockquote (lazy mode) + MT("multiBlockquoteLazy", + "[quote"e-1 >foo]", + "[quote"e-1 bar]"); + + // Multi-line blockquote followed by normal paragraph (lazy mode) + MT("multiBlockquoteLazyThenParagraph", + "[quote"e-1 >foo]", + "[quote"e-1 bar]", + "", + "hello"); + + // Multi-line blockquote (non-lazy mode) + MT("multiBlockquote", + "[quote"e-1 >foo]", + "[quote"e-1 >bar]"); + + // Multi-line blockquote followed by normal paragraph (non-lazy mode) + MT("multiBlockquoteThenParagraph", + "[quote"e-1 >foo]", + "[quote"e-1 >bar]", + "", + "hello"); + + // disallow lists inside blockquote for now because it causes problems outside blockquote + // TODO: fix to be CommonMark-compliant + MT("listNestedInBlockquote", + "[quote"e-1 > - foo]"); + + // disallow fenced blocks inside blockquote because it causes problems outside blockquote + // TODO: fix to be CommonMark-compliant + MT("fencedBlockNestedInBlockquote", + "[quote"e-1 > ```]", + "[quote"e-1 > code]", + "[quote"e-1 > ```]", + // ensure we still allow inline code + "[quote"e-1 > ][quote"e-1&comment `code`]"); + + // Header with leading space after continued blockquote (#3287, negative indentation) + MT("headerAfterContinuedBlockquote", + "[quote"e-1 > foo]", + "[quote"e-1 bar]", + "", + " [header&header-1 # hello]"); + + // Check list types + + MT("listAsterisk", + "foo", + "bar", + "", + "[variable-2 * foo]", + "[variable-2 * bar]"); + + MT("listPlus", + "foo", + "bar", + "", + "[variable-2 + foo]", + "[variable-2 + bar]"); + + MT("listDash", + "foo", + "bar", + "", + "[variable-2 - foo]", + "[variable-2 - bar]"); + + MT("listNumber", + "foo", + "bar", + "", + "[variable-2 1. foo]", + "[variable-2 2. bar]"); + + MT("listFromParagraph", + "foo", + "[variable-2 1. bar]", + "[variable-2 2. hello]"); + + // List after hr + MT("listAfterHr", + "[hr ---]", + "[variable-2 - bar]"); + + // List after header + MT("listAfterHeader", + "[header&header-1 # foo]", + "[variable-2 - bar]"); + + // hr after list + MT("hrAfterList", + "[variable-2 - foo]", + "[hr -----]"); + + MT("hrAfterFencedCode", + "[comment ```]", + "[comment code]", + "[comment ```]", + "[hr ---]"); + + // allow hr inside lists + // (require prev line to be empty or hr, TODO: non-CommonMark-compliant) + MT("hrInsideList", + "[variable-2 - foo]", + "", + " [hr ---]", + " [hr ---]", + "", + " [comment ---]"); + + MT("consecutiveHr", + "[hr ---]", + "[hr ---]", + "[hr ---]"); + + // Formatting in lists (*) + MT("listAsteriskFormatting", + "[variable-2 * ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 * ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 * ][variable-2&em&strong ***foo***][variable-2 bar]", + "[variable-2 * ][variable-2&comment `foo`][variable-2 bar]"); + + // Formatting in lists (+) + MT("listPlusFormatting", + "[variable-2 + ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 + ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 + ][variable-2&em&strong ***foo***][variable-2 bar]", + "[variable-2 + ][variable-2&comment `foo`][variable-2 bar]"); + + // Formatting in lists (-) + MT("listDashFormatting", + "[variable-2 - ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 - ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 - ][variable-2&em&strong ***foo***][variable-2 bar]", + "[variable-2 - ][variable-2&comment `foo`][variable-2 bar]"); + + // Formatting in lists (1.) + MT("listNumberFormatting", + "[variable-2 1. ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 2. ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 3. ][variable-2&em&strong ***foo***][variable-2 bar]", + "[variable-2 4. ][variable-2&comment `foo`][variable-2 bar]"); + + // Paragraph lists + MT("listParagraph", + "[variable-2 * foo]", + "", + "[variable-2 * bar]"); + + // Multi-paragraph lists + // + // 4 spaces + MT("listMultiParagraph", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [variable-2 hello]"); + + // 4 spaces, extra blank lines (should still be list, per Dingus) + MT("listMultiParagraphExtra", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + "", + " [variable-2 hello]"); + + // 4 spaces, plus 1 space (should still be list, per Dingus) + MT("listMultiParagraphExtraSpace", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [variable-2 hello]", + "", + " [variable-2 world]"); + + // 1 tab + MT("listTab", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + "\t[variable-2 hello]"); + + // No indent + MT("listNoIndent", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + "hello"); + + MT("listCommonMarkIndentationCode", + "[variable-2 * Code blocks also affect]", + " [variable-3 * The next level starts where the contents start.]", + " [variable-3 * Anything less than that will keep the item on the same level.]", + " [variable-3 * Each list item can indent the first level further and further.]", + " [variable-3 * For the most part, this makes sense while writing a list.]", + " [keyword * This means two items with same indentation can be different levels.]", + " [keyword * Each level has an indent requirement that can change between items.]", + " [keyword * A list item that meets this will be part of the next level.]", + " [variable-3 * Otherwise, it will be part of the level where it does meet this.]", + " [variable-2 * World]"); + + // should handle nested and un-nested lists + MT("listCommonMark_MixedIndents", + "[variable-2 * list1]", + " [variable-2 list1]", + " [variable-2&header&header-1 # heading still part of list1]", + " [variable-2 text after heading still part of list1]", + "", + " [comment indented codeblock]", + " [variable-2 list1 after code block]", + " [variable-3 * list2]", + // amount of spaces on empty lines between lists doesn't matter + " ", + // extra empty lines irrelevant + "", + "", + " [variable-3 indented text part of list2]", + " [keyword * list3]", + "", + " [variable-3 text at level of list2]", + "", + " [variable-2 de-indented text part of list1 again]", + "", + " [variable-2&comment ```]", + " [comment code]", + " [variable-2&comment ```]", + "", + " [variable-2 text after fenced code]"); + + // should correctly parse numbered list content indentation + MT("listCommonMark_NumberedListIndent", + "[variable-2 1000. list with base indent of 6]", + "", + " [variable-2 text must be indented 6 spaces at minimum]", + "", + " [variable-2 9-spaces indented text still part of list]", + "", + " [comment indented codeblock starts at 10 spaces]", + "", + " [comment text indented by 5 spaces no longer belong to list]"); + + // should consider tab as 4 spaces + MT("listCommonMark_TabIndented", + "[variable-2 * list]", + "\t[variable-3 * list2]", + "", + "\t\t[variable-3 part of list2]"); + + MT("listAfterBlockquote", + "[quote"e-1 > foo]", + "[variable-2 - bar]"); + + // shouldn't create sublist if it's indented more than allowed + MT("nestedListIndentedTooMuch", + "[variable-2 - foo]", + " [variable-2 - bar]"); + + MT("listIndentedTooMuchAfterParagraph", + "foo", + " - bar"); + + // Blockquote + MT("blockquote", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [variable-2"e"e-1 > hello]"); + + // Code block + MT("blockquoteCode", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [comment > hello]", + "", + " [variable-2 world]"); + + // Code block followed by text + MT("blockquoteCodeText", + "[variable-2 * foo]", + "", + " [variable-2 bar]", + "", + " [comment hello]", + "", + " [variable-2 world]"); + + // Nested list + + MT("listAsteriskNested", + "[variable-2 * foo]", + "", + " [variable-3 * bar]"); + + MT("listPlusNested", + "[variable-2 + foo]", + "", + " [variable-3 + bar]"); + + MT("listDashNested", + "[variable-2 - foo]", + "", + " [variable-3 - bar]"); + + MT("listNumberNested", + "[variable-2 1. foo]", + "", + " [variable-3 2. bar]"); + + MT("listMixed", + "[variable-2 * foo]", + "", + " [variable-3 + bar]", + "", + " [keyword - hello]", + "", + " [variable-2 1. world]"); + + MT("listBlockquote", + "[variable-2 * foo]", + "", + " [variable-3 + bar]", + "", + " [quote"e-1&variable-3 > hello]"); + + MT("listCode", + "[variable-2 * foo]", + "", + " [variable-3 + bar]", + "", + " [comment hello]"); + + // Code with internal indentation + MT("listCodeIndentation", + "[variable-2 * foo]", + "", + " [comment bar]", + " [comment hello]", + " [comment world]", + " [comment foo]", + " [variable-2 bar]"); + + // List nesting edge cases + MT("listNested", + "[variable-2 * foo]", + "", + " [variable-3 * bar]", + "", + " [variable-3 hello]" + ); + MT("listNested", + "[variable-2 * foo]", + "", + " [variable-3 * bar]", + "", + " [keyword * foo]" + ); + + // Code followed by text + MT("listCodeText", + "[variable-2 * foo]", + "", + " [comment bar]", + "", + "hello"); + + // Following tests directly from official Markdown documentation + // http://daringfireball.net/projects/markdown/syntax#hr + + MT("hrSpace", + "[hr * * *]"); + + MT("hr", + "[hr ***]"); + + MT("hrLong", + "[hr *****]"); + + MT("hrSpaceDash", + "[hr - - -]"); + + MT("hrDashLong", + "[hr ---------------------------------------]"); + + //Images + MT("Images", + "[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://link.to/image.jpg)]") + + //Images with highlight alt text + MT("imageEm", + "[image&image-marker !][image&image-alt-text&link [[][image-alt-text&em&image&link *alt text*][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]"); + + MT("imageStrong", + "[image&image-marker !][image&image-alt-text&link [[][image-alt-text&strong&image&link **alt text**][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]"); + + MT("imageEmStrong", + "[image&image-marker !][image&image-alt-text&link [[][image&image-alt-text&em&strong&link ***alt text***][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)]"); + + // Inline link with title + MT("linkTitle", + "[link [[foo]]][string&url (http://example.com/ \"bar\")] hello"); + + // Inline link without title + MT("linkNoTitle", + "[link [[foo]]][string&url (http://example.com/)] bar"); + + // Inline link with image + MT("linkImage", + "[link [[][link&image&image-marker !][link&image&image-alt-text&link [[alt text]]][string&url (http://link.to/image.jpg)][link ]]][string&url (http://example.com/)] bar"); + + // Inline link with Em + MT("linkEm", + "[link [[][link&em *foo*][link ]]][string&url (http://example.com/)] bar"); + + // Inline link with Strong + MT("linkStrong", + "[link [[][link&strong **foo**][link ]]][string&url (http://example.com/)] bar"); + + // Inline link with EmStrong + MT("linkEmStrong", + "[link [[][link&em&strong ***foo***][link ]]][string&url (http://example.com/)] bar"); + + MT("multilineLink", + "[link [[foo]", + "[link bar]]][string&url (https://foo#_a)]", + "should not be italics") + + // Image with title + MT("imageTitle", + "[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://example.com/ \"bar\")] hello"); + + // Image without title + MT("imageNoTitle", + "[image&image-marker !][image&image-alt-text&link [[alt text]]][string&url (http://example.com/)] bar"); + + // Image with asterisks + MT("imageAsterisks", + "[image&image-marker !][image&image-alt-text&link [[ ][image&image-alt-text&em&link *alt text*][image&image-alt-text&link ]]][string&url (http://link.to/image.jpg)] bar"); + + // Not a link. Should be normal text due to square brackets being used + // regularly in text, especially in quoted material, and no space is allowed + // between square brackets and parentheses (per Dingus). + MT("notALink", + "[link [[foo]]] (bar)"); + + // Reference-style links + MT("linkReference", + "[link [[foo]]][string&url [[bar]]] hello"); + + // Reference-style links with Em + MT("linkReferenceEm", + "[link [[][link&em *foo*][link ]]][string&url [[bar]]] hello"); + + // Reference-style links with Strong + MT("linkReferenceStrong", + "[link [[][link&strong **foo**][link ]]][string&url [[bar]]] hello"); + + // Reference-style links with EmStrong + MT("linkReferenceEmStrong", + "[link [[][link&em&strong ***foo***][link ]]][string&url [[bar]]] hello"); + + // Reference-style links with optional space separator (per documentation) + // "You can optionally use a space to separate the sets of brackets" + MT("linkReferenceSpace", + "[link [[foo]]] [string&url [[bar]]] hello"); + + // Should only allow a single space ("...use *a* space...") + MT("linkReferenceDoubleSpace", + "[link [[foo]]] [link [[bar]]] hello"); + + // Reference-style links with implicit link name + MT("linkImplicit", + "[link [[foo]]][string&url [[]]] hello"); + + // @todo It would be nice if, at some point, the document was actually + // checked to see if the referenced link exists + + // Link label, for reference-style links (taken from documentation) + + MT("labelNoTitle", + "[link [[foo]]:] [string&url http://example.com/]"); + + MT("labelIndented", + " [link [[foo]]:] [string&url http://example.com/]"); + + MT("labelSpaceTitle", + "[link [[foo bar]]:] [string&url http://example.com/ \"hello\"]"); + + MT("labelDoubleTitle", + "[link [[foo bar]]:] [string&url http://example.com/ \"hello\"] \"world\""); + + MT("labelTitleDoubleQuotes", + "[link [[foo]]:] [string&url http://example.com/ \"bar\"]"); + + MT("labelTitleSingleQuotes", + "[link [[foo]]:] [string&url http://example.com/ 'bar']"); + + MT("labelTitleParentheses", + "[link [[foo]]:] [string&url http://example.com/ (bar)]"); + + MT("labelTitleInvalid", + "[link [[foo]]:] [string&url http://example.com/] bar"); + + MT("labelLinkAngleBrackets", + "[link [[foo]]:] [string&url \"bar\"]"); + + MT("labelTitleNextDoubleQuotes", + "[link [[foo]]:] [string&url http://example.com/]", + "[string \"bar\"] hello"); + + MT("labelTitleNextSingleQuotes", + "[link [[foo]]:] [string&url http://example.com/]", + "[string 'bar'] hello"); + + MT("labelTitleNextParentheses", + "[link [[foo]]:] [string&url http://example.com/]", + "[string (bar)] hello"); + + MT("labelTitleNextMixed", + "[link [[foo]]:] [string&url http://example.com/]", + "(bar\" hello"); + + MT("labelEscape", + "[link [[foo \\]] ]]:] [string&url http://example.com/]"); + + MT("labelEscapeColon", + "[link [[foo \\]]: bar]]:] [string&url http://example.com/]"); + + MT("labelEscapeEnd", + "\\[[foo\\]]: http://example.com/"); + + MT("linkWeb", + "[link ] foo"); + + MT("linkWebDouble", + "[link ] foo [link ]"); + + MT("linkEmail", + "[link ] foo"); + + MT("linkEmailDouble", + "[link ] foo [link ]"); + + MT("emAsterisk", + "[em *foo*] bar"); + + MT("emUnderscore", + "[em _foo_] bar"); + + MT("emInWordAsterisk", + "foo[em *bar*]hello"); + + MT("emInWordUnderscore", + "foo_bar_hello"); + + // Per documentation: "...surround an * or _ with spaces, it’ll be + // treated as a literal asterisk or underscore." + + MT("emEscapedBySpaceIn", + "foo [em _bar _ hello_] world"); + + MT("emEscapedBySpaceOut", + "foo _ bar [em _hello_] world"); + + MT("emEscapedByNewline", + "foo", + "_ bar [em _hello_] world"); + + // Unclosed emphasis characters + // Instead of simply marking as EM / STRONG, it would be nice to have an + // incomplete flag for EM and STRONG, that is styled slightly different. + MT("emIncompleteAsterisk", + "foo [em *bar]"); + + MT("emIncompleteUnderscore", + "foo [em _bar]"); + + MT("strongAsterisk", + "[strong **foo**] bar"); + + MT("strongUnderscore", + "[strong __foo__] bar"); + + MT("emStrongAsterisk", + "[em *foo][em&strong **bar*][strong hello**] world"); + + MT("emStrongUnderscore", + "[em _foo ][em&strong __bar_][strong hello__] world"); + + // "...same character must be used to open and close an emphasis span."" + MT("emStrongMixed", + "[em _foo][em&strong **bar*hello__ world]"); + + MT("emStrongMixed", + "[em *foo ][em&strong __bar_hello** world]"); + + MT("linkWithNestedParens", + "[link [[foo]]][string&url (bar(baz))]") + + // These characters should be escaped: + // \ backslash + // ` backtick + // * asterisk + // _ underscore + // {} curly braces + // [] square brackets + // () parentheses + // # hash mark + // + plus sign + // - minus sign (hyphen) + // . dot + // ! exclamation mark + + MT("escapeBacktick", + "foo \\`bar\\`"); + + MT("doubleEscapeBacktick", + "foo \\\\[comment `bar\\\\`]"); + + MT("escapeAsterisk", + "foo \\*bar\\*"); + + MT("doubleEscapeAsterisk", + "foo \\\\[em *bar\\\\*]"); + + MT("escapeUnderscore", + "foo \\_bar\\_"); + + MT("doubleEscapeUnderscore", + "foo \\\\[em _bar\\\\_]"); + + MT("escapeHash", + "\\# foo"); + + MT("doubleEscapeHash", + "\\\\# foo"); + + MT("escapeNewline", + "\\", + "[em *foo*]"); + + // Class override tests + TokenTypeOverrideTest("overrideHeader1", + "[override-header&override-header-1 # Foo]"); + + TokenTypeOverrideTest("overrideHeader2", + "[override-header&override-header-2 ## Foo]"); + + TokenTypeOverrideTest("overrideHeader3", + "[override-header&override-header-3 ### Foo]"); + + TokenTypeOverrideTest("overrideHeader4", + "[override-header&override-header-4 #### Foo]"); + + TokenTypeOverrideTest("overrideHeader5", + "[override-header&override-header-5 ##### Foo]"); + + TokenTypeOverrideTest("overrideHeader6", + "[override-header&override-header-6 ###### Foo]"); + + TokenTypeOverrideTest("overrideCode", + "[override-code `foo`]"); + + TokenTypeOverrideTest("overrideCodeBlock", + "[override-code ```]", + "[override-code foo]", + "[override-code ```]"); + + TokenTypeOverrideTest("overrideQuote", + "[override-quote&override-quote-1 > foo]", + "[override-quote&override-quote-1 > bar]"); + + TokenTypeOverrideTest("overrideQuoteNested", + "[override-quote&override-quote-1 > foo]", + "[override-quote&override-quote-1 >][override-quote&override-quote-2 > bar]", + "[override-quote&override-quote-1 >][override-quote&override-quote-2 >][override-quote&override-quote-3 > baz]"); + + TokenTypeOverrideTest("overrideLists", + "[override-list1 - foo]", + "", + " [override-list2 + bar]", + "", + " [override-list3 * baz]", + "", + " [override-list1 1. qux]", + "", + " [override-list2 - quux]"); + + TokenTypeOverrideTest("overrideHr", + "[override-hr * * *]"); + + TokenTypeOverrideTest("overrideImage", + "[override-image&override-image-marker !][override-image&override-image-alt-text&link [[alt text]]][override-link-href&url (http://link.to/image.jpg)]"); + + TokenTypeOverrideTest("overrideLinkText", + "[override-link-text [[foo]]][override-link-href&url (http://example.com)]"); + + TokenTypeOverrideTest("overrideLinkEmailAndInline", + "[override-link-email <][override-link-inline foo@example.com>]"); + + TokenTypeOverrideTest("overrideEm", + "[override-em *foo*]"); + + TokenTypeOverrideTest("overrideStrong", + "[override-strong **foo**]"); + + TokenTypeOverrideTest("overrideStrikethrough", + "[override-strikethrough ~~foo~~]"); + + TokenTypeOverrideTest("overrideEmoji", + "[override-emoji :foo:]"); + + FormatTokenTypeOverrideTest("overrideFormatting", + "[override-formatting-escape \\*]"); + + // Tests to make sure GFM-specific things aren't getting through + + MT("taskList", + "[variable-2 * ][link&variable-2 [[ ]]][variable-2 bar]"); + + MT("fencedCodeBlocks", + "[comment ```]", + "[comment foo]", + "", + "[comment bar]", + "[comment ```]", + "baz"); + + MT("fencedCodeBlocks_invalidClosingFence_trailingText", + "[comment ```]", + "[comment foo]", + "[comment ``` must not have trailing text]", + "[comment baz]"); + + MT("fencedCodeBlocks_invalidClosingFence_trailingTabs", + "[comment ```]", + "[comment foo]", + "[comment ```\t]", + "[comment baz]"); + + MT("fencedCodeBlocks_validClosingFence", + "[comment ```]", + "[comment foo]", + // may have trailing spaces + "[comment ``` ]", + "baz"); + + MT("fencedCodeBlocksInList_closingFenceIndented", + "[variable-2 - list]", + " [variable-2&comment ```]", + " [comment foo]", + " [variable-2&comment ```]", + " [variable-2 baz]"); + + MT("fencedCodeBlocksInList_closingFenceIndentedTooMuch", + "[variable-2 - list]", + " [variable-2&comment ```]", + " [comment foo]", + " [comment ```]", + " [comment baz]"); + + MT("fencedCodeBlockModeSwitching", + "[comment ```javascript]", + "[variable foo]", + "", + "[comment ```]", + "bar"); + + MT_noFencedHighlight("fencedCodeBlock_noHighlight", + "[comment ```javascript]", + "[comment foo]", + "[comment ```]"); + + MT("fencedCodeBlockModeSwitchingObjc", + "[comment ```objective-c]", + "[keyword @property] [variable NSString] [operator *] [variable foo];", + "[comment ```]", + "bar"); + + MT("fencedCodeBlocksMultipleChars", + "[comment `````]", + "[comment foo]", + "[comment ```]", + "[comment foo]", + "[comment `````]", + "bar"); + + MT("fencedCodeBlocksTildes", + "[comment ~~~]", + "[comment foo]", + "[comment ~~~]", + "bar"); + + MT("fencedCodeBlocksTildesMultipleChars", + "[comment ~~~~~]", + "[comment ~~~]", + "[comment foo]", + "[comment ~~~~~]", + "bar"); + + MT("fencedCodeBlocksMultipleChars", + "[comment `````]", + "[comment foo]", + "[comment ```]", + "[comment foo]", + "[comment `````]", + "bar"); + + MT("fencedCodeBlocksMixed", + "[comment ~~~]", + "[comment ```]", + "[comment foo]", + "[comment ~~~]", + "bar"); + + MT("fencedCodeBlocksAfterBlockquote", + "[quote"e-1 > foo]", + "[comment ```]", + "[comment bar]", + "[comment ```]"); + + // fencedCode indented too much should act as simple indentedCode + // (hence has no highlight formatting) + FT("tooMuchIndentedFencedCode", + " [comment ```]", + " [comment code]", + " [comment ```]"); + + MT("autoTerminateFencedCodeWhenLeavingList", + "[variable-2 - list1]", + " [variable-3 - list2]", + " [variable-3&comment ```]", + " [comment code]", + " [variable-3 - list2]", + " [variable-2&comment ```]", + " [comment code]", + "[quote"e-1 > foo]"); + + // Tests that require XML mode + + MT("xmlMode", + "[tag&bracket <][tag div][tag&bracket >]", + " *foo*", + " [tag&bracket <][tag http://github.com][tag&bracket />]", + "[tag&bracket ]", + "[link ]"); + + MT("xmlModeWithMarkdownInside", + "[tag&bracket <][tag div] [attribute markdown]=[string 1][tag&bracket >]", + "[em *foo*]", + "[link ]", + "[tag ]", + "[link ]", + "[tag&bracket <][tag div][tag&bracket >]", + "[tag&bracket ]"); + + MT("xmlModeLineBreakInTags", + "[tag&bracket <][tag div] [attribute id]=[string \"1\"]", + " [attribute class]=[string \"sth\"][tag&bracket >]xxx", + "[tag&bracket ]"); + + MT("xmlModeCommentWithBlankLine", + "[comment ]"); + + MT("xmlModeCDATA", + "[atom ]"); + + MT("xmlModePreprocessor", + "[meta ]"); + + MT_noXml("xmlHighlightDisabled", + "
foo
"); + + // Tests Emojis + + ET("emojiDefault", + "[builtin :foobar:]"); + + ET("emojiTable", + " :--:"); +})(); diff --git a/js/codemirror/mode/mathematica/index.html b/js/codemirror/mode/mathematica/index.html new file mode 100644 index 0000000..ac6eeb4 --- /dev/null +++ b/js/codemirror/mode/mathematica/index.html @@ -0,0 +1,72 @@ + + +CodeMirror: Mathematica mode + + + + + + + + + + +
+

Mathematica mode

+ + + + + + +

MIME types defined: text/x-mathematica (Mathematica).

+
diff --git a/js/codemirror/mode/mathematica/mathematica.js b/js/codemirror/mode/mathematica/mathematica.js new file mode 100644 index 0000000..a8c5f78 --- /dev/null +++ b/js/codemirror/mode/mathematica/mathematica.js @@ -0,0 +1,176 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Mathematica mode copyright (c) 2015 by Calin Barbat +// Based on code by Patrick Scheibe (halirutan) +// See: https://github.com/halirutan/Mathematica-Source-Highlighting/tree/master/src/lang-mma.js + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('mathematica', function(_config, _parserConfig) { + + // used pattern building blocks + var Identifier = '[a-zA-Z\\$][a-zA-Z0-9\\$]*'; + var pBase = "(?:\\d+)"; + var pFloat = "(?:\\.\\d+|\\d+\\.\\d*|\\d+)"; + var pFloatBase = "(?:\\.\\w+|\\w+\\.\\w*|\\w+)"; + var pPrecision = "(?:`(?:`?"+pFloat+")?)"; + + // regular expressions + var reBaseForm = new RegExp('(?:'+pBase+'(?:\\^\\^'+pFloatBase+pPrecision+'?(?:\\*\\^[+-]?\\d+)?))'); + var reFloatForm = new RegExp('(?:' + pFloat + pPrecision + '?(?:\\*\\^[+-]?\\d+)?)'); + var reIdInContext = new RegExp('(?:`?)(?:' + Identifier + ')(?:`(?:' + Identifier + '))*(?:`?)'); + + function tokenBase(stream, state) { + var ch; + + // get next character + ch = stream.next(); + + // string + if (ch === '"') { + state.tokenize = tokenString; + return state.tokenize(stream, state); + } + + // comment + if (ch === '(') { + if (stream.eat('*')) { + state.commentLevel++; + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } + } + + // go back one character + stream.backUp(1); + + // look for numbers + // Numbers in a baseform + if (stream.match(reBaseForm, true, false)) { + return 'number'; + } + + // Mathematica numbers. Floats (1.2, .2, 1.) can have optionally a precision (`float) or an accuracy definition + // (``float). Note: while 1.2` is possible 1.2`` is not. At the end an exponent (float*^+12) can follow. + if (stream.match(reFloatForm, true, false)) { + return 'number'; + } + + /* In[23] and Out[34] */ + if (stream.match(/(?:In|Out)\[[0-9]*\]/, true, false)) { + return 'atom'; + } + + // usage + if (stream.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::usage)/, true, false)) { + return 'meta'; + } + + // message + if (stream.match(/([a-zA-Z\$][a-zA-Z0-9\$]*(?:`[a-zA-Z0-9\$]+)*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/, true, false)) { + return 'string-2'; + } + + // this makes a look-ahead match for something like variable:{_Integer} + // the match is then forwarded to the mma-patterns tokenizer. + if (stream.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/, true, false)) { + return 'variable-2'; + } + + // catch variables which are used together with Blank (_), BlankSequence (__) or BlankNullSequence (___) + // Cannot start with a number, but can have numbers at any other position. Examples + // blub__Integer, a1_, b34_Integer32 + if (stream.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/, true, false)) { + return 'variable-2'; + } + if (stream.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/, true, false)) { + return 'variable-2'; + } + if (stream.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/, true, false)) { + return 'variable-2'; + } + + // Named characters in Mathematica, like \[Gamma]. + if (stream.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/, true, false)) { + return 'variable-3'; + } + + // Match all braces separately + if (stream.match(/(?:\[|\]|{|}|\(|\))/, true, false)) { + return 'bracket'; + } + + // Catch Slots (#, ##, #3, ##9 and the V10 named slots #name). I have never seen someone using more than one digit after #, so we match + // only one. + if (stream.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/, true, false)) { + return 'variable-2'; + } + + // Literals like variables, keywords, functions + if (stream.match(reIdInContext, true, false)) { + return 'keyword'; + } + + // operators. Note that operators like @@ or /; are matched separately for each symbol. + if (stream.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/, true, false)) { + return 'operator'; + } + + // everything else is an error + stream.next(); // advance the stream. + return 'error'; + } + + function tokenString(stream, state) { + var next, end = false, escaped = false; + while ((next = stream.next()) != null) { + if (next === '"' && !escaped) { + end = true; + break; + } + escaped = !escaped && next === '\\'; + } + if (end && !escaped) { + state.tokenize = tokenBase; + } + return 'string'; + }; + + function tokenComment(stream, state) { + var prev, next; + while(state.commentLevel > 0 && (next = stream.next()) != null) { + if (prev === '(' && next === '*') state.commentLevel++; + if (prev === '*' && next === ')') state.commentLevel--; + prev = next; + } + if (state.commentLevel <= 0) { + state.tokenize = tokenBase; + } + return 'comment'; + } + + return { + startState: function() {return {tokenize: tokenBase, commentLevel: 0};}, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + blockCommentStart: "(*", + blockCommentEnd: "*)" + }; +}); + +CodeMirror.defineMIME('text/x-mathematica', { + name: 'mathematica' +}); + +}); diff --git a/js/codemirror/mode/mbox/index.html b/js/codemirror/mode/mbox/index.html new file mode 100644 index 0000000..95bba18 --- /dev/null +++ b/js/codemirror/mode/mbox/index.html @@ -0,0 +1,44 @@ + + +CodeMirror: mbox mode + + + + + + + + + +
+

mbox mode

+
+ + +

MIME types defined: application/mbox.

+ +
diff --git a/js/codemirror/mode/mbox/mbox.js b/js/codemirror/mode/mbox/mbox.js new file mode 100644 index 0000000..d668f51 --- /dev/null +++ b/js/codemirror/mode/mbox/mbox.js @@ -0,0 +1,129 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +var rfc2822 = [ + "From", "Sender", "Reply-To", "To", "Cc", "Bcc", "Message-ID", + "In-Reply-To", "References", "Resent-From", "Resent-Sender", "Resent-To", + "Resent-Cc", "Resent-Bcc", "Resent-Message-ID", "Return-Path", "Received" +]; +var rfc2822NoEmail = [ + "Date", "Subject", "Comments", "Keywords", "Resent-Date" +]; + +CodeMirror.registerHelper("hintWords", "mbox", rfc2822.concat(rfc2822NoEmail)); + +var whitespace = /^[ \t]/; +var separator = /^From /; // See RFC 4155 +var rfc2822Header = new RegExp("^(" + rfc2822.join("|") + "): "); +var rfc2822HeaderNoEmail = new RegExp("^(" + rfc2822NoEmail.join("|") + "): "); +var header = /^[^:]+:/; // Optional fields defined in RFC 2822 +var email = /^[^ ]+@[^ ]+/; +var untilEmail = /^.*?(?=[^ ]+?@[^ ]+)/; +var bracketedEmail = /^<.*?>/; +var untilBracketedEmail = /^.*?(?=<.*>)/; + +function styleForHeader(header) { + if (header === "Subject") return "header"; + return "string"; +} + +function readToken(stream, state) { + if (stream.sol()) { + // From last line + state.inSeparator = false; + if (state.inHeader && stream.match(whitespace)) { + // Header folding + return null; + } else { + state.inHeader = false; + state.header = null; + } + + if (stream.match(separator)) { + state.inHeaders = true; + state.inSeparator = true; + return "atom"; + } + + var match; + var emailPermitted = false; + if ((match = stream.match(rfc2822HeaderNoEmail)) || + (emailPermitted = true) && (match = stream.match(rfc2822Header))) { + state.inHeaders = true; + state.inHeader = true; + state.emailPermitted = emailPermitted; + state.header = match[1]; + return "atom"; + } + + // Use vim's heuristics: recognize custom headers only if the line is in a + // block of legitimate headers. + if (state.inHeaders && (match = stream.match(header))) { + state.inHeader = true; + state.emailPermitted = true; + state.header = match[1]; + return "atom"; + } + + state.inHeaders = false; + stream.skipToEnd(); + return null; + } + + if (state.inSeparator) { + if (stream.match(email)) return "link"; + if (stream.match(untilEmail)) return "atom"; + stream.skipToEnd(); + return "atom"; + } + + if (state.inHeader) { + var style = styleForHeader(state.header); + + if (state.emailPermitted) { + if (stream.match(bracketedEmail)) return style + " link"; + if (stream.match(untilBracketedEmail)) return style; + } + stream.skipToEnd(); + return style; + } + + stream.skipToEnd(); + return null; +}; + +CodeMirror.defineMode("mbox", function() { + return { + startState: function() { + return { + // Is in a mbox separator + inSeparator: false, + // Is in a mail header + inHeader: false, + // If bracketed email is permitted. Only applicable when inHeader + emailPermitted: false, + // Name of current header + header: null, + // Is in a region of mail headers + inHeaders: false + }; + }, + token: readToken, + blankLine: function(state) { + state.inHeaders = state.inSeparator = state.inHeader = false; + } + }; +}); + +CodeMirror.defineMIME("application/mbox", "mbox"); +}); diff --git a/js/codemirror/mode/meta.js b/js/codemirror/mode/meta.js new file mode 100644 index 0000000..2d52ba6 --- /dev/null +++ b/js/codemirror/mode/meta.js @@ -0,0 +1,221 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.modeInfo = [ + {name: "APL", mime: "text/apl", mode: "apl", ext: ["dyalog", "apl"]}, + {name: "PGP", mimes: ["application/pgp", "application/pgp-encrypted", "application/pgp-keys", "application/pgp-signature"], mode: "asciiarmor", ext: ["asc", "pgp", "sig"]}, + {name: "ASN.1", mime: "text/x-ttcn-asn", mode: "asn.1", ext: ["asn", "asn1"]}, + {name: "Asterisk", mime: "text/x-asterisk", mode: "asterisk", file: /^extensions\.conf$/i}, + {name: "Brainfuck", mime: "text/x-brainfuck", mode: "brainfuck", ext: ["b", "bf"]}, + {name: "C", mime: "text/x-csrc", mode: "clike", ext: ["c", "h", "ino"]}, + {name: "C++", mime: "text/x-c++src", mode: "clike", ext: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"], alias: ["cpp"]}, + {name: "Cobol", mime: "text/x-cobol", mode: "cobol", ext: ["cob", "cpy", "cbl"]}, + {name: "C#", mime: "text/x-csharp", mode: "clike", ext: ["cs"], alias: ["csharp", "cs"]}, + {name: "Clojure", mime: "text/x-clojure", mode: "clojure", ext: ["clj", "cljc", "cljx"]}, + {name: "ClojureScript", mime: "text/x-clojurescript", mode: "clojure", ext: ["cljs"]}, + {name: "Closure Stylesheets (GSS)", mime: "text/x-gss", mode: "css", ext: ["gss"]}, + {name: "CMake", mime: "text/x-cmake", mode: "cmake", ext: ["cmake", "cmake.in"], file: /^CMakeLists\.txt$/}, + {name: "CoffeeScript", mimes: ["application/vnd.coffeescript", "text/coffeescript", "text/x-coffeescript"], mode: "coffeescript", ext: ["coffee"], alias: ["coffee", "coffee-script"]}, + {name: "Common Lisp", mime: "text/x-common-lisp", mode: "commonlisp", ext: ["cl", "lisp", "el"], alias: ["lisp"]}, + {name: "Cypher", mime: "application/x-cypher-query", mode: "cypher", ext: ["cyp", "cypher"]}, + {name: "Cython", mime: "text/x-cython", mode: "python", ext: ["pyx", "pxd", "pxi"]}, + {name: "Crystal", mime: "text/x-crystal", mode: "crystal", ext: ["cr"]}, + {name: "CSS", mime: "text/css", mode: "css", ext: ["css"]}, + {name: "CQL", mime: "text/x-cassandra", mode: "sql", ext: ["cql"]}, + {name: "D", mime: "text/x-d", mode: "d", ext: ["d"]}, + {name: "Dart", mimes: ["application/dart", "text/x-dart"], mode: "dart", ext: ["dart"]}, + {name: "diff", mime: "text/x-diff", mode: "diff", ext: ["diff", "patch"]}, + {name: "Django", mime: "text/x-django", mode: "django"}, + {name: "Dockerfile", mime: "text/x-dockerfile", mode: "dockerfile", file: /^Dockerfile$/}, + {name: "DTD", mime: "application/xml-dtd", mode: "dtd", ext: ["dtd"]}, + {name: "Dylan", mime: "text/x-dylan", mode: "dylan", ext: ["dylan", "dyl", "intr"]}, + {name: "EBNF", mime: "text/x-ebnf", mode: "ebnf"}, + {name: "ECL", mime: "text/x-ecl", mode: "ecl", ext: ["ecl"]}, + {name: "edn", mime: "application/edn", mode: "clojure", ext: ["edn"]}, + {name: "Eiffel", mime: "text/x-eiffel", mode: "eiffel", ext: ["e"]}, + {name: "Elm", mime: "text/x-elm", mode: "elm", ext: ["elm"]}, + {name: "Embedded JavaScript", mime: "application/x-ejs", mode: "htmlembedded", ext: ["ejs"]}, + {name: "Embedded Ruby", mime: "application/x-erb", mode: "htmlembedded", ext: ["erb"]}, + {name: "Erlang", mime: "text/x-erlang", mode: "erlang", ext: ["erl"]}, + {name: "Esper", mime: "text/x-esper", mode: "sql"}, + {name: "Factor", mime: "text/x-factor", mode: "factor", ext: ["factor"]}, + {name: "FCL", mime: "text/x-fcl", mode: "fcl"}, + {name: "Forth", mime: "text/x-forth", mode: "forth", ext: ["forth", "fth", "4th"]}, + {name: "Fortran", mime: "text/x-fortran", mode: "fortran", ext: ["f", "for", "f77", "f90", "f95"]}, + {name: "F#", mime: "text/x-fsharp", mode: "mllike", ext: ["fs"], alias: ["fsharp"]}, + {name: "Gas", mime: "text/x-gas", mode: "gas", ext: ["s"]}, + {name: "Gherkin", mime: "text/x-feature", mode: "gherkin", ext: ["feature"]}, + {name: "GitHub Flavored Markdown", mime: "text/x-gfm", mode: "gfm", file: /^(readme|contributing|history)\.md$/i}, + {name: "Go", mime: "text/x-go", mode: "go", ext: ["go"]}, + {name: "Groovy", mime: "text/x-groovy", mode: "groovy", ext: ["groovy", "gradle"], file: /^Jenkinsfile$/}, + {name: "HAML", mime: "text/x-haml", mode: "haml", ext: ["haml"]}, + {name: "Haskell", mime: "text/x-haskell", mode: "haskell", ext: ["hs"]}, + {name: "Haskell (Literate)", mime: "text/x-literate-haskell", mode: "haskell-literate", ext: ["lhs"]}, + {name: "Haxe", mime: "text/x-haxe", mode: "haxe", ext: ["hx"]}, + {name: "HXML", mime: "text/x-hxml", mode: "haxe", ext: ["hxml"]}, + {name: "ASP.NET", mime: "application/x-aspx", mode: "htmlembedded", ext: ["aspx"], alias: ["asp", "aspx"]}, + {name: "HTML", mime: "text/html", mode: "htmlmixed", ext: ["html", "htm", "handlebars", "hbs"], alias: ["xhtml"]}, + {name: "HTTP", mime: "message/http", mode: "http"}, + {name: "IDL", mime: "text/x-idl", mode: "idl", ext: ["pro"]}, + {name: "Pug", mime: "text/x-pug", mode: "pug", ext: ["jade", "pug"], alias: ["jade"]}, + {name: "Java", mime: "text/x-java", mode: "clike", ext: ["java"]}, + {name: "Java Server Pages", mime: "application/x-jsp", mode: "htmlembedded", ext: ["jsp"], alias: ["jsp"]}, + {name: "JavaScript", mimes: ["text/javascript", "text/ecmascript", "application/javascript", "application/x-javascript", "application/ecmascript"], + mode: "javascript", ext: ["js"], alias: ["ecmascript", "js", "node"]}, + {name: "JSON", mimes: ["application/json", "application/x-json"], mode: "javascript", ext: ["json", "map"], alias: ["json5"]}, + {name: "JSON-LD", mime: "application/ld+json", mode: "javascript", ext: ["jsonld"], alias: ["jsonld"]}, + {name: "JSX", mime: "text/jsx", mode: "jsx", ext: ["jsx"]}, + {name: "Jinja2", mime: "text/jinja2", mode: "jinja2", ext: ["j2", "jinja", "jinja2"]}, + {name: "Julia", mime: "text/x-julia", mode: "julia", ext: ["jl"], alias: ["jl"]}, + {name: "Kotlin", mime: "text/x-kotlin", mode: "clike", ext: ["kt"]}, + {name: "LESS", mime: "text/x-less", mode: "css", ext: ["less"]}, + {name: "LiveScript", mime: "text/x-livescript", mode: "livescript", ext: ["ls"], alias: ["ls"]}, + {name: "Lua", mime: "text/x-lua", mode: "lua", ext: ["lua"]}, + {name: "Markdown", mime: "text/x-markdown", mode: "markdown", ext: ["markdown", "md", "mkd"]}, + {name: "mIRC", mime: "text/mirc", mode: "mirc"}, + {name: "MariaDB SQL", mime: "text/x-mariadb", mode: "sql"}, + {name: "Mathematica", mime: "text/x-mathematica", mode: "mathematica", ext: ["m", "nb", "wl", "wls"]}, + {name: "Modelica", mime: "text/x-modelica", mode: "modelica", ext: ["mo"]}, + {name: "MUMPS", mime: "text/x-mumps", mode: "mumps", ext: ["mps"]}, + {name: "MS SQL", mime: "text/x-mssql", mode: "sql"}, + {name: "mbox", mime: "application/mbox", mode: "mbox", ext: ["mbox"]}, + {name: "MySQL", mime: "text/x-mysql", mode: "sql"}, + {name: "Nginx", mime: "text/x-nginx-conf", mode: "nginx", file: /nginx.*\.conf$/i}, + {name: "NSIS", mime: "text/x-nsis", mode: "nsis", ext: ["nsh", "nsi"]}, + {name: "NTriples", mimes: ["application/n-triples", "application/n-quads", "text/n-triples"], + mode: "ntriples", ext: ["nt", "nq"]}, + {name: "Objective-C", mime: "text/x-objectivec", mode: "clike", ext: ["m"], alias: ["objective-c", "objc"]}, + {name: "Objective-C++", mime: "text/x-objectivec++", mode: "clike", ext: ["mm"], alias: ["objective-c++", "objc++"]}, + {name: "OCaml", mime: "text/x-ocaml", mode: "mllike", ext: ["ml", "mli", "mll", "mly"]}, + {name: "Octave", mime: "text/x-octave", mode: "octave", ext: ["m"]}, + {name: "Oz", mime: "text/x-oz", mode: "oz", ext: ["oz"]}, + {name: "Pascal", mime: "text/x-pascal", mode: "pascal", ext: ["p", "pas"]}, + {name: "PEG.js", mime: "null", mode: "pegjs", ext: ["jsonld"]}, + {name: "Perl", mime: "text/x-perl", mode: "perl", ext: ["pl", "pm"]}, + {name: "PHP", mimes: ["text/x-php", "application/x-httpd-php", "application/x-httpd-php-open"], mode: "php", ext: ["php", "php3", "php4", "php5", "php7", "phtml"]}, + {name: "Pig", mime: "text/x-pig", mode: "pig", ext: ["pig"]}, + {name: "Plain Text", mime: "text/plain", mode: "null", ext: ["txt", "text", "conf", "def", "list", "log"]}, + {name: "PLSQL", mime: "text/x-plsql", mode: "sql", ext: ["pls"]}, + {name: "PostgreSQL", mime: "text/x-pgsql", mode: "sql"}, + {name: "PowerShell", mime: "application/x-powershell", mode: "powershell", ext: ["ps1", "psd1", "psm1"]}, + {name: "Properties files", mime: "text/x-properties", mode: "properties", ext: ["properties", "ini", "in"], alias: ["ini", "properties"]}, + {name: "ProtoBuf", mime: "text/x-protobuf", mode: "protobuf", ext: ["proto"]}, + {name: "Python", mime: "text/x-python", mode: "python", ext: ["BUILD", "bzl", "py", "pyw"], file: /^(BUCK|BUILD)$/}, + {name: "Puppet", mime: "text/x-puppet", mode: "puppet", ext: ["pp"]}, + {name: "Q", mime: "text/x-q", mode: "q", ext: ["q"]}, + {name: "R", mime: "text/x-rsrc", mode: "r", ext: ["r", "R"], alias: ["rscript"]}, + {name: "reStructuredText", mime: "text/x-rst", mode: "rst", ext: ["rst"], alias: ["rst"]}, + {name: "RPM Changes", mime: "text/x-rpm-changes", mode: "rpm"}, + {name: "RPM Spec", mime: "text/x-rpm-spec", mode: "rpm", ext: ["spec"]}, + {name: "Ruby", mime: "text/x-ruby", mode: "ruby", ext: ["rb"], alias: ["jruby", "macruby", "rake", "rb", "rbx"]}, + {name: "Rust", mime: "text/x-rustsrc", mode: "rust", ext: ["rs"]}, + {name: "SAS", mime: "text/x-sas", mode: "sas", ext: ["sas"]}, + {name: "Sass", mime: "text/x-sass", mode: "sass", ext: ["sass"]}, + {name: "Scala", mime: "text/x-scala", mode: "clike", ext: ["scala"]}, + {name: "Scheme", mime: "text/x-scheme", mode: "scheme", ext: ["scm", "ss"]}, + {name: "SCSS", mime: "text/x-scss", mode: "css", ext: ["scss"]}, + {name: "Shell", mimes: ["text/x-sh", "application/x-sh"], mode: "shell", ext: ["sh", "ksh", "bash"], alias: ["bash", "sh", "zsh"], file: /^PKGBUILD$/}, + {name: "Sieve", mime: "application/sieve", mode: "sieve", ext: ["siv", "sieve"]}, + {name: "Slim", mimes: ["text/x-slim", "application/x-slim"], mode: "slim", ext: ["slim"]}, + {name: "Smalltalk", mime: "text/x-stsrc", mode: "smalltalk", ext: ["st"]}, + {name: "Smarty", mime: "text/x-smarty", mode: "smarty", ext: ["tpl"]}, + {name: "Solr", mime: "text/x-solr", mode: "solr"}, + {name: "SML", mime: "text/x-sml", mode: "mllike", ext: ["sml", "sig", "fun", "smackspec"]}, + {name: "Soy", mime: "text/x-soy", mode: "soy", ext: ["soy"], alias: ["closure template"]}, + {name: "SPARQL", mime: "application/sparql-query", mode: "sparql", ext: ["rq", "sparql"], alias: ["sparul"]}, + {name: "Spreadsheet", mime: "text/x-spreadsheet", mode: "spreadsheet", alias: ["excel", "formula"]}, + {name: "SQL", mime: "text/x-sql", mode: "sql", ext: ["sql"]}, + {name: "SQLite", mime: "text/x-sqlite", mode: "sql"}, + {name: "Squirrel", mime: "text/x-squirrel", mode: "clike", ext: ["nut"]}, + {name: "Stylus", mime: "text/x-styl", mode: "stylus", ext: ["styl"]}, + {name: "Swift", mime: "text/x-swift", mode: "swift", ext: ["swift"]}, + {name: "sTeX", mime: "text/x-stex", mode: "stex"}, + {name: "LaTeX", mime: "text/x-latex", mode: "stex", ext: ["text", "ltx", "tex"], alias: ["tex"]}, + {name: "SystemVerilog", mime: "text/x-systemverilog", mode: "verilog", ext: ["v", "sv", "svh"]}, + {name: "Tcl", mime: "text/x-tcl", mode: "tcl", ext: ["tcl"]}, + {name: "Textile", mime: "text/x-textile", mode: "textile", ext: ["textile"]}, + {name: "TiddlyWiki", mime: "text/x-tiddlywiki", mode: "tiddlywiki"}, + {name: "Tiki wiki", mime: "text/tiki", mode: "tiki"}, + {name: "TOML", mime: "text/x-toml", mode: "toml", ext: ["toml"]}, + {name: "Tornado", mime: "text/x-tornado", mode: "tornado"}, + {name: "troff", mime: "text/troff", mode: "troff", ext: ["1", "2", "3", "4", "5", "6", "7", "8", "9"]}, + {name: "TTCN", mime: "text/x-ttcn", mode: "ttcn", ext: ["ttcn", "ttcn3", "ttcnpp"]}, + {name: "TTCN_CFG", mime: "text/x-ttcn-cfg", mode: "ttcn-cfg", ext: ["cfg"]}, + {name: "Turtle", mime: "text/turtle", mode: "turtle", ext: ["ttl"]}, + {name: "TypeScript", mime: "application/typescript", mode: "javascript", ext: ["ts"], alias: ["ts"]}, + {name: "TypeScript-JSX", mime: "text/typescript-jsx", mode: "jsx", ext: ["tsx"], alias: ["tsx"]}, + {name: "Twig", mime: "text/x-twig", mode: "twig"}, + {name: "Web IDL", mime: "text/x-webidl", mode: "webidl", ext: ["webidl"]}, + {name: "VB.NET", mime: "text/x-vb", mode: "vb", ext: ["vb"]}, + {name: "VBScript", mime: "text/vbscript", mode: "vbscript", ext: ["vbs"]}, + {name: "Velocity", mime: "text/velocity", mode: "velocity", ext: ["vtl"]}, + {name: "Verilog", mime: "text/x-verilog", mode: "verilog", ext: ["v"]}, + {name: "VHDL", mime: "text/x-vhdl", mode: "vhdl", ext: ["vhd", "vhdl"]}, + {name: "Vue.js Component", mimes: ["script/x-vue", "text/x-vue"], mode: "vue", ext: ["vue"]}, + {name: "XML", mimes: ["application/xml", "text/xml"], mode: "xml", ext: ["xml", "xsl", "xsd", "svg"], alias: ["rss", "wsdl", "xsd"]}, + {name: "XQuery", mime: "application/xquery", mode: "xquery", ext: ["xy", "xquery"]}, + {name: "Yacas", mime: "text/x-yacas", mode: "yacas", ext: ["ys"]}, + {name: "YAML", mimes: ["text/x-yaml", "text/yaml"], mode: "yaml", ext: ["yaml", "yml"], alias: ["yml"]}, + {name: "Z80", mime: "text/x-z80", mode: "z80", ext: ["z80"]}, + {name: "mscgen", mime: "text/x-mscgen", mode: "mscgen", ext: ["mscgen", "mscin", "msc"]}, + {name: "xu", mime: "text/x-xu", mode: "mscgen", ext: ["xu"]}, + {name: "msgenny", mime: "text/x-msgenny", mode: "mscgen", ext: ["msgenny"]}, + {name: "WebAssembly", mime: "text/webassembly", mode: "wast", ext: ["wat", "wast"]}, + ]; + // Ensure all modes have a mime property for backwards compatibility + for (var i = 0; i < CodeMirror.modeInfo.length; i++) { + var info = CodeMirror.modeInfo[i]; + if (info.mimes) info.mime = info.mimes[0]; + } + + CodeMirror.findModeByMIME = function(mime) { + mime = mime.toLowerCase(); + for (var i = 0; i < CodeMirror.modeInfo.length; i++) { + var info = CodeMirror.modeInfo[i]; + if (info.mime == mime) return info; + if (info.mimes) for (var j = 0; j < info.mimes.length; j++) + if (info.mimes[j] == mime) return info; + } + if (/\+xml$/.test(mime)) return CodeMirror.findModeByMIME("application/xml") + if (/\+json$/.test(mime)) return CodeMirror.findModeByMIME("application/json") + }; + + CodeMirror.findModeByExtension = function(ext) { + ext = ext.toLowerCase(); + for (var i = 0; i < CodeMirror.modeInfo.length; i++) { + var info = CodeMirror.modeInfo[i]; + if (info.ext) for (var j = 0; j < info.ext.length; j++) + if (info.ext[j] == ext) return info; + } + }; + + CodeMirror.findModeByFileName = function(filename) { + for (var i = 0; i < CodeMirror.modeInfo.length; i++) { + var info = CodeMirror.modeInfo[i]; + if (info.file && info.file.test(filename)) return info; + } + var dot = filename.lastIndexOf("."); + var ext = dot > -1 && filename.substring(dot + 1, filename.length); + if (ext) return CodeMirror.findModeByExtension(ext); + }; + + CodeMirror.findModeByName = function(name) { + name = name.toLowerCase(); + for (var i = 0; i < CodeMirror.modeInfo.length; i++) { + var info = CodeMirror.modeInfo[i]; + if (info.name.toLowerCase() == name) return info; + if (info.alias) for (var j = 0; j < info.alias.length; j++) + if (info.alias[j].toLowerCase() == name) return info; + } + }; +}); diff --git a/js/codemirror/mode/mirc/index.html b/js/codemirror/mode/mirc/index.html new file mode 100644 index 0000000..6daa07c --- /dev/null +++ b/js/codemirror/mode/mirc/index.html @@ -0,0 +1,161 @@ + + +CodeMirror: mIRC mode + + + + + + + + + + + +
+

mIRC mode

+
+ + +

MIME types defined: text/mirc.

+ +
diff --git a/js/codemirror/mode/mirc/mirc.js b/js/codemirror/mode/mirc/mirc.js new file mode 100644 index 0000000..c620808 --- /dev/null +++ b/js/codemirror/mode/mirc/mirc.js @@ -0,0 +1,193 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMIME("text/mirc", "mirc"); +CodeMirror.defineMode("mirc", function() { + function parseWords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " + + "$activewid $address $addtok $agent $agentname $agentstat $agentver " + + "$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " + + "$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " + + "$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " + + "$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " + + "$com $comcall $comchan $comerr $compact $compress $comval $cos $count " + + "$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " + + "$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " + + "$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " + + "$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " + + "$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " + + "$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " + + "$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " + + "$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " + + "$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " + + "$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " + + "$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " + + "$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " + + "$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " + + "$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " + + "$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " + + "$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " + + "$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " + + "$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " + + "$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " + + "$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " + + "$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " + + "$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " + + "$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " + + "$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " + + "$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " + + "$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " + + "$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " + + "$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " + + "$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"); + var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " + + "away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " + + "channel clear clearall cline clipboard close cnick color comclose comopen " + + "comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " + + "debug dec describe dialog did didtok disable disconnect dlevel dline dll " + + "dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " + + "drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " + + "events exit fclose filter findtext finger firewall flash flist flood flush " + + "flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " + + "gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " + + "halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " + + "ialmark identd if ignore iline inc invite iuser join kick linesep links list " + + "load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " + + "notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " + + "qme qmsg query queryn quit raw reload remini remote remove rename renwin " + + "reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " + + "say scid scon server set showmirc signam sline sockaccept sockclose socklist " + + "socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " + + "sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " + + "toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " + + "var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " + + "isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " + + "isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " + + "elseif else goto menu nicklist status title icon size option text edit " + + "button check radio box scroll list combo link tab item"); + var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch"); + var isOperatorChar = /[+\-*&%=<>!?^\/\|]/; + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + function tokenBase(stream, state) { + var beforeParams = state.beforeParams; + state.beforeParams = false; + var ch = stream.next(); + if (/[\[\]{}\(\),\.]/.test(ch)) { + if (ch == "(" && beforeParams) state.inParams = true; + else if (ch == ")") state.inParams = false; + return null; + } + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + else if (ch == "\\") { + stream.eat("\\"); + stream.eat(/./); + return "number"; + } + else if (ch == "/" && stream.eat("*")) { + return chain(stream, state, tokenComment); + } + else if (ch == ";" && stream.match(/ *\( *\(/)) { + return chain(stream, state, tokenUnparsed); + } + else if (ch == ";" && !state.inParams) { + stream.skipToEnd(); + return "comment"; + } + else if (ch == '"') { + stream.eat(/"/); + return "keyword"; + } + else if (ch == "$") { + stream.eatWhile(/[$_a-z0-9A-Z\.:]/); + if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) { + return "keyword"; + } + else { + state.beforeParams = true; + return "builtin"; + } + } + else if (ch == "%") { + stream.eatWhile(/[^,\s()]/); + state.beforeParams = true; + return "string"; + } + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + else { + stream.eatWhile(/[\w\$_{}]/); + var word = stream.current().toLowerCase(); + if (keywords && keywords.propertyIsEnumerable(word)) + return "keyword"; + if (functions && functions.propertyIsEnumerable(word)) { + state.beforeParams = true; + return "keyword"; + } + return null; + } + } + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + function tokenUnparsed(stream, state) { + var maybeEnd = 0, ch; + while (ch = stream.next()) { + if (ch == ";" && maybeEnd == 2) { + state.tokenize = tokenBase; + break; + } + if (ch == ")") + maybeEnd++; + else if (ch != " ") + maybeEnd = 0; + } + return "meta"; + } + return { + startState: function() { + return { + tokenize: tokenBase, + beforeParams: false, + inParams: false + }; + }, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + } + }; +}); + +}); diff --git a/js/codemirror/mode/mllike/index.html b/js/codemirror/mode/mllike/index.html new file mode 100644 index 0000000..6f05c13 --- /dev/null +++ b/js/codemirror/mode/mllike/index.html @@ -0,0 +1,198 @@ + + +CodeMirror: ML-like mode + + + + + + + + + + +
+

OCaml mode

+ + + + +

F# mode

+ + + + + +

MIME types defined: text/x-ocaml (OCaml) and text/x-fsharp (F#).

+
diff --git a/js/codemirror/mode/mllike/mllike.js b/js/codemirror/mode/mllike/mllike.js new file mode 100644 index 0000000..a21a555 --- /dev/null +++ b/js/codemirror/mode/mllike/mllike.js @@ -0,0 +1,359 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('mllike', function(_config, parserConfig) { + var words = { + 'as': 'keyword', + 'do': 'keyword', + 'else': 'keyword', + 'end': 'keyword', + 'exception': 'keyword', + 'fun': 'keyword', + 'functor': 'keyword', + 'if': 'keyword', + 'in': 'keyword', + 'include': 'keyword', + 'let': 'keyword', + 'of': 'keyword', + 'open': 'keyword', + 'rec': 'keyword', + 'struct': 'keyword', + 'then': 'keyword', + 'type': 'keyword', + 'val': 'keyword', + 'while': 'keyword', + 'with': 'keyword' + }; + + var extraWords = parserConfig.extraWords || {}; + for (var prop in extraWords) { + if (extraWords.hasOwnProperty(prop)) { + words[prop] = parserConfig.extraWords[prop]; + } + } + var hintWords = []; + for (var k in words) { hintWords.push(k); } + CodeMirror.registerHelper("hintWords", "mllike", hintWords); + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (ch === '"') { + state.tokenize = tokenString; + return state.tokenize(stream, state); + } + if (ch === '{') { + if (stream.eat('|')) { + state.longString = true; + state.tokenize = tokenLongString; + return state.tokenize(stream, state); + } + } + if (ch === '(') { + if (stream.match(/^\*(?!\))/)) { + state.commentLevel++; + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } + } + if (ch === '~' || ch === '?') { + stream.eatWhile(/\w/); + return 'variable-2'; + } + if (ch === '`') { + stream.eatWhile(/\w/); + return 'quote'; + } + if (ch === '/' && parserConfig.slashComments && stream.eat('/')) { + stream.skipToEnd(); + return 'comment'; + } + if (/\d/.test(ch)) { + if (ch === '0' && stream.eat(/[bB]/)) { + stream.eatWhile(/[01]/); + } if (ch === '0' && stream.eat(/[xX]/)) { + stream.eatWhile(/[0-9a-fA-F]/) + } if (ch === '0' && stream.eat(/[oO]/)) { + stream.eatWhile(/[0-7]/); + } else { + stream.eatWhile(/[\d_]/); + if (stream.eat('.')) { + stream.eatWhile(/[\d]/); + } + if (stream.eat(/[eE]/)) { + stream.eatWhile(/[\d\-+]/); + } + } + return 'number'; + } + if ( /[+\-*&%=<>!?|@\.~:]/.test(ch)) { + return 'operator'; + } + if (/[\w\xa1-\uffff]/.test(ch)) { + stream.eatWhile(/[\w\xa1-\uffff]/); + var cur = stream.current(); + return words.hasOwnProperty(cur) ? words[cur] : 'variable'; + } + return null + } + + function tokenString(stream, state) { + var next, end = false, escaped = false; + while ((next = stream.next()) != null) { + if (next === '"' && !escaped) { + end = true; + break; + } + escaped = !escaped && next === '\\'; + } + if (end && !escaped) { + state.tokenize = tokenBase; + } + return 'string'; + }; + + function tokenComment(stream, state) { + var prev, next; + while(state.commentLevel > 0 && (next = stream.next()) != null) { + if (prev === '(' && next === '*') state.commentLevel++; + if (prev === '*' && next === ')') state.commentLevel--; + prev = next; + } + if (state.commentLevel <= 0) { + state.tokenize = tokenBase; + } + return 'comment'; + } + + function tokenLongString(stream, state) { + var prev, next; + while (state.longString && (next = stream.next()) != null) { + if (prev === '|' && next === '}') state.longString = false; + prev = next; + } + if (!state.longString) { + state.tokenize = tokenBase; + } + return 'string'; + } + + return { + startState: function() {return {tokenize: tokenBase, commentLevel: 0, longString: false};}, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + + blockCommentStart: "(*", + blockCommentEnd: "*)", + lineComment: parserConfig.slashComments ? "//" : null + }; +}); + +CodeMirror.defineMIME('text/x-ocaml', { + name: 'mllike', + extraWords: { + 'and': 'keyword', + 'assert': 'keyword', + 'begin': 'keyword', + 'class': 'keyword', + 'constraint': 'keyword', + 'done': 'keyword', + 'downto': 'keyword', + 'external': 'keyword', + 'function': 'keyword', + 'initializer': 'keyword', + 'lazy': 'keyword', + 'match': 'keyword', + 'method': 'keyword', + 'module': 'keyword', + 'mutable': 'keyword', + 'new': 'keyword', + 'nonrec': 'keyword', + 'object': 'keyword', + 'private': 'keyword', + 'sig': 'keyword', + 'to': 'keyword', + 'try': 'keyword', + 'value': 'keyword', + 'virtual': 'keyword', + 'when': 'keyword', + + // builtins + 'raise': 'builtin', + 'failwith': 'builtin', + 'true': 'builtin', + 'false': 'builtin', + + // Pervasives builtins + 'asr': 'builtin', + 'land': 'builtin', + 'lor': 'builtin', + 'lsl': 'builtin', + 'lsr': 'builtin', + 'lxor': 'builtin', + 'mod': 'builtin', + 'or': 'builtin', + + // More Pervasives + 'raise_notrace': 'builtin', + 'trace': 'builtin', + 'exit': 'builtin', + 'print_string': 'builtin', + 'print_endline': 'builtin', + + 'int': 'type', + 'float': 'type', + 'bool': 'type', + 'char': 'type', + 'string': 'type', + 'unit': 'type', + + // Modules + 'List': 'builtin' + } +}); + +CodeMirror.defineMIME('text/x-fsharp', { + name: 'mllike', + extraWords: { + 'abstract': 'keyword', + 'assert': 'keyword', + 'base': 'keyword', + 'begin': 'keyword', + 'class': 'keyword', + 'default': 'keyword', + 'delegate': 'keyword', + 'do!': 'keyword', + 'done': 'keyword', + 'downcast': 'keyword', + 'downto': 'keyword', + 'elif': 'keyword', + 'extern': 'keyword', + 'finally': 'keyword', + 'for': 'keyword', + 'function': 'keyword', + 'global': 'keyword', + 'inherit': 'keyword', + 'inline': 'keyword', + 'interface': 'keyword', + 'internal': 'keyword', + 'lazy': 'keyword', + 'let!': 'keyword', + 'match': 'keyword', + 'member': 'keyword', + 'module': 'keyword', + 'mutable': 'keyword', + 'namespace': 'keyword', + 'new': 'keyword', + 'null': 'keyword', + 'override': 'keyword', + 'private': 'keyword', + 'public': 'keyword', + 'return!': 'keyword', + 'return': 'keyword', + 'select': 'keyword', + 'static': 'keyword', + 'to': 'keyword', + 'try': 'keyword', + 'upcast': 'keyword', + 'use!': 'keyword', + 'use': 'keyword', + 'void': 'keyword', + 'when': 'keyword', + 'yield!': 'keyword', + 'yield': 'keyword', + + // Reserved words + 'atomic': 'keyword', + 'break': 'keyword', + 'checked': 'keyword', + 'component': 'keyword', + 'const': 'keyword', + 'constraint': 'keyword', + 'constructor': 'keyword', + 'continue': 'keyword', + 'eager': 'keyword', + 'event': 'keyword', + 'external': 'keyword', + 'fixed': 'keyword', + 'method': 'keyword', + 'mixin': 'keyword', + 'object': 'keyword', + 'parallel': 'keyword', + 'process': 'keyword', + 'protected': 'keyword', + 'pure': 'keyword', + 'sealed': 'keyword', + 'tailcall': 'keyword', + 'trait': 'keyword', + 'virtual': 'keyword', + 'volatile': 'keyword', + + // builtins + 'List': 'builtin', + 'Seq': 'builtin', + 'Map': 'builtin', + 'Set': 'builtin', + 'Option': 'builtin', + 'int': 'builtin', + 'string': 'builtin', + 'not': 'builtin', + 'true': 'builtin', + 'false': 'builtin', + + 'raise': 'builtin', + 'failwith': 'builtin' + }, + slashComments: true +}); + + +CodeMirror.defineMIME('text/x-sml', { + name: 'mllike', + extraWords: { + 'abstype': 'keyword', + 'and': 'keyword', + 'andalso': 'keyword', + 'case': 'keyword', + 'datatype': 'keyword', + 'fn': 'keyword', + 'handle': 'keyword', + 'infix': 'keyword', + 'infixr': 'keyword', + 'local': 'keyword', + 'nonfix': 'keyword', + 'op': 'keyword', + 'orelse': 'keyword', + 'raise': 'keyword', + 'withtype': 'keyword', + 'eqtype': 'keyword', + 'sharing': 'keyword', + 'sig': 'keyword', + 'signature': 'keyword', + 'structure': 'keyword', + 'where': 'keyword', + 'true': 'keyword', + 'false': 'keyword', + + // types + 'int': 'builtin', + 'real': 'builtin', + 'string': 'builtin', + 'char': 'builtin', + 'bool': 'builtin' + }, + slashComments: true +}); + +}); diff --git a/js/codemirror/mode/modelica/index.html b/js/codemirror/mode/modelica/index.html new file mode 100644 index 0000000..aba7291 --- /dev/null +++ b/js/codemirror/mode/modelica/index.html @@ -0,0 +1,67 @@ + + +CodeMirror: Modelica mode + + + + + + + + + + + + +
+

Modelica mode

+ +
+ + + +

Simple mode that tries to handle Modelica as well as it can.

+ +

MIME types defined: text/x-modelica + (Modlica code).

+
diff --git a/js/codemirror/mode/modelica/modelica.js b/js/codemirror/mode/modelica/modelica.js new file mode 100644 index 0000000..57133b2 --- /dev/null +++ b/js/codemirror/mode/modelica/modelica.js @@ -0,0 +1,245 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Modelica support for CodeMirror, copyright (c) by Lennart Ochel + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +}) + +(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("modelica", function(config, parserConfig) { + + var indentUnit = config.indentUnit; + var keywords = parserConfig.keywords || {}; + var builtin = parserConfig.builtin || {}; + var atoms = parserConfig.atoms || {}; + + var isSingleOperatorChar = /[;=\(:\),{}.*<>+\-\/^\[\]]/; + var isDoubleOperatorChar = /(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/; + var isDigit = /[0-9]/; + var isNonDigit = /[_a-zA-Z]/; + + function tokenLineComment(stream, state) { + stream.skipToEnd(); + state.tokenize = null; + return "comment"; + } + + function tokenBlockComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (maybeEnd && ch == "/") { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenString(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == '"' && !escaped) { + state.tokenize = null; + state.sol = false; + break; + } + escaped = !escaped && ch == "\\"; + } + + return "string"; + } + + function tokenIdent(stream, state) { + stream.eatWhile(isDigit); + while (stream.eat(isDigit) || stream.eat(isNonDigit)) { } + + + var cur = stream.current(); + + if(state.sol && (cur == "package" || cur == "model" || cur == "when" || cur == "connector")) state.level++; + else if(state.sol && cur == "end" && state.level > 0) state.level--; + + state.tokenize = null; + state.sol = false; + + if (keywords.propertyIsEnumerable(cur)) return "keyword"; + else if (builtin.propertyIsEnumerable(cur)) return "builtin"; + else if (atoms.propertyIsEnumerable(cur)) return "atom"; + else return "variable"; + } + + function tokenQIdent(stream, state) { + while (stream.eat(/[^']/)) { } + + state.tokenize = null; + state.sol = false; + + if(stream.eat("'")) + return "variable"; + else + return "error"; + } + + function tokenUnsignedNumber(stream, state) { + stream.eatWhile(isDigit); + if (stream.eat('.')) { + stream.eatWhile(isDigit); + } + if (stream.eat('e') || stream.eat('E')) { + if (!stream.eat('-')) + stream.eat('+'); + stream.eatWhile(isDigit); + } + + state.tokenize = null; + state.sol = false; + return "number"; + } + + // Interface + return { + startState: function() { + return { + tokenize: null, + level: 0, + sol: true + }; + }, + + token: function(stream, state) { + if(state.tokenize != null) { + return state.tokenize(stream, state); + } + + if(stream.sol()) { + state.sol = true; + } + + // WHITESPACE + if(stream.eatSpace()) { + state.tokenize = null; + return null; + } + + var ch = stream.next(); + + // LINECOMMENT + if(ch == '/' && stream.eat('/')) { + state.tokenize = tokenLineComment; + } + // BLOCKCOMMENT + else if(ch == '/' && stream.eat('*')) { + state.tokenize = tokenBlockComment; + } + // TWO SYMBOL TOKENS + else if(isDoubleOperatorChar.test(ch+stream.peek())) { + stream.next(); + state.tokenize = null; + return "operator"; + } + // SINGLE SYMBOL TOKENS + else if(isSingleOperatorChar.test(ch)) { + state.tokenize = null; + return "operator"; + } + // IDENT + else if(isNonDigit.test(ch)) { + state.tokenize = tokenIdent; + } + // Q-IDENT + else if(ch == "'" && stream.peek() && stream.peek() != "'") { + state.tokenize = tokenQIdent; + } + // STRING + else if(ch == '"') { + state.tokenize = tokenString; + } + // UNSIGNED_NUMBER + else if(isDigit.test(ch)) { + state.tokenize = tokenUnsignedNumber; + } + // ERROR + else { + state.tokenize = null; + return "error"; + } + + return state.tokenize(stream, state); + }, + + indent: function(state, textAfter) { + if (state.tokenize != null) return CodeMirror.Pass; + + var level = state.level; + if(/(algorithm)/.test(textAfter)) level--; + if(/(equation)/.test(textAfter)) level--; + if(/(initial algorithm)/.test(textAfter)) level--; + if(/(initial equation)/.test(textAfter)) level--; + if(/(end)/.test(textAfter)) level--; + + if(level > 0) + return indentUnit*level; + else + return 0; + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; + }); + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i=0; i + +CodeMirror: MscGen mode + + + + + + + + + +
+

MscGen mode

+ +
+ +

Xù mode

+ +
+ +

MsGenny mode

+
+ +

+ Simple mode for highlighting MscGen and two derived sequence + chart languages. +

+ + + +

MIME types defined: + text/x-mscgen + text/x-xu + text/x-msgenny +

+ +
diff --git a/js/codemirror/mode/mscgen/mscgen.js b/js/codemirror/mode/mscgen/mscgen.js new file mode 100644 index 0000000..654ed96 --- /dev/null +++ b/js/codemirror/mode/mscgen/mscgen.js @@ -0,0 +1,175 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// mode(s) for the sequence chart dsl's mscgen, xù and msgenny +// For more information on mscgen, see the site of the original author: +// http://www.mcternan.me.uk/mscgen +// +// This mode for mscgen and the two derivative languages were +// originally made for use in the mscgen_js interpreter +// (https://sverweij.github.io/mscgen_js) + +(function(mod) { + if ( typeof exports == "object" && typeof module == "object")// CommonJS + mod(require("../../lib/codemirror")); + else if ( typeof define == "function" && define.amd)// AMD + define(["../../lib/codemirror"], mod); + else// Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + var languages = { + mscgen: { + "keywords" : ["msc"], + "options" : ["hscale", "width", "arcgradient", "wordwraparcs"], + "constants" : ["true", "false", "on", "off"], + "attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip"], + "brackets" : ["\\{", "\\}"], // [ and ] are brackets too, but these get handled in with lists + "arcsWords" : ["note", "abox", "rbox", "box"], + "arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"], + "singlecomment" : ["//", "#"], + "operators" : ["="] + }, + xu: { + "keywords" : ["msc", "xu"], + "options" : ["hscale", "width", "arcgradient", "wordwraparcs", "wordwrapentities", "watermark"], + "constants" : ["true", "false", "on", "off", "auto"], + "attributes" : ["label", "idurl", "id", "url", "linecolor", "linecolour", "textcolor", "textcolour", "textbgcolor", "textbgcolour", "arclinecolor", "arclinecolour", "arctextcolor", "arctextcolour", "arctextbgcolor", "arctextbgcolour", "arcskip", "title", "deactivate", "activate", "activation"], + "brackets" : ["\\{", "\\}"], // [ and ] are brackets too, but these get handled in with lists + "arcsWords" : ["note", "abox", "rbox", "box", "alt", "else", "opt", "break", "par", "seq", "strict", "neg", "critical", "ignore", "consider", "assert", "loop", "ref", "exc"], + "arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"], + "singlecomment" : ["//", "#"], + "operators" : ["="] + }, + msgenny: { + "keywords" : null, + "options" : ["hscale", "width", "arcgradient", "wordwraparcs", "wordwrapentities", "watermark"], + "constants" : ["true", "false", "on", "off", "auto"], + "attributes" : null, + "brackets" : ["\\{", "\\}"], + "arcsWords" : ["note", "abox", "rbox", "box", "alt", "else", "opt", "break", "par", "seq", "strict", "neg", "critical", "ignore", "consider", "assert", "loop", "ref", "exc"], + "arcsOthers" : ["\\|\\|\\|", "\\.\\.\\.", "---", "--", "<->", "==", "<<=>>", "<=>", "\\.\\.", "<<>>", "::", "<:>", "->", "=>>", "=>", ">>", ":>", "<-", "<<=", "<=", "<<", "<:", "x-", "-x"], + "singlecomment" : ["//", "#"], + "operators" : ["="] + } + } + + CodeMirror.defineMode("mscgen", function(_, modeConfig) { + var language = languages[modeConfig && modeConfig.language || "mscgen"] + return { + startState: startStateFn, + copyState: copyStateFn, + token: produceTokenFunction(language), + lineComment : "#", + blockCommentStart : "/*", + blockCommentEnd : "*/" + }; + }); + + CodeMirror.defineMIME("text/x-mscgen", "mscgen"); + CodeMirror.defineMIME("text/x-xu", {name: "mscgen", language: "xu"}); + CodeMirror.defineMIME("text/x-msgenny", {name: "mscgen", language: "msgenny"}); + + function wordRegexpBoundary(pWords) { + return new RegExp("^\\b(?:" + pWords.join("|") + ")\\b", "i"); + } + + function wordRegexp(pWords) { + return new RegExp("^(?:" + pWords.join("|") + ")", "i"); + } + + function startStateFn() { + return { + inComment : false, + inString : false, + inAttributeList : false, + inScript : false + }; + } + + function copyStateFn(pState) { + return { + inComment : pState.inComment, + inString : pState.inString, + inAttributeList : pState.inAttributeList, + inScript : pState.inScript + }; + } + + function produceTokenFunction(pConfig) { + + return function(pStream, pState) { + if (pStream.match(wordRegexp(pConfig.brackets), true, true)) { + return "bracket"; + } + /* comments */ + if (!pState.inComment) { + if (pStream.match(/\/\*[^\*\/]*/, true, true)) { + pState.inComment = true; + return "comment"; + } + if (pStream.match(wordRegexp(pConfig.singlecomment), true, true)) { + pStream.skipToEnd(); + return "comment"; + } + } + if (pState.inComment) { + if (pStream.match(/[^\*\/]*\*\//, true, true)) + pState.inComment = false; + else + pStream.skipToEnd(); + return "comment"; + } + /* strings */ + if (!pState.inString && pStream.match(/\"(\\\"|[^\"])*/, true, true)) { + pState.inString = true; + return "string"; + } + if (pState.inString) { + if (pStream.match(/[^\"]*\"/, true, true)) + pState.inString = false; + else + pStream.skipToEnd(); + return "string"; + } + /* keywords & operators */ + if (!!pConfig.keywords && pStream.match(wordRegexpBoundary(pConfig.keywords), true, true)) + return "keyword"; + + if (pStream.match(wordRegexpBoundary(pConfig.options), true, true)) + return "keyword"; + + if (pStream.match(wordRegexpBoundary(pConfig.arcsWords), true, true)) + return "keyword"; + + if (pStream.match(wordRegexp(pConfig.arcsOthers), true, true)) + return "keyword"; + + if (!!pConfig.operators && pStream.match(wordRegexp(pConfig.operators), true, true)) + return "operator"; + + if (!!pConfig.constants && pStream.match(wordRegexp(pConfig.constants), true, true)) + return "variable"; + + /* attribute lists */ + if (!pConfig.inAttributeList && !!pConfig.attributes && pStream.match('[', true, true)) { + pConfig.inAttributeList = true; + return "bracket"; + } + if (pConfig.inAttributeList) { + if (pConfig.attributes !== null && pStream.match(wordRegexpBoundary(pConfig.attributes), true, true)) { + return "attribute"; + } + if (pStream.match(']', true, true)) { + pConfig.inAttributeList = false; + return "bracket"; + } + } + + pStream.next(); + return "base"; + }; + } + +}); diff --git a/js/codemirror/mode/mscgen/mscgen_test.js b/js/codemirror/mode/mscgen/mscgen_test.js new file mode 100644 index 0000000..76551c8 --- /dev/null +++ b/js/codemirror/mode/mscgen/mscgen_test.js @@ -0,0 +1,84 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "mscgen"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("empty chart", + "[keyword msc][bracket {]", + "[base ]", + "[bracket }]" + ); + + MT("comments", + "[comment // a single line comment]", + "[comment # another single line comment /* and */ ignored here]", + "[comment /* A multi-line comment even though it contains]", + "[comment msc keywords and \"quoted text\"*/]"); + + MT("strings", + "[string \"// a string\"]", + "[string \"a string running over]", + "[string two lines\"]", + "[string \"with \\\"escaped quote\"]" + ); + + MT("xù/ msgenny keywords classify as 'base'", + "[base watermark]", + "[base wordwrapentities]", + "[base alt loop opt ref else break par seq assert]" + ); + + MT("xù/ msgenny constants classify as 'base'", + "[base auto]" + ); + + MT("mscgen constants classify as 'variable'", + "[variable true]", "[variable false]", "[variable on]", "[variable off]" + ); + + MT("mscgen options classify as keyword", + "[keyword hscale]", "[keyword width]", "[keyword arcgradient]", "[keyword wordwraparcs]" + ); + + MT("mscgen arcs classify as keyword", + "[keyword note]","[keyword abox]","[keyword rbox]","[keyword box]", + "[keyword |||...---]", "[keyword ..--==::]", + "[keyword ->]", "[keyword <-]", "[keyword <->]", + "[keyword =>]", "[keyword <=]", "[keyword <=>]", + "[keyword =>>]", "[keyword <<=]", "[keyword <<=>>]", + "[keyword >>]", "[keyword <<]", "[keyword <<>>]", + "[keyword -x]", "[keyword x-]", "[keyword -X]", "[keyword X-]", + "[keyword :>]", "[keyword <:]", "[keyword <:>]" + ); + + MT("within an attribute list, attributes classify as attribute", + "[bracket [[][attribute label]", + "[attribute id]","[attribute url]","[attribute idurl]", + "[attribute linecolor]","[attribute linecolour]","[attribute textcolor]","[attribute textcolour]","[attribute textbgcolor]","[attribute textbgcolour]", + "[attribute arclinecolor]","[attribute arclinecolour]","[attribute arctextcolor]","[attribute arctextcolour]","[attribute arctextbgcolor]","[attribute arctextbgcolour]", + "[attribute arcskip][bracket ]]]" + ); + + MT("outside an attribute list, attributes classify as base", + "[base label]", + "[base id]","[base url]","[base idurl]", + "[base linecolor]","[base linecolour]","[base textcolor]","[base textcolour]","[base textbgcolor]","[base textbgcolour]", + "[base arclinecolor]","[base arclinecolour]","[base arctextcolor]","[base arctextcolour]","[base arctextbgcolor]","[base arctextbgcolour]", + "[base arcskip]" + ); + + MT("a typical program", + "[comment # typical mscgen program]", + "[keyword msc][base ][bracket {]", + "[keyword wordwraparcs][operator =][variable true][base , ][keyword hscale][operator =][string \"0.8\"][base , ][keyword arcgradient][operator =][base 30;]", + "[base a][bracket [[][attribute label][operator =][string \"Entity A\"][bracket ]]][base ,]", + "[base b][bracket [[][attribute label][operator =][string \"Entity B\"][bracket ]]][base ,]", + "[base c][bracket [[][attribute label][operator =][string \"Entity C\"][bracket ]]][base ;]", + "[base a ][keyword =>>][base b][bracket [[][attribute label][operator =][string \"Hello entity B\"][bracket ]]][base ;]", + "[base a ][keyword <<][base b][bracket [[][attribute label][operator =][string \"Here's an answer dude!\"][bracket ]]][base ;]", + "[base c ][keyword :>][base *][bracket [[][attribute label][operator =][string \"What about me?\"][base , ][attribute textcolor][operator =][base red][bracket ]]][base ;]", + "[bracket }]" + ); +})(); diff --git a/js/codemirror/mode/mscgen/msgenny_test.js b/js/codemirror/mode/mscgen/msgenny_test.js new file mode 100644 index 0000000..0449c58 --- /dev/null +++ b/js/codemirror/mode/mscgen/msgenny_test.js @@ -0,0 +1,77 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-msgenny"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "msgenny"); } + + MT("comments", + "[comment // a single line comment]", + "[comment # another single line comment /* and */ ignored here]", + "[comment /* A multi-line comment even though it contains]", + "[comment msc keywords and \"quoted text\"*/]"); + + MT("strings", + "[string \"// a string\"]", + "[string \"a string running over]", + "[string two lines\"]", + "[string \"with \\\"escaped quote\"]" + ); + + MT("xù/ msgenny keywords classify as 'keyword'", + "[keyword watermark]", + "[keyword wordwrapentities]", + "[keyword alt]","[keyword loop]","[keyword opt]","[keyword ref]","[keyword else]","[keyword break]","[keyword par]","[keyword seq]","[keyword assert]" + ); + + MT("xù/ msgenny constants classify as 'variable'", + "[variable auto]", + "[variable true]", "[variable false]", "[variable on]", "[variable off]" + ); + + MT("mscgen options classify as keyword", + "[keyword hscale]", "[keyword width]", "[keyword arcgradient]", "[keyword wordwraparcs]" + ); + + MT("mscgen arcs classify as keyword", + "[keyword note]","[keyword abox]","[keyword rbox]","[keyword box]", + "[keyword |||...---]", "[keyword ..--==::]", + "[keyword ->]", "[keyword <-]", "[keyword <->]", + "[keyword =>]", "[keyword <=]", "[keyword <=>]", + "[keyword =>>]", "[keyword <<=]", "[keyword <<=>>]", + "[keyword >>]", "[keyword <<]", "[keyword <<>>]", + "[keyword -x]", "[keyword x-]", "[keyword -X]", "[keyword X-]", + "[keyword :>]", "[keyword <:]", "[keyword <:>]" + ); + + MT("within an attribute list, mscgen/ xù attributes classify as base", + "[base [[label]", + "[base idurl id url]", + "[base linecolor linecolour textcolor textcolour textbgcolor textbgcolour]", + "[base arclinecolor arclinecolour arctextcolor arctextcolour arctextbgcolor arctextbgcolour]", + "[base arcskip]]]" + ); + + MT("outside an attribute list, mscgen/ xù attributes classify as base", + "[base label]", + "[base idurl id url]", + "[base linecolor linecolour textcolor textcolour textbgcolor textbgcolour]", + "[base arclinecolor arclinecolour arctextcolor arctextcolour arctextbgcolor arctextbgcolour]", + "[base arcskip]" + ); + + MT("a typical program", + "[comment # typical msgenny program]", + "[keyword wordwraparcs][operator =][variable true][base , ][keyword hscale][operator =][string \"0.8\"][base , ][keyword arcgradient][operator =][base 30;]", + "[base a : ][string \"Entity A\"][base ,]", + "[base b : Entity B,]", + "[base c : Entity C;]", + "[base a ][keyword =>>][base b: ][string \"Hello entity B\"][base ;]", + "[base a ][keyword alt][base c][bracket {]", + "[base a ][keyword <<][base b: ][string \"Here's an answer dude!\"][base ;]", + "[keyword ---][base : ][string \"sorry, won't march - comm glitch\"]", + "[base a ][keyword x-][base b: ][string \"Here's an answer dude! (won't arrive...)\"][base ;]", + "[bracket }]", + "[base c ][keyword :>][base *: What about me?;]" + ); +})(); diff --git a/js/codemirror/mode/mscgen/xu_test.js b/js/codemirror/mode/mscgen/xu_test.js new file mode 100644 index 0000000..7f90cd4 --- /dev/null +++ b/js/codemirror/mode/mscgen/xu_test.js @@ -0,0 +1,87 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "text/x-xu"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "xu"); } + + MT("empty chart", + "[keyword msc][bracket {]", + "[base ]", + "[bracket }]" + ); + + MT("empty chart", + "[keyword xu][bracket {]", + "[base ]", + "[bracket }]" + ); + + MT("comments", + "[comment // a single line comment]", + "[comment # another single line comment /* and */ ignored here]", + "[comment /* A multi-line comment even though it contains]", + "[comment msc keywords and \"quoted text\"*/]"); + + MT("strings", + "[string \"// a string\"]", + "[string \"a string running over]", + "[string two lines\"]", + "[string \"with \\\"escaped quote\"]" + ); + + MT("xù/ msgenny keywords classify as 'keyword'", + "[keyword watermark]", + "[keyword alt]","[keyword loop]","[keyword opt]","[keyword ref]","[keyword else]","[keyword break]","[keyword par]","[keyword seq]","[keyword assert]" + ); + + MT("xù/ msgenny constants classify as 'variable'", + "[variable auto]", + "[variable true]", "[variable false]", "[variable on]", "[variable off]" + ); + + MT("mscgen options classify as keyword", + "[keyword hscale]", "[keyword width]", "[keyword arcgradient]", "[keyword wordwraparcs]" + ); + + MT("mscgen arcs classify as keyword", + "[keyword note]","[keyword abox]","[keyword rbox]","[keyword box]", + "[keyword |||...---]", "[keyword ..--==::]", + "[keyword ->]", "[keyword <-]", "[keyword <->]", + "[keyword =>]", "[keyword <=]", "[keyword <=>]", + "[keyword =>>]", "[keyword <<=]", "[keyword <<=>>]", + "[keyword >>]", "[keyword <<]", "[keyword <<>>]", + "[keyword -x]", "[keyword x-]", "[keyword -X]", "[keyword X-]", + "[keyword :>]", "[keyword <:]", "[keyword <:>]" + ); + + MT("within an attribute list, attributes classify as attribute", + "[bracket [[][attribute label]", + "[attribute id]","[attribute url]","[attribute idurl]", + "[attribute linecolor]","[attribute linecolour]","[attribute textcolor]","[attribute textcolour]","[attribute textbgcolor]","[attribute textbgcolour]", + "[attribute arclinecolor]","[attribute arclinecolour]","[attribute arctextcolor]","[attribute arctextcolour]","[attribute arctextbgcolor]","[attribute arctextbgcolour]", + "[attribute arcskip]","[attribute title]", + "[attribute activate]","[attribute deactivate]","[attribute activation][bracket ]]]" + ); + + MT("outside an attribute list, attributes classify as base", + "[base label]", + "[base id]","[base url]","[base idurl]", + "[base linecolor]","[base linecolour]","[base textcolor]","[base textcolour]","[base textbgcolor]","[base textbgcolour]", + "[base arclinecolor]","[base arclinecolour]","[base arctextcolor]","[base arctextcolour]","[base arctextbgcolor]","[base arctextbgcolour]", + "[base arcskip]", "[base title]" + ); + + MT("a typical program", + "[comment # typical xu program]", + "[keyword xu][base ][bracket {]", + "[keyword wordwraparcs][operator =][string \"true\"][base , ][keyword hscale][operator =][string \"0.8\"][base , ][keyword arcgradient][operator =][base 30, ][keyword width][operator =][variable auto][base ;]", + "[base a][bracket [[][attribute label][operator =][string \"Entity A\"][bracket ]]][base ,]", + "[base b][bracket [[][attribute label][operator =][string \"Entity B\"][bracket ]]][base ,]", + "[base c][bracket [[][attribute label][operator =][string \"Entity C\"][bracket ]]][base ;]", + "[base a ][keyword =>>][base b][bracket [[][attribute label][operator =][string \"Hello entity B\"][bracket ]]][base ;]", + "[base a ][keyword <<][base b][bracket [[][attribute label][operator =][string \"Here's an answer dude!\"][base , ][attribute title][operator =][string \"This is a title for this message\"][bracket ]]][base ;]", + "[base c ][keyword :>][base *][bracket [[][attribute label][operator =][string \"What about me?\"][base , ][attribute textcolor][operator =][base red][bracket ]]][base ;]", + "[bracket }]" + ); +})(); diff --git a/js/codemirror/mode/mumps/index.html b/js/codemirror/mode/mumps/index.html new file mode 100644 index 0000000..5299d05 --- /dev/null +++ b/js/codemirror/mode/mumps/index.html @@ -0,0 +1,85 @@ + + +CodeMirror: MUMPS mode + + + + + + + + + +
+

MUMPS mode

+ + +
+ + +
diff --git a/js/codemirror/mode/mumps/mumps.js b/js/codemirror/mode/mumps/mumps.js new file mode 100644 index 0000000..2f76a52 --- /dev/null +++ b/js/codemirror/mode/mumps/mumps.js @@ -0,0 +1,148 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/* + This MUMPS Language script was constructed using vbscript.js as a template. +*/ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("mumps", function() { + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"); + var doubleOperators = new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"); + var singleDelimiters = new RegExp("^[\\.,:]"); + var brackets = new RegExp("[()]"); + var identifiers = new RegExp("^[%A-Za-z][A-Za-z0-9]*"); + var commandKeywords = ["break","close","do","else","for","goto", "halt", "hang", "if", "job","kill","lock","merge","new","open", "quit", "read", "set", "tcommit", "trollback", "tstart", "use", "view", "write", "xecute", "b","c","d","e","f","g", "h", "i", "j","k","l","m","n","o", "q", "r", "s", "tc", "tro", "ts", "u", "v", "w", "x"]; + // The following list includes intrinsic functions _and_ special variables + var intrinsicFuncsWords = ["\\$ascii", "\\$char", "\\$data", "\\$ecode", "\\$estack", "\\$etrap", "\\$extract", "\\$find", "\\$fnumber", "\\$get", "\\$horolog", "\\$io", "\\$increment", "\\$job", "\\$justify", "\\$length", "\\$name", "\\$next", "\\$order", "\\$piece", "\\$qlength", "\\$qsubscript", "\\$query", "\\$quit", "\\$random", "\\$reverse", "\\$select", "\\$stack", "\\$test", "\\$text", "\\$translate", "\\$view", "\\$x", "\\$y", "\\$a", "\\$c", "\\$d", "\\$e", "\\$ec", "\\$es", "\\$et", "\\$f", "\\$fn", "\\$g", "\\$h", "\\$i", "\\$j", "\\$l", "\\$n", "\\$na", "\\$o", "\\$p", "\\$q", "\\$ql", "\\$qs", "\\$r", "\\$re", "\\$s", "\\$st", "\\$t", "\\$tr", "\\$v", "\\$z"]; + var intrinsicFuncs = wordRegexp(intrinsicFuncsWords); + var command = wordRegexp(commandKeywords); + + function tokenBase(stream, state) { + if (stream.sol()) { + state.label = true; + state.commandMode = 0; + } + + // The character has meaning in MUMPS. Ignoring consecutive + // spaces would interfere with interpreting whether the next non-space + // character belongs to the command or argument context. + + // Examine each character and update a mode variable whose interpretation is: + // >0 => command 0 => argument <0 => command post-conditional + var ch = stream.peek(); + + if (ch == " " || ch == "\t") { // Pre-process + state.label = false; + if (state.commandMode == 0) + state.commandMode = 1; + else if ((state.commandMode < 0) || (state.commandMode == 2)) + state.commandMode = 0; + } else if ((ch != ".") && (state.commandMode > 0)) { + if (ch == ":") + state.commandMode = -1; // SIS - Command post-conditional + else + state.commandMode = 2; + } + + // Do not color parameter list as line tag + if ((ch === "(") || (ch === "\u0009")) + state.label = false; + + // MUMPS comment starts with ";" + if (ch === ";") { + stream.skipToEnd(); + return "comment"; + } + + // Number Literals // SIS/RLM - MUMPS permits canonic number followed by concatenate operator + if (stream.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/)) + return "number"; + + // Handle Strings + if (ch == '"') { + if (stream.skipTo('"')) { + stream.next(); + return "string"; + } else { + stream.skipToEnd(); + return "error"; + } + } + + // Handle operators and Delimiters + if (stream.match(doubleOperators) || stream.match(singleOperators)) + return "operator"; + + // Prevents leading "." in DO block from falling through to error + if (stream.match(singleDelimiters)) + return null; + + if (brackets.test(ch)) { + stream.next(); + return "bracket"; + } + + if (state.commandMode > 0 && stream.match(command)) + return "variable-2"; + + if (stream.match(intrinsicFuncs)) + return "builtin"; + + if (stream.match(identifiers)) + return "variable"; + + // Detect dollar-sign when not a documented intrinsic function + // "^" may introduce a GVN or SSVN - Color same as function + if (ch === "$" || ch === "^") { + stream.next(); + return "builtin"; + } + + // MUMPS Indirection + if (ch === "@") { + stream.next(); + return "string-2"; + } + + if (/[\w%]/.test(ch)) { + stream.eatWhile(/[\w%]/); + return "variable"; + } + + // Handle non-detected items + stream.next(); + return "error"; + } + + return { + startState: function() { + return { + label: false, + commandMode: 0 + }; + }, + + token: function(stream, state) { + var style = tokenBase(stream, state); + if (state.label) return "tag"; + return style; + } + }; + }); + + CodeMirror.defineMIME("text/x-mumps", "mumps"); +}); diff --git a/js/codemirror/mode/nginx/index.html b/js/codemirror/mode/nginx/index.html new file mode 100644 index 0000000..c5c0b5e --- /dev/null +++ b/js/codemirror/mode/nginx/index.html @@ -0,0 +1,181 @@ + + +CodeMirror: NGINX mode + + + + + + + + + + + + + +
+

NGINX mode

+
+ + +

MIME types defined: text/x-nginx-conf.

+ +
diff --git a/js/codemirror/mode/nginx/nginx.js b/js/codemirror/mode/nginx/nginx.js new file mode 100644 index 0000000..b6c1d5f --- /dev/null +++ b/js/codemirror/mode/nginx/nginx.js @@ -0,0 +1,178 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("nginx", function(config) { + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = words( + /* ngxDirectiveControl */ "break return rewrite set" + + /* ngxDirective */ " accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23" + ); + + var keywords_block = words( + /* ngxDirectiveBlock */ "http mail events server types location upstream charset_map limit_except if geo map" + ); + + var keywords_important = words( + /* ngxDirectiveImportant */ "include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files" + ); + + var indentUnit = config.indentUnit, type; + function ret(style, tp) {type = tp; return style;} + + function tokenBase(stream, state) { + + + stream.eatWhile(/[\w\$_]/); + + var cur = stream.current(); + + + if (keywords.propertyIsEnumerable(cur)) { + return "keyword"; + } + else if (keywords_block.propertyIsEnumerable(cur)) { + return "variable-2"; + } + else if (keywords_important.propertyIsEnumerable(cur)) { + return "string-2"; + } + /**/ + + var ch = stream.next(); + if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());} + else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + else if (ch == "<" && stream.eat("!")) { + state.tokenize = tokenSGMLComment; + return tokenSGMLComment(stream, state); + } + else if (ch == "=") ret(null, "compare"); + else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + else if (ch == "#") { + stream.skipToEnd(); + return ret("comment", "comment"); + } + else if (ch == "!") { + stream.match(/^\s*\w*/); + return ret("keyword", "important"); + } + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } + else if (/[,.+>*\/]/.test(ch)) { + return ret(null, "select-op"); + } + else if (/[;{}:\[\]]/.test(ch)) { + return ret(null, ch); + } + else { + stream.eatWhile(/[\w\\\-]/); + return ret("variable", "variable"); + } + } + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenSGMLComment(stream, state) { + var dashes = 0, ch; + while ((ch = stream.next()) != null) { + if (dashes >= 2 && ch == ">") { + state.tokenize = tokenBase; + break; + } + dashes = (ch == "-") ? dashes + 1 : 0; + } + return ret("comment", "comment"); + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) + break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + stack: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + type = null; + var style = state.tokenize(stream, state); + + var context = state.stack[state.stack.length-1]; + if (type == "hash" && context == "rule") style = "atom"; + else if (style == "variable") { + if (context == "rule") style = "number"; + else if (!context || context == "@media{") style = "tag"; + } + + if (context == "rule" && /^[\{\};]$/.test(type)) + state.stack.pop(); + if (type == "{") { + if (context == "@media") state.stack[state.stack.length-1] = "@media{"; + else state.stack.push("{"); + } + else if (type == "}") state.stack.pop(); + else if (type == "@media") state.stack.push("@media"); + else if (context == "{" && type != "comment") state.stack.push("rule"); + return style; + }, + + indent: function(state, textAfter) { + var n = state.stack.length; + if (/^\}/.test(textAfter)) + n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1; + return state.baseIndent + n * indentUnit; + }, + + electricChars: "}" + }; +}); + +CodeMirror.defineMIME("text/x-nginx-conf", "nginx"); + +}); diff --git a/js/codemirror/mode/nsis/index.html b/js/codemirror/mode/nsis/index.html new file mode 100644 index 0000000..0fe50e9 --- /dev/null +++ b/js/codemirror/mode/nsis/index.html @@ -0,0 +1,80 @@ + + +CodeMirror: NSIS mode + + + + + + + + + + + +
+

NSIS mode

+ + + + + + +

MIME types defined: text/x-nsis.

+
\ No newline at end of file diff --git a/js/codemirror/mode/nsis/nsis.js b/js/codemirror/mode/nsis/nsis.js new file mode 100644 index 0000000..de18871 --- /dev/null +++ b/js/codemirror/mode/nsis/nsis.js @@ -0,0 +1,95 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Author: Jan T. Sott (http://github.com/idleberg) + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../../addon/mode/simple")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../../addon/mode/simple"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineSimpleMode("nsis",{ + start:[ + // Numbers + {regex: /(?:[+-]?)(?:0x[\d,a-f]+)|(?:0o[0-7]+)|(?:0b[0,1]+)|(?:\d+.?\d*)/, token: "number"}, + + // Strings + { regex: /"(?:[^\\"]|\\.)*"?/, token: "string" }, + { regex: /'(?:[^\\']|\\.)*'?/, token: "string" }, + { regex: /`(?:[^\\`]|\\.)*`?/, token: "string" }, + + // Compile Time Commands + {regex: /^\s*(?:\!(addincludedir|addplugindir|appendfile|assert|cd|define|delfile|echo|error|execute|finalize|getdllversion|gettlbversion|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|uninstfinalize|verbose|warning))\b/i, token: "keyword"}, + + // Conditional Compilation + {regex: /^\s*(?:\!(if(?:n?def)?|ifmacron?def|macro))\b/i, token: "keyword", indent: true}, + {regex: /^\s*(?:\!(else|endif|macroend))\b/i, token: "keyword", dedent: true}, + + // Runtime Commands + {regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetKnownFolderPath|GetLabelAddress|GetTempFileName|GetWinVer|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfRtlLanguage|IfShellVarContextAll|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadAndSetImage|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestLongPathAware|ManifestMaxVersionTested|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEAddResource|PEDllCharacteristics|PERemoveResource|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Target|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/i, token: "keyword"}, + {regex: /^\s*(?:Function|PageEx|Section(?:Group)?)\b/i, token: "keyword", indent: true}, + {regex: /^\s*(?:(Function|PageEx|Section(?:Group)?)End)\b/i, token: "keyword", dedent: true}, + + // Command Options + {regex: /\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/i, token: "atom"}, + {regex: /\b(?:admin|all|amd64-unicode|auto|both|bottom|bzip2|components|current|custom|directory|false|force|hide|highest|ifdiff|ifnewer|instfiles|lastused|leave|left|license|listonly|lzma|nevershow|none|normal|notset|off|on|right|show|silent|silentlog|textonly|top|true|try|un\.components|un\.custom|un\.directory|un\.instfiles|un\.license|uninstConfirm|user|Win10|Win7|Win8|WinVista|x-86-(ansi|unicode)|zlib)\b/i, token: "builtin"}, + + // LogicLib.nsh + {regex: /\$\{(?:And(?:If(?:Not)?|Unless)|Break|Case(?:2|3|4|5|Else)?|Continue|Default|Do(?:Until|While)?|Else(?:If(?:Not)?|Unless)?|End(?:If|Select|Switch)|Exit(?:Do|For|While)|For(?:Each)?|If(?:Cmd|Not(?:Then)?|Then)?|Loop(?:Until|While)?|Or(?:If(?:Not)?|Unless)|Select|Switch|Unless|While)\}/i, token: "variable-2", indent: true}, + + // FileFunc.nsh + {regex: /\$\{(?:BannerTrimPath|DirState|DriveSpace|Get(BaseName|Drives|ExeName|ExePath|FileAttributes|FileExt|FileName|FileVersion|Options|OptionsS|Parameters|Parent|Root|Size|Time)|Locate|RefreshShellIcons)\}/i, token: "variable-2", dedent: true}, + + // Memento.nsh + {regex: /\$\{(?:Memento(?:Section(?:Done|End|Restore|Save)?|UnselectedSection))\}/i, token: "variable-2", dedent: true}, + + // TextFunc.nsh + {regex: /\$\{(?:Config(?:Read|ReadS|Write|WriteS)|File(?:Join|ReadFromEnd|Recode)|Line(?:Find|Read|Sum)|Text(?:Compare|CompareS)|TrimNewLines)\}/i, token: "variable-2", dedent: true}, + + // WinVer.nsh + {regex: /\$\{(?:(?:At(?:Least|Most)|Is)(?:ServicePack|Win(?:7|8|10|95|98|200(?:0|3|8(?:R2)?)|ME|NT4|Vista|XP))|Is(?:NT|Server))\}/i, token: "variable", dedent: true}, + + // WordFunc.nsh + {regex: /\$\{(?:StrFilterS?|Version(?:Compare|Convert)|Word(?:AddS?|Find(?:(?:2|3)X)?S?|InsertS?|ReplaceS?))\}/i, token: "variable-2", dedent: true}, + + // x64.nsh + {regex: /\$\{(?:RunningX64)\}/i, token: "variable", dedent: true}, + {regex: /\$\{(?:Disable|Enable)X64FSRedirection\}/i, token: "variable-2", dedent: true}, + + // Line Comment + {regex: /(#|;).*/, token: "comment"}, + + // Block Comment + {regex: /\/\*/, token: "comment", next: "comment"}, + + // Operator + {regex: /[-+\/*=<>!]+/, token: "operator"}, + + // Variable + {regex: /\$\w[\w\.]*/, token: "variable"}, + + // Constant + {regex: /\${[\!\w\.:-]+}/, token: "variable-2"}, + + // Language String + {regex: /\$\([\!\w\.:-]+\)/, token: "variable-3"} + ], + comment: [ + {regex: /.*?\*\//, token: "comment", next: "start"}, + {regex: /.*/, token: "comment"} + ], + meta: { + electricInput: /^\s*((Function|PageEx|Section|Section(Group)?)End|(\!(endif|macroend))|\$\{(End(If|Unless|While)|Loop(Until)|Next)\})$/i, + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: ["#", ";"] + } +}); + +CodeMirror.defineMIME("text/x-nsis", "nsis"); +}); diff --git a/js/codemirror/mode/ntriples/index.html b/js/codemirror/mode/ntriples/index.html new file mode 100644 index 0000000..5698a35 --- /dev/null +++ b/js/codemirror/mode/ntriples/index.html @@ -0,0 +1,70 @@ + + +CodeMirror: N-Triples mode + + + + + + + + + +
+

N-Triples mode

+

The N-Triples mode also works well with on + N-Quad documents. +

+
+ +
+ + +

MIME types defined: application/n-triples.

+ +
+

N-Quads add a fourth + element to the statement to track which graph the statement is from. + Otherwise, it's identical to N-Triples.

+
+ +
+ + +

MIME types defined: application/n-quads.

+
diff --git a/js/codemirror/mode/ntriples/ntriples.js b/js/codemirror/mode/ntriples/ntriples.js new file mode 100644 index 0000000..9702387 --- /dev/null +++ b/js/codemirror/mode/ntriples/ntriples.js @@ -0,0 +1,195 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/********************************************************** +* This script provides syntax highlighting support for +* the N-Triples format. +* N-Triples format specification: +* https://www.w3.org/TR/n-triples/ +***********************************************************/ + +/* + The following expression defines the defined ASF grammar transitions. + + pre_subject -> + { + ( writing_subject_uri | writing_bnode_uri ) + -> pre_predicate + -> writing_predicate_uri + -> pre_object + -> writing_object_uri | writing_object_bnode | + ( + writing_object_literal + -> writing_literal_lang | writing_literal_type + ) + -> post_object + -> BEGIN + } otherwise { + -> ERROR + } +*/ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("ntriples", function() { + + var Location = { + PRE_SUBJECT : 0, + WRITING_SUB_URI : 1, + WRITING_BNODE_URI : 2, + PRE_PRED : 3, + WRITING_PRED_URI : 4, + PRE_OBJ : 5, + WRITING_OBJ_URI : 6, + WRITING_OBJ_BNODE : 7, + WRITING_OBJ_LITERAL : 8, + WRITING_LIT_LANG : 9, + WRITING_LIT_TYPE : 10, + POST_OBJ : 11, + ERROR : 12 + }; + function transitState(currState, c) { + var currLocation = currState.location; + var ret; + + // Opening. + if (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI; + else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI; + else if(currLocation == Location.PRE_PRED && c == '<') ret = Location.WRITING_PRED_URI; + else if(currLocation == Location.PRE_OBJ && c == '<') ret = Location.WRITING_OBJ_URI; + else if(currLocation == Location.PRE_OBJ && c == '_') ret = Location.WRITING_OBJ_BNODE; + else if(currLocation == Location.PRE_OBJ && c == '"') ret = Location.WRITING_OBJ_LITERAL; + + // Closing. + else if(currLocation == Location.WRITING_SUB_URI && c == '>') ret = Location.PRE_PRED; + else if(currLocation == Location.WRITING_BNODE_URI && c == ' ') ret = Location.PRE_PRED; + else if(currLocation == Location.WRITING_PRED_URI && c == '>') ret = Location.PRE_OBJ; + else if(currLocation == Location.WRITING_OBJ_URI && c == '>') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_OBJ_BNODE && c == ' ') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ; + + // Closing typed and language literal. + else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG; + else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE; + + // Spaces. + else if( c == ' ' && + ( + currLocation == Location.PRE_SUBJECT || + currLocation == Location.PRE_PRED || + currLocation == Location.PRE_OBJ || + currLocation == Location.POST_OBJ + ) + ) ret = currLocation; + + // Reset. + else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT; + + // Error + else ret = Location.ERROR; + + currState.location=ret; + } + + return { + startState: function() { + return { + location : Location.PRE_SUBJECT, + uris : [], + anchors : [], + bnodes : [], + langs : [], + types : [] + }; + }, + token: function(stream, state) { + var ch = stream.next(); + if(ch == '<') { + transitState(state, ch); + var parsedURI = ''; + stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} ); + state.uris.push(parsedURI); + if( stream.match('#', false) ) return 'variable'; + stream.next(); + transitState(state, '>'); + return 'variable'; + } + if(ch == '#') { + var parsedAnchor = ''; + stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;}); + state.anchors.push(parsedAnchor); + return 'variable-2'; + } + if(ch == '>') { + transitState(state, '>'); + return 'variable'; + } + if(ch == '_') { + transitState(state, ch); + var parsedBNode = ''; + stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;}); + state.bnodes.push(parsedBNode); + stream.next(); + transitState(state, ' '); + return 'builtin'; + } + if(ch == '"') { + transitState(state, ch); + stream.eatWhile( function(c) { return c != '"'; } ); + stream.next(); + if( stream.peek() != '@' && stream.peek() != '^' ) { + transitState(state, '"'); + } + return 'string'; + } + if( ch == '@' ) { + transitState(state, '@'); + var parsedLang = ''; + stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;}); + state.langs.push(parsedLang); + stream.next(); + transitState(state, ' '); + return 'string-2'; + } + if( ch == '^' ) { + stream.next(); + transitState(state, '^'); + var parsedType = ''; + stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} ); + state.types.push(parsedType); + stream.next(); + transitState(state, '>'); + return 'variable'; + } + if( ch == ' ' ) { + transitState(state, ch); + } + if( ch == '.' ) { + transitState(state, ch); + } + } + }; +}); + +// define the registered Media Type for n-triples: +// https://www.w3.org/TR/n-triples/#n-triples-mediatype +CodeMirror.defineMIME("application/n-triples", "ntriples"); + +// N-Quads is based on the N-Triples format (so same highlighting works) +// https://www.w3.org/TR/n-quads/ +CodeMirror.defineMIME("application/n-quads", "ntriples"); + +// previously used, though technically incorrect media type for n-triples +CodeMirror.defineMIME("text/n-triples", "ntriples"); + +}); diff --git a/js/codemirror/mode/octave/index.html b/js/codemirror/mode/octave/index.html new file mode 100644 index 0000000..d3d14b1 --- /dev/null +++ b/js/codemirror/mode/octave/index.html @@ -0,0 +1,84 @@ + + +CodeMirror: Octave mode + + + + + + + + + + +
+

Octave mode

+ +
+ + +

MIME types defined: text/x-octave.

+
diff --git a/js/codemirror/mode/octave/octave.js b/js/codemirror/mode/octave/octave.js new file mode 100644 index 0000000..0ff1f48 --- /dev/null +++ b/js/codemirror/mode/octave/octave.js @@ -0,0 +1,139 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("octave", function() { + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"); + var singleDelimiters = new RegExp('^[\\(\\[\\{\\},:=;\\.]'); + var doubleOperators = new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"); + var doubleDelimiters = new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"); + var tripleDelimiters = new RegExp("^((>>=)|(<<=))"); + var expressionEnd = new RegExp("^[\\]\\)]"); + var identifiers = new RegExp("^[_A-Za-z\xa1-\uffff][_A-Za-z0-9\xa1-\uffff]*"); + + var builtins = wordRegexp([ + 'error', 'eval', 'function', 'abs', 'acos', 'atan', 'asin', 'cos', + 'cosh', 'exp', 'log', 'prod', 'sum', 'log10', 'max', 'min', 'sign', 'sin', 'sinh', + 'sqrt', 'tan', 'reshape', 'break', 'zeros', 'default', 'margin', 'round', 'ones', + 'rand', 'syn', 'ceil', 'floor', 'size', 'clear', 'zeros', 'eye', 'mean', 'std', 'cov', + 'det', 'eig', 'inv', 'norm', 'rank', 'trace', 'expm', 'logm', 'sqrtm', 'linspace', 'plot', + 'title', 'xlabel', 'ylabel', 'legend', 'text', 'grid', 'meshgrid', 'mesh', 'num2str', + 'fft', 'ifft', 'arrayfun', 'cellfun', 'input', 'fliplr', 'flipud', 'ismember' + ]); + + var keywords = wordRegexp([ + 'return', 'case', 'switch', 'else', 'elseif', 'end', 'endif', 'endfunction', + 'if', 'otherwise', 'do', 'for', 'while', 'try', 'catch', 'classdef', 'properties', 'events', + 'methods', 'global', 'persistent', 'endfor', 'endwhile', 'printf', 'sprintf', 'disp', 'until', + 'continue', 'pkg' + ]); + + + // tokenizers + function tokenTranspose(stream, state) { + if (!stream.sol() && stream.peek() === '\'') { + stream.next(); + state.tokenize = tokenBase; + return 'operator'; + } + state.tokenize = tokenBase; + return tokenBase(stream, state); + } + + + function tokenComment(stream, state) { + if (stream.match(/^.*%}/)) { + state.tokenize = tokenBase; + return 'comment'; + }; + stream.skipToEnd(); + return 'comment'; + } + + function tokenBase(stream, state) { + // whitespaces + if (stream.eatSpace()) return null; + + // Handle one line Comments + if (stream.match('%{')){ + state.tokenize = tokenComment; + stream.skipToEnd(); + return 'comment'; + } + + if (stream.match(/^[%#]/)){ + stream.skipToEnd(); + return 'comment'; + } + + // Handle Number Literals + if (stream.match(/^[0-9\.+-]/, false)) { + if (stream.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/)) { + stream.tokenize = tokenBase; + return 'number'; }; + if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; }; + if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; }; + } + if (stream.match(wordRegexp(['nan','NaN','inf','Inf']))) { return 'number'; }; + + // Handle Strings + var m = stream.match(/^"(?:[^"]|"")*("|$)/) || stream.match(/^'(?:[^']|'')*('|$)/) + if (m) { return m[1] ? 'string' : "string error"; } + + // Handle words + if (stream.match(keywords)) { return 'keyword'; } ; + if (stream.match(builtins)) { return 'builtin'; } ; + if (stream.match(identifiers)) { return 'variable'; } ; + + if (stream.match(singleOperators) || stream.match(doubleOperators)) { return 'operator'; }; + if (stream.match(singleDelimiters) || stream.match(doubleDelimiters) || stream.match(tripleDelimiters)) { return null; }; + + if (stream.match(expressionEnd)) { + state.tokenize = tokenTranspose; + return null; + }; + + + // Handle non-detected items + stream.next(); + return 'error'; + }; + + + return { + startState: function() { + return { + tokenize: tokenBase + }; + }, + + token: function(stream, state) { + var style = state.tokenize(stream, state); + if (style === 'number' || style === 'variable'){ + state.tokenize = tokenTranspose; + } + return style; + }, + + lineComment: '%', + + fold: 'indent' + }; +}); + +CodeMirror.defineMIME("text/x-octave", "octave"); + +}); diff --git a/js/codemirror/mode/oz/index.html b/js/codemirror/mode/oz/index.html new file mode 100644 index 0000000..2f77a9c --- /dev/null +++ b/js/codemirror/mode/oz/index.html @@ -0,0 +1,59 @@ + + +CodeMirror: Oz mode + + + + + + + + + + +
+

Oz mode

+ +

MIME type defined: text/x-oz.

+ + +
diff --git a/js/codemirror/mode/oz/oz.js b/js/codemirror/mode/oz/oz.js new file mode 100644 index 0000000..5d653f1 --- /dev/null +++ b/js/codemirror/mode/oz/oz.js @@ -0,0 +1,252 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("oz", function (conf) { + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var singleOperators = /[\^@!\|<>#~\.\*\-\+\\/,=]/; + var doubleOperators = /(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/; + var tripleOperators = /(:::)|(\.\.\.)|(=<:)|(>=:)/; + + var middle = ["in", "then", "else", "of", "elseof", "elsecase", "elseif", "catch", + "finally", "with", "require", "prepare", "import", "export", "define", "do"]; + var end = ["end"]; + + var atoms = wordRegexp(["true", "false", "nil", "unit"]); + var commonKeywords = wordRegexp(["andthen", "at", "attr", "declare", "feat", "from", "lex", + "mod", "div", "mode", "orelse", "parser", "prod", "prop", "scanner", "self", "syn", "token"]); + var openingKeywords = wordRegexp(["local", "proc", "fun", "case", "class", "if", "cond", "or", "dis", + "choice", "not", "thread", "try", "raise", "lock", "for", "suchthat", "meth", "functor"]); + var middleKeywords = wordRegexp(middle); + var endKeywords = wordRegexp(end); + + // Tokenizers + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return null; + } + + // Brackets + if(stream.match(/[{}]/)) { + return "bracket"; + } + + // Special [] keyword + if (stream.match('[]')) { + return "keyword" + } + + // Operators + if (stream.match(tripleOperators) || stream.match(doubleOperators)) { + return "operator"; + } + + // Atoms + if(stream.match(atoms)) { + return 'atom'; + } + + // Opening keywords + var matched = stream.match(openingKeywords); + if (matched) { + if (!state.doInCurrentLine) + state.currentIndent++; + else + state.doInCurrentLine = false; + + // Special matching for signatures + if(matched[0] == "proc" || matched[0] == "fun") + state.tokenize = tokenFunProc; + else if(matched[0] == "class") + state.tokenize = tokenClass; + else if(matched[0] == "meth") + state.tokenize = tokenMeth; + + return 'keyword'; + } + + // Middle and other keywords + if (stream.match(middleKeywords) || stream.match(commonKeywords)) { + return "keyword" + } + + // End keywords + if (stream.match(endKeywords)) { + state.currentIndent--; + return 'keyword'; + } + + // Eat the next char for next comparisons + var ch = stream.next(); + + // Strings + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + + // Numbers + if (/[~\d]/.test(ch)) { + if (ch == "~") { + if(! /^[0-9]/.test(stream.peek())) + return null; + else if (( stream.next() == "0" && stream.match(/^[xX][0-9a-fA-F]+/)) || stream.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)) + return "number"; + } + + if ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/)) || stream.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/)) + return "number"; + + return null; + } + + // Comments + if (ch == "%") { + stream.skipToEnd(); + return 'comment'; + } + else if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + } + + // Single operators + if(singleOperators.test(ch)) { + return "operator"; + } + + // If nothing match, we skip the entire alphanumeric block + stream.eatWhile(/\w/); + + return "variable"; + } + + function tokenClass(stream, state) { + if (stream.eatSpace()) { + return null; + } + stream.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/); + state.tokenize = tokenBase; + return "variable-3" + } + + function tokenMeth(stream, state) { + if (stream.eatSpace()) { + return null; + } + stream.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/); + state.tokenize = tokenBase; + return "def" + } + + function tokenFunProc(stream, state) { + if (stream.eatSpace()) { + return null; + } + + if(!state.hasPassedFirstStage && stream.eat("{")) { + state.hasPassedFirstStage = true; + return "bracket"; + } + else if(state.hasPassedFirstStage) { + stream.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/); + state.hasPassedFirstStage = false; + state.tokenize = tokenBase; + return "def" + } + else { + state.tokenize = tokenBase; + return null; + } + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenString(quote) { + return function (stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end || !escaped) + state.tokenize = tokenBase; + return "string"; + }; + } + + function buildElectricInputRegEx() { + // Reindentation should occur on [] or on a match of any of + // the block closing keywords, at the end of a line. + var allClosings = middle.concat(end); + return new RegExp("[\\[\\]]|(" + allClosings.join("|") + ")$"); + } + + return { + + startState: function () { + return { + tokenize: tokenBase, + currentIndent: 0, + doInCurrentLine: false, + hasPassedFirstStage: false + }; + }, + + token: function (stream, state) { + if (stream.sol()) + state.doInCurrentLine = 0; + + return state.tokenize(stream, state); + }, + + indent: function (state, textAfter) { + var trueText = textAfter.replace(/^\s+|\s+$/g, ''); + + if (trueText.match(endKeywords) || trueText.match(middleKeywords) || trueText.match(/(\[])/)) + return conf.indentUnit * (state.currentIndent - 1); + + if (state.currentIndent < 0) + return 0; + + return state.currentIndent * conf.indentUnit; + }, + fold: "indent", + electricInput: buildElectricInputRegEx(), + lineComment: "%", + blockCommentStart: "/*", + blockCommentEnd: "*/" + }; +}); + +CodeMirror.defineMIME("text/x-oz", "oz"); + +}); diff --git a/js/codemirror/mode/pascal/index.html b/js/codemirror/mode/pascal/index.html new file mode 100644 index 0000000..ad29c1c --- /dev/null +++ b/js/codemirror/mode/pascal/index.html @@ -0,0 +1,61 @@ + + +CodeMirror: Pascal mode + + + + + + + + + +
+

Pascal mode

+ + +
+ + + +

MIME types defined: text/x-pascal.

+
diff --git a/js/codemirror/mode/pascal/pascal.js b/js/codemirror/mode/pascal/pascal.js new file mode 100644 index 0000000..062ea11 --- /dev/null +++ b/js/codemirror/mode/pascal/pascal.js @@ -0,0 +1,136 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("pascal", function() { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var keywords = words( + "absolute and array asm begin case const constructor destructor div do " + + "downto else end file for function goto if implementation in inherited " + + "inline interface label mod nil not object of operator or packed procedure " + + "program record reintroduce repeat self set shl shr string then to type " + + "unit until uses var while with xor as class dispinterface except exports " + + "finalization finally initialization inline is library on out packed " + + "property raise resourcestring threadvar try absolute abstract alias " + + "assembler bitpacked break cdecl continue cppdecl cvar default deprecated " + + "dynamic enumerator experimental export external far far16 forward generic " + + "helper implements index interrupt iocheck local message name near " + + "nodefault noreturn nostackframe oldfpccall otherwise overload override " + + "pascal platform private protected public published read register " + + "reintroduce result safecall saveregisters softfloat specialize static " + + "stdcall stored strict unaligned unimplemented varargs virtual write"); + var atoms = {"null": true}; + + var isOperatorChar = /[+\-*&%=<>!?|\/]/; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == "#" && state.startOfLine) { + stream.skipToEnd(); + return "meta"; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (ch == "(" && stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (ch == "{") { + state.tokenize = tokenCommentBraces; + return tokenCommentBraces(stream, state); + } + if (/[\[\]\(\),;\:\.]/.test(ch)) { + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) return "keyword"; + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !escaped) state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == ")" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenCommentBraces(stream, state) { + var ch; + while (ch = stream.next()) { + if (ch == "}") { + state.tokenize = null; + break; + } + } + return "comment"; + } + + // Interface + + return { + startState: function() { + return {tokenize: null}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + return style; + }, + + electricChars: "{}" + }; +}); + +CodeMirror.defineMIME("text/x-pascal", "pascal"); + +}); diff --git a/js/codemirror/mode/pegjs/index.html b/js/codemirror/mode/pegjs/index.html new file mode 100644 index 0000000..e40ac11 --- /dev/null +++ b/js/codemirror/mode/pegjs/index.html @@ -0,0 +1,66 @@ + + + + CodeMirror: PEG.js Mode + + + + + + + + + + + + +
+

PEG.js Mode

+
+ +

The PEG.js Mode

+

Created by Forbes Lindesay.

+
+ + diff --git a/js/codemirror/mode/pegjs/pegjs.js b/js/codemirror/mode/pegjs/pegjs.js new file mode 100644 index 0000000..c0012c5 --- /dev/null +++ b/js/codemirror/mode/pegjs/pegjs.js @@ -0,0 +1,111 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../javascript/javascript")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../javascript/javascript"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("pegjs", function (config) { + var jsMode = CodeMirror.getMode(config, "javascript"); + + function identifier(stream) { + return stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/); + } + + return { + startState: function () { + return { + inString: false, + stringType: null, + inComment: false, + inCharacterClass: false, + braced: 0, + lhs: true, + localState: null + }; + }, + token: function (stream, state) { + //check for state changes + if (!state.inString && !state.inComment && ((stream.peek() == '"') || (stream.peek() == "'"))) { + state.stringType = stream.peek(); + stream.next(); // Skip quote + state.inString = true; // Update state + } + if (!state.inString && !state.inComment && stream.match('/*')) { + state.inComment = true; + } + + if (state.inString) { + while (state.inString && !stream.eol()) { + if (stream.peek() === state.stringType) { + stream.next(); // Skip quote + state.inString = false; // Clear flag + } else if (stream.peek() === '\\') { + stream.next(); + stream.next(); + } else { + stream.match(/^.[^\\\"\']*/); + } + } + return state.lhs ? "property string" : "string"; // Token style + } else if (state.inComment) { + while (state.inComment && !stream.eol()) { + if (stream.match('*/')) { + state.inComment = false; // Clear flag + } else { + stream.match(/^.[^\*]*/); + } + } + return "comment"; + } else if (state.inCharacterClass) { + while (state.inCharacterClass && !stream.eol()) { + if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) { + state.inCharacterClass = false; + } + } + } else if (stream.peek() === '[') { + stream.next(); + state.inCharacterClass = true; + return 'bracket'; + } else if (stream.match('//')) { + stream.skipToEnd(); + return "comment"; + } else if (state.braced || stream.peek() === '{') { + if (state.localState === null) { + state.localState = CodeMirror.startState(jsMode); + } + var token = jsMode.token(stream, state.localState); + var text = stream.current(); + if (!token) { + for (var i = 0; i < text.length; i++) { + if (text[i] === '{') { + state.braced++; + } else if (text[i] === '}') { + state.braced--; + } + }; + } + return token; + } else if (identifier(stream)) { + if (stream.peek() === ':') { + return 'variable'; + } + return 'variable-2'; + } else if (['[', ']', '(', ')'].indexOf(stream.peek()) != -1) { + stream.next(); + return 'bracket'; + } else if (!stream.eatSpace()) { + stream.next(); + } + return null; + } + }; +}, "javascript"); + +}); diff --git a/js/codemirror/mode/perl/index.html b/js/codemirror/mode/perl/index.html new file mode 100644 index 0000000..114a6c9 --- /dev/null +++ b/js/codemirror/mode/perl/index.html @@ -0,0 +1,75 @@ + + +CodeMirror: Perl mode + + + + + + + + + +
+

Perl mode

+ + +
+ + + +

MIME types defined: text/x-perl.

+
diff --git a/js/codemirror/mode/perl/perl.js b/js/codemirror/mode/perl/perl.js new file mode 100644 index 0000000..93fa73c --- /dev/null +++ b/js/codemirror/mode/perl/perl.js @@ -0,0 +1,836 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08) +// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com) + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("perl",function(){ + // http://perldoc.perl.org + var PERL={ // null - magic touch + // 1 - keyword + // 2 - def + // 3 - atom + // 4 - operator + // 5 - variable-2 (predefined) + // [x,y] - x=1,2,3; y=must be defined if x{...} + // PERL operators + '->' : 4, + '++' : 4, + '--' : 4, + '**' : 4, + // ! ~ \ and unary + and - + '=~' : 4, + '!~' : 4, + '*' : 4, + '/' : 4, + '%' : 4, + 'x' : 4, + '+' : 4, + '-' : 4, + '.' : 4, + '<<' : 4, + '>>' : 4, + // named unary operators + '<' : 4, + '>' : 4, + '<=' : 4, + '>=' : 4, + 'lt' : 4, + 'gt' : 4, + 'le' : 4, + 'ge' : 4, + '==' : 4, + '!=' : 4, + '<=>' : 4, + 'eq' : 4, + 'ne' : 4, + 'cmp' : 4, + '~~' : 4, + '&' : 4, + '|' : 4, + '^' : 4, + '&&' : 4, + '||' : 4, + '//' : 4, + '..' : 4, + '...' : 4, + '?' : 4, + ':' : 4, + '=' : 4, + '+=' : 4, + '-=' : 4, + '*=' : 4, // etc. ??? + ',' : 4, + '=>' : 4, + '::' : 4, + // list operators (rightward) + 'not' : 4, + 'and' : 4, + 'or' : 4, + 'xor' : 4, + // PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;) + 'BEGIN' : [5,1], + 'END' : [5,1], + 'PRINT' : [5,1], + 'PRINTF' : [5,1], + 'GETC' : [5,1], + 'READ' : [5,1], + 'READLINE' : [5,1], + 'DESTROY' : [5,1], + 'TIE' : [5,1], + 'TIEHANDLE' : [5,1], + 'UNTIE' : [5,1], + 'STDIN' : 5, + 'STDIN_TOP' : 5, + 'STDOUT' : 5, + 'STDOUT_TOP' : 5, + 'STDERR' : 5, + 'STDERR_TOP' : 5, + '$ARG' : 5, + '$_' : 5, + '@ARG' : 5, + '@_' : 5, + '$LIST_SEPARATOR' : 5, + '$"' : 5, + '$PROCESS_ID' : 5, + '$PID' : 5, + '$$' : 5, + '$REAL_GROUP_ID' : 5, + '$GID' : 5, + '$(' : 5, + '$EFFECTIVE_GROUP_ID' : 5, + '$EGID' : 5, + '$)' : 5, + '$PROGRAM_NAME' : 5, + '$0' : 5, + '$SUBSCRIPT_SEPARATOR' : 5, + '$SUBSEP' : 5, + '$;' : 5, + '$REAL_USER_ID' : 5, + '$UID' : 5, + '$<' : 5, + '$EFFECTIVE_USER_ID' : 5, + '$EUID' : 5, + '$>' : 5, + '$a' : 5, + '$b' : 5, + '$COMPILING' : 5, + '$^C' : 5, + '$DEBUGGING' : 5, + '$^D' : 5, + '${^ENCODING}' : 5, + '$ENV' : 5, + '%ENV' : 5, + '$SYSTEM_FD_MAX' : 5, + '$^F' : 5, + '@F' : 5, + '${^GLOBAL_PHASE}' : 5, + '$^H' : 5, + '%^H' : 5, + '@INC' : 5, + '%INC' : 5, + '$INPLACE_EDIT' : 5, + '$^I' : 5, + '$^M' : 5, + '$OSNAME' : 5, + '$^O' : 5, + '${^OPEN}' : 5, + '$PERLDB' : 5, + '$^P' : 5, + '$SIG' : 5, + '%SIG' : 5, + '$BASETIME' : 5, + '$^T' : 5, + '${^TAINT}' : 5, + '${^UNICODE}' : 5, + '${^UTF8CACHE}' : 5, + '${^UTF8LOCALE}' : 5, + '$PERL_VERSION' : 5, + '$^V' : 5, + '${^WIN32_SLOPPY_STAT}' : 5, + '$EXECUTABLE_NAME' : 5, + '$^X' : 5, + '$1' : 5, // - regexp $1, $2... + '$MATCH' : 5, + '$&' : 5, + '${^MATCH}' : 5, + '$PREMATCH' : 5, + '$`' : 5, + '${^PREMATCH}' : 5, + '$POSTMATCH' : 5, + "$'" : 5, + '${^POSTMATCH}' : 5, + '$LAST_PAREN_MATCH' : 5, + '$+' : 5, + '$LAST_SUBMATCH_RESULT' : 5, + '$^N' : 5, + '@LAST_MATCH_END' : 5, + '@+' : 5, + '%LAST_PAREN_MATCH' : 5, + '%+' : 5, + '@LAST_MATCH_START' : 5, + '@-' : 5, + '%LAST_MATCH_START' : 5, + '%-' : 5, + '$LAST_REGEXP_CODE_RESULT' : 5, + '$^R' : 5, + '${^RE_DEBUG_FLAGS}' : 5, + '${^RE_TRIE_MAXBUF}' : 5, + '$ARGV' : 5, + '@ARGV' : 5, + 'ARGV' : 5, + 'ARGVOUT' : 5, + '$OUTPUT_FIELD_SEPARATOR' : 5, + '$OFS' : 5, + '$,' : 5, + '$INPUT_LINE_NUMBER' : 5, + '$NR' : 5, + '$.' : 5, + '$INPUT_RECORD_SEPARATOR' : 5, + '$RS' : 5, + '$/' : 5, + '$OUTPUT_RECORD_SEPARATOR' : 5, + '$ORS' : 5, + '$\\' : 5, + '$OUTPUT_AUTOFLUSH' : 5, + '$|' : 5, + '$ACCUMULATOR' : 5, + '$^A' : 5, + '$FORMAT_FORMFEED' : 5, + '$^L' : 5, + '$FORMAT_PAGE_NUMBER' : 5, + '$%' : 5, + '$FORMAT_LINES_LEFT' : 5, + '$-' : 5, + '$FORMAT_LINE_BREAK_CHARACTERS' : 5, + '$:' : 5, + '$FORMAT_LINES_PER_PAGE' : 5, + '$=' : 5, + '$FORMAT_TOP_NAME' : 5, + '$^' : 5, + '$FORMAT_NAME' : 5, + '$~' : 5, + '${^CHILD_ERROR_NATIVE}' : 5, + '$EXTENDED_OS_ERROR' : 5, + '$^E' : 5, + '$EXCEPTIONS_BEING_CAUGHT' : 5, + '$^S' : 5, + '$WARNING' : 5, + '$^W' : 5, + '${^WARNING_BITS}' : 5, + '$OS_ERROR' : 5, + '$ERRNO' : 5, + '$!' : 5, + '%OS_ERROR' : 5, + '%ERRNO' : 5, + '%!' : 5, + '$CHILD_ERROR' : 5, + '$?' : 5, + '$EVAL_ERROR' : 5, + '$@' : 5, + '$OFMT' : 5, + '$#' : 5, + '$*' : 5, + '$ARRAY_BASE' : 5, + '$[' : 5, + '$OLD_PERL_VERSION' : 5, + '$]' : 5, + // PERL blocks + 'if' :[1,1], + elsif :[1,1], + 'else' :[1,1], + 'while' :[1,1], + unless :[1,1], + 'for' :[1,1], + foreach :[1,1], + // PERL functions + 'abs' :1, // - absolute value function + accept :1, // - accept an incoming socket connect + alarm :1, // - schedule a SIGALRM + 'atan2' :1, // - arctangent of Y/X in the range -PI to PI + bind :1, // - binds an address to a socket + binmode :1, // - prepare binary files for I/O + bless :1, // - create an object + bootstrap :1, // + 'break' :1, // - break out of a "given" block + caller :1, // - get context of the current subroutine call + chdir :1, // - change your current working directory + chmod :1, // - changes the permissions on a list of files + chomp :1, // - remove a trailing record separator from a string + chop :1, // - remove the last character from a string + chown :1, // - change the ownership on a list of files + chr :1, // - get character this number represents + chroot :1, // - make directory new root for path lookups + close :1, // - close file (or pipe or socket) handle + closedir :1, // - close directory handle + connect :1, // - connect to a remote socket + 'continue' :[1,1], // - optional trailing block in a while or foreach + 'cos' :1, // - cosine function + crypt :1, // - one-way passwd-style encryption + dbmclose :1, // - breaks binding on a tied dbm file + dbmopen :1, // - create binding on a tied dbm file + 'default' :1, // + defined :1, // - test whether a value, variable, or function is defined + 'delete' :1, // - deletes a value from a hash + die :1, // - raise an exception or bail out + 'do' :1, // - turn a BLOCK into a TERM + dump :1, // - create an immediate core dump + each :1, // - retrieve the next key/value pair from a hash + endgrent :1, // - be done using group file + endhostent :1, // - be done using hosts file + endnetent :1, // - be done using networks file + endprotoent :1, // - be done using protocols file + endpwent :1, // - be done using passwd file + endservent :1, // - be done using services file + eof :1, // - test a filehandle for its end + 'eval' :1, // - catch exceptions or compile and run code + 'exec' :1, // - abandon this program to run another + exists :1, // - test whether a hash key is present + exit :1, // - terminate this program + 'exp' :1, // - raise I to a power + fcntl :1, // - file control system call + fileno :1, // - return file descriptor from filehandle + flock :1, // - lock an entire file with an advisory lock + fork :1, // - create a new process just like this one + format :1, // - declare a picture format with use by the write() function + formline :1, // - internal function used for formats + getc :1, // - get the next character from the filehandle + getgrent :1, // - get next group record + getgrgid :1, // - get group record given group user ID + getgrnam :1, // - get group record given group name + gethostbyaddr :1, // - get host record given its address + gethostbyname :1, // - get host record given name + gethostent :1, // - get next hosts record + getlogin :1, // - return who logged in at this tty + getnetbyaddr :1, // - get network record given its address + getnetbyname :1, // - get networks record given name + getnetent :1, // - get next networks record + getpeername :1, // - find the other end of a socket connection + getpgrp :1, // - get process group + getppid :1, // - get parent process ID + getpriority :1, // - get current nice value + getprotobyname :1, // - get protocol record given name + getprotobynumber :1, // - get protocol record numeric protocol + getprotoent :1, // - get next protocols record + getpwent :1, // - get next passwd record + getpwnam :1, // - get passwd record given user login name + getpwuid :1, // - get passwd record given user ID + getservbyname :1, // - get services record given its name + getservbyport :1, // - get services record given numeric port + getservent :1, // - get next services record + getsockname :1, // - retrieve the sockaddr for a given socket + getsockopt :1, // - get socket options on a given socket + given :1, // + glob :1, // - expand filenames using wildcards + gmtime :1, // - convert UNIX time into record or string using Greenwich time + 'goto' :1, // - create spaghetti code + grep :1, // - locate elements in a list test true against a given criterion + hex :1, // - convert a string to a hexadecimal number + 'import' :1, // - patch a module's namespace into your own + index :1, // - find a substring within a string + 'int' :1, // - get the integer portion of a number + ioctl :1, // - system-dependent device control system call + 'join' :1, // - join a list into a string using a separator + keys :1, // - retrieve list of indices from a hash + kill :1, // - send a signal to a process or process group + last :1, // - exit a block prematurely + lc :1, // - return lower-case version of a string + lcfirst :1, // - return a string with just the next letter in lower case + length :1, // - return the number of bytes in a string + 'link' :1, // - create a hard link in the filesystem + listen :1, // - register your socket as a server + local : 2, // - create a temporary value for a global variable (dynamic scoping) + localtime :1, // - convert UNIX time into record or string using local time + lock :1, // - get a thread lock on a variable, subroutine, or method + 'log' :1, // - retrieve the natural logarithm for a number + lstat :1, // - stat a symbolic link + m :null, // - match a string with a regular expression pattern + map :1, // - apply a change to a list to get back a new list with the changes + mkdir :1, // - create a directory + msgctl :1, // - SysV IPC message control operations + msgget :1, // - get SysV IPC message queue + msgrcv :1, // - receive a SysV IPC message from a message queue + msgsnd :1, // - send a SysV IPC message to a message queue + my : 2, // - declare and assign a local variable (lexical scoping) + 'new' :1, // + next :1, // - iterate a block prematurely + no :1, // - unimport some module symbols or semantics at compile time + oct :1, // - convert a string to an octal number + open :1, // - open a file, pipe, or descriptor + opendir :1, // - open a directory + ord :1, // - find a character's numeric representation + our : 2, // - declare and assign a package variable (lexical scoping) + pack :1, // - convert a list into a binary representation + 'package' :1, // - declare a separate global namespace + pipe :1, // - open a pair of connected filehandles + pop :1, // - remove the last element from an array and return it + pos :1, // - find or set the offset for the last/next m//g search + print :1, // - output a list to a filehandle + printf :1, // - output a formatted list to a filehandle + prototype :1, // - get the prototype (if any) of a subroutine + push :1, // - append one or more elements to an array + q :null, // - singly quote a string + qq :null, // - doubly quote a string + qr :null, // - Compile pattern + quotemeta :null, // - quote regular expression magic characters + qw :null, // - quote a list of words + qx :null, // - backquote quote a string + rand :1, // - retrieve the next pseudorandom number + read :1, // - fixed-length buffered input from a filehandle + readdir :1, // - get a directory from a directory handle + readline :1, // - fetch a record from a file + readlink :1, // - determine where a symbolic link is pointing + readpipe :1, // - execute a system command and collect standard output + recv :1, // - receive a message over a Socket + redo :1, // - start this loop iteration over again + ref :1, // - find out the type of thing being referenced + rename :1, // - change a filename + require :1, // - load in external functions from a library at runtime + reset :1, // - clear all variables of a given name + 'return' :1, // - get out of a function early + reverse :1, // - flip a string or a list + rewinddir :1, // - reset directory handle + rindex :1, // - right-to-left substring search + rmdir :1, // - remove a directory + s :null, // - replace a pattern with a string + say :1, // - print with newline + scalar :1, // - force a scalar context + seek :1, // - reposition file pointer for random-access I/O + seekdir :1, // - reposition directory pointer + select :1, // - reset default output or do I/O multiplexing + semctl :1, // - SysV semaphore control operations + semget :1, // - get set of SysV semaphores + semop :1, // - SysV semaphore operations + send :1, // - send a message over a socket + setgrent :1, // - prepare group file for use + sethostent :1, // - prepare hosts file for use + setnetent :1, // - prepare networks file for use + setpgrp :1, // - set the process group of a process + setpriority :1, // - set a process's nice value + setprotoent :1, // - prepare protocols file for use + setpwent :1, // - prepare passwd file for use + setservent :1, // - prepare services file for use + setsockopt :1, // - set some socket options + shift :1, // - remove the first element of an array, and return it + shmctl :1, // - SysV shared memory operations + shmget :1, // - get SysV shared memory segment identifier + shmread :1, // - read SysV shared memory + shmwrite :1, // - write SysV shared memory + shutdown :1, // - close down just half of a socket connection + 'sin' :1, // - return the sine of a number + sleep :1, // - block for some number of seconds + socket :1, // - create a socket + socketpair :1, // - create a pair of sockets + 'sort' :1, // - sort a list of values + splice :1, // - add or remove elements anywhere in an array + 'split' :1, // - split up a string using a regexp delimiter + sprintf :1, // - formatted print into a string + 'sqrt' :1, // - square root function + srand :1, // - seed the random number generator + stat :1, // - get a file's status information + state :1, // - declare and assign a state variable (persistent lexical scoping) + study :1, // - optimize input data for repeated searches + 'sub' :1, // - declare a subroutine, possibly anonymously + 'substr' :1, // - get or alter a portion of a string + symlink :1, // - create a symbolic link to a file + syscall :1, // - execute an arbitrary system call + sysopen :1, // - open a file, pipe, or descriptor + sysread :1, // - fixed-length unbuffered input from a filehandle + sysseek :1, // - position I/O pointer on handle used with sysread and syswrite + system :1, // - run a separate program + syswrite :1, // - fixed-length unbuffered output to a filehandle + tell :1, // - get current seekpointer on a filehandle + telldir :1, // - get current seekpointer on a directory handle + tie :1, // - bind a variable to an object class + tied :1, // - get a reference to the object underlying a tied variable + time :1, // - return number of seconds since 1970 + times :1, // - return elapsed time for self and child processes + tr :null, // - transliterate a string + truncate :1, // - shorten a file + uc :1, // - return upper-case version of a string + ucfirst :1, // - return a string with just the next letter in upper case + umask :1, // - set file creation mode mask + undef :1, // - remove a variable or function definition + unlink :1, // - remove one link to a file + unpack :1, // - convert binary structure into normal perl variables + unshift :1, // - prepend more elements to the beginning of a list + untie :1, // - break a tie binding to a variable + use :1, // - load in a module at compile time + utime :1, // - set a file's last access and modify times + values :1, // - return a list of the values in a hash + vec :1, // - test or set particular bits in a string + wait :1, // - wait for any child process to die + waitpid :1, // - wait for a particular child process to die + wantarray :1, // - get void vs scalar vs list context of current subroutine call + warn :1, // - print debugging info + when :1, // + write :1, // - print a picture record + y :null}; // - transliterate a string + + var RXstyle="string-2"; + var RXmodifiers=/[goseximacplud]/; // NOTE: "m", "s", "y" and "tr" need to correct real modifiers for each regexp type + + function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;) + state.chain=null; // 12 3tail + state.style=null; + state.tail=null; + state.tokenize=function(stream,state){ + var e=false,c,i=0; + while(c=stream.next()){ + if(c===chain[i]&&!e){ + if(chain[++i]!==undefined){ + state.chain=chain[i]; + state.style=style; + state.tail=tail;} + else if(tail) + stream.eatWhile(tail); + state.tokenize=tokenPerl; + return style;} + e=!e&&c=="\\";} + return style;}; + return state.tokenize(stream,state);} + + function tokenSOMETHING(stream,state,string){ + state.tokenize=function(stream,state){ + if(stream.string==string) + state.tokenize=tokenPerl; + stream.skipToEnd(); + return "string";}; + return state.tokenize(stream,state);} + + function tokenPerl(stream,state){ + if(stream.eatSpace()) + return null; + if(state.chain) + return tokenChain(stream,state,state.chain,state.style,state.tail); + if(stream.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/)) + return 'number'; + if(stream.match(/^<<(?=[_a-zA-Z])/)){ // NOTE: <"],RXstyle,RXmodifiers);} + if(/[\^'"!~\/]/.test(c)){ + eatSuffix(stream, 1); + return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}} + else if(c=="q"){ + c=look(stream, 1); + if(c=="("){ + eatSuffix(stream, 2); + return tokenChain(stream,state,[")"],"string");} + if(c=="["){ + eatSuffix(stream, 2); + return tokenChain(stream,state,["]"],"string");} + if(c=="{"){ + eatSuffix(stream, 2); + return tokenChain(stream,state,["}"],"string");} + if(c=="<"){ + eatSuffix(stream, 2); + return tokenChain(stream,state,[">"],"string");} + if(/[\^'"!~\/]/.test(c)){ + eatSuffix(stream, 1); + return tokenChain(stream,state,[stream.eat(c)],"string");}} + else if(c=="w"){ + c=look(stream, 1); + if(c=="("){ + eatSuffix(stream, 2); + return tokenChain(stream,state,[")"],"bracket");} + if(c=="["){ + eatSuffix(stream, 2); + return tokenChain(stream,state,["]"],"bracket");} + if(c=="{"){ + eatSuffix(stream, 2); + return tokenChain(stream,state,["}"],"bracket");} + if(c=="<"){ + eatSuffix(stream, 2); + return tokenChain(stream,state,[">"],"bracket");} + if(/[\^'"!~\/]/.test(c)){ + eatSuffix(stream, 1); + return tokenChain(stream,state,[stream.eat(c)],"bracket");}} + else if(c=="r"){ + c=look(stream, 1); + if(c=="("){ + eatSuffix(stream, 2); + return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);} + if(c=="["){ + eatSuffix(stream, 2); + return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);} + if(c=="{"){ + eatSuffix(stream, 2); + return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);} + if(c=="<"){ + eatSuffix(stream, 2); + return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);} + if(/[\^'"!~\/]/.test(c)){ + eatSuffix(stream, 1); + return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}} + else if(/[\^'"!~\/(\[{<]/.test(c)){ + if(c=="("){ + eatSuffix(stream, 1); + return tokenChain(stream,state,[")"],"string");} + if(c=="["){ + eatSuffix(stream, 1); + return tokenChain(stream,state,["]"],"string");} + if(c=="{"){ + eatSuffix(stream, 1); + return tokenChain(stream,state,["}"],"string");} + if(c=="<"){ + eatSuffix(stream, 1); + return tokenChain(stream,state,[">"],"string");} + if(/[\^'"!~\/]/.test(c)){ + return tokenChain(stream,state,[stream.eat(c)],"string");}}}} + if(ch=="m"){ + var c=look(stream, -2); + if(!(c&&/\w/.test(c))){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(/[\^'"!~\/]/.test(c)){ + return tokenChain(stream,state,[c],RXstyle,RXmodifiers);} + if(c=="("){ + return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);} + if(c=="["){ + return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);} + if(c=="{"){ + return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);} + if(c=="<"){ + return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}} + if(ch=="s"){ + var c=/[\/>\]})\w]/.test(look(stream, -2)); + if(!c){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(c=="[") + return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); + if(c=="{") + return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); + if(c=="<") + return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); + if(c=="(") + return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); + return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}} + if(ch=="y"){ + var c=/[\/>\]})\w]/.test(look(stream, -2)); + if(!c){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(c=="[") + return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); + if(c=="{") + return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); + if(c=="<") + return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); + if(c=="(") + return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); + return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}} + if(ch=="t"){ + var c=/[\/>\]})\w]/.test(look(stream, -2)); + if(!c){ + c=stream.eat("r");if(c){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(c=="[") + return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); + if(c=="{") + return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); + if(c=="<") + return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); + if(c=="(") + return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); + return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}} + if(ch=="`"){ + return tokenChain(stream,state,[ch],"variable-2");} + if(ch=="/"){ + if(!/~\s*$/.test(prefix(stream))) + return "operator"; + else + return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);} + if(ch=="$"){ + var p=stream.pos; + if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}")) + return "variable-2"; + else + stream.pos=p;} + if(/[$@%]/.test(ch)){ + var p=stream.pos; + if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(look(stream, -2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){ + var c=stream.current(); + if(PERL[c]) + return "variable-2";} + stream.pos=p;} + if(/[$@%&]/.test(ch)){ + if(stream.eatWhile(/[\w$]/)||stream.eat("{")&&stream.eatWhile(/[\w$]/)&&stream.eat("}")){ + var c=stream.current(); + if(PERL[c]) + return "variable-2"; + else + return "variable";}} + if(ch=="#"){ + if(look(stream, -2)!="$"){ + stream.skipToEnd(); + return "comment";}} + if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){ + var p=stream.pos; + stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/); + if(PERL[stream.current()]) + return "operator"; + else + stream.pos=p;} + if(ch=="_"){ + if(stream.pos==1){ + if(suffix(stream, 6)=="_END__"){ + return tokenChain(stream,state,['\0'],"comment");} + else if(suffix(stream, 7)=="_DATA__"){ + return tokenChain(stream,state,['\0'],"variable-2");} + else if(suffix(stream, 7)=="_C__"){ + return tokenChain(stream,state,['\0'],"string");}}} + if(/\w/.test(ch)){ + var p=stream.pos; + if(look(stream, -2)=="{"&&(look(stream, 0)=="}"||stream.eatWhile(/\w/)&&look(stream, 0)=="}")) + return "string"; + else + stream.pos=p;} + if(/[A-Z]/.test(ch)){ + var l=look(stream, -2); + var p=stream.pos; + stream.eatWhile(/[A-Z_]/); + if(/[\da-z]/.test(look(stream, 0))){ + stream.pos=p;} + else{ + var c=PERL[stream.current()]; + if(!c) + return "meta"; + if(c[1]) + c=c[0]; + if(l!=":"){ + if(c==1) + return "keyword"; + else if(c==2) + return "def"; + else if(c==3) + return "atom"; + else if(c==4) + return "operator"; + else if(c==5) + return "variable-2"; + else + return "meta";} + else + return "meta";}} + if(/[a-zA-Z_]/.test(ch)){ + var l=look(stream, -2); + stream.eatWhile(/\w/); + var c=PERL[stream.current()]; + if(!c) + return "meta"; + if(c[1]) + c=c[0]; + if(l!=":"){ + if(c==1) + return "keyword"; + else if(c==2) + return "def"; + else if(c==3) + return "atom"; + else if(c==4) + return "operator"; + else if(c==5) + return "variable-2"; + else + return "meta";} + else + return "meta";} + return null;} + + return { + startState: function() { + return { + tokenize: tokenPerl, + chain: null, + style: null, + tail: null + }; + }, + token: function(stream, state) { + return (state.tokenize || tokenPerl)(stream, state); + }, + lineComment: '#' + }; +}); + +CodeMirror.registerHelper("wordChars", "perl", /[\w$]/); + +CodeMirror.defineMIME("text/x-perl", "perl"); + +// it's like "peek", but need for look-ahead or look-behind if index < 0 +function look(stream, c){ + return stream.string.charAt(stream.pos+(c||0)); +} + +// return a part of prefix of current stream from current position +function prefix(stream, c){ + if(c){ + var x=stream.pos-c; + return stream.string.substr((x>=0?x:0),c);} + else{ + return stream.string.substr(0,stream.pos-1); + } +} + +// return a part of suffix of current stream from current position +function suffix(stream, c){ + var y=stream.string.length; + var x=y-stream.pos+1; + return stream.string.substr(stream.pos,(c&&c=(y=stream.string.length-1)) + stream.pos=y; + else + stream.pos=x; +} + +}); diff --git a/js/codemirror/mode/php/index.html b/js/codemirror/mode/php/index.html new file mode 100644 index 0000000..d4439fd --- /dev/null +++ b/js/codemirror/mode/php/index.html @@ -0,0 +1,64 @@ + + +CodeMirror: PHP mode + + + + + + + + + + + + + + + +
+

PHP mode

+
+ + + +

Simple HTML/PHP mode based on + the C-like mode. Depends on XML, + JavaScript, CSS, HTMLMixed, and C-like modes.

+ +

MIME types defined: application/x-httpd-php (HTML with PHP code), text/x-php (plain, non-wrapped PHP code).

+
diff --git a/js/codemirror/mode/php/php.js b/js/codemirror/mode/php/php.js new file mode 100644 index 0000000..281c290 --- /dev/null +++ b/js/codemirror/mode/php/php.js @@ -0,0 +1,234 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../clike/clike")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../clike/clike"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + function keywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + // Helper for phpString + function matchSequence(list, end, escapes) { + if (list.length == 0) return phpString(end); + return function (stream, state) { + var patterns = list[0]; + for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) { + state.tokenize = matchSequence(list.slice(1), end); + return patterns[i][1]; + } + state.tokenize = phpString(end, escapes); + return "string"; + }; + } + function phpString(closing, escapes) { + return function(stream, state) { return phpString_(stream, state, closing, escapes); }; + } + function phpString_(stream, state, closing, escapes) { + // "Complex" syntax + if (escapes !== false && stream.match("${", false) || stream.match("{$", false)) { + state.tokenize = null; + return "string"; + } + + // Simple syntax + if (escapes !== false && stream.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)) { + // After the variable name there may appear array or object operator. + if (stream.match("[", false)) { + // Match array operator + state.tokenize = matchSequence([ + [["[", null]], + [[/\d[\w\.]*/, "number"], + [/\$[a-zA-Z_][a-zA-Z0-9_]*/, "variable-2"], + [/[\w\$]+/, "variable"]], + [["]", null]] + ], closing, escapes); + } + if (stream.match(/^->\w/, false)) { + // Match object operator + state.tokenize = matchSequence([ + [["->", null]], + [[/[\w]+/, "variable"]] + ], closing, escapes); + } + return "variable-2"; + } + + var escaped = false; + // Normal string + while (!stream.eol() && + (escaped || escapes === false || + (!stream.match("{$", false) && + !stream.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/, false)))) { + if (!escaped && stream.match(closing)) { + state.tokenize = null; + state.tokStack.pop(); state.tokStack.pop(); + break; + } + escaped = stream.next() == "\\" && !escaped; + } + return "string"; + } + + var phpKeywords = "abstract and array as break case catch class clone const continue declare default " + + "do else elseif enddeclare endfor endforeach endif endswitch endwhile enum extends final " + + "for foreach function global goto if implements interface instanceof namespace " + + "new or private protected public static switch throw trait try use var while xor " + + "die echo empty exit eval include include_once isset list require require_once return " + + "print unset __halt_compiler self static parent yield insteadof finally readonly match"; + var phpAtoms = "true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"; + var phpBuiltin = "func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage memory_get_peak_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count"; + CodeMirror.registerHelper("hintWords", "php", [phpKeywords, phpAtoms, phpBuiltin].join(" ").split(" ")); + CodeMirror.registerHelper("wordChars", "php", /[\w$]/); + + var phpConfig = { + name: "clike", + helperType: "php", + keywords: keywords(phpKeywords), + blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"), + defKeywords: keywords("class enum function interface namespace trait"), + atoms: keywords(phpAtoms), + builtin: keywords(phpBuiltin), + multiLineStrings: true, + hooks: { + "$": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "variable-2"; + }, + "<": function(stream, state) { + var before; + if (before = stream.match(/^<<\s*/)) { + var quoted = stream.eat(/['"]/); + stream.eatWhile(/[\w\.]/); + var delim = stream.current().slice(before[0].length + (quoted ? 2 : 1)); + if (quoted) stream.eat(quoted); + if (delim) { + (state.tokStack || (state.tokStack = [])).push(delim, 0); + state.tokenize = phpString(delim, quoted != "'"); + return "string"; + } + } + return false; + }, + "#": function(stream) { + while (!stream.eol() && !stream.match("?>", false)) stream.next(); + return "comment"; + }, + "/": function(stream) { + if (stream.eat("/")) { + while (!stream.eol() && !stream.match("?>", false)) stream.next(); + return "comment"; + } + return false; + }, + '"': function(_stream, state) { + (state.tokStack || (state.tokStack = [])).push('"', 0); + state.tokenize = phpString('"'); + return "string"; + }, + "{": function(_stream, state) { + if (state.tokStack && state.tokStack.length) + state.tokStack[state.tokStack.length - 1]++; + return false; + }, + "}": function(_stream, state) { + if (state.tokStack && state.tokStack.length > 0 && + !--state.tokStack[state.tokStack.length - 1]) { + state.tokenize = phpString(state.tokStack[state.tokStack.length - 2]); + } + return false; + } + } + }; + + CodeMirror.defineMode("php", function(config, parserConfig) { + var htmlMode = CodeMirror.getMode(config, (parserConfig && parserConfig.htmlMode) || "text/html"); + var phpMode = CodeMirror.getMode(config, phpConfig); + + function dispatch(stream, state) { + var isPHP = state.curMode == phpMode; + if (stream.sol() && state.pending && state.pending != '"' && state.pending != "'") state.pending = null; + if (!isPHP) { + if (stream.match(/^<\?\w*/)) { + state.curMode = phpMode; + if (!state.php) state.php = CodeMirror.startState(phpMode, htmlMode.indent(state.html, "", "")) + state.curState = state.php; + return "meta"; + } + if (state.pending == '"' || state.pending == "'") { + while (!stream.eol() && stream.next() != state.pending) {} + var style = "string"; + } else if (state.pending && stream.pos < state.pending.end) { + stream.pos = state.pending.end; + var style = state.pending.style; + } else { + var style = htmlMode.token(stream, state.curState); + } + if (state.pending) state.pending = null; + var cur = stream.current(), openPHP = cur.search(/<\?/), m; + if (openPHP != -1) { + if (style == "string" && (m = cur.match(/[\'\"]$/)) && !/\?>/.test(cur)) state.pending = m[0]; + else state.pending = {end: stream.pos, style: style}; + stream.backUp(cur.length - openPHP); + } + return style; + } else if (isPHP && state.php.tokenize == null && stream.match("?>")) { + state.curMode = htmlMode; + state.curState = state.html; + if (!state.php.context.prev) state.php = null; + return "meta"; + } else { + return phpMode.token(stream, state.curState); + } + } + + return { + startState: function() { + var html = CodeMirror.startState(htmlMode) + var php = parserConfig.startOpen ? CodeMirror.startState(phpMode) : null + return {html: html, + php: php, + curMode: parserConfig.startOpen ? phpMode : htmlMode, + curState: parserConfig.startOpen ? php : html, + pending: null}; + }, + + copyState: function(state) { + var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html), + php = state.php, phpNew = php && CodeMirror.copyState(phpMode, php), cur; + if (state.curMode == htmlMode) cur = htmlNew; + else cur = phpNew; + return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur, + pending: state.pending}; + }, + + token: dispatch, + + indent: function(state, textAfter, line) { + if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) || + (state.curMode == phpMode && /^\?>/.test(textAfter))) + return htmlMode.indent(state.html, textAfter, line); + return state.curMode.indent(state.curState, textAfter, line); + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + + innerMode: function(state) { return {state: state.curState, mode: state.curMode}; } + }; + }, "htmlmixed", "clike"); + + CodeMirror.defineMIME("application/x-httpd-php", "php"); + CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true}); + CodeMirror.defineMIME("text/x-php", phpConfig); +}); diff --git a/js/codemirror/mode/php/test.js b/js/codemirror/mode/php/test.js new file mode 100644 index 0000000..c4c06c4 --- /dev/null +++ b/js/codemirror/mode/php/test.js @@ -0,0 +1,154 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "php"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT('simple_test', + '[meta ]'); + + MT('variable_interpolation_non_alphanumeric', + '[meta $/$\\$}$\\\"$:$;$?$|$[[$]]$+$=aaa"]', + '[meta ?>]'); + + MT('variable_interpolation_digits', + '[meta ]'); + + MT('variable_interpolation_simple_syntax_1', + '[meta ]'); + + MT('variable_interpolation_simple_syntax_2', + '[meta ]'); + + MT('variable_interpolation_simple_syntax_3', + '[meta [variable aaaaa][string .aaaaaa"];', + '[keyword echo] [string "aaa][variable-2 $aaaa][string ->][variable-2 $aaaaa][string .aaaaaa"];', + '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string [[2]].aaaaaa"];', + '[keyword echo] [string "aaa][variable-2 $aaaa]->[variable aaaaa][string ->aaaa2.aaaaaa"];', + '[meta ?>]'); + + MT('variable_interpolation_escaping', + '[meta aaa.aaa"];', + '[keyword echo] [string "aaa\\$aaaa[[2]]aaa.aaa"];', + '[keyword echo] [string "aaa\\$aaaa[[asd]]aaa.aaa"];', + '[keyword echo] [string "aaa{\\$aaaa->aaa.aaa"];', + '[keyword echo] [string "aaa{\\$aaaa[[2]]aaa.aaa"];', + '[keyword echo] [string "aaa{\\aaaaa[[asd]]aaa.aaa"];', + '[keyword echo] [string "aaa\\${aaaa->aaa.aaa"];', + '[keyword echo] [string "aaa\\${aaaa[[2]]aaa.aaa"];', + '[keyword echo] [string "aaa\\${aaaa[[asd]]aaa.aaa"];', + '[meta ?>]'); + + MT('variable_interpolation_complex_syntax_1', + '[meta aaa.aaa"];', + '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa]}[string ->aaa.aaa"];', + '[keyword echo] [string "aaa][variable-2 $]{[variable-2 $aaaa][[',' [number 42]',']]}[string ->aaa.aaa"];', + '[keyword echo] [string "aaa][variable-2 $]{[variable aaaa][meta ?>]aaaaaa'); + + MT('variable_interpolation_complex_syntax_2', + '[meta } $aaaaaa.aaa"];', + '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*}?>*/][[',' [string "aaa][variable-2 $aaa][string {}][variable-2 $]{[variable aaa]}[string "]',']]}[string ->aaa.aaa"];', + '[keyword echo] [string "][variable-2 $]{[variable aaa][comment /*} } $aaa } */]}[string ->aaa.aaa"];'); + + + function build_recursive_monsters(nt, t, n){ + var monsters = [t]; + for (var i = 1; i <= n; ++i) + monsters[i] = nt.join(monsters[i - 1]); + return monsters; + } + + var m1 = build_recursive_monsters( + ['[string "][variable-2 $]{[variable aaa] [operator +] ', '}[string "]'], + '[comment /* }?>} */] [string "aaa][variable-2 $aaa][string .aaa"]', + 10 + ); + + MT('variable_interpolation_complex_syntax_3_1', + '[meta ]'); + + var m2 = build_recursive_monsters( + ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', '}[string .a"]'], + '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]', + 5 + ); + + MT('variable_interpolation_complex_syntax_3_2', + '[meta ]'); + + function build_recursive_monsters_2(mf1, mf2, nt, t, n){ + var monsters = [t]; + for (var i = 1; i <= n; ++i) + monsters[i] = nt[0] + mf1[i - 1] + nt[1] + mf2[i - 1] + nt[2] + monsters[i - 1] + nt[3]; + return monsters; + } + + var m3 = build_recursive_monsters_2( + m1, + m2, + ['[string "a][variable-2 $]{[variable aaa] [operator +] ', ' [operator +] ', ' [operator +] ', '}[string .a"]'], + '[comment /* }?>{{ */] [string "a?>}{{aa][variable-2 $aaa][string .a}a?>a"]', + 4 + ); + + MT('variable_interpolation_complex_syntax_3_3', + '[meta ]'); + + MT("variable_interpolation_heredoc", + "[meta +CodeMirror: Pig Latin mode + + + + + + + + + +
+

Pig Latin mode

+
+ + + +

+ Simple mode that handles Pig Latin language. +

+ +

MIME type defined: text/x-pig + (PIG code) +

diff --git a/js/codemirror/mode/pig/pig.js b/js/codemirror/mode/pig/pig.js new file mode 100644 index 0000000..a5914ce --- /dev/null +++ b/js/codemirror/mode/pig/pig.js @@ -0,0 +1,178 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/* + * Pig Latin Mode for CodeMirror 2 + * @author Prasanth Jayachandran + * @link https://github.com/prasanthj/pig-codemirror-2 + * This implementation is adapted from PL/SQL mode in CodeMirror 2. + */ +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("pig", function(_config, parserConfig) { + var keywords = parserConfig.keywords, + builtins = parserConfig.builtins, + types = parserConfig.types, + multiLineStrings = parserConfig.multiLineStrings; + + var isOperatorChar = /[*+\-%<>=&?:\/!|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + function tokenComment(stream, state) { + var isEnd = false; + var ch; + while(ch = stream.next()) { + if(ch == "/" && isEnd) { + state.tokenize = tokenBase; + break; + } + isEnd = (ch == "*"); + } + return "comment"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; break; + } + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = tokenBase; + return "error"; + }; + } + + + function tokenBase(stream, state) { + var ch = stream.next(); + + // is a start of string? + if (ch == '"' || ch == "'") + return chain(stream, state, tokenString(ch)); + // is it one of the special chars + else if(/[\[\]{}\(\),;\.]/.test(ch)) + return null; + // is it a number? + else if(/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + // multi line comment or operator + else if (ch == "/") { + if (stream.eat("*")) { + return chain(stream, state, tokenComment); + } + else { + stream.eatWhile(isOperatorChar); + return "operator"; + } + } + // single line comment or operator + else if (ch=="-") { + if(stream.eat("-")){ + stream.skipToEnd(); + return "comment"; + } + else { + stream.eatWhile(isOperatorChar); + return "operator"; + } + } + // is it an operator + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + else { + // get the while word + stream.eatWhile(/[\w\$_]/); + // is it one of the listed keywords? + if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) { + //keywords can be used as variables like flatten(group), group.$0 etc.. + if (!stream.eat(")") && !stream.eat(".")) + return "keyword"; + } + // is it one of the builtin functions? + if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) + return "variable-2"; + // is it one of the listed types? + if (types && types.propertyIsEnumerable(stream.current().toUpperCase())) + return "variable-3"; + // default is a 'variable' + return "variable"; + } + } + + // Interface + return { + startState: function() { + return { + tokenize: tokenBase, + startOfLine: true + }; + }, + + token: function(stream, state) { + if(stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + return style; + } + }; +}); + +(function() { + function keywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + // builtin funcs taken from trunk revision 1303237 + var pBuiltins = "ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL " + + "CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS " + + "DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG " + + "FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN " + + "INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER " + + "ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS " + + "LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA " + + "PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE " + + "SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG " + + "TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER "; + + // taken from QueryLexer.g + var pKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP " + + "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL " + + "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE " + + "SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE " + + "NEQ MATCHES TRUE FALSE DUMP"; + + // data types + var pTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP "; + + CodeMirror.defineMIME("text/x-pig", { + name: "pig", + builtins: keywords(pBuiltins), + keywords: keywords(pKeywords), + types: keywords(pTypes) + }); + + CodeMirror.registerHelper("hintWords", "pig", (pBuiltins + pTypes + pKeywords).split(" ")); +}()); + +}); diff --git a/js/codemirror/mode/powershell/index.html b/js/codemirror/mode/powershell/index.html new file mode 100644 index 0000000..88ab9b1 --- /dev/null +++ b/js/codemirror/mode/powershell/index.html @@ -0,0 +1,209 @@ + + + + + CodeMirror: Powershell mode + + + + + + + + + +
+

PowerShell mode

+ +
+ + +

MIME types defined: application/x-powershell.

+
+ + diff --git a/js/codemirror/mode/powershell/powershell.js b/js/codemirror/mode/powershell/powershell.js new file mode 100644 index 0000000..c793594 --- /dev/null +++ b/js/codemirror/mode/powershell/powershell.js @@ -0,0 +1,398 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + 'use strict'; + if (typeof exports == 'object' && typeof module == 'object') // CommonJS + mod(require('../../lib/codemirror')); + else if (typeof define == 'function' && define.amd) // AMD + define(['../../lib/codemirror'], mod); + else // Plain browser env + mod(window.CodeMirror); +})(function(CodeMirror) { +'use strict'; + +CodeMirror.defineMode('powershell', function() { + function buildRegexp(patterns, options) { + options = options || {}; + var prefix = options.prefix !== undefined ? options.prefix : '^'; + var suffix = options.suffix !== undefined ? options.suffix : '\\b'; + + for (var i = 0; i < patterns.length; i++) { + if (patterns[i] instanceof RegExp) { + patterns[i] = patterns[i].source; + } + else { + patterns[i] = patterns[i].replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + } + + return new RegExp(prefix + '(' + patterns.join('|') + ')' + suffix, 'i'); + } + + var notCharacterOrDash = '(?=[^A-Za-z\\d\\-_]|$)'; + var varNames = /[\w\-:]/ + var keywords = buildRegexp([ + /begin|break|catch|continue|data|default|do|dynamicparam/, + /else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/, + /param|process|return|switch|throw|trap|try|until|where|while/ + ], { suffix: notCharacterOrDash }); + + var punctuation = /[\[\]{},;`\\\.]|@[({]/; + var wordOperators = buildRegexp([ + 'f', + /b?not/, + /[ic]?split/, 'join', + /is(not)?/, 'as', + /[ic]?(eq|ne|[gl][te])/, + /[ic]?(not)?(like|match|contains)/, + /[ic]?replace/, + /b?(and|or|xor)/ + ], { prefix: '-' }); + var symbolOperators = /[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/; + var operators = buildRegexp([wordOperators, symbolOperators], { suffix: '' }); + + var numbers = /^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i; + + var identifiers = /^[A-Za-z\_][A-Za-z\-\_\d]*\b/; + + var symbolBuiltins = /[A-Z]:|%|\?/i; + var namedBuiltins = buildRegexp([ + /Add-(Computer|Content|History|Member|PSSnapin|Type)/, + /Checkpoint-Computer/, + /Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/, + /Compare-Object/, + /Complete-Transaction/, + /Connect-PSSession/, + /ConvertFrom-(Csv|Json|SecureString|StringData)/, + /Convert-Path/, + /ConvertTo-(Csv|Html|Json|SecureString|Xml)/, + /Copy-Item(Property)?/, + /Debug-Process/, + /Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/, + /Disconnect-PSSession/, + /Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/, + /(Enter|Exit)-PSSession/, + /Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/, + /ForEach-Object/, + /Format-(Custom|List|Table|Wide)/, + new RegExp('Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential' + + '|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job' + + '|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration' + + '|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)'), + /Group-Object/, + /Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/, + /ImportSystemModules/, + /Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/, + /Join-Path/, + /Limit-EventLog/, + /Measure-(Command|Object)/, + /Move-Item(Property)?/, + new RegExp('New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile' + + '|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)'), + /Out-(Default|File|GridView|Host|Null|Printer|String)/, + /Pause/, + /(Pop|Push)-Location/, + /Read-Host/, + /Receive-(Job|PSSession)/, + /Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/, + /Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/, + /Rename-(Computer|Item(Property)?)/, + /Reset-ComputerMachinePassword/, + /Resolve-Path/, + /Restart-(Computer|Service)/, + /Restore-Computer/, + /Resume-(Job|Service)/, + /Save-Help/, + /Select-(Object|String|Xml)/, + /Send-MailMessage/, + new RegExp('Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug' + + '|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)'), + /Show-(Command|ControlPanelItem|EventLog)/, + /Sort-Object/, + /Split-Path/, + /Start-(Job|Process|Service|Sleep|Transaction|Transcript)/, + /Stop-(Computer|Job|Process|Service|Transcript)/, + /Suspend-(Job|Service)/, + /TabExpansion2/, + /Tee-Object/, + /Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/, + /Trace-Command/, + /Unblock-File/, + /Undo-Transaction/, + /Unregister-(Event|PSSessionConfiguration)/, + /Update-(FormatData|Help|List|TypeData)/, + /Use-Transaction/, + /Wait-(Event|Job|Process)/, + /Where-Object/, + /Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/, + /cd|help|mkdir|more|oss|prompt/, + /ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/, + /echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/, + /group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/, + /measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/, + /rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/, + /sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/ + ], { prefix: '', suffix: '' }); + var variableBuiltins = buildRegexp([ + /[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/, + /FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/, + /MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/, + /PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/, + /PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/, + /WarningPreference|WhatIfPreference/, + + /Event|EventArgs|EventSubscriber|Sender/, + /Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/, + /true|false|null/ + ], { prefix: '\\$', suffix: '' }); + + var builtins = buildRegexp([symbolBuiltins, namedBuiltins, variableBuiltins], { suffix: notCharacterOrDash }); + + var grammar = { + keyword: keywords, + number: numbers, + operator: operators, + builtin: builtins, + punctuation: punctuation, + identifier: identifiers + }; + + // tokenizers + function tokenBase(stream, state) { + // Handle Comments + //var ch = stream.peek(); + + var parent = state.returnStack[state.returnStack.length - 1]; + if (parent && parent.shouldReturnFrom(state)) { + state.tokenize = parent.tokenize; + state.returnStack.pop(); + return state.tokenize(stream, state); + } + + if (stream.eatSpace()) { + return null; + } + + if (stream.eat('(')) { + state.bracketNesting += 1; + return 'punctuation'; + } + + if (stream.eat(')')) { + state.bracketNesting -= 1; + return 'punctuation'; + } + + for (var key in grammar) { + if (stream.match(grammar[key])) { + return key; + } + } + + var ch = stream.next(); + + // single-quote string + if (ch === "'") { + return tokenSingleQuoteString(stream, state); + } + + if (ch === '$') { + return tokenVariable(stream, state); + } + + // double-quote string + if (ch === '"') { + return tokenDoubleQuoteString(stream, state); + } + + if (ch === '<' && stream.eat('#')) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + + if (ch === '#') { + stream.skipToEnd(); + return 'comment'; + } + + if (ch === '@') { + var quoteMatch = stream.eat(/["']/); + if (quoteMatch && stream.eol()) { + state.tokenize = tokenMultiString; + state.startQuote = quoteMatch[0]; + return tokenMultiString(stream, state); + } else if (stream.eol()) { + return 'error'; + } else if (stream.peek().match(/[({]/)) { + return 'punctuation'; + } else if (stream.peek().match(varNames)) { + // splatted variable + return tokenVariable(stream, state); + } + } + return 'error'; + } + + function tokenSingleQuoteString(stream, state) { + var ch; + while ((ch = stream.peek()) != null) { + stream.next(); + + if (ch === "'" && !stream.eat("'")) { + state.tokenize = tokenBase; + return 'string'; + } + } + + return 'error'; + } + + function tokenDoubleQuoteString(stream, state) { + var ch; + while ((ch = stream.peek()) != null) { + if (ch === '$') { + state.tokenize = tokenStringInterpolation; + return 'string'; + } + + stream.next(); + if (ch === '`') { + stream.next(); + continue; + } + + if (ch === '"' && !stream.eat('"')) { + state.tokenize = tokenBase; + return 'string'; + } + } + + return 'error'; + } + + function tokenStringInterpolation(stream, state) { + return tokenInterpolation(stream, state, tokenDoubleQuoteString); + } + + function tokenMultiStringReturn(stream, state) { + state.tokenize = tokenMultiString; + state.startQuote = '"' + return tokenMultiString(stream, state); + } + + function tokenHereStringInterpolation(stream, state) { + return tokenInterpolation(stream, state, tokenMultiStringReturn); + } + + function tokenInterpolation(stream, state, parentTokenize) { + if (stream.match('$(')) { + var savedBracketNesting = state.bracketNesting; + state.returnStack.push({ + /*jshint loopfunc:true */ + shouldReturnFrom: function(state) { + return state.bracketNesting === savedBracketNesting; + }, + tokenize: parentTokenize + }); + state.tokenize = tokenBase; + state.bracketNesting += 1; + return 'punctuation'; + } else { + stream.next(); + state.returnStack.push({ + shouldReturnFrom: function() { return true; }, + tokenize: parentTokenize + }); + state.tokenize = tokenVariable; + return state.tokenize(stream, state); + } + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == '>') { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch === '#'); + } + return 'comment'; + } + + function tokenVariable(stream, state) { + var ch = stream.peek(); + if (stream.eat('{')) { + state.tokenize = tokenVariableWithBraces; + return tokenVariableWithBraces(stream, state); + } else if (ch != undefined && ch.match(varNames)) { + stream.eatWhile(varNames); + state.tokenize = tokenBase; + return 'variable-2'; + } else { + state.tokenize = tokenBase; + return 'error'; + } + } + + function tokenVariableWithBraces(stream, state) { + var ch; + while ((ch = stream.next()) != null) { + if (ch === '}') { + state.tokenize = tokenBase; + break; + } + } + return 'variable-2'; + } + + function tokenMultiString(stream, state) { + var quote = state.startQuote; + if (stream.sol() && stream.match(new RegExp(quote + '@'))) { + state.tokenize = tokenBase; + } + else if (quote === '"') { + while (!stream.eol()) { + var ch = stream.peek(); + if (ch === '$') { + state.tokenize = tokenHereStringInterpolation; + return 'string'; + } + + stream.next(); + if (ch === '`') { + stream.next(); + } + } + } + else { + stream.skipToEnd(); + } + + return 'string'; + } + + var external = { + startState: function() { + return { + returnStack: [], + bracketNesting: 0, + tokenize: tokenBase + }; + }, + + token: function(stream, state) { + return state.tokenize(stream, state); + }, + + blockCommentStart: '<#', + blockCommentEnd: '#>', + lineComment: '#', + fold: 'brace' + }; + return external; +}); + +CodeMirror.defineMIME('application/x-powershell', 'powershell'); +}); diff --git a/js/codemirror/mode/powershell/test.js b/js/codemirror/mode/powershell/test.js new file mode 100644 index 0000000..d29174e --- /dev/null +++ b/js/codemirror/mode/powershell/test.js @@ -0,0 +1,74 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "powershell"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + function forEach(arr, f) { for (var i = 0; i < arr.length; i++) f(arr[i], i) } + + MT('comment', '[number 1][comment # A]'); + MT('comment_multiline', '[number 1][comment <#]', + '[comment ABC]', + '[comment #>][number 2]'); + + forEach([ + '0', '1234', + '12kb', '12mb', '12Gb', '12Tb', '12PB', '12L', '12D', '12lkb', '12dtb', + '1.234', '1.234e56', '1.', '1.e2', '.2', '.2e34', + '1.2MB', '1.kb', '.1dTB', '1.e1gb', '.2', '.2e34', + '0x1', '0xabcdef', '0x3tb', '0xelmb' + ], function(number) { + MT("number_" + number, "[number " + number + "]"); + }); + + MT('string_literal_escaping', "[string 'a''']"); + MT('string_literal_variable', "[string 'a $x']"); + MT('string_escaping_1', '[string "a `""]'); + MT('string_escaping_2', '[string "a """]'); + MT('string_variable_escaping', '[string "a `$x"]'); + MT('string_variable', '[string "a ][variable-2 $x][string b"]'); + MT('string_variable_spaces', '[string "a ][variable-2 ${x y}][string b"]'); + MT('string_expression', '[string "a ][punctuation $(][variable-2 $x][operator +][number 3][punctuation )][string b"]'); + MT('string_expression_nested', '[string "A][punctuation $(][string "a][punctuation $(][string "w"][punctuation )][string b"][punctuation )][string B"]'); + + MT('string_heredoc', '[string @"]', + '[string abc]', + '[string "@]'); + MT('string_heredoc_quotes', '[string @"]', + '[string abc "\']', + '[string "@]'); + MT('string_heredoc_variable', '[string @"]', + '[string a ][variable-2 $x][string b]', + '[string "@]'); + MT('string_heredoc_nested_string', '[string @"]', + '[string a][punctuation $(][string "w"][punctuation )][string b]', + '[string "@]'); + MT('string_heredoc_literal_quotes', "[string @']", + '[string abc "\']', + "[string '@]"); + + MT('array', "[punctuation @(][string 'a'][punctuation ,][string 'b'][punctuation )]"); + MT('hash', "[punctuation @{][string 'key'][operator :][string 'value'][punctuation }]"); + + MT('variable', "[variable-2 $test]"); + MT('variable_global', "[variable-2 $global:test]"); + MT('variable_spaces', "[variable-2 ${test test}]"); + MT('operator_splat', "[variable-2 @x]"); + MT('variable_builtin', "[builtin $ErrorActionPreference]"); + MT('variable_builtin_symbols', "[builtin $$]"); + + MT('operator', "[operator +]"); + MT('operator_unary', "[operator +][number 3]"); + MT('operator_long', "[operator -match]"); + + forEach([ + '(', ')', '[[', ']]', '{', '}', ',', '`', ';', '.', '\\' + ], function(punctuation) { + MT("punctuation_" + punctuation.replace(/^[\[\]]/,''), "[punctuation " + punctuation + "]"); + }); + + MT('keyword', "[keyword if]"); + + MT('call_builtin', "[builtin Get-ChildItem]"); +})(); diff --git a/js/codemirror/mode/properties/index.html b/js/codemirror/mode/properties/index.html new file mode 100644 index 0000000..0bc3fa5 --- /dev/null +++ b/js/codemirror/mode/properties/index.html @@ -0,0 +1,53 @@ + + +CodeMirror: Properties files mode + + + + + + + + + +
+

Properties files mode

+
+ + +

MIME types defined: text/x-properties, + text/x-ini.

+ +
diff --git a/js/codemirror/mode/properties/properties.js b/js/codemirror/mode/properties/properties.js new file mode 100644 index 0000000..22dff6e --- /dev/null +++ b/js/codemirror/mode/properties/properties.js @@ -0,0 +1,78 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("properties", function() { + return { + token: function(stream, state) { + var sol = stream.sol() || state.afterSection; + var eol = stream.eol(); + + state.afterSection = false; + + if (sol) { + if (state.nextMultiline) { + state.inMultiline = true; + state.nextMultiline = false; + } else { + state.position = "def"; + } + } + + if (eol && ! state.nextMultiline) { + state.inMultiline = false; + state.position = "def"; + } + + if (sol) { + while(stream.eatSpace()) {} + } + + var ch = stream.next(); + + if (sol && (ch === "#" || ch === "!" || ch === ";")) { + state.position = "comment"; + stream.skipToEnd(); + return "comment"; + } else if (sol && ch === "[") { + state.afterSection = true; + stream.skipTo("]"); stream.eat("]"); + return "header"; + } else if (ch === "=" || ch === ":") { + state.position = "quote"; + return null; + } else if (ch === "\\" && state.position === "quote") { + if (stream.eol()) { // end of line? + // Multiline value + state.nextMultiline = true; + } + } + + return state.position; + }, + + startState: function() { + return { + position : "def", // Current position, "def", "quote" or "comment" + nextMultiline : false, // Is the next line multiline value + inMultiline : false, // Is the current line a multiline value + afterSection : false // Did we just open a section + }; + } + + }; +}); + +CodeMirror.defineMIME("text/x-properties", "properties"); +CodeMirror.defineMIME("text/x-ini", "properties"); + +}); diff --git a/js/codemirror/mode/protobuf/index.html b/js/codemirror/mode/protobuf/index.html new file mode 100644 index 0000000..6b57040 --- /dev/null +++ b/js/codemirror/mode/protobuf/index.html @@ -0,0 +1,104 @@ + + +CodeMirror: ProtoBuf mode + + + + + + + + + +
+

ProtoBuf mode

+
+ +
+ + +

MIME types defined: text/x-protobuf.

+ +
diff --git a/js/codemirror/mode/protobuf/protobuf.js b/js/codemirror/mode/protobuf/protobuf.js new file mode 100644 index 0000000..782bff4 --- /dev/null +++ b/js/codemirror/mode/protobuf/protobuf.js @@ -0,0 +1,72 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); + }; + + var keywordArray = [ + "package", "message", "import", "syntax", + "required", "optional", "repeated", "reserved", "default", "extensions", "packed", + "bool", "bytes", "double", "enum", "float", "string", + "int32", "int64", "uint32", "uint64", "sint32", "sint64", "fixed32", "fixed64", "sfixed32", "sfixed64", + "option", "service", "rpc", "returns" + ]; + var keywords = wordRegexp(keywordArray); + + CodeMirror.registerHelper("hintWords", "protobuf", keywordArray); + + var identifiers = new RegExp("^[_A-Za-z\xa1-\uffff][_A-Za-z0-9\xa1-\uffff]*"); + + function tokenBase(stream) { + // whitespaces + if (stream.eatSpace()) return null; + + // Handle one line Comments + if (stream.match("//")) { + stream.skipToEnd(); + return "comment"; + } + + // Handle Number Literals + if (stream.match(/^[0-9\.+-]/, false)) { + if (stream.match(/^[+-]?0x[0-9a-fA-F]+/)) + return "number"; + if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/)) + return "number"; + if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?/)) + return "number"; + } + + // Handle Strings + if (stream.match(/^"([^"]|(""))*"/)) { return "string"; } + if (stream.match(/^'([^']|(''))*'/)) { return "string"; } + + // Handle words + if (stream.match(keywords)) { return "keyword"; } + if (stream.match(identifiers)) { return "variable"; } ; + + // Handle non-detected items + stream.next(); + return null; + }; + + CodeMirror.defineMode("protobuf", function() { + return { + token: tokenBase, + fold: "brace" + }; + }); + + CodeMirror.defineMIME("text/x-protobuf", "protobuf"); +}); diff --git a/js/codemirror/mode/pug/index.html b/js/codemirror/mode/pug/index.html new file mode 100644 index 0000000..1c85b87 --- /dev/null +++ b/js/codemirror/mode/pug/index.html @@ -0,0 +1,70 @@ + + +CodeMirror: Pug Templating Mode + + + + + + + + + + + + + +
+

Pug Templating Mode

+
+ +

The Pug Templating Mode

+

Created by Forbes Lindesay. Managed as part of a Brackets extension at https://github.com/ForbesLindesay/jade-brackets.

+

MIME type defined: text/x-pug, text/x-jade.

+
diff --git a/js/codemirror/mode/pug/pug.js b/js/codemirror/mode/pug/pug.js new file mode 100644 index 0000000..64f5430 --- /dev/null +++ b/js/codemirror/mode/pug/pug.js @@ -0,0 +1,591 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../javascript/javascript"), require("../css/css"), require("../htmlmixed/htmlmixed")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../javascript/javascript", "../css/css", "../htmlmixed/htmlmixed"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("pug", function (config) { + // token types + var KEYWORD = 'keyword'; + var DOCTYPE = 'meta'; + var ID = 'builtin'; + var CLASS = 'qualifier'; + + var ATTRS_NEST = { + '{': '}', + '(': ')', + '[': ']' + }; + + var jsMode = CodeMirror.getMode(config, 'javascript'); + + function State() { + this.javaScriptLine = false; + this.javaScriptLineExcludesColon = false; + + this.javaScriptArguments = false; + this.javaScriptArgumentsDepth = 0; + + this.isInterpolating = false; + this.interpolationNesting = 0; + + this.jsState = CodeMirror.startState(jsMode); + + this.restOfLine = ''; + + this.isIncludeFiltered = false; + this.isEach = false; + + this.lastTag = ''; + this.scriptType = ''; + + // Attributes Mode + this.isAttrs = false; + this.attrsNest = []; + this.inAttributeName = true; + this.attributeIsType = false; + this.attrValue = ''; + + // Indented Mode + this.indentOf = Infinity; + this.indentToken = ''; + + this.innerMode = null; + this.innerState = null; + + this.innerModeForLine = false; + } + /** + * Safely copy a state + * + * @return {State} + */ + State.prototype.copy = function () { + var res = new State(); + res.javaScriptLine = this.javaScriptLine; + res.javaScriptLineExcludesColon = this.javaScriptLineExcludesColon; + res.javaScriptArguments = this.javaScriptArguments; + res.javaScriptArgumentsDepth = this.javaScriptArgumentsDepth; + res.isInterpolating = this.isInterpolating; + res.interpolationNesting = this.interpolationNesting; + + res.jsState = CodeMirror.copyState(jsMode, this.jsState); + + res.innerMode = this.innerMode; + if (this.innerMode && this.innerState) { + res.innerState = CodeMirror.copyState(this.innerMode, this.innerState); + } + + res.restOfLine = this.restOfLine; + + res.isIncludeFiltered = this.isIncludeFiltered; + res.isEach = this.isEach; + res.lastTag = this.lastTag; + res.scriptType = this.scriptType; + res.isAttrs = this.isAttrs; + res.attrsNest = this.attrsNest.slice(); + res.inAttributeName = this.inAttributeName; + res.attributeIsType = this.attributeIsType; + res.attrValue = this.attrValue; + res.indentOf = this.indentOf; + res.indentToken = this.indentToken; + + res.innerModeForLine = this.innerModeForLine; + + return res; + }; + + function javaScript(stream, state) { + if (stream.sol()) { + // if javaScriptLine was set at end of line, ignore it + state.javaScriptLine = false; + state.javaScriptLineExcludesColon = false; + } + if (state.javaScriptLine) { + if (state.javaScriptLineExcludesColon && stream.peek() === ':') { + state.javaScriptLine = false; + state.javaScriptLineExcludesColon = false; + return; + } + var tok = jsMode.token(stream, state.jsState); + if (stream.eol()) state.javaScriptLine = false; + return tok || true; + } + } + function javaScriptArguments(stream, state) { + if (state.javaScriptArguments) { + if (state.javaScriptArgumentsDepth === 0 && stream.peek() !== '(') { + state.javaScriptArguments = false; + return; + } + if (stream.peek() === '(') { + state.javaScriptArgumentsDepth++; + } else if (stream.peek() === ')') { + state.javaScriptArgumentsDepth--; + } + if (state.javaScriptArgumentsDepth === 0) { + state.javaScriptArguments = false; + return; + } + + var tok = jsMode.token(stream, state.jsState); + return tok || true; + } + } + + function yieldStatement(stream) { + if (stream.match(/^yield\b/)) { + return 'keyword'; + } + } + + function doctype(stream) { + if (stream.match(/^(?:doctype) *([^\n]+)?/)) { + return DOCTYPE; + } + } + + function interpolation(stream, state) { + if (stream.match('#{')) { + state.isInterpolating = true; + state.interpolationNesting = 0; + return 'punctuation'; + } + } + + function interpolationContinued(stream, state) { + if (state.isInterpolating) { + if (stream.peek() === '}') { + state.interpolationNesting--; + if (state.interpolationNesting < 0) { + stream.next(); + state.isInterpolating = false; + return 'punctuation'; + } + } else if (stream.peek() === '{') { + state.interpolationNesting++; + } + return jsMode.token(stream, state.jsState) || true; + } + } + + function caseStatement(stream, state) { + if (stream.match(/^case\b/)) { + state.javaScriptLine = true; + return KEYWORD; + } + } + + function when(stream, state) { + if (stream.match(/^when\b/)) { + state.javaScriptLine = true; + state.javaScriptLineExcludesColon = true; + return KEYWORD; + } + } + + function defaultStatement(stream) { + if (stream.match(/^default\b/)) { + return KEYWORD; + } + } + + function extendsStatement(stream, state) { + if (stream.match(/^extends?\b/)) { + state.restOfLine = 'string'; + return KEYWORD; + } + } + + function append(stream, state) { + if (stream.match(/^append\b/)) { + state.restOfLine = 'variable'; + return KEYWORD; + } + } + function prepend(stream, state) { + if (stream.match(/^prepend\b/)) { + state.restOfLine = 'variable'; + return KEYWORD; + } + } + function block(stream, state) { + if (stream.match(/^block\b *(?:(prepend|append)\b)?/)) { + state.restOfLine = 'variable'; + return KEYWORD; + } + } + + function include(stream, state) { + if (stream.match(/^include\b/)) { + state.restOfLine = 'string'; + return KEYWORD; + } + } + + function includeFiltered(stream, state) { + if (stream.match(/^include:([a-zA-Z0-9\-]+)/, false) && stream.match('include')) { + state.isIncludeFiltered = true; + return KEYWORD; + } + } + + function includeFilteredContinued(stream, state) { + if (state.isIncludeFiltered) { + var tok = filter(stream, state); + state.isIncludeFiltered = false; + state.restOfLine = 'string'; + return tok; + } + } + + function mixin(stream, state) { + if (stream.match(/^mixin\b/)) { + state.javaScriptLine = true; + return KEYWORD; + } + } + + function call(stream, state) { + if (stream.match(/^\+([-\w]+)/)) { + if (!stream.match(/^\( *[-\w]+ *=/, false)) { + state.javaScriptArguments = true; + state.javaScriptArgumentsDepth = 0; + } + return 'variable'; + } + if (stream.match('+#{', false)) { + stream.next(); + state.mixinCallAfter = true; + return interpolation(stream, state); + } + } + function callArguments(stream, state) { + if (state.mixinCallAfter) { + state.mixinCallAfter = false; + if (!stream.match(/^\( *[-\w]+ *=/, false)) { + state.javaScriptArguments = true; + state.javaScriptArgumentsDepth = 0; + } + return true; + } + } + + function conditional(stream, state) { + if (stream.match(/^(if|unless|else if|else)\b/)) { + state.javaScriptLine = true; + return KEYWORD; + } + } + + function each(stream, state) { + if (stream.match(/^(- *)?(each|for)\b/)) { + state.isEach = true; + return KEYWORD; + } + } + function eachContinued(stream, state) { + if (state.isEach) { + if (stream.match(/^ in\b/)) { + state.javaScriptLine = true; + state.isEach = false; + return KEYWORD; + } else if (stream.sol() || stream.eol()) { + state.isEach = false; + } else if (stream.next()) { + while (!stream.match(/^ in\b/, false) && stream.next()); + return 'variable'; + } + } + } + + function whileStatement(stream, state) { + if (stream.match(/^while\b/)) { + state.javaScriptLine = true; + return KEYWORD; + } + } + + function tag(stream, state) { + var captures; + if (captures = stream.match(/^(\w(?:[-:\w]*\w)?)\/?/)) { + state.lastTag = captures[1].toLowerCase(); + if (state.lastTag === 'script') { + state.scriptType = 'application/javascript'; + } + return 'tag'; + } + } + + function filter(stream, state) { + if (stream.match(/^:([\w\-]+)/)) { + var innerMode; + if (config && config.innerModes) { + innerMode = config.innerModes(stream.current().substring(1)); + } + if (!innerMode) { + innerMode = stream.current().substring(1); + } + if (typeof innerMode === 'string') { + innerMode = CodeMirror.getMode(config, innerMode); + } + setInnerMode(stream, state, innerMode); + return 'atom'; + } + } + + function code(stream, state) { + if (stream.match(/^(!?=|-)/)) { + state.javaScriptLine = true; + return 'punctuation'; + } + } + + function id(stream) { + if (stream.match(/^#([\w-]+)/)) { + return ID; + } + } + + function className(stream) { + if (stream.match(/^\.([\w-]+)/)) { + return CLASS; + } + } + + function attrs(stream, state) { + if (stream.peek() == '(') { + stream.next(); + state.isAttrs = true; + state.attrsNest = []; + state.inAttributeName = true; + state.attrValue = ''; + state.attributeIsType = false; + return 'punctuation'; + } + } + + function attrsContinued(stream, state) { + if (state.isAttrs) { + if (ATTRS_NEST[stream.peek()]) { + state.attrsNest.push(ATTRS_NEST[stream.peek()]); + } + if (state.attrsNest[state.attrsNest.length - 1] === stream.peek()) { + state.attrsNest.pop(); + } else if (stream.eat(')')) { + state.isAttrs = false; + return 'punctuation'; + } + if (state.inAttributeName && stream.match(/^[^=,\)!]+/)) { + if (stream.peek() === '=' || stream.peek() === '!') { + state.inAttributeName = false; + state.jsState = CodeMirror.startState(jsMode); + if (state.lastTag === 'script' && stream.current().trim().toLowerCase() === 'type') { + state.attributeIsType = true; + } else { + state.attributeIsType = false; + } + } + return 'attribute'; + } + + var tok = jsMode.token(stream, state.jsState); + if (state.attributeIsType && tok === 'string') { + state.scriptType = stream.current().toString(); + } + if (state.attrsNest.length === 0 && (tok === 'string' || tok === 'variable' || tok === 'keyword')) { + try { + Function('', 'var x ' + state.attrValue.replace(/,\s*$/, '').replace(/^!/, '')); + state.inAttributeName = true; + state.attrValue = ''; + stream.backUp(stream.current().length); + return attrsContinued(stream, state); + } catch (ex) { + //not the end of an attribute + } + } + state.attrValue += stream.current(); + return tok || true; + } + } + + function attributesBlock(stream, state) { + if (stream.match(/^&attributes\b/)) { + state.javaScriptArguments = true; + state.javaScriptArgumentsDepth = 0; + return 'keyword'; + } + } + + function indent(stream) { + if (stream.sol() && stream.eatSpace()) { + return 'indent'; + } + } + + function comment(stream, state) { + if (stream.match(/^ *\/\/(-)?([^\n]*)/)) { + state.indentOf = stream.indentation(); + state.indentToken = 'comment'; + return 'comment'; + } + } + + function colon(stream) { + if (stream.match(/^: */)) { + return 'colon'; + } + } + + function text(stream, state) { + if (stream.match(/^(?:\| ?| )([^\n]+)/)) { + return 'string'; + } + if (stream.match(/^(<[^\n]*)/, false)) { + // html string + setInnerMode(stream, state, 'htmlmixed'); + state.innerModeForLine = true; + return innerMode(stream, state, true); + } + } + + function dot(stream, state) { + if (stream.eat('.')) { + var innerMode = null; + if (state.lastTag === 'script' && state.scriptType.toLowerCase().indexOf('javascript') != -1) { + innerMode = state.scriptType.toLowerCase().replace(/"|'/g, ''); + } else if (state.lastTag === 'style') { + innerMode = 'css'; + } + setInnerMode(stream, state, innerMode); + return 'dot'; + } + } + + function fail(stream) { + stream.next(); + return null; + } + + + function setInnerMode(stream, state, mode) { + mode = CodeMirror.mimeModes[mode] || mode; + mode = config.innerModes ? config.innerModes(mode) || mode : mode; + mode = CodeMirror.mimeModes[mode] || mode; + mode = CodeMirror.getMode(config, mode); + state.indentOf = stream.indentation(); + + if (mode && mode.name !== 'null') { + state.innerMode = mode; + } else { + state.indentToken = 'string'; + } + } + function innerMode(stream, state, force) { + if (stream.indentation() > state.indentOf || (state.innerModeForLine && !stream.sol()) || force) { + if (state.innerMode) { + if (!state.innerState) { + state.innerState = state.innerMode.startState ? CodeMirror.startState(state.innerMode, stream.indentation()) : {}; + } + return stream.hideFirstChars(state.indentOf + 2, function () { + return state.innerMode.token(stream, state.innerState) || true; + }); + } else { + stream.skipToEnd(); + return state.indentToken; + } + } else if (stream.sol()) { + state.indentOf = Infinity; + state.indentToken = null; + state.innerMode = null; + state.innerState = null; + } + } + function restOfLine(stream, state) { + if (stream.sol()) { + // if restOfLine was set at end of line, ignore it + state.restOfLine = ''; + } + if (state.restOfLine) { + stream.skipToEnd(); + var tok = state.restOfLine; + state.restOfLine = ''; + return tok; + } + } + + + function startState() { + return new State(); + } + function copyState(state) { + return state.copy(); + } + /** + * Get the next token in the stream + * + * @param {Stream} stream + * @param {State} state + */ + function nextToken(stream, state) { + var tok = innerMode(stream, state) + || restOfLine(stream, state) + || interpolationContinued(stream, state) + || includeFilteredContinued(stream, state) + || eachContinued(stream, state) + || attrsContinued(stream, state) + || javaScript(stream, state) + || javaScriptArguments(stream, state) + || callArguments(stream, state) + + || yieldStatement(stream) + || doctype(stream) + || interpolation(stream, state) + || caseStatement(stream, state) + || when(stream, state) + || defaultStatement(stream) + || extendsStatement(stream, state) + || append(stream, state) + || prepend(stream, state) + || block(stream, state) + || include(stream, state) + || includeFiltered(stream, state) + || mixin(stream, state) + || call(stream, state) + || conditional(stream, state) + || each(stream, state) + || whileStatement(stream, state) + || tag(stream, state) + || filter(stream, state) + || code(stream, state) + || id(stream) + || className(stream) + || attrs(stream, state) + || attributesBlock(stream, state) + || indent(stream) + || text(stream, state) + || comment(stream, state) + || colon(stream) + || dot(stream, state) + || fail(stream); + + return tok === true ? null : tok; + } + return { + startState: startState, + copyState: copyState, + token: nextToken + }; +}, 'javascript', 'css', 'htmlmixed'); + +CodeMirror.defineMIME('text/x-pug', 'pug'); +CodeMirror.defineMIME('text/x-jade', 'pug'); + +}); diff --git a/js/codemirror/mode/puppet/index.html b/js/codemirror/mode/puppet/index.html new file mode 100644 index 0000000..c4d7da4 --- /dev/null +++ b/js/codemirror/mode/puppet/index.html @@ -0,0 +1,121 @@ + + +CodeMirror: Puppet mode + + + + + + + + + + +
+

Puppet mode

+
+ + +

MIME types defined: text/x-puppet.

+ +
diff --git a/js/codemirror/mode/puppet/puppet.js b/js/codemirror/mode/puppet/puppet.js new file mode 100644 index 0000000..412e850 --- /dev/null +++ b/js/codemirror/mode/puppet/puppet.js @@ -0,0 +1,220 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("puppet", function () { + // Stores the words from the define method + var words = {}; + // Taken, mostly, from the Puppet official variable standards regex + var variable_regex = /({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/; + + // Takes a string of words separated by spaces and adds them as + // keys with the value of the first argument 'style' + function define(style, string) { + var split = string.split(' '); + for (var i = 0; i < split.length; i++) { + words[split[i]] = style; + } + } + + // Takes commonly known puppet types/words and classifies them to a style + define('keyword', 'class define site node include import inherits'); + define('keyword', 'case if else in and elsif default or'); + define('atom', 'false true running present absent file directory undef'); + define('builtin', 'action augeas burst chain computer cron destination dport exec ' + + 'file filebucket group host icmp iniface interface jump k5login limit log_level ' + + 'log_prefix macauthorization mailalias maillist mcx mount nagios_command ' + + 'nagios_contact nagios_contactgroup nagios_host nagios_hostdependency ' + + 'nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service ' + + 'nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo ' + + 'nagios_servicegroup nagios_timeperiod name notify outiface package proto reject ' + + 'resources router schedule scheduled_task selboolean selmodule service source ' + + 'sport ssh_authorized_key sshkey stage state table tidy todest toports tosource ' + + 'user vlan yumrepo zfs zone zpool'); + + // After finding a start of a string ('|") this function attempts to find the end; + // If a variable is encountered along the way, we display it differently when it + // is encapsulated in a double-quoted string. + function tokenString(stream, state) { + var current, prev, found_var = false; + while (!stream.eol() && (current = stream.next()) != state.pending) { + if (current === '$' && prev != '\\' && state.pending == '"') { + found_var = true; + break; + } + prev = current; + } + if (found_var) { + stream.backUp(1); + } + if (current == state.pending) { + state.continueString = false; + } else { + state.continueString = true; + } + return "string"; + } + + // Main function + function tokenize(stream, state) { + // Matches one whole word + var word = stream.match(/[\w]+/, false); + // Matches attributes (i.e. ensure => present ; 'ensure' would be matched) + var attribute = stream.match(/(\s+)?\w+\s+=>.*/, false); + // Matches non-builtin resource declarations + // (i.e. "apache::vhost {" or "mycustomclasss {" would be matched) + var resource = stream.match(/(\s+)?[\w:_]+(\s+)?{/, false); + // Matches virtual and exported resources (i.e. @@user { ; and the like) + var special_resource = stream.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/, false); + + // Finally advance the stream + var ch = stream.next(); + + // Have we found a variable? + if (ch === '$') { + if (stream.match(variable_regex)) { + // If so, and its in a string, assign it a different color + return state.continueString ? 'variable-2' : 'variable'; + } + // Otherwise return an invalid variable + return "error"; + } + // Should we still be looking for the end of a string? + if (state.continueString) { + // If so, go through the loop again + stream.backUp(1); + return tokenString(stream, state); + } + // Are we in a definition (class, node, define)? + if (state.inDefinition) { + // If so, return def (i.e. for 'class myclass {' ; 'myclass' would be matched) + if (stream.match(/(\s+)?[\w:_]+(\s+)?/)) { + return 'def'; + } + // Match the rest it the next time around + stream.match(/\s+{/); + state.inDefinition = false; + } + // Are we in an 'include' statement? + if (state.inInclude) { + // Match and return the included class + stream.match(/(\s+)?\S+(\s+)?/); + state.inInclude = false; + return 'def'; + } + // Do we just have a function on our hands? + // In 'ensure_resource("myclass")', 'ensure_resource' is matched + if (stream.match(/(\s+)?\w+\(/)) { + stream.backUp(1); + return 'def'; + } + // Have we matched the prior attribute regex? + if (attribute) { + stream.match(/(\s+)?\w+/); + return 'tag'; + } + // Do we have Puppet specific words? + if (word && words.hasOwnProperty(word)) { + // Negates the initial next() + stream.backUp(1); + // rs move the stream + stream.match(/[\w]+/); + // We want to process these words differently + // do to the importance they have in Puppet + if (stream.match(/\s+\S+\s+{/, false)) { + state.inDefinition = true; + } + if (word == 'include') { + state.inInclude = true; + } + // Returns their value as state in the prior define methods + return words[word]; + } + // Is there a match on a reference? + if (/(^|\s+)[A-Z][\w:_]+/.test(word)) { + // Negate the next() + stream.backUp(1); + // Match the full reference + stream.match(/(^|\s+)[A-Z][\w:_]+/); + return 'def'; + } + // Have we matched the prior resource regex? + if (resource) { + stream.match(/(\s+)?[\w:_]+/); + return 'def'; + } + // Have we matched the prior special_resource regex? + if (special_resource) { + stream.match(/(\s+)?[@]{1,2}/); + return 'special'; + } + // Match all the comments. All of them. + if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + // Have we found a string? + if (ch == "'" || ch == '"') { + // Store the type (single or double) + state.pending = ch; + // Perform the looping function to find the end + return tokenString(stream, state); + } + // Match all the brackets + if (ch == '{' || ch == '}') { + return 'bracket'; + } + // Match characters that we are going to assume + // are trying to be regex + if (ch == '/') { + stream.match(/^[^\/]*\//); + return 'variable-3'; + } + // Match all the numbers + if (ch.match(/[0-9]/)) { + stream.eatWhile(/[0-9]+/); + return 'number'; + } + // Match the '=' and '=>' operators + if (ch == '=') { + if (stream.peek() == '>') { + stream.next(); + } + return "operator"; + } + // Keep advancing through all the rest + stream.eatWhile(/[\w-]/); + // Return a blank line for everything else + return null; + } + // Start it all + return { + startState: function () { + var state = {}; + state.inDefinition = false; + state.inInclude = false; + state.continueString = false; + state.pending = false; + return state; + }, + token: function (stream, state) { + // Strip the spaces, but regex will account for them eitherway + if (stream.eatSpace()) return null; + // Go through the main process + return tokenize(stream, state); + } + }; +}); + +CodeMirror.defineMIME("text/x-puppet", "puppet"); + +}); diff --git a/js/codemirror/mode/python/index.html b/js/codemirror/mode/python/index.html new file mode 100644 index 0000000..edf958f --- /dev/null +++ b/js/codemirror/mode/python/index.html @@ -0,0 +1,207 @@ + + +CodeMirror: Python mode + + + + + + + + + + +
+

Python mode

+ +
+ + +

Cython mode

+ +
+ + +

Configuration Options for Python mode:

+
    +
  • version - 2/3 - The version of Python to recognize. Default is 3.
  • +
  • singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.
  • +
  • hangingIndent - int - If you want to write long arguments to a function starting on a new line, how much that line should be indented. Defaults to one normal indentation unit.
  • +
+

Advanced Configuration Options:

+

Useful for superset of python syntax like Enthought enaml, IPython magics and questionmark help

+
    +
  • singleOperators - RegEx - Regular Expression for single operator matching, default :
    ^[\\+\\-\\*/%&|\\^~<>!]
    including
    @
    on Python 3
  • +
  • singleDelimiters - RegEx - Regular Expression for single delimiter matching, default :
    ^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]
  • +
  • doubleOperators - RegEx - Regular Expression for double operators matching, default :
    ^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))
  • +
  • doubleDelimiters - RegEx - Regular Expression for double delimiters matching, default :
    ^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))
  • +
  • tripleDelimiters - RegEx - Regular Expression for triple delimiters matching, default :
    ^((//=)|(>>=)|(<<=)|(\\*\\*=))
  • +
  • identifiers - RegEx - Regular Expression for identifier, default :
    ^[_A-Za-z][_A-Za-z0-9]*
    on Python 2 and
    ^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*
    on Python 3.
  • +
  • extra_keywords - list of string - List of extra words ton consider as keywords
  • +
  • extra_builtins - list of string - List of extra words ton consider as builtins
  • +
+ + +

MIME types defined: text/x-python and text/x-cython.

+
diff --git a/js/codemirror/mode/python/python.js b/js/codemirror/mode/python/python.js new file mode 100644 index 0000000..3946cee --- /dev/null +++ b/js/codemirror/mode/python/python.js @@ -0,0 +1,402 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var wordOperators = wordRegexp(["and", "or", "not", "is"]); + var commonKeywords = ["as", "assert", "break", "class", "continue", + "def", "del", "elif", "else", "except", "finally", + "for", "from", "global", "if", "import", + "lambda", "pass", "raise", "return", + "try", "while", "with", "yield", "in", "False", "True"]; + var commonBuiltins = ["abs", "all", "any", "bin", "bool", "bytearray", "callable", "chr", + "classmethod", "compile", "complex", "delattr", "dict", "dir", "divmod", + "enumerate", "eval", "filter", "float", "format", "frozenset", + "getattr", "globals", "hasattr", "hash", "help", "hex", "id", + "input", "int", "isinstance", "issubclass", "iter", "len", + "list", "locals", "map", "max", "memoryview", "min", "next", + "object", "oct", "open", "ord", "pow", "property", "range", + "repr", "reversed", "round", "set", "setattr", "slice", + "sorted", "staticmethod", "str", "sum", "super", "tuple", + "type", "vars", "zip", "__import__", "NotImplemented", + "Ellipsis", "__debug__"]; + CodeMirror.registerHelper("hintWords", "python", commonKeywords.concat(commonBuiltins).concat(["exec", "print"])); + + function top(state) { + return state.scopes[state.scopes.length - 1]; + } + + CodeMirror.defineMode("python", function(conf, parserConf) { + var ERRORCLASS = "error"; + + var delimiters = parserConf.delimiters || parserConf.singleDelimiters || /^[\(\)\[\]\{\}@,:`=;\.\\]/; + // (Backwards-compatibility with old, cumbersome config system) + var operators = [parserConf.singleOperators, parserConf.doubleOperators, parserConf.doubleDelimiters, parserConf.tripleDelimiters, + parserConf.operators || /^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@]|\.\.\.)/] + for (var i = 0; i < operators.length; i++) if (!operators[i]) operators.splice(i--, 1) + + var hangingIndent = parserConf.hangingIndent || conf.indentUnit; + + var myKeywords = commonKeywords, myBuiltins = commonBuiltins; + if (parserConf.extra_keywords != undefined) + myKeywords = myKeywords.concat(parserConf.extra_keywords); + + if (parserConf.extra_builtins != undefined) + myBuiltins = myBuiltins.concat(parserConf.extra_builtins); + + var py3 = !(parserConf.version && Number(parserConf.version) < 3) + if (py3) { + // since http://legacy.python.org/dev/peps/pep-0465/ @ is also an operator + var identifiers = parserConf.identifiers|| /^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/; + myKeywords = myKeywords.concat(["nonlocal", "None", "aiter", "anext", "async", "await", "breakpoint", "match", "case"]); + myBuiltins = myBuiltins.concat(["ascii", "bytes", "exec", "print"]); + var stringPrefixes = new RegExp("^(([rbuf]|(br)|(rb)|(fr)|(rf))?('{3}|\"{3}|['\"]))", "i"); + } else { + var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*/; + myKeywords = myKeywords.concat(["exec", "print"]); + myBuiltins = myBuiltins.concat(["apply", "basestring", "buffer", "cmp", "coerce", "execfile", + "file", "intern", "long", "raw_input", "reduce", "reload", + "unichr", "unicode", "xrange", "None"]); + var stringPrefixes = new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); + } + var keywords = wordRegexp(myKeywords); + var builtins = wordRegexp(myBuiltins); + + // tokenizers + function tokenBase(stream, state) { + var sol = stream.sol() && state.lastToken != "\\" + if (sol) state.indent = stream.indentation() + // Handle scope changes + if (sol && top(state).type == "py") { + var scopeOffset = top(state).offset; + if (stream.eatSpace()) { + var lineOffset = stream.indentation(); + if (lineOffset > scopeOffset) + pushPyScope(state); + else if (lineOffset < scopeOffset && dedent(stream, state) && stream.peek() != "#") + state.errorToken = true; + return null; + } else { + var style = tokenBaseInner(stream, state); + if (scopeOffset > 0 && dedent(stream, state)) + style += " " + ERRORCLASS; + return style; + } + } + return tokenBaseInner(stream, state); + } + + function tokenBaseInner(stream, state, inFormat) { + if (stream.eatSpace()) return null; + + // Handle Comments + if (!inFormat && stream.match(/^#.*/)) return "comment"; + + // Handle Number Literals + if (stream.match(/^[0-9\.]/, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; } + if (stream.match(/^[\d_]+\.\d*/)) { floatLiteral = true; } + if (stream.match(/^\.\d+/)) { floatLiteral = true; } + if (floatLiteral) { + // Float literals may be "imaginary" + stream.eat(/J/i); + return "number"; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^0x[0-9a-f_]+/i)) intLiteral = true; + // Binary + if (stream.match(/^0b[01_]+/i)) intLiteral = true; + // Octal + if (stream.match(/^0o[0-7_]+/i)) intLiteral = true; + // Decimal + if (stream.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + if (stream.match(/^0(?![\dx])/i)) intLiteral = true; + if (intLiteral) { + // Integer literals may be "long" + stream.eat(/L/i); + return "number"; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + var isFmtString = stream.current().toLowerCase().indexOf('f') !== -1; + if (!isFmtString) { + state.tokenize = tokenStringFactory(stream.current(), state.tokenize); + return state.tokenize(stream, state); + } else { + state.tokenize = formatStringFactory(stream.current(), state.tokenize); + return state.tokenize(stream, state); + } + } + + for (var i = 0; i < operators.length; i++) + if (stream.match(operators[i])) return "operator" + + if (stream.match(delimiters)) return "punctuation"; + + if (state.lastToken == "." && stream.match(identifiers)) + return "property"; + + if (stream.match(keywords) || stream.match(wordOperators)) + return "keyword"; + + if (stream.match(builtins)) + return "builtin"; + + if (stream.match(/^(self|cls)\b/)) + return "variable-2"; + + if (stream.match(identifiers)) { + if (state.lastToken == "def" || state.lastToken == "class") + return "def"; + return "variable"; + } + + // Handle non-detected items + stream.next(); + return inFormat ? null :ERRORCLASS; + } + + function formatStringFactory(delimiter, tokenOuter) { + while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0) + delimiter = delimiter.substr(1); + + var singleline = delimiter.length == 1; + var OUTCLASS = "string"; + + function tokenNestedExpr(depth) { + return function(stream, state) { + var inner = tokenBaseInner(stream, state, true) + if (inner == "punctuation") { + if (stream.current() == "{") { + state.tokenize = tokenNestedExpr(depth + 1) + } else if (stream.current() == "}") { + if (depth > 1) state.tokenize = tokenNestedExpr(depth - 1) + else state.tokenize = tokenString + } + } + return inner + } + } + + function tokenString(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\{\}\\]/); + if (stream.eat("\\")) { + stream.next(); + if (singleline && stream.eol()) + return OUTCLASS; + } else if (stream.match(delimiter)) { + state.tokenize = tokenOuter; + return OUTCLASS; + } else if (stream.match('{{')) { + // ignore {{ in f-str + return OUTCLASS; + } else if (stream.match('{', false)) { + // switch to nested mode + state.tokenize = tokenNestedExpr(0) + if (stream.current()) return OUTCLASS; + else return state.tokenize(stream, state) + } else if (stream.match('}}')) { + return OUTCLASS; + } else if (stream.match('}')) { + // single } in f-string is an error + return ERRORCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) + return ERRORCLASS; + else + state.tokenize = tokenOuter; + } + return OUTCLASS; + } + tokenString.isString = true; + return tokenString; + } + + function tokenStringFactory(delimiter, tokenOuter) { + while ("rubf".indexOf(delimiter.charAt(0).toLowerCase()) >= 0) + delimiter = delimiter.substr(1); + + var singleline = delimiter.length == 1; + var OUTCLASS = "string"; + + function tokenString(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\\]/); + if (stream.eat("\\")) { + stream.next(); + if (singleline && stream.eol()) + return OUTCLASS; + } else if (stream.match(delimiter)) { + state.tokenize = tokenOuter; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) + return ERRORCLASS; + else + state.tokenize = tokenOuter; + } + return OUTCLASS; + } + tokenString.isString = true; + return tokenString; + } + + function pushPyScope(state) { + while (top(state).type != "py") state.scopes.pop() + state.scopes.push({offset: top(state).offset + conf.indentUnit, + type: "py", + align: null}) + } + + function pushBracketScope(stream, state, type) { + var align = stream.match(/^[\s\[\{\(]*(?:#|$)/, false) ? null : stream.column() + 1 + state.scopes.push({offset: state.indent + hangingIndent, + type: type, + align: align}) + } + + function dedent(stream, state) { + var indented = stream.indentation(); + while (state.scopes.length > 1 && top(state).offset > indented) { + if (top(state).type != "py") return true; + state.scopes.pop(); + } + return top(state).offset != indented; + } + + function tokenLexer(stream, state) { + if (stream.sol()) { + state.beginningOfLine = true; + state.dedent = false; + } + + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle decorators + if (state.beginningOfLine && current == "@") + return stream.match(identifiers, false) ? "meta" : py3 ? "operator" : ERRORCLASS; + + if (/\S/.test(current)) state.beginningOfLine = false; + + if ((style == "variable" || style == "builtin") + && state.lastToken == "meta") + style = "meta"; + + // Handle scope changes. + if (current == "pass" || current == "return") + state.dedent = true; + + if (current == "lambda") state.lambda = true; + if (current == ":" && !state.lambda && top(state).type == "py" && stream.match(/^\s*(?:#|$)/, false)) + pushPyScope(state); + + if (current.length == 1 && !/string|comment/.test(style)) { + var delimiter_index = "[({".indexOf(current); + if (delimiter_index != -1) + pushBracketScope(stream, state, "])}".slice(delimiter_index, delimiter_index+1)); + + delimiter_index = "])}".indexOf(current); + if (delimiter_index != -1) { + if (top(state).type == current) state.indent = state.scopes.pop().offset - hangingIndent + else return ERRORCLASS; + } + } + if (state.dedent && stream.eol() && top(state).type == "py" && state.scopes.length > 1) + state.scopes.pop(); + + return style; + } + + var external = { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + scopes: [{offset: basecolumn || 0, type: "py", align: null}], + indent: basecolumn || 0, + lastToken: null, + lambda: false, + dedent: 0 + }; + }, + + token: function(stream, state) { + var addErr = state.errorToken; + if (addErr) state.errorToken = false; + var style = tokenLexer(stream, state); + + if (style && style != "comment") + state.lastToken = (style == "keyword" || style == "punctuation") ? stream.current() : style; + if (style == "punctuation") style = null; + + if (stream.eol() && state.lambda) + state.lambda = false; + return addErr ? style + " " + ERRORCLASS : style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) + return state.tokenize.isString ? CodeMirror.Pass : 0; + + var scope = top(state) + var closing = scope.type == textAfter.charAt(0) || + scope.type == "py" && !state.dedent && /^(else:|elif |except |finally:)/.test(textAfter) + if (scope.align != null) + return scope.align - (closing ? 1 : 0) + else + return scope.offset - (closing ? hangingIndent : 0) + }, + + electricInput: /^\s*([\}\]\)]|else:|elif |except |finally:)$/, + closeBrackets: {triples: "'\""}, + lineComment: "#", + fold: "indent" + }; + return external; + }); + + CodeMirror.defineMIME("text/x-python", "python"); + + var words = function(str) { return str.split(" "); }; + + CodeMirror.defineMIME("text/x-cython", { + name: "python", + extra_keywords: words("by cdef cimport cpdef ctypedef enum except "+ + "extern gil include nogil property public "+ + "readonly struct union DEF IF ELIF ELSE") + }); + +}); diff --git a/js/codemirror/mode/python/test.js b/js/codemirror/mode/python/test.js new file mode 100644 index 0000000..ade5498 --- /dev/null +++ b/js/codemirror/mode/python/test.js @@ -0,0 +1,89 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 4}, + {name: "python", + version: 3, + singleLineStringErrors: false}); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Error, because "foobarhello" is neither a known type or property, but + // property was expected (after "and"), and it should be in parentheses. + MT("decoratorStartOfLine", + "[meta @dec]", + "[keyword def] [def function]():", + " [keyword pass]"); + + MT("decoratorIndented", + "[keyword class] [def Foo]:", + " [meta @dec]", + " [keyword def] [def function]():", + " [keyword pass]"); + + MT("matmulWithSpace:", "[variable a] [operator @] [variable b]"); + MT("matmulWithoutSpace:", "[variable a][operator @][variable b]"); + MT("matmulSpaceBefore:", "[variable a] [operator @][variable b]"); + var before_equal_sign = ["+", "-", "*", "/", "=", "!", ">", "<"]; + for (var i = 0; i < before_equal_sign.length; ++i) { + var c = before_equal_sign[i] + MT("before_equal_sign_" + c, "[variable a] [operator " + c + "=] [variable b]"); + } + + MT("fValidStringPrefix", "[string f'this is a]{[variable formatted]}[string string']"); + MT("fValidExpressionInFString", "[string f'expression ]{[number 100][operator *][number 5]}[string string']"); + MT("fInvalidFString", "[error f'this is wrong}]"); + MT("fNestedFString", "[string f'expression ]{[number 100] [operator +] [string f'inner]{[number 5]}[string ']}[string string']"); + MT("uValidStringPrefix", "[string u'this is an unicode string']"); + + MT("nestedString", "[string f']{[variable b][[ [string \"c\"] ]]}[string f'] [comment # oops]") + + MT("bracesInFString", "[string f']{[variable x] [operator +] {}}[string !']") + + MT("nestedFString", "[string f']{[variable b][[ [string f\"c\"] ]]}[string f'] [comment # oops]") + + MT("dontIndentTypeDecl", + "[variable i]: [builtin int] [operator =] [number 32]", + "[builtin print]([variable i])") + + MT("dedentElse", + "[keyword if] [variable x]:", + " [variable foo]()", + "[keyword elif] [variable y]:", + " [variable bar]()", + "[keyword else]:", + " [variable baz]()") + + MT("dedentElsePass", + "[keyword if] [variable x]:", + " [keyword pass]", + "[keyword elif] [variable y]:", + " [keyword pass]", + "[keyword else]:", + " [keyword pass]") + + MT("dedentElseInFunction", + "[keyword def] [def foo]():", + " [keyword if] [variable x]:", + " [variable foo]()", + " [keyword elif] [variable y]:", + " [variable bar]()", + " [keyword pass]", + " [keyword else]:", + " [variable baz]()") + + MT("dedentCase", + "[keyword match] [variable x]:", + " [keyword case] [variable y]:", + " [variable foo]()") + MT("dedentCasePass", + "[keyword match] [variable x]:", + " [keyword case] [variable y]:", + " [keyword pass]") + + MT("dedentCaseInFunction", + "[keyword def] [def foo]():", + " [keyword match] [variable x]:", + " [keyword case] [variable y]:", + " [variable foo]()") +})(); diff --git a/js/codemirror/mode/q/index.html b/js/codemirror/mode/q/index.html new file mode 100644 index 0000000..98b36d3 --- /dev/null +++ b/js/codemirror/mode/q/index.html @@ -0,0 +1,144 @@ + + +CodeMirror: Q mode + + + + + + + + + + +
+

Q mode

+ + +
+ + + +

MIME type defined: text/x-q.

+
diff --git a/js/codemirror/mode/q/q.js b/js/codemirror/mode/q/q.js new file mode 100644 index 0000000..9b1a9d8 --- /dev/null +++ b/js/codemirror/mode/q/q.js @@ -0,0 +1,139 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("q",function(config){ + var indentUnit=config.indentUnit, + curPunc, + keywords=buildRE(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]), + E=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/; + function buildRE(w){return new RegExp("^("+w.join("|")+")$");} + function tokenBase(stream,state){ + var sol=stream.sol(),c=stream.next(); + curPunc=null; + if(sol) + if(c=="/") + return(state.tokenize=tokenLineComment)(stream,state); + else if(c=="\\"){ + if(stream.eol()||/\s/.test(stream.peek())) + return stream.skipToEnd(),/^\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream):state.tokenize=tokenBase,"comment"; + else + return state.tokenize=tokenBase,"builtin"; + } + if(/\s/.test(c)) + return stream.peek()=="/"?(stream.skipToEnd(),"comment"):"whitespace"; + if(c=='"') + return(state.tokenize=tokenString)(stream,state); + if(c=='`') + return stream.eatWhile(/[A-Za-z\d_:\/.]/),"symbol"; + if(("."==c&&/\d/.test(stream.peek()))||/\d/.test(c)){ + var t=null; + stream.backUp(1); + if(stream.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) + || stream.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/) + || stream.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/) + || stream.match(/^\d+[ptuv]{1}/)) + t="temporal"; + else if(stream.match(/^0[NwW]{1}/) + || stream.match(/^0x[\da-fA-F]*/) + || stream.match(/^[01]+[b]{1}/) + || stream.match(/^\d+[chijn]{1}/) + || stream.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/)) + t="number"; + return(t&&(!(c=stream.peek())||E.test(c)))?t:(stream.next(),"error"); + } + if(/[A-Za-z]|\./.test(c)) + return stream.eatWhile(/[A-Za-z._\d]/),keywords.test(stream.current())?"keyword":"variable"; + if(/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(c)) + return null; + if(/[{}\(\[\]\)]/.test(c)) + return null; + return"error"; + } + function tokenLineComment(stream,state){ + return stream.skipToEnd(),/\/\s*$/.test(stream.current())?(state.tokenize=tokenBlockComment)(stream,state):(state.tokenize=tokenBase),"comment"; + } + function tokenBlockComment(stream,state){ + var f=stream.sol()&&stream.peek()=="\\"; + stream.skipToEnd(); + if(f&&/^\\\s*$/.test(stream.current())) + state.tokenize=tokenBase; + return"comment"; + } + function tokenCommentToEOF(stream){return stream.skipToEnd(),"comment";} + function tokenString(stream,state){ + var escaped=false,next,end=false; + while((next=stream.next())){ + if(next=="\""&&!escaped){end=true;break;} + escaped=!escaped&&next=="\\"; + } + if(end)state.tokenize=tokenBase; + return"string"; + } + function pushContext(state,type,col){state.context={prev:state.context,indent:state.indent,col:col,type:type};} + function popContext(state){state.indent=state.context.indent;state.context=state.context.prev;} + return{ + startState:function(){ + return{tokenize:tokenBase, + context:null, + indent:0, + col:0}; + }, + token:function(stream,state){ + if(stream.sol()){ + if(state.context&&state.context.align==null) + state.context.align=false; + state.indent=stream.indentation(); + } + //if (stream.eatSpace()) return null; + var style=state.tokenize(stream,state); + if(style!="comment"&&state.context&&state.context.align==null&&state.context.type!="pattern"){ + state.context.align=true; + } + if(curPunc=="(")pushContext(state,")",stream.column()); + else if(curPunc=="[")pushContext(state,"]",stream.column()); + else if(curPunc=="{")pushContext(state,"}",stream.column()); + else if(/[\]\}\)]/.test(curPunc)){ + while(state.context&&state.context.type=="pattern")popContext(state); + if(state.context&&curPunc==state.context.type)popContext(state); + } + else if(curPunc=="."&&state.context&&state.context.type=="pattern")popContext(state); + else if(/atom|string|variable/.test(style)&&state.context){ + if(/[\}\]]/.test(state.context.type)) + pushContext(state,"pattern",stream.column()); + else if(state.context.type=="pattern"&&!state.context.align){ + state.context.align=true; + state.context.col=stream.column(); + } + } + return style; + }, + indent:function(state,textAfter){ + var firstChar=textAfter&&textAfter.charAt(0); + var context=state.context; + if(/[\]\}]/.test(firstChar)) + while (context&&context.type=="pattern")context=context.prev; + var closing=context&&firstChar==context.type; + if(!context) + return 0; + else if(context.type=="pattern") + return context.col; + else if(context.align) + return context.col+(closing?0:1); + else + return context.indent+(closing?0:indentUnit); + } + }; +}); +CodeMirror.defineMIME("text/x-q","q"); + +}); diff --git a/js/codemirror/mode/r/index.html b/js/codemirror/mode/r/index.html new file mode 100644 index 0000000..55e39a5 --- /dev/null +++ b/js/codemirror/mode/r/index.html @@ -0,0 +1,88 @@ + + +CodeMirror: R mode + + + + + + + + + +
+

R mode

+
+ + +

MIME types defined: text/x-rsrc.

+ +

Development of the CodeMirror R mode was kindly sponsored + by Ubalo.

+ +
diff --git a/js/codemirror/mode/r/r.js b/js/codemirror/mode/r/r.js new file mode 100644 index 0000000..f69f706 --- /dev/null +++ b/js/codemirror/mode/r/r.js @@ -0,0 +1,190 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.registerHelper("wordChars", "r", /[\w.]/); + +CodeMirror.defineMode("r", function(config) { + function wordObj(words) { + var res = {}; + for (var i = 0; i < words.length; ++i) res[words[i]] = true; + return res; + } + var commonAtoms = ["NULL", "NA", "Inf", "NaN", "NA_integer_", "NA_real_", "NA_complex_", "NA_character_", "TRUE", "FALSE"]; + var commonBuiltins = ["list", "quote", "bquote", "eval", "return", "call", "parse", "deparse"]; + var commonKeywords = ["if", "else", "repeat", "while", "function", "for", "in", "next", "break"]; + var commonBlockKeywords = ["if", "else", "repeat", "while", "function", "for"]; + + CodeMirror.registerHelper("hintWords", "r", commonAtoms.concat(commonBuiltins, commonKeywords)); + + var atoms = wordObj(commonAtoms); + var builtins = wordObj(commonBuiltins); + var keywords = wordObj(commonKeywords); + var blockkeywords = wordObj(commonBlockKeywords); + var opChars = /[+\-*\/^<>=!&|~$:]/; + var curPunc; + + function tokenBase(stream, state) { + curPunc = null; + var ch = stream.next(); + if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } else if (ch == "0" && stream.eat("x")) { + stream.eatWhile(/[\da-f]/i); + return "number"; + } else if (ch == "." && stream.eat(/\d/)) { + stream.match(/\d*(?:e[+\-]?\d+)?/); + return "number"; + } else if (/\d/.test(ch)) { + stream.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/); + return "number"; + } else if (ch == "'" || ch == '"') { + state.tokenize = tokenString(ch); + return "string"; + } else if (ch == "`") { + stream.match(/[^`]+`/); + return "variable-3"; + } else if (ch == "." && stream.match(/.(?:[.]|\d+)/)) { + return "keyword"; + } else if (/[a-zA-Z\.]/.test(ch)) { + stream.eatWhile(/[\w\.]/); + var word = stream.current(); + if (atoms.propertyIsEnumerable(word)) return "atom"; + if (keywords.propertyIsEnumerable(word)) { + // Block keywords start new blocks, except 'else if', which only starts + // one new block for the 'if', no block for the 'else'. + if (blockkeywords.propertyIsEnumerable(word) && + !stream.match(/\s*if(\s+|$)/, false)) + curPunc = "block"; + return "keyword"; + } + if (builtins.propertyIsEnumerable(word)) return "builtin"; + return "variable"; + } else if (ch == "%") { + if (stream.skipTo("%")) stream.next(); + return "operator variable-2"; + } else if ( + (ch == "<" && stream.eat("-")) || + (ch == "<" && stream.match("<-")) || + (ch == "-" && stream.match(/>>?/)) + ) { + return "operator arrow"; + } else if (ch == "=" && state.ctx.argList) { + return "arg-is"; + } else if (opChars.test(ch)) { + if (ch == "$") return "operator dollar"; + stream.eatWhile(opChars); + return "operator"; + } else if (/[\(\){}\[\];]/.test(ch)) { + curPunc = ch; + if (ch == ";") return "semi"; + return null; + } else { + return null; + } + } + + function tokenString(quote) { + return function(stream, state) { + if (stream.eat("\\")) { + var ch = stream.next(); + if (ch == "x") stream.match(/^[a-f0-9]{2}/i); + else if ((ch == "u" || ch == "U") && stream.eat("{") && stream.skipTo("}")) stream.next(); + else if (ch == "u") stream.match(/^[a-f0-9]{4}/i); + else if (ch == "U") stream.match(/^[a-f0-9]{8}/i); + else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/); + return "string-2"; + } else { + var next; + while ((next = stream.next()) != null) { + if (next == quote) { state.tokenize = tokenBase; break; } + if (next == "\\") { stream.backUp(1); break; } + } + return "string"; + } + }; + } + + var ALIGN_YES = 1, ALIGN_NO = 2, BRACELESS = 4 + + function push(state, type, stream) { + state.ctx = {type: type, + indent: state.indent, + flags: 0, + column: stream.column(), + prev: state.ctx}; + } + function setFlag(state, flag) { + var ctx = state.ctx + state.ctx = {type: ctx.type, + indent: ctx.indent, + flags: ctx.flags | flag, + column: ctx.column, + prev: ctx.prev} + } + function pop(state) { + state.indent = state.ctx.indent; + state.ctx = state.ctx.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, + ctx: {type: "top", + indent: -config.indentUnit, + flags: ALIGN_NO}, + indent: 0, + afterIdent: false}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if ((state.ctx.flags & 3) == 0) state.ctx.flags |= ALIGN_NO + if (state.ctx.flags & BRACELESS) pop(state) + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (style != "comment" && (state.ctx.flags & ALIGN_NO) == 0) setFlag(state, ALIGN_YES) + + if ((curPunc == ";" || curPunc == "{" || curPunc == "}") && state.ctx.type == "block") pop(state); + if (curPunc == "{") push(state, "}", stream); + else if (curPunc == "(") { + push(state, ")", stream); + if (state.afterIdent) state.ctx.argList = true; + } + else if (curPunc == "[") push(state, "]", stream); + else if (curPunc == "block") push(state, "block", stream); + else if (curPunc == state.ctx.type) pop(state); + else if (state.ctx.type == "block" && style != "comment") setFlag(state, BRACELESS) + state.afterIdent = style == "variable" || style == "keyword"; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx, + closing = firstChar == ctx.type; + if (ctx.flags & BRACELESS) ctx = ctx.prev + if (ctx.type == "block") return ctx.indent + (firstChar == "{" ? 0 : config.indentUnit); + else if (ctx.flags & ALIGN_YES) return ctx.column + (closing ? 0 : 1); + else return ctx.indent + (closing ? 0 : config.indentUnit); + }, + + lineComment: "#" + }; +}); + +CodeMirror.defineMIME("text/x-rsrc", "r"); + +}); diff --git a/js/codemirror/mode/rpm/changes/index.html b/js/codemirror/mode/rpm/changes/index.html new file mode 100644 index 0000000..a689319 --- /dev/null +++ b/js/codemirror/mode/rpm/changes/index.html @@ -0,0 +1,66 @@ + + +CodeMirror: RPM changes mode + + + + + + + + + + + +
+

RPM changes mode

+ +
+ + +

MIME types defined: text/x-rpm-changes.

+
diff --git a/js/codemirror/mode/rpm/index.html b/js/codemirror/mode/rpm/index.html new file mode 100644 index 0000000..6a764c9 --- /dev/null +++ b/js/codemirror/mode/rpm/index.html @@ -0,0 +1,149 @@ + + +CodeMirror: RPM changes mode + + + + + + + + + + + +
+

RPM changes mode

+ +
+ + +

RPM spec mode

+ +
+ + +

MIME types defined: text/x-rpm-spec, text/x-rpm-changes.

+
diff --git a/js/codemirror/mode/rpm/rpm.js b/js/codemirror/mode/rpm/rpm.js new file mode 100644 index 0000000..ae990d3 --- /dev/null +++ b/js/codemirror/mode/rpm/rpm.js @@ -0,0 +1,109 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("rpm-changes", function() { + var headerSeparator = /^-+$/; + var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /; + var simpleEmail = /^[\w+.-]+@[\w.-]+/; + + return { + token: function(stream) { + if (stream.sol()) { + if (stream.match(headerSeparator)) { return 'tag'; } + if (stream.match(headerLine)) { return 'tag'; } + } + if (stream.match(simpleEmail)) { return 'string'; } + stream.next(); + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-rpm-changes", "rpm-changes"); + +// Quick and dirty spec file highlighting + +CodeMirror.defineMode("rpm-spec", function() { + var arch = /^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/; + + var preamble = /^[a-zA-Z0-9()]+:/; + var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/; + var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros + var control_flow_simple = /^%(else|endif)/; // rpm control flow macros + var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros + + return { + startState: function () { + return { + controlFlow: false, + macroParameters: false, + section: false + }; + }, + token: function (stream, state) { + var ch = stream.peek(); + if (ch == "#") { stream.skipToEnd(); return "comment"; } + + if (stream.sol()) { + if (stream.match(preamble)) { return "header"; } + if (stream.match(section)) { return "atom"; } + } + + if (stream.match(/^\$\w+/)) { return "def"; } // Variables like '$RPM_BUILD_ROOT' + if (stream.match(/^\$\{\w+\}/)) { return "def"; } // Variables like '${RPM_BUILD_ROOT}' + + if (stream.match(control_flow_simple)) { return "keyword"; } + if (stream.match(control_flow_complex)) { + state.controlFlow = true; + return "keyword"; + } + if (state.controlFlow) { + if (stream.match(operators)) { return "operator"; } + if (stream.match(/^(\d+)/)) { return "number"; } + if (stream.eol()) { state.controlFlow = false; } + } + + if (stream.match(arch)) { + if (stream.eol()) { state.controlFlow = false; } + return "number"; + } + + // Macros like '%make_install' or '%attr(0775,root,root)' + if (stream.match(/^%[\w]+/)) { + if (stream.match('(')) { state.macroParameters = true; } + return "keyword"; + } + if (state.macroParameters) { + if (stream.match(/^\d+/)) { return "number";} + if (stream.match(')')) { + state.macroParameters = false; + return "keyword"; + } + } + + // Macros like '%{defined fedora}' + if (stream.match(/^%\{\??[\w \-\:\!]+\}/)) { + if (stream.eol()) { state.controlFlow = false; } + return "def"; + } + + //TODO: Include bash script sub-parser (CodeMirror supports that) + stream.next(); + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-rpm-spec", "rpm-spec"); + +}); diff --git a/js/codemirror/mode/rst/index.html b/js/codemirror/mode/rst/index.html new file mode 100644 index 0000000..9c4da54 --- /dev/null +++ b/js/codemirror/mode/rst/index.html @@ -0,0 +1,535 @@ + + +CodeMirror: reStructuredText mode + + + + + + + + + + +
+

reStructuredText mode

+
+ + +

+ The python mode will be used for highlighting blocks + containing Python/IPython terminal sessions: blocks starting with + >>> (for Python) or In [num]: (for + IPython). + + Further, the stex mode will be used for highlighting + blocks containing LaTex code. +

+ +

MIME types defined: text/x-rst.

+
diff --git a/js/codemirror/mode/rst/rst.js b/js/codemirror/mode/rst/rst.js new file mode 100644 index 0000000..76fe057 --- /dev/null +++ b/js/codemirror/mode/rst/rst.js @@ -0,0 +1,557 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../python/python"), require("../stex/stex"), require("../../addon/mode/overlay")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../python/python", "../stex/stex", "../../addon/mode/overlay"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('rst', function (config, options) { + + var rx_strong = /^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/; + var rx_emphasis = /^\*[^\*\s](?:[^\*]*[^\*\s])?\*/; + var rx_literal = /^``[^`\s](?:[^`]*[^`\s])``/; + + var rx_number = /^(?:[\d]+(?:[\.,]\d+)*)/; + var rx_positive = /^(?:\s\+[\d]+(?:[\.,]\d+)*)/; + var rx_negative = /^(?:\s\-[\d]+(?:[\.,]\d+)*)/; + + var rx_uri_protocol = "[Hh][Tt][Tt][Pp][Ss]?://"; + var rx_uri_domain = "(?:[\\d\\w.-]+)\\.(?:\\w{2,6})"; + var rx_uri_path = "(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*"; + var rx_uri = new RegExp("^" + rx_uri_protocol + rx_uri_domain + rx_uri_path); + + var overlay = { + token: function (stream) { + + if (stream.match(rx_strong) && stream.match (/\W+|$/, false)) + return 'strong'; + if (stream.match(rx_emphasis) && stream.match (/\W+|$/, false)) + return 'em'; + if (stream.match(rx_literal) && stream.match (/\W+|$/, false)) + return 'string-2'; + if (stream.match(rx_number)) + return 'number'; + if (stream.match(rx_positive)) + return 'positive'; + if (stream.match(rx_negative)) + return 'negative'; + if (stream.match(rx_uri)) + return 'link'; + + while (stream.next() != null) { + if (stream.match(rx_strong, false)) break; + if (stream.match(rx_emphasis, false)) break; + if (stream.match(rx_literal, false)) break; + if (stream.match(rx_number, false)) break; + if (stream.match(rx_positive, false)) break; + if (stream.match(rx_negative, false)) break; + if (stream.match(rx_uri, false)) break; + } + + return null; + } + }; + + var mode = CodeMirror.getMode( + config, options.backdrop || 'rst-base' + ); + + return CodeMirror.overlayMode(mode, overlay, true); // combine +}, 'python', 'stex'); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +CodeMirror.defineMode('rst-base', function (config) { + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function format(string) { + var args = Array.prototype.slice.call(arguments, 1); + return string.replace(/{(\d+)}/g, function (match, n) { + return typeof args[n] != 'undefined' ? args[n] : match; + }); + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + var mode_python = CodeMirror.getMode(config, 'python'); + var mode_stex = CodeMirror.getMode(config, 'stex'); + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + var SEPA = "\\s+"; + var TAIL = "(?:\\s*|\\W|$)", + rx_TAIL = new RegExp(format('^{0}', TAIL)); + + var NAME = + "(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)", + rx_NAME = new RegExp(format('^{0}', NAME)); + var NAME_WWS = + "(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)"; + var REF_NAME = format('(?:{0}|`{1}`)', NAME, NAME_WWS); + + var TEXT1 = "(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)"; + var TEXT2 = "(?:[^\\`]+)", + rx_TEXT2 = new RegExp(format('^{0}', TEXT2)); + + var rx_section = new RegExp( + "^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"); + var rx_explicit = new RegExp( + format('^\\.\\.{0}', SEPA)); + var rx_link = new RegExp( + format('^_{0}:{1}|^__:{1}', REF_NAME, TAIL)); + var rx_directive = new RegExp( + format('^{0}::{1}', REF_NAME, TAIL)); + var rx_substitution = new RegExp( + format('^\\|{0}\\|{1}{2}::{3}', TEXT1, SEPA, REF_NAME, TAIL)); + var rx_footnote = new RegExp( + format('^\\[(?:\\d+|#{0}?|\\*)]{1}', REF_NAME, TAIL)); + var rx_citation = new RegExp( + format('^\\[{0}\\]{1}', REF_NAME, TAIL)); + + var rx_substitution_ref = new RegExp( + format('^\\|{0}\\|', TEXT1)); + var rx_footnote_ref = new RegExp( + format('^\\[(?:\\d+|#{0}?|\\*)]_', REF_NAME)); + var rx_citation_ref = new RegExp( + format('^\\[{0}\\]_', REF_NAME)); + var rx_link_ref1 = new RegExp( + format('^{0}__?', REF_NAME)); + var rx_link_ref2 = new RegExp( + format('^`{0}`_', TEXT2)); + + var rx_role_pre = new RegExp( + format('^:{0}:`{1}`{2}', NAME, TEXT2, TAIL)); + var rx_role_suf = new RegExp( + format('^`{1}`:{0}:{2}', NAME, TEXT2, TAIL)); + var rx_role = new RegExp( + format('^:{0}:{1}', NAME, TAIL)); + + var rx_directive_name = new RegExp(format('^{0}', REF_NAME)); + var rx_directive_tail = new RegExp(format('^::{0}', TAIL)); + var rx_substitution_text = new RegExp(format('^\\|{0}\\|', TEXT1)); + var rx_substitution_sepa = new RegExp(format('^{0}', SEPA)); + var rx_substitution_name = new RegExp(format('^{0}', REF_NAME)); + var rx_substitution_tail = new RegExp(format('^::{0}', TAIL)); + var rx_link_head = new RegExp("^_"); + var rx_link_name = new RegExp(format('^{0}|_', REF_NAME)); + var rx_link_tail = new RegExp(format('^:{0}', TAIL)); + + var rx_verbatim = new RegExp('^::\\s*$'); + var rx_examples = new RegExp('^\\s+(?:>>>|In \\[\\d+\\]:)\\s'); + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_normal(stream, state) { + var token = null; + + if (stream.sol() && stream.match(rx_examples, false)) { + change(state, to_mode, { + mode: mode_python, local: CodeMirror.startState(mode_python) + }); + } else if (stream.sol() && stream.match(rx_explicit)) { + change(state, to_explicit); + token = 'meta'; + } else if (stream.sol() && stream.match(rx_section)) { + change(state, to_normal); + token = 'header'; + } else if (phase(state) == rx_role_pre || + stream.match(rx_role_pre, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_role_pre, 1)); + stream.match(/^:/); + token = 'meta'; + break; + case 1: + change(state, to_normal, context(rx_role_pre, 2)); + stream.match(rx_NAME); + token = 'keyword'; + + if (stream.current().match(/^(?:math|latex)/)) { + state.tmp_stex = true; + } + break; + case 2: + change(state, to_normal, context(rx_role_pre, 3)); + stream.match(/^:`/); + token = 'meta'; + break; + case 3: + if (state.tmp_stex) { + state.tmp_stex = undefined; state.tmp = { + mode: mode_stex, local: CodeMirror.startState(mode_stex) + }; + } + + if (state.tmp) { + if (stream.peek() == '`') { + change(state, to_normal, context(rx_role_pre, 4)); + state.tmp = undefined; + break; + } + + token = state.tmp.mode.token(stream, state.tmp.local); + break; + } + + change(state, to_normal, context(rx_role_pre, 4)); + stream.match(rx_TEXT2); + token = 'string'; + break; + case 4: + change(state, to_normal, context(rx_role_pre, 5)); + stream.match(/^`/); + token = 'meta'; + break; + case 5: + change(state, to_normal, context(rx_role_pre, 6)); + stream.match(rx_TAIL); + break; + default: + change(state, to_normal); + } + } else if (phase(state) == rx_role_suf || + stream.match(rx_role_suf, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_role_suf, 1)); + stream.match(/^`/); + token = 'meta'; + break; + case 1: + change(state, to_normal, context(rx_role_suf, 2)); + stream.match(rx_TEXT2); + token = 'string'; + break; + case 2: + change(state, to_normal, context(rx_role_suf, 3)); + stream.match(/^`:/); + token = 'meta'; + break; + case 3: + change(state, to_normal, context(rx_role_suf, 4)); + stream.match(rx_NAME); + token = 'keyword'; + break; + case 4: + change(state, to_normal, context(rx_role_suf, 5)); + stream.match(/^:/); + token = 'meta'; + break; + case 5: + change(state, to_normal, context(rx_role_suf, 6)); + stream.match(rx_TAIL); + break; + default: + change(state, to_normal); + } + } else if (phase(state) == rx_role || stream.match(rx_role, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_role, 1)); + stream.match(/^:/); + token = 'meta'; + break; + case 1: + change(state, to_normal, context(rx_role, 2)); + stream.match(rx_NAME); + token = 'keyword'; + break; + case 2: + change(state, to_normal, context(rx_role, 3)); + stream.match(/^:/); + token = 'meta'; + break; + case 3: + change(state, to_normal, context(rx_role, 4)); + stream.match(rx_TAIL); + break; + default: + change(state, to_normal); + } + } else if (phase(state) == rx_substitution_ref || + stream.match(rx_substitution_ref, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_substitution_ref, 1)); + stream.match(rx_substitution_text); + token = 'variable-2'; + break; + case 1: + change(state, to_normal, context(rx_substitution_ref, 2)); + if (stream.match(/^_?_?/)) token = 'link'; + break; + default: + change(state, to_normal); + } + } else if (stream.match(rx_footnote_ref)) { + change(state, to_normal); + token = 'quote'; + } else if (stream.match(rx_citation_ref)) { + change(state, to_normal); + token = 'quote'; + } else if (stream.match(rx_link_ref1)) { + change(state, to_normal); + if (!stream.peek() || stream.peek().match(/^\W$/)) { + token = 'link'; + } + } else if (phase(state) == rx_link_ref2 || + stream.match(rx_link_ref2, false)) { + + switch (stage(state)) { + case 0: + if (!stream.peek() || stream.peek().match(/^\W$/)) { + change(state, to_normal, context(rx_link_ref2, 1)); + } else { + stream.match(rx_link_ref2); + } + break; + case 1: + change(state, to_normal, context(rx_link_ref2, 2)); + stream.match(/^`/); + token = 'link'; + break; + case 2: + change(state, to_normal, context(rx_link_ref2, 3)); + stream.match(rx_TEXT2); + break; + case 3: + change(state, to_normal, context(rx_link_ref2, 4)); + stream.match(/^`_/); + token = 'link'; + break; + default: + change(state, to_normal); + } + } else if (stream.match(rx_verbatim)) { + change(state, to_verbatim); + } + + else { + if (stream.next()) change(state, to_normal); + } + + return token; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_explicit(stream, state) { + var token = null; + + if (phase(state) == rx_substitution || + stream.match(rx_substitution, false)) { + + switch (stage(state)) { + case 0: + change(state, to_explicit, context(rx_substitution, 1)); + stream.match(rx_substitution_text); + token = 'variable-2'; + break; + case 1: + change(state, to_explicit, context(rx_substitution, 2)); + stream.match(rx_substitution_sepa); + break; + case 2: + change(state, to_explicit, context(rx_substitution, 3)); + stream.match(rx_substitution_name); + token = 'keyword'; + break; + case 3: + change(state, to_explicit, context(rx_substitution, 4)); + stream.match(rx_substitution_tail); + token = 'meta'; + break; + default: + change(state, to_normal); + } + } else if (phase(state) == rx_directive || + stream.match(rx_directive, false)) { + + switch (stage(state)) { + case 0: + change(state, to_explicit, context(rx_directive, 1)); + stream.match(rx_directive_name); + token = 'keyword'; + + if (stream.current().match(/^(?:math|latex)/)) + state.tmp_stex = true; + else if (stream.current().match(/^python/)) + state.tmp_py = true; + break; + case 1: + change(state, to_explicit, context(rx_directive, 2)); + stream.match(rx_directive_tail); + token = 'meta'; + + if (stream.match(/^latex\s*$/) || state.tmp_stex) { + state.tmp_stex = undefined; change(state, to_mode, { + mode: mode_stex, local: CodeMirror.startState(mode_stex) + }); + } + break; + case 2: + change(state, to_explicit, context(rx_directive, 3)); + if (stream.match(/^python\s*$/) || state.tmp_py) { + state.tmp_py = undefined; change(state, to_mode, { + mode: mode_python, local: CodeMirror.startState(mode_python) + }); + } + break; + default: + change(state, to_normal); + } + } else if (phase(state) == rx_link || stream.match(rx_link, false)) { + + switch (stage(state)) { + case 0: + change(state, to_explicit, context(rx_link, 1)); + stream.match(rx_link_head); + stream.match(rx_link_name); + token = 'link'; + break; + case 1: + change(state, to_explicit, context(rx_link, 2)); + stream.match(rx_link_tail); + token = 'meta'; + break; + default: + change(state, to_normal); + } + } else if (stream.match(rx_footnote)) { + change(state, to_normal); + token = 'quote'; + } else if (stream.match(rx_citation)) { + change(state, to_normal); + token = 'quote'; + } + + else { + stream.eatSpace(); + if (stream.eol()) { + change(state, to_normal); + } else { + stream.skipToEnd(); + change(state, to_comment); + token = 'comment'; + } + } + + return token; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_comment(stream, state) { + return as_block(stream, state, 'comment'); + } + + function to_verbatim(stream, state) { + return as_block(stream, state, 'meta'); + } + + function as_block(stream, state, token) { + if (stream.eol() || stream.eatSpace()) { + stream.skipToEnd(); + return token; + } else { + change(state, to_normal); + return null; + } + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_mode(stream, state) { + + if (state.ctx.mode && state.ctx.local) { + + if (stream.sol()) { + if (!stream.eatSpace()) change(state, to_normal); + return null; + } + + return state.ctx.mode.token(stream, state.ctx.local); + } + + change(state, to_normal); + return null; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function context(phase, stage, mode, local) { + return {phase: phase, stage: stage, mode: mode, local: local}; + } + + function change(state, tok, ctx) { + state.tok = tok; + state.ctx = ctx || {}; + } + + function stage(state) { + return state.ctx.stage || 0; + } + + function phase(state) { + return state.ctx.phase; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + return { + startState: function () { + return {tok: to_normal, ctx: context(undefined, 0)}; + }, + + copyState: function (state) { + var ctx = state.ctx, tmp = state.tmp; + if (ctx.local) + ctx = {mode: ctx.mode, local: CodeMirror.copyState(ctx.mode, ctx.local)}; + if (tmp) + tmp = {mode: tmp.mode, local: CodeMirror.copyState(tmp.mode, tmp.local)}; + return {tok: state.tok, ctx: ctx, tmp: tmp}; + }, + + innerMode: function (state) { + return state.tmp ? {state: state.tmp.local, mode: state.tmp.mode} + : state.ctx.mode ? {state: state.ctx.local, mode: state.ctx.mode} + : null; + }, + + token: function (stream, state) { + return state.tok(stream, state); + } + }; +}, 'python', 'stex'); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +CodeMirror.defineMIME('text/x-rst', 'rst'); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +}); diff --git a/js/codemirror/mode/ruby/index.html b/js/codemirror/mode/ruby/index.html new file mode 100644 index 0000000..3bb87f5 --- /dev/null +++ b/js/codemirror/mode/ruby/index.html @@ -0,0 +1,183 @@ + + +CodeMirror: Ruby mode + + + + + + + + + + +
+

Ruby mode

+
+ + +

MIME types defined: text/x-ruby.

+ +

Development of the CodeMirror Ruby mode was kindly sponsored + by Ubalo.

+ +
diff --git a/js/codemirror/mode/ruby/ruby.js b/js/codemirror/mode/ruby/ruby.js new file mode 100644 index 0000000..b216c19 --- /dev/null +++ b/js/codemirror/mode/ruby/ruby.js @@ -0,0 +1,303 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function wordObj(words) { + var o = {}; + for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; + return o; +} + +var keywordList = [ + "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else", + "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or", + "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", + "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc", + "caller", "lambda", "proc", "public", "protected", "private", "require", "load", + "require_relative", "extend", "autoload", "__END__", "__FILE__", "__LINE__", "__dir__" +], keywords = wordObj(keywordList); + +var indentWords = wordObj(["def", "class", "case", "for", "while", "until", "module", + "catch", "loop", "proc", "begin"]); +var dedentWords = wordObj(["end", "until"]); +var opening = {"[": "]", "{": "}", "(": ")"}; +var closing = {"]": "[", "}": "{", ")": "("}; + +CodeMirror.defineMode("ruby", function(config) { + var curPunc; + + function chain(newtok, stream, state) { + state.tokenize.push(newtok); + return newtok(stream, state); + } + + function tokenBase(stream, state) { + if (stream.sol() && stream.match("=begin") && stream.eol()) { + state.tokenize.push(readBlockComment); + return "comment"; + } + if (stream.eatSpace()) return null; + var ch = stream.next(), m; + if (ch == "`" || ch == "'" || ch == '"') { + return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state); + } else if (ch == "/") { + if (regexpAhead(stream)) + return chain(readQuoted(ch, "string-2", true), stream, state); + else + return "operator"; + } else if (ch == "%") { + var style = "string", embed = true; + if (stream.eat("s")) style = "atom"; + else if (stream.eat(/[WQ]/)) style = "string"; + else if (stream.eat(/[r]/)) style = "string-2"; + else if (stream.eat(/[wxq]/)) { style = "string"; embed = false; } + var delim = stream.eat(/[^\w\s=]/); + if (!delim) return "operator"; + if (opening.propertyIsEnumerable(delim)) delim = opening[delim]; + return chain(readQuoted(delim, style, embed, true), stream, state); + } else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } else if (ch == "<" && (m = stream.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) { + return chain(readHereDoc(m[2], m[1]), stream, state); + } else if (ch == "0") { + if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/); + else if (stream.eat("b")) stream.eatWhile(/[01]/); + else stream.eatWhile(/[0-7]/); + return "number"; + } else if (/\d/.test(ch)) { + stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/); + return "number"; + } else if (ch == "?") { + while (stream.match(/^\\[CM]-/)) {} + if (stream.eat("\\")) stream.eatWhile(/\w/); + else stream.next(); + return "string"; + } else if (ch == ":") { + if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state); + if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state); + + // :> :>> :< :<< are valid symbols + if (stream.eat(/[\<\>]/)) { + stream.eat(/[\<\>]/); + return "atom"; + } + + // :+ :- :/ :* :| :& :! are valid symbols + if (stream.eat(/[\+\-\*\/\&\|\:\!]/)) { + return "atom"; + } + + // Symbols can't start by a digit + if (stream.eat(/[a-zA-Z$@_\xa1-\uffff]/)) { + stream.eatWhile(/[\w$\xa1-\uffff]/); + // Only one ? ! = is allowed and only as the last character + stream.eat(/[\?\!\=]/); + return "atom"; + } + return "operator"; + } else if (ch == "@" && stream.match(/^@?[a-zA-Z_\xa1-\uffff]/)) { + stream.eat("@"); + stream.eatWhile(/[\w\xa1-\uffff]/); + return "variable-2"; + } else if (ch == "$") { + if (stream.eat(/[a-zA-Z_]/)) { + stream.eatWhile(/[\w]/); + } else if (stream.eat(/\d/)) { + stream.eat(/\d/); + } else { + stream.next(); // Must be a special global like $: or $! + } + return "variable-3"; + } else if (/[a-zA-Z_\xa1-\uffff]/.test(ch)) { + stream.eatWhile(/[\w\xa1-\uffff]/); + stream.eat(/[\?\!]/); + if (stream.eat(":")) return "atom"; + return "ident"; + } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) { + curPunc = "|"; + return null; + } else if (/[\(\)\[\]{}\\;]/.test(ch)) { + curPunc = ch; + return null; + } else if (ch == "-" && stream.eat(">")) { + return "arrow"; + } else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) { + var more = stream.eatWhile(/[=+\-\/*:\.^%<>~|]/); + if (ch == "." && !more) curPunc = "."; + return "operator"; + } else { + return null; + } + } + + function regexpAhead(stream) { + var start = stream.pos, depth = 0, next, found = false, escaped = false + while ((next = stream.next()) != null) { + if (!escaped) { + if ("[{(".indexOf(next) > -1) { + depth++ + } else if ("]})".indexOf(next) > -1) { + depth-- + if (depth < 0) break + } else if (next == "/" && depth == 0) { + found = true + break + } + escaped = next == "\\" + } else { + escaped = false + } + } + stream.backUp(stream.pos - start) + return found + } + + function tokenBaseUntilBrace(depth) { + if (!depth) depth = 1; + return function(stream, state) { + if (stream.peek() == "}") { + if (depth == 1) { + state.tokenize.pop(); + return state.tokenize[state.tokenize.length-1](stream, state); + } else { + state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth - 1); + } + } else if (stream.peek() == "{") { + state.tokenize[state.tokenize.length - 1] = tokenBaseUntilBrace(depth + 1); + } + return tokenBase(stream, state); + }; + } + function tokenBaseOnce() { + var alreadyCalled = false; + return function(stream, state) { + if (alreadyCalled) { + state.tokenize.pop(); + return state.tokenize[state.tokenize.length-1](stream, state); + } + alreadyCalled = true; + return tokenBase(stream, state); + }; + } + function readQuoted(quote, style, embed, unescaped) { + return function(stream, state) { + var escaped = false, ch; + + if (state.context.type === 'read-quoted-paused') { + state.context = state.context.prev; + stream.eat("}"); + } + + while ((ch = stream.next()) != null) { + if (ch == quote && (unescaped || !escaped)) { + state.tokenize.pop(); + break; + } + if (embed && ch == "#" && !escaped) { + if (stream.eat("{")) { + if (quote == "}") { + state.context = {prev: state.context, type: 'read-quoted-paused'}; + } + state.tokenize.push(tokenBaseUntilBrace()); + break; + } else if (/[@\$]/.test(stream.peek())) { + state.tokenize.push(tokenBaseOnce()); + break; + } + } + escaped = !escaped && ch == "\\"; + } + return style; + }; + } + function readHereDoc(phrase, mayIndent) { + return function(stream, state) { + if (mayIndent) stream.eatSpace() + if (stream.match(phrase)) state.tokenize.pop(); + else stream.skipToEnd(); + return "string"; + }; + } + function readBlockComment(stream, state) { + if (stream.sol() && stream.match("=end") && stream.eol()) + state.tokenize.pop(); + stream.skipToEnd(); + return "comment"; + } + + return { + startState: function() { + return {tokenize: [tokenBase], + indented: 0, + context: {type: "top", indented: -config.indentUnit}, + continuedLine: false, + lastTok: null, + varList: false}; + }, + + token: function(stream, state) { + curPunc = null; + if (stream.sol()) state.indented = stream.indentation(); + var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype; + var thisTok = curPunc; + if (style == "ident") { + var word = stream.current(); + style = state.lastTok == "." ? "property" + : keywords.propertyIsEnumerable(stream.current()) ? "keyword" + : /^[A-Z]/.test(word) ? "tag" + : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def" + : "variable"; + if (style == "keyword") { + thisTok = word; + if (indentWords.propertyIsEnumerable(word)) kwtype = "indent"; + else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent"; + else if ((word == "if" || word == "unless") && stream.column() == stream.indentation()) + kwtype = "indent"; + else if (word == "do" && state.context.indented < state.indented) + kwtype = "indent"; + } + } + if (curPunc || (style && style != "comment")) state.lastTok = thisTok; + if (curPunc == "|") state.varList = !state.varList; + + if (kwtype == "indent" || /[\(\[\{]/.test(curPunc)) + state.context = {prev: state.context, type: curPunc || style, indented: state.indented}; + else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev) + state.context = state.context.prev; + + if (stream.eol()) + state.continuedLine = (curPunc == "\\" || style == "operator"); + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize[state.tokenize.length-1] != tokenBase) return CodeMirror.Pass; + var firstChar = textAfter && textAfter.charAt(0); + var ct = state.context; + var closed = ct.type == closing[firstChar] || + ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\b/.test(textAfter); + return ct.indented + (closed ? 0 : config.indentUnit) + + (state.continuedLine ? config.indentUnit : 0); + }, + + electricInput: /^\s*(?:end|rescue|elsif|else|\})$/, + lineComment: "#", + fold: "indent" + }; +}); + +CodeMirror.defineMIME("text/x-ruby", "ruby"); + +CodeMirror.registerHelper("hintWords", "ruby", keywordList); + +}); diff --git a/js/codemirror/mode/ruby/test.js b/js/codemirror/mode/ruby/test.js new file mode 100644 index 0000000..4ce7918 --- /dev/null +++ b/js/codemirror/mode/ruby/test.js @@ -0,0 +1,23 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "ruby"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("divide_equal_operator", + "[variable bar] [operator /=] [variable foo]"); + + MT("divide_equal_operator_no_spacing", + "[variable foo][operator /=][number 42]"); + + MT("complex_regexp", + "[keyword if] [variable cr] [operator =~] [string-2 /(?: \\( #{][tag RE_NOT][string-2 }\\( | #{][tag RE_NOT_PAR_OR][string-2 }* #{][tag RE_OPA_OR][string-2 } )/][variable x]") + + MT("indented_heredoc", + "[keyword def] [def x]", + " [variable y] [operator =] [string <<-FOO]", + "[string bar]", + "[string FOO]", + "[keyword end]") +})(); diff --git a/js/codemirror/mode/rust/index.html b/js/codemirror/mode/rust/index.html new file mode 100644 index 0000000..1354662 --- /dev/null +++ b/js/codemirror/mode/rust/index.html @@ -0,0 +1,64 @@ + + +CodeMirror: Rust mode + + + + + + + + + + +
+

Rust mode

+ + +
+ + + +

MIME types defined: text/x-rustsrc.

+
diff --git a/js/codemirror/mode/rust/rust.js b/js/codemirror/mode/rust/rust.js new file mode 100644 index 0000000..f702a50 --- /dev/null +++ b/js/codemirror/mode/rust/rust.js @@ -0,0 +1,72 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../../addon/mode/simple")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../../addon/mode/simple"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineSimpleMode("rust",{ + start: [ + // string and byte string + {regex: /b?"/, token: "string", next: "string"}, + // raw string and raw byte string + {regex: /b?r"/, token: "string", next: "string_raw"}, + {regex: /b?r#+"/, token: "string", next: "string_raw_hash"}, + // character + {regex: /'(?:[^'\\]|\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\}))'/, token: "string-2"}, + // byte + {regex: /b'(?:[^']|\\(?:['\\nrt0]|x[\da-fA-F]{2}))'/, token: "string-2"}, + + {regex: /(?:(?:[0-9][0-9_]*)(?:(?:[Ee][+-]?[0-9_]+)|\.[0-9_]+(?:[Ee][+-]?[0-9_]+)?)(?:f32|f64)?)|(?:0(?:b[01_]+|(?:o[0-7_]+)|(?:x[0-9a-fA-F_]+))|(?:[0-9][0-9_]*))(?:u8|u16|u32|u64|i8|i16|i32|i64|isize|usize)?/, + token: "number"}, + {regex: /(let(?:\s+mut)?|fn|enum|mod|struct|type|union)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/, token: ["keyword", null, "def"]}, + {regex: /(?:abstract|alignof|as|async|await|box|break|continue|const|crate|do|dyn|else|enum|extern|fn|for|final|if|impl|in|loop|macro|match|mod|move|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, token: "keyword"}, + {regex: /\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|f16|f32|f64|i8|i16|i32|i64|str|Option)\b/, token: "atom"}, + {regex: /\b(?:true|false|Some|None|Ok|Err)\b/, token: "builtin"}, + {regex: /\b(fn)(\s+)([a-zA-Z_][a-zA-Z0-9_]*)/, + token: ["keyword", null ,"def"]}, + {regex: /#!?\[.*\]/, token: "meta"}, + {regex: /\/\/.*/, token: "comment"}, + {regex: /\/\*/, token: "comment", next: "comment"}, + {regex: /[-+\/*=<>!]+/, token: "operator"}, + {regex: /[a-zA-Z_]\w*!/,token: "variable-3"}, + {regex: /[a-zA-Z_]\w*/, token: "variable"}, + {regex: /[\{\[\(]/, indent: true}, + {regex: /[\}\]\)]/, dedent: true} + ], + string: [ + {regex: /"/, token: "string", next: "start"}, + {regex: /(?:[^\\"]|\\(?:.|$))*/, token: "string"} + ], + string_raw: [ + {regex: /"/, token: "string", next: "start"}, + {regex: /[^"]*/, token: "string"} + ], + string_raw_hash: [ + {regex: /"#+/, token: "string", next: "start"}, + {regex: /(?:[^"]|"(?!#))*/, token: "string"} + ], + comment: [ + {regex: /.*?\*\//, token: "comment", next: "start"}, + {regex: /.*/, token: "comment"} + ], + meta: { + dontIndentStates: ["comment"], + electricInput: /^\s*\}$/, + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + fold: "brace" + } +}); + + +CodeMirror.defineMIME("text/x-rustsrc", "rust"); +CodeMirror.defineMIME("text/rust", "rust"); +}); diff --git a/js/codemirror/mode/rust/test.js b/js/codemirror/mode/rust/test.js new file mode 100644 index 0000000..347e2ff --- /dev/null +++ b/js/codemirror/mode/rust/test.js @@ -0,0 +1,39 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 4}, "rust"); + function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));} + + MT('integer_test', + '[number 123i32]', + '[number 123u32]', + '[number 123_u32]', + '[number 0xff_u8]', + '[number 0o70_i16]', + '[number 0b1111_1111_1001_0000_i32]', + '[number 0usize]'); + + MT('float_test', + '[number 123.0f64]', + '[number 0.1f64]', + '[number 0.1f32]', + '[number 12E+99_f64]'); + + MT('string-literals-test', + '[string "foo"]', + '[string r"foo"]', + '[string "\\"foo\\""]', + '[string r#""foo""#]', + '[string "foo #\\"# bar"]', + + '[string b"foo"]', + '[string br"foo"]', + '[string b"\\"foo\\""]', + '[string br#""foo""#]', + '[string br##"foo #" bar"##]', + + "[string-2 'h']", + "[string-2 b'h']"); + +})(); diff --git a/js/codemirror/mode/sas/index.html b/js/codemirror/mode/sas/index.html new file mode 100644 index 0000000..146fbbf --- /dev/null +++ b/js/codemirror/mode/sas/index.html @@ -0,0 +1,81 @@ + + +CodeMirror: SAS mode + + + + + + + + + + +
+

SAS mode

+
+ + + +

MIME types defined: text/x-sas.

+ +
diff --git a/js/codemirror/mode/sas/sas.js b/js/codemirror/mode/sas/sas.js new file mode 100755 index 0000000..47260e0 --- /dev/null +++ b/js/codemirror/mode/sas/sas.js @@ -0,0 +1,303 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + + +// SAS mode copyright (c) 2016 Jared Dean, SAS Institute +// Created by Jared Dean + +// TODO +// indent and de-indent +// identify macro variables + + +//Definitions +// comment -- text within * ; or /* */ +// keyword -- SAS language variable +// variable -- macro variables starts with '&' or variable formats +// variable-2 -- DATA Step, proc, or macro names +// string -- text within ' ' or " " +// operator -- numeric operator + / - * ** le eq ge ... and so on +// builtin -- proc %macro data run mend +// atom +// def + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("sas", function () { + var words = {}; + var isDoubleOperatorSym = { + eq: 'operator', + lt: 'operator', + le: 'operator', + gt: 'operator', + ge: 'operator', + "in": 'operator', + ne: 'operator', + or: 'operator' + }; + var isDoubleOperatorChar = /(<=|>=|!=|<>)/; + var isSingleOperatorChar = /[=\(:\),{}.*<>+\-\/^\[\]]/; + + // Takes a string of words separated by spaces and adds them as + // keys with the value of the first argument 'style' + function define(style, string, context) { + if (context) { + var split = string.split(' '); + for (var i = 0; i < split.length; i++) { + words[split[i]] = {style: style, state: context}; + } + } + } + //datastep + define('def', 'stack pgm view source debug nesting nolist', ['inDataStep']); + define('def', 'if while until for do do; end end; then else cancel', ['inDataStep']); + define('def', 'label format _n_ _error_', ['inDataStep']); + define('def', 'ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME', ['inDataStep']); + define('def', 'filevar finfo finv fipname fipnamel fipstate first firstobs floor', ['inDataStep']); + define('def', 'varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday', ['inDataStep']); + define('def', 'zipfips zipname zipnamel zipstate', ['inDataStep']); + define('def', 'put putc putn', ['inDataStep']); + define('builtin', 'data run', ['inDataStep']); + + + //proc + define('def', 'data', ['inProc']); + + // flow control for macros + define('def', '%if %end %end; %else %else; %do %do; %then', ['inMacro']); + + //everywhere + define('builtin', 'proc run; quit; libname filename %macro %mend option options', ['ALL']); + + define('def', 'footnote title libname ods', ['ALL']); + define('def', '%let %put %global %sysfunc %eval ', ['ALL']); + // automatic macro variables http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a003167023.htm + define('variable', '&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext', ['ALL']); + + //footnote[1-9]? title[1-9]? + + //options statement + define('def', 'source2 nosource2 page pageno pagesize', ['ALL']); + + //proc and datastep + define('def', '_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddfm ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau random ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni rcorr read recfm register regr remote remove rename repeat repeated replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover sub subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max', ['inDataStep', 'inProc']); + define('operator', 'and not ', ['inDataStep', 'inProc']); + + // Main function + function tokenize(stream, state) { + // Finally advance the stream + var ch = stream.next(); + + // BLOCKCOMMENT + if (ch === '/' && stream.eat('*')) { + state.continueComment = true; + return "comment"; + } else if (state.continueComment === true) { // in comment block + //comment ends at the beginning of the line + if (ch === '*' && stream.peek() === '/') { + stream.next(); + state.continueComment = false; + } else if (stream.skipTo('*')) { //comment is potentially later in line + stream.skipTo('*'); + stream.next(); + if (stream.eat('/')) + state.continueComment = false; + } else { + stream.skipToEnd(); + } + return "comment"; + } + + if (ch == "*" && stream.column() == stream.indentation()) { + stream.skipToEnd() + return "comment" + } + + // DoubleOperator match + var doubleOperator = ch + stream.peek(); + + if ((ch === '"' || ch === "'") && !state.continueString) { + state.continueString = ch + return "string" + } else if (state.continueString) { + if (state.continueString == ch) { + state.continueString = null; + } else if (stream.skipTo(state.continueString)) { + // quote found on this line + stream.next(); + state.continueString = null; + } else { + stream.skipToEnd(); + } + return "string"; + } else if (state.continueString !== null && stream.eol()) { + stream.skipTo(state.continueString) || stream.skipToEnd(); + return "string"; + } else if (/[\d\.]/.test(ch)) { //find numbers + if (ch === ".") + stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/); + else if (ch === "0") + stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/); + else + stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/); + return "number"; + } else if (isDoubleOperatorChar.test(ch + stream.peek())) { // TWO SYMBOL TOKENS + stream.next(); + return "operator"; + } else if (isDoubleOperatorSym.hasOwnProperty(doubleOperator)) { + stream.next(); + if (stream.peek() === ' ') + return isDoubleOperatorSym[doubleOperator.toLowerCase()]; + } else if (isSingleOperatorChar.test(ch)) { // SINGLE SYMBOL TOKENS + return "operator"; + } + + // Matches one whole word -- even if the word is a character + var word; + if (stream.match(/[%&;\w]+/, false) != null) { + word = ch + stream.match(/[%&;\w]+/, true); + if (/&/.test(word)) return 'variable' + } else { + word = ch; + } + // the word after DATA PROC or MACRO + if (state.nextword) { + stream.match(/[\w]+/); + // match memname.libname + if (stream.peek() === '.') stream.skipTo(' '); + state.nextword = false; + return 'variable-2'; + } + + word = word.toLowerCase() + // Are we in a DATA Step? + if (state.inDataStep) { + if (word === 'run;' || stream.match(/run\s;/)) { + state.inDataStep = false; + return 'builtin'; + } + // variable formats + if ((word) && stream.next() === '.') { + //either a format or libname.memname + if (/\w/.test(stream.peek())) return 'variable-2'; + else return 'variable'; + } + // do we have a DATA Step keyword + if (word && words.hasOwnProperty(word) && + (words[word].state.indexOf("inDataStep") !== -1 || + words[word].state.indexOf("ALL") !== -1)) { + //backup to the start of the word + if (stream.start < stream.pos) + stream.backUp(stream.pos - stream.start); + //advance the length of the word and return + for (var i = 0; i < word.length; ++i) stream.next(); + return words[word].style; + } + } + // Are we in an Proc statement? + if (state.inProc) { + if (word === 'run;' || word === 'quit;') { + state.inProc = false; + return 'builtin'; + } + // do we have a proc keyword + if (word && words.hasOwnProperty(word) && + (words[word].state.indexOf("inProc") !== -1 || + words[word].state.indexOf("ALL") !== -1)) { + stream.match(/[\w]+/); + return words[word].style; + } + } + // Are we in a Macro statement? + if (state.inMacro) { + if (word === '%mend') { + if (stream.peek() === ';') stream.next(); + state.inMacro = false; + return 'builtin'; + } + if (word && words.hasOwnProperty(word) && + (words[word].state.indexOf("inMacro") !== -1 || + words[word].state.indexOf("ALL") !== -1)) { + stream.match(/[\w]+/); + return words[word].style; + } + + return 'atom'; + } + // Do we have Keywords specific words? + if (word && words.hasOwnProperty(word)) { + // Negates the initial next() + stream.backUp(1); + // Actually move the stream + stream.match(/[\w]+/); + if (word === 'data' && /=/.test(stream.peek()) === false) { + state.inDataStep = true; + state.nextword = true; + return 'builtin'; + } + if (word === 'proc') { + state.inProc = true; + state.nextword = true; + return 'builtin'; + } + if (word === '%macro') { + state.inMacro = true; + state.nextword = true; + return 'builtin'; + } + if (/title[1-9]/.test(word)) return 'def'; + + if (word === 'footnote') { + stream.eat(/[1-9]/); + return 'def'; + } + + // Returns their value as state in the prior define methods + if (state.inDataStep === true && words[word].state.indexOf("inDataStep") !== -1) + return words[word].style; + if (state.inProc === true && words[word].state.indexOf("inProc") !== -1) + return words[word].style; + if (state.inMacro === true && words[word].state.indexOf("inMacro") !== -1) + return words[word].style; + if (words[word].state.indexOf("ALL") !== -1) + return words[word].style; + return null; + } + // Unrecognized syntax + return null; + } + + return { + startState: function () { + return { + inDataStep: false, + inProc: false, + inMacro: false, + nextword: false, + continueString: null, + continueComment: false + }; + }, + token: function (stream, state) { + // Strip the spaces, but regex will account for them either way + if (stream.eatSpace()) return null; + // Go through the main process + return tokenize(stream, state); + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/" + }; + + }); + + CodeMirror.defineMIME("text/x-sas", "sas"); +}); diff --git a/js/codemirror/mode/sass/index.html b/js/codemirror/mode/sass/index.html new file mode 100644 index 0000000..7e4befa --- /dev/null +++ b/js/codemirror/mode/sass/index.html @@ -0,0 +1,68 @@ + + +CodeMirror: Sass mode + + + + + + + + + + + +
+

Sass mode

+
+ + +

MIME types defined: text/x-sass.

+
diff --git a/js/codemirror/mode/sass/sass.js b/js/codemirror/mode/sass/sass.js new file mode 100644 index 0000000..3cfac0a --- /dev/null +++ b/js/codemirror/mode/sass/sass.js @@ -0,0 +1,459 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../css/css")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../css/css"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("sass", function(config) { + var cssMode = CodeMirror.mimeModes["text/css"]; + var propertyKeywords = cssMode.propertyKeywords || {}, + colorKeywords = cssMode.colorKeywords || {}, + valueKeywords = cssMode.valueKeywords || {}, + fontProperties = cssMode.fontProperties || {}; + + function tokenRegexp(words) { + return new RegExp("^" + words.join("|")); + } + + var keywords = ["true", "false", "null", "auto"]; + var keywordsRegexp = new RegExp("^" + keywords.join("|")); + + var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-", + "\\!=", "/", "\\*", "%", "and", "or", "not", ";","\\{","\\}",":"]; + var opRegexp = tokenRegexp(operators); + + var pseudoElementsRegexp = /^::?[a-zA-Z_][\w\-]*/; + + var word; + + function isEndLine(stream) { + return !stream.peek() || stream.match(/\s+$/, false); + } + + function urlTokens(stream, state) { + var ch = stream.peek(); + + if (ch === ")") { + stream.next(); + state.tokenizer = tokenBase; + return "operator"; + } else if (ch === "(") { + stream.next(); + stream.eatSpace(); + + return "operator"; + } else if (ch === "'" || ch === '"') { + state.tokenizer = buildStringTokenizer(stream.next()); + return "string"; + } else { + state.tokenizer = buildStringTokenizer(")", false); + return "string"; + } + } + function comment(indentation, multiLine) { + return function(stream, state) { + if (stream.sol() && stream.indentation() <= indentation) { + state.tokenizer = tokenBase; + return tokenBase(stream, state); + } + + if (multiLine && stream.skipTo("*/")) { + stream.next(); + stream.next(); + state.tokenizer = tokenBase; + } else { + stream.skipToEnd(); + } + + return "comment"; + }; + } + + function buildStringTokenizer(quote, greedy) { + if (greedy == null) { greedy = true; } + + function stringTokenizer(stream, state) { + var nextChar = stream.next(); + var peekChar = stream.peek(); + var previousChar = stream.string.charAt(stream.pos-2); + + var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\")); + + if (endingString) { + if (nextChar !== quote && greedy) { stream.next(); } + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + state.tokenizer = tokenBase; + return "string"; + } else if (nextChar === "#" && peekChar === "{") { + state.tokenizer = buildInterpolationTokenizer(stringTokenizer); + stream.next(); + return "operator"; + } else { + return "string"; + } + } + + return stringTokenizer; + } + + function buildInterpolationTokenizer(currentTokenizer) { + return function(stream, state) { + if (stream.peek() === "}") { + stream.next(); + state.tokenizer = currentTokenizer; + return "operator"; + } else { + return tokenBase(stream, state); + } + }; + } + + function indent(state) { + if (state.indentCount == 0) { + state.indentCount++; + var lastScopeOffset = state.scopes[0].offset; + var currentOffset = lastScopeOffset + config.indentUnit; + state.scopes.unshift({ offset:currentOffset }); + } + } + + function dedent(state) { + if (state.scopes.length == 1) return; + + state.scopes.shift(); + } + + function tokenBase(stream, state) { + var ch = stream.peek(); + + // Comment + if (stream.match("/*")) { + state.tokenizer = comment(stream.indentation(), true); + return state.tokenizer(stream, state); + } + if (stream.match("//")) { + state.tokenizer = comment(stream.indentation(), false); + return state.tokenizer(stream, state); + } + + // Interpolation + if (stream.match("#{")) { + state.tokenizer = buildInterpolationTokenizer(tokenBase); + return "operator"; + } + + // Strings + if (ch === '"' || ch === "'") { + stream.next(); + state.tokenizer = buildStringTokenizer(ch); + return "string"; + } + + if(!state.cursorHalf){// state.cursorHalf === 0 + // first half i.e. before : for key-value pairs + // including selectors + + if (ch === "-") { + if (stream.match(/^-\w+-/)) { + return "meta"; + } + } + + if (ch === ".") { + stream.next(); + if (stream.match(/^[\w-]+/)) { + indent(state); + return "qualifier"; + } else if (stream.peek() === "#") { + indent(state); + return "tag"; + } + } + + if (ch === "#") { + stream.next(); + // ID selectors + if (stream.match(/^[\w-]+/)) { + indent(state); + return "builtin"; + } + if (stream.peek() === "#") { + indent(state); + return "tag"; + } + } + + // Variables + if (ch === "$") { + stream.next(); + stream.eatWhile(/[\w-]/); + return "variable-2"; + } + + // Numbers + if (stream.match(/^-?[0-9\.]+/)) + return "number"; + + // Units + if (stream.match(/^(px|em|in)\b/)) + return "unit"; + + if (stream.match(keywordsRegexp)) + return "keyword"; + + if (stream.match(/^url/) && stream.peek() === "(") { + state.tokenizer = urlTokens; + return "atom"; + } + + if (ch === "=") { + // Match shortcut mixin definition + if (stream.match(/^=[\w-]+/)) { + indent(state); + return "meta"; + } + } + + if (ch === "+") { + // Match shortcut mixin definition + if (stream.match(/^\+[\w-]+/)){ + return "variable-3"; + } + } + + if(ch === "@"){ + if(stream.match('@extend')){ + if(!stream.match(/\s*[\w]/)) + dedent(state); + } + } + + + // Indent Directives + if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)) { + indent(state); + return "def"; + } + + // Other Directives + if (ch === "@") { + stream.next(); + stream.eatWhile(/[\w-]/); + return "def"; + } + + if (stream.eatWhile(/[\w-]/)){ + if(stream.match(/ *: *[\w-\+\$#!\("']/,false)){ + word = stream.current().toLowerCase(); + var prop = state.prevProp + "-" + word; + if (propertyKeywords.hasOwnProperty(prop)) { + return "property"; + } else if (propertyKeywords.hasOwnProperty(word)) { + state.prevProp = word; + return "property"; + } else if (fontProperties.hasOwnProperty(word)) { + return "property"; + } + return "tag"; + } + else if(stream.match(/ *:/,false)){ + indent(state); + state.cursorHalf = 1; + state.prevProp = stream.current().toLowerCase(); + return "property"; + } + else if(stream.match(/ *,/,false)){ + return "tag"; + } + else{ + indent(state); + return "tag"; + } + } + + if(ch === ":"){ + if (stream.match(pseudoElementsRegexp)){ // could be a pseudo-element + return "variable-3"; + } + stream.next(); + state.cursorHalf=1; + return "operator"; + } + + } // cursorHalf===0 ends here + else{ + + if (ch === "#") { + stream.next(); + // Hex numbers + if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){ + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + return "number"; + } + } + + // Numbers + if (stream.match(/^-?[0-9\.]+/)){ + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + return "number"; + } + + // Units + if (stream.match(/^(px|em|in)\b/)){ + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + return "unit"; + } + + if (stream.match(keywordsRegexp)){ + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + return "keyword"; + } + + if (stream.match(/^url/) && stream.peek() === "(") { + state.tokenizer = urlTokens; + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + return "atom"; + } + + // Variables + if (ch === "$") { + stream.next(); + stream.eatWhile(/[\w-]/); + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + return "variable-2"; + } + + // bang character for !important, !default, etc. + if (ch === "!") { + stream.next(); + state.cursorHalf = 0; + return stream.match(/^[\w]+/) ? "keyword": "operator"; + } + + if (stream.match(opRegexp)){ + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + return "operator"; + } + + // attributes + if (stream.eatWhile(/[\w-]/)) { + if (isEndLine(stream)) { + state.cursorHalf = 0; + } + word = stream.current().toLowerCase(); + if (valueKeywords.hasOwnProperty(word)) { + return "atom"; + } else if (colorKeywords.hasOwnProperty(word)) { + return "keyword"; + } else if (propertyKeywords.hasOwnProperty(word)) { + state.prevProp = stream.current().toLowerCase(); + return "property"; + } else { + return "tag"; + } + } + + //stream.eatSpace(); + if (isEndLine(stream)) { + state.cursorHalf = 0; + return null; + } + + } // else ends here + + if (stream.match(opRegexp)) + return "operator"; + + // If we haven't returned by now, we move 1 character + // and return an error + stream.next(); + return null; + } + + function tokenLexer(stream, state) { + if (stream.sol()) state.indentCount = 0; + var style = state.tokenizer(stream, state); + var current = stream.current(); + + if (current === "@return" || current === "}"){ + dedent(state); + } + + if (style !== null) { + var startOfToken = stream.pos - current.length; + + var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount); + + var newScopes = []; + + for (var i = 0; i < state.scopes.length; i++) { + var scope = state.scopes[i]; + + if (scope.offset <= withCurrentIndent) + newScopes.push(scope); + } + + state.scopes = newScopes; + } + + + return style; + } + + return { + startState: function() { + return { + tokenizer: tokenBase, + scopes: [{offset: 0, type: "sass"}], + indentCount: 0, + cursorHalf: 0, // cursor half tells us if cursor lies after (1) + // or before (0) colon (well... more or less) + definedVars: [], + definedMixins: [] + }; + }, + token: function(stream, state) { + var style = tokenLexer(stream, state); + + state.lastToken = { style: style, content: stream.current() }; + + return style; + }, + + indent: function(state) { + return state.scopes[0].offset; + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + fold: "indent" + }; +}, "css"); + +CodeMirror.defineMIME("text/x-sass", "sass"); + +}); diff --git a/js/codemirror/mode/sass/test.js b/js/codemirror/mode/sass/test.js new file mode 100644 index 0000000..4ed1290 --- /dev/null +++ b/js/codemirror/mode/sass/test.js @@ -0,0 +1,122 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "sass"); + // Since Sass has an indent-based syntax, is almost impossible to test correctly the indentation in all cases. + // So disable it for tests. + mode.indent = undefined; + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("comment", + "[comment // this is a comment]", + "[comment also this is a comment]") + + MT("comment_multiline", + "[comment /* this is a comment]", + "[comment also this is a comment]") + + MT("variable", + "[variable-2 $page-width][operator :] [number 800][unit px]") + + MT("global_attributes", + "[tag body]", + " [property font][operator :]", + " [property family][operator :] [atom sans-serif]", + " [property size][operator :] [number 30][unit em]", + " [property weight][operator :] [atom bold]") + + MT("scoped_styles", + "[builtin #contents]", + " [property width][operator :] [variable-2 $page-width]", + " [builtin #sidebar]", + " [property float][operator :] [atom right]", + " [property width][operator :] [variable-2 $sidebar-width]", + " [builtin #main]", + " [property width][operator :] [variable-2 $page-width] [operator -] [variable-2 $sidebar-width]", + " [property background][operator :] [variable-2 $primary-color]", + " [tag h2]", + " [property color][operator :] [keyword blue]") + + // Sass allows to write the colon as first char instead of a "separator". + // :color red + // Not supported + // MT("property_syntax", + // "[qualifier .foo]", + // " [operator :][property color] [keyword red]") + + MT("import", + "[def @import] [string \"sass/variables\"]", + // Probably it should parsed as above: as a string even without the " or ' + // "[def @import] [string sass/baz]" + "[def @import] [tag sass][operator /][tag baz]") + + MT("def", + "[def @if] [variable-2 $foo] [def @else]") + + MT("tag_on_more_lines", + "[tag td],", + "[tag th]", + " [property font-family][operator :] [string \"Arial\"], [atom serif]") + + MT("important", + "[qualifier .foo]", + " [property text-decoration][operator :] [atom none] [keyword !important]", + "[tag h1]", + " [property font-size][operator :] [number 2.5][unit em]") + + MT("selector", + // SCSS doesn't highlight the : + // "[tag h1]:[variable-3 before],", + // "[tag h2]:[variable-3 before]", + "[tag h1][variable-3 :before],", + "[tag h2][variable-3 :before]", + " [property content][operator :] [string \"::\"]") + + MT("definition_mixin_equal", + "[variable-2 $defined-bs-type][operator :] [atom border-box] [keyword !default]", + "[meta =bs][operator (][variable-2 $bs-type][operator :] [variable-2 $defined-bs-type][operator )]", + " [meta -webkit-][property box-sizing][operator :] [variable-2 $bs-type]", + " [property box-sizing][operator :] [variable-2 $bs-type]") + + MT("definition_mixin_with_space", + "[variable-2 $defined-bs-type][operator :] [atom border-box] [keyword !default]", + "[def @mixin] [tag bs][operator (][variable-2 $bs-type][operator :] [variable-2 $defined-bs-type][operator )] ", + " [meta -moz-][property box-sizing][operator :] [variable-2 $bs-type]", + " [property box-sizing][operator :] [variable-2 $bs-type]") + + MT("numbers_start_dot_include_plus", + // The % is not highlighted correctly + // "[meta =button-links][operator (][variable-2 $button-base][operator :] [atom darken][operator (][variable-2 $color11], [number 10][unit %][operator )][operator )]", + "[meta =button-links][operator (][variable-2 $button-base][operator :] [atom darken][operator (][variable-2 $color11], [number 10][operator %))]", + " [property padding][operator :] [number .3][unit em] [number .6][unit em]", + " [variable-3 +border-radius][operator (][number 8][unit px][operator )]", + " [property background-color][operator :] [variable-2 $button-base]") + + MT("include", + "[qualifier .bar]", + " [def @include] [tag border-radius][operator (][number 8][unit px][operator )]") + + MT("reference_parent", + "[qualifier .col]", + " [property clear][operator :] [atom both]", + // SCSS doesn't highlight the : + // " &:[variable-3 after]", + " &[variable-3 :after]", + " [property content][operator :] [string '']", + " [property clear][operator :] [atom both]") + + MT("reference_parent_with_spaces", + "[tag section]", + " [property border-left][operator :] [number 20][unit px] [atom transparent] [atom solid] ", + " &[qualifier .section3]", + " [qualifier .title]", + " [property color][operator :] [keyword white] ", + " [qualifier .vermas]", + " [property display][operator :] [atom none]") + + MT("font_face", + "[def @font-face]", + " [property font-family][operator :] [string 'icomoon']", + " [property src][operator :] [atom url][operator (][string fonts/icomoon.ttf][operator )]") +})(); diff --git a/js/codemirror/mode/scheme/index.html b/js/codemirror/mode/scheme/index.html new file mode 100644 index 0000000..f8a6e5c --- /dev/null +++ b/js/codemirror/mode/scheme/index.html @@ -0,0 +1,77 @@ + + +CodeMirror: Scheme mode + + + + + + + + + +
+

Scheme mode

+
+ + +

MIME types defined: text/x-scheme.

+ +
diff --git a/js/codemirror/mode/scheme/scheme.js b/js/codemirror/mode/scheme/scheme.js new file mode 100644 index 0000000..598dd28 --- /dev/null +++ b/js/codemirror/mode/scheme/scheme.js @@ -0,0 +1,284 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/** + * Author: Koh Zi Han, based on implementation by Koh Zi Chun + * Improved by: Jakub T. Jankiewicz + */ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("scheme", function () { + var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", + SYMBOL = "symbol", ATOM = "atom", NUMBER = "number", BRACKET = "bracket"; + var INDENT_WORD_SKIP = 2; + + function makeKeywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = makeKeywords("λ case-lambda call/cc class cond-expand define-class define-values exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax define-macro defmacro delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"); + var indentKeys = makeKeywords("define let letrec let* lambda define-macro defmacro let-syntax letrec-syntax let-values let*-values define-syntax syntax-rules define-values when unless"); + + function stateStack(indent, type, prev) { // represents a state stack object + this.indent = indent; + this.type = type; + this.prev = prev; + } + + function pushStack(state, indent, type) { + state.indentStack = new stateStack(indent, type, state.indentStack); + } + + function popStack(state) { + state.indentStack = state.indentStack.prev; + } + + var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i); + var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i); + var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i); + var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i); + + function isBinaryNumber (stream) { + return stream.match(binaryMatcher); + } + + function isOctalNumber (stream) { + return stream.match(octalMatcher); + } + + function isDecimalNumber (stream, backup) { + if (backup === true) { + stream.backUp(1); + } + return stream.match(decimalMatcher); + } + + function isHexNumber (stream) { + return stream.match(hexMatcher); + } + + function processEscapedSequence(stream, options) { + var next, escaped = false; + while ((next = stream.next()) != null) { + if (next == options.token && !escaped) { + + options.state.mode = false; + break; + } + escaped = !escaped && next == "\\"; + } + } + + return { + startState: function () { + return { + indentStack: null, + indentation: 0, + mode: false, + sExprComment: false, + sExprQuote: false + }; + }, + + token: function (stream, state) { + if (state.indentStack == null && stream.sol()) { + // update indentation, but only if indentStack is empty + state.indentation = stream.indentation(); + } + + // skip spaces + if (stream.eatSpace()) { + return null; + } + var returnType = null; + + switch(state.mode){ + case "string": // multi-line string parsing mode + processEscapedSequence(stream, { + token: "\"", + state: state + }); + returnType = STRING; // continue on in scheme-string mode + break; + case "symbol": // escape symbol + processEscapedSequence(stream, { + token: "|", + state: state + }); + returnType = SYMBOL; // continue on in scheme-symbol mode + break; + case "comment": // comment parsing mode + var next, maybeEnd = false; + while ((next = stream.next()) != null) { + if (next == "#" && maybeEnd) { + + state.mode = false; + break; + } + maybeEnd = (next == "|"); + } + returnType = COMMENT; + break; + case "s-expr-comment": // s-expr commenting mode + state.mode = false; + if(stream.peek() == "(" || stream.peek() == "["){ + // actually start scheme s-expr commenting mode + state.sExprComment = 0; + }else{ + // if not we just comment the entire of the next token + stream.eatWhile(/[^\s\(\)\[\]]/); // eat symbol atom + returnType = COMMENT; + break; + } + default: // default parsing mode + var ch = stream.next(); + + if (ch == "\"") { + state.mode = "string"; + returnType = STRING; + + } else if (ch == "'") { + if (stream.peek() == "(" || stream.peek() == "["){ + if (typeof state.sExprQuote != "number") { + state.sExprQuote = 0; + } // else already in a quoted expression + returnType = ATOM; + } else { + stream.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/); + returnType = ATOM; + } + } else if (ch == '|') { + state.mode = "symbol"; + returnType = SYMBOL; + } else if (ch == '#') { + if (stream.eat("|")) { // Multi-line comment + state.mode = "comment"; // toggle to comment mode + returnType = COMMENT; + } else if (stream.eat(/[tf]/i)) { // #t/#f (atom) + returnType = ATOM; + } else if (stream.eat(';')) { // S-Expr comment + state.mode = "s-expr-comment"; + returnType = COMMENT; + } else { + var numTest = null, hasExactness = false, hasRadix = true; + if (stream.eat(/[ei]/i)) { + hasExactness = true; + } else { + stream.backUp(1); // must be radix specifier + } + if (stream.match(/^#b/i)) { + numTest = isBinaryNumber; + } else if (stream.match(/^#o/i)) { + numTest = isOctalNumber; + } else if (stream.match(/^#x/i)) { + numTest = isHexNumber; + } else if (stream.match(/^#d/i)) { + numTest = isDecimalNumber; + } else if (stream.match(/^[-+0-9.]/, false)) { + hasRadix = false; + numTest = isDecimalNumber; + // re-consume the initial # if all matches failed + } else if (!hasExactness) { + stream.eat('#'); + } + if (numTest != null) { + if (hasRadix && !hasExactness) { + // consume optional exactness after radix + stream.match(/^#[ei]/i); + } + if (numTest(stream)) + returnType = NUMBER; + } + } + } else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal + returnType = NUMBER; + } else if (ch == ";") { // comment + stream.skipToEnd(); // rest of the line is a comment + returnType = COMMENT; + } else if (ch == "(" || ch == "[") { + var keyWord = ''; var indentTemp = stream.column(), letter; + /** + Either + (indent-word .. + (non-indent-word .. + (;something else, bracket, etc. + */ + + while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) { + keyWord += letter; + } + + if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word + + pushStack(state, indentTemp + INDENT_WORD_SKIP, ch); + } else { // non-indent word + // we continue eating the spaces + stream.eatSpace(); + if (stream.eol() || stream.peek() == ";") { + // nothing significant after + // we restart indentation 1 space after + pushStack(state, indentTemp + 1, ch); + } else { + pushStack(state, indentTemp + stream.current().length, ch); // else we match + } + } + stream.backUp(stream.current().length - 1); // undo all the eating + + if(typeof state.sExprComment == "number") state.sExprComment++; + if(typeof state.sExprQuote == "number") state.sExprQuote++; + + returnType = BRACKET; + } else if (ch == ")" || ch == "]") { + returnType = BRACKET; + if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) { + popStack(state); + + if(typeof state.sExprComment == "number"){ + if(--state.sExprComment == 0){ + returnType = COMMENT; // final closing bracket + state.sExprComment = false; // turn off s-expr commenting mode + } + } + if(typeof state.sExprQuote == "number"){ + if(--state.sExprQuote == 0){ + returnType = ATOM; // final closing bracket + state.sExprQuote = false; // turn off s-expr quote mode + } + } + } + } else { + stream.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/); + + if (keywords && keywords.propertyIsEnumerable(stream.current())) { + returnType = BUILTIN; + } else returnType = "variable"; + } + } + return (typeof state.sExprComment == "number") ? COMMENT : ((typeof state.sExprQuote == "number") ? ATOM : returnType); + }, + + indent: function (state) { + if (state.indentStack == null) return state.indentation; + return state.indentStack.indent; + }, + + fold: "brace-paren", + closeBrackets: {pairs: "()[]{}\"\""}, + lineComment: ";;" + }; +}); + +CodeMirror.defineMIME("text/x-scheme", "scheme"); + +}); diff --git a/js/codemirror/mode/shell/index.html b/js/codemirror/mode/shell/index.html new file mode 100644 index 0000000..ccaad3c --- /dev/null +++ b/js/codemirror/mode/shell/index.html @@ -0,0 +1,66 @@ + + +CodeMirror: Shell mode + + + + + + + + + + +
+

Shell mode

+ + + + + + +

MIME types defined: text/x-sh, application/x-sh.

+
diff --git a/js/codemirror/mode/shell/shell.js b/js/codemirror/mode/shell/shell.js new file mode 100644 index 0000000..9ae9118 --- /dev/null +++ b/js/codemirror/mode/shell/shell.js @@ -0,0 +1,168 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('shell', function() { + + var words = {}; + function define(style, dict) { + for(var i = 0; i < dict.length; i++) { + words[dict[i]] = style; + } + }; + + var commonAtoms = ["true", "false"]; + var commonKeywords = ["if", "then", "do", "else", "elif", "while", "until", "for", "in", "esac", "fi", + "fin", "fil", "done", "exit", "set", "unset", "export", "function"]; + var commonCommands = ["ab", "awk", "bash", "beep", "cat", "cc", "cd", "chown", "chmod", "chroot", "clear", + "cp", "curl", "cut", "diff", "echo", "find", "gawk", "gcc", "get", "git", "grep", "hg", "kill", "killall", + "ln", "ls", "make", "mkdir", "openssl", "mv", "nc", "nl", "node", "npm", "ping", "ps", "restart", "rm", + "rmdir", "sed", "service", "sh", "shopt", "shred", "source", "sort", "sleep", "ssh", "start", "stop", + "su", "sudo", "svn", "tee", "telnet", "top", "touch", "vi", "vim", "wall", "wc", "wget", "who", "write", + "yes", "zsh"]; + + CodeMirror.registerHelper("hintWords", "shell", commonAtoms.concat(commonKeywords, commonCommands)); + + define('atom', commonAtoms); + define('keyword', commonKeywords); + define('builtin', commonCommands); + + function tokenBase(stream, state) { + if (stream.eatSpace()) return null; + + var sol = stream.sol(); + var ch = stream.next(); + + if (ch === '\\') { + stream.next(); + return null; + } + if (ch === '\'' || ch === '"' || ch === '`') { + state.tokens.unshift(tokenString(ch, ch === "`" ? "quote" : "string")); + return tokenize(stream, state); + } + if (ch === '#') { + if (sol && stream.eat('!')) { + stream.skipToEnd(); + return 'meta'; // 'comment'? + } + stream.skipToEnd(); + return 'comment'; + } + if (ch === '$') { + state.tokens.unshift(tokenDollar); + return tokenize(stream, state); + } + if (ch === '+' || ch === '=') { + return 'operator'; + } + if (ch === '-') { + stream.eat('-'); + stream.eatWhile(/\w/); + return 'attribute'; + } + if (ch == "<") { + if (stream.match("<<")) return "operator" + var heredoc = stream.match(/^<-?\s*['"]?([^'"]*)['"]?/) + if (heredoc) { + state.tokens.unshift(tokenHeredoc(heredoc[1])) + return 'string-2' + } + } + if (/\d/.test(ch)) { + stream.eatWhile(/\d/); + if(stream.eol() || !/\w/.test(stream.peek())) { + return 'number'; + } + } + stream.eatWhile(/[\w-]/); + var cur = stream.current(); + if (stream.peek() === '=' && /\w+/.test(cur)) return 'def'; + return words.hasOwnProperty(cur) ? words[cur] : null; + } + + function tokenString(quote, style) { + var close = quote == "(" ? ")" : quote == "{" ? "}" : quote + return function(stream, state) { + var next, escaped = false; + while ((next = stream.next()) != null) { + if (next === close && !escaped) { + state.tokens.shift(); + break; + } else if (next === '$' && !escaped && quote !== "'" && stream.peek() != close) { + escaped = true; + stream.backUp(1); + state.tokens.unshift(tokenDollar); + break; + } else if (!escaped && quote !== close && next === quote) { + state.tokens.unshift(tokenString(quote, style)) + return tokenize(stream, state) + } else if (!escaped && /['"]/.test(next) && !/['"]/.test(quote)) { + state.tokens.unshift(tokenStringStart(next, "string")); + stream.backUp(1); + break; + } + escaped = !escaped && next === '\\'; + } + return style; + }; + }; + + function tokenStringStart(quote, style) { + return function(stream, state) { + state.tokens[0] = tokenString(quote, style) + stream.next() + return tokenize(stream, state) + } + } + + var tokenDollar = function(stream, state) { + if (state.tokens.length > 1) stream.eat('$'); + var ch = stream.next() + if (/['"({]/.test(ch)) { + state.tokens[0] = tokenString(ch, ch == "(" ? "quote" : ch == "{" ? "def" : "string"); + return tokenize(stream, state); + } + if (!/\d/.test(ch)) stream.eatWhile(/\w/); + state.tokens.shift(); + return 'def'; + }; + + function tokenHeredoc(delim) { + return function(stream, state) { + if (stream.sol() && stream.string == delim) state.tokens.shift() + stream.skipToEnd() + return "string-2" + } + } + + function tokenize(stream, state) { + return (state.tokens[0] || tokenBase) (stream, state); + }; + + return { + startState: function() {return {tokens:[]};}, + token: function(stream, state) { + return tokenize(stream, state); + }, + closeBrackets: "()[]{}''\"\"``", + lineComment: '#', + fold: "brace" + }; +}); + +CodeMirror.defineMIME('text/x-sh', 'shell'); +// Apache uses a slightly different Media Type for Shell scripts +// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types +CodeMirror.defineMIME('application/x-sh', 'shell'); + +}); diff --git a/js/codemirror/mode/shell/test.js b/js/codemirror/mode/shell/test.js new file mode 100644 index 0000000..eee1ddb --- /dev/null +++ b/js/codemirror/mode/shell/test.js @@ -0,0 +1,80 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({}, "shell"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("var", + "text [def $var] text"); + MT("varBraces", + "text[def ${var}]text"); + MT("varVar", + "text [def $a$b] text"); + MT("varBracesVarBraces", + "text[def ${a}${b}]text"); + + MT("singleQuotedVar", + "[string 'text $var text']"); + MT("singleQuotedVarBraces", + "[string 'text ${var} text']"); + + MT("doubleQuotedVar", + '[string "text ][def $var][string text"]'); + MT("doubleQuotedVarBraces", + '[string "text][def ${var}][string text"]'); + MT("doubleQuotedVarPunct", + '[string "text ][def $@][string text"]'); + MT("doubleQuotedVarVar", + '[string "][def $a$b][string "]'); + MT("doubleQuotedVarBracesVarBraces", + '[string "][def ${a}${b}][string "]'); + + MT("notAString", + "text\\'text"); + MT("escapes", + "outside\\'\\\"\\`\\\\[string \"inside\\`\\'\\\"\\\\`\\$notAVar\"]outside\\$\\(notASubShell\\)"); + + MT("subshell", + "[builtin echo] [quote $(whoami)] s log, stardate [quote `date`]."); + MT("doubleQuotedSubshell", + "[builtin echo] [string \"][quote $(whoami)][string 's log, stardate `date`.\"]"); + + MT("hashbang", + "[meta #!/bin/bash]"); + MT("comment", + "text [comment # Blurb]"); + + MT("numbers", + "[number 0] [number 1] [number 2]"); + MT("keywords", + "[keyword while] [atom true]; [keyword do]", + " [builtin sleep] [number 3]", + "[keyword done]"); + MT("options", + "[builtin ls] [attribute -l] [attribute --human-readable]"); + MT("operator", + "[def var][operator =]value"); + + MT("doubleParens", + "foo [quote $((bar))]") + + MT("nested braces", + "[builtin echo] [def ${A[${B}]]}]") + + MT("strings in parens", + "[def FOO][operator =]([quote $(<][string \"][def $MYDIR][string \"][quote /myfile grep ][string 'hello$'][quote )])") + + MT("string ending in dollar", + '[def a][operator =][string "xyz$"]; [def b][operator =][string "y"]') + + MT("quote ending in dollar", + "[quote $(echo a$)]") + + MT("heredoc", + "[builtin cat] [string-2 <<- end]", + "[string-2 content one]", + "[string-2 content two end]", + "[string-2 end]", + "[builtin echo]") +})(); diff --git a/js/codemirror/mode/sieve/index.html b/js/codemirror/mode/sieve/index.html new file mode 100644 index 0000000..86df543 --- /dev/null +++ b/js/codemirror/mode/sieve/index.html @@ -0,0 +1,93 @@ + + +CodeMirror: Sieve (RFC5228) mode + + + + + + + + + +
+

Sieve (RFC5228) mode

+
+ + +

MIME types defined: application/sieve.

+ +
diff --git a/js/codemirror/mode/sieve/sieve.js b/js/codemirror/mode/sieve/sieve.js new file mode 100644 index 0000000..d08fe47 --- /dev/null +++ b/js/codemirror/mode/sieve/sieve.js @@ -0,0 +1,193 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("sieve", function(config) { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = words("if elsif else stop require"); + var atoms = words("true false not"); + var indentUnit = config.indentUnit; + + function tokenBase(stream, state) { + + var ch = stream.next(); + if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + + if (ch === '#') { + stream.skipToEnd(); + return "comment"; + } + + if (ch == "\"") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + + if (ch == "(") { + state._indent.push("("); + // add virtual angel wings so that editor behaves... + // ...more sane in case of broken brackets + state._indent.push("{"); + return null; + } + + if (ch === "{") { + state._indent.push("{"); + return null; + } + + if (ch == ")") { + state._indent.pop(); + state._indent.pop(); + } + + if (ch === "}") { + state._indent.pop(); + return null; + } + + if (ch == ",") + return null; + + if (ch == ";") + return null; + + + if (/[{}\(\),;]/.test(ch)) + return null; + + // 1*DIGIT "K" / "M" / "G" + if (/\d/.test(ch)) { + stream.eatWhile(/[\d]/); + stream.eat(/[KkMmGg]/); + return "number"; + } + + // ":" (ALPHA / "_") *(ALPHA / DIGIT / "_") + if (ch == ":") { + stream.eatWhile(/[a-zA-Z_]/); + stream.eatWhile(/[a-zA-Z0-9_]/); + + return "operator"; + } + + stream.eatWhile(/\w/); + var cur = stream.current(); + + // "text:" *(SP / HTAB) (hash-comment / CRLF) + // *(multiline-literal / multiline-dotstart) + // "." CRLF + if ((cur == "text") && stream.eat(":")) + { + state.tokenize = tokenMultiLineString; + return "string"; + } + + if (keywords.propertyIsEnumerable(cur)) + return "keyword"; + + if (atoms.propertyIsEnumerable(cur)) + return "atom"; + + return null; + } + + function tokenMultiLineString(stream, state) + { + state._multiLineString = true; + // the first line is special it may contain a comment + if (!stream.sol()) { + stream.eatSpace(); + + if (stream.peek() == "#") { + stream.skipToEnd(); + return "comment"; + } + + stream.skipToEnd(); + return "string"; + } + + if ((stream.next() == ".") && (stream.eol())) + { + state._multiLineString = false; + state.tokenize = tokenBase; + } + + return "string"; + } + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) + break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return "string"; + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + _indent: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) + return null; + + return (state.tokenize || tokenBase)(stream, state); + }, + + indent: function(state, _textAfter) { + var length = state._indent.length; + if (_textAfter && (_textAfter[0] == "}")) + length--; + + if (length <0) + length = 0; + + return length * indentUnit; + }, + + electricChars: "}" + }; +}); + +CodeMirror.defineMIME("application/sieve", "sieve"); + +}); diff --git a/js/codemirror/mode/slim/index.html b/js/codemirror/mode/slim/index.html new file mode 100644 index 0000000..f90c341 --- /dev/null +++ b/js/codemirror/mode/slim/index.html @@ -0,0 +1,96 @@ + + +CodeMirror: SLIM mode + + + + + + + + + + + + + + + + + + + + +
+

SLIM mode

+
+ + +

MIME types defined: application/x-slim.

+ +

+ Parsing/Highlighting Tests: + normal, + verbose. +

+
diff --git a/js/codemirror/mode/slim/slim.js b/js/codemirror/mode/slim/slim.js new file mode 100644 index 0000000..6da9f97 --- /dev/null +++ b/js/codemirror/mode/slim/slim.js @@ -0,0 +1,575 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Slim Highlighting for CodeMirror copyright (c) HicknHack Software Gmbh + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), require("../ruby/ruby")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../htmlmixed/htmlmixed", "../ruby/ruby"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + + CodeMirror.defineMode("slim", function(config) { + var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"}); + var rubyMode = CodeMirror.getMode(config, "ruby"); + var modes = { html: htmlMode, ruby: rubyMode }; + var embedded = { + ruby: "ruby", + javascript: "javascript", + css: "text/css", + sass: "text/x-sass", + scss: "text/x-scss", + less: "text/x-less", + styl: "text/x-styl", // no highlighting so far + coffee: "coffeescript", + asciidoc: "text/x-asciidoc", + markdown: "text/x-markdown", + textile: "text/x-textile", // no highlighting so far + creole: "text/x-creole", // no highlighting so far + wiki: "text/x-wiki", // no highlighting so far + mediawiki: "text/x-mediawiki", // no highlighting so far + rdoc: "text/x-rdoc", // no highlighting so far + builder: "text/x-builder", // no highlighting so far + nokogiri: "text/x-nokogiri", // no highlighting so far + erb: "application/x-erb" + }; + var embeddedRegexp = function(map){ + var arr = []; + for(var key in map) arr.push(key); + return new RegExp("^("+arr.join('|')+"):"); + }(embedded); + + var styleMap = { + "commentLine": "comment", + "slimSwitch": "operator special", + "slimTag": "tag", + "slimId": "attribute def", + "slimClass": "attribute qualifier", + "slimAttribute": "attribute", + "slimSubmode": "keyword special", + "closeAttributeTag": null, + "slimDoctype": null, + "lineContinuation": null + }; + var closing = { + "{": "}", + "[": "]", + "(": ")" + }; + + var nameStartChar = "_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD"; + var nameChar = nameStartChar + "\\-0-9\xB7\u0300-\u036F\u203F-\u2040"; + var nameRegexp = new RegExp("^[:"+nameStartChar+"](?::["+nameChar+"]|["+nameChar+"]*)"); + var attributeNameRegexp = new RegExp("^[:"+nameStartChar+"][:\\."+nameChar+"]*(?=\\s*=)"); + var wrappedAttributeNameRegexp = new RegExp("^[:"+nameStartChar+"][:\\."+nameChar+"]*"); + var classNameRegexp = /^\.-?[_a-zA-Z]+[\w\-]*/; + var classIdRegexp = /^#[_a-zA-Z]+[\w\-]*/; + + function backup(pos, tokenize, style) { + var restore = function(stream, state) { + state.tokenize = tokenize; + if (stream.pos < pos) { + stream.pos = pos; + return style; + } + return state.tokenize(stream, state); + }; + return function(stream, state) { + state.tokenize = restore; + return tokenize(stream, state); + }; + } + + function maybeBackup(stream, state, pat, offset, style) { + var cur = stream.current(); + var idx = cur.search(pat); + if (idx > -1) { + state.tokenize = backup(stream.pos, state.tokenize, style); + stream.backUp(cur.length - idx - offset); + } + return style; + } + + function continueLine(state, column) { + state.stack = { + parent: state.stack, + style: "continuation", + indented: column, + tokenize: state.line + }; + state.line = state.tokenize; + } + function finishContinue(state) { + if (state.line == state.tokenize) { + state.line = state.stack.tokenize; + state.stack = state.stack.parent; + } + } + + function lineContinuable(column, tokenize) { + return function(stream, state) { + finishContinue(state); + if (stream.match(/^\\$/)) { + continueLine(state, column); + return "lineContinuation"; + } + var style = tokenize(stream, state); + if (stream.eol() && stream.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)) { + stream.backUp(1); + } + return style; + }; + } + function commaContinuable(column, tokenize) { + return function(stream, state) { + finishContinue(state); + var style = tokenize(stream, state); + if (stream.eol() && stream.current().match(/,$/)) { + continueLine(state, column); + } + return style; + }; + } + + function rubyInQuote(endQuote, tokenize) { + // TODO: add multi line support + return function(stream, state) { + var ch = stream.peek(); + if (ch == endQuote && state.rubyState.tokenize.length == 1) { + // step out of ruby context as it seems to complete processing all the braces + stream.next(); + state.tokenize = tokenize; + return "closeAttributeTag"; + } else { + return ruby(stream, state); + } + }; + } + function startRubySplat(tokenize) { + var rubyState; + var runSplat = function(stream, state) { + if (state.rubyState.tokenize.length == 1 && !state.rubyState.context.prev) { + stream.backUp(1); + if (stream.eatSpace()) { + state.rubyState = rubyState; + state.tokenize = tokenize; + return tokenize(stream, state); + } + stream.next(); + } + return ruby(stream, state); + }; + return function(stream, state) { + rubyState = state.rubyState; + state.rubyState = CodeMirror.startState(rubyMode); + state.tokenize = runSplat; + return ruby(stream, state); + }; + } + + function ruby(stream, state) { + return rubyMode.token(stream, state.rubyState); + } + + function htmlLine(stream, state) { + if (stream.match(/^\\$/)) { + return "lineContinuation"; + } + return html(stream, state); + } + function html(stream, state) { + if (stream.match(/^#\{/)) { + state.tokenize = rubyInQuote("}", state.tokenize); + return null; + } + return maybeBackup(stream, state, /[^\\]#\{/, 1, htmlMode.token(stream, state.htmlState)); + } + + function startHtmlLine(lastTokenize) { + return function(stream, state) { + var style = htmlLine(stream, state); + if (stream.eol()) state.tokenize = lastTokenize; + return style; + }; + } + + function startHtmlMode(stream, state, offset) { + state.stack = { + parent: state.stack, + style: "html", + indented: stream.column() + offset, // pipe + space + tokenize: state.line + }; + state.line = state.tokenize = html; + return null; + } + + function comment(stream, state) { + stream.skipToEnd(); + return state.stack.style; + } + + function commentMode(stream, state) { + state.stack = { + parent: state.stack, + style: "comment", + indented: state.indented + 1, + tokenize: state.line + }; + state.line = comment; + return comment(stream, state); + } + + function attributeWrapper(stream, state) { + if (stream.eat(state.stack.endQuote)) { + state.line = state.stack.line; + state.tokenize = state.stack.tokenize; + state.stack = state.stack.parent; + return null; + } + if (stream.match(wrappedAttributeNameRegexp)) { + state.tokenize = attributeWrapperAssign; + return "slimAttribute"; + } + stream.next(); + return null; + } + function attributeWrapperAssign(stream, state) { + if (stream.match(/^==?/)) { + state.tokenize = attributeWrapperValue; + return null; + } + return attributeWrapper(stream, state); + } + function attributeWrapperValue(stream, state) { + var ch = stream.peek(); + if (ch == '"' || ch == "\'") { + state.tokenize = readQuoted(ch, "string", true, false, attributeWrapper); + stream.next(); + return state.tokenize(stream, state); + } + if (ch == '[') { + return startRubySplat(attributeWrapper)(stream, state); + } + if (stream.match(/^(true|false|nil)\b/)) { + state.tokenize = attributeWrapper; + return "keyword"; + } + return startRubySplat(attributeWrapper)(stream, state); + } + + function startAttributeWrapperMode(state, endQuote, tokenize) { + state.stack = { + parent: state.stack, + style: "wrapper", + indented: state.indented + 1, + tokenize: tokenize, + line: state.line, + endQuote: endQuote + }; + state.line = state.tokenize = attributeWrapper; + return null; + } + + function sub(stream, state) { + if (stream.match(/^#\{/)) { + state.tokenize = rubyInQuote("}", state.tokenize); + return null; + } + var subStream = new CodeMirror.StringStream(stream.string.slice(state.stack.indented), stream.tabSize); + subStream.pos = stream.pos - state.stack.indented; + subStream.start = stream.start - state.stack.indented; + subStream.lastColumnPos = stream.lastColumnPos - state.stack.indented; + subStream.lastColumnValue = stream.lastColumnValue - state.stack.indented; + var style = state.subMode.token(subStream, state.subState); + stream.pos = subStream.pos + state.stack.indented; + return style; + } + function firstSub(stream, state) { + state.stack.indented = stream.column(); + state.line = state.tokenize = sub; + return state.tokenize(stream, state); + } + + function createMode(mode) { + var query = embedded[mode]; + var spec = CodeMirror.mimeModes[query]; + if (spec) { + return CodeMirror.getMode(config, spec); + } + var factory = CodeMirror.modes[query]; + if (factory) { + return factory(config, {name: query}); + } + return CodeMirror.getMode(config, "null"); + } + + function getMode(mode) { + if (!modes.hasOwnProperty(mode)) { + return modes[mode] = createMode(mode); + } + return modes[mode]; + } + + function startSubMode(mode, state) { + var subMode = getMode(mode); + var subState = CodeMirror.startState(subMode); + + state.subMode = subMode; + state.subState = subState; + + state.stack = { + parent: state.stack, + style: "sub", + indented: state.indented + 1, + tokenize: state.line + }; + state.line = state.tokenize = firstSub; + return "slimSubmode"; + } + + function doctypeLine(stream, _state) { + stream.skipToEnd(); + return "slimDoctype"; + } + + function startLine(stream, state) { + var ch = stream.peek(); + if (ch == '<') { + return (state.tokenize = startHtmlLine(state.tokenize))(stream, state); + } + if (stream.match(/^[|']/)) { + return startHtmlMode(stream, state, 1); + } + if (stream.match(/^\/(!|\[\w+])?/)) { + return commentMode(stream, state); + } + if (stream.match(/^(-|==?[<>]?)/)) { + state.tokenize = lineContinuable(stream.column(), commaContinuable(stream.column(), ruby)); + return "slimSwitch"; + } + if (stream.match(/^doctype\b/)) { + state.tokenize = doctypeLine; + return "keyword"; + } + + var m = stream.match(embeddedRegexp); + if (m) { + return startSubMode(m[1], state); + } + + return slimTag(stream, state); + } + + function slim(stream, state) { + if (state.startOfLine) { + return startLine(stream, state); + } + return slimTag(stream, state); + } + + function slimTag(stream, state) { + if (stream.eat('*')) { + state.tokenize = startRubySplat(slimTagExtras); + return null; + } + if (stream.match(nameRegexp)) { + state.tokenize = slimTagExtras; + return "slimTag"; + } + return slimClass(stream, state); + } + function slimTagExtras(stream, state) { + if (stream.match(/^(<>?|> state.indented && state.last != "slimSubmode") { + state.line = state.tokenize = state.stack.tokenize; + state.stack = state.stack.parent; + state.subMode = null; + state.subState = null; + } + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + state.startOfLine = false; + if (style) state.last = style; + return styleMap.hasOwnProperty(style) ? styleMap[style] : style; + }, + + blankLine: function(state) { + if (state.subMode && state.subMode.blankLine) { + return state.subMode.blankLine(state.subState); + } + }, + + innerMode: function(state) { + if (state.subMode) return {state: state.subState, mode: state.subMode}; + return {state: state, mode: mode}; + } + + //indent: function(state) { + // return state.indented; + //} + }; + return mode; + }, "htmlmixed", "ruby"); + + CodeMirror.defineMIME("text/x-slim", "slim"); + CodeMirror.defineMIME("application/x-slim", "slim"); +}); diff --git a/js/codemirror/mode/slim/test.js b/js/codemirror/mode/slim/test.js new file mode 100644 index 0000000..82115d1 --- /dev/null +++ b/js/codemirror/mode/slim/test.js @@ -0,0 +1,96 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Slim Highlighting for CodeMirror copyright (c) HicknHack Software Gmbh + +(function() { + var mode = CodeMirror.getMode({tabSize: 4, indentUnit: 2}, "slim"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Requires at least one media query + MT("elementName", + "[tag h1] Hey There"); + + MT("oneElementPerLine", + "[tag h1] Hey There .h2"); + + MT("idShortcut", + "[attribute&def #test] Hey There"); + + MT("tagWithIdShortcuts", + "[tag h1][attribute&def #test] Hey There"); + + MT("classShortcut", + "[attribute&qualifier .hello] Hey There"); + + MT("tagWithIdAndClassShortcuts", + "[tag h1][attribute&def #test][attribute&qualifier .hello] Hey There"); + + MT("docType", + "[keyword doctype] xml"); + + MT("comment", + "[comment / Hello WORLD]"); + + MT("notComment", + "[tag h1] This is not a / comment "); + + MT("attributes", + "[tag a]([attribute title]=[string \"test\"]) [attribute href]=[string \"link\"]}"); + + MT("multiLineAttributes", + "[tag a]([attribute title]=[string \"test\"]", + " ) [attribute href]=[string \"link\"]}"); + + MT("htmlCode", + "[tag&bracket <][tag h1][tag&bracket >]Title[tag&bracket ]"); + + MT("rubyBlock", + "[operator&special =][variable-2 @item]"); + + MT("selectorRubyBlock", + "[tag a][attribute&qualifier .test][operator&special =] [variable-2 @item]"); + + MT("nestedRubyBlock", + "[tag a]", + " [operator&special =][variable puts] [string \"test\"]"); + + MT("multilinePlaintext", + "[tag p]", + " | Hello,", + " World"); + + MT("multilineRuby", + "[tag p]", + " [comment /# this is a comment]", + " [comment and this is a comment too]", + " | Date/Time", + " [operator&special -] [variable now] [operator =] [tag DateTime][operator .][property now]", + " [tag strong][operator&special =] [variable now]", + " [operator&special -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][property parse]([string \"December 31, 2006\"])", + " [operator&special =][string \"Happy\"]", + " [operator&special =][string \"Belated\"]", + " [operator&special =][string \"Birthday\"]"); + + MT("multilineComment", + "[comment /]", + " [comment Multiline]", + " [comment Comment]"); + + MT("hamlAfterRubyTag", + "[attribute&qualifier .block]", + " [tag strong][operator&special =] [variable now]", + " [attribute&qualifier .test]", + " [operator&special =][variable now]", + " [attribute&qualifier .right]"); + + MT("stretchedRuby", + "[operator&special =] [variable puts] [string \"Hello\"],", + " [string \"World\"]"); + + MT("interpolationInHashAttribute", + "[tag div]{[attribute id] = [string \"]#{[variable test]}[string _]#{[variable ting]}[string \"]} test"); + + MT("interpolationInHTMLAttribute", + "[tag div]([attribute title]=[string \"]#{[variable test]}[string _]#{[variable ting]()}[string \"]) Test"); +})(); diff --git a/js/codemirror/mode/smalltalk/index.html b/js/codemirror/mode/smalltalk/index.html new file mode 100644 index 0000000..f4dc298 --- /dev/null +++ b/js/codemirror/mode/smalltalk/index.html @@ -0,0 +1,68 @@ + + +CodeMirror: Smalltalk mode + + + + + + + + + + +
+

Smalltalk mode

+
+ + + +

Simple Smalltalk mode.

+ +

MIME types defined: text/x-stsrc.

+
diff --git a/js/codemirror/mode/smalltalk/smalltalk.js b/js/codemirror/mode/smalltalk/smalltalk.js new file mode 100644 index 0000000..9e8ee93 --- /dev/null +++ b/js/codemirror/mode/smalltalk/smalltalk.js @@ -0,0 +1,168 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('smalltalk', function(config) { + + var specialChars = /[+\-\/\\*~<>=@%|&?!.,:;^]/; + var keywords = /true|false|nil|self|super|thisContext/; + + var Context = function(tokenizer, parent) { + this.next = tokenizer; + this.parent = parent; + }; + + var Token = function(name, context, eos) { + this.name = name; + this.context = context; + this.eos = eos; + }; + + var State = function() { + this.context = new Context(next, null); + this.expectVariable = true; + this.indentation = 0; + this.userIndentationDelta = 0; + }; + + State.prototype.userIndent = function(indentation) { + this.userIndentationDelta = indentation > 0 ? (indentation / config.indentUnit - this.indentation) : 0; + }; + + var next = function(stream, context, state) { + var token = new Token(null, context, false); + var aChar = stream.next(); + + if (aChar === '"') { + token = nextComment(stream, new Context(nextComment, context)); + + } else if (aChar === '\'') { + token = nextString(stream, new Context(nextString, context)); + + } else if (aChar === '#') { + if (stream.peek() === '\'') { + stream.next(); + token = nextSymbol(stream, new Context(nextSymbol, context)); + } else { + if (stream.eatWhile(/[^\s.{}\[\]()]/)) + token.name = 'string-2'; + else + token.name = 'meta'; + } + + } else if (aChar === '$') { + if (stream.next() === '<') { + stream.eatWhile(/[^\s>]/); + stream.next(); + } + token.name = 'string-2'; + + } else if (aChar === '|' && state.expectVariable) { + token.context = new Context(nextTemporaries, context); + + } else if (/[\[\]{}()]/.test(aChar)) { + token.name = 'bracket'; + token.eos = /[\[{(]/.test(aChar); + + if (aChar === '[') { + state.indentation++; + } else if (aChar === ']') { + state.indentation = Math.max(0, state.indentation - 1); + } + + } else if (specialChars.test(aChar)) { + stream.eatWhile(specialChars); + token.name = 'operator'; + token.eos = aChar !== ';'; // ; cascaded message expression + + } else if (/\d/.test(aChar)) { + stream.eatWhile(/[\w\d]/); + token.name = 'number'; + + } else if (/[\w_]/.test(aChar)) { + stream.eatWhile(/[\w\d_]/); + token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null; + + } else { + token.eos = state.expectVariable; + } + + return token; + }; + + var nextComment = function(stream, context) { + stream.eatWhile(/[^"]/); + return new Token('comment', stream.eat('"') ? context.parent : context, true); + }; + + var nextString = function(stream, context) { + stream.eatWhile(/[^']/); + return new Token('string', stream.eat('\'') ? context.parent : context, false); + }; + + var nextSymbol = function(stream, context) { + stream.eatWhile(/[^']/); + return new Token('string-2', stream.eat('\'') ? context.parent : context, false); + }; + + var nextTemporaries = function(stream, context) { + var token = new Token(null, context, false); + var aChar = stream.next(); + + if (aChar === '|') { + token.context = context.parent; + token.eos = true; + + } else { + stream.eatWhile(/[^|]/); + token.name = 'variable'; + } + + return token; + }; + + return { + startState: function() { + return new State; + }, + + token: function(stream, state) { + state.userIndent(stream.indentation()); + + if (stream.eatSpace()) { + return null; + } + + var token = state.context.next(stream, state.context, state); + state.context = token.context; + state.expectVariable = token.eos; + + return token.name; + }, + + blankLine: function(state) { + state.userIndent(0); + }, + + indent: function(state, textAfter) { + var i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta; + return (state.indentation + i) * config.indentUnit; + }, + + electricChars: ']' + }; + +}); + +CodeMirror.defineMIME('text/x-stsrc', {name: 'smalltalk'}); + +}); diff --git a/js/codemirror/mode/smarty/index.html b/js/codemirror/mode/smarty/index.html new file mode 100644 index 0000000..8241d4c --- /dev/null +++ b/js/codemirror/mode/smarty/index.html @@ -0,0 +1,138 @@ + + +CodeMirror: Smarty mode + + + + + + + + + + +
+

Smarty mode

+
+ +

Mode for Smarty version 2 or 3, which allows for custom delimiter tags.

+ +

Several configuration parameters are supported:

+ +
    +
  • leftDelimiter and rightDelimiter, + which should be strings that determine where the Smarty syntax + starts and ends.
  • +
  • version, which should be 2 or 3.
  • +
  • baseMode, which can be a mode spec + like "text/html" to set a different background mode.
  • +
+ +

MIME types defined: text/x-smarty

+ +

Smarty 2, custom delimiters

+ +
+ +

Smarty 3

+ + + + + +
diff --git a/js/codemirror/mode/smarty/smarty.js b/js/codemirror/mode/smarty/smarty.js new file mode 100644 index 0000000..4660b9b --- /dev/null +++ b/js/codemirror/mode/smarty/smarty.js @@ -0,0 +1,225 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/** + * Smarty 2 and 3 mode. + */ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("smarty", function(config, parserConf) { + var rightDelimiter = parserConf.rightDelimiter || "}"; + var leftDelimiter = parserConf.leftDelimiter || "{"; + var version = parserConf.version || 2; + var baseMode = CodeMirror.getMode(config, parserConf.baseMode || "null"); + + var keyFunctions = ["debug", "extends", "function", "include", "literal"]; + var regs = { + operatorChars: /[+\-*&%=<>!?]/, + validIdentifier: /[a-zA-Z0-9_]/, + stringChar: /['"]/ + }; + + var last; + function cont(style, lastType) { + last = lastType; + return style; + } + + function chain(stream, state, parser) { + state.tokenize = parser; + return parser(stream, state); + } + + // Smarty 3 allows { and } surrounded by whitespace to NOT slip into Smarty mode + function doesNotCount(stream, pos) { + if (pos == null) pos = stream.pos; + return version === 3 && leftDelimiter == "{" && + (pos == stream.string.length || /\s/.test(stream.string.charAt(pos))); + } + + function tokenTop(stream, state) { + var string = stream.string; + for (var scan = stream.pos;;) { + var nextMatch = string.indexOf(leftDelimiter, scan); + scan = nextMatch + leftDelimiter.length; + if (nextMatch == -1 || !doesNotCount(stream, nextMatch + leftDelimiter.length)) break; + } + if (nextMatch == stream.pos) { + stream.match(leftDelimiter); + if (stream.eat("*")) { + return chain(stream, state, tokenBlock("comment", "*" + rightDelimiter)); + } else { + state.depth++; + state.tokenize = tokenSmarty; + last = "startTag"; + return "tag"; + } + } + + if (nextMatch > -1) stream.string = string.slice(0, nextMatch); + var token = baseMode.token(stream, state.base); + if (nextMatch > -1) stream.string = string; + return token; + } + + // parsing Smarty content + function tokenSmarty(stream, state) { + if (stream.match(rightDelimiter, true)) { + if (version === 3) { + state.depth--; + if (state.depth <= 0) { + state.tokenize = tokenTop; + } + } else { + state.tokenize = tokenTop; + } + return cont("tag", null); + } + + if (stream.match(leftDelimiter, true)) { + state.depth++; + return cont("tag", "startTag"); + } + + var ch = stream.next(); + if (ch == "$") { + stream.eatWhile(regs.validIdentifier); + return cont("variable-2", "variable"); + } else if (ch == "|") { + return cont("operator", "pipe"); + } else if (ch == ".") { + return cont("operator", "property"); + } else if (regs.stringChar.test(ch)) { + state.tokenize = tokenAttribute(ch); + return cont("string", "string"); + } else if (regs.operatorChars.test(ch)) { + stream.eatWhile(regs.operatorChars); + return cont("operator", "operator"); + } else if (ch == "[" || ch == "]") { + return cont("bracket", "bracket"); + } else if (ch == "(" || ch == ")") { + return cont("bracket", "operator"); + } else if (/\d/.test(ch)) { + stream.eatWhile(/\d/); + return cont("number", "number"); + } else { + + if (state.last == "variable") { + if (ch == "@") { + stream.eatWhile(regs.validIdentifier); + return cont("property", "property"); + } else if (ch == "|") { + stream.eatWhile(regs.validIdentifier); + return cont("qualifier", "modifier"); + } + } else if (state.last == "pipe") { + stream.eatWhile(regs.validIdentifier); + return cont("qualifier", "modifier"); + } else if (state.last == "whitespace") { + stream.eatWhile(regs.validIdentifier); + return cont("attribute", "modifier"); + } if (state.last == "property") { + stream.eatWhile(regs.validIdentifier); + return cont("property", null); + } else if (/\s/.test(ch)) { + last = "whitespace"; + return null; + } + + var str = ""; + if (ch != "/") { + str += ch; + } + var c = null; + while (c = stream.eat(regs.validIdentifier)) { + str += c; + } + for (var i=0, j=keyFunctions.length; i + +CodeMirror: Solr mode + + + + + + + + + +
+

Solr mode

+ +
+ +
+ + + +

MIME types defined: text/x-solr.

+
diff --git a/js/codemirror/mode/solr/solr.js b/js/codemirror/mode/solr/solr.js new file mode 100644 index 0000000..fe99563 --- /dev/null +++ b/js/codemirror/mode/solr/solr.js @@ -0,0 +1,104 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("solr", function() { + "use strict"; + + var isStringChar = /[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}\"\\]/; + var isOperatorChar = /[\|\!\+\-\*\?\~\^\&]/; + var isOperatorString = /^(OR|AND|NOT|TO)$/i; + + function isNumber(word) { + return parseFloat(word).toString() === word; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) break; + escaped = !escaped && next == "\\"; + } + + if (!escaped) state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenOperator(operator) { + return function(stream, state) { + var style = "operator"; + if (operator == "+") + style += " positive"; + else if (operator == "-") + style += " negative"; + else if (operator == "|") + stream.eat(/\|/); + else if (operator == "&") + stream.eat(/\&/); + else if (operator == "^") + style += " boost"; + + state.tokenize = tokenBase; + return style; + }; + } + + function tokenWord(ch) { + return function(stream, state) { + var word = ch; + while ((ch = stream.peek()) && ch.match(isStringChar) != null) { + word += stream.next(); + } + + state.tokenize = tokenBase; + if (isOperatorString.test(word)) + return "operator"; + else if (isNumber(word)) + return "number"; + else if (stream.peek() == ":") + return "field"; + else + return "string"; + }; + } + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"') + state.tokenize = tokenString(ch); + else if (isOperatorChar.test(ch)) + state.tokenize = tokenOperator(ch); + else if (isStringChar.test(ch)) + state.tokenize = tokenWord(ch); + + return (state.tokenize != tokenBase) ? state.tokenize(stream, state) : null; + } + + return { + startState: function() { + return { + tokenize: tokenBase + }; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + } + }; +}); + +CodeMirror.defineMIME("text/x-solr", "solr"); + +}); diff --git a/js/codemirror/mode/soy/index.html b/js/codemirror/mode/soy/index.html new file mode 100644 index 0000000..f484729 --- /dev/null +++ b/js/codemirror/mode/soy/index.html @@ -0,0 +1,68 @@ + + +CodeMirror: Soy (Closure Template) mode + + + + + + + + + + + + + + +
+

Soy (Closure Template) mode

+
+ + + +

A mode for Closure Templates (Soy).

+

MIME type defined: text/x-soy.

+
diff --git a/js/codemirror/mode/soy/soy.js b/js/codemirror/mode/soy/soy.js new file mode 100644 index 0000000..3c3aea3 --- /dev/null +++ b/js/codemirror/mode/soy/soy.js @@ -0,0 +1,665 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../htmlmixed/htmlmixed"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + var paramData = { noEndTag: true, soyState: "param-def" }; + var tags = { + "alias": { noEndTag: true }, + "delpackage": { noEndTag: true }, + "namespace": { noEndTag: true, soyState: "namespace-def" }, + "@attribute": paramData, + "@attribute?": paramData, + "@param": paramData, + "@param?": paramData, + "@inject": paramData, + "@inject?": paramData, + "@state": paramData, + "template": { soyState: "templ-def", variableScope: true}, + "extern": {soyState: "param-def"}, + "export": {soyState: "export"}, + "literal": { }, + "msg": {}, + "fallbackmsg": { noEndTag: true, reduceIndent: true}, + "select": {}, + "plural": {}, + "let": { soyState: "var-def" }, + "if": {}, + "javaimpl": {}, + "jsimpl": {}, + "elseif": { noEndTag: true, reduceIndent: true}, + "else": { noEndTag: true, reduceIndent: true}, + "switch": {}, + "case": { noEndTag: true, reduceIndent: true}, + "default": { noEndTag: true, reduceIndent: true}, + "foreach": { variableScope: true, soyState: "for-loop" }, + "ifempty": { noEndTag: true, reduceIndent: true}, + "for": { variableScope: true, soyState: "for-loop" }, + "call": { soyState: "templ-ref" }, + "param": { soyState: "param-ref"}, + "print": { noEndTag: true }, + "deltemplate": { soyState: "templ-def", variableScope: true}, + "delcall": { soyState: "templ-ref" }, + "log": {}, + "element": { variableScope: true }, + "velog": {}, + "const": { soyState: "const-def"}, + }; + + var indentingTags = Object.keys(tags).filter(function(tag) { + return !tags[tag].noEndTag || tags[tag].reduceIndent; + }); + + CodeMirror.defineMode("soy", function(config) { + var textMode = CodeMirror.getMode(config, "text/plain"); + var modes = { + html: CodeMirror.getMode(config, {name: "text/html", multilineTagIndentFactor: 2, multilineTagIndentPastTag: false, allowMissingTagName: true}), + attributes: textMode, + text: textMode, + uri: textMode, + trusted_resource_uri: textMode, + css: CodeMirror.getMode(config, "text/css"), + js: CodeMirror.getMode(config, {name: "text/javascript", statementIndent: 2 * config.indentUnit}) + }; + + function last(array) { + return array[array.length - 1]; + } + + function tokenUntil(stream, state, untilRegExp) { + if (stream.sol()) { + for (var indent = 0; indent < state.indent; indent++) { + if (!stream.eat(/\s/)) break; + } + if (indent) return null; + } + var oldString = stream.string; + var match = untilRegExp.exec(oldString.substr(stream.pos)); + if (match) { + // We don't use backUp because it backs up just the position, not the state. + // This uses an undocumented API. + stream.string = oldString.substr(0, stream.pos + match.index); + } + var result = stream.hideFirstChars(state.indent, function() { + var localState = last(state.localStates); + return localState.mode.token(stream, localState.state); + }); + stream.string = oldString; + return result; + } + + function contains(list, element) { + while (list) { + if (list.element === element) return true; + list = list.next; + } + return false; + } + + function prepend(list, element) { + return { + element: element, + next: list + }; + } + + function popcontext(state) { + if (!state.context) return; + if (state.context.scope) { + state.variables = state.context.scope; + } + state.context = state.context.previousContext; + } + + // Reference a variable `name` in `list`. + // Let `loose` be truthy to ignore missing identifiers. + function ref(list, name, loose) { + return contains(list, name) ? "variable-2" : (loose ? "variable" : "variable-2 error"); + } + + // Data for an open soy tag. + function Context(previousContext, tag, scope) { + this.previousContext = previousContext; + this.tag = tag; + this.kind = null; + this.scope = scope; + } + + function expression(stream, state) { + var match; + if (stream.match(/[[]/)) { + state.soyState.push("list-literal"); + state.context = new Context(state.context, "list-literal", state.variables); + state.lookupVariables = false; + return null; + } else if (stream.match(/\bmap(?=\()/)) { + state.soyState.push("map-literal"); + return "keyword"; + } else if (stream.match(/\brecord(?=\()/)) { + state.soyState.push("record-literal"); + return "keyword"; + } else if (stream.match(/([\w]+)(?=\()/)) { + return "variable callee"; + } else if (match = stream.match(/^["']/)) { + state.soyState.push("string"); + state.quoteKind = match[0]; + return "string"; + } else if (stream.match(/^[(]/)) { + state.soyState.push("open-parentheses"); + return null; + } else if (stream.match(/(null|true|false)(?!\w)/) || + stream.match(/0x([0-9a-fA-F]{2,})/) || + stream.match(/-?([0-9]*[.])?[0-9]+(e[0-9]*)?/)) { + return "atom"; + } else if (stream.match(/(\||[+\-*\/%]|[=!]=|\?:|[<>]=?)/)) { + // Tokenize filter, binary, null propagator, and equality operators. + return "operator"; + } else if (match = stream.match(/^\$([\w]+)/)) { + return ref(state.variables, match[1], !state.lookupVariables); + } else if (match = stream.match(/^\w+/)) { + return /^(?:as|and|or|not|in|if)$/.test(match[0]) ? "keyword" : null; + } + + stream.next(); + return null; + } + + return { + startState: function() { + return { + soyState: [], + variables: prepend(null, 'ij'), + scopes: null, + indent: 0, + quoteKind: null, + context: null, + lookupVariables: true, // Is unknown variables considered an error + localStates: [{ + mode: modes.html, + state: CodeMirror.startState(modes.html) + }] + }; + }, + + copyState: function(state) { + return { + tag: state.tag, // Last seen Soy tag. + soyState: state.soyState.concat([]), + variables: state.variables, + context: state.context, + indent: state.indent, // Indentation of the following line. + quoteKind: state.quoteKind, + lookupVariables: state.lookupVariables, + localStates: state.localStates.map(function(localState) { + return { + mode: localState.mode, + state: CodeMirror.copyState(localState.mode, localState.state) + }; + }) + }; + }, + + token: function(stream, state) { + var match; + + switch (last(state.soyState)) { + case "comment": + if (stream.match(/^.*?\*\//)) { + state.soyState.pop(); + } else { + stream.skipToEnd(); + } + if (!state.context || !state.context.scope) { + var paramRe = /@param\??\s+(\S+)/g; + var current = stream.current(); + for (var match; (match = paramRe.exec(current)); ) { + state.variables = prepend(state.variables, match[1]); + } + } + return "comment"; + + case "string": + var match = stream.match(/^.*?(["']|\\[\s\S])/); + if (!match) { + stream.skipToEnd(); + } else if (match[1] == state.quoteKind) { + state.quoteKind = null; + state.soyState.pop(); + } + return "string"; + } + + if (!state.soyState.length || last(state.soyState) != "literal") { + if (stream.match(/^\/\*/)) { + state.soyState.push("comment"); + return "comment"; + } else if (stream.match(stream.sol() ? /^\s*\/\/.*/ : /^\s+\/\/.*/)) { + return "comment"; + } + } + + switch (last(state.soyState)) { + case "templ-def": + if (match = stream.match(/^\.?([\w]+(?!\.[\w]+)*)/)) { + state.soyState.pop(); + return "def"; + } + stream.next(); + return null; + + case "templ-ref": + if (match = stream.match(/(\.?[a-zA-Z_][a-zA-Z_0-9]+)+/)) { + state.soyState.pop(); + // If the first character is '.', it can only be a local template. + if (match[0][0] == '.') { + return "variable-2" + } + // Otherwise + return "variable"; + } + if (match = stream.match(/^\$([\w]+)/)) { + state.soyState.pop(); + return ref(state.variables, match[1], !state.lookupVariables); + } + + stream.next(); + return null; + + case "namespace-def": + if (match = stream.match(/^\.?([\w\.]+)/)) { + state.soyState.pop(); + return "variable"; + } + stream.next(); + return null; + + case "param-def": + if (match = stream.match(/^\*/)) { + state.soyState.pop(); + state.soyState.push("param-type"); + return "type"; + } + if (match = stream.match(/^\w+/)) { + state.variables = prepend(state.variables, match[0]); + state.soyState.pop(); + state.soyState.push("param-type"); + return "def"; + } + stream.next(); + return null; + + case "param-ref": + if (match = stream.match(/^\w+/)) { + state.soyState.pop(); + return "property"; + } + stream.next(); + return null; + + case "open-parentheses": + if (stream.match(/[)]/)) { + state.soyState.pop(); + return null; + } + return expression(stream, state); + + case "param-type": + var peekChar = stream.peek(); + if ("}]=>,".indexOf(peekChar) != -1) { + state.soyState.pop(); + return null; + } else if (peekChar == "[") { + state.soyState.push('param-type-record'); + return null; + } else if (peekChar == "(") { + state.soyState.push('param-type-template'); + return null; + } else if (peekChar == "<") { + state.soyState.push('param-type-parameter'); + return null; + } else if (match = stream.match(/^([\w]+|[?])/)) { + return "type"; + } + stream.next(); + return null; + + case "param-type-record": + var peekChar = stream.peek(); + if (peekChar == "]") { + state.soyState.pop(); + return null; + } + if (stream.match(/^\w+/)) { + state.soyState.push('param-type'); + return "property"; + } + stream.next(); + return null; + + case "param-type-parameter": + if (stream.match(/^[>]/)) { + state.soyState.pop(); + return null; + } + if (stream.match(/^[<,]/)) { + state.soyState.push('param-type'); + return null; + } + stream.next(); + return null; + + case "param-type-template": + if (stream.match(/[>]/)) { + state.soyState.pop(); + state.soyState.push('param-type'); + return null; + } + if (stream.match(/^\w+/)) { + state.soyState.push('param-type'); + return "def"; + } + stream.next(); + return null; + + case "var-def": + if (match = stream.match(/^\$([\w]+)/)) { + state.variables = prepend(state.variables, match[1]); + state.soyState.pop(); + return "def"; + } + stream.next(); + return null; + + case "for-loop": + if (stream.match(/\bin\b/)) { + state.soyState.pop(); + return "keyword"; + } + if (stream.peek() == "$") { + state.soyState.push('var-def'); + return null; + } + stream.next(); + return null; + + case "record-literal": + if (stream.match(/^[)]/)) { + state.soyState.pop(); + return null; + } + if (stream.match(/[(,]/)) { + state.soyState.push("map-value") + state.soyState.push("record-key") + return null; + } + stream.next() + return null; + + case "map-literal": + if (stream.match(/^[)]/)) { + state.soyState.pop(); + return null; + } + if (stream.match(/[(,]/)) { + state.soyState.push("map-value") + state.soyState.push("map-value") + return null; + } + stream.next() + return null; + + case "list-literal": + if (stream.match(']')) { + state.soyState.pop(); + state.lookupVariables = true; + popcontext(state); + return null; + } + if (stream.match(/\bfor\b/)) { + state.lookupVariables = true; + state.soyState.push('for-loop'); + return "keyword"; + } + return expression(stream, state); + + case "record-key": + if (stream.match(/[\w]+/)) { + return "property"; + } + if (stream.match(/^[:]/)) { + state.soyState.pop(); + return null; + } + stream.next(); + return null; + + case "map-value": + if (stream.peek() == ")" || stream.peek() == "," || stream.match(/^[:)]/)) { + state.soyState.pop(); + return null; + } + return expression(stream, state); + + case "import": + if (stream.eat(";")) { + state.soyState.pop(); + state.indent -= 2 * config.indentUnit; + return null; + } + if (stream.match(/\w+(?=\s+as\b)/)) { + return "variable"; + } + if (match = stream.match(/\w+/)) { + return /\b(from|as)\b/.test(match[0]) ? "keyword" : "def"; + } + if (match = stream.match(/^["']/)) { + state.soyState.push("string"); + state.quoteKind = match[0]; + return "string"; + } + stream.next(); + return null; + + case "tag": + var endTag; + var tagName; + if (state.tag === undefined) { + endTag = true; + tagName = ''; + } else { + endTag = state.tag[0] == "/"; + tagName = endTag ? state.tag.substring(1) : state.tag; + } + var tag = tags[tagName]; + if (stream.match(/^\/?}/)) { + var selfClosed = stream.current() == "/}"; + if (selfClosed && !endTag) { + popcontext(state); + } + if (state.tag == "/template" || state.tag == "/deltemplate") { + state.variables = prepend(null, 'ij'); + state.indent = 0; + } else { + state.indent -= config.indentUnit * + (selfClosed || indentingTags.indexOf(state.tag) == -1 ? 2 : 1); + } + state.soyState.pop(); + return "keyword"; + } else if (stream.match(/^([\w?]+)(?==)/)) { + if (state.context && state.context.tag == tagName && stream.current() == "kind" && (match = stream.match(/^="([^"]+)/, false))) { + var kind = match[1]; + state.context.kind = kind; + var mode = modes[kind] || modes.html; + var localState = last(state.localStates); + if (localState.mode.indent) { + state.indent += localState.mode.indent(localState.state, "", ""); + } + state.localStates.push({ + mode: mode, + state: CodeMirror.startState(mode) + }); + } + return "attribute"; + } + return expression(stream, state); + + case "template-call-expression": + if (stream.match(/^([\w-?]+)(?==)/)) { + return "attribute"; + } else if (stream.eat('>')) { + state.soyState.pop(); + return "keyword"; + } else if (stream.eat('/>')) { + state.soyState.pop(); + return "keyword"; + } + return expression(stream, state); + case "literal": + if (stream.match('{/literal}', false)) { + state.soyState.pop(); + return this.token(stream, state); + } + return tokenUntil(stream, state, /\{\/literal}/); + case "export": + if (match = stream.match(/\w+/)) { + state.soyState.pop(); + if (match == "const") { + state.soyState.push("const-def") + return "keyword"; + } else if (match == "extern") { + state.soyState.push("param-def") + return "keyword"; + } + } else { + stream.next(); + } + return null; + case "const-def": + if (stream.match(/^\w+/)) { + state.soyState.pop(); + return "def"; + } + stream.next(); + return null; + } + + if (stream.match('{literal}')) { + state.indent += config.indentUnit; + state.soyState.push("literal"); + state.context = new Context(state.context, "literal", state.variables); + return "keyword"; + + // A tag-keyword must be followed by whitespace, comment or a closing tag. + } else if (match = stream.match(/^\{([/@\\]?\w+\??)(?=$|[\s}]|\/[/*])/)) { + var prevTag = state.tag; + state.tag = match[1]; + var endTag = state.tag[0] == "/"; + var indentingTag = !!tags[state.tag]; + var tagName = endTag ? state.tag.substring(1) : state.tag; + var tag = tags[tagName]; + if (state.tag != "/switch") + state.indent += ((endTag || tag && tag.reduceIndent) && prevTag != "switch" ? 1 : 2) * config.indentUnit; + + state.soyState.push("tag"); + var tagError = false; + if (tag) { + if (!endTag) { + if (tag.soyState) state.soyState.push(tag.soyState); + } + // If a new tag, open a new context. + if (!tag.noEndTag && (indentingTag || !endTag)) { + state.context = new Context(state.context, state.tag, tag.variableScope ? state.variables : null); + // Otherwise close the current context. + } else if (endTag) { + var isBalancedForExtern = tagName == 'extern' && (state.context && state.context.tag == 'export'); + if (!state.context || ((state.context.tag != tagName) && !isBalancedForExtern)) { + tagError = true; + } else if (state.context) { + if (state.context.kind) { + state.localStates.pop(); + var localState = last(state.localStates); + if (localState.mode.indent) { + state.indent -= localState.mode.indent(localState.state, "", ""); + } + } + popcontext(state); + } + } + } else if (endTag) { + // Assume all tags with a closing tag are defined in the config. + tagError = true; + } + return (tagError ? "error " : "") + "keyword"; + + // Not a tag-keyword; it's an implicit print tag. + } else if (stream.eat('{')) { + state.tag = "print"; + state.indent += 2 * config.indentUnit; + state.soyState.push("tag"); + return "keyword"; + } else if (!state.context && stream.sol() && stream.match(/import\b/)) { + state.soyState.push("import"); + state.indent += 2 * config.indentUnit; + return "keyword"; + } else if (match = stream.match('<{')) { + state.soyState.push("template-call-expression"); + state.indent += 2 * config.indentUnit; + state.soyState.push("tag"); + return "keyword"; + } else if (match = stream.match('')) { + state.indent -= 1 * config.indentUnit; + return "keyword"; + } + + return tokenUntil(stream, state, /\{|\s+\/\/|\/\*/); + }, + + indent: function(state, textAfter, line) { + var indent = state.indent, top = last(state.soyState); + if (top == "comment") return CodeMirror.Pass; + + if (top == "literal") { + if (/^\{\/literal}/.test(textAfter)) indent -= config.indentUnit; + } else { + if (/^\s*\{\/(template|deltemplate)\b/.test(textAfter)) return 0; + if (/^\{(\/|(fallbackmsg|elseif|else|ifempty)\b)/.test(textAfter)) indent -= config.indentUnit; + if (state.tag != "switch" && /^\{(case|default)\b/.test(textAfter)) indent -= config.indentUnit; + if (/^\{\/switch\b/.test(textAfter)) indent -= config.indentUnit; + } + var localState = last(state.localStates); + if (indent && localState.mode.indent) { + indent += localState.mode.indent(localState.state, textAfter, line); + } + return indent; + }, + + innerMode: function(state) { + if (state.soyState.length && last(state.soyState) != "literal") return null; + else return last(state.localStates); + }, + + electricInput: /^\s*\{(\/|\/template|\/deltemplate|\/switch|fallbackmsg|elseif|else|case|default|ifempty|\/literal\})$/, + lineComment: "//", + blockCommentStart: "/*", + blockCommentEnd: "*/", + blockCommentContinue: " * ", + useInnerComments: false, + fold: "indent" + }; + }, "htmlmixed"); + + CodeMirror.registerHelper("wordChars", "soy", /[\w$]/); + + CodeMirror.registerHelper("hintWords", "soy", Object.keys(tags).concat( + ["css", "debugger"])); + + CodeMirror.defineMIME("text/x-soy", "soy"); +}); diff --git a/js/codemirror/mode/soy/test.js b/js/codemirror/mode/soy/test.js new file mode 100644 index 0000000..466064b --- /dev/null +++ b/js/codemirror/mode/soy/test.js @@ -0,0 +1,322 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "soy"); + function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));} + + // Test of small keywords and words containing them. + MT('keywords-test', + '[keyword {] [keyword as] worrying [keyword and] notorious [keyword as]', + ' the Fandor[operator -]alias assassin, [keyword or]', + ' Corcand cannot fit [keyword in] [keyword }]'); + + MT('let-test', + '[keyword {template] [def .name][keyword }]', + ' [keyword {let] [def $name]: [string "world"][keyword /}]', + ' [tag&bracket <][tag h1][tag&bracket >]', + ' Hello, [keyword {][variable-2 $name][keyword }]', + ' [tag&bracket ]', + '[keyword {/template}]', + ''); + + MT('function-test', + '[keyword {] [callee&variable css]([string "MyClass"])[keyword }]', + '[tag&bracket <][tag input] [attribute value]=[string "]' + + '[keyword {] [callee&variable index]([variable-2&error $list])[keyword }]' + + '[string "][tag&bracket />]'); + + MT('soy-element-composition-test', + '[keyword <{][callee&variable foo]()[keyword }]', + '[keyword >]'); + + MT('soy-element-composition-attribute-test', + '[keyword <{][callee&variable foo]()[keyword }]', + '[attribute class]=[string "Foo"]', + '[keyword >]'); + + MT('namespace-test', + '[keyword {namespace] [variable namespace][keyword }]') + + MT('namespace-with-attribute-test', + '[keyword {namespace] [variable my.namespace.templates] ' + + '[attribute requirecss]=[string "my.namespace"][keyword }]'); + + MT('operators-test', + '[keyword {] [atom 1] [operator ==] [atom 1] [keyword }]', + '[keyword {] [atom 1] [operator !=] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator +] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator -] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator *] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator /] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator %] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator <=] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator >=] [atom 2] [keyword }]', + '[keyword {] [atom 3] [operator >] [atom 2] [keyword }]', + '[keyword {] [atom 2] [operator >] [atom 3] [keyword }]', + '[keyword {] [atom null] [operator ?:] [string ""] [keyword }]', + '[keyword {] [variable-2&error $variable] [operator |] safeHtml [keyword }]') + + MT('primitive-test', + '[keyword {] [atom true] [keyword }]', + '[keyword {] [atom false] [keyword }]', + '[keyword {] truethy [keyword }]', + '[keyword {] falsey [keyword }]', + '[keyword {] [atom 42] [keyword }]', + '[keyword {] [atom .42] [keyword }]', + '[keyword {] [atom 0.42] [keyword }]', + '[keyword {] [atom -0.42] [keyword }]', + '[keyword {] [atom -.2] [keyword }]', + '[keyword {] [atom 6.03e23] [keyword }]', + '[keyword {] [atom -0.03e0] [keyword }]', + '[keyword {] [atom 0x1F] [keyword }]', + '[keyword {] [atom 0x1F00BBEA] [keyword }]'); + + MT('param-type-record', + '[keyword {@param] [def record]: [[[property foo]: [type bool], [property bar]: [type int] ]][keyword }]' + ); + + MT('param-type-map', + '[keyword {@param] [def unknown]: [type map]<[type string], [type bool]>[keyword }]' + ); + + MT('param-type-list', + '[keyword {@param] [def list]: [type list]<[type ?]>[keyword }]' + ); + + MT('param-type-any', + '[keyword {@param] [def unknown]: [type ?][keyword }]' + ); + + MT('param-type-nested', + '[keyword {@param] [def a]: ' + + '[type list]<[[[property a]: [type int], ' + + '[property b]: [type map]<[type string], ' + + '[type bool]>]]>][keyword }]'); + + MT('undefined-var', + '[keyword {][variable-2&error $var]'); + + MT('param-scope-test', + '[keyword {template] [def .a][keyword }]', + ' [keyword {@param] [def x]: [type string][keyword }]', + ' [keyword {][variable-2 $x][keyword }]', + '[keyword {/template}]', + '', + '[keyword {template] [def .b][keyword }]', + ' [keyword {][variable-2&error $x][keyword }]', + '[keyword {/template}]', + ''); + + MT('if-variable-test', + '[keyword {if] [variable-2&error $showThing][keyword }]', + ' Yo!', + '[keyword {/if}]', + ''); + + MT('defined-if-variable-test', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@param?] [def showThing]: [type bool][keyword }]', + ' [keyword {if] [variable-2 $showThing][keyword }]', + ' Yo!', + ' [keyword {/if}]', + '[keyword {/template}]', + ''); + + MT('template-calls-test', + '[keyword {call] [variable-2 .foo][keyword /}]', + '[keyword {call] [variable foo][keyword /}]', + '[keyword {call] [variable foo][keyword }] [keyword {/call}]', + '[keyword {call] [variable first1.second.third_3][keyword /}]', + '[keyword {call] [variable first1.second.third_3] [keyword }] [keyword {/call}]', + ''); + + MT('foreach-scope-test', + '[keyword {@param] [def bar]: [type string][keyword }]', + '[keyword {foreach] [def $foo] [keyword in] [variable-2&error $foos][keyword }]', + ' [keyword {][variable-2 $foo][keyword }]', + '[keyword {/foreach}]', + '[keyword {][variable-2&error $foo][keyword }]', + '[keyword {][variable-2 $bar][keyword }]'); + + MT('foreach-ifempty-indent-test', + '[keyword {foreach] [def $foo] [keyword in] [variable-2&error $foos][keyword }]', + ' something', + '[keyword {ifempty}]', + ' nothing', + '[keyword {/foreach}]', + ''); + + MT('foreach-index', + '[keyword {foreach] [def $foo],[def $index] [keyword in] [[]] [keyword }]', + ' [keyword {][variable-2 $foo][keyword }] [keyword {][variable-2 $index][keyword }]', + '[keyword {/foreach}]'); + + MT('nested-kind-test', + '[keyword {template] [def .foo] [attribute kind]=[string "html"][keyword }]', + ' [tag&bracket <][tag div][tag&bracket >]', + ' [keyword {call] [variable-2 .bar][keyword }]', + ' [keyword {param] [property propertyName] [attribute kind]=[string "js"][keyword }]', + ' [keyword var] [def bar] [operator =] [number 5];', + ' [keyword {/param}]', + ' [keyword {/call}]', + ' [tag&bracket ]', + '[keyword {/template}]', + ''); + + MT('tag-starting-with-function-call-is-not-a-keyword', + '[keyword {][callee&variable index]([variable-2&error $foo])[keyword }]', + '[keyword {css] [string "some-class"][keyword }]', + '[keyword {][callee&variable css]([string "some-class"])[keyword }]', + ''); + + MT('allow-missing-colon-in-@param', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@param] [def showThing] [type bool][keyword }]', + ' [keyword {if] [variable-2 $showThing][keyword }]', + ' Yo!', + ' [keyword {/if}]', + '[keyword {/template}]', + ''); + + MT('param-type-and-default-value', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@param] [def bar]: [type bool] = [atom true][keyword }]', + '[keyword {/template}]', + ''); + + MT('attribute-type', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@attribute] [def bar]: [type string][keyword }]', + '[keyword {/template}]', + ''); + + MT('attribute-type-optional', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@attribute] [def bar]: [type string][keyword }]', + '[keyword {/template}]', + ''); + + MT('attribute-type-all', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@attribute] [type *][keyword }]', + '[keyword {/template}]', + ''); + + MT('state-variable-reference', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@param] [def bar]:= [atom true][keyword }]', + ' [keyword {@state] [def foobar]:= [variable-2 $bar][keyword }]', + '[keyword {/template}]', + ''); + + MT('param-type-template', + '[keyword {template] [def .foo][keyword }]', + ' [keyword {@param] [def renderer]: ([def s]:[type string])=>[type html][keyword }]', + ' [keyword {call] [variable-2 $renderer] [keyword /}]', + '[keyword {/template}]', + ''); + + MT('single-quote-strings', + '[keyword {][string "foo"] [string \'bar\'][keyword }]', + ''); + + MT('literal-comments', + '[keyword {literal}]/* comment */ // comment[keyword {/literal}]'); + + MT('highlight-command-at-eol', + '[keyword {msg]', + ' [keyword }]'); + + MT('switch-indent-test', + '[keyword {let] [def $marbles]: [atom 5] [keyword /}]', + '[keyword {switch] [variable-2 $marbles][keyword }]', + ' [keyword {case] [atom 0][keyword }]', + ' No marbles', + ' [keyword {default}]', + ' At least 1 marble', + '[keyword {/switch}]', + ''); + + MT('if-elseif-else-indent', + '[keyword {if] [atom true][keyword }]', + ' [keyword {let] [def $a]: [atom 5] [keyword /}]', + '[keyword {elseif] [atom false][keyword }]', + ' [keyword {let] [def $bar]: [atom 5] [keyword /}]', + '[keyword {else}]', + ' [keyword {let] [def $bar]: [atom 5] [keyword /}]', + '[keyword {/if}]'); + + MT('msg-fallbackmsg-indent', + '[keyword {msg] [attribute desc]=[string "A message"][keyword }]', + ' A message', + '[keyword {fallbackmsg] [attribute desc]=[string "A message"][keyword }]', + ' Old message', + '[keyword {/msg}]'); + + MT('literal-indent', + '[keyword {template] [def .name][keyword }]', + ' [keyword {literal}]', + ' Lerum', + ' [keyword {/literal}]', + ' Ipsum', + '[keyword {/template}]'); + + MT('special-chars', + '[keyword {sp}]', + '[keyword {nil}]', + '[keyword {\\r}]', + '[keyword {\\n}]', + '[keyword {\\t}]', + '[keyword {lb}]', + '[keyword {rb}]'); + + MT('let-list-literal', + '[keyword {let] [def $test]: [[[[[string \'a\'] ], [[[string \'b\'] ] ] [keyword /}]'); + + MT('let-record-literal', + '[keyword {let] [def $test]: [keyword record]([property test]: [callee&variable bidiGlobalDir](), ' + + '[property foo]: [atom 5]) [keyword /}]'); + + MT('let-map-literal', + '[keyword {let] [def $test]: [keyword map]([string \'outer\']: [keyword map]([atom 5]: [atom false]), ' + + '[string \'foo\']: [string \'bar\']) [keyword /}]'); + + MT('wrong-closing-tag', + '[keyword {if] [atom true][keyword }]', + ' Optional', + '[keyword&error {/badend][keyword }]'); + + MT('list-comprehension', + '[keyword {let] [def $myList]: [[[[[string \'a\'] ] ] [keyword /}] ' + + '[keyword {let] [def $test]: [[[variable $a] [operator +] [atom 1] [keyword for] ' + + '[def $a] [keyword in] [variable-2 $myList] [keyword if] [variable-2 $a] [operator >=] [atom 3] ] [keyword /}]'); + + MT('list-comprehension-index', + '[keyword {let] [def $test]: [[[variable $a] [operator +] [variable $index] [keyword for] ' + + '[def $a],[def $index] [keyword in] [[]] [keyword if] [variable-2 $a] [operator >=] [variable-2 $index] ] [keyword /}]'); + + + MT('list-comprehension-variable-scope', + '[keyword {let] [def $name]: [string "world"][keyword /}]', + '[keyword {let] [def $test]: [[[variable $a] [operator +] [variable $index] [keyword for] ' + + '[def $a],[def $index] [keyword in] [[]] [keyword if] [variable-2 $a] [operator >=] [variable-2 $index] ] [keyword /}]', + '[keyword {][variable-2&error $a][keyword }]', + '[keyword {][variable-2&error $index][keyword }]', + '[keyword {][variable-2 $test][keyword }]', + '[keyword {][variable-2 $name][keyword }]'); + + MT('import', + '[keyword import] {[def Name], [variable Person] [keyword as] [def P]} [keyword from] [string \'examples/proto/example.proto\'];'); + + MT('velog', + '[keyword {velog] [variable-2&error $data][keyword }] Logged [keyword {/velog}]'); + + MT('extern', '[keyword {extern] [def renderer]: ([def s]:[type string])=>[type string][keyword }] [keyword {/extern}]'); + + MT('export extern', '[keyword {export] [keyword extern] [def renderer]: ([def s]:[type string])=>[type string][keyword }] [keyword {/extern}]'); + + MT('const', + '[keyword {const] [def FOO] = [atom 5] [keyword /}]', + '[keyword {export] [keyword const] [def FOO] = [atom 5] [keyword /}]'); +})(); diff --git a/js/codemirror/mode/sparql/index.html b/js/codemirror/mode/sparql/index.html new file mode 100644 index 0000000..a702484 --- /dev/null +++ b/js/codemirror/mode/sparql/index.html @@ -0,0 +1,61 @@ + + +CodeMirror: SPARQL mode + + + + + + + + + + +
+

SPARQL mode

+
+ + +

MIME types defined: application/sparql-query.

+ +
diff --git a/js/codemirror/mode/sparql/sparql.js b/js/codemirror/mode/sparql/sparql.js new file mode 100644 index 0000000..6d928b5 --- /dev/null +++ b/js/codemirror/mode/sparql/sparql.js @@ -0,0 +1,184 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("sparql", function(config) { + var indentUnit = config.indentUnit; + var curPunc; + + function wordRegexp(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri", + "iri", "uri", "bnode", "count", "sum", "min", "max", "avg", "sample", + "group_concat", "rand", "abs", "ceil", "floor", "round", "concat", "substr", "strlen", + "replace", "ucase", "lcase", "encode_for_uri", "contains", "strstarts", "strends", + "strbefore", "strafter", "year", "month", "day", "hours", "minutes", "seconds", + "timezone", "tz", "now", "uuid", "struuid", "md5", "sha1", "sha256", "sha384", + "sha512", "coalesce", "if", "strlang", "strdt", "isnumeric", "regex", "exists", + "isblank", "isliteral", "a", "bind"]); + var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe", + "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional", + "graph", "by", "asc", "desc", "as", "having", "undef", "values", "group", + "minus", "in", "not", "service", "silent", "using", "insert", "delete", "union", + "true", "false", "with", + "data", "copy", "to", "move", "add", "create", "drop", "clear", "load", "into"]); + var operatorChars = /[*+\-<>=&|\^\/!\?]/; + var PN_CHARS = "[A-Za-z_\\-0-9]"; + var PREFIX_START = new RegExp("[A-Za-z]"); + var PREFIX_REMAINDER = new RegExp("((" + PN_CHARS + "|\\.)*(" + PN_CHARS + "))?:"); + + function tokenBase(stream, state) { + var ch = stream.next(); + curPunc = null; + if (ch == "$" || ch == "?") { + if(ch == "?" && stream.match(/\s/, false)){ + return "operator"; + } + stream.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/); + return "variable-2"; + } + else if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { + stream.match(/^[^\s\u00a0>]*>?/); + return "atom"; + } + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenLiteral(ch); + return state.tokenize(stream, state); + } + else if (/[{}\(\),\.;\[\]]/.test(ch)) { + curPunc = ch; + return "bracket"; + } + else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + else if (operatorChars.test(ch)) { + return "operator"; + } + else if (ch == ":") { + eatPnLocal(stream); + return "atom"; + } + else if (ch == "@") { + stream.eatWhile(/[a-z\d\-]/i); + return "meta"; + } + else if (PREFIX_START.test(ch) && stream.match(PREFIX_REMAINDER)) { + eatPnLocal(stream); + return "atom"; + } + stream.eatWhile(/[_\w\d]/); + var word = stream.current(); + if (ops.test(word)) + return "builtin"; + else if (keywords.test(word)) + return "keyword"; + else + return "variable"; + } + + function eatPnLocal(stream) { + stream.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i); + } + + function tokenLiteral(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return "string"; + }; + } + + function pushContext(state, type, col) { + state.context = {prev: state.context, indent: state.indent, col: col, type: type}; + } + function popContext(state) { + state.indent = state.context.indent; + state.context = state.context.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, + context: null, + indent: 0, + col: 0}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.context && state.context.align == null) state.context.align = false; + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { + state.context.align = true; + } + + if (curPunc == "(") pushContext(state, ")", stream.column()); + else if (curPunc == "[") pushContext(state, "]", stream.column()); + else if (curPunc == "{") pushContext(state, "}", stream.column()); + else if (/[\]\}\)]/.test(curPunc)) { + while (state.context && state.context.type == "pattern") popContext(state); + if (state.context && curPunc == state.context.type) { + popContext(state); + if (curPunc == "}" && state.context && state.context.type == "pattern") + popContext(state); + } + } + else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); + else if (/atom|string|variable/.test(style) && state.context) { + if (/[\}\]]/.test(state.context.type)) + pushContext(state, "pattern", stream.column()); + else if (state.context.type == "pattern" && !state.context.align) { + state.context.align = true; + state.context.col = stream.column(); + } + } + + return style; + }, + + indent: function(state, textAfter) { + var firstChar = textAfter && textAfter.charAt(0); + var context = state.context; + if (/[\]\}]/.test(firstChar)) + while (context && context.type == "pattern") context = context.prev; + + var closing = context && firstChar == context.type; + if (!context) + return 0; + else if (context.type == "pattern") + return context.col; + else if (context.align) + return context.col + (closing ? 0 : 1); + else + return context.indent + (closing ? 0 : indentUnit); + }, + + lineComment: "#" + }; +}); + +CodeMirror.defineMIME("application/sparql-query", "sparql"); + +}); diff --git a/js/codemirror/mode/spreadsheet/index.html b/js/codemirror/mode/spreadsheet/index.html new file mode 100644 index 0000000..2e50871 --- /dev/null +++ b/js/codemirror/mode/spreadsheet/index.html @@ -0,0 +1,42 @@ + + +CodeMirror: Spreadsheet mode + + + + + + + + + + +
+

Spreadsheet mode

+
+ + + +

MIME types defined: text/x-spreadsheet.

+ +

The Spreadsheet Mode

+

Created by Robert Plummer

+
diff --git a/js/codemirror/mode/spreadsheet/spreadsheet.js b/js/codemirror/mode/spreadsheet/spreadsheet.js new file mode 100644 index 0000000..6ba3656 --- /dev/null +++ b/js/codemirror/mode/spreadsheet/spreadsheet.js @@ -0,0 +1,112 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("spreadsheet", function () { + return { + startState: function () { + return { + stringType: null, + stack: [] + }; + }, + token: function (stream, state) { + if (!stream) return; + + //check for state changes + if (state.stack.length === 0) { + //strings + if ((stream.peek() == '"') || (stream.peek() == "'")) { + state.stringType = stream.peek(); + stream.next(); // Skip quote + state.stack.unshift("string"); + } + } + + //return state + //stack has + switch (state.stack[0]) { + case "string": + while (state.stack[0] === "string" && !stream.eol()) { + if (stream.peek() === state.stringType) { + stream.next(); // Skip quote + state.stack.shift(); // Clear flag + } else if (stream.peek() === "\\") { + stream.next(); + stream.next(); + } else { + stream.match(/^.[^\\\"\']*/); + } + } + return "string"; + + case "characterClass": + while (state.stack[0] === "characterClass" && !stream.eol()) { + if (!(stream.match(/^[^\]\\]+/) || stream.match(/^\\./))) + state.stack.shift(); + } + return "operator"; + } + + var peek = stream.peek(); + + //no stack + switch (peek) { + case "[": + stream.next(); + state.stack.unshift("characterClass"); + return "bracket"; + case ":": + stream.next(); + return "operator"; + case "\\": + if (stream.match(/\\[a-z]+/)) return "string-2"; + else { + stream.next(); + return "atom"; + } + case ".": + case ",": + case ";": + case "*": + case "-": + case "+": + case "^": + case "<": + case "/": + case "=": + stream.next(); + return "atom"; + case "$": + stream.next(); + return "builtin"; + } + + if (stream.match(/\d+/)) { + if (stream.match(/^\w+/)) return "error"; + return "number"; + } else if (stream.match(/^[a-zA-Z_]\w*/)) { + if (stream.match(/(?=[\(.])/, false)) return "keyword"; + return "variable-2"; + } else if (["[", "]", "(", ")", "{", "}"].indexOf(peek) != -1) { + stream.next(); + return "bracket"; + } else if (!stream.eatSpace()) { + stream.next(); + } + return null; + } + }; + }); + + CodeMirror.defineMIME("text/x-spreadsheet", "spreadsheet"); +}); diff --git a/js/codemirror/mode/sql/index.html b/js/codemirror/mode/sql/index.html new file mode 100644 index 0000000..2b61145 --- /dev/null +++ b/js/codemirror/mode/sql/index.html @@ -0,0 +1,92 @@ + + +CodeMirror: SQL Mode for CodeMirror + + + + + + + + + + + + + +
+

SQL Mode for CodeMirror

+
+ +
+

MIME types defined: + text/x-sql, + text/x-mysql, + text/x-mariadb, + text/x-cassandra, + text/x-plsql, + text/x-mssql, + text/x-hive, + text/x-pgsql, + text/x-gql, + text/x-gpsql. + text/x-esper. + text/x-sqlite. + text/x-sparksql. + text/x-trino. +

+ + +
diff --git a/js/codemirror/mode/sql/sql.js b/js/codemirror/mode/sql/sql.js new file mode 100644 index 0000000..d398388 --- /dev/null +++ b/js/codemirror/mode/sql/sql.js @@ -0,0 +1,525 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("sql", function(config, parserConfig) { + var client = parserConfig.client || {}, + atoms = parserConfig.atoms || {"false": true, "true": true, "null": true}, + builtin = parserConfig.builtin || set(defaultBuiltin), + keywords = parserConfig.keywords || set(sqlKeywords), + operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^\/]/, + support = parserConfig.support || {}, + hooks = parserConfig.hooks || {}, + dateSQL = parserConfig.dateSQL || {"date" : true, "time" : true, "timestamp" : true}, + backslashStringEscapes = parserConfig.backslashStringEscapes !== false, + brackets = parserConfig.brackets || /^[\{}\(\)\[\]]/, + punctuation = parserConfig.punctuation || /^[;.,:]/ + + function tokenBase(stream, state) { + var ch = stream.next(); + + // call hooks from the mime type + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + + if (support.hexNumber && + ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/)) + || (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]*'/))) { + // hex + // ref: https://dev.mysql.com/doc/refman/8.0/en/hexadecimal-literals.html + return "number"; + } else if (support.binaryNumber && + (((ch == "b" || ch == "B") && stream.match(/^'[01]*'/)) + || (ch == "0" && stream.match(/^b[01]+/)))) { + // bitstring + // ref: https://dev.mysql.com/doc/refman/8.0/en/bit-value-literals.html + return "number"; + } else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) { + // numbers + // ref: https://dev.mysql.com/doc/refman/8.0/en/number-literals.html + stream.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/); + support.decimallessFloat && stream.match(/^\.(?!\.)/); + return "number"; + } else if (ch == "?" && (stream.eatSpace() || stream.eol() || stream.eat(";"))) { + // placeholders + return "variable-3"; + } else if (ch == "'" || (ch == '"' && support.doubleQuote)) { + // strings + // ref: https://dev.mysql.com/doc/refman/8.0/en/string-literals.html + state.tokenize = tokenLiteral(ch); + return state.tokenize(stream, state); + } else if ((((support.nCharCast && (ch == "n" || ch == "N")) + || (support.charsetCast && ch == "_" && stream.match(/[a-z][a-z0-9]*/i))) + && (stream.peek() == "'" || stream.peek() == '"'))) { + // charset casting: _utf8'str', N'str', n'str' + // ref: https://dev.mysql.com/doc/refman/8.0/en/string-literals.html + return "keyword"; + } else if (support.escapeConstant && (ch == "e" || ch == "E") + && (stream.peek() == "'" || (stream.peek() == '"' && support.doubleQuote))) { + // escape constant: E'str', e'str' + // ref: https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS-ESCAPE + state.tokenize = function(stream, state) { + return (state.tokenize = tokenLiteral(stream.next(), true))(stream, state); + } + return "keyword"; + } else if (support.commentSlashSlash && ch == "/" && stream.eat("/")) { + // 1-line comment + stream.skipToEnd(); + return "comment"; + } else if ((support.commentHash && ch == "#") + || (ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) { + // 1-line comments + // ref: https://kb.askmonty.org/en/comment-syntax/ + stream.skipToEnd(); + return "comment"; + } else if (ch == "/" && stream.eat("*")) { + // multi-line comments + // ref: https://kb.askmonty.org/en/comment-syntax/ + state.tokenize = tokenComment(1); + return state.tokenize(stream, state); + } else if (ch == ".") { + // .1 for 0.1 + if (support.zerolessFloat && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) + return "number"; + if (stream.match(/^\.+/)) + return null + if (stream.match(/^[\w\d_$#]+/)) + return "variable-2"; + } else if (operatorChars.test(ch)) { + // operators + stream.eatWhile(operatorChars); + return "operator"; + } else if (brackets.test(ch)) { + // brackets + return "bracket"; + } else if (punctuation.test(ch)) { + // punctuation + stream.eatWhile(punctuation); + return "punctuation"; + } else if (ch == '{' && + (stream.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))) { + // dates (weird ODBC syntax) + // ref: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html + return "number"; + } else { + stream.eatWhile(/^[_\w\d]/); + var word = stream.current().toLowerCase(); + // dates (standard SQL syntax) + // ref: https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html + if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/))) + return "number"; + if (atoms.hasOwnProperty(word)) return "atom"; + if (builtin.hasOwnProperty(word)) return "type"; + if (keywords.hasOwnProperty(word)) return "keyword"; + if (client.hasOwnProperty(word)) return "builtin"; + return null; + } + } + + // 'string', with char specified in quote escaped by '\' + function tokenLiteral(quote, backslashEscapes) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = (backslashStringEscapes || backslashEscapes) && !escaped && ch == "\\"; + } + return "string"; + }; + } + function tokenComment(depth) { + return function(stream, state) { + var m = stream.match(/^.*?(\/\*|\*\/)/) + if (!m) stream.skipToEnd() + else if (m[1] == "/*") state.tokenize = tokenComment(depth + 1) + else if (depth > 1) state.tokenize = tokenComment(depth - 1) + else state.tokenize = tokenBase + return "comment" + } + } + + function pushContext(stream, state, type) { + state.context = { + prev: state.context, + indent: stream.indentation(), + col: stream.column(), + type: type + }; + } + + function popContext(state) { + state.indent = state.context.indent; + state.context = state.context.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, context: null}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.context && state.context.align == null) + state.context.align = false; + } + if (state.tokenize == tokenBase && stream.eatSpace()) return null; + + var style = state.tokenize(stream, state); + if (style == "comment") return style; + + if (state.context && state.context.align == null) + state.context.align = true; + + var tok = stream.current(); + if (tok == "(") + pushContext(stream, state, ")"); + else if (tok == "[") + pushContext(stream, state, "]"); + else if (state.context && state.context.type == tok) + popContext(state); + return style; + }, + + indent: function(state, textAfter) { + var cx = state.context; + if (!cx) return CodeMirror.Pass; + var closing = textAfter.charAt(0) == cx.type; + if (cx.align) return cx.col + (closing ? 0 : 1); + else return cx.indent + (closing ? 0 : config.indentUnit); + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : "--", + closeBrackets: "()[]{}''\"\"``", + config: parserConfig + }; +}); + + // `identifier` + function hookIdentifier(stream) { + // MySQL/MariaDB identifiers + // ref: https://dev.mysql.com/doc/refman/8.0/en/identifier-qualifiers.html + var ch; + while ((ch = stream.next()) != null) { + if (ch == "`" && !stream.eat("`")) return "variable-2"; + } + stream.backUp(stream.current().length - 1); + return stream.eatWhile(/\w/) ? "variable-2" : null; + } + + // "identifier" + function hookIdentifierDoublequote(stream) { + // Standard SQL /SQLite identifiers + // ref: http://web.archive.org/web/20160813185132/http://savage.net.au/SQL/sql-99.bnf.html#delimited%20identifier + // ref: http://sqlite.org/lang_keywords.html + var ch; + while ((ch = stream.next()) != null) { + if (ch == "\"" && !stream.eat("\"")) return "variable-2"; + } + stream.backUp(stream.current().length - 1); + return stream.eatWhile(/\w/) ? "variable-2" : null; + } + + // variable token + function hookVar(stream) { + // variables + // @@prefix.varName @varName + // varName can be quoted with ` or ' or " + // ref: https://dev.mysql.com/doc/refman/8.0/en/user-variables.html + if (stream.eat("@")) { + stream.match('session.'); + stream.match('local.'); + stream.match('global.'); + } + + if (stream.eat("'")) { + stream.match(/^.*'/); + return "variable-2"; + } else if (stream.eat('"')) { + stream.match(/^.*"/); + return "variable-2"; + } else if (stream.eat("`")) { + stream.match(/^.*`/); + return "variable-2"; + } else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) { + return "variable-2"; + } + return null; + }; + + // short client keyword token + function hookClient(stream) { + // \N means NULL + // ref: https://dev.mysql.com/doc/refman/8.0/en/null-values.html + if (stream.eat("N")) { + return "atom"; + } + // \g, etc + // ref: https://dev.mysql.com/doc/refman/8.0/en/mysql-commands.html + return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null; + } + + // these keywords are used by all SQL dialects (however, a mode can still overwrite it) + var sqlKeywords = "alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit "; + + // turn a space-separated list into an array + function set(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var defaultBuiltin = "bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric" + + // A generic SQL Mode. It's not a standard, it just tries to support what is generally supported + CodeMirror.defineMIME("text/x-sql", { + name: "sql", + keywords: set(sqlKeywords + "begin"), + builtin: set(defaultBuiltin), + atoms: set("false true null unknown"), + dateSQL: set("date time timestamp"), + support: set("doubleQuote binaryNumber hexNumber") + }); + + CodeMirror.defineMIME("text/x-mssql", { + name: "sql", + client: set("$partition binary_checksum checksum connectionproperty context_info current_request_id error_line error_message error_number error_procedure error_severity error_state formatmessage get_filestream_transaction_context getansinull host_id host_name isnull isnumeric min_active_rowversion newid newsequentialid rowcount_big xact_state object_id"), + keywords: set(sqlKeywords + "begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec go if use index holdlock nolock nowait paglock readcommitted readcommittedlock readpast readuncommitted repeatableread rowlock serializable snapshot tablock tablockx updlock with"), + builtin: set("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "), + atoms: set("is not null like and or in left right between inner outer join all any some cross unpivot pivot exists"), + operatorChars: /^[*+\-%<>!=^\&|\/]/, + brackets: /^[\{}\(\)]/, + punctuation: /^[;.,:/]/, + backslashStringEscapes: false, + dateSQL: set("date datetimeoffset datetime2 smalldatetime datetime time"), + hooks: { + "@": hookVar + } + }); + + CodeMirror.defineMIME("text/x-mysql", { + name: "sql", + client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), + keywords: set(sqlKeywords + "accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"), + builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=&|^]/, + dateSQL: set("date time timestamp"), + support: set("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"), + hooks: { + "@": hookVar, + "`": hookIdentifier, + "\\": hookClient + } + }); + + CodeMirror.defineMIME("text/x-mariadb", { + name: "sql", + client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), + keywords: set(sqlKeywords + "accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group group_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"), + builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=&|^]/, + dateSQL: set("date time timestamp"), + support: set("decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"), + hooks: { + "@": hookVar, + "`": hookIdentifier, + "\\": hookClient + } + }); + + // provided by the phpLiteAdmin project - phpliteadmin.org + CodeMirror.defineMIME("text/x-sqlite", { + name: "sql", + // commands of the official SQLite client, ref: https://www.sqlite.org/cli.html#dotcmd + client: set("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"), + // ref: http://sqlite.org/lang_keywords.html + keywords: set(sqlKeywords + "abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"), + // SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types. + builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"), + // ref: http://sqlite.org/syntax/literal-value.html + atoms: set("null current_date current_time current_timestamp"), + // ref: http://sqlite.org/lang_expr.html#binaryops + operatorChars: /^[*+\-%<>!=&|/~]/, + // SQLite is weakly typed, ref: http://sqlite.org/datatype3.html. This is just a list of some common types. + dateSQL: set("date time timestamp datetime"), + support: set("decimallessFloat zerolessFloat"), + identifierQuote: "\"", //ref: http://sqlite.org/lang_keywords.html + hooks: { + // bind-parameters ref:http://sqlite.org/lang_expr.html#varparam + "@": hookVar, + ":": hookVar, + "?": hookVar, + "$": hookVar, + // The preferred way to escape Identifiers is using double quotes, ref: http://sqlite.org/lang_keywords.html + "\"": hookIdentifierDoublequote, + // there is also support for backticks, ref: http://sqlite.org/lang_keywords.html + "`": hookIdentifier + } + }); + + // the query language used by Apache Cassandra is called CQL, but this mime type + // is called Cassandra to avoid confusion with Contextual Query Language + CodeMirror.defineMIME("text/x-cassandra", { + name: "sql", + client: { }, + keywords: set("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"), + builtin: set("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"), + atoms: set("false true infinity NaN"), + operatorChars: /^[<>=]/, + dateSQL: { }, + support: set("commentSlashSlash decimallessFloat"), + hooks: { } + }); + + // this is based on Peter Raganitsch's 'plsql' mode + CodeMirror.defineMIME("text/x-plsql", { + name: "sql", + client: set("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"), + keywords: set("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"), + builtin: set("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"), + operatorChars: /^[*\/+\-%<>!=~]/, + dateSQL: set("date time timestamp"), + support: set("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber") + }); + + // Created to support specific hive keywords + CodeMirror.defineMIME("text/x-hive", { + name: "sql", + keywords: set("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with admin authorization char compact compactions conf cube current current_date current_timestamp day decimal defined dependency directories elem_type exchange file following for grouping hour ignore inner interval jar less logical macro minute month more none noscan over owner partialscan preceding pretty principals protection reload rewrite role roles rollup rows second server sets skewed transactions truncate unbounded unset uri user values window year"), + builtin: set("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype key_type utctimestamp value_type varchar"), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=]/, + dateSQL: set("date timestamp"), + support: set("doubleQuote binaryNumber hexNumber") + }); + + CodeMirror.defineMIME("text/x-pgsql", { + name: "sql", + client: set("source"), + // For PostgreSQL - https://www.postgresql.org/docs/11/sql-keywords-appendix.html + // For pl/pgsql lang - https://github.com/postgres/postgres/blob/REL_11_2/src/pl/plpgsql/src/pl_scanner.c + keywords: set(sqlKeywords + "a abort abs absent absolute access according action ada add admin after aggregate alias all allocate also alter always analyse analyze and any are array array_agg array_max_cardinality as asc asensitive assert assertion assignment asymmetric at atomic attach attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli between bigint binary bit bit_length blob blocked bom boolean both breadth by c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain char char_length character character_length character_set_catalog character_set_name character_set_schema characteristics characters check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column column_name columns command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constant constraint constraint_catalog constraint_name constraint_schema constraints constructor contains content continue control conversion convert copy corr corresponding cost count covar_pop covar_samp create cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datatype date datetime_interval_code datetime_interval_precision day db deallocate debug dec decimal declare default defaults deferrable deferred defined definer degree delete delimiter delimiters dense_rank depends depth deref derived desc describe descriptor detach detail deterministic diagnostics dictionary disable discard disconnect dispatch distinct dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain double drop dump dynamic dynamic_function dynamic_function_code each element else elseif elsif empty enable encoding encrypted end end_frame end_partition endexec enforced enum equals errcode error escape event every except exception exclude excluding exclusive exec execute exists exit exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreach foreign fortran forward found frame_row free freeze from fs full function functions fusion g general generated get global go goto grant granted greatest group grouping groups handler having header hex hierarchy hint hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import in include including increment indent index indexes indicator info inherit inherits initially inline inner inout input insensitive insert instance instantiable instead int integer integrity intersect intersection interval into invoker is isnull isolation join k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like like_regex limit link listen ln load local localtime localtimestamp location locator lock locked log logged loop lower m map mapping match matched materialized max max_cardinality maxvalue member merge message message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized not nothing notice notify notnull nowait nth_value ntile null nullable nullif nulls number numeric object occurrences_regex octet_length octets of off offset oids old on only open operator option options or order ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parallel parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password path percent percent_rank percentile_cont percentile_disc perform period permission pg_context pg_datatype_name pg_exception_context pg_exception_detail pg_exception_hint placing plans pli policy portion position position_regex power precedes preceding precision prepare prepared preserve primary print_strict_params prior privileges procedural procedure procedures program public publication query quote raise range rank read reads real reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result result_oid return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns reverse revoke right role rollback rollup routine routine_catalog routine_name routine_schema routines row row_count row_number rows rowtype rule savepoint scale schema schema_name schemas scope scope_catalog scope_name scope_schema scroll search second section security select selective self sensitive sequence sequences serializable server server_name session session_user set setof sets share show similar simple size skip slice smallint snapshot some source space specific specific_name specifictype sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable stacked standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset subscription substring substring_regex succeeds sum symmetric sysid system system_time system_user t table table_name tables tablesample tablespace temp template temporary text then ties time timestamp timezone_hour timezone_minute to token top_level_count trailing transaction transaction_active transactions_committed transactions_rolled_back transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted union unique unknown unlink unlisten unlogged unnamed unnest until untyped update upper uri usage use_column use_variable user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of values var_pop var_samp varbinary varchar variable_conflict variadic varying verbose version versioning view views volatile warning when whenever where while whitespace width_bucket window with within without work wrapper write xml xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes zone"), + // https://www.postgresql.org/docs/11/datatype.html + builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time zone timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"), + atoms: set("false true null unknown"), + operatorChars: /^[*\/+\-%<>!=&|^\/#@?~]/, + backslashStringEscapes: false, + dateSQL: set("date time timestamp"), + support: set("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast escapeConstant") + }); + + // Google's SQL-like query language, GQL + CodeMirror.defineMIME("text/x-gql", { + name: "sql", + keywords: set("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"), + atoms: set("false true"), + builtin: set("blob datetime first key __key__ string integer double boolean null"), + operatorChars: /^[*+\-%<>!=]/ + }); + + // Greenplum + CodeMirror.defineMIME("text/x-gpsql", { + name: "sql", + client: set("source"), + //https://github.com/greenplum-db/gpdb/blob/master/src/include/parser/kwlist.h + keywords: set("abort absolute access action active add admin after aggregate all also alter always analyse analyze and any array as asc assertion assignment asymmetric at authorization backward before begin between bigint binary bit boolean both by cache called cascade cascaded case cast chain char character characteristics check checkpoint class close cluster coalesce codegen collate column comment commit committed concurrency concurrently configuration connection constraint constraints contains content continue conversion copy cost cpu_rate_limit create createdb createexttable createrole createuser cross csv cube current current_catalog current_date current_role current_schema current_time current_timestamp current_user cursor cycle data database day deallocate dec decimal declare decode default defaults deferrable deferred definer delete delimiter delimiters deny desc dictionary disable discard distinct distributed do document domain double drop dxl each else enable encoding encrypted end enum errors escape every except exchange exclude excluding exclusive execute exists explain extension external extract false family fetch fields filespace fill filter first float following for force foreign format forward freeze from full function global grant granted greatest group group_id grouping handler hash having header hold host hour identity if ignore ilike immediate immutable implicit in including inclusive increment index indexes inherit inherits initially inline inner inout input insensitive insert instead int integer intersect interval into invoker is isnull isolation join key language large last leading least left level like limit list listen load local localtime localtimestamp location lock log login mapping master match maxvalue median merge minute minvalue missing mode modifies modify month move name names national natural nchar new newline next no nocreatedb nocreateexttable nocreaterole nocreateuser noinherit nologin none noovercommit nosuperuser not nothing notify notnull nowait null nullif nulls numeric object of off offset oids old on only operator option options or order ordered others out outer over overcommit overlaps overlay owned owner parser partial partition partitions passing password percent percentile_cont percentile_disc placing plans position preceding precision prepare prepared preserve primary prior privileges procedural procedure protocol queue quote randomly range read readable reads real reassign recheck recursive ref references reindex reject relative release rename repeatable replace replica reset resource restart restrict returning returns revoke right role rollback rollup rootpartition row rows rule savepoint scatter schema scroll search second security segment select sequence serializable session session_user set setof sets share show similar simple smallint some split sql stable standalone start statement statistics stdin stdout storage strict strip subpartition subpartitions substring superuser symmetric sysid system table tablespace temp template temporary text then threshold ties time timestamp to trailing transaction treat trigger trim true truncate trusted type unbounded uncommitted unencrypted union unique unknown unlisten until update user using vacuum valid validation validator value values varchar variadic varying verbose version view volatile web when where whitespace window with within without work writable write xml xmlattributes xmlconcat xmlelement xmlexists xmlforest xmlparse xmlpi xmlroot xmlserialize year yes zone"), + builtin: set("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float float8 inet integer int int4 interval json jsonb line lseg macaddr macaddr8 money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=&|^\/#@?~]/, + dateSQL: set("date time timestamp"), + support: set("decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast") + }); + + // Spark SQL + CodeMirror.defineMIME("text/x-sparksql", { + name: "sql", + keywords: set("add after all alter analyze and anti archive array as asc at between bucket buckets by cache cascade case cast change clear cluster clustered codegen collection column columns comment commit compact compactions compute concatenate cost create cross cube current current_date current_timestamp database databases data dbproperties defined delete delimited deny desc describe dfs directories distinct distribute drop else end escaped except exchange exists explain export extended external false fields fileformat first following for format formatted from full function functions global grant group grouping having if ignore import in index indexes inner inpath inputformat insert intersect interval into is items join keys last lateral lazy left like limit lines list load local location lock locks logical macro map minus msck natural no not null nulls of on optimize option options or order out outer outputformat over overwrite partition partitioned partitions percent preceding principals purge range recordreader recordwriter recover reduce refresh regexp rename repair replace reset restrict revoke right rlike role roles rollback rollup row rows schema schemas select semi separated serde serdeproperties set sets show skewed sort sorted start statistics stored stratify struct table tables tablesample tblproperties temp temporary terminated then to touch transaction transactions transform true truncate unarchive unbounded uncache union unlock unset use using values view when where window with"), + builtin: set("abs acos acosh add_months aggregate and any approx_count_distinct approx_percentile array array_contains array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_repeat array_sort array_union arrays_overlap arrays_zip ascii asin asinh assert_true atan atan2 atanh avg base64 between bigint bin binary bit_and bit_count bit_get bit_length bit_or bit_xor bool_and bool_or boolean bround btrim cardinality case cast cbrt ceil ceiling char char_length character_length chr coalesce collect_list collect_set concat concat_ws conv corr cos cosh cot count count_if count_min_sketch covar_pop covar_samp crc32 cume_dist current_catalog current_database current_date current_timestamp current_timezone current_user date date_add date_format date_from_unix_date date_part date_sub date_trunc datediff day dayofmonth dayofweek dayofyear decimal decode degrees delimited dense_rank div double e element_at elt encode every exists exp explode explode_outer expm1 extract factorial filter find_in_set first first_value flatten float floor forall format_number format_string from_csv from_json from_unixtime from_utc_timestamp get_json_object getbit greatest grouping grouping_id hash hex hour hypot if ifnull in initcap inline inline_outer input_file_block_length input_file_block_start input_file_name inputformat instr int isnan isnotnull isnull java_method json_array_length json_object_keys json_tuple kurtosis lag last last_day last_value lcase lead least left length levenshtein like ln locate log log10 log1p log2 lower lpad ltrim make_date make_dt_interval make_interval make_timestamp make_ym_interval map map_concat map_entries map_filter map_from_arrays map_from_entries map_keys map_values map_zip_with max max_by md5 mean min min_by minute mod monotonically_increasing_id month months_between named_struct nanvl negative next_day not now nth_value ntile nullif nvl nvl2 octet_length or outputformat overlay parse_url percent_rank percentile percentile_approx pi pmod posexplode posexplode_outer position positive pow power printf quarter radians raise_error rand randn random rank rcfile reflect regexp regexp_extract regexp_extract_all regexp_like regexp_replace repeat replace reverse right rint rlike round row_number rpad rtrim schema_of_csv schema_of_json second sentences sequence sequencefile serde session_window sha sha1 sha2 shiftleft shiftright shiftrightunsigned shuffle sign signum sin sinh size skewness slice smallint some sort_array soundex space spark_partition_id split sqrt stack std stddev stddev_pop stddev_samp str_to_map string struct substr substring substring_index sum tan tanh textfile timestamp timestamp_micros timestamp_millis timestamp_seconds tinyint to_csv to_date to_json to_timestamp to_unix_timestamp to_utc_timestamp transform transform_keys transform_values translate trim trunc try_add try_divide typeof ucase unbase64 unhex uniontype unix_date unix_micros unix_millis unix_seconds unix_timestamp upper uuid var_pop var_samp variance version weekday weekofyear when width_bucket window xpath xpath_boolean xpath_double xpath_float xpath_int xpath_long xpath_number xpath_short xpath_string xxhash64 year zip_with"), + atoms: set("false true null"), + operatorChars: /^[*\/+\-%<>!=~&|^]/, + dateSQL: set("date time timestamp"), + support: set("doubleQuote zerolessFloat") + }); + + // Esper + CodeMirror.defineMIME("text/x-esper", { + name: "sql", + client: set("source"), + // http://www.espertech.com/esper/release-5.5.0/esper-reference/html/appendix_keywords.html + keywords: set("alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit after all and as at asc avedev avg between by case cast coalesce count create current_timestamp day days delete define desc distinct else end escape events every exists false first from full group having hour hours in inner insert instanceof into irstream is istream join last lastweekday left limit like max match_recognize matches median measures metadatasql min minute minutes msec millisecond milliseconds not null offset on or order outer output partition pattern prev prior regexp retain-union retain-intersection right rstream sec second seconds select set some snapshot sql stddev sum then true unidirectional until update variable weekday when where window"), + builtin: {}, + atoms: set("false true null"), + operatorChars: /^[*+\-%<>!=&|^\/#@?~]/, + dateSQL: set("time"), + support: set("decimallessFloat zerolessFloat binaryNumber hexNumber") + }); + + // Trino (formerly known as Presto) + CodeMirror.defineMIME("text/x-trino", { + name: "sql", + // https://github.com/trinodb/trino/blob/bc7a4eeedde28684c7ae6f74cefcaf7c6e782174/core/trino-parser/src/main/antlr4/io/trino/sql/parser/SqlBase.g4#L859-L1129 + // https://github.com/trinodb/trino/blob/bc7a4eeedde28684c7ae6f74cefcaf7c6e782174/docs/src/main/sphinx/functions/list.rst + keywords: set("abs absent acos add admin after all all_match alter analyze and any any_match approx_distinct approx_most_frequent approx_percentile approx_set arbitrary array_agg array_distinct array_except array_intersect array_join array_max array_min array_position array_remove array_sort array_union arrays_overlap as asc asin at at_timezone atan atan2 authorization avg bar bernoulli beta_cdf between bing_tile bing_tile_at bing_tile_coordinates bing_tile_polygon bing_tile_quadkey bing_tile_zoom_level bing_tiles_around bit_count bitwise_and bitwise_and_agg bitwise_left_shift bitwise_not bitwise_or bitwise_or_agg bitwise_right_shift bitwise_right_shift_arithmetic bitwise_xor bool_and bool_or both by call cardinality cascade case cast catalogs cbrt ceil ceiling char2hexint checksum chr classify coalesce codepoint column columns combinations comment commit committed concat concat_ws conditional constraint contains contains_sequence convex_hull_agg copartition corr cos cosh cosine_similarity count count_if covar_pop covar_samp crc32 create cross cube cume_dist current current_catalog current_date current_groups current_path current_role current_schema current_time current_timestamp current_timezone current_user data date_add date_diff date_format date_parse date_trunc day day_of_month day_of_week day_of_year deallocate default define definer degrees delete dense_rank deny desc describe descriptor distinct distributed dow doy drop e element_at else empty empty_approx_set encoding end error escape evaluate_classifier_predictions every except excluding execute exists exp explain extract false features fetch filter final first first_value flatten floor following for format format_datetime format_number from from_base from_base32 from_base64 from_base64url from_big_endian_32 from_big_endian_64 from_encoded_polyline from_geojson_geometry from_hex from_ieee754_32 from_ieee754_64 from_iso8601_date from_iso8601_timestamp from_iso8601_timestamp_nanos from_unixtime from_unixtime_nanos from_utf8 full functions geometric_mean geometry_from_hadoop_shape geometry_invalid_reason geometry_nearest_points geometry_to_bing_tiles geometry_union geometry_union_agg grant granted grants graphviz great_circle_distance greatest group grouping groups hamming_distance hash_counts having histogram hmac_md5 hmac_sha1 hmac_sha256 hmac_sha512 hour human_readable_seconds if ignore in including index infinity initial inner input insert intersect intersection_cardinality into inverse_beta_cdf inverse_normal_cdf invoker io is is_finite is_infinite is_json_scalar is_nan isolation jaccard_index join json_array json_array_contains json_array_get json_array_length json_exists json_extract json_extract_scalar json_format json_object json_parse json_query json_size json_value keep key keys kurtosis lag last last_day_of_month last_value lateral lead leading learn_classifier learn_libsvm_classifier learn_libsvm_regressor learn_regressor least left length level levenshtein_distance like limit line_interpolate_point line_interpolate_points line_locate_point listagg ln local localtime localtimestamp log log10 log2 logical lower lpad ltrim luhn_check make_set_digest map_agg map_concat map_entries map_filter map_from_entries map_keys map_union map_values map_zip_with match match_recognize matched matches materialized max max_by md5 measures merge merge_set_digest millisecond min min_by minute mod month multimap_agg multimap_from_entries murmur3 nan natural next nfc nfd nfkc nfkd ngrams no none none_match normal_cdf normalize not now nth_value ntile null nullif nulls numeric_histogram object objectid_timestamp of offset omit on one only option or order ordinality outer output over overflow parse_data_size parse_datetime parse_duration partition partitions passing past path pattern per percent_rank permute pi position pow power preceding prepare privileges properties prune qdigest_agg quarter quotes radians rand random range rank read recursive reduce reduce_agg refresh regexp_count regexp_extract regexp_extract_all regexp_like regexp_position regexp_replace regexp_split regr_intercept regr_slope regress rename render repeat repeatable replace reset respect restrict returning reverse revoke rgb right role roles rollback rollup round row_number rows rpad rtrim running scalar schema schemas second security seek select sequence serializable session set sets sha1 sha256 sha512 show shuffle sign simplify_geometry sin skewness skip slice some soundex spatial_partitioning spatial_partitions split split_part split_to_map split_to_multimap spooky_hash_v2_32 spooky_hash_v2_64 sqrt st_area st_asbinary st_astext st_boundary st_buffer st_centroid st_contains st_convexhull st_coorddim st_crosses st_difference st_dimension st_disjoint st_distance st_endpoint st_envelope st_envelopeaspts st_equals st_exteriorring st_geometries st_geometryfromtext st_geometryn st_geometrytype st_geomfrombinary st_interiorringn st_interiorrings st_intersection st_intersects st_isclosed st_isempty st_isring st_issimple st_isvalid st_length st_linefromtext st_linestring st_multipoint st_numgeometries st_numinteriorring st_numpoints st_overlaps st_point st_pointn st_points st_polygon st_relate st_startpoint st_symdifference st_touches st_union st_within st_x st_xmax st_xmin st_y st_ymax st_ymin start starts_with stats stddev stddev_pop stddev_samp string strpos subset substr substring sum system table tables tablesample tan tanh tdigest_agg text then ties timestamp_objectid timezone_hour timezone_minute to to_base to_base32 to_base64 to_base64url to_big_endian_32 to_big_endian_64 to_char to_date to_encoded_polyline to_geojson_geometry to_geometry to_hex to_ieee754_32 to_ieee754_64 to_iso8601 to_milliseconds to_spherical_geography to_timestamp to_unixtime to_utf8 trailing transaction transform transform_keys transform_values translate trim trim_array true truncate try try_cast type typeof uescape unbounded uncommitted unconditional union unique unknown unmatched unnest update upper url_decode url_encode url_extract_fragment url_extract_host url_extract_parameter url_extract_path url_extract_port url_extract_protocol url_extract_query use user using utf16 utf32 utf8 validate value value_at_quantile values values_at_quantiles var_pop var_samp variance verbose version view week week_of_year when where width_bucket wilson_interval_lower wilson_interval_upper window with with_timezone within without word_stem work wrapper write xxhash64 year year_of_week yow zip zip_with"), + // https://github.com/trinodb/trino/blob/bc7a4eeedde28684c7ae6f74cefcaf7c6e782174/core/trino-main/src/main/java/io/trino/metadata/TypeRegistry.java#L131-L168 + // https://github.com/trinodb/trino/blob/bc7a4eeedde28684c7ae6f74cefcaf7c6e782174/plugin/trino-ml/src/main/java/io/trino/plugin/ml/MLPlugin.java#L35 + // https://github.com/trinodb/trino/blob/bc7a4eeedde28684c7ae6f74cefcaf7c6e782174/plugin/trino-mongodb/src/main/java/io/trino/plugin/mongodb/MongoPlugin.java#L32 + // https://github.com/trinodb/trino/blob/bc7a4eeedde28684c7ae6f74cefcaf7c6e782174/plugin/trino-geospatial/src/main/java/io/trino/plugin/geospatial/GeoPlugin.java#L37 + builtin: set("array bigint bingtile boolean char codepoints color date decimal double function geometry hyperloglog int integer interval ipaddress joniregexp json json2016 jsonpath kdbtree likepattern map model objectid p4hyperloglog precision qdigest re2jregexp real regressor row setdigest smallint sphericalgeography tdigest time timestamp tinyint uuid varbinary varchar zone"), + atoms: set("false true null unknown"), + // https://trino.io/docs/current/functions/list.html#id1 + operatorChars: /^[[\]|<>=!\-+*/%]/, + dateSQL: set("date time timestamp zone"), + // hexNumber is necessary for VARBINARY literals, e.g. X'65683F' + // but it also enables 0xFF hex numbers, which Trino doesn't support. + support: set("decimallessFloat zerolessFloat hexNumber") + }); +}); + +/* + How Properties of Mime Types are used by SQL Mode + ================================================= + + keywords: + A list of keywords you want to be highlighted. + builtin: + A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword"). + operatorChars: + All characters that must be handled as operators. + client: + Commands parsed and executed by the client (not the server). + support: + A list of supported syntaxes which are not common, but are supported by more than 1 DBMS. + * zerolessFloat: .1 + * decimallessFloat: 1. + * hexNumber: X'01AF' X'01af' x'01AF' x'01af' 0x01AF 0x01af + * binaryNumber: b'01' B'01' 0b01 + * doubleQuote: "string" + * escapeConstant: E'' + * nCharCast: N'string' + * charsetCast: _utf8'string' + * commentHash: use # char for comments + * commentSlashSlash: use // for comments + * commentSpaceRequired: require a space after -- for comments + atoms: + Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others: + UNKNOWN, INFINITY, UNDERFLOW, NaN... + dateSQL: + Used for date/time SQL standard syntax, because not all DBMS's support same temporal types. +*/ diff --git a/js/codemirror/mode/stex/index.html b/js/codemirror/mode/stex/index.html new file mode 100644 index 0000000..0a66778 --- /dev/null +++ b/js/codemirror/mode/stex/index.html @@ -0,0 +1,116 @@ + + +CodeMirror: sTeX mode + + + + + + + + + +
+

sTeX mode

+
+ + +

sTeX mode supports this option:

+ +
inMathMode: boolean
+
Whether to start parsing in math mode (default: false).
+
+ +

MIME types defined: text/x-stex.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/stex/stex.js b/js/codemirror/mode/stex/stex.js new file mode 100644 index 0000000..2b73bc9 --- /dev/null +++ b/js/codemirror/mode/stex/stex.js @@ -0,0 +1,264 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/* + * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de) + * Licence: MIT + */ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("stex", function(_config, parserConfig) { + "use strict"; + + function pushCommand(state, command) { + state.cmdState.push(command); + } + + function peekCommand(state) { + if (state.cmdState.length > 0) { + return state.cmdState[state.cmdState.length - 1]; + } else { + return null; + } + } + + function popCommand(state) { + var plug = state.cmdState.pop(); + if (plug) { + plug.closeBracket(); + } + } + + // returns the non-default plugin closest to the end of the list + function getMostPowerful(state) { + var context = state.cmdState; + for (var i = context.length - 1; i >= 0; i--) { + var plug = context[i]; + if (plug.name == "DEFAULT") { + continue; + } + return plug; + } + return { styleIdentifier: function() { return null; } }; + } + + function addPluginPattern(pluginName, cmdStyle, styles) { + return function () { + this.name = pluginName; + this.bracketNo = 0; + this.style = cmdStyle; + this.styles = styles; + this.argument = null; // \begin and \end have arguments that follow. These are stored in the plugin + + this.styleIdentifier = function() { + return this.styles[this.bracketNo - 1] || null; + }; + this.openBracket = function() { + this.bracketNo++; + return "bracket"; + }; + this.closeBracket = function() {}; + }; + } + + var plugins = {}; + + plugins["importmodule"] = addPluginPattern("importmodule", "tag", ["string", "builtin"]); + plugins["documentclass"] = addPluginPattern("documentclass", "tag", ["", "atom"]); + plugins["usepackage"] = addPluginPattern("usepackage", "tag", ["atom"]); + plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]); + plugins["end"] = addPluginPattern("end", "tag", ["atom"]); + + plugins["label" ] = addPluginPattern("label" , "tag", ["atom"]); + plugins["ref" ] = addPluginPattern("ref" , "tag", ["atom"]); + plugins["eqref" ] = addPluginPattern("eqref" , "tag", ["atom"]); + plugins["cite" ] = addPluginPattern("cite" , "tag", ["atom"]); + plugins["bibitem" ] = addPluginPattern("bibitem" , "tag", ["atom"]); + plugins["Bibitem" ] = addPluginPattern("Bibitem" , "tag", ["atom"]); + plugins["RBibitem" ] = addPluginPattern("RBibitem" , "tag", ["atom"]); + + plugins["DEFAULT"] = function () { + this.name = "DEFAULT"; + this.style = "tag"; + + this.styleIdentifier = this.openBracket = this.closeBracket = function() {}; + }; + + function setState(state, f) { + state.f = f; + } + + // called when in a normal (no environment) context + function normal(source, state) { + var plug; + // Do we look like '\command' ? If so, attempt to apply the plugin 'command' + if (source.match(/^\\[a-zA-Z@]+/)) { + var cmdName = source.current().slice(1); + plug = plugins.hasOwnProperty(cmdName) ? plugins[cmdName] : plugins["DEFAULT"]; + plug = new plug(); + pushCommand(state, plug); + setState(state, beginParams); + return plug.style; + } + + // escape characters + if (source.match(/^\\[$&%#{}_]/)) { + return "tag"; + } + + // white space control characters + if (source.match(/^\\[,;!\/\\]/)) { + return "tag"; + } + + // find if we're starting various math modes + if (source.match("\\[")) { + setState(state, function(source, state){ return inMathMode(source, state, "\\]"); }); + return "keyword"; + } + if (source.match("\\(")) { + setState(state, function(source, state){ return inMathMode(source, state, "\\)"); }); + return "keyword"; + } + if (source.match("$$")) { + setState(state, function(source, state){ return inMathMode(source, state, "$$"); }); + return "keyword"; + } + if (source.match("$")) { + setState(state, function(source, state){ return inMathMode(source, state, "$"); }); + return "keyword"; + } + + var ch = source.next(); + if (ch == "%") { + source.skipToEnd(); + return "comment"; + } else if (ch == '}' || ch == ']') { + plug = peekCommand(state); + if (plug) { + plug.closeBracket(ch); + setState(state, beginParams); + } else { + return "error"; + } + return "bracket"; + } else if (ch == '{' || ch == '[') { + plug = plugins["DEFAULT"]; + plug = new plug(); + pushCommand(state, plug); + return "bracket"; + } else if (/\d/.test(ch)) { + source.eatWhile(/[\w.%]/); + return "atom"; + } else { + source.eatWhile(/[\w\-_]/); + plug = getMostPowerful(state); + if (plug.name == 'begin') { + plug.argument = source.current(); + } + return plug.styleIdentifier(); + } + } + + function inMathMode(source, state, endModeSeq) { + if (source.eatSpace()) { + return null; + } + if (endModeSeq && source.match(endModeSeq)) { + setState(state, normal); + return "keyword"; + } + if (source.match(/^\\[a-zA-Z@]+/)) { + return "tag"; + } + if (source.match(/^[a-zA-Z]+/)) { + return "variable-2"; + } + // escape characters + if (source.match(/^\\[$&%#{}_]/)) { + return "tag"; + } + // white space control characters + if (source.match(/^\\[,;!\/]/)) { + return "tag"; + } + // special math-mode characters + if (source.match(/^[\^_&]/)) { + return "tag"; + } + // non-special characters + if (source.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)) { + return null; + } + if (source.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)) { + return "number"; + } + var ch = source.next(); + if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") { + return "bracket"; + } + + if (ch == "%") { + source.skipToEnd(); + return "comment"; + } + return "error"; + } + + function beginParams(source, state) { + var ch = source.peek(), lastPlug; + if (ch == '{' || ch == '[') { + lastPlug = peekCommand(state); + lastPlug.openBracket(ch); + source.eat(ch); + setState(state, normal); + return "bracket"; + } + if (/[ \t\r]/.test(ch)) { + source.eat(ch); + return null; + } + setState(state, normal); + popCommand(state); + + return normal(source, state); + } + + return { + startState: function() { + var f = parserConfig.inMathMode ? function(source, state){ return inMathMode(source, state); } : normal; + return { + cmdState: [], + f: f + }; + }, + copyState: function(s) { + return { + cmdState: s.cmdState.slice(), + f: s.f + }; + }, + token: function(stream, state) { + return state.f(stream, state); + }, + blankLine: function(state) { + state.f = normal; + state.cmdState.length = 0; + }, + lineComment: "%" + }; + }); + + CodeMirror.defineMIME("text/x-stex", "stex"); + CodeMirror.defineMIME("text/x-latex", "stex"); + +}); diff --git a/js/codemirror/mode/stex/test.js b/js/codemirror/mode/stex/test.js new file mode 100644 index 0000000..3e90eea --- /dev/null +++ b/js/codemirror/mode/stex/test.js @@ -0,0 +1,132 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, "stex"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("word", + "foo"); + + MT("twoWords", + "foo bar"); + + MT("beginEndDocument", + "[tag \\begin][bracket {][atom document][bracket }]", + "[tag \\end][bracket {][atom document][bracket }]"); + + MT("beginEndEquation", + "[tag \\begin][bracket {][atom equation][bracket }]", + " E=mc^2", + "[tag \\end][bracket {][atom equation][bracket }]"); + + MT("beginModule", + "[tag \\begin][bracket {][atom module][bracket }[[]]]"); + + MT("beginModuleId", + "[tag \\begin][bracket {][atom module][bracket }[[]id=bbt-size[bracket ]]]"); + + MT("importModule", + "[tag \\importmodule][bracket [[][string b-b-t][bracket ]]{][builtin b-b-t][bracket }]"); + + MT("importModulePath", + "[tag \\importmodule][bracket [[][tag \\KWARCslides][bracket {][string dmath/en/cardinality][bracket }]]{][builtin card][bracket }]"); + + MT("psForPDF", + "[tag \\PSforPDF][bracket [[][atom 1][bracket ]]{]#1[bracket }]"); + + MT("comment", + "[comment % foo]"); + + MT("tagComment", + "[tag \\item][comment % bar]"); + + MT("commentTag", + " [comment % \\item]"); + + MT("commentLineBreak", + "[comment %]", + "foo"); + + MT("tagErrorCurly", + "[tag \\begin][error }][bracket {]"); + + MT("tagErrorSquare", + "[tag \\item][error ]]][bracket {]"); + + MT("commentCurly", + "[comment % }]"); + + MT("tagHash", + "the [tag \\#] key"); + + MT("tagNumber", + "a [tag \\$][atom 5] stetson"); + + MT("tagPercent", + "[atom 100][tag \\%] beef"); + + MT("tagAmpersand", + "L [tag \\&] N"); + + MT("tagUnderscore", + "foo[tag \\_]bar"); + + MT("tagBracketOpen", + "[tag \\emph][bracket {][tag \\{][bracket }]"); + + MT("tagBracketClose", + "[tag \\emph][bracket {][tag \\}][bracket }]"); + + MT("tagLetterNumber", + "section [tag \\S][atom 1]"); + + MT("textTagNumber", + "para [tag \\P][atom 2]"); + + MT("thinspace", + "x[tag \\,]y"); + + MT("thickspace", + "x[tag \\;]y"); + + MT("negativeThinspace", + "x[tag \\!]y"); + + MT("periodNotSentence", + "J.\\ L.\\ is"); + + MT("periodSentence", + "X[tag \\@]. The"); + + MT("italicCorrection", + "[bracket {][tag \\em] If[tag \\/][bracket }] I"); + + MT("tagBracket", + "[tag \\newcommand][bracket {][tag \\pop][bracket }]"); + + MT("inlineMathTagFollowedByNumber", + "[keyword $][tag \\pi][number 2][keyword $]"); + + MT("inlineMath", + "[keyword $][number 3][variable-2 x][tag ^][number 2.45]-[tag \\sqrt][bracket {][tag \\$\\alpha][bracket }] = [number 2][keyword $] other text"); + + MT("inlineMathLatexStyle", + "[keyword \\(][number 3][variable-2 x][tag ^][number 2.45]-[tag \\sqrt][bracket {][tag \\$\\alpha][bracket }] = [number 2][keyword \\)] other text"); + + MT("displayMath", + "More [keyword $$]\t[variable-2 S][tag ^][variable-2 n][tag \\sum] [variable-2 i][keyword $$] other text"); + + MT("displayMath environment", + "[tag \\begin][bracket {][atom equation][bracket }] x [tag \\end][bracket {][atom equation][bracket }] other text"); + + MT("displayMath environment with label", + "[tag \\begin][bracket {][atom equation][bracket }][tag \\label][bracket {][atom eq1][bracket }] x [tag \\end][bracket {][atom equation][bracket }] other text~[tag \\ref][bracket {][atom eq1][bracket }]"); + + MT("mathWithComment", + "[keyword $][variable-2 x] [comment % $]", + "[variable-2 y][keyword $] other text"); + + MT("lineBreakArgument", + "[tag \\\\][bracket [[][atom 1cm][bracket ]]]"); +})(); diff --git a/js/codemirror/mode/stylus/index.html b/js/codemirror/mode/stylus/index.html new file mode 100644 index 0000000..99234aa --- /dev/null +++ b/js/codemirror/mode/stylus/index.html @@ -0,0 +1,106 @@ + + +CodeMirror: Stylus mode + + + + + + + + + + + +
+

Stylus mode

+
+
+ + +

MIME types defined: text/x-styl.

+

Created by Dmitry Kiselyov

+
diff --git a/js/codemirror/mode/stylus/stylus.js b/js/codemirror/mode/stylus/stylus.js new file mode 100644 index 0000000..dae99e5 --- /dev/null +++ b/js/codemirror/mode/stylus/stylus.js @@ -0,0 +1,775 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Stylus mode created by Dmitry Kiselyov http://git.io/AaRB + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("stylus", function(config) { + var indentUnit = config.indentUnit, + indentUnitString = '', + tagKeywords = keySet(tagKeywords_), + tagVariablesRegexp = /^(a|b|i|s|col|em)$/i, + propertyKeywords = keySet(propertyKeywords_), + nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_), + valueKeywords = keySet(valueKeywords_), + colorKeywords = keySet(colorKeywords_), + documentTypes = keySet(documentTypes_), + documentTypesRegexp = wordRegexp(documentTypes_), + mediaFeatures = keySet(mediaFeatures_), + mediaTypes = keySet(mediaTypes_), + fontProperties = keySet(fontProperties_), + operatorsRegexp = /^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/, + wordOperatorKeywordsRegexp = wordRegexp(wordOperatorKeywords_), + blockKeywords = keySet(blockKeywords_), + vendorPrefixesRegexp = new RegExp(/^\-(moz|ms|o|webkit)-/i), + commonAtoms = keySet(commonAtoms_), + firstWordMatch = "", + states = {}, + ch, + style, + type, + override; + + while (indentUnitString.length < indentUnit) indentUnitString += ' '; + + /** + * Tokenizers + */ + function tokenBase(stream, state) { + firstWordMatch = stream.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/); + state.context.line.firstWord = firstWordMatch ? firstWordMatch[0].replace(/^\s*/, "") : ""; + state.context.line.indent = stream.indentation(); + ch = stream.peek(); + + // Line comment + if (stream.match("//")) { + stream.skipToEnd(); + return ["comment", "comment"]; + } + // Block comment + if (stream.match("/*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + // String + if (ch == "\"" || ch == "'") { + stream.next(); + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + // Def + if (ch == "@") { + stream.next(); + stream.eatWhile(/[\w\\-]/); + return ["def", stream.current()]; + } + // ID selector or Hex color + if (ch == "#") { + stream.next(); + // Hex color + if (stream.match(/^[0-9a-f]{3}([0-9a-f]([0-9a-f]{2}){0,2})?\b(?!-)/i)) { + return ["atom", "atom"]; + } + // ID selector + if (stream.match(/^[a-z][\w-]*/i)) { + return ["builtin", "hash"]; + } + } + // Vendor prefixes + if (stream.match(vendorPrefixesRegexp)) { + return ["meta", "vendor-prefixes"]; + } + // Numbers + if (stream.match(/^-?[0-9]?\.?[0-9]/)) { + stream.eatWhile(/[a-z%]/i); + return ["number", "unit"]; + } + // !important|optional + if (ch == "!") { + stream.next(); + return [stream.match(/^(important|optional)/i) ? "keyword": "operator", "important"]; + } + // Class + if (ch == "." && stream.match(/^\.[a-z][\w-]*/i)) { + return ["qualifier", "qualifier"]; + } + // url url-prefix domain regexp + if (stream.match(documentTypesRegexp)) { + if (stream.peek() == "(") state.tokenize = tokenParenthesized; + return ["property", "word"]; + } + // Mixins / Functions + if (stream.match(/^[a-z][\w-]*\(/i)) { + stream.backUp(1); + return ["keyword", "mixin"]; + } + // Block mixins + if (stream.match(/^(\+|-)[a-z][\w-]*\(/i)) { + stream.backUp(1); + return ["keyword", "block-mixin"]; + } + // Parent Reference BEM naming + if (stream.string.match(/^\s*&/) && stream.match(/^[-_]+[a-z][\w-]*/)) { + return ["qualifier", "qualifier"]; + } + // / Root Reference & Parent Reference + if (stream.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)) { + stream.backUp(1); + return ["variable-3", "reference"]; + } + if (stream.match(/^&{1}\s*$/)) { + return ["variable-3", "reference"]; + } + // Word operator + if (stream.match(wordOperatorKeywordsRegexp)) { + return ["operator", "operator"]; + } + // Word + if (stream.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)) { + // Variable + if (stream.match(/^(\.|\[)[\w-\'\"\]]+/i, false)) { + if (!wordIsTag(stream.current())) { + stream.match('.'); + return ["variable-2", "variable-name"]; + } + } + return ["variable-2", "word"]; + } + // Operators + if (stream.match(operatorsRegexp)) { + return ["operator", stream.current()]; + } + // Delimiters + if (/[:;,{}\[\]\(\)]/.test(ch)) { + stream.next(); + return [null, ch]; + } + // Non-detected items + stream.next(); + return [null, null]; + } + + /** + * Token comment + */ + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return ["comment", "comment"]; + } + + /** + * Token string + */ + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + if (quote == ")") stream.backUp(1); + break; + } + escaped = !escaped && ch == "\\"; + } + if (ch == quote || !escaped && quote != ")") state.tokenize = null; + return ["string", "string"]; + }; + } + + /** + * Token parenthesized + */ + function tokenParenthesized(stream, state) { + stream.next(); // Must be "(" + if (!stream.match(/\s*[\"\')]/, false)) + state.tokenize = tokenString(")"); + else + state.tokenize = null; + return [null, "("]; + } + + /** + * Context management + */ + function Context(type, indent, prev, line) { + this.type = type; + this.indent = indent; + this.prev = prev; + this.line = line || {firstWord: "", indent: 0}; + } + + function pushContext(state, stream, type, indent) { + indent = indent >= 0 ? indent : indentUnit; + state.context = new Context(type, stream.indentation() + indent, state.context); + return type; + } + + function popContext(state, currentIndent) { + var contextIndent = state.context.indent - indentUnit; + currentIndent = currentIndent || false; + state.context = state.context.prev; + if (currentIndent) state.context.indent = contextIndent; + return state.context.type; + } + + function pass(type, stream, state) { + return states[state.context.type](type, stream, state); + } + + function popAndPass(type, stream, state, n) { + for (var i = n || 1; i > 0; i--) + state.context = state.context.prev; + return pass(type, stream, state); + } + + + /** + * Parser + */ + function wordIsTag(word) { + return word.toLowerCase() in tagKeywords; + } + + function wordIsProperty(word) { + word = word.toLowerCase(); + return word in propertyKeywords || word in fontProperties; + } + + function wordIsBlock(word) { + return word.toLowerCase() in blockKeywords; + } + + function wordIsVendorPrefix(word) { + return word.toLowerCase().match(vendorPrefixesRegexp); + } + + function wordAsValue(word) { + var wordLC = word.toLowerCase(); + var override = "variable-2"; + if (wordIsTag(word)) override = "tag"; + else if (wordIsBlock(word)) override = "block-keyword"; + else if (wordIsProperty(word)) override = "property"; + else if (wordLC in valueKeywords || wordLC in commonAtoms) override = "atom"; + else if (wordLC == "return" || wordLC in colorKeywords) override = "keyword"; + + // Font family + else if (word.match(/^[A-Z]/)) override = "string"; + return override; + } + + function typeIsBlock(type, stream) { + return ((endOfLine(stream) && (type == "{" || type == "]" || type == "hash" || type == "qualifier")) || type == "block-mixin"); + } + + function typeIsInterpolation(type, stream) { + return type == "{" && stream.match(/^\s*\$?[\w-]+/i, false); + } + + function typeIsPseudo(type, stream) { + return type == ":" && stream.match(/^[a-z-]+/, false); + } + + function startOfLine(stream) { + return stream.sol() || stream.string.match(new RegExp("^\\s*" + escapeRegExp(stream.current()))); + } + + function endOfLine(stream) { + return stream.eol() || stream.match(/^\s*$/, false); + } + + function firstWordOfLine(line) { + var re = /^\s*[-_]*[a-z0-9]+[\w-]*/i; + var result = typeof line == "string" ? line.match(re) : line.string.match(re); + return result ? result[0].replace(/^\s*/, "") : ""; + } + + + /** + * Block + */ + states.block = function(type, stream, state) { + if ((type == "comment" && startOfLine(stream)) || + (type == "," && endOfLine(stream)) || + type == "mixin") { + return pushContext(state, stream, "block", 0); + } + if (typeIsInterpolation(type, stream)) { + return pushContext(state, stream, "interpolation"); + } + if (endOfLine(stream) && type == "]") { + if (!/^\s*(\.|#|:|\[|\*|&)/.test(stream.string) && !wordIsTag(firstWordOfLine(stream))) { + return pushContext(state, stream, "block", 0); + } + } + if (typeIsBlock(type, stream)) { + return pushContext(state, stream, "block"); + } + if (type == "}" && endOfLine(stream)) { + return pushContext(state, stream, "block", 0); + } + if (type == "variable-name") { + if (stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/) || wordIsBlock(firstWordOfLine(stream))) { + return pushContext(state, stream, "variableName"); + } + else { + return pushContext(state, stream, "variableName", 0); + } + } + if (type == "=") { + if (!endOfLine(stream) && !wordIsBlock(firstWordOfLine(stream))) { + return pushContext(state, stream, "block", 0); + } + return pushContext(state, stream, "block"); + } + if (type == "*") { + if (endOfLine(stream) || stream.match(/\s*(,|\.|#|\[|:|{)/,false)) { + override = "tag"; + return pushContext(state, stream, "block"); + } + } + if (typeIsPseudo(type, stream)) { + return pushContext(state, stream, "pseudo"); + } + if (/@(font-face|media|supports|(-moz-)?document)/.test(type)) { + return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock"); + } + if (/@(-(moz|ms|o|webkit)-)?keyframes$/.test(type)) { + return pushContext(state, stream, "keyframes"); + } + if (/@extends?/.test(type)) { + return pushContext(state, stream, "extend", 0); + } + if (type && type.charAt(0) == "@") { + + // Property Lookup + if (stream.indentation() > 0 && wordIsProperty(stream.current().slice(1))) { + override = "variable-2"; + return "block"; + } + if (/(@import|@require|@charset)/.test(type)) { + return pushContext(state, stream, "block", 0); + } + return pushContext(state, stream, "block"); + } + if (type == "reference" && endOfLine(stream)) { + return pushContext(state, stream, "block"); + } + if (type == "(") { + return pushContext(state, stream, "parens"); + } + + if (type == "vendor-prefixes") { + return pushContext(state, stream, "vendorPrefixes"); + } + if (type == "word") { + var word = stream.current(); + override = wordAsValue(word); + + if (override == "property") { + if (startOfLine(stream)) { + return pushContext(state, stream, "block", 0); + } else { + override = "atom"; + return "block"; + } + } + + if (override == "tag") { + + // tag is a css value + if (/embed|menu|pre|progress|sub|table/.test(word)) { + if (wordIsProperty(firstWordOfLine(stream))) { + override = "atom"; + return "block"; + } + } + + // tag is an attribute + if (stream.string.match(new RegExp("\\[\\s*" + word + "|" + word +"\\s*\\]"))) { + override = "atom"; + return "block"; + } + + // tag is a variable + if (tagVariablesRegexp.test(word)) { + if ((startOfLine(stream) && stream.string.match(/=/)) || + (!startOfLine(stream) && + !stream.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/) && + !wordIsTag(firstWordOfLine(stream)))) { + override = "variable-2"; + if (wordIsBlock(firstWordOfLine(stream))) return "block"; + return pushContext(state, stream, "block", 0); + } + } + + if (endOfLine(stream)) return pushContext(state, stream, "block"); + } + if (override == "block-keyword") { + override = "keyword"; + + // Postfix conditionals + if (stream.current(/(if|unless)/) && !startOfLine(stream)) { + return "block"; + } + return pushContext(state, stream, "block"); + } + if (word == "return") return pushContext(state, stream, "block", 0); + + // Placeholder selector + if (override == "variable-2" && stream.string.match(/^\s?\$[\w-\.\[\]\'\"]+$/)) { + return pushContext(state, stream, "block"); + } + } + return state.context.type; + }; + + + /** + * Parens + */ + states.parens = function(type, stream, state) { + if (type == "(") return pushContext(state, stream, "parens"); + if (type == ")") { + if (state.context.prev.type == "parens") { + return popContext(state); + } + if ((stream.string.match(/^[a-z][\w-]*\(/i) && endOfLine(stream)) || + wordIsBlock(firstWordOfLine(stream)) || + /(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(firstWordOfLine(stream)) || + (!stream.string.match(/^-?[a-z][\w-\.\[\]\'\"]*\s*=/) && + wordIsTag(firstWordOfLine(stream)))) { + return pushContext(state, stream, "block"); + } + if (stream.string.match(/^[\$-]?[a-z][\w-\.\[\]\'\"]*\s*=/) || + stream.string.match(/^\s*(\(|\)|[0-9])/) || + stream.string.match(/^\s+[a-z][\w-]*\(/i) || + stream.string.match(/^\s+[\$-]?[a-z]/i)) { + return pushContext(state, stream, "block", 0); + } + if (endOfLine(stream)) return pushContext(state, stream, "block"); + else return pushContext(state, stream, "block", 0); + } + if (type && type.charAt(0) == "@" && wordIsProperty(stream.current().slice(1))) { + override = "variable-2"; + } + if (type == "word") { + var word = stream.current(); + override = wordAsValue(word); + if (override == "tag" && tagVariablesRegexp.test(word)) { + override = "variable-2"; + } + if (override == "property" || word == "to") override = "atom"; + } + if (type == "variable-name") { + return pushContext(state, stream, "variableName"); + } + if (typeIsPseudo(type, stream)) { + return pushContext(state, stream, "pseudo"); + } + return state.context.type; + }; + + + /** + * Vendor prefixes + */ + states.vendorPrefixes = function(type, stream, state) { + if (type == "word") { + override = "property"; + return pushContext(state, stream, "block", 0); + } + return popContext(state); + }; + + + /** + * Pseudo + */ + states.pseudo = function(type, stream, state) { + if (!wordIsProperty(firstWordOfLine(stream.string))) { + stream.match(/^[a-z-]+/); + override = "variable-3"; + if (endOfLine(stream)) return pushContext(state, stream, "block"); + return popContext(state); + } + return popAndPass(type, stream, state); + }; + + + /** + * atBlock + */ + states.atBlock = function(type, stream, state) { + if (type == "(") return pushContext(state, stream, "atBlock_parens"); + if (typeIsBlock(type, stream)) { + return pushContext(state, stream, "block"); + } + if (typeIsInterpolation(type, stream)) { + return pushContext(state, stream, "interpolation"); + } + if (type == "word") { + var word = stream.current().toLowerCase(); + if (/^(only|not|and|or)$/.test(word)) + override = "keyword"; + else if (documentTypes.hasOwnProperty(word)) + override = "tag"; + else if (mediaTypes.hasOwnProperty(word)) + override = "attribute"; + else if (mediaFeatures.hasOwnProperty(word)) + override = "property"; + else if (nonStandardPropertyKeywords.hasOwnProperty(word)) + override = "string-2"; + else override = wordAsValue(stream.current()); + if (override == "tag" && endOfLine(stream)) { + return pushContext(state, stream, "block"); + } + } + if (type == "operator" && /^(not|and|or)$/.test(stream.current())) { + override = "keyword"; + } + return state.context.type; + }; + + states.atBlock_parens = function(type, stream, state) { + if (type == "{" || type == "}") return state.context.type; + if (type == ")") { + if (endOfLine(stream)) return pushContext(state, stream, "block"); + else return pushContext(state, stream, "atBlock"); + } + if (type == "word") { + var word = stream.current().toLowerCase(); + override = wordAsValue(word); + if (/^(max|min)/.test(word)) override = "property"; + if (override == "tag") { + tagVariablesRegexp.test(word) ? override = "variable-2" : override = "atom"; + } + return state.context.type; + } + return states.atBlock(type, stream, state); + }; + + + /** + * Keyframes + */ + states.keyframes = function(type, stream, state) { + if (stream.indentation() == "0" && ((type == "}" && startOfLine(stream)) || type == "]" || type == "hash" + || type == "qualifier" || wordIsTag(stream.current()))) { + return popAndPass(type, stream, state); + } + if (type == "{") return pushContext(state, stream, "keyframes"); + if (type == "}") { + if (startOfLine(stream)) return popContext(state, true); + else return pushContext(state, stream, "keyframes"); + } + if (type == "unit" && /^[0-9]+\%$/.test(stream.current())) { + return pushContext(state, stream, "keyframes"); + } + if (type == "word") { + override = wordAsValue(stream.current()); + if (override == "block-keyword") { + override = "keyword"; + return pushContext(state, stream, "keyframes"); + } + } + if (/@(font-face|media|supports|(-moz-)?document)/.test(type)) { + return pushContext(state, stream, endOfLine(stream) ? "block" : "atBlock"); + } + if (type == "mixin") { + return pushContext(state, stream, "block", 0); + } + return state.context.type; + }; + + + /** + * Interpolation + */ + states.interpolation = function(type, stream, state) { + if (type == "{") popContext(state) && pushContext(state, stream, "block"); + if (type == "}") { + if (stream.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i) || + (stream.string.match(/^\s*[a-z]/i) && wordIsTag(firstWordOfLine(stream)))) { + return pushContext(state, stream, "block"); + } + if (!stream.string.match(/^(\{|\s*\&)/) || + stream.match(/\s*[\w-]/,false)) { + return pushContext(state, stream, "block", 0); + } + return pushContext(state, stream, "block"); + } + if (type == "variable-name") { + return pushContext(state, stream, "variableName", 0); + } + if (type == "word") { + override = wordAsValue(stream.current()); + if (override == "tag") override = "atom"; + } + return state.context.type; + }; + + + /** + * Extend/s + */ + states.extend = function(type, stream, state) { + if (type == "[" || type == "=") return "extend"; + if (type == "]") return popContext(state); + if (type == "word") { + override = wordAsValue(stream.current()); + return "extend"; + } + return popContext(state); + }; + + + /** + * Variable name + */ + states.variableName = function(type, stream, state) { + if (type == "string" || type == "[" || type == "]" || stream.current().match(/^(\.|\$)/)) { + if (stream.current().match(/^\.[\w-]+/i)) override = "variable-2"; + return "variableName"; + } + return popAndPass(type, stream, state); + }; + + + return { + startState: function(base) { + return { + tokenize: null, + state: "block", + context: new Context("block", base || 0, null) + }; + }, + token: function(stream, state) { + if (!state.tokenize && stream.eatSpace()) return null; + style = (state.tokenize || tokenBase)(stream, state); + if (style && typeof style == "object") { + type = style[1]; + style = style[0]; + } + override = style; + state.state = states[state.state](type, stream, state); + return override; + }, + indent: function(state, textAfter, line) { + + var cx = state.context, + ch = textAfter && textAfter.charAt(0), + indent = cx.indent, + lineFirstWord = firstWordOfLine(textAfter), + lineIndent = line.match(/^\s*/)[0].replace(/\t/g, indentUnitString).length, + prevLineFirstWord = state.context.prev ? state.context.prev.line.firstWord : "", + prevLineIndent = state.context.prev ? state.context.prev.line.indent : lineIndent; + + if (cx.prev && + (ch == "}" && (cx.type == "block" || cx.type == "atBlock" || cx.type == "keyframes") || + ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") || + ch == "{" && (cx.type == "at"))) { + indent = cx.indent - indentUnit; + } else if (!(/(\})/.test(ch))) { + if (/@|\$|\d/.test(ch) || + /^\{/.test(textAfter) || +/^\s*\/(\/|\*)/.test(textAfter) || + /^\s*\/\*/.test(prevLineFirstWord) || + /^\s*[\w-\.\[\]\'\"]+\s*(\?|:|\+)?=/i.test(textAfter) || +/^(\+|-)?[a-z][\w-]*\(/i.test(textAfter) || +/^return/.test(textAfter) || + wordIsBlock(lineFirstWord)) { + indent = lineIndent; + } else if (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(ch) || wordIsTag(lineFirstWord)) { + if (/\,\s*$/.test(prevLineFirstWord)) { + indent = prevLineIndent; + } else if (/^\s+/.test(line) && (/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(prevLineFirstWord) || wordIsTag(prevLineFirstWord))) { + indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + indentUnit; + } else { + indent = lineIndent; + } + } else if (!/,\s*$/.test(line) && (wordIsVendorPrefix(lineFirstWord) || wordIsProperty(lineFirstWord))) { + if (wordIsBlock(prevLineFirstWord)) { + indent = lineIndent <= prevLineIndent ? prevLineIndent : prevLineIndent + indentUnit; + } else if (/^\{/.test(prevLineFirstWord)) { + indent = lineIndent <= prevLineIndent ? lineIndent : prevLineIndent + indentUnit; + } else if (wordIsVendorPrefix(prevLineFirstWord) || wordIsProperty(prevLineFirstWord)) { + indent = lineIndent >= prevLineIndent ? prevLineIndent : lineIndent; + } else if (/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(prevLineFirstWord) || + /=\s*$/.test(prevLineFirstWord) || + wordIsTag(prevLineFirstWord) || + /^\$[\w-\.\[\]\'\"]/.test(prevLineFirstWord)) { + indent = prevLineIndent + indentUnit; + } else { + indent = lineIndent; + } + } + } + return indent; + }, + electricChars: "}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + blockCommentContinue: " * ", + lineComment: "//", + fold: "indent" + }; + }); + + // developer.mozilla.org/en-US/docs/Web/HTML/Element + var tagKeywords_ = ["a","abbr","address","area","article","aside","audio", "b", "base","bdi", "bdo","bgsound","blockquote","body","br","button","canvas","caption","cite", "code","col","colgroup","data","datalist","dd","del","details","dfn","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","nobr","noframes", "noscript","object","ol","optgroup","option","output","p","param","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","tr","track", "u","ul","var","video"]; + + // github.com/codemirror/CodeMirror/blob/master/mode/css/css.js + // Note, "url-prefix" should precede "url" in order to match correctly in documentTypesRegexp + var documentTypes_ = ["domain", "regexp", "url-prefix", "url"]; + var mediaTypes_ = ["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"]; + var mediaFeatures_ = ["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","dynamic-range","video-dynamic-range"]; + var propertyKeywords_ = ["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode","font-smoothing","osx-font-smoothing"]; + var nonStandardPropertyKeywords_ = ["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"]; + var fontProperties_ = ["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]; + var colorKeywords_ = ["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"]; + var valueKeywords_ = ["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","conic-gradient","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","high","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","matrix","matrix3d","media-play-button","media-slider","media-sliderthumb","media-volume-slider","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeating-conic-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scale","scale3d","scaleX","scaleY","scaleZ","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","spell-out","square","square-button","standard","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","x-large","x-small","xor","xx-large","xx-small","bicubic","optimizespeed","grayscale","row","row-reverse","wrap","wrap-reverse","column-reverse","flex-start","flex-end","space-between","space-around", "unset"]; + + var wordOperatorKeywords_ = ["in","and","or","not","is not","is a","is","isnt","defined","if unless"], + blockKeywords_ = ["for","if","else","unless", "from", "to"], + commonAtoms_ = ["null","true","false","href","title","type","not-allowed","readonly","disabled"], + commonDef_ = ["@font-face", "@keyframes", "@media", "@viewport", "@page", "@host", "@supports", "@block", "@css"]; + + var hintWords = tagKeywords_.concat(documentTypes_,mediaTypes_,mediaFeatures_, + propertyKeywords_,nonStandardPropertyKeywords_, + colorKeywords_,valueKeywords_,fontProperties_, + wordOperatorKeywords_,blockKeywords_, + commonAtoms_,commonDef_); + + function wordRegexp(words) { + words = words.sort(function(a,b){return b > a;}); + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + function keySet(array) { + var keys = {}; + for (var i = 0; i < array.length; ++i) keys[array[i]] = true; + return keys; + } + + function escapeRegExp(text) { + return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + + CodeMirror.registerHelper("hintWords", "stylus", hintWords); + CodeMirror.defineMIME("text/x-styl", "stylus"); +}); diff --git a/js/codemirror/mode/swift/index.html b/js/codemirror/mode/swift/index.html new file mode 100644 index 0000000..1aa6dfd --- /dev/null +++ b/js/codemirror/mode/swift/index.html @@ -0,0 +1,70 @@ + + +CodeMirror: Swift mode + + + + + + + + + + +
+

Swift mode

+
+ + + +

A simple mode for Swift

+ +

MIME types defined: text/x-swift (Swift code)

+
diff --git a/js/codemirror/mode/swift/swift.js b/js/codemirror/mode/swift/swift.js new file mode 100644 index 0000000..4edc450 --- /dev/null +++ b/js/codemirror/mode/swift/swift.js @@ -0,0 +1,221 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Swift mode created by Michael Kaminsky https://github.com/mkaminsky11 + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") + mod(require("../../lib/codemirror")) + else if (typeof define == "function" && define.amd) + define(["../../lib/codemirror"], mod) + else + mod(CodeMirror) +})(function(CodeMirror) { + "use strict" + + function wordSet(words) { + var set = {} + for (var i = 0; i < words.length; i++) set[words[i]] = true + return set + } + + var keywords = wordSet(["_","var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype", + "open","public","internal","fileprivate","private","deinit","init","new","override","self","subscript","super", + "convenience","dynamic","final","indirect","lazy","required","static","unowned","unowned(safe)","unowned(unsafe)","weak","as","is", + "break","case","continue","default","else","fallthrough","for","guard","if","in","repeat","switch","where","while", + "defer","return","inout","mutating","nonmutating","isolated","nonisolated","catch","do","rethrows","throw","throws","async","await","try","didSet","get","set","willSet", + "assignment","associativity","infix","left","none","operator","postfix","precedence","precedencegroup","prefix","right", + "Any","AnyObject","Type","dynamicType","Self","Protocol","__COLUMN__","__FILE__","__FUNCTION__","__LINE__"]) + var definingKeywords = wordSet(["var","let","actor","class","enum","extension","import","protocol","struct","func","typealias","associatedtype","for"]) + var atoms = wordSet(["true","false","nil","self","super","_"]) + var types = wordSet(["Array","Bool","Character","Dictionary","Double","Float","Int","Int8","Int16","Int32","Int64","Never","Optional","Set","String", + "UInt8","UInt16","UInt32","UInt64","Void"]) + var operators = "+-/*%=|&<>~^?!" + var punc = ":;,.(){}[]" + var binary = /^\-?0b[01][01_]*/ + var octal = /^\-?0o[0-7][0-7_]*/ + var hexadecimal = /^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/ + var decimal = /^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/ + var identifier = /^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/ + var property = /^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/ + var instruction = /^\#[A-Za-z]+/ + var attribute = /^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/ + //var regexp = /^\/(?!\s)(?:\/\/)?(?:\\.|[^\/])+\// + + function tokenBase(stream, state, prev) { + if (stream.sol()) state.indented = stream.indentation() + if (stream.eatSpace()) return null + + var ch = stream.peek() + if (ch == "/") { + if (stream.match("//")) { + stream.skipToEnd() + return "comment" + } + if (stream.match("/*")) { + state.tokenize.push(tokenComment) + return tokenComment(stream, state) + } + } + if (stream.match(instruction)) return "builtin" + if (stream.match(attribute)) return "attribute" + if (stream.match(binary)) return "number" + if (stream.match(octal)) return "number" + if (stream.match(hexadecimal)) return "number" + if (stream.match(decimal)) return "number" + if (stream.match(property)) return "property" + if (operators.indexOf(ch) > -1) { + stream.next() + return "operator" + } + if (punc.indexOf(ch) > -1) { + stream.next() + stream.match("..") + return "punctuation" + } + var stringMatch + if (stringMatch = stream.match(/("""|"|')/)) { + var tokenize = tokenString.bind(null, stringMatch[0]) + state.tokenize.push(tokenize) + return tokenize(stream, state) + } + + if (stream.match(identifier)) { + var ident = stream.current() + if (types.hasOwnProperty(ident)) return "variable-2" + if (atoms.hasOwnProperty(ident)) return "atom" + if (keywords.hasOwnProperty(ident)) { + if (definingKeywords.hasOwnProperty(ident)) + state.prev = "define" + return "keyword" + } + if (prev == "define") return "def" + return "variable" + } + + stream.next() + return null + } + + function tokenUntilClosingParen() { + var depth = 0 + return function(stream, state, prev) { + var inner = tokenBase(stream, state, prev) + if (inner == "punctuation") { + if (stream.current() == "(") ++depth + else if (stream.current() == ")") { + if (depth == 0) { + stream.backUp(1) + state.tokenize.pop() + return state.tokenize[state.tokenize.length - 1](stream, state) + } + else --depth + } + } + return inner + } + } + + function tokenString(openQuote, stream, state) { + var singleLine = openQuote.length == 1 + var ch, escaped = false + while (ch = stream.peek()) { + if (escaped) { + stream.next() + if (ch == "(") { + state.tokenize.push(tokenUntilClosingParen()) + return "string" + } + escaped = false + } else if (stream.match(openQuote)) { + state.tokenize.pop() + return "string" + } else { + stream.next() + escaped = ch == "\\" + } + } + if (singleLine) { + state.tokenize.pop() + } + return "string" + } + + function tokenComment(stream, state) { + var ch + while (ch = stream.next()) { + if (ch === "/" && stream.eat("*")) { + state.tokenize.push(tokenComment) + } else if (ch === "*" && stream.eat("/")) { + state.tokenize.pop() + break + } + } + return "comment" + } + + function Context(prev, align, indented) { + this.prev = prev + this.align = align + this.indented = indented + } + + function pushContext(state, stream) { + var align = stream.match(/^\s*($|\/[\/\*])/, false) ? null : stream.column() + 1 + state.context = new Context(state.context, align, state.indented) + } + + function popContext(state) { + if (state.context) { + state.indented = state.context.indented + state.context = state.context.prev + } + } + + CodeMirror.defineMode("swift", function(config) { + return { + startState: function() { + return { + prev: null, + context: null, + indented: 0, + tokenize: [] + } + }, + + token: function(stream, state) { + var prev = state.prev + state.prev = null + var tokenize = state.tokenize[state.tokenize.length - 1] || tokenBase + var style = tokenize(stream, state, prev) + if (!style || style == "comment") state.prev = prev + else if (!state.prev) state.prev = style + + if (style == "punctuation") { + var bracket = /[\(\[\{]|([\]\)\}])/.exec(stream.current()) + if (bracket) (bracket[1] ? popContext : pushContext)(state, stream) + } + + return style + }, + + indent: function(state, textAfter) { + var cx = state.context + if (!cx) return 0 + var closing = /^[\]\}\)]/.test(textAfter) + if (cx.align != null) return cx.align - (closing ? 1 : 0) + return cx.indented + (closing ? 0 : config.indentUnit) + }, + + electricInput: /^\s*[\)\}\]]$/, + + lineComment: "//", + blockCommentStart: "/*", + blockCommentEnd: "*/", + fold: "brace", + closeBrackets: "()[]{}''\"\"``" + } + }) + + CodeMirror.defineMIME("text/x-swift","swift") +}); diff --git a/js/codemirror/mode/swift/test.js b/js/codemirror/mode/swift/test.js new file mode 100644 index 0000000..d305624 --- /dev/null +++ b/js/codemirror/mode/swift/test.js @@ -0,0 +1,162 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "swift"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Ensure all number types are properly represented. + MT("numbers", + "[keyword var] [def a] [operator =] [number 17]", + "[keyword var] [def b] [operator =] [number -0.5]", + "[keyword var] [def c] [operator =] [number 0.3456e-4]", + "[keyword var] [def d] [operator =] [number 345e2]", + "[keyword var] [def e] [operator =] [number 0o7324]", + "[keyword var] [def f] [operator =] [number 0b10010]", + "[keyword var] [def g] [operator =] [number -0x35ade]", + "[keyword var] [def h] [operator =] [number 0xaea.ep-13]", + "[keyword var] [def i] [operator =] [number 0x13ep6]"); + + // Variable/class/etc definition. + MT("definition", + "[keyword var] [def a] [operator =] [number 5]", + "[keyword let] [def b][punctuation :] [variable-2 Int] [operator =] [number 10]", + "[keyword class] [def C] [punctuation {] [punctuation }]", + "[keyword struct] [def D] [punctuation {] [punctuation }]", + "[keyword enum] [def E] [punctuation {] [punctuation }]", + "[keyword extension] [def F] [punctuation {] [punctuation }]", + "[keyword protocol] [def G] [punctuation {] [punctuation }]", + "[keyword func] [def h][punctuation ()] [punctuation {] [punctuation }]", + "[keyword import] [def Foundation]", + "[keyword typealias] [def NewString] [operator =] [variable-2 String]", + "[keyword associatedtype] [def I]", + "[keyword for] [def j] [keyword in] [number 0][punctuation ..][operator <][number 3] [punctuation {] [punctuation }]"); + + // Strings and string interpolation. + MT("strings", + "[keyword var] [def a][punctuation :] [variable-2 String] [operator =] [string \"test\"]", + "[keyword var] [def b][punctuation :] [variable-2 String] [operator =] [string \"\\(][variable a][string )\"]", + "[keyword var] [def c] [operator =] [string \"\"\"]", + "[string multi]", + "[string line]", + "[string \"test\"]", + "[string \"\"\"]", + "[variable print][punctuation (][string \"\"][punctuation )]"); + + // Comments. + MT("comments", + "[comment // This is a comment]", + "[comment /* This is another comment */]", + "[keyword var] [def a] [operator =] [number 5] [comment // Third comment]"); + + // Atoms. + MT("atoms", + "[keyword class] [def FooClass] [punctuation {]", + " [keyword let] [def fooBool][punctuation :] [variable-2 Bool][operator ?]", + " [keyword let] [def fooInt][punctuation :] [variable-2 Int][operator ?]", + " [keyword func] [keyword init][punctuation (][variable fooBool][punctuation :] [variable-2 Bool][punctuation ,] [variable barBool][punctuation :] [variable-2 Bool][punctuation )] [punctuation {]", + " [atom super][property .init][punctuation ()]", + " [atom self][property .fooBool] [operator =] [variable fooBool]", + " [variable fooInt] [operator =] [atom nil]", + " [keyword if] [variable barBool] [operator ==] [atom true] [punctuation {]", + " [variable print][punctuation (][string \"True!\"][punctuation )]", + " [punctuation }] [keyword else] [keyword if] [variable barBool] [operator ==] [atom false] [punctuation {]", + " [keyword for] [atom _] [keyword in] [number 0][punctuation ...][number 5] [punctuation {]", + " [variable print][punctuation (][string \"False!\"][punctuation )]", + " [punctuation }]", + " [punctuation }]", + " [punctuation }]", + "[punctuation }]"); + + // Types. + MT("types", + "[keyword var] [def a] [operator =] [variable-2 Array][operator <][variable-2 Int][operator >]", + "[keyword var] [def b] [operator =] [variable-2 Set][operator <][variable-2 Bool][operator >]", + "[keyword var] [def c] [operator =] [variable-2 Dictionary][operator <][variable-2 String][punctuation ,][variable-2 Character][operator >]", + "[keyword var] [def d][punctuation :] [variable-2 Int64][operator ?] [operator =] [variable-2 Optional][punctuation (][number 8][punctuation )]", + "[keyword func] [def e][punctuation ()] [operator ->] [variable-2 Void] [punctuation {]", + " [keyword var] [def e1][punctuation :] [variable-2 Float] [operator =] [number 1.2]", + "[punctuation }]", + "[keyword func] [def f][punctuation ()] [operator ->] [variable-2 Never] [punctuation {]", + " [keyword var] [def f1][punctuation :] [variable-2 Double] [operator =] [number 2.4]", + "[punctuation }]"); + + // Operators. + MT("operators", + "[keyword var] [def a] [operator =] [number 1] [operator +] [number 2]", + "[keyword var] [def b] [operator =] [number 1] [operator -] [number 2]", + "[keyword var] [def c] [operator =] [number 1] [operator *] [number 2]", + "[keyword var] [def d] [operator =] [number 1] [operator /] [number 2]", + "[keyword var] [def e] [operator =] [number 1] [operator %] [number 2]", + "[keyword var] [def f] [operator =] [number 1] [operator |] [number 2]", + "[keyword var] [def g] [operator =] [number 1] [operator &] [number 2]", + "[keyword var] [def h] [operator =] [number 1] [operator <<] [number 2]", + "[keyword var] [def i] [operator =] [number 1] [operator >>] [number 2]", + "[keyword var] [def j] [operator =] [number 1] [operator ^] [number 2]", + "[keyword var] [def k] [operator =] [operator ~][number 1]", + "[keyword var] [def l] [operator =] [variable foo] [operator ?] [number 1] [punctuation :] [number 2]", + "[keyword var] [def m][punctuation :] [variable-2 Int] [operator =] [variable-2 Optional][punctuation (][number 8][punctuation )][operator !]"); + + // Punctuation. + MT("punctuation", + "[keyword let] [def a] [operator =] [number 1][punctuation ;] [keyword let] [def b] [operator =] [number 2]", + "[keyword let] [def testArr][punctuation :] [punctuation [[][variable-2 Int][punctuation ]]] [operator =] [punctuation [[][variable a][punctuation ,] [variable b][punctuation ]]]", + "[keyword for] [def i] [keyword in] [number 0][punctuation ..][operator <][variable testArr][property .count] [punctuation {]", + " [variable print][punctuation (][variable testArr][punctuation [[][variable i][punctuation ]])]", + "[punctuation }]"); + + // Identifiers. + MT("identifiers", + "[keyword let] [def abc] [operator =] [number 1]", + "[keyword let] [def ABC] [operator =] [number 2]", + "[keyword let] [def _123] [operator =] [number 3]", + "[keyword let] [def _$1$2$3] [operator =] [number 4]", + "[keyword let] [def A1$_c32_$_] [operator =] [number 5]", + "[keyword let] [def `var`] [operator =] [punctuation [[][number 1][punctuation ,] [number 2][punctuation ,] [number 3][punctuation ]]]", + "[keyword let] [def square$] [operator =] [variable `var`][property .map] [punctuation {][variable $0] [operator *] [variable $0][punctuation }]", + "$$ [number 1][variable a] $[atom _] [variable _$] [variable __] `[variable a] [variable b]`"); + + // Properties. + MT("properties", + "[variable print][punctuation (][variable foo][property .abc][punctuation )]", + "[variable print][punctuation (][variable foo][property .ABC][punctuation )]", + "[variable print][punctuation (][variable foo][property ._123][punctuation )]", + "[variable print][punctuation (][variable foo][property ._$1$2$3][punctuation )]", + "[variable print][punctuation (][variable foo][property .A1$_c32_$_][punctuation )]", + "[variable print][punctuation (][variable foo][property .`var`][punctuation )]", + "[variable print][punctuation (][variable foo][property .__][punctuation )]"); + + // Instructions or other things that start with #. + MT("instructions", + "[keyword if] [builtin #available][punctuation (][variable iOS] [number 9][punctuation ,] [operator *][punctuation )] [punctuation {}]", + "[variable print][punctuation (][builtin #file][punctuation ,] [builtin #function][punctuation )]", + "[variable print][punctuation (][builtin #line][punctuation ,] [builtin #column][punctuation )]", + "[builtin #if] [atom true]", + "[keyword import] [def A]", + "[builtin #elseif] [atom false]", + "[keyword import] [def B]", + "[builtin #endif]", + "[builtin #sourceLocation][punctuation (][variable file][punctuation :] [string \"file.swift\"][punctuation ,] [variable line][punctuation :] [number 2][punctuation )]"); + + // Attributes; things that start with @. + MT("attributes", + "[attribute @objc][punctuation (][variable objcFoo][punctuation :)]", + "[attribute @available][punctuation (][variable iOS][punctuation )]"); + + // Property/number edge case. + MT("property_number", + "[variable print][punctuation (][variable foo][property ._123][punctuation )]", + "[variable print][punctuation (]") + + MT("nested_comments", + "[comment /*]", + "[comment But wait /* this is a nested comment */ for real]", + "[comment /**** let * me * show * you ****/]", + "[comment ///// let / me / show / you /////]", + "[comment */]"); + + // TODO: correctly identify when multiple variables are being declared + // by use of a comma-separated list. + // TODO: correctly identify when variables are being declared in a tuple. + // TODO: identify protocols as types when used before an extension? +})(); diff --git a/js/codemirror/mode/tcl/index.html b/js/codemirror/mode/tcl/index.html new file mode 100644 index 0000000..87bc109 --- /dev/null +++ b/js/codemirror/mode/tcl/index.html @@ -0,0 +1,142 @@ + + +CodeMirror: Tcl mode + + + + + + + + + + +
+

Tcl mode

+
+ + +

MIME types defined: text/x-tcl.

+ +
diff --git a/js/codemirror/mode/tcl/tcl.js b/js/codemirror/mode/tcl/tcl.js new file mode 100644 index 0000000..fd0c517 --- /dev/null +++ b/js/codemirror/mode/tcl/tcl.js @@ -0,0 +1,140 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +//tcl mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("tcl", function() { + function parseWords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var keywords = parseWords("Tcl safe after append array auto_execok auto_import auto_load " + + "auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror " + + "binary break catch cd close concat continue dde eof encoding error " + + "eval exec exit expr fblocked fconfigure fcopy file fileevent filename " + + "filename flush for foreach format gets glob global history http if " + + "incr info interp join lappend lindex linsert list llength load lrange " + + "lreplace lsearch lset lsort memory msgcat namespace open package parray " + + "pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp " + + "registry regsub rename resource return scan seek set socket source split " + + "string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord " + + "tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest " + + "tclvars tell time trace unknown unset update uplevel upvar variable " + + "vwait"); + var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch"); + var isOperatorChar = /[+\-*&%=<>!?^\/\|]/; + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + function tokenBase(stream, state) { + var beforeParams = state.beforeParams; + state.beforeParams = false; + var ch = stream.next(); + if ((ch == '"' || ch == "'") && state.inParams) { + return chain(stream, state, tokenString(ch)); + } else if (/[\[\]{}\(\),;\.]/.test(ch)) { + if (ch == "(" && beforeParams) state.inParams = true; + else if (ch == ")") state.inParams = false; + return null; + } else if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } else if (ch == "#") { + if (stream.eat("*")) + return chain(stream, state, tokenComment); + if (ch == "#" && stream.match(/ *\[ *\[/)) + return chain(stream, state, tokenUnparsed); + stream.skipToEnd(); + return "comment"; + } else if (ch == '"') { + stream.skipTo(/"/); + return "comment"; + } else if (ch == "$") { + stream.eatWhile(/[$_a-z0-9A-Z\.{:]/); + stream.eatWhile(/}/); + state.beforeParams = true; + return "builtin"; + } else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "comment"; + } else { + stream.eatWhile(/[\w\$_{}\xa1-\uffff]/); + var word = stream.current().toLowerCase(); + if (keywords && keywords.propertyIsEnumerable(word)) + return "keyword"; + if (functions && functions.propertyIsEnumerable(word)) { + state.beforeParams = true; + return "keyword"; + } + return null; + } + } + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end) state.tokenize = tokenBase; + return "string"; + }; + } + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + function tokenUnparsed(stream, state) { + var maybeEnd = 0, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd == 2) { + state.tokenize = tokenBase; + break; + } + if (ch == "]") + maybeEnd++; + else if (ch != " ") + maybeEnd = 0; + } + return "meta"; + } + return { + startState: function() { + return { + tokenize: tokenBase, + beforeParams: false, + inParams: false + }; + }, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + lineComment: "#" + }; +}); +CodeMirror.defineMIME("text/x-tcl", "tcl"); + +}); diff --git a/js/codemirror/mode/textile/index.html b/js/codemirror/mode/textile/index.html new file mode 100644 index 0000000..7acffba --- /dev/null +++ b/js/codemirror/mode/textile/index.html @@ -0,0 +1,191 @@ + + +CodeMirror: Textile mode + + + + + + + + + +
+

Textile mode

+
+ + +

MIME types defined: text/x-textile.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/js/codemirror/mode/textile/test.js b/js/codemirror/mode/textile/test.js new file mode 100644 index 0000000..c66dc29 --- /dev/null +++ b/js/codemirror/mode/textile/test.js @@ -0,0 +1,417 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, 'textile'); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT('simpleParagraphs', + 'Some text.', + '', + 'Some more text.'); + + /* + * Phrase Modifiers + */ + + MT('em', + 'foo [em _bar_]'); + + MT('emBoogus', + 'code_mirror'); + + MT('strong', + 'foo [strong *bar*]'); + + MT('strongBogus', + '3 * 3 = 9'); + + MT('italic', + 'foo [em __bar__]'); + + MT('italicBogus', + 'code__mirror'); + + MT('bold', + 'foo [strong **bar**]'); + + MT('boldBogus', + '3 ** 3 = 27'); + + MT('simpleLink', + '[link "CodeMirror":https://codemirror.net]'); + + MT('referenceLink', + '[link "CodeMirror":code_mirror]', + 'Normal Text.', + '[link [[code_mirror]]https://codemirror.net]'); + + MT('footCite', + 'foo bar[qualifier [[1]]]'); + + MT('footCiteBogus', + 'foo bar[[1a2]]'); + + MT('special-characters', + 'Registered [tag (r)], ' + + 'Trademark [tag (tm)], and ' + + 'Copyright [tag (c)] 2008'); + + MT('cite', + "A book is [keyword ??The Count of Monte Cristo??] by Dumas."); + + MT('additionAndDeletion', + 'The news networks declared [negative -Al Gore-] ' + + '[positive +George W. Bush+] the winner in Florida.'); + + MT('subAndSup', + 'f(x, n) = log [builtin ~4~] x [builtin ^n^]'); + + MT('spanAndCode', + 'A [quote %span element%] and [atom @code element@]'); + + MT('spanBogus', + 'Percentage 25% is not a span.'); + + MT('citeBogus', + 'Question? is not a citation.'); + + MT('codeBogus', + 'user@example.com'); + + MT('subBogus', + '~username'); + + MT('supBogus', + 'foo ^ bar'); + + MT('deletionBogus', + '3 - 3 = 0'); + + MT('additionBogus', + '3 + 3 = 6'); + + MT('image', + 'An image: [string !http://www.example.com/image.png!]'); + + MT('imageWithAltText', + 'An image: [string !http://www.example.com/image.png (Alt Text)!]'); + + MT('imageWithUrl', + 'An image: [string !http://www.example.com/image.png!:http://www.example.com/]'); + + /* + * Headers + */ + + MT('h1', + '[header&header-1 h1. foo]'); + + MT('h2', + '[header&header-2 h2. foo]'); + + MT('h3', + '[header&header-3 h3. foo]'); + + MT('h4', + '[header&header-4 h4. foo]'); + + MT('h5', + '[header&header-5 h5. foo]'); + + MT('h6', + '[header&header-6 h6. foo]'); + + MT('h7Bogus', + 'h7. foo'); + + MT('multipleHeaders', + '[header&header-1 h1. Heading 1]', + '', + 'Some text.', + '', + '[header&header-2 h2. Heading 2]', + '', + 'More text.'); + + MT('h1inline', + '[header&header-1 h1. foo ][header&header-1&em _bar_][header&header-1 baz]'); + + /* + * Lists + */ + + MT('ul', + 'foo', + 'bar', + '', + '[variable-2 * foo]', + '[variable-2 * bar]'); + + MT('ulNoBlank', + 'foo', + 'bar', + '[variable-2 * foo]', + '[variable-2 * bar]'); + + MT('ol', + 'foo', + 'bar', + '', + '[variable-2 # foo]', + '[variable-2 # bar]'); + + MT('olNoBlank', + 'foo', + 'bar', + '[variable-2 # foo]', + '[variable-2 # bar]'); + + MT('ulFormatting', + '[variable-2 * ][variable-2&em _foo_][variable-2 bar]', + '[variable-2 * ][variable-2&strong *][variable-2&em&strong _foo_]' + + '[variable-2&strong *][variable-2 bar]', + '[variable-2 * ][variable-2&strong *foo*][variable-2 bar]'); + + MT('olFormatting', + '[variable-2 # ][variable-2&em _foo_][variable-2 bar]', + '[variable-2 # ][variable-2&strong *][variable-2&em&strong _foo_]' + + '[variable-2&strong *][variable-2 bar]', + '[variable-2 # ][variable-2&strong *foo*][variable-2 bar]'); + + MT('ulNested', + '[variable-2 * foo]', + '[variable-3 ** bar]', + '[keyword *** bar]', + '[variable-2 **** bar]', + '[variable-3 ** bar]'); + + MT('olNested', + '[variable-2 # foo]', + '[variable-3 ## bar]', + '[keyword ### bar]', + '[variable-2 #### bar]', + '[variable-3 ## bar]'); + + MT('ulNestedWithOl', + '[variable-2 * foo]', + '[variable-3 ## bar]', + '[keyword *** bar]', + '[variable-2 #### bar]', + '[variable-3 ** bar]'); + + MT('olNestedWithUl', + '[variable-2 # foo]', + '[variable-3 ** bar]', + '[keyword ### bar]', + '[variable-2 **** bar]', + '[variable-3 ## bar]'); + + MT('definitionList', + '[number - coffee := Hot ][number&em _and_][number black]', + '', + 'Normal text.'); + + MT('definitionListSpan', + '[number - coffee :=]', + '', + '[number Hot ][number&em _and_][number black =:]', + '', + 'Normal text.'); + + MT('boo', + '[number - dog := woof woof]', + '[number - cat := meow meow]', + '[number - whale :=]', + '[number Whale noises.]', + '', + '[number Also, ][number&em _splashing_][number . =:]'); + + /* + * Attributes + */ + + MT('divWithAttribute', + '[punctuation div][punctuation&attribute (#my-id)][punctuation . foo bar]'); + + MT('divWithAttributeAnd2emRightPadding', + '[punctuation div][punctuation&attribute (#my-id)((][punctuation . foo bar]'); + + MT('divWithClassAndId', + '[punctuation div][punctuation&attribute (my-class#my-id)][punctuation . foo bar]'); + + MT('paragraphWithCss', + 'p[attribute {color:red;}]. foo bar'); + + MT('paragraphNestedStyles', + 'p. [strong *foo ][strong&em _bar_][strong *]'); + + MT('paragraphWithLanguage', + 'p[attribute [[fr]]]. Parlez-vous français?'); + + MT('paragraphLeftAlign', + 'p[attribute <]. Left'); + + MT('paragraphRightAlign', + 'p[attribute >]. Right'); + + MT('paragraphRightAlign', + 'p[attribute =]. Center'); + + MT('paragraphJustified', + 'p[attribute <>]. Justified'); + + MT('paragraphWithLeftIndent1em', + 'p[attribute (]. Left'); + + MT('paragraphWithRightIndent1em', + 'p[attribute )]. Right'); + + MT('paragraphWithLeftIndent2em', + 'p[attribute ((]. Left'); + + MT('paragraphWithRightIndent2em', + 'p[attribute ))]. Right'); + + MT('paragraphWithLeftIndent3emRightIndent2em', + 'p[attribute ((())]. Right'); + + MT('divFormatting', + '[punctuation div. ][punctuation&strong *foo ]' + + '[punctuation&strong&em _bar_][punctuation&strong *]'); + + MT('phraseModifierAttributes', + 'p[attribute (my-class)]. This is a paragraph that has a class and' + + ' this [em _][em&attribute (#special-phrase)][em emphasized phrase_]' + + ' has an id.'); + + MT('linkWithClass', + '[link "(my-class). This is a link with class":http://redcloth.org]'); + + /* + * Layouts + */ + + MT('paragraphLayouts', + 'p. This is one paragraph.', + '', + 'p. This is another.'); + + MT('div', + '[punctuation div. foo bar]'); + + MT('pre', + '[operator pre. Text]'); + + MT('bq.', + '[bracket bq. foo bar]', + '', + 'Normal text.'); + + MT('footnote', + '[variable fn123. foo ][variable&strong *bar*]'); + + /* + * Spanning Layouts + */ + + MT('bq..ThenParagraph', + '[bracket bq.. foo bar]', + '', + '[bracket More quote.]', + 'p. Normal Text'); + + MT('bq..ThenH1', + '[bracket bq.. foo bar]', + '', + '[bracket More quote.]', + '[header&header-1 h1. Header Text]'); + + MT('bc..ThenParagraph', + '[atom bc.. # Some ruby code]', + '[atom obj = {foo: :bar}]', + '[atom puts obj]', + '', + '[atom obj[[:love]] = "*love*"]', + '[atom puts obj.love.upcase]', + '', + 'p. Normal text.'); + + MT('fn1..ThenParagraph', + '[variable fn1.. foo bar]', + '', + '[variable More.]', + 'p. Normal Text'); + + MT('pre..ThenParagraph', + '[operator pre.. foo bar]', + '', + '[operator More.]', + 'p. Normal Text'); + + /* + * Tables + */ + + MT('table', + '[variable-3&operator |_. name |_. age|]', + '[variable-3 |][variable-3&strong *Walter*][variable-3 | 5 |]', + '[variable-3 |Florence| 6 |]', + '', + 'p. Normal text.'); + + MT('tableWithAttributes', + '[variable-3&operator |_. name |_. age|]', + '[variable-3 |][variable-3&attribute /2.][variable-3 Jim |]', + '[variable-3 |][variable-3&attribute \\2{color: red}.][variable-3 Sam |]'); + + /* + * HTML + */ + + MT('html', + '[comment
]', + '[comment
]', + '', + '[header&header-1 h1. Welcome]', + '', + '[variable-2 * Item one]', + '[variable-2 * Item two]', + '', + '[comment Example]', + '', + '[comment
]', + '[comment
]'); + + MT('inlineHtml', + 'I can use HTML directly in my [comment Textile].'); + + /* + * No-Textile + */ + + MT('notextile', + '[string-2 notextile. *No* formatting]'); + + MT('notextileInline', + 'Use [string-2 ==*asterisks*==] for [strong *strong*] text.'); + + MT('notextileWithPre', + '[operator pre. *No* formatting]'); + + MT('notextileWithSpanningPre', + '[operator pre.. *No* formatting]', + '', + '[operator *No* formatting]'); + + /* Only toggling phrases between non-word chars. */ + + MT('phrase-in-word', + 'foo_bar_baz'); + + MT('phrase-non-word', + '[negative -x-] aaa-bbb ccc-ddd [negative -eee-] fff [negative -ggg-]'); + + MT('phrase-lone-dash', + 'foo - bar - baz'); +})(); diff --git a/js/codemirror/mode/textile/textile.js b/js/codemirror/mode/textile/textile.js new file mode 100644 index 0000000..db01fcf --- /dev/null +++ b/js/codemirror/mode/textile/textile.js @@ -0,0 +1,469 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") { // CommonJS + mod(require("../../lib/codemirror")); + } else if (typeof define == "function" && define.amd) { // AMD + define(["../../lib/codemirror"], mod); + } else { // Plain browser env + mod(CodeMirror); + } +})(function(CodeMirror) { + "use strict"; + + var TOKEN_STYLES = { + addition: "positive", + attributes: "attribute", + bold: "strong", + cite: "keyword", + code: "atom", + definitionList: "number", + deletion: "negative", + div: "punctuation", + em: "em", + footnote: "variable", + footCite: "qualifier", + header: "header", + html: "comment", + image: "string", + italic: "em", + link: "link", + linkDefinition: "link", + list1: "variable-2", + list2: "variable-3", + list3: "keyword", + notextile: "string-2", + pre: "operator", + p: "property", + quote: "bracket", + span: "quote", + specialChar: "tag", + strong: "strong", + sub: "builtin", + sup: "builtin", + table: "variable-3", + tableHeading: "operator" + }; + + function startNewLine(stream, state) { + state.mode = Modes.newLayout; + state.tableHeading = false; + + if (state.layoutType === "definitionList" && state.spanningLayout && + stream.match(RE("definitionListEnd"), false)) + state.spanningLayout = false; + } + + function handlePhraseModifier(stream, state, ch) { + if (ch === "_") { + if (stream.eat("_")) + return togglePhraseModifier(stream, state, "italic", /__/, 2); + else + return togglePhraseModifier(stream, state, "em", /_/, 1); + } + + if (ch === "*") { + if (stream.eat("*")) { + return togglePhraseModifier(stream, state, "bold", /\*\*/, 2); + } + return togglePhraseModifier(stream, state, "strong", /\*/, 1); + } + + if (ch === "[") { + if (stream.match(/\d+\]/)) state.footCite = true; + return tokenStyles(state); + } + + if (ch === "(") { + var spec = stream.match(/^(r|tm|c)\)/); + if (spec) + return tokenStylesWith(state, TOKEN_STYLES.specialChar); + } + + if (ch === "<" && stream.match(/(\w+)[^>]+>[^<]+<\/\1>/)) + return tokenStylesWith(state, TOKEN_STYLES.html); + + if (ch === "?" && stream.eat("?")) + return togglePhraseModifier(stream, state, "cite", /\?\?/, 2); + + if (ch === "=" && stream.eat("=")) + return togglePhraseModifier(stream, state, "notextile", /==/, 2); + + if (ch === "-" && !stream.eat("-")) + return togglePhraseModifier(stream, state, "deletion", /-/, 1); + + if (ch === "+") + return togglePhraseModifier(stream, state, "addition", /\+/, 1); + + if (ch === "~") + return togglePhraseModifier(stream, state, "sub", /~/, 1); + + if (ch === "^") + return togglePhraseModifier(stream, state, "sup", /\^/, 1); + + if (ch === "%") + return togglePhraseModifier(stream, state, "span", /%/, 1); + + if (ch === "@") + return togglePhraseModifier(stream, state, "code", /@/, 1); + + if (ch === "!") { + var type = togglePhraseModifier(stream, state, "image", /(?:\([^\)]+\))?!/, 1); + stream.match(/^:\S+/); // optional Url portion + return type; + } + return tokenStyles(state); + } + + function togglePhraseModifier(stream, state, phraseModifier, closeRE, openSize) { + var charBefore = stream.pos > openSize ? stream.string.charAt(stream.pos - openSize - 1) : null; + var charAfter = stream.peek(); + if (state[phraseModifier]) { + if ((!charAfter || /\W/.test(charAfter)) && charBefore && /\S/.test(charBefore)) { + var type = tokenStyles(state); + state[phraseModifier] = false; + return type; + } + } else if ((!charBefore || /\W/.test(charBefore)) && charAfter && /\S/.test(charAfter) && + stream.match(new RegExp("^.*\\S" + closeRE.source + "(?:\\W|$)"), false)) { + state[phraseModifier] = true; + state.mode = Modes.attributes; + } + return tokenStyles(state); + }; + + function tokenStyles(state) { + var disabled = textileDisabled(state); + if (disabled) return disabled; + + var styles = []; + if (state.layoutType) styles.push(TOKEN_STYLES[state.layoutType]); + + styles = styles.concat(activeStyles( + state, "addition", "bold", "cite", "code", "deletion", "em", "footCite", + "image", "italic", "link", "span", "strong", "sub", "sup", "table", "tableHeading")); + + if (state.layoutType === "header") + styles.push(TOKEN_STYLES.header + "-" + state.header); + + return styles.length ? styles.join(" ") : null; + } + + function textileDisabled(state) { + var type = state.layoutType; + + switch(type) { + case "notextile": + case "code": + case "pre": + return TOKEN_STYLES[type]; + default: + if (state.notextile) + return TOKEN_STYLES.notextile + (type ? (" " + TOKEN_STYLES[type]) : ""); + return null; + } + } + + function tokenStylesWith(state, extraStyles) { + var disabled = textileDisabled(state); + if (disabled) return disabled; + + var type = tokenStyles(state); + if (extraStyles) + return type ? (type + " " + extraStyles) : extraStyles; + else + return type; + } + + function activeStyles(state) { + var styles = []; + for (var i = 1; i < arguments.length; ++i) { + if (state[arguments[i]]) + styles.push(TOKEN_STYLES[arguments[i]]); + } + return styles; + } + + function blankLine(state) { + var spanningLayout = state.spanningLayout, type = state.layoutType; + + for (var key in state) if (state.hasOwnProperty(key)) + delete state[key]; + + state.mode = Modes.newLayout; + if (spanningLayout) { + state.layoutType = type; + state.spanningLayout = true; + } + } + + var REs = { + cache: {}, + single: { + bc: "bc", + bq: "bq", + definitionList: /- .*?:=+/, + definitionListEnd: /.*=:\s*$/, + div: "div", + drawTable: /\|.*\|/, + foot: /fn\d+/, + header: /h[1-6]/, + html: /\s*<(?:\/)?(\w+)(?:[^>]+)?>(?:[^<]+<\/\1>)?/, + link: /[^"]+":\S/, + linkDefinition: /\[[^\s\]]+\]\S+/, + list: /(?:#+|\*+)/, + notextile: "notextile", + para: "p", + pre: "pre", + table: "table", + tableCellAttributes: /[\/\\]\d+/, + tableHeading: /\|_\./, + tableText: /[^"_\*\[\(\?\+~\^%@|-]+/, + text: /[^!"_=\*\[\(<\?\+~\^%@-]+/ + }, + attributes: { + align: /(?:<>|<|>|=)/, + selector: /\([^\(][^\)]+\)/, + lang: /\[[^\[\]]+\]/, + pad: /(?:\(+|\)+){1,2}/, + css: /\{[^\}]+\}/ + }, + createRe: function(name) { + switch (name) { + case "drawTable": + return REs.makeRe("^", REs.single.drawTable, "$"); + case "html": + return REs.makeRe("^", REs.single.html, "(?:", REs.single.html, ")*", "$"); + case "linkDefinition": + return REs.makeRe("^", REs.single.linkDefinition, "$"); + case "listLayout": + return REs.makeRe("^", REs.single.list, RE("allAttributes"), "*\\s+"); + case "tableCellAttributes": + return REs.makeRe("^", REs.choiceRe(REs.single.tableCellAttributes, + RE("allAttributes")), "+\\."); + case "type": + return REs.makeRe("^", RE("allTypes")); + case "typeLayout": + return REs.makeRe("^", RE("allTypes"), RE("allAttributes"), + "*\\.\\.?", "(\\s+|$)"); + case "attributes": + return REs.makeRe("^", RE("allAttributes"), "+"); + + case "allTypes": + return REs.choiceRe(REs.single.div, REs.single.foot, + REs.single.header, REs.single.bc, REs.single.bq, + REs.single.notextile, REs.single.pre, REs.single.table, + REs.single.para); + + case "allAttributes": + return REs.choiceRe(REs.attributes.selector, REs.attributes.css, + REs.attributes.lang, REs.attributes.align, REs.attributes.pad); + + default: + return REs.makeRe("^", REs.single[name]); + } + }, + makeRe: function() { + var pattern = ""; + for (var i = 0; i < arguments.length; ++i) { + var arg = arguments[i]; + pattern += (typeof arg === "string") ? arg : arg.source; + } + return new RegExp(pattern); + }, + choiceRe: function() { + var parts = [arguments[0]]; + for (var i = 1; i < arguments.length; ++i) { + parts[i * 2 - 1] = "|"; + parts[i * 2] = arguments[i]; + } + + parts.unshift("(?:"); + parts.push(")"); + return REs.makeRe.apply(null, parts); + } + }; + + function RE(name) { + return (REs.cache[name] || (REs.cache[name] = REs.createRe(name))); + } + + var Modes = { + newLayout: function(stream, state) { + if (stream.match(RE("typeLayout"), false)) { + state.spanningLayout = false; + return (state.mode = Modes.blockType)(stream, state); + } + var newMode; + if (!textileDisabled(state)) { + if (stream.match(RE("listLayout"), false)) + newMode = Modes.list; + else if (stream.match(RE("drawTable"), false)) + newMode = Modes.table; + else if (stream.match(RE("linkDefinition"), false)) + newMode = Modes.linkDefinition; + else if (stream.match(RE("definitionList"))) + newMode = Modes.definitionList; + else if (stream.match(RE("html"), false)) + newMode = Modes.html; + } + return (state.mode = (newMode || Modes.text))(stream, state); + }, + + blockType: function(stream, state) { + var match, type; + state.layoutType = null; + + if (match = stream.match(RE("type"))) + type = match[0]; + else + return (state.mode = Modes.text)(stream, state); + + if (match = type.match(RE("header"))) { + state.layoutType = "header"; + state.header = parseInt(match[0][1]); + } else if (type.match(RE("bq"))) { + state.layoutType = "quote"; + } else if (type.match(RE("bc"))) { + state.layoutType = "code"; + } else if (type.match(RE("foot"))) { + state.layoutType = "footnote"; + } else if (type.match(RE("notextile"))) { + state.layoutType = "notextile"; + } else if (type.match(RE("pre"))) { + state.layoutType = "pre"; + } else if (type.match(RE("div"))) { + state.layoutType = "div"; + } else if (type.match(RE("table"))) { + state.layoutType = "table"; + } + + state.mode = Modes.attributes; + return tokenStyles(state); + }, + + text: function(stream, state) { + if (stream.match(RE("text"))) return tokenStyles(state); + + var ch = stream.next(); + if (ch === '"') + return (state.mode = Modes.link)(stream, state); + return handlePhraseModifier(stream, state, ch); + }, + + attributes: function(stream, state) { + state.mode = Modes.layoutLength; + + if (stream.match(RE("attributes"))) + return tokenStylesWith(state, TOKEN_STYLES.attributes); + else + return tokenStyles(state); + }, + + layoutLength: function(stream, state) { + if (stream.eat(".") && stream.eat(".")) + state.spanningLayout = true; + + state.mode = Modes.text; + return tokenStyles(state); + }, + + list: function(stream, state) { + var match = stream.match(RE("list")); + state.listDepth = match[0].length; + var listMod = (state.listDepth - 1) % 3; + if (!listMod) + state.layoutType = "list1"; + else if (listMod === 1) + state.layoutType = "list2"; + else + state.layoutType = "list3"; + + state.mode = Modes.attributes; + return tokenStyles(state); + }, + + link: function(stream, state) { + state.mode = Modes.text; + if (stream.match(RE("link"))) { + stream.match(/\S+/); + return tokenStylesWith(state, TOKEN_STYLES.link); + } + return tokenStyles(state); + }, + + linkDefinition: function(stream, state) { + stream.skipToEnd(); + return tokenStylesWith(state, TOKEN_STYLES.linkDefinition); + }, + + definitionList: function(stream, state) { + stream.match(RE("definitionList")); + + state.layoutType = "definitionList"; + + if (stream.match(/\s*$/)) + state.spanningLayout = true; + else + state.mode = Modes.attributes; + + return tokenStyles(state); + }, + + html: function(stream, state) { + stream.skipToEnd(); + return tokenStylesWith(state, TOKEN_STYLES.html); + }, + + table: function(stream, state) { + state.layoutType = "table"; + return (state.mode = Modes.tableCell)(stream, state); + }, + + tableCell: function(stream, state) { + if (stream.match(RE("tableHeading"))) + state.tableHeading = true; + else + stream.eat("|"); + + state.mode = Modes.tableCellAttributes; + return tokenStyles(state); + }, + + tableCellAttributes: function(stream, state) { + state.mode = Modes.tableText; + + if (stream.match(RE("tableCellAttributes"))) + return tokenStylesWith(state, TOKEN_STYLES.attributes); + else + return tokenStyles(state); + }, + + tableText: function(stream, state) { + if (stream.match(RE("tableText"))) + return tokenStyles(state); + + if (stream.peek() === "|") { // end of cell + state.mode = Modes.tableCell; + return tokenStyles(state); + } + return handlePhraseModifier(stream, state, stream.next()); + } + }; + + CodeMirror.defineMode("textile", function() { + return { + startState: function() { + return { mode: Modes.newLayout }; + }, + token: function(stream, state) { + if (stream.sol()) startNewLine(stream, state); + return state.mode(stream, state); + }, + blankLine: blankLine + }; + }); + + CodeMirror.defineMIME("text/x-textile", "textile"); +}); diff --git a/js/codemirror/mode/tiddlywiki/index.html b/js/codemirror/mode/tiddlywiki/index.html new file mode 100644 index 0000000..8654995 --- /dev/null +++ b/js/codemirror/mode/tiddlywiki/index.html @@ -0,0 +1,154 @@ + + +CodeMirror: TiddlyWiki mode + + + + + + + + + + + +
+

TiddlyWiki mode

+ + +
+ + + +

TiddlyWiki mode supports a single configuration.

+ +

MIME types defined: text/x-tiddlywiki.

+
diff --git a/js/codemirror/mode/tiddlywiki/tiddlywiki.css b/js/codemirror/mode/tiddlywiki/tiddlywiki.css new file mode 100644 index 0000000..9a69b63 --- /dev/null +++ b/js/codemirror/mode/tiddlywiki/tiddlywiki.css @@ -0,0 +1,14 @@ +span.cm-underlined { + text-decoration: underline; +} +span.cm-strikethrough { + text-decoration: line-through; +} +span.cm-brace { + color: #170; + font-weight: bold; +} +span.cm-table { + color: blue; + font-weight: bold; +} diff --git a/js/codemirror/mode/tiddlywiki/tiddlywiki.js b/js/codemirror/mode/tiddlywiki/tiddlywiki.js new file mode 100644 index 0000000..b96316d --- /dev/null +++ b/js/codemirror/mode/tiddlywiki/tiddlywiki.js @@ -0,0 +1,308 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/*** + |''Name''|tiddlywiki.js| + |''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror| + |''Author''|PMario| + |''Version''|0.1.7| + |''Status''|''stable''| + |''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]| + |''Documentation''|https://codemirror.tiddlyspace.com/| + |''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]| + |''CoreVersion''|2.5.0| + |''Requires''|codemirror.js| + |''Keywords''|syntax highlighting color code mirror codemirror| + ! Info + CoreVersion parameter is needed for TiddlyWiki only! +***/ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("tiddlywiki", function () { + // Tokenizer + var textwords = {}; + + var keywords = { + "allTags": true, "closeAll": true, "list": true, + "newJournal": true, "newTiddler": true, + "permaview": true, "saveChanges": true, + "search": true, "slider": true, "tabs": true, + "tag": true, "tagging": true, "tags": true, + "tiddler": true, "timeline": true, + "today": true, "version": true, "option": true, + "with": true, "filter": true + }; + + var isSpaceName = /[\w_\-]/i, + reHR = /^\-\-\-\-+$/, //
+ reWikiCommentStart = /^\/\*\*\*$/, // /*** + reWikiCommentStop = /^\*\*\*\/$/, // ***/ + reBlockQuote = /^<<<$/, + + reJsCodeStart = /^\/\/\{\{\{$/, // //{{{ js block start + reJsCodeStop = /^\/\/\}\}\}$/, // //}}} js stop + reXmlCodeStart = /^$/, // xml block start + reXmlCodeStop = /^$/, // xml stop + + reCodeBlockStart = /^\{\{\{$/, // {{{ TW text div block start + reCodeBlockStop = /^\}\}\}$/, // }}} TW text stop + + reUntilCodeStop = /.*?\}\}\}/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + function tokenBase(stream, state) { + var sol = stream.sol(), ch = stream.peek(); + + state.block = false; // indicates the start of a code block. + + // check start of blocks + if (sol && /[<\/\*{}\-]/.test(ch)) { + if (stream.match(reCodeBlockStart)) { + state.block = true; + return chain(stream, state, twTokenCode); + } + if (stream.match(reBlockQuote)) + return 'quote'; + if (stream.match(reWikiCommentStart) || stream.match(reWikiCommentStop)) + return 'comment'; + if (stream.match(reJsCodeStart) || stream.match(reJsCodeStop) || stream.match(reXmlCodeStart) || stream.match(reXmlCodeStop)) + return 'comment'; + if (stream.match(reHR)) + return 'hr'; + } + + stream.next(); + if (sol && /[\/\*!#;:>|]/.test(ch)) { + if (ch == "!") { // tw header + stream.skipToEnd(); + return "header"; + } + if (ch == "*") { // tw list + stream.eatWhile('*'); + return "comment"; + } + if (ch == "#") { // tw numbered list + stream.eatWhile('#'); + return "comment"; + } + if (ch == ";") { // definition list, term + stream.eatWhile(';'); + return "comment"; + } + if (ch == ":") { // definition list, description + stream.eatWhile(':'); + return "comment"; + } + if (ch == ">") { // single line quote + stream.eatWhile(">"); + return "quote"; + } + if (ch == '|') + return 'header'; + } + + if (ch == '{' && stream.match('{{')) + return chain(stream, state, twTokenCode); + + // rudimentary html:// file:// link matching. TW knows much more ... + if (/[hf]/i.test(ch) && + /[ti]/i.test(stream.peek()) && + stream.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i)) + return "link"; + + // just a little string indicator, don't want to have the whole string covered + if (ch == '"') + return 'string'; + + if (ch == '~') // _no_ CamelCase indicator should be bold + return 'brace'; + + if (/[\[\]]/.test(ch) && stream.match(ch)) // check for [[..]] + return 'brace'; + + if (ch == "@") { // check for space link. TODO fix @@...@@ highlighting + stream.eatWhile(isSpaceName); + return "link"; + } + + if (/\d/.test(ch)) { // numbers + stream.eatWhile(/\d/); + return "number"; + } + + if (ch == "/") { // tw invisible comment + if (stream.eat("%")) { + return chain(stream, state, twTokenComment); + } else if (stream.eat("/")) { // + return chain(stream, state, twTokenEm); + } + } + + if (ch == "_" && stream.eat("_")) // tw underline + return chain(stream, state, twTokenUnderline); + + // strikethrough and mdash handling + if (ch == "-" && stream.eat("-")) { + // if strikethrough looks ugly, change CSS. + if (stream.peek() != ' ') + return chain(stream, state, twTokenStrike); + // mdash + if (stream.peek() == ' ') + return 'brace'; + } + + if (ch == "'" && stream.eat("'")) // tw bold + return chain(stream, state, twTokenStrong); + + if (ch == "<" && stream.eat("<")) // tw macro + return chain(stream, state, twTokenMacro); + + // core macro handling + stream.eatWhile(/[\w\$_]/); + return textwords.propertyIsEnumerable(stream.current()) ? "keyword" : null + } + + // tw invisible comment + function twTokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "%"); + } + return "comment"; + } + + // tw strong / bold + function twTokenStrong(stream, state) { + var maybeEnd = false, + ch; + while (ch = stream.next()) { + if (ch == "'" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "'"); + } + return "strong"; + } + + // tw code + function twTokenCode(stream, state) { + var sb = state.block; + + if (sb && stream.current()) { + return "comment"; + } + + if (!sb && stream.match(reUntilCodeStop)) { + state.tokenize = tokenBase; + return "comment"; + } + + if (sb && stream.sol() && stream.match(reCodeBlockStop)) { + state.tokenize = tokenBase; + return "comment"; + } + + stream.next(); + return "comment"; + } + + // tw em / italic + function twTokenEm(stream, state) { + var maybeEnd = false, + ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "/"); + } + return "em"; + } + + // tw underlined text + function twTokenUnderline(stream, state) { + var maybeEnd = false, + ch; + while (ch = stream.next()) { + if (ch == "_" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "_"); + } + return "underlined"; + } + + // tw strike through text looks ugly + // change CSS if needed + function twTokenStrike(stream, state) { + var maybeEnd = false, ch; + + while (ch = stream.next()) { + if (ch == "-" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "-"); + } + return "strikethrough"; + } + + // macro + function twTokenMacro(stream, state) { + if (stream.current() == '<<') { + return 'macro'; + } + + var ch = stream.next(); + if (!ch) { + state.tokenize = tokenBase; + return null; + } + if (ch == ">") { + if (stream.peek() == '>') { + stream.next(); + state.tokenize = tokenBase; + return "macro"; + } + } + + stream.eatWhile(/[\w\$_]/); + return keywords.propertyIsEnumerable(stream.current()) ? "keyword" : null + } + + // Interface + return { + startState: function () { + return {tokenize: tokenBase}; + }, + + token: function (stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + return style; + } + }; +}); + +CodeMirror.defineMIME("text/x-tiddlywiki", "tiddlywiki"); +}); diff --git a/js/codemirror/mode/tiki/index.html b/js/codemirror/mode/tiki/index.html new file mode 100644 index 0000000..afc2bb2 --- /dev/null +++ b/js/codemirror/mode/tiki/index.html @@ -0,0 +1,95 @@ + + +CodeMirror: Tiki wiki mode + + + + + + + + + + +
+

Tiki wiki mode

+ + +
+ + + +
diff --git a/js/codemirror/mode/tiki/tiki.css b/js/codemirror/mode/tiki/tiki.css new file mode 100644 index 0000000..1d8704c --- /dev/null +++ b/js/codemirror/mode/tiki/tiki.css @@ -0,0 +1,26 @@ +.cm-tw-syntaxerror { + color: #FFF; + background-color: #900; +} + +.cm-tw-deleted { + text-decoration: line-through; +} + +.cm-tw-header5 { + font-weight: bold; +} +.cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ + padding-left: 10px; +} + +.cm-tw-box { + border-top-width: 0px !important; + border-style: solid; + border-width: 1px; + border-color: inherit; +} + +.cm-tw-underline { + text-decoration: underline; +} \ No newline at end of file diff --git a/js/codemirror/mode/tiki/tiki.js b/js/codemirror/mode/tiki/tiki.js new file mode 100644 index 0000000..da25146 --- /dev/null +++ b/js/codemirror/mode/tiki/tiki.js @@ -0,0 +1,312 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('tiki', function(config) { + function inBlock(style, terminator, returnTokenizer) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + state.tokenize = inText; + break; + } + stream.next(); + } + + if (returnTokenizer) state.tokenize = returnTokenizer; + + return style; + }; + } + + function inLine(style) { + return function(stream, state) { + while(!stream.eol()) { + stream.next(); + } + state.tokenize = inText; + return style; + }; + } + + function inText(stream, state) { + function chain(parser) { + state.tokenize = parser; + return parser(stream, state); + } + + var sol = stream.sol(); + var ch = stream.next(); + + //non start of line + switch (ch) { //switch is generally much faster than if, so it is used here + case "{": //plugin + stream.eat("/"); + stream.eatSpace(); + stream.eatWhile(/[^\s\u00a0=\"\'\/?(}]/); + state.tokenize = inPlugin; + return "tag"; + case "_": //bold + if (stream.eat("_")) + return chain(inBlock("strong", "__", inText)); + break; + case "'": //italics + if (stream.eat("'")) + return chain(inBlock("em", "''", inText)); + break; + case "(":// Wiki Link + if (stream.eat("(")) + return chain(inBlock("variable-2", "))", inText)); + break; + case "[":// Weblink + return chain(inBlock("variable-3", "]", inText)); + break; + case "|": //table + if (stream.eat("|")) + return chain(inBlock("comment", "||")); + break; + case "-": + if (stream.eat("=")) {//titleBar + return chain(inBlock("header string", "=-", inText)); + } else if (stream.eat("-")) {//deleted + return chain(inBlock("error tw-deleted", "--", inText)); + } + break; + case "=": //underline + if (stream.match("==")) + return chain(inBlock("tw-underline", "===", inText)); + break; + case ":": + if (stream.eat(":")) + return chain(inBlock("comment", "::")); + break; + case "^": //box + return chain(inBlock("tw-box", "^")); + break; + case "~": //np + if (stream.match("np~")) + return chain(inBlock("meta", "~/np~")); + break; + } + + //start of line types + if (sol) { + switch (ch) { + case "!": //header at start of line + if (stream.match('!!!!!')) { + return chain(inLine("header string")); + } else if (stream.match('!!!!')) { + return chain(inLine("header string")); + } else if (stream.match('!!!')) { + return chain(inLine("header string")); + } else if (stream.match('!!')) { + return chain(inLine("header string")); + } else { + return chain(inLine("header string")); + } + break; + case "*": //unordered list line item, or
  • at start of line + case "#": //ordered list line item, or
  • at start of line + case "+": //ordered list line item, or
  • at start of line + return chain(inLine("tw-listitem bracket")); + break; + } + } + + //stream.eatWhile(/[&{]/); was eating up plugins, turned off to act less like html and more like tiki + return null; + } + + var indentUnit = config.indentUnit; + + // Return variables for tokenizers + var pluginName, type; + function inPlugin(stream, state) { + var ch = stream.next(); + var peek = stream.peek(); + + if (ch == "}") { + state.tokenize = inText; + //type = ch == ")" ? "endPlugin" : "selfclosePlugin"; inPlugin + return "tag"; + } else if (ch == "(" || ch == ")") { + return "bracket"; + } else if (ch == "=") { + type = "equals"; + + if (peek == ">") { + stream.next(); + peek = stream.peek(); + } + + //here we detect values directly after equal character with no quotes + if (!/[\'\"]/.test(peek)) { + state.tokenize = inAttributeNoQuote(); + } + //end detect values + + return "operator"; + } else if (/[\'\"]/.test(ch)) { + state.tokenize = inAttribute(ch); + return state.tokenize(stream, state); + } else { + stream.eatWhile(/[^\s\u00a0=\"\'\/?]/); + return "keyword"; + } + } + + function inAttribute(quote) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.next() == quote) { + state.tokenize = inPlugin; + break; + } + } + return "string"; + }; + } + + function inAttributeNoQuote() { + return function(stream, state) { + while (!stream.eol()) { + var ch = stream.next(); + var peek = stream.peek(); + if (ch == " " || ch == "," || /[ )}]/.test(peek)) { + state.tokenize = inPlugin; + break; + } + } + return "string"; +}; + } + +var curState, setStyle; +function pass() { + for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); +} + +function cont() { + pass.apply(null, arguments); + return true; +} + +function pushContext(pluginName, startOfLine) { + var noIndent = curState.context && curState.context.noIndent; + curState.context = { + prev: curState.context, + pluginName: pluginName, + indent: curState.indented, + startOfLine: startOfLine, + noIndent: noIndent + }; +} + +function popContext() { + if (curState.context) curState.context = curState.context.prev; +} + +function element(type) { + if (type == "openPlugin") {curState.pluginName = pluginName; return cont(attributes, endplugin(curState.startOfLine));} + else if (type == "closePlugin") { + var err = false; + if (curState.context) { + err = curState.context.pluginName != pluginName; + popContext(); + } else { + err = true; + } + if (err) setStyle = "error"; + return cont(endcloseplugin(err)); + } + else if (type == "string") { + if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata"); + if (curState.tokenize == inText) popContext(); + return cont(); + } + else return cont(); +} + +function endplugin(startOfLine) { + return function(type) { + if ( + type == "selfclosePlugin" || + type == "endPlugin" + ) + return cont(); + if (type == "endPlugin") {pushContext(curState.pluginName, startOfLine); return cont();} + return cont(); + }; +} + +function endcloseplugin(err) { + return function(type) { + if (err) setStyle = "error"; + if (type == "endPlugin") return cont(); + return pass(); + }; +} + +function attributes(type) { + if (type == "keyword") {setStyle = "attribute"; return cont(attributes);} + if (type == "equals") return cont(attvalue, attributes); + return pass(); +} +function attvalue(type) { + if (type == "keyword") {setStyle = "string"; return cont();} + if (type == "string") return cont(attvaluemaybe); + return pass(); +} +function attvaluemaybe(type) { + if (type == "string") return cont(attvaluemaybe); + else return pass(); +} +return { + startState: function() { + return {tokenize: inText, cc: [], indented: 0, startOfLine: true, pluginName: null, context: null}; + }, + token: function(stream, state) { + if (stream.sol()) { + state.startOfLine = true; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + + setStyle = type = pluginName = null; + var style = state.tokenize(stream, state); + if ((style || type) && style != "comment") { + curState = state; + while (true) { + var comb = state.cc.pop() || element; + if (comb(type || style)) break; + } + } + state.startOfLine = false; + return setStyle || style; + }, + indent: function(state, textAfter) { + var context = state.context; + if (context && context.noIndent) return 0; + if (context && /^{\//.test(textAfter)) + context = context.prev; + while (context && !context.startOfLine) + context = context.prev; + if (context) return context.indent + indentUnit; + else return 0; + }, + electricChars: "/" +}; +}); + +CodeMirror.defineMIME("text/tiki", "tiki"); + +}); diff --git a/js/codemirror/mode/toml/index.html b/js/codemirror/mode/toml/index.html new file mode 100644 index 0000000..21bb12d --- /dev/null +++ b/js/codemirror/mode/toml/index.html @@ -0,0 +1,73 @@ + + +CodeMirror: TOML Mode + + + + + + + + + +
    +

    TOML Mode

    +
    + +

    The TOML Mode

    +

    Created by Forbes Lindesay.

    +

    MIME type defined: text/x-toml.

    +
    diff --git a/js/codemirror/mode/toml/toml.js b/js/codemirror/mode/toml/toml.js new file mode 100644 index 0000000..ee0c239 --- /dev/null +++ b/js/codemirror/mode/toml/toml.js @@ -0,0 +1,88 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("toml", function () { + return { + startState: function () { + return { + inString: false, + stringType: "", + lhs: true, + inArray: 0 + }; + }, + token: function (stream, state) { + //check for state changes + if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) { + state.stringType = stream.peek(); + stream.next(); // Skip quote + state.inString = true; // Update state + } + if (stream.sol() && state.inArray === 0) { + state.lhs = true; + } + //return state + if (state.inString) { + while (state.inString && !stream.eol()) { + if (stream.peek() === state.stringType) { + stream.next(); // Skip quote + state.inString = false; // Clear flag + } else if (stream.peek() === '\\') { + stream.next(); + stream.next(); + } else { + stream.match(/^.[^\\\"\']*/); + } + } + return state.lhs ? "property string" : "string"; // Token style + } else if (state.inArray && stream.peek() === ']') { + stream.next(); + state.inArray--; + return 'bracket'; + } else if (state.lhs && stream.peek() === '[' && stream.skipTo(']')) { + stream.next();//skip closing ] + // array of objects has an extra open & close [] + if (stream.peek() === ']') stream.next(); + return "atom"; + } else if (stream.peek() === "#") { + stream.skipToEnd(); + return "comment"; + } else if (stream.eatSpace()) { + return null; + } else if (state.lhs && stream.eatWhile(function (c) { return c != '=' && c != ' '; })) { + return "property"; + } else if (state.lhs && stream.peek() === "=") { + stream.next(); + state.lhs = false; + return null; + } else if (!state.lhs && stream.match(/^\d\d\d\d[\d\-\:\.T]*Z/)) { + return 'atom'; //date + } else if (!state.lhs && (stream.match('true') || stream.match('false'))) { + return 'atom'; + } else if (!state.lhs && stream.peek() === '[') { + state.inArray++; + stream.next(); + return 'bracket'; + } else if (!state.lhs && stream.match(/^\-?\d+(?:\.\d+)?/)) { + return 'number'; + } else if (!stream.eatSpace()) { + stream.next(); + } + return null; + } + }; +}); + +CodeMirror.defineMIME('text/x-toml', 'toml'); + +}); diff --git a/js/codemirror/mode/tornado/index.html b/js/codemirror/mode/tornado/index.html new file mode 100644 index 0000000..790eb6c --- /dev/null +++ b/js/codemirror/mode/tornado/index.html @@ -0,0 +1,63 @@ + + +CodeMirror: Tornado template mode + + + + + + + + + + + + +
    +

    Tornado template mode

    +
    + + + +

    Mode for HTML with embedded Tornado template markup.

    + +

    MIME types defined: text/x-tornado

    +
    diff --git a/js/codemirror/mode/tornado/tornado.js b/js/codemirror/mode/tornado/tornado.js new file mode 100644 index 0000000..973770d --- /dev/null +++ b/js/codemirror/mode/tornado/tornado.js @@ -0,0 +1,68 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../htmlmixed/htmlmixed"), + require("../../addon/mode/overlay")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../htmlmixed/htmlmixed", + "../../addon/mode/overlay"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("tornado:inner", function() { + var keywords = ["and","as","assert","autoescape","block","break","class","comment","context", + "continue","datetime","def","del","elif","else","end","escape","except", + "exec","extends","false","finally","for","from","global","if","import","in", + "include","is","json_encode","lambda","length","linkify","load","module", + "none","not","or","pass","print","put","raise","raw","return","self","set", + "squeeze","super","true","try","url_escape","while","with","without","xhtml_escape","yield"]; + keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b"); + + function tokenBase (stream, state) { + stream.eatWhile(/[^\{]/); + var ch = stream.next(); + if (ch == "{") { + if (ch = stream.eat(/\{|%|#/)) { + state.tokenize = inTag(ch); + return "tag"; + } + } + } + function inTag (close) { + if (close == "{") { + close = "}"; + } + return function (stream, state) { + var ch = stream.next(); + if ((ch == close) && stream.eat("}")) { + state.tokenize = tokenBase; + return "tag"; + } + if (stream.match(keywords)) { + return "keyword"; + } + return close == "#" ? "comment" : "string"; + }; + } + return { + startState: function () { + return {tokenize: tokenBase}; + }, + token: function (stream, state) { + return state.tokenize(stream, state); + } + }; + }); + + CodeMirror.defineMode("tornado", function(config) { + var htmlBase = CodeMirror.getMode(config, "text/html"); + var tornadoInner = CodeMirror.getMode(config, "tornado:inner"); + return CodeMirror.overlayMode(htmlBase, tornadoInner); + }); + + CodeMirror.defineMIME("text/x-tornado", "tornado"); +}); diff --git a/js/codemirror/mode/troff/index.html b/js/codemirror/mode/troff/index.html new file mode 100644 index 0000000..5c871b6 --- /dev/null +++ b/js/codemirror/mode/troff/index.html @@ -0,0 +1,146 @@ + + +CodeMirror: troff mode + + + + + + + + + + +
    +

    troff

    + + + + + + +

    MIME types defined: troff.

    +
    diff --git a/js/codemirror/mode/troff/troff.js b/js/codemirror/mode/troff/troff.js new file mode 100644 index 0000000..6d720ca --- /dev/null +++ b/js/codemirror/mode/troff/troff.js @@ -0,0 +1,84 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) + define(["../../lib/codemirror"], mod); + else + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('troff', function() { + + var words = {}; + + function tokenBase(stream) { + if (stream.eatSpace()) return null; + + var sol = stream.sol(); + var ch = stream.next(); + + if (ch === '\\') { + if (stream.match('fB') || stream.match('fR') || stream.match('fI') || + stream.match('u') || stream.match('d') || + stream.match('%') || stream.match('&')) { + return 'string'; + } + if (stream.match('m[')) { + stream.skipTo(']'); + stream.next(); + return 'string'; + } + if (stream.match('s+') || stream.match('s-')) { + stream.eatWhile(/[\d-]/); + return 'string'; + } + if (stream.match('\(') || stream.match('*\(')) { + stream.eatWhile(/[\w-]/); + return 'string'; + } + return 'string'; + } + if (sol && (ch === '.' || ch === '\'')) { + if (stream.eat('\\') && stream.eat('\"')) { + stream.skipToEnd(); + return 'comment'; + } + } + if (sol && ch === '.') { + if (stream.match('B ') || stream.match('I ') || stream.match('R ')) { + return 'attribute'; + } + if (stream.match('TH ') || stream.match('SH ') || stream.match('SS ') || stream.match('HP ')) { + stream.skipToEnd(); + return 'quote'; + } + if ((stream.match(/[A-Z]/) && stream.match(/[A-Z]/)) || (stream.match(/[a-z]/) && stream.match(/[a-z]/))) { + return 'attribute'; + } + } + stream.eatWhile(/[\w-]/); + var cur = stream.current(); + return words.hasOwnProperty(cur) ? words[cur] : null; + } + + function tokenize(stream, state) { + return (state.tokens[0] || tokenBase) (stream, state); + }; + + return { + startState: function() {return {tokens:[]};}, + token: function(stream, state) { + return tokenize(stream, state); + } + }; +}); + +CodeMirror.defineMIME('text/troff', 'troff'); +CodeMirror.defineMIME('text/x-troff', 'troff'); +CodeMirror.defineMIME('application/x-troff', 'troff'); + +}); diff --git a/js/codemirror/mode/ttcn-cfg/index.html b/js/codemirror/mode/ttcn-cfg/index.html new file mode 100644 index 0000000..c7f0e82 --- /dev/null +++ b/js/codemirror/mode/ttcn-cfg/index.html @@ -0,0 +1,116 @@ + + +CodeMirror: TTCN-CFG mode + + + + + + + + + +
    +

    TTCN-CFG example

    +
    + +
    + + +
    +

    Language: Testing and Test Control Notation - + Configuration files + (TTCN-CFG) +

    +

    MIME types defined: text/x-ttcn-cfg.

    + +
    +

    The development of this mode has been sponsored by Ericsson + .

    +

    Coded by Asmelash Tsegay Gebretsadkan

    +
    + diff --git a/js/codemirror/mode/ttcn-cfg/ttcn-cfg.js b/js/codemirror/mode/ttcn-cfg/ttcn-cfg.js new file mode 100644 index 0000000..60bace1 --- /dev/null +++ b/js/codemirror/mode/ttcn-cfg/ttcn-cfg.js @@ -0,0 +1,214 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("ttcn-cfg", function(config, parserConfig) { + var indentUnit = config.indentUnit, + keywords = parserConfig.keywords || {}, + fileNCtrlMaskOptions = parserConfig.fileNCtrlMaskOptions || {}, + externalCommands = parserConfig.externalCommands || {}, + multiLineStrings = parserConfig.multiLineStrings, + indentStatements = parserConfig.indentStatements !== false; + var isOperatorChar = /[\|]/; + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[:=]/.test(ch)) { + curPunc = ch; + return "punctuation"; + } + if (ch == "#"){ + stream.skipToEnd(); + return "comment"; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + if (ch == "["){ + stream.eatWhile(/[\w_\]]/); + return "number sectionTitle"; + } + + stream.eatWhile(/[\w\$_]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) return "keyword"; + if (fileNCtrlMaskOptions.propertyIsEnumerable(cur)) + return "negative fileNCtrlMaskOptions"; + if (externalCommands.propertyIsEnumerable(cur)) return "negative externalCommands"; + + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped){ + var afterNext = stream.peek(); + //look if the character if the quote is like the B in '10100010'B + if (afterNext){ + afterNext = afterNext.toLowerCase(); + if(afterNext == "b" || afterNext == "h" || afterNext == "o") + stream.next(); + } + end = true; break; + } + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + var indent = state.indented; + if (state.context && state.context.type == "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + //Interface + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":" || curPunc == ",") + && ctx.type == "statement"){ + popContext(state); + } + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (indentStatements && (((ctx.type == "}" || ctx.type == "top") + && curPunc != ';') || (ctx.type == "statement" + && curPunc == "newstatement"))) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + return style; + }, + + electricChars: "{}", + lineComment: "#", + fold: "brace" + }; + }); + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) + obj[words[i]] = true; + return obj; + } + + CodeMirror.defineMIME("text/x-ttcn-cfg", { + name: "ttcn-cfg", + keywords: words("Yes No LogFile FileMask ConsoleMask AppendFile" + + " TimeStampFormat LogEventTypes SourceInfoFormat" + + " LogEntityName LogSourceInfo DiskFullAction" + + " LogFileNumber LogFileSize MatchingHints Detailed" + + " Compact SubCategories Stack Single None Seconds" + + " DateTime Time Stop Error Retry Delete TCPPort KillTimer" + + " NumHCs UnixSocketsEnabled LocalAddress"), + fileNCtrlMaskOptions: words("TTCN_EXECUTOR TTCN_ERROR TTCN_WARNING" + + " TTCN_PORTEVENT TTCN_TIMEROP TTCN_VERDICTOP" + + " TTCN_DEFAULTOP TTCN_TESTCASE TTCN_ACTION" + + " TTCN_USER TTCN_FUNCTION TTCN_STATISTICS" + + " TTCN_PARALLEL TTCN_MATCHING TTCN_DEBUG" + + " EXECUTOR ERROR WARNING PORTEVENT TIMEROP" + + " VERDICTOP DEFAULTOP TESTCASE ACTION USER" + + " FUNCTION STATISTICS PARALLEL MATCHING DEBUG" + + " LOG_ALL LOG_NOTHING ACTION_UNQUALIFIED" + + " DEBUG_ENCDEC DEBUG_TESTPORT" + + " DEBUG_UNQUALIFIED DEFAULTOP_ACTIVATE" + + " DEFAULTOP_DEACTIVATE DEFAULTOP_EXIT" + + " DEFAULTOP_UNQUALIFIED ERROR_UNQUALIFIED" + + " EXECUTOR_COMPONENT EXECUTOR_CONFIGDATA" + + " EXECUTOR_EXTCOMMAND EXECUTOR_LOGOPTIONS" + + " EXECUTOR_RUNTIME EXECUTOR_UNQUALIFIED" + + " FUNCTION_RND FUNCTION_UNQUALIFIED" + + " MATCHING_DONE MATCHING_MCSUCCESS" + + " MATCHING_MCUNSUCC MATCHING_MMSUCCESS" + + " MATCHING_MMUNSUCC MATCHING_PCSUCCESS" + + " MATCHING_PCUNSUCC MATCHING_PMSUCCESS" + + " MATCHING_PMUNSUCC MATCHING_PROBLEM" + + " MATCHING_TIMEOUT MATCHING_UNQUALIFIED" + + " PARALLEL_PORTCONN PARALLEL_PORTMAP" + + " PARALLEL_PTC PARALLEL_UNQUALIFIED" + + " PORTEVENT_DUALRECV PORTEVENT_DUALSEND" + + " PORTEVENT_MCRECV PORTEVENT_MCSEND" + + " PORTEVENT_MMRECV PORTEVENT_MMSEND" + + " PORTEVENT_MQUEUE PORTEVENT_PCIN" + + " PORTEVENT_PCOUT PORTEVENT_PMIN" + + " PORTEVENT_PMOUT PORTEVENT_PQUEUE" + + " PORTEVENT_STATE PORTEVENT_UNQUALIFIED" + + " STATISTICS_UNQUALIFIED STATISTICS_VERDICT" + + " TESTCASE_FINISH TESTCASE_START" + + " TESTCASE_UNQUALIFIED TIMEROP_GUARD" + + " TIMEROP_READ TIMEROP_START TIMEROP_STOP" + + " TIMEROP_TIMEOUT TIMEROP_UNQUALIFIED" + + " USER_UNQUALIFIED VERDICTOP_FINAL" + + " VERDICTOP_GETVERDICT VERDICTOP_SETVERDICT" + + " VERDICTOP_UNQUALIFIED WARNING_UNQUALIFIED"), + externalCommands: words("BeginControlPart EndControlPart BeginTestCase" + + " EndTestCase"), + multiLineStrings: true + }); +}); \ No newline at end of file diff --git a/js/codemirror/mode/ttcn/index.html b/js/codemirror/mode/ttcn/index.html new file mode 100644 index 0000000..147845a --- /dev/null +++ b/js/codemirror/mode/ttcn/index.html @@ -0,0 +1,119 @@ + + +CodeMirror: TTCN mode + + + + + + + + + +
    +

    TTCN example

    +
    + +
    + + +
    +

    Language: Testing and Test Control Notation + (TTCN) +

    +

    MIME types defined: text/x-ttcn, + text/x-ttcn3, text/x-ttcnpp.

    +
    +

    The development of this mode has been sponsored by Ericsson + .

    +

    Coded by Asmelash Tsegay Gebretsadkan

    +
    + diff --git a/js/codemirror/mode/ttcn/ttcn.js b/js/codemirror/mode/ttcn/ttcn.js new file mode 100644 index 0000000..cd56efe --- /dev/null +++ b/js/codemirror/mode/ttcn/ttcn.js @@ -0,0 +1,283 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("ttcn", function(config, parserConfig) { + var indentUnit = config.indentUnit, + keywords = parserConfig.keywords || {}, + builtin = parserConfig.builtin || {}, + timerOps = parserConfig.timerOps || {}, + portOps = parserConfig.portOps || {}, + configOps = parserConfig.configOps || {}, + verdictOps = parserConfig.verdictOps || {}, + sutOps = parserConfig.sutOps || {}, + functionOps = parserConfig.functionOps || {}, + + verdictConsts = parserConfig.verdictConsts || {}, + booleanConsts = parserConfig.booleanConsts || {}, + otherConsts = parserConfig.otherConsts || {}, + + types = parserConfig.types || {}, + visibilityModifiers = parserConfig.visibilityModifiers || {}, + templateMatch = parserConfig.templateMatch || {}, + multiLineStrings = parserConfig.multiLineStrings, + indentStatements = parserConfig.indentStatements !== false; + var isOperatorChar = /[+\-*&@=<>!\/]/; + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]{}\(\),;\\:\?\.]/.test(ch)) { + curPunc = ch; + return "punctuation"; + } + if (ch == "#"){ + stream.skipToEnd(); + return "atom preprocessor"; + } + if (ch == "%"){ + stream.eatWhile(/\b/); + return "atom ttcn3Macros"; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + if(ch == "@"){ + if(stream.match("try") || stream.match("catch") + || stream.match("lazy")){ + return "keyword"; + } + } + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_\xa1-\uffff]/); + var cur = stream.current(); + + if (keywords.propertyIsEnumerable(cur)) return "keyword"; + if (builtin.propertyIsEnumerable(cur)) return "builtin"; + + if (timerOps.propertyIsEnumerable(cur)) return "def timerOps"; + if (configOps.propertyIsEnumerable(cur)) return "def configOps"; + if (verdictOps.propertyIsEnumerable(cur)) return "def verdictOps"; + if (portOps.propertyIsEnumerable(cur)) return "def portOps"; + if (sutOps.propertyIsEnumerable(cur)) return "def sutOps"; + if (functionOps.propertyIsEnumerable(cur)) return "def functionOps"; + + if (verdictConsts.propertyIsEnumerable(cur)) return "string verdictConsts"; + if (booleanConsts.propertyIsEnumerable(cur)) return "string booleanConsts"; + if (otherConsts.propertyIsEnumerable(cur)) return "string otherConsts"; + + if (types.propertyIsEnumerable(cur)) return "builtin types"; + if (visibilityModifiers.propertyIsEnumerable(cur)) + return "builtin visibilityModifiers"; + if (templateMatch.propertyIsEnumerable(cur)) return "atom templateMatch"; + + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped){ + var afterQuote = stream.peek(); + //look if the character after the quote is like the B in '10100010'B + if (afterQuote){ + afterQuote = afterQuote.toLowerCase(); + if(afterQuote == "b" || afterQuote == "h" || afterQuote == "o") + stream.next(); + } + end = true; break; + } + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + + function pushContext(state, col, type) { + var indent = state.indented; + if (state.context && state.context.type == "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, null, state.context); + } + + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + //Interface + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":" || curPunc == ",") + && ctx.type == "statement"){ + popContext(state); + } + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (indentStatements && + (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || + (ctx.type == "statement" && curPunc == "newstatement"))) + pushContext(state, stream.column(), "statement"); + + state.startOfLine = false; + + return style; + }, + + electricChars: "{}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + fold: "brace" + }; + }); + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + function def(mimes, mode) { + if (typeof mimes == "string") mimes = [mimes]; + var words = []; + function add(obj) { + if (obj) for (var prop in obj) if (obj.hasOwnProperty(prop)) + words.push(prop); + } + + add(mode.keywords); + add(mode.builtin); + add(mode.timerOps); + add(mode.portOps); + + if (words.length) { + mode.helperType = mimes[0]; + CodeMirror.registerHelper("hintWords", mimes[0], words); + } + + for (var i = 0; i < mimes.length; ++i) + CodeMirror.defineMIME(mimes[i], mode); + } + + def(["text/x-ttcn", "text/x-ttcn3", "text/x-ttcnpp"], { + name: "ttcn", + keywords: words("activate address alive all alt altstep and and4b any" + + " break case component const continue control deactivate" + + " display do else encode enumerated except exception" + + " execute extends extension external for from function" + + " goto group if import in infinity inout interleave" + + " label language length log match message mixed mod" + + " modifies module modulepar mtc noblock not not4b nowait" + + " of on optional or or4b out override param pattern port" + + " procedure record recursive rem repeat return runs select" + + " self sender set signature system template testcase to" + + " type union value valueof var variant while with xor xor4b"), + builtin: words("bit2hex bit2int bit2oct bit2str char2int char2oct encvalue" + + " decomp decvalue float2int float2str hex2bit hex2int" + + " hex2oct hex2str int2bit int2char int2float int2hex" + + " int2oct int2str int2unichar isbound ischosen ispresent" + + " isvalue lengthof log2str oct2bit oct2char oct2hex oct2int" + + " oct2str regexp replace rnd sizeof str2bit str2float" + + " str2hex str2int str2oct substr unichar2int unichar2char" + + " enum2int"), + types: words("anytype bitstring boolean char charstring default float" + + " hexstring integer objid octetstring universal verdicttype timer"), + timerOps: words("read running start stop timeout"), + portOps: words("call catch check clear getcall getreply halt raise receive" + + " reply send trigger"), + configOps: words("create connect disconnect done kill killed map unmap"), + verdictOps: words("getverdict setverdict"), + sutOps: words("action"), + functionOps: words("apply derefers refers"), + + verdictConsts: words("error fail inconc none pass"), + booleanConsts: words("true false"), + otherConsts: words("null NULL omit"), + + visibilityModifiers: words("private public friend"), + templateMatch: words("complement ifpresent subset superset permutation"), + multiLineStrings: true + }); +}); diff --git a/js/codemirror/mode/turtle/index.html b/js/codemirror/mode/turtle/index.html new file mode 100644 index 0000000..3b82f4e --- /dev/null +++ b/js/codemirror/mode/turtle/index.html @@ -0,0 +1,51 @@ + + +CodeMirror: Turtle mode + + + + + + + + + + +
    +

    Turtle mode

    +
    + + +

    MIME types defined: text/turtle.

    + +
    diff --git a/js/codemirror/mode/turtle/turtle.js b/js/codemirror/mode/turtle/turtle.js new file mode 100644 index 0000000..e73f535 --- /dev/null +++ b/js/codemirror/mode/turtle/turtle.js @@ -0,0 +1,162 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("turtle", function(config) { + var indentUnit = config.indentUnit; + var curPunc; + + function wordRegexp(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var ops = wordRegexp([]); + var keywords = wordRegexp(["@prefix", "@base", "a"]); + var operatorChars = /[*+\-<>=&|]/; + + function tokenBase(stream, state) { + var ch = stream.next(); + curPunc = null; + if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { + stream.match(/^[^\s\u00a0>]*>?/); + return "atom"; + } + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenLiteral(ch); + return state.tokenize(stream, state); + } + else if (/[{}\(\),\.;\[\]]/.test(ch)) { + curPunc = ch; + return null; + } + else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + else if (operatorChars.test(ch)) { + stream.eatWhile(operatorChars); + return null; + } + else if (ch == ":") { + return "operator"; + } else { + stream.eatWhile(/[_\w\d]/); + if(stream.peek() == ":") { + return "variable-3"; + } else { + var word = stream.current(); + + if(keywords.test(word)) { + return "meta"; + } + + if(ch >= "A" && ch <= "Z") { + return "comment"; + } else { + return "keyword"; + } + } + var word = stream.current(); + if (ops.test(word)) + return null; + else if (keywords.test(word)) + return "meta"; + else + return "variable"; + } + } + + function tokenLiteral(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return "string"; + }; + } + + function pushContext(state, type, col) { + state.context = {prev: state.context, indent: state.indent, col: col, type: type}; + } + function popContext(state) { + state.indent = state.context.indent; + state.context = state.context.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, + context: null, + indent: 0, + col: 0}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.context && state.context.align == null) state.context.align = false; + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { + state.context.align = true; + } + + if (curPunc == "(") pushContext(state, ")", stream.column()); + else if (curPunc == "[") pushContext(state, "]", stream.column()); + else if (curPunc == "{") pushContext(state, "}", stream.column()); + else if (/[\]\}\)]/.test(curPunc)) { + while (state.context && state.context.type == "pattern") popContext(state); + if (state.context && curPunc == state.context.type) popContext(state); + } + else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); + else if (/atom|string|variable/.test(style) && state.context) { + if (/[\}\]]/.test(state.context.type)) + pushContext(state, "pattern", stream.column()); + else if (state.context.type == "pattern" && !state.context.align) { + state.context.align = true; + state.context.col = stream.column(); + } + } + + return style; + }, + + indent: function(state, textAfter) { + var firstChar = textAfter && textAfter.charAt(0); + var context = state.context; + if (/[\]\}]/.test(firstChar)) + while (context && context.type == "pattern") context = context.prev; + + var closing = context && firstChar == context.type; + if (!context) + return 0; + else if (context.type == "pattern") + return context.col; + else if (context.align) + return context.col + (closing ? 0 : 1); + else + return context.indent + (closing ? 0 : indentUnit); + }, + + lineComment: "#" + }; +}); + +CodeMirror.defineMIME("text/turtle", "turtle"); + +}); diff --git a/js/codemirror/mode/twig/index.html b/js/codemirror/mode/twig/index.html new file mode 100644 index 0000000..05e101b --- /dev/null +++ b/js/codemirror/mode/twig/index.html @@ -0,0 +1,47 @@ + + +CodeMirror: Twig mode + + + + + + + + + + + +
    +

    Twig mode

    +
    + +
    diff --git a/js/codemirror/mode/twig/twig.js b/js/codemirror/mode/twig/twig.js new file mode 100644 index 0000000..d85f0ae --- /dev/null +++ b/js/codemirror/mode/twig/twig.js @@ -0,0 +1,141 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../../addon/mode/multiplex")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../../addon/mode/multiplex"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { + "use strict"; + + CodeMirror.defineMode("twig:inner", function() { + var keywords = ["and", "as", "autoescape", "endautoescape", "block", "do", "endblock", "else", "elseif", "extends", "for", "endfor", "embed", "endembed", "filter", "endfilter", "flush", "from", "if", "endif", "in", "is", "include", "import", "not", "or", "set", "spaceless", "endspaceless", "with", "endwith", "trans", "endtrans", "blocktrans", "endblocktrans", "macro", "endmacro", "use", "verbatim", "endverbatim"], + operator = /^[+\-*&%=<>!?|~^]/, + sign = /^[:\[\(\{]/, + atom = ["true", "false", "null", "empty", "defined", "divisibleby", "divisible by", "even", "odd", "iterable", "sameas", "same as"], + number = /^(\d[+\-\*\/])?\d+(\.\d+)?/; + + keywords = new RegExp("((" + keywords.join(")|(") + "))\\b"); + atom = new RegExp("((" + atom.join(")|(") + "))\\b"); + + function tokenBase (stream, state) { + var ch = stream.peek(); + + //Comment + if (state.incomment) { + if (!stream.skipTo("#}")) { + stream.skipToEnd(); + } else { + stream.eatWhile(/\#|}/); + state.incomment = false; + } + return "comment"; + //Tag + } else if (state.intag) { + //After operator + if (state.operator) { + state.operator = false; + if (stream.match(atom)) { + return "atom"; + } + if (stream.match(number)) { + return "number"; + } + } + //After sign + if (state.sign) { + state.sign = false; + if (stream.match(atom)) { + return "atom"; + } + if (stream.match(number)) { + return "number"; + } + } + + if (state.instring) { + if (ch == state.instring) { + state.instring = false; + } + stream.next(); + return "string"; + } else if (ch == "'" || ch == '"') { + state.instring = ch; + stream.next(); + return "string"; + } else if (stream.match(state.intag + "}") || stream.eat("-") && stream.match(state.intag + "}")) { + state.intag = false; + return "tag"; + } else if (stream.match(operator)) { + state.operator = true; + return "operator"; + } else if (stream.match(sign)) { + state.sign = true; + } else { + if (stream.eat(" ") || stream.sol()) { + if (stream.match(keywords)) { + return "keyword"; + } + if (stream.match(atom)) { + return "atom"; + } + if (stream.match(number)) { + return "number"; + } + if (stream.sol()) { + stream.next(); + } + } else { + stream.next(); + } + + } + return "variable"; + } else if (stream.eat("{")) { + if (stream.eat("#")) { + state.incomment = true; + if (!stream.skipTo("#}")) { + stream.skipToEnd(); + } else { + stream.eatWhile(/\#|}/); + state.incomment = false; + } + return "comment"; + //Open tag + } else if (ch = stream.eat(/\{|%/)) { + //Cache close tag + state.intag = ch; + if (ch == "{") { + state.intag = "}"; + } + stream.eat("-"); + return "tag"; + } + } + stream.next(); + }; + + return { + startState: function () { + return {}; + }, + token: function (stream, state) { + return tokenBase(stream, state); + } + }; + }); + + CodeMirror.defineMode("twig", function(config, parserConfig) { + var twigInner = CodeMirror.getMode(config, "twig:inner"); + if (!parserConfig || !parserConfig.base) return twigInner; + return CodeMirror.multiplexingMode( + CodeMirror.getMode(config, parserConfig.base), { + open: /\{[{#%]/, close: /[}#%]\}/, mode: twigInner, parseDelimiters: true + } + ); + }); + CodeMirror.defineMIME("text/x-twig", "twig"); +}); diff --git a/js/codemirror/mode/vb/index.html b/js/codemirror/mode/vb/index.html new file mode 100644 index 0000000..5ef317e --- /dev/null +++ b/js/codemirror/mode/vb/index.html @@ -0,0 +1,49 @@ + + +CodeMirror: VB.NET mode + + + + + + + + + + + +
    +

    VB.NET mode

    +
    + +
    +

    MIME type defined: text/x-vb.

    + +
    diff --git a/js/codemirror/mode/vb/vb.js b/js/codemirror/mode/vb/vb.js new file mode 100644 index 0000000..d77fdfb --- /dev/null +++ b/js/codemirror/mode/vb/vb.js @@ -0,0 +1,275 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("vb", function(conf, parserConf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"); + var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); + var doubleOperators = new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); + var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); + var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); + var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); + + var openingKeywords = ['class','module', 'sub','enum','select','while','if','function', 'get','set','property', 'try', 'structure', 'synclock', 'using', 'with']; + var middleKeywords = ['else','elseif','case', 'catch', 'finally']; + var endKeywords = ['next','loop']; + + var operatorKeywords = ['and', "andalso", 'or', 'orelse', 'xor', 'in', 'not', 'is', 'isnot', 'like']; + var wordOperators = wordRegexp(operatorKeywords); + + var commonKeywords = ["#const", "#else", "#elseif", "#end", "#if", "#region", "addhandler", "addressof", "alias", "as", "byref", "byval", "cbool", "cbyte", "cchar", "cdate", "cdbl", "cdec", "cint", "clng", "cobj", "compare", "const", "continue", "csbyte", "cshort", "csng", "cstr", "cuint", "culng", "cushort", "declare", "default", "delegate", "dim", "directcast", "each", "erase", "error", "event", "exit", "explicit", "false", "for", "friend", "gettype", "goto", "handles", "implements", "imports", "infer", "inherits", "interface", "isfalse", "istrue", "lib", "me", "mod", "mustinherit", "mustoverride", "my", "mybase", "myclass", "namespace", "narrowing", "new", "nothing", "notinheritable", "notoverridable", "of", "off", "on", "operator", "option", "optional", "out", "overloads", "overridable", "overrides", "paramarray", "partial", "private", "protected", "public", "raiseevent", "readonly", "redim", "removehandler", "resume", "return", "shadows", "shared", "static", "step", "stop", "strict", "then", "throw", "to", "true", "trycast", "typeof", "until", "until", "when", "widening", "withevents", "writeonly"]; + + var commontypes = ['object', 'boolean', 'char', 'string', 'byte', 'sbyte', 'short', 'ushort', 'int16', 'uint16', 'integer', 'uinteger', 'int32', 'uint32', 'long', 'ulong', 'int64', 'uint64', 'decimal', 'single', 'double', 'float', 'date', 'datetime', 'intptr', 'uintptr']; + + var keywords = wordRegexp(commonKeywords); + var types = wordRegexp(commontypes); + var stringPrefixes = '"'; + + var opening = wordRegexp(openingKeywords); + var middle = wordRegexp(middleKeywords); + var closing = wordRegexp(endKeywords); + var doubleClosing = wordRegexp(['end']); + var doOpening = wordRegexp(['do']); + + var indentInfo = null; + + CodeMirror.registerHelper("hintWords", "vb", openingKeywords.concat(middleKeywords).concat(endKeywords) + .concat(operatorKeywords).concat(commonKeywords).concat(commontypes)); + + function indent(_stream, state) { + state.currentIndent++; + } + + function dedent(_stream, state) { + state.currentIndent--; + } + // tokenizers + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle Comments + if (ch === "'") { + stream.skipToEnd(); + return 'comment'; + } + + + // Handle Number Literals + if (stream.match(/^((&H)|(&O))?[0-9\.a-f]/i, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^\d*\.\d+F?/i)) { floatLiteral = true; } + else if (stream.match(/^\d+\.\d*F?/)) { floatLiteral = true; } + else if (stream.match(/^\.\d+F?/)) { floatLiteral = true; } + + if (floatLiteral) { + // Float literals may be "imaginary" + stream.eat(/J/i); + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; } + // Octal + else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; } + // Decimal + else if (stream.match(/^[1-9]\d*F?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + else if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } + if (intLiteral) { + // Integer literals may be "long" + stream.eat(/L/i); + return 'number'; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and Delimiters + if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { + return null; + } + if (stream.match(doubleOperators) + || stream.match(singleOperators) + || stream.match(wordOperators)) { + return 'operator'; + } + if (stream.match(singleDelimiters)) { + return null; + } + if (stream.match(doOpening)) { + indent(stream,state); + state.doInCurrentLine = true; + return 'keyword'; + } + if (stream.match(opening)) { + if (! state.doInCurrentLine) + indent(stream,state); + else + state.doInCurrentLine = false; + return 'keyword'; + } + if (stream.match(middle)) { + return 'keyword'; + } + + if (stream.match(doubleClosing)) { + dedent(stream,state); + dedent(stream,state); + return 'keyword'; + } + if (stream.match(closing)) { + dedent(stream,state); + return 'keyword'; + } + + if (stream.match(types)) { + return 'keyword'; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(identifiers)) { + return 'variable'; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + return function(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"]/); + if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) { + return ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + }; + } + + + function tokenLexer(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = state.tokenize(stream, state); + if (style === 'variable') { + return 'variable'; + } else { + return ERRORCLASS; + } + } + + + var delimiter_index = '[({'.indexOf(current); + if (delimiter_index !== -1) { + indent(stream, state ); + } + if (indentInfo === 'dedent') { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + delimiter_index = '])}'.indexOf(current); + if (delimiter_index !== -1) { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + + return style; + } + + var external = { + electricChars:"dDpPtTfFeE ", + startState: function() { + return { + tokenize: tokenBase, + lastToken: null, + currentIndent: 0, + nextLineIndent: 0, + doInCurrentLine: false + + + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + state.currentIndent += state.nextLineIndent; + state.nextLineIndent = 0; + state.doInCurrentLine = 0; + } + var style = tokenLexer(stream, state); + + state.lastToken = {style:style, content: stream.current()}; + + + + return style; + }, + + indent: function(state, textAfter) { + var trueText = textAfter.replace(/^\s+|\s+$/g, '') ; + if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1); + if(state.currentIndent < 0) return 0; + return state.currentIndent * conf.indentUnit; + }, + + lineComment: "'" + }; + return external; +}); + +CodeMirror.defineMIME("text/x-vb", "vb"); + +}); diff --git a/js/codemirror/mode/vbscript/index.html b/js/codemirror/mode/vbscript/index.html new file mode 100644 index 0000000..bd91c76 --- /dev/null +++ b/js/codemirror/mode/vbscript/index.html @@ -0,0 +1,55 @@ + + +CodeMirror: VBScript mode + + + + + + + + + +
    +

    VBScript mode

    + + +
    + + + +

    MIME types defined: text/vbscript.

    +
    diff --git a/js/codemirror/mode/vbscript/vbscript.js b/js/codemirror/mode/vbscript/vbscript.js new file mode 100644 index 0000000..49c26e5 --- /dev/null +++ b/js/codemirror/mode/vbscript/vbscript.js @@ -0,0 +1,350 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +/* +For extra ASP classic objects, initialize CodeMirror instance with this option: + isASP: true + +E.G.: + var editor = CodeMirror.fromTextArea(document.getElementById("code"), { + lineNumbers: true, + isASP: true + }); +*/ + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("vbscript", function(conf, parserConf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"); + var doubleOperators = new RegExp("^((<>)|(<=)|(>=))"); + var singleDelimiters = new RegExp('^[\\.,]'); + var brackets = new RegExp('^[\\(\\)]'); + var identifiers = new RegExp("^[A-Za-z][_A-Za-z0-9]*"); + + var openingKeywords = ['class','sub','select','while','if','function', 'property', 'with', 'for']; + var middleKeywords = ['else','elseif','case']; + var endKeywords = ['next','loop','wend']; + + var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'is', 'mod', 'eqv', 'imp']); + var commonkeywords = ['dim', 'redim', 'then', 'until', 'randomize', + 'byval','byref','new','property', 'exit', 'in', + 'const','private', 'public', + 'get','set','let', 'stop', 'on error resume next', 'on error goto 0', 'option explicit', 'call', 'me']; + + //This list was from: http://msdn.microsoft.com/en-us/library/f8tbc79x(v=vs.84).aspx + var atomWords = ['true', 'false', 'nothing', 'empty', 'null']; + //This list was from: http://msdn.microsoft.com/en-us/library/3ca8tfek(v=vs.84).aspx + var builtinFuncsWords = ['abs', 'array', 'asc', 'atn', 'cbool', 'cbyte', 'ccur', 'cdate', 'cdbl', 'chr', 'cint', 'clng', 'cos', 'csng', 'cstr', 'date', 'dateadd', 'datediff', 'datepart', + 'dateserial', 'datevalue', 'day', 'escape', 'eval', 'execute', 'exp', 'filter', 'formatcurrency', 'formatdatetime', 'formatnumber', 'formatpercent', 'getlocale', 'getobject', + 'getref', 'hex', 'hour', 'inputbox', 'instr', 'instrrev', 'int', 'fix', 'isarray', 'isdate', 'isempty', 'isnull', 'isnumeric', 'isobject', 'join', 'lbound', 'lcase', 'left', + 'len', 'loadpicture', 'log', 'ltrim', 'rtrim', 'trim', 'maths', 'mid', 'minute', 'month', 'monthname', 'msgbox', 'now', 'oct', 'replace', 'rgb', 'right', 'rnd', 'round', + 'scriptengine', 'scriptenginebuildversion', 'scriptenginemajorversion', 'scriptengineminorversion', 'second', 'setlocale', 'sgn', 'sin', 'space', 'split', 'sqr', 'strcomp', + 'string', 'strreverse', 'tan', 'time', 'timer', 'timeserial', 'timevalue', 'typename', 'ubound', 'ucase', 'unescape', 'vartype', 'weekday', 'weekdayname', 'year']; + + //This list was from: http://msdn.microsoft.com/en-us/library/ydz4cfk3(v=vs.84).aspx + var builtinConsts = ['vbBlack', 'vbRed', 'vbGreen', 'vbYellow', 'vbBlue', 'vbMagenta', 'vbCyan', 'vbWhite', 'vbBinaryCompare', 'vbTextCompare', + 'vbSunday', 'vbMonday', 'vbTuesday', 'vbWednesday', 'vbThursday', 'vbFriday', 'vbSaturday', 'vbUseSystemDayOfWeek', 'vbFirstJan1', 'vbFirstFourDays', 'vbFirstFullWeek', + 'vbGeneralDate', 'vbLongDate', 'vbShortDate', 'vbLongTime', 'vbShortTime', 'vbObjectError', + 'vbOKOnly', 'vbOKCancel', 'vbAbortRetryIgnore', 'vbYesNoCancel', 'vbYesNo', 'vbRetryCancel', 'vbCritical', 'vbQuestion', 'vbExclamation', 'vbInformation', 'vbDefaultButton1', 'vbDefaultButton2', + 'vbDefaultButton3', 'vbDefaultButton4', 'vbApplicationModal', 'vbSystemModal', 'vbOK', 'vbCancel', 'vbAbort', 'vbRetry', 'vbIgnore', 'vbYes', 'vbNo', + 'vbCr', 'VbCrLf', 'vbFormFeed', 'vbLf', 'vbNewLine', 'vbNullChar', 'vbNullString', 'vbTab', 'vbVerticalTab', 'vbUseDefault', 'vbTrue', 'vbFalse', + 'vbEmpty', 'vbNull', 'vbInteger', 'vbLong', 'vbSingle', 'vbDouble', 'vbCurrency', 'vbDate', 'vbString', 'vbObject', 'vbError', 'vbBoolean', 'vbVariant', 'vbDataObject', 'vbDecimal', 'vbByte', 'vbArray']; + //This list was from: http://msdn.microsoft.com/en-us/library/hkc375ea(v=vs.84).aspx + var builtinObjsWords = ['WScript', 'err', 'debug', 'RegExp']; + var knownProperties = ['description', 'firstindex', 'global', 'helpcontext', 'helpfile', 'ignorecase', 'length', 'number', 'pattern', 'source', 'value', 'count']; + var knownMethods = ['clear', 'execute', 'raise', 'replace', 'test', 'write', 'writeline', 'close', 'open', 'state', 'eof', 'update', 'addnew', 'end', 'createobject', 'quit']; + + var aspBuiltinObjsWords = ['server', 'response', 'request', 'session', 'application']; + var aspKnownProperties = ['buffer', 'cachecontrol', 'charset', 'contenttype', 'expires', 'expiresabsolute', 'isclientconnected', 'pics', 'status', //response + 'clientcertificate', 'cookies', 'form', 'querystring', 'servervariables', 'totalbytes', //request + 'contents', 'staticobjects', //application + 'codepage', 'lcid', 'sessionid', 'timeout', //session + 'scripttimeout']; //server + var aspKnownMethods = ['addheader', 'appendtolog', 'binarywrite', 'end', 'flush', 'redirect', //response + 'binaryread', //request + 'remove', 'removeall', 'lock', 'unlock', //application + 'abandon', //session + 'getlasterror', 'htmlencode', 'mappath', 'transfer', 'urlencode']; //server + + var knownWords = knownMethods.concat(knownProperties); + + builtinObjsWords = builtinObjsWords.concat(builtinConsts); + + if (conf.isASP){ + builtinObjsWords = builtinObjsWords.concat(aspBuiltinObjsWords); + knownWords = knownWords.concat(aspKnownMethods, aspKnownProperties); + }; + + var keywords = wordRegexp(commonkeywords); + var atoms = wordRegexp(atomWords); + var builtinFuncs = wordRegexp(builtinFuncsWords); + var builtinObjs = wordRegexp(builtinObjsWords); + var known = wordRegexp(knownWords); + var stringPrefixes = '"'; + + var opening = wordRegexp(openingKeywords); + var middle = wordRegexp(middleKeywords); + var closing = wordRegexp(endKeywords); + var doubleClosing = wordRegexp(['end']); + var doOpening = wordRegexp(['do']); + var noIndentWords = wordRegexp(['on error resume next', 'exit']); + var comment = wordRegexp(['rem']); + + + function indent(_stream, state) { + state.currentIndent++; + } + + function dedent(_stream, state) { + state.currentIndent--; + } + // tokenizers + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return 'space'; + //return null; + } + + var ch = stream.peek(); + + // Handle Comments + if (ch === "'") { + stream.skipToEnd(); + return 'comment'; + } + if (stream.match(comment)){ + stream.skipToEnd(); + return 'comment'; + } + + + // Handle Number Literals + if (stream.match(/^((&H)|(&O))?[0-9\.]/i, false) && !stream.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^\d*\.\d+/i)) { floatLiteral = true; } + else if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } + else if (stream.match(/^\.\d+/)) { floatLiteral = true; } + + if (floatLiteral) { + // Float literals may be "imaginary" + stream.eat(/J/i); + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; } + // Octal + else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; } + // Decimal + else if (stream.match(/^[1-9]\d*F?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + else if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } + if (intLiteral) { + // Integer literals may be "long" + stream.eat(/L/i); + return 'number'; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and Delimiters + if (stream.match(doubleOperators) + || stream.match(singleOperators) + || stream.match(wordOperators)) { + return 'operator'; + } + if (stream.match(singleDelimiters)) { + return null; + } + + if (stream.match(brackets)) { + return "bracket"; + } + + if (stream.match(noIndentWords)) { + state.doInCurrentLine = true; + + return 'keyword'; + } + + if (stream.match(doOpening)) { + indent(stream,state); + state.doInCurrentLine = true; + + return 'keyword'; + } + if (stream.match(opening)) { + if (! state.doInCurrentLine) + indent(stream,state); + else + state.doInCurrentLine = false; + + return 'keyword'; + } + if (stream.match(middle)) { + return 'keyword'; + } + + + if (stream.match(doubleClosing)) { + dedent(stream,state); + dedent(stream,state); + + return 'keyword'; + } + if (stream.match(closing)) { + if (! state.doInCurrentLine) + dedent(stream,state); + else + state.doInCurrentLine = false; + + return 'keyword'; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(atoms)) { + return 'atom'; + } + + if (stream.match(known)) { + return 'variable-2'; + } + + if (stream.match(builtinFuncs)) { + return 'builtin'; + } + + if (stream.match(builtinObjs)){ + return 'variable-2'; + } + + if (stream.match(identifiers)) { + return 'variable'; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + return function(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"]/); + if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) { + return ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + }; + } + + + function tokenLexer(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = state.tokenize(stream, state); + + current = stream.current(); + if (style && (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword')){//|| knownWords.indexOf(current.substring(1)) > -1) { + if (style === 'builtin' || style === 'keyword') style='variable'; + if (knownWords.indexOf(current.substr(1)) > -1) style='variable-2'; + + return style; + } else { + return ERRORCLASS; + } + } + + return style; + } + + var external = { + electricChars:"dDpPtTfFeE ", + startState: function() { + return { + tokenize: tokenBase, + lastToken: null, + currentIndent: 0, + nextLineIndent: 0, + doInCurrentLine: false, + ignoreKeyword: false + + + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + state.currentIndent += state.nextLineIndent; + state.nextLineIndent = 0; + state.doInCurrentLine = 0; + } + var style = tokenLexer(stream, state); + + state.lastToken = {style:style, content: stream.current()}; + + if (style==='space') style=null; + + return style; + }, + + indent: function(state, textAfter) { + var trueText = textAfter.replace(/^\s+|\s+$/g, '') ; + if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1); + if(state.currentIndent < 0) return 0; + return state.currentIndent * conf.indentUnit; + } + + }; + return external; +}); + +CodeMirror.defineMIME("text/vbscript", "vbscript"); + +}); diff --git a/js/codemirror/mode/velocity/index.html b/js/codemirror/mode/velocity/index.html new file mode 100644 index 0000000..5031f1f --- /dev/null +++ b/js/codemirror/mode/velocity/index.html @@ -0,0 +1,120 @@ + + +CodeMirror: Velocity mode + + + + + + + + + + +
    +

    Velocity mode

    +
    + + +

    MIME types defined: text/velocity.

    + +
    diff --git a/js/codemirror/mode/velocity/velocity.js b/js/codemirror/mode/velocity/velocity.js new file mode 100644 index 0000000..7576399 --- /dev/null +++ b/js/codemirror/mode/velocity/velocity.js @@ -0,0 +1,202 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("velocity", function() { + function parseWords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = parseWords("#end #else #break #stop #[[ #]] " + + "#{end} #{else} #{break} #{stop}"); + var functions = parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate " + + "#{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"); + var specials = parseWords("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"); + var isOperatorChar = /[+\-*&%=<>!?:\/|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + function tokenBase(stream, state) { + var beforeParams = state.beforeParams; + state.beforeParams = false; + var ch = stream.next(); + // start of unparsed string? + if ((ch == "'") && !state.inString && state.inParams) { + state.lastTokenWasBuiltin = false; + return chain(stream, state, tokenString(ch)); + } + // start of parsed string? + else if ((ch == '"')) { + state.lastTokenWasBuiltin = false; + if (state.inString) { + state.inString = false; + return "string"; + } + else if (state.inParams) + return chain(stream, state, tokenString(ch)); + } + // is it one of the special signs []{}().,;? Separator? + else if (/[\[\]{}\(\),;\.]/.test(ch)) { + if (ch == "(" && beforeParams) + state.inParams = true; + else if (ch == ")") { + state.inParams = false; + state.lastTokenWasBuiltin = true; + } + return null; + } + // start of a number value? + else if (/\d/.test(ch)) { + state.lastTokenWasBuiltin = false; + stream.eatWhile(/[\w\.]/); + return "number"; + } + // multi line comment? + else if (ch == "#" && stream.eat("*")) { + state.lastTokenWasBuiltin = false; + return chain(stream, state, tokenComment); + } + // unparsed content? + else if (ch == "#" && stream.match(/ *\[ *\[/)) { + state.lastTokenWasBuiltin = false; + return chain(stream, state, tokenUnparsed); + } + // single line comment? + else if (ch == "#" && stream.eat("#")) { + state.lastTokenWasBuiltin = false; + stream.skipToEnd(); + return "comment"; + } + // variable? + else if (ch == "$") { + stream.eat("!"); + stream.eatWhile(/[\w\d\$_\.{}-]/); + // is it one of the specials? + if (specials && specials.propertyIsEnumerable(stream.current())) { + return "keyword"; + } + else { + state.lastTokenWasBuiltin = true; + state.beforeParams = true; + return "builtin"; + } + } + // is it a operator? + else if (isOperatorChar.test(ch)) { + state.lastTokenWasBuiltin = false; + stream.eatWhile(isOperatorChar); + return "operator"; + } + else { + // get the whole word + stream.eatWhile(/[\w\$_{}@]/); + var word = stream.current(); + // is it one of the listed keywords? + if (keywords && keywords.propertyIsEnumerable(word)) + return "keyword"; + // is it one of the listed functions? + if (functions && functions.propertyIsEnumerable(word) || + (stream.current().match(/^#@?[a-z0-9_]+ *$/i) && stream.peek()=="(") && + !(functions && functions.propertyIsEnumerable(word.toLowerCase()))) { + state.beforeParams = true; + state.lastTokenWasBuiltin = false; + return "keyword"; + } + if (state.inString) { + state.lastTokenWasBuiltin = false; + return "string"; + } + if (stream.pos > word.length && stream.string.charAt(stream.pos-word.length-1)=="." && state.lastTokenWasBuiltin) + return "builtin"; + // default: just a "word" + state.lastTokenWasBuiltin = false; + return null; + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if ((next == quote) && !escaped) { + end = true; + break; + } + if (quote=='"' && stream.peek() == '$' && !escaped) { + state.inString = true; + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end) state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenUnparsed(stream, state) { + var maybeEnd = 0, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd == 2) { + state.tokenize = tokenBase; + break; + } + if (ch == "]") + maybeEnd++; + else if (ch != " ") + maybeEnd = 0; + } + return "meta"; + } + // Interface + + return { + startState: function() { + return { + tokenize: tokenBase, + beforeParams: false, + inParams: false, + inString: false, + lastTokenWasBuiltin: false + }; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + blockCommentStart: "#*", + blockCommentEnd: "*#", + lineComment: "##", + fold: "velocity" + }; +}); + +CodeMirror.defineMIME("text/velocity", "velocity"); + +}); diff --git a/js/codemirror/mode/verilog/index.html b/js/codemirror/mode/verilog/index.html new file mode 100644 index 0000000..2d37a57 --- /dev/null +++ b/js/codemirror/mode/verilog/index.html @@ -0,0 +1,120 @@ + + +CodeMirror: Verilog/SystemVerilog mode + + + + + + + + + + +
    +

    SystemVerilog mode

    + +
    + + + +

    +Syntax highlighting and indentation for the Verilog and SystemVerilog languages (IEEE 1800). +

    Configuration options:

    +
      +
    • noIndentKeywords - List of keywords which should not cause indentation to increase. E.g. ["package", "module"]. Default: None
    • +
    +

    + +

    MIME types defined: text/x-verilog and text/x-systemverilog.

    +
    diff --git a/js/codemirror/mode/verilog/test.js b/js/codemirror/mode/verilog/test.js new file mode 100644 index 0000000..3787bf2 --- /dev/null +++ b/js/codemirror/mode/verilog/test.js @@ -0,0 +1,443 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 4}, "verilog"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("binary_literals", + "[number 1'b0]", + "[number 1'b1]", + "[number 1'bx]", + "[number 1'bz]", + "[number 1'bX]", + "[number 1'bZ]", + "[number 1'B0]", + "[number 1'B1]", + "[number 1'Bx]", + "[number 1'Bz]", + "[number 1'BX]", + "[number 1'BZ]", + "[number 1'b0]", + "[number 1'b1]", + "[number 2'b01]", + "[number 2'bxz]", + "[number 2'b11]", + "[number 2'b10]", + "[number 2'b1Z]", + "[number 12'b0101_0101_0101]", + "[number 1'b 0]", + "[number 'b0101]" + ); + + MT("octal_literals", + "[number 3'o7]", + "[number 3'O7]", + "[number 3'so7]", + "[number 3'SO7]" + ); + + MT("decimal_literals", + "[number 0]", + "[number 1]", + "[number 7]", + "[number 123_456]", + "[number 'd33]", + "[number 8'd255]", + "[number 8'D255]", + "[number 8'sd255]", + "[number 8'SD255]", + "[number 32'd123]", + "[number 32 'd123]", + "[number 32 'd 123]" + ); + + MT("hex_literals", + "[number 4'h0]", + "[number 4'ha]", + "[number 4'hF]", + "[number 4'hx]", + "[number 4'hz]", + "[number 4'hX]", + "[number 4'hZ]", + "[number 32'hdc78]", + "[number 32'hDC78]", + "[number 32 'hDC78]", + "[number 32'h DC78]", + "[number 32 'h DC78]", + "[number 32'h44x7]", + "[number 32'hFFF?]" + ); + + MT("real_number_literals", + "[number 1.2]", + "[number 0.1]", + "[number 2394.26331]", + "[number 1.2E12]", + "[number 1.2e12]", + "[number 1.30e-2]", + "[number 0.1e-0]", + "[number 23E10]", + "[number 29E-2]", + "[number 236.123_763_e-12]" + ); + + MT("operators", + "[meta ^]" + ); + + MT("keywords", + "[keyword logic]", + "[keyword logic] [variable foo]", + "[keyword reg] [variable abc]" + ); + + MT("variables", + "[variable _leading_underscore]", + "[variable _if]", + "[number 12] [variable foo]", + "[variable foo] [number 14]" + ); + + MT("tick_defines", + "[def `FOO]", + "[def `foo]", + "[def `FOO_bar]" + ); + + MT("system_calls", + "[meta $display]", + "[meta $vpi_printf]" + ); + + MT("line_comment", "[comment // Hello world]"); + + // Alignment tests + MT("align_port_map_style1", + /** + * mod mod(.a(a), + * .b(b) + * ); + */ + "[variable mod] [variable mod][bracket (].[variable a][bracket (][variable a][bracket )],", + " .[variable b][bracket (][variable b][bracket )]", + " [bracket )];", + "" + ); + + MT("align_port_map_style2", + /** + * mod mod( + * .a(a), + * .b(b) + * ); + */ + "[variable mod] [variable mod][bracket (]", + " .[variable a][bracket (][variable a][bracket )],", + " .[variable b][bracket (][variable b][bracket )]", + "[bracket )];", + "" + ); + + MT("align_assignments", + /** + * always @(posedge clk) begin + * if (rst) + * data_out <= 8'b0 + + * 8'b1; + * else + * data_out = 8'b0 + + * 8'b1; + * data_out = + * 8'b0 + 8'b1; + * end + */ + "[keyword always] [def @][bracket (][keyword posedge] [variable clk][bracket )] [keyword begin]", + " [keyword if] [bracket (][variable rst][bracket )]", + " [variable data_out] [meta <=] [number 8'b0] [meta +]", + " [number 8'b1];", + " [keyword else]", + " [variable data_out] [meta =] [number 8'b0] [meta +]", + " [number 8'b1];", + " [variable data_out] [meta =] [number 8'b0] [meta +]", + " [number 8'b1];", + "[keyword end]", + "" + ); + + // Indentation tests + MT("indent_single_statement_if", + "[keyword if] [bracket (][variable foo][bracket )]", + " [keyword break];", + "" + ); + + MT("no_indent_after_single_line_if", + "[keyword if] [bracket (][variable foo][bracket )] [keyword break];", + "" + ); + + MT("indent_after_if_begin_same_line", + "[keyword if] [bracket (][variable foo][bracket )] [keyword begin]", + " [keyword break];", + " [keyword break];", + "[keyword end]", + "" + ); + + MT("indent_after_if_begin_next_line", + "[keyword if] [bracket (][variable foo][bracket )]", + " [keyword begin]", + " [keyword break];", + " [keyword break];", + " [keyword end]", + "" + ); + + MT("indent_single_statement_if_else", + "[keyword if] [bracket (][variable foo][bracket )]", + " [keyword break];", + "[keyword else]", + " [keyword break];", + "" + ); + + MT("indent_if_else_begin_same_line", + "[keyword if] [bracket (][variable foo][bracket )] [keyword begin]", + " [keyword break];", + " [keyword break];", + "[keyword end] [keyword else] [keyword begin]", + " [keyword break];", + " [keyword break];", + "[keyword end]", + "" + ); + + MT("indent_if_else_begin_next_line", + "[keyword if] [bracket (][variable foo][bracket )]", + " [keyword begin]", + " [keyword break];", + " [keyword break];", + " [keyword end]", + "[keyword else]", + " [keyword begin]", + " [keyword break];", + " [keyword break];", + " [keyword end]", + "" + ); + + MT("indent_if_nested_without_begin", + "[keyword if] [bracket (][variable foo][bracket )]", + " [keyword if] [bracket (][variable foo][bracket )]", + " [keyword if] [bracket (][variable foo][bracket )]", + " [keyword break];", + "" + ); + + MT("indent_case", + "[keyword case] [bracket (][variable state][bracket )]", + " [variable FOO]:", + " [keyword break];", + " [variable BAR]:", + " [keyword break];", + "[keyword endcase]", + "" + ); + + MT("unindent_after_end_with_preceding_text", + "[keyword begin]", + " [keyword break]; [keyword end]", + "" + ); + + MT("export_function_one_line_does_not_indent", + "[keyword export] [string \"DPI-C\"] [keyword function] [variable helloFromSV];", + "" + ); + + MT("export_task_one_line_does_not_indent", + "[keyword export] [string \"DPI-C\"] [keyword task] [variable helloFromSV];", + "" + ); + + MT("export_function_two_lines_indents_properly", + "[keyword export]", + " [string \"DPI-C\"] [keyword function] [variable helloFromSV];", + "" + ); + + MT("export_task_two_lines_indents_properly", + "[keyword export]", + " [string \"DPI-C\"] [keyword task] [variable helloFromSV];", + "" + ); + + MT("import_function_one_line_does_not_indent", + "[keyword import] [string \"DPI-C\"] [keyword function] [variable helloFromC];", + "" + ); + + MT("import_task_one_line_does_not_indent", + "[keyword import] [string \"DPI-C\"] [keyword task] [variable helloFromC];", + "" + ); + + MT("import_package_single_line_does_not_indent", + "[keyword import] [variable p]::[variable x];", + "[keyword import] [variable p]::[variable y];", + "" + ); + + MT("covergroup_with_function_indents_properly", + "[keyword covergroup] [variable cg] [keyword with] [keyword function] [variable sample][bracket (][keyword bit] [variable b][bracket )];", + " [variable c] : [keyword coverpoint] [variable c];", + "[keyword endgroup]: [variable cg]", + "" + ); + + MT("indent_uvm_macros", + /** + * `uvm_object_utils_begin(foo) + * `uvm_field_event(foo, UVM_ALL_ON) + * `uvm_object_utils_end + */ + "[def `uvm_object_utils_begin][bracket (][variable foo][bracket )]", + " [def `uvm_field_event][bracket (][variable foo], [variable UVM_ALL_ON][bracket )]", + "[def `uvm_object_utils_end]", + "" + ); + + MT("indent_uvm_macros2", + /** + * `uvm_do_with(mem_read,{ + * bar_nb == 0; + * }) + */ + "[def `uvm_do_with][bracket (][variable mem_read],[bracket {]", + " [variable bar_nb] [meta ==] [number 0];", + "[bracket })]", + "" + ); + + MT("indent_wait_disable_fork", + /** + * virtual task body(); + * repeat (20) begin + * fork + * `uvm_create_on(t,p_seq) + * join_none + * end + * wait fork; + * disable fork; + * endtask : body + */ + "[keyword virtual] [keyword task] [variable body][bracket ()];", + " [keyword repeat] [bracket (][number 20][bracket )] [keyword begin]", + " [keyword fork]", + " [def `uvm_create_on][bracket (][variable t],[variable p_seq][bracket )]", + " [keyword join_none]", + " [keyword end]", + " [keyword wait] [keyword fork];", + " [keyword disable] [keyword fork];", + "[keyword endtask] : [variable body]", + "" + ); + + MT("indent_typedef_class", + /** + * typedef class asdf; + * typedef p p_t[]; + * typedef enum { + * ASDF + * } t; + */ + "[keyword typedef] [keyword class] [variable asdf];", + "[keyword typedef] [variable p] [variable p_t][bracket [[]]];", + "[keyword typedef] [keyword enum] [bracket {]", + " [variable ASDF]", + "[bracket }] [variable t];", + "" + ); + + MT("indent_case_with_macro", + /** + * // It should be assumed that Macros can have ';' inside, or 'begin'/'end' blocks. + * // As such, 'case' statement should indent correctly with macros inside. + * case(foo) + * ASDF : this.foo = seqNum; + * ABCD : `update(f) + * EFGH : `update(g) + * endcase + */ + "[keyword case][bracket (][variable foo][bracket )]", + " [variable ASDF] : [keyword this].[variable foo] [meta =] [variable seqNum];", + " [variable ABCD] : [def `update][bracket (][variable f][bracket )]", + " [variable EFGH] : [def `update][bracket (][variable g][bracket )]", + "[keyword endcase]", + "" + ); + + MT("indent_extern_function", + /** + * extern virtual function void do(ref packet trans); + * extern virtual function void do2(ref packet trans); + */ + "[keyword extern] [keyword virtual] [keyword function] [keyword void] [variable do1][bracket (][keyword ref] [variable packet] [variable trans][bracket )];", + "[keyword extern] [keyword virtual] [keyword function] [keyword void] [variable do2][bracket (][keyword ref] [variable packet] [variable trans][bracket )];", + "" + ); + + MT("indent_assignment", + /** + * for (int i=1;i < fun;i++) begin + * foo = 2 << asdf || 11'h35 >> abcd + * && 8'h6 | 1'b1; + * end + */ + "[keyword for] [bracket (][keyword int] [variable i][meta =][number 1];[variable i] [meta <] [variable fun];[variable i][meta ++][bracket )] [keyword begin]", + " [variable foo] [meta =] [number 2] [meta <<] [variable asdf] [meta ||] [number 11'h35] [meta >>] [variable abcd]", + " [meta &&] [number 8'h6] [meta |] [number 1'b1];", + "[keyword end]", + "" + ); + + MT("indent_foreach_constraint", + /** + * `uvm_rand_send_with(wrTlp, { + * length ==1; + * foreach (Data[i]) { + * payload[i] == Data[i]; + * } + * }) + */ + "[def `uvm_rand_send_with][bracket (][variable wrTlp], [bracket {]", + " [variable length] [meta ==][number 1];", + " [keyword foreach] [bracket (][variable Data][bracket [[][variable i][bracket ]])] [bracket {]", + " [variable payload][bracket [[][variable i][bracket ]]] [meta ==] [variable Data][bracket [[][variable i][bracket ]]];", + " [bracket }]", + "[bracket })]", + "" + ); + + MT("indent_compiler_directives", + /** + * `ifdef DUT + * `else + * `ifndef FOO + * `define FOO + * `endif + * `endif + * `timescale 1ns/1ns + */ + "[def `ifdef] [variable DUT]", + "[def `else]", + " [def `ifndef] [variable FOO]", + " [def `define] [variable FOO]", + " [def `endif]", + "[def `endif]", + "[def `timescale] [number 1][variable ns][meta /][number 1][variable ns]", + "" + ); + +})(); diff --git a/js/codemirror/mode/verilog/verilog.js b/js/codemirror/mode/verilog/verilog.js new file mode 100644 index 0000000..221328e --- /dev/null +++ b/js/codemirror/mode/verilog/verilog.js @@ -0,0 +1,781 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("verilog", function(config, parserConfig) { + + var indentUnit = config.indentUnit, + statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, + dontAlignCalls = parserConfig.dontAlignCalls, + // compilerDirectivesUseRegularIndentation - If set, Compiler directive + // indentation follows the same rules as everything else. Otherwise if + // false, compiler directives will track their own indentation. + // For example, `ifdef nested inside another `ifndef will be indented, + // but a `ifdef inside a function block may not be indented. + compilerDirectivesUseRegularIndentation = parserConfig.compilerDirectivesUseRegularIndentation, + noIndentKeywords = parserConfig.noIndentKeywords || [], + multiLineStrings = parserConfig.multiLineStrings, + hooks = parserConfig.hooks || {}; + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + /** + * Keywords from IEEE 1800-2012 + */ + var keywords = words( + "accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind " + + "bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config " + + "const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable " + + "dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup " + + "endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask " + + "enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin " + + "function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import " + + "incdir include initial inout input inside instance int integer interconnect interface intersect join join_any " + + "join_none large let liblist library local localparam logic longint macromodule matches medium modport module " + + "nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed " + + "parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup " + + "pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg " + + "reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime " + + "s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify " + + "specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on " + + "table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior " + + "trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void " + + "wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor"); + + /** Operators from IEEE 1800-2012 + unary_operator ::= + + | - | ! | ~ | & | ~& | | | ~| | ^ | ~^ | ^~ + binary_operator ::= + + | - | * | / | % | == | != | === | !== | ==? | !=? | && | || | ** + | < | <= | > | >= | & | | | ^ | ^~ | ~^ | >> | << | >>> | <<< + | -> | <-> + inc_or_dec_operator ::= ++ | -- + unary_module_path_operator ::= + ! | ~ | & | ~& | | | ~| | ^ | ~^ | ^~ + binary_module_path_operator ::= + == | != | && | || | & | | | ^ | ^~ | ~^ + */ + var isOperatorChar = /[\+\-\*\/!~&|^%=?:<>]/; + var isBracketChar = /[\[\]{}()]/; + + var unsignedNumber = /\d[0-9_]*/; + var decimalLiteral = /\d*\s*'s?d\s*\d[0-9_]*/i; + var binaryLiteral = /\d*\s*'s?b\s*[xz01][xz01_]*/i; + var octLiteral = /\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i; + var hexLiteral = /\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i; + var realLiteral = /(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i; + + var closingBracketOrWord = /^((`?\w+)|[)}\]])/; + var closingBracket = /[)}\]]/; + var compilerDirectiveRegex = new RegExp( + "^(`(?:ifdef|ifndef|elsif|else|endif|undef|undefineall|define|include|begin_keywords|celldefine|default|" + + "nettype|end_keywords|endcelldefine|line|nounconnected_drive|pragma|resetall|timescale|unconnected_drive))\\b"); + var compilerDirectiveBeginRegex = /^(`(?:ifdef|ifndef|elsif|else))\b/; + var compilerDirectiveEndRegex = /^(`(?:elsif|else|endif))\b/; + + var curPunc; + var curKeyword; + + // Block openings which are closed by a matching keyword in the form of ("end" + keyword) + // E.g. "task" => "endtask" + var blockKeywords = words( + "case checker class clocking config function generate interface module package " + + "primitive program property specify sequence table task" + ); + + // Opening/closing pairs + var openClose = {}; + for (var keyword in blockKeywords) { + openClose[keyword] = "end" + keyword; + } + openClose["begin"] = "end"; + openClose["casex"] = "endcase"; + openClose["casez"] = "endcase"; + openClose["do" ] = "while"; + openClose["fork" ] = "join;join_any;join_none"; + openClose["covergroup"] = "endgroup"; + openClose["macro_begin"] = "macro_end"; + + for (var i in noIndentKeywords) { + var keyword = noIndentKeywords[i]; + if (openClose[keyword]) { + openClose[keyword] = undefined; + } + } + + // Keywords which open statements that are ended with a semi-colon + var statementKeywords = words("always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while extern typedef"); + + function tokenBase(stream, state) { + var ch = stream.peek(), style; + if (hooks[ch] && (style = hooks[ch](stream, state)) != false) return style; + if (hooks.tokenBase && (style = hooks.tokenBase(stream, state)) != false) + return style; + + if (/[,;:\.]/.test(ch)) { + curPunc = stream.next(); + return null; + } + if (isBracketChar.test(ch)) { + curPunc = stream.next(); + return "bracket"; + } + // Macros (tick-defines) + if (ch == '`') { + stream.next(); + if (stream.eatWhile(/[\w\$_]/)) { + var cur = stream.current(); + curKeyword = cur; + // Macros that end in _begin, are start of block and end with _end + if (cur.startsWith("`uvm_") && cur.endsWith("_begin")) { + var keywordClose = curKeyword.substr(0,curKeyword.length - 5) + "end"; + openClose[cur] = keywordClose; + curPunc = "newblock"; + } else { + stream.eatSpace(); + if (stream.peek() == '(') { + // Check if this is a block + curPunc = "newmacro"; + } + var withSpace = stream.current(); + // Move the stream back before the spaces + stream.backUp(withSpace.length - cur.length); + } + return "def"; + } else { + return null; + } + } + // System calls + if (ch == '$') { + stream.next(); + if (stream.eatWhile(/[\w\$_]/)) { + return "meta"; + } else { + return null; + } + } + // Time literals + if (ch == '#') { + stream.next(); + stream.eatWhile(/[\d_.]/); + return "def"; + } + // Event + if (ch == '@') { + stream.next(); + stream.eatWhile(/[@]/); + return "def"; + } + // Strings + if (ch == '"') { + stream.next(); + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + // Comments + if (ch == "/") { + stream.next(); + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + stream.backUp(1); + } + + // Numeric literals + if (stream.match(realLiteral) || + stream.match(decimalLiteral) || + stream.match(binaryLiteral) || + stream.match(octLiteral) || + stream.match(hexLiteral) || + stream.match(unsignedNumber) || + stream.match(realLiteral)) { + return "number"; + } + + // Operators + if (stream.eatWhile(isOperatorChar)) { + curPunc = stream.current(); + return "meta"; + } + + // Keywords / plain variables + if (stream.eatWhile(/[\w\$_]/)) { + var cur = stream.current(); + if (keywords[cur]) { + if (openClose[cur]) { + curPunc = "newblock"; + if (cur === "fork") { + // Fork can be a statement instead of block in cases of: + // "disable fork;" and "wait fork;" (trailing semicolon) + stream.eatSpace() + if (stream.peek() == ';') { + curPunc = "newstatement"; + } + stream.backUp(stream.current().length - cur.length); + } + } + if (statementKeywords[cur]) { + curPunc = "newstatement"; + } + curKeyword = cur; + return "keyword"; + } + return "variable"; + } + + stream.next(); + return null; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, scopekind, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.scopekind = scopekind; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type, scopekind) { + var indent = state.indented; + var c = new Context(indent, col, type, scopekind ? scopekind : "", null, state.context); + return state.context = c; + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") { + state.indented = state.context.indented; + } + return state.context = state.context.prev; + } + + function isClosing(text, contextClosing) { + if (text == contextClosing) { + return true; + } else { + // contextClosing may be multiple keywords separated by ; + var closingKeywords = contextClosing.split(";"); + for (var i in closingKeywords) { + if (text == closingKeywords[i]) { + return true; + } + } + return false; + } + } + + function isInsideScopeKind(ctx, scopekind) { + if (ctx == null) { + return false; + } + if (ctx.scopekind === scopekind) { + return true; + } + return isInsideScopeKind(ctx.prev, scopekind); + } + + function buildElectricInputRegEx() { + // Reindentation should occur on any bracket char: {}()[] + // or on a match of any of the block closing keywords, at + // the end of a line + var allClosings = []; + for (var i in openClose) { + if (openClose[i]) { + var closings = openClose[i].split(";"); + for (var j in closings) { + allClosings.push(closings[j]); + } + } + } + var re = new RegExp("[{}()\\[\\]]|(" + allClosings.join("|") + ")$"); + return re; + } + + // Interface + return { + + // Regex to force current line to reindent + electricInput: buildElectricInputRegEx(), + + startState: function(basecolumn) { + var state = { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", "top", false), + indented: 0, + compilerDirectiveIndented: 0, + startOfLine: true + }; + if (hooks.startState) hooks.startState(state); + return state; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (hooks.token) { + // Call hook, with an optional return value of a style to override verilog styling. + var style = hooks.token(stream, state); + if (style !== undefined) { + return style; + } + } + if (stream.eatSpace()) return null; + curPunc = null; + curKeyword = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta" || style == "variable") { + if (((curPunc === "=") || (curPunc === "<=")) && !isInsideScopeKind(ctx, "assignment")) { + // '<=' could be nonblocking assignment or lessthan-equals (which shouldn't cause indent) + // Search through the context to see if we are already in an assignment. + // '=' could be inside port declaration with comma or ')' afterward, or inside for(;;) block. + pushContext(state, stream.column() + curPunc.length, "assignment", "assignment"); + if (ctx.align == null) ctx.align = true; + } + return style; + } + if (ctx.align == null) ctx.align = true; + + var isClosingAssignment = ctx.type == "assignment" && + closingBracket.test(curPunc) && ctx.prev && ctx.prev.type === curPunc; + if (curPunc == ctx.type || isClosingAssignment) { + if (isClosingAssignment) { + ctx = popContext(state); + } + ctx = popContext(state); + if (curPunc == ")") { + // Handle closing macros, assuming they could have a semicolon or begin/end block inside. + if (ctx && (ctx.type === "macro")) { + ctx = popContext(state); + while (ctx && (ctx.type == "statement" || ctx.type == "assignment")) ctx = popContext(state); + } + } else if (curPunc == "}") { + // Handle closing statements like constraint block: "foreach () {}" which + // do not have semicolon at end. + if (ctx && (ctx.type === "statement")) { + while (ctx && (ctx.type == "statement")) ctx = popContext(state); + } + } + } else if (((curPunc == ";" || curPunc == ",") && (ctx.type == "statement" || ctx.type == "assignment")) || + (ctx.type && isClosing(curKeyword, ctx.type))) { + ctx = popContext(state); + while (ctx && (ctx.type == "statement" || ctx.type == "assignment")) ctx = popContext(state); + } else if (curPunc == "{") { + pushContext(state, stream.column(), "}"); + } else if (curPunc == "[") { + pushContext(state, stream.column(), "]"); + } else if (curPunc == "(") { + pushContext(state, stream.column(), ")"); + } else if (ctx && ctx.type == "endcase" && curPunc == ":") { + pushContext(state, stream.column(), "statement", "case"); + } else if (curPunc == "newstatement") { + pushContext(state, stream.column(), "statement", curKeyword); + } else if (curPunc == "newblock") { + if (curKeyword == "function" && ctx && (ctx.type == "statement" || ctx.type == "endgroup")) { + // The 'function' keyword can appear in some other contexts where it actually does not + // indicate a function (import/export DPI and covergroup definitions). + // Do nothing in this case + } else if (curKeyword == "task" && ctx && ctx.type == "statement") { + // Same thing for task + } else if (curKeyword == "class" && ctx && ctx.type == "statement") { + // Same thing for class (e.g. typedef) + } else { + var close = openClose[curKeyword]; + pushContext(state, stream.column(), close, curKeyword); + } + } else if (curPunc == "newmacro" || (curKeyword && curKeyword.match(compilerDirectiveRegex))) { + if (curPunc == "newmacro") { + // Macros (especially if they have parenthesis) potentially have a semicolon + // or complete statement/block inside, and should be treated as such. + pushContext(state, stream.column(), "macro", "macro"); + } + if (curKeyword.match(compilerDirectiveEndRegex)) { + state.compilerDirectiveIndented -= statementIndentUnit; + } + if (curKeyword.match(compilerDirectiveBeginRegex)) { + state.compilerDirectiveIndented += statementIndentUnit; + } + } + + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; + if (hooks.indent) { + var fromHook = hooks.indent(state); + if (fromHook >= 0) return fromHook; + } + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + var closing = false; + var possibleClosing = textAfter.match(closingBracketOrWord); + if (possibleClosing) + closing = isClosing(possibleClosing[0], ctx.type); + if (!compilerDirectivesUseRegularIndentation && textAfter.match(compilerDirectiveRegex)) { + if (textAfter.match(compilerDirectiveEndRegex)) { + return state.compilerDirectiveIndented - statementIndentUnit; + } + return state.compilerDirectiveIndented; + } + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); + else if ((closingBracket.test(ctx.type) || ctx.type == "assignment") + && ctx.align && !dontAlignCalls) return ctx.column + (closing ? 0 : 1); + else if (ctx.type == ")" && !closing) return ctx.indented + statementIndentUnit; + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + fold: "indent" + }; +}); + + CodeMirror.defineMIME("text/x-verilog", { + name: "verilog" + }); + + CodeMirror.defineMIME("text/x-systemverilog", { + name: "verilog" + }); + + + + // TL-Verilog mode. + // See tl-x.org for language spec. + // See the mode in action at makerchip.com. + // Contact: steve.hoover@redwoodeda.com + + // TLV Identifier prefixes. + // Note that sign is not treated separately, so "+/-" versions of numeric identifiers + // are included. + var tlvIdentifierStyle = { + "|": "link", + ">": "property", // Should condition this off for > TLV 1c. + "$": "variable", + "$$": "variable", + "?$": "qualifier", + "?*": "qualifier", + "-": "hr", + "/": "property", + "/-": "property", + "@": "variable-3", + "@-": "variable-3", + "@++": "variable-3", + "@+=": "variable-3", + "@+=-": "variable-3", + "@--": "variable-3", + "@-=": "variable-3", + "%+": "tag", + "%-": "tag", + "%": "tag", + ">>": "tag", + "<<": "tag", + "<>": "tag", + "#": "tag", // Need to choose a style for this. + "^": "attribute", + "^^": "attribute", + "^!": "attribute", + "*": "variable-2", + "**": "variable-2", + "\\": "keyword", + "\"": "comment" + }; + + // Lines starting with these characters define scope (result in indentation). + var tlvScopePrefixChars = { + "/": "beh-hier", + ">": "beh-hier", + "-": "phys-hier", + "|": "pipe", + "?": "when", + "@": "stage", + "\\": "keyword" + }; + var tlvIndentUnit = 3; + var tlvTrackStatements = false; + var tlvIdentMatch = /^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/; // Matches an identifier. + // Note that ':' is excluded, because of it's use in [:]. + var tlvFirstLevelIndentMatch = /^[! ] /; + var tlvLineIndentationMatch = /^[! ] */; + var tlvCommentMatch = /^\/[\/\*]/; + + + // Returns a style specific to the scope at the given indentation column. + // Type is one of: "indent", "scope-ident", "before-scope-ident". + function tlvScopeStyle(state, indentation, type) { + // Begin scope. + var depth = indentation / tlvIndentUnit; // TODO: Pass this in instead. + return "tlv-" + state.tlvIndentationStyle[depth] + "-" + type; + } + + // Return true if the next thing in the stream is an identifier with a mnemonic. + function tlvIdentNext(stream) { + var match; + return (match = stream.match(tlvIdentMatch, false)) && match[2].length > 0; + } + + CodeMirror.defineMIME("text/x-tlv", { + name: "verilog", + + hooks: { + + electricInput: false, + + + // Return undefined for verilog tokenizing, or style for TLV token (null not used). + // Standard CM styles are used for most formatting, but some TL-Verilog-specific highlighting + // can be enabled with the definition of cm-tlv-* styles, including highlighting for: + // - M4 tokens + // - TLV scope indentation + // - Statement delimitation (enabled by tlvTrackStatements) + token: function(stream, state) { + var style = undefined; + var match; // Return value of pattern matches. + + // Set highlighting mode based on code region (TLV or SV). + if (stream.sol() && ! state.tlvInBlockComment) { + // Process region. + if (stream.peek() == '\\') { + style = "def"; + stream.skipToEnd(); + if (stream.string.match(/\\SV/)) { + state.tlvCodeActive = false; + } else if (stream.string.match(/\\TLV/)){ + state.tlvCodeActive = true; + } + } + // Correct indentation in the face of a line prefix char. + if (state.tlvCodeActive && stream.pos == 0 && + (state.indented == 0) && (match = stream.match(tlvLineIndentationMatch, false))) { + state.indented = match[0].length; + } + + // Compute indentation state: + // o Auto indentation on next line + // o Indentation scope styles + var indented = state.indented; + var depth = indented / tlvIndentUnit; + if (depth <= state.tlvIndentationStyle.length) { + // not deeper than current scope + + var blankline = stream.string.length == indented; + var chPos = depth * tlvIndentUnit; + if (chPos < stream.string.length) { + var bodyString = stream.string.slice(chPos); + var ch = bodyString[0]; + if (tlvScopePrefixChars[ch] && ((match = bodyString.match(tlvIdentMatch)) && + tlvIdentifierStyle[match[1]])) { + // This line begins scope. + // Next line gets indented one level. + indented += tlvIndentUnit; + // Style the next level of indentation (except non-region keyword identifiers, + // which are statements themselves) + if (!(ch == "\\" && chPos > 0)) { + state.tlvIndentationStyle[depth] = tlvScopePrefixChars[ch]; + if (tlvTrackStatements) {state.statementComment = false;} + depth++; + } + } + } + // Clear out deeper indentation levels unless line is blank. + if (!blankline) { + while (state.tlvIndentationStyle.length > depth) { + state.tlvIndentationStyle.pop(); + } + } + } + // Set next level of indentation. + state.tlvNextIndent = indented; + } + + if (state.tlvCodeActive) { + // Highlight as TLV. + + var beginStatement = false; + if (tlvTrackStatements) { + // This starts a statement if the position is at the scope level + // and we're not within a statement leading comment. + beginStatement = + (stream.peek() != " ") && // not a space + (style === undefined) && // not a region identifier + !state.tlvInBlockComment && // not in block comment + //!stream.match(tlvCommentMatch, false) && // not comment start + (stream.column() == state.tlvIndentationStyle.length * tlvIndentUnit); // at scope level + if (beginStatement) { + if (state.statementComment) { + // statement already started by comment + beginStatement = false; + } + state.statementComment = + stream.match(tlvCommentMatch, false); // comment start + } + } + + var match; + if (style !== undefined) { + // Region line. + style += " " + tlvScopeStyle(state, 0, "scope-ident") + } else if (((stream.pos / tlvIndentUnit) < state.tlvIndentationStyle.length) && + (match = stream.match(stream.sol() ? tlvFirstLevelIndentMatch : /^ /))) { + // Indentation + style = // make this style distinct from the previous one to prevent + // codemirror from combining spans + "tlv-indent-" + (((stream.pos % 2) == 0) ? "even" : "odd") + + // and style it + " " + tlvScopeStyle(state, stream.pos - tlvIndentUnit, "indent"); + // Style the line prefix character. + if (match[0].charAt(0) == "!") { + style += " tlv-alert-line-prefix"; + } + // Place a class before a scope identifier. + if (tlvIdentNext(stream)) { + style += " " + tlvScopeStyle(state, stream.pos, "before-scope-ident"); + } + } else if (state.tlvInBlockComment) { + // In a block comment. + if (stream.match(/^.*?\*\//)) { + // Exit block comment. + state.tlvInBlockComment = false; + if (tlvTrackStatements && !stream.eol()) { + // Anything after comment is assumed to be real statement content. + state.statementComment = false; + } + } else { + stream.skipToEnd(); + } + style = "comment"; + } else if ((match = stream.match(tlvCommentMatch)) && !state.tlvInBlockComment) { + // Start comment. + if (match[0] == "//") { + // Line comment. + stream.skipToEnd(); + } else { + // Block comment. + state.tlvInBlockComment = true; + } + style = "comment"; + } else if (match = stream.match(tlvIdentMatch)) { + // looks like an identifier (or identifier prefix) + var prefix = match[1]; + var mnemonic = match[2]; + if (// is identifier prefix + tlvIdentifierStyle.hasOwnProperty(prefix) && + // has mnemonic or we're at the end of the line (maybe it hasn't been typed yet) + (mnemonic.length > 0 || stream.eol())) { + style = tlvIdentifierStyle[prefix]; + if (stream.column() == state.indented) { + // Begin scope. + style += " " + tlvScopeStyle(state, stream.column(), "scope-ident") + } + } else { + // Just swallow one character and try again. + // This enables subsequent identifier match with preceding symbol character, which + // is legal within a statement. (E.g., !$reset). It also enables detection of + // comment start with preceding symbols. + stream.backUp(stream.current().length - 1); + style = "tlv-default"; + } + } else if (stream.match(/^\t+/)) { + // Highlight tabs, which are illegal. + style = "tlv-tab"; + } else if (stream.match(/^[\[\]{}\(\);\:]+/)) { + // [:], (), {}, ;. + style = "meta"; + } else if (match = stream.match(/^[mM]4([\+_])?[\w\d_]*/)) { + // m4 pre proc + style = (match[1] == "+") ? "tlv-m4-plus" : "tlv-m4"; + } else if (stream.match(/^ +/)){ + // Skip over spaces. + if (stream.eol()) { + // Trailing spaces. + style = "error"; + } else { + // Non-trailing spaces. + style = "tlv-default"; + } + } else if (stream.match(/^[\w\d_]+/)) { + // alpha-numeric token. + style = "number"; + } else { + // Eat the next char w/ no formatting. + stream.next(); + style = "tlv-default"; + } + if (beginStatement) { + style += " tlv-statement"; + } + } else { + if (stream.match(/^[mM]4([\w\d_]*)/)) { + // m4 pre proc + style = "tlv-m4"; + } + } + return style; + }, + + indent: function(state) { + return (state.tlvCodeActive == true) ? state.tlvNextIndent : -1; + }, + + startState: function(state) { + state.tlvIndentationStyle = []; // Styles to use for each level of indentation. + state.tlvCodeActive = true; // True when we're in a TLV region (and at beginning of file). + state.tlvNextIndent = -1; // The number of spaces to autoindent the next line if tlvCodeActive. + state.tlvInBlockComment = false; // True inside /**/ comment. + if (tlvTrackStatements) { + state.statementComment = false; // True inside a statement's header comment. + } + } + + } + }); +}); diff --git a/js/codemirror/mode/vhdl/index.html b/js/codemirror/mode/vhdl/index.html new file mode 100644 index 0000000..0d254fb --- /dev/null +++ b/js/codemirror/mode/vhdl/index.html @@ -0,0 +1,95 @@ + + +CodeMirror: VHDL mode + + + + + + + + + + +
    +

    VHDL mode

    + +
    + + + +

    +Syntax highlighting and indentation for the VHDL language. +

    Configuration options:

    +
      +
    • atoms - List of atom words. Default: "null"
    • +
    • hooks - List of meta hooks. Default: ["`", "$"]
    • +
    • multiLineStrings - Whether multi-line strings are accepted. Default: false
    • +
    +

    + +

    MIME types defined: text/x-vhdl.

    +
    diff --git a/js/codemirror/mode/vhdl/vhdl.js b/js/codemirror/mode/vhdl/vhdl.js new file mode 100644 index 0000000..a7ddfd1 --- /dev/null +++ b/js/codemirror/mode/vhdl/vhdl.js @@ -0,0 +1,189 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Originally written by Alf Nielsen, re-written by Michael Zhou +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function words(str) { + var obj = {}, words = str.split(","); + for (var i = 0; i < words.length; ++i) { + var allCaps = words[i].toUpperCase(); + var firstCap = words[i].charAt(0).toUpperCase() + words[i].slice(1); + obj[words[i]] = true; + obj[allCaps] = true; + obj[firstCap] = true; + } + return obj; +} + +function metaHook(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; +} + +CodeMirror.defineMode("vhdl", function(config, parserConfig) { + var indentUnit = config.indentUnit, + atoms = parserConfig.atoms || words("null"), + hooks = parserConfig.hooks || {"`": metaHook, "$": metaHook}, + multiLineStrings = parserConfig.multiLineStrings; + + var keywords = words("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block," + + "body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case," + + "end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for," + + "function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage," + + "literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map," + + "postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal," + + "sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor"); + + var blockKeywords = words("architecture,entity,begin,case,port,else,elsif,end,for,function,if"); + + var isOperatorChar = /[&|~> + +CodeMirror: Vue.js mode + + + + + + + + + + + + + + + + + + + + + +
    +

    Vue.js mode

    +
    + + +

    MIME types defined: text/x-vue

    + +
    diff --git a/js/codemirror/mode/vue/vue.js b/js/codemirror/mode/vue/vue.js new file mode 100644 index 0000000..a0220bd --- /dev/null +++ b/js/codemirror/mode/vue/vue.js @@ -0,0 +1,77 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function (mod) { + "use strict"; + if (typeof exports === "object" && typeof module === "object") {// CommonJS + mod(require("../../lib/codemirror"), + require("../../addon/mode/overlay"), + require("../xml/xml"), + require("../javascript/javascript"), + require("../coffeescript/coffeescript"), + require("../css/css"), + require("../sass/sass"), + require("../stylus/stylus"), + require("../pug/pug"), + require("../handlebars/handlebars")); + } else if (typeof define === "function" && define.amd) { // AMD + define(["../../lib/codemirror", + "../../addon/mode/overlay", + "../xml/xml", + "../javascript/javascript", + "../coffeescript/coffeescript", + "../css/css", + "../sass/sass", + "../stylus/stylus", + "../pug/pug", + "../handlebars/handlebars"], mod); + } else { // Plain browser env + mod(CodeMirror); + } +})(function (CodeMirror) { + var tagLanguages = { + script: [ + ["lang", /coffee(script)?/, "coffeescript"], + ["type", /^(?:text|application)\/(?:x-)?coffee(?:script)?$/, "coffeescript"], + ["lang", /^babel$/, "javascript"], + ["type", /^text\/babel$/, "javascript"], + ["type", /^text\/ecmascript-\d+$/, "javascript"] + ], + style: [ + ["lang", /^stylus$/i, "stylus"], + ["lang", /^sass$/i, "sass"], + ["lang", /^less$/i, "text/x-less"], + ["lang", /^scss$/i, "text/x-scss"], + ["type", /^(text\/)?(x-)?styl(us)?$/i, "stylus"], + ["type", /^text\/sass/i, "sass"], + ["type", /^(text\/)?(x-)?scss$/i, "text/x-scss"], + ["type", /^(text\/)?(x-)?less$/i, "text/x-less"] + ], + template: [ + ["lang", /^vue-template$/i, "vue"], + ["lang", /^pug$/i, "pug"], + ["lang", /^handlebars$/i, "handlebars"], + ["type", /^(text\/)?(x-)?pug$/i, "pug"], + ["type", /^text\/x-handlebars-template$/i, "handlebars"], + [null, null, "vue-template"] + ] + }; + + CodeMirror.defineMode("vue-template", function (config, parserConfig) { + var mustacheOverlay = { + token: function (stream) { + if (stream.match(/^\{\{.*?\}\}/)) return "meta mustache"; + while (stream.next() && !stream.match("{{", false)) {} + return null; + } + }; + return CodeMirror.overlayMode(CodeMirror.getMode(config, parserConfig.backdrop || "text/html"), mustacheOverlay); + }); + + CodeMirror.defineMode("vue", function (config) { + return CodeMirror.getMode(config, {name: "htmlmixed", tags: tagLanguages}); + }, "htmlmixed", "xml", "javascript", "coffeescript", "css", "sass", "stylus", "pug", "handlebars"); + + CodeMirror.defineMIME("script/x-vue", "vue"); + CodeMirror.defineMIME("text/x-vue", "vue"); +}); diff --git a/js/codemirror/mode/wast/index.html b/js/codemirror/mode/wast/index.html new file mode 100644 index 0000000..977dfe8 --- /dev/null +++ b/js/codemirror/mode/wast/index.html @@ -0,0 +1,73 @@ + + +CodeMirror: WebAssembly mode + + + + + + + + + + +
    +

    WebAssembly mode

    + + +
    + + + +

    MIME types defined: text/webassembly.

    +
    diff --git a/js/codemirror/mode/wast/test.js b/js/codemirror/mode/wast/test.js new file mode 100644 index 0000000..b5f7c71 --- /dev/null +++ b/js/codemirror/mode/wast/test.js @@ -0,0 +1,424 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 4}, "wast"); + function MT(name) {test.mode(name, mode, Array.prototype.slice.call(arguments, 1));} + + MT('number-test', + '[number 0]', + '[number 123]', + '[number nan]', + '[number inf]', + '[number infinity]', + '[number 0.1]', + '[number 123.0]', + '[number 12E+99]'); + + MT('string-literals-test', + '[string "foo"]', + '[string "\\"foo\\""]', + '[string "foo #\\"# bar"]'); + + MT('atom-test', + '[atom funcref]', + '[atom externref]', + '[atom i32]', + '[atom i64]', + '[atom f32]', + '[atom f64]'); + + MT('keyword-test', + '[keyword br]', + '[keyword if]', + '[keyword loop]', + '[keyword i32.add]', + '[keyword local.get]'); + + MT('control-instructions', + '[keyword unreachable]', + '[keyword nop]', + '[keyword br] [variable-2 $label0]', + '[keyword br_if] [variable-2 $label0]', + '[keyword br_table] [variable-2 $label0] [variable-2 $label1] [variable-2 $label3]', + '[keyword return]', + '[keyword call] [variable-2 $func0]', + '[keyword call_indirect] [variable-2 $table] ([keyword param] [atom f32] [atom f64]) ([keyword result] [atom i32] [atom i64])', + '[keyword return_call] [variable-2 $func0]', + '[keyword return_call_indirect] ([keyword param] [atom f32] [atom f64]) ([keyword result] [atom i32] [atom i64])', + '[keyword select] ([keyword local.get] [number 1]) ([keyword local.get] [number 2]) ([keyword local.get] [number 3])', + '[keyword try] ([keyword result] [atom i32])', + '[keyword throw] [number 0]', + '[keyword rethrow] [number 0]', + '[keyword catch] [number 0]', + '[keyword catch_all]', + '[keyword delegate] [number 0]', + '[keyword unwind]'); + + + MT('memory-instructions', + '[keyword i32.load] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i32.load8_s] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i32.load8_u] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i32.load16_s] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i32.load16_u] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i32.store] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i32.store8] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i32.store16] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.store] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.load] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.load8_s] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.load8_u] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.load16_s] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.load16_u] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.load32_s] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.load32_u] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.store8] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.store16] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword i64.store32] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword f32.load] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword f32.store] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword f64.load] [keyword offset]=[number 4] [keyword align]=[number 4]', + '[keyword f64.store] [keyword offset]=[number 4] [keyword align]=[number 4]'); + + MT('atomic-memory-instructions', + '[keyword memory.atomic.notify] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword memory.atomic.wait32] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword memory.atomic.wait64] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.load] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.load8_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.load16_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.store] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.store8] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.store16] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.load] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.load8_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.load16_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.load32_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.store] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.store8] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.store16] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.store32] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw.add] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw8.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw16.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw.add] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw8.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw16.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw32.add_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw.sub] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw8.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw16.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw.sub] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw8.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw16.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw32.sub_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw.and] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw8.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw16.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw.and] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw8.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw16.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw32.and_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw.or] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw8.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw16.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw.or] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw8.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw16.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw32.or_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw.xor] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw8.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw16.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw.xor] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw8.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw16.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw32.xor_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw.xchg] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw8.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw16.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw.xchg] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw8.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw16.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw32.xchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw.cmpxchg] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw8.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i32.atomic.rmw16.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw.cmpxchg] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw8.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw16.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword i64.atomic.rmw32.cmpxchg_u] [keyword offset]=[number 32] [keyword align]=[number 4]'); + + MT('simd-instructions', + '[keyword v128.load] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword v128.load8x8_s] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load8x8_u] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load16x4_s] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load16x4_u] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load32x2_s] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load32x2_u] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load8_splat] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load16_splat] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load32_splat] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load64_splat] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.store] [keyword offset]=[number 32] [keyword align]=[number 4]', + '[keyword v128.const] [number 0] [number 1] [number 2] [number 3] [number 4] [number 5] [number 6] [number 7] [number 8] [number 9] [number 10] [number 11] [number 12] [number 13] [number 14] [number 15]', + '[keyword i8x16.shuffle] [number 0] [number 1] [number 2] [number 3] [number 4] [number 5] [number 6] [number 7] [number 8] [number 9] [number 10] [number 11] [number 12] [number 13] [number 14] [number 15]', + '[keyword i8x16.swizzle]', + '[keyword i8x16.splat]', + '[keyword i16x8.splat]', + '[keyword i32x4.splat]', + '[keyword i64x2.splat]', + '[keyword f32x4.splat]', + '[keyword f64x2.splat]', + '[keyword i8x16.extract_lane_s] [number 1]', + '[keyword i8x16.extract_lane_u] [number 1]', + '[keyword i8x16.replace_lane] [number 1]', + '[keyword i16x8.extract_lane_s] [number 1]', + '[keyword i16x8.extract_lane_u] [number 1]', + '[keyword i16x8.replace_lane] [number 1]', + '[keyword i32x4.extract_lane] [number 1]', + '[keyword i32x4.replace_lane] [number 1]', + '[keyword i64x2.extract_lane] [number 1]', + '[keyword i64x2.replace_lane] [number 1]', + '[keyword f32x4.extract_lane] [number 1]', + '[keyword f32x4.replace_lane] [number 1]', + '[keyword f64x2.extract_lane] [number 1]', + '[keyword f64x2.replace_lane] [number 1]', + '[keyword i8x16.eq]', + '[keyword i8x16.ne]', + '[keyword i8x16.lt_s]', + '[keyword i8x16.lt_u]', + '[keyword i8x16.gt_s]', + '[keyword i8x16.gt_u]', + '[keyword i8x16.le_s]', + '[keyword i8x16.le_u]', + '[keyword i8x16.ge_s]', + '[keyword i8x16.ge_u]', + '[keyword i16x8.eq]', + '[keyword i16x8.ne]', + '[keyword i16x8.lt_s]', + '[keyword i16x8.lt_u]', + '[keyword i16x8.gt_s]', + '[keyword i16x8.gt_u]', + '[keyword i16x8.le_s]', + '[keyword i16x8.le_u]', + '[keyword i16x8.ge_s]', + '[keyword i16x8.ge_u]', + '[keyword i32x4.eq]', + '[keyword i32x4.ne]', + '[keyword i32x4.lt_s]', + '[keyword i32x4.lt_u]', + '[keyword i32x4.gt_s]', + '[keyword i32x4.gt_u]', + '[keyword i32x4.le_s]', + '[keyword i32x4.le_u]', + '[keyword i32x4.ge_s]', + '[keyword i32x4.ge_u]', + '[keyword f32x4.eq]', + '[keyword f32x4.ne]', + '[keyword f32x4.lt]', + '[keyword f32x4.gt]', + '[keyword f32x4.le]', + '[keyword f32x4.ge]', + '[keyword f64x2.eq]', + '[keyword f64x2.ne]', + '[keyword f64x2.lt]', + '[keyword f64x2.gt]', + '[keyword f64x2.le]', + '[keyword f64x2.ge]', + '[keyword v128.not]', + '[keyword v128.and]', + '[keyword v128.andnot]', + '[keyword v128.or]', + '[keyword v128.xor]', + '[keyword v128.bitselect]', + '[keyword v128.any_true]', + '[keyword v128.load8_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.load16_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.load32_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.load64_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.store8_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.store16_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.store32_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.store64_lane] [keyword offset]=[number 64] [keyword align]=[number 0] [number 1]', + '[keyword v128.load32_zero] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword v128.load64_zero] [keyword offset]=[number 64] [keyword align]=[number 0]', + '[keyword f32x4.demote_f64x2_zero]', + '[keyword f64x2.promote_low_f32x4]', + '[keyword i8x16.abs]', + '[keyword i8x16.neg]', + '[keyword i8x16.popcnt]', + '[keyword i8x16.all_true]', + '[keyword i8x16.bitmask]', + '[keyword i8x16.narrow_i16x8_s]', + '[keyword i8x16.narrow_i16x8_u]', + '[keyword f32x4.ceil]', + '[keyword f32x4.floor]', + '[keyword f32x4.trunc]', + '[keyword f32x4.nearest]', + '[keyword i8x16.shl]', + '[keyword i8x16.shr_s]', + '[keyword i8x16.shr_u]', + '[keyword i8x16.add]', + '[keyword i8x16.add_sat_s]', + '[keyword i8x16.add_sat_u]', + '[keyword i8x16.sub]', + '[keyword i8x16.sub_sat_s]', + '[keyword i8x16.sub_sat_u]', + '[keyword f64x2.ceil]', + '[keyword f64x2.floor]', + '[keyword i8x16.min_s]', + '[keyword i8x16.min_u]', + '[keyword i8x16.max_s]', + '[keyword i8x16.max_u]', + '[keyword f64x2.trunc]', + '[keyword i8x16.avgr_u]', + '[keyword i16x8.extadd_pairwise_i8x16_s]', + '[keyword i16x8.extadd_pairwise_i8x16_u]', + '[keyword i32x4.extadd_pairwise_i16x8_s]', + '[keyword i32x4.extadd_pairwise_i16x8_u]', + '[keyword i16x8.abs]', + '[keyword i16x8.neg]', + '[keyword i16x8.q15mulr_sat_s]', + '[keyword i16x8.all_true]', + '[keyword i16x8.bitmask]', + '[keyword i16x8.narrow_i32x4_s]', + '[keyword i16x8.narrow_i32x4_u]', + '[keyword i16x8.extend_low_i8x16_s]', + '[keyword i16x8.extend_high_i8x16_s]', + '[keyword i16x8.extend_low_i8x16_u]', + '[keyword i16x8.extend_high_i8x16_u]', + '[keyword i16x8.shl]', + '[keyword i16x8.shr_s]', + '[keyword i16x8.shr_u]', + '[keyword i16x8.add]', + '[keyword i16x8.add_sat_s]', + '[keyword i16x8.add_sat_u]', + '[keyword i16x8.sub]', + '[keyword i16x8.sub_sat_s]', + '[keyword i16x8.sub_sat_u]', + '[keyword f64x2.nearest]', + '[keyword i16x8.mul]', + '[keyword i16x8.min_s]', + '[keyword i16x8.min_u]', + '[keyword i16x8.max_s]', + '[keyword i16x8.max_u]', + '[keyword i16x8.avgr_u]', + '[keyword i16x8.extmul_low_i8x16_s]', + '[keyword i16x8.extmul_high_i8x16_s]', + '[keyword i16x8.extmul_low_i8x16_u]', + '[keyword i16x8.extmul_high_i8x16_u]', + '[keyword i32x4.abs]', + '[keyword i32x4.neg]', + '[keyword i32x4.all_true]', + '[keyword i32x4.bitmask]', + '[keyword i32x4.extend_low_i16x8_s]', + '[keyword i32x4.extend_high_i16x8_s]', + '[keyword i32x4.extend_low_i16x8_u]', + '[keyword i32x4.extend_high_i16x8_u]', + '[keyword i32x4.shl]', + '[keyword i32x4.shr_s]', + '[keyword i32x4.shr_u]', + '[keyword i32x4.add]', + '[keyword i32x4.sub]', + '[keyword i32x4.mul]', + '[keyword i32x4.min_s]', + '[keyword i32x4.min_u]', + '[keyword i32x4.max_s]', + '[keyword i32x4.max_u]', + '[keyword i32x4.dot_i16x8_s]', + '[keyword i32x4.extmul_low_i16x8_s]', + '[keyword i32x4.extmul_high_i16x8_s]', + '[keyword i32x4.extmul_low_i16x8_u]', + '[keyword i32x4.extmul_high_i16x8_u]', + '[keyword i64x2.abs]', + '[keyword i64x2.neg]', + '[keyword i64x2.all_true]', + '[keyword i64x2.bitmask]', + '[keyword i64x2.extend_low_i32x4_s]', + '[keyword i64x2.extend_high_i32x4_s]', + '[keyword i64x2.extend_low_i32x4_u]', + '[keyword i64x2.extend_high_i32x4_u]', + '[keyword i64x2.shl]', + '[keyword i64x2.shr_s]', + '[keyword i64x2.shr_u]', + '[keyword i64x2.add]', + '[keyword i64x2.sub]', + '[keyword i64x2.mul]', + '[keyword i64x2.eq]', + '[keyword i64x2.ne]', + '[keyword i64x2.lt_s]', + '[keyword i64x2.gt_s]', + '[keyword i64x2.le_s]', + '[keyword i64x2.ge_s]', + '[keyword i64x2.extmul_low_i32x4_s]', + '[keyword i64x2.extmul_high_i32x4_s]', + '[keyword i64x2.extmul_low_i32x4_u]', + '[keyword i64x2.extmul_high_i32x4_u]', + '[keyword f32x4.abs]', + '[keyword f32x4.neg]', + '[keyword f32x4.sqrt]', + '[keyword f32x4.add]', + '[keyword f32x4.sub]', + '[keyword f32x4.mul]', + '[keyword f32x4.div]', + '[keyword f32x4.min]', + '[keyword f32x4.max]', + '[keyword f64x2.abs]', + '[keyword f64x2.neg]', + '[keyword f64x2.sqrt]', + '[keyword f64x2.add]', + '[keyword f64x2.sub]', + '[keyword f64x2.mul]', + '[keyword f64x2.div]', + '[keyword f64x2.min]', + '[keyword f64x2.max]', + '[keyword i32x4.trunc_sat_f32x4_s]', + '[keyword i32x4.trunc_sat_f32x4_u]', + '[keyword f32x4.convert_i32x4_s]', + '[keyword f32x4.convert_i32x4_u]', + '[keyword i32x4.trunc_sat_f64x2_s_zero]', + '[keyword i32x4.trunc_sat_f64x2_u_zero]', + '[keyword f64x2.convert_low_i32x4_s]', + '[keyword f64x2.convert_low_i32x4_u]'); + + MT('reference-type-instructions', + '[keyword ref.null] [keyword extern]', + '[keyword ref.null] [keyword func]', + '[keyword ref.is_null] ([keyword ref.func] [variable-2 $f])', + '[keyword ref.func] [variable-2 $f]'); + + MT('table-instructions', + '[keyword table.get] [variable-2 $t] ([keyword i32.const] [number 5])', + '[keyword table.set] [variable-2 $t] ([keyword i32.const] [number 5]) ([keyword ref.func] [variable-2 $f])', + '[keyword table.size] [variable-2 $t]', + '[keyword table.grow] [variable-2 $t] ([keyword ref.null] [keyword extern]) ([keyword i32.const] [number 5])', + '[keyword table.fill] [variable-2 $t] ([keyword i32.const] [number 5]) ([keyword param] [variable-2 $r] [atom externref]) ([keyword i32.const] [number 5])', + '[keyword table.init] [variable-2 $t] [number 1] ([keyword i32.const] [number 5]) ([keyword i32.const] [number 10]) ([keyword i32.const] [number 15])', + '[keyword table.copy] [variable-2 $t] [variable-2 $t2] ([keyword i32.const] [number 5]) ([keyword i32.const] [number 10]) ([keyword i32.const] [number 15])' + ); + MT('gc-proposal', + '[keyword call_ref] [keyword return_call_ref]', + '[keyword ref.as_non_null] [keyword br_on_null] [keyword ref.eq]'); + MT('gc-proposal-structs', + '[keyword struct.new_with_rtt] [keyword struct.new_default_with_rtt]', + '[keyword struct.get] [keyword struct.get_s] [keyword struct.get_u]', + '[keyword struct.set]'); + MT('gc-proposal-arrays', + '[keyword array.new_with_rtt] [keyword array.new_default_with_rtt]', + '[keyword array.get] [keyword array.get_s] [keyword array.get_u]', + '[keyword array.len] [keyword array.set]'); + MT('gc-proposal-i31', + '[keyword i31.new] [keyword i31.get_s] [keyword i31.get_u]'); + MT('gc-proposal-rtt', + '[keyword rtt.canon] [keyword rtt.sub]'); + MT('gc-proposal-typechecks', + '[keyword ref.test] [keyword ref.cast] [keyword br_on_cast]', + '[keyword ref.is_func] [keyword ref.is_data] [keyword ref.is_i31]', + '[keyword ref.as_func] [keyword ref.as_data] [keyword ref.as_i31]', + '[keyword br_on_func] [keyword br_on_data] [keyword br_on_i31]'); + MT('gc-proposal-types', + '[atom i8] [atom i16]', + '[atom anyref] [atom dataref] [atom eqref] [atom i31ref]'); +})(); diff --git a/js/codemirror/mode/wast/wast.js b/js/codemirror/mode/wast/wast.js new file mode 100644 index 0000000..0a0af85 --- /dev/null +++ b/js/codemirror/mode/wast/wast.js @@ -0,0 +1,132 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../../addon/mode/simple")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../../addon/mode/simple"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +var kKeywords = [ + "align", + "block", + "br(_if|_table|_on_(cast|data|func|i31|null))?", + "call(_indirect|_ref)?", + "current_memory", + "\\bdata\\b", + "catch(_all)?", + "delegate", + "drop", + "elem", + "else", + "end", + "export", + "\\bextern\\b", + "\\bfunc\\b", + "global(\\.(get|set))?", + "if", + "import", + "local(\\.(get|set|tee))?", + "loop", + "module", + "mut", + "nop", + "offset", + "param", + "result", + "rethrow", + "return(_call(_indirect|_ref)?)?", + "select", + "start", + "table(\\.(size|get|set|size|grow|fill|init|copy))?", + "then", + "throw", + "try", + "type", + "unreachable", + "unwind", + + // Numeric opcodes. + "i(32|64)\\.(store(8|16)|(load(8|16)_[su]))", + "i64\\.(load32_[su]|store32)", + "[fi](32|64)\\.(const|load|store)", + "f(32|64)\\.(abs|add|ceil|copysign|div|eq|floor|[gl][et]|max|min|mul|nearest|neg?|sqrt|sub|trunc)", + "i(32|64)\\.(a[dn]d|c[lt]z|(div|rem)_[su]|eqz?|[gl][te]_[su]|mul|ne|popcnt|rot[lr]|sh(l|r_[su])|sub|x?or)", + "i64\\.extend_[su]_i32", + "i32\\.wrap_i64", + "i(32|64)\\.trunc_f(32|64)_[su]", + "f(32|64)\\.convert_i(32|64)_[su]", + "f64\\.promote_f32", + "f32\\.demote_f64", + "f32\\.reinterpret_i32", + "i32\\.reinterpret_f32", + "f64\\.reinterpret_i64", + "i64\\.reinterpret_f64", + // Atomics. + "memory(\\.((atomic\\.(notify|wait(32|64)))|grow|size))?", + "i64\.atomic\\.(load32_u|store32|rmw32\\.(a[dn]d|sub|x?or|(cmp)?xchg)_u)", + "i(32|64)\\.atomic\\.(load((8|16)_u)?|store(8|16)?|rmw(\\.(a[dn]d|sub|x?or|(cmp)?xchg)|(8|16)\\.(a[dn]d|sub|x?or|(cmp)?xchg)_u))", + // SIMD. + "v128\\.load(8x8|16x4|32x2)_[su]", + "v128\\.load(8|16|32|64)_splat", + "v128\\.(load|store)(8|16|32|64)_lane", + "v128\\.load(32|64)_zero", + "v128\.(load|store|const|not|andnot|and|or|xor|bitselect|any_true)", + "i(8x16|16x8)\\.(extract_lane_[su]|(add|sub)_sat_[su]|avgr_u)", + "i(8x16|16x8|32x4|64x2)\\.(neg|add|sub|abs|shl|shr_[su]|all_true|bitmask|eq|ne|[lg][te]_s)", + "(i(8x16|16x8|32x4|64x2)|f(32x4|64x2))\.(splat|replace_lane)", + "i(8x16|16x8|32x4)\\.(([lg][te]_u)|((min|max)_[su]))", + "f(32x4|64x2)\\.(neg|add|sub|abs|nearest|eq|ne|[lg][te]|sqrt|mul|div|min|max|ceil|floor|trunc)", + "[fi](32x4|64x2)\\.extract_lane", + "i8x16\\.(shuffle|swizzle|popcnt|narrow_i16x8_[su])", + "i16x8\\.(narrow_i32x4_[su]|mul|extadd_pairwise_i8x16_[su]|q15mulr_sat_s)", + "i16x8\\.(extend|extmul)_(low|high)_i8x16_[su]", + "i32x4\\.(mul|dot_i16x8_s|trunc_sat_f64x2_[su]_zero)", + "i32x4\\.((extend|extmul)_(low|high)_i16x8_|trunc_sat_f32x4_|extadd_pairwise_i16x8_)[su]", + "i64x2\\.(mul|(extend|extmul)_(low|high)_i32x4_[su])", + "f32x4\\.(convert_i32x4_[su]|demote_f64x2_zero)", + "f64x2\\.(promote_low_f32x4|convert_low_i32x4_[su])", + // Reference types, function references, and GC. + "\\bany\\b", + "array\\.len", + "(array|struct)(\\.(new_(default_)?with_rtt|get(_[su])?|set))?", + "\\beq\\b", + "field", + "i31\\.(new|get_[su])", + "\\bnull\\b", + "ref(\\.(([ai]s_(data|func|i31))|cast|eq|func|(is_|as_non_)?null|test))?", + "rtt(\\.(canon|sub))?", +]; + +CodeMirror.defineSimpleMode('wast', { + start: [ + {regex: /[+\-]?(?:nan(?::0x[0-9a-fA-F]+)?|infinity|inf|0x[0-9a-fA-F]+\.?[0-9a-fA-F]*p[+\/-]?\d+|\d+(?:\.\d*)?[eE][+\-]?\d*|\d+\.\d*|0x[0-9a-fA-F]+|\d+)/, token: "number"}, + {regex: new RegExp(kKeywords.join('|')), token: "keyword"}, + {regex: /\b((any|data|eq|extern|i31|func)ref|[fi](32|64)|i(8|16))\b/, token: "atom"}, + {regex: /\$([a-zA-Z0-9_`\+\-\*\/\\\^~=<>!\?@#$%&|:\.]+)/, token: "variable-2"}, + {regex: /"(?:[^"\\\x00-\x1f\x7f]|\\[nt\\'"]|\\[0-9a-fA-F][0-9a-fA-F])*"/, token: "string"}, + {regex: /\(;.*?/, token: "comment", next: "comment"}, + {regex: /;;.*$/, token: "comment"}, + {regex: /\(/, indent: true}, + {regex: /\)/, dedent: true}, + ], + + comment: [ + {regex: /.*?;\)/, token: "comment", next: "start"}, + {regex: /.*/, token: "comment"}, + ], + + meta: { + dontIndentStates: ['comment'], + }, +}); + +// https://github.com/WebAssembly/design/issues/981 mentions text/webassembly, +// which seems like a reasonable choice, although it's not standard right now. +CodeMirror.defineMIME("text/webassembly", "wast"); + +}); diff --git a/js/codemirror/mode/webidl/index.html b/js/codemirror/mode/webidl/index.html new file mode 100644 index 0000000..d96ebca --- /dev/null +++ b/js/codemirror/mode/webidl/index.html @@ -0,0 +1,71 @@ + + +CodeMirror: Web IDL mode + + + + + + + + + + +
    +

    Web IDL mode

    + +
    + +
    + + + +

    MIME type defined: text/x-webidl.

    +
    diff --git a/js/codemirror/mode/webidl/webidl.js b/js/codemirror/mode/webidl/webidl.js new file mode 100644 index 0000000..7fa01da --- /dev/null +++ b/js/codemirror/mode/webidl/webidl.js @@ -0,0 +1,195 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); +}; + +var builtinArray = [ + "Clamp", + "Constructor", + "EnforceRange", + "Exposed", + "ImplicitThis", + "Global", "PrimaryGlobal", + "LegacyArrayClass", + "LegacyUnenumerableNamedProperties", + "LenientThis", + "NamedConstructor", + "NewObject", + "NoInterfaceObject", + "OverrideBuiltins", + "PutForwards", + "Replaceable", + "SameObject", + "TreatNonObjectAsNull", + "TreatNullAs", + "EmptyString", + "Unforgeable", + "Unscopeable" +]; +var builtins = wordRegexp(builtinArray); + +var typeArray = [ + "unsigned", "short", "long", // UnsignedIntegerType + "unrestricted", "float", "double", // UnrestrictedFloatType + "boolean", "byte", "octet", // Rest of PrimitiveType + "Promise", // PromiseType + "ArrayBuffer", "DataView", "Int8Array", "Int16Array", "Int32Array", + "Uint8Array", "Uint16Array", "Uint32Array", "Uint8ClampedArray", + "Float32Array", "Float64Array", // BufferRelatedType + "ByteString", "DOMString", "USVString", "sequence", "object", "RegExp", + "Error", "DOMException", "FrozenArray", // Rest of NonAnyType + "any", // Rest of SingleType + "void" // Rest of ReturnType +]; +var types = wordRegexp(typeArray); + +var keywordArray = [ + "attribute", "callback", "const", "deleter", "dictionary", "enum", "getter", + "implements", "inherit", "interface", "iterable", "legacycaller", "maplike", + "partial", "required", "serializer", "setlike", "setter", "static", + "stringifier", "typedef", // ArgumentNameKeyword except + // "unrestricted" + "optional", "readonly", "or" +]; +var keywords = wordRegexp(keywordArray); + +var atomArray = [ + "true", "false", // BooleanLiteral + "Infinity", "NaN", // FloatLiteral + "null" // Rest of ConstValue +]; +var atoms = wordRegexp(atomArray); + +CodeMirror.registerHelper("hintWords", "webidl", + builtinArray.concat(typeArray).concat(keywordArray).concat(atomArray)); + +var startDefArray = ["callback", "dictionary", "enum", "interface"]; +var startDefs = wordRegexp(startDefArray); + +var endDefArray = ["typedef"]; +var endDefs = wordRegexp(endDefArray); + +var singleOperators = /^[:<=>?]/; +var integers = /^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/; +var floats = /^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/; +var identifiers = /^_?[A-Za-z][0-9A-Z_a-z-]*/; +var identifiersEnd = /^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/; +var strings = /^"[^"]*"/; +var multilineComments = /^\/\*.*?\*\//; +var multilineCommentsStart = /^\/\*.*/; +var multilineCommentsEnd = /^.*?\*\//; + +function readToken(stream, state) { + // whitespace + if (stream.eatSpace()) return null; + + // comment + if (state.inComment) { + if (stream.match(multilineCommentsEnd)) { + state.inComment = false; + return "comment"; + } + stream.skipToEnd(); + return "comment"; + } + if (stream.match("//")) { + stream.skipToEnd(); + return "comment"; + } + if (stream.match(multilineComments)) return "comment"; + if (stream.match(multilineCommentsStart)) { + state.inComment = true; + return "comment"; + } + + // integer and float + if (stream.match(/^-?[0-9\.]/, false)) { + if (stream.match(integers) || stream.match(floats)) return "number"; + } + + // string + if (stream.match(strings)) return "string"; + + // identifier + if (state.startDef && stream.match(identifiers)) return "def"; + + if (state.endDef && stream.match(identifiersEnd)) { + state.endDef = false; + return "def"; + } + + if (stream.match(keywords)) return "keyword"; + + if (stream.match(types)) { + var lastToken = state.lastToken; + var nextToken = (stream.match(/^\s*(.+?)\b/, false) || [])[1]; + + if (lastToken === ":" || lastToken === "implements" || + nextToken === "implements" || nextToken === "=") { + // Used as identifier + return "builtin"; + } else { + // Used as type + return "variable-3"; + } + } + + if (stream.match(builtins)) return "builtin"; + if (stream.match(atoms)) return "atom"; + if (stream.match(identifiers)) return "variable"; + + // other + if (stream.match(singleOperators)) return "operator"; + + // unrecognized + stream.next(); + return null; +}; + +CodeMirror.defineMode("webidl", function() { + return { + startState: function() { + return { + // Is in multiline comment + inComment: false, + // Last non-whitespace, matched token + lastToken: "", + // Next token is a definition + startDef: false, + // Last token of the statement is a definition + endDef: false + }; + }, + token: function(stream, state) { + var style = readToken(stream, state); + + if (style) { + var cur = stream.current(); + state.lastToken = cur; + if (style === "keyword") { + state.startDef = startDefs.test(cur); + state.endDef = state.endDef || endDefs.test(cur); + } else { + state.startDef = false; + } + } + + return style; + } + }; +}); + +CodeMirror.defineMIME("text/x-webidl", "webidl"); +}); diff --git a/js/codemirror/mode/xml/index.html b/js/codemirror/mode/xml/index.html new file mode 100644 index 0000000..c0f5e84 --- /dev/null +++ b/js/codemirror/mode/xml/index.html @@ -0,0 +1,61 @@ + + +CodeMirror: XML mode + + + + + + + + + +
    +

    XML mode

    +
    + +

    The XML mode supports these configuration parameters:

    +
    +
    htmlMode (boolean)
    +
    This switches the mode to parse HTML instead of XML. This + means attributes do not have to be quoted, and some elements + (such as br) do not require a closing tag.
    +
    matchClosing (boolean)
    +
    Controls whether the mode checks that close tags match the + corresponding opening tag, and highlights mismatches as errors. + Defaults to true.
    +
    alignCDATA (boolean)
    +
    Setting this to true will force the opening tag of CDATA + blocks to not be indented.
    +
    + +

    MIME types defined: application/xml, text/html.

    +
    diff --git a/js/codemirror/mode/xml/test.js b/js/codemirror/mode/xml/test.js new file mode 100644 index 0000000..ab37611 --- /dev/null +++ b/js/codemirror/mode/xml/test.js @@ -0,0 +1,51 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "xml"), mname = "xml"; + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), mname); } + + MT("matching", + "[tag&bracket <][tag top][tag&bracket >]", + " text", + " [tag&bracket <][tag inner][tag&bracket />]", + "[tag&bracket ]"); + + MT("nonmatching", + "[tag&bracket <][tag top][tag&bracket >]", + " [tag&bracket <][tag inner][tag&bracket />]", + " [tag&bracket ]"); + + MT("doctype", + "[meta ]", + "[tag&bracket <][tag top][tag&bracket />]"); + + MT("cdata", + "[tag&bracket <][tag top][tag&bracket >]", + " [atom ]", + "[tag&bracket ]"); + + // HTML tests + mode = CodeMirror.getMode({indentUnit: 2}, "text/html"); + + MT("selfclose", + "[tag&bracket <][tag html][tag&bracket >]", + " [tag&bracket <][tag link] [attribute rel]=[string stylesheet] [attribute href]=[string \"/foobar\"][tag&bracket >]", + "[tag&bracket ]"); + + MT("list", + "[tag&bracket <][tag ol][tag&bracket >]", + " [tag&bracket <][tag li][tag&bracket >]one", + " [tag&bracket <][tag li][tag&bracket >]two", + "[tag&bracket ]"); + + MT("valueless", + "[tag&bracket <][tag input] [attribute type]=[string checkbox] [attribute checked][tag&bracket />]"); + + MT("pThenArticle", + "[tag&bracket <][tag p][tag&bracket >]", + " foo", + "[tag&bracket <][tag article][tag&bracket >]bar"); + +})(); diff --git a/js/codemirror/mode/xml/xml.js b/js/codemirror/mode/xml/xml.js new file mode 100644 index 0000000..701e151 --- /dev/null +++ b/js/codemirror/mode/xml/xml.js @@ -0,0 +1,417 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +var htmlConfig = { + autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true, + 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true, + 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true, + 'track': true, 'wbr': true, 'menuitem': true}, + implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true, + 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true, + 'th': true, 'tr': true}, + contextGrabbers: { + 'dd': {'dd': true, 'dt': true}, + 'dt': {'dd': true, 'dt': true}, + 'li': {'li': true}, + 'option': {'option': true, 'optgroup': true}, + 'optgroup': {'optgroup': true}, + 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true, + 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true, + 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true, + 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true, + 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true}, + 'rp': {'rp': true, 'rt': true}, + 'rt': {'rp': true, 'rt': true}, + 'tbody': {'tbody': true, 'tfoot': true}, + 'td': {'td': true, 'th': true}, + 'tfoot': {'tbody': true}, + 'th': {'td': true, 'th': true}, + 'thead': {'tbody': true, 'tfoot': true}, + 'tr': {'tr': true} + }, + doNotIndent: {"pre": true}, + allowUnquoted: true, + allowMissing: true, + caseFold: true +} + +var xmlConfig = { + autoSelfClosers: {}, + implicitlyClosed: {}, + contextGrabbers: {}, + doNotIndent: {}, + allowUnquoted: false, + allowMissing: false, + allowMissingTagName: false, + caseFold: false +} + +CodeMirror.defineMode("xml", function(editorConf, config_) { + var indentUnit = editorConf.indentUnit + var config = {} + var defaults = config_.htmlMode ? htmlConfig : xmlConfig + for (var prop in defaults) config[prop] = defaults[prop] + for (var prop in config_) config[prop] = config_[prop] + + // Return variables for tokenizers + var type, setStyle; + + function inText(stream, state) { + function chain(parser) { + state.tokenize = parser; + return parser(stream, state); + } + + var ch = stream.next(); + if (ch == "<") { + if (stream.eat("!")) { + if (stream.eat("[")) { + if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); + else return null; + } else if (stream.match("--")) { + return chain(inBlock("comment", "-->")); + } else if (stream.match("DOCTYPE", true, true)) { + stream.eatWhile(/[\w\._\-]/); + return chain(doctype(1)); + } else { + return null; + } + } else if (stream.eat("?")) { + stream.eatWhile(/[\w\._\-]/); + state.tokenize = inBlock("meta", "?>"); + return "meta"; + } else { + type = stream.eat("/") ? "closeTag" : "openTag"; + state.tokenize = inTag; + return "tag bracket"; + } + } else if (ch == "&") { + var ok; + if (stream.eat("#")) { + if (stream.eat("x")) { + ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";"); + } else { + ok = stream.eatWhile(/[\d]/) && stream.eat(";"); + } + } else { + ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";"); + } + return ok ? "atom" : "error"; + } else { + stream.eatWhile(/[^&<]/); + return null; + } + } + inText.isInText = true; + + function inTag(stream, state) { + var ch = stream.next(); + if (ch == ">" || (ch == "/" && stream.eat(">"))) { + state.tokenize = inText; + type = ch == ">" ? "endTag" : "selfcloseTag"; + return "tag bracket"; + } else if (ch == "=") { + type = "equals"; + return null; + } else if (ch == "<") { + state.tokenize = inText; + state.state = baseState; + state.tagName = state.tagStart = null; + var next = state.tokenize(stream, state); + return next ? next + " tag error" : "tag error"; + } else if (/[\'\"]/.test(ch)) { + state.tokenize = inAttribute(ch); + state.stringStartCol = stream.column(); + return state.tokenize(stream, state); + } else { + stream.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/); + return "word"; + } + } + + function inAttribute(quote) { + var closure = function(stream, state) { + while (!stream.eol()) { + if (stream.next() == quote) { + state.tokenize = inTag; + break; + } + } + return "string"; + }; + closure.isInAttribute = true; + return closure; + } + + function inBlock(style, terminator) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + state.tokenize = inText; + break; + } + stream.next(); + } + return style; + } + } + + function doctype(depth) { + return function(stream, state) { + var ch; + while ((ch = stream.next()) != null) { + if (ch == "<") { + state.tokenize = doctype(depth + 1); + return state.tokenize(stream, state); + } else if (ch == ">") { + if (depth == 1) { + state.tokenize = inText; + break; + } else { + state.tokenize = doctype(depth - 1); + return state.tokenize(stream, state); + } + } + } + return "meta"; + }; + } + + function lower(tagName) { + return tagName && tagName.toLowerCase(); + } + + function Context(state, tagName, startOfLine) { + this.prev = state.context; + this.tagName = tagName || ""; + this.indent = state.indented; + this.startOfLine = startOfLine; + if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent)) + this.noIndent = true; + } + function popContext(state) { + if (state.context) state.context = state.context.prev; + } + function maybePopContext(state, nextTagName) { + var parentTagName; + while (true) { + if (!state.context) { + return; + } + parentTagName = state.context.tagName; + if (!config.contextGrabbers.hasOwnProperty(lower(parentTagName)) || + !config.contextGrabbers[lower(parentTagName)].hasOwnProperty(lower(nextTagName))) { + return; + } + popContext(state); + } + } + + function baseState(type, stream, state) { + if (type == "openTag") { + state.tagStart = stream.column(); + return tagNameState; + } else if (type == "closeTag") { + return closeTagNameState; + } else { + return baseState; + } + } + function tagNameState(type, stream, state) { + if (type == "word") { + state.tagName = stream.current(); + setStyle = "tag"; + return attrState; + } else if (config.allowMissingTagName && type == "endTag") { + setStyle = "tag bracket"; + return attrState(type, stream, state); + } else { + setStyle = "error"; + return tagNameState; + } + } + function closeTagNameState(type, stream, state) { + if (type == "word") { + var tagName = stream.current(); + if (state.context && state.context.tagName != tagName && + config.implicitlyClosed.hasOwnProperty(lower(state.context.tagName))) + popContext(state); + if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) { + setStyle = "tag"; + return closeState; + } else { + setStyle = "tag error"; + return closeStateErr; + } + } else if (config.allowMissingTagName && type == "endTag") { + setStyle = "tag bracket"; + return closeState(type, stream, state); + } else { + setStyle = "error"; + return closeStateErr; + } + } + + function closeState(type, _stream, state) { + if (type != "endTag") { + setStyle = "error"; + return closeState; + } + popContext(state); + return baseState; + } + function closeStateErr(type, stream, state) { + setStyle = "error"; + return closeState(type, stream, state); + } + + function attrState(type, _stream, state) { + if (type == "word") { + setStyle = "attribute"; + return attrEqState; + } else if (type == "endTag" || type == "selfcloseTag") { + var tagName = state.tagName, tagStart = state.tagStart; + state.tagName = state.tagStart = null; + if (type == "selfcloseTag" || + config.autoSelfClosers.hasOwnProperty(lower(tagName))) { + maybePopContext(state, tagName); + } else { + maybePopContext(state, tagName); + state.context = new Context(state, tagName, tagStart == state.indented); + } + return baseState; + } + setStyle = "error"; + return attrState; + } + function attrEqState(type, stream, state) { + if (type == "equals") return attrValueState; + if (!config.allowMissing) setStyle = "error"; + return attrState(type, stream, state); + } + function attrValueState(type, stream, state) { + if (type == "string") return attrContinuedState; + if (type == "word" && config.allowUnquoted) {setStyle = "string"; return attrState;} + setStyle = "error"; + return attrState(type, stream, state); + } + function attrContinuedState(type, stream, state) { + if (type == "string") return attrContinuedState; + return attrState(type, stream, state); + } + + return { + startState: function(baseIndent) { + var state = {tokenize: inText, + state: baseState, + indented: baseIndent || 0, + tagName: null, tagStart: null, + context: null} + if (baseIndent != null) state.baseIndent = baseIndent + return state + }, + + token: function(stream, state) { + if (!state.tagName && stream.sol()) + state.indented = stream.indentation(); + + if (stream.eatSpace()) return null; + type = null; + var style = state.tokenize(stream, state); + if ((style || type) && style != "comment") { + setStyle = null; + state.state = state.state(type || style, stream, state); + if (setStyle) + style = setStyle == "error" ? style + " error" : setStyle; + } + return style; + }, + + indent: function(state, textAfter, fullLine) { + var context = state.context; + // Indent multi-line strings (e.g. css). + if (state.tokenize.isInAttribute) { + if (state.tagStart == state.indented) + return state.stringStartCol + 1; + else + return state.indented + indentUnit; + } + if (context && context.noIndent) return CodeMirror.Pass; + if (state.tokenize != inTag && state.tokenize != inText) + return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0; + // Indent the starts of attribute names. + if (state.tagName) { + if (config.multilineTagIndentPastTag !== false) + return state.tagStart + state.tagName.length + 2; + else + return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1); + } + if (config.alignCDATA && /$/, + blockCommentStart: "", + + configuration: config.htmlMode ? "html" : "xml", + helperType: config.htmlMode ? "html" : "xml", + + skipAttribute: function(state) { + if (state.state == attrValueState) + state.state = attrState + }, + + xmlCurrentTag: function(state) { + return state.tagName ? {name: state.tagName, close: state.type == "closeTag"} : null + }, + + xmlCurrentContext: function(state) { + var context = [] + for (var cx = state.context; cx; cx = cx.prev) + context.push(cx.tagName) + return context.reverse() + } + }; +}); + +CodeMirror.defineMIME("text/xml", "xml"); +CodeMirror.defineMIME("application/xml", "xml"); +if (!CodeMirror.mimeModes.hasOwnProperty("text/html")) + CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true}); + +}); diff --git a/js/codemirror/mode/xquery/index.html b/js/codemirror/mode/xquery/index.html new file mode 100644 index 0000000..f9466dd --- /dev/null +++ b/js/codemirror/mode/xquery/index.html @@ -0,0 +1,211 @@ + + +CodeMirror: XQuery mode + + + + + + + + + + + +
    +

    XQuery mode

    + + +
    + +
    + + + +

    MIME types defined: application/xquery.

    + +

    Development of the CodeMirror XQuery mode was sponsored by + MarkLogic and developed by + Mike Brevoort. +

    + +
    diff --git a/js/codemirror/mode/xquery/test.js b/js/codemirror/mode/xquery/test.js new file mode 100644 index 0000000..4d559fd --- /dev/null +++ b/js/codemirror/mode/xquery/test.js @@ -0,0 +1,67 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Don't take these too seriously -- the expected results appear to be +// based on the results of actual runs without any serious manual +// verification. If a change you made causes them to fail, the test is +// as likely to wrong as the code. + +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, "xquery"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("eviltest", + "[keyword xquery] [keyword version] [variable "1][keyword .][atom 0][keyword -][variable ml"][def&variable ;] [comment (: this is : a \"comment\" :)]", + " [keyword let] [variable $let] [keyword :=] [variable <x] [variable attr][keyword =][variable "value">"test"<func>][def&variable ;function]() [variable $var] {[keyword function]()} {[variable $var]}[variable <][keyword /][variable func><][keyword /][variable x>]", + " [keyword let] [variable $joe][keyword :=][atom 1]", + " [keyword return] [keyword element] [variable element] {", + " [keyword attribute] [variable attribute] { [atom 1] },", + " [keyword element] [variable test] { [variable 'a'] }, [keyword attribute] [variable foo] { [variable "bar"] },", + " [def&variable fn:doc]()[[ [variable foo][keyword /][variable @bar] [keyword eq] [variable $let] ]],", + " [keyword //][variable x] } [comment (: a more 'evil' test :)]", + " [comment (: Modified Blakeley example (: with nested comment :) ... :)]", + " [keyword declare] [variable private] [keyword function] [def&variable local:declare]() {()}[variable ;]", + " [keyword declare] [variable private] [keyword function] [def&variable local:private]() {()}[variable ;]", + " [keyword declare] [variable private] [keyword function] [def&variable local:function]() {()}[variable ;]", + " [keyword declare] [variable private] [keyword function] [def&variable local:local]() {()}[variable ;]", + " [keyword let] [variable $let] [keyword :=] [variable <let>let] [variable $let] [keyword :=] [variable "let"<][keyword /let][variable >]", + " [keyword return] [keyword element] [variable element] {", + " [keyword attribute] [variable attribute] { [keyword try] { [def&variable xdmp:version]() } [keyword catch]([variable $e]) { [def&variable xdmp:log]([variable $e]) } },", + " [keyword attribute] [variable fn:doc] { [variable "bar"] [keyword castable] [keyword as] [atom xs:string] },", + " [keyword element] [variable text] { [keyword text] { [variable "text"] } },", + " [def&variable fn:doc]()[[ [qualifier child::][variable eq][keyword /]([variable @bar] [keyword |] [qualifier attribute::][variable attribute]) [keyword eq] [variable $let] ]],", + " [keyword //][variable fn:doc]", + " }"); + + MT("testEmptySequenceKeyword", + "[string \"foo\"] [keyword instance] [keyword of] [keyword empty-sequence]()"); + + MT("testMultiAttr", + "[tag

    ][variable hello] [variable world][tag

    ]"); + + MT("test namespaced variable", + "[keyword declare] [keyword namespace] [variable e] [keyword =] [string \"http://example.com/ANamespace\"][variable ;declare] [keyword variable] [variable $e:exampleComThisVarIsNotRecognized] [keyword as] [keyword element]([keyword *]) [variable external;]"); + + MT("test EQName variable", + "[keyword declare] [keyword variable] [variable $\"http://www.example.com/ns/my\":var] [keyword :=] [atom 12][variable ;]", + "[tag ]{[variable $\"http://www.example.com/ns/my\":var]}[tag ]"); + + MT("test EQName function", + "[keyword declare] [keyword function] [def&variable \"http://www.example.com/ns/my\":fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {", + " [variable $a] [keyword +] [atom 2]", + "}[variable ;]", + "[tag ]{[def&variable \"http://www.example.com/ns/my\":fn]([atom 12])}[tag ]"); + + MT("test EQName function with single quotes", + "[keyword declare] [keyword function] [def&variable 'http://www.example.com/ns/my':fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {", + " [variable $a] [keyword +] [atom 2]", + "}[variable ;]", + "[tag ]{[def&variable 'http://www.example.com/ns/my':fn]([atom 12])}[tag ]"); + + MT("testProcessingInstructions", + "[def&variable data]([comment&meta ]) [keyword instance] [keyword of] [atom xs:string]"); + + MT("testQuoteEscapeDouble", + "[keyword let] [variable $rootfolder] [keyword :=] [string \"c:\\builds\\winnt\\HEAD\\qa\\scripts\\\"]", + "[keyword let] [variable $keysfolder] [keyword :=] [def&variable concat]([variable $rootfolder], [string \"keys\\\"])"); +})(); diff --git a/js/codemirror/mode/xquery/xquery.js b/js/codemirror/mode/xquery/xquery.js new file mode 100644 index 0000000..e9ae43b --- /dev/null +++ b/js/codemirror/mode/xquery/xquery.js @@ -0,0 +1,448 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("xquery", function() { + + // The keywords object is set to the result of this self executing + // function. Each keyword is a property of the keywords object whose + // value is {type: atype, style: astyle} + var keywords = function(){ + // convenience functions used to build keywords object + function kw(type) {return {type: type, style: "keyword"};} + var operator = kw("operator") + , atom = {type: "atom", style: "atom"} + , punctuation = {type: "punctuation", style: null} + , qualifier = {type: "axis_specifier", style: "qualifier"}; + + // kwObj is what is return from this function at the end + var kwObj = { + ',': punctuation + }; + + // a list of 'basic' keywords. For each add a property to kwObj with the value of + // {type: basic[i], style: "keyword"} e.g. 'after' --> {type: "after", style: "keyword"} + var basic = ['after', 'all', 'allowing', 'ancestor', 'ancestor-or-self', 'any', 'array', 'as', + 'ascending', 'at', 'attribute', 'base-uri', 'before', 'boundary-space', 'by', 'case', 'cast', + 'castable', 'catch', 'child', 'collation', 'comment', 'construction', 'contains', 'content', + 'context', 'copy', 'copy-namespaces', 'count', 'decimal-format', 'declare', 'default', 'delete', + 'descendant', 'descendant-or-self', 'descending', 'diacritics', 'different', 'distance', + 'document', 'document-node', 'element', 'else', 'empty', 'empty-sequence', 'encoding', 'end', + 'entire', 'every', 'exactly', 'except', 'external', 'first', 'following', 'following-sibling', + 'for', 'from', 'ftand', 'ftnot', 'ft-option', 'ftor', 'function', 'fuzzy', 'greatest', 'group', + 'if', 'import', 'in', 'inherit', 'insensitive', 'insert', 'instance', 'intersect', 'into', + 'invoke', 'is', 'item', 'language', 'last', 'lax', 'least', 'let', 'levels', 'lowercase', 'map', + 'modify', 'module', 'most', 'namespace', 'next', 'no', 'node', 'nodes', 'no-inherit', + 'no-preserve', 'not', 'occurs', 'of', 'only', 'option', 'order', 'ordered', 'ordering', + 'paragraph', 'paragraphs', 'parent', 'phrase', 'preceding', 'preceding-sibling', 'preserve', + 'previous', 'processing-instruction', 'relationship', 'rename', 'replace', 'return', + 'revalidation', 'same', 'satisfies', 'schema', 'schema-attribute', 'schema-element', 'score', + 'self', 'sensitive', 'sentence', 'sentences', 'sequence', 'skip', 'sliding', 'some', 'stable', + 'start', 'stemming', 'stop', 'strict', 'strip', 'switch', 'text', 'then', 'thesaurus', 'times', + 'to', 'transform', 'treat', 'try', 'tumbling', 'type', 'typeswitch', 'union', 'unordered', + 'update', 'updating', 'uppercase', 'using', 'validate', 'value', 'variable', 'version', + 'weight', 'when', 'where', 'wildcards', 'window', 'with', 'without', 'word', 'words', 'xquery']; + for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i]);}; + + // a list of types. For each add a property to kwObj with the value of + // {type: "atom", style: "atom"} + var types = ['xs:anyAtomicType', 'xs:anySimpleType', 'xs:anyType', 'xs:anyURI', + 'xs:base64Binary', 'xs:boolean', 'xs:byte', 'xs:date', 'xs:dateTime', 'xs:dateTimeStamp', + 'xs:dayTimeDuration', 'xs:decimal', 'xs:double', 'xs:duration', 'xs:ENTITIES', 'xs:ENTITY', + 'xs:float', 'xs:gDay', 'xs:gMonth', 'xs:gMonthDay', 'xs:gYear', 'xs:gYearMonth', 'xs:hexBinary', + 'xs:ID', 'xs:IDREF', 'xs:IDREFS', 'xs:int', 'xs:integer', 'xs:item', 'xs:java', 'xs:language', + 'xs:long', 'xs:Name', 'xs:NCName', 'xs:negativeInteger', 'xs:NMTOKEN', 'xs:NMTOKENS', + 'xs:nonNegativeInteger', 'xs:nonPositiveInteger', 'xs:normalizedString', 'xs:NOTATION', + 'xs:numeric', 'xs:positiveInteger', 'xs:precisionDecimal', 'xs:QName', 'xs:short', 'xs:string', + 'xs:time', 'xs:token', 'xs:unsignedByte', 'xs:unsignedInt', 'xs:unsignedLong', + 'xs:unsignedShort', 'xs:untyped', 'xs:untypedAtomic', 'xs:yearMonthDuration']; + for(var i=0, l=types.length; i < l; i++) { kwObj[types[i]] = atom;}; + + // each operator will add a property to kwObj with value of {type: "operator", style: "keyword"} + var operators = ['eq', 'ne', 'lt', 'le', 'gt', 'ge', ':=', '=', '>', '>=', '<', '<=', '.', '|', '?', 'and', 'or', 'div', 'idiv', 'mod', '*', '/', '+', '-']; + for(var i=0, l=operators.length; i < l; i++) { kwObj[operators[i]] = operator;}; + + // each axis_specifiers will add a property to kwObj with value of {type: "axis_specifier", style: "qualifier"} + var axis_specifiers = ["self::", "attribute::", "child::", "descendant::", "descendant-or-self::", "parent::", + "ancestor::", "ancestor-or-self::", "following::", "preceding::", "following-sibling::", "preceding-sibling::"]; + for(var i=0, l=axis_specifiers.length; i < l; i++) { kwObj[axis_specifiers[i]] = qualifier; }; + + return kwObj; + }(); + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + // the primary mode tokenizer + function tokenBase(stream, state) { + var ch = stream.next(), + mightBeFunction = false, + isEQName = isEQNameAhead(stream); + + // an XML tag (if not in some sub, chained tokenizer) + if (ch == "<") { + if(stream.match("!--", true)) + return chain(stream, state, tokenXMLComment); + + if(stream.match("![CDATA", false)) { + state.tokenize = tokenCDATA; + return "tag"; + } + + if(stream.match("?", false)) { + return chain(stream, state, tokenPreProcessing); + } + + var isclose = stream.eat("/"); + stream.eatSpace(); + var tagName = "", c; + while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; + + return chain(stream, state, tokenTag(tagName, isclose)); + } + // start code block + else if(ch == "{") { + pushStateStack(state, { type: "codeblock"}); + return null; + } + // end code block + else if(ch == "}") { + popStateStack(state); + return null; + } + // if we're in an XML block + else if(isInXmlBlock(state)) { + if(ch == ">") + return "tag"; + else if(ch == "/" && stream.eat(">")) { + popStateStack(state); + return "tag"; + } + else + return "variable"; + } + // if a number + else if (/\d/.test(ch)) { + stream.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/); + return "atom"; + } + // comment start + else if (ch === "(" && stream.eat(":")) { + pushStateStack(state, { type: "comment"}); + return chain(stream, state, tokenComment); + } + // quoted string + else if (!isEQName && (ch === '"' || ch === "'")) + return chain(stream, state, tokenString(ch)); + // variable + else if(ch === "$") { + return chain(stream, state, tokenVariable); + } + // assignment + else if(ch ===":" && stream.eat("=")) { + return "keyword"; + } + // open paren + else if(ch === "(") { + pushStateStack(state, { type: "paren"}); + return null; + } + // close paren + else if(ch === ")") { + popStateStack(state); + return null; + } + // open paren + else if(ch === "[") { + pushStateStack(state, { type: "bracket"}); + return null; + } + // close paren + else if(ch === "]") { + popStateStack(state); + return null; + } + else { + var known = keywords.propertyIsEnumerable(ch) && keywords[ch]; + + // if there's a EQName ahead, consume the rest of the string portion, it's likely a function + if(isEQName && ch === '\"') while(stream.next() !== '"'){} + if(isEQName && ch === '\'') while(stream.next() !== '\''){} + + // gobble up a word if the character is not known + if(!known) stream.eatWhile(/[\w\$_-]/); + + // gobble a colon in the case that is a lib func type call fn:doc + var foundColon = stream.eat(":"); + + // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier + // which should get matched as a keyword + if(!stream.eat(":") && foundColon) { + stream.eatWhile(/[\w\$_-]/); + } + // if the next non whitespace character is an open paren, this is probably a function (if not a keyword of other sort) + if(stream.match(/^[ \t]*\(/, false)) { + mightBeFunction = true; + } + // is the word a keyword? + var word = stream.current(); + known = keywords.propertyIsEnumerable(word) && keywords[word]; + + // if we think it's a function call but not yet known, + // set style to variable for now for lack of something better + if(mightBeFunction && !known) known = {type: "function_call", style: "variable def"}; + + // if the previous word was element, attribute, axis specifier, this word should be the name of that + if(isInXmlConstructor(state)) { + popStateStack(state); + return "variable"; + } + // as previously checked, if the word is element,attribute, axis specifier, call it an "xmlconstructor" and + // push the stack so we know to look for it on the next word + if(word == "element" || word == "attribute" || known.type == "axis_specifier") pushStateStack(state, {type: "xmlconstructor"}); + + // if the word is known, return the details of that else just call this a generic 'word' + return known ? known.style : "variable"; + } + } + + // handle comments, including nested + function tokenComment(stream, state) { + var maybeEnd = false, maybeNested = false, nestedCount = 0, ch; + while (ch = stream.next()) { + if (ch == ")" && maybeEnd) { + if(nestedCount > 0) + nestedCount--; + else { + popStateStack(state); + break; + } + } + else if(ch == ":" && maybeNested) { + nestedCount++; + } + maybeEnd = (ch == ":"); + maybeNested = (ch == "("); + } + + return "comment"; + } + + // tokenizer for string literals + // optionally pass a tokenizer function to set state.tokenize back to when finished + function tokenString(quote, f) { + return function(stream, state) { + var ch; + + if(isInString(state) && stream.current() == quote) { + popStateStack(state); + if(f) state.tokenize = f; + return "string"; + } + + pushStateStack(state, { type: "string", name: quote, tokenize: tokenString(quote, f) }); + + // if we're in a string and in an XML block, allow an embedded code block + if(stream.match("{", false) && isInXmlAttributeBlock(state)) { + state.tokenize = tokenBase; + return "string"; + } + + + while (ch = stream.next()) { + if (ch == quote) { + popStateStack(state); + if(f) state.tokenize = f; + break; + } + else { + // if we're in a string and in an XML block, allow an embedded code block in an attribute + if(stream.match("{", false) && isInXmlAttributeBlock(state)) { + state.tokenize = tokenBase; + return "string"; + } + + } + } + + return "string"; + }; + } + + // tokenizer for variables + function tokenVariable(stream, state) { + var isVariableChar = /[\w\$_-]/; + + // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote + if(stream.eat("\"")) { + while(stream.next() !== '\"'){}; + stream.eat(":"); + } else { + stream.eatWhile(isVariableChar); + if(!stream.match(":=", false)) stream.eat(":"); + } + stream.eatWhile(isVariableChar); + state.tokenize = tokenBase; + return "variable"; + } + + // tokenizer for XML tags + function tokenTag(name, isclose) { + return function(stream, state) { + stream.eatSpace(); + if(isclose && stream.eat(">")) { + popStateStack(state); + state.tokenize = tokenBase; + return "tag"; + } + // self closing tag without attributes? + if(!stream.eat("/")) + pushStateStack(state, { type: "tag", name: name, tokenize: tokenBase}); + if(!stream.eat(">")) { + state.tokenize = tokenAttribute; + return "tag"; + } + else { + state.tokenize = tokenBase; + } + return "tag"; + }; + } + + // tokenizer for XML attributes + function tokenAttribute(stream, state) { + var ch = stream.next(); + + if(ch == "/" && stream.eat(">")) { + if(isInXmlAttributeBlock(state)) popStateStack(state); + if(isInXmlBlock(state)) popStateStack(state); + return "tag"; + } + if(ch == ">") { + if(isInXmlAttributeBlock(state)) popStateStack(state); + return "tag"; + } + if(ch == "=") + return null; + // quoted string + if (ch == '"' || ch == "'") + return chain(stream, state, tokenString(ch, tokenAttribute)); + + if(!isInXmlAttributeBlock(state)) + pushStateStack(state, { type: "attribute", tokenize: tokenAttribute}); + + stream.eat(/[a-zA-Z_:]/); + stream.eatWhile(/[-a-zA-Z0-9_:.]/); + stream.eatSpace(); + + // the case where the attribute has not value and the tag was closed + if(stream.match(">", false) || stream.match("/", false)) { + popStateStack(state); + state.tokenize = tokenBase; + } + + return "attribute"; + } + + // handle comments, including nested + function tokenXMLComment(stream, state) { + var ch; + while (ch = stream.next()) { + if (ch == "-" && stream.match("->", true)) { + state.tokenize = tokenBase; + return "comment"; + } + } + } + + + // handle CDATA + function tokenCDATA(stream, state) { + var ch; + while (ch = stream.next()) { + if (ch == "]" && stream.match("]", true)) { + state.tokenize = tokenBase; + return "comment"; + } + } + } + + // handle preprocessing instructions + function tokenPreProcessing(stream, state) { + var ch; + while (ch = stream.next()) { + if (ch == "?" && stream.match(">", true)) { + state.tokenize = tokenBase; + return "comment meta"; + } + } + } + + + // functions to test the current context of the state + function isInXmlBlock(state) { return isIn(state, "tag"); } + function isInXmlAttributeBlock(state) { return isIn(state, "attribute"); } + function isInXmlConstructor(state) { return isIn(state, "xmlconstructor"); } + function isInString(state) { return isIn(state, "string"); } + + function isEQNameAhead(stream) { + // assume we've already eaten a quote (") + if(stream.current() === '"') + return stream.match(/^[^\"]+\"\:/, false); + else if(stream.current() === '\'') + return stream.match(/^[^\"]+\'\:/, false); + else + return false; + } + + function isIn(state, type) { + return (state.stack.length && state.stack[state.stack.length - 1].type == type); + } + + function pushStateStack(state, newState) { + state.stack.push(newState); + } + + function popStateStack(state) { + state.stack.pop(); + var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize; + state.tokenize = reinstateTokenize || tokenBase; + } + + // the interface for the mode API + return { + startState: function() { + return { + tokenize: tokenBase, + cc: [], + stack: [] + }; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + return style; + }, + + blockCommentStart: "(:", + blockCommentEnd: ":)" + + }; + +}); + +CodeMirror.defineMIME("application/xquery", "xquery"); + +}); diff --git a/js/codemirror/mode/yacas/index.html b/js/codemirror/mode/yacas/index.html new file mode 100644 index 0000000..50ed00e --- /dev/null +++ b/js/codemirror/mode/yacas/index.html @@ -0,0 +1,87 @@ + + +CodeMirror: yacas mode + + + + + + + + + + +
    +

    yacas mode

    + + + + + + +

    MIME types defined: text/x-yacas (yacas).

    +
    diff --git a/js/codemirror/mode/yacas/yacas.js b/js/codemirror/mode/yacas/yacas.js new file mode 100644 index 0000000..1e775d9 --- /dev/null +++ b/js/codemirror/mode/yacas/yacas.js @@ -0,0 +1,204 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// Yacas mode copyright (c) 2015 by Grzegorz Mazur +// Loosely based on mathematica mode by Calin Barbat + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('yacas', function(_config, _parserConfig) { + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var bodiedOps = words("Assert BackQuote D Defun Deriv For ForEach FromFile " + + "FromString Function Integrate InverseTaylor Limit " + + "LocalSymbols Macro MacroRule MacroRulePattern " + + "NIntegrate Rule RulePattern Subst TD TExplicitSum " + + "TSum Taylor Taylor1 Taylor2 Taylor3 ToFile " + + "ToStdout ToString TraceRule Until While"); + + // patterns + var pFloatForm = "(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)"; + var pIdentifier = "(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)"; + + // regular expressions + var reFloatForm = new RegExp(pFloatForm); + var reIdentifier = new RegExp(pIdentifier); + var rePattern = new RegExp(pIdentifier + "?_" + pIdentifier); + var reFunctionLike = new RegExp(pIdentifier + "\\s*\\("); + + function tokenBase(stream, state) { + var ch; + + // get next character + ch = stream.next(); + + // string + if (ch === '"') { + state.tokenize = tokenString; + return state.tokenize(stream, state); + } + + // comment + if (ch === '/') { + if (stream.eat('*')) { + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + + // go back one character + stream.backUp(1); + + // update scope info + var m = stream.match(/^(\w+)\s*\(/, false); + if (m !== null && bodiedOps.hasOwnProperty(m[1])) + state.scopes.push('bodied'); + + var scope = currentScope(state); + + if (scope === 'bodied' && ch === '[') + state.scopes.pop(); + + if (ch === '[' || ch === '{' || ch === '(') + state.scopes.push(ch); + + scope = currentScope(state); + + if (scope === '[' && ch === ']' || + scope === '{' && ch === '}' || + scope === '(' && ch === ')') + state.scopes.pop(); + + if (ch === ';') { + while (scope === 'bodied') { + state.scopes.pop(); + scope = currentScope(state); + } + } + + // look for ordered rules + if (stream.match(/\d+ *#/, true, false)) { + return 'qualifier'; + } + + // look for numbers + if (stream.match(reFloatForm, true, false)) { + return 'number'; + } + + // look for placeholders + if (stream.match(rePattern, true, false)) { + return 'variable-3'; + } + + // match all braces separately + if (stream.match(/(?:\[|\]|{|}|\(|\))/, true, false)) { + return 'bracket'; + } + + // literals looking like function calls + if (stream.match(reFunctionLike, true, false)) { + stream.backUp(1); + return 'variable'; + } + + // all other identifiers + if (stream.match(reIdentifier, true, false)) { + return 'variable-2'; + } + + // operators; note that operators like @@ or /; are matched separately for each symbol. + if (stream.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/, true, false)) { + return 'operator'; + } + + // everything else is an error + return 'error'; + } + + function tokenString(stream, state) { + var next, end = false, escaped = false; + while ((next = stream.next()) != null) { + if (next === '"' && !escaped) { + end = true; + break; + } + escaped = !escaped && next === '\\'; + } + if (end && !escaped) { + state.tokenize = tokenBase; + } + return 'string'; + }; + + function tokenComment(stream, state) { + var prev, next; + while((next = stream.next()) != null) { + if (prev === '*' && next === '/') { + state.tokenize = tokenBase; + break; + } + prev = next; + } + return 'comment'; + } + + function currentScope(state) { + var scope = null; + if (state.scopes.length > 0) + scope = state.scopes[state.scopes.length - 1]; + return scope; + } + + return { + startState: function() { + return { + tokenize: tokenBase, + scopes: [] + }; + }, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + indent: function(state, textAfter) { + if (state.tokenize !== tokenBase && state.tokenize !== null) + return CodeMirror.Pass; + + var delta = 0; + if (textAfter === ']' || textAfter === '];' || + textAfter === '}' || textAfter === '};' || + textAfter === ');') + delta = -1; + + return (state.scopes.length + delta) * _config.indentUnit; + }, + electricChars: "{}[]();", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME('text/x-yacas', { + name: 'yacas' +}); + +}); diff --git a/js/codemirror/mode/yaml-frontmatter/index.html b/js/codemirror/mode/yaml-frontmatter/index.html new file mode 100644 index 0000000..df17320 --- /dev/null +++ b/js/codemirror/mode/yaml-frontmatter/index.html @@ -0,0 +1,121 @@ + + +CodeMirror: YAML front matter mode + + + + + + + + + + + + + +
    +

    YAML front matter mode

    +
    + +

    Defines a mode that parses +a YAML frontmatter +at the start of a file, switching to a base mode at the end of that. +Takes a mode configuration option base to configure the +base mode, which defaults to "gfm".

    + + + +
    diff --git a/js/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js b/js/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js new file mode 100644 index 0000000..0b30aa2 --- /dev/null +++ b/js/codemirror/mode/yaml-frontmatter/yaml-frontmatter.js @@ -0,0 +1,72 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function (mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror"), require("../yaml/yaml")) + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror", "../yaml/yaml"], mod) + else // Plain browser env + mod(CodeMirror) +})(function (CodeMirror) { + + var START = 0, FRONTMATTER = 1, BODY = 2 + + // a mixed mode for Markdown text with an optional YAML front matter + CodeMirror.defineMode("yaml-frontmatter", function (config, parserConfig) { + var yamlMode = CodeMirror.getMode(config, "yaml") + var innerMode = CodeMirror.getMode(config, parserConfig && parserConfig.base || "gfm") + + function localMode(state) { + return state.state == FRONTMATTER ? {mode: yamlMode, state: state.yaml} : {mode: innerMode, state: state.inner} + } + + return { + startState: function () { + return { + state: START, + yaml: null, + inner: CodeMirror.startState(innerMode) + } + }, + copyState: function (state) { + return { + state: state.state, + yaml: state.yaml && CodeMirror.copyState(yamlMode, state.yaml), + inner: CodeMirror.copyState(innerMode, state.inner) + } + }, + token: function (stream, state) { + if (state.state == START) { + if (stream.match('---', false)) { + state.state = FRONTMATTER + state.yaml = CodeMirror.startState(yamlMode) + return yamlMode.token(stream, state.yaml) + } else { + state.state = BODY + return innerMode.token(stream, state.inner) + } + } else if (state.state == FRONTMATTER) { + var end = stream.sol() && stream.match(/(---|\.\.\.)/, false) + var style = yamlMode.token(stream, state.yaml) + if (end) { + state.state = BODY + state.yaml = null + } + return style + } else { + return innerMode.token(stream, state.inner) + } + }, + innerMode: localMode, + indent: function(state, a, b) { + var m = localMode(state) + return m.mode.indent ? m.mode.indent(m.state, a, b) : CodeMirror.Pass + }, + blankLine: function (state) { + var m = localMode(state) + if (m.mode.blankLine) return m.mode.blankLine(m.state) + } + } + }) +}); diff --git a/js/codemirror/mode/yaml/index.html b/js/codemirror/mode/yaml/index.html new file mode 100644 index 0000000..b923116 --- /dev/null +++ b/js/codemirror/mode/yaml/index.html @@ -0,0 +1,80 @@ + + +CodeMirror: YAML mode + + + + + + + + + +
    +

    YAML mode

    +
    + + +

    MIME types defined: text/x-yaml.

    + +
    diff --git a/js/codemirror/mode/yaml/yaml.js b/js/codemirror/mode/yaml/yaml.js new file mode 100644 index 0000000..895d133 --- /dev/null +++ b/js/codemirror/mode/yaml/yaml.js @@ -0,0 +1,120 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode("yaml", function() { + + var cons = ['true', 'false', 'on', 'off', 'yes', 'no']; + var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i'); + + return { + token: function(stream, state) { + var ch = stream.peek(); + var esc = state.escaped; + state.escaped = false; + /* comments */ + if (ch == "#" && (stream.pos == 0 || /\s/.test(stream.string.charAt(stream.pos - 1)))) { + stream.skipToEnd(); + return "comment"; + } + + if (stream.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/)) + return "string"; + + if (state.literal && stream.indentation() > state.keyCol) { + stream.skipToEnd(); return "string"; + } else if (state.literal) { state.literal = false; } + if (stream.sol()) { + state.keyCol = 0; + state.pair = false; + state.pairStart = false; + /* document start */ + if(stream.match('---')) { return "def"; } + /* document end */ + if (stream.match('...')) { return "def"; } + /* array list item */ + if (stream.match(/\s*-\s+/)) { return 'meta'; } + } + /* inline pairs/lists */ + if (stream.match(/^(\{|\}|\[|\])/)) { + if (ch == '{') + state.inlinePairs++; + else if (ch == '}') + state.inlinePairs--; + else if (ch == '[') + state.inlineList++; + else + state.inlineList--; + return 'meta'; + } + + /* list separator */ + if (state.inlineList > 0 && !esc && ch == ',') { + stream.next(); + return 'meta'; + } + /* pairs separator */ + if (state.inlinePairs > 0 && !esc && ch == ',') { + state.keyCol = 0; + state.pair = false; + state.pairStart = false; + stream.next(); + return 'meta'; + } + + /* start of value of a pair */ + if (state.pairStart) { + /* block literals */ + if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; }; + /* references */ + if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; } + /* numbers */ + if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; } + if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; } + /* keywords */ + if (stream.match(keywordRegex)) { return 'keyword'; } + } + + /* pairs (associative arrays) -> key */ + if (!state.pair && stream.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^\s,\[\]{}#&*!|>'"%@`])[^#:]*(?=:($|\s))/)) { + state.pair = true; + state.keyCol = stream.indentation(); + return "atom"; + } + if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; } + + /* nothing found, continue */ + state.pairStart = false; + state.escaped = (ch == '\\'); + stream.next(); + return null; + }, + startState: function() { + return { + pair: false, + pairStart: false, + keyCol: 0, + inlinePairs: 0, + inlineList: 0, + literal: false, + escaped: false + }; + }, + lineComment: "#", + fold: "indent" + }; +}); + +CodeMirror.defineMIME("text/x-yaml", "yaml"); +CodeMirror.defineMIME("text/yaml", "yaml"); + +}); diff --git a/js/codemirror/mode/z80/index.html b/js/codemirror/mode/z80/index.html new file mode 100644 index 0000000..1cff455 --- /dev/null +++ b/js/codemirror/mode/z80/index.html @@ -0,0 +1,53 @@ + + +CodeMirror: Z80 assembly mode + + + + + + + + + +
    +

    Z80 assembly mode

    + + +
    + + + +

    MIME types defined: text/x-z80, text/x-ez80.

    +
    diff --git a/js/codemirror/mode/z80/z80.js b/js/codemirror/mode/z80/z80.js new file mode 100644 index 0000000..596e57d --- /dev/null +++ b/js/codemirror/mode/z80/z80.js @@ -0,0 +1,116 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function(mod) { + if (typeof exports == "object" && typeof module == "object") // CommonJS + mod(require("../../lib/codemirror")); + else if (typeof define == "function" && define.amd) // AMD + define(["../../lib/codemirror"], mod); + else // Plain browser env + mod(CodeMirror); +})(function(CodeMirror) { +"use strict"; + +CodeMirror.defineMode('z80', function(_config, parserConfig) { + var ez80 = parserConfig.ez80; + var keywords1, keywords2; + if (ez80) { + keywords1 = /^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i; + keywords2 = /^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i; + } else { + keywords1 = /^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i; + keywords2 = /^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i; + } + + var variables1 = /^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i; + var variables2 = /^(n?[zc]|p[oe]?|m)\b/i; + var errors = /^([hl][xy]|i[xy][hl]|slia|sll)\b/i; + var numbers = /^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i; + + return { + startState: function() { + return { + context: 0 + }; + }, + token: function(stream, state) { + if (!stream.column()) + state.context = 0; + + if (stream.eatSpace()) + return null; + + var w; + + if (stream.eatWhile(/\w/)) { + if (ez80 && stream.eat('.')) { + stream.eatWhile(/\w/); + } + w = stream.current(); + + if (stream.indentation()) { + if ((state.context == 1 || state.context == 4) && variables1.test(w)) { + state.context = 4; + return 'var2'; + } + + if (state.context == 2 && variables2.test(w)) { + state.context = 4; + return 'var3'; + } + + if (keywords1.test(w)) { + state.context = 1; + return 'keyword'; + } else if (keywords2.test(w)) { + state.context = 2; + return 'keyword'; + } else if (state.context == 4 && numbers.test(w)) { + return 'number'; + } + + if (errors.test(w)) + return 'error'; + } else if (stream.match(numbers)) { + return 'number'; + } else { + return null; + } + } else if (stream.eat(';')) { + stream.skipToEnd(); + return 'comment'; + } else if (stream.eat('"')) { + while (w = stream.next()) { + if (w == '"') + break; + + if (w == '\\') + stream.next(); + } + return 'string'; + } else if (stream.eat('\'')) { + if (stream.match(/\\?.'/)) + return 'number'; + } else if (stream.eat('.') || stream.sol() && stream.eat('#')) { + state.context = 5; + + if (stream.eatWhile(/\w/)) + return 'def'; + } else if (stream.eat('$')) { + if (stream.eatWhile(/[\da-f]/i)) + return 'number'; + } else if (stream.eat('%')) { + if (stream.eatWhile(/[01]/)) + return 'number'; + } else { + stream.next(); + } + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-z80", "z80"); +CodeMirror.defineMIME("text/x-ez80", { name: "z80", ez80: true }); + +}); diff --git a/js/codemirror/rollup.config.js b/js/codemirror/rollup.config.js new file mode 100644 index 0000000..24f1f13 --- /dev/null +++ b/js/codemirror/rollup.config.js @@ -0,0 +1,52 @@ +import buble from '@rollup/plugin-buble'; +import copy from 'rollup-plugin-copy' + +let copyVim = copy({ + targets: [ + { + src: require.resolve("cm5-vim/vim.js").replace(/\\/g, "/"), + dest: "./keymap" + } + ] +}); + +export default [ + { + input: "src/codemirror.js", + output: { + banner: `// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +// This is CodeMirror (https://codemirror.net/5), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . +`, + format: "umd", + file: "lib/codemirror.js", + name: "CodeMirror" + }, + plugins: [ buble({namedFunctionExpressions: false}), copyVim ] + }, + { + input: ["src/addon/runmode/runmode-standalone.js"], + output: { + format: "iife", + file: "addon/runmode/runmode-standalone.js", + name: "CodeMirror", + freeze: false, // IE8 doesn't support Object.freeze. + }, + plugins: [ buble({namedFunctionExpressions: false}) ] + }, + { + input: ["src/addon/runmode/runmode.node.js"], + output: { + format: "cjs", + file: "addon/runmode/runmode.node.js", + name: "CodeMirror", + freeze: false, // IE8 doesn't support Object.freeze. + }, + plugins: [ buble({namedFunctionExpressions: false}) ] + }, +]; diff --git a/js/codemirror/src/addon/runmode/codemirror-standalone.js b/js/codemirror/src/addon/runmode/codemirror-standalone.js new file mode 100644 index 0000000..f13f32b --- /dev/null +++ b/js/codemirror/src/addon/runmode/codemirror-standalone.js @@ -0,0 +1,24 @@ +import StringStream from "../../util/StringStream.js" +import { countColumn } from "../../util/misc.js" +import * as modeMethods from "../../modes.js" + +// declare global: globalThis, CodeMirror + +// Create a minimal CodeMirror needed to use runMode, and assign to root. +var root = typeof globalThis !== 'undefined' ? globalThis : window +root.CodeMirror = {} + +// Copy StringStream and mode methods into CodeMirror object. +CodeMirror.StringStream = StringStream +for (var exported in modeMethods) CodeMirror[exported] = modeMethods[exported] + +// Minimal default mode. +CodeMirror.defineMode("null", () => ({token: stream => stream.skipToEnd()})) +CodeMirror.defineMIME("text/plain", "null") + +CodeMirror.registerHelper = CodeMirror.registerGlobalHelper = Math.min +CodeMirror.splitLines = function(string) { return string.split(/\r?\n|\r/) } +CodeMirror.countColumn = countColumn + +CodeMirror.defaults = { indentUnit: 2 } +export default CodeMirror diff --git a/js/codemirror/src/addon/runmode/codemirror.node.js b/js/codemirror/src/addon/runmode/codemirror.node.js new file mode 100644 index 0000000..58efc52 --- /dev/null +++ b/js/codemirror/src/addon/runmode/codemirror.node.js @@ -0,0 +1,21 @@ +import StringStream from "../../util/StringStream.js" +import * as modeMethods from "../../modes.js" +import {countColumn} from "../../util/misc.js" + +// Copy StringStream and mode methods into exports (CodeMirror) object. +exports.StringStream = StringStream +exports.countColumn = countColumn +for (var exported in modeMethods) exports[exported] = modeMethods[exported] + +// Shim library CodeMirror with the minimal CodeMirror defined above. +require.cache[require.resolve("../../lib/codemirror")] = require.cache[require.resolve("./runmode.node")] +require.cache[require.resolve("../../addon/runmode/runmode")] = require.cache[require.resolve("./runmode.node")] + +// Minimal default mode. +exports.defineMode("null", () => ({token: stream => stream.skipToEnd()})) +exports.defineMIME("text/plain", "null") + +exports.registerHelper = exports.registerGlobalHelper = Math.min +exports.splitLines = function(string) { return string.split(/\r?\n|\r/) } + +exports.defaults = { indentUnit: 2 } diff --git a/js/codemirror/src/addon/runmode/runmode-standalone.js b/js/codemirror/src/addon/runmode/runmode-standalone.js new file mode 100644 index 0000000..0d7aa6b --- /dev/null +++ b/js/codemirror/src/addon/runmode/runmode-standalone.js @@ -0,0 +1,2 @@ +import "./codemirror-standalone.js" +import "../../../addon/runmode/runmode.js" \ No newline at end of file diff --git a/js/codemirror/src/addon/runmode/runmode.node.js b/js/codemirror/src/addon/runmode/runmode.node.js new file mode 100644 index 0000000..4f2ed81 --- /dev/null +++ b/js/codemirror/src/addon/runmode/runmode.node.js @@ -0,0 +1,2 @@ +import "./codemirror.node.js" +import "../../../addon/runmode/runmode.js" \ No newline at end of file diff --git a/js/codemirror/src/codemirror.js b/js/codemirror/src/codemirror.js new file mode 100644 index 0000000..2a2f54e --- /dev/null +++ b/js/codemirror/src/codemirror.js @@ -0,0 +1,3 @@ +import { CodeMirror } from "./edit/main.js" + +export default CodeMirror diff --git a/js/codemirror/src/display/Display.js b/js/codemirror/src/display/Display.js new file mode 100644 index 0000000..28d8dbb --- /dev/null +++ b/js/codemirror/src/display/Display.js @@ -0,0 +1,116 @@ +import { gecko, ie, ie_version, mobile, webkit, chrome, chrome_version } from "../util/browser.js" +import { elt, eltP } from "../util/dom.js" +import { scrollerGap } from "../util/misc.js" +import { getGutters, renderGutters } from "./gutters.js" + +// The display handles the DOM integration, both for input reading +// and content drawing. It holds references to DOM nodes and +// display-related state. + +export function Display(place, doc, input, options) { + let d = this + this.input = input + + // Covers bottom-right square when both scrollbars are present. + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler") + d.scrollbarFiller.setAttribute("cm-not-content", "true") + // Covers bottom of gutter when coverGutterNextToScrollbar is on + // and h scrollbar is present. + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler") + d.gutterFiller.setAttribute("cm-not-content", "true") + // Will contain the actual code, positioned to cover the viewport. + d.lineDiv = eltP("div", null, "CodeMirror-code") + // Elements are added to these to represent selection and cursors. + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1") + d.cursorDiv = elt("div", null, "CodeMirror-cursors") + // A visibility: hidden element used to find the size of things. + d.measure = elt("div", null, "CodeMirror-measure") + // When lines outside of the viewport are measured, they are drawn in this. + d.lineMeasure = elt("div", null, "CodeMirror-measure") + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], + null, "position: relative; outline: none") + let lines = eltP("div", [d.lineSpace], "CodeMirror-lines") + // Moved around its parent to cover visible view. + d.mover = elt("div", [lines], null, "position: relative") + // Set to the height of the document, allowing scrolling. + d.sizer = elt("div", [d.mover], "CodeMirror-sizer") + d.sizerWidth = null + // Behavior of elts with overflow: auto and padding is + // inconsistent across browsers. This is used to ensure the + // scrollable area is big enough. + d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;") + // Will contain the gutters, if any. + d.gutters = elt("div", null, "CodeMirror-gutters") + d.lineGutter = null + // Actual scrollable element. + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll") + d.scroller.setAttribute("tabIndex", "-1") + // The element in which the editor lives. + d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror") + // See #6982. FIXME remove when this has been fixed for a while in Chrome + if (chrome && chrome_version >= 105) d.wrapper.style.clipPath = "inset(0px)" + + // This attribute is respected by automatic translation systems such as Google Translate, + // and may also be respected by tools used by human translators. + d.wrapper.setAttribute('translate', 'no') + + // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) + if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0 } + if (!webkit && !(gecko && mobile)) d.scroller.draggable = true + + if (place) { + if (place.appendChild) place.appendChild(d.wrapper) + else place(d.wrapper) + } + + // Current rendered range (may be bigger than the view window). + d.viewFrom = d.viewTo = doc.first + d.reportedViewFrom = d.reportedViewTo = doc.first + // Information about the rendered lines. + d.view = [] + d.renderedView = null + // Holds info about a single rendered line when it was rendered + // for measurement, while not in view. + d.externalMeasured = null + // Empty space (in pixels) above the view + d.viewOffset = 0 + d.lastWrapHeight = d.lastWrapWidth = 0 + d.updateLineNumbers = null + + d.nativeBarWidth = d.barHeight = d.barWidth = 0 + d.scrollbarsClipped = false + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null + // Set to true when a non-horizontal-scrolling line widget is + // added. As an optimization, line widget aligning is skipped when + // this is false. + d.alignWidgets = false + + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null + d.maxLineLength = 0 + d.maxLineChanged = false + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null + + // True when shift is held down. + d.shift = false + + // Used to track whether anything happened since the context menu + // was opened. + d.selForContextMenu = null + + d.activeTouch = null + + d.gutterSpecs = getGutters(options.gutters, options.lineNumbers) + renderGutters(d) + + input.init(d) +} diff --git a/js/codemirror/src/display/focus.js b/js/codemirror/src/display/focus.js new file mode 100644 index 0000000..0337327 --- /dev/null +++ b/js/codemirror/src/display/focus.js @@ -0,0 +1,50 @@ +import { restartBlink } from "./selection.js" +import { webkit } from "../util/browser.js" +import { addClass, rmClass } from "../util/dom.js" +import { signal } from "../util/event.js" + +export function ensureFocus(cm) { + if (!cm.hasFocus()) { + cm.display.input.focus() + if (!cm.state.focused) onFocus(cm) + } +} + +export function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true + setTimeout(() => { if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false + if (cm.state.focused) onBlur(cm) + } }, 100) +} + +export function onFocus(cm, e) { + if (cm.state.delayingBlurEvent && !cm.state.draggingText) cm.state.delayingBlurEvent = false + + if (cm.options.readOnly == "nocursor") return + if (!cm.state.focused) { + signal(cm, "focus", cm, e) + cm.state.focused = true + addClass(cm.display.wrapper, "CodeMirror-focused") + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset() + if (webkit) setTimeout(() => cm.display.input.reset(true), 20) // Issue #1730 + } + cm.display.input.receivedFocus() + } + restartBlink(cm) +} +export function onBlur(cm, e) { + if (cm.state.delayingBlurEvent) return + + if (cm.state.focused) { + signal(cm, "blur", cm, e) + cm.state.focused = false + rmClass(cm.display.wrapper, "CodeMirror-focused") + } + clearInterval(cm.display.blinker) + setTimeout(() => { if (!cm.state.focused) cm.display.shift = false }, 150) +} diff --git a/js/codemirror/src/display/gutters.js b/js/codemirror/src/display/gutters.js new file mode 100644 index 0000000..b27b6ce --- /dev/null +++ b/js/codemirror/src/display/gutters.js @@ -0,0 +1,44 @@ +import { elt, removeChildren } from "../util/dom.js" +import { regChange } from "./view_tracking.js" +import { alignHorizontally } from "./line_numbers.js" +import { updateGutterSpace } from "./update_display.js" + +export function getGutters(gutters, lineNumbers) { + let result = [], sawLineNumbers = false + for (let i = 0; i < gutters.length; i++) { + let name = gutters[i], style = null + if (typeof name != "string") { style = name.style; name = name.className } + if (name == "CodeMirror-linenumbers") { + if (!lineNumbers) continue + else sawLineNumbers = true + } + result.push({className: name, style}) + } + if (lineNumbers && !sawLineNumbers) result.push({className: "CodeMirror-linenumbers", style: null}) + return result +} + +// Rebuild the gutter elements, ensure the margin to the left of the +// code matches their width. +export function renderGutters(display) { + let gutters = display.gutters, specs = display.gutterSpecs + removeChildren(gutters) + display.lineGutter = null + for (let i = 0; i < specs.length; ++i) { + let {className, style} = specs[i] + let gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className)) + if (style) gElt.style.cssText = style + if (className == "CodeMirror-linenumbers") { + display.lineGutter = gElt + gElt.style.width = (display.lineNumWidth || 1) + "px" + } + } + gutters.style.display = specs.length ? "" : "none" + updateGutterSpace(display) +} + +export function updateGutters(cm) { + renderGutters(cm.display) + regChange(cm) + alignHorizontally(cm) +} diff --git a/js/codemirror/src/display/highlight_worker.js b/js/codemirror/src/display/highlight_worker.js new file mode 100644 index 0000000..6069815 --- /dev/null +++ b/js/codemirror/src/display/highlight_worker.js @@ -0,0 +1,55 @@ +import { getContextBefore, highlightLine, processLine } from "../line/highlight.js" +import { copyState } from "../modes.js" +import { bind } from "../util/misc.js" + +import { runInOp } from "./operations.js" +import { regLineChange } from "./view_tracking.js" + +// HIGHLIGHT WORKER + +export function startWorker(cm, time) { + if (cm.doc.highlightFrontier < cm.display.viewTo) + cm.state.highlight.set(time, bind(highlightWorker, cm)) +} + +function highlightWorker(cm) { + let doc = cm.doc + if (doc.highlightFrontier >= cm.display.viewTo) return + let end = +new Date + cm.options.workTime + let context = getContextBefore(cm, doc.highlightFrontier) + let changedLines = [] + + doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), line => { + if (context.line >= cm.display.viewFrom) { // Visible + let oldStyles = line.styles + let resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null + let highlighted = highlightLine(cm, line, context, true) + if (resetState) context.state = resetState + line.styles = highlighted.styles + let oldCls = line.styleClasses, newCls = highlighted.classes + if (newCls) line.styleClasses = newCls + else if (oldCls) line.styleClasses = null + let ischange = !oldStyles || oldStyles.length != line.styles.length || + oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass) + for (let i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i] + if (ischange) changedLines.push(context.line) + line.stateAfter = context.save() + context.nextLine() + } else { + if (line.text.length <= cm.options.maxHighlightLength) + processLine(cm, line.text, context) + line.stateAfter = context.line % 5 == 0 ? context.save() : null + context.nextLine() + } + if (+new Date > end) { + startWorker(cm, cm.options.workDelay) + return true + } + }) + doc.highlightFrontier = context.line + doc.modeFrontier = Math.max(doc.modeFrontier, context.line) + if (changedLines.length) runInOp(cm, () => { + for (let i = 0; i < changedLines.length; i++) + regLineChange(cm, changedLines[i], "text") + }) +} diff --git a/js/codemirror/src/display/line_numbers.js b/js/codemirror/src/display/line_numbers.js new file mode 100644 index 0000000..073cbad --- /dev/null +++ b/js/codemirror/src/display/line_numbers.js @@ -0,0 +1,48 @@ +import { lineNumberFor } from "../line/utils_line.js" +import { compensateForHScroll } from "../measurement/position_measurement.js" +import { elt } from "../util/dom.js" + +import { updateGutterSpace } from "./update_display.js" + +// Re-align line numbers and gutter marks to compensate for +// horizontal scrolling. +export function alignHorizontally(cm) { + let display = cm.display, view = display.view + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return + let comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft + let gutterW = display.gutters.offsetWidth, left = comp + "px" + for (let i = 0; i < view.length; i++) if (!view[i].hidden) { + if (cm.options.fixedGutter) { + if (view[i].gutter) + view[i].gutter.style.left = left + if (view[i].gutterBackground) + view[i].gutterBackground.style.left = left + } + let align = view[i].alignable + if (align) for (let j = 0; j < align.length; j++) + align[j].style.left = left + } + if (cm.options.fixedGutter) + display.gutters.style.left = (comp + gutterW) + "px" +} + +// Used to ensure that the line number gutter is still the right +// size for the current document size. Returns true when an update +// is needed. +export function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) return false + let doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display + if (last.length != display.lineNumChars) { + let test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")) + let innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW + display.lineGutter.style.width = "" + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1 + display.lineNumWidth = display.lineNumInnerWidth + padding + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1 + display.lineGutter.style.width = display.lineNumWidth + "px" + updateGutterSpace(cm.display) + return true + } + return false +} diff --git a/js/codemirror/src/display/mode_state.js b/js/codemirror/src/display/mode_state.js new file mode 100644 index 0000000..5d8ebf2 --- /dev/null +++ b/js/codemirror/src/display/mode_state.js @@ -0,0 +1,22 @@ +import { getMode } from "../modes.js" + +import { startWorker } from "./highlight_worker.js" +import { regChange } from "./view_tracking.js" + +// Used to get the editor into a consistent state again when options change. + +export function loadMode(cm) { + cm.doc.mode = getMode(cm.options, cm.doc.modeOption) + resetModeState(cm) +} + +export function resetModeState(cm) { + cm.doc.iter(line => { + if (line.stateAfter) line.stateAfter = null + if (line.styles) line.styles = null + }) + cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first + startWorker(cm, 100) + cm.state.modeGen++ + if (cm.curOp) regChange(cm) +} diff --git a/js/codemirror/src/display/operations.js b/js/codemirror/src/display/operations.js new file mode 100644 index 0000000..a7e8039 --- /dev/null +++ b/js/codemirror/src/display/operations.js @@ -0,0 +1,206 @@ +import { clipPos } from "../line/pos.js" +import { findMaxLine } from "../line/spans.js" +import { displayWidth, measureChar, scrollGap } from "../measurement/position_measurement.js" +import { signal } from "../util/event.js" +import { activeElt, root } from "../util/dom.js" +import { finishOperation, pushOperation } from "../util/operation_group.js" + +import { ensureFocus } from "./focus.js" +import { measureForScrollbars, updateScrollbars } from "./scrollbars.js" +import { restartBlink } from "./selection.js" +import { maybeScrollWindow, scrollPosIntoView, setScrollLeft, setScrollTop } from "./scrolling.js" +import { DisplayUpdate, maybeClipScrollbars, postUpdateDisplay, setDocumentHeight, updateDisplayIfNeeded } from "./update_display.js" +import { updateHeightsInViewport } from "./update_lines.js" + +// Operations are used to wrap a series of changes to the editor +// state in such a way that each change won't have to update the +// cursor and display (which would be awkward, slow, and +// error-prone). Instead, display updates are batched and then all +// combined and executed at once. + +let nextOpId = 0 +// Start a new operation. +export function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, // Used to detect need to update scrollbar + forceUpdate: false, // Used to force a redraw + updateInput: 0, // Whether to reset the input textarea + typing: false, // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, // Accumulated changes, for firing change events + cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already + selectionChanged: false, // Whether the selection needs to be redrawn + updateMaxLine: false, // Set when the widest line needs to be determined anew + scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, // Used to scroll to a specific position + focus: false, + id: ++nextOpId, // Unique ID + markArrays: null // Used by addMarkedSpan + } + pushOperation(cm.curOp) +} + +// Finish an operation, updating the display and signalling delayed events +export function endOperation(cm) { + let op = cm.curOp + if (op) finishOperation(op, group => { + for (let i = 0; i < group.ops.length; i++) + group.ops[i].cm.curOp = null + endOperations(group) + }) +} + +// The DOM updates done when an operation finishes are batched so +// that the minimum number of relayouts are required. +function endOperations(group) { + let ops = group.ops + for (let i = 0; i < ops.length; i++) // Read DOM + endOperation_R1(ops[i]) + for (let i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W1(ops[i]) + for (let i = 0; i < ops.length; i++) // Read DOM + endOperation_R2(ops[i]) + for (let i = 0; i < ops.length; i++) // Write DOM (maybe) + endOperation_W2(ops[i]) + for (let i = 0; i < ops.length; i++) // Read DOM + endOperation_finish(ops[i]) +} + +function endOperation_R1(op) { + let cm = op.cm, display = cm.display + maybeClipScrollbars(cm) + if (op.updateMaxLine) findMaxLine(cm) + + op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null || + op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom || + op.scrollToPos.to.line >= display.viewTo) || + display.maxLineChanged && cm.options.lineWrapping + op.update = op.mustUpdate && + new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate) +} + +function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update) +} + +function endOperation_R2(op) { + let cm = op.cm, display = cm.display + if (op.updatedDisplay) updateHeightsInViewport(cm) + + op.barMeasure = measureForScrollbars(cm) + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3 + cm.display.sizerWidth = op.adjustWidthTo + op.barMeasure.scrollWidth = + Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth) + op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm)) + } + + if (op.updatedDisplay || op.selectionChanged) + op.preparedSelection = display.input.prepareSelection() +} + +function endOperation_W2(op) { + let cm = op.cm + + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px" + if (op.maxScrollLeft < cm.doc.scrollLeft) + setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true) + cm.display.maxLineChanged = false + } + + let takeFocus = op.focus && op.focus == activeElt(root(cm)) + if (op.preparedSelection) + cm.display.input.showSelection(op.preparedSelection, takeFocus) + if (op.updatedDisplay || op.startHeight != cm.doc.height) + updateScrollbars(cm, op.barMeasure) + if (op.updatedDisplay) + setDocumentHeight(cm, op.barMeasure) + + if (op.selectionChanged) restartBlink(cm) + + if (cm.state.focused && op.updateInput) + cm.display.input.reset(op.typing) + if (takeFocus) ensureFocus(op.cm) +} + +function endOperation_finish(op) { + let cm = op.cm, display = cm.display, doc = cm.doc + + if (op.updatedDisplay) postUpdateDisplay(cm, op.update) + + // Abort mouse wheel delta measurement, when scrolling explicitly + if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos)) + display.wheelStartX = display.wheelStartY = null + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null) setScrollTop(cm, op.scrollTop, op.forceScroll) + + if (op.scrollLeft != null) setScrollLeft(cm, op.scrollLeft, true, true) + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + let rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from), + clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin) + maybeScrollWindow(cm, rect) + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + let hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers + if (hidden) for (let i = 0; i < hidden.length; ++i) + if (!hidden[i].lines.length) signal(hidden[i], "hide") + if (unhidden) for (let i = 0; i < unhidden.length; ++i) + if (unhidden[i].lines.length) signal(unhidden[i], "unhide") + + if (display.wrapper.offsetHeight) + doc.scrollTop = cm.display.scroller.scrollTop + + // Fire change events, and delayed event handlers + if (op.changeObjs) + signal(cm, "changes", cm, op.changeObjs) + if (op.update) + op.update.finish() +} + +// Run the given function in an operation +export function runInOp(cm, f) { + if (cm.curOp) return f() + startOperation(cm) + try { return f() } + finally { endOperation(cm) } +} +// Wraps a function in an operation. Returns the wrapped function. +export function operation(cm, f) { + return function() { + if (cm.curOp) return f.apply(cm, arguments) + startOperation(cm) + try { return f.apply(cm, arguments) } + finally { endOperation(cm) } + } +} +// Used to add methods to editor and doc instances, wrapping them in +// operations. +export function methodOp(f) { + return function() { + if (this.curOp) return f.apply(this, arguments) + startOperation(this) + try { return f.apply(this, arguments) } + finally { endOperation(this) } + } +} +export function docMethodOp(f) { + return function() { + let cm = this.cm + if (!cm || cm.curOp) return f.apply(this, arguments) + startOperation(cm) + try { return f.apply(this, arguments) } + finally { endOperation(cm) } + } +} diff --git a/js/codemirror/src/display/scroll_events.js b/js/codemirror/src/display/scroll_events.js new file mode 100644 index 0000000..50ac818 --- /dev/null +++ b/js/codemirror/src/display/scroll_events.js @@ -0,0 +1,132 @@ +import { chrome, chrome_version, gecko, ie, mac, presto, safari, webkit } from "../util/browser.js" +import { e_preventDefault } from "../util/event.js" + +import { updateDisplaySimple } from "./update_display.js" +import { setScrollLeft, updateScrollTop } from "./scrolling.js" + +// Since the delta values reported on mouse wheel events are +// unstandardized between browsers and even browser versions, and +// generally horribly unpredictable, this code starts by measuring +// the scroll effect that the first few mouse wheel events have, +// and, from that, detects the way it can convert deltas to pixel +// offsets afterwards. +// +// The reason we want to know the amount a wheel event will scroll +// is that it gives us a chance to update the display before the +// actual scrolling happens, reducing flickering. + +let wheelSamples = 0, wheelPixelsPerUnit = null +// Fill in a browser-detected starting value on browsers where we +// know one. These don't have to be accurate -- the result of them +// being wrong would just be a slight flicker on the first wheel +// scroll (if it is large enough). +if (ie) wheelPixelsPerUnit = -.53 +else if (gecko) wheelPixelsPerUnit = 15 +else if (chrome) wheelPixelsPerUnit = -.7 +else if (safari) wheelPixelsPerUnit = -1/3 + +function wheelEventDelta(e) { + let dx = e.wheelDeltaX, dy = e.wheelDeltaY + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail + else if (dy == null) dy = e.wheelDelta + return {x: dx, y: dy} +} +export function wheelEventPixels(e) { + let delta = wheelEventDelta(e) + delta.x *= wheelPixelsPerUnit + delta.y *= wheelPixelsPerUnit + return delta +} + +export function onScrollWheel(cm, e) { + // On Chrome 102, viewport updates somehow stop wheel-based + // scrolling. Turning off pointer events during the scroll seems + // to avoid the issue. + if (chrome && chrome_version == 102) { + if (cm.display.chromeScrollHack == null) cm.display.sizer.style.pointerEvents = "none" + else clearTimeout(cm.display.chromeScrollHack) + cm.display.chromeScrollHack = setTimeout(() => { + cm.display.chromeScrollHack = null + cm.display.sizer.style.pointerEvents = "" + }, 100) + } + let delta = wheelEventDelta(e), dx = delta.x, dy = delta.y + let pixelsPerUnit = wheelPixelsPerUnit + if (e.deltaMode === 0) { + dx = e.deltaX + dy = e.deltaY + pixelsPerUnit = 1 + } + + let display = cm.display, scroll = display.scroller + // Quit if there's nothing to scroll here + let canScrollX = scroll.scrollWidth > scroll.clientWidth + let canScrollY = scroll.scrollHeight > scroll.clientHeight + if (!(dx && canScrollX || dy && canScrollY)) return + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for (let cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) { + for (let i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur + break outer + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && pixelsPerUnit != null) { + if (dy && canScrollY) + updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * pixelsPerUnit)) + setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * pixelsPerUnit)) + // Only prevent default scrolling if vertical scrolling is + // actually possible. Otherwise, it causes vertical scroll + // jitter on OSX trackpads when deltaX is small and deltaY + // is large (issue #3579) + if (!dy || (dy && canScrollY)) + e_preventDefault(e) + display.wheelStartX = null // Abort measurement, if in progress + return + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && pixelsPerUnit != null) { + let pixels = dy * pixelsPerUnit + let top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight + if (pixels < 0) top = Math.max(0, top + pixels - 50) + else bot = Math.min(cm.doc.height, bot + pixels + 50) + updateDisplaySimple(cm, {top: top, bottom: bot}) + } + + if (wheelSamples < 20 && e.deltaMode !== 0) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop + display.wheelDX = dx; display.wheelDY = dy + setTimeout(() => { + if (display.wheelStartX == null) return + let movedX = scroll.scrollLeft - display.wheelStartX + let movedY = scroll.scrollTop - display.wheelStartY + let sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX) + display.wheelStartX = display.wheelStartY = null + if (!sample) return + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1) + ++wheelSamples + }, 200) + } else { + display.wheelDX += dx; display.wheelDY += dy + } + } +} diff --git a/js/codemirror/src/display/scrollbars.js b/js/codemirror/src/display/scrollbars.js new file mode 100644 index 0000000..7f9f6cb --- /dev/null +++ b/js/codemirror/src/display/scrollbars.js @@ -0,0 +1,194 @@ +import { addClass, elt, rmClass } from "../util/dom.js" +import { on } from "../util/event.js" +import { scrollGap, paddingVert } from "../measurement/position_measurement.js" +import { ie, ie_version, mac, mac_geMountainLion } from "../util/browser.js" +import { updateHeightsInViewport } from "./update_lines.js" +import { Delayed } from "../util/misc.js" + +import { setScrollLeft, updateScrollTop } from "./scrolling.js" + +// SCROLLBARS + +// Prepare DOM reads needed to update the scrollbars. Done in one +// shot to minimize update/measure roundtrips. +export function measureForScrollbars(cm) { + let d = cm.display, gutterW = d.gutters.offsetWidth + let docH = Math.round(cm.doc.height + paddingVert(cm.display)) + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + } +} + +class NativeScrollbars { + constructor(place, scroll, cm) { + this.cm = cm + let vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar") + let horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar") + vert.tabIndex = horiz.tabIndex = -1 + place(vert); place(horiz) + + on(vert, "scroll", () => { + if (vert.clientHeight) scroll(vert.scrollTop, "vertical") + }) + on(horiz, "scroll", () => { + if (horiz.clientWidth) scroll(horiz.scrollLeft, "horizontal") + }) + + this.checkedZeroWidth = false + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) this.horiz.style.minHeight = this.vert.style.minWidth = "18px" + } + + update(measure) { + let needsH = measure.scrollWidth > measure.clientWidth + 1 + let needsV = measure.scrollHeight > measure.clientHeight + 1 + let sWidth = measure.nativeBarWidth + + if (needsV) { + this.vert.style.display = "block" + this.vert.style.bottom = needsH ? sWidth + "px" : "0" + let totalHeight = measure.viewHeight - (needsH ? sWidth : 0) + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = + Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px" + } else { + this.vert.scrollTop = 0 + this.vert.style.display = "" + this.vert.firstChild.style.height = "0" + } + + if (needsH) { + this.horiz.style.display = "block" + this.horiz.style.right = needsV ? sWidth + "px" : "0" + this.horiz.style.left = measure.barLeft + "px" + let totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0) + this.horiz.firstChild.style.width = + Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px" + } else { + this.horiz.style.display = "" + this.horiz.firstChild.style.width = "0" + } + + if (!this.checkedZeroWidth && measure.clientHeight > 0) { + if (sWidth == 0) this.zeroWidthHack() + this.checkedZeroWidth = true + } + + return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0} + } + + setScrollLeft(pos) { + if (this.horiz.scrollLeft != pos) this.horiz.scrollLeft = pos + if (this.disableHoriz) this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz") + } + + setScrollTop(pos) { + if (this.vert.scrollTop != pos) this.vert.scrollTop = pos + if (this.disableVert) this.enableZeroWidthBar(this.vert, this.disableVert, "vert") + } + + zeroWidthHack() { + let w = mac && !mac_geMountainLion ? "12px" : "18px" + this.horiz.style.height = this.vert.style.width = w + this.horiz.style.visibility = this.vert.style.visibility = "hidden" + this.disableHoriz = new Delayed + this.disableVert = new Delayed + } + + enableZeroWidthBar(bar, delay, type) { + bar.style.visibility = "" + function maybeDisable() { + // To find out whether the scrollbar is still visible, we + // check whether the element under the pixel in the bottom + // right corner of the scrollbar box is the scrollbar box + // itself (when the bar is still visible) or its filler child + // (when the bar is hidden). If it is still visible, we keep + // it enabled, if it's hidden, we disable pointer events. + let box = bar.getBoundingClientRect() + let elt = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) + : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1) + if (elt != bar) bar.style.visibility = "hidden" + else delay.set(1000, maybeDisable) + } + delay.set(1000, maybeDisable) + } + + clear() { + let parent = this.horiz.parentNode + parent.removeChild(this.horiz) + parent.removeChild(this.vert) + } +} + +class NullScrollbars { + update() { return {bottom: 0, right: 0} } + setScrollLeft() {} + setScrollTop() {} + clear() {} +} + +export function updateScrollbars(cm, measure) { + if (!measure) measure = measureForScrollbars(cm) + let startWidth = cm.display.barWidth, startHeight = cm.display.barHeight + updateScrollbarsInner(cm, measure) + for (let i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) + updateHeightsInViewport(cm) + updateScrollbarsInner(cm, measureForScrollbars(cm)) + startWidth = cm.display.barWidth; startHeight = cm.display.barHeight + } +} + +// Re-synchronize the fake scrollbars with the actual size of the +// content. +function updateScrollbarsInner(cm, measure) { + let d = cm.display + let sizes = d.scrollbars.update(measure) + + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px" + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px" + d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent" + + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block" + d.scrollbarFiller.style.height = sizes.bottom + "px" + d.scrollbarFiller.style.width = sizes.right + "px" + } else d.scrollbarFiller.style.display = "" + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block" + d.gutterFiller.style.height = sizes.bottom + "px" + d.gutterFiller.style.width = measure.gutterWidth + "px" + } else d.gutterFiller.style.display = "" +} + +export let scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars} + +export function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear() + if (cm.display.scrollbars.addClass) + rmClass(cm.display.wrapper, cm.display.scrollbars.addClass) + } + + cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](node => { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller) + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", () => { + if (cm.state.focused) setTimeout(() => cm.display.input.focus(), 0) + }) + node.setAttribute("cm-not-content", "true") + }, (pos, axis) => { + if (axis == "horizontal") setScrollLeft(cm, pos) + else updateScrollTop(cm, pos) + }, cm) + if (cm.display.scrollbars.addClass) + addClass(cm.display.wrapper, cm.display.scrollbars.addClass) +} diff --git a/js/codemirror/src/display/scrolling.js b/js/codemirror/src/display/scrolling.js new file mode 100644 index 0000000..322aa87 --- /dev/null +++ b/js/codemirror/src/display/scrolling.js @@ -0,0 +1,186 @@ +import { Pos } from "../line/pos.js" +import { cursorCoords, displayHeight, displayWidth, estimateCoords, paddingTop, paddingVert, scrollGap, textHeight } from "../measurement/position_measurement.js" +import { gecko, phantom } from "../util/browser.js" +import { elt } from "../util/dom.js" +import { signalDOMEvent } from "../util/event.js" + +import { startWorker } from "./highlight_worker.js" +import { alignHorizontally } from "./line_numbers.js" +import { updateDisplaySimple } from "./update_display.js" + +// SCROLLING THINGS INTO VIEW + +// If an editor sits on the top or bottom of the window, partially +// scrolled out of view, this ensures that the cursor is visible. +export function maybeScrollWindow(cm, rect) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) return + + let display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null + let doc = display.wrapper.ownerDocument + if (rect.top + box.top < 0) doScroll = true + else if (rect.bottom + box.top > (doc.defaultView.innerHeight || doc.documentElement.clientHeight)) doScroll = false + if (doScroll != null && !phantom) { + let scrollNode = elt("div", "\u200b", null, `position: absolute; + top: ${rect.top - display.viewOffset - paddingTop(cm.display)}px; + height: ${rect.bottom - rect.top + scrollGap(cm) + display.barHeight}px; + left: ${rect.left}px; width: ${Math.max(2, rect.right - rect.left)}px;`) + cm.display.lineSpace.appendChild(scrollNode) + scrollNode.scrollIntoView(doScroll) + cm.display.lineSpace.removeChild(scrollNode) + } +} + +// Scroll a given position into view (immediately), verifying that +// it actually became visible (as line heights are accurately +// measured, the position of something may 'drift' during drawing). +export function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) margin = 0 + let rect + if (!cm.options.lineWrapping && pos == end) { + // Set pos and end to the cursor positions around the character pos sticks to + // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch + // If pos == Pos(_, 0, "before"), pos and end are unchanged + end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos + pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos + } + for (let limit = 0; limit < 5; limit++) { + let changed = false + let coords = cursorCoords(cm, pos) + let endCoords = !end || end == pos ? coords : cursorCoords(cm, end) + rect = {left: Math.min(coords.left, endCoords.left), + top: Math.min(coords.top, endCoords.top) - margin, + right: Math.max(coords.left, endCoords.left), + bottom: Math.max(coords.bottom, endCoords.bottom) + margin} + let scrollPos = calculateScrollPos(cm, rect) + let startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop) + if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft) + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true + } + if (!changed) break + } + return rect +} + +// Scroll a given set of coordinates into view (immediately). +export function scrollIntoView(cm, rect) { + let scrollPos = calculateScrollPos(cm, rect) + if (scrollPos.scrollTop != null) updateScrollTop(cm, scrollPos.scrollTop) + if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft) +} + +// Calculate a new scroll position needed to scroll the given +// rectangle into view. Returns an object with scrollTop and +// scrollLeft properties. When these are undefined, the +// vertical/horizontal position does not need to be adjusted. +function calculateScrollPos(cm, rect) { + let display = cm.display, snapMargin = textHeight(cm.display) + if (rect.top < 0) rect.top = 0 + let screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop + let screen = displayHeight(cm), result = {} + if (rect.bottom - rect.top > screen) rect.bottom = rect.top + screen + let docBottom = cm.doc.height + paddingVert(display) + let atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin + if (rect.top < screentop) { + result.scrollTop = atTop ? 0 : rect.top + } else if (rect.bottom > screentop + screen) { + let newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen) + if (newTop != screentop) result.scrollTop = newTop + } + + let gutterSpace = cm.options.fixedGutter ? 0 : display.gutters.offsetWidth + let screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft - gutterSpace + let screenw = displayWidth(cm) - display.gutters.offsetWidth + let tooWide = rect.right - rect.left > screenw + if (tooWide) rect.right = rect.left + screenw + if (rect.left < 10) + result.scrollLeft = 0 + else if (rect.left < screenleft) + result.scrollLeft = Math.max(0, rect.left + gutterSpace - (tooWide ? 0 : 10)) + else if (rect.right > screenw + screenleft - 3) + result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw + return result +} + +// Store a relative adjustment to the scroll position in the current +// operation (to be applied when the operation finishes). +export function addToScrollTop(cm, top) { + if (top == null) return + resolveScrollToPos(cm) + cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top +} + +// Make sure that at the end of the operation the current cursor is +// shown. +export function ensureCursorVisible(cm) { + resolveScrollToPos(cm) + let cur = cm.getCursor() + cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin} +} + +export function scrollToCoords(cm, x, y) { + if (x != null || y != null) resolveScrollToPos(cm) + if (x != null) cm.curOp.scrollLeft = x + if (y != null) cm.curOp.scrollTop = y +} + +export function scrollToRange(cm, range) { + resolveScrollToPos(cm) + cm.curOp.scrollToPos = range +} + +// When an operation has its scrollToPos property set, and another +// scroll action is applied before the end of the operation, this +// 'simulates' scrolling that position into view in a cheap way, so +// that the effect of intermediate scroll commands is not ignored. +function resolveScrollToPos(cm) { + let range = cm.curOp.scrollToPos + if (range) { + cm.curOp.scrollToPos = null + let from = estimateCoords(cm, range.from), to = estimateCoords(cm, range.to) + scrollToCoordsRange(cm, from, to, range.margin) + } +} + +export function scrollToCoordsRange(cm, from, to, margin) { + let sPos = calculateScrollPos(cm, { + left: Math.min(from.left, to.left), + top: Math.min(from.top, to.top) - margin, + right: Math.max(from.right, to.right), + bottom: Math.max(from.bottom, to.bottom) + margin + }) + scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop) +} + +// Sync the scrollable area and scrollbars, ensure the viewport +// covers the visible area. +export function updateScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) return + if (!gecko) updateDisplaySimple(cm, {top: val}) + setScrollTop(cm, val, true) + if (gecko) updateDisplaySimple(cm) + startWorker(cm, 100) +} + +export function setScrollTop(cm, val, forceScroll) { + val = Math.max(0, Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val)) + if (cm.display.scroller.scrollTop == val && !forceScroll) return + cm.doc.scrollTop = val + cm.display.scrollbars.setScrollTop(val) + if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val +} + +// Sync scroller and scrollbar, ensure the gutter elements are +// aligned. +export function setScrollLeft(cm, val, isScroller, forceScroll) { + val = Math.max(0, Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth)) + if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) return + cm.doc.scrollLeft = val + alignHorizontally(cm) + if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val + cm.display.scrollbars.setScrollLeft(val) +} diff --git a/js/codemirror/src/display/selection.js b/js/codemirror/src/display/selection.js new file mode 100644 index 0000000..f53c790 --- /dev/null +++ b/js/codemirror/src/display/selection.js @@ -0,0 +1,173 @@ +import { Pos } from "../line/pos.js" +import { visualLine } from "../line/spans.js" +import { getLine } from "../line/utils_line.js" +import { charCoords, cursorCoords, displayWidth, paddingH, wrappedLineExtentChar } from "../measurement/position_measurement.js" +import { getOrder, iterateBidiSections } from "../util/bidi.js" +import { elt } from "../util/dom.js" +import { onBlur } from "./focus.js" + +export function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()) +} + +export function prepareSelection(cm, primary = true) { + let doc = cm.doc, result = {} + let curFragment = result.cursors = document.createDocumentFragment() + let selFragment = result.selection = document.createDocumentFragment() + + let customCursor = cm.options.$customCursor + if (customCursor) primary = true + for (let i = 0; i < doc.sel.ranges.length; i++) { + if (!primary && i == doc.sel.primIndex) continue + let range = doc.sel.ranges[i] + if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) continue + let collapsed = range.empty() + if (customCursor) { + let head = customCursor(cm, range) + if (head) drawSelectionCursor(cm, head, curFragment) + } else if (collapsed || cm.options.showCursorWhenSelecting) { + drawSelectionCursor(cm, range.head, curFragment) + } + if (!collapsed) + drawSelectionRange(cm, range, selFragment) + } + return result +} + +// Draws a cursor for the given range +export function drawSelectionCursor(cm, head, output) { + let pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine) + + let cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")) + cursor.style.left = pos.left + "px" + cursor.style.top = pos.top + "px" + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px" + + if (/\bcm-fat-cursor\b/.test(cm.getWrapperElement().className)) { + let charPos = charCoords(cm, head, "div", null, null) + let width = charPos.right - charPos.left + cursor.style.width = (width > 0 ? width : cm.defaultCharWidth()) + "px" + } + + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + let otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor")) + otherCursor.style.display = "" + otherCursor.style.left = pos.other.left + "px" + otherCursor.style.top = pos.other.top + "px" + otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px" + } +} + +function cmpCoords(a, b) { return a.top - b.top || a.left - b.left } + +// Draws the given range as a highlighted selection +function drawSelectionRange(cm, range, output) { + let display = cm.display, doc = cm.doc + let fragment = document.createDocumentFragment() + let padding = paddingH(cm.display), leftSide = padding.left + let rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right + let docLTR = doc.direction == "ltr" + + function add(left, top, width, bottom) { + if (top < 0) top = 0 + top = Math.round(top) + bottom = Math.round(bottom) + fragment.appendChild(elt("div", null, "CodeMirror-selected", `position: absolute; left: ${left}px; + top: ${top}px; width: ${width == null ? rightSide - left : width}px; + height: ${bottom - top}px`)) + } + + function drawForLine(line, fromArg, toArg) { + let lineObj = getLine(doc, line) + let lineLen = lineObj.text.length + let start, end + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias) + } + + function wrapX(pos, dir, side) { + let extent = wrappedLineExtentChar(cm, lineObj, null, pos) + let prop = (dir == "ltr") == (side == "after") ? "left" : "right" + let ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1) + return coords(ch, prop)[prop] + } + + let order = getOrder(lineObj, doc.direction) + iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, (from, to, dir, i) => { + let ltr = dir == "ltr" + let fromPos = coords(from, ltr ? "left" : "right") + let toPos = coords(to - 1, ltr ? "right" : "left") + + let openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen + let first = i == 0, last = !order || i == order.length - 1 + if (toPos.top - fromPos.top <= 3) { // Single line + let openLeft = (docLTR ? openStart : openEnd) && first + let openRight = (docLTR ? openEnd : openStart) && last + let left = openLeft ? leftSide : (ltr ? fromPos : toPos).left + let right = openRight ? rightSide : (ltr ? toPos : fromPos).right + add(left, fromPos.top, right - left, fromPos.bottom) + } else { // Multiple lines + let topLeft, topRight, botLeft, botRight + if (ltr) { + topLeft = docLTR && openStart && first ? leftSide : fromPos.left + topRight = docLTR ? rightSide : wrapX(from, dir, "before") + botLeft = docLTR ? leftSide : wrapX(to, dir, "after") + botRight = docLTR && openEnd && last ? rightSide : toPos.right + } else { + topLeft = !docLTR ? leftSide : wrapX(from, dir, "before") + topRight = !docLTR && openStart && first ? rightSide : fromPos.right + botLeft = !docLTR && openEnd && last ? leftSide : toPos.left + botRight = !docLTR ? rightSide : wrapX(to, dir, "after") + } + add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom) + if (fromPos.bottom < toPos.top) add(leftSide, fromPos.bottom, null, toPos.top) + add(botLeft, toPos.top, botRight - botLeft, toPos.bottom) + } + + if (!start || cmpCoords(fromPos, start) < 0) start = fromPos + if (cmpCoords(toPos, start) < 0) start = toPos + if (!end || cmpCoords(fromPos, end) < 0) end = fromPos + if (cmpCoords(toPos, end) < 0) end = toPos + }) + return {start: start, end: end} + } + + let sFrom = range.from(), sTo = range.to() + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch) + } else { + let fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line) + let singleVLine = visualLine(fromLine) == visualLine(toLine) + let leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end + let rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom) + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom) + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom) + } + } + if (leftEnd.bottom < rightStart.top) + add(leftSide, leftEnd.bottom, null, rightStart.top) + } + + output.appendChild(fragment) +} + +// Cursor-blinking +export function restartBlink(cm) { + if (!cm.state.focused) return + let display = cm.display + clearInterval(display.blinker) + let on = true + display.cursorDiv.style.visibility = "" + if (cm.options.cursorBlinkRate > 0) + display.blinker = setInterval(() => { + if (!cm.hasFocus()) onBlur(cm) + display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden" + }, cm.options.cursorBlinkRate) + else if (cm.options.cursorBlinkRate < 0) + display.cursorDiv.style.visibility = "hidden" +} diff --git a/js/codemirror/src/display/update_display.js b/js/codemirror/src/display/update_display.js new file mode 100644 index 0000000..665dc8c --- /dev/null +++ b/js/codemirror/src/display/update_display.js @@ -0,0 +1,267 @@ +import { sawCollapsedSpans } from "../line/saw_special_spans.js" +import { heightAtLine, visualLineEndNo, visualLineNo } from "../line/spans.js" +import { getLine, lineNumberFor } from "../line/utils_line.js" +import { displayHeight, displayWidth, getDimensions, paddingVert, scrollGap } from "../measurement/position_measurement.js" +import { mac, webkit } from "../util/browser.js" +import { activeElt, removeChildren, contains, win, root, rootNode } from "../util/dom.js" +import { hasHandler, signal } from "../util/event.js" +import { signalLater } from "../util/operation_group.js" +import { indexOf } from "../util/misc.js" + +import { buildLineElement, updateLineForChanges } from "./update_line.js" +import { startWorker } from "./highlight_worker.js" +import { maybeUpdateLineNumberWidth } from "./line_numbers.js" +import { measureForScrollbars, updateScrollbars } from "./scrollbars.js" +import { updateSelection } from "./selection.js" +import { updateHeightsInViewport, visibleLines } from "./update_lines.js" +import { adjustView, countDirtyView, resetView } from "./view_tracking.js" + +// DISPLAY DRAWING + +export class DisplayUpdate { + constructor(cm, viewport, force) { + let display = cm.display + + this.viewport = viewport + // Store some values that we'll need later (but don't want to force a relayout for) + this.visible = visibleLines(display, cm.doc, viewport) + this.editorIsHidden = !display.wrapper.offsetWidth + this.wrapperHeight = display.wrapper.clientHeight + this.wrapperWidth = display.wrapper.clientWidth + this.oldDisplayWidth = displayWidth(cm) + this.force = force + this.dims = getDimensions(cm) + this.events = [] + } + + signal(emitter, type) { + if (hasHandler(emitter, type)) + this.events.push(arguments) + } + finish() { + for (let i = 0; i < this.events.length; i++) + signal.apply(null, this.events[i]) + } +} + +export function maybeClipScrollbars(cm) { + let display = cm.display + if (!display.scrollbarsClipped && display.scroller.offsetWidth) { + display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth + display.heightForcer.style.height = scrollGap(cm) + "px" + display.sizer.style.marginBottom = -display.nativeBarWidth + "px" + display.sizer.style.borderRightWidth = scrollGap(cm) + "px" + display.scrollbarsClipped = true + } +} + +function selectionSnapshot(cm) { + if (cm.hasFocus()) return null + let active = activeElt(root(cm)) + if (!active || !contains(cm.display.lineDiv, active)) return null + let result = {activeElt: active} + if (window.getSelection) { + let sel = win(cm).getSelection() + if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) { + result.anchorNode = sel.anchorNode + result.anchorOffset = sel.anchorOffset + result.focusNode = sel.focusNode + result.focusOffset = sel.focusOffset + } + } + return result +} + +function restoreSelection(snapshot) { + if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt(rootNode(snapshot.activeElt))) return + snapshot.activeElt.focus() + if (!/^(INPUT|TEXTAREA)$/.test(snapshot.activeElt.nodeName) && + snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) { + let doc = snapshot.activeElt.ownerDocument + let sel = doc.defaultView.getSelection(), range = doc.createRange() + range.setEnd(snapshot.anchorNode, snapshot.anchorOffset) + range.collapse(false) + sel.removeAllRanges() + sel.addRange(range) + sel.extend(snapshot.focusNode, snapshot.focusOffset) + } +} + +// Does the actual updating of the line display. Bails out +// (returning false) when there is nothing to be done and forced is +// false. +export function updateDisplayIfNeeded(cm, update) { + let display = cm.display, doc = cm.doc + + if (update.editorIsHidden) { + resetView(cm) + return false + } + + // Bail out if the visible area is already rendered and nothing changed. + if (!update.force && + update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && + display.renderedView == display.view && countDirtyView(cm) == 0) + return false + + if (maybeUpdateLineNumberWidth(cm)) { + resetView(cm) + update.dims = getDimensions(cm) + } + + // Compute a suitable new viewport (from & to) + let end = doc.first + doc.size + let from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first) + let to = Math.min(end, update.visible.to + cm.options.viewportMargin) + if (display.viewFrom < from && from - display.viewFrom < 20) from = Math.max(doc.first, display.viewFrom) + if (display.viewTo > to && display.viewTo - to < 20) to = Math.min(end, display.viewTo) + if (sawCollapsedSpans) { + from = visualLineNo(cm.doc, from) + to = visualLineEndNo(cm.doc, to) + } + + let different = from != display.viewFrom || to != display.viewTo || + display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth + adjustView(cm, from, to) + + display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)) + // Position the mover div to align with the current scroll position + cm.display.mover.style.top = display.viewOffset + "px" + + let toUpdate = countDirtyView(cm) + if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo)) + return false + + // For big changes, we hide the enclosing element during the + // update, since that speeds up the operations on most browsers. + let selSnapshot = selectionSnapshot(cm) + if (toUpdate > 4) display.lineDiv.style.display = "none" + patchDisplay(cm, display.updateLineNumbers, update.dims) + if (toUpdate > 4) display.lineDiv.style.display = "" + display.renderedView = display.view + // There might have been a widget with a focused element that got + // hidden or updated, if so re-focus it. + restoreSelection(selSnapshot) + + // Prevent selection and cursors from interfering with the scroll + // width and height. + removeChildren(display.cursorDiv) + removeChildren(display.selectionDiv) + display.gutters.style.height = display.sizer.style.minHeight = 0 + + if (different) { + display.lastWrapHeight = update.wrapperHeight + display.lastWrapWidth = update.wrapperWidth + startWorker(cm, 400) + } + + display.updateLineNumbers = null + + return true +} + +export function postUpdateDisplay(cm, update) { + let viewport = update.viewport + + for (let first = true;; first = false) { + if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { + // Clip forced viewport to actual scrollable area. + if (viewport && viewport.top != null) + viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)} + // Updated line heights might result in the drawn area not + // actually covering the viewport. Keep looping until it does. + update.visible = visibleLines(cm.display, cm.doc, viewport) + if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo) + break + } else if (first) { + update.visible = visibleLines(cm.display, cm.doc, viewport) + } + if (!updateDisplayIfNeeded(cm, update)) break + updateHeightsInViewport(cm) + let barMeasure = measureForScrollbars(cm) + updateSelection(cm) + updateScrollbars(cm, barMeasure) + setDocumentHeight(cm, barMeasure) + update.force = false + } + + update.signal(cm, "update", cm) + if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) { + update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo) + cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo + } +} + +export function updateDisplaySimple(cm, viewport) { + let update = new DisplayUpdate(cm, viewport) + if (updateDisplayIfNeeded(cm, update)) { + updateHeightsInViewport(cm) + postUpdateDisplay(cm, update) + let barMeasure = measureForScrollbars(cm) + updateSelection(cm) + updateScrollbars(cm, barMeasure) + setDocumentHeight(cm, barMeasure) + update.finish() + } +} + +// Sync the actual display DOM structure with display.view, removing +// nodes for lines that are no longer in view, and creating the ones +// that are not there yet, and updating the ones that are out of +// date. +function patchDisplay(cm, updateNumbersFrom, dims) { + let display = cm.display, lineNumbers = cm.options.lineNumbers + let container = display.lineDiv, cur = container.firstChild + + function rm(node) { + let next = node.nextSibling + // Works around a throw-scroll bug in OS X Webkit + if (webkit && mac && cm.display.currentWheelTarget == node) + node.style.display = "none" + else + node.parentNode.removeChild(node) + return next + } + + let view = display.view, lineN = display.viewFrom + // Loop over the elements in the view, syncing cur (the DOM nodes + // in display.lineDiv) with the view as we go. + for (let i = 0; i < view.length; i++) { + let lineView = view[i] + if (lineView.hidden) { + } else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet + let node = buildLineElement(cm, lineView, lineN, dims) + container.insertBefore(node, cur) + } else { // Already drawn + while (cur != lineView.node) cur = rm(cur) + let updateNumber = lineNumbers && updateNumbersFrom != null && + updateNumbersFrom <= lineN && lineView.lineNumber + if (lineView.changes) { + if (indexOf(lineView.changes, "gutter") > -1) updateNumber = false + updateLineForChanges(cm, lineView, lineN, dims) + } + if (updateNumber) { + removeChildren(lineView.lineNumber) + lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN))) + } + cur = lineView.node.nextSibling + } + lineN += lineView.size + } + while (cur) cur = rm(cur) +} + +export function updateGutterSpace(display) { + let width = display.gutters.offsetWidth + display.sizer.style.marginLeft = width + "px" + // Send an event to consumers responding to changes in gutter width. + signalLater(display, "gutterChanged", display) +} + +export function setDocumentHeight(cm, measure) { + cm.display.sizer.style.minHeight = measure.docHeight + "px" + cm.display.heightForcer.style.top = measure.docHeight + "px" + cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px" +} diff --git a/js/codemirror/src/display/update_line.js b/js/codemirror/src/display/update_line.js new file mode 100644 index 0000000..dd1aac8 --- /dev/null +++ b/js/codemirror/src/display/update_line.js @@ -0,0 +1,189 @@ +import { buildLineContent } from "../line/line_data.js" +import { lineNumberFor } from "../line/utils_line.js" +import { ie, ie_version } from "../util/browser.js" +import { elt, classTest } from "../util/dom.js" +import { signalLater } from "../util/operation_group.js" + +// When an aspect of a line changes, a string is added to +// lineView.changes. This updates the relevant part of the line's +// DOM structure. +export function updateLineForChanges(cm, lineView, lineN, dims) { + for (let j = 0; j < lineView.changes.length; j++) { + let type = lineView.changes[j] + if (type == "text") updateLineText(cm, lineView) + else if (type == "gutter") updateLineGutter(cm, lineView, lineN, dims) + else if (type == "class") updateLineClasses(cm, lineView) + else if (type == "widget") updateLineWidgets(cm, lineView, dims) + } + lineView.changes = null +} + +// Lines with gutter elements, widgets or a background class need to +// be wrapped, and have the extra elements added to the wrapper div +function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative") + if (lineView.text.parentNode) + lineView.text.parentNode.replaceChild(lineView.node, lineView.text) + lineView.node.appendChild(lineView.text) + if (ie && ie_version < 8) lineView.node.style.zIndex = 2 + } + return lineView.node +} + +function updateLineBackground(cm, lineView) { + let cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass + if (cls) cls += " CodeMirror-linebackground" + if (lineView.background) { + if (cls) lineView.background.className = cls + else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null } + } else if (cls) { + let wrap = ensureLineWrapped(lineView) + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild) + cm.display.input.setUneditable(lineView.background) + } +} + +// Wrapper around buildLineContent which will reuse the structure +// in display.externalMeasured when possible. +function getLineContent(cm, lineView) { + let ext = cm.display.externalMeasured + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null + lineView.measure = ext.measure + return ext.built + } + return buildLineContent(cm, lineView) +} + +// Redraw the line's text. Interacts with the background and text +// classes because the mode may output tokens that influence these +// classes. +function updateLineText(cm, lineView) { + let cls = lineView.text.className + let built = getLineContent(cm, lineView) + if (lineView.text == lineView.node) lineView.node = built.pre + lineView.text.parentNode.replaceChild(built.pre, lineView.text) + lineView.text = built.pre + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass + lineView.textClass = built.textClass + updateLineClasses(cm, lineView) + } else if (cls) { + lineView.text.className = cls + } +} + +function updateLineClasses(cm, lineView) { + updateLineBackground(cm, lineView) + if (lineView.line.wrapClass) + ensureLineWrapped(lineView).className = lineView.line.wrapClass + else if (lineView.node != lineView.text) + lineView.node.className = "" + let textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass + lineView.text.className = textClass || "" +} + +function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter) + lineView.gutter = null + } + if (lineView.gutterBackground) { + lineView.node.removeChild(lineView.gutterBackground) + lineView.gutterBackground = null + } + if (lineView.line.gutterClass) { + let wrap = ensureLineWrapped(lineView) + lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass, + `left: ${cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth}px; width: ${dims.gutterTotalWidth}px`) + cm.display.input.setUneditable(lineView.gutterBackground) + wrap.insertBefore(lineView.gutterBackground, lineView.text) + } + let markers = lineView.line.gutterMarkers + if (cm.options.lineNumbers || markers) { + let wrap = ensureLineWrapped(lineView) + let gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", `left: ${cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth}px`) + gutterWrap.setAttribute("aria-hidden", "true") + cm.display.input.setUneditable(gutterWrap) + wrap.insertBefore(gutterWrap, lineView.text) + if (lineView.line.gutterClass) + gutterWrap.className += " " + lineView.line.gutterClass + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) + lineView.lineNumber = gutterWrap.appendChild( + elt("div", lineNumberFor(cm.options, lineN), + "CodeMirror-linenumber CodeMirror-gutter-elt", + `left: ${dims.gutterLeft["CodeMirror-linenumbers"]}px; width: ${cm.display.lineNumInnerWidth}px`)) + if (markers) for (let k = 0; k < cm.display.gutterSpecs.length; ++k) { + let id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id] + if (found) + gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", + `left: ${dims.gutterLeft[id]}px; width: ${dims.gutterWidth[id]}px`)) + } + } +} + +function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) lineView.alignable = null + let isWidget = classTest("CodeMirror-linewidget") + for (let node = lineView.node.firstChild, next; node; node = next) { + next = node.nextSibling + if (isWidget.test(node.className)) lineView.node.removeChild(node) + } + insertLineWidgets(cm, lineView, dims) +} + +// Build a line's DOM representation from scratch +export function buildLineElement(cm, lineView, lineN, dims) { + let built = getLineContent(cm, lineView) + lineView.text = lineView.node = built.pre + if (built.bgClass) lineView.bgClass = built.bgClass + if (built.textClass) lineView.textClass = built.textClass + + updateLineClasses(cm, lineView) + updateLineGutter(cm, lineView, lineN, dims) + insertLineWidgets(cm, lineView, dims) + return lineView.node +} + +// A lineView may contain multiple logical lines (when merged by +// collapsed spans). The widgets for all of them need to be drawn. +function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true) + if (lineView.rest) for (let i = 0; i < lineView.rest.length; i++) + insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false) +} + +function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) return + let wrap = ensureLineWrapped(lineView) + for (let i = 0, ws = line.widgets; i < ws.length; ++i) { + let widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget" + (widget.className ? " " + widget.className : "")) + if (!widget.handleMouseEvents) node.setAttribute("cm-ignore-events", "true") + positionLineWidget(widget, node, lineView, dims) + cm.display.input.setUneditable(node) + if (allowAbove && widget.above) + wrap.insertBefore(node, lineView.gutter || lineView.text) + else + wrap.appendChild(node) + signalLater(widget, "redraw") + } +} + +function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + ;(lineView.alignable || (lineView.alignable = [])).push(node) + let width = dims.wrapperWidth + node.style.left = dims.fixedPos + "px" + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth + node.style.paddingLeft = dims.gutterTotalWidth + "px" + } + node.style.width = width + "px" + } + if (widget.coverGutter) { + node.style.zIndex = 5 + node.style.position = "relative" + if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px" + } +} diff --git a/js/codemirror/src/display/update_lines.js b/js/codemirror/src/display/update_lines.js new file mode 100644 index 0000000..f09524b --- /dev/null +++ b/js/codemirror/src/display/update_lines.js @@ -0,0 +1,82 @@ +import { heightAtLine } from "../line/spans.js" +import { getLine, lineAtHeight, updateLineHeight } from "../line/utils_line.js" +import { paddingTop, charWidth } from "../measurement/position_measurement.js" +import { ie, ie_version } from "../util/browser.js" + +// Read the actual heights of the rendered lines, and update their +// stored heights to match. +export function updateHeightsInViewport(cm) { + let display = cm.display + let prevBottom = display.lineDiv.offsetTop + let viewTop = Math.max(0, display.scroller.getBoundingClientRect().top) + let oldHeight = display.lineDiv.getBoundingClientRect().top + let mustScroll = 0 + for (let i = 0; i < display.view.length; i++) { + let cur = display.view[i], wrapping = cm.options.lineWrapping + let height, width = 0 + if (cur.hidden) continue + oldHeight += cur.line.height + if (ie && ie_version < 8) { + let bot = cur.node.offsetTop + cur.node.offsetHeight + height = bot - prevBottom + prevBottom = bot + } else { + let box = cur.node.getBoundingClientRect() + height = box.bottom - box.top + // Check that lines don't extend past the right of the current + // editor width + if (!wrapping && cur.text.firstChild) + width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1 + } + let diff = cur.line.height - height + if (diff > .005 || diff < -.005) { + if (oldHeight < viewTop) mustScroll -= diff + updateLineHeight(cur.line, height) + updateWidgetHeight(cur.line) + if (cur.rest) for (let j = 0; j < cur.rest.length; j++) + updateWidgetHeight(cur.rest[j]) + } + if (width > cm.display.sizerWidth) { + let chWidth = Math.ceil(width / charWidth(cm.display)) + if (chWidth > cm.display.maxLineLength) { + cm.display.maxLineLength = chWidth + cm.display.maxLine = cur.line + cm.display.maxLineChanged = true + } + } + } + if (Math.abs(mustScroll) > 2) display.scroller.scrollTop += mustScroll +} + +// Read and store the height of line widgets associated with the +// given line. +function updateWidgetHeight(line) { + if (line.widgets) for (let i = 0; i < line.widgets.length; ++i) { + let w = line.widgets[i], parent = w.node.parentNode + if (parent) w.height = parent.offsetHeight + } +} + +// Compute the lines that are visible in a given viewport (defaults +// the the current scroll position). viewport may contain top, +// height, and ensure (see op.scrollToPos) properties. +export function visibleLines(display, doc, viewport) { + let top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop + top = Math.floor(top - paddingTop(display)) + let bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight + + let from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom) + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + let ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line + if (ensureFrom < from) { + from = ensureFrom + to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight) + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight) + to = ensureTo + } + } + return {from: from, to: Math.max(to, from + 1)} +} diff --git a/js/codemirror/src/display/view_tracking.js b/js/codemirror/src/display/view_tracking.js new file mode 100644 index 0000000..41464f2 --- /dev/null +++ b/js/codemirror/src/display/view_tracking.js @@ -0,0 +1,153 @@ +import { buildViewArray } from "../line/line_data.js" +import { sawCollapsedSpans } from "../line/saw_special_spans.js" +import { visualLineEndNo, visualLineNo } from "../line/spans.js" +import { findViewIndex } from "../measurement/position_measurement.js" +import { indexOf } from "../util/misc.js" + +// Updates the display.view data structure for a given change to the +// document. From and to are in pre-change coordinates. Lendiff is +// the amount of lines added or subtracted by the change. This is +// used for changes that span multiple lines, or change the way +// lines are divided into visual lines. regLineChange (below) +// registers single-line changes. +export function regChange(cm, from, to, lendiff) { + if (from == null) from = cm.doc.first + if (to == null) to = cm.doc.first + cm.doc.size + if (!lendiff) lendiff = 0 + + let display = cm.display + if (lendiff && to < display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers > from)) + display.updateLineNumbers = from + + cm.curOp.viewChanged = true + + if (from >= display.viewTo) { // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) + resetView(cm) + } else if (to <= display.viewFrom) { // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm) + } else { + display.viewFrom += lendiff + display.viewTo += lendiff + } + } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap + resetView(cm) + } else if (from <= display.viewFrom) { // Top overlap + let cut = viewCuttingPoint(cm, to, to + lendiff, 1) + if (cut) { + display.view = display.view.slice(cut.index) + display.viewFrom = cut.lineN + display.viewTo += lendiff + } else { + resetView(cm) + } + } else if (to >= display.viewTo) { // Bottom overlap + let cut = viewCuttingPoint(cm, from, from, -1) + if (cut) { + display.view = display.view.slice(0, cut.index) + display.viewTo = cut.lineN + } else { + resetView(cm) + } + } else { // Gap in the middle + let cutTop = viewCuttingPoint(cm, from, from, -1) + let cutBot = viewCuttingPoint(cm, to, to + lendiff, 1) + if (cutTop && cutBot) { + display.view = display.view.slice(0, cutTop.index) + .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) + .concat(display.view.slice(cutBot.index)) + display.viewTo += lendiff + } else { + resetView(cm) + } + } + + let ext = display.externalMeasured + if (ext) { + if (to < ext.lineN) + ext.lineN += lendiff + else if (from < ext.lineN + ext.size) + display.externalMeasured = null + } +} + +// Register a change to a single line. Type must be one of "text", +// "gutter", "class", "widget" +export function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true + let display = cm.display, ext = cm.display.externalMeasured + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) + display.externalMeasured = null + + if (line < display.viewFrom || line >= display.viewTo) return + let lineView = display.view[findViewIndex(cm, line)] + if (lineView.node == null) return + let arr = lineView.changes || (lineView.changes = []) + if (indexOf(arr, type) == -1) arr.push(type) +} + +// Clear the view. +export function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first + cm.display.view = [] + cm.display.viewOffset = 0 +} + +function viewCuttingPoint(cm, oldN, newN, dir) { + let index = findViewIndex(cm, oldN), diff, view = cm.display.view + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) + return {index: index, lineN: newN} + let n = cm.display.viewFrom + for (let i = 0; i < index; i++) + n += view[i].size + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) return null + diff = (n + view[index].size) - oldN + index++ + } else { + diff = n - oldN + } + oldN += diff; newN += diff + } + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) return null + newN += dir * view[index - (dir < 0 ? 1 : 0)].size + index += dir + } + return {index: index, lineN: newN} +} + +// Force the view to cover a given range, adding empty view element +// or clipping off existing ones as needed. +export function adjustView(cm, from, to) { + let display = cm.display, view = display.view + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to) + display.viewFrom = from + } else { + if (display.viewFrom > from) + display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view) + else if (display.viewFrom < from) + display.view = display.view.slice(findViewIndex(cm, from)) + display.viewFrom = from + if (display.viewTo < to) + display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)) + else if (display.viewTo > to) + display.view = display.view.slice(0, findViewIndex(cm, to)) + } + display.viewTo = to +} + +// Count the number of lines in the view whose DOM representation is +// out of date (or nonexistent). +export function countDirtyView(cm) { + let view = cm.display.view, dirty = 0 + for (let i = 0; i < view.length; i++) { + let lineView = view[i] + if (!lineView.hidden && (!lineView.node || lineView.changes)) ++dirty + } + return dirty +} diff --git a/js/codemirror/src/edit/CodeMirror.js b/js/codemirror/src/edit/CodeMirror.js new file mode 100644 index 0000000..dc01611 --- /dev/null +++ b/js/codemirror/src/edit/CodeMirror.js @@ -0,0 +1,217 @@ +import { Display } from "../display/Display.js" +import { onFocus, onBlur } from "../display/focus.js" +import { maybeUpdateLineNumberWidth } from "../display/line_numbers.js" +import { endOperation, operation, startOperation } from "../display/operations.js" +import { initScrollbars } from "../display/scrollbars.js" +import { onScrollWheel } from "../display/scroll_events.js" +import { setScrollLeft, updateScrollTop } from "../display/scrolling.js" +import { clipPos, Pos } from "../line/pos.js" +import { posFromMouse } from "../measurement/position_measurement.js" +import { eventInWidget } from "../measurement/widgets.js" +import Doc from "../model/Doc.js" +import { attachDoc } from "../model/document_data.js" +import { Range } from "../model/selection.js" +import { extendSelection } from "../model/selection_updates.js" +import { ie, ie_version, mobile, webkit } from "../util/browser.js" +import { e_preventDefault, e_stop, on, signal, signalDOMEvent } from "../util/event.js" +import { copyObj, Delayed } from "../util/misc.js" + +import { clearDragCursor, onDragOver, onDragStart, onDrop } from "./drop_events.js" +import { ensureGlobalHandlers } from "./global_events.js" +import { onKeyDown, onKeyPress, onKeyUp } from "./key_events.js" +import { clickInGutter, onContextMenu, onMouseDown } from "./mouse_events.js" +import { themeChanged } from "./utils.js" +import { defaults, optionHandlers, Init } from "./options.js" + +// A CodeMirror instance represents an editor. This is the object +// that user code is usually dealing with. + +export function CodeMirror(place, options) { + if (!(this instanceof CodeMirror)) return new CodeMirror(place, options) + + this.options = options = options ? copyObj(options) : {} + // Determine effective options based on given values and defaults. + copyObj(defaults, options, false) + + let doc = options.value + if (typeof doc == "string") doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction) + else if (options.mode) doc.modeOption = options.mode + this.doc = doc + + let input = new CodeMirror.inputStyles[options.inputStyle](this) + let display = this.display = new Display(place, doc, input, options) + display.wrapper.CodeMirror = this + themeChanged(this) + if (options.lineWrapping) + this.display.wrapper.className += " CodeMirror-wrap" + initScrollbars(this) + + this.state = { + keyMaps: [], // stores maps added by addKeyMap + overlays: [], // highlighting overlays, as added by addOverlay + modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info + overwrite: false, + delayingBlurEvent: false, + focused: false, + suppressEdits: false, // used to disable editing during key handlers when in readOnly mode + pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll + selectingText: false, + draggingText: false, + highlight: new Delayed(), // stores highlight worker timeout + keySeq: null, // Unfinished key sequence + specialChars: null + } + + if (options.autofocus && !mobile) display.input.focus() + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie && ie_version < 11) setTimeout(() => this.display.input.reset(true), 20) + + registerEventHandlers(this) + ensureGlobalHandlers() + + startOperation(this) + this.curOp.forceUpdate = true + attachDoc(this, doc) + + if ((options.autofocus && !mobile) || this.hasFocus()) + setTimeout(() => { + if (this.hasFocus() && !this.state.focused) onFocus(this) + }, 20) + else + onBlur(this) + + for (let opt in optionHandlers) if (optionHandlers.hasOwnProperty(opt)) + optionHandlers[opt](this, options[opt], Init) + maybeUpdateLineNumberWidth(this) + if (options.finishInit) options.finishInit(this) + for (let i = 0; i < initHooks.length; ++i) initHooks[i](this) + endOperation(this) + // Suppress optimizelegibility in Webkit, since it breaks text + // measuring on line wrapping boundaries. + if (webkit && options.lineWrapping && + getComputedStyle(display.lineDiv).textRendering == "optimizelegibility") + display.lineDiv.style.textRendering = "auto" +} + +// The default configuration options. +CodeMirror.defaults = defaults +// Functions to run when options are changed. +CodeMirror.optionHandlers = optionHandlers + +export default CodeMirror + +// Attach the necessary event handlers when initializing the editor +function registerEventHandlers(cm) { + let d = cm.display + on(d.scroller, "mousedown", operation(cm, onMouseDown)) + // Older IE's will not fire a second mousedown for a double click + if (ie && ie_version < 11) + on(d.scroller, "dblclick", operation(cm, e => { + if (signalDOMEvent(cm, e)) return + let pos = posFromMouse(cm, e) + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return + e_preventDefault(e) + let word = cm.findWordAt(pos) + extendSelection(cm.doc, word.anchor, word.head) + })) + else + on(d.scroller, "dblclick", e => signalDOMEvent(cm, e) || e_preventDefault(e)) + // Some browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for these browsers. + on(d.scroller, "contextmenu", e => onContextMenu(cm, e)) + on(d.input.getField(), "contextmenu", e => { + if (!d.scroller.contains(e.target)) onContextMenu(cm, e) + }) + + // Used to suppress mouse event handling when a touch happens + let touchFinished, prevTouch = {end: 0} + function finishTouch() { + if (d.activeTouch) { + touchFinished = setTimeout(() => d.activeTouch = null, 1000) + prevTouch = d.activeTouch + prevTouch.end = +new Date + } + } + function isMouseLikeTouchEvent(e) { + if (e.touches.length != 1) return false + let touch = e.touches[0] + return touch.radiusX <= 1 && touch.radiusY <= 1 + } + function farAway(touch, other) { + if (other.left == null) return true + let dx = other.left - touch.left, dy = other.top - touch.top + return dx * dx + dy * dy > 20 * 20 + } + on(d.scroller, "touchstart", e => { + if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) { + d.input.ensurePolled() + clearTimeout(touchFinished) + let now = +new Date + d.activeTouch = {start: now, moved: false, + prev: now - prevTouch.end <= 300 ? prevTouch : null} + if (e.touches.length == 1) { + d.activeTouch.left = e.touches[0].pageX + d.activeTouch.top = e.touches[0].pageY + } + } + }) + on(d.scroller, "touchmove", () => { + if (d.activeTouch) d.activeTouch.moved = true + }) + on(d.scroller, "touchend", e => { + let touch = d.activeTouch + if (touch && !eventInWidget(d, e) && touch.left != null && + !touch.moved && new Date - touch.start < 300) { + let pos = cm.coordsChar(d.activeTouch, "page"), range + if (!touch.prev || farAway(touch, touch.prev)) // Single tap + range = new Range(pos, pos) + else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap + range = cm.findWordAt(pos) + else // Triple tap + range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) + cm.setSelection(range.anchor, range.head) + cm.focus() + e_preventDefault(e) + } + finishTouch() + }) + on(d.scroller, "touchcancel", finishTouch) + + // Sync scrolling between fake scrollbars and real scrollable + // area, ensure viewport is updated when scrolling. + on(d.scroller, "scroll", () => { + if (d.scroller.clientHeight) { + updateScrollTop(cm, d.scroller.scrollTop) + setScrollLeft(cm, d.scroller.scrollLeft, true) + signal(cm, "scroll", cm) + } + }) + + // Listen to wheel events in order to try and update the viewport on time. + on(d.scroller, "mousewheel", e => onScrollWheel(cm, e)) + on(d.scroller, "DOMMouseScroll", e => onScrollWheel(cm, e)) + + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", () => d.wrapper.scrollTop = d.wrapper.scrollLeft = 0) + + d.dragFunctions = { + enter: e => {if (!signalDOMEvent(cm, e)) e_stop(e)}, + over: e => {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e) }}, + start: e => onDragStart(cm, e), + drop: operation(cm, onDrop), + leave: e => {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm) }} + } + + let inp = d.input.getField() + on(inp, "keyup", e => onKeyUp.call(cm, e)) + on(inp, "keydown", operation(cm, onKeyDown)) + on(inp, "keypress", operation(cm, onKeyPress)) + on(inp, "focus", e => onFocus(cm, e)) + on(inp, "blur", e => onBlur(cm, e)) +} + +let initHooks = [] +CodeMirror.defineInitHook = f => initHooks.push(f) diff --git a/js/codemirror/src/edit/commands.js b/js/codemirror/src/edit/commands.js new file mode 100644 index 0000000..4c4cc4c --- /dev/null +++ b/js/codemirror/src/edit/commands.js @@ -0,0 +1,178 @@ +import { deleteNearSelection } from "./deleteNearSelection.js" +import { runInOp } from "../display/operations.js" +import { ensureCursorVisible } from "../display/scrolling.js" +import { endOfLine } from "../input/movement.js" +import { clipPos, Pos } from "../line/pos.js" +import { visualLine, visualLineEnd } from "../line/spans.js" +import { getLine, lineNo } from "../line/utils_line.js" +import { Range } from "../model/selection.js" +import { selectAll } from "../model/selection_updates.js" +import { countColumn, sel_dontScroll, sel_move, spaceStr } from "../util/misc.js" +import { getOrder } from "../util/bidi.js" + +// Commands are parameter-less actions that can be performed on an +// editor, mostly used for keybindings. +export let commands = { + selectAll: selectAll, + singleSelection: cm => cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll), + killLine: cm => deleteNearSelection(cm, range => { + if (range.empty()) { + let len = getLine(cm.doc, range.head.line).text.length + if (range.head.ch == len && range.head.line < cm.lastLine()) + return {from: range.head, to: Pos(range.head.line + 1, 0)} + else + return {from: range.head, to: Pos(range.head.line, len)} + } else { + return {from: range.from(), to: range.to()} + } + }), + deleteLine: cm => deleteNearSelection(cm, range => ({ + from: Pos(range.from().line, 0), + to: clipPos(cm.doc, Pos(range.to().line + 1, 0)) + })), + delLineLeft: cm => deleteNearSelection(cm, range => ({ + from: Pos(range.from().line, 0), to: range.from() + })), + delWrappedLineLeft: cm => deleteNearSelection(cm, range => { + let top = cm.charCoords(range.head, "div").top + 5 + let leftPos = cm.coordsChar({left: 0, top: top}, "div") + return {from: leftPos, to: range.from()} + }), + delWrappedLineRight: cm => deleteNearSelection(cm, range => { + let top = cm.charCoords(range.head, "div").top + 5 + let rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div") + return {from: range.from(), to: rightPos } + }), + undo: cm => cm.undo(), + redo: cm => cm.redo(), + undoSelection: cm => cm.undoSelection(), + redoSelection: cm => cm.redoSelection(), + goDocStart: cm => cm.extendSelection(Pos(cm.firstLine(), 0)), + goDocEnd: cm => cm.extendSelection(Pos(cm.lastLine())), + goLineStart: cm => cm.extendSelectionsBy(range => lineStart(cm, range.head.line), + {origin: "+move", bias: 1} + ), + goLineStartSmart: cm => cm.extendSelectionsBy(range => lineStartSmart(cm, range.head), + {origin: "+move", bias: 1} + ), + goLineEnd: cm => cm.extendSelectionsBy(range => lineEnd(cm, range.head.line), + {origin: "+move", bias: -1} + ), + goLineRight: cm => cm.extendSelectionsBy(range => { + let top = cm.cursorCoords(range.head, "div").top + 5 + return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div") + }, sel_move), + goLineLeft: cm => cm.extendSelectionsBy(range => { + let top = cm.cursorCoords(range.head, "div").top + 5 + return cm.coordsChar({left: 0, top: top}, "div") + }, sel_move), + goLineLeftSmart: cm => cm.extendSelectionsBy(range => { + let top = cm.cursorCoords(range.head, "div").top + 5 + let pos = cm.coordsChar({left: 0, top: top}, "div") + if (pos.ch < cm.getLine(pos.line).search(/\S/)) return lineStartSmart(cm, range.head) + return pos + }, sel_move), + goLineUp: cm => cm.moveV(-1, "line"), + goLineDown: cm => cm.moveV(1, "line"), + goPageUp: cm => cm.moveV(-1, "page"), + goPageDown: cm => cm.moveV(1, "page"), + goCharLeft: cm => cm.moveH(-1, "char"), + goCharRight: cm => cm.moveH(1, "char"), + goColumnLeft: cm => cm.moveH(-1, "column"), + goColumnRight: cm => cm.moveH(1, "column"), + goWordLeft: cm => cm.moveH(-1, "word"), + goGroupRight: cm => cm.moveH(1, "group"), + goGroupLeft: cm => cm.moveH(-1, "group"), + goWordRight: cm => cm.moveH(1, "word"), + delCharBefore: cm => cm.deleteH(-1, "codepoint"), + delCharAfter: cm => cm.deleteH(1, "char"), + delWordBefore: cm => cm.deleteH(-1, "word"), + delWordAfter: cm => cm.deleteH(1, "word"), + delGroupBefore: cm => cm.deleteH(-1, "group"), + delGroupAfter: cm => cm.deleteH(1, "group"), + indentAuto: cm => cm.indentSelection("smart"), + indentMore: cm => cm.indentSelection("add"), + indentLess: cm => cm.indentSelection("subtract"), + insertTab: cm => cm.replaceSelection("\t"), + insertSoftTab: cm => { + let spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize + for (let i = 0; i < ranges.length; i++) { + let pos = ranges[i].from() + let col = countColumn(cm.getLine(pos.line), pos.ch, tabSize) + spaces.push(spaceStr(tabSize - col % tabSize)) + } + cm.replaceSelections(spaces) + }, + defaultTab: cm => { + if (cm.somethingSelected()) cm.indentSelection("add") + else cm.execCommand("insertTab") + }, + // Swap the two chars left and right of each selection's head. + // Move cursor behind the two swapped characters afterwards. + // + // Doesn't consider line feeds a character. + // Doesn't scan more than one line above to find a character. + // Doesn't do anything on an empty line. + // Doesn't do anything with non-empty selections. + transposeChars: cm => runInOp(cm, () => { + let ranges = cm.listSelections(), newSel = [] + for (let i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) continue + let cur = ranges[i].head, line = getLine(cm.doc, cur.line).text + if (line) { + if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1) + if (cur.ch > 0) { + cur = new Pos(cur.line, cur.ch + 1) + cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), + Pos(cur.line, cur.ch - 2), cur, "+transpose") + } else if (cur.line > cm.doc.first) { + let prev = getLine(cm.doc, cur.line - 1).text + if (prev) { + cur = new Pos(cur.line, 1) + cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() + + prev.charAt(prev.length - 1), + Pos(cur.line - 1, prev.length - 1), cur, "+transpose") + } + } + } + newSel.push(new Range(cur, cur)) + } + cm.setSelections(newSel) + }), + newlineAndIndent: cm => runInOp(cm, () => { + let sels = cm.listSelections() + for (let i = sels.length - 1; i >= 0; i--) + cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input") + sels = cm.listSelections() + for (let i = 0; i < sels.length; i++) + cm.indentLine(sels[i].from().line, null, true) + ensureCursorVisible(cm) + }), + openLine: cm => cm.replaceSelection("\n", "start"), + toggleOverwrite: cm => cm.toggleOverwrite() +} + + +function lineStart(cm, lineN) { + let line = getLine(cm.doc, lineN) + let visual = visualLine(line) + if (visual != line) lineN = lineNo(visual) + return endOfLine(true, cm, visual, lineN, 1) +} +function lineEnd(cm, lineN) { + let line = getLine(cm.doc, lineN) + let visual = visualLineEnd(line) + if (visual != line) lineN = lineNo(visual) + return endOfLine(true, cm, line, lineN, -1) +} +function lineStartSmart(cm, pos) { + let start = lineStart(cm, pos.line) + let line = getLine(cm.doc, start.line) + let order = getOrder(line, cm.doc.direction) + if (!order || order[0].level == 0) { + let firstNonWS = Math.max(start.ch, line.text.search(/\S/)) + let inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch + return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky) + } + return start +} diff --git a/js/codemirror/src/edit/deleteNearSelection.js b/js/codemirror/src/edit/deleteNearSelection.js new file mode 100644 index 0000000..82e331a --- /dev/null +++ b/js/codemirror/src/edit/deleteNearSelection.js @@ -0,0 +1,30 @@ +import { runInOp } from "../display/operations.js" +import { ensureCursorVisible } from "../display/scrolling.js" +import { cmp } from "../line/pos.js" +import { replaceRange } from "../model/changes.js" +import { lst } from "../util/misc.js" + +// Helper for deleting text near the selection(s), used to implement +// backspace, delete, and similar functionality. +export function deleteNearSelection(cm, compute) { + let ranges = cm.doc.sel.ranges, kill = [] + // Build up a set of ranges to kill first, merging overlapping + // ranges. + for (let i = 0; i < ranges.length; i++) { + let toKill = compute(ranges[i]) + while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { + let replaced = kill.pop() + if (cmp(replaced.from, toKill.from) < 0) { + toKill.from = replaced.from + break + } + } + kill.push(toKill) + } + // Next, remove those actual ranges. + runInOp(cm, () => { + for (let i = kill.length - 1; i >= 0; i--) + replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete") + ensureCursorVisible(cm) + }) +} diff --git a/js/codemirror/src/edit/drop_events.js b/js/codemirror/src/edit/drop_events.js new file mode 100644 index 0000000..f309b2d --- /dev/null +++ b/js/codemirror/src/edit/drop_events.js @@ -0,0 +1,130 @@ +import { drawSelectionCursor } from "../display/selection.js" +import { operation } from "../display/operations.js" +import { clipPos } from "../line/pos.js" +import { posFromMouse } from "../measurement/position_measurement.js" +import { eventInWidget } from "../measurement/widgets.js" +import { makeChange, replaceRange } from "../model/changes.js" +import { changeEnd } from "../model/change_measurement.js" +import { simpleSelection } from "../model/selection.js" +import { setSelectionNoUndo, setSelectionReplaceHistory } from "../model/selection_updates.js" +import { ie, presto, safari } from "../util/browser.js" +import { elt, removeChildrenAndAdd } from "../util/dom.js" +import { e_preventDefault, e_stop, signalDOMEvent } from "../util/event.js" +import { indexOf } from "../util/misc.js" + +// Kludge to work around strange IE behavior where it'll sometimes +// re-fire a series of drag-related events right after the drop (#1551) +let lastDrop = 0 + +export function onDrop(e) { + let cm = this + clearDragCursor(cm) + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) + return + e_preventDefault(e) + if (ie) lastDrop = +new Date + let pos = posFromMouse(cm, e, true), files = e.dataTransfer.files + if (!pos || cm.isReadOnly()) return + // Might be a file drop, in which case we simply extract the text + // and insert it. + if (files && files.length && window.FileReader && window.File) { + let n = files.length, text = Array(n), read = 0 + const markAsReadAndPasteIfAllFilesAreRead = () => { + if (++read == n) { + operation(cm, () => { + pos = clipPos(cm.doc, pos) + let change = {from: pos, to: pos, + text: cm.doc.splitLines( + text.filter(t => t != null).join(cm.doc.lineSeparator())), + origin: "paste"} + makeChange(cm.doc, change) + setSelectionReplaceHistory(cm.doc, simpleSelection(clipPos(cm.doc, pos), clipPos(cm.doc, changeEnd(change)))) + })() + } + } + const readTextFromFile = (file, i) => { + if (cm.options.allowDropFileTypes && + indexOf(cm.options.allowDropFileTypes, file.type) == -1) { + markAsReadAndPasteIfAllFilesAreRead() + return + } + let reader = new FileReader + reader.onerror = () => markAsReadAndPasteIfAllFilesAreRead() + reader.onload = () => { + let content = reader.result + if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { + markAsReadAndPasteIfAllFilesAreRead() + return + } + text[i] = content + markAsReadAndPasteIfAllFilesAreRead() + } + reader.readAsText(file) + } + for (let i = 0; i < files.length; i++) readTextFromFile(files[i], i) + } else { // Normal drop + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { + cm.state.draggingText(e) + // Ensure the editor is re-focused + setTimeout(() => cm.display.input.focus(), 20) + return + } + try { + let text = e.dataTransfer.getData("Text") + if (text) { + let selected + if (cm.state.draggingText && !cm.state.draggingText.copy) + selected = cm.listSelections() + setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)) + if (selected) for (let i = 0; i < selected.length; ++i) + replaceRange(cm.doc, "", selected[i].anchor, selected[i].head, "drag") + cm.replaceSelection(text, "around", "paste") + cm.display.input.focus() + } + } + catch(e){} + } +} + +export function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return + + e.dataTransfer.setData("Text", cm.getSelection()) + e.dataTransfer.effectAllowed = "copyMove" + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + let img = elt("img", null, null, "position: fixed; left: 0; top: 0;") + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" + if (presto) { + img.width = img.height = 1 + cm.display.wrapper.appendChild(img) + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop + } + e.dataTransfer.setDragImage(img, 0, 0) + if (presto) img.parentNode.removeChild(img) + } +} + +export function onDragOver(cm, e) { + let pos = posFromMouse(cm, e) + if (!pos) return + let frag = document.createDocumentFragment() + drawSelectionCursor(cm, pos, frag) + if (!cm.display.dragCursor) { + cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors") + cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv) + } + removeChildrenAndAdd(cm.display.dragCursor, frag) +} + +export function clearDragCursor(cm) { + if (cm.display.dragCursor) { + cm.display.lineSpace.removeChild(cm.display.dragCursor) + cm.display.dragCursor = null + } +} diff --git a/js/codemirror/src/edit/fromTextArea.js b/js/codemirror/src/edit/fromTextArea.js new file mode 100644 index 0000000..cbad7f6 --- /dev/null +++ b/js/codemirror/src/edit/fromTextArea.js @@ -0,0 +1,61 @@ +import { CodeMirror } from "./CodeMirror.js" +import { activeElt, rootNode } from "../util/dom.js" +import { off, on } from "../util/event.js" +import { copyObj } from "../util/misc.js" + +export function fromTextArea(textarea, options) { + options = options ? copyObj(options) : {} + options.value = textarea.value + if (!options.tabindex && textarea.tabIndex) + options.tabindex = textarea.tabIndex + if (!options.placeholder && textarea.placeholder) + options.placeholder = textarea.placeholder + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + let hasFocus = activeElt(rootNode(textarea)) + options.autofocus = hasFocus == textarea || + textarea.getAttribute("autofocus") != null && hasFocus == document.body + } + + function save() {textarea.value = cm.getValue()} + + let realSubmit + if (textarea.form) { + on(textarea.form, "submit", save) + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + let form = textarea.form + realSubmit = form.submit + try { + let wrappedSubmit = form.submit = () => { + save() + form.submit = realSubmit + form.submit() + form.submit = wrappedSubmit + } + } catch(e) {} + } + } + + options.finishInit = cm => { + cm.save = save + cm.getTextArea = () => textarea + cm.toTextArea = () => { + cm.toTextArea = isNaN // Prevent this from being ran twice + save() + textarea.parentNode.removeChild(cm.getWrapperElement()) + textarea.style.display = "" + if (textarea.form) { + off(textarea.form, "submit", save) + if (!options.leaveSubmitMethodAlone && typeof textarea.form.submit == "function") + textarea.form.submit = realSubmit + } + } + } + + textarea.style.display = "none" + let cm = CodeMirror(node => textarea.parentNode.insertBefore(node, textarea.nextSibling), + options) + return cm +} diff --git a/js/codemirror/src/edit/global_events.js b/js/codemirror/src/edit/global_events.js new file mode 100644 index 0000000..d03da2d --- /dev/null +++ b/js/codemirror/src/edit/global_events.js @@ -0,0 +1,45 @@ +import { onBlur } from "../display/focus.js" +import { on } from "../util/event.js" + +// These must be handled carefully, because naively registering a +// handler for each editor will cause the editors to never be +// garbage collected. + +function forEachCodeMirror(f) { + if (!document.getElementsByClassName) return + let byClass = document.getElementsByClassName("CodeMirror"), editors = [] + for (let i = 0; i < byClass.length; i++) { + let cm = byClass[i].CodeMirror + if (cm) editors.push(cm) + } + if (editors.length) editors[0].operation(() => { + for (let i = 0; i < editors.length; i++) f(editors[i]) + }) +} + +let globalsRegistered = false +export function ensureGlobalHandlers() { + if (globalsRegistered) return + registerGlobalHandlers() + globalsRegistered = true +} +function registerGlobalHandlers() { + // When the window resizes, we need to refresh active editors. + let resizeTimer + on(window, "resize", () => { + if (resizeTimer == null) resizeTimer = setTimeout(() => { + resizeTimer = null + forEachCodeMirror(onResize) + }, 100) + }) + // When the window loses focus, we want to show the editor as blurred + on(window, "blur", () => forEachCodeMirror(onBlur)) +} +// Called when the window resizes +function onResize(cm) { + let d = cm.display + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null + d.scrollbarsClipped = false + cm.setSize() +} diff --git a/js/codemirror/src/edit/key_events.js b/js/codemirror/src/edit/key_events.js new file mode 100644 index 0000000..737d11d --- /dev/null +++ b/js/codemirror/src/edit/key_events.js @@ -0,0 +1,163 @@ +import { signalLater } from "../util/operation_group.js" +import { restartBlink } from "../display/selection.js" +import { isModifierKey, keyName, lookupKey } from "../input/keymap.js" +import { eventInWidget } from "../measurement/widgets.js" +import { ie, ie_version, mac, presto, gecko } from "../util/browser.js" +import { activeElt, addClass, rmClass, root } from "../util/dom.js" +import { e_preventDefault, off, on, signalDOMEvent } from "../util/event.js" +import { hasCopyEvent } from "../util/feature_detection.js" +import { Delayed, Pass } from "../util/misc.js" + +import { commands } from "./commands.js" + +// Run a handler that was bound to a key. +function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound] + if (!bound) return false + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + cm.display.input.ensurePolled() + let prevShift = cm.display.shift, done = false + try { + if (cm.isReadOnly()) cm.state.suppressEdits = true + if (dropShift) cm.display.shift = false + done = bound(cm) != Pass + } finally { + cm.display.shift = prevShift + cm.state.suppressEdits = false + } + return done +} + +function lookupKeyForEditor(cm, name, handle) { + for (let i = 0; i < cm.state.keyMaps.length; i++) { + let result = lookupKey(name, cm.state.keyMaps[i], handle, cm) + if (result) return result + } + return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) + || lookupKey(name, cm.options.keyMap, handle, cm) +} + +// Note that, despite the name, this function is also used to check +// for bound mouse clicks. + +let stopSeq = new Delayed + +export function dispatchKey(cm, name, e, handle) { + let seq = cm.state.keySeq + if (seq) { + if (isModifierKey(name)) return "handled" + if (/\'$/.test(name)) + cm.state.keySeq = null + else + stopSeq.set(50, () => { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null + cm.display.input.reset() + } + }) + if (dispatchKeyInner(cm, seq + " " + name, e, handle)) return true + } + return dispatchKeyInner(cm, name, e, handle) +} + +function dispatchKeyInner(cm, name, e, handle) { + let result = lookupKeyForEditor(cm, name, handle) + + if (result == "multi") + cm.state.keySeq = name + if (result == "handled") + signalLater(cm, "keyHandled", cm, name, e) + + if (result == "handled" || result == "multi") { + e_preventDefault(e) + restartBlink(cm) + } + + return !!result +} + +// Handle a key from the keydown event. +function handleKeyBinding(cm, e) { + let name = keyName(e, true) + if (!name) return false + + if (e.shiftKey && !cm.state.keySeq) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + return dispatchKey(cm, "Shift-" + name, e, b => doHandleBinding(cm, b, true)) + || dispatchKey(cm, name, e, b => { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) + return doHandleBinding(cm, b) + }) + } else { + return dispatchKey(cm, name, e, b => doHandleBinding(cm, b)) + } +} + +// Handle a key from the keypress event +function handleCharBinding(cm, e, ch) { + return dispatchKey(cm, "'" + ch + "'", e, b => doHandleBinding(cm, b, true)) +} + +let lastStoppedKey = null +export function onKeyDown(e) { + let cm = this + if (e.target && e.target != cm.display.input.getField()) return + cm.curOp.focus = activeElt(root(cm)) + if (signalDOMEvent(cm, e)) return + // IE does strange things with escape. + if (ie && ie_version < 11 && e.keyCode == 27) e.returnValue = false + let code = e.keyCode + cm.display.shift = code == 16 || e.shiftKey + let handled = handleKeyBinding(cm, e) + if (presto) { + lastStoppedKey = handled ? code : null + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) + cm.replaceSelection("", null, "cut") + } + if (gecko && !mac && !handled && code == 46 && e.shiftKey && !e.ctrlKey && document.execCommand) + document.execCommand("cut") + + // Turn mouse into crosshair when Alt is held on Mac. + if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) + showCrossHair(cm) +} + +function showCrossHair(cm) { + let lineDiv = cm.display.lineDiv + addClass(lineDiv, "CodeMirror-crosshair") + + function up(e) { + if (e.keyCode == 18 || !e.altKey) { + rmClass(lineDiv, "CodeMirror-crosshair") + off(document, "keyup", up) + off(document, "mouseover", up) + } + } + on(document, "keyup", up) + on(document, "mouseover", up) +} + +export function onKeyUp(e) { + if (e.keyCode == 16) this.doc.sel.shift = false + signalDOMEvent(this, e) +} + +export function onKeyPress(e) { + let cm = this + if (e.target && e.target != cm.display.input.getField()) return + if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) return + let keyCode = e.keyCode, charCode = e.charCode + if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return} + if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) return + let ch = String.fromCharCode(charCode == null ? keyCode : charCode) + // Some browsers fire keypress events for backspace + if (ch == "\x08") return + if (handleCharBinding(cm, e, ch)) return + cm.display.input.onKeyPress(e) +} diff --git a/js/codemirror/src/edit/legacy.js b/js/codemirror/src/edit/legacy.js new file mode 100644 index 0000000..889badb --- /dev/null +++ b/js/codemirror/src/edit/legacy.js @@ -0,0 +1,62 @@ +import { scrollbarModel } from "../display/scrollbars.js" +import { wheelEventPixels } from "../display/scroll_events.js" +import { keyMap, keyName, isModifierKey, lookupKey, normalizeKeyMap } from "../input/keymap.js" +import { keyNames } from "../input/keynames.js" +import { Line } from "../line/line_data.js" +import { cmp, Pos } from "../line/pos.js" +import { changeEnd } from "../model/change_measurement.js" +import Doc from "../model/Doc.js" +import { LineWidget } from "../model/line_widget.js" +import { SharedTextMarker, TextMarker } from "../model/mark_text.js" +import { copyState, extendMode, getMode, innerMode, mimeModes, modeExtensions, modes, resolveMode, startState } from "../modes.js" +import { addClass, contains, rmClass } from "../util/dom.js" +import { e_preventDefault, e_stop, e_stopPropagation, off, on, signal } from "../util/event.js" +import { splitLinesAuto } from "../util/feature_detection.js" +import { countColumn, findColumn, isWordCharBasic, Pass } from "../util/misc.js" +import StringStream from "../util/StringStream.js" + +import { commands } from "./commands.js" + +export function addLegacyProps(CodeMirror) { + CodeMirror.off = off + CodeMirror.on = on + CodeMirror.wheelEventPixels = wheelEventPixels + CodeMirror.Doc = Doc + CodeMirror.splitLines = splitLinesAuto + CodeMirror.countColumn = countColumn + CodeMirror.findColumn = findColumn + CodeMirror.isWordChar = isWordCharBasic + CodeMirror.Pass = Pass + CodeMirror.signal = signal + CodeMirror.Line = Line + CodeMirror.changeEnd = changeEnd + CodeMirror.scrollbarModel = scrollbarModel + CodeMirror.Pos = Pos + CodeMirror.cmpPos = cmp + CodeMirror.modes = modes + CodeMirror.mimeModes = mimeModes + CodeMirror.resolveMode = resolveMode + CodeMirror.getMode = getMode + CodeMirror.modeExtensions = modeExtensions + CodeMirror.extendMode = extendMode + CodeMirror.copyState = copyState + CodeMirror.startState = startState + CodeMirror.innerMode = innerMode + CodeMirror.commands = commands + CodeMirror.keyMap = keyMap + CodeMirror.keyName = keyName + CodeMirror.isModifierKey = isModifierKey + CodeMirror.lookupKey = lookupKey + CodeMirror.normalizeKeyMap = normalizeKeyMap + CodeMirror.StringStream = StringStream + CodeMirror.SharedTextMarker = SharedTextMarker + CodeMirror.TextMarker = TextMarker + CodeMirror.LineWidget = LineWidget + CodeMirror.e_preventDefault = e_preventDefault + CodeMirror.e_stopPropagation = e_stopPropagation + CodeMirror.e_stop = e_stop + CodeMirror.addClass = addClass + CodeMirror.contains = contains + CodeMirror.rmClass = rmClass + CodeMirror.keyNames = keyNames +} diff --git a/js/codemirror/src/edit/main.js b/js/codemirror/src/edit/main.js new file mode 100644 index 0000000..650d09b --- /dev/null +++ b/js/codemirror/src/edit/main.js @@ -0,0 +1,69 @@ +// EDITOR CONSTRUCTOR + +import { CodeMirror } from "./CodeMirror.js" +export { CodeMirror } from "./CodeMirror.js" + +import { eventMixin } from "../util/event.js" +import { indexOf } from "../util/misc.js" + +import { defineOptions } from "./options.js" + +defineOptions(CodeMirror) + +import addEditorMethods from "./methods.js" + +addEditorMethods(CodeMirror) + +import Doc from "../model/Doc.js" + +// Set up methods on CodeMirror's prototype to redirect to the editor's document. +let dontDelegate = "iter insert remove copy getEditor constructor".split(" ") +for (let prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) + CodeMirror.prototype[prop] = (function(method) { + return function() {return method.apply(this.doc, arguments)} + })(Doc.prototype[prop]) + +eventMixin(Doc) + +// INPUT HANDLING + +import ContentEditableInput from "../input/ContentEditableInput.js" +import TextareaInput from "../input/TextareaInput.js" +CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput} + +// MODE DEFINITION AND QUERYING + +import { defineMIME, defineMode } from "../modes.js" + +// Extra arguments are stored as the mode's dependencies, which is +// used by (legacy) mechanisms like loadmode.js to automatically +// load a mode. (Preferred mechanism is the require/define calls.) +CodeMirror.defineMode = function(name/*, mode, …*/) { + if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name + defineMode.apply(this, arguments) +} + +CodeMirror.defineMIME = defineMIME + +// Minimal default mode. +CodeMirror.defineMode("null", () => ({token: stream => stream.skipToEnd()})) +CodeMirror.defineMIME("text/plain", "null") + +// EXTENSIONS + +CodeMirror.defineExtension = (name, func) => { + CodeMirror.prototype[name] = func +} +CodeMirror.defineDocExtension = (name, func) => { + Doc.prototype[name] = func +} + +import { fromTextArea } from "./fromTextArea.js" + +CodeMirror.fromTextArea = fromTextArea + +import { addLegacyProps } from "./legacy.js" + +addLegacyProps(CodeMirror) + +CodeMirror.version = "5.65.16" diff --git a/js/codemirror/src/edit/methods.js b/js/codemirror/src/edit/methods.js new file mode 100644 index 0000000..9fb8787 --- /dev/null +++ b/js/codemirror/src/edit/methods.js @@ -0,0 +1,555 @@ +import { deleteNearSelection } from "./deleteNearSelection.js" +import { commands } from "./commands.js" +import { attachDoc } from "../model/document_data.js" +import { activeElt, addClass, rmClass, root, win } from "../util/dom.js" +import { eventMixin, signal } from "../util/event.js" +import { getLineStyles, getContextBefore, takeToken } from "../line/highlight.js" +import { indentLine } from "../input/indent.js" +import { triggerElectric } from "../input/input.js" +import { onKeyDown, onKeyPress, onKeyUp } from "./key_events.js" +import { onMouseDown } from "./mouse_events.js" +import { getKeyMap } from "../input/keymap.js" +import { endOfLine, moveLogically, moveVisually } from "../input/movement.js" +import { endOperation, methodOp, operation, runInOp, startOperation } from "../display/operations.js" +import { clipLine, clipPos, equalCursorPos, Pos } from "../line/pos.js" +import { charCoords, charWidth, clearCaches, clearLineMeasurementCache, coordsChar, cursorCoords, displayHeight, displayWidth, estimateLineHeights, fromCoordSystem, intoCoordSystem, scrollGap, textHeight } from "../measurement/position_measurement.js" +import { Range } from "../model/selection.js" +import { replaceOneSelection, skipAtomic } from "../model/selection_updates.js" +import { addToScrollTop, ensureCursorVisible, scrollIntoView, scrollToCoords, scrollToCoordsRange, scrollToRange } from "../display/scrolling.js" +import { heightAtLine } from "../line/spans.js" +import { updateGutterSpace } from "../display/update_display.js" +import { indexOf, insertSorted, isWordChar, sel_dontScroll, sel_move } from "../util/misc.js" +import { signalLater } from "../util/operation_group.js" +import { getLine, isLine, lineAtHeight } from "../line/utils_line.js" +import { regChange, regLineChange } from "../display/view_tracking.js" + +// The publicly visible API. Note that methodOp(f) means +// 'wrap f in an operation, performed on its `this` parameter'. + +// This is not the complete set of editor methods. Most of the +// methods defined on the Doc type are also injected into +// CodeMirror.prototype, for backwards compatibility and +// convenience. + +export default function(CodeMirror) { + let optionHandlers = CodeMirror.optionHandlers + + let helpers = CodeMirror.helpers = {} + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function(){win(this).focus(); this.display.input.focus()}, + + setOption: function(option, value) { + let options = this.options, old = options[option] + if (options[option] == value && option != "mode") return + options[option] = value + if (optionHandlers.hasOwnProperty(option)) + operation(this, optionHandlers[option])(this, value, old) + signal(this, "optionChange", this, option) + }, + + getOption: function(option) {return this.options[option]}, + getDoc: function() {return this.doc}, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)) + }, + removeKeyMap: function(map) { + let maps = this.state.keyMaps + for (let i = 0; i < maps.length; ++i) + if (maps[i] == map || maps[i].name == map) { + maps.splice(i, 1) + return true + } + }, + + addOverlay: methodOp(function(spec, options) { + let mode = spec.token ? spec : CodeMirror.getMode(this.options, spec) + if (mode.startState) throw new Error("Overlays may not be stateful.") + insertSorted(this.state.overlays, + {mode: mode, modeSpec: spec, opaque: options && options.opaque, + priority: (options && options.priority) || 0}, + overlay => overlay.priority) + this.state.modeGen++ + regChange(this) + }), + removeOverlay: methodOp(function(spec) { + let overlays = this.state.overlays + for (let i = 0; i < overlays.length; ++i) { + let cur = overlays[i].modeSpec + if (cur == spec || typeof spec == "string" && cur.name == spec) { + overlays.splice(i, 1) + this.state.modeGen++ + regChange(this) + return + } + } + }), + + indentLine: methodOp(function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) dir = this.options.smartIndent ? "smart" : "prev" + else dir = dir ? "add" : "subtract" + } + if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive) + }), + indentSelection: methodOp(function(how) { + let ranges = this.doc.sel.ranges, end = -1 + for (let i = 0; i < ranges.length; i++) { + let range = ranges[i] + if (!range.empty()) { + let from = range.from(), to = range.to() + let start = Math.max(end, from.line) + end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1 + for (let j = start; j < end; ++j) + indentLine(this, j, how) + let newRanges = this.doc.sel.ranges + if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0) + replaceOneSelection(this.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll) + } else if (range.head.line > end) { + indentLine(this, range.head.line, how, true) + end = range.head.line + if (i == this.doc.sel.primIndex) ensureCursorVisible(this) + } + } + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + return takeToken(this, pos, precise) + }, + + getLineTokens: function(line, precise) { + return takeToken(this, Pos(line), precise, true) + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos) + let styles = getLineStyles(this, getLine(this.doc, pos.line)) + let before = 0, after = (styles.length - 1) / 2, ch = pos.ch + let type + if (ch == 0) type = styles[2] + else for (;;) { + let mid = (before + after) >> 1 + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid + else if (styles[mid * 2 + 1] < ch) before = mid + 1 + else { type = styles[mid * 2 + 2]; break } + } + let cut = type ? type.indexOf("overlay ") : -1 + return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1) + }, + + getModeAt: function(pos) { + let mode = this.doc.mode + if (!mode.innerMode) return mode + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode + }, + + getHelper: function(pos, type) { + return this.getHelpers(pos, type)[0] + }, + + getHelpers: function(pos, type) { + let found = [] + if (!helpers.hasOwnProperty(type)) return found + let help = helpers[type], mode = this.getModeAt(pos) + if (typeof mode[type] == "string") { + if (help[mode[type]]) found.push(help[mode[type]]) + } else if (mode[type]) { + for (let i = 0; i < mode[type].length; i++) { + let val = help[mode[type][i]] + if (val) found.push(val) + } + } else if (mode.helperType && help[mode.helperType]) { + found.push(help[mode.helperType]) + } else if (help[mode.name]) { + found.push(help[mode.name]) + } + for (let i = 0; i < help._global.length; i++) { + let cur = help._global[i] + if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) + found.push(cur.val) + } + return found + }, + + getStateAfter: function(line, precise) { + let doc = this.doc + line = clipLine(doc, line == null ? doc.first + doc.size - 1: line) + return getContextBefore(this, line + 1, precise).state + }, + + cursorCoords: function(start, mode) { + let pos, range = this.doc.sel.primary() + if (start == null) pos = range.head + else if (typeof start == "object") pos = clipPos(this.doc, start) + else pos = start ? range.from() : range.to() + return cursorCoords(this, pos, mode || "page") + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page") + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page") + return coordsChar(this, coords.left, coords.top) + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top + return lineAtHeight(this.doc, height + this.display.viewOffset) + }, + heightAtLine: function(line, mode, includeWidgets) { + let end = false, lineObj + if (typeof line == "number") { + let last = this.doc.first + this.doc.size - 1 + if (line < this.doc.first) line = this.doc.first + else if (line > last) { line = last; end = true } + lineObj = getLine(this.doc, line) + } else { + lineObj = line + } + return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top + + (end ? this.doc.height - heightAtLine(lineObj) : 0) + }, + + defaultTextHeight: function() { return textHeight(this.display) }, + defaultCharWidth: function() { return charWidth(this.display) }, + + getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}}, + + addWidget: function(pos, node, scroll, vert, horiz) { + let display = this.display + pos = cursorCoords(this, clipPos(this.doc, pos)) + let top = pos.bottom, left = pos.left + node.style.position = "absolute" + node.setAttribute("cm-ignore-events", "true") + this.display.input.setUneditable(node) + display.sizer.appendChild(node) + if (vert == "over") { + top = pos.top + } else if (vert == "above" || vert == "near") { + let vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth) + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) + top = pos.top - node.offsetHeight + else if (pos.bottom + node.offsetHeight <= vspace) + top = pos.bottom + if (left + node.offsetWidth > hspace) + left = hspace - node.offsetWidth + } + node.style.top = top + "px" + node.style.left = node.style.right = "" + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth + node.style.right = "0px" + } else { + if (horiz == "left") left = 0 + else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2 + node.style.left = left + "px" + } + if (scroll) + scrollIntoView(this, {left, top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}) + }, + + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + triggerOnMouseDown: methodOp(onMouseDown), + + execCommand: function(cmd) { + if (commands.hasOwnProperty(cmd)) + return commands[cmd].call(null, this) + }, + + triggerElectric: methodOp(function(text) { triggerElectric(this, text) }), + + findPosH: function(from, amount, unit, visually) { + let dir = 1 + if (amount < 0) { dir = -1; amount = -amount } + let cur = clipPos(this.doc, from) + for (let i = 0; i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually) + if (cur.hitSide) break + } + return cur + }, + + moveH: methodOp(function(dir, unit) { + this.extendSelectionsBy(range => { + if (this.display.shift || this.doc.extend || range.empty()) + return findPosH(this.doc, range.head, dir, unit, this.options.rtlMoveVisually) + else + return dir < 0 ? range.from() : range.to() + }, sel_move) + }), + + deleteH: methodOp(function(dir, unit) { + let sel = this.doc.sel, doc = this.doc + if (sel.somethingSelected()) + doc.replaceSelection("", null, "+delete") + else + deleteNearSelection(this, range => { + let other = findPosH(doc, range.head, dir, unit, false) + return dir < 0 ? {from: other, to: range.head} : {from: range.head, to: other} + }) + }), + + findPosV: function(from, amount, unit, goalColumn) { + let dir = 1, x = goalColumn + if (amount < 0) { dir = -1; amount = -amount } + let cur = clipPos(this.doc, from) + for (let i = 0; i < amount; ++i) { + let coords = cursorCoords(this, cur, "div") + if (x == null) x = coords.left + else coords.left = x + cur = findPosV(this, coords, dir, unit) + if (cur.hitSide) break + } + return cur + }, + + moveV: methodOp(function(dir, unit) { + let doc = this.doc, goals = [] + let collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected() + doc.extendSelectionsBy(range => { + if (collapse) + return dir < 0 ? range.from() : range.to() + let headPos = cursorCoords(this, range.head, "div") + if (range.goalColumn != null) headPos.left = range.goalColumn + goals.push(headPos.left) + let pos = findPosV(this, headPos, dir, unit) + if (unit == "page" && range == doc.sel.primary()) + addToScrollTop(this, charCoords(this, pos, "div").top - headPos.top) + return pos + }, sel_move) + if (goals.length) for (let i = 0; i < doc.sel.ranges.length; i++) + doc.sel.ranges[i].goalColumn = goals[i] + }), + + // Find the word at the given position (as returned by coordsChar). + findWordAt: function(pos) { + let doc = this.doc, line = getLine(doc, pos.line).text + let start = pos.ch, end = pos.ch + if (line) { + let helper = this.getHelper(pos, "wordChars") + if ((pos.sticky == "before" || end == line.length) && start) --start; else ++end + let startChar = line.charAt(start) + let check = isWordChar(startChar, helper) + ? ch => isWordChar(ch, helper) + : /\s/.test(startChar) ? ch => /\s/.test(ch) + : ch => (!/\s/.test(ch) && !isWordChar(ch)) + while (start > 0 && check(line.charAt(start - 1))) --start + while (end < line.length && check(line.charAt(end))) ++end + } + return new Range(Pos(pos.line, start), Pos(pos.line, end)) + }, + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) return + if (this.state.overwrite = !this.state.overwrite) + addClass(this.display.cursorDiv, "CodeMirror-overwrite") + else + rmClass(this.display.cursorDiv, "CodeMirror-overwrite") + + signal(this, "overwriteToggle", this, this.state.overwrite) + }, + hasFocus: function() { return this.display.input.getField() == activeElt(root(this)) }, + isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) }, + + scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y) }), + getScrollInfo: function() { + let scroller = this.display.scroller + return {left: scroller.scrollLeft, top: scroller.scrollTop, + height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, + width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), clientWidth: displayWidth(this)} + }, + + scrollIntoView: methodOp(function(range, margin) { + if (range == null) { + range = {from: this.doc.sel.primary().head, to: null} + if (margin == null) margin = this.options.cursorScrollMargin + } else if (typeof range == "number") { + range = {from: Pos(range, 0), to: null} + } else if (range.from == null) { + range = {from: range, to: null} + } + if (!range.to) range.to = range.from + range.margin = margin || 0 + + if (range.from.line != null) { + scrollToRange(this, range) + } else { + scrollToCoordsRange(this, range.from, range.to, range.margin) + } + }), + + setSize: methodOp(function(width, height) { + let interpret = val => typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val + if (width != null) this.display.wrapper.style.width = interpret(width) + if (height != null) this.display.wrapper.style.height = interpret(height) + if (this.options.lineWrapping) clearLineMeasurementCache(this) + let lineNo = this.display.viewFrom + this.doc.iter(lineNo, this.display.viewTo, line => { + if (line.widgets) for (let i = 0; i < line.widgets.length; i++) + if (line.widgets[i].noHScroll) { regLineChange(this, lineNo, "widget"); break } + ++lineNo + }) + this.curOp.forceUpdate = true + signal(this, "refresh", this) + }), + + operation: function(f){return runInOp(this, f)}, + startOperation: function(){return startOperation(this)}, + endOperation: function(){return endOperation(this)}, + + refresh: methodOp(function() { + let oldHeight = this.display.cachedTextHeight + regChange(this) + this.curOp.forceUpdate = true + clearCaches(this) + scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop) + updateGutterSpace(this.display) + if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5 || this.options.lineWrapping) + estimateLineHeights(this) + signal(this, "refresh", this) + }), + + swapDoc: methodOp(function(doc) { + let old = this.doc + old.cm = null + // Cancel the current text selection if any (#5821) + if (this.state.selectingText) this.state.selectingText() + attachDoc(this, doc) + clearCaches(this) + this.display.input.reset() + scrollToCoords(this, doc.scrollLeft, doc.scrollTop) + this.curOp.forceScroll = true + signalLater(this, "swapDoc", this, old) + return old + }), + + phrase: function(phraseText) { + let phrases = this.options.phrases + return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText + }, + + 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} + } + eventMixin(CodeMirror) + + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {_global: []} + helpers[type][name] = value + } + CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { + CodeMirror.registerHelper(type, name, value) + helpers[type]._global.push({pred: predicate, val: value}) + } +} + +// Used for horizontal relative motion. Dir is -1 or 1 (left or +// right), unit can be "codepoint", "char", "column" (like char, but +// doesn't cross line boundaries), "word" (across next word), or +// "group" (to the start of next group of word or +// non-word-non-whitespace chars). The visually param controls +// whether, in right-to-left text, direction 1 means to move towards +// the next index in the string, or towards the character to the right +// of the current position. The resulting position will have a +// hitSide=true property if it reached the end of the document. +function findPosH(doc, pos, dir, unit, visually) { + let oldPos = pos + let origDir = dir + let lineObj = getLine(doc, pos.line) + let lineDir = visually && doc.direction == "rtl" ? -dir : dir + function findNextLine() { + let l = pos.line + lineDir + if (l < doc.first || l >= doc.first + doc.size) return false + pos = new Pos(l, pos.ch, pos.sticky) + return lineObj = getLine(doc, l) + } + function moveOnce(boundToLine) { + let next + if (unit == "codepoint") { + let ch = lineObj.text.charCodeAt(pos.ch + (dir > 0 ? 0 : -1)) + if (isNaN(ch)) { + next = null + } else { + let astral = dir > 0 ? ch >= 0xD800 && ch < 0xDC00 : ch >= 0xDC00 && ch < 0xDFFF + next = new Pos(pos.line, Math.max(0, Math.min(lineObj.text.length, pos.ch + dir * (astral ? 2 : 1))), -dir) + } + } else if (visually) { + next = moveVisually(doc.cm, lineObj, pos, dir) + } else { + next = moveLogically(lineObj, pos, dir) + } + if (next == null) { + if (!boundToLine && findNextLine()) + pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir) + else + return false + } else { + pos = next + } + return true + } + + if (unit == "char" || unit == "codepoint") { + moveOnce() + } else if (unit == "column") { + moveOnce(true) + } else if (unit == "word" || unit == "group") { + let sawType = null, group = unit == "group" + let helper = doc.cm && doc.cm.getHelper(pos, "wordChars") + for (let first = true;; first = false) { + if (dir < 0 && !moveOnce(!first)) break + let cur = lineObj.text.charAt(pos.ch) || "\n" + let type = isWordChar(cur, helper) ? "w" + : group && cur == "\n" ? "n" + : !group || /\s/.test(cur) ? null + : "p" + if (group && !first && !type) type = "s" + if (sawType && sawType != type) { + if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after"} + break + } + + if (type) sawType = type + if (dir > 0 && !moveOnce(!first)) break + } + } + let result = skipAtomic(doc, pos, oldPos, origDir, true) + if (equalCursorPos(oldPos, result)) result.hitSide = true + return result +} + +// For relative vertical movement. Dir may be -1 or 1. Unit can be +// "page" or "line". The resulting position will have a hitSide=true +// property if it reached the end of the document. +function findPosV(cm, pos, dir, unit) { + let doc = cm.doc, x = pos.left, y + if (unit == "page") { + let pageSize = Math.min(cm.display.wrapper.clientHeight, win(cm).innerHeight || doc(cm).documentElement.clientHeight) + let moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3) + y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount + + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3 + } + let target + for (;;) { + target = coordsChar(cm, x, y) + if (!target.outside) break + if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break } + y += dir * 5 + } + return target +} diff --git a/js/codemirror/src/edit/mouse_events.js b/js/codemirror/src/edit/mouse_events.js new file mode 100644 index 0000000..421e70b --- /dev/null +++ b/js/codemirror/src/edit/mouse_events.js @@ -0,0 +1,417 @@ +import { delayBlurEvent, ensureFocus } from "../display/focus.js" +import { operation } from "../display/operations.js" +import { visibleLines } from "../display/update_lines.js" +import { clipPos, cmp, maxPos, minPos, Pos } from "../line/pos.js" +import { getLine, lineAtHeight } from "../line/utils_line.js" +import { posFromMouse } from "../measurement/position_measurement.js" +import { eventInWidget } from "../measurement/widgets.js" +import { normalizeSelection, Range, Selection } from "../model/selection.js" +import { extendRange, extendSelection, replaceOneSelection, setSelection } from "../model/selection_updates.js" +import { captureRightClick, chromeOS, ie, ie_version, mac, webkit, safari } from "../util/browser.js" +import { getOrder, getBidiPartAt } from "../util/bidi.js" +import { activeElt, root, win } from "../util/dom.js" +import { e_button, e_defaultPrevented, e_preventDefault, e_target, hasHandler, off, on, signal, signalDOMEvent } from "../util/event.js" +import { dragAndDrop } from "../util/feature_detection.js" +import { bind, countColumn, findColumn, sel_mouse } from "../util/misc.js" +import { addModifierNames } from "../input/keymap.js" +import { Pass } from "../util/misc.js" + +import { dispatchKey } from "./key_events.js" +import { commands } from "./commands.js" + +const DOUBLECLICK_DELAY = 400 + +class PastClick { + constructor(time, pos, button) { + this.time = time + this.pos = pos + this.button = button + } + + compare(time, pos, button) { + return this.time + DOUBLECLICK_DELAY > time && + cmp(pos, this.pos) == 0 && button == this.button + } +} + +let lastClick, lastDoubleClick +function clickRepeat(pos, button) { + let now = +new Date + if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) { + lastClick = lastDoubleClick = null + return "triple" + } else if (lastClick && lastClick.compare(now, pos, button)) { + lastDoubleClick = new PastClick(now, pos, button) + lastClick = null + return "double" + } else { + lastClick = new PastClick(now, pos, button) + lastDoubleClick = null + return "single" + } +} + +// A mouse down can be a single click, double click, triple click, +// start of selection drag, start of text drag, new cursor +// (ctrl-click), rectangle drag (alt-drag), or xwin +// middle-click-paste. Or it might be a click on something we should +// not interfere with, such as a scrollbar or widget. +export function onMouseDown(e) { + let cm = this, display = cm.display + if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) return + display.input.ensurePolled() + display.shift = e.shiftKey + + if (eventInWidget(display, e)) { + if (!webkit) { + // Briefly turn off draggability, to allow widgets to do + // normal dragging things. + display.scroller.draggable = false + setTimeout(() => display.scroller.draggable = true, 100) + } + return + } + if (clickInGutter(cm, e)) return + let pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single" + win(cm).focus() + + // #3261: make sure, that we're not starting a second selection + if (button == 1 && cm.state.selectingText) + cm.state.selectingText(e) + + if (pos && handleMappedButton(cm, button, pos, repeat, e)) return + + if (button == 1) { + if (pos) leftButtonDown(cm, pos, repeat, e) + else if (e_target(e) == display.scroller) e_preventDefault(e) + } else if (button == 2) { + if (pos) extendSelection(cm.doc, pos) + setTimeout(() => display.input.focus(), 20) + } else if (button == 3) { + if (captureRightClick) cm.display.input.onContextMenu(e) + else delayBlurEvent(cm) + } +} + +function handleMappedButton(cm, button, pos, repeat, event) { + let name = "Click" + if (repeat == "double") name = "Double" + name + else if (repeat == "triple") name = "Triple" + name + name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name + + return dispatchKey(cm, addModifierNames(name, event), event, bound => { + if (typeof bound == "string") bound = commands[bound] + if (!bound) return false + let done = false + try { + if (cm.isReadOnly()) cm.state.suppressEdits = true + done = bound(cm, pos) != Pass + } finally { + cm.state.suppressEdits = false + } + return done + }) +} + +function configureMouse(cm, repeat, event) { + let option = cm.getOption("configureMouse") + let value = option ? option(cm, repeat, event) : {} + if (value.unit == null) { + let rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey + value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line" + } + if (value.extend == null || cm.doc.extend) value.extend = cm.doc.extend || event.shiftKey + if (value.addNew == null) value.addNew = mac ? event.metaKey : event.ctrlKey + if (value.moveOnDrag == null) value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey) + return value +} + +function leftButtonDown(cm, pos, repeat, event) { + if (ie) setTimeout(bind(ensureFocus, cm), 0) + else cm.curOp.focus = activeElt(root(cm)) + + let behavior = configureMouse(cm, repeat, event) + + let sel = cm.doc.sel, contained + if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() && + repeat == "single" && (contained = sel.contains(pos)) > -1 && + (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) && + (cmp(contained.to(), pos) > 0 || pos.xRel < 0)) + leftButtonStartDrag(cm, event, pos, behavior) + else + leftButtonSelect(cm, event, pos, behavior) +} + +// Start a text drag. When it ends, see if any dragging actually +// happen, and treat as a click if it didn't. +function leftButtonStartDrag(cm, event, pos, behavior) { + let display = cm.display, moved = false + let dragEnd = operation(cm, e => { + if (webkit) display.scroller.draggable = false + cm.state.draggingText = false + if (cm.state.delayingBlurEvent) { + if (cm.hasFocus()) cm.state.delayingBlurEvent = false + else delayBlurEvent(cm) + } + off(display.wrapper.ownerDocument, "mouseup", dragEnd) + off(display.wrapper.ownerDocument, "mousemove", mouseMove) + off(display.scroller, "dragstart", dragStart) + off(display.scroller, "drop", dragEnd) + if (!moved) { + e_preventDefault(e) + if (!behavior.addNew) + extendSelection(cm.doc, pos, null, null, behavior.extend) + // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) + if ((webkit && !safari) || ie && ie_version == 9) + setTimeout(() => {display.wrapper.ownerDocument.body.focus({preventScroll: true}); display.input.focus()}, 20) + else + display.input.focus() + } + }) + let mouseMove = function(e2) { + moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10 + } + let dragStart = () => moved = true + // Let the drag handler handle this. + if (webkit) display.scroller.draggable = true + cm.state.draggingText = dragEnd + dragEnd.copy = !behavior.moveOnDrag + on(display.wrapper.ownerDocument, "mouseup", dragEnd) + on(display.wrapper.ownerDocument, "mousemove", mouseMove) + on(display.scroller, "dragstart", dragStart) + on(display.scroller, "drop", dragEnd) + + cm.state.delayingBlurEvent = true + setTimeout(() => display.input.focus(), 20) + // IE's approach to draggable + if (display.scroller.dragDrop) display.scroller.dragDrop() +} + +function rangeForUnit(cm, pos, unit) { + if (unit == "char") return new Range(pos, pos) + if (unit == "word") return cm.findWordAt(pos) + if (unit == "line") return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) + let result = unit(cm, pos) + return new Range(result.from, result.to) +} + +// Normal selection, as opposed to text dragging. +function leftButtonSelect(cm, event, start, behavior) { + if (ie) delayBlurEvent(cm) + let display = cm.display, doc = cm.doc + e_preventDefault(event) + + let ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges + if (behavior.addNew && !behavior.extend) { + ourIndex = doc.sel.contains(start) + if (ourIndex > -1) + ourRange = ranges[ourIndex] + else + ourRange = new Range(start, start) + } else { + ourRange = doc.sel.primary() + ourIndex = doc.sel.primIndex + } + + if (behavior.unit == "rectangle") { + if (!behavior.addNew) ourRange = new Range(start, start) + start = posFromMouse(cm, event, true, true) + ourIndex = -1 + } else { + let range = rangeForUnit(cm, start, behavior.unit) + if (behavior.extend) + ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend) + else + ourRange = range + } + + if (!behavior.addNew) { + ourIndex = 0 + setSelection(doc, new Selection([ourRange], 0), sel_mouse) + startSel = doc.sel + } else if (ourIndex == -1) { + ourIndex = ranges.length + setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex), + {scroll: false, origin: "*mouse"}) + } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) { + setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0), + {scroll: false, origin: "*mouse"}) + startSel = doc.sel + } else { + replaceOneSelection(doc, ourIndex, ourRange, sel_mouse) + } + + let lastPos = start + function extendTo(pos) { + if (cmp(lastPos, pos) == 0) return + lastPos = pos + + if (behavior.unit == "rectangle") { + let ranges = [], tabSize = cm.options.tabSize + let startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize) + let posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize) + let left = Math.min(startCol, posCol), right = Math.max(startCol, posCol) + for (let line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); + line <= end; line++) { + let text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize) + if (left == right) + ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))) + else if (text.length > leftPos) + ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))) + } + if (!ranges.length) ranges.push(new Range(start, start)) + setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), + {origin: "*mouse", scroll: false}) + cm.scrollIntoView(pos) + } else { + let oldRange = ourRange + let range = rangeForUnit(cm, pos, behavior.unit) + let anchor = oldRange.anchor, head + if (cmp(range.anchor, anchor) > 0) { + head = range.head + anchor = minPos(oldRange.from(), range.anchor) + } else { + head = range.anchor + anchor = maxPos(oldRange.to(), range.head) + } + let ranges = startSel.ranges.slice(0) + ranges[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head)) + setSelection(doc, normalizeSelection(cm, ranges, ourIndex), sel_mouse) + } + } + + let editorSize = display.wrapper.getBoundingClientRect() + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + let counter = 0 + + function extend(e) { + let curCount = ++counter + let cur = posFromMouse(cm, e, true, behavior.unit == "rectangle") + if (!cur) return + if (cmp(cur, lastPos) != 0) { + cm.curOp.focus = activeElt(root(cm)) + extendTo(cur) + let visible = visibleLines(display, doc) + if (cur.line >= visible.to || cur.line < visible.from) + setTimeout(operation(cm, () => {if (counter == curCount) extend(e)}), 150) + } else { + let outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0 + if (outside) setTimeout(operation(cm, () => { + if (counter != curCount) return + display.scroller.scrollTop += outside + extend(e) + }), 50) + } + } + + function done(e) { + cm.state.selectingText = false + counter = Infinity + // If e is null or undefined we interpret this as someone trying + // to explicitly cancel the selection rather than the user + // letting go of the mouse button. + if (e) { + e_preventDefault(e) + display.input.focus() + } + off(display.wrapper.ownerDocument, "mousemove", move) + off(display.wrapper.ownerDocument, "mouseup", up) + doc.history.lastSelOrigin = null + } + + let move = operation(cm, e => { + if (e.buttons === 0 || !e_button(e)) done(e) + else extend(e) + }) + let up = operation(cm, done) + cm.state.selectingText = up + on(display.wrapper.ownerDocument, "mousemove", move) + on(display.wrapper.ownerDocument, "mouseup", up) +} + +// Used when mouse-selecting to adjust the anchor to the proper side +// of a bidi jump depending on the visual position of the head. +function bidiSimplify(cm, range) { + let {anchor, head} = range, anchorLine = getLine(cm.doc, anchor.line) + if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) return range + let order = getOrder(anchorLine) + if (!order) return range + let index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index] + if (part.from != anchor.ch && part.to != anchor.ch) return range + let boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1) + if (boundary == 0 || boundary == order.length) return range + + // Compute the relative visual position of the head compared to the + // anchor (<0 is to the left, >0 to the right) + let leftSide + if (head.line != anchor.line) { + leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0 + } else { + let headIndex = getBidiPartAt(order, head.ch, head.sticky) + let dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1) + if (headIndex == boundary - 1 || headIndex == boundary) + leftSide = dir < 0 + else + leftSide = dir > 0 + } + + let usePart = order[boundary + (leftSide ? -1 : 0)] + let from = leftSide == (usePart.level == 1) + let ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before" + return anchor.ch == ch && anchor.sticky == sticky ? range : new Range(new Pos(anchor.line, ch, sticky), head) +} + + +// Determines whether an event happened in the gutter, and fires the +// handlers for the corresponding event. +function gutterEvent(cm, e, type, prevent) { + let mX, mY + if (e.touches) { + mX = e.touches[0].clientX + mY = e.touches[0].clientY + } else { + try { mX = e.clientX; mY = e.clientY } + catch(e) { return false } + } + if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) return false + if (prevent) e_preventDefault(e) + + let display = cm.display + let lineBox = display.lineDiv.getBoundingClientRect() + + if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e) + mY -= lineBox.top - display.viewOffset + + for (let i = 0; i < cm.display.gutterSpecs.length; ++i) { + let g = display.gutters.childNodes[i] + if (g && g.getBoundingClientRect().right >= mX) { + let line = lineAtHeight(cm.doc, mY) + let gutter = cm.display.gutterSpecs[i] + signal(cm, type, cm, line, gutter.className, e) + return e_defaultPrevented(e) + } + } +} + +export function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true) +} + +// CONTEXT MENU HANDLING + +// To make the context menu work, we need to briefly unhide the +// textarea (making it as unobtrusive as possible) to let the +// right-click take effect on it. +export function onContextMenu(cm, e) { + if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) return + if (signalDOMEvent(cm, e, "contextmenu")) return + if (!captureRightClick) cm.display.input.onContextMenu(e) +} + +function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) return false + return gutterEvent(cm, e, "gutterContextMenu", false) +} diff --git a/js/codemirror/src/edit/options.js b/js/codemirror/src/edit/options.js new file mode 100644 index 0000000..d6bc37a --- /dev/null +++ b/js/codemirror/src/edit/options.js @@ -0,0 +1,194 @@ +import { onBlur } from "../display/focus.js" +import { getGutters, updateGutters } from "../display/gutters.js" +import { loadMode, resetModeState } from "../display/mode_state.js" +import { initScrollbars, updateScrollbars } from "../display/scrollbars.js" +import { updateSelection } from "../display/selection.js" +import { regChange } from "../display/view_tracking.js" +import { getKeyMap } from "../input/keymap.js" +import { defaultSpecialCharPlaceholder } from "../line/line_data.js" +import { Pos } from "../line/pos.js" +import { findMaxLine } from "../line/spans.js" +import { clearCaches, compensateForHScroll, estimateLineHeights } from "../measurement/position_measurement.js" +import { replaceRange } from "../model/changes.js" +import { mobile, windows } from "../util/browser.js" +import { addClass, rmClass } from "../util/dom.js" +import { off, on } from "../util/event.js" + +import { themeChanged } from "./utils.js" + +export let Init = {toString: function(){return "CodeMirror.Init"}} + +export let defaults = {} +export let optionHandlers = {} + +export function defineOptions(CodeMirror) { + let optionHandlers = CodeMirror.optionHandlers + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt + if (handle) optionHandlers[name] = + notOnInit ? (cm, val, old) => {if (old != Init) handle(cm, val, old)} : handle + } + + CodeMirror.defineOption = option + + // Passed to option handlers when there is no old value. + CodeMirror.Init = Init + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option("value", "", (cm, val) => cm.setValue(val), true) + option("mode", null, (cm, val) => { + cm.doc.modeOption = val + loadMode(cm) + }, true) + + option("indentUnit", 2, loadMode, true) + option("indentWithTabs", false) + option("smartIndent", true) + option("tabSize", 4, cm => { + resetModeState(cm) + clearCaches(cm) + regChange(cm) + }, true) + + option("lineSeparator", null, (cm, val) => { + cm.doc.lineSep = val + if (!val) return + let newBreaks = [], lineNo = cm.doc.first + cm.doc.iter(line => { + for (let pos = 0;;) { + let found = line.text.indexOf(val, pos) + if (found == -1) break + pos = found + val.length + newBreaks.push(Pos(lineNo, found)) + } + lineNo++ + }) + for (let i = newBreaks.length - 1; i >= 0; i--) + replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)) + }) + option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\u202d\u202e\u2066\u2067\u2069\ufeff\ufff9-\ufffc]/g, (cm, val, old) => { + cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g") + if (old != Init) cm.refresh() + }) + option("specialCharPlaceholder", defaultSpecialCharPlaceholder, cm => cm.refresh(), true) + option("electricChars", true) + option("inputStyle", mobile ? "contenteditable" : "textarea", () => { + throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME + }, true) + option("spellcheck", false, (cm, val) => cm.getInputField().spellcheck = val, true) + option("autocorrect", false, (cm, val) => cm.getInputField().autocorrect = val, true) + option("autocapitalize", false, (cm, val) => cm.getInputField().autocapitalize = val, true) + option("rtlMoveVisually", !windows) + option("wholeLineUpdateBefore", true) + + option("theme", "default", cm => { + themeChanged(cm) + updateGutters(cm) + }, true) + option("keyMap", "default", (cm, val, old) => { + let next = getKeyMap(val) + let prev = old != Init && getKeyMap(old) + if (prev && prev.detach) prev.detach(cm, next) + if (next.attach) next.attach(cm, prev || null) + }) + option("extraKeys", null) + option("configureMouse", null) + + option("lineWrapping", false, wrappingChanged, true) + option("gutters", [], (cm, val) => { + cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers) + updateGutters(cm) + }, true) + option("fixedGutter", true, (cm, val) => { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0" + cm.refresh() + }, true) + option("coverGutterNextToScrollbar", false, cm => updateScrollbars(cm), true) + option("scrollbarStyle", "native", cm => { + initScrollbars(cm) + updateScrollbars(cm) + cm.display.scrollbars.setScrollTop(cm.doc.scrollTop) + cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft) + }, true) + option("lineNumbers", false, (cm, val) => { + cm.display.gutterSpecs = getGutters(cm.options.gutters, val) + updateGutters(cm) + }, true) + option("firstLineNumber", 1, updateGutters, true) + option("lineNumberFormatter", integer => integer, updateGutters, true) + option("showCursorWhenSelecting", false, updateSelection, true) + + option("resetSelectionOnContextMenu", true) + option("lineWiseCopyCut", true) + option("pasteLinesPerSelection", true) + option("selectionsMayTouch", false) + + option("readOnly", false, (cm, val) => { + if (val == "nocursor") { + onBlur(cm) + cm.display.input.blur() + } + cm.display.input.readOnlyChanged(val) + }) + + option("screenReaderLabel", null, (cm, val) => { + val = (val === '') ? null : val + cm.display.input.screenReaderLabelChanged(val) + }) + + option("disableInput", false, (cm, val) => {if (!val) cm.display.input.reset()}, true) + option("dragDrop", true, dragDropChanged) + option("allowDropFileTypes", null) + + option("cursorBlinkRate", 530) + option("cursorScrollMargin", 0) + option("cursorHeight", 1, updateSelection, true) + option("singleCursorHeightPerLine", true, updateSelection, true) + option("workTime", 100) + option("workDelay", 100) + option("flattenSpans", true, resetModeState, true) + option("addModeClass", false, resetModeState, true) + option("pollInterval", 100) + option("undoDepth", 200, (cm, val) => cm.doc.history.undoDepth = val) + option("historyEventDelay", 1250) + option("viewportMargin", 10, cm => cm.refresh(), true) + option("maxHighlightLength", 10000, resetModeState, true) + option("moveInputWithCursor", true, (cm, val) => { + if (!val) cm.display.input.resetPosition() + }) + + option("tabindex", null, (cm, val) => cm.display.input.getField().tabIndex = val || "") + option("autofocus", null) + option("direction", "ltr", (cm, val) => cm.doc.setDirection(val), true) + option("phrases", null) +} + +function dragDropChanged(cm, value, old) { + let wasOn = old && old != Init + if (!value != !wasOn) { + let funcs = cm.display.dragFunctions + let toggle = value ? on : off + toggle(cm.display.scroller, "dragstart", funcs.start) + toggle(cm.display.scroller, "dragenter", funcs.enter) + toggle(cm.display.scroller, "dragover", funcs.over) + toggle(cm.display.scroller, "dragleave", funcs.leave) + toggle(cm.display.scroller, "drop", funcs.drop) + } +} + +function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + addClass(cm.display.wrapper, "CodeMirror-wrap") + cm.display.sizer.style.minWidth = "" + cm.display.sizerWidth = null + } else { + rmClass(cm.display.wrapper, "CodeMirror-wrap") + findMaxLine(cm) + } + estimateLineHeights(cm) + regChange(cm) + clearCaches(cm) + setTimeout(() => updateScrollbars(cm), 100) +} diff --git a/js/codemirror/src/edit/utils.js b/js/codemirror/src/edit/utils.js new file mode 100644 index 0000000..fda0be7 --- /dev/null +++ b/js/codemirror/src/edit/utils.js @@ -0,0 +1,7 @@ +import { clearCaches } from "../measurement/position_measurement.js" + +export function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-") + clearCaches(cm) +} diff --git a/js/codemirror/src/input/ContentEditableInput.js b/js/codemirror/src/input/ContentEditableInput.js new file mode 100644 index 0000000..158ff24 --- /dev/null +++ b/js/codemirror/src/input/ContentEditableInput.js @@ -0,0 +1,546 @@ +import { operation, runInOp } from "../display/operations.js" +import { prepareSelection } from "../display/selection.js" +import { regChange } from "../display/view_tracking.js" +import { applyTextInput, copyableRanges, disableBrowserMagic, handlePaste, hiddenTextarea, lastCopied, setLastCopied } from "./input.js" +import { cmp, maxPos, minPos, Pos } from "../line/pos.js" +import { getBetween, getLine, lineNo } from "../line/utils_line.js" +import { findViewForLine, findViewIndex, mapFromLineView, nodeAndOffsetInLineMap } from "../measurement/position_measurement.js" +import { replaceRange } from "../model/changes.js" +import { simpleSelection } from "../model/selection.js" +import { setSelection } from "../model/selection_updates.js" +import { getBidiPartAt, getOrder } from "../util/bidi.js" +import { android, chrome, gecko, ie_version } from "../util/browser.js" +import { activeElt, contains, range, removeChildrenAndAdd, selectInput, rootNode } from "../util/dom.js" +import { on, signalDOMEvent } from "../util/event.js" +import { Delayed, lst, sel_dontScroll } from "../util/misc.js" + +// CONTENTEDITABLE INPUT STYLE + +export default class ContentEditableInput { + constructor(cm) { + this.cm = cm + this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null + this.polling = new Delayed() + this.composing = null + this.gracePeriod = false + this.readDOMTimeout = null + } + + init(display) { + let input = this, cm = input.cm + let div = input.div = display.lineDiv + div.contentEditable = true + disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize) + + function belongsToInput(e) { + for (let t = e.target; t; t = t.parentNode) { + if (t == div) return true + if (/\bCodeMirror-(?:line)?widget\b/.test(t.className)) break + } + return false + } + + on(div, "paste", e => { + if (!belongsToInput(e) || signalDOMEvent(cm, e) || handlePaste(e, cm)) return + // IE doesn't fire input events, so we schedule a read for the pasted content in this way + if (ie_version <= 11) setTimeout(operation(cm, () => this.updateFromDOM()), 20) + }) + + on(div, "compositionstart", e => { + this.composing = {data: e.data, done: false} + }) + on(div, "compositionupdate", e => { + if (!this.composing) this.composing = {data: e.data, done: false} + }) + on(div, "compositionend", e => { + if (this.composing) { + if (e.data != this.composing.data) this.readFromDOMSoon() + this.composing.done = true + } + }) + + on(div, "touchstart", () => input.forceCompositionEnd()) + + on(div, "input", () => { + if (!this.composing) this.readFromDOMSoon() + }) + + function onCopyCut(e) { + if (!belongsToInput(e) || signalDOMEvent(cm, e)) return + if (cm.somethingSelected()) { + setLastCopied({lineWise: false, text: cm.getSelections()}) + if (e.type == "cut") cm.replaceSelection("", null, "cut") + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + let ranges = copyableRanges(cm) + setLastCopied({lineWise: true, text: ranges.text}) + if (e.type == "cut") { + cm.operation(() => { + cm.setSelections(ranges.ranges, 0, sel_dontScroll) + cm.replaceSelection("", null, "cut") + }) + } + } + if (e.clipboardData) { + e.clipboardData.clearData() + let content = lastCopied.text.join("\n") + // iOS exposes the clipboard API, but seems to discard content inserted into it + e.clipboardData.setData("Text", content) + if (e.clipboardData.getData("Text") == content) { + e.preventDefault() + return + } + } + // Old-fashioned briefly-focus-a-textarea hack + let kludge = hiddenTextarea(), te = kludge.firstChild + disableBrowserMagic(te) + cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild) + te.value = lastCopied.text.join("\n") + let hadFocus = activeElt(rootNode(div)) + selectInput(te) + setTimeout(() => { + cm.display.lineSpace.removeChild(kludge) + hadFocus.focus() + if (hadFocus == div) input.showPrimarySelection() + }, 50) + } + on(div, "copy", onCopyCut) + on(div, "cut", onCopyCut) + } + + screenReaderLabelChanged(label) { + // Label for screenreaders, accessibility + if(label) { + this.div.setAttribute('aria-label', label) + } else { + this.div.removeAttribute('aria-label') + } + } + + prepareSelection() { + let result = prepareSelection(this.cm, false) + result.focus = activeElt(rootNode(this.div)) == this.div + return result + } + + showSelection(info, takeFocus) { + if (!info || !this.cm.display.view.length) return + if (info.focus || takeFocus) this.showPrimarySelection() + this.showMultipleSelections(info) + } + + getSelection() { + return this.cm.display.wrapper.ownerDocument.getSelection() + } + + showPrimarySelection() { + let sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary() + let from = prim.from(), to = prim.to() + + if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) { + sel.removeAllRanges() + return + } + + let curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset) + let curFocus = domToPos(cm, sel.focusNode, sel.focusOffset) + if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad && + cmp(minPos(curAnchor, curFocus), from) == 0 && + cmp(maxPos(curAnchor, curFocus), to) == 0) + return + + let view = cm.display.view + let start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) || + {node: view[0].measure.map[2], offset: 0} + let end = to.line < cm.display.viewTo && posToDOM(cm, to) + if (!end) { + let measure = view[view.length - 1].measure + let map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map + end = {node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3]} + } + + if (!start || !end) { + sel.removeAllRanges() + return + } + + let old = sel.rangeCount && sel.getRangeAt(0), rng + try { rng = range(start.node, start.offset, end.offset, end.node) } + catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible + if (rng) { + if (!gecko && cm.state.focused) { + sel.collapse(start.node, start.offset) + if (!rng.collapsed) { + sel.removeAllRanges() + sel.addRange(rng) + } + } else { + sel.removeAllRanges() + sel.addRange(rng) + } + if (old && sel.anchorNode == null) sel.addRange(old) + else if (gecko) this.startGracePeriod() + } + this.rememberSelection() + } + + startGracePeriod() { + clearTimeout(this.gracePeriod) + this.gracePeriod = setTimeout(() => { + this.gracePeriod = false + if (this.selectionChanged()) + this.cm.operation(() => this.cm.curOp.selectionChanged = true) + }, 20) + } + + showMultipleSelections(info) { + removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors) + removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection) + } + + rememberSelection() { + let sel = this.getSelection() + this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset + this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset + } + + selectionInEditor() { + let sel = this.getSelection() + if (!sel.rangeCount) return false + let node = sel.getRangeAt(0).commonAncestorContainer + return contains(this.div, node) + } + + focus() { + if (this.cm.options.readOnly != "nocursor") { + if (!this.selectionInEditor() || activeElt(rootNode(this.div)) != this.div) + this.showSelection(this.prepareSelection(), true) + this.div.focus() + } + } + blur() { this.div.blur() } + getField() { return this.div } + + supportsTouch() { return true } + + receivedFocus() { + let input = this + if (this.selectionInEditor()) + setTimeout(() => this.pollSelection(), 20) + else + runInOp(this.cm, () => input.cm.curOp.selectionChanged = true) + + function poll() { + if (input.cm.state.focused) { + input.pollSelection() + input.polling.set(input.cm.options.pollInterval, poll) + } + } + this.polling.set(this.cm.options.pollInterval, poll) + } + + selectionChanged() { + let sel = this.getSelection() + return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset || + sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset + } + + pollSelection() { + if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) return + let sel = this.getSelection(), cm = this.cm + // On Android Chrome (version 56, at least), backspacing into an + // uneditable block element will put the cursor in that element, + // and then, because it's not editable, hide the virtual keyboard. + // Because Android doesn't allow us to actually detect backspace + // presses in a sane way, this code checks for when that happens + // and simulates a backspace press in this case. + if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) { + this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs}) + this.blur() + this.focus() + return + } + if (this.composing) return + this.rememberSelection() + let anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset) + let head = domToPos(cm, sel.focusNode, sel.focusOffset) + if (anchor && head) runInOp(cm, () => { + setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll) + if (anchor.bad || head.bad) cm.curOp.selectionChanged = true + }) + } + + pollContent() { + if (this.readDOMTimeout != null) { + clearTimeout(this.readDOMTimeout) + this.readDOMTimeout = null + } + + let cm = this.cm, display = cm.display, sel = cm.doc.sel.primary() + let from = sel.from(), to = sel.to() + if (from.ch == 0 && from.line > cm.firstLine()) + from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length) + if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine()) + to = Pos(to.line + 1, 0) + if (from.line < display.viewFrom || to.line > display.viewTo - 1) return false + + let fromIndex, fromLine, fromNode + if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { + fromLine = lineNo(display.view[0].line) + fromNode = display.view[0].node + } else { + fromLine = lineNo(display.view[fromIndex].line) + fromNode = display.view[fromIndex - 1].node.nextSibling + } + let toIndex = findViewIndex(cm, to.line) + let toLine, toNode + if (toIndex == display.view.length - 1) { + toLine = display.viewTo - 1 + toNode = display.lineDiv.lastChild + } else { + toLine = lineNo(display.view[toIndex + 1].line) - 1 + toNode = display.view[toIndex + 1].node.previousSibling + } + + if (!fromNode) return false + let newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)) + let oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length)) + while (newText.length > 1 && oldText.length > 1) { + if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine-- } + else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++ } + else break + } + + let cutFront = 0, cutEnd = 0 + let newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length) + while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront)) + ++cutFront + let newBot = lst(newText), oldBot = lst(oldText) + let maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0), + oldBot.length - (oldText.length == 1 ? cutFront : 0)) + while (cutEnd < maxCutEnd && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) + ++cutEnd + // Try to move start of change to start of selection if ambiguous + if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) { + while (cutFront && cutFront > from.ch && + newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) { + cutFront-- + cutEnd++ + } + } + + newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "") + newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "") + + let chFrom = Pos(fromLine, cutFront) + let chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0) + if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { + replaceRange(cm.doc, newText, chFrom, chTo, "+input") + return true + } + } + + ensurePolled() { + this.forceCompositionEnd() + } + reset() { + this.forceCompositionEnd() + } + forceCompositionEnd() { + if (!this.composing) return + clearTimeout(this.readDOMTimeout) + this.composing = null + this.updateFromDOM() + this.div.blur() + this.div.focus() + } + readFromDOMSoon() { + if (this.readDOMTimeout != null) return + this.readDOMTimeout = setTimeout(() => { + this.readDOMTimeout = null + if (this.composing) { + if (this.composing.done) this.composing = null + else return + } + this.updateFromDOM() + }, 80) + } + + updateFromDOM() { + if (this.cm.isReadOnly() || !this.pollContent()) + runInOp(this.cm, () => regChange(this.cm)) + } + + setUneditable(node) { + node.contentEditable = "false" + } + + onKeyPress(e) { + if (e.charCode == 0 || this.composing) return + e.preventDefault() + if (!this.cm.isReadOnly()) + operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0) + } + + readOnlyChanged(val) { + this.div.contentEditable = String(val != "nocursor") + } + + onContextMenu() {} + resetPosition() {} +} + +ContentEditableInput.prototype.needsContentAttribute = true + +function posToDOM(cm, pos) { + let view = findViewForLine(cm, pos.line) + if (!view || view.hidden) return null + let line = getLine(cm.doc, pos.line) + let info = mapFromLineView(view, line, pos.line) + + let order = getOrder(line, cm.doc.direction), side = "left" + if (order) { + let partPos = getBidiPartAt(order, pos.ch) + side = partPos % 2 ? "right" : "left" + } + let result = nodeAndOffsetInLineMap(info.map, pos.ch, side) + result.offset = result.collapse == "right" ? result.end : result.start + return result +} + +function isInGutter(node) { + for (let scan = node; scan; scan = scan.parentNode) + if (/CodeMirror-gutter-wrapper/.test(scan.className)) return true + return false +} + +function badPos(pos, bad) { if (bad) pos.bad = true; return pos } + +function domTextBetween(cm, from, to, fromLine, toLine) { + let text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false + function recognizeMarker(id) { return marker => marker.id == id } + function close() { + if (closing) { + text += lineSep + if (extraLinebreak) text += lineSep + closing = extraLinebreak = false + } + } + function addText(str) { + if (str) { + close() + text += str + } + } + function walk(node) { + if (node.nodeType == 1) { + let cmText = node.getAttribute("cm-text") + if (cmText) { + addText(cmText) + return + } + let markerID = node.getAttribute("cm-marker"), range + if (markerID) { + let found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID)) + if (found.length && (range = found[0].find(0))) + addText(getBetween(cm.doc, range.from, range.to).join(lineSep)) + return + } + if (node.getAttribute("contenteditable") == "false") return + let isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName) + if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) return + + if (isBlock) close() + for (let i = 0; i < node.childNodes.length; i++) + walk(node.childNodes[i]) + + if (/^(pre|p)$/i.test(node.nodeName)) extraLinebreak = true + if (isBlock) closing = true + } else if (node.nodeType == 3) { + addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " ")) + } + } + for (;;) { + walk(from) + if (from == to) break + from = from.nextSibling + extraLinebreak = false + } + return text +} + +function domToPos(cm, node, offset) { + let lineNode + if (node == cm.display.lineDiv) { + lineNode = cm.display.lineDiv.childNodes[offset] + if (!lineNode) return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) + node = null; offset = 0 + } else { + for (lineNode = node;; lineNode = lineNode.parentNode) { + if (!lineNode || lineNode == cm.display.lineDiv) return null + if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) break + } + } + for (let i = 0; i < cm.display.view.length; i++) { + let lineView = cm.display.view[i] + if (lineView.node == lineNode) + return locateNodeInLineView(lineView, node, offset) + } +} + +function locateNodeInLineView(lineView, node, offset) { + let wrapper = lineView.text.firstChild, bad = false + if (!node || !contains(wrapper, node)) return badPos(Pos(lineNo(lineView.line), 0), true) + if (node == wrapper) { + bad = true + node = wrapper.childNodes[offset] + offset = 0 + if (!node) { + let line = lineView.rest ? lst(lineView.rest) : lineView.line + return badPos(Pos(lineNo(line), line.text.length), bad) + } + } + + let textNode = node.nodeType == 3 ? node : null, topNode = node + if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { + textNode = node.firstChild + if (offset) offset = textNode.nodeValue.length + } + while (topNode.parentNode != wrapper) topNode = topNode.parentNode + let measure = lineView.measure, maps = measure.maps + + function find(textNode, topNode, offset) { + for (let i = -1; i < (maps ? maps.length : 0); i++) { + let map = i < 0 ? measure.map : maps[i] + for (let j = 0; j < map.length; j += 3) { + let curNode = map[j + 2] + if (curNode == textNode || curNode == topNode) { + let line = lineNo(i < 0 ? lineView.line : lineView.rest[i]) + let ch = map[j] + offset + if (offset < 0 || curNode != textNode) ch = map[j + (offset ? 1 : 0)] + return Pos(line, ch) + } + } + } + } + let found = find(textNode, topNode, offset) + if (found) return badPos(found, bad) + + // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems + for (let after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) { + found = find(after, after.firstChild, 0) + if (found) + return badPos(Pos(found.line, found.ch - dist), bad) + else + dist += after.textContent.length + } + for (let before = topNode.previousSibling, dist = offset; before; before = before.previousSibling) { + found = find(before, before.firstChild, -1) + if (found) + return badPos(Pos(found.line, found.ch + dist), bad) + else + dist += before.textContent.length + } +} diff --git a/js/codemirror/src/input/TextareaInput.js b/js/codemirror/src/input/TextareaInput.js new file mode 100644 index 0000000..26a1728 --- /dev/null +++ b/js/codemirror/src/input/TextareaInput.js @@ -0,0 +1,380 @@ +import { operation, runInOp } from "../display/operations.js" +import { prepareSelection } from "../display/selection.js" +import { applyTextInput, copyableRanges, handlePaste, hiddenTextarea, disableBrowserMagic, setLastCopied } from "./input.js" +import { cursorCoords, posFromMouse } from "../measurement/position_measurement.js" +import { eventInWidget } from "../measurement/widgets.js" +import { simpleSelection } from "../model/selection.js" +import { selectAll, setSelection } from "../model/selection_updates.js" +import { captureRightClick, ie, ie_version, ios, mac, mobile, presto, webkit } from "../util/browser.js" +import { activeElt, removeChildrenAndAdd, selectInput, rootNode } from "../util/dom.js" +import { e_preventDefault, e_stop, off, on, signalDOMEvent } from "../util/event.js" +import { hasSelection } from "../util/feature_detection.js" +import { Delayed, sel_dontScroll } from "../util/misc.js" + +// TEXTAREA INPUT STYLE + +export default class TextareaInput { + constructor(cm) { + this.cm = cm + // See input.poll and input.reset + this.prevInput = "" + + // Flag that indicates whether we expect input to appear real soon + // now (after some event like 'keypress' or 'input') and are + // polling intensively. + this.pollingFast = false + // Self-resetting timeout for the poller + this.polling = new Delayed() + // Used to work around IE issue with selection being forgotten when focus moves away from textarea + this.hasSelection = false + this.composing = null + this.resetting = false + } + + init(display) { + let input = this, cm = this.cm + this.createField(display) + const te = this.textarea + + display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild) + + // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) + if (ios) te.style.width = "0px" + + on(te, "input", () => { + if (ie && ie_version >= 9 && this.hasSelection) this.hasSelection = null + input.poll() + }) + + on(te, "paste", e => { + if (signalDOMEvent(cm, e) || handlePaste(e, cm)) return + + cm.state.pasteIncoming = +new Date + input.fastPoll() + }) + + function prepareCopyCut(e) { + if (signalDOMEvent(cm, e)) return + if (cm.somethingSelected()) { + setLastCopied({lineWise: false, text: cm.getSelections()}) + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + let ranges = copyableRanges(cm) + setLastCopied({lineWise: true, text: ranges.text}) + if (e.type == "cut") { + cm.setSelections(ranges.ranges, null, sel_dontScroll) + } else { + input.prevInput = "" + te.value = ranges.text.join("\n") + selectInput(te) + } + } + if (e.type == "cut") cm.state.cutIncoming = +new Date + } + on(te, "cut", prepareCopyCut) + on(te, "copy", prepareCopyCut) + + on(display.scroller, "paste", e => { + if (eventInWidget(display, e) || signalDOMEvent(cm, e)) return + if (!te.dispatchEvent) { + cm.state.pasteIncoming = +new Date + input.focus() + return + } + + // Pass the `paste` event to the textarea so it's handled by its event listener. + const event = new Event("paste") + event.clipboardData = e.clipboardData + te.dispatchEvent(event) + }) + + // Prevent normal selection in the editor (we handle our own) + on(display.lineSpace, "selectstart", e => { + if (!eventInWidget(display, e)) e_preventDefault(e) + }) + + on(te, "compositionstart", () => { + let start = cm.getCursor("from") + if (input.composing) input.composing.range.clear() + input.composing = { + start: start, + range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"}) + } + }) + on(te, "compositionend", () => { + if (input.composing) { + input.poll() + input.composing.range.clear() + input.composing = null + } + }) + } + + createField(_display) { + // Wraps and hides input textarea + this.wrapper = hiddenTextarea() + // The semihidden textarea that is focused when the editor is + // focused, and receives input. + this.textarea = this.wrapper.firstChild + let opts = this.cm.options + disableBrowserMagic(this.textarea, opts.spellcheck, opts.autocorrect, opts.autocapitalize) + } + + screenReaderLabelChanged(label) { + // Label for screenreaders, accessibility + if(label) { + this.textarea.setAttribute('aria-label', label) + } else { + this.textarea.removeAttribute('aria-label') + } + } + + prepareSelection() { + // Redraw the selection and/or cursor + let cm = this.cm, display = cm.display, doc = cm.doc + let result = prepareSelection(cm) + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + let headPos = cursorCoords(cm, doc.sel.primary().head, "div") + let wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect() + result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top)) + result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left)) + } + + return result + } + + showSelection(drawn) { + let cm = this.cm, display = cm.display + removeChildrenAndAdd(display.cursorDiv, drawn.cursors) + removeChildrenAndAdd(display.selectionDiv, drawn.selection) + if (drawn.teTop != null) { + this.wrapper.style.top = drawn.teTop + "px" + this.wrapper.style.left = drawn.teLeft + "px" + } + } + + // Reset the input to correspond to the selection (or to be empty, + // when not typing and nothing is selected) + reset(typing) { + if (this.contextMenuPending || this.composing && typing) return + let cm = this.cm + this.resetting = true + if (cm.somethingSelected()) { + this.prevInput = "" + let content = cm.getSelection() + this.textarea.value = content + if (cm.state.focused) selectInput(this.textarea) + if (ie && ie_version >= 9) this.hasSelection = content + } else if (!typing) { + this.prevInput = this.textarea.value = "" + if (ie && ie_version >= 9) this.hasSelection = null + } + this.resetting = false + } + + getField() { return this.textarea } + + supportsTouch() { return false } + + focus() { + if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt(rootNode(this.textarea)) != this.textarea)) { + try { this.textarea.focus() } + catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM + } + } + + blur() { this.textarea.blur() } + + resetPosition() { + this.wrapper.style.top = this.wrapper.style.left = 0 + } + + receivedFocus() { this.slowPoll() } + + // Poll for input changes, using the normal rate of polling. This + // runs as long as the editor is focused. + slowPoll() { + if (this.pollingFast) return + this.polling.set(this.cm.options.pollInterval, () => { + this.poll() + if (this.cm.state.focused) this.slowPoll() + }) + } + + // When an event has just come in that is likely to add or change + // something in the input textarea, we poll faster, to ensure that + // the change appears on the screen quickly. + fastPoll() { + let missed = false, input = this + input.pollingFast = true + function p() { + let changed = input.poll() + if (!changed && !missed) {missed = true; input.polling.set(60, p)} + else {input.pollingFast = false; input.slowPoll()} + } + input.polling.set(20, p) + } + + // Read input from the textarea, and update the document to match. + // When something is selected, it is present in the textarea, and + // selected (unless it is huge, in which case a placeholder is + // used). When nothing is selected, the cursor sits after previously + // seen text (can be empty), which is stored in prevInput (we must + // not reset the textarea when typing, because that breaks IME). + poll() { + let cm = this.cm, input = this.textarea, prevInput = this.prevInput + // Since this is called a *lot*, try to bail out as cheaply as + // possible when it is clear that nothing happened. hasSelection + // will be the case when there is a lot of text in the textarea, + // in which case reading its value would be expensive. + if (this.contextMenuPending || this.resetting || !cm.state.focused || + (hasSelection(input) && !prevInput && !this.composing) || + cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq) + return false + + let text = input.value + // If nothing changed, bail. + if (text == prevInput && !cm.somethingSelected()) return false + // Work around nonsensical selection resetting in IE9/10, and + // inexplicable appearance of private area unicode characters on + // some key combos in Mac (#2689). + if (ie && ie_version >= 9 && this.hasSelection === text || + mac && /[\uf700-\uf7ff]/.test(text)) { + cm.display.input.reset() + return false + } + + if (cm.doc.sel == cm.display.selForContextMenu) { + let first = text.charCodeAt(0) + if (first == 0x200b && !prevInput) prevInput = "\u200b" + if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") } + } + // Find the part of the input that is actually new + let same = 0, l = Math.min(prevInput.length, text.length) + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same + + runInOp(cm, () => { + applyTextInput(cm, text.slice(same), prevInput.length - same, + null, this.composing ? "*compose" : null) + + // Don't leave long text in the textarea, since it makes further polling slow + if (text.length > 1000 || text.indexOf("\n") > -1) input.value = this.prevInput = "" + else this.prevInput = text + + if (this.composing) { + this.composing.range.clear() + this.composing.range = cm.markText(this.composing.start, cm.getCursor("to"), + {className: "CodeMirror-composing"}) + } + }) + return true + } + + ensurePolled() { + if (this.pollingFast && this.poll()) this.pollingFast = false + } + + onKeyPress() { + if (ie && ie_version >= 9) this.hasSelection = null + this.fastPoll() + } + + onContextMenu(e) { + let input = this, cm = input.cm, display = cm.display, te = input.textarea + if (input.contextMenuPending) input.contextMenuPending() + let pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop + if (!pos || presto) return // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + let reset = cm.options.resetSelectionOnContextMenu + if (reset && cm.doc.sel.contains(pos) == -1) + operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll) + + let oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText + let wrapperBox = input.wrapper.offsetParent.getBoundingClientRect() + input.wrapper.style.cssText = "position: static" + te.style.cssText = `position: absolute; width: 30px; height: 30px; + top: ${e.clientY - wrapperBox.top - 5}px; left: ${e.clientX - wrapperBox.left - 5}px; + z-index: 1000; background: ${ie ? "rgba(255, 255, 255, .05)" : "transparent"}; + outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);` + let oldScrollY + if (webkit) oldScrollY = te.ownerDocument.defaultView.scrollY // Work around Chrome issue (#2712) + display.input.focus() + if (webkit) te.ownerDocument.defaultView.scrollTo(null, oldScrollY) + display.input.reset() + // Adds "Select all" to context menu in FF + if (!cm.somethingSelected()) te.value = input.prevInput = " " + input.contextMenuPending = rehide + display.selForContextMenu = cm.doc.sel + clearTimeout(display.detectingSelectAll) + + // Select-all will be greyed out if there's nothing to select, so + // this adds a zero-width space so that we can later check whether + // it got selected. + function prepareSelectAllHack() { + if (te.selectionStart != null) { + let selected = cm.somethingSelected() + let extval = "\u200b" + (selected ? te.value : "") + te.value = "\u21da" // Used to catch context-menu undo + te.value = extval + input.prevInput = selected ? "" : "\u200b" + te.selectionStart = 1; te.selectionEnd = extval.length + // Re-set this, in case some other handler touched the + // selection in the meantime. + display.selForContextMenu = cm.doc.sel + } + } + function rehide() { + if (input.contextMenuPending != rehide) return + input.contextMenuPending = false + input.wrapper.style.cssText = oldWrapperCSS + te.style.cssText = oldCSS + if (ie && ie_version < 9) display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos) + + // Try to detect the user choosing select-all + if (te.selectionStart != null) { + if (!ie || (ie && ie_version < 9)) prepareSelectAllHack() + let i = 0, poll = () => { + if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 && + te.selectionEnd > 0 && input.prevInput == "\u200b") { + operation(cm, selectAll)(cm) + } else if (i++ < 10) { + display.detectingSelectAll = setTimeout(poll, 500) + } else { + display.selForContextMenu = null + display.input.reset() + } + } + display.detectingSelectAll = setTimeout(poll, 200) + } + } + + if (ie && ie_version >= 9) prepareSelectAllHack() + if (captureRightClick) { + e_stop(e) + let mouseup = () => { + off(window, "mouseup", mouseup) + setTimeout(rehide, 20) + } + on(window, "mouseup", mouseup) + } else { + setTimeout(rehide, 50) + } + } + + readOnlyChanged(val) { + if (!val) this.reset() + this.textarea.disabled = val == "nocursor" + this.textarea.readOnly = !!val + } + + setUneditable() {} +} + +TextareaInput.prototype.needsContentAttribute = false diff --git a/js/codemirror/src/input/indent.js b/js/codemirror/src/input/indent.js new file mode 100644 index 0000000..c88772c --- /dev/null +++ b/js/codemirror/src/input/indent.js @@ -0,0 +1,71 @@ +import { getContextBefore } from "../line/highlight.js" +import { Pos } from "../line/pos.js" +import { getLine } from "../line/utils_line.js" +import { replaceRange } from "../model/changes.js" +import { Range } from "../model/selection.js" +import { replaceOneSelection } from "../model/selection_updates.js" +import { countColumn, Pass, spaceStr } from "../util/misc.js" + +// Indent the given line. The how parameter can be "smart", +// "add"/null, "subtract", or "prev". When aggressive is false +// (typically set to true for forced single-line indents), empty +// lines are not indented, and places where the mode returns Pass +// are left alone. +export function indentLine(cm, n, how, aggressive) { + let doc = cm.doc, state + if (how == null) how = "add" + if (how == "smart") { + // Fall back to "prev" when the mode doesn't have an indentation + // method. + if (!doc.mode.indent) how = "prev" + else state = getContextBefore(cm, n).state + } + + let tabSize = cm.options.tabSize + let line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize) + if (line.stateAfter) line.stateAfter = null + let curSpaceString = line.text.match(/^\s*/)[0], indentation + if (!aggressive && !/\S/.test(line.text)) { + indentation = 0 + how = "not" + } else if (how == "smart") { + indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text) + if (indentation == Pass || indentation > 150) { + if (!aggressive) return + how = "prev" + } + } + if (how == "prev") { + if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize) + else indentation = 0 + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit + } else if (typeof how == "number") { + indentation = curSpace + how + } + indentation = Math.max(0, indentation) + + let indentString = "", pos = 0 + if (cm.options.indentWithTabs) + for (let i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t"} + if (pos < indentation) indentString += spaceStr(indentation - pos) + + if (indentString != curSpaceString) { + replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input") + line.stateAfter = null + return true + } else { + // Ensure that, if the cursor was in the whitespace at the start + // of the line, it is moved to the end of that space. + for (let i = 0; i < doc.sel.ranges.length; i++) { + let range = doc.sel.ranges[i] + if (range.head.line == n && range.head.ch < curSpaceString.length) { + let pos = Pos(n, curSpaceString.length) + replaceOneSelection(doc, i, new Range(pos, pos)) + break + } + } + } +} diff --git a/js/codemirror/src/input/input.js b/js/codemirror/src/input/input.js new file mode 100644 index 0000000..b766d41 --- /dev/null +++ b/js/codemirror/src/input/input.js @@ -0,0 +1,134 @@ +import { runInOp } from "../display/operations.js" +import { ensureCursorVisible } from "../display/scrolling.js" +import { Pos } from "../line/pos.js" +import { getLine } from "../line/utils_line.js" +import { makeChange } from "../model/changes.js" +import { ios, webkit } from "../util/browser.js" +import { elt } from "../util/dom.js" +import { lst, map } from "../util/misc.js" +import { signalLater } from "../util/operation_group.js" +import { splitLinesAuto } from "../util/feature_detection.js" + +import { indentLine } from "./indent.js" + +// This will be set to a {lineWise: bool, text: [string]} object, so +// that, when pasting, we know what kind of selections the copied +// text was made out of. +export let lastCopied = null + +export function setLastCopied(newLastCopied) { + lastCopied = newLastCopied +} + +export function applyTextInput(cm, inserted, deleted, sel, origin) { + let doc = cm.doc + cm.display.shift = false + if (!sel) sel = doc.sel + + let recent = +new Date - 200 + let paste = origin == "paste" || cm.state.pasteIncoming > recent + let textLines = splitLinesAuto(inserted), multiPaste = null + // When pasting N lines into N selections, insert one line per selection + if (paste && sel.ranges.length > 1) { + if (lastCopied && lastCopied.text.join("\n") == inserted) { + if (sel.ranges.length % lastCopied.text.length == 0) { + multiPaste = [] + for (let i = 0; i < lastCopied.text.length; i++) + multiPaste.push(doc.splitLines(lastCopied.text[i])) + } + } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) { + multiPaste = map(textLines, l => [l]) + } + } + + let updateInput = cm.curOp.updateInput + // Normal behavior is to insert the new text into every selection + for (let i = sel.ranges.length - 1; i >= 0; i--) { + let range = sel.ranges[i] + let from = range.from(), to = range.to() + if (range.empty()) { + if (deleted && deleted > 0) // Handle deletion + from = Pos(from.line, from.ch - deleted) + else if (cm.state.overwrite && !paste) // Handle overwrite + to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)) + else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == textLines.join("\n")) + from = to = Pos(from.line, 0) + } + let changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i % multiPaste.length] : textLines, + origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")} + makeChange(cm.doc, changeEvent) + signalLater(cm, "inputRead", cm, changeEvent) + } + if (inserted && !paste) + triggerElectric(cm, inserted) + + ensureCursorVisible(cm) + if (cm.curOp.updateInput < 2) cm.curOp.updateInput = updateInput + cm.curOp.typing = true + cm.state.pasteIncoming = cm.state.cutIncoming = -1 +} + +export function handlePaste(e, cm) { + let pasted = e.clipboardData && e.clipboardData.getData("Text") + if (pasted) { + e.preventDefault() + if (!cm.isReadOnly() && !cm.options.disableInput && cm.hasFocus()) + runInOp(cm, () => applyTextInput(cm, pasted, 0, null, "paste")) + return true + } +} + +export function triggerElectric(cm, inserted) { + // When an 'electric' character is inserted, immediately trigger a reindent + if (!cm.options.electricChars || !cm.options.smartIndent) return + let sel = cm.doc.sel + + for (let i = sel.ranges.length - 1; i >= 0; i--) { + let range = sel.ranges[i] + if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) continue + let mode = cm.getModeAt(range.head) + let indented = false + if (mode.electricChars) { + for (let j = 0; j < mode.electricChars.length; j++) + if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { + indented = indentLine(cm, range.head.line, "smart") + break + } + } else if (mode.electricInput) { + if (mode.electricInput.test(getLine(cm.doc, range.head.line).text.slice(0, range.head.ch))) + indented = indentLine(cm, range.head.line, "smart") + } + if (indented) signalLater(cm, "electricInput", cm, range.head.line) + } +} + +export function copyableRanges(cm) { + let text = [], ranges = [] + for (let i = 0; i < cm.doc.sel.ranges.length; i++) { + let line = cm.doc.sel.ranges[i].head.line + let lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)} + ranges.push(lineRange) + text.push(cm.getRange(lineRange.anchor, lineRange.head)) + } + return {text: text, ranges: ranges} +} + +export function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) { + field.setAttribute("autocorrect", autocorrect ? "on" : "off") + field.setAttribute("autocapitalize", autocapitalize ? "on" : "off") + field.setAttribute("spellcheck", !!spellcheck) +} + +export function hiddenTextarea() { + let te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none") + let div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;") + // The textarea is kept positioned near the cursor to prevent the + // fact that it'll be scrolled into view on input from scrolling + // our fake cursor out of view. On webkit, when wrap=off, paste is + // very slow. So make the area wide instead. + if (webkit) te.style.width = "1000px" + else te.setAttribute("wrap", "off") + // If border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) te.style.border = "1px solid black" + return div +} diff --git a/js/codemirror/src/input/keymap.js b/js/codemirror/src/input/keymap.js new file mode 100644 index 0000000..2df588d --- /dev/null +++ b/js/codemirror/src/input/keymap.js @@ -0,0 +1,147 @@ +import { flipCtrlCmd, mac, presto } from "../util/browser.js" +import { map } from "../util/misc.js" + +import { keyNames } from "./keynames.js" + +export let keyMap = {} + +keyMap.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" +} +// Note that the save and find-related commands aren't defined by +// default. User code or addons can define them. Unknown commands +// are simply ignored. +keyMap.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" +} +// Very basic readline/emacs-style bindings, which are standard on Mac. +keyMap.emacsy = { + "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", + "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", + "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", + "Ctrl-T": "transposeChars", "Ctrl-O": "openLine" +} +keyMap.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"] +} +keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault + +// KEYMAP DISPATCH + +function normalizeKeyName(name) { + let parts = name.split(/-(?!$)/) + name = parts[parts.length - 1] + let alt, ctrl, shift, cmd + for (let i = 0; i < parts.length - 1; i++) { + let mod = parts[i] + if (/^(cmd|meta|m)$/i.test(mod)) cmd = true + else if (/^a(lt)?$/i.test(mod)) alt = true + else if (/^(c|ctrl|control)$/i.test(mod)) ctrl = true + else if (/^s(hift)?$/i.test(mod)) shift = true + else throw new Error("Unrecognized modifier name: " + mod) + } + if (alt) name = "Alt-" + name + if (ctrl) name = "Ctrl-" + name + if (cmd) name = "Cmd-" + name + if (shift) name = "Shift-" + name + return name +} + +// This is a kludge to keep keymaps mostly working as raw objects +// (backwards compatibility) while at the same time support features +// like normalization and multi-stroke key bindings. It compiles a +// new normalized keymap, and then updates the old object to reflect +// this. +export function normalizeKeyMap(keymap) { + let copy = {} + for (let keyname in keymap) if (keymap.hasOwnProperty(keyname)) { + let value = keymap[keyname] + if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) continue + if (value == "...") { delete keymap[keyname]; continue } + + let keys = map(keyname.split(" "), normalizeKeyName) + for (let i = 0; i < keys.length; i++) { + let val, name + if (i == keys.length - 1) { + name = keys.join(" ") + val = value + } else { + name = keys.slice(0, i + 1).join(" ") + val = "..." + } + let prev = copy[name] + if (!prev) copy[name] = val + else if (prev != val) throw new Error("Inconsistent bindings for " + name) + } + delete keymap[keyname] + } + for (let prop in copy) keymap[prop] = copy[prop] + return keymap +} + +export function lookupKey(key, map, handle, context) { + map = getKeyMap(map) + let found = map.call ? map.call(key, context) : map[key] + if (found === false) return "nothing" + if (found === "...") return "multi" + if (found != null && handle(found)) return "handled" + + if (map.fallthrough) { + if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") + return lookupKey(key, map.fallthrough, handle, context) + for (let i = 0; i < map.fallthrough.length; i++) { + let result = lookupKey(key, map.fallthrough[i], handle, context) + if (result) return result + } + } +} + +// Modifier key presses don't count as 'real' key presses for the +// purpose of keymap fallthrough. +export function isModifierKey(value) { + let name = typeof value == "string" ? value : keyNames[value.keyCode] + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod" +} + +export function addModifierNames(name, event, noShift) { + let base = name + if (event.altKey && base != "Alt") name = "Alt-" + name + if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") name = "Ctrl-" + name + if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Mod") name = "Cmd-" + name + if (!noShift && event.shiftKey && base != "Shift") name = "Shift-" + name + return name +} + +// Look up the name of a key as indicated by an event object. +export function keyName(event, noShift) { + if (presto && event.keyCode == 34 && event["char"]) return false + let name = keyNames[event.keyCode] + if (name == null || event.altGraphKey) return false + // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause, + // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+) + if (event.keyCode == 3 && event.code) name = event.code + return addModifierNames(name, event, noShift) +} + +export function getKeyMap(val) { + return typeof val == "string" ? keyMap[val] : val +} diff --git a/js/codemirror/src/input/keynames.js b/js/codemirror/src/input/keynames.js new file mode 100644 index 0000000..eb09ca1 --- /dev/null +++ b/js/codemirror/src/input/keynames.js @@ -0,0 +1,17 @@ +export let keyNames = { + 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", + 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", + 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", + 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod", + 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock", + 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", + 221: "]", 222: "'", 224: "Mod", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete", + 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert" +} + +// Number keys +for (let i = 0; i < 10; i++) keyNames[i + 48] = keyNames[i + 96] = String(i) +// Alphabetic keys +for (let i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i) +// Function keys +for (let i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i diff --git a/js/codemirror/src/input/movement.js b/js/codemirror/src/input/movement.js new file mode 100644 index 0000000..479f221 --- /dev/null +++ b/js/codemirror/src/input/movement.js @@ -0,0 +1,111 @@ +import { Pos } from "../line/pos.js" +import { prepareMeasureForLine, measureCharPrepared, wrappedLineExtentChar } from "../measurement/position_measurement.js" +import { getBidiPartAt, getOrder } from "../util/bidi.js" +import { findFirst, lst, skipExtendingChars } from "../util/misc.js" + +function moveCharLogically(line, ch, dir) { + let target = skipExtendingChars(line.text, ch + dir, dir) + return target < 0 || target > line.text.length ? null : target +} + +export function moveLogically(line, start, dir) { + let ch = moveCharLogically(line, start.ch, dir) + return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before") +} + +export function endOfLine(visually, cm, lineObj, lineNo, dir) { + if (visually) { + if (cm.doc.direction == "rtl") dir = -dir + let order = getOrder(lineObj, cm.doc.direction) + if (order) { + let part = dir < 0 ? lst(order) : order[0] + let moveInStorageOrder = (dir < 0) == (part.level == 1) + let sticky = moveInStorageOrder ? "after" : "before" + let ch + // With a wrapped rtl chunk (possibly spanning multiple bidi parts), + // it could be that the last bidi part is not on the last visual line, + // since visual lines contain content order-consecutive chunks. + // Thus, in rtl, we are looking for the first (content-order) character + // in the rtl chunk that is on the last line (that is, the same line + // as the last (content-order) character). + if (part.level > 0 || cm.doc.direction == "rtl") { + let prep = prepareMeasureForLine(cm, lineObj) + ch = dir < 0 ? lineObj.text.length - 1 : 0 + let targetTop = measureCharPrepared(cm, prep, ch).top + ch = findFirst(ch => measureCharPrepared(cm, prep, ch).top == targetTop, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch) + if (sticky == "before") ch = moveCharLogically(lineObj, ch, 1) + } else ch = dir < 0 ? part.to : part.from + return new Pos(lineNo, ch, sticky) + } + } + return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after") +} + +export function moveVisually(cm, line, start, dir) { + let bidi = getOrder(line, cm.doc.direction) + if (!bidi) return moveLogically(line, start, dir) + if (start.ch >= line.text.length) { + start.ch = line.text.length + start.sticky = "before" + } else if (start.ch <= 0) { + start.ch = 0 + start.sticky = "after" + } + let partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos] + if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) { + // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines, + // nothing interesting happens. + return moveLogically(line, start, dir) + } + + let mv = (pos, dir) => moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir) + let prep + let getWrappedLineExtent = ch => { + if (!cm.options.lineWrapping) return {begin: 0, end: line.text.length} + prep = prep || prepareMeasureForLine(cm, line) + return wrappedLineExtentChar(cm, line, prep, ch) + } + let wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch) + + if (cm.doc.direction == "rtl" || part.level == 1) { + let moveInStorageOrder = (part.level == 1) == (dir < 0) + let ch = mv(start, moveInStorageOrder ? 1 : -1) + if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) { + // Case 2: We move within an rtl part or in an rtl editor on the same visual line + let sticky = moveInStorageOrder ? "before" : "after" + return new Pos(start.line, ch, sticky) + } + } + + // Case 3: Could not move within this bidi part in this visual line, so leave + // the current bidi part + + let searchInVisualLine = (partPos, dir, wrappedLineExtent) => { + let getRes = (ch, moveInStorageOrder) => moveInStorageOrder + ? new Pos(start.line, mv(ch, 1), "before") + : new Pos(start.line, ch, "after") + + for (; partPos >= 0 && partPos < bidi.length; partPos += dir) { + let part = bidi[partPos] + let moveInStorageOrder = (dir > 0) == (part.level != 1) + let ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1) + if (part.from <= ch && ch < part.to) return getRes(ch, moveInStorageOrder) + ch = moveInStorageOrder ? part.from : mv(part.to, -1) + if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) return getRes(ch, moveInStorageOrder) + } + } + + // Case 3a: Look for other bidi parts on the same visual line + let res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent) + if (res) return res + + // Case 3b: Look for other bidi parts on the next visual line + let nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1) + if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) { + res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh)) + if (res) return res + } + + // Case 4: Nowhere to move + return null +} diff --git a/js/codemirror/src/line/highlight.js b/js/codemirror/src/line/highlight.js new file mode 100644 index 0000000..7b4ca0b --- /dev/null +++ b/js/codemirror/src/line/highlight.js @@ -0,0 +1,284 @@ +import { countColumn } from "../util/misc.js" +import { copyState, innerMode, startState } from "../modes.js" +import StringStream from "../util/StringStream.js" + +import { getLine, lineNo } from "./utils_line.js" +import { clipPos } from "./pos.js" + +class SavedContext { + constructor(state, lookAhead) { + this.state = state + this.lookAhead = lookAhead + } +} + +class Context { + constructor(doc, state, line, lookAhead) { + this.state = state + this.doc = doc + this.line = line + this.maxLookAhead = lookAhead || 0 + this.baseTokens = null + this.baseTokenPos = 1 + } + + lookAhead(n) { + let line = this.doc.getLine(this.line + n) + if (line != null && n > this.maxLookAhead) this.maxLookAhead = n + return line + } + + baseToken(n) { + if (!this.baseTokens) return null + while (this.baseTokens[this.baseTokenPos] <= n) + this.baseTokenPos += 2 + let type = this.baseTokens[this.baseTokenPos + 1] + return {type: type && type.replace(/( |^)overlay .*/, ""), + size: this.baseTokens[this.baseTokenPos] - n} + } + + nextLine() { + this.line++ + if (this.maxLookAhead > 0) this.maxLookAhead-- + } + + static fromSaved(doc, saved, line) { + if (saved instanceof SavedContext) + return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) + else + return new Context(doc, copyState(doc.mode, saved), line) + } + + save(copy) { + let state = copy !== false ? copyState(this.doc.mode, this.state) : this.state + return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state + } +} + + +// Compute a style array (an array starting with a mode generation +// -- for invalidation -- followed by pairs of end positions and +// style strings), which is used to highlight the tokens on the +// line. +export function highlightLine(cm, line, context, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + let st = [cm.state.modeGen], lineClasses = {} + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, context, (end, style) => st.push(end, style), + lineClasses, forceToEnd) + let state = context.state + + // Run overlays, adjust style array. + for (let o = 0; o < cm.state.overlays.length; ++o) { + context.baseTokens = st + let overlay = cm.state.overlays[o], i = 1, at = 0 + context.state = true + runMode(cm, line.text, overlay.mode, context, (end, style) => { + let start = i + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + let i_end = st[i] + if (i_end > end) + st.splice(i, 1, end, st[i+1], i_end) + i += 2 + at = Math.min(end, i_end) + } + if (!style) return + if (overlay.opaque) { + st.splice(start, i - start, end, "overlay " + style) + i = start + 2 + } else { + for (; start < i; start += 2) { + let cur = st[start+1] + st[start+1] = (cur ? cur + " " : "") + "overlay " + style + } + } + }, lineClasses) + context.state = state + context.baseTokens = null + context.baseTokenPos = 1 + } + + return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null} +} + +export function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + let context = getContextBefore(cm, lineNo(line)) + let resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state) + let result = highlightLine(cm, line, context) + if (resetState) context.state = resetState + line.stateAfter = context.save(!resetState) + line.styles = result.styles + if (result.classes) line.styleClasses = result.classes + else if (line.styleClasses) line.styleClasses = null + if (updateFrontier === cm.doc.highlightFrontier) + cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier) + } + return line.styles +} + +export function getContextBefore(cm, n, precise) { + let doc = cm.doc, display = cm.display + if (!doc.mode.startState) return new Context(doc, true, n) + let start = findStartLine(cm, n, precise) + let saved = start > doc.first && getLine(doc, start - 1).stateAfter + let context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start) + + doc.iter(start, n, line => { + processLine(cm, line.text, context) + let pos = context.line + line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null + context.nextLine() + }) + if (precise) doc.modeFrontier = context.line + return context +} + +// Lightweight form of highlight -- proceed over this line and +// update state, but don't save a style array. Used for lines that +// aren't currently visible. +export function processLine(cm, text, context, startAt) { + let mode = cm.doc.mode + let stream = new StringStream(text, cm.options.tabSize, context) + stream.start = stream.pos = startAt || 0 + if (text == "") callBlankLine(mode, context.state) + while (!stream.eol()) { + readToken(mode, stream, context.state) + stream.start = stream.pos + } +} + +function callBlankLine(mode, state) { + if (mode.blankLine) return mode.blankLine(state) + if (!mode.innerMode) return + let inner = innerMode(mode, state) + if (inner.mode.blankLine) return inner.mode.blankLine(inner.state) +} + +function readToken(mode, stream, state, inner) { + for (let i = 0; i < 10; i++) { + if (inner) inner[0] = innerMode(mode, state).mode + let style = mode.token(stream, state) + if (stream.pos > stream.start) return style + } + throw new Error("Mode " + mode.name + " failed to advance stream.") +} + +class Token { + constructor(stream, type, state) { + this.start = stream.start; this.end = stream.pos + this.string = stream.current() + this.type = type || null + this.state = state + } +} + +// Utility for getTokenAt and getLineTokens +export function takeToken(cm, pos, precise, asArray) { + let doc = cm.doc, mode = doc.mode, style + pos = clipPos(doc, pos) + let line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise) + let stream = new StringStream(line.text, cm.options.tabSize, context), tokens + if (asArray) tokens = [] + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos + style = readToken(mode, stream, context.state) + if (asArray) tokens.push(new Token(stream, style, copyState(doc.mode, context.state))) + } + return asArray ? tokens : new Token(stream, style, context.state) +} + +function extractLineClasses(type, output) { + if (type) for (;;) { + let lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/) + if (!lineClass) break + type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length) + let prop = lineClass[1] ? "bgClass" : "textClass" + if (output[prop] == null) + output[prop] = lineClass[2] + else if (!(new RegExp("(?:^|\\s)" + lineClass[2] + "(?:$|\\s)")).test(output[prop])) + output[prop] += " " + lineClass[2] + } + return type +} + +// Run the given mode's parser over a line, calling f for each token. +function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) { + let flattenSpans = mode.flattenSpans + if (flattenSpans == null) flattenSpans = cm.options.flattenSpans + let curStart = 0, curStyle = null + let stream = new StringStream(text, cm.options.tabSize, context), style + let inner = cm.options.addModeClass && [null] + if (text == "") extractLineClasses(callBlankLine(mode, context.state), lineClasses) + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false + if (forceToEnd) processLine(cm, text, context, stream.pos) + stream.pos = text.length + style = null + } else { + style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses) + } + if (inner) { + let mName = inner[0].name + if (mName) style = "m-" + (style ? mName + " " + style : mName) + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 5000) + f(curStart, curStyle) + } + curStyle = style + } + stream.start = stream.pos + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 + // characters, and returns inaccurate measurements in nodes + // starting around 5000 chars. + let pos = Math.min(stream.pos, curStart + 5000) + f(pos, curStyle) + curStart = pos + } +} + +// Finds the line to start with when starting a parse. Tries to +// find a line with a stateAfter, so that it can start with a +// valid state. If that fails, it returns the line with the +// smallest indentation, which tends to need the least context to +// parse correctly. +function findStartLine(cm, n, precise) { + let minindent, minline, doc = cm.doc + let lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100) + for (let search = n; search > lim; --search) { + if (search <= doc.first) return doc.first + let line = getLine(doc, search - 1), after = line.stateAfter + if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier)) + return search + let indented = countColumn(line.text, null, cm.options.tabSize) + if (minline == null || minindent > indented) { + minline = search - 1 + minindent = indented + } + } + return minline +} + +export function retreatFrontier(doc, n) { + doc.modeFrontier = Math.min(doc.modeFrontier, n) + if (doc.highlightFrontier < n - 10) return + let start = doc.first + for (let line = n - 1; line > start; line--) { + let saved = getLine(doc, line).stateAfter + // change is on 3 + // state on line 1 looked ahead 2 -- so saw 3 + // test 1 + 2 < 3 should cover this + if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) { + start = line + 1 + break + } + } + doc.highlightFrontier = Math.min(doc.highlightFrontier, start) +} diff --git a/js/codemirror/src/line/line_data.js b/js/codemirror/src/line/line_data.js new file mode 100644 index 0000000..e650b3e --- /dev/null +++ b/js/codemirror/src/line/line_data.js @@ -0,0 +1,349 @@ +import { getOrder } from "../util/bidi.js" +import { ie, ie_version, webkit } from "../util/browser.js" +import { elt, eltP, joinClasses } from "../util/dom.js" +import { eventMixin, signal } from "../util/event.js" +import { hasBadBidiRects, zeroWidthElement } from "../util/feature_detection.js" +import { lst, spaceStr } from "../util/misc.js" + +import { getLineStyles } from "./highlight.js" +import { attachMarkedSpans, compareCollapsedMarkers, detachMarkedSpans, lineIsHidden, visualLineContinued } from "./spans.js" +import { getLine, lineNo, updateLineHeight } from "./utils_line.js" + +// LINE DATA STRUCTURE + +// Line objects. These hold state related to a line, including +// highlighting info (the styles array). +export class Line { + constructor(text, markedSpans, estimateHeight) { + this.text = text + attachMarkedSpans(this, markedSpans) + this.height = estimateHeight ? estimateHeight(this) : 1 + } + + lineNo() { return lineNo(this) } +} +eventMixin(Line) + +// Change the content (text, markers) of a line. Automatically +// invalidates cached information and tries to re-estimate the +// line's height. +export function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text + if (line.stateAfter) line.stateAfter = null + if (line.styles) line.styles = null + if (line.order != null) line.order = null + detachMarkedSpans(line) + attachMarkedSpans(line, markedSpans) + let estHeight = estimateHeight ? estimateHeight(line) : 1 + if (estHeight != line.height) updateLineHeight(line, estHeight) +} + +// Detach a line from the document tree and its markers. +export function cleanUpLine(line) { + line.parent = null + detachMarkedSpans(line) +} + +// Convert a style as returned by a mode (either null, or a string +// containing one or more styles) to a CSS style. This is cached, +// and also looks for line-wide styles. +let styleToClassCache = {}, styleToClassCacheWithMode = {} +function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) return null + let cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache + return cache[style] || + (cache[style] = style.replace(/\S+/g, "cm-$&")) +} + +// Render the DOM representation of the text of a line. Also builds +// up a 'line map', which points at the DOM nodes that represent +// specific stretches of text, and is used by the measuring code. +// The returned object contains the DOM node, this map, and +// information about line-wide styles that were set by the mode. +export function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + let content = eltP("span", null, null, webkit ? "padding-right: .1px" : null) + let builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content, + col: 0, pos: 0, cm: cm, + trailingSpace: false, + splitSpaces: cm.getOption("lineWrapping")} + lineView.measure = {} + + // Iterate over the logical lines that make up this visual line. + for (let i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + let line = i ? lineView.rest[i - 1] : lineView.line, order + builder.pos = 0 + builder.addToken = buildToken + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) + builder.addToken = buildTokenBadBidi(builder.addToken, order) + builder.map = [] + let allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line) + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)) + if (line.styleClasses) { + if (line.styleClasses.bgClass) + builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || "") + if (line.styleClasses.textClass) + builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || "") + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) + builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))) + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map + lineView.measure.cache = {} + } else { + ;(lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map) + ;(lineView.measure.caches || (lineView.measure.caches = [])).push({}) + } + } + + // See issue #2901 + if (webkit) { + let last = builder.content.lastChild + if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab"))) + builder.content.className = "cm-tab-wrap-hack" + } + + signal(cm, "renderLine", cm, lineView.line, builder.pre) + if (builder.pre.className) + builder.textClass = joinClasses(builder.pre.className, builder.textClass || "") + + return builder +} + +export function defaultSpecialCharPlaceholder(ch) { + let token = elt("span", "\u2022", "cm-invalidchar") + token.title = "\\u" + ch.charCodeAt(0).toString(16) + token.setAttribute("aria-label", token.title) + return token +} + +// Build up the DOM representation for a single token, and add it to +// the line map. Takes care to render special characters separately. +function buildToken(builder, text, style, startStyle, endStyle, css, attributes) { + if (!text) return + let displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text + let special = builder.cm.state.specialChars, mustWrap = false + let content + if (!special.test(text)) { + builder.col += text.length + content = document.createTextNode(displayText) + builder.map.push(builder.pos, builder.pos + text.length, content) + if (ie && ie_version < 9) mustWrap = true + builder.pos += text.length + } else { + content = document.createDocumentFragment() + let pos = 0 + while (true) { + special.lastIndex = pos + let m = special.exec(text) + let skipped = m ? m.index - pos : text.length - pos + if (skipped) { + let txt = document.createTextNode(displayText.slice(pos, pos + skipped)) + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])) + else content.appendChild(txt) + builder.map.push(builder.pos, builder.pos + skipped, txt) + builder.col += skipped + builder.pos += skipped + } + if (!m) break + pos += skipped + 1 + let txt + if (m[0] == "\t") { + let tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize + txt = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")) + txt.setAttribute("role", "presentation") + txt.setAttribute("cm-text", "\t") + builder.col += tabWidth + } else if (m[0] == "\r" || m[0] == "\n") { + txt = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar")) + txt.setAttribute("cm-text", m[0]) + builder.col += 1 + } else { + txt = builder.cm.options.specialCharPlaceholder(m[0]) + txt.setAttribute("cm-text", m[0]) + if (ie && ie_version < 9) content.appendChild(elt("span", [txt])) + else content.appendChild(txt) + builder.col += 1 + } + builder.map.push(builder.pos, builder.pos + 1, txt) + builder.pos++ + } + } + builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32 + if (style || startStyle || endStyle || mustWrap || css || attributes) { + let fullStyle = style || "" + if (startStyle) fullStyle += startStyle + if (endStyle) fullStyle += endStyle + let token = elt("span", [content], fullStyle, css) + if (attributes) { + for (let attr in attributes) if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") + token.setAttribute(attr, attributes[attr]) + } + return builder.content.appendChild(token) + } + builder.content.appendChild(content) +} + +// Change some spaces to NBSP to prevent the browser from collapsing +// trailing spaces at the end of a line when rendering text (issue #1362). +function splitSpaces(text, trailingBefore) { + if (text.length > 1 && !/ /.test(text)) return text + let spaceBefore = trailingBefore, result = "" + for (let i = 0; i < text.length; i++) { + let ch = text.charAt(i) + if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32)) + ch = "\u00a0" + result += ch + spaceBefore = ch == " " + } + return result +} + +// Work around nonsense dimensions being reported for stretches of +// right-to-left text. +function buildTokenBadBidi(inner, order) { + return (builder, text, style, startStyle, endStyle, css, attributes) => { + style = style ? style + " cm-force-border" : "cm-force-border" + let start = builder.pos, end = start + text.length + for (;;) { + // Find the part that overlaps with the start of this text + let part + for (let i = 0; i < order.length; i++) { + part = order[i] + if (part.to > start && part.from <= start) break + } + if (part.to >= end) return inner(builder, text, style, startStyle, endStyle, css, attributes) + inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes) + startStyle = null + text = text.slice(part.to - start) + start = part.to + } + } +} + +function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + let widget = !ignoreWidget && marker.widgetNode + if (widget) builder.map.push(builder.pos, builder.pos + size, widget) + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) + widget = builder.content.appendChild(document.createElement("span")) + widget.setAttribute("cm-marker", marker.id) + } + if (widget) { + builder.cm.display.input.setUneditable(widget) + builder.content.appendChild(widget) + } + builder.pos += size + builder.trailingSpace = false +} + +// Outputs a number of spans to make up a line, taking highlighting +// and marked text into account. +function insertLineContent(line, builder, styles) { + let spans = line.markedSpans, allText = line.text, at = 0 + if (!spans) { + for (let i = 1; i < styles.length; i+=2) + builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder.cm.options)) + return + } + + let len = allText.length, pos = 0, i = 1, text = "", style, css + let nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = css = "" + attributes = null + collapsed = null; nextChange = Infinity + let foundBookmarks = [], endStyles + for (let j = 0; j < spans.length; ++j) { + let sp = spans[j], m = sp.marker + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m) + } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to + spanEndStyle = "" + } + if (m.className) spanStyle += " " + m.className + if (m.css) css = (css ? css + ";" : "") + m.css + if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle + if (m.endStyle && sp.to == nextChange) (endStyles || (endStyles = [])).push(m.endStyle, sp.to) + // support for the old title property + // https://github.com/codemirror/CodeMirror/pull/5673 + if (m.title) (attributes || (attributes = {})).title = m.title + if (m.attributes) { + for (let attr in m.attributes) + (attributes || (attributes = {}))[attr] = m.attributes[attr] + } + if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0)) + collapsed = sp + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from + } + } + if (endStyles) for (let j = 0; j < endStyles.length; j += 2) + if (endStyles[j + 1] == nextChange) spanEndStyle += " " + endStyles[j] + + if (!collapsed || collapsed.from == pos) for (let j = 0; j < foundBookmarks.length; ++j) + buildCollapsedSpan(builder, 0, foundBookmarks[j]) + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos, + collapsed.marker, collapsed.from == null) + if (collapsed.to == null) return + if (collapsed.to == pos) collapsed = false + } + } + if (pos >= len) break + + let upto = Math.min(len, nextChange) + while (true) { + if (text) { + let end = pos + text.length + if (!collapsed) { + let tokenText = end > upto ? text.slice(0, upto - pos) : text + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, + spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes) + } + if (end >= upto) {text = text.slice(upto - pos); pos = upto; break} + pos = end + spanStartStyle = "" + } + text = allText.slice(at, at = styles[i++]) + style = interpretTokenStyle(styles[i++], builder.cm.options) + } + } +} + + +// These objects are used to represent the visible (currently drawn) +// part of the document. A LineView may correspond to multiple +// logical lines, if those are connected by collapsed ranges. +export function LineView(doc, line, lineN) { + // The starting line + this.line = line + // Continuing lines, if any + this.rest = visualLineContinued(line) + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1 + this.node = this.text = null + this.hidden = lineIsHidden(doc, line) +} + +// Create a range of LineView objects for the given lines. +export function buildViewArray(cm, from, to) { + let array = [], nextPos + for (let pos = from; pos < to; pos = nextPos) { + let view = new LineView(cm.doc, getLine(cm.doc, pos), pos) + nextPos = pos + view.size + array.push(view) + } + return array +} diff --git a/js/codemirror/src/line/pos.js b/js/codemirror/src/line/pos.js new file mode 100644 index 0000000..2a498f8 --- /dev/null +++ b/js/codemirror/src/line/pos.js @@ -0,0 +1,40 @@ +import { getLine } from "./utils_line.js" + +// A Pos instance represents a position within the text. +export function Pos(line, ch, sticky = null) { + if (!(this instanceof Pos)) return new Pos(line, ch, sticky) + this.line = line + this.ch = ch + this.sticky = sticky +} + +// Compare two positions, return 0 if they are the same, a negative +// number when a is less, and a positive number otherwise. +export function cmp(a, b) { return a.line - b.line || a.ch - b.ch } + +export function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 } + +export function copyPos(x) {return Pos(x.line, x.ch)} +export function maxPos(a, b) { return cmp(a, b) < 0 ? b : a } +export function minPos(a, b) { return cmp(a, b) < 0 ? a : b } + +// Most of the external API clips given positions to make sure they +// actually exist within the document. +export function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))} +export function clipPos(doc, pos) { + if (pos.line < doc.first) return Pos(doc.first, 0) + let last = doc.first + doc.size - 1 + if (pos.line > last) return Pos(last, getLine(doc, last).text.length) + return clipToLen(pos, getLine(doc, pos.line).text.length) +} +function clipToLen(pos, linelen) { + let ch = pos.ch + if (ch == null || ch > linelen) return Pos(pos.line, linelen) + else if (ch < 0) return Pos(pos.line, 0) + else return pos +} +export function clipPosArray(doc, array) { + let out = [] + for (let i = 0; i < array.length; i++) out[i] = clipPos(doc, array[i]) + return out +} diff --git a/js/codemirror/src/line/saw_special_spans.js b/js/codemirror/src/line/saw_special_spans.js new file mode 100644 index 0000000..d315e7b --- /dev/null +++ b/js/codemirror/src/line/saw_special_spans.js @@ -0,0 +1,10 @@ +// Optimize some code when these features are not used. +export let sawReadOnlySpans = false, sawCollapsedSpans = false + +export function seeReadOnlySpans() { + sawReadOnlySpans = true +} + +export function seeCollapsedSpans() { + sawCollapsedSpans = true +} diff --git a/js/codemirror/src/line/spans.js b/js/codemirror/src/line/spans.js new file mode 100644 index 0000000..3ca9a95 --- /dev/null +++ b/js/codemirror/src/line/spans.js @@ -0,0 +1,390 @@ +import { indexOf, lst } from "../util/misc.js" + +import { cmp } from "./pos.js" +import { sawCollapsedSpans } from "./saw_special_spans.js" +import { getLine, isLine, lineNo } from "./utils_line.js" + +// TEXTMARKER SPANS + +export function MarkedSpan(marker, from, to) { + this.marker = marker + this.from = from; this.to = to +} + +// Search an array of spans for a span matching the given marker. +export function getMarkedSpanFor(spans, marker) { + if (spans) for (let i = 0; i < spans.length; ++i) { + let span = spans[i] + if (span.marker == marker) return span + } +} + +// Remove a span from an array, returning undefined if no spans are +// left (we don't store arrays for lines without spans). +export function removeMarkedSpan(spans, span) { + let r + for (let i = 0; i < spans.length; ++i) + if (spans[i] != span) (r || (r = [])).push(spans[i]) + return r +} + +// Add a span to a line. +export function addMarkedSpan(line, span, op) { + let inThisOp = op && window.WeakSet && (op.markedSpans || (op.markedSpans = new WeakSet)) + if (inThisOp && line.markedSpans && inThisOp.has(line.markedSpans)) { + line.markedSpans.push(span) + } else { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span] + if (inThisOp) inThisOp.add(line.markedSpans) + } + span.marker.attachLine(line) +} + +// Used for the algorithm that adjusts markers for a change in the +// document. These functions cut an array of spans at a given +// character position, returning an array of remaining chunks (or +// undefined if nothing remains). +function markedSpansBefore(old, startCh, isInsert) { + let nw + if (old) for (let i = 0; i < old.length; ++i) { + let span = old[i], marker = span.marker + let startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh) + if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) { + let endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) + ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to)) + } + } + return nw +} +function markedSpansAfter(old, endCh, isInsert) { + let nw + if (old) for (let i = 0; i < old.length; ++i) { + let span = old[i], marker = span.marker + let endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh) + if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) { + let startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh) + ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh, + span.to == null ? null : span.to - endCh)) + } + } + return nw +} + +// Given a change object, compute the new set of marker spans that +// cover the line in which the change took place. Removes spans +// entirely within the change, reconnects spans belonging to the +// same marker that appear on both sides of the change, and cuts off +// spans partially within the change. Returns an array of span +// arrays with one element for each line in (after) the change. +export function stretchSpansOverChange(doc, change) { + if (change.full) return null + let oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans + let oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans + if (!oldFirst && !oldLast) return null + + let startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0 + // Get the spans that 'stick out' on both sides + let first = markedSpansBefore(oldFirst, startCh, isInsert) + let last = markedSpansAfter(oldLast, endCh, isInsert) + + // Next, merge those two ends + let sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0) + if (first) { + // Fix up .to properties of first + for (let i = 0; i < first.length; ++i) { + let span = first[i] + if (span.to == null) { + let found = getMarkedSpanFor(last, span.marker) + if (!found) span.to = startCh + else if (sameLine) span.to = found.to == null ? null : found.to + offset + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (let i = 0; i < last.length; ++i) { + let span = last[i] + if (span.to != null) span.to += offset + if (span.from == null) { + let found = getMarkedSpanFor(first, span.marker) + if (!found) { + span.from = offset + if (sameLine) (first || (first = [])).push(span) + } + } else { + span.from += offset + if (sameLine) (first || (first = [])).push(span) + } + } + } + // Make sure we didn't create any zero-length spans + if (first) first = clearEmptySpans(first) + if (last && last != first) last = clearEmptySpans(last) + + let newMarkers = [first] + if (!sameLine) { + // Fill gap with whole-line-spans + let gap = change.text.length - 2, gapMarkers + if (gap > 0 && first) + for (let i = 0; i < first.length; ++i) + if (first[i].to == null) + (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i].marker, null, null)) + for (let i = 0; i < gap; ++i) + newMarkers.push(gapMarkers) + newMarkers.push(last) + } + return newMarkers +} + +// Remove spans that are empty and don't have a clearWhenEmpty +// option of false. +function clearEmptySpans(spans) { + for (let i = 0; i < spans.length; ++i) { + let span = spans[i] + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) + spans.splice(i--, 1) + } + if (!spans.length) return null + return spans +} + +// Used to 'clip' out readOnly ranges when making a change. +export function removeReadOnlyRanges(doc, from, to) { + let markers = null + doc.iter(from.line, to.line + 1, line => { + if (line.markedSpans) for (let i = 0; i < line.markedSpans.length; ++i) { + let mark = line.markedSpans[i].marker + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) + (markers || (markers = [])).push(mark) + } + }) + if (!markers) return null + let parts = [{from: from, to: to}] + for (let i = 0; i < markers.length; ++i) { + let mk = markers[i], m = mk.find(0) + for (let j = 0; j < parts.length; ++j) { + let p = parts[j] + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) continue + let newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to) + if (dfrom < 0 || !mk.inclusiveLeft && !dfrom) + newParts.push({from: p.from, to: m.from}) + if (dto > 0 || !mk.inclusiveRight && !dto) + newParts.push({from: m.to, to: p.to}) + parts.splice.apply(parts, newParts) + j += newParts.length - 3 + } + } + return parts +} + +// Connect or disconnect spans from a line. +export function detachMarkedSpans(line) { + let spans = line.markedSpans + if (!spans) return + for (let i = 0; i < spans.length; ++i) + spans[i].marker.detachLine(line) + line.markedSpans = null +} +export function attachMarkedSpans(line, spans) { + if (!spans) return + for (let i = 0; i < spans.length; ++i) + spans[i].marker.attachLine(line) + line.markedSpans = spans +} + +// Helpers used when computing which overlapping collapsed span +// counts as the larger one. +function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 } +function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 } + +// Returns a number indicating which of two overlapping collapsed +// spans is larger (and thus includes the other). Falls back to +// comparing ids when the spans cover exactly the same range. +export function compareCollapsedMarkers(a, b) { + let lenDiff = a.lines.length - b.lines.length + if (lenDiff != 0) return lenDiff + let aPos = a.find(), bPos = b.find() + let fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b) + if (fromCmp) return -fromCmp + let toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b) + if (toCmp) return toCmp + return b.id - a.id +} + +// Find out whether a line ends or starts in a collapsed span. If +// so, return the marker for that span. +function collapsedSpanAtSide(line, start) { + let sps = sawCollapsedSpans && line.markedSpans, found + if (sps) for (let sp, i = 0; i < sps.length; ++i) { + sp = sps[i] + if (sp.marker.collapsed && (start ? sp.from : sp.to) == null && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) + found = sp.marker + } + return found +} +export function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) } +export function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) } + +export function collapsedSpanAround(line, ch) { + let sps = sawCollapsedSpans && line.markedSpans, found + if (sps) for (let i = 0; i < sps.length; ++i) { + let sp = sps[i] + if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) && + (!found || compareCollapsedMarkers(found, sp.marker) < 0)) found = sp.marker + } + return found +} + +// Test whether there exists a collapsed span that partially +// overlaps (covers the start or end, but not both) of a new span. +// Such overlap is not allowed. +export function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + let line = getLine(doc, lineNo) + let sps = sawCollapsedSpans && line.markedSpans + if (sps) for (let i = 0; i < sps.length; ++i) { + let sp = sps[i] + if (!sp.marker.collapsed) continue + let found = sp.marker.find(0) + let fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker) + let toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker) + if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) continue + if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) || + fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0)) + return true + } +} + +// A visual line is a line as drawn on the screen. Folding, for +// example, can cause multiple logical lines to appear on the same +// visual line. This finds the start of the visual line that the +// given line is part of (usually that is the line itself). +export function visualLine(line) { + let merged + while (merged = collapsedSpanAtStart(line)) + line = merged.find(-1, true).line + return line +} + +export function visualLineEnd(line) { + let merged + while (merged = collapsedSpanAtEnd(line)) + line = merged.find(1, true).line + return line +} + +// Returns an array of logical lines that continue the visual line +// started by the argument, or undefined if there are no such lines. +export function visualLineContinued(line) { + let merged, lines + while (merged = collapsedSpanAtEnd(line)) { + line = merged.find(1, true).line + ;(lines || (lines = [])).push(line) + } + return lines +} + +// Get the line number of the start of the visual line that the +// given line number is part of. +export function visualLineNo(doc, lineN) { + let line = getLine(doc, lineN), vis = visualLine(line) + if (line == vis) return lineN + return lineNo(vis) +} + +// Get the line number of the start of the next visual line after +// the given line. +export function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) return lineN + let line = getLine(doc, lineN), merged + if (!lineIsHidden(doc, line)) return lineN + while (merged = collapsedSpanAtEnd(line)) + line = merged.find(1, true).line + return lineNo(line) + 1 +} + +// Compute whether a line is hidden. Lines count as hidden when they +// are part of a visual line that starts with another line, or when +// they are entirely covered by collapsed, non-widget span. +export function lineIsHidden(doc, line) { + let sps = sawCollapsedSpans && line.markedSpans + if (sps) for (let sp, i = 0; i < sps.length; ++i) { + sp = sps[i] + if (!sp.marker.collapsed) continue + if (sp.from == null) return true + if (sp.marker.widgetNode) continue + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) + return true + } +} +function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + let end = span.marker.find(1, true) + return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker)) + } + if (span.marker.inclusiveRight && span.to == line.text.length) + return true + for (let sp, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i] + if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to && + (sp.to == null || sp.to != span.from) && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp)) return true + } +} + +// Find the height above the given line. +export function heightAtLine(lineObj) { + lineObj = visualLine(lineObj) + + let h = 0, chunk = lineObj.parent + for (let i = 0; i < chunk.lines.length; ++i) { + let line = chunk.lines[i] + if (line == lineObj) break + else h += line.height + } + for (let p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (let i = 0; i < p.children.length; ++i) { + let cur = p.children[i] + if (cur == chunk) break + else h += cur.height + } + } + return h +} + +// Compute the character length of a line, taking into account +// collapsed ranges (see markText) that might hide parts, and join +// other lines onto it. +export function lineLength(line) { + if (line.height == 0) return 0 + let len = line.text.length, merged, cur = line + while (merged = collapsedSpanAtStart(cur)) { + let found = merged.find(0, true) + cur = found.from.line + len += found.from.ch - found.to.ch + } + cur = line + while (merged = collapsedSpanAtEnd(cur)) { + let found = merged.find(0, true) + len -= cur.text.length - found.from.ch + cur = found.to.line + len += cur.text.length - found.to.ch + } + return len +} + +// Find the longest line in the document. +export function findMaxLine(cm) { + let d = cm.display, doc = cm.doc + d.maxLine = getLine(doc, doc.first) + d.maxLineLength = lineLength(d.maxLine) + d.maxLineChanged = true + doc.iter(line => { + let len = lineLength(line) + if (len > d.maxLineLength) { + d.maxLineLength = len + d.maxLine = line + } + }) +} diff --git a/js/codemirror/src/line/utils_line.js b/js/codemirror/src/line/utils_line.js new file mode 100644 index 0000000..c886294 --- /dev/null +++ b/js/codemirror/src/line/utils_line.js @@ -0,0 +1,85 @@ +import { indexOf } from "../util/misc.js" + +// Find the line object corresponding to the given line number. +export function getLine(doc, n) { + n -= doc.first + if (n < 0 || n >= doc.size) throw new Error("There is no line " + (n + doc.first) + " in the document.") + let chunk = doc + while (!chunk.lines) { + for (let i = 0;; ++i) { + let child = chunk.children[i], sz = child.chunkSize() + if (n < sz) { chunk = child; break } + n -= sz + } + } + return chunk.lines[n] +} + +// Get the part of a document between two positions, as an array of +// strings. +export function getBetween(doc, start, end) { + let out = [], n = start.line + doc.iter(start.line, end.line + 1, line => { + let text = line.text + if (n == end.line) text = text.slice(0, end.ch) + if (n == start.line) text = text.slice(start.ch) + out.push(text) + ++n + }) + return out +} +// Get the lines between from and to, as array of strings. +export function getLines(doc, from, to) { + let out = [] + doc.iter(from, to, line => { out.push(line.text) }) // iter aborts when callback returns truthy value + return out +} + +// Update the height of a line, propagating the height change +// upwards to parent nodes. +export function updateLineHeight(line, height) { + let diff = height - line.height + if (diff) for (let n = line; n; n = n.parent) n.height += diff +} + +// Given a line object, find its line number by walking up through +// its parent links. +export function lineNo(line) { + if (line.parent == null) return null + let cur = line.parent, no = indexOf(cur.lines, line) + for (let chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (let i = 0;; ++i) { + if (chunk.children[i] == cur) break + no += chunk.children[i].chunkSize() + } + } + return no + cur.first +} + +// Find the line at the given vertical position, using the height +// information in the document tree. +export function lineAtHeight(chunk, h) { + let n = chunk.first + outer: do { + for (let i = 0; i < chunk.children.length; ++i) { + let child = chunk.children[i], ch = child.height + if (h < ch) { chunk = child; continue outer } + h -= ch + n += child.chunkSize() + } + return n + } while (!chunk.lines) + let i = 0 + for (; i < chunk.lines.length; ++i) { + let line = chunk.lines[i], lh = line.height + if (h < lh) break + h -= lh + } + return n + i +} + +export function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size} + +export function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)) +} diff --git a/js/codemirror/src/measurement/position_measurement.js b/js/codemirror/src/measurement/position_measurement.js new file mode 100644 index 0000000..26232a7 --- /dev/null +++ b/js/codemirror/src/measurement/position_measurement.js @@ -0,0 +1,702 @@ +import { buildLineContent, LineView } from "../line/line_data.js" +import { clipPos, Pos } from "../line/pos.js" +import { collapsedSpanAround, heightAtLine, lineIsHidden, visualLine } from "../line/spans.js" +import { getLine, lineAtHeight, lineNo, updateLineHeight } from "../line/utils_line.js" +import { bidiOther, getBidiPartAt, getOrder } from "../util/bidi.js" +import { chrome, android, ie, ie_version } from "../util/browser.js" +import { elt, removeChildren, range, removeChildrenAndAdd, doc } from "../util/dom.js" +import { e_target } from "../util/event.js" +import { hasBadZoomedRects } from "../util/feature_detection.js" +import { countColumn, findFirst, isExtendingChar, scrollerGap, skipExtendingChars } from "../util/misc.js" +import { updateLineForChanges } from "../display/update_line.js" + +import { widgetHeight } from "./widgets.js" + +// POSITION MEASUREMENT + +export function paddingTop(display) {return display.lineSpace.offsetTop} +export function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight} +export function paddingH(display) { + if (display.cachedPaddingH) return display.cachedPaddingH + let e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like")) + let style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle + let data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)} + if (!isNaN(data.left) && !isNaN(data.right)) display.cachedPaddingH = data + return data +} + +export function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth } +export function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth +} +export function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight +} + +// Ensure the lineView.wrapping.heights array is populated. This is +// an array of bottom offsets for the lines that make up a drawn +// line. When lineWrapping is on, there might be more than one +// height. +function ensureLineHeights(cm, lineView, rect) { + let wrapping = cm.options.lineWrapping + let curWidth = wrapping && displayWidth(cm) + if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) { + let heights = lineView.measure.heights = [] + if (wrapping) { + lineView.measure.width = curWidth + let rects = lineView.text.firstChild.getClientRects() + for (let i = 0; i < rects.length - 1; i++) { + let cur = rects[i], next = rects[i + 1] + if (Math.abs(cur.bottom - next.bottom) > 2) + heights.push((cur.bottom + next.top) / 2 - rect.top) + } + } + heights.push(rect.bottom - rect.top) + } +} + +// Find a line map (mapping character offsets to text nodes) and a +// measurement cache for the given line number. (A line view might +// contain multiple lines when collapsed ranges are present.) +export function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) + return {map: lineView.measure.map, cache: lineView.measure.cache} + if (lineView.rest) { + for (let i = 0; i < lineView.rest.length; i++) + if (lineView.rest[i] == line) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} + for (let i = 0; i < lineView.rest.length; i++) + if (lineNo(lineView.rest[i]) > lineN) + return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i], before: true} + } +} + +// Render a line into the hidden node display.externalMeasured. Used +// when measurement is needed for a line that's not in the viewport. +function updateExternalMeasurement(cm, line) { + line = visualLine(line) + let lineN = lineNo(line) + let view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN) + view.lineN = lineN + let built = view.built = buildLineContent(cm, view) + view.text = built.pre + removeChildrenAndAdd(cm.display.lineMeasure, built.pre) + return view +} + +// Get a {top, bottom, left, right} box (in line-local coordinates) +// for a given character. +export function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias) +} + +// Find a line view that corresponds to the given line number. +export function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) + return cm.display.view[findViewIndex(cm, lineN)] + let ext = cm.display.externalMeasured + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) + return ext +} + +// Measurement can be split in two steps, the set-up work that +// applies to the whole line, and the measurement of the actual +// character. Functions like coordsChar, that need to do a lot of +// measurements in a row, can thus ensure that the set-up work is +// only done once. +export function prepareMeasureForLine(cm, line) { + let lineN = lineNo(line) + let view = findViewForLine(cm, lineN) + if (view && !view.text) { + view = null + } else if (view && view.changes) { + updateLineForChanges(cm, view, lineN, getDimensions(cm)) + cm.curOp.forceUpdate = true + } + if (!view) + view = updateExternalMeasurement(cm, line) + + let info = mapFromLineView(view, line, lineN) + return { + line: line, view: view, rect: null, + map: info.map, cache: info.cache, before: info.before, + hasHeights: false + } +} + +// Given a prepared measurement object, measures the position of an +// actual character (or fetches it from the cache). +export function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) ch = -1 + let key = ch + (bias || ""), found + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key] + } else { + if (!prepared.rect) + prepared.rect = prepared.view.text.getBoundingClientRect() + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect) + prepared.hasHeights = true + } + found = measureCharInner(cm, prepared, ch, bias) + if (!found.bogus) prepared.cache[key] = found + } + return {left: found.left, right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom} +} + +let nullRect = {left: 0, right: 0, top: 0, bottom: 0} + +export function nodeAndOffsetInLineMap(map, ch, bias) { + let node, start, end, collapse, mStart, mEnd + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (let i = 0; i < map.length; i += 3) { + mStart = map[i] + mEnd = map[i + 1] + if (ch < mStart) { + start = 0; end = 1 + collapse = "left" + } else if (ch < mEnd) { + start = ch - mStart + end = start + 1 + } else if (i == map.length - 3 || ch == mEnd && map[i + 3] > ch) { + end = mEnd - mStart + start = end - 1 + if (ch >= mEnd) collapse = "right" + } + if (start != null) { + node = map[i + 2] + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) + collapse = bias + if (bias == "left" && start == 0) + while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2] + collapse = "left" + } + if (bias == "right" && start == mEnd - mStart) + while (i < map.length - 3 && map[i + 3] == map[i + 4] && !map[i + 5].insertLeft) { + node = map[(i += 3) + 2] + collapse = "right" + } + break + } + } + return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd} +} + +function getUsefulRect(rects, bias) { + let rect = nullRect + if (bias == "left") for (let i = 0; i < rects.length; i++) { + if ((rect = rects[i]).left != rect.right) break + } else for (let i = rects.length - 1; i >= 0; i--) { + if ((rect = rects[i]).left != rect.right) break + } + return rect +} + +function measureCharInner(cm, prepared, ch, bias) { + let place = nodeAndOffsetInLineMap(prepared.map, ch, bias) + let node = place.node, start = place.start, end = place.end, collapse = place.collapse + + let rect + if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates. + for (let i = 0; i < 4; i++) { // Retry a maximum of 4 times when nonsense rectangles are returned + while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) --start + while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) ++end + if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart) + rect = node.parentNode.getBoundingClientRect() + else + rect = getUsefulRect(range(node, start, end).getClientRects(), bias) + if (rect.left || rect.right || start == 0) break + end = start + start = start - 1 + collapse = "right" + } + if (ie && ie_version < 11) rect = maybeUpdateRectForZooming(cm.display.measure, rect) + } else { // If it is a widget, simply get the box for the whole widget. + if (start > 0) collapse = bias = "right" + let rects + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) + rect = rects[bias == "right" ? rects.length - 1 : 0] + else + rect = node.getBoundingClientRect() + } + if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) { + let rSpan = node.parentNode.getClientRects()[0] + if (rSpan) + rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom} + else + rect = nullRect + } + + let rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top + let mid = (rtop + rbot) / 2 + let heights = prepared.view.measure.heights + let i = 0 + for (; i < heights.length - 1; i++) + if (mid < heights[i]) break + let top = i ? heights[i - 1] : 0, bot = heights[i] + let result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, bottom: bot} + if (!rect.left && !rect.right) result.bogus = true + if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot } + + return result +} + +// Work around problem with bounding client rects on ranges being +// returned incorrectly when zoomed on IE10 and below. +function maybeUpdateRectForZooming(measure, rect) { + if (!window.screen || screen.logicalXDPI == null || + screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure)) + return rect + let scaleX = screen.logicalXDPI / screen.deviceXDPI + let scaleY = screen.logicalYDPI / screen.deviceYDPI + return {left: rect.left * scaleX, right: rect.right * scaleX, + top: rect.top * scaleY, bottom: rect.bottom * scaleY} +} + +export function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {} + lineView.measure.heights = null + if (lineView.rest) for (let i = 0; i < lineView.rest.length; i++) + lineView.measure.caches[i] = {} + } +} + +export function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null + removeChildren(cm.display.lineMeasure) + for (let i = 0; i < cm.display.view.length; i++) + clearLineMeasurementCacheFor(cm.display.view[i]) +} + +export function clearCaches(cm) { + clearLineMeasurementCache(cm) + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null + if (!cm.options.lineWrapping) cm.display.maxLineChanged = true + cm.display.lineNumChars = null +} + +function pageScrollX(doc) { + // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206 + // which causes page_Offset and bounding client rects to use + // different reference viewports and invalidate our calculations. + if (chrome && android) return -(doc.body.getBoundingClientRect().left - parseInt(getComputedStyle(doc.body).marginLeft)) + return doc.defaultView.pageXOffset || (doc.documentElement || doc.body).scrollLeft +} +function pageScrollY(doc) { + if (chrome && android) return -(doc.body.getBoundingClientRect().top - parseInt(getComputedStyle(doc.body).marginTop)) + return doc.defaultView.pageYOffset || (doc.documentElement || doc.body).scrollTop +} + +function widgetTopHeight(lineObj) { + let {widgets} = visualLine(lineObj), height = 0 + if (widgets) for (let i = 0; i < widgets.length; ++i) if (widgets[i].above) + height += widgetHeight(widgets[i]) + return height +} + +// Converts a {top, bottom, left, right} box from line-local +// coordinates into another coordinate system. Context may be one of +// "line", "div" (display.lineDiv), "local"./null (editor), "window", +// or "page". +export function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) { + if (!includeWidgets) { + let height = widgetTopHeight(lineObj) + rect.top += height; rect.bottom += height + } + if (context == "line") return rect + if (!context) context = "local" + let yOff = heightAtLine(lineObj) + if (context == "local") yOff += paddingTop(cm.display) + else yOff -= cm.display.viewOffset + if (context == "page" || context == "window") { + let lOff = cm.display.lineSpace.getBoundingClientRect() + yOff += lOff.top + (context == "window" ? 0 : pageScrollY(doc(cm))) + let xOff = lOff.left + (context == "window" ? 0 : pageScrollX(doc(cm))) + rect.left += xOff; rect.right += xOff + } + rect.top += yOff; rect.bottom += yOff + return rect +} + +// Coverts a box from "div" coords to another coordinate system. +// Context may be "window", "page", "div", or "local"./null. +export function fromCoordSystem(cm, coords, context) { + if (context == "div") return coords + let left = coords.left, top = coords.top + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(doc(cm)) + top -= pageScrollY(doc(cm)) + } else if (context == "local" || !context) { + let localBox = cm.display.sizer.getBoundingClientRect() + left += localBox.left + top += localBox.top + } + + let lineSpaceBox = cm.display.lineSpace.getBoundingClientRect() + return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top} +} + +export function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) lineObj = getLine(cm.doc, pos.line) + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context) +} + +// Returns a box for a given cursor position, which may have an +// 'other' property containing the position of the secondary cursor +// on a bidi boundary. +// A cursor Pos(line, char, "before") is on the same visual line as `char - 1` +// and after `char - 1` in writing order of `char - 1` +// A cursor Pos(line, char, "after") is on the same visual line as `char` +// and before `char` in writing order of `char` +// Examples (upper-case letters are RTL, lower-case are LTR): +// Pos(0, 1, ...) +// before after +// ab a|b a|b +// aB a|B aB| +// Ab |Ab A|b +// AB B|A B|A +// Every position after the last character on a line is considered to stick +// to the last character on the line. +export function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line) + if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj) + function get(ch, right) { + let m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight) + if (right) m.left = m.right; else m.right = m.left + return intoCoordSystem(cm, lineObj, m, context) + } + let order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky + if (ch >= lineObj.text.length) { + ch = lineObj.text.length + sticky = "before" + } else if (ch <= 0) { + ch = 0 + sticky = "after" + } + if (!order) return get(sticky == "before" ? ch - 1 : ch, sticky == "before") + + function getBidi(ch, partPos, invert) { + let part = order[partPos], right = part.level == 1 + return get(invert ? ch - 1 : ch, right != invert) + } + let partPos = getBidiPartAt(order, ch, sticky) + let other = bidiOther + let val = getBidi(ch, partPos, sticky == "before") + if (other != null) val.other = getBidi(ch, other, sticky != "before") + return val +} + +// Used to cheaply estimate the coordinates for a position. Used for +// intermediate scroll updates. +export function estimateCoords(cm, pos) { + let left = 0 + pos = clipPos(cm.doc, pos) + if (!cm.options.lineWrapping) left = charWidth(cm.display) * pos.ch + let lineObj = getLine(cm.doc, pos.line) + let top = heightAtLine(lineObj) + paddingTop(cm.display) + return {left: left, right: left, top: top, bottom: top + lineObj.height} +} + +// Positions returned by coordsChar contain some extra information. +// xRel is the relative x position of the input coordinates compared +// to the found position (so xRel > 0 means the coordinates are to +// the right of the character position, for example). When outside +// is true, that means the coordinates lie outside the line's +// vertical range. +function PosWithInfo(line, ch, sticky, outside, xRel) { + let pos = Pos(line, ch, sticky) + pos.xRel = xRel + if (outside) pos.outside = outside + return pos +} + +// Compute the character position closest to the given coordinates. +// Input must be lineSpace-local ("div" coordinate system). +export function coordsChar(cm, x, y) { + let doc = cm.doc + y += cm.display.viewOffset + if (y < 0) return PosWithInfo(doc.first, 0, null, -1, -1) + let lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1 + if (lineN > last) + return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) + if (x < 0) x = 0 + + let lineObj = getLine(doc, lineN) + for (;;) { + let found = coordsCharInner(cm, lineObj, lineN, x, y) + let collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0)) + if (!collapsed) return found + let rangeEnd = collapsed.find(1) + if (rangeEnd.line == lineN) return rangeEnd + lineObj = getLine(doc, lineN = rangeEnd.line) + } +} + +function wrappedLineExtent(cm, lineObj, preparedMeasure, y) { + y -= widgetTopHeight(lineObj) + let end = lineObj.text.length + let begin = findFirst(ch => measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y, end, 0) + end = findFirst(ch => measureCharPrepared(cm, preparedMeasure, ch).top > y, begin, end) + return {begin, end} +} + +export function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) { + if (!preparedMeasure) preparedMeasure = prepareMeasureForLine(cm, lineObj) + let targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top + return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop) +} + +// Returns true if the given side of a box is after the given +// coordinates, in top-to-bottom, left-to-right order. +function boxIsAfter(box, x, y, left) { + return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x +} + +function coordsCharInner(cm, lineObj, lineNo, x, y) { + // Move y into line-local coordinate space + y -= heightAtLine(lineObj) + let preparedMeasure = prepareMeasureForLine(cm, lineObj) + // When directly calling `measureCharPrepared`, we have to adjust + // for the widgets at this line. + let widgetHeight = widgetTopHeight(lineObj) + let begin = 0, end = lineObj.text.length, ltr = true + + let order = getOrder(lineObj, cm.doc.direction) + // If the line isn't plain left-to-right text, first figure out + // which bidi section the coordinates fall into. + if (order) { + let part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart) + (cm, lineObj, lineNo, preparedMeasure, order, x, y) + ltr = part.level != 1 + // The awkward -1 offsets are needed because findFirst (called + // on these below) will treat its first bound as inclusive, + // second as exclusive, but we want to actually address the + // characters in the part's range + begin = ltr ? part.from : part.to - 1 + end = ltr ? part.to : part.from - 1 + } + + // A binary search to find the first character whose bounding box + // starts after the coordinates. If we run across any whose box wrap + // the coordinates, store that. + let chAround = null, boxAround = null + let ch = findFirst(ch => { + let box = measureCharPrepared(cm, preparedMeasure, ch) + box.top += widgetHeight; box.bottom += widgetHeight + if (!boxIsAfter(box, x, y, false)) return false + if (box.top <= y && box.left <= x) { + chAround = ch + boxAround = box + } + return true + }, begin, end) + + let baseX, sticky, outside = false + // If a box around the coordinates was found, use that + if (boxAround) { + // Distinguish coordinates nearer to the left or right side of the box + let atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr + ch = chAround + (atStart ? 0 : 1) + sticky = atStart ? "after" : "before" + baseX = atLeft ? boxAround.left : boxAround.right + } else { + // (Adjust for extended bound, if necessary.) + if (!ltr && (ch == end || ch == begin)) ch++ + // To determine which side to associate with, get the box to the + // left of the character and compare it's vertical position to the + // coordinates + sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" : + (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight <= y) == ltr ? + "after" : "before" + // Now get accurate coordinates for this place, in order to get a + // base X position + let coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure) + baseX = coords.left + outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0 + } + + ch = skipExtendingChars(lineObj.text, ch, 1) + return PosWithInfo(lineNo, ch, sticky, outside, x - baseX) +} + +function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) { + // Bidi parts are sorted left-to-right, and in a non-line-wrapping + // situation, we can take this ordering to correspond to the visual + // ordering. This finds the first part whose end is after the given + // coordinates. + let index = findFirst(i => { + let part = order[i], ltr = part.level != 1 + return boxIsAfter(cursorCoords(cm, Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"), + "line", lineObj, preparedMeasure), x, y, true) + }, 0, order.length - 1) + let part = order[index] + // If this isn't the first part, the part's start is also after + // the coordinates, and the coordinates aren't on the same line as + // that start, move one part back. + if (index > 0) { + let ltr = part.level != 1 + let start = cursorCoords(cm, Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"), + "line", lineObj, preparedMeasure) + if (boxIsAfter(start, x, y, true) && start.top > y) + part = order[index - 1] + } + return part +} + +function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) { + // In a wrapped line, rtl text on wrapping boundaries can do things + // that don't correspond to the ordering in our `order` array at + // all, so a binary search doesn't work, and we want to return a + // part that only spans one line so that the binary search in + // coordsCharInner is safe. As such, we first find the extent of the + // wrapped line, and then do a flat search in which we discard any + // spans that aren't on the line. + let {begin, end} = wrappedLineExtent(cm, lineObj, preparedMeasure, y) + if (/\s/.test(lineObj.text.charAt(end - 1))) end-- + let part = null, closestDist = null + for (let i = 0; i < order.length; i++) { + let p = order[i] + if (p.from >= end || p.to <= begin) continue + let ltr = p.level != 1 + let endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right + // Weigh against spans ending before this, so that they are only + // picked if nothing ends after + let dist = endX < x ? x - endX + 1e9 : endX - x + if (!part || closestDist > dist) { + part = p + closestDist = dist + } + } + if (!part) part = order[order.length - 1] + // Clip the part to the wrapped line. + if (part.from < begin) part = {from: begin, to: part.to, level: part.level} + if (part.to > end) part = {from: part.from, to: end, level: part.level} + return part +} + +let measureText +// Compute the default text height. +export function textHeight(display) { + if (display.cachedTextHeight != null) return display.cachedTextHeight + if (measureText == null) { + measureText = elt("pre", null, "CodeMirror-line-like") + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (let i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")) + measureText.appendChild(elt("br")) + } + measureText.appendChild(document.createTextNode("x")) + } + removeChildrenAndAdd(display.measure, measureText) + let height = measureText.offsetHeight / 50 + if (height > 3) display.cachedTextHeight = height + removeChildren(display.measure) + return height || 1 +} + +// Compute the default character width. +export function charWidth(display) { + if (display.cachedCharWidth != null) return display.cachedCharWidth + let anchor = elt("span", "xxxxxxxxxx") + let pre = elt("pre", [anchor], "CodeMirror-line-like") + removeChildrenAndAdd(display.measure, pre) + let rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10 + if (width > 2) display.cachedCharWidth = width + return width || 10 +} + +// Do a bulk-read of the DOM positions and sizes needed to draw the +// view, so that we don't interleave reading and writing to the DOM. +export function getDimensions(cm) { + let d = cm.display, left = {}, width = {} + let gutterLeft = d.gutters.clientLeft + for (let n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + let id = cm.display.gutterSpecs[i].className + left[id] = n.offsetLeft + n.clientLeft + gutterLeft + width[id] = n.clientWidth + } + return {fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth} +} + +// Computes display.scroller.scrollLeft + display.gutters.offsetWidth, +// but using getBoundingClientRect to get a sub-pixel-accurate +// result. +export function compensateForHScroll(display) { + return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left +} + +// Returns a function that estimates the height of a line, to use as +// first approximation until the line becomes visible (and is thus +// properly measurable). +export function estimateHeight(cm) { + let th = textHeight(cm.display), wrapping = cm.options.lineWrapping + let perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3) + return line => { + if (lineIsHidden(cm.doc, line)) return 0 + + let widgetsHeight = 0 + if (line.widgets) for (let i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) widgetsHeight += line.widgets[i].height + } + + if (wrapping) + return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th + else + return widgetsHeight + th + } +} + +export function estimateLineHeights(cm) { + let doc = cm.doc, est = estimateHeight(cm) + doc.iter(line => { + let estHeight = est(line) + if (estHeight != line.height) updateLineHeight(line, estHeight) + }) +} + +// Given a mouse event, find the corresponding position. If liberal +// is false, it checks whether a gutter or scrollbar was clicked, +// and returns null if it was. forRect is used by rectangular +// selections, and tries to estimate a character position even for +// coordinates beyond the right of the text. +export function posFromMouse(cm, e, liberal, forRect) { + let display = cm.display + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") return null + + let x, y, space = display.lineSpace.getBoundingClientRect() + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX - space.left; y = e.clientY - space.top } + catch (e) { return null } + let coords = coordsChar(cm, x, y), line + if (forRect && coords.xRel > 0 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) { + let colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length + coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff)) + } + return coords +} + +// Find the view element corresponding to a given line. Return null +// when the line isn't visible. +export function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) return null + n -= cm.display.viewFrom + if (n < 0) return null + let view = cm.display.view + for (let i = 0; i < view.length; i++) { + n -= view[i].size + if (n < 0) return i + } +} diff --git a/js/codemirror/src/measurement/widgets.js b/js/codemirror/src/measurement/widgets.js new file mode 100644 index 0000000..39d7553 --- /dev/null +++ b/js/codemirror/src/measurement/widgets.js @@ -0,0 +1,26 @@ +import { contains, elt, removeChildrenAndAdd } from "../util/dom.js" +import { e_target } from "../util/event.js" + +export function widgetHeight(widget) { + if (widget.height != null) return widget.height + let cm = widget.doc.cm + if (!cm) return 0 + if (!contains(document.body, widget.node)) { + let parentStyle = "position: relative;" + if (widget.coverGutter) + parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;" + if (widget.noHScroll) + parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;" + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)) + } + return widget.height = widget.node.parentNode.offsetHeight +} + +// Return true when the given mouse event happened in a widget +export function eventInWidget(display, e) { + for (let n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || + (n.parentNode == display.sizer && n != display.mover)) + return true + } +} diff --git a/js/codemirror/src/model/Doc.js b/js/codemirror/src/model/Doc.js new file mode 100644 index 0000000..3d2f7d2 --- /dev/null +++ b/js/codemirror/src/model/Doc.js @@ -0,0 +1,436 @@ +import CodeMirror from "../edit/CodeMirror.js" +import { docMethodOp } from "../display/operations.js" +import { Line } from "../line/line_data.js" +import { clipPos, clipPosArray, Pos } from "../line/pos.js" +import { visualLine } from "../line/spans.js" +import { getBetween, getLine, getLines, isLine, lineNo } from "../line/utils_line.js" +import { classTest } from "../util/dom.js" +import { splitLinesAuto } from "../util/feature_detection.js" +import { createObj, map, isEmpty, sel_dontScroll } from "../util/misc.js" +import { ensureCursorVisible, scrollToCoords } from "../display/scrolling.js" + +import { changeLine, makeChange, makeChangeFromHistory, replaceRange } from "./changes.js" +import { computeReplacedSel } from "./change_measurement.js" +import { BranchChunk, LeafChunk } from "./chunk.js" +import { directionChanged, linkedDocs, updateDoc } from "./document_data.js" +import { copyHistoryArray, History } from "./history.js" +import { addLineWidget } from "./line_widget.js" +import { copySharedMarkers, detachSharedMarkers, findSharedMarkers, markText } from "./mark_text.js" +import { normalizeSelection, Range, simpleSelection } from "./selection.js" +import { extendSelection, extendSelections, setSelection, setSelectionReplaceHistory, setSimpleSelection } from "./selection_updates.js" + +let nextDocId = 0 +let Doc = function(text, mode, firstLine, lineSep, direction) { + if (!(this instanceof Doc)) return new Doc(text, mode, firstLine, lineSep, direction) + if (firstLine == null) firstLine = 0 + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]) + this.first = firstLine + this.scrollTop = this.scrollLeft = 0 + this.cantEdit = false + this.cleanGeneration = 1 + this.modeFrontier = this.highlightFrontier = firstLine + let start = Pos(firstLine, 0) + this.sel = simpleSelection(start) + this.history = new History(null) + this.id = ++nextDocId + this.modeOption = mode + this.lineSep = lineSep + this.direction = (direction == "rtl") ? "rtl" : "ltr" + this.extend = false + + if (typeof text == "string") text = this.splitLines(text) + updateDoc(this, {from: start, to: start, text: text}) + setSelection(this, simpleSelection(start), sel_dontScroll) +} + +Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + // Iterate over the document. Supports two forms -- with only one + // argument, it calls that for each line in the document. With + // three, it iterates over the range given by the first two (with + // the second being non-inclusive). + iter: function(from, to, op) { + if (op) this.iterN(from - this.first, to - from, op) + else this.iterN(this.first, this.first + this.size, from) + }, + + // Non-public interface for adding and removing lines. + insert: function(at, lines) { + let height = 0 + for (let i = 0; i < lines.length; ++i) height += lines[i].height + this.insertInner(at - this.first, lines, height) + }, + remove: function(at, n) { this.removeInner(at - this.first, n) }, + + // From here, the methods are part of the public interface. Most + // are also available from CodeMirror (editor) instances. + + getValue: function(lineSep) { + let lines = getLines(this, this.first, this.first + this.size) + if (lineSep === false) return lines + return lines.join(lineSep || this.lineSeparator()) + }, + setValue: docMethodOp(function(code) { + let top = Pos(this.first, 0), last = this.first + this.size - 1 + makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), + text: this.splitLines(code), origin: "setValue", full: true}, true) + if (this.cm) scrollToCoords(this.cm, 0, 0) + setSelection(this, simpleSelection(top), sel_dontScroll) + }), + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from) + to = to ? clipPos(this, to) : from + replaceRange(this, code, from, to, origin) + }, + getRange: function(from, to, lineSep) { + let lines = getBetween(this, clipPos(this, from), clipPos(this, to)) + if (lineSep === false) return lines + if (lineSep === '') return lines.join('') + return lines.join(lineSep || this.lineSeparator()) + }, + + getLine: function(line) {let l = this.getLineHandle(line); return l && l.text}, + + getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line)}, + getLineNumber: function(line) {return lineNo(line)}, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") line = getLine(this, line) + return visualLine(line) + }, + + lineCount: function() {return this.size}, + firstLine: function() {return this.first}, + lastLine: function() {return this.first + this.size - 1}, + + clipPos: function(pos) {return clipPos(this, pos)}, + + getCursor: function(start) { + let range = this.sel.primary(), pos + if (start == null || start == "head") pos = range.head + else if (start == "anchor") pos = range.anchor + else if (start == "end" || start == "to" || start === false) pos = range.to() + else pos = range.from() + return pos + }, + listSelections: function() { return this.sel.ranges }, + somethingSelected: function() {return this.sel.somethingSelected()}, + + setCursor: docMethodOp(function(line, ch, options) { + setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options) + }), + setSelection: docMethodOp(function(anchor, head, options) { + setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options) + }), + extendSelection: docMethodOp(function(head, other, options) { + extendSelection(this, clipPos(this, head), other && clipPos(this, other), options) + }), + extendSelections: docMethodOp(function(heads, options) { + extendSelections(this, clipPosArray(this, heads), options) + }), + extendSelectionsBy: docMethodOp(function(f, options) { + let heads = map(this.sel.ranges, f) + extendSelections(this, clipPosArray(this, heads), options) + }), + setSelections: docMethodOp(function(ranges, primary, options) { + if (!ranges.length) return + let out = [] + for (let i = 0; i < ranges.length; i++) + out[i] = new Range(clipPos(this, ranges[i].anchor), + clipPos(this, ranges[i].head || ranges[i].anchor)) + if (primary == null) primary = Math.min(ranges.length - 1, this.sel.primIndex) + setSelection(this, normalizeSelection(this.cm, out, primary), options) + }), + addSelection: docMethodOp(function(anchor, head, options) { + let ranges = this.sel.ranges.slice(0) + ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))) + setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options) + }), + + getSelection: function(lineSep) { + let ranges = this.sel.ranges, lines + for (let i = 0; i < ranges.length; i++) { + let sel = getBetween(this, ranges[i].from(), ranges[i].to()) + lines = lines ? lines.concat(sel) : sel + } + if (lineSep === false) return lines + else return lines.join(lineSep || this.lineSeparator()) + }, + getSelections: function(lineSep) { + let parts = [], ranges = this.sel.ranges + for (let i = 0; i < ranges.length; i++) { + let sel = getBetween(this, ranges[i].from(), ranges[i].to()) + if (lineSep !== false) sel = sel.join(lineSep || this.lineSeparator()) + parts[i] = sel + } + return parts + }, + replaceSelection: function(code, collapse, origin) { + let dup = [] + for (let i = 0; i < this.sel.ranges.length; i++) + dup[i] = code + this.replaceSelections(dup, collapse, origin || "+input") + }, + replaceSelections: docMethodOp(function(code, collapse, origin) { + let changes = [], sel = this.sel + for (let i = 0; i < sel.ranges.length; i++) { + let range = sel.ranges[i] + changes[i] = {from: range.from(), to: range.to(), text: this.splitLines(code[i]), origin: origin} + } + let newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse) + for (let i = changes.length - 1; i >= 0; i--) + makeChange(this, changes[i]) + if (newSel) setSelectionReplaceHistory(this, newSel) + else if (this.cm) ensureCursorVisible(this.cm) + }), + undo: docMethodOp(function() {makeChangeFromHistory(this, "undo")}), + redo: docMethodOp(function() {makeChangeFromHistory(this, "redo")}), + undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true)}), + redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true)}), + + setExtending: function(val) {this.extend = val}, + getExtending: function() {return this.extend}, + + historySize: function() { + let hist = this.history, done = 0, undone = 0 + for (let i = 0; i < hist.done.length; i++) if (!hist.done[i].ranges) ++done + for (let i = 0; i < hist.undone.length; i++) if (!hist.undone[i].ranges) ++undone + return {undo: done, redo: undone} + }, + clearHistory: function() { + this.history = new History(this.history) + linkedDocs(this, doc => doc.history = this.history, true) + }, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(true) + }, + changeGeneration: function(forceSplit) { + if (forceSplit) + this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null + return this.history.generation + }, + isClean: function (gen) { + return this.history.generation == (gen || this.cleanGeneration) + }, + + getHistory: function() { + return {done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone)} + }, + setHistory: function(histData) { + let hist = this.history = new History(this.history) + hist.done = copyHistoryArray(histData.done.slice(0), null, true) + hist.undone = copyHistoryArray(histData.undone.slice(0), null, true) + }, + + setGutterMarker: docMethodOp(function(line, gutterID, value) { + return changeLine(this, line, "gutter", line => { + let markers = line.gutterMarkers || (line.gutterMarkers = {}) + markers[gutterID] = value + if (!value && isEmpty(markers)) line.gutterMarkers = null + return true + }) + }), + + clearGutter: docMethodOp(function(gutterID) { + this.iter(line => { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + changeLine(this, line, "gutter", () => { + line.gutterMarkers[gutterID] = null + if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null + return true + }) + } + }) + }), + + lineInfo: function(line) { + let n + if (typeof line == "number") { + if (!isLine(this, line)) return null + n = line + line = getLine(this, line) + if (!line) return null + } else { + n = lineNo(line) + if (n == null) return null + } + return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, + textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, + widgets: line.widgets} + }, + + addLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", line => { + let prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass" + if (!line[prop]) line[prop] = cls + else if (classTest(cls).test(line[prop])) return false + else line[prop] += " " + cls + return true + }) + }), + removeLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", line => { + let prop = where == "text" ? "textClass" + : where == "background" ? "bgClass" + : where == "gutter" ? "gutterClass" : "wrapClass" + let cur = line[prop] + if (!cur) return false + else if (cls == null) line[prop] = null + else { + let found = cur.match(classTest(cls)) + if (!found) return false + let end = found.index + found[0].length + line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null + } + return true + }) + }), + + addLineWidget: docMethodOp(function(handle, node, options) { + return addLineWidget(this, handle, node, options) + }), + removeLineWidget: function(widget) { widget.clear() }, + + markText: function(from, to, options) { + return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range") + }, + setBookmark: function(pos, options) { + let realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft, + clearWhenEmpty: false, shared: options && options.shared, + handleMouseEvents: options && options.handleMouseEvents} + pos = clipPos(this, pos) + return markText(this, pos, pos, realOpts, "bookmark") + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos) + let markers = [], spans = getLine(this, pos.line).markedSpans + if (spans) for (let i = 0; i < spans.length; ++i) { + let span = spans[i] + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) + markers.push(span.marker.parent || span.marker) + } + return markers + }, + findMarks: function(from, to, filter) { + from = clipPos(this, from); to = clipPos(this, to) + let found = [], lineNo = from.line + this.iter(from.line, to.line + 1, line => { + let spans = line.markedSpans + if (spans) for (let i = 0; i < spans.length; i++) { + let span = spans[i] + if (!(span.to != null && lineNo == from.line && from.ch >= span.to || + span.from == null && lineNo != from.line || + span.from != null && lineNo == to.line && span.from >= to.ch) && + (!filter || filter(span.marker))) + found.push(span.marker.parent || span.marker) + } + ++lineNo + }) + return found + }, + getAllMarks: function() { + let markers = [] + this.iter(line => { + let sps = line.markedSpans + if (sps) for (let i = 0; i < sps.length; ++i) + if (sps[i].from != null) markers.push(sps[i].marker) + }) + return markers + }, + + posFromIndex: function(off) { + let ch, lineNo = this.first, sepSize = this.lineSeparator().length + this.iter(line => { + let sz = line.text.length + sepSize + if (sz > off) { ch = off; return true } + off -= sz + ++lineNo + }) + return clipPos(this, Pos(lineNo, ch)) + }, + indexFromPos: function (coords) { + coords = clipPos(this, coords) + let index = coords.ch + if (coords.line < this.first || coords.ch < 0) return 0 + let sepSize = this.lineSeparator().length + this.iter(this.first, coords.line, line => { // iter aborts when callback returns a truthy value + index += line.text.length + sepSize + }) + return index + }, + + copy: function(copyHistory) { + let doc = new Doc(getLines(this, this.first, this.first + this.size), + this.modeOption, this.first, this.lineSep, this.direction) + doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft + doc.sel = this.sel + doc.extend = false + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth + doc.setHistory(this.getHistory()) + } + return doc + }, + + linkedDoc: function(options) { + if (!options) options = {} + let from = this.first, to = this.first + this.size + if (options.from != null && options.from > from) from = options.from + if (options.to != null && options.to < to) to = options.to + let copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction) + if (options.sharedHist) copy.history = this.history + ;(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}) + copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}] + copySharedMarkers(copy, findSharedMarkers(this)) + return copy + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) other = other.doc + if (this.linked) for (let i = 0; i < this.linked.length; ++i) { + let link = this.linked[i] + if (link.doc != other) continue + this.linked.splice(i, 1) + other.unlinkDoc(this) + detachSharedMarkers(findSharedMarkers(this)) + break + } + // If the histories were shared, split them again + if (other.history == this.history) { + let splitIds = [other.id] + linkedDocs(other, doc => splitIds.push(doc.id), true) + other.history = new History(null) + other.history.done = copyHistoryArray(this.history.done, splitIds) + other.history.undone = copyHistoryArray(this.history.undone, splitIds) + } + }, + iterLinkedDocs: function(f) {linkedDocs(this, f)}, + + getMode: function() {return this.mode}, + getEditor: function() {return this.cm}, + + splitLines: function(str) { + if (this.lineSep) return str.split(this.lineSep) + return splitLinesAuto(str) + }, + lineSeparator: function() { return this.lineSep || "\n" }, + + setDirection: docMethodOp(function (dir) { + if (dir != "rtl") dir = "ltr" + if (dir == this.direction) return + this.direction = dir + this.iter(line => line.order = null) + if (this.cm) directionChanged(this.cm) + }) +}) + +// Public alias. +Doc.prototype.eachLine = Doc.prototype.iter + +export default Doc diff --git a/js/codemirror/src/model/change_measurement.js b/js/codemirror/src/model/change_measurement.js new file mode 100644 index 0000000..010e7f8 --- /dev/null +++ b/js/codemirror/src/model/change_measurement.js @@ -0,0 +1,61 @@ +import { cmp, Pos } from "../line/pos.js" +import { lst } from "../util/misc.js" + +import { normalizeSelection, Range, Selection } from "./selection.js" + +// Compute the position of the end of a change (its 'to' property +// refers to the pre-change end). +export function changeEnd(change) { + if (!change.text) return change.to + return Pos(change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)) +} + +// Adjust a position to refer to the post-change position of the +// same text, or the end of the change if the change covers it. +function adjustForChange(pos, change) { + if (cmp(pos, change.from) < 0) return pos + if (cmp(pos, change.to) <= 0) return changeEnd(change) + + let line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch + if (pos.line == change.to.line) ch += changeEnd(change).ch - change.to.ch + return Pos(line, ch) +} + +export function computeSelAfterChange(doc, change) { + let out = [] + for (let i = 0; i < doc.sel.ranges.length; i++) { + let range = doc.sel.ranges[i] + out.push(new Range(adjustForChange(range.anchor, change), + adjustForChange(range.head, change))) + } + return normalizeSelection(doc.cm, out, doc.sel.primIndex) +} + +function offsetPos(pos, old, nw) { + if (pos.line == old.line) + return Pos(nw.line, pos.ch - old.ch + nw.ch) + else + return Pos(nw.line + (pos.line - old.line), pos.ch) +} + +// Used by replaceSelections to allow moving the selection to the +// start or around the replaced test. Hint may be "start" or "around". +export function computeReplacedSel(doc, changes, hint) { + let out = [] + let oldPrev = Pos(doc.first, 0), newPrev = oldPrev + for (let i = 0; i < changes.length; i++) { + let change = changes[i] + let from = offsetPos(change.from, oldPrev, newPrev) + let to = offsetPos(changeEnd(change), oldPrev, newPrev) + oldPrev = change.to + newPrev = to + if (hint == "around") { + let range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0 + out[i] = new Range(inv ? to : from, inv ? from : to) + } else { + out[i] = new Range(from, from) + } + } + return new Selection(out, doc.sel.primIndex) +} diff --git a/js/codemirror/src/model/changes.js b/js/codemirror/src/model/changes.js new file mode 100644 index 0000000..48d2f6b --- /dev/null +++ b/js/codemirror/src/model/changes.js @@ -0,0 +1,339 @@ +import { retreatFrontier } from "../line/highlight.js" +import { startWorker } from "../display/highlight_worker.js" +import { operation } from "../display/operations.js" +import { regChange, regLineChange } from "../display/view_tracking.js" +import { clipLine, clipPos, cmp, Pos } from "../line/pos.js" +import { sawReadOnlySpans } from "../line/saw_special_spans.js" +import { lineLength, removeReadOnlyRanges, stretchSpansOverChange, visualLine } from "../line/spans.js" +import { getBetween, getLine, lineNo } from "../line/utils_line.js" +import { estimateHeight } from "../measurement/position_measurement.js" +import { hasHandler, signal, signalCursorActivity } from "../util/event.js" +import { indexOf, lst, map, sel_dontScroll } from "../util/misc.js" +import { signalLater } from "../util/operation_group.js" + +import { changeEnd, computeSelAfterChange } from "./change_measurement.js" +import { isWholeLineUpdate, linkedDocs, updateDoc } from "./document_data.js" +import { addChangeToHistory, historyChangeFromChange, mergeOldSpans, pushSelectionToHistory } from "./history.js" +import { Range, Selection } from "./selection.js" +import { setSelection, setSelectionNoUndo, skipAtomic } from "./selection_updates.js" + +// UPDATING + +// Allow "beforeChange" event handlers to influence a change +function filterChange(doc, change, update) { + let obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: () => obj.canceled = true + } + if (update) obj.update = (from, to, text, origin) => { + if (from) obj.from = clipPos(doc, from) + if (to) obj.to = clipPos(doc, to) + if (text) obj.text = text + if (origin !== undefined) obj.origin = origin + } + signal(doc, "beforeChange", doc, obj) + if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj) + + if (obj.canceled) { + if (doc.cm) doc.cm.curOp.updateInput = 2 + return null + } + return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin} +} + +// Apply a change to a document, and add it to the document's +// history, and propagating it to all linked documents. +export function makeChange(doc, change, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) + if (doc.cm.state.suppressEdits) return + } + + if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { + change = filterChange(doc, change, true) + if (!change) return + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + let split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to) + if (split) { + for (let i = split.length - 1; i >= 0; --i) + makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}) + } else { + makeChangeInner(doc, change) + } +} + +function makeChangeInner(doc, change) { + if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) return + let selAfter = computeSelAfterChange(doc, change) + addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN) + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)) + let rebased = [] + + linkedDocs(doc, (doc, sharedHist) => { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change) + rebased.push(doc.history) + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)) + }) +} + +// Revert a change stored in a document's history. +export function makeChangeFromHistory(doc, type, allowSelectionOnly) { + let suppress = doc.cm && doc.cm.state.suppressEdits + if (suppress && !allowSelectionOnly) return + + let hist = doc.history, event, selAfter = doc.sel + let source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done + + // Verify that there is a useable event (so that ctrl-z won't + // needlessly clear selection events) + let i = 0 + for (; i < source.length; i++) { + event = source[i] + if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) + break + } + if (i == source.length) return + hist.lastOrigin = hist.lastSelOrigin = null + + for (;;) { + event = source.pop() + if (event.ranges) { + pushSelectionToHistory(event, dest) + if (allowSelectionOnly && !event.equals(doc.sel)) { + setSelection(doc, event, {clearRedo: false}) + return + } + selAfter = event + } else if (suppress) { + source.push(event) + return + } else break + } + + // Build up a reverse change object to add to the opposite history + // stack (redo when undoing, and vice versa). + let antiChanges = [] + pushSelectionToHistory(selAfter, dest) + dest.push({changes: antiChanges, generation: hist.generation}) + hist.generation = event.generation || ++hist.maxGeneration + + let filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange") + + for (let i = event.changes.length - 1; i >= 0; --i) { + let change = event.changes[i] + change.origin = type + if (filter && !filterChange(doc, change, false)) { + source.length = 0 + return + } + + antiChanges.push(historyChangeFromChange(doc, change)) + + let after = i ? computeSelAfterChange(doc, change) : lst(source) + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)) + if (!i && doc.cm) doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}) + let rebased = [] + + // Propagate to the linked documents + linkedDocs(doc, (doc, sharedHist) => { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change) + rebased.push(doc.history) + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)) + }) + } +} + +// Sub-views need their line numbers shifted when text is added +// above or below them in the parent document. +function shiftDoc(doc, distance) { + if (distance == 0) return + doc.first += distance + doc.sel = new Selection(map(doc.sel.ranges, range => new Range( + Pos(range.anchor.line + distance, range.anchor.ch), + Pos(range.head.line + distance, range.head.ch) + )), doc.sel.primIndex) + if (doc.cm) { + regChange(doc.cm, doc.first, doc.first - distance, distance) + for (let d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) + regLineChange(doc.cm, l, "gutter") + } +} + +// More lower-level change function, handling only a single document +// (not linked ones). +function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) + return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)) + return + } + if (change.from.line > doc.lastLine()) return + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + let shift = change.text.length - 1 - (doc.first - change.from.line) + shiftDoc(doc, shift) + change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], origin: change.origin} + } + let last = doc.lastLine() + if (change.to.line > last) { + change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], origin: change.origin} + } + + change.removed = getBetween(doc, change.from, change.to) + + if (!selAfter) selAfter = computeSelAfterChange(doc, change) + if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans) + else updateDoc(doc, change, spans) + setSelectionNoUndo(doc, selAfter, sel_dontScroll) + + if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0))) + doc.cantEdit = false +} + +// Handle the interaction of a change to a document with the editor +// that this document is part of. +function makeChangeSingleDocInEditor(cm, change, spans) { + let doc = cm.doc, display = cm.display, from = change.from, to = change.to + + let recomputeMaxLength = false, checkWidthStart = from.line + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(getLine(doc, from.line))) + doc.iter(checkWidthStart, to.line + 1, line => { + if (line == display.maxLine) { + recomputeMaxLength = true + return true + } + }) + } + + if (doc.sel.contains(change.from, change.to) > -1) + signalCursorActivity(cm) + + updateDoc(doc, change, spans, estimateHeight(cm)) + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, line => { + let len = lineLength(line) + if (len > display.maxLineLength) { + display.maxLine = line + display.maxLineLength = len + display.maxLineChanged = true + recomputeMaxLength = false + } + }) + if (recomputeMaxLength) cm.curOp.updateMaxLine = true + } + + retreatFrontier(doc, from.line) + startWorker(cm, 400) + + let lendiff = change.text.length - (to.line - from.line) - 1 + // Remember that these lines changed, for updating the display + if (change.full) + regChange(cm) + else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change)) + regLineChange(cm, from.line, "text") + else + regChange(cm, from.line, to.line + 1, lendiff) + + let changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change") + if (changeHandler || changesHandler) { + let obj = { + from: from, to: to, + text: change.text, + removed: change.removed, + origin: change.origin + } + if (changeHandler) signalLater(cm, "change", cm, obj) + if (changesHandler) (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj) + } + cm.display.selForContextMenu = null +} + +export function replaceRange(doc, code, from, to, origin) { + if (!to) to = from + if (cmp(to, from) < 0) [from, to] = [to, from] + if (typeof code == "string") code = doc.splitLines(code) + makeChange(doc, {from, to, text: code, origin}) +} + +// Rebasing/resetting history to deal with externally-sourced changes + +function rebaseHistSelSingle(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff + } else if (from < pos.line) { + pos.line = from + pos.ch = 0 + } +} + +// Tries to rebase an array of history events given a change in the +// document. If the change touches the same lines as the event, the +// event, and everything 'behind' it, is discarded. If the change is +// before the event, the event's positions are updated. Uses a +// copy-on-write scheme for the positions, to avoid having to +// reallocate them all on every rebase, but also avoid problems with +// shared position objects being unsafely updated. +function rebaseHistArray(array, from, to, diff) { + for (let i = 0; i < array.length; ++i) { + let sub = array[i], ok = true + if (sub.ranges) { + if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true } + for (let j = 0; j < sub.ranges.length; j++) { + rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff) + rebaseHistSelSingle(sub.ranges[j].head, from, to, diff) + } + continue + } + for (let j = 0; j < sub.changes.length; ++j) { + let cur = sub.changes[j] + if (to < cur.from.line) { + cur.from = Pos(cur.from.line + diff, cur.from.ch) + cur.to = Pos(cur.to.line + diff, cur.to.ch) + } else if (from <= cur.to.line) { + ok = false + break + } + } + if (!ok) { + array.splice(0, i + 1) + i = 0 + } + } +} + +function rebaseHist(hist, change) { + let from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1 + rebaseHistArray(hist.done, from, to, diff) + rebaseHistArray(hist.undone, from, to, diff) +} + +// Utility for applying a change to a line by handle or number, +// returning the number and optionally registering the line as +// changed. +export function changeLine(doc, handle, changeType, op) { + let no = handle, line = handle + if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)) + else no = lineNo(handle) + if (no == null) return null + if (op(line, no) && doc.cm) regLineChange(doc.cm, no, changeType) + return line +} diff --git a/js/codemirror/src/model/chunk.js b/js/codemirror/src/model/chunk.js new file mode 100644 index 0000000..d82716d --- /dev/null +++ b/js/codemirror/src/model/chunk.js @@ -0,0 +1,167 @@ +import { cleanUpLine } from "../line/line_data.js" +import { indexOf } from "../util/misc.js" +import { signalLater } from "../util/operation_group.js" + +// The document is represented as a BTree consisting of leaves, with +// chunk of lines in them, and branches, with up to ten leaves or +// other branch nodes below them. The top node is always a branch +// node, and is the document object itself (meaning it has +// additional methods and properties). +// +// All nodes have parent links. The tree is used both to go from +// line numbers to line objects, and to go from objects to numbers. +// It also indexes by height, and is used to convert between height +// and line object, and to find the total height of the document. +// +// See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html + +export function LeafChunk(lines) { + this.lines = lines + this.parent = null + let height = 0 + for (let i = 0; i < lines.length; ++i) { + lines[i].parent = this + height += lines[i].height + } + this.height = height +} + +LeafChunk.prototype = { + chunkSize() { return this.lines.length }, + + // Remove the n lines at offset 'at'. + removeInner(at, n) { + for (let i = at, e = at + n; i < e; ++i) { + let line = this.lines[i] + this.height -= line.height + cleanUpLine(line) + signalLater(line, "delete") + } + this.lines.splice(at, n) + }, + + // Helper used to collapse a small branch into a single leaf. + collapse(lines) { + lines.push.apply(lines, this.lines) + }, + + // Insert the given array of lines at offset 'at', count them as + // having the given height. + insertInner(at, lines, height) { + this.height += height + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)) + for (let i = 0; i < lines.length; ++i) lines[i].parent = this + }, + + // Used to iterate over a part of the tree. + iterN(at, n, op) { + for (let e = at + n; at < e; ++at) + if (op(this.lines[at])) return true + } +} + +export function BranchChunk(children) { + this.children = children + let size = 0, height = 0 + for (let i = 0; i < children.length; ++i) { + let ch = children[i] + size += ch.chunkSize(); height += ch.height + ch.parent = this + } + this.size = size + this.height = height + this.parent = null +} + +BranchChunk.prototype = { + chunkSize() { return this.size }, + + removeInner(at, n) { + this.size -= n + for (let i = 0; i < this.children.length; ++i) { + let child = this.children[i], sz = child.chunkSize() + if (at < sz) { + let rm = Math.min(n, sz - at), oldHeight = child.height + child.removeInner(at, rm) + this.height -= oldHeight - child.height + if (sz == rm) { this.children.splice(i--, 1); child.parent = null } + if ((n -= rm) == 0) break + at = 0 + } else at -= sz + } + // If the result is smaller than 25 lines, ensure that it is a + // single leaf node. + if (this.size - n < 25 && + (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) { + let lines = [] + this.collapse(lines) + this.children = [new LeafChunk(lines)] + this.children[0].parent = this + } + }, + + collapse(lines) { + for (let i = 0; i < this.children.length; ++i) this.children[i].collapse(lines) + }, + + insertInner(at, lines, height) { + this.size += lines.length + this.height += height + for (let i = 0; i < this.children.length; ++i) { + let child = this.children[i], sz = child.chunkSize() + if (at <= sz) { + child.insertInner(at, lines, height) + if (child.lines && child.lines.length > 50) { + // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced. + // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest. + let remaining = child.lines.length % 25 + 25 + for (let pos = remaining; pos < child.lines.length;) { + let leaf = new LeafChunk(child.lines.slice(pos, pos += 25)) + child.height -= leaf.height + this.children.splice(++i, 0, leaf) + leaf.parent = this + } + child.lines = child.lines.slice(0, remaining) + this.maybeSpill() + } + break + } + at -= sz + } + }, + + // When a node has grown, check whether it should be split. + maybeSpill() { + if (this.children.length <= 10) return + let me = this + do { + let spilled = me.children.splice(me.children.length - 5, 5) + let sibling = new BranchChunk(spilled) + if (!me.parent) { // Become the parent node + let copy = new BranchChunk(me.children) + copy.parent = me + me.children = [copy, sibling] + me = copy + } else { + me.size -= sibling.size + me.height -= sibling.height + let myIndex = indexOf(me.parent.children, me) + me.parent.children.splice(myIndex + 1, 0, sibling) + } + sibling.parent = me.parent + } while (me.children.length > 10) + me.parent.maybeSpill() + }, + + iterN(at, n, op) { + for (let i = 0; i < this.children.length; ++i) { + let child = this.children[i], sz = child.chunkSize() + if (at < sz) { + let used = Math.min(n, sz - at) + if (child.iterN(at, used, op)) return true + if ((n -= used) == 0) break + at = 0 + } else at -= sz + } + } +} diff --git a/js/codemirror/src/model/document_data.js b/js/codemirror/src/model/document_data.js new file mode 100644 index 0000000..c420482 --- /dev/null +++ b/js/codemirror/src/model/document_data.js @@ -0,0 +1,112 @@ +import { loadMode } from "../display/mode_state.js" +import { runInOp } from "../display/operations.js" +import { regChange } from "../display/view_tracking.js" +import { Line, updateLine } from "../line/line_data.js" +import { findMaxLine } from "../line/spans.js" +import { getLine } from "../line/utils_line.js" +import { estimateLineHeights } from "../measurement/position_measurement.js" +import { addClass, rmClass } from "../util/dom.js" +import { lst } from "../util/misc.js" +import { signalLater } from "../util/operation_group.js" + +// DOCUMENT DATA STRUCTURE + +// By default, updates that start and end at the beginning of a line +// are treated specially, in order to make the association of line +// widgets and marker elements with the text behave more intuitive. +export function isWholeLineUpdate(doc, change) { + return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore) +} + +// Perform a change on the document data structure. +export function updateDoc(doc, change, markedSpans, estimateHeight) { + function spansFor(n) {return markedSpans ? markedSpans[n] : null} + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight) + signalLater(line, "change", line, change) + } + function linesFor(start, end) { + let result = [] + for (let i = start; i < end; ++i) + result.push(new Line(text[i], spansFor(i), estimateHeight)) + return result + } + + let from = change.from, to = change.to, text = change.text + let firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line) + let lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line + + // Adjust the line structure + if (change.full) { + doc.insert(0, linesFor(0, text.length)) + doc.remove(text.length, doc.size - text.length) + } else if (isWholeLineUpdate(doc, change)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + let added = linesFor(0, text.length - 1) + update(lastLine, lastLine.text, lastSpans) + if (nlines) doc.remove(from.line, nlines) + if (added.length) doc.insert(from.line, added) + } else if (firstLine == lastLine) { + if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans) + } else { + let added = linesFor(1, text.length - 1) + added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)) + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)) + doc.insert(from.line + 1, added) + } + } else if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)) + doc.remove(from.line + 1, nlines) + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)) + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans) + let added = linesFor(1, text.length - 1) + if (nlines > 1) doc.remove(from.line + 1, nlines - 1) + doc.insert(from.line + 1, added) + } + + signalLater(doc, "change", doc, change) +} + +// Call f for all linked documents. +export function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) for (let i = 0; i < doc.linked.length; ++i) { + let rel = doc.linked[i] + if (rel.doc == skip) continue + let shared = sharedHist && rel.sharedHist + if (sharedHistOnly && !shared) continue + f(rel.doc, shared) + propagate(rel.doc, doc, shared) + } + } + propagate(doc, null, true) +} + +// Attach a document to an editor. +export function attachDoc(cm, doc) { + if (doc.cm) throw new Error("This document is already in use.") + cm.doc = doc + doc.cm = cm + estimateLineHeights(cm) + loadMode(cm) + setDirectionClass(cm) + cm.options.direction = doc.direction + if (!cm.options.lineWrapping) findMaxLine(cm) + cm.options.mode = doc.modeOption + regChange(cm) +} + +function setDirectionClass(cm) { + ;(cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl") +} + +export function directionChanged(cm) { + runInOp(cm, () => { + setDirectionClass(cm) + regChange(cm) + }) +} diff --git a/js/codemirror/src/model/history.js b/js/codemirror/src/model/history.js new file mode 100644 index 0000000..a5bfbb3 --- /dev/null +++ b/js/codemirror/src/model/history.js @@ -0,0 +1,228 @@ +import { cmp, copyPos } from "../line/pos.js" +import { stretchSpansOverChange } from "../line/spans.js" +import { getBetween } from "../line/utils_line.js" +import { signal } from "../util/event.js" +import { indexOf, lst } from "../util/misc.js" + +import { changeEnd } from "./change_measurement.js" +import { linkedDocs } from "./document_data.js" +import { Selection } from "./selection.js" + +export function History(prev) { + // Arrays of change events and selections. Doing something adds an + // event to done and clears undo. Undoing moves events from done + // to undone, redoing moves them in the other direction. + this.done = []; this.undone = [] + this.undoDepth = prev ? prev.undoDepth : Infinity + // Used to track when changes can be merged into a single undo + // event + this.lastModTime = this.lastSelTime = 0 + this.lastOp = this.lastSelOp = null + this.lastOrigin = this.lastSelOrigin = null + // Used by the isClean() method + this.generation = this.maxGeneration = prev ? prev.maxGeneration : 1 +} + +// Create a history change event from an updateDoc-style change +// object. +export function historyChangeFromChange(doc, change) { + let histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)} + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1) + linkedDocs(doc, doc => attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1), true) + return histChange +} + +// Pop all selection events off the end of a history array. Stop at +// a change event. +function clearSelectionEvents(array) { + while (array.length) { + let last = lst(array) + if (last.ranges) array.pop() + else break + } +} + +// Find the top change event in the history. Pop off selection +// events that are in the way. +function lastChangeEvent(hist, force) { + if (force) { + clearSelectionEvents(hist.done) + return lst(hist.done) + } else if (hist.done.length && !lst(hist.done).ranges) { + return lst(hist.done) + } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { + hist.done.pop() + return lst(hist.done) + } +} + +// Register a change in the history. Merges changes that are within +// a single operation, or are close together with an origin that +// allows merging (starting with "+") into a single event. +export function addChangeToHistory(doc, change, selAfter, opId) { + let hist = doc.history + hist.undone.length = 0 + let time = +new Date, cur + let last + + if ((hist.lastOp == opId || + hist.lastOrigin == change.origin && change.origin && + ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) || + change.origin.charAt(0) == "*")) && + (cur = lastChangeEvent(hist, hist.lastOp == opId))) { + // Merge this change into the last event + last = lst(cur.changes) + if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change) + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)) + } + } else { + // Can not be merged, start a new event. + let before = lst(hist.done) + if (!before || !before.ranges) + pushSelectionToHistory(doc.sel, hist.done) + cur = {changes: [historyChangeFromChange(doc, change)], + generation: hist.generation} + hist.done.push(cur) + while (hist.done.length > hist.undoDepth) { + hist.done.shift() + if (!hist.done[0].ranges) hist.done.shift() + } + } + hist.done.push(selAfter) + hist.generation = ++hist.maxGeneration + hist.lastModTime = hist.lastSelTime = time + hist.lastOp = hist.lastSelOp = opId + hist.lastOrigin = hist.lastSelOrigin = change.origin + + if (!last) signal(doc, "historyAdded") +} + +function selectionEventCanBeMerged(doc, origin, prev, sel) { + let ch = origin.charAt(0) + return ch == "*" || + ch == "+" && + prev.ranges.length == sel.ranges.length && + prev.somethingSelected() == sel.somethingSelected() && + new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500) +} + +// Called whenever the selection changes, sets the new selection as +// the pending selection in the history, and pushes the old pending +// selection into the 'done' array when it was significantly +// different (in number of selected ranges, emptiness, or time). +export function addSelectionToHistory(doc, sel, opId, options) { + let hist = doc.history, origin = options && options.origin + + // A new event is started when the previous origin does not match + // the current, or the origins don't allow matching. Origins + // starting with * are always merged, those starting with + are + // merged when similar and close together in time. + if (opId == hist.lastSelOp || + (origin && hist.lastSelOrigin == origin && + (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin || + selectionEventCanBeMerged(doc, origin, lst(hist.done), sel)))) + hist.done[hist.done.length - 1] = sel + else + pushSelectionToHistory(sel, hist.done) + + hist.lastSelTime = +new Date + hist.lastSelOrigin = origin + hist.lastSelOp = opId + if (options && options.clearRedo !== false) + clearSelectionEvents(hist.undone) +} + +export function pushSelectionToHistory(sel, dest) { + let top = lst(dest) + if (!(top && top.ranges && top.equals(sel))) + dest.push(sel) +} + +// Used to store marked span information in the history. +function attachLocalSpans(doc, change, from, to) { + let existing = change["spans_" + doc.id], n = 0 + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), line => { + if (line.markedSpans) + (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans + ++n + }) +} + +// When un/re-doing restores text containing marked spans, those +// that have been explicitly cleared should not be restored. +function removeClearedSpans(spans) { + if (!spans) return null + let out + for (let i = 0; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i) } + else if (out) out.push(spans[i]) + } + return !out ? spans : out.length ? out : null +} + +// Retrieve and filter the old marked spans stored in a change event. +function getOldSpans(doc, change) { + let found = change["spans_" + doc.id] + if (!found) return null + let nw = [] + for (let i = 0; i < change.text.length; ++i) + nw.push(removeClearedSpans(found[i])) + return nw +} + +// Used for un/re-doing changes from the history. Combines the +// result of computing the existing spans with the set of spans that +// existed in the history (so that deleting around a span and then +// undoing brings back the span). +export function mergeOldSpans(doc, change) { + let old = getOldSpans(doc, change) + let stretched = stretchSpansOverChange(doc, change) + if (!old) return stretched + if (!stretched) return old + + for (let i = 0; i < old.length; ++i) { + let oldCur = old[i], stretchCur = stretched[i] + if (oldCur && stretchCur) { + spans: for (let j = 0; j < stretchCur.length; ++j) { + let span = stretchCur[j] + for (let k = 0; k < oldCur.length; ++k) + if (oldCur[k].marker == span.marker) continue spans + oldCur.push(span) + } + } else if (stretchCur) { + old[i] = stretchCur + } + } + return old +} + +// Used both to provide a JSON-safe object in .getHistory, and, when +// detaching a document, to split the history in two +export function copyHistoryArray(events, newGroup, instantiateSel) { + let copy = [] + for (let i = 0; i < events.length; ++i) { + let event = events[i] + if (event.ranges) { + copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event) + continue + } + let changes = event.changes, newChanges = [] + copy.push({changes: newChanges}) + for (let j = 0; j < changes.length; ++j) { + let change = changes[j], m + newChanges.push({from: change.from, to: change.to, text: change.text}) + if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop] + delete change[prop] + } + } + } + } + return copy +} diff --git a/js/codemirror/src/model/line_widget.js b/js/codemirror/src/model/line_widget.js new file mode 100644 index 0000000..f94727e --- /dev/null +++ b/js/codemirror/src/model/line_widget.js @@ -0,0 +1,78 @@ +import { runInOp } from "../display/operations.js" +import { addToScrollTop } from "../display/scrolling.js" +import { regLineChange } from "../display/view_tracking.js" +import { heightAtLine, lineIsHidden } from "../line/spans.js" +import { lineNo, updateLineHeight } from "../line/utils_line.js" +import { widgetHeight } from "../measurement/widgets.js" +import { changeLine } from "./changes.js" +import { eventMixin } from "../util/event.js" +import { signalLater } from "../util/operation_group.js" + +// Line widgets are block elements displayed above or below a line. + +export class LineWidget { + constructor(doc, node, options) { + if (options) for (let opt in options) if (options.hasOwnProperty(opt)) + this[opt] = options[opt] + this.doc = doc + this.node = node + } + + clear() { + let cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line) + if (no == null || !ws) return + for (let i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1) + if (!ws.length) line.widgets = null + let height = widgetHeight(this) + updateLineHeight(line, Math.max(0, line.height - height)) + if (cm) { + runInOp(cm, () => { + adjustScrollWhenAboveVisible(cm, line, -height) + regLineChange(cm, no, "widget") + }) + signalLater(cm, "lineWidgetCleared", cm, this, no) + } + } + + changed() { + let oldH = this.height, cm = this.doc.cm, line = this.line + this.height = null + let diff = widgetHeight(this) - oldH + if (!diff) return + if (!lineIsHidden(this.doc, line)) updateLineHeight(line, line.height + diff) + if (cm) { + runInOp(cm, () => { + cm.curOp.forceUpdate = true + adjustScrollWhenAboveVisible(cm, line, diff) + signalLater(cm, "lineWidgetChanged", cm, this, lineNo(line)) + }) + } + } +} +eventMixin(LineWidget) + +function adjustScrollWhenAboveVisible(cm, line, diff) { + if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) + addToScrollTop(cm, diff) +} + +export function addLineWidget(doc, handle, node, options) { + let widget = new LineWidget(doc, node, options) + let cm = doc.cm + if (cm && widget.noHScroll) cm.display.alignWidgets = true + changeLine(doc, handle, "widget", line => { + let widgets = line.widgets || (line.widgets = []) + if (widget.insertAt == null) widgets.push(widget) + else widgets.splice(Math.min(widgets.length, Math.max(0, widget.insertAt)), 0, widget) + widget.line = line + if (cm && !lineIsHidden(doc, line)) { + let aboveVisible = heightAtLine(line) < doc.scrollTop + updateLineHeight(line, line.height + widgetHeight(widget)) + if (aboveVisible) addToScrollTop(cm, widget.height) + cm.curOp.forceUpdate = true + } + return true + }) + if (cm) signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)) + return widget +} diff --git a/js/codemirror/src/model/mark_text.js b/js/codemirror/src/model/mark_text.js new file mode 100644 index 0000000..64d40d2 --- /dev/null +++ b/js/codemirror/src/model/mark_text.js @@ -0,0 +1,293 @@ +import { eltP } from "../util/dom.js" +import { eventMixin, hasHandler, on } from "../util/event.js" +import { endOperation, operation, runInOp, startOperation } from "../display/operations.js" +import { clipPos, cmp, Pos } from "../line/pos.js" +import { lineNo, updateLineHeight } from "../line/utils_line.js" +import { clearLineMeasurementCacheFor, findViewForLine, textHeight } from "../measurement/position_measurement.js" +import { seeReadOnlySpans, seeCollapsedSpans } from "../line/saw_special_spans.js" +import { addMarkedSpan, conflictingCollapsedRange, getMarkedSpanFor, lineIsHidden, lineLength, MarkedSpan, removeMarkedSpan, visualLine } from "../line/spans.js" +import { copyObj, indexOf, lst } from "../util/misc.js" +import { signalLater } from "../util/operation_group.js" +import { widgetHeight } from "../measurement/widgets.js" +import { regChange, regLineChange } from "../display/view_tracking.js" + +import { linkedDocs } from "./document_data.js" +import { addChangeToHistory } from "./history.js" +import { reCheckSelection } from "./selection_updates.js" + +// TEXTMARKERS + +// Created with markText and setBookmark methods. A TextMarker is a +// handle that can be used to clear or find a marked position in the +// document. Line objects hold arrays (markedSpans) containing +// {from, to, marker} object pointing to such marker objects, and +// indicating that such a marker is present on that line. Multiple +// lines may point to the same marker when it spans across lines. +// The spans will have null for their from/to properties when the +// marker continues beyond the start/end of the line. Markers have +// links back to the lines they currently touch. + +// Collapsed markers have unique ids, in order to be able to order +// them, which is needed for uniquely determining an outer marker +// when they overlap (they may nest, but not partially overlap). +let nextMarkerId = 0 + +export class TextMarker { + constructor(doc, type) { + this.lines = [] + this.type = type + this.doc = doc + this.id = ++nextMarkerId + } + + // Clear the marker. + clear() { + if (this.explicitlyCleared) return + let cm = this.doc.cm, withOp = cm && !cm.curOp + if (withOp) startOperation(cm) + if (hasHandler(this, "clear")) { + let found = this.find() + if (found) signalLater(this, "clear", found.from, found.to) + } + let min = null, max = null + for (let i = 0; i < this.lines.length; ++i) { + let line = this.lines[i] + let span = getMarkedSpanFor(line.markedSpans, this) + if (cm && !this.collapsed) regLineChange(cm, lineNo(line), "text") + else if (cm) { + if (span.to != null) max = lineNo(line) + if (span.from != null) min = lineNo(line) + } + line.markedSpans = removeMarkedSpan(line.markedSpans, span) + if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) + updateLineHeight(line, textHeight(cm.display)) + } + if (cm && this.collapsed && !cm.options.lineWrapping) for (let i = 0; i < this.lines.length; ++i) { + let visual = visualLine(this.lines[i]), len = lineLength(visual) + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual + cm.display.maxLineLength = len + cm.display.maxLineChanged = true + } + } + + if (min != null && cm && this.collapsed) regChange(cm, min, max + 1) + this.lines.length = 0 + this.explicitlyCleared = true + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false + if (cm) reCheckSelection(cm.doc) + } + if (cm) signalLater(cm, "markerCleared", cm, this, min, max) + if (withOp) endOperation(cm) + if (this.parent) this.parent.clear() + } + + // Find the position of the marker in the document. Returns a {from, + // to} object by default. Side can be passed to get a specific side + // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the + // Pos objects returned contain a line object, rather than a line + // number (used to prevent looking up the same line twice). + find(side, lineObj) { + if (side == null && this.type == "bookmark") side = 1 + let from, to + for (let i = 0; i < this.lines.length; ++i) { + let line = this.lines[i] + let span = getMarkedSpanFor(line.markedSpans, this) + if (span.from != null) { + from = Pos(lineObj ? line : lineNo(line), span.from) + if (side == -1) return from + } + if (span.to != null) { + to = Pos(lineObj ? line : lineNo(line), span.to) + if (side == 1) return to + } + } + return from && {from: from, to: to} + } + + // Signals that the marker's widget changed, and surrounding layout + // should be recomputed. + changed() { + let pos = this.find(-1, true), widget = this, cm = this.doc.cm + if (!pos || !cm) return + runInOp(cm, () => { + let line = pos.line, lineN = lineNo(pos.line) + let view = findViewForLine(cm, lineN) + if (view) { + clearLineMeasurementCacheFor(view) + cm.curOp.selectionChanged = cm.curOp.forceUpdate = true + } + cm.curOp.updateMaxLine = true + if (!lineIsHidden(widget.doc, line) && widget.height != null) { + let oldHeight = widget.height + widget.height = null + let dHeight = widgetHeight(widget) - oldHeight + if (dHeight) + updateLineHeight(line, line.height + dHeight) + } + signalLater(cm, "markerChanged", cm, this) + }) + } + + attachLine(line) { + if (!this.lines.length && this.doc.cm) { + let op = this.doc.cm.curOp + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) + (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this) + } + this.lines.push(line) + } + + detachLine(line) { + this.lines.splice(indexOf(this.lines, line), 1) + if (!this.lines.length && this.doc.cm) { + let op = this.doc.cm.curOp + ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this) + } + } +} +eventMixin(TextMarker) + +// Create a marker, wire it up to the right lines, and +export function markText(doc, from, to, options, type) { + // Shared markers (across linked documents) are handled separately + // (markTextShared will call out to this again, once per + // document). + if (options && options.shared) return markTextShared(doc, from, to, options, type) + // Ensure we are in an operation. + if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type) + + let marker = new TextMarker(doc, type), diff = cmp(from, to) + if (options) copyObj(options, marker, false) + // Don't connect empty markers unless clearWhenEmpty is false + if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false) + return marker + if (marker.replacedWith) { + // Showing up as a widget implies collapsed (widget replaces text) + marker.collapsed = true + marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget") + if (!options.handleMouseEvents) marker.widgetNode.setAttribute("cm-ignore-events", "true") + if (options.insertLeft) marker.widgetNode.insertLeft = true + } + if (marker.collapsed) { + if (conflictingCollapsedRange(doc, from.line, from, to, marker) || + from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) + throw new Error("Inserting collapsed marker partially overlapping an existing one") + seeCollapsedSpans() + } + + if (marker.addToHistory) + addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN) + + let curLine = from.line, cm = doc.cm, updateMaxLine + doc.iter(curLine, to.line + 1, line => { + if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine) + updateMaxLine = true + if (marker.collapsed && curLine != from.line) updateLineHeight(line, 0) + addMarkedSpan(line, new MarkedSpan(marker, + curLine == from.line ? from.ch : null, + curLine == to.line ? to.ch : null), doc.cm && doc.cm.curOp) + ++curLine + }) + // lineIsHidden depends on the presence of the spans, so needs a second pass + if (marker.collapsed) doc.iter(from.line, to.line + 1, line => { + if (lineIsHidden(doc, line)) updateLineHeight(line, 0) + }) + + if (marker.clearOnEnter) on(marker, "beforeCursorEnter", () => marker.clear()) + + if (marker.readOnly) { + seeReadOnlySpans() + if (doc.history.done.length || doc.history.undone.length) + doc.clearHistory() + } + if (marker.collapsed) { + marker.id = ++nextMarkerId + marker.atomic = true + } + if (cm) { + // Sync editor state + if (updateMaxLine) cm.curOp.updateMaxLine = true + if (marker.collapsed) + regChange(cm, from.line, to.line + 1) + else if (marker.className || marker.startStyle || marker.endStyle || marker.css || + marker.attributes || marker.title) + for (let i = from.line; i <= to.line; i++) regLineChange(cm, i, "text") + if (marker.atomic) reCheckSelection(cm.doc) + signalLater(cm, "markerAdded", cm, marker) + } + return marker +} + +// SHARED TEXTMARKERS + +// A shared marker spans multiple linked documents. It is +// implemented as a meta-marker-object controlling multiple normal +// markers. +export class SharedTextMarker { + constructor(markers, primary) { + this.markers = markers + this.primary = primary + for (let i = 0; i < markers.length; ++i) + markers[i].parent = this + } + + clear() { + if (this.explicitlyCleared) return + this.explicitlyCleared = true + for (let i = 0; i < this.markers.length; ++i) + this.markers[i].clear() + signalLater(this, "clear") + } + + find(side, lineObj) { + return this.primary.find(side, lineObj) + } +} +eventMixin(SharedTextMarker) + +function markTextShared(doc, from, to, options, type) { + options = copyObj(options) + options.shared = false + let markers = [markText(doc, from, to, options, type)], primary = markers[0] + let widget = options.widgetNode + linkedDocs(doc, doc => { + if (widget) options.widgetNode = widget.cloneNode(true) + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)) + for (let i = 0; i < doc.linked.length; ++i) + if (doc.linked[i].isParent) return + primary = lst(markers) + }) + return new SharedTextMarker(markers, primary) +} + +export function findSharedMarkers(doc) { + return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), m => m.parent) +} + +export function copySharedMarkers(doc, markers) { + for (let i = 0; i < markers.length; i++) { + let marker = markers[i], pos = marker.find() + let mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to) + if (cmp(mFrom, mTo)) { + let subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type) + marker.markers.push(subMark) + subMark.parent = marker + } + } +} + +export function detachSharedMarkers(markers) { + for (let i = 0; i < markers.length; i++) { + let marker = markers[i], linked = [marker.primary.doc] + linkedDocs(marker.primary.doc, d => linked.push(d)) + for (let j = 0; j < marker.markers.length; j++) { + let subMarker = marker.markers[j] + if (indexOf(linked, subMarker.doc) == -1) { + subMarker.parent = null + marker.markers.splice(j--, 1) + } + } + } +} diff --git a/js/codemirror/src/model/selection.js b/js/codemirror/src/model/selection.js new file mode 100644 index 0000000..793cb4c --- /dev/null +++ b/js/codemirror/src/model/selection.js @@ -0,0 +1,84 @@ +import { cmp, copyPos, equalCursorPos, maxPos, minPos } from "../line/pos.js" +import { indexOf } from "../util/misc.js" + +// Selection objects are immutable. A new one is created every time +// the selection changes. A selection is one or more non-overlapping +// (and non-touching) ranges, sorted, and an integer that indicates +// which one is the primary selection (the one that's scrolled into +// view, that getCursor returns, etc). +export class Selection { + constructor(ranges, primIndex) { + this.ranges = ranges + this.primIndex = primIndex + } + + primary() { return this.ranges[this.primIndex] } + + equals(other) { + if (other == this) return true + if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) return false + for (let i = 0; i < this.ranges.length; i++) { + let here = this.ranges[i], there = other.ranges[i] + if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) return false + } + return true + } + + deepCopy() { + let out = [] + for (let i = 0; i < this.ranges.length; i++) + out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)) + return new Selection(out, this.primIndex) + } + + somethingSelected() { + for (let i = 0; i < this.ranges.length; i++) + if (!this.ranges[i].empty()) return true + return false + } + + contains(pos, end) { + if (!end) end = pos + for (let i = 0; i < this.ranges.length; i++) { + let range = this.ranges[i] + if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) + return i + } + return -1 + } +} + +export class Range { + constructor(anchor, head) { + this.anchor = anchor; this.head = head + } + + from() { return minPos(this.anchor, this.head) } + to() { return maxPos(this.anchor, this.head) } + empty() { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch } +} + +// Take an unsorted, potentially overlapping set of ranges, and +// build a selection out of it. 'Consumes' ranges array (modifying +// it). +export function normalizeSelection(cm, ranges, primIndex) { + let mayTouch = cm && cm.options.selectionsMayTouch + let prim = ranges[primIndex] + ranges.sort((a, b) => cmp(a.from(), b.from())) + primIndex = indexOf(ranges, prim) + for (let i = 1; i < ranges.length; i++) { + let cur = ranges[i], prev = ranges[i - 1] + let diff = cmp(prev.to(), cur.from()) + if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) { + let from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to()) + let inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head + if (i <= primIndex) --primIndex + ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)) + } + } + return new Selection(ranges, primIndex) +} + +export function simpleSelection(anchor, head) { + return new Selection([new Range(anchor, head || anchor)], 0) +} diff --git a/js/codemirror/src/model/selection_updates.js b/js/codemirror/src/model/selection_updates.js new file mode 100644 index 0000000..8213949 --- /dev/null +++ b/js/codemirror/src/model/selection_updates.js @@ -0,0 +1,216 @@ +import { signalLater } from "../util/operation_group.js" +import { ensureCursorVisible } from "../display/scrolling.js" +import { clipPos, cmp, Pos } from "../line/pos.js" +import { getLine } from "../line/utils_line.js" +import { hasHandler, signal, signalCursorActivity } from "../util/event.js" +import { lst, sel_dontScroll } from "../util/misc.js" + +import { addSelectionToHistory } from "./history.js" +import { normalizeSelection, Range, Selection, simpleSelection } from "./selection.js" + +// The 'scroll' parameter given to many of these indicated whether +// the new cursor position should be scrolled into view after +// modifying the selection. + +// If shift is held or the extend flag is set, extends a range to +// include a given position (and optionally a second position). +// Otherwise, simply returns the range between the given positions. +// Used for cursor motion and such. +export function extendRange(range, head, other, extend) { + if (extend) { + let anchor = range.anchor + if (other) { + let posBefore = cmp(head, anchor) < 0 + if (posBefore != (cmp(other, anchor) < 0)) { + anchor = head + head = other + } else if (posBefore != (cmp(head, other) < 0)) { + head = other + } + } + return new Range(anchor, head) + } else { + return new Range(other || head, head) + } +} + +// Extend the primary selection range, discard the rest. +export function extendSelection(doc, head, other, options, extend) { + if (extend == null) extend = doc.cm && (doc.cm.display.shift || doc.extend) + setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options) +} + +// Extend all selections (pos is an array of selections with length +// equal the number of selections) +export function extendSelections(doc, heads, options) { + let out = [] + let extend = doc.cm && (doc.cm.display.shift || doc.extend) + for (let i = 0; i < doc.sel.ranges.length; i++) + out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend) + let newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex) + setSelection(doc, newSel, options) +} + +// Updates a single range in the selection. +export function replaceOneSelection(doc, i, range, options) { + let ranges = doc.sel.ranges.slice(0) + ranges[i] = range + setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options) +} + +// Reset the selection to a single range. +export function setSimpleSelection(doc, anchor, head, options) { + setSelection(doc, simpleSelection(anchor, head), options) +} + +// Give beforeSelectionChange handlers a change to influence a +// selection update. +function filterSelectionChange(doc, sel, options) { + let obj = { + ranges: sel.ranges, + update: function(ranges) { + this.ranges = [] + for (let i = 0; i < ranges.length; i++) + this.ranges[i] = new Range(clipPos(doc, ranges[i].anchor), + clipPos(doc, ranges[i].head)) + }, + origin: options && options.origin + } + signal(doc, "beforeSelectionChange", doc, obj) + if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj) + if (obj.ranges != sel.ranges) return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) + else return sel +} + +export function setSelectionReplaceHistory(doc, sel, options) { + let done = doc.history.done, last = lst(done) + if (last && last.ranges) { + done[done.length - 1] = sel + setSelectionNoUndo(doc, sel, options) + } else { + setSelection(doc, sel, options) + } +} + +// Set a new selection. +export function setSelection(doc, sel, options) { + setSelectionNoUndo(doc, sel, options) + addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options) +} + +export function setSelectionNoUndo(doc, sel, options) { + if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) + sel = filterSelectionChange(doc, sel, options) + + let bias = options && options.bias || + (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1) + setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)) + + if (!(options && options.scroll === false) && doc.cm && doc.cm.getOption("readOnly") != "nocursor") + ensureCursorVisible(doc.cm) +} + +function setSelectionInner(doc, sel) { + if (sel.equals(doc.sel)) return + + doc.sel = sel + + if (doc.cm) { + doc.cm.curOp.updateInput = 1 + doc.cm.curOp.selectionChanged = true + signalCursorActivity(doc.cm) + } + signalLater(doc, "cursorActivity", doc) +} + +// Verify that the selection does not partially select any atomic +// marked ranges. +export function reCheckSelection(doc) { + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false)) +} + +// Return a selection that does not partially select any atomic +// ranges. +function skipAtomicInSelection(doc, sel, bias, mayClear) { + let out + for (let i = 0; i < sel.ranges.length; i++) { + let range = sel.ranges[i] + let old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i] + let newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear) + let newHead = range.head == range.anchor ? newAnchor : skipAtomic(doc, range.head, old && old.head, bias, mayClear) + if (out || newAnchor != range.anchor || newHead != range.head) { + if (!out) out = sel.ranges.slice(0, i) + out[i] = new Range(newAnchor, newHead) + } + } + return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel +} + +function skipAtomicInner(doc, pos, oldPos, dir, mayClear) { + let line = getLine(doc, pos.line) + if (line.markedSpans) for (let i = 0; i < line.markedSpans.length; ++i) { + let sp = line.markedSpans[i], m = sp.marker + + // Determine if we should prevent the cursor being placed to the left/right of an atomic marker + // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it + // is with selectLeft/Right + let preventCursorLeft = ("selectLeft" in m) ? !m.selectLeft : m.inclusiveLeft + let preventCursorRight = ("selectRight" in m) ? !m.selectRight : m.inclusiveRight + + if ((sp.from == null || (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && + (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch))) { + if (mayClear) { + signal(m, "beforeCursorEnter") + if (m.explicitlyCleared) { + if (!line.markedSpans) break + else {--i; continue} + } + } + if (!m.atomic) continue + + if (oldPos) { + let near = m.find(dir < 0 ? 1 : -1), diff + if (dir < 0 ? preventCursorRight : preventCursorLeft) + near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null) + if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0)) + return skipAtomicInner(doc, near, pos, dir, mayClear) + } + + let far = m.find(dir < 0 ? -1 : 1) + if (dir < 0 ? preventCursorLeft : preventCursorRight) + far = movePos(doc, far, dir, far.line == pos.line ? line : null) + return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null + } + } + return pos +} + +// Ensure a given position is not inside an atomic range. +export function skipAtomic(doc, pos, oldPos, bias, mayClear) { + let dir = bias || 1 + let found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) || + skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true)) + if (!found) { + doc.cantEdit = true + return Pos(doc.first, 0) + } + return found +} + +function movePos(doc, pos, dir, line) { + if (dir < 0 && pos.ch == 0) { + if (pos.line > doc.first) return clipPos(doc, Pos(pos.line - 1)) + else return null + } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) { + if (pos.line < doc.first + doc.size - 1) return Pos(pos.line + 1, 0) + else return null + } else { + return new Pos(pos.line, pos.ch + dir) + } +} + +export function selectAll(cm) { + cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll) +} diff --git a/js/codemirror/src/modes.js b/js/codemirror/src/modes.js new file mode 100644 index 0000000..8384517 --- /dev/null +++ b/js/codemirror/src/modes.js @@ -0,0 +1,96 @@ +import { copyObj, createObj } from "./util/misc.js" + +// Known modes, by name and by MIME +export let modes = {}, mimeModes = {} + +// Extra arguments are stored as the mode's dependencies, which is +// used by (legacy) mechanisms like loadmode.js to automatically +// load a mode. (Preferred mechanism is the require/define calls.) +export function defineMode(name, mode) { + if (arguments.length > 2) + mode.dependencies = Array.prototype.slice.call(arguments, 2) + modes[name] = mode +} + +export function defineMIME(mime, spec) { + mimeModes[mime] = spec +} + +// Given a MIME type, a {name, ...options} config object, or a name +// string, return a mode config object. +export function resolveMode(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec] + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + let found = mimeModes[spec.name] + if (typeof found == "string") found = {name: found} + spec = createObj(found, spec) + spec.name = found.name + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return resolveMode("application/xml") + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { + return resolveMode("application/json") + } + if (typeof spec == "string") return {name: spec} + else return spec || {name: "null"} +} + +// Given a mode spec (anything that resolveMode accepts), find and +// initialize an actual mode object. +export function getMode(options, spec) { + spec = resolveMode(spec) + let mfactory = modes[spec.name] + if (!mfactory) return getMode(options, "text/plain") + let modeObj = mfactory(options, spec) + if (modeExtensions.hasOwnProperty(spec.name)) { + let exts = modeExtensions[spec.name] + for (let prop in exts) { + if (!exts.hasOwnProperty(prop)) continue + if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop] + modeObj[prop] = exts[prop] + } + } + modeObj.name = spec.name + if (spec.helperType) modeObj.helperType = spec.helperType + if (spec.modeProps) for (let prop in spec.modeProps) + modeObj[prop] = spec.modeProps[prop] + + return modeObj +} + +// This can be used to attach properties to mode objects from +// outside the actual mode definition. +export let modeExtensions = {} +export function extendMode(mode, properties) { + let exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}) + copyObj(properties, exts) +} + +export function copyState(mode, state) { + if (state === true) return state + if (mode.copyState) return mode.copyState(state) + let nstate = {} + for (let n in state) { + let val = state[n] + if (val instanceof Array) val = val.concat([]) + nstate[n] = val + } + return nstate +} + +// Given a mode and a state (for that mode), find the inner mode and +// state at the position that the state refers to. +export function innerMode(mode, state) { + let info + while (mode.innerMode) { + info = mode.innerMode(state) + if (!info || info.mode == mode) break + state = info.state + mode = info.mode + } + return info || {mode: mode, state: state} +} + +export function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true +} diff --git a/js/codemirror/src/util/StringStream.js b/js/codemirror/src/util/StringStream.js new file mode 100644 index 0000000..022c4bc --- /dev/null +++ b/js/codemirror/src/util/StringStream.js @@ -0,0 +1,90 @@ +import { countColumn } from "./misc.js" + +// STRING STREAM + +// Fed to the mode parsers, provides helper functions to make +// parsers more succinct. + +class StringStream { + constructor(string, tabSize, lineOracle) { + this.pos = this.start = 0 + this.string = string + this.tabSize = tabSize || 8 + this.lastColumnPos = this.lastColumnValue = 0 + this.lineStart = 0 + this.lineOracle = lineOracle + } + + eol() {return this.pos >= this.string.length} + sol() {return this.pos == this.lineStart} + peek() {return this.string.charAt(this.pos) || undefined} + next() { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++) + } + eat(match) { + let ch = this.string.charAt(this.pos) + let ok + if (typeof match == "string") ok = ch == match + else ok = ch && (match.test ? match.test(ch) : match(ch)) + if (ok) {++this.pos; return ch} + } + eatWhile(match) { + let start = this.pos + while (this.eat(match)){} + return this.pos > start + } + eatSpace() { + let start = this.pos + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos + return this.pos > start + } + skipToEnd() {this.pos = this.string.length} + skipTo(ch) { + let found = this.string.indexOf(ch, this.pos) + if (found > -1) {this.pos = found; return true} + } + backUp(n) {this.pos -= n} + column() { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue) + this.lastColumnPos = this.start + } + return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + } + indentation() { + return countColumn(this.string, null, this.tabSize) - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + } + match(pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + let cased = str => caseInsensitive ? str.toLowerCase() : str + let substr = this.string.substr(this.pos, pattern.length) + if (cased(substr) == cased(pattern)) { + if (consume !== false) this.pos += pattern.length + return true + } + } else { + let match = this.string.slice(this.pos).match(pattern) + if (match && match.index > 0) return null + if (match && consume !== false) this.pos += match[0].length + return match + } + } + current(){return this.string.slice(this.start, this.pos)} + hideFirstChars(n, inner) { + this.lineStart += n + try { return inner() } + finally { this.lineStart -= n } + } + lookAhead(n) { + let oracle = this.lineOracle + return oracle && oracle.lookAhead(n) + } + baseToken() { + let oracle = this.lineOracle + return oracle && oracle.baseToken(this.pos) + } +} + +export default StringStream diff --git a/js/codemirror/src/util/bidi.js b/js/codemirror/src/util/bidi.js new file mode 100644 index 0000000..92c4191 --- /dev/null +++ b/js/codemirror/src/util/bidi.js @@ -0,0 +1,215 @@ +import { lst } from "./misc.js" + +// BIDI HELPERS + +export function iterateBidiSections(order, from, to, f) { + if (!order) return f(from, to, "ltr", 0) + let found = false + for (let i = 0; i < order.length; ++i) { + let part = order[i] + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i) + found = true + } + } + if (!found) f(from, to, "ltr") +} + +export let bidiOther = null +export function getBidiPartAt(order, ch, sticky) { + let found + bidiOther = null + for (let i = 0; i < order.length; ++i) { + let cur = order[i] + if (cur.from < ch && cur.to > ch) return i + if (cur.to == ch) { + if (cur.from != cur.to && sticky == "before") found = i + else bidiOther = i + } + if (cur.from == ch) { + if (cur.from != cur.to && sticky != "before") found = i + else bidiOther = i + } + } + return found != null ? found : bidiOther +} + +// Bidirectional ordering algorithm +// See http://unicode.org/reports/tr9/tr9-13.html for the algorithm +// that this (partially) implements. + +// One-char codes used for character types: +// L (L): Left-to-Right +// R (R): Right-to-Left +// r (AL): Right-to-Left Arabic +// 1 (EN): European Number +// + (ES): European Number Separator +// % (ET): European Number Terminator +// n (AN): Arabic Number +// , (CS): Common Number Separator +// m (NSM): Non-Spacing Mark +// b (BN): Boundary Neutral +// s (B): Paragraph Separator +// t (S): Segment Separator +// w (WS): Whitespace +// N (ON): Other Neutrals + +// Returns null if characters are ordered as they appear +// (left-to-right), or an array of sections ({from, to, level} +// objects) in the order in which they occur visually. +let bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + let lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN" + // Character types for codepoints 0x600 to 0x6f9 + let arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111" + function charType(code) { + if (code <= 0xf7) return lowTypes.charAt(code) + else if (0x590 <= code && code <= 0x5f4) return "R" + else if (0x600 <= code && code <= 0x6f9) return arabicTypes.charAt(code - 0x600) + else if (0x6ee <= code && code <= 0x8ac) return "r" + else if (0x2000 <= code && code <= 0x200b) return "w" + else if (code == 0x200c) return "b" + else return "L" + } + + let bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/ + let isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/ + + function BidiSpan(level, from, to) { + this.level = level + this.from = from; this.to = to + } + + return function(str, direction) { + let outerType = direction == "ltr" ? "L" : "R" + + if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) return false + let len = str.length, types = [] + for (let i = 0; i < len; ++i) + types.push(charType(str.charCodeAt(i))) + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (let i = 0, prev = outerType; i < len; ++i) { + let type = types[i] + if (type == "m") types[i] = prev + else prev = type + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (let i = 0, cur = outerType; i < len; ++i) { + let type = types[i] + if (type == "1" && cur == "r") types[i] = "n" + else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R" } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (let i = 1, prev = types[0]; i < len - 1; ++i) { + let type = types[i] + if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1" + else if (type == "," && prev == types[i+1] && + (prev == "1" || prev == "n")) types[i] = prev + prev = type + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (let i = 0; i < len; ++i) { + let type = types[i] + if (type == ",") types[i] = "N" + else if (type == "%") { + let end + for (end = i + 1; end < len && types[end] == "%"; ++end) {} + let replace = (i && types[i-1] == "!") || (end < len && types[end] == "1") ? "1" : "N" + for (let j = i; j < end; ++j) types[j] = replace + i = end - 1 + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (let i = 0, cur = outerType; i < len; ++i) { + let type = types[i] + if (cur == "L" && type == "1") types[i] = "L" + else if (isStrong.test(type)) cur = type + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (let i = 0; i < len; ++i) { + if (isNeutral.test(types[i])) { + let end + for (end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} + let before = (i ? types[i-1] : outerType) == "L" + let after = (end < len ? types[end] : outerType) == "L" + let replace = before == after ? (before ? "L" : "R") : outerType + for (let j = i; j < end; ++j) types[j] = replace + i = end - 1 + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + let order = [], m + for (let i = 0; i < len;) { + if (countsAsLeft.test(types[i])) { + let start = i + for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} + order.push(new BidiSpan(0, start, i)) + } else { + let pos = i, at = order.length, isRTL = direction == "rtl" ? 1 : 0 + for (++i; i < len && types[i] != "L"; ++i) {} + for (let j = pos; j < i;) { + if (countsAsNum.test(types[j])) { + if (pos < j) { order.splice(at, 0, new BidiSpan(1, pos, j)); at += isRTL } + let nstart = j + for (++j; j < i && countsAsNum.test(types[j]); ++j) {} + order.splice(at, 0, new BidiSpan(2, nstart, j)) + at += isRTL + pos = j + } else ++j + } + if (pos < i) order.splice(at, 0, new BidiSpan(1, pos, i)) + } + } + if (direction == "ltr") { + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length + order.unshift(new BidiSpan(0, 0, m[0].length)) + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length + order.push(new BidiSpan(0, len - m[0].length, len)) + } + } + + return direction == "rtl" ? order.reverse() : order + } +})() + +// Get the bidi ordering for the given line (and cache it). Returns +// false for lines that are fully left-to-right, and an array of +// BidiSpan objects otherwise. +export function getOrder(line, direction) { + let order = line.order + if (order == null) order = line.order = bidiOrdering(line.text, direction) + return order +} diff --git a/js/codemirror/src/util/browser.js b/js/codemirror/src/util/browser.js new file mode 100644 index 0000000..751a06c --- /dev/null +++ b/js/codemirror/src/util/browser.js @@ -0,0 +1,34 @@ +// Kludges for bugs and behavior differences that can't be feature +// detected are enabled based on userAgent etc sniffing. +let userAgent = navigator.userAgent +let platform = navigator.platform + +export let gecko = /gecko\/\d/i.test(userAgent) +let ie_upto10 = /MSIE \d/.test(userAgent) +let ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent) +let edge = /Edge\/(\d+)/.exec(userAgent) +export let ie = ie_upto10 || ie_11up || edge +export let ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]) +export let webkit = !edge && /WebKit\//.test(userAgent) +let qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent) +export let chrome = !edge && /Chrome\/(\d+)/.exec(userAgent) +export let chrome_version = chrome && +chrome[1] +export let presto = /Opera\//.test(userAgent) +export let safari = /Apple Computer/.test(navigator.vendor) +export let mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent) +export let phantom = /PhantomJS/.test(userAgent) + +export let ios = safari && (/Mobile\/\w+/.test(userAgent) || navigator.maxTouchPoints > 2) +export let android = /Android/.test(userAgent) +// This is woefully incomplete. Suggestions for alternative methods welcome. +export let mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent) +export let mac = ios || /Mac/.test(platform) +export let chromeOS = /\bCrOS\b/.test(userAgent) +export let windows = /win/i.test(platform) + +let presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/) +if (presto_version) presto_version = Number(presto_version[1]) +if (presto_version && presto_version >= 15) { presto = false; webkit = true } +// Some browsers use the wrong event properties to signal cmd/ctrl on OS X +export let flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11)) +export let captureRightClick = gecko || (ie && ie_version >= 9) diff --git a/js/codemirror/src/util/dom.js b/js/codemirror/src/util/dom.js new file mode 100644 index 0000000..52fc949 --- /dev/null +++ b/js/codemirror/src/util/dom.js @@ -0,0 +1,111 @@ +import { ie, ios } from "./browser.js" + +export function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") } + +export let rmClass = function(node, cls) { + let current = node.className + let match = classTest(cls).exec(current) + if (match) { + let after = current.slice(match.index + match[0].length) + node.className = current.slice(0, match.index) + (after ? match[1] + after : "") + } +} + +export function removeChildren(e) { + for (let count = e.childNodes.length; count > 0; --count) + e.removeChild(e.firstChild) + return e +} + +export function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e) +} + +export function elt(tag, content, className, style) { + let e = document.createElement(tag) + if (className) e.className = className + if (style) e.style.cssText = style + if (typeof content == "string") e.appendChild(document.createTextNode(content)) + else if (content) for (let i = 0; i < content.length; ++i) e.appendChild(content[i]) + return e +} +// wrapper for elt, which removes the elt from the accessibility tree +export function eltP(tag, content, className, style) { + let e = elt(tag, content, className, style) + e.setAttribute("role", "presentation") + return e +} + +export let range +if (document.createRange) range = function(node, start, end, endNode) { + let r = document.createRange() + r.setEnd(endNode || node, end) + r.setStart(node, start) + return r +} +else range = function(node, start, end) { + let r = document.body.createTextRange() + try { r.moveToElementText(node.parentNode) } + catch(e) { return r } + r.collapse(true) + r.moveEnd("character", end) + r.moveStart("character", start) + return r +} + +export function contains(parent, child) { + if (child.nodeType == 3) // Android browser always returns false when child is a textnode + child = child.parentNode + if (parent.contains) + return parent.contains(child) + do { + if (child.nodeType == 11) child = child.host + if (child == parent) return true + } while (child = child.parentNode) +} + +export function activeElt(rootNode) { + // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement. + // IE < 10 will throw when accessed while the page is loading or in an iframe. + // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable. + let doc = rootNode.ownerDocument || rootNode + let activeElement + try { + activeElement = rootNode.activeElement + } catch(e) { + activeElement = doc.body || null + } + while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement) + activeElement = activeElement.shadowRoot.activeElement + return activeElement +} + +export function addClass(node, cls) { + let current = node.className + if (!classTest(cls).test(current)) node.className += (current ? " " : "") + cls +} +export function joinClasses(a, b) { + let as = a.split(" ") + for (let i = 0; i < as.length; i++) + if (as[i] && !classTest(as[i]).test(b)) b += " " + as[i] + return b +} + +export let selectInput = function(node) { node.select() } +if (ios) // Mobile Safari apparently has a bug where select() is broken. + selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length } +else if (ie) // Suppress mysterious IE10 errors + selectInput = function(node) { try { node.select() } catch(_e) {} } + +export function doc(cm) { return cm.display.wrapper.ownerDocument } + +export function root(cm) { + return rootNode(cm.display.wrapper) +} + +export function rootNode(element) { + // Detect modern browsers (2017+). + return element.getRootNode ? element.getRootNode() : element.ownerDocument +} + +export function win(cm) { return doc(cm).defaultView } diff --git a/js/codemirror/src/util/event.js b/js/codemirror/src/util/event.js new file mode 100644 index 0000000..4b6c770 --- /dev/null +++ b/js/codemirror/src/util/event.js @@ -0,0 +1,103 @@ +import { mac } from "./browser.js" +import { indexOf } from "./misc.js" + +// EVENT HANDLING + +// Lightweight event framework. on/off also work on DOM nodes, +// registering native DOM handlers. + +const noHandlers = [] + +export let on = function(emitter, type, f) { + if (emitter.addEventListener) { + emitter.addEventListener(type, f, false) + } else if (emitter.attachEvent) { + emitter.attachEvent("on" + type, f) + } else { + let map = emitter._handlers || (emitter._handlers = {}) + map[type] = (map[type] || noHandlers).concat(f) + } +} + +export function getHandlers(emitter, type) { + return emitter._handlers && emitter._handlers[type] || noHandlers +} + +export function off(emitter, type, f) { + if (emitter.removeEventListener) { + emitter.removeEventListener(type, f, false) + } else if (emitter.detachEvent) { + emitter.detachEvent("on" + type, f) + } else { + let map = emitter._handlers, arr = map && map[type] + if (arr) { + let index = indexOf(arr, f) + if (index > -1) + map[type] = arr.slice(0, index).concat(arr.slice(index + 1)) + } + } +} + +export function signal(emitter, type /*, values...*/) { + let handlers = getHandlers(emitter, type) + if (!handlers.length) return + let args = Array.prototype.slice.call(arguments, 2) + for (let i = 0; i < handlers.length; ++i) handlers[i].apply(null, args) +} + +// The DOM events that CodeMirror handles can be overridden by +// registering a (non-DOM) handler on the editor for the event name, +// and preventDefault-ing the event in that handler. +export function signalDOMEvent(cm, e, override) { + if (typeof e == "string") + e = {type: e, preventDefault: function() { this.defaultPrevented = true }} + signal(cm, override || e.type, cm, e) + return e_defaultPrevented(e) || e.codemirrorIgnore +} + +export function signalCursorActivity(cm) { + let arr = cm._handlers && cm._handlers.cursorActivity + if (!arr) return + let set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []) + for (let i = 0; i < arr.length; ++i) if (indexOf(set, arr[i]) == -1) + set.push(arr[i]) +} + +export function hasHandler(emitter, type) { + return getHandlers(emitter, type).length > 0 +} + +// Add on and off methods to a constructor's prototype, to make +// registering events on such objects more convenient. +export function eventMixin(ctor) { + ctor.prototype.on = function(type, f) {on(this, type, f)} + ctor.prototype.off = function(type, f) {off(this, type, f)} +} + +// Due to the fact that we still support jurassic IE versions, some +// compatibility wrappers are needed. + +export function e_preventDefault(e) { + if (e.preventDefault) e.preventDefault() + else e.returnValue = false +} +export function e_stopPropagation(e) { + if (e.stopPropagation) e.stopPropagation() + else e.cancelBubble = true +} +export function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false +} +export function e_stop(e) {e_preventDefault(e); e_stopPropagation(e)} + +export function e_target(e) {return e.target || e.srcElement} +export function e_button(e) { + let b = e.which + if (b == null) { + if (e.button & 1) b = 1 + else if (e.button & 2) b = 3 + else if (e.button & 4) b = 2 + } + if (mac && e.ctrlKey && b == 1) b = 3 + return b +} diff --git a/js/codemirror/src/util/feature_detection.js b/js/codemirror/src/util/feature_detection.js new file mode 100644 index 0000000..c33734e --- /dev/null +++ b/js/codemirror/src/util/feature_detection.js @@ -0,0 +1,84 @@ +import { elt, range, removeChildren, removeChildrenAndAdd } from "./dom.js" +import { ie, ie_version } from "./browser.js" + +// Detect drag-and-drop +export let dragAndDrop = function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) return false + let div = elt('div') + return "draggable" in div || "dragDrop" in div +}() + +let zwspSupported +export function zeroWidthElement(measure) { + if (zwspSupported == null) { + let test = elt("span", "\u200b") + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])) + if (measure.firstChild.offsetHeight != 0) + zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8) + } + let node = zwspSupported ? elt("span", "\u200b") : + elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px") + node.setAttribute("cm-text", "") + return node +} + +// Feature-detect IE's crummy client rect reporting for bidi text +let badBidiRects +export function hasBadBidiRects(measure) { + if (badBidiRects != null) return badBidiRects + let txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")) + let r0 = range(txt, 0, 1).getBoundingClientRect() + let r1 = range(txt, 1, 2).getBoundingClientRect() + removeChildren(measure) + if (!r0 || r0.left == r0.right) return false // Safari returns null in some cases (#2780) + return badBidiRects = (r1.right - r0.right < 3) +} + +// See if "".split is the broken IE version, if so, provide an +// alternative way to split lines. +export let splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? string => { + let pos = 0, result = [], l = string.length + while (pos <= l) { + let nl = string.indexOf("\n", pos) + if (nl == -1) nl = string.length + let line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl) + let rt = line.indexOf("\r") + if (rt != -1) { + result.push(line.slice(0, rt)) + pos += rt + 1 + } else { + result.push(line) + pos = nl + 1 + } + } + return result +} : string => string.split(/\r\n?|\n/) + +export let hasSelection = window.getSelection ? te => { + try { return te.selectionStart != te.selectionEnd } + catch(e) { return false } +} : te => { + let range + try {range = te.ownerDocument.selection.createRange()} + catch(e) {} + if (!range || range.parentElement() != te) return false + return range.compareEndPoints("StartToEnd", range) != 0 +} + +export let hasCopyEvent = (() => { + let e = elt("div") + if ("oncopy" in e) return true + e.setAttribute("oncopy", "return;") + return typeof e.oncopy == "function" +})() + +let badZoomedRects = null +export function hasBadZoomedRects(measure) { + if (badZoomedRects != null) return badZoomedRects + let node = removeChildrenAndAdd(measure, elt("span", "x")) + let normal = node.getBoundingClientRect() + let fromRange = range(node, 0, 1).getBoundingClientRect() + return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1 +} diff --git a/js/codemirror/src/util/misc.js b/js/codemirror/src/util/misc.js new file mode 100644 index 0000000..6dc8d86 --- /dev/null +++ b/js/codemirror/src/util/misc.js @@ -0,0 +1,168 @@ +export function bind(f) { + let args = Array.prototype.slice.call(arguments, 1) + return function(){return f.apply(null, args)} +} + +export function copyObj(obj, target, overwrite) { + if (!target) target = {} + for (let prop in obj) + if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) + target[prop] = obj[prop] + return target +} + +// Counts the column offset in a string, taking tabs into account. +// Used mostly to find indentation. +export function countColumn(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/) + if (end == -1) end = string.length + } + for (let i = startIndex || 0, n = startValue || 0;;) { + let nextTab = string.indexOf("\t", i) + if (nextTab < 0 || nextTab >= end) + return n + (end - i) + n += nextTab - i + n += tabSize - (n % tabSize) + i = nextTab + 1 + } +} + +export class Delayed { + constructor() { + this.id = null + this.f = null + this.time = 0 + this.handler = bind(this.onTimeout, this) + } + onTimeout(self) { + self.id = 0 + if (self.time <= +new Date) { + self.f() + } else { + setTimeout(self.handler, self.time - +new Date) + } + } + set(ms, f) { + this.f = f + const time = +new Date + ms + if (!this.id || time < this.time) { + clearTimeout(this.id) + this.id = setTimeout(this.handler, ms) + this.time = time + } + } +} + +export function indexOf(array, elt) { + for (let i = 0; i < array.length; ++i) + if (array[i] == elt) return i + return -1 +} + +// Number of pixels added to scroller and sizer to hide scrollbar +export let scrollerGap = 50 + +// Returned or thrown by various protocols to signal 'I'm not +// handling this'. +export let Pass = {toString: function(){return "CodeMirror.Pass"}} + +// Reused option objects for setSelection & friends +export let sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"} + +// The inverse of countColumn -- find the offset that corresponds to +// a particular column. +export function findColumn(string, goal, tabSize) { + for (let pos = 0, col = 0;;) { + let nextTab = string.indexOf("\t", pos) + if (nextTab == -1) nextTab = string.length + let skipped = nextTab - pos + if (nextTab == string.length || col + skipped >= goal) + return pos + Math.min(skipped, goal - col) + col += nextTab - pos + col += tabSize - (col % tabSize) + pos = nextTab + 1 + if (col >= goal) return pos + } +} + +let spaceStrs = [""] +export function spaceStr(n) { + while (spaceStrs.length <= n) + spaceStrs.push(lst(spaceStrs) + " ") + return spaceStrs[n] +} + +export function lst(arr) { return arr[arr.length-1] } + +export function map(array, f) { + let out = [] + for (let i = 0; i < array.length; i++) out[i] = f(array[i], i) + return out +} + +export function insertSorted(array, value, score) { + let pos = 0, priority = score(value) + while (pos < array.length && score(array[pos]) <= priority) pos++ + array.splice(pos, 0, value) +} + +function nothing() {} + +export function createObj(base, props) { + let inst + if (Object.create) { + inst = Object.create(base) + } else { + nothing.prototype = base + inst = new nothing() + } + if (props) copyObj(props, inst) + return inst +} + +let nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/ +export function isWordCharBasic(ch) { + return /\w/.test(ch) || ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)) +} +export function isWordChar(ch, helper) { + if (!helper) return isWordCharBasic(ch) + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) return true + return helper.test(ch) +} + +export function isEmpty(obj) { + for (let n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false + return true +} + +// Extending unicode characters. A series of a non-extending char + +// any number of extending chars is treated as a single unit as far +// as editing and measuring is concerned. This is not fully correct, +// since some scripts/fonts/browsers also treat other configurations +// of code points as a group. +let extendingChars = /[\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]/ +export function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) } + +// Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range. +export function skipExtendingChars(str, pos, dir) { + while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) pos += dir + return pos +} + +// Returns the value from the range [`from`; `to`] that satisfies +// `pred` and is closest to `from`. Assumes that at least `to` +// satisfies `pred`. Supports `from` being greater than `to`. +export function findFirst(pred, from, to) { + // At any point we are certain `to` satisfies `pred`, don't know + // whether `from` does. + let dir = from > to ? -1 : 1 + for (;;) { + if (from == to) return from + let midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF) + if (mid == from) return pred(mid) ? from : to + if (pred(mid)) to = mid + else from = mid + dir + } +} diff --git a/js/codemirror/src/util/operation_group.js b/js/codemirror/src/util/operation_group.js new file mode 100644 index 0000000..f681594 --- /dev/null +++ b/js/codemirror/src/util/operation_group.js @@ -0,0 +1,72 @@ +import { getHandlers } from "./event.js" + +let operationGroup = null + +export function pushOperation(op) { + if (operationGroup) { + operationGroup.ops.push(op) + } else { + op.ownsGroup = operationGroup = { + ops: [op], + delayedCallbacks: [] + } + } +} + +function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + let callbacks = group.delayedCallbacks, i = 0 + do { + for (; i < callbacks.length; i++) + callbacks[i].call(null) + for (let j = 0; j < group.ops.length; j++) { + let op = group.ops[j] + if (op.cursorActivityHandlers) + while (op.cursorActivityCalled < op.cursorActivityHandlers.length) + op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm) + } + } while (i < callbacks.length) +} + +export function finishOperation(op, endCb) { + let group = op.ownsGroup + if (!group) return + + try { fireCallbacksForOps(group) } + finally { + operationGroup = null + endCb(group) + } +} + +let orphanDelayedCallbacks = null + +// Often, we want to signal events at a point where we are in the +// middle of some work, but don't want the handler to start calling +// other methods on the editor, which might be in an inconsistent +// state or simply not expect any other events to happen. +// signalLater looks whether there are any handlers, and schedules +// them to be executed when the last operation ends, or, if no +// operation is active, when a timeout fires. +export function signalLater(emitter, type /*, values...*/) { + let arr = getHandlers(emitter, type) + if (!arr.length) return + let args = Array.prototype.slice.call(arguments, 2), list + if (operationGroup) { + list = operationGroup.delayedCallbacks + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks + } else { + list = orphanDelayedCallbacks = [] + setTimeout(fireOrphanDelayed, 0) + } + for (let i = 0; i < arr.length; ++i) + list.push(() => arr[i].apply(null, args)) +} + +function fireOrphanDelayed() { + let delayed = orphanDelayedCallbacks + orphanDelayedCallbacks = null + for (let i = 0; i < delayed.length; ++i) delayed[i]() +} diff --git a/js/codemirror/test/annotatescrollbar.js b/js/codemirror/test/annotatescrollbar.js new file mode 100644 index 0000000..4a4d053 --- /dev/null +++ b/js/codemirror/test/annotatescrollbar.js @@ -0,0 +1,55 @@ +namespace = "annotatescrollbar_"; + +(function () { + function test(name, run, content, query, expected) { + return testCM(name, function (cm) { + var annotation = cm.annotateScrollbar({ + listenForChanges: false, + className: "CodeMirror-search-match" + }); + var matches = []; + var cursor = cm.getSearchCursor(query, CodeMirror.Pos(0, 0)); + while (cursor.findNext()) { + var match = { + from: cursor.from(), + to: cursor.to() + }; + matches.push(match) + } + + if (run) run(cm); + + cm.display.barWidth = 5; + annotation.update(matches); + + var annotations = cm.getWrapperElement().getElementsByClassName(annotation.options.className); + eq(annotations.length, expected, "Expected " + expected + " annotations on the scrollbar.") + }, { + value: content, + mode: "javascript", + foldOptions: { + rangeFinder: CodeMirror.fold.brace + } + }); + } + + function doFold(cm) { + cm.foldCode(cm.getCursor()); + } + var simpleProg = "function foo() {\n\n return \"foo\";\n\n}\n\nfoo();\n"; + var consecutiveLineMatches = "function foo() {\n return \"foo\";\n}\nfoo();\n"; + var singleLineMatches = "function foo() { return \"foo\"; }foo();\n"; + + // Base case - expect 3 matches and 3 annotations + test("simple", null, simpleProg, "foo", 3); + // Consecutive line matches are combines into a single annotation - expect 3 matches and 2 annotations + test("combineConsecutiveLine", null, consecutiveLineMatches, "foo", 2); + // Matches on a single line get a single annotation - expect 3 matches and 1 annotation + test("combineSingleLine", null, singleLineMatches, "foo", 1); + // Matches within a fold are annotated on the folded line - expect 3 matches and 2 annotations + test("simpleFold", doFold, simpleProg, "foo", 2); + // Combination of combineConsecutiveLine and simpleFold cases - expect 3 matches and 1 annotation + test("foldedMatch", doFold, consecutiveLineMatches, "foo", 1); + // Hidden matches within a fold are annotated on the folded line - expect 1 match and 1 annotation + test("hiddenMatch", doFold, simpleProg, "return", 1); +})(); \ No newline at end of file diff --git a/js/codemirror/test/comment_test.js b/js/codemirror/test/comment_test.js new file mode 100644 index 0000000..7deda79 --- /dev/null +++ b/js/codemirror/test/comment_test.js @@ -0,0 +1,118 @@ +namespace = "comment_"; + +(function() { + function test(name, mode, run, before, after) { + return testCM(name, function(cm) { + run(cm); + eq(cm.getValue(), after); + }, {value: before, mode: mode}); + } + + var simpleProg = "function foo() {\n return bar;\n}"; + var inlineBlock = "foo(/* bar */ true);"; + var inlineBlocks = "foo(/* bar */ true, /* baz */ false);"; + var multiLineInlineBlock = ["above();", "foo(/* bar */ true);", "below();"]; + + test("block", "javascript", function(cm) { + cm.blockComment(Pos(0, 3), Pos(3, 0), {blockCommentLead: " *"}); + }, simpleProg + "\n", "/* function foo() {\n * return bar;\n * }\n */"); + + test("blockToggle", "javascript", function(cm) { + cm.blockComment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"}); + cm.uncomment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"}); + }, simpleProg, simpleProg); + + test("blockToggle2", "javascript", function(cm) { + cm.setCursor({line: 0, ch: 7 /* inside the block comment */}); + cm.execCommand("toggleComment"); + }, inlineBlock, "foo(bar true);"); + + // This test should work but currently fails. + // test("blockToggle3", "javascript", function(cm) { + // cm.setCursor({line: 0, ch: 7 /* inside the first block comment */}); + // cm.execCommand("toggleComment"); + // }, inlineBlocks, "foo(bar true, /* baz */ false);"); + + test("line", "javascript", function(cm) { + cm.lineComment(Pos(1, 1), Pos(1, 1)); + }, simpleProg, "function foo() {\n// return bar;\n}"); + + test("lineToggle", "javascript", function(cm) { + cm.lineComment(Pos(0, 0), Pos(2, 1)); + cm.uncomment(Pos(0, 0), Pos(2, 1)); + }, simpleProg, simpleProg); + + test("fallbackToBlock", "css", function(cm) { + cm.lineComment(Pos(0, 0), Pos(2, 1)); + }, "html {\n border: none;\n}", "/* html {\n border: none;\n} */"); + + test("fallbackToLine", "ruby", function(cm) { + cm.blockComment(Pos(0, 0), Pos(1)); + }, "def blah()\n return hah\n", "# def blah()\n# return hah\n"); + + test("ignoreExternalBlockComments", "javascript", function(cm) { + cm.execCommand("toggleComment"); + }, inlineBlocks, "// " + inlineBlocks); + + test("ignoreExternalBlockComments2", "javascript", function(cm) { + cm.setCursor({line: 0, ch: null /* eol */}); + cm.execCommand("toggleComment"); + }, inlineBlocks, "// " + inlineBlocks); + + test("ignoreExternalBlockCommentsMultiLineAbove", "javascript", function(cm) { + cm.setSelection({line: 0, ch: 0}, {line: 1, ch: 1}); + cm.execCommand("toggleComment"); + }, multiLineInlineBlock.join("\n"), ["// " + multiLineInlineBlock[0], + "// " + multiLineInlineBlock[1], + multiLineInlineBlock[2]].join("\n")); + + test("ignoreExternalBlockCommentsMultiLineBelow", "javascript", function(cm) { + cm.setSelection({line: 1, ch: 13 /* after end of block comment */}, {line: 2, ch: 1}); + cm.execCommand("toggleComment"); + }, multiLineInlineBlock.join("\n"), [multiLineInlineBlock[0], + "// " + multiLineInlineBlock[1], + "// " + multiLineInlineBlock[2]].join("\n")); + + test("commentRange", "javascript", function(cm) { + cm.blockComment(Pos(1, 2), Pos(1, 13), {fullLines: false}); + }, simpleProg, "function foo() {\n /*return bar;*/\n}"); + + test("indented", "javascript", function(cm) { + cm.lineComment(Pos(1, 0), Pos(2), {indent: true}); + }, simpleProg, "function foo() {\n// return bar;\n// }"); + + test("emptyIndentedLine", "javascript", function(cm) { + cm.lineComment(Pos(1, 2), Pos(1, 2), {indent: true}); + }, "function foo() {\n \n}", "function foo() {\n // \n}"); + + test("singleEmptyLine", "javascript", function(cm) { + cm.setCursor(1); + cm.execCommand("toggleComment"); + }, "a;\n\nb;", "a;\n// \nb;"); + + test("dontMessWithStrings", "javascript", function(cm) { + cm.execCommand("toggleComment"); + }, "console.log(\"/*string*/\");", "// console.log(\"/*string*/\");"); + + test("dontMessWithStrings2", "javascript", function(cm) { + cm.execCommand("toggleComment"); + }, "console.log(\"// string\");", "// console.log(\"// string\");"); + + test("dontMessWithStrings3", "javascript", function(cm) { + cm.execCommand("toggleComment"); + }, "// console.log(\"// string\");", "console.log(\"// string\");"); + + test("includeLastLine", "javascript", function(cm) { + cm.execCommand("selectAll") + cm.execCommand("toggleComment") + }, "// foo\n// bar\nbaz", "// // foo\n// // bar\n// baz") + + test("uncommentWithTrailingBlockEnd", "xml", function(cm) { + cm.execCommand("toggleComment") + }, " -->", "foo -->") + + test("dontCommentInComment", "xml", function(cm) { + cm.setCursor(1, 0) + cm.execCommand("toggleComment") + }, "", "") +})(); diff --git a/js/codemirror/test/contenteditable_test.js b/js/codemirror/test/contenteditable_test.js new file mode 100644 index 0000000..9130fa4 --- /dev/null +++ b/js/codemirror/test/contenteditable_test.js @@ -0,0 +1,110 @@ +(function() { + "use strict"; + + namespace = "contenteditable_"; + var Pos = CodeMirror.Pos + + function findTextNode(dom, text) { + if (dom instanceof CodeMirror) dom = dom.getInputField() + if (dom.nodeType == 1) { + for (var ch = dom.firstChild; ch; ch = ch.nextSibling) { + var found = findTextNode(ch, text) + if (found) return found + } + } else if (dom.nodeType == 3 && dom.nodeValue == text) { + return dom + } + } + + function lineElt(node) { + for (;;) { + var parent = node.parentNode + if (/CodeMirror-code/.test(parent.className)) return node + node = parent + } + } + + testCM("insert_text", function(cm) { + findTextNode(cm, "foobar").nodeValue = "foo bar" + cm.display.input.updateFromDOM() + eq(cm.getValue(), "foo bar") + }, {inputStyle: "contenteditable", value: "foobar"}) + + testCM("split_line", function(cm) { + cm.setSelection(Pos(2, 3)) + var node = findTextNode(cm, "foobar") + node.nodeValue = "foo" + var lineNode = lineElt(node) + lineNode.parentNode.insertBefore(document.createElement("pre"), lineNode.nextSibling).textContent = "bar" + cm.display.input.updateFromDOM() + eq(cm.getValue(), "one\ntwo\nfoo\nbar\nthree\nfour\n") + }, {inputStyle: "contenteditable", value: "one\ntwo\nfoobar\nthree\nfour\n"}) + + testCM("join_line", function(cm) { + cm.setSelection(Pos(2, 3)) + var node = findTextNode(cm, "foo") + node.nodeValue = "foobar" + var lineNode = lineElt(node) + lineNode.parentNode.removeChild(lineNode.nextSibling) + cm.display.input.updateFromDOM() + eq(cm.getValue(), "one\ntwo\nfoobar\nthree\nfour\n") + }, {inputStyle: "contenteditable", value: "one\ntwo\nfoo\nbar\nthree\nfour\n"}) + + testCM("delete_multiple", function(cm) { + cm.setSelection(Pos(1, 3), Pos(4, 0)) + var text = findTextNode(cm, "two"), startLine = lineElt(text) + for (var i = 0; i < 3; i++) + startLine.parentNode.removeChild(startLine.nextSibling) + text.nodeValue = "twothree" + cm.display.input.updateFromDOM() + eq(cm.getValue(), "one\ntwothree\nfour\n") + }, {inputStyle: "contenteditable", value: "one\ntwo\nfoo\nbar\nthree\nfour\n"}) + + testCM("ambiguous_diff_middle", function(cm) { + cm.setSelection(Pos(0, 2)) + findTextNode(cm, "baah").nodeValue = "baaah" + cm.display.input.updateFromDOM() + eqCharPos(cm.getCursor(), Pos(0, 3)) + }, {inputStyle: "contenteditable", value: "baah"}) + + testCM("ambiguous_diff_start", function(cm) { + cm.setSelection(Pos(0, 1)) + findTextNode(cm, "baah").nodeValue = "baaah" + cm.display.input.updateFromDOM() + eqCharPos(cm.getCursor(), Pos(0, 2)) + }, {inputStyle: "contenteditable", value: "baah"}) + + testCM("ambiguous_diff_end", function(cm) { + cm.setSelection(Pos(0, 3)) + findTextNode(cm, "baah").nodeValue = "baaah" + cm.display.input.updateFromDOM() + eqCharPos(cm.getCursor(), Pos(0, 4)) + }, {inputStyle: "contenteditable", value: "baah"}) + + testCM("force_redraw", function(cm) { + findTextNode(cm, "foo").parentNode.appendChild(document.createElement("hr")).className = "inserted" + cm.display.input.updateFromDOM() + eq(byClassName(cm.getInputField(), "inserted").length, 0) + }, {inputStyle: "contenteditable", value: "foo"}) + + testCM("type_on_empty_line", function(cm) { + cm.setSelection(Pos(1, 0)) + findTextNode(cm, "\u200b").nodeValue += "hello" + cm.display.input.updateFromDOM() + eq(cm.getValue(), "foo\nhello\nbar") + }, {inputStyle: "contenteditable", value: "foo\n\nbar"}) + + testCM("type_after_empty_line", function(cm) { + cm.setSelection(Pos(2, 0)) + findTextNode(cm, "bar").nodeValue = "hellobar" + cm.display.input.updateFromDOM() + eq(cm.getValue(), "foo\n\nhellobar") + }, {inputStyle: "contenteditable", value: "foo\n\nbar"}) + + testCM("type_before_empty_line", function(cm) { + cm.setSelection(Pos(0, 3)) + findTextNode(cm, "foo").nodeValue = "foohello" + cm.display.input.updateFromDOM() + eq(cm.getValue(), "foohello\n\nbar") + }, {inputStyle: "contenteditable", value: "foo\n\nbar"}) +})(); diff --git a/js/codemirror/test/doc_test.js b/js/codemirror/test/doc_test.js new file mode 100644 index 0000000..3af20ff --- /dev/null +++ b/js/codemirror/test/doc_test.js @@ -0,0 +1,371 @@ +(function() { + // A minilanguage for instantiating linked CodeMirror instances and Docs + function instantiateSpec(spec, place, opts) { + var names = {}, pos = 0, l = spec.length, editors = []; + while (spec) { + var m = spec.match(/^(\w+)(\*?)(?:='([^\']*)'|<(~?)(\w+)(?:\/(\d+)-(\d+))?)\s*/); + var name = m[1], isDoc = m[2], cur; + if (m[3]) { + cur = isDoc ? CodeMirror.Doc(m[3]) : CodeMirror(place, clone(opts, {value: m[3]})); + } else { + var other = m[5]; + if (!names.hasOwnProperty(other)) { + names[other] = editors.length; + editors.push(CodeMirror(place, opts)); + } + var doc = editors[names[other]].linkedDoc({ + sharedHist: !m[4], + from: m[6] ? Number(m[6]) : null, + to: m[7] ? Number(m[7]) : null + }); + cur = isDoc ? doc : CodeMirror(place, clone(opts, {value: doc})); + } + names[name] = editors.length; + editors.push(cur); + spec = spec.slice(m[0].length); + } + return editors; + } + + function clone(obj, props) { + if (!obj) return; + clone.prototype = obj; + var inst = new clone(); + if (props) for (var n in props) if (props.hasOwnProperty(n)) + inst[n] = props[n]; + return inst; + } + + function eqAll(val) { + var end = arguments.length, msg = null; + if (typeof arguments[end-1] == "string") + msg = arguments[--end]; + if (i == end) throw new Error("No editors provided to eqAll"); + for (var i = 1; i < end; ++i) + eq(arguments[i].getValue(), val, msg) + } + + function testDoc(name, spec, run, opts, expectFail) { + if (!opts) opts = {}; + + return test("doc_" + name, function() { + var place = document.getElementById("testground"); + var editors = instantiateSpec(spec, place, opts); + var successful = false; + + try { + run.apply(null, editors); + successful = true; + } finally { + if (!successful || verbose) { + place.style.visibility = "visible"; + } else { + for (var i = 0; i < editors.length; ++i) + if (editors[i] instanceof CodeMirror) + place.removeChild(editors[i].getWrapperElement()); + } + } + }, expectFail); + } + + var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent); + + function testBasic(a, b) { + eqAll("x", a, b); + a.setValue("hey"); + eqAll("hey", a, b); + b.setValue("wow"); + eqAll("wow", a, b); + a.replaceRange("u\nv\nw", Pos(0, 3)); + b.replaceRange("i", Pos(0, 4)); + b.replaceRange("j", Pos(2, 1)); + eqAll("wowui\nv\nwj", a, b); + } + + testDoc("basic", "A='x' B 0, "not at left"); + is(pos.top > 0, "not at top"); + }); + + testDoc("copyDoc", "A='u'", function(a) { + var copy = a.getDoc().copy(true); + a.setValue("foo"); + copy.setValue("bar"); + var old = a.swapDoc(copy); + eq(a.getValue(), "bar"); + a.undo(); + eq(a.getValue(), "u"); + a.swapDoc(old); + eq(a.getValue(), "foo"); + eq(old.historySize().undo, 1); + eq(old.copy(false).historySize().undo, 0); + }); + + testDoc("docKeepsMode", "A='1+1'", function(a) { + var other = CodeMirror.Doc("hi", "text/x-markdown"); + a.setOption("mode", "text/javascript"); + var old = a.swapDoc(other); + eq(a.getOption("mode"), "text/x-markdown"); + eq(a.getMode().name, "markdown"); + a.swapDoc(old); + eq(a.getOption("mode"), "text/javascript"); + eq(a.getMode().name, "javascript"); + }); + + testDoc("subview", "A='1\n2\n3\n4\n5' B<~A/1-3", function(a, b) { + eq(b.getValue(), "2\n3"); + eq(b.firstLine(), 1); + b.setCursor(Pos(4)); + eqCharPos(b.getCursor(), Pos(2, 1)); + a.replaceRange("-1\n0\n", Pos(0, 0)); + eq(b.firstLine(), 3); + eqCharPos(b.getCursor(), Pos(4, 1)); + a.undo(); + eqCharPos(b.getCursor(), Pos(2, 1)); + b.replaceRange("oyoy\n", Pos(2, 0)); + eq(a.getValue(), "1\n2\noyoy\n3\n4\n5"); + b.undo(); + eq(a.getValue(), "1\n2\n3\n4\n5"); + }); + + testDoc("subviewEditOnBoundary", "A='11\n22\n33\n44\n55' B<~A/1-4", function(a, b) { + a.replaceRange("x\nyy\nz", Pos(0, 1), Pos(2, 1)); + eq(b.firstLine(), 2); + eq(b.lineCount(), 2); + eq(b.getValue(), "z3\n44"); + a.replaceRange("q\nrr\ns", Pos(3, 1), Pos(4, 1)); + eq(b.firstLine(), 2); + eq(b.getValue(), "z3\n4q"); + eq(a.getValue(), "1x\nyy\nz3\n4q\nrr\ns5"); + a.execCommand("selectAll"); + a.replaceSelection("!"); + eqAll("!", a, b); + }); + + + testDoc("sharedMarker", "A='ab\ncd\nef\ngh' B 500){ + totalTime = 0; + delay = 50; + } + setTimeout(function(){step(i + 1);}, delay); + } else { // Quit tests + running = false; + return null; + } + } + step(0); +} + +function label(str, msg) { + if (msg) return str + " (" + msg + ")"; + return str; +} +function eq(a, b, msg) { + if (a != b) throw new Failure(label(a + " != " + b, msg)); +} +function notEq(a, b, msg) { + if (a == b) throw new Failure(label(a + " == " + b, msg)); +} +function near(a, b, margin, msg) { + if (Math.abs(a - b) > margin) + throw new Failure(label(a + " is not close to " + b + " (" + margin + ")", msg)); +} +function eqCharPos(a, b, msg) { + function str(p) { return "{line:" + p.line + ",ch:" + p.ch + ",sticky:" + p.sticky + "}"; } + if (a == b) return; + if (a == null) throw new Failure(label("comparing null to " + str(b), msg)); + if (b == null) throw new Failure(label("comparing " + str(a) + " to null", msg)); + if (a.line != b.line || a.ch != b.ch) throw new Failure(label(str(a) + " != " + str(b), msg)); +} +function eqCursorPos(a, b, msg) { + eqCharPos(a, b, msg); + if (a) eq(a.sticky, b.sticky, msg ? msg + ' (sticky)' : 'sticky'); +} +function is(a, msg) { + if (!a) throw new Failure(label("assertion failed", msg)); +} + +function countTests() { + if (!filters.length) return tests.length; + var sum = 0; + for (var i = 0; i < tests.length; ++i) { + var name = tests[i].name; + for (var j = 0; j < filters.length; j++) { + if (name.match(filters[j])) { + ++sum; + break; + } + } + } + return sum; +} + +function parseTestFilter(s) { + if (/_\*$/.test(s)) return new RegExp("^" + s.slice(0, s.length - 2), "i"); + else return new RegExp(s, "i"); +} diff --git a/js/codemirror/test/emacs_test.js b/js/codemirror/test/emacs_test.js new file mode 100644 index 0000000..4d2fde6 --- /dev/null +++ b/js/codemirror/test/emacs_test.js @@ -0,0 +1,158 @@ +(function() { + "use strict"; + + var Pos = CodeMirror.Pos; + namespace = "emacs_"; + + var eventCache = {}; + function fakeEvent(keyName) { + var event = eventCache[key]; + if (event) return event; + + var ctrl, shift, alt; + var key = keyName.replace(/\w+-/g, function(type) { + if (type == "Ctrl-") ctrl = true; + else if (type == "Alt-") alt = true; + else if (type == "Shift-") shift = true; + return ""; + }); + var code; + for (var c in CodeMirror.keyNames) + if (CodeMirror.keyNames[c] == key) { code = c; break; } + if (code == null) throw new Error("Unknown key: " + key); + + return eventCache[keyName] = { + type: "keydown", keyCode: code, ctrlKey: ctrl, shiftKey: shift, altKey: alt, + preventDefault: function(){}, stopPropagation: function(){} + }; + } + + function sim(name, start /*, actions... */) { + var keys = Array.prototype.slice.call(arguments, 2); + testCM(name, function(cm) { + for (var i = 0; i < keys.length; ++i) { + var cur = keys[i]; + if (cur instanceof Pos) cm.setCursor(cur); + else if (cur.call) cur(cm); + else cm.triggerOnKeyDown(fakeEvent(cur)); + } + }, {keyMap: "emacs", value: start, mode: "javascript"}); + } + + function dialog(answer) { return function(cm) { cm.openDialog = function(_, cb) { cb(answer); }; }; } + + function at(line, ch, sticky) { return function(cm) { eqCursorPos(cm.getCursor(), Pos(line, ch, sticky)); }; } + function txt(str) { return function(cm) { eq(cm.getValue(), str); }; } + + sim("motionHSimple", "abc", "Ctrl-F", "Ctrl-F", "Ctrl-B", at(0, 1, "after")); + sim("motionHMulti", "abcde", + "Ctrl-4", "Ctrl-F", at(0, 4, "before"), "Ctrl--", "Ctrl-2", "Ctrl-F", at(0, 2, "after"), + "Ctrl-5", "Ctrl-B", at(0, 0, "after")); + + sim("motionHWord", "abc. def ghi", + "Alt-F", at(0, 3, "before"), "Alt-F", at(0, 8, "before"), + "Ctrl-B", "Alt-B", at(0, 5, "after"), "Alt-B", at(0, 0, "after")); + sim("motionHWordMulti", "abc. def ghi ", + "Ctrl-3", "Alt-F", at(0, 12, "before"), "Ctrl-2", "Alt-B", at(0, 5, "after"), + "Ctrl--", "Alt-B", at(0, 8, "before")); + + sim("motionVSimple", "a\nb\nc\n", "Ctrl-N", "Ctrl-N", "Ctrl-P", at(1, 0, "after")); + sim("motionVMulti", "a\nb\nc\nd\ne\n", + "Ctrl-2", "Ctrl-N", at(2, 0, "after"), "Ctrl-F", "Ctrl--", "Ctrl-N", at(1, 1, "before"), + "Ctrl--", "Ctrl-3", "Ctrl-P", at(4, 1, "before")); + + sim("killYank", "abc\ndef\nghi", + "Ctrl-F", "Ctrl-Space", "Ctrl-N", "Ctrl-N", "Ctrl-W", "Ctrl-E", "Ctrl-Y", + txt("ahibc\ndef\ng")); + sim("killRing", "abcdef", + "Ctrl-Space", "Ctrl-F", "Ctrl-W", "Ctrl-Space", "Ctrl-F", "Ctrl-W", + "Ctrl-Y", "Alt-Y", + txt("acdef")); + sim("copyYank", "abcd", + "Ctrl-Space", "Ctrl-E", "Alt-W", "Ctrl-Y", + txt("abcdabcd")); + + sim("killLineSimple", "foo\nbar", "Ctrl-F", "Ctrl-K", txt("f\nbar")); + sim("killLineEmptyLine", "foo\n \nbar", "Ctrl-N", "Ctrl-K", txt("foo\nbar")); + sim("killLineMulti", "foo\nbar\nbaz", + "Ctrl-F", "Ctrl-F", "Ctrl-K", "Ctrl-K", "Ctrl-K", "Ctrl-A", "Ctrl-Y", + txt("o\nbarfo\nbaz")); + + sim("moveByParagraph", "abc\ndef\n\n\nhij\nklm\n\n", + "Ctrl-F", "Ctrl-Down", at(2, 0), "Ctrl-Down", at(6, 0), + "Ctrl-N", "Ctrl-Up", at(3, 0), "Ctrl-Up", at(0, 0), + Pos(1, 2), "Ctrl-Down", at(2, 0), Pos(4, 2), "Ctrl-Up", at(3, 0)); + sim("moveByParagraphMulti", "abc\n\ndef\n\nhij\n\nklm", + "Ctrl-U", "2", "Ctrl-Down", at(3, 0), + "Shift-Alt-.", "Ctrl-3", "Ctrl-Up", at(1, 0)); + + sim("moveBySentence", "sentence one! sentence\ntwo\n\nparagraph two", + "Alt-E", at(0, 13), "Alt-E", at(1, 3), "Ctrl-F", "Alt-A", at(0, 13)); + + sim("moveByExpr", "function foo(a, b) {}", + "Ctrl-Alt-F", at(0, 8), "Ctrl-Alt-F", at(0, 12), "Ctrl-Alt-F", at(0, 18), + "Ctrl-Alt-B", at(0, 12), "Ctrl-Alt-B", at(0, 9)); + sim("moveByExprMulti", "foo bar baz bug", + "Ctrl-2", "Ctrl-Alt-F", at(0, 7), + "Ctrl--", "Ctrl-Alt-F", at(0, 4), + "Ctrl--", "Ctrl-2", "Ctrl-Alt-B", at(0, 11)); + sim("delExpr", "var x = [\n a,\n b\n c\n];", + Pos(0, 8), "Ctrl-Alt-K", txt("var x = ;"), "Ctrl-/", + Pos(4, 1), "Ctrl-Alt-Backspace", txt("var x = ;")); + sim("delExprMulti", "foo bar baz", + "Ctrl-2", "Ctrl-Alt-K", txt(" baz"), + "Ctrl-/", "Ctrl-E", "Ctrl-2", "Ctrl-Alt-Backspace", txt("foo ")); + + sim("justOneSpace", "hi bye ", + Pos(0, 4), "Alt-Space", txt("hi bye "), + Pos(0, 4), "Alt-Space", txt("hi b ye "), + "Ctrl-A", "Alt-Space", "Ctrl-E", "Alt-Space", txt(" hi b ye ")); + + sim("openLine", "foo bar", "Alt-F", "Ctrl-O", txt("foo\n bar")) + + sim("transposeChar", "abcd\ne", + "Ctrl-F", "Ctrl-T", "Ctrl-T", txt("bcad\ne"), at(0, 3), + "Ctrl-F", "Ctrl-T", "Ctrl-T", "Ctrl-T", txt("bcda\ne"), at(0, 4), + "Ctrl-F", "Ctrl-T", txt("bcde\na"), at(1, 1)); + + sim("manipWordCase", "foo BAR bAZ", + "Alt-C", "Alt-L", "Alt-U", txt("Foo bar BAZ"), + "Ctrl-A", "Alt-U", "Alt-L", "Alt-C", txt("FOO bar Baz")); + sim("manipWordCaseMulti", "foo Bar bAz", + "Ctrl-2", "Alt-U", txt("FOO BAR bAz"), + "Ctrl-A", "Ctrl-3", "Alt-C", txt("Foo Bar Baz")); + + sim("upExpr", "foo {\n bar[];\n baz(blah);\n}", + Pos(2, 7), "Ctrl-Alt-U", at(2, 5), "Ctrl-Alt-U", at(0, 4)); + sim("transposeExpr", "do foo[bar] dah", + Pos(0, 6), "Ctrl-Alt-T", txt("do [bar]foo dah")); + + sim("clearMark", "abcde", Pos(0, 2), "Ctrl-Space", "Ctrl-F", "Ctrl-F", + "Ctrl-G", "Ctrl-W", txt("abcde")); + + sim("delRegion", "abcde", "Ctrl-Space", "Ctrl-F", "Ctrl-F", "Delete", txt("cde")); + sim("backspaceRegion", "abcde", "Ctrl-Space", "Ctrl-F", "Ctrl-F", "Backspace", txt("cde")); + + sim("backspaceDoesntAddToRing", "foobar", "Ctrl-F", "Ctrl-F", "Ctrl-F", "Ctrl-K", "Backspace", "Backspace", "Ctrl-Y", txt("fbar")); + + sim("gotoLine", "0\n1\n2\n3", dialog("3"), "Alt-G", "G", at(2, 0)); + sim("gotoInvalidLineFloat", "0\n1\n2\n3", dialog("2.2"), "Alt-G", "G", at(0, 0)); + + testCM("gotoDialogTemplate", function(cm) { + cm.openDialog = function(template, cb) { + var input = template.querySelector("input"); + eq(template.textContent, "Goto line: "); + eq(input.tagName, "INPUT"); + }; + cm.triggerOnKeyDown(fakeEvent("Alt-G")); + cm.triggerOnKeyDown(fakeEvent("G")); + }, {value: "", keyMap: "emacs"}); + + testCM("save", function(cm) { + var saved = false; + CodeMirror.commands.save = function(cm) { saved = cm.getValue(); }; + cm.triggerOnKeyDown(fakeEvent("Ctrl-X")); + cm.triggerOnKeyDown(fakeEvent("Ctrl-S")); + is(saved, "hi"); + }, {value: "hi", keyMap: "emacs"}); +})(); diff --git a/js/codemirror/test/html-hint-test.js b/js/codemirror/test/html-hint-test.js new file mode 100644 index 0000000..e854427 --- /dev/null +++ b/js/codemirror/test/html-hint-test.js @@ -0,0 +1,83 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var Pos = CodeMirror.Pos; + + namespace = "html-hint_"; + + testData =[ + { + name: "html-element", + value: "\n"] + }, + { + name: "linkref-attribute", + value: "\n", + list: [""] + } + ]; + + function escapeHtmlList(o) { + return '' + + JSON.stringify(o.list,null,2) + .replace(//g, ">") + + '' + } + + function test(name, spec) { + testCM(name, function(cm) { + cm.setValue(spec.value); + cm.setCursor(spec.cursor); + var completion = CodeMirror.hint.html(cm); + if (!deepCompare(completion.list, spec.list)) + throw new Failure("Wrong completion results. Got" + + escapeHtmlList(completion) +" but expected" + + escapeHtmlList(spec)); + eqCharPos(completion.from, spec.from,'from-failed'); + eqCharPos(completion.to, spec.to, 'to-failed'); + }, { + value: spec.value, + mode: spec.mode || "text/html" + }); + } + + testData.forEach(function (value) { + // Use sane defaults + var lines = value.value.split(/\n/); + value.to = value.pos || Pos(lines.length-1, lines[lines.length-1].length); + value.from = value.from || Pos(lines.length-1,0); + value.cursor = value.cursor || value.to; + var name = value.name ||value.value; + test(name,value) + }); + + function deepCompare(a, b) { + if (a === b) return true; + if (!(a && typeof a === "object") || + !(b && typeof b === "object")) return false; + var array = a instanceof Array + if ((b instanceof Array) !== array) return false; + if (array) { + if (a.length !== b.length) return false; + for (var i = 0; i < a.length; i++) if (!deepCompare(a[i], b[i])) return false + } else { + for (var p in a) if (!(p in b) || !deepCompare(a[p], b[p])) return false; + for (var p in b) if (!(p in a)) return false + } + return true + } +})(); diff --git a/js/codemirror/test/index.html b/js/codemirror/test/index.html new file mode 100644 index 0000000..ab7ad43 --- /dev/null +++ b/js/codemirror/test/index.html @@ -0,0 +1,290 @@ + + + +CodeMirror: Test Suite + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    Test Suite

    + +

    A limited set of programmatic sanity tests for CodeMirror.

    + +
    +
    Ran 0 of 0 tests
    +
    +

    Please enable JavaScript...

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/js/codemirror/test/lint.js b/js/codemirror/test/lint.js new file mode 100644 index 0000000..561f146 --- /dev/null +++ b/js/codemirror/test/lint.js @@ -0,0 +1,21 @@ +var blint = require("blint"); + +["mode", "lib", "addon", "keymap"].forEach(function(dir) { + blint.checkDir(dir, { + browser: true, + allowedGlobals: ["CodeMirror", "define", "test", "requirejs", "globalThis", "WeakSet"], + ecmaVersion: 5, + tabs: dir == "lib" + }); +}); + +["src"].forEach(function(dir) { + blint.checkDir(dir, { + browser: true, + allowedGlobals: ["WeakSet"], + ecmaVersion: 6, + semicolons: false + }); +}); + +module.exports = {ok: blint.success()}; diff --git a/js/codemirror/test/mode_test.css b/js/codemirror/test/mode_test.css new file mode 100644 index 0000000..f83271b --- /dev/null +++ b/js/codemirror/test/mode_test.css @@ -0,0 +1,23 @@ +.mt-output .mt-token { + border: 1px solid #ddd; + white-space: pre; + font-family: "Consolas", monospace; + text-align: center; +} + +.mt-output .mt-style { + font-size: x-small; +} + +.mt-output .mt-state { + font-size: x-small; + vertical-align: top; +} + +.mt-output .mt-state-row { + display: none; +} + +.mt-state-unhide .mt-output .mt-state-row { + display: table-row; +} diff --git a/js/codemirror/test/mode_test.js b/js/codemirror/test/mode_test.js new file mode 100644 index 0000000..e7c0cf9 --- /dev/null +++ b/js/codemirror/test/mode_test.js @@ -0,0 +1,193 @@ +/** + * Helper to test CodeMirror highlighting modes. It pretty prints output of the + * highlighter and can check against expected styles. + * + * Mode tests are registered by calling test.mode(testName, mode, + * tokens), where mode is a mode object as returned by + * CodeMirror.getMode, and tokens is an array of lines that make up + * the test. + * + * These lines are strings, in which styled stretches of code are + * enclosed in brackets `[]`, and prefixed by their style. For + * example, `[keyword if]`. Brackets in the code itself must be + * duplicated to prevent them from being interpreted as token + * boundaries. For example `a[[i]]` for `a[i]`. If a token has + * multiple styles, the styles must be separated by ampersands, for + * example `[tag&error ]`. + * + * See the test.js files in the css, markdown, gfm, and stex mode + * directories for examples. + */ +(function() { + function findSingle(str, pos, ch) { + for (;;) { + var found = str.indexOf(ch, pos); + if (found == -1) return null; + if (str.charAt(found + 1) != ch) return found; + pos = found + 2; + } + } + + var styleName = /[\w&-_]+/g; + function parseTokens(strs) { + var tokens = [], plain = ""; + for (var i = 0; i < strs.length; ++i) { + if (i) plain += "\n"; + var str = strs[i], pos = 0; + while (pos < str.length) { + var style = null, text; + if (str.charAt(pos) == "[" && str.charAt(pos+1) != "[") { + styleName.lastIndex = pos + 1; + var m = styleName.exec(str); + style = m[0].replace(/&/g, " "); + var textStart = pos + style.length + 2; + var end = findSingle(str, textStart, "]"); + if (end == null) throw new Error("Unterminated token at " + pos + " in '" + str + "'" + style); + text = str.slice(textStart, end); + pos = end + 1; + } else { + var end = findSingle(str, pos, "["); + if (end == null) end = str.length; + text = str.slice(pos, end); + pos = end; + } + text = text.replace(/\[\[|\]\]/g, function(s) {return s.charAt(0);}); + tokens.push({style: style, text: text}); + plain += text; + } + } + return {tokens: tokens, plain: plain}; + } + + test.mode = function(name, mode, tokens, modeName) { + var data = parseTokens(tokens); + return test((modeName || mode.name) + "_" + name, function() { + return compare(data.plain, data.tokens, mode); + }); + }; + + function esc(str) { + return str.replace(/&/g, '&').replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); + } + + function compare(text, expected, mode) { + + var expectedOutput = []; + for (var i = 0; i < expected.length; ++i) { + var sty = expected[i].style; + if (sty && sty.indexOf(" ")) sty = sty.split(' ').sort().join(' '); + expectedOutput.push({style: sty, text: expected[i].text}); + } + + var observedOutput = highlight(text, mode); + + var s = ""; + var diff = highlightOutputsDifferent(expectedOutput, observedOutput); + if (diff != null) { + s += '
    '; + s += '
    ' + esc(text) + '
    '; + s += '
    '; + s += 'expected:'; + s += prettyPrintOutputTable(expectedOutput, diff); + s += 'observed: [display states]'; + s += prettyPrintOutputTable(observedOutput, diff); + s += '
    '; + s += '
    '; + } + if (observedOutput.indentFailures) { + for (var i = 0; i < observedOutput.indentFailures.length; i++) + s += "
    " + esc(observedOutput.indentFailures[i]) + "
    "; + } + if (s) throw new Failure(s); + } + + function stringify(obj) { + function replacer(key, obj) { + if (typeof obj == "function") { + var m = obj.toString().match(/function\s*[^\s(]*/); + return m ? m[0] : "function"; + } + return obj; + } + if (window.JSON && JSON.stringify) + return JSON.stringify(obj, replacer, 2); + return "[unsupported]"; // Fail safely if no native JSON. + } + + function highlight(string, mode) { + var state = mode.startState(); + + var lines = string.replace(/\r\n/g,'\n').split('\n'); + var st = [], pos = 0; + for (var i = 0; i < lines.length; ++i) { + var line = lines[i], newLine = true; + if (mode.indent) { + var ws = line.match(/^\s*/)[0]; + var indent = mode.indent(state, line.slice(ws.length), line); + if (indent != CodeMirror.Pass && indent != ws.length) + (st.indentFailures || (st.indentFailures = [])).push( + "Indentation of line " + (i + 1) + " is " + indent + " (expected " + ws.length + ")"); + } + var stream = new CodeMirror.StringStream(line, 4, { + lookAhead: function(n) { return lines[i + n] } + }); + if (line == "" && mode.blankLine) mode.blankLine(state); + /* Start copied code from CodeMirror.highlight */ + while (!stream.eol()) { + for (var j = 0; j < 10 && stream.start >= stream.pos; j++) + var compare = mode.token(stream, state); + if (j == 10) + throw new Failure("Failed to advance the stream." + stream.string + " " + stream.pos); + var substr = stream.current(); + if (compare && compare.indexOf(" ") > -1) compare = compare.split(' ').sort().join(' '); + stream.start = stream.pos; + if (pos && st[pos-1].style == compare && !newLine) { + st[pos-1].text += substr; + } else if (substr) { + st[pos++] = {style: compare, text: substr, state: stringify(state)}; + } + // Give up when line is ridiculously long + if (stream.pos > 5000) { + st[pos++] = {style: null, text: this.text.slice(stream.pos)}; + break; + } + newLine = false; + } + } + + return st; + } + + function highlightOutputsDifferent(o1, o2) { + var minLen = Math.min(o1.length, o2.length); + for (var i = 0; i < minLen; ++i) + if (o1[i].style != o2[i].style || o1[i].text != o2[i].text) return i; + if (o1.length > minLen || o2.length > minLen) return minLen; + } + + function prettyPrintOutputTable(output, diffAt) { + var s = ''; + s += ''; + for (var i = 0; i < output.length; ++i) { + var style = output[i].style, val = output[i].text; + s += + ''; + } + s += ''; + for (var i = 0; i < output.length; ++i) { + s += ''; + } + if(output[0].state) { + s += ''; + for (var i = 0; i < output.length; ++i) { + s += ''; + } + } + s += '
    ' + + '' + + esc(val.replace(/ /g,'\xb7')) + // · MIDDLE DOT + '' + + '
    ' + (output[i].style || null) + '
    ' + esc(output[i].state) + '
    '; + return s; + } +})(); diff --git a/js/codemirror/test/multi_test.js b/js/codemirror/test/multi_test.js new file mode 100644 index 0000000..cc042f7 --- /dev/null +++ b/js/codemirror/test/multi_test.js @@ -0,0 +1,295 @@ +(function() { + namespace = "multi_"; + + function hasSelections(cm) { + var sels = cm.listSelections(); + var given = (arguments.length - 1) / 4; + if (sels.length != given) + throw new Failure("expected " + given + " selections, found " + sels.length); + for (var i = 0, p = 1; i < given; i++, p += 4) { + var anchor = Pos(arguments[p], arguments[p + 1]); + var head = Pos(arguments[p + 2], arguments[p + 3]); + eqCharPos(sels[i].anchor, anchor, "anchor of selection " + i); + eqCharPos(sels[i].head, head, "head of selection " + i); + } + } + function hasCursors(cm) { + var sels = cm.listSelections(); + var given = (arguments.length - 1) / 2; + if (sels.length != given) + throw new Failure("expected " + given + " selections, found " + sels.length); + for (var i = 0, p = 1; i < given; i++, p += 2) { + eqCursorPos(sels[i].anchor, sels[i].head, "something selected for " + i); + var head = Pos(arguments[p], arguments[p + 1]); + eqCharPos(sels[i].head, head, "selection " + i); + } + } + + testCM("getSelection", function(cm) { + select(cm, {anchor: Pos(0, 0), head: Pos(1, 2)}, {anchor: Pos(2, 2), head: Pos(2, 0)}); + eq(cm.getSelection(), "1234\n56\n90"); + eq(cm.getSelection(false).join("|"), "1234|56|90"); + eq(cm.getSelections().join("|"), "1234\n56|90"); + }, {value: "1234\n5678\n90"}); + + testCM("setSelection", function(cm) { + select(cm, Pos(3, 0), Pos(0, 0), {anchor: Pos(2, 5), head: Pos(1, 0)}); + hasSelections(cm, 0, 0, 0, 0, + 2, 5, 1, 0, + 3, 0, 3, 0); + cm.setSelection(Pos(1, 2), Pos(1, 1)); + hasSelections(cm, 1, 2, 1, 1); + select(cm, {anchor: Pos(1, 1), head: Pos(2, 4)}, + {anchor: Pos(0, 0), head: Pos(1, 3)}, + Pos(3, 0), Pos(2, 2)); + hasSelections(cm, 0, 0, 2, 4, + 3, 0, 3, 0); + cm.setSelections([{anchor: Pos(0, 1), head: Pos(0, 2)}, + {anchor: Pos(1, 1), head: Pos(1, 2)}, + {anchor: Pos(2, 1), head: Pos(2, 2)}], 1); + eqCharPos(cm.getCursor("head"), Pos(1, 2)); + eqCharPos(cm.getCursor("anchor"), Pos(1, 1)); + eqCharPos(cm.getCursor("from"), Pos(1, 1)); + eqCharPos(cm.getCursor("to"), Pos(1, 2)); + cm.setCursor(Pos(1, 1)); + hasCursors(cm, 1, 1); + }, {value: "abcde\nabcde\nabcde\n"}); + + testCM("somethingSelected", function(cm) { + select(cm, Pos(0, 1), {anchor: Pos(0, 3), head: Pos(0, 5)}); + eq(cm.somethingSelected(), true); + select(cm, Pos(0, 1), Pos(0, 3), Pos(0, 5)); + eq(cm.somethingSelected(), false); + }, {value: "123456789"}); + + testCM("extendSelection", function(cm) { + select(cm, Pos(0, 1), Pos(1, 1), Pos(2, 1)); + cm.setExtending(true); + cm.extendSelections([Pos(0, 2), Pos(1, 0), Pos(2, 3)]); + hasSelections(cm, 0, 1, 0, 2, + 1, 1, 1, 0, + 2, 1, 2, 3); + cm.extendSelection(Pos(2, 4), Pos(2, 0)); + hasSelections(cm, 2, 4, 2, 0); + }, {value: "1234\n1234\n1234"}); + + testCM("addSelection", function(cm) { + select(cm, Pos(0, 1), Pos(1, 1)); + cm.addSelection(Pos(0, 0), Pos(0, 4)); + hasSelections(cm, 0, 0, 0, 4, + 1, 1, 1, 1); + cm.addSelection(Pos(2, 2)); + hasSelections(cm, 0, 0, 0, 4, + 1, 1, 1, 1, + 2, 2, 2, 2); + }, {value: "1234\n1234\n1234"}); + + testCM("replaceSelection", function(cm) { + var selections = [{anchor: Pos(0, 0), head: Pos(0, 1)}, + {anchor: Pos(0, 2), head: Pos(0, 3)}, + {anchor: Pos(0, 4), head: Pos(0, 5)}, + {anchor: Pos(2, 1), head: Pos(2, 4)}, + {anchor: Pos(2, 5), head: Pos(2, 6)}]; + var val = "123456\n123456\n123456"; + cm.setValue(val); + cm.setSelections(selections); + cm.replaceSelection("ab", "around"); + eq(cm.getValue(), "ab2ab4ab6\n123456\n1ab5ab"); + hasSelections(cm, 0, 0, 0, 2, + 0, 3, 0, 5, + 0, 6, 0, 8, + 2, 1, 2, 3, + 2, 4, 2, 6); + cm.setValue(val); + cm.setSelections(selections); + cm.replaceSelection("", "around"); + eq(cm.getValue(), "246\n123456\n15"); + hasSelections(cm, 0, 0, 0, 0, + 0, 1, 0, 1, + 0, 2, 0, 2, + 2, 1, 2, 1, + 2, 2, 2, 2); + cm.setValue(val); + cm.setSelections(selections); + cm.replaceSelection("X\nY\nZ", "around"); + hasSelections(cm, 0, 0, 2, 1, + 2, 2, 4, 1, + 4, 2, 6, 1, + 8, 1, 10, 1, + 10, 2, 12, 1); + cm.replaceSelection("a", "around"); + hasSelections(cm, 0, 0, 0, 1, + 0, 2, 0, 3, + 0, 4, 0, 5, + 2, 1, 2, 2, + 2, 3, 2, 4); + cm.replaceSelection("xy", "start"); + hasSelections(cm, 0, 0, 0, 0, + 0, 3, 0, 3, + 0, 6, 0, 6, + 2, 1, 2, 1, + 2, 4, 2, 4); + cm.replaceSelection("z\nf"); + hasSelections(cm, 1, 1, 1, 1, + 2, 1, 2, 1, + 3, 1, 3, 1, + 6, 1, 6, 1, + 7, 1, 7, 1); + eq(cm.getValue(), "z\nfxy2z\nfxy4z\nfxy6\n123456\n1z\nfxy5z\nfxy"); + }); + + function select(cm) { + var sels = []; + for (var i = 1; i < arguments.length; i++) { + var arg = arguments[i]; + if (arg.head) sels.push(arg); + else sels.push({head: arg, anchor: arg}); + } + cm.setSelections(sels, sels.length - 1); + } + + testCM("indentSelection", function(cm) { + select(cm, Pos(0, 1), Pos(1, 1)); + cm.indentSelection(4); + eq(cm.getValue(), " foo\n bar\nbaz"); + + select(cm, Pos(0, 2), Pos(0, 3), Pos(0, 4)); + cm.indentSelection(-2); + eq(cm.getValue(), " foo\n bar\nbaz"); + + select(cm, {anchor: Pos(0, 0), head: Pos(1, 2)}, + {anchor: Pos(1, 3), head: Pos(2, 0)}); + cm.indentSelection(-2); + eq(cm.getValue(), "foo\n bar\nbaz"); + }, {value: "foo\nbar\nbaz"}); + + testCM("killLine", function(cm) { + select(cm, Pos(0, 1), Pos(0, 2), Pos(1, 1)); + cm.execCommand("killLine"); + eq(cm.getValue(), "f\nb\nbaz"); + cm.execCommand("killLine"); + eq(cm.getValue(), "fbbaz"); + cm.setValue("foo\nbar\nbaz"); + select(cm, Pos(0, 1), {anchor: Pos(0, 2), head: Pos(2, 1)}); + cm.execCommand("killLine"); + eq(cm.getValue(), "faz"); + }, {value: "foo\nbar\nbaz"}); + + testCM("deleteLine", function(cm) { + select(cm, Pos(0, 0), + {head: Pos(0, 1), anchor: Pos(2, 0)}, + Pos(4, 0)); + cm.execCommand("deleteLine"); + eq(cm.getValue(), "4\n6\n7"); + select(cm, Pos(2, 1)); + cm.execCommand("deleteLine"); + eq(cm.getValue(), "4\n6\n"); + }, {value: "1\n2\n3\n4\n5\n6\n7"}); + + testCM("deleteH", function(cm) { + select(cm, Pos(0, 4), {anchor: Pos(1, 4), head: Pos(1, 5)}); + cm.execCommand("delWordAfter"); + eq(cm.getValue(), "foo bar baz\nabc ef ghi\n"); + cm.execCommand("delWordAfter"); + eq(cm.getValue(), "foo baz\nabc ghi\n"); + cm.execCommand("delCharBefore"); + cm.execCommand("delCharBefore"); + eq(cm.getValue(), "fo baz\nab ghi\n"); + select(cm, Pos(0, 3), Pos(0, 4), Pos(0, 5)); + cm.execCommand("delWordAfter"); + eq(cm.getValue(), "fo \nab ghi\n"); + }, {value: "foo bar baz\nabc def ghi\n"}); + + testCM("goLineStart", function(cm) { + select(cm, Pos(0, 2), Pos(0, 3), Pos(1, 1)); + cm.execCommand("goLineStart"); + hasCursors(cm, 0, 0, 1, 0); + select(cm, Pos(1, 1), Pos(0, 1)); + cm.setExtending(true); + cm.execCommand("goLineStart"); + hasSelections(cm, 0, 1, 0, 0, + 1, 1, 1, 0); + }, {value: "foo\nbar\nbaz"}); + + testCM("moveV", function(cm) { + select(cm, Pos(0, 2), Pos(1, 2)); + cm.execCommand("goLineDown"); + hasCursors(cm, 1, 2, 2, 2); + cm.execCommand("goLineUp"); + hasCursors(cm, 0, 2, 1, 2); + cm.execCommand("goLineUp"); + hasCursors(cm, 0, 0, 0, 2); + cm.execCommand("goLineUp"); + hasCursors(cm, 0, 0); + select(cm, Pos(0, 2), Pos(1, 2)); + cm.setExtending(true); + cm.execCommand("goLineDown"); + hasSelections(cm, 0, 2, 2, 2); + }, {value: "12345\n12345\n12345"}); + + testCM("moveH", function(cm) { + select(cm, Pos(0, 1), Pos(0, 3), Pos(0, 5), Pos(2, 3)); + cm.execCommand("goCharRight"); + hasCursors(cm, 0, 2, 0, 4, 1, 0, 2, 4); + cm.execCommand("goCharLeft"); + hasCursors(cm, 0, 1, 0, 3, 0, 5, 2, 3); + for (var i = 0; i < 15; i++) + cm.execCommand("goCharRight"); + hasCursors(cm, 2, 4, 2, 5); + }, {value: "12345\n12345\n12345"}); + + testCM("newlineAndIndent", function(cm) { + select(cm, Pos(0, 5), Pos(1, 5)); + cm.execCommand("newlineAndIndent"); + hasCursors(cm, 1, 2, 3, 2); + eq(cm.getValue(), "x = [\n 1];\ny = [\n 2];"); + cm.undo(); + eq(cm.getValue(), "x = [1];\ny = [2];"); + hasCursors(cm, 0, 5, 1, 5); + select(cm, Pos(0, 5), Pos(0, 6)); + cm.execCommand("newlineAndIndent"); + hasCursors(cm, 1, 2, 2, 0); + eq(cm.getValue(), "x = [\n 1\n];\ny = [2];"); + }, {value: "x = [1];\ny = [2];", mode: "javascript"}); + + testCM("goDocStartEnd", function(cm) { + select(cm, Pos(0, 1), Pos(1, 1)); + cm.execCommand("goDocStart"); + hasCursors(cm, 0, 0); + select(cm, Pos(0, 1), Pos(1, 1)); + cm.execCommand("goDocEnd"); + hasCursors(cm, 1, 3); + select(cm, Pos(0, 1), Pos(1, 1)); + cm.setExtending(true); + cm.execCommand("goDocEnd"); + hasSelections(cm, 1, 1, 1, 3); + }, {value: "abc\ndef"}); + + testCM("selectionHistory", function(cm) { + for (var i = 0; i < 3; ++i) + cm.addSelection(Pos(0, i * 2), Pos(0, i * 2 + 1)); + cm.execCommand("undoSelection"); + eq(cm.getSelection(), "1\n2"); + cm.execCommand("undoSelection"); + eq(cm.getSelection(), "1"); + cm.execCommand("undoSelection"); + eq(cm.getSelection(), ""); + eqCharPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("redoSelection"); + eq(cm.getSelection(), "1"); + cm.execCommand("redoSelection"); + eq(cm.getSelection(), "1\n2"); + cm.execCommand("redoSelection"); + eq(cm.getSelection(), "1\n2\n3"); + }, {value: "1 2 3"}); + + testCM("selectionsMayTouch", function(cm) { + select(cm, Pos(0, 0), Pos(0, 2)) + cm.setExtending(true); + cm.extendSelections([Pos(0, 2), Pos(0, 4)]) + hasSelections(cm, 0, 0, 0, 2, + 0, 2, 0, 4) + cm.extendSelections([Pos(0, 3), Pos(0, 4)]) + hasSelections(cm, 0, 0, 0, 4) + }, {selectionsMayTouch: true, value: "1234"}) +})(); diff --git a/js/codemirror/test/run.js b/js/codemirror/test/run.js new file mode 100755 index 0000000..914cb97 --- /dev/null +++ b/js/codemirror/test/run.js @@ -0,0 +1,41 @@ +#!/usr/bin/env node + +var lint = require("./lint"); + +var files = new (require('node-static').Server)(); + +var server = require('http').createServer(function (req, res) { + req.addListener('end', function () { + files.serve(req, res, function (err/*, result */) { + if (err) { + console.error(err); + process.exit(1); + } + }); + }).resume(); +}).addListener('error', function (err) { + throw err; +}).listen(3000,(async () => { + const puppeteer = require('puppeteer'); + const browser = await puppeteer.launch({args: ["--no-sandbox", "--disable-setuid-sandbox"]}) + const page = await browser.newPage() + page.on('console', msg => console.log("console:", msg.text())) + page.on('dialog', async dialog => { + console.log(dialog.message()) + await dialog.dismiss() + }) + page.evaluateOnNewDocument(() => window.automatedTests = true) + await page.goto('http://localhost:3000/test/index.html#' + (process.argv[2] || "")) + while(1) { + if (await page.evaluate(() => window.done)) break + await sleep(200) + } + let [failed, errors] = await page.evaluate(() => [window.failed, window.errored]) + for (let error of errors) console.log(error) + console.log(await page.evaluate(() => document.getElementById('output').innerText + "\n" + + document.getElementById('status').innerText)) + process.exit(failed > 0 || errors.length || !lint.ok ? 1 : 0) + await browser.close() +})()) + +function sleep(n) { return new Promise(acc => setTimeout(acc, n)) } diff --git a/js/codemirror/test/scroll_test.js b/js/codemirror/test/scroll_test.js new file mode 100644 index 0000000..d1d2190 --- /dev/null +++ b/js/codemirror/test/scroll_test.js @@ -0,0 +1,126 @@ +(function() { + "use strict"; + + namespace = "scroll_"; + + testCM("bars_hidden", function(cm) { + for (var i = 0;; i++) { + var wrapBox = cm.getWrapperElement().getBoundingClientRect(); + var scrollBox = cm.getScrollerElement().getBoundingClientRect(); + is(wrapBox.bottom < scrollBox.bottom - 10); + is(wrapBox.right < scrollBox.right - 10); + if (i == 1) break; + cm.getWrapperElement().style.height = "auto"; + cm.refresh(); + } + }); + + function barH(cm) { return byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0]; } + function barV(cm) { return byClassName(cm.getWrapperElement(), "CodeMirror-vscrollbar")[0]; } + + function displayBottom(cm, scrollbar) { + if (scrollbar && cm.display.scroller.offsetHeight > cm.display.scroller.clientHeight) + return barH(cm).getBoundingClientRect().top; + else + return cm.getWrapperElement().getBoundingClientRect().bottom - 1; + } + + function displayRight(cm, scrollbar) { + if (scrollbar && cm.display.scroller.offsetWidth > cm.display.scroller.clientWidth) + return barV(cm).getBoundingClientRect().left; + else + return cm.getWrapperElement().getBoundingClientRect().right - 1; + } + + function testMovedownFixed(cm, hScroll) { + cm.setSize("100px", "100px"); + if (hScroll) cm.setValue(new Array(100).join("x")); + var bottom = displayBottom(cm, hScroll); + for (var i = 0; i < 30; i++) { + cm.replaceSelection("x\n"); + var cursorBottom = cm.cursorCoords(null, "window").bottom; + is(cursorBottom <= bottom); + } + is(cursorBottom >= bottom - 5); + } + + testCM("movedown_fixed", function(cm) {testMovedownFixed(cm, false);}); + testCM("movedown_hscroll_fixed", function(cm) {testMovedownFixed(cm, true);}); + + function testMovedownResize(cm, hScroll) { + cm.getWrapperElement().style.height = "auto"; + if (hScroll) cm.setValue(new Array(100).join("x")); + cm.refresh(); + for (var i = 0; i < 30; i++) { + cm.replaceSelection("x\n"); + var bottom = displayBottom(cm, hScroll); + var cursorBottom = cm.cursorCoords(null, "window").bottom; + is(cursorBottom <= bottom); + is(cursorBottom >= bottom - 5); + } + } + + testCM("movedown_resize", function(cm) {testMovedownResize(cm, false);}); + testCM("movedown_hscroll_resize", function(cm) {testMovedownResize(cm, true);}); + + function testMoveright(cm, wrap, scroll) { + cm.setSize("100px", "100px"); + if (wrap) cm.setOption("lineWrapping", true); + if (scroll) { + cm.setValue("\n" + new Array(100).join("x\n")); + cm.setCursor(Pos(0, 0)); + } + var right = displayRight(cm, scroll); + for (var i = 0; i < 10; i++) { + cm.replaceSelection("xxxxxxxxxx"); + var cursorRight = cm.cursorCoords(null, "window").right; + is(cursorRight < right); + } + if (!wrap) is(cursorRight > right - 20); + } + + testCM("moveright", function(cm) {testMoveright(cm, false, false);}); + testCM("moveright_wrap", function(cm) {testMoveright(cm, true, false);}); + testCM("moveright_scroll", function(cm) {testMoveright(cm, false, true);}); + testCM("moveright_scroll_wrap", function(cm) {testMoveright(cm, true, true);}); + + testCM("suddenly_wide", function(cm) { + addDoc(cm, 100, 100); + cm.replaceSelection(new Array(600).join("l ") + "\n"); + cm.execCommand("goLineUp"); + cm.execCommand("goLineEnd"); + is(barH(cm).scrollLeft > cm.getScrollerElement().scrollLeft - 1); + }); + + testCM("wrap_changes_height", function(cm) { + var line = new Array(20).join("a ") + "\n"; + cm.setValue(new Array(20).join(line)); + var box = cm.getWrapperElement().getBoundingClientRect(); + cm.setSize(cm.cursorCoords(Pos(0), "window").right - box.left + 2, + cm.cursorCoords(Pos(19, 0), "window").bottom - box.top + 2); + cm.setCursor(Pos(19, 0)); + cm.replaceSelection("\n"); + is(cm.cursorCoords(null, "window").bottom < displayBottom(cm, false)); + }, {lineWrapping: true}); + + testCM("height_auto_with_gutter_expect_no_scroll_after_line_delete", function(cm) { + cm.setSize(null, "auto"); + cm.setValue("x\n"); + cm.execCommand("goDocEnd"); + cm.execCommand("delCharBefore"); + eq(cm.getScrollInfo().top, 0); + cm.scrollTo(null, 10); + is(cm.getScrollInfo().top < 5); + }, {lineNumbers: true}); + + testCM("bidi_ensureCursorVisible", function(cm) { + cm.setValue("
    وضع الاستخدام. عندما لا تعطى، وهذا الافتراضي إلى الطريقة الاولى\n"); + cm.execCommand("goLineStart"); + eq(cm.getScrollInfo().left, 0); + cm.execCommand("goCharRight"); + cm.execCommand("goCharRight"); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 3, "before")); + eq(cm.getScrollInfo().left, 0); + }, {lineWrapping: false}); +})(); diff --git a/js/codemirror/test/search_test.js b/js/codemirror/test/search_test.js new file mode 100644 index 0000000..0e468c0 --- /dev/null +++ b/js/codemirror/test/search_test.js @@ -0,0 +1,91 @@ +(function() { + "use strict"; + + function run(doc, query, options) { + var cursor = doc.getSearchCursor(query, null, options); + for (var i = 3; i < arguments.length; i += 4) { + var found = cursor.findNext(); + is(found, "not enough results (forward)"); + eqCharPos(Pos(arguments[i], arguments[i + 1]), cursor.from(), "from, forward, " + (i - 3) / 4); + eqCharPos(Pos(arguments[i + 2], arguments[i + 3]), cursor.to(), "to, forward, " + (i - 3) / 4); + } + is(!cursor.findNext(), "too many matches (forward)"); + for (var i = arguments.length - 4; i >= 3; i -= 4) { + var found = cursor.findPrevious(); + is(found, "not enough results (backwards)"); + eqCharPos(Pos(arguments[i], arguments[i + 1]), cursor.from(), "from, backwards, " + (i - 3) / 4); + eqCharPos(Pos(arguments[i + 2], arguments[i + 3]), cursor.to(), "to, backwards, " + (i - 3) / 4); + } + is(!cursor.findPrevious(), "too many matches (backwards)"); + } + + function test(name, f) { window.test("search_" + name, f) } + + test("simple", function() { + var doc = new CodeMirror.Doc("abcdefg\nabcdefg") + run(doc, "cde", false, 0, 2, 0, 5, 1, 2, 1, 5); + }); + + test("multiline", function() { + var doc = new CodeMirror.Doc("hallo\na\nb\ngoodbye") + run(doc, "llo\na\nb\ngoo", false, 0, 2, 3, 3); + run(doc, "blah\na\nb\nhall", false); + run(doc, "bye\nx\neye", false); + }); + + test("regexp", function() { + var doc = new CodeMirror.Doc("abcde\nabcde") + run(doc, /bcd/, false, 0, 1, 0, 4, 1, 1, 1, 4); + run(doc, /BCD/, false); + run(doc, /BCD/i, false, 0, 1, 0, 4, 1, 1, 1, 4); + }); + + test("regexpMultiline", function() { + var doc = new CodeMirror.Doc("fom fom\nbar\nbaz") + run(doc, /fo[^]*az/, {multiline: true}, 0, 0, 2, 3) + run(doc, /[oa][^u]/, {multiline: true}, 0, 1, 0, 3, 0, 5, 0, 7, 1, 1, 1, 3, 2, 1, 2, 3) + run(doc, /[a][^u]{2}/, {multiline: true}, 1, 1, 2, 0) + }) + + test("insensitive", function() { + var doc = new CodeMirror.Doc("hallo\nHALLO\noink\nhAllO") + run(doc, "All", false, 3, 1, 3, 4); + run(doc, "All", true, 0, 1, 0, 4, 1, 1, 1, 4, 3, 1, 3, 4); + }); + + test("multilineInsensitive", function() { + var doc = new CodeMirror.Doc("zie ginds komT\nDe Stoomboot\nuit Spanje weer aan") + run(doc, "komt\nde stoomboot\nuit", false); + run(doc, "komt\nde stoomboot\nuit", {caseFold: true}, 0, 10, 2, 3); + run(doc, "kOMt\ndE stOOmboot\nuiT", {caseFold: true}, 0, 10, 2, 3); + }); + + test("multilineInsensitiveSlow", function() { + var text = "" + for (var i = 0; i < 1000; i++) text += "foo\nbar\n" + var doc = new CodeMirror.Doc("find\nme\n" + text + "find\nme\n") + var t0 = +new Date + run(doc, /find\nme/, {multiline: true}, 0, 0, 1, 2, 2002, 0, 2003, 2) + is(+new Date - t0 < 100) + }) + + test("expandingCaseFold", function() { + var doc = new CodeMirror.Doc("İİ İİ\nuu uu") + run(doc, "", true, 0, 8, 0, 12, 1, 8, 1, 12); + run(doc, "İİ", true, 0, 3, 0, 5, 0, 6, 0, 8); + }); + + test("normalize", function() { + if (!String.prototype.normalize) return + var doc = new CodeMirror.Doc("yılbaşı\n수 있을까\nLe taux d'humidité à London") + run(doc, "s", false, 0, 5, 0, 6) + run(doc, "이", false, 1, 2, 1, 3) + run(doc, "a", false, 0, 4, 0, 5, 2, 4, 2, 5, 2, 19, 2, 20) + }) + + test("endOfLine", function() { + var doc = new CodeMirror.Doc("bbcdb\nabcd\nbbcdb\nabcd") + run(doc, /[^b]$/, {multiline: true}, 1, 3, 1, 4, 3, 3, 3, 4) + run(doc, /b$/, false, 0, 4, 0, 5, 2, 4, 2, 5) + }) +})(); diff --git a/js/codemirror/test/sql-hint-test.js b/js/codemirror/test/sql-hint-test.js new file mode 100644 index 0000000..15d2a36 --- /dev/null +++ b/js/codemirror/test/sql-hint-test.js @@ -0,0 +1,301 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/5/LICENSE + +(function() { + var Pos = CodeMirror.Pos; + + var simpleTables = { + "users": ["name", "score", "birthDate"], + "xcountries": ["name", "population", "size"] + }; + + var schemaTables = { + "schema.users": ["name", "score", "birthDate"], + "schema.countries": ["name", "population", "size"] + }; + + var displayTextTables = [{ + text: "mytable", + displayText: "mytable | The main table", + columns: [{text: "id", displayText: "id | Unique ID"}, + {text: "name", displayText: "name | The name"}] + }]; + + var displayTextTablesWithDefault = [ + { + text: "Api__TokenAliases", + columns: [ + { + text: "token", + displayText: "token | varchar(255) | Primary", + columnName: "token", + columnHint: "varchar(255) | Primary" + }, + { + text: "alias", + displayText: "alias | varchar(255) | Primary", + columnName: "alias", + columnHint: "varchar(255) | Primary" + } + ] + }, + { + text: "mytable", + columns: [ + { text: "id", displayText: "id | Unique ID" }, + { text: "name", displayText: "name | The name" } + ] + } + ]; + + namespace = "sql-hint_"; + + function test(name, spec) { + testCM(name, function(cm) { + cm.setValue(spec.value); + cm.setCursor(spec.cursor); + var completion = CodeMirror.hint.sql(cm, { + tables: spec.tables, + defaultTable: spec.defaultTable, + disableKeywords: spec.disableKeywords + }); + if (!deepCompare(completion.list, spec.list)) + throw new Failure("Wrong completion results " + JSON.stringify(completion.list) + " vs " + JSON.stringify(spec.list)); + eqCharPos(completion.from, spec.from); + eqCharPos(completion.to, spec.to); + }, { + value: spec.value, + mode: spec.mode || "text/x-mysql" + }); + } + + test("keywords", { + value: "SEL", + cursor: Pos(0, 3), + list: [{"text":"SELECT","className":"CodeMirror-hint-keyword"}], + from: Pos(0, 0), + to: Pos(0, 3) + }); + + test("keywords_disabled", { + value: "SEL", + cursor: Pos(0, 3), + disableKeywords: true, + list: [], + from: Pos(0, 0), + to: Pos(0, 3) + }); + + test("from", { + value: "SELECT * fr", + cursor: Pos(0, 11), + list: [{"text":"FROM","className":"CodeMirror-hint-keyword"}], + from: Pos(0, 9), + to: Pos(0, 11) + }); + + test("table", { + value: "SELECT xc", + cursor: Pos(0, 9), + tables: simpleTables, + list: [{"text":"xcountries","className":"CodeMirror-hint-table"}], + from: Pos(0, 7), + to: Pos(0, 9) + }); + + test("columns", { + value: "SELECT users.", + cursor: Pos(0, 13), + tables: simpleTables, + list: ["users.name", "users.score", "users.birthDate"], + from: Pos(0, 7), + to: Pos(0, 13) + }); + + test("singlecolumn", { + value: "SELECT users.na", + cursor: Pos(0, 15), + tables: simpleTables, + list: ["users.name"], + from: Pos(0, 7), + to: Pos(0, 15) + }); + + test("quoted", { + value: "SELECT `users`.`na", + cursor: Pos(0, 18), + tables: simpleTables, + list: ["`users`.`name`"], + from: Pos(0, 7), + to: Pos(0, 18) + }); + + test("doublequoted", { + value: "SELECT \"users\".\"na", + cursor: Pos(0, 18), + tables: simpleTables, + list: ["\"users\".\"name\""], + from: Pos(0, 7), + to: Pos(0, 18), + mode: "text/x-sqlite" + }); + + test("quotedcolumn", { + value: "SELECT users.`na", + cursor: Pos(0, 16), + tables: simpleTables, + list: ["`users`.`name`"], + from: Pos(0, 7), + to: Pos(0, 16) + }); + + test("doublequotedcolumn", { + value: "SELECT users.\"na", + cursor: Pos(0, 16), + tables: simpleTables, + list: ["\"users\".\"name\""], + from: Pos(0, 7), + to: Pos(0, 16), + mode: "text/x-sqlite" + }); + + test("schema", { + value: "SELECT schem", + cursor: Pos(0, 12), + tables: schemaTables, + list: [{"text":"schema.users","className":"CodeMirror-hint-table"}, + {"text":"schema.countries","className":"CodeMirror-hint-table"}, + {"text":"SCHEMA","className":"CodeMirror-hint-keyword"}, + {"text":"SCHEMA_NAME","className":"CodeMirror-hint-keyword"}, + {"text":"SCHEMAS","className":"CodeMirror-hint-keyword"}], + from: Pos(0, 7), + to: Pos(0, 12) + }); + + test("schemaquoted", { + value: "SELECT `sch", + cursor: Pos(0, 11), + tables: schemaTables, + list: ["`schema`.`users`", "`schema`.`countries`"], + from: Pos(0, 7), + to: Pos(0, 11) + }); + + test("schemadoublequoted", { + value: "SELECT \"sch", + cursor: Pos(0, 11), + tables: schemaTables, + list: ["\"schema\".\"users\"", "\"schema\".\"countries\""], + from: Pos(0, 7), + to: Pos(0, 11), + mode: "text/x-sqlite" + }); + + test("schemacolumn", { + value: "SELECT schema.users.", + cursor: Pos(0, 20), + tables: schemaTables, + list: ["schema.users.name", + "schema.users.score", + "schema.users.birthDate"], + from: Pos(0, 7), + to: Pos(0, 20) + }); + + test("schemacolumnquoted", { + value: "SELECT `schema`.`users`.", + cursor: Pos(0, 24), + tables: schemaTables, + list: ["`schema`.`users`.`name`", + "`schema`.`users`.`score`", + "`schema`.`users`.`birthDate`"], + from: Pos(0, 7), + to: Pos(0, 24) + }); + + test("schemacolumndoublequoted", { + value: "SELECT \"schema\".\"users\".", + cursor: Pos(0, 24), + tables: schemaTables, + list: ["\"schema\".\"users\".\"name\"", + "\"schema\".\"users\".\"score\"", + "\"schema\".\"users\".\"birthDate\""], + from: Pos(0, 7), + to: Pos(0, 24), + mode: "text/x-sqlite" + }); + + test("displayText_default_table", { + value: "SELECT a", + cursor: Pos(0, 8), + disableKeywords: true, + defaultTable: "Api__TokenAliases", + tables: displayTextTablesWithDefault, + list: [ + { + text: "alias", + displayText: "alias | varchar(255) | Primary", + columnName: "alias", + columnHint: "varchar(255) | Primary", + className: "CodeMirror-hint-table CodeMirror-hint-default-table" + }, + { text: "Api__TokenAliases", className: "CodeMirror-hint-table" } + ], + from: Pos(0, 7), + to: Pos(0, 8) + }); + + test("displayText_table", { + value: "SELECT myt", + cursor: Pos(0, 10), + tables: displayTextTables, + list: [{text: "mytable", displayText: "mytable | The main table", "className":"CodeMirror-hint-table"}], + from: Pos(0, 7), + to: Pos(0, 10) + }); + + test("displayText_column", { + value: "SELECT mytable.", + cursor: Pos(0, 15), + tables: displayTextTables, + list: [{text: "mytable.id", displayText: "id | Unique ID"}, + {text: "mytable.name", displayText: "name | The name"}], + from: Pos(0, 7), + to: Pos(0, 15) + }); + + test("alias_complete", { + value: "SELECT t. FROM users t", + cursor: Pos(0, 9), + tables: simpleTables, + list: ["t.name", "t.score", "t.birthDate"], + from: Pos(0, 7), + to: Pos(0, 9) + }); + + test("alias_complete_with_displayText", { + value: "SELECT t. FROM mytable t", + cursor: Pos(0, 9), + tables: displayTextTables, + list: [{text: "t.id", displayText: "id | Unique ID"}, + {text: "t.name", displayText: "name | The name"}], + from: Pos(0, 7), + to: Pos(0, 9) + }) + + function deepCompare(a, b) { + if (a === b) return true + if (!(a && typeof a == "object") || + !(b && typeof b == "object")) return false + var array = Array.isArray(a) + if (Array.isArray(b) != array) return false + if (array) { + if (a.length != b.length) return false + for (var i = 0; i < a.length; i++) if (!deepCompare(a[i], b[i])) return false + } else { + for (var p in a) if (!(p in b) || !deepCompare(a[p], b[p])) return false + for (var p in b) if (!(p in a)) return false + } + return true + } +})(); diff --git a/js/codemirror/test/sublime_test.js b/js/codemirror/test/sublime_test.js new file mode 100644 index 0000000..57fd385 --- /dev/null +++ b/js/codemirror/test/sublime_test.js @@ -0,0 +1,295 @@ +(function() { + "use strict"; + + var Pos = CodeMirror.Pos; + namespace = "sublime_"; + + function stTest(name) { + var actions = Array.prototype.slice.call(arguments, 1); + testCM(name, function(cm) { + for (var i = 0; i < actions.length; i++) { + var action = actions[i]; + if (typeof action == "string" && i == 0) + cm.setValue(action); + else if (typeof action == "string") + cm.execCommand(action); + else if (action instanceof Pos) + cm.setCursor(action); + else + action(cm); + } + }); + } + + function at(line, ch, msg) { + return function(cm) { + eq(cm.listSelections().length, 1); + eqCursorPos(cm.getCursor("head"), Pos(line, ch), msg); + eqCursorPos(cm.getCursor("anchor"), Pos(line, ch), msg); + }; + } + + function val(content, msg) { + return function(cm) { eq(cm.getValue(), content, msg); }; + } + + function argsToRanges(args) { + if (args.length % 4) throw new Error("Wrong number of arguments for ranges."); + var ranges = []; + for (var i = 0; i < args.length; i += 4) + ranges.push({anchor: Pos(args[i], args[i + 1]), + head: Pos(args[i + 2], args[i + 3])}); + return ranges; + } + + function setSel() { + var ranges = argsToRanges(arguments); + return function(cm) { cm.setSelections(ranges, 0); }; + } + + function hasSel() { + var ranges = argsToRanges(arguments); + return function(cm) { + var sels = cm.listSelections(); + if (sels.length != ranges.length) + throw new Failure("Expected " + ranges.length + " selections, but found " + sels.length); + for (var i = 0; i < sels.length; i++) { + eqCharPos(sels[i].anchor, ranges[i].anchor, "anchor " + i); + eqCharPos(sels[i].head, ranges[i].head, "head " + i); + } + }; + } + + stTest("bySubword", "the foo_bar DooDahBah \n a FOOBar", + "goSubwordLeft", at(0, 0), + "goSubwordRight", at(0, 3), + "goSubwordRight", at(0, 7), + "goSubwordRight", at(0, 11), + "goSubwordRight", at(0, 15), + "goSubwordRight", at(0, 18), + "goSubwordRight", at(0, 21), + "goSubwordRight", at(0, 22), + "goSubwordRight", at(1, 0), + "goSubwordRight", at(1, 2), + "goSubwordRight", at(1, 6), + "goSubwordRight", at(1, 9), + "goSubwordLeft", at(1, 6), + "goSubwordLeft", at(1, 3), + "goSubwordLeft", at(1, 1), + "goSubwordLeft", at(1, 0), + "goSubwordLeft", at(0, 22), + "goSubwordLeft", at(0, 18), + "goSubwordLeft", at(0, 15), + "goSubwordLeft", at(0, 12), + "goSubwordLeft", at(0, 8), + "goSubwordLeft", at(0, 4), + "goSubwordLeft", at(0, 0)); + + stTest("splitSelectionByLine", "abc\ndef\nghi", + setSel(0, 1, 2, 2), + "splitSelectionByLine", + hasSel(0, 1, 0, 3, + 1, 0, 1, 3, + 2, 0, 2, 2)); + + stTest("splitSelectionByLineMulti", "abc\ndef\nghi\njkl", + setSel(0, 1, 1, 1, + 1, 2, 3, 2, + 3, 3, 3, 3), + "splitSelectionByLine", + hasSel(0, 1, 0, 3, + 1, 0, 1, 1, + 1, 2, 1, 3, + 2, 0, 2, 3, + 3, 0, 3, 2, + 3, 3, 3, 3)); + + stTest("selectLine", "abc\ndef\nghi", + setSel(0, 1, 0, 1, + 2, 0, 2, 1), + "selectLine", + hasSel(0, 0, 1, 0, + 2, 0, 2, 3), + setSel(0, 1, 1, 0), + "selectLine", + hasSel(0, 0, 2, 0)); + + stTest("insertLineAfter", "abcde\nfghijkl\nmn", + setSel(0, 1, 0, 1, + 0, 3, 0, 3, + 1, 2, 1, 2, + 1, 3, 1, 5), "insertLineAfter", + hasSel(1, 0, 1, 0, + 3, 0, 3, 0), val("abcde\n\nfghijkl\n\nmn")); + + stTest("insertLineBefore", "abcde\nfghijkl\nmn", + setSel(0, 1, 0, 1, + 0, 3, 0, 3, + 1, 2, 1, 2, + 1, 3, 1, 5), "insertLineBefore", + hasSel(0, 0, 0, 0, + 2, 0, 2, 0), val("\nabcde\n\nfghijkl\nmn")); + + stTest("skipAndSelectNextOccurrence", "a foo bar\nfoobar foo", + setSel(0, 2, 0, 5), "skipAndSelectNextOccurrence", hasSel(1, 0, 1, 3), + "skipAndSelectNextOccurrence", hasSel(1, 7, 1, 10), + "skipAndSelectNextOccurrence", hasSel(0, 2, 0, 5), + Pos(0, 3), "skipAndSelectNextOccurrence", hasSel(0, 2, 0, 5), + "skipAndSelectNextOccurrence", hasSel(1, 7, 1, 10), + setSel(0, 6, 0, 9), "skipAndSelectNextOccurrence", hasSel(1, 3, 1, 6)); + + stTest("selectNextOccurrence", "a foo bar\nfoobar foo", + setSel(0, 2, 0, 5), + "selectNextOccurrence", hasSel(0, 2, 0, 5, + 1, 0, 1, 3), + "selectNextOccurrence", hasSel(0, 2, 0, 5, + 1, 0, 1, 3, + 1, 7, 1, 10), + "selectNextOccurrence", hasSel(0, 2, 0, 5, + 1, 0, 1, 3, + 1, 7, 1, 10), + Pos(0, 3), "selectNextOccurrence", hasSel(0, 2, 0, 5), + "selectNextOccurrence", hasSel(0, 2, 0, 5, + 1, 7, 1, 10), + setSel(0, 6, 0, 9), + "selectNextOccurrence", hasSel(0, 6, 0, 9, + 1, 3, 1, 6)); + + stTest("selectScope", "foo(a) {\n bar[1, 2];\n}", + "selectScope", hasSel(0, 0, 2, 1), + Pos(0, 4), "selectScope", hasSel(0, 4, 0, 5), + Pos(0, 5), "selectScope", hasSel(0, 4, 0, 5), + Pos(0, 6), "selectScope", hasSel(0, 0, 2, 1), + Pos(0, 8), "selectScope", hasSel(0, 8, 2, 0), + Pos(1, 2), "selectScope", hasSel(0, 8, 2, 0), + Pos(1, 6), "selectScope", hasSel(1, 6, 1, 10), + Pos(1, 9), "selectScope", hasSel(1, 6, 1, 10), + "selectScope", hasSel(0, 8, 2, 0), + "selectScope", hasSel(0, 0, 2, 1)); + + stTest("goToBracket", "foo(a) {\n bar[1, 2];\n}", + Pos(0, 0), "goToBracket", at(0, 0), + Pos(0, 4), "goToBracket", at(0, 5), "goToBracket", at(0, 4), + Pos(0, 8), "goToBracket", at(2, 0), "goToBracket", at(0, 8), + Pos(1, 2), "goToBracket", at(2, 0), + Pos(1, 7), "goToBracket", at(1, 10), "goToBracket", at(1, 6)); + + stTest("swapLine", "1\n2\n3---\n4\n5", + "swapLineDown", val("2\n1\n3---\n4\n5"), + "swapLineUp", val("1\n2\n3---\n4\n5"), + "swapLineUp", val("1\n2\n3---\n4\n5"), + Pos(4, 1), "swapLineDown", val("1\n2\n3---\n4\n5"), + setSel(0, 1, 0, 1, + 1, 0, 2, 0, + 2, 2, 2, 2), + "swapLineDown", val("4\n1\n2\n3---\n5"), + hasSel(1, 1, 1, 1, + 2, 0, 3, 0, + 3, 2, 3, 2), + "swapLineUp", val("1\n2\n3---\n4\n5"), + hasSel(0, 1, 0, 1, + 1, 0, 2, 0, + 2, 2, 2, 2)); + + stTest("swapLineEmptyBottomSel", "1\n2\n3", + setSel(0, 1, 1, 0), + "swapLineDown", val("2\n1\n3"), hasSel(1, 1, 2, 0), + "swapLineUp", val("1\n2\n3"), hasSel(0, 1, 1, 0), + "swapLineUp", val("1\n2\n3"), hasSel(0, 0, 0, 0)); + + stTest("swapLineUpFromEnd", "a\nb\nc", + Pos(2, 1), "swapLineUp", + hasSel(1, 1, 1, 1), val("a\nc\nb")); + + stTest("joinLines", "abc\ndef\nghi\njkl", + "joinLines", val("abc def\nghi\njkl"), at(0, 4), + "undo", + setSel(0, 2, 1, 1), "joinLines", + val("abc def ghi\njkl"), hasSel(0, 2, 0, 8), + "undo", + setSel(0, 1, 0, 1, + 1, 1, 1, 1, + 3, 1, 3, 1), "joinLines", + val("abc def ghi\njkl"), hasSel(0, 4, 0, 4, + 0, 8, 0, 8, + 1, 3, 1, 3)); + + stTest("duplicateLine", "abc\ndef\nghi", + Pos(1, 0), "duplicateLine", val("abc\ndef\ndef\nghi"), at(2, 0), + "undo", + setSel(0, 1, 0, 1, + 1, 1, 1, 1, + 2, 1, 2, 1), "duplicateLine", + val("abc\nabc\ndef\ndef\nghi\nghi"), hasSel(1, 1, 1, 1, + 3, 1, 3, 1, + 5, 1, 5, 1)); + stTest("duplicateLineSelection", "abcdef", + setSel(0, 1, 0, 1, + 0, 2, 0, 4, + 0, 5, 0, 5), + "duplicateLine", + val("abcdef\nabcdcdef\nabcdcdef"), hasSel(2, 1, 2, 1, + 2, 4, 2, 6, + 2, 7, 2, 7)); + + stTest("sortLines", "c\nb\na\nC\nB\nA", + "sortLines", val("A\nB\nC\na\nb\nc"), + "undo", + setSel(0, 0, 2, 0, + 3, 0, 5, 0), + "sortLines", val("b\nc\na\nB\nC\nA"), + hasSel(0, 0, 2, 0, + 3, 0, 5, 0), + "undo", + setSel(1, 0, 5, 0), "sortLinesInsensitive", val("c\na\nB\nb\nC\nA")); + + stTest("bookmarks", "abc\ndef\nghi\njkl", + Pos(0, 1), "toggleBookmark", + setSel(1, 1, 1, 2), "toggleBookmark", + setSel(2, 1, 2, 2), "toggleBookmark", + "nextBookmark", hasSel(0, 1, 0, 1), + "nextBookmark", hasSel(1, 1, 1, 2), + "nextBookmark", hasSel(2, 1, 2, 2), + "prevBookmark", hasSel(1, 1, 1, 2), + "prevBookmark", hasSel(0, 1, 0, 1), + "prevBookmark", hasSel(2, 1, 2, 2), + "prevBookmark", hasSel(1, 1, 1, 2), + "toggleBookmark", + "prevBookmark", hasSel(2, 1, 2, 2), + "prevBookmark", hasSel(0, 1, 0, 1), + "selectBookmarks", hasSel(0, 1, 0, 1, + 2, 1, 2, 2), + "clearBookmarks", + Pos(0, 0), "selectBookmarks", at(0, 0)); + + stTest("smartBackspace", " foo\n bar", + setSel(0, 2, 0, 2, 1, 4, 1, 4, 1, 6, 1, 6), "smartBackspace", + val("foo\n br")) + + stTest("upAndDowncaseAtCursor", "abc\ndef x\nghI", + setSel(0, 1, 0, 3, + 1, 1, 1, 1, + 1, 4, 1, 4), "upcaseAtCursor", + val("aBC\nDEF x\nghI"), hasSel(0, 1, 0, 3, + 1, 3, 1, 3, + 1, 4, 1, 4), + "downcaseAtCursor", + val("abc\ndef x\nghI"), hasSel(0, 1, 0, 3, + 1, 3, 1, 3, + 1, 4, 1, 4)); + + stTest("mark", "abc\ndef\nghi", + Pos(1, 1), "setSublimeMark", + Pos(2, 1), "selectToSublimeMark", hasSel(2, 1, 1, 1), + Pos(0, 1), "swapWithSublimeMark", at(1, 1), "swapWithSublimeMark", at(0, 1), + "deleteToSublimeMark", val("aef\nghi"), + "sublimeYank", val("abc\ndef\nghi"), at(1, 1)); + + stTest("findUnder", "foo foobar a", + "findUnder", hasSel(0, 4, 0, 7), + "findUnder", hasSel(0, 0, 0, 3), + "findUnderPrevious", hasSel(0, 4, 0, 7), + "findUnderPrevious", hasSel(0, 0, 0, 3), + Pos(0, 4), "findUnder", hasSel(0, 4, 0, 10), + Pos(0, 11), "findUnder", hasSel(0, 11, 0, 11)); +})(); diff --git a/js/codemirror/test/test.js b/js/codemirror/test/test.js new file mode 100644 index 0000000..357c2b9 --- /dev/null +++ b/js/codemirror/test/test.js @@ -0,0 +1,2678 @@ +var Pos = CodeMirror.Pos; + +CodeMirror.defaults.rtlMoveVisually = true; + +function forEach(arr, f) { + for (var i = 0, e = arr.length; i < e; ++i) f(arr[i], i); +} + +function addDoc(cm, width, height) { + var content = [], line = ""; + for (var i = 0; i < width; ++i) line += "x"; + for (var i = 0; i < height; ++i) content.push(line); + cm.setValue(content.join("\n")); +} + +function byClassName(elt, cls) { + if (elt.getElementsByClassName) return elt.getElementsByClassName(cls); + var found = [], re = new RegExp("\\b" + cls + "\\b"); + function search(elt) { + if (elt.nodeType == 3) return; + if (re.test(elt.className)) found.push(elt); + for (var i = 0, e = elt.childNodes.length; i < e; ++i) + search(elt.childNodes[i]); + } + search(elt); + return found; +} + +var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent); +var ie_lt9 = /MSIE [1-8]\b/.test(navigator.userAgent); +var mac = /Mac/.test(navigator.platform); +var opera = /Opera\/\./.test(navigator.userAgent); +var opera_version = opera && navigator.userAgent.match(/Version\/(\d+\.\d+)/); +if (opera_version) opera_version = Number(opera_version); +var opera_lt10 = opera && (!opera_version || opera_version < 10); + +namespace = "core_"; + +test("core_fromTextArea", function() { + var te = document.getElementById("code"); + te.value = "CONTENT"; + var cm = CodeMirror.fromTextArea(te); + is(!te.offsetHeight); + eq(cm.getValue(), "CONTENT"); + cm.setValue("foo\nbar"); + eq(cm.getValue(), "foo\nbar"); + cm.save(); + is(/^foo\r?\nbar$/.test(te.value)); + cm.setValue("xxx"); + cm.toTextArea(); + is(te.offsetHeight); + eq(te.value, "xxx"); +}); + +testCM("getRange", function(cm) { + eq(cm.getLine(0), "1234"); + eq(cm.getLine(1), "5678"); + eq(cm.getLine(2), null); + eq(cm.getLine(-1), null); + eq(cm.getRange(Pos(0, 0), Pos(0, 3)), "123"); + eq(cm.getRange(Pos(0, -1), Pos(0, 200)), "1234"); + eq(cm.getRange(Pos(0, 2), Pos(1, 2)), "34\n56"); + eq(cm.getRange(Pos(1, 2), Pos(100, 0)), "78"); +}, {value: "1234\n5678"}); + +testCM("replaceRange", function(cm) { + eq(cm.getValue(), ""); + cm.replaceRange("foo\n", Pos(0, 0)); + eq(cm.getValue(), "foo\n"); + cm.replaceRange("a\nb", Pos(0, 1)); + eq(cm.getValue(), "fa\nboo\n"); + eq(cm.lineCount(), 3); + cm.replaceRange("xyzzy", Pos(0, 0), Pos(1, 1)); + eq(cm.getValue(), "xyzzyoo\n"); + cm.replaceRange("abc", Pos(0, 0), Pos(10, 0)); + eq(cm.getValue(), "abc"); + eq(cm.lineCount(), 1); +}); + +testCM("selection", function(cm) { + cm.setSelection(Pos(0, 4), Pos(2, 2)); + is(cm.somethingSelected()); + eq(cm.getSelection(), "11\n222222\n33"); + eqCursorPos(cm.getCursor(false), Pos(2, 2)); + eqCursorPos(cm.getCursor(true), Pos(0, 4)); + cm.setSelection(Pos(1, 0)); + is(!cm.somethingSelected()); + eq(cm.getSelection(), ""); + eqCursorPos(cm.getCursor(true), Pos(1, 0)); + cm.replaceSelection("abc", "around"); + eq(cm.getSelection(), "abc"); + eq(cm.getValue(), "111111\nabc222222\n333333"); + cm.replaceSelection("def", "end"); + eq(cm.getSelection(), ""); + eqCursorPos(cm.getCursor(true), Pos(1, 3)); + cm.setCursor(Pos(2, 1)); + eqCursorPos(cm.getCursor(true), Pos(2, 1)); + cm.setCursor(1, 2); + eqCursorPos(cm.getCursor(true), Pos(1, 2)); +}, {value: "111111\n222222\n333333"}); + +testCM("extendSelection", function(cm) { + cm.setExtending(true); + addDoc(cm, 10, 10); + cm.setSelection(Pos(3, 5)); + eqCursorPos(cm.getCursor("head"), Pos(3, 5)); + eqCursorPos(cm.getCursor("anchor"), Pos(3, 5)); + cm.setSelection(Pos(2, 5), Pos(5, 5)); + eqCursorPos(cm.getCursor("head"), Pos(5, 5)); + eqCursorPos(cm.getCursor("anchor"), Pos(2, 5)); + eqCursorPos(cm.getCursor("start"), Pos(2, 5)); + eqCursorPos(cm.getCursor("end"), Pos(5, 5)); + cm.setSelection(Pos(5, 5), Pos(2, 5)); + eqCursorPos(cm.getCursor("head"), Pos(2, 5)); + eqCursorPos(cm.getCursor("anchor"), Pos(5, 5)); + eqCursorPos(cm.getCursor("start"), Pos(2, 5)); + eqCursorPos(cm.getCursor("end"), Pos(5, 5)); + cm.extendSelection(Pos(3, 2)); + eqCursorPos(cm.getCursor("head"), Pos(3, 2)); + eqCursorPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(6, 2)); + eqCursorPos(cm.getCursor("head"), Pos(6, 2)); + eqCursorPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(6, 3), Pos(6, 4)); + eqCursorPos(cm.getCursor("head"), Pos(6, 4)); + eqCursorPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(0, 3), Pos(0, 4)); + eqCursorPos(cm.getCursor("head"), Pos(0, 3)); + eqCursorPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(4, 5), Pos(6, 5)); + eqCursorPos(cm.getCursor("head"), Pos(6, 5)); + eqCursorPos(cm.getCursor("anchor"), Pos(4, 5)); + cm.setExtending(false); + cm.extendSelection(Pos(0, 3), Pos(0, 4)); + eqCursorPos(cm.getCursor("head"), Pos(0, 3)); + eqCursorPos(cm.getCursor("anchor"), Pos(0, 4)); +}); + +testCM("lines", function(cm) { + eq(cm.getLine(0), "111111"); + eq(cm.getLine(1), "222222"); + eq(cm.getLine(-1), null); + cm.replaceRange("", Pos(1, 0), Pos(2, 0)) + cm.replaceRange("abc", Pos(1, 0), Pos(1)); + eq(cm.getValue(), "111111\nabc"); +}, {value: "111111\n222222\n333333"}); + +testCM("indent", function(cm) { + cm.indentLine(1); + eq(cm.getLine(1), " blah();"); + cm.setOption("indentUnit", 8); + cm.indentLine(1); + eq(cm.getLine(1), "\tblah();"); + cm.setOption("indentUnit", 10); + cm.setOption("tabSize", 4); + cm.indentLine(1); + eq(cm.getLine(1), "\t\t blah();"); +}, {value: "if (x) {\nblah();\n}", indentUnit: 3, indentWithTabs: true, tabSize: 8}); + +testCM("indentByNumber", function(cm) { + cm.indentLine(0, 2); + eq(cm.getLine(0), " foo"); + cm.indentLine(0, -200); + eq(cm.getLine(0), "foo"); + cm.setSelection(Pos(0, 0), Pos(1, 2)); + cm.indentSelection(3); + eq(cm.getValue(), " foo\n bar\nbaz"); +}, {value: "foo\nbar\nbaz"}); + +test("core_defaults", function() { + var defsCopy = {}, defs = CodeMirror.defaults; + for (var opt in defs) defsCopy[opt] = defs[opt]; + defs.indentUnit = 5; + defs.value = "uu"; + defs.indentWithTabs = true; + defs.tabindex = 55; + var place = document.getElementById("testground"), cm = CodeMirror(place); + try { + eq(cm.getOption("indentUnit"), 5); + cm.setOption("indentUnit", 10); + eq(defs.indentUnit, 5); + eq(cm.getValue(), "uu"); + eq(cm.getOption("indentWithTabs"), true); + eq(cm.getInputField().tabIndex, 55); + } + finally { + for (var opt in defsCopy) defs[opt] = defsCopy[opt]; + place.removeChild(cm.getWrapperElement()); + } +}); + +testCM("lineInfo", function(cm) { + eq(cm.lineInfo(-1), null); + var mark = document.createElement("span"); + var lh = cm.setGutterMarker(1, "FOO", mark); + var info = cm.lineInfo(1); + eq(info.text, "222222"); + eq(info.gutterMarkers.FOO, mark); + eq(info.line, 1); + eq(cm.lineInfo(2).gutterMarkers, null); + cm.setGutterMarker(lh, "FOO", null); + eq(cm.lineInfo(1).gutterMarkers, null); + cm.setGutterMarker(1, "FOO", mark); + cm.setGutterMarker(0, "FOO", mark); + cm.clearGutter("FOO"); + eq(cm.lineInfo(0).gutterMarkers, null); + eq(cm.lineInfo(1).gutterMarkers, null); +}, {value: "111111\n222222\n333333"}); + +testCM("coords", function(cm) { + cm.setSize(null, 100); + addDoc(cm, 32, 200); + var top = cm.charCoords(Pos(0, 0)); + var bot = cm.charCoords(Pos(200, 30)); + is(top.left < bot.left); + is(top.top < bot.top); + is(top.top < top.bottom); + cm.scrollTo(null, 100); + var top2 = cm.charCoords(Pos(0, 0)); + is(top.top > top2.top); + eq(top.left, top2.left); +}); + +testCM("coordsChar", function(cm) { + addDoc(cm, 35, 70); + for (var i = 0; i < 2; ++i) { + var sys = i ? "local" : "page"; + for (var ch = 0; ch <= 35; ch += 5) { + for (var line = 0; line < 70; line += 5) { + cm.setCursor(line, ch); + var coords = cm.charCoords(Pos(line, ch), sys); + var pos = cm.coordsChar({left: coords.left + 1, top: coords.top + 1}, sys); + eqCharPos(pos, Pos(line, ch)); + } + } + } +}, {lineNumbers: true}); + +testCM("coordsCharBidi", function(cm) { + addDoc(cm, 35, 70); + // Put an rtl character into each line to trigger the bidi code path in coordsChar + cm.setValue(cm.getValue().replace(/\bx/g, 'و')) + for (var i = 0; i < 2; ++i) { + var sys = i ? "local" : "page"; + for (var ch = 2; ch <= 35; ch += 5) { + for (var line = 0; line < 70; line += 5) { + cm.setCursor(line, ch); + var coords = cm.charCoords(Pos(line, ch), sys); + var pos = cm.coordsChar({left: coords.left + 1, top: coords.top + 1}, sys); + eqCharPos(pos, Pos(line, ch)); + } + } + } +}, {lineNumbers: true}); + +testCM("badBidiOptimization", function(cm) { + if (window.automatedTests) return + var coords = cm.charCoords(Pos(0, 34)) + eqCharPos(cm.coordsChar({left: coords.right, top: coords.top + 2}), Pos(0, 34)) +}, {value: "----------

    هل يمكنك اختيار مستوى قسط التأمين الذي ترغب بدفعه؟

    "}) + +testCM("posFromIndex", function(cm) { + cm.setValue( + "This function should\n" + + "convert a zero based index\n" + + "to line and ch." + ); + + var examples = [ + { index: -1, line: 0, ch: 0 }, // <- Tests clipping + { index: 0, line: 0, ch: 0 }, + { index: 10, line: 0, ch: 10 }, + { index: 39, line: 1, ch: 18 }, + { index: 55, line: 2, ch: 7 }, + { index: 63, line: 2, ch: 15 }, + { index: 64, line: 2, ch: 15 } // <- Tests clipping + ]; + + for (var i = 0; i < examples.length; i++) { + var example = examples[i]; + var pos = cm.posFromIndex(example.index); + eq(pos.line, example.line); + eq(pos.ch, example.ch); + if (example.index >= 0 && example.index < 64) + eq(cm.indexFromPos(pos), example.index); + } +}); + +testCM("undo", function(cm) { + cm.replaceRange("def", Pos(0, 0), Pos(0)); + eq(cm.historySize().undo, 1); + cm.undo(); + eq(cm.getValue(), "abc"); + eq(cm.historySize().undo, 0); + eq(cm.historySize().redo, 1); + cm.redo(); + eq(cm.getValue(), "def"); + eq(cm.historySize().undo, 1); + eq(cm.historySize().redo, 0); + cm.setValue("1\n\n\n2"); + cm.clearHistory(); + eq(cm.historySize().undo, 0); + for (var i = 0; i < 20; ++i) { + cm.replaceRange("a", Pos(0, 0)); + cm.replaceRange("b", Pos(3, 0)); + } + eq(cm.historySize().undo, 40); + for (var i = 0; i < 40; ++i) + cm.undo(); + eq(cm.historySize().redo, 40); + eq(cm.getValue(), "1\n\n\n2"); +}, {value: "abc"}); + +testCM("undoDepth", function(cm) { + cm.replaceRange("d", Pos(0)); + cm.replaceRange("e", Pos(0)); + cm.replaceRange("f", Pos(0)); + cm.undo(); cm.undo(); cm.undo(); + eq(cm.getValue(), "abcd"); +}, {value: "abc", undoDepth: 4}); + +testCM("undoDoesntClearValue", function(cm) { + cm.undo(); + eq(cm.getValue(), "x"); +}, {value: "x"}); + +testCM("undoMultiLine", function(cm) { + cm.operation(function() { + cm.replaceRange("x", Pos(0, 0)); + cm.replaceRange("y", Pos(1, 0)); + }); + cm.undo(); + eq(cm.getValue(), "abc\ndef\nghi"); + cm.operation(function() { + cm.replaceRange("y", Pos(1, 0)); + cm.replaceRange("x", Pos(0, 0)); + }); + cm.undo(); + eq(cm.getValue(), "abc\ndef\nghi"); + cm.operation(function() { + cm.replaceRange("y", Pos(2, 0)); + cm.replaceRange("x", Pos(1, 0)); + cm.replaceRange("z", Pos(2, 0)); + }); + cm.undo(); + eq(cm.getValue(), "abc\ndef\nghi", 3); +}, {value: "abc\ndef\nghi"}); + +testCM("undoComposite", function(cm) { + cm.replaceRange("y", Pos(1)); + cm.operation(function() { + cm.replaceRange("x", Pos(0)); + cm.replaceRange("z", Pos(2)); + }); + eq(cm.getValue(), "ax\nby\ncz\n"); + cm.undo(); + eq(cm.getValue(), "a\nby\nc\n"); + cm.undo(); + eq(cm.getValue(), "a\nb\nc\n"); + cm.redo(); cm.redo(); + eq(cm.getValue(), "ax\nby\ncz\n"); +}, {value: "a\nb\nc\n"}); + +testCM("undoSelection", function(cm) { + cm.setSelection(Pos(0, 2), Pos(0, 4)); + cm.replaceSelection(""); + cm.setCursor(Pos(1, 0)); + cm.undo(); + eqCursorPos(cm.getCursor(true), Pos(0, 2)); + eqCursorPos(cm.getCursor(false), Pos(0, 4)); + cm.setCursor(Pos(1, 0)); + cm.redo(); + eqCursorPos(cm.getCursor(true), Pos(0, 2)); + eqCursorPos(cm.getCursor(false), Pos(0, 2)); +}, {value: "abcdefgh\n"}); + +testCM("undoSelectionAsBefore", function(cm) { + cm.replaceSelection("abc", "around"); + cm.undo(); + cm.redo(); + eq(cm.getSelection(), "abc"); +}); + +testCM("selectionChangeConfusesHistory", function(cm) { + cm.replaceSelection("abc", null, "dontmerge"); + cm.operation(function() { + cm.setCursor(Pos(0, 0)); + cm.replaceSelection("abc", null, "dontmerge"); + }); + eq(cm.historySize().undo, 2); +}); + +testCM("markTextSingleLine", function(cm) { + forEach([{a: 0, b: 1, c: "", f: 2, t: 5}, + {a: 0, b: 4, c: "", f: 0, t: 2}, + {a: 1, b: 2, c: "x", f: 3, t: 6}, + {a: 4, b: 5, c: "", f: 3, t: 5}, + {a: 4, b: 5, c: "xx", f: 3, t: 7}, + {a: 2, b: 5, c: "", f: 2, t: 3}, + {a: 2, b: 5, c: "abcd", f: 6, t: 7}, + {a: 2, b: 6, c: "x", f: null, t: null}, + {a: 3, b: 6, c: "", f: null, t: null}, + {a: 0, b: 9, c: "hallo", f: null, t: null}, + {a: 4, b: 6, c: "x", f: 3, t: 4}, + {a: 4, b: 8, c: "", f: 3, t: 4}, + {a: 6, b: 6, c: "a", f: 3, t: 6}, + {a: 8, b: 9, c: "", f: 3, t: 6}], function(test) { + cm.setValue("1234567890"); + var r = cm.markText(Pos(0, 3), Pos(0, 6), {className: "foo"}); + cm.replaceRange(test.c, Pos(0, test.a), Pos(0, test.b)); + var f = r.find(); + eq(f && f.from.ch, test.f); eq(f && f.to.ch, test.t); + }); +}); + +testCM("markTextMultiLine", function(cm) { + function p(v) { return v && Pos(v[0], v[1]); } + forEach([{a: [0, 0], b: [0, 5], c: "", f: [0, 0], t: [2, 5]}, + {a: [0, 0], b: [0, 5], c: "foo\n", f: [1, 0], t: [3, 5]}, + {a: [0, 1], b: [0, 10], c: "", f: [0, 1], t: [2, 5]}, + {a: [0, 5], b: [0, 6], c: "x", f: [0, 6], t: [2, 5]}, + {a: [0, 0], b: [1, 0], c: "", f: [0, 0], t: [1, 5]}, + {a: [0, 6], b: [2, 4], c: "", f: [0, 5], t: [0, 7]}, + {a: [0, 6], b: [2, 4], c: "aa", f: [0, 5], t: [0, 9]}, + {a: [1, 2], b: [1, 8], c: "", f: [0, 5], t: [2, 5]}, + {a: [0, 5], b: [2, 5], c: "xx", f: null, t: null}, + {a: [0, 0], b: [2, 10], c: "x", f: null, t: null}, + {a: [1, 5], b: [2, 5], c: "", f: [0, 5], t: [1, 5]}, + {a: [2, 0], b: [2, 3], c: "", f: [0, 5], t: [2, 2]}, + {a: [2, 5], b: [3, 0], c: "a\nb", f: [0, 5], t: [2, 5]}, + {a: [2, 3], b: [3, 0], c: "x", f: [0, 5], t: [2, 3]}, + {a: [1, 1], b: [1, 9], c: "1\n2\n3", f: [0, 5], t: [4, 5]}], function(test) { + cm.setValue("aaaaaaaaaa\nbbbbbbbbbb\ncccccccccc\ndddddddd\n"); + var r = cm.markText(Pos(0, 5), Pos(2, 5), + {className: "CodeMirror-matchingbracket"}); + cm.replaceRange(test.c, p(test.a), p(test.b)); + var f = r.find(); + eqCursorPos(f && f.from, p(test.f)); eqCursorPos(f && f.to, p(test.t)); + }); +}); + +testCM("markTextUndo", function(cm) { + var marker1, marker2, bookmark; + marker1 = cm.markText(Pos(0, 1), Pos(0, 3), + {className: "CodeMirror-matchingbracket"}); + marker2 = cm.markText(Pos(0, 0), Pos(2, 1), + {className: "CodeMirror-matchingbracket"}); + bookmark = cm.setBookmark(Pos(1, 5)); + cm.operation(function(){ + cm.replaceRange("foo", Pos(0, 2)); + cm.replaceRange("bar\nbaz\nbug\n", Pos(2, 0), Pos(3, 0)); + }); + var v1 = cm.getValue(); + cm.setValue(""); + eq(marker1.find(), null); eq(marker2.find(), null); eq(bookmark.find(), null); + cm.undo(); + eqCursorPos(bookmark.find(), Pos(1, 5), "still there"); + cm.undo(); + var m1Pos = marker1.find(), m2Pos = marker2.find(); + eqCursorPos(m1Pos.from, Pos(0, 1)); eqCursorPos(m1Pos.to, Pos(0, 3)); + eqCursorPos(m2Pos.from, Pos(0, 0)); eqCursorPos(m2Pos.to, Pos(2, 1)); + eqCursorPos(bookmark.find(), Pos(1, 5)); + cm.redo(); cm.redo(); + eq(bookmark.find(), null); + cm.undo(); + eqCursorPos(bookmark.find(), Pos(1, 5)); + eq(cm.getValue(), v1); +}, {value: "1234\n56789\n00\n"}); + +testCM("markTextStayGone", function(cm) { + var m1 = cm.markText(Pos(0, 0), Pos(0, 1)); + cm.replaceRange("hi", Pos(0, 2)); + m1.clear(); + cm.undo(); + eq(m1.find(), null); +}, {value: "hello"}); + +testCM("markTextAllowEmpty", function(cm) { + var m1 = cm.markText(Pos(0, 1), Pos(0, 2), {clearWhenEmpty: false}); + is(m1.find()); + cm.replaceRange("x", Pos(0, 0)); + is(m1.find()); + cm.replaceRange("y", Pos(0, 2)); + is(m1.find()); + cm.replaceRange("z", Pos(0, 3), Pos(0, 4)); + is(!m1.find()); + var m2 = cm.markText(Pos(0, 1), Pos(0, 2), {clearWhenEmpty: false, + inclusiveLeft: true, + inclusiveRight: true}); + cm.replaceRange("q", Pos(0, 1), Pos(0, 2)); + is(m2.find()); + cm.replaceRange("", Pos(0, 0), Pos(0, 3)); + is(!m2.find()); + var m3 = cm.markText(Pos(0, 1), Pos(0, 1), {clearWhenEmpty: false}); + cm.replaceRange("a", Pos(0, 3)); + is(m3.find()); + cm.replaceRange("b", Pos(0, 1)); + is(!m3.find()); +}, {value: "abcde"}); + +testCM("markTextStacked", function(cm) { + var m1 = cm.markText(Pos(0, 0), Pos(0, 0), {clearWhenEmpty: false}); + var m2 = cm.markText(Pos(0, 0), Pos(0, 0), {clearWhenEmpty: false}); + cm.replaceRange("B", Pos(0, 1)); + is(m1.find() && m2.find()); +}, {value: "A"}); + +testCM("undoPreservesNewMarks", function(cm) { + cm.markText(Pos(0, 3), Pos(0, 4)); + cm.markText(Pos(1, 1), Pos(1, 3)); + cm.replaceRange("", Pos(0, 3), Pos(3, 1)); + var mBefore = cm.markText(Pos(0, 0), Pos(0, 1)); + var mAfter = cm.markText(Pos(0, 5), Pos(0, 6)); + var mAround = cm.markText(Pos(0, 2), Pos(0, 4)); + cm.undo(); + eqCursorPos(mBefore.find().from, Pos(0, 0)); + eqCursorPos(mBefore.find().to, Pos(0, 1)); + eqCursorPos(mAfter.find().from, Pos(3, 3)); + eqCursorPos(mAfter.find().to, Pos(3, 4)); + eqCursorPos(mAround.find().from, Pos(0, 2)); + eqCursorPos(mAround.find().to, Pos(3, 2)); + var found = cm.findMarksAt(Pos(2, 2)); + eq(found.length, 1); + eq(found[0], mAround); +}, {value: "aaaa\nbbbb\ncccc\ndddd"}); + +testCM("markClearBetween", function(cm) { + cm.setValue("aaa\nbbb\nccc\nddd\n"); + cm.markText(Pos(0, 0), Pos(2)); + cm.replaceRange("aaa\nbbb\nccc", Pos(0, 0), Pos(2)); + eq(cm.findMarksAt(Pos(1, 1)).length, 0); +}); + +testCM("findMarksMiddle", function(cm) { + var mark = cm.markText(Pos(1, 1), Pos(3, 1)); + var found = cm.findMarks(Pos(2, 1), Pos(2, 2)); + eq(found.length, 1); + eq(found[0], mark); +}, {value: "line 0\nline 1\nline 2\nline 3"}); + +testCM("deleteSpanCollapsedInclusiveLeft", function(cm) { + var from = Pos(1, 0), to = Pos(1, 1); + var m = cm.markText(from, to, {collapsed: true, inclusiveLeft: true}); + // Delete collapsed span. + cm.replaceRange("", from, to); +}, {value: "abc\nX\ndef"}); + +testCM("markTextCSS", function(cm) { + function present() { + var spans = cm.display.lineDiv.getElementsByTagName("span"); + for (var i = 0; i < spans.length; i++) + if (spans[i].style.color && spans[i].textContent == "cdef") return true; + } + var m = cm.markText(Pos(0, 2), Pos(0, 6), {css: "color: cyan"}); + is(present()); + m.clear(); + is(!present()); +}, {value: "abcdefgh"}); + +testCM("markTextWithAttributes", function(cm) { + function present() { + var spans = cm.display.lineDiv.getElementsByTagName("span"); + for (var i = 0; i < spans.length; i++) + if (spans[i].getAttribute("label") == "label" && spans[i].textContent == "cdef") return true; + } + var m = cm.markText(Pos(0, 2), Pos(0, 6), {attributes: {label: "label"}}); + is(present()); + m.clear(); + is(!present()); +}, {value: "abcdefgh"}); + +testCM("bookmark", function(cm) { + function p(v) { return v && Pos(v[0], v[1]); } + forEach([{a: [1, 0], b: [1, 1], c: "", d: [1, 4]}, + {a: [1, 1], b: [1, 1], c: "xx", d: [1, 7]}, + {a: [1, 4], b: [1, 5], c: "ab", d: [1, 6]}, + {a: [1, 4], b: [1, 6], c: "", d: null}, + {a: [1, 5], b: [1, 6], c: "abc", d: [1, 5]}, + {a: [1, 6], b: [1, 8], c: "", d: [1, 5]}, + {a: [1, 4], b: [1, 4], c: "\n\n", d: [3, 1]}, + {bm: [1, 9], a: [1, 1], b: [1, 1], c: "\n", d: [2, 8]}], function(test) { + cm.setValue("1234567890\n1234567890\n1234567890"); + var b = cm.setBookmark(p(test.bm) || Pos(1, 5)); + cm.replaceRange(test.c, p(test.a), p(test.b)); + eqCursorPos(b.find(), p(test.d)); + }); +}); + +testCM("bookmarkInsertLeft", function(cm) { + var br = cm.setBookmark(Pos(0, 2), {insertLeft: false}); + var bl = cm.setBookmark(Pos(0, 2), {insertLeft: true}); + cm.setCursor(Pos(0, 2)); + cm.replaceSelection("hi"); + eqCursorPos(br.find(), Pos(0, 2)); + eqCursorPos(bl.find(), Pos(0, 4)); + cm.replaceRange("", Pos(0, 4), Pos(0, 5)); + cm.replaceRange("", Pos(0, 2), Pos(0, 4)); + cm.replaceRange("", Pos(0, 1), Pos(0, 2)); + // Verify that deleting next to bookmarks doesn't kill them + eqCursorPos(br.find(), Pos(0, 1)); + eqCursorPos(bl.find(), Pos(0, 1)); +}, {value: "abcdef"}); + +testCM("bookmarkCursor", function(cm) { + var pos01 = cm.cursorCoords(Pos(0, 1)), pos11 = cm.cursorCoords(Pos(1, 1)), + pos20 = cm.cursorCoords(Pos(2, 0)), pos30 = cm.cursorCoords(Pos(3, 0)), + pos41 = cm.cursorCoords(Pos(4, 1)); + cm.setBookmark(Pos(0, 1), {widget: document.createTextNode("←"), insertLeft: true}); + cm.setBookmark(Pos(2, 0), {widget: document.createTextNode("←"), insertLeft: true}); + cm.setBookmark(Pos(1, 1), {widget: document.createTextNode("→")}); + cm.setBookmark(Pos(3, 0), {widget: document.createTextNode("→")}); + var new01 = cm.cursorCoords(Pos(0, 1)), new11 = cm.cursorCoords(Pos(1, 1)), + new20 = cm.cursorCoords(Pos(2, 0)), new30 = cm.cursorCoords(Pos(3, 0)); + near(new01.left, pos01.left, 1); + near(new01.top, pos01.top, 1); + is(new11.left > pos11.left, "at right, middle of line"); + near(new11.top == pos11.top, 1); + near(new20.left, pos20.left, 1); + near(new20.top, pos20.top, 1); + is(new30.left > pos30.left, "at right, empty line"); + near(new30.top, pos30, 1); + cm.setBookmark(Pos(4, 0), {widget: document.createTextNode("→")}); + is(cm.cursorCoords(Pos(4, 1)).left > pos41.left, "single-char bug"); +}, {value: "foo\nbar\n\n\nx\ny"}); + +testCM("multiBookmarkCursor", function(cm) { + var ms = [], m; + function add(insertLeft) { + for (var i = 0; i < 3; ++i) { + var node = document.createElement("span"); + node.innerHTML = "X"; + ms.push(cm.setBookmark(Pos(0, 1), {widget: node, insertLeft: insertLeft})); + } + } + var base1 = cm.cursorCoords(Pos(0, 1)).left, base4 = cm.cursorCoords(Pos(0, 4)).left; + add(true); + near(base1, cm.cursorCoords(Pos(0, 1)).left, 1); + while (m = ms.pop()) m.clear(); + add(false); + near(base4, cm.cursorCoords(Pos(0, 1)).left, 1); +}, {value: "abcdefg"}); + +testCM("getAllMarks", function(cm) { + addDoc(cm, 10, 10); + var m1 = cm.setBookmark(Pos(0, 2)); + var m2 = cm.markText(Pos(0, 2), Pos(3, 2)); + var m3 = cm.markText(Pos(1, 2), Pos(1, 8)); + var m4 = cm.markText(Pos(8, 0), Pos(9, 0)); + eq(cm.getAllMarks().length, 4); + m1.clear(); + m3.clear(); + eq(cm.getAllMarks().length, 2); +}); + +testCM("setValueClears", function(cm) { + cm.addLineClass(0, "wrap", "foo"); + var mark = cm.markText(Pos(0, 0), Pos(1, 1), {inclusiveLeft: true, inclusiveRight: true}); + cm.setValue("foo"); + is(!cm.lineInfo(0).wrapClass); + is(!mark.find()); +}, {value: "a\nb"}); + +testCM("bug577", function(cm) { + cm.setValue("a\nb"); + cm.clearHistory(); + cm.setValue("fooooo"); + cm.undo(); +}); + +testCM("scrollSnap", function(cm) { + cm.setSize(100, 100); + addDoc(cm, 200, 200); + cm.setCursor(Pos(100, 180)); + var info = cm.getScrollInfo(); + is(info.left > 0 && info.top > 0); + cm.setCursor(Pos(0, 0)); + info = cm.getScrollInfo(); + is(info.left == 0 && info.top == 0, "scrolled clean to top"); + cm.setCursor(Pos(100, 180)); + cm.setCursor(Pos(199, 0)); + info = cm.getScrollInfo(); + is(info.left == 0 && info.top + 2 > info.height - cm.getScrollerElement().clientHeight, "scrolled clean to bottom"); +}); + +testCM("scrollIntoView", function(cm) { + function test(line, ch, msg) { + var pos = Pos(line, ch); + cm.scrollIntoView(pos); + var outer = cm.getWrapperElement().getBoundingClientRect(); + var box = cm.charCoords(pos, "window"); + is(box.left >= outer.left, msg + " (left)"); + is(box.right <= outer.right, msg + " (right)"); + is(box.top >= outer.top, msg + " (top)"); + is(box.bottom <= outer.bottom, msg + " (bottom)"); + } + addDoc(cm, 200, 200); + test(199, 199, "bottom right"); + test(0, 0, "top left"); + test(100, 100, "center"); + test(199, 0, "bottom left"); + test(0, 199, "top right"); + test(100, 100, "center again"); +}); + +testCM("scrollBackAndForth", function(cm) { + addDoc(cm, 1, 200); + cm.operation(function() { + cm.scrollIntoView(Pos(199, 0)); + cm.scrollIntoView(Pos(4, 0)); + }); + is(cm.getScrollInfo().top > 0); +}); + +testCM("selectAllNoScroll", function(cm) { + addDoc(cm, 1, 200); + cm.execCommand("selectAll"); + eq(cm.getScrollInfo().top, 0); + cm.setCursor(199); + cm.execCommand("selectAll"); + is(cm.getScrollInfo().top > 0); +}); + +testCM("selectionPos", function(cm) { + if (cm.getOption("inputStyle") != "textarea") return; + cm.setSize(100, 100); + addDoc(cm, 200, 100); + cm.setSelection(Pos(1, 100), Pos(98, 100)); + var lineWidth = cm.charCoords(Pos(0, 200), "local").left; + var lineHeight = (cm.charCoords(Pos(99)).top - cm.charCoords(Pos(0)).top) / 100; + cm.scrollTo(0, 0); + var selElt = byClassName(cm.getWrapperElement(), "CodeMirror-selected"); + var outer = cm.getWrapperElement().getBoundingClientRect(); + var sawMiddle, sawTop, sawBottom; + for (var i = 0, e = selElt.length; i < e; ++i) { + var box = selElt[i].getBoundingClientRect(); + var atLeft = box.left - outer.left < 30; + var width = box.right - box.left; + var atRight = box.right - outer.left > .8 * lineWidth; + if (atLeft && atRight) { + sawMiddle = true; + is(box.bottom - box.top > 90 * lineHeight, "middle high"); + is(width > .9 * lineWidth, "middle wide"); + } else { + is(width > .4 * lineWidth, "top/bot wide enough"); + is(width < .6 * lineWidth, "top/bot slim enough"); + if (atLeft) { + sawBottom = true; + is(box.top - outer.top > 96 * lineHeight, "bot below"); + } else if (atRight) { + sawTop = true; + is(box.top - outer.top < 2.1 * lineHeight, "top above"); + } + } + } + is(sawTop && sawBottom && sawMiddle, "all parts"); +}, null); + +testCM("restoreHistory", function(cm) { + cm.setValue("abc\ndef"); + cm.replaceRange("hello", Pos(1, 0), Pos(1)); + cm.replaceRange("goop", Pos(0, 0), Pos(0)); + cm.undo(); + var storedVal = cm.getValue(), storedHist = cm.getHistory(); + if (window.JSON) storedHist = JSON.parse(JSON.stringify(storedHist)); + eq(storedVal, "abc\nhello"); + cm.setValue(""); + cm.clearHistory(); + eq(cm.historySize().undo, 0); + cm.setValue(storedVal); + cm.setHistory(storedHist); + cm.redo(); + eq(cm.getValue(), "goop\nhello"); + cm.undo(); cm.undo(); + eq(cm.getValue(), "abc\ndef"); +}); + +testCM("doubleScrollbar", function(cm) { + var dummy = document.body.appendChild(document.createElement("p")); + dummy.style.cssText = "height: 50px; overflow: scroll; width: 50px"; + var scrollbarWidth = dummy.offsetWidth + 1 - dummy.clientWidth; + document.body.removeChild(dummy); + if (scrollbarWidth < 2) return; + cm.setSize(null, 100); + addDoc(cm, 1, 300); + var wrap = cm.getWrapperElement(); + is(wrap.offsetWidth - byClassName(wrap, "CodeMirror-lines")[0].offsetWidth <= scrollbarWidth * 1.5); +}); + +testCM("weirdLinebreaks", function(cm) { + cm.setValue("foo\nbar\rbaz\r\nquux\n\rplop"); + is(cm.getValue(), "foo\nbar\nbaz\nquux\n\nplop"); + is(cm.lineCount(), 6); + cm.setValue("\n\n"); + is(cm.lineCount(), 3); +}); + +testCM("setSize", function(cm) { + cm.setSize(100, 100); + var wrap = cm.getWrapperElement(); + is(wrap.offsetWidth, 100); + is(wrap.offsetHeight, 100); + cm.setSize("100%", "3em"); + is(wrap.style.width, "100%"); + is(wrap.style.height, "3em"); + cm.setSize(null, 40); + is(wrap.style.width, "100%"); + is(wrap.style.height, "40px"); +}); + +function foldLines(cm, start, end, autoClear) { + return cm.markText(Pos(start, 0), Pos(end - 1), { + inclusiveLeft: true, + inclusiveRight: true, + collapsed: true, + clearOnEnter: autoClear + }); +} + +testCM("collapsedLines", function(cm) { + addDoc(cm, 4, 10); + var range = foldLines(cm, 4, 5), cleared = 0; + CodeMirror.on(range, "clear", function() {cleared++;}); + cm.setCursor(Pos(3, 0)); + CodeMirror.commands.goLineDown(cm); + eqCharPos(cm.getCursor(), Pos(5, 0)); + cm.replaceRange("abcdefg", Pos(3, 0), Pos(3)); + cm.setCursor(Pos(3, 6)); + CodeMirror.commands.goLineDown(cm); + eqCharPos(cm.getCursor(), Pos(5, 4)); + cm.replaceRange("ab", Pos(3, 0), Pos(3)); + cm.setCursor(Pos(3, 2)); + CodeMirror.commands.goLineDown(cm); + eqCharPos(cm.getCursor(), Pos(5, 2)); + cm.operation(function() {range.clear(); range.clear();}); + eq(cleared, 1); +}); + +testCM("collapsedRangeCoordsChar", function(cm) { + var pos_1_3 = cm.charCoords(Pos(1, 3)); + pos_1_3.left += 2; pos_1_3.top += 2; + var opts = {collapsed: true, inclusiveLeft: true, inclusiveRight: true}; + var m1 = cm.markText(Pos(0, 0), Pos(2, 0), opts); + eqCharPos(cm.coordsChar(pos_1_3), Pos(3, 3)); + m1.clear(); + var m1 = cm.markText(Pos(0, 0), Pos(1, 1), {collapsed: true, inclusiveLeft: true}); + var m2 = cm.markText(Pos(1, 1), Pos(2, 0), {collapsed: true, inclusiveRight: true}); + eqCharPos(cm.coordsChar(pos_1_3), Pos(3, 3)); + m1.clear(); m2.clear(); + var m1 = cm.markText(Pos(0, 0), Pos(1, 6), opts); + eqCharPos(cm.coordsChar(pos_1_3), Pos(3, 3)); +}, {value: "123456\nabcdef\nghijkl\nmnopqr\n"}); + +testCM("collapsedRangeBetweenLinesSelected", function(cm) { + if (cm.getOption("inputStyle") != "textarea") return; + var widget = document.createElement("span"); + widget.textContent = "\u2194"; + cm.markText(Pos(0, 3), Pos(1, 0), {replacedWith: widget}); + cm.setSelection(Pos(0, 3), Pos(1, 0)); + var selElts = byClassName(cm.getWrapperElement(), "CodeMirror-selected"); + for (var i = 0, w = 0; i < selElts.length; i++) + w += selElts[i].offsetWidth; + is(w > 0); +}, {value: "one\ntwo"}); + +testCM("randomCollapsedRanges", function(cm) { + addDoc(cm, 20, 500); + cm.operation(function() { + for (var i = 0; i < 200; i++) { + var start = Pos(Math.floor(Math.random() * 500), Math.floor(Math.random() * 20)); + if (i % 4) + try { cm.markText(start, Pos(start.line + 2, 1), {collapsed: true}); } + catch(e) { if (!/overlapping/.test(String(e))) throw e; } + else + cm.markText(start, Pos(start.line, start.ch + 4), {"className": "foo"}); + } + }); +}); + +testCM("hiddenLinesAutoUnfold", function(cm) { + var range = foldLines(cm, 1, 3, true), cleared = 0; + CodeMirror.on(range, "clear", function() {cleared++;}); + cm.setCursor(Pos(3, 0)); + eq(cleared, 0); + cm.execCommand("goCharLeft"); + eq(cleared, 1); + range = foldLines(cm, 1, 3, true); + CodeMirror.on(range, "clear", function() {cleared++;}); + eqCursorPos(cm.getCursor(), Pos(3, 0)); + cm.setCursor(Pos(0, 3)); + cm.execCommand("goCharRight"); + eq(cleared, 2); +}, {value: "abc\ndef\nghi\njkl"}); + +testCM("hiddenLinesSelectAll", function(cm) { // Issue #484 + addDoc(cm, 4, 20); + foldLines(cm, 0, 10); + foldLines(cm, 11, 20); + CodeMirror.commands.selectAll(cm); + eqCursorPos(cm.getCursor(true), Pos(10, 0)); + eqCursorPos(cm.getCursor(false), Pos(10, 4)); +}); + +testCM("clickFold", function(cm) { // Issue #5392 + cm.setValue("foo { bar }") + var widget = document.createElement("span") + widget.textContent = "<>" + cm.markText(Pos(0, 5), Pos(0, 10), {replacedWith: widget}) + var after = cm.charCoords(Pos(0, 10)) + var foundOn = cm.coordsChar({left: after.left - 1, top: after.top + 4}) + is(foundOn.ch <= 5 || foundOn.ch >= 10, "Position is not inside the folded range") +}) + +testCM("everythingFolded", function(cm) { + addDoc(cm, 2, 2); + function enterPress() { + cm.triggerOnKeyDown({type: "keydown", keyCode: 13, preventDefault: function(){}, stopPropagation: function(){}}); + } + var fold = foldLines(cm, 0, 2); + enterPress(); + eq(cm.getValue(), "xx\nxx"); + fold.clear(); + fold = foldLines(cm, 0, 2, true); + eq(fold.find(), null); + enterPress(); + eq(cm.getValue(), "\nxx\nxx"); +}); + +testCM("structuredFold", function(cm) { + addDoc(cm, 4, 8); + var range = cm.markText(Pos(1, 2), Pos(6, 2), { + replacedWith: document.createTextNode("Q") + }); + cm.setCursor(0, 3); + CodeMirror.commands.goLineDown(cm); + eqCharPos(cm.getCursor(), Pos(6, 2)); + CodeMirror.commands.goCharLeft(cm); + eqCharPos(cm.getCursor(), Pos(1, 2)); + CodeMirror.commands.delCharAfter(cm); + eq(cm.getValue(), "xxxx\nxxxx\nxxxx"); + addDoc(cm, 4, 8); + range = cm.markText(Pos(1, 2), Pos(6, 2), { + replacedWith: document.createTextNode("M"), + clearOnEnter: true + }); + var cleared = 0; + CodeMirror.on(range, "clear", function(){++cleared;}); + cm.setCursor(0, 3); + CodeMirror.commands.goLineDown(cm); + eqCharPos(cm.getCursor(), Pos(6, 2)); + CodeMirror.commands.goCharLeft(cm); + eqCharPos(cm.getCursor(), Pos(6, 1)); + eq(cleared, 1); + range.clear(); + eq(cleared, 1); + range = cm.markText(Pos(1, 2), Pos(6, 2), { + replacedWith: document.createTextNode("Q"), + clearOnEnter: true + }); + range.clear(); + cm.setCursor(1, 2); + CodeMirror.commands.goCharRight(cm); + eqCharPos(cm.getCursor(), Pos(1, 3)); + range = cm.markText(Pos(2, 0), Pos(4, 4), { + replacedWith: document.createTextNode("M") + }); + cm.setCursor(1, 0); + CodeMirror.commands.goLineDown(cm); + eqCharPos(cm.getCursor(), Pos(2, 0)); +}, null); + +testCM("nestedFold", function(cm) { + addDoc(cm, 10, 3); + function fold(ll, cl, lr, cr) { + return cm.markText(Pos(ll, cl), Pos(lr, cr), {collapsed: true}); + } + var inner1 = fold(0, 6, 1, 3), inner2 = fold(0, 2, 1, 8), outer = fold(0, 1, 2, 3), inner0 = fold(0, 5, 0, 6); + cm.setCursor(0, 1); + CodeMirror.commands.goCharRight(cm); + eqCursorPos(cm.getCursor(), Pos(2, 3)); + inner0.clear(); + CodeMirror.commands.goCharLeft(cm); + eqCursorPos(cm.getCursor(), Pos(0, 1)); + outer.clear(); + CodeMirror.commands.goCharRight(cm); + eqCursorPos(cm.getCursor(), Pos(0, 2, "before")); + CodeMirror.commands.goCharRight(cm); + eqCursorPos(cm.getCursor(), Pos(1, 8)); + inner2.clear(); + CodeMirror.commands.goCharLeft(cm); + eqCursorPos(cm.getCursor(), Pos(1, 7, "after")); + cm.setCursor(0, 5); + CodeMirror.commands.goCharRight(cm); + eqCursorPos(cm.getCursor(), Pos(0, 6, "before")); + CodeMirror.commands.goCharRight(cm); + eqCursorPos(cm.getCursor(), Pos(1, 3)); +}); + +testCM("badNestedFold", function(cm) { + addDoc(cm, 4, 4); + cm.markText(Pos(0, 2), Pos(3, 2), {collapsed: true}); + var caught; + try {cm.markText(Pos(0, 1), Pos(0, 3), {collapsed: true});} + catch(e) {caught = e;} + is(caught instanceof Error, "no error"); + is(/overlap/i.test(caught.message), "wrong error"); +}); + +testCM("nestedFoldOnSide", function(cm) { + var m1 = cm.markText(Pos(0, 1), Pos(2, 1), {collapsed: true, inclusiveRight: true}); + var m2 = cm.markText(Pos(0, 1), Pos(0, 2), {collapsed: true}); + cm.markText(Pos(0, 1), Pos(0, 2), {collapsed: true}).clear(); + try { cm.markText(Pos(0, 1), Pos(0, 2), {collapsed: true, inclusiveLeft: true}); } + catch(e) { var caught = e; } + is(caught && /overlap/i.test(caught.message)); + var m3 = cm.markText(Pos(2, 0), Pos(2, 1), {collapsed: true}); + var m4 = cm.markText(Pos(2, 0), Pos(2, 1), {collapse: true, inclusiveRight: true}); + m1.clear(); m4.clear(); + m1 = cm.markText(Pos(0, 1), Pos(2, 1), {collapsed: true}); + cm.markText(Pos(2, 0), Pos(2, 1), {collapsed: true}).clear(); + try { cm.markText(Pos(2, 0), Pos(2, 1), {collapsed: true, inclusiveRight: true}); } + catch(e) { var caught = e; } + is(caught && /overlap/i.test(caught.message)); +}, {value: "ab\ncd\ef"}); + +testCM("editInFold", function(cm) { + addDoc(cm, 4, 6); + var m = cm.markText(Pos(1, 2), Pos(3, 2), {collapsed: true}); + cm.replaceRange("", Pos(0, 0), Pos(1, 3)); + cm.replaceRange("", Pos(2, 1), Pos(3, 3)); + cm.replaceRange("a\nb\nc\nd", Pos(0, 1), Pos(1, 0)); + cm.cursorCoords(Pos(0, 0)); +}); + +testCM("wrappingInlineWidget", function(cm) { + cm.setSize("11em"); + var w = document.createElement("span"); + w.style.color = "red"; + w.innerHTML = "one two three four"; + cm.markText(Pos(0, 6), Pos(0, 9), {replacedWith: w}); + var cur0 = cm.cursorCoords(Pos(0, 0)), cur1 = cm.cursorCoords(Pos(0, 10)); + is(cur0.top < cur1.top); + is(cur0.bottom < cur1.bottom); + var curL = cm.cursorCoords(Pos(0, 6)), curR = cm.cursorCoords(Pos(0, 9)); + eq(curL.top, cur0.top); + eq(curL.bottom, cur0.bottom); + eq(curR.top, cur1.top); + eq(curR.bottom, cur1.bottom); + cm.replaceRange("", Pos(0, 9), Pos(0)); + curR = cm.cursorCoords(Pos(0, 9)); + eq(curR.top, cur1.top); + eq(curR.bottom, cur1.bottom); +}, {value: "1 2 3 xxx 4", lineWrapping: true}); + +testCM("showEmptyWidgetSpan", function(cm) { + var marker = cm.markText(Pos(0, 2), Pos(0, 2), { + clearWhenEmpty: false, + replacedWith: document.createTextNode("X") + }); + var text = cm.display.view[0].text; + eq(text.textContent || text.innerText, "abXc"); +}, {value: "abc"}); + +testCM("changedInlineWidget", function(cm) { + cm.setSize("10em"); + var w = document.createElement("span"); + w.innerHTML = "x"; + var m = cm.markText(Pos(0, 4), Pos(0, 5), {replacedWith: w}); + w.innerHTML = "and now the widget is really really long all of a sudden and a scrollbar is needed"; + m.changed(); + var hScroll = byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0]; + is(hScroll.scrollWidth > hScroll.clientWidth); +}, {value: "hello there"}); + +testCM("changedBookmark", function(cm) { + cm.setSize("10em"); + var w = document.createElement("span"); + w.innerHTML = "x"; + var m = cm.setBookmark(Pos(0, 4), {widget: w}); + w.innerHTML = "and now the widget is really really long all of a sudden and a scrollbar is needed"; + m.changed(); + var hScroll = byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0]; + is(hScroll.scrollWidth > hScroll.clientWidth); +}, {value: "abcdefg"}); + +testCM("inlineWidget", function(cm) { + var w = cm.setBookmark(Pos(0, 2), {widget: document.createTextNode("uu")}); + cm.setCursor(0, 2); + CodeMirror.commands.goLineDown(cm); + eqCharPos(cm.getCursor(), Pos(1, 4)); + cm.setCursor(0, 2); + cm.replaceSelection("hi"); + eqCharPos(w.find(), Pos(0, 2)); + cm.setCursor(0, 1); + cm.replaceSelection("ay"); + eqCharPos(w.find(), Pos(0, 4)); + eq(cm.getLine(0), "uayuhiuu"); +}, {value: "uuuu\nuuuuuu"}); + +testCM("wrappingAndResizing", function(cm) { + cm.setSize(null, "auto"); + cm.setOption("lineWrapping", true); + var wrap = cm.getWrapperElement(), h0 = wrap.offsetHeight; + var doc = "xxx xxx xxx xxx xxx"; + cm.setValue(doc); + for (var step = 10, w = cm.charCoords(Pos(0, 18), "div").right;; w += step) { + cm.setSize(w); + if (wrap.offsetHeight <= h0 * (opera_lt10 ? 1.2 : 1.5)) { + if (step == 10) { w -= 10; step = 1; } + else break; + } + } + // Ensure that putting the cursor at the end of the maximally long + // line doesn't cause wrapping to happen. + cm.setCursor(Pos(0, doc.length)); + eq(wrap.offsetHeight, h0); + cm.replaceSelection("x"); + is(wrap.offsetHeight > h0, "wrapping happens"); + // Now add a max-height and, in a document consisting of + // almost-wrapped lines, go over it so that a scrollbar appears. + cm.setValue(doc + "\n" + doc + "\n"); + cm.getScrollerElement().style.maxHeight = "100px"; + cm.replaceRange("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n!\n", Pos(2, 0)); + forEach([Pos(0, doc.length), Pos(0, doc.length - 1), + Pos(0, 0), Pos(1, doc.length), Pos(1, doc.length - 1)], + function(pos) { + var coords = cm.charCoords(pos); + eqCharPos(pos, cm.coordsChar({left: coords.left + 2, top: coords.top + 5})); + }); +}, null, ie_lt8); + +testCM("measureEndOfLine", function(cm) { + cm.setSize(null, "auto"); + var inner = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild; + var lh = inner.offsetHeight; + for (var step = 10, w = cm.charCoords(Pos(0, 7), "div").right;; w += step) { + cm.setSize(w); + if (inner.offsetHeight < 2.5 * lh) { + if (step == 10) { w -= 10; step = 1; } + else break; + } + } + cm.setValue(cm.getValue() + "\n\n"); + var endPos = cm.charCoords(Pos(0, 18), "local"); + is(endPos.top > lh * .8, "not at top"); + is(endPos.left > w - 20, "at right"); + endPos = cm.charCoords(Pos(0, 18)); + eqCursorPos(cm.coordsChar({left: endPos.left, top: endPos.top + 5}), Pos(0, 18, "before")); + + var wrapPos = cm.cursorCoords(Pos(0, 9, "before")); + is(wrapPos.top < endPos.top, "wrapPos is actually in first line"); + eqCursorPos(cm.coordsChar({left: wrapPos.left + 10, top: wrapPos.top}), Pos(0, 9, "before")); +}, {mode: "text/html", value: "", lineWrapping: true}, ie_lt8 || opera_lt10); + +testCM("measureWrappedEndOfLine", function(cm) { + cm.setSize(null, "auto"); + var inner = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild; + var lh = inner.offsetHeight; + for (var step = 10, w = cm.charCoords(Pos(0, 7), "div").right;; w += step) { + cm.setSize(w); + if (inner.offsetHeight < 2.5 * lh) { + if (step == 10) { w -= 10; step = 1; } + else break; + } + } + for (var i = 0; i < 3; ++i) { + var endPos = cm.charCoords(Pos(0, 12)); // Next-to-last since last would wrap (#1862) + endPos.left += w; // Add width of editor just to be sure that we are behind last character + eqCursorPos(cm.coordsChar(endPos), Pos(0, 13, "before")); + endPos.left += w * 100; + eqCursorPos(cm.coordsChar(endPos), Pos(0, 13, "before")); + cm.setValue("0123456789abcابجابجابجابج"); + if (i == 1) { + var node = document.createElement("div"); + node.innerHTML = "hi"; node.style.height = "30px"; + cm.addLineWidget(0, node, {above: true}); + } + } +}, {mode: "text/html", value: "0123456789abcde0123456789", lineWrapping: true}, ie_lt8 || opera_lt10); + +testCM("measureEndOfLineBidi", function(cm) { + eqCursorPos(cm.coordsChar({left: 5000, top: cm.charCoords(Pos(0, 0)).top}), Pos(0, 8, "after")) +}, {value: "إإإإuuuuإإإإ"}) + +testCM("measureWrappedBidiLevel2", function(cm) { + cm.setSize(cm.charCoords(Pos(0, 6), "editor").right + 60) + var c9 = cm.charCoords(Pos(0, 9)) + eqCharPos(cm.coordsChar({left: c9.right - 1, top: c9.top + 1}), Pos(0, 9)) +}, {value: "foobar إإ إإ إإ إإ 555 بببببب", lineWrapping: true}) + +testCM("measureWrappedBeginOfLine", function(cm) { + cm.setSize(null, "auto"); + var inner = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild; + var lh = inner.offsetHeight; + for (var step = 10, w = cm.charCoords(Pos(0, 7), "div").right;; w += step) { + cm.setSize(w); + if (inner.offsetHeight < 2.5 * lh) { + if (step == 10) { w -= 10; step = 1; } + else break; + } + } + var beginOfSecondLine = Pos(0, 13, "after"); + for (var i = 0; i < 2; ++i) { + var beginPos = cm.charCoords(Pos(0, 0)); + beginPos.left -= w; + eqCursorPos(cm.coordsChar(beginPos), Pos(0, 0, "after")); + beginPos = cm.cursorCoords(beginOfSecondLine); + beginPos.left = 0; + eqCursorPos(cm.coordsChar(beginPos), beginOfSecondLine); + cm.setValue("0123456789abcابجابجابجابج"); + beginOfSecondLine = Pos(0, 25, "before"); + } +}, {mode: "text/html", value: "0123456789abcde0123456789", lineWrapping: true}); + +testCM("scrollVerticallyAndHorizontally", function(cm) { + if (cm.getOption("inputStyle") != "textarea") return; + cm.setSize(100, 100); + addDoc(cm, 40, 40); + cm.setCursor(39); + var wrap = cm.getWrapperElement(), bar = byClassName(wrap, "CodeMirror-vscrollbar")[0]; + is(bar.offsetHeight < wrap.offsetHeight, "vertical scrollbar limited by horizontal one"); + var cursorBox = byClassName(wrap, "CodeMirror-cursor")[0].getBoundingClientRect(); + var editorBox = wrap.getBoundingClientRect(); + is(cursorBox.bottom < editorBox.top + cm.getScrollerElement().clientHeight, + "bottom line visible"); +}, {lineNumbers: true}); + +testCM("moveVstuck", function(cm) { + var lines = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild, h0 = lines.offsetHeight; + var val = "fooooooooooooooooooooooooo baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar\n"; + cm.setValue(val); + for (var w = cm.charCoords(Pos(0, 26), "div").right * 2.8;; w += 5) { + cm.setSize(w); + if (lines.offsetHeight <= 3.5 * h0) break; + } + cm.setCursor(Pos(0, val.length - 1)); + cm.moveV(-1, "line"); + eqCursorPos(cm.getCursor(), Pos(0, 27, "before")); + is(cm.cursorCoords(null, "local").top < h0, "cursor is in first visual line"); +}, {lineWrapping: true}, ie_lt8 || opera_lt10); + +testCM("collapseOnMove", function(cm) { + cm.setSelection(Pos(0, 1), Pos(2, 4)); + cm.execCommand("goLineUp"); + is(!cm.somethingSelected()); + eqCharPos(cm.getCursor(), Pos(0, 1)); + cm.setSelection(Pos(0, 1), Pos(2, 4)); + cm.execCommand("goPageDown"); + is(!cm.somethingSelected()); + eqCharPos(cm.getCursor(), Pos(2, 4)); + cm.execCommand("goLineUp"); + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(0, 4)); + cm.setSelection(Pos(0, 1), Pos(2, 4)); + cm.execCommand("goCharLeft"); + is(!cm.somethingSelected()); + eqCharPos(cm.getCursor(), Pos(0, 1)); +}, {value: "aaaaa\nb\nccccc"}); + +testCM("clickTab", function(cm) { + var p0 = cm.charCoords(Pos(0, 0)); + eqCharPos(cm.coordsChar({left: p0.left + 5, top: p0.top + 5}), Pos(0, 0)); + eqCharPos(cm.coordsChar({left: p0.right - 5, top: p0.top + 5}), Pos(0, 1)); +}, {value: "\t\n\n", lineWrapping: true, tabSize: 8}); + +testCM("verticalScroll", function(cm) { + cm.setSize(100, 200); + cm.setValue("foo\nbar\nbaz\n"); + var sc = cm.getScrollerElement(), baseWidth = sc.scrollWidth; + cm.replaceRange("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah", Pos(0, 0), Pos(0)); + is(sc.scrollWidth > baseWidth, "scrollbar present"); + cm.replaceRange("foo", Pos(0, 0), Pos(0)); + eq(sc.scrollWidth, baseWidth, "scrollbar gone"); + cm.replaceRange("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah", Pos(0, 0), Pos(0)); + cm.replaceRange("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbh", Pos(1, 0), Pos(1)); + is(sc.scrollWidth > baseWidth, "present again"); + var curWidth = sc.scrollWidth; + cm.replaceRange("foo", Pos(0, 0), Pos(0)); + is(sc.scrollWidth < curWidth, "scrollbar smaller"); + is(sc.scrollWidth > baseWidth, "but still present"); +}); + +testCM("extraKeys", function(cm) { + var outcome; + function fakeKey(expected, code, props) { + if (typeof code == "string") code = code.charCodeAt(0); + var e = {type: "keydown", keyCode: code, preventDefault: function(){}, stopPropagation: function(){}}; + if (props) for (var n in props) e[n] = props[n]; + outcome = null; + cm.triggerOnKeyDown(e); + eq(outcome, expected); + } + CodeMirror.commands.testCommand = function() {outcome = "tc";}; + CodeMirror.commands.goTestCommand = function() {outcome = "gtc";}; + cm.setOption("extraKeys", {"Shift-X": function() {outcome = "sx";}, + "X": function() {outcome = "x";}, + "Ctrl-Alt-U": function() {outcome = "cau";}, + "End": "testCommand", + "Home": "goTestCommand", + "Tab": false}); + fakeKey(null, "U"); + fakeKey("cau", "U", {ctrlKey: true, altKey: true}); + fakeKey(null, "U", {shiftKey: true, ctrlKey: true, altKey: true}); + fakeKey("x", "X"); + fakeKey("sx", "X", {shiftKey: true}); + fakeKey("tc", 35); + fakeKey(null, 35, {shiftKey: true}); + fakeKey("gtc", 36); + fakeKey("gtc", 36, {shiftKey: true}); + fakeKey(null, 9); +}, null, window.opera && mac); + +testCM("wordMovementCommands", function(cm) { + cm.execCommand("goWordLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqCursorPos(cm.getCursor(), Pos(0, 7, "before")); + cm.execCommand("goWordLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 5, "after")); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqCursorPos(cm.getCursor(), Pos(0, 12, "before")); + cm.execCommand("goWordLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 9, "after")); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqCursorPos(cm.getCursor(), Pos(0, 24, "before")); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqCursorPos(cm.getCursor(), Pos(1, 9, "before")); + cm.execCommand("goWordRight"); + eqCursorPos(cm.getCursor(), Pos(1, 13, "before")); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqCharPos(cm.getCursor(), Pos(2, 0)); +}, {value: "this is (the) firstline.\na foo12\u00e9\u00f8\u00d7bar\n"}); + +testCM("groupMovementCommands", function(cm) { + cm.execCommand("goGroupLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(0, 4, "before")); + cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(0, 7, "before")); + cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(0, 10, "before")); + cm.execCommand("goGroupLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 7, "after")); + cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(0, 15, "before")); + cm.setCursor(Pos(0, 17)); + cm.execCommand("goGroupLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 16, "after")); + cm.execCommand("goGroupLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 14, "after")); + cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(0, 20, "before")); + cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(1, 0, "after")); + cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(1, 2, "before")); + cm.execCommand("goGroupRight"); + eqCursorPos(cm.getCursor(), Pos(1, 5, "before")); + cm.execCommand("goGroupLeft"); cm.execCommand("goGroupLeft"); + eqCursorPos(cm.getCursor(), Pos(1, 0, "after")); + cm.execCommand("goGroupLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 20, "after")); + cm.execCommand("goGroupLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 16, "after")); +}, {value: "booo ba---quux. ffff\n abc d"}); + +testCM("groupsAndWhitespace", function(cm) { + var positions = [Pos(0, 0), Pos(0, 2), Pos(0, 5), Pos(0, 9), Pos(0, 11), + Pos(1, 0), Pos(1, 2), Pos(1, 5)]; + for (var i = 1; i < positions.length; i++) { + cm.execCommand("goGroupRight"); + eqCharPos(cm.getCursor(), positions[i]); + } + for (var i = positions.length - 2; i >= 0; i--) { + cm.execCommand("goGroupLeft"); + eqCharPos(cm.getCursor(), i == 2 ? Pos(0, 6, "before") : positions[i]); + } +}, {value: " foo +++ \n bar"}); + +testCM("charMovementCommands", function(cm) { + cm.execCommand("goCharLeft"); cm.execCommand("goColumnLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goCharRight"); cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 2, "before")); + cm.setCursor(Pos(1, 0)); + cm.execCommand("goColumnLeft"); + eqCursorPos(cm.getCursor(), Pos(1, 0)); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 5, "before")); + cm.execCommand("goColumnRight"); + eqCursorPos(cm.getCursor(), Pos(0, 5, "before")); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(1, 0, "after")); + cm.execCommand("goLineEnd"); + eqCursorPos(cm.getCursor(), Pos(1, 5, "before")); + cm.execCommand("goLineStartSmart"); + eqCursorPos(cm.getCursor(), Pos(1, 1, "after")); + cm.execCommand("goLineStartSmart"); + eqCursorPos(cm.getCursor(), Pos(1, 0, "after")); + cm.setCursor(Pos(2, 0)); + cm.execCommand("goCharRight"); cm.execCommand("goColumnRight"); + eqCursorPos(cm.getCursor(), Pos(2, 0)); +}, {value: "line1\n ine2\n"}); + +testCM("verticalMovementCommands", function(cm) { + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(1, 0)); + cm.setCursor(Pos(1, 12)); + cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(2, 5)); + cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(3, 0)); + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(2, 5)); + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(1, 12)); + cm.execCommand("goPageDown"); + eqCharPos(cm.getCursor(), Pos(5, 0)); + cm.execCommand("goPageDown"); cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(5, 0)); + cm.execCommand("goPageUp"); + eqCharPos(cm.getCursor(), Pos(0, 0)); +}, {value: "line1\nlong long line2\nline3\n\nline5\n"}); + +testCM("verticalMovementCommandsWrapping", function(cm) { + cm.setSize(120); + cm.setCursor(Pos(0, 5)); + cm.execCommand("goLineDown"); + eq(cm.getCursor().line, 0); + is(cm.getCursor().ch > 5, "moved beyond wrap"); + for (var i = 0; ; ++i) { + is(i < 20, "no endless loop"); + cm.execCommand("goLineDown"); + var cur = cm.getCursor(); + if (cur.line == 1) eq(cur.ch, 5); + if (cur.line == 2) { eq(cur.ch, 1); break; } + } +}, {value: "a very long line that wraps around somehow so that we can test cursor movement\nshortone\nk", + lineWrapping: true}); + +testCM("verticalMovementCommandsSingleLine", function(cm) { + cm.display.wrapper.style.height = "auto"; + cm.refresh(); + cm.execCommand("goLineUp"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goLineDown"); + eqCursorPos(cm.getCursor(), Pos(0, 11)); + cm.setCursor(Pos(0, 5)); + cm.execCommand("goLineDown"); + eqCursorPos(cm.getCursor(), Pos(0, 11)); + cm.execCommand("goLineDown"); + eqCursorPos(cm.getCursor(), Pos(0, 11)); + cm.execCommand("goLineUp"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goLineUp"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goPageDown"); + eqCursorPos(cm.getCursor(), Pos(0, 11)); + cm.execCommand("goPageDown"); cm.execCommand("goLineDown"); + eqCursorPos(cm.getCursor(), Pos(0, 11)); + cm.execCommand("goPageUp"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.setCursor(Pos(0, 5)); + cm.execCommand("goPageUp"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.setCursor(Pos(0, 5)); + cm.execCommand("goPageDown"); + eqCursorPos(cm.getCursor(), Pos(0, 11)); +}, {value: "single line"}); + + +testCM("rtlMovement", function(cm) { + if (cm.getOption("inputStyle") != "textarea") return; + forEach(["خحج", "خحabcخحج", "abخحخحجcd", "abخde", "abخح2342خ1حج", "خ1ح2خح3حxج", + "خحcd", "1خحcd", "abcdeح1ج", "خمرحبها مها!", "foobarر", "خ ة ق", + "", "يتم السحب في 05 فبراير 2014"], function(line) { + cm.setValue(line + "\n"); cm.execCommand("goLineStart"); + var cursors = byClassName(cm.getWrapperElement(), "CodeMirror-cursors")[0]; + var cursor = cursors.firstChild; + var prevX = cursor.offsetLeft, prevY = cursor.offsetTop; + for (var i = 0; i <= line.length; ++i) { + cm.execCommand("goCharRight"); + cursor = cursors.firstChild; + if (i == line.length) is(cursor.offsetTop > prevY, "next line"); + else is(cursor.offsetLeft > prevX, "moved right"); + prevX = cursor.offsetLeft; prevY = cursor.offsetTop; + } + cm.setCursor(0, 0); cm.execCommand("goLineEnd"); + prevX = cursors.firstChild.offsetLeft; + for (var i = 0; i < line.length; ++i) { + cm.execCommand("goCharLeft"); + cursor = cursors.firstChild; + is(cursor.offsetLeft < prevX, "moved left"); + prevX = cursor.offsetLeft; + } + }); +}, null, ie_lt9); + +// Verify that updating a line clears its bidi ordering +testCM("bidiUpdate", function(cm) { + cm.setCursor(Pos(0, 2, "before")); + cm.replaceSelection("خحج", "start"); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 6, "before")); +}, {value: "abcd\n"}); + +testCM("movebyTextUnit", function(cm) { + cm.setValue("בְּרֵאשִ\nééé́\n"); + cm.execCommand("goLineStart"); + for (var i = 0; i < 4; ++i) cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 0, "after")); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(1, 0, "after")); + cm.execCommand("goCharRight"); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(1, 4, "before")); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(1, 7, "before")); +}); + +testCM("lineChangeEvents", function(cm) { + addDoc(cm, 3, 5); + var log = [], want = ["ch 0", "ch 1", "del 2", "ch 0", "ch 0", "del 1", "del 3", "del 4"]; + for (var i = 0; i < 5; ++i) { + CodeMirror.on(cm.getLineHandle(i), "delete", function(i) { + return function() {log.push("del " + i);}; + }(i)); + CodeMirror.on(cm.getLineHandle(i), "change", function(i) { + return function() {log.push("ch " + i);}; + }(i)); + } + cm.replaceRange("x", Pos(0, 1)); + cm.replaceRange("xy", Pos(1, 1), Pos(2)); + cm.replaceRange("foo\nbar", Pos(0, 1)); + cm.replaceRange("", Pos(0, 0), Pos(cm.lineCount())); + eq(log.length, want.length, "same length"); + for (var i = 0; i < log.length; ++i) + eq(log[i], want[i]); +}); + +testCM("scrollEntirelyToRight", function(cm) { + if (cm.getOption("inputStyle") != "textarea") return; + addDoc(cm, 500, 2); + cm.setCursor(Pos(0, 500)); + var wrap = cm.getWrapperElement(), cur = byClassName(wrap, "CodeMirror-cursor")[0]; + is(wrap.getBoundingClientRect().right > cur.getBoundingClientRect().left); +}); + +testCM("lineWidgets", function(cm) { + addDoc(cm, 500, 3); + var last = cm.charCoords(Pos(2, 0)); + var node = document.createElement("div"); + node.innerHTML = "hi"; + var widget = cm.addLineWidget(1, node); + is(last.top < cm.charCoords(Pos(2, 0)).top, "took up space"); + cm.setCursor(Pos(1, 1)); + cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(2, 1)); + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(1, 1)); +}); + +testCM("lineWidgetFocus", function(cm) { + var place = document.getElementById("testground"); + place.className = "offscreen"; + try { + addDoc(cm, 500, 10); + var node = document.createElement("input"); + var widget = cm.addLineWidget(1, node); + node.focus(); + eq(document.activeElement, node); + cm.replaceRange("new stuff", Pos(1, 0)); + eq(document.activeElement, node); + } finally { + place.className = ""; + } +}); + +testCM("lineWidgetCautiousRedraw", function(cm) { + var node = document.createElement("div"); + node.innerHTML = "hahah"; + var w = cm.addLineWidget(0, node); + var redrawn = false; + w.on("redraw", function() { redrawn = true; }); + cm.replaceSelection("0"); + is(!redrawn); +}, {value: "123\n456"}); + + +var knownScrollbarWidth; +function scrollbarWidth(measure) { + if (knownScrollbarWidth != null) return knownScrollbarWidth; + var div = document.createElement('div'); + div.style.cssText = "width: 50px; height: 50px; overflow-x: scroll"; + document.body.appendChild(div); + knownScrollbarWidth = div.offsetHeight - div.clientHeight; + document.body.removeChild(div); + return knownScrollbarWidth || 0; +} + +testCM("lineWidgetChanged", function(cm) { + addDoc(cm, 2, 300); + var halfScrollbarWidth = scrollbarWidth(cm.display.measure)/2; + cm.setOption('lineNumbers', true); + cm.setSize(600, cm.defaultTextHeight() * 50); + cm.scrollTo(null, cm.heightAtLine(125, "local")); + + var expectedWidgetHeight = 60; + var expectedLinesInWidget = 3; + function w() { + var node = document.createElement("div"); + // we use these children with just under half width of the line to check measurements are made with correct width + // when placed in the measure div. + // If the widget is measured at a width much narrower than it is displayed at, the underHalf children will span two lines and break the test. + // If the widget is measured at a width much wider than it is displayed at, the overHalf children will combine and break the test. + // Note that this test only checks widgets where coverGutter is true, because these require extra styling to get the width right. + // It may also be worthwhile to check this for non-coverGutter widgets. + // Visually: + // Good: + // | ------------- display width ------------- | + // | ------- widget-width when measured ------ | + // | | -- under-half -- | | -- under-half -- | | + // | | --- over-half --- | | + // | | --- over-half --- | | + // Height: measured as 3 lines, same as it will be when actually displayed + + // Bad (too narrow): + // | ------------- display width ------------- | + // | ------ widget-width when measured ----- | < -- uh oh + // | | -- under-half -- | | + // | | -- under-half -- | | < -- when measured, shoved to next line + // | | --- over-half --- | | + // | | --- over-half --- | | + // Height: measured as 4 lines, more than expected . Will be displayed as 3 lines! + + // Bad (too wide): + // | ------------- display width ------------- | + // | -------- widget-width when measured ------- | < -- uh oh + // | | -- under-half -- | | -- under-half -- | | + // | | --- over-half --- | | --- over-half --- | | < -- when measured, combined on one line + // Height: measured as 2 lines, less than expected. Will be displayed as 3 lines! + + var barelyUnderHalfWidthHtml = '
    '; + var barelyOverHalfWidthHtml = '
    '; + node.innerHTML = new Array(3).join(barelyUnderHalfWidthHtml) + new Array(3).join(barelyOverHalfWidthHtml); + node.style.cssText = "background: yellow;font-size:0;line-height: " + (expectedWidgetHeight/expectedLinesInWidget) + "px;"; + return node; + } + var info0 = cm.getScrollInfo(); + var w0 = cm.addLineWidget(0, w(), { coverGutter: true }); + var w150 = cm.addLineWidget(150, w(), { coverGutter: true }); + var w300 = cm.addLineWidget(300, w(), { coverGutter: true }); + var info1 = cm.getScrollInfo(); + eq(info0.height + (3 * expectedWidgetHeight), info1.height); + eq(info0.top + expectedWidgetHeight, info1.top); + expectedWidgetHeight = 12; + w0.node.style.lineHeight = w150.node.style.lineHeight = w300.node.style.lineHeight = (expectedWidgetHeight/expectedLinesInWidget) + "px"; + w0.changed(); w150.changed(); w300.changed(); + var info2 = cm.getScrollInfo(); + eq(info0.height + (3 * expectedWidgetHeight), info2.height); + eq(info0.top + expectedWidgetHeight, info2.top); +}); + +testCM("lineWidgetIssue5486", function(cm) { + // [prepare] + // 2nd line is combined to 1st line due to markText + // 2nd line has a lineWidget below + + cm.setValue("Lorem\nIpsue\nDollar") + + var el = document.createElement('div') + el.style.height='50px' + el.textContent = '[[LINE WIDGET]]' + + var lineWidget = cm.addLineWidget(1, el, { + above: false, + coverGutter: false, + noHScroll: false, + showIfHidden: false, + }) + + var marker = document.createElement('span') + marker.textContent = '[--]' + + cm.markText({line:0, ch: 1}, {line:1, ch: 4}, { + replacedWith: marker + }) + + // before resizing the lineWidget, measure 3rd line position + + var measure_1 = Math.round(cm.charCoords({line:2, ch:0}).top) + + // resize lineWidget, height + 50 px + + el.style.height='100px' + el.textContent += "\nlineWidget size changed.\nTry moving cursor to line 3?" + + lineWidget.changed() + + // re-measure 3rd line position + var measure_2 = Math.round(cm.charCoords({line:2, ch:0}).top) + eq(measure_2, measure_1 + 50) + + // (extra test) + // + // add char to the right of the folded marker + // and re-measure 3rd line position + + cm.replaceRange('-', {line:1, ch: 5}) + var measure_3 = Math.round(cm.charCoords({line:2, ch:0}).top) + eq(measure_3, measure_2) +}); + +testCM("getLineNumber", function(cm) { + addDoc(cm, 2, 20); + var h1 = cm.getLineHandle(1); + eq(cm.getLineNumber(h1), 1); + cm.replaceRange("hi\nbye\n", Pos(0, 0)); + eq(cm.getLineNumber(h1), 3); + cm.setValue(""); + eq(cm.getLineNumber(h1), null); +}); + +testCM("jumpTheGap", function(cm) { + var longLine = "abcdef ghiklmnop qrstuvw xyz "; + longLine += longLine; longLine += longLine; longLine += longLine; + cm.replaceRange(longLine, Pos(2, 0), Pos(2)); + cm.setSize("200px", null); + cm.getWrapperElement().style.lineHeight = 2; + cm.refresh(); + cm.setCursor(Pos(0, 1)); + cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(2, 1)); + cm.execCommand("goLineDown"); + eq(cm.getCursor().line, 2); + is(cm.getCursor().ch > 1); + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(2, 1)); + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(1, 1)); + var node = document.createElement("div"); + node.innerHTML = "hi"; node.style.height = "30px"; + cm.addLineWidget(0, node); + cm.addLineWidget(1, node.cloneNode(true), {above: true}); + cm.setCursor(Pos(0, 2)); + cm.execCommand("goLineDown"); + eqCharPos(cm.getCursor(), Pos(1, 2)); + cm.execCommand("goLineUp"); + eqCharPos(cm.getCursor(), Pos(0, 2)); +}, {lineWrapping: true, value: "abc\ndef\nghi\njkl\n"}); + +testCM("addLineClass", function(cm) { + function cls(line, text, bg, wrap, gutter) { + var i = cm.lineInfo(line); + eq(i.textClass, text); + eq(i.bgClass, bg); + eq(i.wrapClass, wrap); + if (typeof i.handle.gutterClass !== 'undefined') { + eq(i.handle.gutterClass, gutter); + } + } + cm.addLineClass(0, "text", "foo"); + cm.addLineClass(0, "text", "bar"); + cm.addLineClass(1, "background", "baz"); + cm.addLineClass(1, "wrap", "foo"); + cm.addLineClass(1, "gutter", "gutter-class"); + cls(0, "foo bar", null, null, null); + cls(1, null, "baz", "foo", "gutter-class"); + var lines = cm.display.lineDiv; + eq(byClassName(lines, "foo").length, 2); + eq(byClassName(lines, "bar").length, 1); + eq(byClassName(lines, "baz").length, 1); + eq(byClassName(lines, "gutter-class").length, 2); // Gutter classes are reflected in 2 nodes + cm.removeLineClass(0, "text", "foo"); + cls(0, "bar", null, null, null); + cm.removeLineClass(0, "text", "foo"); + cls(0, "bar", null, null, null); + cm.removeLineClass(0, "text", "bar"); + cls(0, null, null, null); + + cm.addLineClass(1, "wrap", "quux"); + cls(1, null, "baz", "foo quux", "gutter-class"); + cm.removeLineClass(1, "wrap"); + cls(1, null, "baz", null, "gutter-class"); + cm.removeLineClass(1, "gutter", "gutter-class"); + eq(byClassName(lines, "gutter-class").length, 0); + cls(1, null, "baz", null, null); + + cm.addLineClass(1, "gutter", "gutter-class"); + cls(1, null, "baz", null, "gutter-class"); + cm.removeLineClass(1, "gutter", "gutter-class"); + cls(1, null, "baz", null, null); + +}, {value: "hohoho\n", lineNumbers: true}); + +testCM("atomicMarker", function(cm) { + addDoc(cm, 10, 10); + + function atom(ll, cl, lr, cr, li, ri, ls, rs) { + var options = { + atomic: true, + inclusiveLeft: li, + inclusiveRight: ri + }; + + if (ls === true || ls === false) options.selectLeft = ls; + if (rs === true || rs === false) options.selectRight = rs; + + return cm.markText(Pos(ll, cl), Pos(lr, cr), options); + } + + // Can cursor to the left and right of a normal marker by jumping across it + var m = atom(0, 1, 0, 5); + cm.setCursor(Pos(0, 1)); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 5)); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 1)); + m.clear(); + + // Can't cursor to the left of a marker when inclusiveLeft=true + m = atom(0, 0, 0, 5, true); + eqCursorPos(cm.getCursor(), Pos(0, 5), "pushed out"); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 5)); + m.clear(); + + // Can't cursor to the left of a marker when inclusiveLeft=false and selectLeft=false + m = atom(0, 0, 0, 5, false, false, false); + cm.setCursor(Pos(0, 5)); + eqCursorPos(cm.getCursor(), Pos(0, 5), "pushed out"); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 5)); + m.clear(); + + // Can cursor to the left of a marker when inclusiveLeft=false and selectLeft=True + m = atom(0, 0, 0, 5, false, false, true); + cm.setCursor(Pos(0, 5)); + eqCursorPos(cm.getCursor(), Pos(0, 5), "pushed out"); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + m.clear(); + + // Can't cursor to the right of a marker when inclusiveRight=true + m = atom(0, 0, 0, 5, false, true); + cm.setCursor(Pos(0, 0)); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 6)); + m.clear(); + + // Can't cursor to the right of a marker when inclusiveRight=false and selectRight=false + m = atom(0, 0, 0, 5, false, false, true, false); + cm.setCursor(Pos(0, 0)); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 6)); + m.clear(); + + // Can cursor to the right of a marker when inclusiveRight=false and selectRight=True + m = atom(0, 0, 0, 5, false, false, true, true); + cm.setCursor(Pos(0, 0)); + eqCursorPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(0, 5)); + m.clear(); + + // Can't cursor to the right of a multiline marker when inclusiveRight=true + m = atom(8, 4, 9, 10, false, true); + cm.setCursor(Pos(9, 8)); + eqCursorPos(cm.getCursor(), Pos(8, 4), "set"); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(8, 4), "char right"); + cm.execCommand("goLineDown"); + eqCursorPos(cm.getCursor(), Pos(8, 4), "line down"); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(8, 3, "after")); + m.clear(); + + // Cursor jumps across a multiline atomic marker, + // and backspace deletes the entire marker + m = atom(1, 1, 3, 8); + cm.setCursor(Pos(0, 0)); + cm.setCursor(Pos(2, 0)); + eqCursorPos(cm.getCursor(), Pos(3, 8)); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goCharRight"); + eqCursorPos(cm.getCursor(), Pos(3, 8)); + cm.execCommand("goLineUp"); + eqCursorPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goLineDown"); + eqCursorPos(cm.getCursor(), Pos(3, 8)); + cm.execCommand("delCharBefore"); + eq(cm.getValue().length, 80, "del chunk"); + m.clear(); + addDoc(cm, 10, 10); + + // Delete before an atomic marker deletes the entire marker + m = atom(3, 0, 5, 5); + cm.setCursor(Pos(3, 0)); + cm.execCommand("delWordAfter"); + eq(cm.getValue().length, 82, "del chunk"); + m.clear(); + addDoc(cm, 10, 10); +}); + +testCM("selectionBias", function(cm) { + cm.markText(Pos(0, 1), Pos(0, 3), {atomic: true}); + cm.setCursor(Pos(0, 2)); + eqCursorPos(cm.getCursor(), Pos(0, 1)); + cm.setCursor(Pos(0, 2)); + eqCursorPos(cm.getCursor(), Pos(0, 3)); + cm.setCursor(Pos(0, 2)); + eqCursorPos(cm.getCursor(), Pos(0, 1)); + cm.setCursor(Pos(0, 2), null, {bias: -1}); + eqCursorPos(cm.getCursor(), Pos(0, 1)); + cm.setCursor(Pos(0, 4)); + cm.setCursor(Pos(0, 2), null, {bias: 1}); + eqCursorPos(cm.getCursor(), Pos(0, 3)); +}, {value: "12345"}); + +testCM("selectionHomeEnd", function(cm) { + cm.markText(Pos(1, 0), Pos(1, 1), {atomic: true, inclusiveLeft: true}); + cm.markText(Pos(1, 3), Pos(1, 4), {atomic: true, inclusiveRight: true}); + cm.setCursor(Pos(1, 2)); + cm.execCommand("goLineStart"); + eqCursorPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goLineEnd"); + eqCursorPos(cm.getCursor(), Pos(1, 3)); +}, {value: "ab\ncdef\ngh"}); + +testCM("readOnlyMarker", function(cm) { + function mark(ll, cl, lr, cr, at) { + return cm.markText(Pos(ll, cl), Pos(lr, cr), + {readOnly: true, atomic: at}); + } + var m = mark(0, 1, 0, 4); + cm.setCursor(Pos(0, 2)); + cm.replaceSelection("hi", "end"); + eqCursorPos(cm.getCursor(), Pos(0, 2)); + eq(cm.getLine(0), "abcde"); + cm.execCommand("selectAll"); + cm.replaceSelection("oops", "around"); + eq(cm.getValue(), "oopsbcd"); + cm.undo(); + eqCursorPos(m.find().from, Pos(0, 1)); + eqCursorPos(m.find().to, Pos(0, 4)); + m.clear(); + cm.setCursor(Pos(0, 2)); + cm.replaceSelection("hi", "around"); + eq(cm.getLine(0), "abhicde"); + eqCursorPos(cm.getCursor(), Pos(0, 4)); + m = mark(0, 2, 2, 2, true); + cm.setSelection(Pos(1, 1), Pos(2, 4)); + cm.replaceSelection("t", "end"); + eqCursorPos(cm.getCursor(), Pos(2, 3)); + eq(cm.getLine(2), "klto"); + cm.execCommand("goCharLeft"); + cm.execCommand("goCharLeft"); + eqCursorPos(cm.getCursor(), Pos(0, 2)); + cm.setSelection(Pos(0, 1), Pos(0, 3)); + cm.replaceSelection("xx", "around"); + eqCursorPos(cm.getCursor(), Pos(0, 3)); + eq(cm.getLine(0), "axxhicde"); +}, {value: "abcde\nfghij\nklmno\n"}); + +testCM("dirtyBit", function(cm) { + eq(cm.isClean(), true); + cm.replaceSelection("boo", null, "test"); + eq(cm.isClean(), false); + cm.undo(); + eq(cm.isClean(), true); + cm.replaceSelection("boo", null, "test"); + cm.replaceSelection("baz", null, "test"); + cm.undo(); + eq(cm.isClean(), false); + cm.markClean(); + eq(cm.isClean(), true); + cm.undo(); + eq(cm.isClean(), false); + cm.redo(); + eq(cm.isClean(), true); +}); + +testCM("changeGeneration", function(cm) { + cm.replaceSelection("x"); + var softGen = cm.changeGeneration(); + cm.replaceSelection("x"); + cm.undo(); + eq(cm.getValue(), ""); + is(!cm.isClean(softGen)); + cm.replaceSelection("x"); + var hardGen = cm.changeGeneration(true); + cm.replaceSelection("x"); + cm.undo(); + eq(cm.getValue(), "x"); + is(cm.isClean(hardGen)); +}); + +testCM("addKeyMap", function(cm) { + function sendKey(code) { + cm.triggerOnKeyDown({type: "keydown", keyCode: code, + preventDefault: function(){}, stopPropagation: function(){}}); + } + + sendKey(39); + eqCursorPos(cm.getCursor(), Pos(0, 1, "before")); + var test = 0; + var map1 = {Right: function() { ++test; }}, map2 = {Right: function() { test += 10; }} + cm.addKeyMap(map1); + sendKey(39); + eqCursorPos(cm.getCursor(), Pos(0, 1, "before")); + eq(test, 1); + cm.addKeyMap(map2, true); + sendKey(39); + eq(test, 2); + cm.removeKeyMap(map1); + sendKey(39); + eq(test, 12); + cm.removeKeyMap(map2); + sendKey(39); + eq(test, 12); + eqCursorPos(cm.getCursor(), Pos(0, 2, "before")); + cm.addKeyMap({Right: function() { test = 55; }, name: "mymap"}); + sendKey(39); + eq(test, 55); + cm.removeKeyMap("mymap"); + sendKey(39); + eqCursorPos(cm.getCursor(), Pos(0, 3, "before")); +}, {value: "abc"}); + +function mouseDown(cm, button, pos, mods) { + var coords = cm.charCoords(pos, "window") + var event = {type: "mousedown", + preventDefault: Math.min, + which: button, + target: cm.display.lineDiv, + clientX: coords.left, clientY: coords.top} + if (mods) for (var prop in mods) event[prop] = mods[prop] + cm.triggerOnMouseDown(event) +} + +testCM("mouseBinding", function(cm) { + var fired = [] + cm.addKeyMap({ + "Shift-LeftClick": function(_cm, pos) { + eqCharPos(pos, Pos(1, 2)) + fired.push("a") + }, + "Shift-LeftDoubleClick": function() { fired.push("b") }, + "Shift-LeftTripleClick": function() { fired.push("c") } + }) + + function send(button, mods) { mouseDown(cm, button, Pos(1, 2), mods) } + send(1, {shiftKey: true}) + send(1, {shiftKey: true}) + send(1, {shiftKey: true}) + send(1, {}) + send(2, {ctrlKey: true}) + send(2, {ctrlKey: true}) + eq(fired.join(" "), "a b c") +}, {value: "foo\nbar\nbaz"}) + +testCM("configureMouse", function(cm) { + cm.setOption("configureMouse", function() { return {unit: "word"} }) + mouseDown(cm, 1, Pos(0, 5)) + eqCharPos(cm.getCursor("from"), Pos(0, 4)) + eqCharPos(cm.getCursor("to"), Pos(0, 7)) + cm.setOption("configureMouse", function() { return {extend: true} }) + mouseDown(cm, 1, Pos(0, 0)) + eqCharPos(cm.getCursor("from"), Pos(0, 0)) + eqCharPos(cm.getCursor("to"), Pos(0, 4)) +}, {value: "foo bar baz"}) + +testCM("findPosH", function(cm) { + forEach([{from: Pos(0, 0), to: Pos(0, 1, "before"), by: 1}, + {from: Pos(0, 0), to: Pos(0, 0), by: -1, hitSide: true}, + {from: Pos(0, 0), to: Pos(0, 4, "before"), by: 1, unit: "word"}, + {from: Pos(0, 0), to: Pos(0, 8, "before"), by: 2, unit: "word"}, + {from: Pos(0, 0), to: Pos(2, 0, "after"), by: 20, unit: "word", hitSide: true}, + {from: Pos(0, 7), to: Pos(0, 5, "after"), by: -1, unit: "word"}, + {from: Pos(0, 4), to: Pos(0, 8, "before"), by: 1, unit: "word"}, + {from: Pos(1, 0), to: Pos(1, 18, "before"), by: 3, unit: "word"}, + {from: Pos(1, 22), to: Pos(1, 5, "after"), by: -3, unit: "word"}, + {from: Pos(1, 15), to: Pos(1, 10, "after"), by: -5}, + {from: Pos(1, 15), to: Pos(1, 10, "after"), by: -5, unit: "column"}, + {from: Pos(1, 15), to: Pos(1, 0, "after"), by: -50, unit: "column", hitSide: true}, + {from: Pos(1, 15), to: Pos(1, 24, "before"), by: 50, unit: "column", hitSide: true}, + {from: Pos(1, 15), to: Pos(2, 0, "after"), by: 50, hitSide: true}], function(t) { + var r = cm.findPosH(t.from, t.by, t.unit || "char"); + eqCursorPos(r, t.to); + eq(!!r.hitSide, !!t.hitSide); + }); +}, {value: "line one\nline two.something.other\n"}); + +testCM("beforeChange", function(cm) { + cm.on("beforeChange", function(cm, change) { + var text = []; + for (var i = 0; i < change.text.length; ++i) + text.push(change.text[i].replace(/\s/g, "_")); + change.update(null, null, text); + }); + cm.setValue("hello, i am a\nnew document\n"); + eq(cm.getValue(), "hello,_i_am_a\nnew_document\n"); + CodeMirror.on(cm.getDoc(), "beforeChange", function(doc, change) { + if (change.from.line == 0) change.cancel(); + }); + cm.setValue("oops"); // Canceled + eq(cm.getValue(), "hello,_i_am_a\nnew_document\n"); + cm.replaceRange("hey hey hey", Pos(1, 0), Pos(2, 0)); + eq(cm.getValue(), "hello,_i_am_a\nhey_hey_hey"); +}, {value: "abcdefghijk"}); + +testCM("beforeChangeUndo", function(cm) { + cm.replaceRange("hi", Pos(0, 0), Pos(0)); + cm.replaceRange("bye", Pos(0, 0), Pos(0)); + eq(cm.historySize().undo, 2); + cm.on("beforeChange", function(cm, change) { + is(!change.update); + change.cancel(); + }); + cm.undo(); + eq(cm.historySize().undo, 0); + eq(cm.getValue(), "bye\ntwo"); +}, {value: "one\ntwo"}); + +testCM("beforeSelectionChange", function(cm) { + function notAtEnd(cm, pos) { + var len = cm.getLine(pos.line).length; + if (!len || pos.ch == len) return Pos(pos.line, pos.ch - 1); + return pos; + } + cm.on("beforeSelectionChange", function(cm, obj) { + obj.update([{anchor: notAtEnd(cm, obj.ranges[0].anchor), + head: notAtEnd(cm, obj.ranges[0].head)}]); + }); + + addDoc(cm, 10, 10); + cm.execCommand("goLineEnd"); + eqCursorPos(cm.getCursor(), Pos(0, 9)); + cm.execCommand("selectAll"); + eqCursorPos(cm.getCursor("start"), Pos(0, 0)); + eqCursorPos(cm.getCursor("end"), Pos(9, 9)); +}); + +testCM("change_removedText", function(cm) { + cm.setValue("abc\ndef"); + + var removedText = []; + cm.on("change", function(cm, change) { + removedText.push(change.removed); + }); + + cm.operation(function() { + cm.replaceRange("xyz", Pos(0, 0), Pos(1,1)); + cm.replaceRange("123", Pos(0,0)); + }); + + eq(removedText.length, 2); + eq(removedText[0].join("\n"), "abc\nd"); + eq(removedText[1].join("\n"), ""); + + var removedText = []; + cm.undo(); + eq(removedText.length, 2); + eq(removedText[0].join("\n"), "123"); + eq(removedText[1].join("\n"), "xyz"); + + var removedText = []; + cm.redo(); + eq(removedText.length, 2); + eq(removedText[0].join("\n"), "abc\nd"); + eq(removedText[1].join("\n"), ""); +}); + +testCM("lineStyleFromMode", function(cm) { + CodeMirror.defineMode("test_mode", function() { + return {token: function(stream) { + if (stream.match(/^\[[^\]]*\]/)) return " line-brackets "; + if (stream.match(/^\([^\)]*\)/)) return " line-background-parens "; + if (stream.match(/^<[^>]*>/)) return " span line-line line-background-bg "; + stream.match(/^\s+|^\S+/); + }}; + }); + cm.setOption("mode", "test_mode"); + var bracketElts = byClassName(cm.getWrapperElement(), "brackets"); + eq(bracketElts.length, 1, "brackets count"); + eq(bracketElts[0].nodeName, "PRE"); + is(!/brackets.*brackets/.test(bracketElts[0].className)); + var parenElts = byClassName(cm.getWrapperElement(), "parens"); + eq(parenElts.length, 1, "parens count"); + eq(parenElts[0].nodeName, "DIV"); + is(!/parens.*parens/.test(parenElts[0].className)); + eq(parenElts[0].parentElement.nodeName, "DIV"); + + is(byClassName(cm.getWrapperElement(), "bg").length > 0); + is(byClassName(cm.getWrapperElement(), "line").length > 0); + var spanElts = byClassName(cm.getWrapperElement(), "cm-span"); + eq(spanElts.length, 2); + is(/^\s*cm-span\s*$/.test(spanElts[0].className)); +}, {value: "line1: [br] [br]\nline2: (par) (par)\nline3: "}); + +testCM("lineStyleFromBlankLine", function(cm) { + CodeMirror.defineMode("lineStyleFromBlankLine_mode", function() { + return {token: function(stream) { stream.skipToEnd(); return "comment"; }, + blankLine: function() { return "line-blank"; }}; + }); + cm.setOption("mode", "lineStyleFromBlankLine_mode"); + var blankElts = byClassName(cm.getWrapperElement(), "blank"); + eq(blankElts.length, 1); + eq(blankElts[0].nodeName, "PRE"); + cm.replaceRange("x", Pos(1, 0)); + blankElts = byClassName(cm.getWrapperElement(), "blank"); + eq(blankElts.length, 0); +}, {value: "foo\n\nbar"}); + +CodeMirror.registerHelper("xxx", "a", "A"); +CodeMirror.registerHelper("xxx", "b", "B"); +CodeMirror.defineMode("yyy", function() { + return { + token: function(stream) { stream.skipToEnd(); }, + xxx: ["a", "b", "q"] + }; +}); +CodeMirror.registerGlobalHelper("xxx", "c", function(m) { return m.enableC; }, "C"); + +testCM("helpers", function(cm) { + cm.setOption("mode", "yyy"); + eq(cm.getHelpers(Pos(0, 0), "xxx").join("/"), "A/B"); + cm.setOption("mode", {name: "yyy", modeProps: {xxx: "b", enableC: true}}); + eq(cm.getHelpers(Pos(0, 0), "xxx").join("/"), "B/C"); + cm.setOption("mode", "javascript"); + eq(cm.getHelpers(Pos(0, 0), "xxx").join("/"), ""); +}); + +testCM("selectionHistory", function(cm) { + for (var i = 0; i < 3; i++) { + cm.setExtending(true); + cm.execCommand("goCharRight"); + cm.setExtending(false); + cm.execCommand("goCharRight"); + cm.execCommand("goCharRight"); + } + cm.execCommand("undoSelection"); + eq(cm.getSelection(), "c"); + cm.execCommand("undoSelection"); + eq(cm.getSelection(), ""); + eqCursorPos(cm.getCursor(), Pos(0, 4, "before")); + cm.execCommand("undoSelection"); + eq(cm.getSelection(), "b"); + cm.execCommand("redoSelection"); + eq(cm.getSelection(), ""); + eqCursorPos(cm.getCursor(), Pos(0, 4, "before")); + cm.execCommand("redoSelection"); + eq(cm.getSelection(), "c"); + cm.execCommand("redoSelection"); + eq(cm.getSelection(), ""); + eqCursorPos(cm.getCursor(), Pos(0, 6, "before")); +}, {value: "a b c d"}); + +testCM("selectionChangeReducesRedo", function(cm) { + cm.replaceSelection("X"); + cm.execCommand("goCharRight"); + cm.undoSelection(); + cm.execCommand("selectAll"); + cm.undoSelection(); + eq(cm.getValue(), "Xabc"); + eqCursorPos(cm.getCursor(), Pos(0, 1)); + cm.undoSelection(); + eq(cm.getValue(), "abc"); +}, {value: "abc"}); + +testCM("selectionHistoryNonOverlapping", function(cm) { + cm.setSelection(Pos(0, 0), Pos(0, 1)); + cm.setSelection(Pos(0, 2), Pos(0, 3)); + cm.execCommand("undoSelection"); + eqCursorPos(cm.getCursor("anchor"), Pos(0, 0)); + eqCursorPos(cm.getCursor("head"), Pos(0, 1)); +}, {value: "1234"}); + +testCM("cursorMotionSplitsHistory", function(cm) { + cm.replaceSelection("a"); + cm.execCommand("goCharRight"); + cm.replaceSelection("b"); + cm.replaceSelection("c"); + cm.undo(); + eq(cm.getValue(), "a1234"); + eqCursorPos(cm.getCursor(), Pos(0, 2, "before")); + cm.undo(); + eq(cm.getValue(), "1234"); + eqCursorPos(cm.getCursor(), Pos(0, 0)); +}, {value: "1234"}); + +testCM("selChangeInOperationDoesNotSplit", function(cm) { + for (var i = 0; i < 4; i++) { + cm.operation(function() { + cm.replaceSelection("x"); + cm.setCursor(Pos(0, cm.getCursor().ch - 1)); + }); + } + eqCursorPos(cm.getCursor(), Pos(0, 0)); + eq(cm.getValue(), "xxxxa"); + cm.undo(); + eq(cm.getValue(), "a"); +}, {value: "a"}); + +testCM("alwaysMergeSelEventWithChangeOrigin", function(cm) { + cm.replaceSelection("U", null, "foo"); + cm.setSelection(Pos(0, 0), Pos(0, 1), {origin: "foo"}); + cm.undoSelection(); + eq(cm.getValue(), "a"); + cm.replaceSelection("V", null, "foo"); + cm.setSelection(Pos(0, 0), Pos(0, 1), {origin: "bar"}); + cm.undoSelection(); + eq(cm.getValue(), "Va"); +}, {value: "a"}); + +testCM("getTokenAt", function(cm) { + var tokPlus = cm.getTokenAt(Pos(0, 2)); + eq(tokPlus.type, "operator"); + eq(tokPlus.string, "+"); + var toks = cm.getLineTokens(0); + eq(toks.length, 3); + forEach([["number", "1"], ["operator", "+"], ["number", "2"]], function(expect, i) { + eq(toks[i].type, expect[0]); + eq(toks[i].string, expect[1]); + }); +}, {value: "1+2", mode: "javascript"}); + +testCM("getTokenTypeAt", function(cm) { + eq(cm.getTokenTypeAt(Pos(0, 0)), "number"); + eq(cm.getTokenTypeAt(Pos(0, 6)), "string"); + cm.addOverlay({ + token: function(stream) { + if (stream.match("foo")) return "foo"; + else stream.next(); + } + }); + eq(byClassName(cm.getWrapperElement(), "cm-foo").length, 1); + eq(cm.getTokenTypeAt(Pos(0, 6)), "string"); +}, {value: "1 + 'foo'", mode: "javascript"}); + +testCM("addOverlay", function(cm) { + cm.addOverlay({ + token: function(stream) { + var base = stream.baseToken() + if (!/comment/.test(base.type) && stream.match(/\d+/)) return "x" + stream.next() + } + }) + var x = byClassName(cm.getWrapperElement(), "cm-x") + is(x.length, 1) + is(x[0].textContent, "233") + cm.replaceRange("", Pos(0, 4), Pos(0, 6)) + is(byClassName(cm.getWrapperElement(), "cm-x").length, 2) +}, {value: "foo /* 100 */\nbar + 233;\nbaz", mode: "javascript"}) + +testCM("resizeLineWidget", function(cm) { + addDoc(cm, 200, 3); + var widget = document.createElement("pre"); + widget.innerHTML = "imwidget"; + widget.style.background = "yellow"; + cm.addLineWidget(1, widget, {noHScroll: true}); + cm.setSize(40); + is(widget.parentNode.offsetWidth < 42); +}); + +testCM("combinedOperations", function(cm) { + var place = document.getElementById("testground"); + var other = CodeMirror(place, {value: "123"}); + try { + cm.operation(function() { + cm.addLineClass(0, "wrap", "foo"); + other.addLineClass(0, "wrap", "foo"); + }); + eq(byClassName(cm.getWrapperElement(), "foo").length, 1); + eq(byClassName(other.getWrapperElement(), "foo").length, 1); + cm.operation(function() { + cm.removeLineClass(0, "wrap", "foo"); + other.removeLineClass(0, "wrap", "foo"); + }); + eq(byClassName(cm.getWrapperElement(), "foo").length, 0); + eq(byClassName(other.getWrapperElement(), "foo").length, 0); + } finally { + place.removeChild(other.getWrapperElement()); + } +}, {value: "abc"}); + +testCM("eventOrder", function(cm) { + var seen = []; + cm.on("change", function() { + if (!seen.length) cm.replaceSelection("."); + seen.push("change"); + }); + cm.on("cursorActivity", function() { + cm.replaceSelection("!"); + seen.push("activity"); + }); + cm.replaceSelection("/"); + eq(seen.join(","), "change,change,activity,change"); +}); + +testCM("splitSpaces_nonspecial", function(cm) { + eq(byClassName(cm.getWrapperElement(), "cm-invalidchar").length, 0); +}, { + specialChars: /[\u00a0]/, + value: "spaces -> <- between" +}); + +test("core_rmClass", function() { + var node = document.createElement("div"); + node.className = "foo-bar baz-quux yadda"; + CodeMirror.rmClass(node, "quux"); + eq(node.className, "foo-bar baz-quux yadda"); + CodeMirror.rmClass(node, "baz-quux"); + eq(node.className, "foo-bar yadda"); + CodeMirror.rmClass(node, "yadda"); + eq(node.className, "foo-bar"); + CodeMirror.rmClass(node, "foo-bar"); + eq(node.className, ""); + node.className = " foo "; + CodeMirror.rmClass(node, "foo"); + eq(node.className, ""); +}); + +test("core_addClass", function() { + var node = document.createElement("div"); + CodeMirror.addClass(node, "a"); + eq(node.className, "a"); + CodeMirror.addClass(node, "a"); + eq(node.className, "a"); + CodeMirror.addClass(node, "b"); + eq(node.className, "a b"); + CodeMirror.addClass(node, "a"); + CodeMirror.addClass(node, "b"); + eq(node.className, "a b"); +}); + +testCM("lineSeparator", function(cm) { + eq(cm.lineCount(), 3); + eq(cm.getLine(1), "bar\r"); + eq(cm.getLine(2), "baz\rquux"); + cm.setOption("lineSeparator", "\r"); + eq(cm.lineCount(), 5); + eq(cm.getLine(4), "quux"); + eq(cm.getValue(), "foo\rbar\r\rbaz\rquux"); + eq(cm.getValue("\n"), "foo\nbar\n\nbaz\nquux"); + cm.setOption("lineSeparator", null); + cm.setValue("foo\nbar\r\nbaz\rquux"); + eq(cm.lineCount(), 4); +}, {value: "foo\nbar\r\nbaz\rquux", + lineSeparator: "\n"}); + +var extendingChars = /[\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]/ +var getChar = function (noExtending) { var res; do {res = String.fromCharCode(Math.floor(Math.random()*0x8ac)); } while ([0x90].indexOf(res.charCodeAt(0)) != -1 || (noExtending && extendingChars.test(res))); return res } +var getString = function (n) { var res = getChar(true); while (--n > 0) res += getChar(); return res } + +function makeItWrapAfter(cm, pos) { + var firstLineTop = cm.cursorCoords(Pos(0, 0)).top; + for(var w = 0, posTop; posTop != firstLineTop; ++w) { + cm.setSize(w); + posTop = cm.charCoords(pos).top; + } +} + +function countIf(arr, f) { + var result = 0 + for (var i = 0; i < arr.length; i++) if (f[arr[i]]) result++ + return result +} + +function testMoveBidi(str) { + testCM("move_bidi_" + str, function(cm) { + if (cm.getOption("inputStyle") != "textarea" || !cm.getOption("rtlMoveVisually")) return; + cm.getScrollerElement().style.fontFamily = "monospace"; + makeItWrapAfter(cm, Pos(0, 5)); + + var steps = str.length - countIf(str.split(""), function(ch) { return extendingChars.test(ch) }); + var lineBreaks = {} + lineBreaks[6 - countIf(str.substr(0, 5).split(""), function(ch) { return extendingChars.test(ch) })] = 'w'; + if (str.indexOf("\n") != -1) { + lineBreaks[steps - 2] = 'n'; + } + + // Make sure we are at the visual beginning of the first line + cm.execCommand("goLineStart"); + + var prevCoords = cm.cursorCoords(), coords; + for(var i = 0; i < steps; ++i) { + cm.execCommand("goCharRight"); + coords = cm.cursorCoords(); + if ((i >= 10 && i <= 12) && !lineBreaks[i] && coords.left < prevCoords.left && coords.top > prevCoords.top) { + // The first line wraps twice + lineBreaks[i] = 'w'; + } + if (!lineBreaks[i]) { + is(coords.left > prevCoords.left, "In step " + i + ", cursor didn't move right"); + eq(coords.top, prevCoords.top, "In step " + i + ", cursor moved out of line"); + } else { + is(coords.left < prevCoords.left, i); + is(coords.top > prevCoords.top, i); + } + prevCoords = coords; + } + + cm.execCommand("goCharRight"); + coords = cm.cursorCoords(); + eq(coords.left, prevCoords.left, "Moving " + steps + " steps right didn't reach the end"); + eq(coords.top, prevCoords.top, "Moving " + steps + " steps right didn't reach the end"); + + for(i = steps - 1; i >= 0; --i) { + cm.execCommand("goCharLeft"); + coords = cm.cursorCoords(); + if (!(lineBreaks[i] == 'n' || lineBreaks[i + 1] == 'w')) { + is(coords.left < prevCoords.left, "In step " + i + ", cursor didn't move left"); + eq(coords.top, prevCoords.top, "In step " + i + ", cursor is not at the same line anymore"); + } else { + is(coords.left > prevCoords.left, i); + is(coords.top < prevCoords.top, i); + } + prevCoords = coords; + } + + cm.execCommand("goCharLeft"); + coords = cm.cursorCoords(); + eq(coords.left, prevCoords.left, "Moving " + steps + " steps left didn't reach the beginning"); + eq(coords.top, prevCoords.top, "Moving " + steps + " steps left didn't reach the beginning"); + }, {value: str, lineWrapping: true}) +}; + +function testMoveEndBidi(str) { + testCM("move_end_bidi_" + str, function(cm) { + cm.getScrollerElement().style.fontFamily = "monospace"; + makeItWrapAfter(cm, Pos(0, 5)); + + cm.execCommand("goLineStart"); + var pos = cm.doc.getCursor(); + cm.execCommand("goCharLeft"); + eqCursorPos(pos, cm.doc.getCursor()); + + cm.execCommand("goLineEnd"); + pos = cm.doc.getCursor(); + cm.execCommand("goColumnRight"); + eqCursorPos(pos, cm.doc.getCursor()); + }, {value: str, lineWrapping: true}) +}; + +var bidiTests = []; + +// We don't correctly implement L1 UBA +// See https://bugzilla.mozilla.org/show_bug.cgi?id=1331501 +// and https://bugs.chromium.org/p/chromium/issues/detail?id=673405 +/* +bidiTests.push("Say ا ب جabj\nS"); +bidiTests.push("Sayyy ا ا ب ج"); +*/ + +bidiTests.push("Όȝǝڪȉۥ״ۺ׆ɀҩۏ\nҳ"); +if (!window.automatedTests) bidiTests.push("ŌӰтقȤ؁ƥ؅٣ĎȺ١\nϚ"); +bidiTests.push("ٻоҤѕѽΩ־؉ïίքdz\nٵ"); +bidiTests.push("؅؁ĆՕƿɁǞϮؠȩóć\nď"); +bidiTests.push("RŨďңŪzϢŎƏԖڇڦ\nӈ"); +bidiTests.push("ό׊۷٢ԜһОצЉيčǟ\nѩ"); +bidiTests.push("ۑÚҳҕڬġڹհяųKV\nr"); +bidiTests.push("źڻғúہ4ם1Ƞc1a\nԁ"); +bidiTests.push("ҒȨҟփƞ٦ԓȦڰғâƥ\nڤ"); +bidiTests.push("ϖسՉȏŧΔԛdžĎӟیڡ\nέ"); +bidiTests.push("۹ؼL۵ĺȧКԙػא7״\nم"); +bidiTests.push("ن (ي)\u2009أقواس"); // thin space to throw off Firefox 51's broken white-space compressing behavior + +bidiTests.push("քմѧǮßپüŢҍҞўڳ\nӧ"); + +//bidiTests.push("Count ١ ٢ ٣ ٤"); +//bidiTests.push("ӣאƦϰ؊ȓېÛوը٬ز\nϪ"); +//bidiTests.push("ҾճٳџIՖӻ٥׭֐؜ڏ\nێ"); +//bidiTests.push("ҬÓФ؜ڂį٦Ͽɓڐͳٵ\nՈ"); +//bidiTests.push("aѴNijȻهˇ҃ڱӧǻֵ\na"); +//bidiTests.push(" a٧ا٢ ب جa\nS"); + +for (var i = 0; i < bidiTests.length; ++i) { + testMoveBidi(bidiTests[i]); + testMoveEndBidi(bidiTests[i]); +} + +/* +for (var i = 0; i < 5; ++i) { + testMoveBidi(getString(12) + "\n" + getString(1)); +} +*/ + +function testCoordsWrappedBidi(str) { + testCM("coords_wrapped_bidi_" + str, function(cm) { + cm.getScrollerElement().style.fontFamily = "monospace"; + makeItWrapAfter(cm, Pos(0, 5)); + + // Make sure we are at the visual beginning of the first line + var pos = Pos(0, 0), lastPos; + cm.doc.setCursor(pos); + do { + lastPos = pos; + cm.execCommand("goCharLeft"); + pos = cm.doc.getCursor(); + } while (pos != lastPos) + + var top = cm.charCoords(Pos(0, 0)).top, lastTop; + for (var i = 1; i < str.length; ++i) { + lastTop = top; + top = cm.charCoords(Pos(0, i)).top; + is(top >= lastTop); + } + }, {value: str, lineWrapping: true}) +}; + +testCoordsWrappedBidi("Count ١ ٢ ٣ ٤"); +/* +for (var i = 0; i < 5; ++i) { + testCoordsWrappedBidi(getString(50)); +} +*/ + +testCM("rtl_wrapped_selection", function(cm) { + cm.setSelection(Pos(0, 10), Pos(0, 190)) + is(byClassName(cm.getWrapperElement(), "CodeMirror-selected").length >= 3) +}, {value: new Array(10).join(" فتي تم تضمينها فتي تم"), lineWrapping: true}) + +testCM("bidi_wrapped_selection", function(cm) { + cm.setSize(cm.charCoords(Pos(0, 10), "editor").left) + cm.setSelection(Pos(0, 37), Pos(0, 80)) + var blocks = byClassName(cm.getWrapperElement(), "CodeMirror-selected") + is(blocks.length >= 2) + is(blocks.length <= 3) + var boxTop = blocks[0].getBoundingClientRect(), boxBot = blocks[blocks.length - 1].getBoundingClientRect() + is(boxTop.left > cm.charCoords(Pos(0, 1)).right) + is(boxBot.right < cm.charCoords(Pos(0, cm.getLine(0).length - 2)).left) +}, {value: "

    مفتي11 تم تضمينهفتي تم تضمينها فتي تفتي تم تضمينها فتي تفتي تم تضمينها فتي تفتي تم تضمينها فتي تا فت10ي ت

    ", lineWrapping: true}) + +testCM("delete_wrapped", function(cm) { + makeItWrapAfter(cm, Pos(0, 2)); + cm.doc.setCursor(Pos(0, 3, "after")); + cm.deleteH(-1, "char"); + eq(cm.getLine(0), "1245"); +}, {value: "12345", lineWrapping: true}) + +testCM("issue_4878", function(cm) { + if (window.automatedTests) return + cm.setCursor(Pos(1, 12, "after")); + cm.moveH(-1, "char"); + eqCursorPos(cm.getCursor(), Pos(0, 113, "before")); +}, {value: " في تطبيق السمات مرة واحدة https://github.com/codemirror/CodeMirror/issues/4878#issuecomment-330550964على سبيل المثال \"foo bar\"\n" + +" سيتم تعيين", direction: "rtl", lineWrapping: true}); + +CodeMirror.defineMode("lookahead_mode", function() { + // Colors text as atom if the line two lines down has an x in it + return { + token: function(stream) { + stream.skipToEnd() + return /x/.test(stream.lookAhead(2)) ? "atom" : null + } + } +}) + +testCM("mode_lookahead", function(cm) { + eq(cm.getTokenAt(Pos(0, 1)).type, "atom") + eq(cm.getTokenAt(Pos(1, 1)).type, "atom") + eq(cm.getTokenAt(Pos(2, 1)).type, null) + cm.replaceRange("\n", Pos(2, 0)) + eq(cm.getTokenAt(Pos(0, 1)).type, null) + eq(cm.getTokenAt(Pos(1, 1)).type, "atom") +}, {value: "foo\na\nx\nx\n", mode: "lookahead_mode"}) + +testCM("should have translate=no attribute", function(cm) { + eq(cm.getWrapperElement().getAttribute("translate"), "no") +}, {}) diff --git a/js/codemirror/theme/3024-day.css b/js/codemirror/theme/3024-day.css new file mode 100644 index 0000000..7132655 --- /dev/null +++ b/js/codemirror/theme/3024-day.css @@ -0,0 +1,41 @@ +/* + + Name: 3024 day + Author: Jan T. Sott (http://github.com/idleberg) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-3024-day.CodeMirror { background: #f7f7f7; color: #3a3432; } +.cm-s-3024-day div.CodeMirror-selected { background: #d6d5d4; } + +.cm-s-3024-day .CodeMirror-line::selection, .cm-s-3024-day .CodeMirror-line > span::selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d6d5d4; } +.cm-s-3024-day .CodeMirror-line::-moz-selection, .cm-s-3024-day .CodeMirror-line > span::-moz-selection, .cm-s-3024-day .CodeMirror-line > span > span::selection { background: #d9d9d9; } + +.cm-s-3024-day .CodeMirror-gutters { background: #f7f7f7; border-right: 0px; } +.cm-s-3024-day .CodeMirror-guttermarker { color: #db2d20; } +.cm-s-3024-day .CodeMirror-guttermarker-subtle { color: #807d7c; } +.cm-s-3024-day .CodeMirror-linenumber { color: #807d7c; } + +.cm-s-3024-day .CodeMirror-cursor { border-left: 1px solid #5c5855; } + +.cm-s-3024-day span.cm-comment { color: #cdab53; } +.cm-s-3024-day span.cm-atom { color: #a16a94; } +.cm-s-3024-day span.cm-number { color: #a16a94; } + +.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute { color: #01a252; } +.cm-s-3024-day span.cm-keyword { color: #db2d20; } +.cm-s-3024-day span.cm-string { color: #fded02; } + +.cm-s-3024-day span.cm-variable { color: #01a252; } +.cm-s-3024-day span.cm-variable-2 { color: #01a0e4; } +.cm-s-3024-day span.cm-def { color: #e8bbd0; } +.cm-s-3024-day span.cm-bracket { color: #3a3432; } +.cm-s-3024-day span.cm-tag { color: #db2d20; } +.cm-s-3024-day span.cm-link { color: #a16a94; } +.cm-s-3024-day span.cm-error { background: #db2d20; color: #5c5855; } + +.cm-s-3024-day .CodeMirror-activeline-background { background: #e8f2ff; } +.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: #a16a94 !important; } diff --git a/js/codemirror/theme/3024-night.css b/js/codemirror/theme/3024-night.css new file mode 100644 index 0000000..adc5900 --- /dev/null +++ b/js/codemirror/theme/3024-night.css @@ -0,0 +1,39 @@ +/* + + Name: 3024 night + Author: Jan T. Sott (http://github.com/idleberg) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-3024-night.CodeMirror { background: #090300; color: #d6d5d4; } +.cm-s-3024-night div.CodeMirror-selected { background: #3a3432; } +.cm-s-3024-night .CodeMirror-line::selection, .cm-s-3024-night .CodeMirror-line > span::selection, .cm-s-3024-night .CodeMirror-line > span > span::selection { background: rgba(58, 52, 50, .99); } +.cm-s-3024-night .CodeMirror-line::-moz-selection, .cm-s-3024-night .CodeMirror-line > span::-moz-selection, .cm-s-3024-night .CodeMirror-line > span > span::-moz-selection { background: rgba(58, 52, 50, .99); } +.cm-s-3024-night .CodeMirror-gutters { background: #090300; border-right: 0px; } +.cm-s-3024-night .CodeMirror-guttermarker { color: #db2d20; } +.cm-s-3024-night .CodeMirror-guttermarker-subtle { color: #5c5855; } +.cm-s-3024-night .CodeMirror-linenumber { color: #5c5855; } + +.cm-s-3024-night .CodeMirror-cursor { border-left: 1px solid #807d7c; } + +.cm-s-3024-night span.cm-comment { color: #cdab53; } +.cm-s-3024-night span.cm-atom { color: #a16a94; } +.cm-s-3024-night span.cm-number { color: #a16a94; } + +.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute { color: #01a252; } +.cm-s-3024-night span.cm-keyword { color: #db2d20; } +.cm-s-3024-night span.cm-string { color: #fded02; } + +.cm-s-3024-night span.cm-variable { color: #01a252; } +.cm-s-3024-night span.cm-variable-2 { color: #01a0e4; } +.cm-s-3024-night span.cm-def { color: #e8bbd0; } +.cm-s-3024-night span.cm-bracket { color: #d6d5d4; } +.cm-s-3024-night span.cm-tag { color: #db2d20; } +.cm-s-3024-night span.cm-link { color: #a16a94; } +.cm-s-3024-night span.cm-error { background: #db2d20; color: #807d7c; } + +.cm-s-3024-night .CodeMirror-activeline-background { background: #2F2F2F; } +.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/abbott.css b/js/codemirror/theme/abbott.css new file mode 100644 index 0000000..3e516a6 --- /dev/null +++ b/js/codemirror/theme/abbott.css @@ -0,0 +1,268 @@ +/* + * abbott.css + * A warm, dark theme for prose and code, with pastels and pretty greens. + * + * Ported from abbott.vim (https://github.com/bcat/abbott.vim) version 2.1. + * Original design and CodeMirror port by Jonathan Rascher. + * + * This theme shares the following color palette with the Vim color scheme. + * + * Brown shades: + * bistre: #231c14 + * chocolate: #3c3022 + * cocoa: #745d42 + * vanilla_cream: #fef3b4 + * + * Red shades: + * crimson: #d80450 + * cinnabar: #f63f05 + * + * Green shades: + * dark_olive: #273900 + * forest_green: #24a507 + * chartreuse: #a0ea00 + * pastel_chartreuse: #d8ff84 + * + * Yellow shades: + * marigold: #fbb32f + * lemon_meringue: #fbec5d + * + * Blue shades: + * cornflower_blue: #3f91f1 + * periwinkle_blue: #8ccdf0 + * + * Magenta shades: + * french_pink: #ec6c99 + * lavender: #e6a2f3 + * + * Cyan shades: + * zomp: #39a78d + * seafoam_green: #00ff7f + */ + +/* Style the UI: */ + +/* Equivalent to Vim's Normal group. */ +.cm-s-abbott.CodeMirror { + background: #231c14 /* bistre */; + color: #d8ff84 /* pastel_chartreuse */; +} + +/* Roughly equivalent to Vim's LineNr group. */ +.cm-s-abbott .CodeMirror-gutters { + background: #231c14 /* bistre */; + border: none; +} +.cm-s-abbott .CodeMirror-linenumber { color: #fbec5d /* lemon_meringue */; } + +.cm-s-abbott .CodeMirror-guttermarker { color: #f63f05 /* cinnabar */; } + +/* Roughly equivalent to Vim's FoldColumn group. */ +.cm-s-abbott .CodeMirror-guttermarker-subtle { color: #fbb32f /* marigold */; } + +/* + * Roughly equivalent to Vim's CursorColumn group. (We use a brighter color + * since Vim's cursorcolumn option highlights a whole column, whereas + * CodeMirror's rule just highlights a thin line.) + */ +.cm-s-abbott .CodeMirror-ruler { border-color: #745d42 /* cocoa */; } + +/* Equivalent to Vim's Cursor group in insert mode. */ +.cm-s-abbott .CodeMirror-cursor { border-color: #a0ea00 /* chartreuse */; } + +/* Equivalent to Vim's Cursor group in normal mode. */ +.cm-s-abbott.cm-fat-cursor .CodeMirror-cursor, +.cm-s-abbott .cm-animate-fat-cursor { + /* + * CodeMirror doesn't allow changing the foreground color of the character + * under the cursor, so we can't use a reverse video effect for the cursor. + * Instead, make it semitransparent. + */ + background: rgba(160, 234, 0, 0.5) /* chartreuse */; +} +.cm-s-abbott.cm-fat-cursor .CodeMirror-cursors { + /* + * Boost the z-index so the fat cursor shows up on top of text and + * matchingbracket/matchingtag highlights. + */ + z-index: 3; +} + +/* Equivalent to Vim's Cursor group in replace mode. */ +.cm-s-abbott .CodeMirror-overwrite .CodeMirror-cursor { + border-bottom: 1px solid #a0ea00 /* chartreuse */; + border-left: none; + width: auto; +} + +/* Roughly equivalent to Vim's CursorIM group. */ +.cm-s-abbott .CodeMirror-secondarycursor { + border-color: #00ff7f /* seafoam_green */; +} + +/* Roughly equivalent to Vim's Visual group. */ +.cm-s-abbott .CodeMirror-selected, +.cm-s-abbott.CodeMirror-focused .CodeMirror-selected { + background: #273900 /* dark_olive */; +} +.cm-s-abbott .CodeMirror-line::selection, +.cm-s-abbott .CodeMirror-line > span::selection, +.cm-s-abbott .CodeMirror-line > span > span::selection { + background: #273900 /* dark_olive */; +} +.cm-s-abbott .CodeMirror-line::-moz-selection, +.cm-s-abbott .CodeMirror-line > span::-moz-selection, +.cm-s-abbott .CodeMirror-line > span > span::-moz-selection { + background: #273900 /* dark_olive */; +} + +/* Roughly equivalent to Vim's SpecialKey group. */ +.cm-s-abbott .cm-tab { color: #00ff7f /* seafoam_green */; } + +/* Equivalent to Vim's Search group. */ +.cm-s-abbott .cm-searching { + background: #fef3b4 /* vanilla_cream */ !important; + color: #231c14 /* bistre */ !important; +} + +/* Style syntax highlighting modes: */ + +/* Equivalent to Vim's Comment group. */ +.cm-s-abbott span.cm-comment { + color: #fbb32f /* marigold */; + font-style: italic; +} + +/* Equivalent to Vim's String group. */ +.cm-s-abbott span.cm-string, +.cm-s-abbott span.cm-string-2 { + color: #e6a2f3 /* lavender */; +} + +/* Equivalent to Vim's Constant group. */ +.cm-s-abbott span.cm-number, +.cm-s-abbott span.cm-string.cm-url { color: #f63f05 /* cinnabar */; } + +/* Roughly equivalent to Vim's SpecialKey group. */ +.cm-s-abbott span.cm-invalidchar { color: #00ff7f /* seafoam_green */; } + +/* Equivalent to Vim's Special group. */ +.cm-s-abbott span.cm-atom { color: #fef3b4 /* vanilla_cream */; } + +/* Equivalent to Vim's Delimiter group. */ +.cm-s-abbott span.cm-bracket, +.cm-s-abbott span.cm-punctuation { + color: #fef3b4 /* vanilla_cream */; +} + +/* Equivalent Vim's Operator group. */ +.cm-s-abbott span.cm-operator { font-weight: bold; } + +/* Roughly equivalent to Vim's Identifier group. */ +.cm-s-abbott span.cm-def, +.cm-s-abbott span.cm-variable, +.cm-s-abbott span.cm-variable-2, +.cm-s-abbott span.cm-variable-3 { + color: #8ccdf0 /* periwinkle_blue */; +} + +/* Roughly equivalent to Vim's Function group. */ +.cm-s-abbott span.cm-builtin, +.cm-s-abbott span.cm-property, +.cm-s-abbott span.cm-qualifier { + color: #3f91f1 /* cornflower_blue */; +} + +/* Equivalent to Vim's Type group. */ +.cm-s-abbott span.cm-type { color: #24a507 /* forest_green */; } + +/* Equivalent to Vim's Keyword group. */ +.cm-s-abbott span.cm-keyword { + color: #d80450 /* crimson */; + font-weight: bold; +} + +/* Equivalent to Vim's PreProc group. */ +.cm-s-abbott span.cm-meta { color: #ec6c99 /* french_pink */; } + +/* Equivalent to Vim's htmlTagName group (linked to Statement). */ +.cm-s-abbott span.cm-tag { + color: #d80450 /* crimson */; + font-weight: bold; +} + +/* Equivalent to Vim's htmlArg group (linked to Type). */ +.cm-s-abbott span.cm-attribute { color: #24a507 /* forest_green */; } + +/* Equivalent to Vim's htmlH1, markdownH1, etc. groups (linked to Title). */ +.cm-s-abbott span.cm-header { + color: #d80450 /* crimson */; + font-weight: bold; +} + +/* Equivalent to Vim's markdownRule group (linked to PreProc). */ +.cm-s-abbott span.cm-hr { color: #ec6c99 /* french_pink */; } + +/* Roughly equivalent to Vim's Underlined group. */ +.cm-s-abbott span.cm-link { color: #e6a2f3 /* lavender */; } + +/* Equivalent to Vim's diffRemoved group. */ +.cm-s-abbott span.cm-negative { + background: #d80450 /* crimson */; + color: #231c14 /* bistre */; +} + +/* Equivalent to Vim's diffAdded group. */ +.cm-s-abbott span.cm-positive { + background: #a0ea00 /* chartreuse */; + color: #231c14 /* bistre */; + font-weight: bold; +} + +/* Equivalent to Vim's Error group. */ +.cm-s-abbott span.cm-error { + background: #d80450 /* crimson */; + color: #231c14 /* bistre */; +} + +/* Style addons: */ + +/* Equivalent to Vim's MatchParen group. */ +.cm-s-abbott span.CodeMirror-matchingbracket { + background: #745d42 /* cocoa */ !important; + color: #231c14 /* bistre */ !important; + font-weight: bold; +} + +/* + * Roughly equivalent to Vim's Error group. (Vim doesn't seem to have a direct + * equivalent in its own matchparen plugin, but many syntax highlighting plugins + * mark mismatched brackets as Error.) + */ +.cm-s-abbott span.CodeMirror-nonmatchingbracket { + background: #d80450 /* crimson */ !important; + color: #231c14 /* bistre */ !important; +} + +.cm-s-abbott .CodeMirror-matchingtag, +.cm-s-abbott .cm-matchhighlight { + outline: 1px solid #39a78d /* zomp */; +} + +/* Equivalent to Vim's CursorLine group. */ +.cm-s-abbott .CodeMirror-activeline-background, +.cm-s-abbott .CodeMirror-activeline-gutter { + background: #3c3022 /* chocolate */; +} + +/* Equivalent to Vim's CursorLineNr group. */ +.cm-s-abbott .CodeMirror-activeline-gutter .CodeMirror-linenumber { + color: #d8ff84 /* pastel_chartreuse */; + font-weight: bold; +} + +/* Roughly equivalent to Vim's Folded group. */ +.cm-s-abbott .CodeMirror-foldmarker { + color: #f63f05 /* cinnabar */; + text-shadow: none; +} diff --git a/js/codemirror/theme/abcdef.css b/js/codemirror/theme/abcdef.css new file mode 100644 index 0000000..cf93530 --- /dev/null +++ b/js/codemirror/theme/abcdef.css @@ -0,0 +1,32 @@ +.cm-s-abcdef.CodeMirror { background: #0f0f0f; color: #defdef; } +.cm-s-abcdef div.CodeMirror-selected { background: #515151; } +.cm-s-abcdef .CodeMirror-line::selection, .cm-s-abcdef .CodeMirror-line > span::selection, .cm-s-abcdef .CodeMirror-line > span > span::selection { background: rgba(56, 56, 56, 0.99); } +.cm-s-abcdef .CodeMirror-line::-moz-selection, .cm-s-abcdef .CodeMirror-line > span::-moz-selection, .cm-s-abcdef .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 56, 56, 0.99); } +.cm-s-abcdef .CodeMirror-gutters { background: #555; border-right: 2px solid #314151; } +.cm-s-abcdef .CodeMirror-guttermarker { color: #222; } +.cm-s-abcdef .CodeMirror-guttermarker-subtle { color: azure; } +.cm-s-abcdef .CodeMirror-linenumber { color: #FFFFFF; } +.cm-s-abcdef .CodeMirror-cursor { border-left: 1px solid #00FF00; } + +.cm-s-abcdef span.cm-keyword { color: darkgoldenrod; font-weight: bold; } +.cm-s-abcdef span.cm-atom { color: #77F; } +.cm-s-abcdef span.cm-number { color: violet; } +.cm-s-abcdef span.cm-def { color: #fffabc; } +.cm-s-abcdef span.cm-variable { color: #abcdef; } +.cm-s-abcdef span.cm-variable-2 { color: #cacbcc; } +.cm-s-abcdef span.cm-variable-3, .cm-s-abcdef span.cm-type { color: #def; } +.cm-s-abcdef span.cm-property { color: #fedcba; } +.cm-s-abcdef span.cm-operator { color: #ff0; } +.cm-s-abcdef span.cm-comment { color: #7a7b7c; font-style: italic;} +.cm-s-abcdef span.cm-string { color: #2b4; } +.cm-s-abcdef span.cm-meta { color: #C9F; } +.cm-s-abcdef span.cm-qualifier { color: #FFF700; } +.cm-s-abcdef span.cm-builtin { color: #30aabc; } +.cm-s-abcdef span.cm-bracket { color: #8a8a8a; } +.cm-s-abcdef span.cm-tag { color: #FFDD44; } +.cm-s-abcdef span.cm-attribute { color: #DDFF00; } +.cm-s-abcdef span.cm-error { color: #FF0000; } +.cm-s-abcdef span.cm-header { color: aquamarine; font-weight: bold; } +.cm-s-abcdef span.cm-link { color: blueviolet; } + +.cm-s-abcdef .CodeMirror-activeline-background { background: #314151; } diff --git a/js/codemirror/theme/ambiance-mobile.css b/js/codemirror/theme/ambiance-mobile.css new file mode 100644 index 0000000..88d332e --- /dev/null +++ b/js/codemirror/theme/ambiance-mobile.css @@ -0,0 +1,5 @@ +.cm-s-ambiance.CodeMirror { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} diff --git a/js/codemirror/theme/ambiance.css b/js/codemirror/theme/ambiance.css new file mode 100644 index 0000000..782fca4 --- /dev/null +++ b/js/codemirror/theme/ambiance.css @@ -0,0 +1,74 @@ +/* ambiance theme for codemirror */ + +/* Color scheme */ + +.cm-s-ambiance .cm-header { color: blue; } +.cm-s-ambiance .cm-quote { color: #24C2C7; } + +.cm-s-ambiance .cm-keyword { color: #cda869; } +.cm-s-ambiance .cm-atom { color: #CF7EA9; } +.cm-s-ambiance .cm-number { color: #78CF8A; } +.cm-s-ambiance .cm-def { color: #aac6e3; } +.cm-s-ambiance .cm-variable { color: #ffb795; } +.cm-s-ambiance .cm-variable-2 { color: #eed1b3; } +.cm-s-ambiance .cm-variable-3, .cm-s-ambiance .cm-type { color: #faded3; } +.cm-s-ambiance .cm-property { color: #eed1b3; } +.cm-s-ambiance .cm-operator { color: #fa8d6a; } +.cm-s-ambiance .cm-comment { color: #555; font-style:italic; } +.cm-s-ambiance .cm-string { color: #8f9d6a; } +.cm-s-ambiance .cm-string-2 { color: #9d937c; } +.cm-s-ambiance .cm-meta { color: #D2A8A1; } +.cm-s-ambiance .cm-qualifier { color: yellow; } +.cm-s-ambiance .cm-builtin { color: #9999cc; } +.cm-s-ambiance .cm-bracket { color: #24C2C7; } +.cm-s-ambiance .cm-tag { color: #fee4ff; } +.cm-s-ambiance .cm-attribute { color: #9B859D; } +.cm-s-ambiance .cm-hr { color: pink; } +.cm-s-ambiance .cm-link { color: #F4C20B; } +.cm-s-ambiance .cm-special { color: #FF9D00; } +.cm-s-ambiance .cm-error { color: #AF2018; } + +.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; } +.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; } + +.cm-s-ambiance div.CodeMirror-selected { background: rgba(255, 255, 255, 0.15); } +.cm-s-ambiance.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); } +.cm-s-ambiance .CodeMirror-line::selection, .cm-s-ambiance .CodeMirror-line > span::selection, .cm-s-ambiance .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); } +.cm-s-ambiance .CodeMirror-line::-moz-selection, .cm-s-ambiance .CodeMirror-line > span::-moz-selection, .cm-s-ambiance .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); } + +/* Editor styling */ + +.cm-s-ambiance.CodeMirror { + line-height: 1.40em; + color: #E6E1DC; + background-color: #202020; + -webkit-box-shadow: inset 0 0 10px black; + -moz-box-shadow: inset 0 0 10px black; + box-shadow: inset 0 0 10px black; +} + +.cm-s-ambiance .CodeMirror-gutters { + background: #3D3D3D; + border-right: 1px solid #4D4D4D; + box-shadow: 0 10px 20px black; +} + +.cm-s-ambiance .CodeMirror-linenumber { + text-shadow: 0px 1px 1px #4d4d4d; + color: #111; + padding: 0 5px; +} + +.cm-s-ambiance .CodeMirror-guttermarker { color: #aaa; } +.cm-s-ambiance .CodeMirror-guttermarker-subtle { color: #111; } + +.cm-s-ambiance .CodeMirror-cursor { border-left: 1px solid #7991E8; } + +.cm-s-ambiance .CodeMirror-activeline-background { + background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031); +} + +.cm-s-ambiance.CodeMirror, +.cm-s-ambiance .CodeMirror-gutters { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC"); +} diff --git a/js/codemirror/theme/ayu-dark.css b/js/codemirror/theme/ayu-dark.css new file mode 100644 index 0000000..13656b9 --- /dev/null +++ b/js/codemirror/theme/ayu-dark.css @@ -0,0 +1,44 @@ +/* Based on https://github.com/dempfi/ayu */ + +.cm-s-ayu-dark.CodeMirror { background: #0a0e14; color: #b3b1ad; } +.cm-s-ayu-dark div.CodeMirror-selected { background: #273747; } +.cm-s-ayu-dark .CodeMirror-line::selection, .cm-s-ayu-dark .CodeMirror-line > span::selection, .cm-s-ayu-dark .CodeMirror-line > span > span::selection { background: rgba(39, 55, 71, 99); } +.cm-s-ayu-dark .CodeMirror-line::-moz-selection, .cm-s-ayu-dark .CodeMirror-line > span::-moz-selection, .cm-s-ayu-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(39, 55, 71, 99); } +.cm-s-ayu-dark .CodeMirror-gutters { background: #0a0e14; border-right: 0px; } +.cm-s-ayu-dark .CodeMirror-guttermarker { color: white; } +.cm-s-ayu-dark .CodeMirror-guttermarker-subtle { color: #3d424d; } +.cm-s-ayu-dark .CodeMirror-linenumber { color: #3d424d; } +.cm-s-ayu-dark .CodeMirror-cursor { border-left: 1px solid #e6b450; } +.cm-s-ayu-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #a2a8a175 !important; } +.cm-s-ayu-dark .cm-animate-fat-cursor { background-color: #a2a8a175 !important; } + +.cm-s-ayu-dark span.cm-comment { color: #626a73; } +.cm-s-ayu-dark span.cm-atom { color: #ae81ff; } +.cm-s-ayu-dark span.cm-number { color: #e6b450; } + +.cm-s-ayu-dark span.cm-comment.cm-attribute { color: #ffb454; } +.cm-s-ayu-dark span.cm-comment.cm-def { color: rgba(57, 186, 230, 80); } +.cm-s-ayu-dark span.cm-comment.cm-tag { color: #39bae6; } +.cm-s-ayu-dark span.cm-comment.cm-type { color: #5998a6; } + +.cm-s-ayu-dark span.cm-property, .cm-s-ayu-dark span.cm-attribute { color: #ffb454; } +.cm-s-ayu-dark span.cm-keyword { color: #ff8f40; } +.cm-s-ayu-dark span.cm-builtin { color: #e6b450; } +.cm-s-ayu-dark span.cm-string { color: #c2d94c; } + +.cm-s-ayu-dark span.cm-variable { color: #b3b1ad; } +.cm-s-ayu-dark span.cm-variable-2 { color: #f07178; } +.cm-s-ayu-dark span.cm-variable-3 { color: #39bae6; } +.cm-s-ayu-dark span.cm-type { color: #ff8f40; } +.cm-s-ayu-dark span.cm-def { color: #ffee99; } +.cm-s-ayu-dark span.cm-bracket { color: #f8f8f2; } +.cm-s-ayu-dark span.cm-tag { color: rgba(57, 186, 230, 80); } +.cm-s-ayu-dark span.cm-header { color: #c2d94c; } +.cm-s-ayu-dark span.cm-link { color: #39bae6; } +.cm-s-ayu-dark span.cm-error { color: #ff3333; } + +.cm-s-ayu-dark .CodeMirror-activeline-background { background: #01060e; } +.cm-s-ayu-dark .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/ayu-mirage.css b/js/codemirror/theme/ayu-mirage.css new file mode 100644 index 0000000..19403ce --- /dev/null +++ b/js/codemirror/theme/ayu-mirage.css @@ -0,0 +1,45 @@ +/* Based on https://github.com/dempfi/ayu */ + +.cm-s-ayu-mirage.CodeMirror { background: #1f2430; color: #cbccc6; } +.cm-s-ayu-mirage div.CodeMirror-selected { background: #34455a; } +.cm-s-ayu-mirage .CodeMirror-line::selection, .cm-s-ayu-mirage .CodeMirror-line > span::selection, .cm-s-ayu-mirage .CodeMirror-line > span > span::selection { background: #34455a; } +.cm-s-ayu-mirage .CodeMirror-line::-moz-selection, .cm-s-ayu-mirage .CodeMirror-line > span::-moz-selection, .cm-s-ayu-mirage .CodeMirror-line > span > span::-moz-selection { background: rgba(25, 30, 42, 99); } +.cm-s-ayu-mirage .CodeMirror-gutters { background: #1f2430; border-right: 0px; } +.cm-s-ayu-mirage .CodeMirror-guttermarker { color: white; } +.cm-s-ayu-mirage .CodeMirror-guttermarker-subtle { color: rgba(112, 122, 140, 66); } +.cm-s-ayu-mirage .CodeMirror-linenumber { color: rgba(61, 66, 77, 99); } +.cm-s-ayu-mirage .CodeMirror-cursor { border-left: 1px solid #ffcc66; } +.cm-s-ayu-mirage.cm-fat-cursor .CodeMirror-cursor {background-color: #a2a8a175 !important;} +.cm-s-ayu-mirage .cm-animate-fat-cursor { background-color: #a2a8a175 !important; } + +.cm-s-ayu-mirage span.cm-comment { color: #5c6773; font-style:italic; } +.cm-s-ayu-mirage span.cm-atom { color: #ae81ff; } +.cm-s-ayu-mirage span.cm-number { color: #ffcc66; } + +.cm-s-ayu-mirage span.cm-comment.cm-attribute { color: #ffd580; } +.cm-s-ayu-mirage span.cm-comment.cm-def { color: #d4bfff; } +.cm-s-ayu-mirage span.cm-comment.cm-tag { color: #5ccfe6; } +.cm-s-ayu-mirage span.cm-comment.cm-type { color: #5998a6; } + +.cm-s-ayu-mirage span.cm-property { color: #f29e74; } +.cm-s-ayu-mirage span.cm-attribute { color: #ffd580; } +.cm-s-ayu-mirage span.cm-keyword { color: #ffa759; } +.cm-s-ayu-mirage span.cm-builtin { color: #ffcc66; } +.cm-s-ayu-mirage span.cm-string { color: #bae67e; } + +.cm-s-ayu-mirage span.cm-variable { color: #cbccc6; } +.cm-s-ayu-mirage span.cm-variable-2 { color: #f28779; } +.cm-s-ayu-mirage span.cm-variable-3 { color: #5ccfe6; } +.cm-s-ayu-mirage span.cm-type { color: #ffa759; } +.cm-s-ayu-mirage span.cm-def { color: #ffd580; } +.cm-s-ayu-mirage span.cm-bracket { color: rgba(92, 207, 230, 80); } +.cm-s-ayu-mirage span.cm-tag { color: #5ccfe6; } +.cm-s-ayu-mirage span.cm-header { color: #bae67e; } +.cm-s-ayu-mirage span.cm-link { color: #5ccfe6; } +.cm-s-ayu-mirage span.cm-error { color: #ff3333; } + +.cm-s-ayu-mirage .CodeMirror-activeline-background { background: #191e2a; } +.cm-s-ayu-mirage .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/base16-dark.css b/js/codemirror/theme/base16-dark.css new file mode 100644 index 0000000..b3c31ab --- /dev/null +++ b/js/codemirror/theme/base16-dark.css @@ -0,0 +1,40 @@ +/* + + Name: Base16 Default Dark + Author: Chris Kempson (http://chriskempson.com) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-base16-dark.CodeMirror { background: #151515; color: #e0e0e0; } +.cm-s-base16-dark div.CodeMirror-selected { background: #303030; } +.cm-s-base16-dark .CodeMirror-line::selection, .cm-s-base16-dark .CodeMirror-line > span::selection, .cm-s-base16-dark .CodeMirror-line > span > span::selection { background: rgba(48, 48, 48, .99); } +.cm-s-base16-dark .CodeMirror-line::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span::-moz-selection, .cm-s-base16-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(48, 48, 48, .99); } +.cm-s-base16-dark .CodeMirror-gutters { background: #151515; border-right: 0px; } +.cm-s-base16-dark .CodeMirror-guttermarker { color: #ac4142; } +.cm-s-base16-dark .CodeMirror-guttermarker-subtle { color: #505050; } +.cm-s-base16-dark .CodeMirror-linenumber { color: #505050; } +.cm-s-base16-dark .CodeMirror-cursor { border-left: 1px solid #b0b0b0; } +.cm-s-base16-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #8e8d8875 !important; } +.cm-s-base16-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; } + +.cm-s-base16-dark span.cm-comment { color: #8f5536; } +.cm-s-base16-dark span.cm-atom { color: #aa759f; } +.cm-s-base16-dark span.cm-number { color: #aa759f; } + +.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute { color: #90a959; } +.cm-s-base16-dark span.cm-keyword { color: #ac4142; } +.cm-s-base16-dark span.cm-string { color: #f4bf75; } + +.cm-s-base16-dark span.cm-variable { color: #90a959; } +.cm-s-base16-dark span.cm-variable-2 { color: #6a9fb5; } +.cm-s-base16-dark span.cm-def { color: #d28445; } +.cm-s-base16-dark span.cm-bracket { color: #e0e0e0; } +.cm-s-base16-dark span.cm-tag { color: #ac4142; } +.cm-s-base16-dark span.cm-link { color: #aa759f; } +.cm-s-base16-dark span.cm-error { background: #ac4142; color: #b0b0b0; } + +.cm-s-base16-dark .CodeMirror-activeline-background { background: #202020; } +.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/base16-light.css b/js/codemirror/theme/base16-light.css new file mode 100644 index 0000000..1d5f582 --- /dev/null +++ b/js/codemirror/theme/base16-light.css @@ -0,0 +1,38 @@ +/* + + Name: Base16 Default Light + Author: Chris Kempson (http://chriskempson.com) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-base16-light.CodeMirror { background: #f5f5f5; color: #202020; } +.cm-s-base16-light div.CodeMirror-selected { background: #e0e0e0; } +.cm-s-base16-light .CodeMirror-line::selection, .cm-s-base16-light .CodeMirror-line > span::selection, .cm-s-base16-light .CodeMirror-line > span > span::selection { background: #e0e0e0; } +.cm-s-base16-light .CodeMirror-line::-moz-selection, .cm-s-base16-light .CodeMirror-line > span::-moz-selection, .cm-s-base16-light .CodeMirror-line > span > span::-moz-selection { background: #e0e0e0; } +.cm-s-base16-light .CodeMirror-gutters { background: #f5f5f5; border-right: 0px; } +.cm-s-base16-light .CodeMirror-guttermarker { color: #ac4142; } +.cm-s-base16-light .CodeMirror-guttermarker-subtle { color: #b0b0b0; } +.cm-s-base16-light .CodeMirror-linenumber { color: #b0b0b0; } +.cm-s-base16-light .CodeMirror-cursor { border-left: 1px solid #505050; } + +.cm-s-base16-light span.cm-comment { color: #8f5536; } +.cm-s-base16-light span.cm-atom { color: #aa759f; } +.cm-s-base16-light span.cm-number { color: #aa759f; } + +.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute { color: #90a959; } +.cm-s-base16-light span.cm-keyword { color: #ac4142; } +.cm-s-base16-light span.cm-string { color: #f4bf75; } + +.cm-s-base16-light span.cm-variable { color: #90a959; } +.cm-s-base16-light span.cm-variable-2 { color: #6a9fb5; } +.cm-s-base16-light span.cm-def { color: #d28445; } +.cm-s-base16-light span.cm-bracket { color: #202020; } +.cm-s-base16-light span.cm-tag { color: #ac4142; } +.cm-s-base16-light span.cm-link { color: #aa759f; } +.cm-s-base16-light span.cm-error { background: #ac4142; color: #505050; } + +.cm-s-base16-light .CodeMirror-activeline-background { background: #DDDCDC; } +.cm-s-base16-light .CodeMirror-matchingbracket { color: #f5f5f5 !important; background-color: #6A9FB5 !important} diff --git a/js/codemirror/theme/bespin.css b/js/codemirror/theme/bespin.css new file mode 100644 index 0000000..3fd3d93 --- /dev/null +++ b/js/codemirror/theme/bespin.css @@ -0,0 +1,34 @@ +/* + + Name: Bespin + Author: Mozilla / Jan T. Sott + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-bespin.CodeMirror {background: #28211c; color: #9d9b97;} +.cm-s-bespin div.CodeMirror-selected {background: #59554f !important;} +.cm-s-bespin .CodeMirror-gutters {background: #28211c; border-right: 0px;} +.cm-s-bespin .CodeMirror-linenumber {color: #666666;} +.cm-s-bespin .CodeMirror-cursor {border-left: 1px solid #797977 !important;} + +.cm-s-bespin span.cm-comment {color: #937121;} +.cm-s-bespin span.cm-atom {color: #9b859d;} +.cm-s-bespin span.cm-number {color: #9b859d;} + +.cm-s-bespin span.cm-property, .cm-s-bespin span.cm-attribute {color: #54be0d;} +.cm-s-bespin span.cm-keyword {color: #cf6a4c;} +.cm-s-bespin span.cm-string {color: #f9ee98;} + +.cm-s-bespin span.cm-variable {color: #54be0d;} +.cm-s-bespin span.cm-variable-2 {color: #5ea6ea;} +.cm-s-bespin span.cm-def {color: #cf7d34;} +.cm-s-bespin span.cm-error {background: #cf6a4c; color: #797977;} +.cm-s-bespin span.cm-bracket {color: #9d9b97;} +.cm-s-bespin span.cm-tag {color: #cf6a4c;} +.cm-s-bespin span.cm-link {color: #9b859d;} + +.cm-s-bespin .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} +.cm-s-bespin .CodeMirror-activeline-background { background: #404040; } diff --git a/js/codemirror/theme/blackboard.css b/js/codemirror/theme/blackboard.css new file mode 100644 index 0000000..b6eaedb --- /dev/null +++ b/js/codemirror/theme/blackboard.css @@ -0,0 +1,32 @@ +/* Port of TextMate's Blackboard theme */ + +.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; } +.cm-s-blackboard div.CodeMirror-selected { background: #253B76; } +.cm-s-blackboard .CodeMirror-line::selection, .cm-s-blackboard .CodeMirror-line > span::selection, .cm-s-blackboard .CodeMirror-line > span > span::selection { background: rgba(37, 59, 118, .99); } +.cm-s-blackboard .CodeMirror-line::-moz-selection, .cm-s-blackboard .CodeMirror-line > span::-moz-selection, .cm-s-blackboard .CodeMirror-line > span > span::-moz-selection { background: rgba(37, 59, 118, .99); } +.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; } +.cm-s-blackboard .CodeMirror-guttermarker { color: #FBDE2D; } +.cm-s-blackboard .CodeMirror-guttermarker-subtle { color: #888; } +.cm-s-blackboard .CodeMirror-linenumber { color: #888; } +.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7; } + +.cm-s-blackboard .cm-keyword { color: #FBDE2D; } +.cm-s-blackboard .cm-atom { color: #D8FA3C; } +.cm-s-blackboard .cm-number { color: #D8FA3C; } +.cm-s-blackboard .cm-def { color: #8DA6CE; } +.cm-s-blackboard .cm-variable { color: #FF6400; } +.cm-s-blackboard .cm-operator { color: #FBDE2D; } +.cm-s-blackboard .cm-comment { color: #AEAEAE; } +.cm-s-blackboard .cm-string { color: #61CE3C; } +.cm-s-blackboard .cm-string-2 { color: #61CE3C; } +.cm-s-blackboard .cm-meta { color: #D8FA3C; } +.cm-s-blackboard .cm-builtin { color: #8DA6CE; } +.cm-s-blackboard .cm-tag { color: #8DA6CE; } +.cm-s-blackboard .cm-attribute { color: #8DA6CE; } +.cm-s-blackboard .cm-header { color: #FF6400; } +.cm-s-blackboard .cm-hr { color: #AEAEAE; } +.cm-s-blackboard .cm-link { color: #8DA6CE; } +.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } + +.cm-s-blackboard .CodeMirror-activeline-background { background: #3C3636; } +.cm-s-blackboard .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; } diff --git a/js/codemirror/theme/cobalt.css b/js/codemirror/theme/cobalt.css new file mode 100644 index 0000000..bbbda3b --- /dev/null +++ b/js/codemirror/theme/cobalt.css @@ -0,0 +1,25 @@ +.cm-s-cobalt.CodeMirror { background: #002240; color: white; } +.cm-s-cobalt div.CodeMirror-selected { background: #b36539; } +.cm-s-cobalt .CodeMirror-line::selection, .cm-s-cobalt .CodeMirror-line > span::selection, .cm-s-cobalt .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); } +.cm-s-cobalt .CodeMirror-line::-moz-selection, .cm-s-cobalt .CodeMirror-line > span::-moz-selection, .cm-s-cobalt .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); } +.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } +.cm-s-cobalt .CodeMirror-guttermarker { color: #ffee80; } +.cm-s-cobalt .CodeMirror-guttermarker-subtle { color: #d0d0d0; } +.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-cobalt span.cm-comment { color: #08f; } +.cm-s-cobalt span.cm-atom { color: #845dc4; } +.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; } +.cm-s-cobalt span.cm-keyword { color: #ffee80; } +.cm-s-cobalt span.cm-string { color: #3ad900; } +.cm-s-cobalt span.cm-meta { color: #ff9d00; } +.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } +.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def, .cm-s-cobalt .cm-type { color: white; } +.cm-s-cobalt span.cm-bracket { color: #d8d8d8; } +.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } +.cm-s-cobalt span.cm-link { color: #845dc4; } +.cm-s-cobalt span.cm-error { color: #9d1e15; } + +.cm-s-cobalt .CodeMirror-activeline-background { background: #002D57; } +.cm-s-cobalt .CodeMirror-matchingbracket { outline:1px solid grey;color:white !important; } diff --git a/js/codemirror/theme/colorforth.css b/js/codemirror/theme/colorforth.css new file mode 100644 index 0000000..19095e4 --- /dev/null +++ b/js/codemirror/theme/colorforth.css @@ -0,0 +1,33 @@ +.cm-s-colorforth.CodeMirror { background: #000000; color: #f8f8f8; } +.cm-s-colorforth .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } +.cm-s-colorforth .CodeMirror-guttermarker { color: #FFBD40; } +.cm-s-colorforth .CodeMirror-guttermarker-subtle { color: #78846f; } +.cm-s-colorforth .CodeMirror-linenumber { color: #bababa; } +.cm-s-colorforth .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-colorforth span.cm-comment { color: #ededed; } +.cm-s-colorforth span.cm-def { color: #ff1c1c; font-weight:bold; } +.cm-s-colorforth span.cm-keyword { color: #ffd900; } +.cm-s-colorforth span.cm-builtin { color: #00d95a; } +.cm-s-colorforth span.cm-variable { color: #73ff00; } +.cm-s-colorforth span.cm-string { color: #007bff; } +.cm-s-colorforth span.cm-number { color: #00c4ff; } +.cm-s-colorforth span.cm-atom { color: #606060; } + +.cm-s-colorforth span.cm-variable-2 { color: #EEE; } +.cm-s-colorforth span.cm-variable-3, .cm-s-colorforth span.cm-type { color: #DDD; } +.cm-s-colorforth span.cm-property {} +.cm-s-colorforth span.cm-operator {} + +.cm-s-colorforth span.cm-meta { color: yellow; } +.cm-s-colorforth span.cm-qualifier { color: #FFF700; } +.cm-s-colorforth span.cm-bracket { color: #cc7; } +.cm-s-colorforth span.cm-tag { color: #FFBD40; } +.cm-s-colorforth span.cm-attribute { color: #FFF700; } +.cm-s-colorforth span.cm-error { color: #f00; } + +.cm-s-colorforth div.CodeMirror-selected { background: #333d53; } + +.cm-s-colorforth span.cm-compilation { background: rgba(255, 255, 255, 0.12); } + +.cm-s-colorforth .CodeMirror-activeline-background { background: #253540; } diff --git a/js/codemirror/theme/darcula.css b/js/codemirror/theme/darcula.css new file mode 100644 index 0000000..2ec81a3 --- /dev/null +++ b/js/codemirror/theme/darcula.css @@ -0,0 +1,53 @@ +/** + Name: IntelliJ IDEA darcula theme + From IntelliJ IDEA by JetBrains + */ + +.cm-s-darcula { font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;} +.cm-s-darcula.CodeMirror { background: #2B2B2B; color: #A9B7C6; } + +.cm-s-darcula span.cm-meta { color: #BBB529; } +.cm-s-darcula span.cm-number { color: #6897BB; } +.cm-s-darcula span.cm-keyword { color: #CC7832; line-height: 1em; font-weight: bold; } +.cm-s-darcula span.cm-def { color: #A9B7C6; font-style: italic; } +.cm-s-darcula span.cm-variable { color: #A9B7C6; } +.cm-s-darcula span.cm-variable-2 { color: #A9B7C6; } +.cm-s-darcula span.cm-variable-3 { color: #9876AA; } +.cm-s-darcula span.cm-type { color: #AABBCC; font-weight: bold; } +.cm-s-darcula span.cm-property { color: #FFC66D; } +.cm-s-darcula span.cm-operator { color: #A9B7C6; } +.cm-s-darcula span.cm-string { color: #6A8759; } +.cm-s-darcula span.cm-string-2 { color: #6A8759; } +.cm-s-darcula span.cm-comment { color: #61A151; font-style: italic; } +.cm-s-darcula span.cm-link { color: #CC7832; } +.cm-s-darcula span.cm-atom { color: #CC7832; } +.cm-s-darcula span.cm-error { color: #BC3F3C; } +.cm-s-darcula span.cm-tag { color: #629755; font-weight: bold; font-style: italic; text-decoration: underline; } +.cm-s-darcula span.cm-attribute { color: #6897bb; } +.cm-s-darcula span.cm-qualifier { color: #6A8759; } +.cm-s-darcula span.cm-bracket { color: #A9B7C6; } +.cm-s-darcula span.cm-builtin { color: #FF9E59; } +.cm-s-darcula span.cm-special { color: #FF9E59; } +.cm-s-darcula span.cm-matchhighlight { color: #FFFFFF; background-color: rgba(50, 89, 48, .7); font-weight: normal;} +.cm-s-darcula span.cm-searching { color: #FFFFFF; background-color: rgba(61, 115, 59, .7); font-weight: normal;} + +.cm-s-darcula .CodeMirror-cursor { border-left: 1px solid #A9B7C6; } +.cm-s-darcula .CodeMirror-activeline-background { background: #323232; } +.cm-s-darcula .CodeMirror-gutters { background: #313335; border-right: 1px solid #313335; } +.cm-s-darcula .CodeMirror-guttermarker { color: #FFEE80; } +.cm-s-darcula .CodeMirror-guttermarker-subtle { color: #D0D0D0; } +.cm-s-darcula .CodeMirrir-linenumber { color: #606366; } +.cm-s-darcula .CodeMirror-matchingbracket { background-color: #3B514D; color: #FFEF28 !important; font-weight: bold; } + +.cm-s-darcula div.CodeMirror-selected { background: #214283; } + +.CodeMirror-hints.darcula { + font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; + color: #9C9E9E; + background-color: #3B3E3F !important; +} + +.CodeMirror-hints.darcula .CodeMirror-hint-active { + background-color: #494D4E !important; + color: #9C9E9E !important; +} diff --git a/js/codemirror/theme/dracula.css b/js/codemirror/theme/dracula.css new file mode 100644 index 0000000..253133e --- /dev/null +++ b/js/codemirror/theme/dracula.css @@ -0,0 +1,40 @@ +/* + + Name: dracula + Author: Michael Kaminsky (http://github.com/mkaminsky11) + + Original dracula color scheme by Zeno Rocha (https://github.com/zenorocha/dracula-theme) + +*/ + + +.cm-s-dracula.CodeMirror, .cm-s-dracula .CodeMirror-gutters { + background-color: #282a36 !important; + color: #f8f8f2 !important; + border: none; +} +.cm-s-dracula .CodeMirror-gutters { color: #282a36; } +.cm-s-dracula .CodeMirror-cursor { border-left: solid thin #f8f8f0; } +.cm-s-dracula .CodeMirror-linenumber { color: #6D8A88; } +.cm-s-dracula .CodeMirror-selected { background: rgba(255, 255, 255, 0.10); } +.cm-s-dracula .CodeMirror-line::selection, .cm-s-dracula .CodeMirror-line > span::selection, .cm-s-dracula .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); } +.cm-s-dracula .CodeMirror-line::-moz-selection, .cm-s-dracula .CodeMirror-line > span::-moz-selection, .cm-s-dracula .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); } +.cm-s-dracula span.cm-comment { color: #6272a4; } +.cm-s-dracula span.cm-string, .cm-s-dracula span.cm-string-2 { color: #f1fa8c; } +.cm-s-dracula span.cm-number { color: #bd93f9; } +.cm-s-dracula span.cm-variable { color: #50fa7b; } +.cm-s-dracula span.cm-variable-2 { color: white; } +.cm-s-dracula span.cm-def { color: #50fa7b; } +.cm-s-dracula span.cm-operator { color: #ff79c6; } +.cm-s-dracula span.cm-keyword { color: #ff79c6; } +.cm-s-dracula span.cm-atom { color: #bd93f9; } +.cm-s-dracula span.cm-meta { color: #f8f8f2; } +.cm-s-dracula span.cm-tag { color: #ff79c6; } +.cm-s-dracula span.cm-attribute { color: #50fa7b; } +.cm-s-dracula span.cm-qualifier { color: #50fa7b; } +.cm-s-dracula span.cm-property { color: #66d9ef; } +.cm-s-dracula span.cm-builtin { color: #50fa7b; } +.cm-s-dracula span.cm-variable-3, .cm-s-dracula span.cm-type { color: #ffb86c; } + +.cm-s-dracula .CodeMirror-activeline-background { background: rgba(255,255,255,0.1); } +.cm-s-dracula .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/duotone-dark.css b/js/codemirror/theme/duotone-dark.css new file mode 100644 index 0000000..88fdc76 --- /dev/null +++ b/js/codemirror/theme/duotone-dark.css @@ -0,0 +1,35 @@ +/* +Name: DuoTone-Dark +Author: by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes) + +CodeMirror template by Jan T. Sott (https://github.com/idleberg), adapted by Bram de Haan (https://github.com/atelierbram/) +*/ + +.cm-s-duotone-dark.CodeMirror { background: #2a2734; color: #6c6783; } +.cm-s-duotone-dark div.CodeMirror-selected { background: #545167!important; } +.cm-s-duotone-dark .CodeMirror-gutters { background: #2a2734; border-right: 0px; } +.cm-s-duotone-dark .CodeMirror-linenumber { color: #545167; } + +/* begin cursor */ +.cm-s-duotone-dark .CodeMirror-cursor { border-left: 1px solid #ffad5c; /* border-left: 1px solid #ffad5c80; */ border-right: .5em solid #ffad5c; /* border-right: .5em solid #ffad5c80; */ opacity: .5; } +.cm-s-duotone-dark .CodeMirror-activeline-background { background: #363342; /* background: #36334280; */ opacity: .5;} +.cm-s-duotone-dark .cm-fat-cursor .CodeMirror-cursor { background: #ffad5c; /* background: #ffad5c80; */ opacity: .5;} +/* end cursor */ + +.cm-s-duotone-dark span.cm-atom, .cm-s-duotone-dark span.cm-number, .cm-s-duotone-dark span.cm-keyword, .cm-s-duotone-dark span.cm-variable, .cm-s-duotone-dark span.cm-attribute, .cm-s-duotone-dark span.cm-quote, .cm-s-duotone-dark span.cm-hr, .cm-s-duotone-dark span.cm-link { color: #ffcc99; } + +.cm-s-duotone-dark span.cm-property { color: #9a86fd; } +.cm-s-duotone-dark span.cm-punctuation, .cm-s-duotone-dark span.cm-unit, .cm-s-duotone-dark span.cm-negative { color: #e09142; } +.cm-s-duotone-dark span.cm-string { color: #ffb870; } +.cm-s-duotone-dark span.cm-operator { color: #ffad5c; } +.cm-s-duotone-dark span.cm-positive { color: #6a51e6; } + +.cm-s-duotone-dark span.cm-variable-2, .cm-s-duotone-dark span.cm-variable-3, .cm-s-duotone-dark span.cm-type, .cm-s-duotone-dark span.cm-string-2, .cm-s-duotone-dark span.cm-url { color: #7a63ee; } +.cm-s-duotone-dark span.cm-def, .cm-s-duotone-dark span.cm-tag, .cm-s-duotone-dark span.cm-builtin, .cm-s-duotone-dark span.cm-qualifier, .cm-s-duotone-dark span.cm-header, .cm-s-duotone-dark span.cm-em { color: #eeebff; } +.cm-s-duotone-dark span.cm-bracket, .cm-s-duotone-dark span.cm-comment { color: #6c6783; } + +/* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */ +.cm-s-duotone-dark span.cm-error, .cm-s-duotone-dark span.cm-invalidchar { color: #f00; } + +.cm-s-duotone-dark span.cm-header { font-weight: normal; } +.cm-s-duotone-dark .CodeMirror-matchingbracket { text-decoration: underline; color: #eeebff !important; } diff --git a/js/codemirror/theme/duotone-light.css b/js/codemirror/theme/duotone-light.css new file mode 100644 index 0000000..d99480f --- /dev/null +++ b/js/codemirror/theme/duotone-light.css @@ -0,0 +1,36 @@ +/* +Name: DuoTone-Light +Author: by Bram de Haan, adapted from DuoTone themes by Simurai (http://simurai.com/projects/2016/01/01/duotone-themes) + +CodeMirror template by Jan T. Sott (https://github.com/idleberg), adapted by Bram de Haan (https://github.com/atelierbram/) +*/ + +.cm-s-duotone-light.CodeMirror { background: #faf8f5; color: #b29762; } +.cm-s-duotone-light div.CodeMirror-selected { background: #e3dcce !important; } +.cm-s-duotone-light .CodeMirror-gutters { background: #faf8f5; border-right: 0px; } +.cm-s-duotone-light .CodeMirror-linenumber { color: #cdc4b1; } + +/* begin cursor */ +.cm-s-duotone-light .CodeMirror-cursor { border-left: 1px solid #93abdc; /* border-left: 1px solid #93abdc80; */ border-right: .5em solid #93abdc; /* border-right: .5em solid #93abdc80; */ opacity: .5; } +.cm-s-duotone-light .CodeMirror-activeline-background { background: #e3dcce; /* background: #e3dcce80; */ opacity: .5; } +.cm-s-duotone-light .cm-fat-cursor .CodeMirror-cursor { background: #93abdc; /* #93abdc80; */ opacity: .5; } +/* end cursor */ + +.cm-s-duotone-light span.cm-atom, .cm-s-duotone-light span.cm-number, .cm-s-duotone-light span.cm-keyword, .cm-s-duotone-light span.cm-variable, .cm-s-duotone-light span.cm-attribute, .cm-s-duotone-light span.cm-quote, .cm-s-duotone-light-light span.cm-hr, .cm-s-duotone-light-light span.cm-link { color: #063289; } + +.cm-s-duotone-light span.cm-property { color: #b29762; } +.cm-s-duotone-light span.cm-punctuation, .cm-s-duotone-light span.cm-unit, .cm-s-duotone-light span.cm-negative { color: #063289; } +.cm-s-duotone-light span.cm-string, .cm-s-duotone-light span.cm-operator { color: #1659df; } +.cm-s-duotone-light span.cm-positive { color: #896724; } + +.cm-s-duotone-light span.cm-variable-2, .cm-s-duotone-light span.cm-variable-3, .cm-s-duotone-light span.cm-type, .cm-s-duotone-light span.cm-string-2, .cm-s-duotone-light span.cm-url { color: #896724; } +.cm-s-duotone-light span.cm-def, .cm-s-duotone-light span.cm-tag, .cm-s-duotone-light span.cm-builtin, .cm-s-duotone-light span.cm-qualifier, .cm-s-duotone-light span.cm-header, .cm-s-duotone-light span.cm-em { color: #2d2006; } +.cm-s-duotone-light span.cm-bracket, .cm-s-duotone-light span.cm-comment { color: #b6ad9a; } + +/* using #f00 red for errors, don't think any of the colorscheme variables will stand out enough, ... maybe by giving it a background-color ... */ +/* .cm-s-duotone-light span.cm-error { background: #896724; color: #728fcb; } */ +.cm-s-duotone-light span.cm-error, .cm-s-duotone-light span.cm-invalidchar { color: #f00; } + +.cm-s-duotone-light span.cm-header { font-weight: normal; } +.cm-s-duotone-light .CodeMirror-matchingbracket { text-decoration: underline; color: #faf8f5 !important; } + diff --git a/js/codemirror/theme/eclipse.css b/js/codemirror/theme/eclipse.css new file mode 100644 index 0000000..800d603 --- /dev/null +++ b/js/codemirror/theme/eclipse.css @@ -0,0 +1,23 @@ +.cm-s-eclipse span.cm-meta { color: #FF1717; } +.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } +.cm-s-eclipse span.cm-atom { color: #219; } +.cm-s-eclipse span.cm-number { color: #164; } +.cm-s-eclipse span.cm-def { color: #00f; } +.cm-s-eclipse span.cm-variable { color: black; } +.cm-s-eclipse span.cm-variable-2 { color: #0000C0; } +.cm-s-eclipse span.cm-variable-3, .cm-s-eclipse span.cm-type { color: #0000C0; } +.cm-s-eclipse span.cm-property { color: black; } +.cm-s-eclipse span.cm-operator { color: black; } +.cm-s-eclipse span.cm-comment { color: #3F7F5F; } +.cm-s-eclipse span.cm-string { color: #2A00FF; } +.cm-s-eclipse span.cm-string-2 { color: #f50; } +.cm-s-eclipse span.cm-qualifier { color: #555; } +.cm-s-eclipse span.cm-builtin { color: #30a; } +.cm-s-eclipse span.cm-bracket { color: #cc7; } +.cm-s-eclipse span.cm-tag { color: #170; } +.cm-s-eclipse span.cm-attribute { color: #00c; } +.cm-s-eclipse span.cm-link { color: #219; } +.cm-s-eclipse span.cm-error { color: #f00; } + +.cm-s-eclipse .CodeMirror-activeline-background { background: #e8f2ff; } +.cm-s-eclipse .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } diff --git a/js/codemirror/theme/elegant.css b/js/codemirror/theme/elegant.css new file mode 100644 index 0000000..45b3ea6 --- /dev/null +++ b/js/codemirror/theme/elegant.css @@ -0,0 +1,13 @@ +.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom { color: #762; } +.cm-s-elegant span.cm-comment { color: #262; font-style: italic; line-height: 1em; } +.cm-s-elegant span.cm-meta { color: #555; font-style: italic; line-height: 1em; } +.cm-s-elegant span.cm-variable { color: black; } +.cm-s-elegant span.cm-variable-2 { color: #b11; } +.cm-s-elegant span.cm-qualifier { color: #555; } +.cm-s-elegant span.cm-keyword { color: #730; } +.cm-s-elegant span.cm-builtin { color: #30a; } +.cm-s-elegant span.cm-link { color: #762; } +.cm-s-elegant span.cm-error { background-color: #fdd; } + +.cm-s-elegant .CodeMirror-activeline-background { background: #e8f2ff; } +.cm-s-elegant .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } diff --git a/js/codemirror/theme/erlang-dark.css b/js/codemirror/theme/erlang-dark.css new file mode 100644 index 0000000..8c8a417 --- /dev/null +++ b/js/codemirror/theme/erlang-dark.css @@ -0,0 +1,34 @@ +.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; } +.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539; } +.cm-s-erlang-dark .CodeMirror-line::selection, .cm-s-erlang-dark .CodeMirror-line > span::selection, .cm-s-erlang-dark .CodeMirror-line > span > span::selection { background: rgba(179, 101, 57, .99); } +.cm-s-erlang-dark .CodeMirror-line::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span::-moz-selection, .cm-s-erlang-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(179, 101, 57, .99); } +.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } +.cm-s-erlang-dark .CodeMirror-guttermarker { color: white; } +.cm-s-erlang-dark .CodeMirror-guttermarker-subtle { color: #d0d0d0; } +.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-erlang-dark span.cm-quote { color: #ccc; } +.cm-s-erlang-dark span.cm-atom { color: #f133f1; } +.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; } +.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; } +.cm-s-erlang-dark span.cm-builtin { color: #eaa; } +.cm-s-erlang-dark span.cm-comment { color: #77f; } +.cm-s-erlang-dark span.cm-def { color: #e7a; } +.cm-s-erlang-dark span.cm-keyword { color: #ffee80; } +.cm-s-erlang-dark span.cm-meta { color: #50fefe; } +.cm-s-erlang-dark span.cm-number { color: #ffd0d0; } +.cm-s-erlang-dark span.cm-operator { color: #d55; } +.cm-s-erlang-dark span.cm-property { color: #ccc; } +.cm-s-erlang-dark span.cm-qualifier { color: #ccc; } +.cm-s-erlang-dark span.cm-special { color: #ffbbbb; } +.cm-s-erlang-dark span.cm-string { color: #3ad900; } +.cm-s-erlang-dark span.cm-string-2 { color: #ccc; } +.cm-s-erlang-dark span.cm-tag { color: #9effff; } +.cm-s-erlang-dark span.cm-variable { color: #50fe50; } +.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; } +.cm-s-erlang-dark span.cm-variable-3, .cm-s-erlang-dark span.cm-type { color: #ccc; } +.cm-s-erlang-dark span.cm-error { color: #9d1e15; } + +.cm-s-erlang-dark .CodeMirror-activeline-background { background: #013461; } +.cm-s-erlang-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } diff --git a/js/codemirror/theme/gruvbox-dark.css b/js/codemirror/theme/gruvbox-dark.css new file mode 100644 index 0000000..d712dda --- /dev/null +++ b/js/codemirror/theme/gruvbox-dark.css @@ -0,0 +1,39 @@ +/* + + Name: gruvbox-dark + Author: kRkk (https://github.com/krkk) + + Original gruvbox color scheme by Pavel Pertsev (https://github.com/morhetz/gruvbox) + +*/ + +.cm-s-gruvbox-dark.CodeMirror, .cm-s-gruvbox-dark .CodeMirror-gutters { background-color: #282828; color: #bdae93; } +.cm-s-gruvbox-dark .CodeMirror-gutters {background: #282828; border-right: 0px;} +.cm-s-gruvbox-dark .CodeMirror-linenumber {color: #7c6f64;} +.cm-s-gruvbox-dark .CodeMirror-cursor { border-left: 1px solid #ebdbb2; } +.cm-s-gruvbox-dark.cm-fat-cursor .CodeMirror-cursor { background-color: #8e8d8875 !important; } +.cm-s-gruvbox-dark .cm-animate-fat-cursor { background-color: #8e8d8875 !important; } +.cm-s-gruvbox-dark div.CodeMirror-selected { background: #928374; } +.cm-s-gruvbox-dark span.cm-meta { color: #83a598; } + +.cm-s-gruvbox-dark span.cm-comment { color: #928374; } +.cm-s-gruvbox-dark span.cm-number, span.cm-atom { color: #d3869b; } +.cm-s-gruvbox-dark span.cm-keyword { color: #f84934; } + +.cm-s-gruvbox-dark span.cm-variable { color: #ebdbb2; } +.cm-s-gruvbox-dark span.cm-variable-2 { color: #ebdbb2; } +.cm-s-gruvbox-dark span.cm-variable-3, .cm-s-gruvbox-dark span.cm-type { color: #fabd2f; } +.cm-s-gruvbox-dark span.cm-operator { color: #ebdbb2; } +.cm-s-gruvbox-dark span.cm-callee { color: #ebdbb2; } +.cm-s-gruvbox-dark span.cm-def { color: #ebdbb2; } +.cm-s-gruvbox-dark span.cm-property { color: #ebdbb2; } +.cm-s-gruvbox-dark span.cm-string { color: #b8bb26; } +.cm-s-gruvbox-dark span.cm-string-2 { color: #8ec07c; } +.cm-s-gruvbox-dark span.cm-qualifier { color: #8ec07c; } +.cm-s-gruvbox-dark span.cm-attribute { color: #8ec07c; } + +.cm-s-gruvbox-dark .CodeMirror-activeline-background { background: #3c3836; } +.cm-s-gruvbox-dark .CodeMirror-matchingbracket { background: #928374; color:#282828 !important; } + +.cm-s-gruvbox-dark span.cm-builtin { color: #fe8019; } +.cm-s-gruvbox-dark span.cm-tag { color: #fe8019; } diff --git a/js/codemirror/theme/hopscotch.css b/js/codemirror/theme/hopscotch.css new file mode 100644 index 0000000..7d05431 --- /dev/null +++ b/js/codemirror/theme/hopscotch.css @@ -0,0 +1,34 @@ +/* + + Name: Hopscotch + Author: Jan T. Sott + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-hopscotch.CodeMirror {background: #322931; color: #d5d3d5;} +.cm-s-hopscotch div.CodeMirror-selected {background: #433b42 !important;} +.cm-s-hopscotch .CodeMirror-gutters {background: #322931; border-right: 0px;} +.cm-s-hopscotch .CodeMirror-linenumber {color: #797379;} +.cm-s-hopscotch .CodeMirror-cursor {border-left: 1px solid #989498 !important;} + +.cm-s-hopscotch span.cm-comment {color: #b33508;} +.cm-s-hopscotch span.cm-atom {color: #c85e7c;} +.cm-s-hopscotch span.cm-number {color: #c85e7c;} + +.cm-s-hopscotch span.cm-property, .cm-s-hopscotch span.cm-attribute {color: #8fc13e;} +.cm-s-hopscotch span.cm-keyword {color: #dd464c;} +.cm-s-hopscotch span.cm-string {color: #fdcc59;} + +.cm-s-hopscotch span.cm-variable {color: #8fc13e;} +.cm-s-hopscotch span.cm-variable-2 {color: #1290bf;} +.cm-s-hopscotch span.cm-def {color: #fd8b19;} +.cm-s-hopscotch span.cm-error {background: #dd464c; color: #989498;} +.cm-s-hopscotch span.cm-bracket {color: #d5d3d5;} +.cm-s-hopscotch span.cm-tag {color: #dd464c;} +.cm-s-hopscotch span.cm-link {color: #c85e7c;} + +.cm-s-hopscotch .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} +.cm-s-hopscotch .CodeMirror-activeline-background { background: #302020; } diff --git a/js/codemirror/theme/icecoder.css b/js/codemirror/theme/icecoder.css new file mode 100644 index 0000000..5440fbe --- /dev/null +++ b/js/codemirror/theme/icecoder.css @@ -0,0 +1,43 @@ +/* +ICEcoder default theme by Matt Pass, used in code editor available at https://icecoder.net +*/ + +.cm-s-icecoder { color: #666; background: #1d1d1b; } + +.cm-s-icecoder span.cm-keyword { color: #eee; font-weight:bold; } /* off-white 1 */ +.cm-s-icecoder span.cm-atom { color: #e1c76e; } /* yellow */ +.cm-s-icecoder span.cm-number { color: #6cb5d9; } /* blue */ +.cm-s-icecoder span.cm-def { color: #b9ca4a; } /* green */ + +.cm-s-icecoder span.cm-variable { color: #6cb5d9; } /* blue */ +.cm-s-icecoder span.cm-variable-2 { color: #cc1e5c; } /* pink */ +.cm-s-icecoder span.cm-variable-3, .cm-s-icecoder span.cm-type { color: #f9602c; } /* orange */ + +.cm-s-icecoder span.cm-property { color: #eee; } /* off-white 1 */ +.cm-s-icecoder span.cm-operator { color: #9179bb; } /* purple */ +.cm-s-icecoder span.cm-comment { color: #97a3aa; } /* grey-blue */ + +.cm-s-icecoder span.cm-string { color: #b9ca4a; } /* green */ +.cm-s-icecoder span.cm-string-2 { color: #6cb5d9; } /* blue */ + +.cm-s-icecoder span.cm-meta { color: #555; } /* grey */ + +.cm-s-icecoder span.cm-qualifier { color: #555; } /* grey */ +.cm-s-icecoder span.cm-builtin { color: #214e7b; } /* bright blue */ +.cm-s-icecoder span.cm-bracket { color: #cc7; } /* grey-yellow */ + +.cm-s-icecoder span.cm-tag { color: #e8e8e8; } /* off-white 2 */ +.cm-s-icecoder span.cm-attribute { color: #099; } /* teal */ + +.cm-s-icecoder span.cm-header { color: #6a0d6a; } /* purple-pink */ +.cm-s-icecoder span.cm-quote { color: #186718; } /* dark green */ +.cm-s-icecoder span.cm-hr { color: #888; } /* mid-grey */ +.cm-s-icecoder span.cm-link { color: #e1c76e; } /* yellow */ +.cm-s-icecoder span.cm-error { color: #d00; } /* red */ + +.cm-s-icecoder .CodeMirror-cursor { border-left: 1px solid white; } +.cm-s-icecoder div.CodeMirror-selected { color: #fff; background: #037; } +.cm-s-icecoder .CodeMirror-gutters { background: #1d1d1b; min-width: 41px; border-right: 0; } +.cm-s-icecoder .CodeMirror-linenumber { color: #555; cursor: default; } +.cm-s-icecoder .CodeMirror-matchingbracket { color: #fff !important; background: #555 !important; } +.cm-s-icecoder .CodeMirror-activeline-background { background: #000; } diff --git a/js/codemirror/theme/idea.css b/js/codemirror/theme/idea.css new file mode 100644 index 0000000..eab3671 --- /dev/null +++ b/js/codemirror/theme/idea.css @@ -0,0 +1,42 @@ +/** + Name: IDEA default theme + From IntelliJ IDEA by JetBrains + */ + +.cm-s-idea span.cm-meta { color: #808000; } +.cm-s-idea span.cm-number { color: #0000FF; } +.cm-s-idea span.cm-keyword { line-height: 1em; font-weight: bold; color: #000080; } +.cm-s-idea span.cm-atom { font-weight: bold; color: #000080; } +.cm-s-idea span.cm-def { color: #000000; } +.cm-s-idea span.cm-variable { color: black; } +.cm-s-idea span.cm-variable-2 { color: black; } +.cm-s-idea span.cm-variable-3, .cm-s-idea span.cm-type { color: black; } +.cm-s-idea span.cm-property { color: black; } +.cm-s-idea span.cm-operator { color: black; } +.cm-s-idea span.cm-comment { color: #808080; } +.cm-s-idea span.cm-string { color: #008000; } +.cm-s-idea span.cm-string-2 { color: #008000; } +.cm-s-idea span.cm-qualifier { color: #555; } +.cm-s-idea span.cm-error { color: #FF0000; } +.cm-s-idea span.cm-attribute { color: #0000FF; } +.cm-s-idea span.cm-tag { color: #000080; } +.cm-s-idea span.cm-link { color: #0000FF; } +.cm-s-idea .CodeMirror-activeline-background { background: #FFFAE3; } + +.cm-s-idea span.cm-builtin { color: #30a; } +.cm-s-idea span.cm-bracket { color: #cc7; } +.cm-s-idea { font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, serif;} + + +.cm-s-idea .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } + +.CodeMirror-hints.idea { + font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; + color: #616569; + background-color: #ebf3fd !important; +} + +.CodeMirror-hints.idea .CodeMirror-hint-active { + background-color: #a2b8c9 !important; + color: #5c6065 !important; +} \ No newline at end of file diff --git a/js/codemirror/theme/isotope.css b/js/codemirror/theme/isotope.css new file mode 100644 index 0000000..d0d6263 --- /dev/null +++ b/js/codemirror/theme/isotope.css @@ -0,0 +1,34 @@ +/* + + Name: Isotope + Author: David Desandro / Jan T. Sott + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-isotope.CodeMirror {background: #000000; color: #e0e0e0;} +.cm-s-isotope div.CodeMirror-selected {background: #404040 !important;} +.cm-s-isotope .CodeMirror-gutters {background: #000000; border-right: 0px;} +.cm-s-isotope .CodeMirror-linenumber {color: #808080;} +.cm-s-isotope .CodeMirror-cursor {border-left: 1px solid #c0c0c0 !important;} + +.cm-s-isotope span.cm-comment {color: #3300ff;} +.cm-s-isotope span.cm-atom {color: #cc00ff;} +.cm-s-isotope span.cm-number {color: #cc00ff;} + +.cm-s-isotope span.cm-property, .cm-s-isotope span.cm-attribute {color: #33ff00;} +.cm-s-isotope span.cm-keyword {color: #ff0000;} +.cm-s-isotope span.cm-string {color: #ff0099;} + +.cm-s-isotope span.cm-variable {color: #33ff00;} +.cm-s-isotope span.cm-variable-2 {color: #0066ff;} +.cm-s-isotope span.cm-def {color: #ff9900;} +.cm-s-isotope span.cm-error {background: #ff0000; color: #c0c0c0;} +.cm-s-isotope span.cm-bracket {color: #e0e0e0;} +.cm-s-isotope span.cm-tag {color: #ff0000;} +.cm-s-isotope span.cm-link {color: #cc00ff;} + +.cm-s-isotope .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} +.cm-s-isotope .CodeMirror-activeline-background { background: #202020; } diff --git a/js/codemirror/theme/juejin.css b/js/codemirror/theme/juejin.css new file mode 100644 index 0000000..38cf7fe --- /dev/null +++ b/js/codemirror/theme/juejin.css @@ -0,0 +1,30 @@ +.cm-s-juejin.CodeMirror { + background: #f8f9fa; +} +.cm-s-juejin .cm-header, +.cm-s-juejin .cm-def { + color: #1ba2f0; +} +.cm-s-juejin .cm-comment { + color: #009e9d; +} +.cm-s-juejin .cm-quote, +.cm-s-juejin .cm-link, +.cm-s-juejin .cm-strong, +.cm-s-juejin .cm-attribute { + color: #fd7741; +} +.cm-s-juejin .cm-url, +.cm-s-juejin .cm-keyword, +.cm-s-juejin .cm-builtin { + color: #bb51b8; +} +.cm-s-juejin .cm-hr { + color: #909090; +} +.cm-s-juejin .cm-tag { + color: #107000; +} +.cm-s-juejin .cm-variable-2 { + color: #0050a0; +} diff --git a/js/codemirror/theme/lesser-dark.css b/js/codemirror/theme/lesser-dark.css new file mode 100644 index 0000000..f96bf43 --- /dev/null +++ b/js/codemirror/theme/lesser-dark.css @@ -0,0 +1,47 @@ +/* +http://lesscss.org/ dark theme +Ported to CodeMirror by Peter Kroon +*/ +.cm-s-lesser-dark { + line-height: 1.3em; +} +.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } +.cm-s-lesser-dark div.CodeMirror-selected { background: #45443B; } /* 33322B*/ +.cm-s-lesser-dark .CodeMirror-line::selection, .cm-s-lesser-dark .CodeMirror-line > span::selection, .cm-s-lesser-dark .CodeMirror-line > span > span::selection { background: rgba(69, 68, 59, .99); } +.cm-s-lesser-dark .CodeMirror-line::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span::-moz-selection, .cm-s-lesser-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(69, 68, 59, .99); } +.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white; } +.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/ + +.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ + +.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; } +.cm-s-lesser-dark .CodeMirror-guttermarker { color: #599eff; } +.cm-s-lesser-dark .CodeMirror-guttermarker-subtle { color: #777; } +.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; } + +.cm-s-lesser-dark span.cm-header { color: #a0a; } +.cm-s-lesser-dark span.cm-quote { color: #090; } +.cm-s-lesser-dark span.cm-keyword { color: #599eff; } +.cm-s-lesser-dark span.cm-atom { color: #C2B470; } +.cm-s-lesser-dark span.cm-number { color: #B35E4D; } +.cm-s-lesser-dark span.cm-def { color: white; } +.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; } +.cm-s-lesser-dark span.cm-variable-2 { color: #669199; } +.cm-s-lesser-dark span.cm-variable-3, .cm-s-lesser-dark span.cm-type { color: white; } +.cm-s-lesser-dark span.cm-property { color: #92A75C; } +.cm-s-lesser-dark span.cm-operator { color: #92A75C; } +.cm-s-lesser-dark span.cm-comment { color: #666; } +.cm-s-lesser-dark span.cm-string { color: #BCD279; } +.cm-s-lesser-dark span.cm-string-2 { color: #f50; } +.cm-s-lesser-dark span.cm-meta { color: #738C73; } +.cm-s-lesser-dark span.cm-qualifier { color: #555; } +.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; } +.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; } +.cm-s-lesser-dark span.cm-tag { color: #669199; } +.cm-s-lesser-dark span.cm-attribute { color: #81a4d5; } +.cm-s-lesser-dark span.cm-hr { color: #999; } +.cm-s-lesser-dark span.cm-link { color: #7070E6; } +.cm-s-lesser-dark span.cm-error { color: #9d1e15; } + +.cm-s-lesser-dark .CodeMirror-activeline-background { background: #3C3A3A; } +.cm-s-lesser-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } diff --git a/js/codemirror/theme/liquibyte.css b/js/codemirror/theme/liquibyte.css new file mode 100644 index 0000000..393825e --- /dev/null +++ b/js/codemirror/theme/liquibyte.css @@ -0,0 +1,95 @@ +.cm-s-liquibyte.CodeMirror { + background-color: #000; + color: #fff; + line-height: 1.2em; + font-size: 1em; +} +.cm-s-liquibyte .CodeMirror-focused .cm-matchhighlight { + text-decoration: underline; + text-decoration-color: #0f0; + text-decoration-style: wavy; +} +.cm-s-liquibyte .cm-trailingspace { + text-decoration: line-through; + text-decoration-color: #f00; + text-decoration-style: dotted; +} +.cm-s-liquibyte .cm-tab { + text-decoration: line-through; + text-decoration-color: #404040; + text-decoration-style: dotted; +} +.cm-s-liquibyte .CodeMirror-gutters { background-color: #262626; border-right: 1px solid #505050; padding-right: 0.8em; } +.cm-s-liquibyte .CodeMirror-gutter-elt div { font-size: 1.2em; } +.cm-s-liquibyte .CodeMirror-guttermarker { } +.cm-s-liquibyte .CodeMirror-guttermarker-subtle { } +.cm-s-liquibyte .CodeMirror-linenumber { color: #606060; padding-left: 0; } +.cm-s-liquibyte .CodeMirror-cursor { border-left: 1px solid #eee; } + +.cm-s-liquibyte span.cm-comment { color: #008000; } +.cm-s-liquibyte span.cm-def { color: #ffaf40; font-weight: bold; } +.cm-s-liquibyte span.cm-keyword { color: #c080ff; font-weight: bold; } +.cm-s-liquibyte span.cm-builtin { color: #ffaf40; font-weight: bold; } +.cm-s-liquibyte span.cm-variable { color: #5967ff; font-weight: bold; } +.cm-s-liquibyte span.cm-string { color: #ff8000; } +.cm-s-liquibyte span.cm-number { color: #0f0; font-weight: bold; } +.cm-s-liquibyte span.cm-atom { color: #bf3030; font-weight: bold; } + +.cm-s-liquibyte span.cm-variable-2 { color: #007f7f; font-weight: bold; } +.cm-s-liquibyte span.cm-variable-3, .cm-s-liquibyte span.cm-type { color: #c080ff; font-weight: bold; } +.cm-s-liquibyte span.cm-property { color: #999; font-weight: bold; } +.cm-s-liquibyte span.cm-operator { color: #fff; } + +.cm-s-liquibyte span.cm-meta { color: #0f0; } +.cm-s-liquibyte span.cm-qualifier { color: #fff700; font-weight: bold; } +.cm-s-liquibyte span.cm-bracket { color: #cc7; } +.cm-s-liquibyte span.cm-tag { color: #ff0; font-weight: bold; } +.cm-s-liquibyte span.cm-attribute { color: #c080ff; font-weight: bold; } +.cm-s-liquibyte span.cm-error { color: #f00; } + +.cm-s-liquibyte div.CodeMirror-selected { background-color: rgba(255, 0, 0, 0.25); } + +.cm-s-liquibyte span.cm-compilation { background-color: rgba(255, 255, 255, 0.12); } + +.cm-s-liquibyte .CodeMirror-activeline-background { background-color: rgba(0, 255, 0, 0.15); } + +/* Default styles for common addons */ +.cm-s-liquibyte .CodeMirror span.CodeMirror-matchingbracket { color: #0f0; font-weight: bold; } +.cm-s-liquibyte .CodeMirror span.CodeMirror-nonmatchingbracket { color: #f00; font-weight: bold; } +.CodeMirror-matchingtag { background-color: rgba(150, 255, 0, .3); } +/* Scrollbars */ +/* Simple */ +.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div:hover, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div:hover { + background-color: rgba(80, 80, 80, .7); +} +.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div, .cm-s-liquibyte div.CodeMirror-simplescroll-vertical div { + background-color: rgba(80, 80, 80, .3); + border: 1px solid #404040; + border-radius: 5px; +} +.cm-s-liquibyte div.CodeMirror-simplescroll-vertical div { + border-top: 1px solid #404040; + border-bottom: 1px solid #404040; +} +.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal div { + border-left: 1px solid #404040; + border-right: 1px solid #404040; +} +.cm-s-liquibyte div.CodeMirror-simplescroll-vertical { + background-color: #262626; +} +.cm-s-liquibyte div.CodeMirror-simplescroll-horizontal { + background-color: #262626; + border-top: 1px solid #404040; +} +/* Overlay */ +.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div, div.CodeMirror-overlayscroll-vertical div { + background-color: #404040; + border-radius: 5px; +} +.cm-s-liquibyte div.CodeMirror-overlayscroll-vertical div { + border: 1px solid #404040; +} +.cm-s-liquibyte div.CodeMirror-overlayscroll-horizontal div { + border: 1px solid #404040; +} diff --git a/js/codemirror/theme/lucario.css b/js/codemirror/theme/lucario.css new file mode 100644 index 0000000..17a1551 --- /dev/null +++ b/js/codemirror/theme/lucario.css @@ -0,0 +1,37 @@ +/* + Name: lucario + Author: Raphael Amorim + + Original Lucario color scheme (https://github.com/raphamorim/lucario) +*/ + +.cm-s-lucario.CodeMirror, .cm-s-lucario .CodeMirror-gutters { + background-color: #2b3e50 !important; + color: #f8f8f2 !important; + border: none; +} +.cm-s-lucario .CodeMirror-gutters { color: #2b3e50; } +.cm-s-lucario .CodeMirror-cursor { border-left: solid thin #E6C845; } +.cm-s-lucario .CodeMirror-linenumber { color: #f8f8f2; } +.cm-s-lucario .CodeMirror-selected { background: #243443; } +.cm-s-lucario .CodeMirror-line::selection, .cm-s-lucario .CodeMirror-line > span::selection, .cm-s-lucario .CodeMirror-line > span > span::selection { background: #243443; } +.cm-s-lucario .CodeMirror-line::-moz-selection, .cm-s-lucario .CodeMirror-line > span::-moz-selection, .cm-s-lucario .CodeMirror-line > span > span::-moz-selection { background: #243443; } +.cm-s-lucario span.cm-comment { color: #5c98cd; } +.cm-s-lucario span.cm-string, .cm-s-lucario span.cm-string-2 { color: #E6DB74; } +.cm-s-lucario span.cm-number { color: #ca94ff; } +.cm-s-lucario span.cm-variable { color: #f8f8f2; } +.cm-s-lucario span.cm-variable-2 { color: #f8f8f2; } +.cm-s-lucario span.cm-def { color: #72C05D; } +.cm-s-lucario span.cm-operator { color: #66D9EF; } +.cm-s-lucario span.cm-keyword { color: #ff6541; } +.cm-s-lucario span.cm-atom { color: #bd93f9; } +.cm-s-lucario span.cm-meta { color: #f8f8f2; } +.cm-s-lucario span.cm-tag { color: #ff6541; } +.cm-s-lucario span.cm-attribute { color: #66D9EF; } +.cm-s-lucario span.cm-qualifier { color: #72C05D; } +.cm-s-lucario span.cm-property { color: #f8f8f2; } +.cm-s-lucario span.cm-builtin { color: #72C05D; } +.cm-s-lucario span.cm-variable-3, .cm-s-lucario span.cm-type { color: #ffb86c; } + +.cm-s-lucario .CodeMirror-activeline-background { background: #243443; } +.cm-s-lucario .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/material-darker.css b/js/codemirror/theme/material-darker.css new file mode 100644 index 0000000..45b64ef --- /dev/null +++ b/js/codemirror/theme/material-darker.css @@ -0,0 +1,135 @@ +/* + Name: material + Author: Mattia Astorino (http://github.com/equinusocio) + Website: https://material-theme.site/ +*/ + +.cm-s-material-darker.CodeMirror { + background-color: #212121; + color: #EEFFFF; +} + +.cm-s-material-darker .CodeMirror-gutters { + background: #212121; + color: #545454; + border: none; +} + +.cm-s-material-darker .CodeMirror-guttermarker, +.cm-s-material-darker .CodeMirror-guttermarker-subtle, +.cm-s-material-darker .CodeMirror-linenumber { + color: #545454; +} + +.cm-s-material-darker .CodeMirror-cursor { + border-left: 1px solid #FFCC00; +} + +.cm-s-material-darker div.CodeMirror-selected { + background: rgba(97, 97, 97, 0.2); +} + +.cm-s-material-darker.CodeMirror-focused div.CodeMirror-selected { + background: rgba(97, 97, 97, 0.2); +} + +.cm-s-material-darker .CodeMirror-line::selection, +.cm-s-material-darker .CodeMirror-line>span::selection, +.cm-s-material-darker .CodeMirror-line>span>span::selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material-darker .CodeMirror-line::-moz-selection, +.cm-s-material-darker .CodeMirror-line>span::-moz-selection, +.cm-s-material-darker .CodeMirror-line>span>span::-moz-selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material-darker .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0.5); +} + +.cm-s-material-darker .cm-keyword { + color: #C792EA; +} + +.cm-s-material-darker .cm-operator { + color: #89DDFF; +} + +.cm-s-material-darker .cm-variable-2 { + color: #EEFFFF; +} + +.cm-s-material-darker .cm-variable-3, +.cm-s-material-darker .cm-type { + color: #f07178; +} + +.cm-s-material-darker .cm-builtin { + color: #FFCB6B; +} + +.cm-s-material-darker .cm-atom { + color: #F78C6C; +} + +.cm-s-material-darker .cm-number { + color: #FF5370; +} + +.cm-s-material-darker .cm-def { + color: #82AAFF; +} + +.cm-s-material-darker .cm-string { + color: #C3E88D; +} + +.cm-s-material-darker .cm-string-2 { + color: #f07178; +} + +.cm-s-material-darker .cm-comment { + color: #545454; +} + +.cm-s-material-darker .cm-variable { + color: #f07178; +} + +.cm-s-material-darker .cm-tag { + color: #FF5370; +} + +.cm-s-material-darker .cm-meta { + color: #FFCB6B; +} + +.cm-s-material-darker .cm-attribute { + color: #C792EA; +} + +.cm-s-material-darker .cm-property { + color: #C792EA; +} + +.cm-s-material-darker .cm-qualifier { + color: #DECB6B; +} + +.cm-s-material-darker .cm-variable-3, +.cm-s-material-darker .cm-type { + color: #DECB6B; +} + + +.cm-s-material-darker .cm-error { + color: rgba(255, 255, 255, 1.0); + background-color: #FF5370; +} + +.cm-s-material-darker .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} \ No newline at end of file diff --git a/js/codemirror/theme/material-ocean.css b/js/codemirror/theme/material-ocean.css new file mode 100644 index 0000000..404178d --- /dev/null +++ b/js/codemirror/theme/material-ocean.css @@ -0,0 +1,141 @@ +/* + Name: material + Author: Mattia Astorino (http://github.com/equinusocio) + Website: https://material-theme.site/ +*/ + +.cm-s-material-ocean.CodeMirror { + background-color: #0F111A; + color: #8F93A2; +} + +.cm-s-material-ocean .CodeMirror-gutters { + background: #0F111A; + color: #464B5D; + border: none; +} + +.cm-s-material-ocean .CodeMirror-guttermarker, +.cm-s-material-ocean .CodeMirror-guttermarker-subtle, +.cm-s-material-ocean .CodeMirror-linenumber { + color: #464B5D; +} + +.cm-s-material-ocean .CodeMirror-cursor { + border-left: 1px solid #FFCC00; +} +.cm-s-material-ocean.cm-fat-cursor .CodeMirror-cursor { + background-color: #a2a8a175 !important; +} +.cm-s-material-ocean .cm-animate-fat-cursor { + background-color: #a2a8a175 !important; +} + +.cm-s-material-ocean div.CodeMirror-selected { + background: rgba(113, 124, 180, 0.2); +} + +.cm-s-material-ocean.CodeMirror-focused div.CodeMirror-selected { + background: rgba(113, 124, 180, 0.2); +} + +.cm-s-material-ocean .CodeMirror-line::selection, +.cm-s-material-ocean .CodeMirror-line>span::selection, +.cm-s-material-ocean .CodeMirror-line>span>span::selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material-ocean .CodeMirror-line::-moz-selection, +.cm-s-material-ocean .CodeMirror-line>span::-moz-selection, +.cm-s-material-ocean .CodeMirror-line>span>span::-moz-selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material-ocean .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0.5); +} + +.cm-s-material-ocean .cm-keyword { + color: #C792EA; +} + +.cm-s-material-ocean .cm-operator { + color: #89DDFF; +} + +.cm-s-material-ocean .cm-variable-2 { + color: #EEFFFF; +} + +.cm-s-material-ocean .cm-variable-3, +.cm-s-material-ocean .cm-type { + color: #f07178; +} + +.cm-s-material-ocean .cm-builtin { + color: #FFCB6B; +} + +.cm-s-material-ocean .cm-atom { + color: #F78C6C; +} + +.cm-s-material-ocean .cm-number { + color: #FF5370; +} + +.cm-s-material-ocean .cm-def { + color: #82AAFF; +} + +.cm-s-material-ocean .cm-string { + color: #C3E88D; +} + +.cm-s-material-ocean .cm-string-2 { + color: #f07178; +} + +.cm-s-material-ocean .cm-comment { + color: #464B5D; +} + +.cm-s-material-ocean .cm-variable { + color: #f07178; +} + +.cm-s-material-ocean .cm-tag { + color: #FF5370; +} + +.cm-s-material-ocean .cm-meta { + color: #FFCB6B; +} + +.cm-s-material-ocean .cm-attribute { + color: #C792EA; +} + +.cm-s-material-ocean .cm-property { + color: #C792EA; +} + +.cm-s-material-ocean .cm-qualifier { + color: #DECB6B; +} + +.cm-s-material-ocean .cm-variable-3, +.cm-s-material-ocean .cm-type { + color: #DECB6B; +} + + +.cm-s-material-ocean .cm-error { + color: rgba(255, 255, 255, 1.0); + background-color: #FF5370; +} + +.cm-s-material-ocean .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/material-palenight.css b/js/codemirror/theme/material-palenight.css new file mode 100644 index 0000000..6712c43 --- /dev/null +++ b/js/codemirror/theme/material-palenight.css @@ -0,0 +1,141 @@ +/* + Name: material + Author: Mattia Astorino (http://github.com/equinusocio) + Website: https://material-theme.site/ +*/ + +.cm-s-material-palenight.CodeMirror { + background-color: #292D3E; + color: #A6ACCD; +} + +.cm-s-material-palenight .CodeMirror-gutters { + background: #292D3E; + color: #676E95; + border: none; +} + +.cm-s-material-palenight .CodeMirror-guttermarker, +.cm-s-material-palenight .CodeMirror-guttermarker-subtle, +.cm-s-material-palenight .CodeMirror-linenumber { + color: #676E95; +} + +.cm-s-material-palenight .CodeMirror-cursor { + border-left: 1px solid #FFCC00; +} +.cm-s-material-palenight.cm-fat-cursor .CodeMirror-cursor { + background-color: #607c8b80 !important; +} +.cm-s-material-palenight .cm-animate-fat-cursor { + background-color: #607c8b80 !important; +} + +.cm-s-material-palenight div.CodeMirror-selected { + background: rgba(113, 124, 180, 0.2); +} + +.cm-s-material-palenight.CodeMirror-focused div.CodeMirror-selected { + background: rgba(113, 124, 180, 0.2); +} + +.cm-s-material-palenight .CodeMirror-line::selection, +.cm-s-material-palenight .CodeMirror-line>span::selection, +.cm-s-material-palenight .CodeMirror-line>span>span::selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material-palenight .CodeMirror-line::-moz-selection, +.cm-s-material-palenight .CodeMirror-line>span::-moz-selection, +.cm-s-material-palenight .CodeMirror-line>span>span::-moz-selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material-palenight .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0.5); +} + +.cm-s-material-palenight .cm-keyword { + color: #C792EA; +} + +.cm-s-material-palenight .cm-operator { + color: #89DDFF; +} + +.cm-s-material-palenight .cm-variable-2 { + color: #EEFFFF; +} + +.cm-s-material-palenight .cm-variable-3, +.cm-s-material-palenight .cm-type { + color: #f07178; +} + +.cm-s-material-palenight .cm-builtin { + color: #FFCB6B; +} + +.cm-s-material-palenight .cm-atom { + color: #F78C6C; +} + +.cm-s-material-palenight .cm-number { + color: #FF5370; +} + +.cm-s-material-palenight .cm-def { + color: #82AAFF; +} + +.cm-s-material-palenight .cm-string { + color: #C3E88D; +} + +.cm-s-material-palenight .cm-string-2 { + color: #f07178; +} + +.cm-s-material-palenight .cm-comment { + color: #676E95; +} + +.cm-s-material-palenight .cm-variable { + color: #f07178; +} + +.cm-s-material-palenight .cm-tag { + color: #FF5370; +} + +.cm-s-material-palenight .cm-meta { + color: #FFCB6B; +} + +.cm-s-material-palenight .cm-attribute { + color: #C792EA; +} + +.cm-s-material-palenight .cm-property { + color: #C792EA; +} + +.cm-s-material-palenight .cm-qualifier { + color: #DECB6B; +} + +.cm-s-material-palenight .cm-variable-3, +.cm-s-material-palenight .cm-type { + color: #DECB6B; +} + + +.cm-s-material-palenight .cm-error { + color: rgba(255, 255, 255, 1.0); + background-color: #FF5370; +} + +.cm-s-material-palenight .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/material.css b/js/codemirror/theme/material.css new file mode 100644 index 0000000..a784849 --- /dev/null +++ b/js/codemirror/theme/material.css @@ -0,0 +1,141 @@ +/* + Name: material + Author: Mattia Astorino (http://github.com/equinusocio) + Website: https://material-theme.site/ +*/ + +.cm-s-material.CodeMirror { + background-color: #263238; + color: #EEFFFF; +} + +.cm-s-material .CodeMirror-gutters { + background: #263238; + color: #546E7A; + border: none; +} + +.cm-s-material .CodeMirror-guttermarker, +.cm-s-material .CodeMirror-guttermarker-subtle, +.cm-s-material .CodeMirror-linenumber { + color: #546E7A; +} + +.cm-s-material .CodeMirror-cursor { + border-left: 1px solid #FFCC00; +} +.cm-s-material.cm-fat-cursor .CodeMirror-cursor { + background-color: #5d6d5c80 !important; +} +.cm-s-material .cm-animate-fat-cursor { + background-color: #5d6d5c80 !important; +} + +.cm-s-material div.CodeMirror-selected { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material.CodeMirror-focused div.CodeMirror-selected { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material .CodeMirror-line::selection, +.cm-s-material .CodeMirror-line>span::selection, +.cm-s-material .CodeMirror-line>span>span::selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material .CodeMirror-line::-moz-selection, +.cm-s-material .CodeMirror-line>span::-moz-selection, +.cm-s-material .CodeMirror-line>span>span::-moz-selection { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-material .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0.5); +} + +.cm-s-material .cm-keyword { + color: #C792EA; +} + +.cm-s-material .cm-operator { + color: #89DDFF; +} + +.cm-s-material .cm-variable-2 { + color: #EEFFFF; +} + +.cm-s-material .cm-variable-3, +.cm-s-material .cm-type { + color: #f07178; +} + +.cm-s-material .cm-builtin { + color: #FFCB6B; +} + +.cm-s-material .cm-atom { + color: #F78C6C; +} + +.cm-s-material .cm-number { + color: #FF5370; +} + +.cm-s-material .cm-def { + color: #82AAFF; +} + +.cm-s-material .cm-string { + color: #C3E88D; +} + +.cm-s-material .cm-string-2 { + color: #f07178; +} + +.cm-s-material .cm-comment { + color: #546E7A; +} + +.cm-s-material .cm-variable { + color: #f07178; +} + +.cm-s-material .cm-tag { + color: #FF5370; +} + +.cm-s-material .cm-meta { + color: #FFCB6B; +} + +.cm-s-material .cm-attribute { + color: #C792EA; +} + +.cm-s-material .cm-property { + color: #C792EA; +} + +.cm-s-material .cm-qualifier { + color: #DECB6B; +} + +.cm-s-material .cm-variable-3, +.cm-s-material .cm-type { + color: #DECB6B; +} + + +.cm-s-material .cm-error { + color: rgba(255, 255, 255, 1.0); + background-color: #FF5370; +} + +.cm-s-material .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/mbo.css b/js/codemirror/theme/mbo.css new file mode 100644 index 0000000..e164fcf --- /dev/null +++ b/js/codemirror/theme/mbo.css @@ -0,0 +1,37 @@ +/****************************************************************/ +/* Based on mbonaci's Brackets mbo theme */ +/* https://github.com/mbonaci/global/blob/master/Mbo.tmTheme */ +/* Create your own: http://tmtheme-editor.herokuapp.com */ +/****************************************************************/ + +.cm-s-mbo.CodeMirror { background: #2c2c2c; color: #ffffec; } +.cm-s-mbo div.CodeMirror-selected { background: #716C62; } +.cm-s-mbo .CodeMirror-line::selection, .cm-s-mbo .CodeMirror-line > span::selection, .cm-s-mbo .CodeMirror-line > span > span::selection { background: rgba(113, 108, 98, .99); } +.cm-s-mbo .CodeMirror-line::-moz-selection, .cm-s-mbo .CodeMirror-line > span::-moz-selection, .cm-s-mbo .CodeMirror-line > span > span::-moz-selection { background: rgba(113, 108, 98, .99); } +.cm-s-mbo .CodeMirror-gutters { background: #4e4e4e; border-right: 0px; } +.cm-s-mbo .CodeMirror-guttermarker { color: white; } +.cm-s-mbo .CodeMirror-guttermarker-subtle { color: grey; } +.cm-s-mbo .CodeMirror-linenumber { color: #dadada; } +.cm-s-mbo .CodeMirror-cursor { border-left: 1px solid #ffffec; } + +.cm-s-mbo span.cm-comment { color: #95958a; } +.cm-s-mbo span.cm-atom { color: #00a8c6; } +.cm-s-mbo span.cm-number { color: #00a8c6; } + +.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute { color: #9ddfe9; } +.cm-s-mbo span.cm-keyword { color: #ffb928; } +.cm-s-mbo span.cm-string { color: #ffcf6c; } +.cm-s-mbo span.cm-string.cm-property { color: #ffffec; } + +.cm-s-mbo span.cm-variable { color: #ffffec; } +.cm-s-mbo span.cm-variable-2 { color: #00a8c6; } +.cm-s-mbo span.cm-def { color: #ffffec; } +.cm-s-mbo span.cm-bracket { color: #fffffc; font-weight: bold; } +.cm-s-mbo span.cm-tag { color: #9ddfe9; } +.cm-s-mbo span.cm-link { color: #f54b07; } +.cm-s-mbo span.cm-error { border-bottom: #636363; color: #ffffec; } +.cm-s-mbo span.cm-qualifier { color: #ffffec; } + +.cm-s-mbo .CodeMirror-activeline-background { background: #494b41; } +.cm-s-mbo .CodeMirror-matchingbracket { color: #ffb928 !important; } +.cm-s-mbo .CodeMirror-matchingtag { background: rgba(255, 255, 255, .37); } diff --git a/js/codemirror/theme/mdn-like.css b/js/codemirror/theme/mdn-like.css new file mode 100644 index 0000000..622ed3e --- /dev/null +++ b/js/codemirror/theme/mdn-like.css @@ -0,0 +1,46 @@ +/* + MDN-LIKE Theme - Mozilla + Ported to CodeMirror by Peter Kroon + Report bugs/issues here: https://github.com/codemirror/CodeMirror/issues + GitHub: @peterkroon + + The mdn-like theme is inspired on the displayed code examples at: https://developer.mozilla.org/en-US/docs/Web/CSS/animation + +*/ +.cm-s-mdn-like.CodeMirror { color: #999; background-color: #fff; } +.cm-s-mdn-like div.CodeMirror-selected { background: #cfc; } +.cm-s-mdn-like .CodeMirror-line::selection, .cm-s-mdn-like .CodeMirror-line > span::selection, .cm-s-mdn-like .CodeMirror-line > span > span::selection { background: #cfc; } +.cm-s-mdn-like .CodeMirror-line::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span::-moz-selection, .cm-s-mdn-like .CodeMirror-line > span > span::-moz-selection { background: #cfc; } + +.cm-s-mdn-like .CodeMirror-gutters { background: #f8f8f8; border-left: 6px solid rgba(0,83,159,0.65); color: #333; } +.cm-s-mdn-like .CodeMirror-linenumber { color: #aaa; padding-left: 8px; } +.cm-s-mdn-like .CodeMirror-cursor { border-left: 2px solid #222; } + +.cm-s-mdn-like .cm-keyword { color: #6262FF; } +.cm-s-mdn-like .cm-atom { color: #F90; } +.cm-s-mdn-like .cm-number { color: #ca7841; } +.cm-s-mdn-like .cm-def { color: #8DA6CE; } +.cm-s-mdn-like span.cm-variable-2, .cm-s-mdn-like span.cm-tag { color: #690; } +.cm-s-mdn-like span.cm-variable-3, .cm-s-mdn-like span.cm-def, .cm-s-mdn-like span.cm-type { color: #07a; } + +.cm-s-mdn-like .cm-variable { color: #07a; } +.cm-s-mdn-like .cm-property { color: #905; } +.cm-s-mdn-like .cm-qualifier { color: #690; } + +.cm-s-mdn-like .cm-operator { color: #cda869; } +.cm-s-mdn-like .cm-comment { color:#777; font-weight:normal; } +.cm-s-mdn-like .cm-string { color:#07a; font-style:italic; } +.cm-s-mdn-like .cm-string-2 { color:#bd6b18; } /*?*/ +.cm-s-mdn-like .cm-meta { color: #000; } /*?*/ +.cm-s-mdn-like .cm-builtin { color: #9B7536; } /*?*/ +.cm-s-mdn-like .cm-tag { color: #997643; } +.cm-s-mdn-like .cm-attribute { color: #d6bb6d; } /*?*/ +.cm-s-mdn-like .cm-header { color: #FF6400; } +.cm-s-mdn-like .cm-hr { color: #AEAEAE; } +.cm-s-mdn-like .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } +.cm-s-mdn-like .cm-error { border-bottom: 1px solid red; } + +div.cm-s-mdn-like .CodeMirror-activeline-background { background: #efefff; } +div.cm-s-mdn-like span.CodeMirror-matchingbracket { outline:1px solid grey; color: inherit; } + +.cm-s-mdn-like.CodeMirror { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAAAyCAYAAAAp8UeFAAAHvklEQVR42s2b63bcNgyEQZCSHCdt2vd/0tWF7I+Q6XgMXiTtuvU5Pl57ZQKkKHzEAOtF5KeIJBGJ8uvL599FRFREZhFx8DeXv8trn68RuGaC8TRfo3SNp9dlDDHedyLyTUTeRWStXKPZrjtpZxaRw5hPqozRs1N8/enzIiQRWcCgy4MUA0f+XWliDhyL8Lfyvx7ei/Ae3iQFHyw7U/59pQVIMEEPEz0G7XiwdRjzSfC3UTtz9vchIntxvry5iMgfIhJoEflOz2CQr3F5h/HfeFe+GTdLaKcu9L8LTeQb/R/7GgbsfKedyNdoHsN31uRPWrfZ5wsj/NzzRQHuToIdU3ahwnsKPxXCjJITuOsi7XLc7SG/v5GdALs7wf8JjTFiB5+QvTEfRyGOfX3Lrx8wxyQi3sNq46O7QahQiCsRFgqddjBouVEHOKDgXAQHD9gJCr5sMKkEdjwsarG/ww3BMHBU7OBjXnzdyY7SfCxf5/z6ATccrwlKuwC/jhznnPF4CgVzhhVf4xp2EixcBActO75iZ8/fM9zAs2OMzKdslgXWJ9XG8PQoOAMA5fGcsvORgv0doBXyHrCwfLJAOwo71QLNkb8n2Pl6EWiR7OCibtkPaz4Kc/0NNAze2gju3zOwekALDaCFPI5vjPFmgGY5AZqyGEvH1x7QfIb8YtxMnA/b+QQ0aQDAwc6JMFg8CbQZ4qoYEEHbRwNojuK3EHwd7VALSgq+MNDKzfT58T8qdpADrgW0GmgcAS1lhzztJmkAzcPNOQbsWEALBDSlMKUG0Eq4CLAQWvEVQ9WU57gZJwZtgPO3r9oBTQ9WO8TjqXINx8R0EYpiZEUWOF3FxkbJkgU9B2f41YBrIj5ZfsQa0M5kTgiAAqM3ShXLgu8XMqcrQBvJ0CL5pnTsfMB13oB8athpAq2XOQmcGmoACCLydx7nToa23ATaSIY2ichfOdPTGxlasXMLaL0MLZAOwAKIM+y8CmicobGdCcbbK9DzN+yYGVoNNI5iUKTMyYOjPse4A8SM1MmcXgU0toOq1yO/v8FOxlASyc7TgeYaAMBJHcY1CcCwGI/TK4AmDbDyKYBBtFUkRwto8gygiQEaByFgJ00BH2M8JWwQS1nafDXQCidWyOI8AcjDCSjCLk8ngObuAm3JAHAdubAmOaK06V8MNEsKPJOhobSprwQa6gD7DclRQdqcwL4zxqgBrQcabUiBLclRDKAlWp+etPkBaNMA0AKlrHwTdEByZAA4GM+SNluSY6wAzcMNewxmgig5Ks0nkrSpBvSaQHMdKTBAnLojOdYyGpQ254602ZILPdTD1hdlggdIm74jbTp8vDwF5ZYUeLWGJpWsh6XNyXgcYwVoJQTEhhTYkxzZjiU5npU2TaB979TQehlaAVq4kaGpiPwwwLkYUuBbQwocyQTv1tA0+1UFWoJF3iv1oq+qoSk8EQdJmwHkziIF7oOZk14EGitibAdjLYYK78H5vZOhtWpoI0ATGHs0Q8OMb4Ey+2bU2UYztCtA0wFAs7TplGLRVQCcqaFdGSPCeTI1QNIC52iWNzof6Uib7xjEp07mNNoUYmVosVItHrHzRlLgBn9LFyRHaQCtVUMbtTNhoXWiTOO9k/V8BdAc1Oq0ArSQs6/5SU0hckNy9NnXqQY0PGYo5dWJ7nINaN6o958FWin27aBaWRka1r5myvLOAm0j30eBJqCxHLReVclxhxOEN2JfDWjxBtAC7MIH1fVaGdoOp4qJYDgKtKPSFNID2gSnGldrCqkFZ+5UeQXQBIRrSwocbdZYQT/2LwRahBPBXoHrB8nxaGROST62DKUbQOMMzZIC9abkuELfQzQALWTnDNAm8KHWFOJgJ5+SHIvTPcmx1xQyZRhNL5Qci689aXMEaN/uNIWkEwDAvFpOZmgsBaaGnbs1NPa1Jm32gBZAIh1pCtG7TSH4aE0y1uVY4uqoFPisGlpP2rSA5qTecWn5agK6BzSpgAyD+wFaqhnYoSZ1Vwr8CmlTQbrcO3ZaX0NAEyMbYaAlyquFoLKK3SPby9CeVUPThrSJmkCAE0CrKUQadi4DrdSlWhmah0YL9z9vClH59YGbHx1J8VZTyAjQepJjmXwAKTDQI3omc3p1U4gDUf6RfcdYfrUp5ClAi2J3Ba6UOXGo+K+bQrjjssitG2SJzshaLwMtXgRagUNpYYoVkMSBLM+9GGiJZMvduG6DRZ4qc04DMPtQQxOjEtACmhO7K1AbNbQDEggZyJwscFpAGwENhoBeUwh3bWolhe8BTYVKxQEWrSUn/uhcM5KhvUu/+eQu0Lzhi+VrK0PrZZNDQKs9cpYUuFYgMVpD4/NxenJTiMCNqdUEUf1qZWjppLT5qSkkUZbCwkbZMSuVnu80hfSkzRbQeqCZSAh6huR4VtoM2gHAlLf72smuWgE+VV7XpE25Ab2WFDgyhnSuKbs4GuGzCjR+tIoUuMFg3kgcWKLTwRqanJQ2W00hAsenfaApRC42hbCvK1SlE0HtE9BGgneJO+ELamitD1YjjOYnNYVcraGhtKkW0EqVVeDx733I2NH581k1NNxNLG0i0IJ8/NjVaOZ0tYZ2Vtr0Xv7tPV3hkWp9EFkgS/J0vosngTaSoaG06WHi+xObQkaAdlbanP8B2+2l0f90LmUAAAAASUVORK5CYII=); } diff --git a/js/codemirror/theme/midnight.css b/js/codemirror/theme/midnight.css new file mode 100644 index 0000000..fc26474 --- /dev/null +++ b/js/codemirror/theme/midnight.css @@ -0,0 +1,39 @@ +/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */ + +/**/ +.cm-s-midnight .CodeMirror-activeline-background { background: #253540; } + +.cm-s-midnight.CodeMirror { + background: #0F192A; + color: #D1EDFF; +} + +.cm-s-midnight div.CodeMirror-selected { background: #314D67; } +.cm-s-midnight .CodeMirror-line::selection, .cm-s-midnight .CodeMirror-line > span::selection, .cm-s-midnight .CodeMirror-line > span > span::selection { background: rgba(49, 77, 103, .99); } +.cm-s-midnight .CodeMirror-line::-moz-selection, .cm-s-midnight .CodeMirror-line > span::-moz-selection, .cm-s-midnight .CodeMirror-line > span > span::-moz-selection { background: rgba(49, 77, 103, .99); } +.cm-s-midnight .CodeMirror-gutters { background: #0F192A; border-right: 1px solid; } +.cm-s-midnight .CodeMirror-guttermarker { color: white; } +.cm-s-midnight .CodeMirror-guttermarker-subtle { color: #d0d0d0; } +.cm-s-midnight .CodeMirror-linenumber { color: #D0D0D0; } +.cm-s-midnight .CodeMirror-cursor { border-left: 1px solid #F8F8F0; } + +.cm-s-midnight span.cm-comment { color: #428BDD; } +.cm-s-midnight span.cm-atom { color: #AE81FF; } +.cm-s-midnight span.cm-number { color: #D1EDFF; } + +.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute { color: #A6E22E; } +.cm-s-midnight span.cm-keyword { color: #E83737; } +.cm-s-midnight span.cm-string { color: #1DC116; } + +.cm-s-midnight span.cm-variable { color: #FFAA3E; } +.cm-s-midnight span.cm-variable-2 { color: #FFAA3E; } +.cm-s-midnight span.cm-def { color: #4DD; } +.cm-s-midnight span.cm-bracket { color: #D1EDFF; } +.cm-s-midnight span.cm-tag { color: #449; } +.cm-s-midnight span.cm-link { color: #AE81FF; } +.cm-s-midnight span.cm-error { background: #F92672; color: #F8F8F0; } + +.cm-s-midnight .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/monokai.css b/js/codemirror/theme/monokai.css new file mode 100644 index 0000000..cd4cd55 --- /dev/null +++ b/js/codemirror/theme/monokai.css @@ -0,0 +1,41 @@ +/* Based on Sublime Text's Monokai theme */ + +.cm-s-monokai.CodeMirror { background: #272822; color: #f8f8f2; } +.cm-s-monokai div.CodeMirror-selected { background: #49483E; } +.cm-s-monokai .CodeMirror-line::selection, .cm-s-monokai .CodeMirror-line > span::selection, .cm-s-monokai .CodeMirror-line > span > span::selection { background: rgba(73, 72, 62, .99); } +.cm-s-monokai .CodeMirror-line::-moz-selection, .cm-s-monokai .CodeMirror-line > span::-moz-selection, .cm-s-monokai .CodeMirror-line > span > span::-moz-selection { background: rgba(73, 72, 62, .99); } +.cm-s-monokai .CodeMirror-gutters { background: #272822; border-right: 0px; } +.cm-s-monokai .CodeMirror-guttermarker { color: white; } +.cm-s-monokai .CodeMirror-guttermarker-subtle { color: #d0d0d0; } +.cm-s-monokai .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-monokai .CodeMirror-cursor { border-left: 1px solid #f8f8f0; } + +.cm-s-monokai span.cm-comment { color: #75715e; } +.cm-s-monokai span.cm-atom { color: #ae81ff; } +.cm-s-monokai span.cm-number { color: #ae81ff; } + +.cm-s-monokai span.cm-comment.cm-attribute { color: #97b757; } +.cm-s-monokai span.cm-comment.cm-def { color: #bc9262; } +.cm-s-monokai span.cm-comment.cm-tag { color: #bc6283; } +.cm-s-monokai span.cm-comment.cm-type { color: #5998a6; } + +.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute { color: #a6e22e; } +.cm-s-monokai span.cm-keyword { color: #f92672; } +.cm-s-monokai span.cm-builtin { color: #66d9ef; } +.cm-s-monokai span.cm-string { color: #e6db74; } + +.cm-s-monokai span.cm-variable { color: #f8f8f2; } +.cm-s-monokai span.cm-variable-2 { color: #9effff; } +.cm-s-monokai span.cm-variable-3, .cm-s-monokai span.cm-type { color: #66d9ef; } +.cm-s-monokai span.cm-def { color: #fd971f; } +.cm-s-monokai span.cm-bracket { color: #f8f8f2; } +.cm-s-monokai span.cm-tag { color: #f92672; } +.cm-s-monokai span.cm-header { color: #ae81ff; } +.cm-s-monokai span.cm-link { color: #ae81ff; } +.cm-s-monokai span.cm-error { background: #f92672; color: #f8f8f0; } + +.cm-s-monokai .CodeMirror-activeline-background { background: #373831; } +.cm-s-monokai .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/moxer.css b/js/codemirror/theme/moxer.css new file mode 100644 index 0000000..b3ca35e --- /dev/null +++ b/js/codemirror/theme/moxer.css @@ -0,0 +1,143 @@ +/* + Name: Moxer Theme + Author: Mattia Astorino (http://github.com/equinusocio) + Website: https://github.com/moxer-theme/moxer-code +*/ + +.cm-s-moxer.CodeMirror { + background-color: #090A0F; + color: #8E95B4; + line-height: 1.8; +} + +.cm-s-moxer .CodeMirror-gutters { + background: #090A0F; + color: #35394B; + border: none; +} + +.cm-s-moxer .CodeMirror-guttermarker, +.cm-s-moxer .CodeMirror-guttermarker-subtle, +.cm-s-moxer .CodeMirror-linenumber { + color: #35394B; +} + + +.cm-s-moxer .CodeMirror-cursor { + border-left: 1px solid #FFCC00; +} + +.cm-s-moxer div.CodeMirror-selected { + background: rgba(128, 203, 196, 0.2); +} + +.cm-s-moxer.CodeMirror-focused div.CodeMirror-selected { + background: #212431; +} + +.cm-s-moxer .CodeMirror-line::selection, +.cm-s-moxer .CodeMirror-line>span::selection, +.cm-s-moxer .CodeMirror-line>span>span::selection { + background: #212431; +} + +.cm-s-moxer .CodeMirror-line::-moz-selection, +.cm-s-moxer .CodeMirror-line>span::-moz-selection, +.cm-s-moxer .CodeMirror-line>span>span::-moz-selection { + background: #212431; +} + +.cm-s-moxer .CodeMirror-activeline-background, +.cm-s-moxer .CodeMirror-activeline-gutter .CodeMirror-linenumber { + background: rgba(33, 36, 49, 0.5); +} + +.cm-s-moxer .cm-keyword { + color: #D46C6C; +} + +.cm-s-moxer .cm-operator { + color: #D46C6C; +} + +.cm-s-moxer .cm-variable-2 { + color: #81C5DA; +} + + +.cm-s-moxer .cm-variable-3, +.cm-s-moxer .cm-type { + color: #f07178; +} + +.cm-s-moxer .cm-builtin { + color: #FFCB6B; +} + +.cm-s-moxer .cm-atom { + color: #A99BE2; +} + +.cm-s-moxer .cm-number { + color: #7CA4C0; +} + +.cm-s-moxer .cm-def { + color: #F5DFA5; +} + +.cm-s-moxer .CodeMirror-line .cm-def ~ .cm-def { + color: #81C5DA; +} + +.cm-s-moxer .cm-string { + color: #B2E4AE; +} + +.cm-s-moxer .cm-string-2 { + color: #f07178; +} + +.cm-s-moxer .cm-comment { + color: #3F445A; +} + +.cm-s-moxer .cm-variable { + color: #8E95B4; +} + +.cm-s-moxer .cm-tag { + color: #FF5370; +} + +.cm-s-moxer .cm-meta { + color: #FFCB6B; +} + +.cm-s-moxer .cm-attribute { + color: #C792EA; +} + +.cm-s-moxer .cm-property { + color: #81C5DA; +} + +.cm-s-moxer .cm-qualifier { + color: #DECB6B; +} + +.cm-s-moxer .cm-variable-3, +.cm-s-moxer .cm-type { + color: #DECB6B; +} + + +.cm-s-moxer .cm-error { + color: rgba(255, 255, 255, 1.0); + background-color: #FF5370; +} + +.cm-s-moxer .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} \ No newline at end of file diff --git a/js/codemirror/theme/neat.css b/js/codemirror/theme/neat.css new file mode 100644 index 0000000..4267b1a --- /dev/null +++ b/js/codemirror/theme/neat.css @@ -0,0 +1,12 @@ +.cm-s-neat span.cm-comment { color: #a86; } +.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } +.cm-s-neat span.cm-string { color: #a22; } +.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } +.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } +.cm-s-neat span.cm-variable { color: black; } +.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } +.cm-s-neat span.cm-meta { color: #555; } +.cm-s-neat span.cm-link { color: #3a3; } + +.cm-s-neat .CodeMirror-activeline-background { background: #e8f2ff; } +.cm-s-neat .CodeMirror-matchingbracket { outline:1px solid grey; color:black !important; } diff --git a/js/codemirror/theme/neo.css b/js/codemirror/theme/neo.css new file mode 100644 index 0000000..b28d5c6 --- /dev/null +++ b/js/codemirror/theme/neo.css @@ -0,0 +1,43 @@ +/* neo theme for codemirror */ + +/* Color scheme */ + +.cm-s-neo.CodeMirror { + background-color:#ffffff; + color:#2e383c; + line-height:1.4375; +} +.cm-s-neo .cm-comment { color:#75787b; } +.cm-s-neo .cm-keyword, .cm-s-neo .cm-property { color:#1d75b3; } +.cm-s-neo .cm-atom,.cm-s-neo .cm-number { color:#75438a; } +.cm-s-neo .cm-node,.cm-s-neo .cm-tag { color:#9c3328; } +.cm-s-neo .cm-string { color:#b35e14; } +.cm-s-neo .cm-variable,.cm-s-neo .cm-qualifier { color:#047d65; } + + +/* Editor styling */ + +.cm-s-neo pre { + padding:0; +} + +.cm-s-neo .CodeMirror-gutters { + border:none; + border-right:10px solid transparent; + background-color:transparent; +} + +.cm-s-neo .CodeMirror-linenumber { + padding:0; + color:#e0e2e5; +} + +.cm-s-neo .CodeMirror-guttermarker { color: #1d75b3; } +.cm-s-neo .CodeMirror-guttermarker-subtle { color: #e0e2e5; } + +.cm-s-neo .CodeMirror-cursor { + width: auto; + border: 0; + background: rgba(155,157,162,0.37); + z-index: 1; +} diff --git a/js/codemirror/theme/night.css b/js/codemirror/theme/night.css new file mode 100644 index 0000000..f631bf4 --- /dev/null +++ b/js/codemirror/theme/night.css @@ -0,0 +1,27 @@ +/* Loosely based on the Midnight Textmate theme */ + +.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; } +.cm-s-night div.CodeMirror-selected { background: #447; } +.cm-s-night .CodeMirror-line::selection, .cm-s-night .CodeMirror-line > span::selection, .cm-s-night .CodeMirror-line > span > span::selection { background: rgba(68, 68, 119, .99); } +.cm-s-night .CodeMirror-line::-moz-selection, .cm-s-night .CodeMirror-line > span::-moz-selection, .cm-s-night .CodeMirror-line > span > span::-moz-selection { background: rgba(68, 68, 119, .99); } +.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } +.cm-s-night .CodeMirror-guttermarker { color: white; } +.cm-s-night .CodeMirror-guttermarker-subtle { color: #bbb; } +.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } +.cm-s-night .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-night span.cm-comment { color: #8900d1; } +.cm-s-night span.cm-atom { color: #845dc4; } +.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } +.cm-s-night span.cm-keyword { color: #599eff; } +.cm-s-night span.cm-string { color: #37f14a; } +.cm-s-night span.cm-meta { color: #7678e2; } +.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } +.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def, .cm-s-night span.cm-type { color: white; } +.cm-s-night span.cm-bracket { color: #8da6ce; } +.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } +.cm-s-night span.cm-link { color: #845dc4; } +.cm-s-night span.cm-error { color: #9d1e15; } + +.cm-s-night .CodeMirror-activeline-background { background: #1C005A; } +.cm-s-night .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } diff --git a/js/codemirror/theme/nord.css b/js/codemirror/theme/nord.css new file mode 100644 index 0000000..41a8ad7 --- /dev/null +++ b/js/codemirror/theme/nord.css @@ -0,0 +1,42 @@ +/* Based on arcticicestudio's Nord theme */ +/* https://github.com/arcticicestudio/nord */ + +.cm-s-nord.CodeMirror { background: #2e3440; color: #d8dee9; } +.cm-s-nord div.CodeMirror-selected { background: #434c5e; } +.cm-s-nord .CodeMirror-line::selection, .cm-s-nord .CodeMirror-line > span::selection, .cm-s-nord .CodeMirror-line > span > span::selection { background: #3b4252; } +.cm-s-nord .CodeMirror-line::-moz-selection, .cm-s-nord .CodeMirror-line > span::-moz-selection, .cm-s-nord .CodeMirror-line > span > span::-moz-selection { background: #3b4252; } +.cm-s-nord .CodeMirror-gutters { background: #2e3440; border-right: 0px; } +.cm-s-nord .CodeMirror-guttermarker { color: #4c566a; } +.cm-s-nord .CodeMirror-guttermarker-subtle { color: #4c566a; } +.cm-s-nord .CodeMirror-linenumber { color: #4c566a; } +.cm-s-nord .CodeMirror-cursor { border-left: 1px solid #f8f8f0; } + +.cm-s-nord span.cm-comment { color: #4c566a; } +.cm-s-nord span.cm-atom { color: #b48ead; } +.cm-s-nord span.cm-number { color: #b48ead; } + +.cm-s-nord span.cm-comment.cm-attribute { color: #97b757; } +.cm-s-nord span.cm-comment.cm-def { color: #bc9262; } +.cm-s-nord span.cm-comment.cm-tag { color: #bc6283; } +.cm-s-nord span.cm-comment.cm-type { color: #5998a6; } + +.cm-s-nord span.cm-property, .cm-s-nord span.cm-attribute { color: #8FBCBB; } +.cm-s-nord span.cm-keyword { color: #81A1C1; } +.cm-s-nord span.cm-builtin { color: #81A1C1; } +.cm-s-nord span.cm-string { color: #A3BE8C; } + +.cm-s-nord span.cm-variable { color: #d8dee9; } +.cm-s-nord span.cm-variable-2 { color: #d8dee9; } +.cm-s-nord span.cm-variable-3, .cm-s-nord span.cm-type { color: #d8dee9; } +.cm-s-nord span.cm-def { color: #8FBCBB; } +.cm-s-nord span.cm-bracket { color: #81A1C1; } +.cm-s-nord span.cm-tag { color: #bf616a; } +.cm-s-nord span.cm-header { color: #b48ead; } +.cm-s-nord span.cm-link { color: #b48ead; } +.cm-s-nord span.cm-error { background: #bf616a; color: #f8f8f0; } + +.cm-s-nord .CodeMirror-activeline-background { background: #3b4252; } +.cm-s-nord .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/oceanic-next.css b/js/codemirror/theme/oceanic-next.css new file mode 100644 index 0000000..f3d0d08 --- /dev/null +++ b/js/codemirror/theme/oceanic-next.css @@ -0,0 +1,46 @@ +/* + + Name: oceanic-next + Author: Filype Pereira (https://github.com/fpereira1) + + Original oceanic-next color scheme by Dmitri Voronianski (https://github.com/voronianski/oceanic-next-color-scheme) + +*/ + +.cm-s-oceanic-next.CodeMirror { background: #304148; color: #f8f8f2; } +.cm-s-oceanic-next div.CodeMirror-selected { background: rgba(101, 115, 126, 0.33); } +.cm-s-oceanic-next .CodeMirror-line::selection, .cm-s-oceanic-next .CodeMirror-line > span::selection, .cm-s-oceanic-next .CodeMirror-line > span > span::selection { background: rgba(101, 115, 126, 0.33); } +.cm-s-oceanic-next .CodeMirror-line::-moz-selection, .cm-s-oceanic-next .CodeMirror-line > span::-moz-selection, .cm-s-oceanic-next .CodeMirror-line > span > span::-moz-selection { background: rgba(101, 115, 126, 0.33); } +.cm-s-oceanic-next .CodeMirror-gutters { background: #304148; border-right: 10px; } +.cm-s-oceanic-next .CodeMirror-guttermarker { color: white; } +.cm-s-oceanic-next .CodeMirror-guttermarker-subtle { color: #d0d0d0; } +.cm-s-oceanic-next .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-oceanic-next .CodeMirror-cursor { border-left: 1px solid #f8f8f0; } +.cm-s-oceanic-next.cm-fat-cursor .CodeMirror-cursor { background-color: #a2a8a175 !important; } +.cm-s-oceanic-next .cm-animate-fat-cursor { background-color: #a2a8a175 !important; } + +.cm-s-oceanic-next span.cm-comment { color: #65737E; } +.cm-s-oceanic-next span.cm-atom { color: #C594C5; } +.cm-s-oceanic-next span.cm-number { color: #F99157; } + +.cm-s-oceanic-next span.cm-property { color: #99C794; } +.cm-s-oceanic-next span.cm-attribute, +.cm-s-oceanic-next span.cm-keyword { color: #C594C5; } +.cm-s-oceanic-next span.cm-builtin { color: #66d9ef; } +.cm-s-oceanic-next span.cm-string { color: #99C794; } + +.cm-s-oceanic-next span.cm-variable, +.cm-s-oceanic-next span.cm-variable-2, +.cm-s-oceanic-next span.cm-variable-3 { color: #f8f8f2; } +.cm-s-oceanic-next span.cm-def { color: #6699CC; } +.cm-s-oceanic-next span.cm-bracket { color: #5FB3B3; } +.cm-s-oceanic-next span.cm-tag { color: #C594C5; } +.cm-s-oceanic-next span.cm-header { color: #C594C5; } +.cm-s-oceanic-next span.cm-link { color: #C594C5; } +.cm-s-oceanic-next span.cm-error { background: #C594C5; color: #f8f8f0; } + +.cm-s-oceanic-next .CodeMirror-activeline-background { background: rgba(101, 115, 126, 0.33); } +.cm-s-oceanic-next .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/js/codemirror/theme/panda-syntax.css b/js/codemirror/theme/panda-syntax.css new file mode 100644 index 0000000..de14e91 --- /dev/null +++ b/js/codemirror/theme/panda-syntax.css @@ -0,0 +1,85 @@ +/* + Name: Panda Syntax + Author: Siamak Mokhtari (http://github.com/siamak/) + CodeMirror template by Siamak Mokhtari (https://github.com/siamak/atom-panda-syntax) +*/ +.cm-s-panda-syntax { + background: #292A2B; + color: #E6E6E6; + line-height: 1.5; + font-family: 'Operator Mono', 'Source Code Pro', Menlo, Monaco, Consolas, Courier New, monospace; +} +.cm-s-panda-syntax .CodeMirror-cursor { border-color: #ff2c6d; } +.cm-s-panda-syntax .CodeMirror-activeline-background { + background: rgba(99, 123, 156, 0.1); +} +.cm-s-panda-syntax .CodeMirror-selected { + background: #FFF; +} +.cm-s-panda-syntax .cm-comment { + font-style: italic; + color: #676B79; +} +.cm-s-panda-syntax .cm-operator { + color: #f3f3f3; +} +.cm-s-panda-syntax .cm-string { + color: #19F9D8; +} +.cm-s-panda-syntax .cm-string-2 { + color: #FFB86C; +} + +.cm-s-panda-syntax .cm-tag { + color: #ff2c6d; +} +.cm-s-panda-syntax .cm-meta { + color: #b084eb; +} + +.cm-s-panda-syntax .cm-number { + color: #FFB86C; +} +.cm-s-panda-syntax .cm-atom { + color: #ff2c6d; +} +.cm-s-panda-syntax .cm-keyword { + color: #FF75B5; +} +.cm-s-panda-syntax .cm-variable { + color: #ffb86c; +} +.cm-s-panda-syntax .cm-variable-2 { + color: #ff9ac1; +} +.cm-s-panda-syntax .cm-variable-3, .cm-s-panda-syntax .cm-type { + color: #ff9ac1; +} + +.cm-s-panda-syntax .cm-def { + color: #e6e6e6; +} +.cm-s-panda-syntax .cm-property { + color: #f3f3f3; +} +.cm-s-panda-syntax .cm-unit { + color: #ffb86c; +} + +.cm-s-panda-syntax .cm-attribute { + color: #ffb86c; +} + +.cm-s-panda-syntax .CodeMirror-matchingbracket { + border-bottom: 1px dotted #19F9D8; + padding-bottom: 2px; + color: #e6e6e6; +} +.cm-s-panda-syntax .CodeMirror-gutters { + background: #292a2b; + border-right-color: rgba(255, 255, 255, 0.1); +} +.cm-s-panda-syntax .CodeMirror-linenumber { + color: #e6e6e6; + opacity: 0.6; +} diff --git a/js/codemirror/theme/paraiso-dark.css b/js/codemirror/theme/paraiso-dark.css new file mode 100644 index 0000000..aa9d207 --- /dev/null +++ b/js/codemirror/theme/paraiso-dark.css @@ -0,0 +1,38 @@ +/* + + Name: Paraíso (Dark) + Author: Jan T. Sott + + Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) + +*/ + +.cm-s-paraiso-dark.CodeMirror { background: #2f1e2e; color: #b9b6b0; } +.cm-s-paraiso-dark div.CodeMirror-selected { background: #41323f; } +.cm-s-paraiso-dark .CodeMirror-line::selection, .cm-s-paraiso-dark .CodeMirror-line > span::selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::selection { background: rgba(65, 50, 63, .99); } +.cm-s-paraiso-dark .CodeMirror-line::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(65, 50, 63, .99); } +.cm-s-paraiso-dark .CodeMirror-gutters { background: #2f1e2e; border-right: 0px; } +.cm-s-paraiso-dark .CodeMirror-guttermarker { color: #ef6155; } +.cm-s-paraiso-dark .CodeMirror-guttermarker-subtle { color: #776e71; } +.cm-s-paraiso-dark .CodeMirror-linenumber { color: #776e71; } +.cm-s-paraiso-dark .CodeMirror-cursor { border-left: 1px solid #8d8687; } + +.cm-s-paraiso-dark span.cm-comment { color: #e96ba8; } +.cm-s-paraiso-dark span.cm-atom { color: #815ba4; } +.cm-s-paraiso-dark span.cm-number { color: #815ba4; } + +.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute { color: #48b685; } +.cm-s-paraiso-dark span.cm-keyword { color: #ef6155; } +.cm-s-paraiso-dark span.cm-string { color: #fec418; } + +.cm-s-paraiso-dark span.cm-variable { color: #48b685; } +.cm-s-paraiso-dark span.cm-variable-2 { color: #06b6ef; } +.cm-s-paraiso-dark span.cm-def { color: #f99b15; } +.cm-s-paraiso-dark span.cm-bracket { color: #b9b6b0; } +.cm-s-paraiso-dark span.cm-tag { color: #ef6155; } +.cm-s-paraiso-dark span.cm-link { color: #815ba4; } +.cm-s-paraiso-dark span.cm-error { background: #ef6155; color: #8d8687; } + +.cm-s-paraiso-dark .CodeMirror-activeline-background { background: #4D344A; } +.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/paraiso-light.css b/js/codemirror/theme/paraiso-light.css new file mode 100644 index 0000000..ae0c755 --- /dev/null +++ b/js/codemirror/theme/paraiso-light.css @@ -0,0 +1,38 @@ +/* + + Name: Paraíso (Light) + Author: Jan T. Sott + + Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) + +*/ + +.cm-s-paraiso-light.CodeMirror { background: #e7e9db; color: #41323f; } +.cm-s-paraiso-light div.CodeMirror-selected { background: #b9b6b0; } +.cm-s-paraiso-light .CodeMirror-line::selection, .cm-s-paraiso-light .CodeMirror-line > span::selection, .cm-s-paraiso-light .CodeMirror-line > span > span::selection { background: #b9b6b0; } +.cm-s-paraiso-light .CodeMirror-line::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span::-moz-selection, .cm-s-paraiso-light .CodeMirror-line > span > span::-moz-selection { background: #b9b6b0; } +.cm-s-paraiso-light .CodeMirror-gutters { background: #e7e9db; border-right: 0px; } +.cm-s-paraiso-light .CodeMirror-guttermarker { color: black; } +.cm-s-paraiso-light .CodeMirror-guttermarker-subtle { color: #8d8687; } +.cm-s-paraiso-light .CodeMirror-linenumber { color: #8d8687; } +.cm-s-paraiso-light .CodeMirror-cursor { border-left: 1px solid #776e71; } + +.cm-s-paraiso-light span.cm-comment { color: #e96ba8; } +.cm-s-paraiso-light span.cm-atom { color: #815ba4; } +.cm-s-paraiso-light span.cm-number { color: #815ba4; } + +.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute { color: #48b685; } +.cm-s-paraiso-light span.cm-keyword { color: #ef6155; } +.cm-s-paraiso-light span.cm-string { color: #fec418; } + +.cm-s-paraiso-light span.cm-variable { color: #48b685; } +.cm-s-paraiso-light span.cm-variable-2 { color: #06b6ef; } +.cm-s-paraiso-light span.cm-def { color: #f99b15; } +.cm-s-paraiso-light span.cm-bracket { color: #41323f; } +.cm-s-paraiso-light span.cm-tag { color: #ef6155; } +.cm-s-paraiso-light span.cm-link { color: #815ba4; } +.cm-s-paraiso-light span.cm-error { background: #ef6155; color: #776e71; } + +.cm-s-paraiso-light .CodeMirror-activeline-background { background: #CFD1C4; } +.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/pastel-on-dark.css b/js/codemirror/theme/pastel-on-dark.css new file mode 100644 index 0000000..60435dd --- /dev/null +++ b/js/codemirror/theme/pastel-on-dark.css @@ -0,0 +1,52 @@ +/** + * Pastel On Dark theme ported from ACE editor + * @license MIT + * @copyright AtomicPages LLC 2014 + * @author Dennis Thompson, AtomicPages LLC + * @version 1.1 + * @source https://github.com/atomicpages/codemirror-pastel-on-dark-theme + */ + +.cm-s-pastel-on-dark.CodeMirror { + background: #2c2827; + color: #8F938F; + line-height: 1.5; +} +.cm-s-pastel-on-dark div.CodeMirror-selected { background: rgba(221,240,255,0.2); } +.cm-s-pastel-on-dark .CodeMirror-line::selection, .cm-s-pastel-on-dark .CodeMirror-line > span::selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::selection { background: rgba(221,240,255,0.2); } +.cm-s-pastel-on-dark .CodeMirror-line::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span::-moz-selection, .cm-s-pastel-on-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(221,240,255,0.2); } + +.cm-s-pastel-on-dark .CodeMirror-gutters { + background: #34302f; + border-right: 0px; + padding: 0 3px; +} +.cm-s-pastel-on-dark .CodeMirror-guttermarker { color: white; } +.cm-s-pastel-on-dark .CodeMirror-guttermarker-subtle { color: #8F938F; } +.cm-s-pastel-on-dark .CodeMirror-linenumber { color: #8F938F; } +.cm-s-pastel-on-dark .CodeMirror-cursor { border-left: 1px solid #A7A7A7; } +.cm-s-pastel-on-dark span.cm-comment { color: #A6C6FF; } +.cm-s-pastel-on-dark span.cm-atom { color: #DE8E30; } +.cm-s-pastel-on-dark span.cm-number { color: #CCCCCC; } +.cm-s-pastel-on-dark span.cm-property { color: #8F938F; } +.cm-s-pastel-on-dark span.cm-attribute { color: #a6e22e; } +.cm-s-pastel-on-dark span.cm-keyword { color: #AEB2F8; } +.cm-s-pastel-on-dark span.cm-string { color: #66A968; } +.cm-s-pastel-on-dark span.cm-variable { color: #AEB2F8; } +.cm-s-pastel-on-dark span.cm-variable-2 { color: #BEBF55; } +.cm-s-pastel-on-dark span.cm-variable-3, .cm-s-pastel-on-dark span.cm-type { color: #DE8E30; } +.cm-s-pastel-on-dark span.cm-def { color: #757aD8; } +.cm-s-pastel-on-dark span.cm-bracket { color: #f8f8f2; } +.cm-s-pastel-on-dark span.cm-tag { color: #C1C144; } +.cm-s-pastel-on-dark span.cm-link { color: #ae81ff; } +.cm-s-pastel-on-dark span.cm-qualifier,.cm-s-pastel-on-dark span.cm-builtin { color: #C1C144; } +.cm-s-pastel-on-dark span.cm-error { + background: #757aD8; + color: #f8f8f0; +} +.cm-s-pastel-on-dark .CodeMirror-activeline-background { background: rgba(255, 255, 255, 0.031); } +.cm-s-pastel-on-dark .CodeMirror-matchingbracket { + border: 1px solid rgba(255,255,255,0.25); + color: #8F938F !important; + margin: -1px -1px 0 -1px; +} diff --git a/js/codemirror/theme/railscasts.css b/js/codemirror/theme/railscasts.css new file mode 100644 index 0000000..aeff044 --- /dev/null +++ b/js/codemirror/theme/railscasts.css @@ -0,0 +1,34 @@ +/* + + Name: Railscasts + Author: Ryan Bates (http://railscasts.com) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-railscasts.CodeMirror {background: #2b2b2b; color: #f4f1ed;} +.cm-s-railscasts div.CodeMirror-selected {background: #272935 !important;} +.cm-s-railscasts .CodeMirror-gutters {background: #2b2b2b; border-right: 0px;} +.cm-s-railscasts .CodeMirror-linenumber {color: #5a647e;} +.cm-s-railscasts .CodeMirror-cursor {border-left: 1px solid #d4cfc9 !important;} + +.cm-s-railscasts span.cm-comment {color: #bc9458;} +.cm-s-railscasts span.cm-atom {color: #b6b3eb;} +.cm-s-railscasts span.cm-number {color: #b6b3eb;} + +.cm-s-railscasts span.cm-property, .cm-s-railscasts span.cm-attribute {color: #a5c261;} +.cm-s-railscasts span.cm-keyword {color: #da4939;} +.cm-s-railscasts span.cm-string {color: #ffc66d;} + +.cm-s-railscasts span.cm-variable {color: #a5c261;} +.cm-s-railscasts span.cm-variable-2 {color: #6d9cbe;} +.cm-s-railscasts span.cm-def {color: #cc7833;} +.cm-s-railscasts span.cm-error {background: #da4939; color: #d4cfc9;} +.cm-s-railscasts span.cm-bracket {color: #f4f1ed;} +.cm-s-railscasts span.cm-tag {color: #da4939;} +.cm-s-railscasts span.cm-link {color: #b6b3eb;} + +.cm-s-railscasts .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} +.cm-s-railscasts .CodeMirror-activeline-background { background: #303040; } diff --git a/js/codemirror/theme/rubyblue.css b/js/codemirror/theme/rubyblue.css new file mode 100644 index 0000000..1f181b0 --- /dev/null +++ b/js/codemirror/theme/rubyblue.css @@ -0,0 +1,25 @@ +.cm-s-rubyblue.CodeMirror { background: #112435; color: white; } +.cm-s-rubyblue div.CodeMirror-selected { background: #38566F; } +.cm-s-rubyblue .CodeMirror-line::selection, .cm-s-rubyblue .CodeMirror-line > span::selection, .cm-s-rubyblue .CodeMirror-line > span > span::selection { background: rgba(56, 86, 111, 0.99); } +.cm-s-rubyblue .CodeMirror-line::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span::-moz-selection, .cm-s-rubyblue .CodeMirror-line > span > span::-moz-selection { background: rgba(56, 86, 111, 0.99); } +.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; } +.cm-s-rubyblue .CodeMirror-guttermarker { color: white; } +.cm-s-rubyblue .CodeMirror-guttermarker-subtle { color: #3E7087; } +.cm-s-rubyblue .CodeMirror-linenumber { color: white; } +.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } +.cm-s-rubyblue span.cm-atom { color: #F4C20B; } +.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; } +.cm-s-rubyblue span.cm-keyword { color: #F0F; } +.cm-s-rubyblue span.cm-string { color: #F08047; } +.cm-s-rubyblue span.cm-meta { color: #F0F; } +.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } +.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def, .cm-s-rubyblue span.cm-type { color: white; } +.cm-s-rubyblue span.cm-bracket { color: #F0F; } +.cm-s-rubyblue span.cm-link { color: #F4C20B; } +.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } +.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; } +.cm-s-rubyblue span.cm-error { color: #AF2018; } + +.cm-s-rubyblue .CodeMirror-activeline-background { background: #173047; } diff --git a/js/codemirror/theme/seti.css b/js/codemirror/theme/seti.css new file mode 100644 index 0000000..814f76f --- /dev/null +++ b/js/codemirror/theme/seti.css @@ -0,0 +1,44 @@ +/* + + Name: seti + Author: Michael Kaminsky (http://github.com/mkaminsky11) + + Original seti color scheme by Jesse Weed (https://github.com/jesseweed/seti-syntax) + +*/ + + +.cm-s-seti.CodeMirror { + background-color: #151718 !important; + color: #CFD2D1 !important; + border: none; +} +.cm-s-seti .CodeMirror-gutters { + color: #404b53; + background-color: #0E1112; + border: none; +} +.cm-s-seti .CodeMirror-cursor { border-left: solid thin #f8f8f0; } +.cm-s-seti .CodeMirror-linenumber { color: #6D8A88; } +.cm-s-seti.CodeMirror-focused div.CodeMirror-selected { background: rgba(255, 255, 255, 0.10); } +.cm-s-seti .CodeMirror-line::selection, .cm-s-seti .CodeMirror-line > span::selection, .cm-s-seti .CodeMirror-line > span > span::selection { background: rgba(255, 255, 255, 0.10); } +.cm-s-seti .CodeMirror-line::-moz-selection, .cm-s-seti .CodeMirror-line > span::-moz-selection, .cm-s-seti .CodeMirror-line > span > span::-moz-selection { background: rgba(255, 255, 255, 0.10); } +.cm-s-seti span.cm-comment { color: #41535b; } +.cm-s-seti span.cm-string, .cm-s-seti span.cm-string-2 { color: #55b5db; } +.cm-s-seti span.cm-number { color: #cd3f45; } +.cm-s-seti span.cm-variable { color: #55b5db; } +.cm-s-seti span.cm-variable-2 { color: #a074c4; } +.cm-s-seti span.cm-def { color: #55b5db; } +.cm-s-seti span.cm-keyword { color: #ff79c6; } +.cm-s-seti span.cm-operator { color: #9fca56; } +.cm-s-seti span.cm-keyword { color: #e6cd69; } +.cm-s-seti span.cm-atom { color: #cd3f45; } +.cm-s-seti span.cm-meta { color: #55b5db; } +.cm-s-seti span.cm-tag { color: #55b5db; } +.cm-s-seti span.cm-attribute { color: #9fca56; } +.cm-s-seti span.cm-qualifier { color: #9fca56; } +.cm-s-seti span.cm-property { color: #a074c4; } +.cm-s-seti span.cm-variable-3, .cm-s-seti span.cm-type { color: #9fca56; } +.cm-s-seti span.cm-builtin { color: #9fca56; } +.cm-s-seti .CodeMirror-activeline-background { background: #101213; } +.cm-s-seti .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/shadowfox.css b/js/codemirror/theme/shadowfox.css new file mode 100644 index 0000000..32d59b1 --- /dev/null +++ b/js/codemirror/theme/shadowfox.css @@ -0,0 +1,52 @@ +/* + + Name: shadowfox + Author: overdodactyl (http://github.com/overdodactyl) + + Original shadowfox color scheme by Firefox + +*/ + +.cm-s-shadowfox.CodeMirror { background: #2a2a2e; color: #b1b1b3; } +.cm-s-shadowfox div.CodeMirror-selected { background: #353B48; } +.cm-s-shadowfox .CodeMirror-line::selection, .cm-s-shadowfox .CodeMirror-line > span::selection, .cm-s-shadowfox .CodeMirror-line > span > span::selection { background: #353B48; } +.cm-s-shadowfox .CodeMirror-line::-moz-selection, .cm-s-shadowfox .CodeMirror-line > span::-moz-selection, .cm-s-shadowfox .CodeMirror-line > span > span::-moz-selection { background: #353B48; } +.cm-s-shadowfox .CodeMirror-gutters { background: #0c0c0d ; border-right: 1px solid #0c0c0d; } +.cm-s-shadowfox .CodeMirror-guttermarker { color: #555; } +.cm-s-shadowfox .CodeMirror-linenumber { color: #939393; } +.cm-s-shadowfox .CodeMirror-cursor { border-left: 1px solid #fff; } + +.cm-s-shadowfox span.cm-comment { color: #939393; } +.cm-s-shadowfox span.cm-atom { color: #FF7DE9; } +.cm-s-shadowfox span.cm-quote { color: #FF7DE9; } +.cm-s-shadowfox span.cm-builtin { color: #FF7DE9; } +.cm-s-shadowfox span.cm-attribute { color: #FF7DE9; } +.cm-s-shadowfox span.cm-keyword { color: #FF7DE9; } +.cm-s-shadowfox span.cm-error { color: #FF7DE9; } + +.cm-s-shadowfox span.cm-number { color: #6B89FF; } +.cm-s-shadowfox span.cm-string { color: #6B89FF; } +.cm-s-shadowfox span.cm-string-2 { color: #6B89FF; } + +.cm-s-shadowfox span.cm-meta { color: #939393; } +.cm-s-shadowfox span.cm-hr { color: #939393; } + +.cm-s-shadowfox span.cm-header { color: #75BFFF; } +.cm-s-shadowfox span.cm-qualifier { color: #75BFFF; } +.cm-s-shadowfox span.cm-variable-2 { color: #75BFFF; } + +.cm-s-shadowfox span.cm-property { color: #86DE74; } + +.cm-s-shadowfox span.cm-def { color: #75BFFF; } +.cm-s-shadowfox span.cm-bracket { color: #75BFFF; } +.cm-s-shadowfox span.cm-tag { color: #75BFFF; } +.cm-s-shadowfox span.cm-link:visited { color: #75BFFF; } + +.cm-s-shadowfox span.cm-variable { color: #B98EFF; } +.cm-s-shadowfox span.cm-variable-3 { color: #d7d7db; } +.cm-s-shadowfox span.cm-link { color: #737373; } +.cm-s-shadowfox span.cm-operator { color: #b1b1b3; } +.cm-s-shadowfox span.cm-special { color: #d7d7db; } + +.cm-s-shadowfox .CodeMirror-activeline-background { background: rgba(185, 215, 253, .15) } +.cm-s-shadowfox .CodeMirror-matchingbracket { outline: solid 1px rgba(255, 255, 255, .25); color: white !important; } diff --git a/js/codemirror/theme/solarized.css b/js/codemirror/theme/solarized.css new file mode 100644 index 0000000..e978fec --- /dev/null +++ b/js/codemirror/theme/solarized.css @@ -0,0 +1,165 @@ +/* +Solarized theme for code-mirror +http://ethanschoonover.com/solarized +*/ + +/* +Solarized color palette +http://ethanschoonover.com/solarized/img/solarized-palette.png +*/ + +.solarized.base03 { color: #002b36; } +.solarized.base02 { color: #073642; } +.solarized.base01 { color: #586e75; } +.solarized.base00 { color: #657b83; } +.solarized.base0 { color: #839496; } +.solarized.base1 { color: #93a1a1; } +.solarized.base2 { color: #eee8d5; } +.solarized.base3 { color: #fdf6e3; } +.solarized.solar-yellow { color: #b58900; } +.solarized.solar-orange { color: #cb4b16; } +.solarized.solar-red { color: #dc322f; } +.solarized.solar-magenta { color: #d33682; } +.solarized.solar-violet { color: #6c71c4; } +.solarized.solar-blue { color: #268bd2; } +.solarized.solar-cyan { color: #2aa198; } +.solarized.solar-green { color: #859900; } + +/* Color scheme for code-mirror */ + +.cm-s-solarized { + line-height: 1.45em; + color-profile: sRGB; + rendering-intent: auto; +} +.cm-s-solarized.cm-s-dark { + color: #839496; + background-color: #002b36; +} +.cm-s-solarized.cm-s-light { + background-color: #fdf6e3; + color: #657b83; +} + +.cm-s-solarized .CodeMirror-widget { + text-shadow: none; +} + +.cm-s-solarized .cm-header { color: #586e75; } +.cm-s-solarized .cm-quote { color: #93a1a1; } + +.cm-s-solarized .cm-keyword { color: #cb4b16; } +.cm-s-solarized .cm-atom { color: #d33682; } +.cm-s-solarized .cm-number { color: #d33682; } +.cm-s-solarized .cm-def { color: #2aa198; } + +.cm-s-solarized .cm-variable { color: #839496; } +.cm-s-solarized .cm-variable-2 { color: #b58900; } +.cm-s-solarized .cm-variable-3, .cm-s-solarized .cm-type { color: #6c71c4; } + +.cm-s-solarized .cm-property { color: #2aa198; } +.cm-s-solarized .cm-operator { color: #6c71c4; } + +.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; } + +.cm-s-solarized .cm-string { color: #859900; } +.cm-s-solarized .cm-string-2 { color: #b58900; } + +.cm-s-solarized .cm-meta { color: #859900; } +.cm-s-solarized .cm-qualifier { color: #b58900; } +.cm-s-solarized .cm-builtin { color: #d33682; } +.cm-s-solarized .cm-bracket { color: #cb4b16; } +.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; } +.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; } +.cm-s-solarized .cm-tag { color: #93a1a1; } +.cm-s-solarized .cm-attribute { color: #2aa198; } +.cm-s-solarized .cm-hr { + color: transparent; + border-top: 1px solid #586e75; + display: block; +} +.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; } +.cm-s-solarized .cm-special { color: #6c71c4; } +.cm-s-solarized .cm-em { + color: #999; + text-decoration: underline; + text-decoration-style: dotted; +} +.cm-s-solarized .cm-error, +.cm-s-solarized .cm-invalidchar { + color: #586e75; + border-bottom: 1px dotted #dc322f; +} + +.cm-s-solarized.cm-s-dark div.CodeMirror-selected { background: #073642; } +.cm-s-solarized.cm-s-dark.CodeMirror ::selection { background: rgba(7, 54, 66, 0.99); } +.cm-s-solarized.cm-s-dark .CodeMirror-line::-moz-selection, .cm-s-dark .CodeMirror-line > span::-moz-selection, .cm-s-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(7, 54, 66, 0.99); } + +.cm-s-solarized.cm-s-light div.CodeMirror-selected { background: #eee8d5; } +.cm-s-solarized.cm-s-light .CodeMirror-line::selection, .cm-s-light .CodeMirror-line > span::selection, .cm-s-light .CodeMirror-line > span > span::selection { background: #eee8d5; } +.cm-s-solarized.cm-s-light .CodeMirror-line::-moz-selection, .cm-s-light .CodeMirror-line > span::-moz-selection, .cm-s-light .CodeMirror-line > span > span::-moz-selection { background: #eee8d5; } + +/* Editor styling */ + + + +/* Little shadow on the view-port of the buffer view */ +.cm-s-solarized.CodeMirror { + -moz-box-shadow: inset 7px 0 12px -6px #000; + -webkit-box-shadow: inset 7px 0 12px -6px #000; + box-shadow: inset 7px 0 12px -6px #000; +} + +/* Remove gutter border */ +.cm-s-solarized .CodeMirror-gutters { + border-right: 0; +} + +/* Gutter colors and line number styling based of color scheme (dark / light) */ + +/* Dark */ +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: #073642; +} + +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + color: #586e75; +} + +/* Light */ +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: #eee8d5; +} + +.cm-s-solarized.cm-s-light .CodeMirror-linenumber { + color: #839496; +} + +/* Common */ +.cm-s-solarized .CodeMirror-linenumber { + padding: 0 5px; +} +.cm-s-solarized .CodeMirror-guttermarker-subtle { color: #586e75; } +.cm-s-solarized.cm-s-dark .CodeMirror-guttermarker { color: #ddd; } +.cm-s-solarized.cm-s-light .CodeMirror-guttermarker { color: #cb4b16; } + +.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text { + color: #586e75; +} + +/* Cursor */ +.cm-s-solarized .CodeMirror-cursor { border-left: 1px solid #819090; } + +/* Fat cursor */ +.cm-s-solarized.cm-s-light.cm-fat-cursor .CodeMirror-cursor { background: #77ee77; } +.cm-s-solarized.cm-s-light .cm-animate-fat-cursor { background-color: #77ee77; } +.cm-s-solarized.cm-s-dark.cm-fat-cursor .CodeMirror-cursor { background: #586e75; } +.cm-s-solarized.cm-s-dark .cm-animate-fat-cursor { background-color: #586e75; } + +/* Active line */ +.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background { + background: rgba(255, 255, 255, 0.06); +} +.cm-s-solarized.cm-s-light .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0.06); +} diff --git a/js/codemirror/theme/ssms.css b/js/codemirror/theme/ssms.css new file mode 100644 index 0000000..9494c14 --- /dev/null +++ b/js/codemirror/theme/ssms.css @@ -0,0 +1,16 @@ +.cm-s-ssms span.cm-keyword { color: blue; } +.cm-s-ssms span.cm-comment { color: darkgreen; } +.cm-s-ssms span.cm-string { color: red; } +.cm-s-ssms span.cm-def { color: black; } +.cm-s-ssms span.cm-variable { color: black; } +.cm-s-ssms span.cm-variable-2 { color: black; } +.cm-s-ssms span.cm-atom { color: darkgray; } +.cm-s-ssms .CodeMirror-linenumber { color: teal; } +.cm-s-ssms .CodeMirror-activeline-background { background: #ffffff; } +.cm-s-ssms span.cm-string-2 { color: #FF00FF; } +.cm-s-ssms span.cm-operator, +.cm-s-ssms span.cm-bracket, +.cm-s-ssms span.cm-punctuation { color: darkgray; } +.cm-s-ssms .CodeMirror-gutters { border-right: 3px solid #ffee62; background-color: #ffffff; } +.cm-s-ssms div.CodeMirror-selected { background: #ADD6FF; } + diff --git a/js/codemirror/theme/the-matrix.css b/js/codemirror/theme/the-matrix.css new file mode 100644 index 0000000..c4c93c1 --- /dev/null +++ b/js/codemirror/theme/the-matrix.css @@ -0,0 +1,30 @@ +.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; } +.cm-s-the-matrix div.CodeMirror-selected { background: #2D2D2D; } +.cm-s-the-matrix .CodeMirror-line::selection, .cm-s-the-matrix .CodeMirror-line > span::selection, .cm-s-the-matrix .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); } +.cm-s-the-matrix .CodeMirror-line::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span::-moz-selection, .cm-s-the-matrix .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); } +.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; } +.cm-s-the-matrix .CodeMirror-guttermarker { color: #0f0; } +.cm-s-the-matrix .CodeMirror-guttermarker-subtle { color: white; } +.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; } +.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00; } + +.cm-s-the-matrix span.cm-keyword { color: #008803; font-weight: bold; } +.cm-s-the-matrix span.cm-atom { color: #3FF; } +.cm-s-the-matrix span.cm-number { color: #FFB94F; } +.cm-s-the-matrix span.cm-def { color: #99C; } +.cm-s-the-matrix span.cm-variable { color: #F6C; } +.cm-s-the-matrix span.cm-variable-2 { color: #C6F; } +.cm-s-the-matrix span.cm-variable-3, .cm-s-the-matrix span.cm-type { color: #96F; } +.cm-s-the-matrix span.cm-property { color: #62FFA0; } +.cm-s-the-matrix span.cm-operator { color: #999; } +.cm-s-the-matrix span.cm-comment { color: #CCCCCC; } +.cm-s-the-matrix span.cm-string { color: #39C; } +.cm-s-the-matrix span.cm-meta { color: #C9F; } +.cm-s-the-matrix span.cm-qualifier { color: #FFF700; } +.cm-s-the-matrix span.cm-builtin { color: #30a; } +.cm-s-the-matrix span.cm-bracket { color: #cc7; } +.cm-s-the-matrix span.cm-tag { color: #FFBD40; } +.cm-s-the-matrix span.cm-attribute { color: #FFF700; } +.cm-s-the-matrix span.cm-error { color: #FF0000; } + +.cm-s-the-matrix .CodeMirror-activeline-background { background: #040; } diff --git a/js/codemirror/theme/tomorrow-night-bright.css b/js/codemirror/theme/tomorrow-night-bright.css new file mode 100644 index 0000000..b6dd4a9 --- /dev/null +++ b/js/codemirror/theme/tomorrow-night-bright.css @@ -0,0 +1,35 @@ +/* + + Name: Tomorrow Night - Bright + Author: Chris Kempson + + Port done by Gerard Braad + +*/ + +.cm-s-tomorrow-night-bright.CodeMirror { background: #000000; color: #eaeaea; } +.cm-s-tomorrow-night-bright div.CodeMirror-selected { background: #424242; } +.cm-s-tomorrow-night-bright .CodeMirror-gutters { background: #000000; border-right: 0px; } +.cm-s-tomorrow-night-bright .CodeMirror-guttermarker { color: #e78c45; } +.cm-s-tomorrow-night-bright .CodeMirror-guttermarker-subtle { color: #777; } +.cm-s-tomorrow-night-bright .CodeMirror-linenumber { color: #424242; } +.cm-s-tomorrow-night-bright .CodeMirror-cursor { border-left: 1px solid #6A6A6A; } + +.cm-s-tomorrow-night-bright span.cm-comment { color: #d27b53; } +.cm-s-tomorrow-night-bright span.cm-atom { color: #a16a94; } +.cm-s-tomorrow-night-bright span.cm-number { color: #a16a94; } + +.cm-s-tomorrow-night-bright span.cm-property, .cm-s-tomorrow-night-bright span.cm-attribute { color: #99cc99; } +.cm-s-tomorrow-night-bright span.cm-keyword { color: #d54e53; } +.cm-s-tomorrow-night-bright span.cm-string { color: #e7c547; } + +.cm-s-tomorrow-night-bright span.cm-variable { color: #b9ca4a; } +.cm-s-tomorrow-night-bright span.cm-variable-2 { color: #7aa6da; } +.cm-s-tomorrow-night-bright span.cm-def { color: #e78c45; } +.cm-s-tomorrow-night-bright span.cm-bracket { color: #eaeaea; } +.cm-s-tomorrow-night-bright span.cm-tag { color: #d54e53; } +.cm-s-tomorrow-night-bright span.cm-link { color: #a16a94; } +.cm-s-tomorrow-night-bright span.cm-error { background: #d54e53; color: #6A6A6A; } + +.cm-s-tomorrow-night-bright .CodeMirror-activeline-background { background: #2a2a2a; } +.cm-s-tomorrow-night-bright .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/tomorrow-night-eighties.css b/js/codemirror/theme/tomorrow-night-eighties.css new file mode 100644 index 0000000..2a9debc --- /dev/null +++ b/js/codemirror/theme/tomorrow-night-eighties.css @@ -0,0 +1,38 @@ +/* + + Name: Tomorrow Night - Eighties + Author: Chris Kempson + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-tomorrow-night-eighties.CodeMirror { background: #000000; color: #CCCCCC; } +.cm-s-tomorrow-night-eighties div.CodeMirror-selected { background: #2D2D2D; } +.cm-s-tomorrow-night-eighties .CodeMirror-line::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::selection { background: rgba(45, 45, 45, 0.99); } +.cm-s-tomorrow-night-eighties .CodeMirror-line::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span::-moz-selection, .cm-s-tomorrow-night-eighties .CodeMirror-line > span > span::-moz-selection { background: rgba(45, 45, 45, 0.99); } +.cm-s-tomorrow-night-eighties .CodeMirror-gutters { background: #000000; border-right: 0px; } +.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker { color: #f2777a; } +.cm-s-tomorrow-night-eighties .CodeMirror-guttermarker-subtle { color: #777; } +.cm-s-tomorrow-night-eighties .CodeMirror-linenumber { color: #515151; } +.cm-s-tomorrow-night-eighties .CodeMirror-cursor { border-left: 1px solid #6A6A6A; } + +.cm-s-tomorrow-night-eighties span.cm-comment { color: #d27b53; } +.cm-s-tomorrow-night-eighties span.cm-atom { color: #a16a94; } +.cm-s-tomorrow-night-eighties span.cm-number { color: #a16a94; } + +.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute { color: #99cc99; } +.cm-s-tomorrow-night-eighties span.cm-keyword { color: #f2777a; } +.cm-s-tomorrow-night-eighties span.cm-string { color: #ffcc66; } + +.cm-s-tomorrow-night-eighties span.cm-variable { color: #99cc99; } +.cm-s-tomorrow-night-eighties span.cm-variable-2 { color: #6699cc; } +.cm-s-tomorrow-night-eighties span.cm-def { color: #f99157; } +.cm-s-tomorrow-night-eighties span.cm-bracket { color: #CCCCCC; } +.cm-s-tomorrow-night-eighties span.cm-tag { color: #f2777a; } +.cm-s-tomorrow-night-eighties span.cm-link { color: #a16a94; } +.cm-s-tomorrow-night-eighties span.cm-error { background: #f2777a; color: #6A6A6A; } + +.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background { background: #343600; } +.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important; } diff --git a/js/codemirror/theme/ttcn.css b/js/codemirror/theme/ttcn.css new file mode 100644 index 0000000..0b14ac3 --- /dev/null +++ b/js/codemirror/theme/ttcn.css @@ -0,0 +1,64 @@ +.cm-s-ttcn .cm-quote { color: #090; } +.cm-s-ttcn .cm-negative { color: #d44; } +.cm-s-ttcn .cm-positive { color: #292; } +.cm-s-ttcn .cm-header, .cm-strong { font-weight: bold; } +.cm-s-ttcn .cm-em { font-style: italic; } +.cm-s-ttcn .cm-link { text-decoration: underline; } +.cm-s-ttcn .cm-strikethrough { text-decoration: line-through; } +.cm-s-ttcn .cm-header { color: #00f; font-weight: bold; } + +.cm-s-ttcn .cm-atom { color: #219; } +.cm-s-ttcn .cm-attribute { color: #00c; } +.cm-s-ttcn .cm-bracket { color: #997; } +.cm-s-ttcn .cm-comment { color: #333333; } +.cm-s-ttcn .cm-def { color: #00f; } +.cm-s-ttcn .cm-em { font-style: italic; } +.cm-s-ttcn .cm-error { color: #f00; } +.cm-s-ttcn .cm-hr { color: #999; } +.cm-s-ttcn .cm-invalidchar { color: #f00; } +.cm-s-ttcn .cm-keyword { font-weight:bold; } +.cm-s-ttcn .cm-link { color: #00c; text-decoration: underline; } +.cm-s-ttcn .cm-meta { color: #555; } +.cm-s-ttcn .cm-negative { color: #d44; } +.cm-s-ttcn .cm-positive { color: #292; } +.cm-s-ttcn .cm-qualifier { color: #555; } +.cm-s-ttcn .cm-strikethrough { text-decoration: line-through; } +.cm-s-ttcn .cm-string { color: #006400; } +.cm-s-ttcn .cm-string-2 { color: #f50; } +.cm-s-ttcn .cm-strong { font-weight: bold; } +.cm-s-ttcn .cm-tag { color: #170; } +.cm-s-ttcn .cm-variable { color: #8B2252; } +.cm-s-ttcn .cm-variable-2 { color: #05a; } +.cm-s-ttcn .cm-variable-3, .cm-s-ttcn .cm-type { color: #085; } + +.cm-s-ttcn .cm-invalidchar { color: #f00; } + +/* ASN */ +.cm-s-ttcn .cm-accessTypes, +.cm-s-ttcn .cm-compareTypes { color: #27408B; } +.cm-s-ttcn .cm-cmipVerbs { color: #8B2252; } +.cm-s-ttcn .cm-modifier { color:#D2691E; } +.cm-s-ttcn .cm-status { color:#8B4545; } +.cm-s-ttcn .cm-storage { color:#A020F0; } +.cm-s-ttcn .cm-tags { color:#006400; } + +/* CFG */ +.cm-s-ttcn .cm-externalCommands { color: #8B4545; font-weight:bold; } +.cm-s-ttcn .cm-fileNCtrlMaskOptions, +.cm-s-ttcn .cm-sectionTitle { color: #2E8B57; font-weight:bold; } + +/* TTCN */ +.cm-s-ttcn .cm-booleanConsts, +.cm-s-ttcn .cm-otherConsts, +.cm-s-ttcn .cm-verdictConsts { color: #006400; } +.cm-s-ttcn .cm-configOps, +.cm-s-ttcn .cm-functionOps, +.cm-s-ttcn .cm-portOps, +.cm-s-ttcn .cm-sutOps, +.cm-s-ttcn .cm-timerOps, +.cm-s-ttcn .cm-verdictOps { color: #0000FF; } +.cm-s-ttcn .cm-preprocessor, +.cm-s-ttcn .cm-templateMatch, +.cm-s-ttcn .cm-ttcn3Macros { color: #27408B; } +.cm-s-ttcn .cm-types { color: #A52A2A; font-weight:bold; } +.cm-s-ttcn .cm-visibilityModifiers { font-weight:bold; } diff --git a/js/codemirror/theme/twilight.css b/js/codemirror/theme/twilight.css new file mode 100644 index 0000000..b2b1b2a --- /dev/null +++ b/js/codemirror/theme/twilight.css @@ -0,0 +1,32 @@ +.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/ +.cm-s-twilight div.CodeMirror-selected { background: #323232; } /**/ +.cm-s-twilight .CodeMirror-line::selection, .cm-s-twilight .CodeMirror-line > span::selection, .cm-s-twilight .CodeMirror-line > span > span::selection { background: rgba(50, 50, 50, 0.99); } +.cm-s-twilight .CodeMirror-line::-moz-selection, .cm-s-twilight .CodeMirror-line > span::-moz-selection, .cm-s-twilight .CodeMirror-line > span > span::-moz-selection { background: rgba(50, 50, 50, 0.99); } + +.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; } +.cm-s-twilight .CodeMirror-guttermarker { color: white; } +.cm-s-twilight .CodeMirror-guttermarker-subtle { color: #aaa; } +.cm-s-twilight .CodeMirror-linenumber { color: #aaa; } +.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ +.cm-s-twilight .cm-atom { color: #FC0; } +.cm-s-twilight .cm-number { color: #ca7841; } /**/ +.cm-s-twilight .cm-def { color: #8DA6CE; } +.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ +.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def, .cm-s-twilight span.cm-type { color: #607392; } /**/ +.cm-s-twilight .cm-operator { color: #cda869; } /**/ +.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ +.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ +.cm-s-twilight .cm-string-2 { color:#bd6b18; } /*?*/ +.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/ +.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/ +.cm-s-twilight .cm-tag { color: #997643; } /**/ +.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ +.cm-s-twilight .cm-header { color: #FF6400; } +.cm-s-twilight .cm-hr { color: #AEAEAE; } +.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/ +.cm-s-twilight .cm-error { border-bottom: 1px solid red; } + +.cm-s-twilight .CodeMirror-activeline-background { background: #27282E; } +.cm-s-twilight .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } diff --git a/js/codemirror/theme/vibrant-ink.css b/js/codemirror/theme/vibrant-ink.css new file mode 100644 index 0000000..6358ad3 --- /dev/null +++ b/js/codemirror/theme/vibrant-ink.css @@ -0,0 +1,34 @@ +/* Taken from the popular Visual Studio Vibrant Ink Schema */ + +.cm-s-vibrant-ink.CodeMirror { background: black; color: white; } +.cm-s-vibrant-ink div.CodeMirror-selected { background: #35493c; } +.cm-s-vibrant-ink .CodeMirror-line::selection, .cm-s-vibrant-ink .CodeMirror-line > span::selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::selection { background: rgba(53, 73, 60, 0.99); } +.cm-s-vibrant-ink .CodeMirror-line::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span::-moz-selection, .cm-s-vibrant-ink .CodeMirror-line > span > span::-moz-selection { background: rgba(53, 73, 60, 0.99); } + +.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } +.cm-s-vibrant-ink .CodeMirror-guttermarker { color: white; } +.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle { color: #d0d0d0; } +.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-vibrant-ink .cm-keyword { color: #CC7832; } +.cm-s-vibrant-ink .cm-atom { color: #FC0; } +.cm-s-vibrant-ink .cm-number { color: #FFEE98; } +.cm-s-vibrant-ink .cm-def { color: #8DA6CE; } +.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D; } +.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def, .cm-s-vibrant span.cm-type { color: #FFC66D; } +.cm-s-vibrant-ink .cm-operator { color: #888; } +.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } +.cm-s-vibrant-ink .cm-string { color: #A5C25C; } +.cm-s-vibrant-ink .cm-string-2 { color: red; } +.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; } +.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; } +.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; } +.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; } +.cm-s-vibrant-ink .cm-header { color: #FF6400; } +.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; } +.cm-s-vibrant-ink .cm-link { color: #5656F3; } +.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; } + +.cm-s-vibrant-ink .CodeMirror-activeline-background { background: #27282E; } +.cm-s-vibrant-ink .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } diff --git a/js/codemirror/theme/xq-dark.css b/js/codemirror/theme/xq-dark.css new file mode 100644 index 0000000..7da1a0f --- /dev/null +++ b/js/codemirror/theme/xq-dark.css @@ -0,0 +1,53 @@ +/* +Copyright (C) 2011 by MarkLogic Corporation +Author: Mike Brevoort + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; } +.cm-s-xq-dark div.CodeMirror-selected { background: #27007A; } +.cm-s-xq-dark .CodeMirror-line::selection, .cm-s-xq-dark .CodeMirror-line > span::selection, .cm-s-xq-dark .CodeMirror-line > span > span::selection { background: rgba(39, 0, 122, 0.99); } +.cm-s-xq-dark .CodeMirror-line::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span::-moz-selection, .cm-s-xq-dark .CodeMirror-line > span > span::-moz-selection { background: rgba(39, 0, 122, 0.99); } +.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } +.cm-s-xq-dark .CodeMirror-guttermarker { color: #FFBD40; } +.cm-s-xq-dark .CodeMirror-guttermarker-subtle { color: #f8f8f8; } +.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; } +.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white; } + +.cm-s-xq-dark span.cm-keyword { color: #FFBD40; } +.cm-s-xq-dark span.cm-atom { color: #6C8CD5; } +.cm-s-xq-dark span.cm-number { color: #164; } +.cm-s-xq-dark span.cm-def { color: #FFF; text-decoration:underline; } +.cm-s-xq-dark span.cm-variable { color: #FFF; } +.cm-s-xq-dark span.cm-variable-2 { color: #EEE; } +.cm-s-xq-dark span.cm-variable-3, .cm-s-xq-dark span.cm-type { color: #DDD; } +.cm-s-xq-dark span.cm-property {} +.cm-s-xq-dark span.cm-operator {} +.cm-s-xq-dark span.cm-comment { color: gray; } +.cm-s-xq-dark span.cm-string { color: #9FEE00; } +.cm-s-xq-dark span.cm-meta { color: yellow; } +.cm-s-xq-dark span.cm-qualifier { color: #FFF700; } +.cm-s-xq-dark span.cm-builtin { color: #30a; } +.cm-s-xq-dark span.cm-bracket { color: #cc7; } +.cm-s-xq-dark span.cm-tag { color: #FFBD40; } +.cm-s-xq-dark span.cm-attribute { color: #FFF700; } +.cm-s-xq-dark span.cm-error { color: #f00; } + +.cm-s-xq-dark .CodeMirror-activeline-background { background: #27282E; } +.cm-s-xq-dark .CodeMirror-matchingbracket { outline:1px solid grey; color:white !important; } diff --git a/js/codemirror/theme/xq-light.css b/js/codemirror/theme/xq-light.css new file mode 100644 index 0000000..7b182ea --- /dev/null +++ b/js/codemirror/theme/xq-light.css @@ -0,0 +1,43 @@ +/* +Copyright (C) 2011 by MarkLogic Corporation +Author: Mike Brevoort + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +.cm-s-xq-light span.cm-keyword { line-height: 1em; font-weight: bold; color: #5A5CAD; } +.cm-s-xq-light span.cm-atom { color: #6C8CD5; } +.cm-s-xq-light span.cm-number { color: #164; } +.cm-s-xq-light span.cm-def { text-decoration:underline; } +.cm-s-xq-light span.cm-variable { color: black; } +.cm-s-xq-light span.cm-variable-2 { color:black; } +.cm-s-xq-light span.cm-variable-3, .cm-s-xq-light span.cm-type { color: black; } +.cm-s-xq-light span.cm-property {} +.cm-s-xq-light span.cm-operator {} +.cm-s-xq-light span.cm-comment { color: #0080FF; font-style: italic; } +.cm-s-xq-light span.cm-string { color: red; } +.cm-s-xq-light span.cm-meta { color: yellow; } +.cm-s-xq-light span.cm-qualifier { color: grey; } +.cm-s-xq-light span.cm-builtin { color: #7EA656; } +.cm-s-xq-light span.cm-bracket { color: #cc7; } +.cm-s-xq-light span.cm-tag { color: #3F7F7F; } +.cm-s-xq-light span.cm-attribute { color: #7F007F; } +.cm-s-xq-light span.cm-error { color: #f00; } + +.cm-s-xq-light .CodeMirror-activeline-background { background: #e8f2ff; } +.cm-s-xq-light .CodeMirror-matchingbracket { outline:1px solid grey;color:black !important;background:yellow; } diff --git a/js/codemirror/theme/yeti.css b/js/codemirror/theme/yeti.css new file mode 100644 index 0000000..d085f72 --- /dev/null +++ b/js/codemirror/theme/yeti.css @@ -0,0 +1,44 @@ +/* + + Name: yeti + Author: Michael Kaminsky (http://github.com/mkaminsky11) + + Original yeti color scheme by Jesse Weed (https://github.com/jesseweed/yeti-syntax) + +*/ + + +.cm-s-yeti.CodeMirror { + background-color: #ECEAE8 !important; + color: #d1c9c0 !important; + border: none; +} + +.cm-s-yeti .CodeMirror-gutters { + color: #adaba6; + background-color: #E5E1DB; + border: none; +} +.cm-s-yeti .CodeMirror-cursor { border-left: solid thin #d1c9c0; } +.cm-s-yeti .CodeMirror-linenumber { color: #adaba6; } +.cm-s-yeti.CodeMirror-focused div.CodeMirror-selected { background: #DCD8D2; } +.cm-s-yeti .CodeMirror-line::selection, .cm-s-yeti .CodeMirror-line > span::selection, .cm-s-yeti .CodeMirror-line > span > span::selection { background: #DCD8D2; } +.cm-s-yeti .CodeMirror-line::-moz-selection, .cm-s-yeti .CodeMirror-line > span::-moz-selection, .cm-s-yeti .CodeMirror-line > span > span::-moz-selection { background: #DCD8D2; } +.cm-s-yeti span.cm-comment { color: #d4c8be; } +.cm-s-yeti span.cm-string, .cm-s-yeti span.cm-string-2 { color: #96c0d8; } +.cm-s-yeti span.cm-number { color: #a074c4; } +.cm-s-yeti span.cm-variable { color: #55b5db; } +.cm-s-yeti span.cm-variable-2 { color: #a074c4; } +.cm-s-yeti span.cm-def { color: #55b5db; } +.cm-s-yeti span.cm-operator { color: #9fb96e; } +.cm-s-yeti span.cm-keyword { color: #9fb96e; } +.cm-s-yeti span.cm-atom { color: #a074c4; } +.cm-s-yeti span.cm-meta { color: #96c0d8; } +.cm-s-yeti span.cm-tag { color: #96c0d8; } +.cm-s-yeti span.cm-attribute { color: #9fb96e; } +.cm-s-yeti span.cm-qualifier { color: #96c0d8; } +.cm-s-yeti span.cm-property { color: #a074c4; } +.cm-s-yeti span.cm-builtin { color: #a074c4; } +.cm-s-yeti span.cm-variable-3, .cm-s-yeti span.cm-type { color: #96c0d8; } +.cm-s-yeti .CodeMirror-activeline-background { background: #E7E4E0; } +.cm-s-yeti .CodeMirror-matchingbracket { text-decoration: underline; } diff --git a/js/codemirror/theme/yonce.css b/js/codemirror/theme/yonce.css new file mode 100644 index 0000000..975f078 --- /dev/null +++ b/js/codemirror/theme/yonce.css @@ -0,0 +1,59 @@ +/* + + Name: yoncé + Author: Thomas MacLean (http://github.com/thomasmaclean) + + Original yoncé color scheme by Mina Markham (https://github.com/minamarkham) + +*/ + +.cm-s-yonce.CodeMirror { background: #1C1C1C; color: #d4d4d4; } /**/ +.cm-s-yonce div.CodeMirror-selected { background: rgba(252, 69, 133, 0.478); } /**/ +.cm-s-yonce .CodeMirror-selectedtext, +.cm-s-yonce .CodeMirror-selected, +.cm-s-yonce .CodeMirror-line::selection, +.cm-s-yonce .CodeMirror-line > span::selection, +.cm-s-yonce .CodeMirror-line > span > span::selection, +.cm-s-yonce .CodeMirror-line::-moz-selection, +.cm-s-yonce .CodeMirror-line > span::-moz-selection, +.cm-s-yonce .CodeMirror-line > span > span::-moz-selection { background: rgba(252, 67, 132, 0.47); } + +.cm-s-yonce.CodeMirror pre { padding-left: 0px; } +.cm-s-yonce .CodeMirror-gutters {background: #1C1C1C; border-right: 0px;} +.cm-s-yonce .CodeMirror-linenumber {color: #777777; padding-right: 10px; } +.cm-s-yonce .CodeMirror-activeline .CodeMirror-linenumber.CodeMirror-gutter-elt { background: #1C1C1C; color: #fc4384; } +.cm-s-yonce .CodeMirror-linenumber { color: #777; } +.cm-s-yonce .CodeMirror-cursor { border-left: 2px solid #FC4384; } +.cm-s-yonce .cm-searching { background: rgba(243, 155, 53, .3) !important; outline: 1px solid #F39B35; } +.cm-s-yonce .cm-searching.CodeMirror-selectedtext { background: rgba(243, 155, 53, .7) !important; color: white; } + +.cm-s-yonce .cm-keyword { color: #00A7AA; } /**/ +.cm-s-yonce .cm-atom { color: #F39B35; } +.cm-s-yonce .cm-number, .cm-s-yonce span.cm-type { color: #A06FCA; } /**/ +.cm-s-yonce .cm-def { color: #98E342; } +.cm-s-yonce .cm-property, +.cm-s-yonce span.cm-variable { color: #D4D4D4; font-style: italic; } +.cm-s-yonce span.cm-variable-2 { color: #da7dae; font-style: italic; } +.cm-s-yonce span.cm-variable-3 { color: #A06FCA; } +.cm-s-yonce .cm-type.cm-def { color: #FC4384; font-style: normal; text-decoration: underline; } +.cm-s-yonce .cm-property.cm-def { color: #FC4384; font-style: normal; } +.cm-s-yonce .cm-callee { color: #FC4384; font-style: normal; } +.cm-s-yonce .cm-operator { color: #FC4384; } /**/ +.cm-s-yonce .cm-qualifier, +.cm-s-yonce .cm-tag { color: #FC4384; } +.cm-s-yonce .cm-tag.cm-bracket { color: #D4D4D4; } +.cm-s-yonce .cm-attribute { color: #A06FCA; } +.cm-s-yonce .cm-comment { color:#696d70; font-style:italic; font-weight:normal; } /**/ +.cm-s-yonce .cm-comment.cm-tag { color: #FC4384 } +.cm-s-yonce .cm-comment.cm-attribute { color: #D4D4D4; } +.cm-s-yonce .cm-string { color:#E6DB74; } /**/ +.cm-s-yonce .cm-string-2 { color:#F39B35; } /*?*/ +.cm-s-yonce .cm-meta { color: #D4D4D4; background: inherit; } +.cm-s-yonce .cm-builtin { color: #FC4384; } /*?*/ +.cm-s-yonce .cm-header { color: #da7dae; } +.cm-s-yonce .cm-hr { color: #98E342; } +.cm-s-yonce .cm-link { color:#696d70; font-style:italic; text-decoration:none; } /**/ +.cm-s-yonce .cm-error { border-bottom: 1px solid #C42412; } + +.cm-s-yonce .CodeMirror-activeline-background { background: #272727; } +.cm-s-yonce .CodeMirror-matchingbracket { outline:1px solid grey; color:#D4D4D4 !important; } diff --git a/js/codemirror/theme/zenburn.css b/js/codemirror/theme/zenburn.css new file mode 100644 index 0000000..4eb4247 --- /dev/null +++ b/js/codemirror/theme/zenburn.css @@ -0,0 +1,37 @@ +/** + * " + * Using Zenburn color palette from the Emacs Zenburn Theme + * https://github.com/bbatsov/zenburn-emacs/blob/master/zenburn-theme.el + * + * Also using parts of https://github.com/xavi/coderay-lighttable-theme + * " + * From: https://github.com/wisenomad/zenburn-lighttable-theme/blob/master/zenburn.css + */ + +.cm-s-zenburn .CodeMirror-gutters { background: #3f3f3f !important; } +.cm-s-zenburn .CodeMirror-foldgutter-open, .CodeMirror-foldgutter-folded { color: #999; } +.cm-s-zenburn .CodeMirror-cursor { border-left: 1px solid white; } +.cm-s-zenburn.CodeMirror { background-color: #3f3f3f; color: #dcdccc; } +.cm-s-zenburn span.cm-builtin { color: #dcdccc; font-weight: bold; } +.cm-s-zenburn span.cm-comment { color: #7f9f7f; } +.cm-s-zenburn span.cm-keyword { color: #f0dfaf; font-weight: bold; } +.cm-s-zenburn span.cm-atom { color: #bfebbf; } +.cm-s-zenburn span.cm-def { color: #dcdccc; } +.cm-s-zenburn span.cm-variable { color: #dfaf8f; } +.cm-s-zenburn span.cm-variable-2 { color: #dcdccc; } +.cm-s-zenburn span.cm-string { color: #cc9393; } +.cm-s-zenburn span.cm-string-2 { color: #cc9393; } +.cm-s-zenburn span.cm-number { color: #dcdccc; } +.cm-s-zenburn span.cm-tag { color: #93e0e3; } +.cm-s-zenburn span.cm-property { color: #dfaf8f; } +.cm-s-zenburn span.cm-attribute { color: #dfaf8f; } +.cm-s-zenburn span.cm-qualifier { color: #7cb8bb; } +.cm-s-zenburn span.cm-meta { color: #f0dfaf; } +.cm-s-zenburn span.cm-header { color: #f0efd0; } +.cm-s-zenburn span.cm-operator { color: #f0efd0; } +.cm-s-zenburn span.CodeMirror-matchingbracket { box-sizing: border-box; background: transparent; border-bottom: 1px solid; } +.cm-s-zenburn span.CodeMirror-nonmatchingbracket { border-bottom: 1px solid; background: none; } +.cm-s-zenburn .CodeMirror-activeline { background: #000000; } +.cm-s-zenburn .CodeMirror-activeline-background { background: #000000; } +.cm-s-zenburn div.CodeMirror-selected { background: #545454; } +.cm-s-zenburn .CodeMirror-focused div.CodeMirror-selected { background: #4f4f4f; } diff --git a/lib/jkanban.min.css b/js/jkanban.min.css similarity index 100% rename from lib/jkanban.min.css rename to js/jkanban.min.css diff --git a/lib/jkanban.min.js b/js/jkanban.min.js similarity index 100% rename from lib/jkanban.min.js rename to js/jkanban.min.js diff --git a/js/jquery.js b/js/jquery.js new file mode 100644 index 0000000..459ddab --- /dev/null +++ b/js/jquery.js @@ -0,0 +1,2 @@ +/*! jQuery v4.0.0-beta+slim | (c) OpenJS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t(e,!0):t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";if(!e.document)throw Error("jQuery requires a window with a document");var n,r,i=[],o=Object.getPrototypeOf,a=i.slice,s=i.flat?function(e){return i.flat.call(e)}:function(e){return i.concat.apply([],e)},u=i.push,l=i.indexOf,c={},f=c.toString,p=c.hasOwnProperty,d=p.toString,h=d.call(Object),g={};function v(e){return null==e?e+"":"object"==typeof e?c[f.call(e)]||"object":typeof e}function y(e){return null!=e&&e===e.window}function m(e){var t=!!e&&e.length,n=v(e);return!("function"==typeof e||y(e))&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var x=e.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i=(n=n||x).createElement("script");for(r in i.text=e,b)t&&t[r]&&(i[r]=t[r]);n.head.appendChild(i).parentNode&&i.parentNode.removeChild(i)}var T="4.0.0-beta+slim",C=/HTML$/i,E=function(e,t){return new E.fn.init(e,t)};function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}E.fn=E.prototype={jquery:T,constructor:E,length:0,toArray:function(){return a.call(this)},get:function(e){return null==e?a.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(e){return this.pushStack(E.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(E.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(E.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+D+")"+D+"*"),P=RegExp(D+"|>"),R=/[+~]/,H=x.documentElement,I=H.matches||H.msMatchesSelector;function $(){var e=[];function t(n,r){return e.push(n+" ")>E.expr.cacheLength&&delete t[e.shift()],t[n+" "]=r}return t}function B(e){return e&&void 0!==e.getElementsByTagName&&e}var M="\\["+D+"*("+O+")(?:"+D+"*([*^$|!~]?=)"+D+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+D+"*\\]",q=":("+O+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",W={ID:RegExp("^#("+O+")"),CLASS:RegExp("^\\.("+O+")"),TAG:RegExp("^("+O+"|[*])"),ATTR:RegExp("^"+M),PSEUDO:RegExp("^"+q),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i")},F=new RegExp(q),U=RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),z=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))};function X(e){return e.replace(U,z)}function _(e){E.error("Syntax error, unrecognized expression: "+e)}var V=RegExp("^"+D+"*,"+D+"*"),Y=$();function Q(e,t){var n,r,i,o,a,s,u,l=Y[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=E.expr.preFilter;while(a){for(o in(!n||(r=V.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=L.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(j," ")}),a=a.slice(n.length)),W)(r=E.expr.match[o].exec(a))&&(!u[o]||(r=u[o](r)))&&(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?_(e):Y(e,s).slice(0)}function G(e){for(var t=0,n=e.length,r="";t1)},removeAttr:function(e){return this.each(function(){E.removeAttr(this,e)})}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o){if(void 0===e.getAttribute)return E.prop(e,t,n);if(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]),void 0!==n){if(null===n){E.removeAttr(e,t);return}return i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n),n)}return i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=e.getAttribute(t))?void 0:r}},attrHooks:{},removeAttr:function(e,t){var n,r=0,i=t&&t.match(J);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),k&&(E.attrHooks.type={set:function(e,t){if("radio"===t&&S(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}),E.each("checked selected async autofocus autoplay controls defer disabled hidden ismap loop multiple open readonly required scoped".split(" "),function(e,t){E.attrHooks[t]={get:function(e){return null!=e.getAttribute(t)?t.toLowerCase():null},set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}}});var Z=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function ee(e,t){return t?"\x00"===e?"\uFFFD":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}E.escapeSelector=function(e){return(e+"").replace(Z,ee)};var et=i.sort,en=i.splice;function er(e,t){if(e===t)return ei=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)?e==x||e.ownerDocument==x&&E.contains(x,e)?-1:t==x||t.ownerDocument==x&&E.contains(x,t)?1:0:4&n?-1:1)}E.uniqueSort=function(e){var t,n=[],r=0,i=0;if(ei=!1,et.call(e,er),ei){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)en.call(e,n[r],1)}return e},E.fn.uniqueSort=function(){return this.pushStack(E.uniqueSort(a.apply(this)))};var ei,eo,ea,es,eu,el,ec=0,ef=0,ep=$(),ed=$(),eh=$(),eg=RegExp(D+"+","g"),ev=RegExp("^"+O+"$"),ey=E.extend({needsContext:RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},W),em=/^(?:input|select|textarea|button)$/i,ex=/^h\d$/i,eb=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ew=function(){eD()},eT=eN(function(e){return!0===e.disabled&&S(e,"fieldset")},{dir:"parentNode",next:"legend"});function eC(e,t,n,r){var i,o,a,s,l,c,f,p=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!r&&(eD(t),t=t||es,el)){if(11!==d&&(l=eb.exec(e))){if(i=l[1]){if(9===d)return(a=t.getElementById(i))&&u.call(n,a),n;if(p&&(a=p.getElementById(i))&&E.contains(t,a))return u.call(n,a),n}else if(l[2])return u.apply(n,t.getElementsByTagName(e)),n;else if((i=l[3])&&t.getElementsByClassName)return u.apply(n,t.getElementsByClassName(i)),n}if(!eh[e+" "]&&(!N||!N.test(e))){if(f=e,p=t,1===d&&(P.test(e)||L.test(e))){((p=R.test(e)&&B(t.parentNode)||t)!=t||k)&&((s=t.getAttribute("id"))?s=E.escapeSelector(s):t.setAttribute("id",s=E.expando)),o=(c=Q(e)).length;while(o--)c[o]=(s?"#"+s:":scope")+" "+G(c[o]);f=c.join(",")}try{return u.apply(n,p.querySelectorAll(f)),n}catch(t){eh(e,!0)}finally{s===E.expando&&t.removeAttribute("id")}}}return eP(e.replace(j,"$1"),t,n,r)}function eE(e){return e[E.expando]=!0,e}function eS(e){return function(t){if("form"in t)return t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||!e!==t.isDisabled&&eT(t)===e:t.disabled===e;return"label"in t&&t.disabled===e}}function eA(e){return eE(function(t){return t=+t,eE(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function eD(e){var t,n=e?e.ownerDocument||e:x;n!=es&&9===n.nodeType&&(eu=(es=n).documentElement,el=!E.isXMLDoc(es),k&&x!=es&&(t=es.defaultView)&&t.top!==t&&t.addEventListener("unload",ew))}for(eo in eC.matches=function(e,t){return eC(e,null,null,t)},eC.matchesSelector=function(e,t){if(eD(e),el&&!eh[t+" "]&&(!N||!N.test(t)))try{return I.call(e,t)}catch(e){eh(t,!0)}return eC(t,es,null,[e]).length>0},E.expr={cacheLength:50,createPseudo:eE,match:ey,find:{ID:function(e,t){if(void 0!==t.getElementById&&el){var n=t.getElementById(e);return n?[n]:[]}},TAG:function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},CLASS:function(e,t){if(void 0!==t.getElementsByClassName&&el)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=X(e[1]),e[3]=X(e[3]||e[4]||e[5]||""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||_(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&_(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return W.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&F.test(n)&&(t=Q(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{ID:function(e){var t=X(e);return function(e){return e.getAttribute("id")===t}},TAG:function(e){var t=X(e).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=ep[e+" "];return t||(t=RegExp("(^|"+D+")"+e+"("+D+"|$)"),ep(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=E.attr(r,e);return null==i?"!="===t:!t||((i+="","="===t)?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(eg," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!u&&!s,m=!1;if(g){if(o){while(h){f=t;while(f=f[h])if(s?S(f,v):1===f.nodeType)return!1;d=h="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?g.firstChild:g.lastChild],a&&y){m=(p=(l=(c=g[E.expando]||(g[E.expando]={}))[e]||[])[0]===ec&&l[1])&&l[2],f=p&&g.childNodes[p];while(f=++p&&f&&f[h]||(m=p=0)||d.pop())if(1===f.nodeType&&++m&&f===t){c[e]=[ec,p,m];break}}else if(y&&(m=p=(l=(c=t[E.expando]||(t[E.expando]={}))[e]||[])[0]===ec&&l[1]),!1===m){while(f=++p&&f&&f[h]||(m=p=0)||d.pop())if((s?S(f,v):1===f.nodeType)&&++m&&(y&&((c=f[E.expando]||(f[E.expando]={}))[e]=[ec,m]),f===t))break}return(m-=i)===r||m%r==0&&m/r>=0}}},PSEUDO:function(e,t){var n=E.expr.pseudos[e]||E.expr.setFilters[e.toLowerCase()]||_("unsupported pseudo: "+e);return n[E.expando]?n(t):n}},pseudos:{not:eE(function(e){var t=[],n=[],r=eL(e.replace(j,"$1"));return r[E.expando]?eE(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:eE(function(e){return function(t){return eC(e,t).length>0}}),contains:eE(function(e){return e=X(e),function(t){return(t.textContent||E.text(t)).indexOf(e)>-1}}),lang:eE(function(e){return ev.test(e||"")||_("unsupported lang: "+e),e=X(e).toLowerCase(),function(t){var n;do if(n=el?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===eu},focus:function(e){return e===es.activeElement&&es.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:eS(!1),disabled:eS(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return k&&e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!E.expr.pseudos.empty(e)},header:function(e){return ex.test(e.nodeName)},input:function(e){return em.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){return S(e,"input")&&"text"===e.type},first:eA(function(){return[0]}),last:eA(function(e,t){return[t-1]}),eq:eA(function(e,t,n){return[n<0?n+t:n]}),even:eA(function(e,t){for(var n=0;nt?t:n;--r>=0;)e.push(r);return e}),gt:eA(function(e,t,n){for(var r=n<0?n+t:n;++r1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function eO(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s-1},s,!0),d=[function(e,t,r){var i=!a&&(r||t!=ea)||((n=t).nodeType?f(e,t,r):p(e,t,r));return n=null,i}];c-1&&(e[f]=!(a[f]=d))}}else h=eO(h===a?h.splice(y,h.length):h),o?o(null,a,h,c):u.apply(a,h)})}(c>1&&ej(d),c>1&&G(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(j,"$1"),r,c0,r=s.length>0,i=function(e,t,i,o,l){var c,f,p,d=0,h="0",g=e&&[],v=[],y=ea,m=e||r&&E.expr.find.TAG("*",l),x=ec+=null==y?1:Math.random()||.1;for(l&&(ea=t==es||t||l);null!=(c=m[h]);h++){if(r&&c){f=0,t||c.ownerDocument==es||(eD(c),i=!el);while(p=s[f++])if(p(c,t||es,i)){u.call(o,c);break}l&&(ec=x)}n&&((c=!p&&c)&&d--,e&&g.push(c))}if(d+=h,n&&h!==d){f=0;while(p=a[f++])p(g,v,t,i);if(e){if(d>0)while(h--)g[h]||v[h]||(v[h]=A.call(o));v=eO(v)}u.apply(o,v),l&&!e&&v.length>0&&d+a.length>1&&E.uniqueSort(o)}return l&&(ec=x,ea=y),g},n?eE(i):i))).selector=e}return c}function eP(e,t,n,r){var i,o,a,s,l,c="function"==typeof e&&e,f=!r&&Q(e=c.selector||e);if(n=n||[],1===f.length){if((o=f[0]=f[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&el&&E.expr.relative[o[1].type]){if(!(t=(E.expr.find.ID(X(a.matches[0]),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=ey.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],E.expr.relative[s=a.type])break;if((l=E.expr.find[s])&&(r=l(X(a.matches[0]),R.test(o[0].type)&&B(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&G(o)))return u.apply(n,r),n;break}}}return(c||eL(e,f))(r,t,!el,n,!t||R.test(e)&&B(t.parentNode)||t),n}function eR(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r}function eH(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}ek.prototype=E.expr.filters=E.expr.pseudos,E.expr.setFilters=new ek,eD(),E.find=eC,eC.compile=eL,eC.select=eP,eC.setDocument=eD,eC.tokenize=Q;var eI=E.expr.match.needsContext,e$=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function eB(e){return"<"===e[0]&&">"===e[e.length-1]&&e.length>=3}function eM(e,t,n){return"function"==typeof t?E.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?E.grep(e,function(e){return e===t!==n}):"string"!=typeof t?E.grep(e,function(e){return l.call(t,e)>-1!==n}):E.filter(t,e,n)}E.filter=function(e,t,n){var r=t[0];return(n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType)?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,function(e){return 1===e.nodeType}))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter(function(){for(t=0;t1?E.uniqueSort(n):n},filter:function(e){return this.pushStack(eM(this,e||[],!1))},not:function(e){return this.pushStack(eM(this,e||[],!0))},is:function(e){return!!eM(this,"string"==typeof e&&eI.test(e)?E(e):e||[],!1).length}});var eq,eW=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t){var n,r;if(!e)return this;if(e.nodeType)return this[0]=e,this.length=1,this;if("function"==typeof e)return void 0!==eq.ready?eq.ready(e):e(E);if(eB(n=e+""))n=[null,e,null];else{if("string"!=typeof e)return E.makeArray(e,this);n=eW.exec(e)}if(n&&(n[1]||!t)){if(!n[1])return(r=x.getElementById(n[2]))&&(this[0]=r,this.length=1),this;if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:x,!0)),e$.test(n[1])&&E.isPlainObject(t))for(n in t)"function"==typeof this[n]?this[n](t[n]):this.attr(n,t[n]);return this}return!t||t.jquery?(t||eq).find(e):this.constructor(t).find(e)}).prototype=E.fn,eq=E(x);var eF=/^(?:parents|prev(?:Until|All))/,eU={children:!0,contents:!0,next:!0,prev:!0};function ez(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}}return this.pushStack(o.length>1?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?l.call(E(e),this[0]):l.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return eR(e,"parentNode")},parentsUntil:function(e,t,n){return eR(e,"parentNode",n)},next:function(e){return ez(e,"nextSibling")},prev:function(e){return ez(e,"previousSibling")},nextAll:function(e){return eR(e,"nextSibling")},prevAll:function(e){return eR(e,"previousSibling")},nextUntil:function(e,t,n){return eR(e,"nextSibling",n)},prevUntil:function(e,t,n){return eR(e,"previousSibling",n)},siblings:function(e){return eH((e.parentNode||{}).firstChild,e)},children:function(e){return eH(e.firstChild)},contents:function(e){return null!=e.contentDocument&&o(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},function(e,t){E.fn[e]=function(n,r){var i=E.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=E.filter(r,i)),this.length>1&&(eU[e]||E.uniqueSort(i),eF.test(e)&&i.reverse()),this.pushStack(i)}});var eX=/-([a-z])/g;function e_(e,t){return t.toUpperCase()}function eV(e){return e.replace(eX,e_)}function eY(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function eQ(){this.expando=E.expando+eQ.uid++}eQ.uid=1,eQ.prototype={cache:function(e){var t=e[this.expando];return!t&&(t=Object.create(null),eY(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[eV(t)]=n;else for(r in t)i[eV(r)]=t[r];return n},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][eV(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(eV):(t=eV(t))in r?[t]:t.match(J)||[]).length;while(n--)delete r[t[n]]}(void 0===t||E.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var eG=new eQ,eK=new eQ,eJ=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,eZ=/[A-Z]/g;function e0(e,t,n){var r,i;if(void 0===n&&1===e.nodeType){if(r="data-"+t.replace(eZ,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{i=n,n="true"===i||"false"!==i&&("null"===i?null:i===+i+""?+i:eJ.test(i)?JSON.parse(i):i)}catch(e){}eK.set(e,t,n)}else n=void 0}return n}E.extend({hasData:function(e){return eK.hasData(e)||eG.hasData(e)},data:function(e,t,n){return eK.access(e,t,n)},removeData:function(e,t){eK.remove(e,t)},_data:function(e,t,n){return eG.access(e,t,n)},_removeData:function(e,t){eG.remove(e,t)}}),E.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=eK.get(o),1===o.nodeType&&!eG.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&e0(o,r=eV(r.slice(5)),i[r]);eG.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){eK.set(this,e)}):K(this,function(t){var n;if(o&&void 0===t)return void 0!==(n=eK.get(o,e))||void 0!==(n=e0(o,e))?n:void 0;this.each(function(){eK.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){eK.remove(this,e)})}});var e1=/^(?:input|select|textarea|button)$/i,e2=/^(?:a|area)$/i;function e3(e){return(e.match(J)||[]).join(" ")}function e5(e){return e.getAttribute&&e.getAttribute("class")||""}function e9(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(J)||[]}E.fn.extend({prop:function(e,t){return K(this,E.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[E.propFix[e]||e]})}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return(1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n)?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttribute("tabindex");return t?parseInt(t,10):e1.test(e.nodeName)||e2.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),k&&(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){E.propFix[this.toLowerCase()]=this}),E.fn.extend({addClass:function(e){var t,n,r,i,o,a;return"function"==typeof e?this.each(function(t){E(this).addClass(e.call(this,t,e5(this)))}):(t=e9(e)).length?this.each(function(){if(r=e5(this),n=1===this.nodeType&&" "+e3(r)+" "){for(o=0;on.indexOf(" "+i+" ")&&(n+=i+" ");r!==(a=e3(n))&&this.setAttribute("class",a)}}):this},removeClass:function(e){var t,n,r,i,o,a;return"function"==typeof e?this.each(function(t){E(this).removeClass(e.call(this,t,e5(this)))}):arguments.length?(t=e9(e)).length?this.each(function(){if(r=e5(this),n=1===this.nodeType&&" "+e3(r)+" "){for(o=0;o-1)n=n.replace(" "+i+" "," ")}r!==(a=e3(n))&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,o;return"function"==typeof e?this.each(function(n){E(this).toggleClass(e.call(this,n,e5(this),t),t)}):"boolean"==typeof t?t?this.addClass(e):this.removeClass(e):(n=e9(e)).length?this.each(function(){for(i=0,o=E(this);i-1)return!0;return!1}}),E.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r="function"==typeof e,this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,E(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=E.map(i,function(e){return null==e?"":e+""})),(t=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))})):i?(t=E.valHooks[i.type]||E.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:null==(n=i.value)?"":n:void 0}}),E.extend({valHooks:{select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k&&(E.valHooks.option={get:function(e){var t=e.getAttribute("value");return null!=t?t:e3(E.text(e))}}),E.each(["radio","checkbox"],function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=E.inArray(E(e).val(),t)>-1}}});var e6=/^(?:checkbox|radio)$/i,e4=/^([^.]*)(?:\.(.+)|)/;function e8(){return!0}function e7(){return!1}function te(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)te(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=e7;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}function tt(e,t,n){if(!n){void 0===eG.get(e,t)&&E.event.add(e,t,e8);return}eG.set(e,t,!1),E.event.add(e,t,{namespace:!1,handler:function(e){var n,r=eG.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(E.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=a.call(arguments),eG.set(this,t,r),this[t](),n=eG.get(this,t),eG.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(eG.set(this,t,E.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=e8)}})}E.event={add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=eG.get(e);if(eY(e)){n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(H,i),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events=Object.create(null)),(a=v.handle)||(a=v.handle=function(t){return E.event.triggered!==t.type?E.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(J)||[""]).length;while(l--){if(d=g=(s=e4.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),!d)continue;f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,(!f.setup||!1===f.setup.call(e,r,h,a))&&e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c)}}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=eG.hasData(e)&&eG.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(J)||[""]).length;while(l--){if(d=g=(s=e4.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),!d){for(d in u)E.event.remove(e,d+t[l],n,r,!0);continue}f=E.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],(i||g===c.origType)&&(!n||n.guid===c.guid)&&(!s||s.test(c.namespace))&&(!r||r===c.selector||"**"===r&&c.selector)&&(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,d,v.handle),delete u[d])}E.isEmptyObject(u)&&eG.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=Array(arguments.length),u=E.event.fix(e),l=(eG.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(t=1,s[0]=u;t=1)){for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&!("click"===e.type&&!0===l.disabled)){for(n=0,o=[],a={};n-1:E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}}return l=this,u-1&&(g=(v=g.split(".")).shift(),v.sort()),l=0>g.indexOf(":")&&"on"+g,(t=t[E.expando]?t:new E.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=v.join("."),t.rnamespace=t.namespace?RegExp("(^|\\.)"+v.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:E.makeArray(n,[t]),f=E.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(r,n))){if(!i&&!f.noBubble&&!y(r)){for(u=f.delegateType||g,tn.test(u+g)||(a=a.parentNode);a;a=a.parentNode)h.push(a),s=a;s===(r.ownerDocument||x)&&h.push(s.defaultView||s.parentWindow||e)}o=0;while((a=h[o++])&&!t.isPropagationStopped())d=a,t.type=o>1?u:f.bindType||g,(c=(eG.get(a,"events")||Object.create(null))[t.type]&&eG.get(a,"handle"))&&c.apply(a,n),(c=l&&a[l])&&c.apply&&eY(a)&&(t.result=c.apply(a,n),!1===t.result&&t.preventDefault());return t.type=g,!i&&!t.isDefaultPrevented()&&(!f._default||!1===f._default.apply(h.pop(),n))&&eY(r)&&l&&"function"==typeof r[g]&&!y(r)&&((s=r[l])&&(r[l]=null),E.event.triggered=g,t.isPropagationStopped()&&d.addEventListener(g,tr),r[g](),t.isPropagationStopped()&&d.removeEventListener(g,tr),E.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each(function(){E.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}});var ti=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(to)===e.ownerDocument},to={composed:!0};H.getRootNode||(ti=function(e){return E.contains(e.ownerDocument,e)});var ta=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,ts={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};function tu(e,t){var n;return(n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&S(e,t))?E.merge([e],n):n}ts.tbody=ts.tfoot=ts.colgroup=ts.caption=ts.thead,ts.th=ts.td;var tl=/^$|^module$|\/(?:java|ecma)script/i;function tc(e,t){for(var n=0,r=e.length;n-1)s=s.appendChild(t.createElement(u[c]));s.innerHTML=E.htmlPrefilter(a),E.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(a))}f.textContent="",d=0;while(a=p[d++]){if(r&&E.inArray(a,r)>-1){o&&o.push(a);continue}if(l=ti(a),s=tu(f.appendChild(a),"script"),l&&tc(s),n){c=0;while(a=s[c++])tl.test(a.type||"")&&n.push(a)}}return f}function td(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function th(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function tg(e,t,n,r){t=s(t);var i,o,a,u,l,c,f=0,p=e.length,d=p-1,h=t[0];if("function"==typeof h)return e.each(function(i){var o=e.eq(i);t[0]=h.call(this,i,o.html()),tg(o,t,n,r)});if(p&&(o=(i=tp(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(a=E.map(tu(i,"script"),td)).length;f0&&tc(a,!u&&tu(e,"script")),s},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(eY(n)){if(t=n[eG.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[eG.expando]=void 0}n[eK.expando]&&(n[eK.expando]=void 0)}}}),E.fn.extend({detach:function(e){return tx(this,e,!0)},remove:function(e){return tx(this,e)},text:function(e){return K(this,function(e){return void 0===e?E.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return tg(this,arguments,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&ty(this,e).appendChild(e)})},prepend:function(){return tg(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ty(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return tg(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return tg(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(tu(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return E.clone(this,e,t)})},html:function(e){return K(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!tv.test(e)&&!ts[(ta.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;nE.inArray(this,e)&&(E.cleanData(tu(this)),n&&n.replaceChild(t,this))},e)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){E.fn[e]=function(e){for(var n,r=[],i=E(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),E(i[a])[t](n),u.apply(r,n);return this.pushStack(r)}}),E.fn.extend({wrapAll:function(e){var t;return this[0]&&("function"==typeof e&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return"function"==typeof e?this.each(function(t){E(this).wrapInner(e.call(this,t))}):this.each(function(){var t=E(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t="function"==typeof e;return this.each(function(n){E(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){E(this).replaceWith(this.childNodes)}),this}});var tb=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,tw=RegExp("^(?:([+-])=|)("+tb+")([a-z%]*)$","i"),tT=RegExp("^("+tb+")(?!px)[a-z%]+$","i"),tC=/^--/,tE=["Top","Right","Bottom","Left"],tS=/^[a-z]/,tA=/^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;function tD(e){return tS.test(e)&&tA.test(e[0].toUpperCase()+e.slice(1))}var tk=/^-ms-/;function tN(e){return eV(e.replace(tk,"ms-"))}function tj(t){var n=t.ownerDocument.defaultView;return n||(n=e),n.getComputedStyle(t)}function tO(e,t,n){var r,i=tC.test(t);return(n=n||tj(e))&&(r=n.getPropertyValue(t)||n[t],i&&r&&(r=r.replace(j,"$1")||void 0),""!==r||ti(e)||(r=E.style(e,t))),void 0!==r?r+"":r}var tL=["Webkit","Moz","ms"],tP=x.createElement("div").style,tR={};function tH(e){return tR[e]||(e in tP?e:tR[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=tL.length;while(n--)if((e=tL[n]+t)in tP)return e}(e)||e)}(r=x.createElement("div")).style&&(g.reliableTrDimensions=function(){var t,i,o;if(null==n){if(t=x.createElement("table"),i=x.createElement("tr"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="box-sizing:content-box;border:1px solid",i.style.height="1px",r.style.height="9px",r.style.display="block",H.appendChild(t).appendChild(i).appendChild(r),0===t.offsetWidth){H.removeChild(t);return}n=parseInt((o=e.getComputedStyle(i)).height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===i.offsetHeight,H.removeChild(t)}return n});var tI=/^(none|table(?!-c[ea]).+)/,t$={position:"absolute",visibility:"hidden",display:"block"},tB={letterSpacing:"0",fontWeight:"400"};function tM(e,t,n){var r=tw.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function tq(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,l=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(l+=E.css(e,n+tE[a],!0,i)),r?("content"===n&&(u-=E.css(e,"padding"+tE[a],!0,i)),"margin"!==n&&(u-=E.css(e,"border"+tE[a]+"Width",!0,i))):(u+=E.css(e,"padding"+tE[a],!0,i),"padding"!==n?u+=E.css(e,"border"+tE[a]+"Width",!0,i):s+=E.css(e,"border"+tE[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+l}function tW(e,t,n){var r=tj(e),i=(k||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=tO(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(tT.test(a)){if(!n)return a;a="auto"}return("auto"===a||k&&i||!g.reliableTrDimensions()&&S(e,"tr"))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+tq(e,t,n||(i?"border":"content"),o,r,a)+"px"}function tF(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&"none"===E.css(e,"display")}E.extend({cssHooks:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=tN(t),u=tC.test(t),l=e.style;if(u||(t=tH(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=tw.exec(n))&&i[1]&&(n=function(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(e,t,"")},u=s(),l=n&&n[3]||(tD(t)?"px":""),c=e.nodeType&&(!tD(t)||"px"!==l&&+u)&&tw.exec(E.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)E.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,E.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}(e,t,i),o="number"),null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(tD(s)?"px":"")),k&&""===n&&0===t.indexOf("background")&&(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=tN(t);return(tC.test(t)||(t=tH(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=tO(e,t,r)),"normal"===i&&t in tB&&(i=tB[t]),""===n||n)?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],function(e,t){E.cssHooks[t]={get:function(e,n,r){if(n)return!tI.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tW(e,t,r):function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r}(e,t$,function(){return tW(e,t,r)})},set:function(e,n,r){var i,o=tj(e),a=r&&"border-box"===E.css(e,"boxSizing",!1,o),s=r?tq(e,t,r,a,o):0;return s&&(i=tw.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=E.css(e,t)),tM(e,n,s)}}}),E.each({margin:"",padding:"",border:"Width"},function(e,t){E.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+tE[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(E.cssHooks[e+t].set=tM)}),E.fn.extend({css:function(e,t){return K(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=tj(e),i=t.length;a1)}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)};var tU={};function tz(e,t){for(var n,r,i=[],o=0,a=e.length;o-1?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),"function"==typeof t&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){E.offset.setOffset(this,e,t)});var t,n,r=this[0];return r?r.getClientRects().length?(t=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&(i=E(e).offset(),i.top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||H})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;E.fn[e]=function(r){return K(this,function(e,r,i){var o;if(y(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i},e,r,arguments.length)}}),E.each({Height:"height",Width:"width"},function(e,t){E.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){E.fn[r]=function(i,o){var a=arguments.length&&(n||"boolean"!=typeof i),s=n||(!0===i||!0===o?"margin":"border");return K(this,function(t,n,i){var o;return y(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?E.css(t,n,s):E.style(t,n,i,s)},t,a?i:void 0,a)}})}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1==arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){E.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),E.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),"function"==typeof e)return r=a.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(a.call(arguments)))}).guid=e.guid=e.guid||E.guid++,i},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},"function"==typeof define&&define.amd&&define("jquery",[],function(){return E});var tQ=e.jQuery,tG=e.$;E.noConflict=function(t){return e.$===E&&(e.$=tG),t&&e.jQuery===E&&(e.jQuery=tQ),E},void 0===t&&(e.jQuery=e.$=E);var tK=[],tJ=function(e){tK.push(e)},tZ=function(t){e.setTimeout(function(){t.call(x,E)})};function t0(){x.removeEventListener("DOMContentLoaded",t0),e.removeEventListener("load",t0),E.ready()}return E.fn.ready=function(e){return tJ(e),this},E.extend({isReady:!1,readyWait:1,ready:function(e){!(!0===e?--E.readyWait:E.isReady)&&(E.isReady=!0,!0!==e&&--E.readyWait>0||(tJ=function(e){tK.push(e);while(tK.length)"function"==typeof(e=tK.shift())&&tZ(e)})())}}),E.ready.then=E.fn.ready,"loading"!==x.readyState?e.setTimeout(E.ready):(x.addEventListener("DOMContentLoaded",t0),e.addEventListener("load",t0)),E}); \ No newline at end of file diff --git a/js/js-yaml.js b/js/js-yaml.js new file mode 100644 index 0000000..bdd8eef --- /dev/null +++ b/js/js-yaml.js @@ -0,0 +1,2 @@ +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).jsyaml={})}(this,(function(e){"use strict";function t(e){return null==e}var n={isNothing:t,isObject:function(e){return"object"==typeof e&&null!==e},toArray:function(e){return Array.isArray(e)?e:t(e)?[]:[e]},repeat:function(e,t){var n,i="";for(n=0;nl&&(t=i-l+(o=" ... ").length),n-i>l&&(n=i+l-(a=" ...").length),{str:o+e.slice(t,n).replace(/\t/g,"→")+a,pos:i-t+o.length}}function l(e,t){return n.repeat(" ",t-e.length)+e}var c=function(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var i,r=/\r?\n|\r|\0/g,o=[0],c=[],s=-1;i=r.exec(e.buffer);)c.push(i.index),o.push(i.index+i[0].length),e.position<=i.index&&s<0&&(s=o.length-2);s<0&&(s=o.length-1);var u,p,f="",d=Math.min(e.line+t.linesAfter,c.length).toString().length,h=t.maxLength-(t.indent+d+3);for(u=1;u<=t.linesBefore&&!(s-u<0);u++)p=a(e.buffer,o[s-u],c[s-u],e.position-(o[s]-o[s-u]),h),f=n.repeat(" ",t.indent)+l((e.line-u+1).toString(),d)+" | "+p.str+"\n"+f;for(p=a(e.buffer,o[s],c[s],e.position,h),f+=n.repeat(" ",t.indent)+l((e.line+1).toString(),d)+" | "+p.str+"\n",f+=n.repeat("-",t.indent+d+3+p.pos)+"^\n",u=1;u<=t.linesAfter&&!(s+u>=c.length);u++)p=a(e.buffer,o[s+u],c[s+u],e.position-(o[s]-o[s+u]),h),f+=n.repeat(" ",t.indent)+l((e.line+u+1).toString(),d)+" | "+p.str+"\n";return f.replace(/\n$/,"")},s=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"];var p=function(e,t){if(t=t||{},Object.keys(t).forEach((function(t){if(-1===s.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function(e){var t={};return null!==e&&Object.keys(e).forEach((function(n){e[n].forEach((function(e){t[String(e)]=n}))})),t}(t.styleAliases||null),-1===u.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function f(e,t){var n=[];return e[t].forEach((function(e){var t=n.length;n.forEach((function(n,i){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=i)})),n[t]=e})),n}function d(e){return this.extend(e)}d.prototype.extend=function(e){var t=[],n=[];if(e instanceof p)n.push(e);else if(Array.isArray(e))n=n.concat(e);else{if(!e||!Array.isArray(e.implicit)&&!Array.isArray(e.explicit))throw new o("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit))}t.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(e.multi)throw new o("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")})),n.forEach((function(e){if(!(e instanceof p))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.")}));var i=Object.create(d.prototype);return i.implicit=(this.implicit||[]).concat(t),i.explicit=(this.explicit||[]).concat(n),i.compiledImplicit=f(i,"implicit"),i.compiledExplicit=f(i,"explicit"),i.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function i(e){e.multi?(n.multi[e.kind].push(e),n.multi.fallback.push(e)):n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),x=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var I=/^[-+]?[0-9]+e/;var S=new p("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!x.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||n.isNegativeZero(e))},represent:function(e,t){var i;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(n.isNegativeZero(e))return"-0.0";return i=e.toString(10),I.test(i)?i.replace("e",".e"):i},defaultStyle:"lowercase"}),O=b.extend({implicit:[A,v,C,S]}),j=O,T=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),N=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");var F=new p("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==T.exec(e)||null!==N.exec(e))},construct:function(e){var t,n,i,r,o,a,l,c,s=0,u=null;if(null===(t=T.exec(e))&&(t=N.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(o=+t[4],a=+t[5],l=+t[6],t[7]){for(s=t[7].slice(0,3);s.length<3;)s+="0";s=+s}return t[9]&&(u=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(u=-u)),c=new Date(Date.UTC(n,i,r,o,a,l,s)),u&&c.setTime(c.getTime()-u),c},instanceOf:Date,represent:function(e){return e.toISOString()}});var E=new p("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}}),M="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";var L=new p("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,i=0,r=e.length,o=M;for(n=0;n64)){if(t<0)return!1;i+=6}return i%8==0},construct:function(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,o=M,a=0,l=[];for(t=0;t>16&255),l.push(a>>8&255),l.push(255&a)),a=a<<6|o.indexOf(i.charAt(t));return 0===(n=r%4*6)?(l.push(a>>16&255),l.push(a>>8&255),l.push(255&a)):18===n?(l.push(a>>10&255),l.push(a>>2&255)):12===n&&l.push(a>>4&255),new Uint8Array(l)},predicate:function(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function(e){var t,n,i="",r=0,o=e.length,a=M;for(t=0;t>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+e[t];return 0===(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}}),_=Object.prototype.hasOwnProperty,D=Object.prototype.toString;var U=new p("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,i,r,o,a=[],l=e;for(t=0,n=l.length;t>10),56320+(e-65536&1023))}for(var ie=new Array(256),re=new Array(256),oe=0;oe<256;oe++)ie[oe]=te(oe)?1:0,re[oe]=te(oe);function ae(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||K,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function le(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=c(n),new o(t,n)}function ce(e,t){throw le(e,t)}function se(e,t){e.onWarning&&e.onWarning.call(null,le(e,t))}var ue={YAML:function(e,t,n){var i,r,o;null!==e.version&&ce(e,"duplication of %YAML directive"),1!==n.length&&ce(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&ce(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&ce(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=o<2,1!==o&&2!==o&&se(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&ce(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],G.test(i)||ce(e,"ill-formed tag handle (first argument) of the TAG directive"),P.call(e.tagMap,i)&&ce(e,'there is a previously declared suffix for "'+i+'" tag handle'),V.test(r)||ce(e,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch(t){ce(e,"tag prefix is malformed: "+r)}e.tagMap[i]=r}};function pe(e,t,n,i){var r,o,a,l;if(t1&&(e.result+=n.repeat("\n",t-1))}function be(e,t){var n,i,r=e.tag,o=e.anchor,a=[],l=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),i=e.input.charCodeAt(e.position);0!==i&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,ce(e,"tab characters must not be used in indentation")),45===i)&&z(e.input.charCodeAt(e.position+1));)if(l=!0,e.position++,ge(e,!0,-1)&&e.lineIndent<=t)a.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,we(e,t,3,!1,!0),a.push(e.result),ge(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)ce(e,"bad indentation of a sequence entry");else if(e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt?g=1:e.lineIndent===t?g=0:e.lineIndentt)&&(y&&(a=e.line,l=e.lineStart,c=e.position),we(e,t,4,!0,r)&&(y?g=e.result:m=e.result),y||(de(e,f,d,h,g,m,a,l,c),h=g=m=null),ge(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===o||e.lineIndent>t)&&0!==s)ce(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===o?ce(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?ce(e,"repeat of an indentation width identifier"):(p=t+o-1,u=!0)}if(Q(a)){do{a=e.input.charCodeAt(++e.position)}while(Q(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!J(a)&&0!==a)}for(;0!==a;){for(he(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndentp&&(p=e.lineIndent),J(a))f++;else{if(e.lineIndent0){for(r=a,o=0;r>0;r--)(a=ee(l=e.input.charCodeAt(++e.position)))>=0?o=(o<<4)+a:ce(e,"expected hexadecimal character");e.result+=ne(o),e.position++}else ce(e,"unknown escape sequence");n=i=e.position}else J(l)?(pe(e,n,i,!0),ye(e,ge(e,!1,t)),n=i=e.position):e.position===e.lineStart&&me(e)?ce(e,"unexpected end of the document within a double quoted scalar"):(e.position++,i=e.position)}ce(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?y=!0:!function(e){var t,n,i;if(42!==(i=e.input.charCodeAt(e.position)))return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!z(i)&&!X(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&ce(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),P.call(e.anchorMap,n)||ce(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],ge(e,!0,-1),!0}(e)?function(e,t,n){var i,r,o,a,l,c,s,u,p=e.kind,f=e.result;if(z(u=e.input.charCodeAt(e.position))||X(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(z(i=e.input.charCodeAt(e.position+1))||n&&X(i)))return!1;for(e.kind="scalar",e.result="",r=o=e.position,a=!1;0!==u;){if(58===u){if(z(i=e.input.charCodeAt(e.position+1))||n&&X(i))break}else if(35===u){if(z(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&me(e)||n&&X(u))break;if(J(u)){if(l=e.line,c=e.lineStart,s=e.lineIndent,ge(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=o,e.line=l,e.lineStart=c,e.lineIndent=s;break}}a&&(pe(e,r,o,!1),ye(e,e.line-l),r=o=e.position,a=!1),Q(u)||(o=e.position+1),u=e.input.charCodeAt(++e.position)}return pe(e,r,o,!1),!!e.result||(e.kind=p,e.result=f,!1)}(e,d,1===i)&&(y=!0,null===e.tag&&(e.tag="?")):(y=!0,null===e.tag&&null===e.anchor||ce(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===g&&(y=c&&be(e,h))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&ce(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),s=0,u=e.implicitTypes.length;s"),null!==e.result&&f.kind!==e.kind&&ce(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+f.kind+'", not "'+e.kind+'"'),f.resolve(e.result,e.tag)?(e.result=f.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):ce(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||y}function ke(e){var t,n,i,r,o=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(r=e.input.charCodeAt(e.position))&&(ge(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);for(i=[],(n=e.input.slice(t,e.position)).length<1&&ce(e,"directive name must not be less than one character in length");0!==r;){for(;Q(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!J(r));break}if(J(r))break;for(t=e.position;0!==r&&!z(r);)r=e.input.charCodeAt(++e.position);i.push(e.input.slice(t,e.position))}0!==r&&he(e),P.call(ue,n)?ue[n](e,n,i):se(e,'unknown document directive "'+n+'"')}ge(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,ge(e,!0,-1)):a&&ce(e,"directives end mark is expected"),we(e,e.lineIndent-1,4,!1,!0),ge(e,!0,-1),e.checkLineBreaks&&H.test(e.input.slice(o,e.position))&&se(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&me(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,ge(e,!0,-1)):e.position=55296&&i<=56319&&t+1=56320&&n<=57343?1024*(i-55296)+n-56320+65536:i}function Re(e){return/^\n* /.test(e)}function Be(e,t,n,i,r,o,a,l){var c,s,u=0,p=null,f=!1,d=!1,h=-1!==i,g=-1,m=De(s=Ye(e,0))&&s!==Oe&&!_e(s)&&45!==s&&63!==s&&58!==s&&44!==s&&91!==s&&93!==s&&123!==s&&125!==s&&35!==s&&38!==s&&42!==s&&33!==s&&124!==s&&61!==s&&62!==s&&39!==s&&34!==s&&37!==s&&64!==s&&96!==s&&function(e){return!_e(e)&&58!==e}(Ye(e,e.length-1));if(t||a)for(c=0;c=65536?c+=2:c++){if(!De(u=Ye(e,c)))return 5;m=m&&qe(u,p,l),p=u}else{for(c=0;c=65536?c+=2:c++){if(10===(u=Ye(e,c)))f=!0,h&&(d=d||c-g-1>i&&" "!==e[g+1],g=c);else if(!De(u))return 5;m=m&&qe(u,p,l),p=u}d=d||h&&c-g-1>i&&" "!==e[g+1]}return f||d?n>9&&Re(e)?5:a?2===o?5:2:d?4:3:!m||a||r(e)?2===o?5:2:1}function Ke(e,t,n,i,r){e.dump=function(){if(0===t.length)return 2===e.quotingType?'""':"''";if(!e.noCompatMode&&(-1!==Te.indexOf(t)||Ne.test(t)))return 2===e.quotingType?'"'+t+'"':"'"+t+"'";var a=e.indent*Math.max(1,n),l=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),c=i||e.flowLevel>-1&&n>=e.flowLevel;switch(Be(t,c,e.indent,l,(function(t){return function(e,t){var n,i;for(n=0,i=e.implicitTypes.length;n"+Pe(t,e.indent)+We(Me(function(e,t){var n,i,r=/(\n+)([^\n]*)/g,o=(l=e.indexOf("\n"),l=-1!==l?l:e.length,r.lastIndex=l,He(e.slice(0,l),t)),a="\n"===e[0]||" "===e[0];var l;for(;i=r.exec(e);){var c=i[1],s=i[2];n=" "===s[0],o+=c+(a||n||""===s?"":"\n")+He(s,t),a=n}return o}(t,l),a));case 5:return'"'+function(e){for(var t,n="",i=0,r=0;r=65536?r+=2:r++)i=Ye(e,r),!(t=je[i])&&De(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=t||Fe(i);return n}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function Pe(e,t){var n=Re(e)?String(t):"",i="\n"===e[e.length-1];return n+(i&&("\n"===e[e.length-2]||"\n"===e)?"+":i?"":"-")+"\n"}function We(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function He(e,t){if(""===e||" "===e[0])return e;for(var n,i,r=/ [^ ]/g,o=0,a=0,l=0,c="";n=r.exec(e);)(l=n.index)-o>t&&(i=a>o?a:l,c+="\n"+e.slice(o,i),o=i+1),a=l;return c+="\n",e.length-o>t&&a>o?c+=e.slice(o,a)+"\n"+e.slice(a+1):c+=e.slice(o),c.slice(1)}function $e(e,t,n,i){var r,o,a,l="",c=e.tag;for(r=0,o=n.length;r tag resolver accepts not "'+s+'" style');i=c.represent[s](t,s)}e.dump=i}return!0}return!1}function Ve(e,t,n,i,r,a,l){e.tag=null,e.dump=n,Ge(e,n,!1)||Ge(e,n,!0);var c,s=Ie.call(e.dump),u=i;i&&(i=e.flowLevel<0||e.flowLevel>t);var p,f,d="[object Object]"===s||"[object Array]"===s;if(d&&(f=-1!==(p=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||f||2!==e.indent&&t>0)&&(r=!1),f&&e.usedDuplicates[p])e.dump="*ref_"+p;else{if(d&&f&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),"[object Object]"===s)i&&0!==Object.keys(e.dump).length?(!function(e,t,n,i){var r,a,l,c,s,u,p="",f=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(r=0,a=d.length;r1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,s&&(u+=Le(e,t)),Ve(e,t+1,c,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",p+=u+=e.dump));e.tag=f,e.dump=p||"{}"}(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a,l,c="",s=e.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(l+="? "),l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ve(e,t,a,!1,!1)&&(c+=l+=e.dump));e.tag=s,e.dump="{"+c+"}"}(e,t,e.dump),f&&(e.dump="&ref_"+p+" "+e.dump));else if("[object Array]"===s)i&&0!==e.dump.length?(e.noArrayIndent&&!l&&t>0?$e(e,t-1,e.dump,r):$e(e,t,e.dump,r),f&&(e.dump="&ref_"+p+e.dump)):(!function(e,t,n){var i,r,o,a="",l=e.tag;for(i=0,r=n.length;i",e.dump=c+" "+e.dump)}return!0}function Ze(e,t){var n,i,r=[],o=[];for(Je(e,r,o),n=0,i=o.length;n { + for (script of document.querySelectorAll("script[type='pyj']")) { + let code + if (src = script.src) { + code = await fetch(src).then((x) => x.text()) + } else { + code = script.textContent + } + try { + eval(`(async () => {${compiler.compile(code)}})()`) + } catch (err) { + console.error(`${src}, ${err.line}, ${err.col}:\n${err.message}`) + document.body.innerHTML = `
    ${src}, ${err.line}, ${err.col}:\n${err.message}
    ` + } + }; +} \ No newline at end of file diff --git a/lib/markdown-it.min.js b/js/markdown-it.min.js similarity index 100% rename from lib/markdown-it.min.js rename to js/markdown-it.min.js diff --git a/lib/nbsp.js b/js/nbsp.js similarity index 100% rename from lib/nbsp.js rename to js/nbsp.js diff --git a/js/org.transcrypt.__runtime__.js b/js/org.transcrypt.__runtime__.js deleted file mode 100644 index 56a9a90..0000000 --- a/js/org.transcrypt.__runtime__.js +++ /dev/null @@ -1,2128 +0,0 @@ -// Transcrypt'ed from Python, 2023-11-20 22:00:52 -var __name__ = 'org.transcrypt.__runtime__'; -export var __envir__ = {}; -__envir__.interpreter_name = 'python'; -__envir__.transpiler_name = 'transcrypt'; -__envir__.executor_name = __envir__.transpiler_name; -__envir__.transpiler_version = '3.9.0'; - -export function __nest__ (headObject, tailNames, value) { - var current = headObject; - if (tailNames != '') { - var tailChain = tailNames.split ('.'); - var firstNewIndex = tailChain.length; - for (var index = 0; index < tailChain.length; index++) { - if (!current.hasOwnProperty (tailChain [index])) { - firstNewIndex = index; - break; - } - current = current [tailChain [index]]; - } - for (var index = firstNewIndex; index < tailChain.length; index++) { - current [tailChain [index]] = {}; - current = current [tailChain [index]]; - } - } - for (let attrib of Object.getOwnPropertyNames (value)) { - Object.defineProperty (current, attrib, { - get () {return value [attrib];}, - enumerable: true, - configurable: true - }); - } -}; -export function __init__ (module) { - if (!module.__inited__) { - module.__all__.__init__ (module.__all__); - module.__inited__ = true; - } - return module.__all__; -}; -export function __get__ (aThis, func, quotedFuncName) { - if (aThis) { - if (aThis.hasOwnProperty ('__class__') || typeof aThis == 'string' || aThis instanceof String) { - if (quotedFuncName) { - Object.defineProperty (aThis, quotedFuncName, { - value: function () { - var args = [] .slice.apply (arguments); - return func.apply (null, [aThis] .concat (args)); - }, - writable: true, - enumerable: true, - configurable: true - }); - } - return function () { - var args = [] .slice.apply (arguments); - return func.apply (null, [aThis.__proxy__ ? aThis.__proxy__ : aThis] .concat (args)); - }; - } - else { - return func; - } - } - else { - return func; - } -}; -export function __getcm__ (aThis, func, quotedFuncName) { - if (aThis.hasOwnProperty ('__class__')) { - return function () { - var args = [] .slice.apply (arguments); - return func.apply (null, [aThis.__class__] .concat (args)); - }; - } - else { - return function () { - var args = [] .slice.apply (arguments); - return func.apply (null, [aThis] .concat (args)); - }; - } -}; -export function __getsm__ (aThis, func, quotedFuncName) { - return func; -}; -export var py_metatype = { - __name__: 'type', - __bases__: [], - __new__: function (meta, name, bases, attribs) { - var cls = function () { - var args = [] .slice.apply (arguments); - return cls.__new__ (args); - }; - for (var index = bases.length - 1; index >= 0; index--) { - var base = bases [index]; - for (var attrib in base) { - var descrip = Object.getOwnPropertyDescriptor (base, attrib); - if (descrip == null) { - continue; - } - Object.defineProperty (cls, attrib, descrip); - } - for (let symbol of Object.getOwnPropertySymbols (base)) { - let descrip = Object.getOwnPropertyDescriptor (base, symbol); - Object.defineProperty (cls, symbol, descrip); - } - } - cls.__metaclass__ = meta; - cls.__name__ = name.startsWith ('py_') ? name.slice (3) : name; - cls.__bases__ = bases; - for (var attrib in attribs) { - var descrip = Object.getOwnPropertyDescriptor (attribs, attrib); - Object.defineProperty (cls, attrib, descrip); - } - for (let symbol of Object.getOwnPropertySymbols (attribs)) { - let descrip = Object.getOwnPropertyDescriptor (attribs, symbol); - Object.defineProperty (cls, symbol, descrip); - } - return cls; - } -}; -py_metatype.__metaclass__ = py_metatype; -export var object = { - __init__: function (self) {}, - __metaclass__: py_metatype, - __name__: 'object', - __bases__: [], - __new__: function (args) { - var instance = Object.create (this, {__class__: {value: this, enumerable: true}}); - if ('__getattr__' in this || '__setattr__' in this) { - instance.__proxy__ = new Proxy (instance, { - get: function (target, name) { - let result = target [name]; - if (result == undefined) { - return target.__getattr__ (name); - } - else { - return result; - } - }, - set: function (target, name, value) { - try { - target.__setattr__ (name, value); - } - catch (exception) { - target [name] = value; - } - return true; - } - }) - instance = instance.__proxy__ - } - this.__init__.apply (null, [instance] .concat (args)); - return instance; - } -}; -export function __class__ (name, bases, attribs, meta) { - if (meta === undefined) { - meta = bases [0] .__metaclass__; - } - return meta.__new__ (meta, name, bases, attribs); -}; -export function __pragma__ () {}; -export function __call__ (/* , , * */) { - var args = [] .slice.apply (arguments); - if (typeof args [0] == 'object' && '__call__' in args [0]) { - return args [0] .__call__ .apply (args [1], args.slice (2)); - } - else { - return args [0] .apply (args [1], args.slice (2)); - } -}; -__envir__.executor_name = __envir__.transpiler_name; -var __main__ = {__file__: ''}; -var __except__ = null; -export function __kwargtrans__ (anObject) { - anObject.__kwargtrans__ = null; - anObject.constructor = Object; - return anObject; -} -export function __super__ (aClass, methodName) { - for (let base of aClass.__bases__) { - if (methodName in base) { - return base [methodName]; - } - } - throw new Exception ('Superclass method not found'); -} -export function property (getter, setter) { - if (!setter) { - setter = function () {}; - } - return {get: function () {return getter (this)}, set: function (value) {setter (this, value)}, enumerable: true}; -} -export function __setproperty__ (anObject, name, descriptor) { - if (!anObject.hasOwnProperty (name)) { - Object.defineProperty (anObject, name, descriptor); - } -} -export function assert (condition, message) { - if (!condition) { - throw AssertionError (message, new Error ()); - } -} -export function __mergekwargtrans__ (object0, object1) { - var result = {}; - for (var attrib in object0) { - result [attrib] = object0 [attrib]; - } - for (var attrib in object1) { - result [attrib] = object1 [attrib]; - } - return result; -}; -export function __mergefields__ (targetClass, sourceClass) { - let fieldNames = ['__reprfields__', '__comparefields__', '__initfields__'] - if (sourceClass [fieldNames [0]]) { - if (targetClass [fieldNames [0]]) { - for (let fieldName of fieldNames) { - targetClass [fieldName] = new Set ([...targetClass [fieldName], ...sourceClass [fieldName]]); - } - } - else { - for (let fieldName of fieldNames) { - targetClass [fieldName] = new Set (sourceClass [fieldName]); - } - } - } -} -export function __withblock__ (manager, statements) { - if (hasattr (manager, '__enter__')) { - try { - manager.__enter__ (); - statements (); - manager.__exit__ (); - } - catch (exception) { - if (! (manager.__exit__ (exception.name, exception, exception.stack))) { - throw exception; - } - } - } - else { - statements (); - manager.close (); - } -}; -export function dir (obj) { - var aList = []; - for (var aKey in obj) { - aList.push (aKey.startsWith ('py_') ? aKey.slice (3) : aKey); - } - aList.sort (); - return aList; -}; -export function setattr (obj, name, value) { - obj [name] = value; -}; -export function getattr (obj, name) { - return name in obj ? obj [name] : obj ['py_' + name]; -}; -export function hasattr (obj, name) { - try { - return name in obj || 'py_' + name in obj; - } - catch (exception) { - return false; - } -}; -export function delattr (obj, name) { - if (name in obj) { - delete obj [name]; - } - else { - delete obj ['py_' + name]; - } -}; -export function __in__ (element, container) { - if (container === undefined || container === null) { - return false; - } - if (container.__contains__ instanceof Function) { - return container.__contains__ (element); - } - else { - return ( - container.indexOf ? - container.indexOf (element) > -1 : - container.hasOwnProperty (element) - ); - } -}; -export function __specialattrib__ (attrib) { - return (attrib.startswith ('__') && attrib.endswith ('__')) || attrib == 'constructor' || attrib.startswith ('py_'); -}; -export function len (anObject) { - if (anObject === undefined || anObject === null) { - return 0; - } - if (anObject.__len__ instanceof Function) { - return anObject.__len__ (); - } - if (anObject.length !== undefined) { - return anObject.length; - } - var length = 0; - for (var attr in anObject) { - if (!__specialattrib__ (attr)) { - length++; - } - } - return length; -}; -export function __i__ (any) { - return py_typeof (any) == dict ? any.py_keys () : any; -} -export function __k__ (keyed, key) { - var result = keyed [key]; - if (typeof result == 'undefined') { - if (keyed instanceof Array) - if (key == +key && key >= 0 && keyed.length > key) - return result; - else - throw IndexError (key, new Error()); - else - throw KeyError (key, new Error()); - } - return result; -} -export function __t__ (target) { - return ( - target === undefined || target === null ? false : - ['boolean', 'number'] .indexOf (typeof target) >= 0 ? target : - target.__bool__ instanceof Function ? (target.__bool__ () ? target : false) : - target.__len__ instanceof Function ? (target.__len__ () !== 0 ? target : false) : - target instanceof Function ? target : - len (target) !== 0 ? target : - false - ); -} -export function float (any) { - if (any == 'inf') { - return Infinity; - } - else if (any == '-inf') { - return -Infinity; - } - else if (any == 'nan') { - return NaN; - } - else if (isNaN (parseFloat (any))) { - if (any === false) { - return 0; - } - else if (any === true) { - return 1; - } - else { - throw ValueError ("could not convert string to float: '" + str(any) + "'", new Error ()); - } - } - else { - return +any; - } -}; -float.__name__ = 'float'; -float.__bases__ = [object]; -export function int (any) { - return float (any) | 0 -}; -int.__name__ = 'int'; -int.__bases__ = [object]; -export function bool (any) { - return !!__t__ (any); -}; -bool.__name__ = 'bool'; -bool.__bases__ = [int]; -export function py_typeof (anObject) { - var aType = typeof anObject; - if (aType == 'object') { - try { - return '__class__' in anObject ? anObject.__class__ : object; - } - catch (exception) { - return aType; - } - } - else { - return ( - aType == 'boolean' ? bool : - aType == 'string' ? str : - aType == 'number' ? (anObject % 1 == 0 ? int : float) : - null - ); - } -}; -export function issubclass (aClass, classinfo) { - if (classinfo instanceof Array) { - for (let aClass2 of classinfo) { - if (issubclass (aClass, aClass2)) { - return true; - } - } - return false; - } - try { - var aClass2 = aClass; - if (aClass2 == classinfo) { - return true; - } - else { - var bases = [].slice.call (aClass2.__bases__); - while (bases.length) { - aClass2 = bases.shift (); - if (aClass2 == classinfo) { - return true; - } - if (aClass2.__bases__.length) { - bases = [].slice.call (aClass2.__bases__).concat (bases); - } - } - return false; - } - } - catch (exception) { - return aClass == classinfo || classinfo == object; - } -}; -export function isinstance (anObject, classinfo) { - try { - return '__class__' in anObject ? issubclass (anObject.__class__, classinfo) : issubclass (py_typeof (anObject), classinfo); - } - catch (exception) { - return issubclass (py_typeof (anObject), classinfo); - } -}; -export function callable (anObject) { - return anObject && typeof anObject == 'object' && '__call__' in anObject ? true : typeof anObject === 'function'; -}; -export function repr (anObject) { - try { - return anObject.__repr__ (); - } - catch (exception) { - try { - return anObject.__str__ (); - } - catch (exception) { - try { - if (anObject == null) { - return 'None'; - } - else if (anObject.constructor == Object) { - var result = '{'; - var comma = false; - for (var attrib in anObject) { - if (!__specialattrib__ (attrib)) { - if (attrib.isnumeric ()) { - var attribRepr = attrib; - } - else { - var attribRepr = '\'' + attrib + '\''; - } - if (comma) { - result += ', '; - } - else { - comma = true; - } - result += attribRepr + ': ' + repr (anObject [attrib]); - } - } - result += '}'; - return result; - } - else { - return typeof anObject == 'boolean' ? anObject.toString () .capitalize () : anObject.toString (); - } - } - catch (exception) { - return ''; - } - } - } -}; -export function chr (charCode) { - return String.fromCharCode (charCode); -}; -export function ord (aChar) { - return aChar.charCodeAt (0); -}; -export function max (nrOrSeq) { - return arguments.length == 1 ? Math.max (...nrOrSeq) : Math.max (...arguments); -}; -export function min (nrOrSeq) { - return arguments.length == 1 ? Math.min (...nrOrSeq) : Math.min (...arguments); -}; -export var abs = Math.abs; -export function round (number, ndigits) { - if (ndigits) { - var scale = Math.pow (10, ndigits); - number *= scale; - } - var rounded = Math.round (number); - if (rounded - number == 0.5 && rounded % 2) { - rounded -= 1; - } - if (ndigits) { - rounded /= scale; - } - return rounded; -}; -export function __jsUsePyNext__ () { - try { - var result = this.__next__ (); - return {value: result, done: false}; - } - catch (exception) { - return {value: undefined, done: true}; - } -} -export function __pyUseJsNext__ () { - var result = this.next (); - if (result.done) { - throw StopIteration (new Error ()); - } - else { - return result.value; - } -} -export function py_iter (iterable) { - if (typeof iterable == 'string' || '__iter__' in iterable) { - var result = iterable.__iter__ (); - result.next = __jsUsePyNext__; - } - else if ('selector' in iterable) { - var result = list (iterable) .__iter__ (); - result.next = __jsUsePyNext__; - } - else if ('next' in iterable) { - var result = iterable - if (! ('__next__' in result)) { - result.__next__ = __pyUseJsNext__; - } - } - else if (Symbol.iterator in iterable) { - var result = iterable [Symbol.iterator] (); - result.__next__ = __pyUseJsNext__; - } - else { - throw IterableError (new Error ()); - } - result [Symbol.iterator] = function () {return result;}; - return result; -} -export function py_next (iterator) { - try { - var result = iterator.__next__ (); - } - catch (exception) { - var result = iterator.next (); - if (result.done) { - throw StopIteration (new Error ()); - } - else { - return result.value; - } - } - if (result == undefined) { - throw StopIteration (new Error ()); - } - else { - return result; - } -} -export function __PyIterator__ (iterable) { - this.iterable = iterable; - this.index = 0; -} -__PyIterator__.prototype.__next__ = function() { - if (this.index < this.iterable.length) { - return this.iterable [this.index++]; - } - else { - throw StopIteration (new Error ()); - } -}; -export function __JsIterator__ (iterable) { - this.iterable = iterable; - this.index = 0; -} -__JsIterator__.prototype.next = function () { - if (this.index < this.iterable.py_keys.length) { - return {value: this.index++, done: false}; - } - else { - return {value: undefined, done: true}; - } -}; -export function py_reversed (iterable) { - iterable = iterable.slice (); - iterable.reverse (); - return iterable; -}; -export function zip () { - var args = [] .slice.call (arguments); - for (var i = 0; i < args.length; i++) { - if (typeof args [i] == 'string') { - args [i] = args [i] .split (''); - } - else if (!Array.isArray (args [i])) { - args [i] = Array.from (args [i]); - } - } - var shortest = args.length == 0 ? [] : args.reduce ( - function (array0, array1) { - return array0.length < array1.length ? array0 : array1; - } - ); - return shortest.map ( - function (current, index) { - return args.map ( - function (current) { - return current [index]; - } - ); - } - ); -}; -export function range (start, stop, step) { - if (stop == undefined) { - stop = start; - start = 0; - } - if (step == undefined) { - step = 1; - } - if ((step > 0 && start >= stop) || (step < 0 && start <= stop)) { - return []; - } - var result = []; - for (var i = start; step > 0 ? i < stop : i > stop; i += step) { - result.push(i); - } - return result; -}; -export function any (iterable) { - for (let item of iterable) { - if (bool (item)) { - return true; - } - } - return false; -} -export function all (iterable) { - for (let item of iterable) { - if (! bool (item)) { - return false; - } - } - return true; -} -export function sum (iterable) { - let result = 0; - for (let item of iterable) { - result += item; - } - return result; -} -export function enumerate (iterable) { - return zip (range (len (iterable)), iterable); -} -export function copy (anObject) { - if (anObject == null || typeof anObject == "object") { - return anObject; - } - else { - var result = {}; - for (var attrib in obj) { - if (anObject.hasOwnProperty (attrib)) { - result [attrib] = anObject [attrib]; - } - } - return result; - } -} -export function deepcopy (anObject) { - if (anObject == null || typeof anObject == "object") { - return anObject; - } - else { - var result = {}; - for (var attrib in obj) { - if (anObject.hasOwnProperty (attrib)) { - result [attrib] = deepcopy (anObject [attrib]); - } - } - return result; - } -} -export function list (iterable) { - let instance = iterable ? Array.from (iterable) : []; - return instance; -} -Array.prototype.__class__ = list; -list.__name__ = 'list'; -list.__bases__ = [object]; -Array.prototype.__iter__ = function () {return new __PyIterator__ (this);}; -Array.prototype.__getslice__ = function (start, stop, step) { - if (start < 0) { - start = this.length + start; - } - if (stop == null) { - stop = this.length; - } - else if (stop < 0) { - stop = this.length + stop; - } - else if (stop > this.length) { - stop = this.length; - } - if (step == 1) { - return Array.prototype.slice.call(this, start, stop); - } - let result = list ([]); - for (let index = start; index < stop; index += step) { - result.push (this [index]); - } - return result; -}; -Array.prototype.__setslice__ = function (start, stop, step, source) { - if (start < 0) { - start = this.length + start; - } - if (stop == null) { - stop = this.length; - } - else if (stop < 0) { - stop = this.length + stop; - } - if (step == null) { - Array.prototype.splice.apply (this, [start, stop - start] .concat (source)); - } - else { - let sourceIndex = 0; - for (let targetIndex = start; targetIndex < stop; targetIndex += step) { - this [targetIndex] = source [sourceIndex++]; - } - } -}; -Array.prototype.__repr__ = function () { - if (this.__class__ == set && !this.length) { - return 'set()'; - } - let result = !this.__class__ || this.__class__ == list ? '[' : this.__class__ == tuple ? '(' : '{'; - for (let index = 0; index < this.length; index++) { - if (index) { - result += ', '; - } - result += repr (this [index]); - } - if (this.__class__ == tuple && this.length == 1) { - result += ','; - } - result += !this.__class__ || this.__class__ == list ? ']' : this.__class__ == tuple ? ')' : '}';; - return result; -}; -Array.prototype.__str__ = Array.prototype.__repr__; -Array.prototype.append = function (element) { - this.push (element); -}; -Array.prototype.py_clear = function () { - this.length = 0; -}; -Array.prototype.extend = function (aList) { - this.push.apply (this, aList); -}; -Array.prototype.insert = function (index, element) { - this.splice (index, 0, element); -}; -Array.prototype.remove = function (element) { - let index = this.indexOf (element); - if (index == -1) { - throw ValueError ("list.remove(x): x not in list", new Error ()); - } - this.splice (index, 1); -}; -Array.prototype.index = function (element) { - return this.indexOf (element); -}; -Array.prototype.py_pop = function (index) { - if (index == undefined) { - return this.pop (); - } - else { - return this.splice (index, 1) [0]; - } -}; -Array.prototype.py_sort = function () { - __sort__.apply (null, [this].concat ([] .slice.apply (arguments))); -}; -Array.prototype.__add__ = function (aList) { - return list (this.concat (aList)); -}; -Array.prototype.__mul__ = function (scalar) { - let result = this; - for (let i = 1; i < scalar; i++) { - result = result.concat (this); - } - return result; -}; -Array.prototype.__rmul__ = Array.prototype.__mul__; -export function tuple (iterable) { - let instance = iterable ? [] .slice.apply (iterable) : []; - instance.__class__ = tuple; - return instance; -} -tuple.__name__ = 'tuple'; -tuple.__bases__ = [object]; -export function set (iterable) { - let instance = []; - if (iterable) { - for (let index = 0; index < iterable.length; index++) { - instance.add (iterable [index]); - } - } - instance.__class__ = set; - return instance; -} -set.__name__ = 'set'; -set.__bases__ = [object]; -Array.prototype.__bindexOf__ = function (element) { - element += ''; - let mindex = 0; - let maxdex = this.length - 1; - while (mindex <= maxdex) { - let index = (mindex + maxdex) / 2 | 0; - let middle = this [index] + ''; - if (middle < element) { - mindex = index + 1; - } - else if (middle > element) { - maxdex = index - 1; - } - else { - return index; - } - } - return -1; -}; -Array.prototype.add = function (element) { - if (this.indexOf (element) == -1) { - this.push (element); - } -}; -Array.prototype.discard = function (element) { - var index = this.indexOf (element); - if (index != -1) { - this.splice (index, 1); - } -}; -Array.prototype.isdisjoint = function (other) { - this.sort (); - for (let i = 0; i < other.length; i++) { - if (this.__bindexOf__ (other [i]) != -1) { - return false; - } - } - return true; -}; -Array.prototype.issuperset = function (other) { - this.sort (); - for (let i = 0; i < other.length; i++) { - if (this.__bindexOf__ (other [i]) == -1) { - return false; - } - } - return true; -}; -Array.prototype.issubset = function (other) { - return set (other.slice ()) .issuperset (this); -}; -Array.prototype.union = function (other) { - let result = set (this.slice () .sort ()); - for (let i = 0; i < other.length; i++) { - if (result.__bindexOf__ (other [i]) == -1) { - result.push (other [i]); - } - } - return result; -}; -Array.prototype.intersection = function (other) { - this.sort (); - let result = set (); - for (let i = 0; i < other.length; i++) { - if (this.__bindexOf__ (other [i]) != -1) { - result.push (other [i]); - } - } - return result; -}; -Array.prototype.difference = function (other) { - let sother = set (other.slice () .sort ()); - let result = set (); - for (let i = 0; i < this.length; i++) { - if (sother.__bindexOf__ (this [i]) == -1) { - result.push (this [i]); - } - } - return result; -}; -Array.prototype.symmetric_difference = function (other) { - return this.union (other) .difference (this.intersection (other)); -}; -Array.prototype.py_update = function () { - let updated = [] .concat.apply (this.slice (), arguments) .sort (); - this.py_clear (); - for (let i = 0; i < updated.length; i++) { - if (updated [i] != updated [i - 1]) { - this.push (updated [i]); - } - } -}; -Array.prototype.__eq__ = function (other) { - if (this.length != other.length) { - return false; - } - if (this.__class__ == set) { - this.sort (); - other.sort (); - } - for (let i = 0; i < this.length; i++) { - if (this [i] != other [i]) { - return false; - } - } - return true; -}; -Array.prototype.__ne__ = function (other) { - return !this.__eq__ (other); -}; -Array.prototype.__le__ = function (other) { - if (this.__class__ == set) { - return this.issubset (other); - } - else { - for (let i = 0; i < this.length; i++) { - if (this [i] > other [i]) { - return false; - } - else if (this [i] < other [i]) { - return true; - } - } - return true; - } -}; -Array.prototype.__ge__ = function (other) { - if (this.__class__ == set) { - return this.issuperset (other); - } - else { - for (let i = 0; i < this.length; i++) { - if (this [i] < other [i]) { - return false; - } - else if (this [i] > other [i]) { - return true; - } - } - return true; - } -}; -Array.prototype.__lt__ = function (other) { - return ( - this.__class__ == set ? - this.issubset (other) && !this.issuperset (other) : - !this.__ge__ (other) - ); -}; -Array.prototype.__gt__ = function (other) { - return ( - this.__class__ == set ? - this.issuperset (other) && !this.issubset (other) : - !this.__le__ (other) - ); -}; -export function bytearray (bytable, encoding) { - if (bytable == undefined) { - return new Uint8Array (0); - } - else { - let aType = py_typeof (bytable); - if (aType == int) { - return new Uint8Array (bytable); - } - else if (aType == str) { - let aBytes = new Uint8Array (len (bytable)); - for (let i = 0; i < len (bytable); i++) { - aBytes [i] = bytable.charCodeAt (i); - } - return aBytes; - } - else if (aType == list || aType == tuple) { - return new Uint8Array (bytable); - } - else { - throw py_TypeError; - } - } -} -export var bytes = bytearray; -Uint8Array.prototype.__add__ = function (aBytes) { - let result = new Uint8Array (this.length + aBytes.length); - result.set (this); - result.set (aBytes, this.length); - return result; -}; -Uint8Array.prototype.__mul__ = function (scalar) { - let result = new Uint8Array (scalar * this.length); - for (let i = 0; i < scalar; i++) { - result.set (this, i * this.length); - } - return result; -}; -Uint8Array.prototype.__rmul__ = Uint8Array.prototype.__mul__; -export function str (stringable) { - if (typeof stringable === 'number') - return stringable.toString(); - else { - try { - return stringable.__str__ (); - } - catch (exception) { - try { - return repr (stringable); - } - catch (exception) { - return String (stringable); - } - } - } -}; -String.prototype.__class__ = str; -str.__name__ = 'str'; -str.__bases__ = [object]; -String.prototype.__iter__ = function () {new __PyIterator__ (this);}; -String.prototype.__repr__ = function () { - return (this.indexOf ('\'') == -1 ? '\'' + this + '\'' : '"' + this + '"') .py_replace ('\t', '\\t') .py_replace ('\n', '\\n'); -}; -String.prototype.__str__ = function () { - return this; -}; -String.prototype.capitalize = function () { - return this.charAt (0).toUpperCase () + this.slice (1); -}; -String.prototype.endswith = function (suffix) { - if (suffix instanceof Array) { - for (var i=0;i> b; - } -}; -export function __or__ (a, b) { - if (typeof a == 'object' && '__or__' in a) { - return a.__or__ (b); - } - else if (typeof b == 'object' && '__ror__' in b) { - return b.__ror__ (a); - } - else { - return a | b; - } -}; -export function __xor__ (a, b) { - if (typeof a == 'object' && '__xor__' in a) { - return a.__xor__ (b); - } - else if (typeof b == 'object' && '__rxor__' in b) { - return b.__rxor__ (a); - } - else { - return a ^ b; - } -}; -export function __and__ (a, b) { - if (typeof a == 'object' && '__and__' in a) { - return a.__and__ (b); - } - else if (typeof b == 'object' && '__rand__' in b) { - return b.__rand__ (a); - } - else { - return a & b; - } -}; -export function __eq__ (a, b) { - if (typeof a == 'object' && '__eq__' in a) { - return a.__eq__ (b); - } - else { - return a == b; - } -}; -export function __ne__ (a, b) { - if (typeof a == 'object' && '__ne__' in a) { - return a.__ne__ (b); - } - else { - return a != b - } -}; -export function __lt__ (a, b) { - if (typeof a == 'object' && '__lt__' in a) { - return a.__lt__ (b); - } - else { - return a < b; - } -}; -export function __le__ (a, b) { - if (typeof a == 'object' && '__le__' in a) { - return a.__le__ (b); - } - else { - return a <= b; - } -}; -export function __gt__ (a, b) { - if (typeof a == 'object' && '__gt__' in a) { - return a.__gt__ (b); - } - else { - return a > b; - } -}; -export function __ge__ (a, b) { - if (typeof a == 'object' && '__ge__' in a) { - return a.__ge__ (b); - } - else { - return a >= b; - } -}; -export function __imatmul__ (a, b) { - if ('__imatmul__' in a) { - return a.__imatmul__ (b); - } - else { - return a.__matmul__ (b); - } -}; -export function __ipow__ (a, b) { - if (typeof a == 'object' && '__pow__' in a) { - return a.__ipow__ (b); - } - else if (typeof a == 'object' && '__ipow__' in a) { - return a.__pow__ (b); - } - else if (typeof b == 'object' && '__rpow__' in b) { - return b.__rpow__ (a); - } - else { - return Math.pow (a, b); - } -}; -export function __ijsmod__ (a, b) { - if (typeof a == 'object' && '__imod__' in a) { - return a.__ismod__ (b); - } - else if (typeof a == 'object' && '__mod__' in a) { - return a.__mod__ (b); - } - else if (typeof b == 'object' && '__rpow__' in b) { - return b.__rmod__ (a); - } - else { - return a % b; - } -}; -export function __imod__ (a, b) { - if (typeof a == 'object' && '__imod__' in a) { - return a.__imod__ (b); - } - else if (typeof a == 'object' && '__mod__' in a) { - return a.__mod__ (b); - } - else if (typeof b == 'object' && '__rmod__' in b) { - return b.__rmod__ (a); - } - else { - return ((a % b) + b) % b; - } -}; -export function __imul__ (a, b) { - if (typeof a == 'object' && '__imul__' in a) { - return a.__imul__ (b); - } - else if (typeof a == 'object' && '__mul__' in a) { - return a = a.__mul__ (b); - } - else if (typeof b == 'object' && '__rmul__' in b) { - return a = b.__rmul__ (a); - } - else if (typeof a == 'string') { - return a = a.__mul__ (b); - } - else if (typeof b == 'string') { - return a = b.__rmul__ (a); - } - else { - return a *= b; - } -}; -export function __idiv__ (a, b) { - if (typeof a == 'object' && '__idiv__' in a) { - return a.__idiv__ (b); - } - else if (typeof a == 'object' && '__div__' in a) { - return a = a.__div__ (b); - } - else if (typeof b == 'object' && '__rdiv__' in b) { - return a = b.__rdiv__ (a); - } - else { - return a /= b; - } -}; -export function __iadd__ (a, b) { - if (typeof a == 'object' && '__iadd__' in a) { - return a.__iadd__ (b); - } - else if (typeof a == 'object' && '__add__' in a) { - return a = a.__add__ (b); - } - else if (typeof b == 'object' && '__radd__' in b) { - return a = b.__radd__ (a); - } - else { - return a += b; - } -}; -export function __isub__ (a, b) { - if (typeof a == 'object' && '__isub__' in a) { - return a.__isub__ (b); - } - else if (typeof a == 'object' && '__sub__' in a) { - return a = a.__sub__ (b); - } - else if (typeof b == 'object' && '__rsub__' in b) { - return a = b.__rsub__ (a); - } - else { - return a -= b; - } -}; -export function __ilshift__ (a, b) { - if (typeof a == 'object' && '__ilshift__' in a) { - return a.__ilshift__ (b); - } - else if (typeof a == 'object' && '__lshift__' in a) { - return a = a.__lshift__ (b); - } - else if (typeof b == 'object' && '__rlshift__' in b) { - return a = b.__rlshift__ (a); - } - else { - return a <<= b; - } -}; -export function __irshift__ (a, b) { - if (typeof a == 'object' && '__irshift__' in a) { - return a.__irshift__ (b); - } - else if (typeof a == 'object' && '__rshift__' in a) { - return a = a.__rshift__ (b); - } - else if (typeof b == 'object' && '__rrshift__' in b) { - return a = b.__rrshift__ (a); - } - else { - return a >>= b; - } -}; -export function __ior__ (a, b) { - if (typeof a == 'object' && '__ior__' in a) { - return a.__ior__ (b); - } - else if (typeof a == 'object' && '__or__' in a) { - return a = a.__or__ (b); - } - else if (typeof b == 'object' && '__ror__' in b) { - return a = b.__ror__ (a); - } - else { - return a |= b; - } -}; -export function __ixor__ (a, b) { - if (typeof a == 'object' && '__ixor__' in a) { - return a.__ixor__ (b); - } - else if (typeof a == 'object' && '__xor__' in a) { - return a = a.__xor__ (b); - } - else if (typeof b == 'object' && '__rxor__' in b) { - return a = b.__rxor__ (a); - } - else { - return a ^= b; - } -}; -export function __iand__ (a, b) { - if (typeof a == 'object' && '__iand__' in a) { - return a.__iand__ (b); - } - else if (typeof a == 'object' && '__and__' in a) { - return a = a.__and__ (b); - } - else if (typeof b == 'object' && '__rand__' in b) { - return a = b.__rand__ (a); - } - else { - return a &= b; - } -}; -export function __getitem__ (container, key) { - if (typeof container == 'object' && '__getitem__' in container) { - return container.__getitem__ (key); - } - else if ((typeof container == 'string' || container instanceof Array) && key < 0) { - return container [container.length + key]; - } - else { - return container [key]; - } -}; -export function __setitem__ (container, key, value) { - if (typeof container == 'object' && '__setitem__' in container) { - container.__setitem__ (key, value); - } - else if ((typeof container == 'string' || container instanceof Array) && key < 0) { - container [container.length + key] = value; - } - else { - container [key] = value; - } -}; -export function __getslice__ (container, lower, upper, step) { - if (typeof container == 'object' && '__getitem__' in container) { - return container.__getitem__ ([lower, upper, step]); - } - else { - return container.__getslice__ (lower, upper, step); - } -}; -export function __setslice__ (container, lower, upper, step, value) { - if (typeof container == 'object' && '__setitem__' in container) { - container.__setitem__ ([lower, upper, step], value); - } - else { - container.__setslice__ (lower, upper, step, value); - } -}; -export var BaseException = __class__ ('BaseException', [object], { - __module__: __name__, -}); -export var Exception = __class__ ('Exception', [BaseException], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self) { - var kwargs = dict (); - if (arguments.length) { - var __ilastarg0__ = arguments.length - 1; - if (arguments [__ilastarg0__] && arguments [__ilastarg0__].hasOwnProperty ("__kwargtrans__")) { - var __allkwargs0__ = arguments [__ilastarg0__--]; - for (var __attrib0__ in __allkwargs0__) { - switch (__attrib0__) { - case 'self': var self = __allkwargs0__ [__attrib0__]; break; - default: kwargs [__attrib0__] = __allkwargs0__ [__attrib0__]; - } - } - delete kwargs.__kwargtrans__; - } - var args = tuple ([].slice.apply (arguments).slice (1, __ilastarg0__ + 1)); - } - else { - var args = tuple (); - } - self.__args__ = args; - if (kwargs.error != null) { - self.stack = kwargs.error.stack; - } - else if (Error) { - self.stack = new Error ().stack; - } - else { - self.stack = 'No stack trace available'; - } - });}, - get __repr__ () {return __get__ (this, function (self) { - if (len (self.__args__) > 1) { - return '{}{}'.format (self.__class__.__name__, repr (tuple (self.__args__))); - } - else if (len (self.__args__)) { - return '{}({})'.format (self.__class__.__name__, repr (self.__args__ [0])); - } - else { - return '{}()'.format (self.__class__.__name__); - } - });}, - get __str__ () {return __get__ (this, function (self) { - if (len (self.__args__) > 1) { - return str (tuple (self.__args__)); - } - else if (len (self.__args__)) { - return str (self.__args__ [0]); - } - else { - return ''; - } - });} -}); -export var IterableError = __class__ ('IterableError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, error) { - Exception.__init__ (self, "Can't iterate over non-iterable", __kwargtrans__ ({error: error})); - });} -}); -export var StopIteration = __class__ ('StopIteration', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, error) { - Exception.__init__ (self, 'Iterator exhausted', __kwargtrans__ ({error: error})); - });} -}); -export var ValueError = __class__ ('ValueError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, message, error) { - Exception.__init__ (self, message, __kwargtrans__ ({error: error})); - });} -}); -export var KeyError = __class__ ('KeyError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, message, error) { - Exception.__init__ (self, message, __kwargtrans__ ({error: error})); - });} -}); -export var AssertionError = __class__ ('AssertionError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, message, error) { - if (message) { - Exception.__init__ (self, message, __kwargtrans__ ({error: error})); - } - else { - Exception.__init__ (self, __kwargtrans__ ({error: error})); - } - });} -}); -export var NotImplementedError = __class__ ('NotImplementedError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, message, error) { - Exception.__init__ (self, message, __kwargtrans__ ({error: error})); - });} -}); -export var IndexError = __class__ ('IndexError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, message, error) { - Exception.__init__ (self, message, __kwargtrans__ ({error: error})); - });} -}); -export var AttributeError = __class__ ('AttributeError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, message, error) { - Exception.__init__ (self, message, __kwargtrans__ ({error: error})); - });} -}); -export var py_TypeError = __class__ ('py_TypeError', [Exception], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self, message, error) { - Exception.__init__ (self, message, __kwargtrans__ ({error: error})); - });} -}); -export var Warning = __class__ ('Warning', [Exception], { - __module__: __name__, -}); -export var UserWarning = __class__ ('UserWarning', [Warning], { - __module__: __name__, -}); -export var DeprecationWarning = __class__ ('DeprecationWarning', [Warning], { - __module__: __name__, -}); -export var RuntimeWarning = __class__ ('RuntimeWarning', [Warning], { - __module__: __name__, -}); -export var __sort__ = function (iterable, key, reverse) { - if (typeof key == 'undefined' || (key != null && key.hasOwnProperty ("__kwargtrans__"))) {; - var key = null; - }; - if (typeof reverse == 'undefined' || (reverse != null && reverse.hasOwnProperty ("__kwargtrans__"))) {; - var reverse = false; - }; - if (arguments.length) { - var __ilastarg0__ = arguments.length - 1; - if (arguments [__ilastarg0__] && arguments [__ilastarg0__].hasOwnProperty ("__kwargtrans__")) { - var __allkwargs0__ = arguments [__ilastarg0__--]; - for (var __attrib0__ in __allkwargs0__) { - switch (__attrib0__) { - case 'iterable': var iterable = __allkwargs0__ [__attrib0__]; break; - case 'key': var key = __allkwargs0__ [__attrib0__]; break; - case 'reverse': var reverse = __allkwargs0__ [__attrib0__]; break; - } - } - } - } - else { - } - if (key) { - iterable.sort ((function __lambda__ (a, b) { - if (arguments.length) { - var __ilastarg0__ = arguments.length - 1; - if (arguments [__ilastarg0__] && arguments [__ilastarg0__].hasOwnProperty ("__kwargtrans__")) { - var __allkwargs0__ = arguments [__ilastarg0__--]; - for (var __attrib0__ in __allkwargs0__) { - switch (__attrib0__) { - case 'a': var a = __allkwargs0__ [__attrib0__]; break; - case 'b': var b = __allkwargs0__ [__attrib0__]; break; - } - } - } - } - else { - } - return (key (a) > key (b) ? 1 : -(1)); - })); - } - else { - iterable.sort (); - } - if (reverse) { - iterable.reverse (); - } -}; -export var sorted = function (iterable, key, reverse) { - if (typeof key == 'undefined' || (key != null && key.hasOwnProperty ("__kwargtrans__"))) {; - var key = null; - }; - if (typeof reverse == 'undefined' || (reverse != null && reverse.hasOwnProperty ("__kwargtrans__"))) {; - var reverse = false; - }; - if (arguments.length) { - var __ilastarg0__ = arguments.length - 1; - if (arguments [__ilastarg0__] && arguments [__ilastarg0__].hasOwnProperty ("__kwargtrans__")) { - var __allkwargs0__ = arguments [__ilastarg0__--]; - for (var __attrib0__ in __allkwargs0__) { - switch (__attrib0__) { - case 'iterable': var iterable = __allkwargs0__ [__attrib0__]; break; - case 'key': var key = __allkwargs0__ [__attrib0__]; break; - case 'reverse': var reverse = __allkwargs0__ [__attrib0__]; break; - } - } - } - } - else { - } - if (py_typeof (iterable) == dict) { - var result = copy (iterable.py_keys ()); - } - else { - var result = copy (iterable); - } - __sort__ (result, key, reverse); - return result; -}; -export var map = function (func, iterable) { - return (function () { - var __accu0__ = []; - for (var item of iterable) { - __accu0__.append (func (item)); - } - return __accu0__; - }) (); -}; -export var filter = function (func, iterable) { - if (func == null) { - var func = bool; - } - return (function () { - var __accu0__ = []; - for (var item of iterable) { - if (func (item)) { - __accu0__.append (item); - } - } - return __accu0__; - }) (); -}; -export var divmod = function (n, d) { - return tuple ([Math.floor (n / d), __mod__ (n, d)]); -}; -export var __Terminal__ = __class__ ('__Terminal__', [object], { - __module__: __name__, - get __init__ () {return __get__ (this, function (self) { - self.buffer = ''; - try { - self.element = document.getElementById ('__terminal__'); - } - catch (__except0__) { - self.element = null; - } - if (self.element) { - self.element.style.overflowX = 'auto'; - self.element.style.boxSizing = 'border-box'; - self.element.style.padding = '5px'; - self.element.innerHTML = '_'; - } - });}, - get print () {return __get__ (this, function (self) { - var sep = ' '; - var end = '\n'; - if (arguments.length) { - var __ilastarg0__ = arguments.length - 1; - if (arguments [__ilastarg0__] && arguments [__ilastarg0__].hasOwnProperty ("__kwargtrans__")) { - var __allkwargs0__ = arguments [__ilastarg0__--]; - for (var __attrib0__ in __allkwargs0__) { - switch (__attrib0__) { - case 'self': var self = __allkwargs0__ [__attrib0__]; break; - case 'sep': var sep = __allkwargs0__ [__attrib0__]; break; - case 'end': var end = __allkwargs0__ [__attrib0__]; break; - } - } - } - var args = tuple ([].slice.apply (arguments).slice (1, __ilastarg0__ + 1)); - } - else { - var args = tuple (); - } - self.buffer = '{}{}{}'.format (self.buffer, sep.join ((function () { - var __accu0__ = []; - for (var arg of args) { - __accu0__.append (str (arg)); - } - return __accu0__; - }) ()), end).__getslice__ (-(4096), null, 1); - if (self.element) { - self.element.innerHTML = self.buffer.py_replace ('\n', '
    ').py_replace (' ', ' '); - self.element.scrollTop = self.element.scrollHeight; - } - else { - console.log (sep.join ((function () { - var __accu0__ = []; - for (var arg of args) { - __accu0__.append (str (arg)); - } - return __accu0__; - }) ())); - } - });}, - get input () {return __get__ (this, function (self, question) { - if (arguments.length) { - var __ilastarg0__ = arguments.length - 1; - if (arguments [__ilastarg0__] && arguments [__ilastarg0__].hasOwnProperty ("__kwargtrans__")) { - var __allkwargs0__ = arguments [__ilastarg0__--]; - for (var __attrib0__ in __allkwargs0__) { - switch (__attrib0__) { - case 'self': var self = __allkwargs0__ [__attrib0__]; break; - case 'question': var question = __allkwargs0__ [__attrib0__]; break; - } - } - } - } - else { - } - self.print ('{}'.format (question), __kwargtrans__ ({end: ''})); - var answer = window.prompt ('\n'.join (self.buffer.py_split ('\n').__getslice__ (-(8), null, 1))); - self.print (answer); - return answer; - });} -}); -export var __terminal__ = __Terminal__ (); -export var print = __terminal__.print; -export var input = __terminal__.input; - -//# sourceMappingURL=org.transcrypt.__runtime__.map \ No newline at end of file diff --git a/js/org.transcrypt.__runtime__.map b/js/org.transcrypt.__runtime__.map deleted file mode 100644 index a4717a5..0000000 --- a/js/org.transcrypt.__runtime__.map +++ /dev/null @@ -1,8 +0,0 @@ -{ - "version": 3, - "file": "org.transcrypt.__runtime__.js", - "sources": [ - "org.transcrypt.__runtime__.py" - ], - "mappings": "AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AAAA;AAAA;AAGA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AACA;AAAA;AAAA;AAMA;AAAA;AAAA;AAKA;AAAA;AAAA;AAGA;AAAA;AAAA;AAGA;AAAA;AAAA;AAKA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAEA;AACA;AAAA;AAIA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AAAA;AA0GA;AAAA;AAUA;AACA;AAEA;AACA;AAAA;AAAA;AAEA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAEA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AAEA;AAAA;AAEA;AAEA;AACA;AAAA" -} \ No newline at end of file diff --git a/js/org.transcrypt.__runtime__.py b/js/org.transcrypt.__runtime__.py deleted file mode 100644 index 8b06f7b..0000000 --- a/js/org.transcrypt.__runtime__.py +++ /dev/null @@ -1,287 +0,0 @@ -# Transcrypt runtime module - -#__pragma__ ('js', 'export var __envir__ = {{}};\n{}', __include__ ('org/transcrypt/__envir__.js')) -#__pragma__ ('js', '{}', __include__ ('org/transcrypt/__core__.js')) -#__pragma__ ('js', '{}', __include__ ('org/transcrypt/__builtin__.js')) - -#__pragma__ ('skip') -copy = Math = __typeof__ = __repr__ = document = console = window = 0 -#__pragma__ ('noskip') - -#__pragma__ ('notconv') # !!! tconv gives a problem with __terminal__, needs investigation -#__pragma__ ('nokwargs') -#__pragma__ ('noalias', 'sort') - -class BaseException: - pass - -class Exception (BaseException): - #__pragma__ ('kwargs') - def __init__ (self, *args, **kwargs): - self.__args__ = args - if kwargs.error != None: - self.stack = kwargs.error.stack # Integrate with JavaScript Error object - elif Error: - self.stack = (__new__(Error())).stack # Create our own stack if we aren't given one - else: - self.stack = 'No stack trace available' - #__pragma__ ('nokwargs') - - def __repr__ (self): - if len (self.__args__) > 1: - return '{}{}'.format (self.__class__.__name__, repr (tuple (self.__args__))) - elif len (self.__args__): - return '{}({})'.format (self.__class__.__name__, repr (self.__args__ [0])) - else: - return '{}()'.format (self.__class__.__name__) - - def __str__ (self): - if len (self.__args__) > 1: - return str (tuple (self.__args__)) - elif len (self.__args__): - return str (self.__args__ [0]) - else: - return '' - -class IterableError (Exception): - def __init__ (self, error): - Exception.__init__ (self, 'Can\'t iterate over non-iterable', error = error) - -class StopIteration (Exception): - def __init__ (self, error): - Exception.__init__ (self, 'Iterator exhausted', error = error) - -class ValueError (Exception): - def __init__ (self, message, error): - Exception.__init__ (self, message, error = error) - -class KeyError (Exception): - def __init__ (self, message, error): - Exception.__init__ (self, message, error = error) - -class AssertionError (Exception): - def __init__ (self, message, error): - if message: - Exception.__init__ (self, message, error = error) - else: - Exception.__init__ (self, error = error) - -class NotImplementedError (Exception): - def __init__(self, message, error): - Exception.__init__(self, message, error = error) - -class IndexError (Exception): - def __init__(self, message, error): - Exception.__init__(self, message, error = error) - -class AttributeError (Exception): - def __init__(self, message, error): - Exception.__init__(self, message, error = error) - -class TypeError (Exception): - def __init__(self, message, error): - Exception.__init__(self, message, error = error) - -# Warnings Exceptions -# N.B. This is a limited subset of the warnings defined in -# the cpython implementation to keep things small for now. - -class Warning (Exception): - ''' Warning Base Class - ''' - pass - -class UserWarning (Warning): - pass - -class DeprecationWarning (Warning): - pass - -class RuntimeWarning (Warning): - pass - -#__pragma__ ('kwargs') - -def __sort__ (iterable, key = None, reverse = False): # Used by py_sort, can deal with kwargs - if key: - iterable.sort (lambda a, b: 1 if key (a) > key (b) else -1) # JavaScript sort, case '==' is irrelevant for sorting - else: - iterable.sort () # JavaScript sort - - if reverse: - iterable.reverse () - -def sorted (iterable, key = None, reverse = False): - if type (iterable) == dict: - result = copy (iterable.keys ()) - else: - result = copy (iterable) - - __sort__ (result, key, reverse) - return result - -#__pragma__ ('nokwargs') - -def map (func, iterable): - return [func (item) for item in iterable] - - -def filter (func, iterable): - if func == None: - func = bool - return [item for item in iterable if func (item)] - -def divmod (n, d): - return n // d, n % d - -#__pragma__ ('ifdef', '__complex__') - -class complex: - def __init__ (self, real, imag = None): - if imag == None: - if type (real) == complex: - self.real = real.real - self.imag = real.imag - else: - self.real = real - self.imag = 0 - else: - self.real = real - self.imag = imag - - def __neg__ (self): - return complex (-self.real, -self.imag) - - def __exp__ (self): - modulus = Math.exp (self.real) - return complex (modulus * Math.cos (self.imag), modulus * Math.sin (self.imag)) - - def __log__ (self): - return complex (Math.log (Math.sqrt (self.real * self.real + self.imag * self.imag)), Math.atan2 (self.imag, self.real)) - - def __pow__ (self, other): # a ** b = exp (b log a) - return (self.__log__ () .__mul__ (other)) .__exp__ () - - def __rpow__ (self, real): # real ** comp -> comp.__rpow__ (real) - return self.__mul__ (Math.log (real)) .__exp__ () - - def __mul__ (self, other): - if __typeof__ (other) is 'number': - return complex (self.real * other, self.imag * other) - else: - return complex (self.real * other.real - self.imag * other.imag, self.real * other.imag + self.imag * other.real) - - def __rmul__ (self, real): # real + comp -> comp.__rmul__ (real) - return complex (self.real * real, self.imag * real) - - def __div__ (self, other): - if __typeof__ (other) is 'number': - return complex (self.real / other, self.imag / other) - else: - denom = other.real * other.real + other.imag * other.imag - return complex ( - (self.real * other.real + self.imag * other.imag) / denom, - (self.imag * other.real - self.real * other.imag) / denom - ) - - def __rdiv__ (self, real): # real / comp -> comp.__rdiv__ (real) - denom = self.real * self.real - return complex ( - (real * self.real) / denom, - (real * self.imag) / denom - ) - - def __add__ (self, other): - if __typeof__ (other) is 'number': - return complex (self.real + other, self.imag) - else: # Assume other is complex - return complex (self.real + other.real, self.imag + other.imag) - - def __radd__ (self, real): # real + comp -> comp.__radd__ (real) - return complex (self.real + real, self.imag) - - def __sub__ (self, other): - if __typeof__ (other) is 'number': - return complex (self.real - other, self.imag) - else: - return complex (self.real - other.real, self.imag - other.imag) - - def __rsub__ (self, real): # real - comp -> comp.__rsub__ (real) - return complex (real - self.real, -self.imag) - - def __repr__ (self): - return '({}{}{}j)'.format (self.real, '+' if self.imag >= 0 else '', self.imag) - - def __str__ (self): - return __repr__ (self) [1 : -1] - - def __eq__ (self, other): - if __typeof__ (other) is 'number': - return self.real == other - else: - return self.real == other.real and self.imag == other.imag - - def __ne__ (self, other): - if __typeof__ (other) is 'number': - return self.real != other - else: - return self.real != other.real or self.imag != other.imag - - def conjugate (self): - return complex (self.real, -self.imag) - -def __conj__ (aNumber): - if isinstance (aNumber, complex): - return complex (aNumber.real, -aNumber.imag) - else: - return complex (aNumber, 0) - -#__pragma__ ('endif') - -class __Terminal__: - ''' - Printing to either the console or to html happens async, but is blocked by calling window.prompt. - So while all input and print statements are encountered in normal order, the print's exit immediately without yet having actually printed - This means the next input takes control, blocking actual printing and so on indefinitely - The effect is that everything's only printed after all inputs are done - To prevent that, what's needed is to only execute the next window.prompt after actual printing has been done - Since we've no way to find out when that is, a timeout is used. - ''' - - def __init__ (self): - self.buffer = '' - - try: - self.element = document.getElementById ('__terminal__') - except: - self.element = None - - if self.element: - self.element.style.overflowX = 'auto' - self.element.style.boxSizing = 'border-box' - self.element.style.padding = '5px' - self.element.innerHTML = '_' - - #__pragma__ ('kwargs') - - def print (self, *args, sep = ' ', end = '\n'): - self.buffer = '{}{}{}'.format (self.buffer, sep.join ([str (arg) for arg in args]), end) [-4096 : ] - - if self.element: - self.element.innerHTML = self.buffer.replace ('\n', '
    ') .replace (' ', ' ') - self.element.scrollTop = self.element.scrollHeight - else: - console.log (sep.join ([str (arg) for arg in args])) - - def input (self, question): - self.print ('{}'.format (question), end = '') - answer = window.prompt ('\n'.join (self.buffer.split ('\n') [-8:])) - self.print (answer) - return answer - - #__pragma__ ('nokwargs') - -__terminal__ = __Terminal__ () - -print = __terminal__.print -input = __terminal__.input diff --git a/lib/pug.js b/js/pug.js similarity index 100% rename from lib/pug.js rename to js/pug.js diff --git a/js/rapydscript.js b/js/rapydscript.js new file mode 100644 index 0000000..7d87914 --- /dev/null +++ b/js/rapydscript.js @@ -0,0 +1,398 @@ +// vim:fileencoding=utf-8 +(function(external_namespace) { +"use strict;" +var rs_version = "0.7.22"; +var rs_commit_sha = "ab934fc152befdf36c803ccb1488a45f8294f983"; + +// Embedded modules {{{ +var data = {"compiler.js":"(function(){\n \"use strict\";\n var ρσ_iterator_symbol = (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") ? Symbol.iterator : \"iterator-Symbol-5d0927e5554349048cf0e3762a228256\";\n var ρσ_kwargs_symbol = (typeof Symbol === \"function\") ? Symbol(\"kwargs-object\") : \"kwargs-object-Symbol-5d0927e5554349048cf0e3762a228256\";\n var ρσ_cond_temp, ρσ_expr_temp, ρσ_last_exception;\n var ρσ_object_counter = 0;\nvar ρσ_len;\nfunction ρσ_bool(val) {\n return !!val;\n};\nif (!ρσ_bool.__argnames__) Object.defineProperties(ρσ_bool, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_print() {\n var parts;\n if (typeof console === \"object\") {\n parts = [];\n for (var i = 0; i < arguments.length; i++) {\n parts.push(ρσ_str(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]));\n }\n console.log(parts.join(\" \"));\n }\n};\nif (!ρσ_print.__module__) Object.defineProperties(ρσ_print, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_int(val, base) {\n var ans;\n if (typeof val === \"number\") {\n ans = val | 0;\n } else {\n ans = parseInt(val, base || 10);\n }\n if (isNaN(ans)) {\n throw new ValueError(\"Invalid literal for int with base \" + (base || 10) + \": \" + val);\n }\n return ans;\n};\nif (!ρσ_int.__argnames__) Object.defineProperties(ρσ_int, {\n __argnames__ : {value: [\"val\", \"base\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_float(val) {\n var ans;\n if (typeof val === \"number\") {\n ans = val;\n } else {\n ans = parseFloat(val);\n }\n if (isNaN(ans)) {\n throw new ValueError(\"Could not convert string to float: \" + arguments[0]);\n }\n return ans;\n};\nif (!ρσ_float.__argnames__) Object.defineProperties(ρσ_float, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_arraylike_creator() {\n var names;\n names = \"Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".split(\" \");\n if (typeof HTMLCollection === \"function\") {\n names = names.concat(\"HTMLCollection NodeList NamedNodeMap TouchList\".split(\" \"));\n }\n return (function() {\n var ρσ_anonfunc = function (x) {\n if (Array.isArray(x) || typeof x === \"string\" || names.indexOf(Object.prototype.toString.call(x).slice(8, -1)) > -1) {\n return true;\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n};\nif (!ρσ_arraylike_creator.__module__) Object.defineProperties(ρσ_arraylike_creator, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction options_object(f) {\n return (function() {\n var ρσ_anonfunc = function () {\n if (typeof arguments[arguments.length - 1] === \"object\") {\n arguments[ρσ_bound_index(arguments.length - 1, arguments)][ρσ_kwargs_symbol] = true;\n }\n return f.apply(this, arguments);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n};\nif (!options_object.__argnames__) Object.defineProperties(options_object, {\n __argnames__ : {value: [\"f\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_id(x) {\n return x.ρσ_object_id;\n};\nif (!ρσ_id.__argnames__) Object.defineProperties(ρσ_id, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_dir(item) {\n var arr;\n arr = ρσ_list_decorate([]);\n for (var i in item) {\n arr.push(i);\n }\n return arr;\n};\nif (!ρσ_dir.__argnames__) Object.defineProperties(ρσ_dir, {\n __argnames__ : {value: [\"item\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_ord(x) {\n var ans, second;\n ans = x.charCodeAt(0);\n if (55296 <= ans && ans <= 56319) {\n second = x.charCodeAt(1);\n if (56320 <= second && second <= 57343) {\n return (ans - 55296) * 1024 + second - 56320 + 65536;\n }\n throw new TypeError(\"string is missing the low surrogate char\");\n }\n return ans;\n};\nif (!ρσ_ord.__argnames__) Object.defineProperties(ρσ_ord, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_chr(code) {\n if (code <= 65535) {\n return String.fromCharCode(code);\n }\n code -= 65536;\n return String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));\n};\nif (!ρσ_chr.__argnames__) Object.defineProperties(ρσ_chr, {\n __argnames__ : {value: [\"code\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_callable(x) {\n return typeof x === \"function\";\n};\nif (!ρσ_callable.__argnames__) Object.defineProperties(ρσ_callable, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_bin(x) {\n var ans;\n if (typeof x !== \"number\" || x % 1 !== 0) {\n throw new TypeError(\"integer required\");\n }\n ans = x.toString(2);\n if (ans[0] === \"-\") {\n ans = \"-\" + \"0b\" + ans.slice(1);\n } else {\n ans = \"0b\" + ans;\n }\n return ans;\n};\nif (!ρσ_bin.__argnames__) Object.defineProperties(ρσ_bin, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_hex(x) {\n var ans;\n if (typeof x !== \"number\" || x % 1 !== 0) {\n throw new TypeError(\"integer required\");\n }\n ans = x.toString(16);\n if (ans[0] === \"-\") {\n ans = \"-\" + \"0x\" + ans.slice(1);\n } else {\n ans = \"0x\" + ans;\n }\n return ans;\n};\nif (!ρσ_hex.__argnames__) Object.defineProperties(ρσ_hex, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_enumerate(iterable) {\n var ans, iterator;\n ans = {\"_i\":-1};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n if (ρσ_arraylike(iterable)) {\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i < iterable.length) {\n return {'done':false, 'value':[this._i, iterable[this._i]]};\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n ans[\"_iterator\"] = iterator;\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var r;\n r = this._iterator.next();\n if (r.done) {\n return {'done':true};\n }\n this._i += 1;\n return {'done':false, 'value':[this._i, r.value]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n return ρσ_enumerate(Object.keys(iterable));\n};\nif (!ρσ_enumerate.__argnames__) Object.defineProperties(ρσ_enumerate, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_reversed(iterable) {\n var ans;\n if (ρσ_arraylike(iterable)) {\n ans = {\"_i\": iterable.length};\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i -= 1;\n if (this._i > -1) {\n return {'done':false, 'value':iterable[this._i]};\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n throw new TypeError(\"reversed() can only be called on arrays or strings\");\n};\nif (!ρσ_reversed.__argnames__) Object.defineProperties(ρσ_reversed, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_iter(iterable) {\n var ans;\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n return (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n }\n if (ρσ_arraylike(iterable)) {\n ans = {\"_i\":-1};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i < iterable.length) {\n return {'done':false, 'value':iterable[this._i]};\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n return ρσ_iter(Object.keys(iterable));\n};\nif (!ρσ_iter.__argnames__) Object.defineProperties(ρσ_iter, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_range_next(step, length) {\n var ρσ_unpack;\n this._i += step;\n this._idx += 1;\n if (this._idx >= length) {\n ρσ_unpack = [this.__i, -1];\n this._i = ρσ_unpack[0];\n this._idx = ρσ_unpack[1];\n return {'done':true};\n }\n return {'done':false, 'value':this._i};\n};\nif (!ρσ_range_next.__argnames__) Object.defineProperties(ρσ_range_next, {\n __argnames__ : {value: [\"step\", \"length\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_range(start, stop, step) {\n var length, ans;\n if (arguments.length <= 1) {\n stop = start || 0;\n start = 0;\n }\n step = arguments[2] || 1;\n length = Math.max(Math.ceil((stop - start) / step), 0);\n ans = {start:start, step:step, stop:stop};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n var it;\n it = {\"_i\": start - step, \"_idx\": -1};\n it.next = ρσ_range_next.bind(it, step, length);\n it[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return it;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.count = (function() {\n var ρσ_anonfunc = function (val) {\n if (!this._cached) {\n this._cached = list(this);\n }\n return this._cached.count(val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.index = (function() {\n var ρσ_anonfunc = function (val) {\n if (!this._cached) {\n this._cached = list(this);\n }\n return this._cached.index(val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.__len__ = (function() {\n var ρσ_anonfunc = function () {\n return length;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.__repr__ = (function() {\n var ρσ_anonfunc = function () {\n return \"range(\" + ρσ_str.format(\"{}\", start) + \", \" + ρσ_str.format(\"{}\", stop) + \", \" + ρσ_str.format(\"{}\", step) + \")\";\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.__str__ = ans.toString = ans.__repr__;\n if (typeof Proxy === \"function\") {\n ans = new Proxy(ans, (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function (obj, prop) {\n var iprop;\n if (typeof prop === \"string\") {\n iprop = parseInt(prop);\n if (!isNaN(iprop)) {\n prop = iprop;\n }\n }\n if (typeof prop === \"number\") {\n if (!obj._cached) {\n obj._cached = list(obj);\n }\n return (ρσ_expr_temp = obj._cached)[(typeof prop === \"number\" && prop < 0) ? ρσ_expr_temp.length + prop : prop];\n }\n return obj[(typeof prop === \"number\" && prop < 0) ? obj.length + prop : prop];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"obj\", \"prop\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this));\n }\n return ans;\n};\nif (!ρσ_range.__argnames__) Object.defineProperties(ρσ_range, {\n __argnames__ : {value: [\"start\", \"stop\", \"step\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_getattr(obj, name, defval) {\n var ret;\n try {\n ret = obj[(typeof name === \"number\" && name < 0) ? obj.length + name : name];\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof TypeError) {\n if (defval === undefined) {\n throw new AttributeError(\"The attribute \" + name + \" is not present\");\n }\n return defval;\n } else {\n throw ρσ_Exception;\n }\n }\n if (ret === undefined && !(name in obj)) {\n if (defval === undefined) {\n throw new AttributeError(\"The attribute \" + name + \" is not present\");\n }\n ret = defval;\n }\n return ret;\n};\nif (!ρσ_getattr.__argnames__) Object.defineProperties(ρσ_getattr, {\n __argnames__ : {value: [\"obj\", \"name\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_setattr(obj, name, value) {\n obj[(typeof name === \"number\" && name < 0) ? obj.length + name : name] = value;\n};\nif (!ρσ_setattr.__argnames__) Object.defineProperties(ρσ_setattr, {\n __argnames__ : {value: [\"obj\", \"name\", \"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_hasattr(obj, name) {\n return name in obj;\n};\nif (!ρσ_hasattr.__argnames__) Object.defineProperties(ρσ_hasattr, {\n __argnames__ : {value: [\"obj\", \"name\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_len = (function() {\n var ρσ_anonfunc = function () {\n function len(obj) {\n if (ρσ_arraylike(obj)) {\n return obj.length;\n }\n if (typeof obj.__len__ === \"function\") {\n return obj.__len__();\n }\n if (obj instanceof Set || obj instanceof Map) {\n return obj.size;\n }\n return Object.keys(obj).length;\n };\n if (!len.__argnames__) Object.defineProperties(len, {\n __argnames__ : {value: [\"obj\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function len5(obj) {\n if (ρσ_arraylike(obj)) {\n return obj.length;\n }\n if (typeof obj.__len__ === \"function\") {\n return obj.__len__();\n }\n return Object.keys(obj).length;\n };\n if (!len5.__argnames__) Object.defineProperties(len5, {\n __argnames__ : {value: [\"obj\"]},\n __module__ : {value: \"__main__\"}\n });\n\n return (typeof Set === \"function\" && typeof Map === \"function\") ? len : len5;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})()();\nfunction ρσ_get_module(name) {\n return ρσ_modules[(typeof name === \"number\" && name < 0) ? ρσ_modules.length + name : name];\n};\nif (!ρσ_get_module.__argnames__) Object.defineProperties(ρσ_get_module, {\n __argnames__ : {value: [\"name\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_pow(x, y, z) {\n var ans;\n ans = Math.pow(x, y);\n if (z !== undefined) {\n ans %= z;\n }\n return ans;\n};\nif (!ρσ_pow.__argnames__) Object.defineProperties(ρσ_pow, {\n __argnames__ : {value: [\"x\", \"y\", \"z\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_type(x) {\n return x.constructor;\n};\nif (!ρσ_type.__argnames__) Object.defineProperties(ρσ_type, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_divmod(x, y) {\n var d;\n if (y === 0) {\n throw new ZeroDivisionError(\"integer division or modulo by zero\");\n }\n d = Math.floor(x / y);\n return [d, x - d * y];\n};\nif (!ρσ_divmod.__argnames__) Object.defineProperties(ρσ_divmod, {\n __argnames__ : {value: [\"x\", \"y\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_max() {\n var kwargs = arguments[arguments.length-1];\n if (kwargs === null || typeof kwargs !== \"object\" || kwargs [ρσ_kwargs_symbol] !== true) kwargs = {};\n var args = Array.prototype.slice.call(arguments, 0);\n if (kwargs !== null && typeof kwargs === \"object\" && kwargs [ρσ_kwargs_symbol] === true) args.pop();\n var args, x;\n if (args.length === 0) {\n if (kwargs.defval !== undefined) {\n return kwargs.defval;\n }\n throw new TypeError(\"expected at least one argument\");\n }\n if (args.length === 1) {\n args = args[0];\n }\n if (kwargs.key) {\n args = (function() {\n var ρσ_Iter = ρσ_Iterable(args), ρσ_Result = [], x;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n x = ρσ_Iter[ρσ_Index];\n ρσ_Result.push(kwargs.key(x));\n }\n ρσ_Result = ρσ_list_constructor(ρσ_Result);\n return ρσ_Result;\n })();\n }\n if (!Array.isArray(args)) {\n args = list(args);\n }\n if (args.length) {\n return this.apply(null, args);\n }\n if (kwargs.defval !== undefined) {\n return kwargs.defval;\n }\n throw new TypeError(\"expected at least one argument\");\n};\nif (!ρσ_max.__handles_kwarg_interpolation__) Object.defineProperties(ρσ_max, {\n __handles_kwarg_interpolation__ : {value: true},\n __module__ : {value: \"__main__\"}\n});\n\nvar abs = Math.abs, max = ρσ_max.bind(Math.max), min = ρσ_max.bind(Math.min), bool = ρσ_bool, type = ρσ_type;\nvar float = ρσ_float, int = ρσ_int, arraylike = ρσ_arraylike_creator(), ρσ_arraylike = arraylike;\nvar print = ρσ_print, id = ρσ_id, get_module = ρσ_get_module, pow = ρσ_pow, divmod = ρσ_divmod;\nvar dir = ρσ_dir, ord = ρσ_ord, chr = ρσ_chr, bin = ρσ_bin, hex = ρσ_hex, callable = ρσ_callable;\nvar enumerate = ρσ_enumerate, iter = ρσ_iter, reversed = ρσ_reversed, len = ρσ_len;\nvar range = ρσ_range, getattr = ρσ_getattr, setattr = ρσ_setattr, hasattr = ρσ_hasattr;function ρσ_equals(a, b) {\n var ρσ_unpack, akeys, bkeys, key;\n if (a === b) {\n return true;\n }\n if (a && typeof a.__eq__ === \"function\") {\n return a.__eq__(b);\n }\n if (b && typeof b.__eq__ === \"function\") {\n return b.__eq__(a);\n }\n if (ρσ_arraylike(a) && ρσ_arraylike(b)) {\n if ((a.length !== b.length && (typeof a.length !== \"object\" || ρσ_not_equals(a.length, b.length)))) {\n return false;\n }\n for (var i=0; i < a.length; i++) {\n if (!(((a[(typeof i === \"number\" && i < 0) ? a.length + i : i] === b[(typeof i === \"number\" && i < 0) ? b.length + i : i] || typeof a[(typeof i === \"number\" && i < 0) ? a.length + i : i] === \"object\" && ρσ_equals(a[(typeof i === \"number\" && i < 0) ? a.length + i : i], b[(typeof i === \"number\" && i < 0) ? b.length + i : i]))))) {\n return false;\n }\n }\n return true;\n }\n if (typeof a === \"object\" && typeof b === \"object\" && a !== null && b !== null && (a.constructor === Object && b.constructor === Object || Object.getPrototypeOf(a) === null && Object.getPrototypeOf(b) === null)) {\n ρσ_unpack = [Object.keys(a), Object.keys(b)];\n akeys = ρσ_unpack[0];\n bkeys = ρσ_unpack[1];\n if (akeys.length !== bkeys.length) {\n return false;\n }\n for (var j=0; j < akeys.length; j++) {\n key = akeys[(typeof j === \"number\" && j < 0) ? akeys.length + j : j];\n if (!(((a[(typeof key === \"number\" && key < 0) ? a.length + key : key] === b[(typeof key === \"number\" && key < 0) ? b.length + key : key] || typeof a[(typeof key === \"number\" && key < 0) ? a.length + key : key] === \"object\" && ρσ_equals(a[(typeof key === \"number\" && key < 0) ? a.length + key : key], b[(typeof key === \"number\" && key < 0) ? b.length + key : key]))))) {\n return false;\n }\n }\n return true;\n }\n return false;\n};\nif (!ρσ_equals.__argnames__) Object.defineProperties(ρσ_equals, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_not_equals(a, b) {\n if (a === b) {\n return false;\n }\n if (a && typeof a.__ne__ === \"function\") {\n return a.__ne__(b);\n }\n if (b && typeof b.__ne__ === \"function\") {\n return b.__ne__(a);\n }\n return !ρσ_equals(a, b);\n};\nif (!ρσ_not_equals.__argnames__) Object.defineProperties(ρσ_not_equals, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar equals = ρσ_equals;\nfunction ρσ_list_extend(iterable) {\n var start, iterator, result;\n if (Array.isArray(iterable) || typeof iterable === \"string\") {\n start = this.length;\n this.length += iterable.length;\n for (var i = 0; i < iterable.length; i++) {\n (ρσ_expr_temp = this)[ρσ_bound_index(start + i, ρσ_expr_temp)] = iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i];\n }\n } else {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done) {\n this.push(result.value);\n result = iterator.next();\n }\n }\n};\nif (!ρσ_list_extend.__argnames__) Object.defineProperties(ρσ_list_extend, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_index(val, start, stop) {\n var idx;\n start = start || 0;\n if (start < 0) {\n start = this.length + start;\n }\n if (start < 0) {\n throw new ValueError(val + \" is not in list\");\n }\n if (stop === undefined) {\n idx = this.indexOf(val, start);\n if (idx === -1) {\n throw new ValueError(val + \" is not in list\");\n }\n return idx;\n }\n if (stop < 0) {\n stop = this.length + stop;\n }\n for (var i = start; i < stop; i++) {\n if (((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === val || typeof (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === \"object\" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i], val))) {\n return i;\n }\n }\n throw new ValueError(val + \" is not in list\");\n};\nif (!ρσ_list_index.__argnames__) Object.defineProperties(ρσ_list_index, {\n __argnames__ : {value: [\"val\", \"start\", \"stop\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_pop(index) {\n var ans;\n if (this.length === 0) {\n throw new IndexError(\"list is empty\");\n }\n if (index === undefined) {\n index = -1;\n }\n ans = this.splice(index, 1);\n if (!ans.length) {\n throw new IndexError(\"pop index out of range\");\n }\n return ans[0];\n};\nif (!ρσ_list_pop.__argnames__) Object.defineProperties(ρσ_list_pop, {\n __argnames__ : {value: [\"index\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_remove(value) {\n var idx;\n idx = this.indexOf(value);\n if (idx === -1) {\n throw new ValueError(value + \" not in list\");\n }\n this.splice(idx, 1);\n};\nif (!ρσ_list_remove.__argnames__) Object.defineProperties(ρσ_list_remove, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_to_string() {\n return \"[\" + this.join(\", \") + \"]\";\n};\nif (!ρσ_list_to_string.__module__) Object.defineProperties(ρσ_list_to_string, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_insert(index, val) {\n if (index < 0) {\n index += this.length;\n }\n index = min(this.length, max(index, 0));\n if (index === 0) {\n this.unshift(val);\n return;\n }\n for (var i = this.length; i > index; i--) {\n (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] = (ρσ_expr_temp = this)[ρσ_bound_index(i - 1, ρσ_expr_temp)];\n }\n (ρσ_expr_temp = this)[(typeof index === \"number\" && index < 0) ? ρσ_expr_temp.length + index : index] = val;\n};\nif (!ρσ_list_insert.__argnames__) Object.defineProperties(ρσ_list_insert, {\n __argnames__ : {value: [\"index\", \"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_copy() {\n return ρσ_list_constructor(this);\n};\nif (!ρσ_list_copy.__module__) Object.defineProperties(ρσ_list_copy, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_clear() {\n this.length = 0;\n};\nif (!ρσ_list_clear.__module__) Object.defineProperties(ρσ_list_clear, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_as_array() {\n return Array.prototype.slice.call(this);\n};\nif (!ρσ_list_as_array.__module__) Object.defineProperties(ρσ_list_as_array, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_count(value) {\n return this.reduce((function() {\n var ρσ_anonfunc = function (n, val) {\n return n + (val === value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"n\", \"val\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })(), 0);\n};\nif (!ρσ_list_count.__argnames__) Object.defineProperties(ρσ_list_count, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_sort_key(value) {\n var t;\n t = typeof value;\n if (t === \"string\" || t === \"number\") {\n return value;\n }\n return value.toString();\n};\nif (!ρσ_list_sort_key.__argnames__) Object.defineProperties(ρσ_list_sort_key, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_sort_cmp(a, b, ap, bp) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return ap - bp;\n};\nif (!ρσ_list_sort_cmp.__argnames__) Object.defineProperties(ρσ_list_sort_cmp, {\n __argnames__ : {value: [\"a\", \"b\", \"ap\", \"bp\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_sort() {\n var key = (arguments[0] === undefined || ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? ρσ_list_sort.__defaults__.key : arguments[0];\n var reverse = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? ρσ_list_sort.__defaults__.reverse : arguments[1];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"key\")){\n key = ρσ_kwargs_obj.key;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"reverse\")){\n reverse = ρσ_kwargs_obj.reverse;\n }\n var mult, keymap, posmap, k;\n key = key || ρσ_list_sort_key;\n mult = (reverse) ? -1 : 1;\n keymap = dict();\n posmap = dict();\n for (var i=0; i < this.length; i++) {\n k = (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n keymap.set(k, key(k));\n posmap.set(k, i);\n }\n this.sort((function() {\n var ρσ_anonfunc = function (a, b) {\n return mult * ρσ_list_sort_cmp(keymap.get(a), keymap.get(b), posmap.get(a), posmap.get(b));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })());\n};\nif (!ρσ_list_sort.__defaults__) Object.defineProperties(ρσ_list_sort, {\n __defaults__ : {value: {key:null, reverse:false}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"key\", \"reverse\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_concat() {\n var ans;\n ans = Array.prototype.concat.apply(this, arguments);\n ρσ_list_decorate(ans);\n return ans;\n};\nif (!ρσ_list_concat.__module__) Object.defineProperties(ρσ_list_concat, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_slice() {\n var ans;\n ans = Array.prototype.slice.apply(this, arguments);\n ρσ_list_decorate(ans);\n return ans;\n};\nif (!ρσ_list_slice.__module__) Object.defineProperties(ρσ_list_slice, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_iterator(value) {\n var self;\n self = this;\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"_i\"] = -1;\n ρσ_d[\"_list\"] = self;\n ρσ_d[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._list.length) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = true;\n return ρσ_d;\n }).call(this);\n }\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = false;\n ρσ_d[\"value\"] = (ρσ_expr_temp = this._list)[ρσ_bound_index(this._i, ρσ_expr_temp)];\n return ρσ_d;\n }).call(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n};\nif (!ρσ_list_iterator.__argnames__) Object.defineProperties(ρσ_list_iterator, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_len() {\n return this.length;\n};\nif (!ρσ_list_len.__module__) Object.defineProperties(ρσ_list_len, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_contains(val) {\n for (var i = 0; i < this.length; i++) {\n if (((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === val || typeof (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === \"object\" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i], val))) {\n return true;\n }\n }\n return false;\n};\nif (!ρσ_list_contains.__argnames__) Object.defineProperties(ρσ_list_contains, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_eq(other) {\n if (!ρσ_arraylike(other)) {\n return false;\n }\n if ((this.length !== other.length && (typeof this.length !== \"object\" || ρσ_not_equals(this.length, other.length)))) {\n return false;\n }\n for (var i = 0; i < this.length; i++) {\n if (!((((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === other[(typeof i === \"number\" && i < 0) ? other.length + i : i] || typeof (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === \"object\" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i], other[(typeof i === \"number\" && i < 0) ? other.length + i : i]))))) {\n return false;\n }\n }\n return true;\n};\nif (!ρσ_list_eq.__argnames__) Object.defineProperties(ρσ_list_eq, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_decorate(ans) {\n ans.append = Array.prototype.push;\n ans.toString = ρσ_list_to_string;\n ans.inspect = ρσ_list_to_string;\n ans.extend = ρσ_list_extend;\n ans.index = ρσ_list_index;\n ans.pypop = ρσ_list_pop;\n ans.remove = ρσ_list_remove;\n ans.insert = ρσ_list_insert;\n ans.copy = ρσ_list_copy;\n ans.clear = ρσ_list_clear;\n ans.count = ρσ_list_count;\n ans.concat = ρσ_list_concat;\n ans.pysort = ρσ_list_sort;\n ans.slice = ρσ_list_slice;\n ans.as_array = ρσ_list_as_array;\n ans.__len__ = ρσ_list_len;\n ans.__contains__ = ρσ_list_contains;\n ans.__eq__ = ρσ_list_eq;\n ans.constructor = ρσ_list_constructor;\n if (typeof ans[ρσ_iterator_symbol] !== \"function\") {\n ans[ρσ_iterator_symbol] = ρσ_list_iterator;\n }\n return ans;\n};\nif (!ρσ_list_decorate.__argnames__) Object.defineProperties(ρσ_list_decorate, {\n __argnames__ : {value: [\"ans\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_constructor(iterable) {\n var ans, iterator, result;\n if (iterable === undefined) {\n ans = [];\n } else if (ρσ_arraylike(iterable)) {\n ans = new Array(iterable.length);\n for (var i = 0; i < iterable.length; i++) {\n ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i] = iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i];\n }\n } else if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n ans = ρσ_list_decorate([]);\n result = iterator.next();\n while (!result.done) {\n ans.push(result.value);\n result = iterator.next();\n }\n } else if (typeof iterable === \"number\") {\n ans = new Array(iterable);\n } else {\n ans = Object.keys(iterable);\n }\n return ρσ_list_decorate(ans);\n};\nif (!ρσ_list_constructor.__argnames__) Object.defineProperties(ρσ_list_constructor, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_list_constructor.__name__ = \"list\";\nvar list = ρσ_list_constructor, list_wrap = ρσ_list_decorate;\nfunction sorted() {\n var iterable = ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true) ? undefined : arguments[0];\n var key = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? sorted.__defaults__.key : arguments[1];\n var reverse = (arguments[2] === undefined || ( 2 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? sorted.__defaults__.reverse : arguments[2];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"key\")){\n key = ρσ_kwargs_obj.key;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"reverse\")){\n reverse = ρσ_kwargs_obj.reverse;\n }\n var ans;\n ans = ρσ_list_constructor(iterable);\n ans.pysort(key, reverse);\n return ans;\n};\nif (!sorted.__defaults__) Object.defineProperties(sorted, {\n __defaults__ : {value: {key:null, reverse:false}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"iterable\", \"key\", \"reverse\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar ρσ_global_object_id = 0, ρσ_set_implementation;\nfunction ρσ_set_keyfor(x) {\n var t, ans;\n t = typeof x;\n if (t === \"string\" || t === \"number\" || t === \"boolean\") {\n return \"_\" + t[0] + x;\n }\n if (x === null) {\n return \"__!@#$0\";\n }\n ans = x.ρσ_hash_key_prop;\n if (ans === undefined) {\n ans = \"_!@#$\" + (++ρσ_global_object_id);\n Object.defineProperty(x, \"ρσ_hash_key_prop\", (function(){\n var ρσ_d = {};\n ρσ_d[\"value\"] = ans;\n return ρσ_d;\n }).call(this));\n }\n return ans;\n};\nif (!ρσ_set_keyfor.__argnames__) Object.defineProperties(ρσ_set_keyfor, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_set_polyfill() {\n this._store = {};\n this.size = 0;\n};\nif (!ρσ_set_polyfill.__module__) Object.defineProperties(ρσ_set_polyfill, {\n __module__ : {value: \"__main__\"}\n});\n\nρσ_set_polyfill.prototype.add = (function() {\n var ρσ_anonfunc = function (x) {\n var key;\n key = ρσ_set_keyfor(x);\n if (!Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size += 1;\n (ρσ_expr_temp = this._store)[(typeof key === \"number\" && key < 0) ? ρσ_expr_temp.length + key : key] = x;\n }\n return this;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.clear = (function() {\n var ρσ_anonfunc = function (x) {\n this._store = {};\n this.size = 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.delete = (function() {\n var ρσ_anonfunc = function (x) {\n var key;\n key = ρσ_set_keyfor(x);\n if (Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size -= 1;\n delete this._store[key];\n return true;\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.has = (function() {\n var ρσ_anonfunc = function (x) {\n return Object.prototype.hasOwnProperty.call(this._store, ρσ_set_keyfor(x));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.values = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nif (typeof Set !== \"function\" || typeof Set.prototype.delete !== \"function\") {\n ρσ_set_implementation = ρσ_set_polyfill;\n} else {\n ρσ_set_implementation = Set;\n}\nfunction ρσ_set(iterable) {\n var ans, s, iterator, result, keys;\n if (this instanceof ρσ_set) {\n this.jsset = new ρσ_set_implementation;\n ans = this;\n if (iterable === undefined) {\n return ans;\n }\n s = ans.jsset;\n if (ρσ_arraylike(iterable)) {\n for (var i = 0; i < iterable.length; i++) {\n s.add(iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i]);\n }\n } else if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done) {\n s.add(result.value);\n result = iterator.next();\n }\n } else {\n keys = Object.keys(iterable);\n for (var j=0; j < keys.length; j++) {\n s.add(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j]);\n }\n }\n return ans;\n } else {\n return new ρσ_set(iterable);\n }\n};\nif (!ρσ_set.__argnames__) Object.defineProperties(ρσ_set, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_set.prototype.__name__ = \"set\";\nObject.defineProperties(ρσ_set.prototype, (function(){\n var ρσ_d = {};\n ρσ_d[\"length\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n ρσ_d[\"size\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n return ρσ_d;\n}).call(this));\nρσ_set.prototype.__len__ = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.has = ρσ_set.prototype.__contains__ = (function() {\n var ρσ_anonfunc = function (x) {\n return this.jsset.has(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.add = (function() {\n var ρσ_anonfunc = function (x) {\n this.jsset.add(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.clear = (function() {\n var ρσ_anonfunc = function () {\n this.jsset.clear();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.copy = (function() {\n var ρσ_anonfunc = function () {\n return ρσ_set(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.discard = (function() {\n var ρσ_anonfunc = function (x) {\n this.jsset.delete(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.values();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.difference = (function() {\n var ρσ_anonfunc = function () {\n var ans, s, iterator, r, x, has;\n ans = new ρσ_set;\n s = ans.jsset;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n has = false;\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n has = true;\n break;\n }\n }\n if (!has) {\n s.add(x);\n }\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.difference_update = (function() {\n var ρσ_anonfunc = function () {\n var s, remove, iterator, r, x;\n s = this.jsset;\n remove = [];\n iterator = s.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n remove.push(x);\n break;\n }\n }\n r = iterator.next();\n }\n for (var j = 0; j < remove.length; j++) {\n s.delete(remove[(typeof j === \"number\" && j < 0) ? remove.length + j : j]);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.intersection = (function() {\n var ρσ_anonfunc = function () {\n var ans, s, iterator, r, x, has;\n ans = new ρσ_set;\n s = ans.jsset;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n has = true;\n for (var i = 0; i < arguments.length; i++) {\n if (!arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n has = false;\n break;\n }\n }\n if (has) {\n s.add(x);\n }\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.intersection_update = (function() {\n var ρσ_anonfunc = function () {\n var s, remove, iterator, r, x;\n s = this.jsset;\n remove = [];\n iterator = s.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n for (var i = 0; i < arguments.length; i++) {\n if (!arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n remove.push(x);\n break;\n }\n }\n r = iterator.next();\n }\n for (var j = 0; j < remove.length; j++) {\n s.delete(remove[(typeof j === \"number\" && j < 0) ? remove.length + j : j]);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.isdisjoint = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r, x;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n if (other.has(x)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.issubset = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r, x;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n if (!other.has(x)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.issuperset = (function() {\n var ρσ_anonfunc = function (other) {\n var s, iterator, r, x;\n s = this.jsset;\n iterator = other.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n if (!s.has(x)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.pop = (function() {\n var ρσ_anonfunc = function () {\n var iterator, r;\n iterator = this.jsset.values();\n r = iterator.next();\n if (r.done) {\n throw new KeyError(\"pop from an empty set\");\n }\n this.jsset.delete(r.value);\n return r.value;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.remove = (function() {\n var ρσ_anonfunc = function (x) {\n if (!this.jsset.delete(x)) {\n throw new KeyError(x.toString());\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.symmetric_difference = (function() {\n var ρσ_anonfunc = function (other) {\n return this.union(other).difference(this.intersection(other));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.symmetric_difference_update = (function() {\n var ρσ_anonfunc = function (other) {\n var common;\n common = this.intersection(other);\n this.update(other);\n this.difference_update(common);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.union = (function() {\n var ρσ_anonfunc = function () {\n var ans;\n ans = ρσ_set(this);\n ans.update.apply(ans, arguments);\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.update = (function() {\n var ρσ_anonfunc = function () {\n var s, iterator, r;\n s = this.jsset;\n for (var i=0; i < arguments.length; i++) {\n iterator = arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i][ρσ_iterator_symbol]();\n r = iterator.next();\n while (!r.done) {\n s.add(r.value);\n r = iterator.next();\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.toString = ρσ_set.prototype.__repr__ = ρσ_set.prototype.__str__ = ρσ_set.prototype.inspect = (function() {\n var ρσ_anonfunc = function () {\n return \"{\" + list(this).join(\", \") + \"}\";\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.__eq__ = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r;\n if (!other instanceof this.constructor) {\n return false;\n }\n if (other.size !== this.size) {\n return false;\n }\n if (other.size === 0) {\n return true;\n }\n iterator = other[ρσ_iterator_symbol]();\n r = iterator.next();\n while (!r.done) {\n if (!this.has(r.value)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nfunction ρσ_set_wrap(x) {\n var ans;\n ans = new ρσ_set;\n ans.jsset = x;\n return ans;\n};\nif (!ρσ_set_wrap.__argnames__) Object.defineProperties(ρσ_set_wrap, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar set = ρσ_set, set_wrap = ρσ_set_wrap;\nvar ρσ_dict_implementation;\nfunction ρσ_dict_polyfill() {\n this._store = {};\n this.size = 0;\n};\nif (!ρσ_dict_polyfill.__module__) Object.defineProperties(ρσ_dict_polyfill, {\n __module__ : {value: \"__main__\"}\n});\n\nρσ_dict_polyfill.prototype.set = (function() {\n var ρσ_anonfunc = function (x, value) {\n var key;\n key = ρσ_set_keyfor(x);\n if (!Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size += 1;\n }\n (ρσ_expr_temp = this._store)[(typeof key === \"number\" && key < 0) ? ρσ_expr_temp.length + key : key] = [x, value];\n return this;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\", \"value\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.clear = (function() {\n var ρσ_anonfunc = function (x) {\n this._store = {};\n this.size = 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.delete = (function() {\n var ρσ_anonfunc = function (x) {\n var key;\n key = ρσ_set_keyfor(x);\n if (Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size -= 1;\n delete this._store[key];\n return true;\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.has = (function() {\n var ρσ_anonfunc = function (x) {\n return Object.prototype.hasOwnProperty.call(this._store, ρσ_set_keyfor(x));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.get = (function() {\n var ρσ_anonfunc = function (x) {\n try {\n return (ρσ_expr_temp = this._store)[ρσ_bound_index(ρσ_set_keyfor(x), ρσ_expr_temp)][1];\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof TypeError) {\n return undefined;\n } else {\n throw ρσ_Exception;\n }\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.values = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]][1]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.keys = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]][0]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.entries = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nif (typeof Map !== \"function\" || typeof Map.prototype.delete !== \"function\") {\n ρσ_dict_implementation = ρσ_dict_polyfill;\n} else {\n ρσ_dict_implementation = Map;\n}\nfunction ρσ_dict() {\n var iterable = ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true) ? undefined : arguments[0];\n var kw = arguments[arguments.length-1];\n if (kw === null || typeof kw !== \"object\" || kw [ρσ_kwargs_symbol] !== true) kw = {};\n if (this instanceof ρσ_dict) {\n this.jsmap = new ρσ_dict_implementation;\n if (iterable !== undefined) {\n this.update(iterable);\n }\n this.update(kw);\n return this;\n } else {\n return ρσ_interpolate_kwargs_constructor.call(Object.create(ρσ_dict.prototype), false, ρσ_dict, [iterable].concat([ρσ_desugar_kwargs(kw)]));\n }\n};\nif (!ρσ_dict.__handles_kwarg_interpolation__) Object.defineProperties(ρσ_dict, {\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_dict.prototype.__name__ = \"dict\";\nObject.defineProperties(ρσ_dict.prototype, (function(){\n var ρσ_d = {};\n ρσ_d[\"length\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n ρσ_d[\"size\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n return ρσ_d;\n}).call(this));\nρσ_dict.prototype.__len__ = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.has = ρσ_dict.prototype.__contains__ = (function() {\n var ρσ_anonfunc = function (x) {\n return this.jsmap.has(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.set = ρσ_dict.prototype.__setitem__ = (function() {\n var ρσ_anonfunc = function (key, value) {\n this.jsmap.set(key, value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"value\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.__delitem__ = (function() {\n var ρσ_anonfunc = function (key) {\n this.jsmap.delete(key);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.clear = (function() {\n var ρσ_anonfunc = function () {\n this.jsmap.clear();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.copy = (function() {\n var ρσ_anonfunc = function () {\n return ρσ_dict(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.keys = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.keys();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.values = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.values();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.items = ρσ_dict.prototype.entries = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.entries();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.keys();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.__getitem__ = (function() {\n var ρσ_anonfunc = function (key) {\n var ans;\n ans = this.jsmap.get(key);\n if (ans === undefined && !this.jsmap.has(key)) {\n throw new KeyError(key + \"\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.get = (function() {\n var ρσ_anonfunc = function (key, defval) {\n var ans;\n ans = this.jsmap.get(key);\n if (ans === undefined && !this.jsmap.has(key)) {\n return (defval === undefined) ? null : defval;\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.set_default = (function() {\n var ρσ_anonfunc = function (key, defval) {\n var j;\n j = this.jsmap;\n if (!j.has(key)) {\n j.set(key, defval);\n return defval;\n }\n return j.get(key);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.fromkeys = ρσ_dict.prototype.fromkeys = (function() {\n var ρσ_anonfunc = function () {\n var iterable = ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true) ? undefined : arguments[0];\n var value = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? ρσ_anonfunc.__defaults__.value : arguments[1];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"value\")){\n value = ρσ_kwargs_obj.value;\n }\n var ans, iterator, r;\n ans = ρσ_dict();\n iterator = iter(iterable);\n r = iterator.next();\n while (!r.done) {\n ans.set(r.value, value);\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__defaults__) Object.defineProperties(ρσ_anonfunc, {\n __defaults__ : {value: {value:null}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"iterable\", \"value\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.pop = (function() {\n var ρσ_anonfunc = function (key, defval) {\n var ans;\n ans = this.jsmap.get(key);\n if (ans === undefined && !this.jsmap.has(key)) {\n if (defval === undefined) {\n throw new KeyError(key);\n }\n return defval;\n }\n this.jsmap.delete(key);\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.popitem = (function() {\n var ρσ_anonfunc = function () {\n var last, e, r;\n last = null;\n e = this.jsmap.entries();\n while (true) {\n r = e.next();\n if (r.done) {\n if (last === null) {\n throw new KeyError(\"dict is empty\");\n }\n this.jsmap.delete(last.value[0]);\n return last.value;\n }\n last = r;\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.update = (function() {\n var ρσ_anonfunc = function () {\n var m, iterable, iterator, result, keys;\n if (arguments.length === 0) {\n return;\n }\n m = this.jsmap;\n iterable = arguments[0];\n if (Array.isArray(iterable)) {\n for (var i = 0; i < iterable.length; i++) {\n m.set(iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i][0], iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i][1]);\n }\n } else if (iterable instanceof ρσ_dict) {\n iterator = iterable.items();\n result = iterator.next();\n while (!result.done) {\n m.set(result.value[0], result.value[1]);\n result = iterator.next();\n }\n } else if (typeof Map === \"function\" && iterable instanceof Map) {\n iterator = iterable.entries();\n result = iterator.next();\n while (!result.done) {\n m.set(result.value[0], result.value[1]);\n result = iterator.next();\n }\n } else if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done) {\n m.set(result.value[0], result.value[1]);\n result = iterator.next();\n }\n } else {\n keys = Object.keys(iterable);\n for (var j=0; j < keys.length; j++) {\n if (keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j] !== ρσ_iterator_symbol) {\n m.set(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], iterable[ρσ_bound_index(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], iterable)]);\n }\n }\n }\n if (arguments.length > 1) {\n ρσ_dict.prototype.update.call(this, arguments[1]);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.toString = ρσ_dict.prototype.inspect = ρσ_dict.prototype.__str__ = ρσ_dict.prototype.__repr__ = (function() {\n var ρσ_anonfunc = function () {\n var entries, iterator, r;\n entries = [];\n iterator = this.jsmap.entries();\n r = iterator.next();\n while (!r.done) {\n entries.push(ρσ_repr(r.value[0]) + \": \" + ρσ_repr(r.value[1]));\n r = iterator.next();\n }\n return \"{\" + entries.join(\", \") + \"}\";\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.__eq__ = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r, x;\n if (!(other instanceof this.constructor)) {\n return false;\n }\n if (other.size !== this.size) {\n return false;\n }\n if (other.size === 0) {\n return true;\n }\n iterator = other.items();\n r = iterator.next();\n while (!r.done) {\n x = this.jsmap.get(r.value[0]);\n if (x === undefined && !this.jsmap.has(r.value[0]) || x !== r.value[1]) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.as_object = (function() {\n var ρσ_anonfunc = function (other) {\n var ans, iterator, r;\n ans = {};\n iterator = this.jsmap.entries();\n r = iterator.next();\n while (!r.done) {\n ans[ρσ_bound_index(r.value[0], ans)] = r.value[1];\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nfunction ρσ_dict_wrap(x) {\n var ans;\n ans = new ρσ_dict;\n ans.jsmap = x;\n return ans;\n};\nif (!ρσ_dict_wrap.__argnames__) Object.defineProperties(ρσ_dict_wrap, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar dict = ρσ_dict, dict_wrap = ρσ_dict_wrap;// }}}\nvar NameError;\nNameError = ReferenceError;\nfunction Exception() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n Exception.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(Exception, Error);\nException.prototype.__init__ = function __init__(message) {\n var self = this;\n self.message = message;\n self.stack = (new Error).stack;\n self.name = self.constructor.name;\n};\nif (!Exception.prototype.__init__.__argnames__) Object.defineProperties(Exception.prototype.__init__, {\n __argnames__ : {value: [\"message\"]},\n __module__ : {value: \"__main__\"}\n});\nException.__argnames__ = Exception.prototype.__init__.__argnames__;\nException.__handles_kwarg_interpolation__ = Exception.prototype.__init__.__handles_kwarg_interpolation__;\nException.prototype.__repr__ = function __repr__() {\n var self = this;\n return self.name + \": \" + self.message;\n};\nif (!Exception.prototype.__repr__.__module__) Object.defineProperties(Exception.prototype.__repr__, {\n __module__ : {value: \"__main__\"}\n});\nException.prototype.__str__ = function __str__ () {\n if(Error.prototype.__str__) return Error.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(Exception.prototype, \"__bases__\", {value: [Error]});\n\nfunction AttributeError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AttributeError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(AttributeError, Exception);\nAttributeError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nAttributeError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nAttributeError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(AttributeError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction IndexError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n IndexError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(IndexError, Exception);\nIndexError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nIndexError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nIndexError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(IndexError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction KeyError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n KeyError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(KeyError, Exception);\nKeyError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nKeyError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nKeyError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(KeyError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction ValueError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n ValueError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(ValueError, Exception);\nValueError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nValueError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nValueError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(ValueError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction UnicodeDecodeError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n UnicodeDecodeError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(UnicodeDecodeError, Exception);\nUnicodeDecodeError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nUnicodeDecodeError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nUnicodeDecodeError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(UnicodeDecodeError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction AssertionError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AssertionError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(AssertionError, Exception);\nAssertionError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nAssertionError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nAssertionError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(AssertionError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction ZeroDivisionError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n ZeroDivisionError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(ZeroDivisionError, Exception);\nZeroDivisionError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nZeroDivisionError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nZeroDivisionError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(ZeroDivisionError.prototype, \"__bases__\", {value: [Exception]});\n\nvar ρσ_in, ρσ_desugar_kwargs, ρσ_exists;\nfunction ρσ_eslice(arr, step, start, end) {\n var is_string;\n if (typeof arr === \"string\" || arr instanceof String) {\n is_string = true;\n arr = arr.split(\"\");\n }\n if (step < 0) {\n step = -step;\n arr = arr.slice().reverse();\n if (typeof start !== \"undefined\") {\n start = arr.length - start - 1;\n }\n if (typeof end !== \"undefined\") {\n end = arr.length - end - 1;\n }\n }\n if (typeof start === \"undefined\") {\n start = 0;\n }\n if (typeof end === \"undefined\") {\n end = arr.length;\n }\n arr = arr.slice(start, end).filter((function() {\n var ρσ_anonfunc = function (e, i) {\n return i % step === 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"e\", \"i\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })());\n if (is_string) {\n arr = arr.join(\"\");\n }\n return arr;\n};\nif (!ρσ_eslice.__argnames__) Object.defineProperties(ρσ_eslice, {\n __argnames__ : {value: [\"arr\", \"step\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_delslice(arr, step, start, end) {\n var is_string, ρσ_unpack, indices;\n if (typeof arr === \"string\" || arr instanceof String) {\n is_string = true;\n arr = arr.split(\"\");\n }\n if (step < 0) {\n if (typeof start === \"undefined\") {\n start = arr.length;\n }\n if (typeof end === \"undefined\") {\n end = 0;\n }\n ρσ_unpack = [end, start, -step];\n start = ρσ_unpack[0];\n end = ρσ_unpack[1];\n step = ρσ_unpack[2];\n }\n if (typeof start === \"undefined\") {\n start = 0;\n }\n if (typeof end === \"undefined\") {\n end = arr.length;\n }\n if (step === 1) {\n arr.splice(start, end - start);\n } else {\n if (end > start) {\n indices = [];\n for (var i = start; i < end; i += step) {\n indices.push(i);\n }\n for (var i = indices.length - 1; i >= 0; i--) {\n arr.splice(indices[(typeof i === \"number\" && i < 0) ? indices.length + i : i], 1);\n }\n }\n }\n if (is_string) {\n arr = arr.join(\"\");\n }\n return arr;\n};\nif (!ρσ_delslice.__argnames__) Object.defineProperties(ρσ_delslice, {\n __argnames__ : {value: [\"arr\", \"step\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_flatten(arr) {\n var ans, value;\n ans = ρσ_list_decorate([]);\n for (var i=0; i < arr.length; i++) {\n value = arr[(typeof i === \"number\" && i < 0) ? arr.length + i : i];\n if (Array.isArray(value)) {\n ans = ans.concat(ρσ_flatten(value));\n } else {\n ans.push(value);\n }\n }\n return ans;\n};\nif (!ρσ_flatten.__argnames__) Object.defineProperties(ρσ_flatten, {\n __argnames__ : {value: [\"arr\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_unpack_asarray(num, iterable) {\n var ans, iterator, result;\n if (ρσ_arraylike(iterable)) {\n return iterable;\n }\n ans = [];\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done && ans.length < num) {\n ans.push(result.value);\n result = iterator.next();\n }\n }\n return ans;\n};\nif (!ρσ_unpack_asarray.__argnames__) Object.defineProperties(ρσ_unpack_asarray, {\n __argnames__ : {value: [\"num\", \"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_extends(child, parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n};\nif (!ρσ_extends.__argnames__) Object.defineProperties(ρσ_extends, {\n __argnames__ : {value: [\"child\", \"parent\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_in = (function() {\n var ρσ_anonfunc = function () {\n if (typeof Map === \"function\" && typeof Set === \"function\") {\n return (function() {\n var ρσ_anonfunc = function (val, arr) {\n if (typeof arr === \"string\") {\n return arr.indexOf(val) !== -1;\n }\n if (typeof arr.__contains__ === \"function\") {\n return arr.__contains__(val);\n }\n if (arr instanceof Map || arr instanceof Set) {\n return arr.has(val);\n }\n if (ρσ_arraylike(arr)) {\n return ρσ_list_contains.call(arr, val);\n }\n return Object.prototype.hasOwnProperty.call(arr, val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\", \"arr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n }\n return (function() {\n var ρσ_anonfunc = function (val, arr) {\n if (typeof arr === \"string\") {\n return arr.indexOf(val) !== -1;\n }\n if (typeof arr.__contains__ === \"function\") {\n return arr.__contains__(val);\n }\n if (ρσ_arraylike(arr)) {\n return ρσ_list_contains.call(arr, val);\n }\n return Object.prototype.hasOwnProperty.call(arr, val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\", \"arr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})()();\nfunction ρσ_Iterable(iterable) {\n var iterator, ans, result;\n if (ρσ_arraylike(iterable)) {\n return iterable;\n }\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n ans = ρσ_list_decorate([]);\n result = iterator.next();\n while (!result.done) {\n ans.push(result.value);\n result = iterator.next();\n }\n return ans;\n }\n return Object.keys(iterable);\n};\nif (!ρσ_Iterable.__argnames__) Object.defineProperties(ρσ_Iterable, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_desugar_kwargs = (function() {\n var ρσ_anonfunc = function () {\n if (typeof Object.assign === \"function\") {\n return (function() {\n var ρσ_anonfunc = function () {\n var ans;\n ans = Object.create(null);\n ans[ρσ_kwargs_symbol] = true;\n for (var i = 0; i < arguments.length; i++) {\n Object.assign(ans, arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n }\n return (function() {\n var ρσ_anonfunc = function () {\n var ans, keys;\n ans = Object.create(null);\n ans[ρσ_kwargs_symbol] = true;\n for (var i = 0; i < arguments.length; i++) {\n keys = Object.keys(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n for (var j = 0; j < keys.length; j++) {\n ans[ρσ_bound_index(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], ans)] = (ρσ_expr_temp = arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i])[ρσ_bound_index(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], ρσ_expr_temp)];\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})()();\nfunction ρσ_interpolate_kwargs(f, supplied_args) {\n var has_prop, kwobj, args, prop;\n if (!f.__argnames__) {\n return f.apply(this, supplied_args);\n }\n has_prop = Object.prototype.hasOwnProperty;\n kwobj = supplied_args.pop();\n if (f.__handles_kwarg_interpolation__) {\n args = new Array(Math.max(supplied_args.length, f.__argnames__.length) + 1);\n args[args.length-1] = kwobj;\n for (var i = 0; i < args.length - 1; i++) {\n if (i < f.__argnames__.length) {\n prop = (ρσ_expr_temp = f.__argnames__)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n if (has_prop.call(kwobj, prop)) {\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = kwobj[(typeof prop === \"number\" && prop < 0) ? kwobj.length + prop : prop];\n delete kwobj[prop];\n } else if (i < supplied_args.length) {\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = supplied_args[(typeof i === \"number\" && i < 0) ? supplied_args.length + i : i];\n }\n } else {\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = supplied_args[(typeof i === \"number\" && i < 0) ? supplied_args.length + i : i];\n }\n }\n return f.apply(this, args);\n }\n for (var i = 0; i < f.__argnames__.length; i++) {\n prop = (ρσ_expr_temp = f.__argnames__)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n if (has_prop.call(kwobj, prop)) {\n supplied_args[(typeof i === \"number\" && i < 0) ? supplied_args.length + i : i] = kwobj[(typeof prop === \"number\" && prop < 0) ? kwobj.length + prop : prop];\n }\n }\n return f.apply(this, supplied_args);\n};\nif (!ρσ_interpolate_kwargs.__argnames__) Object.defineProperties(ρσ_interpolate_kwargs, {\n __argnames__ : {value: [\"f\", \"supplied_args\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_interpolate_kwargs_constructor(apply, f, supplied_args) {\n if (apply) {\n f.apply(this, supplied_args);\n } else {\n ρσ_interpolate_kwargs.call(this, f, supplied_args);\n }\n return this;\n};\nif (!ρσ_interpolate_kwargs_constructor.__argnames__) Object.defineProperties(ρσ_interpolate_kwargs_constructor, {\n __argnames__ : {value: [\"apply\", \"f\", \"supplied_args\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_getitem(obj, key) {\n if (obj.__getitem__) {\n return obj.__getitem__(key);\n }\n if (typeof key === \"number\" && key < 0) {\n key += obj.length;\n }\n return obj[(typeof key === \"number\" && key < 0) ? obj.length + key : key];\n};\nif (!ρσ_getitem.__argnames__) Object.defineProperties(ρσ_getitem, {\n __argnames__ : {value: [\"obj\", \"key\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_setitem(obj, key, val) {\n if (obj.__setitem__) {\n obj.__setitem__(key, val);\n } else {\n if (typeof key === \"number\" && key < 0) {\n key += obj.length;\n }\n obj[(typeof key === \"number\" && key < 0) ? obj.length + key : key] = val;\n }\n};\nif (!ρσ_setitem.__argnames__) Object.defineProperties(ρσ_setitem, {\n __argnames__ : {value: [\"obj\", \"key\", \"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_delitem(obj, key) {\n if (obj.__delitem__) {\n obj.__delitem__(key);\n } else if (typeof obj.splice === \"function\") {\n obj.splice(key, 1);\n } else {\n if (typeof key === \"number\" && key < 0) {\n key += obj.length;\n }\n delete obj[key];\n }\n};\nif (!ρσ_delitem.__argnames__) Object.defineProperties(ρσ_delitem, {\n __argnames__ : {value: [\"obj\", \"key\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_bound_index(idx, arr) {\n if (typeof idx === \"number\" && idx < 0) {\n idx += arr.length;\n }\n return idx;\n};\nif (!ρσ_bound_index.__argnames__) Object.defineProperties(ρσ_bound_index, {\n __argnames__ : {value: [\"idx\", \"arr\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_splice(arr, val, start, end) {\n start = start || 0;\n if (start < 0) {\n start += arr.length;\n }\n if (end === undefined) {\n end = arr.length;\n }\n if (end < 0) {\n end += arr.length;\n }\n Array.prototype.splice.apply(arr, [start, end - start].concat(val));\n};\nif (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {\n __argnames__ : {value: [\"arr\", \"val\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_exists = (function(){\n var ρσ_d = {};\n ρσ_d[\"n\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n return expr !== undefined && expr !== null;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"d\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n if (expr === undefined || expr === null) {\n return Object.create(null);\n }\n return expr;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"c\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n if (typeof expr === \"function\") {\n return expr;\n }\n return (function() {\n var ρσ_anonfunc = function () {\n return undefined;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"g\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n if (expr === undefined || expr === null || typeof expr.__getitem__ !== \"function\") {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"__getitem__\"] = (function() {\n var ρσ_anonfunc = function () {\n return undefined;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"e\"] = (function() {\n var ρσ_anonfunc = function (expr, alt) {\n return (expr === undefined || expr === null) ? alt : expr;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\", \"alt\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n}).call(this);\nfunction ρσ_mixin() {\n var seen, resolved_props, p, target, props, name;\n seen = Object.create(null);\n seen.__argnames__ = seen.__handles_kwarg_interpolation__ = seen.__init__ = seen.__annotations__ = seen.__doc__ = seen.__bind_methods__ = seen.__bases__ = seen.constructor = seen.__class__ = true;\n resolved_props = {};\n p = target = arguments[0].prototype;\n while (p && p !== Object.prototype) {\n props = Object.getOwnPropertyNames(p);\n for (var i = 0; i < props.length; i++) {\n seen[ρσ_bound_index(props[(typeof i === \"number\" && i < 0) ? props.length + i : i], seen)] = true;\n }\n p = Object.getPrototypeOf(p);\n }\n for (var c = 1; c < arguments.length; c++) {\n p = arguments[(typeof c === \"number\" && c < 0) ? arguments.length + c : c].prototype;\n while (p && p !== Object.prototype) {\n props = Object.getOwnPropertyNames(p);\n for (var i = 0; i < props.length; i++) {\n name = props[(typeof i === \"number\" && i < 0) ? props.length + i : i];\n if (seen[(typeof name === \"number\" && name < 0) ? seen.length + name : name]) {\n continue;\n }\n seen[(typeof name === \"number\" && name < 0) ? seen.length + name : name] = true;\n resolved_props[(typeof name === \"number\" && name < 0) ? resolved_props.length + name : name] = Object.getOwnPropertyDescriptor(p, name);\n }\n p = Object.getPrototypeOf(p);\n }\n }\n Object.defineProperties(target, resolved_props);\n};\nif (!ρσ_mixin.__module__) Object.defineProperties(ρσ_mixin, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_instanceof() {\n var obj, bases, q, cls, p;\n obj = arguments[0];\n bases = \"\";\n if (obj && obj.constructor && obj.constructor.prototype) {\n bases = obj.constructor.prototype.__bases__ || \"\";\n }\n for (var i = 1; i < arguments.length; i++) {\n q = arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i];\n if (obj instanceof q) {\n return true;\n }\n if ((q === Array || q === ρσ_list_constructor) && Array.isArray(obj)) {\n return true;\n }\n if (q === ρσ_str && (typeof obj === \"string\" || obj instanceof String)) {\n return true;\n }\n if (q === ρσ_int && typeof obj === \"number\" && Number.isInteger(obj)) {\n return true;\n }\n if (q === ρσ_float && typeof obj === \"number\" && !Number.isInteger(obj)) {\n return true;\n }\n if (bases.length > 1) {\n for (var c = 1; c < bases.length; c++) {\n cls = bases[(typeof c === \"number\" && c < 0) ? bases.length + c : c];\n while (cls) {\n if (q === cls) {\n return true;\n }\n p = Object.getPrototypeOf(cls.prototype);\n if (!p) {\n break;\n }\n cls = p.constructor;\n }\n }\n }\n }\n return false;\n};\nif (!ρσ_instanceof.__module__) Object.defineProperties(ρσ_instanceof, {\n __module__ : {value: \"__main__\"}\n});\nfunction sum(iterable, start) {\n var ans, iterator, r;\n if (Array.isArray(iterable)) {\n return iterable.reduce((function() {\n var ρσ_anonfunc = function (prev, cur) {\n return prev + cur;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"prev\", \"cur\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })(), start || 0);\n }\n ans = start || 0;\n iterator = iter(iterable);\n r = iterator.next();\n while (!r.done) {\n ans += r.value;\n r = iterator.next();\n }\n return ans;\n};\nif (!sum.__argnames__) Object.defineProperties(sum, {\n __argnames__ : {value: [\"iterable\", \"start\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction map() {\n var iterators, func, args, ans;\n iterators = new Array(arguments.length - 1);\n func = arguments[0];\n args = new Array(arguments.length - 1);\n for (var i = 1; i < arguments.length; i++) {\n iterators[ρσ_bound_index(i - 1, iterators)] = iter(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n }\n ans = {'_func':func, '_iterators':iterators, '_args':args};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var r;\n for (var i = 0; i < this._iterators.length; i++) {\n r = (ρσ_expr_temp = this._iterators)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].next();\n if (r.done) {\n return {'done':true};\n }\n (ρσ_expr_temp = this._args)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] = r.value;\n }\n return {'done':false, 'value':this._func.apply(undefined, this._args)};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n};\nif (!map.__module__) Object.defineProperties(map, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction filter(func_or_none, iterable) {\n var func, ans;\n func = (func_or_none === null) ? ρσ_bool : func_or_none;\n ans = {'_func':func, '_iterator':ρσ_iter(iterable)};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var r;\n r = this._iterator.next();\n while (!r.done) {\n if (this._func(r.value)) {\n return r;\n }\n r = this._iterator.next();\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n};\nif (!filter.__argnames__) Object.defineProperties(filter, {\n __argnames__ : {value: [\"func_or_none\", \"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction zip() {\n var iterators, ans;\n iterators = new Array(arguments.length);\n for (var i = 0; i < arguments.length; i++) {\n iterators[(typeof i === \"number\" && i < 0) ? iterators.length + i : i] = iter(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n }\n ans = {'_iterators':iterators};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var args, r;\n args = new Array(this._iterators.length);\n for (var i = 0; i < this._iterators.length; i++) {\n r = (ρσ_expr_temp = this._iterators)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].next();\n if (r.done) {\n return {'done':true};\n }\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = r.value;\n }\n return {'done':false, 'value':args};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n};\nif (!zip.__module__) Object.defineProperties(zip, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction any(iterable) {\n var i;\n var ρσ_Iter0 = ρσ_Iterable(iterable);\n for (var ρσ_Index0 = 0; ρσ_Index0 < ρσ_Iter0.length; ρσ_Index0++) {\n i = ρσ_Iter0[ρσ_Index0];\n if (i) {\n return true;\n }\n }\n return false;\n};\nif (!any.__argnames__) Object.defineProperties(any, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction all(iterable) {\n var i;\n var ρσ_Iter1 = ρσ_Iterable(iterable);\n for (var ρσ_Index1 = 0; ρσ_Index1 < ρσ_Iter1.length; ρσ_Index1++) {\n i = ρσ_Iter1[ρσ_Index1];\n if (!i) {\n return false;\n }\n }\n return true;\n};\nif (!all.__argnames__) Object.defineProperties(all, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\nvar decimal_sep, define_str_func, ρσ_unpack, ρσ_orig_split, ρσ_orig_replace;\ndecimal_sep = 1.1.toLocaleString()[1];\nfunction ρσ_repr_js_builtin(x, as_array) {\n var ans, b, keys, key;\n ans = [];\n b = \"{}\";\n if (as_array) {\n b = \"[]\";\n for (var i = 0; i < x.length; i++) {\n ans.push(ρσ_repr(x[(typeof i === \"number\" && i < 0) ? x.length + i : i]));\n }\n } else {\n keys = Object.keys(x);\n for (var k = 0; k < keys.length; k++) {\n key = keys[(typeof k === \"number\" && k < 0) ? keys.length + k : k];\n ans.push(JSON.stringify(key) + \":\" + ρσ_repr(x[(typeof key === \"number\" && key < 0) ? x.length + key : key]));\n }\n }\n return b[0] + ans.join(\", \") + b[1];\n};\nif (!ρσ_repr_js_builtin.__argnames__) Object.defineProperties(ρσ_repr_js_builtin, {\n __argnames__ : {value: [\"x\", \"as_array\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_html_element_to_string(elem) {\n var attrs, val, attr, ans;\n attrs = [];\n var ρσ_Iter0 = ρσ_Iterable(elem.attributes);\n for (var ρσ_Index0 = 0; ρσ_Index0 < ρσ_Iter0.length; ρσ_Index0++) {\n attr = ρσ_Iter0[ρσ_Index0];\n if (attr.specified) {\n val = attr.value;\n if (val.length > 10) {\n val = val.slice(0, 15) + \"...\";\n }\n val = JSON.stringify(val);\n attrs.push(\"\" + ρσ_str.format(\"{}\", attr.name) + \"=\" + ρσ_str.format(\"{}\", val) + \"\");\n }\n }\n attrs = (attrs.length) ? \" \" + attrs.join(\" \") : \"\";\n ans = \"<\" + ρσ_str.format(\"{}\", elem.tagName) + \"\" + ρσ_str.format(\"{}\", attrs) + \">\";\n return ans;\n};\nif (!ρσ_html_element_to_string.__argnames__) Object.defineProperties(ρσ_html_element_to_string, {\n __argnames__ : {value: [\"elem\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_repr(x) {\n var ans, name;\n if (x === null) {\n return \"None\";\n }\n if (x === undefined) {\n return \"undefined\";\n }\n ans = x;\n if (typeof x.__repr__ === \"function\") {\n ans = x.__repr__();\n } else if (x === true || x === false) {\n ans = (x) ? \"True\" : \"False\";\n } else if (Array.isArray(x)) {\n ans = ρσ_repr_js_builtin(x, true);\n } else if (typeof x === \"function\") {\n ans = x.toString();\n } else if (typeof x === \"object\" && !x.toString) {\n ans = ρσ_repr_js_builtin(x);\n } else {\n name = Object.prototype.toString.call(x).slice(8, -1);\n if (ρσ_not_equals(\"Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".indexOf(name), -1)) {\n return name + \"([\" + x.map((function() {\n var ρσ_anonfunc = function (i) {\n return str.format(\"0x{:02x}\", i);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"i\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })()).join(\", \") + \"])\";\n }\n if (typeof HTMLElement !== \"undefined\" && x instanceof HTMLElement) {\n ans = ρσ_html_element_to_string(x);\n } else {\n ans = (typeof x.toString === \"function\") ? x.toString() : x;\n }\n if (ans === \"[object Object]\") {\n return ρσ_repr_js_builtin(x);\n }\n try {\n ans = JSON.stringify(x);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n } \n }\n }\n return ans + \"\";\n};\nif (!ρσ_repr.__argnames__) Object.defineProperties(ρσ_repr, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_str(x) {\n var ans, name;\n if (x === null) {\n return \"None\";\n }\n if (x === undefined) {\n return \"undefined\";\n }\n ans = x;\n if (typeof x.__str__ === \"function\") {\n ans = x.__str__();\n } else if (typeof x.__repr__ === \"function\") {\n ans = x.__repr__();\n } else if (x === true || x === false) {\n ans = (x) ? \"True\" : \"False\";\n } else if (Array.isArray(x)) {\n ans = ρσ_repr_js_builtin(x, true);\n } else if (typeof x.toString === \"function\") {\n name = Object.prototype.toString.call(x).slice(8, -1);\n if (ρσ_not_equals(\"Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".indexOf(name), -1)) {\n return name + \"([\" + x.map((function() {\n var ρσ_anonfunc = function (i) {\n return str.format(\"0x{:02x}\", i);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"i\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })()).join(\", \") + \"])\";\n }\n if (typeof HTMLElement !== \"undefined\" && x instanceof HTMLElement) {\n ans = ρσ_html_element_to_string(x);\n } else {\n ans = x.toString();\n }\n if (ans === \"[object Object]\") {\n ans = ρσ_repr_js_builtin(x);\n }\n } else if (typeof x === \"object\" && !x.toString) {\n ans = ρσ_repr_js_builtin(x);\n }\n return ans + \"\";\n};\nif (!ρσ_str.__argnames__) Object.defineProperties(ρσ_str, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\ndefine_str_func = (function() {\n var ρσ_anonfunc = function (name, func) {\n var f;\n (ρσ_expr_temp = ρσ_str.prototype)[(typeof name === \"number\" && name < 0) ? ρσ_expr_temp.length + name : name] = func;\n ρσ_str[(typeof name === \"number\" && name < 0) ? ρσ_str.length + name : name] = f = func.call.bind(func);\n if (func.__argnames__) {\n Object.defineProperty(f, \"__argnames__\", (function(){\n var ρσ_d = {};\n ρσ_d[\"value\"] = ['string'].concat(func.__argnames__);\n return ρσ_d;\n }).call(this));\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"name\", \"func\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_unpack = [String.prototype.split.call.bind(String.prototype.split), String.prototype.replace.call.bind(String.prototype.replace)];\nρσ_orig_split = ρσ_unpack[0];\nρσ_orig_replace = ρσ_unpack[1];\ndefine_str_func(\"format\", (function() {\n var ρσ_anonfunc = function () {\n var template, args, kwargs, explicit, implicit, idx, split, ans, pos, in_brace, markup, ch;\n template = this;\n if (template === undefined) {\n throw new TypeError(\"Template is required\");\n }\n args = Array.prototype.slice.call(arguments);\n kwargs = {};\n if (args[args.length-1] && args[args.length-1][ρσ_kwargs_symbol] !== undefined) {\n kwargs = args[args.length-1];\n args = args.slice(0, -1);\n }\n explicit = implicit = false;\n idx = 0;\n split = ρσ_orig_split;\n if (ρσ_str.format._template_resolve_pat === undefined) {\n ρσ_str.format._template_resolve_pat = /[.\\[]/;\n }\n function resolve(arg, object) {\n var ρσ_unpack, first, key, rest, ans;\n if (!arg) {\n return object;\n }\n ρσ_unpack = [arg[0], arg.slice(1)];\n first = ρσ_unpack[0];\n arg = ρσ_unpack[1];\n key = split(arg, ρσ_str.format._template_resolve_pat, 1)[0];\n rest = arg.slice(key.length);\n ans = (first === \"[\") ? object[ρσ_bound_index(key.slice(0, -1), object)] : getattr(object, key);\n if (ans === undefined) {\n throw new KeyError((first === \"[\") ? key.slice(0, -1) : key);\n }\n return resolve(rest, ans);\n };\n if (!resolve.__argnames__) Object.defineProperties(resolve, {\n __argnames__ : {value: [\"arg\", \"object\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function resolve_format_spec(format_spec) {\n if (ρσ_str.format._template_resolve_fs_pat === undefined) {\n ρσ_str.format._template_resolve_fs_pat = /[{]([a-zA-Z0-9_]+)[}]/g;\n }\n return format_spec.replace(ρσ_str.format._template_resolve_fs_pat, (function() {\n var ρσ_anonfunc = function (match, key) {\n if (!Object.prototype.hasOwnProperty.call(kwargs, key)) {\n return \"\";\n }\n return \"\" + kwargs[(typeof key === \"number\" && key < 0) ? kwargs.length + key : key];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"match\", \"key\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!resolve_format_spec.__argnames__) Object.defineProperties(resolve_format_spec, {\n __argnames__ : {value: [\"format_spec\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function set_comma(ans, comma) {\n var sep;\n if (comma !== \",\") {\n sep = 1234;\n sep = sep.toLocaleString(undefined, {useGrouping: true})[1];\n ans = str.replace(ans, sep, comma);\n }\n return ans;\n };\n if (!set_comma.__argnames__) Object.defineProperties(set_comma, {\n __argnames__ : {value: [\"ans\", \"comma\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function safe_comma(value, comma) {\n try {\n return set_comma(value.toLocaleString(undefined, {useGrouping: true}), comma);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n return value.toString(10);\n } \n }\n };\n if (!safe_comma.__argnames__) Object.defineProperties(safe_comma, {\n __argnames__ : {value: [\"value\", \"comma\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function safe_fixed(value, precision, comma) {\n if (!comma) {\n return value.toFixed(precision);\n }\n try {\n return set_comma(value.toLocaleString(undefined, {useGrouping: true, minimumFractionDigits: precision, maximumFractionDigits: precision}), comma);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n return value.toFixed(precision);\n } \n }\n };\n if (!safe_fixed.__argnames__) Object.defineProperties(safe_fixed, {\n __argnames__ : {value: [\"value\", \"precision\", \"comma\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function apply_formatting(value, format_spec) {\n var ρσ_unpack, fill, align, sign, fhash, zeropad, width, comma, precision, ftype, is_numeric, is_int, lftype, code, prec, exp, nval, is_positive, left, right;\n if (format_spec.indexOf(\"{\") !== -1) {\n format_spec = resolve_format_spec(format_spec);\n }\n if (ρσ_str.format._template_format_pat === undefined) {\n ρσ_str.format._template_format_pat = /([^{}](?=[<>=^]))?([<>=^])?([-+\\x20])?(\\#)?(0)?(\\d+)?([,_])?(?:\\.(\\d+))?([bcdeEfFgGnosxX%])?/;\n }\n try {\n ρσ_unpack = format_spec.match(ρσ_str.format._template_format_pat).slice(1);\nρσ_unpack = ρσ_unpack_asarray(9, ρσ_unpack);\n fill = ρσ_unpack[0];\n align = ρσ_unpack[1];\n sign = ρσ_unpack[2];\n fhash = ρσ_unpack[3];\n zeropad = ρσ_unpack[4];\n width = ρσ_unpack[5];\n comma = ρσ_unpack[6];\n precision = ρσ_unpack[7];\n ftype = ρσ_unpack[8];\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof TypeError) {\n return value;\n } else {\n throw ρσ_Exception;\n }\n }\n if (zeropad) {\n fill = fill || \"0\";\n align = align || \"=\";\n } else {\n fill = fill || \" \";\n align = align || \">\";\n }\n is_numeric = Number(value) === value;\n is_int = is_numeric && value % 1 === 0;\n precision = parseInt(precision, 10);\n lftype = (ftype || \"\").toLowerCase();\n if (ftype === \"n\") {\n is_numeric = true;\n if (is_int) {\n if (comma) {\n throw new ValueError(\"Cannot specify ',' with 'n'\");\n }\n value = parseInt(value, 10).toLocaleString();\n } else {\n value = parseFloat(value).toLocaleString();\n }\n } else if (['b', 'c', 'd', 'o', 'x'].indexOf(lftype) !== -1) {\n value = parseInt(value, 10);\n is_numeric = true;\n if (!isNaN(value)) {\n if (ftype === \"b\") {\n value = (value >>> 0).toString(2);\n if (fhash) {\n value = \"0b\" + value;\n }\n } else if (ftype === \"c\") {\n if (value > 65535) {\n code = value - 65536;\n value = String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));\n } else {\n value = String.fromCharCode(value);\n }\n } else if (ftype === \"d\") {\n if (comma) {\n value = safe_comma(value, comma);\n } else {\n value = value.toString(10);\n }\n } else if (ftype === \"o\") {\n value = value.toString(8);\n if (fhash) {\n value = \"0o\" + value;\n }\n } else if (lftype === \"x\") {\n value = value.toString(16);\n value = (ftype === \"x\") ? value.toLowerCase() : value.toUpperCase();\n if (fhash) {\n value = \"0x\" + value;\n }\n }\n }\n } else if (['e','f','g','%'].indexOf(lftype) !== -1) {\n is_numeric = true;\n value = parseFloat(value);\n prec = (isNaN(precision)) ? 6 : precision;\n if (lftype === \"e\") {\n value = value.toExponential(prec);\n value = (ftype === \"E\") ? value.toUpperCase() : value.toLowerCase();\n } else if (lftype === \"f\") {\n value = safe_fixed(value, prec, comma);\n value = (ftype === \"F\") ? value.toUpperCase() : value.toLowerCase();\n } else if (lftype === \"%\") {\n value *= 100;\n value = safe_fixed(value, prec, comma) + \"%\";\n } else if (lftype === \"g\") {\n prec = max(1, prec);\n exp = parseInt(split(value.toExponential(prec - 1).toLowerCase(), \"e\")[1], 10);\n if (-4 <= exp && exp < prec) {\n value = safe_fixed(value, prec - 1 - exp, comma);\n } else {\n value = value.toExponential(prec - 1);\n }\n value = value.replace(/0+$/g, \"\");\n if (value[value.length-1] === decimal_sep) {\n value = value.slice(0, -1);\n }\n if (ftype === \"G\") {\n value = value.toUpperCase();\n }\n }\n } else {\n if (comma) {\n value = parseInt(value, 10);\n if (isNaN(value)) {\n throw new ValueError(\"Must use numbers with , or _\");\n }\n value = safe_comma(value, comma);\n }\n value += \"\";\n if (!isNaN(precision)) {\n value = value.slice(0, precision);\n }\n }\n value += \"\";\n if (is_numeric && sign) {\n nval = Number(value);\n is_positive = !isNaN(nval) && nval >= 0;\n if (is_positive && (sign === \" \" || sign === \"+\")) {\n value = sign + value;\n }\n }\n function repeat(char, num) {\n return (new Array(num+1)).join(char);\n };\n if (!repeat.__argnames__) Object.defineProperties(repeat, {\n __argnames__ : {value: [\"char\", \"num\"]},\n __module__ : {value: \"__main__\"}\n });\n\n if (is_numeric && width && width[0] === \"0\") {\n width = width.slice(1);\n ρσ_unpack = [\"0\", \"=\"];\n fill = ρσ_unpack[0];\n align = ρσ_unpack[1];\n }\n width = parseInt(width || \"-1\", 10);\n if (isNaN(width)) {\n throw new ValueError(\"Invalid width specification: \" + width);\n }\n if (fill && value.length < width) {\n if (align === \"<\") {\n value = value + repeat(fill, width - value.length);\n } else if (align === \">\") {\n value = repeat(fill, width - value.length) + value;\n } else if (align === \"^\") {\n left = Math.floor((width - value.length) / 2);\n right = width - left - value.length;\n value = repeat(fill, left) + value + repeat(fill, right);\n } else if (align === \"=\") {\n if (ρσ_in(value[0], \"+- \")) {\n value = value[0] + repeat(fill, width - value.length) + value.slice(1);\n } else {\n value = repeat(fill, width - value.length) + value;\n }\n } else {\n throw new ValueError(\"Unrecognized alignment: \" + align);\n }\n }\n return value;\n };\n if (!apply_formatting.__argnames__) Object.defineProperties(apply_formatting, {\n __argnames__ : {value: [\"value\", \"format_spec\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function parse_markup(markup) {\n var key, transformer, format_spec, pos, state, ch;\n key = transformer = format_spec = \"\";\n pos = 0;\n state = 0;\n while (pos < markup.length) {\n ch = markup[(typeof pos === \"number\" && pos < 0) ? markup.length + pos : pos];\n if (state === 0) {\n if (ch === \"!\") {\n state = 1;\n } else if (ch === \":\") {\n state = 2;\n } else {\n key += ch;\n }\n } else if (state === 1) {\n if (ch === \":\") {\n state = 2;\n } else {\n transformer += ch;\n }\n } else {\n format_spec += ch;\n }\n pos += 1;\n }\n return [key, transformer, format_spec];\n };\n if (!parse_markup.__argnames__) Object.defineProperties(parse_markup, {\n __argnames__ : {value: [\"markup\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function render_markup(markup) {\n var ρσ_unpack, key, transformer, format_spec, ends_with_equal, lkey, nvalue, object, ans;\n ρσ_unpack = parse_markup(markup);\nρσ_unpack = ρσ_unpack_asarray(3, ρσ_unpack);\n key = ρσ_unpack[0];\n transformer = ρσ_unpack[1];\n format_spec = ρσ_unpack[2];\n if (transformer && ['a', 'r', 's'].indexOf(transformer) === -1) {\n throw new ValueError(\"Unknown conversion specifier: \" + transformer);\n }\n ends_with_equal = key.endsWith(\"=\");\n if (ends_with_equal) {\n key = key.slice(0, -1);\n }\n lkey = key.length && split(key, /[.\\[]/, 1)[0];\n if (lkey) {\n explicit = true;\n if (implicit) {\n throw new ValueError(\"cannot switch from automatic field numbering to manual field specification\");\n }\n nvalue = parseInt(lkey);\n object = (isNaN(nvalue)) ? kwargs[(typeof lkey === \"number\" && lkey < 0) ? kwargs.length + lkey : lkey] : args[(typeof nvalue === \"number\" && nvalue < 0) ? args.length + nvalue : nvalue];\n if (object === undefined) {\n if (isNaN(nvalue)) {\n throw new KeyError(lkey);\n }\n throw new IndexError(lkey);\n }\n object = resolve(key.slice(lkey.length), object);\n } else {\n implicit = true;\n if (explicit) {\n throw new ValueError(\"cannot switch from manual field specification to automatic field numbering\");\n }\n if (idx >= args.length) {\n throw new IndexError(\"Not enough arguments to match template: \" + template);\n }\n object = args[(typeof idx === \"number\" && idx < 0) ? args.length + idx : idx];\n idx += 1;\n }\n if (typeof object === \"function\") {\n object = object();\n }\n ans = \"\" + object;\n if (format_spec) {\n ans = apply_formatting(ans, format_spec);\n }\n if (ends_with_equal) {\n ans = \"\" + ρσ_str.format(\"{}\", key) + \"=\" + ρσ_str.format(\"{}\", ans) + \"\";\n }\n return ans;\n };\n if (!render_markup.__argnames__) Object.defineProperties(render_markup, {\n __argnames__ : {value: [\"markup\"]},\n __module__ : {value: \"__main__\"}\n });\n\n ans = \"\";\n pos = 0;\n in_brace = 0;\n markup = \"\";\n while (pos < template.length) {\n ch = template[(typeof pos === \"number\" && pos < 0) ? template.length + pos : pos];\n if (in_brace) {\n if (ch === \"{\") {\n in_brace += 1;\n markup += \"{\";\n } else if (ch === \"}\") {\n in_brace -= 1;\n if (in_brace > 0) {\n markup += \"}\";\n } else {\n ans += render_markup(markup);\n }\n } else {\n markup += ch;\n }\n } else {\n if (ch === \"{\") {\n if (template[ρσ_bound_index(pos + 1, template)] === \"{\") {\n pos += 1;\n ans += \"{\";\n } else {\n in_brace = 1;\n markup = \"\";\n }\n } else {\n ans += ch;\n if (ch === \"}\" && template[ρσ_bound_index(pos + 1, template)] === \"}\") {\n pos += 1;\n }\n }\n }\n pos += 1;\n }\n if (in_brace) {\n throw new ValueError(\"expected '}' before end of string\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"capitalize\", (function() {\n var ρσ_anonfunc = function () {\n var string;\n string = this;\n if (string) {\n string = string[0].toUpperCase() + string.slice(1).toLowerCase();\n }\n return string;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"center\", (function() {\n var ρσ_anonfunc = function (width, fill) {\n var left, right;\n left = Math.floor((width - this.length) / 2);\n right = width - left - this.length;\n fill = fill || \" \";\n return new Array(left+1).join(fill) + this + new Array(right+1).join(fill);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\", \"fill\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"count\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var string, ρσ_unpack, pos, step, ans;\n string = this;\n start = start || 0;\n end = end || string.length;\n if (start < 0 || end < 0) {\n string = string.slice(start, end);\n ρσ_unpack = [0, string.length];\n start = ρσ_unpack[0];\n end = ρσ_unpack[1];\n }\n pos = start;\n step = needle.length;\n if (!step) {\n return 0;\n }\n ans = 0;\n while (pos !== -1) {\n pos = string.indexOf(needle, pos);\n if (pos !== -1) {\n ans += 1;\n pos += step;\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"endswith\", (function() {\n var ρσ_anonfunc = function (suffixes, start, end) {\n var string, q;\n string = this;\n start = start || 0;\n if (typeof suffixes === \"string\") {\n suffixes = [suffixes];\n }\n if (end !== undefined) {\n string = string.slice(0, end);\n }\n for (var i = 0; i < suffixes.length; i++) {\n q = suffixes[(typeof i === \"number\" && i < 0) ? suffixes.length + i : i];\n if (string.indexOf(q, Math.max(start, string.length - q.length)) !== -1) {\n return true;\n }\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"suffixes\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"startswith\", (function() {\n var ρσ_anonfunc = function (prefixes, start, end) {\n var prefix;\n start = start || 0;\n if (typeof prefixes === \"string\") {\n prefixes = [prefixes];\n }\n for (var i = 0; i < prefixes.length; i++) {\n prefix = prefixes[(typeof i === \"number\" && i < 0) ? prefixes.length + i : i];\n end = (end === undefined) ? this.length : end;\n if (end - start >= prefix.length && prefix === this.slice(start, start + prefix.length)) {\n return true;\n }\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"prefixes\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"find\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n while (start < 0) {\n start += this.length;\n }\n ans = this.indexOf(needle, start);\n if (end !== undefined && ans !== -1) {\n while (end < 0) {\n end += this.length;\n }\n if (ans >= end - needle.length) {\n return -1;\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rfind\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n while (end < 0) {\n end += this.length;\n }\n ans = this.lastIndexOf(needle, end - 1);\n if (start !== undefined && ans !== -1) {\n while (start < 0) {\n start += this.length;\n }\n if (ans < start) {\n return -1;\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"index\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n ans = ρσ_str.prototype.find.apply(this, arguments);\n if (ans === -1) {\n throw new ValueError(\"substring not found\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rindex\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n ans = ρσ_str.prototype.rfind.apply(this, arguments);\n if (ans === -1) {\n throw new ValueError(\"substring not found\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"islower\", (function() {\n var ρσ_anonfunc = function () {\n return this.length > 0 && this.toLowerCase() === this.toString();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"isupper\", (function() {\n var ρσ_anonfunc = function () {\n return this.length > 0 && this.toUpperCase() === this.toString();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"isspace\", (function() {\n var ρσ_anonfunc = function () {\n return this.length > 0 && /^\\s+$/.test(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"join\", (function() {\n var ρσ_anonfunc = function (iterable) {\n var ans, r;\n if (Array.isArray(iterable)) {\n return iterable.join(this);\n }\n ans = \"\";\n r = iterable.next();\n while (!r.done) {\n if (ans) {\n ans += this;\n }\n ans += r.value;\n r = iterable.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"ljust\", (function() {\n var ρσ_anonfunc = function (width, fill) {\n var string;\n string = this;\n if (width > string.length) {\n fill = fill || \" \";\n string += new Array(width - string.length + 1).join(fill);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\", \"fill\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rjust\", (function() {\n var ρσ_anonfunc = function (width, fill) {\n var string;\n string = this;\n if (width > string.length) {\n fill = fill || \" \";\n string = new Array(width - string.length + 1).join(fill) + string;\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\", \"fill\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"lower\", (function() {\n var ρσ_anonfunc = function () {\n return this.toLowerCase();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"upper\", (function() {\n var ρσ_anonfunc = function () {\n return this.toUpperCase();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"lstrip\", (function() {\n var ρσ_anonfunc = function (chars) {\n var string, pos;\n string = this;\n pos = 0;\n chars = chars || ρσ_str.whitespace;\n while (chars.indexOf(string[(typeof pos === \"number\" && pos < 0) ? string.length + pos : pos]) !== -1) {\n pos += 1;\n }\n if (pos) {\n string = string.slice(pos);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"chars\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rstrip\", (function() {\n var ρσ_anonfunc = function (chars) {\n var string, pos;\n string = this;\n pos = string.length - 1;\n chars = chars || ρσ_str.whitespace;\n while (chars.indexOf(string[(typeof pos === \"number\" && pos < 0) ? string.length + pos : pos]) !== -1) {\n pos -= 1;\n }\n if (pos < string.length - 1) {\n string = string.slice(0, pos + 1);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"chars\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"strip\", (function() {\n var ρσ_anonfunc = function (chars) {\n return ρσ_str.prototype.lstrip.call(ρσ_str.prototype.rstrip.call(this, chars), chars);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"chars\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"partition\", (function() {\n var ρσ_anonfunc = function (sep) {\n var idx;\n idx = this.indexOf(sep);\n if (idx === -1) {\n return [this, \"\", \"\"];\n }\n return [this.slice(0, idx), sep, this.slice(idx + sep.length)];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rpartition\", (function() {\n var ρσ_anonfunc = function (sep) {\n var idx;\n idx = this.lastIndexOf(sep);\n if (idx === -1) {\n return [\"\", \"\", this];\n }\n return [this.slice(0, idx), sep, this.slice(idx + sep.length)];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"replace\", (function() {\n var ρσ_anonfunc = function (old, repl, count) {\n var string, pos, idx;\n string = this;\n if (count === 1) {\n return ρσ_orig_replace(string, old, repl);\n }\n if (count < 1) {\n return string;\n }\n count = count || Number.MAX_VALUE;\n pos = 0;\n while (count > 0) {\n count -= 1;\n idx = string.indexOf(old, pos);\n if (idx === -1) {\n break;\n }\n pos = idx + repl.length;\n string = string.slice(0, idx) + repl + string.slice(idx + old.length);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"old\", \"repl\", \"count\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"split\", (function() {\n var ρσ_anonfunc = function (sep, maxsplit) {\n var split, ans, extra, parts;\n if (maxsplit === 0) {\n return ρσ_list_decorate([ this ]);\n }\n split = ρσ_orig_split;\n if (sep === undefined || sep === null) {\n if (maxsplit > 0) {\n ans = split(this, /(\\s+)/);\n extra = \"\";\n parts = [];\n for (var i = 0; i < ans.length; i++) {\n if (parts.length >= maxsplit + 1) {\n extra += ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i];\n } else if (i % 2 === 0) {\n parts.push(ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i]);\n }\n }\n parts[parts.length-1] += extra;\n ans = parts;\n } else {\n ans = split(this, /\\s+/);\n }\n } else {\n if (sep === \"\") {\n throw new ValueError(\"empty separator\");\n }\n ans = split(this, sep);\n if (maxsplit > 0 && ans.length > maxsplit) {\n extra = ans.slice(maxsplit).join(sep);\n ans = ans.slice(0, maxsplit);\n ans.push(extra);\n }\n }\n return ρσ_list_decorate(ans);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\", \"maxsplit\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rsplit\", (function() {\n var ρσ_anonfunc = function (sep, maxsplit) {\n var split, ans, is_space, pos, current, spc, ch, end, idx;\n if (!maxsplit) {\n return ρσ_str.prototype.split.call(this, sep);\n }\n split = ρσ_orig_split;\n if (sep === undefined || sep === null) {\n if (maxsplit > 0) {\n ans = [];\n is_space = /\\s/;\n pos = this.length - 1;\n current = \"\";\n while (pos > -1 && maxsplit > 0) {\n spc = false;\n ch = (ρσ_expr_temp = this)[(typeof pos === \"number\" && pos < 0) ? ρσ_expr_temp.length + pos : pos];\n while (pos > -1 && is_space.test(ch)) {\n spc = true;\n ch = this[--pos];\n }\n if (spc) {\n if (current) {\n ans.push(current);\n maxsplit -= 1;\n }\n current = ch;\n } else {\n current += ch;\n }\n pos -= 1;\n }\n ans.push(this.slice(0, pos + 1) + current);\n ans.reverse();\n } else {\n ans = split(this, /\\s+/);\n }\n } else {\n if (sep === \"\") {\n throw new ValueError(\"empty separator\");\n }\n ans = [];\n pos = end = this.length;\n while (pos > -1 && maxsplit > 0) {\n maxsplit -= 1;\n idx = this.lastIndexOf(sep, pos);\n if (idx === -1) {\n break;\n }\n ans.push(this.slice(idx + sep.length, end));\n pos = idx - 1;\n end = idx;\n }\n ans.push(this.slice(0, end));\n ans.reverse();\n }\n return ρσ_list_decorate(ans);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\", \"maxsplit\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"splitlines\", (function() {\n var ρσ_anonfunc = function (keepends) {\n var split, parts, ans;\n split = ρσ_orig_split;\n if (keepends) {\n parts = split(this, /((?:\\r?\\n)|\\r)/);\n ans = [];\n for (var i = 0; i < parts.length; i++) {\n if (i % 2 === 0) {\n ans.push(parts[(typeof i === \"number\" && i < 0) ? parts.length + i : i]);\n } else {\n ans[ans.length-1] += parts[(typeof i === \"number\" && i < 0) ? parts.length + i : i];\n }\n }\n } else {\n ans = split(this, /(?:\\r?\\n)|\\r/);\n }\n return ρσ_list_decorate(ans);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"keepends\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"swapcase\", (function() {\n var ρσ_anonfunc = function () {\n var ans, a, b;\n ans = new Array(this.length);\n for (var i = 0; i < ans.length; i++) {\n a = (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n b = a.toLowerCase();\n if (a === b) {\n b = a.toUpperCase();\n }\n ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i] = b;\n }\n return ans.join(\"\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"zfill\", (function() {\n var ρσ_anonfunc = function (width) {\n var string;\n string = this;\n if (width > string.length) {\n string = new Array(width - string.length + 1).join(\"0\") + string;\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\nρσ_str.uchrs = (function() {\n var ρσ_anonfunc = function (string, with_positions) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"_string\"] = string;\n ρσ_d[\"_pos\"] = 0;\n ρσ_d[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var length, pos, value, ans, extra;\n length = this._string.length;\n if (this._pos >= length) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = true;\n return ρσ_d;\n }).call(this);\n }\n pos = this._pos;\n value = this._string.charCodeAt(this._pos++);\n ans = \"\\ufffd\";\n if (55296 <= value && value <= 56319) {\n if (this._pos < length) {\n extra = this._string.charCodeAt(this._pos++);\n if ((extra & 56320) === 56320) {\n ans = String.fromCharCode(value, extra);\n }\n }\n } else if ((value & 56320) !== 56320) {\n ans = String.fromCharCode(value);\n }\n if (with_positions) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = false;\n ρσ_d[\"value\"] = ρσ_list_decorate([ pos, ans ]);\n return ρσ_d;\n }).call(this);\n } else {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = false;\n ρσ_d[\"value\"] = ans;\n return ρσ_d;\n }).call(this);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"string\", \"with_positions\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_str.uslice = (function() {\n var ρσ_anonfunc = function (string, start, end) {\n var items, iterator, r;\n items = [];\n iterator = ρσ_str.uchrs(string);\n r = iterator.next();\n while (!r.done) {\n items.push(r.value);\n r = iterator.next();\n }\n return items.slice(start || 0, (end === undefined) ? items.length : end).join(\"\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"string\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_str.ulen = (function() {\n var ρσ_anonfunc = function (string) {\n var iterator, r, ans;\n iterator = ρσ_str.uchrs(string);\n r = iterator.next();\n ans = 0;\n while (!r.done) {\n r = iterator.next();\n ans += 1;\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"string\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_str.ascii_lowercase = \"abcdefghijklmnopqrstuvwxyz\";\nρσ_str.ascii_uppercase = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\nρσ_str.ascii_letters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\nρσ_str.digits = \"0123456789\";\nρσ_str.punctuation = \"!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~\";\nρσ_str.printable = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~ \\t\\n\\r\\u000b\\f\";\nρσ_str.whitespace = \" \\t\\n\\r\\u000b\\f\";\ndefine_str_func = undefined;\nvar str = ρσ_str, repr = ρσ_repr;;\n var ρσ_modules = {};\n ρσ_modules.utils = {};\n ρσ_modules.errors = {};\n ρσ_modules.unicode_aliases = {};\n ρσ_modules.ast = {};\n ρσ_modules.string_interpolation = {};\n ρσ_modules.tokenizer = {};\n ρσ_modules.parse = {};\n ρσ_modules.output = {};\n ρσ_modules[\"output.stream\"] = {};\n ρσ_modules[\"output.statements\"] = {};\n ρσ_modules[\"output.exceptions\"] = {};\n ρσ_modules[\"output.utils\"] = {};\n ρσ_modules[\"output.loops\"] = {};\n ρσ_modules[\"output.operators\"] = {};\n ρσ_modules[\"output.functions\"] = {};\n ρσ_modules[\"output.classes\"] = {};\n ρσ_modules[\"output.literals\"] = {};\n ρσ_modules[\"output.comments\"] = {};\n ρσ_modules[\"output.modules\"] = {};\n ρσ_modules[\"output.codegen\"] = {};\n\n (function(){\n var __name__ = \"utils\";\n var has_prop, MAP;\n has_prop = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);\n function array_to_hash(a) {\n var ret, i;\n ret = Object.create(null);\n var ρσ_Iter0 = ρσ_Iterable(range(len(a)));\n for (var ρσ_Index0 = 0; ρσ_Index0 < ρσ_Iter0.length; ρσ_Index0++) {\n i = ρσ_Iter0[ρσ_Index0];\n ret[ρσ_bound_index(a[(typeof i === \"number\" && i < 0) ? a.length + i : i], ret)] = true;\n }\n return ret;\n };\n if (!array_to_hash.__argnames__) Object.defineProperties(array_to_hash, {\n __argnames__ : {value: [\"a\"]},\n __module__ : {value: \"utils\"}\n });\n\n function slice(a, start) {\n return Array.prototype.slice.call(a, start || 0);\n };\n if (!slice.__argnames__) Object.defineProperties(slice, {\n __argnames__ : {value: [\"a\", \"start\"]},\n __module__ : {value: \"utils\"}\n });\n\n function characters(str_) {\n return str_.split(\"\");\n };\n if (!characters.__argnames__) Object.defineProperties(characters, {\n __argnames__ : {value: [\"str_\"]},\n __module__ : {value: \"utils\"}\n });\n\n function member(name, array) {\n var i;\n for (var ρσ_Index1 = array.length - 1; ρσ_Index1 > -1; ρσ_Index1-=1) {\n i = ρσ_Index1;\n if (array[(typeof i === \"number\" && i < 0) ? array.length + i : i] === name) {\n return true;\n }\n }\n return false;\n };\n if (!member.__argnames__) Object.defineProperties(member, {\n __argnames__ : {value: [\"name\", \"array\"]},\n __module__ : {value: \"utils\"}\n });\n\n function repeat_string(str_, i) {\n var d;\n if (i <= 0) {\n return \"\";\n }\n if (i === 1) {\n return str_;\n }\n d = repeat_string(str_, i >> 1);\n d += d;\n if (i & 1) {\n d += str_;\n }\n return d;\n };\n if (!repeat_string.__argnames__) Object.defineProperties(repeat_string, {\n __argnames__ : {value: [\"str_\", \"i\"]},\n __module__ : {value: \"utils\"}\n });\n\n function DefaultsError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n DefaultsError.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(DefaultsError, ValueError);\n DefaultsError.prototype.__init__ = function __init__(name, defs) {\n var self = this;\n ValueError.prototype.__init__.call(self, name + \" is not a supported option. Supported options are: \" + str(Object.keys(defs)));\n };\n if (!DefaultsError.prototype.__init__.__argnames__) Object.defineProperties(DefaultsError.prototype.__init__, {\n __argnames__ : {value: [\"name\", \"defs\"]},\n __module__ : {value: \"utils\"}\n });\n DefaultsError.__argnames__ = DefaultsError.prototype.__init__.__argnames__;\n DefaultsError.__handles_kwarg_interpolation__ = DefaultsError.prototype.__init__.__handles_kwarg_interpolation__;\n DefaultsError.prototype.__repr__ = function __repr__ () {\n if(ValueError.prototype.__repr__) return ValueError.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n DefaultsError.prototype.__str__ = function __str__ () {\n if(ValueError.prototype.__str__) return ValueError.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(DefaultsError.prototype, \"__bases__\", {value: [ValueError]});\n\n function defaults(args, defs, croak) {\n var ret, i;\n if (args === true) {\n args = Object.create(null);\n }\n ret = args || Object.create(null);\n if (croak) {\n var ρσ_Iter2 = ρσ_Iterable(ret);\n for (var ρσ_Index2 = 0; ρσ_Index2 < ρσ_Iter2.length; ρσ_Index2++) {\n i = ρσ_Iter2[ρσ_Index2];\n if (!has_prop(defs, i)) {\n throw new DefaultsError(i, defs);\n }\n }\n }\n var ρσ_Iter3 = ρσ_Iterable(defs);\n for (var ρσ_Index3 = 0; ρσ_Index3 < ρσ_Iter3.length; ρσ_Index3++) {\n i = ρσ_Iter3[ρσ_Index3];\n ret[(typeof i === \"number\" && i < 0) ? ret.length + i : i] = (args && has_prop(args, i)) ? args[(typeof i === \"number\" && i < 0) ? args.length + i : i] : defs[(typeof i === \"number\" && i < 0) ? defs.length + i : i];\n }\n return ret;\n };\n if (!defaults.__argnames__) Object.defineProperties(defaults, {\n __argnames__ : {value: [\"args\", \"defs\", \"croak\"]},\n __module__ : {value: \"utils\"}\n });\n\n function merge(obj, ext) {\n var i;\n var ρσ_Iter4 = ρσ_Iterable(ext);\n for (var ρσ_Index4 = 0; ρσ_Index4 < ρσ_Iter4.length; ρσ_Index4++) {\n i = ρσ_Iter4[ρσ_Index4];\n obj[(typeof i === \"number\" && i < 0) ? obj.length + i : i] = ext[(typeof i === \"number\" && i < 0) ? ext.length + i : i];\n }\n return obj;\n };\n if (!merge.__argnames__) Object.defineProperties(merge, {\n __argnames__ : {value: [\"obj\", \"ext\"]},\n __module__ : {value: \"utils\"}\n });\n\n function noop() {\n };\n if (!noop.__module__) Object.defineProperties(noop, {\n __module__ : {value: \"utils\"}\n });\n\n MAP = (function() {\n var ρσ_anonfunc = function () {\n var skip;\n function MAP(a, f, backwards) {\n var ret, top, i;\n ret = ρσ_list_decorate([]);\n top = ρσ_list_decorate([]);\n function doit() {\n var val, is_last;\n val = f(a[(typeof i === \"number\" && i < 0) ? a.length + i : i], i);\n is_last = ρσ_instanceof(val, Last);\n if (is_last) {\n val = val.v;\n }\n if (ρσ_instanceof(val, AtTop)) {\n val = val.v;\n if (ρσ_instanceof(val, Splice)) {\n top.push.apply(top, (backwards) ? val.v.slice().reverse() : val.v);\n } else {\n top.push(val);\n }\n } else if (val !== skip) {\n if (ρσ_instanceof(val, Splice)) {\n ret.push.apply(ret, (backwards) ? val.v.slice().reverse() : val.v);\n } else {\n ret.push(val);\n }\n }\n return is_last;\n };\n if (!doit.__module__) Object.defineProperties(doit, {\n __module__ : {value: \"utils\"}\n });\n\n if (Array.isArray(a)) {\n if (backwards) {\n for (var ρσ_Index5 = a.length - 1; ρσ_Index5 > -1; ρσ_Index5-=1) {\n i = ρσ_Index5;\n if (doit()) {\n break;\n }\n }\n ret.reverse();\n top.reverse();\n } else {\n var ρσ_Iter6 = ρσ_Iterable(range(len(a)));\n for (var ρσ_Index6 = 0; ρσ_Index6 < ρσ_Iter6.length; ρσ_Index6++) {\n i = ρσ_Iter6[ρσ_Index6];\n if (doit()) {\n break;\n }\n }\n }\n } else {\n var ρσ_Iter7 = ρσ_Iterable(a);\n for (var ρσ_Index7 = 0; ρσ_Index7 < ρσ_Iter7.length; ρσ_Index7++) {\n i = ρσ_Iter7[ρσ_Index7];\n if (doit()) {\n break;\n }\n }\n }\n return top.concat(ret);\n };\n if (!MAP.__argnames__) Object.defineProperties(MAP, {\n __argnames__ : {value: [\"a\", \"f\", \"backwards\"]},\n __module__ : {value: \"utils\"}\n });\n\n MAP.at_top = (function() {\n var ρσ_anonfunc = function (val) {\n return new AtTop(val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"utils\"}\n });\n return ρσ_anonfunc;\n })();\n MAP.splice = (function() {\n var ρσ_anonfunc = function (val) {\n return new Splice(val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"utils\"}\n });\n return ρσ_anonfunc;\n })();\n MAP.last = (function() {\n var ρσ_anonfunc = function (val) {\n return new Last(val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"utils\"}\n });\n return ρσ_anonfunc;\n })();\n skip = MAP.skip = Object.create(null);\n function AtTop(val) {\n this.v = val;\n };\n if (!AtTop.__argnames__) Object.defineProperties(AtTop, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"utils\"}\n });\n\n function Splice(val) {\n this.v = val;\n };\n if (!Splice.__argnames__) Object.defineProperties(Splice, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"utils\"}\n });\n\n function Last(val) {\n this.v = val;\n };\n if (!Last.__argnames__) Object.defineProperties(Last, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"utils\"}\n });\n\n return MAP;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"utils\"}\n });\n return ρσ_anonfunc;\n })().call(this);\n function push_uniq(array, el) {\n if (array.indexOf(el) < 0) {\n array.push(el);\n }\n };\n if (!push_uniq.__argnames__) Object.defineProperties(push_uniq, {\n __argnames__ : {value: [\"array\", \"el\"]},\n __module__ : {value: \"utils\"}\n });\n\n function string_template(text, props) {\n return text.replace(/\\{(.+?)\\}/g, (function() {\n var ρσ_anonfunc = function (str_, p) {\n return props[(typeof p === \"number\" && p < 0) ? props.length + p : p];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"str_\", \"p\"]},\n __module__ : {value: \"utils\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!string_template.__argnames__) Object.defineProperties(string_template, {\n __argnames__ : {value: [\"text\", \"props\"]},\n __module__ : {value: \"utils\"}\n });\n\n function remove(array, el) {\n var i;\n for (var ρσ_Index8 = array.length - 1; ρσ_Index8 > -1; ρσ_Index8-=1) {\n i = ρσ_Index8;\n if (array[(typeof i === \"number\" && i < 0) ? array.length + i : i] === el) {\n array.splice(i, 1);\n }\n }\n };\n if (!remove.__argnames__) Object.defineProperties(remove, {\n __argnames__ : {value: [\"array\", \"el\"]},\n __module__ : {value: \"utils\"}\n });\n\n function mergeSort(array, cmp) {\n if (array.length < 2) {\n return array.slice();\n }\n function merge(a, b) {\n var r, ai, bi, i;\n r = ρσ_list_decorate([]);\n ai = 0;\n bi = 0;\n i = 0;\n while (ai < a.length && bi < b.length) {\n if (cmp(a[(typeof ai === \"number\" && ai < 0) ? a.length + ai : ai], b[(typeof bi === \"number\" && bi < 0) ? b.length + bi : bi]) <= 0) {\n r[(typeof i === \"number\" && i < 0) ? r.length + i : i] = a[(typeof ai === \"number\" && ai < 0) ? a.length + ai : ai];\n ai += 1;\n } else {\n r[(typeof i === \"number\" && i < 0) ? r.length + i : i] = b[(typeof bi === \"number\" && bi < 0) ? b.length + bi : bi];\n bi += 1;\n }\n i += 1;\n }\n if (ai < a.length) {\n r.push.apply(r, a.slice(ai));\n }\n if (bi < b.length) {\n r.push.apply(r, b.slice(bi));\n }\n return r;\n };\n if (!merge.__argnames__) Object.defineProperties(merge, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"utils\"}\n });\n\n function _ms(a) {\n var m, left, right;\n if (a.length <= 1) {\n return a;\n }\n m = Math.floor(a.length / 2);\n left = a.slice(0, m);\n right = a.slice(m);\n left = _ms(left);\n right = _ms(right);\n return merge(left, right);\n };\n if (!_ms.__argnames__) Object.defineProperties(_ms, {\n __argnames__ : {value: [\"a\"]},\n __module__ : {value: \"utils\"}\n });\n\n return _ms(array);\n };\n if (!mergeSort.__argnames__) Object.defineProperties(mergeSort, {\n __argnames__ : {value: [\"array\", \"cmp\"]},\n __module__ : {value: \"utils\"}\n });\n\n function set_difference(a, b) {\n return a.filter((function() {\n var ρσ_anonfunc = function (el) {\n return b.indexOf(el) < 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"el\"]},\n __module__ : {value: \"utils\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!set_difference.__argnames__) Object.defineProperties(set_difference, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"utils\"}\n });\n\n function set_intersection(a, b) {\n return a.filter((function() {\n var ρσ_anonfunc = function (el) {\n return b.indexOf(el) >= 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"el\"]},\n __module__ : {value: \"utils\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!set_intersection.__argnames__) Object.defineProperties(set_intersection, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"utils\"}\n });\n\n function make_predicate(words) {\n var a, k;\n if (typeof words === \"string\") {\n words = words.split(\" \");\n }\n a = Object.create(null);\n var ρσ_Iter9 = ρσ_Iterable(words);\n for (var ρσ_Index9 = 0; ρσ_Index9 < ρσ_Iter9.length; ρσ_Index9++) {\n k = ρσ_Iter9[ρσ_Index9];\n a[(typeof k === \"number\" && k < 0) ? a.length + k : k] = true;\n }\n return a;\n };\n if (!make_predicate.__argnames__) Object.defineProperties(make_predicate, {\n __argnames__ : {value: [\"words\"]},\n __module__ : {value: \"utils\"}\n });\n\n function cache_file_name(src, cache_dir) {\n if (cache_dir) {\n src = str.replace(src, \"\\\\\", \"/\");\n return cache_dir + \"/\" + str.lstrip(str.replace(src, \"/\", \"-\") + \".json\", \"-\");\n }\n return src + \"-cached\";\n };\n if (!cache_file_name.__argnames__) Object.defineProperties(cache_file_name, {\n __argnames__ : {value: [\"src\", \"cache_dir\"]},\n __module__ : {value: \"utils\"}\n });\n\n ρσ_modules.utils.has_prop = has_prop;\n ρσ_modules.utils.MAP = MAP;\n ρσ_modules.utils.array_to_hash = array_to_hash;\n ρσ_modules.utils.slice = slice;\n ρσ_modules.utils.characters = characters;\n ρσ_modules.utils.member = member;\n ρσ_modules.utils.repeat_string = repeat_string;\n ρσ_modules.utils.DefaultsError = DefaultsError;\n ρσ_modules.utils.defaults = defaults;\n ρσ_modules.utils.merge = merge;\n ρσ_modules.utils.noop = noop;\n ρσ_modules.utils.push_uniq = push_uniq;\n ρσ_modules.utils.string_template = string_template;\n ρσ_modules.utils.remove = remove;\n ρσ_modules.utils.mergeSort = mergeSort;\n ρσ_modules.utils.set_difference = set_difference;\n ρσ_modules.utils.set_intersection = set_intersection;\n ρσ_modules.utils.make_predicate = make_predicate;\n ρσ_modules.utils.cache_file_name = cache_file_name;\n })();\n\n (function(){\n var __name__ = \"errors\";\n function SyntaxError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n SyntaxError.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(SyntaxError, Error);\n SyntaxError.prototype.__init__ = function __init__(message, filename, line, col, pos, is_eof) {\n var self = this;\n self.stack = (new Error).stack;\n self.message = message;\n self.line = line;\n self.col = col;\n self.pos = pos;\n self.is_eof = is_eof;\n self.filename = filename;\n self.lineNumber = line;\n self.fileName = filename;\n };\n if (!SyntaxError.prototype.__init__.__argnames__) Object.defineProperties(SyntaxError.prototype.__init__, {\n __argnames__ : {value: [\"message\", \"filename\", \"line\", \"col\", \"pos\", \"is_eof\"]},\n __module__ : {value: \"errors\"}\n });\n SyntaxError.__argnames__ = SyntaxError.prototype.__init__.__argnames__;\n SyntaxError.__handles_kwarg_interpolation__ = SyntaxError.prototype.__init__.__handles_kwarg_interpolation__;\n SyntaxError.prototype.toString = function toString() {\n var self = this;\n var ans;\n ans = self.message + \" (line: \" + self.line + \", col: \" + self.col + \", pos: \" + self.pos + \")\";\n if (self.filename) {\n ans = self.filename + \":\" + ans;\n }\n if (self.stack) {\n ans += \"\\n\\n\" + self.stack;\n }\n return ans;\n };\n if (!SyntaxError.prototype.toString.__module__) Object.defineProperties(SyntaxError.prototype.toString, {\n __module__ : {value: \"errors\"}\n });\n SyntaxError.prototype.__repr__ = function __repr__ () {\n if(Error.prototype.__repr__) return Error.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n SyntaxError.prototype.__str__ = function __str__ () {\n if(Error.prototype.__str__) return Error.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(SyntaxError.prototype, \"__bases__\", {value: [Error]});\n\n function ImportError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n ImportError.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(ImportError, SyntaxError);\n ImportError.prototype.__init__ = function __init__ () {\n SyntaxError.prototype.__init__ && SyntaxError.prototype.__init__.apply(this, arguments);\n };\n ImportError.prototype.__repr__ = function __repr__ () {\n if(SyntaxError.prototype.__repr__) return SyntaxError.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n ImportError.prototype.__str__ = function __str__ () {\n if(SyntaxError.prototype.__str__) return SyntaxError.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(ImportError.prototype, \"__bases__\", {value: [SyntaxError]});\n \n\n ρσ_modules.errors.SyntaxError = SyntaxError;\n ρσ_modules.errors.ImportError = ImportError;\n })();\n\n (function(){\n var __name__ = \"unicode_aliases\";\n var DB, ALIAS_MAP;\n DB = \"\\n# NameAliases-8.0.0.txt\\n# Date: 2014-11-19, 01:30:00 GMT [KW, LI]\\n#\\n# This file is a normative contributory data file in the\\n# Unicode Character Database.\\n#\\n# Copyright (c) 2005-2014 Unicode, Inc.\\n# For terms of use, see http://www.unicode.org/terms_of_use.html\\n#\\n# This file defines the formal name aliases for Unicode characters.\\n#\\n# For informative aliases, see NamesList.txt\\n#\\n# The formal name aliases are divided into five types, each with a distinct label.\\n#\\n# Type Labels:\\n#\\n# 1. correction\\n# Corrections for serious problems in the character names\\n# 2. control\\n# ISO 6429 names for C0 and C1 control functions, and other\\n# commonly occurring names for control codes\\n# 3. alternate\\n# A few widely used alternate names for format characters\\n# 4. figment\\n# Several documented labels for C1 control code points which\\n# were never actually approved in any standard\\n# 5. abbreviation\\n# Commonly occurring abbreviations (or acronyms) for control codes,\\n# format characters, spaces, and variation selectors\\n#\\n# The formal name aliases are part of the Unicode character namespace, which\\n# includes the character names and the names of named character sequences.\\n# The inclusion of ISO 6429 names and other commonly occurring names and\\n# abbreviations for control codes and format characters as formal name aliases\\n# is to help avoid name collisions between Unicode character names and the\\n# labels which commonly appear in text and/or in implementations such as regex, for\\n# control codes (which for historical reasons have no Unicode character name)\\n# or for format characters.\\n#\\n# For documentation, see NamesList.html and http://www.unicode.org/reports/tr44/\\n#\\n# FORMAT\\n#\\n# Each line has three fields, as described here:\\n#\\n# First field: Code point\\n# Second field: Alias\\n# Third field: Type\\n#\\n# The type labels used are defined above. As for property values, comparisons\\n# of type labels should ignore case.\\n#\\n# The type labels can be mapped to other strings for display, if desired.\\n#\\n# In case multiple aliases are assigned, additional aliases\\n# are provided on separate lines. Parsers of this data file should\\n# take note that the same code point can (and does) occur more than once.\\n#\\n# Note that currently the only instances of multiple aliases of the same\\n# type for a single code point are either of type \\\"control\\\" or \\\"abbreviation\\\".\\n# An alias of type \\\"abbreviation\\\" can, in principle, be added for any code\\n# point, although currently aliases of type \\\"correction\\\" do not have\\n# any additional aliases of type \\\"abbreviation\\\". Such relationships\\n# are not enforced by stability policies.\\n#\\n#-----------------------------------------------------------------\\n\\n0000;NULL;control\\n0000;NUL;abbreviation\\n0001;START OF HEADING;control\\n0001;SOH;abbreviation\\n0002;START OF TEXT;control\\n0002;STX;abbreviation\\n0003;END OF TEXT;control\\n0003;ETX;abbreviation\\n0004;END OF TRANSMISSION;control\\n0004;EOT;abbreviation\\n0005;ENQUIRY;control\\n0005;ENQ;abbreviation\\n0006;ACKNOWLEDGE;control\\n0006;ACK;abbreviation\\n\\n# Note that no formal name alias for the ISO 6429 \\\"BELL\\\" is\\n# provided for U+0007, because of the existing name collision\\n# with U+1F514 BELL.\\n\\n0007;ALERT;control\\n0007;BEL;abbreviation\\n\\n0008;BACKSPACE;control\\n0008;BS;abbreviation\\n0009;CHARACTER TABULATION;control\\n0009;HORIZONTAL TABULATION;control\\n0009;HT;abbreviation\\n0009;TAB;abbreviation\\n000A;LINE FEED;control\\n000A;NEW LINE;control\\n000A;END OF LINE;control\\n000A;LF;abbreviation\\n000A;NL;abbreviation\\n000A;EOL;abbreviation\\n000B;LINE TABULATION;control\\n000B;VERTICAL TABULATION;control\\n000B;VT;abbreviation\\n000C;FORM FEED;control\\n000C;FF;abbreviation\\n000D;CARRIAGE RETURN;control\\n000D;CR;abbreviation\\n000E;SHIFT OUT;control\\n000E;LOCKING-SHIFT ONE;control\\n000E;SO;abbreviation\\n000F;SHIFT IN;control\\n000F;LOCKING-SHIFT ZERO;control\\n000F;SI;abbreviation\\n0010;DATA LINK ESCAPE;control\\n0010;DLE;abbreviation\\n0011;DEVICE CONTROL ONE;control\\n0011;DC1;abbreviation\\n0012;DEVICE CONTROL TWO;control\\n0012;DC2;abbreviation\\n0013;DEVICE CONTROL THREE;control\\n0013;DC3;abbreviation\\n0014;DEVICE CONTROL FOUR;control\\n0014;DC4;abbreviation\\n0015;NEGATIVE ACKNOWLEDGE;control\\n0015;NAK;abbreviation\\n0016;SYNCHRONOUS IDLE;control\\n0016;SYN;abbreviation\\n0017;END OF TRANSMISSION BLOCK;control\\n0017;ETB;abbreviation\\n0018;CANCEL;control\\n0018;CAN;abbreviation\\n0019;END OF MEDIUM;control\\n0019;EOM;abbreviation\\n001A;SUBSTITUTE;control\\n001A;SUB;abbreviation\\n001B;ESCAPE;control\\n001B;ESC;abbreviation\\n001C;INFORMATION SEPARATOR FOUR;control\\n001C;FILE SEPARATOR;control\\n001C;FS;abbreviation\\n001D;INFORMATION SEPARATOR THREE;control\\n001D;GROUP SEPARATOR;control\\n001D;GS;abbreviation\\n001E;INFORMATION SEPARATOR TWO;control\\n001E;RECORD SEPARATOR;control\\n001E;RS;abbreviation\\n001F;INFORMATION SEPARATOR ONE;control\\n001F;UNIT SEPARATOR;control\\n001F;US;abbreviation\\n0020;SP;abbreviation\\n007F;DELETE;control\\n007F;DEL;abbreviation\\n\\n# PADDING CHARACTER and HIGH OCTET PRESET represent\\n# architectural concepts initially proposed for early\\n# drafts of ISO/IEC 10646-1. They were never actually\\n# approved or standardized: hence their designation\\n# here as the \\\"figment\\\" type. Formal name aliases\\n# (and corresponding abbreviations) for these code\\n# points are included here because these names leaked\\n# out from the draft documents and were published in\\n# at least one RFC whose names for code points was\\n# implemented in Perl regex expressions.\\n\\n0080;PADDING CHARACTER;figment\\n0080;PAD;abbreviation\\n0081;HIGH OCTET PRESET;figment\\n0081;HOP;abbreviation\\n\\n0082;BREAK PERMITTED HERE;control\\n0082;BPH;abbreviation\\n0083;NO BREAK HERE;control\\n0083;NBH;abbreviation\\n0084;INDEX;control\\n0084;IND;abbreviation\\n0085;NEXT LINE;control\\n0085;NEL;abbreviation\\n0086;START OF SELECTED AREA;control\\n0086;SSA;abbreviation\\n0087;END OF SELECTED AREA;control\\n0087;ESA;abbreviation\\n0088;CHARACTER TABULATION SET;control\\n0088;HORIZONTAL TABULATION SET;control\\n0088;HTS;abbreviation\\n0089;CHARACTER TABULATION WITH JUSTIFICATION;control\\n0089;HORIZONTAL TABULATION WITH JUSTIFICATION;control\\n0089;HTJ;abbreviation\\n008A;LINE TABULATION SET;control\\n008A;VERTICAL TABULATION SET;control\\n008A;VTS;abbreviation\\n008B;PARTIAL LINE FORWARD;control\\n008B;PARTIAL LINE DOWN;control\\n008B;PLD;abbreviation\\n008C;PARTIAL LINE BACKWARD;control\\n008C;PARTIAL LINE UP;control\\n008C;PLU;abbreviation\\n008D;REVERSE LINE FEED;control\\n008D;REVERSE INDEX;control\\n008D;RI;abbreviation\\n008E;SINGLE SHIFT TWO;control\\n008E;SINGLE-SHIFT-2;control\\n008E;SS2;abbreviation\\n008F;SINGLE SHIFT THREE;control\\n008F;SINGLE-SHIFT-3;control\\n008F;SS3;abbreviation\\n0090;DEVICE CONTROL STRING;control\\n0090;DCS;abbreviation\\n0091;PRIVATE USE ONE;control\\n0091;PRIVATE USE-1;control\\n0091;PU1;abbreviation\\n0092;PRIVATE USE TWO;control\\n0092;PRIVATE USE-2;control\\n0092;PU2;abbreviation\\n0093;SET TRANSMIT STATE;control\\n0093;STS;abbreviation\\n0094;CANCEL CHARACTER;control\\n0094;CCH;abbreviation\\n0095;MESSAGE WAITING;control\\n0095;MW;abbreviation\\n0096;START OF GUARDED AREA;control\\n0096;START OF PROTECTED AREA;control\\n0096;SPA;abbreviation\\n0097;END OF GUARDED AREA;control\\n0097;END OF PROTECTED AREA;control\\n0097;EPA;abbreviation\\n0098;START OF STRING;control\\n0098;SOS;abbreviation\\n\\n# SINGLE GRAPHIC CHARACTER INTRODUCER is another\\n# architectural concept from early drafts of ISO/IEC 10646-1\\n# which was never approved and standardized.\\n\\n0099;SINGLE GRAPHIC CHARACTER INTRODUCER;figment\\n0099;SGC;abbreviation\\n\\n009A;SINGLE CHARACTER INTRODUCER;control\\n009A;SCI;abbreviation\\n009B;CONTROL SEQUENCE INTRODUCER;control\\n009B;CSI;abbreviation\\n009C;STRING TERMINATOR;control\\n009C;ST;abbreviation\\n009D;OPERATING SYSTEM COMMAND;control\\n009D;OSC;abbreviation\\n009E;PRIVACY MESSAGE;control\\n009E;PM;abbreviation\\n009F;APPLICATION PROGRAM COMMAND;control\\n009F;APC;abbreviation\\n00A0;NBSP;abbreviation\\n00AD;SHY;abbreviation\\n01A2;LATIN CAPITAL LETTER GHA;correction\\n01A3;LATIN SMALL LETTER GHA;correction\\n034F;CGJ;abbreviation\\n061C;ALM;abbreviation\\n0709;SYRIAC SUBLINEAR COLON SKEWED LEFT;correction\\n0CDE;KANNADA LETTER LLLA;correction\\n0E9D;LAO LETTER FO FON;correction\\n0E9F;LAO LETTER FO FAY;correction\\n0EA3;LAO LETTER RO;correction\\n0EA5;LAO LETTER LO;correction\\n0FD0;TIBETAN MARK BKA- SHOG GI MGO RGYAN;correction\\n180B;FVS1;abbreviation\\n180C;FVS2;abbreviation\\n180D;FVS3;abbreviation\\n180E;MVS;abbreviation\\n200B;ZWSP;abbreviation\\n200C;ZWNJ;abbreviation\\n200D;ZWJ;abbreviation\\n200E;LRM;abbreviation\\n200F;RLM;abbreviation\\n202A;LRE;abbreviation\\n202B;RLE;abbreviation\\n202C;PDF;abbreviation\\n202D;LRO;abbreviation\\n202E;RLO;abbreviation\\n202F;NNBSP;abbreviation\\n205F;MMSP;abbreviation\\n2060;WJ;abbreviation\\n2066;LRI;abbreviation\\n2067;RLI;abbreviation\\n2068;FSI;abbreviation\\n2069;PDI;abbreviation\\n2118;WEIERSTRASS ELLIPTIC FUNCTION;correction\\n2448;MICR ON US SYMBOL;correction\\n2449;MICR DASH SYMBOL;correction\\n2B7A;LEFTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE VERTICAL STROKE;correction\\n2B7C;RIGHTWARDS TRIANGLE-HEADED ARROW WITH DOUBLE VERTICAL STROKE;correction\\nA015;YI SYLLABLE ITERATION MARK;correction\\nFE18;PRESENTATION FORM FOR VERTICAL RIGHT WHITE LENTICULAR BRACKET;correction\\nFE00;VS1;abbreviation\\nFE01;VS2;abbreviation\\nFE02;VS3;abbreviation\\nFE03;VS4;abbreviation\\nFE04;VS5;abbreviation\\nFE05;VS6;abbreviation\\nFE06;VS7;abbreviation\\nFE07;VS8;abbreviation\\nFE08;VS9;abbreviation\\nFE09;VS10;abbreviation\\nFE0A;VS11;abbreviation\\nFE0B;VS12;abbreviation\\nFE0C;VS13;abbreviation\\nFE0D;VS14;abbreviation\\nFE0E;VS15;abbreviation\\nFE0F;VS16;abbreviation\\nFEFF;BYTE ORDER MARK;alternate\\nFEFF;BOM;abbreviation\\nFEFF;ZWNBSP;abbreviation\\n122D4;CUNEIFORM SIGN NU11 TENU;correction\\n122D5;CUNEIFORM SIGN NU11 OVER NU11 BUR OVER BUR;correction\\n1D0C5;BYZANTINE MUSICAL SYMBOL FTHORA SKLIRON CHROMA VASIS;correction\\nE0100;VS17;abbreviation\\nE0101;VS18;abbreviation\\nE0102;VS19;abbreviation\\nE0103;VS20;abbreviation\\nE0104;VS21;abbreviation\\nE0105;VS22;abbreviation\\nE0106;VS23;abbreviation\\nE0107;VS24;abbreviation\\nE0108;VS25;abbreviation\\nE0109;VS26;abbreviation\\nE010A;VS27;abbreviation\\nE010B;VS28;abbreviation\\nE010C;VS29;abbreviation\\nE010D;VS30;abbreviation\\nE010E;VS31;abbreviation\\nE010F;VS32;abbreviation\\nE0110;VS33;abbreviation\\nE0111;VS34;abbreviation\\nE0112;VS35;abbreviation\\nE0113;VS36;abbreviation\\nE0114;VS37;abbreviation\\nE0115;VS38;abbreviation\\nE0116;VS39;abbreviation\\nE0117;VS40;abbreviation\\nE0118;VS41;abbreviation\\nE0119;VS42;abbreviation\\nE011A;VS43;abbreviation\\nE011B;VS44;abbreviation\\nE011C;VS45;abbreviation\\nE011D;VS46;abbreviation\\nE011E;VS47;abbreviation\\nE011F;VS48;abbreviation\\nE0120;VS49;abbreviation\\nE0121;VS50;abbreviation\\nE0122;VS51;abbreviation\\nE0123;VS52;abbreviation\\nE0124;VS53;abbreviation\\nE0125;VS54;abbreviation\\nE0126;VS55;abbreviation\\nE0127;VS56;abbreviation\\nE0128;VS57;abbreviation\\nE0129;VS58;abbreviation\\nE012A;VS59;abbreviation\\nE012B;VS60;abbreviation\\nE012C;VS61;abbreviation\\nE012D;VS62;abbreviation\\nE012E;VS63;abbreviation\\nE012F;VS64;abbreviation\\nE0130;VS65;abbreviation\\nE0131;VS66;abbreviation\\nE0132;VS67;abbreviation\\nE0133;VS68;abbreviation\\nE0134;VS69;abbreviation\\nE0135;VS70;abbreviation\\nE0136;VS71;abbreviation\\nE0137;VS72;abbreviation\\nE0138;VS73;abbreviation\\nE0139;VS74;abbreviation\\nE013A;VS75;abbreviation\\nE013B;VS76;abbreviation\\nE013C;VS77;abbreviation\\nE013D;VS78;abbreviation\\nE013E;VS79;abbreviation\\nE013F;VS80;abbreviation\\nE0140;VS81;abbreviation\\nE0141;VS82;abbreviation\\nE0142;VS83;abbreviation\\nE0143;VS84;abbreviation\\nE0144;VS85;abbreviation\\nE0145;VS86;abbreviation\\nE0146;VS87;abbreviation\\nE0147;VS88;abbreviation\\nE0148;VS89;abbreviation\\nE0149;VS90;abbreviation\\nE014A;VS91;abbreviation\\nE014B;VS92;abbreviation\\nE014C;VS93;abbreviation\\nE014D;VS94;abbreviation\\nE014E;VS95;abbreviation\\nE014F;VS96;abbreviation\\nE0150;VS97;abbreviation\\nE0151;VS98;abbreviation\\nE0152;VS99;abbreviation\\nE0153;VS100;abbreviation\\nE0154;VS101;abbreviation\\nE0155;VS102;abbreviation\\nE0156;VS103;abbreviation\\nE0157;VS104;abbreviation\\nE0158;VS105;abbreviation\\nE0159;VS106;abbreviation\\nE015A;VS107;abbreviation\\nE015B;VS108;abbreviation\\nE015C;VS109;abbreviation\\nE015D;VS110;abbreviation\\nE015E;VS111;abbreviation\\nE015F;VS112;abbreviation\\nE0160;VS113;abbreviation\\nE0161;VS114;abbreviation\\nE0162;VS115;abbreviation\\nE0163;VS116;abbreviation\\nE0164;VS117;abbreviation\\nE0165;VS118;abbreviation\\nE0166;VS119;abbreviation\\nE0167;VS120;abbreviation\\nE0168;VS121;abbreviation\\nE0169;VS122;abbreviation\\nE016A;VS123;abbreviation\\nE016B;VS124;abbreviation\\nE016C;VS125;abbreviation\\nE016D;VS126;abbreviation\\nE016E;VS127;abbreviation\\nE016F;VS128;abbreviation\\nE0170;VS129;abbreviation\\nE0171;VS130;abbreviation\\nE0172;VS131;abbreviation\\nE0173;VS132;abbreviation\\nE0174;VS133;abbreviation\\nE0175;VS134;abbreviation\\nE0176;VS135;abbreviation\\nE0177;VS136;abbreviation\\nE0178;VS137;abbreviation\\nE0179;VS138;abbreviation\\nE017A;VS139;abbreviation\\nE017B;VS140;abbreviation\\nE017C;VS141;abbreviation\\nE017D;VS142;abbreviation\\nE017E;VS143;abbreviation\\nE017F;VS144;abbreviation\\nE0180;VS145;abbreviation\\nE0181;VS146;abbreviation\\nE0182;VS147;abbreviation\\nE0183;VS148;abbreviation\\nE0184;VS149;abbreviation\\nE0185;VS150;abbreviation\\nE0186;VS151;abbreviation\\nE0187;VS152;abbreviation\\nE0188;VS153;abbreviation\\nE0189;VS154;abbreviation\\nE018A;VS155;abbreviation\\nE018B;VS156;abbreviation\\nE018C;VS157;abbreviation\\nE018D;VS158;abbreviation\\nE018E;VS159;abbreviation\\nE018F;VS160;abbreviation\\nE0190;VS161;abbreviation\\nE0191;VS162;abbreviation\\nE0192;VS163;abbreviation\\nE0193;VS164;abbreviation\\nE0194;VS165;abbreviation\\nE0195;VS166;abbreviation\\nE0196;VS167;abbreviation\\nE0197;VS168;abbreviation\\nE0198;VS169;abbreviation\\nE0199;VS170;abbreviation\\nE019A;VS171;abbreviation\\nE019B;VS172;abbreviation\\nE019C;VS173;abbreviation\\nE019D;VS174;abbreviation\\nE019E;VS175;abbreviation\\nE019F;VS176;abbreviation\\nE01A0;VS177;abbreviation\\nE01A1;VS178;abbreviation\\nE01A2;VS179;abbreviation\\nE01A3;VS180;abbreviation\\nE01A4;VS181;abbreviation\\nE01A5;VS182;abbreviation\\nE01A6;VS183;abbreviation\\nE01A7;VS184;abbreviation\\nE01A8;VS185;abbreviation\\nE01A9;VS186;abbreviation\\nE01AA;VS187;abbreviation\\nE01AB;VS188;abbreviation\\nE01AC;VS189;abbreviation\\nE01AD;VS190;abbreviation\\nE01AE;VS191;abbreviation\\nE01AF;VS192;abbreviation\\nE01B0;VS193;abbreviation\\nE01B1;VS194;abbreviation\\nE01B2;VS195;abbreviation\\nE01B3;VS196;abbreviation\\nE01B4;VS197;abbreviation\\nE01B5;VS198;abbreviation\\nE01B6;VS199;abbreviation\\nE01B7;VS200;abbreviation\\nE01B8;VS201;abbreviation\\nE01B9;VS202;abbreviation\\nE01BA;VS203;abbreviation\\nE01BB;VS204;abbreviation\\nE01BC;VS205;abbreviation\\nE01BD;VS206;abbreviation\\nE01BE;VS207;abbreviation\\nE01BF;VS208;abbreviation\\nE01C0;VS209;abbreviation\\nE01C1;VS210;abbreviation\\nE01C2;VS211;abbreviation\\nE01C3;VS212;abbreviation\\nE01C4;VS213;abbreviation\\nE01C5;VS214;abbreviation\\nE01C6;VS215;abbreviation\\nE01C7;VS216;abbreviation\\nE01C8;VS217;abbreviation\\nE01C9;VS218;abbreviation\\nE01CA;VS219;abbreviation\\nE01CB;VS220;abbreviation\\nE01CC;VS221;abbreviation\\nE01CD;VS222;abbreviation\\nE01CE;VS223;abbreviation\\nE01CF;VS224;abbreviation\\nE01D0;VS225;abbreviation\\nE01D1;VS226;abbreviation\\nE01D2;VS227;abbreviation\\nE01D3;VS228;abbreviation\\nE01D4;VS229;abbreviation\\nE01D5;VS230;abbreviation\\nE01D6;VS231;abbreviation\\nE01D7;VS232;abbreviation\\nE01D8;VS233;abbreviation\\nE01D9;VS234;abbreviation\\nE01DA;VS235;abbreviation\\nE01DB;VS236;abbreviation\\nE01DC;VS237;abbreviation\\nE01DD;VS238;abbreviation\\nE01DE;VS239;abbreviation\\nE01DF;VS240;abbreviation\\nE01E0;VS241;abbreviation\\nE01E1;VS242;abbreviation\\nE01E2;VS243;abbreviation\\nE01E3;VS244;abbreviation\\nE01E4;VS245;abbreviation\\nE01E5;VS246;abbreviation\\nE01E6;VS247;abbreviation\\nE01E7;VS248;abbreviation\\nE01E8;VS249;abbreviation\\nE01E9;VS250;abbreviation\\nE01EA;VS251;abbreviation\\nE01EB;VS252;abbreviation\\nE01EC;VS253;abbreviation\\nE01ED;VS254;abbreviation\\nE01EE;VS255;abbreviation\\nE01EF;VS256;abbreviation\\n\\n# EOF\\n\";\n ALIAS_MAP = (function() {\n var ρσ_anonfunc = function () {\n var ans, line, parts, code_point;\n ans = {};\n var ρσ_Iter10 = ρσ_Iterable(DB.split(\"\\n\"));\n for (var ρσ_Index10 = 0; ρσ_Index10 < ρσ_Iter10.length; ρσ_Index10++) {\n line = ρσ_Iter10[ρσ_Index10];\n line = line.trim();\n if (!line || line[0] === \"#\") {\n continue;\n }\n parts = line.split(\";\");\n if (parts.length >= 2) {\n code_point = parseInt(parts[0], 16);\n if (code_point !== undefined && parts[1]) {\n ans[ρσ_bound_index(parts[1].toLowerCase(), ans)] = code_point;\n }\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"unicode_aliases\"}\n });\n return ρσ_anonfunc;\n })()();\n ρσ_modules.unicode_aliases.DB = DB;\n ρσ_modules.unicode_aliases.ALIAS_MAP = ALIAS_MAP;\n })();\n\n (function(){\n var __name__ = \"ast\";\n var noop = ρσ_modules.utils.noop;\n\n function is_node_type(node, typ) {\n return node instanceof typ;\n };\n if (!is_node_type.__argnames__) Object.defineProperties(is_node_type, {\n __argnames__ : {value: [\"node\", \"typ\"]},\n __module__ : {value: \"ast\"}\n });\n\n function AST() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST.prototype.__init__.apply(this, arguments);\n }\n AST.prototype.__init__ = function __init__(initializer) {\n var self = this;\n var obj;\n if (initializer) {\n obj = self;\n while (true) {\n obj = Object.getPrototypeOf(obj);\n if (obj === null) {\n break;\n }\n for (var i in obj.properties) {\n self[i] = initializer[i];\n }\n }\n }\n };\n if (!AST.prototype.__init__.__argnames__) Object.defineProperties(AST.prototype.__init__, {\n __argnames__ : {value: [\"initializer\"]},\n __module__ : {value: \"ast\"}\n });\n AST.__argnames__ = AST.prototype.__init__.__argnames__;\n AST.__handles_kwarg_interpolation__ = AST.prototype.__init__.__handles_kwarg_interpolation__;\n AST.prototype.clone = function clone() {\n var self = this;\n return new self.constructor(self);\n };\n if (!AST.prototype.clone.__module__) Object.defineProperties(AST.prototype.clone, {\n __module__ : {value: \"ast\"}\n });\n AST.prototype.__repr__ = function __repr__ () {\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST.prototype.__str__ = function __str__ () {\n return this.__repr__();\n };\n Object.defineProperty(AST.prototype, \"__bases__\", {value: []});\n AST.prototype.properties = Object.create(null);\n\n function AST_Token() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Token.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Token, AST);\n AST_Token.prototype.__init__ = function __init__ () {\n AST.prototype.__init__ && AST.prototype.__init__.apply(this, arguments);\n };\n AST_Token.prototype.__repr__ = function __repr__ () {\n if(AST.prototype.__repr__) return AST.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Token.prototype.__str__ = function __str__ () {\n if(AST.prototype.__str__) return AST.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Token.prototype, \"__bases__\", {value: [AST]});\n AST_Token.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"type\"] = \"The type of the token\";\n ρσ_d[\"value\"] = \"The value of the token\";\n ρσ_d[\"line\"] = \"The line number at which the token occurs\";\n ρσ_d[\"col\"] = \"The column number at which the token occurs\";\n ρσ_d[\"pos\"] = \"\";\n ρσ_d[\"endpos\"] = \"\";\n ρσ_d[\"nlb\"] = \"True iff there was a newline before this token\";\n ρσ_d[\"comments_before\"] = \"True iff there were comments before this token\";\n ρσ_d[\"file\"] = \"The filename in which this token occurs\";\n ρσ_d[\"leading_whitespace\"] = \"The leading whitespace for the line on which this token occurs\";\n return ρσ_d;\n }).call(this);\n\n function AST_Node() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Node.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Node, AST);\n AST_Node.prototype.__init__ = function __init__ () {\n AST.prototype.__init__ && AST.prototype.__init__.apply(this, arguments);\n };\n AST_Node.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self);\n };\n if (!AST_Node.prototype._walk.__argnames__) Object.defineProperties(AST_Node.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Node.prototype.walk = function walk(visitor) {\n var self = this;\n return self._walk(visitor);\n };\n if (!AST_Node.prototype.walk.__argnames__) Object.defineProperties(AST_Node.prototype.walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Node.prototype._dump = function _dump() {\n var self = this;\n var depth = (arguments[0] === undefined || ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? _dump.__defaults__.depth : arguments[0];\n var omit = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? _dump.__defaults__.omit : arguments[1];\n var offset = (arguments[2] === undefined || ( 2 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? _dump.__defaults__.offset : arguments[2];\n var include_name = (arguments[3] === undefined || ( 3 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? _dump.__defaults__.include_name : arguments[3];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"depth\")){\n depth = ρσ_kwargs_obj.depth;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"omit\")){\n omit = ρσ_kwargs_obj.omit;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"offset\")){\n offset = ρσ_kwargs_obj.offset;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"include_name\")){\n include_name = ρσ_kwargs_obj.include_name;\n }\n var p, reset, yellow, blue, green, red, magenta, pad, element, tname, property, key;\n p = console.log;\n reset = \"\\u001b[0m\";\n yellow = \"\\u001b[33m\";\n blue = \"\\u001b[34m\";\n green = \"\\u001b[32m\";\n red = \"\\u001b[31m\";\n magenta = \"\\u001b[35m\";\n pad = new Array(offset + 1).join(\" \");\n if (include_name) {\n p(pad + yellow + self.constructor.name.slice(4) + reset);\n }\n var ρσ_Iter11 = ρσ_Iterable(self);\n for (var ρσ_Index11 = 0; ρσ_Index11 < ρσ_Iter11.length; ρσ_Index11++) {\n key = ρσ_Iter11[ρσ_Index11];\n if (ρσ_in(key, omit)) {\n continue;\n }\n if (Array.isArray(self[(typeof key === \"number\" && key < 0) ? self.length + key : key])) {\n if (self[(typeof key === \"number\" && key < 0) ? self.length + key : key].length) {\n p(pad + \" \" + blue + key + \": \" + reset + \"[\");\n if (depth > 1) {\n var ρσ_Iter12 = ρσ_Iterable(self[(typeof key === \"number\" && key < 0) ? self.length + key : key]);\n for (var ρσ_Index12 = 0; ρσ_Index12 < ρσ_Iter12.length; ρσ_Index12++) {\n element = ρσ_Iter12[ρσ_Index12];\n element._dump(depth - 1, omit, offset + 1, true);\n }\n } else {\n var ρσ_Iter13 = ρσ_Iterable(self[(typeof key === \"number\" && key < 0) ? self.length + key : key]);\n for (var ρσ_Index13 = 0; ρσ_Index13 < ρσ_Iter13.length; ρσ_Index13++) {\n element = ρσ_Iter13[ρσ_Index13];\n p(pad + \" \" + yellow + element.constructor.name.slice(4) + reset);\n }\n }\n p(pad + \" ]\");\n } else {\n p(pad + \" \" + blue + key + \": \" + reset + \"[]\");\n }\n } else if (self[(typeof key === \"number\" && key < 0) ? self.length + key : key]) {\n if (is_node_type(self[(typeof key === \"number\" && key < 0) ? self.length + key : key], AST)) {\n tname = self[(typeof key === \"number\" && key < 0) ? self.length + key : key].constructor.name.slice(4);\n if (tname === \"Token\") {\n p(pad + \" \" + blue + key + \": \" + magenta + tname + reset);\n var ρσ_Iter14 = ρσ_Iterable(self[(typeof key === \"number\" && key < 0) ? self.length + key : key]);\n for (var ρσ_Index14 = 0; ρσ_Index14 < ρσ_Iter14.length; ρσ_Index14++) {\n property = ρσ_Iter14[ρσ_Index14];\n p(pad + \" \" + blue + property + \": \" + reset + (ρσ_expr_temp = self[(typeof key === \"number\" && key < 0) ? self.length + key : key])[(typeof property === \"number\" && property < 0) ? ρσ_expr_temp.length + property : property]);\n }\n } else {\n p(pad + \" \" + blue + key + \": \" + yellow + tname + reset);\n if (depth > 1) {\n self[(typeof key === \"number\" && key < 0) ? self.length + key : key]._dump(depth - 1, omit, offset + 1, false);\n }\n }\n } else if (typeof self[(typeof key === \"number\" && key < 0) ? self.length + key : key] === \"string\") {\n p(pad + \" \" + blue + key + \": \" + green + \"\\\"\" + self[(typeof key === \"number\" && key < 0) ? self.length + key : key] + \"\\\"\" + reset);\n } else if (typeof self[(typeof key === \"number\" && key < 0) ? self.length + key : key] === \"number\") {\n p(pad + \" \" + blue + key + \": \" + green + self[(typeof key === \"number\" && key < 0) ? self.length + key : key] + reset);\n } else {\n p(pad + \" \" + blue + key + \": \" + red + self[(typeof key === \"number\" && key < 0) ? self.length + key : key] + reset);\n }\n } else {\n p(pad + \" \" + blue + key + \": \" + reset + self[(typeof key === \"number\" && key < 0) ? self.length + key : key]);\n }\n }\n };\n if (!AST_Node.prototype._dump.__defaults__) Object.defineProperties(AST_Node.prototype._dump, {\n __defaults__ : {value: {depth:100, omit:(function(){\n var s = ρσ_set();\n s.jsset.add(\"start\");\n s.jsset.add(\"end\");\n return s;\n })(), offset:0, include_name:true}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"depth\", \"omit\", \"offset\", \"include_name\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Node.prototype.dump = function dump() {\n var self = this;\n var depth = (arguments[0] === undefined || ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? dump.__defaults__.depth : arguments[0];\n var omit = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? dump.__defaults__.omit : arguments[1];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"depth\")){\n depth = ρσ_kwargs_obj.depth;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"omit\")){\n omit = ρσ_kwargs_obj.omit;\n }\n return self._dump(depth, omit, 0, true);\n };\n if (!AST_Node.prototype.dump.__defaults__) Object.defineProperties(AST_Node.prototype.dump, {\n __defaults__ : {value: {depth:2, omit:Object.create(null)}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"depth\", \"omit\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Node.prototype.__repr__ = function __repr__ () {\n if(AST.prototype.__repr__) return AST.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Node.prototype.__str__ = function __str__ () {\n if(AST.prototype.__str__) return AST.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Node.prototype, \"__bases__\", {value: [AST]});\n AST_Node.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = \"[AST_Token] The first token of this node\";\n ρσ_d[\"end\"] = \"[AST_Token] The last token of this node\";\n return ρσ_d;\n }).call(this);\n\n function AST_Statement() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Statement.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Statement, AST_Node);\n AST_Statement.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Statement.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Statement.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Statement.prototype, \"__bases__\", {value: [AST_Node]});\n\n function AST_Debugger() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Debugger.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Debugger, AST_Statement);\n AST_Debugger.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Debugger.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Debugger.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Debugger.prototype, \"__bases__\", {value: [AST_Statement]});\n\n function AST_Directive() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Directive.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Directive, AST_Statement);\n AST_Directive.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Directive.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Directive.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Directive.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_Directive.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = \"[string] The value of this directive as a plain string (it's not an AST_String!)\";\n ρσ_d[\"scope\"] = \"[AST_Scope/S] The scope that this directive affects\";\n return ρσ_d;\n }).call(this);\n\n function AST_SimpleStatement() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SimpleStatement.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SimpleStatement, AST_Statement);\n AST_SimpleStatement.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_SimpleStatement.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.body._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_SimpleStatement.prototype._walk.__argnames__) Object.defineProperties(AST_SimpleStatement.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_SimpleStatement.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SimpleStatement.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SimpleStatement.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_SimpleStatement.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"body\"] = \"[AST_Node] an expression node (should not be instanceof AST_Statement)\";\n return ρσ_d;\n }).call(this);\n\n function AST_Assert() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Assert.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Assert, AST_Statement);\n AST_Assert.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Assert.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.condition._walk(visitor);\n if (self.message) {\n self.message._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Assert.prototype._walk.__argnames__) Object.defineProperties(AST_Assert.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Assert.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Assert.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Assert.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_Assert.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = \"[AST_Node] the expression that should be tested\";\n ρσ_d[\"message\"] = \"[AST_Node*] the expression that is the error message or None\";\n return ρσ_d;\n }).call(this);\n\n function walk_body(node, visitor) {\n var stat;\n if (is_node_type(node.body, AST_Statement)) {\n node.body._walk(visitor);\n } else if (node.body) {\n var ρσ_Iter15 = ρσ_Iterable(node.body);\n for (var ρσ_Index15 = 0; ρσ_Index15 < ρσ_Iter15.length; ρσ_Index15++) {\n stat = ρσ_Iter15[ρσ_Index15];\n stat._walk(visitor);\n }\n }\n };\n if (!walk_body.__argnames__) Object.defineProperties(walk_body, {\n __argnames__ : {value: [\"node\", \"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n\n function AST_Block() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Block.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Block, AST_Statement);\n AST_Block.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Block.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n walk_body(self, visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Block.prototype._walk.__argnames__) Object.defineProperties(AST_Block.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Block.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Block.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Block.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_Block.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"body\"] = \"[AST_Statement*] an array of statements\";\n return ρσ_d;\n }).call(this);\n\n function AST_BlockStatement() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_BlockStatement.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_BlockStatement, AST_Block);\n AST_BlockStatement.prototype.__init__ = function __init__ () {\n AST_Block.prototype.__init__ && AST_Block.prototype.__init__.apply(this, arguments);\n };\n AST_BlockStatement.prototype.__repr__ = function __repr__ () {\n if(AST_Block.prototype.__repr__) return AST_Block.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_BlockStatement.prototype.__str__ = function __str__ () {\n if(AST_Block.prototype.__str__) return AST_Block.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_BlockStatement.prototype, \"__bases__\", {value: [AST_Block]});\n\n function AST_EmptyStatement() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_EmptyStatement.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_EmptyStatement, AST_Statement);\n AST_EmptyStatement.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_EmptyStatement.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self);\n };\n if (!AST_EmptyStatement.prototype._walk.__argnames__) Object.defineProperties(AST_EmptyStatement.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_EmptyStatement.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_EmptyStatement.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_EmptyStatement.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_EmptyStatement.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"stype\"] = \"[string] the type of empty statement. Is ; for semicolons\";\n return ρσ_d;\n }).call(this);\n\n function AST_StatementWithBody() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_StatementWithBody.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_StatementWithBody, AST_Statement);\n AST_StatementWithBody.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_StatementWithBody.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.body._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_StatementWithBody.prototype._walk.__argnames__) Object.defineProperties(AST_StatementWithBody.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_StatementWithBody.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_StatementWithBody.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_StatementWithBody.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_StatementWithBody.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"body\"] = \"[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement\";\n return ρσ_d;\n }).call(this);\n\n function AST_DWLoop() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_DWLoop.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_DWLoop, AST_StatementWithBody);\n AST_DWLoop.prototype.__init__ = function __init__ () {\n AST_StatementWithBody.prototype.__init__ && AST_StatementWithBody.prototype.__init__.apply(this, arguments);\n };\n AST_DWLoop.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.condition._walk(visitor);\n self.body._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_DWLoop.prototype._walk.__argnames__) Object.defineProperties(AST_DWLoop.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_DWLoop.prototype.__repr__ = function __repr__ () {\n if(AST_StatementWithBody.prototype.__repr__) return AST_StatementWithBody.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_DWLoop.prototype.__str__ = function __str__ () {\n if(AST_StatementWithBody.prototype.__str__) return AST_StatementWithBody.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_DWLoop.prototype, \"__bases__\", {value: [AST_StatementWithBody]});\n AST_DWLoop.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = \"[AST_Node] the loop condition. Should not be instanceof AST_Statement\";\n return ρσ_d;\n }).call(this);\n\n function AST_Do() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Do.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Do, AST_DWLoop);\n AST_Do.prototype.__init__ = function __init__ () {\n AST_DWLoop.prototype.__init__ && AST_DWLoop.prototype.__init__.apply(this, arguments);\n };\n AST_Do.prototype.__repr__ = function __repr__ () {\n if(AST_DWLoop.prototype.__repr__) return AST_DWLoop.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Do.prototype.__str__ = function __str__ () {\n if(AST_DWLoop.prototype.__str__) return AST_DWLoop.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Do.prototype, \"__bases__\", {value: [AST_DWLoop]});\n\n function AST_While() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_While.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_While, AST_DWLoop);\n AST_While.prototype.__init__ = function __init__ () {\n AST_DWLoop.prototype.__init__ && AST_DWLoop.prototype.__init__.apply(this, arguments);\n };\n AST_While.prototype.__repr__ = function __repr__ () {\n if(AST_DWLoop.prototype.__repr__) return AST_DWLoop.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_While.prototype.__str__ = function __str__ () {\n if(AST_DWLoop.prototype.__str__) return AST_DWLoop.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_While.prototype, \"__bases__\", {value: [AST_DWLoop]});\n\n function AST_ForIn() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ForIn.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ForIn, AST_StatementWithBody);\n AST_ForIn.prototype.__init__ = function __init__ () {\n AST_StatementWithBody.prototype.__init__ && AST_StatementWithBody.prototype.__init__.apply(this, arguments);\n };\n AST_ForIn.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.init._walk(visitor);\n if (self.name) self.name._walk(visitor);\n self.object._walk(visitor);\n if (self.body) {\n self.body._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_ForIn.prototype._walk.__argnames__) Object.defineProperties(AST_ForIn.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_ForIn.prototype.__repr__ = function __repr__ () {\n if(AST_StatementWithBody.prototype.__repr__) return AST_StatementWithBody.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ForIn.prototype.__str__ = function __str__ () {\n if(AST_StatementWithBody.prototype.__str__) return AST_StatementWithBody.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ForIn.prototype, \"__bases__\", {value: [AST_StatementWithBody]});\n AST_ForIn.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"init\"] = \"[AST_Node] the `for/in` initialization code\";\n ρσ_d[\"name\"] = \"[AST_SymbolRef?] the loop variable, only if `init` is AST_Var\";\n ρσ_d[\"object\"] = \"[AST_Node] the object that we're looping through\";\n return ρσ_d;\n }).call(this);\n\n function AST_ForJS() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ForJS.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ForJS, AST_StatementWithBody);\n AST_ForJS.prototype.__init__ = function __init__ () {\n AST_StatementWithBody.prototype.__init__ && AST_StatementWithBody.prototype.__init__.apply(this, arguments);\n };\n AST_ForJS.prototype.__repr__ = function __repr__ () {\n if(AST_StatementWithBody.prototype.__repr__) return AST_StatementWithBody.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ForJS.prototype.__str__ = function __str__ () {\n if(AST_StatementWithBody.prototype.__str__) return AST_StatementWithBody.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ForJS.prototype, \"__bases__\", {value: [AST_StatementWithBody]});\n AST_ForJS.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = \"[AST_Verbatim] raw JavaScript conditional\";\n return ρσ_d;\n }).call(this);\n\n function AST_ListComprehension() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ListComprehension.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ListComprehension, AST_ForIn);\n AST_ListComprehension.prototype.__init__ = function __init__ () {\n AST_ForIn.prototype.__init__ && AST_ForIn.prototype.__init__.apply(this, arguments);\n };\n AST_ListComprehension.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.init._walk(visitor);\n self.object._walk(visitor);\n self.statement._walk(visitor);\n if (self.condition) self.condition._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_ListComprehension.prototype._walk.__argnames__) Object.defineProperties(AST_ListComprehension.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_ListComprehension.prototype.__repr__ = function __repr__ () {\n if(AST_ForIn.prototype.__repr__) return AST_ForIn.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ListComprehension.prototype.__str__ = function __str__ () {\n if(AST_ForIn.prototype.__str__) return AST_ForIn.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ListComprehension.prototype, \"__bases__\", {value: [AST_ForIn]});\n AST_ListComprehension.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = \"[AST_Node] the `if` condition\";\n ρσ_d[\"statement\"] = \"[AST_Node] statement to perform on each element before returning it\";\n return ρσ_d;\n }).call(this);\n\n function AST_SetComprehension() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SetComprehension.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SetComprehension, AST_ListComprehension);\n AST_SetComprehension.prototype.__init__ = function __init__ () {\n AST_ListComprehension.prototype.__init__ && AST_ListComprehension.prototype.__init__.apply(this, arguments);\n };\n AST_SetComprehension.prototype.__repr__ = function __repr__ () {\n if(AST_ListComprehension.prototype.__repr__) return AST_ListComprehension.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SetComprehension.prototype.__str__ = function __str__ () {\n if(AST_ListComprehension.prototype.__str__) return AST_ListComprehension.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SetComprehension.prototype, \"__bases__\", {value: [AST_ListComprehension]});\n\n function AST_DictComprehension() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_DictComprehension.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_DictComprehension, AST_ListComprehension);\n AST_DictComprehension.prototype.__init__ = function __init__ () {\n AST_ListComprehension.prototype.__init__ && AST_ListComprehension.prototype.__init__.apply(this, arguments);\n };\n AST_DictComprehension.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.init._walk(visitor);\n self.object._walk(visitor);\n self.statement._walk(visitor);\n self.value_statement._walk(visitor);\n if (self.condition) self.condition._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_DictComprehension.prototype._walk.__argnames__) Object.defineProperties(AST_DictComprehension.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_DictComprehension.prototype.__repr__ = function __repr__ () {\n if(AST_ListComprehension.prototype.__repr__) return AST_ListComprehension.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_DictComprehension.prototype.__str__ = function __str__ () {\n if(AST_ListComprehension.prototype.__str__) return AST_ListComprehension.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_DictComprehension.prototype, \"__bases__\", {value: [AST_ListComprehension]});\n AST_DictComprehension.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value_statement\"] = \"[AST_Node] statement to perform on each value before returning it\";\n ρσ_d[\"is_pydict\"] = \"[bool] True if this comprehension is for a python dict\";\n ρσ_d[\"is_jshash\"] = \"[bool] True if this comprehension is for a js hash\";\n return ρσ_d;\n }).call(this);\n\n function AST_GeneratorComprehension() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_GeneratorComprehension.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_GeneratorComprehension, AST_ListComprehension);\n AST_GeneratorComprehension.prototype.__init__ = function __init__ () {\n AST_ListComprehension.prototype.__init__ && AST_ListComprehension.prototype.__init__.apply(this, arguments);\n };\n AST_GeneratorComprehension.prototype.__repr__ = function __repr__ () {\n if(AST_ListComprehension.prototype.__repr__) return AST_ListComprehension.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_GeneratorComprehension.prototype.__str__ = function __str__ () {\n if(AST_ListComprehension.prototype.__str__) return AST_ListComprehension.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_GeneratorComprehension.prototype, \"__bases__\", {value: [AST_ListComprehension]});\n\n function AST_With() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_With.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_With, AST_StatementWithBody);\n AST_With.prototype.__init__ = function __init__ () {\n AST_StatementWithBody.prototype.__init__ && AST_StatementWithBody.prototype.__init__.apply(this, arguments);\n };\n AST_With.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var exp;\n var ρσ_Iter16 = ρσ_Iterable(self.clauses);\n for (var ρσ_Index16 = 0; ρσ_Index16 < ρσ_Iter16.length; ρσ_Index16++) {\n exp = ρσ_Iter16[ρσ_Index16];\n exp._walk(visitor);\n }\n self.body._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_With.prototype._walk.__argnames__) Object.defineProperties(AST_With.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_With.prototype.__repr__ = function __repr__ () {\n if(AST_StatementWithBody.prototype.__repr__) return AST_StatementWithBody.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_With.prototype.__str__ = function __str__ () {\n if(AST_StatementWithBody.prototype.__str__) return AST_StatementWithBody.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_With.prototype, \"__bases__\", {value: [AST_StatementWithBody]});\n AST_With.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"clauses\"] = \"[AST_WithClause*] the `with` clauses (comma separated)\";\n return ρσ_d;\n }).call(this);\n\n function AST_WithClause() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_WithClause.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_WithClause, AST_Node);\n AST_WithClause.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_WithClause.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.expression._walk(visitor);\n if (self.alias) {\n self.alias._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_WithClause.prototype._walk.__argnames__) Object.defineProperties(AST_WithClause.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_WithClause.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_WithClause.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_WithClause.prototype, \"__bases__\", {value: [AST_Node]});\n AST_WithClause.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = \"[AST_Node] the expression\";\n ρσ_d[\"alias\"] = \"[AST_SymbolAlias?] optional alias for this expression\";\n return ρσ_d;\n }).call(this);\n\n function AST_Scope() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Scope.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Scope, AST_Block);\n AST_Scope.prototype.__init__ = function __init__ () {\n AST_Block.prototype.__init__ && AST_Block.prototype.__init__.apply(this, arguments);\n };\n AST_Scope.prototype.__repr__ = function __repr__ () {\n if(AST_Block.prototype.__repr__) return AST_Block.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Scope.prototype.__str__ = function __str__ () {\n if(AST_Block.prototype.__str__) return AST_Block.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Scope.prototype, \"__bases__\", {value: [AST_Block]});\n AST_Scope.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"localvars\"] = \"[SymbolDef*] list of variables local to this scope\";\n ρσ_d[\"docstrings\"] = \"[AST_String*] list of docstrings for this scope\";\n return ρσ_d;\n }).call(this);\n\n function AST_Toplevel() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Toplevel.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Toplevel, AST_Scope);\n AST_Toplevel.prototype.__init__ = function __init__ () {\n AST_Scope.prototype.__init__ && AST_Scope.prototype.__init__.apply(this, arguments);\n };\n AST_Toplevel.prototype.__repr__ = function __repr__ () {\n if(AST_Scope.prototype.__repr__) return AST_Scope.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Toplevel.prototype.__str__ = function __str__ () {\n if(AST_Scope.prototype.__str__) return AST_Scope.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Toplevel.prototype, \"__bases__\", {value: [AST_Scope]});\n AST_Toplevel.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"globals\"] = \"[Object/S] a map of name -> SymbolDef for all undeclared names\";\n ρσ_d[\"baselib\"] = \"[Object/s] a collection of used parts of baselib\";\n ρσ_d[\"imports\"] = \"[Object/S] a map of module_id->AST_Toplevel for all imported modules (this represents all imported modules across all source files)\";\n ρσ_d[\"imported_module_ids\"] = \"[string*] a list of module ids that were imported by this module, specifically\";\n ρσ_d[\"nonlocalvars\"] = \"[String*] a list of all non-local variable names (names that come from the global scope)\";\n ρσ_d[\"shebang\"] = \"[string] If #! line is present, it will be stored here\";\n ρσ_d[\"import_order\"] = \"[number] The global order in which this scope was imported\";\n ρσ_d[\"module_id\"] = \"[string] The id of this module\";\n ρσ_d[\"exports\"] = \"[SymbolDef*] list of names exported from this module\";\n ρσ_d[\"classes\"] = \"[Object/S] a map of class names to AST_Class for classes defined in this module\";\n ρσ_d[\"filename\"] = \"[string] The absolute path to the file from which this module was read\";\n ρσ_d[\"srchash\"] = \"[string] SHA1 hash of source code, used for caching\";\n ρσ_d[\"comments_after\"] = \"[array] True iff there were comments before this token\";\n return ρσ_d;\n }).call(this);\n\n function AST_Import() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Import.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Import, AST_Statement);\n AST_Import.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Import.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var arg;\n if (self.alias) {\n self.alias._walk(visitor);\n }\n if (self.argnames) {\n var ρσ_Iter17 = ρσ_Iterable(self.argnames);\n for (var ρσ_Index17 = 0; ρσ_Index17 < ρσ_Iter17.length; ρσ_Index17++) {\n arg = ρσ_Iter17[ρσ_Index17];\n arg._walk(visitor);\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Import.prototype._walk.__argnames__) Object.defineProperties(AST_Import.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Import.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Import.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Import.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_Import.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"module\"] = \"[AST_SymbolVar] name of the module we're importing\";\n ρσ_d[\"key\"] = \"[string] The key by which this module is stored in the global modules mapping\";\n ρσ_d[\"alias\"] = \"[AST_SymbolAlias] The name this module is imported as, can be None. For import x as y statements.\";\n ρσ_d[\"argnames\"] = \"[AST_ImportedVar*] names of objects to be imported\";\n ρσ_d[\"body\"] = \"[AST_TopLevel] parsed contents of the imported file\";\n return ρσ_d;\n }).call(this);\n\n function AST_Imports() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Imports.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Imports, AST_Statement);\n AST_Imports.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Imports.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var imp;\n var ρσ_Iter18 = ρσ_Iterable(self.imports);\n for (var ρσ_Index18 = 0; ρσ_Index18 < ρσ_Iter18.length; ρσ_Index18++) {\n imp = ρσ_Iter18[ρσ_Index18];\n imp._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Imports.prototype._walk.__argnames__) Object.defineProperties(AST_Imports.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Imports.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Imports.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Imports.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_Imports.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"imports\"] = \"[AST_Import+] array of imports\";\n return ρσ_d;\n }).call(this);\n\n function AST_Decorator() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Decorator.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Decorator, AST_Node);\n AST_Decorator.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Decorator.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n if (self.expression) {\n self.expression.walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Decorator.prototype._walk.__argnames__) Object.defineProperties(AST_Decorator.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Decorator.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Decorator.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Decorator.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Decorator.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = \"[AST_Node] the decorator expression\";\n return ρσ_d;\n }).call(this);\n\n function AST_Lambda() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Lambda.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Lambda, AST_Scope);\n AST_Lambda.prototype.__init__ = function __init__ () {\n AST_Scope.prototype.__init__ && AST_Scope.prototype.__init__.apply(this, arguments);\n };\n AST_Lambda.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var d, arg;\n if (self.decorators) {\n var ρσ_Iter19 = ρσ_Iterable(self.decorators);\n for (var ρσ_Index19 = 0; ρσ_Index19 < ρσ_Iter19.length; ρσ_Index19++) {\n d = ρσ_Iter19[ρσ_Index19];\n d.walk(visitor);\n }\n }\n if (self.name) {\n self.name._walk(visitor);\n }\n var ρσ_Iter20 = ρσ_Iterable(self.argnames);\n for (var ρσ_Index20 = 0; ρσ_Index20 < ρσ_Iter20.length; ρσ_Index20++) {\n arg = ρσ_Iter20[ρσ_Index20];\n arg._walk(visitor);\n }\n if (self.argnames.starargs) {\n self.argnames.starargs._walk(visitor);\n }\n if (self.argnames.kwargs) {\n self.argnames.kwargs._walk(visitor);\n }\n walk_body(self, visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Lambda.prototype._walk.__argnames__) Object.defineProperties(AST_Lambda.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Lambda.prototype.__repr__ = function __repr__ () {\n if(AST_Scope.prototype.__repr__) return AST_Scope.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Lambda.prototype.__str__ = function __str__ () {\n if(AST_Scope.prototype.__str__) return AST_Scope.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Lambda.prototype, \"__bases__\", {value: [AST_Scope]});\n AST_Lambda.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"[AST_SymbolDeclaration?] the name of this function\";\n ρσ_d[\"argnames\"] = \"[AST_SymbolFunarg*] array of function arguments\";\n ρσ_d[\"decorators\"] = \"[AST_Decorator*] function decorators, if any\";\n ρσ_d[\"is_generator\"] = \"[bool*] True iff this function is a generator\";\n ρσ_d[\"is_expression\"] = \"[bool*] True iff this function is a function expression\";\n ρσ_d[\"is_anonymous\"] = \"[bool*] True iff this function is an anonymous function\";\n ρσ_d[\"return_annotation\"] = \"[AST_Node?] The return type annotation provided (if any)\";\n return ρσ_d;\n }).call(this);\n\n function AST_Function() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Function.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Function, AST_Lambda);\n AST_Function.prototype.__init__ = function __init__ () {\n AST_Lambda.prototype.__init__ && AST_Lambda.prototype.__init__.apply(this, arguments);\n };\n AST_Function.prototype.__repr__ = function __repr__ () {\n if(AST_Lambda.prototype.__repr__) return AST_Lambda.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Function.prototype.__str__ = function __str__ () {\n if(AST_Lambda.prototype.__str__) return AST_Lambda.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Function.prototype, \"__bases__\", {value: [AST_Lambda]});\n\n function AST_Class() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Class.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Class, AST_Scope);\n AST_Class.prototype.__init__ = function __init__ () {\n AST_Scope.prototype.__init__ && AST_Scope.prototype.__init__.apply(this, arguments);\n };\n AST_Class.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var d;\n if (self.decorators) {\n var ρσ_Iter21 = ρσ_Iterable(self.decorators);\n for (var ρσ_Index21 = 0; ρσ_Index21 < ρσ_Iter21.length; ρσ_Index21++) {\n d = ρσ_Iter21[ρσ_Index21];\n d.walk(visitor);\n }\n }\n self.name._walk(visitor);\n walk_body(self, visitor);\n if (self.parent) self.parent._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Class.prototype._walk.__argnames__) Object.defineProperties(AST_Class.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Class.prototype.__repr__ = function __repr__ () {\n if(AST_Scope.prototype.__repr__) return AST_Scope.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Class.prototype.__str__ = function __str__ () {\n if(AST_Scope.prototype.__str__) return AST_Scope.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Class.prototype, \"__bases__\", {value: [AST_Scope]});\n AST_Class.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"[AST_SymbolDeclaration?] the name of this class\";\n ρσ_d[\"init\"] = \"[AST_Function] constructor for the class\";\n ρσ_d[\"parent\"] = \"[AST_Symbol?] parent class this class inherits from\";\n ρσ_d[\"bases\"] = \"[AST_Symbol*] list of base classes this class inherits from\";\n ρσ_d[\"static\"] = \"[dict] A hash whose keys are names of static methods for this class\";\n ρσ_d[\"external\"] = \"[boolean] true if class is declared elsewhere, but will be within current scope at runtime\";\n ρσ_d[\"bound\"] = \"[string*] list of methods that need to be bound to self\";\n ρσ_d[\"decorators\"] = \"[AST_Decorator*] function decorators, if any\";\n ρσ_d[\"module_id\"] = \"[string] The id of the module this class is defined in\";\n ρσ_d[\"statements\"] = \"[AST_Node*] list of statements in the class scope (excluding method definitions)\";\n ρσ_d[\"dynamic_properties\"] = \"[dict] map of dynamic property names to property descriptors of the form {getter:AST_Method, setter:AST_Method\";\n ρσ_d[\"classvars\"] = \"[dict] map containing all class variables as keys, to be used to easily test for existence of a class variable\";\n return ρσ_d;\n }).call(this);\n\n function AST_Method() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Method.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Method, AST_Lambda);\n AST_Method.prototype.__init__ = function __init__ () {\n AST_Lambda.prototype.__init__ && AST_Lambda.prototype.__init__.apply(this, arguments);\n };\n AST_Method.prototype.__repr__ = function __repr__ () {\n if(AST_Lambda.prototype.__repr__) return AST_Lambda.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Method.prototype.__str__ = function __str__ () {\n if(AST_Lambda.prototype.__str__) return AST_Lambda.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Method.prototype, \"__bases__\", {value: [AST_Lambda]});\n AST_Method.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = \"[boolean] true if method is static\";\n ρσ_d[\"is_getter\"] = \"[boolean] true if method is a property getter\";\n ρσ_d[\"is_setter\"] = \"[boolean] true if method is a property setter\";\n return ρσ_d;\n }).call(this);\n\n function AST_Jump() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Jump.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Jump, AST_Statement);\n AST_Jump.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Jump.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Jump.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Jump.prototype, \"__bases__\", {value: [AST_Statement]});\n\n function AST_Exit() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Exit.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Exit, AST_Jump);\n AST_Exit.prototype.__init__ = function __init__ () {\n AST_Jump.prototype.__init__ && AST_Jump.prototype.__init__.apply(this, arguments);\n };\n AST_Exit.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n if (self.value) {\n self.value._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Exit.prototype._walk.__argnames__) Object.defineProperties(AST_Exit.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Exit.prototype.__repr__ = function __repr__ () {\n if(AST_Jump.prototype.__repr__) return AST_Jump.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Exit.prototype.__str__ = function __str__ () {\n if(AST_Jump.prototype.__str__) return AST_Jump.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Exit.prototype, \"__bases__\", {value: [AST_Jump]});\n AST_Exit.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = \"[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return\";\n return ρσ_d;\n }).call(this);\n\n function AST_Return() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Return.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Return, AST_Exit);\n AST_Return.prototype.__init__ = function __init__ () {\n AST_Exit.prototype.__init__ && AST_Exit.prototype.__init__.apply(this, arguments);\n };\n AST_Return.prototype.__repr__ = function __repr__ () {\n if(AST_Exit.prototype.__repr__) return AST_Exit.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Return.prototype.__str__ = function __str__ () {\n if(AST_Exit.prototype.__str__) return AST_Exit.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Return.prototype, \"__bases__\", {value: [AST_Exit]});\n\n function AST_Yield() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Yield.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Yield, AST_Return);\n AST_Yield.prototype.__init__ = function __init__ () {\n AST_Return.prototype.__init__ && AST_Return.prototype.__init__.apply(this, arguments);\n };\n AST_Yield.prototype.__repr__ = function __repr__ () {\n if(AST_Return.prototype.__repr__) return AST_Return.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Yield.prototype.__str__ = function __str__ () {\n if(AST_Return.prototype.__str__) return AST_Return.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Yield.prototype, \"__bases__\", {value: [AST_Return]});\n AST_Yield.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"is_yield_from\"] = \"[bool] True iff this is a yield from, False otherwise\";\n return ρσ_d;\n }).call(this);\n\n function AST_Throw() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Throw.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Throw, AST_Exit);\n AST_Throw.prototype.__init__ = function __init__ () {\n AST_Exit.prototype.__init__ && AST_Exit.prototype.__init__.apply(this, arguments);\n };\n AST_Throw.prototype.__repr__ = function __repr__ () {\n if(AST_Exit.prototype.__repr__) return AST_Exit.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Throw.prototype.__str__ = function __str__ () {\n if(AST_Exit.prototype.__str__) return AST_Exit.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Throw.prototype, \"__bases__\", {value: [AST_Exit]});\n\n function AST_LoopControl() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_LoopControl.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_LoopControl, AST_Jump);\n AST_LoopControl.prototype.__init__ = function __init__ () {\n AST_Jump.prototype.__init__ && AST_Jump.prototype.__init__.apply(this, arguments);\n };\n AST_LoopControl.prototype.__repr__ = function __repr__ () {\n if(AST_Jump.prototype.__repr__) return AST_Jump.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_LoopControl.prototype.__str__ = function __str__ () {\n if(AST_Jump.prototype.__str__) return AST_Jump.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_LoopControl.prototype, \"__bases__\", {value: [AST_Jump]});\n\n function AST_Break() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Break.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Break, AST_LoopControl);\n AST_Break.prototype.__init__ = function __init__ () {\n AST_LoopControl.prototype.__init__ && AST_LoopControl.prototype.__init__.apply(this, arguments);\n };\n AST_Break.prototype.__repr__ = function __repr__ () {\n if(AST_LoopControl.prototype.__repr__) return AST_LoopControl.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Break.prototype.__str__ = function __str__ () {\n if(AST_LoopControl.prototype.__str__) return AST_LoopControl.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Break.prototype, \"__bases__\", {value: [AST_LoopControl]});\n\n function AST_Continue() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Continue.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Continue, AST_LoopControl);\n AST_Continue.prototype.__init__ = function __init__ () {\n AST_LoopControl.prototype.__init__ && AST_LoopControl.prototype.__init__.apply(this, arguments);\n };\n AST_Continue.prototype.__repr__ = function __repr__ () {\n if(AST_LoopControl.prototype.__repr__) return AST_LoopControl.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Continue.prototype.__str__ = function __str__ () {\n if(AST_LoopControl.prototype.__str__) return AST_LoopControl.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Continue.prototype, \"__bases__\", {value: [AST_LoopControl]});\n\n function AST_If() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_If.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_If, AST_StatementWithBody);\n AST_If.prototype.__init__ = function __init__ () {\n AST_StatementWithBody.prototype.__init__ && AST_StatementWithBody.prototype.__init__.apply(this, arguments);\n };\n AST_If.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.condition._walk(visitor);\n self.body._walk(visitor);\n if (self.alternative) {\n self.alternative._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_If.prototype._walk.__argnames__) Object.defineProperties(AST_If.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_If.prototype.__repr__ = function __repr__ () {\n if(AST_StatementWithBody.prototype.__repr__) return AST_StatementWithBody.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_If.prototype.__str__ = function __str__ () {\n if(AST_StatementWithBody.prototype.__str__) return AST_StatementWithBody.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_If.prototype, \"__bases__\", {value: [AST_StatementWithBody]});\n AST_If.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = \"[AST_Node] the `if` condition\";\n ρσ_d[\"alternative\"] = \"[AST_Statement?] the `else` part, or null if not present\";\n return ρσ_d;\n }).call(this);\n\n function AST_Try() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Try.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Try, AST_Block);\n AST_Try.prototype.__init__ = function __init__ () {\n AST_Block.prototype.__init__ && AST_Block.prototype.__init__.apply(this, arguments);\n };\n AST_Try.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n walk_body(self, visitor);\n if (self.bcatch) {\n self.bcatch._walk(visitor);\n }\n if (self.belse) {\n self.belse._walk(visitor);\n }\n if (self.bfinally) {\n self.bfinally._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Try.prototype._walk.__argnames__) Object.defineProperties(AST_Try.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Try.prototype.__repr__ = function __repr__ () {\n if(AST_Block.prototype.__repr__) return AST_Block.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Try.prototype.__str__ = function __str__ () {\n if(AST_Block.prototype.__str__) return AST_Block.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Try.prototype, \"__bases__\", {value: [AST_Block]});\n AST_Try.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"bcatch\"] = \"[AST_Catch?] the catch block, or null if not present\";\n ρσ_d[\"bfinally\"] = \"[AST_Finally?] the finally block, or null if not present\";\n ρσ_d[\"belse\"] = \"[AST_Else?] the else block for null if not present\";\n return ρσ_d;\n }).call(this);\n\n function AST_Catch() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Catch.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Catch, AST_Block);\n AST_Catch.prototype.__init__ = function __init__ () {\n AST_Block.prototype.__init__ && AST_Block.prototype.__init__.apply(this, arguments);\n };\n AST_Catch.prototype.__repr__ = function __repr__ () {\n if(AST_Block.prototype.__repr__) return AST_Block.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Catch.prototype.__str__ = function __str__ () {\n if(AST_Block.prototype.__str__) return AST_Block.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Catch.prototype, \"__bases__\", {value: [AST_Block]});\n\n function AST_Except() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Except.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Except, AST_Block);\n AST_Except.prototype.__init__ = function __init__ () {\n AST_Block.prototype.__init__ && AST_Block.prototype.__init__.apply(this, arguments);\n };\n AST_Except.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(this, (function() {\n var ρσ_anonfunc = function () {\n var e;\n if (self.argname) {\n self.argname.walk(visitor);\n }\n if (self.errors) {\n var ρσ_Iter22 = ρσ_Iterable(self.errors);\n for (var ρσ_Index22 = 0; ρσ_Index22 < ρσ_Iter22.length; ρσ_Index22++) {\n e = ρσ_Iter22[ρσ_Index22];\n e.walk(visitor);\n }\n }\n walk_body(self, visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Except.prototype._walk.__argnames__) Object.defineProperties(AST_Except.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Except.prototype.__repr__ = function __repr__ () {\n if(AST_Block.prototype.__repr__) return AST_Block.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Except.prototype.__str__ = function __str__ () {\n if(AST_Block.prototype.__str__) return AST_Block.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Except.prototype, \"__bases__\", {value: [AST_Block]});\n AST_Except.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"argname\"] = \"[AST_SymbolCatch] symbol for the exception\";\n ρσ_d[\"errors\"] = \"[AST_SymbolVar*] error classes to catch in this block\";\n return ρσ_d;\n }).call(this);\n\n function AST_Finally() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Finally.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Finally, AST_Block);\n AST_Finally.prototype.__init__ = function __init__ () {\n AST_Block.prototype.__init__ && AST_Block.prototype.__init__.apply(this, arguments);\n };\n AST_Finally.prototype.__repr__ = function __repr__ () {\n if(AST_Block.prototype.__repr__) return AST_Block.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Finally.prototype.__str__ = function __str__ () {\n if(AST_Block.prototype.__str__) return AST_Block.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Finally.prototype, \"__bases__\", {value: [AST_Block]});\n\n function AST_Else() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Else.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Else, AST_Block);\n AST_Else.prototype.__init__ = function __init__ () {\n AST_Block.prototype.__init__ && AST_Block.prototype.__init__.apply(this, arguments);\n };\n AST_Else.prototype.__repr__ = function __repr__ () {\n if(AST_Block.prototype.__repr__) return AST_Block.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Else.prototype.__str__ = function __str__ () {\n if(AST_Block.prototype.__str__) return AST_Block.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Else.prototype, \"__bases__\", {value: [AST_Block]});\n\n function AST_Definitions() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Definitions.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Definitions, AST_Statement);\n AST_Definitions.prototype.__init__ = function __init__ () {\n AST_Statement.prototype.__init__ && AST_Statement.prototype.__init__.apply(this, arguments);\n };\n AST_Definitions.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var def_;\n var ρσ_Iter23 = ρσ_Iterable(self.definitions);\n for (var ρσ_Index23 = 0; ρσ_Index23 < ρσ_Iter23.length; ρσ_Index23++) {\n def_ = ρσ_Iter23[ρσ_Index23];\n def_._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Definitions.prototype._walk.__argnames__) Object.defineProperties(AST_Definitions.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Definitions.prototype.__repr__ = function __repr__ () {\n if(AST_Statement.prototype.__repr__) return AST_Statement.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Definitions.prototype.__str__ = function __str__ () {\n if(AST_Statement.prototype.__str__) return AST_Statement.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Definitions.prototype, \"__bases__\", {value: [AST_Statement]});\n AST_Definitions.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"definitions\"] = \"[AST_VarDef*] array of variable definitions\";\n return ρσ_d;\n }).call(this);\n\n function AST_Var() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Var.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Var, AST_Definitions);\n AST_Var.prototype.__init__ = function __init__ () {\n AST_Definitions.prototype.__init__ && AST_Definitions.prototype.__init__.apply(this, arguments);\n };\n AST_Var.prototype.__repr__ = function __repr__ () {\n if(AST_Definitions.prototype.__repr__) return AST_Definitions.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Var.prototype.__str__ = function __str__ () {\n if(AST_Definitions.prototype.__str__) return AST_Definitions.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Var.prototype, \"__bases__\", {value: [AST_Definitions]});\n\n function AST_VarDef() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_VarDef.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_VarDef, AST_Node);\n AST_VarDef.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_VarDef.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.name._walk(visitor);\n if (self.value) {\n self.value._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_VarDef.prototype._walk.__argnames__) Object.defineProperties(AST_VarDef.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_VarDef.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_VarDef.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_VarDef.prototype, \"__bases__\", {value: [AST_Node]});\n AST_VarDef.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"[AST_SymbolVar|AST_SymbolNonlocal] name of the variable\";\n ρσ_d[\"value\"] = \"[AST_Node?] initializer, or null if there's no initializer\";\n return ρσ_d;\n }).call(this);\n\n function AST_BaseCall() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_BaseCall.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_BaseCall, AST_Node);\n AST_BaseCall.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_BaseCall.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_BaseCall.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_BaseCall.prototype, \"__bases__\", {value: [AST_Node]});\n AST_BaseCall.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"args\"] = \"[AST_Node*] array of arguments\";\n return ρσ_d;\n }).call(this);\n\n function AST_Call() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Call.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Call, AST_BaseCall);\n AST_Call.prototype.__init__ = function __init__ () {\n AST_BaseCall.prototype.__init__ && AST_BaseCall.prototype.__init__.apply(this, arguments);\n };\n AST_Call.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var arg;\n self.expression._walk(visitor);\n var ρσ_Iter24 = ρσ_Iterable(self.args);\n for (var ρσ_Index24 = 0; ρσ_Index24 < ρσ_Iter24.length; ρσ_Index24++) {\n arg = ρσ_Iter24[ρσ_Index24];\n arg._walk(visitor);\n }\n if (self.args.kwargs) {\n var ρσ_Iter25 = ρσ_Iterable(self.args.kwargs);\n for (var ρσ_Index25 = 0; ρσ_Index25 < ρσ_Iter25.length; ρσ_Index25++) {\n arg = ρσ_Iter25[ρσ_Index25];\n arg[0]._walk(visitor);\n arg[1]._walk(visitor);\n }\n }\n if (self.args.kwarg_items) {\n var ρσ_Iter26 = ρσ_Iterable(self.args.kwarg_items);\n for (var ρσ_Index26 = 0; ρσ_Index26 < ρσ_Iter26.length; ρσ_Index26++) {\n arg = ρσ_Iter26[ρσ_Index26];\n arg._walk(visitor);\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Call.prototype._walk.__argnames__) Object.defineProperties(AST_Call.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Call.prototype.__repr__ = function __repr__ () {\n if(AST_BaseCall.prototype.__repr__) return AST_BaseCall.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Call.prototype.__str__ = function __str__ () {\n if(AST_BaseCall.prototype.__str__) return AST_BaseCall.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Call.prototype, \"__bases__\", {value: [AST_BaseCall]});\n AST_Call.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = \"[AST_Node] expression to invoke as function\";\n return ρσ_d;\n }).call(this);\n\n function AST_ClassCall() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ClassCall.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ClassCall, AST_BaseCall);\n AST_ClassCall.prototype.__init__ = function __init__ () {\n AST_BaseCall.prototype.__init__ && AST_BaseCall.prototype.__init__.apply(this, arguments);\n };\n AST_ClassCall.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var arg;\n if (self.expression) self.expression._walk(visitor);\n var ρσ_Iter27 = ρσ_Iterable(self.args);\n for (var ρσ_Index27 = 0; ρσ_Index27 < ρσ_Iter27.length; ρσ_Index27++) {\n arg = ρσ_Iter27[ρσ_Index27];\n arg._walk(visitor);\n }\n var ρσ_Iter28 = ρσ_Iterable(self.args.kwargs);\n for (var ρσ_Index28 = 0; ρσ_Index28 < ρσ_Iter28.length; ρσ_Index28++) {\n arg = ρσ_Iter28[ρσ_Index28];\n arg[0]._walk(visitor);\n arg[1]._walk(visitor);\n }\n var ρσ_Iter29 = ρσ_Iterable(self.args.kwarg_items);\n for (var ρσ_Index29 = 0; ρσ_Index29 < ρσ_Iter29.length; ρσ_Index29++) {\n arg = ρσ_Iter29[ρσ_Index29];\n arg._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_ClassCall.prototype._walk.__argnames__) Object.defineProperties(AST_ClassCall.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_ClassCall.prototype.__repr__ = function __repr__ () {\n if(AST_BaseCall.prototype.__repr__) return AST_BaseCall.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ClassCall.prototype.__str__ = function __str__ () {\n if(AST_BaseCall.prototype.__str__) return AST_BaseCall.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ClassCall.prototype, \"__bases__\", {value: [AST_BaseCall]});\n AST_ClassCall.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"class\"] = \"[string] name of the class method belongs to\";\n ρσ_d[\"method\"] = \"[string] class method being called\";\n ρσ_d[\"static\"] = \"[boolean] defines whether the method is static\";\n return ρσ_d;\n }).call(this);\n\n function AST_New() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_New.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_New, AST_Call);\n AST_New.prototype.__init__ = function __init__ () {\n AST_Call.prototype.__init__ && AST_Call.prototype.__init__.apply(this, arguments);\n };\n AST_New.prototype.__repr__ = function __repr__ () {\n if(AST_Call.prototype.__repr__) return AST_Call.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_New.prototype.__str__ = function __str__ () {\n if(AST_Call.prototype.__str__) return AST_Call.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_New.prototype, \"__bases__\", {value: [AST_Call]});\n\n function AST_Seq() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Seq.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Seq, AST_Node);\n AST_Seq.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Seq.prototype.to_array = function to_array() {\n var self = this;\n var p, a;\n p = self;\n a = ρσ_list_decorate([]);\n while (p) {\n a.push(p.car);\n if (p.cdr && !(is_node_type(p.cdr, AST_Seq))) {\n a.push(p.cdr);\n break;\n }\n p = p.cdr;\n }\n return a;\n };\n if (!AST_Seq.prototype.to_array.__module__) Object.defineProperties(AST_Seq.prototype.to_array, {\n __module__ : {value: \"ast\"}\n });\n AST_Seq.prototype.add = function add(node) {\n var self = this;\n var p, cell;\n p = self;\n while (p) {\n if (!(is_node_type(p.cdr, AST_Seq))) {\n cell = AST_Seq.prototype.cons.call(p.cdr, node);\n return p.cdr = cell;\n }\n p = p.cdr;\n }\n };\n if (!AST_Seq.prototype.add.__argnames__) Object.defineProperties(AST_Seq.prototype.add, {\n __argnames__ : {value: [\"node\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Seq.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.car._walk(visitor);\n if (self.cdr) {\n self.cdr._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Seq.prototype._walk.__argnames__) Object.defineProperties(AST_Seq.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Seq.prototype.cons = function cons(x, y) {\n var self = this;\n var seq;\n seq = new AST_Seq(x);\n seq.car = x;\n seq.cdr = y;\n return seq;\n };\n if (!AST_Seq.prototype.cons.__argnames__) Object.defineProperties(AST_Seq.prototype.cons, {\n __argnames__ : {value: [\"x\", \"y\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Seq.prototype.from_array = function from_array(array) {\n var self = this;\n var ans, i, p;\n if (array.length === 0) {\n return null;\n }\n if (array.length === 1) {\n return array[0].clone();\n }\n ans = null;\n for (var ρσ_Index30 = array.length - 1; ρσ_Index30 > -1; ρσ_Index30-=1) {\n i = ρσ_Index30;\n ans = AST_Seq.prototype.cons.call(array[(typeof i === \"number\" && i < 0) ? array.length + i : i], ans);\n }\n p = ans;\n while (p) {\n if (p.cdr && !p.cdr.cdr) {\n p.cdr = p.cdr.car;\n break;\n }\n p = p.cdr;\n }\n return ans;\n };\n if (!AST_Seq.prototype.from_array.__argnames__) Object.defineProperties(AST_Seq.prototype.from_array, {\n __argnames__ : {value: [\"array\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Seq.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Seq.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Seq.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Seq.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"car\"] = \"[AST_Node] first element in sequence\";\n ρσ_d[\"cdr\"] = \"[AST_Node] second element in sequence\";\n return ρσ_d;\n }).call(this);\n\n function AST_PropAccess() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_PropAccess.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_PropAccess, AST_Node);\n AST_PropAccess.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_PropAccess.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_PropAccess.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_PropAccess.prototype, \"__bases__\", {value: [AST_Node]});\n AST_PropAccess.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = \"[AST_Node] the “container” expression\";\n ρσ_d[\"property\"] = \"[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node\";\n return ρσ_d;\n }).call(this);\n\n function AST_Dot() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Dot.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Dot, AST_PropAccess);\n AST_Dot.prototype.__init__ = function __init__ () {\n AST_PropAccess.prototype.__init__ && AST_PropAccess.prototype.__init__.apply(this, arguments);\n };\n AST_Dot.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.expression._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Dot.prototype._walk.__argnames__) Object.defineProperties(AST_Dot.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Dot.prototype.__repr__ = function __repr__ () {\n if(AST_PropAccess.prototype.__repr__) return AST_PropAccess.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Dot.prototype.__str__ = function __str__ () {\n if(AST_PropAccess.prototype.__str__) return AST_PropAccess.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Dot.prototype, \"__bases__\", {value: [AST_PropAccess]});\n\n function AST_Sub() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Sub.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Sub, AST_PropAccess);\n AST_Sub.prototype.__init__ = function __init__ () {\n AST_PropAccess.prototype.__init__ && AST_PropAccess.prototype.__init__.apply(this, arguments);\n };\n AST_Sub.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.expression._walk(visitor);\n self.property._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Sub.prototype._walk.__argnames__) Object.defineProperties(AST_Sub.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Sub.prototype.__repr__ = function __repr__ () {\n if(AST_PropAccess.prototype.__repr__) return AST_PropAccess.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Sub.prototype.__str__ = function __str__ () {\n if(AST_PropAccess.prototype.__str__) return AST_PropAccess.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Sub.prototype, \"__bases__\", {value: [AST_PropAccess]});\n\n function AST_ItemAccess() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ItemAccess.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ItemAccess, AST_PropAccess);\n AST_ItemAccess.prototype.__init__ = function __init__ () {\n AST_PropAccess.prototype.__init__ && AST_PropAccess.prototype.__init__.apply(this, arguments);\n };\n AST_ItemAccess.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.expression._walk(visitor);\n self.property._walk(visitor);\n if (self.assignment) {\n self.assignment._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_ItemAccess.prototype._walk.__argnames__) Object.defineProperties(AST_ItemAccess.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_ItemAccess.prototype.__repr__ = function __repr__ () {\n if(AST_PropAccess.prototype.__repr__) return AST_PropAccess.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ItemAccess.prototype.__str__ = function __str__ () {\n if(AST_PropAccess.prototype.__str__) return AST_PropAccess.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ItemAccess.prototype, \"__bases__\", {value: [AST_PropAccess]});\n AST_ItemAccess.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"assignment\"] = \"[AST_Node or None] Not None if this is an assignment (a[x] = y) rather than a simple access\";\n ρσ_d[\"assign_operator\"] = \"[String] The operator for a assignment like += or empty string if plain assignment\";\n return ρσ_d;\n }).call(this);\n\n function AST_Splice() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Splice.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Splice, AST_PropAccess);\n AST_Splice.prototype.__init__ = function __init__ () {\n AST_PropAccess.prototype.__init__ && AST_PropAccess.prototype.__init__.apply(this, arguments);\n };\n AST_Splice.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.expression._walk(visitor);\n self.property._walk(visitor);\n self.property2._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Splice.prototype._walk.__argnames__) Object.defineProperties(AST_Splice.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Splice.prototype.__repr__ = function __repr__ () {\n if(AST_PropAccess.prototype.__repr__) return AST_PropAccess.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Splice.prototype.__str__ = function __str__ () {\n if(AST_PropAccess.prototype.__str__) return AST_PropAccess.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Splice.prototype, \"__bases__\", {value: [AST_PropAccess]});\n AST_Splice.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"property2\"] = \"[AST_Node] the 2nd property to access - typically ending index for the array.\";\n ρσ_d[\"assignment\"] = \"[AST_Node] The data being spliced in.\";\n return ρσ_d;\n }).call(this);\n\n function AST_Unary() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Unary.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Unary, AST_Node);\n AST_Unary.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Unary.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.expression._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Unary.prototype._walk.__argnames__) Object.defineProperties(AST_Unary.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Unary.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Unary.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Unary.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Unary.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"operator\"] = \"[string] the operator\";\n ρσ_d[\"expression\"] = \"[AST_Node] expression that this unary operator applies to\";\n ρσ_d[\"parenthesized\"] = \"[bool] Whether this unary expression was parenthesized\";\n return ρσ_d;\n }).call(this);\n\n function AST_UnaryPrefix() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_UnaryPrefix.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_UnaryPrefix, AST_Unary);\n AST_UnaryPrefix.prototype.__init__ = function __init__ () {\n AST_Unary.prototype.__init__ && AST_Unary.prototype.__init__.apply(this, arguments);\n };\n AST_UnaryPrefix.prototype.__repr__ = function __repr__ () {\n if(AST_Unary.prototype.__repr__) return AST_Unary.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_UnaryPrefix.prototype.__str__ = function __str__ () {\n if(AST_Unary.prototype.__str__) return AST_Unary.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_UnaryPrefix.prototype, \"__bases__\", {value: [AST_Unary]});\n\n function AST_Binary() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Binary.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Binary, AST_Node);\n AST_Binary.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Binary.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.left._walk(visitor);\n self.right._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Binary.prototype._walk.__argnames__) Object.defineProperties(AST_Binary.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Binary.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Binary.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Binary.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Binary.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"left\"] = \"[AST_Node] left-hand side expression\";\n ρσ_d[\"operator\"] = \"[string] the operator\";\n ρσ_d[\"right\"] = \"[AST_Node] right-hand side expression\";\n return ρσ_d;\n }).call(this);\n\n function AST_Existential() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Existential.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Existential, AST_Node);\n AST_Existential.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Existential.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.expression._walk(visitor);\n if (self.after !== null && typeof self.after === \"object\") {\n self.after._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Existential.prototype._walk.__argnames__) Object.defineProperties(AST_Existential.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Existential.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Existential.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Existential.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Existential.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = \"[AST_Node] The expression whose existence we need to check\";\n ρσ_d[\"after\"] = \"[None|string|AST_Node] is None when there is nothing following this operator, is a string when there is as AST_PropAccess following this operator, is an AST_Node if it is used a a shorthand for the conditional ternary, i.e. a ? b == a if a? else b\";\n return ρσ_d;\n }).call(this);\n\n function AST_Conditional() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Conditional.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Conditional, AST_Node);\n AST_Conditional.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Conditional.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.condition._walk(visitor);\n self.consequent._walk(visitor);\n self.alternative._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Conditional.prototype._walk.__argnames__) Object.defineProperties(AST_Conditional.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Conditional.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Conditional.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Conditional.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Conditional.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = \"[AST_Node]\";\n ρσ_d[\"consequent\"] = \"[AST_Node]\";\n ρσ_d[\"alternative\"] = \"[AST_Node]\";\n return ρσ_d;\n }).call(this);\n\n function AST_Assign() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Assign.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Assign, AST_Binary);\n AST_Assign.prototype.__init__ = function __init__ () {\n AST_Binary.prototype.__init__ && AST_Binary.prototype.__init__.apply(this, arguments);\n };\n AST_Assign.prototype.is_chained = function is_chained() {\n var self = this;\n return is_node_type(self.right, AST_Assign) || is_node_type(self.right, AST_Seq) && (is_node_type(self.right.car, AST_Assign) || is_node_type(self.right.cdr, AST_Assign));\n };\n if (!AST_Assign.prototype.is_chained.__module__) Object.defineProperties(AST_Assign.prototype.is_chained, {\n __module__ : {value: \"ast\"}\n });\n AST_Assign.prototype.traverse_chain = function traverse_chain() {\n var self = this;\n var right, left_hand_sides, next, assign;\n right = self.right;\n while (true) {\n if (is_node_type(right, AST_Assign)) {\n right = right.right;\n continue;\n }\n if (is_node_type(right, AST_Seq)) {\n if (is_node_type(right.car, AST_Assign)) {\n right = new AST_Seq((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"car\"] = right.car.right;\n ρσ_d[\"cdr\"] = right.cdr;\n return ρσ_d;\n }).call(this));\n continue;\n }\n if (is_node_type(right.cdr, AST_Assign)) {\n right = right.cdr.right;\n continue;\n }\n }\n break;\n }\n left_hand_sides = [self.left];\n next = self.right;\n while (true) {\n if (is_node_type(next, AST_Assign)) {\n left_hand_sides.push(next.left);\n next = next.right;\n continue;\n }\n if (is_node_type(next, AST_Seq)) {\n if (is_node_type(next.cdr, AST_Assign)) {\n assign = next.cdr;\n left_hand_sides.push(new AST_Seq((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"car\"] = next.car;\n ρσ_d[\"cdr\"] = assign.left;\n return ρσ_d;\n }).call(this)));\n next = assign.right;\n continue;\n }\n }\n break;\n }\n return [left_hand_sides, right];\n };\n if (!AST_Assign.prototype.traverse_chain.__module__) Object.defineProperties(AST_Assign.prototype.traverse_chain, {\n __module__ : {value: \"ast\"}\n });\n AST_Assign.prototype.__repr__ = function __repr__ () {\n if(AST_Binary.prototype.__repr__) return AST_Binary.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Assign.prototype.__str__ = function __str__ () {\n if(AST_Binary.prototype.__str__) return AST_Binary.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Assign.prototype, \"__bases__\", {value: [AST_Binary]});\n\n function AST_Array() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Array.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Array, AST_Node);\n AST_Array.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Array.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var el;\n var ρσ_Iter31 = ρσ_Iterable(self.elements);\n for (var ρσ_Index31 = 0; ρσ_Index31 < ρσ_Iter31.length; ρσ_Index31++) {\n el = ρσ_Iter31[ρσ_Index31];\n el._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Array.prototype._walk.__argnames__) Object.defineProperties(AST_Array.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Array.prototype.flatten = function flatten() {\n var self = this;\n function flatten(arr) {\n var ans, value;\n ans = ρσ_list_decorate([]);\n var ρσ_Iter32 = ρσ_Iterable(arr);\n for (var ρσ_Index32 = 0; ρσ_Index32 < ρσ_Iter32.length; ρσ_Index32++) {\n value = ρσ_Iter32[ρσ_Index32];\n if (is_node_type(value, AST_Seq)) {\n value = value.to_array();\n } else if (is_node_type(value, AST_Array)) {\n value = value.elements;\n }\n if (Array.isArray(value)) {\n ans = ans.concat(flatten(value));\n } else {\n ans.push(value);\n }\n }\n return ans;\n };\n if (!flatten.__argnames__) Object.defineProperties(flatten, {\n __argnames__ : {value: [\"arr\"]},\n __module__ : {value: \"ast\"}\n });\n\n return flatten(self.elements);\n };\n if (!AST_Array.prototype.flatten.__module__) Object.defineProperties(AST_Array.prototype.flatten, {\n __module__ : {value: \"ast\"}\n });\n AST_Array.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Array.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Array.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Array.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = \"[AST_Node*] array of elements\";\n return ρσ_d;\n }).call(this);\n\n function AST_Object() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Object.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Object, AST_Node);\n AST_Object.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Object.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var prop;\n var ρσ_Iter33 = ρσ_Iterable(self.properties);\n for (var ρσ_Index33 = 0; ρσ_Index33 < ρσ_Iter33.length; ρσ_Index33++) {\n prop = ρσ_Iter33[ρσ_Index33];\n prop._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Object.prototype._walk.__argnames__) Object.defineProperties(AST_Object.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Object.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Object.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Object.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Object.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"properties\"] = \"[AST_ObjectProperty*] array of properties\";\n ρσ_d[\"is_pydict\"] = \"[bool] True if this object is a python dict literal\";\n ρσ_d[\"is_jshash\"] = \"[bool] True if this object is a js hash literal\";\n return ρσ_d;\n }).call(this);\n\n function AST_ExpressiveObject() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ExpressiveObject.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ExpressiveObject, AST_Object);\n AST_ExpressiveObject.prototype.__init__ = function __init__ () {\n AST_Object.prototype.__init__ && AST_Object.prototype.__init__.apply(this, arguments);\n };\n AST_ExpressiveObject.prototype.__repr__ = function __repr__ () {\n if(AST_Object.prototype.__repr__) return AST_Object.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ExpressiveObject.prototype.__str__ = function __str__ () {\n if(AST_Object.prototype.__str__) return AST_Object.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ExpressiveObject.prototype, \"__bases__\", {value: [AST_Object]});\n\n function AST_ObjectProperty() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ObjectProperty.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ObjectProperty, AST_Node);\n AST_ObjectProperty.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_ObjectProperty.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.key._walk(visitor);\n self.value._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_ObjectProperty.prototype._walk.__argnames__) Object.defineProperties(AST_ObjectProperty.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_ObjectProperty.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ObjectProperty.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ObjectProperty.prototype, \"__bases__\", {value: [AST_Node]});\n AST_ObjectProperty.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"key\"] = \"[AST_Node] the property expression\";\n ρσ_d[\"value\"] = \"[AST_Node] property value. For setters and getters this is an AST_Function.\";\n ρσ_d[\"quoted\"] = \"\";\n return ρσ_d;\n }).call(this);\n\n function AST_ObjectKeyVal() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ObjectKeyVal.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ObjectKeyVal, AST_ObjectProperty);\n AST_ObjectKeyVal.prototype.__init__ = function __init__ () {\n AST_ObjectProperty.prototype.__init__ && AST_ObjectProperty.prototype.__init__.apply(this, arguments);\n };\n AST_ObjectKeyVal.prototype.__repr__ = function __repr__ () {\n if(AST_ObjectProperty.prototype.__repr__) return AST_ObjectProperty.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ObjectKeyVal.prototype.__str__ = function __str__ () {\n if(AST_ObjectProperty.prototype.__str__) return AST_ObjectProperty.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ObjectKeyVal.prototype, \"__bases__\", {value: [AST_ObjectProperty]});\n\n function AST_Set() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Set.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Set, AST_Node);\n AST_Set.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Set.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n var prop;\n var ρσ_Iter34 = ρσ_Iterable(self.items);\n for (var ρσ_Index34 = 0; ρσ_Index34 < ρσ_Iter34.length; ρσ_Index34++) {\n prop = ρσ_Iter34[ρσ_Index34];\n prop._walk(visitor);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_Set.prototype._walk.__argnames__) Object.defineProperties(AST_Set.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Set.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Set.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Set.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Set.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"items\"] = \"[AST_SetItem*] array of items\";\n return ρσ_d;\n }).call(this);\n\n function AST_SetItem() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SetItem.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SetItem, AST_Node);\n AST_SetItem.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_SetItem.prototype._walk = function _walk(visitor) {\n var self = this;\n return visitor._visit(self, (function() {\n var ρσ_anonfunc = function () {\n self.value._walk(visitor);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!AST_SetItem.prototype._walk.__argnames__) Object.defineProperties(AST_SetItem.prototype._walk, {\n __argnames__ : {value: [\"visitor\"]},\n __module__ : {value: \"ast\"}\n });\n AST_SetItem.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SetItem.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SetItem.prototype, \"__bases__\", {value: [AST_Node]});\n AST_SetItem.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = \"[AST_Node] The value of this item\";\n return ρσ_d;\n }).call(this);\n\n function AST_Symbol() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Symbol.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Symbol, AST_Node);\n AST_Symbol.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Symbol.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Symbol.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Symbol.prototype, \"__bases__\", {value: [AST_Node]});\n AST_Symbol.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"[string] name of this symbol\";\n ρσ_d[\"scope\"] = \"[AST_Scope/S] the current scope (not necessarily the definition scope)\";\n ρσ_d[\"thedef\"] = \"[SymbolDef/S] the definition of this symbol\";\n return ρσ_d;\n }).call(this);\n\n function AST_SymbolAlias() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolAlias.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolAlias, AST_Symbol);\n AST_SymbolAlias.prototype.__init__ = function __init__ () {\n AST_Symbol.prototype.__init__ && AST_Symbol.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolAlias.prototype.__repr__ = function __repr__ () {\n if(AST_Symbol.prototype.__repr__) return AST_Symbol.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolAlias.prototype.__str__ = function __str__ () {\n if(AST_Symbol.prototype.__str__) return AST_Symbol.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolAlias.prototype, \"__bases__\", {value: [AST_Symbol]});\n\n function AST_SymbolDeclaration() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolDeclaration.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolDeclaration, AST_Symbol);\n AST_SymbolDeclaration.prototype.__init__ = function __init__ () {\n AST_Symbol.prototype.__init__ && AST_Symbol.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolDeclaration.prototype.__repr__ = function __repr__ () {\n if(AST_Symbol.prototype.__repr__) return AST_Symbol.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolDeclaration.prototype.__str__ = function __str__ () {\n if(AST_Symbol.prototype.__str__) return AST_Symbol.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolDeclaration.prototype, \"__bases__\", {value: [AST_Symbol]});\n AST_SymbolDeclaration.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"init\"] = \"[AST_Node*/S] array of initializers for this declaration.\";\n return ρσ_d;\n }).call(this);\n\n function AST_SymbolVar() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolVar.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolVar, AST_SymbolDeclaration);\n AST_SymbolVar.prototype.__init__ = function __init__ () {\n AST_SymbolDeclaration.prototype.__init__ && AST_SymbolDeclaration.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolVar.prototype.__repr__ = function __repr__ () {\n if(AST_SymbolDeclaration.prototype.__repr__) return AST_SymbolDeclaration.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolVar.prototype.__str__ = function __str__ () {\n if(AST_SymbolDeclaration.prototype.__str__) return AST_SymbolDeclaration.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolVar.prototype, \"__bases__\", {value: [AST_SymbolDeclaration]});\n\n function AST_ImportedVar() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_ImportedVar.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_ImportedVar, AST_SymbolVar);\n AST_ImportedVar.prototype.__init__ = function __init__ () {\n AST_SymbolVar.prototype.__init__ && AST_SymbolVar.prototype.__init__.apply(this, arguments);\n };\n AST_ImportedVar.prototype.__repr__ = function __repr__ () {\n if(AST_SymbolVar.prototype.__repr__) return AST_SymbolVar.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_ImportedVar.prototype.__str__ = function __str__ () {\n if(AST_SymbolVar.prototype.__str__) return AST_SymbolVar.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_ImportedVar.prototype, \"__bases__\", {value: [AST_SymbolVar]});\n AST_ImportedVar.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"alias\"] = \"AST_SymbolAlias the alias for this imported symbol\";\n return ρσ_d;\n }).call(this);\n\n function AST_SymbolNonlocal() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolNonlocal.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolNonlocal, AST_SymbolDeclaration);\n AST_SymbolNonlocal.prototype.__init__ = function __init__ () {\n AST_SymbolDeclaration.prototype.__init__ && AST_SymbolDeclaration.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolNonlocal.prototype.__repr__ = function __repr__ () {\n if(AST_SymbolDeclaration.prototype.__repr__) return AST_SymbolDeclaration.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolNonlocal.prototype.__str__ = function __str__ () {\n if(AST_SymbolDeclaration.prototype.__str__) return AST_SymbolDeclaration.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolNonlocal.prototype, \"__bases__\", {value: [AST_SymbolDeclaration]});\n\n function AST_SymbolFunarg() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolFunarg.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolFunarg, AST_SymbolVar);\n AST_SymbolFunarg.prototype.__init__ = function __init__ () {\n AST_SymbolVar.prototype.__init__ && AST_SymbolVar.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolFunarg.prototype.__repr__ = function __repr__ () {\n if(AST_SymbolVar.prototype.__repr__) return AST_SymbolVar.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolFunarg.prototype.__str__ = function __str__ () {\n if(AST_SymbolVar.prototype.__str__) return AST_SymbolVar.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolFunarg.prototype, \"__bases__\", {value: [AST_SymbolVar]});\n AST_SymbolFunarg.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"annotation\"] = \"[AST_Node?] The annotation provided for this argument (if any)\";\n return ρσ_d;\n }).call(this);\n\n function AST_SymbolDefun() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolDefun.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolDefun, AST_SymbolDeclaration);\n AST_SymbolDefun.prototype.__init__ = function __init__ () {\n AST_SymbolDeclaration.prototype.__init__ && AST_SymbolDeclaration.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolDefun.prototype.__repr__ = function __repr__ () {\n if(AST_SymbolDeclaration.prototype.__repr__) return AST_SymbolDeclaration.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolDefun.prototype.__str__ = function __str__ () {\n if(AST_SymbolDeclaration.prototype.__str__) return AST_SymbolDeclaration.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolDefun.prototype, \"__bases__\", {value: [AST_SymbolDeclaration]});\n\n function AST_SymbolLambda() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolLambda.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolLambda, AST_SymbolDeclaration);\n AST_SymbolLambda.prototype.__init__ = function __init__ () {\n AST_SymbolDeclaration.prototype.__init__ && AST_SymbolDeclaration.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolLambda.prototype.__repr__ = function __repr__ () {\n if(AST_SymbolDeclaration.prototype.__repr__) return AST_SymbolDeclaration.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolLambda.prototype.__str__ = function __str__ () {\n if(AST_SymbolDeclaration.prototype.__str__) return AST_SymbolDeclaration.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolLambda.prototype, \"__bases__\", {value: [AST_SymbolDeclaration]});\n\n function AST_SymbolCatch() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolCatch.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolCatch, AST_SymbolDeclaration);\n AST_SymbolCatch.prototype.__init__ = function __init__ () {\n AST_SymbolDeclaration.prototype.__init__ && AST_SymbolDeclaration.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolCatch.prototype.__repr__ = function __repr__ () {\n if(AST_SymbolDeclaration.prototype.__repr__) return AST_SymbolDeclaration.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolCatch.prototype.__str__ = function __str__ () {\n if(AST_SymbolDeclaration.prototype.__str__) return AST_SymbolDeclaration.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolCatch.prototype, \"__bases__\", {value: [AST_SymbolDeclaration]});\n\n function AST_SymbolRef() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_SymbolRef.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_SymbolRef, AST_Symbol);\n AST_SymbolRef.prototype.__init__ = function __init__ () {\n AST_Symbol.prototype.__init__ && AST_Symbol.prototype.__init__.apply(this, arguments);\n };\n AST_SymbolRef.prototype.__repr__ = function __repr__ () {\n if(AST_Symbol.prototype.__repr__) return AST_Symbol.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_SymbolRef.prototype.__str__ = function __str__ () {\n if(AST_Symbol.prototype.__str__) return AST_Symbol.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_SymbolRef.prototype, \"__bases__\", {value: [AST_Symbol]});\n AST_SymbolRef.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"parens\"] = \"[boolean/S] if true, this variable is wrapped in parentheses\";\n return ρσ_d;\n }).call(this);\n\n function AST_This() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_This.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_This, AST_Symbol);\n AST_This.prototype.__init__ = function __init__ () {\n AST_Symbol.prototype.__init__ && AST_Symbol.prototype.__init__.apply(this, arguments);\n };\n AST_This.prototype.__repr__ = function __repr__ () {\n if(AST_Symbol.prototype.__repr__) return AST_Symbol.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_This.prototype.__str__ = function __str__ () {\n if(AST_Symbol.prototype.__str__) return AST_Symbol.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_This.prototype, \"__bases__\", {value: [AST_Symbol]});\n\n function AST_Constant() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Constant.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Constant, AST_Node);\n AST_Constant.prototype.__init__ = function __init__ () {\n AST_Node.prototype.__init__ && AST_Node.prototype.__init__.apply(this, arguments);\n };\n AST_Constant.prototype.__repr__ = function __repr__ () {\n if(AST_Node.prototype.__repr__) return AST_Node.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Constant.prototype.__str__ = function __str__ () {\n if(AST_Node.prototype.__str__) return AST_Node.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Constant.prototype, \"__bases__\", {value: [AST_Node]});\n\n function AST_String() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_String.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_String, AST_Constant);\n AST_String.prototype.__init__ = function __init__ () {\n AST_Constant.prototype.__init__ && AST_Constant.prototype.__init__.apply(this, arguments);\n };\n AST_String.prototype.__repr__ = function __repr__ () {\n if(AST_Constant.prototype.__repr__) return AST_Constant.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_String.prototype.__str__ = function __str__ () {\n if(AST_Constant.prototype.__str__) return AST_Constant.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_String.prototype, \"__bases__\", {value: [AST_Constant]});\n AST_String.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = \"[string] the contents of this string\";\n return ρσ_d;\n }).call(this);\n\n function AST_Verbatim() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Verbatim.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Verbatim, AST_Constant);\n AST_Verbatim.prototype.__init__ = function __init__ () {\n AST_Constant.prototype.__init__ && AST_Constant.prototype.__init__.apply(this, arguments);\n };\n AST_Verbatim.prototype.__repr__ = function __repr__ () {\n if(AST_Constant.prototype.__repr__) return AST_Constant.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Verbatim.prototype.__str__ = function __str__ () {\n if(AST_Constant.prototype.__str__) return AST_Constant.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Verbatim.prototype, \"__bases__\", {value: [AST_Constant]});\n AST_Verbatim.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = \"[string] A string of raw JS code\";\n return ρσ_d;\n }).call(this);\n\n function AST_Number() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Number.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Number, AST_Constant);\n AST_Number.prototype.__init__ = function __init__ () {\n AST_Constant.prototype.__init__ && AST_Constant.prototype.__init__.apply(this, arguments);\n };\n AST_Number.prototype.__repr__ = function __repr__ () {\n if(AST_Constant.prototype.__repr__) return AST_Constant.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Number.prototype.__str__ = function __str__ () {\n if(AST_Constant.prototype.__str__) return AST_Constant.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Number.prototype, \"__bases__\", {value: [AST_Constant]});\n AST_Number.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = \"[number] the numeric value\";\n return ρσ_d;\n }).call(this);\n\n function AST_RegExp() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_RegExp.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_RegExp, AST_Constant);\n AST_RegExp.prototype.__init__ = function __init__ () {\n AST_Constant.prototype.__init__ && AST_Constant.prototype.__init__.apply(this, arguments);\n };\n AST_RegExp.prototype.__repr__ = function __repr__ () {\n if(AST_Constant.prototype.__repr__) return AST_Constant.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_RegExp.prototype.__str__ = function __str__ () {\n if(AST_Constant.prototype.__str__) return AST_Constant.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_RegExp.prototype, \"__bases__\", {value: [AST_Constant]});\n AST_RegExp.prototype.properties = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = \"[RegExp] the actual regexp\";\n return ρσ_d;\n }).call(this);\n\n function AST_Atom() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Atom.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Atom, AST_Constant);\n AST_Atom.prototype.__init__ = function __init__(initializer) {\n var self = this;\n if (initializer) {\n self.start = initializer.start;\n self.end = initializer.end;\n }\n };\n if (!AST_Atom.prototype.__init__.__argnames__) Object.defineProperties(AST_Atom.prototype.__init__, {\n __argnames__ : {value: [\"initializer\"]},\n __module__ : {value: \"ast\"}\n });\n AST_Atom.__argnames__ = AST_Atom.prototype.__init__.__argnames__;\n AST_Atom.__handles_kwarg_interpolation__ = AST_Atom.prototype.__init__.__handles_kwarg_interpolation__;\n AST_Atom.prototype.__repr__ = function __repr__ () {\n if(AST_Constant.prototype.__repr__) return AST_Constant.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Atom.prototype.__str__ = function __str__ () {\n if(AST_Constant.prototype.__str__) return AST_Constant.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Atom.prototype, \"__bases__\", {value: [AST_Constant]});\n\n function AST_Null() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Null.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Null, AST_Atom);\n AST_Null.prototype.__init__ = function __init__ () {\n AST_Atom.prototype.__init__ && AST_Atom.prototype.__init__.apply(this, arguments);\n };\n AST_Null.prototype.__repr__ = function __repr__ () {\n if(AST_Atom.prototype.__repr__) return AST_Atom.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Null.prototype.__str__ = function __str__ () {\n if(AST_Atom.prototype.__str__) return AST_Atom.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Null.prototype, \"__bases__\", {value: [AST_Atom]});\n AST_Null.prototype.value = null;\n\n function AST_NaN() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_NaN.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_NaN, AST_Atom);\n AST_NaN.prototype.__init__ = function __init__ () {\n AST_Atom.prototype.__init__ && AST_Atom.prototype.__init__.apply(this, arguments);\n };\n AST_NaN.prototype.__repr__ = function __repr__ () {\n if(AST_Atom.prototype.__repr__) return AST_Atom.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_NaN.prototype.__str__ = function __str__ () {\n if(AST_Atom.prototype.__str__) return AST_Atom.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_NaN.prototype, \"__bases__\", {value: [AST_Atom]});\n AST_NaN.prototype.value = NaN;\n\n function AST_Undefined() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Undefined.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Undefined, AST_Atom);\n AST_Undefined.prototype.__init__ = function __init__ () {\n AST_Atom.prototype.__init__ && AST_Atom.prototype.__init__.apply(this, arguments);\n };\n AST_Undefined.prototype.__repr__ = function __repr__ () {\n if(AST_Atom.prototype.__repr__) return AST_Atom.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Undefined.prototype.__str__ = function __str__ () {\n if(AST_Atom.prototype.__str__) return AST_Atom.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Undefined.prototype, \"__bases__\", {value: [AST_Atom]});\n AST_Undefined.prototype.value = undefined;\n\n function AST_Hole() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Hole.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Hole, AST_Atom);\n AST_Hole.prototype.__init__ = function __init__ () {\n AST_Atom.prototype.__init__ && AST_Atom.prototype.__init__.apply(this, arguments);\n };\n AST_Hole.prototype.__repr__ = function __repr__ () {\n if(AST_Atom.prototype.__repr__) return AST_Atom.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Hole.prototype.__str__ = function __str__ () {\n if(AST_Atom.prototype.__str__) return AST_Atom.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Hole.prototype, \"__bases__\", {value: [AST_Atom]});\n AST_Hole.prototype.value = undefined;\n\n function AST_Infinity() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Infinity.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Infinity, AST_Atom);\n AST_Infinity.prototype.__init__ = function __init__ () {\n AST_Atom.prototype.__init__ && AST_Atom.prototype.__init__.apply(this, arguments);\n };\n AST_Infinity.prototype.__repr__ = function __repr__ () {\n if(AST_Atom.prototype.__repr__) return AST_Atom.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Infinity.prototype.__str__ = function __str__ () {\n if(AST_Atom.prototype.__str__) return AST_Atom.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Infinity.prototype, \"__bases__\", {value: [AST_Atom]});\n AST_Infinity.prototype.value = Infinity;\n\n function AST_Boolean() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_Boolean.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_Boolean, AST_Atom);\n AST_Boolean.prototype.__init__ = function __init__ () {\n AST_Atom.prototype.__init__ && AST_Atom.prototype.__init__.apply(this, arguments);\n };\n AST_Boolean.prototype.__repr__ = function __repr__ () {\n if(AST_Atom.prototype.__repr__) return AST_Atom.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_Boolean.prototype.__str__ = function __str__ () {\n if(AST_Atom.prototype.__str__) return AST_Atom.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_Boolean.prototype, \"__bases__\", {value: [AST_Atom]});\n\n function AST_False() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_False.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_False, AST_Boolean);\n AST_False.prototype.__init__ = function __init__ () {\n AST_Boolean.prototype.__init__ && AST_Boolean.prototype.__init__.apply(this, arguments);\n };\n AST_False.prototype.__repr__ = function __repr__ () {\n if(AST_Boolean.prototype.__repr__) return AST_Boolean.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_False.prototype.__str__ = function __str__ () {\n if(AST_Boolean.prototype.__str__) return AST_Boolean.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_False.prototype, \"__bases__\", {value: [AST_Boolean]});\n AST_False.prototype.value = false;\n\n function AST_True() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AST_True.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(AST_True, AST_Boolean);\n AST_True.prototype.__init__ = function __init__ () {\n AST_Boolean.prototype.__init__ && AST_Boolean.prototype.__init__.apply(this, arguments);\n };\n AST_True.prototype.__repr__ = function __repr__ () {\n if(AST_Boolean.prototype.__repr__) return AST_Boolean.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n AST_True.prototype.__str__ = function __str__ () {\n if(AST_Boolean.prototype.__str__) return AST_Boolean.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(AST_True.prototype, \"__bases__\", {value: [AST_Boolean]});\n AST_True.prototype.value = true;\n\n function TreeWalker() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n TreeWalker.prototype.__init__.apply(this, arguments);\n }\n TreeWalker.prototype.__init__ = function __init__(callback) {\n var self = this;\n self.visit = callback;\n self.stack = ρσ_list_decorate([]);\n };\n if (!TreeWalker.prototype.__init__.__argnames__) Object.defineProperties(TreeWalker.prototype.__init__, {\n __argnames__ : {value: [\"callback\"]},\n __module__ : {value: \"ast\"}\n });\n TreeWalker.__argnames__ = TreeWalker.prototype.__init__.__argnames__;\n TreeWalker.__handles_kwarg_interpolation__ = TreeWalker.prototype.__init__.__handles_kwarg_interpolation__;\n TreeWalker.prototype._visit = function _visit(node, descend) {\n var self = this;\n var ret;\n self.stack.push(node);\n ret = self.visit(node, (descend) ? (function() {\n var ρσ_anonfunc = function () {\n descend.call(node);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })() : noop);\n if (!ret && descend) {\n descend.call(node);\n }\n self.stack.pop();\n return ret;\n };\n if (!TreeWalker.prototype._visit.__argnames__) Object.defineProperties(TreeWalker.prototype._visit, {\n __argnames__ : {value: [\"node\", \"descend\"]},\n __module__ : {value: \"ast\"}\n });\n TreeWalker.prototype.parent = function parent(n) {\n var self = this;\n return (ρσ_expr_temp = self.stack)[ρσ_bound_index(self.stack.length - 2 - (n || 0), ρσ_expr_temp)];\n };\n if (!TreeWalker.prototype.parent.__argnames__) Object.defineProperties(TreeWalker.prototype.parent, {\n __argnames__ : {value: [\"n\"]},\n __module__ : {value: \"ast\"}\n });\n TreeWalker.prototype.push = function push(node) {\n var self = this;\n self.stack.push(node);\n };\n if (!TreeWalker.prototype.push.__argnames__) Object.defineProperties(TreeWalker.prototype.push, {\n __argnames__ : {value: [\"node\"]},\n __module__ : {value: \"ast\"}\n });\n TreeWalker.prototype.pop = function pop() {\n var self = this;\n return self.stack.pop();\n };\n if (!TreeWalker.prototype.pop.__module__) Object.defineProperties(TreeWalker.prototype.pop, {\n __module__ : {value: \"ast\"}\n });\n TreeWalker.prototype.self = function self() {\n var s = this;\n return (ρσ_expr_temp = s.stack)[ρσ_bound_index(s.stack.length - 1, ρσ_expr_temp)];\n };\n if (!TreeWalker.prototype.self.__module__) Object.defineProperties(TreeWalker.prototype.self, {\n __module__ : {value: \"ast\"}\n });\n TreeWalker.prototype.find_parent = function find_parent(type) {\n var self = this;\n var stack, x, i;\n stack = self.stack;\n for (var ρσ_Index35 = stack.length - 1; ρσ_Index35 > -1; ρσ_Index35-=1) {\n i = ρσ_Index35;\n x = stack[(typeof i === \"number\" && i < 0) ? stack.length + i : i];\n if (is_node_type(x, type)) {\n return x;\n }\n }\n };\n if (!TreeWalker.prototype.find_parent.__argnames__) Object.defineProperties(TreeWalker.prototype.find_parent, {\n __argnames__ : {value: [\"type\"]},\n __module__ : {value: \"ast\"}\n });\n TreeWalker.prototype.in_boolean_context = function in_boolean_context() {\n var self = this;\n var stack, i, p;\n stack = self.stack;\n i = stack.length;\n self = stack[ρσ_bound_index(i -= 1, stack)];\n while (i > 0) {\n p = stack[ρσ_bound_index(i -= 1, stack)];\n if (is_node_type(p, AST_If) && p.condition === self || is_node_type(p, AST_Conditional) && p.condition === self || is_node_type(p, AST_DWLoop) && p.condition === self || is_node_type(p, AST_UnaryPrefix) && p.operator === \"!\" && p.expression === self) {\n return true;\n }\n if (!((is_node_type(p, AST_Binary) && (p.operator === \"&&\" || p.operator === \"||\")))) {\n return false;\n }\n self = p;\n }\n };\n if (!TreeWalker.prototype.in_boolean_context.__module__) Object.defineProperties(TreeWalker.prototype.in_boolean_context, {\n __module__ : {value: \"ast\"}\n });\n TreeWalker.prototype.__repr__ = function __repr__ () {\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n TreeWalker.prototype.__str__ = function __str__ () {\n return this.__repr__();\n };\n Object.defineProperty(TreeWalker.prototype, \"__bases__\", {value: []});\n\n function Found() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n Found.prototype.__init__.apply(this, arguments);\n }\n ρσ_extends(Found, Exception);\n Found.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n };\n Found.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n Found.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n };\n Object.defineProperty(Found.prototype, \"__bases__\", {value: [Exception]});\n \n\n function has_calls(expression) {\n if (!expression) {\n return false;\n }\n try {\n expression.walk(new TreeWalker((function() {\n var ρσ_anonfunc = function (node) {\n if (is_node_type(node, AST_BaseCall) || is_node_type(node, AST_ItemAccess)) {\n throw new Found;\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"node\"]},\n __module__ : {value: \"ast\"}\n });\n return ρσ_anonfunc;\n })()));\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof Found) {\n return true;\n } else {\n throw ρσ_Exception;\n }\n }\n return false;\n };\n if (!has_calls.__argnames__) Object.defineProperties(has_calls, {\n __argnames__ : {value: [\"expression\"]},\n __module__ : {value: \"ast\"}\n });\n\n ρσ_modules.ast.is_node_type = is_node_type;\n ρσ_modules.ast.AST = AST;\n ρσ_modules.ast.AST_Token = AST_Token;\n ρσ_modules.ast.AST_Node = AST_Node;\n ρσ_modules.ast.AST_Statement = AST_Statement;\n ρσ_modules.ast.AST_Debugger = AST_Debugger;\n ρσ_modules.ast.AST_Directive = AST_Directive;\n ρσ_modules.ast.AST_SimpleStatement = AST_SimpleStatement;\n ρσ_modules.ast.AST_Assert = AST_Assert;\n ρσ_modules.ast.walk_body = walk_body;\n ρσ_modules.ast.AST_Block = AST_Block;\n ρσ_modules.ast.AST_BlockStatement = AST_BlockStatement;\n ρσ_modules.ast.AST_EmptyStatement = AST_EmptyStatement;\n ρσ_modules.ast.AST_StatementWithBody = AST_StatementWithBody;\n ρσ_modules.ast.AST_DWLoop = AST_DWLoop;\n ρσ_modules.ast.AST_Do = AST_Do;\n ρσ_modules.ast.AST_While = AST_While;\n ρσ_modules.ast.AST_ForIn = AST_ForIn;\n ρσ_modules.ast.AST_ForJS = AST_ForJS;\n ρσ_modules.ast.AST_ListComprehension = AST_ListComprehension;\n ρσ_modules.ast.AST_SetComprehension = AST_SetComprehension;\n ρσ_modules.ast.AST_DictComprehension = AST_DictComprehension;\n ρσ_modules.ast.AST_GeneratorComprehension = AST_GeneratorComprehension;\n ρσ_modules.ast.AST_With = AST_With;\n ρσ_modules.ast.AST_WithClause = AST_WithClause;\n ρσ_modules.ast.AST_Scope = AST_Scope;\n ρσ_modules.ast.AST_Toplevel = AST_Toplevel;\n ρσ_modules.ast.AST_Import = AST_Import;\n ρσ_modules.ast.AST_Imports = AST_Imports;\n ρσ_modules.ast.AST_Decorator = AST_Decorator;\n ρσ_modules.ast.AST_Lambda = AST_Lambda;\n ρσ_modules.ast.AST_Function = AST_Function;\n ρσ_modules.ast.AST_Class = AST_Class;\n ρσ_modules.ast.AST_Method = AST_Method;\n ρσ_modules.ast.AST_Jump = AST_Jump;\n ρσ_modules.ast.AST_Exit = AST_Exit;\n ρσ_modules.ast.AST_Return = AST_Return;\n ρσ_modules.ast.AST_Yield = AST_Yield;\n ρσ_modules.ast.AST_Throw = AST_Throw;\n ρσ_modules.ast.AST_LoopControl = AST_LoopControl;\n ρσ_modules.ast.AST_Break = AST_Break;\n ρσ_modules.ast.AST_Continue = AST_Continue;\n ρσ_modules.ast.AST_If = AST_If;\n ρσ_modules.ast.AST_Try = AST_Try;\n ρσ_modules.ast.AST_Catch = AST_Catch;\n ρσ_modules.ast.AST_Except = AST_Except;\n ρσ_modules.ast.AST_Finally = AST_Finally;\n ρσ_modules.ast.AST_Else = AST_Else;\n ρσ_modules.ast.AST_Definitions = AST_Definitions;\n ρσ_modules.ast.AST_Var = AST_Var;\n ρσ_modules.ast.AST_VarDef = AST_VarDef;\n ρσ_modules.ast.AST_BaseCall = AST_BaseCall;\n ρσ_modules.ast.AST_Call = AST_Call;\n ρσ_modules.ast.AST_ClassCall = AST_ClassCall;\n ρσ_modules.ast.AST_New = AST_New;\n ρσ_modules.ast.AST_Seq = AST_Seq;\n ρσ_modules.ast.AST_PropAccess = AST_PropAccess;\n ρσ_modules.ast.AST_Dot = AST_Dot;\n ρσ_modules.ast.AST_Sub = AST_Sub;\n ρσ_modules.ast.AST_ItemAccess = AST_ItemAccess;\n ρσ_modules.ast.AST_Splice = AST_Splice;\n ρσ_modules.ast.AST_Unary = AST_Unary;\n ρσ_modules.ast.AST_UnaryPrefix = AST_UnaryPrefix;\n ρσ_modules.ast.AST_Binary = AST_Binary;\n ρσ_modules.ast.AST_Existential = AST_Existential;\n ρσ_modules.ast.AST_Conditional = AST_Conditional;\n ρσ_modules.ast.AST_Assign = AST_Assign;\n ρσ_modules.ast.AST_Array = AST_Array;\n ρσ_modules.ast.AST_Object = AST_Object;\n ρσ_modules.ast.AST_ExpressiveObject = AST_ExpressiveObject;\n ρσ_modules.ast.AST_ObjectProperty = AST_ObjectProperty;\n ρσ_modules.ast.AST_ObjectKeyVal = AST_ObjectKeyVal;\n ρσ_modules.ast.AST_Set = AST_Set;\n ρσ_modules.ast.AST_SetItem = AST_SetItem;\n ρσ_modules.ast.AST_Symbol = AST_Symbol;\n ρσ_modules.ast.AST_SymbolAlias = AST_SymbolAlias;\n ρσ_modules.ast.AST_SymbolDeclaration = AST_SymbolDeclaration;\n ρσ_modules.ast.AST_SymbolVar = AST_SymbolVar;\n ρσ_modules.ast.AST_ImportedVar = AST_ImportedVar;\n ρσ_modules.ast.AST_SymbolNonlocal = AST_SymbolNonlocal;\n ρσ_modules.ast.AST_SymbolFunarg = AST_SymbolFunarg;\n ρσ_modules.ast.AST_SymbolDefun = AST_SymbolDefun;\n ρσ_modules.ast.AST_SymbolLambda = AST_SymbolLambda;\n ρσ_modules.ast.AST_SymbolCatch = AST_SymbolCatch;\n ρσ_modules.ast.AST_SymbolRef = AST_SymbolRef;\n ρσ_modules.ast.AST_This = AST_This;\n ρσ_modules.ast.AST_Constant = AST_Constant;\n ρσ_modules.ast.AST_String = AST_String;\n ρσ_modules.ast.AST_Verbatim = AST_Verbatim;\n ρσ_modules.ast.AST_Number = AST_Number;\n ρσ_modules.ast.AST_RegExp = AST_RegExp;\n ρσ_modules.ast.AST_Atom = AST_Atom;\n ρσ_modules.ast.AST_Null = AST_Null;\n ρσ_modules.ast.AST_NaN = AST_NaN;\n ρσ_modules.ast.AST_Undefined = AST_Undefined;\n ρσ_modules.ast.AST_Hole = AST_Hole;\n ρσ_modules.ast.AST_Infinity = AST_Infinity;\n ρσ_modules.ast.AST_Boolean = AST_Boolean;\n ρσ_modules.ast.AST_False = AST_False;\n ρσ_modules.ast.AST_True = AST_True;\n ρσ_modules.ast.TreeWalker = TreeWalker;\n ρσ_modules.ast.Found = Found;\n ρσ_modules.ast.has_calls = has_calls;\n })();\n\n (function(){\n var __name__ = \"string_interpolation\";\n function quoted_string(x) {\n return \"\\\"\" + x.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\").replace(/\\n/g, \"\\\\n\") + \"\\\"\";\n };\n if (!quoted_string.__argnames__) Object.defineProperties(quoted_string, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"string_interpolation\"}\n });\n\n function render_markup(markup) {\n var ρσ_unpack, pos, key, ch, fmtspec, prefix;\n ρσ_unpack = [0, \"\"];\n pos = ρσ_unpack[0];\n key = ρσ_unpack[1];\n while (pos < markup.length) {\n ch = markup[(typeof pos === \"number\" && pos < 0) ? markup.length + pos : pos];\n if (ch === \"!\" || ch === \":\") {\n break;\n }\n key += ch;\n pos += 1;\n }\n fmtspec = markup.slice(pos);\n prefix = \"\";\n if (key.endsWith(\"=\")) {\n prefix = key;\n key = key.slice(0, -1);\n }\n return \"ρσ_str.format(\\\"\" + prefix + \"{\" + fmtspec + \"}\\\", \" + key + \")\";\n };\n if (!render_markup.__argnames__) Object.defineProperties(render_markup, {\n __argnames__ : {value: [\"markup\"]},\n __module__ : {value: \"string_interpolation\"}\n });\n\n function interpolate(template, raise_error) {\n var pos, in_brace, markup, ans, ch;\n pos = in_brace = 0;\n markup = \"\";\n ans = [\"\"];\n while (pos < template.length) {\n ch = template[(typeof pos === \"number\" && pos < 0) ? template.length + pos : pos];\n if (in_brace) {\n if (ch === \"{\") {\n in_brace += 1;\n markup += \"{\";\n } else if (ch === \"}\") {\n in_brace -= 1;\n if (in_brace > 0) {\n markup += \"}\";\n } else {\n ans.push([markup]);\n ans.push(\"\");\n }\n } else {\n markup += ch;\n }\n } else {\n if (ch === \"{\") {\n if (template[ρσ_bound_index(pos + 1, template)] === \"{\") {\n pos += 1;\n ans[ans.length-1] += \"{\";\n } else {\n in_brace = 1;\n markup = \"\";\n }\n } else if (ch === \"}\") {\n if (template[ρσ_bound_index(pos + 1, template)] === \"}\") {\n pos += 1;\n ans[ans.length-1] += \"}\";\n } else {\n raise_error(\"f-string: single '}' is not allowed\");\n }\n } else {\n ans[ans.length-1] += ch;\n }\n }\n pos += 1;\n }\n if (in_brace) {\n raise_error(\"expected '}' before end of string\");\n }\n if (ans[ans.length-1] === \"+\") {\n ans[ans.length-1] = \"\";\n }\n for (var i = 0; i < ans.length; i++) {\n if (typeof ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i] === \"string\") {\n ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i] = quoted_string(ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i]);\n } else {\n ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i] = \"+\" + render_markup.apply(this, ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i]) + \"+\";\n }\n }\n return ans.join(\"\");\n };\n if (!interpolate.__argnames__) Object.defineProperties(interpolate, {\n __argnames__ : {value: [\"template\", \"raise_error\"]},\n __module__ : {value: \"string_interpolation\"}\n });\n\n ρσ_modules.string_interpolation.quoted_string = quoted_string;\n ρσ_modules.string_interpolation.render_markup = render_markup;\n ρσ_modules.string_interpolation.interpolate = interpolate;\n })();\n\n (function(){\n var __name__ = \"tokenizer\";\n var RE_HEX_NUMBER, RE_OCT_NUMBER, RE_DEC_NUMBER, OPERATOR_CHARS, ASCII_CONTROL_CHARS, HEX_PAT, NAME_PAT, OPERATORS, OP_MAP, WHITESPACE_CHARS, PUNC_BEFORE_EXPRESSION, PUNC_CHARS, KEYWORDS, KEYWORDS_ATOM, RESERVED_WORDS, KEYWORDS_BEFORE_EXPRESSION, ALL_KEYWORDS, IDENTIFIER_PAT, UNICODE, EX_EOF;\n var ALIAS_MAP = ρσ_modules.unicode_aliases.ALIAS_MAP;\n\n var make_predicate = ρσ_modules.utils.make_predicate;\n var characters = ρσ_modules.utils.characters;\n\n var AST_Token = ρσ_modules.ast.AST_Token;\n\n var SyntaxError = ρσ_modules.errors.SyntaxError;\n\n var interpolate = ρσ_modules.string_interpolation.interpolate;\n\n RE_HEX_NUMBER = /^0x[0-9a-f]+$/i;\n RE_OCT_NUMBER = /^0[0-7]+$/;\n RE_DEC_NUMBER = /^\\d*\\.?\\d*(?:e[+-]?\\d*(?:\\d\\.?|\\.?\\d)\\d*)?$/i;\n OPERATOR_CHARS = make_predicate(characters(\"+-*&%=<>!?|~^@\"));\n ASCII_CONTROL_CHARS = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"a\"] = 7;\n ρσ_d[\"b\"] = 8;\n ρσ_d[\"f\"] = 12;\n ρσ_d[\"n\"] = 10;\n ρσ_d[\"r\"] = 13;\n ρσ_d[\"t\"] = 9;\n ρσ_d[\"v\"] = 11;\n return ρσ_d;\n }).call(this);\n HEX_PAT = /[a-fA-F0-9]/;\n NAME_PAT = /[a-zA-Z ]/;\n OPERATORS = make_predicate(ρσ_list_decorate([ \"in\", \"instanceof\", \"typeof\", \"new\", \"void\", \"del\", \"+\", \"-\", \"not\", \"~\", \"&\", \"|\", \"^\", \"**\", \"*\", \"//\", \"/\", \"%\", \">>\", \"<<\", \">>>\", \"<\", \">\", \"<=\", \">=\", \"==\", \"is\", \"!=\", \"=\", \"+=\", \"-=\", \"//=\", \"/=\", \"*=\", \"%=\", \">>=\", \"<<=\", \">>>=\", \"|=\", \"^=\", \"&=\", \"and\", \"or\", \"@\", \"->\" ]));\n OP_MAP = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"or\"] = \"||\";\n ρσ_d[\"and\"] = \"&&\";\n ρσ_d[\"not\"] = \"!\";\n ρσ_d[\"del\"] = \"delete\";\n ρσ_d[\"None\"] = \"null\";\n ρσ_d[\"is\"] = \"===\";\n return ρσ_d;\n }).call(this);\n WHITESPACE_CHARS = make_predicate(characters(\"  \\n\\r\\t\\f\\u000b​᠎           \\u202f  \"));\n PUNC_BEFORE_EXPRESSION = make_predicate(characters(\"[{(,.;:\"));\n PUNC_CHARS = make_predicate(characters(\"[]{}(),;:?\"));\n KEYWORDS = \"as assert break class continue def del do elif else except finally for from global if import in is new nonlocal pass raise return yield try while with or and not\";\n KEYWORDS_ATOM = \"False None True\";\n RESERVED_WORDS = \"break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof new return super switch this throw try typeof var void while with yield enum implements static private package let public protected interface await null true false\";\n KEYWORDS_BEFORE_EXPRESSION = \"return yield new del raise elif else if\";\n ALL_KEYWORDS = KEYWORDS + \" \" + KEYWORDS_ATOM;\n KEYWORDS = make_predicate(KEYWORDS);\n RESERVED_WORDS = make_predicate(RESERVED_WORDS);\n KEYWORDS_BEFORE_EXPRESSION = make_predicate(KEYWORDS_BEFORE_EXPRESSION);\n KEYWORDS_ATOM = make_predicate(KEYWORDS_ATOM);\n IDENTIFIER_PAT = /^[a-z_$][_a-z0-9$]*$/i;\n function is_string_modifier(val) {\n var ch;\n var ρσ_Iter36 = ρσ_Iterable(val);\n for (var ρσ_Index36 = 0; ρσ_Index36 < ρσ_Iter36.length; ρσ_Index36++) {\n ch = ρσ_Iter36[ρσ_Index36];\n if (\"vrufVRUF\".indexOf(ch) === -1) {\n return false;\n }\n }\n return true;\n };\n if (!is_string_modifier.__argnames__) Object.defineProperties(is_string_modifier, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_letter(code) {\n return code >= 97 && code <= 122 || code >= 65 && code <= 90 || code >= 170 && UNICODE.letter.test(String.fromCharCode(code));\n };\n if (!is_letter.__argnames__) Object.defineProperties(is_letter, {\n __argnames__ : {value: [\"code\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_digit(code) {\n return code >= 48 && code <= 57;\n };\n if (!is_digit.__argnames__) Object.defineProperties(is_digit, {\n __argnames__ : {value: [\"code\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_alphanumeric_char(code) {\n return is_digit(code) || is_letter(code);\n };\n if (!is_alphanumeric_char.__argnames__) Object.defineProperties(is_alphanumeric_char, {\n __argnames__ : {value: [\"code\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_unicode_combining_mark(ch) {\n return UNICODE.non_spacing_mark.test(ch) || UNICODE.space_combining_mark.test(ch);\n };\n if (!is_unicode_combining_mark.__argnames__) Object.defineProperties(is_unicode_combining_mark, {\n __argnames__ : {value: [\"ch\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_unicode_connector_punctuation(ch) {\n return UNICODE.connector_punctuation.test(ch);\n };\n if (!is_unicode_connector_punctuation.__argnames__) Object.defineProperties(is_unicode_connector_punctuation, {\n __argnames__ : {value: [\"ch\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_identifier(name) {\n return !RESERVED_WORDS[(typeof name === \"number\" && name < 0) ? RESERVED_WORDS.length + name : name] && !KEYWORDS[(typeof name === \"number\" && name < 0) ? KEYWORDS.length + name : name] && !KEYWORDS_ATOM[(typeof name === \"number\" && name < 0) ? KEYWORDS_ATOM.length + name : name] && IDENTIFIER_PAT.test(name);\n };\n if (!is_identifier.__argnames__) Object.defineProperties(is_identifier, {\n __argnames__ : {value: [\"name\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_identifier_start(code) {\n return code === 36 || code === 95 || is_letter(code);\n };\n if (!is_identifier_start.__argnames__) Object.defineProperties(is_identifier_start, {\n __argnames__ : {value: [\"code\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function is_identifier_char(ch) {\n var code;\n code = ch.charCodeAt(0);\n return is_identifier_start(code) || is_digit(code) || code === 8204 || code === 8205 || is_unicode_combining_mark(ch) || is_unicode_connector_punctuation(ch);\n };\n if (!is_identifier_char.__argnames__) Object.defineProperties(is_identifier_char, {\n __argnames__ : {value: [\"ch\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function parse_js_number(num) {\n if (RE_HEX_NUMBER.test(num)) {\n return parseInt(num.substr(2), 16);\n } else if (RE_OCT_NUMBER.test(num)) {\n return parseInt(num.substr(1), 8);\n } else if (RE_DEC_NUMBER.test(num)) {\n return parseFloat(num);\n }\n };\n if (!parse_js_number.__argnames__) Object.defineProperties(parse_js_number, {\n __argnames__ : {value: [\"num\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n UNICODE = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"letter\"] = new RegExp(\"[\\\\u0041-\\\\u005A\\\\u0061-\\\\u007A\\\\u00AA\\\\u00B5\\\\u00BA\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02C1\\\\u02C6-\\\\u02D1\\\\u02E0-\\\\u02E4\\\\u02EC\\\\u02EE\\\\u0370-\\\\u0374\\\\u0376\\\\u0377\\\\u037A-\\\\u037D\\\\u0386\\\\u0388-\\\\u038A\\\\u038C\\\\u038E-\\\\u03A1\\\\u03A3-\\\\u03F5\\\\u03F7-\\\\u0481\\\\u048A-\\\\u0523\\\\u0531-\\\\u0556\\\\u0559\\\\u0561-\\\\u0587\\\\u05D0-\\\\u05EA\\\\u05F0-\\\\u05F2\\\\u0621-\\\\u064A\\\\u066E\\\\u066F\\\\u0671-\\\\u06D3\\\\u06D5\\\\u06E5\\\\u06E6\\\\u06EE\\\\u06EF\\\\u06FA-\\\\u06FC\\\\u06FF\\\\u0710\\\\u0712-\\\\u072F\\\\u074D-\\\\u07A5\\\\u07B1\\\\u07CA-\\\\u07EA\\\\u07F4\\\\u07F5\\\\u07FA\\\\u0904-\\\\u0939\\\\u093D\\\\u0950\\\\u0958-\\\\u0961\\\\u0971\\\\u0972\\\\u097B-\\\\u097F\\\\u0985-\\\\u098C\\\\u098F\\\\u0990\\\\u0993-\\\\u09A8\\\\u09AA-\\\\u09B0\\\\u09B2\\\\u09B6-\\\\u09B9\\\\u09BD\\\\u09CE\\\\u09DC\\\\u09DD\\\\u09DF-\\\\u09E1\\\\u09F0\\\\u09F1\\\\u0A05-\\\\u0A0A\\\\u0A0F\\\\u0A10\\\\u0A13-\\\\u0A28\\\\u0A2A-\\\\u0A30\\\\u0A32\\\\u0A33\\\\u0A35\\\\u0A36\\\\u0A38\\\\u0A39\\\\u0A59-\\\\u0A5C\\\\u0A5E\\\\u0A72-\\\\u0A74\\\\u0A85-\\\\u0A8D\\\\u0A8F-\\\\u0A91\\\\u0A93-\\\\u0AA8\\\\u0AAA-\\\\u0AB0\\\\u0AB2\\\\u0AB3\\\\u0AB5-\\\\u0AB9\\\\u0ABD\\\\u0AD0\\\\u0AE0\\\\u0AE1\\\\u0B05-\\\\u0B0C\\\\u0B0F\\\\u0B10\\\\u0B13-\\\\u0B28\\\\u0B2A-\\\\u0B30\\\\u0B32\\\\u0B33\\\\u0B35-\\\\u0B39\\\\u0B3D\\\\u0B5C\\\\u0B5D\\\\u0B5F-\\\\u0B61\\\\u0B71\\\\u0B83\\\\u0B85-\\\\u0B8A\\\\u0B8E-\\\\u0B90\\\\u0B92-\\\\u0B95\\\\u0B99\\\\u0B9A\\\\u0B9C\\\\u0B9E\\\\u0B9F\\\\u0BA3\\\\u0BA4\\\\u0BA8-\\\\u0BAA\\\\u0BAE-\\\\u0BB9\\\\u0BD0\\\\u0C05-\\\\u0C0C\\\\u0C0E-\\\\u0C10\\\\u0C12-\\\\u0C28\\\\u0C2A-\\\\u0C33\\\\u0C35-\\\\u0C39\\\\u0C3D\\\\u0C58\\\\u0C59\\\\u0C60\\\\u0C61\\\\u0C85-\\\\u0C8C\\\\u0C8E-\\\\u0C90\\\\u0C92-\\\\u0CA8\\\\u0CAA-\\\\u0CB3\\\\u0CB5-\\\\u0CB9\\\\u0CBD\\\\u0CDE\\\\u0CE0\\\\u0CE1\\\\u0D05-\\\\u0D0C\\\\u0D0E-\\\\u0D10\\\\u0D12-\\\\u0D28\\\\u0D2A-\\\\u0D39\\\\u0D3D\\\\u0D60\\\\u0D61\\\\u0D7A-\\\\u0D7F\\\\u0D85-\\\\u0D96\\\\u0D9A-\\\\u0DB1\\\\u0DB3-\\\\u0DBB\\\\u0DBD\\\\u0DC0-\\\\u0DC6\\\\u0E01-\\\\u0E30\\\\u0E32\\\\u0E33\\\\u0E40-\\\\u0E46\\\\u0E81\\\\u0E82\\\\u0E84\\\\u0E87\\\\u0E88\\\\u0E8A\\\\u0E8D\\\\u0E94-\\\\u0E97\\\\u0E99-\\\\u0E9F\\\\u0EA1-\\\\u0EA3\\\\u0EA5\\\\u0EA7\\\\u0EAA\\\\u0EAB\\\\u0EAD-\\\\u0EB0\\\\u0EB2\\\\u0EB3\\\\u0EBD\\\\u0EC0-\\\\u0EC4\\\\u0EC6\\\\u0EDC\\\\u0EDD\\\\u0F00\\\\u0F40-\\\\u0F47\\\\u0F49-\\\\u0F6C\\\\u0F88-\\\\u0F8B\\\\u1000-\\\\u102A\\\\u103F\\\\u1050-\\\\u1055\\\\u105A-\\\\u105D\\\\u1061\\\\u1065\\\\u1066\\\\u106E-\\\\u1070\\\\u1075-\\\\u1081\\\\u108E\\\\u10A0-\\\\u10C5\\\\u10D0-\\\\u10FA\\\\u10FC\\\\u1100-\\\\u1159\\\\u115F-\\\\u11A2\\\\u11A8-\\\\u11F9\\\\u1200-\\\\u1248\\\\u124A-\\\\u124D\\\\u1250-\\\\u1256\\\\u1258\\\\u125A-\\\\u125D\\\\u1260-\\\\u1288\\\\u128A-\\\\u128D\\\\u1290-\\\\u12B0\\\\u12B2-\\\\u12B5\\\\u12B8-\\\\u12BE\\\\u12C0\\\\u12C2-\\\\u12C5\\\\u12C8-\\\\u12D6\\\\u12D8-\\\\u1310\\\\u1312-\\\\u1315\\\\u1318-\\\\u135A\\\\u1380-\\\\u138F\\\\u13A0-\\\\u13F4\\\\u1401-\\\\u166C\\\\u166F-\\\\u1676\\\\u1681-\\\\u169A\\\\u16A0-\\\\u16EA\\\\u1700-\\\\u170C\\\\u170E-\\\\u1711\\\\u1720-\\\\u1731\\\\u1740-\\\\u1751\\\\u1760-\\\\u176C\\\\u176E-\\\\u1770\\\\u1780-\\\\u17B3\\\\u17D7\\\\u17DC\\\\u1820-\\\\u1877\\\\u1880-\\\\u18A8\\\\u18AA\\\\u1900-\\\\u191C\\\\u1950-\\\\u196D\\\\u1970-\\\\u1974\\\\u1980-\\\\u19A9\\\\u19C1-\\\\u19C7\\\\u1A00-\\\\u1A16\\\\u1B05-\\\\u1B33\\\\u1B45-\\\\u1B4B\\\\u1B83-\\\\u1BA0\\\\u1BAE\\\\u1BAF\\\\u1C00-\\\\u1C23\\\\u1C4D-\\\\u1C4F\\\\u1C5A-\\\\u1C7D\\\\u1D00-\\\\u1DBF\\\\u1E00-\\\\u1F15\\\\u1F18-\\\\u1F1D\\\\u1F20-\\\\u1F45\\\\u1F48-\\\\u1F4D\\\\u1F50-\\\\u1F57\\\\u1F59\\\\u1F5B\\\\u1F5D\\\\u1F5F-\\\\u1F7D\\\\u1F80-\\\\u1FB4\\\\u1FB6-\\\\u1FBC\\\\u1FBE\\\\u1FC2-\\\\u1FC4\\\\u1FC6-\\\\u1FCC\\\\u1FD0-\\\\u1FD3\\\\u1FD6-\\\\u1FDB\\\\u1FE0-\\\\u1FEC\\\\u1FF2-\\\\u1FF4\\\\u1FF6-\\\\u1FFC\\\\u2071\\\\u207F\\\\u2090-\\\\u2094\\\\u2102\\\\u2107\\\\u210A-\\\\u2113\\\\u2115\\\\u2119-\\\\u211D\\\\u2124\\\\u2126\\\\u2128\\\\u212A-\\\\u212D\\\\u212F-\\\\u2139\\\\u213C-\\\\u213F\\\\u2145-\\\\u2149\\\\u214E\\\\u2183\\\\u2184\\\\u2C00-\\\\u2C2E\\\\u2C30-\\\\u2C5E\\\\u2C60-\\\\u2C6F\\\\u2C71-\\\\u2C7D\\\\u2C80-\\\\u2CE4\\\\u2D00-\\\\u2D25\\\\u2D30-\\\\u2D65\\\\u2D6F\\\\u2D80-\\\\u2D96\\\\u2DA0-\\\\u2DA6\\\\u2DA8-\\\\u2DAE\\\\u2DB0-\\\\u2DB6\\\\u2DB8-\\\\u2DBE\\\\u2DC0-\\\\u2DC6\\\\u2DC8-\\\\u2DCE\\\\u2DD0-\\\\u2DD6\\\\u2DD8-\\\\u2DDE\\\\u2E2F\\\\u3005\\\\u3006\\\\u3031-\\\\u3035\\\\u303B\\\\u303C\\\\u3041-\\\\u3096\\\\u309D-\\\\u309F\\\\u30A1-\\\\u30FA\\\\u30FC-\\\\u30FF\\\\u3105-\\\\u312D\\\\u3131-\\\\u318E\\\\u31A0-\\\\u31B7\\\\u31F0-\\\\u31FF\\\\u3400\\\\u4DB5\\\\u4E00\\\\u9FC3\\\\uA000-\\\\uA48C\\\\uA500-\\\\uA60C\\\\uA610-\\\\uA61F\\\\uA62A\\\\uA62B\\\\uA640-\\\\uA65F\\\\uA662-\\\\uA66E\\\\uA67F-\\\\uA697\\\\uA717-\\\\uA71F\\\\uA722-\\\\uA788\\\\uA78B\\\\uA78C\\\\uA7FB-\\\\uA801\\\\uA803-\\\\uA805\\\\uA807-\\\\uA80A\\\\uA80C-\\\\uA822\\\\uA840-\\\\uA873\\\\uA882-\\\\uA8B3\\\\uA90A-\\\\uA925\\\\uA930-\\\\uA946\\\\uAA00-\\\\uAA28\\\\uAA40-\\\\uAA42\\\\uAA44-\\\\uAA4B\\\\uAC00\\\\uD7A3\\\\uF900-\\\\uFA2D\\\\uFA30-\\\\uFA6A\\\\uFA70-\\\\uFAD9\\\\uFB00-\\\\uFB06\\\\uFB13-\\\\uFB17\\\\uFB1D\\\\uFB1F-\\\\uFB28\\\\uFB2A-\\\\uFB36\\\\uFB38-\\\\uFB3C\\\\uFB3E\\\\uFB40\\\\uFB41\\\\uFB43\\\\uFB44\\\\uFB46-\\\\uFBB1\\\\uFBD3-\\\\uFD3D\\\\uFD50-\\\\uFD8F\\\\uFD92-\\\\uFDC7\\\\uFDF0-\\\\uFDFB\\\\uFE70-\\\\uFE74\\\\uFE76-\\\\uFEFC\\\\uFF21-\\\\uFF3A\\\\uFF41-\\\\uFF5A\\\\uFF66-\\\\uFFBE\\\\uFFC2-\\\\uFFC7\\\\uFFCA-\\\\uFFCF\\\\uFFD2-\\\\uFFD7\\\\uFFDA-\\\\uFFDC]\");\n ρσ_d[\"non_spacing_mark\"] = new RegExp(\"[\\\\u0300-\\\\u036F\\\\u0483-\\\\u0487\\\\u0591-\\\\u05BD\\\\u05BF\\\\u05C1\\\\u05C2\\\\u05C4\\\\u05C5\\\\u05C7\\\\u0610-\\\\u061A\\\\u064B-\\\\u065E\\\\u0670\\\\u06D6-\\\\u06DC\\\\u06DF-\\\\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\\\\u09C1-\\\\u09C4\\\\u09CD\\\\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\\\\u0B3F\\\\u0B41-\\\\u0B44\\\\u0B4D\\\\u0B56\\\\u0B62\\\\u0B63\\\\u0B82\\\\u0BC0\\\\u0BCD\\\\u0C3E-\\\\u0C40\\\\u0C46-\\\\u0C48\\\\u0C4A-\\\\u0C4D\\\\u0C55\\\\u0C56\\\\u0C62\\\\u0C63\\\\u0CBC\\\\u0CBF\\\\u0CC6\\\\u0CCC\\\\u0CCD\\\\u0CE2\\\\u0CE3\\\\u0D41-\\\\u0D44\\\\u0D4D\\\\u0D62\\\\u0D63\\\\u0DCA\\\\u0DD2-\\\\u0DD4\\\\u0DD6\\\\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\\\\u20D0-\\\\u20DC\\\\u20E1\\\\u20E5-\\\\u20F0\\\\u2CEF-\\\\u2CF1\\\\u2DE0-\\\\u2DFF\\\\u302A-\\\\u302F\\\\u3099\\\\u309A\\\\uA66F\\\\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\\\\uFB1E\\\\uFE00-\\\\uFE0F\\\\uFE20-\\\\uFE26]\");\n ρσ_d[\"space_combining_mark\"] = new RegExp(\"[\\\\u0903\\\\u093E-\\\\u0940\\\\u0949-\\\\u094C\\\\u094E\\\\u0982\\\\u0983\\\\u09BE-\\\\u09C0\\\\u09C7\\\\u09C8\\\\u09CB\\\\u09CC\\\\u09D7\\\\u0A03\\\\u0A3E-\\\\u0A40\\\\u0A83\\\\u0ABE-\\\\u0AC0\\\\u0AC9\\\\u0ACB\\\\u0ACC\\\\u0B02\\\\u0B03\\\\u0B3E\\\\u0B40\\\\u0B47\\\\u0B48\\\\u0B4B\\\\u0B4C\\\\u0B57\\\\u0BBE\\\\u0BBF\\\\u0BC1\\\\u0BC2\\\\u0BC6-\\\\u0BC8\\\\u0BCA-\\\\u0BCC\\\\u0BD7\\\\u0C01-\\\\u0C03\\\\u0C41-\\\\u0C44\\\\u0C82\\\\u0C83\\\\u0CBE\\\\u0CC0-\\\\u0CC4\\\\u0CC7\\\\u0CC8\\\\u0CCA\\\\u0CCB\\\\u0CD5\\\\u0CD6\\\\u0D02\\\\u0D03\\\\u0D3E-\\\\u0D40\\\\u0D46-\\\\u0D48\\\\u0D4A-\\\\u0D4C\\\\u0D57\\\\u0D82\\\\u0D83\\\\u0DCF-\\\\u0DD1\\\\u0DD8-\\\\u0DDF\\\\u0DF2\\\\u0DF3\\\\u0F3E\\\\u0F3F\\\\u0F7F\\\\u102B\\\\u102C\\\\u1031\\\\u1038\\\\u103B\\\\u103C\\\\u1056\\\\u1057\\\\u1062-\\\\u1064\\\\u1067-\\\\u106D\\\\u1083\\\\u1084\\\\u1087-\\\\u108C\\\\u108F\\\\u109A-\\\\u109C\\\\u17B6\\\\u17BE-\\\\u17C5\\\\u17C7\\\\u17C8\\\\u1923-\\\\u1926\\\\u1929-\\\\u192B\\\\u1930\\\\u1931\\\\u1933-\\\\u1938\\\\u19B0-\\\\u19C0\\\\u19C8\\\\u19C9\\\\u1A19-\\\\u1A1B\\\\u1A55\\\\u1A57\\\\u1A61\\\\u1A63\\\\u1A64\\\\u1A6D-\\\\u1A72\\\\u1B04\\\\u1B35\\\\u1B3B\\\\u1B3D-\\\\u1B41\\\\u1B43\\\\u1B44\\\\u1B82\\\\u1BA1\\\\u1BA6\\\\u1BA7\\\\u1BAA\\\\u1C24-\\\\u1C2B\\\\u1C34\\\\u1C35\\\\u1CE1\\\\u1CF2\\\\uA823\\\\uA824\\\\uA827\\\\uA880\\\\uA881\\\\uA8B4-\\\\uA8C3\\\\uA952\\\\uA953\\\\uA983\\\\uA9B4\\\\uA9B5\\\\uA9BA\\\\uA9BB\\\\uA9BD-\\\\uA9C0\\\\uAA2F\\\\uAA30\\\\uAA33\\\\uAA34\\\\uAA4D\\\\uAA7B\\\\uABE3\\\\uABE4\\\\uABE6\\\\uABE7\\\\uABE9\\\\uABEA\\\\uABEC]\");\n ρσ_d[\"connector_punctuation\"] = new RegExp(\"[\\\\u005F\\\\u203F\\\\u2040\\\\u2054\\\\uFE33\\\\uFE34\\\\uFE4D-\\\\uFE4F\\\\uFF3F]\");\n return ρσ_d;\n }).call(this);\n function is_token(token, type, val) {\n return token.type === type && (val === null || val === undefined || token.value === val);\n };\n if (!is_token.__argnames__) Object.defineProperties(is_token, {\n __argnames__ : {value: [\"token\", \"type\", \"val\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n EX_EOF = Object.create(null);\n function tokenizer(raw_text, filename) {\n var S, read_string, read_regexp;\n S = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"text\"] = raw_text.replace(/\\r\\n?|[\\n\\u2028\\u2029]/g, \"\\n\").replace(/\\uFEFF/g, \"\");\n ρσ_d[\"filename\"] = filename;\n ρσ_d[\"pos\"] = 0;\n ρσ_d[\"tokpos\"] = 0;\n ρσ_d[\"line\"] = 1;\n ρσ_d[\"tokline\"] = 0;\n ρσ_d[\"col\"] = 0;\n ρσ_d[\"tokcol\"] = 0;\n ρσ_d[\"newline_before\"] = false;\n ρσ_d[\"regex_allowed\"] = false;\n ρσ_d[\"comments_before\"] = [];\n ρσ_d[\"whitespace_before\"] = [];\n ρσ_d[\"newblock\"] = false;\n ρσ_d[\"endblock\"] = false;\n ρσ_d[\"indentation_matters\"] = [ true ];\n ρσ_d[\"cached_whitespace\"] = \"\";\n ρσ_d[\"prev\"] = undefined;\n ρσ_d[\"index_or_slice\"] = [ false ];\n ρσ_d[\"expecting_object_literal_key\"] = false;\n return ρσ_d;\n }).call(this);\n function peek() {\n return S.text.charAt(S.pos);\n };\n if (!peek.__module__) Object.defineProperties(peek, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function prevChar() {\n return S.text.charAt(S.tokpos - 1);\n };\n if (!prevChar.__module__) Object.defineProperties(prevChar, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function next(signal_eof, in_string) {\n var ch;\n ch = S.text.charAt(S.pos);\n S.pos += 1;\n if (signal_eof && !ch) {\n throw EX_EOF;\n }\n if (ch === \"\\n\") {\n S.newline_before = S.newline_before || !in_string;\n S.line += 1;\n S.col = 0;\n } else {\n S.col += 1;\n }\n return ch;\n };\n if (!next.__argnames__) Object.defineProperties(next, {\n __argnames__ : {value: [\"signal_eof\", \"in_string\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function find(what, signal_eof) {\n var pos;\n pos = S.text.indexOf(what, S.pos);\n if (signal_eof && pos === -1) {\n throw EX_EOF;\n }\n return pos;\n };\n if (!find.__argnames__) Object.defineProperties(find, {\n __argnames__ : {value: [\"what\", \"signal_eof\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function start_token() {\n S.tokline = S.line;\n S.tokcol = S.col;\n S.tokpos = S.pos;\n };\n if (!start_token.__module__) Object.defineProperties(start_token, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function token(type, value, is_comment, keep_newline) {\n var ret, i;\n S.regex_allowed = type === \"operator\" || type === \"keyword\" && KEYWORDS_BEFORE_EXPRESSION[(typeof value === \"number\" && value < 0) ? KEYWORDS_BEFORE_EXPRESSION.length + value : value] || type === \"punc\" && PUNC_BEFORE_EXPRESSION[(typeof value === \"number\" && value < 0) ? PUNC_BEFORE_EXPRESSION.length + value : value];\n if (type === \"operator\" && value === \"is\" && S.text.substr(S.pos).trimLeft().substr(0, 4).trimRight() === \"not\") {\n next_token();\n value = \"!==\";\n }\n if (type === \"operator\" && OP_MAP[(typeof value === \"number\" && value < 0) ? OP_MAP.length + value : value]) {\n value = OP_MAP[(typeof value === \"number\" && value < 0) ? OP_MAP.length + value : value];\n }\n ret = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"type\"] = type;\n ρσ_d[\"value\"] = value;\n ρσ_d[\"line\"] = S.tokline;\n ρσ_d[\"col\"] = S.tokcol;\n ρσ_d[\"pos\"] = S.tokpos;\n ρσ_d[\"endpos\"] = S.pos;\n ρσ_d[\"nlb\"] = S.newline_before;\n ρσ_d[\"file\"] = filename;\n ρσ_d[\"leading_whitespace\"] = (ρσ_expr_temp = S.whitespace_before)[ρσ_expr_temp.length-1] || \"\";\n return ρσ_d;\n }).call(this);\n if (!is_comment) {\n ret.comments_before = S.comments_before;\n S.comments_before = [];\n for (var ρσ_Index37 = 0; ρσ_Index37 < ret.comments_before.length; ρσ_Index37++) {\n i = ρσ_Index37;\n ret.nlb = ret.nlb || (ρσ_expr_temp = ret.comments_before)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].nlb;\n }\n }\n if (!keep_newline) {\n S.newline_before = false;\n }\n if (type === \"punc\") {\n if (value === \":\" && !(ρσ_expr_temp = S.index_or_slice)[ρσ_expr_temp.length-1] && !S.expecting_object_literal_key && (!S.text.substring(S.pos + 1, find(\"\\n\")).trim() || !S.text.substring(S.pos + 1, find(\"#\")).trim())) {\n S.newblock = true;\n S.indentation_matters.push(true);\n }\n if (value === \"[\") {\n if (S.prev && (S.prev.type === \"name\" || S.prev.type === \"punc\" && \")]\".indexOf(S.prev.value) !== -1)) {\n S.index_or_slice.push(true);\n } else {\n S.index_or_slice.push(false);\n }\n S.indentation_matters.push(false);\n } else if (value === \"{\" || value === \"(\") {\n S.indentation_matters.push(false);\n } else if (value === \"]\") {\n S.index_or_slice.pop();\n S.indentation_matters.pop();\n } else if (value === \"}\" || value === \")\") {\n S.indentation_matters.pop();\n }\n }\n S.prev = new AST_Token(ret);\n return S.prev;\n };\n if (!token.__argnames__) Object.defineProperties(token, {\n __argnames__ : {value: [\"type\", \"value\", \"is_comment\", \"keep_newline\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function parse_whitespace() {\n var leading_whitespace, whitespace_exists, ch;\n leading_whitespace = \"\";\n whitespace_exists = false;\n while (WHITESPACE_CHARS[ρσ_bound_index(peek(), WHITESPACE_CHARS)]) {\n whitespace_exists = true;\n ch = next();\n if (ch === \"\\n\") {\n leading_whitespace = \"\";\n } else {\n leading_whitespace += ch;\n }\n }\n if (peek() !== \"#\") {\n if (!whitespace_exists) {\n leading_whitespace = S.cached_whitespace;\n } else {\n S.cached_whitespace = leading_whitespace;\n }\n if (S.newline_before || S.endblock) {\n return test_indent_token(leading_whitespace);\n }\n }\n };\n if (!parse_whitespace.__module__) Object.defineProperties(parse_whitespace, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function test_indent_token(leading_whitespace) {\n var most_recent;\n most_recent = (ρσ_expr_temp = S.whitespace_before)[ρσ_expr_temp.length-1] || \"\";\n S.endblock = false;\n if ((ρσ_expr_temp = S.indentation_matters)[ρσ_expr_temp.length-1] && leading_whitespace !== most_recent) {\n if (S.newblock && leading_whitespace && leading_whitespace.indexOf(most_recent) === 0) {\n S.newblock = false;\n S.whitespace_before.push(leading_whitespace);\n return 1;\n } else if (most_recent && most_recent.indexOf(leading_whitespace) === 0) {\n S.endblock = true;\n S.whitespace_before.pop();\n return -1;\n } else {\n parse_error(\"Inconsistent indentation\");\n }\n }\n return 0;\n };\n if (!test_indent_token.__argnames__) Object.defineProperties(test_indent_token, {\n __argnames__ : {value: [\"leading_whitespace\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function read_while(pred) {\n var ret, i, ch;\n ret = \"\";\n i = 0;\n ch = \"\";\n while ((ch = peek()) && pred(ch, i)) {\n i += 1;\n ret += next();\n }\n return ret;\n };\n if (!read_while.__argnames__) Object.defineProperties(read_while, {\n __argnames__ : {value: [\"pred\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function parse_error(err, is_eof) {\n throw new SyntaxError(err, filename, S.tokline, S.tokcol, S.tokpos, is_eof);\n };\n if (!parse_error.__argnames__) Object.defineProperties(parse_error, {\n __argnames__ : {value: [\"err\", \"is_eof\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function read_num(prefix) {\n var has_e, has_x, has_dot, num, valid, seen;\n has_e = false;\n has_x = false;\n has_dot = prefix === \".\";\n if (!prefix && peek() === \"0\" && S.text.charAt(S.pos + 1) === \"b\") {\n [next(), next()];\n num = read_while((function() {\n var ρσ_anonfunc = function (ch) {\n return ch === \"0\" || ch === \"1\";\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"ch\"]},\n __module__ : {value: \"tokenizer\"}\n });\n return ρσ_anonfunc;\n })());\n valid = parseInt(num, 2);\n if (isNaN(valid)) {\n parse_error(\"Invalid syntax for a binary number\");\n }\n return token(\"num\", valid);\n }\n seen = [];\n num = read_while((function() {\n var ρσ_anonfunc = function (ch, i) {\n seen.push(ch);\n if (ch === \"x\" || ch === \"X\") {\n if (has_x || seen.length !== 2 || seen[0] !== \"0\") {\n return false;\n }\n has_x = true;\n return true;\n } else if (ch === \"e\" || ch === \"E\") {\n if (has_x) {\n return true;\n }\n if (has_e || (i === 0 || typeof i === \"object\" && ρσ_equals(i, 0))) {\n return false;\n }\n has_e = true;\n return true;\n } else if (ch === \"-\") {\n if (i === 0 && !prefix) {\n return true;\n }\n if (has_e && seen[ρσ_bound_index(i - 1, seen)].toLowerCase() === \"e\") {\n return true;\n }\n return false;\n } else if (ch === \"+\") {\n if (has_e && seen[ρσ_bound_index(i - 1, seen)].toLowerCase() === \"e\") {\n return true;\n }\n return false;\n } else if (ch === \".\") {\n return (!has_dot && !has_x && !has_e) ? has_dot = true : false;\n }\n return is_alphanumeric_char(ch.charCodeAt(0));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"ch\", \"i\"]},\n __module__ : {value: \"tokenizer\"}\n });\n return ρσ_anonfunc;\n })());\n if (prefix) {\n num = prefix + num;\n }\n valid = parse_js_number(num);\n if (!isNaN(valid)) {\n return token(\"num\", valid);\n } else {\n parse_error(\"Invalid syntax: \" + num);\n }\n };\n if (!read_num.__argnames__) Object.defineProperties(read_num, {\n __argnames__ : {value: [\"prefix\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function read_hex_digits(count) {\n var ans, nval;\n ans = \"\";\n while (count > 0) {\n count -= 1;\n if (!HEX_PAT.test(peek())) {\n return ans;\n }\n ans += next();\n }\n nval = parseInt(ans, 16);\n if (nval > 1114111) {\n return ans;\n }\n return nval;\n };\n if (!read_hex_digits.__argnames__) Object.defineProperties(read_hex_digits, {\n __argnames__ : {value: [\"count\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function read_escape_sequence() {\n var q, octal, code, name, key;\n q = next(true);\n if (q === \"\\n\") {\n return \"\";\n }\n if (q === \"\\\\\") {\n return q;\n }\n if (\"\\\"'\".indexOf(q) !== -1) {\n return q;\n }\n if (ASCII_CONTROL_CHARS[(typeof q === \"number\" && q < 0) ? ASCII_CONTROL_CHARS.length + q : q]) {\n return String.fromCharCode(ASCII_CONTROL_CHARS[(typeof q === \"number\" && q < 0) ? ASCII_CONTROL_CHARS.length + q : q]);\n }\n if (\"0\" <= q && q <= \"7\") {\n octal = q;\n if (\"0\" <= (ρσ_cond_temp = peek()) && ρσ_cond_temp <= \"7\") {\n octal += next();\n }\n if (\"0\" <= (ρσ_cond_temp = peek()) && ρσ_cond_temp <= \"7\") {\n octal += next();\n }\n code = parseInt(octal, 8);\n if (isNaN(code)) {\n return \"\\\\\" + octal;\n }\n return String.fromCharCode(code);\n }\n if (q === \"x\") {\n code = read_hex_digits(2);\n if (typeof code === \"number\") {\n return String.fromCharCode(code);\n }\n return \"\\\\x\" + code;\n }\n if (q === \"u\") {\n code = read_hex_digits(4);\n if (typeof code === \"number\") {\n return String.fromCharCode(code);\n }\n return \"\\\\u\" + code;\n }\n if (q === \"U\") {\n code = read_hex_digits(8);\n if (typeof code === \"number\") {\n if (code <= 65535) {\n return String.fromCharCode(code);\n }\n code -= 65536;\n return String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));\n }\n return \"\\\\U\" + code;\n }\n if (q === \"N\" && peek() === \"{\") {\n next();\n name = read_while((function() {\n var ρσ_anonfunc = function (ch) {\n return NAME_PAT.test(ch);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"ch\"]},\n __module__ : {value: \"tokenizer\"}\n });\n return ρσ_anonfunc;\n })());\n if (peek() !== \"}\") {\n return \"\\\\N{\" + name;\n }\n next();\n key = (name || \"\").toLowerCase();\n if (!name || !Object.prototype.hasOwnProperty.call(ALIAS_MAP, key)) {\n return \"\\\\N{\" + name + \"}\";\n }\n code = ALIAS_MAP[(typeof key === \"number\" && key < 0) ? ALIAS_MAP.length + key : key];\n if (code <= 65535) {\n return String.fromCharCode(code);\n }\n code -= 65536;\n return String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));\n }\n return \"\\\\\" + q;\n };\n if (!read_escape_sequence.__module__) Object.defineProperties(read_escape_sequence, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function with_eof_error(eof_error, cont) {\n return (function() {\n var ρσ_anonfunc = function () {\n try {\n return cont.apply(null, arguments);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n var ex = ρσ_Exception;\n if (ex === EX_EOF) {\n parse_error(eof_error, true);\n } else {\n throw ρσ_Exception;\n }\n } \n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"tokenizer\"}\n });\n return ρσ_anonfunc;\n })();\n };\n if (!with_eof_error.__argnames__) Object.defineProperties(with_eof_error, {\n __argnames__ : {value: [\"eof_error\", \"cont\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n read_string = with_eof_error(\"Unterminated string constant\", (function() {\n var ρσ_anonfunc = function (is_raw_literal, is_js_literal) {\n var quote, tok_type, ret, is_multiline, ch;\n quote = next();\n tok_type = (is_js_literal) ? \"js\" : \"string\";\n ret = \"\";\n is_multiline = false;\n if (peek() === quote) {\n next(true);\n if (peek() === quote) {\n next(true);\n is_multiline = true;\n } else {\n return token(tok_type, \"\");\n }\n }\n while (true) {\n ch = next(true, true);\n if (!ch) {\n break;\n }\n if (ch === \"\\n\" && !is_multiline) {\n parse_error(\"End of line while scanning string literal\");\n }\n if (ch === \"\\\\\") {\n ret += (is_raw_literal) ? \"\\\\\" + next(true) : read_escape_sequence();\n continue;\n }\n if (ch === quote) {\n if (!is_multiline) {\n break;\n }\n if (peek() === quote) {\n next();\n if (peek() === quote) {\n next();\n break;\n } else {\n ch += quote;\n }\n }\n }\n ret += ch;\n }\n return token(tok_type, ret);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"is_raw_literal\", \"is_js_literal\"]},\n __module__ : {value: \"tokenizer\"}\n });\n return ρσ_anonfunc;\n })());\n function handle_interpolated_string(string, start_tok) {\n function raise_error(err) {\n throw new SyntaxError(err, filename, start_tok.line, start_tok.col, start_tok.pos, false);\n };\n if (!raise_error.__argnames__) Object.defineProperties(raise_error, {\n __argnames__ : {value: [\"err\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n S.text = S.text.slice(0, S.pos) + \"(\" + interpolate(string, raise_error) + \")\" + S.text.slice(S.pos);\n return token(\"punc\", next());\n };\n if (!handle_interpolated_string.__argnames__) Object.defineProperties(handle_interpolated_string, {\n __argnames__ : {value: [\"string\", \"start_tok\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function read_line_comment(shebang) {\n var i, ret;\n if (!shebang) {\n next();\n }\n i = find(\"\\n\");\n if (i === -1) {\n ret = S.text.substr(S.pos);\n S.pos = S.text.length;\n } else {\n ret = S.text.substring(S.pos, i);\n S.pos = i;\n }\n return token((shebang) ? \"shebang\" : \"comment1\", ret, true);\n };\n if (!read_line_comment.__argnames__) Object.defineProperties(read_line_comment, {\n __argnames__ : {value: [\"shebang\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function read_name() {\n var name, ch;\n name = ch = \"\";\n while ((ch = peek()) !== null) {\n if (ch === \"\\\\\") {\n if (S.text.charAt(S.pos + 1) === \"\\n\") {\n S.pos += 2;\n continue;\n }\n break;\n } else if (is_identifier_char(ch)) {\n name += next();\n } else {\n break;\n }\n }\n return name;\n };\n if (!read_name.__module__) Object.defineProperties(read_name, {\n __module__ : {value: \"tokenizer\"}\n });\n\n read_regexp = with_eof_error(\"Unterminated regular expression\", (function() {\n var ρσ_anonfunc = function () {\n var prev_backslash, regexp, ch, in_class, verbose_regexp, in_comment, mods;\n prev_backslash = false;\n regexp = ch = \"\";\n in_class = false;\n verbose_regexp = false;\n in_comment = false;\n if (peek() === \"/\") {\n next(true);\n if (peek() === \"/\") {\n verbose_regexp = true;\n next(true);\n } else {\n mods = read_name();\n return token(\"regexp\", new RegExp(regexp, mods));\n }\n }\n while (true) {\n ch = next(true);\n if (!ch) {\n break;\n }\n if (in_comment) {\n if (ch === \"\\n\") {\n in_comment = false;\n }\n continue;\n }\n if (prev_backslash) {\n regexp += \"\\\\\" + ch;\n prev_backslash = false;\n } else if (ch === \"[\") {\n in_class = true;\n regexp += ch;\n } else if (ch === \"]\" && in_class) {\n in_class = false;\n regexp += ch;\n } else if (ch === \"/\" && !in_class) {\n if (verbose_regexp) {\n if (peek() !== \"/\") {\n regexp += \"\\\\/\";\n continue;\n }\n next(true);\n if (peek() !== \"/\") {\n regexp += \"\\\\/\\\\/\";\n continue;\n }\n next(true);\n }\n break;\n } else if (ch === \"\\\\\") {\n prev_backslash = true;\n } else if (verbose_regexp && !in_class && \" \\n\\r\\t\".indexOf(ch) !== -1) {\n } else if (verbose_regexp && !in_class && ch === \"#\") {\n in_comment = true;\n } else {\n regexp += ch;\n }\n }\n mods = read_name();\n return token(\"regexp\", new RegExp(regexp, mods));\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"tokenizer\"}\n });\n return ρσ_anonfunc;\n })());\n function read_operator(prefix) {\n var op;\n function grow(op) {\n var bigger;\n if (!peek()) {\n return op;\n }\n bigger = op + peek();\n if (OPERATORS[(typeof bigger === \"number\" && bigger < 0) ? OPERATORS.length + bigger : bigger]) {\n next();\n return grow(bigger);\n } else {\n return op;\n }\n };\n if (!grow.__argnames__) Object.defineProperties(grow, {\n __argnames__ : {value: [\"op\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n op = grow(prefix || next());\n if (op === \"->\") {\n return token(\"punc\", op);\n }\n return token(\"operator\", op);\n };\n if (!read_operator.__argnames__) Object.defineProperties(read_operator, {\n __argnames__ : {value: [\"prefix\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n function handle_slash() {\n next();\n return (S.regex_allowed) ? read_regexp(\"\") : read_operator(\"/\");\n };\n if (!handle_slash.__module__) Object.defineProperties(handle_slash, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function handle_dot() {\n next();\n return (is_digit(peek().charCodeAt(0))) ? read_num(\".\") : token(\"punc\", \".\");\n };\n if (!handle_dot.__module__) Object.defineProperties(handle_dot, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function read_word() {\n var word;\n word = read_name();\n return (KEYWORDS_ATOM[(typeof word === \"number\" && word < 0) ? KEYWORDS_ATOM.length + word : word]) ? token(\"atom\", word) : (!KEYWORDS[(typeof word === \"number\" && word < 0) ? KEYWORDS.length + word : word]) ? token(\"name\", word) : (OPERATORS[(typeof word === \"number\" && word < 0) ? OPERATORS.length + word : word] && prevChar() !== \".\") ? token(\"operator\", word) : token(\"keyword\", word);\n };\n if (!read_word.__module__) Object.defineProperties(read_word, {\n __module__ : {value: \"tokenizer\"}\n });\n\n function next_token() {\n var indent, ch, code, tmp_, regex_allowed, tok, mods, start_pos_for_string, stok;\n indent = parse_whitespace();\n if (indent === -1) {\n return token(\"punc\", \"}\", false, true);\n }\n start_token();\n ch = peek();\n if (!ch) {\n return token(\"eof\");\n }\n code = ch.charCodeAt(0);\n tmp_ = code;\n if (tmp_ === 34 || tmp_ === 39) {\n return read_string(false);\n } else if (tmp_ === 35) {\n if (S.pos === 0 && S.text.charAt(1) === \"!\") {\n return read_line_comment(true);\n }\n regex_allowed = S.regex_allowed;\n S.comments_before.push(read_line_comment());\n S.regex_allowed = regex_allowed;\n return next_token();\n } else if (tmp_ === 46) {\n return handle_dot();\n } else if (tmp_ === 47) {\n return handle_slash();\n }\n if (is_digit(code)) {\n return read_num();\n }\n if (PUNC_CHARS[(typeof ch === \"number\" && ch < 0) ? PUNC_CHARS.length + ch : ch]) {\n return token(\"punc\", next());\n }\n if (OPERATOR_CHARS[(typeof ch === \"number\" && ch < 0) ? OPERATOR_CHARS.length + ch : ch]) {\n return read_operator();\n }\n if (code === 92 && S.text.charAt(S.pos + 1) === \"\\n\") {\n next();\n next();\n S.newline_before = false;\n return next_token();\n }\n if (is_identifier_start(code)) {\n tok = read_word();\n if (\"'\\\"\".indexOf(peek()) !== -1 && is_string_modifier(tok.value)) {\n mods = tok.value.toLowerCase();\n start_pos_for_string = S.tokpos;\n stok = read_string(mods.indexOf(\"r\") !== -1, mods.indexOf(\"v\") !== -1);\n tok.endpos = stok.endpos;\n if (stok.type !== \"js\" && mods.indexOf(\"f\") !== -1) {\n tok.col += start_pos_for_string - tok.pos;\n return handle_interpolated_string(stok.value, tok);\n }\n tok.value = stok.value;\n tok.type = stok.type;\n }\n return tok;\n }\n parse_error(\"Unexpected character «\" + ch + \"»\");\n };\n if (!next_token.__module__) Object.defineProperties(next_token, {\n __module__ : {value: \"tokenizer\"}\n });\n\n next_token.context = (function() {\n var ρσ_anonfunc = function (nc) {\n if (nc) {\n S = nc;\n }\n return S;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"nc\"]},\n __module__ : {value: \"tokenizer\"}\n });\n return ρσ_anonfunc;\n })();\n return next_token;\n };\n if (!tokenizer.__argnames__) Object.defineProperties(tokenizer, {\n __argnames__ : {value: [\"raw_text\", \"filename\"]},\n __module__ : {value: \"tokenizer\"}\n });\n\n ρσ_modules.tokenizer.RE_HEX_NUMBER = RE_HEX_NUMBER;\n ρσ_modules.tokenizer.RE_OCT_NUMBER = RE_OCT_NUMBER;\n ρσ_modules.tokenizer.RE_DEC_NUMBER = RE_DEC_NUMBER;\n ρσ_modules.tokenizer.OPERATOR_CHARS = OPERATOR_CHARS;\n ρσ_modules.tokenizer.ASCII_CONTROL_CHARS = ASCII_CONTROL_CHARS;\n ρσ_modules.tokenizer.HEX_PAT = HEX_PAT;\n ρσ_modules.tokenizer.NAME_PAT = NAME_PAT;\n ρσ_modules.tokenizer.OPERATORS = OPERATORS;\n ρσ_modules.tokenizer.OP_MAP = OP_MAP;\n ρσ_modules.tokenizer.WHITESPACE_CHARS = WHITESPACE_CHARS;\n ρσ_modules.tokenizer.PUNC_BEFORE_EXPRESSION = PUNC_BEFORE_EXPRESSION;\n ρσ_modules.tokenizer.PUNC_CHARS = PUNC_CHARS;\n ρσ_modules.tokenizer.KEYWORDS = KEYWORDS;\n ρσ_modules.tokenizer.KEYWORDS_ATOM = KEYWORDS_ATOM;\n ρσ_modules.tokenizer.RESERVED_WORDS = RESERVED_WORDS;\n ρσ_modules.tokenizer.KEYWORDS_BEFORE_EXPRESSION = KEYWORDS_BEFORE_EXPRESSION;\n ρσ_modules.tokenizer.ALL_KEYWORDS = ALL_KEYWORDS;\n ρσ_modules.tokenizer.IDENTIFIER_PAT = IDENTIFIER_PAT;\n ρσ_modules.tokenizer.UNICODE = UNICODE;\n ρσ_modules.tokenizer.EX_EOF = EX_EOF;\n ρσ_modules.tokenizer.is_string_modifier = is_string_modifier;\n ρσ_modules.tokenizer.is_letter = is_letter;\n ρσ_modules.tokenizer.is_digit = is_digit;\n ρσ_modules.tokenizer.is_alphanumeric_char = is_alphanumeric_char;\n ρσ_modules.tokenizer.is_unicode_combining_mark = is_unicode_combining_mark;\n ρσ_modules.tokenizer.is_unicode_connector_punctuation = is_unicode_connector_punctuation;\n ρσ_modules.tokenizer.is_identifier = is_identifier;\n ρσ_modules.tokenizer.is_identifier_start = is_identifier_start;\n ρσ_modules.tokenizer.is_identifier_char = is_identifier_char;\n ρσ_modules.tokenizer.parse_js_number = parse_js_number;\n ρσ_modules.tokenizer.is_token = is_token;\n ρσ_modules.tokenizer.tokenizer = tokenizer;\n })();\n\n (function(){\n var __name__ = \"parse\";\n var COMPILER_VERSION, PYTHON_FLAGS, NATIVE_CLASSES, ERROR_CLASSES, COMMON_STATIC, FORBIDDEN_CLASS_VARS, UNARY_PREFIX, ASSIGNMENT, PRECEDENCE, STATEMENTS_WITH_LABELS, ATOMIC_START_TOKEN, compile_time_decorators;\n var make_predicate = ρσ_modules.utils.make_predicate;\n var array_to_hash = ρσ_modules.utils.array_to_hash;\n var defaults = ρσ_modules.utils.defaults;\n var has_prop = ρσ_modules.utils.has_prop;\n var cache_file_name = ρσ_modules.utils.cache_file_name;\n\n var SyntaxError = ρσ_modules.errors.SyntaxError;\n var ImportError = ρσ_modules.errors.ImportError;\n\n var AST_Array = ρσ_modules.ast.AST_Array;\n var AST_Assign = ρσ_modules.ast.AST_Assign;\n var AST_Binary = ρσ_modules.ast.AST_Binary;\n var AST_BlockStatement = ρσ_modules.ast.AST_BlockStatement;\n var AST_Break = ρσ_modules.ast.AST_Break;\n var AST_Call = ρσ_modules.ast.AST_Call;\n var AST_Catch = ρσ_modules.ast.AST_Catch;\n var AST_Class = ρσ_modules.ast.AST_Class;\n var AST_ClassCall = ρσ_modules.ast.AST_ClassCall;\n var AST_Conditional = ρσ_modules.ast.AST_Conditional;\n var AST_Constant = ρσ_modules.ast.AST_Constant;\n var AST_Continue = ρσ_modules.ast.AST_Continue;\n var AST_DWLoop = ρσ_modules.ast.AST_DWLoop;\n var AST_Debugger = ρσ_modules.ast.AST_Debugger;\n var AST_Decorator = ρσ_modules.ast.AST_Decorator;\n var AST_Definitions = ρσ_modules.ast.AST_Definitions;\n var AST_DictComprehension = ρσ_modules.ast.AST_DictComprehension;\n var AST_Directive = ρσ_modules.ast.AST_Directive;\n var AST_Do = ρσ_modules.ast.AST_Do;\n var AST_Dot = ρσ_modules.ast.AST_Dot;\n var AST_Else = ρσ_modules.ast.AST_Else;\n var AST_EmptyStatement = ρσ_modules.ast.AST_EmptyStatement;\n var AST_Except = ρσ_modules.ast.AST_Except;\n var AST_ExpressiveObject = ρσ_modules.ast.AST_ExpressiveObject;\n var AST_False = ρσ_modules.ast.AST_False;\n var AST_Finally = ρσ_modules.ast.AST_Finally;\n var AST_ForIn = ρσ_modules.ast.AST_ForIn;\n var AST_ForJS = ρσ_modules.ast.AST_ForJS;\n var AST_Function = ρσ_modules.ast.AST_Function;\n var AST_GeneratorComprehension = ρσ_modules.ast.AST_GeneratorComprehension;\n var AST_Hole = ρσ_modules.ast.AST_Hole;\n var AST_If = ρσ_modules.ast.AST_If;\n var AST_Import = ρσ_modules.ast.AST_Import;\n var AST_ImportedVar = ρσ_modules.ast.AST_ImportedVar;\n var AST_Imports = ρσ_modules.ast.AST_Imports;\n var AST_ListComprehension = ρσ_modules.ast.AST_ListComprehension;\n var AST_Method = ρσ_modules.ast.AST_Method;\n var AST_New = ρσ_modules.ast.AST_New;\n var AST_Null = ρσ_modules.ast.AST_Null;\n var AST_Number = ρσ_modules.ast.AST_Number;\n var AST_Object = ρσ_modules.ast.AST_Object;\n var AST_ObjectKeyVal = ρσ_modules.ast.AST_ObjectKeyVal;\n var AST_PropAccess = ρσ_modules.ast.AST_PropAccess;\n var AST_RegExp = ρσ_modules.ast.AST_RegExp;\n var AST_Return = ρσ_modules.ast.AST_Return;\n var AST_Scope = ρσ_modules.ast.AST_Scope;\n var AST_Set = ρσ_modules.ast.AST_Set;\n var AST_SetComprehension = ρσ_modules.ast.AST_SetComprehension;\n var AST_SetItem = ρσ_modules.ast.AST_SetItem;\n var AST_Seq = ρσ_modules.ast.AST_Seq;\n var AST_SimpleStatement = ρσ_modules.ast.AST_SimpleStatement;\n var AST_Splice = ρσ_modules.ast.AST_Splice;\n var AST_String = ρσ_modules.ast.AST_String;\n var AST_Sub = ρσ_modules.ast.AST_Sub;\n var AST_ItemAccess = ρσ_modules.ast.AST_ItemAccess;\n var AST_SymbolAlias = ρσ_modules.ast.AST_SymbolAlias;\n var AST_SymbolCatch = ρσ_modules.ast.AST_SymbolCatch;\n var AST_SymbolDefun = ρσ_modules.ast.AST_SymbolDefun;\n var AST_SymbolFunarg = ρσ_modules.ast.AST_SymbolFunarg;\n var AST_SymbolLambda = ρσ_modules.ast.AST_SymbolLambda;\n var AST_SymbolNonlocal = ρσ_modules.ast.AST_SymbolNonlocal;\n var AST_SymbolRef = ρσ_modules.ast.AST_SymbolRef;\n var AST_SymbolVar = ρσ_modules.ast.AST_SymbolVar;\n var AST_This = ρσ_modules.ast.AST_This;\n var AST_Throw = ρσ_modules.ast.AST_Throw;\n var AST_Toplevel = ρσ_modules.ast.AST_Toplevel;\n var AST_True = ρσ_modules.ast.AST_True;\n var AST_Try = ρσ_modules.ast.AST_Try;\n var AST_UnaryPrefix = ρσ_modules.ast.AST_UnaryPrefix;\n var AST_Undefined = ρσ_modules.ast.AST_Undefined;\n var AST_Var = ρσ_modules.ast.AST_Var;\n var AST_VarDef = ρσ_modules.ast.AST_VarDef;\n var AST_Verbatim = ρσ_modules.ast.AST_Verbatim;\n var AST_While = ρσ_modules.ast.AST_While;\n var AST_With = ρσ_modules.ast.AST_With;\n var AST_WithClause = ρσ_modules.ast.AST_WithClause;\n var AST_Yield = ρσ_modules.ast.AST_Yield;\n var AST_Assert = ρσ_modules.ast.AST_Assert;\n var AST_Existential = ρσ_modules.ast.AST_Existential;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n var tokenizer = ρσ_modules.tokenizer.tokenizer;\n var is_token = ρσ_modules.tokenizer.is_token;\n var RESERVED_WORDS = ρσ_modules.tokenizer.RESERVED_WORDS;\n\n COMPILER_VERSION = \"63e1fdf4fbac5bd6a6c811d2112bdba68ad9e213\";\n PYTHON_FLAGS = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"dict_literals\"] = true;\n ρσ_d[\"overload_getitem\"] = true;\n ρσ_d[\"bound_methods\"] = true;\n ρσ_d[\"hash_literals\"] = true;\n return ρσ_d;\n }).call(this);\n function get_compiler_version() {\n return COMPILER_VERSION;\n };\n if (!get_compiler_version.__module__) Object.defineProperties(get_compiler_version, {\n __module__ : {value: \"parse\"}\n });\n\n function static_predicate(names) {\n return (function() {\n var ρσ_Iter = ρσ_Iterable(names.split(\" \")), ρσ_Result = Object.create(null), k;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n k = ρσ_Iter[ρσ_Index];\n ρσ_Result[k] = (true);\n }\n return ρσ_Result;\n })();\n };\n if (!static_predicate.__argnames__) Object.defineProperties(static_predicate, {\n __argnames__ : {value: [\"names\"]},\n __module__ : {value: \"parse\"}\n });\n\n NATIVE_CLASSES = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"Image\"] = Object.create(null);\n ρσ_d[\"FileReader\"] = Object.create(null);\n ρσ_d[\"RegExp\"] = Object.create(null);\n ρσ_d[\"Error\"] = Object.create(null);\n ρσ_d[\"EvalError\"] = Object.create(null);\n ρσ_d[\"InternalError\"] = Object.create(null);\n ρσ_d[\"RangeError\"] = Object.create(null);\n ρσ_d[\"ReferenceError\"] = Object.create(null);\n ρσ_d[\"SyntaxError\"] = Object.create(null);\n ρσ_d[\"TypeError\"] = Object.create(null);\n ρσ_d[\"URIError\"] = Object.create(null);\n ρσ_d[\"Object\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = static_predicate(\"getOwnPropertyNames getOwnPropertyDescriptor getOwnPropertyDescriptors getOwnPropertySymbols keys entries values create defineProperty defineProperties getPrototypeOf setPrototypeOf assign seal isSealed is preventExtensions isExtensible freeze isFrozen\");\n return ρσ_d;\n }).call(this);\n ρσ_d[\"String\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = static_predicate(\"fromCharCode\");\n return ρσ_d;\n }).call(this);\n ρσ_d[\"Array\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = static_predicate(\"isArray from of\");\n return ρσ_d;\n }).call(this);\n ρσ_d[\"Function\"] = Object.create(null);\n ρσ_d[\"Date\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = static_predicate(\"UTC now parse\");\n return ρσ_d;\n }).call(this);\n ρσ_d[\"ArrayBuffer\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = static_predicate(\"isView transfer\");\n return ρσ_d;\n }).call(this);\n ρσ_d[\"DataView\"] = Object.create(null);\n ρσ_d[\"Float32Array\"] = Object.create(null);\n ρσ_d[\"Float64Array\"] = Object.create(null);\n ρσ_d[\"Int16Array\"] = Object.create(null);\n ρσ_d[\"Int32Array\"] = Object.create(null);\n ρσ_d[\"Int8Array\"] = Object.create(null);\n ρσ_d[\"Uint16Array\"] = Object.create(null);\n ρσ_d[\"Uint32Array\"] = Object.create(null);\n ρσ_d[\"Uint8Array\"] = Object.create(null);\n ρσ_d[\"Uint8ClampedArray\"] = Object.create(null);\n ρσ_d[\"Map\"] = Object.create(null);\n ρσ_d[\"WeakMap\"] = Object.create(null);\n ρσ_d[\"Proxy\"] = Object.create(null);\n ρσ_d[\"Set\"] = Object.create(null);\n ρσ_d[\"WeakSet\"] = Object.create(null);\n ρσ_d[\"Promise\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = static_predicate(\"all race reject resolve\");\n return ρσ_d;\n }).call(this);\n ρσ_d[\"WebSocket\"] = Object.create(null);\n ρσ_d[\"XMLHttpRequest\"] = Object.create(null);\n ρσ_d[\"TextEncoder\"] = Object.create(null);\n ρσ_d[\"TextDecoder\"] = Object.create(null);\n ρσ_d[\"MouseEvent\"] = Object.create(null);\n ρσ_d[\"Event\"] = Object.create(null);\n ρσ_d[\"CustomEvent\"] = Object.create(null);\n ρσ_d[\"Blob\"] = Object.create(null);\n return ρσ_d;\n }).call(this);\n ERROR_CLASSES = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"Exception\"] = Object.create(null);\n ρσ_d[\"AttributeError\"] = Object.create(null);\n ρσ_d[\"IndexError\"] = Object.create(null);\n ρσ_d[\"KeyError\"] = Object.create(null);\n ρσ_d[\"ValueError\"] = Object.create(null);\n ρσ_d[\"UnicodeDecodeError\"] = Object.create(null);\n ρσ_d[\"AssertionError\"] = Object.create(null);\n ρσ_d[\"ZeroDivisionError\"] = Object.create(null);\n return ρσ_d;\n }).call(this);\n COMMON_STATIC = static_predicate(\"call apply bind toString\");\n FORBIDDEN_CLASS_VARS = \"prototype constructor\".split(\" \");\n UNARY_PREFIX = make_predicate(\"typeof void delete ~ - + ! @\");\n ASSIGNMENT = make_predicate(\"= += -= /= //= *= %= >>= <<= >>>= |= ^= &=\");\n PRECEDENCE = (function() {\n var ρσ_anonfunc = function (a, ret) {\n var b, j, i;\n for (var ρσ_Index38 = 0; ρσ_Index38 < a.length; ρσ_Index38++) {\n i = ρσ_Index38;\n b = a[(typeof i === \"number\" && i < 0) ? a.length + i : i];\n for (var ρσ_Index39 = 0; ρσ_Index39 < b.length; ρσ_Index39++) {\n j = ρσ_Index39;\n ret[ρσ_bound_index(b[(typeof j === \"number\" && j < 0) ? b.length + j : j], ret)] = i + 1;\n }\n }\n return ret;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"a\", \"ret\"]},\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })()(ρσ_list_decorate([ ρσ_list_decorate([ \"||\" ]), ρσ_list_decorate([ \"&&\" ]), ρσ_list_decorate([ \"|\" ]), ρσ_list_decorate([ \"^\" ]), ρσ_list_decorate([ \"&\" ]), ρσ_list_decorate([ \"==\", \"===\", \"!=\", \"!==\" ]), ρσ_list_decorate([ \"<\", \">\", \"<=\", \">=\", \"in\", \"nin\", \"instanceof\" ]), ρσ_list_decorate([ \">>\", \"<<\", \">>>\" ]), ρσ_list_decorate([ \"+\", \"-\" ]), ρσ_list_decorate([ \"*\", \"/\", \"//\", \"%\" ]), ρσ_list_decorate([ \"**\" ]) ]), Object.create(null));\n STATEMENTS_WITH_LABELS = array_to_hash(ρσ_list_decorate([ \"for\", \"do\", \"while\", \"switch\" ]));\n ATOMIC_START_TOKEN = array_to_hash(ρσ_list_decorate([ \"atom\", \"num\", \"string\", \"regexp\", \"name\", \"js\" ]));\n compile_time_decorators = ρσ_list_decorate([ \"staticmethod\", \"external\", \"property\" ]);\n function has_simple_decorator(decorators, name) {\n var remove, s;\n remove = [];\n for (var i = 0; i < decorators.length; i++) {\n s = decorators[(typeof i === \"number\" && i < 0) ? decorators.length + i : i];\n if (is_node_type(s, AST_SymbolRef) && !s.parens && s.name === name) {\n remove.push(i);\n }\n }\n if (remove.length) {\n remove.reverse();\n for (var i = 0; i < remove.length; i++) {\n decorators.splice(remove[(typeof i === \"number\" && i < 0) ? remove.length + i : i], 1);\n }\n return true;\n }\n return false;\n };\n if (!has_simple_decorator.__argnames__) Object.defineProperties(has_simple_decorator, {\n __argnames__ : {value: [\"decorators\", \"name\"]},\n __module__ : {value: \"parse\"}\n });\n\n function has_setter_decorator(decorators, name) {\n var remove, s;\n remove = [];\n for (var i = 0; i < decorators.length; i++) {\n s = decorators[(typeof i === \"number\" && i < 0) ? decorators.length + i : i];\n if (is_node_type(s, AST_Dot) && is_node_type(s.expression, AST_SymbolRef) && s.expression.name === name && s.property === \"setter\") {\n remove.push(i);\n }\n }\n if (remove.length) {\n remove.reverse();\n for (var i = 0; i < remove.length; i++) {\n decorators.splice(remove[(typeof i === \"number\" && i < 0) ? remove.length + i : i], 1);\n }\n return true;\n }\n return false;\n };\n if (!has_setter_decorator.__argnames__) Object.defineProperties(has_setter_decorator, {\n __argnames__ : {value: [\"decorators\", \"name\"]},\n __module__ : {value: \"parse\"}\n });\n\n function create_parser_ctx(S, import_dirs, module_id, baselib_items, imported_module_ids, imported_modules, importing_modules, options) {\n function next() {\n S.prev = S.token;\n if (S.peeked.length) {\n S.token = S.peeked.shift();\n } else {\n S.token = S.input();\n }\n return S.token;\n };\n if (!next.__module__) Object.defineProperties(next, {\n __module__ : {value: \"parse\"}\n });\n\n function is_(type, value) {\n return is_token(S.token, type, value);\n };\n if (!is_.__argnames__) Object.defineProperties(is_, {\n __argnames__ : {value: [\"type\", \"value\"]},\n __module__ : {value: \"parse\"}\n });\n\n function peek() {\n if (!S.peeked.length) {\n S.peeked.push(S.input());\n }\n return S.peeked[0];\n };\n if (!peek.__module__) Object.defineProperties(peek, {\n __module__ : {value: \"parse\"}\n });\n\n function prev() {\n return S.prev;\n };\n if (!prev.__module__) Object.defineProperties(prev, {\n __module__ : {value: \"parse\"}\n });\n\n function croak(msg, line, col, pos, is_eof) {\n var ctx;\n ctx = S.input.context();\n throw new SyntaxError(msg, ctx.filename, (line !== undefined) ? line : ctx.tokline, (col !== undefined) ? col : ctx.tokcol, (pos !== undefined) ? pos : ctx.tokpos, is_eof);\n };\n if (!croak.__argnames__) Object.defineProperties(croak, {\n __argnames__ : {value: [\"msg\", \"line\", \"col\", \"pos\", \"is_eof\"]},\n __module__ : {value: \"parse\"}\n });\n\n function token_error(token, msg) {\n var is_eof;\n is_eof = token.type === \"eof\";\n croak(msg, token.line, token.col, undefined, is_eof);\n };\n if (!token_error.__argnames__) Object.defineProperties(token_error, {\n __argnames__ : {value: [\"token\", \"msg\"]},\n __module__ : {value: \"parse\"}\n });\n\n function unexpected(token) {\n if (token === undefined) {\n token = S.token;\n }\n token_error(token, \"Unexpected token: \" + token.type + \" «\" + token.value + \"»\");\n };\n if (!unexpected.__argnames__) Object.defineProperties(unexpected, {\n __argnames__ : {value: [\"token\"]},\n __module__ : {value: \"parse\"}\n });\n\n function expect_token(type, val) {\n if (is_(type, val)) {\n return next();\n }\n token_error(S.token, \"Unexpected token \" + S.token.type + \" «\" + S.token.value + \"»\" + \", expected \" + type + \" «\" + val + \"»\");\n };\n if (!expect_token.__argnames__) Object.defineProperties(expect_token, {\n __argnames__ : {value: [\"type\", \"val\"]},\n __module__ : {value: \"parse\"}\n });\n\n function expect(punc) {\n return expect_token(\"punc\", punc);\n };\n if (!expect.__argnames__) Object.defineProperties(expect, {\n __argnames__ : {value: [\"punc\"]},\n __module__ : {value: \"parse\"}\n });\n\n function semicolon() {\n if (is_(\"punc\", \";\")) {\n next();\n S.token.nlb = true;\n }\n };\n if (!semicolon.__module__) Object.defineProperties(semicolon, {\n __module__ : {value: \"parse\"}\n });\n\n function embed_tokens(parser) {\n function with_embedded_tokens() {\n var start, expr, end;\n start = S.token;\n expr = parser();\n if (expr === undefined) {\n unexpected();\n }\n end = prev();\n expr.start = start;\n expr.end = end;\n return expr;\n };\n if (!with_embedded_tokens.__module__) Object.defineProperties(with_embedded_tokens, {\n __module__ : {value: \"parse\"}\n });\n\n return with_embedded_tokens;\n };\n if (!embed_tokens.__argnames__) Object.defineProperties(embed_tokens, {\n __argnames__ : {value: [\"parser\"]},\n __module__ : {value: \"parse\"}\n });\n\n function scan_for_top_level_callables(body) {\n var ans, opt, x, obj;\n ans = [];\n if (Array.isArray(body)) {\n var ρσ_Iter40 = ρσ_Iterable(body);\n for (var ρσ_Index40 = 0; ρσ_Index40 < ρσ_Iter40.length; ρσ_Index40++) {\n obj = ρσ_Iter40[ρσ_Index40];\n if (is_node_type(obj, AST_Function) || is_node_type(obj, AST_Class)) {\n if (obj.name) {\n ans.push(obj.name.name);\n } else {\n token_error(obj.start, \"Top-level functions must have names\");\n }\n } else {\n if (is_node_type(obj, AST_Scope)) {\n continue;\n }\n var ρσ_Iter41 = ρσ_Iterable(ρσ_list_decorate([ \"body\", \"alternative\" ]));\n for (var ρσ_Index41 = 0; ρσ_Index41 < ρσ_Iter41.length; ρσ_Index41++) {\n x = ρσ_Iter41[ρσ_Index41];\n opt = obj[(typeof x === \"number\" && x < 0) ? obj.length + x : x];\n if (opt) {\n ans = ans.concat(scan_for_top_level_callables(opt));\n }\n if (is_node_type(opt, AST_Assign) && !(is_node_type(opt.right, AST_Scope))) {\n ans = ans.concat(scan_for_top_level_callables(opt.right));\n }\n }\n }\n }\n } else if (body.body) {\n ans = ans.concat(scan_for_top_level_callables(body.body));\n if (body.alternative) {\n ans = ans.concat(scan_for_top_level_callables(body.alternative));\n }\n }\n return ans;\n };\n if (!scan_for_top_level_callables.__argnames__) Object.defineProperties(scan_for_top_level_callables, {\n __argnames__ : {value: [\"body\"]},\n __module__ : {value: \"parse\"}\n });\n\n function scan_for_classes(body) {\n var ans, obj;\n ans = Object.create(null);\n var ρσ_Iter42 = ρσ_Iterable(body);\n for (var ρσ_Index42 = 0; ρσ_Index42 < ρσ_Iter42.length; ρσ_Index42++) {\n obj = ρσ_Iter42[ρσ_Index42];\n if (is_node_type(obj, AST_Class)) {\n ans[ρσ_bound_index(obj.name.name, ans)] = obj;\n }\n }\n return ans;\n };\n if (!scan_for_classes.__argnames__) Object.defineProperties(scan_for_classes, {\n __argnames__ : {value: [\"body\"]},\n __module__ : {value: \"parse\"}\n });\n\n function scan_for_local_vars(body) {\n var localvars, seen, opt, option, clause, stmt, is_compound_assign, lhs;\n localvars = [];\n seen = Object.create(null);\n function push(x) {\n if (has_prop(seen, x)) {\n return;\n }\n seen[(typeof x === \"number\" && x < 0) ? seen.length + x : x] = true;\n localvars.push(x);\n };\n if (!push.__argnames__) Object.defineProperties(push, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"parse\"}\n });\n\n function extend(arr) {\n var x;\n var ρσ_Iter43 = ρσ_Iterable(arr);\n for (var ρσ_Index43 = 0; ρσ_Index43 < ρσ_Iter43.length; ρσ_Index43++) {\n x = ρσ_Iter43[ρσ_Index43];\n push(x);\n }\n };\n if (!extend.__argnames__) Object.defineProperties(extend, {\n __argnames__ : {value: [\"arr\"]},\n __module__ : {value: \"parse\"}\n });\n\n function scan_in_array(arr) {\n var x;\n var ρσ_Iter44 = ρσ_Iterable(arr);\n for (var ρσ_Index44 = 0; ρσ_Index44 < ρσ_Iter44.length; ρσ_Index44++) {\n x = ρσ_Iter44[ρσ_Index44];\n if (is_node_type(x, AST_Seq)) {\n x = x.to_array();\n } else if (is_node_type(x, AST_Array)) {\n x = x.elements;\n }\n if (Array.isArray(x)) {\n scan_in_array(x);\n } else {\n if (!is_node_type(x, AST_PropAccess)) {\n push(x.name);\n }\n }\n }\n };\n if (!scan_in_array.__argnames__) Object.defineProperties(scan_in_array, {\n __argnames__ : {value: [\"arr\"]},\n __module__ : {value: \"parse\"}\n });\n\n function add_assign_lhs(lhs) {\n if (is_node_type(lhs, AST_Seq)) {\n lhs = new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = lhs.to_array();\n return ρσ_d;\n }).call(this));\n }\n if (is_node_type(lhs, AST_Array)) {\n push(\"ρσ_unpack\");\n scan_in_array(lhs.elements);\n } else if (lhs.name) {\n push(lhs.name);\n }\n };\n if (!add_assign_lhs.__argnames__) Object.defineProperties(add_assign_lhs, {\n __argnames__ : {value: [\"lhs\"]},\n __module__ : {value: \"parse\"}\n });\n\n function add_for_in(stmt) {\n if (is_node_type(stmt.init, AST_Array)) {\n push(\"ρσ_unpack\");\n scan_in_array(stmt.init.elements);\n } else {\n push(stmt.init.name);\n }\n };\n if (!add_for_in.__argnames__) Object.defineProperties(add_for_in, {\n __argnames__ : {value: [\"stmt\"]},\n __module__ : {value: \"parse\"}\n });\n\n if (Array.isArray(body)) {\n var ρσ_Iter45 = ρσ_Iterable(body);\n for (var ρσ_Index45 = 0; ρσ_Index45 < ρσ_Iter45.length; ρσ_Index45++) {\n stmt = ρσ_Iter45[ρσ_Index45];\n if (is_node_type(stmt, AST_Scope)) {\n continue;\n }\n var ρσ_Iter46 = ρσ_Iterable(ρσ_list_decorate([ \"body\", \"alternative\", \"bcatch\", \"condition\" ]));\n for (var ρσ_Index46 = 0; ρσ_Index46 < ρσ_Iter46.length; ρσ_Index46++) {\n option = ρσ_Iter46[ρσ_Index46];\n opt = stmt[(typeof option === \"number\" && option < 0) ? stmt.length + option : option];\n if (opt) {\n extend(scan_for_local_vars(opt));\n }\n if (is_node_type(opt, AST_Assign) && !(is_node_type(opt.right, AST_Scope))) {\n extend(scan_for_local_vars(opt.right));\n }\n }\n if (is_node_type(stmt, AST_ForIn)) {\n add_for_in(stmt);\n } else if (is_node_type(stmt, AST_DWLoop)) {\n extend(scan_for_local_vars(stmt));\n } else if (is_node_type(stmt, AST_With)) {\n [push(\"ρσ_with_exception\"), push(\"ρσ_with_suppress\")];\n var ρσ_Iter47 = ρσ_Iterable(stmt.clauses);\n for (var ρσ_Index47 = 0; ρσ_Index47 < ρσ_Iter47.length; ρσ_Index47++) {\n clause = ρσ_Iter47[ρσ_Index47];\n if (clause.alias) {\n push(clause.alias.name);\n }\n }\n }\n }\n } else if (body.body) {\n extend(scan_for_local_vars(body.body));\n if (body.alternative) {\n extend(scan_for_local_vars(body.alternative));\n }\n } else if (is_node_type(body, AST_Assign)) {\n if (body.is_chained()) {\n is_compound_assign = false;\n var ρσ_Iter48 = ρσ_Iterable(body.traverse_chain()[0]);\n for (var ρσ_Index48 = 0; ρσ_Index48 < ρσ_Iter48.length; ρσ_Index48++) {\n lhs = ρσ_Iter48[ρσ_Index48];\n add_assign_lhs(lhs);\n if (is_node_type(lhs, AST_Seq) || is_node_type(lhs, AST_Array)) {\n is_compound_assign = true;\n break;\n }\n }\n if (is_compound_assign) {\n push(\"ρσ_chain_assign_temp\");\n }\n } else {\n add_assign_lhs(body.left);\n }\n if (!is_node_type(body.right, AST_Scope)) {\n extend(scan_for_local_vars(body.right));\n }\n } else if (is_node_type(body, AST_ForIn)) {\n add_for_in(body);\n }\n return localvars;\n };\n if (!scan_for_local_vars.__argnames__) Object.defineProperties(scan_for_local_vars, {\n __argnames__ : {value: [\"body\"]},\n __module__ : {value: \"parse\"}\n });\n\n function scan_for_nonlocal_defs(body) {\n var vardef, opt, option, stmt;\n vars = [];\n if (Array.isArray(body)) {\n var ρσ_Iter49 = ρσ_Iterable(body);\n for (var ρσ_Index49 = 0; ρσ_Index49 < ρσ_Iter49.length; ρσ_Index49++) {\n stmt = ρσ_Iter49[ρσ_Index49];\n if (is_node_type(stmt, AST_Scope)) {\n continue;\n }\n if (is_node_type(stmt, AST_Definitions)) {\n var ρσ_Iter50 = ρσ_Iterable(stmt.definitions);\n for (var ρσ_Index50 = 0; ρσ_Index50 < ρσ_Iter50.length; ρσ_Index50++) {\n vardef = ρσ_Iter50[ρσ_Index50];\n vars.push(vardef.name.name);\n }\n }\n var ρσ_Iter51 = ρσ_Iterable(ρσ_list_decorate([ \"body\", \"alternative\" ]));\n for (var ρσ_Index51 = 0; ρσ_Index51 < ρσ_Iter51.length; ρσ_Index51++) {\n option = ρσ_Iter51[ρσ_Index51];\n var vars;\n opt = stmt[(typeof option === \"number\" && option < 0) ? stmt.length + option : option];\n if (opt) {\n vars = vars.concat(scan_for_nonlocal_defs(opt));\n }\n }\n }\n } else if (body.body) {\n vars = vars.concat(scan_for_nonlocal_defs(body.body));\n if (body.alternative) {\n vars = vars.concat(scan_for_nonlocal_defs(body.alternative));\n }\n }\n return vars;\n };\n if (!scan_for_nonlocal_defs.__argnames__) Object.defineProperties(scan_for_nonlocal_defs, {\n __argnames__ : {value: [\"body\"]},\n __module__ : {value: \"parse\"}\n });\n\n function return_() {\n var value, is_end_of_statement;\n if (is_(\"punc\", \";\")) {\n semicolon();\n value = null;\n } else {\n is_end_of_statement = S.token.nlb || is_(\"eof\") || is_(\"punc\", \"}\");\n if (is_end_of_statement) {\n value = null;\n } else {\n value = expression(true);\n semicolon();\n }\n }\n return value;\n };\n if (!return_.__module__) Object.defineProperties(return_, {\n __module__ : {value: \"parse\"}\n });\n\n \n var statement = embed_tokens((function() {\n var ρσ_anonfunc = function statement() {\n var tmp_, p, while_cond, start, func, chain, cond, msg, tmp;\n if (S.token.type === \"operator\" && S.token.value.substr(0, 1) === \"/\") {\n token_error(S.token, \"RapydScript does not support statements starting with regexp literals\");\n }\n S.statement_starting_token = S.token;\n tmp_ = S.token.type;\n p = prev();\n if (p && !S.token.nlb && ATOMIC_START_TOKEN[ρσ_bound_index(p.type, ATOMIC_START_TOKEN)] && !is_(\"punc\", \":\")) {\n unexpected();\n }\n if (tmp_ === \"string\") {\n return simple_statement();\n } else if (tmp_ === \"shebang\") {\n tmp_ = S.token.value;\n next();\n return new AST_Directive((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = tmp_;\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"num\" || tmp_ === \"regexp\" || tmp_ === \"operator\" || tmp_ === \"atom\" || tmp_ === \"js\") {\n return simple_statement();\n } else if (tmp_ === \"punc\") {\n tmp_ = S.token.value;\n if (tmp_ === \":\") {\n return new AST_BlockStatement((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = S.token;\n ρσ_d[\"body\"] = block_();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"{\" || tmp_ === \"[\" || tmp_ === \"(\") {\n return simple_statement();\n } else if (tmp_ === \";\") {\n next();\n return new AST_EmptyStatement((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"stype\"] = \";\";\n ρσ_d[\"start\"] = prev();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n } else {\n unexpected();\n }\n } else if (tmp_ === \"name\") {\n if (is_token(peek(), \"punc\", \":\")) token_error(peek(), \"invalid syntax, colon not allowed here\");\n return simple_statement();\n } else if (tmp_ === \"keyword\") {\n tmp_ = S.token.value;\n next();\n if (tmp_ === \"break\") {\n return break_cont(AST_Break);\n } else if (tmp_ === \"continue\") {\n return break_cont(AST_Continue);\n } else if (tmp_ === \"debugger\") {\n semicolon();\n return new AST_Debugger;\n } else if (tmp_ === \"do\") {\n return new AST_Do((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"body\"] = in_loop(statement);\n ρσ_d[\"condition\"] = (function() {\n var ρσ_anonfunc = function () {\n var tmp;\n expect(\".\");\n expect_token(\"keyword\", \"while\");\n tmp = expression(true);\n if (is_node_type(tmp, AST_Assign)) {\n croak(\"Assignments in do loop conditions are not allowed\");\n }\n semicolon();\n return tmp;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })()();\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"while\") {\n while_cond = expression(true);\n if (is_node_type(while_cond, AST_Assign)) {\n croak(\"Assignments in while loop conditions are not allowed\");\n }\n if (!is_(\"punc\", \":\")) {\n croak(\"Expected a colon after the while statement\");\n }\n return new AST_While((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = while_cond;\n ρσ_d[\"body\"] = in_loop(statement);\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"for\") {\n if (is_(\"js\")) {\n return for_js();\n }\n return for_();\n } else if (tmp_ === \"from\") {\n return import_(true);\n } else if (tmp_ === \"import\") {\n return import_(false);\n } else if (tmp_ === \"class\") {\n return class_();\n } else if (tmp_ === \"def\") {\n start = prev();\n func = function_((ρσ_expr_temp = S.in_class)[ρσ_expr_temp.length-1], false);\n func.start = start;\n func.end = prev();\n chain = subscripts(func, true);\n if (chain === func) {\n return func;\n } else {\n return new AST_SimpleStatement((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"body\"] = chain;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n }\n } else if (tmp_ === \"assert\") {\n start = prev();\n cond = expression(false);\n msg = null;\n if (is_(\"punc\", \",\")) {\n next();\n msg = expression(false);\n }\n return new AST_Assert((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"condition\"] = cond;\n ρσ_d[\"message\"] = msg;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"if\") {\n return if_();\n } else if (tmp_ === \"pass\") {\n semicolon();\n return new AST_EmptyStatement((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"stype\"] = \"pass\";\n ρσ_d[\"start\"] = prev();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"return\") {\n if (S.in_function === 0) {\n croak(\"'return' outside of function\");\n }\n if ((ρσ_expr_temp = S.functions)[ρσ_expr_temp.length-1].is_generator) {\n croak(\"'return' not allowed in a function with yield\");\n }\n (ρσ_expr_temp = S.functions)[ρσ_expr_temp.length-1].is_generator = false;\n return new AST_Return((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = return_();\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"yield\") {\n return yield_();\n } else if (tmp_ === \"raise\") {\n if (S.token.nlb) {\n return new AST_Throw((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = new AST_SymbolCatch((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"ρσ_Exception\";\n return ρσ_d;\n }).call(this));\n return ρσ_d;\n }).call(this));\n }\n tmp = expression(true);\n semicolon();\n return new AST_Throw((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = tmp;\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"try\") {\n return try_();\n } else if (tmp_ === \"nonlocal\") {\n tmp = nonlocal_();\n semicolon();\n return tmp;\n } else if (tmp_ === \"global\") {\n tmp = nonlocal_(true);\n semicolon();\n return tmp;\n } else if (tmp_ === \"with\") {\n return with_();\n } else {\n unexpected();\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })());\n\n function with_() {\n var clauses, start, expr, alias, body;\n clauses = [];\n start = S.token;\n while (true) {\n if (is_(\"eof\")) {\n unexpected();\n }\n expr = expression();\n alias = null;\n if (is_(\"keyword\", \"as\")) {\n next();\n alias = as_symbol(AST_SymbolAlias);\n }\n clauses.push(new AST_WithClause((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"alias\"] = alias;\n return ρσ_d;\n }).call(this)));\n if (is_(\"punc\", \",\")) {\n next();\n continue;\n }\n if (!is_(\"punc\", \":\")) {\n unexpected();\n }\n break;\n }\n if (!clauses.length) {\n token_error(start, \"with statement must have at least one clause\");\n }\n body = statement();\n return new AST_With((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"clauses\"] = clauses;\n ρσ_d[\"body\"] = body;\n return ρσ_d;\n }).call(this));\n };\n if (!with_.__module__) Object.defineProperties(with_, {\n __module__ : {value: \"parse\"}\n });\n\n function simple_statement(tmp) {\n tmp = expression(true);\n semicolon();\n return new AST_SimpleStatement((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"body\"] = tmp;\n return ρσ_d;\n }).call(this));\n };\n if (!simple_statement.__argnames__) Object.defineProperties(simple_statement, {\n __argnames__ : {value: [\"tmp\"]},\n __module__ : {value: \"parse\"}\n });\n\n function break_cont(t) {\n if (S.in_loop === 0) {\n croak(t.name.slice(4) + \" not inside a loop or switch\");\n }\n semicolon();\n return new t;\n };\n if (!break_cont.__argnames__) Object.defineProperties(break_cont, {\n __argnames__ : {value: [\"t\"]},\n __module__ : {value: \"parse\"}\n });\n\n function yield_() {\n var is_yield_from;\n if (S.in_function === 0) {\n croak(\"'yield' outside of function\");\n }\n if ((ρσ_expr_temp = S.functions)[ρσ_expr_temp.length-1].is_generator === false) {\n croak(\"'yield' not allowed in a function with return\");\n }\n (ρσ_expr_temp = S.functions)[ρσ_expr_temp.length-1].is_generator = true;\n is_yield_from = is_(\"keyword\", \"from\");\n if (is_yield_from) {\n next();\n }\n return new AST_Yield((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"is_yield_from\"] = is_yield_from;\n ρσ_d[\"value\"] = return_();\n return ρσ_d;\n }).call(this));\n };\n if (!yield_.__module__) Object.defineProperties(yield_, {\n __module__ : {value: \"parse\"}\n });\n\n function for_(list_comp) {\n var init, tmp;\n init = null;\n if (!is_(\"punc\", \";\")) {\n init = expression(true, true);\n if (is_node_type(init, AST_Seq)) {\n if (is_node_type(init.car, AST_SymbolRef) && is_node_type(init.cdr, AST_SymbolRef)) {\n tmp = init.to_array();\n } else {\n tmp = ρσ_list_decorate([ init ]);\n }\n init = new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = init.start;\n ρσ_d[\"elements\"] = tmp;\n ρσ_d[\"end\"] = init.end;\n return ρσ_d;\n }).call(this));\n }\n if (is_(\"operator\", \"in\")) {\n if (is_node_type(init, AST_Var) && init.definitions.length > 1) {\n croak(\"Only one variable declaration allowed in for..in loop\");\n }\n next();\n return for_in(init, list_comp);\n }\n }\n unexpected();\n };\n if (!for_.__argnames__) Object.defineProperties(for_, {\n __argnames__ : {value: [\"list_comp\"]},\n __module__ : {value: \"parse\"}\n });\n\n function for_in(init, list_comp) {\n var lhs, obj;\n lhs = (is_node_type(init, AST_Var)) ? init.definitions[0].name : null;\n obj = expression(true);\n if (list_comp) {\n return (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"init\"] = init;\n ρσ_d[\"name\"] = lhs;\n ρσ_d[\"object\"] = obj;\n return ρσ_d;\n }).call(this);\n }\n return new AST_ForIn((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"init\"] = init;\n ρσ_d[\"name\"] = lhs;\n ρσ_d[\"object\"] = obj;\n ρσ_d[\"body\"] = in_loop(statement);\n return ρσ_d;\n }).call(this));\n };\n if (!for_in.__argnames__) Object.defineProperties(for_in, {\n __argnames__ : {value: [\"init\", \"list_comp\"]},\n __module__ : {value: \"parse\"}\n });\n\n function for_js() {\n var condition;\n condition = as_atom_node();\n return new AST_ForJS((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = condition;\n ρσ_d[\"body\"] = in_loop(statement);\n return ρσ_d;\n }).call(this));\n };\n if (!for_js.__module__) Object.defineProperties(for_js, {\n __module__ : {value: \"parse\"}\n });\n\n function get_class_in_scope(expr) {\n var s, referenced_path, class_name;\n if (is_node_type(expr, AST_SymbolRef)) {\n if (has_prop(NATIVE_CLASSES, expr.name)) {\n return NATIVE_CLASSES[ρσ_bound_index(expr.name, NATIVE_CLASSES)];\n }\n if (has_prop(ERROR_CLASSES, expr.name)) {\n return ERROR_CLASSES[ρσ_bound_index(expr.name, ERROR_CLASSES)];\n }\n for (var ρσ_Index52 = S.classes.length - 1; ρσ_Index52 > -1; ρσ_Index52-=1) {\n s = ρσ_Index52;\n if (has_prop((ρσ_expr_temp = S.classes)[(typeof s === \"number\" && s < 0) ? ρσ_expr_temp.length + s : s], expr.name)) {\n return (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[(typeof s === \"number\" && s < 0) ? ρσ_expr_temp.length + s : s])[ρσ_bound_index(expr.name, ρσ_expr_temp)];\n }\n }\n } else if (is_node_type(expr, AST_Dot)) {\n referenced_path = ρσ_list_decorate([]);\n while (is_node_type(expr, AST_Dot)) {\n referenced_path.unshift(expr.property);\n expr = expr.expression;\n }\n if (is_node_type(expr, AST_SymbolRef)) {\n referenced_path.unshift(expr.name);\n if (len(referenced_path) > 1) {\n class_name = referenced_path.join(\".\");\n for (var ρσ_Index53 = S.classes.length - 1; ρσ_Index53 > -1; ρσ_Index53-=1) {\n s = ρσ_Index53;\n if (has_prop((ρσ_expr_temp = S.classes)[(typeof s === \"number\" && s < 0) ? ρσ_expr_temp.length + s : s], class_name)) {\n return (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[(typeof s === \"number\" && s < 0) ? ρσ_expr_temp.length + s : s])[(typeof class_name === \"number\" && class_name < 0) ? ρσ_expr_temp.length + class_name : class_name];\n }\n }\n }\n }\n }\n return false;\n };\n if (!get_class_in_scope.__argnames__) Object.defineProperties(get_class_in_scope, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"parse\"}\n });\n\n function import_error(message) {\n var ctx;\n ctx = S.input.context();\n throw new ImportError(message, ctx.filename, ctx.tokline, ctx.tokcol, ctx.tokpos);\n };\n if (!import_error.__argnames__) Object.defineProperties(import_error, {\n __argnames__ : {value: [\"message\"]},\n __module__ : {value: \"parse\"}\n });\n\n function do_import(key) {\n var package_module_id, src_code, filename, modpath, ρσ_unpack, data, location, cached, srchash, ikey, bitem;\n if (has_prop(imported_modules, key)) {\n return;\n }\n if (has_prop(importing_modules, key) && importing_modules[(typeof key === \"number\" && key < 0) ? importing_modules.length + key : key]) {\n import_error(\"Detected a recursive import of: \" + key + \" while importing: \" + module_id);\n }\n package_module_id = key.split(\".\").slice(0, -1).join(\".\");\n if (len(package_module_id) > 0) {\n do_import(package_module_id);\n }\n if (options.for_linting) {\n imported_modules[(typeof key === \"number\" && key < 0) ? imported_modules.length + key : key] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"is_cached\"] = true;\n ρσ_d[\"classes\"] = Object.create(null);\n ρσ_d[\"module_id\"] = key;\n ρσ_d[\"exports\"] = ρσ_list_decorate([]);\n ρσ_d[\"nonlocalvars\"] = ρσ_list_decorate([]);\n ρσ_d[\"baselib\"] = Object.create(null);\n ρσ_d[\"outputs\"] = Object.create(null);\n ρσ_d[\"discard_asserts\"] = options.discard_asserts;\n return ρσ_d;\n }).call(this);\n return;\n }\n function safe_read(base_path) {\n var ρσ_unpack, i, path;\n var ρσ_Iter54 = ρσ_Iterable(enumerate(ρσ_list_decorate([ base_path + \".pyj\", base_path + \"/__init__.pyj\" ])));\n for (var ρσ_Index54 = 0; ρσ_Index54 < ρσ_Iter54.length; ρσ_Index54++) {\n ρσ_unpack = ρσ_Iter54[ρσ_Index54];\n i = ρσ_unpack[0];\n path = ρσ_unpack[1];\n try {\n return ρσ_list_decorate([ readfile(path, \"utf-8\"), path ]);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n var e = ρσ_Exception;\n if (e.code === \"ENOENT\" || e.code === \"EPERM\" || e.code === \"EACCESS\") {\n if (i === 1) {\n return [null, null];\n }\n }\n if (i === 1) {\n throw ρσ_Exception;\n }\n } \n }\n }\n };\n if (!safe_read.__argnames__) Object.defineProperties(safe_read, {\n __argnames__ : {value: [\"base_path\"]},\n __module__ : {value: \"parse\"}\n });\n\n src_code = filename = null;\n modpath = key.replace(/\\./g, \"/\");\n var ρσ_Iter55 = ρσ_Iterable(import_dirs);\n for (var ρσ_Index55 = 0; ρσ_Index55 < ρσ_Iter55.length; ρσ_Index55++) {\n location = ρσ_Iter55[ρσ_Index55];\n if (location) {\n ρσ_unpack = safe_read(location + \"/\" + modpath);\nρσ_unpack = ρσ_unpack_asarray(2, ρσ_unpack);\n data = ρσ_unpack[0];\n filename = ρσ_unpack[1];\n if (data !== null) {\n src_code = data;\n break;\n }\n }\n }\n if (src_code === null) {\n import_error(\"Failed Import: '\" + key + \"' module doesn't exist in any of the import directories: \" + import_dirs.join(\":\"));\n }\n try {\n cached = JSON.parse(readfile(cache_file_name(filename, options.module_cache_dir), \"utf-8\"));\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n cached = null;\n } \n }\n srchash = sha1sum(src_code);\n if (cached && cached.version === COMPILER_VERSION && cached.signature === srchash && cached.discard_asserts === !!options.discard_asserts) {\n var ρσ_Iter56 = ρσ_Iterable(cached.imported_module_ids);\n for (var ρσ_Index56 = 0; ρσ_Index56 < ρσ_Iter56.length; ρσ_Index56++) {\n ikey = ρσ_Iter56[ρσ_Index56];\n do_import(ikey);\n }\n imported_modules[(typeof key === \"number\" && key < 0) ? imported_modules.length + key : key] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"is_cached\"] = true;\n ρσ_d[\"classes\"] = cached.classes;\n ρσ_d[\"outputs\"] = cached.outputs;\n ρσ_d[\"module_id\"] = key;\n ρσ_d[\"import_order\"] = Object.keys(imported_modules).length;\n ρσ_d[\"nonlocalvars\"] = cached.nonlocalvars;\n ρσ_d[\"baselib\"] = cached.baselib;\n ρσ_d[\"exports\"] = cached.exports;\n ρσ_d[\"discard_asserts\"] = options.discard_asserts;\n ρσ_d[\"imported_module_ids\"] = cached.imported_module_ids;\n return ρσ_d;\n }).call(this);\n } else {\n parse(src_code, (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"filename\"] = filename;\n ρσ_d[\"toplevel\"] = null;\n ρσ_d[\"basedir\"] = options.basedir;\n ρσ_d[\"libdir\"] = options.libdir;\n ρσ_d[\"import_dirs\"] = options.import_dirs;\n ρσ_d[\"module_id\"] = key;\n ρσ_d[\"imported_modules\"] = imported_modules;\n ρσ_d[\"importing_modules\"] = importing_modules;\n ρσ_d[\"discard_asserts\"] = options.discard_asserts;\n ρσ_d[\"module_cache_dir\"] = options.module_cache_dir;\n return ρσ_d;\n }).call(this));\n }\n imported_modules[(typeof key === \"number\" && key < 0) ? imported_modules.length + key : key].srchash = srchash;\n var ρσ_Iter57 = ρσ_Iterable(Object.keys(imported_modules[(typeof key === \"number\" && key < 0) ? imported_modules.length + key : key].baselib));\n for (var ρσ_Index57 = 0; ρσ_Index57 < ρσ_Iter57.length; ρσ_Index57++) {\n bitem = ρσ_Iter57[ρσ_Index57];\n baselib_items[(typeof bitem === \"number\" && bitem < 0) ? baselib_items.length + bitem : bitem] = true;\n }\n };\n if (!do_import.__argnames__) Object.defineProperties(do_import, {\n __argnames__ : {value: [\"key\"]},\n __module__ : {value: \"parse\"}\n });\n\n function read_python_flags() {\n var bracketed, name, val;\n expect_token(\"keyword\", \"import\");\n bracketed = is_(\"punc\", \"(\");\n if (bracketed) {\n next();\n }\n while (true) {\n if (!is_(\"name\")) {\n croak(\"Name expected\");\n }\n name = S.token.value;\n val = (name.startsWith(\"no_\")) ? false : true;\n if (!val) {\n name = name.slice(3);\n }\n if (!PYTHON_FLAGS) {\n croak(\"Unknown __python__ flag: \" + name);\n }\n S.scoped_flags.set(name, val);\n next();\n if (is_(\"punc\", \",\")) {\n next();\n } else {\n if (bracketed) {\n if (is_(\"punc\", \")\")) {\n next();\n } else {\n continue;\n }\n }\n break;\n }\n }\n return new AST_EmptyStatement((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"stype\"] = \"scoped_flags\";\n ρσ_d[\"start\"] = prev();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n };\n if (!read_python_flags.__module__) Object.defineProperties(read_python_flags, {\n __module__ : {value: \"parse\"}\n });\n\n function import_(from_import) {\n var ans, tok, tmp, name, last_tok, key, alias, aimp, ρσ_unpack, classes, argnames, bracketed, exports, symdef, aname, obj, argvar, cname, imp;\n ans = new AST_Imports((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"imports\"] = ρσ_list_decorate([]);\n return ρσ_d;\n }).call(this));\n while (true) {\n tok = tmp = name = last_tok = expression(false);\n key = \"\";\n while (is_node_type(tmp, AST_Dot)) {\n key = \".\" + tmp.property + key;\n tmp = last_tok = tmp.expression;\n }\n key = tmp.name + key;\n if (from_import && key === \"__python__\") {\n return read_python_flags();\n }\n alias = null;\n if (!from_import && is_(\"keyword\", \"as\")) {\n next();\n alias = as_symbol(AST_SymbolAlias);\n }\n aimp = new AST_Import((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"module\"] = name;\n ρσ_d[\"key\"] = key;\n ρσ_d[\"alias\"] = alias;\n ρσ_d[\"argnames\"] = null;\n ρσ_d[\"body\"] = (function() {\n var ρσ_anonfunc = function () {\n return imported_modules[(typeof key === \"number\" && key < 0) ? imported_modules.length + key : key];\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this));\n ρσ_unpack = [tok.start, last_tok.end];\n aimp.start = ρσ_unpack[0];\n aimp.end = ρσ_unpack[1];\n ans.imports.push(aimp);\n if (from_import) {\n break;\n }\n if (is_(\"punc\", \",\")) {\n next();\n } else {\n break;\n }\n }\n var ρσ_Iter58 = ρσ_Iterable(ans[\"imports\"]);\n for (var ρσ_Index58 = 0; ρσ_Index58 < ρσ_Iter58.length; ρσ_Index58++) {\n imp = ρσ_Iter58[ρσ_Index58];\n do_import(imp.key);\n if (imported_module_ids.indexOf(imp.key) === -1) {\n imported_module_ids.push(imp.key);\n }\n classes = imported_modules[(typeof key === \"number\" && key < 0) ? imported_modules.length + key : key].classes;\n if (from_import) {\n expect_token(\"keyword\", \"import\");\n imp.argnames = argnames = ρσ_list_decorate([]);\n bracketed = is_(\"punc\", \"(\");\n if (bracketed) {\n next();\n }\n exports = Object.create(null);\n var ρσ_Iter59 = ρσ_Iterable(imported_modules[(typeof key === \"number\" && key < 0) ? imported_modules.length + key : key].exports);\n for (var ρσ_Index59 = 0; ρσ_Index59 < ρσ_Iter59.length; ρσ_Index59++) {\n symdef = ρσ_Iter59[ρσ_Index59];\n exports[ρσ_bound_index(symdef.name, exports)] = true;\n }\n while (true) {\n aname = as_symbol(AST_ImportedVar);\n if (!options.for_linting && !has_prop(exports, aname.name)) {\n import_error(\"The symbol \\\"\" + aname.name + \"\\\" is not exported from the module: \" + key);\n }\n if (is_(\"keyword\", \"as\")) {\n next();\n aname.alias = as_symbol(AST_SymbolAlias);\n }\n argnames.push(aname);\n if (is_(\"punc\", \",\")) {\n next();\n } else {\n if (bracketed) {\n if (is_(\"punc\", \")\")) {\n next();\n } else {\n continue;\n }\n }\n break;\n }\n }\n var ρσ_Iter60 = ρσ_Iterable(argnames);\n for (var ρσ_Index60 = 0; ρσ_Index60 < ρσ_Iter60.length; ρσ_Index60++) {\n argvar = ρσ_Iter60[ρσ_Index60];\n obj = classes[ρσ_bound_index(argvar.name, classes)];\n if (obj) {\n key = (argvar.alias) ? argvar.alias.name : argvar.name;\n (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[ρσ_expr_temp.length-1])[(typeof key === \"number\" && key < 0) ? ρσ_expr_temp.length + key : key] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = obj.static;\n ρσ_d[\"bound\"] = obj.bound;\n ρσ_d[\"classvars\"] = obj.classvars;\n return ρσ_d;\n }).call(this);\n }\n }\n } else {\n var ρσ_Iter61 = ρσ_Iterable(Object.keys(classes));\n for (var ρσ_Index61 = 0; ρσ_Index61 < ρσ_Iter61.length; ρσ_Index61++) {\n cname = ρσ_Iter61[ρσ_Index61];\n obj = classes[(typeof cname === \"number\" && cname < 0) ? classes.length + cname : cname];\n key = (imp.alias) ? imp.alias.name : imp.key;\n (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[ρσ_expr_temp.length-1])[ρσ_bound_index(key + \".\" + obj.name.name, ρσ_expr_temp)] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = obj.static;\n ρσ_d[\"bound\"] = obj.bound;\n ρσ_d[\"classvars\"] = obj.classvars;\n return ρσ_d;\n }).call(this);\n }\n }\n }\n return ans;\n };\n if (!import_.__argnames__) Object.defineProperties(import_, {\n __argnames__ : {value: [\"from_import\"]},\n __module__ : {value: \"parse\"}\n });\n\n function class_() {\n var name, externaldecorator, class_details, bases, class_parent, a, docstrings, definition, descriptor, stmt, class_var_names, visitor;\n name = as_symbol(AST_SymbolDefun);\n if (!name) {\n unexpected();\n }\n externaldecorator = has_simple_decorator(S.decorators, \"external\");\n class_details = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = Object.create(null);\n ρσ_d[\"bound\"] = [];\n ρσ_d[\"classvars\"] = Object.create(null);\n ρσ_d[\"processing\"] = name.name;\n ρσ_d[\"provisional_classvars\"] = Object.create(null);\n return ρσ_d;\n }).call(this);\n bases = [];\n class_parent = null;\n if (is_(\"punc\", \"(\")) {\n S.in_parenthesized_expr = true;\n next();\n while (true) {\n if (is_(\"punc\", \")\")) {\n S.in_parenthesized_expr = false;\n next();\n break;\n }\n a = expr_atom(false);\n if (class_parent === null) {\n class_parent = a;\n }\n bases.push(a);\n if (is_(\"punc\", \",\")) {\n next();\n continue;\n }\n }\n }\n docstrings = [];\n definition = new AST_Class((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = name;\n ρσ_d[\"docstrings\"] = docstrings;\n ρσ_d[\"module_id\"] = module_id;\n ρσ_d[\"dynamic_properties\"] = Object.create(null);\n ρσ_d[\"parent\"] = class_parent;\n ρσ_d[\"bases\"] = bases;\n ρσ_d[\"localvars\"] = ρσ_list_decorate([]);\n ρσ_d[\"classvars\"] = class_details.classvars;\n ρσ_d[\"static\"] = class_details.static;\n ρσ_d[\"external\"] = externaldecorator;\n ρσ_d[\"bound\"] = class_details.bound;\n ρσ_d[\"statements\"] = ρσ_list_decorate([]);\n ρσ_d[\"decorators\"] = (function() {\n var ρσ_anonfunc = function () {\n var d, decorator;\n d = ρσ_list_decorate([]);\n var ρσ_Iter62 = ρσ_Iterable(S.decorators);\n for (var ρσ_Index62 = 0; ρσ_Index62 < ρσ_Iter62.length; ρσ_Index62++) {\n decorator = ρσ_Iter62[ρσ_Index62];\n d.push(new AST_Decorator((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = decorator;\n return ρσ_d;\n }).call(this)));\n }\n S.decorators = [];\n return d;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })()();\n ρσ_d[\"body\"] = (function() {\n var ρσ_anonfunc = function (loop, labels) {\n var a;\n S.in_class.push(name.name);\n (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[ρσ_bound_index(S.classes.length - 1, ρσ_expr_temp)])[ρσ_bound_index(name.name, ρσ_expr_temp)] = class_details;\n S.classes.push(Object.create(null));\n S.scoped_flags.push();\n S.in_function += 1;\n S.in_loop = 0;\n S.labels = ρσ_list_decorate([]);\n a = block_(docstrings);\n S.in_function -= 1;\n S.scoped_flags.pop();\n S.classes.pop();\n S.in_class.pop();\n S.in_loop = loop;\n S.labels = labels;\n return a;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"loop\", \"labels\"]},\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })()(S.in_loop, S.labels);\n return ρσ_d;\n }).call(this));\n class_details.processing = false;\n var ρσ_Iter63 = ρσ_Iterable(definition.body);\n for (var ρσ_Index63 = 0; ρσ_Index63 < ρσ_Iter63.length; ρσ_Index63++) {\n stmt = ρσ_Iter63[ρσ_Index63];\n if (is_node_type(stmt, AST_Method)) {\n if (stmt.is_getter || stmt.is_setter) {\n descriptor = (ρσ_expr_temp = definition.dynamic_properties)[ρσ_bound_index(stmt.name.name, ρσ_expr_temp)];\n if (!descriptor) {\n descriptor = (ρσ_expr_temp = definition.dynamic_properties)[ρσ_bound_index(stmt.name.name, ρσ_expr_temp)] = Object.create(null);\n }\n descriptor[ρσ_bound_index((stmt.is_getter) ? \"getter\" : \"setter\", descriptor)] = stmt;\n } else if (stmt.name.name === \"__init__\") {\n definition.init = stmt;\n }\n }\n }\n class_var_names = Object.create(null);\n function walker() {\n function visit_node(node, descend) {\n var varname;\n if (is_node_type(node, AST_Method)) {\n class_var_names[ρσ_bound_index(node.name.name, class_var_names)] = true;\n return;\n }\n if (is_node_type(node, AST_Function)) {\n return;\n }\n if (is_node_type(node, AST_Assign) && is_node_type(node.left, AST_SymbolRef)) {\n varname = node.left.name;\n if (FORBIDDEN_CLASS_VARS.indexOf(varname) !== -1) {\n token_error(node.left.start, varname + \" is not allowed as a class variable name\");\n }\n class_var_names[(typeof varname === \"number\" && varname < 0) ? class_var_names.length + varname : varname] = true;\n (ρσ_expr_temp = definition.classvars)[(typeof varname === \"number\" && varname < 0) ? ρσ_expr_temp.length + varname : varname] = true;\n } else if (is_node_type(node, AST_SymbolRef) && has_prop(class_var_names, node.name)) {\n node.thedef = new AST_SymbolDefun((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = name.name + \".prototype.\" + node.name;\n return ρσ_d;\n }).call(this));\n }\n if (descend) {\n descend.call(node);\n }\n };\n if (!visit_node.__argnames__) Object.defineProperties(visit_node, {\n __argnames__ : {value: [\"node\", \"descend\"]},\n __module__ : {value: \"parse\"}\n });\n\n this._visit = visit_node;\n };\n if (!walker.__module__) Object.defineProperties(walker, {\n __module__ : {value: \"parse\"}\n });\n\n visitor = new walker;\n var ρσ_Iter64 = ρσ_Iterable(definition.body);\n for (var ρσ_Index64 = 0; ρσ_Index64 < ρσ_Iter64.length; ρσ_Index64++) {\n stmt = ρσ_Iter64[ρσ_Index64];\n if (!is_node_type(stmt, AST_Class)) {\n stmt.walk(visitor);\n definition.statements.push(stmt);\n }\n }\n return definition;\n };\n if (!class_.__module__) Object.defineProperties(class_, {\n __module__ : {value: \"parse\"}\n });\n\n function function_(in_class, is_expression) {\n var name, is_anonymous, staticmethod, property_getter, property_setter, staticloc, ctor, return_annotation, is_generator, docstrings, definition, assignments, j, i, nonlocals;\n name = (is_(\"name\")) ? as_symbol((in_class) ? AST_SymbolDefun : AST_SymbolLambda) : null;\n if (in_class && !name) {\n croak(\"Cannot use anonymous function as class methods\");\n }\n is_anonymous = !name;\n staticmethod = property_getter = property_setter = false;\n if (in_class) {\n staticloc = has_simple_decorator(S.decorators, \"staticmethod\");\n property_getter = has_simple_decorator(S.decorators, \"property\");\n property_setter = has_setter_decorator(S.decorators, name.name);\n if (staticloc) {\n if (property_getter || property_setter) {\n croak(\"A method cannot be both static and a property getter/setter\");\n }\n (ρσ_expr_temp = (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[ρσ_bound_index(S.classes.length - 2, ρσ_expr_temp)])[(typeof in_class === \"number\" && in_class < 0) ? ρσ_expr_temp.length + in_class : in_class].static)[ρσ_bound_index(name.name, ρσ_expr_temp)] = true;\n staticmethod = true;\n } else if (name.name !== \"__init__\" && S.scoped_flags.get(\"bound_methods\")) {\n (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[ρσ_bound_index(S.classes.length - 2, ρσ_expr_temp)])[(typeof in_class === \"number\" && in_class < 0) ? ρσ_expr_temp.length + in_class : in_class].bound.push(name.name);\n }\n }\n expect(\"(\");\n S.in_parenthesized_expr = true;\n ctor = (in_class) ? AST_Method : AST_Function;\n return_annotation = null;\n is_generator = [];\n docstrings = [];\n definition = new ctor((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = name;\n ρσ_d[\"is_expression\"] = is_expression;\n ρσ_d[\"is_anonymous\"] = is_anonymous;\n ρσ_d[\"argnames\"] = (function() {\n var ρσ_anonfunc = function (a) {\n var defaults, first, seen_names, def_line, current_arg_name, name_token;\n defaults = Object.create(null);\n first = true;\n seen_names = Object.create(null);\n def_line = S.input.context().tokline;\n current_arg_name = null;\n name_token = null;\n function get_arg() {\n var name_ctx, ntok, annotation, sym;\n current_arg_name = S.token.value;\n if (has_prop(seen_names, current_arg_name)) {\n token_error(prev(), \"Can't repeat parameter names\");\n }\n if (current_arg_name === \"arguments\") {\n token_error(prev(), \"Can't use the name arguments as a parameter name, it is reserved by JavaScript\");\n }\n seen_names[(typeof current_arg_name === \"number\" && current_arg_name < 0) ? seen_names.length + current_arg_name : current_arg_name] = true;\n name_token = S.token;\n name_ctx = S.input.context();\n ntok = peek();\n if (ntok.type === \"punc\" && ntok.value === \":\") {\n next();\n expect(\":\");\n annotation = maybe_conditional();\n if (!is_token(name_token, \"name\")) {\n croak(\"Name expected\", name_ctx.tokline);\n return null;\n }\n sym = new AST_SymbolFunarg((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = name_token.value;\n ρσ_d[\"start\"] = S.token;\n ρσ_d[\"end\"] = S.token;\n ρσ_d[\"annotation\"] = annotation;\n return ρσ_d;\n }).call(this));\n return sym;\n } else {\n if (!is_(\"name\")) {\n if (S.input.context().tokline !== def_line) {\n croak(\"Name expected\", def_line);\n } else {\n croak(\"Name expected\");\n }\n return null;\n }\n sym = new AST_SymbolFunarg((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = current_arg_name;\n ρσ_d[\"start\"] = S.token;\n ρσ_d[\"end\"] = S.token;\n ρσ_d[\"annotation\"] = null;\n return ρσ_d;\n }).call(this));\n next();\n return sym;\n }\n };\n if (!get_arg.__module__) Object.defineProperties(get_arg, {\n __module__ : {value: \"parse\"}\n });\n\n while (!is_(\"punc\", \")\")) {\n if (first) {\n first = false;\n } else {\n expect(\",\");\n if (is_(\"punc\", \")\")) {\n break;\n }\n }\n if (is_(\"operator\", \"**\")) {\n next();\n if (a.kwargs) {\n token_error(name_token, \"Can't define multiple **kwargs in function definition\");\n }\n a.kwargs = get_arg();\n } else if (is_(\"operator\", \"*\")) {\n next();\n if (a.starargs) {\n token_error(name_token, \"Can't define multiple *args in function definition\");\n }\n if (a.kwargs) {\n token_error(name_token, \"Can't define *args after **kwargs in function definition\");\n }\n a.starargs = get_arg();\n } else {\n if (a.starargs || a.kwargs) {\n token_error(name_token, \"Can't define a formal parameter after *args or **kwargs\");\n }\n a.push(get_arg());\n if (is_(\"operator\", \"=\")) {\n if (a.kwargs) {\n token_error(name_token, \"Can't define an optional formal parameter after **kwargs\");\n }\n next();\n defaults[(typeof current_arg_name === \"number\" && current_arg_name < 0) ? defaults.length + current_arg_name : current_arg_name] = expression(false);\n a.has_defaults = true;\n } else {\n if (a.has_defaults) {\n token_error(name_token, \"Can't define required formal parameters after optional formal parameters\");\n }\n }\n }\n }\n next();\n if (is_(\"punc\", \"->\")) {\n next();\n return_annotation = maybe_conditional();\n }\n S.in_parenthesized_expr = false;\n a.defaults = defaults;\n a.is_simple_func = !a.starargs && !a.kwargs && !a.has_defaults;\n return a;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"a\"]},\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })()([]);\n ρσ_d[\"localvars\"] = ρσ_list_decorate([]);\n ρσ_d[\"decorators\"] = (function() {\n var ρσ_anonfunc = function () {\n var d, decorator;\n d = [];\n var ρσ_Iter65 = ρσ_Iterable(S.decorators);\n for (var ρσ_Index65 = 0; ρσ_Index65 < ρσ_Iter65.length; ρσ_Index65++) {\n decorator = ρσ_Iter65[ρσ_Index65];\n d.push(new AST_Decorator((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"expression\"] = decorator;\n return ρσ_d;\n }).call(this)));\n }\n S.decorators = [];\n return d;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })()();\n ρσ_d[\"docstrings\"] = docstrings;\n ρσ_d[\"body\"] = (function() {\n var ρσ_anonfunc = function (loop, labels) {\n var a;\n S.in_class.push(false);\n S.classes.push(Object.create(null));\n S.scoped_flags.push();\n S.in_function += 1;\n S.functions.push(Object.create(null));\n S.in_loop = 0;\n S.labels = ρσ_list_decorate([]);\n a = block_(docstrings);\n S.in_function -= 1;\n S.scoped_flags.pop();\n is_generator.push(bool(S.functions.pop().is_generator));\n S.classes.pop();\n S.in_class.pop();\n S.in_loop = loop;\n S.labels = labels;\n return a;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"loop\", \"labels\"]},\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })()(S.in_loop, S.labels);\n return ρσ_d;\n }).call(this));\n definition.return_annotation = return_annotation;\n definition.is_generator = is_generator[0];\n if (is_node_type(definition, AST_Method)) {\n definition.static = staticmethod;\n definition.is_getter = property_getter;\n definition.is_setter = property_setter;\n if (definition.argnames.length < 1 && !definition.static) {\n croak(\"Methods of a class must have at least one argument, traditionally named self\");\n }\n if (definition.name && definition.name.name === \"__init__\") {\n if (definition.is_generator) {\n croak(\"The __init__ method of a class cannot be a generator (yield not allowed)\");\n }\n if (property_getter || property_setter) {\n croak(\"The __init__ method of a class cannot be a property getter/setter\");\n }\n }\n }\n if (definition.is_generator) {\n baselib_items[\"yield\"] = true;\n }\n assignments = scan_for_local_vars(definition.body);\n for (var ρσ_Index66 = 0; ρσ_Index66 < assignments.length; ρσ_Index66++) {\n i = ρσ_Index66;\n for (var ρσ_Index67 = 0; ρσ_Index67 < definition.argnames.length + 1; ρσ_Index67++) {\n j = ρσ_Index67;\n if (j === definition.argnames.length) {\n definition.localvars.push(new_symbol(AST_SymbolVar, assignments[(typeof i === \"number\" && i < 0) ? assignments.length + i : i]));\n } else if (j < definition.argnames.length && assignments[(typeof i === \"number\" && i < 0) ? assignments.length + i : i] === (ρσ_expr_temp = definition.argnames)[(typeof j === \"number\" && j < 0) ? ρσ_expr_temp.length + j : j].name) {\n break;\n }\n }\n }\n nonlocals = scan_for_nonlocal_defs(definition.body);\n nonlocals = (function() {\n var ρσ_Iter = ρσ_Iterable(nonlocals), ρσ_Result = ρσ_set(), name;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n name = ρσ_Iter[ρσ_Index];\n ρσ_Result.add(name);\n }\n return ρσ_Result;\n })();\n definition.localvars = definition.localvars.filter((function() {\n var ρσ_anonfunc = function (v) {\n return !nonlocals.has(v.name);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"v\"]},\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })());\n return definition;\n };\n if (!function_.__argnames__) Object.defineProperties(function_, {\n __argnames__ : {value: [\"in_class\", \"is_expression\"]},\n __module__ : {value: \"parse\"}\n });\n\n function if_() {\n var cond, body, belse;\n cond = expression(true);\n body = statement();\n belse = null;\n if (is_(\"keyword\", \"elif\") || is_(\"keyword\", \"else\")) {\n if (is_(\"keyword\", \"else\")) {\n next();\n } else {\n S.token.value = \"if\";\n }\n belse = statement();\n }\n return new AST_If((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"condition\"] = cond;\n ρσ_d[\"body\"] = body;\n ρσ_d[\"alternative\"] = belse;\n return ρσ_d;\n }).call(this));\n };\n if (!if_.__module__) Object.defineProperties(if_, {\n __module__ : {value: \"parse\"}\n });\n\n function is_docstring(stmt) {\n if (is_node_type(stmt, AST_SimpleStatement)) {\n if (is_node_type(stmt.body, AST_String)) {\n return stmt.body;\n }\n }\n return false;\n };\n if (!is_docstring.__argnames__) Object.defineProperties(is_docstring, {\n __argnames__ : {value: [\"stmt\"]},\n __module__ : {value: \"parse\"}\n });\n\n function block_(docstrings) {\n var prev_whitespace, a, stmt, ds, current_whitespace;\n prev_whitespace = S.token.leading_whitespace;\n expect(\":\");\n a = [];\n if (!S.token.nlb) {\n while (!S.token.nlb) {\n if (is_(\"eof\")) {\n unexpected();\n }\n stmt = statement();\n if (docstrings) {\n ds = is_docstring(stmt);\n if (ds) {\n docstrings.push(ds);\n continue;\n }\n }\n a.push(stmt);\n }\n } else {\n current_whitespace = S.token.leading_whitespace;\n if (current_whitespace.length === 0 || prev_whitespace === current_whitespace) {\n croak(\"Expected an indented block\");\n }\n while (!is_(\"punc\", \"}\")) {\n if (is_(\"eof\")) {\n return a;\n }\n stmt = statement();\n if (docstrings) {\n ds = is_docstring(stmt);\n if (ds) {\n docstrings.push(ds);\n continue;\n }\n }\n a.push(stmt);\n }\n next();\n }\n return a;\n };\n if (!block_.__argnames__) Object.defineProperties(block_, {\n __argnames__ : {value: [\"docstrings\"]},\n __module__ : {value: \"parse\"}\n });\n\n function try_() {\n var body, bcatch, bfinally, belse, start, exceptions, name;\n body = block_();\n bcatch = [];\n bfinally = null;\n belse = null;\n while (is_(\"keyword\", \"except\")) {\n start = S.token;\n next();\n exceptions = ρσ_list_decorate([]);\n if (!is_(\"punc\", \":\") && !is_(\"keyword\", \"as\")) {\n exceptions.push(as_symbol(AST_SymbolVar));\n while (is_(\"punc\", \",\")) {\n next();\n exceptions.push(as_symbol(AST_SymbolVar));\n }\n }\n name = null;\n if (is_(\"keyword\", \"as\")) {\n next();\n name = as_symbol(AST_SymbolCatch);\n }\n bcatch.push(new AST_Except((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"argname\"] = name;\n ρσ_d[\"errors\"] = exceptions;\n ρσ_d[\"body\"] = block_();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)));\n }\n if (is_(\"keyword\", \"else\")) {\n start = S.token;\n next();\n belse = new AST_Else((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"body\"] = block_();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n }\n if (is_(\"keyword\", \"finally\")) {\n start = S.token;\n next();\n bfinally = new AST_Finally((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"body\"] = block_();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n }\n if (!bcatch.length && !bfinally) {\n croak(\"Missing except/finally blocks\");\n }\n return new AST_Try((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"body\"] = body;\n ρσ_d[\"bcatch\"] = (bcatch.length) ? new AST_Catch((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"body\"] = bcatch;\n return ρσ_d;\n }).call(this)) : null;\n ρσ_d[\"bfinally\"] = bfinally;\n ρσ_d[\"belse\"] = belse;\n return ρσ_d;\n }).call(this));\n };\n if (!try_.__module__) Object.defineProperties(try_, {\n __module__ : {value: \"parse\"}\n });\n\n function vardefs(symbol_class) {\n var a;\n a = ρσ_list_decorate([]);\n while (true) {\n a.push(new AST_VarDef((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = S.token;\n ρσ_d[\"name\"] = as_symbol(symbol_class);\n ρσ_d[\"value\"] = (is_(\"operator\", \"=\")) ? (next(), expression(false)) : null;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)));\n if (!is_(\"punc\", \",\")) {\n break;\n }\n next();\n }\n return a;\n };\n if (!vardefs.__argnames__) Object.defineProperties(vardefs, {\n __argnames__ : {value: [\"symbol_class\"]},\n __module__ : {value: \"parse\"}\n });\n\n function nonlocal_(is_global) {\n var defs, vardef;\n defs = vardefs(AST_SymbolNonlocal);\n if (is_global) {\n var ρσ_Iter68 = ρσ_Iterable(defs);\n for (var ρσ_Index68 = 0; ρσ_Index68 < ρσ_Iter68.length; ρσ_Index68++) {\n vardef = ρσ_Iter68[ρσ_Index68];\n S.globals.push(vardef.name.name);\n }\n }\n return new AST_Var((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = prev();\n ρσ_d[\"definitions\"] = defs;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n };\n if (!nonlocal_.__argnames__) Object.defineProperties(nonlocal_, {\n __argnames__ : {value: [\"is_global\"]},\n __module__ : {value: \"parse\"}\n });\n\n function new_() {\n var start, newexp, args;\n start = S.token;\n expect_token(\"operator\", \"new\");\n newexp = expr_atom(false);\n if (is_(\"punc\", \"(\")) {\n S.in_parenthesized_expr = true;\n next();\n args = func_call_list();\n S.in_parenthesized_expr = false;\n } else {\n args = func_call_list(true);\n }\n return subscripts(new AST_New((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = newexp;\n ρσ_d[\"args\"] = args;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), true);\n };\n if (!new_.__module__) Object.defineProperties(new_, {\n __module__ : {value: \"parse\"}\n });\n\n function string_() {\n var strings, start;\n strings = [];\n start = S.token;\n while (true) {\n strings.push(S.token.value);\n if (peek().type !== \"string\") {\n break;\n }\n next();\n }\n return new AST_String((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"end\"] = S.token;\n ρσ_d[\"value\"] = strings.join(\"\");\n return ρσ_d;\n }).call(this));\n };\n if (!string_.__module__) Object.defineProperties(string_, {\n __module__ : {value: \"parse\"}\n });\n\n function token_as_atom_node() {\n var tok, tmp_, tmp__;\n tok = S.token;\n tmp_ = tok.type;\n if (tmp_ === \"name\") {\n return token_as_symbol(tok, AST_SymbolRef);\n } else if (tmp_ === \"num\") {\n return new AST_Number((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = tok;\n ρσ_d[\"end\"] = tok;\n ρσ_d[\"value\"] = tok.value;\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"string\") {\n return string_();\n } else if (tmp_ === \"regexp\") {\n return new AST_RegExp((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = tok;\n ρσ_d[\"end\"] = tok;\n ρσ_d[\"value\"] = tok.value;\n return ρσ_d;\n }).call(this));\n } else if (tmp_ === \"atom\") {\n tmp__ = tok.value;\n if (tmp__ === \"False\") {\n return new AST_False((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = tok;\n ρσ_d[\"end\"] = tok;\n return ρσ_d;\n }).call(this));\n } else if (tmp__ === \"True\") {\n return new AST_True((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = tok;\n ρσ_d[\"end\"] = tok;\n return ρσ_d;\n }).call(this));\n } else if (tmp__ === \"None\") {\n return new AST_Null((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = tok;\n ρσ_d[\"end\"] = tok;\n return ρσ_d;\n }).call(this));\n }\n } else if (tmp_ === \"js\") {\n return new AST_Verbatim((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = tok;\n ρσ_d[\"end\"] = tok;\n ρσ_d[\"value\"] = tok.value;\n return ρσ_d;\n }).call(this));\n }\n token_error(tok, \"Expecting an atomic token (number/string/bool/regexp/js/None)\");\n };\n if (!token_as_atom_node.__module__) Object.defineProperties(token_as_atom_node, {\n __module__ : {value: \"parse\"}\n });\n\n function as_atom_node() {\n var ret;\n ret = token_as_atom_node();\n next();\n return ret;\n };\n if (!as_atom_node.__module__) Object.defineProperties(as_atom_node, {\n __module__ : {value: \"parse\"}\n });\n\n function expr_atom(allow_calls) {\n var start, tmp_, ex, ret, cls, func;\n if (is_(\"operator\", \"new\")) {\n return new_();\n }\n start = S.token;\n if (is_(\"punc\")) {\n tmp_ = start.value;\n if (tmp_ === \"(\") {\n S.in_parenthesized_expr = true;\n next();\n if (is_(\"punc\", \")\")) {\n next();\n return new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = ρσ_list_decorate([]);\n return ρσ_d;\n }).call(this));\n }\n ex = expression(true);\n if (is_(\"keyword\", \"for\")) {\n ret = read_comprehension(new AST_GeneratorComprehension((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"statement\"] = ex;\n return ρσ_d;\n }).call(this)), \")\");\n S.in_parenthesized_expr = false;\n return ret;\n }\n ex.start = start;\n ex.end = S.token;\n if (is_node_type(ex, AST_SymbolRef)) {\n ex.parens = true;\n }\n if (!is_node_type(ex, AST_GeneratorComprehension)) {\n expect(\")\");\n }\n if (is_node_type(ex, AST_UnaryPrefix)) {\n ex.parenthesized = true;\n }\n S.in_parenthesized_expr = false;\n return subscripts(ex, allow_calls);\n } else if (tmp_ === \"[\") {\n return subscripts(array_(), allow_calls);\n } else if (tmp_ === \"{\") {\n return subscripts(object_(), allow_calls);\n }\n unexpected();\n }\n if (is_(\"keyword\", \"class\")) {\n next();\n cls = class_();\n cls.start = start;\n cls.end = prev();\n return subscripts(cls, allow_calls);\n }\n if (is_(\"keyword\", \"def\")) {\n next();\n func = function_(false, true);\n func.start = start;\n func.end = prev();\n return subscripts(func, allow_calls);\n }\n if (is_(\"keyword\", \"yield\")) {\n next();\n return yield_();\n }\n if (ATOMIC_START_TOKEN[ρσ_bound_index(S.token.type, ATOMIC_START_TOKEN)]) {\n return subscripts(as_atom_node(), allow_calls);\n }\n unexpected();\n };\n if (!expr_atom.__argnames__) Object.defineProperties(expr_atom, {\n __argnames__ : {value: [\"allow_calls\"]},\n __module__ : {value: \"parse\"}\n });\n\n function expr_list(closing, allow_trailing_comma, allow_empty, func_call) {\n var first, a, saw_starargs, tmp, arg;\n first = true;\n a = ρσ_list_decorate([]);\n saw_starargs = false;\n while (!is_(\"punc\", closing)) {\n if (saw_starargs) {\n token_error(prev(), \"*args must be the last argument in a function call\");\n }\n if (first) {\n first = false;\n } else {\n expect(\",\");\n }\n if (allow_trailing_comma && is_(\"punc\", closing)) {\n break;\n }\n if (is_(\"operator\", \"*\") && func_call) {\n saw_starargs = true;\n next();\n }\n if (is_(\"punc\", \",\") && allow_empty) {\n a.push(new AST_Hole((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = S.token;\n ρσ_d[\"end\"] = S.token;\n return ρσ_d;\n }).call(this)));\n } else {\n a.push(expression(false));\n }\n }\n if (func_call) {\n tmp = ρσ_list_decorate([]);\n tmp.kwargs = ρσ_list_decorate([]);\n var ρσ_Iter69 = ρσ_Iterable(a);\n for (var ρσ_Index69 = 0; ρσ_Index69 < ρσ_Iter69.length; ρσ_Index69++) {\n arg = ρσ_Iter69[ρσ_Index69];\n if (is_node_type(arg, AST_Assign)) {\n tmp.kwargs.push(ρσ_list_decorate([ arg.left, arg.right ]));\n } else {\n tmp.push(arg);\n }\n }\n a = tmp;\n }\n next();\n if (saw_starargs) {\n a.starargs = true;\n }\n return a;\n };\n if (!expr_list.__argnames__) Object.defineProperties(expr_list, {\n __argnames__ : {value: [\"closing\", \"allow_trailing_comma\", \"allow_empty\", \"func_call\"]},\n __module__ : {value: \"parse\"}\n });\n\n function func_call_list(empty) {\n var a, first, single_comprehension, arg;\n a = [];\n first = true;\n a.kwargs = [];\n a.kwarg_items = [];\n a.starargs = false;\n if (empty) {\n return a;\n }\n single_comprehension = false;\n while (!is_(\"punc\", \")\") && !is_(\"eof\")) {\n if (!first) {\n expect(\",\");\n if (is_(\"punc\", \")\")) {\n break;\n }\n }\n if (is_(\"operator\", \"*\")) {\n next();\n arg = expression(false);\n arg.is_array = true;\n a.push(arg);\n a.starargs = true;\n } else if (is_(\"operator\", \"**\")) {\n next();\n a.kwarg_items.push(as_symbol(AST_SymbolRef, false));\n a.starargs = true;\n } else {\n arg = expression(false);\n if (is_node_type(arg, AST_Assign)) {\n a.kwargs.push(ρσ_list_decorate([ arg.left, arg.right ]));\n } else {\n if (is_(\"keyword\", \"for\")) {\n if (!first) {\n croak(\"Generator expression must be parenthesized if not sole argument\");\n }\n a.push(read_comprehension(new AST_GeneratorComprehension((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"statement\"] = arg;\n return ρσ_d;\n }).call(this)), \")\"));\n single_comprehension = true;\n break;\n }\n a.push(arg);\n }\n }\n first = false;\n }\n if (!single_comprehension) {\n next();\n }\n return a;\n };\n if (!func_call_list.__argnames__) Object.defineProperties(func_call_list, {\n __argnames__ : {value: [\"empty\"]},\n __module__ : {value: \"parse\"}\n });\n\n \n var array_ = embed_tokens((function() {\n var ρσ_anonfunc = function array_() {\n var expr;\n expect(\"[\");\n expr = ρσ_list_decorate([]);\n if (!is_(\"punc\", \"]\")) {\n expr.push(expression(false));\n if (is_(\"keyword\", \"for\")) {\n return read_comprehension(new AST_ListComprehension((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"statement\"] = expr[0];\n return ρσ_d;\n }).call(this)), \"]\");\n }\n if (!is_(\"punc\", \"]\")) {\n expect(\",\");\n }\n }\n return new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = expr.concat(expr_list(\"]\", true, true));\n return ρσ_d;\n }).call(this));\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })());\n\n \n var object_ = embed_tokens((function() {\n var ρσ_anonfunc = function object_() {\n var first, has_non_const_keys, is_pydict, is_jshash, a, start, ctx, orig, left, end;\n expect(\"{\");\n first = true;\n has_non_const_keys = false;\n is_pydict = S.scoped_flags.get(\"dict_literals\", false);\n is_jshash = S.scoped_flags.get(\"hash_literals\", false);\n a = ρσ_list_decorate([]);\n while (!is_(\"punc\", \"}\")) {\n if (!first) {\n expect(\",\");\n }\n if (is_(\"punc\", \"}\")) {\n break;\n }\n first = false;\n start = S.token;\n ctx = S.input.context();\n orig = ctx.expecting_object_literal_key;\n ctx.expecting_object_literal_key = true;\n try {\n left = expression(false);\n } finally {\n ctx.expecting_object_literal_key = orig;\n }\n if (is_(\"keyword\", \"for\")) {\n return read_comprehension(new AST_SetComprehension((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"statement\"] = left;\n return ρσ_d;\n }).call(this)), \"}\");\n }\n if (a.length === 0 && (is_(\"punc\", \",\") || is_(\"punc\", \"}\"))) {\n end = prev();\n return set_(start, end, left);\n }\n if (!is_node_type(left, AST_Constant)) {\n has_non_const_keys = true;\n }\n expect(\":\");\n a.push(new AST_ObjectKeyVal((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"key\"] = left;\n ρσ_d[\"value\"] = expression(false);\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)));\n if (a.length === 1 && is_(\"keyword\", \"for\")) {\n return dict_comprehension(a, is_pydict, is_jshash);\n }\n }\n next();\n return new ((has_non_const_keys) ? AST_ExpressiveObject : AST_Object)((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"properties\"] = a;\n ρσ_d[\"is_pydict\"] = is_pydict;\n ρσ_d[\"is_jshash\"] = is_jshash;\n return ρσ_d;\n }).call(this));\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })());\n\n function set_(start, end, expr) {\n var ostart, a;\n ostart = start;\n a = ρσ_list_decorate([ new AST_SetItem((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"end\"] = end;\n ρσ_d[\"value\"] = expr;\n return ρσ_d;\n }).call(this)) ]);\n while (!is_(\"punc\", \"}\")) {\n expect(\",\");\n start = S.token;\n if (is_(\"punc\", \"}\")) {\n break;\n }\n a.push(new AST_SetItem((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"value\"] = expression(false);\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)));\n }\n next();\n return new AST_Set((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"items\"] = a;\n ρσ_d[\"start\"] = ostart;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n };\n if (!set_.__argnames__) Object.defineProperties(set_, {\n __argnames__ : {value: [\"start\", \"end\", \"expr\"]},\n __module__ : {value: \"parse\"}\n });\n\n function read_comprehension(obj, terminator) {\n var forloop;\n if (is_node_type(obj, AST_GeneratorComprehension)) {\n baselib_items[\"yield\"] = true;\n }\n S.in_comprehension = true;\n S.in_parenthesized_expr = false;\n expect_token(\"keyword\", \"for\");\n forloop = for_(true);\n obj.init = forloop.init;\n obj.name = forloop.name;\n obj.object = forloop.object;\n obj.condition = (is_(\"punc\", terminator)) ? null : (expect_token(\"keyword\", \"if\"), \n expression(true));\n expect(terminator);\n S.in_comprehension = false;\n return obj;\n };\n if (!read_comprehension.__argnames__) Object.defineProperties(read_comprehension, {\n __argnames__ : {value: [\"obj\", \"terminator\"]},\n __module__ : {value: \"parse\"}\n });\n\n function dict_comprehension(a, is_pydict, is_jshash) {\n var ρσ_unpack, left, right;\n if (a.length) {\n ρσ_unpack = [a[0].key, a[0].value];\n left = ρσ_unpack[0];\n right = ρσ_unpack[1];\n } else {\n left = expression(false);\n if (!is_(\"punc\", \":\")) {\n return read_comprehension(new AST_SetComprehension((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"statement\"] = left;\n return ρσ_d;\n }).call(this)), \"}\");\n }\n expect(\":\");\n right = expression(false);\n }\n return read_comprehension(new AST_DictComprehension((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"statement\"] = left;\n ρσ_d[\"value_statement\"] = right;\n ρσ_d[\"is_pydict\"] = is_pydict;\n ρσ_d[\"is_jshash\"] = is_jshash;\n return ρσ_d;\n }).call(this)), \"}\");\n };\n if (!dict_comprehension.__argnames__) Object.defineProperties(dict_comprehension, {\n __argnames__ : {value: [\"a\", \"is_pydict\", \"is_jshash\"]},\n __module__ : {value: \"parse\"}\n });\n\n function as_name() {\n var tmp, tmp_;\n tmp = S.token;\n next();\n tmp_ = tmp.type;\n if (tmp_ === \"name\" || tmp_ === \"operator\" || tmp_ === \"keyword\" || tmp_ === \"atom\") {\n return tmp.value;\n } else {\n unexpected();\n }\n };\n if (!as_name.__module__) Object.defineProperties(as_name, {\n __module__ : {value: \"parse\"}\n });\n\n function token_as_symbol(tok, ttype) {\n var name;\n name = tok.value;\n if (RESERVED_WORDS[(typeof name === \"number\" && name < 0) ? RESERVED_WORDS.length + name : name] && name !== \"this\") {\n croak(name + \" is a reserved word\");\n }\n return new ((name === \"this\") ? AST_This : ttype)((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = String(tok.value);\n ρσ_d[\"start\"] = tok;\n ρσ_d[\"end\"] = tok;\n return ρσ_d;\n }).call(this));\n };\n if (!token_as_symbol.__argnames__) Object.defineProperties(token_as_symbol, {\n __argnames__ : {value: [\"tok\", \"ttype\"]},\n __module__ : {value: \"parse\"}\n });\n\n function as_symbol(ttype, noerror) {\n var sym;\n if (!is_(\"name\")) {\n if (!noerror) {\n croak(\"Name expected\");\n }\n return null;\n }\n sym = token_as_symbol(S.token, ttype);\n next();\n return sym;\n };\n if (!as_symbol.__argnames__) Object.defineProperties(as_symbol, {\n __argnames__ : {value: [\"ttype\", \"noerror\"]},\n __module__ : {value: \"parse\"}\n });\n\n function new_symbol(type, name) {\n var sym;\n sym = new ((name === \"this\") ? AST_This : type)((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = String(name);\n ρσ_d[\"start\"] = null;\n ρσ_d[\"end\"] = null;\n return ρσ_d;\n }).call(this));\n return sym;\n };\n if (!new_symbol.__argnames__) Object.defineProperties(new_symbol, {\n __argnames__ : {value: [\"type\", \"name\"]},\n __module__ : {value: \"parse\"}\n });\n\n function is_static_method(cls, method) {\n if (has_prop(COMMON_STATIC, method) || cls.static && has_prop(cls.static, method)) {\n return true;\n } else {\n return false;\n }\n };\n if (!is_static_method.__argnames__) Object.defineProperties(is_static_method, {\n __argnames__ : {value: [\"cls\", \"method\"]},\n __module__ : {value: \"parse\"}\n });\n\n function getitem(expr, allow_calls) {\n var start, is_py_sub, slice_bounds, is_slice, i, assignment, assign_operator;\n start = expr.start;\n next();\n is_py_sub = S.scoped_flags.get(\"overload_getitem\", false);\n slice_bounds = [];\n is_slice = false;\n if (is_(\"punc\", \":\")) {\n slice_bounds.push(null);\n } else {\n slice_bounds.push(expression(false));\n }\n if (is_(\"punc\", \":\")) {\n is_slice = true;\n next();\n if (is_(\"punc\", \":\")) {\n slice_bounds.push(null);\n } else if (!is_(\"punc\", \"]\")) {\n slice_bounds.push(expression(false));\n }\n }\n if (is_(\"punc\", \":\")) {\n next();\n if (is_(\"punc\", \"]\")) {\n unexpected();\n } else {\n slice_bounds.push(expression(false));\n }\n }\n expect(\"]\");\n if (is_slice) {\n if (is_(\"operator\", \"=\")) {\n next();\n return subscripts(new AST_Splice((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"property\"] = slice_bounds[0] || new AST_Number((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = 0;\n return ρσ_d;\n }).call(this));\n ρσ_d[\"property2\"] = slice_bounds[1];\n ρσ_d[\"assignment\"] = expression(true);\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), allow_calls);\n } else if (slice_bounds.length === 3) {\n slice_bounds.unshift(slice_bounds.pop());\n if (!slice_bounds[slice_bounds.length-1]) {\n slice_bounds.pop();\n if (!slice_bounds[slice_bounds.length-1]) {\n slice_bounds.pop();\n }\n } else if (!slice_bounds[slice_bounds.length-2]) {\n slice_bounds[slice_bounds.length-2] = new AST_Undefined;\n }\n return subscripts(new AST_Call((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = new AST_SymbolRef((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = (S.in_delete) ? \"ρσ_delslice\" : \"ρσ_eslice\";\n return ρσ_d;\n }).call(this));\n ρσ_d[\"args\"] = ρσ_list_decorate([ expr ]).concat(slice_bounds);\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), allow_calls);\n } else {\n slice_bounds = (function() {\n var ρσ_Iter = ρσ_Iterable(slice_bounds), ρσ_Result = [], i;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n i = ρσ_Iter[ρσ_Index];\n ρσ_Result.push((i === null) ? new AST_Number((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = 0;\n return ρσ_d;\n }).call(this)) : i);\n }\n ρσ_Result = ρσ_list_constructor(ρσ_Result);\n return ρσ_Result;\n })();\n if (S.in_delete) {\n return subscripts(new AST_Call((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = new AST_SymbolRef((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"ρσ_delslice\";\n return ρσ_d;\n }).call(this));\n ρσ_d[\"args\"] = ρσ_list_decorate([ expr, new AST_Number((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = 1;\n return ρσ_d;\n }).call(this)) ]).concat(slice_bounds);\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), allow_calls);\n }\n return subscripts(new AST_Call((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = new AST_Dot((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"property\"] = \"slice\";\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n ρσ_d[\"args\"] = slice_bounds;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), allow_calls);\n }\n } else {\n if (is_py_sub) {\n assignment = null;\n assign_operator = \"\";\n if (is_(\"operator\") && ASSIGNMENT[ρσ_bound_index(S.token.value, ASSIGNMENT)]) {\n assign_operator = S.token.value.slice(0, -1);\n next();\n assignment = expression(true);\n }\n return subscripts(new AST_ItemAccess((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"property\"] = slice_bounds[0] || new AST_Number((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = 0;\n return ρσ_d;\n }).call(this));\n ρσ_d[\"assignment\"] = assignment;\n ρσ_d[\"assign_operator\"] = assign_operator;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), allow_calls);\n }\n return subscripts(new AST_Sub((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"property\"] = slice_bounds[0] || new AST_Number((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"value\"] = 0;\n return ρσ_d;\n }).call(this));\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), allow_calls);\n }\n };\n if (!getitem.__argnames__) Object.defineProperties(getitem, {\n __argnames__ : {value: [\"expr\", \"allow_calls\"]},\n __module__ : {value: \"parse\"}\n });\n\n function call_(expr) {\n var start, ret, c, funcname, tmp_, args;\n start = expr.start;\n S.in_parenthesized_expr = true;\n next();\n if (!expr.parens && get_class_in_scope(expr)) {\n ret = subscripts(new AST_New((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"args\"] = func_call_list();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), true);\n S.in_parenthesized_expr = false;\n return ret;\n } else {\n if (is_node_type(expr, AST_Dot)) {\n c = get_class_in_scope(expr.expression);\n }\n if (c) {\n funcname = expr;\n ret = subscripts(new AST_ClassCall((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"class\"] = expr.expression;\n ρσ_d[\"method\"] = funcname.property;\n ρσ_d[\"static\"] = is_static_method(c, funcname.property);\n ρσ_d[\"args\"] = func_call_list();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), true);\n S.in_parenthesized_expr = false;\n return ret;\n } else if (is_node_type(expr, AST_SymbolRef)) {\n tmp_ = expr.name;\n if (tmp_ === \"jstype\") {\n ret = new AST_UnaryPrefix((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"operator\"] = \"typeof\";\n ρσ_d[\"expression\"] = func_call_list()[0];\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n S.in_parenthesized_expr = false;\n return ret;\n } else if (tmp_ === \"isinstance\") {\n args = func_call_list();\n if (args.length !== 2) {\n croak(\"isinstance() must be called with exactly two arguments\");\n }\n ret = new AST_Binary((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"left\"] = args[0];\n ρσ_d[\"operator\"] = \"instanceof\";\n ρσ_d[\"right\"] = args[1];\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n S.in_parenthesized_expr = false;\n return ret;\n }\n }\n ret = subscripts(new AST_Call((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"args\"] = func_call_list();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), true);\n S.in_parenthesized_expr = false;\n return ret;\n }\n };\n if (!call_.__argnames__) Object.defineProperties(call_, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"parse\"}\n });\n\n function get_attr(expr, allow_calls) {\n var prop, c, classvars;\n next();\n prop = as_name();\n c = get_class_in_scope(expr);\n if (c) {\n classvars = (c.processing) ? c.provisional_classvars : c.classvars;\n if (classvars && classvars[prop]) {\n prop = \"prototype.\" + prop;\n }\n }\n return subscripts(new AST_Dot((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = expr.start;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"property\"] = prop;\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this)), allow_calls);\n };\n if (!get_attr.__argnames__) Object.defineProperties(get_attr, {\n __argnames__ : {value: [\"expr\", \"allow_calls\"]},\n __module__ : {value: \"parse\"}\n });\n\n function existential(expr, allow_calls) {\n var ans, ttype, val, is_py_sub;\n ans = new AST_Existential((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = expr.start;\n ρσ_d[\"end\"] = S.token;\n ρσ_d[\"expression\"] = expr;\n return ρσ_d;\n }).call(this));\n next();\n ttype = S.token.type;\n val = S.token.value;\n if (S.token.nlb || ttype === \"keyword\" || ttype === \"operator\" || ttype === \"eof\") {\n ans.after = null;\n return ans;\n }\n if (ttype === \"punc\") {\n if (val === \".\") {\n ans.after = \".\";\n } else if (val === \"[\") {\n is_py_sub = S.scoped_flags.get(\"overload_getitem\", false);\n ans.after = (is_py_sub) ? \"g\" : \"[\";\n } else if (val === \"(\") {\n if (!allow_calls) {\n unexpected();\n }\n ans.after = \"(\";\n } else {\n ans.after = null;\n return ans;\n }\n return subscripts(ans, allow_calls);\n }\n ans.after = expression();\n return ans;\n };\n if (!existential.__argnames__) Object.defineProperties(existential, {\n __argnames__ : {value: [\"expr\", \"allow_calls\"]},\n __module__ : {value: \"parse\"}\n });\n\n function subscripts(expr, allow_calls) {\n if (is_(\"punc\", \".\")) {\n return get_attr(expr, allow_calls);\n }\n if (is_(\"punc\", \"[\") && !S.token.nlb) {\n return getitem(expr, allow_calls);\n }\n if (allow_calls && is_(\"punc\", \"(\") && !S.token.nlb) {\n return call_(expr);\n }\n if (is_(\"punc\", \"?\")) {\n return existential(expr, allow_calls);\n }\n return expr;\n };\n if (!subscripts.__argnames__) Object.defineProperties(subscripts, {\n __argnames__ : {value: [\"expr\", \"allow_calls\"]},\n __module__ : {value: \"parse\"}\n });\n\n function maybe_unary(allow_calls) {\n var start, expr, is_parenthesized, ex, val;\n start = S.token;\n if (is_(\"operator\", \"@\")) {\n if (S.parsing_decorator) {\n croak(\"Nested decorators are not allowed\");\n }\n next();\n S.parsing_decorator = true;\n expr = expression();\n S.parsing_decorator = false;\n S.decorators.push(expr);\n return new AST_EmptyStatement((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"stype\"] = \"@\";\n ρσ_d[\"start\"] = prev();\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n }\n if (is_(\"operator\") && UNARY_PREFIX[ρσ_bound_index(start.value, UNARY_PREFIX)]) {\n next();\n is_parenthesized = is_(\"punc\", \"(\");\n S.in_delete = start.value === \"delete\";\n expr = maybe_unary(allow_calls);\n S.in_delete = false;\n ex = make_unary(AST_UnaryPrefix, start.value, expr, is_parenthesized);\n ex.start = start;\n ex.end = prev();\n return ex;\n }\n val = expr_atom(allow_calls);\n return val;\n };\n if (!maybe_unary.__argnames__) Object.defineProperties(maybe_unary, {\n __argnames__ : {value: [\"allow_calls\"]},\n __module__ : {value: \"parse\"}\n });\n\n function make_unary(ctor, op, expr, is_parenthesized) {\n return new ctor((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"operator\"] = op;\n ρσ_d[\"expression\"] = expr;\n ρσ_d[\"parenthesized\"] = is_parenthesized;\n return ρσ_d;\n }).call(this));\n };\n if (!make_unary.__argnames__) Object.defineProperties(make_unary, {\n __argnames__ : {value: [\"ctor\", \"op\", \"expr\", \"is_parenthesized\"]},\n __module__ : {value: \"parse\"}\n });\n\n function expr_op(left, min_prec, no_in) {\n var op, prec, right, ret;\n op = (is_(\"operator\")) ? S.token.value : null;\n if (op === \"!\" && peek().type === \"operator\" && peek().value === \"in\") {\n next();\n S.token.value = op = \"nin\";\n }\n if (no_in && (op === \"in\" || op === \"nin\")) {\n op = null;\n }\n prec = (op !== null) ? PRECEDENCE[(typeof op === \"number\" && op < 0) ? PRECEDENCE.length + op : op] : null;\n if (prec !== null && prec > min_prec) {\n next();\n right = expr_op(maybe_unary(true), prec, no_in);\n ret = new AST_Binary((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = left.start;\n ρσ_d[\"left\"] = left;\n ρσ_d[\"operator\"] = op;\n ρσ_d[\"right\"] = right;\n ρσ_d[\"end\"] = right.end;\n return ρσ_d;\n }).call(this));\n return expr_op(ret, min_prec, no_in);\n }\n return left;\n };\n if (!expr_op.__argnames__) Object.defineProperties(expr_op, {\n __argnames__ : {value: [\"left\", \"min_prec\", \"no_in\"]},\n __module__ : {value: \"parse\"}\n });\n\n function expr_ops(no_in) {\n return expr_op(maybe_unary(true), 0, no_in);\n };\n if (!expr_ops.__argnames__) Object.defineProperties(expr_ops, {\n __argnames__ : {value: [\"no_in\"]},\n __module__ : {value: \"parse\"}\n });\n\n function maybe_conditional(no_in) {\n var start, expr, ne, conditional;\n start = S.token;\n expr = expr_ops(no_in);\n if (is_(\"keyword\", \"if\") && (S.in_parenthesized_expr || S.statement_starting_token !== S.token && !S.in_comprehension && !S.token.nlb)) {\n next();\n ne = expression(false);\n expect_token(\"keyword\", \"else\");\n conditional = new AST_Conditional((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"condition\"] = ne;\n ρσ_d[\"consequent\"] = expr;\n ρσ_d[\"alternative\"] = expression(false, no_in);\n ρσ_d[\"end\"] = peek();\n return ρσ_d;\n }).call(this));\n return conditional;\n }\n return expr;\n };\n if (!maybe_conditional.__argnames__) Object.defineProperties(maybe_conditional, {\n __argnames__ : {value: [\"no_in\"]},\n __module__ : {value: \"parse\"}\n });\n\n function create_assign(data) {\n var ans, class_name, c, lhs;\n if (data.right && is_node_type(data.right, AST_Seq) && (is_node_type(data.right.car, AST_Assign) || is_node_type(data.right.cdr, AST_Assign)) && data.operator !== \"=\") {\n token_error(data.start, \"Invalid assignment operator for chained assignment: \" + data.operator);\n }\n ans = new AST_Assign(data);\n if (S.in_class.length && (ρσ_expr_temp = S.in_class)[ρσ_expr_temp.length-1]) {\n class_name = (ρσ_expr_temp = S.in_class)[ρσ_expr_temp.length-1];\n if (is_node_type(ans.left, AST_SymbolRef) && S.classes.length > 1) {\n c = (ρσ_expr_temp = (ρσ_expr_temp = S.classes)[ρσ_expr_temp.length-2])[(typeof class_name === \"number\" && class_name < 0) ? ρσ_expr_temp.length + class_name : class_name];\n if (c) {\n if (ans.is_chained()) {\n var ρσ_Iter70 = ρσ_Iterable(ans.traverse_chain()[0]);\n for (var ρσ_Index70 = 0; ρσ_Index70 < ρσ_Iter70.length; ρσ_Index70++) {\n lhs = ρσ_Iter70[ρσ_Index70];\n (ρσ_expr_temp = c.provisional_classvars)[ρσ_bound_index(lhs.name, ρσ_expr_temp)] = true;\n }\n } else {\n (ρσ_expr_temp = c.provisional_classvars)[ρσ_bound_index(ans.left.name, ρσ_expr_temp)] = true;\n }\n }\n }\n }\n return ans;\n };\n if (!create_assign.__argnames__) Object.defineProperties(create_assign, {\n __argnames__ : {value: [\"data\"]},\n __module__ : {value: \"parse\"}\n });\n\n function maybe_assign(no_in, only_plain_assignment) {\n var start, left, val;\n start = S.token;\n left = maybe_conditional(no_in);\n val = S.token.value;\n if (is_(\"operator\") && ASSIGNMENT[(typeof val === \"number\" && val < 0) ? ASSIGNMENT.length + val : val]) {\n if (only_plain_assignment && val !== \"=\") {\n croak(\"Invalid assignment operator for chained assignment: \" + val);\n }\n next();\n return create_assign((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"left\"] = left;\n ρσ_d[\"operator\"] = val;\n ρσ_d[\"right\"] = maybe_assign(no_in, true);\n ρσ_d[\"end\"] = prev();\n return ρσ_d;\n }).call(this));\n }\n return left;\n };\n if (!maybe_assign.__argnames__) Object.defineProperties(maybe_assign, {\n __argnames__ : {value: [\"no_in\", \"only_plain_assignment\"]},\n __module__ : {value: \"parse\"}\n });\n\n function expression(commas, no_in) {\n var start, expr, left;\n start = S.token;\n expr = maybe_assign(no_in);\n function build_seq(a) {\n if (a.length === 1) {\n return a[0];\n }\n return new AST_Seq((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"car\"] = a.shift();\n ρσ_d[\"cdr\"] = build_seq(a);\n ρσ_d[\"end\"] = peek();\n return ρσ_d;\n }).call(this));\n };\n if (!build_seq.__argnames__) Object.defineProperties(build_seq, {\n __argnames__ : {value: [\"a\"]},\n __module__ : {value: \"parse\"}\n });\n\n if (commas) {\n left = [ expr ];\n while (is_(\"punc\", \",\") && !peek().nlb) {\n next();\n if (is_node_type(expr, AST_Assign)) {\n left[left.length-1] = left[left.length-1].left;\n return create_assign((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"left\"] = (left.length === 1) ? left[0] : new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = left;\n return ρσ_d;\n }).call(this));\n ρσ_d[\"operator\"] = expr.operator;\n ρσ_d[\"right\"] = new AST_Seq((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"car\"] = expr.right;\n ρσ_d[\"cdr\"] = expression(true, no_in);\n return ρσ_d;\n }).call(this));\n ρσ_d[\"end\"] = peek();\n return ρσ_d;\n }).call(this));\n }\n expr = maybe_assign(no_in);\n left.push(expr);\n }\n if (left.length > 1 && is_node_type(left[left.length-1], AST_Assign)) {\n left[left.length-1] = left[left.length-1].left;\n return create_assign((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"left\"] = new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = left;\n return ρσ_d;\n }).call(this));\n ρσ_d[\"operator\"] = expr.operator;\n ρσ_d[\"right\"] = expr.right;\n ρσ_d[\"end\"] = peek();\n return ρσ_d;\n }).call(this));\n }\n return build_seq(left);\n }\n return expr;\n };\n if (!expression.__argnames__) Object.defineProperties(expression, {\n __argnames__ : {value: [\"commas\", \"no_in\"]},\n __module__ : {value: \"parse\"}\n });\n\n function in_loop(cont) {\n var ret;\n S.in_loop += 1;\n ret = cont();\n S.in_loop -= 1;\n return ret;\n };\n if (!in_loop.__argnames__) Object.defineProperties(in_loop, {\n __argnames__ : {value: [\"cont\"]},\n __module__ : {value: \"parse\"}\n });\n\n function run_parser() {\n var start, body, docstrings, first_token, toplevel, element, shebang, ds, end, seen_exports, item;\n start = S.token = next();\n body = [];\n docstrings = [];\n first_token = true;\n toplevel = options.toplevel;\n while (!is_(\"eof\")) {\n element = statement();\n if (first_token && is_node_type(element, AST_Directive) && element.value.indexOf(\"#!\") === 0) {\n shebang = element.value;\n } else {\n ds = !toplevel && is_docstring(element);\n if (ds) {\n docstrings.push(ds);\n } else {\n body.push(element);\n }\n }\n first_token = false;\n }\n end = prev();\n if (toplevel) {\n toplevel.body = toplevel.body.concat(body);\n toplevel.end = end;\n toplevel.docstrings;\n } else {\n toplevel = new AST_Toplevel((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"start\"] = start;\n ρσ_d[\"body\"] = body;\n ρσ_d[\"shebang\"] = shebang;\n ρσ_d[\"end\"] = end;\n ρσ_d[\"docstrings\"] = docstrings;\n return ρσ_d;\n }).call(this));\n }\n toplevel.nonlocalvars = scan_for_nonlocal_defs(toplevel.body).concat(S.globals);\n toplevel.localvars = ρσ_list_decorate([]);\n toplevel.exports = ρσ_list_decorate([]);\n seen_exports = Object.create(null);\n function add_item(item, isvar) {\n var symbol;\n if (toplevel.nonlocalvars.indexOf(item) < 0) {\n symbol = new_symbol(AST_SymbolVar, item);\n if (isvar) {\n toplevel.localvars.push(symbol);\n }\n if (!has_prop(seen_exports, item)) {\n toplevel.exports.push(symbol);\n seen_exports[(typeof item === \"number\" && item < 0) ? seen_exports.length + item : item] = true;\n }\n }\n };\n if (!add_item.__argnames__) Object.defineProperties(add_item, {\n __argnames__ : {value: [\"item\", \"isvar\"]},\n __module__ : {value: \"parse\"}\n });\n\n var ρσ_Iter71 = ρσ_Iterable(scan_for_local_vars(toplevel.body));\n for (var ρσ_Index71 = 0; ρσ_Index71 < ρσ_Iter71.length; ρσ_Index71++) {\n item = ρσ_Iter71[ρσ_Index71];\n add_item(item, true);\n }\n var ρσ_Iter72 = ρσ_Iterable(scan_for_top_level_callables(toplevel.body));\n for (var ρσ_Index72 = 0; ρσ_Index72 < ρσ_Iter72.length; ρσ_Index72++) {\n item = ρσ_Iter72[ρσ_Index72];\n add_item(item, false);\n }\n toplevel.filename = options.filename;\n toplevel.imported_module_ids = imported_module_ids;\n toplevel.classes = scan_for_classes(toplevel.body);\n toplevel.import_order = Object.keys(imported_modules).length;\n toplevel.module_id = module_id;\n imported_modules[(typeof module_id === \"number\" && module_id < 0) ? imported_modules.length + module_id : module_id] = toplevel;\n toplevel.imports = imported_modules;\n toplevel.baselib = baselib_items;\n toplevel.scoped_flags = S.scoped_flags.stack[0];\n importing_modules[(typeof module_id === \"number\" && module_id < 0) ? importing_modules.length + module_id : module_id] = false;\n toplevel.comments_after = S.token.comments_before || [];\n return toplevel;\n };\n if (!run_parser.__module__) Object.defineProperties(run_parser, {\n __module__ : {value: \"parse\"}\n });\n\n return run_parser;\n };\n if (!create_parser_ctx.__argnames__) Object.defineProperties(create_parser_ctx, {\n __argnames__ : {value: [\"S\", \"import_dirs\", \"module_id\", \"baselib_items\", \"imported_module_ids\", \"imported_modules\", \"importing_modules\", \"options\"]},\n __module__ : {value: \"parse\"}\n });\n\n function parse(text, options) {\n var import_dirs, x, location, module_id, baselib_items, imported_module_ids, imported_modules, importing_modules, S, obj, cname;\n options = defaults(options, (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"filename\"] = null;\n ρσ_d[\"module_id\"] = \"__main__\";\n ρσ_d[\"toplevel\"] = null;\n ρσ_d[\"for_linting\"] = false;\n ρσ_d[\"import_dirs\"] = [];\n ρσ_d[\"classes\"] = undefined;\n ρσ_d[\"scoped_flags\"] = Object.create(null);\n ρσ_d[\"discard_asserts\"] = false;\n ρσ_d[\"module_cache_dir\"] = \"\";\n return ρσ_d;\n }).call(this));\n import_dirs = (function() {\n var ρσ_Iter = ρσ_Iterable(options.import_dirs), ρσ_Result = [], x;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n x = ρσ_Iter[ρσ_Index];\n ρσ_Result.push(x);\n }\n ρσ_Result = ρσ_list_constructor(ρσ_Result);\n return ρσ_Result;\n })();\n var ρσ_Iter73 = ρσ_Iterable([options.libdir, options.basedir]);\n for (var ρσ_Index73 = 0; ρσ_Index73 < ρσ_Iter73.length; ρσ_Index73++) {\n location = ρσ_Iter73[ρσ_Index73];\n if (location) {\n import_dirs.push(location);\n }\n }\n module_id = options.module_id;\n baselib_items = Object.create(null);\n imported_module_ids = ρσ_list_decorate([]);\n imported_modules = options.imported_modules || Object.create(null);\n importing_modules = options.importing_modules || Object.create(null);\n importing_modules[(typeof module_id === \"number\" && module_id < 0) ? importing_modules.length + module_id : module_id] = true;\n S = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"input\"] = (typeof text === \"string\") ? tokenizer(text, options.filename) : text;\n ρσ_d[\"token\"] = null;\n ρσ_d[\"prev\"] = null;\n ρσ_d[\"peeked\"] = ρσ_list_decorate([]);\n ρσ_d[\"in_function\"] = 0;\n ρσ_d[\"statement_starting_token\"] = null;\n ρσ_d[\"in_comprehension\"] = false;\n ρσ_d[\"in_parenthesized_expr\"] = false;\n ρσ_d[\"in_delete\"] = false;\n ρσ_d[\"in_loop\"] = 0;\n ρσ_d[\"in_class\"] = ρσ_list_decorate([ false ]);\n ρσ_d[\"classes\"] = ρσ_list_decorate([ Object.create(null) ]);\n ρσ_d[\"functions\"] = ρσ_list_decorate([ Object.create(null) ]);\n ρσ_d[\"labels\"] = ρσ_list_decorate([]);\n ρσ_d[\"decorators\"] = [];\n ρσ_d[\"parsing_decorator\"] = false;\n ρσ_d[\"globals\"] = [];\n ρσ_d[\"scoped_flags\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"stack\"] = [options.scoped_flags || Object.create(null)];\n ρσ_d[\"push\"] = (function() {\n var ρσ_anonfunc = function () {\n this.stack.push(Object.create(null));\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"pop\"] = (function() {\n var ρσ_anonfunc = function () {\n this.stack.pop();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function (name, defval) {\n var d, q;\n for (var i = this.stack.length - 1; i >= 0; i--) {\n d = (ρσ_expr_temp = this.stack)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n q = d[(typeof name === \"number\" && name < 0) ? d.length + name : name];\n if (q) {\n return q;\n }\n }\n return defval;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"name\", \"defval\"]},\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"set\"] = (function() {\n var ρσ_anonfunc = function (name, val) {\n (ρσ_expr_temp = (ρσ_expr_temp = this.stack)[ρσ_expr_temp.length-1])[(typeof name === \"number\" && name < 0) ? ρσ_expr_temp.length + name : name] = val;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"name\", \"val\"]},\n __module__ : {value: \"parse\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n return ρσ_d;\n }).call(this);\n if (options.classes) {\n var ρσ_Iter74 = ρσ_Iterable(options.classes);\n for (var ρσ_Index74 = 0; ρσ_Index74 < ρσ_Iter74.length; ρσ_Index74++) {\n cname = ρσ_Iter74[ρσ_Index74];\n obj = (ρσ_expr_temp = options.classes)[(typeof cname === \"number\" && cname < 0) ? ρσ_expr_temp.length + cname : cname];\n (ρσ_expr_temp = S.classes[0])[(typeof cname === \"number\" && cname < 0) ? ρσ_expr_temp.length + cname : cname] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"static\"] = obj.static;\n ρσ_d[\"bound\"] = obj.bound;\n ρσ_d[\"classvars\"] = obj.classvars;\n return ρσ_d;\n }).call(this);\n }\n }\n return create_parser_ctx(S, import_dirs, module_id, baselib_items, imported_module_ids, imported_modules, importing_modules, options)();\n };\n if (!parse.__argnames__) Object.defineProperties(parse, {\n __argnames__ : {value: [\"text\", \"options\"]},\n __module__ : {value: \"parse\"}\n });\n\n ρσ_modules.parse.COMPILER_VERSION = COMPILER_VERSION;\n ρσ_modules.parse.PYTHON_FLAGS = PYTHON_FLAGS;\n ρσ_modules.parse.NATIVE_CLASSES = NATIVE_CLASSES;\n ρσ_modules.parse.ERROR_CLASSES = ERROR_CLASSES;\n ρσ_modules.parse.COMMON_STATIC = COMMON_STATIC;\n ρσ_modules.parse.FORBIDDEN_CLASS_VARS = FORBIDDEN_CLASS_VARS;\n ρσ_modules.parse.UNARY_PREFIX = UNARY_PREFIX;\n ρσ_modules.parse.ASSIGNMENT = ASSIGNMENT;\n ρσ_modules.parse.PRECEDENCE = PRECEDENCE;\n ρσ_modules.parse.STATEMENTS_WITH_LABELS = STATEMENTS_WITH_LABELS;\n ρσ_modules.parse.ATOMIC_START_TOKEN = ATOMIC_START_TOKEN;\n ρσ_modules.parse.compile_time_decorators = compile_time_decorators;\n ρσ_modules.parse.get_compiler_version = get_compiler_version;\n ρσ_modules.parse.static_predicate = static_predicate;\n ρσ_modules.parse.has_simple_decorator = has_simple_decorator;\n ρσ_modules.parse.has_setter_decorator = has_setter_decorator;\n ρσ_modules.parse.create_parser_ctx = create_parser_ctx;\n ρσ_modules.parse.parse = parse;\n })();\n\n (function(){\n var __name__ = \"output\";\n\n })();\n\n (function(){\n var __name__ = \"output.stream\";\n var DANGEROUS, require_semi_colon_chars, output_stream_defaults;\n var make_predicate = ρσ_modules.utils.make_predicate;\n var defaults = ρσ_modules.utils.defaults;\n var repeat_string = ρσ_modules.utils.repeat_string;\n\n var is_identifier_char = ρσ_modules.tokenizer.is_identifier_char;\n\n DANGEROUS = /[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g;\n function as_hex(code, sz) {\n var val;\n val = code.toString(16);\n if (val.length < sz) {\n val = \"0\".repeat(sz - val.length) + val;\n }\n return val;\n };\n if (!as_hex.__argnames__) Object.defineProperties(as_hex, {\n __argnames__ : {value: [\"code\", \"sz\"]},\n __module__ : {value: \"output.stream\"}\n });\n\n function to_ascii(str_, identifier) {\n return str_.replace(/[\\u0080-\\uffff]/g, (function() {\n var ρσ_anonfunc = function (ch) {\n var code;\n code = ch.charCodeAt(0).toString(16);\n if (code.length <= 2 && !identifier) {\n return \"\\\\x\" + as_hex(code, 2);\n } else {\n return \"\\\\u\" + as_hex(code, 4);\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"ch\"]},\n __module__ : {value: \"output.stream\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!to_ascii.__argnames__) Object.defineProperties(to_ascii, {\n __argnames__ : {value: [\"str_\", \"identifier\"]},\n __module__ : {value: \"output.stream\"}\n });\n\n function encode_string(str_) {\n return JSON.stringify(str_).replace(DANGEROUS, (function() {\n var ρσ_anonfunc = function (a) {\n return \"\\\\u\" + as_hex(a.charCodeAt(0), 4);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"a\"]},\n __module__ : {value: \"output.stream\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!encode_string.__argnames__) Object.defineProperties(encode_string, {\n __argnames__ : {value: [\"str_\"]},\n __module__ : {value: \"output.stream\"}\n });\n\n require_semi_colon_chars = make_predicate(\"( [ + * / - , .\");\n output_stream_defaults = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"indent_start\"] = 0;\n ρσ_d[\"indent_level\"] = 4;\n ρσ_d[\"quote_keys\"] = false;\n ρσ_d[\"space_colon\"] = true;\n ρσ_d[\"ascii_only\"] = false;\n ρσ_d[\"width\"] = 80;\n ρσ_d[\"max_line_len\"] = 32e3;\n ρσ_d[\"ie_proof\"] = true;\n ρσ_d[\"beautify\"] = false;\n ρσ_d[\"source_map\"] = null;\n ρσ_d[\"bracketize\"] = false;\n ρσ_d[\"semicolons\"] = true;\n ρσ_d[\"comments\"] = false;\n ρσ_d[\"preserve_line\"] = false;\n ρσ_d[\"omit_baselib\"] = false;\n ρσ_d[\"baselib_plain\"] = null;\n ρσ_d[\"private_scope\"] = true;\n ρσ_d[\"keep_docstrings\"] = false;\n ρσ_d[\"discard_asserts\"] = false;\n ρσ_d[\"module_cache_dir\"] = \"\";\n ρσ_d[\"js_version\"] = 5;\n ρσ_d[\"write_name\"] = true;\n return ρσ_d;\n }).call(this);\n function OutputStream() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n OutputStream.prototype.__init__.apply(this, arguments);\n }\n OutputStream.prototype.__init__ = function __init__(options) {\n var self = this;\n self.options = defaults(options, output_stream_defaults, true);\n self._indentation = 0;\n self.current_col = 0;\n self.current_line = 1;\n self.current_pos = 0;\n self.OUTPUT = \"\";\n self.might_need_space = false;\n self.might_need_semicolon = false;\n self._last = null;\n self._stack = ρσ_list_decorate([]);\n self.index_counter = 0;\n self.with_counter = 0;\n self.try_else_counter = 0;\n };\n if (!OutputStream.prototype.__init__.__argnames__) Object.defineProperties(OutputStream.prototype.__init__, {\n __argnames__ : {value: [\"options\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.__argnames__ = OutputStream.prototype.__init__.__argnames__;\n OutputStream.__handles_kwarg_interpolation__ = OutputStream.prototype.__init__.__handles_kwarg_interpolation__;\n OutputStream.prototype.new_try_else_counter = function new_try_else_counter() {\n var self = this;\n self.try_else_counter += 1;\n return \"ρσ_try_else_\" + self.try_else_counter;\n };\n if (!OutputStream.prototype.new_try_else_counter.__module__) Object.defineProperties(OutputStream.prototype.new_try_else_counter, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.make_name = function make_name(name) {\n var self = this;\n name = name.toString();\n if (self.options.ascii_only) {\n name = to_ascii(name, true);\n }\n return name;\n };\n if (!OutputStream.prototype.make_name.__argnames__) Object.defineProperties(OutputStream.prototype.make_name, {\n __argnames__ : {value: [\"name\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.print_name = function print_name(name) {\n var self = this;\n self.print(self.make_name(name));\n };\n if (!OutputStream.prototype.print_name.__argnames__) Object.defineProperties(OutputStream.prototype.print_name, {\n __argnames__ : {value: [\"name\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.make_indent = function make_indent(back) {\n var self = this;\n return repeat_string(\" \", self.options.indent_start + self._indentation - back * self.options.indent_level);\n };\n if (!OutputStream.prototype.make_indent.__argnames__) Object.defineProperties(OutputStream.prototype.make_indent, {\n __argnames__ : {value: [\"back\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.last_char = function last_char() {\n var self = this;\n return self._last.charAt(self._last.length - 1);\n };\n if (!OutputStream.prototype.last_char.__module__) Object.defineProperties(OutputStream.prototype.last_char, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.maybe_newline = function maybe_newline() {\n var self = this;\n if (self.options.max_line_len && self.current_col > self.options.max_line_len) {\n self.print(\"\\n\");\n }\n };\n if (!OutputStream.prototype.maybe_newline.__module__) Object.defineProperties(OutputStream.prototype.maybe_newline, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.print = function print(str_) {\n var self = this;\n var ch, target_line, prev, a, n;\n str_ = String(str_);\n ch = str_.charAt(0);\n if (self.might_need_semicolon) {\n if ((!ch || \";}\".indexOf(ch) < 0) && !/[;]$/.test(self._last)) {\n if (self.options.semicolons || require_semi_colon_chars[(typeof ch === \"number\" && ch < 0) ? require_semi_colon_chars.length + ch : ch]) {\n self.OUTPUT += \";\";\n self.current_col += 1;\n self.current_pos += 1;\n } else {\n self.OUTPUT += \"\\n\";\n self.current_pos += 1;\n self.current_line += 1;\n self.current_col = 0;\n }\n if (!self.options.beautify) {\n self.might_need_space = false;\n }\n }\n self.might_need_semicolon = false;\n self.maybe_newline();\n }\n if (!self.options.beautify && self.options.preserve_line && (ρσ_expr_temp = self._stack)[ρσ_bound_index(self._stack.length - 1, ρσ_expr_temp)]) {\n target_line = (ρσ_expr_temp = self._stack)[ρσ_bound_index(self._stack.length - 1, ρσ_expr_temp)].start.line;\n while (self.current_line < target_line) {\n self.OUTPUT += \"\\n\";\n self.current_pos += 1;\n self.current_line += 1;\n self.current_col = 0;\n self.might_need_space = false;\n }\n }\n if (self.might_need_space) {\n prev = self.last_char();\n if (is_identifier_char(prev) && (is_identifier_char(ch) || ch === \"\\\\\") || /^[\\+\\-\\/]$/.test(ch) && ch === prev) {\n self.OUTPUT += \" \";\n self.current_col += 1;\n self.current_pos += 1;\n }\n self.might_need_space = false;\n }\n a = str_.split(/\\r?\\n/);\n n = a.length - 1;\n self.current_line += n;\n if (n === 0) {\n self.current_col += a[(typeof n === \"number\" && n < 0) ? a.length + n : n].length;\n } else {\n self.current_col = a[(typeof n === \"number\" && n < 0) ? a.length + n : n].length;\n }\n self.current_pos += str_.length;\n self._last = str_;\n self.OUTPUT += str_;\n };\n if (!OutputStream.prototype.print.__argnames__) Object.defineProperties(OutputStream.prototype.print, {\n __argnames__ : {value: [\"str_\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.space = function space() {\n var self = this;\n if (self.options.beautify) {\n self.print(\" \");\n } else {\n self.might_need_space = true;\n }\n };\n if (!OutputStream.prototype.space.__module__) Object.defineProperties(OutputStream.prototype.space, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.indent = function indent(half) {\n var self = this;\n if (self.options.beautify) {\n self.print(self.make_indent((half) ? .5 : 0));\n }\n };\n if (!OutputStream.prototype.indent.__argnames__) Object.defineProperties(OutputStream.prototype.indent, {\n __argnames__ : {value: [\"half\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.with_indent = function with_indent(col, proceed) {\n var self = this;\n var save_indentation, ret;\n if (self.options.beautify) {\n if (col === true) {\n col = self.next_indent();\n }\n save_indentation = self._indentation;\n self._indentation = col;\n ret = proceed();\n self._indentation = save_indentation;\n return ret;\n } else {\n return proceed();\n }\n };\n if (!OutputStream.prototype.with_indent.__argnames__) Object.defineProperties(OutputStream.prototype.with_indent, {\n __argnames__ : {value: [\"col\", \"proceed\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.indentation = function indentation() {\n var self = this;\n return self._indentation;\n };\n if (!OutputStream.prototype.indentation.__module__) Object.defineProperties(OutputStream.prototype.indentation, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.set_indentation = function set_indentation(val) {\n var self = this;\n if (self.options.beautify) {\n self._indentation = val;\n }\n };\n if (!OutputStream.prototype.set_indentation.__argnames__) Object.defineProperties(OutputStream.prototype.set_indentation, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.newline = function newline() {\n var self = this;\n if (self.options.beautify) {\n self.print(\"\\n\");\n }\n };\n if (!OutputStream.prototype.newline.__module__) Object.defineProperties(OutputStream.prototype.newline, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.semicolon = function semicolon() {\n var self = this;\n if (self.options.beautify) {\n self.print(\";\");\n } else {\n self.might_need_semicolon = true;\n }\n };\n if (!OutputStream.prototype.semicolon.__module__) Object.defineProperties(OutputStream.prototype.semicolon, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.force_semicolon = function force_semicolon() {\n var self = this;\n self.might_need_semicolon = false;\n self.print(\";\");\n };\n if (!OutputStream.prototype.force_semicolon.__module__) Object.defineProperties(OutputStream.prototype.force_semicolon, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.next_indent = function next_indent() {\n var self = this;\n return self._indentation + self.options.indent_level;\n };\n if (!OutputStream.prototype.next_indent.__module__) Object.defineProperties(OutputStream.prototype.next_indent, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.spaced = function spaced() {\n var self = this;\n for (var i=0; i < arguments.length; i++) {\n if (i > 0) {\n self.space();\n }\n if (typeof arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].print === \"function\") {\n arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].print(self);\n } else {\n self.print(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n }\n }\n };\n if (!OutputStream.prototype.spaced.__module__) Object.defineProperties(OutputStream.prototype.spaced, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.end_statement = function end_statement() {\n var self = this;\n self.semicolon();\n self.newline();\n };\n if (!OutputStream.prototype.end_statement.__module__) Object.defineProperties(OutputStream.prototype.end_statement, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.with_block = function with_block(cont) {\n var self = this;\n var ret;\n ret = null;\n self.print(\"{\");\n self.newline();\n self.with_indent(self.next_indent(), (function() {\n var ρσ_anonfunc = function () {\n ret = cont();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.stream\"}\n });\n return ρσ_anonfunc;\n })());\n self.indent();\n self.print(\"}\");\n return ret;\n };\n if (!OutputStream.prototype.with_block.__argnames__) Object.defineProperties(OutputStream.prototype.with_block, {\n __argnames__ : {value: [\"cont\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.with_parens = function with_parens(cont) {\n var self = this;\n var ret;\n self.print(\"(\");\n ret = cont();\n self.print(\")\");\n return ret;\n };\n if (!OutputStream.prototype.with_parens.__argnames__) Object.defineProperties(OutputStream.prototype.with_parens, {\n __argnames__ : {value: [\"cont\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.with_square = function with_square(cont) {\n var self = this;\n var ret;\n self.print(\"[\");\n ret = cont();\n self.print(\"]\");\n return ret;\n };\n if (!OutputStream.prototype.with_square.__argnames__) Object.defineProperties(OutputStream.prototype.with_square, {\n __argnames__ : {value: [\"cont\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.comma = function comma() {\n var self = this;\n self.print(\",\");\n self.space();\n };\n if (!OutputStream.prototype.comma.__module__) Object.defineProperties(OutputStream.prototype.comma, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.colon = function colon() {\n var self = this;\n self.print(\":\");\n if (self.options.space_colon) {\n self.space();\n }\n };\n if (!OutputStream.prototype.colon.__module__) Object.defineProperties(OutputStream.prototype.colon, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.dump_yield = function dump_yield() {\n var self = this;\n var code, ci;\n self.indent();\n self.spaced(\"var\", \"ρσ_regenerator\", \"=\", \"{}\");\n self.end_statement();\n code = \"ρσ_regenerator.regeneratorRuntime = \" + regenerate(false, self.options.beautify);\n if (self.options.beautify) {\n code = code.replace(/\\/\\/.*$/gm, \"\\n\").replace(/^\\s*$/gm, \"\");\n ci = self.make_indent(0);\n code = (function() {\n var ρσ_Iter = ρσ_Iterable(code.split(\"\\n\")), ρσ_Result = [], x;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n x = ρσ_Iter[ρσ_Index];\n ρσ_Result.push(ci + x);\n }\n ρσ_Result = ρσ_list_constructor(ρσ_Result);\n return ρσ_Result;\n })().join(\"\\n\");\n }\n self.print(code + \"})(ρσ_regenerator)\");\n self.end_statement();\n };\n if (!OutputStream.prototype.dump_yield.__module__) Object.defineProperties(OutputStream.prototype.dump_yield, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.get = function get() {\n var self = this;\n return self.OUTPUT;\n };\n if (!OutputStream.prototype.get.__module__) Object.defineProperties(OutputStream.prototype.get, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.assign = function assign(name) {\n var self = this;\n if (typeof name === \"string\") {\n self.print(name);\n } else {\n name.print(self);\n }\n self.space();\n self.print(\"=\");\n self.space();\n };\n if (!OutputStream.prototype.assign.__argnames__) Object.defineProperties(OutputStream.prototype.assign, {\n __argnames__ : {value: [\"name\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.current_width = function current_width() {\n var self = this;\n return self.current_col - self._indentation;\n };\n if (!OutputStream.prototype.current_width.__module__) Object.defineProperties(OutputStream.prototype.current_width, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.should_break = function should_break() {\n var self = this;\n return self.options.width && self.current_width() >= self.options.width;\n };\n if (!OutputStream.prototype.should_break.__module__) Object.defineProperties(OutputStream.prototype.should_break, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.last = function last() {\n var self = this;\n return self._last;\n };\n if (!OutputStream.prototype.last.__module__) Object.defineProperties(OutputStream.prototype.last, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.print_string = function print_string(str_) {\n var self = this;\n self.print(encode_string(str_));\n };\n if (!OutputStream.prototype.print_string.__argnames__) Object.defineProperties(OutputStream.prototype.print_string, {\n __argnames__ : {value: [\"str_\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.line = function line() {\n var self = this;\n return self.current_line;\n };\n if (!OutputStream.prototype.line.__module__) Object.defineProperties(OutputStream.prototype.line, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.col = function col() {\n var self = this;\n return self.current_col;\n };\n if (!OutputStream.prototype.col.__module__) Object.defineProperties(OutputStream.prototype.col, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.pos = function pos() {\n var self = this;\n return self.current_pos;\n };\n if (!OutputStream.prototype.pos.__module__) Object.defineProperties(OutputStream.prototype.pos, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.push_node = function push_node(node) {\n var self = this;\n self._stack.push(node);\n };\n if (!OutputStream.prototype.push_node.__argnames__) Object.defineProperties(OutputStream.prototype.push_node, {\n __argnames__ : {value: [\"node\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.pop_node = function pop_node() {\n var self = this;\n return self._stack.pop();\n };\n if (!OutputStream.prototype.pop_node.__module__) Object.defineProperties(OutputStream.prototype.pop_node, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.stack = function stack() {\n var self = this;\n return self._stack;\n };\n if (!OutputStream.prototype.stack.__module__) Object.defineProperties(OutputStream.prototype.stack, {\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.parent = function parent(n) {\n var self = this;\n return (ρσ_expr_temp = self._stack)[ρσ_bound_index(self._stack.length - 2 - (n || 0), ρσ_expr_temp)];\n };\n if (!OutputStream.prototype.parent.__argnames__) Object.defineProperties(OutputStream.prototype.parent, {\n __argnames__ : {value: [\"n\"]},\n __module__ : {value: \"output.stream\"}\n });\n OutputStream.prototype.__repr__ = function __repr__ () {\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n };\n OutputStream.prototype.__str__ = function __str__ () {\n return this.__repr__();\n };\n Object.defineProperty(OutputStream.prototype, \"__bases__\", {value: []});\n OutputStream.prototype.toString = OutputStream.prototype.get;\n\n ρσ_modules[\"output.stream\"].DANGEROUS = DANGEROUS;\n ρσ_modules[\"output.stream\"].require_semi_colon_chars = require_semi_colon_chars;\n ρσ_modules[\"output.stream\"].output_stream_defaults = output_stream_defaults;\n ρσ_modules[\"output.stream\"].as_hex = as_hex;\n ρσ_modules[\"output.stream\"].to_ascii = to_ascii;\n ρσ_modules[\"output.stream\"].encode_string = encode_string;\n ρσ_modules[\"output.stream\"].OutputStream = OutputStream;\n })();\n\n (function(){\n var __name__ = \"output.statements\";\n var AST_Definitions = ρσ_modules.ast.AST_Definitions;\n var AST_Scope = ρσ_modules.ast.AST_Scope;\n var AST_Method = ρσ_modules.ast.AST_Method;\n var AST_Except = ρσ_modules.ast.AST_Except;\n var AST_EmptyStatement = ρσ_modules.ast.AST_EmptyStatement;\n var AST_Statement = ρσ_modules.ast.AST_Statement;\n var AST_Seq = ρσ_modules.ast.AST_Seq;\n var AST_BaseCall = ρσ_modules.ast.AST_BaseCall;\n var AST_Dot = ρσ_modules.ast.AST_Dot;\n var AST_Sub = ρσ_modules.ast.AST_Sub;\n var AST_ItemAccess = ρσ_modules.ast.AST_ItemAccess;\n var AST_Conditional = ρσ_modules.ast.AST_Conditional;\n var AST_Binary = ρσ_modules.ast.AST_Binary;\n var AST_BlockStatement = ρσ_modules.ast.AST_BlockStatement;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n function force_statement(stat, output) {\n if (output.options.bracketize) {\n if (!stat || is_node_type(stat, AST_EmptyStatement)) {\n output.print(\"{}\");\n } else if (is_node_type(stat, AST_BlockStatement)) {\n stat.print(output);\n } else {\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n output.indent();\n stat.print(output);\n output.newline();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.statements\"}\n });\n return ρσ_anonfunc;\n })());\n }\n } else {\n if (!stat || is_node_type(stat, AST_EmptyStatement)) {\n output.force_semicolon();\n } else {\n stat.print(output);\n }\n }\n };\n if (!force_statement.__argnames__) Object.defineProperties(force_statement, {\n __argnames__ : {value: [\"stat\", \"output\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n function first_in_statement(output) {\n var a, i, node, p;\n a = output.stack();\n i = a.length;\n node = a[ρσ_bound_index(i -= 1, a)];\n p = a[ρσ_bound_index(i -= 1, a)];\n while (i > 0) {\n if (is_node_type(p, AST_Statement) && p.body === node) {\n return true;\n }\n if (is_node_type(p, AST_Seq) && p.car === node || is_node_type(p, AST_BaseCall) && p.expression === node || is_node_type(p, AST_Dot) && p.expression === node || is_node_type(p, AST_Sub) && p.expression === node || is_node_type(p, AST_ItemAccess) && p.expression === node || is_node_type(p, AST_Conditional) && p.condition === node || is_node_type(p, AST_Binary) && p.left === node) {\n node = p;\n p = a[ρσ_bound_index(i -= 1, a)];\n } else {\n return false;\n }\n }\n };\n if (!first_in_statement.__argnames__) Object.defineProperties(first_in_statement, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n function declare_vars(vars, output) {\n var ρσ_unpack, i, arg;\n if (vars.length) {\n output.indent();\n output.print(\"var\");\n output.space();\n var ρσ_Iter75 = ρσ_Iterable(enumerate(vars));\n for (var ρσ_Index75 = 0; ρσ_Index75 < ρσ_Iter75.length; ρσ_Index75++) {\n ρσ_unpack = ρσ_Iter75[ρσ_Index75];\n i = ρσ_unpack[0];\n arg = ρσ_unpack[1];\n if (i) {\n output.comma();\n }\n arg.print(output);\n }\n output.semicolon();\n output.newline();\n }\n };\n if (!declare_vars.__argnames__) Object.defineProperties(declare_vars, {\n __argnames__ : {value: [\"vars\", \"output\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n function display_body(body, is_toplevel, output) {\n var last, ρσ_unpack, i, stmt;\n last = body.length - 1;\n var ρσ_Iter76 = ρσ_Iterable(enumerate(body));\n for (var ρσ_Index76 = 0; ρσ_Index76 < ρσ_Iter76.length; ρσ_Index76++) {\n ρσ_unpack = ρσ_Iter76[ρσ_Index76];\n i = ρσ_unpack[0];\n stmt = ρσ_unpack[1];\n if (!(is_node_type(stmt, AST_EmptyStatement)) && !(is_node_type(stmt, AST_Definitions))) {\n output.indent();\n stmt.print(output);\n if (!((i === last && is_toplevel))) {\n output.newline();\n }\n }\n }\n };\n if (!display_body.__argnames__) Object.defineProperties(display_body, {\n __argnames__ : {value: [\"body\", \"is_toplevel\", \"output\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n function display_complex_body(node, is_toplevel, output, function_preamble) {\n var offset;\n offset = 0;\n if (is_node_type(node, AST_Method) && !node.static) {\n output.indent();\n output.print(\"var\");\n output.space();\n output.assign(node.argnames[0]);\n output.print(\"this\");\n output.semicolon();\n output.newline();\n offset += 1;\n }\n if (is_node_type(node, AST_Scope)) {\n function_preamble(node, output, offset);\n declare_vars(node.localvars, output);\n } else if (is_node_type(node, AST_Except)) {\n if (node.argname) {\n output.indent();\n output.print(\"var\");\n output.space();\n output.assign(node.argname);\n output.print(\"ρσ_Exception\");\n output.semicolon();\n output.newline();\n }\n }\n display_body(node.body, is_toplevel, output);\n };\n if (!display_complex_body.__argnames__) Object.defineProperties(display_complex_body, {\n __argnames__ : {value: [\"node\", \"is_toplevel\", \"output\", \"function_preamble\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n function print_bracketed(node, output, complex, function_preamble, before, after) {\n if (node.body.length > 0) {\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n if (before) {\n before(output);\n }\n if (complex) {\n display_complex_body(node, false, output, function_preamble);\n } else {\n display_body(node.body, false, output);\n }\n if (after) {\n after(output);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.statements\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n if (before || after) {\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n if (before) {\n before(output);\n }\n if (after) {\n after(output);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.statements\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n output.print(\"{}\");\n }\n }\n };\n if (!print_bracketed.__argnames__) Object.defineProperties(print_bracketed, {\n __argnames__ : {value: [\"node\", \"output\", \"complex\", \"function_preamble\", \"before\", \"after\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n function print_with(self, output) {\n var exits, clause_name, clause;\n exits = [];\n [output.assign(\"ρσ_with_exception\"), output.print(\"undefined\"), output.end_statement()];\n var ρσ_Iter77 = ρσ_Iterable(self.clauses);\n for (var ρσ_Index77 = 0; ρσ_Index77 < ρσ_Iter77.length; ρσ_Index77++) {\n clause = ρσ_Iter77[ρσ_Index77];\n output.with_counter += 1;\n clause_name = \"ρσ_with_clause_\" + output.with_counter;\n exits.push(clause_name);\n [output.indent(), output.print(\"var \"), output.assign(clause_name)];\n clause.expression.print(output);\n output.end_statement();\n output.indent();\n if (clause.alias) {\n output.assign(clause.alias.name);\n }\n output.print(clause_name + \".__enter__()\");\n output.end_statement();\n }\n [output.indent(), output.print(\"try\"), output.space()];\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n output.indent();\n self._do_print_body(output);\n output.newline();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.statements\"}\n });\n return ρσ_anonfunc;\n })());\n [output.space(), output.print(\"catch(e)\")];\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n [output.indent(), output.assign(\"ρσ_with_exception\"), output.print(\"e\"), output.end_statement()];\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.statements\"}\n });\n return ρσ_anonfunc;\n })());\n [output.newline(), output.indent(), output.spaced(\"if\", \"(ρσ_with_exception\", \"===\", \"undefined)\")];\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var clause;\n var ρσ_Iter78 = ρσ_Iterable(exits);\n for (var ρσ_Index78 = 0; ρσ_Index78 < ρσ_Iter78.length; ρσ_Index78++) {\n clause = ρσ_Iter78[ρσ_Index78];\n [output.indent(), output.print(clause + \".__exit__()\"), output.end_statement()];\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.statements\"}\n });\n return ρσ_anonfunc;\n })());\n [output.space(), output.print(\"else\"), output.space()];\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var clause;\n [output.indent(), output.assign(\"ρσ_with_suppress\"), output.print(\"false\"), output.end_statement()];\n var ρσ_Iter79 = ρσ_Iterable(exits);\n for (var ρσ_Index79 = 0; ρσ_Index79 < ρσ_Iter79.length; ρσ_Index79++) {\n clause = ρσ_Iter79[ρσ_Index79];\n output.indent();\n output.spaced(\"ρσ_with_suppress\", \"|=\", \"ρσ_bool(\" + clause + \".__exit__(ρσ_with_exception.constructor,\", \"ρσ_with_exception,\", \"ρσ_with_exception.stack))\");\n output.end_statement();\n }\n [output.indent(), output.spaced(\"if\", \"(!ρσ_with_suppress)\", \"throw ρσ_with_exception\"), \n output.end_statement()];\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.statements\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!print_with.__argnames__) Object.defineProperties(print_with, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n function print_assert(self, output) {\n if (output.options.discard_asserts) {\n return;\n }\n [output.spaced(\"if\", \"(!(\"), self.condition.print(output), output.spaced(\"))\", \"throw new AssertionError\")];\n if (self.message) {\n output.print(\"(\");\n self.message.print(output);\n output.print(\")\");\n }\n output.end_statement();\n };\n if (!print_assert.__argnames__) Object.defineProperties(print_assert, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.statements\"}\n });\n\n ρσ_modules[\"output.statements\"].force_statement = force_statement;\n ρσ_modules[\"output.statements\"].first_in_statement = first_in_statement;\n ρσ_modules[\"output.statements\"].declare_vars = declare_vars;\n ρσ_modules[\"output.statements\"].display_body = display_body;\n ρσ_modules[\"output.statements\"].display_complex_body = display_complex_body;\n ρσ_modules[\"output.statements\"].print_bracketed = print_bracketed;\n ρσ_modules[\"output.statements\"].print_with = print_with;\n ρσ_modules[\"output.statements\"].print_assert = print_assert;\n })();\n\n (function(){\n var __name__ = \"output.exceptions\";\n var print_bracketed = ρσ_modules[\"output.statements\"].print_bracketed;\n\n function print_try(self, output) {\n var else_var_name;\n else_var_name = null;\n function update_output_var(output) {\n [output.indent(), output.assign(else_var_name), output.print(\"true\"), output.end_statement()];\n };\n if (!update_output_var.__argnames__) Object.defineProperties(update_output_var, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.exceptions\"}\n });\n\n if (self.belse) {\n else_var_name = output.new_try_else_counter();\n [output.assign(\"var \" + else_var_name), output.print(\"false\"), output.end_statement(), \n output.indent()];\n }\n output.print(\"try\");\n output.space();\n print_bracketed(self, output, false, null, null, (else_var_name) ? update_output_var : null);\n if (self.bcatch) {\n output.space();\n print_catch(self.bcatch, output);\n }\n if (self.bfinally) {\n output.space();\n print_finally(self.bfinally, output, self.belse, else_var_name);\n } else if (self.belse) {\n output.newline();\n print_else(self.belse, else_var_name, output);\n }\n };\n if (!print_try.__argnames__) Object.defineProperties(print_try, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.exceptions\"}\n });\n\n function print_catch(self, output) {\n output.print(\"catch\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"ρσ_Exception\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.exceptions\"}\n });\n return ρσ_anonfunc;\n })());\n output.space();\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var no_default, ρσ_unpack, i, exception;\n output.indent();\n [output.spaced(\"ρσ_last_exception\", \"=\", \"ρσ_Exception\"), output.end_statement()];\n output.indent();\n no_default = true;\n var ρσ_Iter80 = ρσ_Iterable(enumerate(self.body));\n for (var ρσ_Index80 = 0; ρσ_Index80 < ρσ_Iter80.length; ρσ_Index80++) {\n ρσ_unpack = ρσ_Iter80[ρσ_Index80];\n i = ρσ_unpack[0];\n exception = ρσ_unpack[1];\n if (i) {\n output.print(\"else \");\n }\n if (exception.errors.length) {\n output.print(\"if\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n var ρσ_unpack, i, err;\n var ρσ_Iter81 = ρσ_Iterable(enumerate(exception.errors));\n for (var ρσ_Index81 = 0; ρσ_Index81 < ρσ_Iter81.length; ρσ_Index81++) {\n ρσ_unpack = ρσ_Iter81[ρσ_Index81];\n i = ρσ_unpack[0];\n err = ρσ_unpack[1];\n if (i) {\n output.newline();\n output.indent();\n output.print(\"||\");\n output.space();\n }\n output.print(\"ρσ_Exception\");\n output.space();\n output.print(\"instanceof\");\n output.space();\n if (err.name === \"Exception\") {\n output.print(\"Error\");\n } else {\n err.print(output);\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.exceptions\"}\n });\n return ρσ_anonfunc;\n })());\n output.space();\n } else {\n no_default = false;\n }\n print_bracketed(exception, output, true);\n output.space();\n }\n if (no_default) {\n output.print(\"else\");\n output.space();\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n output.indent();\n output.print(\"throw\");\n output.space();\n output.print(\"ρσ_Exception\");\n output.semicolon();\n output.newline();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.exceptions\"}\n });\n return ρσ_anonfunc;\n })());\n }\n output.newline();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.exceptions\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!print_catch.__argnames__) Object.defineProperties(print_catch, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.exceptions\"}\n });\n\n function print_finally(self, output, belse, else_var_name) {\n output.print(\"finally\");\n output.space();\n if (else_var_name) {\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n [output.indent(), output.print(\"try\")];\n output.space();\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n print_else(belse, else_var_name, output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.exceptions\"}\n });\n return ρσ_anonfunc;\n })());\n print_finally(self, output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.exceptions\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n print_bracketed(self, output);\n }\n };\n if (!print_finally.__argnames__) Object.defineProperties(print_finally, {\n __argnames__ : {value: [\"self\", \"output\", \"belse\", \"else_var_name\"]},\n __module__ : {value: \"output.exceptions\"}\n });\n\n function print_else(self, else_var_name, output) {\n [output.indent(), output.spaced(\"if\", \"(\" + else_var_name + \")\")];\n output.space();\n print_bracketed(self, output);\n };\n if (!print_else.__argnames__) Object.defineProperties(print_else, {\n __argnames__ : {value: [\"self\", \"else_var_name\", \"output\"]},\n __module__ : {value: \"output.exceptions\"}\n });\n\n ρσ_modules[\"output.exceptions\"].print_try = print_try;\n ρσ_modules[\"output.exceptions\"].print_catch = print_catch;\n ρσ_modules[\"output.exceptions\"].print_finally = print_finally;\n ρσ_modules[\"output.exceptions\"].print_else = print_else;\n })();\n\n (function(){\n var __name__ = \"output.utils\";\n var AST_BlockStatement = ρσ_modules.ast.AST_BlockStatement;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n function best_of(a) {\n var best, len_, i;\n best = a[0];\n len_ = best.length;\n for (var ρσ_Index82 = 1; ρσ_Index82 < a.length; ρσ_Index82++) {\n i = ρσ_Index82;\n if (a[(typeof i === \"number\" && i < 0) ? a.length + i : i].length < len_) {\n best = a[(typeof i === \"number\" && i < 0) ? a.length + i : i];\n len_ = best.length;\n }\n }\n return best;\n };\n if (!best_of.__argnames__) Object.defineProperties(best_of, {\n __argnames__ : {value: [\"a\"]},\n __module__ : {value: \"output.utils\"}\n });\n\n function make_num(num) {\n var str_, a, m;\n str_ = num.toString(10);\n a = ρσ_list_decorate([ str_.replace(/^0\\./, \".\").replace(\"e+\", \"e\") ]);\n m = null;\n if (Math.floor(num) === num) {\n if (num >= 0) {\n a.push(\"0x\" + num.toString(16).toLowerCase(), \"0\" + num.toString(8));\n } else {\n a.push(\"-0x\" + (-(num)).toString(16).toLowerCase(), \"-0\" + (-(num)).toString(8));\n }\n if (m = /^(.*?)(0+)$/.exec(num)) {\n a.push(m[1] + \"e\" + m[2].length);\n }\n } else if (m = /^0?\\.(0+)(.*)$/.exec(num)) {\n a.push(m[2] + \"e-\" + (m[1].length + m[2].length), str_.substr(str_.indexOf(\".\")));\n }\n return best_of(a);\n };\n if (!make_num.__argnames__) Object.defineProperties(make_num, {\n __argnames__ : {value: [\"num\"]},\n __module__ : {value: \"output.utils\"}\n });\n\n function make_block(stmt, output) {\n if (is_node_type(stmt, AST_BlockStatement)) {\n stmt.print(output);\n return;\n }\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n output.indent();\n stmt.print(output);\n output.newline();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.utils\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!make_block.__argnames__) Object.defineProperties(make_block, {\n __argnames__ : {value: [\"stmt\", \"output\"]},\n __module__ : {value: \"output.utils\"}\n });\n\n function create_doctring(docstrings) {\n var ans, ds, lines, min_leading_whitespace, r, leading_whitespace, line, lw, ρσ_unpack, l;\n ans = [];\n var ρσ_Iter83 = ρσ_Iterable(docstrings);\n for (var ρσ_Index83 = 0; ρσ_Index83 < ρσ_Iter83.length; ρσ_Index83++) {\n ds = ρσ_Iter83[ρσ_Index83];\n ds = str.rstrip(ds.value);\n lines = [];\n min_leading_whitespace = \"\";\n var ρσ_Iter84 = ρσ_Iterable(ds.split(/$/gm));\n for (var ρσ_Index84 = 0; ρσ_Index84 < ρσ_Iter84.length; ρσ_Index84++) {\n line = ρσ_Iter84[ρσ_Index84];\n r = /^\\s+/.exec(line);\n leading_whitespace = \"\";\n if (r) {\n leading_whitespace = (r) ? r[0].replace(/[\\n\\r]/g, \"\") : \"\";\n line = line.slice(r[0].length);\n }\n if (!str.strip(line)) {\n lines.push([\"\", \"\"]);\n } else {\n leading_whitespace = leading_whitespace.replace(/\\t/g, \" \");\n if (leading_whitespace && (!min_leading_whitespace || leading_whitespace.length < min_leading_whitespace.length)) {\n min_leading_whitespace = leading_whitespace;\n }\n lines.push([leading_whitespace, line]);\n }\n }\n var ρσ_Iter85 = ρσ_Iterable(lines);\n for (var ρσ_Index85 = 0; ρσ_Index85 < ρσ_Iter85.length; ρσ_Index85++) {\n ρσ_unpack = ρσ_Iter85[ρσ_Index85];\n lw = ρσ_unpack[0];\n l = ρσ_unpack[1];\n if (min_leading_whitespace) {\n lw = lw.slice(min_leading_whitespace.length);\n }\n ans.push(lw + l);\n }\n ans.push(\"\");\n }\n return str.rstrip(ans.join(\"\\n\"));\n };\n if (!create_doctring.__argnames__) Object.defineProperties(create_doctring, {\n __argnames__ : {value: [\"docstrings\"]},\n __module__ : {value: \"output.utils\"}\n });\n\n ρσ_modules[\"output.utils\"].best_of = best_of;\n ρσ_modules[\"output.utils\"].make_num = make_num;\n ρσ_modules[\"output.utils\"].make_block = make_block;\n ρσ_modules[\"output.utils\"].create_doctring = create_doctring;\n })();\n\n (function(){\n var __name__ = \"output.loops\";\n var AST_BaseCall = ρσ_modules.ast.AST_BaseCall;\n var AST_SymbolRef = ρσ_modules.ast.AST_SymbolRef;\n var AST_Array = ρσ_modules.ast.AST_Array;\n var AST_Unary = ρσ_modules.ast.AST_Unary;\n var AST_Number = ρσ_modules.ast.AST_Number;\n var has_calls = ρσ_modules.ast.has_calls;\n var AST_Seq = ρσ_modules.ast.AST_Seq;\n var AST_ListComprehension = ρσ_modules.ast.AST_ListComprehension;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n var OutputStream = ρσ_modules[\"output.stream\"].OutputStream;\n\n function unpack_tuple(elems, output, in_statement) {\n var ρσ_unpack, i, elem;\n var ρσ_Iter86 = ρσ_Iterable(enumerate(elems));\n for (var ρσ_Index86 = 0; ρσ_Index86 < ρσ_Iter86.length; ρσ_Index86++) {\n ρσ_unpack = ρσ_Iter86[ρσ_Index86];\n i = ρσ_unpack[0];\n elem = ρσ_unpack[1];\n output.indent();\n output.assign(elem);\n output.print(\"ρσ_unpack\");\n output.with_square((function() {\n var ρσ_anonfunc = function () {\n output.print(i);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n if (!in_statement || i < elems.length - 1) {\n output.semicolon();\n output.newline();\n }\n }\n };\n if (!unpack_tuple.__argnames__) Object.defineProperties(unpack_tuple, {\n __argnames__ : {value: [\"elems\", \"output\", \"in_statement\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function print_do_loop(self, output) {\n output.print(\"do\");\n output.space();\n self._do_print_body(output);\n output.space();\n output.print(\"while\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.condition.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n output.semicolon();\n };\n if (!print_do_loop.__argnames__) Object.defineProperties(print_do_loop, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function print_while_loop(self, output) {\n output.print(\"while\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.condition.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n output.space();\n self._do_print_body(output);\n };\n if (!print_while_loop.__argnames__) Object.defineProperties(print_while_loop, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function is_simple_for_in(self) {\n if (is_node_type(self.object, AST_BaseCall) && is_node_type(self.object.expression, AST_SymbolRef) && self.object.expression.name === \"dir\" && self.object.args.length === 1) {\n return true;\n }\n return false;\n };\n if (!is_simple_for_in.__argnames__) Object.defineProperties(is_simple_for_in, {\n __argnames__ : {value: [\"self\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function is_simple_for(self) {\n var a, l;\n if (is_node_type(self.object, AST_BaseCall) && is_node_type(self.object.expression, AST_SymbolRef) && self.object.expression.name === \"range\" && !(is_node_type(self.init, AST_Array))) {\n a = self.object.args;\n l = a.length;\n if (l < 3 || is_node_type(a[2], AST_Number) || is_node_type(a[2], AST_Unary) && a[2].operator === \"-\" && is_node_type(a[2].expression, AST_Number)) {\n if (l === 1 && !has_calls(a[0]) || l > 1 && !has_calls(a[1])) {\n return true;\n }\n }\n }\n return false;\n };\n if (!is_simple_for.__argnames__) Object.defineProperties(is_simple_for, {\n __argnames__ : {value: [\"self\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function print_for_loop_body(output) {\n var self;\n self = this;\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var itervar, flat, stmt;\n if (!((self.simple_for_index || is_simple_for_in(self)))) {\n output.indent();\n if (output.options.js_version === 5) {\n itervar = \"ρσ_Iter\" + output.index_counter + \"[ρσ_Index\" + output.index_counter + \"]\";\n } else {\n itervar = \"ρσ_Index\" + output.index_counter;\n }\n if (is_node_type(self.init, AST_Array)) {\n flat = self.init.flatten();\n output.assign(\"ρσ_unpack\");\n if (flat.length > self.init.elements.length) {\n output.print(\"ρσ_flatten(\" + itervar + \")\");\n } else {\n output.print(itervar);\n }\n output.end_statement();\n unpack_tuple(flat, output);\n } else {\n output.assign(self.init);\n output.print(itervar);\n output.end_statement();\n }\n output.index_counter += 1;\n }\n if (self.simple_for_index) {\n output.indent();\n output.assign(self.init);\n output.print(self.simple_for_index);\n output.end_statement();\n }\n var ρσ_Iter87 = ρσ_Iterable(self.body.body);\n for (var ρσ_Index87 = 0; ρσ_Index87 < ρσ_Iter87.length; ρσ_Index87++) {\n stmt = ρσ_Iter87[ρσ_Index87];\n output.indent();\n stmt.print(output);\n output.newline();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!print_for_loop_body.__argnames__) Object.defineProperties(print_for_loop_body, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function init_es6_itervar(output, itervar) {\n output.indent();\n output.spaced(itervar, \"=\", \"((typeof\", itervar + \"[Symbol.iterator]\", \"===\", \"\\\"function\\\")\", \"?\", \"(\" + itervar, \"instanceof\", \"Map\", \"?\", itervar + \".keys()\", \":\", itervar + \")\", \":\", \"Object.keys(\" + itervar + \"))\");\n output.end_statement();\n };\n if (!init_es6_itervar.__argnames__) Object.defineProperties(init_es6_itervar, {\n __argnames__ : {value: [\"output\", \"itervar\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function print_for_in(self, output) {\n var increment, args, tmp_, start, end, idx, itervar;\n function write_object() {\n if (self.object.constructor === AST_Seq) {\n new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = self.object.to_array();\n return ρσ_d;\n }).call(this)).print(output);\n } else {\n self.object.print(output);\n }\n };\n if (!write_object.__module__) Object.defineProperties(write_object, {\n __module__ : {value: \"output.loops\"}\n });\n\n if (is_simple_for(self)) {\n increment = null;\n args = self.object.args;\n tmp_ = args.length;\n if (tmp_ === 1) {\n start = 0;\n end = args[0];\n } else if (tmp_ === 2) {\n start = args[0];\n end = args[1];\n } else if (tmp_ === 3) {\n start = args[0];\n end = args[1];\n increment = args[2];\n }\n self.simple_for_index = idx = \"ρσ_Index\" + output.index_counter;\n output.index_counter += 1;\n output.print(\"for\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n [output.spaced(\"var\", idx, \"=\"), output.space()];\n (start.print) ? start.print(output) : output.print(start);\n output.semicolon();\n output.space();\n output.print(idx);\n output.space();\n (is_node_type(increment, AST_Unary)) ? output.print(\">\") : output.print(\"<\");\n output.space();\n end.print(output);\n output.semicolon();\n output.space();\n output.print(idx);\n if (increment && (!(is_node_type(increment, AST_Unary)) || increment.expression.value !== \"1\")) {\n if (is_node_type(increment, AST_Unary)) {\n output.print(\"-=\");\n increment.expression.print(output);\n } else {\n output.print(\"+=\");\n increment.print(output);\n }\n } else {\n if (is_node_type(increment, AST_Unary)) {\n output.print(\"--\");\n } else {\n output.print(\"++\");\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n } else if (is_simple_for_in(self)) {\n output.print(\"for\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.init.print(output);\n output.space();\n output.print(\"in\");\n output.space();\n self.object.args[0].print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n if (output.options.js_version === 5) {\n output.assign(\"var ρσ_Iter\" + output.index_counter);\n output.print(\"ρσ_Iterable\");\n output.with_parens(write_object);\n output.semicolon();\n output.newline();\n output.indent();\n output.print(\"for\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"var\");\n output.space();\n output.assign(\"ρσ_Index\" + output.index_counter);\n output.print(\"0\");\n output.semicolon();\n output.space();\n output.print(\"ρσ_Index\" + output.index_counter);\n output.space();\n output.print(\"<\");\n output.space();\n output.print(\"ρσ_Iter\" + output.index_counter + \".length\");\n output.semicolon();\n output.space();\n output.print(\"ρσ_Index\" + output.index_counter + \"++\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n itervar = \"ρσ_Iter\" + output.index_counter;\n output.assign(\"var \" + itervar);\n write_object();\n output.end_statement();\n init_es6_itervar(output, itervar);\n output.indent();\n output.spaced(\"for\", \"(var\", \"ρσ_Index\" + output.index_counter, \"of\", itervar + \")\");\n }\n }\n output.space();\n self._do_print_body(output);\n };\n if (!print_for_in.__argnames__) Object.defineProperties(print_for_in, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n function print_list_comprehension(self, output) {\n var tname, result_obj, is_generator, es5, add_to_result, push_func;\n tname = self.constructor.name.slice(4);\n result_obj = (ρσ_expr_temp = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"ListComprehension\"] = \"[]\";\n ρσ_d[\"DictComprehension\"] = (self.is_jshash) ? \"Object.create(null)\" : \"{}\";\n ρσ_d[\"SetComprehension\"] = \"ρσ_set()\";\n return ρσ_d;\n }).call(this))[(typeof tname === \"number\" && tname < 0) ? ρσ_expr_temp.length + tname : tname];\n is_generator = tname === \"GeneratorComprehension\";\n es5 = output.options.js_version === 5;\n if (tname === \"DictComprehension\") {\n if (self.is_pydict) {\n result_obj = \"ρσ_dict()\";\n add_to_result = (function() {\n var ρσ_anonfunc = function (output) {\n output.indent();\n output.print(\"ρσ_Result.set\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.statement.print(output);\n [output.space(), output.print(\",\"), output.space()];\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n if (self.value_statement.constructor === AST_Seq) {\n output.with_square((function() {\n var ρσ_anonfunc = function () {\n self.value_statement.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n self.value_statement.print(output);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })();\n } else {\n add_to_result = (function() {\n var ρσ_anonfunc = function (output) {\n output.indent();\n output.print(\"ρσ_Result\");\n output.with_square((function() {\n var ρσ_anonfunc = function () {\n self.statement.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n [output.space(), output.print(\"=\"), output.space()];\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n if (self.value_statement.constructor === AST_Seq) {\n output.with_square((function() {\n var ρσ_anonfunc = function () {\n self.value_statement.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n self.value_statement.print(output);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })();\n }\n } else {\n push_func = \"ρσ_Result.\" + ((self.constructor === AST_ListComprehension) ? \"push\" : \"add\");\n if (is_generator) {\n push_func = \"yield \";\n }\n add_to_result = (function() {\n var ρσ_anonfunc = function (output) {\n output.indent();\n output.print(push_func);\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n if (self.statement.constructor === AST_Seq) {\n output.with_square((function() {\n var ρσ_anonfunc = function () {\n self.statement.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n self.statement.print(output);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })();\n }\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"function\");\n output.print(\"()\");\n output.space();\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var body_out, previous_indentation, i, transpiled, ci;\n body_out = output;\n if (is_generator) {\n if (es5) {\n body_out = new OutputStream((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"beautify\"] = true;\n return ρσ_d;\n }).call(this));\n }\n body_out.indent();\n [body_out.print(\"function* js_generator()\"), body_out.space(), body_out.print(\"{\")];\n body_out.newline();\n previous_indentation = output.indentation();\n output.set_indentation(output.next_indent());\n }\n body_out.indent();\n body_out.assign(\"var ρσ_Iter\");\n if (es5) {\n body_out.print(\"ρσ_Iterable\");\n body_out.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.object.print(body_out);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n self.object.print(body_out);\n }\n if (result_obj) {\n body_out.comma();\n body_out.assign(\"ρσ_Result\");\n body_out.print(result_obj);\n }\n if (is_node_type(self.init, AST_Array)) {\n var ρσ_Iter88 = ρσ_Iterable(self.init.elements);\n for (var ρσ_Index88 = 0; ρσ_Index88 < ρσ_Iter88.length; ρσ_Index88++) {\n i = ρσ_Iter88[ρσ_Index88];\n body_out.comma();\n i.print(body_out);\n }\n } else {\n body_out.comma();\n self.init.print(body_out);\n }\n body_out.end_statement();\n if (!es5) {\n init_es6_itervar(body_out, \"ρσ_Iter\");\n }\n body_out.indent();\n body_out.print(\"for\");\n body_out.space();\n body_out.with_parens((function() {\n var ρσ_anonfunc = function () {\n if (es5) {\n body_out.print(\"var\");\n body_out.space();\n body_out.assign(\"ρσ_Index\");\n body_out.print(\"0\");\n body_out.semicolon();\n body_out.space();\n body_out.print(\"ρσ_Index\");\n body_out.space();\n body_out.print(\"<\");\n body_out.space();\n body_out.print(\"ρσ_Iter.length\");\n body_out.semicolon();\n body_out.space();\n body_out.print(\"ρσ_Index++\");\n } else {\n body_out.spaced(\"var\", \"ρσ_Index\", \"of\", \"ρσ_Iter\");\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n body_out.space();\n body_out.with_block((function() {\n var ρσ_anonfunc = function () {\n var itervar, flat;\n body_out.indent();\n itervar = (es5) ? \"ρσ_Iter[ρσ_Index]\" : \"ρσ_Index\";\n if (is_node_type(self.init, AST_Array)) {\n flat = self.init.flatten();\n body_out.assign(\"ρσ_unpack\");\n if (flat.length > self.init.elements.length) {\n body_out.print(\"ρσ_flatten(\" + itervar + \")\");\n } else {\n body_out.print(itervar);\n }\n body_out.end_statement();\n unpack_tuple(flat, body_out);\n } else {\n body_out.assign(self.init);\n body_out.print(itervar);\n body_out.end_statement();\n }\n if (self.condition) {\n body_out.indent();\n body_out.print(\"if\");\n body_out.space();\n body_out.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.condition.print(body_out);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n body_out.space();\n body_out.with_block((function() {\n var ρσ_anonfunc = function () {\n add_to_result(body_out);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n body_out.newline();\n } else {\n add_to_result(body_out);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n body_out.newline();\n if (self.constructor === AST_ListComprehension) {\n body_out.indent();\n body_out.spaced(\"ρσ_Result\", \"=\", \"ρσ_list_constructor(ρσ_Result)\");\n body_out.end_statement();\n }\n if (!is_generator) {\n body_out.indent();\n body_out.print(\"return ρσ_Result\");\n body_out.end_statement();\n }\n if (is_generator) {\n output.set_indentation(previous_indentation);\n [body_out.newline(), body_out.indent(), body_out.print(\"}\")];\n if (es5) {\n transpiled = regenerate(body_out.get(), output.options.beautify).replace(/regeneratorRuntime.(wrap|mark)/g, \"ρσ_regenerator.regeneratorRuntime.$1\");\n if (output.options.beautify) {\n ci = output.make_indent(0);\n transpiled = (function() {\n var ρσ_Iter = ρσ_Iterable(transpiled.split(\"\\n\")), ρσ_Result = [], x;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n x = ρσ_Iter[ρσ_Index];\n ρσ_Result.push(ci + x);\n }\n ρσ_Result = ρσ_list_constructor(ρσ_Result);\n return ρσ_Result;\n })().join(\"\\n\");\n }\n output.print(transpiled);\n }\n [output.newline(), output.indent()];\n output.spaced(\"var\", \"result\", \"=\", \"js_generator.call(this)\");\n output.end_statement();\n output.indent();\n output.spaced(\"result.send\", \"=\", \"result.next\");\n output.end_statement();\n output.indent();\n output.spaced(\"return\", \"result\");\n output.end_statement();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.loops\"}\n });\n return ρσ_anonfunc;\n })());\n output.print(\"()\");\n };\n if (!print_list_comprehension.__argnames__) Object.defineProperties(print_list_comprehension, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.loops\"}\n });\n\n ρσ_modules[\"output.loops\"].unpack_tuple = unpack_tuple;\n ρσ_modules[\"output.loops\"].print_do_loop = print_do_loop;\n ρσ_modules[\"output.loops\"].print_while_loop = print_while_loop;\n ρσ_modules[\"output.loops\"].is_simple_for_in = is_simple_for_in;\n ρσ_modules[\"output.loops\"].is_simple_for = is_simple_for;\n ρσ_modules[\"output.loops\"].print_for_loop_body = print_for_loop_body;\n ρσ_modules[\"output.loops\"].init_es6_itervar = init_es6_itervar;\n ρσ_modules[\"output.loops\"].print_for_in = print_for_in;\n ρσ_modules[\"output.loops\"].print_list_comprehension = print_list_comprehension;\n })();\n\n (function(){\n var __name__ = \"output.operators\";\n var comparators, function_ops, after_map;\n var AST_Array = ρσ_modules.ast.AST_Array;\n var AST_Assign = ρσ_modules.ast.AST_Assign;\n var AST_BaseCall = ρσ_modules.ast.AST_BaseCall;\n var AST_Binary = ρσ_modules.ast.AST_Binary;\n var AST_Conditional = ρσ_modules.ast.AST_Conditional;\n var AST_ItemAccess = ρσ_modules.ast.AST_ItemAccess;\n var AST_Number = ρσ_modules.ast.AST_Number;\n var AST_Object = ρσ_modules.ast.AST_Object;\n var AST_Return = ρσ_modules.ast.AST_Return;\n var AST_Seq = ρσ_modules.ast.AST_Seq;\n var AST_Set = ρσ_modules.ast.AST_Set;\n var AST_SimpleStatement = ρσ_modules.ast.AST_SimpleStatement;\n var AST_Statement = ρσ_modules.ast.AST_Statement;\n var AST_String = ρσ_modules.ast.AST_String;\n var AST_Sub = ρσ_modules.ast.AST_Sub;\n var AST_Symbol = ρσ_modules.ast.AST_Symbol;\n var AST_SymbolRef = ρσ_modules.ast.AST_SymbolRef;\n var AST_Unary = ρσ_modules.ast.AST_Unary;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n var unpack_tuple = ρσ_modules[\"output.loops\"].unpack_tuple;\n\n function print_getattr(self, output, skip_expression) {\n var expr;\n if (!skip_expression) {\n expr = self.expression;\n expr.print(output);\n }\n if (is_node_type(expr, AST_Number) && expr.value >= 0) {\n if (!/[xa-f.]/i.test(output.last())) {\n output.print(\".\");\n }\n }\n output.print(\".\");\n output.print_name(self.property);\n };\n if (!print_getattr.__argnames__) Object.defineProperties(print_getattr, {\n __argnames__ : {value: [\"self\", \"output\", \"skip_expression\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_getitem(self, output) {\n var expr, prop, is_negative_number, is_repeatable;\n expr = self.expression;\n prop = self.property;\n if (is_node_type(prop, AST_Number) || is_node_type(prop, AST_String) || is_node_type(prop, AST_SymbolRef) && prop.name && prop.name.startsWith(\"ρσ_\")) {\n expr.print(output);\n [output.print(\"[\"), prop.print(output), output.print(\"]\")];\n return;\n }\n is_negative_number = is_node_type(prop, AST_Unary) && prop.operator === \"-\" && is_node_type(prop.expression, AST_Number);\n is_repeatable = is_node_type(expr, AST_SymbolRef);\n if (is_repeatable) {\n expr.print(output);\n } else {\n [output.spaced(\"(ρσ_expr_temp\", \"=\", expr), output.print(\")\")];\n expr = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"print\"] = (function() {\n var ρσ_anonfunc = function () {\n output.print(\"ρσ_expr_temp\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n }\n if (is_negative_number) {\n [output.print(\"[\"), expr.print(output), output.print(\".length\"), prop.print(output), \n output.print(\"]\")];\n return;\n }\n is_repeatable = is_node_type(prop, AST_SymbolRef);\n if (is_repeatable) {\n output.spaced(\"[(typeof\", prop, \"===\", \"\\\"number\\\"\", \"&&\", prop);\n [output.spaced(\"\", \"<\", \"0)\", \"?\", expr), output.spaced(\".length\", \"+\", prop, \":\", prop)];\n output.print(\"]\");\n } else {\n [output.print(\"[ρσ_bound_index(\"), prop.print(output), output.comma(), expr.print(output), \n output.print(\")]\")];\n }\n };\n if (!print_getitem.__argnames__) Object.defineProperties(print_getitem, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_rich_getitem(self, output) {\n var func, asg, as_op;\n func = \"ρσ_\" + ((self.assignment) ? \"setitem\" : \"getitem\");\n output.print(func + \"(\");\n [self.expression.print(output), output.comma(), self.property.print(output)];\n if (self.assignment) {\n output.comma();\n asg = self.assignment;\n as_op = self.assign_operator;\n if (as_op.length > 0) {\n self.assignment = null;\n print_rich_getitem(self, output);\n self.assignment = asg;\n output.space();\n output.print(as_op);\n output.space();\n }\n self.assignment.print(output);\n }\n output.print(\")\");\n };\n if (!print_rich_getitem.__argnames__) Object.defineProperties(print_rich_getitem, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_splice_assignment(self, output) {\n output.print(\"ρσ_splice(\");\n [self.expression.print(output), output.comma(), self.assignment.print(output), output.comma()];\n (self.property) ? self.property.print(output) : output.print(\"0\");\n if (self.property2) {\n output.comma();\n self.property2.print(output);\n }\n output.print(\")\");\n };\n if (!print_splice_assignment.__argnames__) Object.defineProperties(print_splice_assignment, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_delete(self, output) {\n if (is_node_type(self, AST_Symbol)) {\n [output.assign(self), output.print(\"undefined\")];\n } else if (is_node_type(self, AST_Sub) || is_node_type(self, AST_ItemAccess)) {\n [output.print(\"ρσ_delitem(\"), self.expression.print(output), output.comma(), self.property.print(output), \n output.print(\")\")];\n } else {\n output.spaced(\"delete\", self);\n }\n };\n if (!print_delete.__argnames__) Object.defineProperties(print_delete, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_unary_prefix(self, output) {\n var op;\n op = self.operator;\n if (op === \"delete\") {\n return print_delete(self.expression, output);\n }\n output.print(op);\n if (/^[a-z]/i.test(op)) {\n output.space();\n }\n if (self.parenthesized) {\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.expression.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n self.expression.print(output);\n }\n };\n if (!print_unary_prefix.__argnames__) Object.defineProperties(print_unary_prefix, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function write_instanceof(left, right, output) {\n function do_many(vals) {\n [output.print(\"ρσ_instanceof.apply(null,\"), output.space()];\n [output.print(\"[\"), left.print(output), output.comma()];\n for (var i = 0; i < vals.length; i++) {\n vals[(typeof i === \"number\" && i < 0) ? vals.length + i : i].print(output);\n if (i !== vals.length - 1) {\n output.comma();\n }\n }\n output.print(\"])\");\n };\n if (!do_many.__argnames__) Object.defineProperties(do_many, {\n __argnames__ : {value: [\"vals\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n if (is_node_type(right, AST_Seq)) {\n do_many(right.to_array());\n } else if (is_node_type(right, AST_Array)) {\n do_many(right.elements);\n } else {\n output.print(\"ρσ_instanceof(\");\n [left.print(output), output.comma(), right.print(output), output.print(\")\")];\n }\n };\n if (!write_instanceof.__argnames__) Object.defineProperties(write_instanceof, {\n __argnames__ : {value: [\"left\", \"right\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function write_smart_equality(self, output) {\n function is_ok(x) {\n return !((is_node_type(x, AST_Array) || is_node_type(x, AST_Set) || is_node_type(x, AST_Object) || is_node_type(x, AST_Statement) || is_node_type(x, AST_Binary) || is_node_type(x, AST_Conditional) || is_node_type(x, AST_BaseCall)));\n };\n if (!is_ok.__argnames__) Object.defineProperties(is_ok, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n if (is_ok(self.left) && is_ok(self.right)) {\n if (self.operator === \"==\") {\n output.print(\"(\");\n output.spaced(self.left, \"===\", self.right, \"||\", \"typeof\", self.left, \"===\", \"\\\"object\\\"\", \"&&\", \"ρσ_equals(\");\n [self.left.print(output), output.print(\",\"), output.space(), self.right.print(output), \n output.print(\"))\")];\n } else {\n output.print(\"(\");\n output.spaced(self.left, \"!==\", self.right, \"&&\", \"(typeof\", self.left, \"!==\", \"\\\"object\\\"\", \"||\", \"ρσ_not_equals(\");\n [self.left.print(output), output.print(\",\"), output.space(), self.right.print(output), \n output.print(\")))\")];\n }\n } else {\n output.print(\"ρσ_\" + ((self.operator === \"==\") ? \"equals(\" : \"not_equals(\"));\n [self.left.print(output), output.print(\",\"), output.space(), self.right.print(output), \n output.print(\")\")];\n }\n };\n if (!write_smart_equality.__argnames__) Object.defineProperties(write_smart_equality, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n comparators = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"<\"] = true;\n ρσ_d[\">\"] = true;\n ρσ_d[\"<=\"] = true;\n ρσ_d[\">=\"] = true;\n return ρσ_d;\n }).call(this);\n function_ops = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"in\"] = \"ρσ_in\";\n ρσ_d[\"nin\"] = \"!ρσ_in\";\n return ρσ_d;\n }).call(this);\n function print_binary_op(self, output) {\n var leftvar, left, nan_check;\n if (function_ops[ρσ_bound_index(self.operator, function_ops)]) {\n output.print(function_ops[ρσ_bound_index(self.operator, function_ops)]);\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.left.print(output);\n output.comma();\n self.right.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })());\n } else if (comparators[ρσ_bound_index(self.operator, comparators)] && is_node_type(self.left, AST_Binary) && comparators[ρσ_bound_index(self.left.operator, comparators)]) {\n if (is_node_type(self.left.right, AST_Symbol)) {\n self.left.print(output);\n leftvar = self.left.right.name;\n } else {\n self.left.left.print(output);\n output.space();\n output.print(self.left.operator);\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.assign(\"ρσ_cond_temp\");\n self.left.right.print(output);\n leftvar = \"ρσ_cond_temp\";\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })());\n }\n output.space();\n output.print(\"&&\");\n output.space();\n output.print(leftvar);\n output.space();\n output.print(self.operator);\n output.space();\n self.right.print(output);\n } else if (self.operator === \"//\") {\n output.print(\"Math.floor\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.left.print(output);\n output.space();\n output.print(\"/\");\n output.space();\n self.right.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })());\n } else if (self.operator === \"**\") {\n left = self.left;\n if (is_node_type(self.left, AST_Unary) && !self.left.parenthesized) {\n left = self.left.expression;\n output.print(self.left.operator);\n }\n if (output.options.js_version > 6) {\n [output.print(\"((\"), left.print(output), output.spaced(\")\", \"**\", \"(\"), self.right.print(output), \n output.print(\"))\")];\n } else {\n [output.print(\"Math.pow(\"), left.print(output), output.comma(), self.right.print(output), \n output.print(\")\")];\n }\n } else if (self.operator === \"==\" || self.operator === \"!=\") {\n write_smart_equality(self, output);\n } else if (self.operator === \"instanceof\") {\n write_instanceof(self.left, self.right, output);\n } else if (self.operator === \"*\" && is_node_type(self.left, AST_String)) {\n [self.left.print(output), output.print(\".repeat(\"), self.right.print(output), output.print(\")\")];\n } else if (self.operator === \"===\" || self.operator === \"!==\") {\n nan_check = null;\n if (is_node_type(self.right, AST_Symbol) && self.right.name === \"NaN\") {\n nan_check = self.left;\n }\n if (is_node_type(self.left, AST_Symbol) && self.left.name === \"NaN\") {\n nan_check = self.right;\n }\n if (nan_check !== null) {\n output.spaced(nan_check, (self.operator === \"===\") ? \"!==\" : \"===\", nan_check);\n } else {\n output.spaced(self.left, self.operator, self.right);\n }\n } else {\n output.spaced(self.left, self.operator, self.right);\n }\n };\n if (!print_binary_op.__argnames__) Object.defineProperties(print_binary_op, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n after_map = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\".\"] = \"d\";\n ρσ_d[\"(\"] = \"c\";\n ρσ_d[\"[\"] = \"d\";\n ρσ_d[\"g\"] = \"g\";\n ρσ_d[\"null\"] = \"n\";\n return ρσ_d;\n }).call(this);\n function print_existential(self, output) {\n var key, after;\n key = (self.after === null || typeof self.after === \"string\") ? after_map[ρσ_bound_index(self.after, after_map)] : \"e\";\n if (is_node_type(self.expression, AST_SymbolRef)) {\n if (key === \"n\") {\n output.spaced(\"(typeof\", self.expression, \"!==\", \"\\\"undefined\\\"\", \"&&\", self.expression, \"!==\", \"null)\");\n return;\n }\n if (key === \"c\") {\n output.spaced(\"(typeof\", self.expression, \"===\", \"\\\"function\\\"\", \"?\", self.expression, \":\", \"(function(){return undefined;}))\");\n return;\n }\n after = self.after;\n if (key === \"d\") {\n after = \"Object.create(null)\";\n } else if (key === \"g\") {\n after = \"{__getitem__:function(){return undefined;}}\";\n }\n output.spaced(\"(typeof\", self.expression, \"!==\", \"\\\"undefined\\\"\", \"&&\", self.expression, \"!==\", \"null\", \"?\", self.expression, \":\", after);\n output.print(\")\");\n return;\n }\n output.print(\"ρσ_exists.\" + key + \"(\");\n self.expression.print(output);\n if (key === \"e\") {\n [output.comma(), self.after.print(output)];\n }\n output.print(\")\");\n };\n if (!print_existential.__argnames__) Object.defineProperties(print_existential, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_assignment(self, output) {\n var flattened, left, flat;\n flattened = false;\n left = self.left;\n if (is_node_type(left, AST_Seq)) {\n left = new AST_Array((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"elements\"] = [left.car, left.cdr];\n return ρσ_d;\n }).call(this));\n }\n if (is_node_type(left, AST_Array)) {\n flat = left.flatten();\n flattened = flat.length > left.elements.length;\n output.print(\"ρσ_unpack\");\n } else {\n left.print(output);\n }\n output.space();\n output.print(self.operator);\n output.space();\n if (flattened) {\n output.print(\"ρσ_flatten\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.right.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n self.right.print(output);\n }\n if (is_node_type(left, AST_Array)) {\n output.end_statement();\n if (!is_node_type(self.right, AST_Seq) && !is_node_type(self.right, AST_Array)) {\n output.assign(\"ρσ_unpack\");\n [output.print(\"ρσ_unpack_asarray(\" + flat.length), output.comma(), output.print(\"ρσ_unpack)\")];\n output.end_statement();\n }\n unpack_tuple(flat, output, true);\n }\n };\n if (!print_assignment.__argnames__) Object.defineProperties(print_assignment, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_assign(self, output) {\n var ρσ_unpack, left_hand_sides, rhs, is_compound_assign, lhs, temp_rhs;\n if (self.operator === \"//=\") {\n output.assign(self.left);\n output.print(\"Math.floor\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.left.print(output);\n output.space();\n output.print(\"/\");\n output.space();\n self.right.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })());\n return;\n }\n if (self.operator === \"=\" && self.is_chained()) {\n ρσ_unpack = self.traverse_chain();\nρσ_unpack = ρσ_unpack_asarray(2, ρσ_unpack);\n left_hand_sides = ρσ_unpack[0];\n rhs = ρσ_unpack[1];\n is_compound_assign = false;\n var ρσ_Iter89 = ρσ_Iterable(left_hand_sides);\n for (var ρσ_Index89 = 0; ρσ_Index89 < ρσ_Iter89.length; ρσ_Index89++) {\n lhs = ρσ_Iter89[ρσ_Index89];\n if (is_node_type(lhs, AST_Seq) || is_node_type(lhs, AST_Array)) {\n is_compound_assign = true;\n break;\n }\n }\n if (is_compound_assign) {\n temp_rhs = new AST_SymbolRef((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"ρσ_chain_assign_temp\";\n return ρσ_d;\n }).call(this));\n print_assignment(new AST_Assign((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"left\"] = temp_rhs;\n ρσ_d[\"operator\"] = \"=\";\n ρσ_d[\"right\"] = rhs;\n return ρσ_d;\n }).call(this)), output);\n var ρσ_Iter90 = ρσ_Iterable(left_hand_sides);\n for (var ρσ_Index90 = 0; ρσ_Index90 < ρσ_Iter90.length; ρσ_Index90++) {\n lhs = ρσ_Iter90[ρσ_Index90];\n [output.end_statement(), output.indent()];\n print_assignment(new AST_Assign((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"left\"] = lhs;\n ρσ_d[\"right\"] = temp_rhs;\n ρσ_d[\"operator\"] = self.operator;\n return ρσ_d;\n }).call(this)), output);\n }\n } else {\n var ρσ_Iter91 = ρσ_Iterable(left_hand_sides);\n for (var ρσ_Index91 = 0; ρσ_Index91 < ρσ_Iter91.length; ρσ_Index91++) {\n lhs = ρσ_Iter91[ρσ_Index91];\n output.spaced(lhs, \"=\", \"\");\n }\n rhs.print(output);\n }\n } else {\n print_assignment(self, output);\n }\n };\n if (!print_assign.__argnames__) Object.defineProperties(print_assign, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_conditional(self, output, condition, consequent, alternative) {\n var ρσ_unpack;\n ρσ_unpack = [self.condition, self.consequent, self.alternative];\n condition = ρσ_unpack[0];\n consequent = ρσ_unpack[1];\n alternative = ρσ_unpack[2];\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n condition.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })());\n output.space();\n output.print(\"?\");\n output.space();\n consequent.print(output);\n output.space();\n output.colon();\n alternative.print(output);\n };\n if (!print_conditional.__argnames__) Object.defineProperties(print_conditional, {\n __argnames__ : {value: [\"self\", \"output\", \"condition\", \"consequent\", \"alternative\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n function print_seq(output) {\n var self, p, print_seq;\n self = this;\n p = output.parent();\n print_seq = (function() {\n var ρσ_anonfunc = function () {\n self.car.print(output);\n if (self.cdr) {\n output.comma();\n if (output.should_break()) {\n output.newline();\n output.indent();\n }\n self.cdr.print(output);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.operators\"}\n });\n return ρσ_anonfunc;\n })();\n if (is_node_type(p, AST_Binary) || is_node_type(p, AST_Return) || is_node_type(p, AST_Array) || is_node_type(p, AST_BaseCall) || is_node_type(p, AST_SimpleStatement)) {\n output.with_square(print_seq);\n } else {\n print_seq();\n }\n };\n if (!print_seq.__argnames__) Object.defineProperties(print_seq, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.operators\"}\n });\n\n ρσ_modules[\"output.operators\"].comparators = comparators;\n ρσ_modules[\"output.operators\"].function_ops = function_ops;\n ρσ_modules[\"output.operators\"].after_map = after_map;\n ρσ_modules[\"output.operators\"].print_getattr = print_getattr;\n ρσ_modules[\"output.operators\"].print_getitem = print_getitem;\n ρσ_modules[\"output.operators\"].print_rich_getitem = print_rich_getitem;\n ρσ_modules[\"output.operators\"].print_splice_assignment = print_splice_assignment;\n ρσ_modules[\"output.operators\"].print_delete = print_delete;\n ρσ_modules[\"output.operators\"].print_unary_prefix = print_unary_prefix;\n ρσ_modules[\"output.operators\"].write_instanceof = write_instanceof;\n ρσ_modules[\"output.operators\"].write_smart_equality = write_smart_equality;\n ρσ_modules[\"output.operators\"].print_binary_op = print_binary_op;\n ρσ_modules[\"output.operators\"].print_existential = print_existential;\n ρσ_modules[\"output.operators\"].print_assignment = print_assignment;\n ρσ_modules[\"output.operators\"].print_assign = print_assign;\n ρσ_modules[\"output.operators\"].print_conditional = print_conditional;\n ρσ_modules[\"output.operators\"].print_seq = print_seq;\n })();\n\n (function(){\n var __name__ = \"output.functions\";\n var anonfunc, module_name;\n var AST_ClassCall = ρσ_modules.ast.AST_ClassCall;\n var AST_New = ρσ_modules.ast.AST_New;\n var has_calls = ρσ_modules.ast.has_calls;\n var AST_Dot = ρσ_modules.ast.AST_Dot;\n var AST_SymbolRef = ρσ_modules.ast.AST_SymbolRef;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n var OutputStream = ρσ_modules[\"output.stream\"].OutputStream;\n\n var print_bracketed = ρσ_modules[\"output.statements\"].print_bracketed;\n\n var create_doctring = ρσ_modules[\"output.utils\"].create_doctring;\n\n var print_getattr = ρσ_modules[\"output.operators\"].print_getattr;\n\n anonfunc = \"ρσ_anonfunc\";\n module_name = \"null\";\n function set_module_name(x) {\n module_name = (x) ? \"\\\"\" + x + \"\\\"\" : \"null\";\n };\n if (!set_module_name.__argnames__) Object.defineProperties(set_module_name, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function decorate(decorators, output, func) {\n var pos;\n pos = 0;\n function wrap() {\n if (pos < decorators.length) {\n decorators[(typeof pos === \"number\" && pos < 0) ? decorators.length + pos : pos].expression.print(output);\n pos += 1;\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n wrap();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n func();\n }\n };\n if (!wrap.__module__) Object.defineProperties(wrap, {\n __module__ : {value: \"output.functions\"}\n });\n\n wrap();\n };\n if (!decorate.__argnames__) Object.defineProperties(decorate, {\n __argnames__ : {value: [\"decorators\", \"output\", \"func\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function function_args(argnames, output, strip_first) {\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n var ρσ_unpack, i, arg;\n if (argnames && argnames.length && (argnames.is_simple_func === true || argnames.is_simple_func === undefined)) {\n var ρσ_Iter92 = ρσ_Iterable(enumerate((strip_first) ? argnames.slice(1) : argnames));\n for (var ρσ_Index92 = 0; ρσ_Index92 < ρσ_Iter92.length; ρσ_Index92++) {\n ρσ_unpack = ρσ_Iter92[ρσ_Index92];\n i = ρσ_unpack[0];\n arg = ρσ_unpack[1];\n if (i) {\n output.comma();\n }\n arg.print(output);\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })());\n output.space();\n };\n if (!function_args.__argnames__) Object.defineProperties(function_args, {\n __argnames__ : {value: [\"argnames\", \"output\", \"strip_first\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function function_preamble(node, output, offset) {\n var a, fname, kw, i, ρσ_unpack, c, arg, dname, nargs;\n a = node.argnames;\n if (!a || a.is_simple_func) {\n return;\n }\n fname = (node.name) ? node.name.name : anonfunc;\n kw = \"arguments[arguments.length-1]\";\n var ρσ_Iter93 = ρσ_Iterable(enumerate(a));\n for (var ρσ_Index93 = 0; ρσ_Index93 < ρσ_Iter93.length; ρσ_Index93++) {\n ρσ_unpack = ρσ_Iter93[ρσ_Index93];\n c = ρσ_unpack[0];\n arg = ρσ_unpack[1];\n i = c - offset;\n if (i >= 0) {\n output.indent();\n output.print(\"var\");\n output.space();\n output.assign(arg);\n if (Object.prototype.hasOwnProperty.call(a.defaults, arg.name)) {\n output.spaced(\"(arguments[\" + i + \"]\", \"===\", \"undefined\", \"||\", \"(\", i, \"===\", \"arguments.length-1\", \"&&\", kw, \"!==\", \"null\", \"&&\", \"typeof\", kw, \"===\", \"\\\"object\\\"\", \"&&\", kw, \"[ρσ_kwargs_symbol]\", \"===\", \"true))\", \"?\", \"\");\n [output.print(fname + \".__defaults__.\"), arg.print(output)];\n [output.space(), output.print(\":\"), output.space()];\n } else {\n output.spaced(\"(\", i, \"===\", \"arguments.length-1\", \"&&\", kw, \"!==\", \"null\", \"&&\", \"typeof\", kw, \"===\", \"\\\"object\\\"\", \"&&\", kw, \"[ρσ_kwargs_symbol]\", \"===\", \"true)\", \"?\", \"undefined\", \":\", \"\");\n }\n output.print(\"arguments[\" + i + \"]\");\n output.end_statement();\n }\n }\n if (a.kwargs || a.has_defaults) {\n kw = (a.kwargs) ? a.kwargs.name : \"ρσ_kwargs_obj\";\n output.indent();\n output.spaced(\"var\", kw, \"=\", \"arguments[arguments.length-1]\");\n output.end_statement();\n output.indent();\n output.spaced(\"if\", \"(\" + kw, \"===\", \"null\", \"||\", \"typeof\", kw, \"!==\", \"\\\"object\\\"\", \"||\", kw, \"[ρσ_kwargs_symbol]\", \"!==\", \"true)\", kw, \"=\", \"{}\");\n output.end_statement();\n if (a.has_defaults) {\n var ρσ_Iter94 = ρσ_Iterable(Object.keys(a.defaults));\n for (var ρσ_Index94 = 0; ρσ_Index94 < ρσ_Iter94.length; ρσ_Index94++) {\n dname = ρσ_Iter94[ρσ_Index94];\n output.indent();\n output.spaced(\"if\", \"(Object.prototype.hasOwnProperty.call(\" + kw + \",\", \"\\\"\" + dname + \"\\\"))\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n output.indent();\n output.spaced(dname, \"=\", kw + \".\" + dname);\n output.end_statement();\n if (a.kwargs) {\n output.indent();\n output.spaced(\"delete\", kw + \".\" + dname);\n output.end_statement();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })());\n output.newline();\n }\n }\n }\n if (a.starargs !== undefined) {\n nargs = a.length - offset;\n output.indent();\n output.spaced(\"var\", a.starargs.name, \"=\", \"Array.prototype.slice.call(arguments,\", nargs + \")\");\n output.end_statement();\n output.indent();\n output.spaced(\"if\", \"(\" + kw, \"!==\", \"null\", \"&&\", \"typeof\", kw, \"===\", \"\\\"object\\\"\", \"&&\", kw, \"[ρσ_kwargs_symbol]\", \"===\", \"true)\", a.starargs.name);\n output.print(\".pop()\");\n output.end_statement();\n }\n };\n if (!function_preamble.__argnames__) Object.defineProperties(function_preamble, {\n __argnames__ : {value: [\"node\", \"output\", \"offset\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function has_annotations(self) {\n var arg;\n if (self.return_annotation) {\n return true;\n }\n var ρσ_Iter95 = ρσ_Iterable(self.argnames);\n for (var ρσ_Index95 = 0; ρσ_Index95 < ρσ_Iter95.length; ρσ_Index95++) {\n arg = ρσ_Iter95[ρσ_Index95];\n if (arg.annotation) {\n return true;\n }\n }\n return false;\n };\n if (!has_annotations.__argnames__) Object.defineProperties(has_annotations, {\n __argnames__ : {value: [\"self\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function function_annotation(self, output, strip_first, name) {\n var fname, props, defaults, dkeys, names;\n fname = name || ((self.name) ? self.name.name : anonfunc);\n props = Object.create(null);\n if (has_annotations(self)) {\n props.__annotations__ = (function() {\n var ρσ_anonfunc = function () {\n var ρσ_unpack, i, arg;\n output.print(\"{\");\n if (self.argnames && self.argnames.length) {\n var ρσ_Iter96 = ρσ_Iterable(enumerate(self.argnames));\n for (var ρσ_Index96 = 0; ρσ_Index96 < ρσ_Iter96.length; ρσ_Index96++) {\n ρσ_unpack = ρσ_Iter96[ρσ_Index96];\n i = ρσ_unpack[0];\n arg = ρσ_unpack[1];\n if (arg.annotation) {\n arg.print(output);\n [output.print(\":\"), output.space()];\n arg.annotation.print(output);\n if (i < self.argnames.length - 1 || self.return_annotation) {\n output.comma();\n }\n }\n }\n }\n if (self.return_annotation) {\n [output.print(\"return:\"), output.space()];\n self.return_annotation.print(output);\n }\n output.print(\"}\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })();\n }\n defaults = self.argnames.defaults;\n dkeys = Object.keys(self.argnames.defaults);\n if (dkeys.length) {\n props.__defaults__ = (function() {\n var ρσ_anonfunc = function () {\n var ρσ_unpack, i, k;\n output.print(\"{\");\n var ρσ_Iter97 = ρσ_Iterable(enumerate(dkeys));\n for (var ρσ_Index97 = 0; ρσ_Index97 < ρσ_Iter97.length; ρσ_Index97++) {\n ρσ_unpack = ρσ_Iter97[ρσ_Index97];\n i = ρσ_unpack[0];\n k = ρσ_unpack[1];\n [output.print(k + \":\"), defaults[(typeof k === \"number\" && k < 0) ? defaults.length + k : k].print(output)];\n if (i !== dkeys.length - 1) {\n output.comma();\n }\n }\n output.print(\"}\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })();\n }\n if (!self.argnames.is_simple_func) {\n props.__handles_kwarg_interpolation__ = (function() {\n var ρσ_anonfunc = function () {\n output.print(\"true\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })();\n }\n if (self.argnames.length > ((strip_first) ? 1 : 0)) {\n props.__argnames__ = (function() {\n var ρσ_anonfunc = function () {\n var ρσ_unpack, i, arg;\n output.print(\"[\");\n var ρσ_Iter98 = ρσ_Iterable(enumerate(self.argnames));\n for (var ρσ_Index98 = 0; ρσ_Index98 < ρσ_Iter98.length; ρσ_Index98++) {\n ρσ_unpack = ρσ_Iter98[ρσ_Index98];\n i = ρσ_unpack[0];\n arg = ρσ_unpack[1];\n if (strip_first && i === 0) {\n continue;\n }\n output.print(JSON.stringify(arg.name));\n if (i !== self.argnames.length - 1) {\n output.comma();\n }\n }\n output.print(\"]\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })();\n }\n if (output.options.keep_docstrings && self.docstrings && self.docstrings.length) {\n props.__doc__ = (function() {\n var ρσ_anonfunc = function () {\n output.print(JSON.stringify(create_doctring(self.docstrings)));\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })();\n }\n props.__module__ = (function() {\n var ρσ_anonfunc = function () {\n output.print(module_name);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })();\n names = Object.keys(props);\n output.indent();\n output.spaced(\"if\", \"(!\" + fname + \".\" + names[0] + \")\", \"Object.defineProperties(\" + fname);\n output.comma();\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var name;\n for (var i = 0; i < names.length; i++) {\n name = names[(typeof i === \"number\" && i < 0) ? names.length + i : i];\n [output.indent(), output.spaced(name, \":\", \"{value:\", \"\"), props[(typeof name === \"number\" && name < 0) ? props.length + name : name](), \n output.print(\"}\")];\n if (i < names.length - 1) {\n output.print(\",\");\n }\n output.newline();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })());\n [output.print(\")\"), output.end_statement()];\n };\n if (!function_annotation.__argnames__) Object.defineProperties(function_annotation, {\n __argnames__ : {value: [\"self\", \"output\", \"strip_first\", \"name\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function function_definition(self, output, strip_first, as_expression) {\n var orig_indent;\n as_expression = as_expression || self.is_expression || self.is_anonymous;\n if (as_expression) {\n orig_indent = output.indentation();\n output.set_indentation(output.next_indent());\n [output.spaced(\"(function()\", \"{\"), output.newline()];\n [output.indent(), output.spaced(\"var\", anonfunc, \"=\"), output.space()];\n }\n [output.print(\"function\"), output.space()];\n if (self.name) {\n self.name.print(output);\n }\n if (self.is_generator) {\n [output.print(\"()\"), output.space()];\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var temp, transpiled, ci;\n if (output.options.js_version >= 6) {\n output.indent();\n output.print(\"function* js_generator\");\n function_args(self.argnames, output, strip_first);\n print_bracketed(self, output, true, function_preamble);\n } else {\n temp = new OutputStream((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"beautify\"] = true;\n return ρσ_d;\n }).call(this));\n temp.print(\"function* js_generator\");\n function_args(self.argnames, temp, strip_first);\n print_bracketed(self, temp, true, function_preamble);\n transpiled = regenerate(temp.get(), output.options.beautify).replace(/regeneratorRuntime.(wrap|mark)/g, \"ρσ_regenerator.regeneratorRuntime.$1\");\n if (output.options.beautify) {\n ci = output.make_indent(0);\n transpiled = (function() {\n var ρσ_Iter = ρσ_Iterable(transpiled.split(\"\\n\")), ρσ_Result = [], x;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n x = ρσ_Iter[ρσ_Index];\n ρσ_Result.push(ci + x);\n }\n ρσ_Result = ρσ_list_constructor(ρσ_Result);\n return ρσ_Result;\n })().join(\"\\n\");\n }\n output.print(transpiled);\n }\n output.newline();\n output.indent();\n output.spaced(\"var\", \"result\", \"=\", \"js_generator.apply(this,\", \"arguments)\");\n output.end_statement();\n output.indent();\n output.spaced(\"result.send\", \"=\", \"result.next\");\n output.end_statement();\n output.indent();\n output.spaced(\"return\", \"result\");\n output.end_statement();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n function_args(self.argnames, output, strip_first);\n print_bracketed(self, output, true, function_preamble);\n }\n if (as_expression) {\n output.end_statement();\n function_annotation(self, output, strip_first, anonfunc);\n [output.indent(), output.spaced(\"return\", anonfunc), output.end_statement()];\n output.set_indentation(orig_indent);\n [output.indent(), output.print(\"})()\")];\n }\n };\n if (!function_definition.__argnames__) Object.defineProperties(function_definition, {\n __argnames__ : {value: [\"self\", \"output\", \"strip_first\", \"as_expression\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function print_function(output) {\n var self;\n self = this;\n if (self.decorators && self.decorators.length) {\n output.print(\"var\");\n output.space();\n output.assign(self.name.name);\n decorate(self.decorators, output, (function() {\n var ρσ_anonfunc = function () {\n function_definition(self, output, false, true);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n } else {\n function_definition(self, output, false);\n if (!self.is_expression && !self.is_anonymous) {\n output.end_statement();\n function_annotation(self, output, false);\n }\n }\n };\n if (!print_function.__argnames__) Object.defineProperties(print_function, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function find_this(expression) {\n if (is_node_type(expression, AST_Dot)) {\n return expression.expression;\n }\n if (!is_node_type(expression, AST_SymbolRef)) {\n return expression;\n }\n };\n if (!find_this.__argnames__) Object.defineProperties(find_this, {\n __argnames__ : {value: [\"expression\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function print_this(expression, output) {\n var obj;\n obj = find_this(expression);\n if (obj) {\n obj.print(output);\n } else {\n output.print(\"this\");\n }\n };\n if (!print_this.__argnames__) Object.defineProperties(print_this, {\n __argnames__ : {value: [\"expression\", \"output\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function print_function_call(self, output) {\n var is_prototype_call, has_kwarg_items, has_kwarg_formals, has_kwargs, is_new, is_repeatable;\n is_prototype_call = false;\n function print_function_name(no_call) {\n if (is_node_type(self, AST_ClassCall)) {\n if (self.static) {\n self.class.print(output);\n output.print(\".\");\n output.print(self.method);\n } else {\n is_prototype_call = true;\n self.class.print(output);\n output.print(\".prototype.\");\n output.print(self.method);\n if (!no_call) {\n output.print(\".call\");\n }\n }\n } else {\n if (!is_repeatable) {\n output.print(\"ρσ_expr_temp\");\n if (is_node_type(self.expression, AST_Dot)) {\n print_getattr(self.expression, output, true);\n }\n } else {\n self.expression.print(output);\n }\n }\n };\n if (!print_function_name.__argnames__) Object.defineProperties(print_function_name, {\n __argnames__ : {value: [\"no_call\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function print_kwargs() {\n var ρσ_unpack, i, kwname, pair;\n output.print(\"ρσ_desugar_kwargs(\");\n if (has_kwarg_items) {\n var ρσ_Iter99 = ρσ_Iterable(enumerate(self.args.kwarg_items));\n for (var ρσ_Index99 = 0; ρσ_Index99 < ρσ_Iter99.length; ρσ_Index99++) {\n ρσ_unpack = ρσ_Iter99[ρσ_Index99];\n i = ρσ_unpack[0];\n kwname = ρσ_unpack[1];\n if (i > 0) {\n output.print(\",\");\n output.space();\n }\n kwname.print(output);\n }\n if (has_kwarg_formals) {\n output.print(\",\");\n output.space();\n }\n }\n if (has_kwarg_formals) {\n output.print(\"{\");\n var ρσ_Iter100 = ρσ_Iterable(enumerate(self.args.kwargs));\n for (var ρσ_Index100 = 0; ρσ_Index100 < ρσ_Iter100.length; ρσ_Index100++) {\n ρσ_unpack = ρσ_Iter100[ρσ_Index100];\n i = ρσ_unpack[0];\n pair = ρσ_unpack[1];\n if (i) {\n output.comma();\n }\n pair[0].print(output);\n output.print(\":\");\n output.space();\n pair[1].print(output);\n }\n output.print(\"}\");\n }\n output.print(\")\");\n };\n if (!print_kwargs.__module__) Object.defineProperties(print_kwargs, {\n __module__ : {value: \"output.functions\"}\n });\n\n function print_new(apply) {\n output.print(\"ρσ_interpolate_kwargs_constructor.call(\");\n [output.print(\"Object.create(\"), self.expression.print(output), output.print(\".prototype)\")];\n output.comma();\n output.print((apply) ? \"true\" : \"false\");\n output.comma();\n };\n if (!print_new.__argnames__) Object.defineProperties(print_new, {\n __argnames__ : {value: [\"apply\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n function do_print_this() {\n if (!is_repeatable) {\n output.print(\"ρσ_expr_temp\");\n } else {\n print_this(self.expression, output);\n }\n output.comma();\n };\n if (!do_print_this.__module__) Object.defineProperties(do_print_this, {\n __module__ : {value: \"output.functions\"}\n });\n\n function print_positional_args() {\n var i, expr, is_first;\n i = 0;\n while (i < self.args.length) {\n expr = (ρσ_expr_temp = self.args)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n is_first = i === 0;\n if (!is_first) {\n output.print(\".concat(\");\n }\n if (expr.is_array) {\n expr.print(output);\n i += 1;\n } else {\n output.print(\"[\");\n while (i < self.args.length && !(ρσ_expr_temp = self.args)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].is_array) {\n (ρσ_expr_temp = self.args)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].print(output);\n if (i + 1 < self.args.length && !(ρσ_expr_temp = self.args)[ρσ_bound_index(i + 1, ρσ_expr_temp)].is_array) {\n output.print(\",\");\n output.space();\n }\n i += 1;\n }\n output.print(\"]\");\n }\n if (!is_first) {\n output.print(\")\");\n }\n }\n };\n if (!print_positional_args.__module__) Object.defineProperties(print_positional_args, {\n __module__ : {value: \"output.functions\"}\n });\n\n has_kwarg_items = self.args.kwarg_items && self.args.kwarg_items.length;\n has_kwarg_formals = self.args.kwargs && self.args.kwargs.length;\n has_kwargs = has_kwarg_items || has_kwarg_formals;\n is_new = is_node_type(self, AST_New);\n is_repeatable = true;\n if (is_new && !self.args.length && !has_kwargs && !self.args.starargs) {\n [output.print(\"new\"), output.space()];\n print_function_name();\n return;\n }\n if (!has_kwargs && !self.args.starargs) {\n if (is_new) {\n [output.print(\"new\"), output.space()];\n }\n print_function_name();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n var ρσ_unpack, i, a;\n var ρσ_Iter101 = ρσ_Iterable(enumerate(self.args));\n for (var ρσ_Index101 = 0; ρσ_Index101 < ρσ_Iter101.length; ρσ_Index101++) {\n ρσ_unpack = ρσ_Iter101[ρσ_Index101];\n i = ρσ_unpack[0];\n a = ρσ_unpack[1];\n if (i) {\n output.comma();\n }\n a.print(output);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.functions\"}\n });\n return ρσ_anonfunc;\n })());\n return;\n }\n is_repeatable = is_new || !has_calls(self.expression);\n if (!is_repeatable) {\n [output.assign(\"(ρσ_expr_temp\"), print_this(self.expression, output), output.comma()];\n }\n if (has_kwargs) {\n if (is_new) {\n print_new(false);\n } else {\n output.print(\"ρσ_interpolate_kwargs.call(\");\n do_print_this();\n }\n print_function_name(true);\n output.comma();\n } else {\n if (is_new) {\n print_new(true);\n print_function_name(true);\n output.comma();\n } else {\n print_function_name(true);\n output.print(\".apply(\");\n do_print_this();\n }\n }\n if (is_prototype_call && self.args.length > 1) {\n self.args.shift();\n }\n print_positional_args();\n if (has_kwargs) {\n if (self.args.length) {\n output.print(\".concat(\");\n }\n output.print(\"[\");\n print_kwargs();\n output.print(\"]\");\n if (self.args.length) {\n output.print(\")\");\n }\n }\n output.print(\")\");\n if (!is_repeatable) {\n output.print(\")\");\n }\n };\n if (!print_function_call.__argnames__) Object.defineProperties(print_function_call, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.functions\"}\n });\n\n ρσ_modules[\"output.functions\"].anonfunc = anonfunc;\n ρσ_modules[\"output.functions\"].module_name = module_name;\n ρσ_modules[\"output.functions\"].set_module_name = set_module_name;\n ρσ_modules[\"output.functions\"].decorate = decorate;\n ρσ_modules[\"output.functions\"].function_args = function_args;\n ρσ_modules[\"output.functions\"].function_preamble = function_preamble;\n ρσ_modules[\"output.functions\"].has_annotations = has_annotations;\n ρσ_modules[\"output.functions\"].function_annotation = function_annotation;\n ρσ_modules[\"output.functions\"].function_definition = function_definition;\n ρσ_modules[\"output.functions\"].print_function = print_function;\n ρσ_modules[\"output.functions\"].find_this = find_this;\n ρσ_modules[\"output.functions\"].print_this = print_this;\n ρσ_modules[\"output.functions\"].print_function_call = print_function_call;\n })();\n\n (function(){\n var __name__ = \"output.classes\";\n var AST_Class = ρσ_modules.ast.AST_Class;\n var AST_Method = ρσ_modules.ast.AST_Method;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n var decorate = ρσ_modules[\"output.functions\"].decorate;\n var function_definition = ρσ_modules[\"output.functions\"].function_definition;\n var function_annotation = ρσ_modules[\"output.functions\"].function_annotation;\n\n var create_doctring = ρσ_modules[\"output.utils\"].create_doctring;\n\n var has_prop = ρσ_modules.utils.has_prop;\n\n function print_class(output) {\n var self, decorators, num, i, seen_methods, property_names, defined_methods, sname, attr, stmt, di;\n self = this;\n if (self.external) {\n return;\n }\n function class_def(method, is_var) {\n output.indent();\n self.name.print(output);\n if (!is_var && method && has_prop(self.static, method)) {\n output.assign(\".\" + method);\n } else {\n if (is_var) {\n output.assign(\".prototype[\" + method + \"]\");\n } else {\n output.assign(\".prototype\" + ((method) ? \".\" + method : \"\"));\n }\n }\n };\n if (!class_def.__argnames__) Object.defineProperties(class_def, {\n __argnames__ : {value: [\"method\", \"is_var\"]},\n __module__ : {value: \"output.classes\"}\n });\n\n function define_method(stmt, is_property) {\n var name, is_static, strip_first, fname;\n name = stmt.name.name;\n if (!is_property) {\n class_def(name);\n }\n is_static = has_prop(self.static, name);\n strip_first = !is_static;\n if (stmt.decorators && stmt.decorators.length) {\n decorate(stmt.decorators, output, (function() {\n var ρσ_anonfunc = function () {\n function_definition(stmt, output, strip_first, true);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n } else {\n function_definition(stmt, output, strip_first);\n if (!is_property) {\n output.end_statement();\n fname = self.name.name + ((is_static) ? \".\" : \".prototype.\") + name;\n function_annotation(stmt, output, strip_first, fname);\n }\n }\n };\n if (!define_method.__argnames__) Object.defineProperties(define_method, {\n __argnames__ : {value: [\"stmt\", \"is_property\"]},\n __module__ : {value: \"output.classes\"}\n });\n\n function define_default_method(name, body) {\n class_def(name);\n output.spaced(\"function\", name, \"()\", \"\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n [output.indent(), body()];\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n };\n if (!define_default_method.__argnames__) Object.defineProperties(define_default_method, {\n __argnames__ : {value: [\"name\", \"body\"]},\n __module__ : {value: \"output.classes\"}\n });\n\n function add_hidden_property(name, proceed) {\n [output.indent(), output.print(\"Object.defineProperty(\")];\n [self.name.print(output), output.print(\".prototype\"), output.comma(), output.print(JSON.stringify(name)), \n output.comma()];\n [output.spaced(\"{value:\", \"\"), proceed(), output.print(\"})\"), output.end_statement()];\n };\n if (!add_hidden_property.__argnames__) Object.defineProperties(add_hidden_property, {\n __argnames__ : {value: [\"name\", \"proceed\"]},\n __module__ : {value: \"output.classes\"}\n });\n\n function write_constructor() {\n output.print(\"function\");\n output.space();\n self.name.print(output);\n output.print(\"()\");\n output.space();\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n output.indent();\n output.spaced(\"if\", \"(this.ρσ_object_id\", \"===\", \"undefined)\", \"Object.defineProperty(this,\", \"\\\"ρσ_object_id\\\",\", \"{\\\"value\\\":++ρσ_object_counter})\");\n output.end_statement();\n if (self.bound.length) {\n output.indent();\n [self.name.print(output), output.print(\".prototype.__bind_methods__.call(this)\")];\n output.end_statement();\n }\n output.indent();\n self.name.print(output);\n [output.print(\".prototype.__init__.apply(this\"), output.comma(), output.print(\"arguments)\")];\n output.end_statement();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!write_constructor.__module__) Object.defineProperties(write_constructor, {\n __module__ : {value: \"output.classes\"}\n });\n\n decorators = self.decorators || [];\n if (decorators.length) {\n output.print(\"var \");\n output.assign(self.name);\n write_constructor();\n output.semicolon();\n } else {\n write_constructor();\n }\n output.newline();\n if (decorators.length) {\n output.indent();\n self.name.print(output);\n output.spaced(\".ρσ_decorators\", \"=\", \"[\");\n num = decorators.length;\n for (var ρσ_Index102 = 0; ρσ_Index102 < num; ρσ_Index102++) {\n i = ρσ_Index102;\n decorators[(typeof i === \"number\" && i < 0) ? decorators.length + i : i].expression.print(output);\n output.spaced((i < num - 1) ? \",\" : \"]\");\n }\n output.semicolon();\n output.newline();\n }\n if (self.parent) {\n output.indent();\n output.print(\"ρσ_extends\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.name.print(output);\n output.comma();\n self.parent.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n }\n if (self.bound.length) {\n seen_methods = Object.create(null);\n add_hidden_property(\"__bind_methods__\", (function() {\n var ρσ_anonfunc = function () {\n output.spaced(\"function\", \"()\", \"\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var base, bname;\n if (self.bases.length) {\n for (var i = self.bases.length - 1; i >= 0; i--) {\n base = (ρσ_expr_temp = self.bases)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n [output.indent(), base.print(output), output.spaced(\".prototype.__bind_methods__\", \"&&\", \"\")];\n [base.print(output), output.print(\".prototype.__bind_methods__.call(this)\")];\n output.end_statement();\n }\n }\n var ρσ_Iter103 = ρσ_Iterable(self.bound);\n for (var ρσ_Index103 = 0; ρσ_Index103 < ρσ_Iter103.length; ρσ_Index103++) {\n bname = ρσ_Iter103[ρσ_Index103];\n if (seen_methods[(typeof bname === \"number\" && bname < 0) ? seen_methods.length + bname : bname] || (ρσ_expr_temp = self.dynamic_properties)[(typeof bname === \"number\" && bname < 0) ? ρσ_expr_temp.length + bname : bname]) {\n continue;\n }\n seen_methods[(typeof bname === \"number\" && bname < 0) ? seen_methods.length + bname : bname] = true;\n [output.indent(), output.assign(\"this.\" + bname)];\n [self.name.print(output), output.print(\".prototype.\" + bname + \".bind(this)\")];\n output.end_statement();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n }\n property_names = Object.keys(self.dynamic_properties);\n if (property_names.length) {\n output.indent();\n output.print(\"Object.defineProperties\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n [self.name.print(output), output.print(\".prototype\"), output.comma(), output.space(), \n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var prop, name;\n var ρσ_Iter104 = ρσ_Iterable(property_names);\n for (var ρσ_Index104 = 0; ρσ_Index104 < ρσ_Iter104.length; ρσ_Index104++) {\n name = ρσ_Iter104[ρσ_Index104];\n prop = (ρσ_expr_temp = self.dynamic_properties)[(typeof name === \"number\" && name < 0) ? ρσ_expr_temp.length + name : name];\n [output.indent(), output.print(JSON.stringify(name) + \":\"), output.space()];\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n [output.indent(), output.print(\"\\\"enumerable\\\":\"), output.space(), output.print(\"true\"), \n output.comma(), output.newline()];\n if (prop.getter) {\n [output.indent(), output.print(\"\\\"get\\\":\"), output.space()];\n [define_method(prop.getter, true), output.comma(), output.newline()];\n }\n [output.indent(), output.print(\"\\\"set\\\":\"), output.space()];\n if (prop.setter) {\n [define_method(prop.setter, true), output.newline()];\n } else {\n [output.spaced(\"function\", \"()\", \"{\", \"throw new AttributeError(\\\"can't set attribute\\\")\", \"}\"), \n output.newline()];\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n [output.comma(), output.newline()];\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })())];\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n }\n if (!self.init) {\n define_default_method(\"__init__\", (function() {\n var ρσ_anonfunc = function () {\n if (self.parent) {\n self.parent.print(output);\n output.spaced(\".prototype.__init__\", \"&&\");\n [output.space(), self.parent.print(output)];\n output.print(\".prototype.__init__.apply\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"this\");\n output.comma();\n output.print(\"arguments\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n }\n defined_methods = Object.create(null);\n var ρσ_Iter105 = ρσ_Iterable(self.body);\n for (var ρσ_Index105 = 0; ρσ_Index105 < ρσ_Iter105.length; ρσ_Index105++) {\n stmt = ρσ_Iter105[ρσ_Index105];\n if (is_node_type(stmt, AST_Method)) {\n if (stmt.is_getter || stmt.is_setter) {\n continue;\n }\n define_method(stmt);\n defined_methods[ρσ_bound_index(stmt.name.name, defined_methods)] = true;\n sname = stmt.name.name;\n if (sname === \"__init__\") {\n var ρσ_Iter106 = ρσ_Iterable(ρσ_list_decorate([ \".__argnames__\", \".__handles_kwarg_interpolation__\" ]));\n for (var ρσ_Index106 = 0; ρσ_Index106 < ρσ_Iter106.length; ρσ_Index106++) {\n attr = ρσ_Iter106[ρσ_Index106];\n [output.indent(), self.name.print(output), output.assign(attr)];\n [self.name.print(output), output.print(\".prototype.__init__\" + attr), output.end_statement()];\n }\n }\n if (sname === \"__iter__\") {\n class_def(\"ρσ_iterator_symbol\", true);\n self.name.print(output);\n output.print(\".prototype.\" + stmt.name.name);\n output.end_statement();\n }\n } else if (is_node_type(stmt, AST_Class)) {\n console.error(\"Nested classes aren't supported yet\");\n }\n }\n if (!defined_methods[\"__repr__\"]) {\n define_default_method(\"__repr__\", (function() {\n var ρσ_anonfunc = function () {\n if (self.parent) {\n [output.print(\"if(\"), self.parent.print(output), output.spaced(\".prototype.__repr__)\", \"return\", self.parent)];\n [output.print(\".prototype.__repr__.call(this)\"), output.end_statement()];\n }\n [output.indent(), output.spaced(\"return\", \"\\\"<\\\"\", \"+\", \"__name__\", \"+\", \"\\\".\\\"\", \"+\", \"this.constructor.name\", \"\")];\n output.spaced(\"+\", \"\\\" #\\\"\", \"+\", \"this.ρσ_object_id\", \"+\", \"\\\">\\\"\");\n output.end_statement();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n }\n if (!defined_methods[\"__str__\"]) {\n define_default_method(\"__str__\", (function() {\n var ρσ_anonfunc = function () {\n if (self.parent) {\n [output.print(\"if(\"), self.parent.print(output), output.spaced(\".prototype.__str__)\", \"return\", self.parent)];\n [output.print(\".prototype.__str__.call(this)\"), output.end_statement()];\n }\n output.spaced(\"return\", \"this.__repr__()\");\n output.end_statement();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n }\n add_hidden_property(\"__bases__\", (function() {\n var ρσ_anonfunc = function () {\n output.print(\"[\");\n for (var i = 0; i < self.bases.length; i++) {\n (ρσ_expr_temp = self.bases)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].print(output);\n if (i < self.bases.length - 1) {\n output.comma();\n }\n }\n output.print(\"]\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n if (self.bases.length > 1) {\n output.indent();\n output.print(\"ρσ_mixin(\");\n self.name.print(output);\n for (var i = 1; i < self.bases.length; i++) {\n output.comma();\n (ρσ_expr_temp = self.bases)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].print(output);\n }\n [output.print(\")\"), output.end_statement()];\n }\n if (self.docstrings && self.docstrings.length && output.options.keep_docstrings) {\n add_hidden_property(\"__doc__\", (function() {\n var ρσ_anonfunc = function () {\n output.print(JSON.stringify(create_doctring(self.docstrings)));\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.classes\"}\n });\n return ρσ_anonfunc;\n })());\n }\n var ρσ_Iter107 = ρσ_Iterable(self.statements);\n for (var ρσ_Index107 = 0; ρσ_Index107 < ρσ_Iter107.length; ρσ_Index107++) {\n stmt = ρσ_Iter107[ρσ_Index107];\n if (!is_node_type(stmt, AST_Method)) {\n output.indent();\n stmt.print(output);\n output.newline();\n }\n }\n if (decorators.length) {\n output.indent();\n output.assign(self.name);\n for (var ρσ_Index108 = 0; ρσ_Index108 < decorators.length; ρσ_Index108++) {\n di = ρσ_Index108;\n self.name.print(output);\n output.print(\".ρσ_decorators[\" + ρσ_str.format(\"{}\", di) + \"](\");\n }\n self.name.print(output);\n output.print(\")\".repeat(decorators.length));\n output.semicolon();\n output.newline();\n output.indent();\n output.spaced(\"delete \");\n self.name.print(output);\n output.print(\".ρσ_decorators\");\n output.semicolon();\n output.newline();\n }\n };\n if (!print_class.__argnames__) Object.defineProperties(print_class, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.classes\"}\n });\n\n ρσ_modules[\"output.classes\"].print_class = print_class;\n })();\n\n (function(){\n var __name__ = \"output.literals\";\n var AST_Binary = ρσ_modules.ast.AST_Binary;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n function print_array(self, output) {\n output.print(\"ρσ_list_decorate\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.with_square((function() {\n var ρσ_anonfunc = function () {\n var a, len_, ρσ_unpack, i, exp;\n a = self.elements;\n len_ = a.length;\n if (len_ > 0) {\n output.space();\n }\n var ρσ_Iter109 = ρσ_Iterable(enumerate(a));\n for (var ρσ_Index109 = 0; ρσ_Index109 < ρσ_Iter109.length; ρσ_Index109++) {\n ρσ_unpack = ρσ_Iter109[ρσ_Index109];\n i = ρσ_unpack[0];\n exp = ρσ_unpack[1];\n if (i) {\n output.comma();\n }\n exp.print(output);\n }\n if (len_ > 0) {\n output.space();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!print_array.__argnames__) Object.defineProperties(print_array, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.literals\"}\n });\n\n function print_obj_literal(self, output) {\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"function()\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var ρσ_unpack, i, prop;\n output.indent();\n if (self.is_pydict) {\n output.spaced.apply(output, \"var ρσ_d = ρσ_dict()\".split(\" \"));\n } else {\n output.spaced(\"var\", \"ρσ_d\", \"=\", (self.is_jshash) ? \"Object.create(null)\" : \"{}\");\n }\n output.end_statement();\n var ρσ_Iter110 = ρσ_Iterable(enumerate(self.properties));\n for (var ρσ_Index110 = 0; ρσ_Index110 < ρσ_Iter110.length; ρσ_Index110++) {\n ρσ_unpack = ρσ_Iter110[ρσ_Index110];\n i = ρσ_unpack[0];\n prop = ρσ_unpack[1];\n output.indent();\n if (self.is_pydict) {\n output.print(\"ρσ_d.set\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n prop.key.print(output);\n [output.print(\",\"), output.space()];\n prop.value.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n output.print(\"ρσ_d\");\n output.with_square((function() {\n var ρσ_anonfunc = function () {\n prop.key.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n [output.space(), output.print(\"=\"), output.space()];\n prop.value.print(output);\n }\n output.end_statement();\n }\n output.indent();\n output.spaced(\"return\", \"ρσ_d\");\n output.end_statement();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n output.print(\".call(this)\");\n };\n if (!print_obj_literal.__argnames__) Object.defineProperties(print_obj_literal, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.literals\"}\n });\n\n function print_object(self, output) {\n if (self.is_pydict) {\n if (self.properties.length > 0) {\n print_obj_literal(self, output);\n } else {\n output.print(\"ρσ_dict()\");\n }\n } else {\n if (self.properties.length > 0) {\n print_obj_literal(self, output);\n } else {\n output.print((self.is_jshash) ? \"Object.create(null)\" : \"{}\");\n }\n }\n };\n if (!print_object.__argnames__) Object.defineProperties(print_object, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.literals\"}\n });\n\n function print_set(self, output) {\n if (self.items.length === 0) {\n output.print(\"ρσ_set()\");\n return;\n }\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"function()\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var item;\n output.indent();\n output.spaced.apply(output, \"var s = ρσ_set()\".split(\" \"));\n output.end_statement();\n var ρσ_Iter111 = ρσ_Iterable(self.items);\n for (var ρσ_Index111 = 0; ρσ_Index111 < ρσ_Iter111.length; ρσ_Index111++) {\n item = ρσ_Iter111[ρσ_Index111];\n output.indent();\n output.print(\"s.jsset.add\");\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n item.value.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n output.end_statement();\n }\n output.indent();\n output.spaced(\"return\", \"s\");\n output.end_statement();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.literals\"}\n });\n return ρσ_anonfunc;\n })());\n output.print(\"()\");\n };\n if (!print_set.__argnames__) Object.defineProperties(print_set, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.literals\"}\n });\n\n function print_regexp(self, output) {\n var str_, p;\n str_ = self.value.toString();\n if (output.options.ascii_only) {\n str_ = output.to_ascii(str_);\n }\n output.print(str_);\n p = output.parent();\n if (is_node_type(p, AST_Binary) && /^in/.test(p.operator) && p.left === self) {\n output.print(\" \");\n }\n };\n if (!print_regexp.__argnames__) Object.defineProperties(print_regexp, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.literals\"}\n });\n\n ρσ_modules[\"output.literals\"].print_array = print_array;\n ρσ_modules[\"output.literals\"].print_obj_literal = print_obj_literal;\n ρσ_modules[\"output.literals\"].print_object = print_object;\n ρσ_modules[\"output.literals\"].print_set = print_set;\n ρσ_modules[\"output.literals\"].print_regexp = print_regexp;\n })();\n\n (function(){\n var __name__ = \"output.comments\";\n var AST_Exit = ρσ_modules.ast.AST_Exit;\n var is_node_type = ρσ_modules.ast.is_node_type;\n\n function output_comments(comments, output, nlb) {\n var comm;\n var ρσ_Iter112 = ρσ_Iterable(comments);\n for (var ρσ_Index112 = 0; ρσ_Index112 < ρσ_Iter112.length; ρσ_Index112++) {\n comm = ρσ_Iter112[ρσ_Index112];\n if (comm.type === \"comment1\") {\n output.print(\"//\" + comm.value + \"\\n\");\n output.indent();\n } else if (comm.type === \"comment2\") {\n output.print(\"/*\" + comm.value + \"*/\");\n if (nlb) {\n output.print(\"\\n\");\n output.indent();\n } else {\n output.space();\n }\n }\n }\n };\n if (!output_comments.__argnames__) Object.defineProperties(output_comments, {\n __argnames__ : {value: [\"comments\", \"output\", \"nlb\"]},\n __module__ : {value: \"output.comments\"}\n });\n\n function print_comments(self, output) {\n var c, start, comments;\n c = output.options.comments;\n if (c) {\n start = self.start;\n if (start && !start._comments_dumped) {\n start._comments_dumped = true;\n comments = start.comments_before;\n if (is_node_type(self, AST_Exit) && self.value && self.value.start.comments_before && self.value.start.comments_before.length > 0) {\n comments = (comments || []).concat(self.value.start.comments_before);\n self.value.start.comments_before = [];\n }\n if (c.test) {\n comments = comments.filter((function() {\n var ρσ_anonfunc = function (comment) {\n return c.test(comment.value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"comment\"]},\n __module__ : {value: \"output.comments\"}\n });\n return ρσ_anonfunc;\n })());\n } else if (typeof c === \"function\") {\n comments = comments.filter((function() {\n var ρσ_anonfunc = function (comment) {\n return c(self, comment);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"comment\"]},\n __module__ : {value: \"output.comments\"}\n });\n return ρσ_anonfunc;\n })());\n }\n output_comments(comments, output, start.nlb);\n }\n }\n };\n if (!print_comments.__argnames__) Object.defineProperties(print_comments, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.comments\"}\n });\n\n ρσ_modules[\"output.comments\"].output_comments = output_comments;\n ρσ_modules[\"output.comments\"].print_comments = print_comments;\n })();\n\n (function(){\n var __name__ = \"output.modules\";\n var declare_vars = ρσ_modules[\"output.statements\"].declare_vars;\n var display_body = ρσ_modules[\"output.statements\"].display_body;\n\n var OutputStream = ρσ_modules[\"output.stream\"].OutputStream;\n\n var create_doctring = ρσ_modules[\"output.utils\"].create_doctring;\n\n var print_comments = ρσ_modules[\"output.comments\"].print_comments;\n var output_comments = ρσ_modules[\"output.comments\"].output_comments;\n\n var set_module_name = ρσ_modules[\"output.functions\"].set_module_name;\n\n var get_compiler_version = ρσ_modules.parse.get_compiler_version;\n\n var cache_file_name = ρσ_modules.utils.cache_file_name;\n\n function write_imports(module, output) {\n var imports, import_id, nonlocalvars, name, module_, module_id;\n imports = ρσ_list_decorate([]);\n var ρσ_Iter113 = ρσ_Iterable(Object.keys(module.imports));\n for (var ρσ_Index113 = 0; ρσ_Index113 < ρσ_Iter113.length; ρσ_Index113++) {\n import_id = ρσ_Iter113[ρσ_Index113];\n imports.push((ρσ_expr_temp = module.imports)[(typeof import_id === \"number\" && import_id < 0) ? ρσ_expr_temp.length + import_id : import_id]);\n }\n imports.sort((function() {\n var ρσ_anonfunc = function (a, b) {\n var ρσ_unpack;\n ρσ_unpack = [a.import_order, b.import_order];\n a = ρσ_unpack[0];\n b = ρσ_unpack[1];\n return (a < b) ? -1 : (a > b) ? 1 : 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n if (imports.length > 1) {\n output.indent();\n output.print(\"var ρσ_modules = {};\");\n output.newline();\n }\n nonlocalvars = Object.create(null);\n var ρσ_Iter114 = ρσ_Iterable(imports);\n for (var ρσ_Index114 = 0; ρσ_Index114 < ρσ_Iter114.length; ρσ_Index114++) {\n module_ = ρσ_Iter114[ρσ_Index114];\n var ρσ_Iter115 = ρσ_Iterable(module_.nonlocalvars);\n for (var ρσ_Index115 = 0; ρσ_Index115 < ρσ_Iter115.length; ρσ_Index115++) {\n name = ρσ_Iter115[ρσ_Index115];\n nonlocalvars[(typeof name === \"number\" && name < 0) ? nonlocalvars.length + name : name] = true;\n }\n }\n nonlocalvars = Object.getOwnPropertyNames(nonlocalvars).join(\", \");\n if (nonlocalvars.length) {\n output.indent();\n output.print(\"var \" + nonlocalvars);\n output.semicolon();\n output.newline();\n }\n var ρσ_Iter116 = ρσ_Iterable(imports);\n for (var ρσ_Index116 = 0; ρσ_Index116 < ρσ_Iter116.length; ρσ_Index116++) {\n module_ = ρσ_Iter116[ρσ_Index116];\n module_id = module_.module_id;\n if (module_id !== \"__main__\") {\n output.indent();\n if (module_id.indexOf(\".\") === -1) {\n output.print(\"ρσ_modules.\" + module_id);\n } else {\n output.print(\"ρσ_modules[\\\"\" + module_id + \"\\\"]\");\n }\n [output.space(), output.print(\"=\"), output.space(), output.print(\"{}\")];\n output.end_statement();\n }\n }\n var ρσ_Iter117 = ρσ_Iterable(imports);\n for (var ρσ_Index117 = 0; ρσ_Index117 < ρσ_Iter117.length; ρσ_Index117++) {\n module_ = ρσ_Iter117[ρσ_Index117];\n if (module_.module_id !== \"__main__\") {\n print_module(module_, output);\n }\n }\n };\n if (!write_imports.__argnames__) Object.defineProperties(write_imports, {\n __argnames__ : {value: [\"module\", \"output\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n function write_main_name(output) {\n if (output.options.write_name) {\n output.newline();\n output.indent();\n output.print(\"var __name__ = \\\"__main__\\\"\");\n output.semicolon();\n output.newline();\n output.newline();\n }\n };\n if (!write_main_name.__argnames__) Object.defineProperties(write_main_name, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n function const_decl(js_version) {\n return \"var\";\n };\n if (!const_decl.__argnames__) Object.defineProperties(const_decl, {\n __argnames__ : {value: [\"js_version\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n function declare_exports(module_id, exports, output, docstrings) {\n var seen, v, symbol;\n seen = Object.create(null);\n if (output.options.keep_docstrings && docstrings && docstrings.length) {\n exports.push((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = \"__doc__\";\n ρσ_d[\"refname\"] = \"ρσ_module_doc__\";\n return ρσ_d;\n }).call(this));\n [output.newline(), output.indent()];\n v = const_decl(output.options.js_version);\n [output.assign(v + \" ρσ_module_doc__\"), output.print(JSON.stringify(create_doctring(docstrings)))];\n output.end_statement();\n }\n output.newline();\n var ρσ_Iter118 = ρσ_Iterable(exports);\n for (var ρσ_Index118 = 0; ρσ_Index118 < ρσ_Iter118.length; ρσ_Index118++) {\n symbol = ρσ_Iter118[ρσ_Index118];\n if (!Object.prototype.hasOwnProperty.call(seen, symbol.name)) {\n output.indent();\n if (module_id.indexOf(\".\") === -1) {\n output.print(\"ρσ_modules.\" + module_id + \".\" + symbol.name);\n } else {\n output.print(\"ρσ_modules[\\\"\" + module_id + \"\\\"].\" + symbol.name);\n }\n [output.space(), output.print(\"=\"), output.space(), output.print(symbol.refname || symbol.name)];\n seen[ρσ_bound_index(symbol.name, seen)] = true;\n output.end_statement();\n }\n }\n };\n if (!declare_exports.__argnames__) Object.defineProperties(declare_exports, {\n __argnames__ : {value: [\"module_id\", \"exports\", \"output\", \"docstrings\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n function prologue(module, output) {\n var v, needs_yield;\n if (output.options.omit_baselib) {\n return;\n }\n output.indent();\n v = const_decl(output.options.js_version);\n [output.print(v), output.space()];\n output.spaced.apply(output, \"ρσ_iterator_symbol = (typeof Symbol === \\\"function\\\" && typeof Symbol.iterator === \\\"symbol\\\") ? Symbol.iterator : \\\"iterator-Symbol-5d0927e5554349048cf0e3762a228256\\\"\".split(\" \"));\n output.end_statement();\n [output.indent(), output.print(v), output.space()];\n output.spaced.apply(output, \"ρσ_kwargs_symbol = (typeof Symbol === \\\"function\\\") ? Symbol(\\\"kwargs-object\\\") : \\\"kwargs-object-Symbol-5d0927e5554349048cf0e3762a228256\\\"\".split(\" \"));\n output.end_statement();\n [output.indent(), output.spaced(\"var\", \"ρσ_cond_temp,\", \"ρσ_expr_temp,\", \"ρσ_last_exception\"), \n output.end_statement()];\n [output.indent(), output.spaced(\"var\", \"ρσ_object_counter\", \"=\", \"0\"), output.end_statement()];\n if (output.options.js_version > 5) {\n [output.indent(), output.spaced(\"if(\", \"typeof\", \"HTMLCollection\", \"!==\", \"\\\"undefined\\\"\", \"&&\", \"typeof\", \"Symbol\", \"===\", \"\\\"function\\\")\", \"NodeList.prototype[Symbol.iterator]\", \"=\", \"HTMLCollection.prototype[Symbol.iterator]\", \"=\", \"NamedNodeMap.prototype[Symbol.iterator]\", \"=\", \"Array.prototype[Symbol.iterator]\")];\n output.end_statement();\n }\n needs_yield = output.options.js_version < 6 && module.baselib[\"yield\"];\n if (needs_yield) {\n output.dump_yield();\n }\n if (!output.options.baselib_plain) {\n throw new ValueError(\"The baselib is missing! Remember to set the baselib_plain field on the options for OutputStream\");\n }\n output.print(output.options.baselib_plain);\n output.end_statement();\n };\n if (!prologue.__argnames__) Object.defineProperties(prologue, {\n __argnames__ : {value: [\"module\", \"output\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n function print_top_level(self, output) {\n var is_main;\n set_module_name(self.module_id);\n is_main = self.module_id === \"__main__\";\n function write_docstrings() {\n var v;\n if (is_main && output.options.keep_docstrings && self.docstrings && self.docstrings.length) {\n [output.newline(), output.indent()];\n v = const_decl(output.options.js_version);\n [output.assign(v + \" ρσ_module_doc__\"), output.print(JSON.stringify(create_doctring(self.docstrings)))];\n output.end_statement();\n }\n };\n if (!write_docstrings.__module__) Object.defineProperties(write_docstrings, {\n __module__ : {value: \"output.modules\"}\n });\n\n if (output.options.private_scope && is_main) {\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"function()\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n output.indent();\n output.print(\"\\\"use strict\\\"\");\n output.end_statement();\n prologue(self, output);\n write_imports(self, output);\n output.newline();\n output.indent();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"function()\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n write_main_name(output);\n output.newline();\n declare_vars(self.localvars, output);\n display_body(self.body, true, output);\n output.newline();\n write_docstrings();\n if (self.comments_after && self.comments_after.length) {\n output.indent();\n output_comments(self.comments_after, output);\n output.newline();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n output.print(\"();\");\n output.newline();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n output.print(\"();\");\n output.print(\"\");\n } else {\n if (is_main) {\n prologue(self, output);\n write_imports(self, output);\n write_main_name(output);\n }\n declare_vars(self.localvars, output);\n display_body(self.body, true, output);\n if (self.comments_after && self.comments_after.length) {\n output_comments(self.comments_after, output);\n }\n }\n set_module_name();\n };\n if (!print_top_level.__argnames__) Object.defineProperties(print_top_level, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n function print_module(self, output) {\n set_module_name(self.module_id);\n function output_module(output) {\n declare_vars(self.localvars, output);\n display_body(self.body, true, output);\n declare_exports(self.module_id, self.exports, output, self.docstrings);\n };\n if (!output_module.__argnames__) Object.defineProperties(output_module, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n output.newline();\n output.indent();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n output.print(\"function()\");\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var okey, cached, cobj, cname, symdef, co, raw, js_version, keep_docstrings, beautify;\n print_comments(self, output);\n if (output.options.write_name) {\n output.indent();\n output.print(\"var \");\n output.assign(\"__name__\");\n output.print(\"\\\"\" + self.module_id + \"\\\"\");\n output.semicolon();\n output.newline();\n }\n function output_key(beautify, keep_docstrings, js_version) {\n return \"beautify:\" + beautify + \" keep_docstrings:\" + keep_docstrings + \" js_version:\" + js_version;\n };\n if (!output_key.__argnames__) Object.defineProperties(output_key, {\n __argnames__ : {value: [\"beautify\", \"keep_docstrings\", \"js_version\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n okey = output_key(output.options.beautify, output.options.keep_docstrings, output.options.js_version);\n if (self.is_cached && ρσ_in(okey, self.outputs)) {\n output.print((ρσ_expr_temp = self.outputs)[(typeof okey === \"number\" && okey < 0) ? ρσ_expr_temp.length + okey : okey]);\n } else {\n output_module(output);\n if (self.srchash && self.filename) {\n cached = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"version\"] = get_compiler_version();\n ρσ_d[\"signature\"] = self.srchash;\n ρσ_d[\"classes\"] = Object.create(null);\n ρσ_d[\"baselib\"] = self.baselib;\n ρσ_d[\"nonlocalvars\"] = self.nonlocalvars;\n ρσ_d[\"imported_module_ids\"] = self.imported_module_ids;\n ρσ_d[\"exports\"] = ρσ_list_decorate([]);\n ρσ_d[\"outputs\"] = Object.create(null);\n ρσ_d[\"discard_asserts\"] = !!output.options.discard_asserts;\n return ρσ_d;\n }).call(this);\n var ρσ_Iter119 = ρσ_Iterable(Object.keys(self.classes));\n for (var ρσ_Index119 = 0; ρσ_Index119 < ρσ_Iter119.length; ρσ_Index119++) {\n cname = ρσ_Iter119[ρσ_Index119];\n cobj = (ρσ_expr_temp = self.classes)[(typeof cname === \"number\" && cname < 0) ? ρσ_expr_temp.length + cname : cname];\n (ρσ_expr_temp = cached.classes)[(typeof cname === \"number\" && cname < 0) ? ρσ_expr_temp.length + cname : cname] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = (function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = cobj.name.name;\n return ρσ_d;\n }).call(this);\n ρσ_d[\"static\"] = cobj.static;\n ρσ_d[\"bound\"] = cobj.bound;\n ρσ_d[\"classvars\"] = cobj.classvars;\n return ρσ_d;\n }).call(this);\n }\n var ρσ_Iter120 = ρσ_Iterable(self.exports);\n for (var ρσ_Index120 = 0; ρσ_Index120 < ρσ_Iter120.length; ρσ_Index120++) {\n symdef = ρσ_Iter120[ρσ_Index120];\n cached.exports.push((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"name\"] = symdef.name;\n return ρσ_d;\n }).call(this));\n }\n var ρσ_Iter121 = ρσ_Iterable(ρσ_list_decorate([ true, false ]));\n for (var ρσ_Index121 = 0; ρσ_Index121 < ρσ_Iter121.length; ρσ_Index121++) {\n beautify = ρσ_Iter121[ρσ_Index121];\n var ρσ_Iter122 = ρσ_Iterable(ρσ_list_decorate([ true, false ]));\n for (var ρσ_Index122 = 0; ρσ_Index122 < ρσ_Iter122.length; ρσ_Index122++) {\n keep_docstrings = ρσ_Iter122[ρσ_Index122];\n var ρσ_Iter123 = ρσ_Iterable(ρσ_list_decorate([ 5, 6 ]));\n for (var ρσ_Index123 = 0; ρσ_Index123 < ρσ_Iter123.length; ρσ_Index123++) {\n js_version = ρσ_Iter123[ρσ_Index123];\n co = new OutputStream((function(){\n var ρσ_d = Object.create(null);\n ρσ_d[\"beautify\"] = beautify;\n ρσ_d[\"keep_docstrings\"] = keep_docstrings;\n ρσ_d[\"js_version\"] = js_version;\n ρσ_d[\"private_scope\"] = false;\n ρσ_d[\"write_name\"] = false;\n ρσ_d[\"discard_asserts\"] = output.options.discard_asserts;\n return ρσ_d;\n }).call(this));\n co.with_indent(output.indentation(), (function() {\n var ρσ_anonfunc = function () {\n output_module(co);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n raw = co.get();\n (ρσ_expr_temp = cached.outputs)[ρσ_bound_index(output_key(beautify, keep_docstrings, js_version), ρσ_expr_temp)] = raw;\n }\n }\n }\n try {\n writefile(cache_file_name(self.filename, output.options.module_cache_dir), JSON.stringify(cached, null, \"\\t\"));\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof Error) {\n var e = ρσ_Exception;\n console.error(\"Failed to write output cache file:\", self.filename + \"-cached\", \"with error:\", e);\n } else {\n throw ρσ_Exception;\n }\n }\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.modules\"}\n });\n return ρσ_anonfunc;\n })());\n output.print(\"()\");\n output.semicolon();\n output.newline();\n set_module_name();\n };\n if (!print_module.__argnames__) Object.defineProperties(print_module, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n function print_imports(container, output) {\n var is_first_aname, akey, argname, parts, q, ρσ_unpack, i, part, self;\n is_first_aname = true;\n function add_aname(aname, key, from_import) {\n if (is_first_aname) {\n is_first_aname = false;\n } else {\n output.indent();\n }\n output.print(\"var \");\n output.assign(aname);\n if (key.indexOf(\".\") === -1) {\n [output.print(\"ρσ_modules.\"), output.print(key)];\n } else {\n [output.print(\"ρσ_modules[\\\"\"), output.print(key), output.print(\"\\\"]\")];\n }\n if (from_import) {\n output.print(\".\");\n output.print(from_import);\n }\n output.end_statement();\n };\n if (!add_aname.__argnames__) Object.defineProperties(add_aname, {\n __argnames__ : {value: [\"aname\", \"key\", \"from_import\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n var ρσ_Iter124 = ρσ_Iterable(container.imports);\n for (var ρσ_Index124 = 0; ρσ_Index124 < ρσ_Iter124.length; ρσ_Index124++) {\n self = ρσ_Iter124[ρσ_Index124];\n if (self.argnames) {\n var ρσ_Iter125 = ρσ_Iterable(self.argnames);\n for (var ρσ_Index125 = 0; ρσ_Index125 < ρσ_Iter125.length; ρσ_Index125++) {\n argname = ρσ_Iter125[ρσ_Index125];\n akey = (argname.alias) ? argname.alias.name : argname.name;\n add_aname(akey, self.key, argname.name);\n }\n } else {\n if (self.alias) {\n add_aname(self.alias.name, self.key, false);\n } else {\n parts = self.key.split(\".\");\n var ρσ_Iter126 = ρσ_Iterable(enumerate(parts));\n for (var ρσ_Index126 = 0; ρσ_Index126 < ρσ_Iter126.length; ρσ_Index126++) {\n ρσ_unpack = ρσ_Iter126[ρσ_Index126];\n i = ρσ_unpack[0];\n part = ρσ_unpack[1];\n if (i === 0) {\n add_aname(part, part, false);\n } else {\n q = parts.slice(0, i + 1).join(\".\");\n output.indent();\n output.spaced(q, \"=\", \"ρσ_modules[\\\"\" + q + \"\\\"]\");\n output.end_statement();\n }\n }\n }\n }\n }\n };\n if (!print_imports.__argnames__) Object.defineProperties(print_imports, {\n __argnames__ : {value: [\"container\", \"output\"]},\n __module__ : {value: \"output.modules\"}\n });\n\n ρσ_modules[\"output.modules\"].write_imports = write_imports;\n ρσ_modules[\"output.modules\"].write_main_name = write_main_name;\n ρσ_modules[\"output.modules\"].const_decl = const_decl;\n ρσ_modules[\"output.modules\"].declare_exports = declare_exports;\n ρσ_modules[\"output.modules\"].prologue = prologue;\n ρσ_modules[\"output.modules\"].print_top_level = print_top_level;\n ρσ_modules[\"output.modules\"].print_module = print_module;\n ρσ_modules[\"output.modules\"].print_imports = print_imports;\n })();\n\n (function(){\n var __name__ = \"output.codegen\";\n var noop = ρσ_modules.utils.noop;\n\n var PRECEDENCE = ρσ_modules.parse.PRECEDENCE;\n\n var AST_Array = ρσ_modules.ast.AST_Array;\n var AST_Assign = ρσ_modules.ast.AST_Assign;\n var AST_BaseCall = ρσ_modules.ast.AST_BaseCall;\n var AST_Binary = ρσ_modules.ast.AST_Binary;\n var AST_BlockStatement = ρσ_modules.ast.AST_BlockStatement;\n var AST_Break = ρσ_modules.ast.AST_Break;\n var AST_Class = ρσ_modules.ast.AST_Class;\n var AST_Conditional = ρσ_modules.ast.AST_Conditional;\n var AST_Constant = ρσ_modules.ast.AST_Constant;\n var AST_Continue = ρσ_modules.ast.AST_Continue;\n var AST_Debugger = ρσ_modules.ast.AST_Debugger;\n var AST_Definitions = ρσ_modules.ast.AST_Definitions;\n var AST_Directive = ρσ_modules.ast.AST_Directive;\n var AST_Do = ρσ_modules.ast.AST_Do;\n var AST_Dot = ρσ_modules.ast.AST_Dot;\n var is_node_type = ρσ_modules.ast.is_node_type;\n var AST_EmptyStatement = ρσ_modules.ast.AST_EmptyStatement;\n var AST_Exit = ρσ_modules.ast.AST_Exit;\n var AST_ExpressiveObject = ρσ_modules.ast.AST_ExpressiveObject;\n var AST_ForIn = ρσ_modules.ast.AST_ForIn;\n var AST_ForJS = ρσ_modules.ast.AST_ForJS;\n var AST_Function = ρσ_modules.ast.AST_Function;\n var AST_Hole = ρσ_modules.ast.AST_Hole;\n var AST_If = ρσ_modules.ast.AST_If;\n var AST_Imports = ρσ_modules.ast.AST_Imports;\n var AST_Infinity = ρσ_modules.ast.AST_Infinity;\n var AST_Lambda = ρσ_modules.ast.AST_Lambda;\n var AST_ListComprehension = ρσ_modules.ast.AST_ListComprehension;\n var AST_LoopControl = ρσ_modules.ast.AST_LoopControl;\n var AST_NaN = ρσ_modules.ast.AST_NaN;\n var AST_New = ρσ_modules.ast.AST_New;\n var AST_Node = ρσ_modules.ast.AST_Node;\n var AST_Number = ρσ_modules.ast.AST_Number;\n var AST_Object = ρσ_modules.ast.AST_Object;\n var AST_ObjectKeyVal = ρσ_modules.ast.AST_ObjectKeyVal;\n var AST_ObjectProperty = ρσ_modules.ast.AST_ObjectProperty;\n var AST_PropAccess = ρσ_modules.ast.AST_PropAccess;\n var AST_RegExp = ρσ_modules.ast.AST_RegExp;\n var AST_Return = ρσ_modules.ast.AST_Return;\n var AST_Set = ρσ_modules.ast.AST_Set;\n var AST_Seq = ρσ_modules.ast.AST_Seq;\n var AST_SimpleStatement = ρσ_modules.ast.AST_SimpleStatement;\n var AST_Splice = ρσ_modules.ast.AST_Splice;\n var AST_Statement = ρσ_modules.ast.AST_Statement;\n var AST_StatementWithBody = ρσ_modules.ast.AST_StatementWithBody;\n var AST_String = ρσ_modules.ast.AST_String;\n var AST_Sub = ρσ_modules.ast.AST_Sub;\n var AST_ItemAccess = ρσ_modules.ast.AST_ItemAccess;\n var AST_Symbol = ρσ_modules.ast.AST_Symbol;\n var AST_This = ρσ_modules.ast.AST_This;\n var AST_Throw = ρσ_modules.ast.AST_Throw;\n var AST_Toplevel = ρσ_modules.ast.AST_Toplevel;\n var AST_Try = ρσ_modules.ast.AST_Try;\n var AST_Unary = ρσ_modules.ast.AST_Unary;\n var AST_UnaryPrefix = ρσ_modules.ast.AST_UnaryPrefix;\n var AST_Undefined = ρσ_modules.ast.AST_Undefined;\n var AST_Var = ρσ_modules.ast.AST_Var;\n var AST_VarDef = ρσ_modules.ast.AST_VarDef;\n var AST_Assert = ρσ_modules.ast.AST_Assert;\n var AST_Verbatim = ρσ_modules.ast.AST_Verbatim;\n var AST_While = ρσ_modules.ast.AST_While;\n var AST_With = ρσ_modules.ast.AST_With;\n var AST_Yield = ρσ_modules.ast.AST_Yield;\n var TreeWalker = ρσ_modules.ast.TreeWalker;\n var AST_Existential = ρσ_modules.ast.AST_Existential;\n\n var print_try = ρσ_modules[\"output.exceptions\"].print_try;\n\n var print_class = ρσ_modules[\"output.classes\"].print_class;\n\n var print_array = ρσ_modules[\"output.literals\"].print_array;\n var print_obj_literal = ρσ_modules[\"output.literals\"].print_obj_literal;\n var print_object = ρσ_modules[\"output.literals\"].print_object;\n var print_set = ρσ_modules[\"output.literals\"].print_set;\n var print_regexp = ρσ_modules[\"output.literals\"].print_regexp;\n\n var print_do_loop = ρσ_modules[\"output.loops\"].print_do_loop;\n var print_while_loop = ρσ_modules[\"output.loops\"].print_while_loop;\n var print_for_loop_body = ρσ_modules[\"output.loops\"].print_for_loop_body;\n var print_for_in = ρσ_modules[\"output.loops\"].print_for_in;\n var print_list_comprehension = ρσ_modules[\"output.loops\"].print_list_comprehension;\n\n var print_top_level = ρσ_modules[\"output.modules\"].print_top_level;\n var print_imports = ρσ_modules[\"output.modules\"].print_imports;\n\n var print_comments = ρσ_modules[\"output.comments\"].print_comments;\n\n var print_getattr = ρσ_modules[\"output.operators\"].print_getattr;\n var print_getitem = ρσ_modules[\"output.operators\"].print_getitem;\n var print_rich_getitem = ρσ_modules[\"output.operators\"].print_rich_getitem;\n var print_splice_assignment = ρσ_modules[\"output.operators\"].print_splice_assignment;\n var print_unary_prefix = ρσ_modules[\"output.operators\"].print_unary_prefix;\n var print_binary_op = ρσ_modules[\"output.operators\"].print_binary_op;\n var print_assign = ρσ_modules[\"output.operators\"].print_assign;\n var print_conditional = ρσ_modules[\"output.operators\"].print_conditional;\n var print_seq = ρσ_modules[\"output.operators\"].print_seq;\n var print_existential = ρσ_modules[\"output.operators\"].print_existential;\n\n var print_function = ρσ_modules[\"output.functions\"].print_function;\n var print_function_call = ρσ_modules[\"output.functions\"].print_function_call;\n\n var print_bracketed = ρσ_modules[\"output.statements\"].print_bracketed;\n var first_in_statement = ρσ_modules[\"output.statements\"].first_in_statement;\n var force_statement = ρσ_modules[\"output.statements\"].force_statement;\n var print_with = ρσ_modules[\"output.statements\"].print_with;\n var print_assert = ρσ_modules[\"output.statements\"].print_assert;\n\n var make_block = ρσ_modules[\"output.utils\"].make_block;\n var make_num = ρσ_modules[\"output.utils\"].make_num;\n\n function generate_code() {\n function DEFPRINT(nodetype, generator) {\n nodetype.prototype._codegen = generator;\n };\n if (!DEFPRINT.__argnames__) Object.defineProperties(DEFPRINT, {\n __argnames__ : {value: [\"nodetype\", \"generator\"]},\n __module__ : {value: \"output.codegen\"}\n });\n\n AST_Node.prototype.print = (function() {\n var ρσ_anonfunc = function (stream, force_parens) {\n var self, generator;\n self = this;\n generator = self._codegen;\n stream.push_node(self);\n if (force_parens || self.needs_parens(stream)) {\n stream.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.add_comments(stream);\n generator(self, stream);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n } else {\n self.add_comments(stream);\n generator(self, stream);\n }\n stream.pop_node();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"stream\", \"force_parens\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n AST_Node.prototype.add_comments = (function() {\n var ρσ_anonfunc = function (output) {\n if (!is_node_type(this, AST_Toplevel)) {\n print_comments(this, output);\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n function PARENS(nodetype, func) {\n nodetype.prototype.needs_parens = func;\n };\n if (!PARENS.__argnames__) Object.defineProperties(PARENS, {\n __argnames__ : {value: [\"nodetype\", \"func\"]},\n __module__ : {value: \"output.codegen\"}\n });\n\n PARENS(AST_Node, (function() {\n var ρσ_anonfunc = function () {\n return false;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_Function, (function() {\n var ρσ_anonfunc = function (output) {\n return first_in_statement(output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_Object, (function() {\n var ρσ_anonfunc = function (output) {\n return first_in_statement(output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_Unary, (function() {\n var ρσ_anonfunc = function (output) {\n var p;\n p = output.parent();\n return is_node_type(p, AST_PropAccess) && p.expression === this;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_Seq, (function() {\n var ρσ_anonfunc = function (output) {\n var p;\n p = output.parent();\n return is_node_type(p, AST_Unary) || is_node_type(p, AST_VarDef) || is_node_type(p, AST_Dot) || is_node_type(p, AST_ObjectProperty) || is_node_type(p, AST_Conditional);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_Binary, (function() {\n var ρσ_anonfunc = function (output) {\n var p, po, pp, so, sp;\n p = output.parent();\n if (is_node_type(p, AST_BaseCall) && p.expression === this) {\n return true;\n }\n if (is_node_type(p, AST_Unary)) {\n return true;\n }\n if (is_node_type(p, AST_PropAccess) && p.expression === this) {\n return true;\n }\n if (is_node_type(p, AST_Binary)) {\n po = p.operator;\n pp = PRECEDENCE[(typeof po === \"number\" && po < 0) ? PRECEDENCE.length + po : po];\n so = this.operator;\n sp = PRECEDENCE[(typeof so === \"number\" && so < 0) ? PRECEDENCE.length + so : so];\n if (pp > sp || pp === sp && this === p.right && !((so === po && (so === \"*\" || so === \"&&\" || so === \"||\")))) {\n return true;\n }\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_PropAccess, (function() {\n var ρσ_anonfunc = function (output) {\n var p;\n p = output.parent();\n if (is_node_type(p, AST_New) && p.expression === this) {\n try {\n this.walk(new TreeWalker((function() {\n var ρσ_anonfunc = function (node) {\n if (is_node_type(node, AST_BaseCall)) {\n throw p;\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"node\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })()));\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n var ex = ρσ_Exception;\n if (ex !== p) {\n throw ex;\n }\n return true;\n } \n }\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_BaseCall, (function() {\n var ρσ_anonfunc = function (output) {\n var p;\n p = output.parent();\n return is_node_type(p, AST_New) && p.expression === this;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_New, (function() {\n var ρσ_anonfunc = function (output) {\n var p;\n p = output.parent();\n if (this.args.length === 0 && (is_node_type(p, AST_PropAccess) || is_node_type(p, AST_BaseCall) && p.expression === this)) {\n return true;\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_Number, (function() {\n var ρσ_anonfunc = function (output) {\n var p;\n p = output.parent();\n if (this.value < 0 && is_node_type(p, AST_PropAccess) && p.expression === this) {\n return true;\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n PARENS(AST_NaN, (function() {\n var ρσ_anonfunc = function (output) {\n var p;\n p = output.parent();\n if (is_node_type(p, AST_PropAccess) && p.expression === this) {\n return true;\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n function assign_and_conditional_paren_rules(output) {\n var p;\n p = output.parent();\n if (is_node_type(p, AST_Unary)) {\n return true;\n }\n if (is_node_type(p, AST_Binary) && !(is_node_type(p, AST_Assign))) {\n return true;\n }\n if (is_node_type(p, AST_BaseCall) && p.expression === this) {\n return true;\n }\n if (is_node_type(p, AST_Conditional) && p.condition === this) {\n return true;\n }\n if (is_node_type(p, AST_PropAccess) && p.expression === this) {\n return true;\n }\n };\n if (!assign_and_conditional_paren_rules.__argnames__) Object.defineProperties(assign_and_conditional_paren_rules, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n\n PARENS(AST_Assign, assign_and_conditional_paren_rules);\n PARENS(AST_Conditional, assign_and_conditional_paren_rules);\n DEFPRINT(AST_Directive, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print_string(self.value);\n output.semicolon();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Debugger, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(\"debugger\");\n output.semicolon();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n AST_StatementWithBody.prototype._do_print_body = (function() {\n var ρσ_anonfunc = function (output) {\n force_statement(this.body, output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n DEFPRINT(AST_Statement, (function() {\n var ρσ_anonfunc = function (self, output) {\n self.body.print(output);\n output.semicolon();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Toplevel, print_top_level);\n DEFPRINT(AST_Imports, print_imports);\n DEFPRINT(AST_SimpleStatement, (function() {\n var ρσ_anonfunc = function (self, output) {\n if (!(is_node_type(self.body, AST_EmptyStatement))) {\n self.body.print(output);\n output.semicolon();\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_BlockStatement, (function() {\n var ρσ_anonfunc = function (self, output) {\n print_bracketed(self, output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_EmptyStatement, (function() {\n var ρσ_anonfunc = function (self, output) {\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Do, print_do_loop);\n DEFPRINT(AST_While, print_while_loop);\n AST_ForIn.prototype._do_print_body = print_for_loop_body;\n DEFPRINT(AST_ForIn, print_for_in);\n AST_ForJS.prototype._do_print_body = (function() {\n var ρσ_anonfunc = function (output) {\n var self;\n self = this;\n output.with_block((function() {\n var ρσ_anonfunc = function () {\n var stmt;\n var ρσ_Iter127 = ρσ_Iterable(self.body.body);\n for (var ρσ_Index127 = 0; ρσ_Index127 < ρσ_Iter127.length; ρσ_Index127++) {\n stmt = ρσ_Iter127[ρσ_Index127];\n output.indent();\n stmt.print(output);\n output.newline();\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n DEFPRINT(AST_ForJS, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(\"for\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.condition.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n output.space();\n self._do_print_body(output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_ListComprehension, print_list_comprehension);\n DEFPRINT(AST_With, print_with);\n DEFPRINT(AST_Assert, print_assert);\n AST_Lambda.prototype._do_print = print_function;\n DEFPRINT(AST_Lambda, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n AST_Class.prototype._do_print = print_class;\n DEFPRINT(AST_Class, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n AST_Exit.prototype._do_print = (function() {\n var ρσ_anonfunc = function (output, kind) {\n var self;\n self = this;\n output.print(kind);\n if (self.value) {\n output.space();\n self.value.print(output);\n }\n output.semicolon();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\", \"kind\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n DEFPRINT(AST_Yield, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output, \"yield\" + ((self.is_yield_from) ? \"*\" : \"\"));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Return, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output, \"return\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Throw, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output, \"throw\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n AST_LoopControl.prototype._do_print = (function() {\n var ρσ_anonfunc = function (output, kind) {\n output.print(kind);\n if (this.label) {\n output.space();\n this.label.print(output);\n }\n output.semicolon();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\", \"kind\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n DEFPRINT(AST_Break, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output, \"break\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Continue, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output, \"continue\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n function make_then(self, output) {\n var b;\n if (output.options.bracketize) {\n make_block(self.body, output);\n return;\n }\n if (!self.body) {\n return output.force_semicolon();\n }\n if (is_node_type(self.body, AST_Do) && output.options.ie_proof) {\n make_block(self.body, output);\n return;\n }\n b = self.body;\n while (true) {\n if (is_node_type(b, AST_If)) {\n if (!b.alternative) {\n make_block(self.body, output);\n return;\n }\n b = b.alternative;\n } else if (is_node_type(b, AST_StatementWithBody)) {\n b = b.body;\n } else {\n break;\n }\n }\n force_statement(self.body, output);\n };\n if (!make_then.__argnames__) Object.defineProperties(make_then, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n\n DEFPRINT(AST_If, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(\"if\");\n output.space();\n output.with_parens((function() {\n var ρσ_anonfunc = function () {\n self.condition.print(output);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n output.space();\n if (self.alternative) {\n make_then(self, output);\n output.space();\n output.print(\"else\");\n output.space();\n force_statement(self.alternative, output);\n } else {\n self._do_print_body(output);\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Try, print_try);\n AST_Definitions.prototype._do_print = (function() {\n var ρσ_anonfunc = function (output, kind) {\n var ρσ_unpack, i, def_, p, in_for, avoid_semicolon;\n output.print(kind);\n output.space();\n var ρσ_Iter128 = ρσ_Iterable(enumerate(this.definitions));\n for (var ρσ_Index128 = 0; ρσ_Index128 < ρσ_Iter128.length; ρσ_Index128++) {\n ρσ_unpack = ρσ_Iter128[ρσ_Index128];\n i = ρσ_unpack[0];\n def_ = ρσ_unpack[1];\n if (i) {\n output.comma();\n }\n def_.print(output);\n }\n p = output.parent();\n in_for = is_node_type(p, AST_ForIn);\n avoid_semicolon = in_for && p.init === this;\n if (!avoid_semicolon) {\n output.semicolon();\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"output\", \"kind\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n DEFPRINT(AST_Var, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output, \"var\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n function parenthesize_for_noin(node, output, noin) {\n if (!noin) {\n node.print(output);\n } else {\n try {\n node.walk(new TreeWalker((function() {\n var ρσ_anonfunc = function (node) {\n if (is_node_type(node, AST_Binary) && node.operator === \"in\") {\n throw output;\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"node\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })()));\n node.print(output);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n var ex = ρσ_Exception;\n if (ex !== output) {\n throw ex;\n }\n node.print(output, true);\n } \n }\n }\n };\n if (!parenthesize_for_noin.__argnames__) Object.defineProperties(parenthesize_for_noin, {\n __argnames__ : {value: [\"node\", \"output\", \"noin\"]},\n __module__ : {value: \"output.codegen\"}\n });\n\n DEFPRINT(AST_VarDef, (function() {\n var ρσ_anonfunc = function (self, output) {\n var p, noin;\n self.name.print(output);\n if (self.value) {\n output.assign(\"\");\n p = output.parent(1);\n noin = is_node_type(p, AST_ForIn);\n parenthesize_for_noin(self.value, output, noin);\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_BaseCall, print_function_call);\n AST_Seq.prototype._do_print = print_seq;\n DEFPRINT(AST_Seq, (function() {\n var ρσ_anonfunc = function (self, output) {\n self._do_print(output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Dot, print_getattr);\n DEFPRINT(AST_Sub, print_getitem);\n DEFPRINT(AST_ItemAccess, print_rich_getitem);\n DEFPRINT(AST_Splice, print_splice_assignment);\n DEFPRINT(AST_UnaryPrefix, print_unary_prefix);\n DEFPRINT(AST_Binary, print_binary_op);\n DEFPRINT(AST_Existential, print_existential);\n DEFPRINT(AST_Assign, print_assign);\n DEFPRINT(AST_Conditional, print_conditional);\n DEFPRINT(AST_Array, print_array);\n DEFPRINT(AST_ExpressiveObject, print_obj_literal);\n DEFPRINT(AST_Object, print_object);\n DEFPRINT(AST_ObjectKeyVal, (function() {\n var ρσ_anonfunc = function (self, output) {\n self.key.print(output);\n output.colon();\n self.value.print(output);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Set, print_set);\n AST_Symbol.prototype.definition = (function() {\n var ρσ_anonfunc = function () {\n return this.thedef;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })();\n DEFPRINT(AST_Symbol, (function() {\n var ρσ_anonfunc = function (self, output) {\n var def_;\n def_ = self.definition();\n output.print_name((def_) ? def_.mangled_name || def_.name : self.name);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Undefined, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(\"void 0\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Hole, noop);\n DEFPRINT(AST_Infinity, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(\"1/0\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_NaN, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(\"0/0\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_This, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(\"this\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Constant, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(self.value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_String, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print_string(self.value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Verbatim, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(self.value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_Number, (function() {\n var ρσ_anonfunc = function (self, output) {\n output.print(make_num(self.value));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"self\", \"output\"]},\n __module__ : {value: \"output.codegen\"}\n });\n return ρσ_anonfunc;\n })());\n DEFPRINT(AST_RegExp, print_regexp);\n };\n if (!generate_code.__module__) Object.defineProperties(generate_code, {\n __module__ : {value: \"output.codegen\"}\n });\n\n ρσ_modules[\"output.codegen\"].generate_code = generate_code;\n })();\n\n (function(){\n\n var __name__ = \"__main__\";\n\n\n var ast, ast_node;\n var DefaultsError = ρσ_modules.utils.DefaultsError;\n var string_template = ρσ_modules.utils.string_template;\n\n var ImportError = ρσ_modules.errors.ImportError;\n var SyntaxError = ρσ_modules.errors.SyntaxError;\n\n var ALL_KEYWORDS = ρσ_modules.tokenizer.ALL_KEYWORDS;\n var IDENTIFIER_PAT = ρσ_modules.tokenizer.IDENTIFIER_PAT;\n var tokenizer = ρσ_modules.tokenizer.tokenizer;\n\n var parse = ρσ_modules.parse.parse;\n var NATIVE_CLASSES = ρσ_modules.parse.NATIVE_CLASSES;\n var compile_time_decorators = ρσ_modules.parse.compile_time_decorators;\n\n var OutputStream = ρσ_modules[\"output.stream\"].OutputStream;\n\n var generate_code = ρσ_modules[\"output.codegen\"].generate_code;\n\n generate_code();\n if (typeof exports === \"object\") {\n exports.DefaultsError = DefaultsError;\n exports.parse = parse;\n exports.compile_time_decorators = compile_time_decorators;\n exports.OutputStream = OutputStream;\n exports.string_template = string_template;\n exports.ALL_KEYWORDS = ALL_KEYWORDS;\n exports.IDENTIFIER_PAT = IDENTIFIER_PAT;\n exports.NATIVE_CLASSES = NATIVE_CLASSES;\n exports.ImportError = ImportError;\n exports.SyntaxError = SyntaxError;\n exports.tokenizer = tokenizer;\n ast = ρσ_modules[\"ast\"];\n var ρσ_Iter129 = ρσ_Iterable(ast);\n for (var ρσ_Index129 = 0; ρσ_Index129 < ρσ_Iter129.length; ρσ_Index129++) {\n ast_node = ρσ_Iter129[ρσ_Index129];\n if (ast_node.substr(0, 4) === \"AST_\") {\n exports[(typeof ast_node === \"number\" && ast_node < 0) ? exports.length + ast_node : ast_node] = ast[(typeof ast_node === \"number\" && ast_node < 0) ? ast.length + ast_node : ast_node];\n }\n }\n }\n })();\n})();","baselib-plain-pretty.js":"var ρσ_len;\nfunction ρσ_bool(val) {\n return !!val;\n};\nif (!ρσ_bool.__argnames__) Object.defineProperties(ρσ_bool, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_print() {\n var parts;\n if (typeof console === \"object\") {\n parts = [];\n for (var i = 0; i < arguments.length; i++) {\n parts.push(ρσ_str(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]));\n }\n console.log(parts.join(\" \"));\n }\n};\nif (!ρσ_print.__module__) Object.defineProperties(ρσ_print, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_int(val, base) {\n var ans;\n if (typeof val === \"number\") {\n ans = val | 0;\n } else {\n ans = parseInt(val, base || 10);\n }\n if (isNaN(ans)) {\n throw new ValueError(\"Invalid literal for int with base \" + (base || 10) + \": \" + val);\n }\n return ans;\n};\nif (!ρσ_int.__argnames__) Object.defineProperties(ρσ_int, {\n __argnames__ : {value: [\"val\", \"base\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_float(val) {\n var ans;\n if (typeof val === \"number\") {\n ans = val;\n } else {\n ans = parseFloat(val);\n }\n if (isNaN(ans)) {\n throw new ValueError(\"Could not convert string to float: \" + arguments[0]);\n }\n return ans;\n};\nif (!ρσ_float.__argnames__) Object.defineProperties(ρσ_float, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_arraylike_creator() {\n var names;\n names = \"Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".split(\" \");\n if (typeof HTMLCollection === \"function\") {\n names = names.concat(\"HTMLCollection NodeList NamedNodeMap TouchList\".split(\" \"));\n }\n return (function() {\n var ρσ_anonfunc = function (x) {\n if (Array.isArray(x) || typeof x === \"string\" || names.indexOf(Object.prototype.toString.call(x).slice(8, -1)) > -1) {\n return true;\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n};\nif (!ρσ_arraylike_creator.__module__) Object.defineProperties(ρσ_arraylike_creator, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction options_object(f) {\n return (function() {\n var ρσ_anonfunc = function () {\n if (typeof arguments[arguments.length - 1] === \"object\") {\n arguments[ρσ_bound_index(arguments.length - 1, arguments)][ρσ_kwargs_symbol] = true;\n }\n return f.apply(this, arguments);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n};\nif (!options_object.__argnames__) Object.defineProperties(options_object, {\n __argnames__ : {value: [\"f\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_id(x) {\n return x.ρσ_object_id;\n};\nif (!ρσ_id.__argnames__) Object.defineProperties(ρσ_id, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_dir(item) {\n var arr;\n arr = ρσ_list_decorate([]);\n for (var i in item) {\n arr.push(i);\n }\n return arr;\n};\nif (!ρσ_dir.__argnames__) Object.defineProperties(ρσ_dir, {\n __argnames__ : {value: [\"item\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_ord(x) {\n var ans, second;\n ans = x.charCodeAt(0);\n if (55296 <= ans && ans <= 56319) {\n second = x.charCodeAt(1);\n if (56320 <= second && second <= 57343) {\n return (ans - 55296) * 1024 + second - 56320 + 65536;\n }\n throw new TypeError(\"string is missing the low surrogate char\");\n }\n return ans;\n};\nif (!ρσ_ord.__argnames__) Object.defineProperties(ρσ_ord, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_chr(code) {\n if (code <= 65535) {\n return String.fromCharCode(code);\n }\n code -= 65536;\n return String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));\n};\nif (!ρσ_chr.__argnames__) Object.defineProperties(ρσ_chr, {\n __argnames__ : {value: [\"code\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_callable(x) {\n return typeof x === \"function\";\n};\nif (!ρσ_callable.__argnames__) Object.defineProperties(ρσ_callable, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_bin(x) {\n var ans;\n if (typeof x !== \"number\" || x % 1 !== 0) {\n throw new TypeError(\"integer required\");\n }\n ans = x.toString(2);\n if (ans[0] === \"-\") {\n ans = \"-\" + \"0b\" + ans.slice(1);\n } else {\n ans = \"0b\" + ans;\n }\n return ans;\n};\nif (!ρσ_bin.__argnames__) Object.defineProperties(ρσ_bin, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_hex(x) {\n var ans;\n if (typeof x !== \"number\" || x % 1 !== 0) {\n throw new TypeError(\"integer required\");\n }\n ans = x.toString(16);\n if (ans[0] === \"-\") {\n ans = \"-\" + \"0x\" + ans.slice(1);\n } else {\n ans = \"0x\" + ans;\n }\n return ans;\n};\nif (!ρσ_hex.__argnames__) Object.defineProperties(ρσ_hex, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_enumerate(iterable) {\n var ans, iterator;\n ans = {\"_i\":-1};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n if (ρσ_arraylike(iterable)) {\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i < iterable.length) {\n return {'done':false, 'value':[this._i, iterable[this._i]]};\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n ans[\"_iterator\"] = iterator;\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var r;\n r = this._iterator.next();\n if (r.done) {\n return {'done':true};\n }\n this._i += 1;\n return {'done':false, 'value':[this._i, r.value]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n return ρσ_enumerate(Object.keys(iterable));\n};\nif (!ρσ_enumerate.__argnames__) Object.defineProperties(ρσ_enumerate, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_reversed(iterable) {\n var ans;\n if (ρσ_arraylike(iterable)) {\n ans = {\"_i\": iterable.length};\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i -= 1;\n if (this._i > -1) {\n return {'done':false, 'value':iterable[this._i]};\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n throw new TypeError(\"reversed() can only be called on arrays or strings\");\n};\nif (!ρσ_reversed.__argnames__) Object.defineProperties(ρσ_reversed, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_iter(iterable) {\n var ans;\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n return (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n }\n if (ρσ_arraylike(iterable)) {\n ans = {\"_i\":-1};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i < iterable.length) {\n return {'done':false, 'value':iterable[this._i]};\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n }\n return ρσ_iter(Object.keys(iterable));\n};\nif (!ρσ_iter.__argnames__) Object.defineProperties(ρσ_iter, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_range_next(step, length) {\n var ρσ_unpack;\n this._i += step;\n this._idx += 1;\n if (this._idx >= length) {\n ρσ_unpack = [this.__i, -1];\n this._i = ρσ_unpack[0];\n this._idx = ρσ_unpack[1];\n return {'done':true};\n }\n return {'done':false, 'value':this._i};\n};\nif (!ρσ_range_next.__argnames__) Object.defineProperties(ρσ_range_next, {\n __argnames__ : {value: [\"step\", \"length\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_range(start, stop, step) {\n var length, ans;\n if (arguments.length <= 1) {\n stop = start || 0;\n start = 0;\n }\n step = arguments[2] || 1;\n length = Math.max(Math.ceil((stop - start) / step), 0);\n ans = {start:start, step:step, stop:stop};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n var it;\n it = {\"_i\": start - step, \"_idx\": -1};\n it.next = ρσ_range_next.bind(it, step, length);\n it[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return it;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.count = (function() {\n var ρσ_anonfunc = function (val) {\n if (!this._cached) {\n this._cached = list(this);\n }\n return this._cached.count(val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.index = (function() {\n var ρσ_anonfunc = function (val) {\n if (!this._cached) {\n this._cached = list(this);\n }\n return this._cached.index(val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.__len__ = (function() {\n var ρσ_anonfunc = function () {\n return length;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.__repr__ = (function() {\n var ρσ_anonfunc = function () {\n return \"range(\" + ρσ_str.format(\"{}\", start) + \", \" + ρσ_str.format(\"{}\", stop) + \", \" + ρσ_str.format(\"{}\", step) + \")\";\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans.__str__ = ans.toString = ans.__repr__;\n if (typeof Proxy === \"function\") {\n ans = new Proxy(ans, (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function (obj, prop) {\n var iprop;\n if (typeof prop === \"string\") {\n iprop = parseInt(prop);\n if (!isNaN(iprop)) {\n prop = iprop;\n }\n }\n if (typeof prop === \"number\") {\n if (!obj._cached) {\n obj._cached = list(obj);\n }\n return (ρσ_expr_temp = obj._cached)[(typeof prop === \"number\" && prop < 0) ? ρσ_expr_temp.length + prop : prop];\n }\n return obj[(typeof prop === \"number\" && prop < 0) ? obj.length + prop : prop];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"obj\", \"prop\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this));\n }\n return ans;\n};\nif (!ρσ_range.__argnames__) Object.defineProperties(ρσ_range, {\n __argnames__ : {value: [\"start\", \"stop\", \"step\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_getattr(obj, name, defval) {\n var ret;\n try {\n ret = obj[(typeof name === \"number\" && name < 0) ? obj.length + name : name];\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof TypeError) {\n if (defval === undefined) {\n throw new AttributeError(\"The attribute \" + name + \" is not present\");\n }\n return defval;\n } else {\n throw ρσ_Exception;\n }\n }\n if (ret === undefined && !(name in obj)) {\n if (defval === undefined) {\n throw new AttributeError(\"The attribute \" + name + \" is not present\");\n }\n ret = defval;\n }\n return ret;\n};\nif (!ρσ_getattr.__argnames__) Object.defineProperties(ρσ_getattr, {\n __argnames__ : {value: [\"obj\", \"name\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_setattr(obj, name, value) {\n obj[(typeof name === \"number\" && name < 0) ? obj.length + name : name] = value;\n};\nif (!ρσ_setattr.__argnames__) Object.defineProperties(ρσ_setattr, {\n __argnames__ : {value: [\"obj\", \"name\", \"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_hasattr(obj, name) {\n return name in obj;\n};\nif (!ρσ_hasattr.__argnames__) Object.defineProperties(ρσ_hasattr, {\n __argnames__ : {value: [\"obj\", \"name\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_len = (function() {\n var ρσ_anonfunc = function () {\n function len(obj) {\n if (ρσ_arraylike(obj)) {\n return obj.length;\n }\n if (typeof obj.__len__ === \"function\") {\n return obj.__len__();\n }\n if (obj instanceof Set || obj instanceof Map) {\n return obj.size;\n }\n return Object.keys(obj).length;\n };\n if (!len.__argnames__) Object.defineProperties(len, {\n __argnames__ : {value: [\"obj\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function len5(obj) {\n if (ρσ_arraylike(obj)) {\n return obj.length;\n }\n if (typeof obj.__len__ === \"function\") {\n return obj.__len__();\n }\n return Object.keys(obj).length;\n };\n if (!len5.__argnames__) Object.defineProperties(len5, {\n __argnames__ : {value: [\"obj\"]},\n __module__ : {value: \"__main__\"}\n });\n\n return (typeof Set === \"function\" && typeof Map === \"function\") ? len : len5;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})()();\nfunction ρσ_get_module(name) {\n return ρσ_modules[(typeof name === \"number\" && name < 0) ? ρσ_modules.length + name : name];\n};\nif (!ρσ_get_module.__argnames__) Object.defineProperties(ρσ_get_module, {\n __argnames__ : {value: [\"name\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_pow(x, y, z) {\n var ans;\n ans = Math.pow(x, y);\n if (z !== undefined) {\n ans %= z;\n }\n return ans;\n};\nif (!ρσ_pow.__argnames__) Object.defineProperties(ρσ_pow, {\n __argnames__ : {value: [\"x\", \"y\", \"z\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_type(x) {\n return x.constructor;\n};\nif (!ρσ_type.__argnames__) Object.defineProperties(ρσ_type, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_divmod(x, y) {\n var d;\n if (y === 0) {\n throw new ZeroDivisionError(\"integer division or modulo by zero\");\n }\n d = Math.floor(x / y);\n return [d, x - d * y];\n};\nif (!ρσ_divmod.__argnames__) Object.defineProperties(ρσ_divmod, {\n __argnames__ : {value: [\"x\", \"y\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_max() {\n var kwargs = arguments[arguments.length-1];\n if (kwargs === null || typeof kwargs !== \"object\" || kwargs [ρσ_kwargs_symbol] !== true) kwargs = {};\n var args = Array.prototype.slice.call(arguments, 0);\n if (kwargs !== null && typeof kwargs === \"object\" && kwargs [ρσ_kwargs_symbol] === true) args.pop();\n var args, x;\n if (args.length === 0) {\n if (kwargs.defval !== undefined) {\n return kwargs.defval;\n }\n throw new TypeError(\"expected at least one argument\");\n }\n if (args.length === 1) {\n args = args[0];\n }\n if (kwargs.key) {\n args = (function() {\n var ρσ_Iter = ρσ_Iterable(args), ρσ_Result = [], x;\n for (var ρσ_Index = 0; ρσ_Index < ρσ_Iter.length; ρσ_Index++) {\n x = ρσ_Iter[ρσ_Index];\n ρσ_Result.push(kwargs.key(x));\n }\n ρσ_Result = ρσ_list_constructor(ρσ_Result);\n return ρσ_Result;\n })();\n }\n if (!Array.isArray(args)) {\n args = list(args);\n }\n if (args.length) {\n return this.apply(null, args);\n }\n if (kwargs.defval !== undefined) {\n return kwargs.defval;\n }\n throw new TypeError(\"expected at least one argument\");\n};\nif (!ρσ_max.__handles_kwarg_interpolation__) Object.defineProperties(ρσ_max, {\n __handles_kwarg_interpolation__ : {value: true},\n __module__ : {value: \"__main__\"}\n});\n\nvar abs = Math.abs, max = ρσ_max.bind(Math.max), min = ρσ_max.bind(Math.min), bool = ρσ_bool, type = ρσ_type;\nvar float = ρσ_float, int = ρσ_int, arraylike = ρσ_arraylike_creator(), ρσ_arraylike = arraylike;\nvar print = ρσ_print, id = ρσ_id, get_module = ρσ_get_module, pow = ρσ_pow, divmod = ρσ_divmod;\nvar dir = ρσ_dir, ord = ρσ_ord, chr = ρσ_chr, bin = ρσ_bin, hex = ρσ_hex, callable = ρσ_callable;\nvar enumerate = ρσ_enumerate, iter = ρσ_iter, reversed = ρσ_reversed, len = ρσ_len;\nvar range = ρσ_range, getattr = ρσ_getattr, setattr = ρσ_setattr, hasattr = ρσ_hasattr;function ρσ_equals(a, b) {\n var ρσ_unpack, akeys, bkeys, key;\n if (a === b) {\n return true;\n }\n if (a && typeof a.__eq__ === \"function\") {\n return a.__eq__(b);\n }\n if (b && typeof b.__eq__ === \"function\") {\n return b.__eq__(a);\n }\n if (ρσ_arraylike(a) && ρσ_arraylike(b)) {\n if ((a.length !== b.length && (typeof a.length !== \"object\" || ρσ_not_equals(a.length, b.length)))) {\n return false;\n }\n for (var i=0; i < a.length; i++) {\n if (!(((a[(typeof i === \"number\" && i < 0) ? a.length + i : i] === b[(typeof i === \"number\" && i < 0) ? b.length + i : i] || typeof a[(typeof i === \"number\" && i < 0) ? a.length + i : i] === \"object\" && ρσ_equals(a[(typeof i === \"number\" && i < 0) ? a.length + i : i], b[(typeof i === \"number\" && i < 0) ? b.length + i : i]))))) {\n return false;\n }\n }\n return true;\n }\n if (typeof a === \"object\" && typeof b === \"object\" && a !== null && b !== null && (a.constructor === Object && b.constructor === Object || Object.getPrototypeOf(a) === null && Object.getPrototypeOf(b) === null)) {\n ρσ_unpack = [Object.keys(a), Object.keys(b)];\n akeys = ρσ_unpack[0];\n bkeys = ρσ_unpack[1];\n if (akeys.length !== bkeys.length) {\n return false;\n }\n for (var j=0; j < akeys.length; j++) {\n key = akeys[(typeof j === \"number\" && j < 0) ? akeys.length + j : j];\n if (!(((a[(typeof key === \"number\" && key < 0) ? a.length + key : key] === b[(typeof key === \"number\" && key < 0) ? b.length + key : key] || typeof a[(typeof key === \"number\" && key < 0) ? a.length + key : key] === \"object\" && ρσ_equals(a[(typeof key === \"number\" && key < 0) ? a.length + key : key], b[(typeof key === \"number\" && key < 0) ? b.length + key : key]))))) {\n return false;\n }\n }\n return true;\n }\n return false;\n};\nif (!ρσ_equals.__argnames__) Object.defineProperties(ρσ_equals, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_not_equals(a, b) {\n if (a === b) {\n return false;\n }\n if (a && typeof a.__ne__ === \"function\") {\n return a.__ne__(b);\n }\n if (b && typeof b.__ne__ === \"function\") {\n return b.__ne__(a);\n }\n return !ρσ_equals(a, b);\n};\nif (!ρσ_not_equals.__argnames__) Object.defineProperties(ρσ_not_equals, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar equals = ρσ_equals;\nfunction ρσ_list_extend(iterable) {\n var start, iterator, result;\n if (Array.isArray(iterable) || typeof iterable === \"string\") {\n start = this.length;\n this.length += iterable.length;\n for (var i = 0; i < iterable.length; i++) {\n (ρσ_expr_temp = this)[ρσ_bound_index(start + i, ρσ_expr_temp)] = iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i];\n }\n } else {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done) {\n this.push(result.value);\n result = iterator.next();\n }\n }\n};\nif (!ρσ_list_extend.__argnames__) Object.defineProperties(ρσ_list_extend, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_index(val, start, stop) {\n var idx;\n start = start || 0;\n if (start < 0) {\n start = this.length + start;\n }\n if (start < 0) {\n throw new ValueError(val + \" is not in list\");\n }\n if (stop === undefined) {\n idx = this.indexOf(val, start);\n if (idx === -1) {\n throw new ValueError(val + \" is not in list\");\n }\n return idx;\n }\n if (stop < 0) {\n stop = this.length + stop;\n }\n for (var i = start; i < stop; i++) {\n if (((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === val || typeof (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === \"object\" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i], val))) {\n return i;\n }\n }\n throw new ValueError(val + \" is not in list\");\n};\nif (!ρσ_list_index.__argnames__) Object.defineProperties(ρσ_list_index, {\n __argnames__ : {value: [\"val\", \"start\", \"stop\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_pop(index) {\n var ans;\n if (this.length === 0) {\n throw new IndexError(\"list is empty\");\n }\n if (index === undefined) {\n index = -1;\n }\n ans = this.splice(index, 1);\n if (!ans.length) {\n throw new IndexError(\"pop index out of range\");\n }\n return ans[0];\n};\nif (!ρσ_list_pop.__argnames__) Object.defineProperties(ρσ_list_pop, {\n __argnames__ : {value: [\"index\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_remove(value) {\n var idx;\n idx = this.indexOf(value);\n if (idx === -1) {\n throw new ValueError(value + \" not in list\");\n }\n this.splice(idx, 1);\n};\nif (!ρσ_list_remove.__argnames__) Object.defineProperties(ρσ_list_remove, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_to_string() {\n return \"[\" + this.join(\", \") + \"]\";\n};\nif (!ρσ_list_to_string.__module__) Object.defineProperties(ρσ_list_to_string, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_insert(index, val) {\n if (index < 0) {\n index += this.length;\n }\n index = min(this.length, max(index, 0));\n if (index === 0) {\n this.unshift(val);\n return;\n }\n for (var i = this.length; i > index; i--) {\n (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] = (ρσ_expr_temp = this)[ρσ_bound_index(i - 1, ρσ_expr_temp)];\n }\n (ρσ_expr_temp = this)[(typeof index === \"number\" && index < 0) ? ρσ_expr_temp.length + index : index] = val;\n};\nif (!ρσ_list_insert.__argnames__) Object.defineProperties(ρσ_list_insert, {\n __argnames__ : {value: [\"index\", \"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_copy() {\n return ρσ_list_constructor(this);\n};\nif (!ρσ_list_copy.__module__) Object.defineProperties(ρσ_list_copy, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_clear() {\n this.length = 0;\n};\nif (!ρσ_list_clear.__module__) Object.defineProperties(ρσ_list_clear, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_as_array() {\n return Array.prototype.slice.call(this);\n};\nif (!ρσ_list_as_array.__module__) Object.defineProperties(ρσ_list_as_array, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_count(value) {\n return this.reduce((function() {\n var ρσ_anonfunc = function (n, val) {\n return n + (val === value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"n\", \"val\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })(), 0);\n};\nif (!ρσ_list_count.__argnames__) Object.defineProperties(ρσ_list_count, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_sort_key(value) {\n var t;\n t = typeof value;\n if (t === \"string\" || t === \"number\") {\n return value;\n }\n return value.toString();\n};\nif (!ρσ_list_sort_key.__argnames__) Object.defineProperties(ρσ_list_sort_key, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_sort_cmp(a, b, ap, bp) {\n if (a < b) {\n return -1;\n }\n if (a > b) {\n return 1;\n }\n return ap - bp;\n};\nif (!ρσ_list_sort_cmp.__argnames__) Object.defineProperties(ρσ_list_sort_cmp, {\n __argnames__ : {value: [\"a\", \"b\", \"ap\", \"bp\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_sort() {\n var key = (arguments[0] === undefined || ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? ρσ_list_sort.__defaults__.key : arguments[0];\n var reverse = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? ρσ_list_sort.__defaults__.reverse : arguments[1];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"key\")){\n key = ρσ_kwargs_obj.key;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"reverse\")){\n reverse = ρσ_kwargs_obj.reverse;\n }\n var mult, keymap, posmap, k;\n key = key || ρσ_list_sort_key;\n mult = (reverse) ? -1 : 1;\n keymap = dict();\n posmap = dict();\n for (var i=0; i < this.length; i++) {\n k = (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n keymap.set(k, key(k));\n posmap.set(k, i);\n }\n this.sort((function() {\n var ρσ_anonfunc = function (a, b) {\n return mult * ρσ_list_sort_cmp(keymap.get(a), keymap.get(b), posmap.get(a), posmap.get(b));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"a\", \"b\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })());\n};\nif (!ρσ_list_sort.__defaults__) Object.defineProperties(ρσ_list_sort, {\n __defaults__ : {value: {key:null, reverse:false}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"key\", \"reverse\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_concat() {\n var ans;\n ans = Array.prototype.concat.apply(this, arguments);\n ρσ_list_decorate(ans);\n return ans;\n};\nif (!ρσ_list_concat.__module__) Object.defineProperties(ρσ_list_concat, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_slice() {\n var ans;\n ans = Array.prototype.slice.apply(this, arguments);\n ρσ_list_decorate(ans);\n return ans;\n};\nif (!ρσ_list_slice.__module__) Object.defineProperties(ρσ_list_slice, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_iterator(value) {\n var self;\n self = this;\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"_i\"] = -1;\n ρσ_d[\"_list\"] = self;\n ρσ_d[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._list.length) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = true;\n return ρσ_d;\n }).call(this);\n }\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = false;\n ρσ_d[\"value\"] = (ρσ_expr_temp = this._list)[ρσ_bound_index(this._i, ρσ_expr_temp)];\n return ρσ_d;\n }).call(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n};\nif (!ρσ_list_iterator.__argnames__) Object.defineProperties(ρσ_list_iterator, {\n __argnames__ : {value: [\"value\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_len() {\n return this.length;\n};\nif (!ρσ_list_len.__module__) Object.defineProperties(ρσ_list_len, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_contains(val) {\n for (var i = 0; i < this.length; i++) {\n if (((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === val || typeof (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === \"object\" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i], val))) {\n return true;\n }\n }\n return false;\n};\nif (!ρσ_list_contains.__argnames__) Object.defineProperties(ρσ_list_contains, {\n __argnames__ : {value: [\"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_eq(other) {\n if (!ρσ_arraylike(other)) {\n return false;\n }\n if ((this.length !== other.length && (typeof this.length !== \"object\" || ρσ_not_equals(this.length, other.length)))) {\n return false;\n }\n for (var i = 0; i < this.length; i++) {\n if (!((((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === other[(typeof i === \"number\" && i < 0) ? other.length + i : i] || typeof (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] === \"object\" && ρσ_equals((ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i], other[(typeof i === \"number\" && i < 0) ? other.length + i : i]))))) {\n return false;\n }\n }\n return true;\n};\nif (!ρσ_list_eq.__argnames__) Object.defineProperties(ρσ_list_eq, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_decorate(ans) {\n ans.append = Array.prototype.push;\n ans.toString = ρσ_list_to_string;\n ans.inspect = ρσ_list_to_string;\n ans.extend = ρσ_list_extend;\n ans.index = ρσ_list_index;\n ans.pypop = ρσ_list_pop;\n ans.remove = ρσ_list_remove;\n ans.insert = ρσ_list_insert;\n ans.copy = ρσ_list_copy;\n ans.clear = ρσ_list_clear;\n ans.count = ρσ_list_count;\n ans.concat = ρσ_list_concat;\n ans.pysort = ρσ_list_sort;\n ans.slice = ρσ_list_slice;\n ans.as_array = ρσ_list_as_array;\n ans.__len__ = ρσ_list_len;\n ans.__contains__ = ρσ_list_contains;\n ans.__eq__ = ρσ_list_eq;\n ans.constructor = ρσ_list_constructor;\n if (typeof ans[ρσ_iterator_symbol] !== \"function\") {\n ans[ρσ_iterator_symbol] = ρσ_list_iterator;\n }\n return ans;\n};\nif (!ρσ_list_decorate.__argnames__) Object.defineProperties(ρσ_list_decorate, {\n __argnames__ : {value: [\"ans\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_list_constructor(iterable) {\n var ans, iterator, result;\n if (iterable === undefined) {\n ans = [];\n } else if (ρσ_arraylike(iterable)) {\n ans = new Array(iterable.length);\n for (var i = 0; i < iterable.length; i++) {\n ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i] = iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i];\n }\n } else if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n ans = ρσ_list_decorate([]);\n result = iterator.next();\n while (!result.done) {\n ans.push(result.value);\n result = iterator.next();\n }\n } else if (typeof iterable === \"number\") {\n ans = new Array(iterable);\n } else {\n ans = Object.keys(iterable);\n }\n return ρσ_list_decorate(ans);\n};\nif (!ρσ_list_constructor.__argnames__) Object.defineProperties(ρσ_list_constructor, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_list_constructor.__name__ = \"list\";\nvar list = ρσ_list_constructor, list_wrap = ρσ_list_decorate;\nfunction sorted() {\n var iterable = ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true) ? undefined : arguments[0];\n var key = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? sorted.__defaults__.key : arguments[1];\n var reverse = (arguments[2] === undefined || ( 2 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? sorted.__defaults__.reverse : arguments[2];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"key\")){\n key = ρσ_kwargs_obj.key;\n }\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"reverse\")){\n reverse = ρσ_kwargs_obj.reverse;\n }\n var ans;\n ans = ρσ_list_constructor(iterable);\n ans.pysort(key, reverse);\n return ans;\n};\nif (!sorted.__defaults__) Object.defineProperties(sorted, {\n __defaults__ : {value: {key:null, reverse:false}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"iterable\", \"key\", \"reverse\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar ρσ_global_object_id = 0, ρσ_set_implementation;\nfunction ρσ_set_keyfor(x) {\n var t, ans;\n t = typeof x;\n if (t === \"string\" || t === \"number\" || t === \"boolean\") {\n return \"_\" + t[0] + x;\n }\n if (x === null) {\n return \"__!@#$0\";\n }\n ans = x.ρσ_hash_key_prop;\n if (ans === undefined) {\n ans = \"_!@#$\" + (++ρσ_global_object_id);\n Object.defineProperty(x, \"ρσ_hash_key_prop\", (function(){\n var ρσ_d = {};\n ρσ_d[\"value\"] = ans;\n return ρσ_d;\n }).call(this));\n }\n return ans;\n};\nif (!ρσ_set_keyfor.__argnames__) Object.defineProperties(ρσ_set_keyfor, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_set_polyfill() {\n this._store = {};\n this.size = 0;\n};\nif (!ρσ_set_polyfill.__module__) Object.defineProperties(ρσ_set_polyfill, {\n __module__ : {value: \"__main__\"}\n});\n\nρσ_set_polyfill.prototype.add = (function() {\n var ρσ_anonfunc = function (x) {\n var key;\n key = ρσ_set_keyfor(x);\n if (!Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size += 1;\n (ρσ_expr_temp = this._store)[(typeof key === \"number\" && key < 0) ? ρσ_expr_temp.length + key : key] = x;\n }\n return this;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.clear = (function() {\n var ρσ_anonfunc = function (x) {\n this._store = {};\n this.size = 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.delete = (function() {\n var ρσ_anonfunc = function (x) {\n var key;\n key = ρσ_set_keyfor(x);\n if (Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size -= 1;\n delete this._store[key];\n return true;\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.has = (function() {\n var ρσ_anonfunc = function (x) {\n return Object.prototype.hasOwnProperty.call(this._store, ρσ_set_keyfor(x));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set_polyfill.prototype.values = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nif (typeof Set !== \"function\" || typeof Set.prototype.delete !== \"function\") {\n ρσ_set_implementation = ρσ_set_polyfill;\n} else {\n ρσ_set_implementation = Set;\n}\nfunction ρσ_set(iterable) {\n var ans, s, iterator, result, keys;\n if (this instanceof ρσ_set) {\n this.jsset = new ρσ_set_implementation;\n ans = this;\n if (iterable === undefined) {\n return ans;\n }\n s = ans.jsset;\n if (ρσ_arraylike(iterable)) {\n for (var i = 0; i < iterable.length; i++) {\n s.add(iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i]);\n }\n } else if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done) {\n s.add(result.value);\n result = iterator.next();\n }\n } else {\n keys = Object.keys(iterable);\n for (var j=0; j < keys.length; j++) {\n s.add(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j]);\n }\n }\n return ans;\n } else {\n return new ρσ_set(iterable);\n }\n};\nif (!ρσ_set.__argnames__) Object.defineProperties(ρσ_set, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_set.prototype.__name__ = \"set\";\nObject.defineProperties(ρσ_set.prototype, (function(){\n var ρσ_d = {};\n ρσ_d[\"length\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n ρσ_d[\"size\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n return ρσ_d;\n}).call(this));\nρσ_set.prototype.__len__ = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.has = ρσ_set.prototype.__contains__ = (function() {\n var ρσ_anonfunc = function (x) {\n return this.jsset.has(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.add = (function() {\n var ρσ_anonfunc = function (x) {\n this.jsset.add(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.clear = (function() {\n var ρσ_anonfunc = function () {\n this.jsset.clear();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.copy = (function() {\n var ρσ_anonfunc = function () {\n return ρσ_set(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.discard = (function() {\n var ρσ_anonfunc = function (x) {\n this.jsset.delete(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsset.values();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.difference = (function() {\n var ρσ_anonfunc = function () {\n var ans, s, iterator, r, x, has;\n ans = new ρσ_set;\n s = ans.jsset;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n has = false;\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n has = true;\n break;\n }\n }\n if (!has) {\n s.add(x);\n }\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.difference_update = (function() {\n var ρσ_anonfunc = function () {\n var s, remove, iterator, r, x;\n s = this.jsset;\n remove = [];\n iterator = s.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n for (var i = 0; i < arguments.length; i++) {\n if (arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n remove.push(x);\n break;\n }\n }\n r = iterator.next();\n }\n for (var j = 0; j < remove.length; j++) {\n s.delete(remove[(typeof j === \"number\" && j < 0) ? remove.length + j : j]);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.intersection = (function() {\n var ρσ_anonfunc = function () {\n var ans, s, iterator, r, x, has;\n ans = new ρσ_set;\n s = ans.jsset;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n has = true;\n for (var i = 0; i < arguments.length; i++) {\n if (!arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n has = false;\n break;\n }\n }\n if (has) {\n s.add(x);\n }\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.intersection_update = (function() {\n var ρσ_anonfunc = function () {\n var s, remove, iterator, r, x;\n s = this.jsset;\n remove = [];\n iterator = s.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n for (var i = 0; i < arguments.length; i++) {\n if (!arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i].has(x)) {\n remove.push(x);\n break;\n }\n }\n r = iterator.next();\n }\n for (var j = 0; j < remove.length; j++) {\n s.delete(remove[(typeof j === \"number\" && j < 0) ? remove.length + j : j]);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.isdisjoint = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r, x;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n if (other.has(x)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.issubset = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r, x;\n iterator = this.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n if (!other.has(x)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.issuperset = (function() {\n var ρσ_anonfunc = function (other) {\n var s, iterator, r, x;\n s = this.jsset;\n iterator = other.jsset.values();\n r = iterator.next();\n while (!r.done) {\n x = r.value;\n if (!s.has(x)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.pop = (function() {\n var ρσ_anonfunc = function () {\n var iterator, r;\n iterator = this.jsset.values();\n r = iterator.next();\n if (r.done) {\n throw new KeyError(\"pop from an empty set\");\n }\n this.jsset.delete(r.value);\n return r.value;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.remove = (function() {\n var ρσ_anonfunc = function (x) {\n if (!this.jsset.delete(x)) {\n throw new KeyError(x.toString());\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.symmetric_difference = (function() {\n var ρσ_anonfunc = function (other) {\n return this.union(other).difference(this.intersection(other));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.symmetric_difference_update = (function() {\n var ρσ_anonfunc = function (other) {\n var common;\n common = this.intersection(other);\n this.update(other);\n this.difference_update(common);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.union = (function() {\n var ρσ_anonfunc = function () {\n var ans;\n ans = ρσ_set(this);\n ans.update.apply(ans, arguments);\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.update = (function() {\n var ρσ_anonfunc = function () {\n var s, iterator, r;\n s = this.jsset;\n for (var i=0; i < arguments.length; i++) {\n iterator = arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i][ρσ_iterator_symbol]();\n r = iterator.next();\n while (!r.done) {\n s.add(r.value);\n r = iterator.next();\n }\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.toString = ρσ_set.prototype.__repr__ = ρσ_set.prototype.__str__ = ρσ_set.prototype.inspect = (function() {\n var ρσ_anonfunc = function () {\n return \"{\" + list(this).join(\", \") + \"}\";\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_set.prototype.__eq__ = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r;\n if (!other instanceof this.constructor) {\n return false;\n }\n if (other.size !== this.size) {\n return false;\n }\n if (other.size === 0) {\n return true;\n }\n iterator = other[ρσ_iterator_symbol]();\n r = iterator.next();\n while (!r.done) {\n if (!this.has(r.value)) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nfunction ρσ_set_wrap(x) {\n var ans;\n ans = new ρσ_set;\n ans.jsset = x;\n return ans;\n};\nif (!ρσ_set_wrap.__argnames__) Object.defineProperties(ρσ_set_wrap, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar set = ρσ_set, set_wrap = ρσ_set_wrap;\nvar ρσ_dict_implementation;\nfunction ρσ_dict_polyfill() {\n this._store = {};\n this.size = 0;\n};\nif (!ρσ_dict_polyfill.__module__) Object.defineProperties(ρσ_dict_polyfill, {\n __module__ : {value: \"__main__\"}\n});\n\nρσ_dict_polyfill.prototype.set = (function() {\n var ρσ_anonfunc = function (x, value) {\n var key;\n key = ρσ_set_keyfor(x);\n if (!Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size += 1;\n }\n (ρσ_expr_temp = this._store)[(typeof key === \"number\" && key < 0) ? ρσ_expr_temp.length + key : key] = [x, value];\n return this;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\", \"value\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.clear = (function() {\n var ρσ_anonfunc = function (x) {\n this._store = {};\n this.size = 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.delete = (function() {\n var ρσ_anonfunc = function (x) {\n var key;\n key = ρσ_set_keyfor(x);\n if (Object.prototype.hasOwnProperty.call(this._store, key)) {\n this.size -= 1;\n delete this._store[key];\n return true;\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.has = (function() {\n var ρσ_anonfunc = function (x) {\n return Object.prototype.hasOwnProperty.call(this._store, ρσ_set_keyfor(x));\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.get = (function() {\n var ρσ_anonfunc = function (x) {\n try {\n return (ρσ_expr_temp = this._store)[ρσ_bound_index(ρσ_set_keyfor(x), ρσ_expr_temp)][1];\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof TypeError) {\n return undefined;\n } else {\n throw ρσ_Exception;\n }\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.values = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]][1]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.keys = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]][0]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict_polyfill.prototype.entries = (function() {\n var ρσ_anonfunc = function (x) {\n var ans;\n ans = {'_keys': Object.keys(this._store), '_i':-1, '_s':this._store};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n this._i += 1;\n if (this._i >= this._keys.length) {\n return {'done': true};\n }\n return {'done':false, 'value':this._s[this._keys[this._i]]};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nif (typeof Map !== \"function\" || typeof Map.prototype.delete !== \"function\") {\n ρσ_dict_implementation = ρσ_dict_polyfill;\n} else {\n ρσ_dict_implementation = Map;\n}\nfunction ρσ_dict() {\n var iterable = ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true) ? undefined : arguments[0];\n var kw = arguments[arguments.length-1];\n if (kw === null || typeof kw !== \"object\" || kw [ρσ_kwargs_symbol] !== true) kw = {};\n if (this instanceof ρσ_dict) {\n this.jsmap = new ρσ_dict_implementation;\n if (iterable !== undefined) {\n this.update(iterable);\n }\n this.update(kw);\n return this;\n } else {\n return ρσ_interpolate_kwargs_constructor.call(Object.create(ρσ_dict.prototype), false, ρσ_dict, [iterable].concat([ρσ_desugar_kwargs(kw)]));\n }\n};\nif (!ρσ_dict.__handles_kwarg_interpolation__) Object.defineProperties(ρσ_dict, {\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_dict.prototype.__name__ = \"dict\";\nObject.defineProperties(ρσ_dict.prototype, (function(){\n var ρσ_d = {};\n ρσ_d[\"length\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n ρσ_d[\"size\"] = (function(){\n var ρσ_d = {};\n ρσ_d[\"get\"] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n return ρσ_d;\n}).call(this));\nρσ_dict.prototype.__len__ = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.size;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.has = ρσ_dict.prototype.__contains__ = (function() {\n var ρσ_anonfunc = function (x) {\n return this.jsmap.has(x);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.set = ρσ_dict.prototype.__setitem__ = (function() {\n var ρσ_anonfunc = function (key, value) {\n this.jsmap.set(key, value);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"value\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.__delitem__ = (function() {\n var ρσ_anonfunc = function (key) {\n this.jsmap.delete(key);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.clear = (function() {\n var ρσ_anonfunc = function () {\n this.jsmap.clear();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.copy = (function() {\n var ρσ_anonfunc = function () {\n return ρσ_dict(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.keys = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.keys();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.values = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.values();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.items = ρσ_dict.prototype.entries = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.entries();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this.jsmap.keys();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.__getitem__ = (function() {\n var ρσ_anonfunc = function (key) {\n var ans;\n ans = this.jsmap.get(key);\n if (ans === undefined && !this.jsmap.has(key)) {\n throw new KeyError(key + \"\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.get = (function() {\n var ρσ_anonfunc = function (key, defval) {\n var ans;\n ans = this.jsmap.get(key);\n if (ans === undefined && !this.jsmap.has(key)) {\n return (defval === undefined) ? null : defval;\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.set_default = (function() {\n var ρσ_anonfunc = function (key, defval) {\n var j;\n j = this.jsmap;\n if (!j.has(key)) {\n j.set(key, defval);\n return defval;\n }\n return j.get(key);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.fromkeys = ρσ_dict.prototype.fromkeys = (function() {\n var ρσ_anonfunc = function () {\n var iterable = ( 0 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true) ? undefined : arguments[0];\n var value = (arguments[1] === undefined || ( 1 === arguments.length-1 && arguments[arguments.length-1] !== null && typeof arguments[arguments.length-1] === \"object\" && arguments[arguments.length-1] [ρσ_kwargs_symbol] === true)) ? ρσ_anonfunc.__defaults__.value : arguments[1];\n var ρσ_kwargs_obj = arguments[arguments.length-1];\n if (ρσ_kwargs_obj === null || typeof ρσ_kwargs_obj !== \"object\" || ρσ_kwargs_obj [ρσ_kwargs_symbol] !== true) ρσ_kwargs_obj = {};\n if (Object.prototype.hasOwnProperty.call(ρσ_kwargs_obj, \"value\")){\n value = ρσ_kwargs_obj.value;\n }\n var ans, iterator, r;\n ans = ρσ_dict();\n iterator = iter(iterable);\n r = iterator.next();\n while (!r.done) {\n ans.set(r.value, value);\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__defaults__) Object.defineProperties(ρσ_anonfunc, {\n __defaults__ : {value: {value:null}},\n __handles_kwarg_interpolation__ : {value: true},\n __argnames__ : {value: [\"iterable\", \"value\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.pop = (function() {\n var ρσ_anonfunc = function (key, defval) {\n var ans;\n ans = this.jsmap.get(key);\n if (ans === undefined && !this.jsmap.has(key)) {\n if (defval === undefined) {\n throw new KeyError(key);\n }\n return defval;\n }\n this.jsmap.delete(key);\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"key\", \"defval\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.popitem = (function() {\n var ρσ_anonfunc = function () {\n var last, e, r;\n last = null;\n e = this.jsmap.entries();\n while (true) {\n r = e.next();\n if (r.done) {\n if (last === null) {\n throw new KeyError(\"dict is empty\");\n }\n this.jsmap.delete(last.value[0]);\n return last.value;\n }\n last = r;\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.update = (function() {\n var ρσ_anonfunc = function () {\n var m, iterable, iterator, result, keys;\n if (arguments.length === 0) {\n return;\n }\n m = this.jsmap;\n iterable = arguments[0];\n if (Array.isArray(iterable)) {\n for (var i = 0; i < iterable.length; i++) {\n m.set(iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i][0], iterable[(typeof i === \"number\" && i < 0) ? iterable.length + i : i][1]);\n }\n } else if (iterable instanceof ρσ_dict) {\n iterator = iterable.items();\n result = iterator.next();\n while (!result.done) {\n m.set(result.value[0], result.value[1]);\n result = iterator.next();\n }\n } else if (typeof Map === \"function\" && iterable instanceof Map) {\n iterator = iterable.entries();\n result = iterator.next();\n while (!result.done) {\n m.set(result.value[0], result.value[1]);\n result = iterator.next();\n }\n } else if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done) {\n m.set(result.value[0], result.value[1]);\n result = iterator.next();\n }\n } else {\n keys = Object.keys(iterable);\n for (var j=0; j < keys.length; j++) {\n if (keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j] !== ρσ_iterator_symbol) {\n m.set(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], iterable[ρσ_bound_index(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], iterable)]);\n }\n }\n }\n if (arguments.length > 1) {\n ρσ_dict.prototype.update.call(this, arguments[1]);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.toString = ρσ_dict.prototype.inspect = ρσ_dict.prototype.__str__ = ρσ_dict.prototype.__repr__ = (function() {\n var ρσ_anonfunc = function () {\n var entries, iterator, r;\n entries = [];\n iterator = this.jsmap.entries();\n r = iterator.next();\n while (!r.done) {\n entries.push(ρσ_repr(r.value[0]) + \": \" + ρσ_repr(r.value[1]));\n r = iterator.next();\n }\n return \"{\" + entries.join(\", \") + \"}\";\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.__eq__ = (function() {\n var ρσ_anonfunc = function (other) {\n var iterator, r, x;\n if (!(other instanceof this.constructor)) {\n return false;\n }\n if (other.size !== this.size) {\n return false;\n }\n if (other.size === 0) {\n return true;\n }\n iterator = other.items();\n r = iterator.next();\n while (!r.done) {\n x = this.jsmap.get(r.value[0]);\n if (x === undefined && !this.jsmap.has(r.value[0]) || x !== r.value[1]) {\n return false;\n }\n r = iterator.next();\n }\n return true;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_dict.prototype.as_object = (function() {\n var ρσ_anonfunc = function (other) {\n var ans, iterator, r;\n ans = {};\n iterator = this.jsmap.entries();\n r = iterator.next();\n while (!r.done) {\n ans[ρσ_bound_index(r.value[0], ans)] = r.value[1];\n r = iterator.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"other\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nfunction ρσ_dict_wrap(x) {\n var ans;\n ans = new ρσ_dict;\n ans.jsmap = x;\n return ans;\n};\nif (!ρσ_dict_wrap.__argnames__) Object.defineProperties(ρσ_dict_wrap, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nvar dict = ρσ_dict, dict_wrap = ρσ_dict_wrap;// }}}\nvar NameError;\nNameError = ReferenceError;\nfunction Exception() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n Exception.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(Exception, Error);\nException.prototype.__init__ = function __init__(message) {\n var self = this;\n self.message = message;\n self.stack = (new Error).stack;\n self.name = self.constructor.name;\n};\nif (!Exception.prototype.__init__.__argnames__) Object.defineProperties(Exception.prototype.__init__, {\n __argnames__ : {value: [\"message\"]},\n __module__ : {value: \"__main__\"}\n});\nException.__argnames__ = Exception.prototype.__init__.__argnames__;\nException.__handles_kwarg_interpolation__ = Exception.prototype.__init__.__handles_kwarg_interpolation__;\nException.prototype.__repr__ = function __repr__() {\n var self = this;\n return self.name + \": \" + self.message;\n};\nif (!Exception.prototype.__repr__.__module__) Object.defineProperties(Exception.prototype.__repr__, {\n __module__ : {value: \"__main__\"}\n});\nException.prototype.__str__ = function __str__ () {\n if(Error.prototype.__str__) return Error.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(Exception.prototype, \"__bases__\", {value: [Error]});\n\nfunction AttributeError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AttributeError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(AttributeError, Exception);\nAttributeError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nAttributeError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nAttributeError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(AttributeError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction IndexError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n IndexError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(IndexError, Exception);\nIndexError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nIndexError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nIndexError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(IndexError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction KeyError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n KeyError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(KeyError, Exception);\nKeyError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nKeyError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nKeyError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(KeyError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction ValueError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n ValueError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(ValueError, Exception);\nValueError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nValueError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nValueError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(ValueError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction UnicodeDecodeError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n UnicodeDecodeError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(UnicodeDecodeError, Exception);\nUnicodeDecodeError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nUnicodeDecodeError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nUnicodeDecodeError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(UnicodeDecodeError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction AssertionError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n AssertionError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(AssertionError, Exception);\nAssertionError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nAssertionError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nAssertionError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(AssertionError.prototype, \"__bases__\", {value: [Exception]});\n\n\nfunction ZeroDivisionError() {\n if (this.ρσ_object_id === undefined) Object.defineProperty(this, \"ρσ_object_id\", {\"value\":++ρσ_object_counter});\n ZeroDivisionError.prototype.__init__.apply(this, arguments);\n}\nρσ_extends(ZeroDivisionError, Exception);\nZeroDivisionError.prototype.__init__ = function __init__ () {\n Exception.prototype.__init__ && Exception.prototype.__init__.apply(this, arguments);\n};\nZeroDivisionError.prototype.__repr__ = function __repr__ () {\n if(Exception.prototype.__repr__) return Exception.prototype.__repr__.call(this);\n return \"<\" + __name__ + \".\" + this.constructor.name + \" #\" + this.ρσ_object_id + \">\";\n};\nZeroDivisionError.prototype.__str__ = function __str__ () {\n if(Exception.prototype.__str__) return Exception.prototype.__str__.call(this);\nreturn this.__repr__();\n};\nObject.defineProperty(ZeroDivisionError.prototype, \"__bases__\", {value: [Exception]});\n\nvar ρσ_in, ρσ_desugar_kwargs, ρσ_exists;\nfunction ρσ_eslice(arr, step, start, end) {\n var is_string;\n if (typeof arr === \"string\" || arr instanceof String) {\n is_string = true;\n arr = arr.split(\"\");\n }\n if (step < 0) {\n step = -step;\n arr = arr.slice().reverse();\n if (typeof start !== \"undefined\") {\n start = arr.length - start - 1;\n }\n if (typeof end !== \"undefined\") {\n end = arr.length - end - 1;\n }\n }\n if (typeof start === \"undefined\") {\n start = 0;\n }\n if (typeof end === \"undefined\") {\n end = arr.length;\n }\n arr = arr.slice(start, end).filter((function() {\n var ρσ_anonfunc = function (e, i) {\n return i % step === 0;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"e\", \"i\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })());\n if (is_string) {\n arr = arr.join(\"\");\n }\n return arr;\n};\nif (!ρσ_eslice.__argnames__) Object.defineProperties(ρσ_eslice, {\n __argnames__ : {value: [\"arr\", \"step\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_delslice(arr, step, start, end) {\n var is_string, ρσ_unpack, indices;\n if (typeof arr === \"string\" || arr instanceof String) {\n is_string = true;\n arr = arr.split(\"\");\n }\n if (step < 0) {\n if (typeof start === \"undefined\") {\n start = arr.length;\n }\n if (typeof end === \"undefined\") {\n end = 0;\n }\n ρσ_unpack = [end, start, -step];\n start = ρσ_unpack[0];\n end = ρσ_unpack[1];\n step = ρσ_unpack[2];\n }\n if (typeof start === \"undefined\") {\n start = 0;\n }\n if (typeof end === \"undefined\") {\n end = arr.length;\n }\n if (step === 1) {\n arr.splice(start, end - start);\n } else {\n if (end > start) {\n indices = [];\n for (var i = start; i < end; i += step) {\n indices.push(i);\n }\n for (var i = indices.length - 1; i >= 0; i--) {\n arr.splice(indices[(typeof i === \"number\" && i < 0) ? indices.length + i : i], 1);\n }\n }\n }\n if (is_string) {\n arr = arr.join(\"\");\n }\n return arr;\n};\nif (!ρσ_delslice.__argnames__) Object.defineProperties(ρσ_delslice, {\n __argnames__ : {value: [\"arr\", \"step\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_flatten(arr) {\n var ans, value;\n ans = ρσ_list_decorate([]);\n for (var i=0; i < arr.length; i++) {\n value = arr[(typeof i === \"number\" && i < 0) ? arr.length + i : i];\n if (Array.isArray(value)) {\n ans = ans.concat(ρσ_flatten(value));\n } else {\n ans.push(value);\n }\n }\n return ans;\n};\nif (!ρσ_flatten.__argnames__) Object.defineProperties(ρσ_flatten, {\n __argnames__ : {value: [\"arr\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_unpack_asarray(num, iterable) {\n var ans, iterator, result;\n if (ρσ_arraylike(iterable)) {\n return iterable;\n }\n ans = [];\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n result = iterator.next();\n while (!result.done && ans.length < num) {\n ans.push(result.value);\n result = iterator.next();\n }\n }\n return ans;\n};\nif (!ρσ_unpack_asarray.__argnames__) Object.defineProperties(ρσ_unpack_asarray, {\n __argnames__ : {value: [\"num\", \"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_extends(child, parent) {\n child.prototype = Object.create(parent.prototype);\n child.prototype.constructor = child;\n};\nif (!ρσ_extends.__argnames__) Object.defineProperties(ρσ_extends, {\n __argnames__ : {value: [\"child\", \"parent\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_in = (function() {\n var ρσ_anonfunc = function () {\n if (typeof Map === \"function\" && typeof Set === \"function\") {\n return (function() {\n var ρσ_anonfunc = function (val, arr) {\n if (typeof arr === \"string\") {\n return arr.indexOf(val) !== -1;\n }\n if (typeof arr.__contains__ === \"function\") {\n return arr.__contains__(val);\n }\n if (arr instanceof Map || arr instanceof Set) {\n return arr.has(val);\n }\n if (ρσ_arraylike(arr)) {\n return ρσ_list_contains.call(arr, val);\n }\n return Object.prototype.hasOwnProperty.call(arr, val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\", \"arr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n }\n return (function() {\n var ρσ_anonfunc = function (val, arr) {\n if (typeof arr === \"string\") {\n return arr.indexOf(val) !== -1;\n }\n if (typeof arr.__contains__ === \"function\") {\n return arr.__contains__(val);\n }\n if (ρσ_arraylike(arr)) {\n return ρσ_list_contains.call(arr, val);\n }\n return Object.prototype.hasOwnProperty.call(arr, val);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"val\", \"arr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})()();\nfunction ρσ_Iterable(iterable) {\n var iterator, ans, result;\n if (ρσ_arraylike(iterable)) {\n return iterable;\n }\n if (typeof iterable[ρσ_iterator_symbol] === \"function\") {\n iterator = (typeof Map === \"function\" && iterable instanceof Map) ? iterable.keys() : iterable[ρσ_iterator_symbol]();\n ans = ρσ_list_decorate([]);\n result = iterator.next();\n while (!result.done) {\n ans.push(result.value);\n result = iterator.next();\n }\n return ans;\n }\n return Object.keys(iterable);\n};\nif (!ρσ_Iterable.__argnames__) Object.defineProperties(ρσ_Iterable, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_desugar_kwargs = (function() {\n var ρσ_anonfunc = function () {\n if (typeof Object.assign === \"function\") {\n return (function() {\n var ρσ_anonfunc = function () {\n var ans;\n ans = Object.create(null);\n ans[ρσ_kwargs_symbol] = true;\n for (var i = 0; i < arguments.length; i++) {\n Object.assign(ans, arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n }\n return (function() {\n var ρσ_anonfunc = function () {\n var ans, keys;\n ans = Object.create(null);\n ans[ρσ_kwargs_symbol] = true;\n for (var i = 0; i < arguments.length; i++) {\n keys = Object.keys(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n for (var j = 0; j < keys.length; j++) {\n ans[ρσ_bound_index(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], ans)] = (ρσ_expr_temp = arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i])[ρσ_bound_index(keys[(typeof j === \"number\" && j < 0) ? keys.length + j : j], ρσ_expr_temp)];\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})()();\nfunction ρσ_interpolate_kwargs(f, supplied_args) {\n var has_prop, kwobj, args, prop;\n if (!f.__argnames__) {\n return f.apply(this, supplied_args);\n }\n has_prop = Object.prototype.hasOwnProperty;\n kwobj = supplied_args.pop();\n if (f.__handles_kwarg_interpolation__) {\n args = new Array(Math.max(supplied_args.length, f.__argnames__.length) + 1);\n args[args.length-1] = kwobj;\n for (var i = 0; i < args.length - 1; i++) {\n if (i < f.__argnames__.length) {\n prop = (ρσ_expr_temp = f.__argnames__)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n if (has_prop.call(kwobj, prop)) {\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = kwobj[(typeof prop === \"number\" && prop < 0) ? kwobj.length + prop : prop];\n delete kwobj[prop];\n } else if (i < supplied_args.length) {\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = supplied_args[(typeof i === \"number\" && i < 0) ? supplied_args.length + i : i];\n }\n } else {\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = supplied_args[(typeof i === \"number\" && i < 0) ? supplied_args.length + i : i];\n }\n }\n return f.apply(this, args);\n }\n for (var i = 0; i < f.__argnames__.length; i++) {\n prop = (ρσ_expr_temp = f.__argnames__)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n if (has_prop.call(kwobj, prop)) {\n supplied_args[(typeof i === \"number\" && i < 0) ? supplied_args.length + i : i] = kwobj[(typeof prop === \"number\" && prop < 0) ? kwobj.length + prop : prop];\n }\n }\n return f.apply(this, supplied_args);\n};\nif (!ρσ_interpolate_kwargs.__argnames__) Object.defineProperties(ρσ_interpolate_kwargs, {\n __argnames__ : {value: [\"f\", \"supplied_args\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_interpolate_kwargs_constructor(apply, f, supplied_args) {\n if (apply) {\n f.apply(this, supplied_args);\n } else {\n ρσ_interpolate_kwargs.call(this, f, supplied_args);\n }\n return this;\n};\nif (!ρσ_interpolate_kwargs_constructor.__argnames__) Object.defineProperties(ρσ_interpolate_kwargs_constructor, {\n __argnames__ : {value: [\"apply\", \"f\", \"supplied_args\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_getitem(obj, key) {\n if (obj.__getitem__) {\n return obj.__getitem__(key);\n }\n if (typeof key === \"number\" && key < 0) {\n key += obj.length;\n }\n return obj[(typeof key === \"number\" && key < 0) ? obj.length + key : key];\n};\nif (!ρσ_getitem.__argnames__) Object.defineProperties(ρσ_getitem, {\n __argnames__ : {value: [\"obj\", \"key\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_setitem(obj, key, val) {\n if (obj.__setitem__) {\n obj.__setitem__(key, val);\n } else {\n if (typeof key === \"number\" && key < 0) {\n key += obj.length;\n }\n obj[(typeof key === \"number\" && key < 0) ? obj.length + key : key] = val;\n }\n};\nif (!ρσ_setitem.__argnames__) Object.defineProperties(ρσ_setitem, {\n __argnames__ : {value: [\"obj\", \"key\", \"val\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_delitem(obj, key) {\n if (obj.__delitem__) {\n obj.__delitem__(key);\n } else if (typeof obj.splice === \"function\") {\n obj.splice(key, 1);\n } else {\n if (typeof key === \"number\" && key < 0) {\n key += obj.length;\n }\n delete obj[key];\n }\n};\nif (!ρσ_delitem.__argnames__) Object.defineProperties(ρσ_delitem, {\n __argnames__ : {value: [\"obj\", \"key\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_bound_index(idx, arr) {\n if (typeof idx === \"number\" && idx < 0) {\n idx += arr.length;\n }\n return idx;\n};\nif (!ρσ_bound_index.__argnames__) Object.defineProperties(ρσ_bound_index, {\n __argnames__ : {value: [\"idx\", \"arr\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_splice(arr, val, start, end) {\n start = start || 0;\n if (start < 0) {\n start += arr.length;\n }\n if (end === undefined) {\n end = arr.length;\n }\n if (end < 0) {\n end += arr.length;\n }\n Array.prototype.splice.apply(arr, [start, end - start].concat(val));\n};\nif (!ρσ_splice.__argnames__) Object.defineProperties(ρσ_splice, {\n __argnames__ : {value: [\"arr\", \"val\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n});\n\nρσ_exists = (function(){\n var ρσ_d = {};\n ρσ_d[\"n\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n return expr !== undefined && expr !== null;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"d\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n if (expr === undefined || expr === null) {\n return Object.create(null);\n }\n return expr;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"c\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n if (typeof expr === \"function\") {\n return expr;\n }\n return (function() {\n var ρσ_anonfunc = function () {\n return undefined;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"g\"] = (function() {\n var ρσ_anonfunc = function (expr) {\n if (expr === undefined || expr === null || typeof expr.__getitem__ !== \"function\") {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"__getitem__\"] = (function() {\n var ρσ_anonfunc = function () {\n return undefined;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"e\"] = (function() {\n var ρσ_anonfunc = function (expr, alt) {\n return (expr === undefined || expr === null) ? alt : expr;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"expr\", \"alt\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n}).call(this);\nfunction ρσ_mixin() {\n var seen, resolved_props, p, target, props, name;\n seen = Object.create(null);\n seen.__argnames__ = seen.__handles_kwarg_interpolation__ = seen.__init__ = seen.__annotations__ = seen.__doc__ = seen.__bind_methods__ = seen.__bases__ = seen.constructor = seen.__class__ = true;\n resolved_props = {};\n p = target = arguments[0].prototype;\n while (p && p !== Object.prototype) {\n props = Object.getOwnPropertyNames(p);\n for (var i = 0; i < props.length; i++) {\n seen[ρσ_bound_index(props[(typeof i === \"number\" && i < 0) ? props.length + i : i], seen)] = true;\n }\n p = Object.getPrototypeOf(p);\n }\n for (var c = 1; c < arguments.length; c++) {\n p = arguments[(typeof c === \"number\" && c < 0) ? arguments.length + c : c].prototype;\n while (p && p !== Object.prototype) {\n props = Object.getOwnPropertyNames(p);\n for (var i = 0; i < props.length; i++) {\n name = props[(typeof i === \"number\" && i < 0) ? props.length + i : i];\n if (seen[(typeof name === \"number\" && name < 0) ? seen.length + name : name]) {\n continue;\n }\n seen[(typeof name === \"number\" && name < 0) ? seen.length + name : name] = true;\n resolved_props[(typeof name === \"number\" && name < 0) ? resolved_props.length + name : name] = Object.getOwnPropertyDescriptor(p, name);\n }\n p = Object.getPrototypeOf(p);\n }\n }\n Object.defineProperties(target, resolved_props);\n};\nif (!ρσ_mixin.__module__) Object.defineProperties(ρσ_mixin, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_instanceof() {\n var obj, bases, q, cls, p;\n obj = arguments[0];\n bases = \"\";\n if (obj && obj.constructor && obj.constructor.prototype) {\n bases = obj.constructor.prototype.__bases__ || \"\";\n }\n for (var i = 1; i < arguments.length; i++) {\n q = arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i];\n if (obj instanceof q) {\n return true;\n }\n if ((q === Array || q === ρσ_list_constructor) && Array.isArray(obj)) {\n return true;\n }\n if (q === ρσ_str && (typeof obj === \"string\" || obj instanceof String)) {\n return true;\n }\n if (q === ρσ_int && typeof obj === \"number\" && Number.isInteger(obj)) {\n return true;\n }\n if (q === ρσ_float && typeof obj === \"number\" && !Number.isInteger(obj)) {\n return true;\n }\n if (bases.length > 1) {\n for (var c = 1; c < bases.length; c++) {\n cls = bases[(typeof c === \"number\" && c < 0) ? bases.length + c : c];\n while (cls) {\n if (q === cls) {\n return true;\n }\n p = Object.getPrototypeOf(cls.prototype);\n if (!p) {\n break;\n }\n cls = p.constructor;\n }\n }\n }\n }\n return false;\n};\nif (!ρσ_instanceof.__module__) Object.defineProperties(ρσ_instanceof, {\n __module__ : {value: \"__main__\"}\n});\nfunction sum(iterable, start) {\n var ans, iterator, r;\n if (Array.isArray(iterable)) {\n return iterable.reduce((function() {\n var ρσ_anonfunc = function (prev, cur) {\n return prev + cur;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"prev\", \"cur\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })(), start || 0);\n }\n ans = start || 0;\n iterator = iter(iterable);\n r = iterator.next();\n while (!r.done) {\n ans += r.value;\n r = iterator.next();\n }\n return ans;\n};\nif (!sum.__argnames__) Object.defineProperties(sum, {\n __argnames__ : {value: [\"iterable\", \"start\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction map() {\n var iterators, func, args, ans;\n iterators = new Array(arguments.length - 1);\n func = arguments[0];\n args = new Array(arguments.length - 1);\n for (var i = 1; i < arguments.length; i++) {\n iterators[ρσ_bound_index(i - 1, iterators)] = iter(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n }\n ans = {'_func':func, '_iterators':iterators, '_args':args};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var r;\n for (var i = 0; i < this._iterators.length; i++) {\n r = (ρσ_expr_temp = this._iterators)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].next();\n if (r.done) {\n return {'done':true};\n }\n (ρσ_expr_temp = this._args)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i] = r.value;\n }\n return {'done':false, 'value':this._func.apply(undefined, this._args)};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n};\nif (!map.__module__) Object.defineProperties(map, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction filter(func_or_none, iterable) {\n var func, ans;\n func = (func_or_none === null) ? ρσ_bool : func_or_none;\n ans = {'_func':func, '_iterator':ρσ_iter(iterable)};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var r;\n r = this._iterator.next();\n while (!r.done) {\n if (this._func(r.value)) {\n return r;\n }\n r = this._iterator.next();\n }\n return {'done':true};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n};\nif (!filter.__argnames__) Object.defineProperties(filter, {\n __argnames__ : {value: [\"func_or_none\", \"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction zip() {\n var iterators, ans;\n iterators = new Array(arguments.length);\n for (var i = 0; i < arguments.length; i++) {\n iterators[(typeof i === \"number\" && i < 0) ? iterators.length + i : i] = iter(arguments[(typeof i === \"number\" && i < 0) ? arguments.length + i : i]);\n }\n ans = {'_iterators':iterators};\n ans[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ans[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var args, r;\n args = new Array(this._iterators.length);\n for (var i = 0; i < this._iterators.length; i++) {\n r = (ρσ_expr_temp = this._iterators)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i].next();\n if (r.done) {\n return {'done':true};\n }\n args[(typeof i === \"number\" && i < 0) ? args.length + i : i] = r.value;\n }\n return {'done':false, 'value':args};\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ans;\n};\nif (!zip.__module__) Object.defineProperties(zip, {\n __module__ : {value: \"__main__\"}\n});\n\nfunction any(iterable) {\n var i;\n var ρσ_Iter0 = ρσ_Iterable(iterable);\n for (var ρσ_Index0 = 0; ρσ_Index0 < ρσ_Iter0.length; ρσ_Index0++) {\n i = ρσ_Iter0[ρσ_Index0];\n if (i) {\n return true;\n }\n }\n return false;\n};\nif (!any.__argnames__) Object.defineProperties(any, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction all(iterable) {\n var i;\n var ρσ_Iter1 = ρσ_Iterable(iterable);\n for (var ρσ_Index1 = 0; ρσ_Index1 < ρσ_Iter1.length; ρσ_Index1++) {\n i = ρσ_Iter1[ρσ_Index1];\n if (!i) {\n return false;\n }\n }\n return true;\n};\nif (!all.__argnames__) Object.defineProperties(all, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n});\nvar decimal_sep, define_str_func, ρσ_unpack, ρσ_orig_split, ρσ_orig_replace;\ndecimal_sep = 1.1.toLocaleString()[1];\nfunction ρσ_repr_js_builtin(x, as_array) {\n var ans, b, keys, key;\n ans = [];\n b = \"{}\";\n if (as_array) {\n b = \"[]\";\n for (var i = 0; i < x.length; i++) {\n ans.push(ρσ_repr(x[(typeof i === \"number\" && i < 0) ? x.length + i : i]));\n }\n } else {\n keys = Object.keys(x);\n for (var k = 0; k < keys.length; k++) {\n key = keys[(typeof k === \"number\" && k < 0) ? keys.length + k : k];\n ans.push(JSON.stringify(key) + \":\" + ρσ_repr(x[(typeof key === \"number\" && key < 0) ? x.length + key : key]));\n }\n }\n return b[0] + ans.join(\", \") + b[1];\n};\nif (!ρσ_repr_js_builtin.__argnames__) Object.defineProperties(ρσ_repr_js_builtin, {\n __argnames__ : {value: [\"x\", \"as_array\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_html_element_to_string(elem) {\n var attrs, val, attr, ans;\n attrs = [];\n var ρσ_Iter0 = ρσ_Iterable(elem.attributes);\n for (var ρσ_Index0 = 0; ρσ_Index0 < ρσ_Iter0.length; ρσ_Index0++) {\n attr = ρσ_Iter0[ρσ_Index0];\n if (attr.specified) {\n val = attr.value;\n if (val.length > 10) {\n val = val.slice(0, 15) + \"...\";\n }\n val = JSON.stringify(val);\n attrs.push(\"\" + ρσ_str.format(\"{}\", attr.name) + \"=\" + ρσ_str.format(\"{}\", val) + \"\");\n }\n }\n attrs = (attrs.length) ? \" \" + attrs.join(\" \") : \"\";\n ans = \"<\" + ρσ_str.format(\"{}\", elem.tagName) + \"\" + ρσ_str.format(\"{}\", attrs) + \">\";\n return ans;\n};\nif (!ρσ_html_element_to_string.__argnames__) Object.defineProperties(ρσ_html_element_to_string, {\n __argnames__ : {value: [\"elem\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_repr(x) {\n var ans, name;\n if (x === null) {\n return \"None\";\n }\n if (x === undefined) {\n return \"undefined\";\n }\n ans = x;\n if (typeof x.__repr__ === \"function\") {\n ans = x.__repr__();\n } else if (x === true || x === false) {\n ans = (x) ? \"True\" : \"False\";\n } else if (Array.isArray(x)) {\n ans = ρσ_repr_js_builtin(x, true);\n } else if (typeof x === \"function\") {\n ans = x.toString();\n } else if (typeof x === \"object\" && !x.toString) {\n ans = ρσ_repr_js_builtin(x);\n } else {\n name = Object.prototype.toString.call(x).slice(8, -1);\n if (ρσ_not_equals(\"Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".indexOf(name), -1)) {\n return name + \"([\" + x.map((function() {\n var ρσ_anonfunc = function (i) {\n return str.format(\"0x{:02x}\", i);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"i\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })()).join(\", \") + \"])\";\n }\n if (typeof HTMLElement !== \"undefined\" && x instanceof HTMLElement) {\n ans = ρσ_html_element_to_string(x);\n } else {\n ans = (typeof x.toString === \"function\") ? x.toString() : x;\n }\n if (ans === \"[object Object]\") {\n return ρσ_repr_js_builtin(x);\n }\n try {\n ans = JSON.stringify(x);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n } \n }\n }\n return ans + \"\";\n};\nif (!ρσ_repr.__argnames__) Object.defineProperties(ρσ_repr, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\nfunction ρσ_str(x) {\n var ans, name;\n if (x === null) {\n return \"None\";\n }\n if (x === undefined) {\n return \"undefined\";\n }\n ans = x;\n if (typeof x.__str__ === \"function\") {\n ans = x.__str__();\n } else if (typeof x.__repr__ === \"function\") {\n ans = x.__repr__();\n } else if (x === true || x === false) {\n ans = (x) ? \"True\" : \"False\";\n } else if (Array.isArray(x)) {\n ans = ρσ_repr_js_builtin(x, true);\n } else if (typeof x.toString === \"function\") {\n name = Object.prototype.toString.call(x).slice(8, -1);\n if (ρσ_not_equals(\"Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array\".indexOf(name), -1)) {\n return name + \"([\" + x.map((function() {\n var ρσ_anonfunc = function (i) {\n return str.format(\"0x{:02x}\", i);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"i\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })()).join(\", \") + \"])\";\n }\n if (typeof HTMLElement !== \"undefined\" && x instanceof HTMLElement) {\n ans = ρσ_html_element_to_string(x);\n } else {\n ans = x.toString();\n }\n if (ans === \"[object Object]\") {\n ans = ρσ_repr_js_builtin(x);\n }\n } else if (typeof x === \"object\" && !x.toString) {\n ans = ρσ_repr_js_builtin(x);\n }\n return ans + \"\";\n};\nif (!ρσ_str.__argnames__) Object.defineProperties(ρσ_str, {\n __argnames__ : {value: [\"x\"]},\n __module__ : {value: \"__main__\"}\n});\n\ndefine_str_func = (function() {\n var ρσ_anonfunc = function (name, func) {\n var f;\n (ρσ_expr_temp = ρσ_str.prototype)[(typeof name === \"number\" && name < 0) ? ρσ_expr_temp.length + name : name] = func;\n ρσ_str[(typeof name === \"number\" && name < 0) ? ρσ_str.length + name : name] = f = func.call.bind(func);\n if (func.__argnames__) {\n Object.defineProperty(f, \"__argnames__\", (function(){\n var ρσ_d = {};\n ρσ_d[\"value\"] = ['string'].concat(func.__argnames__);\n return ρσ_d;\n }).call(this));\n }\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"name\", \"func\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_unpack = [String.prototype.split.call.bind(String.prototype.split), String.prototype.replace.call.bind(String.prototype.replace)];\nρσ_orig_split = ρσ_unpack[0];\nρσ_orig_replace = ρσ_unpack[1];\ndefine_str_func(\"format\", (function() {\n var ρσ_anonfunc = function () {\n var template, args, kwargs, explicit, implicit, idx, split, ans, pos, in_brace, markup, ch;\n template = this;\n if (template === undefined) {\n throw new TypeError(\"Template is required\");\n }\n args = Array.prototype.slice.call(arguments);\n kwargs = {};\n if (args[args.length-1] && args[args.length-1][ρσ_kwargs_symbol] !== undefined) {\n kwargs = args[args.length-1];\n args = args.slice(0, -1);\n }\n explicit = implicit = false;\n idx = 0;\n split = ρσ_orig_split;\n if (ρσ_str.format._template_resolve_pat === undefined) {\n ρσ_str.format._template_resolve_pat = /[.\\[]/;\n }\n function resolve(arg, object) {\n var ρσ_unpack, first, key, rest, ans;\n if (!arg) {\n return object;\n }\n ρσ_unpack = [arg[0], arg.slice(1)];\n first = ρσ_unpack[0];\n arg = ρσ_unpack[1];\n key = split(arg, ρσ_str.format._template_resolve_pat, 1)[0];\n rest = arg.slice(key.length);\n ans = (first === \"[\") ? object[ρσ_bound_index(key.slice(0, -1), object)] : getattr(object, key);\n if (ans === undefined) {\n throw new KeyError((first === \"[\") ? key.slice(0, -1) : key);\n }\n return resolve(rest, ans);\n };\n if (!resolve.__argnames__) Object.defineProperties(resolve, {\n __argnames__ : {value: [\"arg\", \"object\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function resolve_format_spec(format_spec) {\n if (ρσ_str.format._template_resolve_fs_pat === undefined) {\n ρσ_str.format._template_resolve_fs_pat = /[{]([a-zA-Z0-9_]+)[}]/g;\n }\n return format_spec.replace(ρσ_str.format._template_resolve_fs_pat, (function() {\n var ρσ_anonfunc = function (match, key) {\n if (!Object.prototype.hasOwnProperty.call(kwargs, key)) {\n return \"\";\n }\n return \"\" + kwargs[(typeof key === \"number\" && key < 0) ? kwargs.length + key : key];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"match\", \"key\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })());\n };\n if (!resolve_format_spec.__argnames__) Object.defineProperties(resolve_format_spec, {\n __argnames__ : {value: [\"format_spec\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function set_comma(ans, comma) {\n var sep;\n if (comma !== \",\") {\n sep = 1234;\n sep = sep.toLocaleString(undefined, {useGrouping: true})[1];\n ans = str.replace(ans, sep, comma);\n }\n return ans;\n };\n if (!set_comma.__argnames__) Object.defineProperties(set_comma, {\n __argnames__ : {value: [\"ans\", \"comma\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function safe_comma(value, comma) {\n try {\n return set_comma(value.toLocaleString(undefined, {useGrouping: true}), comma);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n return value.toString(10);\n } \n }\n };\n if (!safe_comma.__argnames__) Object.defineProperties(safe_comma, {\n __argnames__ : {value: [\"value\", \"comma\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function safe_fixed(value, precision, comma) {\n if (!comma) {\n return value.toFixed(precision);\n }\n try {\n return set_comma(value.toLocaleString(undefined, {useGrouping: true, minimumFractionDigits: precision, maximumFractionDigits: precision}), comma);\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n {\n return value.toFixed(precision);\n } \n }\n };\n if (!safe_fixed.__argnames__) Object.defineProperties(safe_fixed, {\n __argnames__ : {value: [\"value\", \"precision\", \"comma\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function apply_formatting(value, format_spec) {\n var ρσ_unpack, fill, align, sign, fhash, zeropad, width, comma, precision, ftype, is_numeric, is_int, lftype, code, prec, exp, nval, is_positive, left, right;\n if (format_spec.indexOf(\"{\") !== -1) {\n format_spec = resolve_format_spec(format_spec);\n }\n if (ρσ_str.format._template_format_pat === undefined) {\n ρσ_str.format._template_format_pat = /([^{}](?=[<>=^]))?([<>=^])?([-+\\x20])?(\\#)?(0)?(\\d+)?([,_])?(?:\\.(\\d+))?([bcdeEfFgGnosxX%])?/;\n }\n try {\n ρσ_unpack = format_spec.match(ρσ_str.format._template_format_pat).slice(1);\nρσ_unpack = ρσ_unpack_asarray(9, ρσ_unpack);\n fill = ρσ_unpack[0];\n align = ρσ_unpack[1];\n sign = ρσ_unpack[2];\n fhash = ρσ_unpack[3];\n zeropad = ρσ_unpack[4];\n width = ρσ_unpack[5];\n comma = ρσ_unpack[6];\n precision = ρσ_unpack[7];\n ftype = ρσ_unpack[8];\n } catch (ρσ_Exception) {\n ρσ_last_exception = ρσ_Exception;\n if (ρσ_Exception instanceof TypeError) {\n return value;\n } else {\n throw ρσ_Exception;\n }\n }\n if (zeropad) {\n fill = fill || \"0\";\n align = align || \"=\";\n } else {\n fill = fill || \" \";\n align = align || \">\";\n }\n is_numeric = Number(value) === value;\n is_int = is_numeric && value % 1 === 0;\n precision = parseInt(precision, 10);\n lftype = (ftype || \"\").toLowerCase();\n if (ftype === \"n\") {\n is_numeric = true;\n if (is_int) {\n if (comma) {\n throw new ValueError(\"Cannot specify ',' with 'n'\");\n }\n value = parseInt(value, 10).toLocaleString();\n } else {\n value = parseFloat(value).toLocaleString();\n }\n } else if (['b', 'c', 'd', 'o', 'x'].indexOf(lftype) !== -1) {\n value = parseInt(value, 10);\n is_numeric = true;\n if (!isNaN(value)) {\n if (ftype === \"b\") {\n value = (value >>> 0).toString(2);\n if (fhash) {\n value = \"0b\" + value;\n }\n } else if (ftype === \"c\") {\n if (value > 65535) {\n code = value - 65536;\n value = String.fromCharCode(55296 + (code >> 10), 56320 + (code & 1023));\n } else {\n value = String.fromCharCode(value);\n }\n } else if (ftype === \"d\") {\n if (comma) {\n value = safe_comma(value, comma);\n } else {\n value = value.toString(10);\n }\n } else if (ftype === \"o\") {\n value = value.toString(8);\n if (fhash) {\n value = \"0o\" + value;\n }\n } else if (lftype === \"x\") {\n value = value.toString(16);\n value = (ftype === \"x\") ? value.toLowerCase() : value.toUpperCase();\n if (fhash) {\n value = \"0x\" + value;\n }\n }\n }\n } else if (['e','f','g','%'].indexOf(lftype) !== -1) {\n is_numeric = true;\n value = parseFloat(value);\n prec = (isNaN(precision)) ? 6 : precision;\n if (lftype === \"e\") {\n value = value.toExponential(prec);\n value = (ftype === \"E\") ? value.toUpperCase() : value.toLowerCase();\n } else if (lftype === \"f\") {\n value = safe_fixed(value, prec, comma);\n value = (ftype === \"F\") ? value.toUpperCase() : value.toLowerCase();\n } else if (lftype === \"%\") {\n value *= 100;\n value = safe_fixed(value, prec, comma) + \"%\";\n } else if (lftype === \"g\") {\n prec = max(1, prec);\n exp = parseInt(split(value.toExponential(prec - 1).toLowerCase(), \"e\")[1], 10);\n if (-4 <= exp && exp < prec) {\n value = safe_fixed(value, prec - 1 - exp, comma);\n } else {\n value = value.toExponential(prec - 1);\n }\n value = value.replace(/0+$/g, \"\");\n if (value[value.length-1] === decimal_sep) {\n value = value.slice(0, -1);\n }\n if (ftype === \"G\") {\n value = value.toUpperCase();\n }\n }\n } else {\n if (comma) {\n value = parseInt(value, 10);\n if (isNaN(value)) {\n throw new ValueError(\"Must use numbers with , or _\");\n }\n value = safe_comma(value, comma);\n }\n value += \"\";\n if (!isNaN(precision)) {\n value = value.slice(0, precision);\n }\n }\n value += \"\";\n if (is_numeric && sign) {\n nval = Number(value);\n is_positive = !isNaN(nval) && nval >= 0;\n if (is_positive && (sign === \" \" || sign === \"+\")) {\n value = sign + value;\n }\n }\n function repeat(char, num) {\n return (new Array(num+1)).join(char);\n };\n if (!repeat.__argnames__) Object.defineProperties(repeat, {\n __argnames__ : {value: [\"char\", \"num\"]},\n __module__ : {value: \"__main__\"}\n });\n\n if (is_numeric && width && width[0] === \"0\") {\n width = width.slice(1);\n ρσ_unpack = [\"0\", \"=\"];\n fill = ρσ_unpack[0];\n align = ρσ_unpack[1];\n }\n width = parseInt(width || \"-1\", 10);\n if (isNaN(width)) {\n throw new ValueError(\"Invalid width specification: \" + width);\n }\n if (fill && value.length < width) {\n if (align === \"<\") {\n value = value + repeat(fill, width - value.length);\n } else if (align === \">\") {\n value = repeat(fill, width - value.length) + value;\n } else if (align === \"^\") {\n left = Math.floor((width - value.length) / 2);\n right = width - left - value.length;\n value = repeat(fill, left) + value + repeat(fill, right);\n } else if (align === \"=\") {\n if (ρσ_in(value[0], \"+- \")) {\n value = value[0] + repeat(fill, width - value.length) + value.slice(1);\n } else {\n value = repeat(fill, width - value.length) + value;\n }\n } else {\n throw new ValueError(\"Unrecognized alignment: \" + align);\n }\n }\n return value;\n };\n if (!apply_formatting.__argnames__) Object.defineProperties(apply_formatting, {\n __argnames__ : {value: [\"value\", \"format_spec\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function parse_markup(markup) {\n var key, transformer, format_spec, pos, state, ch;\n key = transformer = format_spec = \"\";\n pos = 0;\n state = 0;\n while (pos < markup.length) {\n ch = markup[(typeof pos === \"number\" && pos < 0) ? markup.length + pos : pos];\n if (state === 0) {\n if (ch === \"!\") {\n state = 1;\n } else if (ch === \":\") {\n state = 2;\n } else {\n key += ch;\n }\n } else if (state === 1) {\n if (ch === \":\") {\n state = 2;\n } else {\n transformer += ch;\n }\n } else {\n format_spec += ch;\n }\n pos += 1;\n }\n return [key, transformer, format_spec];\n };\n if (!parse_markup.__argnames__) Object.defineProperties(parse_markup, {\n __argnames__ : {value: [\"markup\"]},\n __module__ : {value: \"__main__\"}\n });\n\n function render_markup(markup) {\n var ρσ_unpack, key, transformer, format_spec, ends_with_equal, lkey, nvalue, object, ans;\n ρσ_unpack = parse_markup(markup);\nρσ_unpack = ρσ_unpack_asarray(3, ρσ_unpack);\n key = ρσ_unpack[0];\n transformer = ρσ_unpack[1];\n format_spec = ρσ_unpack[2];\n if (transformer && ['a', 'r', 's'].indexOf(transformer) === -1) {\n throw new ValueError(\"Unknown conversion specifier: \" + transformer);\n }\n ends_with_equal = key.endsWith(\"=\");\n if (ends_with_equal) {\n key = key.slice(0, -1);\n }\n lkey = key.length && split(key, /[.\\[]/, 1)[0];\n if (lkey) {\n explicit = true;\n if (implicit) {\n throw new ValueError(\"cannot switch from automatic field numbering to manual field specification\");\n }\n nvalue = parseInt(lkey);\n object = (isNaN(nvalue)) ? kwargs[(typeof lkey === \"number\" && lkey < 0) ? kwargs.length + lkey : lkey] : args[(typeof nvalue === \"number\" && nvalue < 0) ? args.length + nvalue : nvalue];\n if (object === undefined) {\n if (isNaN(nvalue)) {\n throw new KeyError(lkey);\n }\n throw new IndexError(lkey);\n }\n object = resolve(key.slice(lkey.length), object);\n } else {\n implicit = true;\n if (explicit) {\n throw new ValueError(\"cannot switch from manual field specification to automatic field numbering\");\n }\n if (idx >= args.length) {\n throw new IndexError(\"Not enough arguments to match template: \" + template);\n }\n object = args[(typeof idx === \"number\" && idx < 0) ? args.length + idx : idx];\n idx += 1;\n }\n if (typeof object === \"function\") {\n object = object();\n }\n ans = \"\" + object;\n if (format_spec) {\n ans = apply_formatting(ans, format_spec);\n }\n if (ends_with_equal) {\n ans = \"\" + ρσ_str.format(\"{}\", key) + \"=\" + ρσ_str.format(\"{}\", ans) + \"\";\n }\n return ans;\n };\n if (!render_markup.__argnames__) Object.defineProperties(render_markup, {\n __argnames__ : {value: [\"markup\"]},\n __module__ : {value: \"__main__\"}\n });\n\n ans = \"\";\n pos = 0;\n in_brace = 0;\n markup = \"\";\n while (pos < template.length) {\n ch = template[(typeof pos === \"number\" && pos < 0) ? template.length + pos : pos];\n if (in_brace) {\n if (ch === \"{\") {\n in_brace += 1;\n markup += \"{\";\n } else if (ch === \"}\") {\n in_brace -= 1;\n if (in_brace > 0) {\n markup += \"}\";\n } else {\n ans += render_markup(markup);\n }\n } else {\n markup += ch;\n }\n } else {\n if (ch === \"{\") {\n if (template[ρσ_bound_index(pos + 1, template)] === \"{\") {\n pos += 1;\n ans += \"{\";\n } else {\n in_brace = 1;\n markup = \"\";\n }\n } else {\n ans += ch;\n if (ch === \"}\" && template[ρσ_bound_index(pos + 1, template)] === \"}\") {\n pos += 1;\n }\n }\n }\n pos += 1;\n }\n if (in_brace) {\n throw new ValueError(\"expected '}' before end of string\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"capitalize\", (function() {\n var ρσ_anonfunc = function () {\n var string;\n string = this;\n if (string) {\n string = string[0].toUpperCase() + string.slice(1).toLowerCase();\n }\n return string;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"center\", (function() {\n var ρσ_anonfunc = function (width, fill) {\n var left, right;\n left = Math.floor((width - this.length) / 2);\n right = width - left - this.length;\n fill = fill || \" \";\n return new Array(left+1).join(fill) + this + new Array(right+1).join(fill);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\", \"fill\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"count\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var string, ρσ_unpack, pos, step, ans;\n string = this;\n start = start || 0;\n end = end || string.length;\n if (start < 0 || end < 0) {\n string = string.slice(start, end);\n ρσ_unpack = [0, string.length];\n start = ρσ_unpack[0];\n end = ρσ_unpack[1];\n }\n pos = start;\n step = needle.length;\n if (!step) {\n return 0;\n }\n ans = 0;\n while (pos !== -1) {\n pos = string.indexOf(needle, pos);\n if (pos !== -1) {\n ans += 1;\n pos += step;\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"endswith\", (function() {\n var ρσ_anonfunc = function (suffixes, start, end) {\n var string, q;\n string = this;\n start = start || 0;\n if (typeof suffixes === \"string\") {\n suffixes = [suffixes];\n }\n if (end !== undefined) {\n string = string.slice(0, end);\n }\n for (var i = 0; i < suffixes.length; i++) {\n q = suffixes[(typeof i === \"number\" && i < 0) ? suffixes.length + i : i];\n if (string.indexOf(q, Math.max(start, string.length - q.length)) !== -1) {\n return true;\n }\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"suffixes\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"startswith\", (function() {\n var ρσ_anonfunc = function (prefixes, start, end) {\n var prefix;\n start = start || 0;\n if (typeof prefixes === \"string\") {\n prefixes = [prefixes];\n }\n for (var i = 0; i < prefixes.length; i++) {\n prefix = prefixes[(typeof i === \"number\" && i < 0) ? prefixes.length + i : i];\n end = (end === undefined) ? this.length : end;\n if (end - start >= prefix.length && prefix === this.slice(start, start + prefix.length)) {\n return true;\n }\n }\n return false;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"prefixes\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"find\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n while (start < 0) {\n start += this.length;\n }\n ans = this.indexOf(needle, start);\n if (end !== undefined && ans !== -1) {\n while (end < 0) {\n end += this.length;\n }\n if (ans >= end - needle.length) {\n return -1;\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rfind\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n while (end < 0) {\n end += this.length;\n }\n ans = this.lastIndexOf(needle, end - 1);\n if (start !== undefined && ans !== -1) {\n while (start < 0) {\n start += this.length;\n }\n if (ans < start) {\n return -1;\n }\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"index\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n ans = ρσ_str.prototype.find.apply(this, arguments);\n if (ans === -1) {\n throw new ValueError(\"substring not found\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rindex\", (function() {\n var ρσ_anonfunc = function (needle, start, end) {\n var ans;\n ans = ρσ_str.prototype.rfind.apply(this, arguments);\n if (ans === -1) {\n throw new ValueError(\"substring not found\");\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"needle\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"islower\", (function() {\n var ρσ_anonfunc = function () {\n return this.length > 0 && this.toLowerCase() === this.toString();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"isupper\", (function() {\n var ρσ_anonfunc = function () {\n return this.length > 0 && this.toUpperCase() === this.toString();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"isspace\", (function() {\n var ρσ_anonfunc = function () {\n return this.length > 0 && /^\\s+$/.test(this);\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"join\", (function() {\n var ρσ_anonfunc = function (iterable) {\n var ans, r;\n if (Array.isArray(iterable)) {\n return iterable.join(this);\n }\n ans = \"\";\n r = iterable.next();\n while (!r.done) {\n if (ans) {\n ans += this;\n }\n ans += r.value;\n r = iterable.next();\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"iterable\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"ljust\", (function() {\n var ρσ_anonfunc = function (width, fill) {\n var string;\n string = this;\n if (width > string.length) {\n fill = fill || \" \";\n string += new Array(width - string.length + 1).join(fill);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\", \"fill\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rjust\", (function() {\n var ρσ_anonfunc = function (width, fill) {\n var string;\n string = this;\n if (width > string.length) {\n fill = fill || \" \";\n string = new Array(width - string.length + 1).join(fill) + string;\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\", \"fill\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"lower\", (function() {\n var ρσ_anonfunc = function () {\n return this.toLowerCase();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"upper\", (function() {\n var ρσ_anonfunc = function () {\n return this.toUpperCase();\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"lstrip\", (function() {\n var ρσ_anonfunc = function (chars) {\n var string, pos;\n string = this;\n pos = 0;\n chars = chars || ρσ_str.whitespace;\n while (chars.indexOf(string[(typeof pos === \"number\" && pos < 0) ? string.length + pos : pos]) !== -1) {\n pos += 1;\n }\n if (pos) {\n string = string.slice(pos);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"chars\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rstrip\", (function() {\n var ρσ_anonfunc = function (chars) {\n var string, pos;\n string = this;\n pos = string.length - 1;\n chars = chars || ρσ_str.whitespace;\n while (chars.indexOf(string[(typeof pos === \"number\" && pos < 0) ? string.length + pos : pos]) !== -1) {\n pos -= 1;\n }\n if (pos < string.length - 1) {\n string = string.slice(0, pos + 1);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"chars\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"strip\", (function() {\n var ρσ_anonfunc = function (chars) {\n return ρσ_str.prototype.lstrip.call(ρσ_str.prototype.rstrip.call(this, chars), chars);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"chars\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"partition\", (function() {\n var ρσ_anonfunc = function (sep) {\n var idx;\n idx = this.indexOf(sep);\n if (idx === -1) {\n return [this, \"\", \"\"];\n }\n return [this.slice(0, idx), sep, this.slice(idx + sep.length)];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rpartition\", (function() {\n var ρσ_anonfunc = function (sep) {\n var idx;\n idx = this.lastIndexOf(sep);\n if (idx === -1) {\n return [\"\", \"\", this];\n }\n return [this.slice(0, idx), sep, this.slice(idx + sep.length)];\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"replace\", (function() {\n var ρσ_anonfunc = function (old, repl, count) {\n var string, pos, idx;\n string = this;\n if (count === 1) {\n return ρσ_orig_replace(string, old, repl);\n }\n if (count < 1) {\n return string;\n }\n count = count || Number.MAX_VALUE;\n pos = 0;\n while (count > 0) {\n count -= 1;\n idx = string.indexOf(old, pos);\n if (idx === -1) {\n break;\n }\n pos = idx + repl.length;\n string = string.slice(0, idx) + repl + string.slice(idx + old.length);\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"old\", \"repl\", \"count\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"split\", (function() {\n var ρσ_anonfunc = function (sep, maxsplit) {\n var split, ans, extra, parts;\n if (maxsplit === 0) {\n return ρσ_list_decorate([ this ]);\n }\n split = ρσ_orig_split;\n if (sep === undefined || sep === null) {\n if (maxsplit > 0) {\n ans = split(this, /(\\s+)/);\n extra = \"\";\n parts = [];\n for (var i = 0; i < ans.length; i++) {\n if (parts.length >= maxsplit + 1) {\n extra += ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i];\n } else if (i % 2 === 0) {\n parts.push(ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i]);\n }\n }\n parts[parts.length-1] += extra;\n ans = parts;\n } else {\n ans = split(this, /\\s+/);\n }\n } else {\n if (sep === \"\") {\n throw new ValueError(\"empty separator\");\n }\n ans = split(this, sep);\n if (maxsplit > 0 && ans.length > maxsplit) {\n extra = ans.slice(maxsplit).join(sep);\n ans = ans.slice(0, maxsplit);\n ans.push(extra);\n }\n }\n return ρσ_list_decorate(ans);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\", \"maxsplit\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"rsplit\", (function() {\n var ρσ_anonfunc = function (sep, maxsplit) {\n var split, ans, is_space, pos, current, spc, ch, end, idx;\n if (!maxsplit) {\n return ρσ_str.prototype.split.call(this, sep);\n }\n split = ρσ_orig_split;\n if (sep === undefined || sep === null) {\n if (maxsplit > 0) {\n ans = [];\n is_space = /\\s/;\n pos = this.length - 1;\n current = \"\";\n while (pos > -1 && maxsplit > 0) {\n spc = false;\n ch = (ρσ_expr_temp = this)[(typeof pos === \"number\" && pos < 0) ? ρσ_expr_temp.length + pos : pos];\n while (pos > -1 && is_space.test(ch)) {\n spc = true;\n ch = this[--pos];\n }\n if (spc) {\n if (current) {\n ans.push(current);\n maxsplit -= 1;\n }\n current = ch;\n } else {\n current += ch;\n }\n pos -= 1;\n }\n ans.push(this.slice(0, pos + 1) + current);\n ans.reverse();\n } else {\n ans = split(this, /\\s+/);\n }\n } else {\n if (sep === \"\") {\n throw new ValueError(\"empty separator\");\n }\n ans = [];\n pos = end = this.length;\n while (pos > -1 && maxsplit > 0) {\n maxsplit -= 1;\n idx = this.lastIndexOf(sep, pos);\n if (idx === -1) {\n break;\n }\n ans.push(this.slice(idx + sep.length, end));\n pos = idx - 1;\n end = idx;\n }\n ans.push(this.slice(0, end));\n ans.reverse();\n }\n return ρσ_list_decorate(ans);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"sep\", \"maxsplit\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"splitlines\", (function() {\n var ρσ_anonfunc = function (keepends) {\n var split, parts, ans;\n split = ρσ_orig_split;\n if (keepends) {\n parts = split(this, /((?:\\r?\\n)|\\r)/);\n ans = [];\n for (var i = 0; i < parts.length; i++) {\n if (i % 2 === 0) {\n ans.push(parts[(typeof i === \"number\" && i < 0) ? parts.length + i : i]);\n } else {\n ans[ans.length-1] += parts[(typeof i === \"number\" && i < 0) ? parts.length + i : i];\n }\n }\n } else {\n ans = split(this, /(?:\\r?\\n)|\\r/);\n }\n return ρσ_list_decorate(ans);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"keepends\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"swapcase\", (function() {\n var ρσ_anonfunc = function () {\n var ans, a, b;\n ans = new Array(this.length);\n for (var i = 0; i < ans.length; i++) {\n a = (ρσ_expr_temp = this)[(typeof i === \"number\" && i < 0) ? ρσ_expr_temp.length + i : i];\n b = a.toLowerCase();\n if (a === b) {\n b = a.toUpperCase();\n }\n ans[(typeof i === \"number\" && i < 0) ? ans.length + i : i] = b;\n }\n return ans.join(\"\");\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\ndefine_str_func(\"zfill\", (function() {\n var ρσ_anonfunc = function (width) {\n var string;\n string = this;\n if (width > string.length) {\n string = new Array(width - string.length + 1).join(\"0\") + string;\n }\n return string;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"width\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})());\nρσ_str.uchrs = (function() {\n var ρσ_anonfunc = function (string, with_positions) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"_string\"] = string;\n ρσ_d[\"_pos\"] = 0;\n ρσ_d[ρσ_iterator_symbol] = (function() {\n var ρσ_anonfunc = function () {\n return this;\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n ρσ_d[\"next\"] = (function() {\n var ρσ_anonfunc = function () {\n var length, pos, value, ans, extra;\n length = this._string.length;\n if (this._pos >= length) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = true;\n return ρσ_d;\n }).call(this);\n }\n pos = this._pos;\n value = this._string.charCodeAt(this._pos++);\n ans = \"\\ufffd\";\n if (55296 <= value && value <= 56319) {\n if (this._pos < length) {\n extra = this._string.charCodeAt(this._pos++);\n if ((extra & 56320) === 56320) {\n ans = String.fromCharCode(value, extra);\n }\n }\n } else if ((value & 56320) !== 56320) {\n ans = String.fromCharCode(value);\n }\n if (with_positions) {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = false;\n ρσ_d[\"value\"] = ρσ_list_decorate([ pos, ans ]);\n return ρσ_d;\n }).call(this);\n } else {\n return (function(){\n var ρσ_d = {};\n ρσ_d[\"done\"] = false;\n ρσ_d[\"value\"] = ans;\n return ρσ_d;\n }).call(this);\n }\n };\n if (!ρσ_anonfunc.__module__) Object.defineProperties(ρσ_anonfunc, {\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n })();\n return ρσ_d;\n }).call(this);\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"string\", \"with_positions\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_str.uslice = (function() {\n var ρσ_anonfunc = function (string, start, end) {\n var items, iterator, r;\n items = [];\n iterator = ρσ_str.uchrs(string);\n r = iterator.next();\n while (!r.done) {\n items.push(r.value);\n r = iterator.next();\n }\n return items.slice(start || 0, (end === undefined) ? items.length : end).join(\"\");\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"string\", \"start\", \"end\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_str.ulen = (function() {\n var ρσ_anonfunc = function (string) {\n var iterator, r, ans;\n iterator = ρσ_str.uchrs(string);\n r = iterator.next();\n ans = 0;\n while (!r.done) {\n r = iterator.next();\n ans += 1;\n }\n return ans;\n };\n if (!ρσ_anonfunc.__argnames__) Object.defineProperties(ρσ_anonfunc, {\n __argnames__ : {value: [\"string\"]},\n __module__ : {value: \"__main__\"}\n });\n return ρσ_anonfunc;\n})();\nρσ_str.ascii_lowercase = \"abcdefghijklmnopqrstuvwxyz\";\nρσ_str.ascii_uppercase = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\nρσ_str.ascii_letters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\nρσ_str.digits = \"0123456789\";\nρσ_str.punctuation = \"!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~\";\nρσ_str.printable = \"0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!\\\"#$%&'()*+,-./:;<=>?@[\\\\]^_`{|}~ \\t\\n\\r\\u000b\\f\";\nρσ_str.whitespace = \" \\t\\n\\r\\u000b\\f\";\ndefine_str_func = undefined;\nvar str = ρσ_str, repr = ρσ_repr;","tools/web_repl.js":"/* vim:fileencoding=utf-8\n * \n * Copyright (C) 2016 Kovid Goyal \n *\n * Distributed under terms of the BSD license\n */\n\"use strict\"; /*jshint node:true */\nvar vm = require('vm');\nvar embedded_compiler = require('tools/embedded_compiler.js');\n\nmodule.exports = function(compiler, baselib) {\n var ctx = vm.createContext();\n var LINE_CONTINUATION_CHARS = ':\\\\';\n var find_completions = null;\n var streaming_compiler = embedded_compiler(compiler, baselib, function(js) { return vm.runInContext(js, ctx); }, '__repl__');\n\n return {\n 'in_block_mode': false,\n\n 'replace_print': function replace_print(write_line_func) {\n ctx.print = function() {\n var parts = [];\n for (var i = 0; i < arguments.length; i++) \n parts.push(ctx.ρσ_str(arguments[i]));\n write_line_func(parts.join(' '));\n };\n },\n\n 'is_input_complete': function is_input_complete(source) {\n if (!source || !source.trim()) return false;\n var lines = source.split('\\n');\n var last_line = lines[lines.length - 1].trimRight();\n if (this.in_block_mode) {\n // In a block only exit after two blank lines\n if (lines.length < 2) return false;\n var second_last_line = lines[lines.length - 2].trimRight();\n var block_ended = !!(!last_line && !second_last_line);\n if (!block_ended) return false;\n this.in_block_mode = false;\n return true;\n }\n\n if (last_line && LINE_CONTINUATION_CHARS.indexOf(last_line.substr(last_line.length - 1)) > -1) {\n this.in_block_mode = true;\n return false;\n }\n try {\n compiler.parse(source, {'filename': '', 'basedir': '__stdlib__'});\n } catch(e) {\n if (e.is_eof && e.line === lines.length && e.col > 0) {\n return false;\n }\n this.in_block_mode = false;\n return true;\n }\n this.in_block_mode = false;\n return true;\n },\n\n 'compile': function web_repl_compile(code, opts) {\n opts = opts || {};\n opts.keep_docstrings = true;\n opts.filename = '';\n return streaming_compiler.compile(code, opts);\n },\n\n 'runjs': function runjs(code) {\n var ans = vm.runInContext(code, ctx);\n if (ans !== undefined || ans === null) {\n ctx.ρσ_repl_val = ans;\n var q = vm.runInContext('ρσ_repr(ρσ_repl_val)', ctx);\n ans = (q === 'undefined') ? ans.toString() : q;\n }\n return ans;\n },\n\n 'init_completions': function init_completions(completelib) {\n find_completions = completelib(compiler);\n },\n\n 'find_completions': function find_completions_(line) {\n return find_completions(line, ctx);\n },\n\n };\n};\n\n","tools/embedded_compiler.js":"/* vim:fileencoding=utf-8\n * \n * Copyright (C) 2016 Kovid Goyal \n *\n * Distributed under terms of the BSD license\n */\n\"use strict\"; /*jshint node:true */\n\nvar has_prop = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty);\n\nmodule.exports = function(compiler, baselib, runjs, name) {\n var LINE_CONTINUATION_CHARS = ':\\\\';\n runjs = runjs || eval;\n runjs(print_ast(compiler.parse(''), true));\n runjs('var __name__ = \"' + (name || '__embedded__') + '\";');\n\n function print_ast(ast, keep_baselib, keep_docstrings, js_version, private_scope, write_name) {\n var output_options = {omit_baselib:!keep_baselib, write_name:!!write_name, private_scope:!!private_scope, beautify:true, js_version: (js_version || 6), keep_docstrings:keep_docstrings};\n if (keep_baselib) output_options.baselib_plain = baselib;\n var output = new compiler.OutputStream(output_options);\n ast.print(output);\n return output.get();\n }\n\n return {\n 'toplevel': null,\n\n 'compile': function streaming_compile(code, opts) {\n opts = opts || {};\n var classes = (this.toplevel) ? this.toplevel.classes : undefined;\n var scoped_flags = (this.toplevel) ? this.toplevel.scoped_flags: undefined;\n this.toplevel = compiler.parse(code, {\n 'filename': opts.filename || '',\n 'basedir': '__stdlib__',\n 'classes': classes,\n 'scoped_flags': scoped_flags,\n 'discard_asserts': opts.discard_asserts,\n });\n var ans = print_ast(this.toplevel, opts.keep_baselib, opts.keep_docstrings, opts.js_version, opts.private_scope, opts.write_name);\n if (classes) {\n var exports = {};\n var self = this;\n this.toplevel.exports.forEach(function (name) { exports[name] = true; });\n Object.getOwnPropertyNames(classes).forEach(function (name) {\n if (!has_prop(exports, name) && !has_prop(self.toplevel.classes, name))\n self.toplevel.classes[name] = classes[name];\n });\n }\n scoped_flags = this.toplevel.scoped_flags;\n \n return ans;\n },\n\n };\n};\n\n","tools/utils.js":"/* vim:fileencoding=utf-8\n * \n * Copyright (C) 2015 Kovid Goyal \n *\n * Distributed under terms of the BSD license\n */\n\"use strict\"; /*jshint node:true */\n\nvar comment_contents = /\\/\\*!?(?:\\@preserve)?[ \\t]*(?:\\r\\n|\\n)([\\s\\S]*?)(?:\\r\\n|\\n)[ \\t]*\\*\\//;\nvar colors = ['red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white'];\n\nfunction ansi(code) {\n code = code || 0;\n return String.fromCharCode(27) + '[' + code + 'm';\n}\n\nfunction path_exists(path) {\n var fs = require('fs');\n try {\n fs.statSync(path);\n return true;\n } catch(e) {\n if (e.code != 'ENOENT') throw e;\n }\n}\n\nfunction colored(string, color, bold) {\n var prefix = [];\n if (bold) prefix.push(ansi(1));\n if (color) prefix.push(ansi(colors.indexOf(color) + 31));\n return prefix.join('') + string + ansi(0);\n}\n\nfunction supports_color(stdout) {\n stdout = stdout || process.stdout;\n\tif (stdout && !stdout.isTTY) {\n\t\treturn false;\n\t}\n\n\tif (process.platform === 'win32') {\n\t\treturn false;\n\t}\n\n\tif ('COLORTERM' in process.env) {\n\t\treturn true;\n\t}\n\n\tif (process.env.TERM === 'dumb') {\n\t\treturn false;\n\t}\n\n\tif (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {\n\t\treturn true;\n\t}\n\n return false;\n\n}\n\nfunction safe_colored(string) {\n return string;\n}\n\nfunction repeat(str, num) {\n return new Array( num + 1 ).join( str );\n}\n\nfunction generators_available() {\n var gen;\n try {\n eval('gen = function *(){}'); // jshint ignore:line\n return typeof gen === 'function' && gen.constructor.name == 'GeneratorFunction';\n } catch(e) {\n return false;\n }\n}\n\nfunction wrap(lines, width) {\n\tvar ans = [];\n\tvar prev = '';\n\tlines.forEach(function (line) {\n\t\tline = prev + line;\n\t\tprev = '';\n\t\tif (line.length > width) {\n\t\t\tprev = line.substr(width);\n if (prev) prev += ' ';\n\t\t\tline = line.substr(0, width - 1);\n\t\t\tif (line.substr(line.length - 1 !== ' ')) line += '-';\n\t\t} \n\t\tans.push(line);\n\t});\n\tif (prev) ans = ans.concat(wrap([prev]));\n\treturn ans;\n}\n\nfunction merge() {\n // Simple merge of properties from all objects\n var ans = {};\n Array.prototype.slice.call(arguments).forEach(function (arg) {\n Object.keys(arg).forEach(function(key) {\n ans[key] = arg[key];\n });\n });\n return ans;\n}\n\nfunction get_import_dirs(paths_string, ignore_env) {\n var path = require('path');\n var paths = [];\n function merge(new_path) {\n if (paths.indexOf(new_path) == -1) paths.push(new_path);\n }\n if (!ignore_env && process && process.env && process.env.RAPYDSCRIPT_IMPORT_PATH) {\n process.env.RAPYDSCRIPT_IMPORT_PATH.split(path.delimiter).forEach(merge);\n }\n if (paths_string) paths_string.split(path.delimiter).forEach(merge);\n return paths;\n}\n\nexports.comment_contents = comment_contents;\nexports.repeat = repeat;\nexports.wrap = wrap;\nexports.merge = merge;\nexports.colored = colored;\nexports.safe_colored = (supports_color()) ? colored : safe_colored;\nexports.generators_available = generators_available;\nexports.get_import_dirs = get_import_dirs;\nexports.path_exists = path_exists;\n","tools/completer.js":"/* vim:fileencoding=utf-8\n * \n * Copyright (C) 2016 Kovid Goyal \n *\n * Distributed under terms of the BSD license\n */\n\n\nmodule.exports = function(compiler, options) {\n \"use strict\";\n var all_keywords = compiler.ALL_KEYWORDS.split(' ');\n var vm = require('vm');\n options = options || {};\n if (!options.enum_global) options.enum_global = \"var global = Function('return this')(); Object.getOwnPropertyNames(global);\";\n\n function global_names(ctx) {\n try {\n var ans = vm.runInContext(options.enum_global, ctx);\n ans = ans.concat(all_keywords);\n ans.sort();\n var seen = {};\n ans.filter(function (item) { \n if (Object.prototype.hasOwnProperty.call(seen, item)) return false;\n seen[item] = true;\n return true;\n });\n return ans;\n } catch(e) {\n console.log(e.stack || e.toString());\n }\n return [];\n }\n\n function object_names(obj, prefix) {\n if (obj === null || obj === undefined) return [];\n var groups = [], prefix_len = prefix.length, p;\n\n function prefix_filter(name) { return (prefix_len) ? (name.substr(0, prefix_len) === prefix) : true; }\n\n function add(o) {\n var items = Object.getOwnPropertyNames(o).filter(prefix_filter);\n if (items.length) groups.push(items);\n }\n\n if (typeof obj === 'object' || typeof obj === 'function') {\n add(obj);\n p = Object.getPrototypeOf(obj);\n } else p = obj.constructor ? obj.constructor.prototype : null; \n\n // Walk the prototype chain\n try {\n var sentinel = 5;\n while (p !== null && sentinel > 0) {\n add(p);\n p = Object.getPrototypeOf(p);\n // Circular refs possible? Let's guard against that.\n sentinel--;\n }\n } catch (e) {\n // console.error(\"completion error walking prototype chain:\" + e);\n }\n if (!groups.length) return [];\n var seen = {}, ans = [];\n function uniq(name) {\n if (Object.prototype.hasOwnProperty.call(seen, name)) return false;\n seen[name] = true;\n return true;\n }\n for (var i = 0; i < groups.length; i++) {\n var group = groups[i];\n group.sort();\n ans = ans.concat(group.filter(uniq));\n ans.push(''); // group separator\n\n }\n while (ans.length && ans[ans.length - 1] === '') ans.pop();\n return ans;\n }\n\n function prefix_matches(prefix, items) {\n var len = prefix.length;\n var ans = items.filter(function(item) { return item.substr(0, len) === prefix; });\n ans.sort();\n return ans;\n }\n\n function find_completions(line, ctx) {\n var t;\n try {\n t = compiler.tokenizer(line, '');\n } catch(e) { return []; }\n var tokens = [], token;\n while (true) {\n try {\n token = t();\n } catch (e) { return []; }\n if (token.type === 'eof') break;\n if (token.type === 'punc' && '(){},;:'.indexOf(token.value) > -1)\n tokens = [];\n tokens.push(token);\n }\n if (!tokens.length) {\n // New line or trailing space\n return [global_names(ctx), ''];\n }\n var last_tok = tokens[tokens.length - 1];\n if (last_tok.value === '.' || (last_tok.type === 'name' && compiler.IDENTIFIER_PAT.test(last_tok.value))) {\n last_tok = last_tok.value;\n if (last_tok === '.') {\n tokens.push({'value':''});\n last_tok = '';\n }\n if (tokens.length > 1 && tokens[tokens.length - 2].value === '.') {\n // A compound expression\n var prefix = '', result;\n tokens.slice(0, tokens.length - 2).forEach(function (tok) { prefix += tok.value; });\n if (prefix) {\n try {\n result = vm.runInContext(prefix, ctx, {'displayErrors':false});\n } catch(e) { return []; }\n return [object_names(result, last_tok), last_tok];\n }\n } else {\n return [prefix_matches(last_tok, global_names(ctx)), last_tok];\n }\n }\n return [];\n }\n\n return find_completions;\n};\n","tools/msgfmt.js":"/* vim:fileencoding=utf-8\n * \n * Copyright (C) 2015 Kovid Goyal \n *\n * Distributed under terms of the BSD license\n */\n\"use strict\"; /*jshint node:true */\n\nfunction unesc(string) {\n return string.replace(/\\\\\"/g, '\"').replace(/\\\\n/g, '\\n').replace(/\\\\r/g, '\\r').replace(/\\\\t/g, '\\t').replace(/\\\\\\\\/g, '\\\\');\n}\n\nfunction parse(data, on_error) {\n // Parse a PO file using a state machine (does not work for POT files). Also only extracts data useful\n // for JSON output.\n var plural_forms = null;\n var lines = data.split('\\n');\n var entries = [];\n var current_entry = create_entry();\n var lnum = 0;\n var nplurals = null;\n var language = null;\n\n function fatal() {\n var msg = Array.prototype.slice.call(arguments).join(' ');\n if (on_error) { on_error(msg); return; }\n console.error(msg);\n process.exit(1);\n }\n\n function create_entry() {\n return {msgid: null, fuzzy: false, msgstr:[], msgid_plural:null, lnum:null};\n }\n\n function parse_header() {\n var raw = current_entry.msgstr[0];\n if (raw === undefined) fatal('Header has no msgstr');\n raw.split('\\n').forEach(function(line) {\n if (line.startsWith('Plural-Forms:')) {\n plural_forms = line.slice('Plural-Forms:'.length).trim();\n var match = /^nplurals\\s*=\\s*(\\d+)\\s*;/.exec(plural_forms);\n if (!match || match[1] === undefined) fatal('Invalid Plural-Forms header:', plural_forms);\n nplurals = parseInt(match[1]);\n } \n else if (line.startsWith('Language:')) {\n language = line.slice('Language:'.length).trim();\n }\n });\n }\n\n function commit_entry() {\n if (current_entry.msgid) {\n if (current_entry.msgid_plural !== null) {\n if (nplurals === null) fatal('Plural-Forms header missing');\n for (var i = 0; i < nplurals; i++) {\n if (current_entry.msgstr[i] === undefined) fatal('Missing plural form for entry at line number:', lnum);\n }\n }\n entries.push(current_entry);\n } else if (current_entry.msgid === '') parse_header();\n current_entry = create_entry();\n }\n\n function read_string(line) {\n line = line.trim();\n if (!line || line[0] !== '\"' || line[line.length - 1] !== '\"') {\n fatal('Expecting a string at line number:', lnum);\n }\n return unesc(line.slice(1, -1));\n }\n\n function continuation(line, lines, append, after) {\n if (line[0] === '\"') append(read_string(line));\n else {\n state = after;\n after(line, lines);\n }\n }\n\n function start(line, lines) {\n if (line[0] === '#') {\n if (line[1] === ',') {\n line.slice(2).trimLeft().split(',').forEach(function(flag) {\n if (flag.trim().toLowerCase() === 'fuzzy') current_entry.fuzzy = true;\n });\n }\n } else if (line.startsWith('msgid ')) {\n current_entry.msgid = read_string(line.slice('msgid '.length));\n current_entry.lnum = lnum;\n state = function(line, lines) { \n continuation(line, lines, function(x) { current_entry.msgid += x; }, after_msgid);\n };\n } else {\n fatal('Expecting msgid at line number:', lnum);\n }\n }\n\n function after_msgid(line, lines) {\n if (line.startsWith('msgid_plural ')) {\n current_entry.msgid_plural = read_string(line.slice('msgid_plural '.length));\n state = function(line, lines) { \n continuation(line, lines, function(x) { current_entry.msgid_plural += x; }, msgstr);\n };\n } \n \n else if (line.startsWith('msgstr ') || line.startsWith('msgstr[')) {\n state = msgstr;\n msgstr(line, lines);\n } \n \n else fatal('Expecting either msgstr or msgid_plural at line number:', lnum);\n\n }\n\n function msgstr(line, lines) {\n if (line.startsWith('msgstr ')) {\n if (current_entry.msgid_plural !== null) fatal('Expecting msgstr[0] at line number:', lnum);\n current_entry.msgstr.push(read_string(line.slice('msgstr '.length)));\n state = function(line, lines) { \n continuation(line, lines, function(x) { current_entry.msgstr[current_entry.msgstr.length - 1] += x; }, msgstr);\n };\n } \n\n else if (line[0] === '#' || line.startsWith('msgid ')) {\n if (!current_entry.msgstr.length) fatal('Expecting msgstr at line number:', lnum);\n commit_entry();\n state = start;\n start(line, lines);\n }\n\n else if (line.startsWith('msgstr[')) {\n if (current_entry.msgid_plural === null) fatal('Expecting non-plural msgstr at line number:', lnum);\n var pnum = /^msgstr\\[(\\d+)\\] /.exec(line);\n if (!pnum || pnum[1] === undefined) fatal('Malformed msgstr at line number:', lnum);\n var idx = parseInt(pnum[1]);\n current_entry.msgstr[idx] = read_string(line.slice(pnum[0].length));\n state = function(line, lines) { \n continuation(line, lines, function(x) { current_entry.msgstr[idx] += x; }, msgstr);\n };\n }\n\n else fatal('Expecting msgstr or msgid at line number:', lnum);\n }\n\n var state = start;\n\n while (lines.length) {\n var line = lines.shift().trim();\n lnum += 1;\n if (!line) continue;\n state(line, lines);\n }\n commit_entry();\n if (language === null) fatal('No language specified in the header of this po file');\n return {entries:entries, plural_forms:plural_forms, nplurals:nplurals, language:language};\n}\n\nfunction read_stdin(cont) {\n var chunks = [];\n process.stdin.setEncoding('utf8');\n\n process.stdin.on('readable', function () { \n var chunk = process.stdin.read();\n if (chunk) chunks.push(chunk); \n });\n\n process.stdin.on('end', function() { cont(chunks.join('')); });\n}\n\nfunction serialize_catalog(catalog, options) {\n if (!options.use_fuzzy) catalog.entries = catalog.entries.filter(function(e) { return !e.fuzzy; });\n var entries = {};\n catalog.entries.forEach(function (entry) {\n entries[entry.msgid] = entry.msgstr;\n });\n return JSON.stringify({'plural_forms':catalog.plural_forms, 'entries':entries, 'language':catalog.language});\n}\n\nmodule.exports.cli = function(argv, base_path, src_path, lib_path) {\n read_stdin(function process(data) {\n var catalog = parse(data);\n console.log(serialize_catalog(catalog, argv));\n });\n};\n\nmodule.exports.parse = parse;\nmodule.exports.build = function(data, options) { return serialize_catalog(parse(data), options); };\n","tools/gettext.js":"/* vim:fileencoding=utf-8\n * \n * Copyright (C) 2015 Kovid Goyal \n *\n * Distributed under terms of the BSD license\n */\n\"use strict\"; /*jshint node:true */\n\nvar fs = require('fs');\nvar RapydScript = (typeof create_rapydscript_compiler === 'function') ? create_rapydscript_compiler() : require('./compiler').create_compiler();\nvar path = require('path');\n\nfunction parse_file(code, filename) {\n return RapydScript.parse(code, {\n filename: filename,\n basedir: path.dirname(filename),\n libdir: path.dirname(filename),\n for_linting: true,\n });\n}\n\nfunction detect_format(msgid) {\n var q = msgid.replace('{{', '');\n if (/\\{[0-9a-zA-Z_}]+/.test(q)) return 'python-brace-format';\n return null;\n}\n\nfunction Gettext(catalog, filename) {\n this._visit = function (node, cont) {\n if (node instanceof RapydScript.AST_Call && node.args && node.args.length && node.expression instanceof RapydScript.AST_Symbol) {\n var name = node.expression.name;\n if (name === '_' || name === 'gettext' || name === 'ngettext') {\n var nargs = (name === 'ngettext') ? 2 : 1;\n var line = node.start.line;\n for (var i = 0; i < nargs; i++) {\n if (!(node.args[i] instanceof RapydScript.AST_String)) {\n console.error('Translation function: ' + name + ' does not have a string literal argument at line: ' + line + ' of ' + filename);\n process.exit(1);\n }\n }\n var msgid = node.args[0].value;\n if (!Object.prototype.hasOwnProperty.call(catalog, msgid)) {\n catalog[msgid] = {\n 'locations': [],\n 'plural': null,\n 'format': detect_format(msgid),\n };\n }\n if (name === 'ngettext') catalog[msgid].plural = node.args[1].value;\n if (filename) catalog[msgid].locations.push(filename + ':' + line);\n }\n \n }\n if (cont !== undefined) cont();\n };\n}\n\nfunction gettext(catalog, code, filename) {\n var toplevel;\n\n try {\n toplevel = parse_file(code, filename);\n } catch(e) {\n if (e instanceof RapydScript.SyntaxError) {\n console.error('Failed to parse: ' + filename + ' with error: ' + e.line + ':' + e.col + ':' + e.message);\n process.exit(1);\n } else throw e;\n }\n\n if (toplevel) {\n var gt = new Gettext(catalog, filename);\n toplevel.walk(gt);\n }\n}\n\nfunction esc(string) {\n return (string || '').replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"').replace(/\\n/g, '\\\\n').replace(/\\t/g, '\\\\t').replace(/\\r/g, '');\n}\n\nfunction entry_to_string(msgid, data) {\n var ans = [];\n data.locations.forEach(function (loc) { ans.push('#: ' + loc); });\n if (data.format) ans.push('#, ' + data.format);\n ans.push('msgid \"' + esc(msgid) + '\"');\n if (data.plural) {\n ans.push('msgid_plural \"' + esc(data.plural) + '\"');\n ans.push('msgstr[0] \"\"');\n ans.push('msgstr[1] \"\"');\n } else ans.push('msgstr \"\"');\n return ans.join('\\n');\n}\n\nfunction write_output(catalog, options, write) {\n write = write || (function(x) { process.stdout.write(new Buffer(x, 'utf-8')); });\n function print() {\n var val = Array.prototype.slice.call(arguments).join(' ') + '\\n';\n write(val);\n }\n function header_line() {\n var val = '\"' + Array.prototype.slice.call(arguments).join(' ') + '\\\\n\"\\n';\n write(val);\n }\n if (!options.omit_header) {\n var now = (new Date()).toISOString();\n print('msgid', '\"\"');\n print('msgstr', '\"\"');\n header_line('Project-Id-Version:', esc(options.package_name), esc(options.package_version));\n header_line('POT-Creation-Date:', now);\n header_line(\"PO-Revision-Date:\", now);\n header_line(\"Report-Msgid-Bugs-To:\", esc(options.bugs_address));\n header_line(\"Last-Translator: Automatically generated\");\n header_line(\"Language-Team: LANGUAGE\");\n header_line(\"MIME-Version: 1.0\");\n header_line(\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\");\n header_line(\"Content-Type: text/plain; charset=UTF-8\");\n header_line(\"Content-Transfer-Encoding: 8bit\");\n print();\n }\n Object.keys(catalog).forEach(function(msgid) {\n var data = catalog[msgid];\n print(entry_to_string(msgid, data));\n print();\n });\n}\n\n// CLI {{{\n\nfunction read_whole_file(filename, cb) {\n if (!filename) {\n var chunks = [];\n process.stdin.setEncoding('utf-8');\n process.stdin.on('data', function (chunk) {\n chunks.push(chunk);\n }).on('end', function () {\n cb(null, chunks.join(\"\"));\n });\n process.openStdin();\n } else {\n fs.readFile(filename, \"utf-8\", cb);\n }\n}\n\nmodule.exports.cli = function(argv, base_path, src_path, lib_path) {\n var files = [];\n var num_of_files = files.length || 1;\n var catalog = {};\n\n function read_files(src) {\n src.forEach(function(f) {\n if (fs.lstatSync(f).isDirectory()) {\n var children = [];\n fs.readdirSync(f).forEach(function(x) { children.push(path.join(f, x)); });\n read_files(children);\n }\n else files.push(f);\n });\n }\n read_files(argv.files);\n\n function process_single_file(err, code) {\n if (err) {\n console.error(\"ERROR: can't read file: \" + files[0]);\n process.exit(1);\n }\n\n gettext(catalog, code, files[0]);\n\n files = files.slice(1);\n if (files.length) {\n setImmediate(read_whole_file, files[0], process_single_file);\n return;\n } else {\n write_output(catalog, argv);\n process.exit(0);\n }\n }\n \n setImmediate(read_whole_file, files[0], process_single_file);\n\n};\n\nmodule.exports.gettext = gettext;\nmodule.exports.entry_to_string = entry_to_string;\nmodule.exports.write_output = write_output;\n// }}}\n","__stdlib__/aes.pyj":"# vim:fileencoding=utf-8\n# License: BSD Copyright: 2016, Kovid Goyal \n\n# globals: crypto\n\n# Internal API {{{\n\ndef string_to_bytes_encoder(string):\n return TextEncoder('utf-8').encode(string + '')\n\ndef string_to_bytes_slow(string):\n escstr = encodeURIComponent(string)\n binstr = escstr.replace(/%([0-9A-F]{2})/g, def(match, p1):\n return String.fromCharCode('0x' + p1)\n )\n ua = Uint8Array(binstr.length)\n for i, ch in enumerate(binstr):\n ua[i] = ch.charCodeAt(0)\n return ua\n\ndef as_hex(array, sep=''):\n num = array.BYTES_PER_ELEMENT or 1\n fmt = '{:0' + num * 2 + 'x}'\n return [str.format(fmt, x) for x in array].join(sep)\n\ndef bytes_to_string_decoder(bytes, offset):\n offset = offset or 0\n if offset:\n bytes = bytes.subarray(offset)\n return TextDecoder('utf-8').decode(bytes)\n\ndef bytes_to_string_slow(bytes, offset):\n ans = v'[]'\n i = offset or 0\n while i < bytes.length:\n c = bytes[i]\n if c < 128:\n ans.push(String.fromCharCode(c))\n i += 1\n elif 191 < c < 224:\n ans.push(String.fromCharCode(((c & 0x1f) << 6) | (bytes[i + 1] & 0x3f)))\n i += 2\n else:\n ans.push(String.fromCharCode(((c & 0x0f) << 12) | ((bytes[i + 1] & 0x3f) << 6) | (bytes[i + 2] & 0x3f)))\n i += 3\n return ans.join('')\n\nstring_to_bytes = string_to_bytes_encoder if jstype(TextEncoder) is 'function' else string_to_bytes_slow\nbytes_to_string = bytes_to_string_decoder if jstype(TextDecoder) is 'function' else bytes_to_string_slow\n\ndef increment_counter(c):\n # c must be a Uint8Array of length 16\n for v'var i = 15; i >= 12; i--':\n if c[i] is 255:\n c[i] = 0\n else:\n c[i] += 1\n break\n\ndef convert_to_int32(bytes, output, offset, length):\n offset = offset or 0\n length = length or bytes.length\n for v'var i = offset, j = 0; i < offset + length; i += 4, j++':\n output[j] = (bytes[i] << 24) | (bytes[i + 1] << 16) | (bytes[i + 2] << 8) | bytes[i + 3]\n\ndef convert_to_int32_pad(bytes):\n extra = bytes.length % 4\n if extra:\n t = Uint8Array(bytes.length + 4 - extra)\n t.set(bytes)\n bytes = t\n ans = Uint32Array(bytes.length / 4)\n convert_to_int32(bytes, ans)\n return ans\n\nif not Uint8Array.prototype.fill:\n Uint8Array.prototype.fill = Uint32Array.prototype.fill = def(val, start, end):\n start = start or 0\n if end is undefined:\n end = this.length\n if start < 0:\n start += this.length\n if end < 0:\n end += this.length\n for v'var i = start; i < end; i++':\n this[i] = val\n\ndef from_64_to_32(num):\n # convert 64-bit number to two BE Int32s\n ans = Uint32Array(2)\n ans[0] = (num / 0x100000000) | 0\n ans[1] = num & 0xFFFFFFFF\n return ans\n\n# Lookup tables for AES {{{\n# Number of rounds by keysize\nnumber_of_rounds = {16: 10, 24: 12, 32: 14}\n# Round constant words\nrcon = v'new Uint32Array([0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91])'\n\n# S-box and Inverse S-box (S is for Substitution)\nS = v'new Uint32Array([0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16])'\nSi = v'new Uint32Array([0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d])'\n\n# Transformations for encryption\nT1 = v'new Uint32Array([0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d, 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554, 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d, 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a, 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87, 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b, 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea, 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b, 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a, 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f, 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108, 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f, 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e, 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5, 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d, 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f, 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e, 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb, 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce, 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497, 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c, 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed, 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b, 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a, 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16, 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594, 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81, 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3, 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a, 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504, 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163, 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d, 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f, 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739, 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47, 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395, 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f, 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883, 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c, 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76, 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e, 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4, 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6, 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b, 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7, 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0, 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25, 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818, 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72, 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651, 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21, 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85, 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa, 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12, 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0, 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9, 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133, 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7, 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920, 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a, 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17, 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8, 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11, 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a])'\nT2 = v'new Uint32Array([0xa5c66363, 0x84f87c7c, 0x99ee7777, 0x8df67b7b, 0x0dfff2f2, 0xbdd66b6b, 0xb1de6f6f, 0x5491c5c5, 0x50603030, 0x03020101, 0xa9ce6767, 0x7d562b2b, 0x19e7fefe, 0x62b5d7d7, 0xe64dabab, 0x9aec7676, 0x458fcaca, 0x9d1f8282, 0x4089c9c9, 0x87fa7d7d, 0x15effafa, 0xebb25959, 0xc98e4747, 0x0bfbf0f0, 0xec41adad, 0x67b3d4d4, 0xfd5fa2a2, 0xea45afaf, 0xbf239c9c, 0xf753a4a4, 0x96e47272, 0x5b9bc0c0, 0xc275b7b7, 0x1ce1fdfd, 0xae3d9393, 0x6a4c2626, 0x5a6c3636, 0x417e3f3f, 0x02f5f7f7, 0x4f83cccc, 0x5c683434, 0xf451a5a5, 0x34d1e5e5, 0x08f9f1f1, 0x93e27171, 0x73abd8d8, 0x53623131, 0x3f2a1515, 0x0c080404, 0x5295c7c7, 0x65462323, 0x5e9dc3c3, 0x28301818, 0xa1379696, 0x0f0a0505, 0xb52f9a9a, 0x090e0707, 0x36241212, 0x9b1b8080, 0x3ddfe2e2, 0x26cdebeb, 0x694e2727, 0xcd7fb2b2, 0x9fea7575, 0x1b120909, 0x9e1d8383, 0x74582c2c, 0x2e341a1a, 0x2d361b1b, 0xb2dc6e6e, 0xeeb45a5a, 0xfb5ba0a0, 0xf6a45252, 0x4d763b3b, 0x61b7d6d6, 0xce7db3b3, 0x7b522929, 0x3edde3e3, 0x715e2f2f, 0x97138484, 0xf5a65353, 0x68b9d1d1, 0x00000000, 0x2cc1eded, 0x60402020, 0x1fe3fcfc, 0xc879b1b1, 0xedb65b5b, 0xbed46a6a, 0x468dcbcb, 0xd967bebe, 0x4b723939, 0xde944a4a, 0xd4984c4c, 0xe8b05858, 0x4a85cfcf, 0x6bbbd0d0, 0x2ac5efef, 0xe54faaaa, 0x16edfbfb, 0xc5864343, 0xd79a4d4d, 0x55663333, 0x94118585, 0xcf8a4545, 0x10e9f9f9, 0x06040202, 0x81fe7f7f, 0xf0a05050, 0x44783c3c, 0xba259f9f, 0xe34ba8a8, 0xf3a25151, 0xfe5da3a3, 0xc0804040, 0x8a058f8f, 0xad3f9292, 0xbc219d9d, 0x48703838, 0x04f1f5f5, 0xdf63bcbc, 0xc177b6b6, 0x75afdada, 0x63422121, 0x30201010, 0x1ae5ffff, 0x0efdf3f3, 0x6dbfd2d2, 0x4c81cdcd, 0x14180c0c, 0x35261313, 0x2fc3ecec, 0xe1be5f5f, 0xa2359797, 0xcc884444, 0x392e1717, 0x5793c4c4, 0xf255a7a7, 0x82fc7e7e, 0x477a3d3d, 0xacc86464, 0xe7ba5d5d, 0x2b321919, 0x95e67373, 0xa0c06060, 0x98198181, 0xd19e4f4f, 0x7fa3dcdc, 0x66442222, 0x7e542a2a, 0xab3b9090, 0x830b8888, 0xca8c4646, 0x29c7eeee, 0xd36bb8b8, 0x3c281414, 0x79a7dede, 0xe2bc5e5e, 0x1d160b0b, 0x76addbdb, 0x3bdbe0e0, 0x56643232, 0x4e743a3a, 0x1e140a0a, 0xdb924949, 0x0a0c0606, 0x6c482424, 0xe4b85c5c, 0x5d9fc2c2, 0x6ebdd3d3, 0xef43acac, 0xa6c46262, 0xa8399191, 0xa4319595, 0x37d3e4e4, 0x8bf27979, 0x32d5e7e7, 0x438bc8c8, 0x596e3737, 0xb7da6d6d, 0x8c018d8d, 0x64b1d5d5, 0xd29c4e4e, 0xe049a9a9, 0xb4d86c6c, 0xfaac5656, 0x07f3f4f4, 0x25cfeaea, 0xafca6565, 0x8ef47a7a, 0xe947aeae, 0x18100808, 0xd56fbaba, 0x88f07878, 0x6f4a2525, 0x725c2e2e, 0x24381c1c, 0xf157a6a6, 0xc773b4b4, 0x5197c6c6, 0x23cbe8e8, 0x7ca1dddd, 0x9ce87474, 0x213e1f1f, 0xdd964b4b, 0xdc61bdbd, 0x860d8b8b, 0x850f8a8a, 0x90e07070, 0x427c3e3e, 0xc471b5b5, 0xaacc6666, 0xd8904848, 0x05060303, 0x01f7f6f6, 0x121c0e0e, 0xa3c26161, 0x5f6a3535, 0xf9ae5757, 0xd069b9b9, 0x91178686, 0x5899c1c1, 0x273a1d1d, 0xb9279e9e, 0x38d9e1e1, 0x13ebf8f8, 0xb32b9898, 0x33221111, 0xbbd26969, 0x70a9d9d9, 0x89078e8e, 0xa7339494, 0xb62d9b9b, 0x223c1e1e, 0x92158787, 0x20c9e9e9, 0x4987cece, 0xffaa5555, 0x78502828, 0x7aa5dfdf, 0x8f038c8c, 0xf859a1a1, 0x80098989, 0x171a0d0d, 0xda65bfbf, 0x31d7e6e6, 0xc6844242, 0xb8d06868, 0xc3824141, 0xb0299999, 0x775a2d2d, 0x111e0f0f, 0xcb7bb0b0, 0xfca85454, 0xd66dbbbb, 0x3a2c1616])'\nT3 = v'new Uint32Array([0x63a5c663, 0x7c84f87c, 0x7799ee77, 0x7b8df67b, 0xf20dfff2, 0x6bbdd66b, 0x6fb1de6f, 0xc55491c5, 0x30506030, 0x01030201, 0x67a9ce67, 0x2b7d562b, 0xfe19e7fe, 0xd762b5d7, 0xabe64dab, 0x769aec76, 0xca458fca, 0x829d1f82, 0xc94089c9, 0x7d87fa7d, 0xfa15effa, 0x59ebb259, 0x47c98e47, 0xf00bfbf0, 0xadec41ad, 0xd467b3d4, 0xa2fd5fa2, 0xafea45af, 0x9cbf239c, 0xa4f753a4, 0x7296e472, 0xc05b9bc0, 0xb7c275b7, 0xfd1ce1fd, 0x93ae3d93, 0x266a4c26, 0x365a6c36, 0x3f417e3f, 0xf702f5f7, 0xcc4f83cc, 0x345c6834, 0xa5f451a5, 0xe534d1e5, 0xf108f9f1, 0x7193e271, 0xd873abd8, 0x31536231, 0x153f2a15, 0x040c0804, 0xc75295c7, 0x23654623, 0xc35e9dc3, 0x18283018, 0x96a13796, 0x050f0a05, 0x9ab52f9a, 0x07090e07, 0x12362412, 0x809b1b80, 0xe23ddfe2, 0xeb26cdeb, 0x27694e27, 0xb2cd7fb2, 0x759fea75, 0x091b1209, 0x839e1d83, 0x2c74582c, 0x1a2e341a, 0x1b2d361b, 0x6eb2dc6e, 0x5aeeb45a, 0xa0fb5ba0, 0x52f6a452, 0x3b4d763b, 0xd661b7d6, 0xb3ce7db3, 0x297b5229, 0xe33edde3, 0x2f715e2f, 0x84971384, 0x53f5a653, 0xd168b9d1, 0x00000000, 0xed2cc1ed, 0x20604020, 0xfc1fe3fc, 0xb1c879b1, 0x5bedb65b, 0x6abed46a, 0xcb468dcb, 0xbed967be, 0x394b7239, 0x4ade944a, 0x4cd4984c, 0x58e8b058, 0xcf4a85cf, 0xd06bbbd0, 0xef2ac5ef, 0xaae54faa, 0xfb16edfb, 0x43c58643, 0x4dd79a4d, 0x33556633, 0x85941185, 0x45cf8a45, 0xf910e9f9, 0x02060402, 0x7f81fe7f, 0x50f0a050, 0x3c44783c, 0x9fba259f, 0xa8e34ba8, 0x51f3a251, 0xa3fe5da3, 0x40c08040, 0x8f8a058f, 0x92ad3f92, 0x9dbc219d, 0x38487038, 0xf504f1f5, 0xbcdf63bc, 0xb6c177b6, 0xda75afda, 0x21634221, 0x10302010, 0xff1ae5ff, 0xf30efdf3, 0xd26dbfd2, 0xcd4c81cd, 0x0c14180c, 0x13352613, 0xec2fc3ec, 0x5fe1be5f, 0x97a23597, 0x44cc8844, 0x17392e17, 0xc45793c4, 0xa7f255a7, 0x7e82fc7e, 0x3d477a3d, 0x64acc864, 0x5de7ba5d, 0x192b3219, 0x7395e673, 0x60a0c060, 0x81981981, 0x4fd19e4f, 0xdc7fa3dc, 0x22664422, 0x2a7e542a, 0x90ab3b90, 0x88830b88, 0x46ca8c46, 0xee29c7ee, 0xb8d36bb8, 0x143c2814, 0xde79a7de, 0x5ee2bc5e, 0x0b1d160b, 0xdb76addb, 0xe03bdbe0, 0x32566432, 0x3a4e743a, 0x0a1e140a, 0x49db9249, 0x060a0c06, 0x246c4824, 0x5ce4b85c, 0xc25d9fc2, 0xd36ebdd3, 0xacef43ac, 0x62a6c462, 0x91a83991, 0x95a43195, 0xe437d3e4, 0x798bf279, 0xe732d5e7, 0xc8438bc8, 0x37596e37, 0x6db7da6d, 0x8d8c018d, 0xd564b1d5, 0x4ed29c4e, 0xa9e049a9, 0x6cb4d86c, 0x56faac56, 0xf407f3f4, 0xea25cfea, 0x65afca65, 0x7a8ef47a, 0xaee947ae, 0x08181008, 0xbad56fba, 0x7888f078, 0x256f4a25, 0x2e725c2e, 0x1c24381c, 0xa6f157a6, 0xb4c773b4, 0xc65197c6, 0xe823cbe8, 0xdd7ca1dd, 0x749ce874, 0x1f213e1f, 0x4bdd964b, 0xbddc61bd, 0x8b860d8b, 0x8a850f8a, 0x7090e070, 0x3e427c3e, 0xb5c471b5, 0x66aacc66, 0x48d89048, 0x03050603, 0xf601f7f6, 0x0e121c0e, 0x61a3c261, 0x355f6a35, 0x57f9ae57, 0xb9d069b9, 0x86911786, 0xc15899c1, 0x1d273a1d, 0x9eb9279e, 0xe138d9e1, 0xf813ebf8, 0x98b32b98, 0x11332211, 0x69bbd269, 0xd970a9d9, 0x8e89078e, 0x94a73394, 0x9bb62d9b, 0x1e223c1e, 0x87921587, 0xe920c9e9, 0xce4987ce, 0x55ffaa55, 0x28785028, 0xdf7aa5df, 0x8c8f038c, 0xa1f859a1, 0x89800989, 0x0d171a0d, 0xbfda65bf, 0xe631d7e6, 0x42c68442, 0x68b8d068, 0x41c38241, 0x99b02999, 0x2d775a2d, 0x0f111e0f, 0xb0cb7bb0, 0x54fca854, 0xbbd66dbb, 0x163a2c16])'\nT4 = v'new Uint32Array([0x6363a5c6, 0x7c7c84f8, 0x777799ee, 0x7b7b8df6, 0xf2f20dff, 0x6b6bbdd6, 0x6f6fb1de, 0xc5c55491, 0x30305060, 0x01010302, 0x6767a9ce, 0x2b2b7d56, 0xfefe19e7, 0xd7d762b5, 0xababe64d, 0x76769aec, 0xcaca458f, 0x82829d1f, 0xc9c94089, 0x7d7d87fa, 0xfafa15ef, 0x5959ebb2, 0x4747c98e, 0xf0f00bfb, 0xadadec41, 0xd4d467b3, 0xa2a2fd5f, 0xafafea45, 0x9c9cbf23, 0xa4a4f753, 0x727296e4, 0xc0c05b9b, 0xb7b7c275, 0xfdfd1ce1, 0x9393ae3d, 0x26266a4c, 0x36365a6c, 0x3f3f417e, 0xf7f702f5, 0xcccc4f83, 0x34345c68, 0xa5a5f451, 0xe5e534d1, 0xf1f108f9, 0x717193e2, 0xd8d873ab, 0x31315362, 0x15153f2a, 0x04040c08, 0xc7c75295, 0x23236546, 0xc3c35e9d, 0x18182830, 0x9696a137, 0x05050f0a, 0x9a9ab52f, 0x0707090e, 0x12123624, 0x80809b1b, 0xe2e23ddf, 0xebeb26cd, 0x2727694e, 0xb2b2cd7f, 0x75759fea, 0x09091b12, 0x83839e1d, 0x2c2c7458, 0x1a1a2e34, 0x1b1b2d36, 0x6e6eb2dc, 0x5a5aeeb4, 0xa0a0fb5b, 0x5252f6a4, 0x3b3b4d76, 0xd6d661b7, 0xb3b3ce7d, 0x29297b52, 0xe3e33edd, 0x2f2f715e, 0x84849713, 0x5353f5a6, 0xd1d168b9, 0x00000000, 0xeded2cc1, 0x20206040, 0xfcfc1fe3, 0xb1b1c879, 0x5b5bedb6, 0x6a6abed4, 0xcbcb468d, 0xbebed967, 0x39394b72, 0x4a4ade94, 0x4c4cd498, 0x5858e8b0, 0xcfcf4a85, 0xd0d06bbb, 0xefef2ac5, 0xaaaae54f, 0xfbfb16ed, 0x4343c586, 0x4d4dd79a, 0x33335566, 0x85859411, 0x4545cf8a, 0xf9f910e9, 0x02020604, 0x7f7f81fe, 0x5050f0a0, 0x3c3c4478, 0x9f9fba25, 0xa8a8e34b, 0x5151f3a2, 0xa3a3fe5d, 0x4040c080, 0x8f8f8a05, 0x9292ad3f, 0x9d9dbc21, 0x38384870, 0xf5f504f1, 0xbcbcdf63, 0xb6b6c177, 0xdada75af, 0x21216342, 0x10103020, 0xffff1ae5, 0xf3f30efd, 0xd2d26dbf, 0xcdcd4c81, 0x0c0c1418, 0x13133526, 0xecec2fc3, 0x5f5fe1be, 0x9797a235, 0x4444cc88, 0x1717392e, 0xc4c45793, 0xa7a7f255, 0x7e7e82fc, 0x3d3d477a, 0x6464acc8, 0x5d5de7ba, 0x19192b32, 0x737395e6, 0x6060a0c0, 0x81819819, 0x4f4fd19e, 0xdcdc7fa3, 0x22226644, 0x2a2a7e54, 0x9090ab3b, 0x8888830b, 0x4646ca8c, 0xeeee29c7, 0xb8b8d36b, 0x14143c28, 0xdede79a7, 0x5e5ee2bc, 0x0b0b1d16, 0xdbdb76ad, 0xe0e03bdb, 0x32325664, 0x3a3a4e74, 0x0a0a1e14, 0x4949db92, 0x06060a0c, 0x24246c48, 0x5c5ce4b8, 0xc2c25d9f, 0xd3d36ebd, 0xacacef43, 0x6262a6c4, 0x9191a839, 0x9595a431, 0xe4e437d3, 0x79798bf2, 0xe7e732d5, 0xc8c8438b, 0x3737596e, 0x6d6db7da, 0x8d8d8c01, 0xd5d564b1, 0x4e4ed29c, 0xa9a9e049, 0x6c6cb4d8, 0x5656faac, 0xf4f407f3, 0xeaea25cf, 0x6565afca, 0x7a7a8ef4, 0xaeaee947, 0x08081810, 0xbabad56f, 0x787888f0, 0x25256f4a, 0x2e2e725c, 0x1c1c2438, 0xa6a6f157, 0xb4b4c773, 0xc6c65197, 0xe8e823cb, 0xdddd7ca1, 0x74749ce8, 0x1f1f213e, 0x4b4bdd96, 0xbdbddc61, 0x8b8b860d, 0x8a8a850f, 0x707090e0, 0x3e3e427c, 0xb5b5c471, 0x6666aacc, 0x4848d890, 0x03030506, 0xf6f601f7, 0x0e0e121c, 0x6161a3c2, 0x35355f6a, 0x5757f9ae, 0xb9b9d069, 0x86869117, 0xc1c15899, 0x1d1d273a, 0x9e9eb927, 0xe1e138d9, 0xf8f813eb, 0x9898b32b, 0x11113322, 0x6969bbd2, 0xd9d970a9, 0x8e8e8907, 0x9494a733, 0x9b9bb62d, 0x1e1e223c, 0x87879215, 0xe9e920c9, 0xcece4987, 0x5555ffaa, 0x28287850, 0xdfdf7aa5, 0x8c8c8f03, 0xa1a1f859, 0x89898009, 0x0d0d171a, 0xbfbfda65, 0xe6e631d7, 0x4242c684, 0x6868b8d0, 0x4141c382, 0x9999b029, 0x2d2d775a, 0x0f0f111e, 0xb0b0cb7b, 0x5454fca8, 0xbbbbd66d, 0x16163a2c])'\n\n# Transformations for decryption\nT5 = v'new Uint32Array([0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96, 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393, 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25, 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f, 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1, 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6, 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da, 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844, 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd, 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4, 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45, 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94, 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7, 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a, 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5, 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c, 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1, 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a, 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75, 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051, 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46, 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff, 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77, 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb, 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000, 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e, 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927, 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a, 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e, 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16, 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d, 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8, 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd, 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34, 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163, 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120, 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d, 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0, 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422, 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef, 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36, 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4, 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662, 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5, 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3, 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b, 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8, 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6, 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6, 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0, 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815, 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f, 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df, 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f, 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e, 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713, 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89, 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c, 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf, 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86, 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f, 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541, 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190, 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742])'\nT6 = v'new Uint32Array([0x5051f4a7, 0x537e4165, 0xc31a17a4, 0x963a275e, 0xcb3bab6b, 0xf11f9d45, 0xabacfa58, 0x934be303, 0x552030fa, 0xf6ad766d, 0x9188cc76, 0x25f5024c, 0xfc4fe5d7, 0xd7c52acb, 0x80263544, 0x8fb562a3, 0x49deb15a, 0x6725ba1b, 0x9845ea0e, 0xe15dfec0, 0x02c32f75, 0x12814cf0, 0xa38d4697, 0xc66bd3f9, 0xe7038f5f, 0x9515929c, 0xebbf6d7a, 0xda955259, 0x2dd4be83, 0xd3587421, 0x2949e069, 0x448ec9c8, 0x6a75c289, 0x78f48e79, 0x6b99583e, 0xdd27b971, 0xb6bee14f, 0x17f088ad, 0x66c920ac, 0xb47dce3a, 0x1863df4a, 0x82e51a31, 0x60975133, 0x4562537f, 0xe0b16477, 0x84bb6bae, 0x1cfe81a0, 0x94f9082b, 0x58704868, 0x198f45fd, 0x8794de6c, 0xb7527bf8, 0x23ab73d3, 0xe2724b02, 0x57e31f8f, 0x2a6655ab, 0x07b2eb28, 0x032fb5c2, 0x9a86c57b, 0xa5d33708, 0xf2302887, 0xb223bfa5, 0xba02036a, 0x5ced1682, 0x2b8acf1c, 0x92a779b4, 0xf0f307f2, 0xa14e69e2, 0xcd65daf4, 0xd50605be, 0x1fd13462, 0x8ac4a6fe, 0x9d342e53, 0xa0a2f355, 0x32058ae1, 0x75a4f6eb, 0x390b83ec, 0xaa4060ef, 0x065e719f, 0x51bd6e10, 0xf93e218a, 0x3d96dd06, 0xaedd3e05, 0x464de6bd, 0xb591548d, 0x0571c45d, 0x6f0406d4, 0xff605015, 0x241998fb, 0x97d6bde9, 0xcc894043, 0x7767d99e, 0xbdb0e842, 0x8807898b, 0x38e7195b, 0xdb79c8ee, 0x47a17c0a, 0xe97c420f, 0xc9f8841e, 0x00000000, 0x83098086, 0x48322bed, 0xac1e1170, 0x4e6c5a72, 0xfbfd0eff, 0x560f8538, 0x1e3daed5, 0x27362d39, 0x640a0fd9, 0x21685ca6, 0xd19b5b54, 0x3a24362e, 0xb10c0a67, 0x0f9357e7, 0xd2b4ee96, 0x9e1b9b91, 0x4f80c0c5, 0xa261dc20, 0x695a774b, 0x161c121a, 0x0ae293ba, 0xe5c0a02a, 0x433c22e0, 0x1d121b17, 0x0b0e090d, 0xadf28bc7, 0xb92db6a8, 0xc8141ea9, 0x8557f119, 0x4caf7507, 0xbbee99dd, 0xfda37f60, 0x9ff70126, 0xbc5c72f5, 0xc544663b, 0x345bfb7e, 0x768b4329, 0xdccb23c6, 0x68b6edfc, 0x63b8e4f1, 0xcad731dc, 0x10426385, 0x40139722, 0x2084c611, 0x7d854a24, 0xf8d2bb3d, 0x11aef932, 0x6dc729a1, 0x4b1d9e2f, 0xf3dcb230, 0xec0d8652, 0xd077c1e3, 0x6c2bb316, 0x99a970b9, 0xfa119448, 0x2247e964, 0xc4a8fc8c, 0x1aa0f03f, 0xd8567d2c, 0xef223390, 0xc787494e, 0xc1d938d1, 0xfe8ccaa2, 0x3698d40b, 0xcfa6f581, 0x28a57ade, 0x26dab78e, 0xa43fadbf, 0xe42c3a9d, 0x0d507892, 0x9b6a5fcc, 0x62547e46, 0xc2f68d13, 0xe890d8b8, 0x5e2e39f7, 0xf582c3af, 0xbe9f5d80, 0x7c69d093, 0xa96fd52d, 0xb3cf2512, 0x3bc8ac99, 0xa710187d, 0x6ee89c63, 0x7bdb3bbb, 0x09cd2678, 0xf46e5918, 0x01ec9ab7, 0xa8834f9a, 0x65e6956e, 0x7eaaffe6, 0x0821bccf, 0xe6ef15e8, 0xd9bae79b, 0xce4a6f36, 0xd4ea9f09, 0xd629b07c, 0xaf31a4b2, 0x312a3f23, 0x30c6a594, 0xc035a266, 0x37744ebc, 0xa6fc82ca, 0xb0e090d0, 0x1533a7d8, 0x4af10498, 0xf741ecda, 0x0e7fcd50, 0x2f1791f6, 0x8d764dd6, 0x4d43efb0, 0x54ccaa4d, 0xdfe49604, 0xe39ed1b5, 0x1b4c6a88, 0xb8c12c1f, 0x7f466551, 0x049d5eea, 0x5d018c35, 0x73fa8774, 0x2efb0b41, 0x5ab3671d, 0x5292dbd2, 0x33e91056, 0x136dd647, 0x8c9ad761, 0x7a37a10c, 0x8e59f814, 0x89eb133c, 0xeecea927, 0x35b761c9, 0xede11ce5, 0x3c7a47b1, 0x599cd2df, 0x3f55f273, 0x791814ce, 0xbf73c737, 0xea53f7cd, 0x5b5ffdaa, 0x14df3d6f, 0x867844db, 0x81caaff3, 0x3eb968c4, 0x2c382434, 0x5fc2a340, 0x72161dc3, 0x0cbce225, 0x8b283c49, 0x41ff0d95, 0x7139a801, 0xde080cb3, 0x9cd8b4e4, 0x906456c1, 0x617bcb84, 0x70d532b6, 0x74486c5c, 0x42d0b857])'\nT7 = v'new Uint32Array([0xa75051f4, 0x65537e41, 0xa4c31a17, 0x5e963a27, 0x6bcb3bab, 0x45f11f9d, 0x58abacfa, 0x03934be3, 0xfa552030, 0x6df6ad76, 0x769188cc, 0x4c25f502, 0xd7fc4fe5, 0xcbd7c52a, 0x44802635, 0xa38fb562, 0x5a49deb1, 0x1b6725ba, 0x0e9845ea, 0xc0e15dfe, 0x7502c32f, 0xf012814c, 0x97a38d46, 0xf9c66bd3, 0x5fe7038f, 0x9c951592, 0x7aebbf6d, 0x59da9552, 0x832dd4be, 0x21d35874, 0x692949e0, 0xc8448ec9, 0x896a75c2, 0x7978f48e, 0x3e6b9958, 0x71dd27b9, 0x4fb6bee1, 0xad17f088, 0xac66c920, 0x3ab47dce, 0x4a1863df, 0x3182e51a, 0x33609751, 0x7f456253, 0x77e0b164, 0xae84bb6b, 0xa01cfe81, 0x2b94f908, 0x68587048, 0xfd198f45, 0x6c8794de, 0xf8b7527b, 0xd323ab73, 0x02e2724b, 0x8f57e31f, 0xab2a6655, 0x2807b2eb, 0xc2032fb5, 0x7b9a86c5, 0x08a5d337, 0x87f23028, 0xa5b223bf, 0x6aba0203, 0x825ced16, 0x1c2b8acf, 0xb492a779, 0xf2f0f307, 0xe2a14e69, 0xf4cd65da, 0xbed50605, 0x621fd134, 0xfe8ac4a6, 0x539d342e, 0x55a0a2f3, 0xe132058a, 0xeb75a4f6, 0xec390b83, 0xefaa4060, 0x9f065e71, 0x1051bd6e, 0x8af93e21, 0x063d96dd, 0x05aedd3e, 0xbd464de6, 0x8db59154, 0x5d0571c4, 0xd46f0406, 0x15ff6050, 0xfb241998, 0xe997d6bd, 0x43cc8940, 0x9e7767d9, 0x42bdb0e8, 0x8b880789, 0x5b38e719, 0xeedb79c8, 0x0a47a17c, 0x0fe97c42, 0x1ec9f884, 0x00000000, 0x86830980, 0xed48322b, 0x70ac1e11, 0x724e6c5a, 0xfffbfd0e, 0x38560f85, 0xd51e3dae, 0x3927362d, 0xd9640a0f, 0xa621685c, 0x54d19b5b, 0x2e3a2436, 0x67b10c0a, 0xe70f9357, 0x96d2b4ee, 0x919e1b9b, 0xc54f80c0, 0x20a261dc, 0x4b695a77, 0x1a161c12, 0xba0ae293, 0x2ae5c0a0, 0xe0433c22, 0x171d121b, 0x0d0b0e09, 0xc7adf28b, 0xa8b92db6, 0xa9c8141e, 0x198557f1, 0x074caf75, 0xddbbee99, 0x60fda37f, 0x269ff701, 0xf5bc5c72, 0x3bc54466, 0x7e345bfb, 0x29768b43, 0xc6dccb23, 0xfc68b6ed, 0xf163b8e4, 0xdccad731, 0x85104263, 0x22401397, 0x112084c6, 0x247d854a, 0x3df8d2bb, 0x3211aef9, 0xa16dc729, 0x2f4b1d9e, 0x30f3dcb2, 0x52ec0d86, 0xe3d077c1, 0x166c2bb3, 0xb999a970, 0x48fa1194, 0x642247e9, 0x8cc4a8fc, 0x3f1aa0f0, 0x2cd8567d, 0x90ef2233, 0x4ec78749, 0xd1c1d938, 0xa2fe8cca, 0x0b3698d4, 0x81cfa6f5, 0xde28a57a, 0x8e26dab7, 0xbfa43fad, 0x9de42c3a, 0x920d5078, 0xcc9b6a5f, 0x4662547e, 0x13c2f68d, 0xb8e890d8, 0xf75e2e39, 0xaff582c3, 0x80be9f5d, 0x937c69d0, 0x2da96fd5, 0x12b3cf25, 0x993bc8ac, 0x7da71018, 0x636ee89c, 0xbb7bdb3b, 0x7809cd26, 0x18f46e59, 0xb701ec9a, 0x9aa8834f, 0x6e65e695, 0xe67eaaff, 0xcf0821bc, 0xe8e6ef15, 0x9bd9bae7, 0x36ce4a6f, 0x09d4ea9f, 0x7cd629b0, 0xb2af31a4, 0x23312a3f, 0x9430c6a5, 0x66c035a2, 0xbc37744e, 0xcaa6fc82, 0xd0b0e090, 0xd81533a7, 0x984af104, 0xdaf741ec, 0x500e7fcd, 0xf62f1791, 0xd68d764d, 0xb04d43ef, 0x4d54ccaa, 0x04dfe496, 0xb5e39ed1, 0x881b4c6a, 0x1fb8c12c, 0x517f4665, 0xea049d5e, 0x355d018c, 0x7473fa87, 0x412efb0b, 0x1d5ab367, 0xd25292db, 0x5633e910, 0x47136dd6, 0x618c9ad7, 0x0c7a37a1, 0x148e59f8, 0x3c89eb13, 0x27eecea9, 0xc935b761, 0xe5ede11c, 0xb13c7a47, 0xdf599cd2, 0x733f55f2, 0xce791814, 0x37bf73c7, 0xcdea53f7, 0xaa5b5ffd, 0x6f14df3d, 0xdb867844, 0xf381caaf, 0xc43eb968, 0x342c3824, 0x405fc2a3, 0xc372161d, 0x250cbce2, 0x498b283c, 0x9541ff0d, 0x017139a8, 0xb3de080c, 0xe49cd8b4, 0xc1906456, 0x84617bcb, 0xb670d532, 0x5c74486c, 0x5742d0b8])'\nT8 = v'new Uint32Array([0xf4a75051, 0x4165537e, 0x17a4c31a, 0x275e963a, 0xab6bcb3b, 0x9d45f11f, 0xfa58abac, 0xe303934b, 0x30fa5520, 0x766df6ad, 0xcc769188, 0x024c25f5, 0xe5d7fc4f, 0x2acbd7c5, 0x35448026, 0x62a38fb5, 0xb15a49de, 0xba1b6725, 0xea0e9845, 0xfec0e15d, 0x2f7502c3, 0x4cf01281, 0x4697a38d, 0xd3f9c66b, 0x8f5fe703, 0x929c9515, 0x6d7aebbf, 0x5259da95, 0xbe832dd4, 0x7421d358, 0xe0692949, 0xc9c8448e, 0xc2896a75, 0x8e7978f4, 0x583e6b99, 0xb971dd27, 0xe14fb6be, 0x88ad17f0, 0x20ac66c9, 0xce3ab47d, 0xdf4a1863, 0x1a3182e5, 0x51336097, 0x537f4562, 0x6477e0b1, 0x6bae84bb, 0x81a01cfe, 0x082b94f9, 0x48685870, 0x45fd198f, 0xde6c8794, 0x7bf8b752, 0x73d323ab, 0x4b02e272, 0x1f8f57e3, 0x55ab2a66, 0xeb2807b2, 0xb5c2032f, 0xc57b9a86, 0x3708a5d3, 0x2887f230, 0xbfa5b223, 0x036aba02, 0x16825ced, 0xcf1c2b8a, 0x79b492a7, 0x07f2f0f3, 0x69e2a14e, 0xdaf4cd65, 0x05bed506, 0x34621fd1, 0xa6fe8ac4, 0x2e539d34, 0xf355a0a2, 0x8ae13205, 0xf6eb75a4, 0x83ec390b, 0x60efaa40, 0x719f065e, 0x6e1051bd, 0x218af93e, 0xdd063d96, 0x3e05aedd, 0xe6bd464d, 0x548db591, 0xc45d0571, 0x06d46f04, 0x5015ff60, 0x98fb2419, 0xbde997d6, 0x4043cc89, 0xd99e7767, 0xe842bdb0, 0x898b8807, 0x195b38e7, 0xc8eedb79, 0x7c0a47a1, 0x420fe97c, 0x841ec9f8, 0x00000000, 0x80868309, 0x2bed4832, 0x1170ac1e, 0x5a724e6c, 0x0efffbfd, 0x8538560f, 0xaed51e3d, 0x2d392736, 0x0fd9640a, 0x5ca62168, 0x5b54d19b, 0x362e3a24, 0x0a67b10c, 0x57e70f93, 0xee96d2b4, 0x9b919e1b, 0xc0c54f80, 0xdc20a261, 0x774b695a, 0x121a161c, 0x93ba0ae2, 0xa02ae5c0, 0x22e0433c, 0x1b171d12, 0x090d0b0e, 0x8bc7adf2, 0xb6a8b92d, 0x1ea9c814, 0xf1198557, 0x75074caf, 0x99ddbbee, 0x7f60fda3, 0x01269ff7, 0x72f5bc5c, 0x663bc544, 0xfb7e345b, 0x4329768b, 0x23c6dccb, 0xedfc68b6, 0xe4f163b8, 0x31dccad7, 0x63851042, 0x97224013, 0xc6112084, 0x4a247d85, 0xbb3df8d2, 0xf93211ae, 0x29a16dc7, 0x9e2f4b1d, 0xb230f3dc, 0x8652ec0d, 0xc1e3d077, 0xb3166c2b, 0x70b999a9, 0x9448fa11, 0xe9642247, 0xfc8cc4a8, 0xf03f1aa0, 0x7d2cd856, 0x3390ef22, 0x494ec787, 0x38d1c1d9, 0xcaa2fe8c, 0xd40b3698, 0xf581cfa6, 0x7ade28a5, 0xb78e26da, 0xadbfa43f, 0x3a9de42c, 0x78920d50, 0x5fcc9b6a, 0x7e466254, 0x8d13c2f6, 0xd8b8e890, 0x39f75e2e, 0xc3aff582, 0x5d80be9f, 0xd0937c69, 0xd52da96f, 0x2512b3cf, 0xac993bc8, 0x187da710, 0x9c636ee8, 0x3bbb7bdb, 0x267809cd, 0x5918f46e, 0x9ab701ec, 0x4f9aa883, 0x956e65e6, 0xffe67eaa, 0xbccf0821, 0x15e8e6ef, 0xe79bd9ba, 0x6f36ce4a, 0x9f09d4ea, 0xb07cd629, 0xa4b2af31, 0x3f23312a, 0xa59430c6, 0xa266c035, 0x4ebc3774, 0x82caa6fc, 0x90d0b0e0, 0xa7d81533, 0x04984af1, 0xecdaf741, 0xcd500e7f, 0x91f62f17, 0x4dd68d76, 0xefb04d43, 0xaa4d54cc, 0x9604dfe4, 0xd1b5e39e, 0x6a881b4c, 0x2c1fb8c1, 0x65517f46, 0x5eea049d, 0x8c355d01, 0x877473fa, 0x0b412efb, 0x671d5ab3, 0xdbd25292, 0x105633e9, 0xd647136d, 0xd7618c9a, 0xa10c7a37, 0xf8148e59, 0x133c89eb, 0xa927eece, 0x61c935b7, 0x1ce5ede1, 0x47b13c7a, 0xd2df599c, 0xf2733f55, 0x14ce7918, 0xc737bf73, 0xf7cdea53, 0xfdaa5b5f, 0x3d6f14df, 0x44db8678, 0xaff381ca, 0x68c43eb9, 0x24342c38, 0xa3405fc2, 0x1dc37216, 0xe2250cbc, 0x3c498b28, 0x0d9541ff, 0xa8017139, 0x0cb3de08, 0xb4e49cd8, 0x56c19064, 0xcb84617b, 0x32b670d5, 0x6c5c7448, 0xb85742d0])'\n\n# Transformations for decryption key expansion\nU1 = v'new Uint32Array([0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3])'\nU2 = v'new Uint32Array([0x00000000, 0x0b0e090d, 0x161c121a, 0x1d121b17, 0x2c382434, 0x27362d39, 0x3a24362e, 0x312a3f23, 0x58704868, 0x537e4165, 0x4e6c5a72, 0x4562537f, 0x74486c5c, 0x7f466551, 0x62547e46, 0x695a774b, 0xb0e090d0, 0xbbee99dd, 0xa6fc82ca, 0xadf28bc7, 0x9cd8b4e4, 0x97d6bde9, 0x8ac4a6fe, 0x81caaff3, 0xe890d8b8, 0xe39ed1b5, 0xfe8ccaa2, 0xf582c3af, 0xc4a8fc8c, 0xcfa6f581, 0xd2b4ee96, 0xd9bae79b, 0x7bdb3bbb, 0x70d532b6, 0x6dc729a1, 0x66c920ac, 0x57e31f8f, 0x5ced1682, 0x41ff0d95, 0x4af10498, 0x23ab73d3, 0x28a57ade, 0x35b761c9, 0x3eb968c4, 0x0f9357e7, 0x049d5eea, 0x198f45fd, 0x12814cf0, 0xcb3bab6b, 0xc035a266, 0xdd27b971, 0xd629b07c, 0xe7038f5f, 0xec0d8652, 0xf11f9d45, 0xfa119448, 0x934be303, 0x9845ea0e, 0x8557f119, 0x8e59f814, 0xbf73c737, 0xb47dce3a, 0xa96fd52d, 0xa261dc20, 0xf6ad766d, 0xfda37f60, 0xe0b16477, 0xebbf6d7a, 0xda955259, 0xd19b5b54, 0xcc894043, 0xc787494e, 0xaedd3e05, 0xa5d33708, 0xb8c12c1f, 0xb3cf2512, 0x82e51a31, 0x89eb133c, 0x94f9082b, 0x9ff70126, 0x464de6bd, 0x4d43efb0, 0x5051f4a7, 0x5b5ffdaa, 0x6a75c289, 0x617bcb84, 0x7c69d093, 0x7767d99e, 0x1e3daed5, 0x1533a7d8, 0x0821bccf, 0x032fb5c2, 0x32058ae1, 0x390b83ec, 0x241998fb, 0x2f1791f6, 0x8d764dd6, 0x867844db, 0x9b6a5fcc, 0x906456c1, 0xa14e69e2, 0xaa4060ef, 0xb7527bf8, 0xbc5c72f5, 0xd50605be, 0xde080cb3, 0xc31a17a4, 0xc8141ea9, 0xf93e218a, 0xf2302887, 0xef223390, 0xe42c3a9d, 0x3d96dd06, 0x3698d40b, 0x2b8acf1c, 0x2084c611, 0x11aef932, 0x1aa0f03f, 0x07b2eb28, 0x0cbce225, 0x65e6956e, 0x6ee89c63, 0x73fa8774, 0x78f48e79, 0x49deb15a, 0x42d0b857, 0x5fc2a340, 0x54ccaa4d, 0xf741ecda, 0xfc4fe5d7, 0xe15dfec0, 0xea53f7cd, 0xdb79c8ee, 0xd077c1e3, 0xcd65daf4, 0xc66bd3f9, 0xaf31a4b2, 0xa43fadbf, 0xb92db6a8, 0xb223bfa5, 0x83098086, 0x8807898b, 0x9515929c, 0x9e1b9b91, 0x47a17c0a, 0x4caf7507, 0x51bd6e10, 0x5ab3671d, 0x6b99583e, 0x60975133, 0x7d854a24, 0x768b4329, 0x1fd13462, 0x14df3d6f, 0x09cd2678, 0x02c32f75, 0x33e91056, 0x38e7195b, 0x25f5024c, 0x2efb0b41, 0x8c9ad761, 0x8794de6c, 0x9a86c57b, 0x9188cc76, 0xa0a2f355, 0xabacfa58, 0xb6bee14f, 0xbdb0e842, 0xd4ea9f09, 0xdfe49604, 0xc2f68d13, 0xc9f8841e, 0xf8d2bb3d, 0xf3dcb230, 0xeecea927, 0xe5c0a02a, 0x3c7a47b1, 0x37744ebc, 0x2a6655ab, 0x21685ca6, 0x10426385, 0x1b4c6a88, 0x065e719f, 0x0d507892, 0x640a0fd9, 0x6f0406d4, 0x72161dc3, 0x791814ce, 0x48322bed, 0x433c22e0, 0x5e2e39f7, 0x552030fa, 0x01ec9ab7, 0x0ae293ba, 0x17f088ad, 0x1cfe81a0, 0x2dd4be83, 0x26dab78e, 0x3bc8ac99, 0x30c6a594, 0x599cd2df, 0x5292dbd2, 0x4f80c0c5, 0x448ec9c8, 0x75a4f6eb, 0x7eaaffe6, 0x63b8e4f1, 0x68b6edfc, 0xb10c0a67, 0xba02036a, 0xa710187d, 0xac1e1170, 0x9d342e53, 0x963a275e, 0x8b283c49, 0x80263544, 0xe97c420f, 0xe2724b02, 0xff605015, 0xf46e5918, 0xc544663b, 0xce4a6f36, 0xd3587421, 0xd8567d2c, 0x7a37a10c, 0x7139a801, 0x6c2bb316, 0x6725ba1b, 0x560f8538, 0x5d018c35, 0x40139722, 0x4b1d9e2f, 0x2247e964, 0x2949e069, 0x345bfb7e, 0x3f55f273, 0x0e7fcd50, 0x0571c45d, 0x1863df4a, 0x136dd647, 0xcad731dc, 0xc1d938d1, 0xdccb23c6, 0xd7c52acb, 0xe6ef15e8, 0xede11ce5, 0xf0f307f2, 0xfbfd0eff, 0x92a779b4, 0x99a970b9, 0x84bb6bae, 0x8fb562a3, 0xbe9f5d80, 0xb591548d, 0xa8834f9a, 0xa38d4697])'\nU3 = v'new Uint32Array([0x00000000, 0x0d0b0e09, 0x1a161c12, 0x171d121b, 0x342c3824, 0x3927362d, 0x2e3a2436, 0x23312a3f, 0x68587048, 0x65537e41, 0x724e6c5a, 0x7f456253, 0x5c74486c, 0x517f4665, 0x4662547e, 0x4b695a77, 0xd0b0e090, 0xddbbee99, 0xcaa6fc82, 0xc7adf28b, 0xe49cd8b4, 0xe997d6bd, 0xfe8ac4a6, 0xf381caaf, 0xb8e890d8, 0xb5e39ed1, 0xa2fe8cca, 0xaff582c3, 0x8cc4a8fc, 0x81cfa6f5, 0x96d2b4ee, 0x9bd9bae7, 0xbb7bdb3b, 0xb670d532, 0xa16dc729, 0xac66c920, 0x8f57e31f, 0x825ced16, 0x9541ff0d, 0x984af104, 0xd323ab73, 0xde28a57a, 0xc935b761, 0xc43eb968, 0xe70f9357, 0xea049d5e, 0xfd198f45, 0xf012814c, 0x6bcb3bab, 0x66c035a2, 0x71dd27b9, 0x7cd629b0, 0x5fe7038f, 0x52ec0d86, 0x45f11f9d, 0x48fa1194, 0x03934be3, 0x0e9845ea, 0x198557f1, 0x148e59f8, 0x37bf73c7, 0x3ab47dce, 0x2da96fd5, 0x20a261dc, 0x6df6ad76, 0x60fda37f, 0x77e0b164, 0x7aebbf6d, 0x59da9552, 0x54d19b5b, 0x43cc8940, 0x4ec78749, 0x05aedd3e, 0x08a5d337, 0x1fb8c12c, 0x12b3cf25, 0x3182e51a, 0x3c89eb13, 0x2b94f908, 0x269ff701, 0xbd464de6, 0xb04d43ef, 0xa75051f4, 0xaa5b5ffd, 0x896a75c2, 0x84617bcb, 0x937c69d0, 0x9e7767d9, 0xd51e3dae, 0xd81533a7, 0xcf0821bc, 0xc2032fb5, 0xe132058a, 0xec390b83, 0xfb241998, 0xf62f1791, 0xd68d764d, 0xdb867844, 0xcc9b6a5f, 0xc1906456, 0xe2a14e69, 0xefaa4060, 0xf8b7527b, 0xf5bc5c72, 0xbed50605, 0xb3de080c, 0xa4c31a17, 0xa9c8141e, 0x8af93e21, 0x87f23028, 0x90ef2233, 0x9de42c3a, 0x063d96dd, 0x0b3698d4, 0x1c2b8acf, 0x112084c6, 0x3211aef9, 0x3f1aa0f0, 0x2807b2eb, 0x250cbce2, 0x6e65e695, 0x636ee89c, 0x7473fa87, 0x7978f48e, 0x5a49deb1, 0x5742d0b8, 0x405fc2a3, 0x4d54ccaa, 0xdaf741ec, 0xd7fc4fe5, 0xc0e15dfe, 0xcdea53f7, 0xeedb79c8, 0xe3d077c1, 0xf4cd65da, 0xf9c66bd3, 0xb2af31a4, 0xbfa43fad, 0xa8b92db6, 0xa5b223bf, 0x86830980, 0x8b880789, 0x9c951592, 0x919e1b9b, 0x0a47a17c, 0x074caf75, 0x1051bd6e, 0x1d5ab367, 0x3e6b9958, 0x33609751, 0x247d854a, 0x29768b43, 0x621fd134, 0x6f14df3d, 0x7809cd26, 0x7502c32f, 0x5633e910, 0x5b38e719, 0x4c25f502, 0x412efb0b, 0x618c9ad7, 0x6c8794de, 0x7b9a86c5, 0x769188cc, 0x55a0a2f3, 0x58abacfa, 0x4fb6bee1, 0x42bdb0e8, 0x09d4ea9f, 0x04dfe496, 0x13c2f68d, 0x1ec9f884, 0x3df8d2bb, 0x30f3dcb2, 0x27eecea9, 0x2ae5c0a0, 0xb13c7a47, 0xbc37744e, 0xab2a6655, 0xa621685c, 0x85104263, 0x881b4c6a, 0x9f065e71, 0x920d5078, 0xd9640a0f, 0xd46f0406, 0xc372161d, 0xce791814, 0xed48322b, 0xe0433c22, 0xf75e2e39, 0xfa552030, 0xb701ec9a, 0xba0ae293, 0xad17f088, 0xa01cfe81, 0x832dd4be, 0x8e26dab7, 0x993bc8ac, 0x9430c6a5, 0xdf599cd2, 0xd25292db, 0xc54f80c0, 0xc8448ec9, 0xeb75a4f6, 0xe67eaaff, 0xf163b8e4, 0xfc68b6ed, 0x67b10c0a, 0x6aba0203, 0x7da71018, 0x70ac1e11, 0x539d342e, 0x5e963a27, 0x498b283c, 0x44802635, 0x0fe97c42, 0x02e2724b, 0x15ff6050, 0x18f46e59, 0x3bc54466, 0x36ce4a6f, 0x21d35874, 0x2cd8567d, 0x0c7a37a1, 0x017139a8, 0x166c2bb3, 0x1b6725ba, 0x38560f85, 0x355d018c, 0x22401397, 0x2f4b1d9e, 0x642247e9, 0x692949e0, 0x7e345bfb, 0x733f55f2, 0x500e7fcd, 0x5d0571c4, 0x4a1863df, 0x47136dd6, 0xdccad731, 0xd1c1d938, 0xc6dccb23, 0xcbd7c52a, 0xe8e6ef15, 0xe5ede11c, 0xf2f0f307, 0xfffbfd0e, 0xb492a779, 0xb999a970, 0xae84bb6b, 0xa38fb562, 0x80be9f5d, 0x8db59154, 0x9aa8834f, 0x97a38d46])'\nU4 = v'new Uint32Array([0x00000000, 0x090d0b0e, 0x121a161c, 0x1b171d12, 0x24342c38, 0x2d392736, 0x362e3a24, 0x3f23312a, 0x48685870, 0x4165537e, 0x5a724e6c, 0x537f4562, 0x6c5c7448, 0x65517f46, 0x7e466254, 0x774b695a, 0x90d0b0e0, 0x99ddbbee, 0x82caa6fc, 0x8bc7adf2, 0xb4e49cd8, 0xbde997d6, 0xa6fe8ac4, 0xaff381ca, 0xd8b8e890, 0xd1b5e39e, 0xcaa2fe8c, 0xc3aff582, 0xfc8cc4a8, 0xf581cfa6, 0xee96d2b4, 0xe79bd9ba, 0x3bbb7bdb, 0x32b670d5, 0x29a16dc7, 0x20ac66c9, 0x1f8f57e3, 0x16825ced, 0x0d9541ff, 0x04984af1, 0x73d323ab, 0x7ade28a5, 0x61c935b7, 0x68c43eb9, 0x57e70f93, 0x5eea049d, 0x45fd198f, 0x4cf01281, 0xab6bcb3b, 0xa266c035, 0xb971dd27, 0xb07cd629, 0x8f5fe703, 0x8652ec0d, 0x9d45f11f, 0x9448fa11, 0xe303934b, 0xea0e9845, 0xf1198557, 0xf8148e59, 0xc737bf73, 0xce3ab47d, 0xd52da96f, 0xdc20a261, 0x766df6ad, 0x7f60fda3, 0x6477e0b1, 0x6d7aebbf, 0x5259da95, 0x5b54d19b, 0x4043cc89, 0x494ec787, 0x3e05aedd, 0x3708a5d3, 0x2c1fb8c1, 0x2512b3cf, 0x1a3182e5, 0x133c89eb, 0x082b94f9, 0x01269ff7, 0xe6bd464d, 0xefb04d43, 0xf4a75051, 0xfdaa5b5f, 0xc2896a75, 0xcb84617b, 0xd0937c69, 0xd99e7767, 0xaed51e3d, 0xa7d81533, 0xbccf0821, 0xb5c2032f, 0x8ae13205, 0x83ec390b, 0x98fb2419, 0x91f62f17, 0x4dd68d76, 0x44db8678, 0x5fcc9b6a, 0x56c19064, 0x69e2a14e, 0x60efaa40, 0x7bf8b752, 0x72f5bc5c, 0x05bed506, 0x0cb3de08, 0x17a4c31a, 0x1ea9c814, 0x218af93e, 0x2887f230, 0x3390ef22, 0x3a9de42c, 0xdd063d96, 0xd40b3698, 0xcf1c2b8a, 0xc6112084, 0xf93211ae, 0xf03f1aa0, 0xeb2807b2, 0xe2250cbc, 0x956e65e6, 0x9c636ee8, 0x877473fa, 0x8e7978f4, 0xb15a49de, 0xb85742d0, 0xa3405fc2, 0xaa4d54cc, 0xecdaf741, 0xe5d7fc4f, 0xfec0e15d, 0xf7cdea53, 0xc8eedb79, 0xc1e3d077, 0xdaf4cd65, 0xd3f9c66b, 0xa4b2af31, 0xadbfa43f, 0xb6a8b92d, 0xbfa5b223, 0x80868309, 0x898b8807, 0x929c9515, 0x9b919e1b, 0x7c0a47a1, 0x75074caf, 0x6e1051bd, 0x671d5ab3, 0x583e6b99, 0x51336097, 0x4a247d85, 0x4329768b, 0x34621fd1, 0x3d6f14df, 0x267809cd, 0x2f7502c3, 0x105633e9, 0x195b38e7, 0x024c25f5, 0x0b412efb, 0xd7618c9a, 0xde6c8794, 0xc57b9a86, 0xcc769188, 0xf355a0a2, 0xfa58abac, 0xe14fb6be, 0xe842bdb0, 0x9f09d4ea, 0x9604dfe4, 0x8d13c2f6, 0x841ec9f8, 0xbb3df8d2, 0xb230f3dc, 0xa927eece, 0xa02ae5c0, 0x47b13c7a, 0x4ebc3774, 0x55ab2a66, 0x5ca62168, 0x63851042, 0x6a881b4c, 0x719f065e, 0x78920d50, 0x0fd9640a, 0x06d46f04, 0x1dc37216, 0x14ce7918, 0x2bed4832, 0x22e0433c, 0x39f75e2e, 0x30fa5520, 0x9ab701ec, 0x93ba0ae2, 0x88ad17f0, 0x81a01cfe, 0xbe832dd4, 0xb78e26da, 0xac993bc8, 0xa59430c6, 0xd2df599c, 0xdbd25292, 0xc0c54f80, 0xc9c8448e, 0xf6eb75a4, 0xffe67eaa, 0xe4f163b8, 0xedfc68b6, 0x0a67b10c, 0x036aba02, 0x187da710, 0x1170ac1e, 0x2e539d34, 0x275e963a, 0x3c498b28, 0x35448026, 0x420fe97c, 0x4b02e272, 0x5015ff60, 0x5918f46e, 0x663bc544, 0x6f36ce4a, 0x7421d358, 0x7d2cd856, 0xa10c7a37, 0xa8017139, 0xb3166c2b, 0xba1b6725, 0x8538560f, 0x8c355d01, 0x97224013, 0x9e2f4b1d, 0xe9642247, 0xe0692949, 0xfb7e345b, 0xf2733f55, 0xcd500e7f, 0xc45d0571, 0xdf4a1863, 0xd647136d, 0x31dccad7, 0x38d1c1d9, 0x23c6dccb, 0x2acbd7c5, 0x15e8e6ef, 0x1ce5ede1, 0x07f2f0f3, 0x0efffbfd, 0x79b492a7, 0x70b999a9, 0x6bae84bb, 0x62a38fb5, 0x5d80be9f, 0x548db591, 0x4f9aa883, 0x4697a38d])'\n\n# }}}\n\nclass AES: # {{{\n\n def __init__(self, key):\n self.working_mem = [Uint32Array(4), Uint32Array(4)]\n rounds = number_of_rounds[key.length]\n if not rounds:\n raise ValueError('invalid key size (must be length 16, 24 or 32)')\n\n # encryption round keys\n self._Ke = v'[]'\n\n # decryption round keys\n self._Kd = v'[]'\n\n for v'var i = 0; i <= rounds; i++':\n self._Ke.push(Uint32Array(4))\n self._Kd.push(Uint32Array(4))\n\n round_key_count = (rounds + 1) * 4\n KC = key.length / 4\n\n # convert the key into ints\n tk = Uint32Array(KC)\n convert_to_int32(key, tk)\n\n # copy values into round key arrays\n index = 0\n for v'var i = 0; i < KC; i++':\n index = i >> 2\n self._Ke[index][i % 4] = tk[i]\n self._Kd[rounds - index][i % 4] = tk[i]\n\n # key expansion (fips-197 section 5.2)\n rconpointer = 0\n t = KC\n while t < round_key_count:\n tt = tk[KC - 1]\n tk[0] ^= ((S[(tt >> 16) & 0xFF] << 24) ^\n (S[(tt >> 8) & 0xFF] << 16) ^\n (S[ tt & 0xFF] << 8) ^\n S[(tt >> 24) & 0xFF] ^\n (rcon[rconpointer] << 24))\n rconpointer += 1\n\n # key expansion (for non-256 bit)\n if KC != 8:\n for v'var i = 1; i < KC; i++':\n tk[i] ^= tk[i - 1]\n\n # key expansion for 256-bit keys is \"slightly different\" (fips-197)\n else:\n for v'var i = 1; i < (KC / 2); i++':\n tk[i] ^= tk[i - 1]\n tt = tk[(KC / 2) - 1]\n\n tk[KC / 2] ^= (S[ tt & 0xFF] ^\n (S[(tt >> 8) & 0xFF] << 8) ^\n (S[(tt >> 16) & 0xFF] << 16) ^\n (S[(tt >> 24) & 0xFF] << 24))\n\n for v'var i = (KC / 2) + 1; i < KC; i++':\n tk[i] ^= tk[i - 1]\n\n # copy values into round key arrays\n i = 0\n while i < KC and t < round_key_count:\n r = t >> 2\n c = t % 4\n self._Ke[r][c] = tk[i]\n self._Kd[rounds - r][c] = tk[v'i++']\n t += 1\n\n # inverse-cipher-ify the decryption round key (fips-197 section 5.3)\n for v'var r = 1; r < rounds; r++':\n for v'var c = 0; c < 4; c++':\n tt = self._Kd[r][c]\n self._Kd[r][c] = (U1[(tt >> 24) & 0xFF] ^\n U2[(tt >> 16) & 0xFF] ^\n U3[(tt >> 8) & 0xFF] ^\n U4[ tt & 0xFF])\n\n def _crypt(self, ciphertext, offset, encrypt):\n if encrypt:\n R1 = T1; R2 = T2; R3 = T3; R4 = T4\n o1 = 1; o3 = 3\n SB = S\n K = self._Ke\n else:\n R1 = T5; R2 = T6; R3 = T7; R4 = T8\n o1 = 3; o3 = 1\n SB = Si\n K = self._Kd\n rounds = K.length - 1\n a = self.working_mem[0]\n t = self.working_mem[1]\n\n # XOR plaintext with key\n for v'var i = 0; i < 4; i++':\n t[i] ^= K[0][i]\n\n # apply round transforms\n for v'var r = 1; r < rounds; r++':\n for v'var i = 0; i < 4; i++':\n a[i] = (R1[(t[i] >> 24) & 0xff] ^\n R2[(t[(i + o1) % 4] >> 16) & 0xff] ^\n R3[(t[(i + 2) % 4] >> 8) & 0xff] ^\n R4[ t[(i + o3) % 4] & 0xff] ^\n K[r][i])\n t.set(a)\n\n # the last round is special\n for v'var i = 0; i < 4; i++':\n tt = K[rounds][i]\n ciphertext[offset + 4 * i] = (SB[(t[i] >> 24) & 0xff] ^ (tt >> 24)) & 0xff\n ciphertext[offset + 4 * i + 1] = (SB[(t[(i + o1) % 4] >> 16) & 0xff] ^ (tt >> 16)) & 0xff\n ciphertext[offset + 4 * i + 2] = (SB[(t[(i + 2) % 4] >> 8) & 0xff] ^ (tt >> 8)) & 0xff\n ciphertext[offset + 4 * i + 3] = (SB[ t[(i + o3) % 4] & 0xff] ^ tt ) & 0xff\n\n def encrypt(self, plaintext, ciphertext, offset):\n convert_to_int32(plaintext, self.working_mem[1], offset, 16)\n return self._crypt(ciphertext, offset, True)\n\n def encrypt32(self, plaintext, ciphertext, offset):\n self.working_mem[1].set(plaintext)\n return self._crypt(ciphertext, offset, True)\n\n def decrypt(self, ciphertext, plaintext, offset):\n convert_to_int32(ciphertext, self.working_mem[1], offset, 16)\n return self._crypt(plaintext, offset, False)\n\n def decrypt32(self, ciphertext, plaintext, offset):\n self.working_mem[1].set(ciphertext)\n return self._crypt(plaintext, offset, False)\n# }}}\n\ndef random_bytes_insecure(sz):\n ans = Uint8Array(sz)\n for v'var i = 0; i < sz; i++':\n ans[i] = Math.floor(Math.random() * 256)\n return ans\n\ndef random_bytes_secure(sz):\n ans = Uint8Array(sz)\n crypto.getRandomValues(ans)\n return ans\n\nrandom_bytes = random_bytes_secure if jstype(crypto) is not 'undefined' and jstype(crypto.getRandomValues) is 'function' else random_bytes_insecure\nif random_bytes is random_bytes_insecure:\n try:\n noderandom = require('crypto').randomBytes\n random_bytes = def(sz):\n return Uint8Array(noderandom(sz))\n except:\n print('WARNING: Using insecure RNG for AES')\n\nclass ModeOfOperation: # {{{\n\n def __init__(self, key):\n self.key = key or generate_key(32)\n self.aes = AES(self.key)\n\n @property\n def key_as_js(self):\n return typed_array_as_js(self.key)\n\n def tag_as_bytes(self, tag):\n if isinstance(tag, Uint8Array):\n return tag\n if not tag:\n return Uint8Array(0)\n if jstype(tag) is 'string':\n return string_to_bytes(tag)\n raise TypeError('Invalid tag, must be a string or a Uint8Array')\n# }}}\n\nclass GaloisField: # {{{\n\n def __init__(self, sub_key):\n k32 = Uint32Array(4)\n convert_to_int32(sub_key, k32, 0)\n self.m = self.generate_hash_table(k32)\n self.wmem = Uint32Array(4)\n\n def power(self, x, out):\n lsb = x[3] & 1\n for v'var i = 3; i > 0; --i':\n out[i] = (x[i] >>> 1) | ((x[i - 1] & 1) << 31)\n out[0] = x[0] >>> 1\n if lsb:\n out[0] ^= 0xE1000000\n\n def multiply(self, x, y):\n z_i = Uint32Array(4)\n v_i = Uint32Array(y)\n for v'var i = 0; i < 128; ++i':\n x_i = x[(i / 32) | 0] & (1 << (31 - i % 32))\n if x_i:\n z_i[0] ^= v_i[0]\n z_i[1] ^= v_i[1]\n z_i[2] ^= v_i[2]\n z_i[3] ^= v_i[3]\n self.power(v_i, v_i)\n return z_i\n\n def generate_sub_hash_table(self, mid):\n bits = mid.length\n size = 1 << bits\n half = size >>> 1\n m = Array(size)\n m[half] = Uint32Array(mid)\n i = half >>> 1\n while i > 0:\n m[i] = Uint32Array(4)\n self.power(m[2 * i], m[i])\n i >>= 1\n i = 2\n while i < half:\n for v'var j = 1; j < i; ++j':\n m_i = m[i]\n m_j = m[j]\n m[i + j] = x = Uint32Array(4)\n for v'var c = 0; c < 4; c++':\n x[c] = m_i[c] ^ m_j[c]\n i *= 2\n m[0] = Uint32Array(4)\n for v'i = half + 1; i < size; ++i':\n x = m[i ^ half]\n m[i] = y = Uint32Array(4)\n for v'var c = 0; c < 4; c++':\n y[c] = mid[c] ^ x[c]\n return m\n\n def generate_hash_table(self, key_as_int32_array):\n bits = key_as_int32_array.length\n multiplier = 8 / bits\n per_int = 4 * multiplier\n size = 16 * multiplier\n ans = Array(size)\n for v'var i =0; i < size; ++i':\n tmp = Uint32Array(4)\n idx = (i/ per_int) | 0\n shft = ((per_int - 1 - (i % per_int)) * bits)\n tmp[idx] = (1 << (bits - 1)) << shft\n ans[i] = self.generate_sub_hash_table(self.multiply(tmp, key_as_int32_array))\n return ans\n\n def table_multiply(self, x):\n z = Uint32Array(4)\n for v'var i = 0; i < 32; ++i':\n idx = (i / 8) | 0\n x_i = (x[idx] >>> ((7 - (i % 8)) * 4)) & 0xF\n ah = self.m[i][x_i]\n z[0] ^= ah[0]\n z[1] ^= ah[1]\n z[2] ^= ah[2]\n z[3] ^= ah[3]\n return z\n\n def ghash(self, x, y):\n # Corresponds to the XOR + mult_H operation from the paper\n z = self.wmem\n z[0] = y[0] ^ x[0]\n z[1] = y[1] ^ x[1]\n z[2] = y[2] ^ x[2]\n z[3] = y[3] ^ x[3]\n return self.table_multiply(z)\n\n# }}}\n\n# }}}\n\ndef generate_key(sz):\n if not number_of_rounds[sz]:\n raise ValueError('Invalid key size, must be: 16, 24 or 32')\n return random_bytes(sz)\n\ndef generate_tag(sz):\n return random_bytes(sz or 32)\n\ndef typed_array_as_js(x):\n name = x.constructor.name or 'Uint8Array'\n return '(new ' + name + '(' + JSON.stringify(Array.prototype.slice.call(x)) + '))'\n\nclass CBC(ModeOfOperation): # {{{\n\n def encrypt_bytes(self, bytes, tag_bytes, iv):\n iv = first_iv = iv or random_bytes(16)\n mlen = bytes.length + tag_bytes.length\n padsz = (16 - (mlen % 16)) % 16\n inputbytes = Uint8Array(mlen + padsz)\n if tag_bytes.length:\n inputbytes.set(tag_bytes)\n inputbytes.set(bytes, tag_bytes.length)\n\n offset = 0\n outputbytes = Uint8Array(inputbytes.length)\n for v'var block = 0; block < inputbytes.length; block += 16':\n if block > 0:\n iv, offset = outputbytes, block - 16\n for v'var i = 0; i < 16; i++':\n inputbytes[block + i] ^= iv[offset + i]\n self.aes.encrypt(inputbytes, outputbytes, block)\n return {'iv':first_iv, 'cipherbytes':outputbytes}\n\n def encrypt(self, plaintext, tag):\n return self.encrypt_bytes(string_to_bytes(plaintext), self.tag_as_bytes(tag))\n\n def decrypt_bytes(self, inputbytes, tag_bytes, iv):\n offset = 0\n outputbytes = Uint8Array(inputbytes.length)\n for v'var block = 0; block < inputbytes.length; block += 16':\n self.aes.decrypt(inputbytes, outputbytes, block)\n if block > 0:\n iv, offset = inputbytes, block - 16\n for v'var i = 0; i < 16; i++':\n outputbytes[block + i] ^= iv[offset + i]\n for v'var i = 0; i < tag_bytes.length; i++':\n if tag_bytes[i] != outputbytes[i]:\n raise ValueError('Corrupt message')\n outputbytes = outputbytes.subarray(tag_bytes.length)\n return outputbytes\n\n def decrypt(self, output_from_encrypt, tag):\n ans = self.decrypt_bytes(output_from_encrypt.cipherbytes, self.tag_as_bytes(tag), output_from_encrypt.iv)\n return str.rstrip(bytes_to_string(ans), '\\0')\n# }}}\n\nclass CTR(ModeOfOperation): # {{{\n\n # Note that this mode of operation requires the pair of (counterbytes,\n # secret key) to always be unique, for every block. Therefore, if you are\n # using it for bi-directional messaging it is best to use a different\n # secret key for each direction\n\n def __init__(self, key, iv):\n ModeOfOperation.__init__(self, key)\n self.wmem = Uint8Array(16)\n self.counter_block = Uint8Array(iv or 16)\n if self.counter_block.length != 16:\n raise ValueError('iv must be 16 bytes long')\n self.counter_index = 16\n\n def _crypt(self, bytes):\n for v'var i = 0; i < bytes.length; i++, self.counter_index++':\n if self.counter_index is 16:\n self.counter_index = 0\n self.aes.encrypt(self.counter_block, self.wmem, 0)\n increment_counter(self.counter_block)\n bytes[i] ^= self.wmem[self.counter_index]\n self.counter_index = 16\n\n def encrypt(self, plaintext, tag):\n outbytes = string_to_bytes(plaintext)\n counterbytes = Uint8Array(self.counter_block)\n if tag:\n tag_bytes = self.tag_as_bytes(tag)\n t = Uint8Array(outbytes.length + tag_bytes.length)\n t.set(tag_bytes)\n t.set(outbytes, tag_bytes.length)\n outbytes = t\n self._crypt(outbytes)\n return {'cipherbytes':outbytes, 'counterbytes':counterbytes}\n\n def __enter__(self):\n self.before_index = self.counter_index\n self.before_counter = Uint8Array(self.counter_block)\n\n def __exit__(self):\n self.counter_index = self.before_index\n self.counter_block = self.before_counter\n\n def decrypt(self, output_from_encrypt, tag):\n b = Uint8Array(output_from_encrypt.cipherbytes)\n with self:\n self.counter_block = output_from_encrypt.counterbytes\n self.counter_index = 16\n self._crypt(b)\n offset = 0\n if tag:\n tag_bytes = self.tag_as_bytes(tag)\n for v'var i = 0; i < tag_bytes.length; i++':\n if tag_bytes[i] != b[i]:\n raise ValueError('Corrupted message')\n offset = tag_bytes.length\n return bytes_to_string(b, offset)\n# }}}\n\nclass GCM(ModeOfOperation): # {{{\n\n # Note that this mode of operation requires the pair of (iv,\n # secret key) to always be unique, for every message. Therefore, if you are\n # using it for bi-directional messaging it is best to use a different\n # secret key for each direction (you could also use random_key,\n # but that has a non-zero probability of repeating keys).\n # See http://web.cs.ucdavis.edu/~rogaway/ocb/gcm.pdf\n\n def __init__(self, key, random_iv=False):\n ModeOfOperation.__init__(self, key)\n self.random_iv = random_iv\n if not random_iv:\n self.current_iv = Uint8Array(12)\n\n # Generate the hash subkey\n H = Uint8Array(16)\n self.aes.encrypt(Uint8Array(16), H, 0)\n self.galois = GaloisField(H)\n\n # Working memory\n self.J0 = Uint32Array(4)\n self.wmem = Uint32Array(4)\n self.byte_block = Uint8Array(16)\n\n def increment_iv(self):\n c = self.current_iv\n for v'var i = 11; i >=0; i--':\n if c[i] is 255:\n if i is 0:\n raise ValueError('The GCM IV space is exhausted, cannot encrypt anymore messages with this key as doing so would cause the IV to repeat')\n c[i] = 0\n else:\n c[i] += 1\n break\n\n def _create_j0(self, iv):\n J0 = self.J0\n if iv.length is 12:\n convert_to_int32(iv, J0)\n J0[3] = 1\n else:\n J0.fill(0)\n tmp = convert_to_int32_pad(iv)\n while tmp.length:\n J0 = self.galois.ghash(J0, tmp)\n tmp = tmp.subarray(4)\n tmp = Uint32Array(4)\n tmp.set(from_64_to_32(iv.length * 8), 2)\n J0 = self.galois.ghash(J0, tmp)\n return J0\n\n def _start(self, iv, additional_data):\n J0 = self._create_j0(iv)\n # Generate initial counter block\n in_block = Uint32Array(J0)\n in_block[3] = (in_block[3] + 1) & 0xFFFFFFFF # increment counter\n\n # Process additional_data\n S = Uint32Array(4)\n overflow = additional_data.length % 16\n for v'var i = 0; i < additional_data.length - overflow; i += 16':\n convert_to_int32(additional_data, self.wmem, i, 16)\n S = self.galois.ghash(S, self.wmem)\n if overflow:\n self.byte_block.fill(0)\n self.byte_block.set(additional_data.subarray(additional_data.length - overflow))\n convert_to_int32(self.byte_block, self.wmem)\n S = self.galois.ghash(S, self.wmem)\n return J0, in_block, S\n\n def _finish(self, iv, J0, adata_len, S, outbytes):\n # Mix the lengths into S\n lengths = Uint32Array(4)\n lengths.set(from_64_to_32(adata_len * 8))\n lengths.set(from_64_to_32(outbytes.length * 8), 2)\n S = self.galois.ghash(S, lengths)\n\n # Create the tag\n self.aes.encrypt32(J0, self.byte_block, 0)\n convert_to_int32(self.byte_block, self.wmem)\n tag = Uint32Array(4)\n for v'var i = 0; i < S.length; i++':\n tag[i] = S[i] ^ self.wmem[i]\n return {'iv':iv, 'cipherbytes':outbytes, 'tag':tag}\n\n def _crypt(self, iv, bytes, additional_data, decrypt):\n ghash = self.galois.ghash.bind(self.galois)\n outbytes = Uint8Array(bytes.length)\n J0, in_block, S = self._start(iv, additional_data)\n bb = self.byte_block\n enc = self.aes.encrypt32.bind(self.aes)\n hash_bytes = bytes if decrypt else outbytes\n\n # Create the ciphertext, encrypting block by block\n for v'var i = 0, counter_index = 16; i < bytes.length; i++, counter_index++':\n if counter_index is 16:\n # Encrypt counter and increment it\n enc(in_block, bb, 0)\n in_block[3] = (in_block[3] + 1) & 0xFFFFFFFF # increment counter\n counter_index = 0\n # Output is XOR of encrypted counter with input\n outbytes[i] = bytes[i] ^ bb[counter_index]\n if counter_index is 15:\n # We have completed a block, update the hash\n convert_to_int32(hash_bytes, self.wmem, i - 15, 16)\n S = ghash(S, self.wmem)\n\n # Check if we have a last partial block\n overflow = outbytes.length % 16\n if overflow:\n # partial output block\n bb.fill(0)\n bb.set(hash_bytes.subarray(hash_bytes.length - overflow))\n convert_to_int32(bb, self.wmem)\n S = ghash(S, self.wmem)\n\n return self._finish(iv, J0, additional_data.length, S, outbytes)\n\n def encrypt(self, plaintext, tag):\n if self.random_iv:\n iv = random_bytes(12)\n else:\n self.increment_iv()\n iv = self.current_iv\n return self._crypt(iv, string_to_bytes(plaintext), self.tag_as_bytes(tag), False)\n\n def decrypt(self, output_from_encrypt, tag):\n if output_from_encrypt.tag.length != 4:\n raise ValueError('Corrupted message')\n ans = self._crypt(output_from_encrypt.iv, output_from_encrypt.cipherbytes, self.tag_as_bytes(tag), True)\n if ans.tag != output_from_encrypt.tag:\n raise ValueError('Corrupted message')\n return bytes_to_string(ans.cipherbytes)\n# }}}\n","__stdlib__/elementmaker.pyj":"# vim:fileencoding=utf-8\n# License: GPL v3 Copyright: 2015, Kovid Goyal \n\nhtml_elements = {\n 'a', 'abbr', 'acronym', 'address', 'area',\n 'article', 'aside', 'audio', 'b', 'base', 'big', 'body', 'blockquote', 'br', 'button',\n 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup',\n 'command', 'datagrid', 'datalist', 'dd', 'del', 'details', 'dfn',\n 'dialog', 'dir', 'div', 'dl', 'dt', 'em', 'event-source', 'fieldset',\n 'figcaption', 'figure', 'footer', 'font', 'form', 'header', 'h1',\n 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'head', 'i', 'iframe', 'img', 'input', 'ins',\n 'keygen', 'kbd', 'label', 'legend', 'li', 'm', 'map', 'menu', 'meter',\n 'multicol', 'nav', 'nextid', 'ol', 'output', 'optgroup', 'option',\n 'p', 'pre', 'progress', 'q', 's', 'samp', 'script', 'section', 'select',\n 'small', 'sound', 'source', 'spacer', 'span', 'strike', 'strong', 'style',\n 'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'time', 'tfoot',\n 'th', 'thead', 'tr', 'tt', 'u', 'ul', 'var', 'video'\n}\n\nmathml_elements = {\n 'maction', 'math', 'merror', 'mfrac', 'mi',\n 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom',\n 'mprescripts', 'mroot', 'mrow', 'mspace', 'msqrt', 'mstyle', 'msub',\n 'msubsup', 'msup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder',\n 'munderover', 'none'\n}\n\nsvg_elements = {\n 'a', 'animate', 'animateColor', 'animateMotion',\n 'animateTransform', 'clipPath', 'circle', 'defs', 'desc', 'ellipse',\n 'font-face', 'font-face-name', 'font-face-src', 'g', 'glyph', 'hkern',\n 'linearGradient', 'line', 'marker', 'metadata', 'missing-glyph',\n 'mpath', 'path', 'polygon', 'polyline', 'radialGradient', 'rect',\n 'set', 'stop', 'svg', 'switch', 'text', 'title', 'tspan', 'use'\n}\n\nhtml5_tags = html_elements.union(mathml_elements).union(svg_elements)\n\ndef _makeelement(tag, *args, **kwargs):\n ans = this.createElement(tag)\n\n for attr in kwargs:\n vattr = str.replace(str.rstrip(attr, '_'), '_', '-')\n val = kwargs[attr]\n if callable(val):\n if str.startswith(attr, 'on'):\n attr = attr[2:]\n ans.addEventListener(attr, val)\n elif val is True:\n ans.setAttribute(vattr, vattr)\n elif jstype(val) is 'string':\n ans.setAttribute(vattr, val)\n\n for arg in args:\n if jstype(arg) is 'string':\n arg = this.createTextNode(arg)\n ans.appendChild(arg)\n return ans\n\ndef maker_for_document(document):\n # Create an elementmaker to be used with the specified document\n E = _makeelement.bind(document)\n Object.defineProperties(E, {\n tag: {\n 'value':_makeelement.bind(document, tag)\n } for tag in html5_tags\n })\n return E\n\nif jstype(document) is 'undefined':\n E = maker_for_document({\n 'createTextNode': def(value): return value;,\n 'createElement': def(name):\n return {\n 'name':name,\n 'children':[],\n 'attributes':{},\n 'setAttribute': def(name, val): this.attributes[name] = val;,\n 'appendChild': def(child): this.children.push(child);,\n }\n })\nelse:\n E = maker_for_document(document)\n","__stdlib__/encodings.pyj":"# vim:fileencoding=utf-8\n# License: BSD Copyright: 2016, Kovid Goyal \n\ndef base64encode(bytes, altchars, pad_char):\n # Convert an array of bytes into a base-64 encoded string\n l = bytes.length\n remainder = l % 3\n main_length = l - remainder\n encodings = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' + (altchars or '+/')\n pad_char = '=' if pad_char is undefined else pad_char\n ans = v'[]'\n for v'var i = 0; i < main_length; i += 3':\n chunk = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]\n ans.push(encodings[(chunk & 16515072) >> 18], encodings[(chunk & 258048) >> 12], encodings[(chunk & 4032) >> 6], encodings[chunk & 63])\n if remainder is 1:\n chunk = bytes[main_length]\n ans.push(encodings[(chunk & 252) >> 2], encodings[(chunk & 3) << 4], pad_char, pad_char)\n elif remainder is 2:\n chunk = (bytes[main_length] << 8) | bytes[main_length + 1]\n ans.push(encodings[(chunk & 64512) >> 10], encodings[(chunk & 1008) >> 4], encodings[(chunk & 15) << 2], pad_char)\n return ans.join('')\n\ndef base64decode(string):\n # convert the output of base64encode back into an array of bytes\n # (Uint8Array) only works with the standard altchars and pad_char\n if jstype(window) is not 'undefined':\n chars = window.atob(string)\n else:\n chars = new Buffer(string, 'base64').toString('binary') # noqa: undef\n ans = Uint8Array(chars.length)\n for i in range(ans.length):\n ans[i] = chars.charCodeAt(i)\n return ans\n\ndef urlsafe_b64encode(bytes, pad_char):\n return base64encode(bytes, '-_', pad_char)\n\ndef urlsafe_b64decode(string):\n string = String.prototype.replace.call(string, /[_-]/g, def(m): return '+' if m is '-' else '/';)\n return base64decode(string)\n\ndef hexlify(bytes):\n ans = v'[]'\n for v'var i = 0; i < bytes.length; i++':\n x = bytes[i].toString(16)\n if x.length is 1:\n x = '0' + x\n ans.push(x)\n return ans.join('')\n\ndef unhexlify(string):\n num = string.length // 2\n if num * 2 is not string.length:\n raise ValueError('string length is not a multiple of two')\n ans = Uint8Array(num)\n for v'var i = 0; i < num; i++':\n x = parseInt(string[i*2:i*2+2], 16)\n if isNaN(x):\n raise ValueError('string is not hex-encoded')\n ans[i] = x\n return ans\n\nutf8_decoder_table = v'''[\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 00..1f\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 20..3f\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 40..5f\n 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 60..7f\n 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, // 80..9f\n 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, // a0..bf\n 8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // c0..df\n 0xa,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x3,0x4,0x3,0x3, // e0..ef\n 0xb,0x6,0x6,0x6,0x5,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8,0x8, // f0..ff\n 0x0,0x1,0x2,0x3,0x5,0x8,0x7,0x1,0x1,0x1,0x4,0x6,0x1,0x1,0x1,0x1, // s0..s0\n 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0,1,0,1,1,1,1,1,1, // s1..s2\n 1,2,1,1,1,1,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1, // s3..s4\n 1,2,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,3,1,1,1,1,1,1, // s5..s6\n 1,3,1,1,1,1,1,3,1,3,1,1,1,1,1,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // s7..s8\n]'''\n\ndef _from_code_point(x):\n if x <= 0xFFFF:\n return String.fromCharCode(x)\n x -= 0x10000\n return String.fromCharCode((x >> 10) + 0xD800, (x % 0x400) + 0xDC00)\n\ndef utf8_decode(bytes, errors, replacement):\n # Convert an array of UTF-8 encoded bytes into a string\n state = 0\n ans = v'[]'\n\n for v'var i = 0, l = bytes.length; i < l; i++': # noqa\n byte = bytes[i]\n typ = utf8_decoder_table[byte]\n codep = (byte & 0x3f) | (codep << 6) if state is not 0 else (0xff >> typ) & (byte)\n state = utf8_decoder_table[256 + state*16 + typ]\n if state is 0:\n ans.push(_from_code_point(codep))\n elif state is 1:\n if not errors or errors is 'strict':\n raise UnicodeDecodeError(str.format('The byte 0x{:02x} at position {} is not valid UTF-8', byte, i))\n elif errors is 'replace':\n ans.push(replacement or '?')\n return ans.join('')\n\ndef utf8_encode_js(string):\n # Encode a string as an array of UTF-8 bytes\n escstr = encodeURIComponent(string)\n ans = v'[]'\n for v'var i = 0; i < escstr.length; i++':\n ch = escstr[i]\n if ch is '%':\n ans.push(parseInt(escstr[i+1:i+3], 16))\n i += 2\n else:\n ans.push(ch.charCodeAt(0))\n return Uint8Array(ans)\n\nif jstype(TextEncoder) is 'function':\n _u8enc = TextEncoder('utf-8')\n utf8_encode = _u8enc.encode.bind(_u8enc)\n _u8enc = undefined\nelse:\n utf8_encode = utf8_encode_js\n\ndef utf8_encode_native(string):\n return _u8enc.encode(string)\n","__stdlib__/gettext.pyj":"# vim:fileencoding=utf-8\n# License: BSD Copyright: 2015, Kovid Goyal \n\n# noqa: eol-semicolon\n\n# The Plural-Forms parser {{{\n# From: https://github.com/SlexAxton/Jed/blob/master/jed.js licensed under the WTFPL\n\nJed = {}\n\nvr'''\n Jed.PF = {};\n\n Jed.PF.parse = function ( p ) {\n var plural_str = Jed.PF.extractPluralExpr( p );\n return Jed.PF.parser.parse.call(Jed.PF.parser, plural_str);\n };\n\n Jed.PF.compile = function ( p ) {\n // Handle trues and falses as 0 and 1\n function imply( val ) {\n return (val === true ? 1 : val ? val : 0);\n }\n\n var ast = Jed.PF.parse( p );\n return function ( n ) {\n return imply( Jed.PF.interpreter( ast )( n ) );\n };\n };\n\n Jed.PF.interpreter = function ( ast ) {\n return function ( n ) {\n var res;\n switch ( ast.type ) {\n case 'GROUP':\n return Jed.PF.interpreter( ast.expr )( n );\n case 'TERNARY':\n if ( Jed.PF.interpreter( ast.expr )( n ) ) {\n return Jed.PF.interpreter( ast.truthy )( n );\n }\n return Jed.PF.interpreter( ast.falsey )( n );\n case 'OR':\n return Jed.PF.interpreter( ast.left )( n ) || Jed.PF.interpreter( ast.right )( n );\n case 'AND':\n return Jed.PF.interpreter( ast.left )( n ) && Jed.PF.interpreter( ast.right )( n );\n case 'LT':\n return Jed.PF.interpreter( ast.left )( n ) < Jed.PF.interpreter( ast.right )( n );\n case 'GT':\n return Jed.PF.interpreter( ast.left )( n ) > Jed.PF.interpreter( ast.right )( n );\n case 'LTE':\n return Jed.PF.interpreter( ast.left )( n ) <= Jed.PF.interpreter( ast.right )( n );\n case 'GTE':\n return Jed.PF.interpreter( ast.left )( n ) >= Jed.PF.interpreter( ast.right )( n );\n case 'EQ':\n return Jed.PF.interpreter( ast.left )( n ) == Jed.PF.interpreter( ast.right )( n );\n case 'NEQ':\n return Jed.PF.interpreter( ast.left )( n ) != Jed.PF.interpreter( ast.right )( n );\n case 'MOD':\n return Jed.PF.interpreter( ast.left )( n ) % Jed.PF.interpreter( ast.right )( n );\n case 'VAR':\n return n;\n case 'NUM':\n return ast.val;\n default:\n throw new Error(\"Invalid Token found.\");\n }\n };\n };\n\n Jed.PF.extractPluralExpr = function ( p ) {\n // trim first\n p = p.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '');\n\n if (! /;\\s*$/.test(p)) {\n p = p.concat(';');\n }\n\n var nplurals_re = /nplurals\\=(\\d+);/,\n plural_re = /plural\\=(.*);/,\n nplurals_matches = p.match( nplurals_re ),\n res = {},\n plural_matches;\n\n // Find the nplurals number\n if ( nplurals_matches.length > 1 ) {\n res.nplurals = nplurals_matches[1];\n }\n else {\n throw new Error('nplurals not found in plural_forms string: ' + p );\n }\n\n // remove that data to get to the formula\n p = p.replace( nplurals_re, \"\" );\n plural_matches = p.match( plural_re );\n\n if (!( plural_matches && plural_matches.length > 1 ) ) {\n throw new Error('`plural` expression not found: ' + p);\n }\n return plural_matches[ 1 ];\n };\n\n /* Jison generated parser */\n Jed.PF.parser = (function(){\n\nvar parser = {trace: function trace() { },\nyy: {},\nsymbols_: {\"error\":2,\"expressions\":3,\"e\":4,\"EOF\":5,\"?\":6,\":\":7,\"||\":8,\"&&\":9,\"<\":10,\"<=\":11,\">\":12,\">=\":13,\"!=\":14,\"==\":15,\"%\":16,\"(\":17,\")\":18,\"n\":19,\"NUMBER\":20,\"$accept\":0,\"$end\":1},\nterminals_: {2:\"error\",5:\"EOF\",6:\"?\",7:\":\",8:\"||\",9:\"&&\",10:\"<\",11:\"<=\",12:\">\",13:\">=\",14:\"!=\",15:\"==\",16:\"%\",17:\"(\",18:\")\",19:\"n\",20:\"NUMBER\"},\nproductions_: [0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],\nperformAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) {\n\nvar $0 = $$.length - 1;\nswitch (yystate) {\ncase 1: return { type : 'GROUP', expr: $$[$0-1] };\ncase 2:this.$ = { type: 'TERNARY', expr: $$[$0-4], truthy : $$[$0-2], falsey: $$[$0] };\nbreak;\ncase 3:this.$ = { type: \"OR\", left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 4:this.$ = { type: \"AND\", left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 5:this.$ = { type: 'LT', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 6:this.$ = { type: 'LTE', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 7:this.$ = { type: 'GT', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 8:this.$ = { type: 'GTE', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 9:this.$ = { type: 'NEQ', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 10:this.$ = { type: 'EQ', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 11:this.$ = { type: 'MOD', left: $$[$0-2], right: $$[$0] };\nbreak;\ncase 12:this.$ = { type: 'GROUP', expr: $$[$0-1] };\nbreak;\ncase 13:this.$ = { type: 'VAR' };\nbreak;\ncase 14:this.$ = { type: 'NUM', val: Number(yytext) };\nbreak;\n}\n},\ntable: [{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],\ndefaultActions: {6:[2,1]},\nparseError: function parseError(str, hash) {\n throw new Error(str);\n},\nparse: function parse(input) {\n var self = this,\n stack = [0],\n vstack = [null], // semantic value stack\n lstack = [], // location stack\n table = this.table,\n yytext = '',\n yylineno = 0,\n yyleng = 0,\n recovering = 0,\n TERROR = 2,\n EOF = 1;\n\n //this.reductionCount = this.shiftCount = 0;\n\n this.lexer.setInput(input);\n this.lexer.yy = this.yy;\n this.yy.lexer = this.lexer;\n if (typeof this.lexer.yylloc == 'undefined')\n this.lexer.yylloc = {};\n var yyloc = this.lexer.yylloc;\n lstack.push(yyloc);\n\n if (typeof this.yy.parseError === 'function')\n this.parseError = this.yy.parseError;\n\n function popStack (n) {\n stack.length = stack.length - 2*n;\n vstack.length = vstack.length - n;\n lstack.length = lstack.length - n;\n }\n\n function lex() {\n var token;\n token = self.lexer.lex() || 1; // $end = 1\n // if token isn't its numeric value, convert\n if (typeof token !== 'number') {\n token = self.symbols_[token] || token;\n }\n return token;\n }\n\n var symbol, preErrorSymbol, state, action, a, r, yyval={},p,len,newState, expected, errStr;\n while (true) {\n // retreive state number from top of stack\n state = stack[stack.length-1];\n\n // use default actions if available\n if (this.defaultActions[state]) {\n action = this.defaultActions[state];\n } else {\n if (symbol === null || symbol === undefined)\n symbol = lex();\n // read action for current state and first input\n action = table[state] && table[state][symbol];\n }\n\n // handle parse error\n _handle_error:\n if (typeof action === 'undefined' || !action.length || !action[0]) {\n\n if (!recovering) {\n // Report error\n expected = [];\n for (p in table[state]) if (this.terminals_[p] && p > 2) {\n expected.push(\"'\"+this.terminals_[p]+\"'\");\n }\n errStr = '';\n if (this.lexer.showPosition) {\n errStr = 'Parse error on line '+(yylineno+1)+\":\\n\"+this.lexer.showPosition()+\"\\nExpecting \"+expected.join(', ') + \", got '\" + this.terminals_[symbol]+ \"'\";\n } else {\n errStr = 'Parse error on line '+(yylineno+1)+\": Unexpected \" +\n (symbol == 1 /*EOF*/ ? \"end of input\" :\n (\"'\"+(this.terminals_[symbol] || symbol)+\"'\"));\n }\n this.parseError(errStr,\n {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected});\n }\n\n // just recovered from another error\n if (recovering == 3) {\n if (symbol == EOF) {\n throw new Error(errStr || 'Parsing halted.');\n }\n\n // discard current lookahead and grab another\n yyleng = this.lexer.yyleng;\n yytext = this.lexer.yytext;\n yylineno = this.lexer.yylineno;\n yyloc = this.lexer.yylloc;\n symbol = lex();\n }\n\n // try to recover from error\n while (1) {\n // check for error recovery rule in this state\n if ((TERROR.toString()) in table[state]) {\n break;\n }\n if (state === 0) {\n throw new Error(errStr || 'Parsing halted.');\n }\n popStack(1);\n state = stack[stack.length-1];\n }\n\n preErrorSymbol = symbol; // save the lookahead token\n symbol = TERROR; // insert generic error symbol as new lookahead\n state = stack[stack.length-1];\n action = table[state] && table[state][TERROR];\n recovering = 3; // allow 3 real symbols to be shifted before reporting a new error\n }\n\n // this shouldn't happen, unless resolve defaults are off\n if (action[0] instanceof Array && action.length > 1) {\n throw new Error('Parse Error: multiple actions possible at state: '+state+', token: '+symbol);\n }\n\n switch (action[0]) {\n\n case 1: // shift\n //this.shiftCount++;\n\n stack.push(symbol);\n vstack.push(this.lexer.yytext);\n lstack.push(this.lexer.yylloc);\n stack.push(action[1]); // push state\n symbol = null;\n if (!preErrorSymbol) { // normal execution/no error\n yyleng = this.lexer.yyleng;\n yytext = this.lexer.yytext;\n yylineno = this.lexer.yylineno;\n yyloc = this.lexer.yylloc;\n if (recovering > 0)\n recovering--;\n } else { // error just occurred, resume old lookahead f/ before error\n symbol = preErrorSymbol;\n preErrorSymbol = null;\n }\n break;\n\n case 2: // reduce\n //this.reductionCount++;\n\n len = this.productions_[action[1]][1];\n\n // perform semantic action\n yyval.$ = vstack[vstack.length-len]; // default to $$ = $1\n // default location, uses first token for firsts, last for lasts\n yyval._$ = {\n first_line: lstack[lstack.length-(len||1)].first_line,\n last_line: lstack[lstack.length-1].last_line,\n first_column: lstack[lstack.length-(len||1)].first_column,\n last_column: lstack[lstack.length-1].last_column\n };\n r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);\n\n if (typeof r !== 'undefined') {\n return r;\n }\n\n // pop off stack\n if (len) {\n stack = stack.slice(0,-1*len*2);\n vstack = vstack.slice(0, -1*len);\n lstack = lstack.slice(0, -1*len);\n }\n\n stack.push(this.productions_[action[1]][0]); // push nonterminal (reduce)\n vstack.push(yyval.$);\n lstack.push(yyval._$);\n // goto new state = table[STATE][NONTERMINAL]\n newState = table[stack[stack.length-2]][stack[stack.length-1]];\n stack.push(newState);\n break;\n\n case 3: // accept\n return true;\n }\n\n }\n\n return true;\n}};/* Jison generated lexer */\nvar lexer = (function(){\n\nvar lexer = ({EOF:1,\nparseError:function parseError(str, hash) {\n if (this.yy.parseError) {\n this.yy.parseError(str, hash);\n } else {\n throw new Error(str);\n }\n },\nsetInput:function (input) {\n this._input = input;\n this._more = this._less = this.done = false;\n this.yylineno = this.yyleng = 0;\n this.yytext = this.matched = this.match = '';\n this.conditionStack = ['INITIAL'];\n this.yylloc = {first_line:1,first_column:0,last_line:1,last_column:0};\n return this;\n },\ninput:function () {\n var ch = this._input[0];\n this.yytext+=ch;\n this.yyleng++;\n this.match+=ch;\n this.matched+=ch;\n var lines = ch.match(/\\n/);\n if (lines) this.yylineno++;\n this._input = this._input.slice(1);\n return ch;\n },\nunput:function (ch) {\n this._input = ch + this._input;\n return this;\n },\nmore:function () {\n this._more = true;\n return this;\n },\npastInput:function () {\n var past = this.matched.substr(0, this.matched.length - this.match.length);\n return (past.length > 20 ? '...':'') + past.substr(-20).replace(/\\n/g, \"\");\n },\nupcomingInput:function () {\n var next = this.match;\n if (next.length < 20) {\n next += this._input.substr(0, 20-next.length);\n }\n return (next.substr(0,20)+(next.length > 20 ? '...':'')).replace(/\\n/g, \"\");\n },\nshowPosition:function () {\n var pre = this.pastInput();\n var c = new Array(pre.length + 1).join(\"-\");\n return pre + this.upcomingInput() + \"\\n\" + c+\"^\";\n },\nnext:function () {\n if (this.done) {\n return this.EOF;\n }\n if (!this._input) this.done = true;\n\n var token,\n match,\n col,\n lines;\n if (!this._more) {\n this.yytext = '';\n this.match = '';\n }\n var rules = this._currentRules();\n for (var i=0;i < rules.length; i++) {\n match = this._input.match(this.rules[rules[i]]);\n if (match) {\n lines = match[0].match(/\\n.*/g);\n if (lines) this.yylineno += lines.length;\n this.yylloc = {first_line: this.yylloc.last_line,\n last_line: this.yylineno+1,\n first_column: this.yylloc.last_column,\n last_column: lines ? lines[lines.length-1].length-1 : this.yylloc.last_column + match[0].length};\n this.yytext += match[0];\n this.match += match[0];\n this.matches = match;\n this.yyleng = this.yytext.length;\n this._more = false;\n this._input = this._input.slice(match[0].length);\n this.matched += match[0];\n token = this.performAction.call(this, this.yy, this, rules[i],this.conditionStack[this.conditionStack.length-1]);\n if (token) return token;\n else return;\n }\n }\n if (this._input === \"\") {\n return this.EOF;\n } else {\n this.parseError('Lexical error on line '+(this.yylineno+1)+'. Unrecognized text.\\n'+this.showPosition(),\n {text: \"\", token: null, line: this.yylineno});\n }\n },\nlex:function lex() {\n var r = this.next();\n if (typeof r !== 'undefined') {\n return r;\n } else {\n return this.lex();\n }\n },\nbegin:function begin(condition) {\n this.conditionStack.push(condition);\n },\npopState:function popState() {\n return this.conditionStack.pop();\n },\n_currentRules:function _currentRules() {\n return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;\n },\ntopState:function () {\n return this.conditionStack[this.conditionStack.length-2];\n },\npushState:function begin(condition) {\n this.begin(condition);\n }});\nlexer.performAction = function anonymous(yy,yy_,$avoiding_name_collisions,YY_START) {\n\nvar YYSTATE=YY_START;\nswitch($avoiding_name_collisions) {\ncase 0:/* skip whitespace */\nbreak;\ncase 1:return 20\nbreak;\ncase 2:return 19\nbreak;\ncase 3:return 8\nbreak;\ncase 4:return 9\nbreak;\ncase 5:return 6\nbreak;\ncase 6:return 7\nbreak;\ncase 7:return 11\nbreak;\ncase 8:return 13\nbreak;\ncase 9:return 10\nbreak;\ncase 10:return 12\nbreak;\ncase 11:return 14\nbreak;\ncase 12:return 15\nbreak;\ncase 13:return 16\nbreak;\ncase 14:return 17\nbreak;\ncase 15:return 18\nbreak;\ncase 16:return 5\nbreak;\ncase 17:return 'INVALID'\nbreak;\n}\n};\nlexer.rules = [/^\\s+/,/^[0-9]+(\\.[0-9]+)?\\b/,/^n\\b/,/^\\|\\|/,/^&&/,/^\\?/,/^:/,/^<=/,/^>=/,/^/,/^!=/,/^==/,/^%/,/^\\(/,/^\\)/,/^$/,/^./];\nlexer.conditions = {\"INITIAL\":{\"rules\":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],\"inclusive\":true}};return lexer;})()\nparser.lexer = lexer;\nreturn parser;\n})();\n'''\nplural_forms_parser = Jed.PF\n# }}}\n\ndef _get_plural_forms_function(plural_forms_string):\n return plural_forms_parser.compile(plural_forms_string or \"nplurals=2; plural=(n != 1);\")\n\n_gettext = def(text): return text\n\n_ngettext = def(text, plural, n): return text if n is 1 else plural\n\ndef gettext(text):\n return _gettext(text)\n\ndef ngettext(text, plural, n):\n return _ngettext(text, plural, n)\n\ndef install(translation_data):\n t = new Translations(translation_data)\n t.install()\n for func in register_callback.install_callbacks:\n try:\n func(t)\n except:\n pass\n return t\n\nhas_prop = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty)\n\ndef register_callback(func):\n # Register callbacks that will be called when new translation data is\n # installed\n register_callback.install_callbacks.push(func)\nregister_callback.install_callbacks = v'[]'\n\nempty_translation_data = {'entries': {}}\n\nclass Translations:\n\n def __init__(self, translation_data):\n translation_data = translation_data or empty_translation_data\n func = _get_plural_forms_function(translation_data.plural_forms)\n self.translations = [[translation_data, func]]\n self.language = translation_data['language']\n\n def add_fallback(self, fallback):\n fallback = fallback or empty_translation_data\n func = _get_plural_forms_function(fallback.plural_forms)\n self.translations.push([fallback, func])\n\n def gettext(self, text):\n for t in self.translations:\n m = t[0].entries\n if has_prop(m, text):\n return m[text][0]\n return text\n\n def ngettext(self, text, plural, n):\n for t in self.translations:\n m = t[0].entries\n if has_prop(m, text):\n idx = t[1](n)\n return m[text][idx] or (text if n is 1 else plural)\n return text if n is 1 else plural\n\n def install(self):\n nonlocal _gettext, _ngettext\n _gettext = def ():\n return self.gettext.apply(self, arguments)\n _ngettext = def ():\n return self.ngettext.apply(self, arguments)\n","__stdlib__/math.pyj":"###########################################################\n# RapydScript Standard Library\n# Author: Alexander Tsepkov\n# Copyright 2013 Pyjeon Software LLC\n# License: Apache License 2.0\n# This library is covered under Apache license, so that\n# you can distribute it with your RapydScript applications.\n###########################################################\n\n\n# basic implementation of Python's 'math' library\n\n# NOTE: this is only meant to aid those porting lots of Python code into RapydScript,\n# if you're writing a new RapydScript application, in most cases you probably want to\n# use JavaScript's Math module directly instead\n\n\npi = Math.PI\ne = Math.E\n\n########################################\n# Number-theoretic and representation functions\n########################################\ndef ceil(x):\n return Math.ceil(x)\ndef copysign(x, y):\n x = Math.abs(x)\n if y < 0:\n return -x\n else:\n return x\ndef fabs(x):\n return Math.abs(x)\ndef factorial(x):\n if Math.abs(int(x)) is not x:\n raise ValueError(\"factorial() only accepts integral values\")\n factorial.cache = []\n r = def(n):\n if n is 0 or n is 1:\n return 1\n if not factorial.cache[n]:\n factorial.cache[n] = r(n-1) * n\n return factorial.cache[n]\n return r(x)\ndef floor(x):\n return Math.floor(x)\ndef fmod(x, y):\n # javascript's % operator isn't consistent with C fmod implementation, this function is\n while y <= x:\n x -= y\n return x\ndef fsum(iterable):\n # like Python's fsum, this method is much more resilient to rounding errors than regular sum\n partials = [] # sorted, non-overlapping partial sums\n for x in iterable:\n i = 0\n for y in partials:\n if Math.abs(x) < Math.abs(y):\n x, y = y, x\n hi = x + y\n lo = y - (hi - x)\n if lo:\n partials[i] = lo\n i += 1\n x = hi\n #partials[i:] = [x]\n partials.splice(i, partials.length-i, x)\n return sum(partials)\ndef isinf(x):\n return not isFinite(x)\ndef isnan(x):\n return isNaN(x)\ndef modf(x):\n m = fmod(x, 1)\n return m, x-m\ndef trunc(x):\n return x | 0\n\n########################################\n# Power and logarithmic functions\n########################################\ndef exp(x):\n return Math.exp(x)\ndef expm1(x):\n # NOTE: Math.expm1() is currently only implemented in Firefox, this provides alternative implementation\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/expm1\n #return Math.expm1(x)\n if Math.abs(x) < 1e-5:\n return x + 0.5*x*x\n else:\n return Math.exp(x) - 1\ndef log(x, base=e):\n return Math.log(x)/Math.log(base)\ndef log1p(x):\n # NOTE: Math.log1p() is currently only implemented in Firefox, this provides alternative implementation\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log1p\n # this version has been taken from http://phpjs.org/functions/log1p/\n # admittedly it's not as accurate as MDN version, as you can see from math.log1p(1) result\n ret = 0\n n = 50\n if x <= -1:\n return Number.NEGATIVE_INFINITY\n if x < 0 or x > 1:\n return Math.log(1 + x)\n for i in range(1, n):\n if i % 2 is 0:\n ret -= Math.pow(x, i) / i\n else:\n ret += Math.pow(x, i) / i\n return ret\ndef log10(x):\n # NOTE: Math.log10() is currently only implemented in Firefox, this provides alternative implementation\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log10\n # I didn't find a more accurate algorithm so I'm using the basic implementation\n return Math.log(x)/Math.LN10\ndef pow(x, y):\n if x < 0 and int(y) is not y:\n raise ValueError('math domain error')\n if isnan(y) and x is 1:\n return 1\n return Math.pow(x, y)\ndef sqrt(x):\n return Math.sqrt(x)\n\n########################################\n# Trigonometric functions\n########################################\ndef acos(x): return Math.acos(x)\ndef asin(x): return Math.asin(x)\ndef atan(x): return Math.atan(x)\ndef atan2(y, x): return Math.atan2(y, x)\ndef cos(x): return Math.cos(x)\ndef sin(x): return Math.sin(x)\ndef hypot(x, y): return Math.sqrt(x*x + y*y)\ndef tan(x): return Math.tan(x)\n\n########################################\n# Angular conversion\n########################################\ndef degrees(x): return x*180/pi\ndef radians(x): return x*pi/180\n\n########################################\n# Hyperbolic functions\n########################################\ndef acosh(x):\n # NOTE: will be replaced with official, when it becomes mainstream\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/acosh\n return Math.log(x + Math.sqrt(x*x - 1))\ndef asinh(x):\n # NOTE: will be replaced with official, when it becomes mainstream\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/asinh\n return Math.log(x + Math.sqrt(x*x + 1))\ndef atanh(x):\n # NOTE: will be replaced with official, when it becomes mainstream\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atanh\n return 0.5 * Math.log((1 + x) / (1 - x))\ndef cosh(x):\n # NOTE: will be replaced with official, when it becomes mainstream\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/cosh\n return (Math.exp(x) + Math.exp(-x)) / 2\ndef sinh(x):\n # NOTE: will be replaced with official, when it becomes mainstream\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/sinh\n return (Math.exp(x) - Math.exp(-x)) / 2\ndef tanh(x):\n # NOTE: will be replaced with official, when it becomes mainstream\n # https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/tanh\n return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x))\n\n\n\n#import stdlib\n#print(math.ceil(4.2))\n#print(math.floor(4.2))\n#print(math.fabs(-6))\n#print(math.copysign(-5, 7))\n#print(math.factorial(4))\n#print(math.fmod(-1e100, 1e100))\n#\n#d = [0.9999999, 1, 2, 3]\n#print(sum(d), math.fsum(d))\n#print(math.isinf(5), math.isinf(Infinity))\n#print(math.modf(5.5))\n#print(math.trunc(2.6), math.trunc(-2.6))\n#print(math.exp(1e-5), math.expm1(1e-5))\n#print(math.log(10), math.log(10, 1000))\n#print(math.log1p(1e-15), math.log1p(1))\n#print(math.log10(1000), math.log(1000, 10))\n#print(math.pow(1, 0), math.pow(1, NaN), math.pow(0, 0), math.pow(NaN, 0), math.pow(4,3), math.pow(100, -2))\n#print(math.hypot(3,4))\n#print(math.acosh(2), math.asinh(1), math.atanh(0.5), math.cosh(1), math.cosh(-1), math.sinh(1), math.tanh(1))\n","__stdlib__/operator.pyj":"add = __add__ = def(x, y): return x + y\nsub = __sub__ = def(x, y): return x - y\nmul = __mul__ = def(x, y): return x * y\ndiv = __div__ = def(x, y): return x / y\n\nlt = __lt__ = def(x, y): return x < y\nle = __le__ = def(x, y): return x <= y\neq = __eq__ = def(x, y): return x is y\nne = __ne__ = def(x, y): return x is not y\nge = __ge__ = def(x, y): return x >= y\ngt = __gt__ = def(x, y): return x > y\n","__stdlib__/pythonize.pyj":"# vim:fileencoding=utf-8\n# License: BSD Copyright: 2016, Kovid Goyal \n# globals: ρσ_str\n\ndef strings():\n string_funcs = set((\n 'capitalize strip lstrip rstrip islower isupper isspace lower upper swapcase'\n ' center count endswith startswith find rfind index rindex format join ljust rjust'\n ' partition rpartition replace split rsplit splitlines zfill').split(' '))\n\n if not arguments.length:\n exclude = {'split', 'replace'}\n elif arguments[0]:\n exclude = Array.prototype.slice.call(arguments)\n else:\n exclude = None\n if exclude:\n string_funcs = string_funcs.difference(set(exclude))\n for name in string_funcs:\n String.prototype[name] = ρσ_str.prototype[name]\n","__stdlib__/random.pyj":"###########################################################\n# RapydScript Standard Library\n# Author: Alexander Tsepkov\n# Copyright 2013 Pyjeon Software LLC\n# License: Apache License 2.0\n# This library is covered under Apache license, so that\n# you can distribute it with your RapydScript applications.\n###########################################################\n\n\n# basic implementation of Python's 'random' library\n\n# JavaScript's Math.random() does not allow seeding its random generator, to bypass that, this module implements its own\n# version that can be seeded. I decided on RC4 algorithm for this.\n\n# please don't mess with this from the outside\n\nρσ_seed_state = {\n 'key': [],\n 'key_i': 0,\n 'key_j': 0\n}\n\nρσ_get_random_byte = def():\n ρσ_seed_state.key_i = (ρσ_seed_state.key_i + 1) % 256\n ρσ_seed_state.key_j = (ρσ_seed_state.key_j + ρσ_seed_state.key[ρσ_seed_state.key_i]) % 256\n ρσ_seed_state.key[ρσ_seed_state.key_i], ρσ_seed_state.key[ρσ_seed_state.key_j] = \\\n ρσ_seed_state.key[ρσ_seed_state.key_j], ρσ_seed_state.key[ρσ_seed_state.key_i]\n return ρσ_seed_state.key[(ρσ_seed_state.key[ρσ_seed_state.key_i] + \\\n ρσ_seed_state.key[ρσ_seed_state.key_j]) % 256]\n\ndef seed(x=Date().getTime()):\n ρσ_seed_state.key_i = ρσ_seed_state.key_j = 0\n if jstype(x) is 'number':\n x = x.toString()\n elif jstype(x) is not 'string':\n raise TypeError(\"unhashable type: '\" + jstype(x) + \"'\")\n for i in range(256):\n ρσ_seed_state.key[i] = i\n j = 0\n for i in range(256):\n j = (j + ρσ_seed_state.key[i] + x.charCodeAt(i % x.length)) % 256\n ρσ_seed_state.key[i], ρσ_seed_state.key[j] = ρσ_seed_state.key[j], ρσ_seed_state.key[i]\nseed()\n\ndef random():\n n = 0\n m = 1\n for i in range(8):\n n += ρσ_get_random_byte() * m\n m *= 256\n return v'n / 0x10000000000000000'\n\n# unlike the python version, this DOES build a range object, feel free to reimplement\ndef randrange():\n return choice(range.apply(this, arguments))\n\ndef randint(a, b):\n return int(random()*(b-a+1) + a)\n\ndef uniform(a, b):\n return random()*(b-a) + a\n\ndef choice(seq):\n if seq.length > 0:\n return seq[Math.floor(random()*seq.length)]\n else:\n raise IndexError()\n\n# uses Fisher-Yates algorithm to shuffle an array\ndef shuffle(x, random_f=random):\n for i in range(x.length):\n j = Math.floor(random_f() * (i+1))\n x[i], x[j] = x[j], x[i]\n return x\n\n# similar to shuffle, but only shuffles a subset and creates a copy\ndef sample(population, k):\n x = population.slice()\n for i in range(population.length-1, population.length-k-1, -1):\n j = Math.floor(random() * (i+1))\n x[i], x[j] = x[j], x[i]\n return x.slice(population.length-k)\n\n\n#import stdlib\n#a = range(50)\n#random.seed(5)\n#print(random.choice(a))\n#print(random.shuffle(a))\n#print(random.randrange(10))\n#print(random.randint(1,5))\n#print(random.uniform(1,5))\n#print(random.sample(range(20),5))\n","__stdlib__/re.pyj":"# vim:fileencoding=utf-8\n# License: BSD\n# Copyright: 2015, Kovid Goyal \n# Copyright: 2013, Alexander Tsepkov\n\n# globals: ρσ_iterator_symbol, ρσ_list_decorate\n\n# basic implementation of Python's 're' library\n\nfrom __python__ import bound_methods\n\n# Alias DB from http://www.unicode.org/Public/8.0.0/ucd/NameAliases.txt {{{\n_ALIAS_MAP = {\"null\":0,\"nul\":0,\"start of heading\":1,\"soh\":1,\"start of text\":2,\"stx\":2,\"end of text\":3,\"etx\":3,\"end of transmission\":4,\"eot\":4,\"enquiry\":5,\"enq\":5,\"acknowledge\":6,\"ack\":6,\"alert\":7,\"bel\":7,\"backspace\":8,\"bs\":8,\"character tabulation\":9,\"horizontal tabulation\":9,\"ht\":9,\"tab\":9,\"line feed\":10,\"new line\":10,\"end of line\":10,\"lf\":10,\"nl\":10,\"eol\":10,\"line tabulation\":11,\"vertical tabulation\":11,\"vt\":11,\"form feed\":12,\"ff\":12,\"carriage return\":13,\"cr\":13,\"shift out\":14,\"locking-shift one\":14,\"so\":14,\"shift in\":15,\"locking-shift zero\":15,\"si\":15,\"data link escape\":16,\"dle\":16,\"device control one\":17,\"dc1\":17,\"device control two\":18,\"dc2\":18,\"device control three\":19,\"dc3\":19,\"device control four\":20,\"dc4\":20,\"negative acknowledge\":21,\"nak\":21,\"synchronous idle\":22,\"syn\":22,\"end of transmission block\":23,\"etb\":23,\"cancel\":24,\"can\":24,\"end of medium\":25,\"eom\":25,\"substitute\":26,\"sub\":26,\"escape\":27,\"esc\":27,\"information separator four\":28,\"file separator\":28,\"fs\":28,\"information separator three\":29,\"group separator\":29,\"gs\":29,\"information separator two\":30,\"record separator\":30,\"rs\":30,\"information separator one\":31,\"unit separator\":31,\"us\":31,\"sp\":32,\"delete\":127,\"del\":127,\"padding character\":128,\"pad\":128,\"high octet preset\":129,\"hop\":129,\"break permitted here\":130,\"bph\":130,\"no break here\":131,\"nbh\":131,\"index\":132,\"ind\":132,\"next line\":133,\"nel\":133,\"start of selected area\":134,\"ssa\":134,\"end of selected area\":135,\"esa\":135,\"character tabulation set\":136,\"horizontal tabulation set\":136,\"hts\":136,\"character tabulation with justification\":137,\"horizontal tabulation with justification\":137,\"htj\":137,\"line tabulation set\":138,\"vertical tabulation set\":138,\"vts\":138,\"partial line forward\":139,\"partial line down\":139,\"pld\":139,\"partial line backward\":140,\"partial line up\":140,\"plu\":140,\"reverse line feed\":141,\"reverse index\":141,\"ri\":141,\"single shift two\":142,\"single-shift-2\":142,\"ss2\":142,\"single shift three\":143,\"single-shift-3\":143,\"ss3\":143,\"device control string\":144,\"dcs\":144,\"private use one\":145,\"private use-1\":145,\"pu1\":145,\"private use two\":146,\"private use-2\":146,\"pu2\":146,\"set transmit state\":147,\"sts\":147,\"cancel character\":148,\"cch\":148,\"message waiting\":149,\"mw\":149,\"start of guarded area\":150,\"start of protected area\":150,\"spa\":150,\"end of guarded area\":151,\"end of protected area\":151,\"epa\":151,\"start of string\":152,\"sos\":152,\"single graphic character introducer\":153,\"sgc\":153,\"single character introducer\":154,\"sci\":154,\"control sequence introducer\":155,\"csi\":155,\"string terminator\":156,\"st\":156,\"operating system command\":157,\"osc\":157,\"privacy message\":158,\"pm\":158,\"application program command\":159,\"apc\":159,\"nbsp\":160,\"shy\":173,\"latin capital letter gha\":418,\"latin small letter gha\":419,\"cgj\":847,\"alm\":1564,\"syriac sublinear colon skewed left\":1801,\"kannada letter llla\":3294,\"lao letter fo fon\":3741,\"lao letter fo fay\":3743,\"lao letter ro\":3747,\"lao letter lo\":3749,\"tibetan mark bka- shog gi mgo rgyan\":4048,\"fvs1\":6155,\"fvs2\":6156,\"fvs3\":6157,\"mvs\":6158,\"zwsp\":8203,\"zwnj\":8204,\"zwj\":8205,\"lrm\":8206,\"rlm\":8207,\"lre\":8234,\"rle\":8235,\"pdf\":8236,\"lro\":8237,\"rlo\":8238,\"nnbsp\":8239,\"mmsp\":8287,\"wj\":8288,\"lri\":8294,\"rli\":8295,\"fsi\":8296,\"pdi\":8297,\"weierstrass elliptic function\":8472,\"micr on us symbol\":9288,\"micr dash symbol\":9289,\"leftwards triangle-headed arrow with double vertical stroke\":11130,\"rightwards triangle-headed arrow with double vertical stroke\":11132,\"yi syllable iteration mark\":40981,\"presentation form for vertical right white lenticular bracket\":65048,\"vs1\":65024,\"vs2\":65025,\"vs3\":65026,\"vs4\":65027,\"vs5\":65028,\"vs6\":65029,\"vs7\":65030,\"vs8\":65031,\"vs9\":65032,\"vs10\":65033,\"vs11\":65034,\"vs12\":65035,\"vs13\":65036,\"vs14\":65037,\"vs15\":65038,\"vs16\":65039,\"byte order mark\":65279,\"bom\":65279,\"zwnbsp\":65279,\"cuneiform sign nu11 tenu\":74452,\"cuneiform sign nu11 over nu11 bur over bur\":74453,\"byzantine musical symbol fthora skliron chroma vasis\":118981,\"vs17\":917760,\"vs18\":917761,\"vs19\":917762,\"vs20\":917763,\"vs21\":917764,\"vs22\":917765,\"vs23\":917766,\"vs24\":917767,\"vs25\":917768,\"vs26\":917769,\"vs27\":917770,\"vs28\":917771,\"vs29\":917772,\"vs30\":917773,\"vs31\":917774,\"vs32\":917775,\"vs33\":917776,\"vs34\":917777,\"vs35\":917778,\"vs36\":917779,\"vs37\":917780,\"vs38\":917781,\"vs39\":917782,\"vs40\":917783,\"vs41\":917784,\"vs42\":917785,\"vs43\":917786,\"vs44\":917787,\"vs45\":917788,\"vs46\":917789,\"vs47\":917790,\"vs48\":917791,\"vs49\":917792,\"vs50\":917793,\"vs51\":917794,\"vs52\":917795,\"vs53\":917796,\"vs54\":917797,\"vs55\":917798,\"vs56\":917799,\"vs57\":917800,\"vs58\":917801,\"vs59\":917802,\"vs60\":917803,\"vs61\":917804,\"vs62\":917805,\"vs63\":917806,\"vs64\":917807,\"vs65\":917808,\"vs66\":917809,\"vs67\":917810,\"vs68\":917811,\"vs69\":917812,\"vs70\":917813,\"vs71\":917814,\"vs72\":917815,\"vs73\":917816,\"vs74\":917817,\"vs75\":917818,\"vs76\":917819,\"vs77\":917820,\"vs78\":917821,\"vs79\":917822,\"vs80\":917823,\"vs81\":917824,\"vs82\":917825,\"vs83\":917826,\"vs84\":917827,\"vs85\":917828,\"vs86\":917829,\"vs87\":917830,\"vs88\":917831,\"vs89\":917832,\"vs90\":917833,\"vs91\":917834,\"vs92\":917835,\"vs93\":917836,\"vs94\":917837,\"vs95\":917838,\"vs96\":917839,\"vs97\":917840,\"vs98\":917841,\"vs99\":917842,\"vs100\":917843,\"vs101\":917844,\"vs102\":917845,\"vs103\":917846,\"vs104\":917847,\"vs105\":917848,\"vs106\":917849,\"vs107\":917850,\"vs108\":917851,\"vs109\":917852,\"vs110\":917853,\"vs111\":917854,\"vs112\":917855,\"vs113\":917856,\"vs114\":917857,\"vs115\":917858,\"vs116\":917859,\"vs117\":917860,\"vs118\":917861,\"vs119\":917862,\"vs120\":917863,\"vs121\":917864,\"vs122\":917865,\"vs123\":917866,\"vs124\":917867,\"vs125\":917868,\"vs126\":917869,\"vs127\":917870,\"vs128\":917871,\"vs129\":917872,\"vs130\":917873,\"vs131\":917874,\"vs132\":917875,\"vs133\":917876,\"vs134\":917877,\"vs135\":917878,\"vs136\":917879,\"vs137\":917880,\"vs138\":917881,\"vs139\":917882,\"vs140\":917883,\"vs141\":917884,\"vs142\":917885,\"vs143\":917886,\"vs144\":917887,\"vs145\":917888,\"vs146\":917889,\"vs147\":917890,\"vs148\":917891,\"vs149\":917892,\"vs150\":917893,\"vs151\":917894,\"vs152\":917895,\"vs153\":917896,\"vs154\":917897,\"vs155\":917898,\"vs156\":917899,\"vs157\":917900,\"vs158\":917901,\"vs159\":917902,\"vs160\":917903,\"vs161\":917904,\"vs162\":917905,\"vs163\":917906,\"vs164\":917907,\"vs165\":917908,\"vs166\":917909,\"vs167\":917910,\"vs168\":917911,\"vs169\":917912,\"vs170\":917913,\"vs171\":917914,\"vs172\":917915,\"vs173\":917916,\"vs174\":917917,\"vs175\":917918,\"vs176\":917919,\"vs177\":917920,\"vs178\":917921,\"vs179\":917922,\"vs180\":917923,\"vs181\":917924,\"vs182\":917925,\"vs183\":917926,\"vs184\":917927,\"vs185\":917928,\"vs186\":917929,\"vs187\":917930,\"vs188\":917931,\"vs189\":917932,\"vs190\":917933,\"vs191\":917934,\"vs192\":917935,\"vs193\":917936,\"vs194\":917937,\"vs195\":917938,\"vs196\":917939,\"vs197\":917940,\"vs198\":917941,\"vs199\":917942,\"vs200\":917943,\"vs201\":917944,\"vs202\":917945,\"vs203\":917946,\"vs204\":917947,\"vs205\":917948,\"vs206\":917949,\"vs207\":917950,\"vs208\":917951,\"vs209\":917952,\"vs210\":917953,\"vs211\":917954,\"vs212\":917955,\"vs213\":917956,\"vs214\":917957,\"vs215\":917958,\"vs216\":917959,\"vs217\":917960,\"vs218\":917961,\"vs219\":917962,\"vs220\":917963,\"vs221\":917964,\"vs222\":917965,\"vs223\":917966,\"vs224\":917967,\"vs225\":917968,\"vs226\":917969,\"vs227\":917970,\"vs228\":917971,\"vs229\":917972,\"vs230\":917973,\"vs231\":917974,\"vs232\":917975,\"vs233\":917976,\"vs234\":917977,\"vs235\":917978,\"vs236\":917979,\"vs237\":917980,\"vs238\":917981,\"vs239\":917982,\"vs240\":917983,\"vs241\":917984,\"vs242\":917985,\"vs243\":917986,\"vs244\":917987,\"vs245\":917988,\"vs246\":917989,\"vs247\":917990,\"vs248\":917991,\"vs249\":917992,\"vs250\":917993,\"vs251\":917994,\"vs252\":917995,\"vs253\":917996,\"vs254\":917997,\"vs255\":917998,\"vs256\":917999}\n# }}}\n\n_ASCII_CONTROL_CHARS = {'a':7, 'b':8, 'f': 12, 'n': 10, 'r': 13, 't': 9, 'v': 11}\n_HEX_PAT = /^[a-fA-F0-9]/\n_NUM_PAT = /^[0-9]/\n_GROUP_PAT = /<([^>]+)>/\n_NAME_PAT = /^[a-zA-Z ]/\n\nI = IGNORECASE = 2\nL = LOCALE = 4\nM = MULTILINE = 8\nD = DOTALL = 16\nU = UNICODE = 32\nX = VERBOSE = 64\nDEBUG = 128\nA = ASCII = 256\n\nsupports_unicode = RegExp.prototype.unicode is not undefined\n\n_RE_ESCAPE = /[-\\/\\\\^$*+?.()|[\\]{}]/g\n\n_re_cache_map = {}\n_re_cache_items = v'[]'\n\nerror = SyntaxError # This is the error JS throws for invalid regexps\nhas_prop = Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty)\n\ndef _expand(groups, repl, group_name_map):\n i = 0\n\n def next():\n nonlocal i\n return v'repl[i++]'\n\n def peek():\n return repl[i]\n\n def read_digits(count, pat, base, maxval, prefix):\n ans = prefix or ''\n greedy = count is Number.MAX_VALUE\n while count > 0:\n count -= 1\n if not pat.test(peek()):\n if greedy:\n break\n return ans\n ans += next()\n nval = parseInt(ans, base)\n if nval > maxval:\n return ans\n return nval\n\n def read_escape_sequence():\n nonlocal i\n q = next()\n if not q or q is '\\\\':\n return '\\\\'\n if '\"\\''.indexOf(q) is not -1:\n return q\n if _ASCII_CONTROL_CHARS[q]:\n return String.fromCharCode(_ASCII_CONTROL_CHARS[q])\n if '0' <= q <= '9':\n ans = read_digits(Number.MAX_VALUE, _NUM_PAT, 10, Number.MAX_VALUE, q)\n if jstype(ans) is 'number':\n return groups[ans] or ''\n return '\\\\' + ans\n if q is 'g':\n m = _GROUP_PAT.exec(repl[i:])\n if m is not None:\n i += m[0].length\n gn = m[1]\n if isNaN(parseInt(gn, 10)):\n if not has_prop(group_name_map, gn):\n return ''\n gn = group_name_map[gn][-1]\n return groups[gn] or ''\n if q is 'x':\n code = read_digits(2, _HEX_PAT, 16, 0x10FFFF)\n if jstype(code) is 'number':\n return String.fromCharCode(code)\n return '\\\\x' + code\n if q is 'u':\n code = read_digits(4, _HEX_PAT, 16, 0x10FFFF)\n if jstype(code) is 'number':\n return String.fromCharCode(code)\n return '\\\\u' + code\n if q is 'U':\n code = read_digits(8, _HEX_PAT, 16, 0x10FFFF)\n if jstype(code) is 'number':\n if code <= 0xFFFF:\n return String.fromCharCode(code)\n code -= 0x10000\n return String.fromCharCode(0xD800+(code>>10), 0xDC00+(code&0x3FF))\n return '\\\\U' + code\n if q is 'N' and peek() is '{':\n next()\n name = ''\n while _NAME_PAT.test(peek()):\n name += next()\n if peek() is not '}':\n return '\\\\N{' + name\n next()\n key = (name or '').toLowerCase()\n if not name or not has_prop(_ALIAS_MAP, key):\n return '\\\\N{' + name + '}'\n code = _ALIAS_MAP[key]\n if code <= 0xFFFF:\n return String.fromCharCode(code)\n code -= 0x10000\n return String.fromCharCode(0xD800+(code>>10), 0xDC00+(code&0x3FF))\n\n return '\\\\' + q\n\n ans = ch = ''\n while True:\n ch = next()\n if ch is '\\\\':\n ans += read_escape_sequence()\n elif not ch:\n break\n else:\n ans += ch\n return ans\n\ndef transform_regex(source, flags):\n pos = 0\n previous_backslash = in_class = False\n ans = ''\n group_map = {}\n flags = flags or 0\n group_count = 0\n\n while pos < source.length:\n ch = v'source[pos++]'\n if previous_backslash:\n ans += '\\\\' + ch\n previous_backslash = False\n continue\n\n if in_class:\n if ch is ']':\n in_class = False\n ans += ch\n continue\n\n if ch is '\\\\':\n previous_backslash = True\n continue\n\n if ch is '[':\n in_class = True\n if source[pos] is ']': # in python the empty set is not allowed, instead []] is the same as [\\]]\n pos += 1\n ch = r'[\\]'\n elif ch is '(':\n if source[pos] is '?':\n extension = source[pos + 1]\n if extension is '#':\n close = source.indexOf(')', pos + 1)\n if close is -1:\n raise ValueError('Expecting a closing )')\n pos = close + 1\n continue\n if 'aiLmsux'.indexOf(extension) is not -1:\n flag_map = {'a':ASCII, 'i':IGNORECASE, 'L':LOCALE, 'm':MULTILINE, 's':DOTALL, 'u':UNICODE, 'x':VERBOSE}\n close = source.indexOf(')', pos + 1)\n if close is -1:\n raise SyntaxError('Expecting a closing )')\n flgs = source[pos+1:close]\n for v'var i = 0; i < flgs.length; i++':\n q = flgs[i] # noqa:undef\n if not has_prop(flag_map, q):\n raise SyntaxError('Invalid flag: ' + q)\n flags |= flag_map[q]\n pos = close + 1\n continue\n if extension is '(':\n raise SyntaxError('Group existence assertions are not supported in JavaScript')\n if extension is 'P':\n pos += 2\n q = source[pos]\n if q is '<':\n close = source.indexOf('>', pos)\n if close is -1:\n raise SyntaxError('Named group not closed, expecting >')\n name = source[pos+1:close]\n if not has_prop(group_map, name):\n group_map[name] = v'[]'\n group_map[name].push(v'++group_count')\n pos = close + 1\n elif q is '=':\n close = source.indexOf(')', pos)\n if close is -1:\n raise SyntaxError('Named group back-reference not closed, expecting a )')\n name = source[pos+1:close]\n if not isNaN(parseInt(name, 10)):\n ans += '\\\\' + name\n else:\n if not has_prop(group_map, name):\n raise SyntaxError('Invalid back-reference. The named group: ' + name + ' has not yet been defined.')\n ans += '\\\\' + group_map[name][-1]\n pos = close + 1\n continue\n else:\n raise SyntaxError('Expecting < or = after (?P')\n else:\n group_count += 1\n elif ch is '.' and (flags & DOTALL):\n ans += r'[\\s\\S]' # JavaScript has no DOTALL\n continue\n\n ans += ch\n\n return ans, flags, group_map\n\nclass MatchObject:\n\n def __init__(self, regex, match, pos, endpos):\n self.re = regex\n self.string = match.input\n self._start_pos = match.index\n self._groups = match\n self.pos, self.endpos = pos, endpos\n\n def _compute_extents(self):\n # compute start/end for each group\n match = self._groups\n self._start = v'Array(match.length)'\n self._end = v'Array(match.length)'\n self._start[0] = self._start_pos\n self._end[0] = self._start_pos + match[0].length\n offset = self._start_pos\n extent = match[0]\n loc = 0\n for v'var i = 1; i < match.length; i++':\n g = match[i]\n loc = extent.indexOf(g, loc)\n if loc is -1:\n self._start[i] = self._start[i-1]\n self._end[i] = self._end[i-1]\n else:\n self._start[i] = offset + loc\n loc += g.length\n self._end[i] = offset + loc # noqa:undef\n\n def groups(self, defval=None):\n ans = v'[]'\n for v'var i = 1; i < self._groups.length; i++':\n val = self._groups[i] # noqa:undef\n if val is undefined:\n val = defval\n ans.push(val)\n return ans\n\n def _group_number(self, g):\n if jstype(g) is 'number':\n return g\n if has_prop(self.re.group_name_map, g):\n return self.re.group_name_map[g][-1]\n return g\n\n def _group_val(self, q, defval):\n val = undefined\n if jstype(q) is 'number' and -1 < q < self._groups.length:\n val = self._groups[q]\n else:\n if has_prop(self.re.group_name_map, q):\n val = self._groups[self.re.group_name_map[q][-1]]\n if val is undefined:\n val = defval\n return val\n\n def group(self):\n if arguments.length is 0:\n return self._groups[0]\n ans = v'[]'\n for v'var i = 0; i < arguments.length; i++':\n q = arguments[i] # noqa:undef\n ans.push(self._group_val(q, None))\n return ans[0] if ans.length is 1 else ans\n\n def start(self, g):\n if self._start is undefined:\n self._compute_extents()\n val = self._start[self._group_number(g or 0)]\n if val is undefined:\n val = -1\n return val\n\n def end(self, g):\n if self._end is undefined:\n self._compute_extents()\n val = self._end[self._group_number(g or 0)]\n if val is undefined:\n val = -1\n return val\n\n def span(self, g):\n return [self.start(g), self.end(g)]\n\n def expand(self, repl):\n return _expand(repl, this._groups, this.re.group_name_map)\n\n def groupdict(self, defval=None):\n gnm = self.re.group_name_map\n names = Object.keys(gnm)\n ans = {}\n for v\"var i = 0; i < names.length; i++\":\n name = names[i] # noqa:undef\n if has_prop(gnm, name):\n val = self._groups[gnm[name][-1]]\n if val is undefined:\n val = defval\n ans[name] = val\n return ans\n\n def captures(self, group_name):\n ans = []\n if not has_prop(self.re.group_name_map, group_name):\n return ans\n groups = self.re.group_name_map[group_name]\n for v'var i = 0; i < groups.length; i++':\n val = self._groups[groups[i]] # noqa:undef\n if val is not undefined:\n ans.push(val)\n return ans\n\n def capturesdict(self):\n gnm = self.re.group_name_map\n names = Object.keys(gnm)\n ans = {}\n for v'var i = 0; i < names.length; i++':\n name = names[i] # noqa:undef\n ans[name] = self.captures(name)\n return ans\n\nclass RegexObject:\n\n def __init__(self, pattern, flags):\n self.pattern = pattern.source if isinstance(pattern, RegExp) else pattern\n self.js_pattern, self.flags, self.group_name_map = transform_regex(self.pattern, flags)\n\n modifiers = ''\n if self.flags & IGNORECASE: modifiers += 'i'\n if self.flags & MULTILINE: modifiers += 'm'\n if not (self.flags & ASCII) and supports_unicode:\n modifiers += 'u'\n self._modifiers = modifiers + 'g'\n self._pattern = RegExp(self.js_pattern, self._modifiers)\n\n def _do_search(self, pat, string, pos, endpos):\n pat.lastIndex = 0\n if endpos is not None:\n string = string[:endpos]\n while True:\n n = pat.exec(string)\n if n is None:\n return None\n if n.index >= pos:\n return MatchObject(self, n, pos, endpos)\n\n def search(self, string, pos=0, endpos=None):\n return self._do_search(self._pattern, string, pos, endpos)\n\n def match(self, string, pos=0, endpos=None):\n return self._do_search(RegExp('^' + self.js_pattern, self._modifiers), string, pos, endpos)\n\n def split(self, string, maxsplit=0):\n self._pattern.lastIndex = 0\n return string.split(self._pattern, maxsplit or undefined)\n\n def findall(self, string):\n self._pattern.lastIndex = 0\n return ρσ_list_decorate(string.match(self._pattern) or v'[]')\n\n def finditer(self, string):\n # We have to copy pat since lastIndex is mutable\n pat = RegExp(this._pattern.source, this._modifiers) # noqa: unused-local\n ans = v\"{'_string':string, '_r':pat, '_self':self}\"\n ans[ρσ_iterator_symbol] = def():\n return this\n ans['next'] = def():\n m = this._r.exec(this._string)\n if m is None:\n return v\"{'done':true}\"\n return v\"{'done':false, 'value':new MatchObject(this._self, m, 0, null)}\"\n return ans\n\n def subn(self, repl, string, count=0):\n expand = _expand\n if jstype(repl) is 'function':\n expand = def(m, repl, gnm): return '' + repl(MatchObject(self, m, 0, None))\n this._pattern.lastIndex = 0\n num = 0\n matches = v'[]'\n\n while count < 1 or num < count:\n m = this._pattern.exec(string)\n if m is None:\n break\n matches.push(m)\n num += 1\n\n for v'var i = matches.length - 1; i > -1; i--':\n m = matches[i] # noqa:undef\n start = m.index\n end = start + m[0].length\n string = string[:start] + expand(m, repl, self.group_name_map) + string[end:]\n return string, matches.length\n\n def sub(self, repl, string, count=0):\n return self.subn(repl, string, count)[0]\n\ndef _get_from_cache(pattern, flags):\n if isinstance(pattern, RegExp):\n pattern = pattern.source\n key = JSON.stringify(v'[pattern, flags]')\n if has_prop(_re_cache_map, key):\n return _re_cache_map[key]\n if _re_cache_items.length >= 100:\n v'delete _re_cache_map[_re_cache_items.shift()]'\n ans = RegexObject(pattern, flags)\n _re_cache_map[key] = ans\n _re_cache_items.push(key)\n return ans\n\ndef compile(pattern, flags=0):\n return _get_from_cache(pattern, flags)\n\ndef search(pattern, string, flags=0):\n return _get_from_cache(pattern, flags).search(string)\n\ndef match(pattern, string, flags=0):\n return _get_from_cache(pattern, flags).match(string)\n\ndef split(pattern, string, maxsplit=0, flags=0):\n return _get_from_cache(pattern, flags).split(string)\n\ndef findall(pattern, string, flags=0):\n return _get_from_cache(pattern, flags).findall(string)\n\ndef finditer(pattern, string, flags=0):\n return _get_from_cache(pattern, flags).finditer(string)\n\ndef sub(pattern, repl, string, count=0, flags=0):\n return _get_from_cache(pattern, flags).sub(repl, string, count)\n\ndef subn(pattern, repl, string, count=0, flags=0):\n return _get_from_cache(pattern, flags).subn(repl, string, count)\n\ndef escape(string):\n return string.replace(_RE_ESCAPE, '\\\\$&')\n\ndef purge():\n nonlocal _re_cache_map, _re_cache_items\n _re_cache_map = {}\n _re_cache_items = v'[]'\n","__stdlib__/traceback.pyj":"# vim:fileencoding=utf-8\n# License: BSD Copyright: 2016, Kovid Goyal \n# globals: ρσ_str, ρσ_last_exception\n\n\ndef _get_internal_traceback(err):\n if isinstance(err, Exception) and err.stack:\n lines = ρσ_str.splitlines(err.stack)\n final_lines = v'[]'\n found_sentinel = False\n for i, line in enumerate(lines):\n sline = ρσ_str.strip(line)\n if i is 0:\n final_lines.push(line)\n continue\n if found_sentinel:\n final_lines.push(line)\n continue\n # These two conditions work on desktop Chrome and Firefox to identify the correct\n # line in the traceback.\n if sline.startsWith('at new ' + err.name) or sline.startsWith(err.name + '@'):\n found_sentinel = True\n return final_lines.join('\\n')\n return err and err.stack\n\ndef format_exception(exc, limit):\n if jstype(exc) is 'undefined':\n exc = ρσ_last_exception\n if not isinstance(exc, Error):\n if exc and exc.toString:\n return [exc.toString()]\n return []\n tb = _get_internal_traceback(exc)\n if tb:\n lines = ρσ_str.splitlines(tb)\n e = lines[0]\n lines = lines[1:]\n if limit:\n lines = lines[:limit+1] if limit > 0 else lines[limit:]\n lines.reverse()\n lines.push(e)\n lines.insert(0, 'Traceback (most recent call last):')\n return [l+'\\n' for l in lines]\n return [exc.toString()]\n\ndef format_exc(limit):\n return format_exception(ρσ_last_exception, limit).join('')\n\ndef print_exc(limit):\n print(format_exc(limit))\n\ndef format_stack(limit):\n stack = Error().stack\n if not stack:\n return []\n lines = str.splitlines(stack)[2:]\n lines.reverse()\n if limit:\n lines = lines[:limit+1] if limit > 0 else lines[limit:]\n return [l + '\\n' for l in lines]\n\ndef print_stack(limit):\n print(format_stack(limit).join(''))\n","__stdlib__/uuid.pyj":"# vim:fileencoding=utf-8\n# License: BSD Copyright: 2017, Kovid Goyal \n# globals: crypto\nfrom __python__ import hash_literals\n\nfrom encodings import hexlify, urlsafe_b64decode, urlsafe_b64encode\n\nRFC_4122 = 1\n\nif jstype(crypto) is 'object' and crypto.getRandomValues:\n random_bytes = def (num):\n ans = Uint8Array(num or 16)\n crypto.getRandomValues(ans)\n return ans\nelse:\n random_bytes = def (num):\n ans = Uint8Array(num or 16)\n for i in range(ans.length):\n ans[i] = Math.floor(Math.random() * 256)\n return ans\n\n\ndef uuid4_bytes():\n data = random_bytes()\n data[6] = 0b01000000 | (data[6] & 0b1111)\n data[8] = (((data[8] >> 4) & 0b11 | 0b1000) << 4) | (data[8] & 0b1111)\n return data\n\n\ndef as_str():\n h = this.hex\n return h[:8] + '-' + h[8:12] + '-' + h[12:16] + '-' + h[16:20] + '-' + h[20:]\n\n\ndef uuid4():\n b = uuid4_bytes()\n return {\n 'hex': hexlify(b),\n 'bytes': b,\n 'variant': RFC_4122,\n 'version': 4,\n '__str__': as_str,\n 'toString': as_str,\n }\n\n\ndef num_to_string(numbers, alphabet, pad_to_length):\n ans = v'[]'\n alphabet_len = alphabet.length\n numbers = Array.prototype.slice.call(numbers)\n for v'var i = 0; i < numbers.length - 1; i++':\n x = divmod(numbers[i], alphabet_len)\n numbers[i] = x[0]\n numbers[i+1] += x[1]\n for v'var i = 0; i < numbers.length; i++':\n number = numbers[i]\n while number:\n x = divmod(number, alphabet_len)\n number = x[0]\n ans.push(alphabet[x[1]])\n if pad_to_length and pad_to_length > ans.length:\n ans.push(alphabet[0].repeat(pad_to_length - ans.length))\n return ans.join('')\n\n\ndef short_uuid():\n # A totally random uuid encoded using only URL and filename safe characters\n return urlsafe_b64encode(random_bytes(), '')\n\n\ndef short_uuid4():\n # A uuid4 encoded using only URL and filename safe characters\n return urlsafe_b64encode(uuid4_bytes(), '')\n\n\ndef decode_short_uuid(val):\n return urlsafe_b64decode(val + '==')\n"}; + +// End embedded modules }}} + +/* vim:fileencoding=utf-8 + * + * Copyright (C) 2016 Kovid Goyal + * + * Distributed under terms of the BSD license + */ + +var namespace = {}, jsSHA = {}; + +var write_cache = {}; + +var builtin_modules = { + 'crypto' : { + 'createHash': function create_hash() { + var ans = new jsSHA.jsSHA('SHA-1', 'TEXT'); + ans.digest = function hex_digest() { return ans.getHash('HEX'); }; + return ans; + }, + }, + + 'vm': { + 'createContext': function create_context(ctx) { + var iframe = document.createElement('iframe'); + iframe.style.display = 'none'; + document.body.appendChild(iframe); + var win = iframe.contentWindow; + if(!ctx) ctx = {}; + if (!ctx.sha1sum) ctx.sha1sum = sha1sum; + if (!ctx.require) ctx.require = require; + Object.keys(ctx).forEach(function(k) { win[k] = ctx[k]; }); + return win; + }, + + 'runInContext': function run_in_context(code, ctx) { + return ctx.eval(code); + }, + + 'runInThisContext': eval, + }, + 'path': { + 'join': function path_join() { return Array.prototype.slice.call(arguments).join('/'); }, + 'dirname': function path_dirname(path) { + return path.split('/').slice(0, -1).join('/'); + }, + }, + 'inspect': function inspect(x) { return x.toString(); }, + + 'fs': { + 'readFileSync': function readfile(name) { + if (namespace.virtual_file_system && namespace.virtual_file_system.read_file_sync) { + data = namespace.virtual_file_system.read_file_sync(name); + if (data !== null) return data; + } + var data = namespace.file_data[name]; + if (data) return data; + data = write_cache[name]; + if (data) return data; + var err = Error(); + err.code = 'ENOENT'; + throw err; + }, + + 'writeFileSync': function writefile(name, data) { + if (namespace.virtual_file_system && namespace.virtual_file_system.write_file_sync) { + namespace.virtual_file_system.write_file_sync(name, data); + } else write_cache[name] = data; + }, + + }, +}; + +function require(name) { + return builtin_modules[name] || {}; +} + +// Embedded sha1 implementation {{{ +(function() { +/* + A JavaScript implementation of the SHA family of hashes, as + defined in FIPS PUB 180-4 and FIPS PUB 202, as well as the corresponding + HMAC implementation as defined in FIPS PUB 198a + + Copyright Brian Turek 2008-2017 + Distributed under the BSD License + See http://caligatio.github.com/jsSHA/ for more information + + Several functions taken from Paul Johnston +*/ +(function(G){function x(b,a,d){var c=0,e=[],h=0,l=!1,f=[],g=[],q=!1;d=d||{};var r=d.encoding||"UTF8";var k=d.numRounds||1;if(k!==parseInt(k,10)||1>k)throw Error("numRounds must a integer >= 1");if("SHA-1"===b){var n=512;var y=z;var m=H;var p=160;var t=function(c){return c.slice()}}else throw Error("Chosen SHA variant is not supported");var v=A(a,r);var u=w(b);this.setHMACKey=function(e,a,d){if(!0===l)throw Error("HMAC key already set");if(!0===q)throw Error("Cannot set HMAC key after calling update"); +r=(d||{}).encoding||"UTF8";a=A(a,r)(e);e=a.binLen;a=a.value;var h=n>>>3;d=h/4-1;if(he/8){for(;a.length<=d;)a.push(0);a[d]&=4294967040}for(e=0;e<=d;e+=1)f[e]=a[e]^909522486,g[e]=a[e]^1549556828;u=y(f,u);c=n;l=!0};this.update=function(a){var d,b=0,l=n>>>5;var f=v(a,e,h);a=f.binLen;var g=f.value;f=a>>>5;for(d=0;d>>5);h=a%n;q=!0};this.getHash=function(a,d){if(!0=== +l)throw Error("Cannot call getHash after setting HMAC key");var f=B(d);switch(a){case "HEX":a=function(a){return C(a,p,f)};break;case "B64":a=function(a){return D(a,p,f)};break;case "BYTES":a=function(a){return E(a,p)};break;case "ARRAYBUFFER":try{d=new ArrayBuffer(0)}catch(I){throw Error("ARRAYBUFFER not supported by this environment");}a=function(a){return F(a,p)};break;default:throw Error("format must be HEX, B64, BYTES, or ARRAYBUFFER");}var g=m(e.slice(),h,c,t(u),p);for(d=1;d>>2]>>>8*(3+e%4*-1);c+="0123456789abcdef".charAt(h>>>4&15)+"0123456789abcdef".charAt(h&15)}return d.outputUpper?c.toUpperCase():c}function D(b,a,d){var c="",e=a/8,h;for(h=0;h>>2]:0;var f=h+2>>2]:0;f=(b[h>>>2]>>>8*(3+h%4*-1)&255)<<16|(l>>>8*(3+(h+1)%4*-1)&255)<<8|f>>>8*(3+(h+2)%4*-1)&255;for(l=0;4>l;l+=1)8*h+6*l<=a?c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(f>>> +6*(3-l)&63):c+=d.b64Pad}return c}function E(b,a){var d="";a/=8;var c;for(c=0;c>>2]>>>8*(3+c%4*-1)&255;d+=String.fromCharCode(e)}return d}function F(b,a){a/=8;var d,c=new ArrayBuffer(a);var e=new Uint8Array(c);for(d=0;d>>2]>>>8*(3+d%4*-1)&255;return c}function B(b){var a={outputUpper:!1,b64Pad:"=",shakeLen:-1};b=b||{};a.outputUpper=b.outputUpper||!1;!0===b.hasOwnProperty("b64Pad")&&(a.b64Pad=b.b64Pad);b.hasOwnProperty("shakeLen");if("boolean"!==typeof a.outputUpper)throw Error("Invalid outputUpper formatting option"); +if("string"!==typeof a.b64Pad)throw Error("Invalid b64Pad formatting option");return a}function A(b,a){switch(a){case "UTF8":case "UTF16BE":case "UTF16LE":break;default:throw Error("encoding must be UTF8, UTF16BE, or UTF16LE");}switch(b){case "HEX":b=function(a,c,e){var d=a.length,b,f;if(d%2)throw Error("String of HEX type must be in byte increments");c=c||[0];e=e||0;var g=e>>>3;for(b=0;b>>1)+g;for(f=r>>>2;c.length<=f;)c.push(0);c[f]|=q<<8*(3+r%4*-1)}return{value:c,binLen:4*d+e}};break;case "TEXT":b=function(d,c,e){var b=0,l,f,g;c=c||[0];e=e||0;var q=e>>>3;if("UTF8"===a){var r=3;for(l=0;lk?n.push(k):2048>k?(n.push(192|k>>>6),n.push(128|k&63)):55296>k||57344<=k?n.push(224|k>>>12,128|k>>>6&63,128|k&63):(l+=1,k=65536+((k&1023)<<10|d.charCodeAt(l)&1023),n.push(240|k>>>18,128|k>>>12&63,128|k>>>6&63,128|k&63));for(f=0;f>>2;c.length<=g;)c.push(0);c[g]|=n[f]<<8*(r+m%4*-1);b+=1}}}else if("UTF16BE"===a||"UTF16LE"===a)for(r=2,n="UTF16LE"===a&&!0||"UTF16LE"!==a&&!1,l=0;l>>8);m=b+q;for(g=m>>>2;c.length<=g;)c.push(0);c[g]|=k<<8*(r+m%4*-1);b+=2}return{value:c,binLen:8*b+e}};break;case "B64":b=function(a,c,e){var d=0,b,f;if(-1===a.search(/^[a-zA-Z0-9=+\/]+$/))throw Error("Invalid character in base-64 string");var g=a.indexOf("=");a=a.replace(/\=/g, +"");if(-1!==g&&g', + basedir: options.basedir || dirname(filename || ''), + libdir: options.libdir, + }); + var out_ops = { + beautify: (options.beautify === undefined ? true : options.beautify), + private_scope: !options.bare, + omit_baselib: !!options.omit_baselib, + js_version: options.js_version || 5, + }; + if (!out_ops.omit_baselib) out_ops.baselib_plain = data['baselib-plain-' + (out_ops.beautify ? 'pretty' : 'ugly') + '.js']; + var out = new RapydScript.OutputStream(out_ops); + ast.print(out); + return out.get(); +} + +function create_embedded_compiler(runjs) { + var c = vrequire('tools/embedded_compiler.js'); + return c(create_compiler(), data['baselib-plain-pretty.js'], runjs); +} + +function web_repl() { + var repl = vrequire('tools/web_repl.js'); + return repl(create_compiler(), data['baselib-plain-pretty.js']); +} + +function init_repl(options) { + var repl = vrequire('tools/repl.js'); + options.baselib = data['baselib-plain-pretty.js']; + return repl(options); +} + +function gettext_parse(catalog, code, filename) { + g = vrequire('tools/gettext.js'); + g.gettext(catalog, code, filename); +} + +function gettext_output(catalog, options, write) { + g = vrequire('tools/gettext.js'); + g.write_output(catalog, options, write); +} + +function msgfmt(data, options) { + m = vrequire('tools/msgfmt.js'); + return m.build(data, options); +} + +function completer(compiler, options) { + m = vrequire('tools/completer.js'); + return m(compiler, options); +} + +if (typeof exports === 'object') { + exports.compile = compile; + exports.create_embedded_compiler = create_embedded_compiler; + exports.web_repl = web_repl; + exports.init_repl = init_repl; + exports.gettext_parse = gettext_parse; + exports.gettext_output = gettext_output; + exports.msgfmt = msgfmt; + exports.rs_version = rs_version; + exports.file_data = data; + exports.completer = completer; + if (typeof rs_commit_sha === 'string') exports.rs_commit_sha = rs_commit_sha; +} +external_namespace.RapydScript = namespace; +})(this); diff --git a/lib/toastui-chart.min.css b/js/toastui-chart.min.css similarity index 100% rename from lib/toastui-chart.min.css rename to js/toastui-chart.min.css diff --git a/lib/toastui-chart.min.js b/js/toastui-chart.min.js similarity index 100% rename from lib/toastui-chart.min.js rename to js/toastui-chart.min.js diff --git a/js/toml.js b/js/toml.js new file mode 100644 index 0000000..5a70dbc --- /dev/null +++ b/js/toml.js @@ -0,0 +1 @@ +(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.toml=f()}})(function(){var define,module,exports;return function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i-1){genError("Cannot redefine existing key '"+traversedPath+"'.",line,column)}ctx=ctx[key];if(ctx instanceof Array&&ctx.length&&i-1){return'"'+str+'"'}else{return str}}}module.exports={compile:compile}},{}],3:[function(require,module,exports){module.exports=function(){function peg$subclass(child,parent){function ctor(){this.constructor=child}ctor.prototype=parent.prototype;child.prototype=new ctor}function SyntaxError(message,expected,found,offset,line,column){this.message=message;this.expected=expected;this.found=found;this.offset=offset;this.line=line;this.column=column;this.name="SyntaxError"}peg$subclass(SyntaxError,Error);function parse(input){var options=arguments.length>1?arguments[1]:{},peg$FAILED={},peg$startRuleFunctions={start:peg$parsestart},peg$startRuleFunction=peg$parsestart,peg$c0=[],peg$c1=function(){return nodes},peg$c2=peg$FAILED,peg$c3="#",peg$c4={type:"literal",value:"#",description:'"#"'},peg$c5=void 0,peg$c6={type:"any",description:"any character"},peg$c7="[",peg$c8={type:"literal",value:"[",description:'"["'},peg$c9="]",peg$c10={type:"literal",value:"]",description:'"]"'},peg$c11=function(name){addNode(node("ObjectPath",name,line,column))},peg$c12=function(name){addNode(node("ArrayPath",name,line,column))},peg$c13=function(parts,name){return parts.concat(name)},peg$c14=function(name){return[name]},peg$c15=function(name){return name},peg$c16=".",peg$c17={type:"literal",value:".",description:'"."'},peg$c18="=",peg$c19={type:"literal",value:"=",description:'"="'},peg$c20=function(key,value){addNode(node("Assign",value,line,column,key))},peg$c21=function(chars){return chars.join("")},peg$c22=function(node){return node.value},peg$c23='"""',peg$c24={type:"literal",value:'"""',description:'"\\"\\"\\""'},peg$c25=null,peg$c26=function(chars){return node("String",chars.join(""),line,column)},peg$c27='"',peg$c28={type:"literal",value:'"',description:'"\\""'},peg$c29="'''",peg$c30={type:"literal",value:"'''",description:"\"'''\""},peg$c31="'",peg$c32={type:"literal",value:"'",description:'"\'"'},peg$c33=function(char){return char},peg$c34=function(char){return char},peg$c35="\\",peg$c36={type:"literal",value:"\\",description:'"\\\\"'},peg$c37=function(){return""},peg$c38="e",peg$c39={type:"literal",value:"e",description:'"e"'},peg$c40="E",peg$c41={type:"literal",value:"E",description:'"E"'},peg$c42=function(left,right){return node("Float",parseFloat(left+"e"+right),line,column)},peg$c43=function(text){return node("Float",parseFloat(text),line,column)},peg$c44="+",peg$c45={type:"literal",value:"+",description:'"+"'},peg$c46=function(digits){return digits.join("")},peg$c47="-",peg$c48={type:"literal",value:"-",description:'"-"'},peg$c49=function(digits){return"-"+digits.join("")},peg$c50=function(text){return node("Integer",parseInt(text,10),line,column)},peg$c51="true",peg$c52={type:"literal",value:"true",description:'"true"'},peg$c53=function(){return node("Boolean",true,line,column)},peg$c54="false",peg$c55={type:"literal",value:"false",description:'"false"'},peg$c56=function(){return node("Boolean",false,line,column)},peg$c57=function(){return node("Array",[],line,column)},peg$c58=function(value){return node("Array",value?[value]:[],line,column)},peg$c59=function(values){return node("Array",values,line,column)},peg$c60=function(values,value){return node("Array",values.concat(value),line,column)},peg$c61=function(value){return value},peg$c62=",",peg$c63={type:"literal",value:",",description:'","'},peg$c64="{",peg$c65={type:"literal",value:"{",description:'"{"'},peg$c66="}",peg$c67={type:"literal",value:"}",description:'"}"'},peg$c68=function(values){return node("InlineTable",values,line,column)},peg$c69=function(key,value){return node("InlineTableValue",value,line,column,key)},peg$c70=function(digits){return"."+digits},peg$c71=function(date){return date.join("")},peg$c72=":",peg$c73={type:"literal",value:":",description:'":"'},peg$c74=function(time){return time.join("")},peg$c75="T",peg$c76={type:"literal",value:"T",description:'"T"'},peg$c77="Z",peg$c78={type:"literal",value:"Z",description:'"Z"'},peg$c79=function(date,time){return node("Date",new Date(date+"T"+time+"Z"),line,column)},peg$c80=function(date,time){return node("Date",new Date(date+"T"+time),line,column)},peg$c81=/^[ \t]/,peg$c82={type:"class",value:"[ \\t]",description:"[ \\t]"},peg$c83="\n",peg$c84={type:"literal",value:"\n",description:'"\\n"'},peg$c85="\r",peg$c86={type:"literal",value:"\r",description:'"\\r"'},peg$c87=/^[0-9a-f]/i,peg$c88={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},peg$c89=/^[0-9]/,peg$c90={type:"class",value:"[0-9]",description:"[0-9]"},peg$c91="_",peg$c92={type:"literal",value:"_",description:'"_"'},peg$c93=function(){return""},peg$c94=/^[A-Za-z0-9_\-]/,peg$c95={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},peg$c96=function(d){return d.join("")},peg$c97='\\"',peg$c98={type:"literal",value:'\\"',description:'"\\\\\\""'},peg$c99=function(){return'"'},peg$c100="\\\\",peg$c101={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},peg$c102=function(){return"\\"},peg$c103="\\b",peg$c104={type:"literal",value:"\\b",description:'"\\\\b"'},peg$c105=function(){return"\b"},peg$c106="\\t",peg$c107={type:"literal",value:"\\t",description:'"\\\\t"'},peg$c108=function(){return"\t"},peg$c109="\\n",peg$c110={type:"literal",value:"\\n",description:'"\\\\n"'},peg$c111=function(){return"\n"},peg$c112="\\f",peg$c113={type:"literal",value:"\\f",description:'"\\\\f"'},peg$c114=function(){return"\f"},peg$c115="\\r",peg$c116={type:"literal",value:"\\r",description:'"\\\\r"'},peg$c117=function(){return"\r"},peg$c118="\\U",peg$c119={type:"literal",value:"\\U",description:'"\\\\U"'},peg$c120=function(digits){return convertCodePoint(digits.join(""))},peg$c121="\\u",peg$c122={type:"literal",value:"\\u",description:'"\\\\u"'},peg$currPos=0,peg$reportedPos=0,peg$cachedPos=0,peg$cachedPosDetails={line:1,column:1,seenCR:false},peg$maxFailPos=0,peg$maxFailExpected=[],peg$silentFails=0,peg$cache={},peg$result;if("startRule"in options){if(!(options.startRule in peg$startRuleFunctions)){throw new Error("Can't start parsing from rule \""+options.startRule+'".')}peg$startRuleFunction=peg$startRuleFunctions[options.startRule]}function text(){return input.substring(peg$reportedPos,peg$currPos)}function offset(){return peg$reportedPos}function line(){return peg$computePosDetails(peg$reportedPos).line}function column(){return peg$computePosDetails(peg$reportedPos).column}function expected(description){throw peg$buildException(null,[{type:"other",description:description}],peg$reportedPos)}function error(message){throw peg$buildException(message,null,peg$reportedPos)}function peg$computePosDetails(pos){function advance(details,startPos,endPos){var p,ch;for(p=startPos;ppos){peg$cachedPos=0;peg$cachedPosDetails={line:1,column:1,seenCR:false}}advance(peg$cachedPosDetails,peg$cachedPos,pos);peg$cachedPos=pos}return peg$cachedPosDetails}function peg$fail(expected){if(peg$currPospeg$maxFailPos){peg$maxFailPos=peg$currPos;peg$maxFailExpected=[]}peg$maxFailExpected.push(expected)}function peg$buildException(message,expected,pos){function cleanupExpected(expected){var i=1;expected.sort(function(a,b){if(a.descriptionb.description){return 1}else{return 0}});while(i1?expectedDescs.slice(0,-1).join(", ")+" or "+expectedDescs[expected.length-1]:expectedDescs[0];foundDesc=found?'"'+stringEscape(found)+'"':"end of input";return"Expected "+expectedDesc+" but "+foundDesc+" found."}var posDetails=peg$computePosDetails(pos),found=pospeg$currPos){s5=input.charAt(peg$currPos);peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}if(s5!==peg$FAILED){s4=[s4,s5];s3=s4}else{peg$currPos=s3;s3=peg$c2}}else{peg$currPos=s3;s3=peg$c2}while(s3!==peg$FAILED){s2.push(s3);s3=peg$currPos;s4=peg$currPos;peg$silentFails++;s5=peg$parseNL();if(s5===peg$FAILED){s5=peg$parseEOF()}peg$silentFails--;if(s5===peg$FAILED){s4=peg$c5}else{peg$currPos=s4;s4=peg$c2}if(s4!==peg$FAILED){if(input.length>peg$currPos){s5=input.charAt(peg$currPos);peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}if(s5!==peg$FAILED){s4=[s4,s5];s3=s4}else{peg$currPos=s3;s3=peg$c2}}else{peg$currPos=s3;s3=peg$c2}}if(s2!==peg$FAILED){s1=[s1,s2];s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsepath(){var s0,s1,s2,s3,s4,s5;var key=peg$currPos*49+4,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===91){s1=peg$c7;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c8)}}if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){s3=peg$parsetable_key();if(s3!==peg$FAILED){s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===93){s5=peg$c9;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s5!==peg$FAILED){peg$reportedPos=s0;s1=peg$c11(s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsetablearray(){var s0,s1,s2,s3,s4,s5,s6,s7;var key=peg$currPos*49+5,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===91){s1=peg$c7;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c8)}}if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===91){s2=peg$c7;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c8)}}if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){s4=peg$parsetable_key();if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){if(input.charCodeAt(peg$currPos)===93){s6=peg$c9;peg$currPos++}else{s6=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s6!==peg$FAILED){if(input.charCodeAt(peg$currPos)===93){s7=peg$c9;peg$currPos++}else{s7=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s7!==peg$FAILED){peg$reportedPos=s0;s1=peg$c12(s4);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsetable_key(){var s0,s1,s2;var key=peg$currPos*49+6,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parsedot_ended_table_key_part();if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parsedot_ended_table_key_part()}}else{s1=peg$c2}if(s1!==peg$FAILED){s2=peg$parsetable_key_part();if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c13(s1,s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsetable_key_part();if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c14(s1)}s0=s1}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsetable_key_part(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+7,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parsekey();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c15(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parsequoted_key();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c15(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsedot_ended_table_key_part(){var s0,s1,s2,s3,s4,s5,s6;var key=peg$currPos*49+8,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parsekey();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===46){s4=peg$c16;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){peg$reportedPos=s0;s1=peg$c15(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parsequoted_key();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===46){s4=peg$c16;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){peg$reportedPos=s0;s1=peg$c15(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseassignment(){var s0,s1,s2,s3,s4,s5;var key=peg$currPos*49+9,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$parsekey();if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===61){s3=peg$c18;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c19)}}if(s3!==peg$FAILED){s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){s5=peg$parsevalue();if(s5!==peg$FAILED){peg$reportedPos=s0;s1=peg$c20(s1,s5);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsequoted_key();if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===61){s3=peg$c18;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c19)}}if(s3!==peg$FAILED){s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){s5=peg$parsevalue();if(s5!==peg$FAILED){peg$reportedPos=s0;s1=peg$c20(s1,s5);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsekey(){var s0,s1,s2;var key=peg$currPos*49+10,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parseASCII_BASIC();if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseASCII_BASIC()}}else{s1=peg$c2}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c21(s1)}s0=s1;peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsequoted_key(){var s0,s1;var key=peg$currPos*49+11,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$parsedouble_quoted_single_line_string();if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c22(s1)}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsesingle_quoted_single_line_string();if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c22(s1)}s0=s1}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsevalue(){var s0;var key=peg$currPos*49+12,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$parsestring();if(s0===peg$FAILED){s0=peg$parsedatetime();if(s0===peg$FAILED){s0=peg$parsefloat();if(s0===peg$FAILED){s0=peg$parseinteger();if(s0===peg$FAILED){s0=peg$parseboolean();if(s0===peg$FAILED){s0=peg$parsearray();if(s0===peg$FAILED){s0=peg$parseinline_table()}}}}}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsestring(){var s0;var key=peg$currPos*49+13,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$parsedouble_quoted_multiline_string();if(s0===peg$FAILED){s0=peg$parsedouble_quoted_single_line_string();if(s0===peg$FAILED){s0=peg$parsesingle_quoted_multiline_string();if(s0===peg$FAILED){s0=peg$parsesingle_quoted_single_line_string()}}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsedouble_quoted_multiline_string(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+14,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.substr(peg$currPos,3)===peg$c23){s1=peg$c23;peg$currPos+=3}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c24)}}if(s1!==peg$FAILED){s2=peg$parseNL();if(s2===peg$FAILED){s2=peg$c25}if(s2!==peg$FAILED){s3=[];s4=peg$parsemultiline_string_char();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parsemultiline_string_char()}if(s3!==peg$FAILED){if(input.substr(peg$currPos,3)===peg$c23){s4=peg$c23;peg$currPos+=3}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c24)}}if(s4!==peg$FAILED){peg$reportedPos=s0;s1=peg$c26(s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsedouble_quoted_single_line_string(){var s0,s1,s2,s3;var key=peg$currPos*49+15,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===34){s1=peg$c27;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c28)}}if(s1!==peg$FAILED){s2=[];s3=peg$parsestring_char();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parsestring_char()}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===34){s3=peg$c27;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c28)}}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c26(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsesingle_quoted_multiline_string(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+16,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.substr(peg$currPos,3)===peg$c29){s1=peg$c29;peg$currPos+=3}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c30)}}if(s1!==peg$FAILED){s2=peg$parseNL();if(s2===peg$FAILED){s2=peg$c25}if(s2!==peg$FAILED){s3=[];s4=peg$parsemultiline_literal_char();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parsemultiline_literal_char()}if(s3!==peg$FAILED){if(input.substr(peg$currPos,3)===peg$c29){s4=peg$c29;peg$currPos+=3}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c30)}}if(s4!==peg$FAILED){peg$reportedPos=s0;s1=peg$c26(s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsesingle_quoted_single_line_string(){var s0,s1,s2,s3;var key=peg$currPos*49+17,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===39){s1=peg$c31;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c32)}}if(s1!==peg$FAILED){s2=[];s3=peg$parseliteral_char();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseliteral_char()}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===39){s3=peg$c31;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c32)}}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c26(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsestring_char(){var s0,s1,s2;var key=peg$currPos*49+18,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$parseESCAPED();if(s0===peg$FAILED){s0=peg$currPos;s1=peg$currPos;peg$silentFails++;if(input.charCodeAt(peg$currPos)===34){s2=peg$c27;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c28)}}peg$silentFails--;if(s2===peg$FAILED){s1=peg$c5}else{peg$currPos=s1;s1=peg$c2}if(s1!==peg$FAILED){if(input.length>peg$currPos){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c33(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseliteral_char(){var s0,s1,s2;var key=peg$currPos*49+19,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$currPos;peg$silentFails++;if(input.charCodeAt(peg$currPos)===39){s2=peg$c31;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c32)}}peg$silentFails--;if(s2===peg$FAILED){s1=peg$c5}else{peg$currPos=s1;s1=peg$c2}if(s1!==peg$FAILED){if(input.length>peg$currPos){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c33(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsemultiline_string_char(){var s0,s1,s2;var key=peg$currPos*49+20,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$parseESCAPED();if(s0===peg$FAILED){s0=peg$parsemultiline_string_delim();if(s0===peg$FAILED){s0=peg$currPos;s1=peg$currPos;peg$silentFails++;if(input.substr(peg$currPos,3)===peg$c23){s2=peg$c23;peg$currPos+=3}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c24)}}peg$silentFails--;if(s2===peg$FAILED){s1=peg$c5}else{peg$currPos=s1;s1=peg$c2}if(s1!==peg$FAILED){if(input.length>peg$currPos){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c34(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsemultiline_string_delim(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+21,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===92){s1=peg$c35;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c36)}}if(s1!==peg$FAILED){s2=peg$parseNL();if(s2!==peg$FAILED){s3=[];s4=peg$parseNLS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseNLS()}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c37();s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsemultiline_literal_char(){var s0,s1,s2;var key=peg$currPos*49+22,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$currPos;peg$silentFails++;if(input.substr(peg$currPos,3)===peg$c29){s2=peg$c29;peg$currPos+=3}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c30)}}peg$silentFails--;if(s2===peg$FAILED){s1=peg$c5}else{peg$currPos=s1;s1=peg$c2}if(s1!==peg$FAILED){if(input.length>peg$currPos){s2=input.charAt(peg$currPos);peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c33(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsefloat(){var s0,s1,s2,s3;var key=peg$currPos*49+23,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$parsefloat_text();if(s1===peg$FAILED){s1=peg$parseinteger_text()}if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===101){s2=peg$c38;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c39)}}if(s2===peg$FAILED){if(input.charCodeAt(peg$currPos)===69){s2=peg$c40;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c41)}}}if(s2!==peg$FAILED){s3=peg$parseinteger_text();if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c42(s1,s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsefloat_text();if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c43(s1)}s0=s1}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsefloat_text(){var s0,s1,s2,s3,s4,s5;var key=peg$currPos*49+24,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===43){s1=peg$c44;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c45)}}if(s1===peg$FAILED){s1=peg$c25}if(s1!==peg$FAILED){s2=peg$currPos;s3=peg$parseDIGITS();if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===46){s4=peg$c16;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}if(s4!==peg$FAILED){s5=peg$parseDIGITS();if(s5!==peg$FAILED){s3=[s3,s4,s5];s2=s3}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c46(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===45){s1=peg$c47;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c48)}}if(s1!==peg$FAILED){s2=peg$currPos;s3=peg$parseDIGITS();if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===46){s4=peg$c16;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}if(s4!==peg$FAILED){s5=peg$parseDIGITS();if(s5!==peg$FAILED){s3=[s3,s4,s5];s2=s3}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c49(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseinteger(){var s0,s1;var key=peg$currPos*49+25,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$parseinteger_text();if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c50(s1)}s0=s1;peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseinteger_text(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+26,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===43){s1=peg$c44;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c45)}}if(s1===peg$FAILED){s1=peg$c25}if(s1!==peg$FAILED){s2=[];s3=peg$parseDIGIT_OR_UNDER();if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseDIGIT_OR_UNDER()}}else{s2=peg$c2}if(s2!==peg$FAILED){s3=peg$currPos;peg$silentFails++;if(input.charCodeAt(peg$currPos)===46){s4=peg$c16;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}peg$silentFails--;if(s4===peg$FAILED){s3=peg$c5}else{peg$currPos=s3;s3=peg$c2}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c46(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===45){s1=peg$c47;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c48)}}if(s1!==peg$FAILED){s2=[];s3=peg$parseDIGIT_OR_UNDER();if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseDIGIT_OR_UNDER()}}else{s2=peg$c2}if(s2!==peg$FAILED){s3=peg$currPos;peg$silentFails++;if(input.charCodeAt(peg$currPos)===46){s4=peg$c16;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}peg$silentFails--;if(s4===peg$FAILED){s3=peg$c5}else{peg$currPos=s3;s3=peg$c2}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c49(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseboolean(){var s0,s1;var key=peg$currPos*49+27,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.substr(peg$currPos,4)===peg$c51){s1=peg$c51;peg$currPos+=4}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c52)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c53()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,5)===peg$c54){s1=peg$c54;peg$currPos+=5}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c55)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c56()}s0=s1}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsearray(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+28,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===91){s1=peg$c7;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c8)}}if(s1!==peg$FAILED){s2=[];s3=peg$parsearray_sep();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parsearray_sep()}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===93){s3=peg$c9;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c57();s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===91){s1=peg$c7;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c8)}}if(s1!==peg$FAILED){s2=peg$parsearray_value();if(s2===peg$FAILED){s2=peg$c25}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===93){s3=peg$c9;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c58(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===91){s1=peg$c7;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c8)}}if(s1!==peg$FAILED){s2=[];s3=peg$parsearray_value_list();if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);s3=peg$parsearray_value_list()}}else{s2=peg$c2}if(s2!==peg$FAILED){if(input.charCodeAt(peg$currPos)===93){s3=peg$c9;peg$currPos++}else{s3=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c59(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===91){s1=peg$c7;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c8)}}if(s1!==peg$FAILED){s2=[];s3=peg$parsearray_value_list();if(s3!==peg$FAILED){while(s3!==peg$FAILED){s2.push(s3);s3=peg$parsearray_value_list()}}else{s2=peg$c2}if(s2!==peg$FAILED){s3=peg$parsearray_value();if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===93){s4=peg$c9;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c10)}}if(s4!==peg$FAILED){peg$reportedPos=s0;s1=peg$c60(s2,s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsearray_value(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+29,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parsearray_sep();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parsearray_sep()}if(s1!==peg$FAILED){s2=peg$parsevalue();if(s2!==peg$FAILED){s3=[];s4=peg$parsearray_sep();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parsearray_sep()}if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c61(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsearray_value_list(){var s0,s1,s2,s3,s4,s5,s6;var key=peg$currPos*49+30,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parsearray_sep();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parsearray_sep()}if(s1!==peg$FAILED){s2=peg$parsevalue();if(s2!==peg$FAILED){s3=[];s4=peg$parsearray_sep();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parsearray_sep()}if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===44){s4=peg$c62;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c63)}}if(s4!==peg$FAILED){s5=[];s6=peg$parsearray_sep();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parsearray_sep()}if(s5!==peg$FAILED){peg$reportedPos=s0;s1=peg$c61(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsearray_sep(){var s0;var key=peg$currPos*49+31,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$parseS();if(s0===peg$FAILED){s0=peg$parseNL();if(s0===peg$FAILED){s0=peg$parsecomment()}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseinline_table(){var s0,s1,s2,s3,s4,s5;var key=peg$currPos*49+32,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===123){s1=peg$c64;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c65)}}if(s1!==peg$FAILED){s2=[];s3=peg$parseS();while(s3!==peg$FAILED){s2.push(s3);s3=peg$parseS()}if(s2!==peg$FAILED){s3=[];s4=peg$parseinline_table_assignment();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseinline_table_assignment()}if(s3!==peg$FAILED){s4=[];s5=peg$parseS();while(s5!==peg$FAILED){s4.push(s5);s5=peg$parseS()}if(s4!==peg$FAILED){if(input.charCodeAt(peg$currPos)===125){s5=peg$c66;peg$currPos++}else{s5=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c67)}}if(s5!==peg$FAILED){peg$reportedPos=s0;s1=peg$c68(s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseinline_table_assignment(){var s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10;var key=peg$currPos*49+33,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parsekey();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===61){s4=peg$c18;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c19)}}if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){s6=peg$parsevalue();if(s6!==peg$FAILED){s7=[];s8=peg$parseS();while(s8!==peg$FAILED){s7.push(s8);s8=peg$parseS()}if(s7!==peg$FAILED){if(input.charCodeAt(peg$currPos)===44){s8=peg$c62;peg$currPos++}else{s8=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c63)}}if(s8!==peg$FAILED){s9=[];s10=peg$parseS();while(s10!==peg$FAILED){s9.push(s10);s10=peg$parseS()}if(s9!==peg$FAILED){peg$reportedPos=s0;s1=peg$c69(s2,s6);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;s1=[];s2=peg$parseS();while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseS()}if(s1!==peg$FAILED){s2=peg$parsekey();if(s2!==peg$FAILED){s3=[];s4=peg$parseS();while(s4!==peg$FAILED){s3.push(s4);s4=peg$parseS()}if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===61){s4=peg$c18;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c19)}}if(s4!==peg$FAILED){s5=[];s6=peg$parseS();while(s6!==peg$FAILED){s5.push(s6);s6=peg$parseS()}if(s5!==peg$FAILED){s6=peg$parsevalue();if(s6!==peg$FAILED){peg$reportedPos=s0;s1=peg$c69(s2,s6);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsesecfragment(){var s0,s1,s2;var key=peg$currPos*49+34,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.charCodeAt(peg$currPos)===46){s1=peg$c16;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c17)}}if(s1!==peg$FAILED){s2=peg$parseDIGITS();if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c70(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsedate(){var s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11;var key=peg$currPos*49+35,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$currPos;s2=peg$parseDIGIT_OR_UNDER();if(s2!==peg$FAILED){s3=peg$parseDIGIT_OR_UNDER();if(s3!==peg$FAILED){s4=peg$parseDIGIT_OR_UNDER();if(s4!==peg$FAILED){s5=peg$parseDIGIT_OR_UNDER();if(s5!==peg$FAILED){if(input.charCodeAt(peg$currPos)===45){s6=peg$c47;peg$currPos++}else{s6=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c48)}}if(s6!==peg$FAILED){s7=peg$parseDIGIT_OR_UNDER();if(s7!==peg$FAILED){s8=peg$parseDIGIT_OR_UNDER();if(s8!==peg$FAILED){if(input.charCodeAt(peg$currPos)===45){s9=peg$c47;peg$currPos++}else{s9=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c48)}}if(s9!==peg$FAILED){s10=peg$parseDIGIT_OR_UNDER();if(s10!==peg$FAILED){s11=peg$parseDIGIT_OR_UNDER();if(s11!==peg$FAILED){s2=[s2,s3,s4,s5,s6,s7,s8,s9,s10,s11];s1=s2}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c71(s1)}s0=s1;peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsetime(){var s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10;var key=peg$currPos*49+36,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$currPos;s2=peg$parseDIGIT_OR_UNDER();if(s2!==peg$FAILED){s3=peg$parseDIGIT_OR_UNDER();if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s4=peg$c72;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c73)}}if(s4!==peg$FAILED){s5=peg$parseDIGIT_OR_UNDER();if(s5!==peg$FAILED){s6=peg$parseDIGIT_OR_UNDER();if(s6!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s7=peg$c72;peg$currPos++}else{s7=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c73)}}if(s7!==peg$FAILED){s8=peg$parseDIGIT_OR_UNDER();if(s8!==peg$FAILED){s9=peg$parseDIGIT_OR_UNDER();if(s9!==peg$FAILED){s10=peg$parsesecfragment();if(s10===peg$FAILED){s10=peg$c25}if(s10!==peg$FAILED){s2=[s2,s3,s4,s5,s6,s7,s8,s9,s10];s1=s2}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c74(s1)}s0=s1;peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsetime_with_offset(){var s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16;var key=peg$currPos*49+37,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$currPos;s2=peg$parseDIGIT_OR_UNDER();if(s2!==peg$FAILED){s3=peg$parseDIGIT_OR_UNDER();if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s4=peg$c72;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c73)}}if(s4!==peg$FAILED){s5=peg$parseDIGIT_OR_UNDER();if(s5!==peg$FAILED){s6=peg$parseDIGIT_OR_UNDER();if(s6!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s7=peg$c72;peg$currPos++}else{s7=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c73)}}if(s7!==peg$FAILED){s8=peg$parseDIGIT_OR_UNDER();if(s8!==peg$FAILED){s9=peg$parseDIGIT_OR_UNDER();if(s9!==peg$FAILED){s10=peg$parsesecfragment();if(s10===peg$FAILED){s10=peg$c25}if(s10!==peg$FAILED){if(input.charCodeAt(peg$currPos)===45){s11=peg$c47;peg$currPos++}else{s11=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c48)}}if(s11===peg$FAILED){if(input.charCodeAt(peg$currPos)===43){s11=peg$c44;peg$currPos++}else{s11=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c45)}}}if(s11!==peg$FAILED){s12=peg$parseDIGIT_OR_UNDER();if(s12!==peg$FAILED){s13=peg$parseDIGIT_OR_UNDER();if(s13!==peg$FAILED){if(input.charCodeAt(peg$currPos)===58){s14=peg$c72;peg$currPos++}else{s14=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c73)}}if(s14!==peg$FAILED){s15=peg$parseDIGIT_OR_UNDER();if(s15!==peg$FAILED){s16=peg$parseDIGIT_OR_UNDER();if(s16!==peg$FAILED){s2=[s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16];s1=s2}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}}else{peg$currPos=s1;s1=peg$c2}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c74(s1)}s0=s1;peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parsedatetime(){var s0,s1,s2,s3,s4;var key=peg$currPos*49+38,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=peg$parsedate();if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===84){s2=peg$c75;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c76)}}if(s2!==peg$FAILED){s3=peg$parsetime();if(s3!==peg$FAILED){if(input.charCodeAt(peg$currPos)===90){s4=peg$c77;peg$currPos++}else{s4=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c78)}}if(s4!==peg$FAILED){peg$reportedPos=s0;s1=peg$c79(s1,s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;s1=peg$parsedate();if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===84){s2=peg$c75;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c76)}}if(s2!==peg$FAILED){s3=peg$parsetime_with_offset();if(s3!==peg$FAILED){peg$reportedPos=s0;s1=peg$c80(s1,s3);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseS(){var s0;var key=peg$currPos*49+39,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}if(peg$c81.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c82)}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseNL(){var s0,s1,s2;var key=peg$currPos*49+40,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}if(input.charCodeAt(peg$currPos)===10){s0=peg$c83;peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c84)}}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===13){s1=peg$c85;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c86)}}if(s1!==peg$FAILED){if(input.charCodeAt(peg$currPos)===10){s2=peg$c83;peg$currPos++}else{s2=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c84)}}if(s2!==peg$FAILED){s1=[s1,s2];s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseNLS(){var s0;var key=peg$currPos*49+41,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$parseNL();if(s0===peg$FAILED){s0=peg$parseS()}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseEOF(){var s0,s1;var key=peg$currPos*49+42,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;peg$silentFails++;if(input.length>peg$currPos){s1=input.charAt(peg$currPos);peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c6)}}peg$silentFails--;if(s1===peg$FAILED){s0=peg$c5}else{peg$currPos=s0;s0=peg$c2}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseHEX(){var s0;var key=peg$currPos*49+43,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}if(peg$c87.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c88)}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseDIGIT_OR_UNDER(){var s0,s1;var key=peg$currPos*49+44,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}if(peg$c89.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c90)}}if(s0===peg$FAILED){s0=peg$currPos;if(input.charCodeAt(peg$currPos)===95){s1=peg$c91;peg$currPos++}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c92)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c93()}s0=s1}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseASCII_BASIC(){var s0;var key=peg$currPos*49+45,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}if(peg$c94.test(input.charAt(peg$currPos))){s0=input.charAt(peg$currPos);peg$currPos++}else{s0=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c95)}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseDIGITS(){var s0,s1,s2;var key=peg$currPos*49+46,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;s1=[];s2=peg$parseDIGIT_OR_UNDER();if(s2!==peg$FAILED){while(s2!==peg$FAILED){s1.push(s2);s2=peg$parseDIGIT_OR_UNDER()}}else{s1=peg$c2}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c96(s1)}s0=s1;peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseESCAPED(){var s0,s1;var key=peg$currPos*49+47,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c97){s1=peg$c97;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c98)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c99()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c100){s1=peg$c100;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c101)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c102()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c103){s1=peg$c103;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c104)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c105()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c106){s1=peg$c106;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c107)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c108()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c109){s1=peg$c109;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c110)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c111()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c112){s1=peg$c112;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c113)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c114()}s0=s1;if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c115){s1=peg$c115;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c116)}}if(s1!==peg$FAILED){peg$reportedPos=s0;s1=peg$c117()}s0=s1;if(s0===peg$FAILED){s0=peg$parseESCAPED_UNICODE()}}}}}}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}function peg$parseESCAPED_UNICODE(){var s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10;var key=peg$currPos*49+48,cached=peg$cache[key];if(cached){peg$currPos=cached.nextPos;return cached.result}s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c118){s1=peg$c118;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c119)}}if(s1!==peg$FAILED){s2=peg$currPos;s3=peg$parseHEX();if(s3!==peg$FAILED){s4=peg$parseHEX();if(s4!==peg$FAILED){s5=peg$parseHEX();if(s5!==peg$FAILED){s6=peg$parseHEX();if(s6!==peg$FAILED){s7=peg$parseHEX();if(s7!==peg$FAILED){s8=peg$parseHEX();if(s8!==peg$FAILED){s9=peg$parseHEX();if(s9!==peg$FAILED){s10=peg$parseHEX();if(s10!==peg$FAILED){s3=[s3,s4,s5,s6,s7,s8,s9,s10];s2=s3}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c120(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}if(s0===peg$FAILED){s0=peg$currPos;if(input.substr(peg$currPos,2)===peg$c121){s1=peg$c121;peg$currPos+=2}else{s1=peg$FAILED;if(peg$silentFails===0){peg$fail(peg$c122)}}if(s1!==peg$FAILED){s2=peg$currPos;s3=peg$parseHEX();if(s3!==peg$FAILED){s4=peg$parseHEX();if(s4!==peg$FAILED){s5=peg$parseHEX();if(s5!==peg$FAILED){s6=peg$parseHEX();if(s6!==peg$FAILED){s3=[s3,s4,s5,s6];s2=s3}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}}else{peg$currPos=s2;s2=peg$c2}if(s2!==peg$FAILED){peg$reportedPos=s0;s1=peg$c120(s2);s0=s1}else{peg$currPos=s0;s0=peg$c2}}else{peg$currPos=s0;s0=peg$c2}}peg$cache[key]={nextPos:peg$currPos,result:s0};return s0}var nodes=[];function genError(err,line,col){var ex=new Error(err);ex.line=line;ex.column=col;throw ex}function addNode(node){nodes.push(node)}function node(type,value,line,column,key){var obj={type:type,value:value,line:line(),column:column()};if(key)obj.key=key;return obj}function convertCodePoint(str,line,col){var num=parseInt("0x"+str);if(!isFinite(num)||Math.floor(num)!=num||num<0||num>1114111||num>55295&&num<57344){genError("Invalid Unicode escape code: "+str,line,col)}else{return fromCodePoint(num)}}function fromCodePoint(){var MAX_SIZE=16384;var codeUnits=[];var highSurrogate;var lowSurrogate;var index=-1;var length=arguments.length;if(!length){return""}var result="";while(++index>10)+55296;lowSurrogate=codePoint%1024+56320;codeUnits.push(highSurrogate,lowSurrogate)}if(index+1==length||codeUnits.length>MAX_SIZE){result+=String.fromCharCode.apply(null,codeUnits);codeUnits.length=0}}return result}peg$result=peg$startRuleFunction();if(peg$result!==peg$FAILED&&peg$currPos===input.length){return peg$result}else{if(peg$result!==peg$FAILED&&peg$currPos-1){$B[attr]=value}else{throw $B.builtins.AttributeError.$factory( -'__BRYTHON__ object has no attribute '+attr)}} -$B.language=_window.navigator.userLanguage ||_window.navigator.language -$B.locale="C" -var date=new Date() -var formatter=new Intl.DateTimeFormat($B.language,{timeZoneName:'short'}),short=formatter.format(date) -formatter=new Intl.DateTimeFormat($B.language,{timeZoneName:'long'}) -var long=formatter.format(date) -var ix=0,minlen=Math.min(short.length,long.length) -while(ix < minlen && short[ix]==long[ix]){ix++} -$B.tz_name=long.substr(ix).trim() -$B.PyCF_ONLY_AST=1024 -if($B.isWebWorker){$B.charset="utf-8"}else{ -$B.charset=document.characterSet ||document.inputEncoding ||"utf-8"} -$B.max_int=Math.pow(2,53)-1 -$B.min_int=-$B.max_int -$B.max_float=new Number(Number.MAX_VALUE) -$B.min_float=new Number(Number.MIN_VALUE) -$B.int_max_str_digits=4300 -$B.str_digits_check_threshold=640 -$B.max_array_size=2**32-1 -$B.recursion_limit=200 -$B.pep657=true -$B.special_string_repr={8:"\\x08",9:"\\t",10:"\\n",11:"\\x0b",12:"\\x0c",13:"\\r",92:"\\\\",160:"\\xa0"} -$B.$py_next_hash=Math.pow(2,53)-1 -$B.$py_UUID=0 -$B.lambda_magic=Math.random().toString(36).substr(2,8) -$B.set_func_names=function(klass,module){for(var attr in klass){if(typeof klass[attr]=='function'){klass[attr].$infos={__doc__:klass[attr].__doc__ ||"",__module__:module,__qualname__ :klass.__qualname__+'.'+attr,__name__:attr} -if(klass[attr].$type=="classmethod"){klass[attr].__class__=$B.method}}} -klass.__module__=module} -var has_storage=typeof(Storage)!=="undefined" -if(has_storage){$B.has_local_storage=false -try{if(localStorage){$B.local_storage=localStorage -$B.has_local_storage=true}}catch(err){} -$B.has_session_storage=false -try{if(sessionStorage){$B.session_storage=sessionStorage -$B.has_session_storage=true}}catch(err){}}else{$B.has_local_storage=false -$B.has_session_storage=false} -$B.globals=function(){ -return $B.frames_stack[$B.frames_stack.length-1][3]} -$B.scripts={} -$B.$options={} -$B.builtins_repr_check=function(builtin,args){ -var $=$B.args('__repr__',1,{self:null},['self'],args,{},null,null),self=$.self,_b_=$B.builtins -if(! _b_.isinstance(self,builtin)){throw _b_.TypeError.$factory("descriptor '__repr__' requires a "+ -`'${builtin.__name__}' object but received a `+ -`'${$B.class_name(self)}'`)}} -$B.update_VFS=function(scripts){$B.VFS=$B.VFS ||{} -var vfs_timestamp=scripts.$timestamp -if(vfs_timestamp !==undefined){delete scripts.$timestamp} -for(var script in scripts){if($B.VFS.hasOwnProperty(script)){console.warn("Virtual File System: duplicate entry "+script)} -$B.VFS[script]=scripts[script] -$B.VFS[script].timestamp=vfs_timestamp} -$B.stdlib_module_names=Object.keys($B.VFS)} -$B.add_files=function(files){ -$B.files=$B.files ||{} -for(var file in files){$B.files[file]=files[file]}} -$B.has_file=function(file){ -return($B.files && $B.files.hasOwnProperty(file))} -$B.show_tokens=function(src,mode){ -for(var token of $B.tokenizer(src,'',mode ||'file')){console.log(token.type,$B.builtins.repr(token.string),token.start,token.end,token.line)}} -var py2js_magic=Math.random().toString(36).substr(2,8) -function from_py(src,script_id){if(! $B.options_parsed){ -$B.parse_options()} -var filename='$python_to_js'+$B.UUID() -$B.url2name[filename]=filename -$B.imported[filename]={} -var root=__BRYTHON__.py2js({src,filename},script_id,script_id,__BRYTHON__.builtins_scope) -return root.to_js()} -$B.getPythonModule=function(name){return $B.imported[name]} -$B.python_to_js=function(src,script_id){ -return "(function() {\n"+from_py(src,script_id)+"\nreturn locals}())"} -$B.pythonToJS=$B.python_to_js -$B.runPythonSource=function(src,script_id){if(script_id===undefined){script_id='python_script_'+$B.UUID()} -var js=from_py(src,script_id)+'\nreturn locals' -var func=new Function('$B','_b_',js) -$B.imported[script_id]=func($B,$B.builtins) -return $B.imported[script_id]}})(__BRYTHON__) -; -__BRYTHON__.ast_classes={Add:'',And:'',AnnAssign:'target,annotation,value?,simple',Assert:'test,msg?',Assign:'targets*,value,type_comment?',AsyncFor:'target,iter,body*,orelse*,type_comment?',AsyncFunctionDef:'name,args,body*,decorator_list*,returns?,type_comment?,type_params*',AsyncWith:'items*,body*,type_comment?',Attribute:'value,attr,ctx',AugAssign:'target,op,value',Await:'value',BinOp:'left,op,right',BitAnd:'',BitOr:'',BitXor:'',BoolOp:'op,values*',Break:'',Call:'func,args*,keywords*',ClassDef:'name,bases*,keywords*,body*,decorator_list*,type_params*',Compare:'left,ops*,comparators*',Constant:'value,kind?',Continue:'',Del:'',Delete:'targets*',Dict:'keys*,values*',DictComp:'key,value,generators*',Div:'',Eq:'',ExceptHandler:'type?,name?,body*',Expr:'value',Expression:'body',FloorDiv:'',For:'target,iter,body*,orelse*,type_comment?',FormattedValue:'value,conversion,format_spec?',FunctionDef:'name,args,body*,decorator_list*,returns?,type_comment?,type_params*',FunctionType:'argtypes*,returns',GeneratorExp:'elt,generators*',Global:'names*',Gt:'',GtE:'',If:'test,body*,orelse*',IfExp:'test,body,orelse',Import:'names*',ImportFrom:'module?,names*,level?',In:'',Interactive:'body*',Invert:'',Is:'',IsNot:'',JoinedStr:'values*',LShift:'',Lambda:'args,body',List:'elts*,ctx',ListComp:'elt,generators*',Load:'',Lt:'',LtE:'',MatMult:'',Match:'subject,cases*',MatchAs:'pattern?,name?',MatchClass:'cls,patterns*,kwd_attrs*,kwd_patterns*',MatchMapping:'keys*,patterns*,rest?',MatchOr:'patterns*',MatchSequence:'patterns*',MatchSingleton:'value',MatchStar:'name?',MatchValue:'value',Mod:'',Module:'body*,type_ignores*',Mult:'',Name:'id,ctx',NamedExpr:'target,value',Nonlocal:'names*',Not:'',NotEq:'',NotIn:'',Or:'',ParamSpec:'name',Pass:'',Pow:'',RShift:'',Raise:'exc?,cause?',Return:'value?',Set:'elts*',SetComp:'elt,generators*',Slice:'lower?,upper?,step?',Starred:'value,ctx',Store:'',Sub:'',Subscript:'value,slice,ctx',Try:'body*,handlers*,orelse*,finalbody*',TryStar:'body*,handlers*,orelse*,finalbody*',Tuple:'elts*,ctx',TypeAlias:'name,type_params*,value',TypeIgnore:'lineno,tag',TypeVar:'name,bound?',TypeVarTuple:'name',UAdd:'',USub:'',UnaryOp:'op,operand',While:'test,body*,orelse*',With:'items*,body*,type_comment?',Yield:'value?',YieldFrom:'value',alias:'name,asname?',arg:'arg,annotation?,type_comment?',arguments:'posonlyargs*,args*,vararg?,kwonlyargs*,kw_defaults*,kwarg?,defaults*',boolop:['And','Or'],cmpop:['Eq','NotEq','Lt','LtE','Gt','GtE','Is','IsNot','In','NotIn'],comprehension:'target,iter,ifs*,is_async',excepthandler:['ExceptHandler'],expr:['BoolOp','NamedExpr','BinOp','UnaryOp','Lambda','IfExp','Dict','Set','ListComp','SetComp','DictComp','GeneratorExp','Await','Yield','YieldFrom','Compare','Call','FormattedValue','JoinedStr','Constant','Attribute','Subscript','Starred','Name','List','Tuple','Slice'],expr_context:['Load','Store','Del'],keyword:'arg?,value',match_case:'pattern,guard?,body*',mod:['Module','Interactive','Expression','FunctionType'],operator:['Add','Sub','Mult','MatMult','Div','Mod','Pow','LShift','RShift','BitOr','BitXor','BitAnd','FloorDiv'],pattern:['MatchValue','MatchSingleton','MatchSequence','MatchMapping','MatchClass','MatchStar','MatchAs','MatchOr'],stmt:['FunctionDef','AsyncFunctionDef','ClassDef','Return','Delete','Assign','TypeAlias','AugAssign','AnnAssign','For','AsyncFor','While','If','With','AsyncWith','Match','Raise','Try','TryStar','Assert','Import','ImportFrom','Global','Nonlocal','Expr','Pass','Break','Continue'],type_ignore:['TypeIgnore'],type_param:['TypeVar','ParamSpec','TypeVarTuple'],unaryop:['Invert','Not','UAdd','USub'],withitem:'context_expr,optional_vars?'} -; - -var $B=__BRYTHON__ -$B.unicode={"Cc":[[0,32],[127,33]],"Zs":[32,160,5760,[8192,11],8239,8287,12288],"Po":[[33,3],[37,3],[42,3,2],47,58,59,63,64,92,161,167,182,183,191,894,903,[1370,6],1417,[1472,3,3],1523,1524,1545,1546,1548,1549,1563,[1565,3],[1642,4],1748,[1792,14],[2039,3],[2096,15],2142,2404,2405,2416,2557,2678,2800,3191,3204,3572,3663,3674,3675,[3844,15],3860,3973,[4048,5],4057,4058,[4170,6],4347,[4960,9],5742,[5867,3],5941,5942,[6100,3],[6104,3],[6144,6],[6151,4],6468,6469,6686,6687,[6816,7],[6824,6],[7002,7],7037,7038,[7164,4],[7227,5],7294,7295,[7360,8],7379,8214,8215,[8224,8],[8240,9],[8251,4],[8257,3],[8263,11],8275,[8277,10],[11513,4],11518,11519,11632,11776,11777,[11782,3],11787,[11790,9],11800,11801,11803,11806,11807,[11818,5],[11824,10],[11836,4],11841,[11843,13],[11858,3],[12289,3],12349,12539,42238,42239,[42509,3],42611,42622,[42738,6],[43124,4],43214,43215,[43256,3],43260,43310,43311,43359,[43457,13],43486,43487,[43612,4],43742,43743,43760,43761,44011,[65040,7],65049,65072,65093,65094,[65097,4],[65104,3],[65108,4],[65119,3],65128,65130,65131,[65281,3],[65285,3],[65290,3,2],65295,65306,65307,65311,65312,65340,65377,65380,65381,[65792,3],66463,66512,66927,67671,67871,67903,[68176,9],68223,[68336,7],[68409,7],[68505,4],[69461,5],[69510,4],[69703,7],69819,69820,[69822,4],[69952,4],70004,70005,[70085,4],70093,70107,[70109,3],[70200,6],70313,[70731,5],70746,70747,70749,70854,[71105,23],[71233,3],[71264,13],71353,[71484,3],71739,[72004,3],72162,[72255,8],[72346,3],[72350,5],[72448,10],[72769,5],72816,72817,73463,73464,[73539,13],73727,[74864,5],77809,77810,92782,92783,92917,[92983,5],92996,[93847,4],94178,113823,[121479,5],125278,125279],"Sc":[36,[162,4],1423,1547,2046,2047,2546,2547,2555,2801,3065,3647,6107,[8352,33],43064,65020,65129,65284,65504,65505,65509,65510,[73693,4],123647,126128],"Ps":[40,91,123,3898,3900,5787,8218,8222,8261,8317,8333,8968,8970,9001,[10088,7,2],10181,[10214,5,2],[10627,11,2],10712,10714,10748,[11810,4,2],11842,[11861,4,2],[12296,5,2],[12308,4,2],12317,64831,65047,[65077,8,2],65095,[65113,3,2],65288,65339,65371,65375,65378],"Pe":[41,93,125,3899,3901,5788,8262,8318,8334,8969,8971,9002,[10089,7,2],10182,[10215,5,2],[10628,11,2],10713,10715,10749,[11811,4,2],[11862,4,2],[12297,5,2],[12309,4,2],12318,12319,64830,65048,[65078,8,2],65096,[65114,3,2],65289,65341,[65373,3,3]],"Sm":[43,[60,3],124,126,172,177,215,247,1014,[1542,3],8260,8274,[8314,3],[8330,3],8472,[8512,5],8523,[8592,5],8602,8603,[8608,3,3],8622,8654,8655,8658,8660,[8692,268],8992,8993,9084,[9115,25],[9180,6],9655,9665,[9720,8],9839,[10176,5],[10183,31],[10224,16],[10496,131],[10649,63],[10716,32],[10750,258],[11056,21],[11079,6],64297,65122,[65124,3],65291,[65308,3],65372,65374,65506,[65513,4],120513,120539,120571,120597,120629,120655,120687,120713,120745,120771,126704,126705],"Pd":[45,1418,1470,5120,6150,[8208,6],11799,11802,11834,11835,11840,11869,12316,12336,12448,65073,65074,65112,65123,65293,69293],"Nd":[[48,10],[1632,10],[1776,10],[1984,10],[2406,10],[2534,10],[2662,10],[2790,10],[2918,10],[3046,10],[3174,10],[3302,10],[3430,10],[3558,10],[3664,10],[3792,10],[3872,10],[4160,10],[4240,10],[6112,10],[6160,10],[6470,10],[6608,10],[6784,10],[6800,10],[6992,10],[7088,10],[7232,10],[7248,10],[42528,10],[43216,10],[43264,10],[43472,10],[43504,10],[43600,10],[44016,10],[65296,10],[66720,10],[68912,10],[69734,10],[69872,10],[69942,10],[70096,10],[70384,10],[70736,10],[70864,10],[71248,10],[71360,10],[71472,10],[71904,10],[72016,10],[72784,10],[73040,10],[73120,10],[73552,10],[92768,10],[92864,10],[93008,10],[120782,50],[123200,10],[123632,10],[124144,10],[125264,10],[130032,10]],"Lu":[[65,26],[192,23],[216,7],[256,28,2],[313,8,2],[330,24,2],[377,3,2],385,[386,3,2],391,[393,3],[398,4],403,404,[406,3],412,413,415,[416,4,2],423,425,428,430,431,[433,3],437,439,440,444,[452,4,3],[463,7,2],[478,9,2],497,500,[502,3],[506,29,2],570,571,573,574,577,[579,4],[584,4,2],880,882,886,895,902,[904,3],908,910,911,[913,17],[931,9],975,[978,3],[984,12,2],1012,1015,1017,1018,[1021,51],[1120,17,2],[1162,28,2],[1217,7,2],[1232,48,2],[1329,38],[4256,38],4295,4301,[5024,86],[7312,43],[7357,3],[7680,75,2],[7838,49,2],[7944,8],[7960,6],[7976,8],[7992,8],[8008,6],[8025,4,2],[8040,8],[8120,4],[8136,4],[8152,4],[8168,5],[8184,4],8450,8455,[8459,3],[8464,3],8469,[8473,5],[8484,4,2],[8491,3],[8496,4],8510,8511,8517,8579,[11264,48],11360,[11362,3],[11367,4,2],[11374,3],11378,11381,[11390,3],[11394,49,2],11499,11501,11506,[42560,23,2],[42624,14,2],[42786,7,2],[42802,31,2],[42873,3,2],[42878,5,2],42891,42893,42896,42898,[42902,11,2],[42923,4],[42928,5],[42934,8,2],[42949,3],42953,42960,42966,42968,42997,[65313,26],[66560,40],[66736,36],[66928,11],[66940,15],[66956,7],66964,66965,[68736,51],[71840,32],[93760,32],[119808,26],[119860,26],[119912,26],119964,119966,[119967,3,3],119974,[119977,4],[119982,8],[120016,26],120068,120069,[120071,4],[120077,8],[120086,7],120120,120121,[120123,4],[120128,5],120134,[120138,7],[120172,26],[120224,26],[120276,26],[120328,26],[120380,26],[120432,26],[120488,25],[120546,25],[120604,25],[120662,25],[120720,25],120778,[125184,34]],"Sk":[94,96,168,175,180,184,[706,4],[722,14],[741,7],749,[751,17],885,900,901,2184,8125,[8127,3],[8141,3],[8157,3],[8173,3],8189,8190,12443,12444,[42752,23],42784,42785,42889,42890,43867,43882,43883,[64434,17],65342,65344,65507,[127995,5]],"Pc":[95,8255,8256,8276,65075,65076,[65101,3],65343],"Ll":[[97,26],181,[223,24],[248,8],[257,28,2],[312,9,2],[329,24,2],[378,3,2],383,384,387,389,392,396,397,402,405,[409,3],414,[417,3,2],424,426,427,429,432,436,438,441,442,[445,3],[454,3,3],[462,8,2],[477,10,2],496,499,501,[505,30,2],[564,6],572,575,576,578,[583,5,2],[592,68],[661,27],881,[883,3,4],892,893,912,[940,35],976,977,[981,3],[985,12,2],[1008,4],[1013,3,3],1020,[1072,48],[1121,17,2],[1163,27,2],[1218,7,2],[1231,49,2],[1376,41],[4304,43],[4349,3],[5112,6],[7296,9],[7424,44],[7531,13],[7545,34],[7681,75,2],[7830,8],[7839,49,2],[7936,8],[7952,6],[7968,8],[7984,8],[8000,6],[8016,8],[8032,8],[8048,14],[8064,8],[8080,8],[8096,8],[8112,5],8118,8119,8126,[8130,3],8134,8135,[8144,4],8150,8151,[8160,8],[8178,3],8182,8183,8458,8462,8463,8467,[8495,3,5],8508,8509,[8518,4],8526,8580,[11312,48],11361,11365,[11366,4,2],11377,11379,11380,[11382,6],[11393,50,2],11492,11500,11502,11507,[11520,38],11559,11565,[42561,23,2],[42625,14,2],[42787,7,2],42800,[42801,33,2],[42866,7],42874,42876,[42879,5,2],42892,42894,42897,[42899,3],[42903,10,2],42927,[42933,8,2],42952,42954,[42961,5,2],42998,43002,[43824,43],[43872,9],[43888,80],[64256,7],[64275,5],[65345,26],[66600,40],[66776,36],[66967,11],[66979,15],[66995,7],67003,67004,[68800,51],[71872,32],[93792,32],[119834,26],[119886,7],[119894,18],[119938,26],[119990,4],119995,[119997,7],[120005,11],[120042,26],[120094,26],[120146,26],[120198,26],[120250,26],[120302,26],[120354,26],[120406,26],[120458,28],[120514,25],[120540,6],[120572,25],[120598,6],[120630,25],[120656,6],[120688,25],[120714,6],[120746,25],[120772,6],120779,[122624,10],[122635,20],[122661,6],[125218,34]],"So":[166,169,174,176,1154,1421,1422,1550,1551,1758,1769,1789,1790,2038,2554,2928,[3059,6],3066,3199,3407,3449,[3841,3],3859,[3861,3],[3866,6],[3892,3,2],[4030,8],[4039,6],4046,4047,[4053,4],4254,4255,[5008,10],5741,6464,[6622,34],[7009,10],[7028,9],8448,8449,[8451,4],8456,8457,8468,8470,8471,[8478,6],[8485,3,2],8494,8506,8507,8522,8524,8525,8527,8586,8587,[8597,5],[8604,4],8609,8610,8612,8613,[8615,7],[8623,31],8656,[8657,3,2],[8662,30],[8960,8],[8972,20],[8994,7],[9003,81],[9085,30],[9140,40],[9186,69],[9280,11],[9372,78],[9472,183],[9656,9],[9666,54],[9728,111],[9840,248],[10132,44],[10240,256],[11008,48],11077,11078,[11085,39],[11126,32],[11159,105],[11493,6],11856,11857,[11904,26],[11931,89],[12032,214],[12272,16],12292,12306,12307,12320,12342,12343,12350,12351,12688,12689,[12694,10],[12736,36],12783,[12800,31],[12842,30],12880,[12896,32],[12938,39],[12992,320],[19904,64],[42128,55],[43048,4],43062,43063,43065,[43639,3],[64832,16],64975,[65021,3],65508,65512,65517,65518,65532,65533,[65847,9],[65913,17],[65932,3],[65936,13],65952,[66000,45],67703,67704,68296,71487,[73685,8],[73697,17],[92988,4],92997,113820,[118608,116],[118784,246],[119040,39],[119081,60],[119146,3],119171,119172,[119180,30],[119214,61],[119296,66],119365,[119552,87],[120832,512],[121399,4],[121453,8],[121462,14],121477,121478,123215,126124,126254,[126976,44],[127024,100],[127136,15],[127153,15],[127169,15],[127185,37],[127245,161],[127462,29],[127504,44],[127552,9],127568,127569,[127584,6],[127744,251],[128000,728],[128732,17],[128752,13],[128768,119],[128891,95],[128992,12],129008,[129024,12],[129040,56],[129104,10],[129120,40],[129168,30],129200,129201,[129280,340],[129632,14],[129648,13],[129664,9],[129680,46],[129727,7],[129742,14],[129760,9],[129776,9],[129792,147],[129940,55]],"Lo":[170,186,443,[448,4],660,[1488,27],[1519,4],[1568,32],[1601,10],1646,1647,[1649,99],1749,1774,1775,[1786,3],1791,1808,[1810,30],[1869,89],1969,[1994,33],[2048,22],[2112,25],[2144,11],[2160,24],[2185,6],[2208,41],[2308,54],2365,2384,[2392,10],[2418,15],[2437,8],2447,2448,[2451,22],[2474,7],2482,[2486,4],2493,2510,2524,2525,[2527,3],2544,2545,2556,[2565,6],2575,2576,[2579,22],[2602,7],2610,2611,2613,2614,2616,2617,[2649,4],2654,[2674,3],[2693,9],[2703,3],[2707,22],[2730,7],2738,2739,[2741,5],2749,2768,2784,2785,2809,[2821,8],2831,2832,[2835,22],[2858,7],2866,2867,[2869,5],2877,2908,2909,[2911,3],2929,2947,[2949,6],[2958,3],[2962,4],2969,[2970,3,2],2975,2979,2980,[2984,3],[2990,12],3024,[3077,8],[3086,3],[3090,23],[3114,16],3133,[3160,3],3165,3168,3169,3200,[3205,8],[3214,3],[3218,23],[3242,10],[3253,5],3261,3293,3294,3296,3297,3313,3314,[3332,9],[3342,3],[3346,41],3389,3406,[3412,3],[3423,3],[3450,6],[3461,18],[3482,24],[3507,9],3517,[3520,7],[3585,48],3634,3635,[3648,6],3713,[3714,3,2],[3719,4],[3724,24],3749,[3751,10],3762,3763,3773,[3776,5],[3804,4],3840,[3904,8],[3913,36],[3976,5],[4096,43],4159,[4176,6],[4186,4],4193,4197,4198,[4206,3],[4213,13],4238,[4352,329],[4682,4],[4688,7],4696,[4698,4],[4704,41],[4746,4],[4752,33],[4786,4],[4792,7],4800,[4802,4],[4808,15],[4824,57],[4882,4],[4888,67],[4992,16],[5121,620],[5743,17],[5761,26],[5792,75],[5873,8],[5888,18],[5919,19],[5952,18],[5984,13],[5998,3],[6016,52],6108,[6176,35],[6212,53],[6272,5],[6279,34],6314,[6320,70],[6400,31],[6480,30],[6512,5],[6528,44],[6576,26],[6656,23],[6688,53],[6917,47],[6981,8],[7043,30],7086,7087,[7098,44],[7168,36],[7245,3],[7258,30],[7401,4],[7406,6],7413,7414,7418,[8501,4],[11568,56],[11648,23],[11680,7],[11688,7],[11696,7],[11704,7],[11712,7],[11720,7],[11728,7],[11736,7],12294,12348,[12353,86],12447,[12449,90],12543,[12549,43],[12593,94],[12704,32],[12784,16],13312,19903,19968,[40959,22],[40982,1143],[42192,40],[42240,268],[42512,16],42538,42539,42606,[42656,70],42895,42999,[43003,7],[43011,3],[43015,4],[43020,23],[43072,52],[43138,50],[43250,6],43259,43261,43262,[43274,28],[43312,23],[43360,29],[43396,47],[43488,5],[43495,9],[43514,5],[43520,41],[43584,3],[43588,8],[43616,16],[43633,6],43642,[43646,50],43697,43701,43702,[43705,5],43712,43714,43739,43740,[43744,11],43762,[43777,6],[43785,6],[43793,6],[43808,7],[43816,7],[43968,35],44032,55203,[55216,23],[55243,49],[63744,366],[64112,106],64285,[64287,10],[64298,13],[64312,5],64318,64320,64321,64323,64324,[64326,108],[64467,363],[64848,64],[64914,54],[65008,12],[65136,5],[65142,135],[65382,10],[65393,45],[65440,31],[65474,6],[65482,6],[65490,6],[65498,3],[65536,12],[65549,26],[65576,19],65596,65597,[65599,15],[65616,14],[65664,123],[66176,29],[66208,49],[66304,32],[66349,20],[66370,8],[66384,38],[66432,30],[66464,36],[66504,8],[66640,78],[66816,40],[66864,52],[67072,311],[67392,22],[67424,8],[67584,6],67592,[67594,44],67639,67640,67644,[67647,23],[67680,23],[67712,31],[67808,19],67828,67829,[67840,22],[67872,26],[67968,56],68030,68031,68096,[68112,4],[68117,3],[68121,29],[68192,29],[68224,29],[68288,8],[68297,28],[68352,54],[68416,22],[68448,19],[68480,18],[68608,73],[68864,36],[69248,42],69296,69297,[69376,29],69415,[69424,22],[69488,18],[69552,21],[69600,23],[69635,53],69745,69746,69749,[69763,45],[69840,25],[69891,36],69956,69959,[69968,35],70006,[70019,48],[70081,4],70106,70108,[70144,18],[70163,25],70207,70208,[70272,7],70280,[70282,4],[70287,15],[70303,10],[70320,47],[70405,8],70415,70416,[70419,22],[70442,7],70450,70451,[70453,5],70461,70480,[70493,5],[70656,53],[70727,4],[70751,3],[70784,48],70852,70853,70855,[71040,47],[71128,4],[71168,48],71236,[71296,43],71352,[71424,27],[71488,7],[71680,44],[71935,8],71945,[71948,8],71957,71958,[71960,24],71999,72001,[72096,8],[72106,39],72161,72163,72192,[72203,40],72250,72272,[72284,46],72349,[72368,73],[72704,9],[72714,37],72768,[72818,30],[72960,7],72968,72969,[72971,38],73030,[73056,6],73063,73064,[73066,32],73112,[73440,19],73474,[73476,13],[73490,34],73648,[73728,922],[74880,196],[77712,97],[77824,1072],[78913,6],[82944,583],[92160,569],[92736,31],[92784,79],[92880,30],[92928,48],[93027,21],[93053,19],[93952,75],94032,94208,100343,[100352,1238],101632,101640,[110592,291],110898,[110928,3],110933,[110948,4],[110960,396],[113664,107],[113776,13],[113792,9],[113808,10],122634,[123136,45],123214,[123536,30],[123584,44],[124112,27],[124896,7],[124904,4],124909,124910,[124912,15],[124928,197],[126464,4],[126469,27],126497,126498,126500,126503,[126505,10],[126516,4],126521,126523,126530,[126535,4,2],126542,126543,126545,126546,126548,[126551,6,2],126562,126564,[126567,4],[126572,7],[126580,4],[126585,4],126590,[126592,10],[126603,17],[126625,3],[126629,5],[126635,17],131072,173791,173824,177977,177984,178205,178208,183969,183984,191456,191472,192093,[194560,542],196608,201546,201552,205743],"Pi":[171,8216,8219,8220,8223,8249,11778,11780,11785,11788,11804,11808],"Cf":[173,[1536,6],1564,1757,1807,2192,2193,2274,6158,[8203,5],[8234,5],[8288,5],[8294,10],65279,[65529,3],69821,69837,[78896,16],[113824,4],[119155,8],917505,[917536,96]],"No":[178,179,185,[188,3],[2548,6],[2930,6],[3056,3],[3192,7],[3416,7],[3440,9],[3882,10],[4969,20],[6128,10],6618,8304,[8308,6],[8320,10],[8528,16],8585,[9312,60],[9450,22],[10102,30],11517,[12690,4],[12832,10],[12872,8],[12881,15],[12928,10],[12977,15],[43056,6],[65799,45],[65909,4],65930,65931,[66273,27],[66336,4],[67672,8],[67705,7],[67751,9],[67835,5],[67862,6],68028,68029,[68032,16],[68050,46],[68160,9],68221,68222,[68253,3],[68331,5],[68440,8],[68472,8],[68521,7],[68858,6],[69216,31],[69405,10],[69457,4],[69573,7],[69714,20],[70113,20],71482,71483,[71914,9],[72794,19],[73664,21],[93019,7],[93824,23],[119488,20],[119520,20],[119648,25],[125127,9],[126065,59],[126125,3],[126129,4],[126209,45],[126255,15],[127232,13]],"Pf":[187,8217,8221,8250,11779,11781,11786,11789,11805,11809],"Lt":[[453,3,3],498,[8072,8],[8088,8],[8104,8],8124,8140,8188],"Lm":[[688,18],[710,12],[736,5],748,750,884,890,1369,1600,1765,1766,2036,2037,2042,2074,2084,2088,2249,2417,3654,3782,4348,6103,6211,6823,[7288,6],[7468,63],7544,[7579,37],8305,8319,[8336,13],11388,11389,11631,11823,12293,[12337,5],12347,12445,12446,[12540,3],40981,[42232,6],42508,42623,42652,42653,[42775,9],42864,42888,[42994,3],43000,43001,43471,43494,43632,43741,43763,43764,[43868,4],43881,65392,65438,65439,[67456,6],[67463,42],[67506,9],[92992,4],[94099,13],94176,94177,94179,[110576,4],[110581,7],110589,110590,[122928,62],[123191,7],124139,125259],"Mn":[[768,112],[1155,5],[1425,45],1471,1473,1474,1476,1477,1479,[1552,11],[1611,21],1648,[1750,7],[1759,6],1767,1768,[1770,4],1809,[1840,27],[1958,11],[2027,9],2045,[2070,4],[2075,9],[2085,3],[2089,5],[2137,3],[2200,8],[2250,24],[2275,32],2362,2364,[2369,8],2381,[2385,7],2402,2403,2433,2492,[2497,4],2509,2530,2531,2558,2561,2562,2620,2625,2626,2631,2632,[2635,3],2641,2672,2673,2677,2689,2690,2748,[2753,5],2759,2760,2765,2786,2787,[2810,6],2817,2876,2879,[2881,4],2893,2901,2902,2914,2915,2946,3008,3021,3072,3076,3132,[3134,3],[3142,3],[3146,4],3157,3158,3170,3171,3201,3260,3263,3270,3276,3277,3298,3299,3328,3329,3387,3388,[3393,4],3405,3426,3427,3457,3530,[3538,3],3542,3633,[3636,7],[3655,8],3761,[3764,9],[3784,7],3864,3865,[3893,3,2],[3953,14],[3968,5],3974,3975,[3981,11],[3993,36],4038,[4141,4],[4146,6],4153,4154,4157,4158,4184,4185,[4190,3],[4209,4],4226,4229,4230,4237,4253,[4957,3],[5906,3],5938,5939,5970,5971,6002,6003,6068,6069,[6071,7],6086,[6089,11],6109,[6155,3],6159,6277,6278,6313,[6432,3],6439,6440,6450,[6457,3],6679,6680,6683,6742,[6744,7],6752,6754,[6757,8],[6771,10],6783,[6832,14],[6847,16],[6912,4],6964,[6966,5],6972,6978,[7019,9],7040,7041,[7074,4],7080,7081,[7083,3],7142,7144,7145,7149,[7151,3],[7212,8],7222,7223,[7376,3],[7380,13],[7394,7],7405,7412,7416,7417,[7616,64],[8400,13],8417,[8421,12],[11503,3],11647,[11744,32],[12330,4],12441,12442,42607,[42612,10],42654,42655,42736,42737,43010,43014,43019,43045,43046,43052,43204,43205,[43232,18],43263,[43302,8],[43335,11],[43392,3],43443,[43446,4],43452,43453,43493,[43561,6],43569,43570,43573,43574,43587,43596,43644,43696,[43698,3],43703,43704,43710,43711,43713,43756,43757,43766,44005,44008,44013,64286,[65024,16],[65056,16],66045,66272,[66422,5],[68097,3],68101,68102,[68108,4],[68152,3],68159,68325,68326,[68900,4],69291,69292,[69373,3],[69446,11],[69506,4],69633,[69688,15],69744,69747,69748,[69759,3],[69811,4],69817,69818,69826,[69888,3],[69927,5],[69933,8],70003,70016,70017,[70070,9],[70089,4],70095,[70191,3],70196,70198,70199,70206,70209,70367,[70371,8],70400,70401,70459,70460,70464,[70502,7],[70512,5],[70712,8],[70722,3],70726,70750,[70835,6],70842,70847,70848,70850,70851,[71090,4],71100,71101,71103,71104,71132,71133,[71219,8],71229,71231,71232,71339,71341,[71344,6],71351,[71453,3],[71458,4],[71463,5],[71727,9],71737,71738,71995,71996,71998,72003,[72148,4],72154,72155,72160,[72193,10],[72243,6],[72251,4],72263,[72273,6],[72281,3],[72330,13],72344,72345,[72752,7],[72760,6],72767,[72850,22],[72874,7],72882,72883,72885,72886,[73009,6],73018,73020,73021,[73023,7],73031,73104,73105,73109,73111,73459,73460,73472,73473,[73526,5],73536,73538,78912,[78919,15],[92912,5],[92976,7],94031,[94095,4],94180,113821,113822,[118528,46],[118576,23],[119143,3],[119163,8],[119173,7],[119210,4],[119362,3],[121344,55],[121403,50],121461,121476,[121499,5],[121505,15],[122880,7],[122888,17],[122907,7],122915,122916,[122918,5],123023,[123184,7],123566,[123628,4],[124140,4],[125136,7],[125252,7],[917760,240]],"Me":[1160,1161,6846,[8413,4],[8418,3],[42608,3]],"Mc":[2307,2363,[2366,3],[2377,4],2382,2383,2434,2435,[2494,3],2503,2504,2507,2508,2519,2563,[2622,3],2691,[2750,3],2761,2763,2764,2818,2819,2878,2880,2887,2888,2891,2892,2903,3006,3007,3009,3010,[3014,3],[3018,3],3031,[3073,3],[3137,4],3202,3203,3262,[3264,5],3271,3272,3274,3275,3285,3286,3315,3330,3331,[3390,3],[3398,3],[3402,3],3415,3458,3459,[3535,3],[3544,8],3570,3571,3902,3903,3967,4139,4140,4145,4152,4155,4156,4182,4183,[4194,3],[4199,7],4227,4228,[4231,6],4239,[4250,3],5909,5940,6070,[6078,8],6087,6088,[6435,4],[6441,3],6448,6449,[6451,6],6681,6682,6741,6743,6753,6755,6756,[6765,6],6916,6965,6971,[6973,5],6979,6980,7042,7073,7078,7079,7082,7143,[7146,3],7150,7154,7155,[7204,8],7220,7221,7393,7415,12334,12335,43043,43044,43047,43136,43137,[43188,16],43346,43347,43395,43444,43445,43450,43451,[43454,3],43567,43568,43571,43572,43597,43643,43645,43755,43758,43759,43765,44003,44004,44006,44007,44009,44010,44012,69632,69634,69762,[69808,3],69815,69816,69932,69957,69958,70018,[70067,3],70079,70080,70094,[70188,3],70194,70195,70197,[70368,3],70402,70403,70462,70463,[70465,4],70471,70472,[70475,3],70487,70498,70499,[70709,3],70720,70721,70725,[70832,3],70841,[70843,4],70849,[71087,3],[71096,4],71102,[71216,3],71227,71228,71230,71340,71342,71343,71350,71456,71457,71462,[71724,3],71736,[71984,6],71991,71992,71997,72000,72002,[72145,3],[72156,4],72164,72249,72279,72280,72343,72751,72766,72873,72881,72884,[73098,5],73107,73108,73110,73461,73462,73475,73524,73525,73534,73535,73537,[94033,55],94192,94193,119141,119142,[119149,6]],"Nl":[[5870,3],[8544,35],[8581,4],12295,[12321,9],[12344,3],[42726,10],[65856,53],66369,66378,[66513,5],[74752,111]],"Zl":[8232],"Zp":[8233],"Cs":[55296,56191,56192,56319,56320,57343],"Co":[57344,63743,983040,1048573,1048576,1114109],"digits":[[48,10],178,179,185,[1632,10],[1776,10],[1984,10],[2406,10],[2534,10],[2662,10],[2790,10],[2918,10],[3046,10],[3174,10],[3302,10],[3430,10],[3558,10],[3664,10],[3792,10],[3872,10],[4160,10],[4240,10],[4969,9],[6112,10],[6160,10],[6470,10],[6608,11],[6784,10],[6800,10],[6992,10],[7088,10],[7232,10],[7248,10],8304,[8308,6],[8320,10],[9312,9],[9332,9],[9352,9],9450,[9461,9],9471,[10102,9],[10112,9],[10122,9],[42528,10],[43216,10],[43264,10],[43472,10],[43504,10],[43600,10],[44016,10],[65296,10],[66720,10],[68160,4],[68912,10],[69216,9],[69714,9],[69734,10],[69872,10],[69942,10],[70096,10],[70384,10],[70736,10],[70864,10],[71248,10],[71360,10],[71472,10],[71904,10],[72016,10],[72784,10],[73040,10],[73120,10],[73552,10],[92768,10],[92864,10],[93008,10],[120782,50],[123200,10],[123632,10],[124144,10],[125264,10],[127232,11],[130032,10]],"numeric":[[48,10],178,179,185,[188,3],[1632,10],[1776,10],[1984,10],[2406,10],[2534,10],[2548,6],[2662,10],[2790,10],[2918,10],[2930,6],[3046,13],[3174,10],[3192,7],[3302,10],[3416,7],[3430,19],[3558,10],[3664,10],[3792,10],[3872,20],[4160,10],[4240,10],[4969,20],[5870,3],[6112,10],[6128,10],[6160,10],[6470,10],[6608,11],[6784,10],[6800,10],[6992,10],[7088,10],[7232,10],[7248,10],8304,[8308,6],[8320,10],[8528,51],[8581,5],[9312,60],[9450,22],[10102,30],11517,12295,[12321,9],[12344,3],[12690,4],[12832,10],[12872,8],[12881,15],[12928,10],[12977,15],13317,13443,14378,15181,19968,19971,19975,19977,20061,20108,20116,20118,20159,20160,20191,20200,20237,20336,20740,20806,[20841,3,2],21313,[21315,3],21324,[21441,4],22235,22769,22777,24186,24318,24319,[24332,3],24336,25342,25420,26578,28422,29590,30334,32902,33836,36014,36019,36144,38433,38470,38476,38520,38646,[42528,10],[42726,10],[43056,6],[43216,10],[43264,10],[43472,10],[43504,10],[43600,10],[44016,10],63851,63859,63864,63922,63953,63955,63997,[65296,10],[65799,45],[65856,57],65930,65931,[66273,27],[66336,4],66369,66378,[66513,5],[66720,10],[67672,8],[67705,7],[67751,9],[67835,5],[67862,6],68028,68029,[68032,16],[68050,46],[68160,9],68221,68222,[68253,3],[68331,5],[68440,8],[68472,8],[68521,7],[68858,6],[68912,10],[69216,31],[69405,10],[69457,4],[69573,7],[69714,30],[69872,10],[69942,10],[70096,10],[70113,20],[70384,10],[70736,10],[70864,10],[71248,10],[71360,10],[71472,12],[71904,19],[72016,10],[72784,29],[73040,10],[73120,10],[73552,10],[73664,21],[74752,111],[92768,10],[92864,10],[93008,10],[93019,7],[93824,23],[119488,20],[119520,20],[119648,25],[120782,50],[123200,10],[123632,10],[124144,10],[125127,9],[125264,10],[126065,59],[126125,3],[126129,4],[126209,45],[126255,15],[127232,13],[130032,10],131073,131172,131298,131361,133418,133507,133516,133532,133866,133885,133913,140176,141720,146203,156269,194704],"Cn":[[888,2],[896,4],[907,1],[909,1],[930,1],[1328,1],[1367,2],[1419,2],[1424,1],[1480,8],[1515,4],[1525,11],[1806,1],[1867,2],[1970,14],[2043,2],[2094,2],[2111,1],[2140,2],[2143,1],[2155,5],[2191,1],[2194,6],[2436,1],[2445,2],[2449,2],[2473,1],[2481,1],[2483,3],[2490,2],[2501,2],[2505,2],[2511,8],[2520,4],[2526,1],[2532,2],[2559,2],[2564,1],[2571,4],[2577,2],[2601,1],[2609,1],[2612,1],[2615,1],[2618,2],[2621,1],[2627,4],[2633,2],[2638,3],[2642,7],[2653,1],[2655,7],[2679,10],[2692,1],[2702,1],[2706,1],[2729,1],[2737,1],[2740,1],[2746,2],[2758,1],[2762,1],[2766,2],[2769,15],[2788,2],[2802,7],[2816,1],[2820,1],[2829,2],[2833,2],[2857,1],[2865,1],[2868,1],[2874,2],[2885,2],[2889,2],[2894,7],[2904,4],[2910,1],[2916,2],[2936,10],[2948,1],[2955,3],[2961,1],[2966,3],[2971,1],[2973,1],[2976,3],[2981,3],[2987,3],[3002,4],[3011,3],[3017,1],[3022,2],[3025,6],[3032,14],[3067,5],[3085,1],[3089,1],[3113,1],[3130,2],[3141,1],[3145,1],[3150,7],[3159,1],[3163,2],[3166,2],[3172,2],[3184,7],[3213,1],[3217,1],[3241,1],[3252,1],[3258,2],[3269,1],[3273,1],[3278,7],[3287,6],[3295,1],[3300,2],[3312,1],[3316,12],[3341,1],[3345,1],[3397,1],[3401,1],[3408,4],[3428,2],[3456,1],[3460,1],[3479,3],[3506,1],[3516,1],[3518,2],[3527,3],[3531,4],[3541,1],[3543,1],[3552,6],[3568,2],[3573,12],[3643,4],[3676,37],[3715,1],[3717,1],[3723,1],[3748,1],[3750,1],[3774,2],[3781,1],[3783,1],[3791,1],[3802,2],[3808,32],[3912,1],[3949,4],[3992,1],[4029,1],[4045,1],[4059,37],[4294,1],[4296,5],[4302,2],[4681,1],[4686,2],[4695,1],[4697,1],[4702,2],[4745,1],[4750,2],[4785,1],[4790,2],[4799,1],[4801,1],[4806,2],[4823,1],[4881,1],[4886,2],[4955,2],[4989,3],[5018,6],[5110,2],[5118,2],[5789,3],[5881,7],[5910,9],[5943,9],[5972,12],[5997,1],[6001,1],[6004,12],[6110,2],[6122,6],[6138,6],[6170,6],[6265,7],[6315,5],[6390,10],[6431,1],[6444,4],[6460,4],[6465,3],[6510,2],[6517,11],[6572,4],[6602,6],[6619,3],[6684,2],[6751,1],[6781,2],[6794,6],[6810,6],[6830,2],[6863,49],[6989,3],[7039,1],[7156,8],[7224,3],[7242,3],[7305,7],[7355,2],[7368,8],[7419,5],[7958,2],[7966,2],[8006,2],[8014,2],[8024,1],[8026,1],[8028,1],[8030,1],[8062,2],[8117,1],[8133,1],[8148,2],[8156,1],[8176,2],[8181,1],[8191,1],[8293,1],[8306,2],[8335,1],[8349,3],[8385,15],[8433,15],[8588,4],[9255,25],[9291,21],[11124,2],[11158,1],[11508,5],[11558,1],[11560,5],[11566,2],[11624,7],[11633,14],[11671,9],[11687,1],[11695,1],[11703,1],[11711,1],[11719,1],[11727,1],[11735,1],[11743,1],[11870,34],[11930,1],[12020,12],[12246,26],[12284,4],[12352,1],[12439,2],[12544,5],[12592,1],[12687,1],[12772,12],[12831,1],[42125,3],[42183,9],[42540,20],[42744,8],[42955,5],[42962,1],[42964,1],[42970,24],[43053,3],[43066,6],[43128,8],[43206,8],[43226,6],[43348,11],[43389,3],[43470,1],[43482,4],[43519,1],[43575,9],[43598,2],[43610,2],[43715,24],[43767,10],[43783,2],[43791,2],[43799,9],[43815,1],[43823,1],[43884,4],[44014,2],[44026,6],[55204,12],[55239,4],[55292,4],[64110,2],[64218,38],[64263,12],[64280,5],[64311,1],[64317,1],[64319,1],[64322,1],[64325,1],[64451,16],[64912,2],[64968,7],[64976,32],[65050,6],[65107,1],[65127,1],[65132,4],[65141,1],[65277,2],[65280,1],[65471,3],[65480,2],[65488,2],[65496,2],[65501,3],[65511,1],[65519,10],[65534,2],[65548,1],[65575,1],[65595,1],[65598,1],[65614,2],[65630,34],[65787,5],[65795,4],[65844,3],[65935,1],[65949,3],[65953,47],[66046,130],[66205,3],[66257,15],[66300,4],[66340,9],[66379,5],[66427,5],[66462,1],[66500,4],[66518,42],[66718,2],[66730,6],[66772,4],[66812,4],[66856,8],[66916,11],[66939,1],[66955,1],[66963,1],[66966,1],[66978,1],[66994,1],[67002,1],[67005,67],[67383,9],[67414,10],[67432,24],[67462,1],[67505,1],[67515,69],[67590,2],[67593,1],[67638,1],[67641,3],[67645,2],[67670,1],[67743,8],[67760,48],[67827,1],[67830,5],[67868,3],[67898,5],[67904,64],[68024,4],[68048,2],[68100,1],[68103,5],[68116,1],[68120,1],[68150,2],[68155,4],[68169,7],[68185,7],[68256,32],[68327,4],[68343,9],[68406,3],[68438,2],[68467,5],[68498,7],[68509,12],[68528,80],[68681,55],[68787,13],[68851,7],[68904,8],[68922,294],[69247,1],[69290,1],[69294,2],[69298,75],[69416,8],[69466,22],[69514,38],[69580,20],[69623,9],[69710,4],[69750,9],[69827,10],[69838,2],[69865,7],[69882,6],[69941,1],[69960,8],[70007,9],[70112,1],[70133,11],[70162,1],[70210,62],[70279,1],[70281,1],[70286,1],[70302,1],[70314,6],[70379,5],[70394,6],[70404,1],[70413,2],[70417,2],[70441,1],[70449,1],[70452,1],[70458,1],[70469,2],[70473,2],[70478,2],[70481,6],[70488,5],[70500,2],[70509,3],[70517,139],[70748,1],[70754,30],[70856,8],[70874,166],[71094,2],[71134,34],[71237,11],[71258,6],[71277,19],[71354,6],[71370,54],[71451,2],[71468,4],[71495,185],[71740,100],[71923,12],[71943,2],[71946,2],[71956,1],[71959,1],[71990,1],[71993,2],[72007,9],[72026,70],[72104,2],[72152,2],[72165,27],[72264,8],[72355,13],[72441,7],[72458,246],[72713,1],[72759,1],[72774,10],[72813,3],[72848,2],[72872,1],[72887,73],[72967,1],[72970,1],[73015,3],[73019,1],[73022,1],[73032,8],[73050,6],[73062,1],[73065,1],[73103,1],[73106,1],[73113,7],[73130,310],[73465,7],[73489,1],[73531,3],[73562,86],[73649,15],[73714,13],[74650,102],[74863,1],[74869,11],[75076,2636],[77811,13],[78934,4010],[83527,8633],[92729,7],[92767,1],[92778,4],[92863,1],[92874,6],[92910,2],[92918,10],[92998,10],[93018,1],[93026,1],[93048,5],[93072,688],[93851,101],[94027,4],[94088,7],[94112,64],[94181,11],[94194,14],[100344,8],[101590,42],[101641,8935],[110580,1],[110588,1],[110591,1],[110883,15],[110899,29],[110931,2],[110934,14],[110952,8],[111356,2308],[113771,5],[113789,3],[113801,7],[113818,2],[113828,4700],[118574,2],[118599,9],[118724,60],[119030,10],[119079,2],[119275,21],[119366,122],[119508,12],[119540,12],[119639,9],[119673,135],[119893,1],[119965,1],[119968,2],[119971,2],[119975,2],[119981,1],[119994,1],[119996,1],[120004,1],[120070,1],[120075,2],[120085,1],[120093,1],[120122,1],[120127,1],[120133,1],[120135,3],[120145,1],[120486,2],[120780,2],[121484,15],[121504,1],[121520,1104],[122655,6],[122667,213],[122887,1],[122905,2],[122914,1],[122917,1],[122923,5],[122990,33],[123024,112],[123181,3],[123198,2],[123210,4],[123216,320],[123567,17],[123642,5],[123648,464],[124154,742],[124903,1],[124908,1],[124911,1],[124927,1],[125125,2],[125143,41],[125260,4],[125274,4],[125280,785],[126133,76],[126270,194],[126468,1],[126496,1],[126499,1],[126501,2],[126504,1],[126515,1],[126520,1],[126522,1],[126524,6],[126531,4],[126536,1],[126538,1],[126540,1],[126544,1],[126547,1],[126549,2],[126552,1],[126554,1],[126556,1],[126558,1],[126560,1],[126563,1],[126565,2],[126571,1],[126579,1],[126584,1],[126589,1],[126591,1],[126602,1],[126620,5],[126628,1],[126634,1],[126652,52],[126706,270],[127020,4],[127124,12],[127151,2],[127168,1],[127184,1],[127222,10],[127406,56],[127491,13],[127548,4],[127561,7],[127570,14],[127590,154],[128728,4],[128749,3],[128765,3],[128887,4],[128986,6],[129004,4],[129009,15],[129036,4],[129096,8],[129114,6],[129160,8],[129198,2],[129202,78],[129620,12],[129646,2],[129661,3],[129673,7],[129726,1],[129734,8],[129756,4],[129769,7],[129785,7],[129939,1],[129995,37],[130042,1030],[173792,32],[177978,6],[178206,2],[183970,14],[191457,3103],[195102,1506],[201547,5],[205744,711761],[917506,30],[917632,128],[918000,65040],[1048574,2]]} -$B.digits_mapping={"48":0,"49":1,"50":2,"51":3,"52":4,"53":5,"54":6,"55":7,"56":8,"57":9,"1632":0,"1633":1,"1634":2,"1635":3,"1636":4,"1637":5,"1638":6,"1639":7,"1640":8,"1641":9,"1776":0,"1777":1,"1778":2,"1779":3,"1780":4,"1781":5,"1782":6,"1783":7,"1784":8,"1785":9,"1984":0,"1985":1,"1986":2,"1987":3,"1988":4,"1989":5,"1990":6,"1991":7,"1992":8,"1993":9,"2406":0,"2407":1,"2408":2,"2409":3,"2410":4,"2411":5,"2412":6,"2413":7,"2414":8,"2415":9,"2534":0,"2535":1,"2536":2,"2537":3,"2538":4,"2539":5,"2540":6,"2541":7,"2542":8,"2543":9,"2662":0,"2663":1,"2664":2,"2665":3,"2666":4,"2667":5,"2668":6,"2669":7,"2670":8,"2671":9,"2790":0,"2791":1,"2792":2,"2793":3,"2794":4,"2795":5,"2796":6,"2797":7,"2798":8,"2799":9,"2918":0,"2919":1,"2920":2,"2921":3,"2922":4,"2923":5,"2924":6,"2925":7,"2926":8,"2927":9,"3046":0,"3047":1,"3048":2,"3049":3,"3050":4,"3051":5,"3052":6,"3053":7,"3054":8,"3055":9,"3174":0,"3175":1,"3176":2,"3177":3,"3178":4,"3179":5,"3180":6,"3181":7,"3182":8,"3183":9,"3302":0,"3303":1,"3304":2,"3305":3,"3306":4,"3307":5,"3308":6,"3309":7,"3310":8,"3311":9,"3430":0,"3431":1,"3432":2,"3433":3,"3434":4,"3435":5,"3436":6,"3437":7,"3438":8,"3439":9,"3558":0,"3559":1,"3560":2,"3561":3,"3562":4,"3563":5,"3564":6,"3565":7,"3566":8,"3567":9,"3664":0,"3665":1,"3666":2,"3667":3,"3668":4,"3669":5,"3670":6,"3671":7,"3672":8,"3673":9,"3792":0,"3793":1,"3794":2,"3795":3,"3796":4,"3797":5,"3798":6,"3799":7,"3800":8,"3801":9,"3872":0,"3873":1,"3874":2,"3875":3,"3876":4,"3877":5,"3878":6,"3879":7,"3880":8,"3881":9,"4160":0,"4161":1,"4162":2,"4163":3,"4164":4,"4165":5,"4166":6,"4167":7,"4168":8,"4169":9,"4240":0,"4241":1,"4242":2,"4243":3,"4244":4,"4245":5,"4246":6,"4247":7,"4248":8,"4249":9,"6112":0,"6113":1,"6114":2,"6115":3,"6116":4,"6117":5,"6118":6,"6119":7,"6120":8,"6121":9,"6160":0,"6161":1,"6162":2,"6163":3,"6164":4,"6165":5,"6166":6,"6167":7,"6168":8,"6169":9,"6470":0,"6471":1,"6472":2,"6473":3,"6474":4,"6475":5,"6476":6,"6477":7,"6478":8,"6479":9,"6608":0,"6609":1,"6610":2,"6611":3,"6612":4,"6613":5,"6614":6,"6615":7,"6616":8,"6617":9,"6784":0,"6785":1,"6786":2,"6787":3,"6788":4,"6789":5,"6790":6,"6791":7,"6792":8,"6793":9,"6800":0,"6801":1,"6802":2,"6803":3,"6804":4,"6805":5,"6806":6,"6807":7,"6808":8,"6809":9,"6992":0,"6993":1,"6994":2,"6995":3,"6996":4,"6997":5,"6998":6,"6999":7,"7000":8,"7001":9,"7088":0,"7089":1,"7090":2,"7091":3,"7092":4,"7093":5,"7094":6,"7095":7,"7096":8,"7097":9,"7232":0,"7233":1,"7234":2,"7235":3,"7236":4,"7237":5,"7238":6,"7239":7,"7240":8,"7241":9,"7248":0,"7249":1,"7250":2,"7251":3,"7252":4,"7253":5,"7254":6,"7255":7,"7256":8,"7257":9,"42528":0,"42529":1,"42530":2,"42531":3,"42532":4,"42533":5,"42534":6,"42535":7,"42536":8,"42537":9,"43216":0,"43217":1,"43218":2,"43219":3,"43220":4,"43221":5,"43222":6,"43223":7,"43224":8,"43225":9,"43264":0,"43265":1,"43266":2,"43267":3,"43268":4,"43269":5,"43270":6,"43271":7,"43272":8,"43273":9,"43472":0,"43473":1,"43474":2,"43475":3,"43476":4,"43477":5,"43478":6,"43479":7,"43480":8,"43481":9,"43504":0,"43505":1,"43506":2,"43507":3,"43508":4,"43509":5,"43510":6,"43511":7,"43512":8,"43513":9,"43600":0,"43601":1,"43602":2,"43603":3,"43604":4,"43605":5,"43606":6,"43607":7,"43608":8,"43609":9,"44016":0,"44017":1,"44018":2,"44019":3,"44020":4,"44021":5,"44022":6,"44023":7,"44024":8,"44025":9,"65296":0,"65297":1,"65298":2,"65299":3,"65300":4,"65301":5,"65302":6,"65303":7,"65304":8,"65305":9,"66720":0,"66721":1,"66722":2,"66723":3,"66724":4,"66725":5,"66726":6,"66727":7,"66728":8,"66729":9,"68912":0,"68913":1,"68914":2,"68915":3,"68916":4,"68917":5,"68918":6,"68919":7,"68920":8,"68921":9,"69734":0,"69735":1,"69736":2,"69737":3,"69738":4,"69739":5,"69740":6,"69741":7,"69742":8,"69743":9,"69872":0,"69873":1,"69874":2,"69875":3,"69876":4,"69877":5,"69878":6,"69879":7,"69880":8,"69881":9,"69942":0,"69943":1,"69944":2,"69945":3,"69946":4,"69947":5,"69948":6,"69949":7,"69950":8,"69951":9,"70096":0,"70097":1,"70098":2,"70099":3,"70100":4,"70101":5,"70102":6,"70103":7,"70104":8,"70105":9,"70384":0,"70385":1,"70386":2,"70387":3,"70388":4,"70389":5,"70390":6,"70391":7,"70392":8,"70393":9,"70736":0,"70737":1,"70738":2,"70739":3,"70740":4,"70741":5,"70742":6,"70743":7,"70744":8,"70745":9,"70864":0,"70865":1,"70866":2,"70867":3,"70868":4,"70869":5,"70870":6,"70871":7,"70872":8,"70873":9,"71248":0,"71249":1,"71250":2,"71251":3,"71252":4,"71253":5,"71254":6,"71255":7,"71256":8,"71257":9,"71360":0,"71361":1,"71362":2,"71363":3,"71364":4,"71365":5,"71366":6,"71367":7,"71368":8,"71369":9,"71472":0,"71473":1,"71474":2,"71475":3,"71476":4,"71477":5,"71478":6,"71479":7,"71480":8,"71481":9,"71904":0,"71905":1,"71906":2,"71907":3,"71908":4,"71909":5,"71910":6,"71911":7,"71912":8,"71913":9,"72016":0,"72017":1,"72018":2,"72019":3,"72020":4,"72021":5,"72022":6,"72023":7,"72024":8,"72025":9,"72784":0,"72785":1,"72786":2,"72787":3,"72788":4,"72789":5,"72790":6,"72791":7,"72792":8,"72793":9,"73040":0,"73041":1,"73042":2,"73043":3,"73044":4,"73045":5,"73046":6,"73047":7,"73048":8,"73049":9,"73120":0,"73121":1,"73122":2,"73123":3,"73124":4,"73125":5,"73126":6,"73127":7,"73128":8,"73129":9,"73552":0,"73553":1,"73554":2,"73555":3,"73556":4,"73557":5,"73558":6,"73559":7,"73560":8,"73561":9,"92768":0,"92769":1,"92770":2,"92771":3,"92772":4,"92773":5,"92774":6,"92775":7,"92776":8,"92777":9,"92864":0,"92865":1,"92866":2,"92867":3,"92868":4,"92869":5,"92870":6,"92871":7,"92872":8,"92873":9,"93008":0,"93009":1,"93010":2,"93011":3,"93012":4,"93013":5,"93014":6,"93015":7,"93016":8,"93017":9,"120782":0,"120783":1,"120784":2,"120785":3,"120786":4,"120787":5,"120788":6,"120789":7,"120790":8,"120791":9,"120792":0,"120793":1,"120794":2,"120795":3,"120796":4,"120797":5,"120798":6,"120799":7,"120800":8,"120801":9,"120802":0,"120803":1,"120804":2,"120805":3,"120806":4,"120807":5,"120808":6,"120809":7,"120810":8,"120811":9,"120812":0,"120813":1,"120814":2,"120815":3,"120816":4,"120817":5,"120818":6,"120819":7,"120820":8,"120821":9,"120822":0,"120823":1,"120824":2,"120825":3,"120826":4,"120827":5,"120828":6,"120829":7,"120830":8,"120831":9,"123200":0,"123201":1,"123202":2,"123203":3,"123204":4,"123205":5,"123206":6,"123207":7,"123208":8,"123209":9,"123632":0,"123633":1,"123634":2,"123635":3,"123636":4,"123637":5,"123638":6,"123639":7,"123640":8,"123641":9,"124144":0,"124145":1,"124146":2,"124147":3,"124148":4,"124149":5,"124150":6,"124151":7,"124152":8,"124153":9,"125264":0,"125265":1,"125266":2,"125267":3,"125268":4,"125269":5,"125270":6,"125271":7,"125272":8,"125273":9,"130032":0,"130033":1,"130034":2,"130035":3,"130036":4,"130037":5,"130038":6,"130039":7,"130040":8,"130041":9} -$B.unicode_casefold={223:[115,115],304:[105,775],329:[700,110],496:[106,780],912:[953,776,769],944:[965,776,769],1415:[1381,1410],7830:[104,817],7831:[116,776],7832:[119,778],7833:[121,778],7834:[97,702],7838:[223],8016:[965,787],8018:[965,787,768],8020:[965,787,769],8022:[965,787,834],8064:[7936,953],8065:[7937,953],8066:[7938,953],8067:[7939,953],8068:[7940,953],8069:[7941,953],8070:[7942,953],8071:[7943,953],8072:[8064],8073:[8065],8074:[8066],8075:[8067],8076:[8068],8077:[8069],8078:[8070],8079:[8071],8080:[7968,953],8081:[7969,953],8082:[7970,953],8083:[7971,953],8084:[7972,953],8085:[7973,953],8086:[7974,953],8087:[7975,953],8088:[8080],8089:[8081],8090:[8082],8091:[8083],8092:[8084],8093:[8085],8094:[8086],8095:[8087],8096:[8032,953],8097:[8033,953],8098:[8034,953],8099:[8035,953],8100:[8036,953],8101:[8037,953],8102:[8038,953],8103:[8039,953],8104:[8096],8105:[8097],8106:[8098],8107:[8099],8108:[8100],8109:[8101],8110:[8102],8111:[8103],8114:[8048,953],8115:[945,953],8116:[940,953],8118:[945,834],8119:[945,834,953],8124:[8115],8130:[8052,953],8131:[951,953],8132:[942,953],8134:[951,834],8135:[951,834,953],8140:[8131],8146:[953,776,768],8147:[912],8150:[953,834],8151:[953,776,834],8162:[965,776,768],8163:[944],8164:[961,787],8166:[965,834],8167:[965,776,834],8178:[8060,953],8179:[969,953],8180:[974,953],8182:[969,834],8183:[969,834,953],8188:[8179],64256:[102,102],64257:[102,105],64258:[102,108],64259:[102,102,105],64260:[102,102,108],64261:[64262],64262:[115,116],64275:[1396,1398],64276:[1396,1381],64277:[1396,1387],64278:[1406,1398],64279:[1396,1389]} -$B.unicode_bidi_whitespace=[9,10,11,12,13,28,29,30,31,32,133,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8287,12288] -$B.unicode_identifiers={"XID_Start":[95,[65,26],[97,26],170,181,186,[192,23],[216,31],[248,458],[710,12],[736,5],748,750,[880,5],[886,2],[891,3],895,902,[904,3],908,[910,20],[931,83],[1015,139],[1162,166],[1329,38],1369,[1376,41],[1488,27],[1519,4],[1568,43],[1646,2],[1649,99],1749,[1765,2],[1774,2],[1786,3],1791,1808,[1810,30],[1869,89],1969,[1994,33],[2036,2],2042,[2048,22],2074,2084,2088,[2112,25],[2144,11],[2160,24],[2185,6],[2208,42],[2308,54],2365,2384,[2392,10],2417,[2418,15],[2437,8],[2447,2],[2451,22],[2474,7],2482,[2486,4],2493,2510,[2524,2],[2527,3],[2544,2],2556,[2565,6],[2575,2],[2579,22],[2602,7],[2610,2],[2613,2],[2616,2],[2649,4],2654,[2674,3],[2693,9],[2703,3],[2707,22],[2730,7],[2738,2],[2741,5],2749,2768,[2784,2],2809,[2821,8],[2831,2],[2835,22],[2858,7],[2866,2],[2869,5],2877,[2908,2],[2911,3],2929,2947,[2949,6],[2958,3],[2962,4],[2969,2],2972,[2974,2],[2979,2],[2984,3],[2990,12],3024,[3077,8],[3086,3],[3090,23],[3114,16],3133,[3160,3],3165,[3168,2],3200,[3205,8],[3214,3],[3218,23],[3242,10],[3253,5],3261,[3293,2],[3296,2],[3313,2],[3332,9],[3342,3],[3346,41],3389,3406,[3412,3],[3423,3],[3450,6],[3461,18],[3482,24],[3507,9],3517,[3520,7],[3585,48],3634,[3648,7],[3713,2],3716,[3718,5],[3724,24],3749,[3751,10],3762,3773,[3776,5],3782,[3804,4],3840,[3904,8],[3913,36],[3976,5],[4096,43],4159,[4176,6],[4186,4],4193,[4197,2],[4206,3],[4213,13],4238,[4256,38],4295,4301,[4304,43],4348,[4349,332],[4682,4],[4688,7],4696,[4698,4],[4704,41],[4746,4],[4752,33],[4786,4],[4792,7],4800,[4802,4],[4808,15],[4824,57],[4882,4],[4888,67],[4992,16],[5024,86],[5112,6],[5121,620],[5743,17],[5761,26],[5792,75],[5870,11],[5888,18],[5919,19],[5952,18],[5984,13],[5998,3],[6016,52],6103,6108,[6176,89],[6272,41],6314,[6320,70],[6400,31],[6480,30],[6512,5],[6528,44],[6576,26],[6656,23],[6688,53],6823,[6917,47],[6981,8],[7043,30],[7086,2],[7098,44],[7168,36],[7245,3],[7258,36],[7296,9],[7312,43],[7357,3],[7401,4],[7406,6],[7413,2],7418,[7424,192],[7680,278],[7960,6],[7968,38],[8008,6],[8016,8],8025,8027,8029,[8031,31],[8064,53],[8118,7],8126,[8130,3],[8134,7],[8144,4],[8150,6],[8160,13],[8178,3],[8182,7],8305,8319,[8336,13],8450,8455,[8458,10],8469,8472,[8473,5],8484,8486,8488,[8490,16],[8508,4],[8517,5],8526,[8544,41],[11264,229],[11499,4],[11506,2],[11520,38],11559,11565,[11568,56],11631,[11648,23],[11680,7],[11688,7],[11696,7],[11704,7],[11712,7],[11720,7],[11728,7],[11736,7],12293,12294,12295,[12321,9],[12337,5],[12344,5],[12353,86],[12445,3],[12449,90],[12540,4],[12549,43],[12593,94],[12704,32],[12784,16],[13312,6592],[19968,22157],[42192,46],[42240,269],[42512,16],[42538,2],[42560,47],42623,[42624,30],[42656,80],[42775,9],[42786,103],[42891,64],[42960,2],42963,[42965,5],[42994,16],[43011,3],[43015,4],[43020,23],[43072,52],[43138,50],[43250,6],43259,[43261,2],[43274,28],[43312,23],[43360,29],[43396,47],43471,[43488,5],43494,[43495,9],[43514,5],[43520,41],[43584,3],[43588,8],[43616,23],43642,[43646,50],43697,[43701,2],[43705,5],43712,43714,[43739,3],[43744,11],43762,[43763,2],[43777,6],[43785,6],[43793,6],[43808,7],[43816,7],[43824,43],[43868,14],[43888,115],[44032,11172],[55216,23],[55243,49],[63744,366],[64112,106],[64256,7],[64275,5],64285,[64287,10],[64298,13],[64312,5],64318,[64320,2],[64323,2],[64326,108],[64467,139],[64612,218],[64848,64],[64914,54],[65008,10],65137,65139,65143,65145,65147,65149,[65151,126],[65313,26],[65345,26],[65382,56],[65440,31],[65474,6],[65482,6],[65490,6],[65498,3],[65536,12],[65549,26],[65576,19],[65596,2],[65599,15],[65616,14],[65664,123],[65856,53],[66176,29],[66208,49],[66304,32],[66349,30],[66384,38],[66432,30],[66464,36],[66504,8],[66513,5],[66560,158],[66736,36],[66776,36],[66816,40],[66864,52],[66928,11],[66940,15],[66956,7],[66964,2],[66967,11],[66979,15],[66995,7],[67003,2],[67072,311],[67392,22],[67424,8],[67456,6],[67463,42],[67506,9],[67584,6],67592,[67594,44],[67639,2],67644,[67647,23],[67680,23],[67712,31],[67808,19],[67828,2],[67840,22],[67872,26],[67968,56],[68030,2],68096,[68112,4],[68117,3],[68121,29],[68192,29],[68224,29],[68288,8],[68297,28],[68352,54],[68416,22],[68448,19],[68480,18],[68608,73],[68736,51],[68800,51],[68864,36],[69248,42],[69296,2],[69376,29],69415,[69424,22],[69488,18],[69552,21],[69600,23],[69635,53],[69745,2],69749,[69763,45],[69840,25],[69891,36],69956,69959,[69968,35],70006,[70019,48],[70081,4],70106,70108,[70144,18],[70163,25],[70207,2],[70272,7],70280,[70282,4],[70287,15],[70303,10],[70320,47],[70405,8],[70415,2],[70419,22],[70442,7],[70450,2],[70453,5],70461,70480,[70493,5],[70656,53],[70727,4],[70751,3],[70784,48],[70852,2],70855,[71040,47],[71128,4],[71168,48],71236,[71296,43],71352,[71424,27],[71488,7],[71680,44],[71840,64],[71935,8],71945,[71948,8],[71957,2],[71960,24],71999,72001,[72096,8],[72106,39],72161,72163,72192,[72203,40],72250,72272,[72284,46],72349,[72368,73],[72704,9],[72714,37],72768,[72818,30],[72960,7],[72968,2],[72971,38],73030,[73056,6],[73063,2],[73066,32],73112,[73440,19],73474,[73476,13],[73490,34],73648,[73728,922],[74752,111],[74880,196],[77712,97],[77824,1072],[78913,6],[82944,583],[92160,569],[92736,31],[92784,79],[92880,30],[92928,48],[92992,4],[93027,21],[93053,19],[93760,64],[93952,75],94032,[94099,13],[94176,2],94179,[94208,6136],[100352,1238],[101632,9],[110576,4],[110581,7],[110589,2],[110592,291],110898,[110928,3],110933,[110948,4],[110960,396],[113664,107],[113776,13],[113792,9],[113808,10],[119808,85],[119894,71],[119966,2],119970,[119973,2],[119977,4],[119982,12],119995,[119997,7],[120005,65],[120071,4],[120077,8],[120086,7],[120094,28],[120123,4],[120128,5],120134,[120138,7],[120146,340],[120488,25],[120514,25],[120540,31],[120572,25],[120598,31],[120630,25],[120656,31],[120688,25],[120714,31],[120746,25],[120772,8],[122624,31],[122661,6],[122928,62],[123136,45],[123191,7],123214,[123536,30],[123584,44],[124112,28],[124896,7],[124904,4],[124909,2],[124912,15],[124928,197],[125184,68],125259,[126464,4],[126469,27],[126497,2],126500,126503,[126505,10],[126516,4],126521,126523,126530,126535,126537,126539,[126541,3],[126545,2],126548,126551,126553,126555,126557,126559,[126561,2],126564,[126567,4],[126572,7],[126580,4],[126585,4],126590,[126592,10],[126603,17],[126625,3],[126629,5],[126635,17],[131072,42720],[173824,4154],[177984,222],[178208,5762],[183984,7473],[191472,622],[194560,542],[196608,4939],[201552,4192]],"XID_Continue":[[48,10],[65,26],95,[97,26],170,181,183,186,[192,23],[216,31],[248,458],[710,12],[736,5],748,750,[768,117],[886,2],[891,3],895,902,903,[904,3],908,[910,20],[931,83],[1015,139],[1155,5],[1162,166],[1329,38],1369,[1376,41],[1425,45],1471,[1473,2],[1476,2],1479,[1488,27],[1519,4],[1552,11],[1568,74],[1646,102],1749,[1750,7],[1759,10],[1770,19],1791,1808,1809,[1810,57],[1869,101],[1984,54],2042,2045,[2048,46],[2112,28],[2144,11],[2160,24],[2185,6],[2200,74],[2275,129],[2406,10],2417,[2418,18],[2437,8],[2447,2],[2451,22],[2474,7],2482,[2486,4],2492,2493,[2494,7],[2503,2],[2507,4],2519,[2524,2],[2527,5],[2534,12],2556,2558,[2561,3],[2565,6],[2575,2],[2579,22],[2602,7],[2610,2],[2613,2],[2616,2],2620,[2622,5],[2631,2],[2635,3],2641,[2649,4],2654,[2662,16],[2689,3],[2693,9],[2703,3],[2707,22],[2730,7],[2738,2],[2741,5],2748,2749,[2750,8],[2759,3],[2763,3],2768,[2784,4],[2790,10],2809,[2810,6],2817,[2818,2],[2821,8],[2831,2],[2835,22],[2858,7],[2866,2],[2869,5],2876,2877,2878,2879,2880,[2881,4],[2887,2],[2891,3],[2901,3],[2908,2],[2911,5],[2918,10],2929,2946,2947,[2949,6],[2958,3],[2962,4],[2969,2],2972,[2974,2],[2979,2],[2984,3],[2990,12],[3006,5],[3014,3],[3018,4],3024,3031,[3046,10],3072,[3073,12],[3086,3],[3090,23],[3114,16],3132,3133,[3134,7],[3142,3],[3146,4],[3157,2],[3160,3],3165,[3168,4],[3174,10],3200,3201,[3202,2],[3205,8],[3214,3],[3218,23],[3242,10],[3253,5],3260,3261,3262,3263,[3264,5],3270,[3271,2],[3274,4],[3285,2],[3293,2],[3296,4],[3302,10],[3313,3],[3328,13],[3342,3],[3346,51],[3398,3],[3402,5],[3412,4],[3423,5],[3430,10],[3450,6],3457,[3458,2],[3461,18],[3482,24],[3507,9],3517,[3520,7],3530,[3535,6],3542,[3544,8],[3558,10],[3570,2],[3585,58],[3648,15],[3664,10],[3713,2],3716,[3718,5],[3724,24],3749,[3751,23],[3776,5],3782,[3784,7],[3792,10],[3804,4],3840,[3864,2],[3872,10],3893,3895,3897,[3902,10],[3913,36],[3953,20],[3974,18],[3993,36],4038,[4096,74],[4176,78],[4256,38],4295,4301,[4304,43],4348,[4349,332],[4682,4],[4688,7],4696,[4698,4],[4704,41],[4746,4],[4752,33],[4786,4],[4792,7],4800,[4802,4],[4808,15],[4824,57],[4882,4],[4888,67],[4957,3],[4969,9],[4992,16],[5024,86],[5112,6],[5121,620],[5743,17],[5761,26],[5792,75],[5870,11],[5888,22],[5919,22],[5952,20],[5984,13],[5998,3],[6002,2],[6016,84],6103,6108,6109,[6112,10],[6155,3],6159,[6160,10],[6176,89],[6272,43],[6320,70],[6400,31],[6432,12],[6448,12],[6470,40],[6512,5],[6528,44],[6576,26],[6608,11],[6656,28],[6688,63],6752,6753,6754,[6755,26],6783,[6784,10],[6800,10],6823,[6832,14],[6847,16],[6912,77],[6992,10],[7019,9],[7040,116],[7168,56],[7232,10],[7245,49],[7296,9],[7312,43],[7357,3],[7376,3],[7380,39],[7424,534],[7960,6],[7968,38],[8008,6],[8016,8],8025,8027,8029,[8031,31],[8064,53],[8118,7],8126,[8130,3],[8134,7],[8144,4],[8150,6],[8160,13],[8178,3],[8182,7],[8204,2],[8255,2],8276,8305,8319,[8336,13],[8400,13],8417,[8421,12],8450,8455,[8458,10],8469,8472,[8473,5],8484,8486,8488,[8490,16],[8508,4],[8517,5],8526,[8544,41],[11264,229],[11499,9],[11520,38],11559,11565,[11568,56],11631,11647,[11648,23],[11680,7],[11688,7],[11696,7],[11704,7],[11712,7],[11720,7],[11728,7],[11736,7],[11744,32],12293,12294,12295,[12321,15],[12337,5],[12344,5],[12353,86],[12441,2],[12445,3],[12449,95],[12549,43],[12593,94],[12704,32],[12784,16],[13312,6592],[19968,22157],[42192,46],[42240,269],[42512,28],[42560,48],[42612,10],42623,[42624,114],[42775,9],[42786,103],[42891,64],[42960,2],42963,[42965,5],[42994,54],43052,[43072,52],[43136,70],[43216,10],[43232,24],43259,[43261,49],[43312,36],[43360,29],[43392,65],43471,[43472,10],[43488,31],[43520,55],[43584,14],[43600,10],[43616,23],43642,43643,43644,43645,[43646,69],[43739,3],[43744,16],43762,[43763,4],[43777,6],[43785,6],[43793,6],[43808,7],[43816,7],[43824,43],[43868,14],[43888,123],44012,44013,[44016,10],[44032,11172],[55216,23],[55243,49],[63744,366],[64112,106],[64256,7],[64275,5],64285,64286,[64287,10],[64298,13],[64312,5],64318,[64320,2],[64323,2],[64326,108],[64467,139],[64612,218],[64848,64],[64914,54],[65008,10],[65024,16],[65056,16],[65075,2],[65101,3],65137,65139,65143,65145,65147,65149,[65151,126],[65296,10],[65313,26],65343,[65345,26],65381,[65382,89],[65474,6],[65482,6],[65490,6],[65498,3],[65536,12],[65549,26],[65576,19],[65596,2],[65599,15],[65616,14],[65664,123],[65856,53],66045,[66176,29],[66208,49],66272,[66304,32],[66349,30],[66384,43],[66432,30],[66464,36],[66504,8],[66513,5],[66560,158],[66720,10],[66736,36],[66776,36],[66816,40],[66864,52],[66928,11],[66940,15],[66956,7],[66964,2],[66967,11],[66979,15],[66995,7],[67003,2],[67072,311],[67392,22],[67424,8],[67456,6],[67463,42],[67506,9],[67584,6],67592,[67594,44],[67639,2],67644,[67647,23],[67680,23],[67712,31],[67808,19],[67828,2],[67840,22],[67872,26],[67968,56],[68030,2],68096,[68097,3],[68101,2],[68108,8],[68117,3],[68121,29],[68152,3],68159,[68192,29],[68224,29],[68288,8],[68297,30],[68352,54],[68416,22],[68448,19],[68480,18],[68608,73],[68736,51],[68800,51],[68864,40],[68912,10],[69248,42],[69291,2],[69296,2],[69373,32],69415,[69424,33],[69488,22],[69552,21],[69600,23],69632,69633,69634,[69635,68],[69734,16],[69759,60],69826,[69840,25],[69872,10],[69888,53],[69942,10],69956,[69957,3],[69968,36],70006,[70016,69],[70089,4],70094,70095,[70096,11],70108,[70144,18],[70163,37],70206,[70207,3],[70272,7],70280,[70282,4],[70287,15],[70303,10],[70320,59],[70384,10],[70400,4],[70405,8],[70415,2],[70419,22],[70442,7],[70450,2],[70453,5],[70459,10],[70471,2],[70475,3],70480,70487,[70493,7],[70502,7],[70512,5],[70656,75],[70736,10],70750,[70751,3],[70784,70],70855,[70864,10],[71040,54],[71096,9],[71128,6],[71168,65],71236,[71248,10],[71296,57],[71360,10],[71424,27],[71453,15],[71472,10],[71488,7],[71680,59],[71840,74],[71935,8],71945,[71948,8],[71957,2],[71960,30],[71991,2],[71995,9],[72016,10],[72096,8],[72106,46],[72154,8],72163,72164,72192,[72193,62],72263,72272,[72273,73],72349,[72368,73],[72704,9],[72714,45],[72760,9],[72784,10],[72818,30],[72850,22],72873,[72874,13],[72960,7],[72968,2],[72971,44],73018,[73020,2],[73023,9],[73040,10],[73056,6],[73063,2],[73066,37],[73104,2],[73107,6],[73120,10],[73440,23],[73472,17],[73490,41],[73534,5],[73552,10],73648,[73728,922],[74752,111],[74880,196],[77712,97],[77824,1072],78912,[78913,21],[82944,583],[92160,569],[92736,31],[92768,10],[92784,79],[92864,10],[92880,30],[92912,5],[92928,55],[92992,4],[93008,10],[93027,21],[93053,19],[93760,64],[93952,75],94031,94032,[94033,55],[94095,17],[94176,2],94179,94180,[94192,2],[94208,6136],[100352,1238],[101632,9],[110576,4],[110581,7],[110589,2],[110592,291],110898,[110928,3],110933,[110948,4],[110960,396],[113664,107],[113776,13],[113792,9],[113808,10],[113821,2],[118528,46],[118576,23],[119141,5],[119149,6],[119163,8],[119173,7],[119210,4],[119362,3],[119808,85],[119894,71],[119966,2],119970,[119973,2],[119977,4],[119982,12],119995,[119997,7],[120005,65],[120071,4],[120077,8],[120086,7],[120094,28],[120123,4],[120128,5],120134,[120138,7],[120146,340],[120488,25],[120514,25],[120540,31],[120572,25],[120598,31],[120630,25],[120656,31],[120688,25],[120714,31],[120746,25],[120772,8],[120782,50],[121344,55],[121403,50],121461,121476,[121499,5],[121505,15],[122624,31],[122661,6],[122880,7],[122888,17],[122907,7],[122915,2],[122918,5],[122928,62],123023,[123136,45],[123184,14],[123200,10],123214,[123536,31],[123584,58],[124112,42],[124896,7],[124904,4],[124909,2],[124912,15],[124928,197],[125136,7],[125184,76],[125264,10],[126464,4],[126469,27],[126497,2],126500,126503,[126505,10],[126516,4],126521,126523,126530,126535,126537,126539,[126541,3],[126545,2],126548,126551,126553,126555,126557,126559,[126561,2],126564,[126567,4],[126572,7],[126580,4],[126585,4],126590,[126592,10],[126603,17],[126625,3],[126629,5],[126635,17],[130032,10],[131072,42720],[173824,4154],[177984,222],[178208,5762],[183984,7473],[191472,622],[194560,542],[196608,4939],[201552,4192],[917760,240]]} -$B.unicode_tables={} -for(const gc in $B.unicode){$B.unicode_tables[gc]={} -$B.unicode[gc].forEach(function(item){if(Array.isArray(item)){var step=item[2]||1 -for(var i=0,nb=item[1];i < nb;i+=1){$B.unicode_tables[gc][item[0]+i*step]=true}}else{$B.unicode_tables[gc][item]=true}})} -for(const key in $B.unicode_identifiers){$B.unicode_tables[key]={} -for(const item of $B.unicode_identifiers[key]){if(Array.isArray(item)){for(var i=0;i < item[1];i++){$B.unicode_tables[key][item[0]+i]=true}}else{$B.unicode_tables[key][item]=true}}} -$B.is_unicode_cn=function(i){ -var cn=$B.unicode.Cn -for(var j=0,len=cn.length;j < len;j++){if(i >=cn[j][0]){if(i < cn[j][0]+cn[j][1]){return true}} -return false} -return false} -; -;(function($B){$B.stdlib={} -var pylist=['VFS_import','__future__','_codecs','_codecs_jp','_collections','_collections_abc','_compat_pickle','_compression','_contextvars','_csv','_dummy_thread','_frozen_importlib','_functools','_imp','_io','_markupbase','_multibytecodec','_operator','_py_abc','_pydatetime','_pydecimal','_queue','_signal','_socket','_sre','_struct','_sysconfigdata','_sysconfigdata_0_brython_','_testcapi','_thread','_threading_local','_typing','_weakref','_weakrefset','abc','antigravity','argparse','ast','asyncio','atexit','base64','bdb','binascii','bisect','browser.aio','browser.ajax','browser.highlight','browser.idbcache','browser.indexed_db','browser.local_storage','browser.markdown','browser.object_storage','browser.session_storage','browser.svg','browser.template','browser.timer','browser.ui','browser.webcomponent','browser.websocket','browser.worker','calendar','cmath','cmd','code','codecs','codeop','colorsys','configparser','contextlib','contextvars','copy','copyreg','csv','dataclasses','datetime','decimal','difflib','doctest','enum','errno','external_import','faulthandler','fnmatch','formatter','fractions','functools','gc','genericpath','getopt','getpass','gettext','glob','gzip','heapq','hmac','imp','inspect','interpreter','io','ipaddress','itertools','keyword','linecache','locale','mimetypes','nntplib','ntpath','numbers','opcode','operator','optparse','os','pathlib','pdb','pickle','pkgutil','platform','posixpath','pprint','profile','pwd','py_compile','pydoc','queue','quopri','random','re','re1','reprlib','secrets','select','selectors','shlex','shutil','signal','site','site-packages.__future__','site-packages.docs','site-packages.header','site-packages.test','site-packages.test_sp','socket','sre_compile','sre_constants','sre_parse','stat','statistics','string','stringprep','struct','subprocess','symtable','sys','sysconfig','tabnanny','tarfile','tb','tempfile','test.namespace_pkgs.module_and_namespace_package.a_test','textwrap','this','threading','time','timeit','token','tokenize','traceback','turtle','types','typing','uu','uuid','warnings','weakref','webbrowser','zipfile','zipimport','zlib'] -for(var i=0;i < pylist.length;i++){$B.stdlib[pylist[i]]=['py']} -var js=['_aio','_ajax','_ast','_base64','_binascii','_io_classes','_json','_jsre','_locale','_multiprocessing','_posixsubprocess','_profile','_random','_sre','_sre_utils','_string','_strptime','_svg','_symtable','_tokenize','_webcomponent','_webworker','_zlib_utils','aes','array','builtins','dis','encoding_cp932','hashlib','hmac-md5','hmac-ripemd160','hmac-sha1','hmac-sha224','hmac-sha256','hmac-sha3','hmac-sha384','hmac-sha512','html_parser','marshal','math','md5','modulefinder','pbkdf2','posix','python_re','rabbit','rabbit-legacy','rc4','ripemd160','sha1','sha224','sha256','sha3','sha384','sha512','tripledes','unicodedata'] -for(var i=0;i < js.length;i++){$B.stdlib[js[i]]=['js']} -var pkglist=['browser','browser.widgets','collections','concurrent','concurrent.futures','email','email.mime','encodings','html','http','importlib','importlib.metadata','importlib.resources','json','logging','multiprocessing','multiprocessing.dummy','pydoc_data','site-packages.foobar','site-packages.pkg_resources','site-packages.pkg_resources._vendor','site-packages.pkg_resources._vendor.packaging','site-packages.pkg_resources.extern','site-packages.simpleaio','site-packages.simpy','site-packages.simpy.resources','site-packages.ui','test','test.encoded_modules','test.leakers','test.namespace_pkgs.not_a_namespace_pkg.foo','test.support','test.test_email','test.test_importlib','test.test_importlib.builtin','test.test_importlib.extension','test.test_importlib.frozen','test.test_importlib.import_','test.test_importlib.source','test.test_json','test.tracedmodules','unittest','unittest.test','unittest.test.testmock','urllib'] -for(var i=0;i < pkglist.length;i++){$B.stdlib[pkglist[i]]=['py',true]} -$B.stdlib_module_names=Object.keys($B.stdlib)})(__BRYTHON__) -; -__BRYTHON__.implementation=[3,12,0,'dev',0] -__BRYTHON__.version_info=[3,12,0,'final',0] -__BRYTHON__.compiled_date="2023-10-02 17:16:39.180069" -__BRYTHON__.timestamp=1696259799180 -__BRYTHON__.builtin_module_names=["_aio","_ajax","_ast","_base64","_binascii","_cmath","_io_classes","_json","_jsre","_locale","_multiprocessing","_posixsubprocess","_profile","_random","_sre","_sre1","_sre_utils","_string","_strptime","_svg","_symtable","_tokenize","_webcomponent","_webworker","_zlib_utils","array","builtins","dis","encoding_cp932","hashlib","html_parser","marshal","math","module1","modulefinder","posix","python_re","python_re1","python_re2","unicodedata"] -; -;(function($B){var _b_=$B.builtins -const FSTRING_START='FSTRING_START',FSTRING_MIDDLE='FSTRING_MIDDLE',FSTRING_END='FSTRING_END' -function ord(char){if(char.length==1){return char.charCodeAt(0)} -var code=0x10000 -code+=(char.charCodeAt(0)& 0x03FF)<< 10 -code+=(char.charCodeAt(1)& 0x03FF) -return code} -function $last(array){return array[array.length-1]} -var ops='.,:;+-*/%~^|&=<>[](){}@', -op2=['**','//','>>','<<'],augm_op='+-*/%^|&=<>@',closing={'}':'{',']':'[',')':'('} -function Token(type,string,start,end,line){start=start.slice(0,2) -var res={type,string,start,end,line} -res[0]=type -res[1]=string -res[2]=start -res[3]=end -res[4]=line -return res} -var errors={} -function TokenError(message,position){if(errors.TokenError===undefined){var $error_2={$name:"TokenError",$qualname:"TokenError",$is_class:true,__module__:"tokenize"} -var error=errors.TokenError=$B.$class_constructor("TokenError",$error_2,_b_.tuple.$factory([_b_.Exception]),["_b_.Exception"],[]) -error.__doc__=_b_.None -error.$factory=function(message,position){return{ -__class__:error,msg:message,lineno:position[0],colno:position[1]}} -error.__str__=function(self){var s=self.msg -if(self.lineno > 1){s+=` (${self.lineno}, ${self.colno})`} -return s} -$B.set_func_names(error,"tokenize")} -var exc=errors.TokenError.$factory(message,position) -console.log('error',exc.__class__,exc.args) -return exc} -function _get_line_at(src,pos){ -var end=src.substr(pos).search(/[\r\n]/),line=end==-1 ? src.substr(pos):src.substr(pos,end+1) -return line} -function get_comment(src,pos,line_num,line_start,token_name,line){var start=pos,ix -var t=[] -while(true){if(pos >=src.length ||(ix='\r\n'.indexOf(src[pos]))>-1){t.push(Token('COMMENT',src.substring(start-1,pos),[line_num,start-line_start],[line_num,pos-line_start+1],line)) -if(ix !==undefined){var nb=1 -if(src[pos]=='\r' && src[pos+1]=='\n'){nb++}else if(src[pos]===undefined){ -nb=0} -t.push(Token(token_name,src.substr(pos,nb),[line_num,pos-line_start+1],[line_num,pos-line_start+nb+1],line)) -if(src[pos]===undefined){t.push(Token('NEWLINE','\n',[line_num,pos-line_start+1],[line_num,pos-line_start+2],''))} -pos+=nb} -return{t,pos}} -pos++}} -function test_num(num_type,char){switch(num_type){case '': -return $B.unicode_tables.Nd[ord(char)]!==undefined -case 'x': -return '0123456789abcdef'.indexOf(char.toLowerCase())>-1 -case 'b': -return '01'.indexOf(char)>-1 -case 'o': -return '01234567'.indexOf(char)>-1 -default: -throw Error('unknown num type '+num_type)}} -$B.TokenReader=function(src,filename){this.tokens=[] -this.tokenizer=$B.tokenizer(src,filename) -this.position=0} -$B.TokenReader.prototype.read=function(){if(this.position < this.tokens.length){var res=this.tokens[this.position]}else{var res=this.tokenizer.next() -if(res.done){this.done=true -return} -res=res.value -this.tokens.push(res)} -this.position++ -return res} -$B.TokenReader.prototype.seek=function(position){this.position=position} -function nesting_level(token_modes){var ix=token_modes.length-1 -while(ix >=0){var mode=token_modes[ix] -if(mode.nesting !==undefined){return mode.nesting} -ix--}} -function update_braces(braces,char){if('[({'.indexOf(char)>-1){braces.push(char)}else if('])}'.indexOf(char)>-1){if(braces.length && $last(braces)==closing[char]){braces.pop()}else{braces.push(char)}}} -$B.tokenizer=function*(src,filename,mode){var unicode_tables=$B.unicode_tables,whitespace=' \t\n',operators='*+-/%&^~=<>',allowed_after_identifier=',.()[]:;',string_prefix=/^(r|u|R|U|f|F|fr|Fr|fR|FR|rf|rF|Rf|RF)$/,bytes_prefix=/^(b|B|br|Br|bR|BR|rb|rB|Rb|RB)$/ -src=src.replace(/\r\n/g,'\n'). -replace(/\r/g,'\n') -if(mode !='eval' && ! src.endsWith('\n')){src+='\n'} -var lines=src.split('\n'),linenum=0,line_at={} -for(var i=0,len=src.length;i < len;i++){line_at[i]=linenum -if(src[i]=='\n'){linenum++}} -function get_line_at(pos){return lines[line_at[pos]]+'\n'} -var state="line_start",char,cp,mo,pos=0,start,quote,triple_quote,escaped=false,string_start,string,prefix,name,operator,number,num_type,comment,indent,indents=[],braces=[],line_num=0,line_start=1,token_modes=['regular'],token_mode='regular',save_mode=token_mode,fstring_buffer,fstring_start,fstring_escape,format_specifier,nesting -yield Token('ENCODING','utf-8',[0,0],[0,0],'') -while(pos < src.length){char=src[pos] -cp=src.charCodeAt(pos) -if(cp >=0xD800 && cp <=0xDBFF){ -cp=ord(src.substr(pos,2)) -char=src.substr(pos,2) -pos++} -pos++ -if(token_mode !=save_mode){if(token_mode=='fstring'){fstring_buffer='' -fstring_escape=false}else if(token_mode=='format_specifier'){format_specifier=''}} -save_mode=token_mode -if(token_mode=='fstring'){if(char==token_mode.quote){if(fstring_escape){fstring_buffer+='\\'+char -fstring_escape=false -continue} -if(token_mode.triple_quote){if(src.substr(pos,2)!=token_mode.quote.repeat(2)){fstring_buffer+=char -continue} -char=token_mode.quote.repeat(3) -pos+=2} -if(fstring_buffer.length > 0){ -yield Token(FSTRING_MIDDLE,fstring_buffer,[line_num,fstring_start],[line_num,fstring_start+fstring_buffer.length],line)} -yield Token(FSTRING_END,char,[line_num,fstring_start+fstring_buffer.length],[line_num,fstring_start+fstring_buffer.length+token_mode.quote.length],line) -token_modes.pop() -token_mode=$B.last(token_modes) -state=null -continue}else if(char=='{'){if(src.charAt(pos)=='{'){ -fstring_buffer+=char -pos++ -continue}else{ -yield Token(FSTRING_MIDDLE,fstring_buffer,[line_num,fstring_start],[line_num,fstring_start+fstring_buffer.length],line) -token_mode='regular_within_fstring' -state=null -token_modes.push(token_mode)}}else if(char=='}'){if(src.charAt(pos)=='}'){ -fstring_buffer+=char -pos++ -continue}else{ -yield Token('OP',char,[line_num,pos-line_start],[line_num,pos-line_start+1],line) -console.log('emit closing bracket') -alert() -continue}}else if(char=='\\'){if(token_mode.raw){fstring_buffer+=char+char}else{if(fstring_escape){fstring_buffer+=char} -fstring_escape=! fstring_escape} -continue}else{if(fstring_escape){fstring_buffer+='\\'} -fstring_buffer+=char -fstring_escape=false -continue}}else if(token_mode=='format_specifier'){if(char==quote){if(format_specifier.length > 0){ -yield Token(FSTRING_MIDDLE,format_specifier,[line_num,fstring_start],[line_num,fstring_start+format_specifier.length],line) -token_modes.pop() -token_mode=$B.last(token_modes) -continue}}else if(char=='{'){ -yield Token(FSTRING_MIDDLE,format_specifier,[line_num,fstring_start],[line_num,fstring_start+format_specifier.length],line) -token_mode='regular_within_fstring' -state=null -token_modes.push(token_mode)}else if(char=='}'){ -yield Token(FSTRING_MIDDLE,format_specifier,[line_num,fstring_start],[line_num,fstring_start+format_specifier.length],line) -yield Token('OP',char,[line_num,pos-line_start],[line_num,pos-line_start+1],line) -if(braces.length==0 ||$B.last(braces)!=='{'){throw Error('wrong braces')} -braces.pop() -token_modes.pop() -token_mode=$B.last(token_modes) -continue}else{format_specifier+=char -continue}} -switch(state){case "line_start": -line=get_line_at(pos-1) -line_start=pos -line_num++ -if(mo=/^\f?(\r\n|\r|\n)/.exec(src.substr(pos-1))){ -yield Token('NL',mo[0],[line_num,0],[line_num,mo[0].length],line) -pos+=mo[0].length-1 -continue}else if(char=='#'){comment=get_comment(src,pos,line_num,line_start,'NL',line) -for(var item of comment.t){yield item} -pos=comment.pos -state='line_start' -continue} -indent=0 -if(char==' '){indent=1}else if(char=='\t'){indent=8} -if(indent){while(pos < src.length){if(src[pos]==' '){indent++}else if(src[pos]=='\t'){indent+=8}else{break} -pos++} -if(pos==src.length){ -line_num-- -break} -if(src[pos]=='#'){ -var comment=get_comment(src,pos+1,line_num,line_start,'NL',line) -for(var item of comment.t){yield item} -pos=comment.pos -continue}else if(mo=/^\f?(\r\n|\r|\n)/.exec(src.substr(pos))){ -yield Token('NL','',[line_num,pos-line_start+1],[line_num,pos-line_start+1+mo[0].length],line) -pos+=mo[0].length -continue} -if(indents.length==0 ||indent > $last(indents)){indents.push(indent) -yield Token('INDENT','',[line_num,0],[line_num,indent],line)}else if(indent < $last(indents)){var ix=indents.indexOf(indent) -if(ix==-1){var error=Error('unindent does not match '+ -'any outer indentation level') -error.type='IndentationError' -error.line_num=line_num -throw error } -for(var i=indents.length-1;i > ix;i--){indents.pop() -yield Token('DEDENT','',[line_num,indent],[line_num,indent],line)}} -state=null}else{ -while(indents.length > 0){indents.pop() -yield Token('DEDENT','',[line_num,indent],[line_num,indent],line)} -state=null -pos--} -break -case null: -switch(char){case '"': -case "'": -quote=char -triple_quote=src[pos]==char && src[pos+1]==char -string_start=[line_num,pos-line_start,line_start] -if(triple_quote){pos+=2} -escaped=false -state='STRING' -string="" -prefix="" -break -case '#': -var token_name=braces.length > 0 ? 'NL' :'NEWLINE' -comment=get_comment(src,pos,line_num,line_start,token_name,line) -for(var item of comment.t){yield item} -pos=comment.pos -if(braces.length==0){state='line_start'}else{state=null -line_num++ -line_start=pos+1 -line=get_line_at(pos)} -break -case '0': -state='NUMBER' -number=char -num_type='' -if(src[pos]&& -'xbo'.indexOf(src[pos].toLowerCase())>-1){number+=src[pos] -num_type=src[pos].toLowerCase() -pos++} -break -case '.': -if(src[pos]&& unicode_tables.Nd[ord(src[pos])]){state='NUMBER' -num_type='' -number=char}else{var op=char -while(src[pos]==char){pos++ -op+=char} -var dot_pos=pos-line_start-op.length+1 -while(op.length >=3){ -yield Token('OP','...',[line_num,dot_pos],[line_num,dot_pos+3],line) -op=op.substr(3)} -for(var i=0;i < op.length;i++){yield Token('OP','.',[line_num,dot_pos],[line_num,dot_pos+1],line) -dot_pos++}} -break -case '\\': -if(mo=/^\f?(\r\n|\r|\n)/.exec(src.substr(pos))){if(pos==src.length-1){yield Token('ERRORTOKEN',char,[line_num,pos-line_start],[line_num,pos-line_start+1],line) -var token_name=braces.length > 0 ? 'NL':'NEWLINE' -yield Token(token_name,mo[0],[line_num,pos-line_start],[line_num,pos-line_start+mo[0].length],line)} -line_num++ -pos+=mo[0].length -line_start=pos+1 -line=get_line_at(pos)}else{yield Token('ERRORTOKEN',char,[line_num,pos-line_start],[line_num,pos-line_start+1],line)} -break -case '\n': -case '\r': -var token_name=braces.length > 0 ? 'NL':'NEWLINE' -mo=/^\f?(\r\n|\r|\n)/.exec(src.substr(pos-1)) -yield Token(token_name,mo[0],[line_num,pos-line_start],[line_num,pos-line_start+mo[0].length],line) -pos+=mo[0].length-1 -if(token_name=='NEWLINE'){state='line_start'}else{line_num++ -line_start=pos+1 -line=get_line_at(pos)} -break -default: -if(unicode_tables.XID_Start[ord(char)]){ -state='NAME' -name=char}else if(unicode_tables.Nd[ord(char)]){state='NUMBER' -num_type='' -number=char}else if(ops.indexOf(char)>-1){if(token_mode=='regular_within_fstring' && -(char==':' ||char=='}')){if(char==':'){ -if(nesting_level(token_modes)==braces.length-1){yield Token('OP',char,[line_num,pos-line_start-op.length+1],[line_num,pos-line_start+1],line) -token_modes.pop() -token_mode='format_specifier' -token_modes.push(token_mode) -continue}}else{yield Token('OP',char,[line_num,pos-line_start-op.length+1],[line_num,pos-line_start+1],line) -token_modes.pop() -token_mode=token_modes[token_modes.length-1] -if(braces.length==0 ||$B.last(braces)!=='{'){throw Error('wrong braces')} -braces.pop() -continue}} -var op=char -if(op2.indexOf(char+src[pos])>-1){op=char+src[pos] -pos++} -if(src[pos]=='=' &&(op.length==2 || -augm_op.indexOf(op)>-1)){op+=src[pos] -pos++}else if((char=='-' && src[pos]=='>')|| -(char==':' && src[pos]=='=')){op+=src[pos] -pos++} -if('[({'.indexOf(char)>-1){braces.push(char)}else if('])}'.indexOf(char)>-1){if(braces && $last(braces)==closing[char]){braces.pop()}else{braces.push(char)}} -yield Token('OP',op,[line_num,pos-line_start-op.length+1],[line_num,pos-line_start+1],line)}else if(char=='!'){if(src[pos]=='='){yield Token('OP','!=',[line_num,pos-line_start],[line_num,pos-line_start+2],line) -pos++}else{yield Token('OP',char,[line_num,pos-line_start],[line_num,pos-line_start+1],line)}}else if(char==' ' ||char=='\t'){}else{ -yield Token('ERRORTOKEN',char,[line_num,pos-line_start],[line_num,pos-line_start+1],line)}} -break -case 'NAME': -if(unicode_tables.XID_Continue[ord(char)]){name+=char}else if(char=='"' ||char=="'"){if(string_prefix.exec(name)||bytes_prefix.exec(name)){ -state='STRING' -quote=char -triple_quote=src[pos]==quote && src[pos+1]==quote -prefix=name -if(triple_quote){pos+=2} -if(prefix.toLowerCase().indexOf('f')>-1){fstring_start=pos-line_start-name.length -token_mode=new String('fstring') -token_mode.nesting=braces.length -token_mode.quote=quote -token_mode.triple_quote=triple_quote -token_mode.raw=prefix.toLowerCase().indexOf('r')>-1 -token_modes.push(token_mode) -var s=triple_quote ? quote.repeat(3):quote -yield Token(FSTRING_START,prefix+s,[line_num,fstring_start],[line_num,pos-line_start],line) -continue} -escaped=false -string_start=[line_num,pos-line_start-name.length,line_start] -string=''}else{yield Token('NAME',name,[line_num,pos-line_start-name.length],[line_num,pos-line_start],line) -state=null -pos--}}else{yield Token('NAME',name,[line_num,pos-line_start-name.length],[line_num,pos-line_start],line) -state=null -pos--} -break -case 'STRING': -switch(char){case quote: -if(! escaped){ -var string_line=line -if(line_num > string_start[0]){string_line=src.substring( -string_start[2]-1,pos+2)} -if(! triple_quote){var full_string=prefix+quote+string+ -quote -yield Token('STRING',full_string,string_start,[line_num,pos-line_start+1],string_line) -state=null}else if(char+src.substr(pos,2)== -quote.repeat(3)){var full_string=prefix+quote.repeat(3)+ -string+quote.repeat(3) -triple_quote_line=line -yield Token('STRING',full_string,string_start,[line_num,pos-line_start+3],string_line) -pos+=2 -state=null}else{string+=char}}else{string+=char} -escaped=false -break -case '\r': -case '\n': -if(! escaped && ! triple_quote){ -var quote_pos=string_start[1]+line_start-1,pos=quote_pos -while(src[pos-1]==' '){pos--} -while(pos < quote_pos){yield Token('ERRORTOKEN',' ',[line_num,pos-line_start+1],[line_num,pos-line_start+2],line) -pos++} -pos++ -yield Token('ERRORTOKEN',quote,[line_num,pos-line_start],[line_num,pos-line_start+1],line) -state=null -pos++ -break} -string+=char -line_num++ -line_start=pos+1 -if(char=='\r' && src[pos]=='\n'){string+=src[pos] -line_start++ -pos++} -line=get_line_at(pos) -escaped=false -break -case '\\': -string+=char -escaped=! escaped -break -default: -escaped=false -string+=char -break} -break -case 'NUMBER': -if(test_num(num_type,char)){number+=char}else if(char=='_' && ! number.endsWith('.')){if(number.endsWith('_')){throw SyntaxError('consecutive _ in number')}else if(src[pos]===undefined || -! test_num(num_type,src[pos])){ -yield Token('NUMBER',number,[line_num,pos-line_start-number.length],[line_num,pos-line_start],line) -state=null -pos--}else{number+=char}}else if(char=='.' && number.indexOf(char)==-1){number+=char}else if(char.toLowerCase()=='e' && -number.toLowerCase().indexOf('e')==-1){if('+-'.indexOf(src[pos])>-1 || -unicode_tables.Nd[ord(src[pos])]){number+=char}else{yield Token('NUMBER',number,[line_num,pos-line_start-number.length],[line_num,pos-line_start],line) -state=null -pos--}}else if((char=='+' ||char=='-')&& -number.toLowerCase().endsWith('e')){number+=char}else if(char.toLowerCase()=='j'){ -number+=char -yield Token('NUMBER',number,[line_num,pos-line_start-number.length+1],[line_num,pos-line_start+1],line) -state=null}else{yield Token('NUMBER',number,[line_num,pos-line_start-number.length],[line_num,pos-line_start],line) -state=null -pos--} -break}} -if(braces.length > 0){console.log('braces',braces) -throw SyntaxError('EOF in multi-line statement')} -switch(state){case 'line_start': -line_num++ -break -case 'NAME': -yield Token('NAME',name,[line_num,pos-line_start-name.length+1],[line_num,pos-line_start+1],line) -break -case 'NUMBER': -yield Token('NUMBER',number,[line_num,pos-line_start-number.length+1],[line_num,pos-line_start+1],line) -break -case 'STRING': -var msg=`unterminated ${triple_quote ? 'triple-quoted ' : ''}`+ -`string literal (detected at line ${line_num})` -throw SyntaxError(msg)} -if(! src.endsWith('\n')&& state !=line_start){yield Token('NEWLINE','',[line_num,pos-line_start+1],[line_num,pos-line_start+1],line+'\n') -line_num++} -while(indents.length > 0){indents.pop() -yield Token('DEDENT','',[line_num,0],[line_num,0],'')} -yield Token('ENDMARKER','',[line_num,0],[line_num,0],'')}})(__BRYTHON__) -; - -(function($B){ -var binary_ops={'+':'Add','-':'Sub','*':'Mult','/':'Div','//':'FloorDiv','%':'Mod','**':'Pow','<<':'LShift','>>':'RShift','|':'BitOr','^':'BitXor','&':'BitAnd','@':'MatMult'} -var boolean_ops={'and':'And','or':'Or'} -var comparison_ops={'==':'Eq','!=':'NotEq','<':'Lt','<=':'LtE','>':'Gt','>=':'GtE','is':'Is','is_not':'IsNot','in':'In','not_in':'NotIn'} -var unary_ops={unary_inv:'Invert',unary_pos:'UAdd',unary_neg:'USub',unary_not:'Not'} -var op_types=$B.op_types=[binary_ops,boolean_ops,comparison_ops,unary_ops] -var _b_=$B.builtins -var ast=$B.ast={} -for(var kl in $B.ast_classes){var args=$B.ast_classes[kl],body='' -if(typeof args=="string"){if(args.length > 0){for(var arg of args.split(',')){if(arg.endsWith('*')){arg=arg.substr(0,arg.length-1) -body+=` this.${arg} = ${arg} === undefined ? [] : ${arg}\n`}else if(arg.endsWith('?')){arg=arg.substr(0,arg.length-1) -body+=` this.${arg} = ${arg}\n`}else{body+=` this.${arg} = ${arg}\n`}}} -var arg_list=args.replace(/[*?]/g,'').split(',') -ast[kl]=Function(...arg_list,body) -ast[kl]._fields=args.split(',')}else{ast[kl]=args.map(x=> ast[x])} -ast[kl].$name=kl} -$B.ast_js_to_py=function(obj){$B.create_python_ast_classes() -if(obj===undefined){return _b_.None}else if(Array.isArray(obj)){return obj.map($B.ast_js_to_py)}else{var class_name=obj.constructor.$name,py_class=$B.python_ast_classes[class_name],py_ast_obj={__class__:py_class} -if(py_class===undefined){return obj} -for(var field of py_class._fields){py_ast_obj[field]=$B.ast_js_to_py(obj[field])} -py_ast_obj._attributes=$B.fast_tuple([]) -for(var loc of['lineno','col_offset','end_lineno','end_col_offset']){if(obj[loc]!==undefined){py_ast_obj[loc]=obj[loc] -py_ast_obj._attributes.push(loc)}} -return py_ast_obj}} -$B.ast_py_to_js=function(obj){if(obj===undefined ||obj===_b_.None){return undefined}else if(Array.isArray(obj)){return obj.map($B.ast_py_to_js)}else if(typeof obj=="string"){return obj}else{var class_name=$B.class_name(obj),js_class=$B.ast[class_name] -if(js_class===undefined){return obj} -var js_ast_obj=new js_class() -for(var field of js_class._fields){if(field.endsWith('?')||field.endsWith('*')){field=field.substr(0,field.length-1)} -js_ast_obj[field]=$B.ast_py_to_js(obj[field])} -for(var loc of['lineno','col_offset','end_lineno','end_col_offset']){if(obj[loc]!==undefined){js_ast_obj[loc]=obj[loc]}} -return js_ast_obj}} -$B.create_python_ast_classes=function(){if($B.python_ast_classes){return} -$B.python_ast_classes={} -for(var klass in $B.ast_classes){$B.python_ast_classes[klass]=(function(kl){var _fields,raw_fields -if(typeof $B.ast_classes[kl]=="string"){if($B.ast_classes[kl]==''){raw_fields=_fields=[]}else{raw_fields=$B.ast_classes[kl].split(',') -_fields=raw_fields.map(x=> -(x.endsWith('*')||x.endsWith('?'))? -x.substr(0,x.length-1):x)}} -var cls=$B.make_class(kl),$defaults={},slots={},nb_args=0 -if(raw_fields){for(var i=0,len=_fields.length;i < len;i++){var f=_fields[i],rf=raw_fields[i] -nb_args++ -slots[f]=null -if(rf.endsWith('*')){$defaults[f]=[]}else if(rf.endsWith('?')){$defaults[f]=_b_.None}}} -cls.$factory=function(){var $=$B.args(klass,nb_args,$B.clone(slots),Object.keys(slots),arguments,$B.clone($defaults),null,'kw') -var res={__class__:cls,_attributes:$B.fast_tuple([])} -for(var key in $){if(key=='kw'){for(var key in $.kw.$jsobj){res[key]=$.kw.$jsobj[key]}}else{res[key]=$[key]}} -if(klass=="Constant"){res.value=$B.AST.$convert($.value)} -return res} -if(_fields){cls._fields=_fields} -cls.__mro__=[$B.AST,_b_.object] -cls.__module__='ast' -cls.__dict__=$B.empty_dict() -if(raw_fields){for(var i=0,len=raw_fields.length;i < len;i++){var raw_field=raw_fields[i] -if(raw_field.endsWith('?')){_b_.dict.$setitem(cls.__dict__,_fields[i],_b_.None)}}} -return cls})(klass)}} -var op2ast_class=$B.op2ast_class={},ast_types=[ast.BinOp,ast.BoolOp,ast.Compare,ast.UnaryOp] -for(var i=0;i < 4;i++){for(var op in op_types[i]){op2ast_class[op]=[ast_types[i],ast[op_types[i][op]]]}}})(__BRYTHON__) -; - -;(function($B){$B.produce_ast=false -Number.isInteger=Number.isInteger ||function(value){return typeof value==='number' && -isFinite(value)&& -Math.floor(value)===value}; -Number.isSafeInteger=Number.isSafeInteger ||function(value){return Number.isInteger(value)&& Math.abs(value)<=Number.MAX_SAFE_INTEGER;}; -var js,res,$op -var _b_=$B.builtins -var _window -if($B.isNode){_window={location:{href:'',origin:'',pathname:''}}}else{ -_window=self} -$B.parser={} -var clone=$B.clone=function(obj){var res={} -for(var attr in obj){res[attr]=obj[attr]} -return res} -$B.last=function(table){if(table===undefined){console.log($B.frames_stack.slice())} -return table[table.length-1]} -$B.list2obj=function(list,value){var res={},i=list.length -if(value===undefined){value=true} -while(i--> 0){res[list[i]]=value} -return res} -$B.op2method={operations:{"**":"pow","//":"floordiv","<<":"lshift",">>":"rshift","+":"add","-":"sub","*":"mul","/":"truediv","%":"mod","@":"matmul" },augmented_assigns:{"//=":"ifloordiv",">>=":"irshift","<<=":"ilshift","**=":"ipow","+=":"iadd","-=":"isub","*=":"imul","/=":"itruediv","%=":"imod","&=":"iand","|=":"ior","^=":"ixor","@=":"imatmul"},binary:{"&":"and","|":"or","~":"invert","^":"xor"},comparisons:{"<":"lt",">":"gt","<=":"le",">=":"ge","==":"eq","!=":"ne"},boolean:{"or":"or","and":"and","in":"in","not":"not","is":"is"},subset:function(){var res={},keys=[] -if(arguments[0]=="all"){keys=Object.keys($B.op2method) -keys.splice(keys.indexOf("subset"),1)}else{for(var arg of arguments){keys.push(arg)}} -for(var key of keys){var ops=$B.op2method[key] -if(ops===undefined){throw Error(key)} -for(var attr in ops){res[attr]=ops[attr]}} -return res}} -var $operators=$B.op2method.subset("all") -$B.method_to_op={} -for(var category in $B.op2method){for(var op in $B.op2method[category]){var method=`__${$B.op2method[category][op]}__` -$B.method_to_op[method]=op}} -var $augmented_assigns=$B.augmented_assigns=$B.op2method.augmented_assigns -var noassign=$B.list2obj(['True','False','None','__debug__']) -var $op_order=[['or'],['and'],['not'],['in','not_in'],['<','<=','>','>=','!=','==','is','is_not'],['|'],['^'],['&'],['>>','<<'],['+','-'],['*','@','/','//','%'],['unary_neg','unary_inv','unary_pos'],['**'] -] -var $op_weight={},$weight=1 -for(var _tmp of $op_order){for(var item of _tmp){$op_weight[item]=$weight} -$weight++} -var ast=$B.ast,op2ast_class=$B.op2ast_class -function ast_body(block_ctx){ -var body=[] -for(var child of block_ctx.node.children){var ctx=child.C.tree[0] -if(['single_kw','except','decorator'].indexOf(ctx.type)>-1 || -(ctx.type=='condition' && ctx.token=='elif')){continue} -var child_ast=ctx.ast() -if(ast.expr.indexOf(child_ast.constructor)>-1){child_ast=new ast.Expr(child_ast) -copy_position(child_ast,child_ast.value)} -body.push(child_ast)} -return body} -var ast_dump=$B.ast_dump=function(tree,indent){indent=indent ||0 -if(tree===_b_.None){ -return 'None'}else if(typeof tree=='string'){return `'${tree}'`}else if(typeof tree=='number'){return tree+''}else if(tree.imaginary){return tree.value+'j'}else if(Array.isArray(tree)){if(tree.length==0){return '[]'} -res='[\n' -var items=[] -for(var x of tree){try{items.push(ast_dump(x,indent+1))}catch(err){console.log('error',tree) -console.log('for item',x) -throw err}} -res+=items.join(',\n') -return res+']'}else if(tree.$name){return tree.$name+'()'}else if(tree instanceof ast.MatchSingleton){return `MatchSingleton(value=${$B.AST.$convert(tree.value)})`}else if(tree instanceof ast.Constant){var value=tree.value -if(value.imaginary){return `Constant(value=${_b_.repr(value.value)}j)`} -return `Constant(value=${$B.AST.$convert(value)})`} -var proto=Object.getPrototypeOf(tree).constructor -var res=' ' .repeat(indent)+proto.$name+'(' -if($B.ast_classes[proto.$name]===undefined){console.log('no ast class',proto)} -var attr_names=$B.ast_classes[proto.$name].split(','),attrs=[] -attr_names=attr_names.map(x=>(x.endsWith('*')||x.endsWith('?'))? -x.substr(0,x.length-1):x) -if([ast.Name].indexOf(proto)>-1){for(var attr of attr_names){if(tree[attr]!==undefined){attrs.push(`${attr}=${ast_dump(tree[attr])}`)}} -return res+attrs.join(', ')+')'} -for(var attr of attr_names){if(tree[attr]!==undefined){var value=tree[attr] -attrs.push(attr+'='+ -ast_dump(tree[attr],indent+1).trimStart())}} -if(attrs.length > 0){res+='\n' -res+=attrs.map(x=> ' '.repeat(indent+1)+x).join(',\n')} -res+=')' -return res} -var CO_FUTURE_ANNOTATIONS=0x1000000 -function get_line(filename,lineno){var src=$B.file_cache[filename],line=_b_.None -if(src !==undefined){var lines=src.split('\n') -line=lines[lineno-1]} -return line} -var VALID_FUTURES=["nested_scopes","generators","division","absolute_import","with_statement","print_function","unicode_literals","barry_as_FLUFL","generator_stop","annotations"] -$B.future_features=function(mod,filename){var features=0 -var i=0; -if(mod.body[0]instanceof $B.ast.Expr){if(mod.body[0].value instanceof $B.ast.Constant && -typeof mod.body[0].value.value=="string"){ -i++}} -while(i < mod.body.length){var child=mod.body[i] -if(child instanceof $B.ast.ImportFrom && child.module=='__future__'){ -for(var alias of child.names){var name=alias.name -if(name=="braces"){raise_error_known_location(_b_.SyntaxError,filename,alias.lineno,alias.col_offset,alias.end_lineno,alias.end_col_offset,get_line(filename,child.lineno),"not a chance")}else if(name=="annotations"){features |=CO_FUTURE_ANNOTATIONS}else if(VALID_FUTURES.indexOf(name)==-1){raise_error_known_location(_b_.SyntaxError,filename,alias.lineno,alias.col_offset,alias.end_lineno,alias.end_col_offset,get_line(filename,child.lineno),`future feature ${name} is not defined`)}} -i++}else{break}} -return{features}} -function set_position(ast_obj,position,end_position){ast_obj.lineno=position.start[0] -ast_obj.col_offset=position.start[1] -position=end_position ||position -ast_obj.end_lineno=position.end[0] -ast_obj.end_col_offset=position.end[1]} -function copy_position(target,origin){target.lineno=origin.lineno -target.col_offset=origin.col_offset -target.end_lineno=origin.end_lineno -target.end_col_offset=origin.end_col_offset} -function first_position(C){var ctx=C -while(ctx.tree && ctx.tree.length > 0){ctx=ctx.tree[0]} -return ctx.position} -function last_position(C){var ctx=C -while(ctx.tree && ctx.tree.length > 0){ctx=$B.last(ctx.tree) -if(ctx.end_position){return ctx.end_position}} -return ctx.end_position ||ctx.position} -function raise_error_known_location(type,filename,lineno,col_offset,end_lineno,end_col_offset,line,message){var exc=type.$factory(message) -exc.filename=filename -exc.lineno=lineno -exc.offset=col_offset+1 -exc.end_lineno=end_lineno -exc.end_offset=end_col_offset+1 -exc.text=line -exc.args[1]=$B.fast_tuple([filename,exc.lineno,exc.offset,exc.text,exc.end_lineno,exc.end_offset]) -exc.$stack=$B.frames_stack.slice() -throw exc} -$B.raise_error_known_location=raise_error_known_location -function raise_syntax_error_known_range(C,a,b,msg){ -raise_error_known_location(_b_.SyntaxError,get_module(C).filename,a.start[0],a.start[1],b.end[0],b.end[1],a.line,msg)} -function raise_error(errtype,C,msg,token){var filename=get_module(C).filename -token=token ||$token.value -msg=msg ||'invalid syntax' -if(msg.startsWith('(')){msg='invalid syntax '+msg} -msg=msg.trim() -raise_error_known_location(errtype,filename,token.start[0],token.start[1],token.end[0],token.end[1]-1,token.line,msg)} -function raise_syntax_error(C,msg,token){raise_error(_b_.SyntaxError,C,msg,token)} -function raise_indentation_error(C,msg,indented_node){ -if(indented_node){ -var type=indented_node.C.tree[0].type,token=indented_node.C.tree[0].token,lineno=indented_node.line_num -switch(type){case 'class': -type='class definition' -break -case 'condition': -type=`'${token}' statement` -break -case 'def': -type='function definition' -break -case 'case': -case 'except': -case 'for': -case 'match': -case 'try': -case 'while': -case 'with': -type=`'${type}' statement` -break -case 'single_kw': -type=`'${token}' statement` -break} -msg+=` after ${type} on line ${lineno}`} -raise_error(_b_.IndentationError,C,msg)} -function check_assignment(C,kwargs){ -function in_left_side(C,assign_type){var ctx=C -while(ctx){if(ctx.parent && ctx.parent.type==assign_type && -ctx===ctx.parent.tree[0]){return true} -ctx=ctx.parent}} -var once,action='assign to',augmented=false -if(kwargs){once=kwargs.once -action=kwargs.action ||action -augmented=kwargs.augmented===undefined ? false :kwargs.augmented} -var ctx=C,forbidden=['assert','import','raise','return','decorator','comprehension','await'] -if(action !='delete'){ -forbidden.push('del')} -function report(wrong_type,a,b){a=a ||C.position -b=b ||$token.value -if(augmented){raise_syntax_error_known_range( -C,a,b,`'${wrong_type}' is an illegal expression `+ -'for augmented assignment')}else{var msg=wrong_type -if(Array.isArray(msg)){ -msg=msg[0]}else if($token.value.string=='=' && $token.value.type=='OP'){if(parent_match(C,{type:'augm_assign'})){ -raise_syntax_error(C)} -if(parent_match(C,{type:'assign'})){raise_syntax_error_known_range( -C,a,b,`invalid syntax. Maybe you meant '==' or ':=' instead of '='?`)} -if(! parent_match(C,{type:'list_or_tuple'})){msg+=" here. Maybe you meant '==' instead of '='?"}} -raise_syntax_error_known_range( -C,a,b,`cannot ${action} ${msg}`)}} -if(C.type=='expr'){var upper_expr=C -var ctx=C -while(ctx.parent){if(ctx.parent.type=='expr'){upper_expr=ctx.parent} -ctx=ctx.parent}} -if(in_left_side(C,'augm_assign')){raise_syntax_error(C)} -if(C.type=='target_list'){for(var target of C.tree){check_assignment(target,{action:'assign to'})} -return} -ctx=C -while(ctx){if(forbidden.indexOf(ctx.type)>-1){raise_syntax_error(C,`(assign to ${ctx.type})`)}else if(ctx.type=="expr"){if(parent_match(ctx,{type:'annotation'})){return true} -if(ctx.parent.type=='yield'){raise_syntax_error_known_range(ctx,ctx.parent.position,last_position(ctx),"assignment to yield expression not possible")} -var assigned=ctx.tree[0] -if(assigned.type=="op"){if($B.op2method.comparisons[ctx.tree[0].op]!==undefined){if(parent_match(ctx,{type:'target_list'})){ -raise_syntax_error(C)} -report('comparison',assigned.tree[0].position,last_position(assigned))}else{report('expression',assigned.tree[0].position,last_position(assigned))}}else if(assigned.type=='attribute' && -parent_match(ctx,{type:'condition'})){report('attribute',ctx.position,last_position(C))}else if(assigned.type=='sub' && -parent_match(ctx,{type:'condition'})){report('subscript',ctx.position,last_position(C))}else if(assigned.type=='unary'){report('expression',assigned.position,last_position(assigned))}else if(assigned.type=='call'){report('function call',assigned.position,assigned.end_position)}else if(assigned.type=='id'){var name=assigned.value -if(['None','True','False','__debug__'].indexOf(name)>-1){ -if(name=='__debug__' && augmented){ -$token.value=assigned.position -raise_syntax_error(assigned,'cannot assign to __debug__')} -report([name])} -if(noassign[name]===true){report(keyword)}}else if(['str','int','float','complex'].indexOf(assigned.type)>-1){if(ctx.parent.type !='op'){report('literal')}}else if(assigned.type=="ellipsis"){report('ellipsis')}else if(assigned.type=='genexpr'){report(['generator expression'])}else if(assigned.type=='starred'){if(action=='delete'){report('starred',assigned.position,last_position(assigned))} -check_assignment(assigned.tree[0],{action,once:true})}else if(assigned.type=='named_expr'){if(! assigned.parenthesized){report('named expression')}else if(ctx.parent.type=='node'){raise_syntax_error_known_range( -C,assigned.target.position,last_position(assigned),"cannot assign to named expression here. "+ -"Maybe you meant '==' instead of '='?")}else if(action=='delete'){report('named expression',assigned.position,last_position(assigned))}}else if(assigned.type=='list_or_tuple'){for(var item of ctx.tree){check_assignment(item,{action,once:true})}}else if(assigned.type=='dict_or_set'){if(assigned.closed){report(assigned.real=='set' ? 'set display' :'dict literal',ctx.position,last_position(assigned))}}else if(assigned.type=='lambda'){report('lambda')}else if(assigned.type=='ternary'){report(['conditional expression'])}else if(assigned.type=='JoinedStr'){report('f-string expression',assigned.position,last_position(assigned))}}else if(ctx.type=='list_or_tuple'){for(var item of ctx.tree){check_assignment(item,{action,once:true})}}else if(ctx.type=='ternary'){report(['conditional expression'],ctx.position,last_position(C))}else if(ctx.type=='op'){var a=ctx.tree[0].position,last=$B.last(ctx.tree).tree[0],b=last.end_position ||last.position -if($B.op2method.comparisons[ctx.op]!==undefined){if(parent_match(C,{type:'target_list'})){ -raise_syntax_error(C)} -report('comparison',a,b)}else{report('expression',a,b)}}else if(ctx.type=='yield'){report('yield expression')}else if(ctx.comprehension){break} -if(once){break} -ctx=ctx.parent}} -function remove_abstract_expr(tree){if(tree.length > 0 && $B.last(tree).type=='abstract_expr'){tree.pop()}} -$B.format_indent=function(js,indent){ -var indentation=' ',lines=js.split('\n'),level=indent,res='',last_is_closing_brace=false,last_is_backslash=false,last_is_var_and_comma=false -for(var i=0,len=lines.length;i < len;i++){var line=lines[i],add_closing_brace=false,add_spaces=true -if(last_is_backslash){add_spaces=false}else if(last_is_var_and_comma){line=' '+line.trim()}else{line=line.trim()} -if(add_spaces && last_is_closing_brace && -(line.startsWith('else')|| -line.startsWith('catch')|| -line.startsWith('finally'))){res=res.substr(0,res.length-1) -add_spaces=false} -last_is_closing_brace=line.endsWith('}') -if(line.startsWith('}')){level--}else if(line.endsWith('}')){line=line.substr(0,line.length-1) -add_closing_brace=true} -if(level < 0){if($B.get_option('debug')> 2){console.log('wrong js indent') -console.log(res)} -level=0} -try{res+=(add_spaces ? indentation.repeat(level):'')+line+'\n'}catch(err){console.log(res) -throw err} -if(line.endsWith('{')){level++}else if(add_closing_brace){level-- -if(level < 0){level=0} -try{res+=indentation.repeat(level)+'}\n'}catch(err){console.log(res) -throw err}} -last_is_backslash=line.endsWith('\\') -last_is_var_and_comma=line.endsWith(',')&& -(line.startsWith('var ')||last_is_var_and_comma)} -return res} -function show_line(ctx){ -var lnum=get_node(ctx).line_num,src=get_module(ctx).src -console.log('this',ctx,'\nline',lnum,src.split('\n')[lnum-1])} -var $Node=$B.parser.$Node=function(type){this.type=type -this.children=[]} -$Node.prototype.add=function(child){ -this.children[this.children.length]=child -child.parent=this -child.module=this.module} -$Node.prototype.ast=function(){var root_ast=new ast.Module([],[]) -root_ast.lineno=this.line_num -for(var node of this.children){var t=node.C.tree[0] -if(['single_kw','except','decorator'].indexOf(t.type)>-1 || -(t.type=='condition' && t.token=='elif')){continue} -var node_ast=node.C.tree[0].ast() -if(ast.expr.indexOf(node_ast.constructor)>-1){node_ast=new ast.Expr(node_ast) -copy_position(node_ast,node_ast.value)} -root_ast.body.push(node_ast)} -if(this.mode=='eval'){if(root_ast.body.length > 1 || -!(root_ast.body[0]instanceof $B.ast.Expr)){raise_syntax_error(this.children[0].C,'eval() argument must be an expression')} -root_ast=new $B.ast.Expression(root_ast.body[0].value) -copy_position(root_ast,root_ast.body)} -return root_ast} -$Node.prototype.insert=function(pos,child){ -this.children.splice(pos,0,child) -child.parent=this -child.module=this.module} -$Node.prototype.show=function(indent){ -var res='' -if(this.type==='module'){for(var child of this.children){res+=child.show(indent)} -return res} -indent=indent ||0 -res+=' '.repeat(indent) -res+=this.C -if(this.children.length > 0){res+='{'} -res+='\n' -for(var child of this.children){res+=child.show(indent+4)} -if(this.children.length > 0){res+=' '.repeat(indent) -res+='}\n'} -return res} -var AbstractExprCtx=$B.parser.AbstractExprCtx=function(C,with_commas){this.type='abstract_expr' -this.with_commas=with_commas -this.parent=C -this.tree=[] -this.position=$token.value -C.tree.push(this)} -AbstractExprCtx.prototype.transition=function(token,value){var C=this -var packed=C.packed,is_await=C.is_await,position=C.position -switch(token){case 'await': -case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case 'ellipsis': -case '[': -case '(': -case '{': -case '.': -case 'not': -case 'lambda': -case 'yield': -C.parent.tree.pop() -var commas=C.with_commas,star_position -if(C.packed){star_position=C.star_position} -C=C.parent -C.packed=packed -C.is_await=is_await -if(C.position===undefined){C.position=$token.value} -if(star_position){C.star_position=star_position}} -switch(token){case 'await': -return new AbstractExprCtx(new AwaitCtx( -new ExprCtx(C,'await',false)),false) -case 'id': -return new IdCtx(new ExprCtx(C,'id',commas),value) -case 'str': -return new StringCtx(new ExprCtx(C,'str',commas),value) -case 'JoinedStr': -return new FStringCtx(new ExprCtx(C,'str',commas),value) -case 'bytes': -return new StringCtx(new ExprCtx(C,'bytes',commas),value) -case 'int': -return new NumberCtx('int',new ExprCtx(C,'int',commas),value) -case 'float': -return new NumberCtx('float',new ExprCtx(C,'float',commas),value) -case 'imaginary': -return new NumberCtx('imaginary',new ExprCtx(C,'imaginary',commas),value) -case '(': -return new ListOrTupleCtx( -new ExprCtx(C,'tuple',commas),'tuple') -case '[': -return new ListOrTupleCtx( -new ExprCtx(C,'list',commas),'list') -case '{': -return new AbstractExprCtx( -new DictOrSetCtx( -new ExprCtx(C,'dict_or_set',commas)),false) -case 'ellipsis': -return new EllipsisCtx( -new ExprCtx(C,'ellipsis',commas)) -case 'not': -if(C.type=='op' && C.op=='is'){ -C.op='is_not' -return new AbstractExprCtx(C,false)} -return new AbstractExprCtx( -new NotCtx(new ExprCtx(C,'not',commas)),false) -case 'lambda': -return new LambdaCtx(new ExprCtx(C,'lambda',commas)) -case 'op': -var tg=value -if(C.parent.type=='op' && '+-~'.indexOf(tg)==-1){raise_syntax_error(C)} -switch(tg){case '*': -C.parent.tree.pop() -var commas=C.with_commas -C=C.parent -C.position=$token.value -return new AbstractExprCtx( -new StarredCtx( -new ExprCtx(C,'expr',commas)),false) -case '**': -C.parent.tree.pop() -var commas=C.with_commas -C=C.parent -C.position=$token.value -return new AbstractExprCtx( -new KwdCtx( -new ExprCtx(C,'expr',commas)),false) -case '-': -case '~': -case '+': -C.parent.tree.pop() -return new AbstractExprCtx( -new UnaryCtx( -new ExprCtx(C.parent,'unary',false),tg),false -) -case 'not': -C.parent.tree.pop() -var commas=C.with_commas -C=C.parent -return new NotCtx( -new ExprCtx(C,'not',commas)) -case '...': -return new EllipsisCtx(new ExprCtx(C,'ellipsis',commas))} -raise_syntax_error(C) -case 'in': -if(C.parent.type=='op' && C.parent.op=='not'){C.parent.op='not_in' -return C} -raise_syntax_error(C) -case '=': -if(C.parent.type=="yield"){raise_syntax_error(C,"assignment to yield expression not possible",C.parent.position,)} -raise_syntax_error(C) -case 'yield': -return new AbstractExprCtx(new YieldCtx(C),true) -case ':': -if(C.parent.type=="sub" || -(C.parent.type=="list_or_tuple" && -C.parent.parent.type=="sub")){return new AbstractExprCtx(new SliceCtx(C.parent),false)} -return transition(C.parent,token,value) -case ')': -case ',': -switch(C.parent.type){case 'list_or_tuple': -case 'slice': -case 'call_arg': -case 'op': -case 'yield': -break -case 'match': -if(token==','){ -C.parent.tree.pop() -var tuple=new ListOrTupleCtx(C.parent,'tuple') -tuple.implicit=true -tuple.has_comma=true -tuple.tree=[C] -C.parent=tuple -return tuple} -break -default: -raise_syntax_error(C)} -break -case '.': -case 'assert': -case 'break': -case 'class': -case 'continue': -case 'def': -case 'except': -case 'for': -case 'while': -case 'in': -case 'return': -case 'try': -raise_syntax_error(C) -break} -return transition(C.parent,token,value)} -var AliasCtx=$B.parser.AliasCtx=function(C){ -this.type='ctx_manager_alias' -this.parent=C -this.tree=[] -C.tree[C.tree.length-1].alias=this} -AliasCtx.prototype.transition=function(token,value){var C=this -switch(token){case ',': -case ')': -case ':': -check_assignment(C.tree[0]) -C.parent.set_alias(C.tree[0].tree[0]) -return transition(C.parent,token,value) -case 'eol': -$token.value=last_position(C) -raise_syntax_error(C,"expected ':'")} -raise_syntax_error(C)} -var AnnotationCtx=$B.parser.AnnotationCtx=function(C){ -this.type='annotation' -this.parent=C -this.tree=[] -C.annotation=this -var scope=get_scope(C) -if(scope.ntype=="def" && C.tree && C.tree.length > 0 && -C.tree[0].type=="id"){var name=C.tree[0].value -scope.annotations=scope.annotations ||new Set() -scope.annotations.add(name)}} -AnnotationCtx.prototype.transition=function(token,value){var C=this -if(token=="eol" && C.tree.length==1 && -C.tree[0].tree.length==0){raise_syntax_error(C)}else if(token==':' && C.parent.type !="def"){raise_syntax_error(C,"more than one annotation")}else if(token=="augm_assign"){raise_syntax_error(C,"augmented assign as annotation")}else if(token=="op"){raise_syntax_error(C,"operator as annotation")} -return transition(C.parent,token)} -var AssertCtx=$B.parser.AssertCtx=function(C){ -this.type='assert' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this} -AssertCtx.prototype.ast=function(){ -var msg=this.tree[1],ast_obj=new ast.Assert(this.tree[0].ast(),msg===undefined ? msg :msg.ast()) -set_position(ast_obj,this.position) -return ast_obj} -AssertCtx.prototype.transition=function(token,value){var C=this -if(token==","){if(this.tree.length > 1){raise_syntax_error(C,'(too many commas after assert)')} -return new AbstractExprCtx(this,false)} -if(token=='eol'){if(this.tree.length==1 && -this.tree[0].type=='expr' && -this.tree[0].tree[0].type=='list_or_tuple'){$B.warn(_b_.SyntaxWarning,"assertion is always true, perhaps remove parentheses?",get_module(C).filename,$token.value)} -return transition(C.parent,token)} -raise_syntax_error(C)} -var AssignCtx=$B.parser.AssignCtx=function(C,expression){ -check_assignment(C) -this.type='assign' -this.position=$token.value -C.parent.tree.pop() -C.parent.tree.push(this) -this.parent=C.parent -this.tree=[C] -var scope=get_scope(this) -if(C.type=='assign'){check_assignment(C.tree[1])}else{var assigned=C.tree[0] -if(assigned.type=="ellipsis"){raise_syntax_error(C,'cannot assign to Ellipsis')}else if(assigned.type=='unary'){raise_syntax_error(C,'cannot assign to operator')}else if(assigned.type=='starred'){if(assigned.tree[0].name=='id'){var id=assigned.tree[0].tree[0].value -if(['None','True','False','__debug__'].indexOf(id)>-1){raise_syntax_error(C,'cannot assign to '+id)}} -if(assigned.parent.in_tuple===undefined){raise_syntax_error(C,"starred assignment target must be in a list or tuple")}}}} -function set_ctx_to_store(obj){if(Array.isArray(obj)){for(var item of obj){set_ctx_to_store(item)}}else if(obj instanceof ast.List || -obj instanceof ast.Tuple){for(var item of obj.elts){set_ctx_to_store(item)}}else if(obj instanceof ast.Starred){obj.value.ctx=new ast.Store()}else if(obj===undefined){}else if(obj.ctx){obj.ctx=new ast.Store()}else{console.log('bizarre',obj,obj.constructor.$name)}} -AssignCtx.prototype.ast=function(){var value=this.tree[1].ast(),targets=[],target=this.tree[0] -if(target.type=='expr' && target.tree[0].type=='list_or_tuple'){target=target.tree[0]} -if(target.type=='list_or_tuple'){target=target.ast() -target.ctx=new ast.Store() -targets=[target]}else{while(target.type=='assign'){targets.splice(0,0,target.tree[1].ast()) -target=target.tree[0]} -targets.splice(0,0,target.ast())} -value.ctx=new ast.Load() -var lineno=get_node(this).line_num -if(target.annotation){var ast_obj=new ast.AnnAssign( -target.tree[0].ast(),target.annotation.tree[0].ast(),value,target.$was_parenthesized ? 0 :1) -set_position(ast_obj.annotation,target.annotation.position,last_position(target.annotation)) -ast_obj.target.ctx=new ast.Store()}else{var ast_obj=new ast.Assign(targets,value)} -set_position(ast_obj,this.position) -set_ctx_to_store(ast_obj.targets) -return ast_obj} -AssignCtx.prototype.transition=function(token,value){var C=this -if(token=='eol'){if(C.tree[1].type=='abstract_expr'){raise_syntax_error(C)} -return transition(C.parent,'eol')} -raise_syntax_error(C)} -var AsyncCtx=$B.parser.AsyncCtx=function(C){ -this.type='async' -this.parent=C -C.async=true -this.position=C.position=$token.value} -AsyncCtx.prototype.transition=function(token,value){var C=this -if(token=="def"){return transition(C.parent,token,value)}else if(token=="with"){var ctx=transition(C.parent,token,value) -ctx.async=C -return ctx}else if(token=="for"){var ctx=transition(C.parent,token,value) -ctx.parent.async=C -return ctx} -raise_syntax_error(C)} -var AttrCtx=$B.parser.AttrCtx=function(C){ -this.type='attribute' -this.value=C.tree[0] -this.parent=C -this.position=$token.value -C.tree.pop() -C.tree[C.tree.length]=this -this.tree=[] -this.func='getattr' } -AttrCtx.prototype.ast=function(){ -var value=this.value.ast(),attr=this.unmangled_name,ctx=new ast.Load() -if(this.func=='setattr'){ctx=new ast.Store()}else if(this.func=='delattr'){ctx=new ast.Delete()} -var ast_obj=new ast.Attribute(value,attr,ctx) -set_position(ast_obj,this.position,this.end_position) -return ast_obj} -AttrCtx.prototype.transition=function(token,value){var C=this -if(token==='id'){var name=value -if(name=='__debug__'){raise_syntax_error(C,'cannot assign to __debug__')}else if(noassign[name]===true){raise_syntax_error(C)} -C.unmangled_name=name -C.position=$token.value -C.end_position=$token.value -name=mangle_name(name,C) -C.name=name -return C.parent} -raise_syntax_error(C)} -var AugmentedAssignCtx=$B.parser.AugmentedAssignCtx=function(C,op){ -check_assignment(C,{augmented:true}) -this.type='augm_assign' -this.C=C -this.parent=C.parent -this.position=$token.value -C.parent.tree.pop() -C.parent.tree[C.parent.tree.length]=this -this.op=op -this.tree=[C] -var scope=this.scope=get_scope(this) -this.module=scope.module} -AugmentedAssignCtx.prototype.ast=function(){ -var target=this.tree[0].ast(),value=this.tree[1].ast() -target.ctx=new ast.Store() -value.ctx=new ast.Load() -var op=this.op.substr(0,this.op.length-1),ast_type_class=op2ast_class[op],ast_class=ast_type_class[1] -var ast_obj=new ast.AugAssign(target,new ast_class(),value) -set_position(ast_obj,this.position) -return ast_obj} -AugmentedAssignCtx.prototype.transition=function(token,value){var C=this -if(token=='eol'){if(C.tree[1].type=='abstract_expr'){raise_syntax_error(C)} -return transition(C.parent,'eol')} -raise_syntax_error(C)} -var AwaitCtx=$B.parser.AwaitCtx=function(C){ -this.type='await' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree.push(this) -var p=C -while(p){if(p.type=="list_or_tuple"){p.is_await=true} -p=p.parent} -var node=get_node(this) -node.awaits=node.awaits ||[] -node.awaits.push(this)} -AwaitCtx.prototype.ast=function(){ -var ast_obj=new ast.Await(this.tree[0].ast()) -set_position(ast_obj,this.position) -return ast_obj} -AwaitCtx.prototype.transition=function(token,value){var C=this -C.parent.is_await=true -return transition(C.parent,token,value)} -var BodyCtx=$B.parser.BodyCtx=function(C){ -var ctx_node=C.parent -while(ctx_node.type !=='node'){ctx_node=ctx_node.parent} -var tree_node=ctx_node.node -var body_node=new $Node() -body_node.is_body_node=true -body_node.line_num=tree_node.line_num -tree_node.insert(0,body_node) -return new NodeCtx(body_node)} -var BreakCtx=$B.parser.BreakCtx=function(C){ -this.type='break' -this.position=$token.value -this.parent=C -C.tree[C.tree.length]=this} -BreakCtx.prototype.ast=function(){var ast_obj=new ast.Break() -set_position(ast_obj,this.position) -return ast_obj} -BreakCtx.prototype.transition=function(token,value){var C=this -if(token=='eol'){return transition(C.parent,'eol')} -raise_syntax_error(C)} -var CallArgCtx=$B.parser.CallArgCtx=function(C){ -this.type='call_arg' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree.push(this) -this.expect='id'} -CallArgCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'await': -case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case '.': -case 'ellipsis': -case 'not': -case 'lambda': -if(C.expect=='id'){this.position=$token.value -C.expect=',' -var expr=new AbstractExprCtx(C,false) -return transition(expr,token,value)} -break -case '=': -if(C.expect==','){return new ExprCtx(new KwArgCtx(C),'kw_value',false)} -break -case 'for': -return new TargetListCtx(new ForExpr(new GeneratorExpCtx(C))) -case 'op': -if(C.expect=='id'){var op=value -C.expect=',' -switch(op){case '+': -case '-': -case '~': -return transition(new AbstractExprCtx(C,false),token,op) -case '*': -C.parent.tree.pop() -return new StarArgCtx(C.parent) -case '**': -C.parent.tree.pop() -return new DoubleStarArgCtx(C.parent)}} -raise_syntax_error(C) -case ')': -return transition(C.parent,token) -case ':': -if(C.expect==',' && -C.parent.parent.type=='lambda'){return transition(C.parent.parent,token)} -break -case ',': -if(C.expect==','){return transition(C.parent,token,value)}} -raise_syntax_error(C)} -var CallCtx=$B.parser.CallCtx=function(C){ -this.position=$token.value -this.type='call' -this.func=C.tree[0] -if(this.func !==undefined){ -this.func.parent=this -this.parenth_position=this.position -this.position=this.func.position} -this.parent=C -if(C.type !='class'){C.tree.pop() -C.tree[C.tree.length]=this}else{ -C.args=this} -this.expect='id' -this.tree=[]} -CallCtx.prototype.ast=function(){var res=new ast.Call(this.func.ast(),[],[]),keywords=new Set() -for(var call_arg of this.tree){if(call_arg.type=='double_star_arg'){var value=call_arg.tree[0].tree[0].ast(),keyword=new ast.keyword(_b_.None,value) -delete keyword.arg -res.keywords.push(keyword)}else if(call_arg.type=='star_arg'){if(res.keywords.length > 0){if(! res.keywords[0].arg){raise_syntax_error(this,'iterable argument unpacking follows keyword argument unpacking')}} -var starred=new ast.Starred(call_arg.tree[0].ast()) -set_position(starred,call_arg.position) -starred.ctx=new ast.Load() -res.args.push(starred)}else if(call_arg.type=='genexpr'){res.args.push(call_arg.ast())}else{var item=call_arg.tree[0] -if(item===undefined){ -continue} -if(item.type=='kwarg'){var key=item.tree[0].value -if(key=='__debug__'){raise_syntax_error_known_range(this,this.position,this.end_position,"cannot assign to __debug__")}else if(['True','False','None'].indexOf(key)>-1){raise_syntax_error_known_range(this,item.position,item.equal_sign_position,'expression cannot contain assignment, perhaps you meant "=="?')} -if(keywords.has(key)){raise_syntax_error_known_range(item,item.position,last_position(item),`keyword argument repeated: ${key}`)} -keywords.add(key) -var keyword=new ast.keyword(item.tree[0].value,item.tree[1].ast()) -set_position(keyword,item.position) -res.keywords.push(keyword)}else{if(res.keywords.length > 0){if(res.keywords[0].arg){raise_syntax_error_known_range(this,item.position,last_position(item),'positional argument follows keyword argument')}else{raise_syntax_error_known_range(this,item.position,last_position(item),'positional argument follows keyword argument unpacking')}} -res.args.push(item.ast())}}} -set_position(res,this.position,this.end_position) -return res} -CallCtx.prototype.transition=function(token,value){var C=this -switch(token){case ',': -if(C.expect=='id'){raise_syntax_error(C)} -C.expect='id' -return C -case 'await': -case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case '.': -case 'not': -case 'lambda': -case 'ellipsis': -C.expect=',' -return transition(new CallArgCtx(C),token,value) -case ')': -C.end_position=$token.value -return C.parent -case 'op': -C.expect=',' -switch(value){case '-': -case '~': -case '+': -C.expect=',' -return transition(new CallArgCtx(C),token,value) -case '*': -C.has_star=true -return new StarArgCtx(C) -case '**': -C.has_dstar=true -return new DoubleStarArgCtx(C)} -raise_syntax_error(C) -case 'yield': -raise_syntax_error(C)} -return transition(C.parent,token,value)} -var CaseCtx=$B.parser.CaseCtx=function(node_ctx){ -this.type="case" -this.position=$token.value -node_ctx.tree=[this] -this.parent=node_ctx -this.tree=[] -this.expect='as'} -CaseCtx.prototype.ast=function(){ -var ast_obj=new ast.match_case(this.tree[0].ast(),this.has_guard ? this.tree[1].tree[0].ast():undefined,ast_body(this.parent)) -set_position(ast_obj,this.position) -return ast_obj} -CaseCtx.prototype.set_alias=function(name){this.alias=name} -CaseCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'as': -C.expect=':' -return new AbstractExprCtx(new AliasCtx(C)) -case ':': -function is_irrefutable(pattern){var cause -if(pattern.type=="capture_pattern"){return pattern.tree[0]}else if(pattern.type=="or_pattern"){for(var subpattern of pattern.tree){if(cause=is_irrefutable(subpattern)){return cause}}}else if(pattern.type=="sequence_pattern" && -pattern.token=='(' && -pattern.tree.length==1 && -(cause=is_irrefutable(pattern.tree[0]))){return cause} -return false} -var cause -if(cause=is_irrefutable(this.tree[0])){ -get_node(C).parent.irrefutable=cause} -switch(C.expect){case 'id': -case 'as': -case ':': -var last=$B.last(C.tree) -if(last && last.type=='sequence_pattern'){remove_empty_pattern(last)} -return BodyCtx(C)} -break -case 'op': -if(value=='|'){return new PatternCtx(new PatternOrCtx(C))} -raise_syntax_error(C,'expected :') -case ',': -if(C.expect==':' ||C.expect=='as'){return new PatternCtx(new PatternSequenceCtx(C))} -case 'if': -C.has_guard=true -return new AbstractExprCtx(new ConditionCtx(C,token),false) -default: -raise_syntax_error(C,'expected :')}} -var ClassCtx=$B.parser.ClassCtx=function(C){ -this.type='class' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this -this.expect='id' -var scope=this.scope=get_scope(this) -this.parent.node.parent_block=scope -this.parent.node.bound={}} -ClassCtx.prototype.ast=function(){ -var decorators=get_decorators(this.parent.node),bases=[],keywords=[],type_params=[] -if(this.args){for(var arg of this.args.tree){if(arg.tree[0].type=='kwarg'){keywords.push(new ast.keyword(arg.tree[0].tree[0].value,arg.tree[0].tree[1].ast()))}else{bases.push(arg.tree[0].ast())}}} -if(this.type_params){type_params=this.type_params.ast()} -var ast_obj=new ast.ClassDef(this.name,bases,keywords,ast_body(this.parent),decorators,type_params) -set_position(ast_obj,this.position) -return ast_obj} -ClassCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.expect=='id'){C.set_name(value) -C.expect='(:' -return C} -break -case '(': -if(C.name===undefined){raise_syntax_error(C,'missing class name')} -C.parenthesis_position=$token.value -return new CallCtx(C) -case '[': -if(C.name===undefined){raise_syntax_error(C,'missing class name')} -return new TypeParamsCtx(C) -case ':': -if(this.args){for(var arg of this.args.tree){var param=arg.tree[0] -if(arg.type !='call_arg'){$token.value=C.parenthesis_position -raise_syntax_error(C,"expected ':'")} -if((param.type=='expr' && param.name=='id')|| -param.type=="kwarg"){continue} -$token.value=arg.position -raise_syntax_error(arg,'invalid class parameter')}} -return BodyCtx(C) -case 'eol': -raise_syntax_error(C,"expected ':'")} -raise_syntax_error(C)} -ClassCtx.prototype.set_name=function(name){var C=this.parent -this.random=$B.UUID() -this.name=name -this.id=C.node.module+'_'+name+'_'+this.random -this.parent.node.id=this.id -var scope=this.scope,parent_block=scope -var block=scope,parent_classes=[] -while(block.ntype=="class"){parent_classes.splice(0,0,block.C.tree[0].name) -block=block.parent} -this.qualname=parent_classes.concat([name]).join(".") -while(parent_block.C && -parent_block.C.tree[0].type=='class'){parent_block=parent_block.parent} -while(parent_block.C && -'def' !=parent_block.C.tree[0].type && -'generator' !=parent_block.C.tree[0].type){parent_block=parent_block.parent} -this.parent.node.parent_block=parent_block} -var Comprehension={generators:function(comps){ -var comprehensions=[] -for(var item of comps){if(item.type=='for'){var target=item.tree[0].ast() -set_ctx_to_store(target) -comprehensions.push( -new ast.comprehension( -target,item.tree[1].ast(),[],item.is_async ? 1 :0 -) -)}else{$B.last(comprehensions).ifs.push(item.tree[0].ast())}} -return comprehensions},make_comp:function(comp,C){if(C.tree[0].type=='yield'){var comp_type=comp.type=='listcomp' ? 'list comprehension' : -comp.type=='dictcomp' ? 'dict comprehension' : -comp.type=='setcomp' ? 'set comprehension' : -comp.type=='genexpr' ? 'generator expression' :'' -var a=C.tree[0]} -comp.comprehension=true -comp.position=$token.value -comp.parent=C.parent -comp.id=comp.type+$B.UUID() -var scope=get_scope(C) -comp.parent_block=scope -while(scope){if(scope.C && scope.C.tree && -scope.C.tree.length > 0 && -scope.C.tree[0].async){comp.async=true -break} -scope=scope.parent_block} -comp.module=get_module(C).module -comp.module_ref=comp.module.replace(/\./g,'_') -C.parent.tree[C.parent.tree.length-1]=comp -Comprehension.set_parent_block(C.tree[0],comp)},set_parent_block:function(ctx,parent_block){if(ctx.tree){for(var item of ctx.tree){if(item.comprehension){item.parent_block=parent_block} -Comprehension.set_parent_block(item,parent_block)}}}} -var ConditionCtx=$B.parser.ConditionCtx=function(C,token){ -this.type='condition' -this.token=token -this.parent=C -this.tree=[] -this.position=$token.value -this.node=get_node(this) -this.scope=get_scope(this) -if(token=='elif'){ -var rank=this.node.parent.children.indexOf(this.node),previous=this.node.parent.children[rank-1] -previous.C.tree[0].orelse=this} -C.tree.push(this)} -ConditionCtx.prototype.ast=function(){ -var types={'if':'If','while':'While','elif':'If'} -var res=new ast[types[this.token]](this.tree[0].ast()) -if(this.orelse){if(this.orelse.token=='elif'){res.orelse=[this.orelse.ast()]}else{res.orelse=this.orelse.ast()}}else{res.orelse=[]} -res.body=ast_body(this) -set_position(res,this.position) -return res} -ConditionCtx.prototype.transition=function(token,value){var C=this -if(token==':'){if(C.tree[0].type=="abstract_expr" && -C.tree[0].tree.length==0){ -raise_syntax_error(C)} -return BodyCtx(C)}else if(C.in_comp && C.token=='if'){ -if(token==']'){return transition(C.parent,token,value)}else if(token=='if'){var if_exp=new ConditionCtx(C.parent,'if') -if_exp.in_comp=C.in_comp -return new AbstractExprCtx(if_exp,false)}else if(')]}'.indexOf(token)>-1){return transition(this.parent,token,value)}else if(C.in_comp && token=='for'){return new TargetListCtx(new ForExpr(C.parent))} -if(token==',' && parent_match(C,{type:'call'})){raise_syntax_error_known_range(C,C.in_comp.position,last_position(C),'Generator expression must be parenthesized')}} -raise_syntax_error(C,"expected ':'")} -var ContinueCtx=$B.parser.ContinueCtx=function(C){ -this.type='continue' -this.parent=C -this.position=$token.value -get_node(this).is_continue=true -C.tree[C.tree.length]=this} -ContinueCtx.prototype.ast=function(){var ast_obj=new ast.Continue() -set_position(ast_obj,this.position) -return ast_obj} -ContinueCtx.prototype.transition=function(token,value){var C=this -if(token=='eol'){return C.parent} -raise_syntax_error(C)} -var DecoratorCtx=$B.parser.DecoratorCtx=function(C){ -this.type='decorator' -this.parent=C -C.tree[C.tree.length]=this -this.tree=[] -this.position=$token.value} -DecoratorCtx.prototype.transition=function(token,value){var C=this -if(token=='eol'){return transition(C.parent,token)} -raise_syntax_error(C)} -function get_decorators(node){var decorators=[] -var parent_node=node.parent -var rank=parent_node.children.indexOf(node) -while(true){rank-- -if(rank < 0){break}else if(parent_node.children[rank].C.tree[0].type== -'decorator'){var deco=parent_node.children[rank].C.tree[0].tree[0] -decorators.splice(0,0,deco.ast())}else{break}} -return decorators} -var DefCtx=$B.parser.DefCtx=function(C){this.type='def' -this.name=null -this.parent=C -this.tree=[] -this.async=C.async -if(this.async){this.position=C.position}else{this.position=$token.value} -C.tree[C.tree.length]=this -this.enclosing=[] -var scope=this.scope=get_scope(this) -if(scope.C && scope.C.tree[0].type=="class"){this.class_name=scope.C.tree[0].name} -var parent_block=scope -while(parent_block.C && -parent_block.C.tree[0].type=='class'){parent_block=parent_block.parent} -while(parent_block.C && -'def' !=parent_block.C.tree[0].type){parent_block=parent_block.parent} -this.parent.node.parent_block=parent_block -var pb=parent_block -this.is_comp=pb.is_comp -while(pb && pb.C){if(pb.C.tree[0].type=='def'){this.inside_function=true -break} -pb=pb.parent_block} -this.module=scope.module -this.root=get_module(this) -this.positional_list=[] -this.default_list=[] -this.other_args=null -this.other_kw=null -this.after_star=[]} -DefCtx.prototype.ast=function(){var args={posonlyargs:[],args:[],kwonlyargs:[],kw_defaults:[],defaults:[],type_params:[]},decorators=get_decorators(this.parent.node),func_args=this.tree[1],state='arg',default_value,res -args=func_args.ast() -if(this.async){res=new ast.AsyncFunctionDef(this.name,args,[],decorators)}else{res=new ast.FunctionDef(this.name,args,[],decorators)} -if(this.annotation){res.returns=this.annotation.tree[0].ast()} -if(this.type_params){res.type_params=this.type_params.ast()} -res.body=ast_body(this.parent) -set_position(res,this.position) -return res} -DefCtx.prototype.set_name=function(name){if(["None","True","False"].indexOf(name)>-1){raise_syntax_error(this)} -var id_ctx=new IdCtx(this,name) -this.name=name -this.id=this.scope.id+'_'+name -this.id=this.id.replace(/\./g,'_') -this.id+='_'+$B.UUID() -this.parent.node.id=this.id -this.parent.node.module=this.module} -DefCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.name){raise_syntax_error(C)} -C.set_name(value) -return C -case '(': -if(C.name==null){raise_syntax_error(C,"missing name in function definition")} -C.has_args=true; -return new FuncArgs(C) -case '[': -if(C.name===undefined){raise_syntax_error(C,'missing function name')} -return new TypeParamsCtx(C) -case ')': -return C -case 'annotation': -return new AbstractExprCtx(new AnnotationCtx(C),true) -case ':': -if(C.has_args){return BodyCtx(C)}else{raise_syntax_error(C,"missing function parameters")} -case 'eol': -if(C.has_args){raise_syntax_error(C,"expected ':'")}} -raise_syntax_error(C)} -var DelCtx=$B.parser.DelCtx=function(C){ -this.type='del' -this.parent=C -C.tree.push(this) -this.tree=[] -this.position=$token.value} -DelCtx.prototype.ast=function(){var targets -if(this.tree[0].type=='list_or_tuple'){ -targets=this.tree[0].tree.map(x=> x.ast())}else if(this.tree[0].type=='expr' && -this.tree[0].tree[0].type=='list_or_tuple'){ -targets=this.tree[0].tree[0].ast() -targets.ctx=new ast.Del() -for(var elt of targets.elts){elt.ctx=new ast.Del()} -var ast_obj=new ast.Delete([targets]) -set_position(ast_obj,this.position) -return ast_obj}else{targets=[this.tree[0].tree[0].ast()]} -for(var target of targets){target.ctx=new ast.Del()} -var ast_obj=new ast.Delete(targets) -set_position(ast_obj,this.position) -return ast_obj} -DelCtx.prototype.transition=function(token,value){var C=this -if(token=='eol'){check_assignment(this.tree[0],{action:'delete'}) -return transition(C.parent,token)} -raise_syntax_error(C)} -var DictCompCtx=function(C){ -if(C.tree[0].type=='expr' && -C.tree[0].tree[0].comprehension){ -var comp=C.tree[0].tree[0] -comp.parent_block=this} -this.type='dictcomp' -this.position=$token.value -this.comprehension=true -this.parent=C.parent -this.key=C.tree[0] -this.value=C.tree[1] -this.key.parent=this -this.value.parent=this -this.tree=[] -this.id='dictcomp'+$B.UUID() -this.parent_block=get_scope(C) -this.module=get_module(C).module -C.parent.tree[C.parent.tree.length-1]=this -this.type='dictcomp' -Comprehension.make_comp(this,C)} -DictCompCtx.prototype.ast=function(){ -if(this.value.ast===undefined){console.log('dict comp ast, no value.ast',this)} -var ast_obj=new ast.DictComp( -this.key.ast(),this.value.ast(),Comprehension.generators(this.tree) -) -set_position(ast_obj,this.position) -return ast_obj} -DictCompCtx.prototype.transition=function(token,value){var C=this -if(token=='}'){return this.parent} -raise_syntax_error(C)} -var DictOrSetCtx=$B.parser.DictOrSetCtx=function(C){ -this.type='dict_or_set' -this.real='dict_or_set' -this.expect=',' -this.closed=false -this.position=$token.value -this.nb_items=0 -this.parent=C -this.tree=[] -C.tree[C.tree.length]=this} -DictOrSetCtx.prototype.ast=function(){ -var ast_obj -if(this.real=='dict'){var keys=[],values=[] -var t0=Date.now() -for(var i=0,len=this.items.length;i < len;i++){if(this.items[i].type=='expr' && -this.items[i].tree[0].type=='kwd'){keys.push(_b_.None) -values.push(this.items[i].tree[0].tree[0].ast())}else{keys.push(this.items[i].ast()) -values.push(this.items[i+1].ast()) -i++}} -ast_obj=new ast.Dict(keys,values)}else if(this.real=='set'){var items=[] -for(var item of this.items){if(item.packed){var starred=new ast.Starred(item.ast(),new ast.Load()) -set_position(starred,item.position) -items.push(starred)}else{items.push(item.ast())}} -ast_obj=new ast.Set(items)} -set_position(ast_obj,this.position) -return ast_obj} -DictOrSetCtx.prototype.transition=function(token,value){var C=this -if(C.closed){switch(token){case '[': -return new AbstractExprCtx(new SubscripCtx(C.parent),false) -case '(': -return new CallArgCtx(new CallCtx(C.parent))} -return transition(C.parent,token,value)}else{if(C.expect==','){function check_last(){var last=$B.last(C.tree),err_msg -if(last && last.wrong_assignment){ -err_msg="invalid syntax. Maybe you meant '==' or ':=' instead of '='?"}else if(C.real=='dict' && last.type=='expr' && -last.tree[0].type=='starred'){ -err_msg='cannot use a starred expression in a dictionary value'}else if(C.real=='set' && last.tree[0].type=='kwd'){$token.value=last.position -raise_syntax_error(C)} -if(err_msg){raise_syntax_error_known_range(C,last.position,last_position(last),err_msg)}} -switch(token){case '}': -var last=$B.last(C.tree) -if(last.type=="expr" && last.tree[0].type=="kwd"){C.nb_items+=2}else if(last.type=="abstract_expr"){C.tree.pop()}else{C.nb_items++} -check_last() -C.end_position=$token.value -switch(C.real){case 'dict_or_set': -C.real=C.tree.length==0 ? -'dict' :'set' -case 'set': -C.items=C.tree -C.tree=[] -C.closed=true -return C -case 'dict': -if($B.last(C.tree).type=='abstract_expr'){raise_syntax_error(C,"expression expected after dictionary key and ':'")}else{if(C.nb_items % 2 !=0){raise_syntax_error(C,"':' expected after dictionary key")}} -C.items=C.tree -C.tree=[] -C.closed=true -return C} -raise_syntax_error(C) -case ',': -check_last() -var last=$B.last(C.tree) -if(last.type=="expr" && last.tree[0].type=="kwd"){C.nb_items+=2}else{C.nb_items++} -if(C.real=='dict_or_set'){var last=C.tree[0] -C.real=(last.type=='expr' && -last.tree[0].type=='kwd')? 'dict' :'set'} -if(C.real=='dict' && C.nb_items % 2){raise_syntax_error(C,"':' expected after dictionary key")} -return new AbstractExprCtx(C,false) -case ':': -if(C.real=='dict_or_set'){C.real='dict'} -if(C.real=='dict'){C.expect='value' -this.nb_items++ -C.value_pos=$token.value -return C}else{raise_syntax_error(C)} -case 'for': -if(C.real=="set" && C.tree.length > 1){$token.value=C.tree[0].position -raise_syntax_error(C,"did you forget "+ -"parentheses around the comprehension target?")} -var expr=C.tree[0],err_msg -if(expr.type=='expr'){if(expr.tree[0].type=='kwd'){err_msg='dict unpacking cannot be used in dict comprehension'}else if(expr.tree[0].type=='starred'){err_msg='iterable unpacking cannot be used in comprehension'} -if(err_msg){raise_syntax_error_known_range(C,expr.position,last_position(expr),err_msg)}} -if(C.real=='dict_or_set'){return new TargetListCtx(new ForExpr( -new SetCompCtx(this)))}else{return new TargetListCtx(new ForExpr( -new DictCompCtx(this)))}} -raise_syntax_error(C)}else if(C.expect=='value'){if(python_keywords.indexOf(token)>-1){var ae=new AbstractExprCtx(C,false) -try{transition(ae,token,value) -C.tree.pop()}catch(err){raise_syntax_error(C)}} -try{C.expect=',' -return transition(new AbstractExprCtx(C,false),token,value)}catch(err){$token.value=C.value_pos -raise_syntax_error(C,"expression expected after "+ -"dictionary key and ':'")}} -return transition(C.parent,token,value)}} -var DoubleStarArgCtx=$B.parser.DoubleStarArgCtx=function(C){ -this.type='double_star_arg' -this.parent=C -this.tree=[] -C.tree[C.tree.length]=this} -DoubleStarArgCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case '.': -case 'not': -case 'lambda': -return transition(new AbstractExprCtx(C,false),token,value) -case ',': -case ')': -return transition(C.parent,token) -case ':': -if(C.parent.parent.type=='lambda'){return transition(C.parent.parent,token)}} -raise_syntax_error(C)} -var EllipsisCtx=$B.parser.EllipsisCtx=function(C){ -this.type='ellipsis' -this.parent=C -this.position=$token.value -C.tree[C.tree.length]=this} -EllipsisCtx.prototype.ast=function(){var ast_obj=new ast.Constant(_b_.Ellipsis) -set_position(ast_obj,this.position) -return ast_obj} -EllipsisCtx.prototype.transition=function(token,value){var C=this -return transition(C.parent,token,value)} -var EndOfPositionalCtx=$B.parser.$EndOfConditionalCtx=function(C){ -this.type="end_positional" -this.parent=C -C.has_end_positional=true -C.parent.pos_only=C.tree.length -C.tree.push(this)} -EndOfPositionalCtx.prototype.transition=function(token,value){var C=this -if(token=="," ||token==")"){return transition(C.parent,token,value)} -raise_syntax_error(C)} -var ExceptCtx=$B.parser.ExceptCtx=function(C){ -this.type='except' -this.position=$token.value -this.parent=C -C.tree[C.tree.length]=this -this.tree=[] -this.scope=get_scope(this) -var node=C.node,rank=node.parent.children.indexOf(node),ix=rank-1 -while(node.parent.children[ix].C.tree[0].type !='try'){ix--} -this.try_node=node.parent.children[ix] -this.is_first_child=rank==ix+1 -if(this.try_node.C.is_trystar){this.expect='*'}else{this.expect='id'}} -ExceptCtx.prototype.ast=function(){ -var ast_obj=new ast.ExceptHandler( -this.tree.length==1 ? this.tree[0].ast():undefined,this.has_alias ? this.tree[0].alias :undefined,ast_body(this.parent) -) -set_position(ast_obj,this.position) -return ast_obj} -ExceptCtx.prototype.transition=function(token,value){var C=this -if(token=='op' && value=='*'){ -if(C.is_first_child){ -C.try_node.C.is_trystar=true -C.expect='id' -return C}else if(! C.expect=='*'){ -raise_syntax_error(C,"cannot have both 'except' and 'except*' "+ -"on the same 'try'")}else{C.expect='id' -return C}}else if(C.expect=='*'){ -raise_syntax_error(C,"cannot have both 'except' and 'except*' "+ -"on the same 'try'")} -switch(token){case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case 'not': -case 'lambda': -if(C.expect=='id'){C.expect='as' -return transition(new AbstractExprCtx(C,false),token,value)} -case 'as': -if(C.expect=='as' && -C.has_alias===undefined){C.expect='alias' -C.has_alias=true -return C} -case 'id': -if(C.expect=='alias'){C.expect=':' -C.set_alias(value) -return C} -break -case ':': -var _ce=C.expect -if(_ce=='id' ||_ce=='as' ||_ce==':'){return BodyCtx(C)} -break -case '(': -if(C.expect=='id' && C.tree.length==0){C.parenth=true -return C} -break -case ')': -if(C.expect==',' ||C.expect=='as'){C.expect='as' -return C} -case ',': -if(C.parenth !==undefined && -C.has_alias===undefined && -(C.expect=='as' ||C.expect==',')){C.expect='id' -return C}else if(C.parenth===undefined){raise_syntax_error(C,"multiple exception types must be parenthesized")} -case 'eol': -raise_syntax_error(C,"expected ':'")} -raise_syntax_error(C)} -ExceptCtx.prototype.set_alias=function(alias){this.tree[0].alias=mangle_name(alias,this)} -var ExprCtx=$B.parser.ExprCtx=function(C,name,with_commas){ -this.type='expr' -this.name=name -this.position=$token.value -this.with_commas=with_commas -this.expect=',' -this.parent=C -if(C.packed){this.packed=C.packed} -this.tree=[] -C.tree[C.tree.length]=this} -ExprCtx.prototype.ast=function(){var res=this.tree[0].ast() -if(this.packed){}else if(this.annotation){res=new ast.AnnAssign( -res,this.annotation.tree[0].ast(),undefined,this.$was_parenthesized ? 0 :1) -set_position(res,this.position)} -return res} -ExprCtx.prototype.transition=function(token,value){var C=this -if(python_keywords.indexOf(token)>-1 && -['as','else','if','for','from','in'].indexOf(token)==-1){raise_syntax_error(C)} -if(C.parent.expect=='star_target'){if(['pass','in','not','op','augm_assign','=',':=','if','eol']. -indexOf(token)>-1){return transition(C.parent,token,value)}} -switch(token){case 'bytes': -case 'float': -case 'id': -case 'imaginary': -case 'int': -case 'lambda': -case 'pass': -var msg='invalid syntax. Perhaps you forgot a comma?' -raise_syntax_error_known_range(C,this.position,$token.value,msg) -break -case '{': -if(C.tree[0].type !="id" || -["print","exec"].indexOf(C.tree[0].value)==-1){raise_syntax_error(C)} -return new AbstractExprCtx(new DictOrSetCtx(C),false) -case '[': -case '(': -case '.': -case 'not': -if(C.expect=='expr'){C.expect=',' -return transition(new AbstractExprCtx(C,false),token,value)}} -switch(token){case 'not': -if(C.expect==','){return new ExprNot(C)} -break -case 'in': -if(C.parent.type=='target_list'){ -return transition(C.parent,token)} -if(C.expect==','){return transition(C,'op','in')} -case ',': -if(C.expect==','){if(C.name=='iterator' && -C.parent.parent.type !='node'){ -var for_expr=C.parent.parent -raise_syntax_error_known_range(C,first_position(for_expr),last_position(for_expr),'Generator expression must be parenthesized')} -if(C.with_commas || -["assign","return"].indexOf(C.parent.type)>-1){if(parent_match(C,{type:"yield","from":true})){raise_syntax_error(C,"no implicit tuple for yield from")} -C.parent.tree.pop() -var tuple=new ListOrTupleCtx(C.parent,'tuple') -tuple.implicit=true -tuple.has_comma=true -tuple.tree=[C] -C.parent=tuple -return tuple}} -return transition(C.parent,token) -case '.': -return new AttrCtx(C) -case '[': -if(C.tree[0].type=='id'){ -delete C.tree[0].bound} -return new AbstractExprCtx(new SubscripCtx(C),true) -case '(': -return new CallCtx(C) -case 'op': -if($op_weight[value]===undefined){ -var frs=parent_match(C,{type:"fstring_replacement_field"}) -if(frs){return transition(frs,token,value)} -raise_syntax_error(C)} -if(C.parent.type=='withitem' && C.parent.tree.length==2){raise_syntax_error(C,"expected ':'")} -if(value=='~'){raise_syntax_error(C)} -var op_parent=C.parent,op=value -if(op_parent.type=='ternary' && op_parent.in_else){var new_op=new OpCtx(C,op) -return new AbstractExprCtx(new_op,false)} -var op1=C.parent,repl=null -while(1){if(op1.type=='unary' && op !=='**'){repl=op1 -op1=op1.parent}else if(op1.type=='expr'){op1=op1.parent}else if(op1.type=='op' && -$op_weight[op1.op]>=$op_weight[op]&& -!(op1.op=='**' && op=='**')){ -repl=op1 -op1=op1.parent}else if(op1.type=="not" && -$op_weight['not']> $op_weight[op]){repl=op1 -op1=op1.parent}else{break}} -if(repl===null){if(op1.type=='op'){ -var right=op1.tree.pop(),expr=new ExprCtx(op1,'operand',C.with_commas) -expr.tree.push(right) -right.parent=expr -var new_op=new OpCtx(expr,op) -return new AbstractExprCtx(new_op,false)} -var position=C.position -while(C.parent !==op1){C=C.parent -op_parent=C.parent} -C.parent.tree.pop() -var expr=new ExprCtx(op_parent,'operand',C.with_commas) -expr.position=position -expr.expect=',' -C.parent=expr -var new_op=new OpCtx(C,op) -return new AbstractExprCtx(new_op,false)}else{ -if(op==='and' ||op==='or'){while(repl.parent.type=='not' || -(repl.parent.type=='expr' && -repl.parent.parent.type=='not')){ -repl=repl.parent -op_parent=repl.parent}}} -if(repl.type=='op'){var _flag=false -switch(repl.op){case '<': -case '<=': -case '==': -case '!=': -case 'is': -case '>=': -case '>': -_flag=true} -if(_flag){switch(op){case '<': -case '<=': -case '==': -case '!=': -case 'is': -case '>=': -case '>': -case 'in': -case 'not_in': -repl.ops=repl.ops ||[repl.op] -repl.ops.push(op) -return new AbstractExprCtx(repl,false)}}} -repl.parent.tree.pop() -var expr=new ExprCtx(repl.parent,'operand',false) -expr.tree=[op1] -expr.position=op1.position -repl.parent=expr -var new_op=new OpCtx(repl,op) -return new AbstractExprCtx(new_op,false) -case 'augm_assign': -check_assignment(C,{augmented:true}) -var parent=C -while(parent){if(parent.type=="assign" ||parent.type=="augm_assign"){raise_syntax_error(C,"augmented assignment inside assignment")}else if(parent.type=="op"){raise_syntax_error(C,"cannot assign to operator")}else if(parent.type=="list_or_tuple"){raise_syntax_error(C,`'${parent.real}' is an illegal`+ -" expression for augmented assignment")}else if(['list','tuple'].indexOf(parent.name)>-1){raise_syntax_error(C,`'${parent.name}' is an illegal`+ -" expression for augmented assignment")}else if(['dict_or_set'].indexOf(parent.name)>-1){raise_syntax_error(C,`'${parent.tree[0].real } display'`+ -" is an illegal expression for augmented assignment")} -parent=parent.parent} -if(C.expect==','){return new AbstractExprCtx( -new AugmentedAssignCtx(C,value),true)} -return transition(C.parent,token,value) -case ":": -if(C.parent.type=="sub" || -(C.parent.type=="list_or_tuple" && -C.parent.parent.type=="sub")){return new AbstractExprCtx(new SliceCtx(C.parent),false)}else if(C.parent.type=="slice"){return transition(C.parent,token,value)}else if(C.parent.type=="node"){ -if(C.tree.length==1){var child=C.tree[0] -check_assignment(child) -if(["id","sub","attribute"].indexOf(child.type)>-1){return new AbstractExprCtx(new AnnotationCtx(C),false)}else if(child.real=="tuple" && child.expect=="," && -child.tree.length==1){return new AbstractExprCtx(new AnnotationCtx(child.tree[0]),false)}} -var type=C.tree[0].real -raise_syntax_error_known_range(C,C.position,last_position(C),`only single target (not ${type}) can be annotated`)} -break -case '=': -var frs=parent_match(C,{type:'fstring_replacement_field'}) -if(frs){return transition(frs,token,value)} -var call_arg=parent_match(C,{type:'call_arg'}) -try{check_assignment(C)}catch(err){if(call_arg){var ctx=C -while(ctx.parent !==call_arg){ctx=ctx.parent} -raise_syntax_error_known_range(ctx,ctx.position,$token.value,'expression cannot contain assignment, perhaps you meant "=="?')}else{throw err}} -var annotation -if(C.expect==','){if(C.parent.type=="call_arg"){ -if(C.tree[0].type !="id"){raise_syntax_error_known_range(C,C.position,$token.value,'expression cannot contain assignment, perhaps you meant "=="?')} -return new AbstractExprCtx(new KwArgCtx(C),true)}else if(annotation=parent_match(C,{type:"annotation"})){return transition(annotation,token,value)}else if(C.parent.type=="op"){ -raise_syntax_error(C,"cannot assign to operator")}else if(C.parent.type=="not"){ -raise_syntax_error(C,"cannot assign to operator")}else if(C.parent.type=="with"){raise_syntax_error(C,"expected :")}else if(C.parent.type=='dict_or_set'){if(C.parent.expect==','){ -C.wrong_assignment=true -return transition(C,':=')}}else if(C.parent.type=="list_or_tuple"){ -for(var i=0;i < C.parent.tree.length;i++){var item=C.parent.tree[i] -try{check_assignment(item,{once:true})}catch(err){console.log(C) -raise_syntax_error(C,"invalid syntax. "+ -"Maybe you meant '==' or ':=' instead of '='?")} -if(item.type=="expr" && item.name=="operand"){raise_syntax_error(C,"cannot assign to operator")}} -if(C.parent.real=='list' || -(C.parent.real=='tuple' && -! C.parent.implicit)){raise_syntax_error(C,"invalid syntax. "+ -"Maybe you meant '==' or ':=' instead of '='?")}}else if(C.parent.type=="expr" && -C.parent.name=="iterator"){raise_syntax_error(C,'expected :')}else if(C.parent.type=="lambda"){if(C.parent.parent.parent.type !="node"){raise_syntax_error(C,'expression cannot contain'+ -' assignment, perhaps you meant "=="?')}}else if(C.parent.type=='target_list'){raise_syntax_error(C,"(assign to target in iteration)")} -while(C.parent !==undefined){C=C.parent -if(C.type=="condition"){raise_syntax_error(C,"invalid syntax. Maybe you"+ -" meant '==' or ':=' instead of '='?")}else if(C.type=="augm_assign"){raise_syntax_error(C,"(assignment inside augmented assignment)")}} -C=C.tree[0] -return new AbstractExprCtx(new AssignCtx(C),true)} -break -case ':=': -var ptype=C.parent.type -if(["node","assign","kwarg","annotation"]. -indexOf(ptype)>-1){raise_syntax_error(C,'(:= invalid, parent '+ptype+')')}else if(ptype=="func_arg_id" && -C.parent.tree.length > 0){ -raise_syntax_error(C,'(:= invalid, parent '+ptype+')')}else if(ptype=="call_arg" && -C.parent.parent.type=="call" && -C.parent.parent.parent.type=="lambda"){ -raise_syntax_error(C,'(:= invalid inside function arguments)' )} -if(C.tree.length==1 && C.tree[0].type=="id"){var scope=get_scope(C),name=C.tree[0].value -if(['None','True','False'].indexOf(name)>-1){raise_syntax_error(C,`cannot use assignment expressions with ${name}`)}else if(name=='__debug__'){raise_syntax_error(C,'cannot assign to __debug__')} -while(scope.comprehension){scope=scope.parent_block} -return new AbstractExprCtx(new NamedExprCtx(C),false)} -raise_syntax_error(C) -case 'if': -var in_comp=false,ctx=C.parent -while(ctx){if(ctx.comprehension){in_comp=true -break}else if(ctx.type=="list_or_tuple"){ -break}else if(ctx.type=='comp_for'){break}else if(ctx.type=='comp_if'){ -in_comp=true -break}else if(ctx.type=='call_arg' ||ctx.type=='sub'){ -break}else if(ctx.type=='expr'){if(ctx.parent.type=='comp_iterable'){ -in_comp=true -break}} -ctx=ctx.parent} -if(in_comp){break} -var ctx=C -while(ctx.parent && -(ctx.parent.type=='op' || -ctx.parent.type=='not' || -ctx.parent.type=='unary' || -(ctx.parent.type=="expr" && ctx.parent.name=="operand"))){ctx=ctx.parent} -return new AbstractExprCtx(new TernaryCtx(ctx),false) -case 'JoinedStr': -if(C.tree.length==1 && C.tree[0]instanceof FStringCtx){var fstring=C.tree[0] -return fstring}else{var msg='invalid syntax. Perhaps you forgot a comma?' -raise_syntax_error_known_range(C,this.position,$token.value,msg)} -break -case 'str': -if(C.tree.length==1 && C.tree[0]instanceof FStringCtx){var fstring=C.tree[0] -new StringCtx(fstring,value) -return C}else{var msg='invalid syntax. Perhaps you forgot a comma?' -raise_syntax_error_known_range(C,this.position,$token.value,msg)} -break -case 'eol': -if(C.tree.length==2 && -C.tree[0].type=="id" && -["print","exec"].indexOf(C.tree[0].value)>-1){var func=C.tree[0].value -raise_syntax_error_known_range(C,C.position,$token.value,"Missing parentheses in call "+ -`to '${func}'. Did you mean ${func}(...)?`)} -if(["dict_or_set","list_or_tuple","str"].indexOf(C.parent.type)==-1){var t=C.tree[0] -if(t.type=="starred"){$token.value=t.position -if(parent_match(C,{type:'del'})){raise_syntax_error(C,'cannot delete starred')} -raise_syntax_error_known_range(C,t.position,last_position(t),"can't use starred expression here")}else if(t.type=="call" && t.func.type=="starred"){$token.value=t.func.position -raise_syntax_error(C,"can't use starred expression here")}}} -return transition(C.parent,token)} -var ExprNot=$B.parser.ExprNot=function(C){ -this.type='expr_not' -this.parent=C -this.tree=[] -C.tree[C.tree.length]=this} -ExprNot.prototype.transition=function(token,value){var C=this -if(token=='in'){ -C.parent.tree.pop() -var op1=C.parent -while(op1.type !=='expr'){op1=op1.parent} -return op1.transition('op','not_in')} -raise_syntax_error(C)} -var ForExpr=$B.parser.ForExpr=function(C){ -if(C.node && C.node.parent.is_comp){ -C.node.parent.first_for=this} -this.type='for' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree.push(this) -this.scope=get_scope(this) -this.module=this.scope.module} -ForExpr.prototype.ast=function(){ -var target=this.tree[0].ast(),iter=this.tree[1].ast(),orelse=this.orelse ? this.orelse.ast():[],type_comment,body=ast_body(this.parent) -set_ctx_to_store(target) -var klass=this.async ? ast.AsyncFor :ast.For -var ast_obj=new klass(target,iter,body,orelse,type_comment) -set_position(ast_obj,this.async ? this.async.position :this.position,last_position(this)) -return ast_obj} -ForExpr.prototype.transition=function(token,value){var C=this -switch(token){case 'in': -if(C.tree[0].tree.length==0){ -raise_syntax_error(C,"(missing target between 'for' and 'in')")} -check_assignment(C.tree[0]) -return new AbstractExprCtx( -new ExprCtx(C,'iterator',true),false) -case ':': -check_assignment(C.tree[0]) -if(C.tree.length < 2 -||C.tree[1].tree[0].type=="abstract_expr"){raise_syntax_error(C)} -return BodyCtx(C)} -if(this.parent.comprehension){switch(token){case ']': -if(this.parent.type=='listcomp'){return transition(this.parent,token,value)} -break -case ')': -if(this.parent.type=='genexpr'){return transition(this.parent,token,value)} -break -case '}': -if(this.parent.type=='dictcomp' || -this.parent.type=='setcomp'){return transition(this.parent,token,value)} -break -case 'for': -return new TargetListCtx(new ForExpr(this.parent)) -case 'if': -var if_ctx=new ConditionCtx(this.parent,'if') -if_ctx.in_comp=this.parent -return new AbstractExprCtx(if_ctx,false)}} -if(token=='eol'){$token.value=last_position(C) -if(C.tree.length==2){raise_syntax_error(C,"expected ':'")}} -raise_syntax_error(C)} -var FromCtx=$B.parser.FromCtx=function(C){ -this.type='from' -this.parent=C -this.module='' -this.names=[] -this.names_position=[] -this.position=$token.value -C.tree[C.tree.length]=this -this.expect='module' -this.scope=get_scope(this)} -FromCtx.prototype.ast=function(){ -var module=this.module,level=0,alias -while(module.length > 0 && module.startsWith('.')){level++ -module=module.substr(1)} -var res={module:module ||undefined,names:[],level} -for(var i=0,len=this.names.length;i < len;i++){var name=this.names[i],position=this.names_position[i] -if(Array.isArray(name)){alias=new ast.alias(name[0],name[1])}else{alias=new ast.alias(name)} -set_position(alias,position) -res.names.push(alias)} -var ast_obj=new ast.ImportFrom(res.module,res.names,res.level) -set_position(ast_obj,this.position) -return ast_obj} -FromCtx.prototype.add_name=function(name){this.names.push(name) -this.names_position.push($token.value) -if(name=='*'){this.scope.blurred=true} -this.end_position=$token.value} -FromCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.expect=='module'){C.module+=value -return C}else if(C.expect=='id'){C.add_name(value) -C.expect=',' -return C}else if(C.expect=='alias'){C.names[C.names.length-1]= -[$B.last(C.names),value] -C.expect=',' -return C} -break -case '.': -if(C.expect=='module'){if(token=='id'){C.module+=value} -else{C.module+='.'} -return C} -break -case 'ellipsis': -if(C.expect=='module'){C.module+='...' -return C} -break -case 'import': -if(C.names.length > 0){ -raise_syntax_error(C,"only one 'import' allowed after 'from'")} -if(C.expect=='module'){C.expect='id' -return C} -case 'op': -if(value=='*' && C.expect=='id' -&& C.names.length==0){if(get_scope(C).ntype !=='module'){raise_syntax_error(C,"import * only allowed at module level")} -C.add_name('*') -C.expect='eol' -return C}else{raise_syntax_error(C)} -case ',': -if(C.expect==','){C.expect='id' -return C} -case 'eol': -switch(C.expect){case ',': -case 'eol': -return transition(C.parent,token) -case 'id': -raise_syntax_error(C,'trailing comma not allowed without '+ -'surrounding parentheses') -default: -raise_syntax_error(C)} -case 'as': -if(C.expect==',' ||C.expect=='eol'){C.expect='alias' -return C} -case '(': -if(C.expect=='id'){C.expect='id' -return C} -case ')': -if(C.expect==',' ||C.expect=='id'){C.expect='eol' -return C}} -raise_syntax_error(C)} -function escape_quotes(s,quotes){if(quotes.length==1){return quotes+s+quotes}else{var quote=quotes[0] -return quote+s.replace(new RegExp(quote,'g'),'\\'+quote)+quote}} -var FStringCtx=$B.parser.FStringCtx=function(C,start){ -for(var i=0;i < start.length;i++){if(start[i]=='"' ||start[i]=="'"){this.prefix=start.substr(0,i) -this.quotes=start.substr(i) -break}} -this.type='fstring' -this.parent=C -this.tree=[] -this.position=$token.value -this.scope=get_scope(C) -C.tree.push(this) -this.raw=this.prefix.toLowerCase().indexOf('r')>-1} -FStringCtx.prototype.transition=function(token,value){var C=this -if(token=='middle'){new StringCtx(C,escape_quotes(value,this.quotes)) -return C}else if(token=='{'){return new AbstractExprCtx(new FStringReplacementFieldCtx(C),false)}else if(token=='end'){return C.parent} -raise_syntax_error(C)} -FStringCtx.prototype.ast=function(){var res={type:'JoinedStr',values:[]} -var state -for(var item of this.tree){if(item instanceof StringCtx){if(state=='string'){ -$B.last(res.values).value+=item.value}else{var item_ast=new ast.Constant(item.value) -set_position(item_ast,item.position) -res.values.push(item_ast)} -state='string'}else{var item_ast=item.ast() -set_position(item_ast,item.position) -res.values.push(item_ast) -state='formatted_value'}} -var ast_obj=new ast.JoinedStr(res.values) -set_position(ast_obj,this.position) -return ast_obj} -var FStringReplacementFieldCtx= -$B.parser.FStringReplacementFieldCtx=function(C){this.type='fstring_replacement_field' -this.tree=[] -this.parent=C -this.position=$token.value -C.tree.push(this)} -FStringReplacementFieldCtx.prototype.transition=function(token,value){var C=this -if(token=='='){if(C.equal_sign_pos){raise_syntax_error(C)} -var expr_text=C.position.line.substring( -C.position.start[1]+1,$token.value.start[1]) -var quotes=C.parent.quotes -C.formula=new StringCtx(C.parent,escape_quotes(expr_text+'=',quotes)) -var s=C.parent.tree.pop() -C.parent.tree.splice(C.parent.tree.length-1,0,s) -C.equal_sign_pos=$token.value.start -return C}else if(C.equal_sign_pos){ -if(! C.insert_whitespace){var nb_ws=$token.value.start[1]-C.equal_sign_pos[1] -if(nb_ws > 1){C.formula.value+=' '.repeat(nb_ws-1)} -C.insert_whitespace=true}} -if(token=='op' && value=='!'){C.expect='id' -return C}else if(token==':'){return new FStringFormatSpecCtx(C)}else if(token=='}'){if(C.tree.length==1 && -C.tree[0]instanceof AbstractExprCtx){raise_syntax_error(C,"f-string: valid expression required before '}'")} -return C.parent}else if(token=='id' && this.expect=='id'){if('sra'.indexOf(value)>-1){C.conversion=value -delete this.expect -return C} -raise_syntax_error(C,`unknown conversion type ${value}`)} -raise_syntax_error(C)} -FStringReplacementFieldCtx.prototype.ast=function(){var value=this.tree[0].ast(),format=this.tree[1] -var conv_num={a:97,r:114,s:115},conversion=conv_num[this.conversion]||-1 -if(format !==undefined){format=format.ast()} -var res=new ast.FormattedValue( -value,conversion,format) -set_position(res,this.position) -return res} -var FStringFormatSpecCtx= -$B.parser.FStringFormatSpecCtx=function(C){this.type='fstring_format_spec' -this.tree=[] -this.parent=C -this.position=$token.value -C.tree.push(this)} -FStringFormatSpecCtx.prototype.transition=function(token,value){var C=this -if(token=='middle'){var quotes=this.parent.parent.quotes -new StringCtx(C,escape_quotes(value,quotes)) -return C}else if(token=='{'){return new AbstractExprCtx(new FStringReplacementFieldCtx(C),false)}else if(token=='}'){return transition(C.parent,token,value)} -raise_syntax_error(C)} -FStringFormatSpecCtx.prototype.ast=function(){if(this.tree.length==1){return this.tree[0].ast()}else{return FStringCtx.prototype.ast.call(this)}} -var FuncArgs=$B.parser.FuncArgs=function(C){ -this.type='func_args' -this.parent=C -this.tree=[] -this.names=[] -C.tree[C.tree.length]=this -this.expect='id' -this.has_default=false -this.has_star_arg=false -this.has_kw_arg=false} -FuncArgs.prototype.ast=function(){var args={posonlyargs:[],args:[],kwonlyargs:[],kw_defaults:[],defaults:[]},state='arg',default_value -for(var arg of this.tree){if(arg.type=='end_positional'){args.posonlyargs=args.args -args.args=[]}else if(arg.type=='func_star_arg'){state='kwonly' -if(arg.op=='*' && arg.name !='*'){args.vararg=new ast.arg(arg.name) -if(arg.annotation){args.vararg.annotation=arg.annotation.tree[0].ast()} -set_position(args.vararg,arg.position)}else if(arg.op=='**'){args.kwarg=new ast.arg(arg.name) -if(arg.annotation){args.kwarg.annotation=arg.annotation.tree[0].ast()} -set_position(args.kwarg,arg.position)}}else{default_value=false -if(arg.has_default){default_value=arg.tree[0].ast()} -var argument=new ast.arg(arg.name) -set_position(argument,arg.position,last_position(arg)) -if(arg.annotation){argument.annotation=arg.annotation.tree[0].ast()} -if(state=='kwonly'){args.kwonlyargs.push(argument) -if(default_value){args.kw_defaults.push(default_value)}else{args.kw_defaults.push(_b_.None)}}else{args.args.push(argument) -if(default_value){args.defaults.push(default_value)}}}} -var res=new ast.arguments(args.posonlyargs,args.args,args.vararg,args.kwonlyargs,args.kw_defaults,args.kwarg,args.defaults) -return res} -FuncArgs.prototype.transition=function(token,value){var C=this -function check(){if(C.tree.length==0){return} -var last=$B.last(C.tree) -if(C.has_default && ! last.has_default){if(last.type=='func_star_arg' || -last.type=='end_positional'){return} -if(C.has_star_arg){ -return} -raise_syntax_error(C,'non-default argument follows default argument')} -if(last.has_default){C.has_default=true}} -function check_last(){var last=$B.last(C.tree) -if(last && last.type=="func_star_arg"){if(last.name=="*"){ -raise_syntax_error(C,'named arguments must follow bare *')}}} -switch(token){case 'id': -if(C.has_kw_arg){raise_syntax_error(C,'duplicate keyword argument')} -if(C.expect=='id'){C.expect=',' -if(C.names.indexOf(value)>-1){raise_syntax_error(C,'duplicate argument '+value+ -' in function definition')}} -return new FuncArgIdCtx(C,value) -case ',': -if(C.expect==','){check() -C.expect='id' -return C} -raise_syntax_error(C) -case ')': -check() -check_last() -return transition(C.parent,token,value) -case 'op': -if(C.has_kw_arg){raise_syntax_error(C,"(unpacking after '**' argument)")} -var op=value -C.expect=',' -if(op=='*'){if(C.has_star_arg){raise_syntax_error(C,"(only one '*' argument allowed)")} -return new FuncStarArgCtx(C,'*')}else if(op=='**'){return new FuncStarArgCtx(C,'**')}else if(op=='/'){ -if(C.has_end_positional){raise_syntax_error(C,'/ may appear only once')}else if(C.has_star_arg){raise_syntax_error(C,'/ must be ahead of *')} -return new EndOfPositionalCtx(C)} -raise_syntax_error(C) -case ':': -if(C.parent.type=="lambda"){return transition(C.parent,token)}} -raise_syntax_error(C)} -var FuncArgIdCtx=$B.parser.FuncArgIdCtx=function(C,name){ -this.type='func_arg_id' -if(["None","True","False"].indexOf(name)>-1){raise_syntax_error(C)} -if(name=='__debug__'){raise_syntax_error(C,'cannot assign to __debug__')} -this.name=name -this.parent=C -this.position=$token.value -if(C.has_star_arg){C.parent.after_star.push(name)}else{C.parent.positional_list.push(name)} -this.tree=[] -C.tree[C.tree.length]=this -this.expect='='} -FuncArgIdCtx.prototype.transition=function(token,value){var C=this -switch(token){case '=': -if(C.expect=='='){C.has_default=true -var def_ctx=C.parent.parent -if(C.parent.has_star_arg){def_ctx.default_list.push(def_ctx.after_star.pop())}else{def_ctx.default_list.push(def_ctx.positional_list.pop())} -return new AbstractExprCtx(C,false)} -break -case ',': -case ')': -if(C.parent.has_default && C.tree.length==0 && -C.parent.has_star_arg===undefined){raise_syntax_error(C,'non-default argument follows default argument')}else{return transition(C.parent,token)} -case ':': -if(C.parent.parent.type=="lambda"){ -return transition(C.parent.parent,":")} -if(C.has_default){ -raise_syntax_error(C)} -return new AbstractExprCtx(new AnnotationCtx(C),false)} -raise_syntax_error(C)} -var FuncStarArgCtx=$B.parser.FuncStarArgCtx=function(C,op){ -this.type='func_star_arg' -this.op=op -this.parent=C -this.node=get_node(this) -this.position=$token.value -C.has_star_arg=op=='*' -C.has_kw_arg=op=='**' -C.tree[C.tree.length]=this} -FuncStarArgCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.name===undefined){if(C.parent.names.indexOf(value)>-1){raise_syntax_error(C,'duplicate argument '+value+ -' in function definition')}} -if(["None","True","False"].indexOf(value)>-1){raise_syntax_error(C)} -C.set_name(value) -C.parent.names.push(value) -return C -case ',': -case ')': -if(C.name===undefined){ -C.set_name('*') -C.parent.names.push('*')} -return transition(C.parent,token) -case ':': -if(C.parent.parent.type=="lambda"){ -if(C.name===undefined){raise_syntax_error(C,'named arguments must follow bare *')} -return transition(C.parent.parent,":")} -if(C.name===undefined){raise_syntax_error(C,'(annotation on an unnamed parameter)')} -return new AbstractExprCtx( -new AnnotationCtx(C),false)} -raise_syntax_error(C)} -FuncStarArgCtx.prototype.set_name=function(name){if(name=='__debug__'){raise_syntax_error_known_range(this,this.position,$token.value,'cannot assign to __debug__')} -this.name=name -var ctx=this.parent -while(ctx.parent !==undefined){if(ctx.type=='def'){break} -ctx=ctx.parent} -if(this.op=='*'){ctx.other_args='"'+name+'"'}else{ctx.other_kw='"'+name+'"'}} -var GeneratorExpCtx=function(C){ -this.type='genexpr' -this.tree=[C.tree[0]] -this.tree[0].parent=this -this.position=C.position -Comprehension.make_comp(this,C)} -GeneratorExpCtx.prototype.ast=function(){ -var res=new ast.GeneratorExp( -this.tree[0].ast(),Comprehension.generators(this.tree.slice(1)) -) -set_position(res,this.position) -return res} -GeneratorExpCtx.prototype.transition=function(token,value){var C=this -if(token==')'){if(this.parent.type=='call'){ -if(C.parent.tree.length > 1){raise_syntax_error_known_range(C,first_position(C),last_position(C),'Generator expression must be parenthesized')} -return this.parent.parent} -return this.parent} -raise_syntax_error(C)} -var GlobalCtx=$B.parser.GlobalCtx=function(C){ -this.type='global' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this -this.expect='id' -this.scope=get_scope(this) -this.module=get_module(this) -if(this.module.module !==''){ -while(this.module.module !=this.module.id){this.module=this.module.parent_block}}} -GlobalCtx.prototype.ast=function(){ -var ast_obj=new ast.Global(this.tree.map(item=> item.value)) -set_position(ast_obj,this.position) -return ast_obj} -GlobalCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.expect=='id'){new IdCtx(C,value) -C.add(value) -C.expect=',' -return C} -break -case ',': -if(C.expect==','){C.expect='id' -return C} -break -case 'eol': -if(C.expect==','){return transition(C.parent,token)} -break} -raise_syntax_error(C)} -GlobalCtx.prototype.add=function(name){if(this.scope.type=="module"){ -return} -var mod=this.scope.parent_block -if(this.module.module.startsWith("$exec")){while(mod && mod.parent_block !==this.module){ -mod._globals=mod._globals ||new Map() -mod._globals.set(name,this.module.id) -mod=mod.parent_block}}} -var IdCtx=$B.parser.IdCtx=function(C,value){ -this.type='id' -this.value=value -this.parent=C -this.tree=[] -C.tree[C.tree.length]=this -this.position=$token.value -var scope=this.scope=get_scope(this) -this.blurred_scope=this.scope.blurred -if(["def","generator"].indexOf(scope.ntype)>-1){if((!(C instanceof GlobalCtx))&& -!(C instanceof NonlocalCtx)){scope.referenced=scope.referenced ||{} -if(! $B.builtins[this.value]){scope.referenced[this.value]=true}}} -if(C.parent.type=='call_arg'){this.call_arg=true}} -IdCtx.prototype.ast=function(){var ast_obj -if(['True','False','None'].indexOf(this.value)>-1){ast_obj=new ast.Constant(_b_[this.value])}else{ast_obj=new ast.Name(this.value,this.bound ? new ast.Store():new ast.Load())} -set_position(ast_obj,this.position) -return ast_obj} -IdCtx.prototype.transition=function(token,value){var C=this,module=get_module(this) -if(C.value=='case' && C.parent.parent.type=="node"){ -var save_position=module.token_reader.position,ends_with_comma=check_line(module.token_reader,module.filename) -module.token_reader.position=save_position -if(ends_with_comma){var node=get_node(C),parent=node.parent -if((! node.parent)||!(node.parent.is_match)){raise_syntax_error(C,"('case' not inside 'match')")}else{if(node.parent.irrefutable){ -var name=node.parent.irrefutable,msg=name=='_' ? 'wildcard' : -`name capture '${name}'` -raise_syntax_error(C,`${msg} makes remaining patterns unreachable`)}} -return transition(new PatternCtx( -new CaseCtx(C.parent.parent)),token,value)}}else if(C.value=='match' && C.parent.parent.type=="node"){ -var save_position=module.token_reader.position,ends_with_comma=check_line(module.token_reader,module.filename) -module.token_reader.position=save_position -if(ends_with_comma){return transition(new AbstractExprCtx( -new MatchCtx(C.parent.parent),true),token,value)}}else if(C.value=='type' && C.parent.parent.type=="node"){if(token=='id'){ -return new TypeAliasCtx(C,value)}} -switch(token){case '=': -if(C.parent.type=='expr' && -C.parent.parent !==undefined && -C.parent.parent.type=='call_arg'){return new AbstractExprCtx( -new KwArgCtx(C.parent),false)} -return transition(C.parent,token,value) -case '.': -delete this.bound -return transition(C.parent,token,value) -case 'op': -return transition(C.parent,token,value) -case 'id': -case 'str': -case 'JoinedStr': -case 'int': -case 'float': -case 'imaginary': -if(["print","exec"].indexOf(C.value)>-1 ){var f=C.value,msg=`Missing parentheses in call to '${f}'.`+ -` Did you mean ${f}(...)?`}else{var msg='invalid syntax. Perhaps you forgot a comma?'} -var call_arg=parent_match(C,{type:'call_arg'}) -raise_syntax_error_known_range(C,this.position,$token.value,msg)} -if(this.parent.parent.type=="starred"){if(['.','[','('].indexOf(token)==-1){return this.parent.parent.transition(token,value)}} -return transition(C.parent,token,value)} -var ImportCtx=$B.parser.ImportCtx=function(C){ -this.type='import' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this -this.expect='id'} -ImportCtx.prototype.ast=function(){ -var names=[] -for(var item of this.tree){ -var alias=new ast.alias(item.name) -if(item.alias !=item.name){alias.asname=item.alias} -names.push(alias)} -var ast_obj=new ast.Import(names) -set_position(ast_obj,this.position) -return ast_obj} -ImportCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.expect=='id'){if(C.order_error){raise_syntax_error(C,"Did you mean to use 'from ... import ...' instead?")} -new ImportedModuleCtx(C,value) -C.expect=',' -return C} -if(C.expect=='qual'){C.expect=',' -C.tree[C.tree.length-1].name+= -'.'+value -C.tree[C.tree.length-1].alias+= -'.'+value -return C} -if(C.expect=='alias'){C.expect=',' -C.tree[C.tree.length-1].alias= -value -return C} -break -case '.': -if(C.expect==','){C.expect='qual' -return C} -break -case ',': -if(C.expect==','){C.expect='id' -return C} -break -case 'as': -if(C.expect==','){C.expect='alias' -return C} -break -case 'eol': -if(C.expect==','){return transition(C.parent,token)} -break -case 'from': -if(C.expect==','){C.expect='id' -C.order_error=true -return C} -break} -raise_syntax_error(C)} -var ImportedModuleCtx=$B.parser.ImportedModuleCtx=function(C,name){this.type='imported module' -this.parent=C -this.name=name -this.alias=name -C.tree[C.tree.length]=this} -ImportedModuleCtx.prototype.transition=function(token,value){var C=this} -var JoinedStrCtx=$B.parser.JoinedStrCtx=function(C,values){ -this.type='JoinedStr' -this.parent=C -this.tree=[] -this.position=$token.value -this.scope=get_scope(C) -var line_num=get_node(C).line_num -for(var value of values){if(typeof value=="string"){new StringCtx(this,"'"+ -value.replace(new RegExp("'","g"),"\\"+"'")+"'")}else{if(value.format !==undefined){value.format=new JoinedStrCtx(this,value.format) -this.tree.pop()} -var src=value.expression.trimStart(), -filename=get_module(this).filename,root=create_root_node(src,this.scope.module,this.scope.id,this.scope.parent_block,line_num) -try{dispatch_tokens(root)}catch(err){var fstring_lineno=this.position.start[0],fstring_offset=this.position.start[1] -err.filename=get_module(this).filename -err.lineno+=fstring_lineno-1 -err.offset+=fstring_offset-1 -err.end_lineno+=fstring_lineno-1 -err.end_offset+=fstring_offset-1 -err.text=this.position.string -err.args[1]=$B.fast_tuple([filename,err.lineno,err.offset,err.text,err.end_lineno,err.end_offset]) -throw err} -var expr=root.children[0].C.tree[0] -this.tree.push(expr) -expr.parent=this -expr.elt=value}} -C.tree.push(this) -this.raw=false} -JoinedStrCtx.prototype.ast=function(){var res={type:'JoinedStr',values:[]} -var state -for(var item of this.tree){if(item instanceof StringCtx){if(state=='string'){ -$B.last(res.values).value+=item.value}else{var item_ast=new ast.Constant(item.value) -set_position(item_ast,item.position) -res.values.push(item_ast)} -state='string'}else{var conv_num={a:97,r:114,s:115},format=item.elt.format -format=format===undefined ? format :format.ast() -var value=new ast.FormattedValue( -item.ast(),conv_num[item.elt.conversion]||-1,format) -set_position(value,this.position) -var format=item.format -if(format !==undefined){value.format=item.format.ast()} -res.values.push(value) -state='formatted_value'}} -var ast_obj=new ast.JoinedStr(res.values) -set_position(ast_obj,this.position) -return ast_obj} -JoinedStrCtx.prototype.transition=function(token,value){var C=this -switch(token){case '[': -return new AbstractExprCtx(new SubscripCtx(C.parent),false) -case '(': -C.parent.tree[0]=C -return new CallCtx(C.parent) -case 'str': -if(C.tree.length > 0 && -$B.last(C.tree).type=="str"){C.tree[C.tree.length-1].add_value(value)}else{new StringCtx(this,value)} -return C -case 'JoinedStr': -var joined_expr=new JoinedStrCtx(C.parent,value) -C.parent.tree.pop() -if(C.tree.length > 0 && -$B.last(C.tree)instanceof StringCtx && -joined_expr.tree[0]instanceof StringCtx){ -$B.last(C.tree).value+=joined_expr.tree[0].value -C.tree=C.tree.concat(joined_expr.tree.slice(1))}else{C.tree=C.tree.concat(joined_expr.tree)} -return C} -return transition(C.parent,token,value)} -var KwdCtx=$B.parser.KwdCtx=function(C){ -this.type='kwd' -this.position=C.position -this.parent=C -this.tree=[] -C.tree.push(this)} -KwdCtx.prototype.ast=function(){var ast_obj=new $B.ast.keyword(this.tree[0].ast(),new ast.Load()) -set_position(ast_obj,this.position) -return ast_obj} -KwdCtx.prototype.transition=function(token,value){var C=this -return transition(C.parent,token,value)} -var KwArgCtx=$B.parser.KwArgCtx=function(C){ -this.type='kwarg' -this.parent=C.parent -this.position=first_position(C) -this.equal_sign_position=$token.value -this.tree=[C.tree[0]] -C.parent.tree.pop() -C.parent.tree.push(this) -C.parent.parent.has_kw=true} -KwArgCtx.prototype.transition=function(token,value){var C=this -if(token==','){return new CallArgCtx(C.parent.parent)}else if(token=='for'){ -raise_syntax_error_known_range(C,C.position,C.equal_sign_position,"invalid syntax. "+ -"Maybe you meant '==' or ':=' instead of '='?")} -return transition(C.parent,token)} -var LambdaCtx=$B.parser.LambdaCtx=function(C){ -this.type='lambda' -this.parent=C -C.tree[C.tree.length]=this -this.tree=[] -this.position=$token.value -this.node=get_node(this) -this.positional_list=[] -this.default_list=[] -this.other_args=null -this.other_kw=null -this.after_star=[]} -LambdaCtx.prototype.ast=function(){ -var args -if(this.args.length==0){args=new ast.arguments([],[],undefined,[],[],undefined,[])}else{args=this.args[0].ast()} -var ast_obj=new ast.Lambda(args,this.tree[0].ast()) -set_position(ast_obj,this.position) -return ast_obj} -LambdaCtx.prototype.transition=function(token,value){var C=this -if(token==':' && C.args===undefined){C.args=C.tree -C.tree=[] -return new AbstractExprCtx(C,false)} -if(C.args !==undefined){ -return transition(C.parent,token)} -if(C.args===undefined){if(token=='('){raise_syntax_error(C,'Lambda expression parameters cannot be parenthesized')}else if(C.tree.length > 0 && -C.tree[0].type=='func_args'){ -raise_syntax_error(C)}else{return transition(new FuncArgs(C),token,value)}} -raise_syntax_error(C)} -var ListCompCtx=function(C){ -this.type='listcomp' -this.tree=[C.tree[0]] -this.tree[0].parent=this -this.position=$token.value -Comprehension.make_comp(this,C)} -ListCompCtx.prototype.ast=function(){ -var res=new ast.ListComp( -this.tree[0].ast(),Comprehension.generators(this.tree.slice(1))) -set_position(res,this.position) -return res} -ListCompCtx.prototype.transition=function(token,value){var C=this -if(token==']'){return this.parent} -raise_syntax_error(C)} -var ListOrTupleCtx=$B.parser.ListOrTupleCtx=function(C,real){ -this.type='list_or_tuple' -this.real=real -this.expect='id' -this.closed=false -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this} -ListOrTupleCtx.prototype.ast=function(){var elts=this.tree.map(x=> x.ast()),ast_obj -if(this.real=='list'){ast_obj=new ast.List(elts,new ast.Load())}else if(this.real=='tuple'){ast_obj=new ast.Tuple(elts,new ast.Load())} -set_position(ast_obj,this.position,this.end_position) -return ast_obj} -ListOrTupleCtx.prototype.transition=function(token,value){var C=this -if(C.closed){if(token=='['){return new AbstractExprCtx( -new SubscripCtx(C.parent),false)} -if(token=='('){return new CallCtx(C.parent)} -return transition(C.parent,token,value)}else{if(C.expect==','){switch(C.real){case 'tuple': -if(token==')'){if(C.implicit){return transition(C.parent,token,value)} -var close=true -C.end_position=$token.value -if(C.tree.length==1){if(parent_match(C,{type:'del'})&& -C.tree[0].type=='expr' && -C.tree[0].tree[0].type=='starred'){raise_syntax_error_known_range(C,C.tree[0].tree[0].position,last_position(C.tree[0]),'cannot use starred expression here')} -var grandparent=C.parent.parent -grandparent.tree.pop() -grandparent.tree.push(C.tree[0]) -C.tree[0].$was_parenthesized=true -C.tree[0].parent=grandparent -return C.tree[0]} -if(C.packed || -(C.type=='list_or_tuple' && -C.tree.length==1 && -C.tree[0].type=='expr' && -C.tree[0].tree[0].type=='starred')){ -raise_syntax_error(C,"cannot use starred expression here")} -if(close){C.close()} -if(C.parent.type=="starred"){return C.parent.parent} -return C.parent} -break -case 'list': -if(token==']'){C.close() -if(C.parent.type=="starred"){if(C.parent.tree.length > 0){return C.parent.tree[0]}else{return C.parent.parent}} -return C.parent} -break} -switch(token){case ',': -if(C.real=='tuple'){C.has_comma=true} -C.expect='id' -return C -case 'for': -if(C.real=='list'){if(this.tree.length > 1){ -raise_syntax_error(C,"did you forget "+ -"parentheses around the comprehension target?")} -return new TargetListCtx(new ForExpr( -new ListCompCtx(C)))} -else{return new TargetListCtx(new ForExpr( -new GeneratorExpCtx(C)))}} -return transition(C.parent,token,value)}else if(C.expect=='id'){switch(C.real){case 'tuple': -if(token==')'){C.close() -return C.parent} -if(token=='eol' && -C.implicit===true){C.close() -return transition(C.parent,token)} -break -case 'list': -if(token==']'){C.close() -return C} -break} -switch(token){case '=': -if(C.real=='tuple' && -C.implicit===true){C.close() -C.parent.tree.pop() -var expr=new ExprCtx(C.parent,'tuple',false) -expr.tree=[C] -C.parent=expr -return transition(C.parent,token)} -raise_syntax_error(C,"(unexpected '=' inside list)") -break -case ')': -break -case ']': -if(C.real=='tuple' && -C.implicit===true){ -return transition(C.parent,token,value)}else{break} -raise_syntax_error(C,'(unexpected "if" inside list)') -case ',': -raise_syntax_error(C,'(unexpected comma inside list)') -case 'str': -case 'JoinedStr': -case 'int': -case 'float': -case 'imaginary': -case 'ellipsis': -case 'lambda': -case 'yield': -case 'id': -case '(': -case '[': -case '{': -case 'await': -case 'not': -case ':': -C.expect=',' -var expr=new AbstractExprCtx(C,false) -return transition(expr,token,value) -case 'op': -if('+-~*'.indexOf(value)>-1 ||value=='**'){C.expect=',' -var expr=new AbstractExprCtx(C,false) -return transition(expr,token,value)} -raise_syntax_error(C,`(unexpected operator: ${value})`) -default: -raise_syntax_error(C)}}else{return transition(C.parent,token,value)}}} -ListOrTupleCtx.prototype.close=function(){this.closed=true -this.end_position=$token.value -this.src=get_module(this).src -for(var i=0,len=this.tree.length;i < len;i++){ -var elt=this.tree[i] -if(elt.type=="expr" && -elt.tree[0].type=="list_or_tuple" && -elt.tree[0].real=="tuple" && -elt.tree[0].tree.length==1 && -elt.tree[0].expect==","){this.tree[i]=elt.tree[0].tree[0] -this.tree[i].parent=this}}} -var MatchCtx=$B.parser.MatchCtx=function(node_ctx){ -this.type="match" -this.position=$token.value -node_ctx.tree=[this] -node_ctx.node.is_match=true -this.parent=node_ctx -this.tree=[] -this.expect='as' -this.token_position=get_module(this).token_reader.position} -MatchCtx.prototype.ast=function(){ -var res=new ast.Match(this.tree[0].ast(),ast_body(this.parent)) -set_position(res,this.position) -res.$line_num=get_node(this).line_num -return res} -MatchCtx.prototype.transition=function(token,value){var C=this -switch(token){case ':': -if(this.tree[0].type=='list_or_tuple'){remove_abstract_expr(this.tree[0].tree)} -switch(C.expect){case 'id': -case 'as': -case ':': -return BodyCtx(C)} -break -case 'eol': -raise_syntax_error(C,"expected ':'")} -raise_syntax_error(C)} -var NamedExprCtx=function(C){ -this.type='named_expr' -this.position=C.position -this.target=C.tree[0] -C.tree.pop() -C.tree.push(this) -this.parent=C -this.target.parent=this -this.tree=[] -if(C.parent.type=='list_or_tuple' && -C.parent.real=='tuple'){ -this.parenthesized=true}} -NamedExprCtx.prototype.ast=function(){var res=new ast.NamedExpr(this.target.ast(),this.tree[0].ast()) -res.target.ctx=new ast.Store() -set_position(res,this.position) -return res} -NamedExprCtx.prototype.transition=function(token,value){return transition(this.parent,token,value)} -var NodeCtx=$B.parser.NodeCtx=function(node){ -this.node=node -node.C=this -this.tree=[] -this.type='node' -var scope=null -var tree_node=node -while(tree_node.parent && tree_node.parent.type !='module'){var ntype=tree_node.parent.C.tree[0].type,_break_flag=false -switch(ntype){case 'def': -case 'class': -case 'generator': -scope=tree_node.parent -_break_flag=true} -if(_break_flag){break} -tree_node=tree_node.parent} -if(scope===null){scope=tree_node.parent ||tree_node } -this.scope=scope} -NodeCtx.prototype.transition=function(token,value){var C=this -if(this.node.parent && this.node.parent.C){var pctx=this.node.parent.C -if(pctx.tree && pctx.tree.length==1 && -pctx.tree[0].type=="match"){if(token !='eol' &&(token !=='id' ||value !=='case')){raise_syntax_error(C)}}} -if(this.tree.length==0 && this.node.parent){var rank=this.node.parent.children.indexOf(this.node) -if(rank > 0){var previous=this.node.parent.children[rank-1] -if(previous.C.tree[0].type=='try' && -['except','finally'].indexOf(token)==-1){raise_syntax_error(C,"expected 'except' or 'finally' block")}}} -switch(token){case ',': -if(C.tree && C.tree.length==0){raise_syntax_error(C)} -var first=C.tree[0] -C.tree=[] -var implicit_tuple=new ListOrTupleCtx(C) -implicit_tuple.real="tuple" -implicit_tuple.implicit=0 -implicit_tuple.tree.push(first) -first.parent=implicit_tuple -return implicit_tuple -case '[': -case '(': -case '{': -case '.': -case 'bytes': -case 'float': -case 'id': -case 'imaginary': -case 'int': -case 'str': -case 'JoinedStr': -case 'not': -case 'lambda': -var expr=new AbstractExprCtx(C,true) -return transition(expr,token,value) -case 'assert': -return new AbstractExprCtx( -new AssertCtx(C),false,true) -case 'async': -return new AsyncCtx(C) -case 'await': -return new AbstractExprCtx(new AwaitCtx(C),false) -case 'break': -return new BreakCtx(C) -case 'class': -return new ClassCtx(C) -case 'continue': -return new ContinueCtx(C) -case 'def': -return new DefCtx(C) -case 'del': -return new AbstractExprCtx(new DelCtx(C),true) -case 'elif': -try{var previous=get_previous(C)}catch(err){raise_syntax_error(C,"('elif' does not follow 'if')")} -if(['condition'].indexOf(previous.type)==-1 || -previous.token=='while'){raise_syntax_error(C,`(elif after ${previous.type})`)} -return new AbstractExprCtx( -new ConditionCtx(C,token),false) -case 'ellipsis': -var expr=new AbstractExprCtx(C,true) -return transition(expr,token,value) -case 'else': -var previous=get_previous(C) -if(['condition','except','for']. -indexOf(previous.type)==-1){raise_syntax_error(C,`(else after ${previous.type})`)} -return new SingleKwCtx(C,token) -case 'except': -var previous=get_previous(C) -if(['try','except'].indexOf(previous.type)==-1){raise_syntax_error(C,`(except after ${previous.type})`)} -return new ExceptCtx(C) -case 'finally': -var previous=get_previous(C) -if(['try','except'].indexOf(previous.type)==-1 && -(previous.type !='single_kw' || -previous.token !='else')){raise_syntax_error(C,`finally after ${previous.type})`)} -return new SingleKwCtx(C,token) -case 'for': -return new TargetListCtx(new ForExpr(C)) -case 'from': -return new FromCtx(C) -case 'global': -return new GlobalCtx(C) -case 'if': -case 'while': -return new AbstractExprCtx( -new ConditionCtx(C,token),false) -case 'import': -return new ImportCtx(C) -case 'lambda': -return new LambdaCtx(C) -case 'nonlocal': -return new NonlocalCtx(C) -case 'op': -switch(value){case '*': -var expr=new AbstractExprCtx(C,true) -return transition(expr,token,value) -case '+': -case '-': -case '~': -C.position=$token.value -var expr=new ExprCtx(C,'unary',true) -return new AbstractExprCtx( -new UnaryCtx(expr,value),false) -case '@': -return new AbstractExprCtx(new DecoratorCtx(C),false)} -break -case 'pass': -return new PassCtx(C) -case 'raise': -return new AbstractExprCtx(new RaiseCtx(C),false) -case 'return': -return new AbstractExprCtx(new ReturnCtx(C),true) -case 'try': -return new TryCtx(C) -case 'with': -return new WithCtx(C) -case 'yield': -return new AbstractExprCtx(new YieldCtx(C),true) -case 'eol': -if(C.maybe_type){if(C.tree.length > 0 && C.tree[0].type=='assign'){alert('type soft keyword')}else{raise_syntax_error(C)}} -if(C.tree.length==0){ -C.node.parent.children.pop() -return C.node.parent.C} -return C} -console.log('error, C',C,'token',token,value) -raise_syntax_error(C)} -var NonlocalCtx=$B.parser.NonlocalCtx=function(C){ -this.type='nonlocal' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this -this.expect='id' -this.scope=get_scope(this) -this.scope.nonlocals=this.scope.nonlocals ||new Set()} -NonlocalCtx.prototype.ast=function(){ -var ast_obj=new ast.Nonlocal(this.tree.map(item=> item.value)) -set_position(ast_obj,this.position) -return ast_obj} -NonlocalCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.expect=='id'){new IdCtx(C,value) -C.expect=',' -return C} -break -case ',': -if(C.expect==','){C.expect='id' -return C} -break -case 'eol': -if(C.expect==','){return transition(C.parent,token)} -break} -raise_syntax_error(C)} -var NotCtx=$B.parser.NotCtx=function(C){ -this.type='not' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this} -NotCtx.prototype.ast=function(){var ast_obj=new ast.UnaryOp(new ast.Not(),this.tree[0].ast()) -set_position(ast_obj,this.position) -return ast_obj} -NotCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'in': -C.parent.parent.tree.pop() -return new ExprCtx(new OpCtx(C.parent,'not_in'),'op',false) -case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case '.': -case 'not': -case 'lambda': -var expr=new AbstractExprCtx(C,false) -return transition(expr,token,value) -case 'op': -var a=value -if('+'==a ||'-'==a ||'~'==a){var expr=new AbstractExprCtx(C,false) -return transition(expr,token,value)}} -return transition(C.parent,token)} -var NumberCtx=$B.parser.NumberCtx=function(type,C,value){ -this.type=type -this.value=value -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this} -NumberCtx.prototype.ast=function(){var value=$B.AST.$convert(this), -ast_obj=new $B.ast.Constant(value) -set_position(ast_obj,this.position) -return ast_obj} -NumberCtx.prototype.transition=function(token,value){var C=this -var num_type={2:'binary',8:'octal',10:'decimal',16:'hexadecimal'}[this.value[0]] -if(token=='id'){if(value=='_'){raise_syntax_error(C,'invalid decimal literal')}else if(["and","else","for","if","in","is","or"].indexOf(value)==-1){raise_syntax_error(C,`invalid ${num_type} literal`)}else if(num_type=='hexadecimal' && this.value[1].length % 2==1){$B.warn(_b_.SyntaxWarning,`invalid hexadecimal literal`,get_module(C).filename,$token.value)}}else if(token=='op'){if(["and","in","is","or"].indexOf(value)>-1 && -num_type=='hexadecimal' && -this.value[1].length % 2==1){$B.warn(_b_.SyntaxWarning,`invalid hexadecimal literal`,get_module(C).filename,$token.value)}} -return transition(C.parent,token,value)} -var OpCtx=$B.parser.OpCtx=function(C,op){ -this.type='op' -this.op=op -this.parent=C.parent -this.position=$token.value -this.tree=[C] -this.scope=get_scope(this) -if(C.type=="expr"){if(['int','float','str'].indexOf(C.tree[0].type)>-1){this.left_type=C.tree[0].type}} -C.parent.tree.pop() -C.parent.tree.push(this)} -OpCtx.prototype.ast=function(){ -var ast_type_class=op2ast_class[this.op],op_type=ast_type_class[0],ast_class=ast_type_class[1],ast_obj -if(op_type===ast.Compare){var left=this.tree[0].ast(),ops=[new ast_class()] -if(this.ops){for(var op of this.ops.slice(1)){ops.push(new op2ast_class[op][1]())} -ast_obj=new ast.Compare(left,ops,this.tree.slice(1).map(x=> x.ast()))}else{ast_obj=new ast.Compare(left,ops,[this.tree[1].ast()])}}else if(op_type===ast.UnaryOp){ast_obj=new op_type(new ast_class(),this.tree[1].ast())}else if(op_type===ast.BoolOp){ -var values=[this.tree[1]],main_op=this.op,ctx=this -while(ctx.tree[0].type=='op' && ctx.tree[0].op==main_op){values.splice(0,0,ctx.tree[0].tree[1]) -ctx=ctx.tree[0]} -values.splice(0,0,ctx.tree[0]) -ast_obj=new op_type(new ast_class(),values.map(x=> x.ast()))}else{ast_obj=new op_type( -this.tree[0].ast(),new ast_class(),this.tree[1].ast())} -set_position(ast_obj,this.position) -return ast_obj} -function is_literal(expr){return expr.type=='expr' && -['int','str','float','imaginary'].indexOf(expr.tree[0].type)>-1} -OpCtx.prototype.transition=function(token,value){var C=this -if(C.op===undefined){console.log('C has no op',C) -raise_syntax_error(C)} -if((C.op=='is' ||C.op=='is_not') -&& C.tree.length > 1){for(var operand of C.tree){if(is_literal(operand)){var head=C.op=='is' ? 'is' :'is not' -$B.warn(_b_.SyntaxWarning,`"${head}" with a literal. Did you mean "=="?"`,get_module(C).filename,$token.value) -break}}} -switch(token){case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case '.': -case 'not': -case 'lambda': -return transition(new AbstractExprCtx(C,false),token,value) -case 'op': -switch(value){case '+': -case '-': -case '~': -return new UnaryCtx(C,value)} -default: -if(C.tree[C.tree.length-1].type== -'abstract_expr'){raise_syntax_error(C)}} -return transition(C.parent,token)} -var PassCtx=$B.parser.PassCtx=function(C){ -this.type='pass' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this} -PassCtx.prototype.ast=function(){var ast_obj=new ast.Pass() -set_position(ast_obj,this.position) -return ast_obj} -PassCtx.prototype.transition=function(token,value){var C=this -if(token=='eol'){return C.parent} -raise_syntax_error(C)} -var PatternCtx=$B.parser.PatternCtx=function(C){ -this.type="pattern" -this.parent=C -this.tree=[] -C.tree.push(this) -this.expect='id'} -PatternCtx.prototype.transition=function(token,value){var C=this -switch(C.expect){case 'id': -switch(token){case 'str': -case 'int': -case 'float': -case 'imaginary': -C.expect=',' -return new PatternLiteralCtx(C,token,value) -case 'op': -switch(value){case '-': -case '+': -C.expect=',' -return new PatternLiteralCtx(C,{sign:value}) -case '*': -C.expect='starred_id' -return C -default: -raise_syntax_error(C)} -case 'id': -C.expect=',' -if(['None','True','False'].indexOf(value)>-1){return new PatternLiteralCtx(C,token,value)}else{return new PatternCaptureCtx(C,value)} -break -case '[': -return new PatternCtx( -new PatternSequenceCtx(C.parent,token)) -case '(': -return new PatternCtx( -new PatternGroupCtx(C.parent,token)) -case '{': -return new PatternMappingCtx(C.parent,token) -case 'JoinedStr': -raise_syntax_error(C,"patterns may only match "+ -"literals and attribute lookups")} -break -case 'starred_id': -if(token=='id'){var capture=new PatternCaptureCtx(C,value) -capture.starred=true -return capture} -raise_syntax_error(C,"(expected id after '*')") -case 'number': -switch(token){case 'int': -case 'float': -case 'imaginary': -C.expect=',' -return new PatternLiteralCtx(C,token,value,C.sign) -default: -raise_syntax_error(C)} -case ',': -switch(token){case ',': -if(C.parent instanceof PatternSequenceCtx){return new PatternCtx(C.parent)} -return new PatternCtx( -new PatternSequenceCtx(C.parent)) -case ':': -return BodyCtx(C)}} -return C.parent.transition(token,value)} -function as_pattern(C,token,value){ -if(C.expect=='as'){if(token=='as'){C.expect='alias' -return C}else{return transition(C.parent,token,value)}}else if(C.expect=='alias'){if(token=='id'){if(value=='_'){raise_syntax_error(C,"cannot use '_' as a target")} -if(C.bindings().indexOf(value)>-1){raise_syntax_error(C,`multiple assignments to name '${value}' in pattern`)} -C.alias=value -return C.parent}else{raise_syntax_error(C,'invalid pattern target')}}} -var PatternCaptureCtx=function(C,value){ -this.type="capture_pattern" -this.parent=C.parent -C.parent.tree.pop() -C.parent.tree.push(this) -this.tree=[value] -this.position=$token.value -this.positions=[this.position] -this.expect='.'} -PatternCaptureCtx.prototype.ast=function(){var ast_obj -try{if(this.tree.length > 1){var pattern=new ast.Name(this.tree[0],new ast.Load()) -set_position(pattern,this.position) -for(var i=1;i < this.tree.length;i++){pattern=new ast.Attribute(pattern,this.tree[i],new ast.Load()) -copy_position(pattern,pattern.value)} -pattern=new ast.MatchValue(pattern) -copy_position(pattern,pattern.value)}else if(this.starred){var v=this.tree[0] -if(v=='_'){ast_obj=new ast.MatchStar()}else{ast_obj=new ast.MatchStar(v)} -set_position(ast_obj,this.position)}else{var pattern=this.tree[0] -if(typeof pattern=='string'){}else if(pattern.type=='group_pattern'){pattern=pattern.ast()}else{console.log('bizarre',pattern) -pattern=NumberCtx.prototype.ast.bind(this)()} -if(pattern=='_'){pattern=new ast.MatchAs() -set_position(pattern,this.position)}} -if(this.alias){if(typeof pattern=="string"){pattern=new ast.MatchAs(undefined,pattern) -set_position(pattern,this.position)} -ast_obj=new ast.MatchAs(pattern,this.alias)}else if(this.tree.length > 1 ||pattern instanceof ast.MatchAs){ast_obj=pattern}else if(typeof pattern=='string'){ast_obj=new ast.MatchAs(undefined,pattern)}else if(! this.starred){ast_obj=new ast.MatchAs(undefined,pattern)} -set_position(ast_obj,this.position) -return ast_obj}catch(err){console.log('error capture ast') -show_line(this) -throw err}} -PatternCaptureCtx.prototype.bindings=function(){var bindings=this.tree[0]=='_' ?[]:this.tree.slice() -if(this.alias){bindings.push(this.alias)} -return bindings} -PatternCaptureCtx.prototype.transition=function(token,value){var C=this -switch(C.expect){case '.': -if(token=='.'){C.type="value_pattern" -C.expect='id' -return C}else if(token=='('){ -return new PatternCtx(new PatternClassCtx(C))}else if(C.parent instanceof PatternMappingCtx){return C.parent.transition(token,value)}else{C.expect='as' -return C.transition(token,value)} -case 'as': -case 'alias': -var res=as_pattern(C,token,value) -return res -case 'id': -if(token=='id'){C.tree.push(value) -C.positions.push($token.value) -C.expect='.' -return C}} -return transition(C.parent,token,value)} -PatternClassCtx=function(C){this.type="class_pattern" -this.tree=[] -this.parent=C.parent -this.position=$token.value -this.class_id=C.tree.slice() -this.positions=C.positions -C.tree.pop() -this.attrs=C.tree.slice(2) -C.parent.tree.pop() -C.parent.tree.push(this) -this.expect=',' -this.keywords=[] -this.positionals=[] -this.bound_names=[]} -PatternClassCtx.prototype.ast=function(){ -if(this.class_id.length==1){var cls=new ast.Name(this.class_id[0])}else{ -var cls -for(var i=0,len=this.class_id.length;i < len-1;i++){var value=new ast.Name(this.class_id[i],new ast.Load()) -set_position(value,this.positions[i]) -if(i==0){cls=new ast.Attribute(value,this.class_id[i+1])}else{cls=new ast.Attribute(cls,this.class_id[i+1])} -set_position(cls,this.positions[i])}} -set_position(cls,this.position) -cls.ctx=new ast.Load() -var patterns=[],kwd_attrs=[],kwd_patterns=[] -for(var item of this.tree){if(item.is_keyword){kwd_attrs.push(item.tree[0]) -kwd_patterns.push(item.tree[1].ast())}else{try{patterns.push(item.ast())}catch(err){console.log('error in class pattern item') -show_line(this) -throw err}}} -var ast_obj=new ast.MatchClass(cls,patterns,kwd_attrs,kwd_patterns) -set_position(ast_obj,this.position) -if(this.alias){ast_obj=new ast.MatchAs(ast_obj,this.alias) -set_position(ast_obj,this.position)} -return ast_obj} -PatternClassCtx.prototype.bindings=function(){var bindings=this.bound_names -if(this.alias){bindings.push(this.alias)} -return bindings} -PatternClassCtx.prototype.transition=function(token,value){var C=this -function check_last_arg(){var last=$B.last(C.tree),bound -if(last instanceof PatternCaptureCtx){if(! last.is_keyword && -C.keywords.length > 0){$token.value=last.position -raise_syntax_error(C,'positional patterns follow keyword patterns')} -if(last.is_keyword){if(C.keywords.indexOf(last.tree[0])>-1){raise_syntax_error(C,`keyword argument repeated: ${last.tree[0]}`)} -C.keywords.push(last.tree[0]) -bound=last.tree[1].bindings()}else{bound=last.bindings()} -for(var b of bound){if(C.bound_names.indexOf(b)>-1){raise_syntax_error(C,'multiple assignments '+ -`to name '${b}' in pattern`)}} -C.bound_names=C.bound_names.concat(bound)}} -switch(this.expect){case ',': -switch(token){case '=': -var current=$B.last(this.tree) -if(current instanceof PatternCaptureCtx){ -if(this.keywords.indexOf(current.tree[0])>-1){raise_syntax_error(C,'attribute name repeated in class pattern: '+ -current.tree[0])} -current.is_keyword=true -return new PatternCtx(current)} -raise_syntax_error(this,"'=' after non-capture") -case ',': -check_last_arg() -return new PatternCtx(this) -case ')': -check_last_arg() -if($B.last(this.tree).tree.length==0){this.tree.pop()} -C.expect='as' -return C -default: -raise_syntax_error(C)} -case 'as': -case 'alias': -return as_pattern(C,token,value)} -return transition(C.parent,token,value)} -var PatternGroupCtx=function(C){ -this.type="group_pattern" -this.parent=C -this.position=$token.value -this.tree=[] -var first_pattern=C.tree.pop() -this.expect=',|' -C.tree.push(this)} -function remove_empty_pattern(C){var last=$B.last(C.tree) -if(last && last instanceof PatternCtx && -last.tree.length==0){C.tree.pop()}} -PatternGroupCtx.prototype.ast=function(){var ast_obj -if(this.tree.length==1 && ! this.has_comma){ast_obj=this.tree[0].ast()}else{ast_obj=PatternSequenceCtx.prototype.ast.bind(this)()} -if(this.alias){ast_obj=new ast.MatchAs(ast_obj,this.alias)} -set_position(ast_obj,this.position) -return ast_obj} -PatternGroupCtx.prototype.bindings=function(){var bindings=[] -for(var item of this.tree){bindings=bindings.concat(item.bindings())} -if(this.alias){bindings.push(this.alias)} -return bindings} -PatternGroupCtx.prototype.transition=function(token,value){var C=this -switch(C.expect){case ',|': -if(token==")"){ -remove_empty_pattern(C) -C.expect='as' -return C}else if(token==','){C.expect='id' -C.has_comma=true -return C}else if(token=='op' && value=='|'){var opctx=new PatternOrCtx(C.parent) -opctx.parenthese=true -return new PatternCtx(opctx)}else if(this.token===undefined){return transition(C.parent,token,value)} -raise_syntax_error(C) -case 'as': -case 'alias': -return as_pattern(C,token,value) -case 'id': -if(token==')'){ -remove_empty_pattern(C) -C.expect='as' -return C} -C.expect=',|' -return transition(new PatternCtx(C),token,value)} -raise_syntax_error(C)} -var PatternLiteralCtx=function(C,token,value,sign){ -this.type="literal_pattern" -this.parent=C.parent -this.position=$token.value -C.parent.tree.pop() -C.parent.tree.push(this) -if(token.sign){this.tree=[{sign:token.sign}] -this.expect='number'}else{if(token=='str'){this.tree=[] -new StringCtx(this,value)}else if(token=='JoinedStr'){raise_syntax_error(this,"patterns cannot include f-strings")}else{this.tree=[{type:token,value,sign}]} -this.expect='op'}} -PatternLiteralCtx.prototype.ast=function(){var lineno=get_node(this).line_num -try{var first=this.tree[0],result -if(first.type=='str'){var v=StringCtx.prototype.ast.bind(first)() -result=new ast.MatchValue(v)}else if(first.type=='id'){result=new ast.MatchSingleton(_b_[first.value])}else{first.position=this.position -var num=NumberCtx.prototype.ast.bind(first)(),res=new ast.MatchValue(num) -if(first.sign && first.sign !='+'){var op={'+':ast.UAdd,'-':ast.USub,'~':ast.Invert}[first.sign] -var unary_op=new ast.UnaryOp(new op(),res.value) -set_position(unary_op,this.position) -res=new ast.MatchValue(unary_op) -set_position(res,this.position)} -if(this.tree.length==1){result=res}else{this.tree[2].position=this.position -var num2=NumberCtx.prototype.ast.bind(this.tree[2])(),binop=new ast.BinOp(res.value,this.tree[1]=='+' ? new ast.Add():new ast.Sub(),num2) -set_position(binop,this.position) -result=new ast.MatchValue(binop)}} -set_position(result,this.position) -if(this.tree.length==2){ -result=new ast.MatchValue(new ast.BinOp( -this.tree[0].ast(),C.num_sign=='+' ? ast.Add :ast.Sub,this.tree[1].ast()))} -if(this.alias){result=new ast.MatchAs(result,this.alias)} -set_position(result,this.position) -return result}catch(err){show_line(this) -throw err}} -PatternLiteralCtx.prototype.bindings=function(){if(this.alias){return[this.alias]} -return[]} -PatternLiteralCtx.prototype.transition=function(token,value){var C=this -switch(C.expect){case 'op': -if(token=="op"){switch(value){case '+': -case '-': -if(['int','float'].indexOf(C.tree[0].type)>-1){C.expect='imaginary' -this.tree.push(value) -C.num_sign=value -return C} -raise_syntax_error(C,'patterns cannot include operators') -default: -return transition(C.parent,token,value)}} -break -case 'number': -switch(token){case 'int': -case 'float': -case 'imaginary': -var last=$B.last(C.tree) -if(this.tree.token===undefined){ -last.type=token -last.value=value -C.expect='op' -return C} -default: -raise_syntax_error(C)} -case 'imaginary': -switch(token){case 'imaginary': -C.tree.push({type:token,value,sign:C.num_sign}) -return C.parent -default: -raise_syntax_error(C,'(expected imaginary)')} -case 'as': -case 'alias': -return as_pattern(C,token,value)} -if(token=='as' && C.tree.length==1){C.expect='as' -return C.transition(token,value)} -return transition(C.parent,token,value)} -var PatternMappingCtx=function(C){ -this.type="mapping_pattern" -this.parent=C -this.position=$token.value -C.tree.pop() -this.tree=[] -C.tree.push(this) -this.expect='key_value_pattern' -this.literal_keys=[] -this.bound_names=[]} -PatternMappingCtx.prototype.ast=function(){ -var keys=[],patterns=[] -for(var item of this.tree){keys.push(item.tree[0].ast().value) -if(item.tree[0]instanceof PatternLiteralCtx){patterns.push(item.tree[1].ast())}else{patterns.push(item.tree[2].ast())}} -var res=new ast.MatchMapping(keys,patterns) -if(this.double_star){res.rest=this.double_star.tree[0]} -set_position(res,this.position) -return res} -PatternMappingCtx.prototype.bindings=function(){var bindings=[] -for(var item of this.tree){bindings=bindings.concat(item.bindings())} -if(this.rest){bindings=bindings.concat(this.rest.bindings())} -if(this.alias){bindings.push(this.alias)} -return bindings} -PatternMappingCtx.prototype.transition=function(token,value){var C=this -function check_duplicate_names(){var last=$B.last(C.tree),bindings -if(last instanceof PatternKeyValueCtx){if(C.double_star){ -raise_syntax_error(C,"can't use starred name here (consider moving to end)")} -if(last.tree[0].type=='value_pattern'){bindings=last.tree[2].bindings()}else{bindings=last.tree[1].bindings()} -for(var binding of bindings){if(C.bound_names.indexOf(binding)>-1){raise_syntax_error(C,`multiple assignments to name '${binding}'`+ -' in pattern')}} -C.bound_names=C.bound_names.concat(bindings)}} -switch(C.expect){case 'key_value_pattern': -if(token=='}' ||token==','){ -check_duplicate_names() -if(C.double_star){var ix=C.tree.indexOf(C.double_star) -if(ix !=C.tree.length-1){raise_syntax_error(C,"can't use starred name here (consider moving to end)")} -C.rest=C.tree.pop()} -return token==',' ? C :C.parent} -if(token=='op' && value=='**'){C.expect='capture_pattern' -return C} -var p=new PatternCtx(C) -try{var lit_or_val=p.transition(token,value)}catch(err){raise_syntax_error(C,"mapping pattern keys may only "+ -"match literals and attribute lookups")} -if(C.double_star){ -raise_syntax_error(C)} -if(lit_or_val instanceof PatternLiteralCtx){C.tree.pop() -new PatternKeyValueCtx(C,lit_or_val) -return lit_or_val}else if(lit_or_val instanceof PatternCaptureCtx){C.has_value_pattern_keys=true -C.tree.pop() -new PatternKeyValueCtx(C,lit_or_val) -C.expect='.' -return this}else{raise_syntax_error(C,'(expected key or **)')} -case 'capture_pattern': -var p=new PatternCtx(C) -var capture=transition(p,token,value) -if(capture instanceof PatternCaptureCtx){if(C.double_star){raise_syntax_error(C,"only one double star pattern is accepted")} -if(value=='_'){raise_syntax_error(C)} -if(C.bound_names.indexOf(value)>-1){raise_syntax_error(C,'duplicate binding: '+value)} -C.bound_names.push(value) -capture.double_star=true -C.double_star=capture -C.expect=',' -return C}else{raise_syntax_error(C,'(expected identifier)')} -case ',': -if(token==','){C.expect='key_value_pattern' -return C}else if(token=='}'){C.expect='key_value_pattern' -return C.transition(token,value)} -raise_syntax_error(C) -case '.': -if(C.tree.length > 0){var last=$B.last(C.tree) -if(last instanceof PatternKeyValueCtx){ -new IdCtx(last,last.tree[0].tree[0]) -C.expect='key_value_pattern' -return transition(last.tree[0],token,value)}} -raise_syntax_error(C)} -return transition(C.parent,token,value)} -var PatternKeyValueCtx=function(C,literal_or_value){this.type="pattern_key_value" -this.parent=C -this.tree=[literal_or_value] -literal_or_value.parent=this -this.expect=':' -C.tree.push(this)} -PatternKeyValueCtx.prototype.bindings=PatternMappingCtx.prototype.bindings -PatternKeyValueCtx.prototype.transition=function(token,value){var C=this -switch(C.expect){case ':': -switch(token){case ':': -var key_obj=this.tree[0] -if(key_obj instanceof PatternLiteralCtx){var key=$B.AST.$convert(key_obj.tree[0]) -if(_b_.list.__contains__(this.parent.literal_keys,key)){raise_syntax_error(C,`mapping pattern checks `+ -`duplicate key (${_b_.repr(key)})`)} -this.parent.literal_keys.push(key)} -this.expect=',' -return new PatternCtx(this) -default: -raise_syntax_error(C,'(expected :)')} -case ',': -switch(token){case '}': -return transition(C.parent,token,value) -case ',': -C.parent.expect='key_value_pattern' -return transition(C.parent,token,value) -case 'op': -if(value=='|'){ -return new PatternCtx(new PatternOrCtx(C))}} -raise_syntax_error(C,"(expected ',' or '}')")} -return transition(C.parent,token,value)} -var PatternOrCtx=function(C){ -this.type="or_pattern" -this.parent=C -this.position=$token.value -var first_pattern=C.tree.pop() -if(first_pattern instanceof PatternGroupCtx && -first_pattern.expect !='as'){ -first_pattern=first_pattern.tree[0]} -this.tree=[first_pattern] -first_pattern.parent=this -this.expect='|' -C.tree.push(this) -this.check_reachable()} -PatternOrCtx.prototype.ast=function(){ -var ast_obj=new ast.MatchOr(this.tree.map(x=> x.ast())) -set_position(ast_obj,this.position) -if(this.alias){ast_obj=new ast.MatchAs(ast_obj,this.alias)} -set_position(ast_obj,this.position) -return ast_obj} -PatternOrCtx.prototype.bindings=function(){var names -for(var subpattern of this.tree){if(subpattern.bindings===undefined){console.log('no binding',subpattern)} -var subbindings=subpattern.bindings() -if(names===undefined){names=subbindings}else{for(var item of names){if(subbindings.indexOf(item)==-1){raise_syntax_error(this,"alternative patterns bind different names")}} -for(var item of subbindings){if(names.indexOf(item)==-1){raise_syntax_error(this,"alternative patterns bind different names")}}}} -if(this.alias){return names.concat(this.alias)} -return names} -PatternOrCtx.prototype.check_reachable=function(){ -var item=$B.last(this.tree) -var capture -if(item.type=='capture_pattern'){capture=item.tree[0]}else if(item.type=='group_pattern' && item.tree.length==1 && -item.tree[0].type=='capture_pattern'){capture=item.tree[0].tree[0]}else if(item instanceof PatternOrCtx){item.check_reachable()} -if(capture){var msg=capture=='_' ? 'wildcard' : -`name capture '${capture}'` -raise_syntax_error(this,`${msg} makes remaining patterns unreachable`)}} -PatternOrCtx.prototype.transition=function(token,value){function set_alias(){ -var last=$B.last(C.tree) -if(last.alias){C.alias=last.alias -delete last.alias}} -var C=this -if(['as','alias'].indexOf(C.expect)>-1){return as_pattern(C,token,value)} -if(token=='op' && value=="|"){ -for(var item of C.tree){if(item.alias){raise_syntax_error(C,'(no as pattern inside or pattern)')}} -C.check_reachable() -return new PatternCtx(C)}else if(token==')' && C.parenthese){set_alias() -C.bindings() -delete C.parenthese -C.expect='as' -return C} -set_alias() -C.bindings() -return transition(C.parent,token,value)} -var PatternSequenceCtx=function(C,token){ -this.type="sequence_pattern" -this.parent=C -this.position=$token.value -this.tree=[] -this.bound_names=[] -var first_pattern=C.tree.pop() -if(token===undefined){ -this.bound_names=first_pattern.bindings() -this.tree=[first_pattern] -if(first_pattern.starred){this.has_star=true} -first_pattern.parent=this}else{ -this.token=token} -this.expect=',' -C.tree.push(this)} -PatternSequenceCtx.prototype.ast=function(){var ast_obj=new ast.MatchSequence(this.tree.map(x=> x.ast())) -set_position(ast_obj,this.position) -if(this.alias){ast_obj=new ast.MatchAs(ast_obj,this.alias) -set_position(ast_obj,this.position)} -return ast_obj} -PatternSequenceCtx.prototype.bindings=PatternMappingCtx.prototype.bindings -PatternSequenceCtx.prototype.transition=function(token,value){function check_duplicate_names(){var last=$B.last(C.tree) -if(!(last instanceof PatternCtx)){ -var last_bindings=last.bindings() -for(var b of last_bindings){if(C.bound_names.indexOf(b)>-1){raise_syntax_error(C,"multiple assignments to"+ -` name '${b}' in pattern`)}} -if(last.starred){if(C.has_star){raise_syntax_error(C,'multiple starred names in sequence pattern')} -C.has_star=true} -C.bound_names=C.bound_names.concat(last_bindings)}} -var C=this -if(C.expect==','){if((C.token=='[' && token==']')|| -(C.token=='(' && token==")")){ -var nb_starred=0 -for(var item of C.tree){if(item instanceof PatternCaptureCtx && item.starred){nb_starred++ -if(nb_starred > 1){raise_syntax_error(C,'multiple starred names in sequence pattern')}}} -C.expect='as' -check_duplicate_names() -remove_empty_pattern(C) -return C}else if(token==','){check_duplicate_names() -C.expect='id' -return C}else if(token=='op' && value=='|'){ -remove_empty_pattern(C) -return new PatternCtx(new PatternOrCtx(C))}else if(this.token===undefined){ -check_duplicate_names() -return transition(C.parent,token,value)} -raise_syntax_error(C)}else if(C.expect=='as'){if(token=='as'){this.expect='alias' -return C} -return transition(C.parent,token,value)}else if(C.expect=='alias'){if(token='id'){C.alias=value -return C.parent} -raise_syntax_error(C,'expected alias')}else if(C.expect=='id'){C.expect=',' -return transition(new PatternCtx(C),token,value)}} -var RaiseCtx=$B.parser.RaiseCtx=function(C){ -this.type='raise' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this -this.scope_type=get_scope(this).ntype} -RaiseCtx.prototype.ast=function(){ -var ast_obj=new ast.Raise(...this.tree.map(x=> x.ast())) -set_position(ast_obj,this.position) -return ast_obj} -RaiseCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.tree.length==0){return new IdCtx(new ExprCtx(C,'exc',false),value)} -break -case 'from': -if(C.tree.length > 0){return new AbstractExprCtx(C,false)} -break -case 'eol': -remove_abstract_expr(this.tree) -return transition(C.parent,token)} -raise_syntax_error(C)} -var ReturnCtx=$B.parser.ReturnCtx=function(C){ -this.type='return' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this -this.scope=get_scope(this) -if(["def","generator"].indexOf(this.scope.ntype)==-1){raise_syntax_error(C,"'return' outside function")} -var node=this.node=get_node(this) -while(node.parent){if(node.parent.C){var elt=node.parent.C.tree[0] -if(elt.type=='for'){elt.has_return=true -break}else if(elt.type=='try'){elt.has_return=true}else if(elt.type=='single_kw' && elt.token=='finally'){elt.has_return=true}} -node=node.parent}} -ReturnCtx.prototype.ast=function(){var res=new ast.Return() -if(this.tree.length > 0){res.value=this.tree[0].ast()} -set_position(res,this.position) -return res} -ReturnCtx.prototype.transition=function(token,value){var C=this -if(token=='eol' && this.tree.length==1 && -this.tree[0].type=='abstract_expr'){ -this.tree.pop()} -return transition(new AbstractExprCtx(C.parent,false),token,value)} -var SetCompCtx=function(C){ -this.type='setcomp' -this.tree=[C.tree[0]] -this.tree[0].parent=this -Comprehension.make_comp(this,C)} -SetCompCtx.prototype.ast=function(){ -var ast_obj=new ast.SetComp( -this.tree[0].ast(),Comprehension.generators(this.tree.slice(1)) -) -set_position(ast_obj,this.position) -return ast_obj} -SetCompCtx.prototype.transition=function(token,value){var C=this -if(token=='}'){return this.parent} -raise_syntax_error(C)} -var SingleKwCtx=$B.parser.SingleKwCtx=function(C,token){ -this.type='single_kw' -this.token=token -this.parent=C -this.tree=[] -C.tree[C.tree.length]=this -if(token=="else"){var node=C.node,rank=node.parent.children.indexOf(node),pctx=node.parent.children[rank-1].C -pctx.tree[0].orelse=this -if(pctx.tree.length > 0){var elt=pctx.tree[0] -if(elt.type=='for' || -elt.type=='asyncfor' || -(elt.type=='condition' && elt.token=='while')){elt.has_break=true -elt.else_node=get_node(this)}}}} -SingleKwCtx.prototype.ast=function(){return ast_body(this.parent)} -SingleKwCtx.prototype.transition=function(token,value){var C=this -if(token==':'){return BodyCtx(C)}else if(token=='eol'){raise_syntax_error(C,"expected ':'")} -raise_syntax_error(C)} -var SliceCtx=$B.parser.SliceCtx=function(C){ -this.type='slice' -this.parent=C -this.position=$token.value -this.tree=C.tree.length > 0 ?[C.tree.pop()]:[] -C.tree.push(this)} -SliceCtx.prototype.ast=function(){var slice=new ast.Slice() -var attrs=['lower','upper','step'] -for(var i=0;i < this.tree.length;i++){var item=this.tree[i] -if(item.type !=='abstract_expr'){slice[attrs[i]]=item.ast()}} -set_position(slice,this.position) -return slice} -SliceCtx.prototype.transition=function(token,value){var C=this -if(token==":"){return new AbstractExprCtx(C,false)} -return transition(C.parent,token,value)} -var StarArgCtx=$B.parser.StarArgCtx=function(C){ -this.type='star_arg' -this.parent=C -this.tree=[] -this.position=$token.value -C.tree[C.tree.length]=this} -StarArgCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.parent.type=="target_list"){C.tree.push(value) -C.parent.expect=',' -return C.parent} -return transition(new AbstractExprCtx(C,false),token,value) -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case 'not': -case 'lambda': -return transition(new AbstractExprCtx(C,false),token,value) -case ',': -case ')': -if(C.tree.length==0){raise_syntax_error(C,"(unnamed star argument)")} -return transition(C.parent,token) -case ':': -if(C.parent.parent.type=='lambda'){return transition(C.parent.parent,token)}} -raise_syntax_error(C)} -var StarredCtx=$B.parser.StarredCtx=function(C){ -this.type='starred' -this.position=C.position -if(C.parent.type=='list_or_tuple' && -C.parent.parent.type=="node"){ -for(var i=0;i < C.parent.tree.length;i++){var child=C.parent.tree[i] -if(child.type=='expr' && child.tree.length > 0 -&& child.tree[0].type=='starred'){raise_syntax_error(C,"two starred expressions in assignment")}}} -this.parent=C -this.tree=[] -C.tree[C.tree.length]=this} -StarredCtx.prototype.ast=function(){var ast_obj=new ast.Starred(this.tree[0].ast(),new ast.Load()) -set_position(ast_obj,this.position) -return ast_obj} -StarredCtx.prototype.transition=function(token,value){var C=this -return transition(C.parent,token,value)} -var StringCtx=$B.parser.StringCtx=function(C,value){ -this.type='str' -this.parent=C -this.position=this.end_position=$token.value -C.tree.push(this) -this.is_bytes=value.startsWith('b') -this.value=this.is_bytes ?[]:'' -this.add_value(value) -this.raw=false} -$B.string_from_ast_value=function(value){ -return value.replace(new RegExp("\\\\'",'g'),"'")} -var make_string_for_ast_value=$B.make_string_for_ast_value=function(value){value=value.replace(/\n/g,'\\n\\\n') -value=value.replace(/\r/g,'\\r\\\r') -if(value[0]=="'"){var unquoted=value.substr(1,value.length-2) -return unquoted} -var quote="'" -if(value.indexOf("'")>-1){var s='',escaped=false -for(var char of value){if(char=='\\'){if(escaped){s+='\\\\'} -escaped=!escaped}else{if(char=="'" && ! escaped){ -s+='\\'}else if(escaped){s+='\\'} -s+=char -escaped=false}} -value=s} -return value.substr(1,value.length-2)} -StringCtx.prototype.add_value=function(value){this.is_bytes=value.charAt(0)=='b' -if(! this.is_bytes){this.value+=make_string_for_ast_value(value)}else{value=value.substr(2,value.length-3) -try{var b=encode_bytestring(value)}catch(err){raise_syntax_error(C,'bytes can only contain ASCII literal characters')} -this.value=this.value.concat(b)}} -function encode_bytestring(s){s=s.replace(/\\t/g,'\t') -.replace(/\\n/g,'\n') -.replace(/\\r/g,'\r') -.replace(/\\f/g,'\f') -.replace(/\\v/g,'\v') -.replace(/\\\\/g,'\\') -var t=[] -for(var i=0,len=s.length;i < len;i++){var cp=s.codePointAt(i) -if(cp > 255){throw Error()} -t.push(cp)} -return t} -StringCtx.prototype.ast=function(){var value=this.value -if(this.is_bytes){value=_b_.bytes.$factory(this.value)} -var ast_obj=new ast.Constant(value) -set_position(ast_obj,this.position) -return ast_obj} -StringCtx.prototype.transition=function(token,value){var C=this -switch(token){case '[': -return new AbstractExprCtx(new SubscripCtx(C.parent),false) -case '(': -C.parent.tree[0]=C -return new CallCtx(C.parent) -case 'str': -if((this.is_bytes && ! value.startsWith('b'))|| -(! this.is_bytes && value.startsWith('b'))){raise_syntax_error(C,"cannot mix bytes and nonbytes literals")} -C.add_value(value) -return C -case 'JoinedStr': -C.parent.tree.pop() -var fstring=new FStringCtx(C.parent,value) -new StringCtx(fstring,fstring.quotes+this.value+fstring.quotes) -return fstring} -return transition(C.parent,token,value)} -var SubscripCtx=$B.parser.SubscripCtx=function(C){ -this.type='sub' -this.func='getitem' -this.value=C.tree[0] -this.position=$token.value -C.tree.pop() -C.tree[C.tree.length]=this -this.parent=C -this.tree=[]} -SubscripCtx.prototype.ast=function(){var slice -if(this.tree.length > 1){var slice_items=this.tree.map(x=> x.ast()) -slice=new ast.Tuple(slice_items) -set_position(slice,this.position,this.end_position)}else{slice=this.tree[0].ast()} -slice.ctx=new ast.Load() -var value=this.value.ast() -if(value.ctx){value.ctx=new ast.Load()} -var ast_obj=new ast.Subscript(value,slice,new ast.Load()) -ast_obj.lineno=value.lineno -ast_obj.col_offset=value.col_offset -ast_obj.end_lineno=slice.end_lineno -ast_obj.end_col_offset=slice.end_col_offset -return ast_obj} -SubscripCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -case 'imaginary': -case 'int': -case 'float': -case 'str': -case 'JoinedStr': -case 'bytes': -case '[': -case '(': -case '{': -case '.': -case 'not': -case 'lambda': -var expr=new AbstractExprCtx(C,false) -return transition(expr,token,value) -case ']': -C.end_position=$token.value -if(C.parent.packed){return C.parent} -if(C.tree[0].tree.length > 0){return C.parent} -break -case ':': -return new AbstractExprCtx(new SliceCtx(C),false) -case ',': -return new AbstractExprCtx(C,false)} -raise_syntax_error(C)} -var TargetListCtx=$B.parser.TargetListCtx=function(C){ -this.type='target_list' -this.parent=C -this.tree=[] -this.position=$token.value -this.expect='id' -this.nb_packed=0 -C.tree[C.tree.length]=this} -TargetListCtx.prototype.ast=function(){if(this.tree.length==1 && ! this.implicit_tuple){var item=this.tree[0].ast() -item.ctx=new ast.Store() -if(item instanceof ast.Tuple){for(var target of item.elts){target.ctx=new ast.Store()}} -return item}else{var items=[] -for(var item of this.tree){item=item.ast() -if(item.hasOwnProperty('ctx')){item.ctx=new ast.Store()} -items.push(item)} -var ast_obj=new ast.Tuple(items,new ast.Store()) -set_position(ast_obj,this.position) -return ast_obj}} -TargetListCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'id': -if(C.expect=='id'){C.expect=',' -return new IdCtx( -new ExprCtx(C,'target',false),value)} -case 'op': -if(C.expect=='id' && value=='*'){ -this.nb_packed++ -C.expect=',' -return new AbstractExprCtx( -new StarredCtx(C),false)} -case '(': -case '[': -if(C.expect=='id'){C.expect=',' -return new ListOrTupleCtx(C,token=='(' ? 'tuple' :'list')} -case ')': -case ']': -if(C.expect==','){return C.parent} -case ',': -if(C.expect==','){C.expect='id' -C.implicit_tuple=true -return C}} -if(C.expect==','){return transition(C.parent,token,value)}else if(token=='in'){ -return transition(C.parent,token,value)} -console.log('unexpected token for target list',token,value) -console.log(C) -raise_syntax_error(C)} -var TernaryCtx=$B.parser.TernaryCtx=function(C){ -this.type='ternary' -this.position=C.position -C.parent.tree.pop() -var expr=new ExprCtx(C.parent,'ternary',false) -expr.tree.push(this) -this.parent=expr -this.tree=[C] -C.parent=this} -TernaryCtx.prototype.ast=function(){ -var ast_obj=new ast.IfExp(this.tree[1].ast(),this.tree[0].ast(),this.tree[2].ast()) -set_position(ast_obj,this.position) -return ast_obj} -TernaryCtx.prototype.transition=function(token,value){var C=this -if(token=='else'){C.in_else=true -return new AbstractExprCtx(C,false)}else if(! C.in_else){if(token==':'){raise_syntax_error(C)} -raise_syntax_error_known_range(C,C.position,last_position(C),"expected 'else' after 'if' expression")}else if(token==","){ -if(["assign","augm_assign","node","return"]. -indexOf(C.parent.type)>-1){C.parent.tree.pop() -var t=new ListOrTupleCtx(C.parent,'tuple') -t.implicit=true -t.tree[0]=C -C.parent=t -t.expect="id" -return t}} -return transition(C.parent,token,value)} -var TryCtx=$B.parser.TryCtx=function(C){ -this.type='try' -this.parent=C -this.position=$token.value -C.tree[C.tree.length]=this} -TryCtx.prototype.ast=function(){ -var node=this.parent.node,res={body:ast_body(this.parent),handlers:[],orelse:[],finalbody:[]} -var rank=node.parent.children.indexOf(node) -for(var child of node.parent.children.slice(rank+1)){var t=child.C.tree[0],type=t.type -if(type=='single_kw'){type=t.token} -if(type=='except'){res.handlers.push(t.ast())}else if(type=='else'){res.orelse=ast_body(child.C)}else if(type=='finally'){res.finalbody=ast_body(child.C)}else{break}} -if(res.handlers.length==0 && -res.finalbody.length==0){raise_syntax_error(this,"expected 'except' or 'finally' block")} -var klass=this.parent.is_trystar ? ast.TryStar :ast.Try -var res=new klass(res.body,res.handlers,res.orelse,res.finalbody) -set_position(res,this.position) -return res} -TryCtx.prototype.transition=function(token,value){var C=this -if(token==':'){return BodyCtx(C)} -raise_syntax_error(C,"expected ':'")} -var TypeAliasCtx=$B.parser.TypeAlias=function(C,value){ -C.parent.parent.tree=[this] -this.parent=C.parent.parent -this.name=value -this.expect='=' -this.tree=[] -this.position=$token.value} -TypeAliasCtx.prototype.transition=function(token,value){var C=this -if(C.expect=='='){if(token=='['){if(this.tree.length > 0){raise_syntax_error(C)} -return new TypeParamsCtx(C)}else if(token=='='){C.has_value=true -return new AbstractExprCtx(C,false)}else if(token=='eol'){if(! C.has_value || -this.tree.length !==1 || -this.tree[0]instanceof AbstractExprCtx){raise_syntax_error(C)} -return transition(C.parent,token,value)}} -raise_syntax_error(C)} -TypeAliasCtx.prototype.ast=function(){var name=new ast.Name(this.name),params,value=this.tree[0].ast() -if(this.type_params){params=this.type_params.ast()} -var ast_obj=new ast.TypeAlias(name,params,value) -set_position(ast_obj,this.position) -return ast_obj} -var TypeParamsCtx=$B.parser.TypeParamsCtx=function(C){this.type='type_params' -this.parent=C -C.type_params=this -this.tree=[] -this.expect='param'} -TypeParamsCtx.prototype.check_duplicate=function(name){ -for(var item of this.tree){if(item.name==name){raise_syntax_error(this,`duplicate type parameter '${name}'`)}}} -TypeParamsCtx.prototype.transition=function(token,value){var C=this -if(C.expect=='param'){if(token=='id'){C.check_duplicate(value) -C.expect=',' -return new TypeVarCtx(C,value)}else if(token=='op'){if(value=='*'){C.expect=',' -return new TypeVarTupleCtx(C)}else if(value=='**'){C.expect=',' -return new TypeParamSpecCtx(C)}}else if(token==']'){return C.parent} -raise_syntax_error(C)}else if(C.expect==','){if(token==','){C.expect='param' -return C}else if(token==']'){return C.parent} -raise_syntax_error(C)} -raise_syntax_error(C)} -TypeParamsCtx.prototype.ast=function(){return this.tree.map(x=> x.ast())} -var TypeVarCtx=$B.parser.TypeVarCtx=function(C,name){this.name=name -this.parent=C -C.tree.push(this) -this.tree=[] -this.position=$token.value} -TypeVarCtx.prototype.transition=function(token,value){var C=this -if(token==':'){return new AbstractExprCtx(C,false)} -return transition(this.parent,token,value)} -TypeVarCtx.prototype.ast=function(){var name=this.name,bound -if(this.tree.length > 0){bound=this.tree[0].ast()} -var ast_obj=new ast.TypeVar(name,bound) -set_position(ast_obj,this.position) -return ast_obj} -var TypeParamSpecCtx=$B.parser.TypeParamSpecCtx=function(C){this.parent=C -C.tree.push(this) -this.tree=[] -this.position=$token.value} -TypeParamSpecCtx.prototype.transition=function(token,value){var C=this -if(token=='id'){if(C.name){raise_syntax_error(C)} -C.parent.check_duplicate(value) -C.name=value -return C}else if(token==':'){if(! C.name){raise_syntax_error(C)} -this.has_colon=true -return new AbstractExprCtx(C,false)}else if(this.has_colon){var msg -if(this.tree[0].name=='tuple'){msg='cannot use constraints with ParamSpec'}else{msg='cannot use bound with ParamSpec'} -raise_syntax_error_known_range(C,this.position,$token.value,msg)} -return transition(this.parent,token,value)} -TypeParamSpecCtx.prototype.ast=function(){var name=new ast.Name(this.name) -var ast_obj=new ast.ParamSpec(name) -set_position(ast_obj,this.position) -return ast_obj} -var TypeVarTupleCtx=$B.parser.TypeVarTupleCtx=function(C){this.parent=C -C.tree.push(this) -this.tree=[] -this.position=$token.value} -TypeVarTupleCtx.prototype.transition=function(token,value){var C=this -if(token=='id'){if(C.name){raise_syntax_error(C)} -C.parent.check_duplicate(value) -C.name=value -return C}else if(token==':'){if(! C.name){raise_syntax_error(C)} -this.has_colon=true -return new AbstractExprCtx(C,false)}else if(this.has_colon){var msg -if(this.tree[0].name=='tuple'){msg='cannot use constraints with TypeVarTuple'}else{msg='cannot use bound with TypeVarTuple'} -raise_syntax_error_known_range(C,this.position,$token.value,msg)} -return transition(this.parent,token,value)} -TypeVarTupleCtx.prototype.ast=function(){var name=new ast.Name(this.name) -var ast_obj=new ast.TypeVarTuple(name) -set_position(ast_obj,this.position) -return ast_obj} -var UnaryCtx=$B.parser.UnaryCtx=function(C,op){ -this.type='unary' -this.op=op -this.parent=C -this.tree=[] -this.position=$token.value -C.tree.push(this)} -UnaryCtx.prototype.ast=function(){var op={'+':ast.UAdd,'-':ast.USub,'~':ast.Invert}[this.op],ast_obj=new ast.UnaryOp(new op(),this.tree[0].ast()) -set_position(ast_obj,this.position) -return ast_obj} -UnaryCtx.prototype.transition=function(token,value){var C=this -switch(token){case 'op': -if('+'==value ||'-'==value){if(C.op===value){C.op='+'}else{C.op='-'} -return C} -case 'int': -case 'float': -case 'imaginary': -if(C.parent.type=="starred"){raise_syntax_error(C,"can't use starred expression here")} -var res=new NumberCtx(token,C,value) -return res -case 'id': -return transition(new AbstractExprCtx(C,false),token,value)} -if(this.tree.length==0 ||this.tree[0].type=='abstract_expr'){raise_syntax_error(C)} -return transition(C.parent,token,value)} -var WithCtx=$B.parser.WithCtx=function(C){ -this.type='with' -this.parent=C -this.position=$token.value -C.tree[C.tree.length]=this -this.tree=[] -this.expect='expr' -this.scope=get_scope(this)} -WithCtx.prototype.ast=function(){ -var withitems=[],withitem -for(var withitem of this.tree){withitems.push(withitem.ast())} -var klass=this.async ? ast.AsyncWith :ast.With -var ast_obj=new klass(withitems,ast_body(this.parent)) -set_position(ast_obj,this.async ? this.async.position :this.position,last_position(this)) -return ast_obj} -WithCtx.prototype.transition=function(token,value){var C=this -function check_last(){var last=$B.last(C.tree) -if(last.tree.length > 1){var alias=last.tree[1] -if(alias.tree.length==0){raise_syntax_error(C,"expected ':'")} -check_assignment(alias)}} -switch(token){case '(': -case '[': -if(this.expect=='expr' && this.tree.length==0){ -C.parenth=token -return C}else{raise_syntax_error(C)} -break -case 'id': -if(C.expect=='expr'){ -C.expect=',' -return transition( -new AbstractExprCtx(new withitem(C),false),token,value)} -raise_syntax_error(C) -case ':': -if((! C.parenth)||C.parenth=='implicit'){check_last()} -return BodyCtx(C) -case ')': -case ']': -if(C.parenth==opening[token]){if(C.expect==',' ||C.expect=='expr'){check_last() -C.expect=':' -return C}} -break -case ',': -if(C.expect==','){if(! C.parenth){C.parenth='implicit'} -check_last() -C.expect='expr' -return C} -break -case 'eol': -raise_syntax_error(C,"expected ':'")} -raise_syntax_error(C)} -WithCtx.prototype.set_alias=function(ctx){var ids=[] -if(ctx.type=="id"){ids=[ctx]}else if(ctx.type=="list_or_tuple"){ -for(var expr of ctx.tree){if(expr.type=="expr" && expr.tree[0].type=="id"){ids.push(expr.tree[0])}}}} -var withitem=function(C){this.type='withitem' -this.parent=C -C.tree.push(this) -this.tree=[] -this.expect='as' -this.position=$token.value} -withitem.prototype.ast=function(){var ast_obj=new ast.withitem(this.tree[0].ast()) -if(this.tree[1]){ast_obj.optional_vars=this.tree[1].tree[0].ast() -if(ast_obj.optional_vars.elts){for(var elt of ast_obj.optional_vars.elts){elt.ctx=new ast.Store()}}else{ast_obj.optional_vars.ctx=new ast.Store()}} -set_position(ast_obj,this.position) -return ast_obj} -withitem.prototype.transition=function(token,value){var C=this -if(token=='as' && C.expect=='as'){C.expect='star_target' -return new AbstractExprCtx(C,false)}else{return transition(C.parent,token,value)} -raise_syntax_error(C,"expected ':'")} -var YieldCtx=$B.parser.YieldCtx=function(C,is_await){ -this.type='yield' -this.parent=C -this.tree=[] -this.is_await=is_await -this.position=$token.value -C.tree[C.tree.length]=this -if(C.type=="list_or_tuple" && C.tree.length > 1){raise_syntax_error(C,"(non-parenthesized yield)")} -if(parent_match(C,{type:"annotation"})){raise_syntax_error(C,"'yield' outside function")} -var parent=this -while(true){var list_or_tuple=parent_match(parent,{type:"list_or_tuple"}) -if(list_or_tuple){parent=list_or_tuple}else{break}} -var parent=this -while(true){var set_or_dict=parent_match(parent,{type:"dict_or_set"}) -if(set_or_dict){parent=set_or_dict}else{break}} -var root=get_module(this) -root.yields_func_check=root.yields_func_check ||[] -root.yields_func_check.push(this) -var scope=this.scope=get_scope(this,true),node=get_node(this) -node.has_yield=this -var in_comp=parent_match(this,{type:"comprehension"}) -if(get_scope(this).id.startsWith("lc"+$B.lambda_magic)){delete node.has_yield} -if(in_comp){var outermost_expr=in_comp.tree[0].tree[1] -var parent=C -while(parent){if(parent===outermost_expr){break} -parent=parent.parent} -if(! parent){raise_syntax_error(C,"'yield' inside list comprehension")}} -var in_lambda=false,parent=C -while(parent){if(parent.type=="lambda"){in_lambda=true -this.in_lambda=true -break} -parent=parent.parent} -var parent=node.parent -while(parent){if(parent.C && parent.C.tree.length > 0 && -parent.C.tree[0].type=="with"){scope.C.tree[0].$has_yield_in_cm=true -break} -parent=parent.parent} -if(! in_lambda){switch(C.type){case 'node': -case 'assign': -case 'list_or_tuple': -break -default: -raise_syntax_error(C,'(non-parenthesized yield)')}}} -YieldCtx.prototype.ast=function(){ -var ast_obj -if(this.from){ast_obj=new ast.YieldFrom(this.tree[0].ast())}else if(this.tree.length==1){ast_obj=new ast.Yield(this.tree[0].ast())}else{ast_obj=new ast.Yield()} -set_position(ast_obj,this.position) -return ast_obj} -YieldCtx.prototype.transition=function(token,value){var C=this -if(token=='from'){ -if(C.tree[0].type !='abstract_expr'){ -raise_syntax_error(C,"('from' must follow 'yield')")} -C.from=true -C.from_num=$B.UUID() -return C.tree[0]}else{remove_abstract_expr(C.tree) -if(C.from && C.tree.length==0){raise_syntax_error(C)}} -return transition(C.parent,token)} -YieldCtx.prototype.check_in_function=function(){if(this.in_lambda){return} -var scope=get_scope(this),in_func=scope.is_function,func_scope=scope -if(! in_func && scope.comprehension){var parent=scope.parent_block -while(parent.comprehension){parent=parent_block} -in_func=parent.is_function -func_scope=parent} -if(in_func){var def=func_scope.C.tree[0] -if(! this.is_await){def.type='generator'}}} -function parent_match(ctx,obj){ -var flag -while(ctx.parent){flag=true -for(var attr in obj){if(ctx.parent[attr]!=obj[attr]){flag=false -break}} -if(flag){return ctx.parent} -ctx=ctx.parent} -return false} -var get_previous=$B.parser.get_previous=function(C){var previous=C.node.parent.children[C.node.parent.children.length-2] -if(!previous ||!previous.C){raise_syntax_error(C,'(keyword not following correct keyword)')} -return previous.C.tree[0]} -var get_docstring=$B.parser.get_docstring=function(node){var doc_string=_b_.None -if(node.body.length > 0){var firstchild=node.body[0] -if(firstchild instanceof $B.ast.Constant && -typeof firstchild.value=='string'){doc_string=firstchild.value}} -return doc_string} -var get_scope=$B.parser.get_scope=function(C,flag){ -var ctx_node=C.parent -while(true){if(ctx_node.type==='node'){break}else if(ctx_node.comprehension){return ctx_node} -ctx_node=ctx_node.parent} -var tree_node=ctx_node.node,scope=null -while(tree_node.parent && tree_node.parent.type !=='module'){var ntype=tree_node.parent.C.tree[0].type -switch(ntype){case 'def': -case 'class': -case 'generator': -var scope=tree_node.parent -scope.ntype=ntype -scope.is_function=ntype !='class' -return scope} -tree_node=tree_node.parent} -var scope=tree_node.parent ||tree_node -scope.ntype="module" -return scope} -var get_module=$B.parser.get_module=function(C){ -var ctx_node=C instanceof NodeCtx ? C :C.parent -while(ctx_node.type !=='node'){ctx_node=ctx_node.parent} -var tree_node=ctx_node.node -if(tree_node.ntype=="module"){return tree_node} -var scope=null -while(tree_node.parent.type !='module'){tree_node=tree_node.parent} -scope=tree_node.parent -scope.ntype="module" -return scope} -var get_node=$B.parser.get_node=function(C){var ctx=C -while(ctx.parent){ctx=ctx.parent} -return ctx.node} -var mangle_name=$B.parser.mangle_name=function(name,C){ -if(name.substr(0,2)=="__" && name.substr(name.length-2)!=="__"){var klass=null,scope=get_scope(C) -while(true){if(scope.ntype=="module"){return name}else if(scope.ntype=="class"){var class_name=scope.C.tree[0].name -while(class_name.charAt(0)=='_'){class_name=class_name.substr(1)} -return '_'+class_name+name}else{if(scope.parent && scope.parent.C){scope=get_scope(scope.C.tree[0])}else{return name}}}}else{return name}} -$B.nb_debug_lines=0 -var transition=$B.parser.transition=function(C,token,value){if($B.nb_debug_lines > 100){alert('too many debug lines') -$B.nb_debug_lines=0} -if($B.track_transitions){console.log("C",C,"token",token,value) -$B.nb_debug_lines++} -return C.transition(token,value)} -var s_escaped='abfnrtvxuU"0123456789'+"'"+'\\',is_escaped={} -for(var i=0;i < s_escaped.length;i++){is_escaped[s_escaped.charAt(i)]=true} -function SurrogatePair(value){ -value=value-0x10000 -return String.fromCharCode(0xD800 |(value >> 10))+ -String.fromCharCode(0xDC00 |(value & 0x3FF))} -function test_num(num_lit){var len=num_lit.length,pos=0,char,elt=null,subtypes={b:'binary',o:'octal',x:'hexadecimal'},digits_re=/[_\d]/ -function error(message){throw SyntaxError(message)} -function check(elt){if(elt.value.length==0){var t=subtypes[elt.subtype]||'decimal' -error("invalid "+t+" literal")}else if(elt.value[elt.value.length-1].match(/[\-+_]/)){var t=subtypes[elt.subtype]||'decimal' -error("invalid "+t+" literal")}else{ -elt.value=elt.value.replace(/_/g,"") -elt.length=pos -return elt}} -while(pos < len){var char=num_lit[pos] -if(char.match(digits_re)){if(elt===null){elt={value:char}}else{if(char=='_' && elt.value.match(/[._+\-]$/)){ -error('consecutive _ at '+pos)}else if(char=='_' && elt.subtype=='float' && -elt.value.match(/e$/i)){ -error('syntax error')}else if(elt.subtype=='b' && !(char.match(/[01_]/))){error(`invalid digit '${char}' in binary literal`)}else if(elt.subtype=='o' && !(char.match(/[0-7_]/))){error(`invalid digit '${char}' in octal literal`)}else if(elt.subtype===undefined && elt.value.startsWith("0")&& -!char.match(/[0_]/)){error("leading zeros in decimal integer literals are not"+ -" permitted; use an 0o prefix for octal integers")} -elt.value+=char} -pos++}else if(char.match(/[oxb]/i)){if(elt.value=="0"){elt.subtype=char.toLowerCase() -if(elt.subtype=="x"){digits_re=/[_\da-fA-F]/} -elt.value='' -pos++}else{error("invalid char "+char)}}else if(char=='.'){if(elt===null){error("invalid char in "+num_lit+" pos "+pos+": "+char)}else if(elt.subtype===undefined){elt.subtype="float" -if(elt.value.endsWith('_')){error("invalid decimal literal")} -elt.value=elt.value.replace(/_/g,"")+char -pos++}else{return check(elt)}}else if(char.match(/e/i)){if(num_lit[pos+1]===undefined){error("nothing after e")}else if(elt && subtypes[elt.subtype]!==undefined){ -error("syntax error")}else if(elt && elt.value.endsWith('_')){ -error("syntax error")}else if(num_lit[pos+1].match(/[+\-0-9_]/)){if(elt && elt.value){if(elt.exp){elt.length=pos -return elt} -elt.subtype='float' -elt.value+=char -elt.exp=true -pos++}else{error("unexpected e")}}else{return check(elt)}}else if(char.match(/[\+\-]/i)){if(elt===null){elt={value:char} -pos++}else if(elt.value.search(/e$/i)>-1){elt.value+=char -pos++}else{return check(elt)}}else if(char.match(/j/i)){if(elt &&(! elt.subtype ||elt.subtype=="float")){elt.imaginary=true -check(elt) -elt.length++ -return elt}else{error("invalid syntax")}}else{break}} -return check(elt)} -var opening={')':'(','}':'{',']':'['} -function check_line(token_reader,filename){var braces=[] -token_reader.position-- -while(true){var token=token_reader.read() -if(! token){return false} -if(token.type=='OP' && token.string==':' && braces.length==0){return true}else if(token.type=='OP'){if('([{'.indexOf(token.string)>-1){braces.push(token)}else if(')]}'.indexOf(token.string)>-1){if(braces.length==0){var err=SyntaxError( -`unmatched '${token.string}'`) -err.offset=token.start[1] -throw err}else if($B.last(braces).string !=opening[token.string]){var err=SyntaxError("closing parenthesis "+ -`'${token.string}' does not match opening `+ -`parenthesis '${$B.last(braces).string}'`) -err.offset=token.start[1] -throw err}else{braces.pop()}}}else if(token.type=='NEWLINE'){return false}} -return false} -function get_first_line(src,filename){ -var braces=[],token_reader=new $B.TokenReader(src,filename) -while(true){var token=token_reader.read() -if(! token){return{line:src}} -if(token.type=='OP' && token.string==':' && braces.length==0){return true}else if(token.type=='OP'){if('([{'.indexOf(token.string)>-1){braces.push(token)}else if(')]}'.indexOf(token.string)>-1){if(braces.length==0){var err=SyntaxError( -`unmatched '${token.string}'`) -err.offset=token.start[1] -throw err}else if($B.last(braces).string !=opening[token.string]){var err=SyntaxError("closing parenthesis "+ -`'${token.string}' does not match opening `+ -`parenthesis '${$B.last(braces).string}'`) -err.offset=token.start[1] -throw err}else{braces.pop()}}}else if(token.type=='NEWLINE'){var end=token.end,lines=src.split('\n'),match_lines=lines.slice(0,end[0]-1) -match_lines.push(lines[end[0]-1].substr(0,end[1])) -return{text:match_lines.join('\n'),newline_token:token}}} -return false} -function prepare_number(n){ -if(n.startsWith('.')){if(n.endsWith("j")){return{type:'imaginary',value:prepare_number(n.substr(0,n.length-1))}}else{return{type:'float',value:n.replace(/_/g,'')}} -pos=j}else if(n.startsWith('0')&& n !='0'){ -var num=test_num(n),base -if(num.imaginary){return{type:'imaginary',value:prepare_number(num.value)}} -if(num.subtype=='float'){return{type:num.subtype,value:num.value}} -if(num.subtype===undefined){base=10}else{base={'b':2,'o':8,'x':16}[num.subtype]} -if(base !==undefined){return{type:'int',value:[base,num.value]}}}else{var num=test_num(n) -if(num.subtype=="float"){if(num.imaginary){return{ -type:'imaginary',value:prepare_number(num.value)}}else{return{ -type:'float',value:num.value}}}else{if(num.imaginary){return{ -type:'imaginary',value:prepare_number(num.value)}}else{return{ -type:'int',value:[10,num.value]}}}}} -function test_escape(text,antislash_pos){ -var seq_end,mo -mo=/^[0-7]{1,3}/.exec(text.substr(antislash_pos+1)) -if(mo){return[String.fromCharCode(parseInt(mo[0],8)),1+mo[0].length]} -switch(text[antislash_pos+1]){case "x": -var mo=/^[0-9A-F]{0,2}/i.exec(text.substr(antislash_pos+2)) -if(mo[0].length !=2){seq_end=antislash_pos+mo[0].length+1 -$token.value.start[1]=seq_end -throw Error( -"(unicode error) 'unicodeescape' codec can't decode "+ -`bytes in position ${antislash_pos}-${seq_end}: truncated `+ -"\\xXX escape")}else{return[String.fromCharCode(parseInt(mo[0],16)),2+mo[0].length]} -case "u": -var mo=/^[0-9A-F]{0,4}/i.exec(text.substr(antislash_pos+2)) -if(mo[0].length !=4){seq_end=antislash_pos+mo[0].length+1 -$token.value.start[1]=seq_end -throw Error( -"(unicode error) 'unicodeescape' codec can't decode "+ -`bytes in position ${antislash_pos}-${seq_end}: truncated `+ -"\\uXXXX escape")}else{return[String.fromCharCode(parseInt(mo[0],16)),2+mo[0].length]} -case "U": -var mo=/^[0-9A-F]{0,8}/i.exec(text.substr(antislash_pos+2)) -if(mo[0].length !=8){seq_end=antislash_pos+mo[0].length+1 -$token.value.start[1]=seq_end -throw Error( -"(unicode error) 'unicodeescape' codec can't decode "+ -`bytes in position ${antislash_pos}-${seq_end}: truncated `+ -"\\uXXXX escape")}else{var value=parseInt(mo[0],16) -if(value > 0x10FFFF){throw Error('invalid unicode escape '+mo[0])}else if(value >=0x10000){return[SurrogatePair(value),2+mo[0].length]}else{return[String.fromCharCode(value),2+mo[0].length]}}}} -$B.test_escape=test_escape -function prepare_string(C,s,position){var len=s.length,pos=0,string_modifier,_type="string" -while(pos < len){if(s[pos]=='"' ||s[pos]=="'"){quote=s[pos] -string_modifier=s.substr(0,pos) -if(s.substr(pos,3)==quote.repeat(3)){_type="triple_string" -inner=s.substring(pos+3,s.length-3)}else{inner=s.substring(pos+quote.length,len-quote.length)} -break} -pos++} -var result={quote} -var mods={r:'raw',f:'fstring',b:'bytes'} -for(var mod of string_modifier){result[mods[mod]]=true} -var raw=C.type=='str' && C.raw,bytes=false,fstring=false,sm_length, -end=null; -if(string_modifier){switch(string_modifier){case 'r': -raw=true -break -case 'u': -break -case 'b': -bytes=true -break -case 'rb': -case 'br': -bytes=true -raw=true -break -case 'f': -fstring=true -sm_length=1 -break -case 'fr': -case 'rf': -fstring=true -sm_length=2 -raw=true -break} -string_modifier=false} -var escaped=false,zone='',end=0,src=inner -while(end < src.length){if(escaped){if(src.charAt(end)=="a" && ! raw){zone=zone.substr(0,zone.length-1)+"\u0007"}else{zone+=src.charAt(end) -if(raw && src.charAt(end)=='\\'){zone+='\\'}} -escaped=false -end++}else if(src.charAt(end)=="\\"){if(raw){if(end < src.length-1 && -src.charAt(end+1)==quote){zone+='\\\\'+quote -end+=2}else{zone+='\\\\' -end++} -escaped=true}else{if(src.charAt(end+1)=='\n'){ -end+=2}else if(src.substr(end+1,2)=='N{'){ -var end_lit=end+3,re=new RegExp("[-a-zA-Z0-9 ]+"),search=re.exec(src.substr(end_lit)) -if(search===null){raise_syntax_error(C," (unicode error) "+ -"malformed \\N character escape",pos)} -var end_lit=end_lit+search[0].length -if(src.charAt(end_lit)!="}"){raise_syntax_error(C," (unicode error) "+ -"malformed \\N character escape")} -var description=search[0].toUpperCase() -if($B.unicodedb===undefined){var xhr=new XMLHttpRequest -xhr.open("GET",$B.brython_path+"unicode.txt",false) -xhr.onreadystatechange=function(){if(this.readyState==4){if(this.status==200){$B.unicodedb=this.responseText}else{console.log("Warning - could not "+ -"load unicode.txt")}}} -xhr.send()} -if($B.unicodedb !==undefined){var re=new RegExp("^([0-9A-F]+);"+ -description+";.*$","m") -search=re.exec($B.unicodedb) -if(search===null){raise_syntax_error(C," (unicode error) "+ -"unknown Unicode character name")} -var cp=parseInt(search[1],16) -zone+=String.fromCodePoint(cp) -end=end_lit+1}else{end++}}else{try{var esc=test_escape(src,end)}catch(err){raise_syntax_error(C,err.message)} -if(esc){if(esc[0]=='\\'){zone+='\\\\'}else{zone+=esc[0]} -end+=esc[1]}else{if(end < src.length-1 && -is_escaped[src.charAt(end+1)]===undefined){zone+='\\'} -zone+='\\' -escaped=true -end++}}}}else if(src.charAt(end)=='\n' && _type !='triple_string'){ -raise_syntax_error(C,"EOL while scanning string literal")}else{zone+=src.charAt(end) -end++}} -var $string=zone,string='' -for(var i=0;i < $string.length;i++){var $car=$string.charAt(i) -if($car==quote){if(raw ||(i==0 || -$string.charAt(i-1)!='\\')){string+='\\'}else if(_type=="triple_string"){ -var j=i-1 -while($string.charAt(j)=='\\'){j--} -if((i-j-1)% 2==0){string+='\\'}}} -string+=$car} -if(fstring){try{var re=new RegExp("\\\\"+quote,"g"),string_no_bs=string.replace(re,quote) -var elts=$B.parse_fstring(string_no_bs)}catch(err){raise_syntax_error(C,err.message)}} -if(bytes){result.value='b'+quote+string+quote}else if(fstring){result.value=elts}else{result.value=quote+string+quote} -C.raw=raw; -return result} -function unindent(src){ -var lines=src.split('\n'),line,global_indent,indent,unindented_lines=[] -for(var line_num=0,len=lines.length;line_num < len;line_num++){line=lines[line_num] -indent=line.match(/^\s*/)[0] -if(indent !=line){ -if(global_indent===undefined){ -if(indent.length==0){ -return src} -global_indent=indent -var start=global_indent.length -unindented_lines.push(line.substr(start))}else if(line.startsWith(global_indent)){unindented_lines.push(line.substr(start))}else{throw SyntaxError("first line starts at "+ -`column ${start}, line ${line_num} at column `+ -line.match(/\s*/).length+'\n '+line)}}else{unindented_lines.push('')}} -return unindented_lines.join('\n')} -function handle_errortoken(C,token,token_reader){if(token.string=="'" ||token.string=='"'){raise_syntax_error(C,'unterminated string literal '+ -`(detected at line ${token.start[0]})`)}else if(token.string=='\\'){var nxt=token_reader.read() -if((! nxt)||nxt.type=='NEWLINE'){raise_syntax_error(C,'unexpected EOF while parsing')}else{raise_syntax_error_known_range(C,nxt,nxt,'unexpected character after line continuation character')}}else if(' `$'.indexOf(token.string)==-1){var u=_b_.ord(token.string).toString(16).toUpperCase() -u='U+'+'0'.repeat(Math.max(0,4-u.length))+u -raise_syntax_error(C,`invalid character '${token.string}' (${u})`)} -raise_syntax_error(C)} -const braces_opener={")":"(","]":"[","}":"{"},braces_open="([{",braces_closer={'(':')','{':'}','[':']'} -function check_brace_is_closed(brace,reader){ -var save_reader_pos=reader.position,closer=braces_closer[brace],nb_braces=1 -while(true){var tk=reader.read() -if(tk.type=='OP' && tk.string==brace){nb_braces+=1}else if(tk.type=='OP' && tk.string==closer){nb_braces-=1 -if(nb_braces==0){ -reader.seek(save_reader_pos) -break}}}} -var python_keywords=["class","return","break","for","lambda","try","finally","raise","def","from","nonlocal","while","del","global","with","as","elif","else","if","yield","assert","import","except","raise","in","pass","with","continue","async","await" -] -var $token={} -var dispatch_tokens=$B.parser.dispatch_tokens=function(root){var src=root.src -root.token_reader=new $B.TokenReader(src,root.filename) -var braces_stack=[] -var unsupported=[] -var $indented=["class","def","for","condition","single_kw","try","except","with","match","case" -] -var module=root.module -var lnum=root.line_num===undefined ? 1 :root.line_num -var node=new $Node() -node.line_num=lnum -root.add(node) -var C=null,expect_indent=false,indent=0 -var line2pos={0:0,1:0},line_num=1 -for(var pos=0,len=src.length;pos < len;pos++){if(src[pos]=='\n'){line_num++ -line2pos[line_num]=pos+1}} -while(true){try{var token=root.token_reader.read()}catch(err){C=C ||new NodeCtx(node) -if(err.type=='IndentationError'){raise_indentation_error(C,err.message)}else if(err instanceof SyntaxError){if(braces_stack.length > 0){var last_brace=$B.last(braces_stack),start=last_brace.start -$token.value=last_brace -raise_syntax_error(C,`'${last_brace.string}'`+ -' was never closed')} -var err_msg=err.message -if(err_msg=='EOF in multi-line statement'){err_msg='unexpected EOF while parsing'} -if(err.lineno){raise_error_known_location(_b_.SyntaxError,root.filename,err.lineno,err.col_offset,err.end_lineno,err.end_col_offset,err.line,err.message)}else{raise_syntax_error(C,err_msg)}} -throw err} -if(! token){throw Error('token done without ENDMARKER.')} -$token.value=token -if(token[2]===undefined){console.log('token incomplet',token,'module',module,root) -console.log('src',src)} -if(token.start===undefined){console.log('no start',token)} -lnum=token.start[0] -if(expect_indent && -['INDENT','COMMENT','NL'].indexOf(token.type)==-1){C=C ||new NodeCtx(node) -raise_indentation_error(C,"expected an indented block",expect_indent)} -switch(token.type){case 'ENDMARKER': -if(root.yields_func_check){for(const _yield of root.yields_func_check){$token.value=_yield.position -_yield.check_in_function()}} -if(indent !=0){raise_indentation_error(node.C,'expected an indented block')} -if(node.C===undefined ||node.C.tree.length==0){node.parent.children.pop()} -return -case 'ENCODING': -case 'TYPE_COMMENT': -continue -case 'NL': -if((! node.C)||node.C.tree.length==0){node.line_num++} -continue -case 'COMMENT': -var end=line2pos[token.end[0]]+token.end[1] -continue -case 'ERRORTOKEN': -C=C ||new NodeCtx(node) -if(token.string !=' '){handle_errortoken(C,token,root.token_reader)} -continue} -switch(token[0]){case 'NAME': -case 'NUMBER': -case 'OP': -case 'STRING': -case 'FSTRING_START': -C=C ||new NodeCtx(node)} -switch(token[0]){case 'NAME': -var name=token[1] -if(python_keywords.indexOf(name)>-1){if(unsupported.indexOf(name)>-1){raise_syntax_error(C,"(Unsupported Python keyword '"+name+"')")} -C=transition(C,name)}else if(name=='not'){C=transition(C,'not')}else if(typeof $operators[name]=='string'){ -C=transition(C,'op',name)}else{C=transition(C,'id',name)} -continue -case 'OP': -var op=token[1] -if((op.length==1 && '()[]{}.,='.indexOf(op)>-1)|| -[':='].indexOf(op)>-1){if(braces_open.indexOf(op)>-1){braces_stack.push(token) -try{check_brace_is_closed(op,root.token_reader)}catch(err){if(err.message=='EOF in multi-line statement'){raise_syntax_error(C,`'${op}' was never closed`)}else{throw err}}}else if(braces_opener[op]){if(braces_stack.length==0){raise_syntax_error(C,"(unmatched '"+op+"')")}else{var last_brace=$B.last(braces_stack) -if(last_brace.string==braces_opener[op]){braces_stack.pop()}else{raise_syntax_error(C,`closing parenthesis '${op}' does not `+ -`match opening parenthesis '`+ -`${last_brace.string}'`)}}} -C=transition(C,token[1])}else if(op==':'){C=transition(C,':') -if(C.node && C.node.is_body_node){node=C.node}}else if(op=='...'){C=transition(C,'ellipsis')}else if(op=='->'){C=transition(C,'annotation')}else if(op==';'){if(C.type=='node' && C.tree.length==0){raise_syntax_error(C,'(statement cannot start with ;)')} -transition(C,'eol') -var new_node=new $Node() -new_node.line_num=token[2][0]+1 -C=new NodeCtx(new_node) -node.parent.add(new_node) -node=new_node}else if($augmented_assigns[op]){C=transition(C,'augm_assign',op)}else{C=transition(C,'op',op)} -continue -case 'STRING': -var prepared=prepare_string(C,token[1],token[2]) -if(prepared.value instanceof Array){C=transition(C,'JoinedStr',prepared.value)}else{C=transition(C,'str',prepared.value)} -continue -case 'FSTRING_START': -C=transition(C,'JoinedStr',token[1]) -break -case 'FSTRING_MIDDLE': -C=transition(C,'middle',token[1]) -break -case 'FSTRING_END': -C=transition(C,'end',token[1]) -break -case 'NUMBER': -try{var prepared=prepare_number(token[1])}catch(err){raise_syntax_error(C,err.message)} -C=transition(C,prepared.type,prepared.value) -continue -case 'NEWLINE': -if(C && C.node && C.node.is_body_node){expect_indent=C.node.parent} -C=C ||new NodeCtx(node) -transition(C,'eol') -var new_node=new $Node() -new_node.line_num=token[2][0]+1 -if(node.parent.children.length > 0 && -node.parent.children[0].is_body_node){node.parent.parent.add(new_node)}else{node.parent.add(new_node)} -C=new NodeCtx(new_node) -node=new_node -continue -case 'DEDENT': -indent-- -if(! indent_continuation){node.parent.children.pop() -node.parent.parent.add(node) -C=new NodeCtx(node)} -continue -case 'INDENT': -indent++ -var indent_continuation=false -if(! expect_indent){if(token.line.trim()=='\\'){ -indent_continuation=true}else{C=C ||new NodeCtx(node) -raise_indentation_error(C,'unexpected indent')}} -expect_indent=false -continue}}} -var create_root_node=$B.parser.create_root_node=function(src,module,locals_id,parent_block,line_num){var root=new $Node('module') -root.module=module -root.id=locals_id -root.parent_block=parent_block -root.line_num=line_num -root.indent=-1 -root.imports={} -if(typeof src=="object"){root.is_comp=src.is_comp -root.filename=src.filename -src=src.src} -src=src.replace(/\r\n/gm,"\n") -root.src=src -return root} -$B.py2js=function(src,module,locals_id,parent_scope){ -if(typeof module=="object"){var __package__=module.__package__ -module=module.__name__}else{var __package__=""} -parent_scope=parent_scope ||$B.builtins_scope -var t0=Date.now(),ix, -filename,imported -if(typeof src=='object'){var ix=src.ix,filename=src.filename,imported=src.imported -src=src.src} -var locals_is_module=Array.isArray(locals_id) -if(locals_is_module){locals_id=locals_id[0]} -if($B.parser_to_ast){console.log('use parser to ast') -var _ast=new $B.Parser(src,filename,'file').parse()}else{var root=create_root_node({src,filename},module,locals_id,parent_scope) -dispatch_tokens(root) -var _ast=root.ast()} -var future=$B.future_features(_ast,filename) -var symtable=$B._PySymtable_Build(_ast,filename,future) -var js_obj=$B.js_from_root({ast:_ast,symtable,filename,imported}) -var js_from_ast=js_obj.js -return{ -_ast,imports:js_obj.imports,to_js:function(){return js_from_ast}}} -$B.parse_options=function(options){ -if(options===undefined){options={}}else if(typeof options=='number'){ -options={debug:options}}else if(typeof options !=='object'){console.warn('ignoring invalid argument passed to brython():',options) -options={}} -$B.debug=options.debug===undefined ? 1 :options.debug -_b_.__debug__=$B.debug > 0 -options.python_extension=options.python_extension ||'.py' -if($B.$options.args){$B.__ARGV=$B.$options.args}else{$B.__ARGV=_b_.list.$factory([])} -$B.options_parsed=true -return options} -if(!($B.isWebWorker ||$B.isNode)){var startup_observer=new MutationObserver(function(mutations){for(var mutation of mutations){for(var addedNode of mutation.addedNodes){addPythonScript(addedNode);}}}); -startup_observer.observe(document.documentElement,{childList:true,subtree:true});} -var brython_options={} -var python_scripts=[] -if(typeof document !=='undefined'){ -python_scripts=python_scripts.concat(Array.from( -document.querySelectorAll('script[type="text/python"]'))).concat( -Array.from( -document.querySelectorAll('script[type="text/python3"]'))) -var onload -addEventListener('DOMContentLoaded',function(ev){if(ev.target.body){onload=ev.target.body.onload} -if(! onload){ -ev.target.body.onload=function(ev){return brython()}}else{ -ev.target.body.onload=function(ev){onload() -if(! status.brython_called){brython()}}}} -) -class BrythonOptions extends HTMLElement{ -constructor(){super()} -connectedCallback(){for(var attr of this.getAttributeNames()){brython_options[attr]=convert_option(attr,this.getAttribute(attr))}}} -customElements.define('brython-options',BrythonOptions)} -var inject={},defined_ids={},script_to_id=new Map(),id_to_script={} -function addPythonScript(addedNode){ -if(addedNode.tagName=='SCRIPT' && -(addedNode.type=="text/python" || -addedNode.type=="text/python3")){python_scripts.push(addedNode)}} -function Injected(id){this.id=id} -var status={brython_called:false,first_unnamed_script:true} -$B.dispatch_load_event=function(script){ -script.dispatchEvent(new Event('load'))} -function injectPythonScript(addedNode){ -if(addedNode.tagName=='SCRIPT' && addedNode.type=="text/python"){set_script_id(addedNode) -run_scripts([addedNode])}} -function set_script_id(script){if(script_to_id.has(script)){}else if(script.id){if(defined_ids[script.id]){throw Error("Brython error : Found 2 scripts with the "+ -"same id '"+script.id+"'")}else{defined_ids[script.id]=true} -script_to_id.set(script,script.id)}else{if(script.className==='webworker'){throw _b_.AttributeError.$factory( -"webworker script has no attribute 'id'")} -if(status.first_unnamed_script){script_to_id.set(script,'__main__') -status.first_unnamed_script=false}else{script_to_id.set(script,'__main__'+$B.UUID())}} -var id=script_to_id.get(script) -id_to_script[id]=script -return id} -var brython=$B.parser.brython=function(options){$B.$options=$B.parse_options(options) -if(!($B.isWebWorker ||$B.isNode)){if(! status.brython_called){ -status.brython_called=true -startup_observer.disconnect() -var inject_observer=new MutationObserver(function(mutations){for(var mutation of mutations){for(var addedNode of mutation.addedNodes){injectPythonScript(addedNode);}}}) -inject_observer.observe(document.documentElement,{childList:true,subtree:true})}}else if($B.isNode){return} -for(var python_script of python_scripts){set_script_id(python_script)} -var scripts=[],webworkers=[] -var $href=$B.script_path=_window.location.href.split('#')[0],$href_elts=$href.split('/') -$href_elts.pop() -if($B.isWebWorker ||$B.isNode){$href_elts.pop()} -$B.curdir=$href_elts.join('/') -var kk=Object.keys(_window) -var ids=$B.get_page_option('ids')||$B.get_page_option('ipy_id') -if(ids !==undefined){if(! Array.isArray(ids)){throw _b_.ValueError.$factory("ids is not a list")} -if(ids.length==0){} -for(var id of ids){var script=document.querySelector(`script[id="${id}"]`) -if(script){set_script_id(script) -scripts.push(script)}else{console.log(`no script with id '${id}'`) -throw _b_.KeyError.$factory(`no script with id '${id}'`)}}}else if($B.isWebWorker){}else{var scripts=python_scripts.slice()} -var module_name -if($B.get_page_option('ipy_id')!==undefined){run_brython_magic(scripts)}else{run_scripts(scripts)}} -function convert_option(option,value){ -if(option=='debug'){if(typeof value=='string' && value.match(/^\d+$/)){return parseInt(value)}else{if(value !==null && value !==undefined){console.debug(`Invalid value for debug: ${value}`)}}}else if(option=='cache' || -option=='indexeddb' || -option=='static_stdlib_import'){if(value=='1' ||value.toLowerCase()=='true'){return true}else if(value=='0' ||value.toLowerCase()=='false'){return false}else{console.debug(`Invalid value for ${option}: ${value}`)}}else if(option=='ids' ||option=='pythonpath' ||option=='args'){ -if(typeof value=='string'){if(value.trim().length==0){return[]} -return value.trim().split(/\s+/)}} -return default_value[option]} -const default_option={args:[],cache:false,debug:1,indexeddb:true,python_extension:'.py',static_stdlib_import:true} -$B.get_filename=function(){if($B.frames_stack.length > 0){return $B.frames_stack[0].__file__}} -$B.get_filename_for_import=function(){var filename=$B.get_filename() -if($B.import_info[filename]===undefined){$B.make_import_paths(filename)} -return filename} -$B.get_page_option=function(option){ -if($B.$options.hasOwnProperty(option)){ -return $B.$options[option]}else if(brython_options.hasOwnProperty(option.toLowerCase())){ -return brython_options[option.toLowerCase()]}else{return default_option[option]}} -$B.get_option=function(option,err){var filename=$B.script_filename -if(err && err.$stack && err.$stack.length > 0){filename=err.$stack[0].__file__}else{filename=$B.get_filename()} -return $B.get_option_from_filename(option,filename)} -$B.get_option_from_filename=function(option,filename){if((! filename)||! $B.scripts[filename]){return $B.get_page_option(option)} -var value=$B.scripts[filename].getAttribute(option) -if(value !==null){return convert_option(option,value)}else{return $B.get_page_option(option)}} -function run_scripts(scripts){ -var webworkers=scripts.filter(script=> script.className==='webworker'),scripts=scripts.filter(script=> script.className !=='webworker') -var module_name -if(scripts.length > 0 ||$B.isWebWorker){if($B.get_page_option('indexedDB')&& $B.has_indexedDB && -$B.hasOwnProperty("VFS")){$B.tasks.push([$B.idb_open])}} -var src -for(var worker of webworkers){if(worker.src){ -$B.tasks.push([$B.ajax_load_script,{script:worker,name:worker.id,url:worker.src,is_ww:true}])}else{ -var source=(worker.innerText ||worker.textContent) -source=unindent(source) -source=source.replace(/^\n/,'') -$B.webworkers[worker.id]=worker -var filename=$B.script_filename=$B.script_path+"#"+worker.id -$B.url2name[filename]=worker.id -$B.file_cache[filename]=source -$B.scripts[filename]=worker -$B.dispatch_load_event(worker)}} -for(var script of scripts){module_name=script_to_id.get(script) -if(script.src){ -$B.tasks.push([$B.ajax_load_script,{script,name:module_name,url:script.src,id:script.id}])}else{ -src=(script.innerHTML ||script.textContent) -src=unindent(src) -src=src.replace(/^\n/,'') -if(src.endsWith('\n')){src=src.substr(0,src.length-1)} -var filename=$B.script_filename=$B.script_path+"#"+module_name -$B.file_cache[filename]=src -$B.url2name[filename]=module_name -$B.scripts[filename]=script -$B.tasks.push([$B.run_script,script,src,module_name,filename,true])}} -$B.loop()} -function run_brython_magic(scripts){ -module_name='__main__' -var src="",js,root -for(var script of scripts){src+=(script.innerHTML ||script.textContent)} -try{ -root=$B.py2js(src,module_name,module_name) -js=root.to_js() -if($B.debug > 1){$log(js)} -eval(js) -root=null -js=null}catch($err){root=null -js=null -console.log($err) -if($B.debug > 1){console.log($err) -for(var attr in $err){console.log(attr+' : ',$err[attr])}} -if($err.$py_error===undefined){console.log('Javascript error',$err) -$err=_b_.RuntimeError.$factory($err+'')} -var $trace=$B.$getattr($err,'info')+'\n'+$err.__name__+ -': '+$err.args -try{$B.$getattr($B.get_stderr(),'write')($trace)}catch(print_exc_err){console.log($trace)} -throw $err}} -$B.run_script=function(script,src,name,url,run_loop){ -$B.file_cache[url]=src -$B.url2name[url]=name -$B.scripts[url]=script -$B.make_import_paths(url) -_b_.__debug__=$B.get_option('debug')> 0 -try{var root=$B.py2js({src:src,filename:url},name,name),js=root.to_js(),script={__doc__:get_docstring(root._ast),js:js,__name__:name,__file__:url} -if($B.get_option_from_filename('debug',url)> 1){console.log($B.format_indent(js,0))}}catch(err){return $B.handle_error(err)} -if($B.hasOwnProperty("VFS")&& $B.has_indexedDB){ -var imports1=Object.keys(root.imports).slice(),imports=imports1.filter(function(item){return $B.VFS.hasOwnProperty(item)}) -for(var name of Object.keys(imports)){if($B.VFS.hasOwnProperty(name)){var submodule=$B.VFS[name],type=submodule[0] -if(type==".py"){var src=submodule[1],subimports=submodule[2],is_package=submodule.length==4 -if(type==".py"){ -required_stdlib_imports(subimports)} -for(var mod of subimports){if(imports.indexOf(mod)==-1){imports.push(mod)}}}}} -for(var j=0;j < imports.length;j++){$B.tasks.push([$B.inImported,imports[j]])} -root=null} -$B.tasks.push(["execute",script]) -if(run_loop){$B.loop()}} -var $log=$B.$log=function(js){js.split("\n").forEach(function(line,i){console.log(i+1,":",line)})} -$B.$operators=$operators -$B.$Node=$Node -$B.brython=brython})(__BRYTHON__) -var brython=__BRYTHON__.brython -if(__BRYTHON__.isNode){global.__BRYTHON__=__BRYTHON__ -module.exports={__BRYTHON__ }} -; - -(function($B){var _b_=$B.builtins -if($B.VFS_timestamp && $B.VFS_timestamp > $B.timestamp){ -$B.timestamp=$B.VFS_timestamp} -function idb_load(evt,module){ -var res=evt.target.result -var timestamp=$B.timestamp,debug=$B.get_page_option('debug') -if(res===undefined ||res.timestamp !=$B.timestamp || -($B.VFS[module]&& res.source_ts !==$B.VFS[module].timestamp)){ -if($B.VFS[module]!==undefined){var elts=$B.VFS[module],ext=elts[0],source=elts[1] -if(ext==".py"){var imports=elts[2],is_package=elts.length==4,source_ts=elts.timestamp,__package__ -if(is_package){__package__=module} -else{var parts=module.split(".") -parts.pop() -__package__=parts.join(".")} -$B.imported[module]=$B.module.$factory(module,"",__package__) -$B.url2name[module]=module -try{var root=$B.py2js( -{src:source,filename:module},module,module),js=root.to_js()}catch(err){$B.handle_error(err)} -delete $B.imported[module] -if(debug > 1){console.log("precompile",module)}}else{console.log('bizarre',module,ext)}}else{}}else{ -if(res.is_package){$B.precompiled[module]=[res.content]}else{$B.precompiled[module]=res.content} -if(res.imports.length > 0){ -if(debug > 1){console.log(module,"imports",res.imports)} -var subimports=res.imports.split(",") -for(var i=0;i < subimports.length;i++){var subimport=subimports[i] -if(subimport.startsWith(".")){ -var url_elts=module.split("."),nb_dots=0 -while(subimport.startsWith(".")){nb_dots++ -subimport=subimport.substr(1)} -var elts=url_elts.slice(0,nb_dots) -if(subimport){elts=elts.concat([subimport])} -subimport=elts.join(".")} -if(!$B.imported.hasOwnProperty(subimport)&& -!$B.precompiled.hasOwnProperty(subimport)){ -if($B.VFS.hasOwnProperty(subimport)){var submodule=$B.VFS[subimport],ext=submodule[0],source=submodule[1] -if(submodule[0]==".py"){$B.tasks.splice(0,0,[idb_get,subimport])}else{add_jsmodule(subimport,source)}}}}}} -loop()} -function store_precompiled(module,js,source_ts,imports,is_package){ -var db=$B.idb_cx.result,tx=db.transaction("modules","readwrite"),store=tx.objectStore("modules"),cursor=store.openCursor(),data={"name":module,"content":js,"imports":imports,"origin":origin,"timestamp":__BRYTHON__.timestamp,"source_ts":source_ts,"is_package":is_package},request=store.put(data) -if($B.get_page_option('debug')> 1){console.log("store precompiled",module,"package",is_package)} -document.dispatchEvent(new CustomEvent('precompile',{detail:'cache module '+module})) -var ix=$B.outdated.indexOf(module) -if(ix >-1){$B.outdated.splice(ix,1)} -request.onsuccess=function(evt){ -$B.tasks.splice(0,0,[idb_get,module]) -loop()}} -function idb_get(module){ -var db=$B.idb_cx.result,tx=db.transaction("modules","readonly") -try{var store=tx.objectStore("modules") -req=store.get(module) -req.onsuccess=function(evt){idb_load(evt,module)}}catch(err){console.info('error',err)}} -$B.idb_open_promise=function(){return new Promise(function(resolve,reject){$B.idb_name="brython-cache" -var idb_cx=$B.idb_cx=indexedDB.open($B.idb_name) -idb_cx.onsuccess=function(){var db=idb_cx.result -if(!db.objectStoreNames.contains("modules")){var version=db.version -db.close() -idb_cx=indexedDB.open($B.idb_name,version+1) -idb_cx.onupgradeneeded=function(){var db=$B.idb_cx.result,store=db.createObjectStore("modules",{"keyPath":"name"}) -store.onsuccess=resolve} -idb_cx.onsuccess=function(){var db=idb_cx.result,store=db.createObjectStore("modules",{"keyPath":"name"}) -store.onsuccess=resolve}}else{ -var tx=db.transaction("modules","readwrite"),store=tx.objectStore("modules"),record,outdated=[] -var openCursor=store.openCursor() -openCursor.onerror=function(evt){reject("open cursor error")} -openCursor.onsuccess=function(evt){cursor=evt.target.result -if(cursor){record=cursor.value -if(record.timestamp==$B.timestamp){if(!$B.VFS ||!$B.VFS[record.name]|| -$B.VFS[record.name].timestamp==record.source_ts){ -if(record.is_package){$B.precompiled[record.name]=[record.content]}else{$B.precompiled[record.name]=record.content}}else{ -outdated.push(record.name)}}else{outdated.push(record.name)} -cursor.continue()}else{$B.outdated=outdated -resolve()}}}} -idb_cx.onupgradeneeded=function(){var db=idb_cx.result,store=db.createObjectStore("modules",{"keyPath":"name"}) -store.onsuccess=resolve} -idb_cx.onerror=function(){ -$B.idb_cx=null -$B.idb_name=null -$B.$options.indexedDB=false -reject('could not open indexedDB database')}})} -$B.idb_open=function(obj){$B.idb_name="brython-cache" -var idb_cx=$B.idb_cx=indexedDB.open($B.idb_name) -idb_cx.onsuccess=function(){var db=idb_cx.result -if(! db.objectStoreNames.contains("modules")){var version=db.version -db.close() -console.info('create object store',version) -idb_cx=indexedDB.open($B.idb_name,version+1) -idb_cx.onupgradeneeded=function(){console.info("upgrade needed") -var db=$B.idb_cx.result,store=db.createObjectStore("modules",{"keyPath":"name"}) -store.onsuccess=loop} -idb_cx.onversionchanged=function(){console.log("version changed")} -idb_cx.onsuccess=function(){console.info("db opened",idb_cx) -var db=idb_cx.result,store=db.createObjectStore("modules",{"keyPath":"name"}) -store.onsuccess=loop}}else{if($B.get_page_option('debug')> 1){console.info("using indexedDB for stdlib modules cache")} -var tx=db.transaction("modules","readwrite"),store=tx.objectStore("modules"),record,outdated=[] -var openCursor=store.openCursor() -openCursor.onerror=function(evt){console.log("open cursor error",evt)} -openCursor.onsuccess=function(evt){cursor=evt.target.result -if(cursor){record=cursor.value -if(record.timestamp==$B.timestamp){if(!$B.VFS ||!$B.VFS[record.name]|| -$B.VFS[record.name].timestamp==record.source_ts){ -if(record.is_package){$B.precompiled[record.name]=[record.content]}else{$B.precompiled[record.name]=record.content} -if($B.get_page_option('debug')> 1){console.info("load from cache",record.name)}}else{ -outdated.push(record.name)}}else{outdated.push(record.name)} -cursor.continue()}else{if($B.get_page_option('debug')> 1){console.log("done")} -$B.outdated=outdated -loop()}}}} -idb_cx.onupgradeneeded=function(){console.info("upgrade needed") -var db=idb_cx.result,store=db.createObjectStore("modules",{"keyPath":"name"}) -store.onsuccess=loop} -idb_cx.onerror=function(){console.info('could not open indexedDB database') -$B.idb_cx=null -$B.idb_name=null -$B.$options.indexedDB=false -loop()}} -$B.ajax_load_script=function(s){var script=s.script,url=s.url,name=s.name,rel_path=url.substr($B.script_dir.length+1) -if($B.files && $B.files.hasOwnProperty(rel_path)){ -var src=atob($B.files[rel_path].content) -$B.tasks.splice(0,0,[$B.run_script,script,src,name,url,true]) -loop()}else if($B.protocol !="file"){$B.script_filename=url -$B.scripts[url]=script -var req=new XMLHttpRequest(),cache=$B.get_option('cache'),qs=cache ? '' : -(url.search(/\?/)>-1 ? '&' :'?')+Date.now() -req.open("GET",url+qs,true) -req.onreadystatechange=function(){if(this.readyState==4){if(this.status==200){var src=this.responseText -if(s.is_ww){$B.webworkers[name]=script -$B.file_cache[url]=src -$B.dispatch_load_event(script)}else{$B.tasks.splice(0,0,[$B.run_script,script,src,name,url,true])} -loop()}else if(this.status==404){throw Error(url+" not found")}}} -req.send()}else{throw _b_.IOError.$factory("can't load external script at "+ -script.url+" (Ajax calls not supported with protocol file:///)")}} -function add_jsmodule(module,source){ -source+="\nvar $locals_"+ -module.replace(/\./g,"_")+" = $module" -$B.precompiled[module]=source} -var inImported=$B.inImported=function(module){if($B.imported.hasOwnProperty(module)){}else if(__BRYTHON__.VFS && __BRYTHON__.VFS.hasOwnProperty(module)){var elts=__BRYTHON__.VFS[module] -if(elts===undefined){console.log('bizarre',module)} -var ext=elts[0],source=elts[1],is_package=elts.length==4 -if(ext==".py"){if($B.idb_cx && !$B.idb_cx.$closed){$B.tasks.splice(0,0,[idb_get,module])}}else{add_jsmodule(module,source)}}else{console.log("bizarre",module)} -loop()} -function report_precompile(mod){if(typeof document !=='undefined'){document.dispatchEvent(new CustomEvent('precompile',{detail:'remove outdated '+mod+ -' from cache'}))}} -function report_close(){if(typeof document !=='undefined'){document.dispatchEvent(new CustomEvent('precompile',{detail:"close"}))}} -function report_done(mod){if(typeof document !=='undefined'){document.dispatchEvent(new CustomEvent("brython_done",{detail:$B.obj_dict($B.$options)}))}} -var loop=$B.loop=function(){if($B.tasks.length==0){ -if($B.idb_cx && ! $B.idb_cx.$closed){var db=$B.idb_cx.result,tx=db.transaction("modules","readwrite"),store=tx.objectStore("modules") -while($B.outdated.length > 0){var module=$B.outdated.pop(),req=store.delete(module) -req.onsuccess=(function(mod){return function(event){if($B.get_page_option('debug')> 1){console.info("delete outdated",mod)} -report_precompile(mod)}})(module)} -report_close() -$B.idb_cx.result.close() -$B.idb_cx.$closed=true} -report_done() -return} -var task=$B.tasks.shift(),func=task[0],args=task.slice(1) -if(func=="execute"){try{var script=task[1],script_id=script.__name__.replace(/\./g,"_"),module=$B.module.$factory(script.__name__) -module.__file__=script.__file__ -module.__doc__=script.__doc__ -$B.imported[script_id]=module -var module=new Function(script.js+`\nreturn locals`)() -for(var key in module){if(! key.startsWith('$')){$B.imported[script_id][key]=module[key]}}}catch(err){ -if(err.__class__===undefined){if(err.$py_exc){err=err.$py_exc}else{$B.freeze(err) -var stack=err.$stack,linenos=err.$linenos -var lineNumber=err.lineNumber -if(lineNumber !==undefined){console.log('around line',lineNumber) -console.log(script.js.split('\n'). -slice(lineNumber-4,lineNumber).join('\n'))} -$B.print_stack() -err=_b_.RuntimeError.$factory(err+'') -err.$stack=stack -err.$linenos=linenos}} -$B.handle_error(err)} -loop()}else{ -try{func.apply(null,args)}catch(err){$B.handle_error(err)}}} -$B.tasks=[] -$B.has_indexedDB=self.indexedDB !==undefined -function required_stdlib_imports(imports,start){ -var nb_added=0 -start=start ||0 -for(var i=start;i < imports.length;i++){var module=imports[i] -if($B.imported.hasOwnProperty(module)){continue} -var mod_obj=$B.VFS[module] -if(mod_obj===undefined){console.log("undef",module)} -if(mod_obj[0]==".py"){var subimports=mod_obj[2] -subimports.forEach(function(subimport){if(!$B.imported.hasOwnProperty(subimport)&& -imports.indexOf(subimport)==-1){if($B.VFS.hasOwnProperty(subimport)){imports.push(subimport) -nb_added++}}})}} -if(nb_added){required_stdlib_imports(imports,imports.length-nb_added)} -return imports}})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins,_window=self,isWebWorker=('undefined' !==typeof WorkerGlobalScope)&& -("function"===typeof importScripts)&& -(navigator instanceof WorkerNavigator) -function missing_required_kwonly(fname,args){var plural=args.length==1 ? '' :'s',arg_list -args=args.map(x=> `'${x}'`) -if(args.length==1){arg_list=args[0]}else if(args.length==2){arg_list=args[0]+' and '+args[1]}else{arg_list=args.slice(0,args.length-1).join(', ')+', and '+ -args[args.length-1]} -throw _b_.TypeError.$factory(fname+'() '+ -`missing ${args.length} required keyword-only argument${plural}: `+ -arg_list)} -function missing_required_pos(fname,args){var plural=args.length==1 ? '' :'s',arg_list -args=args.map(x=> `'${x}'`) -if(args.length==1){arg_list=args[0]}else if(args.length==2){arg_list=args[0]+' and '+args[1]}else{arg_list=args.slice(0,args.length-1).join(', ')+', and '+ -args[args.length-1]} -throw _b_.TypeError.$factory(fname+'() '+ -`missing ${args.length} required positional argument${plural}: `+ -arg_list)} -function multiple_values(fname,arg){throw _b_.TypeError.$factory(fname+'() '+ -`got multiple values for argument '${arg}'`)} -function pos_only_passed_as_keyword(fname,arg){return _b_.TypeError.$factory(fname+ -`() got some positional-only arguments passed as keyword arguments:`+ -` '${arg}'`)} -function too_many_pos_args(fname,kwarg,arg_names,nb_kwonly,defaults,args,slots){var nb_pos=args.length,last=$B.last(args) -if(last.$kw){ -if(! kwarg){var kw=$B.parse_kwargs(last.$kw,fname) -for(var k in kw){if(! slots.hasOwnProperty(k)){throw unexpected_keyword(fname,k)}}} -nb_pos--} -var nb_def=defaults.length -var expected=arg_names.length-nb_kwonly,plural=expected==1 ? '' :'s' -if(nb_def){expected=`from ${expected - nb_def} to ${expected}` -plural='s'} -var verb=nb_pos==1 ? 'was' :'were' -return _b_.TypeError.$factory(fname+'() takes '+ -`${expected} positional argument${plural} but ${nb_pos} ${verb} given`)} -function unexpected_keyword(fname,k){return _b_.TypeError.$factory(fname+ -`() got an unexpected keyword argument '${k}'`)} -var empty={} -$B.args0=function(f,args){ -var arg_names=f.$infos.arg_names,code=f.$infos.__code__,slots={} -for(var arg_name of arg_names){slots[arg_name]=empty} -return $B.parse_args( -args,f.$infos.__name__,code.co_argcount,slots,arg_names,f.$infos.__defaults__,f.$infos.__kwdefaults__,f.$infos.vararg,f.$infos.kwarg,code.co_posonlyargcount,code.co_kwonlyargcount)} -$B.args=function(fname,argcount,slots,var_names,args,$dobj,vararg,kwarg,nb_posonly){ -var nb_posonly=nb_posonly ||0,nb_kwonly=var_names.length-argcount,defaults=[],kwdefaults={$jsobj:{}} -for(var i=0,len=var_names.length;i < len;i++){var var_name=var_names[i] -if($dobj.hasOwnProperty(var_name)){if(i < argcount){defaults.push($dobj[var_name])}else{kwdefaults.$jsobj[var_name]=$dobj[var_name]}}} -for(var k in slots){slots[k]=empty} -return $B.parse_args(args,fname,argcount,slots,var_names,defaults,kwdefaults,vararg,kwarg,nb_posonly,nb_kwonly)} -$B.single_arg=function(fname,arg,args){var slots={} -slots[arg]=null -var $=$B.args(fname,1,slots,[arg],args,{},null,null) -return $[arg]} -$B.parse_args=function(args,fname,argcount,slots,arg_names,defaults,kwdefaults,vararg,kwarg,nb_posonly,nb_kwonly){ -var nb_passed=args.length,nb_passed_pos=nb_passed,nb_expected=arg_names.length,nb_pos_or_kw=nb_expected-nb_kwonly,posonly_set={},nb_def=defaults.length,varargs=[],extra_kw={},kw -for(var i=0;i < nb_passed;i++){var arg=args[i] -if(arg && arg.__class__===$B.generator){slots.$has_generators=true} -if(arg && arg.$kw){ -nb_passed_pos-- -kw=$B.parse_kwargs(arg.$kw,fname)}else{var arg_name=arg_names[i] -if(arg_name !==undefined){if(i >=nb_pos_or_kw){if(vararg){varargs.push(arg)}else{throw too_many_pos_args( -fname,kwarg,arg_names,nb_kwonly,defaults,args,slots)}}else{if(i < nb_posonly){posonly_set[arg_name]=true} -slots[arg_name]=arg}}else if(vararg){varargs.push(arg)}else{throw too_many_pos_args( -fname,kwarg,arg_names,nb_kwonly,defaults,args,slots)}}} -for(var j=nb_passed_pos;j < nb_pos_or_kw;j++){var arg_name=arg_names[j] -if(kw && kw.hasOwnProperty(arg_name)){ -if(j < nb_posonly){ -if(! kwarg){throw pos_only_passed_as_keyword(fname,arg_name)}}else{slots[arg_name]=kw[arg_name] -kw[arg_name]=empty}} -if(slots[arg_name]===empty){ -def_value=defaults[j-(nb_pos_or_kw-nb_def)] -if(def_value !==undefined){slots[arg_name]=def_value -if(j < nb_posonly){ -if(kw && kw.hasOwnProperty(arg_name)&& kwarg){extra_kw[arg_name]=kw[arg_name] -kw[arg_name]=empty}}}else{var missing_pos=arg_names.slice(j,nb_expected-nb_kwonly) -throw missing_required_pos(fname,missing_pos)}}} -var missing_kwonly=[] -for(var i=nb_pos_or_kw;i < nb_expected;i++){var arg_name=arg_names[i] -if(kw && kw.hasOwnProperty(arg_name)){slots[arg_name]=kw[arg_name] -kw[arg_name]=empty}else{var kw_def=_b_.dict.$get_string(kwdefaults,arg_name) -if(kw_def !==_b_.dict.$missing){slots[arg_name]=kw_def}else{missing_kwonly.push(arg_name)}}} -if(missing_kwonly.length > 0){throw missing_required_kwonly(fname,missing_kwonly)} -if(! kwarg){for(var k in kw){if(! slots.hasOwnProperty(k)){throw unexpected_keyword(fname,k)}}} -for(var k in kw){if(kw[k]===empty){continue} -if(! slots.hasOwnProperty(k)){if(kwarg){extra_kw[k]=kw[k]}}else if(slots[k]!==empty){if(posonly_set[k]&& kwarg){ -extra_kw[k]=kw[k]}else{throw multiple_values(fname,k)}}else{slots[k]=kw[k]}} -if(kwarg){slots[kwarg]=$B.obj_dict(extra_kw)} -if(vararg){slots[vararg]=$B.fast_tuple(varargs)} -return slots} -$B.parse_kwargs=function(kw_args,fname){var kwa=kw_args[0] -for(var i=1,len=kw_args.length;i < len;i++){var kw_arg=kw_args[i],key,value -if(kw_arg.__class__===_b_.dict){for(var entry of _b_.dict.$iter_items_with_hash(kw_arg)){key=entry.key -if(typeof key !=='string'){throw _b_.TypeError.$factory(fname+ -"() keywords must be strings")}else if(kwa[key]!==undefined){throw _b_.TypeError.$factory(fname+ -"() got multiple values for argument '"+ -key+"'")}else{kwa[key]=entry.value}}}else{ -var cls=$B.get_class(kw_arg) -try{var keys_method=$B.$call1($B.$getattr(cls,'keys'))}catch(err){throw _b_.TypeError.$factory(`${fname} argument `+ -`after ** must be a mapping, not ${$B.class_name(kw_arg)}`)} -var keys_iter=$B.make_js_iterator(keys_method(kw_arg)),getitem -for(var k of keys_iter){if(typeof k !=="string"){throw _b_.TypeError.$factory(fname+ -"() keywords must be strings")} -if(kwa[k]!==undefined){throw _b_.TypeError.$factory(fname+ -"() got multiple values for argument '"+ -k+"'")} -if(! getitem){try{getitem=$B.$getattr(cls,'__getitem__')}catch(err){throw _b_.TypeError.$factory( -`'${$B.class_name(kw_arg)}' object is not subscriptable`)}} -kwa[k]=getitem(kw_arg,k)}}} -return kwa} -$B.check_nb_args=function(name,expected,args){ -var len=args.length,last=args[len-1] -if(last && last.$kw){var kw=last.$kw -if(kw[1]){if(_b_.len(kw[1])==0){len--}}} -if(len !=expected){if(expected==0){throw _b_.TypeError.$factory(name+"() takes no argument"+ -" ("+len+" given)")}else{throw _b_.TypeError.$factory(name+"() takes exactly "+ -expected+" argument"+(expected < 2 ? '' :'s')+ -" ("+len+" given)")}}} -$B.check_no_kw=function(name,x,y){ -if(x===undefined){console.log("x undef",name,x,y)} -if((x.$kw && x.$kw[0]&& x.$kw[0].length > 0)|| -(y !==undefined && y.$kw)){throw _b_.TypeError.$factory(name+"() takes no keyword arguments")}} -$B.check_nb_args_no_kw=function(name,expected,args){ -var len=args.length,last=args[len-1] -if(last && last.$kw){if(last.$kw.length==2 && Object.keys(last.$kw[0]).length==0){len--}else{throw _b_.TypeError.$factory(name+"() takes no keyword arguments")}} -if(len !=expected){if(expected==0){throw _b_.TypeError.$factory(name+"() takes no argument"+ -" ("+len+" given)")}else{throw _b_.TypeError.$factory(name+"() takes exactly "+ -expected+" argument"+(expected < 2 ? '' :'s')+ -" ("+len+" given)")}}} -$B.get_class=function(obj){ -if(obj===null){return $B.imported.javascript.NullType } -if(obj===undefined){return $B.imported.javascript.UndefinedType } -var klass=obj.__class__ -if(klass===undefined){switch(typeof obj){case "number": -return Number.isInteger(obj)? _b_.int :undefined -case "string": -return _b_.str -case "boolean": -return _b_.bool -case "function": -if(obj.$is_js_func){ -return $B.JSObj} -return $B.function -case "object": -if(Array.isArray(obj)){if(obj.$is_js_array){return $B.js_array}else if(Object.getPrototypeOf(obj)===Array.prototype){obj.__class__=_b_.list -return _b_.list}}else if(obj instanceof $B.str_dict){return _b_.dict}else if(typeof Node !=="undefined" -&& obj instanceof Node){if(obj.tagName){return $B.imported['browser.html'][obj.tagName]|| -$B.DOMNode} -return $B.DOMNode} -break}} -if(klass===undefined){return $B.get_jsobj_class(obj)} -return klass} -$B.class_name=function(obj){var klass=$B.get_class(obj) -if(klass===$B.JSObj){return 'Javascript '+obj.constructor.name}else{return klass.__name__}} -$B.make_js_iterator=function(iterator,frame,lineno){ -var set_lineno=$B.set_lineno -if(frame===undefined){if($B.frames_stack.length==0){function set_lineno(){}}else{frame=$B.last($B.frames_stack) -lineno=frame.$lineno}} -if(iterator.__class__===_b_.range){var obj={ix:iterator.start} -if(iterator.step > 0){return{ -[Symbol.iterator](){return this},next(){set_lineno(frame,lineno) -if(obj.ix >=iterator.stop){return{done:true,value:null}} -var value=obj.ix -obj.ix+=iterator.step -return{done:false,value}}}}else{return{ -[Symbol.iterator](){return this},next(){set_lineno(frame,lineno) -if(obj.ix <=iterator.stop){return{done:true,value:null}} -var value=obj.ix -obj.ix+=iterator.step -return{done:false,value}}}}} -if(typeof iterator=='string'){ -var it=iterator[Symbol.iterator](),gen=(function*(){for(var char of iterator){if(char.length==2){yield char[0] -yield char[1]}else{yield char}}})() -return{ -[Symbol.iterator](){return this},next(){set_lineno(frame,lineno) -return gen.next()}}} -if(iterator instanceof String){ -return(function*(){var len=iterator.length,pos=0,string_ix=0,surrogate_ix=0 -while(string_ix < len){if(pos==iterator.surrogates[surrogate_ix]){var res=$B.make_String(iterator.substr(string_ix,2),[0]) -yield res -string_ix++ -surrogate_ix++}else{yield iterator[string_ix]} -string_ix++ -pos++}})()} -if(iterator[Symbol.iterator]&& ! iterator.$is_js_array){var it=iterator[Symbol.iterator](),nb=0 -return{ -[Symbol.iterator](){return this},next(){set_lineno(frame,lineno) -return it.next()}}} -var next_func=$B.$call($B.$getattr(_b_.iter(iterator),'__next__')) -return{ -[Symbol.iterator](){return this},next(){set_lineno(frame,lineno) -try{var value=next_func() -return{done:false,value}}catch(err){if($B.is_exc(err,[_b_.StopIteration])){return{done:true,value:null}} -throw err}}}} -$B.unpacker=function(obj,nb_targets,has_starred){ -var position,position_rank=3 -if(has_starred){var nb_after_starred=arguments[3] -position_rank++} -if($B.pep657){position=arguments[position_rank]} -var t=_b_.list.$factory(obj),right_length=t.length,left_length=nb_targets+(has_starred ? nb_after_starred-1 :0) -if(right_length < left_length){var exc=_b_.ValueError.$factory(`not enough values to unpack `+ -`(expected ${left_length}, got ${right_length})`) -if(position){$B.set_exception_offsets(exc,position)} -throw exc} -if((! has_starred)&& right_length > left_length){var exc=_b_.ValueError.$factory("too many values to unpack "+ -`(expected ${left_length})`) -if(position){$B.set_exception_offsets(exc,position)} -throw exc} -t.index=-1 -t.read_one=function(){t.index++ -return t[t.index]} -t.read_rest=function(){ -t.index++ -var res=t.slice(t.index,t.length-nb_after_starred) -t.index=t.length-nb_after_starred-1 -return res} -return t} -$B.set_lineno=function(frame,lineno){frame.$lineno=lineno -if(frame.$f_trace !==_b_.None){$B.trace_line()} -return true} -$B.get_method_class=function(method,ns,qualname,refs){ -var klass=ns -if(method.$infos && method.$infos.$class){return method.$infos.$class} -for(var ref of refs){if(klass[ref]===undefined){var fake_class=$B.make_class(qualname) -return fake_class} -klass=klass[ref]} -return klass} -$B.$JS2Py=function(src){if(typeof src==="number"){if(src % 1===0){return src} -return _b_.float.$factory(src)} -if(src===null ||src===undefined){return _b_.None} -if(Array.isArray(src)&& -Object.getPrototypeOf(src)===Array.prototype){src.$brython_class="js" } -return src} -$B.warn=function(klass,message,filename,token){var warning=klass.$factory(message) -warning.filename=filename -if(klass===_b_.SyntaxWarning){warning.lineno=token.start[0] -warning.offset=token.start[1] -warning.end_lineno=token.end[0] -warning.end_offset=token.end[1] -warning.text=token.line -warning.args[1]=$B.fast_tuple([filename,warning.lineno,warning.offset,warning.text,warning.end_lineno,warning.end_offset])} -$B.imported._warnings.warn(warning)} -function index_error(obj){var type=typeof obj=="string" ? "string" :"list" -throw _b_.IndexError.$factory(type+" index out of range")} -$B.$getitem=function(obj,item,position){var is_list=Array.isArray(obj)&& obj.__class__===_b_.list,is_dict=obj.__class__===_b_.dict && ! obj.$jsobj -if(typeof item=="number"){if(is_list ||typeof obj=="string"){item=item >=0 ? item :obj.length+item -if(obj[item]!==undefined){return obj[item]}else{index_error(obj)}}}else if(item.valueOf && typeof item.valueOf()=="string" && is_dict){return _b_.dict.$getitem(obj,item)} -if(obj.$is_class){var class_gi=$B.$getattr(obj,"__class_getitem__",_b_.None) -if(class_gi !==_b_.None){return $B.$call(class_gi)(item)}else if(obj.__class__){class_gi=$B.$getattr(obj.__class__,"__getitem__",_b_.None) -if(class_gi !==_b_.None){return class_gi(obj,item)}else{throw _b_.TypeError.$factory("'"+ -$B.class_name(obj.__class__)+ -"' object is not subscriptable")}}} -if(is_list){return _b_.list.$getitem(obj,item)} -if(is_dict){return _b_.dict.$getitem(obj,item)} -var gi=$B.$getattr(obj.__class__ ||$B.get_class(obj),"__getitem__",_b_.None) -if(gi !==_b_.None){return gi(obj,item)} -var exc=_b_.TypeError.$factory("'"+$B.class_name(obj)+ -"' object is not subscriptable") -if(position){$B.set_exception_offsets(exc,position)} -throw exc} -$B.getitem_slice=function(obj,slice){var res -if(Array.isArray(obj)&& obj.__class__===_b_.list){if(slice.start===_b_.None && slice.stop===_b_.None){if(slice.step===_b_.None ||slice.step==1){res=obj.slice()}else if(slice.step==-1){res=obj.slice().reverse()}}else if(slice.step===_b_.None){if(slice.start===_b_.None){slice.start=0} -if(slice.stop===_b_.None){slice.stop=obj.length} -if(typeof slice.start=="number" && -typeof slice.stop=="number"){if(slice.start < 0){slice.start+=obj.length} -if(slice.stop < 0){slice.stop+=obj.length} -res=obj.slice(slice.start,slice.stop)}} -if(res){res.__class__=obj.__class__ -res.__brython__=true -return res}else{return _b_.list.$getitem(obj,slice)}}else if(typeof obj=="string"){return _b_.str.__getitem__(obj,slice)} -return $B.$getattr($B.get_class(obj),"__getitem__")(obj,slice)} -$B.$getattr_pep657=function(obj,attr,position){try{return $B.$getattr(obj,attr)}catch(err){$B.set_exception_offsets(err,position) -throw err}} -$B.set_list_slice=function(obj,start,stop,value){if(start===null){start=0}else{start=$B.$GetInt(start) -if(start < 0){start=Math.max(0,start+obj.length)}} -if(stop===null){stop=obj.length} -stop=$B.$GetInt(stop) -if(stop < 0){stop=Math.max(0,stop+obj.length)} -var res=_b_.list.$factory(value) -obj.splice.apply(obj,[start,stop-start].concat(res))} -$B.set_list_slice_step=function(obj,start,stop,step,value){if(step===null ||step==1){return $B.set_list_slice(obj,start,stop,value)} -if(step==0){throw _b_.ValueError.$factory("slice step cannot be zero")} -step=$B.$GetInt(step) -if(start===null){start=step > 0 ? 0 :obj.length-1}else{start=$B.$GetInt(start)} -if(stop===null){stop=step > 0 ? obj.length :-1}else{stop=$B.$GetInt(stop)} -var repl=_b_.list.$factory(value),j=0,test,nb=0 -if(step > 0){test=function(i){return i < stop}} -else{test=function(i){return i > stop}} -for(var i=start;test(i);i+=step){nb++} -if(nb !=repl.length){throw _b_.ValueError.$factory( -"attempt to assign sequence of size "+repl.length+ -" to extended slice of size "+nb)} -for(var i=start;test(i);i+=step){obj[i]=repl[j] -j++}} -$B.$setitem=function(obj,item,value){if(Array.isArray(obj)&& obj.__class__===undefined && -! obj.$is_js_array && -typeof item=="number" && -! _b_.isinstance(obj,_b_.tuple)){if(item < 0){item+=obj.length} -if(obj[item]===undefined){throw _b_.IndexError.$factory("list assignment index out of range")} -obj[item]=value -return}else if(obj.__class__===_b_.dict){_b_.dict.$setitem(obj,item,value) -return}else if(obj.__class__===_b_.list){return _b_.list.$setitem(obj,item,value)} -var si=$B.$getattr(obj.__class__ ||$B.get_class(obj),"__setitem__",null) -if(si===null ||typeof si !='function'){throw _b_.TypeError.$factory("'"+$B.class_name(obj)+ -"' object does not support item assignment")} -return si(obj,item,value)} -$B.$delitem=function(obj,item){if(Array.isArray(obj)&& obj.__class__===_b_.list && -typeof item=="number" && -!_b_.isinstance(obj,_b_.tuple)){if(item < 0){item+=obj.length} -if(obj[item]===undefined){throw _b_.IndexError.$factory("list deletion index out of range")} -obj.splice(item,1) -return}else if(obj.__class__===_b_.dict){_b_.dict.__delitem__(obj,item) -return}else if(obj.__class__===_b_.list){return _b_.list.__delitem__(obj,item)} -var di=$B.$getattr(obj.__class__ ||$B.get_class(obj),"__delitem__",null) -if(di===null){throw _b_.TypeError.$factory("'"+$B.class_name(obj)+ -"' object doesn't support item deletion")} -return di(obj,item)} -function num_result_type(x,y){var is_int,is_float,x_num,y_num -if(typeof x=="number"){x_num=x -if(typeof y=="number"){is_int=true -y_num=y}else if(y.__class__===_b_.float){is_float=true -y_num=y.value}}else if(x.__class__===_b_.float){x_num=x.value -if(typeof y=="number"){y_num=y -is_float=true}else if(y.__class__===_b_.float){is_float=true -y_num=y.value}} -return{is_int,is_float,x:x_num,y:y_num}} -$B.augm_assign=function(left,op,right){var res_type=num_result_type(left,right) -if(res_type.is_int ||res_type.is_float){var z -switch(op){case '+=': -z=res_type.x+res_type.y -break -case '-=': -z=res_type.x-res_type.y -break -case '*=': -z=res_type.x*res_type.y -break -case '/=': -z=res_type.x/res_type.y -break} -if(z){if(res_type.is_int && Number.isSafeInteger(z)){return z}else if(res_type.res_is_float){return $B.fast_float(z)}}}else if(op=='*='){if(typeof left=="number" && typeof right=="string"){return left <=0 ? '' :right.repeat(left)}else if(typeof left=="string" && typeof right=="number"){return right <=0 ? '' :left.repeat(right)}}else if(op=='+='){if(typeof left=="string" && typeof right=="string"){return left+right}} -var op1=op.substr(0,op.length-1),method=$B.op2method.augmented_assigns[op],augm_func=$B.$getattr(left,'__'+method+'__',null) -if(augm_func !==null){var res=$B.$call(augm_func)(right) -if(res===_b_.NotImplemented){throw _b_.TypeError.$factory(`unsupported operand type(s)`+ -` for ${op}: '${$B.class_name(left)}' `+ -`and '${$B.class_name(right)}'`)} -return res}else{var method1=$B.op2method.operations[op1] -if(method1===undefined){method1=$B.op2method.binary[op1]} -return $B.rich_op(`__${method1}__`,left,right)}} -$B.$is=function(a,b){ -if((a===undefined ||a===$B.Undefined)&& -(b===undefined ||b===$B.Undefined)){return true} -if(a===null){return b===null} -if(a.__class__===_b_.float && b.__class__===_b_.float){if(isNaN(a.value)&& isNaN(b.value)){return true} -return a.value==b.value} -if((a===_b_.int && b==$B.long_int)|| -(a===$B.long_int && b===_b_.int)){return true} -return a===b} -$B.is_or_equals=function(x,y){ -return $B.$is(x,y)||$B.rich_comp('__eq__',x,y)} -$B.member_func=function(obj){var klass=$B.get_class(obj),contains=$B.$getattr(klass,"__contains__",null) -if(contains !==null){contains=$B.$call(contains) -return contains.bind(null,obj)} -try{ -var iterator=$B.make_js_iterator(obj) -return function(key){try{for(var item of iterator){if($B.is_or_equals(key,item)){return true}} -return false}catch(err){return false}}}catch(err){ -var getitem=$B.$getattr(klass,'__getitem__',null) -if(getitem !==null){return function(key){var i=-1 -while(true){i++ -try{var item=getitem(obj,i) -if($B.is_or_equals(key,item)){return true}}catch(err){if($B.$is_exc(err,[_b_.StopIteration])){return false} -throw err}}}}else{throw _b_.TypeError.$factory('argument of type '+ -`'${$B.class_name(obj)}' is not iterable`)}}} -$B.$is_member=function(item,_set){return $B.member_func(_set)(item)} -$B.$call=function(callable,position){callable=$B.$call1(callable) -if(position){return function(){try{return callable.apply(null,arguments)}catch(exc){$B.set_exception_offsets(exc,position) -throw exc}}} -return callable} -$B.$call1=function(callable){if(callable.__class__===$B.method){return callable}else if(callable.$factory){return callable.$factory}else if(callable.$is_class){ -return callable.$factory=$B.$instance_creator(callable)}else if(callable.$is_js_class){ -return callable.$factory=function(){return new callable(...arguments)}}else if(callable.$in_js_module){ -return function(){var res=callable(...arguments) -return res===undefined ? _b_.None :res}}else if(callable.$is_func ||typeof callable=="function"){if(callable.$infos && callable.$infos.__code__ && -(callable.$infos.__code__.co_flags & 32)){$B.last($B.frames_stack).$has_generators=true} -return callable} -try{return $B.$getattr(callable,"__call__")}catch(err){throw _b_.TypeError.$factory("'"+$B.class_name(callable)+ -"' object is not callable")}} -var r_opnames=["add","sub","mul","truediv","floordiv","mod","pow","lshift","rshift","and","xor","or"] -var ropsigns=["+","-","*","/","//","%","**","<<",">>","&","^","|"] -$B.make_rmethods=function(klass){for(var r_opname of r_opnames){if(klass["__r"+r_opname+"__"]===undefined && -klass['__'+r_opname+'__']){klass["__r"+r_opname+"__"]=(function(name){return function(self,other){return klass["__"+name+"__"](other,self)}})(r_opname)}}} -$B.UUID=function(){return $B.$py_UUID++} -$B.$GetInt=function(value){ -if(typeof value=="number" ||value.constructor===Number){return value} -else if(typeof value==="boolean"){return value ? 1 :0} -else if(_b_.isinstance(value,_b_.int)){return value} -else if(_b_.isinstance(value,_b_.float)){return value.valueOf()} -if(! value.$is_class){try{var v=$B.$getattr(value,"__int__")();return v}catch(e){} -try{var v=$B.$getattr(value,"__index__")();return v}catch(e){}} -throw _b_.TypeError.$factory("'"+$B.class_name(value)+ -"' object cannot be interpreted as an integer")} -$B.to_num=function(obj,methods){ -var expected_class={"__complex__":_b_.complex,"__float__":_b_.float,"__index__":_b_.int,"__int__":_b_.int} -var klass=obj.__class__ ||$B.get_class(obj) -for(var i=0;i < methods.length;i++){var missing={},method=$B.$getattr(klass,methods[i],missing) -if(method !==missing){var res=method(obj) -if(!_b_.isinstance(res,expected_class[methods[i]])){throw _b_.TypeError.$factory(methods[i]+"returned non-"+ -expected_class[methods[i]].__name__+ -"(type "+$B.get_class(res)+")")} -return{result:res,method:methods[i]}}} -return null} -$B.PyNumber_Index=function(item){switch(typeof item){case "boolean": -return item ? 1 :0 -case "number": -return item -case "object": -if(item.__class__===$B.long_int){return item} -if(_b_.isinstance(item,_b_.int)){ -return item.$brython_value} -var method=$B.$getattr(item,"__index__",_b_.None) -if(method !==_b_.None){method=typeof method=="function" ? -method :$B.$getattr(method,"__call__") -return $B.int_or_bool(method())}else{throw _b_.TypeError.$factory("'"+$B.class_name(item)+ -"' object cannot be interpreted as an integer")} -default: -throw _b_.TypeError.$factory("'"+$B.class_name(item)+ -"' object cannot be interpreted as an integer")}} -$B.int_or_bool=function(v){switch(typeof v){case "boolean": -return v ? 1 :0 -case "number": -return v -case "object": -if(v.__class__===$B.long_int){return v} -else{throw _b_.TypeError.$factory("'"+$B.class_name(v)+ -"' object cannot be interpreted as an integer")} -default: -throw _b_.TypeError.$factory("'"+$B.class_name(v)+ -"' object cannot be interpreted as an integer")}} -$B.enter_frame=function(frame){ -if($B.frames_stack.length > 1000){var exc=_b_.RecursionError.$factory("maximum recursion depth exceeded") -$B.set_exc(exc,frame) -throw exc} -frame.__class__=$B.frame -$B.frames_stack.push(frame) -if($B.tracefunc && $B.tracefunc !==_b_.None){if(frame[4]===$B.tracefunc || -($B.tracefunc.$infos && frame[4]&& -frame[4]===$B.tracefunc.$infos.__func__)){ -$B.tracefunc.$frame_id=frame[0] -return _b_.None}else{ -for(var i=$B.frames_stack.length-1;i >=0;i--){if($B.frames_stack[i][0]==$B.tracefunc.$frame_id){return _b_.None}} -try{var res=$B.tracefunc(frame,'call',_b_.None) -for(var i=$B.frames_stack.length-1;i >=0;i--){if($B.frames_stack[i][4]==res){return _b_.None}} -return res}catch(err){$B.set_exc(err,frame) -$B.frames_stack.pop() -err.$in_trace_func=true -throw err}}}else{$B.tracefunc=_b_.None} -return _b_.None} -$B.trace_exception=function(){var frame=$B.last($B.frames_stack) -if(frame[0]==$B.tracefunc.$current_frame_id){return _b_.None} -var trace_func=frame.$f_trace,exc=frame[1].$current_exception,frame_obj=$B.last($B.frames_stack) -return trace_func(frame_obj,'exception',$B.fast_tuple([exc.__class__,exc,$B.traceback.$factory(exc)]))} -$B.trace_line=function(){var frame=$B.last($B.frames_stack) -if(frame[0]==$B.tracefunc.$current_frame_id){return _b_.None} -var trace_func=frame.$f_trace,frame_obj=$B.last($B.frames_stack) -if(trace_func===undefined){console.log('trace line, frame',frame)} -return trace_func(frame_obj,'line',_b_.None)} -$B.trace_return=function(value){var frame=$B.last($B.frames_stack),trace_func=frame.$f_trace,frame_obj=$B.last($B.frames_stack) -if(frame[0]==$B.tracefunc.$current_frame_id){ -return _b_.None} -trace_func(frame_obj,'return',value)} -$B.leave_frame=function(arg){ -if($B.frames_stack.length==0){ -return} -if(arg && arg.value !==undefined && $B.tracefunc){if($B.last($B.frames_stack).$f_trace===undefined){$B.last($B.frames_stack).$f_trace=$B.tracefunc} -if($B.last($B.frames_stack).$f_trace !==_b_.None){$B.trace_return(arg.value)}} -var frame=$B.frames_stack.pop() -if(frame.$has_generators){for(var key in frame[1]){if(frame[1][key]&& frame[1][key].__class__===$B.generator){var gen=frame[1][key] -if(gen.$frame===undefined){continue} -var ctx_managers=gen.$frame[1].$context_managers -if(ctx_managers){for(var cm of ctx_managers){$B.$call($B.$getattr(cm,'__exit__'))( -_b_.None,_b_.None,_b_.None)}}}}} -delete frame[1].$current_exception -return _b_.None} -$B.floordiv=function(x,y){var z=x/y -if(Number.isSafeInteger(x)&& -Number.isSafeInteger(y)&& -Number.isSafeInteger(z)){return Math.floor(z)}else{return $B.long_int.__floordiv__($B.long_int.$factory(x),$B.long_int.$factory(y))}} -var reversed_op={"__lt__":"__gt__","__le__":"__ge__","__gt__":"__lt__","__ge__":"__le__"} -var method2comp={"__lt__":"<","__le__":"<=","__gt__":">","__ge__":">="} -$B.rich_comp=function(op,x,y){if(x===undefined){throw _b_.RuntimeError.$factory('error in rich comp')} -var x1=x.valueOf ? x.valueOf():x,y1=y.valueOf ? y.valueOf():y -if(typeof x1=="number" && typeof y1=="number" && -x.__class__===undefined && y.__class__===undefined){switch(op){case "__eq__": -return x1==y1 -case "__ne__": -return x1 !=y1 -case "__le__": -return x1 <=y1 -case "__lt__": -return x1 < y1 -case "__ge__": -return x1 >=y1 -case "__gt__": -return x1 > y1}} -var res -if(x.$is_class ||x.$factory){if(op=="__eq__"){return(x===y)}else if(op=="__ne__"){return !(x===y)}else{throw _b_.TypeError.$factory("'"+method2comp[op]+ -"' not supported between instances of '"+$B.class_name(x)+ -"' and '"+$B.class_name(y)+"'")}} -var x_class_op=$B.$call($B.$getattr(x.__class__ ||$B.get_class(x),op)),rev_op=reversed_op[op]||op,y_rev_func -if(x.__class__ && y.__class__){ -if(y.__class__.__mro__.indexOf(x.__class__)>-1){y_rev_func=$B.$getattr(y,rev_op) -res=$B.$call(y_rev_func)(x) -if(res !==_b_.NotImplemented){return res}}} -res=x_class_op(x,y) -if(res !==_b_.NotImplemented){return res} -if(y_rev_func===undefined){ -y_rev_func=$B.$call($B.$getattr(y.__class__ ||$B.get_class(y),rev_op)) -res=y_rev_func(y,x) -if(res !==_b_.NotImplemented ){return res}} -if(op=="__eq__"){return _b_.False}else if(op=="__ne__"){return _b_.True} -throw _b_.TypeError.$factory("'"+method2comp[op]+ -"' not supported between instances of '"+$B.class_name(x)+ -"' and '"+$B.class_name(y)+"'")} -var opname2opsign={__sub__:"-",__xor__:"^",__mul__:"*"} -$B.rich_op=function(op,x,y,position){try{return $B.rich_op1(op,x,y)}catch(exc){if(position){$B.set_exception_offsets(exc,position)} -throw exc}} -$B.rich_op1=function(op,x,y){ -var res_is_int,res_is_float,x_num,y_num -if(typeof x=="number"){x_num=x -if(typeof y=="number"){res_is_int=true -y_num=y}else if(y.__class__===_b_.float){res_is_float=true -y_num=y.value}}else if(x.__class__===_b_.float){x_num=x.value -if(typeof y=="number"){y_num=y -res_is_float=true}else if(y.__class__===_b_.float){res_is_float=true -y_num=y.value}} -if(res_is_int ||res_is_float){var z -switch(op){case "__add__": -z=x_num+y_num -break -case "__sub__": -z=x_num-y_num -break -case "__mul__": -z=x_num*y_num -break -case '__pow__': -if(res_is_int && y_num >=0){return _b_.int.$int_or_long(BigInt(x_num)**BigInt(y_num))} -break -case "__truediv__": -if(y_num==0){throw _b_.ZeroDivisionError.$factory("division by zero")} -z=x_num/y_num -return{__class__:_b_.float,value:z}} -if(z){if(res_is_int && Number.isSafeInteger(z)){return z}else if(res_is_float){return{__class__:_b_.float,value:z}}}}else if(typeof x=="string" && typeof y=="string" && op=="__add__"){return x+y} -var x_class=x.__class__ ||$B.get_class(x),y_class=y.__class__ ||$B.get_class(y),rop='__r'+op.substr(2),method -if(x_class===y_class){ -if(x_class===_b_.int){return _b_.int[op](x,y)}else if(x_class===_b_.bool){return(_b_.bool[op]||_b_.int[op]) -(x,y)} -try{method=$B.$call($B.$getattr(x_class,op))}catch(err){if(err.__class__===_b_.AttributeError){var kl_name=$B.class_name(x) -throw _b_.TypeError.$factory("unsupported operand type(s) "+ -"for "+opname2opsign[op]+": '"+kl_name+"' and '"+ -kl_name+"'")} -throw err} -return method(x,y)} -if(_b_.issubclass(y_class,x_class)){ -var reflected_left=$B.$getattr(x_class,rop,false),reflected_right=$B.$getattr(y_class,rop,false) -if(reflected_right && reflected_left && -reflected_right !==reflected_left){return reflected_right(y,x)}} -var res -try{ -var attr=$B.$getattr(x,op) -method=$B.$getattr(x_class,op)}catch(err){if(err.__class__ !==_b_.AttributeError){throw err} -res=$B.$call($B.$getattr(y,rop))(x) -if(res !==_b_.NotImplemented){return res} -throw _b_.TypeError.$factory( -`unsupported operand type(s) for ${$B.method_to_op[op]}:`+ -` '${$B.class_name(x)}' and '${$B.class_name(y)}'`)} -if((op=='__add__' ||op=='__mul__')&& -(Array.isArray(x)||typeof x=='string' || -_b_.isinstance(x,[_b_.str,_b_.bytes,_b_.bytearray,_b_.memoryview]))){ -try{res=method(x,y)}catch(err){res=_b_.NotImplemented}}else{res=method(x,y)} -if(res===_b_.NotImplemented){try{var reflected=$B.$getattr(y,rop),method=$B.$getattr(y_class,rop)}catch(err){if(err.__class__ !==_b_.AttributeError){throw err} -throw _b_.TypeError.$factory( -`unsupported operand type(s) for ${$B.method_to_op[op]}:`+ -` '${$B.class_name(x)}' and '${$B.class_name(y)}'`)} -res=method(y,x) -if(res===_b_.NotImplemented){throw _b_.TypeError.$factory( -`unsupported operand type(s) for ${$B.method_to_op[op]}:`+ -` '${$B.class_name(x)}' and '${$B.class_name(y)}'`)} -return res}else{return res}} -$B.is_none=function(o){return o===undefined ||o===null ||o==_b_.None} -var repr_stack=new Set() -$B.repr={enter:function(obj){var obj_id=_b_.id(obj) -if(repr_stack.has(obj_id)){return true}else{repr_stack.add(obj_id) -if(repr_stack.size > $B.recursion_limit){repr_stack.clear() -throw _b_.RecursionError.$factory("maximum recursion depth "+ -"exceeded while getting the repr of an object")}}},leave:function(obj){repr_stack.delete(_b_.id(obj))}}})(__BRYTHON__) -; -__BRYTHON__.builtins.object=(function($B){var _b_=$B.builtins -var object={ -__name__:'object',__qualname__:'object',$is_class:true,$native:true} -var opnames=["add","sub","mul","truediv","floordiv","mod","pow","lshift","rshift","and","xor","or"] -var opsigns=["+","-","*","/","//","%","**","<<",">>","&","^","|"] -object.__delattr__=function(self,attr){if(self.__dict__ && _b_.isinstance(self.__dict__,_b_.dict)&& -_b_.dict.$contains_string(self.__dict__,attr)){_b_.dict.$delete_string(self.__dict__,attr) -return _b_.None}else if(self.__dict__===undefined && self[attr]!==undefined){delete self[attr] -return _b_.None}else{ -var klass=self.__class__ -if(klass){var prop=$B.$getattr(klass,attr) -if(prop.__class__===_b_.property){if(prop.__delete__ !==undefined){prop.__delete__(self) -return _b_.None}}}} -throw $B.attr_error(attr,self)} -object.__dir__=function(self){var objects -if(self.$is_class){objects=[self].concat(self.__mro__)}else{var klass=self.__class__ ||$B.get_class(self) -objects=[self,klass].concat(klass.__mro__)} -var res=[] -for(var i=0,len=objects.length;i < len;i++){for(var attr in objects[i]){if(attr.charAt(0)=="$"){if(attr.charAt(1)=="$"){ -res.push(attr.substr(2))} -continue} -if(! isNaN(parseInt(attr.charAt(0)))){ -continue} -if(attr=="__mro__"){continue} -res.push(attr)}} -if(self.__dict__){for(var attr of $B.make_js_iterator(self.__dict__)){if(attr.charAt(0)!="$"){res.push(attr)}}} -res=_b_.list.$factory(_b_.set.$factory(res)) -_b_.list.sort(res) -return res} -object.__eq__=function(self,other){ -if(self===other){return true} -return _b_.NotImplemented} -object.__format__=function(){var $=$B.args("__format__",2,{self:null,spec:null},["self","spec"],arguments,{},null,null) -if($.spec !==""){throw _b_.TypeError.$factory( -"non-empty format string passed to object.__format__")} -return _b_.getattr($.self,"__str__")()} -object.__ge__=function(){return _b_.NotImplemented} -$B.nb_from_dict=0 -object.__getattribute__=function(obj,attr){var klass=obj.__class__ ||$B.get_class(obj),is_own_class_instance_method=false -var $test=false -if($test){console.log("object.__getattribute__, attr",attr,"de",obj,"klass",klass)} -if(attr==="__class__"){return klass} -if(obj.$is_class && attr=='__bases__'){throw $B.attr_error(attr,obj)} -var res=obj[attr] -if($test){console.log('obj[attr]',obj[attr])} -if(Array.isArray(obj)&& Array.prototype[attr]!==undefined){ -res=undefined} -if(res===undefined && obj.__dict__){var dict=obj.__dict__ -if(dict.__class__===$B.getset_descriptor){return dict.cls[attr]} -var in_dict=_b_.dict.$get_string(dict,attr) -if(in_dict !==_b_.dict.$missing){return in_dict}} -if(res===undefined){ -function check(obj,kl,attr){var v=kl[attr] -if(v !==undefined){return v}} -res=check(obj,klass,attr) -if(res===undefined){var mro=klass.__mro__ -for(var i=0,len=mro.length;i < len;i++){res=check(obj,mro[i],attr) -if($test){console.log('in class',mro[i],'res',res)} -if(res !==undefined){if($test){console.log("found in",mro[i])} -break}}}else{if($test){console.log(attr,'found in own class')} -if(res.__class__ !==$B.method && res.__get__===undefined){is_own_class_instance_method=true}}}else{if(res.__set__===undefined){ -return res}} -if($test){console.log('after search classes',res)} -if(res !==undefined){if($test){console.log(res)} -if(res.__class__ && _b_.issubclass(res.__class__,_b_.property)){return $B.$getattr(res,'__get__')(obj,klass)}else if(res.__class__===_b_.classmethod){return _b_.classmethod.__get__(res,obj,klass)} -if(res.__class__===$B.method){if(res.$infos.__self__){ -return res} -return res.__get__(obj,klass)} -var get=res.__get__ -if(get===undefined && res.__class__){var get=res.__class__.__get__ -for(var i=0;i < res.__class__.__mro__.length && -get===undefined;i++){get=res.__class__.__mro__[i].__get__}} -if($test){console.log("get",get)} -var __get__=get===undefined ? null : -$B.$getattr(res,"__get__",null) -if($test){console.log("__get__",__get__)} -if(__get__ !==null){if($test){console.log('apply __get__',[obj,klass])} -try{return __get__.apply(null,[obj,klass])}catch(err){console.log('error in get.apply',err) -console.log("get attr",attr,"of",obj) -console.log('res',res) -console.log('__get__',__get__) -console.log(__get__+'') -throw err}} -if(typeof res=="object"){if(__get__ &&(typeof __get__=="function")){get_func=function(x,y){return __get__.apply(x,[y,klass.$factory])}}} -if(__get__===null &&(typeof res=="function")){__get__=function(x){return x}} -if(__get__ !==null){ -res.__name__=attr -if(attr=="__new__" || -res.__class__===$B.builtin_function_or_method){res.$type="staticmethod"} -var res1=__get__.apply(null,[res,obj,klass]) -if($test){console.log("res",res,"res1",res1)} -if(typeof res1=="function"){ -if(res1.__class__===$B.method){return res} -if(res.$type=="staticmethod"){return res}else{var self=res.__class__===$B.method ? klass :obj,method=function(){var args=[self] -for(var i=0,len=arguments.length;i < len;i++){args.push(arguments[i])} -return res.apply(this,args)} -method.__class__=$B.method -method.__get__=function(obj,cls){var clmethod=res.bind(null,cls) -clmethod.__class__=$B.method -clmethod.$infos={__self__:cls,__func__:res,__name__:res.$infos.__name__,__qualname__:cls.__name__+"."+ -res.$infos.__name__} -return clmethod} -method.__get__.__class__=$B.method_wrapper -method.__get__.$infos=res.$infos -method.$infos={__self__:self,__func__:res,__name__:attr,__qualname__:klass.__qualname__+"."+attr} -if($test){console.log("return method",method)} -if(is_own_class_instance_method){obj.$method_cache=obj.$method_cache ||{} -obj.$method_cache[attr]=[method,res]} -return method}}else{ -return res1}} -return res}else{throw $B.attr_error(attr,obj)}} -object.__gt__=function(){return _b_.NotImplemented} -object.__hash__=function(self){var hash=self.__hashvalue__ -if(hash !==undefined){return hash} -return self.__hashvalue__=$B.$py_next_hash--} -object.__init__=function(){if(arguments.length==0){throw _b_.TypeError.$factory("descriptor '__init__' of 'object' "+ -"object needs an argument")} -return _b_.None} -object.__le__=function(){return _b_.NotImplemented} -object.__lt__=function(){return _b_.NotImplemented} -object.__mro__=[] -object.__new__=function(cls,...args){if(cls===undefined){throw _b_.TypeError.$factory("object.__new__(): not enough arguments")} -var init_func=$B.$getattr(cls,"__init__") -if(init_func===object.__init__){if(args.length > 0){throw _b_.TypeError.$factory("object() takes no parameters")}} -var res=Object.create(null) -$B.update_obj(res,{__class__ :cls,__dict__:$B.obj_dict({})}) -return res} -object.__ne__=function(self,other){ -if(self===other){return false} -var eq=$B.$getattr(self.__class__ ||$B.get_class(self),"__eq__",null) -if(eq !==null){var res=$B.$call(eq)(self,other) -if(res===_b_.NotImplemented){return res} -return ! $B.$bool(res)} -return _b_.NotImplemented} -object.__reduce__=function(self){if(! self.__dict__){throw _b_.TypeError.$factory(`cannot pickle '${$B.class_name(self)}' object`)} -if($B.imported.copyreg===undefined){$B.$import('copyreg')} -var res=[$B.imported.copyreg._reconstructor] -var D=$B.get_class(self),B=object -for(var klass of D.__mro__){if(klass.__module__=='builtins'){B=klass -break}} -var args=[D,B] -if(B===object){args.push(_b_.None)}else{args.push($B.$call(B)(self))} -res.push($B.fast_tuple(args)) -var d=$B.empty_dict() -for(var attr of _b_.dict.$keys_string(self.__dict__)){_b_.dict.$setitem(d,attr,_b_.dict.$getitem_string(self.__dict__,attr))} -res.push(d) -return _b_.tuple.$factory(res)} -function getNewArguments(self,klass){var newargs_ex=$B.$getattr(self,'__getnewargs_ex__',null) -if(newargs_ex !==null){var newargs=newargs_ex() -if((! newargs)||newargs.__class__ !==_b_.tuple){throw _b_.TypeError.$factory("__getnewargs_ex__ should "+ -`return a tuple, not '${$B.class_name(newargs)}'`)} -if(newargs.length !=2){throw _b_.ValueError.$factory("__getnewargs_ex__ should "+ -`return a tuple of length 2, not ${newargs.length}`)} -var args=newargs[0],kwargs=newargs[1] -if((! args)||args.__class__ !==_b_.tuple){throw _b_.TypeError.$factory("first item of the tuple returned "+ -`by __getnewargs_ex__ must be a tuple, not '${$B.class_name(args)}'`)} -if((! kwargs)||kwargs.__class__ !==_b_.dict){throw _b_.TypeError.$factory("second item of the tuple returned "+ -`by __getnewargs_ex__ must be a dict, not '${$B.class_name(kwargs)}'`)} -return{args,kwargs}} -var newargs=klass.$getnewargs,args -if(! newargs){newargs=$B.$getattr(klass,'__getnewargs__',null)} -if(newargs){args=newargs(self) -if((! args)||args.__class__ !==_b_.tuple){throw _b_.TypeError.$factory("__getnewargs__ should "+ -`return a tuple, not '${$B.class_name(args)}'`)} -return{args}}} -object.__reduce_ex__=function(self,protocol){var klass=$B.get_class(self) -if($B.imported.copyreg===undefined){$B.$import('copyreg')} -if(protocol < 2){return $B.$call($B.imported.copyreg._reduce_ex)(self,protocol)} -var reduce=$B.$getattr(klass,'__reduce__') -if(reduce !==object.__reduce__){return $B.$call(reduce)(self)} -var res=[$B.imported.copyreg.__newobj__] -var arg2=[klass] -var newargs=getNewArguments(self,klass) -if(newargs){arg2=arg2.concat(newargs.args)} -res.push($B.fast_tuple(arg2)) -var d=$B.empty_dict(),nb=0 -if(self.__dict__){for(var item of _b_.dict.$iter_items_with_hash(self.__dict__)){if(item.key=="__class__" ||item.key.startsWith("$")){continue} -_b_.dict.$setitem(d,item.key,item.value) -nb++}} -if(nb==0){d=_b_.None} -res.push(d) -res.push(_b_.None) -res.push(_b_.None) -return _b_.tuple.$factory(res)} -object.__repr__=function(self){if(self===object){return ""} -if(self.__class__===_b_.type){return ""} -var module=self.__class__.__module__ -if(module !==undefined && !module.startsWith("$")&& -module !=="builtins"){return "<"+self.__class__.__module__+"."+ -$B.class_name(self)+" object>"}else{return "<"+$B.class_name(self)+" object>"}} -object.__setattr__=function(self,attr,val){if(val===undefined){ -throw _b_.TypeError.$factory( -"can't set attributes of built-in/extension type 'object'")}else if(self.__class__===object){ -if(object[attr]===undefined){throw $B.attr_error(attr,self)}else{throw _b_.AttributeError.$factory( -"'object' object attribute '"+attr+"' is read-only")}} -if(self.__dict__){_b_.dict.$setitem(self.__dict__,attr,val)}else{ -self[attr]=val} -return _b_.None} -object.__setattr__.__get__=function(obj){return function(attr,val){object.__setattr__(obj,attr,val)}} -object.__setattr__.__str__=function(){return "method object.setattr"} -object.__str__=function(self){if(self===undefined ||self.$kw){throw _b_.TypeError.$factory("descriptor '__str__' of 'object' "+ -"object needs an argument")} -var klass=self.__class__ ||$B.get_class(self) -var repr_func=$B.$getattr(klass,"__repr__") -return $B.$call(repr_func).apply(null,arguments)} -object.__subclasshook__=function(){return _b_.NotImplemented} -object.$factory=function(){if(arguments.length > 0 || -(arguments.length==1 && arguments[0].$kw && -Object.keys(arguments[0].$kw).length > 0) -){throw _b_.TypeError.$factory('object() takes no arguments')} -var res={__class__:object},args=[res] -object.__init__.apply(null,args) -return res} -$B.set_func_names(object,"builtins") -return object})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -var TPFLAGS={STATIC_BUILTIN:1 << 1,MANAGED_WEAKREF:1 << 3,MANAGED_DICT:1 << 4,SEQUENCE:1 << 5,MAPPING:1 << 6,DISALLOW_INSTANTIATION:1 << 7,IMMUTABLETYPE:1 << 8,HEAPTYPE:1 << 9,BASETYPE:1 << 10,HAVE_VECTORCALL:1 << 11,READY:1 << 12,READYING:1 << 13,HAVE_GC:1 << 14,METHOD_DESCRIPTOR:1 << 17,VALID_VERSION_TAG:1 << 19,IS_ABSTRACT:1 << 20,MATCH_SELF:1 << 22,LONG_SUBCLASS:1 << 24,LIST_SUBCLASS:1 << 25,TUPLE_SUBCLASS:1 << 26,BYTES_SUBCLASS:1 << 27,UNICODE_SUBCLASS:1 << 28,DICT_SUBCLASS:1 << 29,BASE_EXC_SUBCLASS:1 << 30,TYPE_SUBCLASS:1 << 31,HAVE_FINALIZE:1 << 0,HAVE_VERSION_TAG:1 << 18} -$B.$class_constructor=function(class_name,class_obj_proxy,metaclass,resolved_bases,bases,kwargs){var dict -if(class_obj_proxy instanceof $B.str_dict){dict=$B.empty_dict() -dict.$strings=class_obj_proxy}else{dict=class_obj_proxy.$target} -var module=class_obj_proxy.__module__ -for(var base of bases){if(base.__flags__ !==undefined && -!(base.__flags__ & TPFLAGS.BASETYPE)){throw _b_.TypeError.$factory( -"type 'bool' is not an acceptable base type")}} -var extra_kwargs={} -if(kwargs){for(var i=0;i < kwargs.length;i++){var key=kwargs[i][0],val=kwargs[i][1] -if(key !="metaclass"){ -extra_kwargs[key]=val}}} -if(class_obj_proxy.__eq__ !==undefined && -class_obj_proxy.__hash__===undefined){$B.$setitem(dict,'__hash__',_b_.None)} -var slots=class_obj_proxy.__slots__ -if(slots !==undefined){if(typeof slots=="string"){slots=[slots]}else{for(var item of $B.make_js_iterator(slots)){if(typeof item !='string'){throw _b_.TypeError.$factory('__slots__ items must be '+ -`strings, not '${$B.class_name(item)}'`)}}} -$B.$setitem(dict,'__slots__',slots)} -var meta_new=_b_.type.__getattribute__(metaclass,"__new__") -var kls=meta_new(metaclass,class_name,resolved_bases,dict,{$kw:[extra_kwargs]}) -kls.__module__=module -kls.$subclasses=[] -kls.$is_class=true -if(kls.__class__===metaclass){ -var meta_init=_b_.type.__getattribute__(metaclass,"__init__") -meta_init(kls,class_name,resolved_bases,dict,{$kw:[extra_kwargs]})} -for(var i=0;i < bases.length;i++){bases[i].$subclasses=bases[i].$subclasses ||[] -bases[i].$subclasses.push(kls)} -return kls} -$B.get_metaclass=function(class_name,module,bases,kw_meta){ -var metaclass -if(kw_meta===undefined && bases.length==0){return _b_.type}else if(kw_meta){if(! _b_.isinstance(kw_meta,_b_.type)){return kw_meta} -metaclass=kw_meta} -if(bases && bases.length > 0){if(bases[0].__class__===undefined){ -if(typeof bases[0]=="function"){if(bases.length !=1){throw _b_.TypeError.$factory("A Brython class "+ -"can inherit at most 1 Javascript constructor")} -metaclass=bases[0].__class__=$B.JSMeta -$B.set_func_names(bases[0],module)}else{throw _b_.TypeError.$factory("Argument of "+class_name+ -" is not a class (type '"+$B.class_name(bases[0])+ -"')")}} -for(var base of bases){var mc=base.__class__ -if(metaclass===undefined){metaclass=mc}else if(mc===metaclass ||_b_.issubclass(metaclass,mc)){}else if(_b_.issubclass(mc,metaclass)){metaclass=mc}else if(metaclass.__bases__ && -metaclass.__bases__.indexOf(mc)==-1){throw _b_.TypeError.$factory("metaclass conflict: the "+ -"metaclass of a derived class must be a (non-"+ -"strict) subclass of the metaclasses of all its bases")}}}else{metaclass=metaclass ||_b_.type} -return metaclass} -function set_attr_if_absent(dict,attr,value){try{$B.$getitem(dict,attr)}catch(err){$B.$setitem(dict,attr,value)}} -$B.make_class_namespace=function(metaclass,class_name,module,qualname,bases){ -var class_dict=_b_.dict.$literal([['__module__',module],['__qualname__',qualname] -]) -if(metaclass !==_b_.type){var prepare=$B.$getattr(metaclass,"__prepare__",_b_.None) -if(prepare !==_b_.None){class_dict=$B.$call(prepare)(class_name,bases) -set_attr_if_absent(class_dict,'__module__',module) -set_attr_if_absent(class_dict,'__qualname__',qualname)}} -if(class_dict.__class__===_b_.dict){if(class_dict.$all_str){return class_dict.$strings} -return new Proxy(class_dict,{get:function(target,prop){if(prop=='__class__'){return _b_.dict}else if(prop=='$target'){return target} -if(_b_.dict.$contains_string(target,prop)){return _b_.dict.$getitem_string(target,prop)} -return undefined},set:function(target,prop,value){_b_.dict.$setitem(target,prop,value)}})}else{var setitem=$B.$getattr(class_dict,"__setitem__"),getitem=$B.$getattr(class_dict,"__getitem__") -return new Proxy(class_dict,{get:function(target,prop){if(prop=='__class__'){return $B.get_class(target)}else if(prop=='$target'){return target} -try{return getitem(prop)}catch(err){return undefined}},set:function(target,prop,value){setitem(prop,value) -return _b_.None}})}} -$B.resolve_mro_entries=function(bases){ -var new_bases=[],has_mro_entries=false -for(var base of bases){if(! _b_.isinstance(base,_b_.type)){var mro_entries=$B.$getattr(base,"__mro_entries__",_b_.None) -if(mro_entries !==_b_.None){has_mro_entries=true -var entries=_b_.list.$factory(mro_entries(bases)) -new_bases=new_bases.concat(entries)}else{new_bases.push(base)}}else{new_bases.push(base)}} -return has_mro_entries ? new_bases :bases} -var type_getsets={__name__:"getset",__qualname__:"getset",__bases__:"getset",__module__:"getset",__abstractmethods__:"getset",__dict__:"get",__doc__:"getset",__text_signature__:"get",__annotations__:"getset"} -$B.make_class=function(qualname,factory){ -var A={__class__:type,__bases__:[_b_.object],__mro__:[_b_.object],__name__:qualname,__qualname__:qualname,$is_class:true} -A.$factory=factory -return A} -$B.make_type_alias=function(name,type_params,value){$B.$import('typing') -var t=$B.$call($B.$getattr($B.imported.typing,'TypeAliasType'))(name,value) -t.__type_params__=type_params -return t} -var type=$B.make_class("type",function(kls,bases,cl_dict){var missing={},$=$B.args('type',3,{kls:null,bases:null,cl_dict:null},['kls','bases','cl_dict'],arguments,{bases:missing,cl_dict:missing},null,'kw'),kls=$.kls,bases=$.bases,cl_dict=$.cl_dict,kw=$.kw -var kwarg={} -for(var key in kw.$jsobj){kwarg[key]=kw.$jsobj[key]} -var kwargs={$kw:[kwarg]} -if(cl_dict===missing){if(bases !==missing){throw _b_.TypeError.$factory('type() takes 1 or 3 arguments')} -return $B.get_class(kls)}else{var module=$B.last($B.frames_stack)[2],resolved_bases=$B.resolve_mro_entries(bases),metaclass=$B.get_metaclass(kls,module,resolved_bases) -return type.__call__(metaclass,kls,resolved_bases,cl_dict,kwargs)}} -) -type.__class__=type -var classmethod=_b_.classmethod=$B.make_class("classmethod",function(func){$B.check_nb_args_no_kw('classmethod',1,arguments) -return{ -__class__:classmethod,__func__:func}} -) -classmethod.__get__=function(){ -var $=$B.args('classmethod',3,{self:null,obj:null,cls:null},['self','obj','cls'],arguments,{cls:_b_.None},null,null),self=$.self,obj=$.obj,cls=$.cls -if(cls===_b_.None ||cls===undefined){cls=$B.get_class(obj)} -var func_class=$B.get_class(self.__func__),candidates=[func_class].concat(func_class.__mro__) -for(var candidate of candidates){if(candidate===$B.function){break} -if(candidate.__get__){return candidate.__get__(self.__func__,cls,cls)}} -return $B.method.$factory(self.__func__,cls)} -$B.set_func_names(classmethod,"builtins") -var staticmethod=_b_.staticmethod=$B.make_class("staticmethod",function(func){return{ -__class__:staticmethod,__func__:func}} -) -staticmethod.__call__=function(self){return $B.$call(self.__func__)} -staticmethod.__get__=function(self){return self.__func__} -$B.set_func_names(staticmethod,"builtins") -$B.getset_descriptor=$B.make_class("getset_descriptor",function(klass,attr,getter,setter){var res={__class__:$B.getset_descriptor,__doc__:_b_.None,cls:klass,attr,getter,setter} -return res} -) -$B.getset_descriptor.__get__=function(self,obj,klass){console.log('__get__',self,obj,klass) -if(obj===_b_.None){return self} -return self.getter(self,obj,klass)} -$B.getset_descriptor.__set__=function(self,klass,value){return self.setter(self,klass,value)} -$B.getset_descriptor.__repr__=function(self){return ``} -$B.set_func_names($B.getset_descriptor,"builtins") -var data_descriptors=['__abstractmethods__','__annotations__','__base__','__bases__','__basicsize__', -'__dictoffset__','__doc__','__flags__','__itemsize__','__module__','__mro__','__name__','__qualname__','__text_signature__','__weakrefoffset__' -] -type.$call=function(klass,new_func,init_func){return function(){ -var instance=new_func.bind(null,klass).apply(null,arguments),instance_class=instance.__class__ ||$B.get_class(instance) -if(instance_class===klass){ -if(init_func !==_b_.object.__init__){ -init_func.bind(null,instance).apply(null,arguments)}} -return instance}} -type.__call__=function(){var extra_args=[],klass=arguments[0] -for(var i=1,len=arguments.length;i < len;i++){extra_args.push(arguments[i])} -var new_func=_b_.type.__getattribute__(klass,"__new__") -var instance=new_func.apply(null,arguments),instance_class=instance.__class__ ||$B.get_class(instance) -if(instance_class===klass){ -var init_func=_b_.type.__getattribute__(klass,"__init__") -if(init_func !==_b_.object.__init__){ -var args=[instance].concat(extra_args) -init_func.apply(null,args)}} -return instance} -type.__class__=type -type.__class_getitem__=function(kls,origin,args){ -if(kls !==type){throw _b_.TypeError.$factory(`type '${kls.__qualname__}' `+ -"is not subscriptable")} -return $B.GenericAlias.$factory(kls,origin,args)} -function merge_class_dict(dict,klass){var classdict,bases -classdict=$B.$getattr(klass,'__dict__',null) -if(classdict !==null){_b_.dict.update(dict,classdict)}else{return} -bases=klass.__bases__ -if(bases===undefined){return} -for(var base of bases){merge_class_dict(dict,base)}} -type.__dir__=function(klass){var dict=$B.empty_dict() -merge_class_dict(dict,klass) -return _b_.sorted(dict)} -type.__format__=function(klass,fmt_spec){ -return _b_.str.$factory(klass)} -type.__getattribute__=function(klass,attr){switch(attr){case "__annotations__": -var ann=klass.__annotations__ -return ann===undefined ? $B.empty_dict():ann -case "__bases__": -if(klass.__bases__ !==undefined){return $B.fast_tuple($B.resolve_mro_entries(klass.__bases__))} -throw $B.attr_error(attr,klass) -case "__class__": -return klass.__class__ -case "__doc__": -return klass.__doc__ ||_b_.None -case '__name__': -return klass.__name__ ||klass.__qualname__ -case "__setattr__": -if(klass["__setattr__"]!==undefined){var func=klass["__setattr__"]}else{var func=function(kls,key,value){kls[key]=value}} -return method_wrapper.$factory(attr,klass,func) -case "__delattr__": -if(klass["__delattr__"]!==undefined){return klass["__delattr__"]} -return method_wrapper.$factory(attr,klass,function(key){delete klass[key]})} -var res=klass[attr] -var $test=false -if($test){console.log("attr",attr,"of",klass,'\n ',res,res+"")} -if(klass.__class__ && -klass.__class__[attr]&& -klass.__class__[attr].__get__ && -klass.__class__[attr].__set__){ -if($test){console.log("data descriptor")} -return klass.__class__[attr].__get__(klass)} -if(res===undefined){ -var v=klass[attr] -if(v===undefined){if($test){console.log(attr,'not in klass[attr], search in __dict__',klass.__dict__)} -if(klass.__dict__ && klass.__dict__.__class__===_b_.dict && -_b_.dict.$contains_string(klass.__dict__,attr)){res=klass[attr]=_b_.dict.$getitem_string(klass.__dict__,attr) -if($test){console.log('found in __dict__',v)}}else{var mro=klass.__mro__ -if(mro===undefined){console.log("no mro for",klass)} -for(var i=0;i < mro.length;i++){var v=mro[i][attr] -if(v !==undefined){res=v -break}}}}else{res=v} -if($test){console.log('search in class mro',res) -if(res !==undefined){if(klass[attr]){console.log('found in klass',klass)}else{console.log('found in',mro[i])}}}} -if(res===undefined){ -if(res===undefined){var meta=klass.__class__ ||$B.get_class(klass),res=meta[attr] -if($test){console.log("search in meta",meta,res)} -if(res===undefined){var meta_mro=meta.__mro__ -for(var i=0;i < meta_mro.length;i++){var res=meta_mro[i][attr] -if(res !==undefined){break}}} -if(res !==undefined){if($test){console.log("found in meta",res,typeof res)} -if(res.__class__===_b_.property){return res.fget(klass)} -if(typeof res=="function"){ -if(attr=='__new__'){ -return res} -var meta_method=res.bind(null,klass) -meta_method.__class__=$B.method -meta_method.$infos={__self__:klass,__func__:res,__name__:attr,__qualname__:meta.__name__+"."+attr,__module__:res.$infos ? res.$infos.__module__ :""} -if($test){console.log('return method from meta',meta_method,meta_method+'')} -return meta_method}}} -if(res===undefined){ -var getattr=meta.__getattr__ -if(getattr===undefined){for(var i=0;i < meta_mro.length;i++){if(meta_mro[i].__getattr__ !==undefined){getattr=meta_mro[i].__getattr__ -break}}} -if(getattr !==undefined){return getattr(klass,attr)}}} -if(res !==undefined){if($test){console.log("res",res)} -if(res.__class__===_b_.property){return res}else if(res.__class__===_b_.classmethod){return _b_.classmethod.__get__(res,_b_.None,klass)} -if(res.__get__){if(res.__class__===method){if($test){console.log('__get__ of method',res.$infos.__self__,klass)} -if(res.$infos.__self__){ -return res} -var result=res.__get__(res.__func__,klass) -result.$infos={__func__:res,__name__:res.$infos.__name__,__qualname__:klass.__name__+"."+res.$infos.__name__,__self__:klass}}else{result=res.__get__(klass)} -return result}else if(res.__class__ && res.__class__.__get__){ -if(!(attr.startsWith("__")&& attr.endsWith("__"))){return res.__class__.__get__(res,_b_.None,klass)}} -if(typeof res=="function"){ -if(res.$infos===undefined && $B.get_option('debug')> 1){console.log("warning: no attribute $infos for",res,"klass",klass,"attr",attr)} -if($test){console.log("res is function",res)} -if(attr=="__new__" || -res.__class__===$B.builtin_function_or_method){res.$type="staticmethod"} -if((attr=="__class_getitem__" ||attr=="__init_subclass__") -&& res.__class__ !==_b_.classmethod){res=_b_.classmethod.$factory(res) -return _b_.classmethod.__get__(res,_b_.None,klass)} -if(res.__class__===$B.method){return res.__get__(null,klass)}else{if($test){console.log("return res",res)} -return res}}else{return res}}} -type.__hash__=function(cls){return _b_.hash(cls)} -type.__init__=function(){if(arguments.length==0){throw _b_.TypeError.$factory("descriptor '__init__' of 'type' "+ -"object needs an argument")}} -type.__init_subclass__=function(){ -var $=$B.args("__init_subclass__",1,{cls:null},['cls'],arguments,{},"args","kwargs") -if($.args.length > 0){throw _b_.TypeError.$factory( -`${$.cls.__qualname__}.__init_subclass__ takes no arguments `+ -`(${$.args.length} given)`)} -for(var key in $.kwargs.$jsobj){throw _b_.TypeError.$factory( -`${$.cls.__qualname__}.__init_subclass__() `+ -`takes no keyword arguments`)} -return _b_.None} -_b_.object.__init_subclass__=type.__init_subclass__ -type.__instancecheck__=function(cls,instance){var kl=instance.__class__ ||$B.get_class(instance) -if(kl===cls){return true}else{for(var i=0;i < kl.__mro__.length;i++){if(kl.__mro__[i]===cls){return true}}} -return false} -type.__instancecheck__.$type="staticmethod" -type.__name__='type' -type.__new__=function(meta,name,bases,cl_dict,extra_kwargs){ -var test=false -extra_kwargs=extra_kwargs===undefined ?{$kw:[{}]}: -extra_kwargs -if(! _b_.isinstance(cl_dict,_b_.dict)){console.log('bizarre',meta,name,bases,cl_dict) -alert()} -var module=_b_.dict.$get_string(cl_dict,'__module__') -if(module===_b_.dict.$missing){module=$B.last($B.frames_stack)[2]} -var qualname=_b_.dict.$get_string(cl_dict,'__qualname__') -if(qualname===_b_.dict.$missing){qualname=name} -var class_dict={__class__ :meta,__bases__ :bases.length==0 ?[_b_.object]:bases,__dict__ :cl_dict,__qualname__:qualname,__module__:module,__name__:name,$is_class:true} -try{var slots=_b_.dict.$get_string(cl_dict,'__slots__') -if(slots !==_b_.dict.$missing){for(var name of $B.make_js_iterator(slots)){class_dict[name]=member_descriptor.$factory(name,class_dict)}}}catch(err){} -class_dict.__mro__=type.mro(class_dict).slice(1) -for(var entry of _b_.dict.$iter_items_with_hash(cl_dict)){var key=entry.key,v=entry.value -if(['__module__','__class__','__name__','__qualname__']. -indexOf(key)>-1){continue} -if(key.startsWith('$')){continue} -if(v===undefined){continue} -class_dict[key]=v -if(v.__class__){ -var set_name=$B.$getattr(v.__class__,"__set_name__",_b_.None) -if(set_name !==_b_.None){set_name(v,class_dict,key)}} -if(typeof v=="function"){if(v.$infos===undefined){console.log("type new",v,v+"") -console.log($B.frames_stack.slice())}else{v.$infos.$class=class_dict -v.$infos.__qualname__=name+'.'+v.$infos.__name__ -if(v.$infos.$defaults){ -var $defaults=v.$infos.$defaults -$B.function.__setattr__(v,"__defaults__",$defaults)}}}} -var sup=_b_.super.$factory(class_dict,class_dict) -var init_subclass=_b_.super.__getattribute__(sup,"__init_subclass__") -init_subclass(extra_kwargs) -return class_dict} -type.__or__=function(){var $=$B.args('__or__',2,{cls:null,other:null},['cls','other'],arguments,{},null,null),cls=$.cls,other=$.other -if(other !==_b_.None && ! _b_.isinstance(other,[type,$B.GenericAlias])){return _b_.NotImplemented} -return $B.UnionType.$factory([cls,other])} -type.__prepare__=function(){return $B.empty_dict()} -type.__qualname__='type' -type.__repr__=function(kls){$B.builtins_repr_check(type,arguments) -var qualname=kls.__qualname__ -if(kls.__module__ && -kls.__module__ !="builtins" && -!kls.__module__.startsWith("$")){qualname=kls.__module__+"."+qualname} -return ""} -type.__ror__=function(){var len=arguments.length -if(len !=1){throw _b_.TypeError.$factory(`expected 1 argument, got ${len}`)} -return _b_.NotImplemented} -type.__setattr__=function(kls,attr,value){var $test=false -if($test){console.log("kls is class",type,types[attr])} -if(type[attr]&& type[attr].__get__ && -type[attr].__set__){type[attr].__set__(kls,value) -return _b_.None} -if(kls.__module__=="builtins"){throw _b_.TypeError.$factory( -`cannot set '${attr}' attribute of immutable type '`+ -kls.__qualname__+"'")} -kls[attr]=value -var mp=kls.__dict__ ||$B.$getattr(kls,'__dict__') -_b_.dict.$setitem(mp,attr,value) -if(attr=="__init__" ||attr=="__new__"){ -kls.$factory=$B.$instance_creator(kls)}else if(attr=="__bases__"){ -kls.__mro__=_b_.type.mro(kls)} -if($test){console.log("after setattr",kls)} -return _b_.None} -type.mro=function(cls){ -if(cls===undefined){throw _b_.TypeError.$factory( -'unbound method type.mro() needs an argument')} -var bases=cls.__bases__,seqs=[],pos1=0 -for(var base of bases){ -var bmro=[],pos=0 -if(base===undefined || -base.__mro__===undefined){if(base.__class__===undefined){ -return[_b_.object]}else{console.log('error for base',base) -console.log('cls',cls)}} -bmro[pos++]=base -var _tmp=base.__mro__ -if(_tmp){if(_tmp[0]===base){_tmp.splice(0,1)} -for(var k=0;k < _tmp.length;k++){bmro[pos++]=_tmp[k]}} -seqs[pos1++]=bmro} -seqs[pos1++]=bases.slice() -var mro=[cls],mpos=1 -while(1){var non_empty=[],pos=0 -for(var i=0;i < seqs.length;i++){if(seqs[i].length > 0){non_empty[pos++]=seqs[i]}} -if(non_empty.length==0){break} -for(var i=0;i < non_empty.length;i++){var seq=non_empty[i],candidate=seq[0],not_head=[],pos=0 -for(var j=0;j < non_empty.length;j++){var s=non_empty[j] -if(s.slice(1).indexOf(candidate)>-1){not_head[pos++]=s}} -if(not_head.length > 0){candidate=null} -else{break}} -if(candidate===null){throw _b_.TypeError.$factory( -"inconsistent hierarchy, no C3 MRO is possible")} -mro[mpos++]=candidate -for(var i=0;i < seqs.length;i++){var seq=seqs[i] -if(seq[0]===candidate){ -seqs[i].shift()}}} -if(mro[mro.length-1]!==_b_.object){mro[mpos++]=_b_.object} -return mro} -type.__subclasscheck__=function(self,subclass){ -var klass=self -if(subclass.__bases__===undefined){return self===_b_.object} -return subclass.__bases__.indexOf(klass)>-1} -$B.set_func_names(type,"builtins") -type.__init_subclass__=_b_.classmethod.$factory(type.__init_subclass__) -_b_.type=type -var property=_b_.property=$B.make_class("property",function(fget,fset,fdel,doc){var res={__class__:property} -property.__init__(res,fget,fset,fdel,doc) -return res} -) -property.__init__=function(self,fget,fset,fdel,doc){var $=$B.args('__init__',5,{self:null,fget:null,fset:null,fdel:null,doc:null},['self','fget','fset','fdel','doc'],arguments,{fget:_b_.None,fset:_b_.None,fdel:_b_.None,doc:_b_.None},null,null),self=$.self,fget=$.fget,fset=$.fset,fdel=$.fdel,doc=$.doc -self.__doc__=doc ||"" -self.$type=fget.$type -self.fget=fget -self.fset=fset -self.fdel=fdel -self.$is_property=true -if(fget && fget.$attrs){for(var key in fget.$attrs){self[key]=fget.$attrs[key]}} -self.__delete__=fdel; -self.getter=function(fget){return property.$factory(fget,self.fset,self.fdel,self.__doc__)} -self.setter=function(fset){return property.$factory(self.fget,fset,self.fdel,self.__doc__)} -self.deleter=function(fdel){return property.$factory(self.fget,self.fset,fdel,self.__doc__)}} -property.__get__=function(self,kls){if(self.fget===undefined){throw _b_.AttributeError.$factory("unreadable attribute")} -return $B.$call(self.fget)(kls)} -property.__new__=function(cls){return{ -__class__:cls}} -property.__set__=function(self,kls,value){if(self.fset===undefined){throw _b_.AttributeError.$factory("can't set attribute")} -$B.$getattr(self.fset,'__call__')(kls,value)} -$B.set_func_names(property,"builtins") -var wrapper_descriptor=$B.wrapper_descriptor= -$B.make_class("wrapper_descriptor") -$B.set_func_names(wrapper_descriptor,"builtins") -type.__call__.__class__=wrapper_descriptor -var $instance_creator=$B.$instance_creator=function(klass){var test=false -if(test){console.log('instance creator of',klass)} -if(klass.prototype && klass.prototype.constructor==klass){ -return function(){return new klass(...arguments)}} -if(klass.__abstractmethods__ && $B.$bool(klass.__abstractmethods__)){return function(){var ams=Array.from($B.make_js_iterator(klass.__abstractmethods__)) -ams.sort() -var msg=(ams.length > 1 ? 's ' :' ')+ams.join(', ') -throw _b_.TypeError.$factory( -"Can't instantiate abstract class interface "+ -"with abstract method"+msg)}} -var metaclass=klass.__class__ ||$B.get_class(klass),call_func,factory -if(metaclass===_b_.type &&(!klass.__bases__ ||klass.__bases__.length==0)){if(klass.hasOwnProperty("__new__")){if(klass.hasOwnProperty("__init__")){factory=function(){ -var kls=klass.__new__.bind(null,klass). -apply(null,arguments) -klass.__init__.bind(null,kls).apply(null,arguments) -return kls}}else{factory=function(){return klass.__new__.bind(null,klass). -apply(null,arguments)}}}else if(klass.hasOwnProperty("__init__")){factory=function(){var kls={__class__:klass,__dict__:$B.obj_dict({})} -klass.__init__.bind(null,kls).apply(null,arguments) -return kls}}else{factory=function(){if(arguments.length > 0){if(arguments.length==1 && arguments[0].$kw && -Object.keys(arguments[0].$kw).length==0){}else{throw _b_.TypeError.$factory("object() takes no parameters")}} -var res=Object.create(null) -$B.update_obj(res,{__class__:klass,__dict__:$B.obj_dict({})}) -return res}}}else if(metaclass===_b_.type){var new_func=type.__getattribute__(klass,'__new__'),init_func=type.__getattribute__(klass,'__init__') -factory=type.$call(klass,new_func,init_func)}else{call_func=_b_.type.__getattribute__(metaclass,"__call__") -if(call_func.$is_class){factory=$B.$call(call_func)}else{factory=call_func.bind(null,klass)}} -factory.__class__=$B.function -factory.$infos={__name__:klass.__name__,__module__:klass.__module__} -return factory} -var method_wrapper=$B.method_wrapper=$B.make_class("method_wrapper",function(attr,klass,method){var f=function(){return method.apply(null,arguments)} -f.$infos={__name__:attr,__module__:klass.__module__} -return f} -) -method_wrapper.__str__=method_wrapper.__repr__=function(self){return ""} -var member_descriptor=$B.member_descriptor=$B.make_class("member_descriptor",function(attr,cls){return{__class__:member_descriptor,cls:cls,attr:attr}} -) -member_descriptor.__delete__=function(self,kls){if(kls.$slot_values===undefined || -! kls.$slot_values.hasOwnProperty(self.attr)){throw _b_.AttributeError.$factory(self.attr)} -kls.$slot_values.delete(self.attr)} -member_descriptor.__get__=function(self,kls,obj_type){if(kls===_b_.None){return self} -if(kls.$slot_values===undefined || -! kls.$slot_values.has(self.attr)){throw _b_.AttributeError.$factory(self.attr)} -return kls.$slot_values.get(self.attr)} -member_descriptor.__set__=function(self,kls,value){if(kls.$slot_values===undefined){kls.$slot_values=new Map()} -kls.$slot_values.set(self.attr,value)} -member_descriptor.__str__=member_descriptor.__repr__=function(self){return ""} -$B.set_func_names(member_descriptor,"builtins") -var method=$B.method=$B.make_class("method",function(func,cls){var f=function(){return $B.$call(func).bind(null,cls).apply(null,arguments)} -f.__class__=method -if(typeof func !=='function'){console.log('method from func w-o $infos',func,'all',$B.$call(func))} -f.$infos=func.$infos ||{} -f.$infos.__func__=func -f.$infos.__self__=cls -f.$infos.__dict__=$B.empty_dict() -return f} -) -method.__eq__=function(self,other){return self.$infos !==undefined && -other.$infos !==undefined && -self.$infos.__func__===other.$infos.__func__ && -self.$infos.__self__===other.$infos.__self__} -method.__ne__=function(self,other){return ! $B.method.__eq__(self,other)} -method.__get__=function(self){var f=function(){return self(arguments)} -f.__class__=$B.method_wrapper -f.$infos=method.$infos -return f} -method.__getattribute__=function(self,attr){ -var infos=self.$infos -if(infos && infos[attr]){if(attr=="__code__"){var res={__class__:$B.Code} -for(var attr in infos.__code__){res[attr]=infos.__code__[attr]} -return res}else{return infos[attr]}}else if(method.hasOwnProperty(attr)){return _b_.object.__getattribute__(self,attr)}else{ -return $B.function.__getattribute__(self.$infos.__func__,attr)}} -method.__repr__=method.__str__=function(self){return ""} -method.__setattr__=function(self,key,value){ -if(key=="__class__"){throw _b_.TypeError.$factory("__class__ assignment only supported "+ -"for heap types or ModuleType subclasses")} -throw $B.attr_error(attr,self)} -$B.set_func_names(method,"builtins") -$B.method_descriptor=$B.make_class("method_descriptor") -$B.classmethod_descriptor=$B.make_class("classmethod_descriptor") -_b_.object.__class__=type -$B.make_iterator_class=function(name){ -var klass={__class__:_b_.type,__mro__:[_b_.object],__name__:name,__qualname__:name,$factory:function(items){return{ -__class__:klass,__dict__:$B.empty_dict(),counter:-1,items:items,len:items.length,$builtin_iterator:true}},$is_class:true,$iterator_class:true,__iter__:function(self){self.counter=self.counter===undefined ?-1 :self.counter -self.len=self.items.length -return self},__len__:function(self){return self.items.length},__next__:function(self){if(typeof self.test_change=="function"){var message=self.test_change() -if(message){throw _b_.RuntimeError.$factory(message)}} -self.counter++ -if(self.counter < self.items.length){var item=self.items[self.counter] -if(self.items.$brython_class=="js"){ -item=$B.$JS2Py(item)} -return item} -throw _b_.StopIteration.$factory("StopIteration")},__reduce_ex__:function(self,protocol){return $B.fast_tuple([_b_.iter,_b_.tuple.$factory([self.items])])}} -$B.set_func_names(klass,"builtins") -return klass} -$B.GenericAlias=$B.make_class("GenericAlias",function(origin_class,items){var res={__class__:$B.GenericAlias,__mro__:[origin_class],origin_class,items} -return res} -) -$B.GenericAlias.__args__=_b_.property.$factory( -self=> $B.fast_tuple(self.items) -) -$B.GenericAlias.__call__=function(self,...args){return self.origin_class.$factory.apply(null,args)} -$B.GenericAlias.__eq__=function(self,other){if(! _b_.isinstance(other,$B.GenericAlias)){return false} -return $B.rich_comp("__eq__",self.origin_class,other.origin_class)&& -$B.rich_comp("__eq__",self.items,other.items)} -$B.GenericAlias.__getitem__=function(self,item){throw _b_.TypeError.$factory("descriptor '__getitem__' for '"+ -self.origin_class.__name__+"' objects doesn't apply to a '"+ -$B.class_name(item)+"' object")} -$B.GenericAlias.__mro_entries__=function(self,bases){return $B.fast_tuple([self.origin_class])} -$B.GenericAlias.__new__=function(origin_class,items,kwds){var res={__class__:$B.GenericAlias,__mro__:[origin_class],origin_class,items,$is_class:true} -return res} -$B.GenericAlias.__or__=function(self,other){var $=$B.args('__or__',2,{self:null,other:null},['self','other'],arguments,{},null,null) -return $B.UnionType.$factory([self,other])} -$B.GenericAlias.__origin__=_b_.property.$factory( -self=> self.origin_class -) -$B.GenericAlias.__parameters__=_b_.property.$factory( -self=> $B.fast_tuple([]) -) -$B.GenericAlias.__repr__=function(self){var items=Array.isArray(self.items)? self.items :[self.items] -var reprs=[] -for(var item of items){if(item===_b_.Ellipsis){reprs.push('...')}else{if(item.$is_class){reprs.push(item.__name__)}else{reprs.push(_b_.repr(item))}}} -return self.origin_class.__qualname__+'['+ -reprs.join(", ")+']'} -$B.set_func_names($B.GenericAlias,"types") -$B.UnionType=$B.make_class("UnionType",function(items){return{ -__class__:$B.UnionType,items}} -) -$B.UnionType.__args__=_b_.property.$factory( -self=> $B.fast_tuple(self.items) -) -$B.UnionType.__eq__=function(self,other){if(! _b_.isinstance(other,$B.UnionType)){return _b_.NotImplemented} -return _b_.list.__eq__(self.items,other.items)} -$B.UnionType.__parameters__=_b_.property.$factory( -()=> $B.fast_tuple([]) -) -$B.UnionType.__repr__=function(self){var t=[] -for(var item of self.items){if(item.$is_class){var s=item.__name__ -if(item.__module__ !=="builtins"){s=item.__module__+'.'+s} -t.push(s)}else{t.push(_b_.repr(item))}} -return t.join(' | ')} -$B.set_func_names($B.UnionType,"types")})(__BRYTHON__) -; - -;(function($B){var _b_=$B.builtins -_b_.__debug__=false -$B.$comps={'>':'gt','>=':'ge','<':'lt','<=':'le'} -$B.$inv_comps={'>':'lt','>=':'le','<':'gt','<=':'ge'} -var check_nb_args=$B.check_nb_args,check_no_kw=$B.check_no_kw,check_nb_args_no_kw=$B.check_nb_args_no_kw -var NoneType=$B.NoneType={$factory:function(){return None},__bool__:function(self){return False},__class__:_b_.type,__hash__:function(self){return 0},__module__:'builtins',__mro__:[_b_.object],__name__:'NoneType',__qualname__:'NoneType',__repr__:function(self){return 'None'},__str__:function(self){return 'None'},$is_class:true} -NoneType.__setattr__=function(self,attr){return no_set_attr(NoneType,attr)} -var None=_b_.None={__class__:NoneType} -None.__doc__=None -NoneType.__doc__=None -for(var $op in $B.$comps){ -var key=$B.$comps[$op] -switch(key){case 'ge': -case 'gt': -case 'le': -case 'lt': -NoneType['__'+key+'__']=(function(op){return function(other){return _b_.NotImplemented}})($op)}} -for(var $func in None){if(typeof None[$func]=='function'){None[$func].__str__=(function(f){return function(){return ""}})($func)}} -$B.set_func_names(NoneType,"builtins") -_b_.__build_class__=function(){throw _b_.NotImplementedError.$factory('__build_class__')} -var abs=_b_.abs=function(obj){check_nb_args_no_kw('abs',1,arguments) -var klass=obj.__class__ ||$B.get_class(obj) -try{var method=$B.$getattr(klass,"__abs__")}catch(err){if(err.__class__===_b_.AttributeError){throw _b_.TypeError.$factory("Bad operand type for abs(): '"+ -$B.class_name(obj)+"'")} -throw err} -return $B.$call(method)(obj)} -var aiter=_b_.aiter=function(async_iterable){return $B.$call($B.$getattr(async_iterable,'__aiter__'))()} -var all=_b_.all=function(obj){check_nb_args_no_kw('all',1,arguments) -var iterable=iter(obj) -while(1){try{var elt=next(iterable) -if(!$B.$bool(elt)){return false}}catch(err){return true}}} -var anext=_b_.anext=function(async_iterator,_default){var missing={},$=$B.args('anext',2,{async_iterator:null,_default:null},['async_iterator','_default'],arguments,{_default:missing},null,null) -var awaitable=$B.$call($B.$getattr(async_iterator,'__anext__'))() -return awaitable} -var any=_b_.any=function(obj){check_nb_args_no_kw('any',1,arguments) -for(var elt of $B.make_js_iterator(obj)){if($B.$bool(elt)){return true}} -return false} -var ascii=_b_.ascii=function(obj){check_nb_args_no_kw('ascii',1,arguments) -var res=repr(obj),res1='',cp -for(var i=0;i < res.length;i++){cp=res.charCodeAt(i) -if(cp < 128){res1+=res.charAt(i)} -else if(cp < 256){res1+='\\x'+cp.toString(16)} -else{var s=cp.toString(16) -if(s.length % 2==1){s="0"+s} -res1+='\\u'+s}} -return res1} -function $builtin_base_convert_helper(obj,base){var prefix=""; -switch(base){case 2: -prefix='0b';break -case 8: -prefix='0o';break -case 16: -prefix='0x';break -default: -console.log('invalid base:'+base)} -if(obj.__class__===$B.long_int){var res=prefix+obj.value.toString(base) -return res} -var value=$B.$GetInt(obj) -if(value===undefined){ -throw _b_.TypeError.$factory('Error, argument must be an integer or'+ -' contains an __index__ function')} -if(value >=0){return prefix+value.toString(base)} -return '-'+prefix+(-value).toString(base)} -function bin_hex_oct(base,obj){ -if(isinstance(obj,_b_.int)){return $builtin_base_convert_helper(obj,base)}else{try{var klass=obj.__class__ ||$B.get_class(obj),method=$B.$getattr(klass,'__index__')}catch(err){if(err.__class__===_b_.AttributeError){throw _b_.TypeError.$factory("'"+$B.class_name(obj)+ -"' object cannot be interpreted as an integer")} -throw err} -var res=$B.$call(method)(obj) -return $builtin_base_convert_helper(res,base)}} -var bin=_b_.bin=function(obj){check_nb_args_no_kw('bin',1,arguments) -return bin_hex_oct(2,obj)} -var breakpoint=_b_.breakpoint=function(){ -$B.$import('sys',[]) -var missing={},hook=$B.$getattr($B.imported.sys,'breakpointhook',missing) -if(hook===missing){throw _b_.RuntimeError.$factory('lost sys.breakpointhook')} -return $B.$call(hook).apply(null,arguments)} -var callable=_b_.callable=function(obj){check_nb_args_no_kw('callable',1,arguments) -return hasattr(obj,'__call__')} -var chr=_b_.chr=function(i){check_nb_args_no_kw('chr',1,arguments) -i=$B.PyNumber_Index(i) -if(i < 0 ||i > 1114111){throw _b_.ValueError.$factory('Outside valid range')}else if(i >=0x10000 && i <=0x10FFFF){var code=(i-0x10000),s=String.fromCodePoint(0xD800 |(code >> 10))+ -String.fromCodePoint(0xDC00 |(code & 0x3FF)) -return $B.make_String(s,[0])}else{return String.fromCodePoint(i)}} -var code=_b_.code=$B.make_class("code") -code.__repr__=code.__str__=function(_self){return ``} -code.__getattribute__=function(self,attr){return self[attr]} -$B.set_func_names(code,"builtins") -var compile=_b_.compile=function(){var $=$B.args('compile',7,{source:null,filename:null,mode:null,flags:null,dont_inherit:null,optimize:null,_feature_version:null},['source','filename','mode','flags','dont_inherit','optimize','_feature_version'],arguments,{flags:0,dont_inherit:false,optimize:-1,_feature_version:0},null,null) -var module_name='$exec_'+$B.UUID() -$.__class__=code -$.co_flags=$.flags -$.co_name="" -var filename=$.co_filename=$.filename -var interactive=$.mode=="single" &&($.flags & 0x200) -$B.file_cache[filename]=$.source -$B.url2name[filename]=module_name -if(_b_.isinstance($.source,_b_.bytes)){var encoding='utf-8',lfpos=$.source.source.indexOf(10),first_line,second_line -if(lfpos==-1){first_line=$.source}else{first_line=_b_.bytes.$factory($.source.source.slice(0,lfpos))} -first_line=_b_.bytes.decode(first_line,'latin-1') -var encoding_re=/^[\t\f]*#.*?coding[:=][\t]*([-_.a-zA-Z0-9]+)/ -var mo=first_line.match(encoding_re) -if(mo){encoding=mo[1]}else if(lfpos >-1){ -var rest=$.source.source.slice(lfpos+1) -lfpos=rest.indexOf(10) -if(lfpos >-1){second_line=_b_.bytes.$factory(rest.slice(0,lfpos))}else{second_line=_b_.bytes.$factory(rest)} -second_line=_b_.bytes.decode(second_line,'latin-1') -var mo=second_line.match(encoding_re) -if(mo){encoding=mo[1]}} -$.source=_b_.bytes.decode($.source,encoding)} -if(!_b_.isinstance(filename,[_b_.bytes,_b_.str])){ -$B.warn(_b_.DeprecationWarning,`path should be string, bytes, or os.PathLike, `+ -`not ${$B.class_name(filename)}`)} -if(interactive && ! $.source.endsWith("\n")){ -var lines=$.source.split("\n") -if($B.last(lines).startsWith(" ")){throw _b_.SyntaxError.$factory("unexpected EOF while parsing")}} -if($.source.__class__ && $.source.__class__.__module__=='ast'){ -$B.imported._ast._validate($.source) -$._ast=$.source -delete $.source -return $} -if($B.parser_to_ast){try{var parser_mode=$.mode=='eval' ? 'eval' :'file' -var parser=new $B.Parser($.source,filename,parser_mode),_ast=parser.parse()}catch(err){if($.mode=='single'){try{parser.tokens.next }catch(err2){ -var tokens=parser.tokens,tester=tokens[tokens.length-2] -if((tester.type=="NEWLINE" &&($.flags & 0x4000))|| -tester.type=="DEDENT" &&($.flags & 0x200)){err.__class__=_b_.SyntaxError -err.args[0]='incomplete input'}}} -throw err} -if($.mode=='single' && _ast.body.length==1 && -_ast.body[0]instanceof $B.ast.Expr){ -var parser=new $B.Parser($.source,filename,'eval'),_ast=parser.parse() -$.single_expression=true} -var future=$B.future_features(_ast,filename),symtable=$B._PySymtable_Build(_ast,filename),js_obj=$B.js_from_root({ast:_ast,symtable,filename:$.filename}) -if($.flags==$B.PyCF_ONLY_AST){delete $B.url2name[filename] -var res=$B.ast_js_to_py(_ast) -res.$js_ast=_ast -return res}}else{var root=$B.parser.create_root_node( -{src:$.source,filename},module_name,module_name) -root.mode=$.mode -root.parent_block=$B.builtins_scope -try{$B.parser.dispatch_tokens(root,$.source) -var _ast=root.ast()}catch(err){if($.mode=='single' && root.token_reader.read()===undefined){ -var tokens=root.token_reader.tokens,tester=tokens[tokens.length-2] -if((tester.type=="NEWLINE" &&($.flags & 0x4000))|| -tester.type=="DEDENT" &&($.flags & 0x200)){err.__class__=_b_.SyntaxError -err.args[0]='incomplete input'}} -throw err} -if($.mode=='single' && _ast.body.length==1 && -_ast.body[0]instanceof $B.ast.Expr){ -root=$B.parser.create_root_node( -{src:$.source,filename},module_name,module_name) -root.mode='eval' -$.single_expression=true -root.parent_block=$B.builtins_scope -$B.parser.dispatch_tokens(root,$.source) -_ast=root.ast()} -var future=$B.future_features(_ast,filename),symtable=$B._PySymtable_Build(_ast,filename,future) -delete $B.url2name[filename] -var js_obj=$B.js_from_root({ast:_ast,symtable,filename}) -if($.flags==$B.PyCF_ONLY_AST){$B.create_python_ast_classes() -var klass=_ast.constructor.$name -var res=$B.ast_js_to_py(_ast) -res.$js_ast=_ast -return res}} -delete $B.url2name[filename] -$._ast=$B.ast_js_to_py(_ast) -$._ast.$js_ast=_ast -return $} -var __debug__=_b_.debug=$B.debug > 0 -var delattr=_b_.delattr=function(obj,attr){ -check_nb_args_no_kw('delattr',2,arguments) -if(typeof attr !='string'){throw _b_.TypeError.$factory("attribute name must be string, not '"+ -$B.class_name(attr)+"'")} -return $B.$getattr(obj,'__delattr__')(attr)} -$B.$delete=function(name,is_global){ -function del(obj){if(obj.__class__===$B.generator){ -obj.js_gen.return()}} -var found=false,frame=$B.last($B.frames_stack) -if(! is_global){if(frame[1][name]!==undefined){found=true -del(frame[1][name]) -delete frame[1][name]}}else{if(frame[2]!=frame[0]&& frame[3][name]!==undefined){found=true -del(frame[3][name]) -delete frame[3][name]}} -if(!found){throw $B.name_error(name)}} -var dir=_b_.dir=function(obj){if(obj===undefined){ -var locals=_b_.locals() -return _b_.sorted(locals)} -check_nb_args_no_kw('dir',1,arguments) -var klass=obj.__class__ ||$B.get_class(obj) -if(obj.$is_class){ -var dir_func=$B.$getattr(obj.__class__,"__dir__") -return $B.$call(dir_func)(obj)} -try{var res=$B.$call($B.$getattr(klass,'__dir__'))(obj) -res=_b_.list.$factory(res) -return res}catch(err){ -console.log('error in dir',obj,$B.$getattr(obj,'__dir__'),err.message) -throw err} -var res=[],pos=0 -for(var attr in obj){if(attr.charAt(0)!=='$' && attr !=='__class__' && -obj[attr]!==undefined){res[pos++]=attr}} -res.sort() -return res} -var divmod=_b_.divmod=function(x,y){check_nb_args_no_kw('divmod',2,arguments) -try{return $B.rich_op('__divmod__',x,y)}catch(err){if($B.is_exc(err,[_b_.TypeError])){return _b_.tuple.$factory([$B.rich_op('__floordiv__',x,y),$B.rich_op('__mod__',x,y)])} -throw err}} -var enumerate=_b_.enumerate=$B.make_class("enumerate",function(){var $ns=$B.args("enumerate",2,{iterable:null,start:null},['iterable','start'],arguments,{start:0},null,null),_iter=iter($ns["iterable"]),start=$ns["start"] -return{ -__class__:enumerate,__name__:'enumerate iterator',counter:start-1,iter:_iter,start:start}} -) -enumerate.__iter__=function(self){self.counter=self.start-1 -return self} -enumerate.__next__=function(self){self.counter++ -return $B.fast_tuple([self.counter,next(self.iter)])} -$B.set_func_names(enumerate,"builtins") -var $$eval=_b_.eval=function(src,_globals,_locals){var $=$B.args("eval",4,{src:null,globals:null,locals:null,mode:null},['src','globals','locals','mode'],arguments,{globals:_b_.None,locals:_b_.None,mode:'eval'},null,null,4),src=$.src,_globals=$.globals,_locals=$.locals,mode=$.mode -if($.src.mode && $.src.mode=="single" && -["",""].indexOf($.src.filename)>-1){ -_b_.print(">",$.src.source.trim())} -var filename='' -if(src.__class__===code){filename=src.filename}else if((! src.valueOf)||typeof src.valueOf()!=='string'){throw _b_.TypeError.$factory(`${mode}() arg 1 must be a string,`+ -" bytes or code object")}else{ -src=src.valueOf()} -var __name__='exec' -if(_globals !==_b_.None && _globals.__class__==_b_.dict && -_b_.dict.$contains_string(_globals,'__name__')){__name__=_b_.dict.$getitem_string(_globals,'__name__')} -$B.url2name[filename]=__name__ -var frame=$B.last($B.frames_stack) -var lineno=frame.$lineno -$B.exec_scope=$B.exec_scope ||{} -if(typeof src=='string' && src.endsWith('\\\n')){var exc=_b_.SyntaxError.$factory('unexpected EOF while parsing') -var lines=src.split('\n'),line=lines[lines.length-2] -exc.args=['unexpected EOF while parsing',[filename,lines.length-1,1,line]] -exc.filename=filename -exc.text=line -throw exc} -var local_name='locals_'+__name__,global_name='globals_'+__name__,exec_locals={},exec_globals={} -if(_globals===_b_.None){ -if(frame[1]===frame[3]){ -global_name+='_globals' -exec_locals=exec_globals=frame[3]}else{if(mode=="exec"){ -exec_locals=$B.clone(frame[1]) -for(var attr in frame[3]){exec_locals[attr]=frame[3][attr]} -exec_globals=exec_locals}else{ -exec_locals=frame[1] -exec_globals=frame[3]}}}else{if(_globals.__class__ !==_b_.dict){throw _b_.TypeError.$factory(`${mode}() globals must be `+ -"a dict, not "+$B.class_name(_globals))} -exec_globals={} -if(_globals.$jsobj){ -exec_globals=_globals.$jsobj}else{ -exec_globals=_globals.$jsobj={} -for(var key of _b_.dict.$keys_string(_globals)){_globals.$jsobj[key]=_b_.dict.$getitem_string(_globals,key) -if(key=='__name__'){__name__=_globals.$jsobj[key]}} -_globals.$all_str=false} -if(exec_globals.__builtins__===undefined){exec_globals.__builtins__=_b_.__builtins__} -if(_locals===_b_.None){exec_locals=exec_globals}else{if(_locals===_globals){ -global_name+='_globals' -exec_locals=exec_globals}else if(_locals.$jsobj){for(var key in _locals.$jsobj){exec_globals[key]=_locals.$jsobj[key]}}else{if(_locals.$jsobj){exec_locals=_locals.$jsobj}else{var klass=$B.get_class(_locals),getitem=$B.$call($B.$getattr(klass,'__getitem__')),setitem=$B.$call($B.$getattr(klass,'__setitem__')) -exec_locals=new Proxy(_locals,{get(target,prop){if(prop=='$target'){return target} -try{return getitem(target,prop)}catch(err){return undefined}},set(target,prop,value){return setitem(target,prop,value)}})}}}} -var save_frames_stack=$B.frames_stack.slice() -var _ast -var frame=[__name__,exec_locals,__name__,exec_globals] -frame.is_exec_top=true -frame.__file__=filename -frame.$f_trace=$B.enter_frame(frame) -var _frames=$B.frames_stack.slice() -frame.$lineno=1 -if(src.__class__===code){_ast=src._ast -if(_ast.$js_ast){_ast=_ast.$js_ast}else{_ast=$B.ast_py_to_js(_ast)}} -try{if($B.parser_to_ast){if(! _ast){var _mode=mode=='eval' ? 'eval' :'file' -_ast=new $B.Parser(src,filename,_mode).parse()}}else{if(! _ast){var root=$B.parser.create_root_node(src,'',frame[0],frame[2],1) -root.mode=mode -root.filename=filename -$B.parser.dispatch_tokens(root) -_ast=root.ast()}} -var future=$B.future_features(_ast,filename),symtable=$B._PySymtable_Build(_ast,filename,future),js_obj=$B.js_from_root({ast:_ast,symtable,filename,namespaces:{local_name,exec_locals,global_name,exec_globals}}),js=js_obj.js}catch(err){if(err.args){if(err.args[1]){var lineno=err.args[1][1] -exec_locals.$lineno=lineno}}else{console.log('JS Error',err.message)} -$B.frames_stack=save_frames_stack -throw err} -if(mode=='eval'){ -js=`var locals = ${local_name}\nreturn ${js}`}else if(src.single_expression){js=`var result = ${js}\n`+ -`if(result !== _b_.None){\n`+ -`_b_.print(result)\n`+ -`}`} -try{var exec_func=new Function('$B','_b_',local_name,global_name,'frame','_frames',js)}catch(err){if($B.get_option('debug')> 1){console.log('eval() error\n',$B.format_indent(js,0)) -console.log('-- python source\n',src)} -throw err} -try{var res=exec_func($B,_b_,exec_locals,exec_globals,frame,_frames)}catch(err){if($B.get_option('debug')> 2){console.log( -'Python code\n',src,'\ninitial stack before exec',save_frames_stack.slice(),'\nstack',$B.frames_stack.slice(),'\nexec func',$B.format_indent(exec_func+'',0),'\n filename',filename,'\n name from filename',$B.url2name[filename],'\n local_name',local_name,'\n exec_locals',exec_locals,'\n global_name',global_name,'\n exec_globals',exec_globals,'\n frame',frame,'\n _ast',_ast,'\n js',js)} -$B.frames_stack=save_frames_stack -throw err} -if(_globals !==_b_.None && ! _globals.$jsobj){for(var key in exec_globals){if(! key.startsWith('$')){_b_.dict.$setitem(_globals,key,exec_globals[key])}}} -$B.frames_stack=save_frames_stack -return res} -$$eval.$is_func=true -var exec=_b_.exec=function(src,globals,locals){var missing={} -var $=$B.args("exec",3,{src:null,globals:null,locals:null},["src","globals","locals"],arguments,{globals:_b_.None,locals:_b_.None},null,null,3),src=$.src,globals=$.globals,locals=$.locals -$$eval(src,globals,locals,"exec") -return _b_.None} -exec.$is_func=true -var exit=_b_.exit=function(){throw _b_.SystemExit} -exit.__repr__=exit.__str__=function(){return "Use exit() or Ctrl-Z plus Return to exit"} -var filter=_b_.filter=$B.make_class("filter",function(func,iterable){check_nb_args_no_kw('filter',2,arguments) -iterable=iter(iterable) -if(func===_b_.None){func=$B.$bool} -return{ -__class__:filter,func:func,iterable:iterable}} -) -filter.__iter__=function(self){return self} -filter.__next__=function(self){while(true){var _item=next(self.iterable) -if(self.func(_item)){return _item}}} -$B.set_func_names(filter,"builtins") -var format=_b_.format=function(value,format_spec){var $=$B.args("format",2,{value:null,format_spec:null},["value","format_spec"],arguments,{format_spec:''},null,null) -var klass=value.__class__ ||$B.get_class(value) -try{var method=$B.$getattr(klass,'__format__')}catch(err){if(err.__class__===_b_.AttributeError){throw _b_.NotImplementedError("__format__ is not implemented "+ -"for object '"+_b_.str.$factory(value)+"'")} -throw err} -return $B.$call(method)(value,$.format_spec)} -function attr_error(attr,obj){var cname=$B.get_class(obj) -var msg="bad operand type for unary #: '"+cname+"'" -switch(attr){case '__neg__': -throw _b_.TypeError.$factory(msg.replace('#','-')) -case '__pos__': -throw _b_.TypeError.$factory(msg.replace('#','+')) -case '__invert__': -throw _b_.TypeError.$factory(msg.replace('#','~')) -case '__call__': -throw _b_.TypeError.$factory("'"+cname+"'"+ -' object is not callable') -default: -throw $B.attr_error(attr,obj)}} -var getattr=_b_.getattr=function(){var missing={} -var $=$B.args("getattr",3,{obj:null,attr:null,_default:null},["obj","attr","_default"],arguments,{_default:missing},null,null) -if(! isinstance($.attr,_b_.str)){throw _b_.TypeError.$factory("attribute name must be string, "+ -`not '${$B.class_name($.attr)}'`)} -return $B.$getattr($.obj,_b_.str.$to_string($.attr),$._default===missing ? undefined :$._default)} -function in_mro(klass,attr){if(klass===undefined){return false} -if(klass.hasOwnProperty(attr)){return klass[attr]} -var mro=klass.__mro__ -for(var i=0,len=mro.length;i < len;i++){if(mro[i].hasOwnProperty(attr)){return mro[i][attr]}} -return false} -function find_name_in_mro(cls,name,_default){ -for(var base of[cls].concat(cls.__mro__)){if(base.__dict__===undefined){console.log('base',base,'has not dict')} -var res=base.__dict__[name] -if(res !==undefined){return res}} -return _default} -$B.$getattr1=function(obj,name,_default){ -var objtype=$B.get_class(obj),cls_var=find_name_in_mro(objtype,name,null),cls_var_type=$B.get_class(cls_var),descr_get=_b_.type.__getattribute__(cls_var_type,'__get__') -if(descr_get !==undefined){if(_b_.type.__getattribute__(cls_var_type,'__set__') -||_b_.type.__getattribute__(cls_var_type,'__delete__')){return $B.$call(descr_get)(cls_var,obj,objtype)}} -if(obj.__dict__ !==undefined && obj.__dict__[name]!==undefined){return obj.__dict__[name]} -if(descr_get !==undefined){return $B.$call(descr_get)(cls_var,obj,objtype)} -if(cls_var !==null){return cls_var } -throw $B.attr_error(name,obj)} -$B.$getattr=function(obj,attr,_default){ -var res -if(obj===undefined){console.log('attr',attr,'of obj undef')} -if(obj.$method_cache && -obj.$method_cache[attr]&& -obj.__class__ && -obj.__class__[attr]==obj.$method_cache[attr][1]){ -return obj.$method_cache[attr][0]} -var rawname=attr -if(obj===undefined){console.log("get attr",attr,"of undefined")} -var is_class=obj.$is_class ||obj.$factory -var klass=obj.__class__ -var $test=false -if($test){console.log("attr",attr,"of",obj,"class",klass,"isclass",is_class)} -if(klass===undefined){klass=$B.get_class(obj) -if(klass===undefined){ -if($test){console.log("no class",attr,obj.hasOwnProperty(attr),obj[attr])} -res=obj[attr] -if(res !==undefined){if(typeof res=="function"){var f=function(){ -return res.apply(obj,arguments)} -f.$infos={__name__:attr,__qualname__:attr} -return f}else{return $B.$JS2Py(res)}} -if(_default !==undefined){return _default} -throw $B.attr_error(rawname,obj)}} -switch(attr){case '__call__': -if(typeof obj=='function'){res=function(){return obj.apply(null,arguments)} -res.__class__=method_wrapper -res.$infos={__name__:"__call__"} -return res} -break -case '__class__': -if(klass.__dict__){var klass_from_dict=_b_.None -if(_b_.isinstance(klass.__dict__,_b_.dict)){klass_from_dict=$B.$call($B.$getattr(klass.__dict__,'get'))('__class__')} -if(klass_from_dict !==_b_.None){if(klass_from_dict.$is_property){return klass_from_dict.fget(obj)} -return klass_from_dict}} -return klass -case '__dict__': -if(is_class){var dict={} -if(obj.__dict__){for(var key of _b_.dict.$keys_string(obj.__dict__)){dict[key]=_b_.dict.$getitem_string(obj.__dict__,key)}}else{for(var key in obj){if(! key.startsWith("$")){dict[key]=obj[key]}}} -dict.__dict__=$B.getset_descriptor.$factory(obj,'__dict__') -return{ -__class__:$B.mappingproxy, -$jsobj:dict,$version:0}}else if(! klass.$native){if(obj[attr]!==undefined){return obj[attr]}else if(obj.$infos){if(obj.$infos.hasOwnProperty("__dict__")){return obj.$infos.__dict__}else if(obj.$infos.hasOwnProperty("__func__")){return obj.$infos.__func__.$infos.__dict__}} -return $B.obj_dict(obj,function(attr){return['__class__'].indexOf(attr)>-1} -)} -case '__mro__': -if(obj.__mro__){return _b_.tuple.$factory([obj].concat(obj.__mro__))}else if(obj.__dict__ && -_b_.dict.$contains_string(obj.__dict__,'__mro__')){return _b_.dict.$getitem_string(obj.__dict__,'__mro__')} -throw $B.attr_error(attr,obj) -case '__subclasses__': -if(klass.$factory ||klass.$is_class){var subclasses=obj.$subclasses ||[] -return function(){return subclasses}} -break} -if(typeof obj=='function'){var value=obj[attr] -if(value !==undefined){if(attr=='__module__'){return value}}} -if((! is_class)&& klass.$native){if(obj.$method_cache && obj.$method_cache[attr]){return obj.$method_cache[attr]} -if($test){console.log("native class",klass,klass[attr])} -if(attr=="__doc__" && klass[attr]===undefined){_get_builtins_doc() -klass[attr]=$B.builtins_doc[klass.__name__]} -if(klass[attr]===undefined){var object_attr=_b_.object[attr] -if($test){console.log("object attr",object_attr)} -if(object_attr !==undefined){klass[attr]=object_attr}else{if($test){console.log("obj[attr]",obj[attr])} -var attrs=obj.__dict__ -if(attrs && _b_.dict.$contains_string(attrs,attr)){return _b_.dict.$getitem_string(attrs,attr)} -if(_default===undefined){throw $B.attr_error(attr,obj)} -return _default}} -if(klass.$descriptors && klass.$descriptors[attr]!==undefined){return klass[attr](obj)} -if(typeof klass[attr]=='function'){var func=klass[attr] -if(attr=='__new__'){func.$type="staticmethod"} -if(func.$type=="staticmethod"){return func} -var self=klass[attr].__class__==$B.method ? klass :obj,method=klass[attr].bind(null,self) -method.__class__=$B.method -method.$infos={__func__:func,__name__:attr,__self__:self,__qualname__:klass.__qualname__+"."+attr} -if(typeof obj=="object"){ -obj.__class__=klass -obj.$method_cache=obj.$method_cache ||{} -if(obj.$method_cache){ -obj.$method_cache[attr]=method}} -return method}else if(klass[attr].__class__===_b_.classmethod){return _b_.classmethod.__get__(klass[attr],obj,klass)}else if(klass[attr]!==undefined){return klass[attr]} -attr_error(rawname,klass)} -var mro,attr_func -if(is_class){if($test){console.log('obj is class',obj) -console.log('is a type ?',_b_.isinstance(klass,_b_.type)) -console.log('is type',klass===_b_.type)} -if(klass===_b_.type){attr_func=_b_.type.__getattribute__}else{attr_func=$B.$call($B.$getattr(klass,'__getattribute__'))} -if($test){console.log('attr func',attr_func)}}else{attr_func=klass.__getattribute__ -if(attr_func===undefined){var mro=klass.__mro__ -if(mro===undefined){console.log(obj,attr,"no mro, klass",klass)} -for(var i=0,len=mro.length;i < len;i++){attr_func=mro[i]['__getattribute__'] -if(attr_func !==undefined){break}}}} -if(typeof attr_func !=='function'){console.log(attr+' is not a function '+attr_func,klass)} -var odga=_b_.object.__getattribute__ -if($test){console.log("attr_func is odga ?",attr_func,attr_func===odga,'\n','\nobj[attr]',obj[attr])} -if(attr_func===odga){res=obj[attr] -if(Array.isArray(obj)&& Array.prototype[attr]!==undefined){ -res=undefined}else if(res===null){return null}else if(res !==undefined){if($test){console.log(obj,attr,obj[attr],res.__set__ ||res.$is_class)} -if(res.$is_property){return _b_.property.__get__(res)} -if(res.__set__===undefined ||res.$is_class){if($test){console.log("return",res,res+'',res.__set__,res.$is_class)} -return res}}} -try{res=attr_func(obj,attr) -if($test){console.log("result of attr_func",res)}}catch(err){if($test){console.log('attr_func raised error',err.args)} -var getattr -if(klass===$B.module){ -getattr=obj.__getattr__ -if(getattr){try{return getattr(attr)}catch(err){if(_default !==undefined){return _default} -throw err}}} -var getattr=in_mro(klass,'__getattr__') -if(getattr){if($test){console.log('try with getattr',getattr)} -try{return getattr(obj,attr)}catch(err){if(_default !==undefined){return _default} -throw err}} -if(_default !==undefined){return _default} -throw err} -if(res !==undefined){return res} -if(_default !==undefined){return _default} -var cname=klass.__name__ -if(is_class){cname=obj.__name__} -attr_error(rawname,is_class ? obj :klass)} -var globals=_b_.globals=function(){ -check_nb_args_no_kw('globals',0,arguments) -var res=$B.obj_dict($B.last($B.frames_stack)[3]) -res.$jsobj.__BRYTHON__=$B.JSObj.$factory($B) -res.$is_namespace=true -return res} -var hasattr=_b_.hasattr=function(obj,attr){check_nb_args_no_kw('hasattr',2,arguments) -try{$B.$getattr(obj,attr) -return true}catch(err){return false}} -var hash=_b_.hash=function(obj){check_nb_args_no_kw('hash',1,arguments) -return $B.$hash(obj)} -$B.$hash=function(obj){if(obj.__hashvalue__ !==undefined){return obj.__hashvalue__} -if(typeof obj==="boolean"){return obj ? 1 :0} -if(obj.$is_class || -obj.__class__===_b_.type || -obj.__class__===$B.function){return obj.__hashvalue__=$B.$py_next_hash--} -if(typeof obj=="string"){return _b_.str.__hash__(obj)}else if(typeof obj=="number"){return obj}else if(typeof obj=="boolean"){return obj ? 1 :0}else if(obj.__class__===_b_.float){return _b_.float.$hash_func(obj)} -var klass=obj.__class__ ||$B.get_class(obj) -if(klass===undefined){throw _b_.TypeError.$factory("unhashable type: '"+ -_b_.str.$factory($B.JSObj.$factory(obj))+"'")} -var hash_method=_b_.type.__getattribute__(klass,'__hash__',_b_.None) -if(hash_method===_b_.None){throw _b_.TypeError.$factory("unhashable type: '"+ -$B.class_name(obj)+"'")} -if(hash_method.$infos.__func__===_b_.object.__hash__){if(_b_.type.__getattribute__(klass,'__eq__')!==_b_.object.__eq__){throw _b_.TypeError.$factory("unhashable type: '"+ -$B.class_name(obj)+"'",'hash')}else{return obj.__hashvalue__=_b_.object.__hash__(obj)}}else{return $B.$call(hash_method)(obj)}} -function _get_builtins_doc(){if($B.builtins_doc===undefined){ -var url=$B.brython_path -if(url.charAt(url.length-1)=='/'){url=url.substr(0,url.length-1)} -url+='/builtins_docstrings.js' -var f=_b_.open(url) -eval(f.$content) -for(var key in docs){if(_b_[key]){_b_[key].__doc__=docs[key]}} -$B.builtins_doc=docs}} -var help=_b_.help=function(obj){if(obj===undefined){obj='help'} -if(typeof obj=='string'){var lib_url='https://docs.python.org/3/library',ref_url='https://docs.python.org/3/reference' -var parts=obj.split('.'),head=[],url -while(parts.length > 0){head.push(parts.shift()) -if($B.stdlib[head.join('.')]){url=head.join('.')}else{break}} -if(url){var doc_url -if(['browser','javascript','interpreter']. -indexOf(obj.split('.')[0])>-1){doc_url='/static_doc/'+($B.language=='fr' ? 'fr' :'en')}else{doc_url=lib_url} -window.open(`${doc_url}/${url}.html#`+obj) -return} -if(_b_[obj]){if(obj==obj.toLowerCase()){url=lib_url+`/functions.html#${obj}`}else if(['False','True','None','NotImplemented','Ellipsis','__debug__']. -indexOf(obj)>-1){url=lib_url+`/constants.html#${obj}`}else if(_b_[obj].$is_class && -_b_[obj].__bases__.indexOf(_b_.Exception)>-1){url=lib_url+`/exceptions.html#${obj}`} -if(url){window.open(url) -return}} -$B.$import('pydoc') -return $B.$call($B.$getattr($B.imported.pydoc,'help'))(obj)} -if(obj.__class__===$B.module){return help(obj.__name__)} -try{_b_.print($B.$getattr(obj,'__doc__'))}catch(err){return ''}} -help.__repr__=help.__str__=function(){return "Type help() for interactive help, or help(object) "+ -"for help about object."} -var hex=_b_.hex=function(obj){check_nb_args_no_kw('hex',1,arguments) -return bin_hex_oct(16,obj)} -var id=_b_.id=function(obj){check_nb_args_no_kw('id',1,arguments) -if(obj.$id !==undefined){return obj.$id}else if(isinstance(obj,[_b_.str,_b_.int,_b_.float])&& -!isinstance(obj,$B.long_int)){return $B.$getattr(_b_.str.$factory(obj),'__hash__')()}else{return obj.$id=$B.UUID()}} -var __import__=_b_.__import__=function(mod_name,globals,locals,fromlist,level){ -var $=$B.args('__import__',5,{name:null,globals:null,locals:null,fromlist:null,level:null},['name','globals','locals','fromlist','level'],arguments,{globals:None,locals:None,fromlist:_b_.tuple.$factory(),level:0},null,null) -return $B.$__import__($.name,$.globals,$.locals,$.fromlist)} -var input=_b_.input=function(msg){var res=prompt(msg ||'')||'' -if($B.imported["sys"]&& $B.imported["sys"].ps1){ -var ps1=$B.imported["sys"].ps1,ps2=$B.imported["sys"].ps2 -if(msg==ps1 ||msg==ps2){console.log(msg,res)}} -return res} -var isinstance=_b_.isinstance=function(obj,cls){check_nb_args_no_kw('isinstance',2,arguments) -return $B.$isinstance(obj,cls)} -$B.$isinstance=function(obj,cls){if(obj===null){return cls===$B.imported.javascript.NullType} -if(obj===undefined){return false} -if(Array.isArray(cls)){for(var kls of cls){if($B.$isinstance(obj,kls)){return true}} -return false} -if(cls.__class__===$B.UnionType){for(var kls of cls.items){if($B.$isinstance(obj,kls)){return true}} -return false} -if(cls.__class__===$B.GenericAlias){ -throw _b_.TypeError.$factory( -'isinstance() arg 2 cannot be a parameterized generic')} -if((!cls.__class__)&&(! cls.$is_class)){if(! $B.$getattr(cls,'__instancecheck__',false)){throw _b_.TypeError.$factory("isinstance() arg 2 must be a type "+ -"or tuple of types")}} -if(cls===_b_.int &&(obj===True ||obj===False)){return True} -if(cls===_b_.bool){switch(typeof obj){case "string": -return false -case "number": -return false -case "boolean": -return true}} -var klass=obj.__class__ -if(klass==undefined){if(typeof obj=='string'){if(cls==_b_.str){return true} -else if($B.builtin_classes.indexOf(cls)>-1){return false}}else if(typeof obj=='number' && Number.isFinite(obj)){if(Number.isFinite(obj)&& cls==_b_.int){return true}} -klass=$B.get_class(obj)} -if(klass===undefined){return false} -if(klass===cls){return true} -var mro=klass.__mro__ -for(var i=0;i < mro.length;i++){if(mro[i]===cls){return true}} -var instancecheck=$B.$getattr(cls.__class__ ||$B.get_class(cls),'__instancecheck__',_b_.None) -if(instancecheck !==_b_.None){return instancecheck(cls,obj)} -return false} -var issubclass=_b_.issubclass=function(klass,classinfo){check_nb_args_no_kw('issubclass',2,arguments) -var mro -if(!klass.__class__ || -!(klass.$factory !==undefined ||klass.$is_class !==undefined)){var meta=$B.$getattr(klass,'__class__',null) -if(meta===null){console.log('no class for',klass) -throw _b_.TypeError.$factory("issubclass() arg 1 must be a class")}else{mro=[_b_.object]}}else{mro=klass.__mro__} -if(isinstance(classinfo,_b_.tuple)){for(var i=0;i < classinfo.length;i++){if(issubclass(klass,classinfo[i])){return true}} -return false} -if(classinfo.__class__===$B.GenericAlias){throw _b_.TypeError.$factory( -'issubclass() arg 2 cannot be a parameterized generic')} -if(klass===classinfo ||mro.indexOf(classinfo)>-1){return true} -var sch=$B.$getattr(classinfo.__class__ ||$B.get_class(classinfo),'__subclasscheck__',_b_.None) -if(sch==_b_.None){return false} -return sch(classinfo,klass)} -var iterator_class=$B.make_class("iterator",function(getitem,len){return{ -__class__:iterator_class,getitem:getitem,len:len,counter:-1}} -) -iterator_class.__next__=function(self){self.counter++ -if(self.len !==null && self.counter==self.len){throw _b_.StopIteration.$factory('')} -try{return self.getitem(self.counter)}catch(err){throw _b_.StopIteration.$factory('')}} -$B.set_func_names(iterator_class,"builtins") -callable_iterator=$B.make_class("callable_iterator",function(func,sentinel){return{ -__class__:callable_iterator,func:func,sentinel:sentinel}} -) -callable_iterator.__iter__=function(self){return self} -callable_iterator.__next__=function(self){var res=self.func() -if($B.rich_comp("__eq__",res,self.sentinel)){throw _b_.StopIteration.$factory()} -return res} -$B.set_func_names(callable_iterator,"builtins") -$B.$iter=function(obj,sentinel){ -if(sentinel===undefined){var klass=obj.__class__ ||$B.get_class(obj) -try{var _iter=$B.$call($B.$getattr(klass,'__iter__'))}catch(err){if(err.__class__===_b_.AttributeError){try{var gi_method=$B.$call($B.$getattr(klass,'__getitem__')),gi=function(i){return gi_method(obj,i)},len -try{len=len(obj)}catch(err){throw _b_.TypeError.$factory("'"+$B.class_name(obj)+ -"' object is not iterable")} -return iterator_class.$factory(gi,len)}catch(err){throw _b_.TypeError.$factory("'"+$B.class_name(obj)+ -"' object is not iterable")}} -throw err} -var res=$B.$call(_iter)(obj) -try{$B.$getattr(res,'__next__')}catch(err){if(isinstance(err,_b_.AttributeError)){throw _b_.TypeError.$factory( -"iter() returned non-iterator of type '"+ -$B.class_name(res)+"'")}} -return res}else{return callable_iterator.$factory(obj,sentinel)}} -var iter=_b_.iter=function(){ -var $=$B.args('iter',1,{obj:null},['obj'],arguments,{},'args','kw'),sentinel -if($.args.length > 0){var sentinel=$.args[0]} -return $B.$iter($.obj,sentinel)} -var len=_b_.len=function(obj){check_nb_args_no_kw('len',1,arguments) -var klass=obj.__class__ ||$B.get_class(obj) -try{var method=$B.$getattr(klass,'__len__')}catch(err){throw _b_.TypeError.$factory("object of type '"+ -$B.class_name(obj)+"' has no len()")} -return $B.$call(method)(obj)} -var locals=_b_.locals=function(){ -check_nb_args('locals',0,arguments) -var locals_obj=$B.last($B.frames_stack)[1] -var class_locals=locals_obj.$target -if(class_locals){return class_locals} -var res=$B.obj_dict($B.clone(locals_obj)) -res.$is_namespace=true -delete res.$jsobj.__annotations__ -return res} -var map=_b_.map=$B.make_class("map",function(){var $=$B.args('map',2,{func:null,it1:null},['func','it1'],arguments,{},'args',null),func=$B.$call($.func) -var iter_args=[$B.make_js_iterator($.it1)] -for(var arg of $.args){iter_args.push($B.make_js_iterator(arg))} -var obj={__class__:map,args:iter_args,func:func} -obj[Symbol.iterator]=function(){this.iters=[] -for(var arg of this.args){this.iters.push(arg[Symbol.iterator]())} -return this} -obj.next=function(){var args=[] -for(var iter of this.iters){var arg=iter.next() -if(arg.done){return{done:true,value:null}} -args.push(arg.value)} -return{done:false,value:this.func.apply(null,args)}} -return obj} -) -map.__iter__=function(self){self[Symbol.iterator]() -return self} -map.__next__=function(self){var args=[] -for(var iter of self.iters){var arg=iter.next() -if(arg.done){throw _b_.StopIteration.$factory('')} -args.push(arg.value)} -return self.func.apply(null,args)} -$B.set_func_names(map,"builtins") -function $extreme(args,op){ -var $op_name='min' -if(op==='__gt__'){$op_name="max"} -var $=$B.args($op_name,0,{},[],args,{},'args','kw') -var has_default=false,func=false -for(var attr in $.kw.$jsobj){switch(attr){case 'key': -func=$.kw.$jsobj[attr] -func=func===_b_.None ? func :$B.$call(func) -break -case 'default': -var default_value=$.kw.$jsobj[attr] -has_default=true -break -default: -throw _b_.TypeError.$factory("'"+attr+ -"' is an invalid keyword argument for this function")}} -if((! func)||func===_b_.None){func=x=> x} -if($.args.length==0){throw _b_.TypeError.$factory($op_name+ -" expected 1 arguments, got 0")}else if($.args.length==1){ -var $iter=$B.make_js_iterator($.args[0]),res=null,x_value,extr_value -for(var x of $iter){if(res===null){extr_value=func(x) -res=x}else{x_value=func(x) -if($B.rich_comp(op,x_value,extr_value)){res=x -extr_value=x_value}}} -if(res===null){if(has_default){return default_value}else{throw _b_.ValueError.$factory($op_name+ -"() arg is an empty sequence")}}else{return res}}else{if(has_default){throw _b_.TypeError.$factory("Cannot specify a default for "+ -$op_name+"() with multiple positional arguments")} -if($B.last(args).$kw){var _args=[$.args].concat($B.last(args))}else{var _args=[$.args]} -return $extreme.call(null,_args,op)}} -var max=_b_.max=function(){return $extreme(arguments,'__gt__')} -var memoryview=_b_.memoryview=$B.make_class('memoryview',function(obj){check_nb_args_no_kw('memoryview',1,arguments) -if(obj.__class__===memoryview){return obj} -if($B.get_class(obj).$buffer_protocol){return{ -__class__:memoryview,obj:obj, -format:'B',itemsize:1,ndim:1,shape:_b_.tuple.$factory([_b_.len(obj)]),strides:_b_.tuple.$factory([1]),suboffsets:_b_.tuple.$factory([]),c_contiguous:true,f_contiguous:true,contiguous:true}}else{throw _b_.TypeError.$factory("memoryview: a bytes-like object "+ -"is required, not '"+$B.class_name(obj)+"'")}} -) -memoryview.$match_sequence_pattern=true, -memoryview.$buffer_protocol=true -memoryview.$not_basetype=true -memoryview.__eq__=function(self,other){if(other.__class__ !==memoryview){return false} -return $B.$getattr(self.obj,'__eq__')(other.obj)} -memoryview.__getitem__=function(self,key){if(isinstance(key,_b_.int)){var start=key*self.itemsize -if(self.format=="I"){var res=self.obj.source[start],coef=256 -for(var i=1;i < 4;i++){res+=self.obj.source[start+i]*coef -coef*=256} -return res}else if("B".indexOf(self.format)>-1){if(key > self.obj.source.length-1){throw _b_.KeyError.$factory(key)} -return self.obj.source[key]}else{ -return self.obj.source[key]}} -var res=self.obj.__class__.__getitem__(self.obj,key) -if(key.__class__===_b_.slice){return memoryview.$factory(res)}} -memoryview.__len__=function(self){return len(self.obj)/self.itemsize} -memoryview.__setitem__=function(self,key,value){try{$B.$setitem(self.obj,key,value)}catch(err){throw _b_.TypeError.$factory("cannot modify read-only memory")}} -memoryview.cast=function(self,format){switch(format){case "B": -return memoryview.$factory(self.obj) -case "I": -var res=memoryview.$factory(self.obj),objlen=len(self.obj) -res.itemsize=4 -res.format="I" -if(objlen % 4 !=0){throw _b_.TypeError.$factory("memoryview: length is not "+ -"a multiple of itemsize")} -return res}} -memoryview.hex=function(self){var res='',bytes=_b_.bytes.$factory(self) -bytes.source.forEach(function(item){res+=item.toString(16)}) -return res} -memoryview.tobytes=function(self){return{ -__class__:_b_.bytes,source:self.obj.source}} -memoryview.tolist=function(self){if(self.itemsize==1){return _b_.list.$factory(_b_.bytes.$factory(self.obj))}else if(self.itemsize==4){if(self.format=="I"){var res=[] -for(var i=0;i < self.obj.source.length;i+=4){var item=self.obj.source[i],coef=256 -for(var j=1;j < 4;j++){item+=coef*self.obj.source[i+j] -coef*=256} -res.push(item)} -return res}}} -$B.set_func_names(memoryview,"builtins") -var min=_b_.min=function(){return $extreme(arguments,'__lt__')} -var next=_b_.next=function(obj){check_no_kw('next',obj) -var missing={},$=$B.args("next",2,{obj:null,def:null},['obj','def'],arguments,{def:missing},null,null) -var klass=obj.__class__ ||$B.get_class(obj),ga=$B.$call($B.$getattr(klass,"__next__")) -if(ga !==undefined){try{return $B.$call(ga)(obj)}catch(err){if(err.__class__===_b_.StopIteration && -$.def !==missing){return $.def} -throw err}} -throw _b_.TypeError.$factory("'"+$B.class_name(obj)+ -"' object is not an iterator")} -var NotImplementedType=$B.NotImplementedType= -$B.make_class("NotImplementedType",function(){return NotImplemented} -) -NotImplementedType.__repr__=NotImplementedType.__str__=function(self){return "NotImplemented"} -$B.set_func_names(NotImplementedType,"builtins") -var NotImplemented=_b_.NotImplemented={__class__:NotImplementedType} -var oct=_b_.oct=function(obj){check_nb_args_no_kw('oct',1,arguments) -return bin_hex_oct(8,obj)} -var ord=_b_.ord=function(c){check_nb_args_no_kw('ord',1,arguments) -if(typeof c.valueOf()=='string'){if(c.length==1){return c.charCodeAt(0)}else if(c.length==2){var code=c.codePointAt(0) -if((code >=0x10000 && code <=0x1FFFF)|| -(code >=0x20000 && code <=0x2FFFF)|| -(code >=0x30000 && code <=0x3FFFF)|| -(code >=0xD0000 && code <=0xDFFFF)|| -(code >=0xE0000 && code <=0xFFFFF)){return code}} -throw _b_.TypeError.$factory('ord() expected a character, but '+ -'string of length '+c.length+' found')} -switch($B.get_class(c)){case _b_.str: -if(c.length==1){return c.charCodeAt(0)} -throw _b_.TypeError.$factory('ord() expected a character, but '+ -'string of length '+c.length+' found') -case _b_.bytes: -case _b_.bytearray: -if(c.source.length==1){return c.source[0]} -throw _b_.TypeError.$factory('ord() expected a character, but '+ -'string of length '+c.source.length+' found') -default: -throw _b_.TypeError.$factory('ord() expected a character, but '+ -$B.class_name(c)+' was found')}} -var complex_modulo=()=> _b_.ValueError.$factory('complex modulo') -var all_ints=()=> _b_.TypeError.$factory('pow() 3rd argument not '+ -'allowed unless all arguments are integers') -var pow=_b_.pow=function(){var $=$B.args('pow',3,{x:null,y:null,mod:null},['x','y','mod'],arguments,{mod:None},null,null),x=$.x,y=$.y,z=$.mod -var klass=x.__class__ ||$B.get_class(x) -if(z===_b_.None){return $B.rich_op('__pow__',x,y)}else{if(_b_.isinstance(x,_b_.int)){if(_b_.isinstance(y,_b_.float)){throw all_ints()}else if(_b_.isinstance(y,_b_.complex)){throw complex_modulo()}else if(_b_.isinstance(y,_b_.int)){if(_b_.isinstance(z,_b_.complex)){throw complex_modulo()}else if(! _b_.isinstance(z,_b_.int)){throw all_ints()}} -return _b_.int.__pow__(x,y,z)}else if(_b_.isinstance(x,_b_.float)){throw all_ints()}else if(_b_.isinstance(x,_b_.complex)){throw complex_modulo()}}} -var $print=_b_.print=function(){var $ns=$B.args('print',0,{},[],arguments,{},'args','kw') -var kw=$ns['kw'],end=$B.is_none(kw.$jsobj.end)? '\n' :kw.$jsobj.end,sep=$B.is_none(kw.$jsobj.sep)? ' ' :kw.$jsobj.sep,file=$B.is_none(kw.$jsobj.file)? $B.get_stdout():kw.$jsobj.file -var args=$ns['args'],writer=$B.$getattr(file,'write') -var items=[] -for(var i=0,len=args.length;i < len;i++){var arg=_b_.str.$factory(args[i]) -writer(arg) -if(i < len-1){writer(sep)}} -writer(end) -var flush=$B.$getattr(file,'flush',None) -if(flush !==None){$B.$call(flush)()} -return None} -$print.__name__='print' -$print.is_func=true -var quit=_b_.quit=function(){throw _b_.SystemExit} -quit.__repr__=quit.__str__=function(){return "Use quit() or Ctrl-Z plus Return to exit"} -var repr=_b_.repr=function(obj){check_nb_args_no_kw('repr',1,arguments) -var klass=obj.__class__ ||$B.get_class(obj) -return $B.$call($B.$getattr(klass,"__repr__"))(obj)} -var reversed=_b_.reversed=$B.make_class("reversed",function(seq){ -check_nb_args_no_kw('reversed',1,arguments) -var klass=seq.__class__ ||$B.get_class(seq),rev_method=$B.$getattr(klass,'__reversed__',null) -if(rev_method !==null){return $B.$call(rev_method)(seq)} -try{var method=$B.$getattr(klass,'__getitem__')}catch(err){throw _b_.TypeError.$factory("argument to reversed() must be a sequence")} -var res={__class__:reversed,$counter :_b_.len(seq),getter:function(i){return $B.$call(method)(seq,i)}} -return res} -) -reversed.__iter__=function(self){return self} -reversed.__next__=function(self){self.$counter-- -if(self.$counter < 0){throw _b_.StopIteration.$factory('')} -return self.getter(self.$counter)} -$B.set_func_names(reversed,"builtins") -var round=_b_.round=function(){var $=$B.args('round',2,{number:null,ndigits:null},['number','ndigits'],arguments,{ndigits:None},null,null),arg=$.number,n=$.ndigits===None ? 0 :$.ndigits -if(! isinstance(arg,[_b_.int,_b_.float])){var klass=arg.__class__ ||$B.get_class(arg) -try{return $B.$call($B.$getattr(klass,"__round__")).apply(null,arguments)}catch(err){if(err.__class__===_b_.AttributeError){throw _b_.TypeError.$factory("type "+$B.class_name(arg)+ -" doesn't define __round__ method")}else{throw err}}} -if(! isinstance(n,_b_.int)){throw _b_.TypeError.$factory("'"+$B.class_name(n)+ -"' object cannot be interpreted as an integer")} -var klass=$B.get_class(arg) -if(isinstance(arg,_b_.float)){return _b_.float.__round__(arg,$.ndigits)} -var mult=Math.pow(10,n),x=arg*mult,floor=Math.floor(x),diff=Math.abs(x-floor),res -if(diff==0.5){if(floor % 2){floor+=1} -res=_b_.int.__truediv__(floor,mult)}else{res=_b_.int.__truediv__(Math.round(x),mult)} -if(res.value===Infinity ||res.value===-Infinity){throw _b_.OverflowError.$factory( -"rounded value too large to represent")} -if($.ndigits===None){ -return Math.floor(res.value)}else{ -return $B.$call(klass)(res)}} -var setattr=_b_.setattr=function(){var $=$B.args('setattr',3,{obj:null,attr:null,value:null},['obj','attr','value'],arguments,{},null,null),obj=$.obj,attr=$.attr,value=$.value -if(!(typeof attr=='string')){throw _b_.TypeError.$factory("setattr(): attribute name must be string")} -return $B.$setattr(obj,attr,value)} -$B.$setattr=function(obj,attr,value){if(obj===undefined){console.log('obj undef',attr,value)} -var $test=attr==="_member_names_" -if(attr=='__dict__'){ -if(! isinstance(value,_b_.dict)){throw _b_.TypeError.$factory("__dict__ must be set to a dictionary, "+ -"not a '"+$B.class_name(value)+"'")} -if(obj.$infos){obj.$infos.__dict__=value -return None} -obj.__dict__=value -return None}else if(attr=="__class__"){ -function error(msg){throw _b_.TypeError.$factory(msg)} -if(value.__class__){if(value.__module__=="builtins"){error("__class__ assignement only "+ -"supported for heap types or ModuleType subclasses")}else if(Array.isArray(value.__bases__)){for(var i=0;i < value.__bases__.length;i++){if(value.__bases__[i]!==_b_.object && -value.__bases__[i].__module__=="builtins"){error("__class__ assignment: '"+$B.class_name(obj)+ -"' object layout differs from '"+ -$B.class_name(value)+"'")}}}} -obj.__class__=value -return None}else if(attr=="__doc__" && obj.__class__===_b_.property){obj[attr]=value} -if($test){console.log("set attr",attr,"to",obj)} -if(obj.$factory ||obj.$is_class){var metaclass=obj.__class__ -if(metaclass===_b_.type){return _b_.type.__setattr__(obj,attr,value)} -return $B.$call($B.$getattr(metaclass,'__setattr__'))(obj,attr,value)} -var res=obj[attr],klass=obj.__class__ ||$B.get_class(obj) -if($test){console.log('set attr',attr,'of obj',obj,'class',klass,"obj[attr]",obj[attr])} -if(res===undefined && klass){res=klass[attr] -if(res===undefined){var mro=klass.__mro__,_len=mro.length -for(var i=0;i < _len;i++){res=mro[i][attr] -if(res !==undefined){break}}}} -if($test){console.log('set attr',attr,'klass',klass,'found in class',res)} -if(res !==undefined && res !==null){ -if(res.__set__ !==undefined){res.__set__(res,obj,value);return None} -var rcls=res.__class__,__set1__ -if(rcls !==undefined){var __set1__=rcls.__set__ -if(__set1__===undefined){var mro=rcls.__mro__ -for(var i=0,_len=mro.length;i < _len;i++){__set1__=mro[i].__set__ -if(__set1__){break}}}} -if(__set1__ !==undefined){var __set__=$B.$getattr(res,'__set__',null) -if(__set__ &&(typeof __set__=='function')){__set__.apply(res,[obj,value]) -return None}}else if(klass && klass.$descriptors !==undefined && -klass[attr]!==undefined){var setter=klass[attr].setter -if(typeof setter=='function'){setter(obj,value) -return None}else{throw _b_.AttributeError.$factory('readonly attribute')}}} -var _setattr=false -if(klass !==undefined){_setattr=klass.__setattr__ -if(_setattr===undefined){var mro=klass.__mro__ -for(var i=0,_len=mro.length-1;i < _len;i++){_setattr=mro[i].__setattr__ -if(_setattr){break}}}} -var special_attrs=["__module__"] -if(klass && klass.__slots__ && special_attrs.indexOf(attr)==-1 && -! _setattr){var _slots=true -for(var kl of klass.__mro__){if(kl===_b_.object ||kl===_b_.type){break} -if(! kl.__slots__){ -_slots=false -break}} -if(_slots){function mangled_slots(klass){if(klass.__slots__){if(Array.isArray(klass.__slots__)){return klass.__slots__.map(function(item){if(item.startsWith("__")&& ! item.endsWith("_")){return "_"+klass.__name__+item}else{return item}})}else{return klass.__slots__}} -return[]} -var has_slot=false -if($B.$is_member(attr,mangled_slots(klass))){has_slot=true}else{for(var i=0;i < klass.__mro__.length;i++){var kl=klass.__mro__[i] -if(mangled_slots(kl).indexOf(attr)>-1){has_slot=true -break}}} -if(! has_slot){throw $B.attr_error(attr,klass)}}} -if($test){console.log("attr",attr,"use _setattr",_setattr)} -if(!_setattr){if(obj.__dict__===undefined){obj[attr]=value}else{_b_.dict.$setitem(obj.__dict__,attr,value)} -if($test){console.log("no setattr, obj",obj)}}else{if($test){console.log('apply _setattr',obj,attr)} -_setattr(obj,attr,value)} -return None} -var sorted=_b_.sorted=function(){var $=$B.args('sorted',1,{iterable:null},['iterable'],arguments,{},null,'kw') -var _list=_b_.list.$factory($.iterable),args=[_list].concat(Array.from(arguments).slice(1)) -_b_.list.sort.apply(null,args) -return _list} -var sum=_b_.sum=function(iterable,start){var $=$B.args('sum',2,{iterable:null,start:null},['iterable','start'],arguments,{start:0},null,null),iterable=$.iterable,start=$.start -if(_b_.isinstance(start,[_b_.str,_b_.bytes])){throw _b_.TypeError.$factory("sum() can't sum bytes"+ -" [use b''.join(seq) instead]")} -var res=start,iterable=iter(iterable) -while(1){try{var _item=next(iterable) -res=$B.rich_op('__add__',res,_item)}catch(err){if(err.__class__===_b_.StopIteration){break}else{throw err}}} -return res} -$B.missing_super2=function(obj){obj.$missing=true -return obj} -var $$super=_b_.super=$B.make_class("super",function(_type,object_or_type){var no_object_or_type=object_or_type===undefined -if(_type===undefined && object_or_type===undefined){var frame=$B.last($B.frames_stack),pyframe=$B.imported["_sys"].Getframe(),code=$B.frame.f_code.__get__(pyframe),co_varnames=code.co_varnames -if(co_varnames.length > 0){_type=frame[1].__class__ -if(_type===undefined){throw _b_.RuntimeError.$factory("super(): no arguments")} -object_or_type=frame[1][code.co_varnames[0]]}else{throw _b_.RuntimeError.$factory("super(): no arguments")}} -if((! no_object_or_type)&& Array.isArray(object_or_type)){object_or_type=object_or_type[0]} -var $arg2 -if(object_or_type !==undefined){if(object_or_type===_type || -(object_or_type.$is_class && -_b_.issubclass(object_or_type,_type))){$arg2='type'}else if(_b_.isinstance(object_or_type,_type)){$arg2='object'}else{throw _b_.TypeError.$factory( -'super(type, obj): obj must be an instance '+ -'or subtype of type')}} -return{ -__class__:$$super,__thisclass__:_type,__self_class__:object_or_type,$arg2}} -) -$$super.__get__=function(self,instance,klass){ -return $$super.$factory(self.__thisclass__,instance)} -$$super.__getattribute__=function(self,attr){if(self.__thisclass__.$is_js_class){if(attr=="__init__"){ -return function(){mro[0].$js_func.call(self.__self_class__,...arguments)}}} -var object_or_type=self.__self_class__,mro=self.$arg2=='type' ? object_or_type.__mro__ : -$B.get_class(object_or_type).__mro__ -var search_start=mro.indexOf(self.__thisclass__)+1,search_classes=mro.slice(search_start) -var $test=attr=="new" -if($test){console.log('super.__ga__, self',self,'search classes',search_classes)} -var f -for(var klass of search_classes){if(klass===undefined){console.log('klass undef in super',self) -console.log('mro',mro)} -if(klass[attr]!==undefined){f=klass[attr] -break}} -if(f===undefined){if($$super[attr]!==undefined){return(function(x){return function(){var args=[x] -for(var i=0,len=arguments.length;i < len;i++){args.push(arguments[i])} -return $$super[attr].apply(null,args)}})(self)} -if($test){console.log("no attr",attr,self,"mro",mro)} -throw $B.attr_error(attr,self)} -if($test){console.log("super",attr,self,"mro",mro,"found in mro[0]",mro[0],f,f+'')} -if(f.$type=="staticmethod" ||attr=="__new__"){return f}else if(f.__class__===_b_.classmethod){return f.__func__.bind(null,object_or_type)}else if(f.$is_property){return f.fget(object_or_type)}else if(typeof f !="function"){return f}else{if(f.__class__===$B.method){ -f=f.$infos.__func__} -var callable=$B.$call(f) -var method=function(){var res=callable(self.__self_class__,...arguments) -if($test){console.log("calling super",self.__self_class__,attr,f,"res",res)} -return res} -method.__class__=$B.method -var module,qualname -if(f.$infos !==undefined){module=f.$infos.__module__}else if(f.__class__===_b_.property){module=f.fget.$infos.__module}else if(f.$is_class){module=f.__module__} -method.$infos={__self__:self.__self_class__,__func__:f,__name__:attr,__module__:module,__qualname__:klass.__name__+"."+attr} -return method} -throw $B.attr_error(attr,self)} -$$super.__init__=function(cls){if(cls===undefined){throw _b_.TypeError.$factory("descriptor '__init__' of 'super' "+ -"object needs an argument")} -if(cls.__class__ !==$$super){throw _b_.TypeError.$factory("descriptor '__init__' requires a"+ -" 'super' object but received a '"+$B.class_name(cls)+"'")}} -$$super.__repr__=function(self){$B.builtins_repr_check($$super,arguments) -var res="" -if(self.__self_class__ !==undefined){res+=', <'+self.__self_class__.__class__.__name__+' object>'}else{res+=', NULL'} -return res+'>'} -$B.set_func_names($$super,"builtins") -var vars=_b_.vars=function(){var def={},$=$B.args('vars',1,{obj:null},['obj'],arguments,{obj:def},null,null) -if($.obj===def){return _b_.locals()}else{try{return $B.$getattr($.obj,'__dict__')}catch(err){if(err.__class__===_b_.AttributeError){throw _b_.TypeError.$factory("vars() argument must have __dict__ attribute")} -throw err}}} -var $Reader=$B.make_class("Reader") -$Reader.__bool__=function(){return true} -$Reader.__enter__=function(self){return self} -$Reader.__exit__=function(self){return false} -$Reader.__init__=function(_self,initial_value='',newline='\n'){_self.$content=initial_value -_self.$counter=0} -$Reader.__iter__=function(self){ -return iter($Reader.readlines(self))} -$Reader.__len__=function(self){return self.lines.length} -$Reader.__new__=function(cls){return{ -__class__:cls}} -$Reader.close=function(self){self.closed=true} -$Reader.flush=function(self){return None} -$Reader.read=function(){var $=$B.args("read",2,{self:null,size:null},["self","size"],arguments,{size:-1},null,null),self=$.self,size=$B.$GetInt($.size) -if(self.closed===true){throw _b_.ValueError.$factory('I/O operation on closed file')} -if(size < 0){size=self.$length-self.$counter} -var content=self.$content -if(self.$binary){res=_b_.bytes.$factory(self.$content.source.slice(self.$counter,self.$counter+size))}else{res=self.$content.substr(self.$counter,size)} -self.$counter+=size -return res} -$Reader.readable=function(self){return true} -function make_lines(self){ -if(self.$lines===undefined){if(! self.$binary){self.$lines=self.$content.split("\n") -if($B.last(self.$lines)==''){self.$lines.pop()} -self.$lines=self.$lines.map(x=> x+'\n')}else{var lines=[],pos=0,source=self.$content.source -while(pos < self.$length){var ix=source.indexOf(10,pos) -if(ix==-1){lines.push({__class__:_b_.bytes,source:source.slice(pos)}) -break}else{lines.push({__class__:_b_.bytes,source:source.slice(pos,ix+1)}) -pos=ix+1}} -self.$lines=lines}}} -$Reader.readline=function(self,size){var $=$B.args("readline",2,{self:null,size:null},["self","size"],arguments,{size:-1},null,null),self=$.self,size=$B.$GetInt($.size) -self.$lc=self.$lc===undefined ?-1 :self.$lc -if(self.closed===true){throw _b_.ValueError.$factory('I/O operation on closed file')} -if(self.$binary){var ix=self.$content.source.indexOf(10,self.$counter) -if(ix==-1){var rest=self.$content.source.slice(self.$counter) -self.$counter=self.$content.source.length -return _b_.bytes.$factory(rest)}else{var res={__class__:_b_.bytes,source :self.$content.source.slice(self.$counter,ix+1)} -self.$counter=ix+1 -return res}}else{if(self.$counter==self.$content.length){return ''} -var ix=self.$content.indexOf("\n",self.$counter) -if(ix==-1){var rest=self.$content.substr(self.$counter) -self.$counter=self.$content.length -return rest}else{var res=self.$content.substring(self.$counter,ix+1) -self.$counter=ix+1 -self.$lc+=1 -return res}}} -$Reader.readlines=function(){var $=$B.args("readlines",2,{self:null,hint:null},["self","hint"],arguments,{hint:-1},null,null),self=$.self,hint=$B.$GetInt($.hint) -var nb_read=0 -if(self.closed===true){throw _b_.ValueError.$factory('I/O operation on closed file')} -self.$lc=self.$lc===undefined ?-1 :self.$lc -make_lines(self) -if(hint < 0){var lines=self.$lines.slice(self.$lc+1)}else{var lines=[] -while(self.$lc < self.$lines.length && -nb_read < hint){self.$lc++ -lines.push(self.$lines[self.$lc])}} -return lines} -$Reader.seek=function(self,offset,whence){if(self.closed===True){throw _b_.ValueError.$factory('I/O operation on closed file')} -if(whence===undefined){whence=0} -if(whence===0){self.$counter=offset}else if(whence===1){self.$counter+=offset}else if(whence===2){self.$counter=self.$length+offset} -return None} -$Reader.seekable=function(self){return true} -$Reader.tell=function(self){return self.$counter} -$Reader.write=function(_self,data){if(_self.mode.indexOf('w')==-1){if($B.$io.UnsupportedOperation===undefined){$B.$io.UnsupportedOperation=$B.$class_constructor( -"UnsupportedOperation",{},[_b_.Exception],["Exception"])} -throw $B.$call($B.$io.UnsupportedOperation)('not writable')} -if(_self.mode.indexOf('b')==-1){ -if(typeof data !="string"){throw _b_.TypeError.$factory('write() argument must be str,'+ -` not ${class_name(data)}`)} -_self.$content+=data}else{if(! _b_.isinstance(data,[_b_.bytes,_b_.bytearray])){throw _b_.TypeError.$factory('write() argument must be bytes,'+ -` not ${class_name(data)}`)} -_self.$content.source=_self.$content.source.concat(data.source)} -$B.file_cache[_self.name]=_self.$content} -$Reader.writable=function(self){return false} -$B.set_func_names($Reader,"builtins") -var $BufferedReader=$B.make_class('_io.BufferedReader',function(content){return{ -__class__:$BufferedReader,$binary:true,$content:content,$read_func:$B.$getattr(content,'read')}} -) -$BufferedReader.__mro__=[$Reader,_b_.object] -$BufferedReader.read=function(self,size){if(self.$read_func===undefined){return $Reader.read(self,size===undefined ?-1 :size)} -return self.$read_func(size ||-1)} -var $TextIOWrapper=$B.make_class('_io.TextIOWrapper',function(){var $=$B.args("TextIOWrapper",6,{buffer:null,encoding:null,errors:null,newline:null,line_buffering:null,write_through:null},["buffer","encoding","errors","newline","line_buffering","write_through"],arguments,{encoding:"utf-8",errors:_b_.None,newline:_b_.None,line_buffering:_b_.False,write_through:_b_.False},null,null) -return{ -__class__:$TextIOWrapper,$content:_b_.bytes.decode($.buffer.$content,$.encoding),encoding:$.encoding,errors:$.errors,newline:$.newline}} -) -$TextIOWrapper.__mro__=[$Reader,_b_.object] -$B.set_func_names($TextIOWrapper,"builtins") -$B.Reader=$Reader -$B.TextIOWrapper=$TextIOWrapper -$B.BufferedReader=$BufferedReader -var $url_open=_b_.open=function(){ -var $=$B.args('open',3,{file:null,mode:null,encoding:null},['file','mode','encoding'],arguments,{mode:'r',encoding:'utf-8'},'args','kw'),file=$.file,mode=$.mode,encoding=$.encoding,result={} -if(encoding=='locale'){ -encoding='utf-8'} -var is_binary=mode.search('b')>-1 -if(mode.search('w')>-1){ -var res={$binary:is_binary,$content:is_binary ? _b_.bytes.$factory():'',$encoding:encoding,closed:False,mode,name:file} -res.__class__=is_binary ? $BufferedReader :$TextIOWrapper -$B.file_cache[file]=res.$content -return res}else if(['r','rb'].indexOf(mode)==-1){throw _b_.ValueError.$factory("Invalid mode '"+mode+"'")} -if(isinstance(file,_b_.str)){ -if($B.file_cache.hasOwnProperty($.file)){var f=$B.file_cache[$.file] -result.content=f -if(is_binary && typeof f=='string'){result.content=_b_.str.encode(f,'utf-8')}else if(f.__class__===_b_.bytes && ! is_binary){result.content=_b_.bytes.decode(f,encoding)}}else if($B.files && $B.files.hasOwnProperty($.file)){ -var $res=atob($B.files[$.file].content) -var source=[] -for(const char of $res){source.push(char.charCodeAt(0))} -result.content=_b_.bytes.$factory(source) -if(!is_binary){ -try{result.content=_b_.bytes.decode(result.content,encoding)}catch(error){result.error=error}}}else if($B.protocol !="file"){ -var req=new XMLHttpRequest() -req.overrideMimeType('text/plain;charset=x-user-defined') -req.onreadystatechange=function(){if(this.readyState !=4){return} -var status=this.status -if(status==404){result.error=_b_.FileNotFoundError.$factory(file)}else if(status !=200){result.error=_b_.IOError.$factory('Could not open file '+ -file+' : status '+status)}else{var bytes=[] -for(var i=0,len=this.response.length;i < len;i++){var cp=this.response.codePointAt(i) -if(cp > 0xf700){cp-=0xf700} -bytes.push(cp)} -result.content=_b_.bytes.$factory(bytes) -if(! is_binary){ -try{result.content=_b_.bytes.decode(result.content,encoding)}catch(error){result.error=error}}}} -var cache=$B.get_option('cache'),fake_qs=cache ? '' :'?foo='+(new Date().getTime()) -req.open('GET',encodeURI(file+fake_qs),false) -req.send()}else{throw _b_.FileNotFoundError.$factory( -"cannot use 'open()' with protocol 'file'")} -if(result.error !==undefined){throw result.error} -var res={$binary:is_binary,$content:result.content,$counter:0,$encoding:encoding,$length:is_binary ? result.content.source.length : -result.content.length,closed:False,mode,name:file} -res.__class__=is_binary ? $BufferedReader :$TextIOWrapper -return res}else{throw _b_.TypeError.$factory("invalid argument for open(): "+ -_b_.str.$factory(file))}} -function*zip_iter(args){var t=[] -for(var arg in args){t.push($B.make_js_iterator(arg))} -return t} -var zip=_b_.zip=$B.make_class("zip",function(){var res={__class__:zip,items:[]} -if(arguments.length==0){return res} -var $ns=$B.args('zip',0,{},[],arguments,{},'args','kw') -var _args=$ns['args'],strict=$B.$bool($ns.kw.$jsobj.strict ||false) -var nexts=[],only_lists=true,min_len -var iters=[] -for(var arg of _args){iters.push($B.make_js_iterator(arg))} -return{ -__class__:zip,iters,strict}} -) -var zip_iterator=$B.make_iterator_class('zip') -zip.__iter__=function(self){return self} -zip.__next__=function(self){var res=[],len=self.iters.length -for(var i=0;i < len;i++){var v=self.iters[i].next() -if(v.done){if(self.strict){if(i > 0){throw _b_.ValueError.$factory( -`zip() argument ${i + 1} is longer than argument ${i}`)}else{for(var j=1;j < len;j++){var v=self.iters[j].next() -if(! v.done){throw _b_.ValueError.$factory( -`zip() argument ${j + 1} is longer than argument ${i + 1}`)}}}} -throw _b_.StopIteration.$factory('')} -res.push(v.value)} -return $B.fast_tuple(res)} -$B.set_func_names(zip,"builtins") -function no_set_attr(klass,attr){if(klass[attr]!==undefined){throw _b_.AttributeError.$factory("'"+klass.__name__+ -"' object attribute '"+attr+"' is read-only")}else{throw $B.attr_error(attr,klass)}} -var True=_b_.True=true -var False=_b_.False=false -var ellipsis=$B.ellipsis=$B.make_class("ellipsis",function(){return Ellipsis} -) -ellipsis.__repr__=function(self){return 'Ellipsis'} -var Ellipsis=_b_.Ellipsis={__class__:ellipsis} -for(var $key in $B.$comps){ -switch($B.$comps[$key]){case 'ge': -case 'gt': -case 'le': -case 'lt': -ellipsis['__'+$B.$comps[$key]+'__']=(function(k){return function(other){throw _b_.TypeError.$factory("unorderable types: ellipsis() "+ -k+" "+$B.class_name(other))}})($key)}} -for(var $func in Ellipsis){if(typeof Ellipsis[$func]=='function'){Ellipsis[$func].__str__=(function(f){return function(){return ""}})($func)}} -$B.set_func_names(ellipsis) -var FunctionCode=$B.make_class("function code") -var FunctionGlobals=$B.make_class("function globals") -$B.function={__class__:_b_.type,__code__:{__class__:FunctionCode,__name__:'function code'},__globals__:{__class__:FunctionGlobals,__name__:'function globals'},__mro__:[_b_.object],__name__:'function',__qualname__:'function',$is_class:true} -$B.function.__delattr__=function(self,attr){if(attr=="__dict__"){throw _b_.TypeError.$factory("can't deleted function __dict__")}} -$B.function.__dir__=function(self){var infos=self.$infos ||{},attrs=self.$attrs ||{} -return Object.keys(infos). -concat(Object.keys(attrs)). -filter(x=> !x.startsWith('$'))} -$B.function.__get__=function(self,obj){ -if(obj===_b_.None){return self} -return $B.method.$factory(self,obj)} -$B.function.__getattribute__=function(self,attr){ -if(self.$infos && self.$infos[attr]!==undefined){if(attr=='__code__'){var res={__class__:code} -for(var attr in self.$infos.__code__){res[attr]=self.$infos.__code__[attr]} -res.name=self.$infos.__name__ -res.filename=self.$infos.__code__.co_filename -res.co_code=self+"" -return res}else if(attr=='__annotations__'){ -return $B.obj_dict(self.$infos[attr])}else if(self.$infos.hasOwnProperty(attr)){return self.$infos[attr]}}else if(self.$infos && self.$infos.__dict__ && -_b_.dict.$contains_string(self.$infos.__dict__,attr)){return _b_.dict.$getitem_string(self.$infos.__dict__,attr)}else if(attr=="__closure__"){var free_vars=self.$infos.__code__.co_freevars -if(free_vars.length==0){return None} -var cells=[] -for(var i=0;i < free_vars.length;i++){try{cells.push($B.cell.$factory($B.$check_def_free(free_vars[i])))}catch(err){ -cells.push($B.cell.$factory(None))}} -return _b_.tuple.$factory(cells)}else if(attr=='__builtins__'){if(self.$infos && self.$infos.__globals__){return _b_.dict.$getitem(self.$infos.__globals__,'__builtins__')} -return $B.obj_dict(_b_)}else if(attr=="__globals__"){return $B.obj_dict($B.imported[self.$infos.__module__])}else if(self.$attrs && self.$attrs[attr]!==undefined){return self.$attrs[attr]}else{return _b_.object.__getattribute__(self,attr)}} -$B.function.__repr__=function(self){if(self.$infos===undefined){return ''}else{return ''}} -$B.function.__mro__=[_b_.object] -$B.make_function_defaults=function(f){if(f.$infos && f.$infos.__code__){ -var argcount=f.$infos.__code__.co_argcount,varnames=f.$infos.__code__.co_varnames,params=varnames.slice(0,argcount),value=f.$infos.__defaults__,$defaults={} -for(var i=value.length-1;i >=0;i--){var pos=params.length-value.length+i -if(pos < 0){break} -$defaults[params[pos]]=value[i]} -if(f.$infos.__kwdefaults__ !==_b_.None){var kwdef=f.$infos.__kwdefaults__ -for(var kw of $B.make_js_iterator(kwdef)){$defaults[kw]=$B.$getitem(kwdef,kw)}} -f.$defaults=$defaults -return _b_.None}else{throw _b_.AttributeError.$factory("cannot set attribute "+attr+ -" of "+_b_.str.$factory(self))}} -$B.function.__setattr__=function(self,attr,value){if(attr=="__closure__"){throw _b_.AttributeError.$factory("readonly attribute")}else if(attr=="__defaults__"){ -if(value===_b_.None){value=[]}else if(! isinstance(value,_b_.tuple)){throw _b_.TypeError.$factory( -"__defaults__ must be set to a tuple object")} -if(self.$infos){self.$infos.__defaults__=value -$B.make_function_defaults(self)}else{throw _b_.AttributeError.$factory("cannot set attribute "+attr+ -" of "+_b_.str.$factory(self))}}else if(attr=="__kwdefaults__"){if(value===_b_.None){value=$B.empty_dict}else if(! isinstance(value,_b_.dict)){throw _b_.TypeError.$factory( -"__kwdefaults__ must be set to a dict object")} -if(self.$infos){self.$infos.__kwdefaults__=value -$B.make_function_defaults(self)}else{throw _b_.AttributeError.$factory("cannot set attribute "+attr+ -" of "+_b_.str.$factory(self))}} -if(self.$infos[attr]!==undefined){self.$infos[attr]=value}else{self.$attrs=self.$attrs ||{} -self.$attrs[attr]=value}} -$B.function.$factory=function(){} -$B.set_func_names($B.function,"builtins") -_b_.__BRYTHON__=__BRYTHON__ -$B.builtin_funcs=["__build_class__","abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dir","divmod","eval","exec","exit","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","locals","max","min","next","oct","open","ord","pow","print","quit","repr","round","setattr","sorted","sum","vars" -] -var builtin_function=$B.builtin_function_or_method=$B.make_class( -"builtin_function_or_method",function(f){f.__class__=builtin_function -return f}) -builtin_function.__getattribute__=$B.function.__getattribute__ -builtin_function.__reduce_ex__=builtin_function.__reduce__=function(self){return self.$infos.__name__} -builtin_function.__repr__=builtin_function.__str__=function(self){return ''} -$B.set_func_names(builtin_function,"builtins") -var method_wrapper=$B.make_class("method_wrapper") -method_wrapper.__repr__=method_wrapper.__str__=function(self){return ""} -$B.set_func_names(method_wrapper,"builtins") -$B.builtin_classes=["bool","bytearray","bytes","classmethod","complex","dict","enumerate","filter","float","frozenset","int","list","map","memoryview","object","property","range","reversed","set","slice","staticmethod","str","super","tuple","type","zip" -] -var other_builtins=['Ellipsis','False','None','True','__debug__','__import__','copyright','credits','license','NotImplemented' -] -var builtin_names=$B.builtin_funcs. -concat($B.builtin_classes). -concat(other_builtins) -for(var name of builtin_names){try{if($B.builtin_funcs.indexOf(name)>-1){_b_[name].__class__=builtin_function -_b_[name].$infos={__module__:'builtins',__name__:orig_name,__qualname__:orig_name}}}catch(err){}} -_b_.object.__init__.__class__=$B.wrapper_descriptor -_b_.object.__new__.__class__=builtin_function})(__BRYTHON__) -; -;(function($B){ -var DEFAULT_MIN_MERGE=32 -var DEFAULT_MIN_GALLOPING=7 -var DEFAULT_TMP_STORAGE_LENGTH=256 -var POWERS_OF_TEN=[1e0,1e1,1e2,1e3,1e4,1e5,1e6,1e7,1e8,1e9] -function log10(x){if(x < 1e5){if(x < 1e2){return x < 1e1 ? 0 :1} -if(x < 1e4){return x < 1e3 ? 2 :3} -return 4} -if(x < 1e7){return x < 1e6 ? 5 :6} -if(x < 1e9){return x < 1e8 ? 7 :8} -return 9} -function alphabeticalCompare(a,b){if(a===b){return 0} -if(~~a===a && ~~b===b){if(a===0 ||b===0){return a < b ?-1 :1} -if(a < 0 ||b < 0){if(b >=0){return-1} -if(a >=0){return 1} -a=-a -b=-b} -al=log10(a) -bl=log10(b) -var t=0 -if(al < bl){a*=POWERS_OF_TEN[bl-al-1] -b/=10 -t=-1}else if(al > bl){b*=POWERS_OF_TEN[al-bl-1] -a/=10; -t=1;} -if(a===b){return t} -return a < b ?-1 :1} -var aStr=String(a) -var bStr=String(b) -if(aStr===bStr){return 0} -return aStr < bStr ?-1 :1} -function minRunLength(n){var r=0 -while(n >=DEFAULT_MIN_MERGE){r |=(n & 1) -n >>=1} -return n+r} -function makeAscendingRun(array,lo,hi,compare){var runHi=lo+1 -if(runHi===hi){return 1;} -if(compare(array[runHi++],array[lo])< 0){while(runHi < hi && compare(array[runHi],array[runHi-1])< 0){runHi++} -reverseRun(array,lo,runHi)}else{while(runHi < hi && compare(array[runHi],array[runHi-1])>=0){runHi++}} -return runHi-lo} -function reverseRun(array,lo,hi){hi-- -while(lo < hi){var t=array[lo] -array[lo++]=array[hi] -array[hi--]=t}} -function binaryInsertionSort(array,lo,hi,start,compare){if(start===lo){start++} -for(;start < hi;start++){var pivot=array[start] -var left=lo -var right=start -while(left < right){var mid=(left+right)>>> 1 -if(compare(pivot,array[mid])< 0){right=mid}else{left=mid+1}} -var n=start-left -switch(n){case 3: -array[left+3]=array[left+2] -case 2: -array[left+2]=array[left+1] -case 1: -array[left+1]=array[left] -break; -default: -while(n > 0){array[left+n]=array[left+n-1] -n--;}} -array[left]=pivot}} -function gallopLeft(value,array,start,length,hint,compare){var lastOffset=0,maxOffset=0,offset=1 -if(compare(value,array[start+hint])> 0){maxOffset=length-hint -while(offset < maxOffset && compare(value,array[start+hint+offset])> 0){lastOffset=offset -offset=(offset << 1)+1 -if(offset <=0){offset=maxOffset}} -if(offset > maxOffset){offset=maxOffset} -lastOffset+=hint -offset+=hint}else{maxOffset=hint+1 -while(offset < maxOffset && compare(value,array[start+hint-offset])<=0){lastOffset=offset -offset=(offset << 1)+1 -if(offset <=0){offset=maxOffset}} -if(offset > maxOffset){offset=maxOffset} -var tmp=lastOffset -lastOffset=hint-offset -offset=hint-tmp} -lastOffset++ -while(lastOffset < offset){var m=lastOffset+((offset-lastOffset)>>> 1) -if(compare(value,array[start+m])> 0){lastOffset=m+1}else{offset=m}} -return offset} -function gallopRight(value,array,start,length,hint,compare){var lastOffset=0,maxOffset=0,offset=1 -if(compare(value,array[start+hint])< 0){maxOffset=hint+1 -while(offset < maxOffset && compare(value,array[start+hint-offset])< 0){lastOffset=offset -offset=(offset << 1)+1 -if(offset <=0){offset=maxOffset}} -if(offset > maxOffset){offset=maxOffset} -var tmp=lastOffset -lastOffset=hint-offset -offset=hint-tmp}else{maxOffset=length-hint -while(offset < maxOffset && compare(value,array[start+hint+offset])>=0){lastOffset=offset -offset=(offset << 1)+1 -if(offset <=0){offset=maxOffset}} -if(offset > maxOffset){offset=maxOffset} -lastOffset+=hint -offset+=hint} -lastOffset++ -while(lastOffset < offset){var m=lastOffset+((offset-lastOffset)>>> 1) -if(compare(value,array[start+m])< 0){offset=m}else{lastOffset=m+1}} -return offset} -var TIM_SORT_ASSERTION="TimSortAssertion" -var TimSortAssertion=function(message){this.name=TIM_SORT_ASSERTION -this.message=message} -var TimSort=function(array,compare){var self={array:array,compare:compare,minGallop:DEFAULT_MIN_GALLOPING,length :array.length,tmpStorageLength:DEFAULT_TMP_STORAGE_LENGTH,stackLength:0,runStart:null,runLength:null,stackSize:0, -pushRun:function(runStart,runLength){this.runStart[this.stackSize]=runStart -this.runLength[this.stackSize]=runLength -this.stackSize+=1}, -mergeRuns:function(){while(this.stackSize > 1){var n=this.stackSize-2 -if((n >=1 && this.runLength[n-1]<= -this.runLength[n]+this.runLength[n+1])|| -(n >=2 && this.runLength[n-2]<= -this.runLength[n]+this.runLength[n-1])){if(this.runLength[n-1]< this.runLength[n+1]){n--}}else if(this.runLength[n]> this.runLength[n+1]){break} -this.mergeAt(n)}}, -forceMergeRuns:function(){while(this.stackSize > 1){var n=this.stackSize-2 -if(n > 0 && this.runLength[n-1]< this.runLength[n+1]){n--} -this.mergeAt(n)}}, -mergeAt:function(i){var compare=this.compare,array=this.array,start1=this.runStart[i],length1=this.runLength[i],start2=this.runStart[i+1],length2=this.runLength[i+1] -this.runLength[i]=length1+length2 -if(i===this.stackSize-3){this.runStart[i+1]=this.runStart[i+2] -this.runLength[i+1]=this.runLength[i+2]} -this.stackSize--; -var k=gallopRight(array[start2],array,start1,length1,0,compare) -start1+=k -length1-=k -if(length1===0){return} -length2=gallopLeft(array[start1+length1-1],array,start2,length2,length2-1,compare) -if(length2===0){return} -if(length1 <=length2){this.mergeLow(start1,length1,start2,length2)}else{this.mergeHigh(start1,length1,start2,length2)}}, -mergeLow:function(start1,length1,start2,length2){var compare=this.compare,array=this.array,tmp=this.tmp,i=0 -for(var i=0;i < length1;i++){tmp[i]=array[start1+i]} -var cursor1=0,cursor2=start2,dest=start1 -array[dest++]=array[cursor2++] -if(--length2===0){for(var i=0;i < length1;i++){array[dest+i]=tmp[cursor1+i]} -return} -if(length1===1){for(var i=0;i < length2;i++){array[dest+i]=array[cursor2+i]} -array[dest+length2]=tmp[cursor1] -return} -var minGallop=this.minGallop -while(true){var count1=0,count2=0,exit=false -do{if(compare(array[cursor2],tmp[cursor1])< 0){array[dest++]=array[cursor2++] -count2++ -count1=0 -if(--length2===0){exit=true -break}}else{array[dest++]=tmp[cursor1++] -count1++ -count2=0 -if(--length1===1){exit=true -break}}}while((count1 |count2)< minGallop) -if(exit){break} -do{ -count1=gallopRight(array[cursor2],tmp,cursor1,length1,0,compare) -if(count1 !==0){for(var i=0;i < count1;i++){array[dest+i]=tmp[cursor1+i]} -dest+=count1 -cursor1+=count1 -length1-=count1 -if(length1 <=1){exit=true -break}} -array[dest++]=array[cursor2++] -if(--length2===0){exit=true -break} -count2=gallopLeft(tmp[cursor1],array,cursor2,length2,0,compare) -if(count2 !==0){for(var i=0;i < count2;i++){array[dest+i]=array[cursor2+i]} -dest+=count2 -cursor2+=count2 -length2-=count2 -if(length2===0){exit=true -break}} -array[dest++]=tmp[cursor1++] -if(--length1===1){exit=true -break} -minGallop--;}while(count1 >=DEFAULT_MIN_GALLOPING || -count2 >=DEFAULT_MIN_GALLOPING); -if(exit){break} -if(minGallop < 0){minGallop=0} -minGallop+=2} -this.minGallop=minGallop -if(minGallop < 1){this.minGallop=1} -if(length1===1){for(var i=0;i < length2;i++){array[dest+i]=array[cursor2+i]} -array[dest+length2]=tmp[cursor1]}else if(length1===0){throw new TimSortAssertion('mergeLow preconditions were not respected')}else{for(var i=0;i < length1;i++){array[dest+i]=tmp[cursor1+i]}}}, -mergeHigh:function(start1,length1,start2,length2){var compare=this.compare,array=this.array,tmp=this.tmp,i=0 -for(var i=0;i < length2;i++){tmp[i]=array[start2+i]} -var cursor1=start1+length1-1,cursor2=length2-1,dest=start2+length2-1,customCursor=0,customDest=0 -array[dest--]=array[cursor1--] -if(--length1===0){customCursor=dest-(length2-1) -for(var i=0;i < length2;i++){array[customCursor+i]=tmp[i]} -return} -if(length2===1){dest-=length1 -cursor1-=length1 -customDest=dest+1 -customCursor=cursor1+1 -for(var i=length1-1;i >=0;i--){array[customDest+i]=array[customCursor+i]} -array[dest]=tmp[cursor2] -return} -var minGallop=this.minGallop -while(true){var count1=0,count2=0,exit=false -do{if(compare(tmp[cursor2],array[cursor1])< 0){array[dest--]=array[cursor1--] -count1++ -count2=0 -if(--length1===0){exit=true -break}}else{array[dest--]=tmp[cursor2--] -count2++ -count1=0 -if(--length2===1){exit=true -break}}}while((count1 |count2)< minGallop) -if(exit){break} -do{count1=length1-gallopRight(tmp[cursor2],array,start1,length1,length1-1,compare) -if(count1 !==0){dest-=count1 -cursor1-=count1 -length1-=count1 -customDest=dest+1 -customCursor=cursor1+1 -for(var i=count1-1;i >=0;i--){array[customDest+i]=array[customCursor+i]} -if(length1===0){exit=true -break}} -array[dest--]=tmp[cursor2--] -if(--length2===1){exit=true -break} -count2=length2-gallopLeft(array[cursor1],tmp,0,length2,length2-1,compare) -if(count2 !==0){dest-=count2 -cursor2-=count2 -length2-=count2 -customDest=dest+1 -customCursor=cursor2+1 -for(var i=0;i < count2;i++){array[customDest+i]=tmp[customCursor+i]} -if(length2 <=1){exit=true -break}} -array[dest--]=array[cursor1--] -if(--length1===0){exit=true -break} -minGallop--}while(count1 >=DEFAULT_MIN_GALLOPING || -count2 >=DEFAULT_MIN_GALLOPING) -if(exit){break} -if(minGallop < 0){minGallop=0} -minGallop+=2} -this.minGallop=minGallop -if(minGallop < 1){this.minGallop=1} -if(length2===1){dest-=length1 -cursor1-=length1 -customDest=dest+1 -customCursor=cursor1+1 -for(var i=length1-1;i >=0;i--){array[customDest+i]=array[customCursor+i]} -array[dest]=tmp[cursor2]}else if(length2==0){throw new TimSortAssertion("mergeHigh preconditions were not respected")}else{customCursor=dest-(length2-1) -for(var i=0;i < length2;i++){array[customCursor+i]=tmp[i]}}}} -if(self.length < 2*DEFAULT_TMP_STORAGE_LENGTH){self.tmpStorageLength=self.length >>> 1} -self.tmp=new Array(self.tmpStorageLength) -self.stackLength= -(self.length < 120 ? 5 : -self.length < 1542 ? 10 : -self.length < 119151 ? 19 :40) -self.runStart=new Array(self.stackLength) -self.runLength=new Array(self.stackLength) -return self} -function tim_sort(array,compare,lo,hi){if(!Array.isArray(array)){throw _b_.TypeError.$factory("Can only sort arrays")} -if(!compare){compare=alphabeticalCompare}else if(typeof compare !=="function"){hi=lo -lo=compare -compare=alphabeticalCompare} -if(!lo){lo=0} -if(!hi){hi=array.length} -var remaining=hi-lo -if(remaining < 2){return} -var runLength=0 -if(remaining < DEFAULT_MIN_MERGE){runLength=makeAscendingRun(array,lo,hi,compare) -binaryInsertionSort(array,lo,hi,lo+runLength,compare) -return} -var ts=new TimSort(array,compare) -var minRun=minRunLength(remaining) -do{runLength=makeAscendingRun(array,lo,hi,compare) -if(runLength < minRun){var force=remaining -if(force > minRun){force=minRun} -binaryInsertionSort(array,lo,lo+force,lo+runLength,compare) -runLength=force} -ts.pushRun(lo,runLength) -ts.mergeRuns() -remaining-=runLength -lo+=runLength}while(remaining !==0) -ts.forceMergeRuns()} -function tim_sort_safe(array,compare){ -try{ -tim_sort(array,compare,0,array.length)}catch(e){if(e.name==TIM_SORT_ASSERTION){array.sort(compare);}else{ -throw e;}}} -$B.$TimSort=tim_sort_safe -$B.$AlphabeticalCompare=alphabeticalCompare})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -$B.del_exc=function(frame){ -delete frame[1].$current_exception} -$B.set_exc=function(exc,frame){ -if(frame===undefined){var msg='Internal error: no frame for exception '+_b_.repr(exc) -console.error(['Traceback (most recent call last):',$B.print_stack(exc.$stack),msg].join('\n')) -if($B.get_option('debug',exc)> 1){console.log(exc.args) -console.log(exc.stack)} -throw Error(msg)}else{frame[1].$current_exception=$B.exception(exc)}} -$B.get_exc=function(){var frame=$B.last($B.frames_stack) -return frame[1].$current_exception} -$B.set_exception_offsets=function(exc,position){ -exc.$positions=exc.$positions ||{} -exc.$positions[$B.frames_stack.length-1]=position -return exc} -$B.$raise=function(arg,cause){ -var active_exc=$B.get_exc() -if(arg===undefined){if(active_exc !==undefined){throw active_exc} -throw _b_.RuntimeError.$factory("No active exception to reraise")}else{if(_b_.isinstance(arg,BaseException)){if(arg.__class__===_b_.StopIteration && -$B.last($B.frames_stack)[1].$is_generator){ -arg=_b_.RuntimeError.$factory("generator raised StopIteration")} -arg.__context__=active_exc===undefined ? _b_.None :active_exc -arg.__cause__=cause ||_b_.None -arg.__suppress_context__=cause !==undefined -throw arg}else if(arg.$is_class && _b_.issubclass(arg,BaseException)){if(arg===_b_.StopIteration){if($B.last($B.frames_stack)[1].$is_generator){ -throw _b_.RuntimeError.$factory("generator raised StopIteration")}} -var exc=$B.$call(arg)() -exc.__context__=active_exc===undefined ? _b_.None :active_exc -exc.__cause__=cause ||_b_.None -exc.__suppress_context__=cause !==undefined -throw exc}else{throw _b_.TypeError.$factory("exceptions must derive from BaseException")}}} -$B.print_stack=function(stack){ -stack=stack ||$B.frames_stack -var trace=[] -for(var frame of stack){var lineno=frame.$lineno,filename=frame.__file__ -if(lineno !==undefined){var local=frame[0]==frame[2]? "" :frame[0] -trace.push(` File "${filename}" line ${lineno}, in ${local}`) -var src=$B.file_cache[filename] -if(src){var lines=src.split("\n"),line=lines[lineno-1] -trace.push(" "+line.trim())}}} -return trace.join("\n")} -$B.last_frame=function(){var frame=$B.last($B.frames_stack) -return `file ${frame.__file__} line ${frame.$lineno}`} -var traceback=$B.traceback=$B.make_class("traceback",function(exc){var stack=exc.$stack ||$B.frames_stack.slice() -if(_b_.isinstance(exc,_b_.SyntaxError)){stack.pop()} -if(stack.length==0){return _b_.None} -return{ -__class__ :traceback,$stack:stack, -linenos:stack.map(x=> x.$lineno),pos:0}} -) -traceback.__getattribute__=function(_self,attr){switch(attr){case "tb_frame": -return _self.$stack[_self.pos] -case "tb_lineno": -return _self.linenos[_self.pos] -case "tb_lasti": -return-1 -case "tb_next": -if(_self.pos < _self.$stack.length-1){_self.pos++ -return _self}else{return _b_.None} -case "stack": -return _self.$stack -default: -return _b_.object.__getattribute__(_self,attr)}} -$B.set_func_names(traceback,"builtins") -var frame=$B.frame=$B.make_class("frame",function(frame_list){frame_list.__class__=frame -return frame_list} -) -frame.__delattr__=function(_self,attr){if(attr=="f_trace"){_self.$f_trace=_b_.None}} -frame.__dir__=function(_self){return _b_.object.__dir__(frame).concat(['clear','f_back','f_builtins','f_code','f_globals','f_lasti','f_lineno','f_locals','f_trace','f_trace_lines','f_trace_opcodes'])} -frame.__getattr__=function(_self,attr){ -if(attr=="f_back"){var pos=$B.frames_stack.indexOf(_self) -if(pos > 0){return frame.$factory($B.frames_stack[pos-1])}else{return _b_.None}}else if(attr=="clear"){return function(){}}else if(attr=="f_trace"){var locals=_self[1] -if(_self.$f_trace===undefined){return _b_.None} -return _self.$f_trace} -console.log('no attr',attr,'in frame object',_self) -alert() -throw $B.attr_error(attr,_self)} -frame.__setattr__=function(_self,attr,value){if(attr=="f_trace"){ -_self.$f_trace=value}} -frame.__str__=frame.__repr__=function(_self){return ''} -frame.f_builtins={__get__:function(_self){return $B.$getattr(_self[3].__builtins__,'__dict__')}} -frame.f_code={__get__:function(_self){var res -if(_self[4]){res=_self[4].$infos.__code__}else if(_self.f_code){ -res=_self.f_code}else{res={co_name:(_self[0]==_self[2]? '' :_self[0]),co_filename:_self.__file__,co_varnames:$B.fast_tuple([])} -res.co_qualname=res.co_name } -res.__class__=_b_.code -return res}} -frame.f_globals={__get__:function(_self){if(_self.f_globals){return _self.f_globals}else if(_self.f_locals && _self[1]==_self[3]){return _self.f_globals=_self.f_locals}else{return _self.f_globals=$B.obj_dict(_self[3])}}} -frame.f_lineno={__get__:function(_self){return _self.$lineno}} -frame.f_locals={__get__:function(_self){ -if(_self.f_locals){return _self.f_locals}else if(_self.f_globals && _self[1]==_self[3]){return _self.f_locals=_self.f_globals}else{return _self.f_locals=$B.obj_dict(_self[1])}}} -frame.f_trace={__get__:function(_self){return _self.$f_trace}} -$B.set_func_names(frame,"builtins") -$B._frame=frame -var BaseException=_b_.BaseException=$B.make_class('BaseException') -BaseException.__init__=function(self){var args=arguments[1]===undefined ?[]:[arguments[1]] -self.args=_b_.tuple.$factory(args)} -BaseException.__repr__=function(self){var res=self.__class__.__name__+'(' -if(self.args[0]!==undefined){res+=_b_.repr(self.args[0])} -if(self.args.length > 1){res+=', '+_b_.repr($B.fast_tuple(self.args.slice(1)))} -return res+')'} -BaseException.__str__=function(self){if(self.args.length > 0 && self.args[0]!==_b_.None){return _b_.str.$factory(self.args[0])} -return ''} -BaseException.__new__=function(cls){var err=_b_.BaseException.$factory() -err.__class__=cls -err.__dict__=$B.empty_dict() -return err} -BaseException.__getattr__=function(self,attr){if(attr=='__context__'){var frame=$B.last($B.frames_stack),ctx=frame[1].$current_exception -return ctx ||_b_.None}else{throw $B.attr_error(attr,self)}} -BaseException.add_note=function(self,note){ -if(! _b_.isinstance(note,_b_.str)){throw _b_.TypeError.$factory('note must be a str, not '+ -`'${$B.class_name(note)}'`)} -if(self.__notes__ !==undefined){self.__notes__.push(note)}else{self.__notes__=[note]}} -BaseException.with_traceback=function(_self,tb){_self.__traceback__=tb -return _self} -$B.deep_copy=function(stack){var res=[] -for(const s of stack){var item=[s[0],{},s[2],{}] -if(s[4]!==undefined){item.push(s[4])} -for(const i of[1,3]){for(var key in s[i]){item[i][key]=s[i][key]}} -res.push(item)} -return res} -$B.save_stack=function(){return $B.deep_copy($B.frames_stack)} -$B.restore_stack=function(stack,locals){$B.frames_stack=stack -$B.frames_stack[$B.frames_stack.length-1][1]=locals} -$B.freeze=function(err){if(err.$stack===undefined){err.$stack=$B.frames_stack.slice() -err.$linenos=$B.frames_stack.map(x=> x.$lineno)} -err.__traceback__=traceback.$factory(err)} -var show_stack=$B.show_stack=function(stack){stack=stack ||$B.frames_stack -for(const frame of stack){console.log(frame[2],frame[0],frame.$lineno)}} -var be_factory=` - var _b_ = __BRYTHON__.builtins - var err = Error() - err.args = $B.fast_tuple(Array.from(arguments)) - err.__class__ = _b_.BaseException - err.__traceback__ = _b_.None - err.$py_error = true - err.$stack = $B.frames_stack.slice() - err.$linenos = $B.frames_stack.map(x => x.$lineno) - // placeholder - err.__cause__ = _b_.None // XXX fix me - err.__context__ = _b_.None // XXX fix me - err.__suppress_context__ = false // XXX fix me - return err -` -BaseException.$factory=Function(be_factory) -BaseException.$factory.$infos={__name__:"BaseException",__qualname__:"BaseException"} -$B.set_func_names(BaseException) -_b_.BaseException=BaseException -$B.exception=function(js_exc,in_ctx_manager){ -if(! js_exc.__class__){if(js_exc.$py_exc){ -return js_exc.$py_exc} -var exc=_b_.JavascriptError.$factory((js_exc.__name__ ||js_exc.name)) -exc.$js_exc=js_exc -if($B.is_recursion_error(js_exc)){return _b_.RecursionError.$factory("too much recursion")} -exc.__cause__=_b_.None -exc.__context__=_b_.None -exc.__suppress_context__=false -var $message=(js_exc.message ||"<"+js_exc+">") -exc.args=_b_.tuple.$factory([$message]) -exc.$py_error=true -js_exc.$py_exc=exc -$B.freeze(exc)}else{var exc=js_exc -$B.freeze(exc)} -return exc} -$B.is_exc=function(exc,exc_list){ -if(exc.__class__===undefined){exc=$B.exception(exc)} -var this_exc_class=exc.$is_class ? exc :exc.__class__ -for(var i=0;i < exc_list.length;i++){var exc_class=exc_list[i] -if(this_exc_class===undefined){console.log("exc class undefined",exc)} -if(_b_.issubclass(this_exc_class,exc_class)){return true}} -return false} -$B.is_recursion_error=function(js_exc){ -var msg=js_exc+"",parts=msg.split(":"),err_type=parts[0].trim(),err_msg=parts[1].trim() -return(err_type=='InternalError' && err_msg=='too much recursion')|| -(err_type=='Error' && err_msg=='Out of stack space')|| -(err_type=='RangeError' && err_msg=='Maximum call stack size exceeded')} -var $make_exc=$B.$make_exc=function(names,parent){ -var _str=[],pos=0 -for(var name of names){var code="" -if(Array.isArray(name)){ -var code=name[1],name=name[0]} -$B.builtins_scope[name]=true -var $exc=be_factory.replace(/BaseException/g,name) -$exc=$exc.replace("// placeholder",code) -_b_[name]={__class__:_b_.type,__bases__:[_b_[parent.__name__]],__name__:name,__qualname__:name,__mro__:[_b_[parent.__name__]].concat(parent.__mro__),$is_class:true} -_b_[name].$factory=Function($exc) -_b_[name].$factory.$infos={__name__:name,__qualname__:name} -$B.set_func_names(_b_[name],'builtins')}} -$make_exc(["SystemExit","KeyboardInterrupt","GeneratorExit","Exception"],BaseException) -$make_exc(["JavascriptError"],_b_.Exception) -var js_errors={'Error':_b_.JavascriptError} -$make_exc([["StopIteration","err.value = arguments[0] || _b_.None"],["StopAsyncIteration","err.value = arguments[0]"],"ArithmeticError","AssertionError","BufferError","EOFError",["ImportError","err.name = arguments[0]"],"LookupError","MemoryError","OSError","ReferenceError","RuntimeError",["SyntaxError","err.msg = arguments[0]"],"SystemError","TypeError","ValueError","Warning"],_b_.Exception) -$make_exc(["FloatingPointError","OverflowError","ZeroDivisionError"],_b_.ArithmeticError) -$make_exc([["ModuleNotFoundError","err.name = arguments[0]"]],_b_.ImportError) -$make_exc(["IndexError","KeyError"],_b_.LookupError) -$make_exc(["BlockingIOError","ChildProcessError","ConnectionError","FileExistsError","FileNotFoundError","InterruptedError","IsADirectoryError","NotADirectoryError","PermissionError","ProcessLookupError","TimeoutError"],_b_.OSError) -$make_exc(["BrokenPipeError","ConnectionAbortedError","ConnectionRefusedError","ConnectionResetError"],_b_.ConnectionError) -$make_exc(["NotImplementedError","RecursionError"],_b_.RuntimeError) -$make_exc([["IndentationError","err.msg = arguments[0]"]],_b_.SyntaxError) -$make_exc(["TabError"],_b_.IndentationError) -$make_exc(["UnicodeError"],_b_.ValueError) -$make_exc(["UnicodeDecodeError","UnicodeEncodeError","UnicodeTranslateError"],_b_.UnicodeError) -$make_exc(["DeprecationWarning","PendingDeprecationWarning","RuntimeWarning","SyntaxWarning","UserWarning","FutureWarning","ImportWarning","UnicodeWarning","BytesWarning","ResourceWarning","EncodingWarning"],_b_.Warning) -$make_exc(["EnvironmentError","IOError","VMSError","WindowsError"],_b_.OSError) -var js='\nvar $ = $B.args("AttributeError", 3, {"msg": null, "name":null, "obj":null}, '+ -'["msg", "name", "obj"], arguments, '+ -'{msg: _b_.None, name: _b_.None, obj: _b_.None}, "*", null);\n'+ -'err.args = $B.fast_tuple($.msg === _b_.None ? [] : [$.msg])\n;'+ -'err.name = $.name\nerr.obj = $.obj\n' -$make_exc([["AttributeError",js]],_b_.Exception) -_b_.AttributeError.__str__=function(self){return self.args[0]} -$B.set_func_names(_b_.AttributeError,'builtins') -$B.attr_error=function(name,obj){if(obj.$is_class){var msg=`type object '${obj.__name__}'`}else{var msg=`'${$B.class_name(obj)}' object`} -msg+=` has no attribute '${name}'` -return _b_.AttributeError.$factory({$kw:[{name,obj,msg}]})} -var js='\nvar $ = $B.args("NameError", 2, {"message":null, "name": null}, '+ -'["message", "name"], arguments, '+ -'{message: _b_.None, name: _b_.None}, "*", null, 1);\n'+ -'err.args = $B.fast_tuple($.message === _b_.None ? [] : [$.message])\n'+ -'err.name = $.name;\n' -$make_exc([["NameError",js]],_b_.Exception) -_b_.NameError.__str__=function(self){return self.args[0]} -$B.set_func_names(_b_.NameError,'builtins') -$make_exc(["UnboundLocalError"],_b_.NameError) -_b_.UnboundLocalError.__str__=function(self){return self.args[0]} -$B.set_func_names(_b_.UnboundLocalError,'builtins') -$B.name_error=function(name){var exc=_b_.NameError.$factory(`name '${name}' is not defined`) -exc.name=name -exc.$stack=$B.frames_stack.slice() -return exc} -$B.recursion_error=function(frame){var exc=_b_.RecursionError.$factory("maximum recursion depth exceeded") -$B.set_exc(exc,frame) -return exc} -var MAX_CANDIDATE_ITEMS=750,MAX_STRING_SIZE=40,MOVE_COST=2,CASE_COST=1,SIZE_MAX=65535 -function LEAST_FIVE_BITS(n){return((n)& 31)} -function levenshtein_distance(a,b,max_cost){ -if(a==b){return 0} -if(a.length < b.length){[a,b]=[b,a]} -while(a.length && a[0]==b[0]){a=a.substr(1) -b=b.substr(1)} -while(a.length && a[a.length-1]==b[b.length-1]){a=a.substr(0,a.length-1) -b=b.substr(0,b.length-1)} -if(b.length==0){return a.length*MOVE_COST} -if((b.length-a.length)*MOVE_COST > max_cost){return max_cost+1} -var buffer=[] -for(var i=0;i < a.length;i++){ -buffer[i]=(i+1)*MOVE_COST} -var result=0 -for(var b_index=0;b_index < b.length;b_index++){var code=b[b_index] -var distance=result=b_index*MOVE_COST; -var minimum=SIZE_MAX; -for(var index=0;index < a.length;index++){ -var substitute=distance+substitution_cost(code,a[index]) -distance=buffer[index] -var insert_delete=Math.min(result,distance)+MOVE_COST -result=Math.min(insert_delete,substitute) -buffer[index]=result -if(result < minimum){minimum=result}} -if(minimum > max_cost){ -return max_cost+1}} -return result} -function substitution_cost(a,b){if(LEAST_FIVE_BITS(a)!=LEAST_FIVE_BITS(b)){ -return MOVE_COST} -if(a==b){return 0} -if(a.toLowerCase()==b.toLowerCase()){return CASE_COST} -return MOVE_COST} -function calculate_suggestions(dir,name){if(dir.length >=MAX_CANDIDATE_ITEMS){return null} -var suggestion_distance=2**52,suggestion=null -for(var item of dir){ -var max_distance=(name.length+item.length+3)*MOVE_COST/6 -max_distance=Math.min(max_distance,suggestion_distance-1) -var current_distance= -levenshtein_distance(name,item,max_distance) -if(current_distance > max_distance){continue} -if(!suggestion ||current_distance < suggestion_distance){suggestion=item -suggestion_distance=current_distance}} -return suggestion} -$B.offer_suggestions_for_attribute_error=function(exc){var name=exc.name,obj=exc.obj -var dir=_b_.dir(obj),suggestions=calculate_suggestions(dir,name) -return suggestions ||_b_.None} -$B.offer_suggestions_for_name_error=function(exc,frame){var name=exc.name,frame=frame ||$B.last(exc.$stack) -if(typeof name !='string'){return _b_.None} -var locals=Object.keys(frame[1]).filter(x=> !(x.startsWith('$'))) -var suggestion=calculate_suggestions(locals,name) -if(suggestion){return suggestion} -if(frame[2]!=frame[0]){var globals=Object.keys(frame[3]).filter(x=> !(x.startsWith('$'))) -var suggestion=calculate_suggestions(globals,name) -if(suggestion){return suggestion}} -if(frame[4]&& frame[4].$is_method){ -var instance_name=frame[4].$infos.__code__.co_varnames[0],instance=frame[1][instance_name] -if(_b_.hasattr(instance,name)){return `self.${name}`}} -return _b_.None} -var exc_group_code= -'\nvar missing = {},\n'+ -' $ = $B.args("[[name]]", 2, {message: null, exceptions: null}, '+ -"['message', 'exceptions'], arguments, {exceptions: missing}, "+ -'null, null)\n'+ -'err.message = $.message\n'+ -'err.exceptions = $.exceptions === missing ? [] : $.exceptions\n' -var js=exc_group_code.replace('[[name]]','BaseExceptionGroup') -js+=`if(err.exceptions !== _b_.None){ - var exc_list = _b_.list.$factory(err.exceptions) - var all_exceptions = true - for(var exc of exc_list){ - if(! _b_.isinstance(exc, _b_.Exception)){ - all_exceptions = false - break - } - } - if(all_exceptions){ - err.__class__ = _b_.ExceptionGroup - }} -` -$make_exc([['BaseExceptionGroup',js]],_b_.BaseException) -_b_.BaseExceptionGroup.__str__=function(self){return `${self.message} (${self.exceptions.length} sub-exception`+ -`${self.exceptions.length > 1 ? 's' : ''})`} -_b_.BaseExceptionGroup.split=function(self,condition){ -var matching_excs=[],non_matching_excs=[] -for(var exc of self.exceptions){if(_b_.isinstance(exc,_b_.BaseExceptionGroup)){var subsplit=_b_.BaseExceptionGroup.split(exc,condition),matching=subsplit[0],non_matching=subsplit[1] -if(matching===_b_.None){non_matching_excs.push(exc)}else if(matching.exceptions.length==exc.exceptions.length){matching_excs.push(exc)}else{if(matching.exceptions.length > 0){matching_excs=matching_excs.concat(matching)} -if(non_matching.exceptions.length > 0){non_matching_excs=non_matching_excs.concat(non_matching)}}}else if(condition(exc)){matching_excs.push(exc)}else{non_matching_excs.push(exc)}} -if(matching_excs.length==0){matching_excs=_b_.None} -if(non_matching_excs.length==0){non_matching_excs=_b_.None} -var res=[] -for(var item of[matching_excs,non_matching_excs]){var eg=_b_.BaseExceptionGroup.$factory(self.message,item) -eg.__cause__=self.__cause__ -eg.__context__=self.__context__ -eg.__traceback__=self.__traceback__ -res.push(eg)} -return $B.fast_tuple(res)} -_b_.BaseExceptionGroup.subgroup=function(self,condition){return _b_.BaseExceptionGroup.split(self,condition)[0]} -$B.set_func_names(_b_.BaseExceptionGroup,"builtins") -var js=exc_group_code.replace('[[name]]','ExceptionGroup') -js+=`if(err.exceptions !== _b_.None){ - var exc_list = _b_.list.$factory(err.exceptions) - for(var exc of exc_list){ - if(! _b_.isinstance(exc, _b_.Exception)){ - throw _b_.TypeError.$factory( - 'Cannot nest BaseExceptions in an ExceptionGroup') - } - }} -` -$make_exc([['ExceptionGroup',js]],_b_.Exception) -_b_.ExceptionGroup.__bases__.splice(0,0,_b_.BaseExceptionGroup) -_b_.ExceptionGroup.__mro__.splice(0,0,_b_.BaseExceptionGroup) -$B.set_func_names(_b_.ExceptionGroup,"builtins") -function trace_from_stack(err){function handle_repeats(src,count_repeats){if(count_repeats > 0){var len=trace.length -for(var i=0;i < 2;i++){if(src){trace.push(trace[len-2]) -trace.push(trace[len-1])}else{trace.push(trace[len-1])} -count_repeats-- -if(count_repeats==0){break}} -if(count_repeats > 0){trace.push(`[Previous line repeated ${count_repeats} more`+ -` time${count_repeats > 1 ? 's' : ''}]`)}}} -var trace=[],save_filename,save_lineno,save_scope,count_repeats=0 -for(var frame_num=0,len=err.$stack.length;frame_num < len;frame_num++){var frame=err.$stack[frame_num],lineno=err.$linenos[frame_num],filename=frame.__file__,scope=frame[0]==frame[2]? '' :frame[0] -if(filename==save_filename && scope==save_scope && lineno==save_lineno){count_repeats++ -continue} -handle_repeats(src,count_repeats) -save_filename=filename -save_lineno=lineno -save_scope=scope -count_repeats=0 -var src=$B.file_cache[filename] -trace.push(` File "${filename}", line ${lineno}, in `+ -(frame[0]==frame[2]? '' :frame[0])) -if(src){var lines=src.split('\n'),line=lines[lineno-1] -if(line){trace.push(' '+line.trim())}else{console.log('no line',line)} -if(err.$positions !==undefined){var position=err.$positions[frame_num],trace_line='' -if(position &&( -(position[1]!=position[0]|| -(position[2]-position[1])!=line.trim().length || -position[3]))){var indent=line.length-line.trimLeft().length -var paddings=[position[0]-indent,position[1]-position[0],position[2]-position[1]] -for(var padding in paddings){if(padding < 0){console.log('wrong values, position',position,'indent',indent) -paddings[paddings.indexOf(padding)]=0}} -trace_line+=' '+' '.repeat(paddings[0])+ -'~'.repeat(paddings[1])+ -'^'.repeat(paddings[2]) -if(position[3]!==undefined){trace_line+='~'.repeat(position[3]-position[2])} -trace.push(trace_line)}}}else{console.log('no src for filename',filename) -console.log('in file_cache',Object.keys($B.file_cache).join('\n'))}} -if(count_repeats > 0){var len=trace.length -for(var i=0;i < 2;i++){if(src){trace.push(trace[len-2]) -trace.push(trace[len-1])}else{trace.push(trace[len-1])}} -trace.push(`[Previous line repeated ${count_repeats - 2} more times]`)} -return trace.join('\n')+'\n'} -$B.error_trace=function(err){if($B.get_option('debug',err)> 1){console.log("handle error",err.__class__,err.args) -console.log('stack',err.$stack) -console.log(err.stack)} -var trace='' -if(err.$stack && err.$stack.length > 0){trace='Traceback (most recent call last):\n'} -if(err.__class__===_b_.SyntaxError || -err.__class__===_b_.IndentationError){err.$stack.pop() -trace+=trace_from_stack(err) -var filename=err.filename,line=err.text,indent=line.length-line.trimLeft().length -trace+=` File "${filename}", line ${err.args[1][1]}\n`+ -` ${line.trim()}\n` -if(err.__class__ !==_b_.IndentationError && -err.text){ -if($B.get_option('debug',err)> 1){console.log('error args',err.args[1]) -console.log('err line',line) -console.log('indent',indent)} -var start=err.offset-indent,end_offset=err.end_offset+ -(err.end_offset==err.offset ? 1 :0) -marks=' '+' '.repeat(start),nb_marks=1 -if(err.end_lineno){if(err.end_lineno > err.lineno){nb_marks=line.length-start-indent}else{nb_marks=end_offset-start-indent} -if(nb_marks==0 && -err.end_offset==line.substr(indent).length){nb_marks=1}} -marks+='^'.repeat(nb_marks)+'\n' -trace+=marks} -trace+=`${err.__class__.__name__}: ${err.args[0]}`}else if(err.__class__ !==undefined){var name=$B.class_name(err) -trace+=trace_from_stack(err) -var args_str=_b_.str.$factory(err) -trace+=name+(args_str ? ': '+args_str :'') -if(err.__class__===_b_.NameError){var suggestion=$B.offer_suggestions_for_name_error(err) -if(suggestion){trace+=`. Did you mean '${suggestion}'?`} -if($B.stdlib_module_names.indexOf(err.name)>-1){ -trace+=`. Did you forget to import '${err.name}'?`}}else if(err.__class__===_b_.AttributeError){var suggestion=$B.offer_suggestions_for_attribute_error(err) -if(suggestion){trace+=`. Did you mean: '${suggestion}'?`}}else if(err.__class__===_b_.ImportError){if(err.$suggestion){trace+=`. Did you mean: '${err.$suggestion}'?`}}}else{trace=err+""} -if(err.$js_exc){trace+='\n\nJavascript error\n'+err.$js_exc+ -'\n'+err.$js_exc.stack} -return trace} -$B.get_stderr=function(){if($B.imported.sys){return $B.imported.sys.stderr} -return $B.imported._sys.stderr} -$B.get_stdout=function(){if($B.imported.sys){return $B.imported.sys.stdout} -return $B.imported._sys.stdout} -$B.show_error=function(err){var trace=$B.error_trace(err) -try{var stderr=$B.get_stderr() -$B.$getattr(stderr,'write')(trace) -var flush=$B.$getattr(stderr,'flush',_b_.None) -if(flush !==_b_.None){flush()}}catch(print_exc_err){console.debug(trace)}} -$B.handle_error=function(err){ -if(err.$handled){return} -err.$handled=true -$B.show_error(err) -throw err}})(__BRYTHON__) -; - -;(function($B){var _b_=$B.builtins,None=_b_.None,range={__class__:_b_.type,__mro__:[_b_.object],__qualname__:'range',$is_class:true,$native:true,$match_sequence_pattern:true, -$not_basetype:true, -$descriptors:{start:true,step:true,stop:true}} -range.__contains__=function(self,other){if(range.__len__(self)==0){return false} -try{other=$B.int_or_bool(other)}catch(err){ -try{range.index(self,other) -return true}catch(err){return false}} -var start=_b_.int.$to_bigint(self.start),stop=_b_.int.$to_bigint(self.stop),step=_b_.int.$to_bigint(self.step),other=_b_.int.$to_bigint(other) -var sub=other-start,fl=sub/step,res=step*fl -if(res==sub){if(stop > start){return other >=start && stop > other}else{return start >=other && other > stop}}else{return false}} -range.__delattr__=function(self,attr,value){throw _b_.AttributeError.$factory("readonly attribute")} -range.__eq__=function(self,other){if(_b_.isinstance(other,range)){var len=range.__len__(self) -if(! $B.rich_comp('__eq__',len,range.__len__(other))){return false} -if(len==0){return true} -if(! $B.rich_comp('__eq__',self.start,other.start)){return false} -if(len==1){return true} -return $B.rich_comp('__eq__',self.step,other.step)} -return false} -function compute_item(r,i){var len=range.__len__(r) -if(len==0){return r.start}else if(i > len){return r.stop} -return $B.rich_op('__add__',r.start,$B.rich_op('__mul__',r.step,i))} -range.__getitem__=function(self,rank){if(_b_.isinstance(rank,_b_.slice)){var norm=_b_.slice.$conv_for_seq(rank,range.__len__(self)),substep=$B.rich_op('__mul__',self.step,norm.step),substart=compute_item(self,norm.start),substop=compute_item(self,norm.stop) -return range.$factory(substart,substop,substep)} -if(typeof rank !="number"){rank=$B.$GetInt(rank)} -if($B.rich_comp('__gt__',0,rank)){rank=$B.rich_op('__add__',rank,range.__len__(self))} -var res=$B.rich_op('__add__',self.start,$B.rich_op('__mul__',rank,self.step)) -if(($B.rich_comp('__gt__',self.step,0)&& -($B.rich_comp('__ge__',res,self.stop)|| -$B.rich_comp('__gt__',self.start,res)))|| -($B.rich_comp('__gt__',0,self.step)&& -($B.rich_comp('__ge__',self.stop,res)|| -$B.rich_comp('__gt__',res,self.start)))){throw _b_.IndexError.$factory("range object index out of range")} -return res} -range.__hash__=function(self){var len=range.__len__(self) -if(len==0){return _b_.hash(_b_.tuple.$factory([0,None,None]))} -if(len==1){return _b_.hash(_b_.tuple.$factory([1,self.start,None]))} -return _b_.hash(_b_.tuple.$factory([len,self.start,self.step]))} -var RangeIterator=$B.make_class("range_iterator",function(obj){return{__class__:RangeIterator,obj:obj}} -) -RangeIterator.__iter__=function(self){return self} -RangeIterator.__next__=function(self){return _b_.next(self.obj)} -$B.set_func_names(RangeIterator,"builtins") -range.__iter__=function(self){var res={__class__ :range,start:self.start,stop:self.stop,step:self.step} -if(self.$safe){res.$counter=self.start-self.step}else{res.$counter=$B.rich_op('__sub__',self.start,self.step)} -return RangeIterator.$factory(res)} -range.__len__=function(self){var len,start=_b_.int.$to_bigint(self.start),stop=_b_.int.$to_bigint(self.stop),step=_b_.int.$to_bigint(self.step) -if(self.step > 0){if(self.start >=self.stop){return 0} -len=1n+(stop-start-1n)/step}else{if(self.stop >=self.start){return 0} -len=1n+(start-stop-1n)/-step} -return _b_.int.$int_or_long(len)} -range.__next__=function(self){if(self.$safe){self.$counter+=self.step -if((self.step > 0 && self.$counter >=self.stop) -||(self.step < 0 && self.$counter <=self.stop)){throw _b_.StopIteration.$factory("")}}else{self.$counter=$B.rich_op('__add__',self.$counter,self.step) -if(($B.rich_comp('__gt__',self.step,0)&& $B.rich_comp('__ge__',self.$counter,self.stop)) -||($B.rich_comp('__gt__',0,self.step)&& $B.rich_comp('__ge__',self.stop,self.$counter))){throw _b_.StopIteration.$factory("")}} -return self.$counter} -range.__reversed__=function(self){var n=$B.rich_op('__sub__',range.__len__(self),1) -return range.$factory($B.rich_op('__add__',self.start,$B.rich_op('__mul__',n,self.step)),$B.rich_op('__sub__',self.start,self.step),$B.rich_op('__mul__',-1,self.step))} -range.__repr__=function(self){$B.builtins_repr_check(range,arguments) -var res="range("+_b_.str.$factory(self.start)+", "+ -_b_.str.$factory(self.stop) -if(self.step !=1){res+=", "+_b_.str.$factory(self.step)} -return res+")"} -range.__setattr__=function(self,attr,value){throw _b_.AttributeError.$factory("readonly attribute")} -range.start=function(self){return self.start} -range.step=function(self){return self.step},range.stop=function(self){return self.stop} -range.count=function(self,ob){if(_b_.isinstance(ob,[_b_.int,_b_.float,_b_.bool])){return _b_.int.$factory(range.__contains__(self,ob))}else{var comp=function(other){return $B.rich_comp("__eq__",ob,other)},it=range.__iter__(self),_next=RangeIterator.__next__,nb=0 -while(true){try{if(comp(_next(it))){nb++}}catch(err){if(_b_.isinstance(err,_b_.StopIteration)){return nb} -throw err}}}} -range.index=function(self,other){var $=$B.args("index",2,{self:null,other:null},["self","other"],arguments,{},null,null),self=$.self,other=$.other -try{other=$B.int_or_bool(other)}catch(err){var comp=function(x){return $B.rich_comp("__eq__",other,x)},it=range.__iter__(self),_next=RangeIterator.__next__,nb=0 -while(true){try{if(comp(_next(it))){return nb} -nb++}catch(err){if(_b_.isinstance(err,_b_.StopIteration)){throw _b_.ValueError.$factory(_b_.str.$factory(other)+ -" not in range")} -throw err}}} -var sub=$B.rich_op('__sub__',other,self.start),fl=$B.rich_op('__floordiv__',sub,self.step),res=$B.rich_op('__mul__',self.step,fl) -if($B.rich_comp('__eq__',res,sub)){if(($B.rich_comp('__gt__',self.stop,self.start)&& -$B.rich_comp('__ge__',other,self.start)&& -$B.rich_comp('__gt__',self.stop,other))|| -($B.rich_comp('__ge__',self.start,self.stop)&& -$B.rich_comp('__ge__',self.start,other) -&& $B.rich_comp('__gt__',other,self.stop))){return fl}else{throw _b_.ValueError.$factory(_b_.str.$factory(other)+ -' not in range')}}else{throw _b_.ValueError.$factory(_b_.str.$factory(other)+ -" not in range")}} -range.$factory=function(){var $=$B.args("range",3,{start:null,stop:null,step:null},["start","stop","step"],arguments,{start:null,stop:null,step:null},null,null),start=$.start,stop=$.stop,step=$.step,safe -if(stop===null && step===null){if(start==null){throw _b_.TypeError.$factory("range expected 1 arguments, got 0")} -stop=$B.PyNumber_Index(start) -safe=typeof stop==="number" -return{__class__:range,start:0,stop:stop,step:1,$is_range:true,$safe:safe}} -if(step===null){step=1} -start=$B.PyNumber_Index(start) -stop=$B.PyNumber_Index(stop) -step=$B.PyNumber_Index(step) -if(step==0){throw _b_.ValueError.$factory("range arg 3 must not be zero")} -safe=(typeof start=="number" && typeof stop=="number" && -typeof step=="number") -return{__class__:range,start:start,stop:stop,step:step,$is_range:true,$safe:safe}} -$B.set_func_names(range,"builtins") -var slice={__class__:_b_.type,__mro__:[_b_.object],__qualname__:'slice',$is_class:true,$native:true,$not_basetype:true, -$descriptors:{start:true,step:true,stop:true}} -slice.__eq__=function(self,other){var conv1=conv_slice(self),conv2=conv_slice(other) -return conv1[0]==conv2[0]&& -conv1[1]==conv2[1]&& -conv1[2]==conv2[2]} -slice.__repr__=function(self){$B.builtins_repr_check(slice,arguments) -return "slice("+_b_.str.$factory(self.start)+", "+ -_b_.str.$factory(self.stop)+", "+_b_.str.$factory(self.step)+")"} -slice.__setattr__=function(self,attr,value){throw _b_.AttributeError.$factory("readonly attribute")} -function conv_slice(self){var attrs=["start","stop","step"],res=[] -for(var i=0;i < attrs.length;i++){var val=self[attrs[i]] -if(val===_b_.None){res.push(val)}else{try{res.push($B.PyNumber_Index(val))}catch(err){throw _b_.TypeError.$factory("slice indices must be "+ -"integers or None or have an __index__ method")}}} -return res} -slice.$conv_for_seq=function(self,len){ -var step=self.step===None ? 1 :$B.PyNumber_Index(self.step),step_is_neg=$B.rich_comp('__gt__',0,step),len_1=$B.rich_op('__sub__',len,1) -if(step==0){throw _b_.ValueError.$factory('slice step cannot be zero')} -var start -if(self.start===None){start=step_is_neg ? len_1 :0}else{start=$B.PyNumber_Index(self.start) -if($B.rich_comp('__gt__',0,start)){start=$B.rich_op('__add__',start,len) -if($B.rich_comp('__gt__',0,start)){start=0}} -if($B.rich_comp('__ge__',start,len)){start=step < 0 ? len_1 :len}} -if(self.stop===None){stop=step_is_neg ?-1 :len}else{stop=$B.PyNumber_Index(self.stop) -if($B.rich_comp('__gt__',0,stop)){stop=$B.rich_op('__add__',stop,len)} -if($B.rich_comp('__ge__',stop,len)){stop=step_is_neg ? len_1 :len}} -return{start:start,stop:stop,step:step}} -slice.start=function(self){return self.start} -slice.step=function(self){return self.step} -slice.stop=function(self){return self.stop} -slice.indices=function(self,length){ -var $=$B.args("indices",2,{self:null,length:null},["self","length"],arguments,{},null,null) -var len=$B.$GetInt($.length) -if(len < 0){_b_.ValueError.$factory("length should not be negative")} -var _step=(self.step==_b_.None)? 1 :self.step -if(_step < 0){var _start=self.start,_stop=self.stop -_start=(_start==_b_.None)? len-1 : -(_start < 0)? _b_.max(-1,_start+len):_b_.min(len-1,self.start) -_stop=(self.stop==_b_.None)?-1 : -(_stop < 0)? _b_.max(-1,_stop+len):_b_.min(len-1,self.stop)}else{var _start=(self.start==_b_.None)? 0 :_b_.min(len,self.start) -var _stop=(self.stop==_b_.None)? len :_b_.min(len,self.stop) -if(_start < 0){_start=_b_.max(0,_start+len)} -if(_stop < 0){_stop=_b_.max(0,_stop+len)}} -return _b_.tuple.$factory([_start,_stop,_step])} -slice.$fast_slice=function(start,stop,step){return{__class__:_b_.slice,start,stop,step}} -slice.$factory=function(){var $=$B.args("slice",3,{start:null,stop:null,step:null},["start","stop","step"],arguments,{stop:null,step:null},null,null) -return slice.$fast_slice($.start,$.stop,$.step)} -slice.$fast_slice=function(start,stop,step){if(stop===null && step===null){stop=start -start=_b_.None -step=_b_.None}else{step=step===null ? _b_.None :step} -var res={__class__ :slice,start:start,stop:stop,step:step} -conv_slice(res) -return res} -$B.set_func_names(slice,"builtins") -_b_.range=range -_b_.slice=slice})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -var from_unicode={},to_unicode={} -function bytes_value(obj){return obj.__class__===bytes ? obj :fast_bytes(obj.source)} -$B.to_bytes=function(obj){var res -if(_b_.isinstance(obj,[bytes,bytearray])){res=obj.source}else{var ga=$B.$getattr(obj,"tobytes",null) -if(ga !==null){res=$B.$call(ga)().source}else{throw _b_.TypeError.$factory("object doesn't support the buffer protocol")}} -return res} -function _strip(self,cars,lr){if(cars===undefined){cars=[] -var ws='\r\n \t' -for(var i=0,len=ws.length;i < len;i++){cars.push(ws.charCodeAt(i))}}else if(_b_.isinstance(cars,bytes)){cars=cars.source}else{throw _b_.TypeError.$factory("Type str doesn't support the buffer API")} -if(lr=='l'){for(var i=0,len=self.source.length;i < len;i++){if(cars.indexOf(self.source[i])==-1){break}} -return bytes.$factory(self.source.slice(i))} -for(var i=self.source.length-1;i >=0;i--){if(cars.indexOf(self.source[i])==-1){break}} -return bytes.$factory(self.source.slice(0,i+1))} -function invalid(other){return ! _b_.isinstance(other,[bytes,bytearray])} -var bytearray={__class__:_b_.type,__mro__:[_b_.object],__qualname__:'bytearray',$buffer_protocol:true,$is_class:true} -var mutable_methods=["__delitem__","clear","copy","count","index","pop","remove","reverse"] -mutable_methods.forEach(function(method){bytearray[method]=(function(m){return function(self){var args=[self.source],pos=1 -for(var i=1,len=arguments.length;i < len;i++){args[pos++]=arguments[i]} -return _b_.list[m].apply(null,args)}})(method)}) -bytearray.__hash__=_b_.None -var bytearray_iterator=$B.make_iterator_class('bytearray_iterator') -bytearray.__iter__=function(self){return bytearray_iterator.$factory(self.source)} -bytearray.__mro__=[_b_.object] -bytearray.__repr__=bytearray.__str__=function(self){return 'bytearray('+bytes.__repr__(self)+")"} -bytearray.__setitem__=function(self,arg,value){if(_b_.isinstance(arg,_b_.int)){if(! _b_.isinstance(value,_b_.int)){throw _b_.TypeError.$factory('an integer is required')}else if(value > 255){throw _b_.ValueError.$factory("byte must be in range(0, 256)")} -var pos=arg -if(arg < 0){pos=self.source.length+pos} -if(pos >=0 && pos < self.source.length){self.source[pos]=value} -else{throw _b_.IndexError.$factory('list index out of range')}}else if(_b_.isinstance(arg,_b_.slice)){var start=arg.start===_b_.None ? 0 :arg.start -var stop=arg.stop===_b_.None ? self.source.length :arg.stop -if(start < 0){start=self.source.length+start} -if(stop < 0){stop=self.source.length+stop} -self.source.splice(start,stop-start) -try{var $temp=_b_.list.$factory(value) -for(var i=$temp.length-1;i >=0;i--){if(! _b_.isinstance($temp[i],_b_.int)){throw _b_.TypeError.$factory('an integer is required')}else if($temp[i]> 255){throw _b_.ValueError.$factory("byte must be in range(0, 256)")} -self.source.splice(start,0,$temp[i])}}catch(err){throw _b_.TypeError.$factory("can only assign an iterable")}}else{throw _b_.TypeError.$factory('list indices must be integer, not '+ -$B.class_name(arg))}} -bytearray.append=function(self,b){if(arguments.length !=2){throw _b_.TypeError.$factory( -"append takes exactly one argument ("+(arguments.length-1)+ -" given)")} -if(! _b_.isinstance(b,_b_.int)){throw _b_.TypeError.$factory("an integer is required")} -if(b > 255){throw _b_.ValueError.$factory("byte must be in range(0, 256)")} -self.source[self.source.length]=b} -bytearray.extend=function(self,b){if(self.in_iteration){ -throw _b_.BufferError.$factory("Existing exports of data: object "+ -"cannot be re-sized")} -if(b.__class__===bytearray ||b.__class__===bytes){b.source.forEach(function(item){self.source.push(item)}) -return _b_.None} -var it=_b_.iter(b) -while(true){try{bytearray.__add__(self,_b_.next(it))}catch(err){if(err===_b_.StopIteration){break} -throw err}} -return _b_.None} -bytearray.insert=function(self,pos,b){if(arguments.length !=3){throw _b_.TypeError.$factory( -"insert takes exactly 2 arguments ("+(arguments.length-1)+ -" given)")} -if(! _b_.isinstance(b,_b_.int)){throw _b_.TypeError.$factory("an integer is required")} -if(b > 255){throw _b_.ValueError.$factory("byte must be in range(0, 256)")} -_b_.list.insert(self.source,pos,b)} -bytearray.$factory=function(){var args=[bytearray] -for(var i=0,len=arguments.length;i < len;i++){args.push(arguments[i])} -return bytearray.__new__.apply(null,args)} -var bytes={__class__ :_b_.type,__mro__:[_b_.object],__qualname__:'bytes',$buffer_protocol:true,$is_class:true} -bytes.__add__=function(self,other){var other_bytes -if(_b_.isinstance(other,[bytes,bytearray])){other_bytes=other.source}else if(_b_.isinstance(other,_b_.memoryview)){other_bytes=_b_.memoryview.tobytes(other).source} -if(other_bytes !==undefined){return{ -__class__:self.__class__,source:self.source.concat(other_bytes)}} -throw _b_.TypeError.$factory("can't concat bytes to "+ -_b_.str.$factory(other))} -bytes.__bytes__=function(self){return self} -bytes.__contains__=function(self,other){if(typeof other=="number"){return self.source.indexOf(other)>-1} -if(self.source.length < other.source.length){return false} -var len=other.source.length -for(var i=0;i < self.source.length-other.source.length+1;i++){var flag=true -for(var j=0;j < len;j++){if(other.source[i+j]!=self.source[j]){flag=false -break}} -if(flag){return true}} -return false} -var bytes_iterator=$B.make_iterator_class("bytes_iterator") -bytes.__iter__=function(self){return bytes_iterator.$factory(self.source)} -bytes.__eq__=function(self,other){if(invalid(other)){return false} -return $B.$getattr(self.source,'__eq__')(other.source)} -bytes.__ge__=function(self,other){if(invalid(other)){return _b_.NotImplemented} -return _b_.list.__ge__(self.source,other.source)} -bytes.__getitem__=function(self,arg){var i -if(_b_.isinstance(arg,_b_.int)){var pos=arg -if(arg < 0){pos=self.source.length+pos} -if(pos >=0 && pos < self.source.length){return self.source[pos]} -throw _b_.IndexError.$factory("index out of range")}else if(_b_.isinstance(arg,_b_.slice)){var s=_b_.slice.$conv_for_seq(arg,self.source.length),start=s.start,stop=s.stop,step=s.step -var res=[],i=null,pos=0 -if(step > 0){stop=Math.min(stop,self.source.length) -if(stop <=start){return bytes.$factory([])} -for(var i=start;i < stop;i+=step){res[pos++]=self.source[i]}}else{if(stop >=start){return bytes.$factory([])} -stop=Math.max(0,stop) -for(var i=start;i >=stop;i+=step){res[pos++]=self.source[i]}} -return bytes.$factory(res)}else if(_b_.isinstance(arg,_b_.bool)){return self.source.__getitem__(_b_.int.$factory(arg))}} -bytes.$getnewargs=function(self){return $B.fast_tuple([bytes_value(self)])} -bytes.__getnewargs__=function(){return bytes.$getnewargs($B.single_arg('__getnewargs__','self',arguments))} -bytes.__gt__=function(self,other){if(invalid(other)){return _b_.NotImplemented} -return _b_.list.__gt__(self.source,other.source)} -bytes.__hash__=function(self){if(self===undefined){return bytes.__hashvalue__ ||$B.$py_next_hash--} -var hash=1 -for(var i=0,len=self.source.length;i < len;i++){hash=(101*hash+self.source[i])& 0xFFFFFFFF} -return hash} -bytes.__init__=function(){return _b_.None} -bytes.__le__=function(self,other){if(invalid(other)){return _b_.NotImplemented} -return _b_.list.__le__(self.source,other.source)} -bytes.__len__=function(self){return self.source.length} -bytes.__lt__=function(self,other){if(invalid(other)){return _b_.NotImplemented} -return _b_.list.__lt__(self.source,other.source)} -bytes.__mod__=function(self,args){ -var s=decode(self,"latin-1","strict"),res=$B.printf_format(s,'bytes',args) -return _b_.str.encode(res,"ascii")} -bytes.__mul__=function(){var $=$B.args('__mul__',2,{self:null,other:null},['self','other'],arguments,{},null,null),other=$B.PyNumber_Index($.other) -var t=[],source=$.self.source,slen=source.length -for(var i=0;i < other;i++){for(var j=0;j < slen;j++){t.push(source[j])}} -var res=bytes.$factory() -res.source=t -return res} -bytes.__ne__=function(self,other){return ! bytes.__eq__(self,other)} -bytes.__new__=function(cls,source,encoding,errors){var missing={},$=$B.args("__new__",4,{cls:null,source:null,encoding:null,errors:null},["cls","source","encoding","errors"],arguments,{source:missing,encoding:missing,errors:missing},null,null) -var source -if($.source===missing){return{ -__class__:$.cls,source:[]}}else if(typeof $.source=="string" ||_b_.isinstance($.source,_b_.str)){if($.encoding===missing){throw _b_.TypeError.$factory('string argument without an encoding')} -$.errors=$.errors===missing ? 'strict' :$.errors -var res=encode($.source,$.encoding,$.errors) -if(! _b_.isinstance(res,bytes)){throw _b_.TypeError.$factory(`'${$.encoding}' codec returns `+ -`${$B.class_name(res)}, not bytes`)} -res.__class__=$.cls -return res} -if($.encoding !==missing){throw _b_.TypeError.$factory("encoding without a string argument")} -if(typeof $.source=="number" ||_b_.isinstance($.source,_b_.int)){var size=$B.PyNumber_Index($.source) -source=[] -for(var i=0;i < size;i++){source[i]=0}}else if(_b_.isinstance($.source,[_b_.bytes,_b_.bytearray])){source=$.source.source}else if(_b_.isinstance($.source,_b_.memoryview)){source=$.source.obj.source}else{if(Array.isArray($.source)){var int_list=$.source}else{try{var int_list=_b_.list.$factory($.source)}catch(err){var bytes_method=$B.$getattr(source,'__bytes__',_b_.None) -if(bytes_method===_b_.None){throw _b_.TypeError.$factory("cannot convert "+ -`'${$B.class_name(source)}' object to bytes`)} -var res=$B.$call(bytes_method)() -if(! _b_.isinstance(res,_b_.bytes)){throw _b_.TypeError.$factory(`__bytes__ returned `+ -`non-bytes (type ${$B.class_name(res)})`)} -return res}} -source=[] -for(var item of int_list){item=$B.PyNumber_Index(item) -if(item >=0 && item < 256){source.push(item)}else{throw _b_.ValueError.$factory( -"bytes must be in range (0, 256)")}}} -return{ -__class__:$.cls,source}} -bytes.$new=function(cls,source,encoding,errors){ -var self={__class__:cls},int_list=[],pos=0 -if(source===undefined){}else if(typeof source=="number" ||_b_.isinstance(source,_b_.int)){var i=source -while(i--){int_list[pos++]=0}}else{if(typeof source=="string" ||_b_.isinstance(source,_b_.str)){if(encoding===undefined){throw _b_.TypeError.$factory("string argument without an encoding")} -int_list=encode(source,encoding ||"utf-8",errors ||"strict")}else{if(encoding !==undefined){console.log('encoding',encoding) -throw _b_.TypeError.$factory("encoding without a string argument")} -if(Array.isArray(source)){int_list=source}else{try{int_list=_b_.list.$factory(source)}catch(err){var bytes_method=$B.$getattr(source,'__bytes__',_b_.None) -if(bytes_method===_b_.None){throw _b_.TypeError.$factory("cannot convert "+ -`'${$B.class_name(source)}' object to bytes`)} -var res=$B.$call(bytes_method)() -if(! _b_.isinstance(res,_b_.bytes)){throw _b_.TypeError.$factory(`__bytes__ returned `+ -`non-bytes (type ${$B.class_name(res)})`)} -return res} -for(var i=0;i < int_list.length;i++){try{var item=_b_.int.$factory(int_list[i])}catch(err){throw _b_.TypeError.$factory("'"+ -$B.class_name(int_list[i])+"' object "+ -"cannot be interpreted as an integer")} -if(item < 0 ||item > 255){throw _b_.ValueError.$factory("bytes must be in range"+ -"(0, 256)")}}}}} -self.source=int_list -self.encoding=encoding -self.errors=errors -return self} -bytes.__repr__=bytes.__str__=function(self){var t=$B.special_string_repr, -res="" -for(var i=0,len=self.source.length;i < len;i++){var s=self.source[i] -if(t[s]!==undefined){res+=t[s]}else if(s < 32 ||s >=128){var hx=s.toString(16) -hx=(hx.length==1 ? '0' :'')+hx -res+='\\x'+hx}else if(s=="\\".charCodeAt(0)){res+="\\\\"}else{res+=String.fromCharCode(s)}} -if(res.indexOf("'")>-1 && res.indexOf('"')==-1){return 'b"'+res+'"'}else{return "b'"+res.replace(new RegExp("'","g"),"\\'")+"'"}} -bytes.capitalize=function(self){var src=self.source,len=src.length,buffer=src.slice() -if(buffer[0]> 96 && buffer[0]< 123){buffer[0]-=32} -for(var i=1;i < len;++i){if(buffer[i]> 64 && buffer[i]< 91){buffer[i]+=32}} -return bytes.$factory(buffer)} -bytes.center=function(){var $=$B.args('center',3,{self:null,width:null,fillbyte:null},['self','width','fillbyte'],arguments,{fillbyte:bytes.$factory([32])},null,null) -var diff=$.width-$.self.source.length -if(diff <=0){return bytes.$factory($.self.source)} -var ljust=bytes.ljust($.self,$.self.source.length+Math.floor(diff/2),$.fillbyte) -return bytes.rjust(ljust,$.width,$.fillbyte)} -bytes.count=function(){var $=$B.args('count',4,{self:null,sub:null,start:null,end:null},['self','sub','start','end'],arguments,{start:0,end:-1},null,null) -var n=0,index=-1,len=0 -if(typeof $.sub=="number"){if($.sub < 0 ||$.sub > 255) -throw _b_.ValueError.$factory("byte must be in range(0, 256)") -len=1}else if(!$.sub.__class__){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name($.sub)+"'")}else if(!$.sub.__class__.$buffer_protocol){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name($.sub)+"'")}else{len=$.sub.source.length} -do{index=bytes.find($.self,$.sub,Math.max(index+len,$.start),$.end) -if(index !=-1){n++}}while(index !=-1) -return n} -bytes.decode=function(self,encoding,errors){var $=$B.args("decode",3,{self:null,encoding:null,errors:null},["self","encoding","errors"],arguments,{encoding:"utf-8",errors:"strict"},null,null) -switch($.errors){case 'strict': -case 'ignore': -case 'replace': -case 'surrogateescape': -case 'surrogatepass': -case 'xmlcharrefreplace': -case 'backslashreplace': -return decode($.self,$.encoding,$.errors) -default:}} -bytes.endswith=function(){var $=$B.args('endswith',4,{self:null,suffix:null,start:null,end:null},['self','suffix','start','end'],arguments,{start:-1,end:-1},null,null) -if(_b_.isinstance($.suffix,bytes)){var start=$.start==-1 ? -$.self.source.length-$.suffix.source.length : -Math.min($.self.source.length-$.suffix.source.length,$.start) -var end=$.end==-1 ? $.self.source.length :$.end -var res=true -for(var i=$.suffix.source.length-1,len=$.suffix.source.length; -i >=0 && res;--i){res=$.self.source[end-len+i]==$.suffix.source[i]} -return res}else if(_b_.isinstance($.suffix,_b_.tuple)){for(var i=0;i < $.suffix.length;++i){if(_b_.isinstance($.suffix[i],bytes)){if(bytes.endswith($.self,$.suffix[i],$.start,$.end)){return true}}else{throw _b_.TypeError.$factory("endswith first arg must be "+ -"bytes or a tuple of bytes, not "+ -$B.class_name($.suffix))}} -return false}else{throw _b_.TypeError.$factory("endswith first arg must be bytes "+ -"or a tuple of bytes, not "+$B.class_name($.suffix))}} -bytes.expandtabs=function(){var $=$B.args('expandtabs',2,{self:null,tabsize:null},['self','tabsize'],arguments,{tabsize:8},null,null) -var tab_spaces=[] -for(let i=0;i < $.tabsize;++i){tab_spaces.push(32)} -var buffer=$.self.source.slice() -for(let i=0;i < buffer.length;++i){if(buffer[i]===9){var nb_spaces=$.tabsize-i % $.tabsize -var tabs=new Array(nb_spaces) -tabs.fill(32) -buffer.splice.apply(buffer,[i,1].concat(tabs))}} -return _b_.bytes.$factory(buffer)} -bytes.find=function(self,sub){if(arguments.length !=2){var $=$B.args('find',4,{self:null,sub:null,start:null,end:null},['self','sub','start','end'],arguments,{start:0,end:-1},null,null),sub=$.sub,start=$.start,end=$.end}else{var start=0,end=-1} -if(typeof sub=="number"){if(sub < 0 ||sub > 255){throw _b_.ValueError.$factory("byte must be in range(0, 256)")} -return self.source.slice(0,end==-1 ? undefined :end).indexOf(sub,start)}else if(! sub.__class__){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name(sub)+"'")}else if(! sub.__class__.$buffer_protocol){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name(sub)+"'")} -end=end==-1 ? self.source.length :Math.min(self.source.length,end) -var len=sub.source.length -for(var i=start;i <=end-len;i++){var chunk=self.source.slice(i,i+len),found=true -for(var j=0;j < len;j++){if(chunk[j]!=sub.source[j]){found=false -break}} -if(found){return i}} -return-1} -bytes.fromhex=function(){var $=$B.args('fromhex',2,{cls:null,string:null},['cls','string'],arguments,{},null,null),string=$.string.replace(/\s/g,''),source=[] -for(var i=0;i < string.length;i+=2){if(i+2 > string.length){throw _b_.ValueError.$factory("non-hexadecimal number found "+ -"in fromhex() arg")} -source.push(_b_.int.$factory(string.substr(i,2),16))} -return $.cls.$factory(source)} -bytes.hex=function(){ -var $=$B.args('hex',3,{self:null,sep:null,bytes_per_sep:null},['self','sep','bytes_per_sep'],arguments,{sep:"",bytes_per_sep:1},null,null),self=$.self,sep=$.sep,bytes_per_sep=$.bytes_per_sep,res="",digits="0123456789abcdef",bps=bytes_per_sep,jstart=bps,len=self.source.length; -if(bytes_per_sep < 0){bps=-bytes_per_sep; -jstart=bps}else if(bytes_per_sep==0){sep=''}else{jstart=len % bps -if(jstart==0){jstart=bps}} -for(var i=0,j=jstart;i < len;i++){var c=self.source[i] -if(j==0){res+=sep -j=bps} -j-- -res+=digits[c >> 4] -res+=digits[c & 0x0f]} -return res} -bytes.index=function(){var $=$B.args('index',4,{self:null,sub:null,start:null,end:null},['self','sub','start','end'],arguments,{start:0,end:-1},null,null) -var index=bytes.find($.self,$.sub,$.start,$.end) -console.log('index',index) -if(index==-1){throw _b_.ValueError.$factory("subsection not found")} -return index} -bytes.isalnum=function(){var $=$B.args('isalnum',1,{self:null},['self'],arguments,{},null,null),self=$.self -var src=self.source,len=src.length,res=len > 0 -for(var i=0;i < len && res;++i){res=(src[i]> 96 && src[i]< 123)|| -(src[i]> 64 && src[i]< 91)|| -(src[i]> 47 && src[i]< 58)} -return res} -bytes.isalpha=function(){var $=$B.args('isalpha',1,{self:null},['self'],arguments,{},null,null),self=$.self -var src=self.source,len=src.length,res=len > 0 -for(var i=0;i < len && res;++i){res=(src[i]> 96 && src[i]< 123)||(src[i]> 64 && src[i]< 91)} -return res} -bytes.isdigit=function(){var $=$B.args('isdigit',1,{self:null},['self'],arguments,{},null,null),self=$.self -var src=self.source,len=src.length,res=len > 0 -for(let i=0;i < len && res;++i){res=src[i]> 47 && src[i]< 58} -return res} -bytes.islower=function(){var $=$B.args('islower',1,{self:null},['self'],arguments,{},null,null),self=$.self -var src=self.source,len=src.length,res=false -for(let i=0;i < len;++i){ -res=res ||(src[i]> 96 && src[i]< 123) -if(src[i]> 64 && src[i]< 91){return false}} -return res} -bytes.isspace=function(){var $=$B.args('isspace',1,{self:null},['self'],arguments,{},null,null),self=$.self -var src=self.source,len=src.length -for(let i=0;i < len;++i){switch(src[i]){case 9: -case 10: -case 11: -case 12: -case 13: -case 32: -break -default: -return false}} -return true} -bytes.isupper=function(){var $=$B.args('isupper',1,{self:null},['self'],arguments,{},null,null),self=$.self -var src=self.source,len=src.length,res=false -for(let i=0;i < len;++i){ -res=res ||(src[i]> 64 && src[i]< 91) -if(src[i]> 96 && src[i]< 123){return false}} -return res} -bytes.istitle=function(){var $=$B.args('istitle',1,{self:null},['self'],arguments,{},null,null),self=$.self -var src=self.source,len=src.length,current_char_is_letter=false,prev_char_was_letter=false,is_uppercase=false,is_lowercase=false -for(var i=0;i < len;++i){is_lowercase=src[i]> 96 && src[i]< 123 -is_uppercase=src[i]> 64 && src[i]< 91 -current_char_is_letter=is_lowercase ||is_uppercase -if(current_char_is_letter && -(prev_char_was_letter && is_uppercase)|| -(! prev_char_was_letter && is_lowercase)){return false} -prev_char_was_letter=current_char_is_letter} -return true} -bytes.join=function(){var $ns=$B.args('join',2,{self:null,iterable:null},['self','iterable'],arguments,{}),self=$ns['self'],iterable=$ns['iterable'] -var next_func=$B.$getattr(_b_.iter(iterable),'__next__'),res=self.__class__.$factory(),empty=true -while(true){try{var item=next_func() -if(empty){empty=false}else{res=bytes.__add__(res,self)} -res=bytes.__add__(res,item)}catch(err){if(_b_.isinstance(err,_b_.StopIteration)){break} -throw err}} -return res} -var _lower=function(char_code){if(char_code >=65 && char_code <=90){return char_code+32}else{return char_code}} -bytes.lower=function(self){var _res=[],pos=0 -for(var i=0,len=self.source.length;i < len;i++){if(self.source[i]){_res[pos++]=_lower(self.source[i])}} -return bytes.$factory(_res)} -bytes.ljust=function(){var $=$B.args('ljust',3,{self:null,width:null,fillbyte:null},['self','width','fillbyte'],arguments,{fillbyte:bytes.$factory([32])},null,null) -if(!$.fillbyte.__class__){throw _b_.TypeError.$factory("argument 2 must be a byte string of length 1, "+ -"not '"+$B.class_name($.fillbyte)+"'")}else if(!$.fillbyte.__class__.$buffer_protocol){throw _b_.TypeError.$factory("argument 2 must be a byte string of length 1, "+ -"not '"+$B.class_name($.fillbyte)+"'")} -var padding=[],count=$.width-$.self.source.length -for(var i=0;i < count;++i){padding.push($.fillbyte.source[0])} -return bytes.$factory($.self.source.concat(padding))} -bytes.lstrip=function(self,cars){return _strip(self,cars,'l')} -bytes.maketrans=function(from,to){var _t=[],to=$B.to_bytes(to) -for(var i=0;i < 256;i++){_t[i]=i} -for(var i=0,len=from.source.length;i < len;i++){var _ndx=from.source[i] -_t[_ndx]=to[i]} -return bytes.$factory(_t)} -bytes.partition=function(){var $=$B.args('partition',2,{self:null,sep:null},['self','sep'],arguments,{},null,null) -if(! $.sep.__class__){throw _b_.TypeError.$factory("a bytes-like object is required, "+ -"not '"+$B.class_name($.sep)+"'")}else if(! $.sep.__class__.$buffer_protocol){throw _b_.TypeError.$factory("a bytes-like object is required, "+ -"not '"+$B.class_name($.sep)+"'")} -var len=$.sep.source.length,src=$.self.source,i=bytes.find($.self,$.sep) -return _b_.tuple.$factory([bytes.$factory(src.slice(0,i)),bytes.$factory(src.slice(i,i+len)),bytes.$factory(src.slice(i+len)) -])} -bytes.removeprefix=function(){var $=$B.args("removeprefix",2,{self:null,prefix:null},["self","prefix"],arguments,{},null,null) -if(!_b_.isinstance($.prefix,[bytes,bytearray])){throw _b_.ValueError.$factory("prefix should be bytes, not "+ -`'${$B.class_name($.prefix)}'`)} -if(bytes.startswith($.self,$.prefix)){return bytes.__getitem__($.self,_b_.slice.$factory($.prefix.source.length,_b_.None))} -return bytes.__getitem__($.self,_b_.slice.$factory(0,_b_.None))} -bytes.removesuffix=function(){var $=$B.args("removesuffix",2,{self:null,suffix:null},["self","suffix"],arguments,{},null,null) -if(!_b_.isinstance($.suffix,[bytes,bytearray])){throw _b_.ValueError.$factory("suffix should be bytes, not "+ -`'${$B.class_name($.suffix)}'`)} -if(bytes.endswith($.self,$.suffix)){return bytes.__getitem__($.self,_b_.slice.$factory(0,$.suffix.source.length+1))} -return bytes.__getitem__($.self,_b_.slice.$factory(0,_b_.None))} -bytes.replace=function(){var $=$B.args('replace',4,{self:null,old:null,new:null,count:null},['self','old','new','count'],arguments,{count:-1},null,null),res=[] -var self=$.self,src=self.source,len=src.length,old=$.old,$new=$.new -var count=$.count >=0 ? $.count :src.length -if(! $.old.__class__){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name($.old)+"'")}else if(! $.old.__class__.$buffer_protocol){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name($.sep)+"'")} -if(! $.new.__class__){throw _b_.TypeError.$factory("second argument must be a bytes-like "+ -"object, not '"+$B.class_name($.old)+"'")}else if(! $.new.__class__.$buffer_protocol){throw _b_.TypeError.$factory("second argument must be a bytes-like "+ -"object, not '"+$B.class_name($.sep)+"'")} -for(var i=0;i < len;i++){if(bytes.startswith(self,old,i)&& count){for(var j=0;j < $new.source.length;j++){res.push($new.source[j])} -i+=(old.source.length-1) -count--}else{res.push(src[i])}} -return bytes.$factory(res)} -bytes.rfind=function(self,subbytes){if(arguments.length==2 && subbytes.__class__===bytes){var sub=subbytes,start=0,end=-1}else{var $=$B.args('rfind',4,{self:null,sub:null,start:null,end:null},['self','sub','start','end'],arguments,{start:0,end:-1},null,null),self=$.self,sub=$.sub,start=$.start,end=$.end} -if(typeof sub=="number"){if(sub < 0 ||sub > 255){throw _b_.ValueError.$factory("byte must be in range(0, 256)")} -return $.self.source.slice(start,$.end==-1 ? undefined :$.end). -lastIndexOf(sub)+start}else if(! sub.__class__){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name($.sub)+"'")}else if(! sub.__class__.$buffer_protocol){throw _b_.TypeError.$factory("first argument must be a bytes-like "+ -"object, not '"+$B.class_name(sub)+"'")} -end=end==-1 ? self.source.length :Math.min(self.source.length,end) -var len=sub.source.length -for(var i=end-len;i >=start;--i){var chunk=self.source.slice(i,i+len),found=true -for(var j=0;j < len;j++){if(chunk[j]!=sub.source[j]){found=false -break}} -if(found){return i}} -return-1} -bytes.rindex=function(){var $=$B.args('rfind',4,{self:null,sub:null,start:null,end:null},['self','sub','start','end'],arguments,{start:0,end:-1},null,null) -var index=bytes.rfind($.self,$.sub,$.start,$.end) -if(index==-1){throw _b_.ValueError.$factory("subsection not found")} -return index} -bytes.rjust=function(){var $=$B.args('rjust',3,{self:null,width:null,fillbyte:null},['self','width','fillbyte'],arguments,{fillbyte:bytes.$factory([32])},null,null) -if(!$.fillbyte.__class__){throw _b_.TypeError.$factory("argument 2 must be a byte string of length 1, "+ -"not '"+$B.class_name($.fillbyte)+"'")}else if(!$.fillbyte.__class__.$buffer_protocol){throw _b_.TypeError.$factory("argument 2 must be a byte string of length 1, "+ -"not '"+$B.class_name($.fillbyte)+"'")} -var padding=[],count=$.width-$.self.source.length -for(var i=0;i < count;++i){padding.push($.fillbyte.source[0])} -return bytes.$factory(padding.concat($.self.source))} -bytes.rpartition=function(){var $=$B.args('rpartition',2,{self:null,sep:null},['self','sep'],arguments,{},null,null) -if(!$.sep.__class__){throw _b_.TypeError.$factory("a bytes-like object is required, "+ -"not '"+$B.class_name($.sep)+"'")}else if(!$.sep.__class__.$buffer_protocol){throw _b_.TypeError.$factory("a bytes-like object is required, "+ -"not '"+$B.class_name($.sep)+"'")} -var len=$.sep.source.length,src=$.self.source,i=bytes.rfind($.self,$.sep) -return _b_.tuple.$factory([bytes.$factory(src.slice(0,i)),bytes.$factory(src.slice(i,i+len)),bytes.$factory(src.slice(i+len)) -])} -bytes.rstrip=function(self,cars){return _strip(self,cars,'r')} -bytes.split=function(){var $=$B.args('split',2,{self:null,sep:null},['self','sep'],arguments,{sep:bytes.$factory([32])},null,null),res=[],start=0,stop=0 -if(! $.sep.__class__ ){throw _b_.TypeError.$factory("a bytes-like object is required, "+ -"not '"+$B.class_name($.sep)+"'")}else if(! $.sep.__class__.$buffer_protocol){throw _b_.TypeError.$factory("a bytes-like object is required, "+ -"not '"+$B.class_name($.sep)+"'")} -var seps=$.sep.source,len=seps.length,src=$.self.source,blen=src.length -while(stop < blen){var match=true -for(var i=0;i < len && match;i++){if(src[stop+i]!=seps[i]){match=false}} -if(match){res.push(bytes.$factory(src.slice(start,stop))) -start=stop+len -stop=start}else{stop++}} -if(match ||(stop > start)){res.push(bytes.$factory(src.slice(start,stop)))} -return res} -bytes.splitlines=function(self){var $=$B.args('splitlines',2,{self:null,keepends:null},['self','keepends'],arguments,{keepends:false},null,null) -if(!_b_.isinstance($.keepends,[_b_.bool,_b_.int])){throw _b_.TypeError('integer argument expected, got '+ -$B.get_class($.keepends).__name)} -var keepends=_b_.int.$factory($.keepends),res=[],source=$.self.source,start=0,pos=0 -if(! source.length){return res} -while(pos < source.length){if(pos < source.length-1 && source[pos]==0x0d && -source[pos+1]==0x0a){res.push(bytes.$factory(source.slice(start,keepends ? pos+2 :pos))) -start=pos=pos+2}else if(source[pos]==0x0d ||source[pos]==0x0a){res.push(bytes.$factory(source.slice(start,keepends ? pos+1 :pos))) -start=pos=pos+1}else{pos++}} -if(start < source.length){res.push(bytes.$factory(source.slice(start)))} -return res} -bytes.startswith=function(){var $=$B.args('startswith',3,{self:null,prefix:null,start:null},['self','prefix','start'],arguments,{start:0},null,null),start=$.start -if(_b_.isinstance($.prefix,bytes)){var res=true -for(var i=0;i < $.prefix.source.length && res;i++){res=$.self.source[start+i]==$.prefix.source[i]} -return res}else if(_b_.isinstance($.prefix,_b_.tuple)){var items=[] -for(var i=0;i < $.prefix.length;i++){if(_b_.isinstance($.prefix[i],bytes)){items=items.concat($.prefix[i].source)}else{throw _b_.TypeError.$factory("startswith first arg must be "+ -"bytes or a tuple of bytes, not "+ -$B.class_name($.prefix))}} -var prefix=bytes.$factory(items) -return bytes.startswith($.self,prefix,start)}else{throw _b_.TypeError.$factory("startswith first arg must be bytes "+ -"or a tuple of bytes, not "+$B.class_name($.prefix))}} -bytes.strip=function(self,cars){var res=bytes.lstrip(self,cars) -return bytes.rstrip(res,cars)} -bytes.swapcase=function(self){var src=self.source,len=src.length,buffer=src.slice() -for(var i=0;i < len;++i){if(buffer[i]> 96 && buffer[i]< 123){buffer[i]-=32}else if(buffer[i]> 64 && buffer[i]< 91){buffer[i]+=32}} -return bytes.$factory(buffer)} -bytes.title=function(self){var src=self.source,len=src.length -buffer=src.slice(),current_char_is_letter=false,prev_char_was_letter=false,is_uppercase=false,is_lowercase=false -for(var i=0;i < len;++i){is_lowercase=buffer[i]> 96 && buffer[i]< 123 -is_uppercase=buffer[i]> 64 && buffer[i]< 91 -current_char_is_letter=is_lowercase ||is_uppercase -if(current_char_is_letter){if(prev_char_was_letter && is_uppercase){buffer[i]+=32}else if(! prev_char_was_letter && is_lowercase){buffer[i]-=32}} -prev_char_was_letter=current_char_is_letter} -return bytes.$factory(buffer)} -bytes.translate=function(self,table,_delete){if(_delete===undefined){_delete=[]}else if(_b_.isinstance(_delete,bytes)){_delete=_delete.source}else{throw _b_.TypeError.$factory("Type "+ -$B.get_class(_delete).__name+" doesn't support the buffer API")} -var res=[],pos=0 -if(_b_.isinstance(table,bytes)&& table.source.length==256){for(var i=0,len=self.source.length;i < len;i++){if(_delete.indexOf(self.source[i])>-1){continue} -res[pos++]=table.source[self.source[i]]}} -return bytes.$factory(res)} -var _upper=function(char_code){if(char_code >=97 && char_code <=122){return char_code-32}else{return char_code}} -bytes.upper=function(self){var _res=[],pos=0 -for(var i=0,len=self.source.length;i < len;i++){if(self.source[i]){_res[pos++]=_upper(self.source[i])}} -return bytes.$factory(_res)} -bytes.zfill=function(self,width){var buffer=self.source.slice(),prefix_offset=(buffer[0]==43 ||buffer[0]==45)? 1 :0 -var count=width-self.source.length -var padding=[] -for(var i=0;i < count;++i){padding.push(48)} -buffer.splice.apply(buffer,[prefix_offset,0].concat(padding)) -return bytes.$factory(buffer)} -function $UnicodeEncodeError(encoding,code_point,position){throw _b_.UnicodeEncodeError.$factory("'"+encoding+ -"' codec can't encode character "+_b_.hex(code_point)+ -" in position "+position)} -function $UnicodeDecodeError(encoding,position){throw _b_.UnicodeDecodeError.$factory("'"+encoding+ -"' codec can't decode bytes in position "+position)} -function _hex(_int){var h=_int.toString(16) -return '0x'+'0'.repeat(2-h.length)+h} -function _int(hex){return parseInt(hex,16)} -var aliases={ascii:['646','us-ascii'],big5:['big5-tw','csbig5'],big5hkscs:['big5-hkscs','hkscs'],cp037:['IBM037','IBM039'],cp273:['273','IBM273','csIBM273'],cp424:['EBCDIC-CP-HE','IBM424'],cp437:['437','IBM437'],cp500:['EBCDIC-CP-BE','EBCDIC-CP-CH','IBM500'],cp775:['IBM775'],cp850:['850','IBM850'],cp852:['852','IBM852'],cp855:['855','IBM855'],cp857:['857','IBM857'],cp858:['858','IBM858'],cp860:['860','IBM860'],cp861:['861','CP-IS','IBM861'],cp862:['862','IBM862'],cp863:['863','IBM863'],cp864:['IBM864'],cp865:['865','IBM865'],cp866:['866','IBM866'],cp869:['869','CP-GR','IBM869'],cp932:['932','ms932','mskanji','ms-kanji'],cp949:['949','ms949','uhc'],cp950:['950','ms950'],cp1026:['ibm1026'],cp1125:['1125','ibm1125','cp866u','ruscii'],cp1140:['ibm1140'],cp1250:['windows-1250'],cp1251:['windows-1251'],cp1252:['windows-1252'],cp1253:['windows-1253'],cp1254:['windows-1254'],cp1255:['windows-1255'],cp1256:['windows-1256'],cp1257:['windows-1257'],cp1258:['windows-1258'],euc_jp:['eucjp','ujis','u-jis'],euc_jis_2004:['jisx0213','eucjis2004'],euc_jisx0213:['eucjisx0213'],euc_kr:['euckr','korean','ksc5601','ks_c-5601','ks_c-5601-1987','ksx1001','ks_x-1001'],gb2312:['chinese','csiso58gb231280','euc-cn','euccn','eucgb2312-cn','gb2312-1980','gb2312-80','iso-ir-58'],gbk:['936','cp936','ms936'],gb18030:['gb18030-2000'],hz:['hzgb','hz-gb','hz-gb-2312'],iso2022_jp:['csiso2022jp','iso2022jp','iso-2022-jp'],iso2022_jp_1:['iso2022jp-1','iso-2022-jp-1'],iso2022_jp_2:['iso2022jp-2','iso-2022-jp-2'],iso2022_jp_2004:['iso2022jp-2004','iso-2022-jp-2004'],iso2022_jp_3:['iso2022jp-3','iso-2022-jp-3'],iso2022_jp_ext:['iso2022jp-ext','iso-2022-jp-ext'],iso2022_kr:['csiso2022kr','iso2022kr','iso-2022-kr'],latin_1:['iso-8859-1','iso8859-1','8859','cp819','latin','latin1','L1'],iso8859_2:['iso-8859-2','latin2','L2'],iso8859_3:['iso-8859-3','latin3','L3'],iso8859_4:['iso-8859-4','latin4','L4'],iso8859_5:['iso-8859-5','cyrillic'],iso8859_6:['iso-8859-6','arabic'],iso8859_7:['iso-8859-7','greek','greek8'],iso8859_8:['iso-8859-8','hebrew'],iso8859_9:['iso-8859-9','latin5','L5'],iso8859_10:['iso-8859-10','latin6','L6'],iso8859_11:['iso-8859-11','thai'],iso8859_13:['iso-8859-13','latin7','L7'],iso8859_14:['iso-8859-14','latin8','L8'],iso8859_15:['iso-8859-15','latin9','L9'],iso8859_16:['iso-8859-16','latin10','L10'],johab:['cp1361','ms1361'],kz1048:['kz_1048','strk1048_2002','rk1048'],mac_cyrillic:['maccyrillic'],mac_greek:['macgreek'],mac_iceland:['maciceland'],mac_latin2:['maclatin2','maccentraleurope','mac_centeuro'],mac_roman:['macroman','macintosh'],mac_turkish:['macturkish'],ptcp154:['csptcp154','pt154','cp154','cyrillic-asian'],shift_jis:['csshiftjis','shiftjis','sjis','s_jis'],shift_jis_2004:['shiftjis2004','sjis_2004','sjis2004'],shift_jisx0213:['shiftjisx0213','sjisx0213','s_jisx0213'],utf_32:['U32','utf32'],utf_32_be:['UTF-32BE'],utf_32_le:['UTF-32LE'],utf_16:['U16','utf16'],utf_16_be:['UTF-16BE'],utf_16_le:['UTF-16LE'],utf_7:['U7','unicode-1-1-utf-7'],utf_8:['U8','UTF','utf8','cp65001'],mbcs:['ansi','dbcs'],bz2_codec:['bz2'],hex_codec:['hex'],quopri_codec:['quopri','quotedprintable','quoted_printable'],uu_codec:['uu'],zlib_codec:['zip','zlib'],rot_13:['rot13']} -var codecs_aliases={} -for(var name in aliases){for(var alias of aliases[name]){codecs_aliases[alias.toLowerCase().replace(/-/g,'_')]=name}} -function normalise(encoding){ -var enc=encoding.toLowerCase() -.replace(/ /g,'_') -.replace(/-/g,'_') -if(codecs_aliases[enc]!==undefined){enc=codecs_aliases[enc]} -return enc} -function load_decoder(enc){ -if(to_unicode[enc]===undefined){var mod=_b_.__import__("encodings."+enc) -if(mod[enc].getregentry){to_unicode[enc]=$B.$getattr(mod[enc].getregentry(),"decode")}}} -function load_encoder(enc){ -if(from_unicode[enc]===undefined){var mod=_b_.__import__("encodings."+enc) -if(mod[enc].getregentry){from_unicode[enc]=$B.$getattr(mod[enc].getregentry(),"encode")}}} -var decode=$B.decode=function(obj,encoding,errors){var s="",b=obj.source,enc=normalise(encoding) -switch(enc){case "utf_8": -case "utf-8": -case "utf8": -case "U8": -case "UTF": -var pos=0,s="",err_info -while(pos < b.length){var byte=b[pos] -err_info=null -if(!(byte & 0x80)){ -s+=String.fromCodePoint(byte) -pos++}else if((byte >> 5)==6){ -if(b[pos+1]===undefined){err_info=[byte,pos,"end"]}else if((b[pos+1]& 0xc0)!=0x80){err_info=[byte,pos,"continuation"]} -if(err_info !==null){if(errors=="ignore"){pos++}else{throw _b_.UnicodeDecodeError.$factory( -"'utf-8' codec can't decode byte 0x"+ -err_info[0].toString(16)+" in position "+ -err_info[1]+ -(err_info[2]=="end" ? ": unexpected end of data" : -": invalid continuation byte"))}}else{var cp=byte & 0x1f -cp <<=6 -cp+=b[pos+1]& 0x3f -s+=String.fromCodePoint(cp) -pos+=2}}else if((byte >> 4)==14){ -if(b[pos+1]===undefined){err_info=[byte,pos,"end",pos+1]}else if((b[pos+1]& 0xc0)!=0x80){err_info=[byte,pos,"continuation",pos+2]}else if(b[pos+2]===undefined){err_info=[byte,pos+'-'+(pos+1),"end",pos+2]}else if((b[pos+2]& 0xc0)!=0x80){err_info=[byte,pos,"continuation",pos+3]} -if(err_info !==null){if(errors=="ignore"){pos=err_info[3]}else if(errors=="surrogateescape"){for(var i=pos;i < err_info[3];i++){s+=String.fromCodePoint(0xdc80+b[i]-0x80)} -pos=err_info[3]}else{throw _b_.UnicodeDecodeError.$factory( -"'utf-8' codec can't decode byte 0x"+ -err_info[0].toString(16)+" in position "+ -err_info[1]+ -(err_info[2]=="end" ? ": unexpected end of data" : -": invalid continuation byte"))}}else{var cp=byte & 0xf -cp=cp << 12 -cp+=(b[pos+1]& 0x3f)<< 6 -cp+=b[pos+2]& 0x3f -s+=String.fromCodePoint(cp) -pos+=3}}else if((byte >> 3)==30){ -if(b[pos+1]===undefined){err_info=[byte,pos,"end",pos+1]}else if((b[pos+1]& 0xc0)!=0x80){err_info=[byte,pos,"continuation",pos+2]}else if(b[pos+2]===undefined){err_info=[byte,pos+'-'+(pos+1),"end",pos+2]}else if((b[pos+2]& 0xc0)!=0x80){err_info=[byte,pos,"continuation",pos+3]}else if(b[pos+3]===undefined){err_info=[byte,pos+'-'+(pos+1)+'-'+(pos+2),"end",pos+3]}else if((b[pos+2]& 0xc0)!=0x80){err_info=[byte,pos,"continuation",pos+3]} -if(err_info !==null){if(errors=="ignore"){pos=err_info[3]}else if(errors=="surrogateescape"){for(var i=pos;i < err_info[3];i++){s+=String.fromCodePoint(0xdc80+b[i]-0x80)} -pos=err_info[3]}else{throw _b_.UnicodeDecodeError.$factory( -"'utf-8' codec can't decode byte 0x"+ -err_info[0].toString(16)+" in position "+ -err_info[1]+ -(err_info[2]=="end" ? ": unexpected end of data" : -": invalid continuation byte"))}}else{var cp=byte & 0xf -cp=cp << 18 -cp+=(b[pos+1]& 0x3f)<< 12 -cp+=(b[pos+2]& 0x3f)<< 6 -cp+=(b[pos+3]& 0x3f) -s+=String.fromCodePoint(cp) -pos+=4}}else{if(errors=="ignore"){pos++}else if(errors=="surrogateescape"){s+=String.fromCodePoint(0xdc80+b[pos]-0x80) -pos++}else{throw _b_.UnicodeDecodeError.$factory( -"'utf-8' codec can't decode byte 0x"+ -byte.toString(16)+" in position "+pos+ -": invalid start byte")}}} -return s -case "latin_1": -case "windows1252": -case "iso-8859-1": -case "iso8859-1": -case "8859": -case "cp819": -case "latin": -case "latin1": -case "L1": -b.forEach(function(item){s+=String.fromCharCode(item)}) -break -case "unicode_escape": -if(obj.__class__===bytes ||obj.__class__===bytearray){obj=decode(obj,"latin-1","strict")} -return obj.replace(/\\n/g,"\n"). -replace(/\\a/g,"\u0007"). -replace(/\\b/g,"\b"). -replace(/\\f/g,"\f"). -replace(/\\t/g,"\t"). -replace(/\\'/g,"'"). -replace(/\\"/g,'"') -case "raw_unicode_escape": -if(obj.__class__===bytes ||obj.__class__===bytearray){obj=decode(obj,"latin-1","strict")} -return obj.replace(/\\u([a-fA-F0-9]{4})/g,function(mo){var cp=parseInt(mo.substr(2),16) -return String.fromCharCode(cp)}) -case "ascii": -for(var i=0,len=b.length;i < len;i++){var cp=b[i] -if(cp <=127){s+=String.fromCharCode(cp)}else{if(errors=="ignore"){}else if(errors=="backslashreplace"){s+='\\x'+cp.toString(16)}else{var msg="'ascii' codec can't decode byte 0x"+ -cp.toString(16)+" in position "+i+ -": ordinal not in range(128)" -throw _b_.UnicodeDecodeError.$factory(msg)}}} -break -default: -try{load_decoder(enc)}catch(err){throw _b_.LookupError.$factory("unknown encoding: "+enc)} -var decoded=to_unicode[enc](obj)[0] -for(var i=0,len=decoded.length;i < len;i++){if(decoded.codePointAt(i)==0xfffe){throw _b_.UnicodeDecodeError.$factory("'charmap' codec "+ -`can't decode byte ${_hex(b[i])} in position ${i}: `+ -"character maps to ")}} -return decoded} -return s} -var encode=$B.encode=function(){var $=$B.args("encode",3,{s:null,encoding:null,errors:null},["s","encoding","errors"],arguments,{encoding:"utf-8",errors:"strict"},null,null),s=$.s,encoding=$.encoding,errors=$.errors -var t=[],pos=0,enc=normalise(encoding) -switch(enc){case "utf-8": -case "utf_8": -case "utf8": -for(var i=0,len=s.length;i < len;i++){var cp=s.charCodeAt(i) -if(cp <=0x7f){t.push(cp)}else if(cp <=0x7ff){t.push(0xc0+(cp >> 6),0x80+(cp & 0x3f))}else if(cp <=0xffff){t.push(0xe0+(cp >> 12),0x80+((cp & 0xfff)>> 6),0x80+(cp & 0x3f))}else{console.log("4 bytes")}} -break -case "latin": -case "latin1": -case "latin-1": -case "latin_1": -case "L1": -case "iso8859_1": -case "iso_8859_1": -case "8859": -case "cp819": -case "windows1252": -for(var i=0,len=s.length;i < len;i++){var cp=s.charCodeAt(i) -if(cp <=255){t[pos++]=cp}else if(errors !="ignore"){$UnicodeEncodeError(encoding,i)}} -break -case "ascii": -for(var i=0,len=_b_.str.__len__(s);i < len;i++){var cp=s.charCodeAt(i), -char=_b_.str.__getitem__(s,i) -if(cp <=127){t[pos++]=cp}else if(errors=="backslashreplace"){var hex=_b_.hex(_b_.ord(char)) -if(hex.length < 5){hex='\\x'+'0'.repeat(4-hex.length)+hex.substr(2)}else if(hex.length < 7){hex='\\u'+'0'.repeat(6-hex.length)+hex.substr(2)}else{hex='\\U'+'0'.repeat(10-hex.length)+hex.substr(2)} -for(var char of hex){t[pos++]=char.charCodeAt(0)}}else if(errors !=='ignore'){$UnicodeEncodeError(encoding,i)}} -break -case "raw_unicode_escape": -for(var i=0,len=s.length;i < len;i++){var cp=s.charCodeAt(i) -if(cp < 256){t[pos++]=cp}else{var us=cp.toString(16) -if(us.length % 2){us="0"+us} -us="\\u"+us -for(var j=0;j < us.length;j++){t[pos++]=us.charCodeAt(j)}}} -break -default: -try{load_encoder(enc)}catch(err){throw _b_.LookupError.$factory("unknown encoding: "+encoding)} -return from_unicode[enc](s)[0]} -return fast_bytes(t)} -function fast_bytes(t){return{ -__class__:_b_.bytes,source:t}} -bytes.$factory=function(source,encoding,errors){return bytes.__new__.bind(null,bytes).apply(null,arguments)} -bytes.__class__=_b_.type -bytes.$is_class=true -$B.set_func_names(bytes,"builtins") -bytes.fromhex=_b_.classmethod.$factory(bytes.fromhex) -for(var attr in bytes){if(bytearray[attr]===undefined && typeof bytes[attr]=="function"){bytearray[attr]=(function(_attr){return function(){return bytes[_attr].apply(null,arguments)}})(attr)}} -$B.set_func_names(bytearray,"builtins") -bytearray.fromhex=bytes.fromhex -_b_.bytes=bytes -_b_.bytearray=bytearray})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins,object=_b_.object,$N=_b_.None -function create_type(obj){return $B.get_class(obj).$factory()} -function make_new_set(type){var res={__class__:type,$store:Object.create(null),$version:0,$used:0} -res[Symbol.iterator]=function*(){var version=res.$version -for(var item of set_iter(res)){yield item -if(res.$version !=version){throw _b_.RuntimeError.$factory( -'Set changed size during iteration')}}} -return res} -function make_new_set_base_type(so){return _b_.isinstance(so,set)? -set.$factory(): -frozenset.$factory()} -function set_hash(item){return $B.$hash(item)} -function set_add(so,item,hash){hash=hash===undefined ? $B.$hash(item):hash -if(set_contains(so,item,hash)){return}else{so.$store[hash]=so.$store[hash]||[] -so.$store[hash].push(item) -so.$used++ -so.$version++}} -function set_contains(so,key,hash){return !! set_lookkey(so,key,hash)} -function set_copy(obj){var res=make_new_set_base_type(obj) -for(var hash in obj.$store){res.$store[hash]=obj.$store[hash].slice()} -res.$used=obj.$used -return res} -var set=$B.make_class('set') -set.$native=true -function set_copy_and_difference(so,other){var result=set_copy(so) -set_difference_update(result,other) -return result} -function set_difference(so,other){var other_size,rv,other_is_dict -if(_b_.isinstance(other,[set,frozenset])){other_size=set.__len__(other)}else if(_b_.isinstance(other,_b_.dict)){other_size=_b_.dict.__len__(other) -other_is_dict=true}else{return set_copy_and_difference(so,other)} -if(set.__len__(so)>> 2 > other_size){return set_copy_and_difference(so,other);} -var result=make_new_set() -if(other_is_dict){for(var entry of set_iter_with_hash(so)){if(! _b_.dict.$lookup_by_key(other,entry.item,entry.hash).found){set_add(result,entry.item,entry.hash)}} -return result} -for(var entry of set_iter_with_hash(so)){if(! set_contains(other,entry.item,entry.hash)){set_add(result,entry.item,entry.hash)}} -result.__class__=so.__class__ -return result} -function set_difference_update(so,other){if(so===other){return set.clear(so);} -if(_b_.isinstance(other,[set,frozenset])){for(var entry of set_iter_with_hash(other)){set_discard_entry(so,entry.item,entry.hash)}}else if(_b_.isinstance(other,_b_.dict)){for(var entry of _b_.dict.$iter_items_with_hash(other)){set_discard_entry(so,entry.key,entry.hash)}}else{var frame=$B.last($B.frames_stack) -var iterator=$B.make_js_iterator(other,frame,frame.$lineno) -for(var key of iterator){set_discard_key(so,key)}}} -const DISCARD_NOTFOUND=0,DISCARD_FOUND=1 -function set_discard_entry(so,key,hash){var entry=set_lookkey(so,key,hash) -if(! entry){return DISCARD_NOTFOUND} -if(so.$store[entry.hash]!==undefined){ -set_remove(so,entry.hash,entry.index)}} -function set_discard_key(so,key){return set_discard_entry(so,key);} -function*set_iter(so){var ordered_keys=Object.keys(so.$store).sort() -for(var hash of ordered_keys){if(so.$store[hash]!==undefined){for(var item of so.$store[hash]){yield item}}}} -function*set_iter_with_hash(so){for(var hash in so.$store){if(so.$store[hash]!==undefined){for(var item of so.$store[hash]){yield{item,hash}}}}} -function set_remove(so,hash,index){so.$store[hash].splice(index,1) -if(so.$store[hash].length==0){delete so.$store[hash]} -so.$used--} -function set_intersection(so,other){ -if(so===other){return set_copy(so)} -var result=make_new_set_base_type(so),iterator -if(_b_.isinstance(other,[set,frozenset])){if(other.$used > so.$used){var tmp=so -so=other -other=tmp} -for(var entry of set_iter_with_hash(other)){if(set_contains(so,entry.item,entry.hash)){set_add(result,entry.item,entry.hash)}}}else if(_b_.isinstance(other,_b_.dict)){for(var entry of _b_.dict.$iter_items_with_hash(other)){if(set_contains(so,entry.key,entry.hash)){set_add(result,entry.key,entry.hash)}}}else{var frame=$B.last($B.frames_stack),lineno=frame.$lineno -iterator=$B.make_js_iterator(other,frame,lineno) -for(var other_item of iterator){var test=set_contains(so,other_item) -if(test){set_add(result,other_item)}}} -return result} -function set_intersection_multi(so,args){var result=set_copy(so) -if(args.length==0){return result} -for(var other of args){result=set_intersection(result,other)} -return result;} -function set_lookkey(so,key,hash){ -if(hash===undefined){try{hash=$B.$hash(key)}catch(err){if(_b_.isinstance(key,set)){hash=$B.$hash(frozenset.$factory(key))}else{throw err}}} -var items=so.$store[hash] -if(items===undefined){return false} -for(var index=0,len=so.$store[hash].length;index < len;index++){if($B.is_or_equals(key,items[index])){return{hash,index}}} -return false} -function set_swap_bodies(a,b){var temp=set_copy(a) -set.clear(a) -a.$used=b.$used -a.$store=b.$store -b.$used=temp.$used -b.$store=temp.$store} -function set_symmetric_difference_update(so,other){var otherset,key,pos=0,hash,entry,rv -if(so==other){return set.clear(so)} -if(_b_.isinstance(other,_b_.dict)){for(var entry of _b_.dict.$iter_items_with_hash(other)){rv=set_discard_entry(so,entry.key,entry.hash) -if(rv==DISCARD_NOTFOUND){set_add(so,entry.key,entry.hash)}}}else if(_b_.isinstance(other,[set,frozenset])){for(var entry of set_iter_with_hash(other)){rv=set_discard_entry(so,entry.item,entry.hash) -if(rv==DISCARD_NOTFOUND){set_add(so,entry.item,entry.hash)}}}else{return set_symmetric_difference_update(so,set.$factory(other))} -return _b_.None} -set.__and__=function(self,other){if(! _b_.isinstance(other,[set,frozenset])){return _b_.NotImplemented} -return set_intersection(self,other)} -set.__class_getitem__=function(cls,item){ -if(! Array.isArray(item)){item=[item]} -return $B.GenericAlias.$factory(cls,item)} -set.__contains__=function(self,item){return set_contains(self,item)} -set.__eq__=function(self,other){if(_b_.isinstance(other,[_b_.set,_b_.frozenset])){if(self.$used !=other.$used){return false} -for(var hash in self.$store){if(other.$store[hash]===undefined){return false} -var in_self=self.$store[hash],in_other=other.$store[hash] -if(in_self===undefined ||in_other===undefined){ -return false} -if(in_self.length !=in_other.length){return false} -if(in_self.length==1){if(! $B.is_or_equals(in_self[0],in_other[0])){return false}}else{in_self=in_self.slice() -in_other=in_other.slice() -for(var self_item of in_self){var found=false -for(var i=0,len=in_other.length;i < len;i++){if($B.is_or_equals(self_item,in_other[i])){in_other.splice(i,1) -found=true -break}} -if(! found){return false}}}} -return true} -return _b_.NotImplemented} -set.__format__=function(self,format_string){return set.__repr__(self)} -set.__ge__=function(self,other){if(_b_.isinstance(other,[set,frozenset])){return set.__le__(other,self)} -return _b_.NotImplemented} -set.__gt__=function(self,other){if(_b_.isinstance(other,[set,frozenset])){return set.__lt__(other,self)} -return _b_.NotImplemented} -set.__hash__=_b_.None -set.__init__=function(self,iterable){if(iterable===undefined){return _b_.None} -$B.check_nb_args_no_kw('set',2,arguments) -if(Object.keys(self.$store).length > 0){set.clear(self)} -set.update(self,iterable) -return _b_.None} -var set_iterator=$B.make_class('set_iterator',function(so){return{ -__class__:set_iterator,so,it:set_iter(so),version:so.$version}} -) -set_iterator.__iter__=function(self){return self} -set_iterator.__length_hint__=function(self){return self.so.$used} -set_iterator.__next__=function(self){var res=self.it.next() -if(res.done){throw _b_.StopIteration.$factory()} -if(self.so.$version !=self.version){throw _b_.RuntimeError.$factory("Set changed size during iteration")} -return res.value} -set_iterator.__reduce_ex__=function(self,protocol){return $B.fast_tuple([_b_.iter,$B.fast_tuple([set_make_items(self.so)])])} -$B.set_func_names(set_iterator,'builtins') -set.__iter__=function(self){return set_iterator.$factory(self)} -function check_version(s,version){if(s.$version !=version){throw _b_.RuntimeError.$factory( -'Set changed size during iteration')}} -function set_make_items(so){ -var items=[] -for(var hash in so.$store){items=items.concat(so.$store[hash])} -return items} -function make_hash_iter(obj,hash){let version=obj.$version,hashes=obj.$hashes[hash],len=hashes.length,i=0 -const iterator={*[Symbol.iterator](){while(i < len){var result=hashes[i] -i++ -yield result -check_version(obj,version)}}} -return iterator} -set.__le__=function(self,other){ -if(_b_.isinstance(other,[set,frozenset])){return set.issubset(self,other)} -return _b_.NotImplemented} -set.__len__=function(self){return self.$used} -set.__lt__=function(self,other){if(_b_.isinstance(other,[set,frozenset])){return set.__le__(self,other)&& -set.__len__(self)< set.__len__(other)}else{return _b_.NotImplemented}} -set.__mro__=[_b_.object] -set.__new__=function(cls,iterable){if(cls===undefined){throw _b_.TypeError.$factory("set.__new__(): not enough arguments")} -var self=make_new_set(cls) -if(iterable===undefined){return self} -if(cls===set){$B.check_nb_args_no_kw('__new__',2,arguments)} -return self} -set.__or__=function(self,other){if(_b_.isinstance(other,[set,frozenset])){return set.union(self,other)} -return _b_.NotImplemented} -set.__rand__=function(self,other){ -return set.__and__(self,other)} -set.__reduce__=function(self){return $B.fast_tuple([self.__class__,$B.fast_tuple([set_make_items(self)]),_b_.None])} -set.__reduce_ex__=function(self,protocol){return set.__reduce__(self)} -set.__repr__=function(self){$B.builtins_repr_check(set,arguments) -return set_repr(self)} -function set_repr(self){ -klass_name=$B.class_name(self) -if(self.$used===0){return klass_name+"()"} -var head=klass_name+"({",tail="})" -if(head=="set({"){head="{";tail="}"} -var res=[] -if($B.repr.enter(self)){return klass_name+"(...)"} -for(var item of set_iter(self)){var r=_b_.repr(item) -if(r===self ||r===item){res.push("{...}")} -else{res.push(r)}} -res=res.join(", ") -$B.repr.leave(self) -return head+res+tail} -set.__ror__=function(self,other){ -return set.__or__(self,other)} -set.__rsub__=function(self,other){ -return set.__sub__(self,other)} -set.__rxor__=function(self,other){ -return set.__xor__(self,other)} -set.__sub__=function(self,other,accept_iter){ -if(! _b_.isinstance(other,[set,frozenset])){return _b_.NotImplemented} -return set_difference(self,other)} -set.__xor__=function(self,other,accept_iter){ -if(! _b_.isinstance(other,[set,frozenset])){return _b_.NotImplemented} -var res=make_new_set() -for(var entry of set_iter_with_hash(self)){if(! set_contains(other,entry.item,entry.hash)){set_add(res,entry.item,entry.hash)}} -for(var entry of set_iter_with_hash(other)){if(! set_contains(self,entry.item,entry.hash)){set_add(res,entry.item,entry.hash)}} -res.__class__=self.__class__ -return res} -$B.make_rmethods(set) -set.add=function(){var $=$B.args("add",2,{self:null,item:null},["self","item"],arguments,{},null,null),self=$.self,item=$.item -set_add(self,item) -return _b_.None} -set.clear=function(){var $=$B.args("clear",1,{self:null},["self"],arguments,{},null,null) -$.self.$used=0 -$.self.$store=Object.create(null) -$.self.$version++ -return $N} -set.copy=function(self){$B.check_nb_args_no_kw('copy',1,arguments) -return set_copy(self)} -set.difference_update=function(self){var $=$B.args("difference_update",1,{self:null},["self"],arguments,{},"args",null) -for(var arg of $.args){set_difference_update(self,arg)} -self.$version++ -return _b_.None} -set.discard=function(){var $=$B.args("discard",2,{self:null,item:null},["self","item"],arguments,{},null,null) -var result=set_discard_entry($.self,$.item) -if(result !=DISCARD_NOTFOUND){self.$version++} -return _b_.None} -set.intersection_update=function(){ -var $=$B.args("intersection_update",1,{self:null},["self"],arguments,{},"args",null),self=$.self,args=$.args -var temp=set_intersection_multi(self,args) -set_swap_bodies(self,temp) -self.$version++ -return _b_.None} -set.isdisjoint=function(){ -var $=$B.args("isdisjoint",2,{self:null,other:null},["self","other"],arguments,{},null,null),self=$.self,other=$.other -var intersection=set_intersection(self,other) -return intersection.$used==0} -set.pop=function(self){for(var hash in self.$store){} -if(hash===undefined){throw _b_.KeyError.$factory('pop from an empty set')} -var item -item=self.$store[hash].pop() -if(self.$store[hash].length==0){delete self.$store[hash]} -self.$used-- -self.$version++ -return item} -set.remove=function(self,item){ -var $=$B.args("remove",2,{self:null,item:null},["self","item"],arguments,{},null,null),self=$.self,item=$.item -var result=set_discard_entry(self,item) -if(result==DISCARD_NOTFOUND){throw _b_.KeyError.$factory(item)} -self.$version++ -return _b_.None} -set.symmetric_difference_update=function(self,s){ -var $=$B.args("symmetric_difference_update",2,{self:null,s:null},["self","s"],arguments,{},null,null),self=$.self,s=$.s -return set_symmetric_difference_update(self,s)} -set.update=function(self){ -var $=$B.args("update",1,{self:null},["self"],arguments,{},"args",null) -for(var iterable of $.args){if(Array.isArray(iterable)){for(var i=0;i < iterable.length;i++){set_add(self,iterable[i])}}else if(_b_.isinstance(iterable,[set,frozenset])){for(var entry of set_iter_with_hash(iterable)){set_add(self,entry.item,entry.hash)}}else if(_b_.isinstance(iterable,_b_.dict)){for(var entry of _b_.dict.$iter_items_with_hash(iterable)){set_add(self,entry.key,entry.hash)}}else{var frame=$B.last($B.frames_stack),iterator=$B.make_js_iterator(iterable,frame,frame.$lineno) -for(var item of iterator){set_add(self,item)}}} -self.$version++ -return _b_.None} -set.difference=function(){var $=$B.args("difference",1,{self:null},["self"],arguments,{},"args",null) -if($.args.length==0){return set.copy($.self)} -var res=set_copy($.self) -for(var arg of $.args){if(_b_.isinstance(arg,[set,frozenset])){for(var entry of set_iter_with_hash(arg)){set_discard_entry(res,entry.item,entry.hash)}}else{var other=set.$factory(arg) -res=set.difference(res,other)}} -return res} -set.intersection=function(){var $=$B.args("difference",1,{self:null},["self"],arguments,{},"args",null) -if($.args.length==0){return set.copy($.self)} -return set_intersection_multi($.self,$.args)} -set.symmetric_difference=function(self,other){ -var $=$B.args("symmetric_difference",2,{self:null,other:null},["self","other"],arguments,{},null,null) -var res=set_copy(self) -set_symmetric_difference_update(res,other) -return res} -set.union=function(self){var $=$B.args("union",1,{self:null},["self"],arguments,{},"args",null) -var res=set_copy($.self) -if($.args.length==0){return res} -for(var arg of $.args){if(_b_.isinstance(arg,[set,frozenset])){for(var entry of set_iter_with_hash(arg)){set_add(res,entry.item,entry.hash)}}else if(arg.__class__===_b_.dict){ -for(var entry of _b_.dict.$iter_items_with_hash(arg)){set_add(res,entry.key,entry.hash)}}else{var other=set.$factory(arg) -res=set.union(res,other)}} -return res} -set.issubset=function(){ -var $=$B.args("issubset",2,{self:null,other:null},["self","other"],arguments,{},"args",null),self=$.self,other=$.other -if(_b_.isinstance(other,[set,frozenset])){if(set.__len__(self)> set.__len__(other)){return false} -for(var entry of set_iter_with_hash(self)){if(! set_lookkey(other,entry.item,entry.hash)){return false}} -return true}else if(_b_.isinstance(other,_b_.dict)){for(var entry of _b_.dict.$iter_items_with_hash(self)){if(! set_lookkey(other,entry.key,entry.hash)){return false}} -return true}else{var member_func=$B.member_func(other) -for(var entry of set_iter_with_hash(self)){if(! member_func(entry.item)){return false}} -return true}} -set.issuperset=function(){ -var $=$B.args("issuperset",2,{self:null,other:null},["self","other"],arguments,{},"args",null),self=$.self,other=$.other -if(_b_.isinstance(other,[set,frozenset])){return set.issubset(other,self)}else{return set.issubset(set.$factory(other),self)}} -set.__iand__=function(self,other){if(! _b_.isinstance(other,[set,frozenset])){return _b_.NotImplemented} -set.intersection_update(self,other) -return self} -set.__isub__=function(self,other){if(! _b_.isinstance(other,[set,frozenset])){return _b_.NotImplemented} -set_difference_update(self,other) -return self} -set.__ixor__=function(self,other){if(! _b_.isinstance(other,[set,frozenset])){return _b_.NotImplemented} -set.symmetric_difference_update(self,other) -return self} -set.__ior__=function(self,other){if(! _b_.isinstance(other,[set,frozenset])){return _b_.NotImplemented} -set.update(self,other) -return self} -set.$literal=function(items){var res=make_new_set(set) -for(var item of items){if(item.constant){set_add(res,item.constant[0],item.constant[1])}else if(item.starred){for(var item of $B.make_js_iterator(item.starred)){set_add(res,item)}}else{set_add(res,item.item)}} -return res} -set.$factory=function(){var args=[set].concat(Array.from(arguments)),self=set.__new__.apply(null,args) -set.__init__(self,...arguments) -return self} -$B.set_func_names(set,"builtins") -set.__class_getitem__=_b_.classmethod.$factory(set.__class_getitem__) -var frozenset=$B.make_class('frozenset') -frozenset.$native=true -for(var attr in set){switch(attr){case "add": -case "clear": -case "discard": -case "pop": -case "remove": -case "update": -break -default: -if(frozenset[attr]==undefined){if(typeof set[attr]=="function"){frozenset[attr]=(function(x){return function(){return set[x].apply(null,arguments)}})(attr)}else{frozenset[attr]=set[attr]}}}} -frozenset.__hash__=function(self){if(self===undefined){return frozenset.__hashvalue__ ||$B.$py_next_hash--} -if(self.__hashvalue__ !==undefined){return self.__hashvalue__} -var _hash=1927868237 -_hash*=self.$used -for(var entry of set_iter_with_hash(self)){var _h=entry.hash -_hash ^=((_h ^ 89869747)^(_h << 16))*3644798167} -_hash=_hash*69069+907133923 -if(_hash==-1){_hash=590923713} -return self.__hashvalue__=_hash} -frozenset.__init__=function(){ -return _b_.None} -frozenset.__new__=function(cls,iterable){if(cls===undefined){throw _b_.TypeError.$factory("frozenset.__new__(): not enough arguments")} -var self=make_new_set(cls) -if(iterable===undefined){return self} -$B.check_nb_args_no_kw('__new__',2,arguments) -if(cls===frozenset && iterable.__class__===frozenset){return iterable} -set.update(self,iterable) -return self} -frozenset.__repr__=function(self){$B.builtins_repr_check(frozenset,arguments) -return set_repr(self)} -frozenset.copy=function(self){if(self.__class__===frozenset){return self} -return set_copy(self)} -var singleton_id=Math.floor(Math.random()*Math.pow(2,40)) -function empty_frozenset(){var res=frozenset.__new__(frozenset) -res.$id=singleton_id -return res} -frozenset.$factory=function(){var args=[frozenset].concat(Array.from(arguments)),self=frozenset.__new__.apply(null,args) -frozenset.__init__(self,...arguments) -return self} -$B.set_func_names(frozenset,"builtins") -_b_.set=set -_b_.frozenset=frozenset})(__BRYTHON__) -; - -;(function($B){var _b_=$B.builtins,_window=self -var Module=$B.module=$B.make_class("module",function(name,doc,$package){return{ -__class__:Module,__builtins__:_b_.__builtins__,__name__:name,__doc__:doc ||_b_.None,__package__:$package ||_b_.None}} -) -Module.__dir__=function(self){if(self.__dir__){return $B.$call(self.__dir__)()} -return _b_.object.__dir__(self)} -Module.__new__=function(cls,name,doc,$package){return{ -__class__:cls,__builtins__:_b_.__builtins__,__name__:name,__doc__:doc ||_b_.None,__package__:$package ||_b_.None}} -Module.__repr__=Module.__str__=function(self){var res=""} -Module.__setattr__=function(self,attr,value){if(self.__name__=="__builtins__"){ -$B.builtins[attr]=value}else{self[attr]=value}} -$B.set_func_names(Module,"builtins") -$B.make_import_paths=function(filename){ -var elts=filename.split('/') -elts.pop() -var script_dir=elts.join('/'),path=[$B.brython_path+'Lib',$B.brython_path+'libs',script_dir,$B.brython_path+'Lib/site-packages'] -var meta_path=[],path_hooks=[] -if($B.use_VFS){meta_path.push($B.finders.VFS)} -var static_stdlib_import=$B.get_option_from_filename('static_stdlib_import',filename) -if(static_stdlib_import !==false && $B.protocol !="file"){ -meta_path.push($B.finders.stdlib_static) -if(path.length > 3){path.shift() -path.shift()}} -var pythonpath=$B.get_option_from_filename('pythonpath',filename) -if(pythonpath){ -var ix=path.indexOf($B.script_dir) -if(ix===-1){console.log('bizarre',path,$B.script_dir)}else{path.splice(ix,1,...pythonpath)}} -if($B.protocol !=="file"){meta_path.push($B.finders.path) -path_hooks.push($B.url_hook)} -$B.import_info[filename]={meta_path,path_hooks,path}} -function $download_module(mod,url,$package){var xhr=new XMLHttpRequest(),fake_qs="?v="+(new Date().getTime()),res=null,mod_name=mod.__name__ -if(mod_name=='exec'){console.log('download exec ???',$B.frames_stack.slice())} -var timer=_window.setTimeout(function(){xhr.abort()},5000) -if($B.get_option('cache')){xhr.open("GET",url,false)}else{xhr.open("GET",url+fake_qs,false)} -xhr.send() -if($B.$CORS){if(xhr.status==200 ||xhr.status==0){res=xhr.responseText}else{res=_b_.ModuleNotFoundError.$factory("No module named '"+ -mod_name+"'")}}else{if(xhr.readyState==4){if(xhr.status==200){res=xhr.responseText -mod.$last_modified= -xhr.getResponseHeader("Last-Modified")}else{ -console.info("Error "+xhr.status+ -" means that Python module "+mod_name+ -" was not found at url "+url) -res=_b_.ModuleNotFoundError.$factory("No module named '"+ -mod_name+"'")}}} -_window.clearTimeout(timer) -if(res==null){throw _b_.ModuleNotFoundError.$factory("No module named '"+ -mod_name+"' (res is null)")} -if(res.constructor===Error){throw res} -return res} -$B.$download_module=$download_module -function import_js(mod,path){try{var module_contents=$download_module(mod,path,undefined)}catch(err){return null} -run_js(module_contents,path,mod) -return true} -function run_js(module_contents,path,_module){ -var module_id="$locals_"+_module.__name__.replace(/\./g,'_') -try{var $module=new Function(module_id,module_contents+ -";\nreturn $module")(_module)}catch(err){console.log(err) -console.log(path,_module) -throw err} -try{$module}catch(err){console.log("no $module") -throw _b_.ImportError.$factory("name '$module' not defined in module")} -$module.__name__=_module.__name__ -for(var attr in $module){if(typeof $module[attr]=="function"){$module[attr].$infos={__module__:_module.__name__,__name__:attr,__qualname__:attr} -$module[attr].$in_js_module=true}else if(_b_.isinstance($module[attr],_b_.type)&& -! $module[attr].hasOwnProperty('__module__')){$module[attr].__module__=_module.__name__}} -if(_module !==undefined){ -for(var attr in $module){_module[attr]=$module[attr]} -$module=_module -$module.__class__=Module }else{ -$module.__class__=Module -$module.__name__=_module.__name__ -$module.__repr__=$module.__str__=function(){if($B.builtin_module_names.indexOf(_module.name)>-1){return ""} -return ""} -if(_module.name !="builtins"){ -$module.__file__=path}} -$B.imported[_module.__name__]=$module -return true} -function show_ns(){var kk=Object.keys(_window) -for(var i=0,len=kk.length;i < len;i++){console.log(kk[i]) -if(kk[i].charAt(0)=="$"){console.log(eval(kk[i]))}} -console.log("---")} -function run_py(module_contents,path,module,compiled){ -$B.file_cache[path]=module_contents -$B.url2name[path]=module.__name__ -var root,js,mod_name=module.__name__ -if(! compiled){var $Node=$B.$Node,$NodeJSCtx=$B.$NodeJSCtx -var src={src:module_contents,filename:path,imported:true} -try{root=$B.py2js(src,module,module.__name__,$B.builtins_scope)}catch(err){err.$stack=$B.frames_stack.slice() -if($B.get_option('debug',err)> 1){console.log('error in imported module',module) -console.log('stack',$B.frames_stack.slice())} -throw err}} -try{js=compiled ? module_contents :root.to_js() -if($B.get_option('debug')==10){console.log("code for module "+module.__name__) -console.log($B.format_indent(js,0))} -var src=js -js="var $module = (function(){\n"+js -var prefix='locals_' -js+='return '+prefix -js+=module.__name__.replace(/\./g,"_")+"})(__BRYTHON__)\n"+ -"return $module" -var module_id=prefix+module.__name__.replace(/\./g,'_') -var mod=(new Function(module_id,js))(module)}catch(err){err.$stack=$B.frames_stack.slice() -if($B.get_option('debug',err)> 2){console.log(err+" for module "+module.__name__) -console.log("module",module) -console.log(root) -if($B.get_option('debug',err)> 1){console.log($B.format_indent(js,0))} -for(var attr in err){console.log(attr,err[attr])} -console.log("message: "+err.$message) -console.log("filename: "+err.fileName) -console.log("linenum: "+err.lineNumber) -console.log(err.stack)} -throw err} -try{ -for(var attr in mod){module[attr]=mod[attr]} -module.__initializing__=false -$B.imported[module.__name__]=module -return{ -content:src,name:mod_name,imports:Object.keys(root.imports).join(",")}}catch(err){console.log(""+err+" "+" for module "+module.__name__) -for(var attr in err){console.log(attr+" "+err[attr])} -if($B.get_option('debug')> 0){console.log("line info "+__BRYTHON__.line_info)} -throw err}} -$B.run_py=run_py -$B.run_js=run_js -var ModuleSpec=$B.make_class("ModuleSpec",function(fields){fields.__class__=ModuleSpec -return fields} -) -ModuleSpec.__str__=ModuleSpec.__repr__=function(self){var res=`ModuleSpec(name='${self.name}', `+ -`loader=${_b_.str.$factory(self.loader)}, `+ -`origin='${self.origin}'` -if(self.submodule_search_locations !==_b_.None){res+=`, submodule_search_locations=`+ -`${_b_.str.$factory(self.submodule_search_locations)}`} -return res+')'} -$B.set_func_names(ModuleSpec,"builtins") -function parent_package(mod_name){ -var parts=mod_name.split(".") -parts.pop() -return parts.join(".")} -var VFSFinder=$B.make_class("VFSFinder",function(){return{ -__class__:VFSFinder}} -) -VFSFinder.find_spec=function(cls,fullname,path){var stored,is_package,timestamp -if(!$B.use_VFS){return _b_.None} -stored=$B.VFS[fullname] -if(stored===undefined){return _b_.None} -is_package=stored[3]||false -timestamp=stored.timestamp -if(stored){var is_builtin=$B.builtin_module_names.indexOf(fullname)>-1 -return ModuleSpec.$factory({name :fullname,loader:VFSLoader.$factory(), -origin :is_builtin? "built-in" :"brython_stdlib", -submodule_search_locations:is_package?[]:_b_.None,loader_state:{stored:stored,timestamp:timestamp}, -cached:_b_.None,parent:is_package? fullname :parent_package(fullname),has_location:_b_.False})}} -$B.set_func_names(VFSFinder,"") -for(var method in VFSFinder){if(typeof VFSFinder[method]=="function"){VFSFinder[method]=_b_.classmethod.$factory( -VFSFinder[method])}} -VFSLoader=$B.make_class("VFSLoader",function(){return{ -__class__:VFSLoader}} -) -VFSLoader.create_module=function(self,spec){ -return _b_.None} -VFSLoader.exec_module=function(self,modobj){ -var stored=modobj.__spec__.loader_state.stored,timestamp=modobj.__spec__.loader_state.timestamp -var ext=stored[0],module_contents=stored[1],imports=stored[2] -modobj.$is_package=stored[3]||false -var path="VFS."+modobj.__name__ -path+=modobj.$is_package ? "/__init__.py" :ext -modobj.__file__=path -$B.file_cache[modobj.__file__]=$B.VFS[modobj.__name__][1] -$B.url2name[modobj.__file__]=modobj.__name__ -if(ext=='.js'){run_js(module_contents,modobj.__path__,modobj)}else if($B.precompiled.hasOwnProperty(modobj.__name__)){if($B.get_option('debug')> 1){console.info("load",modobj.__name__,"from precompiled")} -var parts=modobj.__name__.split(".") -for(var i=0;i < parts.length;i++){var parent=parts.slice(0,i+1).join(".") -if($B.imported.hasOwnProperty(parent)&& -$B.imported[parent].__initialized__){continue} -var mod_js=$B.precompiled[parent],is_package=modobj.$is_package -if(mod_js===undefined){ -continue} -if(Array.isArray(mod_js)){mod_js=mod_js[0]} -var mod=$B.imported[parent]=Module.$factory(parent,undefined,is_package) -mod.__initialized__=true -mod.__spec__=modobj.__spec__ -if(is_package){mod.__path__="" -mod.__package__=parent -mod.$is_package=true}else{var elts=parent.split(".") -elts.pop() -mod.__package__=elts.join(".")} -mod.__file__=path -try{var parent_id=parent.replace(/\./g,"_"),prefix='locals_' -mod_js+="return "+prefix+parent_id -var $module=new Function(prefix+parent_id,mod_js)( -mod)}catch(err){if($B.get_option('debug')> 1){console.log('error in module',mod) -console.log(err) -for(var k in err){console.log(k,err[k])} -console.log(Object.keys($B.imported)) -console.log(modobj,"mod_js",mod_js)} -throw err} -for(var attr in $module){mod[attr]=$module[attr]} -$module.__file__=path -if(i > 0){ -$B.builtins.setattr( -$B.imported[parts.slice(0,i).join(".")],parts[i],$module)}} -return $module}else{var mod_name=modobj.__name__ -if($B.get_option('debug')> 1){console.log("run Python code from VFS",mod_name)} -var record=run_py(module_contents,modobj.__file__,modobj) -record.imports=imports.join(',') -record.is_package=modobj.$is_package -record.timestamp=$B.timestamp -record.source_ts=timestamp -$B.precompiled[mod_name]=record.is_package ?[record.content]: -record.content -var elts=mod_name.split(".") -if(elts.length > 1){elts.pop()} -if($B.$options.indexedDB && $B.indexedDB && -$B.idb_name){ -var idb_cx=indexedDB.open($B.idb_name) -idb_cx.onsuccess=function(evt){var db=evt.target.result,tx=db.transaction("modules","readwrite"),store=tx.objectStore("modules"),cursor=store.openCursor(),request=store.put(record) -request.onsuccess=function(){if($B.get_option('debug')> 1){console.info(modobj.__name__,"stored in db")}} -request.onerror=function(){console.info("could not store "+modobj.__name__)}}}}} -$B.set_func_names(VFSLoader,"builtins") -var finder_cpython={__class__:_b_.type,__mro__:[_b_.object],__qualname__:'CPythonFinder',$infos:{__module__:"builtins",__name__:"CPythonFinder"},create_module :function(cls,spec){ -return _b_.None},exec_module :function(cls,modobj){console.log("exec PYthon module",modobj) -var loader_state=modobj.__spec__.loader_state -var content=loader_state.content -delete modobj.__spec__["loader_state"] -modobj.$is_package=loader_state.is_package -modobj.__file__=loader_state.__file__ -$B.file_cache[modobj.__file__]=content -$B.url2file[modobj.__file__]=modobj.__name__ -var mod_name=modobj.__name__ -if($B.get_option('debug')> 1){console.log("run Python code from CPython",mod_name)} -run_py(content,modobj.__path__,modobj)},find_module:function(cls,name,path){return{ -__class__:Loader,load_module:function(name,path){var spec=cls.find_spec(cls,name,path) -var mod=Module.$factory(name) -$B.imported[name]=mod -mod.__spec__=spec -cls.exec_module(cls,mod)}}},find_spec :function(cls,fullname,path){console.log("finder cpython",fullname) -var xhr=new XMLHttpRequest(),url="/cpython_import?module="+fullname,result -xhr.open("GET",url,false) -xhr.onreadystatechange=function(){if(this.readyState==4 && this.status==200){var data=JSON.parse(this.responseText) -result=ModuleSpec.$factory({name :fullname,loader:cls, -origin :"CPython", -submodule_search_locations:data.is_package?[]:_b_.None,loader_state:{content:data.content}, -cached:_b_.None,parent:data.is_package? fullname :parent_package(fullname),has_location:_b_.False})}} -xhr.send() -return result}} -$B.set_func_names(finder_cpython,"") -for(var method in finder_cpython){if(typeof finder_cpython[method]=="function"){finder_cpython[method]=_b_.classmethod.$factory( -finder_cpython[method])}} -finder_cpython.$factory=function(){return{__class__:finder_cpython}} -var StdlibStaticFinder=$B.make_class("StdlibStaticFinder",function(){return{ -__class__:StdlibStaticFinder}} -) -StdlibStaticFinder.find_spec=function(self,fullname,path){ -if($B.stdlib && $B.get_option('static_stdlib_import')){var address=$B.stdlib[fullname] -if(address===undefined){var elts=fullname.split(".") -if(elts.length > 1){elts.pop() -var $package=$B.stdlib[elts.join(".")] -if($package && $package[1]){address=["py"]}}} -if(address !==undefined){var ext=address[0],is_pkg=address[1]!==undefined,path=$B.brython_path+ -((ext=="py")? "Lib/" :"libs/")+ -fullname.replace(/\./g,"/"),metadata={ext:ext,is_package:is_pkg,path:path+(is_pkg? "/__init__.py" : -((ext=="py")? ".py" :".js")),address:address},_module=Module.$factory(fullname) -metadata.code=$download_module(_module,metadata.path) -var res=ModuleSpec.$factory({name :fullname,loader:PathLoader.$factory(), -origin :metadata.path,submodule_search_locations:is_pkg?[path]:_b_.None,loader_state:metadata, -cached:_b_.None,parent:is_pkg ? fullname :parent_package(fullname),has_location:_b_.True}) -return res}} -return _b_.None} -$B.set_func_names(StdlibStaticFinder,"") -for(var method in StdlibStaticFinder){if(typeof StdlibStaticFinder[method]=="function"){StdlibStaticFinder[method]=_b_.classmethod.$factory( -StdlibStaticFinder[method])}} -StdlibStaticFinder.$factory=function(){return{__class__:StdlibStaticFinder}} -var PathFinder=$B.make_class("PathFinder",function(){return{ -__class__:PathFinder}} -) -PathFinder.find_spec=function(cls,fullname,path){if($B.VFS && $B.VFS[fullname]){ -return _b_.None} -if($B.is_none(path)){ -path=get_info('path')} -for(var i=0,li=path.length;i < li;++i){var path_entry=path[i] -if(path_entry[path_entry.length-1]!="/"){path_entry+="/"} -var finder=$B.path_importer_cache[path_entry] -if(finder===undefined){ -var path_hooks=get_info('path_hooks') -for(var j=0,lj=path_hooks.length;j < lj;++j){var hook=path_hooks[j] -try{finder=$B.$call(hook)(path_entry) -$B.path_importer_cache[path_entry]=finder -break}catch(e){if(e.__class__ !==_b_.ImportError){throw e}}}} -if($B.is_none(finder)){continue} -var find_spec=$B.$getattr(finder,"find_spec"),spec=$B.$call(find_spec)(fullname) -if(!$B.is_none(spec)){return spec}} -return _b_.None} -$B.set_func_names(PathFinder,"") -for(var method in PathFinder){if(typeof PathFinder[method]=="function"){PathFinder[method]=_b_.classmethod.$factory( -PathFinder[method])}} -var PathEntryFinder=$B.make_class("PathEntryFinder",function(path_entry,hint){return{ -__class__:PathEntryFinder,path_entry:path_entry,hint:hint}} -) -PathEntryFinder.find_spec=function(self,fullname){ -var loader_data={},notfound=true,hint=self.hint,base_path=self.path_entry+fullname.match(/[^.]+$/g)[0],modpaths=[],py_ext=$B.get_option('python_extension') -var tryall=hint===undefined -if(tryall ||hint=='py'){ -modpaths=modpaths.concat([[base_path+py_ext,"py",false],[base_path+"/__init__"+py_ext,"py",true]])} -for(var j=0;notfound && j < modpaths.length;++j){try{var file_info=modpaths[j],module={__name__:fullname,$is_package:false} -loader_data.code=$download_module(module,file_info[0],undefined) -notfound=false -loader_data.ext=file_info[1] -loader_data.is_package=file_info[2] -if(hint===undefined){self.hint=file_info[1] -$B.path_importer_cache[self.path_entry]=self} -if(loader_data.is_package){ -$B.path_importer_cache[base_path+'/']= -$B.$call(url_hook)(base_path+'/',self.hint)} -loader_data.path=file_info[0]}catch(err){if(err.__class__ !==_b_.ModuleNotFoundError){throw err}}} -if(!notfound){return ModuleSpec.$factory({name :fullname,loader:PathLoader.$factory(),origin :loader_data.path, -submodule_search_locations:loader_data.is_package? -[base_path]:_b_.None,loader_state:loader_data, -cached:_b_.None,parent:loader_data.is_package? fullname : -parent_package(fullname),has_location:_b_.True})} -return _b_.None} -$B.set_func_names(PathEntryFinder,"builtins") -var PathLoader=$B.make_class("PathLoader",function(){return{ -__class__:PathLoader}} -) -PathLoader.create_module=function(self,spec){ -return _b_.None} -PathLoader.exec_module=function(self,module){ -var metadata=module.__spec__.loader_state -module.$is_package=metadata.is_package -if(metadata.ext=="py"){run_py(metadata.code,metadata.path,module)}else{run_js(metadata.code,metadata.path,module)}} -var url_hook=$B.url_hook=function(path_entry){ -path_entry=path_entry.endsWith("/")? path_entry :path_entry+"/" -return PathEntryFinder.$factory(path_entry)} -function get_info(info){var filename=$B.get_filename(),import_info=$B.import_info[filename] -if(import_info===undefined && info=='meta_path'){$B.make_import_paths(filename)} -return $B.import_info[filename][info]} -function import_engine(mod_name,_path,from_stdlib){ -var meta_path=get_info('meta_path').slice(),_sys_modules=$B.imported,_loader,spec -if(from_stdlib){ -var path_ix=meta_path.indexOf($B.finders["path"]) -if(path_ix >-1){meta_path.splice(path_ix,1)}} -for(var i=0,len=meta_path.length;i < len;i++){var _finder=meta_path[i],find_spec=$B.$getattr(_finder,"find_spec",_b_.None) -if(find_spec==_b_.None){ -var find_module=$B.$getattr(_finder,"find_module",_b_.None) -if(find_module !==_b_.None){_loader=find_module(mod_name,_path) -if(_loader !==_b_.None){ -var load_module=$B.$getattr(_loader,"load_module"),module=$B.$call(load_module)(mod_name) -_sys_modules[mod_name]=module -return module}}}else{spec=find_spec(mod_name,_path) -if(!$B.is_none(spec)){module=$B.imported[spec.name] -if(module !==undefined){ -return _sys_modules[spec.name]=module} -_loader=$B.$getattr(spec,"loader",_b_.None) -break}}} -if(_loader===undefined){ -message=mod_name -if($B.protocol=="file"){message+=" (warning: cannot import local files with protocol 'file')"} -var exc=_b_.ModuleNotFoundError.$factory(message) -exc.name=mod_name -throw exc} -if($B.is_none(module)){if(spec===_b_.None){throw _b_.ModuleNotFoundError.$factory(mod_name)} -var _spec_name=$B.$getattr(spec,"name") -if(!$B.is_none(_loader)){var create_module=$B.$getattr(_loader,"create_module",_b_.None) -if(!$B.is_none(create_module)){module=$B.$call(create_module)(spec)}} -if(module===undefined){throw _b_.ImportError.$factory(mod_name)} -if($B.is_none(module)){ -module=$B.module.$factory(mod_name) -var mod_desc=$B.$getattr(spec,"origin") -if($B.$getattr(spec,"has_location")){mod_desc="from '"+mod_desc+"'"}else{mod_desc="("+mod_desc+")"}}} -module.__name__=_spec_name -module.__loader__=_loader -module.__package__=$B.$getattr(spec,"parent","") -module.__spec__=spec -var locs=$B.$getattr(spec,"submodule_search_locations") -if(module.$is_package=!$B.is_none(locs)){module.__path__=locs} -if($B.$getattr(spec,"has_location")){module.__file__=$B.$getattr(spec,"origin")} -var cached=$B.$getattr(spec,"cached") -if(! $B.is_none(cached)){module.__cached__=cached} -if($B.is_none(_loader)){if(!$B.is_none(locs)){_sys_modules[_spec_name]=module}else{throw _b_.ImportError.$factory(mod_name)}}else{var exec_module=$B.$getattr(_loader,"exec_module",_b_.None) -if($B.is_none(exec_module)){ -module=$B.$getattr(_loader,"load_module")(_spec_name)}else{_sys_modules[_spec_name]=module -try{exec_module(module)}catch(e){delete _sys_modules[_spec_name] -throw e}}} -return _sys_modules[_spec_name]} -$B.path_importer_cache={} -function import_error(mod_name){var exc=_b_.ImportError.$factory(mod_name) -exc.name=mod_name -throw exc} -$B.$__import__=function(mod_name,globals,locals,fromlist,level){var $test=false -if($test){console.log("__import__",mod_name,'fromlist',fromlist);alert()} -var from_stdlib=false -if(globals.$jsobj && globals.$jsobj.__file__){var file=globals.$jsobj.__file__ -if((file.startsWith($B.brython_path+"Lib/")&& -! file.startsWith($B.brython_path+"Lib/site-packages/"))|| -file.startsWith($B.brython_path+"libs/")|| -file.startsWith("VFS.")){from_stdlib=true}} -var modobj=$B.imported[mod_name],parsed_name=mod_name.split('.'),has_from=fromlist.length > 0 -if(modobj==_b_.None){ -import_error(mod_name)} -if(modobj===undefined){ -if($B.is_none(fromlist)){fromlist=[]} -for(var i=0,modsep="",_mod_name="",len=parsed_name.length-1,__path__=_b_.None;i <=len;++i){var _parent_name=_mod_name; -_mod_name+=modsep+parsed_name[i] -modsep="." -var modobj=$B.imported[_mod_name] -if($test){console.log("iter",i,_mod_name,"\nmodobj",modobj,"\n__path__",__path__,Array.isArray(__path__)) -alert()} -if(modobj==_b_.None){ -import_error(_mod_name)}else if(modobj===undefined){try{import_engine(_mod_name,__path__,from_stdlib)}catch(err){delete $B.imported[_mod_name] -throw err} -if($B.is_none($B.imported[_mod_name])){import_error(_mod_name)}else{ -if(_parent_name){_b_.setattr($B.imported[_parent_name],parsed_name[i],$B.imported[_mod_name])}}}else if($B.imported[_parent_name]&& -$B.imported[_parent_name][parsed_name[i]]===undefined){ -_b_.setattr($B.imported[_parent_name],parsed_name[i],$B.imported[_mod_name])} -if(i < len){try{__path__=$B.$getattr($B.imported[_mod_name],"__path__")}catch(e){ -if(i==len-1 && -$B.imported[_mod_name][parsed_name[len]]&& -$B.imported[_mod_name][parsed_name[len]].__class__=== -$B.module){return $B.imported[_mod_name][parsed_name[len]]} -if(has_from){ -import_error(mod_name)}else{ -var exc=_b_.ModuleNotFoundError.$factory() -exc.msg="No module named '"+mod_name+"'; '"+ -_mod_name+"' is not a package" -exc.args=$B.fast_tuple([exc.msg]) -exc.name=mod_name -exc.path=_b_.None -throw exc}}}}}else{if($B.imported[parsed_name[0]]&& -parsed_name.length==2){try{if($B.imported[parsed_name[0]][parsed_name[1]]===undefined){$B.$setattr($B.imported[parsed_name[0]],parsed_name[1],modobj)}}catch(err){console.log("error",parsed_name,modobj) -throw err}}} -if(fromlist.length > 0){ -return $B.imported[mod_name]}else{ -var package=mod_name -while(parsed_name.length > 1){var module=parsed_name.pop(),package=parsed_name.join('.') -if($B.imported[package]===undefined){ -$B.$import(package,globals,locals,[]) -$B.imported[package][module]=$B.imported[mod_name] -mod_name=module}} -return $B.imported[package]}} -$B.$import=function(mod_name,fromlist,aliases,locals){ -var test=false -if(test){console.log('mod name',mod_name,'fromlist',fromlist) -alert()} -if(mod_name=='_frozen_importlib_external'){ -var alias=aliases[mod_name]||mod_name -var imp=$B.$import_from("importlib",["_bootstrap_external"],{_bootstrap_external:alias},0,locals); -var _bootstrap=$B.imported.importlib._bootstrap,_bootstrap_external=$B.imported.importlib['_bootstrap_external'] -_bootstrap_external._set_bootstrap_module(_bootstrap) -_bootstrap._bootstap_external=_bootstrap_external -var _frozen_importlib=$B.imported._frozen_importlib -if(_frozen_importlib){_frozen_importlib._bootstrap_external=_bootstrap_external} -return} -var level=0,frame=$B.last($B.frames_stack),current_module=frame[2],parts=current_module.split('.') -while(mod_name.length > 0 && mod_name.startsWith('.')){level++ -mod_name=mod_name.substr(1) -if(parts.length==0){throw _b_.ImportError.$factory("Parent module '' not loaded, "+ -"cannot perform relative import")} -current_module=parts.join('.') -parts.pop()} -if(level > 0){mod_name=current_module+ -(mod_name.length > 0 ? '.'+mod_name :'')} -var parts=mod_name.split(".") -if(mod_name[mod_name.length-1]=="."){parts.pop()} -var norm_parts=[],prefix=true -for(var i=0,len=parts.length;i < len;i++){var p=parts[i] -if(prefix && p==""){ -elt=norm_parts.pop() -if(elt===undefined){throw _b_.ImportError.$factory("Parent module '' not loaded, "+ -"cannot perform relative import")}}else{prefix=false; -norm_parts.push(p)}} -var mod_name=norm_parts.join(".") -fromlist=fromlist===undefined ?[]:fromlist -aliases=aliases===undefined ?{}:aliases -locals=locals===undefined ?{}:locals -if(test){console.log('step 2, mod_name',mod_name,'fromlist',fromlist) -alert()} -if($B.get_option('debug')==10){console.log("$import "+mod_name) -console.log("use VFS ? "+$B.use_VFS) -console.log("use static stdlib paths ? "+ -$B.get_option('static_stdlib_import'))} -var current_frame=$B.frames_stack[$B.frames_stack.length-1],_globals=current_frame[3],__import__=_globals["__import__"],globals=$B.obj_dict(_globals) -if(__import__===undefined){ -__import__=$B.$__import__} -var importer=typeof __import__=="function" ? -__import__ : -$B.$getattr(__import__,"__call__") -if(test){console.log('use importer',importer,'mod_name',mod_name,'fromlist',fromlist) -alert()} -var modobj=importer(mod_name,globals,undefined,fromlist,0) -if(test){console.log('step 3, mod_name',mod_name,'fromlist',fromlist) -console.log('modobj',modobj) -alert()} -if(! fromlist ||fromlist.length==0){ -var alias=aliases[mod_name] -if(alias){locals[alias]=$B.imported[mod_name]}else{locals[norm_parts[0]]=modobj}}else{var __all__=fromlist,thunk={} -if(fromlist && fromlist[0]=="*"){if(test){console.log('import *',modobj) -alert()} -__all__=$B.$getattr(modobj,"__all__",thunk); -if(__all__ !==thunk){ -aliases={}}} -if(__all__===thunk){ -for(var attr in modobj){if(attr[0]!=="_"){locals[attr]=modobj[attr]}}}else{ -for(var i=0,l=__all__.length;i < l;++i){var name=__all__[i] -var alias=aliases[name]||name -try{ -locals[alias]=$B.$getattr(modobj,name)}catch($err1){if(! $B.is_exc($err1,[_b_.AttributeError])){throw $err1} -try{$B.$getattr(__import__,'__call__')(mod_name+'.'+name,globals,undefined,[],0) -locals[alias]=$B.$getattr(modobj,name)}catch($err3){ -if(mod_name==="__future__"){ -var exc=_b_.SyntaxError.$factory( -"future feature "+name+" is not defined") -throw exc} -var $frame=[mod_name,modobj,mod_name,modobj],suggestion=$B.offer_suggestions_for_name_error({name},$frame) -if($err3.$py_error){$err3.__class__=_b_.ImportError -$err3.args[0]=`cannot import name '${name}' `+ -`from '${mod_name}' (${modobj.__file__})` -$err3.$suggestion=suggestion -throw $err3} -if($B.get_option('debug')> 1){console.log($err3) -console.log($B.last($B.frames_stack))} -throw _b_.ImportError.$factory( -"cannot import name '"+name+"'")}}}} -return locals}} -$B.$import_from=function(module,names,aliases,level,locals){ -var current_module_name=$B.last($B.frames_stack)[2],parts=current_module_name.split('.'),relative=level > 0 -if(relative){ -var current_module=$B.imported[parts.join('.')] -if(current_module===undefined){throw _b_.ImportError.$factory( -'attempted relative import with no known parent package')} -if(! current_module.$is_package){if(parts.length==1){throw _b_.ImportError.$factory( -'attempted relative import with no known parent package')}else{parts.pop() -current_module=$B.imported[parts.join('.')]}} -while(level > 0){var current_module=$B.imported[parts.join('.')] -if(! current_module.$is_package){throw _b_.ImportError.$factory( -'attempted relative import with no known parent package')} -level-- -parts.pop()} -if(module){ -var submodule=current_module.__name__+'.'+module -$B.$import(submodule,[],{},{}) -current_module=$B.imported[submodule]} -if(names.length > 0 && names[0]=='*'){ -for(var key in current_module){if(key.startsWith('$')||key.startsWith('_')){continue} -locals[key]=current_module[key]}}else{for(var name of names){var alias=aliases[name]||name -if(current_module[name]!==undefined){ -locals[alias]=current_module[name]}else{ -var sub_module=current_module.__name__+'.'+name -$B.$import(sub_module,[],{},{}) -locals[alias]=$B.imported[sub_module]}}}}else{ -$B.$import(module,names,aliases,locals)}} -$B.import_all=function(locals,module){ -for(var attr in module){if('_$'.indexOf(attr.charAt(0))==-1){locals[attr]=module[attr]}}} -$B.$meta_path=[VFSFinder,StdlibStaticFinder,PathFinder] -$B.finders={VFS:VFSFinder,stdlib_static:StdlibStaticFinder,path:PathFinder,CPython:finder_cpython} -function optimize_import_for_path(path,filetype){if(path.slice(-1)!="/"){path=path+"/" } -var value=(filetype=='none')? _b_.None : -url_hook(path,filetype) -$B.path_importer_cache[path]=value} -var Loader={__class__:$B.$type,__mro__:[_b_.object],__name__ :"Loader"} -var _importlib_module={__class__ :Module,__name__ :"_importlib",Loader:Loader,VFSFinder:VFSFinder,StdlibStatic:StdlibStaticFinder,ImporterPath:PathFinder,UrlPathFinder:url_hook,optimize_import_for_path :optimize_import_for_path} -_importlib_module.__repr__=_importlib_module.__str__=function(){return ""} -$B.imported["_importlib"]=_importlib_module})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -var unicode_tables=$B.unicode_tables -$B.has_surrogate=function(s){ -for(var i=0;i < s.length;i++){code=s.charCodeAt(i) -if(code >=0xD800 && code <=0xDBFF){return true}} -return false} -var escape2cp={b:'\b',f:'\f',n:'\n',r:'\r',t:'\t',v:'\v'} -$B.surrogates=function(s){var s1='',escaped=false -for(var char of s){if(escaped){var echar=escape2cp[char] -if(echar !==undefined){s1+=echar}else{s1+='\\'+char} -escaped=false}else if(char=='\\'){escaped=true}else{s1+=char}} -var codepoints=[],surrogates=[],j=0 -for(var i=0,len=s1.length;i < len;i++){var cp=s1.codePointAt(i) -if(cp >=0x10000){surrogates.push(j) -i++} -j++} -return surrogates} -$B.String=function(s){var srg=$B.surrogates(s) -return srg.length==0 ? s :$B.make_String(s,srg)} -$B.make_String=function(s,surrogates){if(! Array.isArray(surrogates)){throw Error('not list')} -var res=new String(s) -res.__class__=str -res.surrogates=surrogates -return res} -function pypos2jspos(s,pypos){ -if(s.surrogates===undefined){return pypos} -var nb=0 -while(s.surrogates[nb]< pypos){nb++} -return pypos+nb} -function jspos2pypos(s,jspos){ -if(s.surrogates===undefined){return jspos} -var nb=0 -while(s.surrogates[nb]+nb < jspos){nb++} -return jspos-nb} -function to_string(args){if(typeof args=='string'){return args} -if(Array.isArray(args)){for(var i=0,len=args.length;i < len;i++){args[i]=to_string(args[i])} -return args}else{if(args.__class__ && !(args instanceof String)){return args.$brython_value}else{return args}}} -var str={__class__:_b_.type,__dir__:_b_.object.__dir__,__qualname__:'str',$is_class:true,$native:true} -str.$to_string=to_string -function normalize_start_end($){var len -if(typeof $.self=="string"){len=$.self.length}else{len=str.__len__($.self)} -if($.start===null ||$.start===_b_.None){$.start=0}else if($.start < 0){$.start+=len -$.start=Math.max(0,$.start)} -if($.end===null ||$.end===_b_.None){$.end=len}else if($.end < 0){$.end+=len -$.end=Math.max(0,$.end)} -if(! _b_.isinstance($.start,_b_.int)||! _b_.isinstance($.end,_b_.int)){throw _b_.TypeError.$factory("slice indices must be integers "+ -"or None or have an __index__ method")} -if($.self.surrogates){$.js_start=pypos2jspos($.self,$.start) -$.js_end=pypos2jspos($.self,$.end)}} -function reverse(s){ -return s.split("").reverse().join("")} -function check_str(obj,prefix){if(obj instanceof String ||typeof obj=="string"){return} -if(! _b_.isinstance(obj,str)){throw _b_.TypeError.$factory((prefix ||'')+ -"must be str, not "+$B.class_name(obj))}} -function to_chars(s){ -s=to_string(s) -return Array.from(s)} -function to_codepoints(s){ -if(s.codepoints){return s.codepoints} -var cps=[] -for(var i=0,len=s.length;i < len;i++){var code=s.charCodeAt(i) -if(code >=0xD800 && code <=0xDBFF){var v=0x10000 -v+=(code & 0x03FF)<< 10 -v+=(s.charCodeAt(i+1)& 0x03FF) -cps.push(v) -i++}else{cps.push(code)}} -return s.codepoints=cps} -str.__add__=function(_self,other){if(! _b_.isinstance(other,str)){try{return $B.$getattr(other,"__radd__")(_self)}catch(err){throw _b_.TypeError.$factory("Can't convert "+ -$B.class_name(other)+" to str implicitly")}} -[_self,other]=to_string([_self,other]) -var res=$B.String(_self+other) -return res} -str.__contains__=function(_self,item){if(! _b_.isinstance(item,str)){throw _b_.TypeError.$factory("'in ' requires "+ -"string as left operand, not "+$B.class_name(item))} -[_self,item]=to_string([_self,item]) -if(item.__class__===str ||_b_.isinstance(item,str)){var nbcar=item.length}else{var nbcar=_b_.len(item)} -if(nbcar==0){ -return true} -var len=_self.length -if(len==0){return nbcar==0} -for(var i=0,len=_self.length;i < len;i++){if(_self.substr(i,nbcar)==item){return true}} -return false} -str.__delitem__=function(){throw _b_.TypeError.$factory("'str' object doesn't support item deletion")} -str.__dir__=_b_.object.__dir__ -str.__eq__=function(_self,other){if(_b_.isinstance(other,str)){[_self,other]=to_string([_self,other]) -if(typeof _self=='string' && typeof other=='string'){return _self==other} -if(_self.length !=other.length){return false} -for(var i=0,len=_self.length;i < len;i++){if(_self[i]!=other[i]){return false}} -return true} -return _b_.NotImplemented} -function preformat(_self,fmt){if(fmt.empty){return _b_.str.$factory(_self)} -if(fmt.type && fmt.type !="s"){throw _b_.ValueError.$factory("Unknown format code '"+fmt.type+ -"' for object of type 'str'")} -return _self} -str.__format__=function(_self,format_spec){[_self,format_spec]=to_string([_self,format_spec]) -var fmt=new $B.parse_format_spec(format_spec,_self) -if(fmt.sign !==undefined){throw _b_.ValueError.$factory( -"Sign not allowed in string format specifier")} -if(fmt.precision){_self=_self.substr(0,fmt.precision)} -fmt.align=fmt.align ||"<" -return $B.format_width(preformat(_self,fmt),fmt)} -str.__getitem__=function(_self,arg){_self=to_string(_self) -if(_b_.isinstance(arg,_b_.int)){var len=str.__len__(_self) -var pos=arg -if(arg < 0){pos+=len} -if(pos >=0 && pos < len){var jspos=pypos2jspos(_self,pos) -if(_self.codePointAt(jspos)>=0x10000){return $B.String(_self.substr(jspos,2))}else{return _self[jspos]}} -throw _b_.IndexError.$factory("string index out of range")} -if(_b_.isinstance(arg,_b_.slice)){return _b_.str.$getitem_slice(_self,arg)} -if(_b_.isinstance(arg,_b_.bool)){return _self.__getitem__(_b_.int.$factory(arg))} -throw _b_.TypeError.$factory("string indices must be integers")} -str.$getitem_slice=function(_self,slice){var len=str.__len__(_self),s=_b_.slice.$conv_for_seq(slice,len),start=pypos2jspos(_self,s.start),stop=pypos2jspos(_self,s.stop),step=s.step -var res="",i=null -if(step > 0){if(stop <=start){return ""} -for(var i=start;i < stop;i+=step){res+=_self[i]}}else{if(stop >=start){return ''} -for(var i=start;i > stop;i+=step){res+=_self[i]}} -return $B.String(res)} -var prefix=2,suffix=3,mask=(2**32-1) -str.$nb_str_hash_cache=0 -function fnv(p){if(p.length==0){return 0} -var x=prefix -x=(x ^(p[0]<< 7))& mask -for(var i=0,len=p.length;i < len;i++){x=((1000003*x)^ p[i])& mask} -x=(x ^ p.length)& mask -x=(x ^ suffix)& mask -if(x==-1){x=-2} -return x} -str.$getnewargs=function(self){return $B.fast_tuple([to_string(self)])} -str.__getnewargs__=function(){return str.$getnewargs($B.single_arg('__getnewargs__','self',arguments))} -str.__hash__=function(_self){ -var s=to_string(_self) -return s.split("").reduce(function(a,b){a=((a << 5)-a)+b.charCodeAt(0); -return a & a;},0)} -str.__init__=function(self,arg){ -return _b_.None} -var str_iterator=$B.make_iterator_class("str_iterator") -str.__iter__=function(_self){return str_iterator.$factory(to_chars(_self))} -str.__len__=function(_self){_self=to_string(_self) -if(_self.surrogates===undefined){return _self.length} -if(_self.len !==undefined){return _self.len} -var len=_self.len=_self.length-_self.surrogates.length -return len} -var kwarg_key=new RegExp("([^\\)]*)\\)") -var NotANumber=function(){this.name="NotANumber"} -var number_check=function(s,flags){if(! _b_.isinstance(s,[_b_.int,_b_.float])){var type=flags.conversion_type -throw _b_.TypeError.$factory(`%${type} format: a real number `+ -`is required, not ${$B.class_name(s)}`)}} -var get_char_array=function(size,char){if(size <=0){return ""} -return new Array(size+1).join(char)} -var format_padding=function(s,flags,minus_one){var padding=flags.padding -if(! padding){ -return s} -s=s.toString() -padding=parseInt(padding,10) -if(minus_one){ -padding-=1} -if(! flags.left){return get_char_array(padding-s.length,flags.pad_char)+s}else{ -return s+get_char_array(padding-s.length,flags.pad_char)}} -const max_precision=2**31-4,max_repeat=2**30-1 -var format_int_precision=function(val,flags){var precision=flags.precision -if(! precision){return _b_.str.$factory(val)} -precision=parseInt(precision,10) -if(precision > max_precision){throw _b_.OverflowError.$factory('precision too large')} -var s -if(val.__class__===$B.long_int){s=$B.long_int.to_base(val,10)}else{s=val.toString()} -if(precision-s.length > max_repeat){throw _b_.OverflowError.$factory('precision too large')} -if(s[0]==="-"){return "-"+"0".repeat(Math.max(0,precision-s.length+1))+ -s.slice(1)} -return "0".repeat(Math.max(0,precision-s.length))+s} -var format_float_precision=function(val,upper,flags,modifier){var precision=flags.precision -if(isFinite(val)){return modifier(val,precision,flags,upper)} -if(val===Infinity){val="inf"}else if(val===-Infinity){val="-inf"}else{val="nan"} -if(upper){return val.toUpperCase()} -return val} -var format_sign=function(val,flags){if(flags.sign){if(val >=0 ||isNaN(val)||val===Number.POSITIVE_INFINITY){return "+"}}else if(flags.space){if(val >=0 ||isNaN(val)){return " "}} -return ''} -var str_format=function(val,flags){ -flags.pad_char=" " -return format_padding(str.$factory(val),flags)} -var num_format=function(val,flags){number_check(val,flags) -if(_b_.isinstance(val,_b_.float)){val=parseInt(val.value)}else if(! _b_.isinstance(val,_b_.int)){val=parseInt(val)} -var s=format_int_precision(val,flags) -if(flags.pad_char==="0"){if(val < 0){s=s.substring(1) -return "-"+format_padding(s,flags,true)} -var sign=format_sign(val,flags) -if(sign !==""){return sign+format_padding(s,flags,true)}} -return format_padding(format_sign(val,flags)+s,flags)} -var repr_format=function(val,flags){flags.pad_char=" " -return format_padding(_b_.repr(val),flags)} -var ascii_format=function(val,flags,type){flags.pad_char=" " -var ascii -if(type=='bytes'){var repr=_b_.repr(val) -ascii=_b_.str.encode(repr,'ascii','backslashreplace') -ascii=_b_.bytes.decode(ascii,'ascii')}else{ascii=_b_.ascii(val)} -return format_padding(ascii,flags)} -var _float_helper=function(val,flags){number_check(val,flags) -if(flags.precision===undefined){if(! flags.decimal_point){flags.precision=6}else{flags.precision=0}}else{flags.precision=parseInt(flags.precision,10) -validate_precision(flags.precision)} -return _b_.isinstance(val,_b_.int)? val :val.value} -var trailing_zeros=/(.*?)(0+)([eE].*)/,leading_zeros=/\.(0*)/,trailing_dot=/\.$/ -var validate_precision=function(precision){ -if(precision > 20){precision=20}} -function handle_special_values(value,upper){var special -if(isNaN(value)){special=upper ? "NAN" :"nan"}else if(value==Number.POSITIVE_INFINITY){special=upper ? "INF" :"inf"}else if(value==Number.NEGATIVE_INFINITY){special=upper ? "-INF" :"-inf"} -return special} -var floating_point_format=function(val,upper,flags){val=_float_helper(val,flags) -var special=handle_special_values(val,upper) -if(special){return format_padding(format_sign(val,flags)+special,flags)} -var p=flags.precision -if(p==0){p=1} -var exp_format=val.toExponential(p-1),e_index=exp_format.indexOf('e'),exp=parseInt(exp_format.substr(e_index+1)),res -function remove_zeros(v){if(flags.alternate){return v} -if(v.indexOf('.')>-1){while(v.endsWith('0')){v=v.substr(0,v.length-1)} -if(v.endsWith('.')){v=v.substr(0,v.length-1)}} -return v} -if(-4 <=exp && exp < p){ -flags.precision=Math.max(0,p-1-exp) -res=floating_point_decimal_format(val,upper,flags) -res=remove_zeros(res)}else{ -flags.precision=Math.max(0,p-1) -var delim=upper ? 'E' :'e',exp_fmt=floating_point_exponential_format(val,upper,flags),parts=exp_fmt.split(delim) -parts[0]=remove_zeros(parts[0]) -res=parts.join(delim)} -return format_padding(format_sign(val,flags)+res,flags)} -var roundDownToFixed=$B.roundDownToFixed=function(v,d){if(d==0 && v.toString().indexOf('e')>-1){ -return BigInt(v).toString()} -const mul=Math.pow(10,d); -var is_neg=v < 0 -if(is_neg){v=-v} -var res_floor=(Math.floor(v*mul)/mul).toFixed(d),res_ceil=(Math.ceil(v*mul)/mul).toFixed(d),res -if(v-res_floor==res_ceil-v){ -var last=res_floor[res_floor.length-1] -res=last.match(/[02468]/)? res_floor :res_ceil}else{res=v-res_floor < res_ceil-v ? res_floor :res_ceil} -return is_neg ? '-'+res :res} -var floating_point_decimal_format=function(val,upper,flags){val=_float_helper(val,flags) -var unpadded=format_float_precision(val,upper,flags,function(val,precision,flags){ -var res=roundDownToFixed(val,precision) -if(precision===0 && flags.alternate){res+='.'} -if(Object.is(val,-0)){res='-'+res} -return res}) -return format_padding(format_sign(val,flags)+unpadded,flags)} -var _floating_exp_helper=function(val,precision,flags,upper){var is_neg=false,val_pos=val.toString() -if(val < 0){is_neg=true -val_pos=val_pos.substr(1)}else if(Object.is(val,-0)){is_neg=true} -var parts=val_pos.split('.'),exp=0,exp_sign='+',mant -if(parts[0]=='0'){if(parts[1]){exp_sign='-' -exp++ -var i=0 -while(parts[1][i]=='0'){i++} -exp+=i -mant=parts[1][i] -if(parts[1][i+1]){mant+='.'+parts[1].substr(i+1)}}else{mant='0'}}else{exp=parts[0].length-1 -mant=parts[0][0] -if(parts[0].length > 1){mant+='.'+parts[0].substr(1)+(parts[1]||'')}else if(parts[1]){mant+='.'+parts[1]}} -mant=parseFloat(mant) -mant=roundDownToFixed(parseFloat(mant),precision) -if(parseFloat(mant)==10){ -parts=mant.split('.') -parts[0]='1' -mant=parts.join('.') -exp=parseInt(exp)+1} -if(flags.alternate && mant.indexOf('.')==-1){mant+='.'} -if(exp.toString().length==1){ -exp='0'+exp} -return `${is_neg ? '-' : ''}${mant}${upper ? 'E' : 'e'}${exp_sign}${exp}`} -var floating_point_exponential_format=function(val,upper,flags){val=_float_helper(val,flags) -return format_padding(format_sign(val,flags)+ -format_float_precision(val,upper,flags,_floating_exp_helper),flags)} -$B.formatters={floating_point_format,floating_point_decimal_format,floating_point_exponential_format} -var signed_hex_format=function(val,upper,flags){var ret -if(! _b_.isinstance(val,_b_.int)){throw _b_.TypeError.$factory( -`%X format: an integer is required, not ${$B.class_name(val)}`)} -if(val.__class__===$B.long_int){ret=val.value.toString(16)}else{ret=parseInt(val) -ret=ret.toString(16)} -ret=format_int_precision(ret,flags) -if(upper){ret=ret.toUpperCase()} -if(flags.pad_char==="0"){if(val < 0){ret=ret.substring(1) -ret="-"+format_padding(ret,flags,true)} -var sign=format_sign(val,flags) -if(sign !==""){ret=sign+format_padding(ret,flags,true)}} -if(flags.alternate){if(ret.charAt(0)==="-"){if(upper){ret="-0X"+ret.slice(1)} -else{ret="-0x"+ret.slice(1)}}else{if(upper){ret="0X"+ret} -else{ret="0x"+ret}}} -return format_padding(format_sign(val,flags)+ret,flags)} -var octal_format=function(val,flags){number_check(val,flags) -var ret -if(val.__class__===$B.long_int){ret=$B.long_int.to_base(8)}else{ret=parseInt(val) -ret=ret.toString(8)} -ret=format_int_precision(ret,flags) -if(flags.pad_char==="0"){if(val < 0){ret=ret.substring(1) -ret="-"+format_padding(ret,flags,true)} -var sign=format_sign(val,flags) -if(sign !==""){ret=sign+format_padding(ret,flags,true)}} -if(flags.alternate){if(ret.charAt(0)==="-"){ret="-0o"+ret.slice(1)} -else{ret="0o"+ret}} -return format_padding(ret,flags)} -function series_of_bytes(val,flags){if(val.__class__ && val.__class__.$buffer_protocol){var it=_b_.iter(val),ints=[] -while(true){try{ints.push(_b_.next(it))}catch(err){if(err.__class__===_b_.StopIteration){var b=_b_.bytes.$factory(ints) -return format_padding(_b_.bytes.decode(b,"ascii"),flags)} -throw err}}}else{try{bytes_obj=$B.$getattr(val,"__bytes__")() -return format_padding(_b_.bytes.decode(bytes_obj),flags)}catch(err){if(err.__class__===_b_.AttributeError){throw _b_.TypeError.$factory("%b does not accept '"+ -$B.class_name(val)+"'")} -throw err}}} -var single_char_format=function(val,flags,type){if(type=='bytes'){if(_b_.isinstance(val,_b_.int)){if(val.__class__===$B.long_int ||val < 0 ||val > 255){throw _b_.OverflowError.$factory("%c arg not in range(256)")}}else if(_b_.isinstance(val,[_b_.bytes,_b_.bytearray])){if(val.source.length > 1){throw _b_.TypeError.$factory( -"%c requires an integer in range(256) or a single byte")} -val=val.source[0]}}else{if(_b_.isinstance(val,_b_.str)){if(_b_.str.__len__(val)==1){return val} -throw _b_.TypeError.$factory("%c requires int or char")}else if(! _b_.isinstance(val,_b_.int)){throw _b_.TypeError.$factory("%c requires int or char")} -if((val.__class__===$B.long_int && -(val.value < 0 ||val.value >=0x110000))|| -(val < 0 ||val >=0x110000)){throw _b_.OverflowError.$factory('%c arg not in range(0x110000)')}} -return format_padding(_b_.chr(val),flags)} -var num_flag=function(c,flags){if(c==="0" && ! flags.padding && ! flags.decimal_point && ! flags.left){flags.pad_char="0" -return} -if(!flags.decimal_point){flags.padding=(flags.padding ||"")+c}else{flags.precision=(flags.precision ||"")+c}} -var decimal_point_flag=function(val,flags){if(flags.decimal_point){ -throw new UnsupportedChar()} -flags.decimal_point=true} -var neg_flag=function(val,flags){flags.pad_char=" " -flags.left=true} -var space_flag=function(val,flags){flags.space=true} -var sign_flag=function(val,flags){flags.sign=true} -var alternate_flag=function(val,flags){flags.alternate=true} -var char_mapping={"b":series_of_bytes,"s":str_format,"d":num_format,"i":num_format,"u":num_format,"o":octal_format,"r":repr_format,"a":ascii_format,"g":function(val,flags){return floating_point_format(val,false,flags)},"G":function(val,flags){return floating_point_format(val,true,flags)},"f":function(val,flags){return floating_point_decimal_format(val,false,flags)},"F":function(val,flags){return floating_point_decimal_format(val,true,flags)},"e":function(val,flags){return floating_point_exponential_format(val,false,flags)},"E":function(val,flags){return floating_point_exponential_format(val,true,flags)},"x":function(val,flags){return signed_hex_format(val,false,flags)},"X":function(val,flags){return signed_hex_format(val,true,flags)},"c":single_char_format,"0":function(val,flags){return num_flag("0",flags)},"1":function(val,flags){return num_flag("1",flags)},"2":function(val,flags){return num_flag("2",flags)},"3":function(val,flags){return num_flag("3",flags)},"4":function(val,flags){return num_flag("4",flags)},"5":function(val,flags){return num_flag("5",flags)},"6":function(val,flags){return num_flag("6",flags)},"7":function(val,flags){return num_flag("7",flags)},"8":function(val,flags){return num_flag("8",flags)},"9":function(val,flags){return num_flag("9",flags)},"-":neg_flag," ":space_flag,"+":sign_flag,".":decimal_point_flag,"#":alternate_flag} -var UnsupportedChar=function(){this.name="UnsupportedChar"} -const conversion_flags='#0- +',length_modifiers='hlL',conversion_types='diouxXeEfFgGcrsa' -function parse_mod_format(s,type,pos){var flags={pad_char:' '},len=s.length,start_pos=pos,mo -pos++ -while(pos < len){var char=s[pos] -if(char=='('){var end=s.substr(pos).indexOf(')') -if(end==-1){throw _b_.ValueError.$factory('incomplete format key')}else{flags.mapping_key=s.substr(pos+1,end-1) -pos+=end+1}}else if(conversion_flags.indexOf(char)>-1){flags.conversion_flag=char -if(char=='#'){flags.alternate=true}else if(char=='-'){flags.left=true}else if(char=='+'){flags.sign='+'}else if(char=='0'){flags.pad_char='0'}else if(char==' '){flags.space=true} -pos++}else if(char=='*'){flags.padding='*' -pos++}else if(mo=/^\d+/.exec(s.substr(pos))){flags.padding=mo[0] -pos+=mo[0].length}else if(char=='.'){pos++ -if(s[pos]=='*'){flags.precision='*' -pos++}else if(mo=/^\d+/.exec(s.substr(pos))){flags.precision=mo[0] -pos+=mo[0].length}else{flags.precision="0"}}else if(length_modifiers.indexOf(char)>-1){flags.length_modifier=char -pos++}else if((conversion_types.indexOf(char)>-1)|| -(char=='b' && type=='bytes')){if(type=='bytes'){if(char=='s'){ -char='b'}else if(char=='r'){char='a'}} -flags.conversion_type=char -flags.end=pos -flags.string=s.substring(start_pos,pos+1) -if(flags.left && flags.pad_char=='0'){ -flags.pad_char=' '} -return flags}else{throw _b_.ValueError.$factory(`invalid character in format: ${char}`)}} -throw _b_.ValueError.$factory('invalid format')} -function is_mapping(obj){return _b_.hasattr(obj,'keys')&& _b_.hasattr(obj,'__getitem__')} -$B.printf_format=function(s,type,args){ -var length=s.length,pos=0,argpos=null,getitem -if(_b_.isinstance(args,_b_.tuple)){argpos=0}else{getitem=$B.$getattr(args,"__getitem__",_b_.None)} -var ret='', -nbph=0, -pos=0, -len=s.length -while(pos < len){var fmtpos=s.indexOf("%",pos) -if(fmtpos < 0){ret+=s.substring(pos) -break} -ret+=s.substring(pos,fmtpos) -pos=fmtpos -if(s[pos+1]=='%'){ret+='%' -pos+=2}else{nbph++ -if(nbph > 1){ -if((! _b_.isinstance(args,_b_.tuple))&& -! is_mapping(args)){throw _b_.TypeError.$factory( -"not enough arguments for format string")}} -var fmt=parse_mod_format(s,type,pos) -pos=fmt.end+1 -if(fmt.padding=='*'){ -if(args[argpos]===undefined){throw _b_.ValueError.$factory('no value for field width *')} -fmt.padding=args[argpos] -argpos++} -if(fmt.precision=='*'){ -if(args[argpos]===undefined){throw _b_.ValueError.$factory('no value for precision *')} -fmt.precision=args[argpos] -argpos++} -var func=char_mapping[fmt.conversion_type],value -if(fmt.mapping_key !==undefined){value=getitem(fmt.mapping_key)}else{if(argpos===null){value=args}else{value=args[argpos] -if(value===undefined){throw _b_.TypeError.$factory( -"not enough arguments for format string")} -argpos++}} -ret+=func(value,fmt,type)}} -if(argpos !==null){if(args.length > argpos){throw _b_.TypeError.$factory( -"not enough arguments for format string")}else if(args.length < argpos){throw _b_.TypeError.$factory( -"not all arguments converted during string formatting")}}else if(nbph==0){throw _b_.TypeError.$factory( -"not all arguments converted during string formatting")} -return ret} -str.__mod__=function(_self,args){_self=to_string(_self) -var res=$B.printf_format(_self,'str',args) -return $B.String(res)} -str.__mro__=[_b_.object] -str.__mul__=function(){var $=$B.args("__mul__",2,{self:null,other:null},["self","other"],arguments,{},null,null),_self=to_string($.self) -if(! _b_.isinstance($.other,_b_.int)){throw _b_.TypeError.$factory( -"Can't multiply sequence by non-int of type '"+ -$B.class_name($.other)+"'")} -return _self.repeat($.other < 0 ? 0 :$.other)} -str.__ne__=function(_self,other){var eq=str.__eq__(_self,other) -return eq===_b_.NotImplemented ? eq :! eq} -str.__new__=function(cls,value){if(cls===undefined){throw _b_.TypeError.$factory("str.__new__(): not enough arguments")}else if(cls===_b_.str){return value}else{return{ -__class__:cls,$brython_value:str.$factory(value),__dict__:$B.empty_dict()}}} -str.__repr__=function(_self){ -_self=to_string(_self) -var t=$B.special_string_repr, -repl='',chars=to_chars(_self) -for(var i=0;i < chars.length;i++){var cp=_b_.ord(chars[i]) -if(t[cp]!==undefined){repl+=t[cp]}else if($B.is_unicode_cn(cp)){var s=cp.toString(16) -while(s.length < 4){s='0'+s} -repl+='\\u'+s}else if(cp < 0x20 ||(cp >=0x7f && cp < 0xa0)){cp=cp.toString(16) -if(cp.length < 2){cp='0'+cp} -repl+='\\x'+cp}else if(cp >=0x300 && cp <=0x36F){repl+="\u200B"+chars[i]+' '}else if(cp.toString(16)=='feff'){repl+='\\ufeff'}else{repl+=chars[i]}} -var res=repl -if(res.search('"')==-1 && res.search("'")==-1){return "'"+res+"'"}else if(_self.search('"')==-1){return '"'+res+'"'} -var qesc=new RegExp("'","g") -res="'"+res.replace(qesc,"\\'")+"'" -return res} -str.__rmod__=function(){var $=$B.args('__rmod__',2,{self:null,other:null},['self','other'],arguments,{},null,null) -if(! _b_.isinstance($.other,str)){return _b_.NotImplemented} -return str.__mod__($.other,$.self)} -str.__rmul__=function(_self,other){_self=to_string(_self) -if(_b_.isinstance(other,_b_.int)){other=_b_.int.numerator(other) -var res='' -while(other > 0){res+=_self -other--} -return res} -return _b_.NotImplemented} -str.__setattr__=function(_self,attr,value){if(typeof _self==="string"){if(str.hasOwnProperty(attr)){throw _b_.AttributeError.$factory("'str' object attribute '"+ -attr+"' is read-only")}else{throw _b_.AttributeError.$factory( -"'str' object has no attribute '"+attr+"'")}} -_b_.dict.$setitem(_self.__dict__,attr,value) -return _b_.None} -str.__setitem__=function(self,attr,value){throw _b_.TypeError.$factory( -"'str' object does not support item assignment")} -var combining=[] -for(var cp=0x300;cp <=0x36F;cp++){combining.push(String.fromCharCode(cp))} -var combining_re=new RegExp("("+combining.join("|")+")","g") -str.__str__=function(_self){_self=to_string(_self) -var repl='',chars=to_chars(_self) -if(chars.length==_self.length){return _self.replace(combining_re,"\u200B$1")} -for(var i=0;i < chars.length;i++){var cp=_b_.ord(chars[i]) -if(cp >=0x300 && cp <=0x36F){repl+="\u200B"+chars[i]}else{repl+=chars[i]}} -return repl} -var body=`var _b_ = __BRYTHON__.builtins -if(typeof other !== typeof _self){ - return _b_.NotImplemented}else if(typeof _self == "string"){ - return _self > other}else{ - return _self.$brython_value > other.$brython_value}` -var comps={">":"gt",">=":"ge","<":"lt","<=":"le"} -for(var op in comps){str[`__${comps[op]}__`]=Function('_self','other',body.replace(/>/gm,op))} -str.capitalize=function(){var $=$B.args("capitalize",1,{self},["self"],arguments,{},null,null),_self=to_string($.self) -if(_self.length==0){return ""} -return _self.charAt(0).toUpperCase()+_self.substr(1).toLowerCase()} -str.casefold=function(){var $=$B.args("casefold",1,{self},["self"],arguments,{},null,null),res="",char,cf,_self=to_string($.self),chars=to_chars(_self) -for(var i=0,len=chars.length;i < len;i++){char=chars[i] -cf=$B.unicode_casefold[char] -if(cf){cf.forEach(function(cp){res+=String.fromCharCode(cp)})}else{res+=char.toLowerCase()}} -return res} -str.center=function(){var $=$B.args("center",3,{self:null,width:null,fillchar:null},["self","width","fillchar"],arguments,{fillchar:" "},null,null),_self=to_string($.self) -if($.width <=_self.length){return _self} -var pad=parseInt(($.width-_self.length)/2),res=$.fillchar.repeat(pad) -res+=_self+res -if(res.length < $.width){res+=$.fillchar} -return res} -str.count=function(){var $=$B.args("count",4,{self:null,sub:null,start:null,stop:null},["self","sub","start","stop"],arguments,{start:null,stop:null},null,null),_self,sub -if(! _b_.isinstance($.sub,str)){throw _b_.TypeError.$factory("Can't convert '"+$B.class_name($.sub)+ -"' object to str implicitly")} -[_self,sub]=to_string([$.self,$.sub]) -var substr=_self -if($.start !==null){var _slice -if($.stop !==null){_slice=_b_.slice.$factory($.start,$.stop)}else{_slice=_b_.slice.$factory($.start,_self.length)} -substr=str.__getitem__.apply(null,[_self].concat(_slice))}else{if(_self.length+sub.length==0){return 1}} -if(sub.length==0){if($.start==_self.length){return 1}else if(substr.length==0){return 0} -return substr.length+1} -var n=0,pos=0 -while(pos < substr.length){pos=substr.indexOf(sub,pos) -if(pos >=0){n++ -pos+=sub.length}else{break}} -return n} -str.encode=function(){var $=$B.args("encode",3,{self:null,encoding:null,errors:null},["self","encoding","errors"],arguments,{encoding:"utf-8",errors:"strict"},null,null),_self=to_string($.self) -if($.encoding=="rot13" ||$.encoding=="rot_13"){ -var res="" -for(var i=0,len=_self.length;i < len ;i++){var char=_self.charAt(i) -console.log('char',char) -if(("a" <=char && char <="m")||("A" <=char && char <="M")){res+=String.fromCharCode(char.charCodeAt(0)+13)}else if(("m" < char && char <="z")|| -("M" < char && char <="Z")){res+=String.fromCharCode(char.charCodeAt(0)-13)}else{res+=char}} -return res} -return _b_.bytes.__new__(_b_.bytes,$.self,$.encoding,$.errors)} -str.endswith=function(){ -var $=$B.args("endswith",4,{self:null,suffix:null,start:null,end:null},["self","suffix","start","end"],arguments,{start:0,end:null},null,null),_self -normalize_start_end($); -_self=to_string($.self) -var suffixes=$.suffix -if(! _b_.isinstance(suffixes,_b_.tuple)){suffixes=[suffixes]} -var chars=to_chars(_self),s=chars.slice($.start,$.end) -for(var i=0,len=suffixes.length;i < len;i++){var suffix=suffixes[i] -if(! _b_.isinstance(suffix,str)){throw _b_.TypeError.$factory( -"endswith first arg must be str or a tuple of str, not int")} -suffix=suffix.__class__ ? suffix.$brython_value :suffix -if(suffix.length <=s.length && -s.slice(s.length-suffix.length).join('')==suffix){return true}} -return false} -str.expandtabs=function(){var $=$B.args("expandtabs",2,{self:null,tabsize:null},["self","tabsize"],arguments,{tabsize:8},null,null),_self=to_string($.self) -var s=$B.$GetInt($.tabsize),col=0,pos=0,res="",chars=to_chars(_self) -if(s==1){return _self.replace(/\t/g," ")} -while(pos < chars.length){var car=chars[pos] -switch(car){case "\t": -while(col % s > 0){res+=" "; -col++} -break -case "\r": -case "\n": -res+=car -col=0 -break -default: -res+=car -col++ -break} -pos++} -return res} -str.find=function(){ -var $=$B.args("str.find",4,{self:null,sub:null,start:null,end:null},["self","sub","start","end"],arguments,{start:0,end:null},null,null),_self,sub -check_str($.sub) -normalize_start_end($); -[_self,sub]=to_string([$.self,$.sub]); -var len=str.__len__(_self),sub_len=str.__len__(sub) -if(sub_len==0 && $.start==len){return len} -if(len+sub_len==0){return-1} -var js_start=pypos2jspos(_self,$.start),js_end=pypos2jspos(_self,$.end),ix=_self.slice(js_start,js_end).indexOf(sub) -if(ix==-1){return-1} -return jspos2pypos(_self,js_start+ix)} -$B.parse_format=function(fmt_string){ -var elts=fmt_string.split(":"),name,conv,spec,name_ext=[] -if(elts.length==1){ -name=fmt_string}else{ -name=elts[0] -spec=elts.splice(1).join(":")} -var elts=name.split("!") -if(elts.length > 1){name=elts[0] -conv=elts[1]} -if(name !==undefined){ -function name_repl(match){name_ext.push(match) -return ""} -var name_ext_re=/\.[_a-zA-Z][_a-zA-Z0-9]*|\[[_a-zA-Z][_a-zA-Z0-9]*\]|\[[0-9]+\]/g -name=name.replace(name_ext_re,name_repl)} -return{name:name,name_ext:name_ext,conv:conv,spec:spec ||"",string:fmt_string}} -$B.split_format=function(s){ -var pos=0,_len=s.length,car,text="",parts=[],rank=0 -while(pos < _len){car=s.charAt(pos) -if(car=="{" && s.charAt(pos+1)=="{"){ -text+="{" -pos+=2}else if(car=="}" && s.charAt(pos+1)=="}"){ -text+="}" -pos+=2}else if(car=="{"){ -parts.push(text) -var end=pos+1,nb=1 -while(end < _len){if(s.charAt(end)=="{"){nb++;end++} -else if(s.charAt(end)=="}"){nb--;end++ -if(nb==0){ -var fmt_string=s.substring(pos+1,end-1) -var fmt_obj=$B.parse_format(fmt_string) -fmt_obj.raw_name=fmt_obj.name -fmt_obj.raw_spec=fmt_obj.spec -if(!fmt_obj.name){fmt_obj.name=rank+"" -rank++} -if(fmt_obj.spec !==undefined){ -function replace_nested(name,key){if(key==""){ -return "{"+rank+++"}"} -return "{"+key+"}"} -fmt_obj.spec=fmt_obj.spec.replace(/\{(.*?)\}/g,replace_nested)} -parts.push(fmt_obj) -text="" -break}}else{end++}} -if(nb > 0){throw _b_.ValueError.$factory("wrong format "+s)} -pos=end}else{text+=car -pos++}} -if(text){parts.push(text)} -return parts} -str.format=function(_self){ -var last_arg=$B.last(arguments) -if(last_arg.$nat=="mapping"){var mapping=last_arg.mapping,getitem=$B.$getattr(mapping,"__getitem__") -var args=[] -for(var i=0,len=arguments.length-1;i < len;i++){args.push(arguments[i])} -var $=$B.args("format",1,{self:null},["self"],args,{},"$args",null)}else{var $=$B.args("format",1,{self:null},["self"],arguments,{},"$args","$kw"),mapping=$.$kw, -getitem=function(key){return _b_.dict.$getitem(mapping,key)}} -var _self=to_string($.self),parts=$B.split_format(_self) -var res="",fmt -for(var i=0;i < parts.length;i++){ -if(typeof parts[i]=="string"){res+=parts[i]; -continue} -fmt=parts[i] -if(fmt.spec !==undefined){ -function replace_nested(name,key){if(/\d+/.exec(key)){ -return _b_.tuple.__getitem__($.$args,parseInt(key))}else{ -return _b_.dict.__getitem__($.$kw,key)}} -fmt.spec=fmt.spec.replace(/\{(.*?)\}/g,replace_nested)} -if(fmt.name.charAt(0).search(/\d/)>-1){ -var pos=parseInt(fmt.name),value=_b_.tuple.__getitem__($.$args,pos)}else{ -var value=getitem(fmt.name)} -for(var j=0;j < fmt.name_ext.length;j++){var ext=fmt.name_ext[j] -if(ext.charAt(0)=="."){ -value=$B.$getattr(value,ext.substr(1))}else{ -var key=ext.substr(1,ext.length-2) -if(key.charAt(0).search(/\d/)>-1){key=parseInt(key)} -value=$B.$getattr(value,"__getitem__")(key)}} -if(fmt.conv=="a"){value=_b_.ascii(value)} -else if(fmt.conv=="r"){value=_b_.repr(value)} -else if(fmt.conv=="s"){value=_b_.str.$factory(value)} -if(value.$is_class ||value.$factory){ -res+=value.__class__.__format__(value,fmt.spec)}else{res+=$B.$getattr(value,"__format__")(fmt.spec)}} -return res} -str.format_map=function(){var $=$B.args("format_map",2,{self:null,mapping:null},['self','mapping'],arguments,{},null,null),_self=to_string($.self) -return str.format(_self,{$nat:'mapping',mapping:$.mapping})} -str.index=function(self){ -var res=str.find.apply(null,arguments) -if(res===-1){throw _b_.ValueError.$factory("substring not found")} -return res} -str.isascii=function(){ -var $=$B.args("isascii",1,{self:null},["self"],arguments,{},null,null),_self=to_string($.self) -for(var i=0,len=_self.length;i < len;i++){if(_self.charCodeAt(i)> 127){return false}} -return true} -str.isalnum=function(){ -var $=$B.args("isalnum",1,{self:null},["self"],arguments,{},null,null),cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(unicode_tables.Ll[cp]|| -unicode_tables.Lu[cp]|| -unicode_tables.Lm[cp]|| -unicode_tables.Lt[cp]|| -unicode_tables.Lo[cp]|| -unicode_tables.Nd[cp]|| -unicode_tables.digits[cp]|| -unicode_tables.numeric[cp]){continue} -return false} -return true} -str.isalpha=function(){ -var $=$B.args("isalpha",1,{self:null},["self"],arguments,{},null,null),cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(unicode_tables.Ll[cp]|| -unicode_tables.Lu[cp]|| -unicode_tables.Lm[cp]|| -unicode_tables.Lt[cp]|| -unicode_tables.Lo[cp]){continue} -return false} -return true} -str.isdecimal=function(){ -var $=$B.args("isdecimal",1,{self:null},["self"],arguments,{},null,null),cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(! unicode_tables.Nd[cp]){return false}} -return _self.length > 0} -str.isdigit=function(){ -var $=$B.args("isdigit",1,{self:null},["self"],arguments,{},null,null),cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(! unicode_tables.digits[cp]){return false}} -return _self.length > 0} -str.isidentifier=function(){ -var $=$B.args("isidentifier",1,{self:null},["self"],arguments,{},null,null),_self=to_string($.self) -if(_self.length==0){return false} -var chars=to_chars(_self) -if(unicode_tables.XID_Start[_b_.ord(chars[0])]===undefined){return false}else{for(var char of chars){var cp=_b_.ord(char) -if(unicode_tables.XID_Continue[cp]===undefined){return false}}} -return true} -str.islower=function(){ -var $=$B.args("islower",1,{self:null},["self"],arguments,{},null,null),has_cased=false,cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(unicode_tables.Ll[cp]){has_cased=true -continue}else if(unicode_tables.Lu[cp]||unicode_tables.Lt[cp]){return false}} -return has_cased} -str.isnumeric=function(){ -var $=$B.args("isnumeric",1,{self:null},["self"],arguments,{},null,null),_self=to_string($.self) -for(var char of _self){if(! unicode_tables.numeric[_b_.ord(char)]){return false}} -return _self.length > 0} -var unprintable={},unprintable_gc=['Cc','Cf','Co','Cs','Zl','Zp','Zs'] -str.isprintable=function(){ -if(Object.keys(unprintable).length==0){for(var i=0;i < unprintable_gc.length;i++){var table=unicode_tables[unprintable_gc[i]] -for(var cp in table){unprintable[cp]=true}} -unprintable[32]=true} -var $=$B.args("isprintable",1,{self:null},["self"],arguments,{},null,null),_self=to_string($.self) -for(var char of _self){if(unprintable[_b_.ord(char)]){return false}} -return true} -str.isspace=function(self){ -var $=$B.args("isspace",1,{self:null},["self"],arguments,{},null,null),cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(! unicode_tables.Zs[cp]&& -$B.unicode_bidi_whitespace.indexOf(cp)==-1){return false}} -return _self.length > 0} -str.istitle=function(self){ -var $=$B.args("istitle",1,{self:null},["self"],arguments,{},null,null),_self=to_string($.self) -return _self.length > 0 && str.title(_self)==_self} -str.isupper=function(self){ -var $=$B.args("islower",1,{self:null},["self"],arguments,{},null,null),is_upper=false,cp,_self=to_string(self) -for(var char of _self){cp=_b_.ord(char) -if(unicode_tables.Lu[cp]){is_upper=true -continue}else if(unicode_tables.Ll[cp]||unicode_tables.Lt[cp]){return false}} -return is_upper} -str.join=function(){var $=$B.args("join",2,{self:null,iterable:null},["self","iterable"],arguments,{},null,null),_self=to_string($.self) -var iterable=_b_.iter($.iterable),res=[],count=0 -while(1){try{var obj2=_b_.next(iterable) -if(! _b_.isinstance(obj2,str)){throw _b_.TypeError.$factory("sequence item "+count+ -": expected str instance, "+$B.class_name(obj2)+ -" found")} -res.push(obj2)}catch(err){if(_b_.isinstance(err,_b_.StopIteration)){break} -else{throw err}}} -return res.join(_self)} -str.ljust=function(self){var $=$B.args("ljust",3,{self:null,width:null,fillchar:null},["self","width","fillchar"],arguments,{fillchar:" "},null,null),_self=to_string($.self),len=str.__len__(_self); -if($.width <=len){return _self} -return _self+$.fillchar.repeat($.width-len)} -str.lower=function(self){var $=$B.args("lower",1,{self:null},["self"],arguments,{},null,null),_self=to_string($.self) -return _self.toLowerCase()} -str.lstrip=function(self,x){var $=$B.args("lstrip",2,{self:null,chars:null},["self","chars"],arguments,{chars:_b_.None},null,null),_self=$.self,chars=$.chars -if(chars===_b_.None){return self.trimStart()} -[_self,chars]=to_string([_self,chars]) -while(_self.length > 0){var flag=false -for(var char of chars){if(_self.startsWith(char)){_self=_self.substr(char.length) -flag=true -break}} -if(! flag){return $.self.surrogates ? $B.String(_self):_self}} -return ''} -str.maketrans=function(){var $=$B.args("maketrans",3,{x:null,y:null,z:null},["x","y","z"],arguments,{y:null,z:null},null,null) -var _t=$B.empty_dict() -if($.y===null && $.z===null){ -if(! _b_.isinstance($.x,_b_.dict)){throw _b_.TypeError.$factory( -"maketrans only argument must be a dict")} -var items=_b_.list.$factory(_b_.dict.items($.x)) -for(var i=0,len=items.length;i < len;i++){var k=items[i][0],v=items[i][1] -if(! _b_.isinstance(k,_b_.int)){if(_b_.isinstance(k,_b_.str)&& k.length==1){k=_b_.ord(k)}else{throw _b_.TypeError.$factory("dictionary key "+k+ -" is not int or 1-char string")}} -if(v !==_b_.None && ! _b_.isinstance(v,[_b_.int,_b_.str])){throw _b_.TypeError.$factory("dictionary value "+v+ -" is not None, integer or string")} -_b_.dict.$setitem(_t,k,v)} -return _t}else{ -if(!(_b_.isinstance($.x,_b_.str)&& _b_.isinstance($.y,_b_.str))){throw _b_.TypeError.$factory("maketrans arguments must be strings")}else if($.x.length !==$.y.length){throw _b_.TypeError.$factory( -"maketrans arguments must be strings or same length")}else{var toNone={} -if($.z !==null){ -if(! _b_.isinstance($.z,_b_.str)){throw _b_.TypeError.$factory( -"maketrans third argument must be a string")} -for(var i=0,len=$.z.length;i < len;i++){toNone[_b_.ord($.z.charAt(i))]=true}} -for(var i=0,len=$.x.length;i < len;i++){var key=_b_.ord($.x.charAt(i)),value=$.y.charCodeAt(i) -_b_.dict.$setitem(_t,key,value)} -for(var k in toNone){_b_.dict.$setitem(_t,parseInt(k),_b_.None)} -return _t}}} -str.maketrans.$type="staticmethod" -str.partition=function(){var $=$B.args("partition",2,{self:null,sep:null},["self","sep"],arguments,{},null,null),_self -if($.sep==""){throw _b_.ValueError.$factory("empty separator")} -check_str($.sep); -[_self,sep]=to_string([$.self,$.sep]) -var chars=to_chars(_self),i=_self.indexOf(sep) -if(i==-1){return _b_.tuple.$factory([_self,"",""])} -return _b_.tuple.$factory([chars.slice(0,i).join(''),sep,chars.slice(i+sep.length).join('')])} -str.removeprefix=function(){var $=$B.args("removeprefix",2,{self:null,prefix:null},["self","prefix"],arguments,{},null,null),_self -if(!_b_.isinstance($.prefix,str)){throw _b_.ValueError.$factory("prefix should be str, not "+ -`'${$B.class_name($.prefix)}'`)} -[_self,prefix]=to_string([$.self,$.prefix]) -if(str.startswith(_self,prefix)){return _self.substr(prefix.length)} -return _self.substr(0)} -str.removesuffix=function(){var $=$B.args("removesuffix",2,{self:null,suffix:null},["self","suffix"],arguments,{},null,null),_self -if(!_b_.isinstance($.suffix,str)){throw _b_.ValueError.$factory("suffix should be str, not "+ -`'${$B.class_name($.prefix)}'`)} -[_self,suffix]=to_string([$.self,$.suffix]) -if(suffix.length > 0 && str.endswith(_self,suffix)){return _self.substr(0,_self.length-suffix.length)} -return _self.substr(0)} -function $re_escape(str){var specials="[.*+?|()$^" -for(var i=0,len=specials.length;i < len;i++){var re=new RegExp("\\"+specials.charAt(i),"g") -str=str.replace(re,"\\"+specials.charAt(i))} -return str} -str.replace=function(self,old,_new,count){ -var $=$B.args("replace",4,{self:null,old:null,new:null,count:null},["self","old","new","count"],arguments,{count:-1},null,null),count=$.count,_self=$.self,old=$.old,_new=$.new -check_str(old,"replace() argument 1 ") -check_str(_new,"replace() argument 2 ") -if(! _b_.isinstance(count,[_b_.int,_b_.float])){throw _b_.TypeError.$factory("'"+$B.class_name(count)+ -"' object cannot be interpreted as an integer")}else if(_b_.isinstance(count,_b_.float)){throw _b_.TypeError.$factory("integer argument expected, got float")} -if(count==0){return self} -if(count.__class__==$B.long_int){count=parseInt(count.value)} -[old,_new]=to_string([old,_new]) -if(old==""){if(_new==""){return _self} -if(_self==""){return _new} -var elts=_self.split("") -if(count >-1 && elts.length >=count){var rest=elts.slice(count).join("") -return _new+elts.slice(0,count).join(_new)+rest}else{return _new+elts.join(_new)+_new}}else{var elts=str.split(_self,old,count)} -var res=_self,pos=-1 -if(old.length==0){var res=_new -for(var i=0;i < elts.length;i++){res+=elts[i]+_new} -return res+rest} -if(count < 0){count=res.length} -while(count > 0){pos=res.indexOf(old,pos) -if(pos < 0){break} -res=res.substr(0,pos)+_new+res.substr(pos+old.length) -pos=pos+_new.length -count--} -return res} -str.rfind=function(self,substr){ -var $=$B.args("rfind",4,{self:null,sub:null,start:null,end:null},["self","sub","start","end"],arguments,{start:0,end:null},null,null),_self -normalize_start_end($) -check_str($.sub); -[_self,sub]=to_string([$.self,$.sub]) -var len=str.__len__(_self),sub_len=str.__len__(sub) -if(sub_len==0){if($.js_start > len){return-1}else{return str.__len__(_self)}} -var js_start=pypos2jspos(_self,$.start),js_end=pypos2jspos(_self,$.end),ix=_self.substring(js_start,js_end).lastIndexOf(sub) -if(ix==-1){return-1} -return jspos2pypos(_self,js_start+ix)-$.start} -str.rindex=function(){ -var res=str.rfind.apply(null,arguments) -if(res==-1){throw _b_.ValueError.$factory("substring not found")} -return res} -str.rjust=function(self){var $=$B.args("rjust",3,{self:null,width:null,fillchar:null},["self","width","fillchar"],arguments,{fillchar:" "},null,null),_self=to_string($.self) -var len=str.__len__(_self) -if($.width <=len){return _self} -return $B.String($.fillchar.repeat($.width-len)+_self)} -str.rpartition=function(self,sep){var $=$B.args("rpartition",2,{self:null,sep:null},["self","sep"],arguments,{},null,null),_self -check_str($.sep); -[_self,sep]=[$.self,$.sep] -_self=reverse(_self),sep=reverse(sep) -var items=str.partition(_self,sep).reverse() -for(var i=0;i < items.length;i++){items[i]=items[i].split("").reverse().join("")} -return items} -str.rsplit=function(self){var $=$B.args("rsplit",3,{self:null,sep:null,maxsplit:null},["self","sep","maxsplit"],arguments,{sep:_b_.None,maxsplit:-1},null,null),sep=$.sep,_self; -[_self,sep]=to_string([$.self,$.sep]) -var rev_str=reverse(_self),rev_sep=sep===_b_.None ? sep :reverse(sep),rev_res=str.split(rev_str,rev_sep,$.maxsplit) -rev_res.reverse() -for(var i=0;i < rev_res.length;i++){rev_res[i]=reverse(rev_res[i])} -return rev_res} -str.rstrip=function(){var $=$B.args("rstrip",2,{self:null,chars:null},["self","chars"],arguments,{chars:_b_.None},null,null),chars=$.chars,_self=to_string($.self) -if(chars===_b_.None){return _self.trimEnd()} -chars=to_string(chars) -while(_self.length > 0){var flag=false -for(var char of chars){if(_self.endsWith(char)){_self=_self.substr(0,_self.length-char.length) -flag=true -break}} -if(! flag){return _self.surrogates ? $B.String(_self):_self}} -return ''} -str.split=function(){var $=$B.args("split",3,{self:null,sep:null,maxsplit:null},["self","sep","maxsplit"],arguments,{sep:_b_.None,maxsplit:-1},null,null),maxsplit=$.maxsplit,sep=$.sep,pos=0,_self=to_string($.self) -if(maxsplit.__class__===$B.long_int){maxsplit=parseInt(maxsplit.value)} -if(sep==""){throw _b_.ValueError.$factory("empty separator")} -if(sep===_b_.None){var res=[] -while(pos < _self.length && _self.charAt(pos).search(/\s/)>-1){pos++} -if(pos===_self.length-1){return[_self]} -var name="" -while(1){if(_self.charAt(pos).search(/\s/)==-1){if(name==""){name=_self.charAt(pos)}else{name+=_self.charAt(pos)}}else{if(name !==""){res.push(name) -if(maxsplit !==-1 && res.length==maxsplit+1){res.pop() -res.push(name+_self.substr(pos)) -return res} -name=""}} -pos++ -if(pos > _self.length-1){if(name){res.push(name)} -break}} -return res.map($B.String)}else{sep=to_string(sep) -var res=[],s="",seplen=sep.length -if(maxsplit==0){return[$.self]} -while(pos < _self.length){if(_self.substr(pos,seplen)==sep){res.push(s) -pos+=seplen -if(maxsplit >-1 && res.length >=maxsplit){res.push(_self.substr(pos)) -return res.map($B.String)} -s=""}else{s+=_self.charAt(pos) -pos++}} -res.push(s) -return res.map($B.String)}} -str.splitlines=function(self){var $=$B.args('splitlines',2,{self:null,keepends:null},['self','keepends'],arguments,{keepends:false},null,null) -if(!_b_.isinstance($.keepends,[_b_.bool,_b_.int])){throw _b_.TypeError('integer argument expected, got '+ -$B.get_class($.keepends).__name)} -var keepends=_b_.int.$factory($.keepends),res=[],start=0,pos=0,_self=to_string($.self) -if(! _self.length){return res} -while(pos < _self.length){if(_self.substr(pos,2)=='\r\n'){res.push(_self.slice(start,keepends ? pos+2 :pos)) -start=pos=pos+2}else if(_self[pos]=='\r' ||_self[pos]=='\n'){res.push(_self.slice(start,keepends ? pos+1 :pos)) -start=pos=pos+1}else{pos++}} -if(start < _self.length){res.push(_self.slice(start))} -return res.map($B.String)} -str.startswith=function(){ -var $=$B.args("startswith",4,{self:null,prefix:null,start:null,end:null},["self","prefix","start","end"],arguments,{start:0,end:null},null,null),_self -normalize_start_end($) -var prefixes=$.prefix -if(! _b_.isinstance(prefixes,_b_.tuple)){prefixes=[prefixes]} -_self=to_string($.self) -prefixes=to_string(prefixes) -var s=_self.substring($.start,$.end) -for(var prefix of prefixes){if(! _b_.isinstance(prefix,str)){throw _b_.TypeError.$factory("endswith first arg must be str "+ -"or a tuple of str, not int")} -if(s.substr(0,prefix.length)==prefix){return true}} -return false} -str.strip=function(){var $=$B.args("strip",2,{self:null,chars:null},["self","chars"],arguments,{chars:_b_.None},null,null) -if($.chars===_b_.None){return $.self.trim()} -return str.rstrip(str.lstrip($.self,$.chars),$.chars)} -str.swapcase=function(self){var $=$B.args("swapcase",1,{self},["self"],arguments,{},null,null),res="",cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(unicode_tables.Ll[cp]){res+=char.toUpperCase()}else if(unicode_tables.Lu[cp]){res+=char.toLowerCase()}else{res+=char}} -return res} -str.title=function(self){var $=$B.args("title",1,{self},["self"],arguments,{},null,null),state,cp,res="",_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -if(unicode_tables.Ll[cp]){if(! state){res+=char.toUpperCase() -state="word"}else{res+=char}}else if(unicode_tables.Lu[cp]||unicode_tables.Lt[cp]){res+=state ? char.toLowerCase():char -state="word"}else{state=null -res+=char}} -return res} -str.translate=function(){var $=$B.args('translate',2,{self:null,table:null},['self','table'],arguments,{},null,null),table=$.table,res=[],getitem=$B.$getattr(table,"__getitem__"),cp,_self=to_string($.self) -for(var char of _self){cp=_b_.ord(char) -try{var repl=getitem(cp) -if(repl !==_b_.None){if(typeof repl=="string"){res.push(repl)}else if(typeof repl=="number"){res.push(String.fromCharCode(repl))}}}catch(err){res.push(char)}} -return res.join("")} -str.upper=function(self){var $=$B.args("upper",1,{self:null},["self"],arguments,{},null,null),_self=to_string($.self) -return _self.toUpperCase()} -str.zfill=function(self,width){var $=$B.args("zfill",2,{self:null,width:null},["self","width"],arguments,{},null,null),_self=to_string($.self) -var len=str.__len__(_self) -if($.width <=len){return _self} -switch(_self.charAt(0)){case "+": -case "-": -return _self.charAt(0)+ -"0".repeat($.width-len)+_self.substr(1) -default: -return "0".repeat($.width-len)+_self}} -str.$factory=function(arg,encoding,errors){if(arguments.length==0){return ""} -if(arg===undefined){return $B.UndefinedType.__str__()}else if(arg===null){return ''} -if(encoding !==undefined){ -var $=$B.args("str",3,{arg:null,encoding:null,errors:null},["arg","encoding","errors"],arguments,{encoding:"utf-8",errors:"strict"},null,null),encoding=$.encoding,errors=$.errors} -if(typeof arg=="string" ||arg instanceof String || -typeof arg=="number"){if(isFinite(arg)){return arg.toString()}} -try{if(arg.__class__ && arg.__class__===_b_.bytes && -encoding !==undefined){ -return _b_.bytes.decode(arg,$.encoding,$.errors)} -var klass=arg.__class__ ||$B.get_class(arg) -if(klass===undefined){return $B.JSObj.__str__($B.JSObj.$factory(arg))} -var method=$B.$getattr(klass,"__str__",null) -if(method===null){method=$B.$getattr(klass,'__repr__')}}catch(err){console.log("no __str__ for",arg) -console.log("err ",err) -if($B.get_option('debug')> 1){console.log(err)} -console.log("Warning - no method __str__ or __repr__, "+ -"default to toString",arg) -throw err} -var res=$B.$call(method)(arg) -if(typeof res=="string" ||_b_.isinstance(res,str)){return res} -throw _b_.TypeError.$factory("__str__ returned non-string "+ -`(type ${$B.class_name(res)})`)} -$B.set_func_names(str,"builtins") -_b_.str=str -$B.parse_format_spec=function(spec,obj){if(spec==""){this.empty=true}else{var pos=0,aligns="<>=^",digits="0123456789",types="bcdeEfFgGnosxX%",align_pos=aligns.indexOf(spec.charAt(0)) -if(align_pos !=-1){if(spec.charAt(1)&& aligns.indexOf(spec.charAt(1))!=-1){ -this.fill=spec.charAt(0) -this.align=spec.charAt(1) -pos=2}else{ -this.align=aligns[align_pos] -this.fill=" " -pos++}}else{align_pos=aligns.indexOf(spec.charAt(1)) -if(spec.charAt(1)&& align_pos !=-1){ -this.align=aligns[align_pos] -this.fill=spec.charAt(0) -pos=2}} -var car=spec.charAt(pos) -if(car=="+" ||car=="-" ||car==" "){this.sign=car -pos++ -car=spec.charAt(pos)} -if(car=="z"){this.z=true -pos++ -car=spec.charAt(pos)} -if(car=="#"){this.alternate=true; -pos++; -car=spec.charAt(pos)} -if(car=="0"){ -this.fill="0" -if(align_pos==-1){this.align="="} -pos++ -car=spec.charAt(pos)} -while(car && digits.indexOf(car)>-1){if(this.width===undefined){this.width=car}else{this.width+=car} -pos++ -car=spec.charAt(pos)} -if(this.width !==undefined){this.width=parseInt(this.width)} -if(this.width===undefined && car=="{"){ -var end_param_pos=spec.substr(pos).search("}") -this.width=spec.substring(pos,end_param_pos) -pos+=end_param_pos+1} -if(car=="," ||car=="_"){this.comma=true -this.grouping_option=car -pos++ -car=spec.charAt(pos) -if(car=="," ||car=="_"){if(car==this.grouping_option){throw _b_.ValueError.$factory( -`Cannot specify '${car}' with '${car}'.`)}else{throw _b_.ValueError.$factory( -"Cannot specify both ',' and '_'.")}}} -if(car=="."){if(digits.indexOf(spec.charAt(pos+1))==-1){throw _b_.ValueError.$factory( -"Missing precision in format spec")} -this.precision=spec.charAt(pos+1) -pos+=2 -car=spec.charAt(pos) -while(car && digits.indexOf(car)>-1){this.precision+=car -pos++ -car=spec.charAt(pos)} -this.precision=parseInt(this.precision)} -if(car && types.indexOf(car)>-1){this.type=car -pos++ -car=spec.charAt(pos)} -if(pos !==spec.length){var err_msg=`Invalid format specifier '${spec}'` -if(obj){err_msg+=` for object of type '${$B.class_name(obj)}'`} -throw _b_.ValueError.$factory(err_msg)}} -this.toString=function(){return(this.fill===undefined ? "" :_b_.str.$factory(this.fill))+ -(this.align ||"")+ -(this.sign ||"")+ -(this.alternate ? "#" :"")+ -(this.sign_aware ? "0" :"")+ -(this.width ||"")+ -(this.comma ? "," :"")+ -(this.precision ? "."+this.precision :"")+ -(this.type ||"")}} -$B.format_width=function(s,fmt){if(fmt.width && s.length < fmt.width){var fill=fmt.fill ||" ",align=fmt.align ||"<",missing=fmt.width-s.length -switch(align){case "<": -return s+fill.repeat(missing) -case ">": -return fill.repeat(missing)+s -case "=": -if("+-".indexOf(s.charAt(0))>-1){return s.charAt(0)+fill.repeat(missing)+s.substr(1)}else{return fill.repeat(missing)+s} -case "^": -var left=parseInt(missing/2) -return fill.repeat(left)+s+fill.repeat(missing-left)}} -return s} -function fstring_expression(start){this.type="expression" -this.start=start -this.expression="" -this.conversion=null -this.fmt=null} -function fstring_error(msg,pos){error=Error(msg) -error.position=pos -throw error} -$B.parse_fstring=function(string){ -var elts=[],pos=0,current="",ctype=null,nb_braces=0,expr_start,car -while(pos < string.length){if(ctype===null){car=string.charAt(pos) -if(car=="{"){if(string.charAt(pos+1)=="{"){ctype="string" -current="{" -pos+=2}else{ctype="expression" -expr_start=pos+1 -nb_braces=1 -pos++}}else if(car=="}"){if(string.charAt(pos+1)==car){ctype="string" -current="}" -pos+=2}else{fstring_error(" f-string: single '}' is not allowed",pos)}}else{ctype="string" -current=car -pos++}}else if(ctype=="string"){ -var i=pos -while(i < string.length){car=string.charAt(i) -if(car=="{"){if(string.charAt(i+1)=="{"){current+="{" -i+=2}else{elts.push(current) -ctype="expression" -expr_start=i+1 -pos=i+1 -break}}else if(car=="}"){if(string.charAt(i+1)==car){current+=car -i+=2}else{fstring_error(" f-string: single '}' is not allowed",pos)}}else{current+=car -i++}} -pos=i+1}else if(ctype=="debug"){ -while(string.charAt(i)==" "){i++} -if(string.charAt(i)=="}"){ -elts.push(current) -ctype=null -current="" -pos=i+1}}else{ -var i=pos,nb_braces=1,nb_paren=0,current=new fstring_expression(expr_start) -while(i < string.length){car=string.charAt(i) -if(car=="{" && nb_paren==0){nb_braces++ -current.expression+=car -i++}else if(car=="}" && nb_paren==0){nb_braces-=1 -if(nb_braces==0){ -if(current.expression==""){fstring_error("f-string: empty expression not allowed",pos)} -elts.push(current) -ctype=null -current="" -pos=i+1 -break} -current.expression+=car -i++}else if(car=="\\"){ -throw Error("f-string expression part cannot include a"+ -" backslash")}else if(nb_paren==0 && car=="!" && current.fmt===null && -":}".indexOf(string.charAt(i+2))>-1){if(current.expression.length==0){throw Error("f-string: empty expression not allowed")} -if("ars".indexOf(string.charAt(i+1))==-1){throw Error("f-string: invalid conversion character:"+ -" expected 's', 'r', or 'a'")}else{current.conversion=string.charAt(i+1) -i+=2}}else if(car=="(" ||car=='['){nb_paren++ -current.expression+=car -i++}else if(car==")" ||car==']'){nb_paren-- -current.expression+=car -i++}else if(car=='"'){ -if(string.substr(i,3)=='"""'){var end=string.indexOf('"""',i+3) -if(end==-1){fstring_error("f-string: unterminated string",pos)}else{var trs=string.substring(i,end+3) -trs=trs.replace("\n","\\n\\") -current.expression+=trs -i=end+3}}else{var end=string.indexOf('"',i+1) -if(end==-1){fstring_error("f-string: unterminated string",pos)}else{current.expression+=string.substring(i,end+1) -i=end+1}}}else if(nb_paren==0 && car==":"){ -current.fmt=true -var cb=0,fmt_complete=false -for(var j=i+1;j < string.length;j++){if(string[j]=='{'){if(string[j+1]=='{'){j+=2}else{cb++}}else if(string[j]=='}'){if(string[j+1]=='}'){j+=2}else if(cb==0){fmt_complete=true -var fmt=string.substring(i+1,j) -current.format=$B.parse_fstring(fmt) -i=j -break}else{cb--}}} -if(! fmt_complete){fstring_error('invalid format',pos)}}else if(car=="="){ -var ce=current.expression,last_char=ce.charAt(ce.length-1),last_char_re=('()'.indexOf(last_char)>-1 ? "\\" :"")+last_char -if(ce.length==0 || -nb_paren > 0 || -string.charAt(i+1)=="=" || -"=!<>:".search(last_char_re)>-1){ -current.expression+=car -i+=1}else{ -tail=car -while(string.charAt(i+1).match(/\s/)){tail+=string.charAt(i+1) -i++} -elts.push(current.expression+tail) -while(ce.match(/\s$/)){ce=ce.substr(0,ce.length-1)} -current.expression=ce -ctype="debug" -i++}}else{current.expression+=car -i++}} -if(nb_braces > 0){fstring_error("f-string: expected '}'",pos)}}} -if(current.length > 0){elts.push(current)} -for(var elt of elts){if(typeof elt=="object"){if(elt.fmt_pos !==undefined && -elt.expression.charAt(elt.fmt_pos)!=':'){throw Error()}}} -return elts} -var _chr=$B.codepoint2jsstring=function(i){if(i >=0x10000 && i <=0x10FFFF){var code=(i-0x10000) -return String.fromCodePoint(0xD800 |(code >> 10))+ -String.fromCodePoint(0xDC00 |(code & 0x3FF))}else{return String.fromCodePoint(i)}} -var _ord=$B.jsstring2codepoint=function(c){if(c.length==1){return c.charCodeAt(0)} -var code=0x10000 -code+=(c.charCodeAt(0)& 0x03FF)<< 10 -code+=(c.charCodeAt(1)& 0x03FF) -return code}})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -function $err(op,other){var msg="unsupported operand type(s) for "+op+ -" : 'int' and '"+$B.class_name(other)+"'" -throw _b_.TypeError.$factory(msg)} -function int_value(obj){ -if(typeof obj=="boolean"){return obj ? 1 :0} -return obj.$brython_value !==undefined ? obj.$brython_value :obj} -function bigint_value(obj){ -if(typeof obj=="boolean"){return obj ? 1n :0n}else if(typeof obj=="number"){return BigInt(obj)}else if(obj.__class__===$B.long_int){return obj.value}else if(_b_.isinstance(obj,_b_.int)){return bigint_value(obj.$brython_value)}} -var int={__class__:_b_.type,__dir__:_b_.object.__dir__,__mro__:[_b_.object],__qualname__:'int',$is_class:true,$native:true,$descriptors:{"numerator":true,"denominator":true,"imag":true,"real":true},$is_int_subclass:true} -var int_or_long=int.$int_or_long=function(bigint){var res=Number(bigint) -return Number.isSafeInteger(res)? res :$B.fast_long_int(bigint)} -int.$to_js_number=function(obj){ -if(typeof obj=="number"){return obj}else if(obj.__class__===$B.long_int){return Number(obj.value)}else if(_b_.isinstance(obj,_b_.int)){return int.$to_js_value(obj.$brython_value)} -return null} -int.$to_bigint=bigint_value -int.$int_value=int_value -int.as_integer_ratio=function(){var $=$B.args("as_integer_ratio",1,{self:null},["self"],arguments,{},null,null) -return $B.fast_tuple([$.self,1])} -int.from_bytes=function(){var $=$B.args("from_bytes",3,{bytes:null,byteorder:null,signed:null},["bytes","byteorder","signed"],arguments,{byteorder:'big',signed:false},null,null) -var x=$.bytes,byteorder=$.byteorder,signed=$.signed,_bytes,_len -if(_b_.isinstance(x,[_b_.bytes,_b_.bytearray])){_bytes=x.source -_len=x.source.length}else{_bytes=_b_.list.$factory(x) -_len=_bytes.length -for(var i=0;i < _len;i++){_b_.bytes.$factory([_bytes[i]])}} -if(byteorder=="big"){_bytes.reverse()}else if(byteorder !="little"){throw _b_.ValueError.$factory( -"byteorder must be either 'little' or 'big'")} -var num=_bytes[0] -if(signed && num >=128){num=num-256} -num=BigInt(num) -var _mult=256n -for(var i=1;i < _len;i++){num+=_mult*BigInt(_bytes[i]) -_mult*=256n} -if(! signed){return int_or_long(num)} -if(_bytes[_len-1]< 128){return int_or_long(num)} -return int_or_long(num-_mult)} -int.to_bytes=function(){var $=$B.args("to_bytes",3,{self:null,len:null,byteorder:null,signed:null},["self","len","byteorder","signed"],arguments,{len:1,byteorder:'big',signed:false},null,null),self=$.self,len=$.len,byteorder=$.byteorder,signed=$.signed -if(! _b_.isinstance(len,_b_.int)){throw _b_.TypeError.$factory("integer argument expected, got "+ -$B.class_name(len))} -if(["little","big"].indexOf(byteorder)==-1){throw _b_.ValueError.$factory( -"byteorder must be either 'little' or 'big'")} -if(_b_.isinstance(self,$B.long_int)){return $B.long_int.to_bytes(self,len,byteorder,signed)} -if(self < 0){if(! signed){throw _b_.OverflowError.$factory( -"can't convert negative int to unsigned")} -self=Math.pow(256,len)+self} -var res=[],value=self -while(value > 0){var quotient=Math.floor(value/256),rest=value-256*quotient -res.push(rest) -if(res.length > len){throw _b_.OverflowError.$factory("int too big to convert")} -value=quotient} -while(res.length < len){res.push(0)} -if(byteorder=="big"){res.reverse()} -return{ -__class__:_b_.bytes,source:res}} -int.__abs__=function(self){return Math.abs(int_value(self))} -var op_model= -`var _b_ = __BRYTHON__.builtins -if(typeof other == "number"){ - return _b_.int.$int_or_long(BigInt(self) + BigInt(other))}else if(other.__class__ === $B.long_int){ - return _b_.int.$int_or_long(BigInt(self) + other.value)}else if(typeof other == "boolean"){ - return _b_.int.$int_or_long(BigInt(self) + (other ? 1n : 0n))}else if(_b_.isinstance(other, _b_.int)){ - return _b_.int.__add__(self, other.$brython_value)} -return _b_.NotImplemented -` -int.__add__=Function('self','other',op_model) -int.__bool__=function(self){return int_value(self).valueOf()==0 ? false :true} -int.__ceil__=function(self){return Math.ceil(int_value(self))} -int.__divmod__=function(self,other){if(! _b_.isinstance(other,int)){return _b_.NotImplemented} -return $B.fast_tuple([int.__floordiv__(self,other),int.__mod__(self,other)])} -int.__eq__=function(self,other){var self_as_int=int_value(self) -if(self_as_int.__class__===$B.long_int){return $B.long_int.__eq__(self_as_int,other)} -if(_b_.isinstance(other,int)){return int_value(self)==int_value(other)} -return _b_.NotImplemented} -int.__float__=function(self){return $B.fast_float(int_value(self))} -function preformat(self,fmt){if(fmt.empty){return _b_.str.$factory(self)} -if(fmt.type && 'bcdoxXn'.indexOf(fmt.type)==-1){throw _b_.ValueError.$factory("Unknown format code '"+fmt.type+ -"' for object of type 'int'")} -var res -switch(fmt.type){case undefined: -case "d": -res=self.toString() -break -case "b": -res=(fmt.alternate ? "0b" :"")+self.toString(2) -break -case "c": -res=_b_.chr(self) -break -case "o": -res=(fmt.alternate ? "0o" :"")+self.toString(8) -break -case "x": -res=(fmt.alternate ? "0x" :"")+self.toString(16) -break -case "X": -res=(fmt.alternate ? "0X" :"")+self.toString(16).toUpperCase() -break -case "n": -return self } -if(fmt.sign !==undefined){if((fmt.sign==" " ||fmt.sign=="+" )&& self >=0){res=fmt.sign+res}} -return res} -int.__format__=function(self,format_spec){var fmt=new $B.parse_format_spec(format_spec,self) -if(fmt.type && 'eEfFgG%'.indexOf(fmt.type)!=-1){ -return _b_.float.__format__($B.fast_float(self),format_spec)} -fmt.align=fmt.align ||">" -var res=preformat(self,fmt) -if(fmt.comma){var sign=res[0]=="-" ? "-" :"",rest=res.substr(sign.length),len=rest.length,nb=Math.ceil(rest.length/3),chunks=[] -for(var i=0;i < nb;i++){chunks.push(rest.substring(len-3*i-3,len-3*i))} -chunks.reverse() -res=sign+chunks.join(",")} -return $B.format_width(res,fmt)} -int.__floordiv__=function(self,other){if(typeof other=="number"){if(other==0){throw _b_.ZeroDivisionError.$factory("division by zero")} -return Math.floor(self/other)}else if(typeof other=="boolean"){if(other===false){throw _b_.ZeroDivisionError.$factory("division by zero")} -return self}else if(other.__class__===$B.long_int){return Math.floor(self/Number(other.value))}else if(_b_.isinstance(other,_b_.int)){return int.__floordiv__(self,other.$brython_value)} -return _b_.NotImplemented} -int.$getnewargs=function(self){return $B.fast_tuple([int_value(self)])} -int.__getnewargs__=function(){return int.$getnewargs($B.single_arg('__getnewargs__','self',arguments))} -int.__hash__=function(self){if(self.$brython_value !==undefined){ -if(self.__hashvalue__ !==undefined){return self.__hashvalue__} -if(typeof self.$brython_value=="number"){return self.__hashvalue__=self.$brython_value}else{ -return self.__hashvalue__=$B.long_int.__hash__(self.$brython_value)}} -return self.valueOf()} -int.__index__=function(self){return int_value(self)} -int.__init__=function(self){return _b_.None} -int.__int__=function(self){return self} -int.__invert__=function(self){return ~self} -int.__mod__=function(self,other){ -if(_b_.isinstance(other,_b_.tuple)&& other.length==1){other=other[0]} -if(other.__class__===$B.long_int){self=BigInt(self) -other=other.value -if(other==0){throw _b_.ZeroDivisionError.$factory( -"integer division or modulo by zero")} -return int_or_long((self % other+other)% other)} -if(_b_.isinstance(other,int)){other=int_value(other) -if(other===false){other=0} -else if(other===true){other=1} -if(other==0){throw _b_.ZeroDivisionError.$factory( -"integer division or modulo by zero")} -return(self % other+other)% other} -return _b_.NotImplemented} -int.__mul__=Function('self','other',op_model.replace(/\+/g,'*').replace(/add/g,"mul")) -int.__ne__=function(self,other){var res=int.__eq__(self,other) -return(res===_b_.NotImplemented)? res :!res} -int.__neg__=function(self){var self_as_int=int_value(self) -if(self_as_int.__class__===$B.long_int){return $B.long_int.__neg__(self_as_int)} -return-self} -int.__new__=function(cls,value,base){if(cls===undefined){throw _b_.TypeError.$factory("int.__new__(): not enough arguments")}else if(! _b_.isinstance(cls,_b_.type)){throw _b_.TypeError.$factory("int.__new__(X): X is not a type object")} -if(cls===int){return int.$factory(value,base)} -return{ -__class__:cls,__dict__:$B.empty_dict(),$brython_value:int.$factory(value,base),toString:function(){return value}}} -int.__pos__=function(self){return self} -function extended_euclidean(a,b){ -var d,u,v -if(b==0){return[a,1n,0n]}else{[d,u,v]=extended_euclidean(b,a % b) -return[d,v,u-(a/b)*v]}} -int.__pow__=function(self,other,z){if(! _b_.isinstance(other,int)){return _b_.NotImplemented} -if(typeof other=="boolean"){other=other ? 1 :0} -if(typeof other=="number" ||_b_.isinstance(other,int)){if(z !==undefined && z !==_b_.None){ -self=bigint_value(self) -other=bigint_value(other) -z=bigint_value(z) -if(z==1){return 0} -var result=1n,base=self % z,exponent=other -if(exponent < 0){var gcd,inv,_ -[gcd,inv,_]=extended_euclidean(self,z) -if(gcd !=1){throw _b_.ValueError.$factory("not relative primes: "+ -self+' and '+z)} -return int.__pow__(int_or_long(inv),int_or_long(-exponent),int_or_long(z))} -while(exponent > 0){if(exponent % 2n==1n){result=(result*base)% z} -exponent=exponent >> 1n -base=(base*base)% z} -return int_or_long(result)}else{if(typeof other=="number"){if(other >=0){return int_or_long(BigInt(self)**BigInt(other))}else{return $B.fast_float(Math.pow(self,other))}}else if(other.__class__===$B.long_int){if(other.value >=0){return int_or_long(BigInt(self)**other.value)}else{return $B.fast_float(Math.pow(self,other))}}else if(_b_.isinstance(other,_b_.int)){return int_or_long(int.__pow__(self,other.$brython_value))} -return _b_.NotImplemented}} -if(_b_.isinstance(other,_b_.float)){other=_b_.float.numerator(other) -if(self >=0){return $B.fast_float(Math.pow(self,other))}else{ -return _b_.complex.__pow__($B.make_complex(self,0),other)}}else if(_b_.isinstance(other,_b_.complex)){var preal=Math.pow(self,other.$real),ln=Math.log(self) -return $B.make_complex(preal*Math.cos(ln),preal*Math.sin(ln))} -var rpow=$B.$getattr(other,"__rpow__",_b_.None) -if(rpow !==_b_.None){return rpow(self)} -$err("**",other)} -function __newobj__(){ -var $=$B.args('__newobj__',0,{},[],arguments,{},'args',null),args=$.args -var res=args.slice(1) -res.__class__=args[0] -return res} -int.__repr__=function(self){$B.builtins_repr_check(int,arguments) -var value=int_value(self),x=value.__class__===$B.long_int ? value.value :value -if($B.int_max_str_digits !=0 && -x >=10n**BigInt($B.int_max_str_digits)){throw _b_.ValueError.$factory(`Exceeds the limit `+ -`(${$B.int_max_str_digits}) for integer string conversion`)} -return x.toString()} -int.__setattr__=function(self,attr,value){if(typeof self=="number" ||typeof self=="boolean"){var cl_name=$B.class_name(self) -if(_b_.dir(self).indexOf(attr)>-1){throw _b_.AttributeError.$factory("attribute '"+attr+ -`' of '${cl_name}' objects is not writable`)}else{throw _b_.AttributeError.$factory(`'${cl_name}' object`+ -` has no attribute '${attr}'`)} -throw _b_.AttributeError.$factory(msg)} -_b_.dict.$setitem(self.__dict__,attr,value) -return _b_.None} -int.__sub__=Function('self','other',op_model.replace(/\+/g,'-').replace(/__add__/g,'__sub__')) -int.__truediv__=function(self,other){if(_b_.isinstance(other,int)){other=int_value(other) -if(other==0){throw _b_.ZeroDivisionError.$factory("division by zero")} -if(other.__class__===$B.long_int){return $B.fast_float(self/parseInt(other.value))} -return $B.fast_float(self/other)} -return _b_.NotImplemented} -int.bit_count=function(self){var s=_b_.bin(_b_.abs(self)),nb=0 -for(var x of s){if(x=='1'){nb++}} -return nb} -int.bit_length=function(self){var s=_b_.bin(self) -s=$B.$getattr(s,"lstrip")("-0b") -return s.length } -int.numerator=function(self){return int_value(self)} -int.denominator=function(self){return int.$factory(1)} -int.imag=function(self){return int.$factory(0)} -int.real=function(self){return self} -for(var attr of['numerator','denominator','imag','real']){int[attr].setter=(function(x){return function(self,value){throw _b_.AttributeError.$factory(`attribute '${x}' of `+ -`'${$B.class_name(self)}' objects is not writable`)}})(attr)} -var model= -`var _b_ = __BRYTHON__.builtins -if(typeof other == "number"){ - // transform into BigInt: JS converts numbers to 32 bits - return _b_.int.$int_or_long(BigInt(self) & BigInt(other))}else if(typeof other == "boolean"){ - return self & (other ? 1 : 0)}else if(other.__class__ === $B.long_int){ - return _b_.int.$int_or_long(BigInt(self) & other.value)}else if(_b_.isinstance(other, _b_.int)){ - // int subclass - return _b_.int.__and__(self, other.$brython_value)} -return _b_.NotImplemented` -int.__and__=Function('self','other',model) -int.__lshift__=Function('self','other',model.replace(/&/g,'<<').replace(/__and__/g,'__lshift__')) -int.__rshift__=Function('self','other',model.replace(/&/g,'>>').replace(/__and__/g,'__rshift__')) -int.__or__=Function('self','other',model.replace(/&/g,'|').replace(/__and__/g,'__or__')) -int.__xor__=Function('self','other',model.replace(/&/g,'^').replace(/__and__/g,'__xor__')) -int.__ge__=function(self,other){self=int_value(self) -if(typeof other=="number"){return self >=other}else if(other.__class__===$B.long_int){return self >=other.value}else if(typeof other=="boolean"){return self >=other ? 1 :0}else if(_b_.isinstance(other,_b_.int)){return self >=other.$brython_value} -return _b_.NotImplemented} -int.__gt__=function(self,other){var res=int.__le__(self,other) -return res===_b_.NotImplemented ? res :! res} -int.__le__=function(self,other){self=int_value(self) -if(typeof other=="number"){return self <=other}else if(other.__class__===$B.long_int){return self <=other.value}else if(typeof other=="boolean"){return self <=other ? 1 :0}else if(_b_.isinstance(other,_b_.int)){return self <=other.$brython_value} -return _b_.NotImplemented} -int.__lt__=function(self,other){var res=int.__ge__(self,other) -return res===_b_.NotImplemented ? res :! res} -var r_opnames=["add","sub","mul","truediv","floordiv","mod","pow","lshift","rshift","and","xor","or","divmod"] -for(var r_opname of r_opnames){if(int["__r"+r_opname+"__"]===undefined && -int['__'+r_opname+'__']){int["__r"+r_opname+"__"]=(function(name){return function(self,other){if(_b_.isinstance(other,int)){other=int_value(other) -return int["__"+name+"__"](other,self)} -return _b_.NotImplemented}})(r_opname)}} -var $valid_digits=function(base){var digits="" -if(base===0){return "0"} -if(base < 10){for(var i=0;i < base;i++){digits+=String.fromCharCode(i+48)} -return digits} -var digits="0123456789" -for(var i=10;i < base;i++){digits+=String.fromCharCode(i+55)} -return digits} -int.$factory=function(value,base){var missing={},$=$B.args("int",2,{x:null,base:null},["x","base"],arguments,{x:missing,base:missing},null,null,1),value=$.x,base=$.base===undefined ? missing :$.base,initial_value=value,explicit_base=base !==missing -if(value===missing ||value===undefined){if(base !==missing){throw _b_.TypeError.$factory("int() missing string argument")} -return 0} -if(_b_.isinstance(value,[_b_.bytes,_b_.bytearray])){ -value=$B.$getattr(value,'decode')('latin-1')}else if(explicit_base && ! _b_.isinstance(value,_b_.str)){throw _b_.TypeError.$factory( -"int() can't convert non-string with explicit base")}else if(_b_.isinstance(value,_b_.memoryview)){value=$B.$getattr(_b_.memoryview.tobytes(value),'decode')('latin-1')} -if(! _b_.isinstance(value,_b_.str)){if(base !==missing){throw _b_.TypeError.$factory( -"int() can't convert non-string with explicit base")}else{ -for(var special_method of['__int__','__index__','__trunc__']){var num_value=$B.$getattr($B.get_class(value),special_method,_b_.None) -if(num_value !==_b_.None){var res=$B.$call(num_value)(value) -if(special_method=='__trunc__'){$B.warn(_b_.DeprecationWarning,'The delegation of int() to __trunc__ is deprecated.') -var index_method=$B.$getattr(res,'__index__',null) -if(index_method===null){throw _b_.TypeError.$factory('__trunc__ returned'+ -` non-Integral (type ${$B.class_name(res)})`)} -res=$B.$call(index_method)()} -if(_b_.isinstance(res,_b_.int)){if(typeof res !=="number" && -res.__class__ !==$B.long_int){$B.warn(_b_.DeprecationWarning,special_method+ -' returned non-int (type '+$B.class_name(res)+ -'). The ability to return an instance of a '+ -'strict subclass of int is deprecated, and may '+ -'be removed in a future version of Python.')} -return int_value(res)}else{var klass=$B.get_class(res),index_method=$B.$getattr(klass,'__index__',null) -if(index_method===null){throw _b_.TypeError.$factory(special_method+ -`returned non-int (type ${$B.class_name(res)})`)} -return int_value(res)}}} -throw _b_.TypeError.$factory( -"int() argument must be a string, a bytes-like object "+ -`or a real number, not '${$B.class_name(value)}'`)}} -base=base===missing ? 10:$B.PyNumber_Index(base) -if(!(base >=2 && base <=36)){ -if(base !=0){throw _b_.ValueError.$factory("invalid base")}} -function invalid(base){throw _b_.ValueError.$factory("invalid literal for int() with base "+ -base+": "+_b_.repr(initial_value))} -if(typeof value !="string"){ -value=_b_.str.$to_string(value)} -var _value=value.trim(), -sign='' -if(_value.startsWith('+')||_value.startsWith('-')){var sign=_value[0] -_value=_value.substr(1)} -if(_value.length==2 && base==0 && -(_value=="0b" ||_value=="0o" ||_value=="0x")){throw _b_.ValueError.$factory("invalid value")} -if(_value.endsWith('_')){invalid(base)} -if(value.indexOf('__')>-1){ -invalid(base)} -if(_value.length > 2){var _pre=_value.substr(0,2).toUpperCase() -if(base==0){if(_pre=="0B"){base=2}else if(_pre=="0O"){base=8}else if(_pre=="0X"){base=16}else if(_value.startsWith('0')){_value=_value.replace(/_/g,'') -if(_value.match(/^0+$/)){return 0} -invalid(base)}}else if(_pre=="0X" && base !=16){invalid(base)}else if(_pre=="0O" && base !=8){invalid(base)} -if((_pre=="0B" && base==2)||_pre=="0O" ||_pre=="0X"){_value=_value.substr(2) -if(_value.startsWith('_')){ -_value=_value.substr(1)}}} -if(base==0){ -base=10} -var _digits=$valid_digits(base),_re=new RegExp("^[+-]?["+_digits+"]"+ -"["+_digits+"_]*$","i"),match=_re.exec(_value) -if(match===null){ -res=0 -var coef=1 -for(var char of _value){var cp=char.codePointAt(0),digit=$B.digits_mapping[cp] -if(digit===undefined){if(base > 10 && _digits.indexOf(char.toUpperCase())>-1){digit=char.toUpperCase().charCodeAt(0)-55}else{invalid(base)}} -if(digit < base){res=$B.rich_op('__mul__',res,base) -res=$B.rich_op('__add__',res,digit)}else{invalid(base)}} -return res}else{_value=_value.replace(/_/g,"")} -if(base==2){res=BigInt('0b'+_value)}else if(base==8){res=BigInt('0o'+_value)}else if(base==16){res=BigInt('0x'+_value)}else{if($B.int_max_str_digits !=0 && -_value.length > $B.int_max_str_digits){throw _b_.ValueError.$factory("Exceeds the limit "+ -`(${$B.int_max_str_digits}) for integer string conversion: `+ -`value has ${value.length} digits; use `+ -"sys.set_int_max_str_digits() to increase the limit.")} -if(base==10){res=BigInt(_value)}else{ -base=BigInt(base) -var res=0n,coef=1n,char -for(var i=_value.length-1;i >=0;i--){char=_value[i].toUpperCase() -res+=coef*BigInt(_digits.indexOf(char)) -coef*=base}}} -if(sign=='-'){res=-res} -return int_or_long(res)} -$B.set_func_names(int,"builtins") -_b_.int=int -$B.$bool=function(obj,bool_class){ -if(obj===null ||obj===undefined ){return false} -switch(typeof obj){case "boolean": -return obj -case "number": -case "string": -if(obj){return true} -return false -default: -if(obj.$is_class){return true} -var klass=obj.__class__ ||$B.get_class(obj),missing={},bool_method=bool_class ? -$B.$getattr(klass,"__bool__",missing): -$B.$getattr(obj,"__bool__",missing) -var test=false -if(test){console.log('bool(obj)',obj,'bool_class',bool_class,'klass',klass,'apply bool method',bool_method) -console.log('$B.$call(bool_method)',bool_method+'')} -if(bool_method===missing){var len_method=$B.$getattr(klass,'__len__',missing) -if(len_method===missing){return true} -return len_method(obj)> 0}else{try{var res=bool_class ? -$B.$call(bool_method)(obj): -$B.$call(bool_method)()}catch(err){throw err} -if(res !==true && res !==false){throw _b_.TypeError.$factory("__bool__ should return "+ -"bool, returned "+$B.class_name(res))} -if(test){console.log('bool method returns',res)} -return res}}} -var bool={__bases__:[int],__class__:_b_.type,__mro__:[int,_b_.object],__qualname__:'bool',$is_class:true,$not_basetype:true, -$native:true,$descriptors:{"numerator":true,"denominator":true,"imag":true,"real":true}} -bool.__and__=function(self,other){if(_b_.isinstance(other,bool)){return self && other}else if(_b_.isinstance(other,int)){return int.__and__(bool.__index__(self),int.__index__(other))} -return _b_.NotImplemented} -bool.__float__=function(self){return self ? $B.fast_float(1):$B.fast_float(0)} -bool.__hash__=bool.__index__=bool.__int__=function(self){if(self.valueOf())return 1 -return 0} -bool.__neg__=function(self){return-$B.int_or_bool(self)} -bool.__or__=function(self,other){if(_b_.isinstance(other,bool)){return self ||other}else if(_b_.isinstance(other,int)){return int.__or__(bool.__index__(self),int.__index__(other))} -return _b_.NotImplemented} -bool.__pos__=$B.int_or_bool -bool.__repr__=function(self){$B.builtins_repr_check(bool,arguments) -return self ? "True" :"False"} -bool.__xor__=function(self,other){if(_b_.isinstance(other,bool)){return self ^ other ? true :false}else if(_b_.isinstance(other,int)){return int.__xor__(bool.__index__(self),int.__index__(other))} -return _b_.NotImplemented} -bool.$factory=function(){ -var $=$B.args("bool",1,{x:null},["x"],arguments,{x:false},null,null) -return $B.$bool($.x,true)} -bool.numerator=int.numerator -bool.denominator=int.denominator -bool.real=int.real -bool.imag=int.imag -_b_.bool=bool -$B.set_func_names(bool,"builtins")})(__BRYTHON__) -; -;(function($B){ -var _b_=$B.builtins -if($B.isWebWorker){window=self} -var long_int={__class__:_b_.type,__mro__:[_b_.int,_b_.object],__qualname__:'int',$infos:{__module__:"builtins",__name__:"int"},$is_class:true,$native:true,$descriptors:{"numerator":true,"denominator":true,"imag":true,"real":true}} -var max_safe_divider=$B.max_int/9 -var int_or_long=_b_.int.$int_or_long -var len=((Math.pow(2,53)-1)+'').length-1 -function preformat(self,fmt){if(fmt.empty){return _b_.str.$factory(self)} -if(fmt.type && 'bcdoxXn'.indexOf(fmt.type)==-1){throw _b_.ValueError.$factory("Unknown format code '"+fmt.type+ -"' for object of type 'int'")} -var res -switch(fmt.type){case undefined: -case "d": -res=self.toString() -break -case "b": -res=(fmt.alternate ? "0b" :"")+BigInt(self.value).toString(2) -break -case "c": -res=_b_.chr(self) -break -case "o": -res=(fmt.alternate ? "0o" :"")+BigInt(self.value).toString(8) -break -case "x": -res=(fmt.alternate ? "0x" :"")+BigInt(self.value).toString(16) -break -case "X": -res=(fmt.alternate ? "0X" :"")+BigInt(self.value).toString(16).toUpperCase() -break -case "n": -return self } -if(fmt.sign !==undefined){if((fmt.sign==" " ||fmt.sign=="+" )&& self >=0){res=fmt.sign+res}} -return res} -long_int.$to_js_number=function(self){return Number(self.value)} -long_int.__format__=function(self,format_spec){var fmt=new $B.parse_format_spec(format_spec,self) -if(fmt.type && 'eEfFgG%'.indexOf(fmt.type)!=-1){ -return _b_.float.__format__(self,format_spec)} -fmt.align=fmt.align ||">" -var res=preformat(self,fmt) -if(fmt.comma){var sign=res[0]=="-" ? "-" :"",rest=res.substr(sign.length),len=rest.length,nb=Math.ceil(rest.length/3),chunks=[] -for(var i=0;i < nb;i++){chunks.push(rest.substring(len-3*i-3,len-3*i))} -chunks.reverse() -res=sign+chunks.join(",")} -return $B.format_width(res,fmt)} -long_int.__abs__=function(self){return $B.fast_long_int(self.value > 0 ? self.value :-self.value)} -long_int.__add__=function(self,other){if(typeof other=="number"){return int_or_long(self.value+BigInt(other))}else if(other.__class__===$B.long_int){return int_or_long(self.value+other.value)}else if(typeof other=="boolean"){return int_or_long(self.value+(other ? 1n :0n))}else if(_b_.isinstance(other,_b_.int)){return long_int.__add__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.__divmod__=function(self,other){var a=self.value,b=_b_.int.$to_bigint(other),quotient -if((a >=0 && b > 0)||(a <=0 && b < 0)){quotient=a/b}else{quotient=a/b-1n} -var rest=a-quotient*b -return $B.fast_tuple([int_or_long(quotient),int_or_long(rest)])} -long_int.__eq__=function(self,other){if(other.__class__===$B.long_int){return self.value==other.value}else if(typeof other=="number" ||typeof other=="boolean"){return false}else if(_b_.isinstance(other,_b_.int)){return long_int.__eq__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.__float__=function(self){if(! isFinite(Number(self.value))){throw _b_.OverflowError.$factory("int too large to convert to float")} -return $B.fast_float(Number(self.value))} -long_int.__floordiv__=function(self,other){if(typeof other=="number"){return int_or_long(self.value/BigInt(other))}else if(other.__class__===$B.long_int){return int_or_long(self.value/other.value)}else if(typeof other=="boolean"){return int_or_long(self.value/(other ? 1n :0n))}else if(_b_.isinstance(other,_b_.int)){return int_or_long(self.value/other.$brython_value)} -return _b_.NotImplemented} -long_int.__ge__=function(self,other){if(typeof other=="number"){return self.value >=other}else if(other.__class__===$B.long_int){return self.value >=other.value}else if(typeof other=="boolean"){return self.value >=(other ? 1 :0)}else if(_b_.isinstance(other,_b_.int)){return self.value >=other.$brython_value} -return _b_.NotImplemented} -long_int.__gt__=function(self,other){var res=long_int.__le__(self,other) -return res===_b_.NotImplemented ? res :! res} -long_int.__hash__=function(self){var modulus=2305843009213693951n,sign=self.value >=0 ? 1n :-1n -self_pos=self.value*sign -var _hash=sign*(self_pos % modulus) -return self.__hashvalue__=int_or_long(_hash)} -long_int.__index__=function(self){return self} -long_int.__invert__=function(self){return int_or_long(-1n-self.value)} -long_int.__le__=function(self,other){if(typeof other=="number"){return self.value <=other}else if(other.__class__===$B.long_int){return self.value <=other.value}else if(typeof other=="boolean"){return self.value <=(other ? 1 :0)}else if(_b_.isinstance(other,_b_.int)){return self.value <=other.$brython_value} -return _b_.NotImplemented} -long_int.__lt__=function(self,other){var res=long_int.__ge__(self,other) -return res===_b_.NotImplemented ? res :! res} -long_int.__lshift__=function(self,other){if(typeof other=="number"){return int_or_long(self.value << BigInt(other))}else if(other.__class__===$B.long_int){return int_or_long(self.value << other.value)}else if(typeof other=="boolean"){return int_or_long(self.value <<(other ? 1n :0n))}else if(_b_.isinstance(other,_b_.int)){return long_int.__lshift__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.__mod__=function(self,other){if(typeof other=="number"){return int_or_long(self.value % BigInt(other))}else if(other.__class__===$B.long_int){var n=self.value,m=other.value -return int_or_long(((n % m)+m)% m)}else if(typeof other=="boolean"){return int_or_long(self.value %(other ? 1n :0n))}else if(_b_.isinstance(other,_b_.int)){return long_int.__mod__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.__mro__=[_b_.int,_b_.object] -long_int.__mul__=function(self,other){if(typeof other=="number"){return int_or_long(self.value*BigInt(other))}else if(typeof other=="boolean"){return int_or_long(self.value*(other ? 1n :0n))}else if(other.__class__===$B.long_int){return int_or_long(self.value*other.value)}else if(_b_.isinstance(other,_b_.int)){ -return long_int.__mul__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.__ne__=function(self,other){var res=long_int.__eq__(self,other) -return res===_b_.NotImplemented ? res :!res} -long_int.__neg__=function(self){return $B.fast_long_int(-self.value)} -long_int.__pos__=function(self){return self} -long_int.__pow__=function(self,power,z){if(z !==undefined){return _b_.int.__pow__(self,power,z)} -if(typeof power=="number"){return int_or_long(self.value**BigInt(power))}else if(typeof power=="boolean"){return int_or_long(self.value**power ? 1n :0n)}else if(power.__class__===$B.long_int){return int_or_long(self.value**power.value)}else if(_b_.isinstance(power,_b_.int)){ -return long_int.__pow__(self,power.$brython_value)} -return _b_.NotImplemented} -long_int.__rshift__=function(self,other){if(typeof other=="number"){return int_or_long(self.value >> BigInt(other))}else if(other.__class__===$B.long_int){return int_or_long(self.value >> other.value)}else if(typeof other=="boolean"){return int_or_long(self.value >>(other ? 1n :0n))}else if(_b_.isinstance(other,_b_.int)){return long_int.__rshift__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.__repr__=function(self){$B.builtins_repr_check($B.long_int,arguments) -if($B.int_max_str_digits !=0 && -self.value >=10n**BigInt($B.int_max_str_digits)){throw _b_.ValueError.$factory(`Exceeds the limit `+ -`(${$B.int_max_str_digits}) for integer string conversion`)} -return self.value.toString()} -long_int.__sub__=function(self,other){if(typeof other=="number"){return int_or_long(self.value-BigInt(other))}else if(typeof other=="boolean"){return int_or_long(self.value-(other ? 1n :0n))}else if(other.__class__===$B.long_int){return int_or_long(self.value-other.value)}else if(_b_.isinstance(other,_b_.int)){ -return long_int.__sub__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.__truediv__=function(self,other){if(typeof other=="number"){return $B.fast_float(Number(self.value)/other)}else if(typeof other=="boolean"){return $B.fast_float(Number(self.value)*(other ? 1 :0))}else if(other.__class__===$B.long_int){return $B.fast_float(Number(self.value)/Number(other.value))}else if(_b_.isinstance(other,_b_.int)){ -return long_int.__truediv__(self,other.$brython_value)} -return _b_.NotImplemented} -long_int.bit_count=function(self){var s=self.value.toString(2),nb=0 -for(var x of s){if(x=='1'){nb++}} -return nb} -long_int.bit_length=function(self){return self.value.toString(2).length} -function _infos(self){ -var nbits=$B.long_int.bit_length(self),pow2=2n**BigInt(nbits-1),rest=BigInt(self.value)-pow2,relative_rest=new Number(rest/pow2) -return{nbits,pow2,rest,relative_rest}} -long_int.$log2=function(x){if(x.value < 0){throw _b_.ValueError.$factory('math domain error')} -var infos=_infos(x) -return _b_.float.$factory(infos.nbits-1+ -Math.log(1+infos.relative_rest/Math.LN2))} -long_int.$log10=function(x){if(x.value < 0){throw _b_.ValueError.$factory('math domain error')} -var x_string=x.value.toString(),exp=x_string.length-1,mant=parseFloat(x_string[0]+'.'+x_string.substr(1)) -return _b_.float.$factory(exp+Math.log10(mant))} -long_int.numerator=function(self){return self} -long_int.denominator=function(self){return _b_.int.$factory(1)} -long_int.imag=function(self){return _b_.int.$factory(0)} -long_int.real=function(self){return self} -var body= -`var $B = __BRYTHON__, - _b_ = $B.builtins -if(typeof other == "number"){ - return _b_.int.$int_or_long(self.value & BigInt(other))}else if(typeof other == "boolean"){ - return _b_.int.$int_or_long(self.value & (other ? 1n : 0n))}else if(other.__class__ === $B.long_int){ - return _b_.int.$int_or_long(self.value & other.value)}else if(_b_.isinstance(other, _b_.int)){ - // int subclass - return $B.long_int.__and__(self, other.$brython_value)} -return _b_.NotImplemented` -long_int.__and__=Function('self','other',body) -long_int.__or__=Function('self','other',body.replace(/&/g,'|').replace(/__and__/g,'__or__')) -long_int.__xor__=Function('self','other',body.replace(/&/g,'^').replace(/__and__/g,'__xor__')) -long_int.to_bytes=function(self,len,byteorder,signed){ -var res=[],v=self.value -if(! $B.$bool(signed)&& v < 0){throw _b_.OverflowError.$factory("can't convert negative int to unsigned")} -while(v > 0){var quot=v/256n,rest=v-quot*256n -v=quot -res.push(Number(rest)) -if(res.length > len){throw _b_.OverflowError.$factory("int too big to convert")}} -while(res.length < len){res.push(0)} -if(byteorder=='big'){res.reverse()} -return _b_.bytes.$factory(res)} -function digits(base){ -var is_digits={} -for(var i=0;i < base;i++){if(i==10){break} -is_digits[i]=i} -if(base > 10){ -for(var i=0;i < base-10;i++){is_digits[String.fromCharCode(65+i)]=10+i -is_digits[String.fromCharCode(97+i)]=10+i}} -return is_digits} -var MAX_SAFE_INTEGER=Math.pow(2,53)-1 -var MIN_SAFE_INTEGER=-MAX_SAFE_INTEGER -function isSafeInteger(n){return(typeof n==="number" && -Math.round(n)===n && -MIN_SAFE_INTEGER <=n && -n <=MAX_SAFE_INTEGER)} -function intOrLong(long){ -var v=parseInt(long.value)*(long.pos ? 1 :-1) -if(v > MIN_SAFE_INTEGER && v < MAX_SAFE_INTEGER){return v} -return long} -long_int.$from_int=function(value){return{__class__:long_int,value:value.toString(),pos:value > 0}} -long_int.$factory=function(value,base){ -var is_digits=digits(base) -for(var i=0;i < value.length;i++){if(is_digits[value.charAt(i)]===undefined){throw _b_.ValueError.$factory( -'int argument is not a valid number: "'+value+'"')}} -var res -if(base==10){res=BigInt(value)}else if(base==16){res=BigInt('0x'+value)}else if(base==8){res=BigInt('0o'+value)}else{base=BigInt(base) -var res=0n,coef=1n,char -for(var i=value.length-1;i >=0;i--){char=value[i].toUpperCase() -res+=coef*BigInt(is_digits[char]) -coef*=base}} -return{__class__:$B.long_int,value:res}} -function extended_euclidean_algorithm(a,b){ -var s=0,old_s=1,t=1,old_t=0,r=b,old_r=a,quotient,tmp -while($B.rich_comp('__ne__',r,0)){quotient=$B.rich_op('__floordiv__',old_r,r) -tmp=$B.rich_op('__sub__',old_r,$B.rich_op('__mul__',quotient,r)) -old_r=r -r=tmp -tmp=$B.rich_op('__sub__',old_s,$B.rich_op('__mul__',quotient,s)) -old_s=s -s=tmp -tmp=$B.rich_op('__sub__',old_t,$B.rich_op('__mul__',quotient,t)) -old_t=t -t=tmp} -return[old_r,old_s,old_t]} -function inverse_of(n,p){ -var gcd,x,y -[gcd,x,y]=extended_euclidean_algorithm(n,p) -if($B.rich_comp('__ne__',gcd,1)){ -throw Error( -`${n} has no multiplicative inverse ' - 'modulo ${p}`)}else{return $B.rich_op('__mod__',x,p)}} -$B.inverse_of=inverse_of -$B.set_func_names(long_int,"builtins") -$B.long_int=long_int -$B.fast_long_int=function(value){if(typeof value !=='bigint'){console.log('expected bigint, got',value) -throw Error('not a big int')} -return{ -__class__:$B.long_int,value:value}}})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -var object=_b_.object -function $err(op,other){var msg="unsupported operand type(s) for "+op+ -": 'float' and '"+$B.class_name(other)+"'" -throw _b_.TypeError.$factory(msg)} -function float_value(obj){return obj.__class__===float ? obj :fast_float(obj.value)} -var float={__class__:_b_.type,__dir__:object.__dir__,__qualname__:'float',$is_class:true,$native:true,$descriptors:{"numerator":true,"denominator":true,"imag":true,"real":true}} -float.$float_value=float_value -float.$to_js_number=function(self){if(self.__class__===float){return self.value}else{return float.$to_js_number(self.value)}} -float.numerator=function(self){return self} -float.denominator=function(self){return 1} -float.imag=function(self){return 0} -float.real=function(self){return self} -float.__float__=function(self){return self} -$B.shift1_cache={} -float.as_integer_ratio=function(self){if(isinf(self)){throw _b_.OverflowError.$factory("Cannot pass infinity to "+ -"float.as_integer_ratio.")} -if(isnan(self)){throw _b_.ValueError.$factory("Cannot pass NaN to "+ -"float.as_integer_ratio.")} -var tmp=frexp(self),fp=tmp[0],exponent=tmp[1] -for(var i=0;i < 300;i++){if(fp==Math.floor(fp)){break}else{fp*=2 -exponent--}} -numerator=_b_.int.$factory(fp) -py_exponent=_b_.abs(exponent) -denominator=1 -var x -if($B.shift1_cache[py_exponent]!==undefined){x=$B.shift1_cache[py_exponent]}else{x=$B.$getattr(1,"__lshift__")(py_exponent) -$B.shift1_cache[py_exponent]=x} -py_exponent=x -if(exponent > 0){numerator=$B.rich_op("__mul__",numerator,py_exponent)}else{denominator=py_exponent} -return $B.fast_tuple([_b_.int.$factory(numerator),_b_.int.$factory(denominator)])} -function check_self_is_float(x,method){if(x.__class__===_b_.float ||_b_.isinstance(x,_b_.float)){return true} -throw _b_.TypeError.$factory(`descriptor '${method}' requires a `+ -`'float' object but received a '${$B.class_name(x)}'`)} -float.__abs__=function(self){check_self_is_float(self,'__abs__') -return fast_float(Math.abs(self.value))} -float.__bool__=function(self){check_self_is_float(self,'__bool__') -return _b_.bool.$factory(self.value)} -float.__ceil__=function(self){check_self_is_float(self,'__ceil__') -if(isnan(self)){throw _b_.ValueError.$factory('cannot convert float NaN to integer')}else if(isinf(self)){throw _b_.OverflowError.$factory('cannot convert float infinity to integer')} -return Math.ceil(self.value)} -float.__divmod__=function(self,other){check_self_is_float(self,'__divmod__') -if(! _b_.isinstance(other,[_b_.int,float])){return _b_.NotImplemented} -return $B.fast_tuple([float.__floordiv__(self,other),float.__mod__(self,other)])} -float.__eq__=function(self,other){check_self_is_float(self,'__eq__') -if(isNaN(self.value)&& -(_b_.isinstance(other,float)&& isNaN(other.value))){return false} -if(_b_.isinstance(other,_b_.int)){return self.value==other} -if(_b_.isinstance(other,float)){return self.value==other.value} -if(_b_.isinstance(other,_b_.complex)){if(! $B.rich_comp('__eq__',0,other.$imag)){return false} -return float.__eq__(self,other.$real)} -return _b_.NotImplemented} -float.__floor__=function(self){check_self_is_float(self,'__floor__') -if(isnan(self)){throw _b_.ValueError.$factory('cannot convert float NaN to integer')}else if(isinf(self)){throw _b_.OverflowError.$factory('cannot convert float infinity to integer')} -return Math.floor(self.value)} -float.__floordiv__=function(self,other){check_self_is_float(self,'__floordiv__') -if(_b_.isinstance(other,float)){if(other.value==0){throw _b_.ZeroDivisionError.$factory('division by zero')} -return fast_float(Math.floor(self.value/other.value))} -if(_b_.isinstance(other,_b_.int)){if(other.valueOf()==0){throw _b_.ZeroDivisionError.$factory('division by zero')} -return fast_float(Math.floor(self.value/other))} -return _b_.NotImplemented} -const DBL_MANT_DIG=53,LONG_MAX=__BRYTHON__.MAX_VALUE,DBL_MAX_EXP=2**10,LONG_MIN=__BRYTHON__.MIN_VALUE,DBL_MIN_EXP=-1021 -float.fromhex=function(klass,s){function hex_from_char(char){return parseInt(char,16)} -function finished(){ -while(s[pos]&& s[pos].match(/\s/)){pos++;} -if(pos !=s.length){throw parse_error()} -if(negate){x=float.__neg__(x)} -return klass===_b_.float ? x :$B.$call(klass)(x)} -function overflow_error(){throw _b_.OverflowError.$factory( -"hexadecimal value too large to represent as a float");} -function parse_error(){throw _b_.ValueError.$factory( -"invalid hexadecimal floating-point string");} -function insane_length_error(){throw _b_.ValueError.$factory( -"hexadecimal string too long to convert");} -s=s.trim() -var re_parts=[/^(?[+-])?(0x)?/,/(?[0-9a-fA-F]+)?/,/(?\.(?[0-9a-fA-F]+))?/,/(?p(?[+-])?(?\d+))?$/] -var re=new RegExp(re_parts.map(r=> r.source).join('')) -var mo=re.exec(s) -if(s.match(/^\+?inf(inity)?$/i)){return INF}else if(s.match(/^-inf(inity)?$/i)){return NINF}else if(s.match(/^[+-]?nan$/i)){return NAN} -var pos=0,negate,ldexp=_b_.float.$funcs.ldexp -if(s[pos]=='-'){pos++; -negate=1;}else if(s[pos]=='+'){pos++} -if(s.substr(pos,2).toLowerCase()=='0x'){pos+=2} -var coeff_start=pos,coeff_end -while(hex_from_char(s[pos])>=0){pos++;} -save_pos=pos; -if(s[pos]=='.'){pos++; -while(hex_from_char(s[pos])>=0){pos++;} -coeff_end=pos-1;}else{coeff_end=pos;} -ndigits=coeff_end-coeff_start; -fdigits=coeff_end-save_pos; -if(ndigits==0){throw parse_error()} -if(ndigits > Math.min(DBL_MIN_EXP-DBL_MANT_DIG-LONG_MIN/2,LONG_MAX/2+1-DBL_MAX_EXP)/4){throw insane_length_error()} -var exp -if(s[pos]=='p' ||s[pos]=='P'){pos++; -var exp_start=pos; -if(s[pos]=='-' ||s[pos ]=='+'){pos++;} -if(!('0' <=s[pos]&& s[pos]<='9')){throw parse_error()} -pos++; -while('0' <=s[pos]&& s[pos]<='9'){pos++;} -exp=parseInt(s.substr(exp_start));}else{exp=0;} -function HEX_DIGIT(j){if(! Number.isInteger(j)){throw Error('j pas entier')} -var pos=j < fdigits ? coeff_end-j :coeff_end-1-j -return hex_from_char(s[j < fdigits ? -coeff_end-j : -coeff_end-1-j])} -while(ndigits > 0 && HEX_DIGIT(ndigits-1)==0){ndigits--;} -if(ndigits==0 ||exp < LONG_MIN/2){x=ZERO; -return finished()} -if(exp > LONG_MAX/2){console.log('overflow, exp',exp) -throw overflow_error();} -exp=exp-4*fdigits; -var top_exp=exp+4*(ndigits-1); -for(var digit=BigInt(HEX_DIGIT(ndigits-1));digit !=0;digit/=2n){top_exp++;} -if(top_exp < DBL_MIN_EXP-DBL_MANT_DIG){x=ZERO; -return finished()} -if(top_exp > DBL_MAX_EXP){throw overflow_error()} -var lsb=Math.max(top_exp,DBL_MIN_EXP)-DBL_MANT_DIG; -var x=0.0; -if(exp >=lsb){ -for(var i=ndigits-1;i >=0;i--){x=16.0*x+HEX_DIGIT(i);} -x=ldexp($B.fast_float(x),exp); -return finished()} -var half_eps=1 <<((lsb-exp-1)% 4),key_digit=parseInt((lsb-exp-1)/4); -for(var i=ndigits-1;i > key_digit;i--){x=16.0*x+HEX_DIGIT(i);} -var digit=HEX_DIGIT(key_digit); -x=16.0*x+(digit &(16-2*half_eps)); -if((digit & half_eps)!=0){var round_up=0; -if((digit &(3*half_eps-1))!=0 ||(half_eps==8 && -key_digit+1 < ndigits &&(HEX_DIGIT(key_digit+1)& 1)!=0)){round_up=1;}else{for(var i=key_digit-1;i >=0;i--){if(HEX_DIGIT(i)!=0){round_up=1; -break;}}} -if(round_up){x+=2*half_eps; -if(top_exp==DBL_MAX_EXP && -x==ldexp(2*half_eps,DBL_MANT_DIG).value){ -throw overflow_error()}}} -x=ldexp(x,(exp+4*key_digit)); -return finished()} -float.__getformat__=function(arg){if(arg=="double" ||arg=="float"){return "IEEE, little-endian"} -if(typeof arg !=='string'){throw _b_.TypeError.$factory( -" __getformat__() argument must be str, not "+ -$B.class_name(arg))} -throw _b_.ValueError.$factory("__getformat__() argument 1 must be "+ -"'double' or 'float'")} -var format_sign=function(val,flags){switch(flags.sign){case '+': -return(val >=0 ||isNaN(val))? '+' :'' -case '-': -return '' -case ' ': -return(val >=0 ||isNaN(val))? ' ' :''} -if(flags.space){if(val >=0){return " "}} -return ''} -function preformat(self,fmt){var value=self.value -if(fmt.empty){return _b_.str.$factory(self)} -if(fmt.type && 'eEfFgGn%'.indexOf(fmt.type)==-1){throw _b_.ValueError.$factory("Unknown format code '"+fmt.type+ -"' for object of type 'float'")} -var special -if(isNaN(value)){special="efg".indexOf(fmt.type)>-1 ? "nan" :"NAN"}else if(value==Number.POSITIVE_INFINITY){special="efg".indexOf(fmt.type)>-1 ? "inf" :"INF"}else if(value==Number.NEGATIVE_INFINITY){special="efg".indexOf(fmt.type)>-1 ? "-inf" :"-INF"} -if(special){return format_sign(value,fmt)+special} -if(fmt.precision===undefined && fmt.type !==undefined){fmt.precision=6} -if(fmt.type=="%"){value*=100} -if(fmt.type=="e"){var res=value.toExponential(fmt.precision),exp=parseInt(res.substr(res.search("e")+1)) -if(Math.abs(exp)< 10){res=res.substr(0,res.length-1)+"0"+ -res.charAt(res.length-1)} -return res} -if(fmt.precision !==undefined){ -var prec=fmt.precision -if(prec==0){return Math.round(value)+""} -var res=$B.roundDownToFixed(value,prec), -pt_pos=res.indexOf(".") -if(fmt.type !==undefined && -(fmt.type=="%" ||fmt.type.toLowerCase()=="f")){if(pt_pos==-1){res+="."+"0".repeat(fmt.precision)}else{var missing=fmt.precision-res.length+pt_pos+1 -if(missing > 0){res+="0".repeat(missing)}}}else if(fmt.type && fmt.type.toLowerCase()=="g"){var exp_fmt=preformat(self,{type:"e"}).split("e"),exp=parseInt(exp_fmt[1]) -if(-4 <=exp && exp < fmt.precision){res=preformat(self,{type:"f",precision:fmt.precision-1-exp})}else{res=preformat(self,{type:"e",precision:fmt.precision-1})} -var parts=res.split("e") -if(fmt.alternate){if(parts[0].search(/\./)==-1){parts[0]+='.'}}else{var signif=parts[0] -if(signif.indexOf('.')> 0){while(signif.endsWith("0")){signif=signif.substr(0,signif.length-1)}} -if(signif.endsWith(".")){signif=signif.substr(0,signif.length-1)} -parts[0]=signif} -res=parts.join("e") -if(fmt.type=="G"){res=res.toUpperCase()} -return res}else if(fmt.type===undefined){ -fmt.type="g" -res=preformat(self,fmt) -if(res.indexOf('.')==-1){var exp=res.length-1,exp=exp < 10 ? '0'+exp :exp,is_neg=res.startsWith('-'),point_pos=is_neg ? 2 :1,mant=res.substr(0,point_pos)+'.'+ -res.substr(point_pos) -return `${mant}e+${exp}`} -fmt.type=undefined}else{var res1=value.toExponential(fmt.precision-1),exp=parseInt(res1.substr(res1.search("e")+1)) -if(exp <-4 ||exp >=fmt.precision-1){var elts=res1.split("e") -while(elts[0].endsWith("0")){elts[0]=elts[0].substr(0,elts[0].length-1)} -res=elts.join("e")}}}else{var res=_b_.str.$factory(self)} -if(fmt.type===undefined ||"gGn".indexOf(fmt.type)!=-1){ -if(res.search("e")==-1){while(res.charAt(res.length-1)=="0"){res=res.substr(0,res.length-1)}} -if(res.charAt(res.length-1)=="."){if(fmt.type===undefined){res+="0"}else{res=res.substr(0,res.length-1)}}} -if(fmt.sign !==undefined){if((fmt.sign==" " ||fmt.sign=="+" )&& value > 0){res=fmt.sign+res}} -if(fmt.type=="%"){res+="%"} -return res} -float.__format__=function(self,format_spec){check_self_is_float(self,'__format__') -var fmt=new $B.parse_format_spec(format_spec,self) -return float.$format(self,fmt)} -float.$format=function(self,fmt){ -fmt.align=fmt.align ||">" -var pf=preformat(self,fmt) -if(fmt.z && Object.is(parseFloat(pf),-0)){ -pf=pf.substr(1)} -var raw=pf.split('.'),_int=raw[0] -if(fmt.comma){var len=_int.length,nb=Math.ceil(_int.length/3),chunks=[] -for(var i=0;i < nb;i++){chunks.push(_int.substring(len-3*i-3,len-3*i))} -chunks.reverse() -raw[0]=chunks.join(",")} -return $B.format_width(raw.join("."),fmt)} -float.$getnewargs=function(self){return $B.fast_tuple([float_value(self)])} -float.__getnewargs__=function(){return float.$getnewargs($B.single_arg('__getnewargs__','self',arguments))} -var nan_hash=$B.$py_next_hash-- -var mp2_31=Math.pow(2,31) -$B.float_hash_cache=new Map() -float.__hash__=function(self){check_self_is_float(self,'__hash__') -return float.$hash_func(self)} -float.$hash_func=function(self){if(self.__hashvalue__ !==undefined){return self.__hashvalue__} -var _v=self.value -var in_cache=$B.float_hash_cache.get(_v) -if(in_cache !==undefined){return in_cache} -if(_v===Infinity){return 314159}else if(_v===-Infinity){return-314159}else if(isNaN(_v)){return self.__hashvalue__=nan_hash}else if(_v===Number.MAX_VALUE){return self.__hashvalue__=$B.fast_long_int(2234066890152476671n)} -if(Number.isInteger(_v)){return _b_.int.__hash__(_v)} -var r=frexp(self) -r[0]*=mp2_31 -var hipart=parseInt(r[0]) -r[0]=(r[0]-hipart)*mp2_31 -var x=hipart+parseInt(r[0])+(r[1]<< 15) -x &=0xFFFFFFFF -$B.float_hash_cache.set(_v,x) -return self.__hashvalue__=x} -function isninf(x){var x1=float_value(x).value -return x1==-Infinity ||x1==Number.NEGATIVE_INFINITY} -function isinf(x){var x1=float_value(x).value -return x1==Infinity ||x1==-Infinity || -x1==Number.POSITIVE_INFINITY ||x1==Number.NEGATIVE_INFINITY} -function isnan(x){var x1=float_value(x).value -return isNaN(x1)} -function fabs(x){if(x==0){return fast_float(0)} -return x > 0 ? float.$factory(x):float.$factory(-x)} -function frexp(x){ -var x1=x -if(_b_.isinstance(x,float)){ -if(isnan(x)||isinf(x)){return[x,0]} -x1=float_value(x).value}else if(_b_.isinstance(x,$B.long_int)){var exp=x.value.toString(2).length,power=2n**BigInt(exp) -return[$B.fast_float(Number(x.value)/Number(power)),exp]} -if(x1==0){return[0,0]} -var sign=1,ex=0,man=x1 -if(man < 0.){sign=-sign -man=-man} -while(man < 0.5){man*=2.0 -ex--} -while(man >=1.0){man*=0.5 -ex++} -man*=sign -return[man,ex]} -function ldexp(mantissa,exponent){if(isninf(mantissa)){return NINF}else if(isinf(mantissa)){return INF} -if(_b_.isinstance(mantissa,_b_.float)){mantissa=mantissa.value} -if(mantissa==0){return ZERO}else if(isNaN(mantissa)){return NAN} -if(_b_.isinstance(exponent,$B.long_int)){if(exponent.value < 0){return ZERO}else{throw _b_.OverflowError.$factory('overflow')}}else if(! isFinite(mantissa*Math.pow(2,exponent))){throw _b_.OverflowError.$factory('overflow')} -var steps=Math.min(3,Math.ceil(Math.abs(exponent)/1023)); -var result=mantissa; -for(var i=0;i < steps;i++){result*=Math.pow(2,Math.floor((exponent+i)/steps));} -return fast_float(result);} -float.$funcs={isinf,isninf,isnan,fabs,frexp,ldexp} -float.hex=function(self){ -self=float_value(self) -var TOHEX_NBITS=DBL_MANT_DIG+3-(DBL_MANT_DIG+2)% 4 -if(isNaN(self.value)||! isFinite(self.value)){return _b_.repr(self)} -if(self.value==0){return Object.is(self.value,0)? "0x0.0p0" :"-0x0.0p0"} -var _a=frexp(fabs(self.value)),_m=_a[0],_e=_a[1],_shift=1-Math.max(-1021-_e,0) -_m=ldexp(fast_float(_m),_shift).value -_e-=_shift -var _int2hex="0123456789ABCDEF".split(""),_s=_int2hex[Math.floor(_m)] -_s+='.' -_m-=Math.floor(_m) -for(var i=0;i <(TOHEX_NBITS-1)/4;i++){_m*=16.0 -_s+=_int2hex[Math.floor(_m)] -_m-=Math.floor(_m)} -var _esign="+" -if(_e < 0){_esign="-" -_e=-_e} -if(self.value < 0){return "-0x"+_s+"p"+_esign+_e} -return "0x"+_s+"p"+_esign+_e} -float.__init__=function(self,value){return _b_.None} -float.__int__=function(self){check_self_is_float(self,'__int__') -if(Number.isInteger(self.value)){var res=BigInt(self.value),res_num=Number(res) -return Number.isSafeInteger(res_num)? -res_num : -$B.fast_long_int(res)} -return Math.trunc(self.value)} -float.is_integer=function(self){return Number.isInteger(self.value)} -float.__mod__=function(self,other){ -check_self_is_float(self,'__mod__') -if(other==0){throw _b_.ZeroDivisionError.$factory("float modulo")} -if(_b_.isinstance(other,_b_.int)){other=_b_.int.numerator(other) -return fast_float((self.value % other+other)% other)} -if(_b_.isinstance(other,float)){ -var q=Math.floor(self.value/other.value),r=self.value-other.value*q -if(r==0 && other.value < 0){return fast_float(-0)} -return fast_float(r)} -return _b_.NotImplemented} -float.__mro__=[object] -float.__mul__=function(self,other){if(_b_.isinstance(other,_b_.int)){if(other.__class__==$B.long_int){return fast_float(self.value*parseFloat(other.value))} -other=_b_.int.numerator(other) -return fast_float(self.value*other)} -if(_b_.isinstance(other,float)){return fast_float(self.value*other.value)} -return _b_.NotImplemented} -float.__ne__=function(self,other){var res=float.__eq__(self,other) -return res===_b_.NotImplemented ? res :! res} -float.__neg__=function(self){return fast_float(-self.value)} -float.__new__=function(cls,value){if(cls===undefined){throw _b_.TypeError.$factory("float.__new__(): not enough arguments")}else if(! _b_.isinstance(cls,_b_.type)){throw _b_.TypeError.$factory("float.__new__(X): X is not a type object")} -return{ -__class__:cls,value:float.$factory(value).value}} -float.__pos__=function(self){return fast_float(+self.value)} -float.__pow__=function(self,other){var other_int=_b_.isinstance(other,_b_.int) -if(other_int ||_b_.isinstance(other,float)){if(! other_int){other=other.value} -if(self.value==1){return fast_float(1)}else if(other==0){return fast_float(1)} -if(isNaN(other)){return fast_float(Number.NaN)} -if(isNaN(self.value)){return fast_float(Number.NaN)} -if(self.value==-1 && ! isFinite(other)){ -return fast_float(1)}else if(self.value==0 && isFinite(other)&& other < 0){throw _b_.ZeroDivisionError.$factory("0.0 cannot be raised "+ -"to a negative power")}else if(self.value==0 && isFinite(other)&& other >=0){ -if(Number.isInteger(other)&& other % 2==1){return self} -return fast_float(0)}else if(self.value==Number.NEGATIVE_INFINITY && ! isNaN(other)){ -if(other % 2==-1){return fast_float(-0.0)}else if(other < 0){return fast_float(0)}else if(other % 2==1){return fast_float(Number.NEGATIVE_INFINITY)}else{return fast_float(Number.POSITIVE_INFINITY)}}else if(self.value==Number.POSITIVE_INFINITY && ! isNaN(other)){return other > 0 ? self :fast_float(0)} -if(other==Number.NEGATIVE_INFINITY && ! isNaN(self.value)){ -return Math.abs(self.value)< 1 ? -fast_float(Number.POSITIVE_INFINITY): -fast_float(0)}else if(other==Number.POSITIVE_INFINITY && ! isNaN(self.value)){ -return Math.abs(self.value)< 1 ? -fast_float(0): -fast_float(Number.POSITIVE_INFINITY)} -if(self.value < 0 && ! Number.isInteger(other)){return _b_.complex.__pow__($B.make_complex(self.value,0),fast_float(other))} -return fast_float(Math.pow(self.value,other))} -return _b_.NotImplemented} -float.__repr__=function(self){$B.builtins_repr_check(float,arguments) -self=self.value -if(self==Infinity){return 'inf'}else if(self==-Infinity){return '-inf'}else if(isNaN(self)){return 'nan'}else if(self===0){if(1/self===-Infinity){return '-0.0'} -return '0.0'} -var res=self+"" -if(res.search(/[.eE]/)==-1){res+=".0"} -var split_e=res.split(/e/i) -if(split_e.length==2){var mant=split_e[0],exp=split_e[1] -if(exp.startsWith('-')){exp_str=parseInt(exp.substr(1))+'' -if(exp_str.length < 2){exp_str='0'+exp_str} -return mant+'e-'+exp_str}} -var x,y -[x,y]=res.split('.') -var sign='' -if(x[0]=='-'){x=x.substr(1) -sign='-'} -if(x.length > 16){var exp=x.length-1,int_part=x[0],dec_part=x.substr(1)+y -while(dec_part.endsWith("0")){dec_part=dec_part.substr(0,dec_part.length-1)} -var mant=int_part -if(dec_part.length > 0){mant+='.'+dec_part} -return sign+mant+'e+'+exp}else if(x=="0"){var exp=0 -while(exp < y.length && y.charAt(exp)=="0"){exp++} -if(exp > 3){ -var rest=y.substr(exp),exp=(exp+1).toString() -while(rest.endsWith("0")){rest=rest.substr(0,res.length-1)} -var mant=rest[0] -if(rest.length > 1){mant+='.'+rest.substr(1)} -if(exp.length==1){exp='0'+exp} -return sign+mant+'e-'+exp}} -return _b_.str.$factory(res)} -float.__round__=function(){var $=$B.args('__round__',2,{self:null,ndigits:null},['self','ndigits'],arguments,{ndigits:_b_.None},null,null) -return float.$round($.self,$.ndigits)} -float.$round=function(x,ndigits){function overflow(){throw _b_.OverflowError.$factory( -"cannot convert float infinity to integer")} -var no_digits=ndigits===_b_.None -if(isnan(x)){if(ndigits===_b_.None){throw _b_.ValueError.$factory( -"cannot convert float NaN to integer")} -return NAN}else if(isninf(x)){return ndigits===_b_.None ? overflow():NINF}else if(isinf(x)){return ndigits===_b_.None ? overflow():INF} -x=float_value(x) -ndigits=ndigits===_b_.None ? 0 :ndigits -if(ndigits==0){var res=Math.round(x.value) -if(Math.abs(x.value-res)==0.5){ -if(res % 2){return res-1}} -if(no_digits){ -return res} -return $B.fast_float(res)} -if(ndigits.__class__===$B.long_int){ndigits=Number(ndigits.value)} -var pow1,pow2,y,z; -if(ndigits >=0){if(ndigits > 22){ -pow1=10**(ndigits-22) -pow2=1e22;}else{pow1=10**ndigits -pow2=1.0;} -y=(x.value*pow1)*pow2; -if(!isFinite(y)){return x}}else{pow1=10**-ndigits; -pow2=1.0; -if(isFinite(pow1)){y=x.value/pow1}else{return ZERO}} -z=Math.round(y); -if(fabs(y-z).value==0.5){ -z=2.0*Math.round(y/2);} -if(ndigits >=0){z=(z/pow2)/pow1;}else{z*=pow1;} -if(! isFinite(z)){throw _b_.OverflowError.$factory( -"overflow occurred during round");} -return fast_float(z);} -float.__setattr__=function(self,attr,value){if(self.__class__===float){if(float[attr]===undefined){throw _b_.AttributeError.$factory("'float' object has no attribute '"+ -attr+"'")}else{throw _b_.AttributeError.$factory("'float' object attribute '"+ -attr+"' is read-only")}} -self[attr]=value -return _b_.None} -float.__truediv__=function(self,other){if(_b_.isinstance(other,_b_.int)){if(other.valueOf()==0){throw _b_.ZeroDivisionError.$factory("division by zero")}else if(_b_.isinstance(other,$B.long_int)){return float.$factory(self.value/Number(other.value))} -return float.$factory(self.value/other)}else if(_b_.isinstance(other,float)){if(other.value==0){throw _b_.ZeroDivisionError.$factory("division by zero")} -return float.$factory(self.value/other.value)} -return _b_.NotImplemented} -var op_func_body= -`var $B = __BRYTHON__, - _b_ = __BRYTHON__.builtins - if(_b_.isinstance(other, _b_.int)){ - if(typeof other == "boolean"){ - return other ? $B.fast_float(self.value - 1) : self - }else if(other.__class__ === $B.long_int){ - return _b_.float.$factory(self.value - parseInt(other.value)) - }else{ - return $B.fast_float(self.value - other) - } - } - if(_b_.isinstance(other, _b_.float)){ - return $B.fast_float(self.value - other.value) - } - return _b_.NotImplemented` -var ops={"+":"add","-":"sub"} -for(var op in ops){var body=op_func_body.replace(/-/gm,op) -float[`__${ops[op]}__`]=Function('self','other',body)} -var comp_func_body=` -var $B = __BRYTHON__, - _b_ = $B.builtins -if(_b_.isinstance(other, _b_.int)){ - if(other.__class__ === $B.long_int){ - return self.value > parseInt(other.value) - } - return self.value > other.valueOf()} -if(_b_.isinstance(other, _b_.float)){ - return self.value > other.value} -if(_b_.isinstance(other, _b_.bool)) { - return self.value > _b_.bool.__hash__(other)} -if(_b_.hasattr(other, "__int__") || _b_.hasattr(other, "__index__")) { - return _b_.int.__gt__(self.value, $B.$GetInt(other))} -// See if other has the opposite operator, eg <= for > -var inv_op = $B.$getattr(other, "__le__", _b_.None) -if(inv_op !== _b_.None){ - return inv_op(self)} -throw _b_.TypeError.$factory( - "unorderable types: float() > " + $B.class_name(other) + "()") -` -for(var op in $B.$comps){var body=comp_func_body.replace(/>/gm,op). -replace(/__gt__/gm,`__${$B.$comps[op]}__`). -replace(/__le__/,`__${$B.$inv_comps[op]}__`) -float[`__${$B.$comps[op]}__`]=Function('self','other',body)} -var r_opnames=["add","sub","mul","truediv","floordiv","mod","pow","lshift","rshift","and","xor","or","divmod"] -for(var r_opname of r_opnames){if(float["__r"+r_opname+"__"]===undefined && -float['__'+r_opname+'__']){float["__r"+r_opname+"__"]=(function(name){return function(self,other){var other_as_num=_b_.int.$to_js_number(other) -if(other_as_num !==null){var other_as_float=$B.fast_float(other_as_num) -return float["__"+name+"__"](other_as_float,self)} -return _b_.NotImplemented}})(r_opname)}} -function $FloatClass(value){return new Number(value)} -function to_digits(s){ -var arabic_digits="\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669",res="" -for(var i=0;i < s.length;i++){var x=arabic_digits.indexOf(s[i]) -if(x >-1){res+=x} -else{res+=s[i]}} -return res} -$B.fast_float=fast_float=function(value){return{__class__:_b_.float,value}} -var fast_float_with_hash=function(value,hash_value){return{ -__class__:_b_.float,__hashvalue__:hash_value,value}} -float.$factory=function(value){if(value===undefined){return fast_float(0)} -$B.check_nb_args_no_kw('float',1,arguments) -switch(value){case true: -return fast_float(1) -case false: -return fast_float(0)} -var original_value=value -if(typeof value=="number"){return fast_float(value)} -if(value.__class__===float){return value} -if(_b_.isinstance(value,_b_.memoryview)){value=_b_.memoryview.tobytes(value)} -if(_b_.isinstance(value,_b_.bytes)){try{value=$B.$getattr(value,"decode")("utf-8")}catch(err){throw _b_.ValueError.$factory( -"could not convert string to float: "+ -_b_.repr(original_value))}} -if(typeof value=="string"){if(value.trim().length==0){throw _b_.ValueError.$factory( -`could not convert string to float: ${_b_.repr(value)}`)} -value=value.trim() -switch(value.toLowerCase()){case "+inf": -case "inf": -case "+infinity": -case "infinity": -return fast_float(Number.POSITIVE_INFINITY) -case "-inf": -case "-infinity": -return fast_float(Number.NEGATIVE_INFINITY) -case "+nan": -case "nan": -return fast_float(Number.NaN) -case "-nan": -return fast_float(-Number.NaN) -default: -var parts=value.split('e') -if(parts[1]){if(parts[1].startsWith('+')||parts[1].startsWith('-')){parts[1]=parts[1].substr(1)}} -parts=parts[0].split('.').concat(parts.splice(1)) -for(var part of parts){if(part.startsWith('_')||part.endsWith('_')){throw _b_.ValueError.$factory('invalid float literal '+ -value)}} -if(value.indexOf('__')>-1){throw _b_.ValueError.$factory('invalid float literal '+ -value)} -value=value.charAt(0)+value.substr(1).replace(/_/g,"") -value=to_digits(value) -if(isFinite(value)){return fast_float(parseFloat(value))}else{throw _b_.TypeError.$factory( -"could not convert string to float: "+ -_b_.repr(original_value))}}} -var klass=value.__class__,float_method=$B.$getattr(klass,'__float__',null) -if(float_method===null){var index_method=$B.$getattr(klass,'__index__',null) -if(index_method===null){throw _b_.TypeError.$factory("float() argument must be a string or a "+ -"number, not '"+$B.class_name(value)+"'")} -var res=$B.$call(index_method)(value),klass=$B.get_class(res) -if(klass===_b_.int){return fast_float(res)}else if(klass===$B.long_int){return $B.long_int.__float__(res)}else if(klass.__mro__.indexOf(_b_.int)>-1){var msg=`${$B.class_name(value)}.__index__ returned `+ -`non-int (type ${$B.class_name(res)}). The `+ -'ability to return an instance of a strict subclass'+ -' of int is deprecated, and may be removed in a '+ -'future version of Python.' -$B.warn(_b_.DeprecationWarning,msg) -return fast_float(res)} -throw _b_.TypeError.$factory('__index__ returned non-int'+ -` (type ${$B.class_name(res)})`)} -var res=$B.$call(float_method)(value),klass=$B.get_class(res) -if(klass !==_b_.float){if(klass.__mro__.indexOf(_b_.float)>-1){var msg=`${$B.class_name(value)}.__float__ returned `+ -`non-float (type ${$B.class_name(res)}). The `+ -'ability to return an instance of a strict subclass'+ -' of float is deprecated, and may be removed in a '+ -'future version of Python.' -$B.warn(_b_.DeprecationWarning,msg) -return float.$factory(res.value)} -throw _b_.TypeError.$factory('__float__ returned non-float'+ -` (type ${$B.class_name(res)})`)} -return res} -$B.$FloatClass=$FloatClass -$B.set_func_names(float,"builtins") -float.fromhex=_b_.classmethod.$factory(float.fromhex) -_b_.float=float -$B.MAX_VALUE=fast_float(Number.MAX_VALUE) -$B.MIN_VALUE=fast_float(2.2250738585072014e-308) -const NINF=fast_float(Number.NEGATIVE_INFINITY),INF=fast_float(Number.POSITIVE_INFINITY),NAN=fast_float(Number.NaN),ZERO=fast_float(0),NZERO=fast_float(-0)})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -function $UnsupportedOpType(op,class1,class2){throw _b_.TypeError.$factory("unsupported operand type(s) for "+ -op+": '"+class1+"' and '"+class2+"'")} -var complex={__class__:_b_.type,__dir__:_b_.object.__dir__,__qualname__:'complex',$is_class:true,$native:true,$descriptors:{real:true,imag:true}} -complex.__abs__=function(self){var _rf=isFinite(self.$real.value),_if=isFinite(self.$imag.value) -if((_rf && isNaN(self.$imag.value))||(_if && isNaN(self.$real.value))|| -(isNaN(self.$imag.value)&& isNaN(self.$real.value))){return $B.fast_float(NaN)} -if(! _rf ||! _if){return $B.fast_float(Infinity)} -var mag=Math.sqrt(Math.pow(self.$real.value,2)+ -Math.pow(self.$imag.value,2)) -if(!isFinite(mag)&& _rf && _if){ -throw _b_.OverflowError.$factory("absolute value too large")} -return $B.fast_float(mag)} -complex.__add__=function(self,other){if(_b_.isinstance(other,complex)){return make_complex(self.$real.value+other.$real.value,self.$imag.value+other.$imag.value)} -if(_b_.isinstance(other,_b_.int)){other=_b_.int.numerator(other) -return make_complex( -$B.rich_op('__add__',self.$real.value,other.valueOf()),self.$imag.value)} -if(_b_.isinstance(other,_b_.float)){return make_complex(self.$real.value+other.value,self.$imag.value)} -return _b_.NotImplemented} -complex.__bool__=function(self){return(! $B.rich_comp('__eq__',self.$real,0))|| -! $B.rich_comp('__eq__',self.$imag,0)} -complex.__complex__=function(self){ -if(self.__class__===complex){return self} -return $B.make_complex(self.$real,self.$imag)} -complex.__eq__=function(self,other){if(_b_.isinstance(other,complex)){return self.$real.value==other.$real.value && -self.$imag.value==other.$imag.value} -if(_b_.isinstance(other,_b_.int)){if(self.$imag.value !=0){return false} -return self.$real.value==other.valueOf()} -if(_b_.isinstance(other,_b_.float)){if(! $B.rich_comp('__eq__',0,self.$imag)){return false} -return self.$real.value==other.value} -return _b_.NotImplemented} -const max_precision=2**31-4,max_repeat=2**30-1 -complex.__format__=function(self,format_spec){if(format_spec.length==0){return _b_.str.$factory(self)} -var fmt=new $B.parse_format_spec(format_spec,self),type=fmt.conversion_type -var default_precision=6,skip_re,add_parens -if(type===undefined ||'eEfFgGn'.indexOf(type)>-1){if(fmt.precision > max_precision){throw _b_.ValueError.$factory('precision too big')} -if(fmt.fill_char=='0'){throw _b_.ValueError.$factory( -"Zero padding is not allowed in complex format specifier")} -if(fmt.align=='='){throw _b_.ValueError.$factory( -"'=' alignment flag is not allowed in complex format "+ -"specifier")} -var re=self.$real.value,im=self.$imag.value,precision=parseInt(fmt.precision,10) -if(type===undefined){type='r' -default_precision=0 -if(re==0 && Object.is(re,0)){skip_re=1}else{add_parens=1}}else if(type=='n'){type='g'} -if(precision < 0){precision=6}else if(type=='r'){type='g'} -var format=$B.clone(fmt) -format.conversion_type=type -format.precision=precision -var res='' -if(! skip_re){res+=_b_.float.$format(self.$real,format) -if(self.$imag.value >=0){res+='+'}} -var formatted_im=_b_.float.$format(self.$imag,format) -var pos=-1,last_num -for(var char of formatted_im){pos++ -if(char.match(/\d/)){last_num=pos}} -formatted_im=formatted_im.substr(0,last_num+1)+'j'+ -formatted_im.substr(last_num+1) -res+=formatted_im -if(add_parens){res='('+res+')'} -return res} -throw _b_.ValueError.$factory(`invalid type for complex: ${type}`)} -complex.$getnewargs=function(self){return $B.fast_tuple([self.$real,self.$imag])} -complex.__getnewargs__=function(){return complex.$getnewargs($B.single_arg('__getnewargs__','self',arguments))} -complex.__hash__=function(self){ -return $B.$hash(self.$real)+$B.$hash(self.$imag)*1000003} -complex.__init__=function(){return _b_.None} -complex.__invert__=function(self){return ~self} -complex.__mro__=[_b_.object] -complex.__mul__=function(self,other){if(_b_.isinstance(other,complex)){return make_complex(self.$real.value*other.$real.value- -self.$imag.value*other.$imag.value,self.$imag.value*other.$real.value+ -self.$real.value*other.$imag.value)}else if(_b_.isinstance(other,_b_.int)){return make_complex(self.$real.value*other.valueOf(),self.$imag.value*other.valueOf())}else if(_b_.isinstance(other,_b_.float)){return make_complex(self.$real.value*other.value,self.$imag.value*other.value)}else if(_b_.isinstance(other,_b_.bool)){if(other.valueOf()){return self} -return make_complex(0,0)} -$UnsupportedOpType("*",complex,other)} -complex.__ne__=function(self,other){var res=complex.__eq__(self,other) -return res===_b_.NotImplemented ? res :! res} -complex.__neg__=function(self){return make_complex(-self.$real.value,-self.$imag.value)} -complex.__new__=function(cls){if(cls===undefined){throw _b_.TypeError.$factory('complex.__new__(): not enough arguments')} -var res,missing={},$=$B.args("complex",3,{cls:null,real:null,imag:null},["cls","real","imag"],arguments,{real:0,imag:missing},null,null),cls=$.cls,first=$.real,second=$.imag -if(typeof first=="string"){if(second !==missing){throw _b_.TypeError.$factory("complex() can't take second arg "+ -"if first is a string")}else{var arg=first -first=first.trim() -if(first.startsWith("(")&& first.endsWith(")")){first=first.substr(1) -first=first.substr(0,first.length-1)} -var complex_re=/^\s*([\+\-]*[0-9_]*\.?[0-9_]*(e[\+\-]*[0-9_]*)?)([\+\-]?)([0-9_]*\.?[0-9_]*(e[\+\-]*[0-9_]*)?)(j?)\s*$/i -var parts=complex_re.exec(first) -function to_num(s){var res=parseFloat(s.charAt(0)+s.substr(1).replace(/_/g,"")) -if(isNaN(res)){throw _b_.ValueError.$factory("could not convert string "+ -"to complex: '"+arg+"'")} -return res} -if(parts===null){throw _b_.ValueError.$factory("complex() arg is a malformed string")} -if(parts[_real]&& parts[_imag].startsWith('.')&& -parts[_sign]==''){throw _b_.ValueError.$factory('complex() arg is a malformed string')}else if(parts[_real]=="." ||parts[_imag]=="." || -parts[_real]==".e" ||parts[_imag]==".e" || -parts[_real]=="e" ||parts[_imag]=="e"){throw _b_.ValueError.$factory("complex() arg is a malformed string")}else if(parts[_j]!=""){if(parts[_sign]==""){first=0 -if(parts[_real]=="+" ||parts[_real]==""){second=1}else if(parts[_real]=='-'){second=-1}else{second=to_num(parts[_real])}}else{first=to_num(parts[_real]) -second=parts[_imag]=="" ? 1 :to_num(parts[_imag]) -second=parts[_sign]=="-" ?-second :second}}else{if(parts[_sign]&& parts[_imag]==''){throw _b_.ValueError.$factory('complex() arg is a malformed string')} -first=to_num(parts[_real]) -second=0} -res=make_complex(first,second) -res.__class__=cls -res.__dict__=$B.empty_dict() -return res}} -if(first.__class__===complex && cls===complex && second===missing){return first} -var arg1=_convert(first),r,i -if(arg1===null){throw _b_.TypeError.$factory("complex() first argument must be a "+ -`string or a number, not '${$B.class_name(first)}'`)} -if(typeof second=="string"){throw _b_.TypeError.$factory("complex() second arg can't be a string")} -var arg2=_convert(second===missing ? 0 :second) -if(arg2===null){throw _b_.TypeError.$factory("complex() second argument must be a "+ -`number, not '${$B.class_name(second)}'`)} -if(arg1.method=='__complex__'){if(arg2.method=='__complex__'){r=$B.rich_op('__sub__',arg1.result.$real,arg2.result.$imag) -i=$B.rich_op('__add__',arg1.result.$imag,arg2.result.$real)}else{r=arg1.result.$real -i=$B.rich_op('__add__',arg1.result.$imag,arg2.result)}}else{if(arg2.method=='__complex__'){r=$B.rich_op('__sub__',arg1.result,arg2.result.$imag) -i=arg2.result.$real}else{r=arg1.result -i=arg2.result}} -var res=make_complex(r,i) -res.__class__=cls -res.__dict__=$B.empty_dict() -return res} -complex.__pos__=function(self){return self} -function complex2expo(cx){var norm=Math.sqrt((cx.$real.value*cx.$real.value)+ -(cx.$imag.value*cx.$imag.value)),sin=cx.$imag.value/norm,cos=cx.$real.value/norm,angle -if(cos==0){angle=sin==1 ? Math.PI/2 :3*Math.PI/2}else if(sin==0){angle=cos==1 ? 0 :Math.PI}else{angle=Math.atan(sin/cos)} -return{norm:norm,angle:angle}} -function hypot(){var $=$B.args("hypot",0,{},[],arguments,{},"args",null) -return _b_.float.$factory(Math.hypot(...$.args))} -function c_powi(x,n){if(n > 0){return c_powu(x,n)}else{return c_quot(c_1,c_powu(x,-n))}} -function c_powu(x,n){var r,p,mask=1,r=c_1,p=x -while(mask > 0 && n >=mask){if(n & mask){r=c_prod(r,p);} -mask <<=1; -p=c_prod(p,p)} -return r;} -function c_prod(a,b){return make_complex( -a.$real.value*b.$real.value-a.$imag.value*b.$imag.value,a.$real.value*b.$imag.value+a.$imag.value*b.$real.value)} -function c_quot(a,b){var r, -abs_breal=Math.abs(b.$real.value),abs_bimag=Math.abs(b.$imag.value) -if($B.rich_comp('__ge__',abs_breal,abs_bimag)){ -if(abs_breal==0.0){throw _b_.ZeroDivisionError.$factory()}else{var ratio=b.$imag.value/b.$real.value,denom=b.$real.value+b.$imag.value*ratio -return make_complex((a.$real.value+a.$imag.value*ratio)/denom,(a.$imag.value-a.$real.value*ratio)/denom)}}else if(abs_bimag >=abs_breal){ -var ratio=b.$real.value/b.$imag.value,denom=b.$real.value*ratio+b.$imag.value; -if(b.$imag.value==0.0){throw _b_.ZeroDivisionError.$factory()} -return make_complex( -(a.$real.value*ratio+a.$imag.value)/denom,(a.$imag.value*ratio-a.$real.value)/denom)}else{ -return $B.make_complex('nan','nan')}} -complex.__pow__=function(self,other,mod){ -if(mod !==undefined && mod !==_b_.None){throw _b_.ValueError.$factory('complex modulo')} -if($B.rich_comp('__eq__',other,1)){var funcs=_b_.float.$funcs -if(funcs.isinf(self.$real)||funcs.isninf(self.$real)|| -funcs.isinf(self.$imag)||funcs.isninf(self.$imag)){throw _b_.OverflowError.$factory('complex exponentiation')} -return self} -var small_int=null -if(_b_.isinstance(other,_b_.int)&& _b_.abs(other)< 100){small_int=other}else if(_b_.isinstance(other,_b_.float)&& -Number.isInteger(other.value)&& Math.abs(other.value < 100)){small_int=other.value}else if(_b_.isinstance(other,complex)&& other.$imag.value==0 && -Number.isInteger(other.$real.value)&& -Math.abs(other.$real.value)< 100){small_int=other.$real.value} -if(small_int !==null){return c_powi(self,small_int)} -if(_b_.isinstance(other,_b_.float)){other=_b_.float.$to_js_number(other)} -if(self.$real.value==0 && self.$imag.value==0){if(_b_.isinstance(other,complex)&& -(other.$imag.value !=0 ||other.$real.value < 0)){throw _b_.ZeroDivisionError.$factory( -'0.0 to a negative or complex power')} -return $B.make_complex(0,0)} -var exp=complex2expo(self),angle=exp.angle,res=Math.pow(exp.norm,other) -if(_b_.isinstance(other,_b_.int)){return make_complex(res*Math.cos(angle*other),res*Math.sin(angle*other))}else if(_b_.isinstance(other,_b_.float)){return make_complex(res*Math.cos(angle*other.value),res*Math.sin(angle*other.value))}else if(_b_.isinstance(other,complex)){ -var x=other.$real.value,y=other.$imag.value -var pw=Math.pow(exp.norm,x)*Math.pow(Math.E,-y*angle),theta=y*Math.log(exp.norm)-x*angle -if(pw==Number.POSITIVE_INFINITY ||pw===Number.NEGATIVE_INFINITY){throw _b_.OverflowError.$factory('complex exponentiation')} -return make_complex(pw*Math.cos(theta),pw*Math.sin(theta))}else{throw _b_.TypeError.$factory("unsupported operand type(s) "+ -"for ** or pow(): 'complex' and '"+ -$B.class_name(other)+"'")}} -complex.__radd__=function(self,other){if(_b_.isinstance(other,_b_.bool)){other=other ? 1 :0} -if(_b_.isinstance(other,_b_.int)){return make_complex(other+self.$real.value,self.$imag.value)}else if(_b_.isinstance(other,_b_.float)){return make_complex(other.value+self.$real.value,self.$imag.value)} -return _b_.NotImplemented} -complex.__repr__=function(self){$B.builtins_repr_check(complex,arguments) -var real=Number.isInteger(self.$real.value)? -self.$real.value+'' : -_b_.str.$factory(self.$real),imag=Number.isInteger(self.$imag.value)? -self.$imag.value+'' : -_b_.str.$factory(self.$imag) -if(imag.endsWith('.0')){imag=imag.substr(0,imag.length-2)} -if(Object.is(self.$imag.value,-0)){imag="-0"} -var sign=imag.startsWith('-')? '' :'+' -if(self.$real.value==0){if(Object.is(self.$real.value,-0)){return "(-0"+sign+imag+"j)"}else{return imag+"j"}} -if(self.$imag.value > 0 ||isNaN(self.$imag.value)){return "("+real+"+"+imag+"j)"} -if(self.$imag.value==0){if(1/self.$imag.value < 0){return "("+real+"-0j)"} -return "("+real+"+0j)"} -return "("+real+sign+imag+"j)"} -complex.__rmul__=function(self,other){if(_b_.isinstance(other,_b_.bool)){other=other ? 1 :0} -if(_b_.isinstance(other,_b_.int)){return make_complex(other*self.$real.value,other*self.$imag.value)}else if(_b_.isinstance(other,_b_.float)){return make_complex(other.value*self.$real.value,other.value*self.$imag.value)} -return _b_.NotImplemented} -complex.__sqrt__=function(self){if(self.$imag==0){return complex(Math.sqrt(self.$real.value))} -var r=self.$real.value,i=self.$imag.value,_a=Math.sqrt((r+sqrt)/2),_b=Number.sign(i)*Math.sqrt((-r+sqrt)/2) -return make_complex(_a,_b)} -complex.__sub__=function(self,other){if(_b_.isinstance(other,complex)){return make_complex(self.$real.value-other.$real.value,self.$imag.value-other.$imag.value)} -if(_b_.isinstance(other,_b_.int)){other=_b_.int.numerator(other) -return make_complex(self.$real.value-other.valueOf(),self.$imag.value)} -if(_b_.isinstance(other,_b_.float)){return make_complex(self.$real.value-other.value,self.$imag.value)} -return _b_.NotImplemented} -complex.__truediv__=function(self,other){if(_b_.isinstance(other,complex)){if(other.$real.value==0 && other.$imag.value==0){throw _b_.ZeroDivisionError.$factory("division by zero")} -var _num=self.$real.value*other.$real.value+ -self.$imag.value*other.$imag.value,_div=other.$real.value*other.$real.value+ -other.$imag.value*other.$imag.value -var _num2=self.$imag.value*other.$real.value- -self.$real.value*other.$imag.value -return make_complex(_num/_div,_num2/_div)} -if(_b_.isinstance(other,_b_.int)){if(! other.valueOf()){throw _b_.ZeroDivisionError.$factory('division by zero')} -return complex.__truediv__(self,complex.$factory(other.valueOf()))} -if(_b_.isinstance(other,_b_.float)){if(! other.value){throw _b_.ZeroDivisionError.$factory("division by zero")} -return complex.__truediv__(self,complex.$factory(other.value))} -$UnsupportedOpType("//","complex",other.__class__)} -complex.conjugate=function(self){return make_complex(self.$real.value,-self.$imag.value)} -complex.__ior__=complex.__or__ -var r_opnames=["add","sub","mul","truediv","floordiv","mod","pow","lshift","rshift","and","xor","or"] -for(var r_opname of r_opnames){if(complex["__r"+r_opname+"__"]===undefined && -complex['__'+r_opname+'__']){complex["__r"+r_opname+"__"]=(function(name){return function(self,other){if(_b_.isinstance(other,_b_.int)){other=make_complex(other,0) -return complex["__"+name+"__"](other,self)}else if(_b_.isinstance(other,_b_.float)){other=make_complex(other.value,0) -return complex["__"+name+"__"](other,self)}else if(_b_.isinstance(other,complex)){return complex["__"+name+"__"](other,self)} -return _b_.NotImplemented}})(r_opname)}} -var comp_func_body=` - var _b_ = __BRYTHON__.builtins - if(other === undefined || other == _b_.None){ - return _b_.NotImplemented - } - throw _b_.TypeError.$factory("no ordering relation " + - "is defined for complex numbers")` -for(var $op in $B.$comps){complex['__'+$B.$comps[$op]+'__']=Function('self','other',comp_func_body.replace(/>/gm,$op))} -complex.real=function(self){return self.$real} -complex.real.setter=function(){throw _b_.AttributeError.$factory("readonly attribute")} -complex.imag=function(self){return self.$imag} -complex.imag.setter=function(){throw _b_.AttributeError.$factory("readonly attribute")} -var _real=1,_real_mantissa=2,_sign=3,_imag=4,_imag_mantissa=5,_j=6 -var expected_class={"__complex__":complex,"__float__":_b_.float,"__index__":_b_.int} -function _convert(obj){ -var klass=obj.__class__ ||$B.get_class(obj) -for(var method_name in expected_class){var missing={},method=$B.$getattr(klass,method_name,missing) -if(method !==missing){var res=method(obj) -if(!_b_.isinstance(res,expected_class[method_name])){throw _b_.TypeError.$factory(method_name+"returned non-"+ -expected_class[method_name].__name__+ -"(type "+$B.get_class(res)+")")} -if(method_name=='__index__' && -$B.rich_comp('__gt__',res,__BRYTHON__.MAX_VALUE)){throw _b_.OverflowError.$factory('int too large to convert to float')} -if(method_name=='__complex__' && res.__class__ !==complex){$B.warn(_b_.DeprecationWarning,"__complex__ returned "+ -`non-complex (type ${$B.class_name(res)}). `+ -"The ability to return an instance of a strict subclass "+ -"of complex is deprecated, and may be removed in a future "+ -"version of Python.")} -return{result:res,method:method_name}}} -return null} -var make_complex=$B.make_complex=function(real,imag){return{ -__class__:complex,$real:_b_.float.$factory(real),$imag:_b_.float.$factory(imag)}} -var c_1=make_complex(1,0) -complex.$factory=function(){return complex.__new__(complex,...arguments)} -$B.set_func_names(complex,"builtins") -_b_.complex=complex})(__BRYTHON__) -; -;(function($B){ -var _b_=$B.builtins -var str_hash=_b_.str.__hash__,$N=_b_.None -var set_ops=["eq","le","lt","ge","gt","sub","rsub","and","rand","or","ror","xor","rxor"] -function is_sublist(t1,t2){ -for(var i=0,ilen=t1.length;i < ilen;i++){var x=t1[i],flag=false -for(var j=0,jlen=t2.length;j < jlen;j++){if($B.rich_comp("__eq__",x,t2[j])){t2.splice(j,1) -flag=true -break}} -if(! flag){return false}} -return true} -dict_view_op={__eq__:function(t1,t2){return t1.length==t2.length && is_sublist(t1,t2)},__ne__:function(t1,t2){return ! dict_view_op.__eq__(t1,t2)},__lt__:function(t1,t2){return t1.length < t2.length && is_sublist(t1,t2)},__gt__:function(t1,t2){return dict_view_op.__lt__(t2,t1)},__le__:function(t1,t2){return t1.length <=t2.length && is_sublist(t1,t2)},__ge__:function(t1,t2){return dict_view_op.__le__(t2,t1)},__and__:function(t1,t2){var items=[] -for(var i=0,ilen=t1.length;i < ilen;i++){var x=t1[i] -flag=false -for(var j=0,jlen=t2.length;j < jlen;j++){if($B.rich_comp("__eq__",x,t2[j])){t2.splice(j,1) -items.push(x) -break}}} -return items},__or__:function(t1,t2){var items=t1 -for(var j=0,jlen=t2.length;j < jlen;j++){var y=t2[j],flag=false -for(var i=0,ilen=t1.length;i < ilen;i++){if($B.rich_comp("__eq__",y,t1[i])){t2.splice(j,1) -flag=true -break}} -if(! flag){items.push(y)}} -return items}} -function make_view_comparison_methods(klass){for(var i=0,len=set_ops.length;i < len;i++){var op="__"+set_ops[i]+"__" -klass[op]=(function(op){return function(self,other){ -if(self.__class__.__name__=='dict_keys' || -(self.__class__.__name__=='dict_items' -&& dict.$set_like(self.dict))){return _b_.set[op](_b_.set.$factory(self),_b_.set.$factory(other))}else{ -if(other.__class__ !==klass){return false} -var other_items=_b_.list.$factory(other) -return dict_view_op[op](self.items,other_items)}}})(op)}} -$B.str_dict=function(){} -var mappingproxy=$B.make_class("mappingproxy") -var mappingproxy_handler={get(target,prop){if(prop=='__class__'){return mappingproxy} -return target[prop]}} -var dict={__class__:_b_.type,__mro__:[_b_.object],__qualname__:'dict',$is_class:true,$native:true,$match_mapping_pattern:true } -dict.$to_obj=function(d){ -var res={} -for(var entry of dict.$iter_items_with_hash(d)){res[entry.key]=entry.value} -return res} -dict.$iter_keys_check=function*(d){for(var entry of dict.$iter_items_with_hash(d)){yield entry.key}} -dict.$iter_values_check=function*(d){for(var entry of dict.$iter_items_with_hash(d)){yield entry.value}} -dict.$set_like=function(self){ -for(var v of self._values){if(v===undefined){continue}else if(typeof v=='string' || -typeof v=='number' || -typeof v=='boolean'){continue}else if([_b_.tuple,_b_.float,_b_.complex].indexOf(v.__class__)>-1){continue}else if(! _b_.hasattr(v.__class__,'__hash__')){return false}} -return true} -dict.$iter_items_with_hash=function*(d){if(d.$all_str){for(var key in d.$strings){if(key !='$dict_strings'){yield{key,value:d.$strings[key]}}}} -if(d.$jsobj){for(var key in d.$jsobj){yield{key,value:d.$jsobj[key]}}}else if(d.__class__===$B.jsobj_as_pydict){for(var key in d.obj){yield{key,value:d.obj[key]}}}else{var version=d.$version -for(var i=0,len=d._keys.length;i < len;i++){if(d._keys[i]!==undefined){yield{key:d._keys[i],value:d._values[i],hash:d._hashes[i]} -if(d.$version !==version){throw _b_.RuntimeError.$factory('changed in iteration')}}} -if(d.$version !==version){throw _b_.RuntimeError.$factory('changed in iteration')}}} -dict.$iter_items_check=function*(d){if(d.$jsobj){for(var key in d.$jsobj){yield[key,d.$jsobj[key]]}}else{var version=d.$version -for(var i=0,len=d._keys.length;i < len;i++){if(d._keys[i]!==undefined){yield[d._keys[i],d._values[i]] -if(d.$version !==version){throw _b_.RuntimeError.$factory('changed in iteration')}}} -if(d.$version !==version){throw _b_.RuntimeError.$factory('changed in iteration')}}} -var $copy_dict=function(left,right){ -right.$version=right.$version ||0 -var right_version=right.$version -if(right.$all_str){if(left.$all_str){for(var key in right.$strings){left.$strings[key]=right.$strings[key]}}else{for(var key in right.$strings){dict.$setitem(left,key,right.$strings[key])}}}else{for(var entry of dict.$iter_items_with_hash(right)){dict.$setitem(left,entry.key,entry.value,entry.hash) -if(right.$version !=right_version){throw _b_.RuntimeError.$factory("dict mutated during update")}}}} -dict.__bool__=function(){var $=$B.args("__bool__",1,{self:null},["self"],arguments,{},null,null) -return dict.__len__($.self)> 0} -dict.__class_getitem__=function(cls,item){ -if(! Array.isArray(item)){item=[item]} -return $B.GenericAlias.$factory(cls,item)} -dict.$lookup_by_key=function(d,key,hash){hash=hash===undefined ? _b_.hash(key):hash -var indices=d.table[hash],index -if(indices !==undefined){for(var i=0,len=indices.length;i < len;i++){index=indices[i] -if(d._keys[index]===undefined){d.table[hash].splice(i,1) -if(d.table[hash].length==0){delete d.table[hash] -return{found:false,hash}} -continue} -if($B.is_or_equals(d._keys[index],key)){return{found:true,key:d._keys[index],value:d._values[index],hash,rank:i,index}}}} -return{found:false,hash}} -dict.__contains__=function(){var $=$B.args("__contains__",2,{self:null,key:null},["self","key"],arguments,{},null,null),self=$.self,key=$.key -if(self.$all_str){if(typeof key=='string'){return self.$strings.hasOwnProperty(key)} -var hash=$B.$getattr($B.get_class(key),'__hash__') -if(hash===_b_.object.__hash__){return false} -convert_all_str(self)} -if(self.$jsobj){return self.$jsobj[key]!==undefined} -return dict.$lookup_by_key(self,key).found} -dict.__delitem__=function(){var $=$B.args("__eq__",2,{self:null,key:null},["self","key"],arguments,{},null,null),self=$.self,key=$.key -if(self.$all_str){if(typeof key=='string'){if(self.$strings.hasOwnProperty(key)){dict.$delete_string(self,key) -return _b_.None}else{throw _b_.KeyError.$factory(key)}} -if(! dict.__contains__(self,key)){throw _b_.KeyError.$factory(_b_.str.$factory(key))}} -if(self.$jsobj){if(self.$jsobj[key]===undefined){throw _b_.KeyError.$factory(key)} -delete self.$jsobj[key] -return $N} -var lookup=dict.$lookup_by_key(self,key) -if(lookup.found){self.table[lookup.hash].splice(lookup.rank,1) -if(self.table[lookup.hash].length==0){delete self.table[lookup.hash]} -delete self._values[lookup.index] -delete self._keys[lookup.index] -delete self._hashes[lookup.index] -self.$version++ -return _b_.None} -throw _b_.KeyError.$factory(_b_.str.$factory(key))} -dict.__eq__=function(){var $=$B.args("__eq__",2,{self:null,other:null},["self","other"],arguments,{},null,null),self=$.self,other=$.other -return dict.$eq(self,other)} -dict.$eq=function(self,other){if(! _b_.isinstance(other,dict)){return _b_.NotImplemented} -if(self.$all_str && other.$all_str){if(dict.__len__(self)!==dict.__len__(other)){return false} -for(var k in self.$strings){if(! other.$strings.hasOwnProperty(k)){return false} -if(! $B.is_or_equals(self.$strings[k],other.$strings[k])){return false}} -return true} -if(self.$jsobj && other.$jsobj){if(dict.__len__(self)!==dict.__len__(other)){return false} -for(var k in self.$jsobj){if(! other.$jsobj.hasOwnProperty(k)){return false} -if(! $B.is_or_equals(self.$jsobj[k],other.$jsobj[k])){return false}} -return true} -if(self.$all_str){var d=dict.copy(self) -convert_all_str(d) -return dict.$eq(d,other)} -if(other.$all_str){var d=dict.copy(other) -convert_all_str(d) -return dict.$eq(self,d)} -if(self.$jsobj){return dict.$eq(jsobj2dict(self.$jsobj),other)} -if(other.$jsobj){return dict.$eq(self,jsobj2dict(other.$jsobj))} -if(dict.__len__(self)!=dict.__len__(other)){return false} -for(var hash in self.table){var self_pairs=[] -for(var index of self.table[hash]){self_pairs.push([self._keys[index],self._values[index]])} -var other_pairs=[] -if(other.table[hash]!==undefined){for(var index of other.table[hash]){other_pairs.push([other._keys[index],other._values[index]])}} -for(var self_pair of self_pairs){var flag=false -var key=self_pair[0],value=self_pair[1] -for(var other_pair of other_pairs){if($B.is_or_equals(key,other_pair[0])&& -$B.is_or_equals(value,other_pair[1])){flag=true -break}} -if(! flag){return false}}} -return true} -dict.__getitem__=function(){var $=$B.args("__getitem__",2,{self:null,arg:null},["self","arg"],arguments,{},null,null),self=$.self,arg=$.arg -return dict.$getitem(self,arg)} -dict.$contains_string=function(self,key){ -if(self.$all_str){return self.$strings.hasOwnProperty(key)} -if(self.$jsobj && self.$jsobj.hasOwnProperty(key)){return true} -if(self.table && self.table[_b_.hash(key)]!==undefined){return true} -return false} -dict.$delete_string=function(self,key){ -if(self.$all_str){var ix=self.$strings[key] -if(ix !==undefined){delete self.$strings[key]}} -if(self.$jsobj){delete self.$jsobj[key]} -if(self.table){delete self.table[_b_.hash(key)]}} -dict.$missing={} -dict.$get_string=function(self,key){ -if(self.$all_str && self.$strings.hasOwnProperty(key)){return self.$strings[key]} -if(self.$jsobj && self.$jsobj.hasOwnProperty(key)){return self.$jsobj[key]} -if(self.table && dict.__len__(self)){var indices=self.table[_b_.hash(key)] -if(indices !==undefined){return self._values[indices[0]]}} -return _b_.dict.$missing} -dict.$getitem_string=function(self,key){ -if(self.$all_str && self.$strings.hasOwnProperty(key)){return self.$strings[key]} -if(self.$jsobj && self.$jsobj.hasOwnProperty(key)){return self.$jsobj[key]} -if(self.table){var indices=self.table[_b_.hash(key)] -if(indices !==undefined){return self._values[indices[0]]}} -throw _b_.KeyError.$factory(key)} -dict.$keys_string=function(self){ -var res=[] -if(self.$all_str){return Object.keys(self.$strings)} -if(self.$jsobj){res=res.concat(Object.keys(self.$jsobj))} -if(self.table){res=res.concat(self._keys.filter((x)=> x !==undefined))} -return res} -dict.$setitem_string=function(self,key,value){ -if(self.$all_str){self.$strings[key]=value -return _b_.None}else{var h=_b_.hash(key),indices=self.table[h] -if(indices !==undefined){self._values[indices[0]]=value -return _b_.None}} -var index=self._keys.length -self.$strings[key]=index -self._keys.push(key) -self._values.push(value) -self.$version++ -return _b_.None} -dict.$getitem=function(self,key,ignore_missing){ -if(self.$all_str){if(typeof key=='string'){if(self.$strings.hasOwnProperty(key)){return self.$strings[key]}}else{var hash_method=$B.$getattr($B.get_class(key),'__hash__') -if(hash_method !==_b_.object.__hash__){convert_all_str(self) -var lookup=dict.$lookup_by_key(self,key) -if(lookup.found){return lookup.value}}}}else if(self.$jsobj){if(self.$exclude && self.$exclude(key)){throw _b_.KeyError.$factory(key)} -if(self.$jsobj.hasOwnProperty(key)){return self.$jsobj[key]} -if(! self.table){throw _b_.KeyError.$factory(key)}}else{var lookup=dict.$lookup_by_key(self,key) -if(lookup.found){return lookup.value}} -if(! ignore_missing){if(self.__class__ !==dict && ! ignore_missing){try{var missing_method=$B.$getattr(self.__class__,"__missing__",_b_.None)}catch(err){console.log(err)} -if(missing_method !==_b_.None){return missing_method(self,key)}}} -throw _b_.KeyError.$factory(key)} -dict.__hash__=_b_.None -function init_from_list(self,args){for(var item of args){if(item.length !=2){throw _b_.ValueError.$factory("dictionary "+ -`update sequence element #${i} has length ${item.length}; 2 is required`)} -dict.$setitem(self,item[0],item[1])}} -dict.__init__=function(self,first,second){if(first===undefined){return _b_.None} -if(second===undefined){if((! first.$kw)&& _b_.isinstance(first,$B.JSObj)){for(var key in first){dict.$setitem(self,key,first[key])} -return _b_.None}else if(first.$jsobj){self.$jsobj={} -for(var attr in first.$jsobj){self.$jsobj[attr]=first.$jsobj[attr]} -self.$all_str=false -return $N}else if(first[Symbol.iterator]){init_from_list(self,first) -return $N}else if(first.__class__===$B.generator){init_from_list(self,first.js_gen) -return $N}} -var $=$B.args("dict",1,{self:null},["self"],arguments,{},"first","second") -var args=$.first -if(args.length > 1){throw _b_.TypeError.$factory("dict expected at most 1 argument"+ -", got 2")}else if(args.length==1){args=args[0] -if(args.__class__===dict){for(var entry of dict.$iter_items_with_hash(args)){dict.$setitem(self,entry.key,entry.value,entry.hash)}}else{var keys=$B.$getattr(args,"keys",null) -if(keys !==null){var gi=$B.$getattr(args,"__getitem__",null) -if(gi !==null){ -gi=$B.$call(gi) -var kiter=_b_.iter($B.$call(keys)()) -while(true){try{var key=_b_.next(kiter),value=gi(key) -dict.__setitem__(self,key,value)}catch(err){if(err.__class__===_b_.StopIteration){break} -throw err}} -return $N}} -if(! Array.isArray(args)){args=_b_.list.$factory(args)} -init_from_list(self,args)}} -for(var key in $.second.$jsobj){dict.$setitem(self,key,$.second.$jsobj[key])} -return _b_.None} -dict.__iter__=function(self){return _b_.iter(dict.keys(self))} -dict.__ior__=function(self,other){ -dict.update(self,other) -return self} -dict.__len__=function(self){var _count=0 -if(self.$all_str){return Object.keys(self.$strings).length} -if(self.$jsobj){for(var attr in self.$jsobj){if(attr.charAt(0)!="$" && -((! self.$exclude)||! self.$exclude(attr))){_count++}} -return _count} -for(var d of self._keys){if(d !==undefined){_count++}} -return _count} -dict.__ne__=function(self,other){var res=dict.__eq__(self,other) -return res===_b_.NotImplemented ? res :! res} -dict.__new__=function(cls){if(cls===undefined){throw _b_.TypeError.$factory("int.__new__(): not enough arguments")} -var instance=$B.empty_dict() -instance.__class__=cls -if(cls !==dict){instance.__dict__=$B.empty_dict()} -return instance} -dict.__or__=function(self,other){ -if(! _b_.isinstance(other,dict)){return _b_.NotImplemented} -var res=dict.copy(self) -dict.update(res,other) -return res} -function __newobj__(){ -var $=$B.args('__newobj__',0,{},[],arguments,{},'args',null),args=$.args -var res=$B.empty_dict() -res.__class__=args[0] -return res} -dict.__reduce_ex__=function(self,protocol){return $B.fast_tuple([__newobj__,$B.fast_tuple([self.__class__]),_b_.None,_b_.None,dict.items(self)])} -dict.__repr__=function(self){$B.builtins_repr_check(dict,arguments) -if(self.$jsobj){ -return dict.__repr__(jsobj2dict(self.$jsobj,self.$exclude))} -if($B.repr.enter(self)){return "{...}"} -var res=[],key,value -for(var entry of dict.$iter_items_with_hash(self)){res.push(_b_.repr(entry.key)+": "+_b_.repr(entry.value))} -$B.repr.leave(self) -return "{"+res.join(", ")+"}"} -dict.$iter_items_reversed=function*(d){var version=d.$version -for(var i=d._keys.length-1;i >=0;i--){var key=d._keys[i] -if(key !==undefined){yield $B.fast_tuple([key,d._values[i]]) -if(d.$version !==version){throw _b_.RuntimeError.$factory('changed in iteration')}}} -if(d.$version !==version){throw _b_.RuntimeError.$factory('changed in iteration')}} -dict.$iter_keys_reversed=function*(d){for(var entry of dict.$iter_items_reversed(d)){yield entry[0]}} -dict.$iter_values_reversed=function*(d){for(var entry of dict.$iter_items_reversed(d)){yield entry[1]}} -function make_reverse_iterator(name,iter_func){ -var klass=$B.make_class(name,function(d){return{ -__class__:klass,d,iter:iter_func(d),make_iter:function(){return iter_func(d)}}} -) -klass.__iter__=function(self){self[Symbol.iterator]=self.make_iter -return self} -klass.__next__=function(self){var res=self.iter.next() -if(res.done){throw _b_.StopIteration.$factory('')} -return res.value} -klass.__reduce_ex__=function(self,protocol){return $B.fast_tuple([_b_.iter,$B.fast_tuple([Array.from(self.make_iter())])])} -$B.set_func_names(klass,'builtins') -return klass} -dict_reversekeyiterator=make_reverse_iterator( -'dict_reversekeyiterator',dict.$iter_keys_reversed) -dict.__reversed__=function(self){return dict_reversekeyiterator.$factory(self)} -dict.__ror__=function(self,other){ -if(! _b_.isinstance(other,dict)){return _b_.NotImplemented} -var res=dict.copy(other) -dict.update(res,self) -return res} -dict.__setitem__=function(self,key,value){var $=$B.args("__setitem__",3,{self:null,key:null,value:null},["self","key","value"],arguments,{},null,null) -return dict.$setitem($.self,$.key,$.value)} -function convert_all_str(d){ -d.$all_str=false -for(var key in d.$strings){dict.$setitem(d,key,d.$strings[key])}} -dict.$setitem=function(self,key,value,$hash,from_setdefault){ -if(self.$all_str){if(typeof key=='string'){self.$strings[key]=value -return _b_.None}else{convert_all_str(self)}} -if(self.$jsobj){if(self.$from_js){ -value=$B.pyobj2jsobj(value)} -if(self.$jsobj.__class__===_b_.type){self.$jsobj[key]=value -if(key=="__init__" ||key=="__new__"){ -self.$jsobj.$factory=$B.$instance_creator(self.$jsobj)}}else{self.$jsobj[key]=value} -return $N}else if(self.__class__===$B.jsobj_as_pydict){return $B.jsobj_as_pydict.__setitem__(self,key,value)} -if(key instanceof String){key=key.valueOf()} -var hash=$hash !==undefined ? $hash :$B.$hash(key) -var index -if(self.table[hash]===undefined){index=self._keys.length -self.table[hash]=[index]}else{if(! from_setdefault){ -var lookup=dict.$lookup_by_key(self,key,hash) -if(lookup.found){self._values[lookup.index]=value -return _b_.None}} -index=self._keys.length -if(self.table[hash]===undefined){ -self.table[hash]=[index]}else{self.table[hash].push(index)}} -self._keys.push(key) -self._values.push(value) -self._hashes.push(hash) -self.$version++ -return _b_.None} -$B.make_rmethods(dict) -dict.clear=function(){ -var $=$B.args("clear",1,{self:null},["self"],arguments,{},null,null),self=$.self -self.table=Object.create(null) -self._keys=[] -self._values=[] -self.$all_str=true -self.$strings=new $B.str_dict() -if(self.$jsobj){for(var attr in self.$jsobj){if(attr.charAt(0)!=="$" && attr !=="__class__"){delete self.$jsobj[attr]}}} -self.$version++ -return $N} -dict.copy=function(self){ -var $=$B.args("copy",1,{self:null},["self"],arguments,{},null,null),self=$.self,res=$B.empty_dict() -if(self.__class__===_b_.dict){$copy_dict(res,self) -return res} -var it=$B.make_js_iterator(self) -for(var k of it){console.log('iteration yields key',k)} -return res} -dict.fromkeys=function(){var $=$B.args("fromkeys",3,{cls:null,keys:null,value:null},["cls","keys","value"],arguments,{value:_b_.None},null,null),keys=$.keys,value=$.value -var cls=$.cls,res=$B.$call(cls)(),klass=$B.get_class(res), -keys_iter=$B.$iter(keys),setitem=klass===dict ? dict.$setitem :$B.$getattr(klass,'__setitem__') -while(1){try{var key=_b_.next(keys_iter) -setitem(res,key,value)}catch(err){if($B.is_exc(err,[_b_.StopIteration])){return res} -throw err}}} -dict.get=function(){var $=$B.args("get",3,{self:null,key:null,_default:null},["self","key","_default"],arguments,{_default:$N},null,null) -try{ -return dict.$getitem($.self,$.key,true)}catch(err){if(_b_.isinstance(err,_b_.KeyError)){return $._default}else{throw err}}} -var dict_items=$B.make_class("dict_items",function(d){return{ -__class__:dict_items,dict:d,make_iter:function*(){for(var entry of dict.$iter_items_with_hash(d)){yield $B.fast_tuple([entry.key,entry.value])}}}} -) -dict_items.__iter__=function(self){return dict_itemiterator.$factory(self.make_iter)} -dict_items.__len__=function(self){return dict.__len__(self.dict)} -dict_items.__reduce__=function(self){var items=Array.from(self.make_iter()) -return $B.fast_tuple([_b_.iter,$B.fast_tuple([items])])} -dict_items.__repr__=function(self){var items=Array.from(self.make_iter()) -items=items.map($B.fast_tuple) -return 'dict_items('+_b_.repr(items)+')'} -dict_reverseitemiterator=make_reverse_iterator( -'dict_reverseitemiterator',dict.$iter_items_reversed) -dict_items.__reversed__=function(self){return dict_reverseitemiterator.$factory(self.dict)} -make_view_comparison_methods(dict_items) -$B.set_func_names(dict_items,'builtins') -var dict_itemiterator=$B.make_class('dict_itemiterator',function(make_iter){return{ -__class__:dict_itemiterator,iter:make_iter(),make_iter}} -) -dict_itemiterator.__iter__=function(self){self[Symbol.iterator]=function(){return self.iter} -return self} -dict_itemiterator.__next__=function(self){var res=self.iter.next() -if(res.done){throw _b_.StopIteration.$factory('')} -return $B.fast_tuple(res.value)} -dict_itemiterator.__reduce_ex__=function(self,protocol){return $B.fast_tuple([_b_.iter,$B.fast_tuple([Array.from(self.make_iter())])])} -$B.set_func_names(dict_itemiterator,'builtins') -dict.items=function(self){var $=$B.args('items',1,{self:null},['self'],arguments,{},null,null) -return dict_items.$factory(self)} -var dict_keys=$B.make_class("dict_keys",function(d){return{ -__class__:dict_keys,dict:d,make_iter:function(){return dict.$iter_keys_check(d)}}} -) -dict_keys.__iter__=function(self){return dict_keyiterator.$factory(self.make_iter)} -dict_keys.__len__=function(self){return dict.__len__(self.dict)} -dict_keys.__reduce__=function(self){var items=Array.from(self.make_iter()) -return $B.fast_tuple([_b_.iter,$B.fast_tuple([items])])} -dict_keys.__repr__=function(self){var items=Array.from(self.make_iter()) -return 'dict_keys('+_b_.repr(items)+')'} -dict_keys.__reversed__=function(self){return dict_reversekeyiterator.$factory(self.dict)} -make_view_comparison_methods(dict_keys) -$B.set_func_names(dict_keys,'builtins') -var dict_keyiterator=$B.make_class('dict_keyiterator',function(make_iter){return{ -__class__:dict_keyiterator,iter:make_iter(),make_iter}} -) -dict_keyiterator.__iter__=function(self){self[Symbol.iterator]=function(){return self.iter} -return self} -dict_keyiterator.__next__=function(self){var res=self.iter.next() -if(res.done){throw _b_.StopIteration.$factory('')} -return res.value} -dict_keyiterator.__reduce_ex__=function(self,protocol){return $B.fast_tuple([_b_.iter,$B.fast_tuple([Array.from(self.make_iter())])])} -$B.set_func_names(dict_keyiterator,'builtins') -dict.keys=function(self){var $=$B.args('keys',1,{self:null},['self'],arguments,{},null,null) -return dict_keys.$factory(self)} -dict.pop=function(){var missing={},$=$B.args("pop",3,{self:null,key:null,_default:null},["self","key","_default"],arguments,{_default:missing},null,null),self=$.self,key=$.key,_default=$._default -try{var res=dict.__getitem__(self,key) -dict.__delitem__(self,key) -return res}catch(err){if(err.__class__===_b_.KeyError){if(_default !==missing){return _default} -throw err} -throw err}} -dict.popitem=function(self){$B.check_nb_args_no_kw('popitem',1,arguments) -if(dict.__len__(self)==0){throw _b_.KeyError.$factory("'popitem(): dictionary is empty'")} -if(self.$all_str){for(var key in self.$strings){} -var res=$B.fast_tuple([key,self.$strings[key]]) -delete self.$strings[key] -self.$version++ -return res} -var index=self._keys.length-1 -while(index >=0){if(self._keys[index]!==undefined){var res=$B.fast_tuple([self._keys[index],self._values[index]]) -delete self._keys[index] -delete self._values[index] -self.$version++ -return res} -index--}} -dict.setdefault=function(){var $=$B.args("setdefault",3,{self:null,key:null,_default:null},["self","key","_default"],arguments,{_default:$N},null,null),self=$.self,key=$.key,_default=$._default -_default=_default===undefined ? _b_.None :_default -if(self.$all_str){if(! self.$strings.hasOwnProperty(key)){self.$strings[key]=_default} -return self.$strings[key]} -if(self.$jsobj){if(! self.$jsobj.hasOwnProperty(key)){self.$jsobj[key]=_default} -return self.$jsobj[key]} -var lookup=dict.$lookup_by_key(self,key) -if(lookup.found){return lookup.value} -var hash=lookup.hash -dict.$setitem(self,key,_default,hash,true) -return _default} -dict.update=function(self){var $=$B.args("update",1,{"self":null},["self"],arguments,{},"args","kw"),self=$.self,args=$.args,kw=$.kw -if(args.length > 0){var o=args[0] -if(_b_.isinstance(o,dict)){if(o.$jsobj){o=jsobj2dict(o.$jsobj)} -$copy_dict(self,o)}else if(_b_.hasattr(o,"keys")){var _keys=_b_.list.$factory($B.$call($B.$getattr(o,"keys"))()) -for(var i=0,len=_keys.length;i < len;i++){var _value=$B.$getattr(o,"__getitem__")(_keys[i]) -dict.$setitem(self,_keys[i],_value)}}else{var it=_b_.iter(o),i=0 -while(true){try{var item=_b_.next(it)}catch(err){if(err.__class__===_b_.StopIteration){break} -throw err} -try{key_value=_b_.list.$factory(item)}catch(err){throw _b_.TypeError.$factory("cannot convert dictionary"+ -" update sequence element #"+i+" to a sequence")} -if(key_value.length !==2){throw _b_.ValueError.$factory("dictionary update "+ -"sequence element #"+i+" has length "+ -key_value.length+"; 2 is required")} -dict.$setitem(self,key_value[0],key_value[1]) -i++}}} -$copy_dict(self,kw) -return $N} -var dict_values=$B.make_class("dict_values",function(d){return{ -__class__:dict_values,dict:d,make_iter:function(){return dict.$iter_values_check(d)}}} -) -dict_values.__iter__=function(self){return dict_valueiterator.$factory(self.make_iter)} -dict_values.__len__=function(self){return dict.__len__(self.dict)} -dict_values.__reduce__=function(self){var items=Array.from(self.make_iter()) -return $B.fast_tuple([_b_.iter,$B.fast_tuple([items])])} -dict_values.__repr__=function(self){var items=Array.from(self.make_iter()) -return 'dict_values('+_b_.repr(items)+')'} -dict_reversevalueiterator=make_reverse_iterator( -'dict_reversevalueiterator',dict.$iter_values_reversed) -dict_values.__reversed__=function(self){return dict_reversevalueiterator.$factory(self.dict)} -make_view_comparison_methods(dict_values) -$B.set_func_names(dict_values,'builtins') -var dict_valueiterator=$B.make_class('dict_valueiterator',function(make_iter){return{ -__class__:dict_valueiterator,iter:make_iter(),make_iter}} -) -dict_valueiterator.__iter__=function(self){self[Symbol.iterator]=function(){return self.iter} -return self} -dict_valueiterator.__next__=function(self){var res=self.iter.next() -if(res.done){throw _b_.StopIteration.$factory('')} -return res.value} -dict_valueiterator.__reduce_ex__=function(self,protocol){return $B.fast_tuple([_b_.iter,$B.fast_tuple([Array.from(self.make_iter())])])} -$B.set_func_names(dict_valueiterator,'builtins') -dict.values=function(self){var $=$B.args('values',1,{self:null},['self'],arguments,{},null,null) -return dict_values.$factory(self)} -dict.$literal=function(items){var res=$B.empty_dict() -for(var item of items){dict.$setitem(res,item[0],item[1],item[2])} -return res} -dict.$factory=function(){var res=dict.__new__(dict) -var args=[res] -for(var arg of arguments){args.push(arg)} -dict.__init__.apply(null,args) -return res} -_b_.dict=dict -$B.set_func_names(dict,"builtins") -dict.__class_getitem__=_b_.classmethod.$factory(dict.__class_getitem__) -$B.empty_dict=function(){return{ -__class__:dict,table:Object.create(null),_keys:[],_values:[],_hashes:[],$strings:new $B.str_dict(),$version:0,$order:0,$all_str:true}} -dict.fromkeys=_b_.classmethod.$factory(dict.fromkeys) -var mappingproxy=$B.mappingproxy=$B.make_class("mappingproxy",function(obj){if(_b_.isinstance(obj,dict)){ -var res=$B.obj_dict(dict.$to_obj(obj))}else{var res=$B.obj_dict(obj)} -res.__class__=mappingproxy -res.$version=0 -return res} -) -mappingproxy.$match_mapping_pattern=true -mappingproxy.__repr__=function(self){var d=$B.empty_dict() -for(var key in self.$jsobj){dict.$setitem(d,key,self.$jsobj[key])} -return dict.__repr__(d)} -mappingproxy.__setitem__=function(){throw _b_.TypeError.$factory("'mappingproxy' object does not support "+ -"item assignment")} -for(var attr in dict){if(mappingproxy[attr]!==undefined || -["__class__","__mro__","__new__","__init__","__delitem__","clear","fromkeys","pop","popitem","setdefault","update"].indexOf(attr)>-1){continue} -if(typeof dict[attr]=="function"){mappingproxy[attr]=(function(key){return function(){return dict[key].apply(null,arguments)}})(attr)}else{mappingproxy[attr]=dict[attr]}} -$B.set_func_names(mappingproxy,"builtins") -function jsobj2dict(x,exclude){exclude=exclude ||function(){return false} -var d=$B.empty_dict() -for(var attr in x){if(attr.charAt(0)!="$" && ! exclude(attr)){if(x[attr]===null){dict.$setitem(d,attr,_b_.None)}else if(x[attr]===undefined){continue}else if(x[attr].$jsobj===x){dict.$setitem(d,attr,d)}else{dict.$setitem(d,attr,$B.$JS2Py(x[attr]))}}} -return d} -$B.obj_dict=function(obj,exclude){var klass=obj.__class__ ||$B.get_class(obj) -if(klass !==undefined && klass.$native){throw $B.attr_error("__dict__",obj)} -var res={__class__:dict,$jsobj:obj,$exclude:exclude ||function(){return false}} -return res} -var jsobj_as_pydict=$B.jsobj_as_pydict=$B.make_class('jsobj_as_pydict',function(jsobj){return{ -__class__:jsobj_as_pydict,obj:jsobj ||{},new_keys:[],$version:0}} -) -jsobj_as_pydict.__contains__=function(self,key){if(self.new_keys.indexOf(key)>-1){return true} -return self.obj[key]!==undefined} -jsobj_as_pydict.__delitem__=function(self,key){jsobj_as_pydict.__getitem__(self,key) -delete self.obj[key] -var ix=self.new_keys.indexOf(key) -if(ix >-1){self.new_keys.splice(ix,1)}} -jsobj_as_pydict.__eq__=function(self,other){if(other.__class__ !==jsobj_as_pydict && -! $B.$isinstance(other,_b_.dict)){return _b_.NotImplemented} -var self1=$B.empty_dict() -other1=$B.empty_dict() -dict.__init__(self1,jsobj_as_pydict.items(self)) -dict.__init__(other1,$B.get_class(other).items(other)) -return dict.__eq__(self1,other1)} -jsobj_as_pydict.__ne__=function(self,other){var eq=jsobj_as_pydict.__eq__(self,other) -return eq===_b_.NotImplemented ? eq :! eq} -jsobj_as_pydict.__getitem__=function(self,key){if(self.obj.hasOwnProperty(key)){return self.obj[key]} -throw _b_.KeyError.$factory(key)} -jsobj_as_pydict.__iter__=function(self){return _b_.iter(jsobj_as_pydict.keys(self))} -jsobj_as_pydict.__len__=function(self){var len=0 -for(var key in self.obj){len++} -return len+self.new_keys.length} -jsobj_as_pydict.__or__=function(self,other){ -if(! _b_.isinstance(other,[dict,jsobj_as_pydict])){return _b_.NotImplemented} -var res=jsobj_as_pydict.copy(self) -jsobj_as_pydict.update(res,other) -return res} -jsobj_as_pydict.__repr__=function(self){if($B.repr.enter(self)){return "{...}"} -var res=[],items=_b_.list.$factory(jsobj_as_pydict.items(self)) -for(var item of items){res.push(_b_.repr(item[0])+": "+_b_.repr(item[1]))} -$B.repr.leave(self) -return "{"+res.join(", ")+"}"} -jsobj_as_pydict.__setitem__=function(self,key,value){self.obj[key]=value} -jsobj_as_pydict.clear=function(self){self.obj={} -return _b_.None} -jsobj_as_pydict.copy=function(self){var copy=jsobj_as_pydict.$factory() -for(var key in self.obj){copy.obj[key]=self.obj[key]} -return copy} -jsobj_as_pydict.get=function(self,key,_default){_default=_default===undefined ? _b_.None :_default -if(! self.obj.hasOwnProperty(key)){return _default} -return self.obj[key]} -jsobj_as_pydict.$iter_items=function*(self){for(var key in self.obj){yield $B.fast_tuple([key,self.obj[key]])}} -jsobj_as_pydict.items=function(self){var items=Array.from(jsobj_as_pydict.$iter_items(self)) -return _b_.iter(items)} -jsobj_as_pydict.keys=function(self){var items=Array.from(jsobj_as_pydict.$iter_items(self)),keys=items.map(x=> x[0]) -return _b_.iter(keys)} -jsobj_as_pydict.pop=function(){var missing={},$=$B.args("pop",3,{self:null,key:null,_default:null},["self","key","_default"],arguments,{_default:missing},null,null),self=$.self,key=$.key,_default=$._default -if(self.obj.hasOwnProperty(key)){var res=self.obj[key] -delete self.obj[key] -return res}else{if(_default !==missing){return _default} -throw _b_.KeyError.$factory(key)}} -jsobj_as_pydict.popitem=function(self){$B.check_nb_args_no_kw('popitem',1,arguments) -for(var key in self.obj){var res=$B.fast_tuple([key,self.obj[key]]) -delete self.obj[key] -return res} -throw _b_.KeyError.$factory("'popitem(): dictionary is empty'")} -jsobj_as_pydict.update=function(self,other){var klass=$B.get_class(other),keys=$B.$call($B.$getattr(klass,'keys')),getitem -for(var key of $B.make_js_iterator(keys(other))){if(! getitem){getitem=$B.$call($B.$getattr(klass,'__getitem__'))} -self.obj[key]=getitem(other,key)} -return _b_.None} -jsobj_as_pydict.values=function(self){var items=Array.from(jsobj_as_pydict.$iter_items(self)),values=items.map(x=> x[1]) -return _b_.iter(values)} -$B.set_func_names(jsobj_as_pydict,'builtins')})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins,object=_b_.object,getattr=$B.$getattr,isinstance=_b_.isinstance -function check_not_tuple(self,attr){if(self.__class__===tuple){throw $B.attr_error(attr,self)}} -function $list(){ -return list.$factory.apply(null,arguments)} -var list={__class__:_b_.type,__qualname__:'list',__mro__:[object],$is_class:true,$native:true,$match_sequence_pattern:true, -__dir__:object.__dir__} -list.__add__=function(self,other){if($B.get_class(self)!==$B.get_class(other)){var this_name=$B.class_name(self) -var radd=$B.$getattr(other,'__radd__',null) -if(radd===null){throw _b_.TypeError.$factory('can only concatenate '+ -this_name+' (not "'+$B.class_name(other)+ -'") to '+this_name)} -return _b_.NotImplemented} -var res=self.slice(),is_js=other.$brython_class=="js" -for(const item of other){res.push(is_js ? $B.$JS2Py(item):item)} -res.__brython__=true -if(isinstance(self,tuple)){res=tuple.$factory(res)} -return res} -list.__bool__=function(self){return list.__len__(self)> 0} -list.__class_getitem__=function(cls,item){ -if(! Array.isArray(item)){item=[item]} -return $B.GenericAlias.$factory(cls,item)} -list.__contains__=function(self,item){var $=$B.args("__contains__",2,{self:null,item:null},["self","item"],arguments,{},null,null),self=$.self,item=$.item -for(var _item of self){if($B.is_or_equals(_item,item)){return true}} -return false} -list.__delitem__=function(self,arg){if(isinstance(arg,_b_.int)){var pos=arg -if(arg < 0){pos=self.length+pos} -if(pos >=0 && pos < self.length){self.splice(pos,1) -return _b_.None} -throw _b_.IndexError.$factory($B.class_name(self)+ -" index out of range")} -if(isinstance(arg,_b_.slice)){var step=arg.step -if(step===_b_.None){step=1} -var start=arg.start -if(start===_b_.None){start=step > 0 ? 0 :self.length} -var stop=arg.stop -if(stop===_b_.None){stop=step > 0 ? self.length :0} -if(start < 0){start=self.length+start} -if(stop < 0){stop=self.length+stop} -var res=[],i=null,pos=0 -if(step > 0){if(stop > start){for(var i=start;i < stop;i+=step){if(self[i]!==undefined){res[pos++]=i}}}}else{if(stop < start){for(var i=start;i > stop;i+=step){if(self[i]!==undefined){res[pos++]=i}} -res.reverse()}} -var i=res.length -while(i--){self.splice(res[i],1)} -return _b_.None} -if(_b_.hasattr(arg,"__int__")||_b_.hasattr(arg,"__index__")){list.__delitem__(self,_b_.int.$factory(arg)) -return _b_.None} -throw _b_.TypeError.$factory($B.class_name(self)+ -" indices must be integer, not "+$B.class_name(arg))} -list.__eq__=function(self,other){var klass=isinstance(self,list)? list :tuple -if(isinstance(other,klass)){if(other.length==self.length){var i=self.length -while(i--){if(! $B.is_or_equals(self[i],other[i])){return false}} -return true} -return false} -return _b_.NotImplemented} -list.__getitem__=function(self,key){ -$B.check_nb_args_no_kw("__getitem__",2,arguments) -return list.$getitem(self,key)} -list.$getitem=function(self,key){var klass=(self.__class__ ||$B.get_class(self)) -var factory=function(list_res){list_res.__class__=klass -return list_res} -var int_key -try{int_key=$B.PyNumber_Index(key)}catch(err){} -if(int_key !==undefined){var items=self.valueOf(),pos=int_key -if(int_key < 0){pos=items.length+pos} -if(pos >=0 && pos < items.length){return items[pos]} -throw _b_.IndexError.$factory($B.class_name(self)+ -" index out of range")} -if(key.__class__===_b_.slice ||isinstance(key,_b_.slice)){ -if(key.start===_b_.None && key.stop===_b_.None && -key.step===_b_.None){return self.slice()} -var s=_b_.slice.$conv_for_seq(key,self.length) -var res=[],i=null,items=self.valueOf(),pos=0,start=s.start,stop=s.stop,step=s.step -if(step > 0){if(stop <=start){return factory(res)} -for(var i=start;i < stop;i+=step){res[pos++]=items[i]} -return factory(res)}else{if(stop > start){return factory(res)} -for(var i=start;i > stop;i+=step){res[pos++]=items[i]} -return factory(res)}} -throw _b_.TypeError.$factory($B.class_name(self)+ -" indices must be integer, not "+$B.class_name(key))} -list.__ge__=function(self,other){ -if(! _b_.isinstance(other,list)){return _b_.NotImplemented} -var res=list.__le__(other,self) -if(res===_b_.NotImplemented){return res} -return res} -list.__gt__=function(self,other){ -if(! _b_.isinstance(other,list)){return _b_.NotImplemented} -var res=list.__lt__(other,self) -if(res===_b_.NotImplemented){return res} -return res} -list.__hash__=_b_.None -list.__iadd__=function(){var $=$B.args("__iadd__",2,{self:null,x:null},["self","x"],arguments,{},null,null) -var x=list.$factory($B.$iter($.x)) -for(var i=0;i < x.length;i++){$.self.push(x[i])} -return $.self} -list.__imul__=function(){var $=$B.args("__imul__",2,{self:null,x:null},["self","x"],arguments,{},null,null),x=$B.$GetInt($.x),len=$.self.length,pos=len -if(x==0){list.clear($.self) -return $.self} -for(var i=1;i < x;i++){for(j=0;j < len;j++){$.self[pos++]=$.self[j]}} -return $.self} -list.__init__=function(self,arg){var $=$B.args('__init__',1,{self:null},['self'],arguments,{},'args',null),self=$.self,args=$.args -if(args.length > 1){throw _b_.TypeError.$factory('expected at most 1 argument, got '+ -args.length)} -var arg=args[0] -var len_func=$B.$call($B.$getattr(self,"__len__")),pop_func=$B.$getattr(self,"pop",_b_.None) -if(pop_func !==_b_.None){pop_func=$B.$call(pop_func) -while(len_func()){pop_func()}} -if(arg===undefined){return _b_.None} -var arg=$B.$iter(arg),next_func=$B.$call($B.$getattr(arg,"__next__")),pos=len_func() -while(1){try{var res=next_func() -self[pos++]=res}catch(err){if(err.__class__===_b_.StopIteration){break} -else{throw err}}} -return _b_.None} -var list_iterator=$B.make_iterator_class("list_iterator") -list_iterator.__reduce__=list_iterator.__reduce_ex__=function(self){return $B.fast_tuple([_b_.iter,$B.fast_tuple([list.$factory(self)]),0])} -list.__iter__=function(self){return list_iterator.$factory(self)} -list.__le__=function(self,other){ -if(! isinstance(other,[list,_b_.tuple])){return _b_.NotImplemented} -var i=0 -while(i < self.length && i < other.length && -$B.is_or_equals(self[i],other[i])){i++} -if(i==self.length){ -return self.length <=other.length} -if(i==other.length){ -return false} -return $B.rich_comp('__le__',self[i],other[i])} -list.__len__=function(self){return self.length} -list.__lt__=function(self,other){ -if(! isinstance(other,[list,_b_.tuple])){return _b_.NotImplemented} -var i=0 -while(i < self.length && i < other.length && -$B.is_or_equals(self[i],other[i])){i++} -if(i==self.length){ -return self.length < other.length} -if(i==other.length){ -return false} -return $B.rich_comp('__lt__',self[i],other[i])} -list.__mul__=function(self,other){try{other=$B.PyNumber_Index(other)}catch(err){throw _b_.TypeError.$factory("can't multiply sequence by non-int "+ -`of type '${$B.class_name(other)}'`)} -if(self.length==0){return list.__new__(list)} -if(typeof other=='number'){if(other < 0){return list.__new__(list)} -if(self.length > $B.max_array_size/other){throw _b_.OverflowError.$factory(`cannot fit `+ -`'${$B.class_name(other)}' into an index-sized integer`)} -var res=[],$temp=self.slice(),len=$temp.length -for(var i=0;i < other;i++){for(var j=0;j < len;j++){res.push($temp[j])}} -res.__class__=self.__class__ -if(self.__brython__){res.__brython__=self.__brython__} -return res}else if(_b_.isinstance(other,$B.long_int)){throw _b_.OverflowError.$factory(`cannot fit `+ -`'${$B.class_name(other)}' into an index-sized integer`)}} -list.__new__=function(cls,...args){if(cls===undefined){throw _b_.TypeError.$factory("list.__new__(): not enough arguments")} -var res=[] -res.__class__=cls -res.__brython__=true -res.__dict__=$B.empty_dict() -return res} -function __newobj__(){ -var $=$B.args('__newobj__',0,{},[],arguments,{},'args',null),args=$.args -var res=args.slice(1) -res.__class__=args[0] -return res} -list.__reduce_ex__=function(self){return $B.fast_tuple([__newobj__,$B.fast_tuple([self.__class__]),_b_.None,_b_.iter(self)])} -list.__repr__=function(self){$B.builtins_repr_check(list,arguments) -return list_repr(self)} -function list_repr(self){ -if($B.repr.enter(self)){ -return '[...]'} -var _r=[],res -for(var i=0;i < self.length;i++){_r.push(_b_.repr(self[i]))} -if(_b_.isinstance(self,tuple)){if(self.length==1){res="("+_r[0]+",)"}else{res="("+_r.join(", ")+")"}}else{res="["+_r.join(", ")+"]"} -$B.repr.leave(self) -return res} -list.__rmul__=function(self,other){return list.__mul__(self,other)} -list.__setattr__=function(self,attr,value){if(self.__class__===list ||self.__class__===tuple){var cl_name=$B.class_name(self) -if(list.hasOwnProperty(attr)){throw _b_.AttributeError.$factory("'"+cl_name+ -"' object attribute '"+attr+"' is read-only")}else{throw _b_.AttributeError.$factory( -"'"+cl_name+" object has no attribute '"+attr+"'")}} -_b_.dict.$setitem(self.__dict__,attr,value) -return _b_.None} -list.__setitem__=function(){var $=$B.args("__setitem__",3,{self:null,key:null,value:null},["self","key","value"],arguments,{},null,null),self=$.self,arg=$.key,value=$.value -list.$setitem(self,arg,value)} -list.$setitem=function(self,arg,value){ -if(typeof arg=="number" ||isinstance(arg,_b_.int)){var pos=arg -if(arg < 0){pos=self.length+pos} -if(pos >=0 && pos < self.length){self[pos]=value}else{throw _b_.IndexError.$factory("list index out of range")} -return _b_.None} -if(isinstance(arg,_b_.slice)){var s=_b_.slice.$conv_for_seq(arg,self.length) -if(arg.step===null){$B.set_list_slice(self,s.start,s.stop,value)}else{$B.set_list_slice_step(self,s.start,s.stop,s.step,value)} -return _b_.None} -if(_b_.hasattr(arg,"__int__")||_b_.hasattr(arg,"__index__")){list.__setitem__(self,_b_.int.$factory(arg),value) -return _b_.None} -throw _b_.TypeError.$factory("list indices must be integer, not "+ -$B.class_name(arg))} -list.append=function(self,x){$B.check_nb_args_no_kw("append",2,arguments) -self.push(x) -return _b_.None} -list.clear=function(){var $=$B.args("clear",1,{self:null},["self"],arguments,{},null,null) -while($.self.length){$.self.pop()} -return _b_.None} -list.copy=function(){var $=$B.args("copy",1,{self:null},["self"],arguments,{},null,null) -var res=$.self.slice() -res.__class__=self.__class__ -res.__brython__=true -return res} -list.count=function(){var $=$B.args("count",2,{self:null,x:null},["self","x"],arguments,{},null,null) -var res=0 -for(var _item of $.self){if($B.is_or_equals(_item,$.x)){res++}} -return res} -list.extend=function(){var $=$B.args("extend",2,{self:null,t:null},["self","t"],arguments,{},null,null) -var other=list.$factory(_b_.iter($.t)) -for(var i=0;i < other.length;i++){$.self.push(other[i])} -return _b_.None} -list.index=function(){var missing={},$=$B.args("index",4,{self:null,x:null,start:null,stop:null},["self","x","start" ,"stop"],arguments,{start:0,stop:missing},null,null),self=$.self,start=$.start,stop=$.stop -var _eq=function(other){return $B.rich_comp("__eq__",$.x,other)} -if(start.__class__===$B.long_int){start=parseInt(start.value)*(start.pos ? 1 :-1)} -if(start < 0){start=Math.max(0,start+self.length)} -if(stop===missing){stop=self.length}else{if(stop.__class__===$B.long_int){stop=parseInt(stop.value)*(stop.pos ? 1 :-1)} -if(stop < 0){stop=Math.min(self.length,stop+self.length)} -stop=Math.min(stop,self.length)} -for(var i=start;i < stop;i++){if($B.rich_comp('__eq__',$.x,self[i])){return i}} -throw _b_.ValueError.$factory(_b_.repr($.x)+" is not in "+ -$B.class_name(self))} -list.insert=function(){var $=$B.args("insert",3,{self:null,i:null,item:null},["self","i","item"],arguments,{},null,null) -$.self.splice($.i,0,$.item) -return _b_.None} -list.pop=function(){var missing={} -var $=$B.args("pop",2,{self:null,pos:null},["self","pos"],arguments,{pos:missing},null,null),self=$.self,pos=$.pos -check_not_tuple(self,"pop") -if(pos===missing){pos=self.length-1} -pos=$B.$GetInt(pos) -if(pos < 0){pos+=self.length} -var res=self[pos] -if(res===undefined){throw _b_.IndexError.$factory("pop index out of range")} -self.splice(pos,1) -return res} -list.remove=function(){var $=$B.args("remove",2,{self:null,x:null},["self","x"],arguments,{},null,null) -for(var i=0,len=$.self.length;i < len;i++){if($B.rich_comp("__eq__",$.self[i],$.x)){$.self.splice(i,1) -return _b_.None}} -throw _b_.ValueError.$factory(_b_.str.$factory($.x)+" is not in list")} -list.reverse=function(self){var $=$B.args("reverse",1,{self:null},["self"],arguments,{},null,null),_len=$.self.length-1,i=parseInt($.self.length/2) -while(i--){var buf=$.self[i] -$.self[i]=$.self[_len-i] -$.self[_len-i]=buf} -return _b_.None} -function $partition(arg,array,begin,end,pivot) -{var piv=array[pivot] -array=swap(array,pivot,end-1) -var store=begin -if(arg===null){if(array.$cl !==false){ -var le_func=_b_.getattr(array.$cl,"__le__") -for(var ix=begin;ix < end-1;++ix){if(le_func(array[ix],piv)){array=swap(array,store,ix); -++store}}}else{for(var ix=begin;ix < end-1;++ix){if($B.$getattr(array[ix],"__le__")(piv)){array=swap(array,store,ix) -++store}}}}else{var len=array.length -for(var ix=begin;ix < end-1;++ix){var x=arg(array[ix]) -if(array.length !==len){throw _b_.ValueError.$factory("list modified during sort")} -if($B.$getattr(x,"__le__")(arg(piv))){array=swap(array,store,ix) -++store}}} -array=swap(array,end-1,store) -return store} -function swap(_array,a,b){var tmp=_array[a] -_array[a]=_array[b] -_array[b]=tmp -return _array} -function $qsort(arg,array,begin,end){if(end-1 > begin){var pivot=begin+Math.floor(Math.random()*(end-begin)) -pivot=$partition(arg,array,begin,end,pivot) -$qsort(arg,array,begin,pivot) -$qsort(arg,array,pivot+1,end)}} -function $elts_class(self){ -if(self.length==0){return null} -var cl=$B.get_class(self[0]),i=self.length -while(i--){if($B.get_class(self[i])!==cl){return false}} -return cl} -list.sort=function(self){var $=$B.args("sort",1,{self:null},["self"],arguments,{},null,"kw") -check_not_tuple(self,"sort") -var func=_b_.None,reverse=false,kw_args=$.kw -for(var key in kw_args.$jsobj){if(key=="key"){func=kw_args.$jsobj[key]}else if(key=="reverse"){reverse=kw_args.$jsobj[key]}else{throw _b_.TypeError.$factory("'"+key+ -"' is an invalid keyword argument for this function")}} -if(self.length==0){return _b_.None} -if(func !==_b_.None){func=$B.$call(func)} -self.$cl=$elts_class(self) -var cmp=null; -function basic_cmp(a,b){return $B.rich_comp("__lt__",a,b)?-1: -$B.rich_comp('__eq__',a,b)? 0 :1} -function reverse_cmp(a,b){return basic_cmp(b,a)} -if(func===_b_.None && self.$cl===_b_.str){if(reverse){cmp=function(b,a){return $B.$AlphabeticalCompare(a,b)}}else{cmp=function(a,b){return $B.$AlphabeticalCompare(a,b)}}}else if(func===_b_.None && self.$cl===_b_.int){if(reverse){cmp=function(b,a){return a-b}}else{cmp=function(a,b){return a-b}}}else{cmp=reverse ? -function(t1,t2){return basic_cmp(t2[0],t1[0])}: -function(t1,t2){return basic_cmp(t1[0],t2[0])} -if(func===_b_.None){cmp=reverse ? reverse_cmp :basic_cmp -self.sort(cmp)}else{var temp=[],saved=self.slice() -for(var i=0,len=self.length;i < len;i++){temp.push([func(self[i]),i])} -temp.sort(cmp) -for(var i=0,len=temp.length;i < len;i++){self[i]=saved[temp[i][1]]}} -return self.__brython__ ? _b_.None :self} -$B.$TimSort(self,cmp) -return self.__brython__ ? _b_.None :self} -$B.$list=function(t){t.__brython__=true -t.__class__=_b_.list -return t} -var factory=function(){var klass=this -if(arguments.length==0){return $B.$list([])} -var $=$B.args(klass.__name__,1,{obj:null},["obj"],arguments,{},null,null),obj=$.obj -if(Array.isArray(obj)){ -obj=obj.slice() -obj.__brython__=true; -if(obj.__class__==tuple){var res=obj.slice() -res.__class__=list -res.__brython__=true -return res} -return obj} -var res=Array.from($B.make_js_iterator(obj)) -res.__brython__=true -return res} -list.$factory=function(){return factory.apply(list,arguments)} -list.$unpack=function(obj){ -try{return _b_.list.$factory(obj)}catch(err){try{var it=$B.$iter(obj),next_func=$B.$call($B.$getattr(it,"__next__"))}catch(err1){if($B.is_exc(err1,[_b_.TypeError])){throw _b_.TypeError.$factory( -`Value after * must be an iterable, not ${$B.class_name(obj)}`)} -throw err1} -throw err}} -$B.set_func_names(list,"builtins") -var JSArray=$B.JSArray=$B.make_class("JSArray",function(array){return{ -__class__:JSArray,js:array}} -) -JSArray.__repr__=JSArray.__str__=function(){return ""} -function make_args(args){var res=[args[0].js] -for(var i=1,len=args.length;i < len;i++){res.push(args[i])} -return res} -for(var attr in list){if($B.JSArray[attr]!==undefined){continue} -if(typeof list[attr]=="function"){$B.JSArray[attr]=(function(fname){return function(){return $B.$JS2Py(list[fname].apply(null,make_args(arguments)))}})(attr)}} -$B.set_func_names($B.JSArray,"builtins") -function $tuple(arg){return arg} -var tuple={__class__:_b_.type,__mro__:[object],__qualname__:'tuple',$is_class:true,$native:true,$match_sequence_pattern:true,} -var tuple_iterator=$B.make_iterator_class("tuple_iterator") -tuple.__iter__=function(self){return tuple_iterator.$factory(self)} -tuple.$factory=function(){var obj=factory.apply(tuple,arguments) -obj.__class__=tuple -return obj} -$B.fast_tuple=function(array){array.__class__=tuple -array.__brython__=true -array.__dict__=$B.empty_dict() -return array} -for(var attr in list){switch(attr){case "__delitem__": -case "__iadd__": -case "__imul__": -case "__setitem__": -case "append": -case "extend": -case "insert": -case "pop": -case "remove": -case "reverse": -case "sort": -break -default: -if(tuple[attr]===undefined){if(typeof list[attr]=="function"){tuple[attr]=(function(x){return function(){return list[x].apply(null,arguments)}})(attr)}}}} -tuple.__class_getitem__=function(cls,item){ -if(! Array.isArray(item)){item=[item]} -return $B.GenericAlias.$factory(cls,item)} -tuple.__eq__=function(self,other){ -if(other===undefined){return self===tuple} -return list.__eq__(self,other)} -function c_mul(a,b){s=((parseInt(a)*b)& 0xFFFFFFFF).toString(16) -return parseInt(s.substr(0,s.length-1),16)} -tuple.$getnewargs=function(self){return $B.fast_tuple([self])} -tuple.__getnewargs__=function(){return tuple.$getnewargs($B.single_arg('__getnewargs__','self',arguments))} -tuple.__hash__=function(self){ -var x=0x3456789 -for(var i=0,len=self.length;i < len;i++){var y=_b_.hash(self[i]) -x=c_mul(1000003,x)^ y & 0xFFFFFFFF} -return x} -tuple.__init__=function(){ -return _b_.None} -tuple.__new__=function(cls,...args){if(cls===undefined){throw _b_.TypeError.$factory("list.__new__(): not enough arguments")} -var self=[] -self.__class__=cls -self.__brython__=true -self.__dict__=$B.empty_dict() -var arg=$B.$iter(args[0]),next_func=$B.$call($B.$getattr(arg,"__next__")) -while(1){try{var item=next_func() -self.push(item)} -catch(err){if(err.__class__===_b_.StopIteration){break} -else{throw err}}} -return self} -tuple.__reduce_ex__=function(self){return $B.fast_tuple([__newobj__,$B.fast_tuple([self.__class__].concat(self.slice())),_b_.None,_b_.None])} -tuple.__repr__=function(self){$B.builtins_repr_check(tuple,arguments) -return list_repr(self)} -$B.set_func_names(tuple,"builtins") -_b_.list=list -_b_.tuple=tuple -_b_.object.__bases__=tuple.$factory() -_b_.type.__bases__=$B.fast_tuple([_b_.object])})(__BRYTHON__) -; -;(function($B){ -var _b_=$B.builtins -var $GeneratorReturn={} -$B.generator_return=function(value){return{__class__:$GeneratorReturn,value:value}} -$B.generator=$B.make_class("generator",function(func,name){ -var res=function(){var gen=func.apply(null,arguments) -gen.$name=name ||'generator' -gen.$func=func -gen.$has_run=false -return{ -__class__:$B.generator,js_gen:gen}} -res.$infos=func.$infos -res.$is_genfunc=true -res.$name=name -return res} -) -$B.generator.__iter__=function(self){return self} -$B.generator.__next__=function(self){return $B.generator.send(self,_b_.None)} -$B.generator.__str__=function(self){var name=self.js_gen.$name ||'generator' -if(self.js_gen.$func && self.js_gen.$func.$infos){name=self.js_gen.$func.$infos.__qualname__} -return ``} -$B.generator.close=function(self){var save_stack=$B.frames_stack.slice() -if(self.$frame){$B.frames_stack.push(self.$frame)} -try{$B.generator.throw(self,_b_.GeneratorExit.$factory())}catch(err){if(! $B.is_exc(err,[_b_.GeneratorExit,_b_.StopIteration])){$B.frames_stack=save_stack -throw _b_.RuntimeError.$factory("generator ignored GeneratorExit")}} -$B.frames_stack=save_stack} -function trace(){return $B.frames_stack.slice()} -$B.generator.send=function(self,value){ -var gen=self.js_gen -gen.$has_run=true -if(gen.$finished){throw _b_.StopIteration.$factory(value)} -if(gen.gi_running===true){throw _b_.ValueError.$factory("generator already executing")} -gen.gi_running=true -var save_stack=$B.frames_stack.slice() -if(self.$frame){$B.frames_stack.push(self.$frame)} -try{var res=gen.next(value)}catch(err){gen.$finished=true -$B.frames_stack=save_stack -throw err} -if($B.last($B.frames_stack)===self.$frame){$B.leave_frame()} -$B.frames_stack=save_stack -if(res.value && res.value.__class__===$GeneratorReturn){gen.$finished=true -throw _b_.StopIteration.$factory(res.value.value)} -gen.gi_running=false -if(res.done){throw _b_.StopIteration.$factory(res.value)} -return res.value} -$B.generator.throw=function(self,type,value,traceback){var $=$B.args('throw',4,{self:null,type:null,value:null,traceback:null},['self','type','value','traceback'],arguments,{value:_b_.None,traceback:_b_.None},null,null),self=$.self,type=$.type,value=$.value,traceback=$.traceback -var gen=self.js_gen,exc=type -if(exc.$is_class){if(! _b_.issubclass(type,_b_.BaseException)){throw _b_.TypeError.$factory("exception value must be an "+ -"instance of BaseException")}else if(value===undefined ||value===_b_.None){exc=$B.$call(exc)()}else if(_b_.isinstance(value,type)){exc=value}}else{if(value===_b_.None){value=exc}else{exc=$B.$call(exc)(value)}} -if(traceback !==_b_.None){exc.$traceback=traceback} -var save_stack=$B.frames_stack.slice() -if(self.$frame){$B.frames_stack.push(self.$frame)} -var res=gen.throw(exc) -$B.frames_stack=save_stack -if(res.done){throw _b_.StopIteration.$factory(res.value)} -return res.value} -$B.set_func_names($B.generator,"builtins") -$B.async_generator=$B.make_class("async_generator",function(func){var f=function(){var gen=func.apply(null,arguments) -var res=Object.create(null) -res.__class__=$B.async_generator -res.js_gen=gen -return res} -return f} -) -var ag_closed={} -$B.async_generator.__aiter__=function(self){return self} -$B.async_generator.__anext__=function(self){return $B.async_generator.asend(self,_b_.None)} -$B.async_generator.aclose=function(self){self.js_gen.$finished=true -return _b_.None} -$B.async_generator.asend=async function(self,value){var gen=self.js_gen -if(gen.$finished){throw _b_.StopAsyncIteration.$factory(value)} -if(gen.ag_running===true){throw _b_.ValueError.$factory("generator already executing")} -gen.ag_running=true -var save_stack=$B.frames_stack.slice() -if(self.$frame){$B.frames_stack.push(self.$frame)} -try{var res=await gen.next(value)}catch(err){gen.$finished=true -$B.frames_stack=save_stack -throw err} -if($B.last($B.frames_stack)===self.$frame){$B.leave_frame()} -$B.frames_stack=save_stack -if(res.done){throw _b_.StopAsyncIteration.$factory(value)} -if(res.value.__class__===$GeneratorReturn){gen.$finished=true -throw _b_.StopAsyncIteration.$factory(res.value.value)} -gen.ag_running=false -return res.value} -$B.async_generator.athrow=async function(self,type,value,traceback){var gen=self.js_gen,exc=type -if(exc.$is_class){if(! _b_.issubclass(type,_b_.BaseException)){throw _b_.TypeError.$factory("exception value must be an "+ -"instance of BaseException")}else if(value===undefined){value=$B.$call(exc)()}}else{if(value===undefined){value=exc}else{exc=$B.$call(exc)(value)}} -if(traceback !==undefined){exc.$traceback=traceback} -var save_stack=$B.frames_stack.slice() -if(self.$frame){$B.frames_stack.push(self.$frame)} -await gen.throw(value) -$B.frames_stack=save_stack} -$B.set_func_names($B.async_generator,"builtins")})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -var object=_b_.object -var _window=self; -function to_simple(value){switch(typeof value){case 'string': -case 'number': -return value -case 'boolean': -return value ? "true" :"false" -case 'object': -if(value===_b_.None){return 'null'}else if(value instanceof Number){return value.valueOf()}else if(value instanceof String){return value.valueOf()} -default: -throw _b_.TypeError.$factory("keys must be str, int, "+ -"float, bool or None, not "+$B.class_name(value))}} -$B.pyobj2structuredclone=function(obj,strict){ -strict=strict===undefined ? true :strict -if(typeof obj=="boolean" ||typeof obj=="number" || -typeof obj=="string" ||obj instanceof String){return obj}else if(obj.__class__===_b_.float){return obj.value}else if(obj===_b_.None){return null }else if(Array.isArray(obj)||obj.__class__===_b_.list || -obj.__class__===_b_.tuple){var res=[] -for(var i=0,len=obj.length;i < len;i++){res.push($B.pyobj2structuredclone(obj[i]))} -return res}else if(_b_.isinstance(obj,_b_.dict)){if(strict){for(var key of $B.make_js_iterator(_b_.dict.keys(obj))){if(typeof key !=='string'){throw _b_.TypeError.$factory("a dictionary with non-string "+ -"keys does not support structured clone")}}} -var res={} -for(var entry of $B.make_js_iterator(_b_.dict.items(obj))){res[to_simple(entry[0])]=$B.pyobj2structuredclone(entry[1])} -return res}else{return obj}} -$B.structuredclone2pyobj=function(obj){if(obj===null){return _b_.None}else if(obj===undefined){return $B.Undefined}else if(typeof obj=="boolean" || -typeof obj=="string"){return obj}else if(typeof obj=="number"){return Number.isInteger(obj)? -obj : -{__class__:_b_.float,value:obj}}else if(obj instanceof Number ||obj instanceof String){return obj.valueOf()}else if(Array.isArray(obj)||obj.__class__===_b_.list || -obj.__class__===_b_.tuple){var res=_b_.list.$factory() -for(var i=0,len=obj.length;i < len;i++){res.push($B.structuredclone2pyobj(obj[i]))} -return res}else if(typeof obj=="object"){var res=$B.empty_dict() -for(var key in obj){_b_.dict.$setitem(res,key,$B.structuredclone2pyobj(obj[key]))} -return res}else{throw _b_.TypeError.$factory(_b_.str.$factory(obj)+ -" does not support the structured clone algorithm")}} -var JSConstructor=$B.make_class('JSConstructor') -JSConstructor.__module__="" -JSConstructor.__call__=function(_self){ -return function(){var args=[null] -for(var i=0,len=arguments.length;i < len;i++){args.push(pyobj2jsobj(arguments[i]))} -var factory=_self.func.bind.apply(_self.func,args) -var res=new factory() -return $B.$JS2Py(res)}} -JSConstructor.__getattribute__=function(_self,attr){ -if(attr=="__call__"){return function(){var args=[null] -for(var i=0,len=arguments.length;i < len;i++){args.push(pyobj2jsobj(arguments[i]))} -var factory=_self.func.bind.apply(_self.func,args) -var res=new factory() -return $B.$JS2Py(res)}} -return JSObject.__getattribute__(_self,attr)} -JSConstructor.$factory=function(obj){return{ -__class__:JSConstructor,js:obj,func:obj.js_func}} -var jsobj2pyobj=$B.jsobj2pyobj=function(jsobj,_this){ -switch(jsobj){case true: -case false: -return jsobj} -if(jsobj===undefined){return $B.Undefined}else if(jsobj===null){return _b_.None} -if(Array.isArray(jsobj)){return $B.$list(jsobj.map(jsobj2pyobj))}else if(typeof jsobj==='number'){if(jsobj.toString().indexOf('.')==-1){return _b_.int.$factory(jsobj)} -return _b_.float.$factory(jsobj)}else if(typeof jsobj=="string"){return $B.String(jsobj)}else if(typeof jsobj=="function"){ -_this=_this===undefined ? null :_this -return function(){var args=[] -for(var i=0,len=arguments.length;i < len;i++){args.push(pyobj2jsobj(arguments[i]))} -return jsobj2pyobj(jsobj.apply(_this,args))}} -if(jsobj.$kw){return jsobj} -if($B.$isNode(jsobj)){return $B.DOMNode.$factory(jsobj)} -return $B.JSObj.$factory(jsobj)} -var pyobj2jsobj=$B.pyobj2jsobj=function(pyobj){ -if(pyobj===true ||pyobj===false){return pyobj}else if(pyobj===$B.Undefined){return undefined} -var klass=$B.get_class(pyobj) -if(klass===undefined){ -return pyobj} -if(klass===JSConstructor){ -if(pyobj.js_func !==undefined){return pyobj.js_func} -return pyobj.js}else if(klass===$B.DOMNode || -klass.__mro__.indexOf($B.DOMNode)>-1){ -return pyobj}else if([_b_.list,_b_.tuple].indexOf(klass)>-1){ -var res=[] -pyobj.forEach(function(item){res.push(pyobj2jsobj(item))}) -return res}else if(klass===_b_.dict ||_b_.issubclass(klass,_b_.dict)){ -var jsobj={} -for(var entry of _b_.dict.$iter_items_with_hash(pyobj)){var key=entry.key -if(typeof key !="string"){key=_b_.str.$factory(key)} -if(typeof entry.value=='function'){ -entry.value.bind(jsobj)} -jsobj[key]=pyobj2jsobj(entry.value)} -return jsobj}else if(klass===_b_.str){ -return pyobj.valueOf()}else if(klass===_b_.float){ -return pyobj.value}else if(klass===$B.function ||klass===$B.method){if(pyobj.prototype && -pyobj.prototype.constructor===pyobj && -! pyobj.$is_func){ -return pyobj} -if(pyobj.$is_async){ -return function(){var res=pyobj.apply(null,arguments) -return $B.coroutine.send(res)}} -var f=function(){try{ -var args=[] -for(var i=0;i < arguments.length;i++){args.push(jsobj2pyobj(arguments[i]))} -if(pyobj.prototype.constructor===pyobj && ! pyobj.$is_func){var res=new pyobj(...args)}else{var res=pyobj.apply(this,args)} -return pyobj2jsobj(res)}catch(err){$B.handle_error(err)}} -return f}else{ -return pyobj}} -$B.JSConstructor=JSConstructor -function pyargs2jsargs(pyargs){var args=[] -for(var i=0,len=pyargs.length;i < len;i++){var arg=pyargs[i] -if(arg !==undefined && arg !==null && -arg.$kw !==undefined){ -throw _b_.TypeError.$factory( -"A Javascript function can't take "+ -"keyword arguments")}else{args.push($B.pyobj2jsobj(arg))}} -return args} -$B.JSObj=$B.make_class("JSObject",function(jsobj){if(Array.isArray(jsobj)){ -jsobj.$is_js_array=true}else if(typeof jsobj=="function"){jsobj.$is_js_func=true -jsobj.$infos={__name__:jsobj.name,__qualname__:jsobj.name} -jsobj.__new__=function(){return new jsobj.$js_func(...arguments)}}else if(typeof jsobj=="number" && ! Number.isInteger(jsobj)){return{__class__:_b_.float,value:jsobj}} -return jsobj} -) -function check_big_int(x,y){if(typeof x !="bigint" ||typeof y !="bigint"){throw _b_.TypeError.$factory("unsupported operand type(s) for - : '"+ -$B.class_name(x)+"' and '"+$B.class_name(y)+"'")}} -var js_ops={__add__:function(_self,other){check_big_int(_self,other) -return _self+other},__mod__:function(_self,other){check_big_int(_self,other) -return _self % other},__mul__:function(_self,other){check_big_int(_self,other) -return _self*other},__pow__:function(_self,other){check_big_int(_self,other) -return _self**other},__sub__:function(_self,other){check_big_int(_self,other) -return _self-other}} -for(var js_op in js_ops){$B.JSObj[js_op]=js_ops[js_op]} -$B.JSObj.__bool__=function(_self){if(typeof _self=='object'){for(var key in _self){return true} -return false} -return !! _self} -$B.JSObj.__contains__=function(_self,key){return key in _self} -$B.JSObj.__dir__=function(_self){var attrs=[] -for(key in _self){attrs.push(key)} -attrs=attrs.sort() -return attrs} -$B.JSObj.__eq__=function(_self,other){switch(typeof _self){case "object": -if(_self.__eq__ !==undefined){return _self.__eq__(other)} -if(Object.keys(_self).length !==Object.keys(other).length){return false} -if(_self===other){return true} -for(var key in _self){if(! $B.JSObj.__eq__(_self[key],other[key])){return false}} -case 'function': -if(_self.$is_js_func && other.$is_js_func){return _self.$js_func===other.$js_func} -return _self===other -default: -return _self===other}} -var iterator=$B.make_class('js_iterator',function(obj){return{ -__class__:iterator,keys:Object.keys(obj),values:Object.values(obj),length:Object.keys(obj).length,counter:-1}} -) -iterator.__next__=function(_self){_self.counter++ -if(_self.counter==_self.length){throw _b_.StopIteration.$factory('')} -return _self.keys[_self.counter]} -$B.set_func_names(iterator,'builtins') -$B.JSObj.__iter__=function(_self){return iterator.$factory(_self)} -$B.JSObj.__ne__=function(_self,other){return ! $B.JSObj.__eq__(_self,other)} -function jsclass2pyclass(js_class){ -var proto=js_class.prototype,klass=$B.make_class(js_class.name) -klass.__init__=function(self){var args=pyargs2jsargs(Array.from(arguments).slice(1)) -var js_obj=new proto.constructor(...args) -for(var attr in js_obj){_b_.dict.$setitem(self.__dict__,attr,$B.jsobj2pyobj(js_obj[attr]))} -return _b_.None} -klass.new=function(){var args=pyargs2jsargs(arguments) -return $B.JSObj.$factory(new proto.constructor(...args))} -var key,value -for([key,value]of Object.entries(Object.getOwnPropertyDescriptors(proto))){if(key=='constructor'){continue} -if(value.get){var getter=(function(v){return function(self){return v.get.call(self.__dict__.$jsobj)}})(value),setter=(function(v){return function(self,x){v.set.call(self.__dict__.$jsobj,x)}})(value) -klass[key]=_b_.property.$factory(getter,setter)}else{klass[key]=(function(m){return function(self){var args=Array.from(arguments).slice(1) -return proto[m].apply(self.__dict__.$jsobj,args)}})(key)}} -var js_parent=Object.getPrototypeOf(proto).constructor -if(js_parent.toString().startsWith('class ')){var py_parent=jsclass2pyclass(js_parent) -klass.__mro__=[py_parent].concat(klass.__mro__)} -var frame=$B.last($B.frames_stack) -if(frame){$B.set_func_names(klass,frame[2])} -return klass} -$B.JSObj.__getattribute__=function(_self,attr){var test=false -if(test){console.log("__ga__",_self,attr)} -if(attr=="new" && typeof _self=="function"){ -var new_func -if(_self.$js_func){new_func=function(){var args=pyargs2jsargs(arguments) -return $B.JSObj.$factory(new _self.$js_func(...args))}}else{new_func=function(){var args=pyargs2jsargs(arguments) -return $B.JSObj.$factory(new _self(...args))}} -new_func.$infos={__name__:attr,__qualname__:attr} -return new_func} -var js_attr=_self[attr] -if(js_attr==undefined && typeof _self=="function" && _self.$js_func){js_attr=_self.$js_func[attr]} -if(test){console.log('js_attr',js_attr,typeof js_attr,'\n is JS class ?',js_attr===undefined ? false :js_attr.toString().startsWith('class '))} -if(js_attr===undefined){if(typeof _self=='object' && attr in _self){ -return $B.Undefined} -if(typeof _self.getNamedItem=='function'){var res=_self.getNamedItem(attr) -if(res !==undefined){return $B.JSObj.$factory(res)}} -var klass=$B.get_class(_self),class_attr=$B.$getattr(klass,attr,null) -if(class_attr !==null){if(typeof class_attr=="function"){return function(){var args=[_self] -for(var i=0,len=arguments.length;i < len;i++){args.push(arguments[i])} -return $B.JSObj.$factory(class_attr.apply(null,args))}}else{return class_attr}} -throw $B.attr_error(attr,_self)} -if(js_attr !==null && -js_attr.toString && -typeof js_attr.toString=='function' && -js_attr.toString().startsWith('class ')){ -return jsclass2pyclass(js_attr)}else if(typeof js_attr==='function'){var res=function(){var args=pyargs2jsargs(arguments),target=_self.$js_func ||_self -try{var result=js_attr.apply(target,args)}catch(err){throw $B.exception(err)} -if(result===undefined){return $B.Undefined} -return $B.JSObj.$factory(result)} -res.prototype=js_attr.prototype -res.$js_func=js_attr -res.__mro__=[_b_.object] -res.__name__=res.__qualname__=js_attr.name -if($B.frames_stack.length > 0){res.__module__=$B.last($B.frames_stack)[3].__name__} -return $B.JSObj.$factory(res)}else{return $B.JSObj.$factory(js_attr)}} -$B.JSObj.__setattr__=function(_self,attr,value){_self[attr]=$B.pyobj2jsobj(value) -return _b_.None} -$B.JSObj.__getitem__=function(_self,key){if(typeof key=="string"){try{return $B.JSObj.__getattribute__(_self,key)}catch(err){if($B.is_exc(err,[_b_.AttributeError])){throw _b_.KeyError.$factory(err.name)} -throw err}}else if(typeof key=="number"){if(_self[key]!==undefined){return $B.JSObj.$factory(_self[key])} -if(typeof _self.length=='number'){if((typeof key=="number" ||typeof key=="boolean")&& -typeof _self.item=='function'){var rank=_b_.int.$factory(key) -if(rank < 0){rank+=_self.length} -var res=_self.item(rank) -if(res===null){throw _b_.IndexError.$factory(rank)} -return $B.JSObj.$factory(res)}}}else if(key.__class__===_b_.slice && -typeof _self.item=='function'){var _slice=_b_.slice.$conv_for_seq(key,_self.length) -var res=[] -for(var i=_slice.start;i < _slice.stop;i+=_slice.step){res.push(_self.item(i))} -return res} -throw _b_.KeyError.$factory(key)} -$B.JSObj.__setitem__=$B.JSObj.__setattr__ -$B.JSObj.__repr__=$B.JSObj.__str__=function(_self){var js_repr=Object.prototype.toString.call(_self) -return ``} -$B.JSObj.bind=function(_self,evt,func){ -var js_func=function(ev){try{return func(jsobj2pyobj(ev))}catch(err){if(err.__class__ !==undefined){$B.handle_error(err)}else{try{$B.$getattr($B.get_stderr(),"write")(err)}catch(err1){console.log(err)}}}} -_self.$brython_events=_self.$brython_events ||{} -if(_self.$brython_events){_self.$brython_events[evt]=_self.$brython_events[evt]||[] -_self.$brython_events[evt].push([func,js_func])} -_self.addEventListener(evt,js_func) -return _b_.None} -$B.JSObj.bindings=function(_self){var res=$B.empty_dict() -if(_self.$brython_events){for(var key in _self.$brython_events){_b_.dict.$setitem(res,key,$B.fast_tuple(_self.$brython_events[key].map(x=> x[0])))}} -return res} -$B.JSObj.unbind=function(_self,evt,func){if(! _self.$brython_events){return _b_.None} -if(! _self.$brython_events[evt]){return _b_.None} -var events=_self.$brython_events[evt] -if(func===undefined){ -for(var item of events){_self.removeEventListener(evt,item[1])} -delete _self.$brython_events[evt]}else{for(var i=0,len=events.length;i < len;i++){if(events[i][0]===func){events.splice(i,1)}} -if(events.length==0){delete _self.$brython_events[evt]}}} -$B.JSObj.to_dict=function(_self){ -return $B.structuredclone2pyobj(_self)} -$B.set_func_names($B.JSObj,"builtins") -var js_list_meta=$B.make_class('js_list_meta') -js_list_meta.__mro__=[_b_.type,_b_.object] -js_list_meta.__getattribute__=function(_self,attr){if(_b_.list[attr]===undefined){throw _b_.AttributeError.$factory(attr)} -if(js_array[attr]){return js_array[attr]} -if(['__delitem__','__setitem__'].indexOf(attr)>-1){ -return function(){var args=[arguments[0]] -for(var i=1,len=arguments.length;i < len;i++){args.push(pyobj2jsobj(arguments[i]))} -return _b_.list[attr].apply(null,args)}}else if(['__add__','__contains__','__eq__','__getitem__','__mul__','__ge__','__gt__','__le__','__lt__'].indexOf(attr)>-1){ -return function(){return jsobj2pyobj(_b_.list[attr].call(null,jsobj2pyobj(arguments[0]),...Array.from(arguments).slice(1)))}} -return function(){var js_array=arguments[0],t=jsobj2pyobj(js_array),args=[t] -return _b_.list[attr].apply(null,args)}} -$B.set_func_names(js_list_meta,'builtins') -var js_array=$B.js_array=$B.make_class('Array') -js_array.__class__=js_list_meta -js_array.__mro__=[$B.JSObj,_b_.object] -js_array.__getattribute__=function(_self,attr){if(_b_.list[attr]===undefined){ -var proto=Object.getPrototypeOf(_self),res=proto[attr] -if(res !==undefined){ -return jsobj2pyobj(res,_self)} -if(_self.hasOwnProperty(attr)){ -return $B.JSObj.$factory(_self[attr])} -throw $B.attr_error(attr,_self)} -return function(){var args=pyobj2jsobj(Array.from(arguments)) -return _b_.list[attr].call(null,_self,...args)}} -$B.set_func_names(js_array,'javascript') -$B.SizedJSObj=$B.make_class('SizedJavascriptObject') -$B.SizedJSObj.__bases__=[$B.JSObj] -$B.SizedJSObj.__mro__=[$B.JSObj,_b_.object] -$B.SizedJSObj.__len__=function(_self){return _self.length} -$B.set_func_names($B.SizedJSObj,'builtins') -$B.IterableJSObj=$B.make_class('IterableJavascriptObject') -$B.IterableJSObj.__bases__=[$B.JSObj] -$B.IterableJSObj.__mro__=[$B.JSObj,_b_.object] -$B.IterableJSObj.__iter__=function(_self){return{ -__class__:$B.IterableJSObj,it:obj[Symbol.iterator]()}} -$B.IterableJSObj.__len__=function(_self){return _self.length} -$B.IterableJSObj.__next__=function(_self){var value=_self.it.next() -if(! value.done){return jsobj2pyobj(value.value)} -throw _b_.StopIteration.$factory('')} -$B.set_func_names($B.IterableJSObj,'builtins') -$B.get_jsobj_class=function(obj){var proto=Object.getPrototypeOf(obj) -if(proto===null){return $B.JSObj} -if(proto[Symbol.iterator]!==undefined){return $B.IterableJSObj}else if(Object.getOwnPropertyNames(proto).indexOf('length')>-1){return $B.SizedJSObj} -return $B.JSObj} -$B.JSMeta=$B.make_class("JSMeta") -$B.JSMeta.__call__=function(cls){ -var extra_args=[],klass=arguments[0] -for(var i=1,len=arguments.length;i < len;i++){extra_args.push(arguments[i])} -var new_func=_b_.type.__getattribute__(klass,"__new__") -var instance=new_func.apply(null,arguments) -if(instance instanceof cls.__mro__[0].$js_func){ -var init_func=_b_.type.__getattribute__(klass,"__init__") -if(init_func !==_b_.object.__init__){ -var args=[instance].concat(extra_args) -init_func.apply(null,args)}} -return instance} -$B.JSMeta.__mro__=[_b_.type,_b_.object] -$B.JSMeta.__getattribute__=function(cls,attr){if(cls[attr]!==undefined){return cls[attr]}else if($B.JSMeta[attr]!==undefined){return $B.JSMeta[attr]}else{ -return _b_.type.__getattribute__(cls,attr)}} -$B.JSMeta.__init_subclass__=function(){} -$B.JSMeta.__new__=function(metaclass,class_name,bases,cl_dict){ -var body=` - var _b_ = __BRYTHON__.builtins - return function(){ - if(_b_.dict.$contains_string(cl_dict, '__init__')){ - var args = [this] - for(var i = 0, len = arguments.length; i < len; i++){ - args.push(arguments[i]) - } - _b_.dict.$getitem_string(cl_dict, '__init__').apply(this, args) - }else{ - return new bases[0].$js_func(...arguments) - } - }` -var new_js_class=Function('cl_dict','bases',body)(cl_dict,bases) -new_js_class.prototype=Object.create(bases[0].$js_func.prototype) -new_js_class.prototype.constructor=new_js_class -new_js_class.$js_func=bases[0].$js_func -new_js_class.__class__=$B.JSMeta -new_js_class.__bases__=[bases[0]] -new_js_class.__mro__=[bases[0],_b_.type] -new_js_class.__qualname__=new_js_class.__name__=class_name -new_js_class.$is_js_class=true -return new_js_class} -$B.set_func_names($B.JSMeta,"builtins")})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins,object=_b_.object,_window=self -var py_immutable_to_js=$B.py_immutable_to_js=function(pyobj){if(_b_.isinstance(pyobj,_b_.float)){return pyobj.value}else if(_b_.isinstance(pyobj,$B.long_int)){return $B.long_int.$to_js_number(pyobj)} -return pyobj} -function js_immutable_to_py(jsobj){if(typeof jsobj=="number"){if(Number.isSafeInteger(jsobj)){return jsobj}else if(Number.isInteger(jsobj)){return $B.fast_long_int(BigInt(jsobj+''))}else{return $B.fast_float(jsobj)}} -return jsobj} -function $getMouseOffset(target,ev){ev=ev ||_window.event; -var docPos=$getPosition(target); -var mousePos=$mouseCoords(ev); -return{x:mousePos.x-docPos.x,y:mousePos.y-docPos.y};} -function $getPosition(e){var left=0,top=0,width=e.width ||e.offsetWidth,height=e.height ||e.offsetHeight,scroll=document.scrollingElement.scrollTop -while(e.offsetParent){left+=e.offsetLeft -top+=e.offsetTop -e=e.offsetParent} -left+=e.offsetLeft ||0 -top+=e.offsetTop ||0 -if(e.parentElement){ -var parent_pos=$getPosition(e.parentElement) -left+=parent_pos.left -top+=parent_pos.top} -return{left:left,top:top,width:width,height:height}} -function trace(msg){var elt=document.getElementById("trace") -if(elt){elt.innerText+=msg}} -function $mouseCoords(ev){if(ev.type.startsWith("touch")){var res={} -res.x=_b_.int.$factory(ev.touches[0].screenX) -res.y=_b_.int.$factory(ev.touches[0].screenY) -res.__getattr__=function(attr){return this[attr]} -res.__class__="MouseCoords" -return res} -var posx=0,posy=0 -if(!ev){var ev=_window.event} -if(ev.pageX ||ev.pageY){posx=ev.pageX -posy=ev.pageY}else if(ev.clientX ||ev.clientY){posx=ev.clientX+document.body.scrollLeft+ -document.documentElement.scrollLeft -posy=ev.clientY+document.body.scrollTop+ -document.documentElement.scrollTop} -var res={} -res.x=_b_.int.$factory(posx) -res.y=_b_.int.$factory(posy) -res.__getattr__=function(attr){return this[attr]} -res.__class__="MouseCoords" -return res} -var $DOMNodeAttrs=["nodeName","nodeValue","nodeType","parentNode","childNodes","firstChild","lastChild","previousSibling","nextSibling","attributes","ownerDocument"] -$B.$isNode=function(o){ -return( -typeof Node==="object" ? o instanceof Node : -o && typeof o==="object" && typeof o.nodeType==="number" && -typeof o.nodeName==="string" -)} -$B.$isNodeList=function(nodes){ -try{var result=Object.prototype.toString.call(nodes) -var re=new RegExp("^\\[object (HTMLCollection|NodeList)\\]$") -return(typeof nodes==="object" && -re.exec(result)!==null && -nodes.length !==undefined && -(nodes.length==0 || -(typeof nodes[0]==="object" && nodes[0].nodeType > 0)) -)}catch(err){return false}} -var $DOMEventAttrs_W3C=["NONE","CAPTURING_PHASE","AT_TARGET","BUBBLING_PHASE","type","target","currentTarget","eventPhase","bubbles","cancelable","timeStamp","stopPropagation","preventDefault","initEvent"] -var $DOMEventAttrs_IE=["altKey","altLeft","button","cancelBubble","clientX","clientY","contentOverflow","ctrlKey","ctrlLeft","data","dataFld","dataTransfer","fromElement","keyCode","nextPage","offsetX","offsetY","origin","propertyName","reason","recordset","repeat","screenX","screenY","shiftKey","shiftLeft","source","srcElement","srcFilter","srcUrn","toElement","type","url","wheelDelta","x","y"] -$B.$isEvent=function(obj){var flag=true -for(var i=0;i < $DOMEventAttrs_W3C.length;i++){if(obj[$DOMEventAttrs_W3C[i]]===undefined){flag=false;break}} -if(flag){return true} -for(var i=0;i < $DOMEventAttrs_IE.length;i++){if(obj[$DOMEventAttrs_IE[i]]===undefined){return false}} -return true} -var $NodeTypes={1:"ELEMENT",2:"ATTRIBUTE",3:"TEXT",4:"CDATA_SECTION",5:"ENTITY_REFERENCE",6:"ENTITY",7:"PROCESSING_INSTRUCTION",8:"COMMENT",9:"DOCUMENT",10:"DOCUMENT_TYPE",11:"DOCUMENT_FRAGMENT",12:"NOTATION"} -var Attributes=$B.make_class("Attributes",function(elt){return{__class__:Attributes,elt:elt}} -) -Attributes.__contains__=function(){var $=$B.args("__getitem__",2,{self:null,key:null},["self","key"],arguments,{},null,null) -if($.self.elt instanceof SVGElement){return $.self.elt.hasAttributeNS(null,$.key)}else if(typeof $.self.elt.hasAttribute=="function"){return $.self.elt.hasAttribute($.key)} -return false} -Attributes.__delitem__=function(){var $=$B.args("__getitem__",2,{self:null,key:null},["self","key"],arguments,{},null,null) -if(!Attributes.__contains__($.self,$.key)){throw _b_.KeyError.$factory($.key)} -if($.self.elt instanceof SVGElement){$.self.elt.removeAttributeNS(null,$.key) -return _b_.None}else if(typeof $.self.elt.hasAttribute=="function"){$.self.elt.removeAttribute($.key) -return _b_.None}} -Attributes.__getitem__=function(){var $=$B.args("__getitem__",2,{self:null,key:null},["self","key"],arguments,{},null,null) -if($.self.elt instanceof SVGElement && -$.self.elt.hasAttributeNS(null,$.key)){return $.self.elt.getAttributeNS(null,$.key)}else if(typeof $.self.elt.hasAttribute=="function" && -$.self.elt.hasAttribute($.key)){return $.self.elt.getAttribute($.key)} -throw _b_.KeyError.$factory($.key)} -Attributes.__iter__=function(self){self.$counter=0 -var attrs=self.elt.attributes,items=[] -for(var i=0;i < attrs.length;i++){items.push(attrs[i].name)} -self.$items=items -return self} -Attributes.__next__=function(){var $=$B.args("__next__",1,{self:null},["self"],arguments,{},null,null) -if($.self.$counter < $.self.$items.length){var res=$.self.$items[$.self.$counter] -$.self.$counter++ -return res}else{throw _b_.StopIteration.$factory("")}} -Attributes.__setitem__=function(){var $=$B.args("__setitem__",3,{self:null,key:null,value:null},["self","key","value"],arguments,{},null,null) -if($.self.elt instanceof SVGElement && -typeof $.self.elt.setAttributeNS=="function"){$.self.elt.setAttributeNS(null,$.key,_b_.str.$factory($.value)) -return _b_.None}else if(typeof $.self.elt.setAttribute=="function"){$.self.elt.setAttribute($.key,_b_.str.$factory($.value)) -return _b_.None} -throw _b_.TypeError.$factory("Can't set attributes on element")} -Attributes.__repr__=Attributes.__str__=function(self){var attrs=self.elt.attributes,items=[] -for(var i=0;i < attrs.length;i++){items.push(attrs[i].name+': "'+ -self.elt.getAttributeNS(null,attrs[i].name)+'"')} -return '{'+items.join(", ")+'}'} -Attributes.get=function(){var $=$B.args("get",3,{self:null,key:null,deflt:null},["self","key","deflt"],arguments,{deflt:_b_.None},null,null) -try{return Attributes.__getitem__($.self,$.key)}catch(err){if(err.__class__===_b_.KeyError){return $.deflt}else{throw err}}} -Attributes.keys=function(){return Attributes.__iter__.apply(null,arguments)} -Attributes.items=function(){var $=$B.args("values",1,{self:null},["self"],arguments,{},null,null),attrs=$.self.elt.attributes,values=[] -for(var i=0;i < attrs.length;i++){values.push([attrs[i].name,attrs[i].value])} -return _b_.list.__iter__(values)} -Attributes.values=function(){var $=$B.args("values",1,{self:null},["self"],arguments,{},null,null),attrs=$.self.elt.attributes,values=[] -for(var i=0;i < attrs.length;i++){values.push(attrs[i].value)} -return _b_.list.__iter__(values)} -$B.set_func_names(Attributes,"") -var DOMEvent=$B.DOMEvent=$B.make_class("DOMEvent",function(evt_name){ -return DOMEvent.__new__(DOMEvent,evt_name)} -) -DOMEvent.__new__=function(cls,evt_name){var ev=new Event(evt_name) -ev.__class__=DOMEvent -if(ev.preventDefault===undefined){ev.preventDefault=function(){ev.returnValue=false}} -if(ev.stopPropagation===undefined){ev.stopPropagation=function(){ev.cancelBubble=true}} -return ev} -function dom2svg(svg_elt,coords){ -var pt=svg_elt.createSVGPoint() -pt.x=coords.x -pt.y=coords.y -return pt.matrixTransform(svg_elt.getScreenCTM().inverse())} -DOMEvent.__getattribute__=function(self,attr){switch(attr){case '__repr__': -case '__str__': -return function(){return ''} -case 'x': -return $mouseCoords(self).x -case 'y': -return $mouseCoords(self).y -case 'data': -if(self.dataTransfer !==null && self.dataTransfer !==undefined){return Clipboard.$factory(self.dataTransfer)} -return $B.$JS2Py(self['data']) -case 'target': -if(self.target !==undefined){return DOMNode.$factory(self.target)} -case 'char': -return String.fromCharCode(self.which) -case 'svgX': -if(self.target instanceof SVGSVGElement){return Math.floor(dom2svg(self.target,$mouseCoords(self)).x)} -throw _b_.AttributeError.$factory("event target is not an SVG "+ -"element") -case 'svgY': -if(self.target instanceof SVGSVGElement){return Math.floor(dom2svg(self.target,$mouseCoords(self)).y)} -throw _b_.AttributeError.$factory("event target is not an SVG "+ -"element")} -var res=self[attr] -if(res !==undefined){if(typeof res=="function"){var func=function(){var args=[] -for(var i=0;i < arguments.length;i++){args.push($B.pyobj2jsobj(arguments[i]))} -return res.apply(self,arguments)} -func.$infos={__name__:res.name,__qualname__:res.name} -return func} -return $B.$JS2Py(res)} -throw $B.attr_error(attr,self)} -var $DOMEvent=$B.$DOMEvent=function(ev){ev.__class__=DOMEvent -ev.$no_dict=true -if(ev.preventDefault===undefined){ev.preventDefault=function(){ev.returnValue=false}} -if(ev.stopPropagation===undefined){ev.stopPropagation=function(){ev.cancelBubble=true}} -return ev} -$B.set_func_names(DOMEvent,"browser") -var Clipboard=$B.make_class('Clipboard',function(data){return{ -__class__ :Clipboard,__dict__:$B.empty_dict(),data :data}} -) -Clipboard.__getitem__=function(self,name){return self.data.getData(name)} -Clipboard.__setitem__=function(self,name,value){self.data.setData(name,value)} -$B.set_func_names(Clipboard,"") -function $EventsList(elt,evt,arg){ -this.elt=elt -this.evt=evt -if(_b_.isinstance(arg,_b_.list)){this.callbacks=arg} -else{this.callbacks=[arg]} -this.remove=function(callback){var found=false -for(var i=0;i < this.callbacks.length;i++){if(this.callbacks[i]===callback){found=true -this.callback.splice(i,1) -this.elt.removeEventListener(this.evt,callback,false) -break}} -if(! found){throw _b_.KeyError.$factory("not found")}}} -var OpenFile=$B.OpenFile=$B.make_class('OpenFile') -OpenFile.__module__="" -OpenFile.$factory=function(file,mode,encoding){var res={__class__:$OpenFileDict,file:file,reader:new FileReader()} -if(mode==="r"){res.reader.readAsText(file,encoding)}else if(mode==="rb"){res.reader.readAsBinaryString(file)} -return res} -OpenFile.__getattr__=function(self,attr){if(self["get_"+attr]!==undefined){return self["get_"+attr]} -return self.reader[attr]} -OpenFile.__setattr__=function(self,attr,value){var obj=self.reader -if(attr.substr(0,2)=="on"){ -var callback=function(ev){return value($DOMEvent(ev))} -obj.addEventListener(attr.substr(2),callback)}else if("set_"+attr in obj){return obj["set_"+attr](value)}else if(attr in obj){obj[attr]=value}else{_b_.setattr(obj,attr,value)}} -$B.set_func_names(OpenFile,"") -var dom={File :function(){},FileReader :function(){}} -dom.File.__class__=_b_.type -dom.File.__str__=function(){return ""} -dom.FileReader.__class__=_b_.type -dom.FileReader.__str__=function(){return ""} -var DOMNode=$B.make_class('browser',function(elt){return elt} -) -DOMNode.__add__=function(self,other){ -var res=TagSum.$factory() -res.children=[self],pos=1 -if(_b_.isinstance(other,TagSum)){res.children=res.children.concat(other.children)}else if(_b_.isinstance(other,[_b_.str,_b_.int,_b_.float,_b_.list,_b_.dict,_b_.set,_b_.tuple])){res.children[pos++]=DOMNode.$factory( -document.createTextNode(_b_.str.$factory(other)))}else if(_b_.isinstance(other,DOMNode)){res.children[pos++]=other}else{ -try{res.children=res.children.concat(_b_.list.$factory(other))} -catch(err){throw _b_.TypeError.$factory("can't add '"+ -$B.class_name(other)+"' object to DOMNode instance")}} -return res} -DOMNode.__bool__=function(self){return true} -DOMNode.__contains__=function(self,key){ -if(self.nodeType==9 && typeof key=="string"){return document.getElementById(key)!==null} -if(self.length !==undefined && typeof self.item=="function"){for(var i=0,len=self.length;i < len;i++){if(self.item(i)===key){return true}}} -return false} -DOMNode.__del__=function(self){ -if(!self.parentNode){throw _b_.ValueError.$factory("can't delete "+_b_.str.$factory(self))} -self.parentNode.removeChild(self)} -DOMNode.__delattr__=function(self,attr){if(self[attr]===undefined){throw _b_.AttributeError.$factory( -`cannot delete DOMNode attribute '${attr}'`)} -delete self[attr] -return _b_.None} -DOMNode.__delitem__=function(self,key){if(self.nodeType==9){ -var res=self.getElementById(key) -if(res){res.parentNode.removeChild(res)} -else{throw _b_.KeyError.$factory(key)}}else{ -self.parentNode.removeChild(self)}} -DOMNode.__dir__=function(self){var res=[] -for(var attr in self){if(attr.charAt(0)!="$"){res.push(attr)}} -res.sort() -return res} -DOMNode.__eq__=function(self,other){return self==other} -DOMNode.__getattribute__=function(self,attr){switch(attr){case "attrs": -return Attributes.$factory(self) -case "children": -case "child_nodes": -case "class_name": -case "html": -case "parent": -case "text": -return DOMNode[attr](self) -case "height": -case "left": -case "top": -case "width": -if(self.tagName=="CANVAS" && self[attr]){return self[attr]} -if(self instanceof SVGElement){return self[attr].baseVal.value} -var computed=window.getComputedStyle(self). -getPropertyValue(attr) -if(computed !==undefined){if(computed==''){if(self.style[attr]!==undefined){return parseInt(self.style[attr])}else{return 0}} -var prop=Math.floor(parseFloat(computed)+0.5) -return isNaN(prop)? 0 :prop}else if(self.style[attr]){return parseInt(self.style[attr])}else{throw _b_.AttributeError.$factory("style."+attr+ -" is not set for "+_b_.str.$factory(self))} -case "x": -case "y": -if(!(self instanceof SVGElement)){var pos=$getPosition(self) -return attr=="x" ? pos.left :pos.top} -case "clear": -case "closest": -return function(){return DOMNode[attr].call(null,self,...arguments)} -case "headers": -if(self.nodeType==9){ -var req=new XMLHttpRequest(); -req.open("GET",document.location,false) -req.send(null); -var headers=req.getAllResponseHeaders() -headers=headers.split("\r\n") -var res=$B.empty_dict() -for(var i=0;i < headers.length;i++){var header=headers[i] -if(header.strip().length==0){continue} -var pos=header.search(":") -res.__setitem__(header.substr(0,pos),header.substr(pos+1).lstrip())} -return res} -break -case "location": -attr="location" -break} -if(attr=="select" && self.nodeType==1 && -["INPUT","TEXTAREA"].indexOf(self.tagName.toUpperCase())>-1){return function(selector){if(selector===undefined){self.select();return _b_.None} -return DOMNode.select(self,selector)}} -if(attr=="query" && self.nodeType==9){ -var res={__class__:Query,_keys :[],_values :{}} -var qs=location.search.substr(1).split('&') -if(location.search !=""){for(var i=0;i < qs.length;i++){var pos=qs[i].search("="),elts=[qs[i].substr(0,pos),qs[i].substr(pos+1)],key=decodeURIComponent(elts[0]),value=decodeURIComponent(elts[1]) -if(res._keys.indexOf(key)>-1){res._values[key].push(value)}else{res._keys.push(key) -res._values[key]=[value]}}} -return res} -var klass=$B.get_class(self) -var property=self[attr] -if(property !==undefined && self.__class__ && -klass.__module__ !="browser.html" && -klass.__module__ !="browser.svg" && -! klass.$webcomponent){var from_class=$B.$getattr(klass,attr,null) -if(from_class !==null){property=from_class -if(typeof from_class==='function'){return property.bind(self,self)}}else{ -var bases=self.__class__.__bases__ -var show_message=true -for(var base of bases){if(base.__module__=="browser.html"){show_message=false -break}} -if(show_message){var from_class=$B.$getattr(self.__class__,attr,_b_.None) -if(from_class !==_b_.None){var frame=$B.last($B.frames_stack),line=frame.$lineno -console.info("Warning: line "+line+", "+self.tagName+ -" element has instance attribute '"+attr+"' set."+ -" Attribute of class "+$B.class_name(self)+ -" is ignored.")}}}} -if(property===undefined){ -if(self.tagName){var ce=customElements.get(self.tagName.toLowerCase()) -if(ce !==undefined && ce.$cls !==undefined){ -var save_class=self.__class__ -self.__class__=ce.$cls -try{var res=_b_.object.__getattribute__(self,attr) -self.__class__=save_class -return res}catch(err){self.__class__=save_class -if(! $B.is_exc(err,[_b_.AttributeError])){throw err}}}}else{return object.__getattribute__(self,attr)}} -var res=property -if(res !==undefined){if(res===null){return res} -if(typeof res==="function"){if(self.__class__ && self.__class__.$webcomponent){var method=$B.$getattr(self.__class__,attr,null) -if(method !==null){ -return res.bind(self)}} -if(res.$is_func){ -return res} -var func=(function(f,elt){return function(){var args=[],pos=0 -for(var i=0;i < arguments.length;i++){var arg=arguments[i] -if(typeof arg=="function"){ -if(arg.$cache){var f1=arg.$cache}else{var f1=function(dest_fn){return function(){try{return dest_fn.apply(null,arguments)}catch(err){$B.handle_error(err)}}}(arg) -arg.$cache=f1} -args.push(f1)}else{args.push($B.pyobj2jsobj(arg))}} -var result=f.apply(elt,args) -return $B.$JS2Py(result)}})(res,self) -func.$infos={__name__ :attr,__qualname__:attr} -func.$is_func=true -func.$python_function=res -return func} -if(attr=='style'){return $B.JSObj.$factory(self[attr])} -if(Array.isArray(res)){ -return res} -return js_immutable_to_py(res)} -return object.__getattribute__(self,attr)} -DOMNode.__getitem__=function(self,key){if(self.nodeType==9){ -if(typeof key.valueOf()=="string"){var res=self.getElementById(key) -if(res){return DOMNode.$factory(res)} -throw _b_.KeyError.$factory(key)}else{try{var elts=self.getElementsByTagName(key.__name__),res=[] -for(var i=0;i < elts.length;i++){res.push(DOMNode.$factory(elts[i]))} -return res}catch(err){throw _b_.KeyError.$factory(_b_.str.$factory(key))}}}else{if((typeof key=="number" ||typeof key=="boolean")&& -typeof self.item=="function"){var key_to_int=_b_.int.$factory(key) -if(key_to_int < 0){key_to_int+=self.length} -var res=DOMNode.$factory(self.item(key_to_int)) -if(res===undefined){throw _b_.KeyError.$factory(key)} -return res}else if(typeof key=="string" && -self.attributes && -typeof self.attributes.getNamedItem=="function"){var attr=self.attributes.getNamedItem(key) -if(!!attr){return attr.value} -throw _b_.KeyError.$factory(key)}}} -DOMNode.__hash__=function(self){return self.__hashvalue__===undefined ? -(self.__hashvalue__=$B.$py_next_hash--): -self.__hashvalue__} -DOMNode.__iter__=function(self){ -if(self.length !==undefined && typeof self.item=="function"){var items=[] -for(var i=0,len=self.length;i < len;i++){items.push(DOMNode.$factory(self.item(i)))}}else if(self.childNodes !==undefined){var items=[] -for(var i=0,len=self.childNodes.length;i < len;i++){items.push(DOMNode.$factory(self.childNodes[i]))}} -return $B.$iter(items)} -DOMNode.__le__=function(self,other){ -if(self.nodeType==9){self=self.body} -if(_b_.isinstance(other,TagSum)){for(var i=0;i < other.children.length;i++){self.appendChild(other.children[i])}}else if(typeof other=="string" ||typeof other=="number"){var txt=document.createTextNode(other.toString()) -self.appendChild(txt)}else if(other instanceof Node){self.appendChild(other)}else{try{ -var items=_b_.list.$factory(other) -items.forEach(function(item){DOMNode.__le__(self,item)})}catch(err){throw _b_.TypeError.$factory("can't add '"+ -$B.class_name(other)+"' object to DOMNode instance")}} -return self } -DOMNode.__len__=function(self){return self.length} -DOMNode.__mul__=function(self,other){if(_b_.isinstance(other,_b_.int)&& other.valueOf()> 0){var res=TagSum.$factory() -var pos=res.children.length -for(var i=0;i < other.valueOf();i++){res.children[pos++]=DOMNode.clone(self)} -return res} -throw _b_.ValueError.$factory("can't multiply "+self.__class__+ -"by "+other)} -DOMNode.__ne__=function(self,other){return ! DOMNode.__eq__(self,other)} -DOMNode.__next__=function(self){self.$counter++ -if(self.$counter < self.childNodes.length){return DOMNode.$factory(self.childNodes[self.$counter])} -throw _b_.StopIteration.$factory("StopIteration")} -DOMNode.__radd__=function(self,other){ -var res=TagSum.$factory() -var txt=DOMNode.$factory(document.createTextNode(other)) -res.children=[txt,self] -return res} -DOMNode.__str__=DOMNode.__repr__=function(self){var attrs=self.attributes,attrs_str="",items=[] -if(attrs !==undefined){var items=[] -for(var i=0;i < attrs.length;i++){items.push(attrs[i].name+'="'+ -self.getAttributeNS(null,attrs[i].name)+'"')}} -var proto=Object.getPrototypeOf(self) -if(proto){var name=proto.constructor.name -if(name===undefined){ -var proto_str=proto.constructor.toString() -name=proto_str.substring(8,proto_str.length-1)} -items.splice(0,0,name) -return "<"+items.join(" ")+">"} -var res=""} -DOMNode.__setattr__=function(self,attr,value){ -if(attr.substr(0,2)=="on" && attr.length > 2){ -if(!$B.$bool(value)){ -DOMNode.unbind(self,attr.substr(2))}else{ -DOMNode.bind(self,attr.substr(2),value)}}else{switch(attr){case "left": -case "top": -case "width": -case "height": -if(_b_.isinstance(value,[_b_.int,_b_.float])&& self.nodeType==1){self.style[attr]=value+"px" -return _b_.None}else{throw _b_.ValueError.$factory(attr+" value should be"+ -" an integer or float, not "+$B.class_name(value))} -break} -if(DOMNode["set_"+attr]!==undefined){return DOMNode["set_"+attr](self,value)} -function warn(msg){console.log(msg) -var frame=$B.last($B.frames_stack) -if(! frame){return} -if($B.get_option('debug')> 0){var file=frame.__file__,lineno=frame.$lineno -console.log("module",frame[2],"line",lineno) -if($B.file_cache.hasOwnProperty(file)){var src=$B.file_cache[file] -console.log(src.split("\n")[lineno-1])}}else{console.log("module",frame[2])}} -var proto=Object.getPrototypeOf(self),nb=0 -while(!!proto && proto !==Object.prototype && nb++< 10){var descriptors=Object.getOwnPropertyDescriptors(proto) -if(!!descriptors && -typeof descriptors.hasOwnProperty=="function"){if(descriptors.hasOwnProperty(attr)){if(!descriptors[attr].writable && -descriptors[attr].set===undefined){warn("Warning: property '"+attr+ -"' is not writable. Use element.attrs['"+ -attr+"'] instead.")} -break}}else{break} -proto=Object.getPrototypeOf(proto)} -if(self.style && self.style[attr]!==undefined && -attr !='src' -){warn("Warning: '"+attr+"' is a property of element.style")} -self[attr]=py_immutable_to_js(value) -return _b_.None}} -DOMNode.__setitem__=function(self,key,value){if(typeof key=="number"){self.childNodes[key]=value}else if(typeof key=="string"){if(self.attributes){if(self instanceof SVGElement){self.setAttributeNS(null,key,value)}else if(typeof self.setAttribute=="function"){self.setAttribute(key,value)}}}} -DOMNode.abs_left={__get__:function(self){return $getPosition(self).left},__set__:function(){throw _b_.AttributeError.$factory("'DOMNode' objectattribute "+ -"'abs_left' is read-only")}} -DOMNode.abs_top={__get__:function(self){return $getPosition(self).top},__set__:function(){throw _b_.AttributeError.$factory("'DOMNode' objectattribute "+ -"'abs_top' is read-only")}} -DOMNode.attach=DOMNode.__le__ -DOMNode.bind=function(self,event){ -var $=$B.args("bind",4,{self:null,event:null,func:null,options:null},["self","event","func","options"],arguments,{func:_b_.None,options:_b_.None},null,null),self=$.self,event=$.event,func=$.func,options=$.options -if(func===_b_.None){ -return function(f){return DOMNode.bind(self,event,f)}} -var callback=(function(f){return function(ev){try{return f($DOMEvent(ev))}catch(err){if(err.__class__ !==undefined){$B.handle_error(err)}else{try{$B.$getattr($B.get_stderr(),"write")(err)} -catch(err1){console.log(err)}}}}} -)(func) -callback.$infos=func.$infos -callback.$attrs=func.$attrs ||{} -callback.$func=func -if(typeof options=="boolean"){self.addEventListener(event,callback,options)}else if(options.__class__===_b_.dict){self.addEventListener(event,callback,_b_.dict.$to_obj(options))}else if(options===_b_.None){self.addEventListener(event,callback,false)} -self.$events=self.$events ||{} -self.$events[event]=self.$events[event]||[] -self.$events[event].push([func,callback]) -return self} -DOMNode.children=function(self){var res=[] -if(self.nodeType==9){self=self.body} -for(var child of self.children){res.push(DOMNode.$factory(child))} -return res} -DOMNode.child_nodes=function(self){var res=[] -if(self.nodeType==9){self=self.body} -for(child of self.childNodes){res.push(DOMNode.$factory(child))} -return res} -DOMNode.clear=function(self){ -var $=$B.args("clear",1,{self:null},["self"],arguments,{},null,null) -if(self.nodeType==9){self=self.body} -while(self.firstChild){self.removeChild(self.firstChild)}} -DOMNode.Class=function(self){if(self.className !==undefined){return self.className} -return _b_.None} -DOMNode.class_name=function(self){return DOMNode.Class(self)} -DOMNode.clone=function(self){var res=DOMNode.$factory(self.cloneNode(true)) -var events=self.$events ||{} -for(var event in events){var evt_list=events[event] -evt_list.forEach(function(evt){var func=evt[0] -DOMNode.bind(res,event,func)})} -return res} -DOMNode.closest=function(self,selector){ -var $=$B.args("closest",2,{self:null,selector:null},["self","selector"],arguments,{},null,null) -var res=self.closest(selector) -if(res===null){throw _b_.KeyError.$factory("no parent with selector "+selector)} -return DOMNode.$factory(res)} -DOMNode.bindings=function(self){ -var res=$B.empty_dict() -for(var key in self.$events){_b_.dict.$setitem(res,key,self.$events[key].map(x=> x[1]))} -return res} -DOMNode.events=function(self,event){self.$events=self.$events ||{} -var evt_list=self.$events[event]=self.$events[event]||[],callbacks=[] -evt_list.forEach(function(evt){callbacks.push(evt[1])}) -return callbacks} -function make_list(node_list){var res=[] -for(var i=0;i < node_list.length;i++){res.push(DOMNode.$factory(node_list[i]))} -return res} -DOMNode.get=function(self){ -var args=[] -for(var i=1;i < arguments.length;i++){args.push(arguments[i])} -var $ns=$B.args("get",0,{},[],args,{},null,"kw"),$dict=$ns.kw.$jsobj -if($dict["name"]!==undefined){if(self.getElementsByName===undefined){throw _b_.TypeError.$factory("DOMNode object doesn't support "+ -"selection by name")} -return make_list(self.getElementsByName($dict['name']))} -if($dict["tag"]!==undefined){if(self.getElementsByTagName===undefined){throw _b_.TypeError.$factory("DOMNode object doesn't support "+ -"selection by tag name")} -return make_list(self.getElementsByTagName($dict["tag"]))} -if($dict["classname"]!==undefined){if(self.getElementsByClassName===undefined){throw _b_.TypeError.$factory("DOMNode object doesn't support "+ -"selection by class name")} -return make_list(self.getElementsByClassName($dict['classname']))} -if($dict["id"]!==undefined){if(self.getElementById===undefined){throw _b_.TypeError.$factory("DOMNode object doesn't support "+ -"selection by id")} -var id_res=document.getElementById($dict['id']) -if(! id_res){return[]} -return[DOMNode.$factory(id_res)]} -if($dict["selector"]!==undefined){if(self.querySelectorAll===undefined){throw _b_.TypeError.$factory("DOMNode object doesn't support "+ -"selection by selector")} -return make_list(self.querySelectorAll($dict['selector']))} -return res} -DOMNode.getContext=function(self){ -if(!("getContext" in self)){throw _b_.AttributeError.$factory("object has no attribute 'getContext'")} -return function(ctx){return $B.JSObj.$factory(self.getContext(ctx))}} -DOMNode.getSelectionRange=function(self){ -if(self["getSelectionRange"]!==undefined){return self.getSelectionRange.apply(null,arguments)}} -DOMNode.html=function(self){var res=self.innerHTML -if(res===undefined){if(self.nodeType==9 && self.body){res=self.body.innerHTML}else{res=_b_.None}} -return res} -DOMNode.index=function(self,selector){var items -if(selector===undefined){items=self.parentElement.childNodes}else{items=self.parentElement.querySelectorAll(selector)} -var rank=-1 -for(var i=0;i < items.length;i++){if(items[i]===self){rank=i;break}} -return rank} -DOMNode.inside=function(self,other){ -var elt=self -while(true){if(other===elt){return true} -elt=elt.parentNode -if(! elt){return false}}} -DOMNode.options=function(self){ -return new $OptionsClass(self)} -DOMNode.parent=function(self){if(self.parentElement){return DOMNode.$factory(self.parentElement)} -return _b_.None} -DOMNode.reset=function(self){ -return function(){self.reset()}} -DOMNode.scrolled_left={__get__:function(self){return $getPosition(self).left- -document.scrollingElement.scrollLeft},__set__:function(){throw _b_.AttributeError.$factory("'DOMNode' objectattribute "+ -"'scrolled_left' is read-only")}} -DOMNode.scrolled_top={__get__:function(self){return $getPosition(self).top- -document.scrollingElement.scrollTop},__set__:function(){throw _b_.AttributeError.$factory("'DOMNode' objectattribute "+ -"'scrolled_top' is read-only")}} -DOMNode.select=function(self,selector){ -if(self.querySelectorAll===undefined){throw _b_.TypeError.$factory("DOMNode object doesn't support "+ -"selection by selector")} -return make_list(self.querySelectorAll(selector))} -DOMNode.select_one=function(self,selector){ -if(self.querySelector===undefined){throw _b_.TypeError.$factory("DOMNode object doesn't support "+ -"selection by selector")} -var res=self.querySelector(selector) -if(res===null){return _b_.None} -return DOMNode.$factory(res)} -DOMNode.setSelectionRange=function(self){ -if(this["setSelectionRange"]!==undefined){return(function(obj){return function(){return obj.setSelectionRange.apply(obj,arguments)}})(this)}else if(this["createTextRange"]!==undefined){return(function(obj){return function(start_pos,end_pos){if(end_pos==undefined){end_pos=start_pos} -var range=obj.createTextRange() -range.collapse(true) -range.moveEnd("character",start_pos) -range.moveStart("character",end_pos) -range.select()}})(this)}} -DOMNode.set_class_name=function(self,arg){self.setAttribute("class",arg)} -DOMNode.set_html=function(self,value){if(self.nodeType==9){self=self.body} -self.innerHTML=_b_.str.$factory(value)} -DOMNode.set_style=function(self,style){ -if(typeof style==='string'){self.style=style -return}else if(!_b_.isinstance(style,_b_.dict)){throw _b_.TypeError.$factory("style must be str or dict, not "+ -$B.class_name(style))} -var items=_b_.list.$factory(_b_.dict.items(style)) -for(var i=0;i < items.length;i++){var key=items[i][0],value=items[i][1] -if(key.toLowerCase()=="float"){self.style.cssFloat=value -self.style.styleFloat=value}else{switch(key){case "top": -case "left": -case "width": -case "height": -case "borderWidth": -if(_b_.isinstance(value,_b_.int)){value=value+"px"}} -self.style[key]=value}}} -DOMNode.set_text=function(self,value){if(self.nodeType==9){self=self.body} -self.innerText=_b_.str.$factory(value) -self.textContent=_b_.str.$factory(value)} -DOMNode.set_value=function(self,value){self.value=_b_.str.$factory(value)} -DOMNode.submit=function(self){ -return function(){self.submit()}} -DOMNode.text=function(self){if(self.nodeType==9){self=self.body} -var res=self.innerText ||self.textContent -if(res===null){res=_b_.None} -return res} -DOMNode.toString=function(self){if(self===undefined){return 'DOMNode'} -return self.nodeName} -DOMNode.trigger=function(self,etype){ -if(self.fireEvent){self.fireEvent("on"+etype)}else{var evObj=document.createEvent("Events") -evObj.initEvent(etype,true,false) -self.dispatchEvent(evObj)}} -DOMNode.unbind=function(self,event){ -self.$events=self.$events ||{} -if(self.$events==={}){return _b_.None} -if(event===undefined){for(var event in self.$events){DOMNode.unbind(self,event)} -return _b_.None} -if(self.$events[event]===undefined || -self.$events[event].length==0){return _b_.None} -var events=self.$events[event] -if(arguments.length==2){ -for(var i=0;i < events.length;i++){var callback=events[i][1] -self.removeEventListener(event,callback,false)} -self.$events[event]=[] -return _b_.None} -for(var i=2;i < arguments.length;i++){var callback=arguments[i],flag=false,func=callback.$func -if(func===undefined){ -var found=false -for(var j=0;j < events.length;j++){if(events[j][0]===callback){var func=callback,found=true -break}} -if(!found){throw _b_.TypeError.$factory("function is not an event callback")}} -for(var j=0;j < events.length;j++){if($B.$getattr(func,'__eq__')(events[j][0])){var callback=events[j][1] -self.removeEventListener(event,callback,false) -events.splice(j,1) -flag=true -break}} -if(!flag){throw _b_.KeyError.$factory('missing callback for event '+event)}}} -$B.set_func_names(DOMNode,"browser") -var Query=$B.make_class("query") -Query.__contains__=function(self,key){return self._keys.indexOf(key)>-1} -Query.__getitem__=function(self,key){ -var result=self._values[key] -if(result===undefined){throw _b_.KeyError.$factory(key)}else if(result.length==1){return result[0]} -return result} -var Query_iterator=$B.make_iterator_class("query string iterator") -Query.__iter__=function(self){return Query_iterator.$factory(self._keys)} -Query.__setitem__=function(self,key,value){self._values[key]=[value] -return _b_.None} -Query.__str__=Query.__repr__=function(self){ -var elts=[] -for(var key in self._values){for(const val of self._values[key]){elts.push(encodeURIComponent(key)+"="+encodeURIComponent(val))}} -if(elts.length==0){return ""}else{return "?"+elts.join("&")}} -Query.getfirst=function(self,key,_default){ -var result=self._values[key] -if(result===undefined){if(_default===undefined){return _b_.None} -return _default} -return result[0]} -Query.getlist=function(self,key){ -var result=self._values[key] -if(result===undefined){return[]} -return result} -Query.getvalue=function(self,key,_default){try{return Query.__getitem__(self,key)} -catch(err){if(_default===undefined){return _b_.None} -return _default}} -Query.keys=function(self){return self._keys} -$B.set_func_names(Query,"") -var TagSum=$B.make_class("TagSum",function(){return{ -__class__:TagSum,children:[],toString:function(){return "(TagSum)"}}} -) -TagSum.appendChild=function(self,child){self.children.push(child)} -TagSum.__add__=function(self,other){if($B.get_class(other)===TagSum){self.children=self.children.concat(other.children)}else if(_b_.isinstance(other,[_b_.str,_b_.int,_b_.float,_b_.dict,_b_.set,_b_.list])){self.children=self.children.concat( -DOMNode.$factory(document.createTextNode(other)))}else{self.children.push(other)} -return self} -TagSum.__radd__=function(self,other){var res=TagSum.$factory() -res.children=self.children.slice() -res.children.splice(0,0,DOMNode.$factory(document.createTextNode(other))) -return res} -TagSum.__repr__=function(self){var res=" " -for(var i=0;i < self.children.length;i++){res+=self.children[i] -if(self.children[i].toString()=="[object Text]"){res+=" ["+self.children[i].textContent+"]\n"}} -return res} -TagSum.__str__=TagSum.toString=TagSum.__repr__ -TagSum.clone=function(self){var res=TagSum.$factory() -for(var i=0;i < self.children.length;i++){res.children.push(self.children[i].cloneNode(true))} -return res} -$B.set_func_names(TagSum,"") -$B.TagSum=TagSum -var win=$B.JSObj.$factory(_window) -win.get_postMessage=function(msg,targetOrigin){if(_b_.isinstance(msg,dict)){var temp={__class__:"dict"},items=_b_.list.$factory(_b_.dict.items(msg)) -items.forEach(function(item){temp[item[0]]=item[1]}) -msg=temp} -return _window.postMessage(msg,targetOrigin)} -$B.DOMNode=DOMNode -$B.win=win})(__BRYTHON__) -; -(function($B){$B.pattern_match=function(subject,pattern){var _b_=$B.builtins,frame=$B.last($B.frames_stack),locals=frame[1] -function bind(pattern,subject){if(pattern.alias){locals[pattern.alias]=subject}} -if(pattern.sequence){ -if(_b_.isinstance(subject,[_b_.str,_b_.bytes,_b_.bytearray])){ -return false} -var Sequence -if($B.imported['collections.abc']){Sequence=$B.imported['collections.abc'].Sequence} -var deque -if($B.imported['collections']){deque=$B.imported['collections'].deque} -var supported=false -var klass=subject.__class__ ||$B.get_class(subject) -for(var base of[klass].concat(klass.__bases__ ||[])){if(base.$match_sequence_pattern){ -supported=true -break}else if(base===Sequence ||base==deque){supported=true -break}} -if((! supported)&& Sequence){ -supported=_b_.issubclass(klass,Sequence)} -if(! supported){return false} -if(pattern.sequence.length==1 && -pattern.sequence[0].capture_starred=='_'){return true} -var subject_length=_b_.len(subject) -var nb_fixed_length=0 -for(var item of pattern.sequence){if(! item.capture_starred){nb_fixed_length++}} -if(subject_length < nb_fixed_length){ -return false}else if(subject_length==0 && pattern.sequence.length==0){ -return true} -var it=_b_.iter(subject),nxt=$B.$getattr(it,'__next__'),store_starred=[],nb_matched_in_subject=0 -for(var i=0,len=pattern.sequence.length;i < len;i++){if(pattern.sequence[i].capture_starred){ -if(pattern.sequence[i].capture_starred=='_' && -i==len-1){bind(pattern,subject) -return true} -var starred_match_length=subject_length- -nb_matched_in_subject-len+i+1 -for(var j=0;j < starred_match_length;j++){store_starred.push(nxt())} -locals[pattern.sequence[i].capture_starred]=store_starred -nb_matched_in_subject+=starred_match_length}else{var subject_item=nxt() -var m=$B.pattern_match(subject_item,pattern.sequence[i]) -if(! m){return false} -nb_matched_in_subject++}} -if(nb_matched_in_subject !=subject_length){return false} -bind(pattern,subject) -return true} -if(pattern.group){if(pattern.group.length==1){ -if($B.pattern_match(subject,pattern.group[0])){bind(pattern,subject) -return true}}else{ -pattern.sequence=pattern.group -return $B.pattern_match(subject,pattern)}} -if(pattern.or){ -for(var item of pattern.or){if($B.pattern_match(subject,item)){bind(pattern,subject) -return true}} -return false} -if(pattern.mapping){ -var supported=false -var Mapping -if($B.imported['collections.abc']){Mapping=$B.imported['collections.abc'].Mapping} -var klass=subject.__class__ ||$B.get_class(subject) -for(var base of[klass].concat(klass.__bases__ ||[])){ -if(base.$match_mapping_pattern ||base===Mapping){supported=true -break}} -if((! supported)&& Mapping){supported=_b_.issubclass(klass,Mapping)} -if(! supported){return false} -var matched=[],keys=[] -for(var item of pattern.mapping){var key_pattern=item[0],value_pattern=item[1] -if(key_pattern.hasOwnProperty('literal')){var key=key_pattern.literal}else if(key_pattern.hasOwnProperty('value')){var key=key_pattern.value} -if(_b_.list.__contains__(keys,key)){throw _b_.ValueError.$factory('mapping pattern checks '+ -'duplicate key ('+ -_b_.str.$factory(key)+')')} -keys.push(key) -var missing=$B.make_class('missing',function(){return{ -__class__:missing}} -) -try{var v=$B.$call($B.$getattr(subject,"get"))(key,missing) -if(v===missing){ -return false} -if(! $B.pattern_match(v,value_pattern)){return false} -matched.push(key)}catch(err){if($B.is_exc(err,[_b_.KeyError])){return false} -throw err}} -if(pattern.rest){var rest=$B.empty_dict(),it=_b_.iter(subject) -while(true){try{var next_key=_b_.next(it)}catch(err){if($B.is_exc(err,[_b_.StopIteration])){locals[pattern.rest]=rest -return true} -throw err} -if(! _b_.list.__contains__(matched,next_key)){_b_.dict.__setitem__(rest,next_key,$B.$getitem(subject,next_key))}}} -return true} -if(pattern.class){var klass=pattern.class -if(! _b_.isinstance(klass,_b_.type)){throw _b_.TypeError.$factory('called match pattern must be a type')} -if(! _b_.isinstance(subject,klass)){return false} -if(pattern.args.length > 0){if([_b_.bool,_b_.bytearray,_b_.bytes,_b_.dict,_b_.float,_b_.frozenset,_b_.int,_b_.list,_b_.set,_b_.str,_b_.tuple].indexOf(klass)>-1){ -if(pattern.args.length > 1){throw _b_.TypeError.$factory('for builtin type '+ -$B.class_name(subject)+', a single positional '+ -'subpattern is accepted')} -return $B.pattern_match(subject,pattern.args[0])}else{ -var match_args=$B.$getattr(klass,'__match_args__',$B.fast_tuple([])) -if(! _b_.isinstance(match_args,_b_.tuple)){throw _b_.TypeError.$factory( -'__match_args__() did not return a tuple')} -if(pattern.args.length > match_args.length){throw _b_.TypeError.$factory( -'__match_args__() returns '+match_args.length+ -' names but '+pattern.args.length+' positional '+ -'arguments were passed')} -for(var i=0,len=pattern.args.length;i < len;i++){ -var pattern_arg=pattern.args[i],klass_arg=match_args[i] -if(typeof klass_arg !=="string"){throw _b_.TypeError.$factory('item in __match_args__ '+ -'is not a string: '+klass_arg)} -if(pattern.keywords.hasOwnProperty(klass_arg)){throw _b_.TypeError.$factory('__match_arg__ item '+ -klass_arg+' was passed as keyword pattern')} -pattern.keywords[klass_arg]=pattern_arg}}} -for(var key in pattern.keywords){var v=$B.$getattr(subject,key,null) -if(v===null){return false}else if(! $B.pattern_match(v,pattern.keywords[key])){return false}} -bind(pattern,subject) -return true} -if(pattern.capture){if(pattern.capture !='_'){ -locals[pattern.capture]=subject} -bind(pattern,subject) -return true}else if(pattern.capture_starred){ -locals[pattern.capture_starred]=$B.$list(subject) -return true}else if(pattern.hasOwnProperty('literal')){var literal=pattern.literal -if(literal===_b_.None ||literal===_b_.True || -literal===_b_.False){ -return $B.$is(subject,literal)} -if($B.rich_comp('__eq__',subject,literal)){bind(pattern,subject) -return true} -return false}else if(pattern.hasOwnProperty('value')){if($B.rich_comp('__eq__',subject,pattern.value)){bind(pattern,subject) -return true}}else if(subject==pattern){return true} -return false}})(__BRYTHON__) -; -;(function($B){var _b_=$B.builtins -var coroutine=$B.coroutine=$B.make_class("coroutine") -coroutine.close=function(self){} -coroutine.send=function(self){if(! _b_.isinstance(self,coroutine)){var msg="object is not a coroutine" -if(typeof self=="function" && self.$infos && self.$infos.__code__ && -self.$infos.__code__.co_flags & 128){msg+='. Maybe you forgot to call the async function ?'} -throw _b_.TypeError.$factory(msg)} -var res=self.$func.apply(null,self.$args) -res.then(function(){if(self.$frames){$B.frames_stack=self.$frames}}). -catch(function(err){if(self.$frames){$B.frames_stack=self.$frames}}) -return res} -coroutine.__repr__=coroutine.__str__=function(self){if(self.$func.$infos){return ""}else{return ""}} -$B.set_func_names(coroutine,"builtins") -$B.make_async=func=>{ -if(func.$is_genfunc){return func} -var f=function(){var args=arguments -return{ -__class__:coroutine,$args:args,$func:func}} -f.$infos=func.$infos -f.$is_func=true -f.$is_async=true -return f} -$B.promise=function(obj){if(obj.__class__===coroutine){ -obj.$frames=$B.frames_stack.slice() -return coroutine.send(obj)} -if(typeof obj=="function"){return obj()} -return obj}})(__BRYTHON__) -; -(function($B){$B.builtin_class_flags={builtins:{1074287874:['ChildProcessError','StopIteration','IOError','AssertionError','FileExistsError','RecursionError','UnicodeTranslateError','UnicodeWarning','FileNotFoundError','MemoryError','KeyboardInterrupt','EOFError','FloatingPointError','ImportWarning','DeprecationWarning','ReferenceError','UnboundLocalError','UserWarning','IndexError','OSError','TypeError','ConnectionResetError','BlockingIOError','BufferError','IndentationError','NotImplementedError','BrokenPipeError','KeyError','PermissionError','TabError','ImportError','ResourceWarning','ConnectionRefusedError','ModuleNotFoundError','ProcessLookupError','EncodingWarning','EnvironmentError','InterruptedError','UnicodeError','Warning','UnicodeDecodeError','BaseExceptionGroup','SyntaxWarning','GeneratorExit','BaseException','NameError','Exception','WindowsError','TimeoutError','BytesWarning','ValueError','ConnectionError','OverflowError','RuntimeError','ArithmeticError','StopAsyncIteration','ZeroDivisionError','PendingDeprecationWarning','UnicodeEncodeError','SystemExit','FutureWarning','ConnectionAbortedError','NotADirectoryError','LookupError','AttributeError','SyntaxError','SystemError','RuntimeWarning','IsADirectoryError'],1073763848:['ExceptionGroup'],21500162:['bool'],4723970:['float','bytearray'],138941698:['bytes'],546050:['filter','map','property','classmethod','reversed','staticmethod','enumerate','zip','super'],529666:['complex','object'],541611330:['dict'],4740354:['set','frozenset'],21501186:['int'],38294818:['list'],545058:['memoryview'],528674:['range'],545026:['slice'],273159426:['str'],71849250:['tuple'],2156420354:['type'],},types:{545154:['async_generator','method-wrapper','getset_descriptor','classmethod_descriptor','member_descriptor','frame','coroutine','generator'],547202:['builtin_function_or_method'],545026:['cell','traceback'],528642:['code','ellipsis','NoneType','NotImplementedType'],678146:['function'],545090:['mappingproxy'],678274:['method_descriptor'],547074:['method'],546050:['module'],676226:['wrapper_descriptor'],}}})(__BRYTHON__) -; - ;(function($B){var _b_=$B.builtins -var update=$B.update_obj=function(mod,data){for(attr in data){mod[attr]=data[attr]}} -var _window=self; -var modules={} -var browser={$package:true,$is_package:true,__initialized__:true,__package__:'browser',__file__:$B.brython_path.replace(new RegExp("/*$","g"),'')+ -'/Lib/browser/__init__.py',bind:function(){ -var $=$B.args("bind",3,{elt:null,evt:null,options:null},["elt","evt","options"],arguments,{options:_b_.None},null,null) -var options=$.options -if(typeof options=="boolean"){}else if(options.__class__===_b_.dict){var _options={} -for(var key of _b_.dict.$keys_string(options)){_options[key]=_b_.dict.$getitem_string(options,key)} -options=_options}else{options==false} -return function(callback){if($B.get_class($.elt)===$B.JSObj){ -function f(ev){try{return callback($B.JSObj.$factory(ev))}catch(err){$B.handle_error(err)}} -$.elt.addEventListener($.evt,f,options) -return callback}else if(_b_.isinstance($.elt,$B.DOMNode)){ -$B.DOMNode.bind($.elt,$.evt,callback,options) -return callback}else if(_b_.isinstance($.elt,_b_.str)){ -var items=document.querySelectorAll($.elt) -for(var i=0;i < items.length;i++){$B.DOMNode.bind($B.DOMNode.$factory(items[i]),$.evt,callback,options)} -return callback} -try{var it=$B.$iter($.elt) -while(true){try{var elt=_b_.next(it) -$B.DOMNode.bind(elt,$.evt,callback)}catch(err){if(_b_.isinstance(err,_b_.StopIteration)){break} -throw err}}}catch(err){if(_b_.isinstance(err,_b_.AttributeError)){$B.DOMNode.bind($.elt,$.evt,callback)} -throw err} -return callback}},console:self.console && $B.JSObj.$factory(self.console),self:$B.win,win:$B.win,"window":$B.win,} -browser.__path__=browser.__file__ -if($B.isNode){delete browser.window -delete browser.win}else if($B.isWebWorker){browser.is_webworker=true -delete browser.window -delete browser.win -browser.self.send=self.postMessage -browser.document=_b_.property.$factory( -function(){throw _b_.ValueError.$factory( -"'document' is not available in Web Workers")},function(self,value){browser.document=value} -)}else{browser.is_webworker=false -update(browser,{"alert":function(message){window.alert($B.builtins.str.$factory(message ||""))},confirm:$B.JSObj.$factory(window.confirm),"document":$B.DOMNode.$factory(document),doc:$B.DOMNode.$factory(document), -DOMEvent:$B.DOMEvent,DOMNode:$B.DOMNode,load:function(script_url){ -var file_obj=$B.builtins.open(script_url) -var content=$B.$getattr(file_obj,'read')() -eval(content)},mouseCoords:function(ev){return $B.JSObj.$factory($mouseCoords(ev))},prompt:function(message,default_value){return $B.JSObj.$factory(window.prompt(message,default_value||''))},reload:function(){ -var scripts=document.getElementsByTagName('script'),js_scripts=[] -scripts.forEach(function(script){if(script.type===undefined || -script.type=='text/javascript'){js_scripts.push(script) -if(script.src){console.log(script.src)}}}) -for(var mod in $B.imported){if($B.imported[mod].$last_modified){console.log('check',mod,$B.imported[mod].__file__,$B.imported[mod].$last_modified)}else{console.log('no date for mod',mod)}}},run_script:function(){var $=$B.args("run_script",2,{src:null,name:null},["src","name"],arguments,{name:"script_"+$B.UUID()},null,null) -var script=document.createElement('script') -script.setAttribute('id',$.name) -$B.run_script(script,$.src,$.name,$B.script_path,true)},URLParameter:function(name){name=name.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"); -var regex=new RegExp("[\\?&]"+name+"=([^&#]*)"),results=regex.exec(location.search); -results=results===null ? "" : -decodeURIComponent(results[1].replace(/\+/g," ")); -return $B.builtins.str.$factory(results);}}) -modules['browser.html']=(function($B){var _b_=$B.builtins -var TagSum=$B.TagSum -function makeTagDict(tagName){ -var dict={__class__:_b_.type,__name__:tagName,__module__:"browser.html",__qualname__:tagName} -dict.__init__=function(){var $ns=$B.args('__init__',1,{self:null},['self'],arguments,{},'args','kw'),self=$ns['self'],args=$ns['args'] -if(args.length==1){var first=args[0] -if(_b_.isinstance(first,[_b_.str,_b_.int,_b_.float])){ -self.innerHTML=_b_.str.$factory(first)}else if(first.__class__===TagSum){for(var i=0,len=first.children.length;i < len;i++){self.appendChild(first.children[i])}}else{if(_b_.isinstance(first,$B.DOMNode)){self.appendChild(first)}else{try{ -var items=_b_.list.$factory(first) -for(var item of items){$B.DOMNode.__le__(self,item)}}catch(err){if($B.get_option('debug',err)> 1){console.log(err,err.__class__,err.args) -console.log("first",first) -console.log(arguments)} -throw err}}}} -for(var arg in $ns.kw.$jsobj){ -var value=$ns.kw.$jsobj[arg] -if(arg.toLowerCase().substr(0,2)=="on"){ -$B.DOMNode.bind(self,arg.toLowerCase().substr(2),value)}else if(arg.toLowerCase()=="style"){$B.DOMNode.set_style(self,value)}else{if(value !==false){ -try{ -arg=$B.imported["browser.html"]. -attribute_mapper(arg) -self.setAttribute(arg,$B.pyobj2jsobj(value))}catch(err){throw _b_.ValueError.$factory( -"can't set attribute "+arg)}}}}} -dict.__mro__=[$B.DOMNode,$B.builtins.object] -dict.__new__=function(cls){ -var res=document.createElement(tagName) -if(cls !==html[tagName]){ -res.__class__=cls} -return res} -dict.__rmul__=function(self,num){return $B.DOMNode.__mul__(self,num)} -$B.set_func_names(dict,"browser.html") -return dict} -function makeFactory(klass,ComponentClass){ -return(function(k){return function(){if(k.__name__=='SVG'){var res=$B.DOMNode.$factory( -document.createElementNS("http://www.w3.org/2000/svg","svg"),true)}else{try{var res=document.createElement(k.__name__)}catch(err){console.log('error '+err) -console.log('creating element',k.__name__) -throw err}} -var init=$B.$getattr(k,"__init__",null) -if(init !==null){init(res,...arguments)} -return res}})(klass)} -var tags=['A','ABBR','ACRONYM','ADDRESS','APPLET','AREA','B','BASE','BASEFONT','BDO','BIG','BLOCKQUOTE','BODY','BR','BUTTON','CAPTION','CENTER','CITE','CODE','COL','COLGROUP','DD','DEL','DFN','DIR','DIV','DL','DT','EM','FIELDSET','FONT','FORM','FRAME','FRAMESET','H1','H2','H3','H4','H5','H6','HEAD','HR','HTML','I','IFRAME','IMG','INPUT','INS','ISINDEX','KBD','LABEL','LEGEND','LI','LINK','MAP','MENU','META','NOFRAMES','NOSCRIPT','OBJECT','OL','OPTGROUP','OPTION','P','PARAM','PRE','Q','S','SAMP','SCRIPT','SELECT','SMALL','SPAN','STRIKE','STRONG','STYLE','SUB','SUP','SVG','TABLE','TBODY','TD','TEXTAREA','TFOOT','TH','THEAD','TITLE','TR','TT','U','UL','VAR', -'ARTICLE','ASIDE','AUDIO','BDI','CANVAS','COMMAND','DATA','DATALIST','EMBED','FIGCAPTION','FIGURE','FOOTER','HEADER','KEYGEN','MAIN','MARK','MATH','METER','NAV','OUTPUT','PROGRESS','RB','RP','RT','RTC','RUBY','SECTION','SOURCE','TEMPLATE','TIME','TRACK','VIDEO','WBR', -'DETAILS','DIALOG','MENUITEM','PICTURE','SUMMARY'] -var html={} -html.tags=$B.empty_dict() -function maketag(tagName,ComponentClass){ -if(!(typeof tagName=='string')){throw _b_.TypeError.$factory("html.maketag expects a string as argument")} -if(html[tagName]!==undefined){throw _b_.ValueError.$factory("cannot reset class for " -+tagName)} -var klass=makeTagDict(tagName) -klass.$factory=makeFactory(klass,ComponentClass) -html[tagName]=klass -_b_.dict.$setitem(html.tags,tagName,html[tagName]) -return klass} -for(var tagName of tags){maketag(tagName)} -html.maketag=maketag -html.attribute_mapper=function(attr){return attr.replace(/_/g,'-')} -return html})(__BRYTHON__)} -modules['browser']=browser -$B.UndefinedType=$B.make_class("UndefinedType",function(){return $B.Undefined} -) -$B.UndefinedType.__mro__=[_b_.object] -$B.UndefinedType.__bool__=function(self){return false} -$B.UndefinedType.__repr__=function(self){return ""} -$B.UndefinedType.__str__=$B.UndefinedType.__repr__; -$B.Undefined={__class__:$B.UndefinedType} -$B.set_func_names($B.UndefinedType,"javascript") -var super_class=$B.make_class("JavascriptSuper",function(){ -var res=_b_.super.$factory() -var js_constr=res.__thisclass__.__bases__[0] -return function(){var obj=new js_constr.$js_func(...arguments) -console.log('obj from js constr',obj) -for(var attr in obj){console.log('attr',attr) -res.__self_class__.__dict__[attr]=$B.jsobj2pyobj(obj[attr])} -return obj}} -) -super_class.__getattribute__=function(self,attr){if(attr=="__init__" ||attr=="__call__"){return self.__init__} -return $B.$getattr(self.__self_class__,attr)} -$B.set_func_names(super_class,"javascript") -modules['javascript']={"this":function(){ -if($B.js_this===undefined){return $B.builtins.None} -return $B.JSObj.$factory($B.js_this)},Date:self.Date && $B.JSObj.$factory(self.Date),extends:function(js_constr){if((!js_constr.$js_func)|| -! js_constr.$js_func.toString().startsWith('class ')){console.log(js_constr) -throw _b_.TypeError.$factory( -'argument of extend must be a Javascript class')} -js_constr.__class__=_b_.type -return function(obj){obj.__bases__.splice(0,0,js_constr) -obj.__mro__.splice(0,0,js_constr) -return obj}},import_js:function(url,name){ -var $=$B.args('import_js',2,{url:null,alias:null},['url','alias'],arguments,{alias:_b_.None},null,null),url=$.url -alias=$.alias -var xhr=new XMLHttpRequest(),result -xhr.open('GET',url,false) -xhr.onreadystatechange=function(){if(this.readyState==4){if(this.status==200){eval(this.responseText) -if(typeof $module !=='undefined'){result=$B.module.$factory(name) -for(var key in $module){result[key]=$B.jsobj2pyobj($module[key])} -result.__file__=url}else{result=_b_.ImportError.$factory('Javascript '+ -`module at ${url} doesn't define $module`)}}else{result=_b_.ModuleNotFoundError.$factory(name)}}} -xhr.send() -if(_b_.isinstance(result,_b_.BaseException)){$B.handle_error(result)}else{if(alias===_b_.None){ -alias=url.split('.') -if(alias.length > 1){alias.pop()} -alias=alias.join('.') -result.__name__=alias} -$B.imported[alias]=result -var frame=$B.last($B.frames_stack) -frame[1][alias]=result}},import_modules:function(refs,callback,loaded){ -if(loaded===undefined){loaded=[]} -if(refs.length > 1){var ref=refs.shift() -import(ref).then(function(module){loaded.push(module) -$B.imported.javascript.import_modules(refs,callback,loaded)}).catch($B.show_error)}else{import(refs[0]).then(function(module){loaded.push(module) -return $B.$call(callback).apply(null,loaded)}).catch($B.show_error)}},JSObject:$B.JSObj,JSON:{__class__:$B.make_class("JSON"),parse:function(){return $B.structuredclone2pyobj( -JSON.parse.apply(this,arguments))},stringify:function(obj,replacer,space){return JSON.stringify($B.pyobj2structuredclone(obj,false),$B.JSObj.$factory(replacer),space)}},jsobj2pyobj:function(obj){return $B.jsobj2pyobj(obj)},load:function(script_url){console.log('"javascript.load" is deprecrated. '+ -'Use browser.load instead.') -var file_obj=$B.builtins.open(script_url) -var content=$B.$getattr(file_obj,'read')() -eval(content)},Math:self.Math && $B.JSObj.$factory(self.Math),NULL:null,NullType:$B.make_class('NullType'),Number:self.Number && $B.JSObj.$factory(self.Number),py2js:function(src,module_name){if(module_name===undefined){module_name='__main__'+$B.UUID()} -var js=$B.py2js({src,filename:''},module_name,module_name,$B.builtins_scope).to_js() -return $B.format_indent(js,0)},pyobj2jsobj:function(obj){return $B.pyobj2jsobj(obj)},RegExp:self.RegExp && $B.JSObj.$factory(self.RegExp),String:self.String && $B.JSObj.$factory(self.String),"super":super_class,UNDEFINED:$B.Undefined,UndefinedType:$B.UndefinedType} -modules.javascript.NullType.__module__='javascript' -modules.javascript.UndefinedType.__module__='javascript' -var $io=$B.$io=$B.make_class("io",function(out){return{ -__class__:$io,out,encoding:'utf-8'}} -) -$io.flush=function(self){if(self.buf){console[self.out](self.buf.join('')) -self.buf=[]}} -$io.write=function(self,msg){ -if(self.buf===undefined){self.buf=[]} -if(typeof msg !="string"){throw _b_.TypeError.$factory("write() argument must be str, not "+ -$B.class_name(msg))} -self.buf.push(msg) -return _b_.None} -var _b_=$B.builtins -modules['_sys']={ -Getframe :function(){var $=$B.args("_getframe",1,{depth:null},['depth'],arguments,{depth:0},null,null),depth=$.depth -var res=$B.frames_stack[$B.frames_stack.length-depth-1] -res.$pos=$B.frames_stack.indexOf(res) -return res},breakpointhook:function(){var hookname=$B.$options.breakpoint,modname,dot,funcname,hook -if(hookname===undefined){hookname="pdb.set_trace"} -[modname,dot,funcname]=_b_.str.rpartition(hookname,'.') -if(dot==""){modname="builtins"} -try{$B.$import(modname) -hook=$B.$getattr($B.imported[modname],funcname)}catch(err){console.warn("cannot import breakpoint",hookname) -return _b_.None} -return $B.$call(hook).apply(null,arguments)},exc_info:function(){for(var i=$B.frames_stack.length-1;i >=0;i--){var frame=$B.frames_stack[i],exc=frame[1].$current_exception -if(exc){return _b_.tuple.$factory([exc.__class__,exc,$B.$getattr(exc,"__traceback__")])}} -return _b_.tuple.$factory([_b_.None,_b_.None,_b_.None])},excepthook:function(exc_class,exc_value,traceback){$B.handle_error(exc_value)},exception:function(){for(var i=$B.frames_stack.length-1;i >=0;i--){var frame=$B.frames_stack[i],exc=frame[1].$current_exception -if(exc !==undefined){return exc}} -return _b_.None},getrecursionlimit:function(){return $B.recursion_limit},gettrace:function(){return $B.tracefunc ||_b_.None},last_exc:_b_.property.$factory( -function(){return $B.imported._sys.exception()} -),modules:_b_.property.$factory( -function(){return $B.obj_dict($B.imported)},function(self,value){throw _b_.TypeError.$factory("Read only property 'sys.modules'")} -),path:_b_.property.$factory( -function(){var filename=$B.get_filename_for_import() -return $B.import_info[filename].path},function(self,value){var filename=$B.get_filename_for_import() -$B.import_info[filename].path=value} -),meta_path:_b_.property.$factory( -function(){var filename=$B.get_filename() -return $B.import_info[filename].meta_path},function(self,value){var filename=$B.get_filename() -$B.import_info[filename].meta_path=value} -),path_hooks:_b_.property.$factory( -function(){var filename=$B.get_filename() -return $B.import_info[filename].path_hooks},function(self,value){var filename=$B.get_filename() -$B.import_info[filename].path_hooks=value} -),path_importer_cache:_b_.property.$factory( -function(){return _b_.dict.$factory($B.JSObj.$factory($B.path_importer_cache))},function(self,value){throw _b_.TypeError.$factory("Read only property"+ -" 'sys.path_importer_cache'")} -),setrecursionlimit:function(value){$B.recursion_limit=value},settrace:function(){var $=$B.args("settrace",1,{tracefunc:null},['tracefunc'],arguments,{},null,null) -$B.tracefunc=$.tracefunc -$B.last($B.frames_stack).$f_trace=$B.tracefunc -$B.tracefunc.$current_frame_id=$B.last($B.frames_stack)[0] -return _b_.None},stderr:console.error !==undefined ? $io.$factory("error"): -$io.$factory("log"),stdout:$io.$factory("log"),stdin:_b_.property.$factory( -function(){return $B.stdin},function(self,value){$B.stdin=value} -),vfs:_b_.property.$factory( -function(){if($B.hasOwnProperty("VFS")){return $B.obj_dict($B.VFS)}else{return _b_.None}},function(){throw _b_.TypeError.$factory("Read only property 'sys.vfs'")} -)} -modules._sys.__breakpointhook__=modules._sys.breakpointhook -var WarningMessage=$B.make_class("WarningMessage",function(){var $=$B.make_args("WarningMessage",8,{message:null,category:null,filename:null,lineno:null,file:null,line:null,source:null},['message','category','filename','lineno','file','line','source'],arguments,{file:_b_.None,line:_b_.None,source:_b_.None},null,null) -return{ -__class__:WarningMessage,message:$.message,category:$.category,filename:$.filename,lineno:$.lineno,file:$.file,line:$.line,source:$.source,_category_name:_b_.bool.$factory($.category)? -$B.$getattr($.category,"__name__"):_b_.None}} -) -modules._warnings={_defaultaction:"default",_filters_mutated:function(){},_onceregistry:$B.empty_dict(),filters:[$B.fast_tuple(['default',_b_.None,_b_.DeprecationWarning,'__main__',0]),$B.fast_tuple(['ignore',_b_.None,_b_.DeprecationWarning,_b_.None,0]),$B.fast_tuple(['ignore',_b_.None,_b_.PendingDeprecationWarning,_b_.None,0]),$B.fast_tuple(['ignore',_b_.None,_b_.ImportWarning,_b_.None,0]),$B.fast_tuple(['ignore',_b_.None,_b_.ResourceWarning,_b_.None,0]) -],warn:function(message){ -var $=$B.args('warn',4,{message:null,category:null,stacklevel:null,source:null},['message','category','stacklevel','source'],arguments,{category:_b_.None,stacklevel:1,source:_b_.None},null,null),message=$.message,category=$.category,stacklevel=$.stacklevel -if(_b_.isinstance(message,_b_.Warning)){category=$B.get_class(message)} -var filters -if($B.imported.warnings){filters=$B.imported.warnings.filters}else{filters=modules._warnings.filters} -if(filters[0][0]=='error'){var syntax_error=_b_.SyntaxError.$factory(message.args[0]) -syntax_error.args[1]=[message.filename,message.lineno,message.offset,message.line] -syntax_error.filename=message.filename -syntax_error.lineno=message.lineno -syntax_error.offset=message.offset -syntax_error.line=message.line -throw syntax_error} -var warning_message -if(category===_b_.SyntaxWarning){var file=message.filename,lineno=message.lineno,line=message.text -warning_message={__class__:WarningMessage,message:message,category,filename:message.filename,lineno:message.lineno,file:_b_.None,line:_b_.None,source:_b_.None,_category_name:category.__name__}}else{var frame_rank=Math.max(0,$B.frames_stack.length-stacklevel),frame=$B.frames_stack[frame_rank],file=frame.__file__,f_code=$B._frame.f_code.__get__(frame),lineno=frame.$lineno,src=$B.file_cache[file],line=src ? src.split('\n')[lineno-1]:null -warning_message={__class__:WarningMessage,message:message,category,filename:message.filename ||f_code.co_filename,lineno:message.lineno ||lineno,file:_b_.None,line:_b_.None,source:_b_.None,_category_name:category.__name__}} -if($B.imported.warnings){$B.imported.warnings._showwarnmsg_impl(warning_message)}else{var trace='' -if(file && lineno){trace+=`${file}:${lineno}: `} -trace+=$B.class_name(message)+': '+message.args[0] -if(line){trace+='\n '+line.trim()} -var stderr=$B.get_stderr() -$B.$getattr(stderr,'write')(trace+'\n') -var flush=$B.$getattr(stderr,'flush',_b_.None) -if(flush !==_b_.None){flush()}}},warn_explicit:function(){ -console.log("warn_explicit",arguments)}} -function load(name,module_obj){ -module_obj.__class__=$B.module -module_obj.__name__=name -$B.imported[name]=module_obj -for(var attr in module_obj){if(typeof module_obj[attr]=='function'){module_obj[attr].$infos={__module__:name,__name__:attr,__qualname__:name+'.'+attr}}}} -for(var attr in modules){load(attr,modules[attr])} -if(!($B.isWebWorker ||$B.isNode)){modules['browser'].html=modules['browser.html']} -var _b_=$B.builtins -_b_.__builtins__=$B.module.$factory('__builtins__','Python builtins') -for(var attr in _b_){_b_.__builtins__[attr]=_b_[attr] -$B.builtins_scope.binding[attr]=true -if(_b_[attr].$is_class){if(_b_[attr].__bases__){_b_[attr].__bases__.__class__=_b_.tuple}else{_b_[attr].__bases__=$B.fast_tuple([_b_.object])}}} -_b_.__builtins__.__setattr__=function(attr,value){_b_[attr]=value} -$B.method_descriptor.__getattribute__=$B.function.__getattribute__ -$B.wrapper_descriptor.__getattribute__=$B.function.__getattribute__ -for(var name in _b_){var builtin=_b_[name] -if(_b_[name].__class__===_b_.type){_b_[name].__qualname__=name -_b_[name].__module__='builtins' -_b_[name].__name__=name -_b_[name].$is_builtin_class=true -$B.builtin_classes.push(_b_[name]) -for(var key in _b_[name]){var value=_b_[name][key] -if(value===undefined ||value.__class__ || -typeof value !='function'){continue}else if(key=="__new__"){value.__class__=$B.builtin_function_or_method}else if(key.startsWith("__")){value.__class__=$B.wrapper_descriptor}else{value.__class__=$B.method_descriptor} -value.__objclass__=_b_[name]}}else if(typeof builtin=='function'){builtin.$infos={__name__:name,__qualname__:name}}} -for(var attr in $B){if(Array.isArray($B[attr])){$B[attr].__class__=_b_.list}} -$B.cell=$B.make_class("cell",function(value){return{ -__class__:$B.cell,$cell_contents:value}} -) -$B.cell.cell_contents=$B.$call(_b_.property)( -function(self){if(self.$cell_contents===null){throw _b_.ValueError.$factory("empty cell")} -return self.$cell_contents},function(self,value){self.$cell_contents=value} -) -var $comps=Object.values($B.$comps).concat(["eq","ne"]) -$comps.forEach(function(comp){var op="__"+comp+"__" -$B.cell[op]=(function(op){return function(self,other){if(! _b_.isinstance(other,$B.cell)){return _b_.NotImplemented} -if(self.$cell_contents===null){if(other.$cell_contents===null){return op=="__eq__"}else{return["__ne__","__lt__","__le__"].indexOf(op)>-1}}else if(other.$cell_contents===null){return["__ne__","__gt__","__ge__"].indexOf(op)>-1} -return $B.rich_comp(op,self.$cell_contents,other.$cell_contents)}})(op)}) -$B.set_func_names($B.cell,"builtins") -for(var flag in $B.builtin_class_flags.builtins){for(var key of $B.builtin_class_flags.builtins[flag]){if(_b_[key]){_b_[key].__flags__=parseInt(flag)}else{console.log('not in _b_',key)}}} -for(var flag in $B.builtin_class_flags.types){for(var key of $B.builtin_class_flags.types[flag]){if($B[key]){$B[key].__flags__=parseInt(flag)}}} -$B.AST={__class__:_b_.type,__mro__:[_b_.object],__name__:'AST',__qualname__:'AST',$is_class:true,$convert:function(js_node){if(js_node===undefined){return _b_.None} -var constr=js_node.constructor -if(constr && constr.$name){$B.create_python_ast_classes() -return $B.python_ast_classes[constr.$name].$factory(js_node)}else if(Array.isArray(js_node)){return js_node.map($B.AST.$convert)}else if(js_node.type){ -switch(js_node.type){case 'int': -var value=js_node.value[1],base=js_node.value[0] -var res=parseInt(value,base) -if(! Number.isSafeInteger(res)){res=$B.long_int.$factory(value,base)} -return res -case 'float': -return $B.fast_float(parseFloat(js_node.value)) -case 'imaginary': -return $B.make_complex(0,$B.AST.$convert(js_node.value)) -case 'ellipsis': -return _b_.Ellipsis -case 'str': -if(js_node.is_bytes){return _b_.bytes.$factory(js_node.value,'latin-1')} -return js_node.value -case 'id': -if(['False','None','True'].indexOf(js_node.value)>-1){return _b_[js_node.value]} -break}}else if(['string','number'].indexOf(typeof js_node)>-1){return js_node}else if(js_node.$name){ -return js_node.$name+'()'}else if([_b_.None,_b_.True,_b_.False].indexOf(js_node)>-1){return js_node}else if(js_node.__class__){return js_node}else{console.log('cannot handle',js_node) -return js_node}}} -$B.stdin={__class__:$io,__original__:true,closed:false,len:1,pos:0,read:function(){return ""},readline:function(){return ""}}})(__BRYTHON__) -; -(function($B){var _b_=$B.builtins -function compiler_error(ast_obj,message,end){var exc=_b_.SyntaxError.$factory(message) -exc.filename=state.filename -if(exc.filename !=''){var src=$B.file_cache[exc.filename],lines=src.split('\n'),line=lines[ast_obj.lineno-1] -exc.text=line}else{exc.text=_b_.None} -exc.lineno=ast_obj.lineno -exc.offset=ast_obj.col_offset -end=end ||ast_obj -exc.end_lineno=end.end_lineno -exc.end_offset=end.end_col_offset -exc.args[1]=[exc.filename,exc.lineno,exc.offset,exc.text,exc.end_lineno,exc.end_offset] -exc.$stack=$B.frames_stack.slice() -throw exc} -function fast_id(obj){ -if(obj.$id !==undefined){return obj.$id} -return obj.$id=$B.UUID()} -function copy_position(target,origin){target.lineno=origin.lineno -target.col_offset=origin.col_offset -target.end_lineno=origin.end_lineno -target.end_col_offset=origin.end_col_offset} -function last_scope(scopes){var ix=scopes.length-1 -while(scopes[ix].parent){ix--} -return scopes[ix]} -function Scope(name,type,ast){this.name=name -this.locals=new Set() -this.globals=new Set() -this.nonlocals=new Set() -this.freevars=new Set() -this.type=type -this.ast=ast} -function copy_scope(scope,ast,id){ -var new_scope=new Scope(scope.name,scope.type,ast) -if(id !==undefined){ -new_scope.id=id} -new_scope.parent=scope -return new_scope} -function make_local(module_id){return `locals_${module_id.replace(/\./g, '_')}`} -function qualified_scope_name(scopes,scope){ -if(scope !==undefined && !(scope instanceof Scope)){console.log('bizarre',scope) -throw Error('scope étrange')} -var _scopes -if(! scope){_scopes=scopes.slice()}else{var ix=scopes.indexOf(scope) -if(ix >-1){_scopes=scopes.slice(0,ix+1)}else{_scopes=scopes.concat(scope)}} -var names=[] -for(var _scope of _scopes){if(! _scope.parent){names.push(_scope.name)}} -return names.join('_').replace(/\./g,'_')} -function module_name(scopes){var _scopes=scopes.slice() -var names=[] -for(var _scope of _scopes){if(! _scope.parent){names.push(_scope.name)}} -return names.join('.')} -function make_scope_name(scopes,scope){ -if(scope===builtins_scope){return `_b_`} -return 'locals_'+qualified_scope_name(scopes,scope)} -function make_search_namespaces(scopes){var namespaces=[] -for(var scope of scopes.slice().reverse()){if(scope.parent ||scope.type=='class'){continue}else if(scope.is_exec_scope){namespaces.push('$B.exec_scope')} -namespaces.push(make_scope_name(scopes,scope))} -namespaces.push('_b_') -return namespaces} -function mangle(scopes,scope,name){if(name.startsWith('__')&& ! name.endsWith('__')){var ix=scopes.indexOf(scope) -while(ix >=0){if(scopes[ix].ast instanceof $B.ast.ClassDef){var scope_name=scopes[ix].name -while(scope_name.length > 0 && scope_name.startsWith('_')){scope_name=scope_name.substr(1)} -if(scope_name.length==0){ -return name} -return '_'+scope_name+name} -ix--}} -return name} -function reference(scopes,scope,name){return make_scope_name(scopes,scope)+'.'+mangle(scopes,scope,name)} -function bind(name,scopes){var scope=$B.last(scopes),up_scope=last_scope(scopes) -name=mangle(scopes,up_scope,name) -if(up_scope.globals && up_scope.globals.has(name)){scope=scopes[0]}else if(up_scope.nonlocals.has(name)){for(var i=scopes.indexOf(up_scope)-1;i >=0;i--){if(scopes[i].locals.has(name)){return scopes[i]}}} -scope.locals.add(name) -return scope} -var CELL=5,FREE=4,LOCAL=1,GLOBAL_EXPLICIT=2,GLOBAL_IMPLICIT=3,SCOPE_MASK=15,SCOPE_OFF=11 -var TYPE_CLASS=1,TYPE_FUNCTION=0,TYPE_MODULE=2 -var DEF_GLOBAL=1, -DEF_LOCAL=2 , -DEF_PARAM=2<<1, -DEF_NONLOCAL=2<<2, -USE=2<<3 , -DEF_FREE=2<<4 , -DEF_FREE_CLASS=2<<5, -DEF_IMPORT=2<<6, -DEF_ANNOT=2<<7, -DEF_COMP_ITER=2<<8 -function name_reference(name,scopes,position){var scope=name_scope(name,scopes) -return make_ref(name,scopes,scope,position)} -function make_ref(name,scopes,scope,position){if(scope.found){return reference(scopes,scope.found,name)}else if(scope.resolve=='all'){var scope_names=make_search_namespaces(scopes) -return `$B.resolve_in_scopes('${name}', [${scope_names}], [${position}])`}else if(scope.resolve=='local'){return `$B.resolve_local('${name}', [${position}])`}else if(scope.resolve=='global'){return `$B.resolve_global('${name}', _frames)`}else if(Array.isArray(scope.resolve)){return `$B.resolve_in_scopes('${name}', [${scope.resolve}], [${position}])`}else if(scope.resolve=='own_class_name'){return `$B.own_class_name('${name}')`}} -function local_scope(name,scope){ -var s=scope -while(true){if(s.locals.has(name)){return{found:true,scope:s}} -if(! s.parent){return{found:false}} -s=s.parent}} -function name_scope(name,scopes){ -var test=false -if(test){console.log('name scope',name,scopes.slice()) -alert()} -var flags,block -if(scopes.length==0){ -return{found:false,resolve:'all'}} -var scope=$B.last(scopes),up_scope=last_scope(scopes),name=mangle(scopes,scope,name) -if(up_scope.ast===undefined){console.log('no ast',scope)} -block=scopes.symtable.table.blocks.get(fast_id(up_scope.ast)) -if(block===undefined){console.log('no block',scope,scope.ast,'id',fast_id(up_scope.ast)) -console.log('scopes',scopes.slice()) -console.log('symtable',scopes.symtable)} -try{flags=_b_.dict.$getitem_string(block.symbols,name)}catch(err){console.log('name',name,'not in symbols of block',block) -console.log('symtables',scopes.symtable) -return{found:false,resolve:'all'}} -var __scope=(flags >> SCOPE_OFF)& SCOPE_MASK,is_local=[LOCAL,CELL].indexOf(__scope)>-1 -if(test){console.log('block',block,'is local',is_local)} -if(up_scope.ast instanceof $B.ast.ClassDef && name==up_scope.name){return{found:false,resolve:'own_class_name'}} -if(name=='__annotations__'){if(block.type==TYPE_CLASS && up_scope.has_annotation){is_local=true}else if(block.type==TYPE_MODULE){is_local=true}} -if(is_local){ -var l_scope=local_scope(name,scope) -if(! l_scope.found){if(block.type==TYPE_CLASS){ -scope.needs_frames=true -return{found:false,resolve:'global'}}else if(block.type==TYPE_MODULE){scope.needs_frames=true -return{found:false,resolve:'global'}} -return{found:false,resolve:'local'}}else{return{found:l_scope.scope}}}else if(scope.globals.has(name)){var global_scope=scopes[0] -if(global_scope.locals.has(name)){return{found:global_scope}} -scope.needs_frames=true -return{found:false,resolve:'global'}}else if(scope.nonlocals.has(name)){ -for(var i=scopes.length-2;i >=0;i--){block=scopes.symtable.table.blocks.get(fast_id(scopes[i].ast)) -if(block && _b_.dict.$contains_string(block.symbols,name)){var fl=_b_.dict.$getitem_string(block.symbols,name),local_to_block= -[LOCAL,CELL].indexOf((fl >> SCOPE_OFF)& SCOPE_MASK)>-1 -if(! local_to_block){continue} -return{found:scopes[i]}}}} -if(scope.has_import_star){if(! is_local){scope.needs_frames=true} -return{found:false,resolve:is_local ? 'all' :'global'}} -for(var i=scopes.length-2;i >=0;i--){block=undefined -if(scopes[i].ast){block=scopes.symtable.table.blocks.get(fast_id(scopes[i].ast))} -if(scopes[i].globals.has(name)){scope.needs_frames=true -return{found:false,resolve:'global'}} -if(scopes[i].locals.has(name)&& scopes[i].type !='class'){return{found:scopes[i]}}else if(block && _b_.dict.$contains_string(block.symbols,name)){flags=_b_.dict.$getitem_string(block.symbols,name) -var __scope=(flags >> SCOPE_OFF)& SCOPE_MASK -if([LOCAL,CELL].indexOf(__scope)>-1){ -return{found:false,resolve:'all'}}} -if(scopes[i].has_import_star){return{found:false,resolve:'all'}}} -if(builtins_scope.locals.has(name)){return{found:builtins_scope}} -var scope_names=make_search_namespaces(scopes) -return{found:false,resolve:scope_names}} -function resolve_in_namespace(name,ns){if(ns.$proxy){ -return ns[name]===undefined ?{found:false}: -{found:true,value:ns[name]}} -if(! ns.hasOwnProperty){if(ns[name]!==undefined){return{found:true,value:ns[name]}}}else if(ns.hasOwnProperty(name)){return{found:true,value:ns[name]}}else if(ns.$dict){try{return{found:true,value:ns.$getitem(ns.$dict,name)}}catch(err){if(ns.$missing){try{return{ -found:true,value:$B.$call(ns.$missing)(ns.$dict,name)}}catch(err){if(! $B.is_exc(err,[_b_.KeyError])){throw err}}}}} -return{found:false}} -$B.resolve=function(name){var checked=new Set(),current_globals -for(var frame of $B.frames_stack.slice().reverse()){if(current_globals===undefined){current_globals=frame[3]}else if(frame[3]!==current_globals){var v=resolve_in_namespace(name,current_globals) -if(v.found){return v.value} -checked.add(current_globals) -current_globals=frame[3]} -var v=resolve_in_namespace(name,frame[1]) -if(v.found){return v.value}} -if(! checked.has(frame[3])){var v=resolve_in_namespace(name,frame[3]) -if(v.found){return v.value}} -if(builtins_scope.locals.has(name)){return _b_[name]} -throw $B.name_error(name)} -$B.resolve_local=function(name,position){ -var frame=$B.last($B.frames_stack) -if(frame[1].hasOwnProperty){if(frame[1].hasOwnProperty(name)){return frame[1][name]}}else{var value=frame[1][name] -if(value !==undefined){return value}} -var exc=_b_.UnboundLocalError.$factory(`cannot access local variable `+ -`'${name}' where it is not associated with a value`) -if(position){$B.set_exception_offsets(exc,position)} -throw exc} -$B.resolve_in_scopes=function(name,namespaces,position){for(var ns of namespaces){if(ns===$B.exec_scope){var exec_top -for(var frame of $B.frames_stack.slice().reverse()){if(frame.is_exec_top){exec_top=frame -break}} -if(exec_top){for(var ns of[exec_top[1],exec_top[3]]){var v=resolve_in_namespace(name,ns) -if(v.found){return v.value}}}}else{var v=resolve_in_namespace(name,ns) -if(v.found){return v.value}}} -var exc=$B.name_error(name) -if(position){$B.set_exception_offsets(exc,position)} -throw exc} -$B.resolve_global=function(name,_frames){ -for(var frame of _frames.slice().reverse()){var v=resolve_in_namespace(name,frame[3]) -if(v.found){return v.value} -if(frame.is_exec_top){break}} -if(builtins_scope.locals.has(name)){return _b_[name]} -throw $B.name_error(name)} -$B.own_class_name=function(name){throw $B.name_error(name)} -var $operators=$B.op2method.subset("all") -var opname2opsign={} -for(var key in $operators){opname2opsign[$operators[key]]=key} -var opclass2dunder={} -for(var op_type of $B.op_types){ -for(var operator in op_type){opclass2dunder[op_type[operator]]='__'+$operators[operator]+'__'}} -opclass2dunder['UAdd']='__pos__' -opclass2dunder['USub']='__neg__' -opclass2dunder['Invert']='__invert__' -var builtins_scope=new Scope("__builtins__") -for(var name in $B.builtins){builtins_scope.locals.add(name)} -function mark_parents(node){if(node.body && node.body instanceof Array){for(var child of node.body){child.$parent=node -mark_parents(child)}}else if(node.handlers){ -var p={$parent:node,'type':'except_handler'} -for(var child of node.handlers){child.$parent=p -mark_parents(child)}}} -function add_body(body,scopes){var res='' -for(var item of body){js=$B.js_from_ast(item,scopes) -if(js.length > 0){res+=js+'\n'}} -return res.trimRight()} -function extract_docstring(ast_obj,scopes){ -var js='_b_.None' -if(ast_obj.body.length && -ast_obj.body[0]instanceof $B.ast.Expr && -ast_obj.body[0].value instanceof $B.ast.Constant){ -var value=ast_obj.body[0].value.value -if(typeof value=='string'){js=ast_obj.body[0].value.to_js(scopes) -ast_obj.body.shift()}} -return js} -function init_comprehension(comp,scopes){if(comp.type=='genexpr'){return init_genexpr(comp,scopes)} -return `var next_func_${comp.id} = $B.make_js_iterator(expr, frame, ${comp.ast.lineno})\n`} -function init_genexpr(comp,scopes){var comp_id=comp.type+'_'+comp.id,varnames=Object.keys(comp.varnames ||{}).map(x=> `'${x}'`).join(', ') -return `var ${comp.locals_name} = {},\n`+ -`locals = ${comp.locals_name}\n`+ -`locals['.0'] = expr\n`+ -`var frame = ["<${comp.type.toLowerCase()}>", ${comp.locals_name}, `+ -`"${comp.module_name}", ${comp.globals_name}]\n`+ -`frame.$has_generators = true\n`+ -`frame.__file__ = '${scopes.filename}'\n`+ -`frame.$lineno = ${comp.ast.lineno}\n`+ -`frame.f_code = {\n`+ -`co_argcount: 1,\n`+ -`co_firstlineno:${comp.ast.lineno},\n`+ -`co_name: "<${comp.type.toLowerCase()}>",\n`+ -`co_filename: "${scopes.filename}",\n`+ -`co_flags: ${comp.type == 'genexpr' ? 115 : 83},\n`+ -`co_freevars: $B.fast_tuple([]),\n`+ -`co_kwonlyargcount: 0,\n`+ -`co_posonlyargount: 0,\n`+ -`co_qualname: "<${comp.type.toLowerCase()}>",\n`+ -`co_varnames: $B.fast_tuple(['.0', ${varnames}])\n`+ -`}\n`+ -`var next_func_${comp.id} = $B.make_js_iterator(expr, frame, ${comp.ast.lineno})\n`+ -`frame.$f_trace = _b_.None\n`+ -`var _frames = $B.frames_stack.slice()\n`} -function make_comp(scopes){ -var id=$B.UUID(),type=this.constructor.$name,symtable_block=scopes.symtable.table.blocks.get(fast_id(this)),varnames=symtable_block.varnames.map(x=> `"${x}"`),comp_iter,comp_scope=$B.last(scopes) -for(var symbol of _b_.dict.$iter_items_with_hash(symtable_block.symbols)){if(symbol.value & DEF_COMP_ITER){comp_iter=symbol.key}} -var comp_iter_scope=name_scope(comp_iter,scopes) -var first_for=this.generators[0], -outmost_expr=$B.js_from_ast(first_for.iter,scopes),nb_paren=1 -var comp={ast:this,id,type,varnames,module_name:scopes[0].name,locals_name:make_scope_name(scopes),globals_name:make_scope_name(scopes,scopes[0])} -var js=init_comprehension(comp,scopes) -if(comp_iter_scope.found){js+=`var save_comp_iter = ${name_reference(comp_iter, scopes)}\n`} -if(this instanceof $B.ast.ListComp){js+=`var result_${id} = []\n`}else if(this instanceof $B.ast.SetComp){js+=`var result_${id} = _b_.set.$factory()\n`}else if(this instanceof $B.ast.DictComp){js+=`var result_${id} = $B.empty_dict()\n`} -var first=this.generators[0] -js+=`try{\n`+ -`for(var next_${id} of next_func_${id}){\n` -var name=new $B.ast.Name(`next_${id}`,new $B.ast.Load()) -copy_position(name,first_for.iter) -name.to_js=function(){return `next_${id}`} -var assign=new $B.ast.Assign([first.target],name) -assign.lineno=this.lineno -js+=assign.to_js(scopes)+'\n' -for(var _if of first.ifs){nb_paren++ -js+=`if($B.$bool(${$B.js_from_ast(_if, scopes)})){\n`} -for(var comprehension of this.generators.slice(1)){js+=comprehension.to_js(scopes) -nb_paren++ -for(var _if of comprehension.ifs){nb_paren++}} -if(this instanceof $B.ast.DictComp){var key=$B.js_from_ast(this.key,scopes),value=$B.js_from_ast(this.value,scopes)}else{var elt=$B.js_from_ast(this.elt,scopes)} -var has_await=comp_scope.has_await -js=`(${has_await ? 'async ' : ''}function(expr){\n`+js -js+=has_await ? 'var save_stack = $B.save_stack();\n' :'' -if(this instanceof $B.ast.ListComp){js+=`result_${id}.push(${elt})\n`}else if(this instanceof $B.ast.SetComp){js+=`_b_.set.add(result_${id}, ${elt})\n`}else if(this instanceof $B.ast.DictComp){js+=`_b_.dict.$setitem(result_${id}, ${key}, ${value})\n`} -for(var i=0;i < nb_paren;i++){js+='}\n'} -js+=`}catch(err){\n`+ -(has_await ? '$B.restore_stack(save_stack, locals)\n' :'')+ -`$B.set_exc(err, frame)\n`+ -`throw err\n}\n`+ -(has_await ? '\n$B.restore_stack(save_stack, locals);' :'') -if(comp_iter_scope.found){js+=`${name_reference(comp_iter, scopes)} = save_comp_iter\n`}else{js+=`delete locals.${comp_iter}\n`} -js+=`return result_${id}\n`+ -`}\n`+ -`)(${outmost_expr})\n` -return js} -var exec_num={value:0} -function init_scopes(type,scopes){ -var filename=scopes.symtable.table.filename,name=$B.url2name[filename] -if(name){name=name.replace(/-/g,'_')}else if(filename.startsWith('<')&& filename.endsWith('>')){name='exec'}else{name=filename.replace(/\./g,'_')} -var top_scope=new Scope(name,`${type}`,this),block=scopes.symtable.table.blocks.get(fast_id(this)) -if(block && block.$has_import_star){top_scope.has_import_star=true} -scopes.push(top_scope) -var namespaces=scopes.namespaces -if(namespaces){top_scope.is_exec_scope=true -for(var key in namespaces.exec_globals){if(! key.startsWith('$')){top_scope.globals.add(key)}} -if(namespaces.exec_locals !==namespaces.exec_globals){for(var key in namespaces.exec_locals){if(! key.startsWith('$')){top_scope.locals.add(key)}}}} -return name} -function compiler_check(obj){var check_func=Object.getPrototypeOf(obj)._check -if(check_func){obj._check()}} -$B.ast.Assert.prototype.to_js=function(scopes){var test=$B.js_from_ast(this.test,scopes),msg=this.msg ? $B.js_from_ast(this.msg,scopes):'' -return `if($B.set_lineno(frame, ${this.lineno}) && !$B.$bool(${test})){\n`+ -`throw _b_.AssertionError.$factory(${msg})}\n`} -var CO_FUTURE_ANNOTATIONS=0x1000000 -function annotation_to_str(obj){var s -if(obj instanceof $B.ast.Name){s=obj.id}else if(obj instanceof $B.ast.BinOp){s=annotation_to_str(obj.left)+'|'+annotation_to_str(obj.right)}else if(obj instanceof $B.ast.Subscript){s=annotation_to_str(obj.value)+'['+ -annotation_to_str(obj.slice)+']'}else if(obj instanceof $B.ast.Constant){if(obj.value===_b_.None){s='None'}else{console.log('other constant',obj)}}else{console.log('other annotation',obj)} -return s} -$B.ast.AnnAssign.prototype.to_js=function(scopes){var postpone_annotation=scopes.symtable.table.future.features & -CO_FUTURE_ANNOTATIONS -var scope=last_scope(scopes) -var js='' -if(! scope.has_annotation){js+='locals.__annotations__ = locals.__annotations__ || $B.empty_dict()\n' -scope.has_annotation=true -scope.locals.add('__annotations__')} -if(this.target instanceof $B.ast.Name){var ann_value=postpone_annotation ? -`'${annotation_to_str(this.annotation)}'` : -$B.js_from_ast(this.annotation,scopes)} -if(this.value){js+=`var ann = ${$B.js_from_ast(this.value, scopes)}\n` -if(this.target instanceof $B.ast.Name && this.simple){var scope=bind(this.target.id,scopes),mangled=mangle(scopes,scope,this.target.id) -if(scope.type !="def"){ -js+=`$B.$setitem(locals.__annotations__, `+ -`'${mangled}', ${ann_value})\n`} -var target_ref=name_reference(this.target.id,scopes) -js+=`${target_ref} = ann`}else if(this.target instanceof $B.ast.Attribute){js+=`$B.$setattr(${$B.js_from_ast(this.target.value, scopes)}`+ -`, "${this.target.attr}", ann)`}else if(this.target instanceof $B.ast.Subscript){js+=`$B.$setitem(${$B.js_from_ast(this.target.value, scopes)}`+ -`, ${$B.js_from_ast(this.target.slice, scopes)}, ann)`}}else{if(this.target instanceof $B.ast.Name){if(this.simple && scope.type !='def'){var mangled=mangle(scopes,scope,this.target.id) -var ann=`'${this.annotation.id}'` -js+=`$B.$setitem(locals.__annotations__, `+ -`'${mangled}', ${ann_value})`}}else{var ann=$B.js_from_ast(this.annotation,scopes)}} -return `$B.set_lineno(frame, ${this.lineno})\n`+js} -$B.ast.Assign.prototype.to_js=function(scopes){compiler_check(this) -var js=this.lineno ? `$B.set_lineno(frame, ${this.lineno})\n` :'',value=$B.js_from_ast(this.value,scopes) -function assign_one(target,value){if(target instanceof $B.ast.Name){return $B.js_from_ast(target,scopes)+' = '+value}else if(target instanceof $B.ast.Starred){return assign_one(target.value,value)}else if(target instanceof $B.ast.Subscript){return `$B.$setitem(${$B.js_from_ast(target.value, scopes)}`+ -`, ${$B.js_from_ast(target.slice, scopes)}, ${value})`}else if(target instanceof $B.ast.Attribute){var attr=mangle(scopes,last_scope(scopes),target.attr) -return `$B.$setattr(${$B.js_from_ast(target.value, scopes)}`+ -`, "${attr}", ${value})`}} -function assign_many(target,value){var js='' -var nb_targets=target.elts.length,has_starred=false,nb_after_starred -for(var i=0,len=nb_targets;i < len;i++){if(target.elts[i]instanceof $B.ast.Starred){has_starred=true -nb_after_starred=len-i-1 -break}} -var iter_id='it_'+$B.UUID() -js+=`var ${iter_id} = $B.unpacker(${value}, ${nb_targets}, `+ -`${has_starred}` -if(nb_after_starred !==undefined){js+=`, ${nb_after_starred}`} -if($B.pep657){js+=`, [${target.col_offset}, ${target.col_offset}, ${target.end_col_offset}]`} -js+=`)\n` -var assigns=[] -for(var elt of target.elts){if(elt instanceof $B.ast.Starred){assigns.push(assign_one(elt,`${iter_id}.read_rest()`))}else if(elt instanceof $B.ast.List || -elt instanceof $B.ast.Tuple){assigns.push(assign_many(elt,`${iter_id}.read_one()`))}else{assigns.push(assign_one(elt,`${iter_id}.read_one()`))}} -js+=assigns.join('\n') -return js} -var value_id='v'+$B.UUID() -js+=`var ${value_id} = ${value}\n` -var assigns=[] -for(var target of this.targets){if(!(target instanceof $B.ast.Tuple)&& -!(target instanceof $B.ast.List)){assigns.push(assign_one(target,value_id))}else{assigns.push(assign_many(target,value_id))}} -js+=assigns.join('\n') -return js} -$B.ast.AsyncFor.prototype.to_js=function(scopes){if(!(last_scope(scopes).ast instanceof $B.ast.AsyncFunctionDef)){compiler_error(this,"'async for' outside async function")} -return $B.ast.For.prototype.to_js.bind(this)(scopes)} -$B.ast.AsyncFunctionDef.prototype.to_js=function(scopes){return $B.ast.FunctionDef.prototype.to_js.bind(this)(scopes)} -$B.ast.AsyncWith.prototype.to_js=function(scopes){ -if(!(last_scope(scopes).ast instanceof $B.ast.AsyncFunctionDef)){compiler_error(this,"'async with' outside async function")} -function bind_vars(vars,scopes){if(vars instanceof $B.ast.Name){bind(vars.id,scopes)}else if(vars instanceof $B.ast.Tuple){for(var var_item of vars.elts){bind_vars(var_item,scopes)}}} -function add_item(item,js){var id=$B.UUID() -var s=`var mgr_${id} = `+ -$B.js_from_ast(item.context_expr,scopes)+',\n'+ -`mgr_type_${id} = _b_.type.$factory(mgr_${id}),\n`+ -`aexit_${id} = $B.$getattr(mgr_type_${id}, '__aexit__'),\n`+ -`aenter_${id} = $B.$getattr(mgr_type_${id}, '__aenter__'),\n`+ -`value_${id} = await $B.promise($B.$call(aenter_${id})(mgr_${id})),\n`+ -`exc_${id} = true\n` -if(has_generator){ -s+=`locals.$context_managers = locals.$context_managers || []\n`+ -`locals.$context_managers.push(mgr_${id})\n`} -s+='try{\ntry{\n' -if(item.optional_vars){ -var value={to_js:function(){return `value_${id}`}} -copy_position(value,_with) -var assign=new $B.ast.Assign([item.optional_vars],value) -copy_position(assign,_with) -s+=assign.to_js(scopes)+'\n'} -s+=js -s+=`}catch(err_${id}){\n`+ -`frame.$lineno = ${lineno}\n`+ -`exc_${id} = false\n`+ -`err_${id} = $B.exception(err_${id}, frame)\n`+ -`var $b = await $B.promise(aexit_${id}(mgr_${id}, err_${id}.__class__, `+ -`err_${id}, $B.$getattr(err_${id}, '__traceback__')))\n`+ -`if(! $B.$bool($b)){\nthrow err_${id}\n}\n}\n` -s+=`}\nfinally{\n`+ -`frame.$lineno = ${lineno}\n`+ -`if(exc_${id}){\n`+ -`await $B.promise(aexit_${id}(mgr_${id}, _b_.None, _b_.None, _b_.None))\n}\n}\n` -return s} -var _with=this,scope=last_scope(scopes),lineno=this.lineno -delete scope.is_generator -for(var item of this.items.slice().reverse()){if(item.optional_vars){bind_vars(item.optional_vars,scopes)}} -js=add_body(this.body,scopes)+'\n' -var has_generator=scope.is_generator -for(var item of this.items.slice().reverse()){js=add_item(item,js)} -return `$B.set_lineno(frame, ${this.lineno})\n`+js} -$B.ast.Attribute.prototype.to_js=function(scopes){var attr=mangle(scopes,last_scope(scopes),this.attr) -if(this.value instanceof $B.ast.Name && this.value.id=='axw'){return `${$B.js_from_ast(this.value, scopes)}.${attr}`} -if($B.pep657){return `$B.$getattr_pep657(${$B.js_from_ast(this.value, scopes)}, `+ -`'${attr}', `+ -`[${this.value.col_offset}, ${this.value.col_offset}, `+ -`${this.end_col_offset}])`} -return `$B.$getattr(${$B.js_from_ast(this.value, scopes)}, `+ -`'${attr}')`} -$B.ast.AugAssign.prototype.to_js=function(scopes){var js,op_class=this.op.$name ? this.op :this.op.constructor -for(var op in $B.op2ast_class){if($B.op2ast_class[op][1]===op_class){var iop=op+'=' -break}} -var value=$B.js_from_ast(this.value,scopes) -if(this.target instanceof $B.ast.Name){var scope=name_scope(this.target.id,scopes) -if(! scope.found){ -var left_scope=scope.resolve=='global' ? -make_scope_name(scopes,scopes[0]):'locals' -return `${left_scope}.${this.target.id} = $B.augm_assign(`+ -make_ref(this.target.id,scopes,scope)+`, '${iop}', ${value})`}else{var ref=`${make_scope_name(scopes, scope.found)}.${this.target.id}` -js=`${ref} = $B.augm_assign(${ref}, '${iop}', ${value})`}}else if(this.target instanceof $B.ast.Subscript){var op=opclass2dunder[this.op.constructor.$name] -js=`$B.$setitem((locals.$tg = ${this.target.value.to_js(scopes)}), `+ -`(locals.$key = ${this.target.slice.to_js(scopes)}), `+ -`$B.augm_assign($B.$getitem(locals.$tg, locals.$key), '${iop}', ${value}))`}else if(this.target instanceof $B.ast.Attribute){var op=opclass2dunder[this.op.constructor.$name],mangled=mangle(scopes,last_scope(scopes),this.target.attr) -js=`$B.$setattr((locals.$tg = ${this.target.value.to_js(scopes)}), `+ -`'${mangled}', $B.augm_assign(`+ -`$B.$getattr(locals.$tg, '${mangled}'), '${iop}', ${value}))`}else{var target=$B.js_from_ast(this.target,scopes),value=$B.js_from_ast(this.value,scopes) -js=`${target} = $B.augm_assign(${target}, '${iop}', ${value})`} -return `$B.set_lineno(frame, ${this.lineno})\n`+js} -$B.ast.Await.prototype.to_js=function(scopes){var ix=scopes.length-1 -while(scopes[ix].parent){ix--} -while(scopes[ix].ast instanceof $B.ast.ListComp || -scopes[ix].ast instanceof $B.ast.DictComp || -scopes[ix].ast instanceof $B.ast.SetComp || -scopes[ix].ast instanceof $B.ast.GeneratorExp){scopes[ix].has_await=true -ix--} -if(scopes[ix].ast instanceof $B.ast.AsyncFunctionDef){scopes[ix].has_await=true -return `await $B.promise(${$B.js_from_ast(this.value, scopes)})`}else if(scopes[ix].ast instanceof $B.ast.FunctionDef){compiler_error(this,"'await' outside async function",this.value)}else{compiler_error(this,"'await' outside function",this.value)}} -$B.ast.BinOp.prototype.to_js=function(scopes){ -var name=this.op.$name ? this.op.$name :this.op.constructor.$name -var op=opclass2dunder[name] -var res=`$B.rich_op('${op}', ${$B.js_from_ast(this.left, scopes)}, `+ -`${$B.js_from_ast(this.right, scopes)}` -if($B.pep657){res+=`, [${this.left.col_offset}, ${this.col_offset}, `+ -`${this.end_col_offset}, ${this.right.end_col_offset}]`} -return res+')'} -$B.ast.BoolOp.prototype.to_js=function(scopes){ -var op=this.op instanceof $B.ast.And ? '! ' :'' -var tests=[] -for(var i=0,len=this.values.length;i < len;i++){var value=this.values[i] -if(i < len-1){tests.push(`${op}$B.$bool(locals.$test = `+ -`${$B.js_from_ast(value, scopes)}) ? locals.$test : `)}else{tests.push(`${$B.js_from_ast(value, scopes)}`)}} -return '('+tests.join('')+')'} -function in_loop(scopes){for(var scope of scopes.slice().reverse()){if(scope.ast instanceof $B.ast.For || -scope.ast instanceof $B.ast.While){return true}} -return false} -$B.ast.Break.prototype.to_js=function(scopes){if(! in_loop(scopes)){compiler_error(this,"'break' outside loop")} -var js='' -for(var scope of scopes.slice().reverse()){if(scope.ast instanceof $B.ast.For || -scope.ast instanceof $B.ast.While){js+=`no_break_${scope.id} = false\n` -break}} -js+=`break` -return js} -$B.ast.Call.prototype.to_js=function(scopes){var func=$B.js_from_ast(this.func,scopes),js='$B.$call('+func+ -`, [${this.col_offset}, ${this.col_offset}, ${this.end_col_offset}]` -var args=make_args.bind(this)(scopes) -return js+')'+(args.has_starred ? `.apply(null, ${args.js})` : -`(${args.js})`)} -function make_args(scopes){var js='',named_args=[],named_kwargs=[],starred_kwargs=[],has_starred=false -for(var arg of this.args){if(arg instanceof $B.ast.Starred){arg.$handled=true -has_starred=true}else{named_args.push($B.js_from_ast(arg,scopes))}} -var kwds=new Set() -for(var keyword of this.keywords){if(keyword.arg){if(kwds.has(keyword.arg)){compiler_error(keyword,`keyword argument repeated: ${keyword.arg}`)} -kwds.add(keyword.arg) -named_kwargs.push( -`${keyword.arg}: ${$B.js_from_ast(keyword.value, scopes)}`)}else{starred_kwargs.push($B.js_from_ast(keyword.value,scopes))}} -var args='' -named_args=named_args.join(', ') -if(! has_starred){args+=`${named_args}`}else{var start=true,not_starred=[] -for(var arg of this.args){if(arg instanceof $B.ast.Starred){if(not_starred.length > 0){var arg_list=not_starred.map(x=> $B.js_from_ast(x,scopes)) -if(start){args+=`[${arg_list.join(', ')}]`}else{args+=`.concat([${arg_list.join(', ')}])`} -not_starred=[]}else if(args==''){args='[]'} -var starred_arg=$B.js_from_ast(arg.value,scopes) -args+=`.concat(_b_.list.$factory(${starred_arg}))` -start=false}else{not_starred.push(arg)}} -if(not_starred.length > 0){var arg_list=not_starred.map(x=> $B.js_from_ast(x,scopes)) -if(start){args+=`[${arg_list.join(', ')}]` -start=false}else{args+=`.concat([${arg_list.join(', ')}])`}} -if(args[0]=='.'){console.log('bizarre',args)}} -if(named_kwargs.length+starred_kwargs.length==0){return{has_starred,js:js+`${args}`}}else{var kw=`{${named_kwargs.join(', ')}}` -for(var starred_kwarg of starred_kwargs){kw+=`, ${starred_kwarg}`} -kw=`{$kw:[${kw}]}` -if(args.length > 0){if(has_starred){kw=`.concat([${kw}])`}else{kw=', '+kw}} -return{has_starred,js:js+`${args}${kw}`}}} -$B.ast.ClassDef.prototype.to_js=function(scopes){var enclosing_scope=bind(this.name,scopes) -var class_scope=new Scope(this.name,'class',this) -var js='',locals_name=make_scope_name(scopes,class_scope),ref=this.name+$B.UUID(),glob=scopes[0].name,globals_name=make_scope_name(scopes,scopes[0]),decorators=[],decorated=false -for(var dec of this.decorator_list){decorated=true -var dec_id='decorator'+$B.UUID() -decorators.push(dec_id) -js+=`$B.set_lineno(frame, ${dec.lineno})\n`+ -`var ${dec_id} = ${$B.js_from_ast(dec, scopes)}\n`} -js+=`$B.set_lineno(frame, ${this.lineno})\n` -var qualname=this.name -var ix=scopes.length-1 -while(ix >=0){if(scopes[ix].parent){ix--}else if(scopes[ix].ast instanceof $B.ast.ClassDef){qualname=scopes[ix].name+'.'+qualname -ix--}else{break}} -var keywords=[],metaclass -for(var keyword of this.keywords){if(keyword.arg=='metaclass'){metaclass=keyword.value} -keywords.push(`["${keyword.arg}", `+ -$B.js_from_ast(keyword.value,scopes)+']')} -var bases=this.bases.map(x=> $B.js_from_ast(x,scopes)) -var has_type_params=this.type_params.length > 0 -if(has_type_params){js+=`$B.$import('typing')\n`+ -`var typing = $B.imported.typing\n` -var params=[] -for(var item of this.type_params){if(item instanceof $B.ast.TypeVar){params.push(`$B.$call(typing.TypeVar)('${item.name}')`)}else if(item instanceof $B.ast.TypeVarTuple){params.push(`$B.$call($B.$getattr(typing.Unpack, '__getitem__'))($B.$call(typing.TypeVarTuple)('${item.name.id}'))`)}else if(item instanceof $B.ast.ParamSpec){params.push(`$B.$call(typing.ParamSpec)('${item.name.id}')`)}} -bases.push(`typing.Generic.__class_getitem__(typing.Generic,`+ -` $B.fast_tuple([${params}]))`) -for(var item of this.type_params){var name,param_type=item.constructor.$name -if(param_type=='TypeVar'){name=item.name}else{name=item.name.id} -js+=`locals.${name} = $B.$call(typing.${param_type})('${name}')\n`}} -var docstring=extract_docstring(this,scopes) -js+=`var ${ref} = (function(name, module, bases){\n`+ -`var _frames = $B.frames_stack.slice(),\n`+ -`resolved_bases = $B.resolve_mro_entries(bases),\n`+ -`metaclass = $B.get_metaclass(name, module, `+ -`resolved_bases` -if(metaclass){js+=`, ${metaclass.to_js(scopes)}`} -js+=')\n' -js+=`var ${locals_name} = $B.make_class_namespace(metaclass, `+ -`name, module ,"${qualname}", resolved_bases),\n` -js+=`locals = ${locals_name}\n`+ -`if(resolved_bases !== bases){\nlocals.__orig_bases__ = bases}\n`+ -`locals.__doc__ = ${docstring}\n`+ -`var frame = [name, locals, module, ${globals_name}]\n`+ -`frame.__file__ = '${scopes.filename}'\n`+ -`frame.$lineno = ${this.lineno}\n`+ -`frame.$f_trace = $B.enter_frame(frame)\n`+ -`var _frames = $B.frames_stack.slice()\n`+ -`if(frame.$f_trace !== _b_.None){\n$B.trace_line()}\n` -scopes.push(class_scope) -js+=add_body(this.body,scopes) -scopes.pop() -var keywords=[] -for(var keyword of this.keywords){keywords.push(`["${keyword.arg}", `+ -$B.js_from_ast(keyword.value,scopes)+']')} -js+='\nif(frame.$f_trace !== _b_.None){\n'+ -'$B.trace_return(_b_.None)\n'+ -'}\n'+ -'$B.leave_frame()\n'+ -`return $B.$class_constructor('${this.name}', locals, metaclass, `+ -`resolved_bases, bases, [${keywords.join(', ')}])\n`+ -`})('${this.name}', '${glob}', $B.fast_tuple([${bases}]))\n` -var class_ref=reference(scopes,enclosing_scope,this.name) -if(decorated){class_ref=`decorated${$B.UUID()}` -js+='var '} -var bases=this.bases.map(x=> $B.js_from_ast(x,scopes)) -js+=`${class_ref} = ${ref}\n` -if(decorated){js+=reference(scopes,enclosing_scope,this.name)+' = ' -var decorate=class_ref -for(var dec of decorators.reverse()){decorate=`$B.$call(${dec})(${decorate})`} -js+=decorate+'\n'} -return js} -$B.ast.Compare.prototype.to_js=function(scopes){var left=$B.js_from_ast(this.left,scopes),comps=[] -var len=this.ops.length,prefix=len > 1 ? 'locals.$op = ' :'' -for(var i=0;i < len;i++){var name=this.ops[i].$name ? this.ops[i].$name :this.ops[i].constructor.$name,op=opclass2dunder[name],right=this.comparators[i] -if(op===undefined){console.log('op undefined',this.ops[i]) -alert()} -if(this.ops[i]instanceof $B.ast.In){comps.push(`$B.$is_member(${left}, `+ -`${prefix}${$B.js_from_ast(right, scopes)})`)}else if(this.ops[i]instanceof $B.ast.NotIn){comps.push(`! $B.$is_member(${left}, `+ -`${prefix}${$B.js_from_ast(right, scopes)})`)}else if(this.ops[i]instanceof $B.ast.Is){comps.push(`$B.$is(${left}, `+ -`${prefix}${$B.js_from_ast(right, scopes)})`)}else if(this.ops[i]instanceof $B.ast.IsNot){comps.push(`! $B.$is(${left}, `+ -`${prefix}${$B.js_from_ast(right, scopes)})`)}else{comps.push(`$B.rich_comp('${op}', ${left}, `+ -`${prefix}${$B.js_from_ast(right, scopes)})`)} -if(len > 1){left='locals.$op'}} -return comps.join(' && ')} -$B.ast.comprehension.prototype.to_js=function(scopes){var id=$B.UUID(),iter=$B.js_from_ast(this.iter,scopes) -var js=`var next_func_${id} = $B.make_js_iterator(${iter}, frame, ${this.lineno})\n`+ -`for(var next_${id} of next_func_${id}){\n` -var name=new $B.ast.Name(`next_${id}`,new $B.ast.Load()) -copy_position(name,this.target) -name.to_js=function(){return `next_${id}`} -var assign=new $B.ast.Assign([this.target],name) -copy_position(assign,this.target) -js+=assign.to_js(scopes)+' // assign to target\n' -for(var _if of this.ifs){js+=`if($B.$bool(${$B.js_from_ast(_if, scopes)})){\n`} -return js} -$B.ast.Constant.prototype.to_js=function(scopes){if(this.value===true ||this.value===false){return this.value+''}else if(this.value===_b_.None){return '_b_.None'}else if(typeof this.value=="string"){var s=this.value,srg=$B.surrogates(s) -if(srg.length==0){return `'${s}'`} -return `$B.make_String('${s}', [${srg}])`}else if(this.value.__class__===_b_.bytes){return `_b_.bytes.$factory([${this.value.source}])`}else if(typeof this.value=="number"){return this.value}else if(this.value.__class__===$B.long_int){return `$B.fast_long_int(${this.value.value}n)`}else if(this.value.__class__===_b_.float){return `({__class__: _b_.float, value: ${this.value.value}})`}else if(this.value.__class__===_b_.complex){return `$B.make_complex(${this.value.$real.value}, ${this.value.$imag.value})`}else if(this.value===_b_.Ellipsis){return `_b_.Ellipsis`}else{console.log('invalid value',this.value) -throw SyntaxError('bad value',this.value)}} -$B.ast.Continue.prototype.to_js=function(scopes){if(! in_loop(scopes)){compiler_error(this,"'continue' not properly in loop")} -return 'continue'} -$B.ast.Delete.prototype.to_js=function(scopes){compiler_check(this) -var js='' -for(var target of this.targets){if(target instanceof $B.ast.Name){var scope=name_scope(target.id,scopes) -if(scope.found){scope.found.locals.delete(target.id)} -js+=`$B.$delete("${target.id}")\n`}else if(target instanceof $B.ast.Subscript){js+=`$B.$delitem(${$B.js_from_ast(target.value, scopes)}, `+ -`${$B.js_from_ast(target.slice, scopes)})\n`}else if(target instanceof $B.ast.Attribute){js+=`_b_.delattr(${$B.js_from_ast(target.value, scopes)}, `+ -`'${target.attr}')\n`}} -return `$B.set_lineno(frame, ${this.lineno})\n`+js} -$B.ast.Dict.prototype.to_js=function(scopes){var items=[],keys=this.keys,has_packed=false -function no_key(i){return keys[i]===_b_.None ||keys[i]===undefined} -for(var i=0,len=this.keys.length;i < len;i++){if(no_key(i)){ -has_packed=true -items.push('_b_.list.$factory(_b_.dict.items('+ -$B.js_from_ast(this.values[i],scopes)+'))')}else{var item=`[${$B.js_from_ast(this.keys[i], scopes)}, `+ -`${$B.js_from_ast(this.values[i], scopes)}` -if(this.keys[i]instanceof $B.ast.Constant){var v=this.keys[i].value -if(typeof v=='string'){item+=', '+$B.$hash($B.string_from_ast_value(v))}else{try{var hash=$B.$hash(this.keys[i].value) -item+=`, ${hash}`}catch(err){}}} -items.push(item+']')}} -if(! has_packed){return `_b_.dict.$literal([${items}])`} -var first=no_key(0)? items[0]:`[${items[0]}]`,js='_b_.dict.$literal('+first -for(var i=1,len=items.length;i < len;i++){var arg=no_key(i)? items[i]:`[${items[i]}]` -js+=`.concat(${arg})`} -return js+')'} -$B.ast.DictComp.prototype.to_js=function(scopes){return make_comp.bind(this)(scopes)} -$B.ast.Expr.prototype.to_js=function(scopes){return `$B.set_lineno(frame, ${this.lineno});\n`+ -$B.js_from_ast(this.value,scopes)} -$B.ast.Expression.prototype.to_js=function(scopes){init_scopes.bind(this)('expression',scopes) -return $B.js_from_ast(this.body,scopes)} -$B.ast.For.prototype.to_js=function(scopes){ -var id=$B.UUID(),iter=$B.js_from_ast(this.iter,scopes),js=`frame.$lineno = ${this.lineno}\n` -var scope=$B.last(scopes),new_scope=copy_scope(scope,this,id) -scopes.push(new_scope) -if(this instanceof $B.ast.AsyncFor){js+=`var no_break_${id} = true,\n`+ -`iter_${id} = ${iter},\n`+ -`type_${id} = _b_.type.$factory(iter_${id})\n`+ -`iter_${id} = $B.$call($B.$getattr(type_${id}, "__aiter__"))(iter_${id})\n`+ -`type_${id} = _b_.type.$factory(iter_${id})\n`+ -`var next_func_${id} = $B.$call(`+ -`$B.$getattr(type_${id}, '__anext__'))\n`+ -`while(true){\n`+ -` try{\n`+ -` var next_${id} = await $B.promise(next_func_${id}(iter_${id}))\n`+ -` }catch(err){\n`+ -` if($B.is_exc(err, [_b_.StopAsyncIteration])){\nbreak}\n`+ -` else{\nthrow err}\n`+ -` }\n`}else{js+=`var no_break_${id} = true,\n`+ -`iterator_${id} = ${iter}\n`+ -`for(var next_${id} of $B.make_js_iterator(iterator_${id}, frame, ${this.lineno})){\n`} -var name=new $B.ast.Name(`next_${id}`,new $B.ast.Load()) -copy_position(name,this.iter) -name.to_js=function(){return `next_${id}`} -var assign=new $B.ast.Assign([this.target],name) -js+=assign.to_js(scopes)+'\n' -js+=add_body(this.body,scopes) -js+='\n}' -scopes.pop() -if(this.orelse.length > 0){js+=`\nif(no_break_${id}){\n`+ -add_body(this.orelse,scopes)+'}\n'} -return js} -$B.ast.FormattedValue.prototype.to_js=function(scopes){var value=$B.js_from_ast(this.value,scopes) -if(this.conversion==114){value=`_b_.repr(${value})`}else if(this.conversion==115){value=`_b_.str.$factory(${value})`}else if(this.conversion==97){value=`_b_.ascii(${value})`} -if(this.format_spec){value=`_b_.str.format('{0:' + `+ -$B.js_from_ast(this.format_spec,scopes)+ -` + '}', ${value})`}else if(this.conversion==-1){value=`_b_.str.$factory(${value})`} -return value} -function transform_args(scopes){ -var has_posonlyargs=this.args.posonlyargs.length > 0,_defaults=[],nb_defaults=this.args.defaults.length,positional=this.args.posonlyargs.concat(this.args.args),ix=positional.length-nb_defaults,default_names=[],kw_defaults=[],annotations -for(var arg of positional.concat(this.args.kwonlyargs).concat( -[this.args.vararg,this.args.kwarg])){if(arg && arg.annotation){annotations=annotations ||{} -annotations[arg.arg]=arg.annotation}} -for(var i=ix;i < positional.length;i++){default_names.push(`${positional[i].arg}`) -_defaults.push(`${positional[i].arg}: `+ -`${$B.js_from_ast(this.args.defaults[i - ix], scopes)}`)} -var ix=-1 -for(var arg of this.args.kwonlyargs){ix++ -if(this.args.kw_defaults[ix]===_b_.None){continue} -if(this.args.kw_defaults[ix]===undefined){_defaults.push(`${arg.arg}: _b_.None`)}else{var v=$B.js_from_ast(this.args.kw_defaults[ix],scopes) -_defaults.push(`${arg.arg}: `+v) -kw_defaults.push(`${arg.arg}: ${v}`)}} -var kw_default_names=[] -for(var kw of this.args.kwonlyargs){kw_default_names.push(`'${kw.arg}'`)} -return{default_names,_defaults,positional,has_posonlyargs,kw_defaults,kw_default_names,annotations}} -$B.ast.FunctionDef.prototype.to_js=function(scopes){var symtable_block=scopes.symtable.table.blocks.get(fast_id(this)) -var in_class=last_scope(scopes).ast instanceof $B.ast.ClassDef,is_async=this instanceof $B.ast.AsyncFunctionDef -if(in_class){var class_scope=last_scope(scopes)} -var decorators=[],decorated=false,decs='' -for(var dec of this.decorator_list){decorated=true -var dec_id='decorator'+$B.UUID() -decorators.push(dec_id) -decs+=`$B.set_lineno(frame, ${dec.lineno})\n` -decs+=`var ${dec_id} = ${$B.js_from_ast(dec, scopes)} // decorator\n`} -var docstring=extract_docstring(this,scopes) -var parsed_args=transform_args.bind(this)(scopes),default_names=parsed_args.default_names,_defaults=parsed_args._defaults,positional=parsed_args.positional,has_posonlyargs=parsed_args.has_posonlyargs,kw_defaults=parsed_args.kw_defaults,kw_default_names=parsed_args.kw_default_names -var defaults=`$B.fast_tuple([${this.args.defaults.map(x => x.to_js(scopes))}])`,kw_defaults=kw_default_names.length==0 ? '_b_.None' : -`$B.obj_dict({${kw_defaults.join(', ')}})` -var func_scope=new Scope(this.name,'def',this) -scopes.push(func_scope) -var id=$B.UUID(),name1=this.name+'$'+id,name2=this.name+id -var has_type_params=this.type_params.length > 0,type_params='' -if(has_type_params){ -var tp_name='type_params' -var type_params_scope=new Scope(tp_name,'type_params',this) -var type_params_ref=qualified_scope_name(scopes,type_params_scope) -var type_params=`$B.$import('typing')\n`+ -`var typing = $B.imported.typing\n` -var name=this.type_params[0].name -for(var item of this.type_params){var name,param_type=item.constructor.$name -if(param_type=='TypeVar'){name=item.name}else{name=item.name.id} -bind(name,scopes) -type_params+=`locals_${type_params_ref}.${name} = `+ -`$B.$call(typing.${param_type})('${name}')\n`}} -var args=positional.concat(this.args.kwonlyargs),slots=[],arg_names=[] -for(var arg of args){slots.push(arg.arg+': null') -bind(arg.arg,scopes)} -for(var arg of this.args.posonlyargs){arg_names.push(`'${arg.arg}'`)} -for(var arg of this.args.args.concat(this.args.kwonlyargs)){arg_names.push(`'${arg.arg}'`)} -if(this.args.vararg){bind(this.args.vararg.arg,scopes)} -if(this.args.kwarg){bind(this.args.kwarg.arg,scopes)} -if(this.$is_lambda){var _return=new $B.ast.Return(this.body) -copy_position(_return,this.body) -var body=[_return],function_body=add_body(body,scopes)}else{var function_body=add_body(this.body,scopes)} -var is_generator=symtable_block.generator -var parse_args=[name2] -var js=decs+ -`$B.set_lineno(frame, ${this.lineno})\n` -if(is_async && ! is_generator){js+='async '} -js+=`function ${name2}(){\n` -var locals_name=make_scope_name(scopes,func_scope),gname=scopes[0].name,globals_name=make_scope_name(scopes,scopes[0]) -js+=`var ${locals_name}, - locals\n` -parse_args.push('arguments') -var args_vararg=this.args.vararg===undefined ? 'null' : -"'"+this.args.vararg.arg+"'",args_kwarg=this.args.kwarg===undefined ? 'null': -"'"+this.args.kwarg.arg+"'" -if(positional.length==0 && slots.length==0 && -this.args.vararg===undefined && -this.args.kwarg===undefined){js+=`${locals_name} = locals = arguments.length == 0 ? {} : $B.args0(${parse_args.join(', ')})\n`}else{js+=`${locals_name} = locals = $B.args0(${parse_args.join(', ')})\n`} -js+=`var frame = ["${this.$is_lambda ? '': this.name}", `+ -`locals, "${gname}", ${globals_name}, ${name2}] - if(locals.$has_generators){ - frame.$has_generators = true - } - frame.__file__ = '${scopes.filename}' - frame.$lineno = ${this.lineno} - frame.$f_trace = $B.enter_frame(frame)\n` -if(func_scope.needs_stack_length){js+=`var stack_length = $B.frames_stack.length\n`} -if(func_scope.needs_frames ||is_async){js+=`var _frames = $B.frames_stack.slice(),\n`+ -`_linenos = $B.frames_stack.map(x => x.$lineno)\n`} -if(is_async){js+='frame.$async = true\n'} -if(is_generator){js+=`locals.$is_generator = true\n` -if(is_async){js+=`var gen_${id} = $B.async_generator.$factory(async function*(){\n`}else{js+=`var gen_${id} = $B.generator.$factory(function*(){\n`}} -js+=`try{\n$B.js_this = this\n` -if(in_class){ -var ix=scopes.indexOf(class_scope),parent=scopes[ix-1] -var scope_ref=make_scope_name(scopes,parent),class_ref=class_scope.name, -refs=class_ref.split('.').map(x=> `'${x}'`) -bind("__class__",scopes) -js+=`locals.__class__ = `+ -`$B.get_method_class(${name2}, ${scope_ref}, "${class_ref}", [${refs}])\n`} -js+=function_body+'\n' -if((! this.$is_lambda)&& !($B.last(this.body)instanceof $B.ast.Return)){ -js+='var result = _b_.None\n'+ -'if(frame.$f_trace !== _b_.None){\n'+ -'$B.trace_return(_b_.None)\n}\n'+ -'$B.leave_frame()\n'+ -'return result\n'} -js+=`}catch(err){ - $B.set_exc(err, frame)\n` -if(func_scope.needs_frames){ -js+=`err.$stack = _frames\n`+ -`_linenos[_linenos.length - 1] = frame.$lineno\n`+ -`err.$linenos = _linenos\n`} -js+=`if((! err.$in_trace_func) && frame.$f_trace !== _b_.None){ - frame.$f_trace = $B.trace_exception() - } - $B.leave_frame();throw err - } - }\n` -if(is_generator){js+=`, '${this.name}')\n`+ -`var _gen_${id} = gen_${id}()\n`+ -`_gen_${id}.$frame = frame\n`+ -`$B.leave_frame()\n`+ -`return _gen_${id}}\n` } -scopes.pop() -var func_name_scope=bind(this.name,scopes),in_class=func_name_scope.ast instanceof $B.ast.ClassDef -var qualname=in_class ? `${func_name_scope.name}.${this.name}` : -this.name -var flags=3 -if(this.args.vararg){flags |=4} -if(this.args.kwarg){flags |=8} -if(is_generator){flags |=32} -if(is_async){flags |=128} -var parameters=[],locals=[],identifiers=_b_.dict.$keys_string(symtable_block.symbols) -var free_vars=[] -for(var ident of identifiers){var flag=_b_.dict.$getitem_string(symtable_block.symbols,ident),_scope=(flag >> SCOPE_OFF)& SCOPE_MASK -if(_scope==FREE){free_vars.push(`'${ident}'`)} -if(flag & DEF_PARAM){parameters.push(`'${ident}'`)}else if(flag & DEF_LOCAL){locals.push(`'${ident}'`)}} -var varnames=parameters.concat(locals) -js+=`${name2}.$is_func = true\n` -if(in_class){js+=`${name2}.$is_method = true\n`} -if(is_async){js+=`${name2}.$is_async = true\n`} -js+=`${name2}.$infos = {\n`+ -`__module__: "${gname}",\n`+ -`__name__: "${this.$is_lambda ? '' : this.name}",\n`+ -`__qualname__: "${this.$is_lambda ? '' : qualname}",\n`+ -`__defaults__: ${defaults},\n`+ -`__globals__: _b_.globals(),\n`+ -`__kwdefaults__: ${kw_defaults},\n`+ -`__doc__: ${docstring},\n`+ -`__code__:{\n`+ -`co_argcount: ${positional.length},\n `+ -`co_filename: '${scopes.filename}',\n`+ -`co_firstlineno: ${this.lineno},\n`+ -`co_flags: ${flags},\n`+ -`co_freevars: $B.fast_tuple([${free_vars}]),\n`+ -`co_kwonlyargcount: ${this.args.kwonlyargs.length},\n`+ -`co_name: '${this.$is_lambda ? '': this.name}',\n`+ -`co_nlocals: ${varnames.length},\n`+ -`co_posonlyargcount: ${this.args.posonlyargs.length},\n`+ -`co_qualname: '${this.$is_lambda ? '': qualname}',\n`+ -`co_varnames: $B.fast_tuple([${varnames}])\n`+ -`},\n`+ -`arg_names: [${arg_names}],\n`+ -`vararg: ${args_vararg},\n`+ -`kwarg: ${args_kwarg}\n`+ -`}\n` -if(is_async && ! is_generator){js+=`${name2} = $B.make_async(${name2})\n`} -js+=`$B.make_function_defaults(${name2})\n` -var mangled=mangle(scopes,func_name_scope,this.name),func_ref=`${make_scope_name(scopes, func_name_scope)}.${mangled}` -if(decorated){func_ref=`decorated${$B.UUID()}` -js+='var '} -js+=`${func_ref} = ${name2}\n` -if(this.returns ||parsed_args.annotations){if(has_type_params){scopes.push(type_params_scope) -type_params_scope.name=this.name+'_'+type_params_scope.name} -var ann_items=[] -if(this.returns){ann_items.push(`['return', ${this.returns.to_js(scopes)}]`)} -if(parsed_args.annotations){for(var arg_ann in parsed_args.annotations){var value=parsed_args.annotations[arg_ann].to_js(scopes) -if(in_class){arg_ann=mangle(scopes,class_scope,arg_ann)} -ann_items.push(`['${arg_ann}', ${value}]`)}} -if(has_type_params){scopes.pop()} -js+=`${func_ref}.__annotations__ = _b_.dict.$factory([${ann_items.join(', ')}])\n`}else{js+=`${func_ref}.__annotations__ = $B.empty_dict()\n`} -if(decorated){js+=`${make_scope_name(scopes, func_name_scope)}.${mangled} = ` -var decorate=func_ref -for(var dec of decorators.reverse()){decorate=`$B.$call(${dec})(${decorate})`} -js+=decorate} -if(has_type_params){js=`var locals_${type_params_ref} = {\n}\n`+type_params+js} -return js} -$B.ast.GeneratorExp.prototype.to_js=function(scopes){var id=$B.UUID(),symtable_block=scopes.symtable.table.blocks.get(fast_id(this)),varnames=symtable_block.varnames.map(x=> `"${x}"`) -var expr=this.elt,first_for=this.generators[0], -outmost_expr=$B.js_from_ast(first_for.iter,scopes),nb_paren=1 -var comp_scope=new Scope(`genexpr_${id}`,'comprehension',this) -scopes.push(comp_scope) -var comp={ast:this,id,type:'genexpr',varnames,module_name:scopes[0].name,locals_name:make_scope_name(scopes),globals_name:make_scope_name(scopes,scopes[0])} -var head=init_comprehension(comp,scopes) -var first=this.generators[0] -var js=`$B.enter_frame(frame)\n`+ -`var next_func_${id} = $B.make_js_iterator(expr, frame, ${this.lineno})\n`+ -`for(var next_${id} of next_func_${id}){\n`+ -`frame.$f_trace = $B.enter_frame(frame)\n` -var name=new $B.ast.Name(`next_${id}`,new $B.ast.Load()) -copy_position(name,first_for.iter) -name.to_js=function(){return `next_${id}`} -var assign=new $B.ast.Assign([first.target],name) -assign.lineno=this.lineno -js+=assign.to_js(scopes)+'\n' -for(var _if of first.ifs){nb_paren++ -js+=`if($B.$bool(${$B.js_from_ast(_if, scopes)})){\n`} -for(var comprehension of this.generators.slice(1)){js+=comprehension.to_js(scopes) -nb_paren++ -for(var _if of comprehension.ifs){nb_paren++}} -var elt=$B.js_from_ast(this.elt,scopes),has_await=comp_scope.has_await -js=`var gen${id} = $B.generator.$factory(${has_await ? 'async ' : ''}function*(expr){\n`+js -js+=has_await ? 'var save_stack = $B.save_stack();\n' :'' -js+=`try{\n`+ -` yield ${elt}\n`+ -`}catch(err){\n`+ -(has_await ? '$B.restore_stack(save_stack, locals)\n' :'')+ -`$B.leave_frame()\nthrow err\n}\n`+ -(has_await ? '\n$B.restore_stack(save_stack, locals);' :'') -for(var i=0;i < nb_paren-1;i++){js+='}\n'} -js+='$B.leave_frame()\n}\n'+ -'$B.leave_frame()\n}, "")(expr)\n' -scopes.pop() -var func=`${head}\n${js}\nreturn gen${id}` -return `(function(expr){\n${func}\n})(${outmost_expr})\n`} -$B.ast.Global.prototype.to_js=function(scopes){var scope=last_scope(scopes) -for(var name of this.names){scope.globals.add(name)} -return ''} -$B.ast.If.prototype.to_js=function(scopes){var scope=$B.last(scopes),new_scope=copy_scope(scope,this) -var js=`if($B.set_lineno(frame, ${this.lineno}) && `+ -`$B.$bool(${$B.js_from_ast(this.test, scopes)})){\n` -scopes.push(new_scope) -js+=add_body(this.body,scopes)+'\n}' -scopes.pop() -if(this.orelse.length > 0){if(this.orelse[0]instanceof $B.ast.If && this.orelse.length==1){js+='else '+$B.js_from_ast(this.orelse[0],scopes)+ -add_body(this.orelse.slice(1),scopes)}else{js+='\nelse{\n'+add_body(this.orelse,scopes)+'\n}'}} -return js} -$B.ast.IfExp.prototype.to_js=function(scopes){return '($B.$bool('+$B.js_from_ast(this.test,scopes)+') ? '+ -$B.js_from_ast(this.body,scopes)+': '+ -$B.js_from_ast(this.orelse,scopes)+')'} -$B.ast.Import.prototype.to_js=function(scopes){var js=`$B.set_lineno(frame, ${this.lineno})\n` -for(var alias of this.names){js+=`$B.$import("${alias.name}", [], ` -if(alias.asname){js+=`{'${alias.name}' : '${alias.asname}'}, ` -bind(alias.asname,scopes)}else{js+='{}, ' -bind(alias.name,scopes)} -var parts=alias.name.split('.') -for(var i=0;i < parts.length;i++){scopes.imports[parts.slice(0,i+1).join(".")]=true} -js+=`locals, true)\n`} -return js.trimRight()} -$B.ast.ImportFrom.prototype.to_js=function(scopes){if(this.module==='__future__'){if(!($B.last(scopes).ast instanceof $B.ast.Module)){compiler_error(this,'from __future__ imports must occur at the beginning of the file',$B.last(this.names))}} -var js=`$B.set_lineno(frame, ${this.lineno})\n`+ -`var module = $B.$import_from("${this.module || ''}", ` -var names=this.names.map(x=> `"${x.name}"`).join(', '),aliases=[] -for(var name of this.names){if(name.asname){aliases.push(`${name.name}: '${name.asname}'`)}} -js+=`[${names}], {${aliases.join(', ')}}, ${this.level}, locals);` -for(var alias of this.names){if(alias.asname){bind(alias.asname,scopes)}else if(alias.name=='*'){ -last_scope(scopes).blurred=true -js+=`\n$B.import_all(locals, module)`}else{bind(alias.name,scopes)}} -return js} -$B.ast.JoinedStr.prototype.to_js=function(scopes){var items=this.values.map(s=> $B.js_from_ast(s,scopes)) -if(items.length==0){return "''"} -return items.join(' + ')} -$B.ast.Lambda.prototype.to_js=function(scopes){ -var id=$B.UUID(),name='lambda_'+$B.lambda_magic+'_'+id -var f=new $B.ast.FunctionDef(name,this.args,this.body,[]) -f.lineno=this.lineno -f.$id=fast_id(this) -f.$is_lambda=true -var js=f.to_js(scopes),lambda_ref=reference(scopes,last_scope(scopes),name) -return `(function(){ ${js}\n`+ -`return ${lambda_ref}\n})()`} -function list_or_tuple_to_js(func,scopes){if(this.elts.filter(x=> x instanceof $B.ast.Starred).length > 0){var parts=[],simple=[] -for(var elt of this.elts){if(elt instanceof $B.ast.Starred){elt.$handled=true -parts.push(`[${simple.join(', ')}]`) -simple=[] -parts.push(`_b_.list.$factory(${$B.js_from_ast(elt, scopes)})`)}else{simple.push($B.js_from_ast(elt,scopes))}} -if(simple.length > 0){parts.push(`[${simple.join(', ')}]`)} -var js=parts[0] -for(var part of parts.slice(1)){js+=`.concat(${part})`} -return `${func}(${js})`} -var elts=this.elts.map(x=> $B.js_from_ast(x,scopes)) -return `${func}([${elts.join(', ')}])`} -$B.ast.List.prototype.to_js=function(scopes){return list_or_tuple_to_js.bind(this)('$B.$list',scopes)} -$B.ast.ListComp.prototype.to_js=function(scopes){compiler_check(this) -return make_comp.bind(this)(scopes)} -$B.ast.match_case.prototype.to_js=function(scopes){var js=`($B.set_lineno(frame, ${this.lineno}) && `+ -`$B.pattern_match(subject, {`+ -`${$B.js_from_ast(this.pattern, scopes)}})` -if(this.guard){js+=` && $B.$bool(${$B.js_from_ast(this.guard, scopes)})`} -js+=`){\n` -js+=add_body(this.body,scopes)+'\n}' -return js} -function is_irrefutable(pattern){switch(pattern.constructor){case $B.ast.MatchAs: -if(pattern.pattern===undefined){return pattern}else{return is_irrefutable(pattern.pattern)} -case $B.ast.MatchOr: -for(var i=0;i < pattern.patterns.length;i++){if(is_irrefutable(pattern.patterns[i])){if(i==pattern.patterns.length-1){ -return pattern} -irrefutable_error(pattern.patterns[i])}} -break}} -function irrefutable_error(pattern){var msg=pattern.name ? `name capture '${pattern.name}'` :'wildcard' -msg+=' makes remaining patterns unreachable' -compiler_error(pattern,msg)} -function pattern_bindings(pattern){var bindings=[] -switch(pattern.constructor){case $B.ast.MatchAs: -if(pattern.name){bindings.push(pattern.name)} -break -case $B.ast.MatchSequence: -for(var p of pattern.patterns){bindings=bindings.concat(pattern_bindings(p))} -break -case $B.ast.MatchOr: -bindings=pattern_bindings(pattern.patterns[0]) -err_msg='alternative patterns bind different names' -for(var i=1;i < pattern.patterns.length;i++){var _bindings=pattern_bindings(pattern.patterns[i]) -if(_bindings.length !=bindings.length){compiler_error(pattern,err_msg)}else{for(var j=0;j < bindings.length;j++){if(bindings[j]!=_bindings[j]){compiler_error(pattern,err_msg)}}}} -break} -return bindings.sort()} -$B.ast.Match.prototype.to_js=function(scopes){var scope=$B.last(scopes),irrefutable -var js=`var subject = ${$B.js_from_ast(this.subject, scopes)}\n`,first=true -for(var _case of this.cases){if(! _case.guard){if(irrefutable){irrefutable_error(irrefutable)} -irrefutable=is_irrefutable(_case.pattern)} -var case_js=$B.js_from_ast(_case,scopes) -if(first){js+='if'+case_js -first=false}else{js+='else if'+case_js}} -return `$B.set_lineno(frame, ${this.lineno})\n`+js} -$B.ast.MatchAs.prototype.to_js=function(scopes){ -var scope=$B.last(scopes) -var name=this.name===undefined ? '_' :this.name,params -if(this.pattern===undefined){params=`capture: '${name}'`}else{var pattern=$B.js_from_ast(this.pattern,scopes) -if(this.pattern instanceof $B.ast.MatchAs && this.pattern.name){ -pattern=`group: [{${pattern}}]`} -params=`${pattern}, alias: '${name}'`} -if(scope.bindings){if(scope.bindings.indexOf(name)>-1){compiler_error(this,`multiple assignment to name '${name}' in pattern`)} -scope.bindings.push(name)} -return params} -$B.ast.MatchClass.prototype.to_js=function(scopes){var names=[] -for(var pattern of this.patterns.concat(this.kwd_patterns)){var name=pattern.name -if(name){if(names.indexOf(name)>-1){compiler_error(pattern,`multiple assignment to name '${name}' in pattern`)} -names.push(name)}} -names=[] -for(var i=0;i < this.kwd_attrs.length;i++){var kwd_attr=this.kwd_attrs[i] -if(names.indexOf(kwd_attr)>-1){compiler_error(this.kwd_patterns[i],`attribute name repeated in class pattern: ${kwd_attr}`)} -names.push(kwd_attr)} -var cls=$B.js_from_ast(this.cls,scopes),patterns=this.patterns.map(x=> `{${$B.js_from_ast(x, scopes)}}`) -var kw=[] -for(var i=0,len=this.kwd_patterns.length;i < len;i++){kw.push(this.kwd_attrs[i]+': {'+ -$B.js_from_ast(this.kwd_patterns[i],scopes)+'}')} -return `class: ${cls}, args: [${patterns}], keywords: {${kw.join(', ')}}`} -$B.ast.MatchMapping.prototype.to_js=function(scopes){for(var key of this.keys){if(key instanceof $B.ast.Attribute || -key instanceof $B.ast.Constant || -key instanceof $B.ast.UnaryOp || -key instanceof $B.ast.BinOp){continue}else{compiler_error(key,'mapping pattern keys may only match literals and attribute lookups')}} -var names=[] -for(var pattern of this.patterns){if(pattern instanceof $B.ast.MatchAs && pattern.name){if(names.indexOf(pattern.name)>-1){compiler_error(pattern,`multiple assignments to name '${pattern.name}' in pattern`)} -names.push(pattern.name)}} -var items=[] -for(var i=0,len=this.keys.length;i < len;i++){var key_prefix=this.keys[i]instanceof $B.ast.Constant ? -'literal: ' :'value: ' -var key=$B.js_from_ast(this.keys[i],scopes),value=$B.js_from_ast(this.patterns[i],scopes) -items.push(`[{${key_prefix}${key}}, {${value}}]`)} -var js='mapping: ['+items.join(', ')+']' -if(this.rest){js+=`, rest: '${this.rest}'`} -return js} -$B.ast.MatchOr.prototype.to_js=function(scopes){is_irrefutable(this) -pattern_bindings(this) -var items=[] -for(var alt of this.patterns){items.push(`{${$B.js_from_ast(alt, scopes)}}`)} -var js=items.join(', ') -return `or: [${js}]`} -$B.ast.MatchSequence.prototype.to_js=function(scopes){var items=[],names=[] -for(var pattern of this.patterns){if(pattern instanceof $B.ast.MatchAs && pattern.name){if(names.indexOf(pattern.name)>-1){compiler_error(pattern,`multiple assignments to name '${pattern.name}' in pattern`)} -names.push(pattern.name)} -items.push('{'+$B.js_from_ast(pattern,scopes)+'}')} -return `sequence: [${items.join(', ')}]`} -$B.ast.MatchSingleton.prototype.to_js=function(scopes){var value=this.value===true ? '_b_.True' : -this.value===false ? '_b_.False' : -'_b_.None' -return `literal: ${value}`} -$B.ast.MatchStar.prototype.to_js=function(scopes){var name=this.name===undefined ? '_' :this.name -return `capture_starred: '${name}'`} -$B.ast.MatchValue.prototype.to_js=function(scopes){if(this.value instanceof $B.ast.Constant){return `literal: ${$B.js_from_ast(this.value, scopes)}`}else if(this.value instanceof $B.ast.Constant || -this.value instanceof $B.ast.UnaryOp || -this.value instanceof $B.ast.BinOp || -this.value instanceof $B.ast.Attribute){return `value: ${$B.js_from_ast(this.value, scopes)}`}else{compiler_error(this,'patterns may only match literals and attribute lookups')}} -$B.ast.Module.prototype.to_js=function(scopes){mark_parents(this) -var name=init_scopes.bind(this)('module',scopes),namespaces=scopes.namespaces -var module_id=name,global_name=make_scope_name(scopes),mod_name=module_name(scopes) -var js=`// Javascript code generated from ast\n`+ -`var $B = __BRYTHON__,\n_b_ = $B.builtins,\n` -if(! namespaces){js+=`${global_name} = $B.imported["${mod_name}"],\n`+ -`locals = ${global_name},\n`+ -`frame = ["${module_id}", locals, "${module_id}", locals]`}else{ -js+=`locals = ${namespaces.local_name},\n`+ -`globals = ${namespaces.global_name}` -if(name){js+=`,\nlocals_${name} = locals`}} -js+=`\nframe.__file__ = '${scopes.filename || ""}'\n`+ -`locals.__name__ = '${name}'\n`+ -`locals.__doc__ = ${extract_docstring(this, scopes)}\n` -if(! scopes.imported){js+=`locals.__annotations__ = locals.__annotations__ || $B.empty_dict()\n`} -if(! namespaces){ -js+=`frame.$f_trace = $B.enter_frame(frame)\n`} -js+=`$B.set_lineno(frame, 1)\n`+ -'\nvar _frames = $B.frames_stack.slice()\n'+ -`var stack_length = $B.frames_stack.length\n`+ -`try{\n`+ -add_body(this.body,scopes)+'\n'+ -(namespaces ? '' :`$B.leave_frame({locals, value: _b_.None})\n`)+ -`}catch(err){\n`+ -`$B.set_exc(err, frame)\n`+ -`if((! err.$in_trace_func) && frame.$f_trace !== _b_.None){\n`+ -`frame.$f_trace = $B.trace_exception()\n`+ -`}\n`+ -(namespaces ? '' :`$B.leave_frame({locals, value: _b_.None})\n`)+ -'throw err\n'+ -`}` -scopes.pop() -return js} -$B.ast.Name.prototype.to_js=function(scopes){if(this.ctx instanceof $B.ast.Store){ -var scope=bind(this.id,scopes) -if(scope===$B.last(scopes)&& scope.freevars.has(this.id)){ -scope.freevars.delete(this.id)} -return reference(scopes,scope,this.id)}else if(this.ctx instanceof $B.ast.Load){var res=name_reference(this.id,scopes,[this.col_offset,this.col_offset,this.end_col_offset]) -if(this.id=='__debugger__' && res.startsWith('$B.resolve_in_scopes')){ -return 'debugger'} -return res}} -$B.ast.NamedExpr.prototype.to_js=function(scopes){ -var i=scopes.length-1 -while(scopes[i].type=='comprehension'){i--} -var enclosing_scopes=scopes.slice(0,i+1) -enclosing_scopes.symtable=scopes.symtable -bind(this.target.id,enclosing_scopes) -return '('+$B.js_from_ast(this.target,enclosing_scopes)+' = '+ -$B.js_from_ast(this.value,scopes)+')'} -$B.ast.Nonlocal.prototype.to_js=function(scopes){var scope=$B.last(scopes) -for(var name of this.names){scope.nonlocals.add(name)} -return ''} -$B.ast.Pass.prototype.to_js=function(scopes){return `$B.set_lineno(frame, ${this.lineno})\n`+ -'void(0)'} -$B.ast.Raise.prototype.to_js=function(scopes){var js=`$B.set_lineno(frame, ${this.lineno})\n`+ -'$B.$raise(' -if(this.exc){js+=$B.js_from_ast(this.exc,scopes)} -if(this.cause){js+=', '+$B.js_from_ast(this.cause,scopes)} -return js+')'} -$B.ast.Return.prototype.to_js=function(scopes){ -compiler_check(this) -var js=`$B.set_lineno(frame, ${this.lineno})\n`+ -'var result = '+ -(this.value ? $B.js_from_ast(this.value,scopes):' _b_.None') -js+=`\nif(frame.$f_trace !== _b_.None){\n`+ -`$B.trace_return(result)\n}\n`+ -`$B.leave_frame()\nreturn result\n` -return js} -$B.ast.Set.prototype.to_js=function(scopes){var elts=[] -for(var elt of this.elts){var js -if(elt instanceof $B.ast.Constant){js=`{constant: [${$B.js_from_ast(elt, scopes)}, `+ -`${$B.$hash(elt.value)}]}`}else if(elt instanceof $B.ast.Starred){js=`{starred: ${$B.js_from_ast(elt.value, scopes)}}`}else{js=`{item: ${$B.js_from_ast(elt, scopes)}}`} -elts.push(js)} -return `_b_.set.$literal([${elts.join(', ')}])`} -$B.ast.SetComp.prototype.to_js=function(scopes){return make_comp.bind(this)(scopes)} -$B.ast.Slice.prototype.to_js=function(scopes){var lower=this.lower ? $B.js_from_ast(this.lower,scopes):'_b_.None',upper=this.upper ? $B.js_from_ast(this.upper,scopes):'_b_.None',step=this.step ? $B.js_from_ast(this.step,scopes):'_b_.None' -return `_b_.slice.$fast_slice(${lower}, ${upper}, ${step})`} -$B.ast.Starred.prototype.to_js=function(scopes){if(this.$handled){return `_b_.list.$unpack(${$B.js_from_ast(this.value, scopes)})`} -if(this.ctx instanceof $B.ast.Store){compiler_error(this,"starred assignment target must be in a list or tuple")}else{compiler_error(this,"can't use starred expression here")}} -$B.ast.Subscript.prototype.to_js=function(scopes){var value=$B.js_from_ast(this.value,scopes),slice=$B.js_from_ast(this.slice,scopes) -if(this.slice instanceof $B.ast.Slice){return `$B.getitem_slice(${value}, ${slice})`}else{if($B.pep657){return `$B.$getitem(${value}, ${slice}, `+ -`[${this.value.col_offset}, ${this.slice.col_offset}, `+ -`${this.slice.end_col_offset}])`} -return `$B.$getitem(${value}, ${slice})`}} -$B.ast.Try.prototype.to_js=function(scopes){compiler_check(this) -var id=$B.UUID(),has_except_handlers=this.handlers.length > 0,has_else=this.orelse.length > 0,has_finally=this.finalbody.length > 0 -var js=`$B.set_lineno(frame, ${this.lineno})\ntry{\n` -js+=`var stack_length_${id} = $B.frames_stack.length\n` -if(has_finally){js+=`var save_stack_${id} = $B.frames_stack.slice()\n`} -if(has_else){js+=`var failed${id} = false\n`} -var try_scope=copy_scope($B.last(scopes)) -scopes.push(try_scope) -js+=add_body(this.body,scopes)+'\n' -if(has_except_handlers){var err='err'+id -js+='}\n' -js+=`catch(${err}){\n`+ -`$B.set_exc(${err}, frame)\n`+ -`if(frame.$f_trace !== _b_.None){\n`+ -`frame.$f_trace = $B.trace_exception()}\n` -if(has_else){js+=`failed${id} = true\n`} -var first=true,has_untyped_except=false -for(var handler of this.handlers){if(first){js+='if' -first=false}else{js+='}else if'} -js+=`($B.set_lineno(frame, ${handler.lineno})` -if(handler.type){js+=` && $B.is_exc(${err}, ` -if(handler.type instanceof $B.ast.Tuple){js+=`${$B.js_from_ast(handler.type, scopes)}`}else{js+=`[${$B.js_from_ast(handler.type, scopes)}]`} -js+=`)){\n`}else{has_untyped_except=true -js+='){\n'} -if(handler.name){bind(handler.name,scopes) -var mangled=mangle(scopes,try_scope,handler.name) -js+=`locals.${mangled} = ${err}\n`} -js+=add_body(handler.body,scopes)+'\n' -if(!($B.last(handler.body)instanceof $B.ast.Return)){ -js+='$B.del_exc(frame)\n'}} -if(! has_untyped_except){ -js+=`}else{\nthrow ${err}\n`} -js+='}\n'} -if(has_else ||has_finally){js+='}\n' -js+='finally{\n' -var finalbody=`var exit = false\n`+ -`if($B.frames_stack.length < stack_length_${id}){\n`+ -`exit = true\n`+ -`$B.frames_stack.push(frame)\n`+ -`}\n`+ -add_body(this.finalbody,scopes) -if(this.finalbody.length > 0 && -!($B.last(this.finalbody)instanceof $B.ast.Return)){finalbody+=`\nif(exit){\n`+ -`$B.leave_frame()\n`+ -`}`} -var elsebody=`if($B.frames_stack.length == stack_length_${id} `+ -`&& ! failed${id}){\n`+ -add_body(this.orelse,scopes)+ -'\n}' -if(has_else && has_finally){js+=`try{\n`+ -elsebody+ -'\n}\n'+ -`finally{\n`+finalbody+'}\n'}else if(has_else && ! has_finally){js+=elsebody}else{js+=finalbody} -js+='\n}\n' }else{js+='}\n' } -scopes.pop() -return js} -$B.ast.TryStar.prototype.to_js=function(scopes){ -var id=$B.UUID(),has_except_handlers=this.handlers.length > 0,has_else=this.orelse.length > 0,has_finally=this.finalbody.length > 0 -var js=`$B.set_lineno(frame, ${this.lineno})\ntry{\n` -js+=`var stack_length_${id} = $B.frames_stack.length\n` -if(has_finally){js+=`var save_stack_${id} = $B.frames_stack.slice()\n`} -if(has_else){js+=`var failed${id} = false\n`} -var try_scope=copy_scope($B.last(scopes)) -scopes.push(try_scope) -js+=add_body(this.body,scopes)+'\n' -if(has_except_handlers){var err='err'+id -js+='}\n' -js+=`catch(${err}){\n`+ -`$B.set_exc(${err}, frame)\n`+ -`if(frame.$f_trace !== _b_.None){\n`+ -`frame.$f_trace = $B.trace_exception()\n`+ -`}\n`+ -`if(! _b_.isinstance(${err}, _b_.BaseExceptionGroup)){\n`+ -`${err} = _b_.BaseExceptionGroup.$factory(_b_.None, [${err}])\n`+ -'}\n'+ -`function fake_split(exc, condition){\n`+ -`return condition(exc) ? `+ -`$B.fast_tuple([exc, _b_.None]) : $B.fast_tuple([_b_.None, exc])\n`+ -'}\n' -if(has_else){js+=`failed${id} = true\n`} -var first=true,has_untyped_except=false -for(var handler of this.handlers){js+=`$B.set_lineno(frame, ${handler.lineno})\n` -if(handler.type){js+="var condition = function(exc){\n"+ -" return _b_.isinstance(exc, "+ -`${$B.js_from_ast(handler.type, scopes)})\n`+ -"}\n"+ -`var klass = $B.get_class(${err}),\n`+ -`split_method = $B.$getattr(klass, 'split'),\n`+ -`split = $B.$call(split_method)(${err}, condition),\n`+ -' matching = split[0],\n'+ -' rest = split[1]\n'+ -'if(matching.exceptions !== _b_.None){\n'+ -' for(var err of matching.exceptions){\n' -if(handler.name){bind(handler.name,scopes) -var mangled=mangle(scopes,try_scope,handler.name) -js+=`locals.${mangled} = ${err}\n`} -js+=add_body(handler.body,scopes)+'\n' -if(!($B.last(handler.body)instanceof $B.ast.Return)){ -js+='$B.del_exc(frame)\n'} -js+='}\n' -js+='}\n' -js+=`${err} = rest\n`}} -js+=`if(${err}.exceptions !== _b_.None){\n`+ -`throw ${err}\n`+ -'}\n'} -if(has_else ||has_finally){js+='}\n' -js+='finally{\n' -var finalbody=`var exit = false\n`+ -`if($B.frames_stack.length < stack_length_${id}){\n`+ -`exit = true\n`+ -`$B.frames_stack.push(frame)\n`+ -`}\n`+ -add_body(this.finalbody,scopes) -if(this.finalbody.length > 0 && -!($B.last(this.finalbody)instanceof $B.ast.Return)){finalbody+=`\nif(exit){\n`+ -`$B.leave_frame(locals)\n`+ -`}`} -var elsebody=`if($B.frames_stack.length == stack_length_${id} `+ -`&& ! failed${id}){\n`+ -add_body(this.orelse,scopes)+ -'\n}' -if(has_else && has_finally){js+=`try{\n`+ -elsebody+ -'\n}\n'+ -`finally{\n`+finalbody+'}\n'}else if(has_else && ! has_finally){js+=elsebody}else{js+=finalbody} -js+='\n}\n' }else{js+='}\n' } -scopes.pop() -return js} -$B.ast.Tuple.prototype.to_js=function(scopes){return list_or_tuple_to_js.bind(this)('$B.fast_tuple',scopes)} -$B.ast.TypeAlias.prototype.to_js=function(scopes){var value=this.value.to_js(scopes),type_params=this.type_params.map(x=> x.to_js(scopes)) -return `locals.${this.name.id} = $B.make_type_alias('${this.name.id}', `+ -`$B.fast_tuple([${type_params}]), ${value})\n`} -$B.ast.TypeVar.prototype.to_js=function(){return `$B.$call($B.imported.typing.TypeVar)('${this.name}')`} -$B.ast.UnaryOp.prototype.to_js=function(scopes){var operand=$B.js_from_ast(this.operand,scopes) -if(this.op instanceof $B.ast.Not){return `! $B.$bool(${operand})`} -if(typeof operand=="number" ||operand instanceof Number){if(this.op instanceof $B.ast.UAdd){return operand+''}else if(this.op instanceof $B.ast.USub){return-operand+''}} -var method=opclass2dunder[this.op.constructor.$name] -return `$B.$getattr($B.get_class(locals.$result = ${operand}), '${method}')(locals.$result)`} -$B.ast.While.prototype.to_js=function(scopes){var id=$B.UUID() -var scope=$B.last(scopes),new_scope=copy_scope(scope,this,id) -scopes.push(new_scope) -var js=`var no_break_${id} = true\n` -js+=`while($B.set_lineno(frame, ${this.lineno}) && `+ -`$B.$bool(${$B.js_from_ast(this.test, scopes)})){\n` -js+=add_body(this.body,scopes)+'\n}' -scopes.pop() -if(this.orelse.length > 0){js+=`\nif(no_break_${id}){\n`+ -add_body(this.orelse,scopes)+'}\n'} -return js} -var with_counter=[0] -$B.ast.With.prototype.to_js=function(scopes){ -function add_item(item,js){var id=$B.UUID() -var s=`var mgr_${id} = `+ -$B.js_from_ast(item.context_expr,scopes)+',\n'+ -`klass = $B.get_class(mgr_${id})\n`+ -`try{\n`+ -`var exit_${id} = $B.$getattr(klass, '__exit__'),\n`+ -`enter_${id} = $B.$getattr(klass, '__enter__')\n`+ -`}catch(err){\n`+ -`var klass_name = $B.class_name(mgr_${id})\n`+ -`throw _b_.TypeError.$factory("'" + klass_name + `+ -`"' object does not support the con`+ -`text manager protocol")\n`+ -`}\n`+ -`var value_${id} = $B.$call(enter_${id})(mgr_${id}),\n`+ -`exc_${id} = true\n` -if(in_generator){ -s+=`locals.$context_managers = locals.$context_managers || []\n`+ -`locals.$context_managers.push(mgr_${id})\n`} -s+='try{\ntry{\n' -if(item.optional_vars){var value={to_js:function(){return `value_${id}`}} -copy_position(value,_with) -var assign=new $B.ast.Assign([item.optional_vars],value) -copy_position(assign,_with) -s+=assign.to_js(scopes)+'\n'} -s+=js -s+=`}catch(err_${id}){\n`+ -`frame.$lineno = ${lineno}\n`+ -`exc_${id} = false\n`+ -`err_${id} = $B.exception(err_${id}, frame)\n`+ -`var $b = exit_${id}(mgr_${id}, err_${id}.__class__, `+ -`err_${id}, $B.$getattr(err_${id}, '__traceback__'))\n`+ -`if(! $B.$bool($b)){\n`+ -`throw err_${id}\n`+ -`}\n`+ -`}\n` -s+=`}\nfinally{\n`+ -`frame.$lineno = ${lineno}\n`+ -(in_generator ? `locals.$context_managers.pop()\n` :'')+ -`if(exc_${id}){\n`+ -`try{\n`+ -`exit_${id}(mgr_${id}, _b_.None, _b_.None, _b_.None)\n`+ -`}catch(err){\n`+ -`if($B.frames_stack.length < stack_length){\n`+ -`$B.frames_stack.push(frame)\n`+ -`}\n`+ -`throw err\n`+ -`}\n`+ -`}\n`+ -`}\n` -return s} -var _with=this,scope=last_scope(scopes),lineno=this.lineno -scope.needs_stack_length=true -js=add_body(this.body,scopes)+'\n' -var in_generator=scopes.symtable.table.blocks.get(fast_id(scope.ast)).generator -for(var item of this.items.slice().reverse()){js=add_item(item,js)} -return `$B.set_lineno(frame, ${this.lineno})\n`+js} -$B.ast.Yield.prototype.to_js=function(scopes){ -var scope=last_scope(scopes) -if(scope.type !='def'){compiler_error(this,"'yield' outside function")} -last_scope(scopes).is_generator=true -var value=this.value ? $B.js_from_ast(this.value,scopes):'_b_.None' -return `yield ${value}`} -$B.ast.YieldFrom.prototype.to_js=function(scopes){ -var scope=last_scope(scopes) -if(scope.type !='def'){compiler_error(this,"'yield' outside function")} -scope.is_generator=true -var value=$B.js_from_ast(this.value,scopes) -var n=$B.UUID() -return `yield* (function* f(){ - var _i${n} = _b_.iter(${value}), - _r${n} - var failed${n} = false - try{ - var _y${n} = _b_.next(_i${n}) - }catch(_e){ - $B.set_exc(_e, frame) - failed${n} = true - $B.pmframe = $B.last($B.frames_stack) - _e = $B.exception(_e) - if(_e.__class__ === _b_.StopIteration){ - var _r${n} = $B.$getattr(_e, "value") - }else{ - throw _e - } - } - if(! failed${n}){ - while(true){ - var failed1${n} = false - try{ - $B.leave_frame() - var _s${n} = yield _y${n} - $B.frames_stack.push(frame) - }catch(_e){ - $B.set_exc(_e, frame) - if(_e.__class__ === _b_.GeneratorExit){ - var failed2${n} = false - try{ - var _m${n} = $B.$getattr(_i${n}, "close") - }catch(_e1){ - failed2${n} = true - if(_e1.__class__ !== _b_.AttributeError){ - throw _e1 - } - } - if(! failed2${n}){ - $B.$call(_m${n})() - } - throw _e - }else if($B.is_exc(_e, [_b_.BaseException])){ - var sys_module = $B.imported._sys, - _x${n} = sys_module.exc_info() - var failed3${n} = false - try{ - var _m${n} = $B.$getattr(_i${n}, "throw") - }catch(err){ - failed3${n} = true - if($B.is_exc(err, [_b_.AttributeError])){ - throw err - } - } - if(! failed3${n}){ - try{ - _y${n} = $B.$call(_m${n}).apply(null, - _b_.list.$factory(_x${n})) - }catch(err){ - if($B.is_exc(err, [_b_.StopIteration])){ - _r${n} = $B.$getattr(err, "value") - break - } - throw err - } - } - } - } - if(! failed1${n}){ - try{ - if(_s${n} === _b_.None){ - _y${n} = _b_.next(_i${n}) - }else{ - _y${n} = $B.$call($B.$getattr(_i${n}, "send"))(_s${n}) - } - }catch(err){ - if($B.is_exc(err, [_b_.StopIteration])){ - _r${n} = $B.$getattr(err, "value") - break - } - throw err - } - } - } - } - return _r${n} - })()`} -var state={} -$B.js_from_root=function(arg){var ast_root=arg.ast,symtable=arg.symtable,filename=arg.filename -namespaces=arg.namespaces,imported=arg.imported -if($B.show_ast_dump){console.log($B.ast_dump(ast_root))} -if($B.compiler_check){$B.compiler_check(ast_root,symtable)} -var scopes=[] -state.filename=filename -scopes.symtable=symtable -scopes.filename=filename -scopes.namespaces=namespaces -scopes.imported=imported -scopes.imports={} -var js=ast_root.to_js(scopes) -return{js,imports:scopes.imports}} -$B.js_from_ast=function(ast,scopes){if(! scopes.symtable){throw Error('perdu symtable')} -var js='' -scopes=scopes ||[] -if(ast.to_js !==undefined){if(ast.col_offset===undefined){var klass=ast.constructor.$name -if(['match_case'].indexOf(klass)==-1){console.log('pas de col offset pour',klass) -console.log(ast) -throw Error('ccc') -alert()}} -return ast.to_js(scopes)} -console.log("unhandled",ast.constructor.$name,ast) -return '// unhandled class ast.'+ast.constructor.$name}})(__BRYTHON__) -; -(function($B){var _b_=$B.builtins -var GLOBAL_PARAM="name '%s' is parameter and global",NONLOCAL_PARAM="name '%s' is parameter and nonlocal",GLOBAL_AFTER_ASSIGN="name '%s' is assigned to before global declaration",NONLOCAL_AFTER_ASSIGN="name '%s' is assigned to before nonlocal declaration",GLOBAL_AFTER_USE="name '%s' is used prior to global declaration",NONLOCAL_AFTER_USE="name '%s' is used prior to nonlocal declaration",GLOBAL_ANNOT="annotated name '%s' can't be global",NONLOCAL_ANNOT="annotated name '%s' can't be nonlocal",IMPORT_STAR_WARNING="import * only allowed at module level",NAMED_EXPR_COMP_IN_CLASS= -"assignment expression within a comprehension cannot be used in a class body",NAMED_EXPR_COMP_CONFLICT= -"assignment expression cannot rebind comprehension iteration variable '%s'",NAMED_EXPR_COMP_INNER_LOOP_CONFLICT= -"comprehension inner loop cannot rebind assignment expression target '%s'",NAMED_EXPR_COMP_ITER_EXPR= -"assignment expression cannot be used in a comprehension iterable expression",ANNOTATION_NOT_ALLOWED= -"'%s' can not be used within an annotation",DUPLICATE_ARGUMENT="duplicate argument '%s' in function definition",TYPEVAR_BOUND_NOT_ALLOWED="'%s' can not be used within a TypeVar bound",TYPEALIAS_NOT_ALLOWED="'%s' can not be used within a type alias",TYPEPARAM_NOT_ALLOWED= -"'%s' can not be used within the definition of a generic",DUPLICATE_TYPE_PARAM="duplicate type parameter '%s'" -var DEF_GLOBAL=1, -DEF_LOCAL=2 , -DEF_PARAM=2<<1, -DEF_NONLOCAL=2<<2, -USE=2<<3 , -DEF_FREE=2<<4 , -DEF_FREE_CLASS=2<<5, -DEF_IMPORT=2<<6, -DEF_ANNOT=2<<7, -DEF_COMP_ITER=2<<8, -DEF_TYPE_PARAM=2<<9, -DEF_COMP_CELL=2<<10 -var DEF_BOUND=DEF_LOCAL |DEF_PARAM |DEF_IMPORT -var SCOPE_OFFSET=11,SCOPE_MASK=(DEF_GLOBAL |DEF_LOCAL |DEF_PARAM |DEF_NONLOCAL) -var LOCAL=1,GLOBAL_EXPLICIT=2,GLOBAL_IMPLICIT=3,FREE=4,CELL=5 -var GENERATOR=1,GENERATOR_EXPRESSION=2 -var CO_FUTURE_ANNOTATIONS=0x1000000 -var TYPE_CLASS=1,TYPE_FUNCTION=0,TYPE_MODULE=2 -var NULL=undefined -var ModuleBlock=2,ClassBlock=1,FunctionBlock=0,AnnotationBlock=4,TypeVarBoundBlock=5,TypeAliasBlock=6,TypeParamBlock=7 -var PyExc_SyntaxError=_b_.SyntaxError -function assert(test){if(! $B.$bool(test)){console.log('test fails',test) -throw Error('test fails')}} -function LOCATION(x){ -return[x.lineno,x.col_offset,x.end_lineno,x.end_col_offset]} -function ST_LOCATION(x){ -return[x.lineno,x.col_offset,x.end_lineno,x.end_col_offset]} -function _Py_Mangle(privateobj,ident){ -var result,nlen,plen,ipriv,maxchar; -if(privateobj==NULL ||! ident.startsWith('__')){return ident;} -nlen=ident.length -plen=privateobj.length -if(ident.endsWith('__')||ident.search(/\./)!=-1){return ident;} -ipriv=0; -while(privateobj[ipriv]=='_') -ipriv++; -if(ipriv==plen){return ident;} -var prefix=privateobj.substr(ipriv) -return '_'+prefix+ident} -var top=NULL,lambda=NULL,genexpr=NULL,listcomp=NULL,setcomp=NULL,dictcomp=NULL,__class__=NULL,_annotation=NULL -var NoComprehension=0,ListComprehension=1,DictComprehension=2,SetComprehension=3,GeneratorExpression=4 -var internals={} -function GET_IDENTIFIER(VAR){return VAR} -function Symtable(){this.filename=NULL; -this.stack=[] -this.blocks=new Map() -this.cur=NULL; -this.private=NULL;} -function id(obj){if(obj.$id !==undefined){return obj.$id} -return obj.$id=$B.UUID()} -function ste_new(st,name,block,key,lineno,col_offset,end_lineno,end_col_offset){var ste -ste={table:st,id:id(key), -name:name,directives:NULL,type:block,nested:0,free:0,varargs:0,varkeywords:0,opt_lineno:0,opt_col_offset:0,lineno:lineno,col_offset:col_offset,end_lineno:end_lineno,end_col_offset:end_col_offset} -if(st.cur !=NULL && -(st.cur.nested || -st.cur.type==FunctionBlock)){ste.nested=1;} -ste.child_free=0 -ste.generator=0 -ste.coroutine=0 -ste.comprehension=NoComprehension -ste.returns_value=0 -ste.needs_class_closure=0 -ste.comp_inlined=0 -ste.comp_iter_target=0 -ste.comp_iter_expr=0 -ste.symbols=$B.empty_dict() -ste.varnames=[] -ste.children=[] -st.blocks.set(ste.id,ste) -return ste} -$B._PySymtable_Build=function(mod,filename,future){var st=new Symtable(),seq -st.filename=filename; -st.future=future ||{} -st.type=TYPE_MODULE -if(!symtable_enter_block(st,'top',ModuleBlock,mod,0,0,0,0)){return NULL;} -st.top=st.cur -switch(mod.constructor){case $B.ast.Module: -seq=mod.body -for(var item of seq){visitor.stmt(st,item)} -break -case $B.ast.Expression: -visitor.expr(st,mod.body) -break -case $B.ast.Interactive: -seq=mod.body -for(var item of seq){visitor.stmt(st,item)} -break} -symtable_analyze(st) -return st.top;} -function PySymtable_Lookup(st,key){var v=st.blocks.get(key) -if(v){assert(PySTEntry_Check(v))} -return v} -function _PyST_GetSymbol(ste,name){if(! _b_.dict.$contains_string(ste.symbols,name)){return 0} -return _b_.dict.$getitem_string(ste.symbols,name)} -function _PyST_GetScope(ste,name){var symbol=_PyST_GetSymbol(ste,name); -return(symbol >> SCOPE_OFFSET)& SCOPE_MASK;} -function _PyST_IsFunctionLike(ste){return ste.type==FunctionBlock -||ste.type==TypeVarBoundBlock -||ste.type==TypeAliasBlock -||ste.type==TypeParamBlock;} -function PyErr_Format(exc_type,message,arg){if(arg){message=_b_.str.__mod__(message,arg)} -return exc_type.$factory(message)} -function PyErr_SetString(exc_type,message){return exc_type.$factory(message)} -function set_exc_info(exc,filename,lineno,offset,end_lineno,end_offset){exc.filename=filename -exc.lineno=lineno -exc.offset=offset+1 -exc.end_lineno=end_lineno -exc.end_offset=end_offset+1 -var src=$B.file_cache[filename] -if(src !==undefined){var lines=src.split('\n') -exc.text=lines[lineno-1]}else{exc.text=''} -exc.args[1]=[filename,exc.lineno,exc.offset,exc.text,exc.end_lineno,exc.end_offset]} -function error_at_directive(exc,ste,name){var data -assert(ste.directives) -for(var data of ste.directives){if(data[0]==name){set_exc_info(exc,ste.table.filename,data[1],data[2],data[3],data[4]) -return 0}} -PyErr_SetString(PyExc_RuntimeError,"BUG: internal directive bookkeeping broken") -return 0} -function SET_SCOPE(DICT,NAME,I){DICT[NAME]=I} -function is_free_in_any_child(entry,key){for(var child_ste of entry.ste_children){var scope=_PyST_GetScope(child_ste,key) -if(scope==FREE){return 1}} -return 0} -function inline_comprehension(ste,comp,scopes,comp_free,inlined_cells){var pos=0 -for(var item of _b_.dict.$iter_items_with_hash(comp.symbols)){ -var k=item.key,comp_flags=item.value; -if(comp_flags & DEF_PARAM){ -continue;} -var scope=(comp_flags >> SCOPE_OFFSET)& SCOPE_MASK; -var only_flags=comp_flags &((1 << SCOPE_OFFSET)-1) -if(scope==CELL ||only_flags & DEF_COMP_CELL){inlined_cells.add(k)} -var existing=_b_.dict.$contains_string(ste.symbols,k) -if(!existing){ -var v_flags=only_flags -_b_.dict.$setitem(ste.symbols,k,v_flags); -SET_SCOPE(scopes,k,scope);}else{ -if((existing & DEF_BOUND)&& -!is_free_in_any_child(comp,k)&& -ste.type !==ClassBlock){_b_.set.remove(comp_free,k)}}} -return 1;} -function analyze_name(ste,scopes,name,flags,bound,local,free,global,type_params,class_entry){if(flags & DEF_GLOBAL){if(flags & DEF_NONLOCAL){var exc=PyErr_Format(_b_.SyntaxError,"name '%s' is nonlocal and global",name) -error_at_directive(exc,ste,name) -throw exc} -SET_SCOPE(scopes,name,GLOBAL_EXPLICIT) -global.add(name) -if(bound){bound.delete(name)} -return 1} -if(flags & DEF_NONLOCAL){if(!bound){var exc=PyErr_Format(_b_.SyntaxError,"nonlocal declaration not allowed at module level"); -error_at_directive(exc,ste,name) -throw exc} -if(! bound.has(name)){var exc=PyErr_Format(_b_.SyntaxError,"no binding for nonlocal '%s' found",name) -error_at_directive(exc,ste,name) -throw exc} -if(type_params.has(name)){var exc=PyErr_Format(_b_.SyntaxError,"nonlocal binding not allowed for type parameter '%s'",name); -error_at_directive(exc,ste,name) -throw exc} -SET_SCOPE(scopes,name,FREE) -ste.free=1 -free.add(name) -return 1} -if(flags & DEF_BOUND){SET_SCOPE(scopes,name,LOCAL) -local.add(name) -global.delete(name) -if(flags & DEF_TYPE_PARAM){type_params.add(name)}else{type_params.delete(name)} -return 1} -if(class_entry !=NULL){var class_flags=_PyST_GetSymbol(class_entry,name); -if(class_flags & DEF_GLOBAL){SET_SCOPE(scopes,name,GLOBAL_EXPLICIT); -return 1;} -else if(class_flags & DEF_BOUND && !(class_flags & DEF_NONLOCAL)){SET_SCOPE(scopes,name,GLOBAL_IMPLICIT); -return 1;}} -if(bound && bound.has(name)){SET_SCOPE(scopes,name,FREE) -ste.free=1 -free.add(name) -return 1} -if(global && global.has(name)){SET_SCOPE(scopes,name,GLOBAL_IMPLICIT) -return 1} -if(ste.nested){ste.free=1} -SET_SCOPE(scopes,name,GLOBAL_IMPLICIT) -return 1} -var SET_SCOPE -function analyze_cells(scopes,free,inlined_cells){var name,v,v_cell; -var success=0,pos=0; -v_cell=CELL; -if(!v_cell){return 0;} -for(var name in scopes){v=scopes[name] -scope=v; -if(scope !=LOCAL){continue;} -if(free.has(name)&& ! inlined_cells.has(name)){continue;} -scopes[name]=v_cell -free.delete(name)} -return 1} -function drop_class_free(ste,free){var res=free.delete('__class__') -if(res){ste.needs_class_closure=1} -var res=free.delete('__classdict__') -if(res){ste.needs_class_classdict=1} -return 1} -function update_symbols(symbols,scopes,bound,free,inlined_cells,classflag){var name,itr,v,v_scope,v_new,v_free,pos=0 -for(var name of _b_.dict.$keys_string(symbols)){var flags=_b_.dict.$getitem_string(symbols,name) -if(inlined_cells.has(name)){flags |=DEF_COMP_CELL} -v_scope=scopes[name] -var scope=v_scope -flags |=(scope << SCOPE_OFFSET) -v_new=flags -if(!v_new){return 0;} -_b_.dict.$setitem_string(symbols,name,v_new)} -v_free=FREE << SCOPE_OFFSET -for(var name of free){v=_b_.dict.$get_string(symbols,name) -if(v !==_b_.dict.$missing){ -if(classflag && -v &(DEF_BOUND |DEF_GLOBAL)){var flags=v |DEF_FREE_CLASS; -v_new=flags; -if(! v_new){return 0;} -_b_.dict.$setitem_string(symbols,name,v_new)} -continue;} -if(bound && !bound.has(name)){continue;} -_b_.dict.$setitem_string(symbols,name,v_free)} -return 1} -function analyze_block(ste,bound,free,global,typeparams,class_entry){var name,v,local=NULL,scopes=NULL,newbound=NULL,newglobal=NULL,newfree=NULL,allfree=NULL,temp,i,success=0,pos=0; -local=new Set() -scopes={} -newglobal=new Set() -newfree=new Set() -newbound=new Set() -inlined_cells=new Set() -if(ste.type===ClassBlock){ -Set_Union(newglobal,global) -if(bound){Set_Union(newbound,bound)}} -for(var name of _b_.dict.$keys_string(ste.symbols)){var flags=_b_.dict.$getitem_string(ste.symbols,name) -if(!analyze_name(ste,scopes,name,flags,bound,local,free,global,typeparams,class_entry)){return 0}} -if(ste.type !=ClassBlock){ -if(_PyST_IsFunctionLike(ste)){Set_Union(newbound,local);} -if(bound){Set_Union(newbound,bound)} -Set_Union(newglobal,global);}else{ -newbound.add('__class__') -newbound.add('__classdict__')} -for(var c of ste.children){var child_free=new Set() -var entry=c -var new_class_entry=NULL; -if(entry.can_see_class_scope){if(ste.type==ClassBlock){new_class_entry=ste}else if(class_entry){new_class_entry=class_entry}} -var inline_comp=entry.comprehension && ! entry.generator; -if(! analyze_child_block(entry,newbound,newfree,newglobal,typeparams,new_class_entry,child_free)){return 0} -if(inline_comp){if(! inline_comprehension(ste,entry,scopes,child_free,inlined_cells)){error();} -entry.comp_inlined=1;} -Set_Union(newfree,child_free); -if(entry.free ||entry.child_free){ste.child_free=1}} -for(var i=ste.children.length-1;i >=0;i--){var entry=ste.children[i]; -if(entry.comp_inlined){ste.children.splice(i,0,...entry.children)}} -if(_PyST_IsFunctionLike(ste)&& !analyze_cells(scopes,newfree,inlined_cells)){return 0}else if(ste.type===ClassBlock && !drop_class_free(ste,newfree)){return 0} -if(!update_symbols(ste.symbols,scopes,bound,newfree,inlined_cells,ste.type===ClassBlock ||ste.can_see_class_scope)){return 0} -Set_Union(free,newfree) -success=1 -return success} -function PySet_New(arg){if(arg===NULL){return new Set()} -return new Set(arg)} -function Set_Union(setA,setB){for(let elem of setB){setA.add(elem)}} -function analyze_child_block(entry,bound,free,global,typeparams,class_entry,child_free){ -var temp_bound=PySet_New(bound),temp_free=PySet_New(free),temp_global=PySet_New(global),temp_typeparams=PySet_New(typeparams) -if(!analyze_block(entry,temp_bound,temp_free,temp_global,temp_typeparams,class_entry)){return 0} -Set_Union(child_free,temp_free); -return 1;} -function symtable_analyze(st){var free=new Set(),global=new Set(),typeparams=new Set() -return analyze_block(st.top,NULL,free,global,typeparams,NULL);} -function symtable_exit_block(st){var size=st.stack.length -st.cur=NULL; -if(size){st.stack.pop() -if(--size){st.cur=st.stack[size-1]}} -return 1} -function symtable_enter_block(st,name,block,ast,lineno,col_offset,end_lineno,end_col_offset){var prev -if(ast===undefined){console.log('call ste new, key undef',st,name)} -var ste=ste_new(st,name,block,ast,lineno,col_offset,end_lineno,end_col_offset) -st.stack.push(ste) -prev=st.cur -if(prev){ste.comp_iter_expr=prev.comp_iter_expr} -st.cur=ste -if(block===AnnotationBlock){return 1} -if(block===ModuleBlock){st.global=st.cur.symbols} -if(prev){prev.children.push(ste)} -return 1;} -function symtable_lookup(st,name){var mangled=_Py_Mangle(st.private,name) -if(!mangled){return 0;} -var ret=_PyST_GetSymbol(st.cur,mangled) -return ret;} -function symtable_add_def_helper(st,name,flag,ste,_location){var o,dict,val,mangled=_Py_Mangle(st.private,name) -if(!mangled){return 0} -dict=ste.symbols -if(_b_.dict.$contains_string(dict,mangled)){o=_b_.dict.$getitem_string(dict,mangled) -val=o -if((flag & DEF_PARAM)&&(val & DEF_PARAM)){ -var exc=PyErr_Format(_b_.SyntaxError,DUPLICATE_ARGUMENT,name); -set_exc_info(exc,st.filename,..._location) -throw exc} -if((flag & DEF_TYPE_PARAM)&&(val & DEF_TYPE_PARAM)){var exc=PyErr_Format(_b_.SyntaxError,DUPLICATE_TYPE_PARAM,name); -set_exc_info(exc,st.filename,...location); -throw exc} -val |=flag}else{val=flag} -if(ste.comp_iter_target){ -if(val &(DEF_GLOBAL |DEF_NONLOCAL)){var exc=PyErr_Format(_b_.SyntaxError,NAMED_EXPR_COMP_INNER_LOOP_CONFLICT,name); -set_exc_info(exc,st.filename,..._location) -throw exc} -val |=DEF_COMP_ITER} -o=val -if(o==NULL){return 0} -_b_.dict.$setitem(dict,mangled,o) -if(flag & DEF_PARAM){ste.varnames.push(mangled)}else if(flag & DEF_GLOBAL){ -val=flag -if(st.global.hasOwnProperty(mangled)){ -val |=st.global[mangled]} -o=val -if(o==NULL){return 0} -st.global[mangled]=o} -return 1} -function symtable_add_def(st,name,flag,_location){return symtable_add_def_helper(st,name,flag,st.cur,_location);} -function symtable_enter_type_param_block(st,name,ast,has_defaults,has_kwdefaults,kind,_location){var prev=st.cur,current_type=st.cur.type; -if(!symtable_enter_block(st,name,TypeParamBlock,ast,..._location)){return 0;} -prev.$type_param=st.cur -if(current_type===ClassBlock){st.cur.can_see_class_scope=1; -if(!symtable_add_def(st,"__classdict__",USE,_location)){return 0;}} -if(kind==$B.ast.ClassDef){ -if(!symtable_add_def(st,"type_params",DEF_LOCAL,_location)){return 0;} -if(!symtable_add_def(st,"type_params",USE,_location)){return 0;} -st.st_private=name; -var generic_base=".generic_base"; -if(!symtable_add_def(st,generic_base,DEF_LOCAL,_location)){return 0;} -if(!symtable_add_def(st,generic_base,USE,_location)){return 0;}} -if(has_defaults){var defaults=".defaults"; -if(!symtable_add_def(st,defaults,DEF_PARAM,_location)){return 0;}} -if(has_kwdefaults){var kwdefaults=".kwdefaults"; -if(!symtable_add_def(st,kwdefaults,DEF_PARAM,_location)){return 0;}} -return 1;} -function VISIT_QUIT(ST,X){return X} -function VISIT(ST,TYPE,V){var f=visitor[TYPE] -if(!f(ST,V)){VISIT_QUIT(ST,0);}} -function VISIT_SEQ(ST,TYPE,SEQ){for(var elt of SEQ){if(! visitor[TYPE](ST,elt)){VISIT_QUIT(ST,0)}}} -function VISIT_SEQ_TAIL(ST,TYPE,SEQ,START){for(var i=START,len=SEQ.length;i < len;i++){var elt=SEQ[i]; -if(! visitor[TYPE](ST,elt)){VISIT_QUIT(ST,0)}}} -function VISIT_SEQ_WITH_NULL(ST,TYPE,SEQ){for(var elt of SEQ){if(! elt){continue } -if(! visitor[TYPE](ST,elt)){VISIT_QUIT((ST),0)}}} -function symtable_record_directive(st,name,lineno,col_offset,end_lineno,end_col_offset){var data,mangled,res; -if(!st.cur.directives){st.cur.directives=[]} -mangled=_Py_Mangle(st.private,name); -if(!mangled){return 0;} -data=$B.fast_tuple([mangled,lineno,col_offset,end_lineno,end_col_offset]) -st.cur.directives.push(data); -return true} -function has_kwonlydefaults(kwonlyargs,kw_defaults){for(var i=0,len=kwonlyargs.length;i < len;i++){if(kw_defaults[i]){return 1;}} -return 0;} -var visitor={} -visitor.stmt=function(st,s){switch(s.constructor){case $B.ast.FunctionDef: -if(!symtable_add_def(st,s.name,DEF_LOCAL,LOCATION(s))) -VISIT_QUIT(st,0) -if(s.args.defaults) -VISIT_SEQ(st,expr,s.args.defaults) -if(s.args.kw_defaults) -VISIT_SEQ_WITH_NULL(st,expr,s.args.kw_defaults) -if(s.type_params.length > 0){if(!symtable_enter_type_param_block( -st,s.name,s.type_params,s.args.defaults !=NULL,has_kwonlydefaults(s.args.kwonlyargs,s.args.kw_defaults),s.constructor,LOCATION(s))){VISIT_QUIT(st,0);} -VISIT_SEQ(st,type_param,s.type_params);} -if(!visitor.annotations(st,s,s.args,s.returns)) -VISIT_QUIT(st,0) -if(s.decorator_list){VISIT_SEQ(st,expr,s.decorator_list)} -if(!symtable_enter_block(st,s.name,FunctionBlock,s,...LOCATION(s))){VISIT_QUIT(st,0)} -VISIT(st,'arguments',s.args) -VISIT_SEQ(st,stmt,s.body) -if(!symtable_exit_block(st)){VISIT_QUIT(st,0)} -break; -case $B.ast.ClassDef: -var tmp; -if(!symtable_add_def(st,s.name,DEF_LOCAL,LOCATION(s))) -VISIT_QUIT(st,0) -VISIT_SEQ(st,expr,s.bases) -VISIT_SEQ(st,keyword,s.keywords) -if(s.decorator_list) -VISIT_SEQ(st,expr,s.decorator_list); -if(s.type_params.length > 0){if(!symtable_enter_type_param_block(st,s.name,s.type_params,false,false,s.constructor,LOCATION(s))){VISIT_QUIT(st,0);} -VISIT_SEQ(st,type_param,s.type_params);} -VISIT_SEQ(st,expr,s.bases); -VISIT_SEQ(st,keyword,s.keywords); -if(!symtable_enter_block(st,s.name,ClassBlock,s,s.lineno,s.col_offset,s.end_lineno,s.end_col_offset)) -VISIT_QUIT(st,0) -tmp=st.private -st.private=s.name -if(s.type_params.length > 0){if(!symtable_add_def(st,'__type_params__',DEF_LOCAL,LOCATION(s))){VISIT_QUIT(st,0);} -var type_params=".type_params" -if(!symtable_add_def(st,'type_params',USE,LOCATION(s))){VISIT_QUIT(st,0);}} -VISIT_SEQ(st,stmt,s.body) -st.private=tmp -if(! symtable_exit_block(st)) -VISIT_QUIT(st,0) -if(s.type_params.length > 0){if(!symtable_exit_block(st)) -VISIT_QUIT(st,0);} -break -case $B.ast.TypeAlias: -VISIT(st,expr,s.name); -assert(s.name instanceof $B.ast.Name); -var name=s.name.id,is_in_class=st.cur.type===ClassBlock,is_generic=s.type_params.length > 0 -if(is_generic){if(!symtable_enter_type_param_block( -st,name,s.type_params,false,false,s.kind,LOCATION(s))){VISIT_QUIT(st,0);} -VISIT_SEQ(st,type_param,s.type_params);} -if(!symtable_enter_block(st,name,TypeAliasBlock,s,LOCATION(s))){VISIT_QUIT(st,0);} -st.cur.can_see_class_scope=is_in_class; -if(is_in_class && !symtable_add_def(st,'__classdict__',USE,LOCATION(s.value))){VISIT_QUIT(st,0);} -VISIT(st,expr,s.value); -if(!symtable_exit_block(st)){VISIT_QUIT(st,0);} -if(is_generic){if(!symtable_exit_block(st)) -VISIT_QUIT(st,0);} -break -case $B.ast.Return: -if(s.value){VISIT(st,expr,s.value) -st.cur.returns_value=1} -break -case $B.ast.Delete: -VISIT_SEQ(st,expr,s.targets) -break -case $B.ast.Assign: -VISIT_SEQ(st,expr,s.targets) -VISIT(st,expr,s.value) -break -case $B.ast.AnnAssign: -if(s.target instanceof $B.ast.Name){var e_name=s.target -var cur=symtable_lookup(st,e_name.id) -if(cur < 0){VISIT_QUIT(st,0)} -if((cur &(DEF_GLOBAL |DEF_NONLOCAL)) -&&(st.cur.symbols !=st.global) -&& s.simple){var exc=PyErr_Format(_b_.SyntaxError,cur & DEF_GLOBAL ? GLOBAL_ANNOT :NONLOCAL_ANNOT,e_name.id) -exc.args[1]=[st.filename,s.lineno,s.col_offset+1,s.end_lineno,s.end_col_offset+1] -throw exc} -if(s.simple && -! symtable_add_def(st,e_name.id,DEF_ANNOT |DEF_LOCAL,LOCATION(e_name))){VISIT_QUIT(st,0)}else{if(s.value -&& !symtable_add_def(st,e_name.id,DEF_LOCAL,LOCATION(e_name))){VISIT_QUIT(st,0)}}}else{VISIT(st,expr,s.target)} -if(!visitor.annotation(st,s.annotation)){VISIT_QUIT(st,0)} -if(s.value){VISIT(st,expr,s.value)} -break -case $B.ast.AugAssign: -VISIT(st,expr,s.target) -VISIT(st,expr,s.value) -break -case $B.ast.For: -VISIT(st,expr,s.target) -VISIT(st,expr,s.iter) -VISIT_SEQ(st,stmt,s.body) -if(s.orelse){VISIT_SEQ(st,stmt,s.orelse)} -break -case $B.ast.While: -VISIT(st,expr,s.test) -VISIT_SEQ(st,stmt,s.body) -if(s.orelse){VISIT_SEQ(st,stmt,s.orelse)} -break -case $B.ast.If: -VISIT(st,expr,s.test) -VISIT_SEQ(st,stmt,s.body) -if(s.orelse){VISIT_SEQ(st,stmt,s.orelse)} -break -case $B.ast.Match: -VISIT(st,expr,s.subject) -VISIT_SEQ(st,match_case,s.cases) -break -case $B.ast.Raise: -if(s.exc){VISIT(st,expr,s.exc) -if(s.cause){VISIT(st,expr,s.cause)}} -break -case $B.ast.Try: -VISIT_SEQ(st,stmt,s.body) -VISIT_SEQ(st,stmt,s.orelse) -VISIT_SEQ(st,excepthandler,s.handlers) -VISIT_SEQ(st,stmt,s.finalbody) -break -case $B.ast.TryStar: -VISIT_SEQ(st,stmt,s.body) -VISIT_SEQ(st,stmt,s.orelse) -VISIT_SEQ(st,excepthandler,s.handlers) -VISIT_SEQ(st,stmt,s.finalbody) -break -case $B.ast.Assert: -VISIT(st,expr,s.test) -if(s.msg){VISIT(st,expr,s.msg);} -break -case $B.ast.Import: -VISIT_SEQ(st,alias,s.names) -break -case $B.ast.ImportFrom: -VISIT_SEQ(st,alias,s.names) -break -case $B.ast.Global: -var seq=s.names -for(var name of seq){var cur=symtable_lookup(st,name) -if(cur < 0){VISIT_QUIT(st,0)} -if(cur &(DEF_PARAM |DEF_LOCAL |USE |DEF_ANNOT)){var msg -if(cur & DEF_PARAM){msg=GLOBAL_PARAM}else if(cur & USE){msg=GLOBAL_AFTER_USE}else if(cur & DEF_ANNOT){msg=GLOBAL_ANNOT}else{ -msg=GLOBAL_AFTER_ASSIGN} -var exc=PyErr_Format(_b_.SyntaxError,msg,name) -set_exc_info(exc,st.filename,s.lineno,s.col_offset,s.end_lineno,s.end_col_offset) -throw exc} -if(! symtable_add_def(st,name,DEF_GLOBAL,LOCATION(s))) -VISIT_QUIT(st,0) -if(! symtable_record_directive(st,name,s.lineno,s.col_offset,s.end_lineno,s.end_col_offset)) -VISIT_QUIT(st,0)} -break -case $B.ast.Nonlocal: -var seq=s.names; -for(var name of seq){var cur=symtable_lookup(st,name) -if(cur < 0){VISIT_QUIT(st,0)} -if(cur &(DEF_PARAM |DEF_LOCAL |USE |DEF_ANNOT)){var msg -if(cur & DEF_PARAM){msg=NONLOCAL_PARAM}else if(cur & USE){msg=NONLOCAL_AFTER_USE}else if(cur & DEF_ANNOT){msg=NONLOCAL_ANNOT}else{ -msg=NONLOCAL_AFTER_ASSIGN} -var exc=PyErr_Format(_b_.SyntaxError,msg,name) -set_exc_info(exc,st.filename,s.lineno,s.col_offset,s.end_lineno,s.end_col_offset) -throw exc} -if(!symtable_add_def(st,name,DEF_NONLOCAL,LOCATION(s))) -VISIT_QUIT(st,0) -if(!symtable_record_directive(st,name,s.lineno,s.col_offset,s.end_lineno,s.end_col_offset)) -VISIT_QUIT(st,0)} -break -case $B.ast.Expr: -VISIT(st,expr,s.value) -break -case $B.ast.Pass: -case $B.ast.Break: -case $B.ast.Continue: -break -case $B.ast.With: -VISIT_SEQ(st,'withitem',s.items) -VISIT_SEQ(st,stmt,s.body) -break -case $B.ast.AsyncFunctionDef: -if(!symtable_add_def(st,s.name,DEF_LOCAL,LOCATION(s))) -VISIT_QUIT(st,0) -if(s.args.defaults) -VISIT_SEQ(st,expr,s.args.defaults) -if(s.args.kw_defaults) -VISIT_SEQ_WITH_NULL(st,expr,s.args.kw_defaults) -if(!visitor.annotations(st,s,s.args,s.returns)) -VISIT_QUIT(st,0) -if(s.decorator_list) -VISIT_SEQ(st,expr,s.decorator_list) -if(s.type_params.length > 0){if(!symtable_enter_type_param_block( -st,s.name,s.type_params,s.args.defaults !=NULL,has_kwonlydefaults(s.args.kwonlyargs,s.args.kw_defaults),s.constructor,LOCATION(s))){VISIT_QUIT(st,0);} -VISIT_SEQ(st,type_param,s.type_params);} -if(!visitor.annotations(st,s,s.args,s.returns)) -VISIT_QUIT(st,0); -if(!symtable_enter_block(st,s.name,FunctionBlock,s,s.lineno,s.col_offset,s.end_lineno,s.end_col_offset)) -VISIT_QUIT(st,0) -st.cur.coroutine=1 -VISIT(st,'arguments',s.args) -VISIT_SEQ(st,stmt,s.body) -if(! symtable_exit_block(st)) -VISIT_QUIT(st,0) -if(s.type_params.length > 0){if(!symtable_exit_block(st)) -VISIT_QUIT(st,0);} -break -case $B.ast.AsyncWith: -VISIT_SEQ(st,withitem,s.items) -VISIT_SEQ(st,stmt,s.body) -break -case $B.ast.AsyncFor: -VISIT(st,expr,s.target) -VISIT(st,expr,s.iter) -VISIT_SEQ(st,stmt,s.body) -if(s.orelse){VISIT_SEQ(st,stmt,s.orelse)} -break -default: -console.log('unhandled',s) -break} -VISIT_QUIT(st,1)} -function symtable_extend_namedexpr_scope(st,e){assert(st.stack); -assert(e instanceof $B.ast.Name); -var target_name=e.id; -var i,size,ste; -size=st.stack.length -assert(size); -for(i=size-1;i >=0;i--){ste=st.stack[i] -if(ste.comprehension){var target_in_scope=_PyST_GetSymbol(ste,target_name); -if(target_in_scope & DEF_COMP_ITER){var exc=PyErr_Format(_b_.SyntaxError,NAMED_EXPR_COMP_CONFLICT,target_name); -set_exc_info(exc,st.filename,e.lineno,e.col_offset,e.ed_lineno,e.end_col_offset) -throw exc} -continue;} -if(_PyST_IsFunctionLike(ste)){var target_in_scope=_PyST_GetSymbol(ste,target_name); -if(target_in_scope & DEF_GLOBAL){if(!symtable_add_def(st,target_name,DEF_GLOBAL,LOCATION(e))) -VISIT_QUIT(st,0);}else{ -if(!symtable_add_def(st,target_name,DEF_NONLOCAL,LOCATION(e))) -VISIT_QUIT(st,0);} -if(!symtable_record_directive(st,target_name,LOCATION(e))) -VISIT_QUIT(st,0); -return symtable_add_def_helper(st,target_name,DEF_LOCAL,ste,LOCATION(e));} -if(ste.type==ModuleBlock){if(!symtable_add_def(st,target_name,DEF_GLOBAL,LOCATION(e))) -VISIT_QUIT(st,0); -if(!symtable_record_directive(st,target_name,LOCATION(e))) -VISIT_QUIT(st,0); -return symtable_add_def_helper(st,target_name,DEF_GLOBAL,ste,LOCATION(e));} -if(ste.type==ClassBlock){var exc=PyErr_Format(_b_.SyntaxError,NAMED_EXPR_COMP_IN_CLASS); -set_exc_info(exc,st.filename,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset); -throw exc}} -assert(0); -return 0;} -function symtable_handle_namedexpr(st,e){if(st.cur.comp_iter_expr > 0){ -var exc=PyErr_Format(PyExc_SyntaxError,NAMED_EXPR_COMP_ITER_EXPR); -set_exc_info(exc,st.filename,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset); -throw exc} -if(st.cur.comprehension){ -if(!symtable_extend_namedexpr_scope(st,e.target)) -return 0;} -VISIT(st,expr,e.value); -VISIT(st,expr,e.target); -return 1;} -const alias='alias',comprehension='comprehension',excepthandler='excepthandler',expr='expr',keyword='keyword',match_case='match_case',pattern='pattern',stmt='stmt',type_param='type_param',withitem='withitem' -visitor.expr=function(st,e){switch(e.constructor){case $B.ast.NamedExpr: -if(!symtable_raise_if_annotation_block(st,"named expression",e)){VISIT_QUIT(st,0);} -if(!symtable_handle_namedexpr(st,e)) -VISIT_QUIT(st,0); -break; -case $B.ast.BoolOp: -VISIT_SEQ(st,'expr',e.values); -break; -case $B.ast.BinOp: -VISIT(st,'expr',e.left); -VISIT(st,'expr',e.right); -break; -case $B.ast.UnaryOp: -VISIT(st,'expr',e.operand); -break; -case $B.ast.Lambda:{if(!GET_IDENTIFIER('lambda')) -VISIT_QUIT(st,0); -if(e.args.defaults) -VISIT_SEQ(st,'expr',e.args.defaults); -if(e.args.kw_defaults) -VISIT_SEQ_WITH_NULL(st,'expr',e.args.kw_defaults); -if(!symtable_enter_block(st,lambda,FunctionBlock,e,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset)) -VISIT_QUIT(st,0); -VISIT(st,'arguments',e.args); -VISIT(st,'expr',e.body); -if(!symtable_exit_block(st)) -VISIT_QUIT(st,0); -break;} -case $B.ast.IfExp: -VISIT(st,'expr',e.test); -VISIT(st,'expr',e.body); -VISIT(st,'expr',e.orelse); -break; -case $B.ast.Dict: -VISIT_SEQ_WITH_NULL(st,'expr',e.keys); -VISIT_SEQ(st,'expr',e.values); -break; -case $B.ast.Set: -VISIT_SEQ(st,'expr',e.elts); -break; -case $B.ast.GeneratorExp: -if(!visitor.genexp(st,e)) -VISIT_QUIT(st,0); -break; -case $B.ast.ListComp: -if(!visitor.listcomp(st,e)) -VISIT_QUIT(st,0); -break; -case $B.ast.SetComp: -if(!visitor.setcomp(st,e)) -VISIT_QUIT(st,0); -break; -case $B.ast.DictComp: -if(!visitor.dictcomp(st,e)) -VISIT_QUIT(st,0); -break; -case $B.ast.Yield: -if(!symtable_raise_if_annotation_block(st,"yield expression",e)){VISIT_QUIT(st,0);} -if(e.value) -VISIT(st,'expr',e.value); -st.cur.generator=1; -if(st.cur.comprehension){return symtable_raise_if_comprehension_block(st,e);} -break; -case $B.ast.YieldFrom: -if(!symtable_raise_if_annotation_block(st,"yield expression",e)){VISIT_QUIT(st,0);} -VISIT(st,'expr',e.value); -st.cur.generator=1; -if(st.cur.comprehension){return symtable_raise_if_comprehension_block(st,e);} -break; -case $B.ast.Await: -if(!symtable_raise_if_annotation_block(st,"await expression",e)){VISIT_QUIT(st,0);} -VISIT(st,'expr',e.value); -st.cur.coroutine=1; -break; -case $B.ast.Compare: -VISIT(st,'expr',e.left); -VISIT_SEQ(st,'expr',e.comparators); -break; -case $B.ast.Call: -VISIT(st,'expr',e.func); -VISIT_SEQ(st,'expr',e.args); -VISIT_SEQ_WITH_NULL(st,'keyword',e.keywords); -break; -case $B.ast.FormattedValue: -VISIT(st,'expr',e.value); -if(e.format_spec) -VISIT(st,'expr',e.format_spec); -break; -case $B.ast.JoinedStr: -VISIT_SEQ(st,'expr',e.values); -break; -case $B.ast.Constant: -break; -case $B.ast.Attribute: -VISIT(st,'expr',e.value); -break; -case $B.ast.Subscript: -VISIT(st,'expr',e.value); -VISIT(st,'expr',e.slice); -break; -case $B.ast.Starred: -VISIT(st,'expr',e.value); -break; -case $B.ast.Slice: -if(e.lower) -VISIT(st,expr,e.lower) -if(e.upper) -VISIT(st,expr,e.upper) -if(e.step) -VISIT(st,expr,e.step) -break; -case $B.ast.Name: -var flag=e.ctx instanceof $B.ast.Load ? USE :DEF_LOCAL -if(! symtable_add_def(st,e.id,flag,LOCATION(e))) -VISIT_QUIT(st,0); -if(e.ctx instanceof $B.ast.Load && -_PyST_IsFunctionLike(st.cur)&& -e.id=="super"){if(!GET_IDENTIFIER('__class__')|| -!symtable_add_def(st,'__class__',USE,LOCATION(e))) -VISIT_QUIT(st,0);} -break; -case $B.ast.List: -VISIT_SEQ(st,expr,e.elts); -break; -case $B.ast.Tuple: -VISIT_SEQ(st,expr,e.elts); -break;} -VISIT_QUIT(st,1);} -visitor.type_param=function(st,tp){switch(tp.constructor){case $B.ast.TypeVar: -if(!symtable_add_def(st,tp.name,DEF_TYPE_PARAM |DEF_LOCAL,LOCATION(tp))) -VISIT_QUIT(st,0); -if(tp.bound){var is_in_class=st.cur.can_see_class_scope; -if(!symtable_enter_block(st,tp.name,TypeVarBoundBlock,tp,LOCATION(tp))) -VISIT_QUIT(st,0); -st.cur.can_see_class_scope=is_in_class; -if(is_in_class && !symtable_add_def(st,"__classdict__",USE,LOCATION(tp.bound))){VISIT_QUIT(st,0);} -VISIT(st,expr,tp.bound); -if(!symtable_exit_block(st)) -VISIT_QUIT(st,0);} -break; -case $B.ast.TypeVarTuple: -if(!symtable_add_def(st,tp.name,DEF_TYPE_PARAM |DEF_LOCAL,LOCATION(tp))) -VISIT_QUIT(st,0); -break; -case $B.ast.ParamSpec: -if(!symtable_add_def(st,tp.name,DEF_TYPE_PARAM |DEF_LOCAL,LOCATION(tp))) -VISIT_QUIT(st,0); -break;} -VISIT_QUIT(st,1);} -visitor.pattern=function(st,p){switch(p.constructor){case $B.ast.MatchValue: -VISIT(st,expr,p.value); -break; -case $B.ast.MatchSingleton: -break; -case $B.ast.MatchSequence: -VISIT_SEQ(st,pattern,p.patterns); -break; -case $B.ast.MatchStar: -if(p.name){symtable_add_def(st,p.name,DEF_LOCAL,LOCATION(p));} -break; -case $B.ast.MatchMapping: -VISIT_SEQ(st,expr,p.keys); -VISIT_SEQ(st,pattern,p.patterns); -if(p.rest){symtable_add_def(st,p.rest,DEF_LOCAL,LOCATION(p));} -break; -case $B.ast.MatchClass: -VISIT(st,expr,p.cls); -VISIT_SEQ(st,pattern,p.patterns); -VISIT_SEQ(st,pattern,p.kwd_patterns); -break; -case $B.ast.MatchAs: -if(p.pattern){VISIT(st,pattern,p.pattern);} -if(p.name){symtable_add_def(st,p.name,DEF_LOCAL,LOCATION(p));} -break; -case $B.ast.MatchOr: -VISIT_SEQ(st,pattern,p.patterns); -break;} -VISIT_QUIT(st,1);} -function symtable_implicit_arg(st,pos){var id='.'+pos -if(!symtable_add_def(st,id,DEF_PARAM,ST_LOCATION(st.cur))){return 0;} -return 1;} -visitor.params=function(st,args){var i; -if(!args) -return-1; -for(var arg of args){if(!symtable_add_def(st,arg.arg,DEF_PARAM,LOCATION(arg))) -return 0;} -return 1;} -visitor.annotation=function(st,annotation){var future_annotations=st.future.features & CO_FUTURE_ANNOTATIONS; -if(future_annotations && -!symtable_enter_block(st,'_annotation',AnnotationBlock,annotation,annotation.lineno,annotation.col_offset,annotation.end_lineno,annotation.end_col_offset)){VISIT_QUIT(st,0);} -VISIT(st,expr,annotation); -if(future_annotations && !symtable_exit_block(st)){VISIT_QUIT(st,0);} -return 1;} -visitor.argannotations=function(st,args){var i; -if(!args) -return-1; -for(var arg of args){if(arg.annotation) -VISIT(st,expr,arg.annotation);} -return 1;} -visitor.annotations=function(st,o,a,returns){var future_annotations=st.future.ff_features & CO_FUTURE_ANNOTATIONS; -if(future_annotations && -!symtable_enter_block(st,'_annotation',AnnotationBlock,o,o.lineno,o.col_offset,o.end_lineno,o.end_col_offset)){VISIT_QUIT(st,0);} -if(a.posonlyargs && !visitor.argannotations(st,a.posonlyargs)) -return 0; -if(a.args && !visitor.argannotations(st,a.args)) -return 0; -if(a.vararg && a.vararg.annotation) -VISIT(st,expr,a.vararg.annotation); -if(a.kwarg && a.kwarg.annotation) -VISIT(st,expr,a.kwarg.annotation); -if(a.kwonlyargs && !visitor.argannotations(st,a.kwonlyargs)) -return 0; -if(future_annotations && !symtable_exit_block(st)){VISIT_QUIT(st,0);} -if(returns && !visitor.annotation(st,returns)){VISIT_QUIT(st,0);} -return 1;} -visitor.arguments=function(st,a){ -if(a.posonlyargs && !visitor.params(st,a.posonlyargs)) -return 0; -if(a.args && !visitor.params(st,a.args)) -return 0; -if(a.kwonlyargs && !visitor.params(st,a.kwonlyargs)) -return 0; -if(a.vararg){if(!symtable_add_def(st,a.vararg.arg,DEF_PARAM,LOCATION(a.vararg))) -return 0; -st.cur.varargs=1;} -if(a.kwarg){if(!symtable_add_def(st,a.kwarg.arg,DEF_PARAM,LOCATION(a.kwarg))) -return 0; -st.cur.varkeywords=1;} -return 1;} -visitor.excepthandler=function(st,eh){if(eh.type) -VISIT(st,expr,eh.type); -if(eh.name) -if(!symtable_add_def(st,eh.name,DEF_LOCAL,LOCATION(eh))) -return 0; -VISIT_SEQ(st,stmt,eh.body); -return 1;} -visitor.withitem=function(st,item){VISIT(st,'expr',item.context_expr); -if(item.optional_vars){VISIT(st,'expr',item.optional_vars);} -return 1;} -visitor.match_case=function(st,m){VISIT(st,pattern,m.pattern); -if(m.guard){VISIT(st,expr,m.guard);} -VISIT_SEQ(st,stmt,m.body); -return 1;} -visitor.alias=function(st,a){ -var store_name,name=(a.asname==NULL)? a.name :a.asname; -var dot=name.search('\\.'); -if(dot !=-1){store_name=name.substring(0,dot); -if(!store_name) -return 0;}else{store_name=name;} -if(name !="*"){var r=symtable_add_def(st,store_name,DEF_IMPORT,LOCATION(a)); -return r;}else{if(st.cur.type !=ModuleBlock){var lineno=a.lineno,col_offset=a.col_offset,end_lineno=a.end_lineno,end_col_offset=a.end_col_offset; -var exc=PyErr_SetString(PyExc_SyntaxError,IMPORT_STAR_WARNING); -set_exc_info(exc,st.filename,lineno,col_offset,end_lineno,end_col_offset); -throw exc} -st.cur.$has_import_star=true -return 1;}} -visitor.comprehension=function(st,lc){st.cur.comp_iter_target=1; -VISIT(st,expr,lc.target); -st.cur.comp_iter_target=0; -st.cur.comp_iter_expr++; -VISIT(st,expr,lc.iter); -st.cur.comp_iter_expr--; -VISIT_SEQ(st,expr,lc.ifs); -if(lc.is_async){st.cur.coroutine=1;} -return 1;} -visitor.keyword=function(st,k){VISIT(st,expr,k.value); -return 1;} -function symtable_handle_comprehension(st,e,scope_name,generators,elt,value){var is_generator=(e.constructor===$B.ast.GeneratorExp); -var outermost=generators[0] -st.cur.comp_iter_expr++; -VISIT(st,expr,outermost.iter); -st.cur.comp_iter_expr--; -if(!scope_name || -!symtable_enter_block(st,scope_name,FunctionBlock,e,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset)){return 0;} -switch(e.constructor){case $B.ast.ListComp: -st.cur.comprehension=ListComprehension; -break; -case $B.ast.SetComp: -st.cur.comprehension=SetComprehension; -break; -case $B.ast.DictComp: -st.cur.comprehension=DictComprehension; -break; -default: -st.cur.comprehension=GeneratorExpression; -break;} -if(outermost.is_async){st.cur.coroutine=1;} -if(!symtable_implicit_arg(st,0)){symtable_exit_block(st); -return 0;} -st.cur.comp_iter_target=1; -VISIT(st,expr,outermost.target); -st.cur.comp_iter_target=0; -VISIT_SEQ(st,expr,outermost.ifs); -VISIT_SEQ_TAIL(st,comprehension,generators,1); -if(value) -VISIT(st,expr,value); -VISIT(st,expr,elt); -st.cur.generator=is_generator; -var is_async=st.cur.coroutine && !is_generator; -if(!symtable_exit_block(st)){return 0;} -if(is_async){st.cur.coroutine=1;} -return 1;} -visitor.genexp=function(st,e){return symtable_handle_comprehension(st,e,'genexpr',e.generators,e.elt,NULL);} -visitor.listcomp=function(st,e){return symtable_handle_comprehension(st,e,'listcomp',e.generators,e.elt,NULL);} -visitor.setcomp=function(st,e){return symtable_handle_comprehension(st,e,'setcomp',e.generators,e.elt,NULL);} -visitor.dictcomp=function(st,e){return symtable_handle_comprehension(st,e,'dictcomp',e.generators,e.key,e.value);} -function symtable_raise_if_annotation_block(st,name,e){var type=st.cur.type,exc -if(type==AnnotationBlock) -exc=PyErr_Format(PyExc_SyntaxError,ANNOTATION_NOT_ALLOWED,name); -else if(type==TypeVarBoundBlock) -exc=PyErr_Format(PyExc_SyntaxError,TYPEVAR_BOUND_NOT_ALLOWED,name); -else if(type==TypeAliasBlock) -exc=PyErr_Format(PyExc_SyntaxError,TYPEALIAS_NOT_ALLOWED,name); -else if(type==TypeParamBlock) -exc=PyErr_Format(PyExc_SyntaxError,TYPEPARAM_NOT_ALLOWED,name); -else -return 1; -set_exc_info(exc,st.filename,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset); -throw exc} -function symtable_raise_if_comprehension_block(st,e){var type=st.cur.comprehension; -var exc=PyErr_SetString(PyExc_SyntaxError,(type==ListComprehension)? "'yield' inside list comprehension" : -(type==SetComprehension)? "'yield' inside set comprehension" : -(type==DictComprehension)? "'yield' inside dict comprehension" : -"'yield' inside generator expression"); -exc.$stack=$B.frames_stack.slice() -set_exc_info(exc,st.filename,e.lineno,e.col_offset,e.end_lineno,e.end_col_offset); -throw exc} -function _Py_SymtableStringObjectFlags(str,filename,start,flags){var st,mod,arena; -arena=_PyArena_New(); -if(arena==NULL) -return NULL; -mod=_PyParser_ASTFromString(str,filename,start,flags,arena); -if(mod==NULL){_PyArena_Free(arena); -return NULL;} -var future=_PyFuture_FromAST(mod,filename); -if(future==NULL){_PyArena_Free(arena); -return NULL;} -future.features |=flags.cf_flags; -st=_PySymtable_Build(mod,filename,future); -PyObject_Free(future); -_PyArena_Free(arena); -return st;}})(__BRYTHON__) -; -var docs={ArithmeticError:"Base class for arithmetic errors.",AssertionError:"Assertion failed.",AttributeError:"Attribute not found.",BaseException:"Common base class for all exceptions",BaseExceptionGroup:"A combination of multiple unrelated exceptions.",BlockingIOError:"I/O operation would block.",BrokenPipeError:"Broken pipe.",BufferError:"Buffer error.",BytesWarning:"Base class for warnings about bytes and buffer related problems, mostly\nrelated to conversion from str or comparing to str.",ChildProcessError:"Child process error.",ConnectionAbortedError:"Connection aborted.",ConnectionError:"Connection error.",ConnectionRefusedError:"Connection refused.",ConnectionResetError:"Connection reset.",DeprecationWarning:"Base class for warnings about deprecated features.",EOFError:"Read beyond end of file.",Ellipsis:"",EncodingWarning:"Base class for warnings about encodings.",EnvironmentError:"Base class for I/O related errors.",Exception:"Common base class for all non-exit exceptions.",ExceptionGroup:"",False:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",FileExistsError:"File already exists.",FileNotFoundError:"File not found.",FloatingPointError:"Floating point operation failed.",FutureWarning:"Base class for warnings about constructs that will change semantically\nin the future.",GeneratorExit:"Request that a generator exit.",IOError:"Base class for I/O related errors.",ImportError:"Import can't find module, or can't find name in module.",ImportWarning:"Base class for warnings about probable mistakes in module imports",IndentationError:"Improper indentation.",IndexError:"Sequence index out of range.",InterruptedError:"Interrupted by signal.",IsADirectoryError:"Operation doesn't work on directories.",KeyError:"Mapping key not found.",KeyboardInterrupt:"Program interrupted by user.",LookupError:"Base class for lookup errors.",MemoryError:"Out of memory.",ModuleNotFoundError:"Module not found.",NameError:"Name not found globally.",None:"",NotADirectoryError:"Operation only works on directories.",NotImplemented:"",NotImplementedError:"Method or function hasn't been implemented yet.",OSError:"Base class for I/O related errors.",OverflowError:"Result too large to be represented.",PendingDeprecationWarning:"Base class for warnings about features which will be deprecated\nin the future.",PermissionError:"Not enough permissions.",ProcessLookupError:"Process not found.",RecursionError:"Recursion limit exceeded.",ReferenceError:"Weak ref proxy used after referent went away.",ResourceWarning:"Base class for warnings about resource usage.",RuntimeError:"Unspecified run-time error.",RuntimeWarning:"Base class for warnings about dubious runtime behavior.",StopAsyncIteration:"Signal the end from iterator.__anext__().",StopIteration:"Signal the end from iterator.__next__().",SyntaxError:"Invalid syntax.",SyntaxWarning:"Base class for warnings about dubious syntax.",SystemError:"Internal error in the Python interpreter.\n\nPlease report this to the Python maintainer, along with the traceback,\nthe Python version, and the hardware/OS platform and version.",SystemExit:"Request to exit from the interpreter.",TabError:"Improper mixture of spaces and tabs.",TimeoutError:"Timeout expired.",True:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",TypeError:"Inappropriate argument type.",UnboundLocalError:"Local name referenced but not bound to a value.",UnicodeDecodeError:"Unicode decoding error.",UnicodeEncodeError:"Unicode encoding error.",UnicodeError:"Unicode related error.",UnicodeTranslateError:"Unicode translation error.",UnicodeWarning:"Base class for warnings about Unicode related problems, mostly\nrelated to conversion problems.",UserWarning:"Base class for warnings generated by user code.",ValueError:"Inappropriate argument value (of correct type).",Warning:"Base class for warning categories.",WindowsError:"Base class for I/O related errors.",ZeroDivisionError:"Second argument to a division or modulo operation was zero.",__debug__:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",abs:"Return the absolute value of the argument.",aiter:"Return an AsyncIterator for an AsyncIterable object.",all:"Return True if bool(x) is True for all values x in the iterable.\n\nIf the iterable is empty, return True.",anext:"async anext(aiterator[, default])\n\nReturn the next item from the async iterator. If default is given and the async\niterator is exhausted, it is returned instead of raising StopAsyncIteration.",any:"Return True if bool(x) is True for any x in the iterable.\n\nIf the iterable is empty, return False.",ascii:"Return an ASCII-only representation of an object.\n\nAs repr(), return a string containing a printable representation of an\nobject, but escape the non-ASCII characters in the string returned by\nrepr() using \\\\x, \\\\u or \\\\U escapes. This generates a string similar\nto that returned by repr() in Python 2.",bin:"Return the binary representation of an integer.\n\n >>> bin(2796202)\n '0b1010101010101010101010'",bool:"bool(x) -> bool\n\nReturns True when the argument x is true, False otherwise.\nThe builtins True and False are the only two instances of the class bool.\nThe class bool is a subclass of the class int, and cannot be subclassed.",breakpoint:"breakpoint(*args, **kws)\n\nCall sys.breakpointhook(*args, **kws). sys.breakpointhook() must accept\nwhatever arguments are passed.\n\nBy default, this drops you into the pdb debugger.",bytearray:"bytearray(iterable_of_ints) -> bytearray\nbytearray(string, encoding[, errors]) -> bytearray\nbytearray(bytes_or_buffer) -> mutable copy of bytes_or_buffer\nbytearray(int) -> bytes array of size given by the parameter initialized with null bytes\nbytearray() -> empty bytes array\n\nConstruct a mutable bytearray object from:\n - an iterable yielding integers in range(256)\n - a text string encoded using the specified encoding\n - a bytes or a buffer object\n - any object implementing the buffer API.\n - an integer",bytes:"bytes(iterable_of_ints) -> bytes\nbytes(string, encoding[, errors]) -> bytes\nbytes(bytes_or_buffer) -> immutable copy of bytes_or_buffer\nbytes(int) -> bytes object of size given by the parameter initialized with null bytes\nbytes() -> empty bytes object\n\nConstruct an immutable array of bytes from:\n - an iterable yielding integers in range(256)\n - a text string encoded using the specified encoding\n - any object implementing the buffer API.\n - an integer",callable:"Return whether the object is callable (i.e., some kind of function).\n\nNote that classes are callable, as are instances of classes with a\n__call__() method.",chr:"Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.",classmethod:"classmethod(function) -> method\n\nConvert a function to be a class method.\n\nA class method receives the class as implicit first argument,\njust like an instance method receives the instance.\nTo declare a class method, use this idiom:\n\n class C:\n @classmethod\n def f(cls, arg1, arg2, argN):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). The instance is ignored except for its class.\nIf a class method is called for a derived class, the derived class\nobject is passed as the implied first argument.\n\nClass methods are different than C++ or Java static methods.\nIf you want those, see the staticmethod builtin.",compile:"Compile source into a code object that can be executed by exec() or eval().\n\nThe source code may represent a Python module, statement or expression.\nThe filename will be used for run-time error messages.\nThe mode must be 'exec' to compile a module, 'single' to compile a\nsingle (interactive) statement, or 'eval' to compile an expression.\nThe flags argument, if present, controls which future statements influence\nthe compilation of the code.\nThe dont_inherit argument, if true, stops the compilation inheriting\nthe effects of any future statements in effect in the code calling\ncompile; if absent or false these statements do influence the compilation,\nin addition to any features explicitly specified.",complex:"Create a complex number from a real part and an optional imaginary part.\n\nThis is equivalent to (real + imag*1j) where imag defaults to 0.",copyright:"interactive prompt objects for printing the license text, a list of\n contributors and the copyright notice.",credits:"interactive prompt objects for printing the license text, a list of\n contributors and the copyright notice.",delattr:"Deletes the named attribute from the given object.\n\ndelattr(x, 'y') is equivalent to ``del x.y``",dict:"dict() -> new empty dictionary\ndict(mapping) -> new dictionary initialized from a mapping object's\n (key, value) pairs\ndict(iterable) -> new dictionary initialized as if via:\n d = {}\n for k, v in iterable:\n d[k] = v\ndict(**kwargs) -> new dictionary initialized with the name=value pairs\n in the keyword argument list. For example: dict(one=1, two=2)",dir:"Show attributes of an object.\n\nIf called without an argument, return the names in the current scope.\nElse, return an alphabetized list of names comprising (some of) the attributes\nof the given object, and of attributes reachable from it.\nIf the object supplies a method named __dir__, it will be used; otherwise\nthe default dir() logic is used and returns:\n for a module object: the module's attributes.\n for a class object: its attributes, and recursively the attributes\n of its bases.\n for any other object: its attributes, its class's attributes, and\n recursively the attributes of its class's base classes.",divmod:"Return the tuple (x//y, x%y). Invariant: div*y + mod == x.",enumerate:"Return an enumerate object.\n\n iterable\n an object supporting iteration\n\nThe enumerate object yields pairs containing a count (from start, which\ndefaults to zero) and a value yielded by the iterable argument.\n\nenumerate is useful for obtaining an indexed list:\n (0, seq[0]), (1, seq[1]), (2, seq[2]), ...",eval:"Evaluate the given source in the C of globals and locals.\n\nThe source may be a string representing a Python expression\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it.",exec:"Execute the given source in the C of globals and locals.\n\nThe source may be a string representing one or more Python statements\nor a code object as returned by compile().\nThe globals must be a dictionary and locals can be any mapping,\ndefaulting to the current globals and locals.\nIf only globals is given, locals defaults to it.\nThe closure must be a tuple of cellvars, and can only be used\nwhen source is a code object requiring exactly that many cellvars.",exit:"",filter:"filter(function or None, iterable) --> filter object\n\nReturn an iterator yielding those items of iterable for which function(item)\nis true. If function is None, return the items that are true.",float:"Convert a string or number to a floating point number, if possible.",format:"Return type(value).__format__(value, format_spec)\n\nMany built-in types implement format_spec according to the\nFormat Specification Mini-language. See help('FORMATTING').\n\nIf type(value) does not supply a method named __format__\nand format_spec is empty, then str(value) is returned.\nSee also help('SPECIALMETHODS').",frozenset:"frozenset() -> empty frozenset object\nfrozenset(iterable) -> frozenset object\n\nBuild an immutable unordered collection of unique elements.",getattr:"Get a named attribute from an object.\n\ngetattr(x, 'y') is equivalent to x.y\nWhen a default argument is given, it is returned when the attribute doesn't\nexist; without it, an exception is raised in that case.",globals:"Return the dictionary containing the current scope's global variables.\n\nNOTE: Updates to this dictionary *will* affect name lookups in the current\nglobal scope and vice-versa.",hasattr:"Return whether the object has an attribute with the given name.\n\nThis is done by calling getattr(obj, name) and catching AttributeError.",hash:"Return the hash value for the given object.\n\nTwo objects that compare equal must also have the same hash value, but the\nreverse is not necessarily true.",help:"Define the builtin 'help'.\n\n This is a wrapper around pydoc.help that provides a helpful message\n when 'help' is typed at the Python interactive prompt.\n\n Calling help() at the Python prompt starts an interactive help session.\n Calling help(thing) prints help for the python object 'thing'.\n ",hex:"Return the hexadecimal representation of an integer.\n\n >>> hex(12648430)\n '0xc0ffee'",id:"Return the identity of an object.\n\nThis is guaranteed to be unique among simultaneously existing objects.\n(CPython uses the object's memory address.)",input:"Read a string from standard input. The trailing newline is stripped.\n\nThe prompt string, if given, is printed to standard output without a\ntrailing newline before reading input.\n\nIf the user hits EOF (*nix: Ctrl-D, Windows: Ctrl-Z+Return), raise EOFError.\nOn *nix systems, readline is used if available.",int:"int([x]) -> integer\nint(x, base=10) -> integer\n\nConvert a number or string to an integer, or return 0 if no arguments\nare given. If x is a number, return x.__int__(). For floating point\nnumbers, this truncates towards zero.\n\nIf x is not a number or if base is given, then x must be a string,\nbytes, or bytearray instance representing an integer literal in the\ngiven base. The literal can be preceded by '+' or '-' and be surrounded\nby whitespace. The base defaults to 10. Valid bases are 0 and 2-36.\nBase 0 means to interpret the base from the string as an integer literal.\n>>> int('0b100', base=0)\n4",isinstance:"Return whether an object is an instance of a class or of a subclass thereof.\n\nA tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``isinstance(x, A) or isinstance(x, B)\nor ...`` etc.",issubclass:"Return whether 'cls' is derived from another class or is the same class.\n\nA tuple, as in ``issubclass(x, (A, B, ...))``, may be given as the target to\ncheck against. This is equivalent to ``issubclass(x, A) or issubclass(x, B)\nor ...``.",iter:"Get an iterator from an object.\n\nIn the first form, the argument must supply its own iterator, or be a sequence.\nIn the second form, the callable is called until it returns the sentinel.",len:"Return the number of items in a container.",license:"interactive prompt objects for printing the license text, a list of\n contributors and the copyright notice.",list:"Built-in mutable sequence.\n\nIf no argument is given, the constructor creates a new empty list.\nThe argument must be an iterable if specified.",locals:"Return a dictionary containing the current scope's local variables.\n\nNOTE: Whether or not updates to this dictionary will affect name lookups in\nthe local scope and vice-versa is *implementation dependent* and not\ncovered by any backwards compatibility guarantees.",map:"map(func, *iterables) --> map object\n\nMake an iterator that computes the function using arguments from\neach of the iterables. Stops when the shortest iterable is exhausted.",max:"max(iterable, *[, default=obj, key=func]) -> value\nmax(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its biggest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the largest argument.",memoryview:"Create a new memoryview object which references the given object.",min:"min(iterable, *[, default=obj, key=func]) -> value\nmin(arg1, arg2, *args, *[, key=func]) -> value\n\nWith a single iterable argument, return its smallest item. The\ndefault keyword-only argument specifies an object to return if\nthe provided iterable is empty.\nWith two or more arguments, return the smallest argument.",next:"Return the next item from the iterator.\n\nIf default is given and the iterator is exhausted,\nit is returned instead of raising StopIteration.",object:"The base class of the class hierarchy.\n\nWhen called, it accepts no arguments and returns a new featureless\ninstance that has no instance attributes and cannot be given any.\n",oct:"Return the octal representation of an integer.\n\n >>> oct(342391)\n '0o1234567'",open:"Open file and return a stream. Raise OSError upon failure.\n\nfile is either a text or byte string giving the name (and the path\nif the file isn't in the current working directory) of the file to\nbe opened or an integer file descriptor of the file to be\nwrapped. (If a file descriptor is given, it is closed when the\nreturned I/O object is closed, unless closefd is set to False.)\n\nmode is an optional string that specifies the mode in which the file\nis opened. It defaults to 'r' which means open for reading in text\nmode. Other common values are 'w' for writing (truncating the file if\nit already exists), 'x' for creating and writing to a new file, and\n'a' for appending (which on some Unix systems, means that all writes\nappend to the end of the file regardless of the current seek position).\nIn text mode, if encoding is not specified the encoding used is platform\ndependent: locale.getencoding() is called to get the current locale encoding.\n(For reading and writing raw bytes use binary mode and leave encoding\nunspecified.) The available modes are:\n\n========= ===============================================================\nCharacter Meaning\n--------- ---------------------------------------------------------------\n'r' open for reading (default)\n'w' open for writing, truncating the file first\n'x' create a new file and open it for writing\n'a' open for writing, appending to the end of the file if it exists\n'b' binary mode\n't' text mode (default)\n'+' open a disk file for updating (reading and writing)\n========= ===============================================================\n\nThe default mode is 'rt' (open for reading text). For binary random\naccess, the mode 'w+b' opens and truncates the file to 0 bytes, while\n'r+b' opens the file without truncation. The 'x' mode implies 'w' and\nraises an `FileExistsError` if the file already exists.\n\nPython distinguishes between files opened in binary and text modes,\neven when the underlying operating system doesn't. Files opened in\nbinary mode (appending 'b' to the mode argument) return contents as\nbytes objects without any decoding. In text mode (the default, or when\n't' is appended to the mode argument), the contents of the file are\nreturned as strings, the bytes having been first decoded using a\nplatform-dependent encoding or using the specified encoding if given.\n\nbuffering is an optional integer used to set the buffering policy.\nPass 0 to switch buffering off (only allowed in binary mode), 1 to select\nline buffering (only usable in text mode), and an integer > 1 to indicate\nthe size of a fixed-size chunk buffer. When no buffering argument is\ngiven, the default buffering policy works as follows:\n\n* Binary files are buffered in fixed-size chunks; the size of the buffer\n is chosen using a heuristic trying to determine the underlying device's\n \"block size\" and falling back on `io.DEFAULT_BUFFER_SIZE`.\n On many systems, the buffer will typically be 4096 or 8192 bytes long.\n\n* \"Interactive\" text files (files for which isatty() returns True)\n use line buffering. Other text files use the policy described above\n for binary files.\n\nencoding is the name of the encoding used to decode or encode the\nfile. This should only be used in text mode. The default encoding is\nplatform dependent, but any encoding supported by Python can be\npassed. See the codecs module for the list of supported encodings.\n\nerrors is an optional string that specifies how encoding errors are to\nbe handled---this argument should not be used in binary mode. Pass\n'strict' to raise a ValueError exception if there is an encoding error\n(the default of None has the same effect), or pass 'ignore' to ignore\nerrors. (Note that ignoring encoding errors can lead to data loss.)\nSee the documentation for codecs.register or run 'help(codecs.Codec)'\nfor a list of the permitted encoding error strings.\n\nnewline controls how universal newlines works (it only applies to text\nmode). It can be None, '', '\\n', '\\r', and '\\r\\n'. It works as\nfollows:\n\n* On input, if newline is None, universal newlines mode is\n enabled. Lines in the input can end in '\\n', '\\r', or '\\r\\n', and\n these are translated into '\\n' before being returned to the\n caller. If it is '', universal newline mode is enabled, but line\n endings are returned to the caller untranslated. If it has any of\n the other legal values, input lines are only terminated by the given\n string, and the line ending is returned to the caller untranslated.\n\n* On output, if newline is None, any '\\n' characters written are\n translated to the system default line separator, os.linesep. If\n newline is '' or '\\n', no translation takes place. If newline is any\n of the other legal values, any '\\n' characters written are translated\n to the given string.\n\nIf closefd is False, the underlying file descriptor will be kept open\nwhen the file is closed. This does not work when a file name is given\nand must be True in that case.\n\nA custom opener can be used by passing a callable as *opener*. The\nunderlying file descriptor for the file object is then obtained by\ncalling *opener* with (*file*, *flags*). *opener* must return an open\nfile descriptor (passing os.open as *opener* results in functionality\nsimilar to passing None).\n\nopen() returns a file object whose type depends on the mode, and\nthrough which the standard file operations such as reading and writing\nare performed. When open() is used to open a file in a text mode ('w',\n'r', 'wt', 'rt', etc.), it returns a TextIOWrapper. When used to open\na file in a binary mode, the returned class varies: in read binary\nmode, it returns a BufferedReader; in write binary and append binary\nmodes, it returns a BufferedWriter, and in read/write mode, it returns\na BufferedRandom.\n\nIt is also possible to use a string or bytearray as a file for both\nreading and writing. For strings StringIO can be used like a file\nopened in a text mode, and for bytes a BytesIO can be used like a file\nopened in a binary mode.",ord:"Return the Unicode code point for a one-character string.",pow:"Equivalent to base**exp with 2 arguments or base**exp % mod with 3 arguments\n\nSome types, such as ints, are able to use a more efficient algorithm when\ninvoked using the three argument form.",print:"Prints the values to a stream, or to sys.stdout by default.\n\n sep\n string inserted between values, default a space.\n end\n string appended after the last value, default a newline.\n file\n a file-like object (stream); defaults to the current sys.stdout.\n flush\n whether to forcibly flush the stream.",property:"Property attribute.\n\n fget\n function to be used for getting an attribute value\n fset\n function to be used for setting an attribute value\n fdel\n function to be used for del'ing an attribute\n doc\n docstring\n\nTypical use is to define a managed attribute x:\n\nclass C(object):\n def getx(self): return self._x\n def setx(self, value): self._x = value\n def delx(self): del self._x\n x = property(getx, setx, delx, \"I'm the 'x' property.\")\n\nDecorators make defining new properties or modifying existing ones easy:\n\nclass C(object):\n @property\n def x(self):\n \"I am the 'x' property.\"\n return self._x\n @x.setter\n def x(self, value):\n self._x = value\n @x.deleter\n def x(self):\n del self._x",quit:"",range:"range(stop) -> range object\nrange(start, stop[, step]) -> range object\n\nReturn an object that produces a sequence of integers from start (inclusive)\nto stop (exclusive) by step. range(i, j) produces i, i+1, i+2, ..., j-1.\nstart defaults to 0, and stop is omitted! range(4) produces 0, 1, 2, 3.\nThese are exactly the valid indices for a list of 4 elements.\nWhen step is given, it specifies the increment (or decrement).",repr:"Return the canonical string representation of the object.\n\nFor many object types, including most builtins, eval(repr(obj)) == obj.",reversed:"Return a reverse iterator over the values of the given sequence.",round:"Round a number to a given precision in decimal digits.\n\nThe return value is an integer if ndigits is omitted or None. Otherwise\nthe return value has the same type as the number. ndigits may be negative.",set:"set() -> new empty set object\nset(iterable) -> new set object\n\nBuild an unordered collection of unique elements.",setattr:"Sets the named attribute on the given object to the specified value.\n\nsetattr(x, 'y', v) is equivalent to ``x.y = v``",slice:"slice(stop)\nslice(start, stop[, step])\n\nCreate a slice object. This is used for extended slicing (e.g. a[0:10:2]).",sorted:"Return a new list containing all items from the iterable in ascending order.\n\nA custom key function can be supplied to customize the sort order, and the\nreverse flag can be set to request the result in descending order.",staticmethod:"staticmethod(function) -> method\n\nConvert a function to be a static method.\n\nA static method does not receive an implicit first argument.\nTo declare a static method, use this idiom:\n\n class C:\n @staticmethod\n def f(arg1, arg2, argN):\n ...\n\nIt can be called either on the class (e.g. C.f()) or on an instance\n(e.g. C().f()). Both the class and the instance are ignored, and\nneither is passed implicitly as the first argument to the method.\n\nStatic methods in Python are similar to those found in Java or C++.\nFor a more advanced concept, see the classmethod builtin.",str:"str(object='') -> str\nstr(bytes_or_buffer[, encoding[, errors]]) -> str\n\nCreate a new string object from the given object. If encoding or\nerrors is specified, then the object must expose a data buffer\nthat will be decoded using the given encoding and error handler.\nOtherwise, returns the result of object.__str__() (if defined)\nor repr(object).\nencoding defaults to sys.getdefaultencoding().\nerrors defaults to 'strict'.",sum:"Return the sum of a 'start' value (default: 0) plus an iterable of numbers\n\nWhen the iterable is empty, return the start value.\nThis function is intended specifically for use with numeric values and may\nreject non-numeric types.",super:"super() -> same as super(__class__, )\nsuper(type) -> unbound super object\nsuper(type, obj) -> bound super object; requires isinstance(obj, type)\nsuper(type, type2) -> bound super object; requires issubclass(type2, type)\nTypical use to call a cooperative superclass method:\nclass C(B):\n def meth(self, arg):\n super().meth(arg)\nThis works for class methods too:\nclass C(B):\n @classmethod\n def cmeth(cls, arg):\n super().cmeth(arg)\n",tuple:"Built-in immutable sequence.\n\nIf no argument is given, the constructor returns an empty tuple.\nIf iterable is specified the tuple is initialized from iterable's items.\n\nIf the argument is a tuple, the return value is the same object.",type:"type(object) -> the object's type\ntype(name, bases, dict, **kwds) -> a new type",vars:"Show vars.\n\nWithout arguments, equivalent to locals().\nWith an argument, equivalent to object.__dict__.",zip:"zip(*iterables, strict=False) --> Yield tuples until an input is exhausted.\n\n >>> list(zip('abcdefg', range(3), range(4)))\n [('a', 0, 0), ('b', 1, 1), ('c', 2, 2)]\n\nThe zip object yields n-length tuples, where n is the number of iterables\npassed as positional arguments to zip(). The i-th element in every tuple\ncomes from the i-th iterable argument to zip(). This continues until the\nshortest argument is exhausted.\n\nIf strict is true and one of the arguments is exhausted before the others,\nraise a ValueError.",} -for(var key in docs){if(__BRYTHON__.builtins[key]){__BRYTHON__.builtins[key].__doc__=docs[key]}} -; diff --git a/lib/brython.min.js b/lib/brython.min.js deleted file mode 120000 index 33d2d7a..0000000 --- a/lib/brython.min.js +++ /dev/null @@ -1 +0,0 @@ -brython.js \ No newline at end of file diff --git a/lib/brython_stdlib.js b/lib/brython_stdlib.js deleted file mode 100644 index ea8b18c..0000000 --- a/lib/brython_stdlib.js +++ /dev/null @@ -1,3 +0,0 @@ -__BRYTHON__.use_VFS = true; -var scripts = {"$timestamp": 1696255955250, "array": [".js", "var $module = (function($B){\n\nvar _b_ = $B.builtins\n\nvar typecodes = {\n 'b': Int8Array, // signed char, 1 byte\n 'B': Uint8Array, // unsigned char, 1\n 'u': Uint32Array, // Py_UNICODE Unicode character, 2 (deprecated)\n 'h': Int16Array, // signed short, 2\n 'H': Uint16Array, // unsigned short, 2\n 'i': Int16Array, // signed int, 2\n 'I': Uint16Array, // unsigned int, 2\n 'l': Int32Array, // signed long, 4\n 'L': Uint32Array, // unsigned long, 4\n 'q': null, // signed long, 8 (not implemented)\n 'Q': null, // unsigned long, 8 (not implemented)\n 'f': Float32Array, // float, 4\n 'd': Float64Array // double float, 8\n}\n\nvar array = $B.make_class(\"array\",\n function(){\n var missing = {},\n $ = $B.args(\"array\", 2, {typecode: null, initializer: null},\n [\"typecode\", \"initializer\"], arguments, {initializer: missing},\n null, null),\n typecode = $.typecode,\n initializer = $.initializer\n if(! typecodes.hasOwnProperty(typecode)){\n throw _b_.ValueError.$factory(\"bad typecode (must be b, \" +\n \"B, u, h, H, i, I, l, L, q, Q, f or d)\")\n }\n if(typecodes[typecode] === null){\n console.log(\"array factory, $\", $, typecode)\n throw _b_.NotImplementedError.$factory(\"type code \" +\n typecode + \" is not implemented\")\n }\n var res = {\n __class__: array,\n typecode: typecode,\n obj: null\n }\n if(initializer !== missing){\n if(Array.isArray(initializer)){\n array.fromlist(res, initializer)\n }else if(_b_.isinstance(initializer, _b_.bytes)){\n array.frombytes(res, initializer)\n }else{\n array.extend(res, initializer)\n }\n }\n return res\n }\n)\n\narray.$buffer_protocol = true\narray.$match_sequence_pattern = true // for Pattern Matching (PEP 634)\n\narray.__getitem__ = function(self, key){\n if(self.obj && self.obj[key] !== undefined){\n return self.obj[key]\n }\n throw _b_.IndexError.$factory(\"array index out of range\")\n}\n\nvar array_iterator = $B.make_iterator_class(\"array_iterator\")\narray.__iter__ = function(self){\n return array_iterator.$factory(self.obj === null ? [] : self.obj)\n}\n\narray.__len__ = function(self){\n return self.obj === null ? 0 : self.obj.length\n}\n\narray.__mul__ = function(self, nb){\n if(typeof nb == \"number\" || _b_.isinstance(nb, _b_.int)){\n var t = [],\n copy = self.obj.slice()\n for(var i = 0; i < nb; i++){\n t = t.concat(copy)\n }\n return {\n __class__: array,\n typecode: self.typecode,\n obj: t\n }\n }\n throw _b_.ValueError.$factory(\"cannot multiply array by \" +\n $B.class_name(nb))\n}\n\narray.__setitem__ = function(_self, index, value){\n if(_self.obj[index] === undefined){\n throw _b_.IndexError.$factory(\"array index out of range\")\n }\n _self.obj[index] = value\n}\n\narray.__str__ = function(self){\n $B.args(\"__str__\", 1, {self: null},\n [\"self\"], arguments, {}, null, null)\n var res = \"array('\" + self.typecode + \"'\"\n if(self.obj !== null){\n res += \", [\" + self.obj + \"]\"\n }\n return res + \")\"\n}\n\nfunction normalize_index(self, i){\n // return an index i between 0 and self.obj.length - 1\n if(i < 0){\n i = self.obj.length + i\n }\n if(i < 0){i = 0}\n else if(i > self.obj.length - 1){\n i = self.obj.length\n }\n return i\n}\n\narray.append = function(self, value){\n $B.args(\"append\", 2, {self: null, value: null},\n [\"self\", \"value\"], arguments, {}, null, null)\n var pos = self.obj === null ? 0 : self.obj.length\n return array.insert(self, pos, value)\n}\n\narray.count = function(self, x){\n $B.args(\"count\", 2, {self: null, x: null},\n [\"self\", \"x\"], arguments, {}, null, null)\n if(self.obj === null){return 0}\n return self.obj.filter(function(item){return item == x}).length\n}\n\narray.extend = function(self, iterable){\n $B.args(\"extend\", 2, {self: null, iterable: null},\n [\"self\", \"iterable\"], arguments, {}, null, null)\n if(iterable.__class__ === array){\n if(iterable.typecode !== self.typecode){\n throw _b_.TypeError.$factory(\"can only extend with array \" +\n \"of same kind\")\n }\n if(iterable.obj === null){return _b_.None}\n // create new object with length = sum of lengths\n var newobj = new typecodes[self.typecode](self.obj.length +\n iterable.obj.length)\n // copy self.obj\n newobj.set(self.obj)\n // copy iterable.obj\n newobj.set(iterable.obj, self.obj.length)\n self.obj = newobj\n }else{\n var it = _b_.iter(iterable)\n while(true){\n try{\n var item = _b_.next(it)\n array.append(self, item)\n }catch(err){\n if(err.__class__ !== _b_.StopIteration){\n throw err\n }\n break\n }\n }\n }\n return _b_.None\n}\n\narray.frombytes = function(self, s){\n $B.args(\"frombytes\", 2, {self: null, s: null},\n [\"self\", \"s\"], arguments, {}, null, null)\n if(! _b_.isinstance(s, _b_.bytes)){\n throw _b_.TypeError.$factory(\"a bytes-like object is required, \" +\n \"not '\" + $B.class_name(s) + \"'\")\n }\n self.obj = new typecodes[self.typecode](s.source)\n return _b_.None\n}\n\narray.fromlist = function(self, list){\n $B.args(\"fromlist\", 2, {self: null, list: null},\n [\"self\", \"list\"], arguments, {}, null, null)\n var it = _b_.iter(list)\n while(true){\n try{\n var item = _b_.next(it)\n try{\n array.append(self, item)\n }catch(err){\n console.log(err)\n return _b_.None\n }\n }catch(err){\n if(err.__class__ === _b_.StopIteration){\n return _b_.None\n }\n throw err\n }\n }\n}\n\narray.fromstring = array.frombytes\n\narray.index = function(self, x){\n $B.args(\"index\", 2, {self: null, x: null},\n [\"self\", \"x\"], arguments, {}, null, null)\n var res = self.obj.findIndex(function(item){return x == item})\n if(res == -1){\n throw _b_.ValueError.$factory(\"array.index(x): x not in array\")\n }\n return res\n}\n\narray.insert = function(self, i, value){\n $B.args(\"insert\", 3, {self: null, i: null, value: null},\n [\"self\", \"i\", \"value\"], arguments, {}, null, null)\n if(self.obj === null){\n self.obj = [value]\n }else{\n self.obj.splice(i, 0, value)\n }\n return _b_.None\n}\n\narray.itemsize = function(self){\n return typecodes[self.typecode].BYTES_PER_ELEMENT\n}\n\narray.pop = function(self, i){\n var $ = $B.args(\"count\", 2, {self: null, i: null},\n [\"self\", \"i\"], arguments, {i: -1}, null, null)\n i = $.i\n if(self.obj === null){\n throw _b_.IndexError.$factory(\"pop from empty array\")\n }else if(self.obj.length == 1){\n var res = self.obj[0]\n self.obj = null\n return res\n }\n i = normalize_index(self, i)\n // store value to return\n var res = self.obj[i]\n // create new array, size = previous size - 1\n var newobj = new typecodes[self.typecode](self.obj.length - 1)\n // fill new array with values until i excluded\n newobj.set(self.obj.slice(0, i))\n // fill with values after i\n newobj.set(self.obj.slice(i + 1), i)\n // set self.obj to new array\n self.obj = newobj\n // return stored value\n return res\n}\n\narray.remove = function(self, x){\n $B.args(\"remove\", 2, {self: null, x: null},\n [\"self\", \"x\"], arguments, {}, null, null)\n var res = self.obj.findIndex(function(item){return x == item})\n if(res == -1){\n throw _b_.ValueError.$factory(\"array.remove(x): x not in array\")\n }\n array.pop(self, res)\n return _b_.None\n}\n\narray.reverse = function(self){\n $B.args(\"reverse\", 1, {self: null},\n [\"self\"], arguments, {}, null, null)\n if(self.obj === null){return _b_.None}\n self.obj.reverse()\n return _b_.None\n}\n\narray.tobytes = function(self){\n $B.args(\"tobytes\", 1, {self: null},\n [\"self\"], arguments, {}, null, null)\n var items = Array.prototype.slice.call(self.obj),\n res = []\n items.forEach(function(item){\n while(item > 256){\n res.push(item % 256)\n item = Math.floor(item / 256)\n }\n res.push(item)\n })\n return _b_.bytes.$factory(res)\n}\n\narray.tolist = function(self){\n $B.args(\"tolist\", 1, {self: null},\n [\"self\"], arguments, {}, null, null)\n if(self.obj === null){\n return $B.$list([])\n }\n return Array.prototype.slice.call(self.obj)\n}\n\narray.tostring = array.tobytes\n\narray.typecode = function(self){\n return self.typecode\n}\n\n$B.set_func_names(array, \"array\")\n\nreturn {\n array: array,\n typecodes: Object.keys(typecodes).join('')\n}\n\n})(__BRYTHON__)\n"], "builtins": [".js", "var $module = (function(){\n var obj = {\n __class__: __BRYTHON__.module,\n __name__: 'builtins'\n },\n builtin_names = ['ArithmeticError', 'AssertionError',\n 'AttributeError', 'BaseException', 'BaseExceptionGroup',\n 'BlockingIOError', 'BrokenPipeError', 'BufferError',\n 'BytesWarning', 'ChildProcessError', 'ConnectionAbortedError',\n 'ConnectionError', 'ConnectionRefusedError',\n 'ConnectionResetError', 'DeprecationWarning', 'EOFError',\n 'Ellipsis', 'EncodingWarning', 'EnvironmentError', 'Exception',\n 'ExceptionGroup', 'False', 'FileExistsError', 'FileNotFoundError',\n 'FloatingPointError', 'FutureWarning', 'GeneratorExit', 'IOError',\n 'ImportError', 'ImportWarning', 'IndentationError', 'IndexError',\n 'InterruptedError', 'IsADirectoryError', 'KeyError',\n 'KeyboardInterrupt', 'LookupError', 'MemoryError',\n 'ModuleNotFoundError', 'NameError', 'None', 'NotADirectoryError',\n 'NotImplemented', 'NotImplementedError', 'OSError',\n 'OverflowError', 'PendingDeprecationWarning', 'PermissionError',\n 'ProcessLookupError', 'RecursionError', 'ReferenceError',\n 'ResourceWarning', 'RuntimeError', 'RuntimeWarning',\n 'StopAsyncIteration', 'StopIteration', 'SyntaxError',\n 'SyntaxWarning', 'SystemError', 'SystemExit', 'TabError',\n 'TimeoutError', 'True', 'TypeError', 'UnboundLocalError',\n 'UnicodeDecodeError', 'UnicodeEncodeError', 'UnicodeError',\n 'UnicodeTranslateError', 'UnicodeWarning', 'UserWarning',\n 'ValueError', 'Warning', 'WindowsError', 'ZeroDivisionError',\n '_', '__build_class__', '__debug__', '__import__',\n 'abs', 'aiter', 'all', 'anext', 'any', 'ascii', 'bin', 'bool',\n 'breakpoint', 'bytearray', 'bytes', 'callable', 'chr',\n 'classmethod', 'compile', 'complex', 'delattr', 'dict', 'dir',\n 'divmod', 'enumerate', 'eval', 'exec', 'exit', 'filter', 'float',\n 'format', 'frozenset', 'getattr', 'globals', 'hasattr', 'hash',\n 'help', 'hex', 'id', 'input', 'int', 'isinstance', 'issubclass',\n 'iter', 'len', 'list', 'locals', 'map', 'max', 'memoryview',\n 'min', 'next', 'object', 'oct', 'open', 'ord', 'pow', 'print',\n 'property', 'quit', 'range', 'repr', 'reversed', 'round', 'set',\n 'setattr', 'slice', 'sorted', 'staticmethod', 'str', 'sum',\n 'super', 'tuple', 'type', 'vars', 'zip']\n for(var key of builtin_names){\n if(__BRYTHON__.builtins[key] !== undefined){\n obj[key] = __BRYTHON__.builtins[key]\n }\n }\n obj.__doc__ = 'builtins module'\n obj.copyright = 'CPython copyright'\n obj.credits = 'CPython builtins credits'\n obj.license = 'CPython license'\n return obj\n})()\n"], "dis": [".js", "var $module=(function($B){\n\nvar dict = $B.builtins.dict\nvar mod = {\n dis:function(src){\n $B.$py_module_path['__main__'] = $B.brython_path\n return __BRYTHON__.py2js(src,'__main__','__main__',\n $B.builtins_scope).to_js()\n },\n OPTIMIZED: 1,\n NEWLOCALS: 2,\n VARARGS: 4,\n VARKEYWORDS: 8,\n NESTED: 16,\n GENERATOR: 32,\n NOFREE: 64,\n COROUTINE: 128,\n ITERABLE_COROUTINE: 256,\n ASYNC_GENERATOR: 512,\n COMPILER_FLAG_NAMES: $B.builtins.dict.$factory()\n}\nmod.COMPILER_FLAG_NAMES = dict.$factory([\n [1, \"OPTIMIZED\"],\n [2, \"NEWLOCALS\"],\n [4, \"VARARGS\"],\n [8, \"VARKEYWORDS\"],\n [16, \"NESTED\"],\n [32, \"GENERATOR\"],\n [64, \"NOFREE\"],\n [128, \"COROUTINE\"],\n [256, \"ITERABLE_COROUTINE\"],\n [512, \"ASYNC_GENERATOR\"]\n])\n\nreturn mod\n\n})(__BRYTHON__)"], "encoding_cp932": [".js", "var _table = [0x00, 0x0000,0x01, 0x0001,0x02, 0x0002,0x03, 0x0003,0x04, 0x0004,0x05, 0x0005,0x06, 0x0006,0x07, 0x0007,0x08, 0x0008,0x09, 0x0009,0x0A, 0x000A,0x0B, 0x000B,0x0C, 0x000C,0x0D, 0x000D,0x0E, 0x000E,0x0F, 0x000F,0x10, 0x0010,0x11, 0x0011,0x12, 0x0012,0x13, 0x0013,0x14, 0x0014,0x15, 0x0015,0x16, 0x0016,0x17, 0x0017,0x18, 0x0018,0x19, 0x0019,0x1A, 0x001A,0x1B, 0x001B,0x1C, 0x001C,0x1D, 0x001D,0x1E, 0x001E,0x1F, 0x001F,0x20, 0x0020,0x21, 0x0021,0x22, 0x0022,0x23, 0x0023,0x24, 0x0024,0x25, 0x0025,0x26, 0x0026,0x27, 0x0027,0x28, 0x0028,0x29, 0x0029,0x2A, 0x002A,0x2B, 0x002B,0x2C, 0x002C,0x2D, 0x002D,0x2E, 0x002E,0x2F, 0x002F,0x30, 0x0030,0x31, 0x0031,0x32, 0x0032,0x33, 0x0033,0x34, 0x0034,0x35, 0x0035,0x36, 0x0036,0x37, 0x0037,0x38, 0x0038,0x39, 0x0039,0x3A, 0x003A,0x3B, 0x003B,0x3C, 0x003C,0x3D, 0x003D,0x3E, 0x003E,0x3F, 0x003F,0x40, 0x0040,0x41, 0x0041,0x42, 0x0042,0x43, 0x0043,0x44, 0x0044,0x45, 0x0045,0x46, 0x0046,0x47, 0x0047,0x48, 0x0048,0x49, 0x0049,0x4A, 0x004A,0x4B, 0x004B,0x4C, 0x004C,0x4D, 0x004D,0x4E, 0x004E,0x4F, 0x004F,0x50, 0x0050,0x51, 0x0051,0x52, 0x0052,0x53, 0x0053,0x54, 0x0054,0x55, 0x0055,0x56, 0x0056,0x57, 0x0057,0x58, 0x0058,0x59, 0x0059,0x5A, 0x005A,0x5B, 0x005B,0x5C, 0x005C,0x5D, 0x005D,0x5E, 0x005E,0x5F, 0x005F,0x60, 0x0060,0x61, 0x0061,0x62, 0x0062,0x63, 0x0063,0x64, 0x0064,0x65, 0x0065,0x66, 0x0066,0x67, 0x0067,0x68, 0x0068,0x69, 0x0069,0x6A, 0x006A,0x6B, 0x006B,0x6C, 0x006C,0x6D, 0x006D,0x6E, 0x006E,0x6F, 0x006F,0x70, 0x0070,0x71, 0x0071,0x72, 0x0072,0x73, 0x0073,0x74, 0x0074,0x75, 0x0075,0x76, 0x0076,0x77, 0x0077,0x78, 0x0078,0x79, 0x0079,0x7A, 0x007A,0x7B, 0x007B,0x7C, 0x007C,0x7D, 0x007D,0x7E, 0x007E,0x7F, 0x007F,0x80, -1,0x81, -1,0x82, -1,0x83, -1,0x84, -1,0x85, -1,0x86, -1,0x87, -1,0x88, -1,0x89, -1,0x8A, -1,0x8B, -1,0x8C, -1,0x8D, -1,0x8E, -1,0x8F, -1,0x90, -1,0x91, -1,0x92, -1,0x93, -1,0x94, -1,0x95, -1,0x96, -1,0x97, -1,0x98, -1,0x99, -1,0x9A, -1,0x9B, -1,0x9C, -1,0x9D, -1,0x9E, -1,0x9F, -1,0xA0, -1,0xA1, 0xFF61,0xA2, 0xFF62,0xA3, 0xFF63,0xA4, 0xFF64,0xA5, 0xFF65,0xA6, 0xFF66,0xA7, 0xFF67,0xA8, 0xFF68,0xA9, 0xFF69,0xAA, 0xFF6A,0xAB, 0xFF6B,0xAC, 0xFF6C,0xAD, 0xFF6D,0xAE, 0xFF6E,0xAF, 0xFF6F,0xB0, 0xFF70,0xB1, 0xFF71,0xB2, 0xFF72,0xB3, 0xFF73,0xB4, 0xFF74,0xB5, 0xFF75,0xB6, 0xFF76,0xB7, 0xFF77,0xB8, 0xFF78,0xB9, 0xFF79,0xBA, 0xFF7A,0xBB, 0xFF7B,0xBC, 0xFF7C,0xBD, 0xFF7D,0xBE, 0xFF7E,0xBF, 0xFF7F,0xC0, 0xFF80,0xC1, 0xFF81,0xC2, 0xFF82,0xC3, 0xFF83,0xC4, 0xFF84,0xC5, 0xFF85,0xC6, 0xFF86,0xC7, 0xFF87,0xC8, 0xFF88,0xC9, 0xFF89,0xCA, 0xFF8A,0xCB, 0xFF8B,0xCC, 0xFF8C,0xCD, 0xFF8D,0xCE, 0xFF8E,0xCF, 0xFF8F,0xD0, 0xFF90,0xD1, 0xFF91,0xD2, 0xFF92,0xD3, 0xFF93,0xD4, 0xFF94,0xD5, 0xFF95,0xD6, 0xFF96,0xD7, 0xFF97,0xD8, 0xFF98,0xD9, 0xFF99,0xDA, 0xFF9A,0xDB, 0xFF9B,0xDC, 0xFF9C,0xDD, 0xFF9D,0xDE, 0xFF9E,0xDF, 0xFF9F,0xE0, -1,0xE1, -1,0xE2, -1,0xE3, -1,0xE4, -1,0xE5, -1,0xE6, -1,0xE7, -1,0xE8, -1,0xE9, -1,0xEA, -1,0xEB, -1,0xEC, -1,0xED, -1,0xEE, -1,0xEF, -1,0xF0, -1,0xF1, -1,0xF2, -1,0xF3, -1,0xF4, -1,0xF5, -1,0xF6, -1,0xF7, -1,0xF8, -1,0xF9, -1,0xFA, -1,0xFB, -1,0xFC, -1,0xFD, -1,0xFE, -1,0xFF, -1,0x8140, 0x3000,0x8141, 0x3001,0x8142, 0x3002,0x8143, 0xFF0C,0x8144, 0xFF0E,0x8145, 0x30FB,0x8146, 0xFF1A,0x8147, 0xFF1B,0x8148, 0xFF1F,0x8149, 0xFF01,0x814A, 0x309B,0x814B, 0x309C,0x814C, 0x00B4,0x814D, 0xFF40,0x814E, 0x00A8,0x814F, 0xFF3E,0x8150, 0xFFE3,0x8151, 0xFF3F,0x8152, 0x30FD,0x8153, 0x30FE,0x8154, 0x309D,0x8155, 0x309E,0x8156, 0x3003,0x8157, 0x4EDD,0x8158, 0x3005,0x8159, 0x3006,0x815A, 0x3007,0x815B, 0x30FC,0x815C, 0x2015,0x815D, 0x2010,0x815E, 0xFF0F,0x815F, 0xFF3C,0x8160, 0xFF5E,0x8161, 0x2225,0x8162, 0xFF5C,0x8163, 0x2026,0x8164, 0x2025,0x8165, 0x2018,0x8166, 0x2019,0x8167, 0x201C,0x8168, 0x201D,0x8169, 0xFF08,0x816A, 0xFF09,0x816B, 0x3014,0x816C, 0x3015,0x816D, 0xFF3B,0x816E, 0xFF3D,0x816F, 0xFF5B,0x8170, 0xFF5D,0x8171, 0x3008,0x8172, 0x3009,0x8173, 0x300A,0x8174, 0x300B,0x8175, 0x300C,0x8176, 0x300D,0x8177, 0x300E,0x8178, 0x300F,0x8179, 0x3010,0x817A, 0x3011,0x817B, 0xFF0B,0x817C, 0xFF0D,0x817D, 0x00B1,0x817E, 0x00D7,0x8180, 0x00F7,0x8181, 0xFF1D,0x8182, 0x2260,0x8183, 0xFF1C,0x8184, 0xFF1E,0x8185, 0x2266,0x8186, 0x2267,0x8187, 0x221E,0x8188, 0x2234,0x8189, 0x2642,0x818A, 0x2640,0x818B, 0x00B0,0x818C, 0x2032,0x818D, 0x2033,0x818E, 0x2103,0x818F, 0xFFE5,0x8190, 0xFF04,0x8191, 0xFFE0,0x8192, 0xFFE1,0x8193, 0xFF05,0x8194, 0xFF03,0x8195, 0xFF06,0x8196, 0xFF0A,0x8197, 0xFF20,0x8198, 0x00A7,0x8199, 0x2606,0x819A, 0x2605,0x819B, 0x25CB,0x819C, 0x25CF,0x819D, 0x25CE,0x819E, 0x25C7,0x819F, 0x25C6,0x81A0, 0x25A1,0x81A1, 0x25A0,0x81A2, 0x25B3,0x81A3, 0x25B2,0x81A4, 0x25BD,0x81A5, 0x25BC,0x81A6, 0x203B,0x81A7, 0x3012,0x81A8, 0x2192,0x81A9, 0x2190,0x81AA, 0x2191,0x81AB, 0x2193,0x81AC, 0x3013,0x81B8, 0x2208,0x81B9, 0x220B,0x81BA, 0x2286,0x81BB, 0x2287,0x81BC, 0x2282,0x81BD, 0x2283,0x81BE, 0x222A,0x81BF, 0x2229,0x81C8, 0x2227,0x81C9, 0x2228,0x81CA, 0xFFE2,0x81CB, 0x21D2,0x81CC, 0x21D4,0x81CD, 0x2200,0x81CE, 0x2203,0x81DA, 0x2220,0x81DB, 0x22A5,0x81DC, 0x2312,0x81DD, 0x2202,0x81DE, 0x2207,0x81DF, 0x2261,0x81E0, 0x2252,0x81E1, 0x226A,0x81E2, 0x226B,0x81E3, 0x221A,0x81E4, 0x223D,0x81E5, 0x221D,0x81E6, 0x2235,0x81E7, 0x222B,0x81E8, 0x222C,0x81F0, 0x212B,0x81F1, 0x2030,0x81F2, 0x266F,0x81F3, 0x266D,0x81F4, 0x266A,0x81F5, 0x2020,0x81F6, 0x2021,0x81F7, 0x00B6,0x81FC, 0x25EF,0x824F, 0xFF10,0x8250, 0xFF11,0x8251, 0xFF12,0x8252, 0xFF13,0x8253, 0xFF14,0x8254, 0xFF15,0x8255, 0xFF16,0x8256, 0xFF17,0x8257, 0xFF18,0x8258, 0xFF19,0x8260, 0xFF21,0x8261, 0xFF22,0x8262, 0xFF23,0x8263, 0xFF24,0x8264, 0xFF25,0x8265, 0xFF26,0x8266, 0xFF27,0x8267, 0xFF28,0x8268, 0xFF29,0x8269, 0xFF2A,0x826A, 0xFF2B,0x826B, 0xFF2C,0x826C, 0xFF2D,0x826D, 0xFF2E,0x826E, 0xFF2F,0x826F, 0xFF30,0x8270, 0xFF31,0x8271, 0xFF32,0x8272, 0xFF33,0x8273, 0xFF34,0x8274, 0xFF35,0x8275, 0xFF36,0x8276, 0xFF37,0x8277, 0xFF38,0x8278, 0xFF39,0x8279, 0xFF3A,0x8281, 0xFF41,0x8282, 0xFF42,0x8283, 0xFF43,0x8284, 0xFF44,0x8285, 0xFF45,0x8286, 0xFF46,0x8287, 0xFF47,0x8288, 0xFF48,0x8289, 0xFF49,0x828A, 0xFF4A,0x828B, 0xFF4B,0x828C, 0xFF4C,0x828D, 0xFF4D,0x828E, 0xFF4E,0x828F, 0xFF4F,0x8290, 0xFF50,0x8291, 0xFF51,0x8292, 0xFF52,0x8293, 0xFF53,0x8294, 0xFF54,0x8295, 0xFF55,0x8296, 0xFF56,0x8297, 0xFF57,0x8298, 0xFF58,0x8299, 0xFF59,0x829A, 0xFF5A,0x829F, 0x3041,0x82A0, 0x3042,0x82A1, 0x3043,0x82A2, 0x3044,0x82A3, 0x3045,0x82A4, 0x3046,0x82A5, 0x3047,0x82A6, 0x3048,0x82A7, 0x3049,0x82A8, 0x304A,0x82A9, 0x304B,0x82AA, 0x304C,0x82AB, 0x304D,0x82AC, 0x304E,0x82AD, 0x304F,0x82AE, 0x3050,0x82AF, 0x3051,0x82B0, 0x3052,0x82B1, 0x3053,0x82B2, 0x3054,0x82B3, 0x3055,0x82B4, 0x3056,0x82B5, 0x3057,0x82B6, 0x3058,0x82B7, 0x3059,0x82B8, 0x305A,0x82B9, 0x305B,0x82BA, 0x305C,0x82BB, 0x305D,0x82BC, 0x305E,0x82BD, 0x305F,0x82BE, 0x3060,0x82BF, 0x3061,0x82C0, 0x3062,0x82C1, 0x3063,0x82C2, 0x3064,0x82C3, 0x3065,0x82C4, 0x3066,0x82C5, 0x3067,0x82C6, 0x3068,0x82C7, 0x3069,0x82C8, 0x306A,0x82C9, 0x306B,0x82CA, 0x306C,0x82CB, 0x306D,0x82CC, 0x306E,0x82CD, 0x306F,0x82CE, 0x3070,0x82CF, 0x3071,0x82D0, 0x3072,0x82D1, 0x3073,0x82D2, 0x3074,0x82D3, 0x3075,0x82D4, 0x3076,0x82D5, 0x3077,0x82D6, 0x3078,0x82D7, 0x3079,0x82D8, 0x307A,0x82D9, 0x307B,0x82DA, 0x307C,0x82DB, 0x307D,0x82DC, 0x307E,0x82DD, 0x307F,0x82DE, 0x3080,0x82DF, 0x3081,0x82E0, 0x3082,0x82E1, 0x3083,0x82E2, 0x3084,0x82E3, 0x3085,0x82E4, 0x3086,0x82E5, 0x3087,0x82E6, 0x3088,0x82E7, 0x3089,0x82E8, 0x308A,0x82E9, 0x308B,0x82EA, 0x308C,0x82EB, 0x308D,0x82EC, 0x308E,0x82ED, 0x308F,0x82EE, 0x3090,0x82EF, 0x3091,0x82F0, 0x3092,0x82F1, 0x3093,0x8340, 0x30A1,0x8341, 0x30A2,0x8342, 0x30A3,0x8343, 0x30A4,0x8344, 0x30A5,0x8345, 0x30A6,0x8346, 0x30A7,0x8347, 0x30A8,0x8348, 0x30A9,0x8349, 0x30AA,0x834A, 0x30AB,0x834B, 0x30AC,0x834C, 0x30AD,0x834D, 0x30AE,0x834E, 0x30AF,0x834F, 0x30B0,0x8350, 0x30B1,0x8351, 0x30B2,0x8352, 0x30B3,0x8353, 0x30B4,0x8354, 0x30B5,0x8355, 0x30B6,0x8356, 0x30B7,0x8357, 0x30B8,0x8358, 0x30B9,0x8359, 0x30BA,0x835A, 0x30BB,0x835B, 0x30BC,0x835C, 0x30BD,0x835D, 0x30BE,0x835E, 0x30BF,0x835F, 0x30C0,0x8360, 0x30C1,0x8361, 0x30C2,0x8362, 0x30C3,0x8363, 0x30C4,0x8364, 0x30C5,0x8365, 0x30C6,0x8366, 0x30C7,0x8367, 0x30C8,0x8368, 0x30C9,0x8369, 0x30CA,0x836A, 0x30CB,0x836B, 0x30CC,0x836C, 0x30CD,0x836D, 0x30CE,0x836E, 0x30CF,0x836F, 0x30D0,0x8370, 0x30D1,0x8371, 0x30D2,0x8372, 0x30D3,0x8373, 0x30D4,0x8374, 0x30D5,0x8375, 0x30D6,0x8376, 0x30D7,0x8377, 0x30D8,0x8378, 0x30D9,0x8379, 0x30DA,0x837A, 0x30DB,0x837B, 0x30DC,0x837C, 0x30DD,0x837D, 0x30DE,0x837E, 0x30DF,0x8380, 0x30E0,0x8381, 0x30E1,0x8382, 0x30E2,0x8383, 0x30E3,0x8384, 0x30E4,0x8385, 0x30E5,0x8386, 0x30E6,0x8387, 0x30E7,0x8388, 0x30E8,0x8389, 0x30E9,0x838A, 0x30EA,0x838B, 0x30EB,0x838C, 0x30EC,0x838D, 0x30ED,0x838E, 0x30EE,0x838F, 0x30EF,0x8390, 0x30F0,0x8391, 0x30F1,0x8392, 0x30F2,0x8393, 0x30F3,0x8394, 0x30F4,0x8395, 0x30F5,0x8396, 0x30F6,0x839F, 0x0391,0x83A0, 0x0392,0x83A1, 0x0393,0x83A2, 0x0394,0x83A3, 0x0395,0x83A4, 0x0396,0x83A5, 0x0397,0x83A6, 0x0398,0x83A7, 0x0399,0x83A8, 0x039A,0x83A9, 0x039B,0x83AA, 0x039C,0x83AB, 0x039D,0x83AC, 0x039E,0x83AD, 0x039F,0x83AE, 0x03A0,0x83AF, 0x03A1,0x83B0, 0x03A3,0x83B1, 0x03A4,0x83B2, 0x03A5,0x83B3, 0x03A6,0x83B4, 0x03A7,0x83B5, 0x03A8,0x83B6, 0x03A9,0x83BF, 0x03B1,0x83C0, 0x03B2,0x83C1, 0x03B3,0x83C2, 0x03B4,0x83C3, 0x03B5,0x83C4, 0x03B6,0x83C5, 0x03B7,0x83C6, 0x03B8,0x83C7, 0x03B9,0x83C8, 0x03BA,0x83C9, 0x03BB,0x83CA, 0x03BC,0x83CB, 0x03BD,0x83CC, 0x03BE,0x83CD, 0x03BF,0x83CE, 0x03C0,0x83CF, 0x03C1,0x83D0, 0x03C3,0x83D1, 0x03C4,0x83D2, 0x03C5,0x83D3, 0x03C6,0x83D4, 0x03C7,0x83D5, 0x03C8,0x83D6, 0x03C9,0x8440, 0x0410,0x8441, 0x0411,0x8442, 0x0412,0x8443, 0x0413,0x8444, 0x0414,0x8445, 0x0415,0x8446, 0x0401,0x8447, 0x0416,0x8448, 0x0417,0x8449, 0x0418,0x844A, 0x0419,0x844B, 0x041A,0x844C, 0x041B,0x844D, 0x041C,0x844E, 0x041D,0x844F, 0x041E,0x8450, 0x041F,0x8451, 0x0420,0x8452, 0x0421,0x8453, 0x0422,0x8454, 0x0423,0x8455, 0x0424,0x8456, 0x0425,0x8457, 0x0426,0x8458, 0x0427,0x8459, 0x0428,0x845A, 0x0429,0x845B, 0x042A,0x845C, 0x042B,0x845D, 0x042C,0x845E, 0x042D,0x845F, 0x042E,0x8460, 0x042F,0x8470, 0x0430,0x8471, 0x0431,0x8472, 0x0432,0x8473, 0x0433,0x8474, 0x0434,0x8475, 0x0435,0x8476, 0x0451,0x8477, 0x0436,0x8478, 0x0437,0x8479, 0x0438,0x847A, 0x0439,0x847B, 0x043A,0x847C, 0x043B,0x847D, 0x043C,0x847E, 0x043D,0x8480, 0x043E,0x8481, 0x043F,0x8482, 0x0440,0x8483, 0x0441,0x8484, 0x0442,0x8485, 0x0443,0x8486, 0x0444,0x8487, 0x0445,0x8488, 0x0446,0x8489, 0x0447,0x848A, 0x0448,0x848B, 0x0449,0x848C, 0x044A,0x848D, 0x044B,0x848E, 0x044C,0x848F, 0x044D,0x8490, 0x044E,0x8491, 0x044F,0x849F, 0x2500,0x84A0, 0x2502,0x84A1, 0x250C,0x84A2, 0x2510,0x84A3, 0x2518,0x84A4, 0x2514,0x84A5, 0x251C,0x84A6, 0x252C,0x84A7, 0x2524,0x84A8, 0x2534,0x84A9, 0x253C,0x84AA, 0x2501,0x84AB, 0x2503,0x84AC, 0x250F,0x84AD, 0x2513,0x84AE, 0x251B,0x84AF, 0x2517,0x84B0, 0x2523,0x84B1, 0x2533,0x84B2, 0x252B,0x84B3, 0x253B,0x84B4, 0x254B,0x84B5, 0x2520,0x84B6, 0x252F,0x84B7, 0x2528,0x84B8, 0x2537,0x84B9, 0x253F,0x84BA, 0x251D,0x84BB, 0x2530,0x84BC, 0x2525,0x84BD, 0x2538,0x84BE, 0x2542,0x8740, 0x2460,0x8741, 0x2461,0x8742, 0x2462,0x8743, 0x2463,0x8744, 0x2464,0x8745, 0x2465,0x8746, 0x2466,0x8747, 0x2467,0x8748, 0x2468,0x8749, 0x2469,0x874A, 0x246A,0x874B, 0x246B,0x874C, 0x246C,0x874D, 0x246D,0x874E, 0x246E,0x874F, 0x246F,0x8750, 0x2470,0x8751, 0x2471,0x8752, 0x2472,0x8753, 0x2473,0x8754, 0x2160,0x8755, 0x2161,0x8756, 0x2162,0x8757, 0x2163,0x8758, 0x2164,0x8759, 0x2165,0x875A, 0x2166,0x875B, 0x2167,0x875C, 0x2168,0x875D, 0x2169,0x875F, 0x3349,0x8760, 0x3314,0x8761, 0x3322,0x8762, 0x334D,0x8763, 0x3318,0x8764, 0x3327,0x8765, 0x3303,0x8766, 0x3336,0x8767, 0x3351,0x8768, 0x3357,0x8769, 0x330D,0x876A, 0x3326,0x876B, 0x3323,0x876C, 0x332B,0x876D, 0x334A,0x876E, 0x333B,0x876F, 0x339C,0x8770, 0x339D,0x8771, 0x339E,0x8772, 0x338E,0x8773, 0x338F,0x8774, 0x33C4,0x8775, 0x33A1,0x877E, 0x337B,0x8780, 0x301D,0x8781, 0x301F,0x8782, 0x2116,0x8783, 0x33CD,0x8784, 0x2121,0x8785, 0x32A4,0x8786, 0x32A5,0x8787, 0x32A6,0x8788, 0x32A7,0x8789, 0x32A8,0x878A, 0x3231,0x878B, 0x3232,0x878C, 0x3239,0x878D, 0x337E,0x878E, 0x337D,0x878F, 0x337C,0x8790, 0x2252,0x8791, 0x2261,0x8792, 0x222B,0x8793, 0x222E,0x8794, 0x2211,0x8795, 0x221A,0x8796, 0x22A5,0x8797, 0x2220,0x8798, 0x221F,0x8799, 0x22BF,0x879A, 0x2235,0x879B, 0x2229,0x879C, 0x222A,0x889F, 0x4E9C,0x88A0, 0x5516,0x88A1, 0x5A03,0x88A2, 0x963F,0x88A3, 0x54C0,0x88A4, 0x611B,0x88A5, 0x6328,0x88A6, 0x59F6,0x88A7, 0x9022,0x88A8, 0x8475,0x88A9, 0x831C,0x88AA, 0x7A50,0x88AB, 0x60AA,0x88AC, 0x63E1,0x88AD, 0x6E25,0x88AE, 0x65ED,0x88AF, 0x8466,0x88B0, 0x82A6,0x88B1, 0x9BF5,0x88B2, 0x6893,0x88B3, 0x5727,0x88B4, 0x65A1,0x88B5, 0x6271,0x88B6, 0x5B9B,0x88B7, 0x59D0,0x88B8, 0x867B,0x88B9, 0x98F4,0x88BA, 0x7D62,0x88BB, 0x7DBE,0x88BC, 0x9B8E,0x88BD, 0x6216,0x88BE, 0x7C9F,0x88BF, 0x88B7,0x88C0, 0x5B89,0x88C1, 0x5EB5,0x88C2, 0x6309,0x88C3, 0x6697,0x88C4, 0x6848,0x88C5, 0x95C7,0x88C6, 0x978D,0x88C7, 0x674F,0x88C8, 0x4EE5,0x88C9, 0x4F0A,0x88CA, 0x4F4D,0x88CB, 0x4F9D,0x88CC, 0x5049,0x88CD, 0x56F2,0x88CE, 0x5937,0x88CF, 0x59D4,0x88D0, 0x5A01,0x88D1, 0x5C09,0x88D2, 0x60DF,0x88D3, 0x610F,0x88D4, 0x6170,0x88D5, 0x6613,0x88D6, 0x6905,0x88D7, 0x70BA,0x88D8, 0x754F,0x88D9, 0x7570,0x88DA, 0x79FB,0x88DB, 0x7DAD,0x88DC, 0x7DEF,0x88DD, 0x80C3,0x88DE, 0x840E,0x88DF, 0x8863,0x88E0, 0x8B02,0x88E1, 0x9055,0x88E2, 0x907A,0x88E3, 0x533B,0x88E4, 0x4E95,0x88E5, 0x4EA5,0x88E6, 0x57DF,0x88E7, 0x80B2,0x88E8, 0x90C1,0x88E9, 0x78EF,0x88EA, 0x4E00,0x88EB, 0x58F1,0x88EC, 0x6EA2,0x88ED, 0x9038,0x88EE, 0x7A32,0x88EF, 0x8328,0x88F0, 0x828B,0x88F1, 0x9C2F,0x88F2, 0x5141,0x88F3, 0x5370,0x88F4, 0x54BD,0x88F5, 0x54E1,0x88F6, 0x56E0,0x88F7, 0x59FB,0x88F8, 0x5F15,0x88F9, 0x98F2,0x88FA, 0x6DEB,0x88FB, 0x80E4,0x88FC, 0x852D,0x8940, 0x9662,0x8941, 0x9670,0x8942, 0x96A0,0x8943, 0x97FB,0x8944, 0x540B,0x8945, 0x53F3,0x8946, 0x5B87,0x8947, 0x70CF,0x8948, 0x7FBD,0x8949, 0x8FC2,0x894A, 0x96E8,0x894B, 0x536F,0x894C, 0x9D5C,0x894D, 0x7ABA,0x894E, 0x4E11,0x894F, 0x7893,0x8950, 0x81FC,0x8951, 0x6E26,0x8952, 0x5618,0x8953, 0x5504,0x8954, 0x6B1D,0x8955, 0x851A,0x8956, 0x9C3B,0x8957, 0x59E5,0x8958, 0x53A9,0x8959, 0x6D66,0x895A, 0x74DC,0x895B, 0x958F,0x895C, 0x5642,0x895D, 0x4E91,0x895E, 0x904B,0x895F, 0x96F2,0x8960, 0x834F,0x8961, 0x990C,0x8962, 0x53E1,0x8963, 0x55B6,0x8964, 0x5B30,0x8965, 0x5F71,0x8966, 0x6620,0x8967, 0x66F3,0x8968, 0x6804,0x8969, 0x6C38,0x896A, 0x6CF3,0x896B, 0x6D29,0x896C, 0x745B,0x896D, 0x76C8,0x896E, 0x7A4E,0x896F, 0x9834,0x8970, 0x82F1,0x8971, 0x885B,0x8972, 0x8A60,0x8973, 0x92ED,0x8974, 0x6DB2,0x8975, 0x75AB,0x8976, 0x76CA,0x8977, 0x99C5,0x8978, 0x60A6,0x8979, 0x8B01,0x897A, 0x8D8A,0x897B, 0x95B2,0x897C, 0x698E,0x897D, 0x53AD,0x897E, 0x5186,0x8980, 0x5712,0x8981, 0x5830,0x8982, 0x5944,0x8983, 0x5BB4,0x8984, 0x5EF6,0x8985, 0x6028,0x8986, 0x63A9,0x8987, 0x63F4,0x8988, 0x6CBF,0x8989, 0x6F14,0x898A, 0x708E,0x898B, 0x7114,0x898C, 0x7159,0x898D, 0x71D5,0x898E, 0x733F,0x898F, 0x7E01,0x8990, 0x8276,0x8991, 0x82D1,0x8992, 0x8597,0x8993, 0x9060,0x8994, 0x925B,0x8995, 0x9D1B,0x8996, 0x5869,0x8997, 0x65BC,0x8998, 0x6C5A,0x8999, 0x7525,0x899A, 0x51F9,0x899B, 0x592E,0x899C, 0x5965,0x899D, 0x5F80,0x899E, 0x5FDC,0x899F, 0x62BC,0x89A0, 0x65FA,0x89A1, 0x6A2A,0x89A2, 0x6B27,0x89A3, 0x6BB4,0x89A4, 0x738B,0x89A5, 0x7FC1,0x89A6, 0x8956,0x89A7, 0x9D2C,0x89A8, 0x9D0E,0x89A9, 0x9EC4,0x89AA, 0x5CA1,0x89AB, 0x6C96,0x89AC, 0x837B,0x89AD, 0x5104,0x89AE, 0x5C4B,0x89AF, 0x61B6,0x89B0, 0x81C6,0x89B1, 0x6876,0x89B2, 0x7261,0x89B3, 0x4E59,0x89B4, 0x4FFA,0x89B5, 0x5378,0x89B6, 0x6069,0x89B7, 0x6E29,0x89B8, 0x7A4F,0x89B9, 0x97F3,0x89BA, 0x4E0B,0x89BB, 0x5316,0x89BC, 0x4EEE,0x89BD, 0x4F55,0x89BE, 0x4F3D,0x89BF, 0x4FA1,0x89C0, 0x4F73,0x89C1, 0x52A0,0x89C2, 0x53EF,0x89C3, 0x5609,0x89C4, 0x590F,0x89C5, 0x5AC1,0x89C6, 0x5BB6,0x89C7, 0x5BE1,0x89C8, 0x79D1,0x89C9, 0x6687,0x89CA, 0x679C,0x89CB, 0x67B6,0x89CC, 0x6B4C,0x89CD, 0x6CB3,0x89CE, 0x706B,0x89CF, 0x73C2,0x89D0, 0x798D,0x89D1, 0x79BE,0x89D2, 0x7A3C,0x89D3, 0x7B87,0x89D4, 0x82B1,0x89D5, 0x82DB,0x89D6, 0x8304,0x89D7, 0x8377,0x89D8, 0x83EF,0x89D9, 0x83D3,0x89DA, 0x8766,0x89DB, 0x8AB2,0x89DC, 0x5629,0x89DD, 0x8CA8,0x89DE, 0x8FE6,0x89DF, 0x904E,0x89E0, 0x971E,0x89E1, 0x868A,0x89E2, 0x4FC4,0x89E3, 0x5CE8,0x89E4, 0x6211,0x89E5, 0x7259,0x89E6, 0x753B,0x89E7, 0x81E5,0x89E8, 0x82BD,0x89E9, 0x86FE,0x89EA, 0x8CC0,0x89EB, 0x96C5,0x89EC, 0x9913,0x89ED, 0x99D5,0x89EE, 0x4ECB,0x89EF, 0x4F1A,0x89F0, 0x89E3,0x89F1, 0x56DE,0x89F2, 0x584A,0x89F3, 0x58CA,0x89F4, 0x5EFB,0x89F5, 0x5FEB,0x89F6, 0x602A,0x89F7, 0x6094,0x89F8, 0x6062,0x89F9, 0x61D0,0x89FA, 0x6212,0x89FB, 0x62D0,0x89FC, 0x6539,0x8A40, 0x9B41,0x8A41, 0x6666,0x8A42, 0x68B0,0x8A43, 0x6D77,0x8A44, 0x7070,0x8A45, 0x754C,0x8A46, 0x7686,0x8A47, 0x7D75,0x8A48, 0x82A5,0x8A49, 0x87F9,0x8A4A, 0x958B,0x8A4B, 0x968E,0x8A4C, 0x8C9D,0x8A4D, 0x51F1,0x8A4E, 0x52BE,0x8A4F, 0x5916,0x8A50, 0x54B3,0x8A51, 0x5BB3,0x8A52, 0x5D16,0x8A53, 0x6168,0x8A54, 0x6982,0x8A55, 0x6DAF,0x8A56, 0x788D,0x8A57, 0x84CB,0x8A58, 0x8857,0x8A59, 0x8A72,0x8A5A, 0x93A7,0x8A5B, 0x9AB8,0x8A5C, 0x6D6C,0x8A5D, 0x99A8,0x8A5E, 0x86D9,0x8A5F, 0x57A3,0x8A60, 0x67FF,0x8A61, 0x86CE,0x8A62, 0x920E,0x8A63, 0x5283,0x8A64, 0x5687,0x8A65, 0x5404,0x8A66, 0x5ED3,0x8A67, 0x62E1,0x8A68, 0x64B9,0x8A69, 0x683C,0x8A6A, 0x6838,0x8A6B, 0x6BBB,0x8A6C, 0x7372,0x8A6D, 0x78BA,0x8A6E, 0x7A6B,0x8A6F, 0x899A,0x8A70, 0x89D2,0x8A71, 0x8D6B,0x8A72, 0x8F03,0x8A73, 0x90ED,0x8A74, 0x95A3,0x8A75, 0x9694,0x8A76, 0x9769,0x8A77, 0x5B66,0x8A78, 0x5CB3,0x8A79, 0x697D,0x8A7A, 0x984D,0x8A7B, 0x984E,0x8A7C, 0x639B,0x8A7D, 0x7B20,0x8A7E, 0x6A2B,0x8A80, 0x6A7F,0x8A81, 0x68B6,0x8A82, 0x9C0D,0x8A83, 0x6F5F,0x8A84, 0x5272,0x8A85, 0x559D,0x8A86, 0x6070,0x8A87, 0x62EC,0x8A88, 0x6D3B,0x8A89, 0x6E07,0x8A8A, 0x6ED1,0x8A8B, 0x845B,0x8A8C, 0x8910,0x8A8D, 0x8F44,0x8A8E, 0x4E14,0x8A8F, 0x9C39,0x8A90, 0x53F6,0x8A91, 0x691B,0x8A92, 0x6A3A,0x8A93, 0x9784,0x8A94, 0x682A,0x8A95, 0x515C,0x8A96, 0x7AC3,0x8A97, 0x84B2,0x8A98, 0x91DC,0x8A99, 0x938C,0x8A9A, 0x565B,0x8A9B, 0x9D28,0x8A9C, 0x6822,0x8A9D, 0x8305,0x8A9E, 0x8431,0x8A9F, 0x7CA5,0x8AA0, 0x5208,0x8AA1, 0x82C5,0x8AA2, 0x74E6,0x8AA3, 0x4E7E,0x8AA4, 0x4F83,0x8AA5, 0x51A0,0x8AA6, 0x5BD2,0x8AA7, 0x520A,0x8AA8, 0x52D8,0x8AA9, 0x52E7,0x8AAA, 0x5DFB,0x8AAB, 0x559A,0x8AAC, 0x582A,0x8AAD, 0x59E6,0x8AAE, 0x5B8C,0x8AAF, 0x5B98,0x8AB0, 0x5BDB,0x8AB1, 0x5E72,0x8AB2, 0x5E79,0x8AB3, 0x60A3,0x8AB4, 0x611F,0x8AB5, 0x6163,0x8AB6, 0x61BE,0x8AB7, 0x63DB,0x8AB8, 0x6562,0x8AB9, 0x67D1,0x8ABA, 0x6853,0x8ABB, 0x68FA,0x8ABC, 0x6B3E,0x8ABD, 0x6B53,0x8ABE, 0x6C57,0x8ABF, 0x6F22,0x8AC0, 0x6F97,0x8AC1, 0x6F45,0x8AC2, 0x74B0,0x8AC3, 0x7518,0x8AC4, 0x76E3,0x8AC5, 0x770B,0x8AC6, 0x7AFF,0x8AC7, 0x7BA1,0x8AC8, 0x7C21,0x8AC9, 0x7DE9,0x8ACA, 0x7F36,0x8ACB, 0x7FF0,0x8ACC, 0x809D,0x8ACD, 0x8266,0x8ACE, 0x839E,0x8ACF, 0x89B3,0x8AD0, 0x8ACC,0x8AD1, 0x8CAB,0x8AD2, 0x9084,0x8AD3, 0x9451,0x8AD4, 0x9593,0x8AD5, 0x9591,0x8AD6, 0x95A2,0x8AD7, 0x9665,0x8AD8, 0x97D3,0x8AD9, 0x9928,0x8ADA, 0x8218,0x8ADB, 0x4E38,0x8ADC, 0x542B,0x8ADD, 0x5CB8,0x8ADE, 0x5DCC,0x8ADF, 0x73A9,0x8AE0, 0x764C,0x8AE1, 0x773C,0x8AE2, 0x5CA9,0x8AE3, 0x7FEB,0x8AE4, 0x8D0B,0x8AE5, 0x96C1,0x8AE6, 0x9811,0x8AE7, 0x9854,0x8AE8, 0x9858,0x8AE9, 0x4F01,0x8AEA, 0x4F0E,0x8AEB, 0x5371,0x8AEC, 0x559C,0x8AED, 0x5668,0x8AEE, 0x57FA,0x8AEF, 0x5947,0x8AF0, 0x5B09,0x8AF1, 0x5BC4,0x8AF2, 0x5C90,0x8AF3, 0x5E0C,0x8AF4, 0x5E7E,0x8AF5, 0x5FCC,0x8AF6, 0x63EE,0x8AF7, 0x673A,0x8AF8, 0x65D7,0x8AF9, 0x65E2,0x8AFA, 0x671F,0x8AFB, 0x68CB,0x8AFC, 0x68C4,0x8B40, 0x6A5F,0x8B41, 0x5E30,0x8B42, 0x6BC5,0x8B43, 0x6C17,0x8B44, 0x6C7D,0x8B45, 0x757F,0x8B46, 0x7948,0x8B47, 0x5B63,0x8B48, 0x7A00,0x8B49, 0x7D00,0x8B4A, 0x5FBD,0x8B4B, 0x898F,0x8B4C, 0x8A18,0x8B4D, 0x8CB4,0x8B4E, 0x8D77,0x8B4F, 0x8ECC,0x8B50, 0x8F1D,0x8B51, 0x98E2,0x8B52, 0x9A0E,0x8B53, 0x9B3C,0x8B54, 0x4E80,0x8B55, 0x507D,0x8B56, 0x5100,0x8B57, 0x5993,0x8B58, 0x5B9C,0x8B59, 0x622F,0x8B5A, 0x6280,0x8B5B, 0x64EC,0x8B5C, 0x6B3A,0x8B5D, 0x72A0,0x8B5E, 0x7591,0x8B5F, 0x7947,0x8B60, 0x7FA9,0x8B61, 0x87FB,0x8B62, 0x8ABC,0x8B63, 0x8B70,0x8B64, 0x63AC,0x8B65, 0x83CA,0x8B66, 0x97A0,0x8B67, 0x5409,0x8B68, 0x5403,0x8B69, 0x55AB,0x8B6A, 0x6854,0x8B6B, 0x6A58,0x8B6C, 0x8A70,0x8B6D, 0x7827,0x8B6E, 0x6775,0x8B6F, 0x9ECD,0x8B70, 0x5374,0x8B71, 0x5BA2,0x8B72, 0x811A,0x8B73, 0x8650,0x8B74, 0x9006,0x8B75, 0x4E18,0x8B76, 0x4E45,0x8B77, 0x4EC7,0x8B78, 0x4F11,0x8B79, 0x53CA,0x8B7A, 0x5438,0x8B7B, 0x5BAE,0x8B7C, 0x5F13,0x8B7D, 0x6025,0x8B7E, 0x6551,0x8B80, 0x673D,0x8B81, 0x6C42,0x8B82, 0x6C72,0x8B83, 0x6CE3,0x8B84, 0x7078,0x8B85, 0x7403,0x8B86, 0x7A76,0x8B87, 0x7AAE,0x8B88, 0x7B08,0x8B89, 0x7D1A,0x8B8A, 0x7CFE,0x8B8B, 0x7D66,0x8B8C, 0x65E7,0x8B8D, 0x725B,0x8B8E, 0x53BB,0x8B8F, 0x5C45,0x8B90, 0x5DE8,0x8B91, 0x62D2,0x8B92, 0x62E0,0x8B93, 0x6319,0x8B94, 0x6E20,0x8B95, 0x865A,0x8B96, 0x8A31,0x8B97, 0x8DDD,0x8B98, 0x92F8,0x8B99, 0x6F01,0x8B9A, 0x79A6,0x8B9B, 0x9B5A,0x8B9C, 0x4EA8,0x8B9D, 0x4EAB,0x8B9E, 0x4EAC,0x8B9F, 0x4F9B,0x8BA0, 0x4FA0,0x8BA1, 0x50D1,0x8BA2, 0x5147,0x8BA3, 0x7AF6,0x8BA4, 0x5171,0x8BA5, 0x51F6,0x8BA6, 0x5354,0x8BA7, 0x5321,0x8BA8, 0x537F,0x8BA9, 0x53EB,0x8BAA, 0x55AC,0x8BAB, 0x5883,0x8BAC, 0x5CE1,0x8BAD, 0x5F37,0x8BAE, 0x5F4A,0x8BAF, 0x602F,0x8BB0, 0x6050,0x8BB1, 0x606D,0x8BB2, 0x631F,0x8BB3, 0x6559,0x8BB4, 0x6A4B,0x8BB5, 0x6CC1,0x8BB6, 0x72C2,0x8BB7, 0x72ED,0x8BB8, 0x77EF,0x8BB9, 0x80F8,0x8BBA, 0x8105,0x8BBB, 0x8208,0x8BBC, 0x854E,0x8BBD, 0x90F7,0x8BBE, 0x93E1,0x8BBF, 0x97FF,0x8BC0, 0x9957,0x8BC1, 0x9A5A,0x8BC2, 0x4EF0,0x8BC3, 0x51DD,0x8BC4, 0x5C2D,0x8BC5, 0x6681,0x8BC6, 0x696D,0x8BC7, 0x5C40,0x8BC8, 0x66F2,0x8BC9, 0x6975,0x8BCA, 0x7389,0x8BCB, 0x6850,0x8BCC, 0x7C81,0x8BCD, 0x50C5,0x8BCE, 0x52E4,0x8BCF, 0x5747,0x8BD0, 0x5DFE,0x8BD1, 0x9326,0x8BD2, 0x65A4,0x8BD3, 0x6B23,0x8BD4, 0x6B3D,0x8BD5, 0x7434,0x8BD6, 0x7981,0x8BD7, 0x79BD,0x8BD8, 0x7B4B,0x8BD9, 0x7DCA,0x8BDA, 0x82B9,0x8BDB, 0x83CC,0x8BDC, 0x887F,0x8BDD, 0x895F,0x8BDE, 0x8B39,0x8BDF, 0x8FD1,0x8BE0, 0x91D1,0x8BE1, 0x541F,0x8BE2, 0x9280,0x8BE3, 0x4E5D,0x8BE4, 0x5036,0x8BE5, 0x53E5,0x8BE6, 0x533A,0x8BE7, 0x72D7,0x8BE8, 0x7396,0x8BE9, 0x77E9,0x8BEA, 0x82E6,0x8BEB, 0x8EAF,0x8BEC, 0x99C6,0x8BED, 0x99C8,0x8BEE, 0x99D2,0x8BEF, 0x5177,0x8BF0, 0x611A,0x8BF1, 0x865E,0x8BF2, 0x55B0,0x8BF3, 0x7A7A,0x8BF4, 0x5076,0x8BF5, 0x5BD3,0x8BF6, 0x9047,0x8BF7, 0x9685,0x8BF8, 0x4E32,0x8BF9, 0x6ADB,0x8BFA, 0x91E7,0x8BFB, 0x5C51,0x8BFC, 0x5C48,0x8C40, 0x6398,0x8C41, 0x7A9F,0x8C42, 0x6C93,0x8C43, 0x9774,0x8C44, 0x8F61,0x8C45, 0x7AAA,0x8C46, 0x718A,0x8C47, 0x9688,0x8C48, 0x7C82,0x8C49, 0x6817,0x8C4A, 0x7E70,0x8C4B, 0x6851,0x8C4C, 0x936C,0x8C4D, 0x52F2,0x8C4E, 0x541B,0x8C4F, 0x85AB,0x8C50, 0x8A13,0x8C51, 0x7FA4,0x8C52, 0x8ECD,0x8C53, 0x90E1,0x8C54, 0x5366,0x8C55, 0x8888,0x8C56, 0x7941,0x8C57, 0x4FC2,0x8C58, 0x50BE,0x8C59, 0x5211,0x8C5A, 0x5144,0x8C5B, 0x5553,0x8C5C, 0x572D,0x8C5D, 0x73EA,0x8C5E, 0x578B,0x8C5F, 0x5951,0x8C60, 0x5F62,0x8C61, 0x5F84,0x8C62, 0x6075,0x8C63, 0x6176,0x8C64, 0x6167,0x8C65, 0x61A9,0x8C66, 0x63B2,0x8C67, 0x643A,0x8C68, 0x656C,0x8C69, 0x666F,0x8C6A, 0x6842,0x8C6B, 0x6E13,0x8C6C, 0x7566,0x8C6D, 0x7A3D,0x8C6E, 0x7CFB,0x8C6F, 0x7D4C,0x8C70, 0x7D99,0x8C71, 0x7E4B,0x8C72, 0x7F6B,0x8C73, 0x830E,0x8C74, 0x834A,0x8C75, 0x86CD,0x8C76, 0x8A08,0x8C77, 0x8A63,0x8C78, 0x8B66,0x8C79, 0x8EFD,0x8C7A, 0x981A,0x8C7B, 0x9D8F,0x8C7C, 0x82B8,0x8C7D, 0x8FCE,0x8C7E, 0x9BE8,0x8C80, 0x5287,0x8C81, 0x621F,0x8C82, 0x6483,0x8C83, 0x6FC0,0x8C84, 0x9699,0x8C85, 0x6841,0x8C86, 0x5091,0x8C87, 0x6B20,0x8C88, 0x6C7A,0x8C89, 0x6F54,0x8C8A, 0x7A74,0x8C8B, 0x7D50,0x8C8C, 0x8840,0x8C8D, 0x8A23,0x8C8E, 0x6708,0x8C8F, 0x4EF6,0x8C90, 0x5039,0x8C91, 0x5026,0x8C92, 0x5065,0x8C93, 0x517C,0x8C94, 0x5238,0x8C95, 0x5263,0x8C96, 0x55A7,0x8C97, 0x570F,0x8C98, 0x5805,0x8C99, 0x5ACC,0x8C9A, 0x5EFA,0x8C9B, 0x61B2,0x8C9C, 0x61F8,0x8C9D, 0x62F3,0x8C9E, 0x6372,0x8C9F, 0x691C,0x8CA0, 0x6A29,0x8CA1, 0x727D,0x8CA2, 0x72AC,0x8CA3, 0x732E,0x8CA4, 0x7814,0x8CA5, 0x786F,0x8CA6, 0x7D79,0x8CA7, 0x770C,0x8CA8, 0x80A9,0x8CA9, 0x898B,0x8CAA, 0x8B19,0x8CAB, 0x8CE2,0x8CAC, 0x8ED2,0x8CAD, 0x9063,0x8CAE, 0x9375,0x8CAF, 0x967A,0x8CB0, 0x9855,0x8CB1, 0x9A13,0x8CB2, 0x9E78,0x8CB3, 0x5143,0x8CB4, 0x539F,0x8CB5, 0x53B3,0x8CB6, 0x5E7B,0x8CB7, 0x5F26,0x8CB8, 0x6E1B,0x8CB9, 0x6E90,0x8CBA, 0x7384,0x8CBB, 0x73FE,0x8CBC, 0x7D43,0x8CBD, 0x8237,0x8CBE, 0x8A00,0x8CBF, 0x8AFA,0x8CC0, 0x9650,0x8CC1, 0x4E4E,0x8CC2, 0x500B,0x8CC3, 0x53E4,0x8CC4, 0x547C,0x8CC5, 0x56FA,0x8CC6, 0x59D1,0x8CC7, 0x5B64,0x8CC8, 0x5DF1,0x8CC9, 0x5EAB,0x8CCA, 0x5F27,0x8CCB, 0x6238,0x8CCC, 0x6545,0x8CCD, 0x67AF,0x8CCE, 0x6E56,0x8CCF, 0x72D0,0x8CD0, 0x7CCA,0x8CD1, 0x88B4,0x8CD2, 0x80A1,0x8CD3, 0x80E1,0x8CD4, 0x83F0,0x8CD5, 0x864E,0x8CD6, 0x8A87,0x8CD7, 0x8DE8,0x8CD8, 0x9237,0x8CD9, 0x96C7,0x8CDA, 0x9867,0x8CDB, 0x9F13,0x8CDC, 0x4E94,0x8CDD, 0x4E92,0x8CDE, 0x4F0D,0x8CDF, 0x5348,0x8CE0, 0x5449,0x8CE1, 0x543E,0x8CE2, 0x5A2F,0x8CE3, 0x5F8C,0x8CE4, 0x5FA1,0x8CE5, 0x609F,0x8CE6, 0x68A7,0x8CE7, 0x6A8E,0x8CE8, 0x745A,0x8CE9, 0x7881,0x8CEA, 0x8A9E,0x8CEB, 0x8AA4,0x8CEC, 0x8B77,0x8CED, 0x9190,0x8CEE, 0x4E5E,0x8CEF, 0x9BC9,0x8CF0, 0x4EA4,0x8CF1, 0x4F7C,0x8CF2, 0x4FAF,0x8CF3, 0x5019,0x8CF4, 0x5016,0x8CF5, 0x5149,0x8CF6, 0x516C,0x8CF7, 0x529F,0x8CF8, 0x52B9,0x8CF9, 0x52FE,0x8CFA, 0x539A,0x8CFB, 0x53E3,0x8CFC, 0x5411,0x8D40, 0x540E,0x8D41, 0x5589,0x8D42, 0x5751,0x8D43, 0x57A2,0x8D44, 0x597D,0x8D45, 0x5B54,0x8D46, 0x5B5D,0x8D47, 0x5B8F,0x8D48, 0x5DE5,0x8D49, 0x5DE7,0x8D4A, 0x5DF7,0x8D4B, 0x5E78,0x8D4C, 0x5E83,0x8D4D, 0x5E9A,0x8D4E, 0x5EB7,0x8D4F, 0x5F18,0x8D50, 0x6052,0x8D51, 0x614C,0x8D52, 0x6297,0x8D53, 0x62D8,0x8D54, 0x63A7,0x8D55, 0x653B,0x8D56, 0x6602,0x8D57, 0x6643,0x8D58, 0x66F4,0x8D59, 0x676D,0x8D5A, 0x6821,0x8D5B, 0x6897,0x8D5C, 0x69CB,0x8D5D, 0x6C5F,0x8D5E, 0x6D2A,0x8D5F, 0x6D69,0x8D60, 0x6E2F,0x8D61, 0x6E9D,0x8D62, 0x7532,0x8D63, 0x7687,0x8D64, 0x786C,0x8D65, 0x7A3F,0x8D66, 0x7CE0,0x8D67, 0x7D05,0x8D68, 0x7D18,0x8D69, 0x7D5E,0x8D6A, 0x7DB1,0x8D6B, 0x8015,0x8D6C, 0x8003,0x8D6D, 0x80AF,0x8D6E, 0x80B1,0x8D6F, 0x8154,0x8D70, 0x818F,0x8D71, 0x822A,0x8D72, 0x8352,0x8D73, 0x884C,0x8D74, 0x8861,0x8D75, 0x8B1B,0x8D76, 0x8CA2,0x8D77, 0x8CFC,0x8D78, 0x90CA,0x8D79, 0x9175,0x8D7A, 0x9271,0x8D7B, 0x783F,0x8D7C, 0x92FC,0x8D7D, 0x95A4,0x8D7E, 0x964D,0x8D80, 0x9805,0x8D81, 0x9999,0x8D82, 0x9AD8,0x8D83, 0x9D3B,0x8D84, 0x525B,0x8D85, 0x52AB,0x8D86, 0x53F7,0x8D87, 0x5408,0x8D88, 0x58D5,0x8D89, 0x62F7,0x8D8A, 0x6FE0,0x8D8B, 0x8C6A,0x8D8C, 0x8F5F,0x8D8D, 0x9EB9,0x8D8E, 0x514B,0x8D8F, 0x523B,0x8D90, 0x544A,0x8D91, 0x56FD,0x8D92, 0x7A40,0x8D93, 0x9177,0x8D94, 0x9D60,0x8D95, 0x9ED2,0x8D96, 0x7344,0x8D97, 0x6F09,0x8D98, 0x8170,0x8D99, 0x7511,0x8D9A, 0x5FFD,0x8D9B, 0x60DA,0x8D9C, 0x9AA8,0x8D9D, 0x72DB,0x8D9E, 0x8FBC,0x8D9F, 0x6B64,0x8DA0, 0x9803,0x8DA1, 0x4ECA,0x8DA2, 0x56F0,0x8DA3, 0x5764,0x8DA4, 0x58BE,0x8DA5, 0x5A5A,0x8DA6, 0x6068,0x8DA7, 0x61C7,0x8DA8, 0x660F,0x8DA9, 0x6606,0x8DAA, 0x6839,0x8DAB, 0x68B1,0x8DAC, 0x6DF7,0x8DAD, 0x75D5,0x8DAE, 0x7D3A,0x8DAF, 0x826E,0x8DB0, 0x9B42,0x8DB1, 0x4E9B,0x8DB2, 0x4F50,0x8DB3, 0x53C9,0x8DB4, 0x5506,0x8DB5, 0x5D6F,0x8DB6, 0x5DE6,0x8DB7, 0x5DEE,0x8DB8, 0x67FB,0x8DB9, 0x6C99,0x8DBA, 0x7473,0x8DBB, 0x7802,0x8DBC, 0x8A50,0x8DBD, 0x9396,0x8DBE, 0x88DF,0x8DBF, 0x5750,0x8DC0, 0x5EA7,0x8DC1, 0x632B,0x8DC2, 0x50B5,0x8DC3, 0x50AC,0x8DC4, 0x518D,0x8DC5, 0x6700,0x8DC6, 0x54C9,0x8DC7, 0x585E,0x8DC8, 0x59BB,0x8DC9, 0x5BB0,0x8DCA, 0x5F69,0x8DCB, 0x624D,0x8DCC, 0x63A1,0x8DCD, 0x683D,0x8DCE, 0x6B73,0x8DCF, 0x6E08,0x8DD0, 0x707D,0x8DD1, 0x91C7,0x8DD2, 0x7280,0x8DD3, 0x7815,0x8DD4, 0x7826,0x8DD5, 0x796D,0x8DD6, 0x658E,0x8DD7, 0x7D30,0x8DD8, 0x83DC,0x8DD9, 0x88C1,0x8DDA, 0x8F09,0x8DDB, 0x969B,0x8DDC, 0x5264,0x8DDD, 0x5728,0x8DDE, 0x6750,0x8DDF, 0x7F6A,0x8DE0, 0x8CA1,0x8DE1, 0x51B4,0x8DE2, 0x5742,0x8DE3, 0x962A,0x8DE4, 0x583A,0x8DE5, 0x698A,0x8DE6, 0x80B4,0x8DE7, 0x54B2,0x8DE8, 0x5D0E,0x8DE9, 0x57FC,0x8DEA, 0x7895,0x8DEB, 0x9DFA,0x8DEC, 0x4F5C,0x8DED, 0x524A,0x8DEE, 0x548B,0x8DEF, 0x643E,0x8DF0, 0x6628,0x8DF1, 0x6714,0x8DF2, 0x67F5,0x8DF3, 0x7A84,0x8DF4, 0x7B56,0x8DF5, 0x7D22,0x8DF6, 0x932F,0x8DF7, 0x685C,0x8DF8, 0x9BAD,0x8DF9, 0x7B39,0x8DFA, 0x5319,0x8DFB, 0x518A,0x8DFC, 0x5237,0x8E40, 0x5BDF,0x8E41, 0x62F6,0x8E42, 0x64AE,0x8E43, 0x64E6,0x8E44, 0x672D,0x8E45, 0x6BBA,0x8E46, 0x85A9,0x8E47, 0x96D1,0x8E48, 0x7690,0x8E49, 0x9BD6,0x8E4A, 0x634C,0x8E4B, 0x9306,0x8E4C, 0x9BAB,0x8E4D, 0x76BF,0x8E4E, 0x6652,0x8E4F, 0x4E09,0x8E50, 0x5098,0x8E51, 0x53C2,0x8E52, 0x5C71,0x8E53, 0x60E8,0x8E54, 0x6492,0x8E55, 0x6563,0x8E56, 0x685F,0x8E57, 0x71E6,0x8E58, 0x73CA,0x8E59, 0x7523,0x8E5A, 0x7B97,0x8E5B, 0x7E82,0x8E5C, 0x8695,0x8E5D, 0x8B83,0x8E5E, 0x8CDB,0x8E5F, 0x9178,0x8E60, 0x9910,0x8E61, 0x65AC,0x8E62, 0x66AB,0x8E63, 0x6B8B,0x8E64, 0x4ED5,0x8E65, 0x4ED4,0x8E66, 0x4F3A,0x8E67, 0x4F7F,0x8E68, 0x523A,0x8E69, 0x53F8,0x8E6A, 0x53F2,0x8E6B, 0x55E3,0x8E6C, 0x56DB,0x8E6D, 0x58EB,0x8E6E, 0x59CB,0x8E6F, 0x59C9,0x8E70, 0x59FF,0x8E71, 0x5B50,0x8E72, 0x5C4D,0x8E73, 0x5E02,0x8E74, 0x5E2B,0x8E75, 0x5FD7,0x8E76, 0x601D,0x8E77, 0x6307,0x8E78, 0x652F,0x8E79, 0x5B5C,0x8E7A, 0x65AF,0x8E7B, 0x65BD,0x8E7C, 0x65E8,0x8E7D, 0x679D,0x8E7E, 0x6B62,0x8E80, 0x6B7B,0x8E81, 0x6C0F,0x8E82, 0x7345,0x8E83, 0x7949,0x8E84, 0x79C1,0x8E85, 0x7CF8,0x8E86, 0x7D19,0x8E87, 0x7D2B,0x8E88, 0x80A2,0x8E89, 0x8102,0x8E8A, 0x81F3,0x8E8B, 0x8996,0x8E8C, 0x8A5E,0x8E8D, 0x8A69,0x8E8E, 0x8A66,0x8E8F, 0x8A8C,0x8E90, 0x8AEE,0x8E91, 0x8CC7,0x8E92, 0x8CDC,0x8E93, 0x96CC,0x8E94, 0x98FC,0x8E95, 0x6B6F,0x8E96, 0x4E8B,0x8E97, 0x4F3C,0x8E98, 0x4F8D,0x8E99, 0x5150,0x8E9A, 0x5B57,0x8E9B, 0x5BFA,0x8E9C, 0x6148,0x8E9D, 0x6301,0x8E9E, 0x6642,0x8E9F, 0x6B21,0x8EA0, 0x6ECB,0x8EA1, 0x6CBB,0x8EA2, 0x723E,0x8EA3, 0x74BD,0x8EA4, 0x75D4,0x8EA5, 0x78C1,0x8EA6, 0x793A,0x8EA7, 0x800C,0x8EA8, 0x8033,0x8EA9, 0x81EA,0x8EAA, 0x8494,0x8EAB, 0x8F9E,0x8EAC, 0x6C50,0x8EAD, 0x9E7F,0x8EAE, 0x5F0F,0x8EAF, 0x8B58,0x8EB0, 0x9D2B,0x8EB1, 0x7AFA,0x8EB2, 0x8EF8,0x8EB3, 0x5B8D,0x8EB4, 0x96EB,0x8EB5, 0x4E03,0x8EB6, 0x53F1,0x8EB7, 0x57F7,0x8EB8, 0x5931,0x8EB9, 0x5AC9,0x8EBA, 0x5BA4,0x8EBB, 0x6089,0x8EBC, 0x6E7F,0x8EBD, 0x6F06,0x8EBE, 0x75BE,0x8EBF, 0x8CEA,0x8EC0, 0x5B9F,0x8EC1, 0x8500,0x8EC2, 0x7BE0,0x8EC3, 0x5072,0x8EC4, 0x67F4,0x8EC5, 0x829D,0x8EC6, 0x5C61,0x8EC7, 0x854A,0x8EC8, 0x7E1E,0x8EC9, 0x820E,0x8ECA, 0x5199,0x8ECB, 0x5C04,0x8ECC, 0x6368,0x8ECD, 0x8D66,0x8ECE, 0x659C,0x8ECF, 0x716E,0x8ED0, 0x793E,0x8ED1, 0x7D17,0x8ED2, 0x8005,0x8ED3, 0x8B1D,0x8ED4, 0x8ECA,0x8ED5, 0x906E,0x8ED6, 0x86C7,0x8ED7, 0x90AA,0x8ED8, 0x501F,0x8ED9, 0x52FA,0x8EDA, 0x5C3A,0x8EDB, 0x6753,0x8EDC, 0x707C,0x8EDD, 0x7235,0x8EDE, 0x914C,0x8EDF, 0x91C8,0x8EE0, 0x932B,0x8EE1, 0x82E5,0x8EE2, 0x5BC2,0x8EE3, 0x5F31,0x8EE4, 0x60F9,0x8EE5, 0x4E3B,0x8EE6, 0x53D6,0x8EE7, 0x5B88,0x8EE8, 0x624B,0x8EE9, 0x6731,0x8EEA, 0x6B8A,0x8EEB, 0x72E9,0x8EEC, 0x73E0,0x8EED, 0x7A2E,0x8EEE, 0x816B,0x8EEF, 0x8DA3,0x8EF0, 0x9152,0x8EF1, 0x9996,0x8EF2, 0x5112,0x8EF3, 0x53D7,0x8EF4, 0x546A,0x8EF5, 0x5BFF,0x8EF6, 0x6388,0x8EF7, 0x6A39,0x8EF8, 0x7DAC,0x8EF9, 0x9700,0x8EFA, 0x56DA,0x8EFB, 0x53CE,0x8EFC, 0x5468,0x8F40, 0x5B97,0x8F41, 0x5C31,0x8F42, 0x5DDE,0x8F43, 0x4FEE,0x8F44, 0x6101,0x8F45, 0x62FE,0x8F46, 0x6D32,0x8F47, 0x79C0,0x8F48, 0x79CB,0x8F49, 0x7D42,0x8F4A, 0x7E4D,0x8F4B, 0x7FD2,0x8F4C, 0x81ED,0x8F4D, 0x821F,0x8F4E, 0x8490,0x8F4F, 0x8846,0x8F50, 0x8972,0x8F51, 0x8B90,0x8F52, 0x8E74,0x8F53, 0x8F2F,0x8F54, 0x9031,0x8F55, 0x914B,0x8F56, 0x916C,0x8F57, 0x96C6,0x8F58, 0x919C,0x8F59, 0x4EC0,0x8F5A, 0x4F4F,0x8F5B, 0x5145,0x8F5C, 0x5341,0x8F5D, 0x5F93,0x8F5E, 0x620E,0x8F5F, 0x67D4,0x8F60, 0x6C41,0x8F61, 0x6E0B,0x8F62, 0x7363,0x8F63, 0x7E26,0x8F64, 0x91CD,0x8F65, 0x9283,0x8F66, 0x53D4,0x8F67, 0x5919,0x8F68, 0x5BBF,0x8F69, 0x6DD1,0x8F6A, 0x795D,0x8F6B, 0x7E2E,0x8F6C, 0x7C9B,0x8F6D, 0x587E,0x8F6E, 0x719F,0x8F6F, 0x51FA,0x8F70, 0x8853,0x8F71, 0x8FF0,0x8F72, 0x4FCA,0x8F73, 0x5CFB,0x8F74, 0x6625,0x8F75, 0x77AC,0x8F76, 0x7AE3,0x8F77, 0x821C,0x8F78, 0x99FF,0x8F79, 0x51C6,0x8F7A, 0x5FAA,0x8F7B, 0x65EC,0x8F7C, 0x696F,0x8F7D, 0x6B89,0x8F7E, 0x6DF3,0x8F80, 0x6E96,0x8F81, 0x6F64,0x8F82, 0x76FE,0x8F83, 0x7D14,0x8F84, 0x5DE1,0x8F85, 0x9075,0x8F86, 0x9187,0x8F87, 0x9806,0x8F88, 0x51E6,0x8F89, 0x521D,0x8F8A, 0x6240,0x8F8B, 0x6691,0x8F8C, 0x66D9,0x8F8D, 0x6E1A,0x8F8E, 0x5EB6,0x8F8F, 0x7DD2,0x8F90, 0x7F72,0x8F91, 0x66F8,0x8F92, 0x85AF,0x8F93, 0x85F7,0x8F94, 0x8AF8,0x8F95, 0x52A9,0x8F96, 0x53D9,0x8F97, 0x5973,0x8F98, 0x5E8F,0x8F99, 0x5F90,0x8F9A, 0x6055,0x8F9B, 0x92E4,0x8F9C, 0x9664,0x8F9D, 0x50B7,0x8F9E, 0x511F,0x8F9F, 0x52DD,0x8FA0, 0x5320,0x8FA1, 0x5347,0x8FA2, 0x53EC,0x8FA3, 0x54E8,0x8FA4, 0x5546,0x8FA5, 0x5531,0x8FA6, 0x5617,0x8FA7, 0x5968,0x8FA8, 0x59BE,0x8FA9, 0x5A3C,0x8FAA, 0x5BB5,0x8FAB, 0x5C06,0x8FAC, 0x5C0F,0x8FAD, 0x5C11,0x8FAE, 0x5C1A,0x8FAF, 0x5E84,0x8FB0, 0x5E8A,0x8FB1, 0x5EE0,0x8FB2, 0x5F70,0x8FB3, 0x627F,0x8FB4, 0x6284,0x8FB5, 0x62DB,0x8FB6, 0x638C,0x8FB7, 0x6377,0x8FB8, 0x6607,0x8FB9, 0x660C,0x8FBA, 0x662D,0x8FBB, 0x6676,0x8FBC, 0x677E,0x8FBD, 0x68A2,0x8FBE, 0x6A1F,0x8FBF, 0x6A35,0x8FC0, 0x6CBC,0x8FC1, 0x6D88,0x8FC2, 0x6E09,0x8FC3, 0x6E58,0x8FC4, 0x713C,0x8FC5, 0x7126,0x8FC6, 0x7167,0x8FC7, 0x75C7,0x8FC8, 0x7701,0x8FC9, 0x785D,0x8FCA, 0x7901,0x8FCB, 0x7965,0x8FCC, 0x79F0,0x8FCD, 0x7AE0,0x8FCE, 0x7B11,0x8FCF, 0x7CA7,0x8FD0, 0x7D39,0x8FD1, 0x8096,0x8FD2, 0x83D6,0x8FD3, 0x848B,0x8FD4, 0x8549,0x8FD5, 0x885D,0x8FD6, 0x88F3,0x8FD7, 0x8A1F,0x8FD8, 0x8A3C,0x8FD9, 0x8A54,0x8FDA, 0x8A73,0x8FDB, 0x8C61,0x8FDC, 0x8CDE,0x8FDD, 0x91A4,0x8FDE, 0x9266,0x8FDF, 0x937E,0x8FE0, 0x9418,0x8FE1, 0x969C,0x8FE2, 0x9798,0x8FE3, 0x4E0A,0x8FE4, 0x4E08,0x8FE5, 0x4E1E,0x8FE6, 0x4E57,0x8FE7, 0x5197,0x8FE8, 0x5270,0x8FE9, 0x57CE,0x8FEA, 0x5834,0x8FEB, 0x58CC,0x8FEC, 0x5B22,0x8FED, 0x5E38,0x8FEE, 0x60C5,0x8FEF, 0x64FE,0x8FF0, 0x6761,0x8FF1, 0x6756,0x8FF2, 0x6D44,0x8FF3, 0x72B6,0x8FF4, 0x7573,0x8FF5, 0x7A63,0x8FF6, 0x84B8,0x8FF7, 0x8B72,0x8FF8, 0x91B8,0x8FF9, 0x9320,0x8FFA, 0x5631,0x8FFB, 0x57F4,0x8FFC, 0x98FE,0x9040, 0x62ED,0x9041, 0x690D,0x9042, 0x6B96,0x9043, 0x71ED,0x9044, 0x7E54,0x9045, 0x8077,0x9046, 0x8272,0x9047, 0x89E6,0x9048, 0x98DF,0x9049, 0x8755,0x904A, 0x8FB1,0x904B, 0x5C3B,0x904C, 0x4F38,0x904D, 0x4FE1,0x904E, 0x4FB5,0x904F, 0x5507,0x9050, 0x5A20,0x9051, 0x5BDD,0x9052, 0x5BE9,0x9053, 0x5FC3,0x9054, 0x614E,0x9055, 0x632F,0x9056, 0x65B0,0x9057, 0x664B,0x9058, 0x68EE,0x9059, 0x699B,0x905A, 0x6D78,0x905B, 0x6DF1,0x905C, 0x7533,0x905D, 0x75B9,0x905E, 0x771F,0x905F, 0x795E,0x9060, 0x79E6,0x9061, 0x7D33,0x9062, 0x81E3,0x9063, 0x82AF,0x9064, 0x85AA,0x9065, 0x89AA,0x9066, 0x8A3A,0x9067, 0x8EAB,0x9068, 0x8F9B,0x9069, 0x9032,0x906A, 0x91DD,0x906B, 0x9707,0x906C, 0x4EBA,0x906D, 0x4EC1,0x906E, 0x5203,0x906F, 0x5875,0x9070, 0x58EC,0x9071, 0x5C0B,0x9072, 0x751A,0x9073, 0x5C3D,0x9074, 0x814E,0x9075, 0x8A0A,0x9076, 0x8FC5,0x9077, 0x9663,0x9078, 0x976D,0x9079, 0x7B25,0x907A, 0x8ACF,0x907B, 0x9808,0x907C, 0x9162,0x907D, 0x56F3,0x907E, 0x53A8,0x9080, 0x9017,0x9081, 0x5439,0x9082, 0x5782,0x9083, 0x5E25,0x9084, 0x63A8,0x9085, 0x6C34,0x9086, 0x708A,0x9087, 0x7761,0x9088, 0x7C8B,0x9089, 0x7FE0,0x908A, 0x8870,0x908B, 0x9042,0x908C, 0x9154,0x908D, 0x9310,0x908E, 0x9318,0x908F, 0x968F,0x9090, 0x745E,0x9091, 0x9AC4,0x9092, 0x5D07,0x9093, 0x5D69,0x9094, 0x6570,0x9095, 0x67A2,0x9096, 0x8DA8,0x9097, 0x96DB,0x9098, 0x636E,0x9099, 0x6749,0x909A, 0x6919,0x909B, 0x83C5,0x909C, 0x9817,0x909D, 0x96C0,0x909E, 0x88FE,0x909F, 0x6F84,0x90A0, 0x647A,0x90A1, 0x5BF8,0x90A2, 0x4E16,0x90A3, 0x702C,0x90A4, 0x755D,0x90A5, 0x662F,0x90A6, 0x51C4,0x90A7, 0x5236,0x90A8, 0x52E2,0x90A9, 0x59D3,0x90AA, 0x5F81,0x90AB, 0x6027,0x90AC, 0x6210,0x90AD, 0x653F,0x90AE, 0x6574,0x90AF, 0x661F,0x90B0, 0x6674,0x90B1, 0x68F2,0x90B2, 0x6816,0x90B3, 0x6B63,0x90B4, 0x6E05,0x90B5, 0x7272,0x90B6, 0x751F,0x90B7, 0x76DB,0x90B8, 0x7CBE,0x90B9, 0x8056,0x90BA, 0x58F0,0x90BB, 0x88FD,0x90BC, 0x897F,0x90BD, 0x8AA0,0x90BE, 0x8A93,0x90BF, 0x8ACB,0x90C0, 0x901D,0x90C1, 0x9192,0x90C2, 0x9752,0x90C3, 0x9759,0x90C4, 0x6589,0x90C5, 0x7A0E,0x90C6, 0x8106,0x90C7, 0x96BB,0x90C8, 0x5E2D,0x90C9, 0x60DC,0x90CA, 0x621A,0x90CB, 0x65A5,0x90CC, 0x6614,0x90CD, 0x6790,0x90CE, 0x77F3,0x90CF, 0x7A4D,0x90D0, 0x7C4D,0x90D1, 0x7E3E,0x90D2, 0x810A,0x90D3, 0x8CAC,0x90D4, 0x8D64,0x90D5, 0x8DE1,0x90D6, 0x8E5F,0x90D7, 0x78A9,0x90D8, 0x5207,0x90D9, 0x62D9,0x90DA, 0x63A5,0x90DB, 0x6442,0x90DC, 0x6298,0x90DD, 0x8A2D,0x90DE, 0x7A83,0x90DF, 0x7BC0,0x90E0, 0x8AAC,0x90E1, 0x96EA,0x90E2, 0x7D76,0x90E3, 0x820C,0x90E4, 0x8749,0x90E5, 0x4ED9,0x90E6, 0x5148,0x90E7, 0x5343,0x90E8, 0x5360,0x90E9, 0x5BA3,0x90EA, 0x5C02,0x90EB, 0x5C16,0x90EC, 0x5DDD,0x90ED, 0x6226,0x90EE, 0x6247,0x90EF, 0x64B0,0x90F0, 0x6813,0x90F1, 0x6834,0x90F2, 0x6CC9,0x90F3, 0x6D45,0x90F4, 0x6D17,0x90F5, 0x67D3,0x90F6, 0x6F5C,0x90F7, 0x714E,0x90F8, 0x717D,0x90F9, 0x65CB,0x90FA, 0x7A7F,0x90FB, 0x7BAD,0x90FC, 0x7DDA,0x9140, 0x7E4A,0x9141, 0x7FA8,0x9142, 0x817A,0x9143, 0x821B,0x9144, 0x8239,0x9145, 0x85A6,0x9146, 0x8A6E,0x9147, 0x8CCE,0x9148, 0x8DF5,0x9149, 0x9078,0x914A, 0x9077,0x914B, 0x92AD,0x914C, 0x9291,0x914D, 0x9583,0x914E, 0x9BAE,0x914F, 0x524D,0x9150, 0x5584,0x9151, 0x6F38,0x9152, 0x7136,0x9153, 0x5168,0x9154, 0x7985,0x9155, 0x7E55,0x9156, 0x81B3,0x9157, 0x7CCE,0x9158, 0x564C,0x9159, 0x5851,0x915A, 0x5CA8,0x915B, 0x63AA,0x915C, 0x66FE,0x915D, 0x66FD,0x915E, 0x695A,0x915F, 0x72D9,0x9160, 0x758F,0x9161, 0x758E,0x9162, 0x790E,0x9163, 0x7956,0x9164, 0x79DF,0x9165, 0x7C97,0x9166, 0x7D20,0x9167, 0x7D44,0x9168, 0x8607,0x9169, 0x8A34,0x916A, 0x963B,0x916B, 0x9061,0x916C, 0x9F20,0x916D, 0x50E7,0x916E, 0x5275,0x916F, 0x53CC,0x9170, 0x53E2,0x9171, 0x5009,0x9172, 0x55AA,0x9173, 0x58EE,0x9174, 0x594F,0x9175, 0x723D,0x9176, 0x5B8B,0x9177, 0x5C64,0x9178, 0x531D,0x9179, 0x60E3,0x917A, 0x60F3,0x917B, 0x635C,0x917C, 0x6383,0x917D, 0x633F,0x917E, 0x63BB,0x9180, 0x64CD,0x9181, 0x65E9,0x9182, 0x66F9,0x9183, 0x5DE3,0x9184, 0x69CD,0x9185, 0x69FD,0x9186, 0x6F15,0x9187, 0x71E5,0x9188, 0x4E89,0x9189, 0x75E9,0x918A, 0x76F8,0x918B, 0x7A93,0x918C, 0x7CDF,0x918D, 0x7DCF,0x918E, 0x7D9C,0x918F, 0x8061,0x9190, 0x8349,0x9191, 0x8358,0x9192, 0x846C,0x9193, 0x84BC,0x9194, 0x85FB,0x9195, 0x88C5,0x9196, 0x8D70,0x9197, 0x9001,0x9198, 0x906D,0x9199, 0x9397,0x919A, 0x971C,0x919B, 0x9A12,0x919C, 0x50CF,0x919D, 0x5897,0x919E, 0x618E,0x919F, 0x81D3,0x91A0, 0x8535,0x91A1, 0x8D08,0x91A2, 0x9020,0x91A3, 0x4FC3,0x91A4, 0x5074,0x91A5, 0x5247,0x91A6, 0x5373,0x91A7, 0x606F,0x91A8, 0x6349,0x91A9, 0x675F,0x91AA, 0x6E2C,0x91AB, 0x8DB3,0x91AC, 0x901F,0x91AD, 0x4FD7,0x91AE, 0x5C5E,0x91AF, 0x8CCA,0x91B0, 0x65CF,0x91B1, 0x7D9A,0x91B2, 0x5352,0x91B3, 0x8896,0x91B4, 0x5176,0x91B5, 0x63C3,0x91B6, 0x5B58,0x91B7, 0x5B6B,0x91B8, 0x5C0A,0x91B9, 0x640D,0x91BA, 0x6751,0x91BB, 0x905C,0x91BC, 0x4ED6,0x91BD, 0x591A,0x91BE, 0x592A,0x91BF, 0x6C70,0x91C0, 0x8A51,0x91C1, 0x553E,0x91C2, 0x5815,0x91C3, 0x59A5,0x91C4, 0x60F0,0x91C5, 0x6253,0x91C6, 0x67C1,0x91C7, 0x8235,0x91C8, 0x6955,0x91C9, 0x9640,0x91CA, 0x99C4,0x91CB, 0x9A28,0x91CC, 0x4F53,0x91CD, 0x5806,0x91CE, 0x5BFE,0x91CF, 0x8010,0x91D0, 0x5CB1,0x91D1, 0x5E2F,0x91D2, 0x5F85,0x91D3, 0x6020,0x91D4, 0x614B,0x91D5, 0x6234,0x91D6, 0x66FF,0x91D7, 0x6CF0,0x91D8, 0x6EDE,0x91D9, 0x80CE,0x91DA, 0x817F,0x91DB, 0x82D4,0x91DC, 0x888B,0x91DD, 0x8CB8,0x91DE, 0x9000,0x91DF, 0x902E,0x91E0, 0x968A,0x91E1, 0x9EDB,0x91E2, 0x9BDB,0x91E3, 0x4EE3,0x91E4, 0x53F0,0x91E5, 0x5927,0x91E6, 0x7B2C,0x91E7, 0x918D,0x91E8, 0x984C,0x91E9, 0x9DF9,0x91EA, 0x6EDD,0x91EB, 0x7027,0x91EC, 0x5353,0x91ED, 0x5544,0x91EE, 0x5B85,0x91EF, 0x6258,0x91F0, 0x629E,0x91F1, 0x62D3,0x91F2, 0x6CA2,0x91F3, 0x6FEF,0x91F4, 0x7422,0x91F5, 0x8A17,0x91F6, 0x9438,0x91F7, 0x6FC1,0x91F8, 0x8AFE,0x91F9, 0x8338,0x91FA, 0x51E7,0x91FB, 0x86F8,0x91FC, 0x53EA,0x9240, 0x53E9,0x9241, 0x4F46,0x9242, 0x9054,0x9243, 0x8FB0,0x9244, 0x596A,0x9245, 0x8131,0x9246, 0x5DFD,0x9247, 0x7AEA,0x9248, 0x8FBF,0x9249, 0x68DA,0x924A, 0x8C37,0x924B, 0x72F8,0x924C, 0x9C48,0x924D, 0x6A3D,0x924E, 0x8AB0,0x924F, 0x4E39,0x9250, 0x5358,0x9251, 0x5606,0x9252, 0x5766,0x9253, 0x62C5,0x9254, 0x63A2,0x9255, 0x65E6,0x9256, 0x6B4E,0x9257, 0x6DE1,0x9258, 0x6E5B,0x9259, 0x70AD,0x925A, 0x77ED,0x925B, 0x7AEF,0x925C, 0x7BAA,0x925D, 0x7DBB,0x925E, 0x803D,0x925F, 0x80C6,0x9260, 0x86CB,0x9261, 0x8A95,0x9262, 0x935B,0x9263, 0x56E3,0x9264, 0x58C7,0x9265, 0x5F3E,0x9266, 0x65AD,0x9267, 0x6696,0x9268, 0x6A80,0x9269, 0x6BB5,0x926A, 0x7537,0x926B, 0x8AC7,0x926C, 0x5024,0x926D, 0x77E5,0x926E, 0x5730,0x926F, 0x5F1B,0x9270, 0x6065,0x9271, 0x667A,0x9272, 0x6C60,0x9273, 0x75F4,0x9274, 0x7A1A,0x9275, 0x7F6E,0x9276, 0x81F4,0x9277, 0x8718,0x9278, 0x9045,0x9279, 0x99B3,0x927A, 0x7BC9,0x927B, 0x755C,0x927C, 0x7AF9,0x927D, 0x7B51,0x927E, 0x84C4,0x9280, 0x9010,0x9281, 0x79E9,0x9282, 0x7A92,0x9283, 0x8336,0x9284, 0x5AE1,0x9285, 0x7740,0x9286, 0x4E2D,0x9287, 0x4EF2,0x9288, 0x5B99,0x9289, 0x5FE0,0x928A, 0x62BD,0x928B, 0x663C,0x928C, 0x67F1,0x928D, 0x6CE8,0x928E, 0x866B,0x928F, 0x8877,0x9290, 0x8A3B,0x9291, 0x914E,0x9292, 0x92F3,0x9293, 0x99D0,0x9294, 0x6A17,0x9295, 0x7026,0x9296, 0x732A,0x9297, 0x82E7,0x9298, 0x8457,0x9299, 0x8CAF,0x929A, 0x4E01,0x929B, 0x5146,0x929C, 0x51CB,0x929D, 0x558B,0x929E, 0x5BF5,0x929F, 0x5E16,0x92A0, 0x5E33,0x92A1, 0x5E81,0x92A2, 0x5F14,0x92A3, 0x5F35,0x92A4, 0x5F6B,0x92A5, 0x5FB4,0x92A6, 0x61F2,0x92A7, 0x6311,0x92A8, 0x66A2,0x92A9, 0x671D,0x92AA, 0x6F6E,0x92AB, 0x7252,0x92AC, 0x753A,0x92AD, 0x773A,0x92AE, 0x8074,0x92AF, 0x8139,0x92B0, 0x8178,0x92B1, 0x8776,0x92B2, 0x8ABF,0x92B3, 0x8ADC,0x92B4, 0x8D85,0x92B5, 0x8DF3,0x92B6, 0x929A,0x92B7, 0x9577,0x92B8, 0x9802,0x92B9, 0x9CE5,0x92BA, 0x52C5,0x92BB, 0x6357,0x92BC, 0x76F4,0x92BD, 0x6715,0x92BE, 0x6C88,0x92BF, 0x73CD,0x92C0, 0x8CC3,0x92C1, 0x93AE,0x92C2, 0x9673,0x92C3, 0x6D25,0x92C4, 0x589C,0x92C5, 0x690E,0x92C6, 0x69CC,0x92C7, 0x8FFD,0x92C8, 0x939A,0x92C9, 0x75DB,0x92CA, 0x901A,0x92CB, 0x585A,0x92CC, 0x6802,0x92CD, 0x63B4,0x92CE, 0x69FB,0x92CF, 0x4F43,0x92D0, 0x6F2C,0x92D1, 0x67D8,0x92D2, 0x8FBB,0x92D3, 0x8526,0x92D4, 0x7DB4,0x92D5, 0x9354,0x92D6, 0x693F,0x92D7, 0x6F70,0x92D8, 0x576A,0x92D9, 0x58F7,0x92DA, 0x5B2C,0x92DB, 0x7D2C,0x92DC, 0x722A,0x92DD, 0x540A,0x92DE, 0x91E3,0x92DF, 0x9DB4,0x92E0, 0x4EAD,0x92E1, 0x4F4E,0x92E2, 0x505C,0x92E3, 0x5075,0x92E4, 0x5243,0x92E5, 0x8C9E,0x92E6, 0x5448,0x92E7, 0x5824,0x92E8, 0x5B9A,0x92E9, 0x5E1D,0x92EA, 0x5E95,0x92EB, 0x5EAD,0x92EC, 0x5EF7,0x92ED, 0x5F1F,0x92EE, 0x608C,0x92EF, 0x62B5,0x92F0, 0x633A,0x92F1, 0x63D0,0x92F2, 0x68AF,0x92F3, 0x6C40,0x92F4, 0x7887,0x92F5, 0x798E,0x92F6, 0x7A0B,0x92F7, 0x7DE0,0x92F8, 0x8247,0x92F9, 0x8A02,0x92FA, 0x8AE6,0x92FB, 0x8E44,0x92FC, 0x9013,0x9340, 0x90B8,0x9341, 0x912D,0x9342, 0x91D8,0x9343, 0x9F0E,0x9344, 0x6CE5,0x9345, 0x6458,0x9346, 0x64E2,0x9347, 0x6575,0x9348, 0x6EF4,0x9349, 0x7684,0x934A, 0x7B1B,0x934B, 0x9069,0x934C, 0x93D1,0x934D, 0x6EBA,0x934E, 0x54F2,0x934F, 0x5FB9,0x9350, 0x64A4,0x9351, 0x8F4D,0x9352, 0x8FED,0x9353, 0x9244,0x9354, 0x5178,0x9355, 0x586B,0x9356, 0x5929,0x9357, 0x5C55,0x9358, 0x5E97,0x9359, 0x6DFB,0x935A, 0x7E8F,0x935B, 0x751C,0x935C, 0x8CBC,0x935D, 0x8EE2,0x935E, 0x985B,0x935F, 0x70B9,0x9360, 0x4F1D,0x9361, 0x6BBF,0x9362, 0x6FB1,0x9363, 0x7530,0x9364, 0x96FB,0x9365, 0x514E,0x9366, 0x5410,0x9367, 0x5835,0x9368, 0x5857,0x9369, 0x59AC,0x936A, 0x5C60,0x936B, 0x5F92,0x936C, 0x6597,0x936D, 0x675C,0x936E, 0x6E21,0x936F, 0x767B,0x9370, 0x83DF,0x9371, 0x8CED,0x9372, 0x9014,0x9373, 0x90FD,0x9374, 0x934D,0x9375, 0x7825,0x9376, 0x783A,0x9377, 0x52AA,0x9378, 0x5EA6,0x9379, 0x571F,0x937A, 0x5974,0x937B, 0x6012,0x937C, 0x5012,0x937D, 0x515A,0x937E, 0x51AC,0x9380, 0x51CD,0x9381, 0x5200,0x9382, 0x5510,0x9383, 0x5854,0x9384, 0x5858,0x9385, 0x5957,0x9386, 0x5B95,0x9387, 0x5CF6,0x9388, 0x5D8B,0x9389, 0x60BC,0x938A, 0x6295,0x938B, 0x642D,0x938C, 0x6771,0x938D, 0x6843,0x938E, 0x68BC,0x938F, 0x68DF,0x9390, 0x76D7,0x9391, 0x6DD8,0x9392, 0x6E6F,0x9393, 0x6D9B,0x9394, 0x706F,0x9395, 0x71C8,0x9396, 0x5F53,0x9397, 0x75D8,0x9398, 0x7977,0x9399, 0x7B49,0x939A, 0x7B54,0x939B, 0x7B52,0x939C, 0x7CD6,0x939D, 0x7D71,0x939E, 0x5230,0x939F, 0x8463,0x93A0, 0x8569,0x93A1, 0x85E4,0x93A2, 0x8A0E,0x93A3, 0x8B04,0x93A4, 0x8C46,0x93A5, 0x8E0F,0x93A6, 0x9003,0x93A7, 0x900F,0x93A8, 0x9419,0x93A9, 0x9676,0x93AA, 0x982D,0x93AB, 0x9A30,0x93AC, 0x95D8,0x93AD, 0x50CD,0x93AE, 0x52D5,0x93AF, 0x540C,0x93B0, 0x5802,0x93B1, 0x5C0E,0x93B2, 0x61A7,0x93B3, 0x649E,0x93B4, 0x6D1E,0x93B5, 0x77B3,0x93B6, 0x7AE5,0x93B7, 0x80F4,0x93B8, 0x8404,0x93B9, 0x9053,0x93BA, 0x9285,0x93BB, 0x5CE0,0x93BC, 0x9D07,0x93BD, 0x533F,0x93BE, 0x5F97,0x93BF, 0x5FB3,0x93C0, 0x6D9C,0x93C1, 0x7279,0x93C2, 0x7763,0x93C3, 0x79BF,0x93C4, 0x7BE4,0x93C5, 0x6BD2,0x93C6, 0x72EC,0x93C7, 0x8AAD,0x93C8, 0x6803,0x93C9, 0x6A61,0x93CA, 0x51F8,0x93CB, 0x7A81,0x93CC, 0x6934,0x93CD, 0x5C4A,0x93CE, 0x9CF6,0x93CF, 0x82EB,0x93D0, 0x5BC5,0x93D1, 0x9149,0x93D2, 0x701E,0x93D3, 0x5678,0x93D4, 0x5C6F,0x93D5, 0x60C7,0x93D6, 0x6566,0x93D7, 0x6C8C,0x93D8, 0x8C5A,0x93D9, 0x9041,0x93DA, 0x9813,0x93DB, 0x5451,0x93DC, 0x66C7,0x93DD, 0x920D,0x93DE, 0x5948,0x93DF, 0x90A3,0x93E0, 0x5185,0x93E1, 0x4E4D,0x93E2, 0x51EA,0x93E3, 0x8599,0x93E4, 0x8B0E,0x93E5, 0x7058,0x93E6, 0x637A,0x93E7, 0x934B,0x93E8, 0x6962,0x93E9, 0x99B4,0x93EA, 0x7E04,0x93EB, 0x7577,0x93EC, 0x5357,0x93ED, 0x6960,0x93EE, 0x8EDF,0x93EF, 0x96E3,0x93F0, 0x6C5D,0x93F1, 0x4E8C,0x93F2, 0x5C3C,0x93F3, 0x5F10,0x93F4, 0x8FE9,0x93F5, 0x5302,0x93F6, 0x8CD1,0x93F7, 0x8089,0x93F8, 0x8679,0x93F9, 0x5EFF,0x93FA, 0x65E5,0x93FB, 0x4E73,0x93FC, 0x5165,0x9440, 0x5982,0x9441, 0x5C3F,0x9442, 0x97EE,0x9443, 0x4EFB,0x9444, 0x598A,0x9445, 0x5FCD,0x9446, 0x8A8D,0x9447, 0x6FE1,0x9448, 0x79B0,0x9449, 0x7962,0x944A, 0x5BE7,0x944B, 0x8471,0x944C, 0x732B,0x944D, 0x71B1,0x944E, 0x5E74,0x944F, 0x5FF5,0x9450, 0x637B,0x9451, 0x649A,0x9452, 0x71C3,0x9453, 0x7C98,0x9454, 0x4E43,0x9455, 0x5EFC,0x9456, 0x4E4B,0x9457, 0x57DC,0x9458, 0x56A2,0x9459, 0x60A9,0x945A, 0x6FC3,0x945B, 0x7D0D,0x945C, 0x80FD,0x945D, 0x8133,0x945E, 0x81BF,0x945F, 0x8FB2,0x9460, 0x8997,0x9461, 0x86A4,0x9462, 0x5DF4,0x9463, 0x628A,0x9464, 0x64AD,0x9465, 0x8987,0x9466, 0x6777,0x9467, 0x6CE2,0x9468, 0x6D3E,0x9469, 0x7436,0x946A, 0x7834,0x946B, 0x5A46,0x946C, 0x7F75,0x946D, 0x82AD,0x946E, 0x99AC,0x946F, 0x4FF3,0x9470, 0x5EC3,0x9471, 0x62DD,0x9472, 0x6392,0x9473, 0x6557,0x9474, 0x676F,0x9475, 0x76C3,0x9476, 0x724C,0x9477, 0x80CC,0x9478, 0x80BA,0x9479, 0x8F29,0x947A, 0x914D,0x947B, 0x500D,0x947C, 0x57F9,0x947D, 0x5A92,0x947E, 0x6885,0x9480, 0x6973,0x9481, 0x7164,0x9482, 0x72FD,0x9483, 0x8CB7,0x9484, 0x58F2,0x9485, 0x8CE0,0x9486, 0x966A,0x9487, 0x9019,0x9488, 0x877F,0x9489, 0x79E4,0x948A, 0x77E7,0x948B, 0x8429,0x948C, 0x4F2F,0x948D, 0x5265,0x948E, 0x535A,0x948F, 0x62CD,0x9490, 0x67CF,0x9491, 0x6CCA,0x9492, 0x767D,0x9493, 0x7B94,0x9494, 0x7C95,0x9495, 0x8236,0x9496, 0x8584,0x9497, 0x8FEB,0x9498, 0x66DD,0x9499, 0x6F20,0x949A, 0x7206,0x949B, 0x7E1B,0x949C, 0x83AB,0x949D, 0x99C1,0x949E, 0x9EA6,0x949F, 0x51FD,0x94A0, 0x7BB1,0x94A1, 0x7872,0x94A2, 0x7BB8,0x94A3, 0x8087,0x94A4, 0x7B48,0x94A5, 0x6AE8,0x94A6, 0x5E61,0x94A7, 0x808C,0x94A8, 0x7551,0x94A9, 0x7560,0x94AA, 0x516B,0x94AB, 0x9262,0x94AC, 0x6E8C,0x94AD, 0x767A,0x94AE, 0x9197,0x94AF, 0x9AEA,0x94B0, 0x4F10,0x94B1, 0x7F70,0x94B2, 0x629C,0x94B3, 0x7B4F,0x94B4, 0x95A5,0x94B5, 0x9CE9,0x94B6, 0x567A,0x94B7, 0x5859,0x94B8, 0x86E4,0x94B9, 0x96BC,0x94BA, 0x4F34,0x94BB, 0x5224,0x94BC, 0x534A,0x94BD, 0x53CD,0x94BE, 0x53DB,0x94BF, 0x5E06,0x94C0, 0x642C,0x94C1, 0x6591,0x94C2, 0x677F,0x94C3, 0x6C3E,0x94C4, 0x6C4E,0x94C5, 0x7248,0x94C6, 0x72AF,0x94C7, 0x73ED,0x94C8, 0x7554,0x94C9, 0x7E41,0x94CA, 0x822C,0x94CB, 0x85E9,0x94CC, 0x8CA9,0x94CD, 0x7BC4,0x94CE, 0x91C6,0x94CF, 0x7169,0x94D0, 0x9812,0x94D1, 0x98EF,0x94D2, 0x633D,0x94D3, 0x6669,0x94D4, 0x756A,0x94D5, 0x76E4,0x94D6, 0x78D0,0x94D7, 0x8543,0x94D8, 0x86EE,0x94D9, 0x532A,0x94DA, 0x5351,0x94DB, 0x5426,0x94DC, 0x5983,0x94DD, 0x5E87,0x94DE, 0x5F7C,0x94DF, 0x60B2,0x94E0, 0x6249,0x94E1, 0x6279,0x94E2, 0x62AB,0x94E3, 0x6590,0x94E4, 0x6BD4,0x94E5, 0x6CCC,0x94E6, 0x75B2,0x94E7, 0x76AE,0x94E8, 0x7891,0x94E9, 0x79D8,0x94EA, 0x7DCB,0x94EB, 0x7F77,0x94EC, 0x80A5,0x94ED, 0x88AB,0x94EE, 0x8AB9,0x94EF, 0x8CBB,0x94F0, 0x907F,0x94F1, 0x975E,0x94F2, 0x98DB,0x94F3, 0x6A0B,0x94F4, 0x7C38,0x94F5, 0x5099,0x94F6, 0x5C3E,0x94F7, 0x5FAE,0x94F8, 0x6787,0x94F9, 0x6BD8,0x94FA, 0x7435,0x94FB, 0x7709,0x94FC, 0x7F8E,0x9540, 0x9F3B,0x9541, 0x67CA,0x9542, 0x7A17,0x9543, 0x5339,0x9544, 0x758B,0x9545, 0x9AED,0x9546, 0x5F66,0x9547, 0x819D,0x9548, 0x83F1,0x9549, 0x8098,0x954A, 0x5F3C,0x954B, 0x5FC5,0x954C, 0x7562,0x954D, 0x7B46,0x954E, 0x903C,0x954F, 0x6867,0x9550, 0x59EB,0x9551, 0x5A9B,0x9552, 0x7D10,0x9553, 0x767E,0x9554, 0x8B2C,0x9555, 0x4FF5,0x9556, 0x5F6A,0x9557, 0x6A19,0x9558, 0x6C37,0x9559, 0x6F02,0x955A, 0x74E2,0x955B, 0x7968,0x955C, 0x8868,0x955D, 0x8A55,0x955E, 0x8C79,0x955F, 0x5EDF,0x9560, 0x63CF,0x9561, 0x75C5,0x9562, 0x79D2,0x9563, 0x82D7,0x9564, 0x9328,0x9565, 0x92F2,0x9566, 0x849C,0x9567, 0x86ED,0x9568, 0x9C2D,0x9569, 0x54C1,0x956A, 0x5F6C,0x956B, 0x658C,0x956C, 0x6D5C,0x956D, 0x7015,0x956E, 0x8CA7,0x956F, 0x8CD3,0x9570, 0x983B,0x9571, 0x654F,0x9572, 0x74F6,0x9573, 0x4E0D,0x9574, 0x4ED8,0x9575, 0x57E0,0x9576, 0x592B,0x9577, 0x5A66,0x9578, 0x5BCC,0x9579, 0x51A8,0x957A, 0x5E03,0x957B, 0x5E9C,0x957C, 0x6016,0x957D, 0x6276,0x957E, 0x6577,0x9580, 0x65A7,0x9581, 0x666E,0x9582, 0x6D6E,0x9583, 0x7236,0x9584, 0x7B26,0x9585, 0x8150,0x9586, 0x819A,0x9587, 0x8299,0x9588, 0x8B5C,0x9589, 0x8CA0,0x958A, 0x8CE6,0x958B, 0x8D74,0x958C, 0x961C,0x958D, 0x9644,0x958E, 0x4FAE,0x958F, 0x64AB,0x9590, 0x6B66,0x9591, 0x821E,0x9592, 0x8461,0x9593, 0x856A,0x9594, 0x90E8,0x9595, 0x5C01,0x9596, 0x6953,0x9597, 0x98A8,0x9598, 0x847A,0x9599, 0x8557,0x959A, 0x4F0F,0x959B, 0x526F,0x959C, 0x5FA9,0x959D, 0x5E45,0x959E, 0x670D,0x959F, 0x798F,0x95A0, 0x8179,0x95A1, 0x8907,0x95A2, 0x8986,0x95A3, 0x6DF5,0x95A4, 0x5F17,0x95A5, 0x6255,0x95A6, 0x6CB8,0x95A7, 0x4ECF,0x95A8, 0x7269,0x95A9, 0x9B92,0x95AA, 0x5206,0x95AB, 0x543B,0x95AC, 0x5674,0x95AD, 0x58B3,0x95AE, 0x61A4,0x95AF, 0x626E,0x95B0, 0x711A,0x95B1, 0x596E,0x95B2, 0x7C89,0x95B3, 0x7CDE,0x95B4, 0x7D1B,0x95B5, 0x96F0,0x95B6, 0x6587,0x95B7, 0x805E,0x95B8, 0x4E19,0x95B9, 0x4F75,0x95BA, 0x5175,0x95BB, 0x5840,0x95BC, 0x5E63,0x95BD, 0x5E73,0x95BE, 0x5F0A,0x95BF, 0x67C4,0x95C0, 0x4E26,0x95C1, 0x853D,0x95C2, 0x9589,0x95C3, 0x965B,0x95C4, 0x7C73,0x95C5, 0x9801,0x95C6, 0x50FB,0x95C7, 0x58C1,0x95C8, 0x7656,0x95C9, 0x78A7,0x95CA, 0x5225,0x95CB, 0x77A5,0x95CC, 0x8511,0x95CD, 0x7B86,0x95CE, 0x504F,0x95CF, 0x5909,0x95D0, 0x7247,0x95D1, 0x7BC7,0x95D2, 0x7DE8,0x95D3, 0x8FBA,0x95D4, 0x8FD4,0x95D5, 0x904D,0x95D6, 0x4FBF,0x95D7, 0x52C9,0x95D8, 0x5A29,0x95D9, 0x5F01,0x95DA, 0x97AD,0x95DB, 0x4FDD,0x95DC, 0x8217,0x95DD, 0x92EA,0x95DE, 0x5703,0x95DF, 0x6355,0x95E0, 0x6B69,0x95E1, 0x752B,0x95E2, 0x88DC,0x95E3, 0x8F14,0x95E4, 0x7A42,0x95E5, 0x52DF,0x95E6, 0x5893,0x95E7, 0x6155,0x95E8, 0x620A,0x95E9, 0x66AE,0x95EA, 0x6BCD,0x95EB, 0x7C3F,0x95EC, 0x83E9,0x95ED, 0x5023,0x95EE, 0x4FF8,0x95EF, 0x5305,0x95F0, 0x5446,0x95F1, 0x5831,0x95F2, 0x5949,0x95F3, 0x5B9D,0x95F4, 0x5CF0,0x95F5, 0x5CEF,0x95F6, 0x5D29,0x95F7, 0x5E96,0x95F8, 0x62B1,0x95F9, 0x6367,0x95FA, 0x653E,0x95FB, 0x65B9,0x95FC, 0x670B,0x9640, 0x6CD5,0x9641, 0x6CE1,0x9642, 0x70F9,0x9643, 0x7832,0x9644, 0x7E2B,0x9645, 0x80DE,0x9646, 0x82B3,0x9647, 0x840C,0x9648, 0x84EC,0x9649, 0x8702,0x964A, 0x8912,0x964B, 0x8A2A,0x964C, 0x8C4A,0x964D, 0x90A6,0x964E, 0x92D2,0x964F, 0x98FD,0x9650, 0x9CF3,0x9651, 0x9D6C,0x9652, 0x4E4F,0x9653, 0x4EA1,0x9654, 0x508D,0x9655, 0x5256,0x9656, 0x574A,0x9657, 0x59A8,0x9658, 0x5E3D,0x9659, 0x5FD8,0x965A, 0x5FD9,0x965B, 0x623F,0x965C, 0x66B4,0x965D, 0x671B,0x965E, 0x67D0,0x965F, 0x68D2,0x9660, 0x5192,0x9661, 0x7D21,0x9662, 0x80AA,0x9663, 0x81A8,0x9664, 0x8B00,0x9665, 0x8C8C,0x9666, 0x8CBF,0x9667, 0x927E,0x9668, 0x9632,0x9669, 0x5420,0x966A, 0x982C,0x966B, 0x5317,0x966C, 0x50D5,0x966D, 0x535C,0x966E, 0x58A8,0x966F, 0x64B2,0x9670, 0x6734,0x9671, 0x7267,0x9672, 0x7766,0x9673, 0x7A46,0x9674, 0x91E6,0x9675, 0x52C3,0x9676, 0x6CA1,0x9677, 0x6B86,0x9678, 0x5800,0x9679, 0x5E4C,0x967A, 0x5954,0x967B, 0x672C,0x967C, 0x7FFB,0x967D, 0x51E1,0x967E, 0x76C6,0x9680, 0x6469,0x9681, 0x78E8,0x9682, 0x9B54,0x9683, 0x9EBB,0x9684, 0x57CB,0x9685, 0x59B9,0x9686, 0x6627,0x9687, 0x679A,0x9688, 0x6BCE,0x9689, 0x54E9,0x968A, 0x69D9,0x968B, 0x5E55,0x968C, 0x819C,0x968D, 0x6795,0x968E, 0x9BAA,0x968F, 0x67FE,0x9690, 0x9C52,0x9691, 0x685D,0x9692, 0x4EA6,0x9693, 0x4FE3,0x9694, 0x53C8,0x9695, 0x62B9,0x9696, 0x672B,0x9697, 0x6CAB,0x9698, 0x8FC4,0x9699, 0x4FAD,0x969A, 0x7E6D,0x969B, 0x9EBF,0x969C, 0x4E07,0x969D, 0x6162,0x969E, 0x6E80,0x969F, 0x6F2B,0x96A0, 0x8513,0x96A1, 0x5473,0x96A2, 0x672A,0x96A3, 0x9B45,0x96A4, 0x5DF3,0x96A5, 0x7B95,0x96A6, 0x5CAC,0x96A7, 0x5BC6,0x96A8, 0x871C,0x96A9, 0x6E4A,0x96AA, 0x84D1,0x96AB, 0x7A14,0x96AC, 0x8108,0x96AD, 0x5999,0x96AE, 0x7C8D,0x96AF, 0x6C11,0x96B0, 0x7720,0x96B1, 0x52D9,0x96B2, 0x5922,0x96B3, 0x7121,0x96B4, 0x725F,0x96B5, 0x77DB,0x96B6, 0x9727,0x96B7, 0x9D61,0x96B8, 0x690B,0x96B9, 0x5A7F,0x96BA, 0x5A18,0x96BB, 0x51A5,0x96BC, 0x540D,0x96BD, 0x547D,0x96BE, 0x660E,0x96BF, 0x76DF,0x96C0, 0x8FF7,0x96C1, 0x9298,0x96C2, 0x9CF4,0x96C3, 0x59EA,0x96C4, 0x725D,0x96C5, 0x6EC5,0x96C6, 0x514D,0x96C7, 0x68C9,0x96C8, 0x7DBF,0x96C9, 0x7DEC,0x96CA, 0x9762,0x96CB, 0x9EBA,0x96CC, 0x6478,0x96CD, 0x6A21,0x96CE, 0x8302,0x96CF, 0x5984,0x96D0, 0x5B5F,0x96D1, 0x6BDB,0x96D2, 0x731B,0x96D3, 0x76F2,0x96D4, 0x7DB2,0x96D5, 0x8017,0x96D6, 0x8499,0x96D7, 0x5132,0x96D8, 0x6728,0x96D9, 0x9ED9,0x96DA, 0x76EE,0x96DB, 0x6762,0x96DC, 0x52FF,0x96DD, 0x9905,0x96DE, 0x5C24,0x96DF, 0x623B,0x96E0, 0x7C7E,0x96E1, 0x8CB0,0x96E2, 0x554F,0x96E3, 0x60B6,0x96E4, 0x7D0B,0x96E5, 0x9580,0x96E6, 0x5301,0x96E7, 0x4E5F,0x96E8, 0x51B6,0x96E9, 0x591C,0x96EA, 0x723A,0x96EB, 0x8036,0x96EC, 0x91CE,0x96ED, 0x5F25,0x96EE, 0x77E2,0x96EF, 0x5384,0x96F0, 0x5F79,0x96F1, 0x7D04,0x96F2, 0x85AC,0x96F3, 0x8A33,0x96F4, 0x8E8D,0x96F5, 0x9756,0x96F6, 0x67F3,0x96F7, 0x85AE,0x96F8, 0x9453,0x96F9, 0x6109,0x96FA, 0x6108,0x96FB, 0x6CB9,0x96FC, 0x7652,0x9740, 0x8AED,0x9741, 0x8F38,0x9742, 0x552F,0x9743, 0x4F51,0x9744, 0x512A,0x9745, 0x52C7,0x9746, 0x53CB,0x9747, 0x5BA5,0x9748, 0x5E7D,0x9749, 0x60A0,0x974A, 0x6182,0x974B, 0x63D6,0x974C, 0x6709,0x974D, 0x67DA,0x974E, 0x6E67,0x974F, 0x6D8C,0x9750, 0x7336,0x9751, 0x7337,0x9752, 0x7531,0x9753, 0x7950,0x9754, 0x88D5,0x9755, 0x8A98,0x9756, 0x904A,0x9757, 0x9091,0x9758, 0x90F5,0x9759, 0x96C4,0x975A, 0x878D,0x975B, 0x5915,0x975C, 0x4E88,0x975D, 0x4F59,0x975E, 0x4E0E,0x975F, 0x8A89,0x9760, 0x8F3F,0x9761, 0x9810,0x9762, 0x50AD,0x9763, 0x5E7C,0x9764, 0x5996,0x9765, 0x5BB9,0x9766, 0x5EB8,0x9767, 0x63DA,0x9768, 0x63FA,0x9769, 0x64C1,0x976A, 0x66DC,0x976B, 0x694A,0x976C, 0x69D8,0x976D, 0x6D0B,0x976E, 0x6EB6,0x976F, 0x7194,0x9770, 0x7528,0x9771, 0x7AAF,0x9772, 0x7F8A,0x9773, 0x8000,0x9774, 0x8449,0x9775, 0x84C9,0x9776, 0x8981,0x9777, 0x8B21,0x9778, 0x8E0A,0x9779, 0x9065,0x977A, 0x967D,0x977B, 0x990A,0x977C, 0x617E,0x977D, 0x6291,0x977E, 0x6B32,0x9780, 0x6C83,0x9781, 0x6D74,0x9782, 0x7FCC,0x9783, 0x7FFC,0x9784, 0x6DC0,0x9785, 0x7F85,0x9786, 0x87BA,0x9787, 0x88F8,0x9788, 0x6765,0x9789, 0x83B1,0x978A, 0x983C,0x978B, 0x96F7,0x978C, 0x6D1B,0x978D, 0x7D61,0x978E, 0x843D,0x978F, 0x916A,0x9790, 0x4E71,0x9791, 0x5375,0x9792, 0x5D50,0x9793, 0x6B04,0x9794, 0x6FEB,0x9795, 0x85CD,0x9796, 0x862D,0x9797, 0x89A7,0x9798, 0x5229,0x9799, 0x540F,0x979A, 0x5C65,0x979B, 0x674E,0x979C, 0x68A8,0x979D, 0x7406,0x979E, 0x7483,0x979F, 0x75E2,0x97A0, 0x88CF,0x97A1, 0x88E1,0x97A2, 0x91CC,0x97A3, 0x96E2,0x97A4, 0x9678,0x97A5, 0x5F8B,0x97A6, 0x7387,0x97A7, 0x7ACB,0x97A8, 0x844E,0x97A9, 0x63A0,0x97AA, 0x7565,0x97AB, 0x5289,0x97AC, 0x6D41,0x97AD, 0x6E9C,0x97AE, 0x7409,0x97AF, 0x7559,0x97B0, 0x786B,0x97B1, 0x7C92,0x97B2, 0x9686,0x97B3, 0x7ADC,0x97B4, 0x9F8D,0x97B5, 0x4FB6,0x97B6, 0x616E,0x97B7, 0x65C5,0x97B8, 0x865C,0x97B9, 0x4E86,0x97BA, 0x4EAE,0x97BB, 0x50DA,0x97BC, 0x4E21,0x97BD, 0x51CC,0x97BE, 0x5BEE,0x97BF, 0x6599,0x97C0, 0x6881,0x97C1, 0x6DBC,0x97C2, 0x731F,0x97C3, 0x7642,0x97C4, 0x77AD,0x97C5, 0x7A1C,0x97C6, 0x7CE7,0x97C7, 0x826F,0x97C8, 0x8AD2,0x97C9, 0x907C,0x97CA, 0x91CF,0x97CB, 0x9675,0x97CC, 0x9818,0x97CD, 0x529B,0x97CE, 0x7DD1,0x97CF, 0x502B,0x97D0, 0x5398,0x97D1, 0x6797,0x97D2, 0x6DCB,0x97D3, 0x71D0,0x97D4, 0x7433,0x97D5, 0x81E8,0x97D6, 0x8F2A,0x97D7, 0x96A3,0x97D8, 0x9C57,0x97D9, 0x9E9F,0x97DA, 0x7460,0x97DB, 0x5841,0x97DC, 0x6D99,0x97DD, 0x7D2F,0x97DE, 0x985E,0x97DF, 0x4EE4,0x97E0, 0x4F36,0x97E1, 0x4F8B,0x97E2, 0x51B7,0x97E3, 0x52B1,0x97E4, 0x5DBA,0x97E5, 0x601C,0x97E6, 0x73B2,0x97E7, 0x793C,0x97E8, 0x82D3,0x97E9, 0x9234,0x97EA, 0x96B7,0x97EB, 0x96F6,0x97EC, 0x970A,0x97ED, 0x9E97,0x97EE, 0x9F62,0x97EF, 0x66A6,0x97F0, 0x6B74,0x97F1, 0x5217,0x97F2, 0x52A3,0x97F3, 0x70C8,0x97F4, 0x88C2,0x97F5, 0x5EC9,0x97F6, 0x604B,0x97F7, 0x6190,0x97F8, 0x6F23,0x97F9, 0x7149,0x97FA, 0x7C3E,0x97FB, 0x7DF4,0x97FC, 0x806F,0x9840, 0x84EE,0x9841, 0x9023,0x9842, 0x932C,0x9843, 0x5442,0x9844, 0x9B6F,0x9845, 0x6AD3,0x9846, 0x7089,0x9847, 0x8CC2,0x9848, 0x8DEF,0x9849, 0x9732,0x984A, 0x52B4,0x984B, 0x5A41,0x984C, 0x5ECA,0x984D, 0x5F04,0x984E, 0x6717,0x984F, 0x697C,0x9850, 0x6994,0x9851, 0x6D6A,0x9852, 0x6F0F,0x9853, 0x7262,0x9854, 0x72FC,0x9855, 0x7BED,0x9856, 0x8001,0x9857, 0x807E,0x9858, 0x874B,0x9859, 0x90CE,0x985A, 0x516D,0x985B, 0x9E93,0x985C, 0x7984,0x985D, 0x808B,0x985E, 0x9332,0x985F, 0x8AD6,0x9860, 0x502D,0x9861, 0x548C,0x9862, 0x8A71,0x9863, 0x6B6A,0x9864, 0x8CC4,0x9865, 0x8107,0x9866, 0x60D1,0x9867, 0x67A0,0x9868, 0x9DF2,0x9869, 0x4E99,0x986A, 0x4E98,0x986B, 0x9C10,0x986C, 0x8A6B,0x986D, 0x85C1,0x986E, 0x8568,0x986F, 0x6900,0x9870, 0x6E7E,0x9871, 0x7897,0x9872, 0x8155,0x989F, 0x5F0C,0x98A0, 0x4E10,0x98A1, 0x4E15,0x98A2, 0x4E2A,0x98A3, 0x4E31,0x98A4, 0x4E36,0x98A5, 0x4E3C,0x98A6, 0x4E3F,0x98A7, 0x4E42,0x98A8, 0x4E56,0x98A9, 0x4E58,0x98AA, 0x4E82,0x98AB, 0x4E85,0x98AC, 0x8C6B,0x98AD, 0x4E8A,0x98AE, 0x8212,0x98AF, 0x5F0D,0x98B0, 0x4E8E,0x98B1, 0x4E9E,0x98B2, 0x4E9F,0x98B3, 0x4EA0,0x98B4, 0x4EA2,0x98B5, 0x4EB0,0x98B6, 0x4EB3,0x98B7, 0x4EB6,0x98B8, 0x4ECE,0x98B9, 0x4ECD,0x98BA, 0x4EC4,0x98BB, 0x4EC6,0x98BC, 0x4EC2,0x98BD, 0x4ED7,0x98BE, 0x4EDE,0x98BF, 0x4EED,0x98C0, 0x4EDF,0x98C1, 0x4EF7,0x98C2, 0x4F09,0x98C3, 0x4F5A,0x98C4, 0x4F30,0x98C5, 0x4F5B,0x98C6, 0x4F5D,0x98C7, 0x4F57,0x98C8, 0x4F47,0x98C9, 0x4F76,0x98CA, 0x4F88,0x98CB, 0x4F8F,0x98CC, 0x4F98,0x98CD, 0x4F7B,0x98CE, 0x4F69,0x98CF, 0x4F70,0x98D0, 0x4F91,0x98D1, 0x4F6F,0x98D2, 0x4F86,0x98D3, 0x4F96,0x98D4, 0x5118,0x98D5, 0x4FD4,0x98D6, 0x4FDF,0x98D7, 0x4FCE,0x98D8, 0x4FD8,0x98D9, 0x4FDB,0x98DA, 0x4FD1,0x98DB, 0x4FDA,0x98DC, 0x4FD0,0x98DD, 0x4FE4,0x98DE, 0x4FE5,0x98DF, 0x501A,0x98E0, 0x5028,0x98E1, 0x5014,0x98E2, 0x502A,0x98E3, 0x5025,0x98E4, 0x5005,0x98E5, 0x4F1C,0x98E6, 0x4FF6,0x98E7, 0x5021,0x98E8, 0x5029,0x98E9, 0x502C,0x98EA, 0x4FFE,0x98EB, 0x4FEF,0x98EC, 0x5011,0x98ED, 0x5006,0x98EE, 0x5043,0x98EF, 0x5047,0x98F0, 0x6703,0x98F1, 0x5055,0x98F2, 0x5050,0x98F3, 0x5048,0x98F4, 0x505A,0x98F5, 0x5056,0x98F6, 0x506C,0x98F7, 0x5078,0x98F8, 0x5080,0x98F9, 0x509A,0x98FA, 0x5085,0x98FB, 0x50B4,0x98FC, 0x50B2,0x9940, 0x50C9,0x9941, 0x50CA,0x9942, 0x50B3,0x9943, 0x50C2,0x9944, 0x50D6,0x9945, 0x50DE,0x9946, 0x50E5,0x9947, 0x50ED,0x9948, 0x50E3,0x9949, 0x50EE,0x994A, 0x50F9,0x994B, 0x50F5,0x994C, 0x5109,0x994D, 0x5101,0x994E, 0x5102,0x994F, 0x5116,0x9950, 0x5115,0x9951, 0x5114,0x9952, 0x511A,0x9953, 0x5121,0x9954, 0x513A,0x9955, 0x5137,0x9956, 0x513C,0x9957, 0x513B,0x9958, 0x513F,0x9959, 0x5140,0x995A, 0x5152,0x995B, 0x514C,0x995C, 0x5154,0x995D, 0x5162,0x995E, 0x7AF8,0x995F, 0x5169,0x9960, 0x516A,0x9961, 0x516E,0x9962, 0x5180,0x9963, 0x5182,0x9964, 0x56D8,0x9965, 0x518C,0x9966, 0x5189,0x9967, 0x518F,0x9968, 0x5191,0x9969, 0x5193,0x996A, 0x5195,0x996B, 0x5196,0x996C, 0x51A4,0x996D, 0x51A6,0x996E, 0x51A2,0x996F, 0x51A9,0x9970, 0x51AA,0x9971, 0x51AB,0x9972, 0x51B3,0x9973, 0x51B1,0x9974, 0x51B2,0x9975, 0x51B0,0x9976, 0x51B5,0x9977, 0x51BD,0x9978, 0x51C5,0x9979, 0x51C9,0x997A, 0x51DB,0x997B, 0x51E0,0x997C, 0x8655,0x997D, 0x51E9,0x997E, 0x51ED,0x9980, 0x51F0,0x9981, 0x51F5,0x9982, 0x51FE,0x9983, 0x5204,0x9984, 0x520B,0x9985, 0x5214,0x9986, 0x520E,0x9987, 0x5227,0x9988, 0x522A,0x9989, 0x522E,0x998A, 0x5233,0x998B, 0x5239,0x998C, 0x524F,0x998D, 0x5244,0x998E, 0x524B,0x998F, 0x524C,0x9990, 0x525E,0x9991, 0x5254,0x9992, 0x526A,0x9993, 0x5274,0x9994, 0x5269,0x9995, 0x5273,0x9996, 0x527F,0x9997, 0x527D,0x9998, 0x528D,0x9999, 0x5294,0x999A, 0x5292,0x999B, 0x5271,0x999C, 0x5288,0x999D, 0x5291,0x999E, 0x8FA8,0x999F, 0x8FA7,0x99A0, 0x52AC,0x99A1, 0x52AD,0x99A2, 0x52BC,0x99A3, 0x52B5,0x99A4, 0x52C1,0x99A5, 0x52CD,0x99A6, 0x52D7,0x99A7, 0x52DE,0x99A8, 0x52E3,0x99A9, 0x52E6,0x99AA, 0x98ED,0x99AB, 0x52E0,0x99AC, 0x52F3,0x99AD, 0x52F5,0x99AE, 0x52F8,0x99AF, 0x52F9,0x99B0, 0x5306,0x99B1, 0x5308,0x99B2, 0x7538,0x99B3, 0x530D,0x99B4, 0x5310,0x99B5, 0x530F,0x99B6, 0x5315,0x99B7, 0x531A,0x99B8, 0x5323,0x99B9, 0x532F,0x99BA, 0x5331,0x99BB, 0x5333,0x99BC, 0x5338,0x99BD, 0x5340,0x99BE, 0x5346,0x99BF, 0x5345,0x99C0, 0x4E17,0x99C1, 0x5349,0x99C2, 0x534D,0x99C3, 0x51D6,0x99C4, 0x535E,0x99C5, 0x5369,0x99C6, 0x536E,0x99C7, 0x5918,0x99C8, 0x537B,0x99C9, 0x5377,0x99CA, 0x5382,0x99CB, 0x5396,0x99CC, 0x53A0,0x99CD, 0x53A6,0x99CE, 0x53A5,0x99CF, 0x53AE,0x99D0, 0x53B0,0x99D1, 0x53B6,0x99D2, 0x53C3,0x99D3, 0x7C12,0x99D4, 0x96D9,0x99D5, 0x53DF,0x99D6, 0x66FC,0x99D7, 0x71EE,0x99D8, 0x53EE,0x99D9, 0x53E8,0x99DA, 0x53ED,0x99DB, 0x53FA,0x99DC, 0x5401,0x99DD, 0x543D,0x99DE, 0x5440,0x99DF, 0x542C,0x99E0, 0x542D,0x99E1, 0x543C,0x99E2, 0x542E,0x99E3, 0x5436,0x99E4, 0x5429,0x99E5, 0x541D,0x99E6, 0x544E,0x99E7, 0x548F,0x99E8, 0x5475,0x99E9, 0x548E,0x99EA, 0x545F,0x99EB, 0x5471,0x99EC, 0x5477,0x99ED, 0x5470,0x99EE, 0x5492,0x99EF, 0x547B,0x99F0, 0x5480,0x99F1, 0x5476,0x99F2, 0x5484,0x99F3, 0x5490,0x99F4, 0x5486,0x99F5, 0x54C7,0x99F6, 0x54A2,0x99F7, 0x54B8,0x99F8, 0x54A5,0x99F9, 0x54AC,0x99FA, 0x54C4,0x99FB, 0x54C8,0x99FC, 0x54A8,0x9A40, 0x54AB,0x9A41, 0x54C2,0x9A42, 0x54A4,0x9A43, 0x54BE,0x9A44, 0x54BC,0x9A45, 0x54D8,0x9A46, 0x54E5,0x9A47, 0x54E6,0x9A48, 0x550F,0x9A49, 0x5514,0x9A4A, 0x54FD,0x9A4B, 0x54EE,0x9A4C, 0x54ED,0x9A4D, 0x54FA,0x9A4E, 0x54E2,0x9A4F, 0x5539,0x9A50, 0x5540,0x9A51, 0x5563,0x9A52, 0x554C,0x9A53, 0x552E,0x9A54, 0x555C,0x9A55, 0x5545,0x9A56, 0x5556,0x9A57, 0x5557,0x9A58, 0x5538,0x9A59, 0x5533,0x9A5A, 0x555D,0x9A5B, 0x5599,0x9A5C, 0x5580,0x9A5D, 0x54AF,0x9A5E, 0x558A,0x9A5F, 0x559F,0x9A60, 0x557B,0x9A61, 0x557E,0x9A62, 0x5598,0x9A63, 0x559E,0x9A64, 0x55AE,0x9A65, 0x557C,0x9A66, 0x5583,0x9A67, 0x55A9,0x9A68, 0x5587,0x9A69, 0x55A8,0x9A6A, 0x55DA,0x9A6B, 0x55C5,0x9A6C, 0x55DF,0x9A6D, 0x55C4,0x9A6E, 0x55DC,0x9A6F, 0x55E4,0x9A70, 0x55D4,0x9A71, 0x5614,0x9A72, 0x55F7,0x9A73, 0x5616,0x9A74, 0x55FE,0x9A75, 0x55FD,0x9A76, 0x561B,0x9A77, 0x55F9,0x9A78, 0x564E,0x9A79, 0x5650,0x9A7A, 0x71DF,0x9A7B, 0x5634,0x9A7C, 0x5636,0x9A7D, 0x5632,0x9A7E, 0x5638,0x9A80, 0x566B,0x9A81, 0x5664,0x9A82, 0x562F,0x9A83, 0x566C,0x9A84, 0x566A,0x9A85, 0x5686,0x9A86, 0x5680,0x9A87, 0x568A,0x9A88, 0x56A0,0x9A89, 0x5694,0x9A8A, 0x568F,0x9A8B, 0x56A5,0x9A8C, 0x56AE,0x9A8D, 0x56B6,0x9A8E, 0x56B4,0x9A8F, 0x56C2,0x9A90, 0x56BC,0x9A91, 0x56C1,0x9A92, 0x56C3,0x9A93, 0x56C0,0x9A94, 0x56C8,0x9A95, 0x56CE,0x9A96, 0x56D1,0x9A97, 0x56D3,0x9A98, 0x56D7,0x9A99, 0x56EE,0x9A9A, 0x56F9,0x9A9B, 0x5700,0x9A9C, 0x56FF,0x9A9D, 0x5704,0x9A9E, 0x5709,0x9A9F, 0x5708,0x9AA0, 0x570B,0x9AA1, 0x570D,0x9AA2, 0x5713,0x9AA3, 0x5718,0x9AA4, 0x5716,0x9AA5, 0x55C7,0x9AA6, 0x571C,0x9AA7, 0x5726,0x9AA8, 0x5737,0x9AA9, 0x5738,0x9AAA, 0x574E,0x9AAB, 0x573B,0x9AAC, 0x5740,0x9AAD, 0x574F,0x9AAE, 0x5769,0x9AAF, 0x57C0,0x9AB0, 0x5788,0x9AB1, 0x5761,0x9AB2, 0x577F,0x9AB3, 0x5789,0x9AB4, 0x5793,0x9AB5, 0x57A0,0x9AB6, 0x57B3,0x9AB7, 0x57A4,0x9AB8, 0x57AA,0x9AB9, 0x57B0,0x9ABA, 0x57C3,0x9ABB, 0x57C6,0x9ABC, 0x57D4,0x9ABD, 0x57D2,0x9ABE, 0x57D3,0x9ABF, 0x580A,0x9AC0, 0x57D6,0x9AC1, 0x57E3,0x9AC2, 0x580B,0x9AC3, 0x5819,0x9AC4, 0x581D,0x9AC5, 0x5872,0x9AC6, 0x5821,0x9AC7, 0x5862,0x9AC8, 0x584B,0x9AC9, 0x5870,0x9ACA, 0x6BC0,0x9ACB, 0x5852,0x9ACC, 0x583D,0x9ACD, 0x5879,0x9ACE, 0x5885,0x9ACF, 0x58B9,0x9AD0, 0x589F,0x9AD1, 0x58AB,0x9AD2, 0x58BA,0x9AD3, 0x58DE,0x9AD4, 0x58BB,0x9AD5, 0x58B8,0x9AD6, 0x58AE,0x9AD7, 0x58C5,0x9AD8, 0x58D3,0x9AD9, 0x58D1,0x9ADA, 0x58D7,0x9ADB, 0x58D9,0x9ADC, 0x58D8,0x9ADD, 0x58E5,0x9ADE, 0x58DC,0x9ADF, 0x58E4,0x9AE0, 0x58DF,0x9AE1, 0x58EF,0x9AE2, 0x58FA,0x9AE3, 0x58F9,0x9AE4, 0x58FB,0x9AE5, 0x58FC,0x9AE6, 0x58FD,0x9AE7, 0x5902,0x9AE8, 0x590A,0x9AE9, 0x5910,0x9AEA, 0x591B,0x9AEB, 0x68A6,0x9AEC, 0x5925,0x9AED, 0x592C,0x9AEE, 0x592D,0x9AEF, 0x5932,0x9AF0, 0x5938,0x9AF1, 0x593E,0x9AF2, 0x7AD2,0x9AF3, 0x5955,0x9AF4, 0x5950,0x9AF5, 0x594E,0x9AF6, 0x595A,0x9AF7, 0x5958,0x9AF8, 0x5962,0x9AF9, 0x5960,0x9AFA, 0x5967,0x9AFB, 0x596C,0x9AFC, 0x5969,0x9B40, 0x5978,0x9B41, 0x5981,0x9B42, 0x599D,0x9B43, 0x4F5E,0x9B44, 0x4FAB,0x9B45, 0x59A3,0x9B46, 0x59B2,0x9B47, 0x59C6,0x9B48, 0x59E8,0x9B49, 0x59DC,0x9B4A, 0x598D,0x9B4B, 0x59D9,0x9B4C, 0x59DA,0x9B4D, 0x5A25,0x9B4E, 0x5A1F,0x9B4F, 0x5A11,0x9B50, 0x5A1C,0x9B51, 0x5A09,0x9B52, 0x5A1A,0x9B53, 0x5A40,0x9B54, 0x5A6C,0x9B55, 0x5A49,0x9B56, 0x5A35,0x9B57, 0x5A36,0x9B58, 0x5A62,0x9B59, 0x5A6A,0x9B5A, 0x5A9A,0x9B5B, 0x5ABC,0x9B5C, 0x5ABE,0x9B5D, 0x5ACB,0x9B5E, 0x5AC2,0x9B5F, 0x5ABD,0x9B60, 0x5AE3,0x9B61, 0x5AD7,0x9B62, 0x5AE6,0x9B63, 0x5AE9,0x9B64, 0x5AD6,0x9B65, 0x5AFA,0x9B66, 0x5AFB,0x9B67, 0x5B0C,0x9B68, 0x5B0B,0x9B69, 0x5B16,0x9B6A, 0x5B32,0x9B6B, 0x5AD0,0x9B6C, 0x5B2A,0x9B6D, 0x5B36,0x9B6E, 0x5B3E,0x9B6F, 0x5B43,0x9B70, 0x5B45,0x9B71, 0x5B40,0x9B72, 0x5B51,0x9B73, 0x5B55,0x9B74, 0x5B5A,0x9B75, 0x5B5B,0x9B76, 0x5B65,0x9B77, 0x5B69,0x9B78, 0x5B70,0x9B79, 0x5B73,0x9B7A, 0x5B75,0x9B7B, 0x5B78,0x9B7C, 0x6588,0x9B7D, 0x5B7A,0x9B7E, 0x5B80,0x9B80, 0x5B83,0x9B81, 0x5BA6,0x9B82, 0x5BB8,0x9B83, 0x5BC3,0x9B84, 0x5BC7,0x9B85, 0x5BC9,0x9B86, 0x5BD4,0x9B87, 0x5BD0,0x9B88, 0x5BE4,0x9B89, 0x5BE6,0x9B8A, 0x5BE2,0x9B8B, 0x5BDE,0x9B8C, 0x5BE5,0x9B8D, 0x5BEB,0x9B8E, 0x5BF0,0x9B8F, 0x5BF6,0x9B90, 0x5BF3,0x9B91, 0x5C05,0x9B92, 0x5C07,0x9B93, 0x5C08,0x9B94, 0x5C0D,0x9B95, 0x5C13,0x9B96, 0x5C20,0x9B97, 0x5C22,0x9B98, 0x5C28,0x9B99, 0x5C38,0x9B9A, 0x5C39,0x9B9B, 0x5C41,0x9B9C, 0x5C46,0x9B9D, 0x5C4E,0x9B9E, 0x5C53,0x9B9F, 0x5C50,0x9BA0, 0x5C4F,0x9BA1, 0x5B71,0x9BA2, 0x5C6C,0x9BA3, 0x5C6E,0x9BA4, 0x4E62,0x9BA5, 0x5C76,0x9BA6, 0x5C79,0x9BA7, 0x5C8C,0x9BA8, 0x5C91,0x9BA9, 0x5C94,0x9BAA, 0x599B,0x9BAB, 0x5CAB,0x9BAC, 0x5CBB,0x9BAD, 0x5CB6,0x9BAE, 0x5CBC,0x9BAF, 0x5CB7,0x9BB0, 0x5CC5,0x9BB1, 0x5CBE,0x9BB2, 0x5CC7,0x9BB3, 0x5CD9,0x9BB4, 0x5CE9,0x9BB5, 0x5CFD,0x9BB6, 0x5CFA,0x9BB7, 0x5CED,0x9BB8, 0x5D8C,0x9BB9, 0x5CEA,0x9BBA, 0x5D0B,0x9BBB, 0x5D15,0x9BBC, 0x5D17,0x9BBD, 0x5D5C,0x9BBE, 0x5D1F,0x9BBF, 0x5D1B,0x9BC0, 0x5D11,0x9BC1, 0x5D14,0x9BC2, 0x5D22,0x9BC3, 0x5D1A,0x9BC4, 0x5D19,0x9BC5, 0x5D18,0x9BC6, 0x5D4C,0x9BC7, 0x5D52,0x9BC8, 0x5D4E,0x9BC9, 0x5D4B,0x9BCA, 0x5D6C,0x9BCB, 0x5D73,0x9BCC, 0x5D76,0x9BCD, 0x5D87,0x9BCE, 0x5D84,0x9BCF, 0x5D82,0x9BD0, 0x5DA2,0x9BD1, 0x5D9D,0x9BD2, 0x5DAC,0x9BD3, 0x5DAE,0x9BD4, 0x5DBD,0x9BD5, 0x5D90,0x9BD6, 0x5DB7,0x9BD7, 0x5DBC,0x9BD8, 0x5DC9,0x9BD9, 0x5DCD,0x9BDA, 0x5DD3,0x9BDB, 0x5DD2,0x9BDC, 0x5DD6,0x9BDD, 0x5DDB,0x9BDE, 0x5DEB,0x9BDF, 0x5DF2,0x9BE0, 0x5DF5,0x9BE1, 0x5E0B,0x9BE2, 0x5E1A,0x9BE3, 0x5E19,0x9BE4, 0x5E11,0x9BE5, 0x5E1B,0x9BE6, 0x5E36,0x9BE7, 0x5E37,0x9BE8, 0x5E44,0x9BE9, 0x5E43,0x9BEA, 0x5E40,0x9BEB, 0x5E4E,0x9BEC, 0x5E57,0x9BED, 0x5E54,0x9BEE, 0x5E5F,0x9BEF, 0x5E62,0x9BF0, 0x5E64,0x9BF1, 0x5E47,0x9BF2, 0x5E75,0x9BF3, 0x5E76,0x9BF4, 0x5E7A,0x9BF5, 0x9EBC,0x9BF6, 0x5E7F,0x9BF7, 0x5EA0,0x9BF8, 0x5EC1,0x9BF9, 0x5EC2,0x9BFA, 0x5EC8,0x9BFB, 0x5ED0,0x9BFC, 0x5ECF,0x9C40, 0x5ED6,0x9C41, 0x5EE3,0x9C42, 0x5EDD,0x9C43, 0x5EDA,0x9C44, 0x5EDB,0x9C45, 0x5EE2,0x9C46, 0x5EE1,0x9C47, 0x5EE8,0x9C48, 0x5EE9,0x9C49, 0x5EEC,0x9C4A, 0x5EF1,0x9C4B, 0x5EF3,0x9C4C, 0x5EF0,0x9C4D, 0x5EF4,0x9C4E, 0x5EF8,0x9C4F, 0x5EFE,0x9C50, 0x5F03,0x9C51, 0x5F09,0x9C52, 0x5F5D,0x9C53, 0x5F5C,0x9C54, 0x5F0B,0x9C55, 0x5F11,0x9C56, 0x5F16,0x9C57, 0x5F29,0x9C58, 0x5F2D,0x9C59, 0x5F38,0x9C5A, 0x5F41,0x9C5B, 0x5F48,0x9C5C, 0x5F4C,0x9C5D, 0x5F4E,0x9C5E, 0x5F2F,0x9C5F, 0x5F51,0x9C60, 0x5F56,0x9C61, 0x5F57,0x9C62, 0x5F59,0x9C63, 0x5F61,0x9C64, 0x5F6D,0x9C65, 0x5F73,0x9C66, 0x5F77,0x9C67, 0x5F83,0x9C68, 0x5F82,0x9C69, 0x5F7F,0x9C6A, 0x5F8A,0x9C6B, 0x5F88,0x9C6C, 0x5F91,0x9C6D, 0x5F87,0x9C6E, 0x5F9E,0x9C6F, 0x5F99,0x9C70, 0x5F98,0x9C71, 0x5FA0,0x9C72, 0x5FA8,0x9C73, 0x5FAD,0x9C74, 0x5FBC,0x9C75, 0x5FD6,0x9C76, 0x5FFB,0x9C77, 0x5FE4,0x9C78, 0x5FF8,0x9C79, 0x5FF1,0x9C7A, 0x5FDD,0x9C7B, 0x60B3,0x9C7C, 0x5FFF,0x9C7D, 0x6021,0x9C7E, 0x6060,0x9C80, 0x6019,0x9C81, 0x6010,0x9C82, 0x6029,0x9C83, 0x600E,0x9C84, 0x6031,0x9C85, 0x601B,0x9C86, 0x6015,0x9C87, 0x602B,0x9C88, 0x6026,0x9C89, 0x600F,0x9C8A, 0x603A,0x9C8B, 0x605A,0x9C8C, 0x6041,0x9C8D, 0x606A,0x9C8E, 0x6077,0x9C8F, 0x605F,0x9C90, 0x604A,0x9C91, 0x6046,0x9C92, 0x604D,0x9C93, 0x6063,0x9C94, 0x6043,0x9C95, 0x6064,0x9C96, 0x6042,0x9C97, 0x606C,0x9C98, 0x606B,0x9C99, 0x6059,0x9C9A, 0x6081,0x9C9B, 0x608D,0x9C9C, 0x60E7,0x9C9D, 0x6083,0x9C9E, 0x609A,0x9C9F, 0x6084,0x9CA0, 0x609B,0x9CA1, 0x6096,0x9CA2, 0x6097,0x9CA3, 0x6092,0x9CA4, 0x60A7,0x9CA5, 0x608B,0x9CA6, 0x60E1,0x9CA7, 0x60B8,0x9CA8, 0x60E0,0x9CA9, 0x60D3,0x9CAA, 0x60B4,0x9CAB, 0x5FF0,0x9CAC, 0x60BD,0x9CAD, 0x60C6,0x9CAE, 0x60B5,0x9CAF, 0x60D8,0x9CB0, 0x614D,0x9CB1, 0x6115,0x9CB2, 0x6106,0x9CB3, 0x60F6,0x9CB4, 0x60F7,0x9CB5, 0x6100,0x9CB6, 0x60F4,0x9CB7, 0x60FA,0x9CB8, 0x6103,0x9CB9, 0x6121,0x9CBA, 0x60FB,0x9CBB, 0x60F1,0x9CBC, 0x610D,0x9CBD, 0x610E,0x9CBE, 0x6147,0x9CBF, 0x613E,0x9CC0, 0x6128,0x9CC1, 0x6127,0x9CC2, 0x614A,0x9CC3, 0x613F,0x9CC4, 0x613C,0x9CC5, 0x612C,0x9CC6, 0x6134,0x9CC7, 0x613D,0x9CC8, 0x6142,0x9CC9, 0x6144,0x9CCA, 0x6173,0x9CCB, 0x6177,0x9CCC, 0x6158,0x9CCD, 0x6159,0x9CCE, 0x615A,0x9CCF, 0x616B,0x9CD0, 0x6174,0x9CD1, 0x616F,0x9CD2, 0x6165,0x9CD3, 0x6171,0x9CD4, 0x615F,0x9CD5, 0x615D,0x9CD6, 0x6153,0x9CD7, 0x6175,0x9CD8, 0x6199,0x9CD9, 0x6196,0x9CDA, 0x6187,0x9CDB, 0x61AC,0x9CDC, 0x6194,0x9CDD, 0x619A,0x9CDE, 0x618A,0x9CDF, 0x6191,0x9CE0, 0x61AB,0x9CE1, 0x61AE,0x9CE2, 0x61CC,0x9CE3, 0x61CA,0x9CE4, 0x61C9,0x9CE5, 0x61F7,0x9CE6, 0x61C8,0x9CE7, 0x61C3,0x9CE8, 0x61C6,0x9CE9, 0x61BA,0x9CEA, 0x61CB,0x9CEB, 0x7F79,0x9CEC, 0x61CD,0x9CED, 0x61E6,0x9CEE, 0x61E3,0x9CEF, 0x61F6,0x9CF0, 0x61FA,0x9CF1, 0x61F4,0x9CF2, 0x61FF,0x9CF3, 0x61FD,0x9CF4, 0x61FC,0x9CF5, 0x61FE,0x9CF6, 0x6200,0x9CF7, 0x6208,0x9CF8, 0x6209,0x9CF9, 0x620D,0x9CFA, 0x620C,0x9CFB, 0x6214,0x9CFC, 0x621B,0x9D40, 0x621E,0x9D41, 0x6221,0x9D42, 0x622A,0x9D43, 0x622E,0x9D44, 0x6230,0x9D45, 0x6232,0x9D46, 0x6233,0x9D47, 0x6241,0x9D48, 0x624E,0x9D49, 0x625E,0x9D4A, 0x6263,0x9D4B, 0x625B,0x9D4C, 0x6260,0x9D4D, 0x6268,0x9D4E, 0x627C,0x9D4F, 0x6282,0x9D50, 0x6289,0x9D51, 0x627E,0x9D52, 0x6292,0x9D53, 0x6293,0x9D54, 0x6296,0x9D55, 0x62D4,0x9D56, 0x6283,0x9D57, 0x6294,0x9D58, 0x62D7,0x9D59, 0x62D1,0x9D5A, 0x62BB,0x9D5B, 0x62CF,0x9D5C, 0x62FF,0x9D5D, 0x62C6,0x9D5E, 0x64D4,0x9D5F, 0x62C8,0x9D60, 0x62DC,0x9D61, 0x62CC,0x9D62, 0x62CA,0x9D63, 0x62C2,0x9D64, 0x62C7,0x9D65, 0x629B,0x9D66, 0x62C9,0x9D67, 0x630C,0x9D68, 0x62EE,0x9D69, 0x62F1,0x9D6A, 0x6327,0x9D6B, 0x6302,0x9D6C, 0x6308,0x9D6D, 0x62EF,0x9D6E, 0x62F5,0x9D6F, 0x6350,0x9D70, 0x633E,0x9D71, 0x634D,0x9D72, 0x641C,0x9D73, 0x634F,0x9D74, 0x6396,0x9D75, 0x638E,0x9D76, 0x6380,0x9D77, 0x63AB,0x9D78, 0x6376,0x9D79, 0x63A3,0x9D7A, 0x638F,0x9D7B, 0x6389,0x9D7C, 0x639F,0x9D7D, 0x63B5,0x9D7E, 0x636B,0x9D80, 0x6369,0x9D81, 0x63BE,0x9D82, 0x63E9,0x9D83, 0x63C0,0x9D84, 0x63C6,0x9D85, 0x63E3,0x9D86, 0x63C9,0x9D87, 0x63D2,0x9D88, 0x63F6,0x9D89, 0x63C4,0x9D8A, 0x6416,0x9D8B, 0x6434,0x9D8C, 0x6406,0x9D8D, 0x6413,0x9D8E, 0x6426,0x9D8F, 0x6436,0x9D90, 0x651D,0x9D91, 0x6417,0x9D92, 0x6428,0x9D93, 0x640F,0x9D94, 0x6467,0x9D95, 0x646F,0x9D96, 0x6476,0x9D97, 0x644E,0x9D98, 0x652A,0x9D99, 0x6495,0x9D9A, 0x6493,0x9D9B, 0x64A5,0x9D9C, 0x64A9,0x9D9D, 0x6488,0x9D9E, 0x64BC,0x9D9F, 0x64DA,0x9DA0, 0x64D2,0x9DA1, 0x64C5,0x9DA2, 0x64C7,0x9DA3, 0x64BB,0x9DA4, 0x64D8,0x9DA5, 0x64C2,0x9DA6, 0x64F1,0x9DA7, 0x64E7,0x9DA8, 0x8209,0x9DA9, 0x64E0,0x9DAA, 0x64E1,0x9DAB, 0x62AC,0x9DAC, 0x64E3,0x9DAD, 0x64EF,0x9DAE, 0x652C,0x9DAF, 0x64F6,0x9DB0, 0x64F4,0x9DB1, 0x64F2,0x9DB2, 0x64FA,0x9DB3, 0x6500,0x9DB4, 0x64FD,0x9DB5, 0x6518,0x9DB6, 0x651C,0x9DB7, 0x6505,0x9DB8, 0x6524,0x9DB9, 0x6523,0x9DBA, 0x652B,0x9DBB, 0x6534,0x9DBC, 0x6535,0x9DBD, 0x6537,0x9DBE, 0x6536,0x9DBF, 0x6538,0x9DC0, 0x754B,0x9DC1, 0x6548,0x9DC2, 0x6556,0x9DC3, 0x6555,0x9DC4, 0x654D,0x9DC5, 0x6558,0x9DC6, 0x655E,0x9DC7, 0x655D,0x9DC8, 0x6572,0x9DC9, 0x6578,0x9DCA, 0x6582,0x9DCB, 0x6583,0x9DCC, 0x8B8A,0x9DCD, 0x659B,0x9DCE, 0x659F,0x9DCF, 0x65AB,0x9DD0, 0x65B7,0x9DD1, 0x65C3,0x9DD2, 0x65C6,0x9DD3, 0x65C1,0x9DD4, 0x65C4,0x9DD5, 0x65CC,0x9DD6, 0x65D2,0x9DD7, 0x65DB,0x9DD8, 0x65D9,0x9DD9, 0x65E0,0x9DDA, 0x65E1,0x9DDB, 0x65F1,0x9DDC, 0x6772,0x9DDD, 0x660A,0x9DDE, 0x6603,0x9DDF, 0x65FB,0x9DE0, 0x6773,0x9DE1, 0x6635,0x9DE2, 0x6636,0x9DE3, 0x6634,0x9DE4, 0x661C,0x9DE5, 0x664F,0x9DE6, 0x6644,0x9DE7, 0x6649,0x9DE8, 0x6641,0x9DE9, 0x665E,0x9DEA, 0x665D,0x9DEB, 0x6664,0x9DEC, 0x6667,0x9DED, 0x6668,0x9DEE, 0x665F,0x9DEF, 0x6662,0x9DF0, 0x6670,0x9DF1, 0x6683,0x9DF2, 0x6688,0x9DF3, 0x668E,0x9DF4, 0x6689,0x9DF5, 0x6684,0x9DF6, 0x6698,0x9DF7, 0x669D,0x9DF8, 0x66C1,0x9DF9, 0x66B9,0x9DFA, 0x66C9,0x9DFB, 0x66BE,0x9DFC, 0x66BC,0x9E40, 0x66C4,0x9E41, 0x66B8,0x9E42, 0x66D6,0x9E43, 0x66DA,0x9E44, 0x66E0,0x9E45, 0x663F,0x9E46, 0x66E6,0x9E47, 0x66E9,0x9E48, 0x66F0,0x9E49, 0x66F5,0x9E4A, 0x66F7,0x9E4B, 0x670F,0x9E4C, 0x6716,0x9E4D, 0x671E,0x9E4E, 0x6726,0x9E4F, 0x6727,0x9E50, 0x9738,0x9E51, 0x672E,0x9E52, 0x673F,0x9E53, 0x6736,0x9E54, 0x6741,0x9E55, 0x6738,0x9E56, 0x6737,0x9E57, 0x6746,0x9E58, 0x675E,0x9E59, 0x6760,0x9E5A, 0x6759,0x9E5B, 0x6763,0x9E5C, 0x6764,0x9E5D, 0x6789,0x9E5E, 0x6770,0x9E5F, 0x67A9,0x9E60, 0x677C,0x9E61, 0x676A,0x9E62, 0x678C,0x9E63, 0x678B,0x9E64, 0x67A6,0x9E65, 0x67A1,0x9E66, 0x6785,0x9E67, 0x67B7,0x9E68, 0x67EF,0x9E69, 0x67B4,0x9E6A, 0x67EC,0x9E6B, 0x67B3,0x9E6C, 0x67E9,0x9E6D, 0x67B8,0x9E6E, 0x67E4,0x9E6F, 0x67DE,0x9E70, 0x67DD,0x9E71, 0x67E2,0x9E72, 0x67EE,0x9E73, 0x67B9,0x9E74, 0x67CE,0x9E75, 0x67C6,0x9E76, 0x67E7,0x9E77, 0x6A9C,0x9E78, 0x681E,0x9E79, 0x6846,0x9E7A, 0x6829,0x9E7B, 0x6840,0x9E7C, 0x684D,0x9E7D, 0x6832,0x9E7E, 0x684E,0x9E80, 0x68B3,0x9E81, 0x682B,0x9E82, 0x6859,0x9E83, 0x6863,0x9E84, 0x6877,0x9E85, 0x687F,0x9E86, 0x689F,0x9E87, 0x688F,0x9E88, 0x68AD,0x9E89, 0x6894,0x9E8A, 0x689D,0x9E8B, 0x689B,0x9E8C, 0x6883,0x9E8D, 0x6AAE,0x9E8E, 0x68B9,0x9E8F, 0x6874,0x9E90, 0x68B5,0x9E91, 0x68A0,0x9E92, 0x68BA,0x9E93, 0x690F,0x9E94, 0x688D,0x9E95, 0x687E,0x9E96, 0x6901,0x9E97, 0x68CA,0x9E98, 0x6908,0x9E99, 0x68D8,0x9E9A, 0x6922,0x9E9B, 0x6926,0x9E9C, 0x68E1,0x9E9D, 0x690C,0x9E9E, 0x68CD,0x9E9F, 0x68D4,0x9EA0, 0x68E7,0x9EA1, 0x68D5,0x9EA2, 0x6936,0x9EA3, 0x6912,0x9EA4, 0x6904,0x9EA5, 0x68D7,0x9EA6, 0x68E3,0x9EA7, 0x6925,0x9EA8, 0x68F9,0x9EA9, 0x68E0,0x9EAA, 0x68EF,0x9EAB, 0x6928,0x9EAC, 0x692A,0x9EAD, 0x691A,0x9EAE, 0x6923,0x9EAF, 0x6921,0x9EB0, 0x68C6,0x9EB1, 0x6979,0x9EB2, 0x6977,0x9EB3, 0x695C,0x9EB4, 0x6978,0x9EB5, 0x696B,0x9EB6, 0x6954,0x9EB7, 0x697E,0x9EB8, 0x696E,0x9EB9, 0x6939,0x9EBA, 0x6974,0x9EBB, 0x693D,0x9EBC, 0x6959,0x9EBD, 0x6930,0x9EBE, 0x6961,0x9EBF, 0x695E,0x9EC0, 0x695D,0x9EC1, 0x6981,0x9EC2, 0x696A,0x9EC3, 0x69B2,0x9EC4, 0x69AE,0x9EC5, 0x69D0,0x9EC6, 0x69BF,0x9EC7, 0x69C1,0x9EC8, 0x69D3,0x9EC9, 0x69BE,0x9ECA, 0x69CE,0x9ECB, 0x5BE8,0x9ECC, 0x69CA,0x9ECD, 0x69DD,0x9ECE, 0x69BB,0x9ECF, 0x69C3,0x9ED0, 0x69A7,0x9ED1, 0x6A2E,0x9ED2, 0x6991,0x9ED3, 0x69A0,0x9ED4, 0x699C,0x9ED5, 0x6995,0x9ED6, 0x69B4,0x9ED7, 0x69DE,0x9ED8, 0x69E8,0x9ED9, 0x6A02,0x9EDA, 0x6A1B,0x9EDB, 0x69FF,0x9EDC, 0x6B0A,0x9EDD, 0x69F9,0x9EDE, 0x69F2,0x9EDF, 0x69E7,0x9EE0, 0x6A05,0x9EE1, 0x69B1,0x9EE2, 0x6A1E,0x9EE3, 0x69ED,0x9EE4, 0x6A14,0x9EE5, 0x69EB,0x9EE6, 0x6A0A,0x9EE7, 0x6A12,0x9EE8, 0x6AC1,0x9EE9, 0x6A23,0x9EEA, 0x6A13,0x9EEB, 0x6A44,0x9EEC, 0x6A0C,0x9EED, 0x6A72,0x9EEE, 0x6A36,0x9EEF, 0x6A78,0x9EF0, 0x6A47,0x9EF1, 0x6A62,0x9EF2, 0x6A59,0x9EF3, 0x6A66,0x9EF4, 0x6A48,0x9EF5, 0x6A38,0x9EF6, 0x6A22,0x9EF7, 0x6A90,0x9EF8, 0x6A8D,0x9EF9, 0x6AA0,0x9EFA, 0x6A84,0x9EFB, 0x6AA2,0x9EFC, 0x6AA3,0x9F40, 0x6A97,0x9F41, 0x8617,0x9F42, 0x6ABB,0x9F43, 0x6AC3,0x9F44, 0x6AC2,0x9F45, 0x6AB8,0x9F46, 0x6AB3,0x9F47, 0x6AAC,0x9F48, 0x6ADE,0x9F49, 0x6AD1,0x9F4A, 0x6ADF,0x9F4B, 0x6AAA,0x9F4C, 0x6ADA,0x9F4D, 0x6AEA,0x9F4E, 0x6AFB,0x9F4F, 0x6B05,0x9F50, 0x8616,0x9F51, 0x6AFA,0x9F52, 0x6B12,0x9F53, 0x6B16,0x9F54, 0x9B31,0x9F55, 0x6B1F,0x9F56, 0x6B38,0x9F57, 0x6B37,0x9F58, 0x76DC,0x9F59, 0x6B39,0x9F5A, 0x98EE,0x9F5B, 0x6B47,0x9F5C, 0x6B43,0x9F5D, 0x6B49,0x9F5E, 0x6B50,0x9F5F, 0x6B59,0x9F60, 0x6B54,0x9F61, 0x6B5B,0x9F62, 0x6B5F,0x9F63, 0x6B61,0x9F64, 0x6B78,0x9F65, 0x6B79,0x9F66, 0x6B7F,0x9F67, 0x6B80,0x9F68, 0x6B84,0x9F69, 0x6B83,0x9F6A, 0x6B8D,0x9F6B, 0x6B98,0x9F6C, 0x6B95,0x9F6D, 0x6B9E,0x9F6E, 0x6BA4,0x9F6F, 0x6BAA,0x9F70, 0x6BAB,0x9F71, 0x6BAF,0x9F72, 0x6BB2,0x9F73, 0x6BB1,0x9F74, 0x6BB3,0x9F75, 0x6BB7,0x9F76, 0x6BBC,0x9F77, 0x6BC6,0x9F78, 0x6BCB,0x9F79, 0x6BD3,0x9F7A, 0x6BDF,0x9F7B, 0x6BEC,0x9F7C, 0x6BEB,0x9F7D, 0x6BF3,0x9F7E, 0x6BEF,0x9F80, 0x9EBE,0x9F81, 0x6C08,0x9F82, 0x6C13,0x9F83, 0x6C14,0x9F84, 0x6C1B,0x9F85, 0x6C24,0x9F86, 0x6C23,0x9F87, 0x6C5E,0x9F88, 0x6C55,0x9F89, 0x6C62,0x9F8A, 0x6C6A,0x9F8B, 0x6C82,0x9F8C, 0x6C8D,0x9F8D, 0x6C9A,0x9F8E, 0x6C81,0x9F8F, 0x6C9B,0x9F90, 0x6C7E,0x9F91, 0x6C68,0x9F92, 0x6C73,0x9F93, 0x6C92,0x9F94, 0x6C90,0x9F95, 0x6CC4,0x9F96, 0x6CF1,0x9F97, 0x6CD3,0x9F98, 0x6CBD,0x9F99, 0x6CD7,0x9F9A, 0x6CC5,0x9F9B, 0x6CDD,0x9F9C, 0x6CAE,0x9F9D, 0x6CB1,0x9F9E, 0x6CBE,0x9F9F, 0x6CBA,0x9FA0, 0x6CDB,0x9FA1, 0x6CEF,0x9FA2, 0x6CD9,0x9FA3, 0x6CEA,0x9FA4, 0x6D1F,0x9FA5, 0x884D,0x9FA6, 0x6D36,0x9FA7, 0x6D2B,0x9FA8, 0x6D3D,0x9FA9, 0x6D38,0x9FAA, 0x6D19,0x9FAB, 0x6D35,0x9FAC, 0x6D33,0x9FAD, 0x6D12,0x9FAE, 0x6D0C,0x9FAF, 0x6D63,0x9FB0, 0x6D93,0x9FB1, 0x6D64,0x9FB2, 0x6D5A,0x9FB3, 0x6D79,0x9FB4, 0x6D59,0x9FB5, 0x6D8E,0x9FB6, 0x6D95,0x9FB7, 0x6FE4,0x9FB8, 0x6D85,0x9FB9, 0x6DF9,0x9FBA, 0x6E15,0x9FBB, 0x6E0A,0x9FBC, 0x6DB5,0x9FBD, 0x6DC7,0x9FBE, 0x6DE6,0x9FBF, 0x6DB8,0x9FC0, 0x6DC6,0x9FC1, 0x6DEC,0x9FC2, 0x6DDE,0x9FC3, 0x6DCC,0x9FC4, 0x6DE8,0x9FC5, 0x6DD2,0x9FC6, 0x6DC5,0x9FC7, 0x6DFA,0x9FC8, 0x6DD9,0x9FC9, 0x6DE4,0x9FCA, 0x6DD5,0x9FCB, 0x6DEA,0x9FCC, 0x6DEE,0x9FCD, 0x6E2D,0x9FCE, 0x6E6E,0x9FCF, 0x6E2E,0x9FD0, 0x6E19,0x9FD1, 0x6E72,0x9FD2, 0x6E5F,0x9FD3, 0x6E3E,0x9FD4, 0x6E23,0x9FD5, 0x6E6B,0x9FD6, 0x6E2B,0x9FD7, 0x6E76,0x9FD8, 0x6E4D,0x9FD9, 0x6E1F,0x9FDA, 0x6E43,0x9FDB, 0x6E3A,0x9FDC, 0x6E4E,0x9FDD, 0x6E24,0x9FDE, 0x6EFF,0x9FDF, 0x6E1D,0x9FE0, 0x6E38,0x9FE1, 0x6E82,0x9FE2, 0x6EAA,0x9FE3, 0x6E98,0x9FE4, 0x6EC9,0x9FE5, 0x6EB7,0x9FE6, 0x6ED3,0x9FE7, 0x6EBD,0x9FE8, 0x6EAF,0x9FE9, 0x6EC4,0x9FEA, 0x6EB2,0x9FEB, 0x6ED4,0x9FEC, 0x6ED5,0x9FED, 0x6E8F,0x9FEE, 0x6EA5,0x9FEF, 0x6EC2,0x9FF0, 0x6E9F,0x9FF1, 0x6F41,0x9FF2, 0x6F11,0x9FF3, 0x704C,0x9FF4, 0x6EEC,0x9FF5, 0x6EF8,0x9FF6, 0x6EFE,0x9FF7, 0x6F3F,0x9FF8, 0x6EF2,0x9FF9, 0x6F31,0x9FFA, 0x6EEF,0x9FFB, 0x6F32,0x9FFC, 0x6ECC,0xE040, 0x6F3E,0xE041, 0x6F13,0xE042, 0x6EF7,0xE043, 0x6F86,0xE044, 0x6F7A,0xE045, 0x6F78,0xE046, 0x6F81,0xE047, 0x6F80,0xE048, 0x6F6F,0xE049, 0x6F5B,0xE04A, 0x6FF3,0xE04B, 0x6F6D,0xE04C, 0x6F82,0xE04D, 0x6F7C,0xE04E, 0x6F58,0xE04F, 0x6F8E,0xE050, 0x6F91,0xE051, 0x6FC2,0xE052, 0x6F66,0xE053, 0x6FB3,0xE054, 0x6FA3,0xE055, 0x6FA1,0xE056, 0x6FA4,0xE057, 0x6FB9,0xE058, 0x6FC6,0xE059, 0x6FAA,0xE05A, 0x6FDF,0xE05B, 0x6FD5,0xE05C, 0x6FEC,0xE05D, 0x6FD4,0xE05E, 0x6FD8,0xE05F, 0x6FF1,0xE060, 0x6FEE,0xE061, 0x6FDB,0xE062, 0x7009,0xE063, 0x700B,0xE064, 0x6FFA,0xE065, 0x7011,0xE066, 0x7001,0xE067, 0x700F,0xE068, 0x6FFE,0xE069, 0x701B,0xE06A, 0x701A,0xE06B, 0x6F74,0xE06C, 0x701D,0xE06D, 0x7018,0xE06E, 0x701F,0xE06F, 0x7030,0xE070, 0x703E,0xE071, 0x7032,0xE072, 0x7051,0xE073, 0x7063,0xE074, 0x7099,0xE075, 0x7092,0xE076, 0x70AF,0xE077, 0x70F1,0xE078, 0x70AC,0xE079, 0x70B8,0xE07A, 0x70B3,0xE07B, 0x70AE,0xE07C, 0x70DF,0xE07D, 0x70CB,0xE07E, 0x70DD,0xE080, 0x70D9,0xE081, 0x7109,0xE082, 0x70FD,0xE083, 0x711C,0xE084, 0x7119,0xE085, 0x7165,0xE086, 0x7155,0xE087, 0x7188,0xE088, 0x7166,0xE089, 0x7162,0xE08A, 0x714C,0xE08B, 0x7156,0xE08C, 0x716C,0xE08D, 0x718F,0xE08E, 0x71FB,0xE08F, 0x7184,0xE090, 0x7195,0xE091, 0x71A8,0xE092, 0x71AC,0xE093, 0x71D7,0xE094, 0x71B9,0xE095, 0x71BE,0xE096, 0x71D2,0xE097, 0x71C9,0xE098, 0x71D4,0xE099, 0x71CE,0xE09A, 0x71E0,0xE09B, 0x71EC,0xE09C, 0x71E7,0xE09D, 0x71F5,0xE09E, 0x71FC,0xE09F, 0x71F9,0xE0A0, 0x71FF,0xE0A1, 0x720D,0xE0A2, 0x7210,0xE0A3, 0x721B,0xE0A4, 0x7228,0xE0A5, 0x722D,0xE0A6, 0x722C,0xE0A7, 0x7230,0xE0A8, 0x7232,0xE0A9, 0x723B,0xE0AA, 0x723C,0xE0AB, 0x723F,0xE0AC, 0x7240,0xE0AD, 0x7246,0xE0AE, 0x724B,0xE0AF, 0x7258,0xE0B0, 0x7274,0xE0B1, 0x727E,0xE0B2, 0x7282,0xE0B3, 0x7281,0xE0B4, 0x7287,0xE0B5, 0x7292,0xE0B6, 0x7296,0xE0B7, 0x72A2,0xE0B8, 0x72A7,0xE0B9, 0x72B9,0xE0BA, 0x72B2,0xE0BB, 0x72C3,0xE0BC, 0x72C6,0xE0BD, 0x72C4,0xE0BE, 0x72CE,0xE0BF, 0x72D2,0xE0C0, 0x72E2,0xE0C1, 0x72E0,0xE0C2, 0x72E1,0xE0C3, 0x72F9,0xE0C4, 0x72F7,0xE0C5, 0x500F,0xE0C6, 0x7317,0xE0C7, 0x730A,0xE0C8, 0x731C,0xE0C9, 0x7316,0xE0CA, 0x731D,0xE0CB, 0x7334,0xE0CC, 0x732F,0xE0CD, 0x7329,0xE0CE, 0x7325,0xE0CF, 0x733E,0xE0D0, 0x734E,0xE0D1, 0x734F,0xE0D2, 0x9ED8,0xE0D3, 0x7357,0xE0D4, 0x736A,0xE0D5, 0x7368,0xE0D6, 0x7370,0xE0D7, 0x7378,0xE0D8, 0x7375,0xE0D9, 0x737B,0xE0DA, 0x737A,0xE0DB, 0x73C8,0xE0DC, 0x73B3,0xE0DD, 0x73CE,0xE0DE, 0x73BB,0xE0DF, 0x73C0,0xE0E0, 0x73E5,0xE0E1, 0x73EE,0xE0E2, 0x73DE,0xE0E3, 0x74A2,0xE0E4, 0x7405,0xE0E5, 0x746F,0xE0E6, 0x7425,0xE0E7, 0x73F8,0xE0E8, 0x7432,0xE0E9, 0x743A,0xE0EA, 0x7455,0xE0EB, 0x743F,0xE0EC, 0x745F,0xE0ED, 0x7459,0xE0EE, 0x7441,0xE0EF, 0x745C,0xE0F0, 0x7469,0xE0F1, 0x7470,0xE0F2, 0x7463,0xE0F3, 0x746A,0xE0F4, 0x7476,0xE0F5, 0x747E,0xE0F6, 0x748B,0xE0F7, 0x749E,0xE0F8, 0x74A7,0xE0F9, 0x74CA,0xE0FA, 0x74CF,0xE0FB, 0x74D4,0xE0FC, 0x73F1,0xE140, 0x74E0,0xE141, 0x74E3,0xE142, 0x74E7,0xE143, 0x74E9,0xE144, 0x74EE,0xE145, 0x74F2,0xE146, 0x74F0,0xE147, 0x74F1,0xE148, 0x74F8,0xE149, 0x74F7,0xE14A, 0x7504,0xE14B, 0x7503,0xE14C, 0x7505,0xE14D, 0x750C,0xE14E, 0x750E,0xE14F, 0x750D,0xE150, 0x7515,0xE151, 0x7513,0xE152, 0x751E,0xE153, 0x7526,0xE154, 0x752C,0xE155, 0x753C,0xE156, 0x7544,0xE157, 0x754D,0xE158, 0x754A,0xE159, 0x7549,0xE15A, 0x755B,0xE15B, 0x7546,0xE15C, 0x755A,0xE15D, 0x7569,0xE15E, 0x7564,0xE15F, 0x7567,0xE160, 0x756B,0xE161, 0x756D,0xE162, 0x7578,0xE163, 0x7576,0xE164, 0x7586,0xE165, 0x7587,0xE166, 0x7574,0xE167, 0x758A,0xE168, 0x7589,0xE169, 0x7582,0xE16A, 0x7594,0xE16B, 0x759A,0xE16C, 0x759D,0xE16D, 0x75A5,0xE16E, 0x75A3,0xE16F, 0x75C2,0xE170, 0x75B3,0xE171, 0x75C3,0xE172, 0x75B5,0xE173, 0x75BD,0xE174, 0x75B8,0xE175, 0x75BC,0xE176, 0x75B1,0xE177, 0x75CD,0xE178, 0x75CA,0xE179, 0x75D2,0xE17A, 0x75D9,0xE17B, 0x75E3,0xE17C, 0x75DE,0xE17D, 0x75FE,0xE17E, 0x75FF,0xE180, 0x75FC,0xE181, 0x7601,0xE182, 0x75F0,0xE183, 0x75FA,0xE184, 0x75F2,0xE185, 0x75F3,0xE186, 0x760B,0xE187, 0x760D,0xE188, 0x7609,0xE189, 0x761F,0xE18A, 0x7627,0xE18B, 0x7620,0xE18C, 0x7621,0xE18D, 0x7622,0xE18E, 0x7624,0xE18F, 0x7634,0xE190, 0x7630,0xE191, 0x763B,0xE192, 0x7647,0xE193, 0x7648,0xE194, 0x7646,0xE195, 0x765C,0xE196, 0x7658,0xE197, 0x7661,0xE198, 0x7662,0xE199, 0x7668,0xE19A, 0x7669,0xE19B, 0x766A,0xE19C, 0x7667,0xE19D, 0x766C,0xE19E, 0x7670,0xE19F, 0x7672,0xE1A0, 0x7676,0xE1A1, 0x7678,0xE1A2, 0x767C,0xE1A3, 0x7680,0xE1A4, 0x7683,0xE1A5, 0x7688,0xE1A6, 0x768B,0xE1A7, 0x768E,0xE1A8, 0x7696,0xE1A9, 0x7693,0xE1AA, 0x7699,0xE1AB, 0x769A,0xE1AC, 0x76B0,0xE1AD, 0x76B4,0xE1AE, 0x76B8,0xE1AF, 0x76B9,0xE1B0, 0x76BA,0xE1B1, 0x76C2,0xE1B2, 0x76CD,0xE1B3, 0x76D6,0xE1B4, 0x76D2,0xE1B5, 0x76DE,0xE1B6, 0x76E1,0xE1B7, 0x76E5,0xE1B8, 0x76E7,0xE1B9, 0x76EA,0xE1BA, 0x862F,0xE1BB, 0x76FB,0xE1BC, 0x7708,0xE1BD, 0x7707,0xE1BE, 0x7704,0xE1BF, 0x7729,0xE1C0, 0x7724,0xE1C1, 0x771E,0xE1C2, 0x7725,0xE1C3, 0x7726,0xE1C4, 0x771B,0xE1C5, 0x7737,0xE1C6, 0x7738,0xE1C7, 0x7747,0xE1C8, 0x775A,0xE1C9, 0x7768,0xE1CA, 0x776B,0xE1CB, 0x775B,0xE1CC, 0x7765,0xE1CD, 0x777F,0xE1CE, 0x777E,0xE1CF, 0x7779,0xE1D0, 0x778E,0xE1D1, 0x778B,0xE1D2, 0x7791,0xE1D3, 0x77A0,0xE1D4, 0x779E,0xE1D5, 0x77B0,0xE1D6, 0x77B6,0xE1D7, 0x77B9,0xE1D8, 0x77BF,0xE1D9, 0x77BC,0xE1DA, 0x77BD,0xE1DB, 0x77BB,0xE1DC, 0x77C7,0xE1DD, 0x77CD,0xE1DE, 0x77D7,0xE1DF, 0x77DA,0xE1E0, 0x77DC,0xE1E1, 0x77E3,0xE1E2, 0x77EE,0xE1E3, 0x77FC,0xE1E4, 0x780C,0xE1E5, 0x7812,0xE1E6, 0x7926,0xE1E7, 0x7820,0xE1E8, 0x792A,0xE1E9, 0x7845,0xE1EA, 0x788E,0xE1EB, 0x7874,0xE1EC, 0x7886,0xE1ED, 0x787C,0xE1EE, 0x789A,0xE1EF, 0x788C,0xE1F0, 0x78A3,0xE1F1, 0x78B5,0xE1F2, 0x78AA,0xE1F3, 0x78AF,0xE1F4, 0x78D1,0xE1F5, 0x78C6,0xE1F6, 0x78CB,0xE1F7, 0x78D4,0xE1F8, 0x78BE,0xE1F9, 0x78BC,0xE1FA, 0x78C5,0xE1FB, 0x78CA,0xE1FC, 0x78EC,0xE240, 0x78E7,0xE241, 0x78DA,0xE242, 0x78FD,0xE243, 0x78F4,0xE244, 0x7907,0xE245, 0x7912,0xE246, 0x7911,0xE247, 0x7919,0xE248, 0x792C,0xE249, 0x792B,0xE24A, 0x7940,0xE24B, 0x7960,0xE24C, 0x7957,0xE24D, 0x795F,0xE24E, 0x795A,0xE24F, 0x7955,0xE250, 0x7953,0xE251, 0x797A,0xE252, 0x797F,0xE253, 0x798A,0xE254, 0x799D,0xE255, 0x79A7,0xE256, 0x9F4B,0xE257, 0x79AA,0xE258, 0x79AE,0xE259, 0x79B3,0xE25A, 0x79B9,0xE25B, 0x79BA,0xE25C, 0x79C9,0xE25D, 0x79D5,0xE25E, 0x79E7,0xE25F, 0x79EC,0xE260, 0x79E1,0xE261, 0x79E3,0xE262, 0x7A08,0xE263, 0x7A0D,0xE264, 0x7A18,0xE265, 0x7A19,0xE266, 0x7A20,0xE267, 0x7A1F,0xE268, 0x7980,0xE269, 0x7A31,0xE26A, 0x7A3B,0xE26B, 0x7A3E,0xE26C, 0x7A37,0xE26D, 0x7A43,0xE26E, 0x7A57,0xE26F, 0x7A49,0xE270, 0x7A61,0xE271, 0x7A62,0xE272, 0x7A69,0xE273, 0x9F9D,0xE274, 0x7A70,0xE275, 0x7A79,0xE276, 0x7A7D,0xE277, 0x7A88,0xE278, 0x7A97,0xE279, 0x7A95,0xE27A, 0x7A98,0xE27B, 0x7A96,0xE27C, 0x7AA9,0xE27D, 0x7AC8,0xE27E, 0x7AB0,0xE280, 0x7AB6,0xE281, 0x7AC5,0xE282, 0x7AC4,0xE283, 0x7ABF,0xE284, 0x9083,0xE285, 0x7AC7,0xE286, 0x7ACA,0xE287, 0x7ACD,0xE288, 0x7ACF,0xE289, 0x7AD5,0xE28A, 0x7AD3,0xE28B, 0x7AD9,0xE28C, 0x7ADA,0xE28D, 0x7ADD,0xE28E, 0x7AE1,0xE28F, 0x7AE2,0xE290, 0x7AE6,0xE291, 0x7AED,0xE292, 0x7AF0,0xE293, 0x7B02,0xE294, 0x7B0F,0xE295, 0x7B0A,0xE296, 0x7B06,0xE297, 0x7B33,0xE298, 0x7B18,0xE299, 0x7B19,0xE29A, 0x7B1E,0xE29B, 0x7B35,0xE29C, 0x7B28,0xE29D, 0x7B36,0xE29E, 0x7B50,0xE29F, 0x7B7A,0xE2A0, 0x7B04,0xE2A1, 0x7B4D,0xE2A2, 0x7B0B,0xE2A3, 0x7B4C,0xE2A4, 0x7B45,0xE2A5, 0x7B75,0xE2A6, 0x7B65,0xE2A7, 0x7B74,0xE2A8, 0x7B67,0xE2A9, 0x7B70,0xE2AA, 0x7B71,0xE2AB, 0x7B6C,0xE2AC, 0x7B6E,0xE2AD, 0x7B9D,0xE2AE, 0x7B98,0xE2AF, 0x7B9F,0xE2B0, 0x7B8D,0xE2B1, 0x7B9C,0xE2B2, 0x7B9A,0xE2B3, 0x7B8B,0xE2B4, 0x7B92,0xE2B5, 0x7B8F,0xE2B6, 0x7B5D,0xE2B7, 0x7B99,0xE2B8, 0x7BCB,0xE2B9, 0x7BC1,0xE2BA, 0x7BCC,0xE2BB, 0x7BCF,0xE2BC, 0x7BB4,0xE2BD, 0x7BC6,0xE2BE, 0x7BDD,0xE2BF, 0x7BE9,0xE2C0, 0x7C11,0xE2C1, 0x7C14,0xE2C2, 0x7BE6,0xE2C3, 0x7BE5,0xE2C4, 0x7C60,0xE2C5, 0x7C00,0xE2C6, 0x7C07,0xE2C7, 0x7C13,0xE2C8, 0x7BF3,0xE2C9, 0x7BF7,0xE2CA, 0x7C17,0xE2CB, 0x7C0D,0xE2CC, 0x7BF6,0xE2CD, 0x7C23,0xE2CE, 0x7C27,0xE2CF, 0x7C2A,0xE2D0, 0x7C1F,0xE2D1, 0x7C37,0xE2D2, 0x7C2B,0xE2D3, 0x7C3D,0xE2D4, 0x7C4C,0xE2D5, 0x7C43,0xE2D6, 0x7C54,0xE2D7, 0x7C4F,0xE2D8, 0x7C40,0xE2D9, 0x7C50,0xE2DA, 0x7C58,0xE2DB, 0x7C5F,0xE2DC, 0x7C64,0xE2DD, 0x7C56,0xE2DE, 0x7C65,0xE2DF, 0x7C6C,0xE2E0, 0x7C75,0xE2E1, 0x7C83,0xE2E2, 0x7C90,0xE2E3, 0x7CA4,0xE2E4, 0x7CAD,0xE2E5, 0x7CA2,0xE2E6, 0x7CAB,0xE2E7, 0x7CA1,0xE2E8, 0x7CA8,0xE2E9, 0x7CB3,0xE2EA, 0x7CB2,0xE2EB, 0x7CB1,0xE2EC, 0x7CAE,0xE2ED, 0x7CB9,0xE2EE, 0x7CBD,0xE2EF, 0x7CC0,0xE2F0, 0x7CC5,0xE2F1, 0x7CC2,0xE2F2, 0x7CD8,0xE2F3, 0x7CD2,0xE2F4, 0x7CDC,0xE2F5, 0x7CE2,0xE2F6, 0x9B3B,0xE2F7, 0x7CEF,0xE2F8, 0x7CF2,0xE2F9, 0x7CF4,0xE2FA, 0x7CF6,0xE2FB, 0x7CFA,0xE2FC, 0x7D06,0xE340, 0x7D02,0xE341, 0x7D1C,0xE342, 0x7D15,0xE343, 0x7D0A,0xE344, 0x7D45,0xE345, 0x7D4B,0xE346, 0x7D2E,0xE347, 0x7D32,0xE348, 0x7D3F,0xE349, 0x7D35,0xE34A, 0x7D46,0xE34B, 0x7D73,0xE34C, 0x7D56,0xE34D, 0x7D4E,0xE34E, 0x7D72,0xE34F, 0x7D68,0xE350, 0x7D6E,0xE351, 0x7D4F,0xE352, 0x7D63,0xE353, 0x7D93,0xE354, 0x7D89,0xE355, 0x7D5B,0xE356, 0x7D8F,0xE357, 0x7D7D,0xE358, 0x7D9B,0xE359, 0x7DBA,0xE35A, 0x7DAE,0xE35B, 0x7DA3,0xE35C, 0x7DB5,0xE35D, 0x7DC7,0xE35E, 0x7DBD,0xE35F, 0x7DAB,0xE360, 0x7E3D,0xE361, 0x7DA2,0xE362, 0x7DAF,0xE363, 0x7DDC,0xE364, 0x7DB8,0xE365, 0x7D9F,0xE366, 0x7DB0,0xE367, 0x7DD8,0xE368, 0x7DDD,0xE369, 0x7DE4,0xE36A, 0x7DDE,0xE36B, 0x7DFB,0xE36C, 0x7DF2,0xE36D, 0x7DE1,0xE36E, 0x7E05,0xE36F, 0x7E0A,0xE370, 0x7E23,0xE371, 0x7E21,0xE372, 0x7E12,0xE373, 0x7E31,0xE374, 0x7E1F,0xE375, 0x7E09,0xE376, 0x7E0B,0xE377, 0x7E22,0xE378, 0x7E46,0xE379, 0x7E66,0xE37A, 0x7E3B,0xE37B, 0x7E35,0xE37C, 0x7E39,0xE37D, 0x7E43,0xE37E, 0x7E37,0xE380, 0x7E32,0xE381, 0x7E3A,0xE382, 0x7E67,0xE383, 0x7E5D,0xE384, 0x7E56,0xE385, 0x7E5E,0xE386, 0x7E59,0xE387, 0x7E5A,0xE388, 0x7E79,0xE389, 0x7E6A,0xE38A, 0x7E69,0xE38B, 0x7E7C,0xE38C, 0x7E7B,0xE38D, 0x7E83,0xE38E, 0x7DD5,0xE38F, 0x7E7D,0xE390, 0x8FAE,0xE391, 0x7E7F,0xE392, 0x7E88,0xE393, 0x7E89,0xE394, 0x7E8C,0xE395, 0x7E92,0xE396, 0x7E90,0xE397, 0x7E93,0xE398, 0x7E94,0xE399, 0x7E96,0xE39A, 0x7E8E,0xE39B, 0x7E9B,0xE39C, 0x7E9C,0xE39D, 0x7F38,0xE39E, 0x7F3A,0xE39F, 0x7F45,0xE3A0, 0x7F4C,0xE3A1, 0x7F4D,0xE3A2, 0x7F4E,0xE3A3, 0x7F50,0xE3A4, 0x7F51,0xE3A5, 0x7F55,0xE3A6, 0x7F54,0xE3A7, 0x7F58,0xE3A8, 0x7F5F,0xE3A9, 0x7F60,0xE3AA, 0x7F68,0xE3AB, 0x7F69,0xE3AC, 0x7F67,0xE3AD, 0x7F78,0xE3AE, 0x7F82,0xE3AF, 0x7F86,0xE3B0, 0x7F83,0xE3B1, 0x7F88,0xE3B2, 0x7F87,0xE3B3, 0x7F8C,0xE3B4, 0x7F94,0xE3B5, 0x7F9E,0xE3B6, 0x7F9D,0xE3B7, 0x7F9A,0xE3B8, 0x7FA3,0xE3B9, 0x7FAF,0xE3BA, 0x7FB2,0xE3BB, 0x7FB9,0xE3BC, 0x7FAE,0xE3BD, 0x7FB6,0xE3BE, 0x7FB8,0xE3BF, 0x8B71,0xE3C0, 0x7FC5,0xE3C1, 0x7FC6,0xE3C2, 0x7FCA,0xE3C3, 0x7FD5,0xE3C4, 0x7FD4,0xE3C5, 0x7FE1,0xE3C6, 0x7FE6,0xE3C7, 0x7FE9,0xE3C8, 0x7FF3,0xE3C9, 0x7FF9,0xE3CA, 0x98DC,0xE3CB, 0x8006,0xE3CC, 0x8004,0xE3CD, 0x800B,0xE3CE, 0x8012,0xE3CF, 0x8018,0xE3D0, 0x8019,0xE3D1, 0x801C,0xE3D2, 0x8021,0xE3D3, 0x8028,0xE3D4, 0x803F,0xE3D5, 0x803B,0xE3D6, 0x804A,0xE3D7, 0x8046,0xE3D8, 0x8052,0xE3D9, 0x8058,0xE3DA, 0x805A,0xE3DB, 0x805F,0xE3DC, 0x8062,0xE3DD, 0x8068,0xE3DE, 0x8073,0xE3DF, 0x8072,0xE3E0, 0x8070,0xE3E1, 0x8076,0xE3E2, 0x8079,0xE3E3, 0x807D,0xE3E4, 0x807F,0xE3E5, 0x8084,0xE3E6, 0x8086,0xE3E7, 0x8085,0xE3E8, 0x809B,0xE3E9, 0x8093,0xE3EA, 0x809A,0xE3EB, 0x80AD,0xE3EC, 0x5190,0xE3ED, 0x80AC,0xE3EE, 0x80DB,0xE3EF, 0x80E5,0xE3F0, 0x80D9,0xE3F1, 0x80DD,0xE3F2, 0x80C4,0xE3F3, 0x80DA,0xE3F4, 0x80D6,0xE3F5, 0x8109,0xE3F6, 0x80EF,0xE3F7, 0x80F1,0xE3F8, 0x811B,0xE3F9, 0x8129,0xE3FA, 0x8123,0xE3FB, 0x812F,0xE3FC, 0x814B,0xE440, 0x968B,0xE441, 0x8146,0xE442, 0x813E,0xE443, 0x8153,0xE444, 0x8151,0xE445, 0x80FC,0xE446, 0x8171,0xE447, 0x816E,0xE448, 0x8165,0xE449, 0x8166,0xE44A, 0x8174,0xE44B, 0x8183,0xE44C, 0x8188,0xE44D, 0x818A,0xE44E, 0x8180,0xE44F, 0x8182,0xE450, 0x81A0,0xE451, 0x8195,0xE452, 0x81A4,0xE453, 0x81A3,0xE454, 0x815F,0xE455, 0x8193,0xE456, 0x81A9,0xE457, 0x81B0,0xE458, 0x81B5,0xE459, 0x81BE,0xE45A, 0x81B8,0xE45B, 0x81BD,0xE45C, 0x81C0,0xE45D, 0x81C2,0xE45E, 0x81BA,0xE45F, 0x81C9,0xE460, 0x81CD,0xE461, 0x81D1,0xE462, 0x81D9,0xE463, 0x81D8,0xE464, 0x81C8,0xE465, 0x81DA,0xE466, 0x81DF,0xE467, 0x81E0,0xE468, 0x81E7,0xE469, 0x81FA,0xE46A, 0x81FB,0xE46B, 0x81FE,0xE46C, 0x8201,0xE46D, 0x8202,0xE46E, 0x8205,0xE46F, 0x8207,0xE470, 0x820A,0xE471, 0x820D,0xE472, 0x8210,0xE473, 0x8216,0xE474, 0x8229,0xE475, 0x822B,0xE476, 0x8238,0xE477, 0x8233,0xE478, 0x8240,0xE479, 0x8259,0xE47A, 0x8258,0xE47B, 0x825D,0xE47C, 0x825A,0xE47D, 0x825F,0xE47E, 0x8264,0xE480, 0x8262,0xE481, 0x8268,0xE482, 0x826A,0xE483, 0x826B,0xE484, 0x822E,0xE485, 0x8271,0xE486, 0x8277,0xE487, 0x8278,0xE488, 0x827E,0xE489, 0x828D,0xE48A, 0x8292,0xE48B, 0x82AB,0xE48C, 0x829F,0xE48D, 0x82BB,0xE48E, 0x82AC,0xE48F, 0x82E1,0xE490, 0x82E3,0xE491, 0x82DF,0xE492, 0x82D2,0xE493, 0x82F4,0xE494, 0x82F3,0xE495, 0x82FA,0xE496, 0x8393,0xE497, 0x8303,0xE498, 0x82FB,0xE499, 0x82F9,0xE49A, 0x82DE,0xE49B, 0x8306,0xE49C, 0x82DC,0xE49D, 0x8309,0xE49E, 0x82D9,0xE49F, 0x8335,0xE4A0, 0x8334,0xE4A1, 0x8316,0xE4A2, 0x8332,0xE4A3, 0x8331,0xE4A4, 0x8340,0xE4A5, 0x8339,0xE4A6, 0x8350,0xE4A7, 0x8345,0xE4A8, 0x832F,0xE4A9, 0x832B,0xE4AA, 0x8317,0xE4AB, 0x8318,0xE4AC, 0x8385,0xE4AD, 0x839A,0xE4AE, 0x83AA,0xE4AF, 0x839F,0xE4B0, 0x83A2,0xE4B1, 0x8396,0xE4B2, 0x8323,0xE4B3, 0x838E,0xE4B4, 0x8387,0xE4B5, 0x838A,0xE4B6, 0x837C,0xE4B7, 0x83B5,0xE4B8, 0x8373,0xE4B9, 0x8375,0xE4BA, 0x83A0,0xE4BB, 0x8389,0xE4BC, 0x83A8,0xE4BD, 0x83F4,0xE4BE, 0x8413,0xE4BF, 0x83EB,0xE4C0, 0x83CE,0xE4C1, 0x83FD,0xE4C2, 0x8403,0xE4C3, 0x83D8,0xE4C4, 0x840B,0xE4C5, 0x83C1,0xE4C6, 0x83F7,0xE4C7, 0x8407,0xE4C8, 0x83E0,0xE4C9, 0x83F2,0xE4CA, 0x840D,0xE4CB, 0x8422,0xE4CC, 0x8420,0xE4CD, 0x83BD,0xE4CE, 0x8438,0xE4CF, 0x8506,0xE4D0, 0x83FB,0xE4D1, 0x846D,0xE4D2, 0x842A,0xE4D3, 0x843C,0xE4D4, 0x855A,0xE4D5, 0x8484,0xE4D6, 0x8477,0xE4D7, 0x846B,0xE4D8, 0x84AD,0xE4D9, 0x846E,0xE4DA, 0x8482,0xE4DB, 0x8469,0xE4DC, 0x8446,0xE4DD, 0x842C,0xE4DE, 0x846F,0xE4DF, 0x8479,0xE4E0, 0x8435,0xE4E1, 0x84CA,0xE4E2, 0x8462,0xE4E3, 0x84B9,0xE4E4, 0x84BF,0xE4E5, 0x849F,0xE4E6, 0x84D9,0xE4E7, 0x84CD,0xE4E8, 0x84BB,0xE4E9, 0x84DA,0xE4EA, 0x84D0,0xE4EB, 0x84C1,0xE4EC, 0x84C6,0xE4ED, 0x84D6,0xE4EE, 0x84A1,0xE4EF, 0x8521,0xE4F0, 0x84FF,0xE4F1, 0x84F4,0xE4F2, 0x8517,0xE4F3, 0x8518,0xE4F4, 0x852C,0xE4F5, 0x851F,0xE4F6, 0x8515,0xE4F7, 0x8514,0xE4F8, 0x84FC,0xE4F9, 0x8540,0xE4FA, 0x8563,0xE4FB, 0x8558,0xE4FC, 0x8548,0xE540, 0x8541,0xE541, 0x8602,0xE542, 0x854B,0xE543, 0x8555,0xE544, 0x8580,0xE545, 0x85A4,0xE546, 0x8588,0xE547, 0x8591,0xE548, 0x858A,0xE549, 0x85A8,0xE54A, 0x856D,0xE54B, 0x8594,0xE54C, 0x859B,0xE54D, 0x85EA,0xE54E, 0x8587,0xE54F, 0x859C,0xE550, 0x8577,0xE551, 0x857E,0xE552, 0x8590,0xE553, 0x85C9,0xE554, 0x85BA,0xE555, 0x85CF,0xE556, 0x85B9,0xE557, 0x85D0,0xE558, 0x85D5,0xE559, 0x85DD,0xE55A, 0x85E5,0xE55B, 0x85DC,0xE55C, 0x85F9,0xE55D, 0x860A,0xE55E, 0x8613,0xE55F, 0x860B,0xE560, 0x85FE,0xE561, 0x85FA,0xE562, 0x8606,0xE563, 0x8622,0xE564, 0x861A,0xE565, 0x8630,0xE566, 0x863F,0xE567, 0x864D,0xE568, 0x4E55,0xE569, 0x8654,0xE56A, 0x865F,0xE56B, 0x8667,0xE56C, 0x8671,0xE56D, 0x8693,0xE56E, 0x86A3,0xE56F, 0x86A9,0xE570, 0x86AA,0xE571, 0x868B,0xE572, 0x868C,0xE573, 0x86B6,0xE574, 0x86AF,0xE575, 0x86C4,0xE576, 0x86C6,0xE577, 0x86B0,0xE578, 0x86C9,0xE579, 0x8823,0xE57A, 0x86AB,0xE57B, 0x86D4,0xE57C, 0x86DE,0xE57D, 0x86E9,0xE57E, 0x86EC,0xE580, 0x86DF,0xE581, 0x86DB,0xE582, 0x86EF,0xE583, 0x8712,0xE584, 0x8706,0xE585, 0x8708,0xE586, 0x8700,0xE587, 0x8703,0xE588, 0x86FB,0xE589, 0x8711,0xE58A, 0x8709,0xE58B, 0x870D,0xE58C, 0x86F9,0xE58D, 0x870A,0xE58E, 0x8734,0xE58F, 0x873F,0xE590, 0x8737,0xE591, 0x873B,0xE592, 0x8725,0xE593, 0x8729,0xE594, 0x871A,0xE595, 0x8760,0xE596, 0x875F,0xE597, 0x8778,0xE598, 0x874C,0xE599, 0x874E,0xE59A, 0x8774,0xE59B, 0x8757,0xE59C, 0x8768,0xE59D, 0x876E,0xE59E, 0x8759,0xE59F, 0x8753,0xE5A0, 0x8763,0xE5A1, 0x876A,0xE5A2, 0x8805,0xE5A3, 0x87A2,0xE5A4, 0x879F,0xE5A5, 0x8782,0xE5A6, 0x87AF,0xE5A7, 0x87CB,0xE5A8, 0x87BD,0xE5A9, 0x87C0,0xE5AA, 0x87D0,0xE5AB, 0x96D6,0xE5AC, 0x87AB,0xE5AD, 0x87C4,0xE5AE, 0x87B3,0xE5AF, 0x87C7,0xE5B0, 0x87C6,0xE5B1, 0x87BB,0xE5B2, 0x87EF,0xE5B3, 0x87F2,0xE5B4, 0x87E0,0xE5B5, 0x880F,0xE5B6, 0x880D,0xE5B7, 0x87FE,0xE5B8, 0x87F6,0xE5B9, 0x87F7,0xE5BA, 0x880E,0xE5BB, 0x87D2,0xE5BC, 0x8811,0xE5BD, 0x8816,0xE5BE, 0x8815,0xE5BF, 0x8822,0xE5C0, 0x8821,0xE5C1, 0x8831,0xE5C2, 0x8836,0xE5C3, 0x8839,0xE5C4, 0x8827,0xE5C5, 0x883B,0xE5C6, 0x8844,0xE5C7, 0x8842,0xE5C8, 0x8852,0xE5C9, 0x8859,0xE5CA, 0x885E,0xE5CB, 0x8862,0xE5CC, 0x886B,0xE5CD, 0x8881,0xE5CE, 0x887E,0xE5CF, 0x889E,0xE5D0, 0x8875,0xE5D1, 0x887D,0xE5D2, 0x88B5,0xE5D3, 0x8872,0xE5D4, 0x8882,0xE5D5, 0x8897,0xE5D6, 0x8892,0xE5D7, 0x88AE,0xE5D8, 0x8899,0xE5D9, 0x88A2,0xE5DA, 0x888D,0xE5DB, 0x88A4,0xE5DC, 0x88B0,0xE5DD, 0x88BF,0xE5DE, 0x88B1,0xE5DF, 0x88C3,0xE5E0, 0x88C4,0xE5E1, 0x88D4,0xE5E2, 0x88D8,0xE5E3, 0x88D9,0xE5E4, 0x88DD,0xE5E5, 0x88F9,0xE5E6, 0x8902,0xE5E7, 0x88FC,0xE5E8, 0x88F4,0xE5E9, 0x88E8,0xE5EA, 0x88F2,0xE5EB, 0x8904,0xE5EC, 0x890C,0xE5ED, 0x890A,0xE5EE, 0x8913,0xE5EF, 0x8943,0xE5F0, 0x891E,0xE5F1, 0x8925,0xE5F2, 0x892A,0xE5F3, 0x892B,0xE5F4, 0x8941,0xE5F5, 0x8944,0xE5F6, 0x893B,0xE5F7, 0x8936,0xE5F8, 0x8938,0xE5F9, 0x894C,0xE5FA, 0x891D,0xE5FB, 0x8960,0xE5FC, 0x895E,0xE640, 0x8966,0xE641, 0x8964,0xE642, 0x896D,0xE643, 0x896A,0xE644, 0x896F,0xE645, 0x8974,0xE646, 0x8977,0xE647, 0x897E,0xE648, 0x8983,0xE649, 0x8988,0xE64A, 0x898A,0xE64B, 0x8993,0xE64C, 0x8998,0xE64D, 0x89A1,0xE64E, 0x89A9,0xE64F, 0x89A6,0xE650, 0x89AC,0xE651, 0x89AF,0xE652, 0x89B2,0xE653, 0x89BA,0xE654, 0x89BD,0xE655, 0x89BF,0xE656, 0x89C0,0xE657, 0x89DA,0xE658, 0x89DC,0xE659, 0x89DD,0xE65A, 0x89E7,0xE65B, 0x89F4,0xE65C, 0x89F8,0xE65D, 0x8A03,0xE65E, 0x8A16,0xE65F, 0x8A10,0xE660, 0x8A0C,0xE661, 0x8A1B,0xE662, 0x8A1D,0xE663, 0x8A25,0xE664, 0x8A36,0xE665, 0x8A41,0xE666, 0x8A5B,0xE667, 0x8A52,0xE668, 0x8A46,0xE669, 0x8A48,0xE66A, 0x8A7C,0xE66B, 0x8A6D,0xE66C, 0x8A6C,0xE66D, 0x8A62,0xE66E, 0x8A85,0xE66F, 0x8A82,0xE670, 0x8A84,0xE671, 0x8AA8,0xE672, 0x8AA1,0xE673, 0x8A91,0xE674, 0x8AA5,0xE675, 0x8AA6,0xE676, 0x8A9A,0xE677, 0x8AA3,0xE678, 0x8AC4,0xE679, 0x8ACD,0xE67A, 0x8AC2,0xE67B, 0x8ADA,0xE67C, 0x8AEB,0xE67D, 0x8AF3,0xE67E, 0x8AE7,0xE680, 0x8AE4,0xE681, 0x8AF1,0xE682, 0x8B14,0xE683, 0x8AE0,0xE684, 0x8AE2,0xE685, 0x8AF7,0xE686, 0x8ADE,0xE687, 0x8ADB,0xE688, 0x8B0C,0xE689, 0x8B07,0xE68A, 0x8B1A,0xE68B, 0x8AE1,0xE68C, 0x8B16,0xE68D, 0x8B10,0xE68E, 0x8B17,0xE68F, 0x8B20,0xE690, 0x8B33,0xE691, 0x97AB,0xE692, 0x8B26,0xE693, 0x8B2B,0xE694, 0x8B3E,0xE695, 0x8B28,0xE696, 0x8B41,0xE697, 0x8B4C,0xE698, 0x8B4F,0xE699, 0x8B4E,0xE69A, 0x8B49,0xE69B, 0x8B56,0xE69C, 0x8B5B,0xE69D, 0x8B5A,0xE69E, 0x8B6B,0xE69F, 0x8B5F,0xE6A0, 0x8B6C,0xE6A1, 0x8B6F,0xE6A2, 0x8B74,0xE6A3, 0x8B7D,0xE6A4, 0x8B80,0xE6A5, 0x8B8C,0xE6A6, 0x8B8E,0xE6A7, 0x8B92,0xE6A8, 0x8B93,0xE6A9, 0x8B96,0xE6AA, 0x8B99,0xE6AB, 0x8B9A,0xE6AC, 0x8C3A,0xE6AD, 0x8C41,0xE6AE, 0x8C3F,0xE6AF, 0x8C48,0xE6B0, 0x8C4C,0xE6B1, 0x8C4E,0xE6B2, 0x8C50,0xE6B3, 0x8C55,0xE6B4, 0x8C62,0xE6B5, 0x8C6C,0xE6B6, 0x8C78,0xE6B7, 0x8C7A,0xE6B8, 0x8C82,0xE6B9, 0x8C89,0xE6BA, 0x8C85,0xE6BB, 0x8C8A,0xE6BC, 0x8C8D,0xE6BD, 0x8C8E,0xE6BE, 0x8C94,0xE6BF, 0x8C7C,0xE6C0, 0x8C98,0xE6C1, 0x621D,0xE6C2, 0x8CAD,0xE6C3, 0x8CAA,0xE6C4, 0x8CBD,0xE6C5, 0x8CB2,0xE6C6, 0x8CB3,0xE6C7, 0x8CAE,0xE6C8, 0x8CB6,0xE6C9, 0x8CC8,0xE6CA, 0x8CC1,0xE6CB, 0x8CE4,0xE6CC, 0x8CE3,0xE6CD, 0x8CDA,0xE6CE, 0x8CFD,0xE6CF, 0x8CFA,0xE6D0, 0x8CFB,0xE6D1, 0x8D04,0xE6D2, 0x8D05,0xE6D3, 0x8D0A,0xE6D4, 0x8D07,0xE6D5, 0x8D0F,0xE6D6, 0x8D0D,0xE6D7, 0x8D10,0xE6D8, 0x9F4E,0xE6D9, 0x8D13,0xE6DA, 0x8CCD,0xE6DB, 0x8D14,0xE6DC, 0x8D16,0xE6DD, 0x8D67,0xE6DE, 0x8D6D,0xE6DF, 0x8D71,0xE6E0, 0x8D73,0xE6E1, 0x8D81,0xE6E2, 0x8D99,0xE6E3, 0x8DC2,0xE6E4, 0x8DBE,0xE6E5, 0x8DBA,0xE6E6, 0x8DCF,0xE6E7, 0x8DDA,0xE6E8, 0x8DD6,0xE6E9, 0x8DCC,0xE6EA, 0x8DDB,0xE6EB, 0x8DCB,0xE6EC, 0x8DEA,0xE6ED, 0x8DEB,0xE6EE, 0x8DDF,0xE6EF, 0x8DE3,0xE6F0, 0x8DFC,0xE6F1, 0x8E08,0xE6F2, 0x8E09,0xE6F3, 0x8DFF,0xE6F4, 0x8E1D,0xE6F5, 0x8E1E,0xE6F6, 0x8E10,0xE6F7, 0x8E1F,0xE6F8, 0x8E42,0xE6F9, 0x8E35,0xE6FA, 0x8E30,0xE6FB, 0x8E34,0xE6FC, 0x8E4A,0xE740, 0x8E47,0xE741, 0x8E49,0xE742, 0x8E4C,0xE743, 0x8E50,0xE744, 0x8E48,0xE745, 0x8E59,0xE746, 0x8E64,0xE747, 0x8E60,0xE748, 0x8E2A,0xE749, 0x8E63,0xE74A, 0x8E55,0xE74B, 0x8E76,0xE74C, 0x8E72,0xE74D, 0x8E7C,0xE74E, 0x8E81,0xE74F, 0x8E87,0xE750, 0x8E85,0xE751, 0x8E84,0xE752, 0x8E8B,0xE753, 0x8E8A,0xE754, 0x8E93,0xE755, 0x8E91,0xE756, 0x8E94,0xE757, 0x8E99,0xE758, 0x8EAA,0xE759, 0x8EA1,0xE75A, 0x8EAC,0xE75B, 0x8EB0,0xE75C, 0x8EC6,0xE75D, 0x8EB1,0xE75E, 0x8EBE,0xE75F, 0x8EC5,0xE760, 0x8EC8,0xE761, 0x8ECB,0xE762, 0x8EDB,0xE763, 0x8EE3,0xE764, 0x8EFC,0xE765, 0x8EFB,0xE766, 0x8EEB,0xE767, 0x8EFE,0xE768, 0x8F0A,0xE769, 0x8F05,0xE76A, 0x8F15,0xE76B, 0x8F12,0xE76C, 0x8F19,0xE76D, 0x8F13,0xE76E, 0x8F1C,0xE76F, 0x8F1F,0xE770, 0x8F1B,0xE771, 0x8F0C,0xE772, 0x8F26,0xE773, 0x8F33,0xE774, 0x8F3B,0xE775, 0x8F39,0xE776, 0x8F45,0xE777, 0x8F42,0xE778, 0x8F3E,0xE779, 0x8F4C,0xE77A, 0x8F49,0xE77B, 0x8F46,0xE77C, 0x8F4E,0xE77D, 0x8F57,0xE77E, 0x8F5C,0xE780, 0x8F62,0xE781, 0x8F63,0xE782, 0x8F64,0xE783, 0x8F9C,0xE784, 0x8F9F,0xE785, 0x8FA3,0xE786, 0x8FAD,0xE787, 0x8FAF,0xE788, 0x8FB7,0xE789, 0x8FDA,0xE78A, 0x8FE5,0xE78B, 0x8FE2,0xE78C, 0x8FEA,0xE78D, 0x8FEF,0xE78E, 0x9087,0xE78F, 0x8FF4,0xE790, 0x9005,0xE791, 0x8FF9,0xE792, 0x8FFA,0xE793, 0x9011,0xE794, 0x9015,0xE795, 0x9021,0xE796, 0x900D,0xE797, 0x901E,0xE798, 0x9016,0xE799, 0x900B,0xE79A, 0x9027,0xE79B, 0x9036,0xE79C, 0x9035,0xE79D, 0x9039,0xE79E, 0x8FF8,0xE79F, 0x904F,0xE7A0, 0x9050,0xE7A1, 0x9051,0xE7A2, 0x9052,0xE7A3, 0x900E,0xE7A4, 0x9049,0xE7A5, 0x903E,0xE7A6, 0x9056,0xE7A7, 0x9058,0xE7A8, 0x905E,0xE7A9, 0x9068,0xE7AA, 0x906F,0xE7AB, 0x9076,0xE7AC, 0x96A8,0xE7AD, 0x9072,0xE7AE, 0x9082,0xE7AF, 0x907D,0xE7B0, 0x9081,0xE7B1, 0x9080,0xE7B2, 0x908A,0xE7B3, 0x9089,0xE7B4, 0x908F,0xE7B5, 0x90A8,0xE7B6, 0x90AF,0xE7B7, 0x90B1,0xE7B8, 0x90B5,0xE7B9, 0x90E2,0xE7BA, 0x90E4,0xE7BB, 0x6248,0xE7BC, 0x90DB,0xE7BD, 0x9102,0xE7BE, 0x9112,0xE7BF, 0x9119,0xE7C0, 0x9132,0xE7C1, 0x9130,0xE7C2, 0x914A,0xE7C3, 0x9156,0xE7C4, 0x9158,0xE7C5, 0x9163,0xE7C6, 0x9165,0xE7C7, 0x9169,0xE7C8, 0x9173,0xE7C9, 0x9172,0xE7CA, 0x918B,0xE7CB, 0x9189,0xE7CC, 0x9182,0xE7CD, 0x91A2,0xE7CE, 0x91AB,0xE7CF, 0x91AF,0xE7D0, 0x91AA,0xE7D1, 0x91B5,0xE7D2, 0x91B4,0xE7D3, 0x91BA,0xE7D4, 0x91C0,0xE7D5, 0x91C1,0xE7D6, 0x91C9,0xE7D7, 0x91CB,0xE7D8, 0x91D0,0xE7D9, 0x91D6,0xE7DA, 0x91DF,0xE7DB, 0x91E1,0xE7DC, 0x91DB,0xE7DD, 0x91FC,0xE7DE, 0x91F5,0xE7DF, 0x91F6,0xE7E0, 0x921E,0xE7E1, 0x91FF,0xE7E2, 0x9214,0xE7E3, 0x922C,0xE7E4, 0x9215,0xE7E5, 0x9211,0xE7E6, 0x925E,0xE7E7, 0x9257,0xE7E8, 0x9245,0xE7E9, 0x9249,0xE7EA, 0x9264,0xE7EB, 0x9248,0xE7EC, 0x9295,0xE7ED, 0x923F,0xE7EE, 0x924B,0xE7EF, 0x9250,0xE7F0, 0x929C,0xE7F1, 0x9296,0xE7F2, 0x9293,0xE7F3, 0x929B,0xE7F4, 0x925A,0xE7F5, 0x92CF,0xE7F6, 0x92B9,0xE7F7, 0x92B7,0xE7F8, 0x92E9,0xE7F9, 0x930F,0xE7FA, 0x92FA,0xE7FB, 0x9344,0xE7FC, 0x932E,0xE840, 0x9319,0xE841, 0x9322,0xE842, 0x931A,0xE843, 0x9323,0xE844, 0x933A,0xE845, 0x9335,0xE846, 0x933B,0xE847, 0x935C,0xE848, 0x9360,0xE849, 0x937C,0xE84A, 0x936E,0xE84B, 0x9356,0xE84C, 0x93B0,0xE84D, 0x93AC,0xE84E, 0x93AD,0xE84F, 0x9394,0xE850, 0x93B9,0xE851, 0x93D6,0xE852, 0x93D7,0xE853, 0x93E8,0xE854, 0x93E5,0xE855, 0x93D8,0xE856, 0x93C3,0xE857, 0x93DD,0xE858, 0x93D0,0xE859, 0x93C8,0xE85A, 0x93E4,0xE85B, 0x941A,0xE85C, 0x9414,0xE85D, 0x9413,0xE85E, 0x9403,0xE85F, 0x9407,0xE860, 0x9410,0xE861, 0x9436,0xE862, 0x942B,0xE863, 0x9435,0xE864, 0x9421,0xE865, 0x943A,0xE866, 0x9441,0xE867, 0x9452,0xE868, 0x9444,0xE869, 0x945B,0xE86A, 0x9460,0xE86B, 0x9462,0xE86C, 0x945E,0xE86D, 0x946A,0xE86E, 0x9229,0xE86F, 0x9470,0xE870, 0x9475,0xE871, 0x9477,0xE872, 0x947D,0xE873, 0x945A,0xE874, 0x947C,0xE875, 0x947E,0xE876, 0x9481,0xE877, 0x947F,0xE878, 0x9582,0xE879, 0x9587,0xE87A, 0x958A,0xE87B, 0x9594,0xE87C, 0x9596,0xE87D, 0x9598,0xE87E, 0x9599,0xE880, 0x95A0,0xE881, 0x95A8,0xE882, 0x95A7,0xE883, 0x95AD,0xE884, 0x95BC,0xE885, 0x95BB,0xE886, 0x95B9,0xE887, 0x95BE,0xE888, 0x95CA,0xE889, 0x6FF6,0xE88A, 0x95C3,0xE88B, 0x95CD,0xE88C, 0x95CC,0xE88D, 0x95D5,0xE88E, 0x95D4,0xE88F, 0x95D6,0xE890, 0x95DC,0xE891, 0x95E1,0xE892, 0x95E5,0xE893, 0x95E2,0xE894, 0x9621,0xE895, 0x9628,0xE896, 0x962E,0xE897, 0x962F,0xE898, 0x9642,0xE899, 0x964C,0xE89A, 0x964F,0xE89B, 0x964B,0xE89C, 0x9677,0xE89D, 0x965C,0xE89E, 0x965E,0xE89F, 0x965D,0xE8A0, 0x965F,0xE8A1, 0x9666,0xE8A2, 0x9672,0xE8A3, 0x966C,0xE8A4, 0x968D,0xE8A5, 0x9698,0xE8A6, 0x9695,0xE8A7, 0x9697,0xE8A8, 0x96AA,0xE8A9, 0x96A7,0xE8AA, 0x96B1,0xE8AB, 0x96B2,0xE8AC, 0x96B0,0xE8AD, 0x96B4,0xE8AE, 0x96B6,0xE8AF, 0x96B8,0xE8B0, 0x96B9,0xE8B1, 0x96CE,0xE8B2, 0x96CB,0xE8B3, 0x96C9,0xE8B4, 0x96CD,0xE8B5, 0x894D,0xE8B6, 0x96DC,0xE8B7, 0x970D,0xE8B8, 0x96D5,0xE8B9, 0x96F9,0xE8BA, 0x9704,0xE8BB, 0x9706,0xE8BC, 0x9708,0xE8BD, 0x9713,0xE8BE, 0x970E,0xE8BF, 0x9711,0xE8C0, 0x970F,0xE8C1, 0x9716,0xE8C2, 0x9719,0xE8C3, 0x9724,0xE8C4, 0x972A,0xE8C5, 0x9730,0xE8C6, 0x9739,0xE8C7, 0x973D,0xE8C8, 0x973E,0xE8C9, 0x9744,0xE8CA, 0x9746,0xE8CB, 0x9748,0xE8CC, 0x9742,0xE8CD, 0x9749,0xE8CE, 0x975C,0xE8CF, 0x9760,0xE8D0, 0x9764,0xE8D1, 0x9766,0xE8D2, 0x9768,0xE8D3, 0x52D2,0xE8D4, 0x976B,0xE8D5, 0x9771,0xE8D6, 0x9779,0xE8D7, 0x9785,0xE8D8, 0x977C,0xE8D9, 0x9781,0xE8DA, 0x977A,0xE8DB, 0x9786,0xE8DC, 0x978B,0xE8DD, 0x978F,0xE8DE, 0x9790,0xE8DF, 0x979C,0xE8E0, 0x97A8,0xE8E1, 0x97A6,0xE8E2, 0x97A3,0xE8E3, 0x97B3,0xE8E4, 0x97B4,0xE8E5, 0x97C3,0xE8E6, 0x97C6,0xE8E7, 0x97C8,0xE8E8, 0x97CB,0xE8E9, 0x97DC,0xE8EA, 0x97ED,0xE8EB, 0x9F4F,0xE8EC, 0x97F2,0xE8ED, 0x7ADF,0xE8EE, 0x97F6,0xE8EF, 0x97F5,0xE8F0, 0x980F,0xE8F1, 0x980C,0xE8F2, 0x9838,0xE8F3, 0x9824,0xE8F4, 0x9821,0xE8F5, 0x9837,0xE8F6, 0x983D,0xE8F7, 0x9846,0xE8F8, 0x984F,0xE8F9, 0x984B,0xE8FA, 0x986B,0xE8FB, 0x986F,0xE8FC, 0x9870,0xE940, 0x9871,0xE941, 0x9874,0xE942, 0x9873,0xE943, 0x98AA,0xE944, 0x98AF,0xE945, 0x98B1,0xE946, 0x98B6,0xE947, 0x98C4,0xE948, 0x98C3,0xE949, 0x98C6,0xE94A, 0x98E9,0xE94B, 0x98EB,0xE94C, 0x9903,0xE94D, 0x9909,0xE94E, 0x9912,0xE94F, 0x9914,0xE950, 0x9918,0xE951, 0x9921,0xE952, 0x991D,0xE953, 0x991E,0xE954, 0x9924,0xE955, 0x9920,0xE956, 0x992C,0xE957, 0x992E,0xE958, 0x993D,0xE959, 0x993E,0xE95A, 0x9942,0xE95B, 0x9949,0xE95C, 0x9945,0xE95D, 0x9950,0xE95E, 0x994B,0xE95F, 0x9951,0xE960, 0x9952,0xE961, 0x994C,0xE962, 0x9955,0xE963, 0x9997,0xE964, 0x9998,0xE965, 0x99A5,0xE966, 0x99AD,0xE967, 0x99AE,0xE968, 0x99BC,0xE969, 0x99DF,0xE96A, 0x99DB,0xE96B, 0x99DD,0xE96C, 0x99D8,0xE96D, 0x99D1,0xE96E, 0x99ED,0xE96F, 0x99EE,0xE970, 0x99F1,0xE971, 0x99F2,0xE972, 0x99FB,0xE973, 0x99F8,0xE974, 0x9A01,0xE975, 0x9A0F,0xE976, 0x9A05,0xE977, 0x99E2,0xE978, 0x9A19,0xE979, 0x9A2B,0xE97A, 0x9A37,0xE97B, 0x9A45,0xE97C, 0x9A42,0xE97D, 0x9A40,0xE97E, 0x9A43,0xE980, 0x9A3E,0xE981, 0x9A55,0xE982, 0x9A4D,0xE983, 0x9A5B,0xE984, 0x9A57,0xE985, 0x9A5F,0xE986, 0x9A62,0xE987, 0x9A65,0xE988, 0x9A64,0xE989, 0x9A69,0xE98A, 0x9A6B,0xE98B, 0x9A6A,0xE98C, 0x9AAD,0xE98D, 0x9AB0,0xE98E, 0x9ABC,0xE98F, 0x9AC0,0xE990, 0x9ACF,0xE991, 0x9AD1,0xE992, 0x9AD3,0xE993, 0x9AD4,0xE994, 0x9ADE,0xE995, 0x9ADF,0xE996, 0x9AE2,0xE997, 0x9AE3,0xE998, 0x9AE6,0xE999, 0x9AEF,0xE99A, 0x9AEB,0xE99B, 0x9AEE,0xE99C, 0x9AF4,0xE99D, 0x9AF1,0xE99E, 0x9AF7,0xE99F, 0x9AFB,0xE9A0, 0x9B06,0xE9A1, 0x9B18,0xE9A2, 0x9B1A,0xE9A3, 0x9B1F,0xE9A4, 0x9B22,0xE9A5, 0x9B23,0xE9A6, 0x9B25,0xE9A7, 0x9B27,0xE9A8, 0x9B28,0xE9A9, 0x9B29,0xE9AA, 0x9B2A,0xE9AB, 0x9B2E,0xE9AC, 0x9B2F,0xE9AD, 0x9B32,0xE9AE, 0x9B44,0xE9AF, 0x9B43,0xE9B0, 0x9B4F,0xE9B1, 0x9B4D,0xE9B2, 0x9B4E,0xE9B3, 0x9B51,0xE9B4, 0x9B58,0xE9B5, 0x9B74,0xE9B6, 0x9B93,0xE9B7, 0x9B83,0xE9B8, 0x9B91,0xE9B9, 0x9B96,0xE9BA, 0x9B97,0xE9BB, 0x9B9F,0xE9BC, 0x9BA0,0xE9BD, 0x9BA8,0xE9BE, 0x9BB4,0xE9BF, 0x9BC0,0xE9C0, 0x9BCA,0xE9C1, 0x9BB9,0xE9C2, 0x9BC6,0xE9C3, 0x9BCF,0xE9C4, 0x9BD1,0xE9C5, 0x9BD2,0xE9C6, 0x9BE3,0xE9C7, 0x9BE2,0xE9C8, 0x9BE4,0xE9C9, 0x9BD4,0xE9CA, 0x9BE1,0xE9CB, 0x9C3A,0xE9CC, 0x9BF2,0xE9CD, 0x9BF1,0xE9CE, 0x9BF0,0xE9CF, 0x9C15,0xE9D0, 0x9C14,0xE9D1, 0x9C09,0xE9D2, 0x9C13,0xE9D3, 0x9C0C,0xE9D4, 0x9C06,0xE9D5, 0x9C08,0xE9D6, 0x9C12,0xE9D7, 0x9C0A,0xE9D8, 0x9C04,0xE9D9, 0x9C2E,0xE9DA, 0x9C1B,0xE9DB, 0x9C25,0xE9DC, 0x9C24,0xE9DD, 0x9C21,0xE9DE, 0x9C30,0xE9DF, 0x9C47,0xE9E0, 0x9C32,0xE9E1, 0x9C46,0xE9E2, 0x9C3E,0xE9E3, 0x9C5A,0xE9E4, 0x9C60,0xE9E5, 0x9C67,0xE9E6, 0x9C76,0xE9E7, 0x9C78,0xE9E8, 0x9CE7,0xE9E9, 0x9CEC,0xE9EA, 0x9CF0,0xE9EB, 0x9D09,0xE9EC, 0x9D08,0xE9ED, 0x9CEB,0xE9EE, 0x9D03,0xE9EF, 0x9D06,0xE9F0, 0x9D2A,0xE9F1, 0x9D26,0xE9F2, 0x9DAF,0xE9F3, 0x9D23,0xE9F4, 0x9D1F,0xE9F5, 0x9D44,0xE9F6, 0x9D15,0xE9F7, 0x9D12,0xE9F8, 0x9D41,0xE9F9, 0x9D3F,0xE9FA, 0x9D3E,0xE9FB, 0x9D46,0xE9FC, 0x9D48,0xEA40, 0x9D5D,0xEA41, 0x9D5E,0xEA42, 0x9D64,0xEA43, 0x9D51,0xEA44, 0x9D50,0xEA45, 0x9D59,0xEA46, 0x9D72,0xEA47, 0x9D89,0xEA48, 0x9D87,0xEA49, 0x9DAB,0xEA4A, 0x9D6F,0xEA4B, 0x9D7A,0xEA4C, 0x9D9A,0xEA4D, 0x9DA4,0xEA4E, 0x9DA9,0xEA4F, 0x9DB2,0xEA50, 0x9DC4,0xEA51, 0x9DC1,0xEA52, 0x9DBB,0xEA53, 0x9DB8,0xEA54, 0x9DBA,0xEA55, 0x9DC6,0xEA56, 0x9DCF,0xEA57, 0x9DC2,0xEA58, 0x9DD9,0xEA59, 0x9DD3,0xEA5A, 0x9DF8,0xEA5B, 0x9DE6,0xEA5C, 0x9DED,0xEA5D, 0x9DEF,0xEA5E, 0x9DFD,0xEA5F, 0x9E1A,0xEA60, 0x9E1B,0xEA61, 0x9E1E,0xEA62, 0x9E75,0xEA63, 0x9E79,0xEA64, 0x9E7D,0xEA65, 0x9E81,0xEA66, 0x9E88,0xEA67, 0x9E8B,0xEA68, 0x9E8C,0xEA69, 0x9E92,0xEA6A, 0x9E95,0xEA6B, 0x9E91,0xEA6C, 0x9E9D,0xEA6D, 0x9EA5,0xEA6E, 0x9EA9,0xEA6F, 0x9EB8,0xEA70, 0x9EAA,0xEA71, 0x9EAD,0xEA72, 0x9761,0xEA73, 0x9ECC,0xEA74, 0x9ECE,0xEA75, 0x9ECF,0xEA76, 0x9ED0,0xEA77, 0x9ED4,0xEA78, 0x9EDC,0xEA79, 0x9EDE,0xEA7A, 0x9EDD,0xEA7B, 0x9EE0,0xEA7C, 0x9EE5,0xEA7D, 0x9EE8,0xEA7E, 0x9EEF,0xEA80, 0x9EF4,0xEA81, 0x9EF6,0xEA82, 0x9EF7,0xEA83, 0x9EF9,0xEA84, 0x9EFB,0xEA85, 0x9EFC,0xEA86, 0x9EFD,0xEA87, 0x9F07,0xEA88, 0x9F08,0xEA89, 0x76B7,0xEA8A, 0x9F15,0xEA8B, 0x9F21,0xEA8C, 0x9F2C,0xEA8D, 0x9F3E,0xEA8E, 0x9F4A,0xEA8F, 0x9F52,0xEA90, 0x9F54,0xEA91, 0x9F63,0xEA92, 0x9F5F,0xEA93, 0x9F60,0xEA94, 0x9F61,0xEA95, 0x9F66,0xEA96, 0x9F67,0xEA97, 0x9F6C,0xEA98, 0x9F6A,0xEA99, 0x9F77,0xEA9A, 0x9F72,0xEA9B, 0x9F76,0xEA9C, 0x9F95,0xEA9D, 0x9F9C,0xEA9E, 0x9FA0,0xEA9F, 0x582F,0xEAA0, 0x69C7,0xEAA1, 0x9059,0xEAA2, 0x7464,0xEAA3, 0x51DC,0xEAA4, 0x7199,0xED40, 0x7E8A,0xED41, 0x891C,0xED42, 0x9348,0xED43, 0x9288,0xED44, 0x84DC,0xED45, 0x4FC9,0xED46, 0x70BB,0xED47, 0x6631,0xED48, 0x68C8,0xED49, 0x92F9,0xED4A, 0x66FB,0xED4B, 0x5F45,0xED4C, 0x4E28,0xED4D, 0x4EE1,0xED4E, 0x4EFC,0xED4F, 0x4F00,0xED50, 0x4F03,0xED51, 0x4F39,0xED52, 0x4F56,0xED53, 0x4F92,0xED54, 0x4F8A,0xED55, 0x4F9A,0xED56, 0x4F94,0xED57, 0x4FCD,0xED58, 0x5040,0xED59, 0x5022,0xED5A, 0x4FFF,0xED5B, 0x501E,0xED5C, 0x5046,0xED5D, 0x5070,0xED5E, 0x5042,0xED5F, 0x5094,0xED60, 0x50F4,0xED61, 0x50D8,0xED62, 0x514A,0xED63, 0x5164,0xED64, 0x519D,0xED65, 0x51BE,0xED66, 0x51EC,0xED67, 0x5215,0xED68, 0x529C,0xED69, 0x52A6,0xED6A, 0x52C0,0xED6B, 0x52DB,0xED6C, 0x5300,0xED6D, 0x5307,0xED6E, 0x5324,0xED6F, 0x5372,0xED70, 0x5393,0xED71, 0x53B2,0xED72, 0x53DD,0xED73, 0xFA0E,0xED74, 0x549C,0xED75, 0x548A,0xED76, 0x54A9,0xED77, 0x54FF,0xED78, 0x5586,0xED79, 0x5759,0xED7A, 0x5765,0xED7B, 0x57AC,0xED7C, 0x57C8,0xED7D, 0x57C7,0xED7E, 0xFA0F,0xED80, 0xFA10,0xED81, 0x589E,0xED82, 0x58B2,0xED83, 0x590B,0xED84, 0x5953,0xED85, 0x595B,0xED86, 0x595D,0xED87, 0x5963,0xED88, 0x59A4,0xED89, 0x59BA,0xED8A, 0x5B56,0xED8B, 0x5BC0,0xED8C, 0x752F,0xED8D, 0x5BD8,0xED8E, 0x5BEC,0xED8F, 0x5C1E,0xED90, 0x5CA6,0xED91, 0x5CBA,0xED92, 0x5CF5,0xED93, 0x5D27,0xED94, 0x5D53,0xED95, 0xFA11,0xED96, 0x5D42,0xED97, 0x5D6D,0xED98, 0x5DB8,0xED99, 0x5DB9,0xED9A, 0x5DD0,0xED9B, 0x5F21,0xED9C, 0x5F34,0xED9D, 0x5F67,0xED9E, 0x5FB7,0xED9F, 0x5FDE,0xEDA0, 0x605D,0xEDA1, 0x6085,0xEDA2, 0x608A,0xEDA3, 0x60DE,0xEDA4, 0x60D5,0xEDA5, 0x6120,0xEDA6, 0x60F2,0xEDA7, 0x6111,0xEDA8, 0x6137,0xEDA9, 0x6130,0xEDAA, 0x6198,0xEDAB, 0x6213,0xEDAC, 0x62A6,0xEDAD, 0x63F5,0xEDAE, 0x6460,0xEDAF, 0x649D,0xEDB0, 0x64CE,0xEDB1, 0x654E,0xEDB2, 0x6600,0xEDB3, 0x6615,0xEDB4, 0x663B,0xEDB5, 0x6609,0xEDB6, 0x662E,0xEDB7, 0x661E,0xEDB8, 0x6624,0xEDB9, 0x6665,0xEDBA, 0x6657,0xEDBB, 0x6659,0xEDBC, 0xFA12,0xEDBD, 0x6673,0xEDBE, 0x6699,0xEDBF, 0x66A0,0xEDC0, 0x66B2,0xEDC1, 0x66BF,0xEDC2, 0x66FA,0xEDC3, 0x670E,0xEDC4, 0xF929,0xEDC5, 0x6766,0xEDC6, 0x67BB,0xEDC7, 0x6852,0xEDC8, 0x67C0,0xEDC9, 0x6801,0xEDCA, 0x6844,0xEDCB, 0x68CF,0xEDCC, 0xFA13,0xEDCD, 0x6968,0xEDCE, 0xFA14,0xEDCF, 0x6998,0xEDD0, 0x69E2,0xEDD1, 0x6A30,0xEDD2, 0x6A6B,0xEDD3, 0x6A46,0xEDD4, 0x6A73,0xEDD5, 0x6A7E,0xEDD6, 0x6AE2,0xEDD7, 0x6AE4,0xEDD8, 0x6BD6,0xEDD9, 0x6C3F,0xEDDA, 0x6C5C,0xEDDB, 0x6C86,0xEDDC, 0x6C6F,0xEDDD, 0x6CDA,0xEDDE, 0x6D04,0xEDDF, 0x6D87,0xEDE0, 0x6D6F,0xEDE1, 0x6D96,0xEDE2, 0x6DAC,0xEDE3, 0x6DCF,0xEDE4, 0x6DF8,0xEDE5, 0x6DF2,0xEDE6, 0x6DFC,0xEDE7, 0x6E39,0xEDE8, 0x6E5C,0xEDE9, 0x6E27,0xEDEA, 0x6E3C,0xEDEB, 0x6EBF,0xEDEC, 0x6F88,0xEDED, 0x6FB5,0xEDEE, 0x6FF5,0xEDEF, 0x7005,0xEDF0, 0x7007,0xEDF1, 0x7028,0xEDF2, 0x7085,0xEDF3, 0x70AB,0xEDF4, 0x710F,0xEDF5, 0x7104,0xEDF6, 0x715C,0xEDF7, 0x7146,0xEDF8, 0x7147,0xEDF9, 0xFA15,0xEDFA, 0x71C1,0xEDFB, 0x71FE,0xEDFC, 0x72B1,0xEE40, 0x72BE,0xEE41, 0x7324,0xEE42, 0xFA16,0xEE43, 0x7377,0xEE44, 0x73BD,0xEE45, 0x73C9,0xEE46, 0x73D6,0xEE47, 0x73E3,0xEE48, 0x73D2,0xEE49, 0x7407,0xEE4A, 0x73F5,0xEE4B, 0x7426,0xEE4C, 0x742A,0xEE4D, 0x7429,0xEE4E, 0x742E,0xEE4F, 0x7462,0xEE50, 0x7489,0xEE51, 0x749F,0xEE52, 0x7501,0xEE53, 0x756F,0xEE54, 0x7682,0xEE55, 0x769C,0xEE56, 0x769E,0xEE57, 0x769B,0xEE58, 0x76A6,0xEE59, 0xFA17,0xEE5A, 0x7746,0xEE5B, 0x52AF,0xEE5C, 0x7821,0xEE5D, 0x784E,0xEE5E, 0x7864,0xEE5F, 0x787A,0xEE60, 0x7930,0xEE61, 0xFA18,0xEE62, 0xFA19,0xEE63, 0xFA1A,0xEE64, 0x7994,0xEE65, 0xFA1B,0xEE66, 0x799B,0xEE67, 0x7AD1,0xEE68, 0x7AE7,0xEE69, 0xFA1C,0xEE6A, 0x7AEB,0xEE6B, 0x7B9E,0xEE6C, 0xFA1D,0xEE6D, 0x7D48,0xEE6E, 0x7D5C,0xEE6F, 0x7DB7,0xEE70, 0x7DA0,0xEE71, 0x7DD6,0xEE72, 0x7E52,0xEE73, 0x7F47,0xEE74, 0x7FA1,0xEE75, 0xFA1E,0xEE76, 0x8301,0xEE77, 0x8362,0xEE78, 0x837F,0xEE79, 0x83C7,0xEE7A, 0x83F6,0xEE7B, 0x8448,0xEE7C, 0x84B4,0xEE7D, 0x8553,0xEE7E, 0x8559,0xEE80, 0x856B,0xEE81, 0xFA1F,0xEE82, 0x85B0,0xEE83, 0xFA20,0xEE84, 0xFA21,0xEE85, 0x8807,0xEE86, 0x88F5,0xEE87, 0x8A12,0xEE88, 0x8A37,0xEE89, 0x8A79,0xEE8A, 0x8AA7,0xEE8B, 0x8ABE,0xEE8C, 0x8ADF,0xEE8D, 0xFA22,0xEE8E, 0x8AF6,0xEE8F, 0x8B53,0xEE90, 0x8B7F,0xEE91, 0x8CF0,0xEE92, 0x8CF4,0xEE93, 0x8D12,0xEE94, 0x8D76,0xEE95, 0xFA23,0xEE96, 0x8ECF,0xEE97, 0xFA24,0xEE98, 0xFA25,0xEE99, 0x9067,0xEE9A, 0x90DE,0xEE9B, 0xFA26,0xEE9C, 0x9115,0xEE9D, 0x9127,0xEE9E, 0x91DA,0xEE9F, 0x91D7,0xEEA0, 0x91DE,0xEEA1, 0x91ED,0xEEA2, 0x91EE,0xEEA3, 0x91E4,0xEEA4, 0x91E5,0xEEA5, 0x9206,0xEEA6, 0x9210,0xEEA7, 0x920A,0xEEA8, 0x923A,0xEEA9, 0x9240,0xEEAA, 0x923C,0xEEAB, 0x924E,0xEEAC, 0x9259,0xEEAD, 0x9251,0xEEAE, 0x9239,0xEEAF, 0x9267,0xEEB0, 0x92A7,0xEEB1, 0x9277,0xEEB2, 0x9278,0xEEB3, 0x92E7,0xEEB4, 0x92D7,0xEEB5, 0x92D9,0xEEB6, 0x92D0,0xEEB7, 0xFA27,0xEEB8, 0x92D5,0xEEB9, 0x92E0,0xEEBA, 0x92D3,0xEEBB, 0x9325,0xEEBC, 0x9321,0xEEBD, 0x92FB,0xEEBE, 0xFA28,0xEEBF, 0x931E,0xEEC0, 0x92FF,0xEEC1, 0x931D,0xEEC2, 0x9302,0xEEC3, 0x9370,0xEEC4, 0x9357,0xEEC5, 0x93A4,0xEEC6, 0x93C6,0xEEC7, 0x93DE,0xEEC8, 0x93F8,0xEEC9, 0x9431,0xEECA, 0x9445,0xEECB, 0x9448,0xEECC, 0x9592,0xEECD, 0xF9DC,0xEECE, 0xFA29,0xEECF, 0x969D,0xEED0, 0x96AF,0xEED1, 0x9733,0xEED2, 0x973B,0xEED3, 0x9743,0xEED4, 0x974D,0xEED5, 0x974F,0xEED6, 0x9751,0xEED7, 0x9755,0xEED8, 0x9857,0xEED9, 0x9865,0xEEDA, 0xFA2A,0xEEDB, 0xFA2B,0xEEDC, 0x9927,0xEEDD, 0xFA2C,0xEEDE, 0x999E,0xEEDF, 0x9A4E,0xEEE0, 0x9AD9,0xEEE1, 0x9ADC,0xEEE2, 0x9B75,0xEEE3, 0x9B72,0xEEE4, 0x9B8F,0xEEE5, 0x9BB1,0xEEE6, 0x9BBB,0xEEE7, 0x9C00,0xEEE8, 0x9D70,0xEEE9, 0x9D6B,0xEEEA, 0xFA2D,0xEEEB, 0x9E19,0xEEEC, 0x9ED1,0xEEEF, 0x2170,0xEEF0, 0x2171,0xEEF1, 0x2172,0xEEF2, 0x2173,0xEEF3, 0x2174,0xEEF4, 0x2175,0xEEF5, 0x2176,0xEEF6, 0x2177,0xEEF7, 0x2178,0xEEF8, 0x2179,0xEEF9, 0xFFE2,0xEEFA, 0xFFE4,0xEEFB, 0xFF07,0xEEFC, 0xFF02,0xFA40, 0x2170,0xFA41, 0x2171,0xFA42, 0x2172,0xFA43, 0x2173,0xFA44, 0x2174,0xFA45, 0x2175,0xFA46, 0x2176,0xFA47, 0x2177,0xFA48, 0x2178,0xFA49, 0x2179,0xFA4A, 0x2160,0xFA4B, 0x2161,0xFA4C, 0x2162,0xFA4D, 0x2163,0xFA4E, 0x2164,0xFA4F, 0x2165,0xFA50, 0x2166,0xFA51, 0x2167,0xFA52, 0x2168,0xFA53, 0x2169,0xFA54, 0xFFE2,0xFA55, 0xFFE4,0xFA56, 0xFF07,0xFA57, 0xFF02,0xFA58, 0x3231,0xFA59, 0x2116,0xFA5A, 0x2121,0xFA5B, 0x2235,0xFA5C, 0x7E8A,0xFA5D, 0x891C,0xFA5E, 0x9348,0xFA5F, 0x9288,0xFA60, 0x84DC,0xFA61, 0x4FC9,0xFA62, 0x70BB,0xFA63, 0x6631,0xFA64, 0x68C8,0xFA65, 0x92F9,0xFA66, 0x66FB,0xFA67, 0x5F45,0xFA68, 0x4E28,0xFA69, 0x4EE1,0xFA6A, 0x4EFC,0xFA6B, 0x4F00,0xFA6C, 0x4F03,0xFA6D, 0x4F39,0xFA6E, 0x4F56,0xFA6F, 0x4F92,0xFA70, 0x4F8A,0xFA71, 0x4F9A,0xFA72, 0x4F94,0xFA73, 0x4FCD,0xFA74, 0x5040,0xFA75, 0x5022,0xFA76, 0x4FFF,0xFA77, 0x501E,0xFA78, 0x5046,0xFA79, 0x5070,0xFA7A, 0x5042,0xFA7B, 0x5094,0xFA7C, 0x50F4,0xFA7D, 0x50D8,0xFA7E, 0x514A,0xFA80, 0x5164,0xFA81, 0x519D,0xFA82, 0x51BE,0xFA83, 0x51EC,0xFA84, 0x5215,0xFA85, 0x529C,0xFA86, 0x52A6,0xFA87, 0x52C0,0xFA88, 0x52DB,0xFA89, 0x5300,0xFA8A, 0x5307,0xFA8B, 0x5324,0xFA8C, 0x5372,0xFA8D, 0x5393,0xFA8E, 0x53B2,0xFA8F, 0x53DD,0xFA90, 0xFA0E,0xFA91, 0x549C,0xFA92, 0x548A,0xFA93, 0x54A9,0xFA94, 0x54FF,0xFA95, 0x5586,0xFA96, 0x5759,0xFA97, 0x5765,0xFA98, 0x57AC,0xFA99, 0x57C8,0xFA9A, 0x57C7,0xFA9B, 0xFA0F,0xFA9C, 0xFA10,0xFA9D, 0x589E,0xFA9E, 0x58B2,0xFA9F, 0x590B,0xFAA0, 0x5953,0xFAA1, 0x595B,0xFAA2, 0x595D,0xFAA3, 0x5963,0xFAA4, 0x59A4,0xFAA5, 0x59BA,0xFAA6, 0x5B56,0xFAA7, 0x5BC0,0xFAA8, 0x752F,0xFAA9, 0x5BD8,0xFAAA, 0x5BEC,0xFAAB, 0x5C1E,0xFAAC, 0x5CA6,0xFAAD, 0x5CBA,0xFAAE, 0x5CF5,0xFAAF, 0x5D27,0xFAB0, 0x5D53,0xFAB1, 0xFA11,0xFAB2, 0x5D42,0xFAB3, 0x5D6D,0xFAB4, 0x5DB8,0xFAB5, 0x5DB9,0xFAB6, 0x5DD0,0xFAB7, 0x5F21,0xFAB8, 0x5F34,0xFAB9, 0x5F67,0xFABA, 0x5FB7,0xFABB, 0x5FDE,0xFABC, 0x605D,0xFABD, 0x6085,0xFABE, 0x608A,0xFABF, 0x60DE,0xFAC0, 0x60D5,0xFAC1, 0x6120,0xFAC2, 0x60F2,0xFAC3, 0x6111,0xFAC4, 0x6137,0xFAC5, 0x6130,0xFAC6, 0x6198,0xFAC7, 0x6213,0xFAC8, 0x62A6,0xFAC9, 0x63F5,0xFACA, 0x6460,0xFACB, 0x649D,0xFACC, 0x64CE,0xFACD, 0x654E,0xFACE, 0x6600,0xFACF, 0x6615,0xFAD0, 0x663B,0xFAD1, 0x6609,0xFAD2, 0x662E,0xFAD3, 0x661E,0xFAD4, 0x6624,0xFAD5, 0x6665,0xFAD6, 0x6657,0xFAD7, 0x6659,0xFAD8, 0xFA12,0xFAD9, 0x6673,0xFADA, 0x6699,0xFADB, 0x66A0,0xFADC, 0x66B2,0xFADD, 0x66BF,0xFADE, 0x66FA,0xFADF, 0x670E,0xFAE0, 0xF929,0xFAE1, 0x6766,0xFAE2, 0x67BB,0xFAE3, 0x6852,0xFAE4, 0x67C0,0xFAE5, 0x6801,0xFAE6, 0x6844,0xFAE7, 0x68CF,0xFAE8, 0xFA13,0xFAE9, 0x6968,0xFAEA, 0xFA14,0xFAEB, 0x6998,0xFAEC, 0x69E2,0xFAED, 0x6A30,0xFAEE, 0x6A6B,0xFAEF, 0x6A46,0xFAF0, 0x6A73,0xFAF1, 0x6A7E,0xFAF2, 0x6AE2,0xFAF3, 0x6AE4,0xFAF4, 0x6BD6,0xFAF5, 0x6C3F,0xFAF6, 0x6C5C,0xFAF7, 0x6C86,0xFAF8, 0x6C6F,0xFAF9, 0x6CDA,0xFAFA, 0x6D04,0xFAFB, 0x6D87,0xFAFC, 0x6D6F,0xFB40, 0x6D96,0xFB41, 0x6DAC,0xFB42, 0x6DCF,0xFB43, 0x6DF8,0xFB44, 0x6DF2,0xFB45, 0x6DFC,0xFB46, 0x6E39,0xFB47, 0x6E5C,0xFB48, 0x6E27,0xFB49, 0x6E3C,0xFB4A, 0x6EBF,0xFB4B, 0x6F88,0xFB4C, 0x6FB5,0xFB4D, 0x6FF5,0xFB4E, 0x7005,0xFB4F, 0x7007,0xFB50, 0x7028,0xFB51, 0x7085,0xFB52, 0x70AB,0xFB53, 0x710F,0xFB54, 0x7104,0xFB55, 0x715C,0xFB56, 0x7146,0xFB57, 0x7147,0xFB58, 0xFA15,0xFB59, 0x71C1,0xFB5A, 0x71FE,0xFB5B, 0x72B1,0xFB5C, 0x72BE,0xFB5D, 0x7324,0xFB5E, 0xFA16,0xFB5F, 0x7377,0xFB60, 0x73BD,0xFB61, 0x73C9,0xFB62, 0x73D6,0xFB63, 0x73E3,0xFB64, 0x73D2,0xFB65, 0x7407,0xFB66, 0x73F5,0xFB67, 0x7426,0xFB68, 0x742A,0xFB69, 0x7429,0xFB6A, 0x742E,0xFB6B, 0x7462,0xFB6C, 0x7489,0xFB6D, 0x749F,0xFB6E, 0x7501,0xFB6F, 0x756F,0xFB70, 0x7682,0xFB71, 0x769C,0xFB72, 0x769E,0xFB73, 0x769B,0xFB74, 0x76A6,0xFB75, 0xFA17,0xFB76, 0x7746,0xFB77, 0x52AF,0xFB78, 0x7821,0xFB79, 0x784E,0xFB7A, 0x7864,0xFB7B, 0x787A,0xFB7C, 0x7930,0xFB7D, 0xFA18,0xFB7E, 0xFA19,0xFB80, 0xFA1A,0xFB81, 0x7994,0xFB82, 0xFA1B,0xFB83, 0x799B,0xFB84, 0x7AD1,0xFB85, 0x7AE7,0xFB86, 0xFA1C,0xFB87, 0x7AEB,0xFB88, 0x7B9E,0xFB89, 0xFA1D,0xFB8A, 0x7D48,0xFB8B, 0x7D5C,0xFB8C, 0x7DB7,0xFB8D, 0x7DA0,0xFB8E, 0x7DD6,0xFB8F, 0x7E52,0xFB90, 0x7F47,0xFB91, 0x7FA1,0xFB92, 0xFA1E,0xFB93, 0x8301,0xFB94, 0x8362,0xFB95, 0x837F,0xFB96, 0x83C7,0xFB97, 0x83F6,0xFB98, 0x8448,0xFB99, 0x84B4,0xFB9A, 0x8553,0xFB9B, 0x8559,0xFB9C, 0x856B,0xFB9D, 0xFA1F,0xFB9E, 0x85B0,0xFB9F, 0xFA20,0xFBA0, 0xFA21,0xFBA1, 0x8807,0xFBA2, 0x88F5,0xFBA3, 0x8A12,0xFBA4, 0x8A37,0xFBA5, 0x8A79,0xFBA6, 0x8AA7,0xFBA7, 0x8ABE,0xFBA8, 0x8ADF,0xFBA9, 0xFA22,0xFBAA, 0x8AF6,0xFBAB, 0x8B53,0xFBAC, 0x8B7F,0xFBAD, 0x8CF0,0xFBAE, 0x8CF4,0xFBAF, 0x8D12,0xFBB0, 0x8D76,0xFBB1, 0xFA23,0xFBB2, 0x8ECF,0xFBB3, 0xFA24,0xFBB4, 0xFA25,0xFBB5, 0x9067,0xFBB6, 0x90DE,0xFBB7, 0xFA26,0xFBB8, 0x9115,0xFBB9, 0x9127,0xFBBA, 0x91DA,0xFBBB, 0x91D7,0xFBBC, 0x91DE,0xFBBD, 0x91ED,0xFBBE, 0x91EE,0xFBBF, 0x91E4,0xFBC0, 0x91E5,0xFBC1, 0x9206,0xFBC2, 0x9210,0xFBC3, 0x920A,0xFBC4, 0x923A,0xFBC5, 0x9240,0xFBC6, 0x923C,0xFBC7, 0x924E,0xFBC8, 0x9259,0xFBC9, 0x9251,0xFBCA, 0x9239,0xFBCB, 0x9267,0xFBCC, 0x92A7,0xFBCD, 0x9277,0xFBCE, 0x9278,0xFBCF, 0x92E7,0xFBD0, 0x92D7,0xFBD1, 0x92D9,0xFBD2, 0x92D0,0xFBD3, 0xFA27,0xFBD4, 0x92D5,0xFBD5, 0x92E0,0xFBD6, 0x92D3,0xFBD7, 0x9325,0xFBD8, 0x9321,0xFBD9, 0x92FB,0xFBDA, 0xFA28,0xFBDB, 0x931E,0xFBDC, 0x92FF,0xFBDD, 0x931D,0xFBDE, 0x9302,0xFBDF, 0x9370,0xFBE0, 0x9357,0xFBE1, 0x93A4,0xFBE2, 0x93C6,0xFBE3, 0x93DE,0xFBE4, 0x93F8,0xFBE5, 0x9431,0xFBE6, 0x9445,0xFBE7, 0x9448,0xFBE8, 0x9592,0xFBE9, 0xF9DC,0xFBEA, 0xFA29,0xFBEB, 0x969D,0xFBEC, 0x96AF,0xFBED, 0x9733,0xFBEE, 0x973B,0xFBEF, 0x9743,0xFBF0, 0x974D,0xFBF1, 0x974F,0xFBF2, 0x9751,0xFBF3, 0x9755,0xFBF4, 0x9857,0xFBF5, 0x9865,0xFBF6, 0xFA2A,0xFBF7, 0xFA2B,0xFBF8, 0x9927,0xFBF9, 0xFA2C,0xFBFA, 0x999E,0xFBFB, 0x9A4E,0xFBFC, 0x9AD9,0xFC40, 0x9ADC,0xFC41, 0x9B75,0xFC42, 0x9B72,0xFC43, 0x9B8F,0xFC44, 0x9BB1,0xFC45, 0x9BBB,0xFC46, 0x9C00,0xFC47, 0x9D70,0xFC48, 0x9D6B,0xFC49, 0xFA2D,0xFC4A, 0x9E19,0xFC4B, 0x9ED1,]\nvar decoding_table = [],\n encoding_table = []\nfor(var i = 0, len = _table.length; i < len; i += 2){\nvar value = _table[i + 1]\nif(value !== null){\n encoding_table[value] = _table[i]\n}\ndecoding_table[_table[i]] = _table[i + 1]\n}\n$module = {encoding_table, decoding_table}\n"], "hashlib": [".js", "var $module=(function($B){\n\nvar _b_ = $B.builtins\n\nvar $mod = {\n\n __getattr__ : function(attr){\n if(attr == 'new'){return hash.$factory}\n return this[attr]\n },\n md5: function(obj){return hash.$factory('md5', obj)},\n sha1: function(obj){return hash.$factory('sha1', obj)},\n sha224: function(obj){return hash.$factory('sha224', obj)},\n sha256: function(obj){return hash.$factory('sha256', obj)},\n sha384: function(obj){return hash.$factory('sha384', obj)},\n sha512: function(obj){return hash.$factory('sha512', obj)},\n\n algorithms_guaranteed: ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512'],\n algorithms_available: ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']\n}\n\n//todo: eventually move this function to a \"utility\" file or use ajax module?\nfunction $get_CryptoJS_lib(alg){\n if($B.VFS !== undefined && $B.VFS.hashlib){\n // use file in brython_stdlib.js\n var lib = $B.VFS[\"crypto_js.rollups.\" + alg]\n if (lib === undefined){\n throw _b_.ImportError.$factory(\"can't import hashlib.\" + alg)\n }\n var res = lib[1]\n try{\n eval(res + \"; $B.CryptoJS = CryptoJS;\")\n return\n }catch(err){\n throw Error(\"JS Eval Error\",\n \"Cannot eval CryptoJS algorithm '\" + alg + \"' : error:\" + err)\n }\n }\n\n var module = {__name__: 'CryptoJS', $is_package: false}\n var res = $B.$download_module(module, $B.brython_path + 'libs/crypto_js/rollups/' + alg + '.js');\n\n try{\n eval(res + \"; $B.CryptoJS = CryptoJS;\")\n }catch(err){\n throw Error(\"JS Eval Error\",\n \"Cannot eval CryptoJS algorithm '\" + alg + \"' : error:\" + err)\n }\n}\n\nfunction bytes2WordArray(obj){\n // Transform a bytes object into an instance of class WordArray\n // defined in CryptoJS\n if(!_b_.isinstance(obj, _b_.bytes)){\n throw _b_.TypeError(\"expected bytes, got \" + $B.class_name(obj))\n }\n\n var words = []\n for(var i = 0; i < obj.source.length; i += 4){\n var word = obj.source.slice(i, i + 4)\n while(word.length < 4){word.push(0)}\n var w = word[3] + (word[2] << 8) + (word[1] << 16) + (word[0] << 24)\n words.push(w)\n }\n return {words: words, sigBytes: obj.source.length}\n}\n\nvar hash = {\n __class__: _b_.type,\n __mro__: [_b_.object],\n __qualname__: 'hash',\n __name__: 'hash'\n}\n\nhash.update = function(self, msg){\n self.hash.update(bytes2WordArray(msg))\n}\n\nhash.copy = function(self){\n return self.hash.clone()\n}\n\nhash.digest = function(self){\n var obj = self.hash.clone().finalize().toString(),\n res = []\n for(var i = 0; i < obj.length; i += 2){\n res.push(parseInt(obj.substr(i, 2), 16))\n }\n return _b_.bytes.$factory(res)\n}\n\nhash.hexdigest = function(self) {\n return self.hash.clone().finalize().toString()\n}\n\nhash.$factory = function(alg, obj) {\n var res = {\n __class__: hash\n }\n\n switch(alg) {\n case 'md5':\n case 'sha1':\n case 'sha224':\n case 'sha256':\n case 'sha384':\n case 'sha512':\n var ALG = alg.toUpperCase()\n if($B.Crypto === undefined ||\n $B.CryptoJS.algo[ALG] === undefined){$get_CryptoJS_lib(alg)}\n\n res.hash = $B.CryptoJS.algo[ALG].create()\n if(obj !== undefined){\n res.hash.update(bytes2WordArray(obj))\n }\n break\n default:\n throw $B.builtins.AttributeError.$factory('Invalid hash algorithm: ' + alg)\n }\n\n return res\n}\n\nreturn $mod\n\n})(__BRYTHON__)\n"], "html_parser": [".js", "var $module = (function($B){\n\n_b_ = $B.builtins\n\nvar ELEMENT_NODE = 1,\n TEXT_NODE = 3,\n COMMENT_NODE = 8,\n DOCUMENT_TYPE_NODE = 10\n\nvar HTMLNode = $B.make_class(\"HTMLNode\",\n function(){\n return {\n __class__: HTMLNode,\n nodeType: TEXT_NODE,\n text: \"\"\n }\n }\n)\n\nHTMLNode.__str__ = function(self){\n return self.text\n}\n\n$B.set_func_names(HTMLNode, \"_html_parser\")\n\nfunction* tokenize(src){\n var node = HTMLNode.$factory(),\n pos = 0,\n tag = \"\",\n type = \"text\"\n while(pos < src.length){\n var char = src[pos]\n switch(type){\n case \"text\":\n if(char == \"<\"){\n // starts a tag if immediately followed by a letter or by /\n var tag_mo = /^(\\/?)[a-zA-Z]+/.exec(src.substr(pos + 1))\n if(tag_mo){\n yield node\n node = HTMLNode.$factory()\n type = \"tag\"\n node.tagName = \"\"\n node.nodeType = ELEMENT_NODE\n node.closing = tag_mo[1] != \"\"\n node.attrs = []\n }else{\n // doctype declaration\n var decl_mo = /^/i.exec(src.substr(pos))\n if(decl_mo){\n yield node\n node = HTMLNode.$factory()\n node.text = decl_mo[0]\n node.doctype = decl_mo[1]\n node.nodeType = DOCUMENT_TYPE_NODE\n yield node\n node = HTMLNode.$factory()\n type = \"text\"\n pos += decl_mo[0].length\n break\n }else{\n // comment\n var comment_mo = /^\\/.exec(src.substr(pos))\n if(comment_mo){\n yield node\n node = HTMLNode.$factory()\n node.text = comment_mo[0]\n node.comment = comment_mo[1]\n node.nodeType = COMMENT_NODE\n yield node\n node = HTMLNode.$factory()\n type = \"text\"\n pos += comment_mo[0].length\n break\n }\n }\n }\n }\n pos++\n node.text += char\n break\n case \"tag\":\n if(char.search(/[_a-zA-Z]/) > -1){\n var mo = /\\w+/.exec(src.substr(pos))\n if(mo !== null){\n pos += mo[0].length\n if(node.tagName == \"\"){\n node.tagName = mo[0].toUpperCase()\n }\n node.text += mo[0]\n }else{\n pos++\n }\n }else if(char == \">\"){\n node.text += char\n yield node\n node = HTMLNode.$factory()\n type = \"text\"\n pos++\n }else if(char == \"=\"){\n node.text += char\n pos++\n }else if(char == \"'\" || char == '\"'){\n var i = pos + 1,\n found_string_end = false\n while(i < src.length){\n if(src[i] == char){\n var nb_escape = 0\n while(src[i - 1 - nb_escape] == '/'){\n nb_escape++\n }\n if(nb_escape % 2 == 0){\n node.text += src.substr(pos, i + 1 - pos)\n pos = i + 1\n found_string_end = true\n break\n }else{\n i++\n }\n }else if(src[i] == '>'){\n break\n }else{\n i++\n }\n }\n if(! found_string_end){\n // unterminated string: ignore\n pos++\n }\n }else{\n node.text += char\n pos++\n }\n break\n default:\n pos++\n }\n }\n yield node\n}\nreturn {\n ELEMENT_NODE: 1,\n TEXT_NODE: 3,\n COMMENT_NODE: 8,\n DOCUMENT_TYPE_NODE: 10,\n tokenize: tokenize\n}\n\n})(__BRYTHON__)\n"], "marshal": [".js", "var $module = (function($B){\n\nvar _b_ = $B.builtins\n\nreturn {\n loads: function(){\n var $ = $B.args('loads', 1, {obj:null}, ['obj'], arguments, {},\n null, null)\n return $B.structuredclone2pyobj(JSON.parse($.obj))\n },\n load: function(){\n var $ = $B.args('load', 1, {file:null}, ['file'], arguments, {},\n null, null)\n var content = $B.$call($B.$getattr($.file, \"read\"))()\n return $module.loads(_b_.bytes.decode(content, \"latin-1\"));\n },\n dump: function(){\n var $ = $B.args('dump', 2, {value:null, file: null},\n ['value', 'file'], arguments, {}, null, null)\n var s = JSON.stringify($B.pyobj2structuredclone($.value))\n $B.$getattr($.file, \"write\")(_b_.str.encode(s, 'latin-1'))\n var flush = $B.$getattr($.file, \"flush\", null)\n if(flush !== null){\n $B.$call(flush)()\n }\n return _b_.None\n },\n dumps: function(){\n var $ = $B.args('dumps', 1, {obj:null}, ['obj'], arguments, {},\n null, null)\n return JSON.stringify($B.pyobj2structuredclone($.obj))\n }\n}\n\n})(__BRYTHON__)\n"], "math": [".js", "var $module = (function($B){\n\nvar _b_ = $B.builtins\n\nconst INF = $B.fast_float(Number.POSITIVE_INFINITY),\n NINF = $B.fast_float(Number.NEGATIVE_INFINITY),\n ZERO = $B.fast_float(0),\n NAN = $B.fast_float(Number.NaN)\n\nvar float_check = function(x) {\n // Returns a Javascript number\n if(x.__class__ === $B.long_int){\n var res = parseInt(x.value)\n if(! isFinite(res)){\n throw _b_.OverflowError.$factory('int too big for float')\n }\n return res\n }else if(x.__class__ === _b_.float){\n return x.value\n }\n return _b_.float.$factory(x).value\n}\n\nfunction check_int(x){\n if(! _b_.isinstance(x, _b_.int)){\n throw _b_.TypeError.$factory(\"'\" + $B.class_name(x) +\n \"' object cannot be interpreted as an integer\")\n }\n}\n\nfunction check_int_or_round_float(x){\n return (_b_.isinstance(x, _b_.float) && Number.isInteger(x.value)) ||\n _b_.isinstance(x, _b_.int)\n}\n\nvar isWholeNumber = function(x){return (x * 10) % 10 == 0}\n\nvar isOdd = function(x) {return isWholeNumber(x) && 2 * Math.floor(x / 2) != x}\n\nvar isNegZero = function(x) {return x === 0 && Math.atan2(x,x) < 0}\n\nfunction overflow(){\n throw _b_.OverflowError.$factory(\"math range error\")\n}\n\nfunction value_error(){\n throw _b_.ValueError.$factory(\"math range error\")\n}\n\nvar EPSILON = Math.pow(2, -52),\n MAX_VALUE = (2 - EPSILON) * Math.pow(2, 1023),\n MIN_VALUE = Math.pow(2, -1022),\n Py_HUGE_VAL = Number.POSITIVE_INFINITY,\n logpi = 1.144729885849400174143427351353058711647,\n sqrtpi = 1.772453850905516027298167483341145182798\n\nfunction nextUp(x){\n if(x !== x){ // NaN\n return x\n }\n if(_b_.float.$funcs.isinf(x)){\n if(_b_.float.$funcs.isninf(x)){\n return -MAX_VALUE\n }\n return _mod.inf\n }\n if(_b_.isinstance(x, $B.long_int)){\n x = Number(x.value)\n }\n\n if(x == +MAX_VALUE){\n return +1 / 0\n }\n if(typeof x == \"number\"){\n var y = x * (x < 0 ? 1 - EPSILON / 2 : 1 + EPSILON)\n if(y == x){\n y = MIN_VALUE * EPSILON > 0 ? x + MIN_VALUE * EPSILON : x + MIN_VALUE\n }\n if(y === +1 / 0){\n y = +MAX_VALUE\n }\n var b = x + (y - x) / 2\n if(x < b && b < y){\n y = b;\n }\n var c = (y + x) / 2\n if(x < c && c < y){\n y = c;\n }\n return y === 0 ? -0 : y\n }else{\n var factor = $B.rich_comp('__lt__', x, 0) ? 1 - EPSILON / 2 :\n 1 + EPSILON\n var y = $B.rich_op(\"__mul__\", x , factor)\n if(y == x){\n y = MIN_VALUE * EPSILON > 0 ?\n $B.rich_op('__add__', x, MIN_VALUE * EPSILON) :\n $B.rich_op('__add__', x, MIN_VALUE)\n }\n if(y === +1 / 0){\n y = +MAX_VALUE\n }\n var y_minus_x = $B.rich_op('__sub__', y, x)\n var z = $B.rich_op('__truediv__', y_minus_x, 2) // (y - x) / 2\n\n var b = $B.rich_op('__add__', x, z)\n if($B.rich_comp('__lt__', x, b) && $B.rich_comp('__lt__', b, y)){\n y = b;\n }\n var c = $B.rich_op('__truediv__', $B.rich_op('__add__', y, x), 2)\n if($B.rich_comp('__lt__', x, c) && $B.rich_comp('__lt__', c, y)){\n y = c;\n }\n return y === 0 ? -0 : y\n }\n}\n\nfunction gcd2(a, b){\n // GCD of 2 factors\n if($B.rich_comp(\"__gt__\", b, a)){\n var temp = a\n a = b\n b = temp\n }\n while(true){\n if(b == 0){\n return a\n }\n a = $B.rich_op(\"__mod__\", a, b)\n if(a == 0){\n return b\n }\n b = $B.rich_op(\"__mod__\", b, a)\n }\n}\n\nconst LANCZOS_N = 13,\n lanczos_g = 6.024680040776729583740234375,\n lanczos_g_minus_half = 5.524680040776729583740234375,\n lanczos_num_coeffs = [\n 23531376880.410759688572007674451636754734846804940,\n 42919803642.649098768957899047001988850926355848959,\n 35711959237.355668049440185451547166705960488635843,\n 17921034426.037209699919755754458931112671403265390,\n 6039542586.3520280050642916443072979210699388420708,\n 1439720407.3117216736632230727949123939715485786772,\n 248874557.86205415651146038641322942321632125127801,\n 31426415.585400194380614231628318205362874684987640,\n 2876370.6289353724412254090516208496135991145378768,\n 186056.26539522349504029498971604569928220784236328,\n 8071.6720023658162106380029022722506138218516325024,\n 210.82427775157934587250973392071336271166969580291,\n 2.5066282746310002701649081771338373386264310793408\n ],\n /* denominator is x*(x+1)*...*(x+LANCZOS_N-2) */\n lanczos_den_coeffs = [\n 0.0, 39916800.0, 120543840.0, 150917976.0, 105258076.0, 45995730.0,\n 13339535.0, 2637558.0, 357423.0, 32670.0, 1925.0, 66.0, 1.0],\n /* gamma values for small positive integers, 1 though NGAMMA_INTEGRAL */\n NGAMMA_INTEGRAL = 23,\n gamma_integral = [\n 1.0, 1.0, 2.0, 6.0, 24.0, 120.0, 720.0, 5040.0, 40320.0, 362880.0,\n 3628800.0, 39916800.0, 479001600.0, 6227020800.0, 87178291200.0,\n 1307674368000.0, 20922789888000.0, 355687428096000.0,\n 6402373705728000.0, 121645100408832000.0, 2432902008176640000.0,\n 51090942171709440000.0, 1124000727777607680000.0]\n\n/* Lanczos' sum L_g(x), for positive x */\nfunction lanczos_sum(x){\n var num = 0.0,\n den = 0.0,\n i\n /* evaluate the rational function lanczos_sum(x). For large\n x, the obvious algorithm risks overflow, so we instead\n rescale the denominator and numerator of the rational\n function by x**(1-LANCZOS_N) and treat this as a\n rational function in 1/x. This also reduces the error for\n larger x values. The choice of cutoff point (5.0 below) is\n somewhat arbitrary; in tests, smaller cutoff values than\n this resulted in lower accuracy. */\n if (x < 5.0) {\n for (i = LANCZOS_N; --i >= 0; ) {\n num = num * x + lanczos_num_coeffs[i];\n den = den * x + lanczos_den_coeffs[i];\n }\n }else{\n for (i = 0; i < LANCZOS_N; i++) {\n num = num / x + lanczos_num_coeffs[i];\n den = den / x + lanczos_den_coeffs[i];\n }\n }\n return num/den;\n}\n\nfunction m_sinpi(x){\n // x is float\n // returns a float\n var r,\n y = fmod(fabs(x), 2.0), // float\n n = _b_.round($B.fast_float(2.0 * y.value)) // int\n switch(n){\n case 0:\n r = sin(pi.value * y.value);\n break;\n case 1:\n r = cos(pi.value * (y.value - 0.5));\n break;\n case 2:\n /* N.B. -sin(pi*(y-1.0)) is *not* equivalent: it would give\n -0.0 instead of 0.0 when y == 1.0. */\n r = sin(pi.value * (1.0 - y.value));\n break;\n case 3:\n r = _b_.float.__neg__(cos(pi.value *(y.value - 1.5)))\n break;\n case 4:\n r = sin(pi.value * (y.value - 2.0));\n break;\n }\n return $B.fast_float(copysign(1.0, x).value * r.value);\n}\n\n/*\n lgamma: natural log of the absolute value of the Gamma function.\n For large arguments, Lanczos' formula works extremely well here.\n*/\nfunction m_lgamma(x){\n var r,\n absx\n\n /* special cases */\n if(! isfinite(x)){\n if(isnan(x)){\n return x; /* lgamma(nan) = nan */\n }else{\n return $B.fast_float(Number.POSITIVE_INFINITY); /* lgamma(+-inf) = +inf */\n }\n }\n\n /* integer arguments */\n var x1 = float_check(x)\n if(Number.isInteger(x1) && x1 <= 2.0){\n if(x1 <= 0.0){\n value_error()\n }else{\n return $B.fast_float(0.0); /* lgamma(1) = lgamma(2) = 0.0 */\n }\n }\n\n absx = fabs(x)\n /* tiny arguments: lgamma(x) ~ -log(fabs(x)) for small x */\n if (absx.value < 1e-20){\n return $B.fast_float(-log(absx).value);\n }\n /* Lanczos' formula. We could save a fraction of a ulp in accuracy by\n having a second set of numerator coefficients for lanczos_sum that\n absorbed the exp(-lanczos_g) term, and throwing out the lanczos_g\n subtraction below; it's probably not worth it. */\n var lsum = $B.fast_float(lanczos_sum(absx.value))\n r = log(lsum).value - lanczos_g;\n r += (absx.value - 0.5) *\n (log($B.fast_float(absx.value + lanczos_g - 0.5)).value - 1)\n if (x1 < 0.0){\n /* Use reflection formula to get value for negative x. */\n r = logpi - log(fabs(m_sinpi(absx))).value - log(absx).value - r\n }\n r = $B.fast_float(r)\n if(isinf(r)){\n overflow()\n }\n return r;\n}\n\nfunction __getattr__(attr){\n $B.check_nb_args('__getattr__ ', 1, arguments)\n $B.check_no_kw('__getattr__ ', attr)\n\n var res = this[attr]\n if(res === undefined){\n throw _b_.AttributeError.$factory(\n 'module math has no attribute ' + attr)\n }\n return res\n}\n\nfunction acos(x){\n $B.check_nb_args('acos', 1, arguments)\n $B.check_no_kw('acos', x)\n if(_mod.isinf(x)){\n throw _b_.ValueError.$factory(\"math domain error\")\n }else if(_mod.isnan(x)){\n return _mod.nan\n }else{\n x = float_check(x)\n if(x > 1 || x < -1){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n return _b_.float.$factory(Math.acos(x))\n }\n}\n\nfunction acosh(x){\n $B.check_nb_args('acosh', 1, arguments)\n $B.check_no_kw('acosh', x)\n\n if(_b_.float.$funcs.isinf(x)){\n if(_b_.float.$funcs.isninf(x)){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n return _mod.inf\n }else if(_mod.isnan(x)){\n return _mod.nan\n }\n var y = float_check(x)\n if(y <= 0){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n if(y > Math.pow(2, 28)){ // issue 1590\n return _b_.float.$factory(_mod.log(y).value + _mod.log(2).value)\n }\n return _b_.float.$factory(Math.log(y + Math.sqrt(y * y - 1)))\n}\n\nfunction asin(x){\n $B.check_nb_args('asin', 1, arguments)\n $B.check_no_kw('asin', x)\n if(_mod.isinf(x)){\n throw _b_.ValueError.$factory(\"math domain error\")\n }else if(_mod.isnan(x)){\n return _mod.nan\n }else{\n x = float_check(x)\n if(x > 1 || x < -1){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n return _b_.float.$factory(Math.asin(x))\n }\n}\n\nfunction asinh(x){\n $B.check_nb_args('asinh', 1, arguments)\n $B.check_no_kw('asinh', x)\n\n var y = float_check(x)\n if(_b_.float.$funcs.isninf(x)){\n return NINF\n }else if(_b_.float.$funcs.isinf(x)){\n return INF\n }\n if(y == 0 && 1 / y === -Infinity){\n return $B.fast_float(-0.0)\n }\n return _b_.float.$factory(Math.asinh(y))\n}\n\nfunction atan(x){\n $B.check_nb_args('atan', 1, arguments)\n $B.check_no_kw('atan', x)\n\n if(_b_.float.$funcs.isninf(x)){return _b_.float.$factory(-Math.PI / 2)}\n if(_b_.float.$funcs.isinf(x)){return _b_.float.$factory(Math.PI / 2)}\n return _b_.float.$factory(Math.atan(float_check(x)))\n}\n\nfunction atan2(x, y){\n $B.check_nb_args('atan2', 2, arguments)\n $B.check_no_kw('atan2', x, y)\n\n return _b_.float.$factory(Math.atan2(float_check(x), float_check(y)))\n}\n\nfunction atanh(x){\n $B.check_nb_args('atanh', 1, arguments)\n $B.check_no_kw('atanh', x)\n if(_b_.float.$funcs.isinf(x)){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n var y = float_check(x)\n if(y == 0){\n return 0\n }else if(y <= -1 || y >= 1){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n return _b_.float.$factory(0.5 * Math.log((1 / y + 1)/(1 / y - 1)));\n}\n\nfunction cbrt(x){\n // Cubic root\n $B.check_nb_args('cbrt ', 1, arguments)\n $B.check_no_kw('cbrt ', x)\n\n var y = float_check(x)\n if(_b_.float.$funcs.isninf(x)){\n return NINF\n }else if(_b_.float.$funcs.isinf(x)){\n return INF\n }\n var _r = $B.fast_float(Math.cbrt(y))\n if(_b_.float.$funcs.isinf(_r)){\n throw _b_.OverflowError.$factory(\"math range error\")\n }\n return _r\n}\n\nfunction ceil(x){\n $B.check_nb_args('ceil', 1, arguments)\n $B.check_no_kw('ceil', x)\n\n var res\n\n if(_b_.isinstance(x, _b_.float)){\n if(_b_.float.$funcs.isinf(x)){\n throw _b_.OverflowError.$factory(\n \"cannot convert float infinity to integer\")\n }else if(_mod.isnan(x)){\n throw _b_.OverflowError.$factory(\n \"cannot convert float NaN to integer\")\n }\n }\n\n var klass = x.__class__ || $B.get_class(x)\n\n try{\n // Use attribute of the object's class, not of the object\n // itself (special method)\n return $B.$call($B.$getattr(klass, '__ceil__'))(x)\n }catch(err){\n if(! $B.is_exc(err, [_b_.AttributeError])){\n throw err\n }\n }\n\n try{\n x = $B.$call($B.$getattr(klass, '__float__'))(x)\n }catch(err){\n if(! $B.is_exc(err, [_b_.AttributeError])){\n throw err\n }else{\n throw _b_.TypeError.$factory(\"must be real number, not \" +\n $B.class_name(x))\n }\n }\n return _mod.ceil(x)\n}\n\nconst ULLONG_MAX = 2n ** 64n - 1n,\n LONG_MAX = 2147483647,\n LONG_MIN = -2147483647,\n LLONG_MAX = 9223372036854775807n,\n LLONG_MIN = -9223372036854775807n,\n p2_64 = 2n ** 64n\n\nconst reduced_factorial_odd_part = [\n 0x0000000000000001n, 0x0000000000000001n, 0x0000000000000001n, 0x0000000000000003n,\n 0x0000000000000003n, 0x000000000000000fn, 0x000000000000002dn, 0x000000000000013bn,\n 0x000000000000013bn, 0x0000000000000b13n, 0x000000000000375fn, 0x0000000000026115n,\n 0x000000000007233fn, 0x00000000005cca33n, 0x0000000002898765n, 0x00000000260eeeebn,\n 0x00000000260eeeebn, 0x0000000286fddd9bn, 0x00000016beecca73n, 0x000001b02b930689n,\n 0x00000870d9df20adn, 0x0000b141df4dae31n, 0x00079dd498567c1bn, 0x00af2e19afc5266dn,\n 0x020d8a4d0f4f7347n, 0x335281867ec241efn, 0x9b3093d46fdd5923n, 0x5e1f9767cc5866b1n,\n 0x92dd23d6966aced7n, 0xa30d0f4f0a196e5bn, 0x8dc3e5a1977d7755n, 0x2ab8ce915831734bn,\n 0x2ab8ce915831734bn, 0x81d2a0bc5e5fdcabn, 0x9efcac82445da75bn, 0xbc8b95cf58cde171n,\n 0xa0e8444a1f3cecf9n, 0x4191deb683ce3ffdn, 0xddd3878bc84ebfc7n, 0xcb39a64b83ff3751n,\n 0xf8203f7993fc1495n, 0xbd2a2a78b35f4bddn, 0x84757be6b6d13921n, 0x3fbbcfc0b524988bn,\n 0xbd11ed47c8928df9n, 0x3c26b59e41c2f4c5n, 0x677a5137e883fdb3n, 0xff74e943b03b93ddn,\n 0xfe5ebbcb10b2bb97n, 0xb021f1de3235e7e7n, 0x33509eb2e743a58fn, 0x390f9da41279fb7dn,\n 0xe5cb0154f031c559n, 0x93074695ba4ddb6dn, 0x81c471caa636247fn, 0xe1347289b5a1d749n,\n 0x286f21c3f76ce2ffn, 0x00be84a2173e8ac7n, 0x1595065ca215b88bn, 0xf95877595b018809n,\n 0x9c2efe3c5516f887n, 0x373294604679382bn, 0xaf1ff7a888adcd35n, 0x18ddf279a2c5800bn,\n 0x18ddf279a2c5800bn, 0x505a90e2542582cbn, 0x5bacad2cd8d5dc2bn, 0xfe3152bcbff89f41n,\n 0xe1467e88bf829351n, 0xb8001adb9e31b4d5n, 0x2803ac06a0cbb91fn, 0x1904b5d698805799n,\n 0xe12a648b5c831461n, 0x3516abbd6160cfa9n, 0xac46d25f12fe036dn, 0x78bfa1da906b00efn,\n 0xf6390338b7f111bdn, 0x0f25f80f538255d9n, 0x4ec8ca55b8db140fn, 0x4ff670740b9b30a1n,\n 0x8fd032443a07f325n, 0x80dfe7965c83eeb5n, 0xa3dc1714d1213afdn, 0x205b7bbfcdc62007n,\n 0xa78126bbe140a093n, 0x9de1dc61ca7550cfn, 0x84f0046d01b492c5n, 0x2d91810b945de0f3n,\n 0xf5408b7f6008aa71n, 0x43707f4863034149n, 0xdac65fb9679279d5n, 0xc48406e7d1114eb7n,\n 0xa7dc9ed3c88e1271n, 0xfb25b2efdb9cb30dn, 0x1bebda0951c4df63n, 0x5c85e975580ee5bdn,\n 0x1591bc60082cb137n, 0x2c38606318ef25d7n, 0x76ca72f7c5c63e27n, 0xf04a75d17baa0915n,\n 0x77458175139ae30dn, 0x0e6c1330bc1b9421n, 0xdf87d2b5797e8293n, 0xefa5c703e1e68925n,\n 0x2b6b1b3278b4f6e1n, 0xceee27b382394249n, 0xd74e3829f5dab91dn, 0xfdb17989c26b5f1fn,\n 0xc1b7d18781530845n, 0x7b4436b2105a8561n, 0x7ba7c0418372a7d7n, 0x9dbc5c67feb6c639n,\n 0x502686d7f6ff6b8fn, 0x6101855406be7a1fn, 0x9956afb5806930e7n, 0xe1f0ee88af40f7c5n,\n 0x984b057bda5c1151n, 0x9a49819acc13ea05n, 0x8ef0dead0896ef27n, 0x71f7826efe292b21n,\n 0xad80a480e46986efn, 0x01cdc0ebf5e0c6f7n, 0x6e06f839968f68dbn, 0xdd5943ab56e76139n,\n 0xcdcf31bf8604c5e7n, 0x7e2b4a847054a1cbn, 0x0ca75697a4d3d0f5n, 0x4703f53ac514a98bn,\n];\n\nconst inverted_factorial_odd_part = [\n 0x0000000000000001n, 0x0000000000000001n, 0x0000000000000001n, 0xaaaaaaaaaaaaaaabn,\n 0xaaaaaaaaaaaaaaabn, 0xeeeeeeeeeeeeeeefn, 0x4fa4fa4fa4fa4fa5n, 0x2ff2ff2ff2ff2ff3n,\n 0x2ff2ff2ff2ff2ff3n, 0x938cc70553e3771bn, 0xb71c27cddd93e49fn, 0xb38e3229fcdee63dn,\n 0xe684bb63544a4cbfn, 0xc2f684917ca340fbn, 0xf747c9cba417526dn, 0xbb26eb51d7bd49c3n,\n 0xbb26eb51d7bd49c3n, 0xb0a7efb985294093n, 0xbe4b8c69f259eabbn, 0x6854d17ed6dc4fb9n,\n 0xe1aa904c915f4325n, 0x3b8206df131cead1n, 0x79c6009fea76fe13n, 0xd8c5d381633cd365n,\n 0x4841f12b21144677n, 0x4a91ff68200b0d0fn, 0x8f9513a58c4f9e8bn, 0x2b3e690621a42251n,\n 0x4f520f00e03c04e7n, 0x2edf84ee600211d3n, 0xadcaa2764aaacdfdn, 0x161f4f9033f4fe63n,\n 0x161f4f9033f4fe63n, 0xbada2932ea4d3e03n, 0xcec189f3efaa30d3n, 0xf7475bb68330bf91n,\n 0x37eb7bf7d5b01549n, 0x46b35660a4e91555n, 0xa567c12d81f151f7n, 0x4c724007bb2071b1n,\n 0x0f4a0cce58a016bdn, 0xfa21068e66106475n, 0x244ab72b5a318ae1n, 0x366ce67e080d0f23n,\n 0xd666fdae5dd2a449n, 0xd740ddd0acc06a0dn, 0xb050bbbb28e6f97bn, 0x70b003fe890a5c75n,\n 0xd03aabff83037427n, 0x13ec4ca72c783bd7n, 0x90282c06afdbd96fn, 0x4414ddb9db4a95d5n,\n 0xa2c68735ae6832e9n, 0xbf72d71455676665n, 0xa8469fab6b759b7fn, 0xc1e55b56e606caf9n,\n 0x40455630fc4a1cffn, 0x0120a7b0046d16f7n, 0xa7c3553b08faef23n, 0x9f0bfd1b08d48639n,\n 0xa433ffce9a304d37n, 0xa22ad1d53915c683n, 0xcb6cbc723ba5dd1dn, 0x547fb1b8ab9d0ba3n,\n 0x547fb1b8ab9d0ba3n, 0x8f15a826498852e3n, 0x32e1a03f38880283n, 0x3de4cce63283f0c1n,\n 0x5dfe6667e4da95b1n, 0xfda6eeeef479e47dn, 0xf14de991cc7882dfn, 0xe68db79247630ca9n,\n 0xa7d6db8207ee8fa1n, 0x255e1f0fcf034499n, 0xc9a8990e43dd7e65n, 0x3279b6f289702e0fn,\n 0xe7b5905d9b71b195n, 0x03025ba41ff0da69n, 0xb7df3d6d3be55aefn, 0xf89b212ebff2b361n,\n 0xfe856d095996f0adn, 0xd6e533e9fdf20f9dn, 0xf8c0e84a63da3255n, 0xa677876cd91b4db7n,\n 0x07ed4f97780d7d9bn, 0x90a8705f258db62fn, 0xa41bbb2be31b1c0dn, 0x6ec28690b038383bn,\n 0xdb860c3bb2edd691n, 0x0838286838a980f9n, 0x558417a74b36f77dn, 0x71779afc3646ef07n,\n 0x743cda377ccb6e91n, 0x7fdf9f3fe89153c5n, 0xdc97d25df49b9a4bn, 0x76321a778eb37d95n,\n 0x7cbb5e27da3bd487n, 0x9cff4ade1a009de7n, 0x70eb166d05c15197n, 0xdcf0460b71d5fe3dn,\n 0x5ac1ee5260b6a3c5n, 0xc922dedfdd78efe1n, 0xe5d381dc3b8eeb9bn, 0xd57e5347bafc6aadn,\n 0x86939040983acd21n, 0x395b9d69740a4ff9n, 0x1467299c8e43d135n, 0x5fe440fcad975cdfn,\n 0xcaa9a39794a6ca8dn, 0xf61dbd640868dea1n, 0xac09d98d74843be7n, 0x2b103b9e1a6b4809n,\n 0x2ab92d16960f536fn, 0x6653323d5e3681dfn, 0xefd48c1c0624e2d7n, 0xa496fefe04816f0dn,\n 0x1754a7b07bbdd7b1n, 0x23353c829a3852cdn, 0xbf831261abd59097n, 0x57a8e656df0618e1n,\n 0x16e9206c3100680fn, 0xadad4c6ee921dac7n, 0x635f2b3860265353n, 0xdd6d0059f44b3d09n,\n 0xac4dd6b894447dd7n, 0x42ea183eeaa87be3n, 0x15612d1550ee5b5dn, 0x226fa19d656cb623n,\n]\n\nconst factorial_trailing_zeros = [\n 0, 0, 1, 1, 3, 3, 4, 4, 7, 7, 8, 8, 10, 10, 11, 11, // 0-15\n 15, 15, 16, 16, 18, 18, 19, 19, 22, 22, 23, 23, 25, 25, 26, 26, // 16-31\n 31, 31, 32, 32, 34, 34, 35, 35, 38, 38, 39, 39, 41, 41, 42, 42, // 32-47\n 46, 46, 47, 47, 49, 49, 50, 50, 53, 53, 54, 54, 56, 56, 57, 57, // 48-63\n 63, 63, 64, 64, 66, 66, 67, 67, 70, 70, 71, 71, 73, 73, 74, 74, // 64-79\n 78, 78, 79, 79, 81, 81, 82, 82, 85, 85, 86, 86, 88, 88, 89, 89, // 80-95\n 94, 94, 95, 95, 97, 97, 98, 98, 101, 101, 102, 102, 104, 104, 105, 105, // 96-111\n 109, 109, 110, 110, 112, 112, 113, 113, 116, 116, 117, 117, 119, 119, 120, 120, // 112-127\n].map(BigInt)\n\nconst NULL = undefined\n\n/* Calculate C(n, k) for n in the 63-bit range. */\n\nfunction perm_comb_small(n, k, iscomb){\n if(k == 0){\n return 1n\n }\n\n /* For small enough n and k the result fits in the 64-bit range and can\n * be calculated without allocating intermediate PyLong objects. */\n if(iscomb){\n /* Maps k to the maximal n so that 2*k-1 <= n <= 127 and C(n, k)\n * fits into a uint64_t. Exclude k = 1, because the second fast\n * path is faster for this case.*/\n var fast_comb_limits1 = [\n 0, 0, 127, 127, 127, 127, 127, 127, // 0-7\n 127, 127, 127, 127, 127, 127, 127, 127, // 8-15\n 116, 105, 97, 91, 86, 82, 78, 76, // 16-23\n 74, 72, 71, 70, 69, 68, 68, 67, // 24-31\n 67, 67, 67 // 32-34\n ];\n if(k < fast_comb_limits1.length && n <= fast_comb_limits1[k]){\n /*\n comb(n, k) fits into a uint64_t. We compute it as\n comb_odd_part << shift\n where 2**shift is the largest power of two dividing comb(n, k)\n and comb_odd_part is comb(n, k) >> shift. comb_odd_part can be\n calculated efficiently via arithmetic modulo 2**64, using three\n lookups and two uint64_t multiplications.\n */\n var comb_odd_part = reduced_factorial_odd_part[n]\n * inverted_factorial_odd_part[k]\n * inverted_factorial_odd_part[n - k];\n comb_odd_part %= p2_64\n var shift = factorial_trailing_zeros[n]\n - factorial_trailing_zeros[k]\n - factorial_trailing_zeros[n - k];\n return comb_odd_part << shift;\n }\n\n /* Maps k to the maximal n so that 2*k-1 <= n <= 127 and C(n, k)*k\n * fits into a long long (which is at least 64 bit). Only contains\n * items larger than in fast_comb_limits1. */\n var fast_comb_limits2 = [\n 0, ULLONG_MAX, 4294967296, 3329022, 102570, 13467, 3612, 1449, // 0-7\n 746, 453, 308, 227, 178, 147 // 8-13\n ];\n if (k < fast_comb_limits2.length && n <= fast_comb_limits2[k]) {\n /* C(n, k) = C(n, k-1) * (n-k+1) / k */\n var result = n,\n i = 1n;\n while(i < k){\n result *= --n;\n result /= ++i;\n }\n return result;\n }\n }else{\n /* Maps k to the maximal n so that k <= n and P(n, k)\n * fits into a long long (which is at least 64 bit). */\n var fast_perm_limits = [\n 0, ULLONG_MAX, 4294967296, 2642246, 65537, 7133, 1627, 568, // 0-7\n 259, 142, 88, 61, 45, 36, 30, 26, // 8-15\n 24, 22, 21, 20, 20 // 16-20\n ];\n if (k < fast_perm_limits.length && n <= fast_perm_limits[k]) {\n if(n <= 127){\n /* P(n, k) fits into a uint64_t. */\n var perm_odd_part = reduced_factorial_odd_part[n]\n * inverted_factorial_odd_part[n - k];\n perm_odd_part %= p2_64\n var shift = factorial_trailing_zeros[n]\n - factorial_trailing_zeros[n - k];\n var res = perm_odd_part << shift\n\n return res;\n }\n\n /* P(n, k) = P(n, k-1) * (n-k+1) */\n var result = n;\n for (var i = 1; i < k; i++) {\n result *= --n;\n }\n return result\n }\n }\n\n /* For larger n use recursive formulas:\n *\n * P(n, k) = P(n, j) * P(n-j, k-j)\n * C(n, k) = C(n, j) * C(n-j, k-j) // C(k, j)\n */\n var j = k / 2n;\n var a = perm_comb_small(n, j, iscomb);\n var b = perm_comb_small(n - j, k - j, iscomb);\n a = a * b;\n if(iscomb){\n b = perm_comb_small(k, j, 1);\n a = a / b;\n }\n return a;\n}\n\n/* Calculate P(n, k) or C(n, k) using recursive formulas.\n * It is more efficient than sequential multiplication thanks to\n * Karatsuba multiplication.\n */\nfunction perm_comb(n, k, iscomb){\n if(k == 0){\n return 1;\n }\n if(k == 1){\n return n;\n }\n\n /* P(n, k) = P(n, j) * P(n-j, k-j) */\n /* C(n, k) = C(n, j) * C(n-j, k-j) // C(k, j) */\n var j = k / 2n\n var a = perm_comb(n, j, iscomb);\n //var t = j\n //n = n - t;\n var b = perm_comb(n - j, k - j, iscomb);\n a = a * b;\n if(iscomb){\n b = perm_comb_small(k, j, 1);\n a = a / b;\n }\n return a;\n}\n\nfunction comb(n, k){\n var $ = $B.args('comb', 2, {n: null, k: null}, ['n', 'k'],\n arguments, {}, null, null),\n n = $.n,\n k = $.k\n\n var result = NULL,\n temp,\n overflow, cmp;\n\n // accept integers or objects with __index__\n n = $B.PyNumber_Index(n)\n k = $B.PyNumber_Index(k)\n\n n = _b_.int.$to_bigint(n);\n k = _b_.int.$to_bigint(k);\n\n if(n < 0){\n throw _b_.ValueError.$factory(\n \"n must be a non-negative integer\");\n }\n if(k < 0){\n throw _b_.ValueError.$factory(\n \"k must be a non-negative integer\");\n }\n\n overflow = n > LLONG_MAX || n < LLONG_MIN\n if(! overflow){\n overflow = k > LLONG_MAX || k < LLONG_MIN\n if (overflow || k > n) {\n result = 0n;\n }else{\n if(n - k < k){\n k = n - k\n }\n if (k > 1) {\n result = perm_comb_small(n, k, 1);\n }\n }\n /* For k == 1 just return the original n in perm_comb(). */\n }else{\n /* k = min(k, n - k) */\n temp = n - k\n if(temp < 0) {\n result = 0n;\n }\n if (temp < k) {\n k = temp\n }\n\n overflow = k > LLONG_MAX || k < LLONG_MIN\n if (overflow) {\n throw _b_.OverflowError.$factory(\n \"min(n - k, k) must not exceed \" +\n LLONG_MAX);\n }\n }\n if(result === undefined){\n result = perm_comb(n, k, 1);\n }\n\n return _b_.int.$int_or_long(result)\n}\n\n\nfunction copysign(x, y){\n $B.check_nb_args_no_kw('copysign', 2, arguments)\n\n var x1 = Math.abs(float_check(x))\n var y1 = float_check(y)\n var sign = Math.sign(y1)\n sign = (sign == 1 || Object.is(sign, +0)) ? 1 : - 1\n return _b_.float.$factory(x1 * sign)\n}\n\nfunction cos(x){\n $B.check_nb_args('cos ', 1, arguments)\n $B.check_no_kw('cos ', x)\n return _b_.float.$factory(Math.cos(float_check(x)))\n}\n\nfunction cosh(x){\n $B.check_nb_args('cosh', 1, arguments)\n $B.check_no_kw('cosh', x)\n\n if(_b_.float.$funcs.isinf(x)){return INF}\n var y = float_check(x)\n if(Math.cosh !== undefined){return _b_.float.$factory(Math.cosh(y))}\n return _b_.float.$factory((Math.pow(Math.E, y) +\n Math.pow(Math.E, -y)) / 2)\n}\n\nfunction degrees(x){\n $B.check_nb_args('degrees', 1, arguments)\n $B.check_no_kw('degrees', x)\n return _b_.float.$factory(float_check(x) * 180 / Math.PI)\n}\n\nfunction dist(p, q){\n $B.check_nb_args_no_kw('dist', 2, arguments)\n\n function test(x){\n if(typeof x === \"number\"){\n return x\n }else if(x.__class__ === _b_.float){\n return x.value\n }\n var y = $B.$getattr(x, '__float__', null)\n if(y === null){\n throw _b_.TypeError.$factory('not a float')\n }\n return $B.$call(y)().value\n }\n\n // build list of differences (as floats) between coordinates of p and q\n var diffs = [],\n diff\n\n if(Array.isArray(p) && Array.isArray(q)){\n // simple case : p and q are lists of tuples\n if(p.length != q.length){\n throw _b_.ValueError.$factory(\"both points must have \" +\n \"the same number of dimensions\")\n }\n p = p.map(test)\n q = q.map(test)\n for(var i = 0, len = p.length; i < len; i++){\n var next_p = p[i],\n next_q = q[i]\n var diff = Math.abs(next_p - next_q)\n diffs.push(diff)\n }\n }else{\n var itp = _b_.iter(p),\n itq = _b_.iter(q),\n res = 0\n\n while(true){\n try{\n var next_p = _b_.next(itp)\n }catch(err){\n if(err.__class__ === _b_.StopIteration){\n // check that the other iterator is also exhausted\n try{\n var next_q = _b_.next(itq)\n throw _b_.ValueError.$factory(\"both points must have \" +\n \"the same number of dimensions\")\n }catch(err){\n if(err.__class__ === _b_.StopIteration){\n break\n }\n throw err\n }\n }\n throw err\n }\n next_p = test(next_p)\n try{\n var next_q = _b_.next(itq)\n }catch(err){\n if(err.__class__ === _b_.StopIteration){\n throw _b_.ValueError.$factory(\"both points must have \" +\n \"the same number of dimensions\")\n }\n throw err\n }\n next_q = test(next_q)\n diff = Math.abs(next_p - next_q)\n diffs.push(diff)\n }\n }\n for(var diff of diffs){\n if(! isFinite(diff) && ! isNaN(diff)){\n return _mod.inf\n }\n }\n for(var diff of diffs){\n if(isNaN(diff)){\n return _mod.nan\n }\n }\n\n var res = 0,\n scale = 1,\n max_diff = Math.max(...diffs),\n min_diff = Math.min(...diffs)\n max_value = Math.sqrt(Number.MAX_VALUE) / p.length,\n min_value = Math.sqrt(Number.MIN_VALUE) * p.length\n if(max_diff > max_value){\n var nb = 0\n while(max_diff > max_value){\n scale *= 2\n max_diff /= 2\n nb++\n }\n for(var diff of diffs){\n diff = diff / scale\n res += diff * diff\n }\n return $B.fast_float(scale * Math.sqrt(res))\n }else if(min_diff !== 0 && min_diff < min_value){\n while(min_diff < min_value){\n scale *= 2\n min_diff *= 2\n }\n for(var diff of diffs){\n diff = diff * scale\n res += diff * diff\n }\n return $B.fast_float(Math.sqrt(res) / scale)\n }else{\n for(var diff of diffs){\n res += Math.pow(diff, 2)\n }\n return $B.fast_float(Math.sqrt(res))\n }\n}\n\nconst e = _b_.float.$factory(Math.E)\n\nconst ERF_SERIES_CUTOFF = 1.5,\n ERF_SERIES_TERMS = 25,\n ERFC_CONTFRAC_CUTOFF = 30.0,\n ERFC_CONTFRAC_TERMS = 50\n\n/*\n Error function, via power series.\n Given a finite float x, return an approximation to erf(x).\n Converges reasonably fast for small x.\n*/\n\nfunction m_erf_series(x){\n var x2, acc, fk, result\n var i\n\n x2 = x * x\n acc = 0.0\n fk = ERF_SERIES_TERMS + 0.5\n for(i = 0; i < ERF_SERIES_TERMS; i++){\n acc = 2.0 + x2 * acc / fk\n fk -= 1.0\n }\n result = acc * x * exp(-x2).value / sqrtpi\n return result\n}\n\nfunction m_erfc_contfrac(x){\n var x2, a, da, p, p_last, q, q_last, b, result;\n var i\n\n if(x >= ERFC_CONTFRAC_CUTOFF){\n return 0.0\n }\n\n x2 = x * x\n a = 0.0\n da = 0.5\n p = 1.0\n p_last = 0.0\n q = da + x2\n q_last = 1.0\n for(i = 0; i < ERFC_CONTFRAC_TERMS; i++){\n var temp\n a += da\n da += 2.0\n b = da + x2\n temp = p; p = b * p - a * p_last; p_last = temp\n temp = q; q = b * q - a * q_last; q_last = temp\n }\n result = p / q * x * exp(-x2).value / sqrtpi\n return result\n}\n\n\nfunction erf(x){\n var absx,\n cf\n var x1 = float_check(x)\n if(isNaN(x1)){\n return x\n }\n absx = fabs(x)\n if(absx.value < ERF_SERIES_CUTOFF){\n return $B.fast_float(m_erf_series(x1))\n }else{\n cf = m_erfc_contfrac(absx.value)\n return $B.fast_float(x1 > 0.0 ? 1.0 - cf : cf - 1.0)\n }\n}\n\nfunction erfc(x){\n\n // inspired from\n // http://stackoverflow.com/questions/457408/is-there-an-easily-available-implementation-of-erf-for-python\n var y = float_check(x)\n var t = 1.0 / (1.0 + 0.5 * Math.abs(y))\n var ans = 1 - t * Math.exp( -y * y - 1.26551223 +\n t * ( 1.00002368 +\n t * ( 0.37409196 +\n t * ( 0.09678418 +\n t * (-0.18628806 +\n t * ( 0.27886807 +\n t * (-1.13520398 +\n t * ( 1.48851587 +\n t * (-0.82215223 +\n t * 0.17087277)))))))))\n if(y >= 0.0){return 1 - ans}\n return 1 + ans\n}\n\nfunction erfc(x){\n $B.check_nb_args_no_kw('erfc', 1, arguments)\n var absx, cf;\n\n var x1 = float_check(x)\n if(isNaN(x1)){\n return x\n }\n absx = fabs(x);\n if(absx.value < ERF_SERIES_CUTOFF){\n return $B.fast_float(1.0 - m_erf_series(x1))\n }else{\n cf = m_erfc_contfrac(absx.value)\n return $B.fast_float(x1 > 0.0 ? cf : 2.0 - cf)\n }\n}\n\nfunction exp(x){\n $B.check_nb_args('exp', 1, arguments)\n $B.check_no_kw('exp', x)\n\n if(_b_.float.$funcs.isninf(x)){\n return _b_.float.$factory(0)\n }\n if(_b_.float.$funcs.isinf(x)){\n return INF\n }\n var _r = Math.exp(float_check(x))\n if(! isNaN(_r) && ! isFinite(_r)){\n throw _b_.OverflowError.$factory(\"math range error\")\n }\n return _b_.float.$factory(_r)\n}\n\nfunction exp2(x){\n return pow(2, x)\n}\n\nfunction expm1(x){\n $B.check_nb_args('expm1', 1, arguments)\n $B.check_no_kw('expm1', x)\n\n if(_b_.float.$funcs.isninf(x)){\n return $B.fast_float(-1)\n }else if(_b_.float.$funcs.isinf(x)){\n return INF\n }\n var _r = Math.expm1(float_check(x))\n if((! isNaN(_r)) && ! isFinite(_r)){\n overflow()\n }\n return $B.fast_float(_r)\n}\n\nfunction fabs(x){\n $B.check_nb_args_no_kw('fabs', 1, arguments)\n return _b_.float.$funcs.fabs(float_check(x)) // located in py_float.js\n}\n\n// factorial implementation, adapted from CPython's mathmodule.c\n\nconst SmallFactorials = [\n 1n, 1n, 2n, 6n, 24n, 120n, 720n, 5040n, 40320n,\n 362880n, 3628800n, 39916800n, 479001600n,\n 6227020800n, 87178291200n, 1307674368000n,\n 20922789888000n, 355687428096000n, 6402373705728000n,\n 121645100408832000n, 2432902008176640000n\n ]\n\nconst SIZEOF_LONG = 4\n\nfunction _Py_bit_length(x){\n const BIT_LENGTH_TABLE = [\n 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4,\n 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5\n ]\n var msb = 0;\n while(x >= 32n){\n msb += 6;\n x >>= 6n;\n }\n msb += BIT_LENGTH_TABLE[parseInt(x)];\n return msb\n}\nfunction count_set_bits(n){\n var count = 0n;\n while(n != 0){\n ++count;\n n &= n - 1n; /* clear least significant bit */\n }\n return count;\n}\n\nfunction factorial_partial_product(start, stop, max_bits){\n var midpoint,\n num_operands,\n left,\n right,\n result\n\n /* If the return value will fit an unsigned long, then we can\n * multiply in a tight, fast loop where each multiply is O(1).\n * Compute an upper bound on the number of bits required to store\n * the answer.\n *\n * Storing some integer z requires floor(lg(z))+1 bits, which is\n * conveniently the value returned by bit_length(z). The\n * product x*y will require at most\n * bit_length(x) + bit_length(y) bits to store, based\n * on the idea that lg product = lg x + lg y.\n *\n * We know that stop - 2 is the largest number to be multiplied. From\n * there, we have: bit_length(answer) <= num_operands *\n * bit_length(stop - 2)\n */\n\n num_operands = (stop - start) / 2n;\n max_bits = BigInt(max_bits)\n /* The \"num_operands <= 8 * SIZEOF_LONG\" check guards against the\n * unlikely case of an overflow in num_operands * max_bits. */\n if(num_operands <= 8 * SIZEOF_LONG &&\n num_operands * max_bits <= 8 * SIZEOF_LONG) {\n var j,\n total;\n for (total = start, j = start + 2n; j < stop; j += 2n){\n total *= j;\n }\n return total\n }\n\n /* find midpoint of range(start, stop), rounded up to next odd number. */\n midpoint = (start + num_operands) | 1n;\n left = factorial_partial_product(start, midpoint,\n _Py_bit_length(midpoint - 2n));\n right = factorial_partial_product(midpoint, stop, max_bits);\n result = left * right\n return result;\n}\n\n\nfunction factorial_odd_part(n){\n var i,\n v, lower, upper,\n partial, tmp, inner, outer;\n\n inner = 1n\n outer = inner;\n upper = 3n;\n for (i = BigInt(_Py_bit_length(n)) - 2n; i >= 0; i--) {\n v = n >> i;\n if (v <= 2){\n continue\n }\n lower = upper;\n /* (v + 1) | 1 = least odd integer strictly larger than n / 2**i */\n upper = (v + 1n) | 1n;\n /* Here inner is the product of all odd integers j in the range (0,\n n/2**(i+1)]. The factorial_partial_product call below gives the\n product of all odd integers j in the range (n/2**(i+1), n/2**i]. */\n partial = factorial_partial_product(lower, upper,\n _Py_bit_length(upper-2n));\n /* inner *= partial */\n tmp = inner * partial\n inner = tmp;\n /* Now inner is the product of all odd integers j in the range (0,\n n/2**i], giving the inner product in the formula above. */\n\n /* outer *= inner; */\n tmp = outer * inner\n outer = tmp;\n }\n return outer;\n}\n\nfunction factorial(arg){\n var x,\n two_valuation,\n overflow,\n result,\n odd_part;\n // Check that arg can be converted to an integer, and transform it to\n // a bigint\n x = _b_.int.$to_bigint($B.PyNumber_Index(arg))\n overflow = x > LONG_MAX || x < LONG_MIN\n if(x > LONG_MAX) {\n throw _b_.OverflowError.$factory(\n \"factorial() argument should not exceed \" +\n LONG_MAX)\n }else if(x < 0) {\n throw _b_.ValueError.$factory(\n \"factorial() not defined for negative values\");\n }\n\n /* use lookup table if x is small */\n if (x < SmallFactorials.length){\n return _b_.int.$int_or_long(SmallFactorials[x]);\n }\n /* else express in the form odd_part * 2**two_valuation, and compute as\n odd_part << two_valuation. */\n odd_part = factorial_odd_part(x);\n two_valuation = x - count_set_bits(x);\n return _b_.int.$int_or_long(odd_part << two_valuation);\n}\n\nfunction floor(x){\n $B.check_nb_args_no_kw('floor', 1, arguments)\n\n if(typeof x == \"number\" || x.__class__ === _b_.float){\n return Math.floor(float_check(x))\n }\n var klass = $B.get_class(x)\n try{\n return $B.$call($B.$getattr(klass, \"__floor__\"))(x)\n }catch(err){\n if($B.is_exc(err, [_b_.AttributeError])){\n try{\n var float = $B.$call($B.$getattr(klass, \"__float__\"))(x)\n return floor(float)\n }catch(err){\n if($B.is_exc(err, [_b_.AttributeError])){\n throw _b_.TypeError.$factory(\"no __float__\")\n }\n throw err\n }\n }\n }\n}\n\nfunction fmod(x, y){\n $B.check_nb_args_no_kw('fmod', 2, arguments)\n if(_b_.isinstance(x, _b_.float)){\n if(_b_.float.$funcs.isinf(x)){\n throw _b_.ValueError.$factory('math domain error')\n }\n }\n y = float_check(y)\n if(y == 0){\n throw _b_.ValueError.$factory('math domain error')\n }\n return _b_.float.$factory(float_check(x) % float_check(y))\n}\n\nfunction frexp(x){\n $B.check_nb_args_no_kw('frexp', 1, arguments)\n\n var _l = _b_.float.$funcs.frexp(x)\n return _b_.tuple.$factory([_b_.float.$factory(_l[0]), _l[1]])\n}\n\nfunction fsum(x){\n $B.check_nb_args_no_kw('fsum', 1, arguments)\n\n /* Translation into Javascript of the function msum in an Active\n State Cookbook recipe : https://code.activestate.com/recipes/393090/\n by Raymond Hettinger\n */\n var partials = [],\n res = new Number(),\n _it = _b_.iter(x)\n while(true){\n try{\n var x = _b_.next(_it),\n i = 0\n x = float_check(x)\n for(var j = 0, len = partials.length; j < len; j++){\n var y = float_check(partials[j])\n if(Math.abs(x) < Math.abs(y)){\n var z = x\n x = y\n y = z\n }\n var hi = x + y,\n lo = y - (hi - x)\n if(lo){\n partials[i] = lo\n i++\n }\n x = hi\n }\n partials = partials.slice(0, i).concat([x])\n }catch(err){\n if(_b_.isinstance(err, _b_.StopIteration)){break}\n throw err\n }\n }\n var res = 0\n for(var i = 0; i < partials.length; i++){\n res += partials[i]\n }\n return $B.fast_float(res)\n}\n\nfunction gamma(x){\n $B.check_nb_args('gamma', 1, arguments)\n $B.check_no_kw('gamma', x)\n var x_as_number = x,\n r,\n y,\n z,\n sqrtpow\n\n /* special cases */\n if(_b_.isinstance(x, _b_.float)){\n x_as_number = x.value\n }else if(! _b_.isinstance(x, _b_.int)){\n throw _b_.TypeError.$factory(\"must be real number, not \" +\n $B.class_name(x))\n }\n if(x_as_number === Number.POSITIVE_INFINITY || isNaN(x_as_number)){\n return x\n }else if(x_as_number === Number.NEGATIVE_INFINITY || x_as_number == 0){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n\n /* integer arguments */\n if(Number.isInteger(x_as_number)){\n if($B.rich_comp('__lt__', x, 0.0)){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n if($B.rich_comp('__le__', x, NGAMMA_INTEGRAL)){\n return $B.fast_float(gamma_integral[x_as_number - 1])\n }\n }\n var absx = fabs(x)\n\n /* tiny arguments: tgamma(x) ~ 1/x for x near 0 */\n if(absx.value < 1e-20){\n r = 1.0 / x_as_number\n if(r === Infinity || r === -Infinity){\n overflow()\n }\n return $B.fast_float(r)\n }\n\n /* large arguments: assuming IEEE 754 doubles, tgamma(x) overflows for\n x > 200, and underflows to +-0.0 for x < -200, not a negative\n integer. */\n if(absx.value > 200.0){\n if(x_as_number < 0.0){\n return $B.fast_float(0.0 / m_sinpi(x).value);\n }else{\n overflow()\n }\n }\n\n y = absx.value + lanczos_g_minus_half;\n /* compute error in sum */\n if (absx.value > lanczos_g_minus_half) {\n /* note: the correction can be foiled by an optimizing\n compiler that (incorrectly) thinks that an expression like\n a + b - a - b can be optimized to 0.0. This shouldn't\n happen in a standards-conforming compiler. */\n var q = y - absx.value;\n z = q - lanczos_g_minus_half;\n }else{\n var q = y - lanczos_g_minus_half;\n z = q - absx.value;\n }\n z = z * lanczos_g / y;\n if (x_as_number < 0.0) {\n r = -pi.value / m_sinpi(absx).value /\n absx.value * _mod.exp(y).value /\n lanczos_sum(absx.value);\n r -= z * r;\n if(absx.value < 140.0){\n r /= pow(y, absx.value - 0.5).value;\n }else{\n sqrtpow = pow(y, absx.value / 2.0 - 0.25);\n r /= sqrtpow.value;\n r /= sqrtpow.value;\n }\n }else{\n r = lanczos_sum(absx.value) / exp(y).value;\n r += z * r;\n if(absx.value < 140.0){\n r *= pow(y, absx.value - 0.5).value;\n }else{\n sqrtpow = pow(y, absx.value / 2.0 - 0.25);\n r *= sqrtpow.value;\n r *= sqrtpow.value;\n }\n }\n if(r === Number.POSITIVE_INFINITY){\n overflow()\n }\n return $B.fast_float(r);\n}\n\n\n// GCD algorithm. Javascript adaptation of Python script at\n// https://gist.github.com/cmpute/baa545f0c2b6be8b628e9ded3c19f6c1\n// by Jacob Zhong\nfunction bit_length(x){\n return x.toString(2).length\n}\n\n$B.nb_simple_gcd = 0\n\nfunction simple_gcd(a, b){\n /* a fits into a long, so b must too */\n $B.nb_simple_gcd++\n var x = a >= 0 ? a : -a,\n y = b >= 0 ? b : -b\n\n /* usual Euclidean algorithm for longs */\n while (y != 0) {\n t = y;\n y = x % y;\n x = t;\n }\n return x\n}\n\nfunction lgcd(x, y){\n var a, b, c, d\n if(x < y){\n return lgcd(y, x)\n }\n var shift = BigInt(Math.max(Math.floor(bit_length(x) / 64),\n Math.floor(bit_length(y) / 64))),\n xbar = x >> (shift * 64n),\n ybar = y >> (shift * 64n)\n while(y > p2_64){\n [a, b, c, d] = [1n, 0n, 0n, 1n]\n while(ybar + c != 0 && ybar + d != 0){\n q = (xbar + a) / (ybar + c)\n p = (xbar + b) / (ybar + d)\n if(q != p){\n break\n }\n [a, c] = [c, a - q * c]\n [b, d] = [d, b - q * d]\n [xbar, ybar] = [ybar, xbar - q * ybar]\n }\n if(b == 0){\n [x, y] = [y, x % y]\n }else{\n [x, y] = [a * x + b * y, c * x + d * y]\n }\n }\n return simple_gcd(x, y)\n}\n\nfunction xgcd(x, y){\n var xneg = x < 0 ? -1n : 1n,\n yneg = y < 0 ? -1n : 1n,\n last_r,\n last_s,\n last_t,\n q, r, s, t;\n\n [x, y] = [x >= 0 ? x : -x, y >= 0 ? y : -y];\n\n // it's maintained that r = s * x + t * y, last_r = last_s * x + last_t * y\n [last_r, r] = [x, y];\n [last_s, s] = [1n, 0n];\n [last_t, t] = [0n, 1n];\n\n while(r > 0){\n q = last_r / r;\n [last_r, r] = [r, last_r - q * r];\n [last_s, s] = [s, last_s - q * s];\n [last_t, t] = [t, last_t - q * t];\n }\n return [last_r, last_s * xneg, last_t * yneg]\n}\n\nfunction lxgcd(x, y){\n var g, cy, cx,\n s, last_s,\n t, last_t,\n a, b, c, d\n x = x >= 0 ? x : -x\n y = y >= 0 ? y : -y\n\n if(x < y){\n [g, cy, cx] = xgcd(y, x)\n return [g, cx, cy]\n }\n\n var shift = BigInt(Math.max(Math.floor(bit_length(x) / 64),\n Math.floor(bit_length(y) / 64))),\n xbar = x >> (shift * 64n),\n ybar = y >> (shift * 64n);\n\n [last_s, s] = [1n, 0n];\n [last_t, t] = [0n, 1n];\n\n while(y > p2_64){\n [a, b, c, d] = [1n, 0n, 0n, 1n]\n while(ybar + c != 0 && ybar + d != 0){\n q = (xbar + a) / (ybar + c)\n p = (xbar + b) / (ybar + d)\n if(q != p){\n break\n };\n [a, c = c], [a - q * c];\n [b, d = d], [b - q * d];\n [xbar, ybar] = [ybar, xbar - q * ybar];\n }\n if(b == 0){\n q = x / y;\n [x, y] = [y, x % y];\n [last_s, s] = [s, last_s - q * s];\n [last_t, t] = [t, last_t - q * t];\n }else{\n [x, y] = [a * x + b * y, c * x + d * y];\n [last_s, s] = [a * last_s + b * s, c * last_s + d * s];\n [last_t, t] = [a * last_t + b * t, c * last_t + d * t];\n }\n }\n // notice that here x, y could be negative\n [g, cx, cy] = xgcd(x, y)\n\n return [g, cx * last_s + cy * s, cx * last_t + cy * t]\n}\n\nfunction gcd(x, y){\n var $ = $B.args(\"gcd\", 0, {}, [], arguments, {}, 'args', null)\n var args = $.args.map($B.PyNumber_Index)\n if(args.length == 0){\n return 0\n }else if(args.length == 1){\n return _b_.abs(args[0])\n }\n x = _b_.int.$to_bigint(args[0])\n y = _b_.int.$to_bigint(args[1])\n var res = lxgcd(x, y)[0],\n i = 2\n while(i < args.length){\n res = lxgcd(res, _b_.int.$to_bigint(args[i]))[0]\n i++\n }\n return _b_.int.$int_or_long(res)\n}\n\n\nfunction hypot(x, y){\n var $ = $B.args(\"hypot\", 0, {}, [],\n arguments, {}, \"args\", null)\n var args = []\n for(var arg of $.args){\n try{\n args.push(float_check(arg))\n }catch(err){\n if($B.is_exc(err, [_b_.ValueError])){\n throw _b_.TypeError.$factory('must be real number, not ' +\n $B.class_name(arg))\n }\n throw err\n }\n }\n return $B.fast_float(Math.hypot(...args))\n}\n\nvar inf = INF\n\nfunction isclose(){\n var $ = $B.args(\"isclose\",\n 4,\n {a: null, b: null, rel_tol: null, abs_tol: null},\n ['a', 'b', 'rel_tol', 'abs_tol'],\n arguments,\n {rel_tol: $B.fast_float(1e-09),\n abs_tol: $B.fast_float(0.0)},\n '*',\n null)\n var a = float_check($.a),\n b = float_check($.b),\n rel_tol = float_check($.rel_tol),\n abs_tol = float_check($.abs_tol)\n\n if(rel_tol < 0.0 || abs_tol < 0.0){\n throw _b_.ValueError.$factory('tolerances must be non-negative')\n }\n\n if(a == b){\n return _b_.True\n }\n if(_b_.float.$funcs.isinf(a) || _b_.float.$funcs.isinf(b)){\n return a === b\n }\n // isclose(a, b, rel_tol, abs_tol) is the same as\n // abs_diff = abs(a - b)\n // max_ab = max(abs(a), abs(b))\n // abs_diff <= abs_tol or abs_diff / max_ab <= rel_tol\n // This is more correct than in Python docs:\n // \"abs(a-b) <= max(rel_tol * max(abs(a), abs(b)), abs_tol)\"\n // because this fails for Decimal instances, which do not support\n // multiplication by floats\n\n var diff = b - a,\n abs_diff = Math.abs(diff)\n if(abs_diff <= abs_tol){\n return true\n }\n var abs_a = Math.abs(a),\n abs_b = Math.abs(b),\n max_ab = Math.max(abs_a, abs_b)\n return abs_diff / max_ab <= rel_tol\n}\n\nfunction isfinite(x){\n $B.check_nb_args('isfinite', 1, arguments)\n $B.check_no_kw('isfinite', x)\n return isFinite(float_check(x))\n}\n\nfunction isinf(x){\n $B.check_nb_args('isinf', 1, arguments)\n $B.check_no_kw('isinf', x)\n return _b_.float.$funcs.isinf(x)\n}\n\nfunction isnan(x){\n $B.check_nb_args('isnan', 1, arguments)\n $B.check_no_kw('isnan', x)\n return isNaN(float_check(x))\n}\n\nfunction isqrt(x){\n $B.check_nb_args_no_kw('isqrt', 1, arguments)\n\n x = $B.PyNumber_Index(x)\n if($B.rich_comp(\"__lt__\", x, 0)){\n throw _b_.ValueError.$factory(\n \"isqrt() argument must be nonnegative\")\n }\n if(typeof x == \"number\"){\n return Math.floor(Math.sqrt(x))\n }else{ // big integer\n // adapted from code in mathmodule.c\n var n = x.value,\n bit_length = n.toString(2).length,\n c = BigInt(Math.floor((bit_length - 1) / 2)),\n c_bit_length = c.toString(2).length,\n a = 1n,\n d = 0n,\n e\n\n for(var s = BigInt(c_bit_length - 1); s >= 0; s--){\n // Loop invariant: (a-1)**2 < (n >> 2*(c - d)) < (a+1)**2\n e = d\n d = c >> s\n a = (a << d - e - 1n) + (n >> 2n*c - e - d + 1n) / a\n }\n return _b_.int.$int_or_long(a - (a * a > n ? 1n : 0n))\n }\n}\n\nfunction lcm(){\n var $ = $B.args(\"lcm\", 0, {}, [], arguments, {}, 'args', null),\n product = 1\n\n var args = $.args.map($B.PyNumber_Index)\n if(args.length == 0){\n return 1\n }else if(args.length == 1){\n return _b_.abs(args[0])\n }\n var a = _b_.abs(args[0]),\n b,\n product, gcd\n for(var i = 0, len = args.length; i < len; i++){\n b = _b_.abs(args[i])\n if(b == 0){\n return 0\n }\n gcd = gcd2(a, b)\n product = $B.rich_op('__mul__', a, b)\n a = $B.$getattr(product, \"__floordiv__\")(gcd)\n }\n return a\n}\n\nfunction ldexp(x, i){\n $B.check_nb_args('ldexp', 2, arguments)\n $B.check_no_kw('ldexp', x, i)\n return _b_.float.$funcs.ldexp(x, i) // in py_float.js\n}\n\nfunction lgamma(x){\n $B.check_nb_args('lgamma', 1, arguments)\n $B.check_no_kw('lgamma', x)\n\n return m_lgamma(x)\n}\n\nfunction longint_mant_exp(long_int){\n // Returns mantissa and exponent of a long integer\n var value = long_int.value,\n exp = value.toString(2).length,\n exp1 = exp,\n nb = 0n\n // 2 ** exp is infinite if n > 1023\n var nb = Math.floor(exp / 1023),\n exp1 = BigInt(exp - 1023 * nb)\n nb = BigInt(nb)\n var reduced_value = long_int.value / 2n ** (nb * 1023n)\n var mant = Number(reduced_value) / Number(2n ** exp1)\n return [mant, exp]\n}\n\nvar log10_func = Math.log10 || (x => Math.log(x) / Math.log(10)),\n log2_func = Math.log2 || (x => Math.log(x) / Math.log(2))\n\nfunction log(x, base){\n var $ = $B.args(\"log\", 2, {x: null, base: null}, ['x', 'base'],\n arguments, {base: _b_.None}, null, null),\n x = $.x,\n base = $.base\n if(base == 10){\n return log10(x)\n }else if(base == 2){\n return log2(x)\n }\n var log\n if(_b_.isinstance(x, $B.long_int)){\n if(x.value <= 0){\n throw _b_.ValueError.$factory('math domain error')\n }\n var mant_exp = longint_mant_exp(x)\n log = Math.log(mant_exp[0]) + Math.log(2) * mant_exp[1]\n }else if(_b_.isinstance(x, _b_.int)){\n x = _b_.int.$int_value(x)\n if(x <= 0){\n throw _b_.ValueError.$factory('math domain error')\n }\n log = Math.log(x)\n }else{\n var x1 = float_check(x)\n if(x1 <= 0){\n throw _b_.ValueError.$factory('math domain error')\n }\n log = Math.log(x1)\n }\n if(x1 <= 0){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n if(base === _b_.None){\n return $B.fast_float(log)\n }\n var denom = _mod.log(base).value\n if(denom == 0){\n throw _b_.ZeroDivisionError.$factory('float division by zero')\n }\n return $B.fast_float(log / denom)\n}\n\nfunction log1p(x){\n $B.check_nb_args('log1p', 1, arguments)\n $B.check_no_kw('log1p', x)\n if(_b_.isinstance(x, $B.long_int)){\n if($B.long_int.bit_length(x) > 1024){\n throw _b_.OverflowError.$factory(\n \"int too large to convert to float\")\n }\n x = $B.long_int.$log2($B.fast_long_int(x.value + 1n))\n return $B.fast_float(Number(x.value) * Math.LN2)\n }\n x = float_check(x)\n if(x + 1 <= 0){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n return $B.fast_float(Math.log1p(x))\n}\n\nfunction log2(x){\n $B.check_nb_args('log2', 1, arguments)\n $B.check_no_kw('log2', x)\n var log2_func = Math.log2 || (x => Math.log(x) / Math.LN2)\n if(_b_.isinstance(x, $B.long_int)){\n if(x.value <= 0){\n throw _b_.ValueError.$factory('math domain error')\n }\n var mant_exp = longint_mant_exp(x)\n return $B.fast_float(log2_func(mant_exp[0]) + mant_exp[1])\n }\n if(_b_.float.$funcs.isninf(x)){\n throw _b_.ValueError.$factory('')\n }\n x = float_check(x)\n if(x == 0){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n if(isNaN(x)){\n return _b_.float.$factory('nan')\n }\n if(x < 0.0){\n throw _b_.ValueError.$factory('math domain error')\n }\n return $B.fast_float(log2_func(x))\n}\n\nfunction log10(x){\n $B.check_nb_args('log10', 1, arguments)\n $B.check_no_kw('log10', x)\n if(_b_.isinstance(x, $B.long_int)){\n return $B.fast_float($B.long_int.$log10(x).value)\n }\n x = float_check(x)\n if(x <= 0){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n return $B.fast_float(Math.log10(x))\n}\n\nfunction modf(x){\n $B.check_nb_args('modf', 1, arguments)\n $B.check_no_kw('modf', x)\n\n if(_b_.float.$funcs.isninf(x)){\n return _b_.tuple.$factory([0.0, NINF])\n }\n if(_b_.float.$funcs.isinf(x)){\n return _b_.tuple.$factory([0.0, INF])\n }\n var x1 = float_check(x)\n\n if(isNaN(x1)){\n return _b_.tuple.$factory([_b_.float.$factory('nan'),\n _b_.float.$factory('nan')])\n }\n\n if(x1 > 0){\n var i = _b_.float.$factory(x1 - Math.floor(x1))\n return _b_.tuple.$factory([i, _b_.float.$factory(x1 - i.value)])\n }\n\n var x2 = Math.ceil(x1)\n var i = _b_.float.$factory(x1 - x2)\n return _b_.tuple.$factory([i, _b_.float.$factory(x2)])\n}\n\nvar nan = _b_.float.$factory('nan')\n\nfunction nextafter(){\n var $ = $B.args(\"nextafter\", 2, {x: null, y: null}, ['x', 'y'],\n arguments, {}, null, null),\n x = $.x,\n y = $.y\n return y < x ? -nextUp(-x) : (y > x ? nextUp(x) : (x !== x ? x : y))\n}\n\nfunction perm(n, k){\n var $ = $B.args(\"perm\", 2, {n: null, k: null}, ['n', 'k'],\n arguments, {k: _b_.None}, null, null),\n n = $.n,\n k = $.k\n\n if(k === _b_.None){\n check_int(n)\n return _mod.factorial(n)\n }\n // raise TypeError if n or k is not an integer\n n = $B.PyNumber_Index(n)\n k = $B.PyNumber_Index(k)\n\n // transform to Javascript BigInt\n var n1 = _b_.int.$to_bigint(n),\n k1 = _b_.int.$to_bigint(k);\n\n if(k1 < 0){\n throw _b_.ValueError.$factory(\"k must be a non-negative integer\")\n }\n if(n1 < 0){\n throw _b_.ValueError.$factory(\"n must be a non-negative integer\")\n }\n if(k1 == 0){\n return 1\n }\n if(k1 == 1){\n return n\n }\n if(k1 == 2){\n return _b_.int.$int_or_long(n1 * (n1 - 1n))\n }\n if(k1 > n1){\n return 0\n }\n // Evaluates to n! / (n - k)!\n var fn = _mod.factorial(n),\n fn_k = _mod.factorial(n - k)\n return $B.rich_op('__floordiv__', fn, fn_k)\n}\n\nconst pi = $B.fast_float(Math.PI)\n\nfunction pow(){\n var $ = $B.args(\"pow\", 2, {base: null, exp: null}, ['base', 'exp'],\n arguments, {}, null, null),\n x = $.base,\n y = $.exp\n\n var x1 = float_check(x)\n var y1 = float_check(y)\n\n if(y1 == 0){\n return _b_.float.$factory(1)\n }\n if(x1 == 0 && y1 < 0){\n if(y1 === -Infinity){\n return INF\n }\n throw _b_.ValueError.$factory('math domain error')\n }\n if(isFinite(x1) && x1 < 0 && isFinite(y1) && ! Number.isInteger(y1)){\n throw _b_.ValueError.$factory('math domain error')\n }\n\n if(isNaN(y1)){\n if(x1 == 1){return _b_.float.$factory(1)}\n return NAN\n }\n if(x1 == 0){\n return ZERO\n }\n\n if(_b_.float.$funcs.isninf(y)){\n if(_b_.float.$funcs.isinf(x)){ // pow(INF, NINF) = 0.0\n return ZERO\n }else if(_b_.float.$funcs.isninf(x)){ // pow(NINF, NINF) = 0.0\n return ZERO\n }\n if(x1 == 1 || x1 == -1){return _b_.float.$factory(1)}\n if(x1 < 1 && x1 > -1){return INF}\n return ZERO\n }\n if(_b_.float.$funcs.isinf(y)){\n if(_b_.float.$funcs.isinf(x)){ // pow(INF, INF)\n return INF\n }\n if(_b_.float.$funcs.isninf(x)){\n return INF\n }\n if(x1 == 1 || x1 == -1){return _b_.float.$factory(1)}\n if(x1 < 1 && x1 > -1){return ZERO}\n return INF\n }\n\n if(isNaN(x1)){return _b_.float.$factory('nan')}\n if(_b_.float.$funcs.isninf(x)){\n if(y1 > 0 && isOdd(y1)){return NINF}\n if(y1 > 0){return INF} // this is even or a float\n if(y1 < 0){return ZERO}\n if(_b_.float.$float.isinf(y)){return INF}\n return _b_.float.$factory(1)\n }\n\n if(_b_.float.$funcs.isinf(x)){\n if(y1 > 0){return INF}\n if(y1 < 0){return ZERO}\n return _b_.float.$factory(1)\n }\n\n var r = Math.pow(x1, y1)\n if(isNaN(r)){\n return NAN\n }\n if(! isFinite(r)){\n overflow()\n }\n return _b_.float.$factory(r)\n}\n\nfunction prod(){\n var $ = $B.args(\"prod\", 1, {iterable:null, start:null},\n [\"iterable\", \"start\"], arguments, {start: 1}, \"*\",\n null),\n iterable = $.iterable,\n start = $.start\n var res = start,\n it = _b_.iter(iterable),\n x\n while(true){\n try{\n x = _b_.next(it)\n if(x == 0){\n return 0\n }\n res = $B.rich_op('__mul__', res, x)\n }catch(err){\n if(err.__class__ === _b_.StopIteration){\n return res\n }\n throw err\n }\n }\n}\n\nfunction radians(x){\n $B.check_nb_args('radians', 1, arguments)\n $B.check_no_kw('radians', x)\n\n return _b_.float.$factory(float_check(x) * Math.PI / 180)\n}\n\nfunction is_finite(x){\n return typeof x == \"number\" ||\n (x.__class__ === _b_.floar && isFinite(x.value)) ||\n _b_.isinstance(x, _b_.int) ||\n (_b_.isinstance(x, _b_.float) && isFinite(x.value))\n}\n\nfunction remainder(x, y){\n $B.check_nb_args_no_kw('remainder', 2, arguments)\n float_check(x) // might raise TypeError\n /* Deal with most common case first. */\n if(is_finite(x) && is_finite(y)){\n var absx,\n absy,\n c,\n m,\n r;\n\n if(float_check(y) == 0.0){\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n\n absx = fabs(x);\n absy = fabs(y);\n m = fmod(absx, absy);\n\n c = absy.value - m.value\n if(m.value < c){\n r = m.value\n }else if(m.value > c){\n r = -c\n }else{\n r = m.value -\n 2.0 * fmod($B.fast_float(0.5 * (absx.value - m.value)), absy).value;\n }\n return $B.fast_float(copysign(1.0, x).value * r);\n }\n\n /* Special values. */\n if(float_check(y) == 0){\n if(isnan(x)){\n return x\n }\n }\n if(isinf(x)){\n if(isnan(y)){\n return y\n }\n throw _b_.ValueError.$factory(\"math domain error\")\n }\n if(isnan(y)){\n return y;\n }\n return x;\n}\n\nfunction sin(x){\n $B.check_nb_args('sin ', 1, arguments)\n $B.check_no_kw('sin ', x)\n return _b_.float.$factory(Math.sin(float_check(x)))\n}\n\nfunction sinh(x) {\n $B.check_nb_args('sinh', 1, arguments)\n $B.check_no_kw('sinh', x)\n\n var y = float_check(x)\n if(Math.sinh !== undefined){\n return _b_.float.$factory(Math.sinh(y))\n }\n return _b_.float.$factory(\n (Math.pow(Math.E, y) - Math.pow(Math.E, -y)) / 2)\n}\n\nfunction sqrt(x){\n $B.check_nb_args('sqrt ', 1, arguments)\n $B.check_no_kw('sqrt ', x)\n\n if(_b_.float.$funcs.isninf(x)){\n value_error()\n }else if(_b_.float.$funcs.isinf(x)){\n return INF\n }\n var y = float_check(x)\n if(y < 0){\n value_error()\n }\n var _r = $B.fast_float(Math.sqrt(y))\n if(_b_.float.$funcs.isinf(_r)){\n overflow()\n }\n return _r\n}\n\nfunction tan(x) {\n $B.check_nb_args('tan', 1, arguments)\n $B.check_no_kw('tan', x)\n\n var y = float_check(x)\n return _b_.float.$factory(Math.tan(y))\n}\n\nfunction tanh(x) {\n $B.check_nb_args('tanh', 1, arguments)\n $B.check_no_kw('tanh', x)\n\n var y = float_check(x)\n if(Math.tanh !== undefined){return _b_.float.$factory(Math.tanh(y))}\n return _b_.float.$factory((Math.pow(Math.E, y) - Math.pow(Math.E, -y))/\n (Math.pow(Math.E, y) + Math.pow(Math.E, -y)))\n}\n\nconst tau = $B.fast_float(2 * Math.PI)\n\nfunction trunc(x) {\n $B.check_nb_args('trunc', 1, arguments)\n $B.check_no_kw('trunc', x)\n\n try{return $B.$getattr(x, '__trunc__')()}catch(err){}\n var x1 = float_check(x)\n if(!isNaN(parseFloat(x1)) && isFinite(x1)){\n if(Math.trunc !== undefined){return _b_.int.$factory(Math.trunc(x1))}\n if(x1 > 0){return _b_.int.$factory(Math.floor(x1))}\n return _b_.int.$factory(Math.ceil(x1)) // x1 < 0\n }\n throw _b_.ValueError.$factory(\n 'object is not a number and does not contain __trunc__')\n}\n\nfunction ulp(){\n var $ = $B.args(\"ulp\", 1, {x: null}, ['x'], arguments, {}, null, null),\n x = $.x\n if(_b_.isinstance(x, _b_.float)){\n if(_b_.float.$funcs.isinf(x)){\n return _mod.inf\n }else if(_b_.float.$funcs.isnan(x)){\n return _mod.nan\n }\n }\n if(typeof x == \"number\"){\n return x >= 0 ? $B.fast_float(nextUp(x) - x) :\n $B.fast_float(x - (-nextUp(-x)))\n }else if(_b_.isinstance(x, $B.long_int)){\n x = Number(_b_.int.$to_bigint(x))\n return x > 0 ? $B.fast_float(nextUp(x) - x) :\n $B.fast_float(x - (-nextUp(-x)))\n }else{\n if($B.rich_comp('__ge__', x, 0)){\n return $B.rich_op('__sub__', $B.fast_float(nextUp(x.value)), x)\n }else{\n var neg_x = $B.$call($B.$getattr(x, \"__neg__\"))()\n return $B.rich_op('__sub__', x,\n $B.$call($B.$getattr($B.fast_float(nextUp(neg_x.value)), '__neg__'))())\n }\n }\n}\n\nvar _mod = {\n __getattr__,\n acos,\n acosh,\n asin,\n asinh,\n atan,\n atan2,\n atanh,\n cbrt,\n ceil,\n comb,\n copysign,\n cos,\n cosh,\n degrees,\n dist,\n e,\n erf,\n erfc,\n exp,\n exp2,\n expm1,\n fabs,\n factorial,\n floor,\n fmod,\n frexp,\n fsum,\n gamma,\n gcd,\n hypot,\n inf,\n isclose,\n isfinite,\n isinf,\n isnan,\n isqrt,\n lcm,\n ldexp,\n lgamma,\n log,\n log1p,\n log2,\n log10,\n modf,\n nan,\n nextafter,\n perm,\n pi,\n pow,\n prod,\n radians,\n remainder,\n sin,\n sinh,\n sqrt,\n tan,\n tanh,\n tau,\n trunc,\n ulp\n}\n\nfor(var $attr in _mod){\n if(typeof _mod[$attr] === 'function'){\n _mod[$attr].__class__ = $B.builtin_function_or_method\n }\n}\n\nreturn _mod\n\n})(__BRYTHON__)\n"], "modulefinder": [".js", "var $module=(function($B){\n\nvar _b_=$B.builtins\nvar _mod = {}\n\n$ModuleFinderDict = {__class__:_b_.type,__name__:'ModuleFinder'}\n$ModuleFinderDict.__mro__ = [_b_.object]\n\n$ModuleFinderDict.run_script = function(self, pathname){\n // pathname is the url of a Python script\n var py_src = _b_.$open(pathname).read()\n // transform into internal Brython tree structure\n var root = $B.py2js(py_src)\n // walk the tree to find occurences of imports\n function walk(node){\n var modules = []\n var ctx = node.context\n if(ctx && ctx.type=='node'){ctx = ctx.tree[0]}\n\n if(ctx && ctx.type==\"import\"){\n for(var i=0, _len_i = ctx.tree.length; i < _len_i;i++){\n if(modules.indexOf(ctx.tree[i].name)==-1){\n modules.push(ctx.tree[i].name)\n }\n }\n }else if(ctx && ctx.type==\"from\"){\n if(modules.indexOf(ctx.module)==-1){\n modules.push(ctx.module)\n }\n }\n \n for(var i=0, _len_i = node.children.length; i < _len_i;i++){\n mods = walk(node.children[i])\n for(var j=0, _len_j = mods.length; j < _len_j;j++){\n if(modules.indexOf(mods[j])==-1){modules.push(mods[j])}\n }\n }\n return modules\n }\n self.modules = walk(root)\n}\n\n_mod.ModuleFinder = function(){return {__class__:$ModuleFinderDict}\n}\n_mod.ModuleFinder.$dict = $ModuleFinderDict\n_mod.ModuleFinder.__class__ = $B.$factory\n$ModuleFinderDict.$factory = _mod.ModuleFinder\n\nreturn _mod\n})(__BRYTHON__)\n"], "posix": [".js", "/*\nThis module provides access to operating system functionality that is\nstandardized by the C Standard and the POSIX standard (a thinly\ndisguised Unix interface). Refer to the library manual and\ncorresponding Unix manual entries for more information on calls.\n*/\n\nvar $B = __BRYTHON__,\n _b_ = $B.builtins\n\nfunction _randint(a, b){\n return parseInt(Math.random() * (b - a + 1) + a)\n}\n\nvar stat_result = $B.make_class(\"stat_result\",\n function(filename){\n if($B.file_cache && $B.file_cache.hasOwnProperty(filename)){\n var f = $B.file_cache[filename],\n res = {\n __class__: stat_result,\n st_atime: __BRYTHON__.timestamp,\n st_ctime: f.ctime,\n st_mtime: f.mtime,\n st_uid: -1,\n st_gid: -1,\n st_ino: -1,\n st_mode: 0,\n st_size: f.length\n };\n [\"mtime\", \"ctime\", \"atime_ns\", \"mtime_ns\", \"ctime_ns\"].\n forEach(function(item){\n res[\"st_\" + item] = res.st_atime\n });\n return res\n }else{\n try{\n var xhr = new XMLHttpRequest()\n }catch(err){\n console.log('err', filename, err.message)\n console.log('stack', $B.frames_stack.slice())\n throw err\n }\n xhr.open('HEAD', filename, false)\n console.log('send head', $B.frames_stack.slice())\n var infos = {}\n xhr.onreadystatechange = function(){\n if(this.readyState == 4){\n var res = {\n __class__: stat_result,\n st_atime: __BRYTHON__.timestamp,\n st_uid: -1,\n st_gid: -1,\n st_ino: -1,\n st_mode: filename.endsWith('/') ? 16895 : 33206,\n st_size: this.getResponseHeader('content-length')\n };\n [\"mtime\", \"ctime\", \"atime_ns\", \"mtime_ns\", \"ctime_ns\"].\n forEach(function(item){\n res[\"st_\" + item] = res.st_atime\n });\n infos.value = res\n $B.file_cache[filename] = this.responseText\n }\n }\n xhr.send()\n return infos.value\n }\n }\n)\n$B.set_func_names(stat_result, \"posix\")\n\nvar $module = {\n F_OK: 0,\n O_APPEND: 8,\n O_BINARY: 32768,\n O_CREAT: 256,\n O_EXCL: 1024,\n O_NOINHERIT: 128,\n O_RANDOM: 16,\n O_RDONLY: 0,\n O_RDWR: 2,\n O_SEQUENTIAL: 32,\n O_SHORT_LIVED: 4096,\n O_TEMPORARY: 64,\n O_TEXT: 16384,\n O_TRUNC: 512,\n O_WRONLY: 1,\n P_DETACH: 4,\n P_NOWAIT: 1,\n P_NOWAITO: 3,\n P_OVERLAY: 2,\n P_WAIT: 0,\n R_OK: 4,\n TMP_MAX: 32767,\n W_OK: 2,\n X_OK: 1,\n _have_functions: ['MS_WINDOWS'],\n environ: _b_.dict.$factory(\n [['PYTHONPATH', $B.brython_path],\n ['PYTHONUSERBASE', ' ']]),\n error: _b_.OSError,\n fspath: function(path){\n return path\n },\n getcwd: function(){return $B.brython_path},\n getpid: function(){return 0},\n lstat: function(filename){\n return stat_result.$factory(filename)\n },\n open: function(path, flags){return _b_.open(path, flags)},\n stat: function(filename){return stat_result.$factory(filename)},\n stat_result: function(filename){return stat_result.$factory(filename)},\n urandom: function(n){\n const randbytes = new Uint8Array(n);\n crypto.getRandomValues(randbytes);\n return _b_.bytes.$factory(Array.from(randbytes));\n },\n WTERMSIG: function(){return 0},\n WNOHANG: function(){return _b_.tuple.$factory([0, 0])}\n};\n\n[\"WCOREDUMP\", \"WIFCONTINUED\", \"WIFSTOPPED\", \"WIFSIGNALED\", \"WIFEXITED\"].forEach(function(funcname){\n $module[funcname] = function(){return false}\n });\n\n[\"WEXITSTATUS\", \"WSTOPSIG\", \"WTERMSIG\"].\n forEach(function(funcname){\n $module[funcname] = function(){return _b_.None}\n });\n\n[\"_exit\", \"_getdiskusage\", \"_getfileinformation\", \"_getfinalpathname\",\n \"_getfullpathname\", \"_isdir\", \"abort\", \"access\", \"chdir\", \"chmod\",\n \"close\", \"closerange\", \"device_encoding\", \"dup\", \"dup2\",\n \"execv\", \"execve\", \"fsat\", \"fsync\", \"get_terminal_size\", \"getcwdb\",\n \"getlogin\", \"getppid\", \"isatty\", \"kill\", \"link\", \"listdir\", \"lseek\",\n \"mkdir\", \"pipe\", \"putenv\", \"read\", \"readlink\", \"remove\", \"rename\",\n \"replace\", \"rmdir\", \"spawnv\", \"spawnve\", \"startfile\", \"stat_float_times\",\n \"statvfs_result\", \"strerror\", \"symlink\", \"system\", \"terminal_size\",\n \"times\", \"times_result\", \"umask\", \"uname_result\", \"unlink\", \"utime\",\n \"waitpid\", \"write\"].forEach(function(funcname){\n $module[funcname] = function(){\n throw _b_.NotImplementedError.$factory(\"posix.\" + funcname +\n \" is not implemented\")\n }\n });\n"], "python_re": [".js", "// Regular expression\n\n\nvar _debug = {value: 0}\n\nvar $B = __BRYTHON__,\n _b_ = $B.builtins\n\nvar MAXGROUPS = 2147483647,\n MAXREPEAT = 2147483648\n\nvar is_word = {}\nvar word_gcs = ['Ll', 'Lu', 'Lm', 'Lt', 'Lo',\n 'Nd',\n 'Mc', 'Me', 'Mn',\n 'Pc']\nfor(var word_gc of word_gcs){\n for(var cp in $B.unicode_tables[word_gc]){\n is_word[cp] = true\n }\n}\n\nvar is_ascii_word = {}\n\nfor(var cp = 0; cp <= 127; cp++){\n if(is_word[cp]){\n is_ascii_word[cp] = true\n }\n}\n\nvar is_digit = {}\n\nfor(var cp in $B.unicode_tables['Nd']){\n is_digit[cp] = true\n}\n\nvar is_ascii_digit = {}\n\nfor(var cp = 0; cp <= 127; cp++){\n if(is_digit[cp]){\n is_ascii_digit[cp] = true\n }\n}\n\nvar $error_2 = {\n $name: \"error\",\n $qualname: \"error\",\n $is_class: true,\n __module__: \"re\"\n}\n\nvar error = $B.make_class(\"error\",\n function(message){\n return {\n __class__: error,\n msg: message,\n args: $B.fast_tuple([]),\n __cause__: _b_.None,\n __context__: _b_.None,\n __suppress_context__: false\n }\n })\nerror.__bases__ = [_b_.Exception, _b_.object]\nerror.__mro__ = [_b_.Exception, _b_.BaseException, _b_.object]\n\nerror.__str__ = function(self){\n var s = self.msg + ' at position ' + self.pos\n if(self.lineno > 1){\n s += ` (line ${self.lineno}, column ${self.colno})`\n }\n return s\n}\n\n$B.set_func_names(error, \"re\")\n\nfunction $last(t){\n return t[t.length - 1]\n}\n\nfunction fail(message, pos, pattern){\n var err = error.$factory(message)\n err.msg = message\n err.pos = pos\n if(pattern){\n err.pattern = pattern.py_obj // Python object passed to compile()\n err.lineno = 1\n var linestart = 0\n for(var i = 0, len = pattern.string.length; i < pos; i++){\n if(pattern.string[i] == '\\n'){\n err.lineno++\n linestart = i + 1\n }\n }\n err.colno = pos - linestart + 1\n }\n throw err\n}\n\nfunction warn(klass, message, pos, text){\n var frame = $B.last($B.frames_stack),\n file = frame[3].__file__,\n src = $B.file_cache[file]\n if(text === undefined){\n var lineno = frame[1].$lineno\n var lines = src.split('\\n'),\n line = lines[lineno - 1]\n }else{\n if(Array.isArray(text)){\n text = from_codepoint_list(text)\n }\n var lineno = 1,\n line_start = 0\n for(var i = 0; i < pos; i++){\n if(text[i] == '\\n'){\n lineno++\n line_start = i + 1\n }\n }\n var line_end = text.substr(line_start).search('\\n'),\n line\n if(line_end == -1){\n line = text.substr(line_start)\n }else{\n line = text.substr(line_start, line_end)\n }\n var col_offset = pos - line_start\n }\n var warning = klass.$factory(message)\n warning.pos = pos\n warning.args[1] = [file, lineno, col_offset, lineno, col_offset,\n line]\n warning.filename = file\n warning.lineno = warning.end_lineno = lineno\n warning.offset = warning.end_offset = col_offset\n warning.line = line\n // module _warning is in builtin_modules.js\n $B.imported._warnings.warn(warning)\n}\n\nfunction chr(i){\n if(i < 0 || i > 1114111){\n throw _b_.ValueError.$factory('Outside valid range')\n }else if(i >= 0x10000 && i <= 0x10FFFF){\n var code = (i - 0x10000)\n return String.fromCodePoint(0xD800 | (code >> 10)) +\n String.fromCodePoint(0xDC00 | (code & 0x3FF))\n }else{\n return String.fromCodePoint(i)\n }\n}\n\nfunction ord(char){\n return char.charCodeAt(0)\n}\n\nconst LETTERS = {\n b: ord('b'),\n N: ord('N'),\n P: ord('P'),\n u: ord('u'),\n U: ord('U'),\n x: ord('x')\n}\n\nconst PARENTH_OPEN = ord('('),\n PARENTH_CLOSE = ord(')'),\n BRACKET_OPEN = ord('['),\n BRACKET_CLOSE = ord(']'),\n BRACE_OPEN = ord('{'),\n BRACE_CLOSE = ord('}'),\n EQUAL = ord('='),\n SUP = ord('>'),\n INF = ord('<'),\n MINUS = ord('-'),\n PLUS = ord('+'),\n OR = ord('|'),\n DOT = ord('.'),\n QUESTION_MARK = ord('?'),\n EXCLAMATION_MARK = ord('!'),\n COLON = ord(':'),\n BACKSLASH = ord('\\\\'),\n DOLLAR = ord('$'),\n CARET = ord('^'),\n LINEFEED = ord('\\n')\n\n// pattern tokenizer\n\nfunction is_ascii(name){\n return /^[\\x00-\\x7F]*$/.test(name)\n}\n\nfunction open_unicode_db(){\n if($B.unicodedb === undefined){\n var xhr = new XMLHttpRequest\n xhr.open(\"GET\",\n $B.brython_path + \"unicode.txt?\" + (new Date()).getTime(), false)\n xhr.onreadystatechange = function(){\n if(this.readyState == 4){\n if(this.status == 200){\n $B.unicodedb = this.responseText\n }else{\n console.log(\n \"Warning - could not load unicode.txt\")\n }\n }\n }\n xhr.send()\n }\n}\n\nfunction validate_named_char(description, pos){\n // validate that \\N{} is in the Unicode db\n // Load unicode table if not already loaded\n if(description.length == 0){\n fail(\"missing character name\", pos)\n }\n open_unicode_db()\n if($B.unicodedb !== undefined){\n var re = new RegExp(\"^([0-9A-F]+);\" +\n description.toUpperCase() + \";.*$\", \"m\")\n search = re.exec($B.unicodedb)\n if(search === null){\n fail(`undefined character name '${description}'`, pos)\n }\n return parseInt(search[1], 16)\n }else{\n fail(\"could not load unicode.txt\", pos)\n }\n}\n\nfunction validate_group_name(sname, pos, is_bytes){\n // sname is an instance of StringObj\n if(! _b_.str.isidentifier(sname.string)){\n fail(`bad character in group name '${sname.string}'`, pos + 4)\n }\n if(is_bytes && ! is_ascii(sname.string)){\n var s = _b_.bytes.decode(_b_.bytes.$factory(sname.codepoints),\n 'ascii', 'backslashreplace')\n warn(_b_.DeprecationWarning,\n `bad character in group name '${s}' at position ${pos + 4}`)\n }\n return true\n}\n\nfunction validate_group_num(so, pos){\n var s = so.string\n if(s.match(/^\\d+$/)){\n return true\n }\n try{\n var num = _b_.int.$factory(s)\n warn(_b_.DeprecationWarning,\n `bad character in group name '${s}' at position ${pos + 3}`,\n pos + 3, s)\n so.string = num + ''\n return true\n }catch(err){\n return false\n }\n}\n\nfunction validate_num_or_name(so, pos, is_bytes){\n return validate_group_num(so, pos, is_bytes) ||\n validate_group_name(so, pos - 1, is_bytes)\n}\n\nvar character_classes = {\n in_charset: to_codepoint_list('dDsSwW'),\n in_re: to_codepoint_list('AbBdDsSwWZ')\n}\n\nfunction escaped_char(args){\n var cps = args.codepoints,\n pos = args.pos,\n in_charset = args.in_charset,\n is_bytes = args.is_bytes // if pattern is bytes\n var special = cps[pos + 1]\n if(special === undefined){\n fail('bad escape (end of pattern)', pos)\n }\n var key = in_charset ? 'in_charset' : 'in_re'\n if(in_charset && special == LETTERS.b){\n // Inside a character range, \\b represents the backspace character,\n // for compatibility with Python\u2019s string literals.\n return '\\b'\n }\n if(character_classes[key].indexOf(special) > -1){\n return new CharacterClass(pos, special, 2)\n }else if(special == LETTERS.N && ! is_bytes){\n if(cps[pos + 2] != BRACE_OPEN){\n fail('missing {', pos)\n }\n var i = pos + 3,\n description = []\n while(i < cps.length){\n if(cps[i] == BRACE_CLOSE){\n break\n }\n description.push(cps[i])\n i++\n }\n if(description.length == 0){\n fail(\"missing character name\", pos)\n }\n if(i == cps.length){\n fail(\"missing }, unterminated name\", pos)\n }\n var cp = validate_named_char(from_codepoint_list(description), pos)\n return {\n type: 'N',\n ord: cp,\n char: chr(cp),\n length: i - pos + 1\n }\n }else if(special == LETTERS.x){\n // \\xhh = character with hex value hh\n var rest = from_codepoint_list(cps.slice(pos + 2)),\n mo = /^[0-9a-fA-F]{0,2}/.exec(rest),\n hh = mo ? mo[0] : ''\n if(mo && mo[0].length == 2){\n var cp = parseInt(mo[0], 16)\n return {\n type: 'x',\n ord: cp,\n char: chr(cp),\n length: 2 + mo[0].length\n }\n }\n fail('incomplete escape \\\\x' + hh, pos)\n }else if(special == LETTERS.u){\n // \\uxxxx = character with 16-bit hex value xxxx\n var rest = from_codepoint_list(cps.slice(pos + 2)),\n mo = /^[0-9a-fA-F]{0,4}/.exec(rest),\n xx = mo ? mo[0] : ''\n if(mo && mo[0].length == 4){\n var cp = parseInt(mo[0], 16)\n return {\n type: 'u',\n ord: cp,\n char: chr(cp),\n length: 2 + mo[0].length\n }\n }\n fail('incomplete escape \\\\u' + xx, pos)\n }else if(special == LETTERS.U){\n // \\Uxxxxxxxx = character with 32-bit hex value xxxxxxxx\n var rest = from_codepoint_list(cps.slice(pos + 2)),\n mo = /^[0-9a-fA-F]{0,8}/.exec(rest),\n xx = mo ? mo[0] : ''\n if(mo && mo[0].length == 8){\n var cp = parseInt(mo[0], 16)\n if(cp > 0x10FFFF){\n fail(`bad escape \\\\U${mo[0]}`, pos)\n }\n return {\n type: 'U',\n ord: cp,\n char: chr(cp),\n length: 2 + mo[0].length\n }\n }\n fail('incomplete escape \\\\U' + xx, pos)\n }else{\n // octal ?\n // If the first digit of number is 0, or number is 3 octal digits\n // long, it will not be interpreted as a group match, but as the\n // character with octal value number\n var rest = from_codepoint_list(cps.slice(pos + 1)),\n mo = /^[0-7]{3}/.exec(rest)\n if(in_charset){\n try{\n var res = $B.test_escape(rest, -1)\n if(res){\n return {\n type: 'u',\n ord: res[0].codePointAt(0),\n char: res[0],\n length: res[1]\n }\n }\n }catch(err){\n // ignore\n }\n }\n if(mo == null){\n mo = /^0[0-7]*/.exec(rest)\n }\n if(mo){\n var octal_value = parseInt(mo[0], 8)\n if(octal_value > 0o377){\n fail(`octal escape value \\\\` +\n `${mo[0]} outside of range 0-0o377`, pos)\n }\n return {\n type: 'o',\n ord: octal_value,\n char: chr(octal_value),\n length: 1 + mo[0].length\n }\n }\n var mo = /^\\d{1,2}/.exec(rest) // backref is at most 99\n if(mo){\n return {\n type: 'backref',\n value: parseInt(mo[0]),\n length: 1 + mo[0].length\n }\n }\n var trans = {a: chr(7), f: '\\f', n: '\\n', r: '\\r', t: '\\t', v: '\\v'},\n res = trans[chr(special)]\n if(res){\n return ord(res)\n }\n if(chr(special).match(/[a-zA-Z]/)){\n fail(\"bad escape \\\\\" + chr(special), pos)\n }else{\n return special\n }\n }\n}\n\nfunction check_character_range(t, positions){\n // Check if last 2 items in t are a valid character range\n var start = t[t.length - 2],\n end = t[t.length - 1]\n if(start instanceof CharacterClass || end instanceof CharacterClass){\n fail(`bad character range ${start}-${end}`,\n positions[positions.length - 2])\n }else if(end < start){\n fail(`bad character range ${start}-${end}`,\n positions[positions.length - 2])\n }\n t.splice(t.length - 2, 2, {\n type: 'character_range',\n start: start,\n end: end,\n ord: [start.ord, end.ord]\n })\n}\n\nfunction parse_character_set(text, pos, is_bytes){\n // Parse character set starting at position \"pos\" in \"text\"\n // pos is the position of the leading \"[\"\n var start = pos,\n result = {items: []},\n positions = []\n pos++\n if(text[pos] == CARET){\n result.neg = true\n pos++\n }else if(text[pos] == BRACKET_CLOSE){\n // a leading ] is the character \"]\", not the set end\n result.items.push(']')\n positions.push(pos)\n pos++\n }else if(text[pos] == BRACKET_OPEN){\n // send FutureWarning\n warn(_b_.FutureWarning, \"Possible nested set\", pos, text)\n }\n var range = false\n while(pos < text.length){\n var cp = text[pos],\n char = chr(cp)\n if(char == ']'){\n if(pos == start + 2 && result.neg){\n // in \"[^]]\", the first ] is the character \"]\"\n result.items.push(']')\n }else{\n return [result, pos]\n }\n }\n if(char == '\\\\'){\n var escape = escaped_char({\n codepoints: text,\n pos,\n in_charset: true,\n is_bytes\n })\n if(typeof escape == \"number\"){\n var s = chr(escape)\n escape = {\n ord: escape,\n length: 2,\n toString: function(){\n return s\n }\n }\n }\n if(escape.type == \"num\"){\n // [\\9] is invalid\n fail(\"bad escape 1 \\\\\" +\n escape.value.toString()[0], pos)\n }\n result.items.push(escape)\n positions.push(pos)\n if(range){\n check_character_range(result.items, positions)\n }\n range = false\n pos += escape.length\n }else if(char == '-'){\n // Character range, or character \"-\"\n if(pos == start + 1 ||\n (result.neg && pos == start + 2) ||\n pos == text.length - 2 || // [a-]\n range ||\n (result.items.length > 0 &&\n result.items[result.items.length - 1].type ==\n \"character_range\")){\n result.items.push({\n ord: cp,\n char,\n toString: function(){\n return this.char\n }\n })\n if(text[pos + 1] == cp){\n warn(_b_.FutureWarning, \"Possible set difference\", pos, text)\n }\n pos++\n if(range){\n check_character_range(result.items, positions)\n }\n range = false\n }else{\n range = true\n if(text[pos + 1] == cp){\n warn(_b_.FutureWarning, \"Possible set difference\", pos, text)\n }\n pos++\n }\n }else{\n positions.push(pos)\n result.items.push({\n ord: cp,\n char,\n toString: function(){\n return this.char\n }\n })\n if(range){\n check_character_range(result.items, positions)\n }\n range = false\n // FutureWarning for consecutive \"&\", \"|\" or \"~\"\n if(char == \"&\" && text[pos + 1] == cp){\n warn(_b_.FutureWarning, \"Possible set intersection\", pos, text)\n }else if(char == \"|\" && text[pos + 1] == cp){\n warn(_b_.FutureWarning, \"Possible set union\", pos, text)\n }else if(char == \"~\" && text[pos + 1] == cp){\n warn(_b_.FutureWarning, \"Possible set symmetric difference\",\n pos, text)\n }\n pos++\n }\n }\n fail(\"unterminated character set\", start)\n}\n\nfunction* tokenize(pattern, type, _verbose){\n // pattern is a list of codepoints\n var is_bytes = type == \"bytes\"\n // verbose_stack is the stack of verbose state for each group in the regex\n var verbose_stack = [_verbose],\n verbose = _verbose,\n parenth_pos\n var pos = 0\n while(pos < pattern.length){\n var cp = pattern[pos],\n char = String.fromCharCode(cp)\n if(verbose){\n // current group is in verbose mode\n if(char == \"#\"){\n // skip until next line feed\n while(pos < pattern.length && pattern[pos] != 10){\n pos++\n }\n pos++\n continue\n }else{\n while(pos < pattern.length &&\n [9, 10, 11, 12, 13, 32].indexOf(pattern[pos]) > -1){\n pos++\n }\n }\n cp = pattern[pos]\n if(cp === undefined){\n break\n }\n char = String.fromCharCode(cp)\n if(char == '#'){\n continue\n }\n }\n if(char == '('){\n parenth_pos = pos\n if(pattern[pos + 1] == QUESTION_MARK){\n if(pattern[pos + 2] == LETTERS.P){\n if(pattern[pos + 3] == INF){\n var name = [],\n i = pos + 4\n while(i < pattern.length){\n if(pattern[i] == SUP){\n break\n }else if(pattern[i] == PARENTH_CLOSE){\n fail(\"missing >, unterminated name\", pos)\n }\n name.push(pattern[i])\n i++\n }\n var sname = StringObj.from_codepoints(name)\n validate_group_name(sname, pos, is_bytes)\n name = sname\n if(i == pattern.length){\n fail(\"missing >, unterminated name\", pos)\n }\n yield new Group(pos, {type: 'name_def', value: name})\n verbose_stack.push(verbose)\n pos = i + 1\n continue\n }else if(pattern[pos + 3] == EQUAL){\n var name = [],\n i = pos + 4\n while(i < pattern.length){\n if(pattern[i] == PARENTH_CLOSE){\n break\n }\n name.push(pattern[i])\n i++\n }\n name = StringObj.from_codepoints(name)\n validate_group_name(name, pos, is_bytes)\n if(i == pattern.length){\n fail(\"missing ), unterminated name\", pos)\n }\n yield new BackReference(pos, 'name', name.string)\n pos = i + 1\n continue\n }else if(pattern[pos + 3] === undefined){\n fail(\"unexpected end of pattern\", pos)\n }else{\n fail(\"unknown extension ?P\" + chr(pattern[pos + 3]), pos)\n }\n }else if(pattern[pos + 2] == PARENTH_OPEN){\n var ref = [],\n i = pos + 3\n while(i < pattern.length){\n if(pattern[i] == PARENTH_CLOSE){\n break\n }\n ref.push(pattern[i])\n i++\n }\n var sref = StringObj.from_codepoints(ref)\n if(sref.string.match(/^\\d+$/)){\n ref = parseInt(sref.string)\n }else{\n validate_num_or_name(sref, pos, is_bytes)\n ref = sref.string\n }\n if(i == pattern.length){\n fail(\"missing ), unterminated name\", pos)\n }\n yield new ConditionalBackref(pos, ref)\n pos = i + 1\n continue\n }else if(pattern[pos + 2] == EQUAL){\n // (?=...) : lookahead assertion\n yield new Group(pos, {type: 'lookahead_assertion'})\n verbose_stack.push(verbose)\n pos += 3\n continue\n }else if(pattern[pos + 2] == EXCLAMATION_MARK){\n // (?!...) : negative lookahead assertion\n yield new Group(pos, {type: 'negative_lookahead_assertion'})\n verbose_stack.push(verbose)\n pos += 3\n continue\n }else if(from_codepoint_list(pattern.slice(pos + 2, pos + 4)) == ' -1){\n if(pattern[pos + 2] == MINUS){\n var on_flags = [],\n has_off = true,\n off_flags = []\n pos += 3\n }else{\n var on_flags = [chr(pattern[pos + 2])],\n has_off = false,\n off_flags = [],\n auL = auL_flags.indexOf(pattern[pos + 2]) > -1 ?\n 1 : 0,\n closed = false\n pos += 3\n while(pos < pattern.length){\n if(flags.indexOf(pattern[pos]) > -1){\n if(auL_flags.indexOf(pattern[pos]) > -1){\n auL++\n if(auL > 1){\n fail(\"bad inline flags: flags 'a', 'u'\" +\n \" and 'L' are incompatible\", pos)\n }\n }\n on_flags.push(chr(pattern[pos]))\n pos++\n }else if(pattern[pos] == MINUS){\n has_off = true\n closed = true\n pos++\n break\n }else if(String.fromCharCode(pattern[pos]).\n match(/[a-zA-Z]/)){\n fail(\"unknown flag\", pos)\n }else if(pattern[pos] == PARENTH_CLOSE){\n closed = true\n break\n }else if(pattern[pos] == COLON){\n yield new Group(pos, {name: \"Group\", type: \"flags\"})\n verbose_stack.push(verbose)\n closed = true\n break\n }else{\n fail(\"missing -, : or )\", pos)\n }\n }\n if(! closed){\n fail(\"missing -, : or )\", pos)\n }\n }\n if(has_off){\n while(pos < pattern.length){\n if(flags.indexOf(pattern[pos]) > -1){\n if(auL_flags.indexOf(pattern[pos]) > -1){\n fail(\"bad inline flags: cannot turn off \" +\n \"flags 'a', 'u' and 'L'\", pos)\n }\n if(on_flags.indexOf(chr(pattern[pos])) > -1){\n fail(\"bad inline flags: flag turned on and off\", pos)\n }\n off_flags.push(chr(pattern[pos]))\n pos++\n }else if(pattern[pos] == COLON){\n yield new Group(pos, {name: \"Group\", type: \"flags\"})\n verbose_stack.push(verbose)\n break\n }else if(String.fromCharCode(pattern[pos]).\n match(/[a-zA-Z]/)){\n fail(\"unknown flag\", pos)\n }else if(off_flags.length == 0){\n fail(\"missing flag\", pos)\n }else{\n fail(\"missing :\", pos)\n }\n }\n if(off_flags.length == 0){\n fail(\"missing flag\", pos)\n }\n }\n if(has_off && pattern[pos] != COLON){\n fail(\"missing :\", pos)\n }\n if(on_flags.length == 0 && off_flags.length == 0){\n fail(\"missing flag\", pos)\n }\n var set_flags = new SetFlags(flags_start,\n {on_flags, off_flags})\n\n yield set_flags\n // reset verbose\n if(on_flags.indexOf('x') > -1){\n verbose = true\n verbose_stack.push(verbose)\n }\n if(off_flags.indexOf('x') > -1){\n verbose = false\n }\n if(! closed){\n node = set_flags\n }\n pos++\n }else if(pattern[pos + 2] == ord('#')){\n pos += 3\n while(pos < pattern.length){\n if(pattern[pos] == PARENTH_CLOSE){\n break\n }\n pos++\n }\n if(pos == pattern.length){\n fail(\"missing ), unterminated comment\", pos)\n }\n pos++\n continue\n }else{\n fail(\"unknown extension ?\" + _b_.chr(pattern[pos + 2]),\n pos)\n }\n }else{\n yield new Group(pos)\n verbose_stack.push(verbose)\n pos++\n }\n }else if(cp == PARENTH_CLOSE){\n yield new GroupEnd(pos)\n verbose_stack.pop()\n verbose = $last(verbose_stack)\n pos++\n }else if(cp == BACKSLASH){\n var escape = escaped_char({codepoints: pattern, pos, is_bytes})\n if(escape instanceof CharacterClass){\n yield escape\n pos += escape.length\n }else if(escape.char !== undefined){\n yield new Char(pos, escape.ord)\n pos += escape.length\n }else if(escape.type == \"backref\"){\n var len = escape.length\n if(escape.value.length > 2){\n escape.value = escape.value.substr(0, 2)\n len = 2\n }\n yield new BackReference(pos, \"num\", escape.value)\n pos += len\n }else if(typeof escape == \"number\"){\n // eg \"\\.\"\n var esc = new Char(pos, escape)\n esc.escaped = true\n yield esc\n pos += 2\n }else{\n yield new Char(pos, escape)\n pos += escape.length\n }\n }else if(cp == BRACKET_OPEN){\n // Set of characters\n var set,\n end_pos\n [set, end_pos] = parse_character_set(pattern, pos, is_bytes)\n yield new CharacterSet(pos, set)\n pos = end_pos + 1\n }else if('+?*'.indexOf(char) > -1){\n yield new Repeater(pos, char)\n pos++\n }else if(cp == BRACE_OPEN){\n var reps = /\\{(\\d*)((,)(\\d*))?\\}/.exec(\n from_codepoint_list(pattern.slice(pos)))\n if(reps && reps[0] != '{}'){\n if(reps[1] == \"\"){\n var limits = [0]\n }else{\n var limits = [parseInt(reps[1])]\n }\n if(reps[4] !== undefined){\n if(reps[4] == \"\"){\n var max = Number.POSITIVE_INFINITY\n }else{\n var max = parseInt(reps[4])\n }\n limits.push(max)\n }\n yield new Repeater(pos, limits)\n pos += reps[0].length\n }else if(pattern[pos + 1] == BRACE_CLOSE){\n // {} is the characters \"{\" and \"}\"\n yield new Char(pos, BRACE_OPEN)\n pos++\n }else{\n yield new Char(pos, BRACE_OPEN)\n pos++\n }\n }else if(cp == OR){\n yield new Or(pos)\n pos++\n }else if(cp == DOT){\n yield new CharacterClass(pos, cp, 1)\n pos++\n }else if(cp == CARET){\n yield new StringStart(pos)\n pos++\n }else if(cp == DOLLAR){\n yield new StringEnd(pos)\n pos++\n }else{\n yield new Char(pos, cp)\n pos++\n }\n }\n}\n\nfunction transform_repl(data, pattern){\n // data.repl is a StringObj instance\n var repl = data.repl.string\n repl = repl.replace(/\\\\n/g, '\\n')\n repl = repl.replace(/\\\\r/g, '\\r')\n repl = repl.replace(/\\\\t/g, '\\t')\n repl = repl.replace(/\\\\b/g, '\\b')\n repl = repl.replace(/\\\\v/g, '\\v')\n repl = repl.replace(/\\\\f/g, '\\f')\n repl = repl.replace(/\\\\a/g, '\\x07')\n // detect backreferences\n var pos = 0,\n escaped = false,\n br = false,\n repl1 = \"\",\n has_backref = false\n while(pos < repl.length){\n br = false\n if(repl[pos] == \"\\\\\"){\n escaped = ! escaped\n if(escaped){\n pos++\n continue\n }\n }else if(escaped){\n escaped = false\n var mo = /^\\d+/.exec(repl.substr(pos))\n if(mo){\n var cps = to_codepoint_list(repl)\n var escape = escaped_char({\n codepoints: cps,\n pos: pos - 1,\n is_bytes: cps.type == \"bytes\"\n })\n if(escape.type == \"o\"){\n if(escape.ord > 0o377){\n fail(`octal escape value \\\\${mo[0]} ` +\n \" outside of range 0-0o377\", pos)\n }\n repl1 += escape.char\n pos += escape.length - 1\n continue\n }else if(escape.type != \"backref\"){\n var group_num = mo[0].substr(0,\n Math.min(2, mo[0].length))\n fail(`invalid group reference ${group_num}`, pos)\n }else{\n // only keep first 2 digits\n var group_num = mo[0].substr(0,\n Math.min(2, mo[0].length))\n // check that pattern has the specified group num\n if(pattern.groups === undefined){\n throw _b_.AttributeError.$factory(\"$groups\")\n }\n if(pattern.groups[group_num] === undefined){\n fail(`invalid group reference ${group_num}`,\n pos)\n }else{\n mo[0] = group_num\n }\n }\n if(! has_backref){\n var parts = [repl.substr(0, pos - 1),\n parseInt(mo[0])]\n }else{\n parts.push(repl.substring(next_pos, pos - 1))\n parts.push(parseInt(mo[0]))\n }\n has_backref = true\n var next_pos = pos + mo[0].length\n br = true\n pos += mo[0].length\n }else if(repl[pos] == \"g\"){\n pos++\n if(repl[pos] != '<'){\n fail(\"missing <\", pos)\n }\n pos++\n mo = /(.*?)>/.exec(repl.substr(pos))\n if(mo){\n if(mo[1] == \"\"){\n pos += mo[0].length\n fail(\"missing group name\", pos - 1)\n }\n var group_name = mo[1]\n if(group_name == '0'){\n // The backreference \\g<0> substitutes in the entire\n // substring matched by the RE.\n }else if(/^\\d+$/.exec(group_name)){\n if(pattern.groups[group_name] === undefined){\n fail(`invalid group reference ${group_name}`,\n pos)\n }\n }else{\n try{\n var group_num = _b_.int.$factory(group_name)\n if(group_num < 0){\n fail(`bad character in group name ` +\n `'${group_name}' at position ${pos}`, pos)\n }\n warn(_b_.DeprecationWarning,\n `bad character in group name '${group_name}' ` +\n `at position ${pos}`)\n mo[1] = group_name = group_num + ''\n }catch(err){\n if(! _b_.str.isidentifier(group_name)){\n var cps = to_codepoint_list(group_name)\n if($B.unicode_tables.XID_Start[cps[0]] === undefined){\n fail(\"bad character in group name '\" +\n group_name + \"'\", pos)\n }else{\n for(cp of cps.slice(1)){\n if($B.unicode_tables.XID_Continue[cp] === undefined){\n fail(\"bad character in group name '\" +\n group_name + \"'\", pos)\n }\n }\n }\n }else if(data.type == \"bytes\" && ! is_ascii(group_name)){\n var b = _b_.bytes.$factory(group_name, 'latin-1'),\n s = _b_.bytes.decode(b, 'ascii', 'backslashreplace')\n warn(_b_.DeprecationWarning,\n `bad character in group name '${s}'` +\n ` at position ${pos}`)\n }\n }\n if(pattern.groups[group_name] === undefined){\n throw _b_.IndexError.$factory(\n `unknown group name '${group_name}'`,\n pos)\n }\n }\n if(! has_backref){\n var parts = [repl.substr(0, pos - 3),\n mo[1]]\n }else{\n parts.push(repl.substring(next_pos, pos - 3))\n parts.push(mo[1])\n }\n has_backref = true\n var next_pos = pos + mo[0].length\n br = true\n pos = next_pos\n }else{\n if(repl.substr(pos).length > 0){\n fail(\"missing >, unterminated name\", pos)\n }else{\n fail(\"missing group name\", pos)\n }\n }\n }else{\n if(/[a-zA-Z]/.exec(repl[pos])){\n fail(\"unknown escape\", pos)\n }\n pos += repl[pos]\n }\n }\n if(! br){\n repl1 += repl[pos]\n pos ++\n }\n }\n data.repl1 = repl1\n if(has_backref){\n parts.push(repl.substr(next_pos))\n data.repl = function(bmo){\n var mo = bmo.mo,\n res = parts[0],\n groups = mo.$groups,\n s = mo.string,\n group,\n is_bytes = s.type == 'bytes'\n for(var i = 1, len = parts.length; i < len; i += 2){\n if(parts[i] == 0){\n var x = s.substring(mo.start, mo.end)\n if(is_bytes){\n x = _b_.bytes.decode(x, 'latin-1')\n }\n res += x\n }else if(groups[parts[i]] === undefined){\n if(mo.node.$groups[parts[i]] !== undefined){\n // group is defined in the RE, but didn't contribute\n // to the match\n // groups[parts[i]] = ''\n }else{\n // group is not defined in the RE\n pos++\n group_num = parts[i].toString().substr(0, 2)\n fail(`invalid group reference ${group_num}`, pos)\n }\n }else{\n group = groups[parts[i]]\n var x = s.substring(group.start, group.end)\n if(is_bytes){\n x = _b_.bytes.decode(x, 'latin-1')\n }\n res += x\n }\n res += parts[i + 1]\n }\n return res\n }\n }else{\n data.repl = new StringObj(repl)\n }\n return data\n}\n\n\n\nvar Flag = $B.make_class(\"Flag\",\n function(value){\n return {\n __class__: Flag,\n value\n }\n }\n)\n\nFlag.__and__ = function(self, other){\n if(other.__class__ === Flag){\n return Flag.$factory(self.value & other.value)\n }else if(typeof other == \"number\" || typeof other == \"boolean\"){\n return Flag.$factory(self.value & other)\n }\n return _b_.NotImplemented\n}\n\nFlag.__index__ = function(self){\n return self.value\n}\n\nFlag.__invert__ = function(self){\n return Flag.$factory(~self.value)\n}\n\nFlag.__eq__ = function(self, other){\n return self.value == other.value\n}\n\nFlag.__or__ = function(self, other){\n if(other.__class__ === Flag){\n return Flag.$factory(self.value | other.value)\n }else if(typeof other == \"number\" || typeof other == \"boolean\"){\n return Flag.$factory(self.value | other)\n }\n return _b_.NotImplemented\n}\n\nFlag.__rand__ = function(self, other){\n if(typeof other == \"number\" || _b_.isinstance(other, _b_.int)){\n if(other == 0){\n return false // Flag.$factory(self.value)\n }\n return self.value & other\n }\n return _b_.NotImplemented\n}\n\nFlag.__ror__ = function(self, other){\n if(typeof other == \"number\" || _b_.isinstance(other, _b_.int)){\n if(other == 0){\n return self.value\n }\n return self.value | other\n }\n return _b_.NotImplemented\n}\n\nFlag.__repr__ = Flag.__str__ = function(self){\n if(self.value == 0){\n return \"re.none\"\n }\n var inverted = self.value < 0\n\n var t = [],\n value = inverted ? ~self.value : self.value\n for(var flag in inline_flags){\n if(value & inline_flags[flag].value){\n t.push('re.' + flag_names[flag])\n value &= ~inline_flags[flag].value\n }\n }\n if(value > 0){\n t.push('0x' + value.toString(16))\n }\n var res = t.join('|')\n if(inverted){\n if(t.length > 1){\n return '~(' + res + ')'\n }else{\n return '~' + res\n }\n }\n return res\n}\n\nFlag.__xor__ = function(self, other){\n return Flag.$factory(self.value ^ other.value)\n}\n\n$B.set_func_names(Flag, \"re\")\n\nvar no_flag = {}\n\nvar Scanner = $B.make_class(\"Scanner\",\n function(pattern, string, pos, endpos){\n var $ = $B.args('__init__', 4,\n {pattern: null, string: null, pos: null, endpos:null},\n ['pattern', 'string', 'pos', 'endpos'],\n arguments, {pos: 0, endpos: _b_.None}, null, null),\n endpos = endpos === _b_.None ? $.string.length : endpos\n return {\n __class__: Scanner,\n $string: $.string,\n pattern: $.pattern,\n pos: $.pos,\n endpos\n }\n }\n)\n\nScanner.match = function(self){\n return Pattern.match(self.pattern, self.$string)\n}\n\nScanner.search = function(self){\n if(! self.$iterator){\n self.$iterator = $module.finditer(self.pattern, self.$string)\n }\n // return last match\n var mo = _b_.None\n for(mo of self.$iterator.js_gen){\n // set mo\n }\n return mo\n}\n\nvar GroupIndex = $B.make_class(\"GroupIndex\",\n function(self, _default){\n var res = $B.empty_dict()\n res.__class__ = GroupIndex\n for(var key in self.$groups){\n if(isNaN(parseInt(key))){\n _b_.dict.$setitem(res, key, self.$groups[key].num)\n }\n }\n return res\n }\n)\nGroupIndex.__mro__ = [_b_.dict, _b_.object]\nGroupIndex.__setitem__ = function(){\n throw _b_.TypeError.$factory(\"read only\")\n}\n\n$B.set_func_names(GroupIndex, \"re\")\n\nvar Pattern = $B.make_class(\"Pattern\",\n function(pattern){\n var nb_groups = 0\n for(var key in pattern.groups){\n if(isFinite(key)){\n nb_groups++\n }\n }\n return {\n __class__: Pattern,\n pattern: pattern.text,\n groups: nb_groups,\n flags: pattern.flags,\n $groups: pattern.groups,\n $pattern: pattern\n }\n }\n)\n\nPattern.__copy__ = function(self){\n return self\n}\n\nPattern.__deepcopy__ = function(self){\n return self\n}\n\nPattern.__eq__ = function(self, other){\n if(other.$pattern && self.$pattern.type != other.$pattern.$type){\n // warn(_b_.BytesWarning, \"cannot compare str and bytes pattern\", 1)\n }\n return self.pattern == other.pattern &&\n self.flags.value == other.flags.value\n}\n\nPattern.__hash__ = function(self){\n // best effort ;-)\n return _b_.hash(self.pattern) + self.flags.value\n}\n\nPattern.__new__ = Pattern.$factory\n\nPattern.__reduce__ = function(self){\n return Pattern.__reduce_ex__(self, 4)\n}\n\nPattern.__reduce_ex__ = function(self, protocol){\n var res = _reconstructor,\n state = [self.__class__].concat(self.__class__.__mro__)\n var d = $B.empty_dict()\n _b_.dict.$setitem(d, 'pattern', self.pattern)\n _b_.dict.$setitem(d, 'flags', self.flags.value)\n state.push(d)\n return $B.fast_tuple([res, $B.fast_tuple(state)])\n}\n\nfunction _reconstructor(cls, base, state){\n var pattern = _b_.dict.$getitem(state, 'pattern'),\n flags = Flag.$factory(_b_.dict.$getitem(state, 'flags'))\n return $module.compile(pattern, flags)\n}\n\nPattern.__repr__ = Pattern.__str__ = function(self){\n var text = self.$pattern.text,\n s = text\n if(self.$pattern.type == \"bytes\"){\n s = _b_.str.$factory(_b_.str.encode(s, 'latin-1'))\n }else{\n s = _b_.repr(s)\n }\n s = s.substr(0, 200)\n var res = `re.compile(${s}`,\n flags = self.$pattern.flags\n if(flags === no_flag){\n return res + ')'\n }\n // mask UNICODE flag\n if(flags.__class__ === Flag){\n // copy flag, otherwise U.value would become 0\n flags = Flag.$factory(flags.value)\n flags.value &= ~U.value\n }else if(typeof flags == \"number\"){\n flags &= ~U.value\n }\n if(flags != 0 && flags.value != 0){\n res += `, ${_b_.str.$factory(flags)}`\n }\n return res + ')'\n}\n\nPattern.findall = function(self){\n var iter = Pattern.finditer.apply(null, arguments).js_gen,\n res = []\n\n while(true){\n var next = iter.next()\n if(next.done){\n return res\n }\n var bmo = next.value,\n mo = bmo.mo,\n groups = MatchObject.groups(bmo)\n\n // replace None by the empty string\n for(var i = 0, len = groups.length; i < len; i++){\n groups[i] = groups[i] === _b_.None ? \"\" : groups[i]\n }\n if(groups.length > 0){\n if(groups.length == 1){\n res.push(groups[0])\n }else{\n res.push($B.fast_tuple(groups))\n }\n }else{\n res.push(mo.string.substring(mo.start, mo.end))\n }\n }\n}\n\nPattern.finditer = function(self){\n var $ = $B.args(\"finditer\", 4,\n {self: null, string: null, pos: null, endpos: null},\n 'self string pos endpos'.split(' '), arguments,\n {pos: 0, endpos: _b_.None}, null, null)\n var original_string = $.string,\n data = prepare({string: $.string})\n var endpos = $.endpos === _b_.None ? data.string.length : $.endpos\n return $B.generator.$factory(iterator)(self.$pattern, data.string,\n no_flag, $.string, $.pos, endpos)\n}\n\nPattern.fullmatch = function(self, string){\n var $ = $B.args(\"match\", 4,\n {self: null, string: null, pos: null, endpos: null},\n [\"self\", \"string\", \"pos\", \"endpos\"], arguments,\n {pos: 0, endpos: _b_.None}, null, null)\n if($.endpos === _b_.None){\n $.endpos = $.string.length\n }\n var data = prepare({string: $.string})\n if(self.$pattern.type != data.string.type){\n throw _b_.TypeError.$factory(\"not the same type for pattern \" +\n \"and string\")\n }\n var fullmatch_pattern = create_fullmatch_pattern($.self.$pattern)\n var mo = match(fullmatch_pattern, data.string, $.pos, $.endpos)\n if(mo && mo.end - mo.start == $.endpos - $.pos){\n return MatchObject.$factory(mo)\n }else{\n return _b_.None\n }\n}\n\nPattern.groupindex = {\n __get__: function(self){\n return GroupIndex.$factory(self)\n }\n}\n\nPattern.match = function(self, string){\n var $ = $B.args(\"match\", 4,\n {self: null, string: null, pos: null, endpos: null},\n [\"self\", \"string\", \"pos\", \"endpos\"], arguments,\n {pos: 0, endpos: _b_.None}, null, null)\n if($.endpos === _b_.None){\n $.endpos = $.string.length\n }\n var data = prepare({string: $.string})\n if(self.$pattern.type != data.string.type){\n throw _b_.TypeError.$factory(\"not the same type for pattern \" +\n \"and string\")\n }\n var mo = match($.self.$pattern, data.string, $.pos,\n $.endpos)\n return mo ? MatchObject.$factory(mo) : _b_.None\n}\n\nPattern.scanner = function(self, string, pos, endpos){\n return Scanner.$factory.apply(null, arguments) // self, string, pos, endpos)\n}\n\nPattern.search = function(self, string){\n var $ = $B.args(\"match\", 4,\n {self: null, string: null, pos: null, endpos: null},\n [\"self\", \"string\", \"pos\", \"endpos\"], arguments,\n {pos: 0, endpos: _b_.None}, null, null)\n var data = prepare({string: $.string})\n if(self.$pattern.type != data.string.type){\n throw _b_.TypeError.$factory(\"not the same type for pattern \" +\n \"and string\")\n }\n if($.endpos === _b_.None){\n $.endpos = data.string.length\n }\n var pos = $.pos\n while(pos <= $.endpos){\n var mo = match(self.$pattern, data.string, pos)\n if(mo){\n return MatchObject.$factory(mo)\n }else{\n pos++\n }\n }\n return _b_.None\n}\n\nPattern.split = function(){\n return $module.split.apply(null, arguments)\n}\n\nPattern.sub = function(){\n var $ = $B.args(\"match\", 4,\n {self: null, repl: null, string: null, count: null},\n \"self repl string count\".split(' '), arguments,\n {count: 0}, null, null)\n var data = prepare({string: $.string})\n if($.self.$pattern.type != data.string.type){\n throw _b_.TypeError.$factory(\"not the same type for pattern \" +\n \"and string\")\n }\n\n return $module.sub($.self, $.repl, $.string, $.count)\n}\n\n$B.set_func_names(Pattern, \"re\")\n\nfunction Node(parent){\n this.parent = parent\n this.items = []\n}\n\nNode.prototype.add = function(item){\n this.items.push(item)\n item.parent = this\n}\n\nNode.prototype.fixed_length = function(){\n // Return the sum of items lengths if fixed, else undefined\n if(this.repeat){\n return false\n }\n var len = 0\n for(var item of this.items){\n if(item.fixed_length === undefined){\n console.log(\"pas de fixed length\", item)\n alert()\n }\n var sublen = item.fixed_length()\n if(sublen === false){\n return false\n }\n len += sublen\n }\n return len\n}\n\nfunction get_top(node){\n var top = node.parent\n while(top.parent){\n top = top.parent\n }\n return top\n}\n\nvar BackReference = function(pos, type, value){\n // for \"\\number\"\n this.name = \"BackReference\"\n this.pos = pos\n this.type = type // \"name\" or \"num\"\n this.value = value\n this.groups = []\n}\n\nBackReference.prototype.fixed_length = function(){\n // Return length of referenced group if it is fixed, else undefined\n if(this.repeat){\n return undefined\n }\n var group = this.get_group()\n if(group.fixed_length === undefined){\n console.log(\"group\", group, \"no fixed length\")\n }\n return group === undefined ? false : group.fixed_length()\n}\n\nBackReference.prototype.get_group = function(){\n var top = get_top(this)\n return top.$groups[this.value]\n}\n\nBackReference.prototype.match = function(string, pos, endpos, groups){\n this.repeat = this.repeat || {min: 1, max: 1}\n\n var group = groups[this.value]\n if(group === undefined){\n if(this.repeat.min == 0){\n return {\n nb_min: 0,\n nb_max: 0\n }\n }\n return false\n }\n\n // Get the codepoints matched by the referenced group\n group_cps = string.codepoints.slice(group.start, group.end)\n\n // search (repetitions of) the matched group codepoints\n var _pos = pos,\n nb = 0,\n group_len = group_cps.length,\n flag,\n cp\n while(string.cp_at(_pos) !== undefined && nb < this.repeat.max){\n flag = true\n for(var i = 0; i < group_len; i++){\n cp = string.cp_at(_pos + i)\n if(cp != group_cps[i]){\n flag = false\n break\n }\n }\n if(flag){\n nb++\n _pos += group_len\n }else{\n break\n }\n }\n if(nb >= this.repeat.min){\n // Returns the accepted minimum and maximum number of repeats\n // and the length of each repeat\n return {\n nb_min: this.repeat.min,\n nb_max: nb,\n group_len\n }\n }\n return false\n}\n\nBackReference.prototype.toString = function(){\n return \"BackRef to group\" + this.value\n}\n\nvar Case = function(){\n this.name = \"Case\"\n this.items = []\n this.groups = []\n this.text = 'Case '\n}\n\nCase.prototype.add = function(item){\n this.items.push(item)\n item.parent = this\n}\n\nCase.prototype.fixed_length = function(){\n var len\n for(var item of this.items){\n var fl = item.fixed_length()\n if(fl === false){\n return false\n }else if(len === undefined){\n len = fl\n }else{\n len += fl\n }\n }\n return len\n}\n\nCase.prototype.toString = function(){\n var res = 'Case '\n res += this.items.map(x => x + '').join(' ')\n return this.text = res\n}\n\nvar Choice = function(){\n this.type = \"choice\"\n this.items = []\n this.groups = []\n}\n\nChoice.prototype.add = Node.prototype.add\n\nChoice.prototype.fixed_length = function(){\n var len\n for(var item of this.items){\n var fl = item.fixed_length()\n if(fl === false){\n return false\n }else if(len === undefined){\n len = fl\n }else if(len != fl){\n return false\n }\n }\n return len\n}\n\nChoice.prototype.toString = function(){\n return 'Choice'\n}\n\nvar EmptyString = {\n toString: function(){\n return ''\n },\n match: function(string, pos, endpos){\n return {nb_min: 0, nb_max: 0}\n },\n fixed_length: function(){\n return 1\n },\n length: 0\n },\n Flags = function(flags){\n this.flags = flags\n },\n GroupEnd = function(pos){\n this.name = \"GroupEnd\"\n this.pos = pos\n this.text = ')'\n this.toString = function(){\n return '[end of group #' + this.group.num + ']'\n }\n },\n Or = function(pos){\n this.name = \"Or\"\n this.pos = pos\n this.text = '|'\n this.toString = function(){\n return '|'\n }\n },\n Repeater = function(pos, op){\n this.name = \"Repeater\"\n this.pos = pos\n this.op = op\n }\n\nfunction cased_cps(cp, ignore_case, ascii){\n // If cp is the codepoint of a cased Unicode character, return the list\n // of the codepoints that match the character in a case-insensitive way\n\n // ignore_case = this.flags && this.flags.value & IGNORECASE.value\n // ascii = this.flags.value & ASCII.value\n var cps,\n char = $B.codepoint2jsstring(cp)\n if(! ignore_case){\n return [cp]\n }\n if(ascii){\n // only test ASCII letters\n ignore_case = ignore_case && (\n (char >= 'a' && char <= 'z') ||\n (char >= 'A' && char <= 'Z'))\n }\n if(ignore_case){\n var char_up = char.toUpperCase(),\n char_low = char.toLowerCase(),\n cps = new Set([cp, $B.jsstring2codepoint(char_low),\n $B.jsstring2codepoint(char_up)])\n // special cases\n if(char.toLowerCase() == \"k\"){\n cps.add(0x212a) // Kelvin sign\n }\n if(cp == 0x212a){\n cps.add(ord('k'))\n cps.add(ord('K'))\n }\n if(char.toLowerCase() == \"s\"){\n cps.add(0x017f) // (Latin small letter long s)\n }\n if(cp == 0x017f){\n cps.add(ord('s'))\n cps.add(ord('S'))\n }\n if(char.toLowerCase() == 'i'){\n cps.add(0x0130) // (Latin capital letter I with dot above)\n cps.add(0x0131) // (Latin small letter dotless i)\n }\n if(cp == 0x0130 || cp == 0x0131){\n cps.add(ord('i'))\n cps.add(ord('I'))\n }\n return Array.from(cps)\n }else{\n cps = [cp]\n }\n return cps\n}\n\nvar Char = function(pos, cp, groups){\n // character in a regular expression or in a character set\n // pos : position of the character in the pattern string\n // cp : the character's codepoint\n // groups (optional) : the groups that contain the character\n this.pos = pos\n this.cp = cp\n this.char = chr(this.cp)\n this.text = this.char\n}\n\nChar.prototype.fixed_length = function(){\n if(this.repeat){\n return this.repeat.min\n }\n return this.char === EmptyString ? 0 : 1\n}\n\nChar.prototype.match = function(string, pos, endpos){\n // Returns {pos1, pos2} such that \"this\" matches all the substrings\n // string[pos:i] with pos1 <= i < pos2, or false if no match\n this.repeat = this.repeat || {min: 1, max: 1}\n\n var i = 0\n\n // browse string codepoints until they don't match, or the number of\n // matches is above the maximum allowed\n if(this.flags){\n if(this.flags.value & ASCII.value){\n if(this.cp > 127){\n return false\n }\n }\n if(this.flags.value & IGNORECASE.value &&\n (! this.is_bytes || this.cp <= 127)){\n // Flag IGNORECASE set\n // For bytes pattern, case insensitive matching only works\n // for ASCII characters\n var char_upper = this.char.toUpperCase(),\n char_lower = this.char.toLowerCase(),\n cp\n while(i < this.repeat.max && pos + i < endpos){\n cp = string.cp_at(pos + i)\n var char = chr(cp)\n if(char.toUpperCase() != char_upper &&\n char.toLowerCase() != char_lower){\n break\n }\n i++\n }\n }else{\n while(pos + i < endpos &&\n string.cp_at(pos + i) == this.cp &&\n i < this.repeat.max){\n i++\n }\n }\n }else{\n while(pos + i < endpos &&\n string.cp_at(pos + i) == this.cp &&\n i < this.repeat.max){\n i++\n }\n }\n var nb = i\n if(nb >= this.repeat.min){\n // Number of repeats ok\n return {\n nb_min: this.repeat.min,\n nb_max: nb\n }\n }else{\n return false\n }\n}\n\nChar.prototype.toString = function(){\n var res = 'Char ' + this.text\n if(this.repeat !== undefined){\n res += ' repeat {' + this.repeat.min + ',' + this.repeat.max + '}'\n if(this.non_greedy){\n res += '?'\n }\n }\n return res\n}\n\nfunction CharSeq(chars, flags){\n // sequence of consecutive characters\n this.chars = chars\n this.flags = flags\n this.merge_same_chars()\n}\n\nCharSeq.prototype.add_char = function(char){\n this.chars.push(char)\n this.merge_same_chars()\n}\n\nCharSeq.prototype.fixed_length = function(){\n var len = 0,\n cps = [],\n char_len\n for(var char of this.chars){\n if(! char.repeat){\n char_len = 1\n }else if(char.repeat.min == char.repeat.max){\n char_len = char.repeat.min\n }else{\n len = false\n break\n }\n for(var i = 0; i < char_len; i++){\n cps.push(char.cp)\n }\n len += char_len\n }\n this.cps = cps\n return this.len = len\n}\n\nCharSeq.prototype.match = function(string, pos, endpos){\n var mos = [],\n i = 0,\n backtrack,\n nb\n this.len = this.len === undefined ? this.fixed_length() : this.len\n // optimization if character sequence has a fixed length\n if(this.len !== false && ! (this.flags.value & IGNORECASE.value)){\n for(var i = 0; i < this.len; i++){\n if(string.cp_at(pos + i) !== this.cps[i]){\n return false\n }\n }\n return {nb_min: this.len, nb_max: this.len}\n }\n for(var i = 0, len = this.chars.length; i < len; i++){\n var char = this.chars[i],\n mo = char.match(string, pos, endpos) // form {nb_min, nb_max}\n if(_debug.value){\n console.log('CharSeq match, pos', pos, 'char', char, 'mo', mo)\n alert()\n }\n if(mo){\n nb = char.non_greedy ? mo.nb_min : mo.nb_max\n mos.push({nb,\n nb_min: mo.nb_min,\n nb_max: mo.nb_max,\n non_greedy: !!char.non_greedy\n })\n pos += nb\n }else{\n // backtrack\n backtrack = false\n while(mos.length > 0){\n i--\n mo = mos.pop()\n pos -= mo.nb\n nb = mo.nb\n if(mo.non_greedy && nb < mo.nb_max){\n nb += 1\n backtrack = true\n }else if(! mo.non_greedy && nb - 1 >= mo.nb_min){\n nb -= 1\n backtrack = true\n }\n if(backtrack){\n pos += nb\n mo.nb = nb\n mos.push(mo)\n break\n }\n }\n if(mos.length == 0){\n return false\n }\n }\n }\n var nb = 0,\n last_mo = $B.last(mos)\n for(var mo of mos.slice(0, mos.length - 1)){\n nb += mo.nb\n }\n var res = {\n nb_min: nb + last_mo.nb_min,\n nb_max: nb + last_mo.nb_max\n }\n return res\n}\n\nCharSeq.prototype.merge_same_chars = function(){\n // b?b merged into b+ etc.\n var current,\n chars = [],\n merged\n for(var item of this.chars){\n if(current && current.char == item.char &&\n current.non_greedy === item.non_greedy){\n if(! current.repeat){\n current.repeat = {min: 1, max: 1}\n }\n if(item.repeat){\n current.repeat.min += item.repeat.min\n current.repeat.max += item.repeat.max\n }else{\n current.repeat.min += 1\n current.repeat.max += 1\n }\n merged = true\n }else{\n chars.push(item)\n }\n current = item\n }\n if(merged){\n this.chars = chars\n }\n}\n\nCharSeq.prototype.toString = function(){\n var res = ''\n for(var char of this.chars){\n res += char.text\n }\n return 'CharSeq ' + res\n}\n\nfunction CharacterClass(pos, cp, length, groups){\n this.cp = cp\n this.value = chr(cp)\n this.length = length\n this.pos = pos\n\n var flags = this.flags\n\n // Test function : test(string, pos) returns:\n // - true if \"this\" matches 1 character string[pos]\n // - [true, 0] if \"this\" matches the empty string at pos\n // - false or undefined if \"this\" doesn't match\n switch(this.value){\n case 'A':\n this.test_func = function(string, pos){\n if(pos == 0){\n return [true, 0]\n }\n }\n break\n case 's':\n this.test_func = function(string, pos){\n var cp = string.cp_at(pos)\n return $B.unicode_tables.Zs[cp] !== undefined ||\n $B.unicode_bidi_whitespace.indexOf(cp) > -1\n }\n break\n case 'S':\n this.test_func = function(string, pos){\n var cp = string.cp_at(pos)\n return cp !== undefined &&\n $B.unicode_tables.Zs[cp] === undefined &&\n $B.unicode_bidi_whitespace.indexOf(cp) == -1\n }\n break\n case '.':\n this.test_func = function(string, pos){\n if(string.cp_at(pos) === undefined){\n return false\n }\n if(this.flags.value & DOTALL.value){\n return true\n }else{\n return string.cp_at(pos) != 10\n }\n }\n break\n case 'd':\n this.test_func = function(string, pos){\n if(this.flags === undefined){\n console.log(\"\\\\d, no flags\", this)\n }\n var cp = string.cp_at(pos),\n table = (this.flags.value & ASCII.value) ?\n is_ascii_digit : is_digit\n return table[cp]\n }\n break\n case 'D':\n this.test_func = function(string, pos){\n var cp = string.cp_at(pos),\n table = (this.flags.value & ASCII.value) ?\n is_ascii_digit : is_digit\n return ! table[cp]\n }\n break\n case 'b':\n this.test_func = function(string, pos){\n var table = is_word\n if(this.is_bytes || (this.flags.value & ASCII.value)){\n table = is_ascii_word\n }\n var cp = string.cp_at(pos),\n ok = {nb_min: 0, nb_max: 0}\n\n // return true if char at pos is at the beginning or start\n // of a word\n if(pos == 0 && table[cp]){\n return ok\n }\n if(string.cp_at(pos) === undefined && table[string.cp_at(pos - 1)]){\n return ok\n }\n if(pos > 0 && string.cp_at(pos) !== undefined){\n if((table[string.cp_at(pos - 1)]) !==\n table[cp]){\n return ok\n }\n }\n return false\n }\n break\n case 'B':\n this.test_func = function(string, pos){\n var table = is_word\n if(this.is_bytes || (this.flags.value & ASCII.value)){\n table = is_ascii_word\n }\n\n var cp = string.cp_at(pos),\n ok = {nb_min: 0, nb_max: 0}\n // test is true if char at pos is not at the beginning or\n // start of a word\n if(pos == 0 && cp === undefined){\n // empty string\n return false\n }\n if(pos == 0 && table[cp]){\n return false\n }\n if(cp === undefined &&\n table[string.cp_at(pos - 1)]){\n return false\n }\n if(pos > 0 && cp !== undefined){\n if(table[string.cp_at(pos - 1)] !== table[cp]){\n return false\n }\n }\n return ok\n }\n break\n case 'w':\n this.test_func = function(string, pos){\n var table = is_word\n if(this.is_bytes || (this.flags.value & ASCII.value)){\n table = is_ascii_word\n }\n return table[string.cp_at(pos)]\n }\n break\n case 'W':\n this.test_func = function(string, pos){\n var table = is_word\n if(this.is_bytes || (this.flags.value & ASCII.value)){\n table = is_ascii_word\n }\n return ! table[string.cp_at(pos)]\n }\n break\n case 'Z':\n this.test_func = function(string, pos){\n if(string.cp_at(pos) === undefined){\n return {nb_min: 0, nb_max: 0}\n }\n }\n break\n }\n}\n\nCharacterClass.prototype.fixed_length = function(){\n return this.repeat ? false : 1\n}\n\nCharacterClass.prototype.match = function(string, pos, endpos){\n // Returns {pos1, pos2} such that \"this\" matches all the substrings\n // string[pos:i] with pos1 <= i < pos2, or false if no match\n if(pos === undefined){\n console.log('no pos')\n throw Error()\n }\n var len = string.length\n this.repeat = this.repeat || {min: 1, max: 1}\n\n // browse string codepoints until they don't match, or the number of\n // matches is above the maximum allowed\n var i = 0 \n while(i < this.repeat.max && i < len){\n var test = this.test_func(string, pos + i, this.flags)\n if(! test){\n break\n }\n i++\n }\n\n var nb = i\n if(nb >= this.repeat.min){\n // Number of repeats ok\n if('bBAZ'.indexOf(this.value) > -1 ){\n return {nb_min: 0, nb_max: 0}\n }\n return {\n nb_min: this.repeat.min,\n nb_max: nb\n }\n }else{\n return false\n }\n}\n\nCharacterClass.prototype.nb_repeats = Char.prototype.nb_repeats\n\nCharacterClass.prototype.toString = function(){\n return '\\\\' + this.value\n}\n\nvar CharacterSet = function(pos, set, groups){\n // character set\n this.pos = pos\n this.set = set\n this.neg = set.neg\n}\n\nCharacterSet.prototype.fixed_length = function(){\n return 1\n}\n\nCharacterSet.prototype.match = function(string, pos, endpos){\n var ignore_case = this.flags && (this.flags.value & IGNORECASE.value),\n test,\n match = false,\n i = 0,\n cp\n\n this.repeat = this.repeat || {min: 1, max: 1}\n\n while(i < this.repeat.max && (cp = string.cp_at(pos + i)) !== undefined){\n test = false\n\n if(string.cp_at(pos) === undefined){\n cp = EmptyString\n }\n try{\n $B.codepoint2jsstring(cp)\n }catch(err){\n console.log(err.message)\n console.log('cp', cp, '\\nstring', string, 'pos', pos)\n console.log($B.print_stack())\n throw _b_.Exception.$factory('bad codepoint')\n }\n var char = $B.codepoint2jsstring(cp),\n cps = cased_cps(cp, ignore_case, this.flags.value & ASCII.value),\n char_is_cased = cps.length > 1\n\n for(var cp1 of cps){\n for(var item of this.set.items){\n if(typeof item == 'string'){\n\n }\n if(Array.isArray(item.ord)){\n if(cp1 >= item.ord[0] &&\n cp1 <= item.ord[1]){\n test = true\n break\n }else if(ignore_case && char_is_cased){\n var start1 = chr(item.ord[0]).toUpperCase(),\n end1 = chr(item.ord[1]).toUpperCase(),\n char1 = char.toUpperCase()\n if(char1 >= start1 && char1 <= end1){\n test = true\n }\n var start1 = chr(item.ord[0]).toLowerCase(),\n end1 = chr(item.ord[1]).toLowerCase(),\n char1 = char.toLowerCase()\n if(char1 >= start1 && char1 <= end1){\n test = true\n }\n }\n }else if(item instanceof CharacterClass){\n test = !! item.match(string, pos + i, endpos) // boolean\n }else{\n if(item.ord == cp1){\n test = true\n break\n }\n item_str = typeof item == 'string' ? item : chr(item.ord)\n if(item_str == char){\n test = true\n break\n }\n if(ignore_case && char_is_cased &&\n (char.toUpperCase() == item_str.toUpperCase() ||\n char.toLowerCase() == item_str.toLowerCase())){\n test = true\n break\n }\n }\n }\n }\n if(this.neg){\n test = ! test\n }\n if(test){\n i++\n }else{\n break\n }\n }\n var nb = i\n if(nb >= this.repeat.min){\n // Number of repeats ok\n return {\n nb_min: this.repeat.min,\n nb_max: nb\n }\n }else{\n return false\n }\n\n}\n\nCharacterSet.prototype.nb_repeats = Char.prototype.nb_repeats\n\nCharacterSet.prototype.toString = function(){\n return 'CharSet'\n}\n\nvar ConditionalBackref = function(pos, group_ref){\n this.type = \"conditional backref\"\n this.pos = pos\n this.group_ref = group_ref\n this.chars = []\n this.match_codepoints = []\n this.nb_success = 0\n this.re_if_exists = new Group(pos)\n this.re_if_not_exists = new Group(pos)\n this.nb_options = 1\n}\n\nConditionalBackref.prototype.add = function(item){\n if(this.nb_options == 1){\n this.re_if_exists.add(item)\n }else if(this.nb_options == 2){\n this.re_if_not_exists.add(item)\n }\n item.parent = this\n}\n\nConditionalBackref.prototype.fixed_length = function(){\n var len = this.re_if_exists.fixed_length()\n if(len !== false && len == this.re_if_not_exists.fixed_length()){\n return len\n }\n return false\n}\n\nConditionalBackref.prototype.match = function(string, pos, endpos, groups){\n var re = groups[this.group_ref] ? this.re_if_exists :\n this.re_if_not_exists,\n pattern = {node: re, text: re + ''},\n mo = match(pattern, string, pos, endpos, false, groups)\n if(mo){\n return {nb_min: mo.end - mo.start, nb_max: mo.end - mo.start}\n }\n return false\n}\n\nConditionalBackref.prototype.toString = function(){\n return 'ConditionalBackref'\n}\n\nvar Group = function(pos, extension){\n this.type = \"group\"\n this.pos = pos\n this.items = []\n this.chars = []\n this.groups = []\n for(var key in extension){\n this[key] = extension[key]\n }\n if(extension && extension.type){\n if(extension.type.indexOf('lookahead') > -1){\n this.is_lookahead = true\n }else if(extension.type.indexOf('lookbehind') > -1){\n this.is_lookbehind = true\n }\n }\n}\n\nGroup.prototype.add = Node.prototype.add\n\nGroup.prototype.toString = function(){\n if(this.num === undefined){\n var res = 'Group ' + this.type + ' ' + this.pattern\n }else{\n var res = 'Group #' + this.num + ' ' + this.pattern\n }\n if(this.repeat !== undefined){\n res += ' repeat {' + this.repeat.min + ',' + this.repeat.max + '}'\n if(this.non_greedy){\n res += '?'\n }\n }\n return res\n}\n\nBackReference.prototype.nb_repeats = Group.prototype.nb_repeats\n\nGroup.prototype.fixed_length = Node.prototype.fixed_length\n\nfunction groups_in(pattern, group_list){\n if(group_list === undefined){\n group_list = new Set()\n }\n if(pattern instanceof Group && pattern.hasOwnProperty('num')){\n group_list.add(pattern.num)\n }\n if(pattern.items){\n for(var subpattern of pattern.items){\n for(var group of groups_in(subpattern, group_list)){\n group_list.add(group)\n }\n }\n }\n return group_list\n}\n\nfunction GroupRef(group_num, item){\n this.num = group_num\n this.item = item\n}\n\nGroupRef.prototype.fixed_length = function(){\n return this.item.fixed_length()\n}\n\nfunction Lookbehind(item){\n this.re = item\n this.neg = this.re.type == \"negative_lookbehind\"\n}\n\nLookbehind.prototype.match = function(string, pos, endpos, groups){\n var ok = {nb_min: 0, nb_max: 0},\n pattern = {node: this.re, text: this.re + ''},\n length = this.re.length,\n mo\n if(pos - length < 0){\n mo = false\n }else{\n mo = match(pattern, string, pos - length, endpos, false, groups)\n }\n if(mo){\n return this.neg ? false : ok\n }else{\n return this.neg ? ok : false\n }\n}\n\nLookbehind.prototype.fixed_length = function(){\n return this.re.fixed_length()\n}\n\nLookbehind.prototype.toString = function(){\n return \"Lookbehind\"\n}\n\nfunction SetFlags(pos, flags){\n this.pos = pos\n this.on_flags = flags.on_flags\n this.off_flags = flags.off_flags\n this.items = []\n}\n\nSetFlags.prototype.add = Node.prototype.add\n\nfunction StringStart(pos){\n this.pos = pos\n}\n\nStringStart.prototype.match = function(string, pos, endpos){\n var ok = {nb_min:0, nb_max: 0}\n if(this.flags.value & MULTILINE.value){\n return (pos == 0 || string.cp_at(pos - 1) == 10) ? ok : false\n }\n return pos == 0 ? ok : false\n}\n\nStringStart.prototype.fixed_length = function(){\n return 0\n}\n\nStringStart.prototype.toString = function(){\n return '^'\n}\n\nfunction StringEnd(pos){\n this.pos = pos\n}\n\nStringEnd.prototype.match = function(string, pos, endpos){\n var ok = {nb_min:0, nb_max: 0},\n cp = string.cp_at(pos)\n if(this.flags.value & MULTILINE.value){\n return (pos > string.codepoints.length - 1 ||\n cp == 10) ? ok : false\n }\n return pos > endpos - 1 ? ok :\n (pos == endpos - 1 && cp == 10) ? ok : false\n}\n\nStringEnd.prototype.fixed_length = function(){\n return 0\n}\n\nStringEnd.prototype.toString = function(){\n return '$'\n}\n\nvar cache = new Map()\n\nfunction compile(pattern, flags){\n if(pattern.__class__ === Pattern){\n if(flags !== no_flag){\n throw _b_.ValueError.$factory(\"no flags\")\n }\n return pattern\n }\n if(cache.has(pattern.py_obj)){\n if(cache.get(pattern.py_obj).has(flags.value || 0)){\n return cache.get(pattern.py_obj).get(flags.value || 0)\n }\n }\n var original_pattern = pattern,\n original_flags = flags,\n type = pattern.type,\n choices,\n allow_global_flags = true\n pattern = pattern.codepoints\n var is_bytes = type !== \"str\"\n if(is_bytes && flags && (flags.value & U.value)){\n throw _b_.ValueError.$factory(\"cannot use UNICODE flag with \" +\n \"a bytes pattern\")\n }\n if(flags && (flags.value & U.value) &&\n (flags.value & ASCII.value)){\n throw _b_.ValueError.$factory(\"ASCII and UNICODE flags \" +\n \"are incompatible\")\n }\n if(is_bytes){\n // bytes patterns ignore re.ASCII flag\n flags = Flag.$factory(flags.value || 0)\n //flags.value &= ~ASCII.value\n }\n var group_num = 0,\n group_stack = [],\n groups = {},\n pos,\n lookbehind,\n node = new Node(),\n accept_inline_flag = true,\n verbose = (flags.value || 0) & VERBOSE.value,\n comment = false,\n backrefs = {}\n node.$groups = groups\n for(var item of tokenize(pattern, type, verbose)){\n item.flags = flags\n item.is_bytes = is_bytes\n if(lookbehind){\n item.lookbehind = lookbehind\n lookbehind.parent = item\n lookbehind = false\n }\n if(allow_global_flags &&\n (group_stack.length > 0 || ! (item instanceof SetFlags))){\n allow_global_flags = false\n }\n if(item instanceof Group){\n group_stack.push(item)\n node.add(item)\n item.state = \"open\"\n group_num++\n item.num = group_num\n node = item // next items will be stored as group's items\n pos = item.pos\n if(item.non_capturing){\n delete item.num\n group_num--\n }else if(item.type == \"name_def\"){\n var value = item.value\n if(groups[value.string] !== undefined){\n fail(`redefinition of group name` +\n ` '${value.string}' as group ${group_num}; was group` +\n ` ${groups[value.string].num}`, pos)\n }\n item.name = value.string\n groups[value.string] = groups[group_num] =\n new GroupRef(group_num, item)\n }else if(item.is_lookahead){\n // a lookahead assertion is relative to the previous regexp\n group_num--\n while(node.items.length > 0){\n item.add(node.items.shift())\n }\n node = item\n }else if(item.is_lookbehind){\n // a lookbehind assertion is relative to the next regexp\n node.parent.items.pop() // remove from node items\n // temporarily create a group\n groups[group_num] = new GroupRef(group_num, item)\n }else if(item.type == \"flags\"){\n // save flags before a group with inline flags, eg \"(?i:a)\"\n item.flags_before = Flag.$factory(flags.value | 0)\n }else{\n groups[group_num] = new GroupRef(group_num, item)\n }\n }else if(item instanceof GroupEnd){\n end_pos = item.pos\n if(group_stack.length == 0){\n fail(\"unbalanced parenthesis\", end_pos, original_pattern)\n }\n var item = group_stack.pop()\n item.end_pos = end_pos\n try{\n item.pattern = from_codepoint_list(\n pattern.slice(item.pos, end_pos + 1))\n }catch(err){\n console.log(\"err avec pattern substring\", pattern)\n throw err\n }\n if(item.is_lookbehind){\n delete groups[group_num]\n group_num--\n // check that all elements have a fixed length\n item.length = item.fixed_length()\n if(item.length === false){\n fail(\"look-behind requires fixed-width pattern\", pos)\n }\n item.parent.add(new Lookbehind(item))\n item.non_capturing = true\n // store in variable \"lookbehind\", will be applied to next item\n lookbehind = item\n }else if(item.is_lookahead){\n delete item.num\n }\n if(item instanceof Group && item.items.length == 0){\n item.add(EmptyString)\n }else if(item instanceof ConditionalBackref){\n if(groups[item.group_ref] === undefined){\n // might be defined later; store in backrefs and check\n // when all items have been processed\n backrefs[item.group_ref] = backrefs[item.group_ref] | pos + 3\n }\n if(item.re_if_exists.items.length == 0){\n item.re_if_exists.add(EmptyString)\n }else if(item.re_if_not_exists.items.length == 0){\n item.re_if_not_exists.pos = pos\n item.re_if_not_exists.add(EmptyString)\n }\n }else if(item.type == \"flags\"){\n // restore flags when entering the group\n flags = Flag.$factory(item.flags_before.value)\n }\n item.state = 'closed'\n node = item.parent\n }else if(item instanceof ConditionalBackref){\n var pos = item.pos,\n group_ref = item.group_ref\n if(typeof group_ref == \"number\"){\n if(group_ref == 0){\n fail(`bad group number`, pos + 3)\n }else if(group_ref >= MAXGROUPS){\n fail(`invalid group reference ${group_ref}`, pos + 1)\n }else if(groups[group_ref] &&\n groups[group_ref].item.state == \"open\"){\n fail(\"cannot refer to an open group\", pos)\n }\n }else if(groups[group_ref] !== undefined){\n if(groups[group_ref].item.state == \"open\"){\n fail(\"cannot refer to an open group\", pos)\n }\n }else{\n fail(`unknown group name '${group_ref}'`, pos)\n }\n group_stack.push(item)\n node.add(item)\n item.state = \"open\"\n node = item // next items will be stored as group's items\n }else if(item instanceof BackReference){\n pos = item.pos\n if(item.type == \"num\" && item.value > 99){\n var head = item.value.toString().substr(0, 2)\n fail(`invalid group reference ${head}`, pos + 1)\n }\n if(groups[item.value] !== undefined){\n if(groups[item.value].item.state == \"open\"){\n fail(\"cannot refer to an open group\", pos)\n }\n var ref_item = groups[item.value].item.parent\n while(ref_item){\n if(ref_item.is_lookbehind){\n fail(\"cannot refer to group defined in the same lookbehind subpattern\", pos)\n }\n ref_item = ref_item.parent\n }\n }else if(item.type == \"name\"){\n fail(`unknown group name '${item.value}'`, pos)\n }else if(item.type == \"num\"){\n fail(`invalid group reference ${item.value}`, pos)\n }\n node.add(item)\n }else if(item instanceof Char ||\n item instanceof CharacterClass ||\n item instanceof CharacterSet){\n if(item instanceof CharacterSet){\n for(var elt of item.set.items){\n elt.flags = flags\n }\n }\n var added_to_charseq = false\n if(item instanceof Char){\n if(node.items && node.items.length > 0){\n var previous = $last(node.items)\n if(previous instanceof CharSeq){\n previous.add_char(item)\n added_to_charseq = true\n }else if(previous instanceof Char && ! previous.repeater){\n node.items.pop()\n node.items.push(new CharSeq([previous, item], flags))\n added_to_charseq = true\n }\n }\n }\n if(! added_to_charseq){\n node.add(item)\n }\n }else if(item instanceof Repeater){\n // check that item is not in a lookbehind group\n var pnode = node\n while(pnode){\n if(pnode.extension && pnode.extension.type &&\n pnode.extension.type.indexOf(\"lookbehind\") > -1){\n fail(\"look-behind requires fixed-width pattern\", pos)\n }\n pnode = pnode.parent\n }\n pos = item.pos\n if(node.items.length == 0){\n fail(\"nothing to repeat\", pos)\n }\n previous = $last(node.items)\n if(previous instanceof Char ||\n previous instanceof CharSeq ||\n previous instanceof CharacterClass ||\n previous instanceof CharacterSet ||\n previous instanceof Group ||\n previous instanceof BackReference){\n if(previous instanceof GroupEnd){\n // associate repeat with Group\n previous = previous.group\n }else if(previous instanceof CharSeq){\n previous = $last(previous.chars)\n }\n if(previous.repeater){\n if(item.op == '?' && ! previous.non_greedy){\n if(previous.possessive){\n fail('multiple repeat', pos)\n }\n previous.non_greedy = true\n if(previous instanceof CharacterClass &&\n previous.value == '.'){\n previous.min_repeat_one = true\n }\n }else{\n if(item instanceof Repeater && item.op == '+'){\n if(previous.possessive || previous.non_greedy){\n fail('multiple repeat', pos)\n }\n previous.possessive = true\n }else{\n fail(\"multiple repeat\", pos)\n }\n }\n }else{\n // convert to minimum and maximum number of repeats\n var min = 1,\n max = 1\n if(Array.isArray(item.op)){\n min = item.op[0]\n if(min >= MAXREPEAT){\n throw _b_.OverflowError.$factory(\n \"the repetition number is too large\")\n }\n max = item.op[1] === undefined ? min : item.op[1]\n if(isFinite(max) && max >= MAXREPEAT){\n throw _b_.OverflowError.$factory(\n \"the repetition number is too large\")\n }\n if(max < min){\n fail('min repeat greater than max repeat', pos)\n }\n }else if(item.op == \"?\"){\n min = 0\n max = 1\n }else if(item.op == \"*\"){\n min = 0\n max = Number.POSITIVE_INFINITY\n }else if(item.op == \"+\"){\n min = 1\n max = Number.POSITIVE_INFINITY\n }\n previous.repeater = item\n previous.repeat = {min, max}\n // mark all parents of item as no fixed length\n var parent = item\n while(parent){\n parent.fixed_length = false\n parent = parent.parent\n }\n }\n }else{\n fail(\"nothing to repeat\", pos)\n }\n }else if(item instanceof Or){\n if(group_stack.length > 0){\n item.group = group_stack[group_stack.length - 1]\n }else{\n item.group = false\n }\n pos = item.pos\n if(node instanceof ConditionalBackref){\n // case '(?(num)a|'\n if(node.nb_options == 1){\n node.nb_options++\n }else{\n fail('conditional backref with more than ' +\n 'two branches', pos)\n }\n }else if(node.items.length == 0){\n // token \"|\" in \"(|...)\" : first option is the empty string\n var choice = new Choice(),\n case1 = new Case()\n case1.add(new Char(pos, EmptyString))\n choice.add(case1)\n node.add(choice)\n var case2 = new Case()\n choice.add(case2)\n node = case2\n }else if(node instanceof Case){\n // node.parent is already a Choice\n var new_case = new Case()\n node.parent.add(new_case)\n node = new_case\n }else{\n // token \"|\" in \"(ab|...)\"\n var previous = node.items[node.items.length - 1]\n if(previous instanceof Case){\n var new_case = new Case()\n previous.add(new_case)\n node = new_case\n }else{\n var choice = new Choice(),\n case1 = new Case(),\n first_rank = node.items[0].rank\n while(node.items.length > 0){\n case1.add(node.items.shift())\n }\n case1.groups = node.$groups\n for(var group of group_stack){\n choice.groups.push(group)\n }\n choice.add(case1)\n node.add(choice)\n var case2 = new Case()\n choice.add(case2)\n node = case2\n }\n }\n }else if(item instanceof StringStart ||\n item instanceof StringEnd){\n node.add(item)\n }else if(item instanceof SetFlags){\n if(group_stack.length == 0 && ! allow_global_flags){\n // pattern like (?x) only allowed as first in reg exp\n fail('global flags not at the start of the ' +\n 'expression', item.pos)\n }\n // copy flags, otherwise re.ASCII etc might be modified\n flags = Flag.$factory(flags.value || U.value)\n if(item.on_flags.indexOf('u') > -1){\n if(is_bytes){\n fail(\"re.error: bad inline flags: cannot use 'u' flag \" +\n \"with a bytes pattern\", pos)\n }\n if(flags && flags.value & ASCII.value){\n // switch to Unicode\n flags.value ^= ASCII.value\n }\n if(group_stack.length == 0 &&\n original_flags && original_flags.value & ASCII.value){\n throw _b_.ValueError.$factory(\"ASCII and UNICODE flags \" +\n \"are incompatible\")\n }\n if(item.on_flags.indexOf('a') > -1){\n throw _b_.ValueError.$factory(\"ASCII and UNICODE flags \" +\n \"are incompatible\")\n }\n }\n if(item.on_flags.indexOf('a') > -1){\n if(group_stack.length == 0 &&\n original_flags && original_flags.value & U.value){\n throw _b_.ValueError.$factory(\"ASCII and UNICODE flags \" +\n \"are incompatible\")\n }\n if(flags && flags.value & U.value){\n // switch to ASCII\n flags.value ^= U.value\n }\n if(item.on_flags.indexOf('u') > -1){\n throw _b_.ValueError.$factory(\"ASCII and UNICODE flags \" +\n \"are incompatible\")\n }\n }\n if(flags.value === undefined){\n flags.value = 32\n }\n if(item.items.length == 0){\n if(! accept_inline_flag && group_stack.length == 0){\n var s = from_codepoint_list(pattern)\n warn(_b_.DeprecationWarning,\n `Flags not at the start of the expression '${s}'`,\n pos)\n }\n for(var on_flag of item.on_flags){\n if(! is_bytes || on_flag !== 'a'){\n flags.value |= inline_flags[on_flag].value\n }\n }\n for(var off_flag of item.off_flags){\n if(! is_bytes || off_flag !== 'a'){\n flags.value ^= inline_flags[off_flag].value\n }\n }\n }else{\n node.add(item)\n }\n }else{\n fail(\"unknown item type \" + item, pos)\n }\n if(! (item instanceof SetFlags) &&\n ! (item instanceof Group && item.type == \"flags\")){\n accept_inline_flag = false\n }\n }\n for(ref in backrefs){\n if(groups[ref] === undefined){\n fail('invalid group name ' + ref, backrefs[ref])\n }\n }\n if(group_stack.length > 0){\n var last = group_stack[group_stack.length - 1]\n fail(\"missing ), unterminated subpattern\", last.pos)\n }\n while(node.parent){\n node = node.parent\n }\n node.pattern = from_codepoint_list(pattern)\n node.groups = group_num\n flags = flags === no_flag ? 32 : flags\n node.flags = flags\n var res = {\n node,\n groups,\n flags,\n original_flags,\n text: from_codepoint_list(pattern),\n type, // \"str\" or \"bytes\"\n fixed_length: node.fixed_length()\n }\n if(! cache.has(original_pattern.py_obj)){\n cache.set(original_pattern.py_obj, new Map())\n }\n cache.get(original_pattern.py_obj).set(original_flags.value || 0, res)\n if(_debug.value){\n show(node)\n }\n return res\n}\n\nfunction show(node, indent){\n indent = indent === undefined ? 0 : indent\n if(indent == 0){\n log('root', node)\n }\n log(' '.repeat(indent) + node)\n if(node.items !== undefined){\n for(var item of node.items){\n show(item, indent + 1)\n }\n }\n}\n\nfunction to_codepoint_list(s){\n var items = []\n if(typeof s == \"string\" || _b_.isinstance(s, _b_.str)){\n if(typeof s != \"string\"){\n s = s.valueOf()\n }\n for(var char of s){\n items.push(char.codePointAt(0))\n }\n items.type = \"unicode\"\n }else if(_b_.isinstance(s, [_b_.bytes, _b_.bytearray, _b_.memoryview])){\n if(_b_.isinstance(s, _b_.memoryview)){\n items = s.obj.source\n }else{\n items = s.source\n }\n items.type = \"bytes\"\n }else{\n throw Error('invalid type ' + $B.class_name(s))\n }\n return items\n}\n\n$B.nb_from_cp = 0\nfunction from_codepoint_list(codepoints, type){\n $B.nb_from_cp++\n // Return a string\n if(type == \"bytes\"){\n return _b_.bytes.$factory(codepoints)\n }\n var s = ''\n for(var cp of codepoints){\n s += _b_.chr(cp)\n }\n return $B.String(s)\n}\n\nfunction string2bytes(s){\n var t = []\n for(var i = 0, len = s.length; i < len; i++){\n t.push(s.charCodeAt(i))\n }\n return _b_.bytes.$factory(t)\n}\n\nfunction check_pattern_flags(pattern, flags){\n if(pattern.__class__ === Pattern){\n if(flags !== no_flag){\n throw _b_.ValueError.$factory(\n \"cannot process flags argument with a compiled pattern\")\n }\n }\n return pattern\n}\n\nfunction StringObj(obj){\n // A StringObj object is a bridge between a Python string or bytes-like\n // object and Javascript\n // obj is the Python object\n // this.string is a Javascript string\n this.py_obj = obj\n this.codepoints = []\n this.type = \"str\"\n this.is_string = typeof obj == 'string'\n if(typeof obj == \"string\" ||\n (obj instanceof String && ! obj.codepoints)){\n // Python object represented as a Javascript string\n this.string = obj\n // Maps a position in codepoints to position in string\n this.index_map = {}\n for(var i = 0, len = obj.length; i < len; i++){\n this.index_map[this.codepoints.length] = i\n var cp = obj.codePointAt(i)\n this.codepoints.push(cp)\n if(cp >= 0x10000){\n i++\n }\n }\n this.length = _b_.str.__len__(obj)\n if(obj instanceof String){\n // store for next use\n obj.codepoints = this.codepoints\n obj.index_map = this.index_map\n }\n }else if(obj instanceof String){\n // string with surrogate pairs\n this.string = obj.string\n this.codepoints = obj.codepoints\n this.index_map = obj.index_map\n this.length = _b_.str.__len__(obj)\n }else if(_b_.isinstance(obj, _b_.str)){ // str subclass\n var so = new StringObj(_b_.str.$factory(obj))\n this.string = so.string\n this.codepoints = so.codepoints\n this.length = _b_.str.__len__(obj)\n }else if(_b_.isinstance(obj, [_b_.bytes, _b_.bytearray])){\n this.string = _b_.bytes.decode(obj, 'latin1')\n this.codepoints = obj.source\n this.type = \"bytes\"\n }else if(_b_.isinstance(obj, _b_.memoryview)){\n this.string = _b_.bytes.decode(obj.obj, 'latin1')\n this.codepoints = obj.obj.source\n this.type = \"bytes\"\n }else if(obj.__class__ && obj.__class__.$buffer_protocol){\n // eg array.array\n this.codepoints = _b_.list.$factory(obj)\n this.string = from_codepoint_list(this.codepoints, \"bytes\")\n this.type = \"bytes\"\n }else if(Array.isArray(obj)){\n // list of codepoints\n this.codepoints = obj\n }else{\n throw _b_.TypeError.$factory(\n `expected string or bytes-like object, got '${$B.class_name(obj)}'`)\n }\n if(this.length === undefined){\n this.length = this.codepoints.length\n }\n}\n\nStringObj.prototype.cp_at = function(pos){\n if(pos >= this.length){\n return undefined\n }\n /*\n if(typeof this.string == 'string'){\n return this.string.charCodeAt(pos)\n }\n */\n var res = this.codepoints[pos]\n if(res !== undefined){\n return res\n }\n}\n\nStringObj.prototype.substring = function(start, end){\n // Returns a string\n var s\n if(this.string && this.index_map){\n if(this.index_map[start] === undefined){\n return ''\n }\n if(end === undefined){\n return this.string.substr(this.index_map[start])\n }\n return this.string.substring(this.index_map[start],\n this.index_map[end])\n }\n var codepoints,\n res = ''\n if(end === undefined){\n codepoints = this.codepoints.slice(start)\n }else{\n codepoints = this.codepoints.slice(start, end)\n }\n return from_codepoint_list(codepoints, this.type)\n}\n\nStringObj.prototype.to_str = function(){\n if(this.hasOwnProperty('string')){\n return this.string\n }\n return from_codepoint_list(this.codepoints, this.type)\n}\n\nStringObj.from_codepoints = function(cps){\n var res = new StringObj('')\n res.codepoints = cps\n for(var cp of cps){\n res.string += _b_.chr(cp)\n }\n return res\n}\n\nfunction prepare(args){\n // Check that all arguments are of the same type (string or bytes-like).\n // Return an object with all attributes transformed into StringObj\n // instances\n var res = {},\n keys = Object.keys(args),\n first = keys[0]\n res[first] = new StringObj(args[first])\n res.type = res[first].type\n for(var key of keys.slice(1)){\n res[key] = new StringObj(args[key])\n if(res[key].type != res.type){\n throw _b_.TypeError.$factory(`not the same type for ${first} and ${key}`)\n }\n }\n return res\n}\n\n\nfunction subn(pattern, repl, string, count, flags){\n // string is a StringObj instance\n // pattern is either a Pattern instance or a StringObj instance\n var t0 = window.performance.now()\n var res = '',\n pos = 0,\n nb_sub = 0\n\n if(pattern instanceof StringObj){\n pattern = compile(pattern, flags)\n }\n if(typeof repl != \"function\"){\n var data1 = transform_repl({repl}, pattern)\n repl1 = data1.repl1\n }\n pos = 0\n var s = string.to_str()\n for(var bmo of $module.finditer(Pattern.$factory(pattern), s).js_gen){\n // finditer yields instances of MatchObject\n var mo = bmo.mo // instance of MO\n res += from_codepoint_list(string.codepoints.slice(pos, mo.start))\n if(typeof repl == \"function\"){\n var x = $B.$call(repl)(bmo)\n if(x.__class__ === _b_.bytes){\n x = _b_.bytes.decode(x, 'latin-1')\n }\n res += x // $B.$call(repl)(bmo)\n }else{\n res += repl1\n }\n nb_sub++\n pos = mo.end\n if(count != 0 && nb_sub >= count){\n break\n }\n }\n if(string.is_string){\n res += string.string.substr(pos)\n }else{\n res += from_codepoint_list(string.codepoints.slice(pos))\n }\n if(pattern.type === \"bytes\"){\n res = _b_.str.encode(res, \"latin-1\")\n }\n return [res, nb_sub]\n}\n\n// escaped chars : '\\t\\n\\x0b\\x0c\\r #$&()*+-.?[\\\\]^{|}~'\nvar escaped = [9, 10, 11, 12, 13, 32, 35, 36, 38, 40, 41, 42, 43, 45, 46, 63,\n 91, 92, 93, 94, 123, 124, 125, 126]\n\nfunction starts_with_string_start(pattern){\n // returns true if the pattern starts with ^ or \\A\n if(pattern.node){\n pattern = pattern.node\n }\n if(pattern.items){\n if(pattern.items.length == 0){\n return false\n }\n return starts_with_string_start(pattern.items[0])\n }else if(pattern instanceof CharacterClass){\n return pattern.value == 'A'\n }else if(pattern instanceof StringStart){\n return true\n }else{\n return false\n }\n}\n\nfunction* iterator(pattern, string, flags, original_string, pos, endpos){\n var result = [],\n pos = pos | 0,\n cp,\n accept_one = true // used to test one position after string end\n while((cp = string.cp_at(pos)) !== undefined || accept_one){\n var mo = match(pattern, string, pos, endpos)\n if(mo){\n yield MatchObject.$factory(mo)\n if(mo.end == mo.start){\n // If match has zero with, retry at the same position but\n // with the flag no_zero_width set, to avoid infinite loops\n mo = match(pattern, string, pos, endpos, true)\n if(mo){\n yield MatchObject.$factory(mo)\n pos = mo.end\n }else{\n pos++ // at least 1, else infinite loop\n }\n }else{\n pos = mo.end\n }\n }else{\n pos++\n }\n if(cp === undefined){\n accept_one = false\n }\n if(starts_with_string_start(pattern)){\n break\n }\n }\n delete original_string.in_iteration\n}\n\n\nfunction MO(node, pos, mo, len){\n // Match Object\n this.node = node\n this.start = pos\n this.mo = mo\n this.nb_min = mo.nb_min\n this.nb_max = mo.nb_max\n this.len = len\n this.nb = this.node.non_greedy ? mo.nb_min : mo.nb_max\n this.end = pos + len * this.nb\n}\n\nMO.prototype.backtrack = function(string, groups){\n if(this.node.possessive){\n return false\n }\n if(this.node.non_greedy && this.nb < this.nb_max){\n this.nb++\n this.end = this.start + this.len * this.nb\n return true\n }else if((! this.node.non_greedy) && this.nb > this.nb_min){\n this.nb--\n this.end = this.start + this.len * this.nb\n return true\n }else{\n return false\n }\n}\n\nfunction del_groups(groups, node){\n if(node.num !== undefined){\n delete groups[node.num]\n groups.$last.splice(groups.$last.indexOf(node.num), 1)\n if(node.name !== undefined){\n delete groups[node.name]\n }\n }\n for(var child of node.items){\n if(child instanceof Group){\n del_groups(groups, child)\n }\n }\n}\n\nfunction GroupMO(node, start, matches, string, groups, endpos){\n // Match Object for Groups\n this.node = node\n this.start = start\n this.matches = matches\n this.string = string\n this.end = matches.length > 0 ? $last(matches).end : start\n this.endpos = endpos === undefined ? this.end : endpos\n this.$groups = groups\n}\n\n$B.nb_group_backtrack = 0\n$B.t_group_backtrack = 0\n\nGroupMO.prototype.backtrack = function(string, groups){\n if(_debug.value){\n console.log('group MO backtrack, this', this)\n alert()\n }\n $B.nb_group_backtrack++\n var t0 = performance.now()\n // Try backtracking in the last match\n if(this.node.possessive || this.node.atomic){\n return false\n }\n if(this.matches.length > 0){\n var _match = $last(this.matches),\n mos = _match.mos,\n nb0 = mos.length\n while(mos.length > 0){\n var mo = mos.pop()\n if(mo.node instanceof Case){\n var rank = mo.node.parent.items.indexOf(mo.node)\n for(var _case of mo.node.parent.items.slice(rank + 1)){\n var _mo = match({node: _case, text: _case.text},\n string, mo.start)\n if(_mo){\n // update GroupMO object\n mos.push(_mo)\n this.end = _mo.end\n if(this.$groups.$last.length > 0){\n var ix = this.$groups.$last[this.$groups.$last.length - 1]\n this.$groups[ix].end = _mo.end\n }\n $B.t_group_backtrack += performance.now() - t0\n return true\n }\n }\n }\n if(mo.backtrack(string, groups)){\n mos.push(mo)\n if(this.node.num !== undefined){\n groups[this.node.num].end = mo.end\n }\n this.end = mo.end\n $B.t_group_backtrack += performance.now() - t0\n return true\n }\n }\n }\n // Else, remove last match if possible\n if(this.matches.length > this.node.repeat.min &&\n this.matches.length >= 1){\n this.matches.pop()\n if(this.matches.length > 0){\n this.end = $last(this.matches).end\n }else{\n // remove this group and its children from groups\n del_groups(groups, this.node)\n this.end = this.start\n }\n $B.t_group_backtrack += performance.now() - t0\n return true\n }\n // Group fails; if some of its subgroups succeded, remove them from\n // groups\n if(this.node.repeat.min > 0){\n del_groups(groups, this.node)\n }\n $B.t_group_backtrack += performance.now() - t0\n return false\n}\n\nGroupMO.prototype.toString = function(){\n var repr = _b_.repr(this.string.substring(this.start, this.end))\n repr = repr.substring(0, 50)\n return ''\n}\n\nGroupMO.prototype.groups = function(_default){\n var res = [],\n groupobj = this.$groups\n\n for(var key in this.node.$groups){\n if(isFinite(key)){\n res[key] = groupobj[key] === undefined ? _default :\n this.string.substring(groupobj[key].start, groupobj[key].end)\n }\n }\n res.shift()\n return $B.fast_tuple(res)\n}\n\n// Brython MatchObject\nvar MatchObject = $B.make_class(\"Match\",\n function(mo){\n return {\n __class__: MatchObject,\n mo\n }\n }\n)\n\nMatchObject.__copy__ = function(self){\n return self\n}\n\nMatchObject.__deepcopy__ = function(self){\n return self\n}\n\nMatchObject.__getitem__ = function(){\n var $ = $B.args(\"__getitem__\", 2, {self: null, key: null},\n ['self', 'key'], arguments, {}, null, null),\n self = $.self,\n key = $.key\n if(Array.isArray(key)){\n throw _b_.IndexError.$factory(\"no such group\")\n }\n if(key == 0){\n return self.mo.string.substring(self.mo.start, self.mo.end)\n }\n var match = self.mo.$groups[key]\n if(match !== undefined){\n return self.mo.string.substring(match.start, match.end)\n }else if(self.mo.node.$groups[key] !== undefined){\n return _b_.None\n }\n throw _b_.IndexError.$factory(\"no such group\")\n}\n\nMatchObject.__repr__ = MatchObject.__str__ = function(self){\n return self.mo.toString()\n}\n\nMatchObject.end = function(self){\n var $ = $B.args('end', 2, {self: null, group: null}, ['self', 'group'],\n arguments, {group: 0}, null, null)\n var group = MatchObject.group(self, $.group)\n if(group === _b_.None){\n return -1\n }else if($.group == 0){\n return self.mo.end\n }else{\n return self.mo.$groups[$.group].end\n }\n}\n\nMatchObject.endpos = _b_.property.$factory(\n function(self){\n return self.mo.endpos\n }\n)\n\nMatchObject.expand = function(){\n var $ = $B.args(\"expand\", 2, {self: null, template: null},\n ['self', 'template'], arguments, {}, null, null)\n var data = {\n repl: new StringObj($.template),\n }\n data = transform_repl(data, {groups: $.self.mo.node.$groups})\n if(typeof data.repl == \"function\"){\n return $B.$call(data.repl)(MatchObject.$factory($.self.mo))\n }else{\n return data.repl1\n }\n}\n\nMatchObject.group = function(self){\n var $ = $B.args(\"group\", 1, {self: null}, ['self'], arguments,\n {}, 'args', null),\n self = $.self,\n args = $.args\n if(args.length == 0){\n args[0] = 0\n }\n var groupobj = self.mo.$groups,\n result = []\n for(var group_id of args){\n if($B.rich_comp('__eq__', group_id, 0)){\n result.push(self.mo.string.substring(self.mo.start, self.mo.end))\n continue\n }\n try{\n // Convert group_id to int if possible\n group_id = $B.PyNumber_Index(group_id) // in py_utils.js\n }catch(err){\n // group_id can be an identifier\n }\n if(self.mo.node.$groups[group_id] === undefined){\n throw _b_.IndexError.$factory(\"no such group\")\n }\n var group = groupobj[group_id] // found in match\n result.push(group === undefined ?\n _b_.None :\n self.mo.string.substring(group.start, group.end))\n }\n if(args.length == 1){\n return result[0]\n }\n return $B.fast_tuple(result)\n}\n\nMatchObject.groupdict = function(){\n /*\n Return a dictionary containing all the named subgroups of the match, keyed\n by the subgroup name. The default argument is used for groups that did not\n participate in the match; it defaults to None.\n */\n var $ = $B.args(\"groupdict\", 2, {self: null, default: null},\n ['self', 'default'], arguments, {default: _b_.None},\n null, null),\n self = $.self,\n groupobj = $.self.mo.$groups,\n d = $B.empty_dict()\n for(var key in $.self.mo.node.$groups){\n if(! isFinite(key)){\n var value = groupobj[key] === undefined ? $.default :\n groupobj[key]\n if(value !== $.default){\n value = self.mo.string.substring(value.start, value.end)\n }\n _b_.dict.$setitem(d, key, value)\n }\n }\n return d\n}\n\nMatchObject.groups = function(self){\n var $ = $B.args(\"group\", 2, {self: null, default: null},\n ['self', 'default'], arguments,\n {default: _b_.None}, null, null),\n self = $.self,\n _default = $.default\n return self.mo.groups(_default)\n}\n\nMatchObject.lastindex = _b_.property.$factory(\n function(self){\n /* The integer index of the last matched capturing group, or None if\n no group was matched at all.\n */\n var last = self.mo.$groups.$last\n if(last.length == 0){\n return _b_.None\n }\n return parseInt($last(last))\n }\n)\n\nMatchObject.lastgroup = _b_.property.$factory(\n function(self){\n /* The name of the last matched capturing group, or None if the group\n didn't have a name, or if no group was matched at all.\n */\n var lastindex = MatchObject.lastindex.fget(self)\n if(lastindex === _b_.None){\n return _b_.None\n }\n var group = self.mo.node.$groups[lastindex],\n name = group.item.name\n return name === undefined ? _b_.None : name\n }\n)\n\nMatchObject.pos = _b_.property.$factory(\n function(self){\n return self.mo.start\n }\n)\n\nMatchObject.re = _b_.property.$factory(\n function(self){\n return self.mo.node.pattern\n }\n)\n\nMatchObject.regs = _b_.property.$factory(\n function(self){\n var res = [$B.fast_tuple($B.fast_tuple([self.mo.start, self.mo.end]))]\n for(var group_num in self.mo.node.$groups){\n if(isFinite(group_num)){\n var group = self.mo.node.$groups[group_num].item\n // group.pattern includes the opening and closing brackets\n res.push($B.fast_tuple([group.pos,\n group.pos + group.pattern.length - 2]))\n }\n }\n return $B.fast_tuple(res)\n }\n)\n\nMatchObject.span = function(){\n /*\n Match.span([group])\n\n For a match m, return the 2-tuple (m.start(group), m.end(group)). Note\n that if group did not contribute to the match, this is (-1, -1). group\n defaults to zero, the entire match.\n */\n var $ = $B.args(\"span\", 2, {self: null, group: null},\n ['self', 'group'], arguments,\n {group: 0}, null, null),\n self = $.self,\n group = $.group\n if(group == 0){\n return $B.fast_tuple([self.mo.start, self.mo.end])\n }\n var span = self.mo.$groups[group]\n if(span === undefined){\n return $B.fast_tuple([-1, -1])\n }\n return $B.fast_tuple([span.start, span.end])\n}\n\nMatchObject.start = function(self){\n var $ = $B.args('end', 2, {self: null, group: null}, ['self', 'group'],\n arguments, {group: 0}, null, null)\n var group = MatchObject.group(self, $.group)\n if(group === _b_.None){\n return -1\n }else if($.group == 0){\n return self.mo.start\n }else{\n return self.mo.$groups[$.group].start\n }\n}\n\nMatchObject.string = _b_.property.$factory(\n function(self){\n return self.mo.string.to_str()\n }\n)\n\n$B.set_func_names(MatchObject, 're')\n\nfunction log(){\n if(_debug.value){\n console.log.apply(null, arguments)\n }\n}\n\nfunction create_fullmatch_pattern(pattern){\n // transform into \"(?:)$\"\n // use a new pattern object, otherwise if pattern is in cache the\n // value in cache would be changed\n var new_pattern = {}\n for(var key in pattern){\n if(key == 'node'){\n continue\n }\n new_pattern[key] = pattern[key]\n }\n\n var ncgroup = new Group() // non-capturing group\n ncgroup.pos = 0\n ncgroup.non_capturing = true\n for(var item of pattern.node.items){\n ncgroup.add(item)\n }\n var se = new StringEnd()\n se.flags = Flag.$factory(32)\n new_pattern.node = new Node()\n new_pattern.node.add(ncgroup)\n new_pattern.node.add(se)\n return new_pattern\n}\n\nfunction match(pattern, string, pos, endpos, no_zero_width, groups){\n // Follow the pattern tree structure\n if(_debug.value){\n console.log('match pattern', pattern.text, 'pos', pos, string.substring(pos))\n alert()\n }\n if(endpos !== undefined){\n if(endpos < pos){\n return false\n }\n }else{\n endpos = string.length\n }\n if(pattern.node instanceof Node){\n show(pattern.node)\n }\n if(groups === undefined){\n groups = {$last:[]}\n }\n if(pattern.text === undefined){\n console.log('no text', pattern)\n }\n var node = pattern.node,\n mo\n if(node.items){\n // node is either a Choice between several items, or a sequence of\n // items\n if(node instanceof Choice){\n mo = false\n for(var _case of node.items){\n mo = match({node: _case, text: _case.text}, string, pos,\n endpos, no_zero_width, groups)\n if(mo){\n // remove groups inside choice and before successful case\n // that did not contribute to the match\n var groups_succeed = groups_in(_case),\n min_num = Math.min(Array.from(groups_succeed))\n for(var group_num of groups_in(node)){\n if(group_num < min_num){\n delete groups[group_num]\n }\n }\n if(_debug.value){\n console.log('case', _case + '', 'of choice', node +\n ' succeeds, groups', groups)\n }\n return mo\n }else{\n if(_debug.value){\n console.log('case', _case + '', 'of choice', node +\n ' fails')\n }\n }\n }\n return false\n }else{\n // sequence of items\n node.repeat = node.repeat === undefined ? {min: 1, max: 1} :\n node.repeat\n var start = pos,\n nb_repeat = 0,\n nb_zerolength_repeat = 0,\n matches = [],\n mos,\n match_start,\n empty_matches = {}\n // loop until we get enough repetitions\n while(true){\n if(empty_matches[pos]){\n // no use trying again\n return matches.length == 0 ? false :\n new GroupMO(node, start, matches, string, groups,\n endpos)\n }\n var initial_groups = Object.keys(groups)\n mos = []\n match_start = pos\n if(_debug.value){\n console.log(\"pattern\", pattern.text,\n \"loop in group match, match start\", match_start)\n }\n var i = 0\n while(i < node.items.length){\n var item = node.items[i]\n if(_debug.value){\n console.log('item', i, '/', node.items.length - 1,\n 'of pattern', pattern.text)\n }\n var mo = match({node: item, text: item + ''}, string, pos,\n endpos, no_zero_width, groups)\n if(mo){\n if(item instanceof Group &&\n item.type == \"lookahead_assertion\"){\n log(\"lookahead assertion\", item + '',\n \"succeeds, mo\", mo)\n }else{\n mos.push(mo)\n pos = mo.end\n }\n i++\n }else if(false && item instanceof Group &&\n item.type == \"negative_lookahead_assertion\"){\n log(\"negative lookahead assertion\", item, \"fails : ok !\")\n i++\n }else{\n if(_debug.value){\n console.log('item ' + item, 'of group fails, nb_repeat',\n nb_repeat, 'node repeat', node.repeat)\n }\n var backtrack = false\n while(mos.length > 0){\n var mo = mos.pop()\n if(mo.backtrack === undefined){\n log('no backtrack for', mo)\n }\n if(_debug.value){\n console.log('try backtrack on mo', mo)\n }\n if(mo.backtrack(string, groups)){\n log('can backtrack, mo', mo)\n mos.push(mo)\n i = mos.length\n log('mos', mos, 'restart at item', i)\n pos = mo.end\n backtrack = true\n break\n }\n }\n if(backtrack){\n log('backtrack ok')\n continue\n }else{\n if(node.type == \"negative_lookahead_assertion\"){\n // If a negative lookahead assertion fails,\n // return a match\n var res = new GroupMO(node, start, matches,\n string, groups, endpos)\n return res\n }\n if(nb_repeat == 0){\n // remove the groups introduced before\n // reaching this point\n for(var key in groups){\n if(initial_groups.indexOf(key) == -1){\n delete groups[key]\n }\n }\n }\n if(nb_repeat >= node.repeat.min){\n log(\"enough repetitions for node\", node)\n if(node.type == \"negative_lookahead_assertion\"){\n return false\n }\n return new GroupMO(node, start, matches, string,\n groups, endpos)\n }\n return false\n }\n }\n }\n if(node.type == \"negative_lookahead_assertion\"){\n // If a negative lookahead succeeds, return false\n return false\n }\n nb_repeat++\n if(pos > match_start){\n nb_zerolength_repeat = 0\n }else{\n nb_zerolength_repeat++\n empty_matches[pos] = true\n }\n matches.push({start: match_start, end: pos, mos})\n if(node.num !== undefined){\n groups[node.num] = $last(matches)\n if(node.name !== undefined){\n groups[node.name] = groups[node.num]\n }\n if(node.num != $last(groups.$last)){\n var ix = groups.$last.indexOf(node.num)\n if(ix > -1){\n groups.$last.splice(ix, 1)\n }\n groups.$last.push(node.num)\n }\n }\n if(nb_repeat >= node.repeat.max){\n var res = new GroupMO(node, start, matches, string,\n groups, endpos)\n if(res.start == res.end && no_zero_width){\n // no_zero_width is set when previous match in\n // iterator() had length 0; avoids infinite loops\n return false\n }\n return res\n }\n log('loop on group', pattern.text, 'nb repeats', nb_repeat,\n 'nb zero length', nb_zerolength_repeat, 'groups', groups)\n if(nb_zerolength_repeat == 65535){\n return matches.length == 0 ? false :\n new GroupMO(node, start, matches, string, groups,\n endpos)\n }\n }\n }\n }else{\n // for BackReference, Char, CharSeq, CharacterClass, CharacterSet,\n // ConditionalBackref, Lookbehind, StringStart, StringEnd\n var mo = node.match(string, pos, endpos, groups)\n if(_debug.value){\n console.log(node + '', \"mo\", mo)\n }\n if(mo){\n var len = mo.group_len === undefined ? 1 : mo.group_len,\n ix = node.non_greedy ? mo.nb_min : mo.nb_max,\n end = pos + len * ix\n return new MO(node, pos, mo, len)\n }else{\n return false\n }\n }\n}\n\n// expose re module API\nvar $module = {\n cache: cache,\n compile: function(){\n var $ = $B.args(\"compile\", 2, {pattern: null, flags: null},\n ['pattern', 'flags'], arguments, {flags: no_flag},\n null, null)\n if($.pattern && $.pattern.__class__ === Pattern){\n if($.flags !== no_flag){\n throw _b_.ValueError.$factory(\n \"cannot process flags argument with a compiled pattern\")\n }\n return $.pattern\n }\n $.pattern = check_pattern_flags($.pattern, $.flags)\n var data = prepare({pattern: $.pattern})\n if(typeof $.flags == \"number\"){\n $.flags = Flag.$factory($.flags)\n }\n var jspat = compile(data.pattern, $.flags)\n return Pattern.$factory(jspat)\n },\n error: error,\n escape: function(){\n var $ = $B.args(\"escape\", 1, {pattern: null}, ['pattern'], arguments,\n {}, null, null),\n data = prepare({pattern: $.pattern}),\n pattern = data.pattern,\n res = []\n for(var cp of pattern.codepoints){\n if(escaped.indexOf(cp) > -1){\n res.push(BACKSLASH)\n }\n res.push(cp)\n }\n res = from_codepoint_list(res, data.type)\n if(data.type == \"bytes\" && _b_.isinstance(res, _b_.str)){\n res = _b_.str.encode(res, 'latin1')\n }\n return res\n },\n findall: function(){\n /* Return all non-overlapping matches of pattern in string, as a list\n of strings. The string is scanned left-to-right, and matches are\n returned in the order found. If one or more groups are present in\n the pattern, return a list of groups; this will be a list of tuples\n if the pattern has more than one group. Empty matches are included\n in the result.\n */\n var $ = $B.args(\"findall\", 3,\n {pattern: null, string: null, flags: null},\n ['pattern', 'string', 'flags'], arguments,\n {flags: no_flag}, null, null),\n pattern = $.pattern,\n string = $.string,\n flags = $.flags,\n data\n pattern = check_pattern_flags(pattern, flags)\n if(pattern.__class__ === Pattern){\n data = prepare({string})\n }else{\n data = prepare({string, pattern})\n pattern = Pattern.$factory(compile(data.pattern, flags))\n }\n if(data.type === \"str\"){\n function conv(s){\n return s === EmptyString ? '' : s\n }\n }else{\n function conv(s){\n return string2bytes(s)\n }\n }\n\n var iter = $module.finditer.apply(null, arguments).js_gen,\n res = []\n while(true){\n var next = iter.next()\n if(next.done){\n return res\n }\n var bmo = next.value,\n mo = bmo.mo,\n groups = MatchObject.groups(bmo)\n\n // replace None by the empty string\n for(var i = 0, len = groups.length; i < len; i++){\n groups[i] = groups[i] === _b_.None ? \"\" : groups[i]\n }\n if(groups.length > 0){\n if(groups.length == 1){\n res.push(groups[0])\n }else{\n res.push($B.fast_tuple(groups))\n }\n }else{\n res.push(mo.string.substring(mo.start, mo.end))\n }\n }\n console.log(\"end findall\")\n },\n finditer: function(){\n var $ = $B.args(\"finditer\", 3,\n {pattern: null, string: null, flags: null},\n ['pattern', 'string', 'flags'], arguments,\n {flags: no_flag}, null, null),\n pattern = $.pattern,\n string = $.string,\n flags = $.flags\n if(_b_.isinstance(string, [_b_.bytearray, _b_.memoryview])){\n string.in_iteration = true\n }\n var original_string = string,\n data\n pattern = check_pattern_flags(pattern, flags)\n if(pattern.__class__ === Pattern){\n data = prepare({string})\n flags = pattern.flags\n }else{\n data = prepare({string, pattern})\n pattern = Pattern.$factory(compile(data.pattern, flags))\n }\n if(pattern.__class__ !== Pattern){\n throw Error(\"pattern not a Python object\")\n }\n return $B.generator.$factory(iterator)(pattern.$pattern, data.string,\n flags, original_string)\n },\n fullmatch: function(){\n var $ = $B.args(\"fullmatch\", 3, {pattern: null, string: null, flags: null},\n ['pattern', 'string', 'flags'], arguments,\n {flags: no_flag}, null, null),\n pattern = $.pattern,\n string = $.string,\n flags = $.flags\n pattern = check_pattern_flags(pattern, flags)\n var data\n if(pattern.__class__ === Pattern){\n data = prepare({string})\n pattern = pattern.$pattern\n }else{\n data = prepare({pattern, string})\n pattern = compile(data.pattern, flags)\n }\n\n var new_pattern = create_fullmatch_pattern(pattern)\n\n // match transformed RE\n var res = match(new_pattern, data.string, 0)\n var bmo = res === false ? _b_.None : MatchObject.$factory(res)\n if(bmo !== _b_.None){\n if(bmo.mo.string.codepoints.length != bmo.mo.end - bmo.mo.start){\n return _b_.None\n }else{\n return bmo\n }\n }\n return _b_.None\n },\n Match: MatchObject,\n match: function(){\n var $ = $B.args(\"match\", 3, {pattern: null, string: null, flags: null},\n ['pattern', 'string', 'flags'], arguments,\n {flags: no_flag}, null, null),\n pattern = $.pattern,\n string = $.string,\n flags = $.flags\n pattern = check_pattern_flags(pattern, flags)\n var data\n if(pattern.__class__ === Pattern){\n data = prepare({string})\n pattern = pattern.$pattern\n }else{\n data = prepare({pattern, string})\n pattern = compile(data.pattern, flags)\n }\n var res = match(pattern, data.string, 0)\n return res === false ? _b_.None : MatchObject.$factory(res)\n },\n Pattern,\n purge: function(){\n var $ = $B.args(\"purge\", 0, {}, [], arguments, {}, null, null)\n cache.clear()\n return _b_.None\n },\n _reconstructor,\n Scanner,\n search: function(){\n var $ = $B.args(\"search\", 3, {pattern: null, string: null, flags: null},\n ['pattern', 'string', 'flags'], arguments,\n {flags: no_flag}, null, null),\n pattern = $.pattern,\n string = $.string,\n flags = $.flags,\n data\n pattern = check_pattern_flags(pattern, flags)\n if(pattern.__class__ === Pattern){\n data = prepare({string})\n }else{\n data = prepare({string, pattern})\n pattern = Pattern.$factory(compile(data.pattern, flags))\n }\n data.pattern = pattern\n // optimizations\n if(pattern.pattern.startsWith('\\\\A') ||\n pattern.pattern.startsWith('^')){\n if(! (pattern.$pattern.node.items[0] instanceof Choice)){\n var mo = match(data.pattern.$pattern, data.string, 0)\n if(mo){\n return MatchObject.$factory(mo)\n }else if(pattern.flags.value & MULTILINE.value){\n var pos = 0,\n cp\n while((cp = data.string.cp_at(pos)) !== undefined){\n if(cp == LINEFEED){\n mo = match(data.pattern.$pattern, data.string, pos + 1)\n if(mo){\n return MatchObject.$factory(mo)\n }\n }\n pos++\n }\n }else{\n return _b_.None\n }\n }\n }\n if(pattern.$pattern.fixed_length !== false &&\n isFinite(pattern.$pattern.fixed_length) &&\n pattern.pattern.endsWith('$') &&\n ! (pattern.flags.value & MULTILINE.value)){\n var mo = match(data.pattern.$pattern, data.string,\n data.string.length - pattern.$pattern.fixed_length)\n if(mo){\n return MatchObject.$factory(mo)\n }\n return _b_.None\n }\n var pos = 0\n if(data.string.codepoints.length == 0){\n mo = match(data.pattern.$pattern, data.string, 0)\n if(mo){\n mo.start = mo.end = 0\n }\n return mo ? MatchObject.$factory(mo) : _b_.None\n }\n while(pos < data.string.codepoints.length){\n var mo = match(data.pattern.$pattern, data.string, pos)\n if(mo){\n return MatchObject.$factory(mo)\n }else{\n pos++\n }\n }\n return _b_.None\n },\n set_debug: function(value){\n _debug.value = value\n },\n split: function(){\n var $ = $B.args(\"split\", 4,\n {pattern: null, string: null, maxsplit: null, flags: null},\n ['pattern', 'string', 'maxsplit', 'flags'],\n arguments, {maxsplit: 0, flags: no_flag}, null, null)\n var res = [],\n pattern = $.pattern,\n string = $.string,\n flags = $.flags,\n pos = 0,\n nb_split = 0,\n data\n if(pattern.__class__ !== Pattern){\n data = prepare({pattern, string})\n var comp = compile(data.pattern, flags)\n pattern = Pattern.$factory(comp)\n }else{\n data = {pattern, string}\n }\n for(var bmo of $module.finditer(pattern, $.string).js_gen){\n var mo = bmo.mo, // finditer returns instances of MatchObject\n groupobj = mo.$groups\n res.push(data.string.substring(pos, mo.start))\n for(var key in mo.node.$groups){\n if(isFinite(key)){\n if(groupobj[key] !== undefined){\n res.push(data.string.substring(groupobj[key].start,\n groupobj[key].end))\n }else{\n res.push(_b_.None)\n }\n }\n }\n nb_split++\n pos = mo.end\n if(pos >= $.string.length){\n break\n }\n if($.maxsplit != 0 && nb_split >= $.maxsplit){\n break\n }\n }\n res.push(data.string.substring(pos))\n if(data.type === \"bytes\"){\n res = res.map(\n function(x){\n return _b_.isinstance(x, _b_.bytes) ?\n x :\n _b_.str.encode(x, \"latin-1\")\n }\n )\n }\n return res\n },\n sub: function(){\n var $ = $B.args(\"sub\", 5,\n {pattern: null, repl: null, string: null, count: null, flags: null},\n ['pattern', 'repl', 'string', 'count', 'flags'],\n arguments, {count: 0, flags: no_flag}, null, null),\n pattern = $.pattern,\n repl = $.repl,\n string = $.string,\n count = $.count,\n flags = $.flags,\n data\n check_pattern_flags(pattern, flags)\n if(typeof repl != \"function\"){\n if(pattern.__class__ != Pattern){\n data = prepare({pattern, string, repl})\n pattern = compile(data.pattern, flags)\n }else{\n data = prepare({string, repl})\n flags = pattern.flags\n pattern = pattern.$pattern\n }\n data = transform_repl(data, pattern)\n }else{\n if(pattern.__class__ != Pattern){\n data = prepare({pattern, string})\n pattern = compile(data.pattern, flags)\n }else{\n data = prepare({string})\n flags = pattern.flags\n pattern = pattern.$pattern\n }\n data.repl = repl\n }\n return subn(pattern, data.repl, data.string, count, flags)[0]\n },\n subn: function(){\n var $ = $B.args(\"sub\", 5,\n {pattern: null, repl: null, string: null, count: null, flags: null},\n ['pattern', 'repl', 'string', 'count', 'flags'],\n arguments, {count: 0, flags: no_flag}, null, null),\n pattern = $.pattern,\n repl = $.repl,\n string = $.string,\n count = $.count,\n flags = $.flags,\n data\n if(pattern.__class__ != Pattern){\n data = prepare({pattern, repl, string})\n }else{\n data = prepare({repl, string})\n data.pattern = pattern.$pattern\n }\n return $B.fast_tuple(subn(data.pattern, data.repl, data.string, count,\n flags))\n }\n\n}\n\nvar ASCII = $module.A = $module.ASCII = Flag.$factory(256)\nvar IGNORECASE = $module.I = $module.IGNORECASE = Flag.$factory(2)\nvar LOCALE = $module.L = $module.LOCALE = Flag.$factory(4)\nvar MULTILINE = $module.M = $module.MULTILINE = Flag.$factory(8)\nvar DOTALL = $module.S = $module.DOTALL = Flag.$factory(16)\nvar U = $module.U = $module.UNICODE = Flag.$factory(32)\nvar VERBOSE = $module.X = $module.VERBOSE = Flag.$factory(64)\n$module.cache = cache\n$module._compile = $module.compile\n\n\nvar inline_flags = {\n i: IGNORECASE,\n L: LOCALE,\n m: MULTILINE,\n s: DOTALL,\n u: U,\n x: VERBOSE,\n a: ASCII\n}\n\nvar flag_names = {\n i: 'IGNORECASE',\n L: 'LOCALE',\n m: 'MULTILINE',\n s: 'DOTALL',\n u: 'U',\n x: 'VERBOSE',\n a: 'ASCII'\n}\n"], "unicodedata": [".js", "// Implementation of unicodedata\n\nvar $module = (function($B){\n\n var _b_ = $B.builtins\n\n // Load unicode table if not already loaded\n if($B.unicodedb === undefined){\n var xhr = new XMLHttpRequest\n xhr.open(\"GET\",\n $B.brython_path + \"unicode.txt\", false)\n xhr.onreadystatechange = function(){\n if(this.readyState == 4){\n if(this.status == 200){\n $B.unicodedb = this.responseText\n }else{\n console.log(\"Warning - could not \" +\n \"load unicode.txt\")\n }\n }\n }\n xhr.send()\n }\n\n function _info(chr){\n var ord = _b_.ord(chr),\n hex = ord.toString(16).toUpperCase()\n while(hex.length < 4){hex = \"0\" + hex}\n var re = new RegExp(\"^\" + hex +\";(.+?);(.*?);(.*?);(.*?);(.*?);(.*);(.*);(.*)$\",\n \"m\"),\n search = re.exec($B.unicodedb)\n if(search === null){\n return null\n }else{\n return {\n name: search[1],\n category: search[2],\n combining: search[3],\n bidirectional: search[4],\n decomposition: search[5],\n decimal: search[6],\n digit: search[7],\n numeric: search[8]\n }\n }\n }\n\n function bidirectional(chr){\n var search = _info(chr)\n if(search === null){\n console.log(\"error\", chr, hex)\n throw _b_.KeyError.$factory(chr)\n }\n return search.bidirectional\n }\n\n function category(chr){\n // Returns the general category assigned to the character chr as\n // string.\n if($B.is_unicode_cn(chr.codePointAt(0))){ // in unicode_data.js\n return \"Cn\"\n }\n var search = _info(chr)\n if(search === null){\n console.log(\"error\", chr)\n throw _b_.KeyError.$factory(chr)\n }\n return search.category\n }\n\n function combining(chr){\n // Returns the general category assigned to the character chr as\n // string.\n var search = _info(chr)\n if(search === null){\n console.log(\"error\", chr)\n throw _b_.KeyError.$factory(chr)\n }\n return parseInt(search.combining)\n }\n\n function decimal(chr, _default){\n // Returns the decimal value assigned to the character chr as integer.\n // If no such value is defined, default is returned, or, if not given,\n // ValueError is raised.\n var search = _info(chr)\n if(search === null){\n console.log(\"error\", chr)\n throw _b_.KeyError.$factory(chr)\n }\n return parseInt(search.decimal)\n }\n\n function decomposition(chr, _default){\n // Returns the decimal value assigned to the character chr as integer.\n // If no such value is defined, default is returned, or, if not given,\n // ValueError is raised.\n var search = _info(chr)\n if(search === null){\n console.log(\"error\", chr)\n throw _b_.KeyError.$factory(chr)\n }\n return search.decomposition\n }\n\n function digit(chr, _default){\n // Returns the decimal value assigned to the character chr as integer.\n // If no such value is defined, default is returned, or, if not given,\n // ValueError is raised.\n var search = _info(chr)\n if(search === null){\n console.log(\"error\", chr)\n throw _b_.KeyError.$factory(chr)\n }\n return parseInt(search.digit)\n }\n\n function lookup(name){\n // Look up character by name. If a character with the given name is\n // found, return the corresponding character. If not found, KeyError\n // is raised.\n var re = new RegExp(\"^([0-9A-F]+);\" +\n name + \";(.*)$\", \"m\")\n search = re.exec($B.unicodedb)\n if(search === null){\n throw _b_.KeyError.$factory(\"undefined character name '\" +\n name + \"'\")\n }\n var res = parseInt(search[1], 16)\n return _b_.chr(res)\n }\n\n function name(chr, _default){\n // Returns the name assigned to the character chr as a string. If no\n // name is defined, default is returned, or, if not given, ValueError\n // is raised.\n var search = _info(chr)\n if(search === null){\n if(_default){return _default}\n throw _b_.KeyError.$factory(\"undefined character name '\" +\n chr + \"'\")\n }\n return search.name\n }\n\n function _norm(form, chr){\n var search = _info(chr)\n if(search === null){\n throw _b_.KeyError.$factory(chr)\n }\n switch(form){\n case \"NFC\":\n return chr\n case \"NFD\":\n var decomp = decomposition(chr),\n parts = decomp.split(\" \"),\n res = \"\"\n if(parts[0].startsWith(\"<\")){\n return chr\n }\n parts.forEach(function(part){\n if(! part.startsWith(\"<\")){\n res += _b_.chr(parseInt(part, 16))\n }\n })\n return res\n case \"NFKC\":\n var decomp = decomposition(chr),\n parts = decomp.split(\" \")\n if(parts[0] == \"\"){\n var res = \"\"\n parts.slice(1).forEach(function(part){\n res += _b_.chr(parseInt(part, 16))\n })\n return res\n }\n return chr\n case \"NFKD\":\n var decomp = decomposition(chr),\n parts = decomp.split(\" \")\n if(parts[0] == \"\"){\n var res = \"\"\n parts.slice(1).forEach(function(part){\n res += _b_.chr(parseInt(part, 16))\n })\n return res\n }\n return chr\n\n default:\n throw _b_.ValueError.$factory(\"invalid normalization form\")\n }\n }\n\n function normalize(form, unistr){\n var res = \"\"\n for(var i = 0, len = unistr.length; i < len; i++){\n res += _norm(form, unistr.charAt(i))\n }\n return res\n }\n\n function numeric(chr, _default){\n // Returns the decimal value assigned to the character chr as integer.\n // If no such value is defined, default is returned, or, if not given,\n // ValueError is raised.\n var search = _info(chr)\n if(search === null){\n if(_default){return _default}\n throw _b_.KeyError.$factory(chr)\n }\n var parts = search.numeric.split('/'),\n value\n if(parts.length == 1){\n value = parseFloat(search.numeric)\n }else{\n value = parseInt(parts[0]) / parseInt(parts[1])\n }\n return $B.fast_float(value)\n }\n\n var module = {\n bidirectional: bidirectional,\n category: category,\n combining: combining,\n decimal: decimal,\n decomposition: decomposition,\n digit: digit,\n lookup: lookup,\n name: name,\n normalize: normalize,\n numeric: numeric,\n unidata_version: \"11.0.0\"\n }\n module.ucd_3_2_0 = {}\n for(var key in module){\n if(key == \"unidata_version\"){\n module.ucd_3_2_0[key] = '3.2.0'\n }else{\n module.ucd_3_2_0[key] = module[key] // approximation...\n }\n }\n return module\n\n})(__BRYTHON__)"], "_aio": [".js", "// Replacement for asyncio.\n//\n// CPython asyncio can't be implemented for Brython because it relies on\n// blocking function (eg run(), run_until_complete()), and such functions\n// can't be defined in Javascript. It also manages an event loop, and a\n// browser only has its own built-in event loop.\n//\n// This module exposes functions whose result can be \"await\"-ed inside\n// asynchrounous functions defined by \"async def\".\n\nvar $module = (function($B){\n\nvar _b_ = $B.builtins\n\nvar responseType = {\n \"text\": \"text\",\n \"binary\": \"arraybuffer\",\n \"dataURL\": \"arraybuffer\"\n}\n\nfunction handle_kwargs(kw, method){\n // kw was created with $B.obj_dict(), its keys/values are in kw.$jsobj\n var data,\n cache = false,\n format = \"text\",\n headers = {},\n timeout = {}\n for(var key in kw.$jsobj){\n if(key == \"data\"){\n var params = kw.$jsobj[key]\n if(typeof params == \"string\"){\n data = params\n }else if(_b_.isinstance(params, _b_.bytes)){\n data = new ArrayBuffer(params.source.length)\n var array = new Int8Array(data)\n for(var i = 0, len = params.source.length; i < len; i++){\n array[i] = params.source[i]\n }\n }else{\n if(params.__class__ !== _b_.dict){\n throw _b_.TypeError.$factory(\"wrong type for data, \" +\n \"expected dict, bytes or str, got \" +\n $B.class_name(params))\n }\n var items = []\n for(var key of _b_.dict.$keys_string(params)){\n var value = _b_.dict.$getitem_string(params, key)\n items.push(encodeURIComponent(key) + \"=\" +\n encodeURIComponent($B.pyobj2jsobj(value)))\n }\n data = items.join(\"&\")\n }\n }else if(key == \"headers\"){\n var value = kw.$jsobj[key]\n if(! _b_.isinstance(value, _b_.dict)){\n throw _b_.ValueError.$factory(\n \"headers must be a dict, not \" + $B.class_name(value))\n }\n for(var key of _b_.dict.$keys_string(value)){\n headers[key.toLowerCase()] = _b_.dict.$getitem_string(value, key)\n }\n }else if(key.startsWith(\"on\")){\n var event = key.substr(2)\n if(event == \"timeout\"){\n timeout.func = kw.$jsobj[key]\n }else{\n ajax.bind(self, event, kw.$jsobj[key])\n }\n }else if(key == \"timeout\"){\n timeout.seconds = kw.$jsobj[key]\n }else if(key == \"cache\"){\n cache = kw.$jsobj[key]\n }else if(key == \"format\"){\n format = kw.$jsobj[key]\n }\n }\n if(method == \"post\"){\n // For POST requests, set default header\n if(! headers.hasOwnProperty(\"Content-type\")){\n headers[\"Content-Type\"] = \"application/x-www-form-urlencoded\"\n }\n }\n return {\n body: data,\n cache,\n format,\n timeout,\n headers\n }\n}\n\nfunction ajax(){\n var $ = $B.args(\"ajax\", 2, {method: null, url: null},\n [\"method\", \"url\"], arguments, {},\n null, \"kw\"),\n method = $.method.toUpperCase(),\n url = $.url,\n kw = $.kw\n var args = handle_kwargs(kw, \"get\")\n if(method == \"GET\" && ! args.cache){\n url = url + \"?ts\" + (new Date()).getTime() + \"=0\"\n }\n if(args.body && method == \"GET\"){\n url = url + (args.cache ? \"?\" : \"&\") + args.body\n }\n var func = function(){\n return new Promise(function(resolve, reject){\n var xhr = new XMLHttpRequest()\n xhr.open(method, url, true)\n for(var key in args.headers){\n xhr.setRequestHeader(key, args.headers[key])\n }\n xhr.format = args.format\n xhr.responseType = responseType[args.format]\n xhr.onreadystatechange = function(){\n if(this.readyState == 4){\n this.__class__ = HTTPRequest\n resolve(this)\n }\n }\n if(args.body &&\n ['POST', 'PUT', 'DELETE', 'PATCH'].indexOf(method) > -1){\n xhr.send(args.body)\n }else{\n xhr.send()\n }\n })\n }\n func.$infos = {\n __name__: \"ajax_\" + method\n }\n return {\n __class__: $B.coroutine,\n $args: [url, args],\n $func: func\n }\n}\n\nfunction event(){\n // event(element, *names) is a Promise on the events \"names\" happening on\n // the element. This promise always resolves (never rejects) with the\n // first triggered DOM event.\n var $ = $B.args(\"event\", 1, {element: null},\n [\"element\"], arguments, {}, \"names\", null),\n element = $.element,\n names = $.names\n return new Promise(function(resolve){\n var callbacks = []\n names.forEach(function(name){\n var callback = function(evt){\n // When one of the handled events is triggered, all bindings\n // are removed\n callbacks.forEach(function(items){\n $B.DOMNode.unbind(element, items[0], items[1])\n })\n resolve($B.$DOMEvent(evt))\n }\n callbacks.push([name, callback])\n $B.DOMNode.bind(element, name, callback)\n })\n })\n}\n\nvar HTTPRequest = $B.make_class(\"Request\")\n\nHTTPRequest.data = _b_.property.$factory(function(self){\n if(self.format == \"binary\"){\n var view = new Uint8Array(self.response)\n return _b_.bytes.$factory(Array.from(view))\n }else if(self.format == \"text\"){\n return self.responseText\n }else if(self.format == \"dataURL\"){\n var base64String = btoa(String.fromCharCode.apply(null,\n new Uint8Array(self.response)))\n return \"data:\" + self.getResponseHeader(\"Content-Type\") +\n \";base64,\" + base64String\n }\n})\n\nHTTPRequest.response_headers = _b_.property.$factory(function(self){\n var headers = self.getAllResponseHeaders()\n if(headers === null){return _b_.None}\n var res = $B.empty_dict()\n if(headers.length > 0){\n // Convert the header string into an array\n // of individual headers\n var lines = headers.trim().split(/[\\r\\n]+/)\n // Create a map of header names to values\n lines.forEach(function(line){\n var parts = line.split(': ')\n var header = parts.shift()\n var value = parts.join(': ')\n _b_.dict.$setitem(res, header, value)\n })\n }\n return res\n})\n\nfunction get(){\n return ajax.bind(null, \"GET\").apply(null, arguments)\n}\n\nfunction iscoroutine(f){\n return f.__class__ === $B.coroutine\n}\n\nfunction iscoroutinefunction(f){\n return (f.$infos.__code__.co_flags & 128) != 0\n}\n\nfunction post(){\n return ajax.bind(null, \"POST\").apply(null, arguments)\n}\n\nfunction run(coro){\n var handle_success = function(){\n $B.leave_frame()\n },\n handle_error = $B.show_error\n\n var $ = $B.args(\"run\", 3, {coro: null, onsuccess: null, onerror: null},\n [\"coro\", \"onsuccess\", \"onerror\"], arguments,\n {onsuccess: handle_success, onerror: handle_error},\n null, null),\n coro = $.coro,\n onsuccess = $.onsuccess,\n onerror = $.onerror\n\n if(onerror !== handle_error){\n function error_func(exc){\n try{\n onerror(exc)\n }catch(err){\n handle_error(err)\n }\n }\n }else{\n error_func = handle_error\n }\n\n var save_stack = $B.frames_stack.slice()\n $B.coroutine.send(coro).then(onsuccess).catch(error_func)\n $B.frames_stack = save_stack\n return _b_.None\n}\n\nfunction sleep(seconds){\n if(seconds.__class__ === _b_.float){\n seconds = seconds.value\n }else if(typeof seconds != \"number\"){\n throw _b_.TypeError.$factory(\"'sleep' argument must be \" +\n \"int or float, not \" + $B.class_name(seconds))\n }\n var func = function(){\n return new Promise(resolve => setTimeout(\n function(){resolve(_b_.None)}, 1000 * seconds))\n }\n func.$infos = {\n __name__: \"sleep\"\n }\n return {\n __class__: $B.coroutine,\n $args: [seconds],\n $func: func\n }\n}\n\nfunction make_error(name, module){\n var error_obj = {\n $name: name,\n $qualname: module + '.' + name,\n $is_class: true,\n __module__: module\n }\n var error = $B.$class_constructor(name, error_obj,\n _b_.tuple.$factory([_b_.Exception]), [\"_b_.Exception\"], [])\n error.__doc__ = _b_.None\n error.$factory = $B.$instance_creator(error)\n $B.set_func_names(error, module)\n return error\n}\n\n\nvar InvalidStateError = $B.make_class('InvalidStateError')\nInvalidStateError.__bases__ = [_b_.Exception, _b_.object]\nInvalidStateError.__mro__ = [_b_.Exception, _b_.object]\n$B.set_func_names(InvalidStateError, 'browser.aio')\n\nvar CancelledError = $B.make_class('CancelledError')\nCancelledError.__bases__ = [_b_.Exception, _b_.object]\nCancelledError.__mro__ = [_b_.Exception, _b_.object]\n$B.set_func_names(CancelledError, 'browser.aio')\n\n\nvar Future = $B.make_class(\"Future\",\n function(){\n var methods = {}\n var promise = new Promise(function(resolve, reject){\n methods.resolve = resolve\n methods.reject = reject\n })\n promise._methods = methods\n promise._done = false\n promise.__class__ = Future\n return promise\n }\n)\n\nFuture.done = function(){\n var $ = $B.args('done', 1, {self:null},\n ['self'], arguments, {}, null, null)\n return !! self._done\n}\n\nFuture.set_result = function(self, value){\n var $ = $B.args('set_result', 2, {self:null, value: null},\n ['self', 'value'], arguments, {}, null, null)\n self._done = true\n return self._methods.resolve(value)\n}\n\nFuture.set_exception = function(self, exception){\n var $ = $B.args('set_exception', 2, {self:null, exception: null},\n ['self', 'exception'], arguments, {}, null, null)\n self._done = true\n return self._methods.reject(exception)\n}\n\n$B.set_func_names(Future, 'browser.aio')\n\nreturn {\n ajax,\n event,\n get,\n iscoroutine,\n iscoroutinefunction,\n post,\n run,\n sleep,\n Future\n}\n\n})(__BRYTHON__)\n"], "_ajax": [".js", "// ajax\nvar $module = (function($B){\n\n\nvar $N = $B.builtins.None,\n _b_ = $B.builtins\n\nvar add_to_res = function(res, key, val) {\n if(_b_.isinstance(val, _b_.list)){\n for (j = 0; j < val.length; j++) {\n add_to_res(res, key, val[j])\n }\n }else if (val instanceof File || val instanceof Blob){\n res.append(key, val)\n }else{res.append(key, _b_.str.$factory(val))}\n}\n\nfunction set_timeout(self, timeout){\n if(timeout.seconds !== undefined){\n self.js.$requestTimer = setTimeout(\n function() {\n self.js.abort()\n if(timeout.func){\n timeout.func()\n }\n },\n timeout.seconds * 1000)\n }\n}\n\nfunction _read(req){\n var xhr = req.js\n if(xhr.responseType == \"json\"){\n return $B.structuredclone2pyobj(xhr.response)\n }\n if(req.charset_user_defined){\n // on blocking mode, xhr.response is a string\n var bytes = []\n for(var i = 0, len = xhr.response.length; i < len; i++){\n var cp = xhr.response.codePointAt(i)\n if(cp > 0xf700){\n bytes.push(cp - 0xf700)\n }else{\n bytes.push(cp)\n }\n }\n }else if(typeof xhr.response == \"string\"){\n if(req.mode == 'binary'){\n return _b_.str.encode(xhr.response, req.encoding || 'utf-8')\n }\n return xhr.response\n }else{\n // else it's an ArrayBuffer\n var buf = new Uint8Array(xhr.response),\n bytes = Array.from(buf.values())\n }\n var b = _b_.bytes.$factory(bytes)\n if(req.mode == \"binary\"){\n return b\n }else if(req.mode == \"document\"){\n return $B.JSObj.$factory(xhr.response)\n }else{\n var encoding = req.encoding || \"utf-8\"\n return _b_.bytes.decode(b, encoding)\n }\n}\n\nfunction stringify(d){\n var items = []\n for(var entry of $B.make_js_iterator(_b_.dict.items(d))){\n items.push(encodeURIComponent(entry[0]) + \"=\" +\n encodeURIComponent(entry[1]))\n }\n return items.join(\"&\")\n}\n\nfunction handle_kwargs(self, kw, method){\n // kw was created with $B.obj_dict(), its keys/values are in kw.$jsobj\n var data,\n encoding,\n headers={},\n cache,\n mode = \"text\",\n timeout = {}\n\n for(var key in kw.$jsobj){\n if(key == \"data\"){\n var params = kw.$jsobj[key]\n if(typeof params == \"string\" || params instanceof FormData){\n data = params\n }else if(params.__class__ === _b_.dict){\n var from_dict = []\n for(var key of $B.make_js_iterator(_b_.dict.keys(params))){\n if(typeof key !== 'string'){\n throw _b_.ValueError.$factory(\n 'data only supports string keys, got ' +\n `'${$B.class_name(key)}' object`)\n }\n from_dict.push(`${key}=${_b_.dict.$getitem(params, key)}`)\n }\n data = from_dict.join('&')\n }else{\n throw _b_.TypeError.$factory(\"wrong type for data: \" +\n $B.class_name(params))\n }\n }else if(key == \"encoding\"){\n encoding = kw.$jsobj[key]\n }else if(key == \"headers\"){\n var value = kw.$jsobj[key]\n if(! _b_.isinstance(value, _b_.dict)){\n throw _b_.ValueError.$factory(\n \"headers must be a dict, not \" + $B.class_name(value))\n }\n for(var key of _b_.dict.$keys_string(value)){\n headers[key.toLowerCase()] = _b_.dict.$getitem_string(value, key)\n }\n }else if(key.startsWith(\"on\")){\n var event = key.substr(2)\n if(event == \"timeout\"){\n timeout.func = kw.$jsobj[key]\n }else{\n var f = kw.$jsobj[key]\n ajax.bind(self, event, f)\n }\n }else if(key == \"mode\"){\n var mode = kw.$jsobj[key]\n }else if(key == \"timeout\"){\n timeout.seconds = kw.$jsobj[key]\n }else if(key == \"cache\"){\n cache = kw.$jsobj[key]\n }\n }\n if(encoding && mode != \"text\"){\n throw _b_.ValueError.$factory(\"encoding not supported for mode \" +\n mode)\n }\n if((method == \"post\" || method == \"put\") && ! headers){\n // For POST requests, set default header\n self.js.setRequestHeader(\"Content-type\",\n \"application/x-www-form-urlencoded\")\n }\n\n return {cache, data, encoding, headers, mode, timeout}\n}\n\nvar ajax = $B.make_class('ajax')\n\najax.__repr__ = function(self){\n return ''\n}\n\najax.__getattribute__ = function(self, attr){\n if(ajax[attr] !== undefined){\n return function(){\n return ajax[attr].call(null, self, ...arguments)\n }\n }else if(attr == \"text\"){\n return _read(self)\n }else if(attr == \"json\"){\n if(self.js.responseType == \"json\"){\n return _read(self)\n }else{\n var resp = _read(self)\n try{\n return $B.structuredclone2pyobj(JSON.parse(resp))\n }catch(err){\n console.log('attr json, invalid resp', resp)\n throw err\n }\n }\n }else if(self.js[attr] !== undefined){\n if(typeof self.js[attr] == \"function\"){\n return function(){\n if(attr == \"setRequestHeader\"){\n ajax.set_header.call(null, self, ...arguments)\n }else{\n if(attr == 'overrideMimeType'){\n console.log('override mime type')\n self.hasMimeType = true\n }\n return self.js[attr](...arguments)\n }\n }\n }else{\n return self.js[attr]\n }\n }else if(attr == \"xml\"){\n return $B.JSObj.$factory(self.js.responseXML)\n }\n}\n\najax.bind = function(self, evt, func){\n // req.bind(evt,func) is the same as req.onevt = func\n self.js['on' + evt] = function(){\n try{\n return func.apply(null, arguments)\n }catch(err){\n $B.handle_error(err)\n }\n }\n return _b_.None\n}\n\najax.open = function(){\n var $ = $B.args('open', 4,\n {self: null, method: null, url: null, async: null},\n ['self', 'method', 'url', 'async'], arguments,\n {async: true}, null, null),\n self = $.self,\n method = $.method,\n url = $.url,\n async = $.async\n if(typeof method !== \"string\"){\n throw _b_.TypeError.$factory(\n 'open() argument method should be string, got ' +\n $B.class_name(method))\n }\n if(typeof url !== \"string\"){\n throw _b_.TypeError.$factory(\n 'open() argument url should be string, got ' +\n $B.class_name(url))\n }\n self.$method = method\n self.blocking = ! self.async\n self.js.open(method, url, async)\n}\n\najax.read = function(self){\n return _read(self)\n}\n\najax.send = function(self, params){\n // params can be Python dictionary or string\n var content_type\n for(var key in self.headers){\n var value = self.headers[key]\n self.js.setRequestHeader(key, value)\n if(key == 'content-type'){\n content_type = value\n }\n }\n if((self.encoding || self.blocking) && ! self.hasMimeType){\n // On blocking mode, or if an encoding has been specified,\n // override Mime type so that bytes are not processed\n // (unless the Mime type has been explicitely set)\n self.js.overrideMimeType('text/plain;charset=x-user-defined')\n self.charset_user_defined = true\n }\n var res = ''\n if(! params){\n self.js.send()\n return _b_.None\n }\n if(_b_.isinstance(params, _b_.str)){\n res = params\n }else if(_b_.isinstance(params, _b_.dict)){\n if(content_type == 'multipart/form-data'){\n // The FormData object serializes the data in the 'multipart/form-data'\n // content-type so we may as well override that header if it was set\n // by the user.\n res = new FormData()\n var items = _b_.list.$factory(_b_.dict.items(params))\n for(var i = 0, len = items.length; i < len; i++){\n add_to_res(res, _b_.str.$factory(items[i][0]), items[i][1])\n }\n }else{\n if(self.$method && self.$method.toUpperCase() == \"POST\" &&\n ! content_type){\n // Set default Content-Type for POST requests\n self.js.setRequestHeader(\"Content-Type\",\n \"application/x-www-form-urlencoded\")\n }\n var items = _b_.list.$factory(_b_.dict.items(params))\n for(var i = 0, len = items.length; i < len; i++){\n var key = encodeURIComponent(_b_.str.$factory(items[i][0]));\n if(_b_.isinstance(items[i][1], _b_.list)){\n for (j = 0; j < items[i][1].length; j++) {\n res += key +'=' +\n encodeURIComponent(_b_.str.$factory(items[i][1][j])) + '&'\n }\n }else{\n res += key + '=' +\n encodeURIComponent(_b_.str.$factory(items[i][1])) + '&'\n }\n }\n res = res.substr(0, res.length - 1)\n }\n }else if(params instanceof FormData){\n res = params\n }else{\n throw _b_.TypeError.$factory(\n \"send() argument must be string or dictionary, not '\" +\n _b_.str.$factory(params.__class__) + \"'\")\n }\n self.js.send(res)\n return _b_.None\n}\n\najax.set_header = function(self, key, value){\n self.headers[key.toLowerCase()] = value\n}\n\najax.set_timeout = function(self, seconds, func){\n self.js.$requestTimer = setTimeout(\n function() {\n self.js.abort()\n func()\n },\n seconds * 1000)\n}\n\najax.$factory = function(){\n\n if(window.XMLHttpRequest){// code for IE7+, Firefox, Chrome, Opera, Safari\n var xmlhttp = new XMLHttpRequest()\n }else{// code for IE6, IE5\n var xmlhttp = new ActiveXObject(\"Microsoft.XMLHTTP\")\n }\n xmlhttp.onreadystatechange = function(){\n // here, \"this\" refers to xmlhttp\n var state = this.readyState\n if(this.responseType == \"\" || this.responseType == \"text\"){\n res.js.text = this.responseText\n }\n var timer = this.$requestTimer\n if(state == 0 && this.onuninitialized){\n this.onuninitialized(res)\n }else if(state == 1 && this.onloading){\n this.onloading(res)\n }else if(state == 2 && this.onloaded){\n this.onloaded(res)\n }else if(state == 3 && this.oninteractive){\n this.oninteractive(res)\n }else if(state == 4 && this.oncomplete){\n if(timer !== null){\n window.clearTimeout(timer)\n }\n this.oncomplete(res)\n }\n }\n var res = {\n __class__: ajax,\n js: xmlhttp,\n headers: {}\n }\n return res\n}\n\nfunction _request_without_body(method){\n var $ = $B.args(method, 3, {method: null, url: null, blocking: null},\n [\"method\", \"url\", \"blocking\"], arguments, {blocking: false},\n null, \"kw\"),\n method = $.method,\n url = $.url,\n async = !$.blocking,\n kw = $.kw\n var self = ajax.$factory()\n self.blocking = $.blocking\n var items = handle_kwargs(self, kw, method),\n mode = self.mode = items.mode,\n encoding = self.encoding = items.encoding\n qs = items.data,\n timeout = items.timeout\n set_timeout(self, timeout)\n if(qs){\n url += \"?\" + qs\n }\n if(! (items.cache === true)){\n url += (qs ? \"&\" : \"?\") + (new Date()).getTime()\n }\n self.js.open(method.toUpperCase(), url, async)\n\n if(async){\n if(mode == \"json\" || mode == \"document\"){\n self.js.responseType = mode\n }else{\n self.js.responseType = \"arraybuffer\"\n if(mode != \"text\" && mode != \"binary\"){\n throw _b_.ValueError.$factory(\"invalid mode: \" + mode)\n }\n }\n }else{\n self.js.overrideMimeType('text/plain;charset=x-user-defined')\n self.charset_user_defined = true\n }\n for(var key in items.headers){\n self.js.setRequestHeader(key, items.headers[key])\n }\n // Add function read() to return str or bytes according to mode\n self.js.send()\n}\n\nfunction _request_with_body(method){\n var $ = $B.args(method, 3, {method: null, url: null, blocking: null},\n [\"method\", \"url\", \"blocking\"], arguments, {blocking: false},\n null, \"kw\"),\n method = $.method,\n url = $.url,\n async = !$.blocking,\n kw = $.kw,\n content_type\n var self = ajax.$factory()\n self.js.open(method.toUpperCase(), url, async)\n var items = handle_kwargs(self, kw, method),\n data = items.data,\n timeout = items.timeout\n if(_b_.isinstance(data, _b_.dict)){\n data = stringify(data)\n }\n\n set_timeout(self, timeout)\n for(var key in items.headers){\n var value = items.headers[key]\n self.js.setRequestHeader(key, value)\n if(key == 'content-type'){\n content_type = value\n }\n }\n if(method.toUpperCase() == 'POST' && !content_type){\n // set default Content-Type for POST requests\n self.js.setRequestHeader('Content-Type',\n 'application/x-www-form-urlencoded')\n }\n\n // Add function read() to return str or bytes according to mode\n self.js.read = function(){\n return _read(self)\n }\n self.js.send(data)\n}\n\nfunction form_data(form){\n var missing = {},\n $ = $B.args('form_data', 1, {form: null}, ['form'], arguments,\n {form: missing}, null, null)\n if($.form === missing){\n return new FormData()\n }else{\n return new FormData($.form)\n }\n}\n\nfunction connect(){\n _request_without_body.call(null, \"connect\", ...arguments)\n}\n\nfunction _delete(){\n _request_without_body.call(null, \"delete\", ...arguments)\n}\n\nfunction get(){\n _request_without_body.call(null, \"get\", ...arguments)\n}\n\nfunction head(){\n _request_without_body.call(null, \"head\", ...arguments)\n}\n\nfunction options(){\n _request_without_body.call(null, \"options\", ...arguments)\n}\n\nfunction patch(){\n _request_with_body.call(null, \"put\", ...arguments)\n}\n\nfunction post(){\n _request_with_body.call(null, \"post\", ...arguments)\n}\n\nfunction put(){\n _request_with_body.call(null, \"put\", ...arguments)\n}\n\nfunction trace(){\n _request_without_body.call(null, \"trace\", ...arguments)\n}\n\nfunction file_upload(){\n // ajax.file_upload(url, file, method=\"POST\", **callbacks)\n var $ = $B.args(\"file_upload\", 2, {url: null, \"file\": file},\n [\"url\", \"file\"], arguments, {}, null, \"kw\"),\n url = $.url,\n file = $.file,\n kw = $.kw\n\n var self = ajax.$factory(),\n method = 'POST',\n field_name = 'filetosave'\n\n var items = handle_kwargs(self, kw, method),\n data = items.data,\n headers = items.headers,\n timeout = items.timeout\n\n for(var key in items.headers){\n var value = items.headers[key]\n self.js.setRequestHeader(key, value)\n if(key == 'content-type'){\n content_type = value\n }\n }\n set_timeout(self, timeout)\n\n if(kw.$jsobj.hasOwnProperty('method')){\n method = kw.$jsobj.method\n }\n\n if(kw.$jsobj.hasOwnProperty('field_name')){\n field_name = kw.$jsobj.field_name\n }\n\n var formdata = new FormData()\n formdata.append(field_name, file, file.name)\n\n if(items.data){\n if(items.data instanceof FormData){\n // append additional data\n for(var d of items.data){\n formdata.append(d[0], d[1])\n }\n }else if(_b_.isinstance(items.data, _b_.dict)){\n for(var d of _b_.list.$factory(_b_.dict.items(items.data))){\n formdata.append(d[0], d[1])\n }\n }else{\n throw _b_.ValueError.$factory(\n 'data value must be a dict of form_data')\n }\n }\n\n self.js.open(method, url, _b_.True)\n self.js.send(formdata)\n\n for(var key in kw.$jsobj){\n if(key.startsWith(\"on\")){\n ajax.bind(self, key.substr(2), kw.$jsobj[key])\n }\n }\n}\n\n$B.set_func_names(ajax)\n\nreturn {\n ajax: ajax,\n Ajax: ajax,\n delete: _delete,\n file_upload: file_upload,\n connect,\n form_data,\n get,\n head,\n options,\n patch,\n post,\n put,\n trace\n}\n\n})(__BRYTHON__)\n"], "_ast": [".js", "var $module = (function($B){\n\nvar _b_ = $B.builtins,\n ast = $B.ast, // created in py2js\n mod = {}\nmod.PyCF_ONLY_AST = $B.PyCF_ONLY_AST\nmod.AST = $B.AST // in builtin_modules.js\n$B.create_python_ast_classes() // in py_ast.js\nfor(var klass in ast){\n mod[klass] = $B.python_ast_classes[klass]\n}\n\nvar Load = 'Load',\n Store = 'Store',\n Del = 'Del'\n\n// Note: the ensure_literal_* functions are only used to validate a restricted\n// set of non-recursive literals that have already been checked with\n// validate_expr, so they don't accept the validator state\nfunction ensure_literal_number(exp, allow_real, allow_imaginary){\n if(exp.__class__ !== mod.Constant){\n return false\n }\n var value = exp.value\n if(allow_real && _b_.isinstance(value, [_b_.int, _b_.float])){\n return true\n }\n if(allow_imaginary && _b_.isinstance(value, _b_.complex)){\n return true\n }\n return false\n}\n\nfunction ensure_literal_negative(exp, allow_real, allow_imaginary){\n if(exp.__class__ !== mod.UnaryOp){\n return false\n }\n // Must be negation ...\n if(exp.op !== mod.USub) {\n return false\n }\n // ... of a constant ...\n var operand = exp.operand\n if(operand.__class__ !== mod.Constant){\n return false\n }\n // ... number\n return ensure_literal_number(operand, allow_real, allow_imaginary)\n}\n\nfunction ensure_literal_complex(exp){\n if(exp.__class__ !== mod.BinOp){\n return false\n }\n var left = exp.left,\n right = exp.right;\n // Ensure op is addition or subtraction\n if(exp.op !== mod.Add && exp.op !== mod.Sub){\n return false\n }\n // Check LHS is a real number (potentially signed)\n switch(left.__class__){\n case mod.Constant:\n if(!ensure_literal_number(left, true, false)){\n return false\n }\n break;\n case mod.UnaryOp:\n if(!ensure_literal_negative(left, true, false)){\n return false\n }\n break;\n default:\n return false\n }\n // Check RHS is an imaginary number (no separate sign allowed)\n switch(right.__class__){\n case mod.Constant:\n if(!ensure_literal_number(right, false, true)){\n return false\n }\n break;\n default:\n return false\n }\n return true\n}\n\nfunction validate_arguments(args){\n validate_args(args.posonlyargs)\n validate_args(args.args)\n if(args.vararg && args.vararg.annotation){\n validate_expr(args.vararg.annotation, Load)\n }\n validate_args(args.kwonlyargs)\n if(args.kwarg && args.kwarg.annotation){\n validate_expr(args.kwarg.annotation, Load)\n }\n if(args.defaults.length > args.posonlyargs.length + args.args.length){\n throw _b_.ValueError.$factory(\n \"more positional defaults than args on arguments\")\n }\n if(args.kw_defaults.length != args.kwonlyargs.length){\n throw _b_.ValueError.$factory(\n \"length of kwonlyargs is not the same as \" +\n \"kw_defaults on arguments\")\n }\n validate_exprs(args.defaults, Load, 0)\n validate_exprs(args.kw_defaults, Load, 1)\n}\n\nfunction validate_pattern(p, star_ok){\n var ret = -1\n switch(p.__class__) {\n case mod.MatchValue:\n validate_pattern_match_value(p.value)\n break;\n case mod.MatchSingleton:\n if([_b_.None, _b_.True, _b_.False].indexOf(p.value) == -1){\n throw _b_.ValueError(\n \"MatchSingleton can only contain True, False and None\")\n }\n break;\n case mod.MatchSequence:\n validate_patterns(p.patterns, 1);\n break;\n case mod.MatchMapping:\n if(p.keys.length != p.patterns.length){\n throw _b_.ValueError.$factory(\n \"MatchMapping doesn't have the same number of keys as patterns\");\n }\n if(p.rest){\n validate_capture(p.rest)\n }\n\n var keys = p.keys;\n for(var key of keys){\n if(key.__class__ === mod.Constant) {\n var literal = key.value;\n if([_b_.None, _b_.True, _b_.False].indexOf(literal) > -1){\n /* validate_pattern_match_value will ensure the key\n doesn't contain True, False and None but it is\n syntactically valid, so we will pass those on in\n a special case. */\n continue;\n }\n }\n validate_pattern_match_value(key)\n }\n validate_patterns(p.patterns, 0);\n break;\n case mod.MatchClass:\n if(p.kwd_attrs.length != p.kwd_patterns.length){\n throw _b_.ValueError.$factory(\n \"MatchClass doesn't have the same number of \" +\n \"keyword attributes as patterns\")\n }\n validate_expr(p.cls, Load)\n var cls = p.cls;\n while(true){\n if(cls.__class__ === mod.Name){\n break\n }else if(cls.__class__ === mod.Attribute) {\n cls = cls.value;\n continue;\n }else {\n throw _b_.ValueError.$factory(\n \"MatchClass cls field can only contain Name \" +\n \"or Attribute nodes.\")\n }\n }\n\n for(var identifier of p.kwd_attrs){\n validate_name(identifier)\n }\n\n validate_patterns(p.patterns, 0)\n validate_patterns(p.kwd_patterns, 0);\n break;\n case mod.MatchStar:\n if (!star_ok) {\n throw _b_.ValueError.$factory(\"can't use MatchStar here\")\n }\n if(p.name === undefined){\n validate_capture(p.name)\n }\n break;\n case mod.MatchAs:\n if(p.name){\n validate_capture(p.name)\n }\n if(p.pattern == undefined){\n ret = 1;\n }else if(p.name == undefined){\n throw _b_.ValueError.$factory(\n \"MatchAs must specify a target name if a pattern is given\")\n }else{\n validate_pattern(p.pattern, 0);\n }\n break;\n case mod.MatchOr:\n if(p.patterns.length < 2){\n throw _b_.ValueError.$factory(\n \"MatchOr requires at least 2 patterns\")\n }\n validate_patterns(p.patterns, 0)\n break;\n // No default case, so the compiler will emit a warning if new pattern\n // kinds are added without being handled here\n }\n if(ret < 0){\n throw _b_.SystemError.$factory(\"unexpected pattern\")\n }\n return true\n}\n\nfunction validate_patterns(patterns, star_ok){\n for(var pattern of patterns){\n validate_pattern(pattern, star_ok)\n }\n return true\n}\n\nfunction validate_pattern_match_value(exp){\n validate_expr(exp, Load)\n switch (exp.__class__){\n case mod.Constant:\n /* Ellipsis and immutable sequences are not allowed.\n For True, False and None, MatchSingleton() should\n be used */\n validate_expr(exp, Load)\n var literal = exp.value\n if(_b_.isinstance(literal, [_b_.int, _b_.float, _b_.bytes,\n _b_.complex, _b_.str])){\n return true\n }\n throw _b_.ValueError.$factory(\n \"unexpected constant inside of a literal pattern\")\n case mod.Attribute:\n // Constants and attribute lookups are always permitted\n return true\n case mod.UnaryOp:\n // Negated numbers are permitted (whether real or imaginary)\n // Compiler will complain if AST folding doesn't create a constant\n if(ensure_literal_negative(exp, true, true)){\n return true\n }\n break;\n case mod.BinOp:\n // Complex literals are permitted\n // Compiler will complain if AST folding doesn't create a constant\n if(ensure_literal_complex(exp)){\n return true\n }\n break;\n case mod.JoinedStr:\n // Handled in the later stages\n return 1;\n default:\n break;\n }\n throw _b_.ValueError.$factory(\n \"patterns may only match literals and attribute lookups\")\n}\n\nfunction validate_capture(name){\n if(name == \"_\"){\n throw _b_.ValueError.$factory(\"can't capture name '_' in patterns\")\n }\n validate_name(name)\n}\n\nfunction validate_name(name){\n var forbidden = [\"None\", \"True\", \"False\"]\n if(forbidden.indexOf(name) > -1){\n throw _b_.ValueError.$factory(`identifier field can't represent` +\n ` '${name}' constant\", forbidden[i]`)\n }\n return true\n}\n\nfunction validate_comprehension(gens){\n if(gens.length == 0) {\n throw _b_.ValueError.$factory(\"comprehension with no generators\")\n }\n for(var comp of gens){\n validate_expr(comp.target, Store)\n validate_expr(comp.iter, Load)\n validate_exprs(comp.ifs, Load, 0)\n }\n return true\n}\n\nfunction validate_keywords(keywords){\n for(var keyword of keywords){\n validate_expr(keyword.value, Load)\n }\n return true\n}\n\nfunction validate_args(args){\n for(var arg of args){\n if(arg.annotation){\n validate_expr(arg.annotation, Load)\n }\n }\n return true\n}\n\nfunction validate_nonempty_seq(seq, what, owner){\n if(seq.length > 0){\n return true\n }\n throw _b_.ValueError.$factory(`empty ${what} on ${owner}`)\n}\n\nfunction validate_assignlist(targets, ctx){\n validate_nonempty_seq(targets, \"targets\", ctx == Del ? \"Delete\" : \"Assign\")\n validate_exprs(targets, ctx, 0)\n}\n\nfunction validate_body(body, owner){\n validate_nonempty_seq(body, \"body\", owner)\n validate_stmts(body)\n}\n\nfunction validate_exprs(exprs, ctx, null_ok){\n for(var expr of exprs){\n if(expr !== _b_.None){\n validate_expr(expr, ctx)\n }else if(!null_ok){\n throw _b_.ValueError.$factory(\n \"None disallowed in expression list\")\n }\n\n }\n return true\n}\n\nfunction validate_expr(exp, ctx){\n var check_ctx = 1,\n actual_ctx;\n\n /* First check expression context. */\n switch (exp.__class__) {\n case mod.Name:\n validate_name(exp.id)\n actual_ctx = exp.ctx\n break;\n case mod.Attribute:\n case mod.Subscript:\n case mod.Starred:\n case mod.List:\n case mod.Tuple:\n actual_ctx = exp.ctx;\n break\n default:\n if(ctx != Load){\n throw _b_.ValueError.$factory(\"expression which can't be \" +\n `assigned to in ${ctx} context`)\n }\n check_ctx = 0;\n /* set actual_ctx to prevent gcc warning */\n actual_ctx = 0;\n }\n actual_ctx = actual_ctx === 0 ? actual_ctx :\n actual_ctx.__class__.__name__\n if(check_ctx && actual_ctx != ctx){\n throw _b_.ValueError.$factory(`expression must have ` +\n `${ctx} context but has ${actual_ctx} instead`)\n }\n\n /* Now validate expression. */\n switch (exp.__class__) {\n case mod.BoolOp:\n if(exp.values.length < 2){\n throw _b_.ValueError.$factory(\"BoolOp with less than 2 values\")\n }\n validate_exprs(exp.values, Load, 0);\n break;\n case mod.BinOp:\n validate_expr(exp.left, Load)\n validate_expr(exp.right, Load)\n break;\n case mod.UnaryOp:\n validate_expr(exp.operand, Load);\n break;\n case mod.Lambda:\n validate_arguments(exp.args)\n validate_expr(exp.body, Load);\n break;\n case mod.IfExp:\n validate_expr(exp.test, Load)\n validate_expr(exp.body, Load)\n validate_expr(exp.orelse, Load)\n break;\n case mod.Dict:\n if(exp.keys.length != exp.values.length){\n throw _b_.ValueError.$factory(\n \"Dict doesn't have the same number of keys as values\");\n }\n /* null_ok=1 for keys expressions to allow dict unpacking to work in\n dict literals, i.e. ``{**{a:b}}`` */\n validate_exprs(exp.keys, Load, 1)\n validate_exprs(exp.values, Load, 0);\n break;\n case mod.Set:\n validate_exprs(exp.elts, Load, 0);\n break;\n case mod.ListComp:\n case mod.SetComp:\n case mod.GeneratorExp:\n validate_comprehension(exp.generators)\n validate_expr(exp.elt, Load)\n break;\n case mod.DictComp:\n validate_comprehension(exp.generators)\n validate_expr(exp.key, Load)\n validate_expr(exp.value, Load)\n break;\n case mod.Yield:\n if(exp.value){\n validate_expr(exp.value, Load)\n }\n break;\n case mod.YieldFrom:\n validate_expr(exp.value, Load)\n break;\n case mod.Await:\n validate_expr(exp.value, Load)\n break;\n case mod.Compare:\n if(exp.comparators.length == 0){\n throw _b_.ValueError.$factory(\"Compare with no comparators\")\n }\n if(exp.comparators.length != exp.ops){\n throw _b_.ValueError.$factory(\"Compare has a different number \" +\n \"of comparators and operands\")\n }\n validate_exprs(exp.comparators, Load, 0)\n validate_expr(exp.left, Load)\n break;\n case mod.Call:\n validate_expr(exp.func, Load)\n validate_exprs(exp.args, Load, 0)\n validate_keywords(exp.keywords)\n break;\n case mod.Constant:\n validate_constant(exp.value)\n break;\n case mod.JoinedStr:\n validate_exprs(exp.values, Load, 0)\n break;\n case mod.FormattedValue:\n validate_expr(exp.value, Load)\n if (exp.format_spec) {\n validate_expr(exp.format_spec, Load)\n break;\n }\n break;\n case mod.Attribute:\n validate_expr(exp.value, Load)\n break;\n case mod.Subscript:\n validate_expr(exp.slice, Load)\n validate_expr(exp.value, Load)\n break;\n case mod.Starred:\n validate_expr(exp.value, ctx)\n break;\n case mod.Slice:\n if(exp.lower){\n validate_expr(exp.lower, Load)\n }\n if(exp.upper){\n validate_expr(exp.upper, Load)\n }\n if(exp.step){\n validate_expr(exp.step, Load)\n }\n break;\n case mod.List:\n validate_exprs(exp.elts, ctx, 0)\n break;\n case mod.Tuple:\n validate_exprs(exp.elts, ctx, 0)\n break;\n case mod.NamedExpr:\n validate_expr(exp.value, Load)\n break;\n /* This last case doesn't have any checking. */\n case mod.Name:\n ret = 1;\n break;\n // No default case mod.so compiler emits warning for unhandled cases\n }\n return true\n}\n\nfunction validate_constant(value){\n if (value == _b_.None || value == _b_.Ellipsis){\n return true\n }\n if(_b_.isinstance(value,\n [_b_.int, _b_.float, _b_.complex, _b_.bool, _b_.bytes, _b_.str])){\n return true\n }\n\n if(_b_.isinstance(value, [_b_.tuple, _b_.frozenset])){\n var it = _b_.iter(value)\n while(true){\n try{\n var item = _b_.next(it)\n validate_constant(item)\n }catch(err){\n if($B.is_exc(err, [_b_.StopIteration])){\n return true\n }\n throw err\n }\n }\n }\n}\n\nfunction validate_stmts(seq){\n for(var stmt of seq) {\n if(stmt !== _b_.None){\n validate_stmt(stmt)\n }else{\n throw _b_.ValueError.$factory(\"None disallowed in statement list\");\n }\n }\n}\n\nfunction validate_stmt(stmt){\n switch (stmt.__class__) {\n case mod.FunctionDef:\n validate_body(stmt.body, \"FunctionDef\")\n validate_arguments(stmt.args)\n validate_exprs(stmt.decorator_list, Load, 0)\n if(stmt.returns){\n validate_expr(stmt.returns, Load)\n }\n break;\n case mod.ClassDef:\n validate_body(stmt.body, \"ClassDef\")\n validate_exprs(stmt.bases, Load, 0)\n validate_keywords(stmt.keywords)\n validate_exprs(stmtdecorator_list, Load, 0)\n break;\n case mod.Return:\n if(stmt.value){\n validate_expr(stmt.value, Load)\n }\n break;\n case mod.Delete:\n validate_assignlist(stmt.targets, Del);\n break;\n case mod.Assign:\n validate_assignlist(stmt.targets, Store)\n validate_expr(stmt.value, Load)\n break;\n case mod.AugAssign:\n validate_expr(stmt.target, Store) &&\n validate_expr(stmt.value, Load);\n break;\n case mod.AnnAssign:\n if(stmt.target.__class__ != mod.Name && stmt.simple){\n throw _b_.TypeError.$factory(\n \"AnnAssign with simple non-Name target\")\n }\n validate_expr(stmt.target, Store)\n if(stmt.value){\n validate_expr(stmt.value, Load)\n validate_expr(stmt.annotation, Load);\n }\n break;\n case mod.For:\n validate_expr(stmt.target, Store)\n validate_expr(stmt.iter, Load)\n validate_body(stmt.body, \"For\")\n validate_stmts(stmt.orelse)\n break;\n case mod.AsyncFor:\n validate_expr(stmt.target, Store)\n validate_expr(stmt.iter, Load)\n validate_body(stmt.body, \"AsyncFor\")\n validate_stmts(stmt.orelse)\n break;\n case mod.While:\n validate_expr(stmt.test, Load)\n validate_body(stmt.body, \"While\")\n validate_stmts(stmt.orelse)\n break;\n case mod.If:\n validate_expr(stmt.test, Load)\n validate_body(stmt.body, \"If\")\n validate_stmts(stmt.orelse)\n break;\n case mod.With:\n validate_nonempty_seq(stmt.items, \"items\", \"With\")\n for (var item of stmt.items){\n validate_expr(item.context_expr, Load) &&\n (! item.optional_vars || validate_expr(item.optional_vars, Store))\n }\n validate_body(stmt.body, \"With\");\n break;\n case mod.AsyncWith:\n validate_nonempty_seq(stmt.items, \"items\", \"AsyncWith\")\n for(var item of stmt.items){\n validate_expr(item.context_expr, Load)\n if(item.optional_vars){\n validate_expr(item.optional_vars, Store)\n }\n }\n validate_body(stmt.body, \"AsyncWith\");\n break;\n case mod.Match:\n validate_expr(stmt.subject, Load)\n validate_nonempty_seq(stmt.cases, \"cases\", \"Match\")\n for(var m of stmt.cases){\n validate_pattern(m.pattern, 0)\n if(m.guard){\n validate_expr(m.guard, Load)\n }\n validate_body(m.body, \"match_case\")\n }\n break;\n case mod.Raise:\n if(stmt.exc){\n validate_expr(stmt.exc, Load)\n if(stmt.cause){\n validate_expr(stmt.cause, Load)\n }\n break;\n }\n if(stmt.cause) {\n throw _b_.ValueError.$factory(\"Raise with cause but no exception\");\n }\n break;\n case mod.Try:\n validate_body(stmt.body, \"Try\")\n if(stmt.handlers.length == 0 + stmt.finalbody.length == 0){\n throw _b_.ValueError.$factor(\n \"Try has neither except handlers nor finalbody\");\n }\n if(stmt.handlers.length == 0 && stmt.orelse.length > 0){\n throw _b_.ValueError.$factory(\n \"Try has orelse but no except handlers\");\n }\n for(var handler of stmt.handlers){\n if(handler.type){\n validate_expr(handler.type, Load)\n validate_body(handler.body, \"ExceptHandler\")\n }\n }\n if(stmt.finalbody.length > 0){\n validate_stmts(stmt.finalbody)\n }\n if(stmt.orelse.length > 0){\n validate_stmts(stmt.orelse)\n }\n break;\n case mod.TryStar:\n validate_body(stmt.body, \"TryStar\")\n if(stmt.handlers.length + stmt.finalbody.length == 0){\n throw _b_.ValueError.$factory(\n \"TryStar has neither except handlers nor finalbody\");\n }\n if(stmt.handlers.length == 0 && stmt.orelse.length > 0){\n throw _b_.ValueError.$factory(\n \"TryStar has orelse but no except handlers\");\n }\n for(var handler of stm.handlers){\n if(handler.type){\n validate_expr(handler.type, Load)\n validate_body(handler.body, \"ExceptHandler\")\n }\n }\n if(stmt.finalbody.length > 0){\n validate_stmts(stmt.finalbody)\n }\n if(stmt.orelse.length > 0){\n validate_stmts(stmt.orelse)\n }\n break;\n case mod.Assert:\n validate_expr(stmt.test, Load)\n if(stmt.msg){\n validate_expr(stmt.msg, Load)\n }\n break;\n case mod.Import:\n validate_nonempty_seq(stmt.names, \"names\", \"Import\");\n break;\n case mod.ImportFrom:\n if(stmt.level < 0) {\n throw _b_.ValueError.$factory(\"Negative ImportFrom level\")\n }\n validate_nonempty_seq(stmt.names, \"names\", \"ImportFrom\");\n break;\n case mod.Global:\n validate_nonempty_seq(stmt.names, \"names\", \"Global\");\n break;\n case mod.Nonlocal:\n validate_nonempty_seq(stmt.names, \"names\", \"Nonlocal\");\n break;\n case mod.Expr:\n validate_expr(stmt.value, Load);\n break;\n case mod.AsyncFunctionDef:\n validate_body(stmt.body, \"AsyncFunctionDef\")\n validate_arguments(stmt.args)\n validate_exprs(stmt.decorator_list, Load, 0)\n if(stmt.returns){\n validate_expr(stmt.returns, Load)\n }\n break;\n case mod.Pass:\n case mod.Break:\n case mod.Continue:\n break;\n // No default case so compiler emits warning for unhandled cases\n }\n}\n\n\nmod._validate = function(ast_obj){\n switch (ast_obj.__class__) {\n case mod.Module:\n validate_stmts(ast_obj.body);\n break;\n case mod.Interactive:\n validate_stmts(ast_obj.body);\n break;\n case mod.Expression:\n validate_expr(ast_obj.body, Load);\n break;\n case mod.FunctionType:\n validate_exprs(ast_obj.argtypes, Load, 0) &&\n validate_expr(ast_obj.returns, Load);\n break;\n // No default case so compiler emits warning for unhandled cases\n }\n}\nreturn mod\n\n}\n)(__BRYTHON__)\n"], "_base64": [".js", "var $module=(function($B){\n\nvar _b_ = $B.builtins,\n _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\"\n\nfunction make_alphabet(altchars){\n var alphabet = _keyStr\n if(altchars !== undefined && altchars !== _b_.None){\n // altchars is an instance of Python bytes\n var source = altchars.source\n alphabet = alphabet.substr(0,alphabet.length-3) +\n _b_.chr(source[0]) + _b_.chr(source[1]) + '='\n }\n return alphabet\n}\n\nvar Base64 = {\n error: function(){return 'binascii_error'},\n\n encode: function(bytes, altchars){\n\n var input = bytes.source,\n output = \"\",\n chr1, chr2, chr3, enc1, enc2, enc3, enc4\n var i = 0\n\n var alphabet = make_alphabet(altchars)\n\n while(i < input.length){\n\n chr1 = input[i++]\n chr2 = input[i++]\n chr3 = input[i++]\n\n enc1 = chr1 >> 2\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4)\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6)\n enc4 = chr3 & 63\n\n if(isNaN(chr2)){\n enc3 = enc4 = 64\n }else if(isNaN(chr3)){\n enc4 = 64\n }\n\n output = output + alphabet.charAt(enc1) +\n alphabet.charAt(enc2) +\n alphabet.charAt(enc3) +\n alphabet.charAt(enc4)\n\n }\n return _b_.bytes.$factory(output, 'utf-8', 'strict')\n },\n\n\n decode: function(bytes, altchars, validate){\n var output = [],\n chr1, chr2, chr3,\n enc1, enc2, enc3, enc4\n\n var alphabet = make_alphabet(altchars)\n\n var input = bytes.source\n\n // If validate is set, check that all characters in input\n // are in the alphabet\n var _input = ''\n var padding = 0\n for(var i = 0, len = input.length; i < len; i++){\n var car = String.fromCharCode(input[i])\n var char_num = alphabet.indexOf(car)\n if(char_num == -1){\n if(validate){throw Base64.error(\"Non-base64 digit found: \" +\n car)}\n }else if(char_num == 64 && i < input.length - 2){\n if(validate){throw Base64.error(\"Non-base64 digit found: \" +\n car)}\n }else if(char_num == 64 && i >= input.length - 2){\n padding++\n _input += car\n }else{\n _input += car\n }\n }\n input = _input\n if(_input.length == padding){return _b_.bytes.$factory([])}\n if( _input.length % 4 > 0){throw Base64.error(\"Incorrect padding\")}\n\n var i = 0\n while(i < input.length){\n\n enc1 = alphabet.indexOf(input.charAt(i++))\n enc2 = alphabet.indexOf(input.charAt(i++))\n enc3 = alphabet.indexOf(input.charAt(i++))\n enc4 = alphabet.indexOf(input.charAt(i++))\n\n chr1 = (enc1 << 2) | (enc2 >> 4)\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2)\n chr3 = ((enc3 & 3) << 6) | enc4\n\n output.push(chr1)\n\n if(enc3 != 64){output.push(chr2)}\n if(enc4 != 64){output.push(chr3)}\n\n }\n // return Python bytes\n return _b_.bytes.$factory(output, 'utf-8', 'strict')\n\n },\n\n _utf8_encode: function(string) {\n string = string.replace(/\\r\\n/g, \"\\n\")\n var utftext = \"\";\n\n for(var n = 0; n < string.length; n++){\n\n var c = string.charCodeAt(n)\n\n if(c < 128){\n utftext += String.fromCharCode(c)\n }else if((c > 127) && (c < 2048)){\n utftext += String.fromCharCode((c >> 6) | 192)\n utftext += String.fromCharCode((c & 63) | 128)\n }else{\n utftext += String.fromCharCode((c >> 12) | 224)\n utftext += String.fromCharCode(((c >> 6) & 63) | 128)\n utftext += String.fromCharCode((c & 63) | 128)\n }\n\n }\n\n return utftext\n },\n\n _utf8_decode: function(utftext) {\n var string = \"\",\n i = 0,\n c = c1 = c2 = 0\n\n while(i < utftext.length){\n\n c = utftext.charCodeAt(i)\n\n if(c < 128){\n string += String.fromCharCode(c)\n i++\n }else if((c > 191) && (c < 224)){\n c2 = utftext.charCodeAt(i + 1)\n string += String.fromCharCode(((c & 31) << 6) | (c2 & 63))\n i += 2\n }else{\n c2 = utftext.charCodeAt(i + 1)\n c3 = utftext.charCodeAt(i + 2)\n string += String.fromCharCode(\n ((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63))\n i += 3\n }\n\n }\n\n return string\n }\n\n}\n\nreturn {Base64:Base64}\n}\n\n)(__BRYTHON__)"], "_binascii": [".js", "var $module=(function($B){\n\nvar _b_ = $B.builtins,\n _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\"\n\nvar error = $B.make_class(\"error\", _b_.Exception.$factory)\nerror.__bases__ = [_b_.Exception]\n$B.set_func_names(error, \"binascii\")\n\nfunction decode(bytes, altchars, validate){\n var output = [],\n chr1, chr2, chr3,\n enc1, enc2, enc3, enc4\n\n var alphabet = make_alphabet(altchars)\n\n var input = bytes.source\n\n // If validate is set, check that all characters in input\n // are in the alphabet\n var _input = ''\n var padding = 0\n for(var i = 0, len = input.length; i < len; i++){\n var car = String.fromCharCode(input[i])\n var char_num = alphabet.indexOf(car)\n if(char_num == -1){\n if(validate){throw error.$factory(\"Non-base64 digit found: \" +\n car)}\n }else if(char_num == 64 && i < input.length - 2){\n if(validate){throw error.$factory(\"Non-base64 digit found: \" +\n car)}\n }else if(char_num == 64 && i >= input.length - 2){\n padding++\n _input += car\n }else{\n _input += car\n }\n }\n input = _input\n if(_input.length == padding){return _b_.bytes.$factory([])}\n if( _input.length % 4 > 0){throw error.$factory(\"Incorrect padding\")}\n\n var i = 0\n while(i < input.length){\n\n enc1 = alphabet.indexOf(input.charAt(i++))\n enc2 = alphabet.indexOf(input.charAt(i++))\n enc3 = alphabet.indexOf(input.charAt(i++))\n enc4 = alphabet.indexOf(input.charAt(i++))\n\n chr1 = (enc1 << 2) | (enc2 >> 4)\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2)\n chr3 = ((enc3 & 3) << 6) | enc4\n\n output.push(chr1)\n\n if(enc3 != 64){output.push(chr2)}\n if(enc4 != 64){output.push(chr3)}\n\n }\n // return Python bytes\n return _b_.bytes.$factory(output)\n}\n\n\nvar hex2int = {},\n hex = '0123456789abcdef'\nfor(var i = 0; i < hex.length; i++){\n hex2int[hex[i]] = i\n hex2int[hex[i].toUpperCase()] = i\n}\n\nfunction make_alphabet(altchars){\n var alphabet = _keyStr\n if(altchars !== undefined && altchars !== _b_.None){\n // altchars is an instance of Python bytes\n var source = altchars.source\n alphabet = alphabet.substr(0,alphabet.length-3) +\n _b_.chr(source[0]) + _b_.chr(source[1]) + '='\n }\n return alphabet\n}\n\nvar module = {\n a2b_base64: function(){\n var $ = $B.args(\"a2b_base64\", 2, {s: null, strict_mode: null}, \n ['s', 'strict_mode'],\n arguments, {strict_mode: false}, null, null)\n var bytes\n if(_b_.isinstance($.s, _b_.str)){\n bytes = _b_.str.encode($.s, 'ascii')\n }else if(_b_.isinstance($.s, [_b_.bytes, _b_.bytearray])){\n bytes = $.s\n }else{\n throw _b_.TypeError.$factory('wrong type: ' + $B.class_name($.s))\n }\n return decode(bytes)\n },\n a2b_hex: function(){\n var $ = $B.args(\"a2b_hex\", 1, {s: null}, ['s'],\n arguments, {}, null, null),\n s = $.s\n if(_b_.isinstance(s, _b_.bytes)){\n s = _b_.bytes.decode(s, 'ascii')\n }\n if(typeof s !== \"string\"){\n throw _b_.TypeError.$factory(\"argument should be bytes, \" +\n \"buffer or ASCII string, not '\" + $B.class_name(s) + \"'\")\n }\n\n var len = s.length\n if(len % 2 == 1){\n throw _b_.TypeError.$factory('Odd-length string')\n }\n\n var res = []\n for(var i = 0; i < len; i += 2){\n res.push((hex2int[s.charAt(i)] << 4) + hex2int[s.charAt(i + 1)])\n }\n return _b_.bytes.$factory(res)\n },\n b2a_base64: function(){\n var $ = $B.args(\"b2a_base64\", 1, {data: null}, ['data'],\n arguments, {}, null, \"kw\")\n var newline = false\n if($.kw && $.kw.$jsobj.hasOwnProperty('newline')){\n newline = $.kw.$jsobj.newline\n }\n\n var string = $B.to_bytes($.data),\n res = btoa(String.fromCharCode.apply(null, string))\n if(newline){res += \"\\n\"}\n return _b_.bytes.$factory(res, \"ascii\")\n },\n b2a_hex: function(obj){\n var string = $B.to_bytes(obj),\n res = []\n function conv(c){\n if(c > 9){\n c = c + 'a'.charCodeAt(0) - 10\n }else{\n c = c + '0'.charCodeAt(0)\n }\n return c\n }\n string.forEach(function(char){\n res.push(conv((char >> 4) & 0xf))\n res.push(conv(char & 0xf))\n })\n return _b_.bytes.$factory(res)\n },\n b2a_uu: function(obj){\n var string = _b_.bytes.decode(obj, 'ascii')\n var len = string.length,\n res = String.fromCharCode((0x20 + len) & 0x3F)\n while(string.length > 0){\n var s = string.slice(0, 3)\n while(s.length < 3){s.push(String.fromCharCode(0))}\n var A = s[0],\n B = s[1],\n C = s[2]\n var a = (A >> 2) & 0x3F,\n b = ((A << 4) | ((B >> 4) & 0xF)) & 0x3F,\n c = (((B << 2) | ((C >> 6) & 0x3)) & 0x3F),\n d = C & 0x3F\n res += String.fromCharCode(0x20 + a, 0x20 + b, 0x20 + c, 0x20 + d)\n string = string.slice(3)\n }\n return _b_.bytes.$factory(res + \"\\n\", \"ascii\")\n },\n error: error\n}\n\nmodule.hexlify = module.b2a_hex\nmodule.unhexlify = module.a2b_hex\n\nreturn module\n}\n)(__BRYTHON__)"], "_io_classes": [".js", "var _b_ = __BRYTHON__.builtins\n\nfunction get_self(name, args){\n return $B.args(name, 1, {self: null}, [\"self\"], args, {}, null, null).self\n}\n\nvar _IOBase = $B.make_class(\"_IOBase\")\n_IOBase.__mro__ = [_b_.object]\n\n_IOBase.close = function(){\n get_self(\"close\", arguments).__closed = true\n}\n\n_IOBase.flush = function(){\n get_self(\"flush\", arguments)\n return _b_.None\n}\n\n$B.set_func_names(_IOBase, '_io')\n\n// Base class for binary streams that support some kind of buffering.\nvar _BufferedIOBase = $B.make_class(\"_BufferedIOBase\")\n_BufferedIOBase.__mro__ = [_IOBase, _b_.object]\n\n_BufferedIOBase.__enter__ = function(self){\n return self\n}\n_BufferedIOBase.__exit__ = function(self, type, value, traceback){\n try{\n $B.$call($B.$getattr(self, 'close'))()\n self.__closed = true\n return true\n }catch(err){\n return false\n }\n}\n\n$B.set_func_names(_BufferedIOBase, '_io')\n\n// Base class for raw binary I/O.\nvar _RawIOBase = $B.make_class(\"_RawIOBase\")\n\n_RawIOBase.__mro__ = [_IOBase, _b_.object]\n\n_RawIOBase.read = function(){\n var $ = $B.args(\"read\", 2, {self: null, size: null}, [\"self\", \"size\"],\n arguments, {size: -1}, null, null),\n self = $.self,\n size = $.size,\n res\n self.$pos = self.$pos || 0\n if(size == -1){\n if(self.$pos == 0){\n res = self.$content\n }else{\n res = _b_.bytes.$factory(self.$content.source.slice(self.$pos))\n }\n self.$pos = self.$content.source.length - 1\n }else{\n res = _b_.bytes.$factory(self.$content.source.slice(self.$pos, size))\n self.$pos += size\n }\n return res\n}\n\n_RawIOBase.readall = function(){\n return _RawIOBase.read(get_self(\"readall\", arguments))\n}\n\n$B.set_func_names(_RawIOBase, '_io')\n\n// Base class for text streams.\n_TextIOBase = $B.make_class(\"_TextIOBase\")\n_TextIOBase.__mro__ = [_IOBase, _b_.object]\n\nvar StringIO = $B.make_class(\"StringIO\",\n function(){\n var $ = $B.args(\"StringIO\", 2, {value: null, newline: null},\n [\"value\", \"newline\"], arguments, {value: '', newline: \"\\n\"},\n null, null)\n return {\n __class__: StringIO,\n $counter: 0,\n $content: $.value\n }\n }\n)\n\nStringIO.__mro__ = [$B.Reader, _b_.object]\n\nStringIO.getvalue = function(){\n var $ = $B.args(\"getvalue\", 1, {self: null},\n [\"self\"], arguments, {}, null, null)\n return $.self.$content.substr(0) // copy\n}\n\nStringIO.truncate = function(self, size){\n var $ = $B.args('truncate', 2, {self: null, size: null}, ['self', 'size'],\n arguments, {size: _b_.None}, null, null),\n self = $.self,\n size = $.size\n if(size === _b_.None){\n size = self.$counter\n }\n self.$content = self.$content.substr(0, size)\n self.$counter = self.$content.length\n return self.$counter\n}\n\nStringIO.write = function(){\n var $ = $B.args(\"write\", 2, {self: null, data: null},\n [\"self\", \"data\"], arguments, {}, null, null)\n if(! _b_.isinstance($.data, _b_.str)){\n throw _b_.TypeError.$factory('string argument expected, got ' +\n `'${$B.class_name($.data)}'`)\n }\n var text = $.self.$content,\n position = $.self.$counter\n text = text.substr(0, position) + $.data +\n text.substr(position + $.data.length)\n $.self.$content = text\n $.self.$counter = position + $.data.length\n return $.data.length\n}\n\n$B.set_func_names(StringIO, \"_io\")\n\nvar BytesIO = $B.make_class(\"BytesIO\",\n function(){\n var $ = $B.args(\"BytesIO\", 1, {value: null},\n [\"value\"], arguments, {value: _b_.bytes.$factory()},\n null, null)\n return {\n __class__: BytesIO,\n $binary: true,\n $content: $.value,\n $length: $.value.source.length,\n $counter: 0\n }\n }\n)\nBytesIO.__mro__ = [$B.Reader, _b_.object]\n\nBytesIO.getbuffer = function(){\n var self = get_self(\"getbuffer\", arguments)\n return self.$content\n}\n\nBytesIO.getvalue = function(){\n var self = get_self(\"getvalue\", arguments)\n return self.$content\n}\n\nBytesIO.write = function(){\n var $ = $B.args(\"write\", 2, {self: null, data: null},\n [\"self\", \"data\"], arguments, {}, null, null)\n $.self.$content.source = $.self.$content.source.concat(\n $.data.source)\n $.self.$counter += $.data.source.length\n return _b_.None\n}\n\n$B.set_func_names(BytesIO, \"_io\")\n\nvar BlockingIOError = $B.make_class('BlockingIOError')\nBlockingIOError.__bases__ = [_b_.OSError]\n\n$B.set_func_names(BlockingIOError, '_io')\n\nvar $module = (function($B){\n return {\n _BufferedIOBase,\n _IOBase,\n _RawIOBase,\n _TextIOBase: $B.make_class(\"_TextIOBase\",\n function(){\n return \"fileio\"\n }\n ),\n BlockingIOError,\n BytesIO: BytesIO,\n FileIO: $B.make_class(\"_TextIOBase\",\n function(){\n return \"fileio\"\n }\n ),\n StringIO: StringIO,\n BufferedReader: $B.BufferedReader,\n BufferedWriter: $B.make_class(\"_TextIOBase\",\n function(){\n return \"fileio\"\n }\n ),\n BufferedRWPair: $B.make_class(\"_TextIOBase\",\n function(){\n return \"fileio\"\n }\n ),\n BufferedRandom: $B.make_class(\"_TextIOBase\",\n function(){\n return \"fileio\"\n }\n ),\n IncrementalNewlineDecoder: $B.make_class(\"_TextIOBase\",\n function(){\n return \"fileio\"\n }\n ),\n TextIOWrapper: $B.TextIOWrapper\n }\n})(__BRYTHON__)\n$module._IOBase.__doc__ = \"_IOBase\""], "_json": [".js", "var $module=(function($B){\n\nvar _b_ = $B.builtins\n\nfunction simple(obj){\n switch(typeof obj){\n case 'string':\n case 'number':\n case 'boolean':\n return true\n }\n if(obj instanceof Number ||\n Array.isArray(obj) ||\n _b_.isinstance(obj, [_b_.list, _b_.tuple, _b_.dict])){\n return true\n }\n return false\n}\n\nfunction to_json(obj, level){\n var $defaults = {skipkeys:_b_.False, ensure_ascii:_b_.True,\n check_circular:_b_.True, allow_nan:_b_.True, cls:_b_.None,\n indent:_b_.None, separators:_b_.None, \"default\":_b_.None,\n sort_keys:_b_.False},\n $ = $B.args(\"to_json\", 2, {obj: null, level: null}, ['obj', 'level'],\n arguments, {level: 1}, null, \"kw\")\n\n for(var key in $defaults){\n if(! $.kw.$jsobj.hasOwnProperty(key)){\n $.kw.$jsobj[key] = $defaults[key]\n }\n }\n\n // Transform Python dict into Javascript object\n var kw = $.kw.$jsobj\n\n var indent = kw.indent,\n ensure_ascii = kw.ensure_ascii,\n separators = kw.separators === _b_.None ?\n kw.indent === _b_.None ? [', ', ': '] : [',', ': '] :\n kw.separators,\n skipkeys = kw.skipkeys,\n _default = kw.default,\n sort_keys = kw.sort_keys,\n allow_nan = kw.allow_nan,\n check_circular = kw.check_circular\n var item_separator = separators[0],\n key_separator = separators[1]\n if(indent !== _b_.None){\n var indent_str\n if(typeof indent == \"string\"){\n indent_str = indent\n }else if(typeof indent == \"number\" && indent >= 1){\n indent_str = \" \".repeat(indent)\n }else{\n throw _b_.ValueError.$factory(\"invalid indent: \" +\n _b_.str.$factory(indent))\n }\n }\n var kwarg = {$kw: [{}]}\n for(var key in kw){\n kwarg.$kw[0][key] = kw[key]\n }\n\n switch(typeof obj){\n case 'string':\n var res = JSON.stringify(obj)\n if(ensure_ascii){\n var escaped = ''\n for(var i = 0, len = res.length; i < len; i++){\n var u = res.codePointAt(i)\n if(u > 127){\n u = u.toString(16)\n while(u.length < 4){\n u = \"0\" + u\n }\n escaped += '\\\\u' + u\n }else{\n escaped += res.charAt(i)\n }\n }\n return escaped\n }\n return res\n case 'boolean':\n return obj.toString()\n case 'number':\n if([Infinity, -Infinity].indexOf(obj) > -1 ||\n isNaN(obj)){\n if(! allow_nan){\n throw _b_.ValueError.$factory(\n 'Out of range float values are not JSON compliant')\n }\n }\n return obj.toString()\n }\n if(obj instanceof String){\n // string with surrogate pairs. cf. issue #1903.\n var res = ''\n if(obj.surrogates){\n var s_ix = 0,\n s_pos = obj.surrogates[s_ix]\n for(var i = 0, len = obj.length; i < len; i++){\n if(i == s_pos){\n var code = obj.codePointAt(i) - 0x10000\n res += '\\\\u' + (0xD800 | (code >> 10)).toString(16) +\n '\\\\u' + (0xDC00 | (code & 0x3FF)).toString(16)\n i++\n s_ix++\n s_pos = obj.surrogates[s_ix]\n }else{\n var code = obj.charCodeAt(i)\n if(code < 127){\n var x = _b_.repr(obj[i])\n res += x.substr(1, x.length - 2)\n }else{\n var x = code.toString(16)\n while(x.length < 4){\n x = '0' + x\n }\n res += '\\\\u' + x\n }\n }\n }\n }\n return '\"' + res.replace(new RegExp('\"', \"g\"), '\\\\\"') + '\"'\n }\n\n if(_b_.isinstance(obj, _b_.list)){\n var res = []\n var sep = item_separator,\n first = '[',\n last = ']'\n if(indent !== _b_.None){\n sep += \"\\n\" + indent_str.repeat(level)\n first = '[' + '\\n' + indent_str.repeat(level)\n last = '\\n' + indent_str.repeat(level - 1) + ']'\n level++\n }\n for(var i = 0, len = obj.length; i < len; i++){\n res.push(to_json(obj[i], level, kwarg))\n }\n return first + res.join(sep) + last\n }else if(_b_.isinstance(obj, _b_.float)){\n return obj.value\n }else if(obj.__class__ === $B.long_int){\n return obj.value.toString()\n }else if(obj === _b_.None){\n return \"null\"\n }else if(_b_.isinstance(obj, _b_.dict)){\n var res = [],\n items = Array.from($B.make_js_iterator(_b_.dict.items(obj)))\n if(sort_keys){\n // Sort keys by alphabetical order\n items.sort()\n }\n var sep = item_separator,\n first = '{',\n last = '}'\n if(indent !== _b_.None){\n sep += \"\\n\" + indent_str.repeat(level)\n first = '{' + '\\n' + indent_str.repeat(level)\n last = '\\n' + indent_str.repeat(level - 1) + '}'\n level++\n }\n for(var i = 0, len = items.length; i < len; i++){\n var item = items[i]\n if(! simple(item[0])){\n if(! skipkeys){\n throw _b_.TypeError.$factory(\"keys must be str, int, \" +\n \"float, bool or None, not \" + $B.class_name(obj))\n }\n }else{\n // In the result, key must be a string\n var key = _b_.str.$factory(item[0])\n // Check circular reference\n if(check_circular && $B.repr.enter(item[1])){\n throw _b_.ValueError.$factory(\"Circular reference detected\")\n }\n res.push(\n [to_json(key, level, kwarg), to_json(item[1], level, kwarg)].\n join(key_separator))\n if(check_circular){\n $B.repr.leave(item[1])\n }\n }\n }\n return first + res.join(sep) + last\n }\n // For other types, use function default if provided\n if(_default == _b_.None){\n throw _b_.TypeError.$factory(\"Object of type \" + $B.class_name(obj) +\n \" is not JSON serializable\")\n }else{\n return to_json($B.$call(_default)(obj), level, kwarg)\n }\n}\n\nfunction loads(s){\n var args = []\n for(var i = 1, len = arguments.length; i < len; i++){\n args.push(arguments[i])\n }\n var decoder = JSONDecoder.$factory.apply(null, args)\n return JSONDecoder.decode(decoder, s)\n}\n\nfunction to_py(obj, kw){\n // Conversion to Python objects\n // kw are the keyword arguments to loads()\n var res\n if(obj instanceof List){\n return obj.items.map(x => to_py(x, kw))\n }else if(obj instanceof Dict){\n if(kw.object_pairs_hook !== _b_.None){\n var pairs = []\n for(var i = 0, len = obj.keys.length; i < len; i++){\n pairs.push($B.fast_tuple([obj.keys[i],\n to_py(obj.values[i], kw)]))\n }\n return $B.$call(kw.object_pairs_hook)(pairs)\n }else{\n var dict = $B.empty_dict()\n for(var i = 0, len = obj.keys.length; i < len; i++){\n _b_.dict.$setitem(dict, obj.keys[i], to_py(obj.values[i], kw))\n }\n return kw.object_hook === _b_.None ? dict :\n $B.$call(kw.object_hook)(dict)\n }\n }else if(obj.type == 'str'){\n return obj.value\n }else if(obj.type == 'num'){\n if(obj.value.search(/[.eE]/) > -1){\n // float\n if(kw.parse_float !== _b_.None){\n return $B.$call(kw.parse_float)(obj.value)\n }\n return $B.fast_float(obj.value)\n }else{\n // integer\n if(kw.parse_int !== _b_.None){\n return $B.$call(kw.parse_int)(obj.value)\n }\n var int = parseInt(obj.value)\n if(Math.abs(int) < $B.max_int){\n return int\n }else{\n return $B.fast_long_int(BigInt(obj.value))\n }\n }\n }else{\n if(obj instanceof Number && kw.parse_float !== _b_.None){\n return $B.$call(kw.parse_float)(obj)\n }else if(kw.parse_int !== _b_.None &&\n (typeof obj == 'number' || obj.__class__ === $B.long_int)){\n return $B.$call(kw.parse_int)(obj)\n }else if(kw.parse_constant !== _b_.None && ! isFinite(obj)){\n return kw.parse_constant(obj)\n }\n return obj\n }\n}\n\nvar escapes = {'n': '\\n',\n 't': '\\t',\n 'b': '\\b',\n 'r': '\\r',\n 'f': '\\f',\n '\\\\': '\\\\',\n '\"': '\\\"',\n \"'\": \"\\\\'\",\n '/': '/'\n }\n\nfunction string_at(s, i){\n var error = $B.$call($B.imported[\"json\"].JSONDecodeError)\n\n var j = i + 1,\n escaped = false,\n len = s.length,\n value = ''\n while(j < len){\n if(s[j] == '\"' && ! escaped){\n return [{type: 'str', value}, j + 1]\n }else if(! escaped && s[j] == '\\\\'){\n escaped = ! escaped\n j++\n }else if(escaped){\n var esc = escapes[s[j]]\n if(esc){\n value += esc\n j++\n escaped = false\n }else if(s[j] == 'u' &&\n s.substr(j + 1, 4).match(/[0-9a-fA-f]{4}/)){\n // unicode escape\n value += String.fromCharCode(parseInt(s.substr(j + 1, 4), 16))\n j += 5\n escaped = ! escaped\n }else{\n throw error('invalid escape \"' + s[j] + '\"', s, j)\n }\n }else{\n value += s[j]\n j++\n }\n }\n}\n\nfunction to_num(num_string, nb_dots, exp){\n // convert to correct Brython type\n if(exp || nb_dots){\n return new Number(num_string)\n }else{\n var int = parseInt(num_string)\n if(Math.abs(int) < $B.max_int){\n return int\n }else{\n if(num_string.startsWith('-')){\n return $B.fast_long_int(num_string.substr(1), false)\n }else{\n return $B.fast_long_int(num_string, true)\n }\n }\n }\n}\n\nfunction num_at(s, i){\n var res = s[i],\n j = i + 1,\n nb_dots = 0,\n exp = false,\n len = s.length\n while(j < len){\n if(s[j].match(/\\d/)){\n j++\n }else if(s[j] == '.' && nb_dots == 0){\n nb_dots++\n j++\n }else if('eE'.indexOf(s[j]) > -1 && ! exp){\n exp = ! exp\n j++\n }else{\n return [{type: 'num', value: s.substring(i, j)}, j]\n }\n }\n return [{type: 'num', value: s.substring(i, j)}, j]\n}\n\nfunction* tokenize(s){\n var i = 0,\n len = s.length,\n value,\n end\n while(i < len){\n if(s[i] == \" \" || s[i] == '\\r' || s[i] == '\\n' || s[i] == '\\t'){\n i++\n }else if('[]{}:,'.indexOf(s[i]) > -1){\n yield [s[i], i]\n i++\n }else if(s.substr(i, 4) == 'null'){\n yield [_b_.None , i]\n i += 4\n }else if(s.substr(i, 4) == 'true'){\n yield [true, i]\n i += 4\n }else if(s.substr(i, 5) == 'false'){\n yield [false, i]\n i += 5\n }else if(s.substr(i, 8) == 'Infinity'){\n yield [{type: 'num', value: 'Infinity'}, i]\n i += 8\n }else if(s.substr(i, 9) == '-Infinity'){\n yield [{type: 'num', value: '-Infinity'}, i]\n i += 9\n }else if(s.substr(i, 3) == 'NaN'){\n yield [{type: 'num', value: 'NaN'}, i]\n i += 3\n }else if(s[i] == '\"'){\n value = string_at(s, i)\n yield value\n i = value[1]\n }else if(s[i].match(/\\d/) || s[i] == '-'){\n value = num_at(s, i)\n yield value\n i = value[1]\n }else{\n throw Error('unexpected: ' + s[i] + s.charCodeAt(i))\n }\n }\n}\n\nfunction Node(parent){\n this.parent = parent\n if(parent instanceof List){\n this.list = parent.items\n }else if(parent instanceof Dict){\n this.list = parent.values\n }else if(parent === undefined){\n this.list = []\n }\n}\n\nNode.prototype.transition = function(token){\n if([true, false, _b_.None].indexOf(token) > -1 ||\n ['str', 'num'].indexOf(token.type) > -1){\n if(this.parent === undefined &&\n (this.list.length > 0 || this.content)){\n throw Error('Extra data')\n }\n this.list.push(token)\n return this.parent ? this.parent : this\n }else if(token == '{'){\n if(this.parent === undefined){\n this.content = new Dict(this)\n return this.content\n }\n return new Dict(this.parent)\n }else if(token == '['){\n if(this.parent === undefined){\n this.content = new List(this)\n return this.content\n }\n return new List(this.parent)\n }else{\n throw Error('unexpected item:' + token)\n }\n}\n\nfunction Dict(parent){\n this.parent = parent\n this.keys = []\n this.values = []\n this.expect = 'key'\n if(parent instanceof List){\n parent.items.push(this)\n }else if(parent instanceof Dict){\n parent.values.push(this)\n }\n}\n\nDict.prototype.transition = function(token){\n if(this.expect == 'key'){\n if(token.type == 'str'){\n this.keys.push(token.value)\n this.expect = ':'\n return this\n }else if(token == '}' && this.keys.length == 0){\n return this.parent\n }else{\n throw Error('expected str')\n }\n }else if(this.expect == ':'){\n if(token == ':'){\n this.expect = '}'\n return new Node(this)\n }else{\n throw Error('expected :')\n }\n }else if(this.expect == '}'){\n if(token == '}'){\n return this.parent\n }else if(token == ','){\n this.expect = 'key'\n return this\n }\n throw Error('expected }')\n }\n}\n\nfunction List(parent){\n if(parent instanceof List){\n parent.items.push(this)\n }\n this.parent = parent\n this.items = []\n this.expect = 'item'\n}\n\nList.prototype.transition = function(token){\n if(this.expect == 'item'){\n this.expect = ','\n if([true, false, _b_.None].indexOf(token) > -1){\n this.items.push(token)\n return this\n }else if(token.type == 'num' || token.type == 'str'){\n this.items.push(token)\n return this\n }else if(token == '{'){\n return new Dict(this)\n }else if(token == '['){\n return new List(this)\n }else if(token == ']'){\n if(this.items.length == 0){\n if(this.parent instanceof Dict){\n this.parent.values.push(this)\n }\n return this.parent\n }\n throw Error('unexpected ]')\n }else{\n console.log('token', token)\n throw Error('unexpected item:' + token)\n }\n\n }else if(this.expect == ','){\n this.expect = 'item'\n if(token == ','){\n return this\n }else if(token == ']'){\n if(this.parent instanceof Dict){\n this.parent.values.push(this)\n }\n return this.parent\n }else{\n throw Error('expected :')\n }\n }\n}\n\nfunction parse(s){\n var res,\n state,\n node = new Node(),\n root = node,\n token\n for(var item of tokenize(s)){\n token = item[0]\n try{\n node = node.transition(token)\n }catch(err){\n console.log('error, item', item)\n console.log(err, err.message)\n console.log('node', node)\n if(err.__class__){\n throw err\n }else{\n var error = $B.$call($B.imported[\"json\"].JSONDecodeError)\n throw error(err.message, s, item[1])\n }\n }\n }\n return root.content ? root.content : root.list[0]\n}\n\nvar JSONDecoder = $B.make_class(\"JSONDecoder\",\n function(){\n var $defaults = {cls: _b_.None, object_hook: _b_.None,\n parse_float: _b_.None, parse_int: _b_.None,\n parse_constant: _b_.None, object_pairs_hook: _b_.None},\n $ = $B.args(\"decode\", 0, {}, [], arguments, {}, null, \"kw\")\n var kw = $.kw.$jsobj\n for(var key in $defaults){\n if(kw[key] === undefined){\n kw[key] = $defaults[key]\n }\n }\n return {\n __class__: JSONDecoder,\n object_hook: kw.object_hook,\n parse_float: kw.parse_float,\n parse_int: kw.parse_int,\n parse_constant: kw.parse_constant,\n object_pairs_hook: kw.object_pairs_hook,\n memo: $B.empty_dict()\n }\n }\n)\n\nJSONDecoder.decode = function(self, s){\n return to_py(parse(s), self)\n}\n\nreturn {\n dumps: function(){\n return _b_.str.$factory(to_json.apply(null, arguments))\n },\n loads,\n JSONDecoder\n}\n\n})(__BRYTHON__)"], "_jsre": [".js", "var $module = (function($B){\n\n var _b_ = $B.builtins\n\n var MatchObject = $B.make_class(\"Match\",\n function(jsmatch, string, pattern){\n return {\n __class__: MatchObject,\n jsmatch: jsmatch,\n string: string\n }\n }\n )\n MatchObject.item = function(self, rank){\n return self.jsmatch[rank]\n }\n MatchObject.group = function(self){\n var res = []\n for(var i = 0, _len_i = arguments.length; i < _len_i; i++){\n if(self.jsmatch[arguments[i]] === undefined){res.push(_b_.None)}\n else{res.push(self.jsmatch[arguments[i]])}\n }\n if(arguments.length == 1){return res[0]}\n return _b_.tuple.$factory(res)\n }\n MatchObject.groups = function(self, _default){\n if(_default === undefined){_default = _b_.None}\n var res = []\n for(var i = 1, _len_i = self.length; i < _len_i; i++){\n if(self.jsmatch[i] === undefined){res.push(_default)}\n else{res.push(self.jsmatch[i])}\n }\n return _b_.tuple.$factory(res)\n }\n MatchObject.start = function(self){\n return self.index\n }\n MatchObject.end = function(self){\n return self.length - self.index\n }\n\n $B.set_func_names(MatchObject, '_jsre')\n\n var obj = {__class__: $module,\n __str__: function(){return \"\"}\n }\n obj.A = obj.ASCII = 256\n obj.I = obj.IGNORECASE = 2 // 'i'\n obj.L = obj.LOCALE = 4\n obj.M = obj.MULTILINE = 8 // 'm'\n obj.S = obj.DOTALL = 16\n obj.U = obj.UNICODE = 32\n obj.X = obj.VERBOSE = 64\n obj._is_valid = function(pattern) {\n if ($B.$options.re == 'pyre'){return false} //force use of python's re module\n if ($B.$options.re == 'jsre'){return true} //force use of brythons re module\n // FIXME: Improve\n\n if(! _b_.isinstance(pattern, _b_.str)){\n // this is probably a SRE_PATTERN, so return false, and let\n // python's re module handle this.\n return false\n }\n var is_valid = false\n try{\n new RegExp(pattern)\n is_valid = true\n }\n catch(e){}\n if(! is_valid){return false} //if js won't parse the pattern return false\n\n // using reference http://www.regular-expressions.info/\n // to compare python re and javascript regex libraries\n\n // look for things javascript does not support\n // check for name capturing group\n var mylist = ['?P=', '?P<', '(?#', '(?<=', '(? -1) return false\n }\n\n var re_list=['\\{,\\d+\\}']\n for(var i=0, _len_i = re_list.length; i < _len_i; i++) {\n var _re = new RegExp(re_list[i])\n if (_re.test(pattern)){return false}\n }\n\n // it looks like the pattern has passed all our tests so lets assume\n // javascript can handle this pattern.\n return true\n }\n var $SRE_PatternDict = {\n __class__:_b_.type,\n $infos:{\n __name__:'SRE_Pattern'\n }\n }\n $SRE_PatternDict.__mro__ = [_b_.object]\n $SRE_PatternDict.findall = function(self, string){\n return obj.findall(self.pattern, string, self.flags)\n }\n $SRE_PatternDict.finditer = function(self, string){\n return obj.finditer(self.pattern, string, self.flags)\n }\n $SRE_PatternDict.match = function(self, string){\n return obj.match(self.pattern, string, self.flags)\n }\n $SRE_PatternDict.search = function(self, string){\n return obj.search(self.pattern, string, self.flags)\n }\n $SRE_PatternDict.sub = function(self,repl,string){\n return obj.sub(self.pattern,repl,string,self.flags)\n }\n $B.set_func_names($SRE_PatternDict, \"_jsre\")\n // TODO: groups\n // TODO: groupindex\n function normflags(flags){\n return ((flags & obj.I)? 'i' : '') + ((flags & obj.M)? 'm' : '');\n }\n // TODO: fullmatch()\n // TODO: split()\n // TODO: subn()\n obj.compile = function(pattern, flags){\n return {\n __class__: $SRE_PatternDict,\n pattern: pattern,\n flags: normflags(flags)\n }\n }\n obj.escape = function(string){\n // Escape all the characters in pattern except ASCII letters, numbers\n // and '_'. This is useful if you want to match an arbitrary literal\n // string that may have regular expression metacharacters in it.\n var res = ''\n var ok = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'\n for(var i = 0, _len_i = string.length; i < _len_i; i++){\n if(ok.search(string.charAt(i))>-1){res += string.charAt(i)}\n }\n return res\n }\n obj.findall = function(pattern, string, flags){\n var $ns=$B.args('re.findall', 2,\n {pattern:null, string:null}, ['pattern', 'string'],\n arguments,{}, 'args', 'kw') ,\n args = $ns['args'] ,\n _flags = 0;\n if(args.length>0){var flags = args[0]}\n else{var _flags = $B.$getattr($ns['kw'], 'get')('flags', 0)}\n\n var flags = normflags()\n flags += 'gm'\n var jsp = new RegExp(pattern,flags),\n jsmatch = string.match(jsp)\n if(jsmatch === null){return []}\n return jsmatch\n }\n obj.finditer = function(pattern, string, flags){\n var $ns=$B.args('re.finditer', 2,\n {pattern:null, string:null}, ['pattern', 'string'],\n arguments,{},'args','kw'),\n args = $ns['args'],\n _flags = 0;\n if(args.length>0){var flags=args[0]}\n else{var _flags = $B.$getattr($ns['kw'], 'get')('flags', 0)}\n\n var flags = normflags()\n flags += 'gm'\n var jsp = new RegExp(pattern, flags),\n jsmatch = string.match(jsp);\n if(jsmatch === null){return []}\n\n var _list = []\n for(var j = 0, _len_j = jsmatch.length; j < _len_j; j++) {\n var mo = {}\n mo._match=jsmatch[j]\n mo.group = function(){\n var res = []\n for(var i=0, _len_i = arguments.length; i < _len_i;i++){\n if(jsmatch[arguments[i]] === undefined){res.push(_b_.None)}\n else{res.push(jsmatch[arguments[i]])}\n }\n if(arguments.length == 1){return res[0]}\n return _b_.tuple.$factory(res)\n }\n mo.groups = function(_default){\n if(_default === undefined){_default = _b_.None}\n var res = []\n for(var i = 1, _len_i = jsmatch.length; i < _len_i; i++){\n if(jsmatch[i] === undefined){res.push(_default)}\n else{res.push(jsmatch[i])}\n }\n return _b_.tuple.$factory(res)\n }\n mo.start = function(){return mo._match.index}\n mo.end = function(){return mo._match.length - mo._match.index}\n mo.string = string\n _list.push(mo)\n }\n return _list\n }\n obj.search = function(pattern, string){\n var $ns = $B.args('re.search', 2,\n {pattern:null, string:null},['pattern', 'string'],\n arguments, {}, 'args', 'kw')\n var args = $ns['args']\n if(args.length>0){var flags = args[0]}\n else{var flags = $B.$getattr($ns['kw'], 'get')('flags', '')}\n flags = normflags(flags)\n var jsp = new RegExp(pattern, flags)\n var jsmatch = string.match(jsp)\n if(jsmatch === null){return _b_.None}\n return MatchObject.$factory(jsmatch, string, pattern)\n }\n obj.sub = function(pattern, repl, string){\n var $ns=$B.args('re.search', 3,\n {pattern: null, repl: null, string: null},\n ['pattern', 'repl', 'string'],\n arguments,{}, 'args', 'kw')\n for($var in $ns){eval(\"var \" + $var + \"=$ns[$var]\")}\n var args = $ns['args']\n var count = _b_.dict.get($ns['kw'], 'count', 0)\n var flags = _b_.dict.get($ns['kw'], 'flags', '')\n if(args.length > 0){var count = args[0]}\n if(args.length > 1){var flags = args[1]}\n flags = normflags(flags)\n if(typeof repl == \"string\"){\n // backreferences are \\1, \\2... in Python but $1,$2... in Javascript\n repl = repl.replace(/\\\\(\\d+)/g, '$$$1')\n }else if(typeof repl == \"function\"){\n // the argument passed to the Python function is the match object\n // the arguments passed to the Javascript function are :\n // - the matched substring\n // - the matched groups\n // - the offset of the matched substring inside the string\n // - the string being examined\n var $repl1 = function(){\n var mo = Object()\n mo.string = arguments[arguments.length - 1]\n var matched = arguments[0];\n var start = arguments[arguments.length - 2]\n var end = start + matched.length\n mo.start = function(){return start}\n mo.end = function(){return end}\n groups = []\n for(var i = 1, _len_i = arguments.length-2; i < _len_i; i++){\n groups.push(arguments[i])\n }\n mo.groups = function(_default){\n if(_default === undefined){_default = _b_.None}\n var res = []\n for(var i = 0, _len_i = groups.length; i < _len_i; i++){\n if(groups[i] === undefined){res.push(_default)}\n else{res.push(groups[i])}\n }\n return res\n }\n mo.group = function(i){\n if(i==0){return matched}\n return groups[i-1]\n }\n return repl(mo)\n }\n }\n if(count == 0){flags += 'g'}\n var jsp = new RegExp(pattern, flags)\n if(typeof repl == 'function'){return string.replace(jsp, $repl1)}\n else{return string.replace(jsp, repl)}\n }\n obj.match = (function(search_func){\n return function(){\n // match is like search but pattern must start with ^\n var pattern = arguments[0]\n if(pattern.charAt(0) != '^'){pattern = '^'+pattern}\n var args = [pattern]\n for(var i = 1, _len_i = arguments.length; i < _len_i; i++){\n args.push(arguments[i])\n }\n return search_func.apply(null, args)\n }\n })(obj.search)\n\n return obj\n}\n)(__BRYTHON__)\n"], "_locale": [".js", "var am = {\n \"C\": \"AM\",\n \"aa\": \"saaku\",\n \"ab\": \"AM\",\n \"ae\": \"AM\",\n \"af\": \"vm.\",\n \"ak\": \"AN\",\n \"am\": \"\\u1325\\u12cb\\u1275\",\n \"an\": \"AM\",\n \"ar\": \"\\u0635\",\n \"as\": \"\\u09f0\\u09be\\u09a4\\u09bf\\u09aa\\u09c1\",\n \"av\": \"AM\",\n \"ay\": \"AM\",\n \"az\": \"AM\",\n \"ba\": \"\",\n \"be\": \"\",\n \"bg\": \"\",\n \"bh\": \"AM\",\n \"bi\": \"AM\",\n \"bm\": \"AM\",\n \"bn\": \"AM\",\n \"bo\": \"\\u0f66\\u0f94\\u0f0b\\u0f51\\u0fb2\\u0f7c\",\n \"br\": \"A.M.\",\n \"bs\": \"prijepodne\",\n \"ca\": \"a. m.\",\n \"ce\": \"AM\",\n \"ch\": \"AM\",\n \"co\": \"\",\n \"cr\": \"AM\",\n \"cs\": \"dop.\",\n \"cu\": \"\\u0414\\u041f\",\n \"cv\": \"AM\",\n \"cy\": \"yb\",\n \"da\": \"\",\n \"de\": \"\",\n \"dv\": \"\\u0789\\u0786\",\n \"dz\": \"\\u0f66\\u0f94\\u0f0b\\u0f46\\u0f0b\",\n \"ee\": \"\\u014bdi\",\n \"el\": \"\\u03c0\\u03bc\",\n \"en\": \"AM\",\n \"eo\": \"atm\",\n \"es\": \"\",\n \"et\": \"AM\",\n \"eu\": \"AM\",\n \"fa\": \"\\u0642.\\u0638\",\n \"ff\": \"\",\n \"fi\": \"ap.\",\n \"fj\": \"AM\",\n \"fo\": \"um fyr.\",\n \"fr\": \"\",\n \"fy\": \"AM\",\n \"ga\": \"r.n.\",\n \"gd\": \"m\",\n \"gl\": \"a.m.\",\n \"gn\": \"a.m.\",\n \"gu\": \"\\u0aaa\\u0ac2\\u0ab0\\u0acd\\u0ab5\\u00a0\\u0aae\\u0aa7\\u0acd\\u0aaf\\u0abe\\u0ab9\\u0acd\\u0aa8\",\n \"gv\": \"a.m.\",\n \"ha\": \"AM\",\n \"he\": \"AM\",\n \"hi\": \"\\u092a\\u0942\\u0930\\u094d\\u0935\\u093e\\u0939\\u094d\\u0928\",\n \"ho\": \"AM\",\n \"hr\": \"\",\n \"ht\": \"AM\",\n \"hu\": \"de.\",\n \"hy\": \"\",\n \"hz\": \"AM\",\n \"ia\": \"a.m.\",\n \"id\": \"AM\",\n \"ie\": \"AM\",\n \"ig\": \"A.M.\",\n \"ii\": \"\\ua0b5\\ua1aa\\ua20c\\ua210\",\n \"ik\": \"AM\",\n \"io\": \"AM\",\n \"is\": \"f.h.\",\n \"it\": \"\",\n \"iu\": \"AM\",\n \"ja\": \"\\u5348\\u524d\",\n \"jv\": \"\",\n \"ka\": \"AM\",\n \"kg\": \"AM\",\n \"ki\": \"Kiroko\",\n \"kj\": \"AM\",\n \"kk\": \"AM\",\n \"kl\": \"\",\n \"km\": \"\\u1796\\u17d2\\u179a\\u17b9\\u1780\",\n \"kn\": \"\\u0caa\\u0cc2\\u0cb0\\u0ccd\\u0cb5\\u0cbe\\u0cb9\\u0ccd\\u0ca8\",\n \"ko\": \"\\uc624\\uc804\",\n \"kr\": \"AM\",\n \"ks\": \"AM\",\n \"ku\": \"\\u067e.\\u0646\",\n \"kv\": \"AM\",\n \"kw\": \"a.m.\",\n \"ky\": \"\",\n \"la\": \"\",\n \"lb\": \"\",\n \"lg\": \"AM\",\n \"li\": \"AM\",\n \"ln\": \"nt\\u0254\\u0301ng\\u0254\\u0301\",\n \"lo\": \"\\u0e81\\u0ec8\\u0ead\\u0e99\\u0e97\\u0ec8\\u0ebd\\u0e87\",\n \"lt\": \"prie\\u0161piet\",\n \"lu\": \"Dinda\",\n \"lv\": \"priek\\u0161p.\",\n \"mg\": \"AM\",\n \"mh\": \"AM\",\n \"mi\": \"a.m.\",\n \"mk\": \"\\u043f\\u0440\\u0435\\u0442\\u043f\\u043b.\",\n \"ml\": \"AM\",\n \"mn\": \"??\",\n \"mo\": \"AM\",\n \"mr\": \"\\u092e.\\u092a\\u0942.\",\n \"ms\": \"PG\",\n \"mt\": \"AM\",\n \"my\": \"\\u1014\\u1036\\u1014\\u1000\\u103a\",\n \"na\": \"AM\",\n \"nb\": \"a.m.\",\n \"nd\": \"AM\",\n \"ne\": \"\\u092a\\u0942\\u0930\\u094d\\u0935\\u093e\\u0939\\u094d\\u0928\",\n \"ng\": \"AM\",\n \"nl\": \"\",\n \"nn\": \"f.m.\",\n \"no\": \"a.m.\",\n \"nr\": \"AM\",\n \"nv\": \"AM\",\n \"ny\": \"AM\",\n \"oc\": \"AM\",\n \"oj\": \"AM\",\n \"om\": \"WD\",\n \"or\": \"AM\",\n \"os\": \"AM\",\n \"pa\": \"\\u0a38\\u0a35\\u0a47\\u0a30\",\n \"pi\": \"AM\",\n \"pl\": \"AM\",\n \"ps\": \"\\u063a.\\u0645.\",\n \"pt\": \"\",\n \"qu\": \"a.m.\",\n \"rc\": \"AM\",\n \"rm\": \"AM\",\n \"rn\": \"Z.MU.\",\n \"ro\": \"a.m.\",\n \"ru\": \"\",\n \"rw\": \"AM\",\n \"sa\": \"\\u092e\\u0927\\u094d\\u092f\\u093e\\u0928\\u092a\\u0942\\u0930\\u094d\\u0935\",\n \"sc\": \"AM\",\n \"sd\": \"AM\",\n \"se\": \"i.b.\",\n \"sg\": \"ND\",\n \"sh\": \"AM\",\n \"si\": \"\\u0db4\\u0dd9.\\u0dc0.\",\n \"sk\": \"AM\",\n \"sl\": \"dop.\",\n \"sm\": \"AM\",\n \"sn\": \"AM\",\n \"so\": \"sn.\",\n \"sq\": \"e paradites\",\n \"sr\": \"pre podne\",\n \"ss\": \"AM\",\n \"st\": \"AM\",\n \"su\": \"AM\",\n \"sv\": \"\",\n \"sw\": \"AM\",\n \"ta\": \"\\u0b95\\u0bbe\\u0bb2\\u0bc8\",\n \"te\": \"\\u0c2a\\u0c42\\u0c30\\u0c4d\\u0c35\\u0c3e\\u0c39\\u0c4d\\u0c28\",\n \"tg\": \"\",\n \"th\": \"AM\",\n \"ti\": \"\\u1295\\u1309\\u1206 \\u1230\\u12d3\\u1270\",\n \"tk\": \"\",\n \"tl\": \"AM\",\n \"tn\": \"AM\",\n \"to\": \"AM\",\n \"tr\": \"\\u00d6\\u00d6\",\n \"ts\": \"AM\",\n \"tt\": \"\",\n \"tw\": \"AM\",\n \"ty\": \"AM\",\n \"ug\": \"\\u0686?\\u0634\\u062a\\u0649\\u0646 \\u0628?\\u0631?\\u0646\",\n \"uk\": \"AM\",\n \"ur\": \"AM\",\n \"uz\": \"TO\",\n \"ve\": \"AM\",\n \"vi\": \"SA\",\n \"vo\": \"AM\",\n \"wa\": \"AM\",\n \"wo\": \"\",\n \"xh\": \"AM\",\n \"yi\": \"\\ua0b5\\ua1aa\\ua20c\\ua210\",\n \"yo\": \"\\u00c0\\u00e1r?`\",\n \"za\": \"AM\",\n \"zh\": \"\\u4e0a\\u5348\",\n \"zu\": \"AM\"\n}\nvar pm = {\n \"C\": \"PM\",\n \"aa\": \"carra\",\n \"ab\": \"PM\",\n \"ae\": \"PM\",\n \"af\": \"nm.\",\n \"ak\": \"EW\",\n \"am\": \"\\u12a8\\u1230\\u12d3\\u1275\",\n \"an\": \"PM\",\n \"ar\": \"\\u0645\",\n \"as\": \"\\u0986\\u09ac\\u09c7\\u09b2\\u09bf\",\n \"av\": \"PM\",\n \"ay\": \"PM\",\n \"az\": \"PM\",\n \"ba\": \"\",\n \"be\": \"\",\n \"bg\": \"\",\n \"bh\": \"PM\",\n \"bi\": \"PM\",\n \"bm\": \"PM\",\n \"bn\": \"PM\",\n \"bo\": \"\\u0f55\\u0fb1\\u0f72\\u0f0b\\u0f51\\u0fb2\\u0f7c\",\n \"br\": \"G.M.\",\n \"bs\": \"popodne\",\n \"ca\": \"p. m.\",\n \"ce\": \"PM\",\n \"ch\": \"PM\",\n \"co\": \"\",\n \"cr\": \"PM\",\n \"cs\": \"odp.\",\n \"cu\": \"\\u041f\\u041f\",\n \"cv\": \"PM\",\n \"cy\": \"yh\",\n \"da\": \"\",\n \"de\": \"\",\n \"dv\": \"\\u0789\\u078a\",\n \"dz\": \"\\u0f55\\u0fb1\\u0f72\\u0f0b\\u0f46\\u0f0b\",\n \"ee\": \"\\u0263etr\\u0254\",\n \"el\": \"\\u03bc\\u03bc\",\n \"en\": \"PM\",\n \"eo\": \"ptm\",\n \"es\": \"\",\n \"et\": \"PM\",\n \"eu\": \"PM\",\n \"fa\": \"\\u0628.\\u0638\",\n \"ff\": \"\",\n \"fi\": \"ip.\",\n \"fj\": \"PM\",\n \"fo\": \"um sein.\",\n \"fr\": \"\",\n \"fy\": \"PM\",\n \"ga\": \"i.n.\",\n \"gd\": \"f\",\n \"gl\": \"p.m.\",\n \"gn\": \"p.m.\",\n \"gu\": \"\\u0a89\\u0aa4\\u0acd\\u0aa4\\u0ab0\\u00a0\\u0aae\\u0aa7\\u0acd\\u0aaf\\u0abe\\u0ab9\\u0acd\\u0aa8\",\n \"gv\": \"p.m.\",\n \"ha\": \"PM\",\n \"he\": \"PM\",\n \"hi\": \"\\u0905\\u092a\\u0930\\u093e\\u0939\\u094d\\u0928\",\n \"ho\": \"PM\",\n \"hr\": \"\",\n \"ht\": \"PM\",\n \"hu\": \"du.\",\n \"hy\": \"\",\n \"hz\": \"PM\",\n \"ia\": \"p.m.\",\n \"id\": \"PM\",\n \"ie\": \"PM\",\n \"ig\": \"P.M.\",\n \"ii\": \"\\ua0b5\\ua1aa\\ua20c\\ua248\",\n \"ik\": \"PM\",\n \"io\": \"PM\",\n \"is\": \"e.h.\",\n \"it\": \"\",\n \"iu\": \"PM\",\n \"ja\": \"\\u5348\\u5f8c\",\n \"jv\": \"\",\n \"ka\": \"PM\",\n \"kg\": \"PM\",\n \"ki\": \"Hwa\\u0129-in\\u0129\",\n \"kj\": \"PM\",\n \"kk\": \"PM\",\n \"kl\": \"\",\n \"km\": \"\\u179b\\u17d2\\u1784\\u17b6\\u1785\",\n \"kn\": \"\\u0c85\\u0caa\\u0cb0\\u0cbe\\u0cb9\\u0ccd\\u0ca8\",\n \"ko\": \"\\uc624\\ud6c4\",\n \"kr\": \"PM\",\n \"ks\": \"PM\",\n \"ku\": \"\\u062f.\\u0646\",\n \"kv\": \"PM\",\n \"kw\": \"p.m.\",\n \"ky\": \"\",\n \"la\": \"\",\n \"lb\": \"\",\n \"lg\": \"PM\",\n \"li\": \"PM\",\n \"ln\": \"mp\\u00f3kwa\",\n \"lo\": \"\\u0eab\\u0ebc\\u0eb1\\u0e87\\u0e97\\u0ec8\\u0ebd\\u0e87\",\n \"lt\": \"popiet\",\n \"lu\": \"Dilolo\",\n \"lv\": \"p\\u0113cp.\",\n \"mg\": \"PM\",\n \"mh\": \"PM\",\n \"mi\": \"p.m.\",\n \"mk\": \"\\u043f\\u043e\\u043f\\u043b.\",\n \"ml\": \"PM\",\n \"mn\": \"?\\u0425\",\n \"mo\": \"PM\",\n \"mr\": \"\\u092e.\\u0928\\u0902.\",\n \"ms\": \"PTG\",\n \"mt\": \"PM\",\n \"my\": \"\\u100a\\u1014\\u1031\",\n \"na\": \"PM\",\n \"nb\": \"p.m.\",\n \"nd\": \"PM\",\n \"ne\": \"\\u0905\\u092a\\u0930\\u093e\\u0939\\u094d\\u0928\",\n \"ng\": \"PM\",\n \"nl\": \"\",\n \"nn\": \"e.m.\",\n \"no\": \"p.m.\",\n \"nr\": \"PM\",\n \"nv\": \"PM\",\n \"ny\": \"PM\",\n \"oc\": \"PM\",\n \"oj\": \"PM\",\n \"om\": \"WB\",\n \"or\": \"PM\",\n \"os\": \"PM\",\n \"pa\": \"\\u0a36\\u0a3e\\u0a2e\",\n \"pi\": \"PM\",\n \"pl\": \"PM\",\n \"ps\": \"\\u063a.\\u0648.\",\n \"pt\": \"\",\n \"qu\": \"p.m.\",\n \"rc\": \"PM\",\n \"rm\": \"PM\",\n \"rn\": \"Z.MW.\",\n \"ro\": \"p.m.\",\n \"ru\": \"\",\n \"rw\": \"PM\",\n \"sa\": \"\\u092e\\u0927\\u094d\\u092f\\u093e\\u0928\\u092a\\u091a\\u094d\\u092f\\u093e\\u0924\",\n \"sc\": \"PM\",\n \"sd\": \"PM\",\n \"se\": \"e.b.\",\n \"sg\": \"LK\",\n \"sh\": \"PM\",\n \"si\": \"\\u0db4.\\u0dc0.\",\n \"sk\": \"PM\",\n \"sl\": \"pop.\",\n \"sm\": \"PM\",\n \"sn\": \"PM\",\n \"so\": \"gn.\",\n \"sq\": \"e pasdites\",\n \"sr\": \"po podne\",\n \"ss\": \"PM\",\n \"st\": \"PM\",\n \"su\": \"PM\",\n \"sv\": \"\",\n \"sw\": \"PM\",\n \"ta\": \"\\u0bae\\u0bbe\\u0bb2\\u0bc8\",\n \"te\": \"\\u0c05\\u0c2a\\u0c30\\u0c3e\\u0c39\\u0c4d\\u0c28\",\n \"tg\": \"\",\n \"th\": \"PM\",\n \"ti\": \"\\u12f5\\u1215\\u122d \\u1230\\u12d3\\u1275\",\n \"tk\": \"\",\n \"tl\": \"PM\",\n \"tn\": \"PM\",\n \"to\": \"PM\",\n \"tr\": \"\\u00d6S\",\n \"ts\": \"PM\",\n \"tt\": \"\",\n \"tw\": \"PM\",\n \"ty\": \"PM\",\n \"ug\": \"\\u0686?\\u0634\\u062a\\u0649\\u0646 \\u0643?\\u064a\\u0649\\u0646\",\n \"uk\": \"PM\",\n \"ur\": \"PM\",\n \"uz\": \"TK\",\n \"ve\": \"PM\",\n \"vi\": \"CH\",\n \"vo\": \"PM\",\n \"wa\": \"PM\",\n \"wo\": \"\",\n \"xh\": \"PM\",\n \"yi\": \"\\ua0b5\\ua1aa\\ua20c\\ua248\",\n \"yo\": \"?`s\\u00e1n\",\n \"za\": \"PM\",\n \"zh\": \"\\u4e0b\\u5348\",\n \"zu\": \"PM\"\n}\n\nvar X_format = {\n \"%H:%M:%S\": [\n \"C\",\n \"ab\",\n \"ae\",\n \"af\",\n \"an\",\n \"av\",\n \"ay\",\n \"az\",\n \"ba\",\n \"be\",\n \"bg\",\n \"bh\",\n \"bi\",\n \"bm\",\n \"bo\",\n \"br\",\n \"bs\",\n \"ca\",\n \"ce\",\n \"ch\",\n \"co\",\n \"cr\",\n \"cs\",\n \"cu\",\n \"cv\",\n \"cy\",\n \"da\",\n \"de\",\n \"dv\",\n \"eo\",\n \"es\",\n \"et\",\n \"eu\",\n \"ff\",\n \"fj\",\n \"fo\",\n \"fr\",\n \"fy\",\n \"ga\",\n \"gd\",\n \"gl\",\n \"gn\",\n \"gu\",\n \"gv\",\n \"ha\",\n \"he\",\n \"hi\",\n \"ho\",\n \"hr\",\n \"ht\",\n \"hu\",\n \"hy\",\n \"hz\",\n \"ia\",\n \"ie\",\n \"ig\",\n \"ik\",\n \"io\",\n \"is\",\n \"it\",\n \"ja\",\n \"ka\",\n \"kg\",\n \"ki\",\n \"kj\",\n \"kk\",\n \"kl\",\n \"km\",\n \"kn\",\n \"kv\",\n \"kw\",\n \"ky\",\n \"la\",\n \"lb\",\n \"lg\",\n \"li\",\n \"ln\",\n \"lo\",\n \"lt\",\n \"lu\",\n \"lv\",\n \"mg\",\n \"mh\",\n \"mk\",\n \"mn\",\n \"mo\",\n \"mr\",\n \"mt\",\n \"my\",\n \"na\",\n \"nb\",\n \"nd\",\n \"ng\",\n \"nl\",\n \"nn\",\n \"no\",\n \"nr\",\n \"nv\",\n \"ny\",\n \"oj\",\n \"or\",\n \"os\",\n \"pi\",\n \"pl\",\n \"ps\",\n \"pt\",\n \"rc\",\n \"rm\",\n \"rn\",\n \"ro\",\n \"ru\",\n \"rw\",\n \"sa\",\n \"sc\",\n \"se\",\n \"sg\",\n \"sh\",\n \"sk\",\n \"sl\",\n \"sm\",\n \"sn\",\n \"sr\",\n \"ss\",\n \"st\",\n \"su\",\n \"sv\",\n \"sw\",\n \"ta\",\n \"te\",\n \"tg\",\n \"th\",\n \"tk\",\n \"tl\",\n \"tn\",\n \"tr\",\n \"ts\",\n \"tt\",\n \"tw\",\n \"ty\",\n \"ug\",\n \"uk\",\n \"uz\",\n \"ve\",\n \"vo\",\n \"wa\",\n \"wo\",\n \"xh\",\n \"yo\",\n \"za\",\n \"zh\",\n \"zu\"\n ],\n \"%i:%M:%S %p\": [\n \"aa\",\n \"ak\",\n \"am\",\n \"bn\",\n \"el\",\n \"en\",\n \"iu\",\n \"kr\",\n \"ks\",\n \"mi\",\n \"ml\",\n \"ms\",\n \"ne\",\n \"om\",\n \"sd\",\n \"so\",\n \"sq\",\n \"ti\",\n \"to\",\n \"ur\",\n \"vi\"\n ],\n \"%I:%M:%S %p\": [\n \"ar\",\n \"fa\",\n \"ku\",\n \"qu\"\n ],\n \"%p %i:%M:%S\": [\n \"as\",\n \"ii\",\n \"ko\",\n \"yi\"\n ],\n \"\\u0f46\\u0f74\\u0f0b\\u0f5a\\u0f7c\\u0f51\\u0f0b%i:%M:%S %p\": [\n \"dz\"\n ],\n \"%p ga %i:%M:%S\": [\n \"ee\"\n ],\n \"%H.%M.%S\": [\n \"fi\",\n \"id\",\n \"jv\",\n \"oc\",\n \"si\"\n ],\n \"%p %I:%M:%S\": [\n \"pa\"\n ]\n}\nvar x_format = {\n \"%m/%d/%y\": [\n \"C\"\n ],\n \"%d/%m/%Y\": [\n \"aa\",\n \"am\",\n \"bm\",\n \"bn\",\n \"ca\",\n \"co\",\n \"cy\",\n \"el\",\n \"es\",\n \"ff\",\n \"fr\",\n \"ga\",\n \"gd\",\n \"gl\",\n \"gn\",\n \"gv\",\n \"ha\",\n \"he\",\n \"id\",\n \"ig\",\n \"it\",\n \"iu\",\n \"jv\",\n \"ki\",\n \"kr\",\n \"kw\",\n \"la\",\n \"lg\",\n \"ln\",\n \"lo\",\n \"lu\",\n \"mi\",\n \"ml\",\n \"ms\",\n \"mt\",\n \"nd\",\n \"oc\",\n \"om\",\n \"pt\",\n \"qu\",\n \"rn\",\n \"sd\",\n \"sg\",\n \"so\",\n \"sw\",\n \"ti\",\n \"to\",\n \"uk\",\n \"ur\",\n \"uz\",\n \"vi\",\n \"wo\",\n \"yo\"\n ],\n \"%m/%d/%Y\": [\n \"ab\",\n \"ae\",\n \"an\",\n \"av\",\n \"ay\",\n \"bh\",\n \"bi\",\n \"ch\",\n \"cr\",\n \"cv\",\n \"ee\",\n \"en\",\n \"fj\",\n \"ho\",\n \"ht\",\n \"hz\",\n \"ie\",\n \"ik\",\n \"io\",\n \"kg\",\n \"kj\",\n \"ks\",\n \"kv\",\n \"li\",\n \"mh\",\n \"mo\",\n \"na\",\n \"ne\",\n \"ng\",\n \"nv\",\n \"ny\",\n \"oj\",\n \"pi\",\n \"rc\",\n \"sc\",\n \"sh\",\n \"sm\",\n \"su\",\n \"tl\",\n \"tw\",\n \"ty\",\n \"wa\",\n \"za\",\n \"zu\"\n ],\n \"%Y-%m-%d\": [\n \"af\",\n \"br\",\n \"ce\",\n \"dz\",\n \"eo\",\n \"ko\",\n \"lt\",\n \"mg\",\n \"nr\",\n \"rw\",\n \"se\",\n \"si\",\n \"sn\",\n \"ss\",\n \"st\",\n \"sv\",\n \"tn\",\n \"ts\",\n \"ug\",\n \"ve\",\n \"vo\",\n \"xh\"\n ],\n \"%Y/%m/%d\": [\n \"ak\",\n \"bo\",\n \"eu\",\n \"ia\",\n \"ii\",\n \"ja\",\n \"ku\",\n \"yi\",\n \"zh\"\n ],\n \"null\": [\n \"ar\",\n \"fa\",\n \"ps\",\n \"th\"\n ],\n \"%d-%m-%Y\": [\n \"as\",\n \"da\",\n \"fy\",\n \"hi\",\n \"kl\",\n \"mr\",\n \"my\",\n \"nl\",\n \"rm\",\n \"sa\",\n \"ta\"\n ],\n \"%d.%m.%Y\": [\n \"az\",\n \"cs\",\n \"de\",\n \"et\",\n \"fi\",\n \"fo\",\n \"hy\",\n \"is\",\n \"ka\",\n \"kk\",\n \"lv\",\n \"mk\",\n \"nb\",\n \"nn\",\n \"no\",\n \"os\",\n \"pl\",\n \"ro\",\n \"ru\",\n \"sq\",\n \"tg\",\n \"tr\",\n \"tt\"\n ],\n \"%d.%m.%y\": [\n \"ba\",\n \"be\",\n \"lb\"\n ],\n \"%d.%m.%Y \\u0433.\": [\n \"bg\"\n ],\n \"%d.%m.%Y.\": [\n \"bs\",\n \"hr\",\n \"sr\"\n ],\n \"%Y.%m.%d\": [\n \"cu\",\n \"mn\"\n ],\n \"%d/%m/%y\": [\n \"dv\",\n \"km\"\n ],\n \"%d-%m-%y\": [\n \"gu\",\n \"kn\",\n \"or\",\n \"pa\",\n \"te\"\n ],\n \"%Y. %m. %d.\": [\n \"hu\"\n ],\n \"%d-%b %y\": [\n \"ky\"\n ],\n \"%d. %m. %Y\": [\n \"sk\",\n \"sl\"\n ],\n \"%d.%m.%y \\u00fd.\": [\n \"tk\"\n ]\n}\n\n\nvar $module=(function($B){\n var _b_ = $B.builtins\n return {\n CHAR_MAX: 127,\n LC_ALL: 6,\n LC_COLLATE: 3,\n LC_CTYPE: 0,\n LC_MESSAGES: 5,\n LC_MONETARY: 4,\n LC_NUMERIC: 1,\n LC_TIME: 2,\n Error: _b_.ValueError,\n\n _date_format: function(spec, hour){\n var t,\n locale = __BRYTHON__.locale.substr(0, 2)\n\n if(spec == \"p\"){\n var res = hours < 12 ? am[locale] : pm[locale]\n if(res === undefined){\n throw _b_.ValueError.$factory(\"no format \" + spec + \" for locale \" +\n locale)\n }\n return res\n }\n else if(spec == \"x\"){\n t = x_format\n }else if(spec == \"X\"){\n t = X_format\n }else{\n throw _b_.ValueError.$factory(\"invalid format\", spec)\n }\n for(var key in t){\n if(t[key].indexOf(locale) > -1){\n return key\n }\n }\n throw _b_.ValueError.$factory(\"no format \" + spec + \" for locale \" +\n locale)\n },\n\n localeconv: function(){\n var conv = {'grouping': [127],\n 'currency_symbol': '',\n 'n_sign_posn': 127,\n 'p_cs_precedes': 127,\n 'n_cs_precedes': 127,\n 'mon_grouping': [],\n 'n_sep_by_space': 127,\n 'decimal_point': '.',\n 'negative_sign': '',\n 'positive_sign': '',\n 'p_sep_by_space': 127,\n 'int_curr_symbol': '',\n 'p_sign_posn': 127,\n 'thousands_sep': '',\n 'mon_thousands_sep': '',\n 'frac_digits': 127,\n 'mon_decimal_point': '',\n 'int_frac_digits': 127\n }\n var res = $B.empty_dict()\n for(var key in conv){\n _b_.dict.$setitem(res, key, conv[key])\n }\n \n return res\n },\n\n setlocale : function(){\n var $ = $B.args(\"setlocale\", 2, {category: null, locale: null},\n [\"category\", \"locale\"], arguments, {locale: _b_.None},\n null, null)\n /// XXX category is currently ignored\n if($.locale == \"\"){\n // use browser language setting, if it is set\n var LANG = ($B.language || \"\").substr(0, 2)\n if(am.hasOwnProperty(LANG)){\n $B.locale = LANG\n return LANG\n }else{\n console.log(\"Unknown locale: \" + LANG)\n }\n }else if($.locale === _b_.None){\n // return current locale\n return $B.locale\n }else{\n // Only use 2 first characters\n try{$.locale.substr(0, 2)}\n catch(err){\n throw $module.Error.$factory(\"Invalid locale: \" + $.locale)\n }\n if(am.hasOwnProperty($.locale.substr(0, 2))){\n $B.locale = $.locale\n return $.locale\n }else{\n throw $module.Error.$factory(\"Unknown locale: \" + $.locale)\n }\n }\n }\n }\n})(__BRYTHON__)\n"], "_multiprocessing": [".js", "// multiprocessing\nvar $module = (function($B){\n\nvar _b_ = $B.builtins\n\nvar Process = $B.make_class('Process')\n\nvar $convert_args=function(args) {\n var _list=[]\n for(var i=0, _len_i = args.length; i < _len_i; i++) {\n var _a=args[i]\n if(_b_.isinstance(_a, _b_.str)){_list.push(\"'\"+_a+\"'\")} else {_list.push(_a)}\n }\n\n return _list.join(',')\n}\n\nProcess.is_alive = function(self){return self.$alive}\n\nProcess.join = function(self, timeout){\n // need to block until process is complete\n // could probably use a addEventListener to execute all existing code\n // after this join statement\n\n self.$worker.addEventListener('message', function (e) {\n var data=e.data\n if (data.stdout != '') { // output stdout from process\n $B.stdout.write(data.stdout)\n }\n }, false);\n}\n\nProcess.run = function(self){\n //fix me\n}\n\nProcess.start = function(self){\n self.$worker.postMessage({target: self.$target,\n args: $convert_args(self.$args),\n // kwargs: self.$kwargs\n })\n self.$worker.addEventListener('error', function(e) { throw e})\n self.$alive=true\n}\n\nProcess.terminate = function(self){\n self.$worker.terminate()\n self.$alive=false\n}\n\n// variables\n//name\n//daemon\n//pid\n//exitcode\n\nProcess. $factory = function(){\n //arguments group=None, target=None, name=None, args=(), kwargs=()\n\n var $ns=$B.args('Process',0,{},[],arguments,{},null,'kw')\n var kw=$ns['kw']\n\n var target=_b_.dict.get($ns['kw'],'target', _b_.None)\n var args=_b_.dict.get($ns['kw'],'args', _b_.tuple.$factory())\n\n var worker = new Worker('/src/web_workers/multiprocessing.js')\n\n var res = {\n __class__:Process,\n $worker: worker,\n name: $ns['name'] || _b_.None,\n $target: target+'',\n $args: args,\n //$kwargs: $ns['kw'],\n $alive: false\n }\n return res\n}\n\n$B.set_func_names(Process, \"multiprocessing\")\n\nvar Pool = $B.make_class(\"Pool\")\n\nPool.__enter__ = function(self){}\nPool.__exit__ = function(self){}\n\nPool.__str__ = Pool.toString = Pool.__repr__=function(self){\n return ''\n}\n\nPool.map = function(){\n\n var $ns=$B.args('Pool.map', 3,\n {self:null, func:null, fargs:null}, ['self', 'func', 'fargs'],\n arguments,{},'args','kw')\n var func = $ns['func']\n var fargs = $ns['fargs']\n\n var _results = []\n\n fargs = _b_.iter(fargs)\n\n var _pos = 0\n console.log(self.$processes)\n _workers =[]\n for(var i=0; i < self.$processes; i++) {\n _workers[i] = new Worker('/src/web_workers/multiprocessing.js')\n var arg\n\n try{arg = $B.$getattr(fargs, '__next__')()}\n catch(err) {\n if (err.__class__ !== _b_.StopIteration) throw err\n }\n console.log(arg)\n _workers[i].finished=false\n _workers[i].postMessage({target: func+'', pos: _pos,\n args: $convert_args([arg])})\n _pos++\n\n _workers[i].addEventListener('message', function(e) {\n _results[e.data.pos]=e.data.result\n if (_results.length == args.length) return _results\n\n try {\n arg = $B.$getattr(fargs, '__next__')()\n e.currentTarget.postMessage({target: func+'', pos: _pos,\n args: $convert_args([arg])})\n _pos++\n } catch(err) {\n if (err.__class__ !== _b_.StopIteration) throw err\n this.finished=true\n }\n }, false);\n }\n}\n\nPool.apply_async = function(){\n\n var $ns=$B.$MakeArgs('apply_async', 3,\n {self:null, func:null, fargs:null}, ['self', 'func', 'fargs'],\n arguments,{},'args','kw')\n var func = $ns['func']\n var fargs = $ns['fargs']\n\n fargs = _b_.iter(fargs)\n\n async_result = {}\n async_result.get = function(timeout){\n console.log(results)\n console.log(fargs)\n return this.results}\n async_result.results=[]\n\n var _pos=0\n\n _workers=[]\n for(var i=0; i < self.$processes; i++) {\n _workers[i] = new Worker('/src/web_workers/multiprocessing.js')\n var arg\n\n try{arg = $B.$getattr(fargs, '__next__')()}\n catch(err) {\n if (err.__class__ !== _b_.StopIteration) throw err\n }\n //console.log(arg)\n //_workers[i].finished=false\n _workers[i].postMessage({target: func+'', pos: _pos,\n args: $convert_args([arg])})\n _pos++\n\n _workers[i].addEventListener('message', function(e) {\n async_result.results[e.data.pos]=e.data.result\n //if (_results.length == args.length) return _results\n\n try {\n arg = $B.$getattr(fargs, '__next__')()\n e.currentTarget.postMessage({target: func+'', pos: _pos,\n args: $convert_args([arg])})\n _pos++\n } catch(err) {\n if (err.__class__ !== _b_.StopIteration) throw err\n this.finished=true\n }\n }, false);\n }\n\n console.log(\"return\", async_result)\n return async_result\n}\n\nPool.$factory = function(){\n console.log(\"pool\")\n console.log(arguments)\n var $ns=$B.args('Pool',1,\n {processes:null},['processes'],arguments,{},'args','kw')\n\n var processes = $ns['processes']\n\n if (processes === _b_.None) {\n // look to see if we have stored cpu_count in local storage\n // maybe we should create a brython config file with settings,etc..??\n\n // if not there use a tool such as Core Estimator to calculate number of cpu's\n // http://eligrey.com/blog/post/cpu-core-estimation-with-javascript\n }\n\n console.log(processes)\n var res = {\n __class__:Pool,\n $processes:processes\n }\n return res\n}\n\n$B.set_func_names(Pool, \"multiprocessing\")\n\nreturn {Process:Process, Pool:Pool}\n\n})(__BRYTHON__)\n"], "_posixsubprocess": [".js", "var $module=(function($B){\n\n return {\n cloexec_pipe: function() {}, // fixme\n fork_exec: function(){}\n }\n})(__BRYTHON__)\n"], "_profile": [".js", "// Private interface to the profiling instrumentation implemented in py_utils.js.\n// Uses local a copy of the eval function from py_builtin_functions.js\n\nvar $module=(function($B) {\n eval($B.InjectBuiltins());\n return {\n brython:$B,\n data:$B.$profile_data,\n start:$B.$profile.start,\n stop:$B.$profile.stop,\n pause:$B.$profile.pause,\n status:$B.$profile.status,\n clear:$B.$profile.clear,\n elapsed:$B.$profile.elapsed,\n run:function(src,_globals,_locals,nruns) {\n var current_frame = $B.frames_stack[$B.frames_stack.length-1]\n if(current_frame!==undefined){\n var current_locals_id = current_frame[0].replace(/\\./,'_'),\n current_globals_id = current_frame[2].replace(/\\./,'_')\n }\n\n var is_exec = true,\n leave = false\n\n // code will be run in a specific block\n var globals_id = '$profile_'+$B.UUID(),\n locals_id\n\n if(_locals===_globals){\n locals_id = globals_id\n }else{\n locals_id = '$profile_'+$B.UUID()\n }\n // Initialise the object for block namespaces\n eval('var $locals_'+globals_id+' = {}\\nvar $locals_'+locals_id+' = {}')\n\n // Initialise block globals\n\n // A _globals dictionary is provided, set or reuse its attribute\n // globals_id\n _globals.globals_id = _globals.globals_id || globals_id\n globals_id = _globals.globals_id\n\n if(_locals === _globals || _locals === undefined){\n locals_id = globals_id\n parent_scope = $B.builtins_scope\n }else{\n // The parent block of locals must be set to globals\n parent_scope = {\n id: globals_id,\n parent_block: $B.builtins_scope,\n binding: {}\n }\n for(var attr of _b_.dict.$keys_string(_globals)){\n parent_scope.binding[attr] = true\n }\n }\n\n // Initialise block globals\n if(_globals.$jsobj){\n var items = _globals.$jsobj\n }else{\n var items = {}\n for(var key of _b_.dict.$keys_string(_globals)){\n items[key] = _b_.dict.$getitem_string(_globals, key)\n }\n }\n for(var item in items){\n item1 = to_alias(item)\n try{\n eval('$locals_' + globals_id + '[\"' + item1 +\n '\"] = items[item]')\n }catch(err){\n console.log(err)\n console.log('error setting', item)\n break\n }\n }\n\n // Initialise block locals\n var items = _b_.dict.items(_locals), item\n if(_locals.$jsobj){\n var items = _locals.$jsobj\n }else{\n var items = {}\n for(var key of _b_.dict.$keys_string(_locals)){\n items[key] = _b_.dict.$getitem_string(_locals, key)\n } }\n for(var item in items){\n item1 = to_alias(item)\n try{\n eval('$locals_' + locals_id + '[\"' + item[0] + '\"] = item[1]')\n }catch(err){\n console.log(err)\n console.log('error setting', item)\n break\n }\n }\n //var nb_modules = Object.keys(__BRYTHON__.modules).length\n //console.log('before exec', nb_modules)\n\n console.log(\"call py2js\", src, globals_id, locals_id, parent_scope)\n var root = $B.py2js(src, globals_id, locals_id, parent_scope),\n js, gns, lns\n\n try{\n\n var js = root.to_js()\n\n var i,res,gns;\n for(i=0;i>> i) & 0x1){\n sum = addition32(sum, unsigned32(n2 << i))\n }\n }\n return sum\n }\n\n /* initializes mt[N] with a seed */\n //c//void init_genrand(unsigned long s)\n function init_genrand(s) {\n //c//mt[0]= s & 0xffffffff;\n mt[0] = unsigned32(s & 0xffffffff)\n for(mti = 1; mti < N; mti++){\n mt[mti] =\n //c//(1812433253 * (mt[mti-1] ^ (mt[mti-1] >> 30)) + mti);\n addition32(multiplication32(1812433253,\n unsigned32(mt[mti - 1] ^ (mt[mti - 1] >>> 30))), mti)\n /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */\n /* In the previous versions, MSBs of the seed affect */\n /* only MSBs of the array mt[]. */\n /* 2002/01/09 modified by Makoto Matsumoto */\n //c//mt[mti] &= 0xffffffff;\n mt[mti] = unsigned32(mt[mti] & 0xffffffff);\n /* for >32 bit machines */\n }\n }\n\n /* initialize by an array with array-length */\n /* init_key is the array for initializing keys */\n /* key_length is its length */\n /* slight change for C++, 2004/2/26 */\n //c//void init_by_array(unsigned long init_key[], int key_length)\n function init_by_array(init_key, key_length) {\n //c//int i, j, k;\n var i, j, k\n init_genrand(19650218)\n i = 1\n j = 0\n k = (N > key_length ? N : key_length)\n for(; k; k--){\n //c//mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1664525))\n //c// + init_key[j] + j; /* non linear */\n mt[i] = addition32(\n addition32(unsigned32(mt[i] ^\n multiplication32(unsigned32(mt[i - 1] ^ (mt[i - 1] >>> 30)),\n 1664525)),\n init_key[j]), j)\n mt[i] =\n //c//mt[i] &= 0xffffffff; /* for WORDSIZE > 32 machines */\n unsigned32(mt[i] & 0xffffffff)\n i++\n j++\n if(i >= N){mt[0] = mt[N - 1]; i = 1}\n if(j >= key_length){j = 0}\n }\n for(k = N - 1; k; k--){\n //c//mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >> 30)) * 1566083941))\n //c//- i; /* non linear */\n mt[i] = subtraction32(\n unsigned32(\n (mt[i]) ^\n multiplication32(\n unsigned32(mt[i - 1] ^ (mt[i - 1] >>> 30)),\n 1566083941)),\n i\n )\n //c//mt[i] &= 0xffffffff; /* for WORDSIZE > 32 machines */\n mt[i] = unsigned32(mt[i] & 0xffffffff)\n i++\n if(i >= N){mt[0] = mt[N - 1]; i = 1}\n }\n mt[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */\n }\n\n /* generates a random number on [0,0xffffffff]-interval */\n //c//unsigned long genrand_int32(void)\n function genrand_int32() {\n //c//unsigned long y;\n //c//static unsigned long mag01[2]={0x0UL, MATRIX_A};\n var y;\n var mag01 = [0x0, MATRIX_A];\n /* mag01[x] = x * MATRIX_A for x=0,1 */\n\n if(mti >= N){ /* generate N words at one time */\n //c//int kk;\n var kk\n\n if(mti == N + 1){ /* if init_genrand() has not been called, */\n init_genrand(Date.now()) /* a default initial seed is used */\n }\n\n for(kk = 0; kk < N - M; kk++){\n //c//y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);\n //c//mt[kk] = mt[kk+M] ^ (y >> 1) ^ mag01[y & 0x1];\n y = unsigned32((mt[kk]&UPPER_MASK) | (mt[kk + 1]&LOWER_MASK))\n mt[kk] = unsigned32(mt[kk + M] ^ (y >>> 1) ^ mag01[y & 0x1])\n }\n for(;kk < N - 1; kk++){\n //c//y = (mt[kk]&UPPER_MASK)|(mt[kk+1]&LOWER_MASK);\n //c//mt[kk] = mt[kk+(M-N)] ^ (y >> 1) ^ mag01[y & 0x1];\n y = unsigned32((mt[kk]&UPPER_MASK) | (mt[kk + 1]&LOWER_MASK))\n mt[kk] = unsigned32(mt[kk + (M - N)] ^ (y >>> 1) ^ mag01[y & 0x1])\n }\n //c//y = (mt[N-1]&UPPER_MASK)|(mt[0]&LOWER_MASK);\n //c//mt[N-1] = mt[M-1] ^ (y >> 1) ^ mag01[y & 0x1];\n y = unsigned32((mt[N - 1] & UPPER_MASK) | (mt[0] & LOWER_MASK))\n mt[N - 1] = unsigned32(mt[M - 1] ^ (y >>> 1) ^ mag01[y & 0x1])\n mti = 0\n }\n\n y = mt[mti++]\n\n /* Tempering */\n //c//y ^= (y >> 11);\n //c//y ^= (y << 7) & 0x9d2c5680;\n //c//y ^= (y << 15) & 0xefc60000;\n //c//y ^= (y >> 18);\n y = unsigned32(y ^ (y >>> 11))\n y = unsigned32(y ^ ((y << 7) & 0x9d2c5680))\n y = unsigned32(y ^ ((y << 15) & 0xefc60000))\n y = unsigned32(y ^ (y >>> 18))\n\n return y\n }\n\n /* generates a random number on [0,0x7fffffff]-interval */\n //c//long genrand_int31(void)\n function genrand_int31(){\n //c//return (genrand_int32()>>1);\n return (genrand_int32()>>>1)\n }\n\n /* generates a random number on [0,1]-real-interval */\n //c//double genrand_real1(void)\n function genrand_real1(){\n return genrand_int32()*(1.0/4294967295.0)\n /* divided by 2^32-1 */\n }\n\n /* generates a random number on [0,1)-real-interval */\n //c//double genrand_real2(void)\n function genrand_real2(){\n return genrand_int32() * (1.0 / 4294967296.0)\n /* divided by 2^32 */\n }\n\n /* generates a random number on (0,1)-real-interval */\n //c//double genrand_real3(void)\n function genrand_real3() {\n return ((genrand_int32()) + 0.5) * (1.0 / 4294967296.0)\n /* divided by 2^32 */\n }\n\n /* generates a random number on [0,1) with 53-bit resolution*/\n //c//double genrand_res53(void)\n function genrand_res53() {\n //c//unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6;\n var a = genrand_int32() >>> 5,\n b = genrand_int32() >>> 6\n return (a * 67108864.0 + b) * (1.0 / 9007199254740992.0)\n }\n /* These real versions are due to Isaku Wada, 2002/01/09 added */\n\n var random = genrand_res53\n\n random.seed = function(seed){\n if(seed === undefined || $B.is_none(seed)){\n const entries = new Uint32Array(N)\n crypto.getRandomValues(entries)\n init_by_array(Array.from(entries), N)\n return\n }\n\n if(!_b_.isinstance(seed, _b_.int)){\n seed = _b_.hash(seed)\n }\n\n // Transform to long integer\n if(typeof seed == \"number\"){\n seed = BigInt(seed)\n }else if(seed.__class__ === $B.long_int){\n seed = seed.value\n }else{\n return random.seed(seed.$brython_value)\n }\n\n // Take abs(seed)\n seed = seed > 0 ? seed : -seed\n\n var keys = []\n var int32_1 = 2n ** 32n - 1n\n\n // decomposition in factors of 2 ** 32\n while(seed >= int32_1){\n var quot = seed / int32_1,\n rest = seed % int32_1\n // Rest is a JS number (< 2 ** 32)\n keys.push(Number(rest))\n // Quotient is either a JS number or a instance of long_int\n // but seed must be long_int\n seed = quot\n }\n keys.push(Number(seed))\n\n init_by_array(keys, keys.length)\n }\n\n random.seed(seed)\n\n random.int31 = genrand_int31\n random.int32 = genrand_int32\n random.real1 = genrand_real1\n random.real2 = genrand_real2\n random.real3 = genrand_real3\n random.res53 = genrand_res53\n\n // Added for compatibility with Python\n random.getstate = function(){\n return $B.fast_tuple(mt.concat([mti]))\n }\n\n random.setstate = function(state){\n mt = state.slice(0, state.length - 1)\n mti = state[state.length - 1]\n }\n\n return random\n\n}\n\nvar Random = $B.make_class(\"Random\",\n function(){\n return {\n __class__: Random,\n _random: RandomStream(Date.now())\n }\n }\n)\n\nRandom.getrandbits = function(){\n var $ = $B.args(\"getrandbits\", 2, {self: null, k:null}, [\"self\", \"k\"],\n arguments, {}, null, null),\n self = $.self,\n k = $B.$GetInt($.k)\n\n if(k < 0)\n throw _b_.ValueError.$factory('number of bits must be non-negative')\n\n if(k === 0)\n return 0\n\n const words = Math.floor((k - 1) / 32) + 1\n const wordarray = new ArrayBuffer(words * 4)\n const wordarray_view = new DataView(wordarray)\n\n /* Fill-out bits of long integer, by 32-bit words, from least significant\n to most significant. */\n for(i = 0; i < words; i++, k -= 32){\n r = self._random.int32()\n if (k < 32)\n r >>>= (32 - k) /* Drop least significant bits */\n wordarray_view.setUint32(i * 4, r, true)\n }\n\n return _b_.int.from_bytes(_b_.bytes.$factory(Array.from(new Uint8Array(wordarray))), \"little\")\n}\n\nRandom.getstate = function(){\n var $ = $B.args('getstate', 1, {self: null},\n [\"self\"], arguments, {}, null, null),\n self = $.self\n return self._random.getstate()\n}\n\nRandom.random = function(){\n var $ = $B.args('random', 1, {self: null}, [\"self\"],\n arguments, {}, null, null),\n self = $.self\n return $B.fast_float(self._random())\n}\n\nRandom.seed = function(){\n var $ = $B.args('seed', 2, {self: null, n: null}, ['self', 'n'],\n arguments, {}, null, null),\n self = $.self,\n n = $.n\n\n if (self._random === undefined)\n self._random = RandomStream(n)\n else\n self._random.seed(n)\n}\n\nRandom.setstate = function(){\n var $ = $B.args('setstate', 2, {self: null, state:null}, ['self', 'state'],\n arguments, {}, null, null),\n self = $.self,\n state = $.state\n return self._random.setstate(state)\n}\n\n$B.set_func_names(Random, \"_random\")\n\nreturn { Random }\n\n})(__BRYTHON__)\n"], "_sre": [".py", "\n''\n\n\n\n\n\n\n\nMAXREPEAT=2147483648\nMAXGROUPS=2147483647\n\nimport array\nimport operator,sys\nfrom sre_constants import ATCODES,OPCODES,CHCODES\nfrom sre_constants import SRE_INFO_PREFIX,SRE_INFO_LITERAL\nfrom sre_constants import SRE_FLAG_UNICODE,SRE_FLAG_LOCALE\n\n\nfrom _sre_utils import (unicode_iscased,ascii_iscased,unicode_tolower,\nascii_tolower)\n\nimport sys\n\n\n\nMAGIC=20171005\n\n\n\n\n\n\n\n\n\n\n\n\n\nCODESIZE=4\n\ncopyright=\"_sre.py 2.4c Copyright 2005 by Nik Haldimann\"\n\n\ndef getcodesize():\n return CODESIZE\n \ndef compile(pattern,flags,code,groups=0,groupindex={},indexgroup=[None ]):\n ''\n \n return SRE_Pattern(pattern,flags,code,groups,groupindex,indexgroup)\n \ndef getlower(char_ord,flags):\n if (char_ord <128)or (flags&SRE_FLAG_UNICODE)\\\n or (flags&SRE_FLAG_LOCALE and char_ord <256):\n \n return ord(chr(char_ord).lower())\n else :\n return char_ord\n \n \nclass SRE_Pattern:\n\n def __init__(self,pattern,flags,code,groups=0,groupindex={},indexgroup=[None ]):\n self.pattern=pattern\n self.flags=flags\n self.groups=groups\n self.groupindex=groupindex\n self._indexgroup=indexgroup\n self._code=code\n \n def match(self,string,pos=0,endpos=sys.maxsize):\n ''\n\n \n state=_State(string,pos,endpos,self.flags)\n if state.match(self._code):\n return SRE_Match(self,state)\n return None\n \n def fullmatch(self,string,pos=0,endpos=sys.maxsize):\n ''\n\n \n end=\"$\"if isinstance(string,str)else b\"$\"\n if not string.endswith(end):\n string +=end\n state=_State(string,pos,endpos,self.flags)\n if state.match(self._code):\n return SRE_Match(self,state)\n return None\n \n def search(self,string,pos=0,endpos=sys.maxsize):\n ''\n\n\n \n state=_State(string,pos,endpos,self.flags)\n if state.search(self._code):\n return SRE_Match(self,state)\n else :\n return None\n \n def findall(self,string,pos=0,endpos=sys.maxsize):\n ''\n matchlist=[]\n state=_State(string,pos,endpos,self.flags)\n while state.start <=state.end:\n state.reset()\n state.string_position=state.start\n if not state.search(self._code):\n break\n match=SRE_Match(self,state)\n if self.groups ==0 or self.groups ==1:\n item=match.group(self.groups)\n else :\n item=match.groups(\"\")\n matchlist.append(item)\n if state.string_position ==state.start:\n state.start +=1\n else :\n state.start=state.string_position\n return matchlist\n \n def _subx(self,template,string,count=0,subn=False ):\n filter=template\n if not callable(template)and \"\\\\\"in template:\n \n \n \n \n import re as sre\n filter=sre._subx(self,template)\n state=_State(string,0,sys.maxsize,self.flags)\n sublist=[]\n \n n=last_pos=0\n while not count or n 0):\n \n if callable(filter):\n sublist.append(filter(SRE_Match(self,state)))\n else :\n sublist.append(filter)\n last_pos=state.string_position\n n +=1\n if state.string_position ==state.start:\n state.start +=1\n else :\n state.start=state.string_position\n \n if last_pos =0 and group <=self.re.groups:\n return group\n else :\n if group in self.re.groupindex:\n return self.re.groupindex[group]\n raise IndexError(\"no such group\")\n \n def _get_slice(self,group,default):\n group_indices=self.regs[group]\n if group_indices[0]>=0:\n return self.string[group_indices[0]:group_indices[1]]\n else :\n return default\n \n def start(self,group=0):\n ''\n\n \n return self.regs[self._get_index(group)][0]\n \n def end(self,group=0):\n ''\n\n \n return self.regs[self._get_index(group)][1]\n \n def span(self,group=0):\n ''\n return self.start(group),self.end(group)\n \n def expand(self,template):\n ''\n \n import sre\n return sre._expand(self.re,self,template)\n \n def groups(self,default=None ):\n ''\n\n \n groups=[]\n for indices in self.regs[1:]:\n if indices[0]>=0:\n groups.append(self.string[indices[0]:indices[1]])\n else :\n groups.append(default)\n return tuple(groups)\n \n def groupdict(self,default=None ):\n ''\n\n \n groupdict={}\n for key,value in self.re.groupindex.items():\n groupdict[key]=self._get_slice(value,default)\n return groupdict\n \n def group(self,*args):\n ''\n \n if len(args)==0:\n args=(0,)\n grouplist=[]\n for group in args:\n grouplist.append(self._get_slice(self._get_index(group),None ))\n if len(grouplist)==1:\n return grouplist[0]\n else :\n return tuple(grouplist)\n \n def __copy__():\n raise TypeError(\"cannot copy this pattern object\")\n \n def __deepcopy__():\n raise TypeError(\"cannot copy this pattern object\")\n \n def __str__(self):\n start,end=self.start(0),self.end(0)\n return (f\"\")\n \nclass _State:\n\n def __init__(self,string,start,end,flags):\n if isinstance(string,bytearray):\n string=str(bytes(string),\"latin1\")\n if isinstance(string,bytes):\n string=str(string,\"latin1\")\n self.string=string\n if start <0:\n start=0\n if end >len(string):\n end=len(string)\n self.start=start\n self.string_position=self.start\n self.end=end\n self.pos=start\n self.flags=flags\n self.reset()\n \n def reset(self):\n self.marks=[]\n self.lastindex=-1\n self.marks_stack=[]\n self.context_stack=[]\n self.repeat=None\n \n def match(self,pattern_codes):\n \n \n \n \n \n \n \n \n dispatcher=_OpcodeDispatcher()\n self.context_stack.append(_MatchContext(self,pattern_codes))\n has_matched=None\n while len(self.context_stack)>0:\n context=self.context_stack[-1]\n has_matched=dispatcher.match(context)\n if has_matched is not None :\n self.context_stack.pop()\n return has_matched\n \n def search(self,pattern_codes):\n flags=0\n if OPCODES[pattern_codes[0]].name ==\"info\":\n \n \n if pattern_codes[2]&SRE_INFO_PREFIX and pattern_codes[5]>1:\n return self.fast_search(pattern_codes)\n flags=pattern_codes[2]\n pattern_codes=pattern_codes[pattern_codes[1]+1:]\n \n string_position=self.start\n if OPCODES[pattern_codes[0]].name ==\"literal\":\n \n \n character=pattern_codes[1]\n while True :\n while string_position =self.end:\n return False\n self.start=string_position\n string_position +=1\n self.string_position=string_position\n if flags&SRE_INFO_LITERAL:\n return True\n if self.match(pattern_codes[2:]):\n return True\n return False\n \n \n while string_position <=self.end:\n self.reset()\n self.start=self.string_position=string_position\n if self.match(pattern_codes):\n return True\n string_position +=1\n return False\n \n def fast_search(self,pattern_codes):\n ''\n \n \n \n flags=pattern_codes[2]\n prefix_len=pattern_codes[5]\n prefix_skip=pattern_codes[6]\n prefix=pattern_codes[7:7+prefix_len]\n overlap=pattern_codes[7+prefix_len -1:pattern_codes[1]+1]\n pattern_codes=pattern_codes[pattern_codes[1]+1:]\n i=0\n string_position=self.string_position\n while string_position =len(self.marks):\n self.marks.extend([None ]*(mark_nr -len(self.marks)+1))\n self.marks[mark_nr]=position\n \n def get_marks(self,group_index):\n marks_index=2 *group_index\n if len(self.marks)>marks_index+1:\n return self.marks[marks_index],self.marks[marks_index+1]\n else :\n return None ,None\n \n def marks_push(self):\n self.marks_stack.append((self.marks[:],self.lastindex))\n \n def marks_pop(self):\n self.marks,self.lastindex=self.marks_stack.pop()\n \n def marks_pop_keep(self):\n self.marks,self.lastindex=self.marks_stack[-1]\n \n def marks_pop_discard(self):\n self.marks_stack.pop()\n \n def lower(self,char_ord):\n return getlower(char_ord,self.flags)\n \n \nclass _MatchContext:\n\n def __init__(self,state,pattern_codes):\n self.state=state\n self.pattern_codes=pattern_codes\n self.string_position=state.string_position\n self.code_position=0\n self.has_matched=None\n \n def push_new_context(self,pattern_offset):\n ''\n\n \n child_context=_MatchContext(self.state,\n self.pattern_codes[self.code_position+pattern_offset:])\n \n \n \n \n self.state.context_stack.append(child_context)\n return child_context\n \n def peek_char(self,peek=0):\n return self.state.string[self.string_position+peek]\n \n def skip_char(self,skip_count):\n self.string_position +=skip_count\n \n def remaining_chars(self):\n return self.state.end -self.string_position\n \n def peek_code(self,peek=0):\n return self.pattern_codes[self.code_position+peek]\n \n def skip_code(self,skip_count):\n self.code_position +=skip_count\n \n def remaining_codes(self):\n return len(self.pattern_codes)-self.code_position\n \n def at_beginning(self):\n return self.string_position ==0\n \n def at_end(self):\n return self.string_position ==self.state.end\n \n def at_linebreak(self):\n return not self.at_end()and _is_linebreak(self.peek_char())\n \n def at_boundary(self,word_checker):\n if self.at_beginning()and self.at_end():\n return False\n that=not self.at_beginning()and word_checker(self.peek_char(-1))\n this=not self.at_end()and word_checker(self.peek_char())\n return this !=that\n \n \nclass _RepeatContext(_MatchContext):\n\n def __init__(self,context):\n _MatchContext.__init__(self,context.state,\n context.pattern_codes[context.code_position:])\n self.count=-1\n \n self.previous=context.state.repeat\n self.last_position=None\n \n \nclass _Dispatcher:\n\n DISPATCH_TABLE=None\n \n def dispatch(self,code,context):\n method=self.DISPATCH_TABLE.get(code,self.__class__.unknown)\n return method(self,context)\n \n def unknown(self,code,ctx):\n raise NotImplementedError()\n \n def build_dispatch_table(cls,items,method_prefix):\n if cls.DISPATCH_TABLE is not None :\n return\n table={}\n for item in items:\n key,value=item.name.lower(),int(item)\n if hasattr(cls,\"%s%s\"%(method_prefix,key)):\n table[value]=getattr(cls,\"%s%s\"%(method_prefix,key))\n cls.DISPATCH_TABLE=table\n \n build_dispatch_table=classmethod(build_dispatch_table)\n \n \nclass _OpcodeDispatcher(_Dispatcher):\n\n def __init__(self):\n self.executing_contexts={}\n self.at_dispatcher=_AtcodeDispatcher()\n self.ch_dispatcher=_ChcodeDispatcher()\n self.set_dispatcher=_CharsetDispatcher()\n \n def match(self,context):\n ''\n\n \n while context.remaining_codes()>0 and context.has_matched is None :\n opcode=context.peek_code()\n if not self.dispatch(opcode,context):\n return None\n if context.has_matched is None :\n context.has_matched=False\n return context.has_matched\n \n def dispatch(self,opcode,context):\n ''\n \n \n if id(context)in self.executing_contexts:\n generator=self.executing_contexts[id(context)]\n del self.executing_contexts[id(context)]\n has_finished=next(generator)\n else :\n method=self.DISPATCH_TABLE.get(opcode,_OpcodeDispatcher.unknown)\n has_finished=method(self,context)\n if hasattr(has_finished,\"__next__\"):\n generator=has_finished\n has_finished=next(generator)\n if not has_finished:\n self.executing_contexts[id(context)]=generator\n return has_finished\n \n def op_success(self,ctx):\n \n \n ctx.state.string_position=ctx.string_position\n ctx.has_matched=True\n return True\n \n def op_failure(self,ctx):\n \n \n ctx.has_matched=False\n return True\n \n def general_op_literal(self,ctx,compare,decorate=lambda x:x):\n if ctx.at_end()or not compare(decorate(ord(ctx.peek_char())),\n decorate(ctx.peek_code(1))):\n ctx.has_matched=False\n ctx.skip_code(2)\n ctx.skip_char(1)\n \n def op_literal(self,ctx):\n \n \n \n self.general_op_literal(ctx,operator.eq)\n return True\n \n def op_not_literal(self,ctx):\n \n \n \n self.general_op_literal(ctx,operator.ne)\n return True\n \n def op_literal_ignore(self,ctx):\n \n \n \n self.general_op_literal(ctx,operator.eq,ctx.state.lower)\n return True\n \n def op_literal_uni_ignore(self,ctx):\n self.general_op_literal(ctx,operator.eq,ctx.state.lower)\n return True\n \n def op_not_literal_ignore(self,ctx):\n \n \n \n self.general_op_literal(ctx,operator.ne,ctx.state.lower)\n return True\n \n def op_at(self,ctx):\n \n \n \n if not self.at_dispatcher.dispatch(ctx.peek_code(1),ctx):\n ctx.has_matched=False\n \n return True\n ctx.skip_code(2)\n return True\n \n def op_category(self,ctx):\n \n \n \n if ctx.at_end()or not self.ch_dispatcher.dispatch(ctx.peek_code(1),ctx):\n ctx.has_matched=False\n \n return True\n ctx.skip_code(2)\n ctx.skip_char(1)\n return True\n \n def op_any(self,ctx):\n \n \n \n if ctx.at_end()or ctx.at_linebreak():\n ctx.has_matched=False\n \n return True\n ctx.skip_code(1)\n ctx.skip_char(1)\n return True\n \n def op_any_all(self,ctx):\n \n \n \n if ctx.at_end():\n ctx.has_matched=False\n \n return True\n ctx.skip_code(1)\n ctx.skip_char(1)\n return True\n \n def general_op_in(self,ctx,decorate=lambda x:x):\n \n \n if ctx.at_end():\n ctx.has_matched=False\n \n return\n skip=ctx.peek_code(1)\n ctx.skip_code(2)\n \n \n if not self.check_charset(ctx,decorate(ord(ctx.peek_char()))):\n \n ctx.has_matched=False\n return\n ctx.skip_code(skip -1)\n ctx.skip_char(1)\n \n \n def op_in(self,ctx):\n \n \n \n self.general_op_in(ctx)\n return True\n \n def op_in_ignore(self,ctx):\n \n \n \n self.general_op_in(ctx,ctx.state.lower)\n return True\n \n def op_in_uni_ignore(self,ctx):\n self.general_op_in(ctx,ctx.state.lower)\n return True\n \n def op_jump(self,ctx):\n \n \n \n ctx.skip_code(ctx.peek_code(1)+1)\n return True\n \n \n \n op_info=op_jump\n \n def op_mark(self,ctx):\n \n \n \n ctx.state.set_mark(ctx.peek_code(1),ctx.string_position)\n ctx.skip_code(2)\n return True\n \n def op_branch(self,ctx):\n \n \n \n ctx.state.marks_push()\n ctx.skip_code(1)\n current_branch_length=ctx.peek_code(0)\n while current_branch_length:\n \n \n if not (OPCODES[ctx.peek_code(1)].name ==\"literal\"and\\\n (ctx.at_end()or ctx.peek_code(2)!=ord(ctx.peek_char()))):\n ctx.state.string_position=ctx.string_position\n child_context=ctx.push_new_context(1)\n \n yield False\n if child_context.has_matched:\n ctx.has_matched=True\n yield True\n ctx.state.marks_pop_keep()\n ctx.skip_code(current_branch_length)\n current_branch_length=ctx.peek_code(0)\n ctx.state.marks_pop_discard()\n ctx.has_matched=False\n \n yield True\n \n def op_repeat_one(self,ctx):\n \n \n \n \n mincount=ctx.peek_code(2)\n maxcount=ctx.peek_code(3)\n \n \n \n if ctx.remaining_chars()=mincount and\\\n (ctx.at_end()or ord(ctx.peek_char())!=char):\n ctx.skip_char(-1)\n count -=1\n if count =mincount:\n ctx.state.string_position=ctx.string_position\n child_context=ctx.push_new_context(ctx.peek_code(1)+1)\n yield False\n if child_context.has_matched:\n ctx.has_matched=True\n yield True\n ctx.skip_char(-1)\n count -=1\n ctx.state.marks_pop_keep()\n \n ctx.state.marks_pop_discard()\n ctx.has_matched=False\n \n yield True\n \n def op_min_repeat_one(self,ctx):\n \n \n mincount=ctx.peek_code(2)\n maxcount=ctx.peek_code(3)\n \n \n if ctx.remaining_chars()=maxcount and maxcount !=MAXREPEAT:\n ctx.has_matched=False\n \n yield True\n repeat.count=count\n child_context=repeat.push_new_context(4)\n yield False\n ctx.has_matched=child_context.has_matched\n if not ctx.has_matched:\n repeat.count=count -1\n ctx.state.string_position=ctx.string_position\n yield True\n \n def general_op_groupref(self,ctx,decorate=lambda x:x):\n group_start,group_end=ctx.state.get_marks(ctx.peek_code(1))\n if group_start is None or group_end is None or group_end =0:\n child_context=ctx.push_new_context(3)\n yield False\n if child_context.has_matched:\n ctx.has_matched=False\n yield True\n ctx.skip_code(ctx.peek_code(1)+1)\n yield True\n \n def unknown(self,ctx):\n \n raise RuntimeError(\"Internal re error. Unknown opcode: %s\"%ctx.peek_code())\n \n def check_charset(self,ctx,char):\n ''\n \n self.set_dispatcher.reset(char)\n save_position=ctx.code_position\n result=None\n while result is None :\n result=self.set_dispatcher.dispatch(ctx.peek_code(),ctx)\n ctx.code_position=save_position\n \n return result\n \n def count_repetitions(self,ctx,maxcount):\n ''\n\n \n count=0\n real_maxcount=ctx.state.end -ctx.string_position\n if maxcount >4)\\\n &(1 <<(char_code&15)):\n return self.ok\n ctx.skip_code(16)\n else :\n if char_code <256 and ctx.peek_code(char_code >>5)\\\n &(1 <<(char_code&31)):\n return self.ok\n ctx.skip_code(8)\n def set_range(self,ctx):\n \n if ctx.peek_code(1)<=self.char <=ctx.peek_code(2):\n return self.ok\n ctx.skip_code(3)\n def set_negate(self,ctx):\n self.ok=not self.ok\n ctx.skip_code(1)\n \n def set_bigcharset(self,ctx):\n \n char_code=self.char\n count=ctx.peek_code(1)\n ctx.skip_code(2)\n if char_code <65536:\n block_index=char_code >>8\n \n a=array.array(\"B\")\n a.fromstring(array.array(CODESIZE ==2 and \"H\"or \"I\",\n [ctx.peek_code(block_index //CODESIZE)]).tostring())\n block=a[block_index %CODESIZE]\n ctx.skip_code(256 //CODESIZE)\n block_value=ctx.peek_code(block *(32 //CODESIZE)\n +((char_code&255)>>(CODESIZE ==2 and 4 or 5)))\n if block_value&(1 <<(char_code&((8 *CODESIZE)-1))):\n return self.ok\n else :\n ctx.skip_code(256 //CODESIZE)\n ctx.skip_code(count *(32 //CODESIZE))\n \n def unknown(self,ctx):\n return False\n \n_CharsetDispatcher.build_dispatch_table(OPCODES,\"set_\")\n\n\nclass _AtcodeDispatcher(_Dispatcher):\n\n def at_beginning(self,ctx):\n return ctx.at_beginning()\n at_beginning_string=at_beginning\n def at_beginning_line(self,ctx):\n return ctx.at_beginning()or _is_linebreak(ctx.peek_char(-1))\n def at_end(self,ctx):\n return (ctx.remaining_chars()==1 and ctx.at_linebreak())or ctx.at_end()\n def at_end_line(self,ctx):\n return ctx.at_linebreak()or ctx.at_end()\n def at_end_string(self,ctx):\n return ctx.at_end()\n def at_boundary(self,ctx):\n return ctx.at_boundary(_is_word)\n def at_non_boundary(self,ctx):\n return not ctx.at_boundary(_is_word)\n def at_loc_boundary(self,ctx):\n return ctx.at_boundary(_is_loc_word)\n def at_loc_non_boundary(self,ctx):\n return not ctx.at_boundary(_is_loc_word)\n def at_uni_boundary(self,ctx):\n return ctx.at_boundary(_is_uni_word)\n def at_uni_non_boundary(self,ctx):\n return not ctx.at_boundary(_is_uni_word)\n def unknown(self,ctx):\n return False\n \n_AtcodeDispatcher.build_dispatch_table(ATCODES,\"\")\n\n\nclass _ChcodeDispatcher(_Dispatcher):\n\n def category_digit(self,ctx):\n return _is_digit(ctx.peek_char())\n def category_not_digit(self,ctx):\n return not _is_digit(ctx.peek_char())\n def category_space(self,ctx):\n return _is_space(ctx.peek_char())\n def category_not_space(self,ctx):\n return not _is_space(ctx.peek_char())\n def category_word(self,ctx):\n return _is_word(ctx.peek_char())\n def category_not_word(self,ctx):\n return not _is_word(ctx.peek_char())\n def category_linebreak(self,ctx):\n return _is_linebreak(ctx.peek_char())\n def category_not_linebreak(self,ctx):\n return not _is_linebreak(ctx.peek_char())\n def category_loc_word(self,ctx):\n return _is_loc_word(ctx.peek_char())\n def category_loc_not_word(self,ctx):\n return not _is_loc_word(ctx.peek_char())\n def category_uni_digit(self,ctx):\n return ctx.peek_char().isdigit()\n def category_uni_not_digit(self,ctx):\n return not ctx.peek_char().isdigit()\n def category_uni_space(self,ctx):\n return ctx.peek_char().isspace()\n def category_uni_not_space(self,ctx):\n return not ctx.peek_char().isspace()\n def category_uni_word(self,ctx):\n return _is_uni_word(ctx.peek_char())\n def category_uni_not_word(self,ctx):\n return not _is_uni_word(ctx.peek_char())\n def category_uni_linebreak(self,ctx):\n return ord(ctx.peek_char())in _uni_linebreaks\n def category_uni_not_linebreak(self,ctx):\n return ord(ctx.peek_char())not in _uni_linebreaks\n def unknown(self,ctx):\n return False\n \n_ChcodeDispatcher.build_dispatch_table(CHCODES,\"\")\n\n\n_ascii_char_info=[0,0,0,0,0,0,0,0,0,2,6,2,\n2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,\n0,0,0,0,0,0,0,0,0,0,0,0,0,25,25,25,25,25,25,25,25,\n25,25,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,24,\n24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,0,0,\n0,0,16,0,24,24,24,24,24,24,24,24,24,24,24,24,24,24,\n24,24,24,24,24,24,24,24,24,24,24,24,0,0,0,0,0]\n\ndef _is_digit(char):\n code=ord(char)\n return code <128 and _ascii_char_info[code]&1\n \ndef _is_space(char):\n code=ord(char)\n return code <128 and _ascii_char_info[code]&2\n \ndef _is_word(char):\n\n code=ord(char)\n return code <128 and _ascii_char_info[code]&16\n \ndef _is_loc_word(char):\n return (not (ord(char)&~255)and char.isalnum())or char =='_'\n \ndef _is_uni_word(char):\n\n\n return chr(ord(char)).isalnum()or char =='_'\n \ndef _is_linebreak(char):\n return char ==\"\\n\"\n \n \n_uni_linebreaks=[10,13,28,29,30,133,8232,8233]\n\ndef _log(message):\n if 0:\n print(message)\n", ["_sre_utils", "array", "operator", "re", "sre", "sre_constants", "sys"]], "_sre_utils": [".js", "var $module=(function($B){\n\n function unicode_iscased(cp){\n // cp : Unicode code point\n var letter = String.fromCodePoint(cp)\n return (letter != letter.toLowerCase() ||\n letter != letter.toUpperCase())\n }\n\n function ascii_iscased(cp){\n if(cp > 255){return false}\n return unicode_iscased(cp)\n }\n\n function unicode_tolower(cp){\n var letter = String.fromCodePoint(cp),\n lower = letter.toLowerCase()\n return lower.charCodeAt(0)\n }\n\n function ascii_tolower(cp){\n return unicode_tolower(cp)\n }\n\nreturn {\n unicode_iscased: unicode_iscased,\n ascii_iscased: ascii_iscased,\n unicode_tolower: unicode_tolower,\n ascii_tolower: ascii_tolower\n}\n\n}\n\n)(__BRYTHON__)"], "_string": [".js", "var $module=(function($B){\n\nvar _b_ = $B.builtins\n\nfunction parts(format_string){\n var result = [],\n _parts = $B.split_format(format_string) // defined in py_string.js\n for(var i = 0; i < _parts.length; i+= 2){\n result.push({pre: _parts[i], fmt: _parts[i + 1]})\n }\n return result\n}\n\nfunction Tuple(){\n var args = []\n for(var i=0, len=arguments.length; i < len; i++){\n args.push(arguments[i])\n }\n return _b_.tuple.$factory(args)\n}\n\nreturn{\n\n formatter_field_name_split: function(fieldname){\n // Split the argument as a field name\n var parsed = $B.parse_format(fieldname),\n first = parsed.name,\n rest = []\n if(first.match(/\\d+/)){first = parseInt(first)}\n parsed.name_ext.forEach(function(ext){\n if(ext.startsWith(\"[\")){\n var item = ext.substr(1, ext.length - 2)\n if(item.match(/\\d+/)){\n rest.push(Tuple(false, parseInt(item)))\n }else{\n rest.push(Tuple(false, item))\n }\n }else{\n rest.push(Tuple(true, ext.substr(1)))\n }\n })\n return Tuple(first, _b_.iter(rest))\n },\n formatter_parser: function(format_string){\n // Parse the argument as a format string\n\n if(! _b_.isinstance(format_string, _b_.str)){\n throw _b_.ValueError.$factory(\"Invalid format string type: \" +\n $B.class_name(format_string))\n }\n\n var result = []\n parts(format_string).forEach(function(item){\n var pre = item.pre === undefined ? \"\" : item.pre,\n fmt = item.fmt\n if(fmt === undefined){\n result.push(Tuple(pre, _b_.None, _b_.None, _b_.None))\n }else if(fmt.string == ''){\n result.push(Tuple(pre, '', '', _b_.None))\n }else{\n result.push(Tuple(pre,\n fmt.raw_name + fmt.name_ext.join(\"\"),\n fmt.raw_spec,\n fmt.conv || _b_.None))\n }\n })\n return result\n }\n}\n})(__BRYTHON__)"], "_strptime": [".js", "var _b_ = __BRYTHON__.builtins\n\nvar $module = (function($B){\n return {\n _strptime_datetime: function(cls, s, fmt){\n var pos_s = 0,\n pos_fmt = 0,\n dt = {}\n function error(time_data, format){\n throw _b_.ValueError.$factory(\n `time data '${time_data}' does not match format '${format}'`)\n }\n\n var locale = __BRYTHON__.locale,\n shortdays = [],\n longdays = [],\n conv_func = locale == \"C\" ?\n function(d, options){\n return d.toLocaleDateString('en-EN', options)\n } :\n function(d, options){\n return d.toLocaleDateString(locale, options)\n }\n\n for(var day = 16; day < 23; day++){\n var d = new Date(Date.UTC(2012, 11, day, 3, 0, 0))\n shortdays.push(conv_func(d, {weekday: 'short'}))\n longdays.push(conv_func(d, {weekday: 'long'}))\n }\n\n var shortmonths = [],\n longmonths = []\n\n for(var month = 0; month < 12; month++){\n var d = new Date(Date.UTC(2012, month, 11, 3, 0, 0))\n shortmonths.push(conv_func(d, {month: 'short'}))\n longmonths.push(conv_func(d, {month: 'long'}))\n }\n\n var shortdays_re = new RegExp(shortdays.join(\"|\").replace(\".\", \"\\\\.\")),\n longdays_re = new RegExp(longdays.join(\"|\")),\n shortmonths_re = new RegExp(shortmonths.join(\"|\").replace(\".\", \"\\\\.\")),\n longmonths_re = new RegExp(longmonths.join(\"|\"))\n\n var regexps = {\n d: [\"day\", new RegExp(\"^[123][0-9]|0?[1-9]\")],\n f: [\"microsecond\", new RegExp(\"^\\\\d{1,6}\")],\n H: [\"hour\", new RegExp(\"^[01][0-9]|2[0-3]|\\\\d\")],\n I: [\"hour\", new RegExp(\"^1[0-2]|0?[0-9]\")],\n m: [\"month\", new RegExp(\"^1[012]|0?[1-9]\")],\n M: [\"minute\", new RegExp(\"^[1-5][0-9]|0?[0-9]\")],\n S: [\"second\", new RegExp(\"^[1-5]\\\\d|0?\\\\d\")],\n y: [\"year\", new RegExp(\"^0{0,2}\\\\d{2}\")],\n Y: [\"year\", new RegExp(\"^\\\\d{4}\")],\n z: [\"tzinfo\", new RegExp(\"Z\")]\n }\n\n for(var key in regexps){\n var re = new RegExp('%' + key, \"g\"),\n mo = fmt.match(re)\n if(mo && mo.length > 1){\n throw _b_.ValueError.$factory('strptime directive %' +\n key + ' defined more than once')\n }\n }\n\n while(pos_fmt < fmt.length){\n var car = fmt.charAt(pos_fmt)\n if(car == \"%\"){\n var spec = fmt.charAt(pos_fmt + 1),\n regexp = regexps[spec]\n if(regexp !== undefined){\n var re = regexp[1],\n attr = regexp[0],\n res = re.exec(s.substr(pos_s))\n if(res === null){\n error(s, fmt)\n }else{\n dt[attr] = parseInt(res[0])\n if(attr == \"microsecond\"){\n while(dt[attr] < 100000){\n dt[attr] *= 10\n }\n }else if(attr == \"tzinfo\"){\n // Only value supported for the moment : Z\n // (UTC)\n var dt_module = $B.imported[cls.__module__]\n dt.tzinfo = dt_module.timezone.utc\n }\n pos_fmt += 2\n pos_s += res[0].length\n }\n }else if(spec == \"a\" || spec == \"A\"){\n // Locale's abbreviated (a) or full (A) weekday name\n var attr = \"weekday\",\n re = spec == \"a\" ? shortdays_re : longdays_re,\n t = spec == \"a\" ? shortdays : longdays\n res = re.exec(s.substr(pos_s))\n if(res === null){\n console.log('error', re, 'string', s.substr(pos_s), 'fmt', fmt)\n error(s, fmt)\n }else{\n var match = res[0],\n ix = t.indexOf(match)\n }\n dt.weekday = ix\n pos_fmt += 2\n pos_s += match.length\n }else if(spec == \"b\" || spec == \"B\"){\n // Locales's abbreviated (b) or full (B) month\n var attr = \"month\",\n re = spec == \"b\" ? shortmonths_re : longmonths_re,\n t = spec == \"b\" ? shortmonths : longmonths,\n res = re.exec(s.substr(pos_s))\n if(res === null){\n error(s, fmt)\n }else{\n var match = res[0],\n ix = t.indexOf(match)\n }\n dt.month = ix + 1\n pos_fmt += 2\n pos_s += match.length\n }else if(spec == \"c\"){\n // Locale's appropriate date and time representation\n var fmt1 = fmt.substr(0, pos_fmt - 1) + _locale_c_format() +\n fmt.substr(pos_fmt + 2)\n fmt = fmt1\n }else if(spec == \"%\"){\n if(s.charAt(pos_s) == \"%\"){\n pos_fmt++\n pos_s++\n }else{\n error(s, fmt)\n }\n }else{\n pos_fmt++\n }\n }else{\n if(car == s.charAt(pos_s)){\n pos_fmt++\n pos_s++\n }else{\n error(s, fmt)\n }\n }\n }\n\n if(pos_s < s.length){\n throw _b_.ValueError.$factory('unconverted data remains: ' +\n s.substr(pos_s))\n }\n\n return $B.$call(cls)(dt.year, dt.month, dt.day,\n dt.hour || 0, dt.minute || 0, dt.second || 0,\n dt.microsecond || 0, dt.tzinfo || _b_.None)\n }\n }\n})(__BRYTHON__)\n"], "_svg": [".js", "// creation of an HTML element\nvar $module = (function($B){\n\nvar _b_ = $B.builtins\nvar TagSum = $B.TagSum // defined in py_dom.js\n\nvar $svgNS = \"http://www.w3.org/2000/svg\"\nvar $xlinkNS = \"http://www.w3.org/1999/xlink\"\n\nfunction makeTagDict(tagName){\n // return the dictionary for the class associated with tagName\n var dict = $B.make_class(tagName)\n\n dict.__init__ = function(){\n var $ns = $B.args('__init__', 1, {self: null}, ['self'],\n arguments, {}, 'args', 'kw'),\n self = $ns['self'],\n args = $ns['args']\n if(args.length == 1){\n var first = args[0]\n if(_b_.isinstance(first, [_b_.str, _b_.int, _b_.float])){\n self.appendChild(document.createTextNode(_b_.str.$factory(first)))\n }else if(first.__class__ === TagSum){\n for(var i = 0, len = first.children.length; i < len; i++){\n self.appendChild(first.children[i].elt)\n }\n }else{ // argument is another DOMNode instance\n try{self.appendChild(first.elt)}\n catch(err){throw _b_.ValueError.$factory('wrong element ' + first)}\n }\n }\n\n // attributes\n var items = _b_.list.$factory(_b_.dict.items($ns['kw']))\n for(var arg in $ns.kw.$jsobj){\n // keyword arguments\n var value = $B.py_immutable_to_js($ns.kw.$jsobj[arg])\n if(arg.toLowerCase().substr(0,2) == \"on\"){\n // Event binding passed as argument \"onclick\", \"onfocus\"...\n // Better use method bind of DOMNode objects\n $B.DOMNode.bind(self,\n arg.toLowerCase().substr(2),\n value)\n }else if(arg.toLowerCase() == \"style\"){\n $B.DOMNode.set_style(self, value)\n }else if(arg.toLowerCase().indexOf(\"href\") !== -1){ // xlink:href\n self.setAttributeNS( \"http://www.w3.org/1999/xlink\",\n \"href\",value)\n }else{\n if(value !== false){\n // option.selected=false sets it to true :-)\n try{\n arg = arg.replace('_', '-')\n self.setAttributeNS(null, arg, value)\n }catch(err){\n throw _b_.ValueError.$factory(\"can't set attribute \" + arg)\n }\n }\n }\n }\n }\n\n dict.__mro__ = [$B.DOMNode, $B.builtins.object]\n\n dict.__new__ = function(cls){\n var res = $B.DOMNode.$factory(document.createElementNS($svgNS, tagName))\n res.__class__ = cls\n return res\n }\n\n dict.$factory = function(){\n var res = $B.DOMNode.$factory(\n document.createElementNS($svgNS, tagName))\n res.__class__ = dict\n // apply __init__\n dict.__init__(res, ...arguments)\n return res\n }\n\n $B.set_func_names(dict, \"browser.svg\")\n\n return dict\n}\n\n\n// SVG\nvar $svg_tags = ['a',\n'altGlyph',\n'altGlyphDef',\n'altGlyphItem',\n'animate',\n'animateColor',\n'animateMotion',\n'animateTransform',\n'circle',\n'clipPath',\n'color_profile', // instead of color-profile\n'cursor',\n'defs',\n'desc',\n'ellipse',\n'feBlend',\n'foreignObject', //patch to enable foreign objects\n'g',\n'image',\n'line',\n'linearGradient',\n'marker',\n'mask',\n'path',\n'pattern',\n'polygon',\n'polyline',\n'radialGradient',\n'rect',\n'set',\n'stop',\n'svg',\n'text',\n'tref',\n'tspan',\n'use']\n\n// create classes\nvar obj = new Object()\nvar dicts = {}\nfor(var i = 0, len = $svg_tags.length; i < len; i++){\n var tag = $svg_tags[i]\n obj[tag] = makeTagDict(tag)\n}\n\nreturn obj\n})(__BRYTHON__)\n"], "_symtable": [".js", "var $module = (function($B){\n\nvar _b_ = $B.builtins\n\nreturn {\n CELL: 5,\n DEF_ANNOT: 256,\n DEF_BOUND: 134,\n DEF_FREE: 32,\n DEF_FREE_CLASS: 64,\n DEF_GLOBAL: 1,\n DEF_IMPORT: 128,\n DEF_LOCAL: 2,\n DEF_NONLOCAL: 8,\n DEF_PARAM: 4,\n FREE: 4,\n GLOBAL_EXPLICIT: 2,\n GLOBAL_IMPLICIT: 3,\n LOCAL: 1,\n SCOPE_MASK: 15,\n SCOPE_OFF: 11,\n TYPE_CLASS: 1,\n TYPE_FUNCTION: 0,\n TYPE_MODULE: 2,\n USE: 16,\n symtable: function(){\n var $ = $B.args('symtable', 3,\n {code: null, filename: null, compile_type: null},\n ['code', 'filename', 'compile_type'], arguments,\n {}, null, null)\n var ast = _b_.compile($.code, $.filename, $.compile_type,\n $B.PyCF_ONLY_AST)\n // ast is an instance of Python class\n // _Py_Symtable_Build in symtable.js uses the underlying JS object\n return $B._PySymtable_Build(ast.$js_ast, $.filename)\n }\n}\n\n})(__BRYTHON__)"], "_tokenize": [".js", "var $module = (function($B){\n\nvar _b_ = $B.builtins\n\n$B.$import('token')\n\n\nvar TokenizerIter = $B.make_class('TokenizerIter',\n function(it){\n return {\n __class__: TokenizerIter,\n it\n }\n }\n)\n\nTokenizerIter.__iter__ = function(self){\n var js_iter = function*(){\n var line_num = 0\n while(true){\n try{\n var bytes = self.it()\n }catch(err){\n if($B.is_exc(err, [_b_.StopIteration])){\n token = endmarker\n token.start[0]++\n token.end[0]++\n var type_code = $B.imported.token[token.type]\n yield $B.fast_tuple([type_code, token.string,\n $B.fast_tuple(token.start),\n $B.fast_tuple(token.end),\n token.line])\n }\n throw err\n }\n line_num++\n var line = _b_.bytes.decode(bytes, 'utf-8')\n for(var token of $B.tokenizer(line, 'test')){\n if(token.type == 'ENCODING'){ // skip encoding token\n continue\n }else if(token.type == 'ENDMARKER'){\n var endmarker = token\n continue\n }\n token.start[0] = line_num\n token.end[0] = line_num\n var type_code = $B.imported.token[token.type]\n yield $B.fast_tuple([type_code, token.string,\n $B.fast_tuple(token.start),\n $B.fast_tuple(token.end),\n token.line])\n }\n }\n\n }\n return $B.generator.$factory(js_iter)()\n}\n\nTokenizerIter.__next__ = function*(self){\n\n}\n\n$B.set_func_names(TokenizerIter, '_tokenize')\n\nreturn {TokenizerIter}\n\n})(__BRYTHON__)"], "_webcomponent": [".js", "// module for Web Components\nvar $module = (function($B){\n\nvar _b_ = $B.builtins\n\nfunction define(tag_name, cls, options){\n var $ = $B.args(\"define\", 3, {tag_name: null, cls: null, options: null},\n [\"tag_name\", \"cls\", \"options\"], arguments, {options: _b_.None},\n null, null),\n tag_name = $.tag_name,\n cls = $.cls,\n options = $.options,\n _extends,\n extend_dom_name = 'HTMLElement'\n if(options !== _b_.None){\n if(! $B.$isinstance(options, _b_.dict)){\n throw _b_.TypeError.$factory('options can only be None or a ' +\n `dict, not '${$B.class_name(options)}'`)\n }\n try{\n _extends = _b_.dict.$getitem(options, 'extends')\n }catch(err){\n // ignore\n }\n }else{\n for(var base of cls.__bases__){\n if(base.__module__ == 'browser.html'){\n _extends = base.__name__.toLowerCase()\n break\n }\n }\n }\n\n if(_extends){\n if(typeof _extends != 'string'){\n throw _b_.TypeError.$factory('value for extends must be a ' +\n `string, not '${$B.class_name(_extends)}'`)\n }\n var elt = document.createElement(_extends)\n if(elt instanceof HTMLUnknownElement){\n throw _b_.ValueError.$factory(`'${_extends}' is not a valid ` +\n 'tag name')\n }\n var extend_tag = _extends.toLowerCase()\n extend_dom_name = Object.getPrototypeOf(elt).constructor.name\n }\n if(typeof tag_name != \"string\"){\n throw _b_.TypeError.$factory(\"first argument of define() \" +\n \"must be a string, not '\" + $B.class_name(tag_name) + \"'\")\n }else if(tag_name.indexOf(\"-\") == -1){\n throw _b_.ValueError.$factory(\"custom tag name must \" +\n \"contain a hyphen (-)\")\n }\n if(!_b_.isinstance(cls, _b_.type)){\n throw _b_.TypeError.$factory(\"second argument of define() \" +\n \"must be a class, not '\" + $B.class_name(tag_name) + \"'\")\n }\n cls.$webcomponent = true\n\n // Create the Javascript class used for the component. It must have\n // the same name as the Python class\n var src = String.raw`var WebComponent = class extends HTMLElement {\n constructor(){\n // Always call super first in constructor\n super()\n var html = $B.imported['browser.html']\n // Create tag in module html\n if(html['tag_name'] === undefined){\n html.maketag('tag_name', WebComponent)\n }\n var init = $B.$getattr(cls, \"__init__\", _b_.None)\n if(init !== _b_.None){\n try{\n var _self = $B.DOMNode.$factory(this),\n attrs_before_init = []\n for(var i = 0, len = _self.attributes.length; i < len; i++){\n attrs_before_init.push(_self.attributes.item(i))\n }\n _self.__class__ = cls\n $B.$call(init)(_self)\n if(WebComponent.initialized){\n // Check that init() did not introduce new attributes,\n // which is illegal\n // cf. https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformance\n for(var i = 0, len = _self.attributes.length; i < len; i++){\n var item = _self.attributes.item(i)\n if(attrs_before_init.indexOf(item) == -1){\n throw _b_.TypeError.$factory(\"Custom element \" +\n \"must not create attributes, found: \" +\n item.name + '=\"' + item.value + '\"')\n }\n }\n }\n }catch(err){\n $B.handle_error(err)\n }\n }\n }\n static get observedAttributes(){\n var obs_attr = $B.$getattr(cls, \"observedAttributes\", null)\n if(obs_attr === null){\n return []\n }else if(typeof obs_attr == \"function\"){\n var warning = _b_.DeprecationWarning.$factory(\n \"Setting observedAttributes as a method \" +\n \"is deprecated. Set it as a class attribute.\")\n // module _warning is in builtin_modules.js\n $B.imported._warnings.warn(warning)\n return $B.$call(obs_attr)(this)\n }else if(Array.isArray(obs_attr)){\n return obs_attr\n }else{\n throw _b_.TypeError.$factory(\n \"wrong type for observedAttributes: \" +\n $B.class_name(obs_attr))\n }\n }\n }\n `\n var name = cls.__name__,\n code = src.replace(/WebComponent/g, name).\n replace(/tag_name/g, tag_name).\n replace(/HTMLElement/, extend_dom_name)\n var src = eval(code)\n var webcomp = eval(name) // JS class for component\n webcomp.$cls = cls\n\n // Override __getattribute__ to handle DOMNode attributes such as\n // attachShadow\n cls.__getattribute__ = function(self, attr){\n try{\n return $B.DOMNode.__getattribute__(self, attr)\n }catch(err){\n if($B.DOMNode[attr]){\n if(typeof $B.DOMNode[attr] == 'function'){\n return function(){\n var args = [self]\n for(var i = 0, len = arguments.length; i < len; i++){\n args.push(arguments[i])\n }\n return $B.DOMNode[attr].apply(null, args)\n }\n }else{\n return $B.DOMNode[attr]\n }\n }\n throw err\n }\n }\n\n var mro = [cls].concat(cls.__mro__).reverse()\n for(var i = 0, len = mro.length; i < len; i++){\n var pcls = mro[i]\n for(var key in pcls){\n if((! webcomp.hasOwnProperty(key)) &&\n typeof pcls[key] == \"function\" &&\n // don't set $factory (would make it a class)\n key !== '$factory'\n ){\n webcomp.prototype[key] = (function(attr, klass){\n return function(){\n try{\n return $B.$call(klass[attr])($B.DOMNode.$factory(this), ...arguments)\n }catch(err){\n $B.show_error(err)\n }\n }\n })(key, pcls)\n }\n }\n }\n\n // define WebComp as the class to use for the specified tag name\n if(_extends){\n customElements.define(tag_name, webcomp, {extends: extend_tag})\n }else{\n customElements.define(tag_name, webcomp)\n }\n webcomp.initialized = true\n}\n\nfunction get(name){\n var ce = customElements.get(name)\n if(ce && ce.$cls){return ce.$cls}\n return _b_.None\n}\n\nreturn {\n define: define,\n get: get\n}\n\n})(__BRYTHON__)"], "_webworker": [".js", "// Web Worker implementation\n\nvar $module = (function($B){\n\nvar _b_ = $B.builtins\n\nvar VFS = $B.brython_modules ? 'brython_modules' :\n $B.use_VFS ? 'brython_stdlib' : null\n\nfunction scripts_to_load(debug_level){\n if(debug_level > 2){\n var brython_scripts = [\n 'brython_builtins',\n\n 'py_ast_classes',\n 'unicode_data',\n 'stdlib_paths',\n 'version_info',\n\n 'python_tokenizer',\n 'py_ast',\n 'py2js',\n 'loaders',\n 'py_utils',\n 'py_object',\n 'py_type',\n 'py_builtin_functions',\n 'py_sort',\n 'py_exceptions',\n 'py_range_slice',\n 'py_bytes',\n 'py_set',\n 'js_objects',\n 'py_import',\n 'py_string',\n 'py_int',\n 'py_long_int',\n 'py_float',\n 'py_complex',\n 'py_dict',\n 'py_list',\n 'py_generator',\n 'py_dom',\n 'py_pattern_matching',\n 'async',\n 'py_flags',\n 'builtin_modules',\n 'ast_to_js',\n 'symtable',\n 'builtins_docstrings'\n ]\n }else{\n var brython_scripts = ['brython']\n }\n\n if(VFS !== null){\n brython_scripts.push(VFS)\n }\n return brython_scripts\n}\n\nvar wclass = $B.make_class(\"Worker\",\n function(worker){\n var res = worker\n res.send = function(){\n var args = []\n for(var arg of arguments){\n args.push($B.pyobj2structuredclone(arg))\n }\n return res.postMessage.apply(this, args)\n }\n return res\n }\n)\n\nwclass.__mro__ = [$B.JSObj, _b_.object]\n\n$B.set_func_names(wclass, \"browser.worker\")\n\n\nvar _Worker = $B.make_class(\"Worker\", function(id, onmessage, onerror){\n $B.warn(_b_.DeprecationWarning,\n \"worker.Worker is deprecated in version 3.12. \" +\n \"Use worker.create_worker instead\")\n var $ = $B.args(\"__init__\", 3, {id: null, onmessage: null, onerror: null},\n ['id', 'onmessage', 'onerror'], arguments,\n {onmessage: _b_.None, onerror: _b_.None}, null, null),\n id = $.id,\n worker_script = $B.webworkers[id]\n\n if(worker_script === undefined){\n throw _b_.KeyError.$factory(id)\n }\n var filename = worker_script.src ? worker_script.src : $B.script_path + \"#\" + id,\n src = $B.file_cache[filename]\n var indexedDB = worker_script.attributes &&\n worker_script.attributes.getNamedItem('indexedDB')\n var script_id = \"worker\" + $B.UUID(),\n filename = $B.script_path + \"#\" + id\n $B.url2name[filename] = script_id\n\n var js = $B.py2js({src, filename}, script_id).to_js(),\n header = '';\n var brython_scripts = scripts_to_load(\n $B.get_option_from_filename('debug', filename))\n brython_scripts.forEach(function(script){\n if(script != VFS || VFS == \"brython_stdlib\"){\n var url = $B.brython_path + script + \".js\"\n }else{\n // attribute $B.brython_modules is set to the path of\n // brython_modules.js by the script itself\n var url = $B.brython_modules\n }\n if(! $B.get_option('cache')){ // cf. issue 1954\n url += '?' + (new Date()).getTime()\n }\n header += 'importScripts(\"' + url + '\")\\n'\n })\n // set __BRYTHON__.imported[script_id]\n header += `\n var $B = __BRYTHON__,\n _b_ = $B.builtins\n var module = $B.module.$factory(\"${script_id}\")\n module.__file__ = \"${filename}\"\n module.__doc__ = _b_.None\n $B.imported[\"${script_id}\"] = module\\n`\n // restore brython_path\n header += `$B.brython_path = \"${$B.brython_path}\"\\n`\n // restore path for imports (cf. issue #1305)\n header += `$B.make_import_paths(\"${filename}\")\\n`\n // Call brython() to initialize internal Brython values\n header += `brython(${JSON.stringify($B.$options)})\\n`\n js = header + js\n js = `try{${js}}catch(err){$B.handle_error(err)}`\n var blob = new Blob([js], {type: \"application/js\"}),\n url = URL.createObjectURL(blob),\n w = new Worker(url),\n res = wclass.$factory(w)\n return res\n})\n\nfunction create_worker(){\n var $ = $B.args(\"__init__\", 4,\n {id: null, onready: null, onmessage: null, onerror: null},\n ['id', 'onready', 'onmessage', 'onerror'], arguments,\n {onready: _b_.None, onmessage: _b_.None, onerror: _b_.None},\n null, null),\n id = $.id,\n worker_script = $B.webworkers[id],\n onready = $.onready === _b_.None ? _b_.None : $B.$call($.onready),\n onmessage = $.onmessage === _b_.None ? _b_.None : $B.$call($.onmessage),\n onerror = $.onerror === _b_.None ? _b_.None : $B.$call($.onerror)\n\n if(worker_script === undefined){\n throw _b_.RuntimeError.$factory(`No webworker with id '${id}'`)\n }\n var script_id = \"worker\" + $B.UUID(),\n filename = worker_script.src ? worker_script.src : $B.script_path + \"#\" + id,\n src = $B.file_cache[filename]\n $B.url2name[filename] = script_id\n\n var brython_scripts = scripts_to_load(\n $B.get_option_from_filename('debug', filename))\n\n var js = $B.py2js({src, filename}, script_id).to_js(),\n header = '';\n for(var script of brython_scripts){\n if(script != VFS || VFS == \"brython_stdlib\"){\n var url = $B.brython_path + script + \".js\"\n }else{\n // attribute $B.brython_modules is set to the path of\n // brython_modules.js by the script itself\n var url = $B.brython_modules\n }\n if(! $B.get_option('cache')){ // cf. issue 1954\n url += '?' + (new Date()).getTime()\n }\n header += 'importScripts(\"' + url + '\")\\n'\n }\n // set __BRYTHON__.imported[script_id]\n header += `\n var $B = __BRYTHON__,\n _b_ = $B.builtins\n var module = $B.module.$factory(\"${script_id}\")\n module.__file__ = \"${filename}\"\n module.__doc__ = _b_.None\n $B.imported[\"${script_id}\"] = module\\n`\n\n header += '$B.file_cache[module.__file__] = `' + src + '`\\n'\n // restore brython_path\n header += `$B.brython_path = \"${$B.brython_path}\"\\n`\n // restore path for imports (cf. issue #1305)\n header += `$B.make_import_paths(\"${filename}\")\\n`\n\n // Call brython() to initialize internal Brython values\n var save_option = JSON.stringify($B.save_options)\n header += `brython(${save_option})\\n`\n\n // send dummy message to trigger resolution of Promise\n var ok_token = Math.random().toString(36).substr(2, 8),\n error_token = Math.random().toString(36).substr(2, 8)\n\n // open indexedDB cache before running worker code\n js = `$B.idb_open_promise().then(function(){\\n` +\n `try{\\n` +\n `${js}\\n` +\n `self.postMessage('${ok_token}')\\n` +\n `}catch(err){\\n` +\n `self.postMessage(\"${error_token}Error in worker ${id}\\\\n\" + $B.error_trace(err))\\n` +\n `}\\n})`\n js = header + js\n\n var p = new Promise(function(resolve, reject){\n try{\n var blob = new Blob([js], {type: \"application/js\"}),\n url = URL.createObjectURL(blob),\n w = new Worker(url),\n res = wclass.$factory(w)\n }catch(err){\n reject(err)\n }\n\n w.onmessage = function(ev){\n if(ev.data == ok_token){\n resolve(res)\n }else if(typeof ev.data == 'string' &&\n ev.data.startsWith(error_token)){\n reject(ev.data.substr(error_token.length))\n }else{\n if(onmessage !== _b_.None){\n onmessage(ev)\n }\n resolve(res)\n }\n }\n\n return res\n })\n\n var error_func = onerror === _b_.None ? console.debug : onerror\n\n if(onready !== _b_.None){\n p.then(onready).catch(error_func)\n }else{\n p.catch(error_func)\n }\n return _b_.None\n}\n\nreturn {\n Worker: _Worker,\n create_worker\n}\n\n})(__BRYTHON__)\n"], "_zlib_utils": [".js", "\nfunction rfind(buf, seq){\n var buflen = buf.length,\n len = seq.length\n for(var i = buflen - len; i >= 0; i--){\n var chunk = buf.slice(i, i + len),\n found = true\n for(var j = 0; j < len; j++){\n if(chunk[j] != seq[j]){\n found = false\n break\n }\n }\n if(found){return i}\n }\n return -1\n}\n\n\nvar c;\nvar crcTable = [];\nfor(var n =0; n < 256; n++){\n c = n;\n for(var k =0; k < 8; k++){\n c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));\n }\n crcTable[n] = c;\n}\n\nvar $module = (function($B){\n\n return {\n crc32: function(bytes, crc) {\n var crc = crc ^ (-1);\n\n for (var byte of bytes.source) {\n crc = (crc >>> 8) ^ crcTable[(crc ^ byte) & 0xFF];\n }\n\n return (crc ^ (-1)) >>> 0;\n },\n\n lz_generator: function(text, size, min_len){\n /*\n Returns a list of items based on the LZ algorithm, using the\n specified window size and a minimum match length.\n The items are a tuple (length, distance) if a match has been\n found, and a byte otherwise.\n */\n // 'text' is an instance of Python 'bytes' class, the actual\n // bytes are in text.source\n text = text.source\n if(min_len === undefined){\n min_len = 3\n }\n var pos = 0, // position in text\n items = [] // returned items\n while(pos < text.length){\n sequence = text.slice(pos, pos + min_len)\n if(sequence.length < 3){\n for(var i = pos; i < text.length; i++){\n items.push(text[i])\n }\n break\n }\n // Search the sequence in the 'size' previous bytes\n buf = text.slice(pos - size, pos)\n buf_pos = rfind(buf, sequence)\n if(buf_pos > -1){\n // Match of length 3 found; search a longer one\n var len = 1\n while(len < 259 &&\n buf_pos + len < buf.length &&\n pos + len < text.length &&\n text[pos + len] == buf[buf_pos + len]){\n len += 1\n }\n match = text.slice(pos, pos + len)\n // \"Lazy matching\": search longer match starting at next\n // position\n longer_match = false\n if(pos + len < text.length - 2){\n match2 = text.slice(pos + 1, pos + len + 2)\n longer_buf_pos = rfind(buf, match2)\n if(longer_buf_pos > -1){\n // found longer match : emit current byte as\n // literal and move 1 byte forward\n longer_match = true\n char = text[pos]\n items.push(char)\n pos += 1\n }\n }\n if(! longer_match){\n distance = buf.length - buf_pos\n items.push($B.fast_tuple([len, distance]))\n if(pos + len == text.length){\n break\n }else{\n pos += len\n items.push(text[pos])\n pos += 1\n }\n }\n }else{\n char = text[pos]\n items.push(char)\n pos += 1\n }\n }\n return items\n }\n }\n})(__BRYTHON__)"], "crypto_js": [".py", "", [], 1], "crypto_js.rollups": [".py", "", [], 1], "crypto_js.rollups.md5": [".js", "/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS=CryptoJS||function(s,p){var m={},l=m.lib={},n=function(){},r=l.Base={extend:function(b){n.prototype=this;var h=new n;b&&h.mixIn(b);h.hasOwnProperty(\"init\")||(h.init=function(){h.$super.init.apply(this,arguments)});h.init.prototype=h;h.$super=this;return h},create:function(){var b=this.extend();b.init.apply(b,arguments);return b},init:function(){},mixIn:function(b){for(var h in b)b.hasOwnProperty(h)&&(this[h]=b[h]);b.hasOwnProperty(\"toString\")&&(this.toString=b.toString)},clone:function(){return this.init.prototype.extend(this)}},\nq=l.WordArray=r.extend({init:function(b,h){b=this.words=b||[];this.sigBytes=h!=p?h:4*b.length},toString:function(b){return(b||t).stringify(this)},concat:function(b){var h=this.words,a=b.words,j=this.sigBytes;b=b.sigBytes;this.clamp();if(j%4)for(var g=0;g>>2]|=(a[g>>>2]>>>24-8*(g%4)&255)<<24-8*((j+g)%4);else if(65535>>2]=a[g>>>2];else h.push.apply(h,a);this.sigBytes+=b;return this},clamp:function(){var b=this.words,h=this.sigBytes;b[h>>>2]&=4294967295<<\n32-8*(h%4);b.length=s.ceil(h/4)},clone:function(){var b=r.clone.call(this);b.words=this.words.slice(0);return b},random:function(b){for(var h=[],a=0;a>>2]>>>24-8*(j%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join(\"\")},parse:function(b){for(var a=b.length,g=[],j=0;j>>3]|=parseInt(b.substr(j,\n2),16)<<24-4*(j%8);return new q.init(g,a/2)}},a=v.Latin1={stringify:function(b){var a=b.words;b=b.sigBytes;for(var g=[],j=0;j>>2]>>>24-8*(j%4)&255));return g.join(\"\")},parse:function(b){for(var a=b.length,g=[],j=0;j>>2]|=(b.charCodeAt(j)&255)<<24-8*(j%4);return new q.init(g,a)}},u=v.Utf8={stringify:function(b){try{return decodeURIComponent(escape(a.stringify(b)))}catch(g){throw Error(\"Malformed UTF-8 data\");}},parse:function(b){return a.parse(unescape(encodeURIComponent(b)))}},\ng=l.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(b){\"string\"==typeof b&&(b=u.parse(b));this._data.concat(b);this._nDataBytes+=b.sigBytes},_process:function(b){var a=this._data,g=a.words,j=a.sigBytes,k=this.blockSize,m=j/(4*k),m=b?s.ceil(m):s.max((m|0)-this._minBufferSize,0);b=m*k;j=s.min(4*b,j);if(b){for(var l=0;l>>32-j)+k}function m(a,k,b,h,l,j,m){a=a+(k&h|b&~h)+l+m;return(a<>>32-j)+k}function l(a,k,b,h,l,j,m){a=a+(k^b^h)+l+m;return(a<>>32-j)+k}function n(a,k,b,h,l,j,m){a=a+(b^(k|~h))+l+m;return(a<>>32-j)+k}for(var r=CryptoJS,q=r.lib,v=q.WordArray,t=q.Hasher,q=r.algo,a=[],u=0;64>u;u++)a[u]=4294967296*s.abs(s.sin(u+1))|0;q=q.MD5=t.extend({_doReset:function(){this._hash=new v.init([1732584193,4023233417,2562383102,271733878])},\n_doProcessBlock:function(g,k){for(var b=0;16>b;b++){var h=k+b,w=g[h];g[h]=(w<<8|w>>>24)&16711935|(w<<24|w>>>8)&4278255360}var b=this._hash.words,h=g[k+0],w=g[k+1],j=g[k+2],q=g[k+3],r=g[k+4],s=g[k+5],t=g[k+6],u=g[k+7],v=g[k+8],x=g[k+9],y=g[k+10],z=g[k+11],A=g[k+12],B=g[k+13],C=g[k+14],D=g[k+15],c=b[0],d=b[1],e=b[2],f=b[3],c=p(c,d,e,f,h,7,a[0]),f=p(f,c,d,e,w,12,a[1]),e=p(e,f,c,d,j,17,a[2]),d=p(d,e,f,c,q,22,a[3]),c=p(c,d,e,f,r,7,a[4]),f=p(f,c,d,e,s,12,a[5]),e=p(e,f,c,d,t,17,a[6]),d=p(d,e,f,c,u,22,a[7]),\nc=p(c,d,e,f,v,7,a[8]),f=p(f,c,d,e,x,12,a[9]),e=p(e,f,c,d,y,17,a[10]),d=p(d,e,f,c,z,22,a[11]),c=p(c,d,e,f,A,7,a[12]),f=p(f,c,d,e,B,12,a[13]),e=p(e,f,c,d,C,17,a[14]),d=p(d,e,f,c,D,22,a[15]),c=m(c,d,e,f,w,5,a[16]),f=m(f,c,d,e,t,9,a[17]),e=m(e,f,c,d,z,14,a[18]),d=m(d,e,f,c,h,20,a[19]),c=m(c,d,e,f,s,5,a[20]),f=m(f,c,d,e,y,9,a[21]),e=m(e,f,c,d,D,14,a[22]),d=m(d,e,f,c,r,20,a[23]),c=m(c,d,e,f,x,5,a[24]),f=m(f,c,d,e,C,9,a[25]),e=m(e,f,c,d,q,14,a[26]),d=m(d,e,f,c,v,20,a[27]),c=m(c,d,e,f,B,5,a[28]),f=m(f,c,\nd,e,j,9,a[29]),e=m(e,f,c,d,u,14,a[30]),d=m(d,e,f,c,A,20,a[31]),c=l(c,d,e,f,s,4,a[32]),f=l(f,c,d,e,v,11,a[33]),e=l(e,f,c,d,z,16,a[34]),d=l(d,e,f,c,C,23,a[35]),c=l(c,d,e,f,w,4,a[36]),f=l(f,c,d,e,r,11,a[37]),e=l(e,f,c,d,u,16,a[38]),d=l(d,e,f,c,y,23,a[39]),c=l(c,d,e,f,B,4,a[40]),f=l(f,c,d,e,h,11,a[41]),e=l(e,f,c,d,q,16,a[42]),d=l(d,e,f,c,t,23,a[43]),c=l(c,d,e,f,x,4,a[44]),f=l(f,c,d,e,A,11,a[45]),e=l(e,f,c,d,D,16,a[46]),d=l(d,e,f,c,j,23,a[47]),c=n(c,d,e,f,h,6,a[48]),f=n(f,c,d,e,u,10,a[49]),e=n(e,f,c,d,\nC,15,a[50]),d=n(d,e,f,c,s,21,a[51]),c=n(c,d,e,f,A,6,a[52]),f=n(f,c,d,e,q,10,a[53]),e=n(e,f,c,d,y,15,a[54]),d=n(d,e,f,c,w,21,a[55]),c=n(c,d,e,f,v,6,a[56]),f=n(f,c,d,e,D,10,a[57]),e=n(e,f,c,d,t,15,a[58]),d=n(d,e,f,c,B,21,a[59]),c=n(c,d,e,f,r,6,a[60]),f=n(f,c,d,e,z,10,a[61]),e=n(e,f,c,d,j,15,a[62]),d=n(d,e,f,c,x,21,a[63]);b[0]=b[0]+c|0;b[1]=b[1]+d|0;b[2]=b[2]+e|0;b[3]=b[3]+f|0},_doFinalize:function(){var a=this._data,k=a.words,b=8*this._nDataBytes,h=8*a.sigBytes;k[h>>>5]|=128<<24-h%32;var l=s.floor(b/\n4294967296);k[(h+64>>>9<<4)+15]=(l<<8|l>>>24)&16711935|(l<<24|l>>>8)&4278255360;k[(h+64>>>9<<4)+14]=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360;a.sigBytes=4*(k.length+1);this._process();a=this._hash;k=a.words;for(b=0;4>b;b++)h=k[b],k[b]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360;return a},clone:function(){var a=t.clone.call(this);a._hash=this._hash.clone();return a}});r.MD5=t._createHelper(q);r.HmacMD5=t._createHmacHelper(q)})(Math);\n"], "crypto_js.rollups.sha1": [".js", "/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS=CryptoJS||function(e,m){var p={},j=p.lib={},l=function(){},f=j.Base={extend:function(a){l.prototype=this;var c=new l;a&&c.mixIn(a);c.hasOwnProperty(\"init\")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty(\"toString\")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},\nn=j.WordArray=f.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=m?c:4*a.length},toString:function(a){return(a||h).stringify(this)},concat:function(a){var c=this.words,q=a.words,d=this.sigBytes;a=a.sigBytes;this.clamp();if(d%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((d+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<\n32-8*(c%4);a.length=e.ceil(c/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(d%4)&255;b.push((f>>>4).toString(16));b.push((f&15).toString(16))}return b.join(\"\")},parse:function(a){for(var c=a.length,b=[],d=0;d>>3]|=parseInt(a.substr(d,\n2),16)<<24-4*(d%8);return new n.init(b,c/2)}},g=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],d=0;d>>2]>>>24-8*(d%4)&255));return b.join(\"\")},parse:function(a){for(var c=a.length,b=[],d=0;d>>2]|=(a.charCodeAt(d)&255)<<24-8*(d%4);return new n.init(b,c)}},r=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(g.stringify(a)))}catch(c){throw Error(\"Malformed UTF-8 data\");}},parse:function(a){return g.parse(unescape(encodeURIComponent(a)))}},\nk=j.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new n.init;this._nDataBytes=0},_append:function(a){\"string\"==typeof a&&(a=r.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,d=c.sigBytes,f=this.blockSize,h=d/(4*f),h=a?e.ceil(h):e.max((h|0)-this._minBufferSize,0);a=h*f;d=e.min(4*a,d);if(a){for(var g=0;ga;a++){if(16>a)l[a]=f[n+a]|0;else{var c=l[a-3]^l[a-8]^l[a-14]^l[a-16];l[a]=c<<1|c>>>31}c=(h<<5|h>>>27)+j+l[a];c=20>a?c+((g&e|~g&k)+1518500249):40>a?c+((g^e^k)+1859775393):60>a?c+((g&e|g&k|e&k)-1894007588):c+((g^e^\nk)-899497514);j=k;k=e;e=g<<30|g>>>2;g=h;h=c}b[0]=b[0]+h|0;b[1]=b[1]+g|0;b[2]=b[2]+e|0;b[3]=b[3]+k|0;b[4]=b[4]+j|0},_doFinalize:function(){var f=this._data,e=f.words,b=8*this._nDataBytes,h=8*f.sigBytes;e[h>>>5]|=128<<24-h%32;e[(h+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(h+64>>>9<<4)+15]=b;f.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=j.clone.call(this);e._hash=this._hash.clone();return e}});e.SHA1=j._createHelper(m);e.HmacSHA1=j._createHmacHelper(m)})();\n"], "crypto_js.rollups.sha224": [".js", "/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS=CryptoJS||function(g,l){var f={},k=f.lib={},h=function(){},m=k.Base={extend:function(a){h.prototype=this;var c=new h;a&&c.mixIn(a);c.hasOwnProperty(\"init\")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty(\"toString\")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},\nq=k.WordArray=m.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||s).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<\n32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join(\"\")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b,\n2),16)<<24-4*(b%8);return new q.init(d,c/2)}},n=t.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join(\"\")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},j=t.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error(\"Malformed UTF-8 data\");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}},\nw=k.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){\"string\"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?g.ceil(f):g.max((f|0)-this._minBufferSize,0);a=f*e;b=g.min(4*a,b);if(a){for(var u=0;un;){var j;a:{j=s;for(var w=g.sqrt(j),v=2;v<=w;v++)if(!(j%v)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=t(g.pow(s,0.5))),q[n]=t(g.pow(s,1/3)),n++);s++}var a=[],f=f.SHA256=h.extend({_doReset:function(){this._hash=new k.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],k=b[3],h=b[4],l=b[5],m=b[6],n=b[7],p=0;64>p;p++){if(16>p)a[p]=\nc[d+p]|0;else{var j=a[p-15],r=a[p-2];a[p]=((j<<25|j>>>7)^(j<<14|j>>>18)^j>>>3)+a[p-7]+((r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10)+a[p-16]}j=n+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&l^~h&m)+q[p]+a[p];r=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);n=m;m=l;l=h;h=k+j|0;k=g;g=f;f=e;e=j+r|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+k|0;b[4]=b[4]+h|0;b[5]=b[5]+l|0;b[6]=b[6]+m|0;b[7]=b[7]+n|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes;\nd[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=g.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=h.clone.call(this);a._hash=this._hash.clone();return a}});l.SHA256=h._createHelper(f);l.HmacSHA256=h._createHmacHelper(f)})(Math);\n(function(){var g=CryptoJS,l=g.lib.WordArray,f=g.algo,k=f.SHA256,f=f.SHA224=k.extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var f=k._doFinalize.call(this);f.sigBytes-=4;return f}});g.SHA224=k._createHelper(f);g.HmacSHA224=k._createHmacHelper(f)})();\n"], "crypto_js.rollups.sha256": [".js", "/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS=CryptoJS||function(h,s){var f={},t=f.lib={},g=function(){},j=t.Base={extend:function(a){g.prototype=this;var c=new g;a&&c.mixIn(a);c.hasOwnProperty(\"init\")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty(\"toString\")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},\nq=t.WordArray=j.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||u).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<\n32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=j.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join(\"\")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b,\n2),16)<<24-4*(b%8);return new q.init(d,c/2)}},k=v.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join(\"\")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new q.init(d,c)}},l=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(k.stringify(a)))}catch(c){throw Error(\"Malformed UTF-8 data\");}},parse:function(a){return k.parse(unescape(encodeURIComponent(a)))}},\nx=t.BufferedBlockAlgorithm=j.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){\"string\"==typeof a&&(a=l.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var m=0;mk;){var l;a:{l=u;for(var x=h.sqrt(l),w=2;w<=x;w++)if(!(l%w)){l=!1;break a}l=!0}l&&(8>k&&(j[k]=v(h.pow(u,0.5))),q[k]=v(h.pow(u,1/3)),k++);u++}var a=[],f=f.SHA256=g.extend({_doReset:function(){this._hash=new t.init(j.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],m=b[2],h=b[3],p=b[4],j=b[5],k=b[6],l=b[7],n=0;64>n;n++){if(16>n)a[n]=\nc[d+n]|0;else{var r=a[n-15],g=a[n-2];a[n]=((r<<25|r>>>7)^(r<<14|r>>>18)^r>>>3)+a[n-7]+((g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10)+a[n-16]}r=l+((p<<26|p>>>6)^(p<<21|p>>>11)^(p<<7|p>>>25))+(p&j^~p&k)+q[n]+a[n];g=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&m^f&m);l=k;k=j;j=p;p=h+r|0;h=m;m=f;f=e;e=r+g|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+m|0;b[3]=b[3]+h|0;b[4]=b[4]+p|0;b[5]=b[5]+j|0;b[6]=b[6]+k|0;b[7]=b[7]+l|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes;\nd[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=g.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=g._createHelper(f);s.HmacSHA256=g._createHmacHelper(f)})(Math);\n"], "crypto_js.rollups.sha3": [".js", "/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS=CryptoJS||function(v,p){var d={},u=d.lib={},r=function(){},f=u.Base={extend:function(a){r.prototype=this;var b=new r;a&&b.mixIn(a);b.hasOwnProperty(\"init\")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty(\"toString\")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},\ns=u.WordArray=f.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=p?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,c=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var n=0;n>>2]|=(c[n>>>2]>>>24-8*(n%4)&255)<<24-8*((j+n)%4);else if(65535>>2]=c[n>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<<\n32-8*(b%4);a.length=v.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],c=0;c>>2]>>>24-8*(j%4)&255;c.push((n>>>4).toString(16));c.push((n&15).toString(16))}return c.join(\"\")},parse:function(a){for(var b=a.length,c=[],j=0;j>>3]|=parseInt(a.substr(j,\n2),16)<<24-4*(j%8);return new s.init(c,b/2)}},e=x.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],j=0;j>>2]>>>24-8*(j%4)&255));return c.join(\"\")},parse:function(a){for(var b=a.length,c=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new s.init(c,b)}},q=x.Utf8={stringify:function(a){try{return decodeURIComponent(escape(e.stringify(a)))}catch(b){throw Error(\"Malformed UTF-8 data\");}},parse:function(a){return e.parse(unescape(encodeURIComponent(a)))}},\nt=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){\"string\"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,j=b.sigBytes,n=this.blockSize,e=j/(4*n),e=a?v.ceil(e):v.max((e|0)-this._minBufferSize,0);a=e*n;j=v.min(4*a,j);if(a){for(var f=0;ft;t++){s[e+5*q]=(t+1)*(t+2)/2%64;var w=(2*e+3*q)%5,e=q%5,q=w}for(e=0;5>e;e++)for(q=0;5>q;q++)x[e+5*q]=q+5*((2*e+3*q)%5);e=1;for(q=0;24>q;q++){for(var a=w=t=0;7>a;a++){if(e&1){var b=(1<b?w^=1<e;e++)c[e]=f.create();d=d.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state=\n[],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var e=this._state,f=this.blockSize/2,h=0;h>>24)&16711935|(l<<24|l>>>8)&4278255360,m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=e[h];g.high^=m;g.low^=l}for(f=0;24>f;f++){for(h=0;5>h;h++){for(var d=l=0,k=0;5>k;k++)g=e[h+5*k],l^=g.high,d^=g.low;g=c[h];g.high=l;g.low=d}for(h=0;5>h;h++){g=c[(h+4)%5];l=c[(h+1)%5];m=l.high;k=l.low;l=g.high^\n(m<<1|k>>>31);d=g.low^(k<<1|m>>>31);for(k=0;5>k;k++)g=e[h+5*k],g.high^=l,g.low^=d}for(m=1;25>m;m++)g=e[m],h=g.high,g=g.low,k=s[m],32>k?(l=h<>>32-k,d=g<>>32-k):(l=g<>>64-k,d=h<>>64-k),g=c[x[m]],g.high=l,g.low=d;g=c[0];h=e[0];g.high=h.high;g.low=h.low;for(h=0;5>h;h++)for(k=0;5>k;k++)m=h+5*k,g=e[m],l=c[m],m=c[(h+1)%5+5*k],d=c[(h+2)%5+5*k],g.high=l.high^~m.high&d.high,g.low=l.low^~m.low&d.low;g=e[0];h=y[f];g.high^=h.high;g.low^=h.low}},_doFinalize:function(){var a=this._data,\nb=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(v.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],h=0;h>>24)&16711935|(f<<24|f>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;e.push(d);e.push(f)}return new u.init(e,b)},clone:function(){for(var a=r.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}});\np.SHA3=r._createHelper(d);p.HmacSHA3=r._createHmacHelper(d)})(Math);\n"], "crypto_js.rollups.sha384": [".js", "/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS=CryptoJS||function(a,c){var d={},j=d.lib={},f=function(){},m=j.Base={extend:function(a){f.prototype=this;var b=new f;a&&b.mixIn(a);b.hasOwnProperty(\"init\")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty(\"toString\")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},\nB=j.WordArray=m.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=c?b:4*a.length},toString:function(a){return(a||y).stringify(this)},concat:function(a){var b=this.words,g=a.words,e=this.sigBytes;a=a.sigBytes;this.clamp();if(e%4)for(var k=0;k>>2]|=(g[k>>>2]>>>24-8*(k%4)&255)<<24-8*((e+k)%4);else if(65535>>2]=g[k>>>2];else b.push.apply(b,g);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<<\n32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],g=0;g>>2]>>>24-8*(e%4)&255;g.push((k>>>4).toString(16));g.push((k&15).toString(16))}return g.join(\"\")},parse:function(a){for(var b=a.length,g=[],e=0;e>>3]|=parseInt(a.substr(e,\n2),16)<<24-4*(e%8);return new B.init(g,b/2)}},F=v.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var g=[],e=0;e>>2]>>>24-8*(e%4)&255));return g.join(\"\")},parse:function(a){for(var b=a.length,g=[],e=0;e>>2]|=(a.charCodeAt(e)&255)<<24-8*(e%4);return new B.init(g,b)}},ha=v.Utf8={stringify:function(a){try{return decodeURIComponent(escape(F.stringify(a)))}catch(b){throw Error(\"Malformed UTF-8 data\");}},parse:function(a){return F.parse(unescape(encodeURIComponent(a)))}},\nZ=j.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new B.init;this._nDataBytes=0},_append:function(a){\"string\"==typeof a&&(a=ha.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,g=b.words,e=b.sigBytes,k=this.blockSize,m=e/(4*k),m=n?a.ceil(m):a.max((m|0)-this._minBufferSize,0);n=m*k;e=a.min(4*n,e);if(n){for(var c=0;cy;y++)v[y]=a();j=j.SHA512=d.extend({_doReset:function(){this._hash=new m.init([new f.init(1779033703,4089235720),new f.init(3144134277,2227873595),new f.init(1013904242,4271175723),new f.init(2773480762,1595750129),new f.init(1359893119,2917565137),new f.init(2600822924,725511199),new f.init(528734635,4215389547),new f.init(1541459225,327033209)])},_doProcessBlock:function(a,c){for(var d=this._hash.words,\nf=d[0],j=d[1],b=d[2],g=d[3],e=d[4],k=d[5],m=d[6],d=d[7],y=f.high,M=f.low,$=j.high,N=j.low,aa=b.high,O=b.low,ba=g.high,P=g.low,ca=e.high,Q=e.low,da=k.high,R=k.low,ea=m.high,S=m.low,fa=d.high,T=d.low,s=y,p=M,G=$,D=N,H=aa,E=O,W=ba,I=P,t=ca,q=Q,U=da,J=R,V=ea,K=S,X=fa,L=T,u=0;80>u;u++){var z=v[u];if(16>u)var r=z.high=a[c+2*u]|0,h=z.low=a[c+2*u+1]|0;else{var r=v[u-15],h=r.high,w=r.low,r=(h>>>1|w<<31)^(h>>>8|w<<24)^h>>>7,w=(w>>>1|h<<31)^(w>>>8|h<<24)^(w>>>7|h<<25),C=v[u-2],h=C.high,l=C.low,C=(h>>>19|l<<\n13)^(h<<3|l>>>29)^h>>>6,l=(l>>>19|h<<13)^(l<<3|h>>>29)^(l>>>6|h<<26),h=v[u-7],Y=h.high,A=v[u-16],x=A.high,A=A.low,h=w+h.low,r=r+Y+(h>>>0>>0?1:0),h=h+l,r=r+C+(h>>>0>>0?1:0),h=h+A,r=r+x+(h>>>0>>0?1:0);z.high=r;z.low=h}var Y=t&U^~t&V,A=q&J^~q&K,z=s&G^s&H^G&H,ja=p&D^p&E^D&E,w=(s>>>28|p<<4)^(s<<30|p>>>2)^(s<<25|p>>>7),C=(p>>>28|s<<4)^(p<<30|s>>>2)^(p<<25|s>>>7),l=B[u],ka=l.high,ga=l.low,l=L+((q>>>14|t<<18)^(q>>>18|t<<14)^(q<<23|t>>>9)),x=X+((t>>>14|q<<18)^(t>>>18|q<<14)^(t<<23|q>>>9))+(l>>>0<\nL>>>0?1:0),l=l+A,x=x+Y+(l>>>0>>0?1:0),l=l+ga,x=x+ka+(l>>>0>>0?1:0),l=l+h,x=x+r+(l>>>0>>0?1:0),h=C+ja,z=w+z+(h>>>0>>0?1:0),X=V,L=K,V=U,K=J,U=t,J=q,q=I+l|0,t=W+x+(q>>>0>>0?1:0)|0,W=H,I=E,H=G,E=D,G=s,D=p,p=l+h|0,s=x+z+(p>>>0>>0?1:0)|0}M=f.low=M+p;f.high=y+s+(M>>>0

    >>0?1:0);N=j.low=N+D;j.high=$+G+(N>>>0>>0?1:0);O=b.low=O+E;b.high=aa+H+(O>>>0>>0?1:0);P=g.low=P+I;g.high=ba+W+(P>>>0>>0?1:0);Q=e.low=Q+q;e.high=ca+t+(Q>>>0>>0?1:0);R=k.low=R+J;k.high=da+U+(R>>>0>>0?1:0);\nS=m.low=S+K;m.high=ea+V+(S>>>0>>0?1:0);T=d.low=T+L;d.high=fa+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,c=a.words,d=8*this._nDataBytes,f=8*a.sigBytes;c[f>>>5]|=128<<24-f%32;c[(f+128>>>10<<5)+30]=Math.floor(d/4294967296);c[(f+128>>>10<<5)+31]=d;a.sigBytes=4*c.length;this._process();return this._hash.toX32()},clone:function(){var a=d.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});c.SHA512=d._createHelper(j);c.HmacSHA512=d._createHmacHelper(j)})();\n(function(){var a=CryptoJS,c=a.x64,d=c.Word,j=c.WordArray,c=a.algo,f=c.SHA512,c=c.SHA384=f.extend({_doReset:function(){this._hash=new j.init([new d.init(3418070365,3238371032),new d.init(1654270250,914150663),new d.init(2438529370,812702999),new d.init(355462360,4144912697),new d.init(1731405415,4290775857),new d.init(2394180231,1750603025),new d.init(3675008525,1694076839),new d.init(1203062813,3204075428)])},_doFinalize:function(){var a=f._doFinalize.call(this);a.sigBytes-=16;return a}});a.SHA384=\nf._createHelper(c);a.HmacSHA384=f._createHmacHelper(c)})();\n"], "crypto_js.rollups.sha512": [".js", "/*\nCryptoJS v3.1.2\ncode.google.com/p/crypto-js\n(c) 2009-2013 by Jeff Mott. All rights reserved.\ncode.google.com/p/crypto-js/wiki/License\n*/\nvar CryptoJS=CryptoJS||function(a,m){var r={},f=r.lib={},g=function(){},l=f.Base={extend:function(a){g.prototype=this;var b=new g;a&&b.mixIn(a);b.hasOwnProperty(\"init\")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty(\"toString\")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},\np=f.WordArray=l.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=m?b:4*a.length},toString:function(a){return(a||q).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var j=0;j>>2]|=(d[j>>>2]>>>24-8*(j%4)&255)<<24-8*((c+j)%4);else if(65535>>2]=d[j>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<<\n32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((j>>>4).toString(16));d.push((j&15).toString(16))}return d.join(\"\")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c,\n2),16)<<24-4*(c%8);return new p.init(d,b/2)}},G=y.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join(\"\")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new p.init(d,b)}},fa=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(G.stringify(a)))}catch(b){throw Error(\"Malformed UTF-8 data\");}},parse:function(a){return G.parse(unescape(encodeURIComponent(a)))}},\nh=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){\"string\"==typeof a&&(a=fa.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,d=b.words,c=b.sigBytes,j=this.blockSize,l=c/(4*j),l=n?a.ceil(l):a.max((l|0)-this._minBufferSize,0);n=l*j;c=a.min(4*n,c);if(n){for(var h=0;hq;q++)y[q]=a();f=f.SHA512=r.extend({_doReset:function(){this._hash=new l.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,f){for(var h=this._hash.words,\ng=h[0],n=h[1],b=h[2],d=h[3],c=h[4],j=h[5],l=h[6],h=h[7],q=g.high,m=g.low,r=n.high,N=n.low,Z=b.high,O=b.low,$=d.high,P=d.low,aa=c.high,Q=c.low,ba=j.high,R=j.low,ca=l.high,S=l.low,da=h.high,T=h.low,v=q,s=m,H=r,E=N,I=Z,F=O,W=$,J=P,w=aa,t=Q,U=ba,K=R,V=ca,L=S,X=da,M=T,x=0;80>x;x++){var B=y[x];if(16>x)var u=B.high=a[f+2*x]|0,e=B.low=a[f+2*x+1]|0;else{var u=y[x-15],e=u.high,z=u.low,u=(e>>>1|z<<31)^(e>>>8|z<<24)^e>>>7,z=(z>>>1|e<<31)^(z>>>8|e<<24)^(z>>>7|e<<25),D=y[x-2],e=D.high,k=D.low,D=(e>>>19|k<<13)^\n(e<<3|k>>>29)^e>>>6,k=(k>>>19|e<<13)^(k<<3|e>>>29)^(k>>>6|e<<26),e=y[x-7],Y=e.high,C=y[x-16],A=C.high,C=C.low,e=z+e.low,u=u+Y+(e>>>0>>0?1:0),e=e+k,u=u+D+(e>>>0>>0?1:0),e=e+C,u=u+A+(e>>>0>>0?1:0);B.high=u;B.low=e}var Y=w&U^~w&V,C=t&K^~t&L,B=v&H^v&I^H&I,ha=s&E^s&F^E&F,z=(v>>>28|s<<4)^(v<<30|s>>>2)^(v<<25|s>>>7),D=(s>>>28|v<<4)^(s<<30|v>>>2)^(s<<25|v>>>7),k=p[x],ia=k.high,ea=k.low,k=M+((t>>>14|w<<18)^(t>>>18|w<<14)^(t<<23|w>>>9)),A=X+((w>>>14|t<<18)^(w>>>18|t<<14)^(w<<23|t>>>9))+(k>>>0>>\n0?1:0),k=k+C,A=A+Y+(k>>>0>>0?1:0),k=k+ea,A=A+ia+(k>>>0>>0?1:0),k=k+e,A=A+u+(k>>>0>>0?1:0),e=D+ha,B=z+B+(e>>>0>>0?1:0),X=V,M=L,V=U,L=K,U=w,K=t,t=J+k|0,w=W+A+(t>>>0>>0?1:0)|0,W=I,J=F,I=H,F=E,H=v,E=s,s=k+e|0,v=A+B+(s>>>0>>0?1:0)|0}m=g.low=m+s;g.high=q+v+(m>>>0>>0?1:0);N=n.low=N+E;n.high=r+H+(N>>>0>>0?1:0);O=b.low=O+F;b.high=Z+I+(O>>>0>>0?1:0);P=d.low=P+J;d.high=$+W+(P>>>0>>0?1:0);Q=c.low=Q+t;c.high=aa+w+(Q>>>0>>0?1:0);R=j.low=R+K;j.high=ba+U+(R>>>0>>0?1:0);S=l.low=\nS+L;l.high=ca+V+(S>>>0>>0?1:0);T=h.low=T+M;h.high=da+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,f=a.words,h=8*this._nDataBytes,g=8*a.sigBytes;f[g>>>5]|=128<<24-g%32;f[(g+128>>>10<<5)+30]=Math.floor(h/4294967296);f[(g+128>>>10<<5)+31]=h;a.sigBytes=4*f.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});m.SHA512=r._createHelper(f);m.HmacSHA512=r._createHmacHelper(f)})();\n"], "abc": [".py", "\n\n\n\"\"\"Abstract Base Classes (ABCs) according to PEP 3119.\"\"\"\n\n\ndef abstractmethod(funcobj):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n funcobj.__isabstractmethod__=True\n return funcobj\n \n \nclass abstractclassmethod(classmethod):\n ''\n\n\n\n\n\n\n\n\n\n \n \n __isabstractmethod__=True\n \n def __init__(self,callable):\n callable.__isabstractmethod__=True\n super().__init__(callable)\n \n \nclass abstractstaticmethod(staticmethod):\n ''\n\n\n\n\n\n\n\n\n\n \n \n __isabstractmethod__=True\n \n def __init__(self,callable):\n callable.__isabstractmethod__=True\n super().__init__(callable)\n \n \nclass abstractproperty(property):\n ''\n\n\n\n\n\n\n\n\n\n \n \n __isabstractmethod__=True\n \n \ntry :\n from _abc import (get_cache_token,_abc_init,_abc_register,\n _abc_instancecheck,_abc_subclasscheck,_get_dump,\n _reset_registry,_reset_caches)\nexcept ImportError:\n from _py_abc import ABCMeta,get_cache_token\n ABCMeta.__module__='abc'\nelse :\n class ABCMeta(type):\n ''\n\n\n\n\n\n\n\n\n\n\n \n def __new__(mcls,name,bases,namespace,/,**kwargs):\n cls=super().__new__(mcls,name,bases,namespace,**kwargs)\n _abc_init(cls)\n return cls\n \n def register(cls,subclass):\n ''\n\n\n \n return _abc_register(cls,subclass)\n \n def __instancecheck__(cls,instance):\n ''\n return _abc_instancecheck(cls,instance)\n \n def __subclasscheck__(cls,subclass):\n ''\n return _abc_subclasscheck(cls,subclass)\n \n def _dump_registry(cls,file=None ):\n ''\n print(f\"Class: {cls.__module__}.{cls.__qualname__}\",file=file)\n print(f\"Inv. counter: {get_cache_token()}\",file=file)\n (_abc_registry,_abc_cache,_abc_negative_cache,\n _abc_negative_cache_version)=_get_dump(cls)\n print(f\"_abc_registry: {_abc_registry !r}\",file=file)\n print(f\"_abc_cache: {_abc_cache !r}\",file=file)\n print(f\"_abc_negative_cache: {_abc_negative_cache !r}\",file=file)\n print(f\"_abc_negative_cache_version: {_abc_negative_cache_version !r}\",\n file=file)\n \n def _abc_registry_clear(cls):\n ''\n _reset_registry(cls)\n \n def _abc_caches_clear(cls):\n ''\n _reset_caches(cls)\n \n \ndef update_abstractmethods(cls):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not hasattr(cls,'__abstractmethods__'):\n \n \n \n return cls\n \n abstracts=set()\n \n \n for scls in cls.__bases__:\n for name in getattr(scls,'__abstractmethods__',()):\n value=getattr(cls,name,None )\n if getattr(value,\"__isabstractmethod__\",False ):\n abstracts.add(name)\n \n for name,value in cls.__dict__.items():\n if getattr(value,\"__isabstractmethod__\",False ):\n abstracts.add(name)\n cls.__abstractmethods__=frozenset(abstracts)\n return cls\n \n \nclass ABC(metaclass=ABCMeta):\n ''\n\n \n __slots__=()\n", ["_abc", "_py_abc"]], "antigravity": [".py", "\nimport webbrowser\nimport hashlib\n\nwebbrowser.open(\"https://xkcd.com/353/\")\n\ndef geohash(latitude,longitude,datedow):\n ''\n\n\n\n\n \n \n h=hashlib.md5(datedow,usedforsecurity=False ).hexdigest()\n p,q=[('%f'%float.fromhex('0.'+x))for x in (h[:16],h[16:32])]\n print('%d%s %d%s'%(latitude,p[1:],longitude,q[1:]))\n", ["hashlib", "webbrowser"]], "argparse": [".py", "\n\n\n\"\"\"Command-line parsing library\n\nThis module is an optparse-inspired command-line parsing library that:\n\n - handles both optional and positional arguments\n - produces highly informative usage messages\n - supports parsers that dispatch to sub-parsers\n\nThe following is a simple usage example that sums integers from the\ncommand-line and writes the result to a file::\n\n parser = argparse.ArgumentParser(\n description='sum the integers at the command line')\n parser.add_argument(\n 'integers', metavar='int', nargs='+', type=int,\n help='an integer to be summed')\n parser.add_argument(\n '--log', default=sys.stdout, type=argparse.FileType('w'),\n help='the file where the sum should be written')\n args = parser.parse_args()\n args.log.write('%s' % sum(args.integers))\n args.log.close()\n\nThe module contains the following public classes:\n\n - ArgumentParser -- The main entry point for command-line parsing. As the\n example above shows, the add_argument() method is used to populate\n the parser with actions for optional and positional arguments. Then\n the parse_args() method is invoked to convert the args at the\n command-line into an object with attributes.\n\n - ArgumentError -- The exception raised by ArgumentParser objects when\n there are errors with the parser's actions. Errors raised while\n parsing the command-line are caught by ArgumentParser and emitted\n as command-line messages.\n\n - FileType -- A factory for defining types of files to be created. As the\n example above shows, instances of FileType are typically passed as\n the type= argument of add_argument() calls.\n\n - Action -- The base class for parser actions. Typically actions are\n selected by passing strings like 'store_true' or 'append_const' to\n the action= argument of add_argument(). However, for greater\n customization of ArgumentParser actions, subclasses of Action may\n be defined and passed as the action= argument.\n\n - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter,\n ArgumentDefaultsHelpFormatter -- Formatter classes which\n may be passed as the formatter_class= argument to the\n ArgumentParser constructor. HelpFormatter is the default,\n RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser\n not to change the formatting for help text, and\n ArgumentDefaultsHelpFormatter adds information about argument defaults\n to the help.\n\nAll other classes in this module are considered implementation details.\n(Also note that HelpFormatter and RawDescriptionHelpFormatter are only\nconsidered public as object names -- the API of the formatter objects is\nstill considered an implementation detail.)\n\"\"\"\n\n__version__='1.1'\n__all__=[\n'ArgumentParser',\n'ArgumentError',\n'ArgumentTypeError',\n'BooleanOptionalAction',\n'FileType',\n'HelpFormatter',\n'ArgumentDefaultsHelpFormatter',\n'RawDescriptionHelpFormatter',\n'RawTextHelpFormatter',\n'MetavarTypeHelpFormatter',\n'Namespace',\n'Action',\n'ONE_OR_MORE',\n'OPTIONAL',\n'PARSER',\n'REMAINDER',\n'SUPPRESS',\n'ZERO_OR_MORE',\n]\n\n\nimport os as _os\nimport re as _re\nimport sys as _sys\n\nimport warnings\n\nfrom gettext import gettext as _,ngettext\n\nSUPPRESS='==SUPPRESS=='\n\nOPTIONAL='?'\nZERO_OR_MORE='*'\nONE_OR_MORE='+'\nPARSER='A...'\nREMAINDER='...'\n_UNRECOGNIZED_ARGS_ATTR='_unrecognized_args'\n\n\n\n\n\nclass _AttributeHolder(object):\n ''\n\n\n\n\n\n \n \n def __repr__(self):\n type_name=type(self).__name__\n arg_strings=[]\n star_args={}\n for arg in self._get_args():\n arg_strings.append(repr(arg))\n for name,value in self._get_kwargs():\n if name.isidentifier():\n arg_strings.append('%s=%r'%(name,value))\n else :\n star_args[name]=value\n if star_args:\n arg_strings.append('**%s'%repr(star_args))\n return '%s(%s)'%(type_name,', '.join(arg_strings))\n \n def _get_kwargs(self):\n return list(self.__dict__.items())\n \n def _get_args(self):\n return []\n \n \ndef _copy_items(items):\n if items is None :\n return []\n \n \n \n if type(items)is list:\n return items[:]\n import copy\n return copy.copy(items)\n \n \n \n \n \n \n \nclass HelpFormatter(object):\n ''\n\n\n\n \n \n def __init__(self,\n prog,\n indent_increment=2,\n max_help_position=24,\n width=None ):\n \n \n if width is None :\n import shutil\n width=shutil.get_terminal_size().columns\n width -=2\n \n self._prog=prog\n self._indent_increment=indent_increment\n self._max_help_position=min(max_help_position,\n max(width -20,indent_increment *2))\n self._width=width\n \n self._current_indent=0\n self._level=0\n self._action_max_length=0\n \n self._root_section=self._Section(self,None )\n self._current_section=self._root_section\n \n self._whitespace_matcher=_re.compile(r'\\s+',_re.ASCII)\n self._long_break_matcher=_re.compile(r'\\n\\n\\n+')\n \n \n \n \n def _indent(self):\n self._current_indent +=self._indent_increment\n self._level +=1\n \n def _dedent(self):\n self._current_indent -=self._indent_increment\n assert self._current_indent >=0,'Indent decreased below 0.'\n self._level -=1\n \n class _Section(object):\n \n def __init__(self,formatter,parent,heading=None ):\n self.formatter=formatter\n self.parent=parent\n self.heading=heading\n self.items=[]\n \n def format_help(self):\n \n if self.parent is not None :\n self.formatter._indent()\n join=self.formatter._join_parts\n item_help=join([func(*args)for func,args in self.items])\n if self.parent is not None :\n self.formatter._dedent()\n \n \n if not item_help:\n return ''\n \n \n if self.heading is not SUPPRESS and self.heading is not None :\n current_indent=self.formatter._current_indent\n heading='%*s%s:\\n'%(current_indent,'',self.heading)\n else :\n heading=''\n \n \n return join(['\\n',heading,item_help,'\\n'])\n \n def _add_item(self,func,args):\n self._current_section.items.append((func,args))\n \n \n \n \n def start_section(self,heading):\n self._indent()\n section=self._Section(self,self._current_section,heading)\n self._add_item(section.format_help,[])\n self._current_section=section\n \n def end_section(self):\n self._current_section=self._current_section.parent\n self._dedent()\n \n def add_text(self,text):\n if text is not SUPPRESS and text is not None :\n self._add_item(self._format_text,[text])\n \n def add_usage(self,usage,actions,groups,prefix=None ):\n if usage is not SUPPRESS:\n args=usage,actions,groups,prefix\n self._add_item(self._format_usage,args)\n \n def add_argument(self,action):\n if action.help is not SUPPRESS:\n \n \n get_invocation=self._format_action_invocation\n invocations=[get_invocation(action)]\n for subaction in self._iter_indented_subactions(action):\n invocations.append(get_invocation(subaction))\n \n \n invocation_length=max(map(len,invocations))\n action_length=invocation_length+self._current_indent\n self._action_max_length=max(self._action_max_length,\n action_length)\n \n \n self._add_item(self._format_action,[action])\n \n def add_arguments(self,actions):\n for action in actions:\n self.add_argument(action)\n \n \n \n \n def format_help(self):\n help=self._root_section.format_help()\n if help:\n help=self._long_break_matcher.sub('\\n\\n',help)\n help=help.strip('\\n')+'\\n'\n return help\n \n def _join_parts(self,part_strings):\n return ''.join([part\n for part in part_strings\n if part and part is not SUPPRESS])\n \n def _format_usage(self,usage,actions,groups,prefix):\n if prefix is None :\n prefix=_('usage: ')\n \n \n if usage is not None :\n usage=usage %dict(prog=self._prog)\n \n \n elif usage is None and not actions:\n usage='%(prog)s'%dict(prog=self._prog)\n \n \n elif usage is None :\n prog='%(prog)s'%dict(prog=self._prog)\n \n \n optionals=[]\n positionals=[]\n for action in actions:\n if action.option_strings:\n optionals.append(action)\n else :\n positionals.append(action)\n \n \n format=self._format_actions_usage\n action_usage=format(optionals+positionals,groups)\n usage=' '.join([s for s in [prog,action_usage]if s])\n \n \n text_width=self._width -self._current_indent\n if len(prefix)+len(usage)>text_width:\n \n \n part_regexp=(\n r'\\(.*?\\)+(?=\\s|$)|'\n r'\\[.*?\\]+(?=\\s|$)|'\n r'\\S+'\n )\n opt_usage=format(optionals,groups)\n pos_usage=format(positionals,groups)\n opt_parts=_re.findall(part_regexp,opt_usage)\n pos_parts=_re.findall(part_regexp,pos_usage)\n assert ' '.join(opt_parts)==opt_usage\n assert ' '.join(pos_parts)==pos_usage\n \n \n def get_lines(parts,indent,prefix=None ):\n lines=[]\n line=[]\n indent_length=len(indent)\n if prefix is not None :\n line_len=len(prefix)-1\n else :\n line_len=indent_length -1\n for part in parts:\n if line_len+1+len(part)>text_width and line:\n lines.append(indent+' '.join(line))\n line=[]\n line_len=indent_length -1\n line.append(part)\n line_len +=len(part)+1\n if line:\n lines.append(indent+' '.join(line))\n if prefix is not None :\n lines[0]=lines[0][indent_length:]\n return lines\n \n \n if len(prefix)+len(prog)<=0.75 *text_width:\n indent=' '*(len(prefix)+len(prog)+1)\n if opt_parts:\n lines=get_lines([prog]+opt_parts,indent,prefix)\n lines.extend(get_lines(pos_parts,indent))\n elif pos_parts:\n lines=get_lines([prog]+pos_parts,indent,prefix)\n else :\n lines=[prog]\n \n \n else :\n indent=' '*len(prefix)\n parts=opt_parts+pos_parts\n lines=get_lines(parts,indent)\n if len(lines)>1:\n lines=[]\n lines.extend(get_lines(opt_parts,indent))\n lines.extend(get_lines(pos_parts,indent))\n lines=[prog]+lines\n \n \n usage='\\n'.join(lines)\n \n \n return '%s%s\\n\\n'%(prefix,usage)\n \n def _format_actions_usage(self,actions,groups):\n \n group_actions=set()\n inserts={}\n for group in groups:\n if not group._group_actions:\n raise ValueError(f'empty group {group}')\n \n try :\n start=actions.index(group._group_actions[0])\n except ValueError:\n continue\n else :\n group_action_count=len(group._group_actions)\n end=start+group_action_count\n if actions[start:end]==group._group_actions:\n \n suppressed_actions_count=0\n for action in group._group_actions:\n group_actions.add(action)\n if action.help is SUPPRESS:\n suppressed_actions_count +=1\n \n exposed_actions_count=group_action_count -suppressed_actions_count\n \n if not group.required:\n if start in inserts:\n inserts[start]+=' ['\n else :\n inserts[start]='['\n if end in inserts:\n inserts[end]+=']'\n else :\n inserts[end]=']'\n elif exposed_actions_count >1:\n if start in inserts:\n inserts[start]+=' ('\n else :\n inserts[start]='('\n if end in inserts:\n inserts[end]+=')'\n else :\n inserts[end]=')'\n for i in range(start+1,end):\n inserts[i]='|'\n \n \n parts=[]\n for i,action in enumerate(actions):\n \n \n \n if action.help is SUPPRESS:\n parts.append(None )\n if inserts.get(i)=='|':\n inserts.pop(i)\n elif inserts.get(i+1)=='|':\n inserts.pop(i+1)\n \n \n elif not action.option_strings:\n default=self._get_default_metavar_for_positional(action)\n part=self._format_args(action,default)\n \n \n if action in group_actions:\n if part[0]=='['and part[-1]==']':\n part=part[1:-1]\n \n \n parts.append(part)\n \n \n else :\n option_string=action.option_strings[0]\n \n \n \n if action.nargs ==0:\n part=action.format_usage()\n \n \n \n else :\n default=self._get_default_metavar_for_optional(action)\n args_string=self._format_args(action,default)\n part='%s %s'%(option_string,args_string)\n \n \n if not action.required and action not in group_actions:\n part='[%s]'%part\n \n \n parts.append(part)\n \n \n for i in sorted(inserts,reverse=True ):\n parts[i:i]=[inserts[i]]\n \n \n text=' '.join([item for item in parts if item is not None ])\n \n \n open=r'[\\[(]'\n close=r'[\\])]'\n text=_re.sub(r'(%s) '%open,r'\\1',text)\n text=_re.sub(r' (%s)'%close,r'\\1',text)\n text=_re.sub(r'%s *%s'%(open,close),r'',text)\n text=text.strip()\n \n \n return text\n \n def _format_text(self,text):\n if '%(prog)'in text:\n text=text %dict(prog=self._prog)\n text_width=max(self._width -self._current_indent,11)\n indent=' '*self._current_indent\n return self._fill_text(text,text_width,indent)+'\\n\\n'\n \n def _format_action(self,action):\n \n help_position=min(self._action_max_length+2,\n self._max_help_position)\n help_width=max(self._width -help_position,11)\n action_width=help_position -self._current_indent -2\n action_header=self._format_action_invocation(action)\n \n \n if not action.help:\n tup=self._current_indent,'',action_header\n action_header='%*s%s\\n'%tup\n \n \n elif len(action_header)<=action_width:\n tup=self._current_indent,'',action_width,action_header\n action_header='%*s%-*s '%tup\n indent_first=0\n \n \n else :\n tup=self._current_indent,'',action_header\n action_header='%*s%s\\n'%tup\n indent_first=help_position\n \n \n parts=[action_header]\n \n \n if action.help and action.help.strip():\n help_text=self._expand_help(action)\n if help_text:\n help_lines=self._split_lines(help_text,help_width)\n parts.append('%*s%s\\n'%(indent_first,'',help_lines[0]))\n for line in help_lines[1:]:\n parts.append('%*s%s\\n'%(help_position,'',line))\n \n \n elif not action_header.endswith('\\n'):\n parts.append('\\n')\n \n \n for subaction in self._iter_indented_subactions(action):\n parts.append(self._format_action(subaction))\n \n \n return self._join_parts(parts)\n \n def _format_action_invocation(self,action):\n if not action.option_strings:\n default=self._get_default_metavar_for_positional(action)\n metavar,=self._metavar_formatter(action,default)(1)\n return metavar\n \n else :\n parts=[]\n \n \n \n if action.nargs ==0:\n parts.extend(action.option_strings)\n \n \n \n else :\n default=self._get_default_metavar_for_optional(action)\n args_string=self._format_args(action,default)\n for option_string in action.option_strings:\n parts.append('%s %s'%(option_string,args_string))\n \n return ', '.join(parts)\n \n def _metavar_formatter(self,action,default_metavar):\n if action.metavar is not None :\n result=action.metavar\n elif action.choices is not None :\n choice_strs=[str(choice)for choice in action.choices]\n result='{%s}'%','.join(choice_strs)\n else :\n result=default_metavar\n \n def format(tuple_size):\n if isinstance(result,tuple):\n return result\n else :\n return (result,)*tuple_size\n return format\n \n def _format_args(self,action,default_metavar):\n get_metavar=self._metavar_formatter(action,default_metavar)\n if action.nargs is None :\n result='%s'%get_metavar(1)\n elif action.nargs ==OPTIONAL:\n result='[%s]'%get_metavar(1)\n elif action.nargs ==ZERO_OR_MORE:\n metavar=get_metavar(1)\n if len(metavar)==2:\n result='[%s [%s ...]]'%metavar\n else :\n result='[%s ...]'%metavar\n elif action.nargs ==ONE_OR_MORE:\n result='%s [%s ...]'%get_metavar(2)\n elif action.nargs ==REMAINDER:\n result='...'\n elif action.nargs ==PARSER:\n result='%s ...'%get_metavar(1)\n elif action.nargs ==SUPPRESS:\n result=''\n else :\n try :\n formats=['%s'for _ in range(action.nargs)]\n except TypeError:\n raise ValueError(\"invalid nargs value\")from None\n result=' '.join(formats)%get_metavar(action.nargs)\n return result\n \n def _expand_help(self,action):\n params=dict(vars(action),prog=self._prog)\n for name in list(params):\n if params[name]is SUPPRESS:\n del params[name]\n for name in list(params):\n if hasattr(params[name],'__name__'):\n params[name]=params[name].__name__\n if params.get('choices')is not None :\n choices_str=', '.join([str(c)for c in params['choices']])\n params['choices']=choices_str\n return self._get_help_string(action)%params\n \n def _iter_indented_subactions(self,action):\n try :\n get_subactions=action._get_subactions\n except AttributeError:\n pass\n else :\n self._indent()\n yield from get_subactions()\n self._dedent()\n \n def _split_lines(self,text,width):\n text=self._whitespace_matcher.sub(' ',text).strip()\n \n \n import textwrap\n return textwrap.wrap(text,width)\n \n def _fill_text(self,text,width,indent):\n text=self._whitespace_matcher.sub(' ',text).strip()\n import textwrap\n return textwrap.fill(text,width,\n initial_indent=indent,\n subsequent_indent=indent)\n \n def _get_help_string(self,action):\n return action.help\n \n def _get_default_metavar_for_optional(self,action):\n return action.dest.upper()\n \n def _get_default_metavar_for_positional(self,action):\n return action.dest\n \n \nclass RawDescriptionHelpFormatter(HelpFormatter):\n ''\n\n\n\n \n \n def _fill_text(self,text,width,indent):\n return ''.join(indent+line for line in text.splitlines(keepends=True ))\n \n \nclass RawTextHelpFormatter(RawDescriptionHelpFormatter):\n ''\n\n\n\n \n \n def _split_lines(self,text,width):\n return text.splitlines()\n \n \nclass ArgumentDefaultsHelpFormatter(HelpFormatter):\n ''\n\n\n\n \n \n def _get_help_string(self,action):\n ''\n\n\n\n\n\n\n \n help=action.help\n if help is None :\n help=''\n \n if '%(default)'not in help:\n if action.default is not SUPPRESS:\n defaulting_nargs=[OPTIONAL,ZERO_OR_MORE]\n if action.option_strings or action.nargs in defaulting_nargs:\n help +=' (default: %(default)s)'\n return help\n \n \n \nclass MetavarTypeHelpFormatter(HelpFormatter):\n ''\n\n\n\n\n \n \n def _get_default_metavar_for_optional(self,action):\n return action.type.__name__\n \n def _get_default_metavar_for_positional(self,action):\n return action.type.__name__\n \n \n \n \n \n \ndef _get_action_name(argument):\n if argument is None :\n return None\n elif argument.option_strings:\n return '/'.join(argument.option_strings)\n elif argument.metavar not in (None ,SUPPRESS):\n return argument.metavar\n elif argument.dest not in (None ,SUPPRESS):\n return argument.dest\n elif argument.choices:\n return '{'+','.join(argument.choices)+'}'\n else :\n return None\n \n \nclass ArgumentError(Exception):\n ''\n\n\n\n \n \n def __init__(self,argument,message):\n self.argument_name=_get_action_name(argument)\n self.message=message\n \n def __str__(self):\n if self.argument_name is None :\n format='%(message)s'\n else :\n format=_('argument %(argument_name)s: %(message)s')\n return format %dict(message=self.message,\n argument_name=self.argument_name)\n \n \nclass ArgumentTypeError(Exception):\n ''\n pass\n \n \n \n \n \n \nclass Action(_AttributeHolder):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,\n option_strings,\n dest,\n nargs=None ,\n const=None ,\n default=None ,\n type=None ,\n choices=None ,\n required=False ,\n help=None ,\n metavar=None ):\n self.option_strings=option_strings\n self.dest=dest\n self.nargs=nargs\n self.const=const\n self.default=default\n self.type=type\n self.choices=choices\n self.required=required\n self.help=help\n self.metavar=metavar\n \n def _get_kwargs(self):\n names=[\n 'option_strings',\n 'dest',\n 'nargs',\n 'const',\n 'default',\n 'type',\n 'choices',\n 'required',\n 'help',\n 'metavar',\n ]\n return [(name,getattr(self,name))for name in names]\n \n def format_usage(self):\n return self.option_strings[0]\n \n def __call__(self,parser,namespace,values,option_string=None ):\n raise NotImplementedError(_('.__call__() not defined'))\n \n \n \n_deprecated_default=object()\n\nclass BooleanOptionalAction(Action):\n def __init__(self,\n option_strings,\n dest,\n default=None ,\n type=_deprecated_default,\n choices=_deprecated_default,\n required=False ,\n help=None ,\n metavar=_deprecated_default):\n \n _option_strings=[]\n for option_string in option_strings:\n _option_strings.append(option_string)\n \n if option_string.startswith('--'):\n option_string='--no-'+option_string[2:]\n _option_strings.append(option_string)\n \n \n \n \n for field_name in ('type','choices','metavar'):\n if locals()[field_name]is not _deprecated_default:\n warnings._deprecated(\n field_name,\n \"{name!r} is deprecated as of Python 3.12 and will be \"\n \"removed in Python {remove}.\",\n remove=(3,14))\n \n if type is _deprecated_default:\n type=None\n if choices is _deprecated_default:\n choices=None\n if metavar is _deprecated_default:\n metavar=None\n \n super().__init__(\n option_strings=_option_strings,\n dest=dest,\n nargs=0,\n default=default,\n type=type,\n choices=choices,\n required=required,\n help=help,\n metavar=metavar)\n \n \n def __call__(self,parser,namespace,values,option_string=None ):\n if option_string in self.option_strings:\n setattr(namespace,self.dest,not option_string.startswith('--no-'))\n \n def format_usage(self):\n return ' | '.join(self.option_strings)\n \n \nclass _StoreAction(Action):\n\n def __init__(self,\n option_strings,\n dest,\n nargs=None ,\n const=None ,\n default=None ,\n type=None ,\n choices=None ,\n required=False ,\n help=None ,\n metavar=None ):\n if nargs ==0:\n raise ValueError('nargs for store actions must be != 0; if you '\n 'have nothing to store, actions such as store '\n 'true or store const may be more appropriate')\n if const is not None and nargs !=OPTIONAL:\n raise ValueError('nargs must be %r to supply const'%OPTIONAL)\n super(_StoreAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n nargs=nargs,\n const=const,\n default=default,\n type=type,\n choices=choices,\n required=required,\n help=help,\n metavar=metavar)\n \n def __call__(self,parser,namespace,values,option_string=None ):\n setattr(namespace,self.dest,values)\n \n \nclass _StoreConstAction(Action):\n\n def __init__(self,\n option_strings,\n dest,\n const=None ,\n default=None ,\n required=False ,\n help=None ,\n metavar=None ):\n super(_StoreConstAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n nargs=0,\n const=const,\n default=default,\n required=required,\n help=help)\n \n def __call__(self,parser,namespace,values,option_string=None ):\n setattr(namespace,self.dest,self.const)\n \n \nclass _StoreTrueAction(_StoreConstAction):\n\n def __init__(self,\n option_strings,\n dest,\n default=False ,\n required=False ,\n help=None ):\n super(_StoreTrueAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n const=True ,\n default=default,\n required=required,\n help=help)\n \n \nclass _StoreFalseAction(_StoreConstAction):\n\n def __init__(self,\n option_strings,\n dest,\n default=True ,\n required=False ,\n help=None ):\n super(_StoreFalseAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n const=False ,\n default=default,\n required=required,\n help=help)\n \n \nclass _AppendAction(Action):\n\n def __init__(self,\n option_strings,\n dest,\n nargs=None ,\n const=None ,\n default=None ,\n type=None ,\n choices=None ,\n required=False ,\n help=None ,\n metavar=None ):\n if nargs ==0:\n raise ValueError('nargs for append actions must be != 0; if arg '\n 'strings are not supplying the value to append, '\n 'the append const action may be more appropriate')\n if const is not None and nargs !=OPTIONAL:\n raise ValueError('nargs must be %r to supply const'%OPTIONAL)\n super(_AppendAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n nargs=nargs,\n const=const,\n default=default,\n type=type,\n choices=choices,\n required=required,\n help=help,\n metavar=metavar)\n \n def __call__(self,parser,namespace,values,option_string=None ):\n items=getattr(namespace,self.dest,None )\n items=_copy_items(items)\n items.append(values)\n setattr(namespace,self.dest,items)\n \n \nclass _AppendConstAction(Action):\n\n def __init__(self,\n option_strings,\n dest,\n const=None ,\n default=None ,\n required=False ,\n help=None ,\n metavar=None ):\n super(_AppendConstAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n nargs=0,\n const=const,\n default=default,\n required=required,\n help=help,\n metavar=metavar)\n \n def __call__(self,parser,namespace,values,option_string=None ):\n items=getattr(namespace,self.dest,None )\n items=_copy_items(items)\n items.append(self.const)\n setattr(namespace,self.dest,items)\n \n \nclass _CountAction(Action):\n\n def __init__(self,\n option_strings,\n dest,\n default=None ,\n required=False ,\n help=None ):\n super(_CountAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n nargs=0,\n default=default,\n required=required,\n help=help)\n \n def __call__(self,parser,namespace,values,option_string=None ):\n count=getattr(namespace,self.dest,None )\n if count is None :\n count=0\n setattr(namespace,self.dest,count+1)\n \n \nclass _HelpAction(Action):\n\n def __init__(self,\n option_strings,\n dest=SUPPRESS,\n default=SUPPRESS,\n help=None ):\n super(_HelpAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n default=default,\n nargs=0,\n help=help)\n \n def __call__(self,parser,namespace,values,option_string=None ):\n parser.print_help()\n parser.exit()\n \n \nclass _VersionAction(Action):\n\n def __init__(self,\n option_strings,\n version=None ,\n dest=SUPPRESS,\n default=SUPPRESS,\n help=\"show program's version number and exit\"):\n super(_VersionAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n default=default,\n nargs=0,\n help=help)\n self.version=version\n \n def __call__(self,parser,namespace,values,option_string=None ):\n version=self.version\n if version is None :\n version=parser.version\n formatter=parser._get_formatter()\n formatter.add_text(version)\n parser._print_message(formatter.format_help(),_sys.stdout)\n parser.exit()\n \n \nclass _SubParsersAction(Action):\n\n class _ChoicesPseudoAction(Action):\n \n def __init__(self,name,aliases,help):\n metavar=dest=name\n if aliases:\n metavar +=' (%s)'%', '.join(aliases)\n sup=super(_SubParsersAction._ChoicesPseudoAction,self)\n sup.__init__(option_strings=[],dest=dest,help=help,\n metavar=metavar)\n \n def __init__(self,\n option_strings,\n prog,\n parser_class,\n dest=SUPPRESS,\n required=False ,\n help=None ,\n metavar=None ):\n \n self._prog_prefix=prog\n self._parser_class=parser_class\n self._name_parser_map={}\n self._choices_actions=[]\n \n super(_SubParsersAction,self).__init__(\n option_strings=option_strings,\n dest=dest,\n nargs=PARSER,\n choices=self._name_parser_map,\n required=required,\n help=help,\n metavar=metavar)\n \n def add_parser(self,name,**kwargs):\n \n if kwargs.get('prog')is None :\n kwargs['prog']='%s %s'%(self._prog_prefix,name)\n \n aliases=kwargs.pop('aliases',())\n \n if name in self._name_parser_map:\n raise ArgumentError(self,_('conflicting subparser: %s')%name)\n for alias in aliases:\n if alias in self._name_parser_map:\n raise ArgumentError(\n self,_('conflicting subparser alias: %s')%alias)\n \n \n if 'help'in kwargs:\n help=kwargs.pop('help')\n choice_action=self._ChoicesPseudoAction(name,aliases,help)\n self._choices_actions.append(choice_action)\n \n \n parser=self._parser_class(**kwargs)\n self._name_parser_map[name]=parser\n \n \n for alias in aliases:\n self._name_parser_map[alias]=parser\n \n return parser\n \n def _get_subactions(self):\n return self._choices_actions\n \n def __call__(self,parser,namespace,values,option_string=None ):\n parser_name=values[0]\n arg_strings=values[1:]\n \n \n if self.dest is not SUPPRESS:\n setattr(namespace,self.dest,parser_name)\n \n \n try :\n parser=self._name_parser_map[parser_name]\n except KeyError:\n args={'parser_name':parser_name,\n 'choices':', '.join(self._name_parser_map)}\n msg=_('unknown parser %(parser_name)r (choices: %(choices)s)')%args\n raise ArgumentError(self,msg)\n \n \n \n \n \n \n \n \n subnamespace,arg_strings=parser.parse_known_args(arg_strings,None )\n for key,value in vars(subnamespace).items():\n setattr(namespace,key,value)\n \n if arg_strings:\n vars(namespace).setdefault(_UNRECOGNIZED_ARGS_ATTR,[])\n getattr(namespace,_UNRECOGNIZED_ARGS_ATTR).extend(arg_strings)\n \nclass _ExtendAction(_AppendAction):\n def __call__(self,parser,namespace,values,option_string=None ):\n items=getattr(namespace,self.dest,None )\n items=_copy_items(items)\n items.extend(values)\n setattr(namespace,self.dest,items)\n \n \n \n \n \nclass FileType(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,mode='r',bufsize=-1,encoding=None ,errors=None ):\n self._mode=mode\n self._bufsize=bufsize\n self._encoding=encoding\n self._errors=errors\n \n def __call__(self,string):\n \n if string =='-':\n if 'r'in self._mode:\n return _sys.stdin.buffer if 'b'in self._mode else _sys.stdin\n elif any(c in self._mode for c in 'wax'):\n return _sys.stdout.buffer if 'b'in self._mode else _sys.stdout\n else :\n msg=_('argument \"-\" with mode %r')%self._mode\n raise ValueError(msg)\n \n \n try :\n return open(string,self._mode,self._bufsize,self._encoding,\n self._errors)\n except OSError as e:\n args={'filename':string,'error':e}\n message=_(\"can't open '%(filename)s': %(error)s\")\n raise ArgumentTypeError(message %args)\n \n def __repr__(self):\n args=self._mode,self._bufsize\n kwargs=[('encoding',self._encoding),('errors',self._errors)]\n args_str=', '.join([repr(arg)for arg in args if arg !=-1]+\n ['%s=%r'%(kw,arg)for kw,arg in kwargs\n if arg is not None ])\n return '%s(%s)'%(type(self).__name__,args_str)\n \n \n \n \n \nclass Namespace(_AttributeHolder):\n ''\n\n\n\n \n \n def __init__(self,**kwargs):\n for name in kwargs:\n setattr(self,name,kwargs[name])\n \n def __eq__(self,other):\n if not isinstance(other,Namespace):\n return NotImplemented\n return vars(self)==vars(other)\n \n def __contains__(self,key):\n return key in self.__dict__\n \n \nclass _ActionsContainer(object):\n\n def __init__(self,\n description,\n prefix_chars,\n argument_default,\n conflict_handler):\n super(_ActionsContainer,self).__init__()\n \n self.description=description\n self.argument_default=argument_default\n self.prefix_chars=prefix_chars\n self.conflict_handler=conflict_handler\n \n \n self._registries={}\n \n \n self.register('action',None ,_StoreAction)\n self.register('action','store',_StoreAction)\n self.register('action','store_const',_StoreConstAction)\n self.register('action','store_true',_StoreTrueAction)\n self.register('action','store_false',_StoreFalseAction)\n self.register('action','append',_AppendAction)\n self.register('action','append_const',_AppendConstAction)\n self.register('action','count',_CountAction)\n self.register('action','help',_HelpAction)\n self.register('action','version',_VersionAction)\n self.register('action','parsers',_SubParsersAction)\n self.register('action','extend',_ExtendAction)\n \n \n self._get_handler()\n \n \n self._actions=[]\n self._option_string_actions={}\n \n \n self._action_groups=[]\n self._mutually_exclusive_groups=[]\n \n \n self._defaults={}\n \n \n self._negative_number_matcher=_re.compile(r'^-\\d+$|^-\\d*\\.\\d+$')\n \n \n \n self._has_negative_number_optionals=[]\n \n \n \n \n def register(self,registry_name,value,object):\n registry=self._registries.setdefault(registry_name,{})\n registry[value]=object\n \n def _registry_get(self,registry_name,value,default=None ):\n return self._registries[registry_name].get(value,default)\n \n \n \n \n def set_defaults(self,**kwargs):\n self._defaults.update(kwargs)\n \n \n \n for action in self._actions:\n if action.dest in kwargs:\n action.default=kwargs[action.dest]\n \n def get_default(self,dest):\n for action in self._actions:\n if action.dest ==dest and action.default is not None :\n return action.default\n return self._defaults.get(dest,None )\n \n \n \n \n \n def add_argument(self,*args,**kwargs):\n ''\n\n\n \n \n \n \n \n chars=self.prefix_chars\n if not args or len(args)==1 and args[0][0]not in chars:\n if args and 'dest'in kwargs:\n raise ValueError('dest supplied twice for positional argument')\n kwargs=self._get_positional_kwargs(*args,**kwargs)\n \n \n else :\n kwargs=self._get_optional_kwargs(*args,**kwargs)\n \n \n if 'default'not in kwargs:\n dest=kwargs['dest']\n if dest in self._defaults:\n kwargs['default']=self._defaults[dest]\n elif self.argument_default is not None :\n kwargs['default']=self.argument_default\n \n \n action_class=self._pop_action_class(kwargs)\n if not callable(action_class):\n raise ValueError('unknown action \"%s\"'%(action_class,))\n action=action_class(**kwargs)\n \n \n type_func=self._registry_get('type',action.type,action.type)\n if not callable(type_func):\n raise ValueError('%r is not callable'%(type_func,))\n \n if type_func is FileType:\n raise ValueError('%r is a FileType class object, instance of it'\n ' must be passed'%(type_func,))\n \n \n if hasattr(self,\"_get_formatter\"):\n try :\n self._get_formatter()._format_args(action,None )\n except TypeError:\n raise ValueError(\"length of metavar tuple does not match nargs\")\n \n return self._add_action(action)\n \n def add_argument_group(self,*args,**kwargs):\n group=_ArgumentGroup(self,*args,**kwargs)\n self._action_groups.append(group)\n return group\n \n def add_mutually_exclusive_group(self,**kwargs):\n group=_MutuallyExclusiveGroup(self,**kwargs)\n self._mutually_exclusive_groups.append(group)\n return group\n \n def _add_action(self,action):\n \n self._check_conflict(action)\n \n \n self._actions.append(action)\n action.container=self\n \n \n for option_string in action.option_strings:\n self._option_string_actions[option_string]=action\n \n \n for option_string in action.option_strings:\n if self._negative_number_matcher.match(option_string):\n if not self._has_negative_number_optionals:\n self._has_negative_number_optionals.append(True )\n \n \n return action\n \n def _remove_action(self,action):\n self._actions.remove(action)\n \n def _add_container_actions(self,container):\n \n title_group_map={}\n for group in self._action_groups:\n if group.title in title_group_map:\n msg=_('cannot merge actions - two groups are named %r')\n raise ValueError(msg %(group.title))\n title_group_map[group.title]=group\n \n \n group_map={}\n for group in container._action_groups:\n \n \n \n if group.title not in title_group_map:\n title_group_map[group.title]=self.add_argument_group(\n title=group.title,\n description=group.description,\n conflict_handler=group.conflict_handler)\n \n \n for action in group._group_actions:\n group_map[action]=title_group_map[group.title]\n \n \n \n \n for group in container._mutually_exclusive_groups:\n mutex_group=self.add_mutually_exclusive_group(\n required=group.required)\n \n \n for action in group._group_actions:\n group_map[action]=mutex_group\n \n \n for action in container._actions:\n group_map.get(action,self)._add_action(action)\n \n def _get_positional_kwargs(self,dest,**kwargs):\n \n if 'required'in kwargs:\n msg=_(\"'required' is an invalid argument for positionals\")\n raise TypeError(msg)\n \n \n \n if kwargs.get('nargs')not in [OPTIONAL,ZERO_OR_MORE]:\n kwargs['required']=True\n if kwargs.get('nargs')==ZERO_OR_MORE and 'default'not in kwargs:\n kwargs['required']=True\n \n \n return dict(kwargs,dest=dest,option_strings=[])\n \n def _get_optional_kwargs(self,*args,**kwargs):\n \n option_strings=[]\n long_option_strings=[]\n for option_string in args:\n \n if not option_string[0]in self.prefix_chars:\n args={'option':option_string,\n 'prefix_chars':self.prefix_chars}\n msg=_('invalid option string %(option)r: '\n 'must start with a character %(prefix_chars)r')\n raise ValueError(msg %args)\n \n \n option_strings.append(option_string)\n if len(option_string)>1 and option_string[1]in self.prefix_chars:\n long_option_strings.append(option_string)\n \n \n dest=kwargs.pop('dest',None )\n if dest is None :\n if long_option_strings:\n dest_option_string=long_option_strings[0]\n else :\n dest_option_string=option_strings[0]\n dest=dest_option_string.lstrip(self.prefix_chars)\n if not dest:\n msg=_('dest= is required for options like %r')\n raise ValueError(msg %option_string)\n dest=dest.replace('-','_')\n \n \n return dict(kwargs,dest=dest,option_strings=option_strings)\n \n def _pop_action_class(self,kwargs,default=None ):\n action=kwargs.pop('action',default)\n return self._registry_get('action',action,action)\n \n def _get_handler(self):\n \n handler_func_name='_handle_conflict_%s'%self.conflict_handler\n try :\n return getattr(self,handler_func_name)\n except AttributeError:\n msg=_('invalid conflict_resolution value: %r')\n raise ValueError(msg %self.conflict_handler)\n \n def _check_conflict(self,action):\n \n \n confl_optionals=[]\n for option_string in action.option_strings:\n if option_string in self._option_string_actions:\n confl_optional=self._option_string_actions[option_string]\n confl_optionals.append((option_string,confl_optional))\n \n \n if confl_optionals:\n conflict_handler=self._get_handler()\n conflict_handler(action,confl_optionals)\n \n def _handle_conflict_error(self,action,conflicting_actions):\n message=ngettext('conflicting option string: %s',\n 'conflicting option strings: %s',\n len(conflicting_actions))\n conflict_string=', '.join([option_string\n for option_string,action\n in conflicting_actions])\n raise ArgumentError(action,message %conflict_string)\n \n def _handle_conflict_resolve(self,action,conflicting_actions):\n \n \n for option_string,action in conflicting_actions:\n \n \n action.option_strings.remove(option_string)\n self._option_string_actions.pop(option_string,None )\n \n \n \n if not action.option_strings:\n action.container._remove_action(action)\n \n \nclass _ArgumentGroup(_ActionsContainer):\n\n def __init__(self,container,title=None ,description=None ,**kwargs):\n \n update=kwargs.setdefault\n update('conflict_handler',container.conflict_handler)\n update('prefix_chars',container.prefix_chars)\n update('argument_default',container.argument_default)\n super_init=super(_ArgumentGroup,self).__init__\n super_init(description=description,**kwargs)\n \n \n self.title=title\n self._group_actions=[]\n \n \n self._registries=container._registries\n self._actions=container._actions\n self._option_string_actions=container._option_string_actions\n self._defaults=container._defaults\n self._has_negative_number_optionals=\\\n container._has_negative_number_optionals\n self._mutually_exclusive_groups=container._mutually_exclusive_groups\n \n def _add_action(self,action):\n action=super(_ArgumentGroup,self)._add_action(action)\n self._group_actions.append(action)\n return action\n \n def _remove_action(self,action):\n super(_ArgumentGroup,self)._remove_action(action)\n self._group_actions.remove(action)\n \n def add_argument_group(self,*args,**kwargs):\n warnings.warn(\n \"Nesting argument groups is deprecated.\",\n category=DeprecationWarning,\n stacklevel=2\n )\n return super().add_argument_group(*args,**kwargs)\n \n \nclass _MutuallyExclusiveGroup(_ArgumentGroup):\n\n def __init__(self,container,required=False ):\n super(_MutuallyExclusiveGroup,self).__init__(container)\n self.required=required\n self._container=container\n \n def _add_action(self,action):\n if action.required:\n msg=_('mutually exclusive arguments must be optional')\n raise ValueError(msg)\n action=self._container._add_action(action)\n self._group_actions.append(action)\n return action\n \n def _remove_action(self,action):\n self._container._remove_action(action)\n self._group_actions.remove(action)\n \n def add_mutually_exclusive_group(self,*args,**kwargs):\n warnings.warn(\n \"Nesting mutually exclusive groups is deprecated.\",\n category=DeprecationWarning,\n stacklevel=2\n )\n return super().add_mutually_exclusive_group(*args,**kwargs)\n \n \nclass ArgumentParser(_AttributeHolder,_ActionsContainer):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,\n prog=None ,\n usage=None ,\n description=None ,\n epilog=None ,\n parents=[],\n formatter_class=HelpFormatter,\n prefix_chars='-',\n fromfile_prefix_chars=None ,\n argument_default=None ,\n conflict_handler='error',\n add_help=True ,\n allow_abbrev=True ,\n exit_on_error=True ):\n \n superinit=super(ArgumentParser,self).__init__\n superinit(description=description,\n prefix_chars=prefix_chars,\n argument_default=argument_default,\n conflict_handler=conflict_handler)\n \n \n if prog is None :\n prog=_os.path.basename(_sys.argv[0])\n \n self.prog=prog\n self.usage=usage\n self.epilog=epilog\n self.formatter_class=formatter_class\n self.fromfile_prefix_chars=fromfile_prefix_chars\n self.add_help=add_help\n self.allow_abbrev=allow_abbrev\n self.exit_on_error=exit_on_error\n \n add_group=self.add_argument_group\n self._positionals=add_group(_('positional arguments'))\n self._optionals=add_group(_('options'))\n self._subparsers=None\n \n \n def identity(string):\n return string\n self.register('type',None ,identity)\n \n \n \n default_prefix='-'if '-'in prefix_chars else prefix_chars[0]\n if self.add_help:\n self.add_argument(\n default_prefix+'h',default_prefix *2+'help',\n action='help',default=SUPPRESS,\n help=_('show this help message and exit'))\n \n \n for parent in parents:\n self._add_container_actions(parent)\n try :\n defaults=parent._defaults\n except AttributeError:\n pass\n else :\n self._defaults.update(defaults)\n \n \n \n \n def _get_kwargs(self):\n names=[\n 'prog',\n 'usage',\n 'description',\n 'formatter_class',\n 'conflict_handler',\n 'add_help',\n ]\n return [(name,getattr(self,name))for name in names]\n \n \n \n \n def add_subparsers(self,**kwargs):\n if self._subparsers is not None :\n self.error(_('cannot have multiple subparser arguments'))\n \n \n kwargs.setdefault('parser_class',type(self))\n \n if 'title'in kwargs or 'description'in kwargs:\n title=_(kwargs.pop('title','subcommands'))\n description=_(kwargs.pop('description',None ))\n self._subparsers=self.add_argument_group(title,description)\n else :\n self._subparsers=self._positionals\n \n \n \n if kwargs.get('prog')is None :\n formatter=self._get_formatter()\n positionals=self._get_positional_actions()\n groups=self._mutually_exclusive_groups\n formatter.add_usage(self.usage,positionals,groups,'')\n kwargs['prog']=formatter.format_help().strip()\n \n \n parsers_class=self._pop_action_class(kwargs,'parsers')\n action=parsers_class(option_strings=[],**kwargs)\n self._subparsers._add_action(action)\n \n \n return action\n \n def _add_action(self,action):\n if action.option_strings:\n self._optionals._add_action(action)\n else :\n self._positionals._add_action(action)\n return action\n \n def _get_optional_actions(self):\n return [action\n for action in self._actions\n if action.option_strings]\n \n def _get_positional_actions(self):\n return [action\n for action in self._actions\n if not action.option_strings]\n \n \n \n \n def parse_args(self,args=None ,namespace=None ):\n args,argv=self.parse_known_args(args,namespace)\n if argv:\n msg=_('unrecognized arguments: %s')\n self.error(msg %' '.join(argv))\n return args\n \n def parse_known_args(self,args=None ,namespace=None ):\n if args is None :\n \n args=_sys.argv[1:]\n else :\n \n args=list(args)\n \n \n if namespace is None :\n namespace=Namespace()\n \n \n for action in self._actions:\n if action.dest is not SUPPRESS:\n if not hasattr(namespace,action.dest):\n if action.default is not SUPPRESS:\n setattr(namespace,action.dest,action.default)\n \n \n for dest in self._defaults:\n if not hasattr(namespace,dest):\n setattr(namespace,dest,self._defaults[dest])\n \n \n if self.exit_on_error:\n try :\n namespace,args=self._parse_known_args(args,namespace)\n except ArgumentError as err:\n self.error(str(err))\n else :\n namespace,args=self._parse_known_args(args,namespace)\n \n if hasattr(namespace,_UNRECOGNIZED_ARGS_ATTR):\n args.extend(getattr(namespace,_UNRECOGNIZED_ARGS_ATTR))\n delattr(namespace,_UNRECOGNIZED_ARGS_ATTR)\n return namespace,args\n \n def _parse_known_args(self,arg_strings,namespace):\n \n if self.fromfile_prefix_chars is not None :\n arg_strings=self._read_args_from_files(arg_strings)\n \n \n \n action_conflicts={}\n for mutex_group in self._mutually_exclusive_groups:\n group_actions=mutex_group._group_actions\n for i,mutex_action in enumerate(mutex_group._group_actions):\n conflicts=action_conflicts.setdefault(mutex_action,[])\n conflicts.extend(group_actions[:i])\n conflicts.extend(group_actions[i+1:])\n \n \n \n \n option_string_indices={}\n arg_string_pattern_parts=[]\n arg_strings_iter=iter(arg_strings)\n for i,arg_string in enumerate(arg_strings_iter):\n \n \n if arg_string =='--':\n arg_string_pattern_parts.append('-')\n for arg_string in arg_strings_iter:\n arg_string_pattern_parts.append('A')\n \n \n \n else :\n option_tuple=self._parse_optional(arg_string)\n if option_tuple is None :\n pattern='A'\n else :\n option_string_indices[i]=option_tuple\n pattern='O'\n arg_string_pattern_parts.append(pattern)\n \n \n arg_strings_pattern=''.join(arg_string_pattern_parts)\n \n \n seen_actions=set()\n seen_non_default_actions=set()\n \n def take_action(action,argument_strings,option_string=None ):\n seen_actions.add(action)\n argument_values=self._get_values(action,argument_strings)\n \n \n \n \n if argument_values is not action.default:\n seen_non_default_actions.add(action)\n for conflict_action in action_conflicts.get(action,[]):\n if conflict_action in seen_non_default_actions:\n msg=_('not allowed with argument %s')\n action_name=_get_action_name(conflict_action)\n raise ArgumentError(action,msg %action_name)\n \n \n \n if argument_values is not SUPPRESS:\n action(self,namespace,argument_values,option_string)\n \n \n def consume_optional(start_index):\n \n \n option_tuple=option_string_indices[start_index]\n action,option_string,explicit_arg=option_tuple\n \n \n \n match_argument=self._match_argument\n action_tuples=[]\n while True :\n \n \n if action is None :\n extras.append(arg_strings[start_index])\n return start_index+1\n \n \n \n if explicit_arg is not None :\n arg_count=match_argument(action,'A')\n \n \n \n \n chars=self.prefix_chars\n if (\n arg_count ==0\n and option_string[1]not in chars\n and explicit_arg !=''\n ):\n action_tuples.append((action,[],option_string))\n char=option_string[0]\n option_string=char+explicit_arg[0]\n new_explicit_arg=explicit_arg[1:]or None\n optionals_map=self._option_string_actions\n if option_string in optionals_map:\n action=optionals_map[option_string]\n explicit_arg=new_explicit_arg\n else :\n msg=_('ignored explicit argument %r')\n raise ArgumentError(action,msg %explicit_arg)\n \n \n \n elif arg_count ==1:\n stop=start_index+1\n args=[explicit_arg]\n action_tuples.append((action,args,option_string))\n break\n \n \n \n else :\n msg=_('ignored explicit argument %r')\n raise ArgumentError(action,msg %explicit_arg)\n \n \n \n \n else :\n start=start_index+1\n selected_patterns=arg_strings_pattern[start:]\n arg_count=match_argument(action,selected_patterns)\n stop=start+arg_count\n args=arg_strings[start:stop]\n action_tuples.append((action,args,option_string))\n break\n \n \n \n assert action_tuples\n for action,args,option_string in action_tuples:\n take_action(action,args,option_string)\n return stop\n \n \n \n positionals=self._get_positional_actions()\n \n \n def consume_positionals(start_index):\n \n match_partial=self._match_arguments_partial\n selected_pattern=arg_strings_pattern[start_index:]\n arg_counts=match_partial(positionals,selected_pattern)\n \n \n \n for action,arg_count in zip(positionals,arg_counts):\n args=arg_strings[start_index:start_index+arg_count]\n start_index +=arg_count\n take_action(action,args)\n \n \n \n positionals[:]=positionals[len(arg_counts):]\n return start_index\n \n \n \n extras=[]\n start_index=0\n if option_string_indices:\n max_option_string_index=max(option_string_indices)\n else :\n max_option_string_index=-1\n while start_index <=max_option_string_index:\n \n \n next_option_string_index=min([\n index\n for index in option_string_indices\n if index >=start_index])\n if start_index !=next_option_string_index:\n positionals_end_index=consume_positionals(start_index)\n \n \n \n if positionals_end_index >start_index:\n start_index=positionals_end_index\n continue\n else :\n start_index=positionals_end_index\n \n \n \n if start_index not in option_string_indices:\n strings=arg_strings[start_index:next_option_string_index]\n extras.extend(strings)\n start_index=next_option_string_index\n \n \n start_index=consume_optional(start_index)\n \n \n stop_index=consume_positionals(start_index)\n \n \n extras.extend(arg_strings[stop_index:])\n \n \n \n required_actions=[]\n for action in self._actions:\n if action not in seen_actions:\n if action.required:\n required_actions.append(_get_action_name(action))\n else :\n \n \n \n \n if (action.default is not None and\n isinstance(action.default,str)and\n hasattr(namespace,action.dest)and\n action.default is getattr(namespace,action.dest)):\n setattr(namespace,action.dest,\n self._get_value(action,action.default))\n \n if required_actions:\n self.error(_('the following arguments are required: %s')%\n ', '.join(required_actions))\n \n \n for group in self._mutually_exclusive_groups:\n if group.required:\n for action in group._group_actions:\n if action in seen_non_default_actions:\n break\n \n \n else :\n names=[_get_action_name(action)\n for action in group._group_actions\n if action.help is not SUPPRESS]\n msg=_('one of the arguments %s is required')\n self.error(msg %' '.join(names))\n \n \n return namespace,extras\n \n def _read_args_from_files(self,arg_strings):\n \n new_arg_strings=[]\n for arg_string in arg_strings:\n \n \n if not arg_string or arg_string[0]not in self.fromfile_prefix_chars:\n new_arg_strings.append(arg_string)\n \n \n else :\n try :\n with open(arg_string[1:],\n encoding=_sys.getfilesystemencoding(),\n errors=_sys.getfilesystemencodeerrors())as args_file:\n arg_strings=[]\n for arg_line in args_file.read().splitlines():\n for arg in self.convert_arg_line_to_args(arg_line):\n arg_strings.append(arg)\n arg_strings=self._read_args_from_files(arg_strings)\n new_arg_strings.extend(arg_strings)\n except OSError as err:\n self.error(str(err))\n \n \n return new_arg_strings\n \n def convert_arg_line_to_args(self,arg_line):\n return [arg_line]\n \n def _match_argument(self,action,arg_strings_pattern):\n \n nargs_pattern=self._get_nargs_pattern(action)\n match=_re.match(nargs_pattern,arg_strings_pattern)\n \n \n if match is None :\n nargs_errors={\n None :_('expected one argument'),\n OPTIONAL:_('expected at most one argument'),\n ONE_OR_MORE:_('expected at least one argument'),\n }\n msg=nargs_errors.get(action.nargs)\n if msg is None :\n msg=ngettext('expected %s argument',\n 'expected %s arguments',\n action.nargs)%action.nargs\n raise ArgumentError(action,msg)\n \n \n return len(match.group(1))\n \n def _match_arguments_partial(self,actions,arg_strings_pattern):\n \n \n result=[]\n for i in range(len(actions),0,-1):\n actions_slice=actions[:i]\n pattern=''.join([self._get_nargs_pattern(action)\n for action in actions_slice])\n match=_re.match(pattern,arg_strings_pattern)\n if match is not None :\n result.extend([len(string)for string in match.groups()])\n break\n \n \n return result\n \n def _parse_optional(self,arg_string):\n \n if not arg_string:\n return None\n \n \n if not arg_string[0]in self.prefix_chars:\n return None\n \n \n if arg_string in self._option_string_actions:\n action=self._option_string_actions[arg_string]\n return action,arg_string,None\n \n \n if len(arg_string)==1:\n return None\n \n \n if '='in arg_string:\n option_string,explicit_arg=arg_string.split('=',1)\n if option_string in self._option_string_actions:\n action=self._option_string_actions[option_string]\n return action,option_string,explicit_arg\n \n \n \n option_tuples=self._get_option_tuples(arg_string)\n \n \n if len(option_tuples)>1:\n options=', '.join([option_string\n for action,option_string,explicit_arg in option_tuples])\n args={'option':arg_string,'matches':options}\n msg=_('ambiguous option: %(option)s could match %(matches)s')\n self.error(msg %args)\n \n \n \n elif len(option_tuples)==1:\n option_tuple,=option_tuples\n return option_tuple\n \n \n \n \n if self._negative_number_matcher.match(arg_string):\n if not self._has_negative_number_optionals:\n return None\n \n \n if ' 'in arg_string:\n return None\n \n \n \n return None ,arg_string,None\n \n def _get_option_tuples(self,option_string):\n result=[]\n \n \n \n chars=self.prefix_chars\n if option_string[0]in chars and option_string[1]in chars:\n if self.allow_abbrev:\n if '='in option_string:\n option_prefix,explicit_arg=option_string.split('=',1)\n else :\n option_prefix=option_string\n explicit_arg=None\n for option_string in self._option_string_actions:\n if option_string.startswith(option_prefix):\n action=self._option_string_actions[option_string]\n tup=action,option_string,explicit_arg\n result.append(tup)\n \n \n \n \n elif option_string[0]in chars and option_string[1]not in chars:\n option_prefix=option_string\n explicit_arg=None\n short_option_prefix=option_string[:2]\n short_explicit_arg=option_string[2:]\n \n for option_string in self._option_string_actions:\n if option_string ==short_option_prefix:\n action=self._option_string_actions[option_string]\n tup=action,option_string,short_explicit_arg\n result.append(tup)\n elif option_string.startswith(option_prefix):\n action=self._option_string_actions[option_string]\n tup=action,option_string,explicit_arg\n result.append(tup)\n \n \n else :\n self.error(_('unexpected option string: %s')%option_string)\n \n \n return result\n \n def _get_nargs_pattern(self,action):\n \n \n nargs=action.nargs\n \n \n if nargs is None :\n nargs_pattern='(-*A-*)'\n \n \n elif nargs ==OPTIONAL:\n nargs_pattern='(-*A?-*)'\n \n \n elif nargs ==ZERO_OR_MORE:\n nargs_pattern='(-*[A-]*)'\n \n \n elif nargs ==ONE_OR_MORE:\n nargs_pattern='(-*A[A-]*)'\n \n \n elif nargs ==REMAINDER:\n nargs_pattern='([-AO]*)'\n \n \n elif nargs ==PARSER:\n nargs_pattern='(-*A[-AO]*)'\n \n \n elif nargs ==SUPPRESS:\n nargs_pattern='(-*-*)'\n \n \n else :\n nargs_pattern='(-*%s-*)'%'-*'.join('A'*nargs)\n \n \n if action.option_strings:\n nargs_pattern=nargs_pattern.replace('-*','')\n nargs_pattern=nargs_pattern.replace('-','')\n \n \n return nargs_pattern\n \n \n \n \n \n def parse_intermixed_args(self,args=None ,namespace=None ):\n args,argv=self.parse_known_intermixed_args(args,namespace)\n if argv:\n msg=_('unrecognized arguments: %s')\n self.error(msg %' '.join(argv))\n return args\n \n def parse_known_intermixed_args(self,args=None ,namespace=None ):\n \n \n \n \n \n \n \n \n \n \n \n \n positionals=self._get_positional_actions()\n a=[action for action in positionals\n if action.nargs in [PARSER,REMAINDER]]\n if a:\n raise TypeError('parse_intermixed_args: positional arg'\n ' with nargs=%s'%a[0].nargs)\n \n if [action.dest for group in self._mutually_exclusive_groups\n for action in group._group_actions if action in positionals]:\n raise TypeError('parse_intermixed_args: positional in'\n ' mutuallyExclusiveGroup')\n \n try :\n save_usage=self.usage\n try :\n if self.usage is None :\n \n self.usage=self.format_usage()[7:]\n for action in positionals:\n \n action.save_nargs=action.nargs\n \n action.nargs=SUPPRESS\n action.save_default=action.default\n action.default=SUPPRESS\n namespace,remaining_args=self.parse_known_args(args,\n namespace)\n for action in positionals:\n \n if (hasattr(namespace,action.dest)\n and getattr(namespace,action.dest)==[]):\n from warnings import warn\n warn('Do not expect %s in %s'%(action.dest,namespace))\n delattr(namespace,action.dest)\n finally :\n \n for action in positionals:\n action.nargs=action.save_nargs\n action.default=action.save_default\n optionals=self._get_optional_actions()\n try :\n \n \n for action in optionals:\n action.save_required=action.required\n action.required=False\n for group in self._mutually_exclusive_groups:\n group.save_required=group.required\n group.required=False\n namespace,extras=self.parse_known_args(remaining_args,\n namespace)\n finally :\n \n for action in optionals:\n action.required=action.save_required\n for group in self._mutually_exclusive_groups:\n group.required=group.save_required\n finally :\n self.usage=save_usage\n return namespace,extras\n \n \n \n \n def _get_values(self,action,arg_strings):\n \n if action.nargs not in [PARSER,REMAINDER]:\n try :\n arg_strings.remove('--')\n except ValueError:\n pass\n \n \n if not arg_strings and action.nargs ==OPTIONAL:\n if action.option_strings:\n value=action.const\n else :\n value=action.default\n if isinstance(value,str):\n value=self._get_value(action,value)\n self._check_value(action,value)\n \n \n \n elif (not arg_strings and action.nargs ==ZERO_OR_MORE and\n not action.option_strings):\n if action.default is not None :\n value=action.default\n self._check_value(action,value)\n else :\n \n \n value=arg_strings\n \n \n elif len(arg_strings)==1 and action.nargs in [None ,OPTIONAL]:\n arg_string,=arg_strings\n value=self._get_value(action,arg_string)\n self._check_value(action,value)\n \n \n elif action.nargs ==REMAINDER:\n value=[self._get_value(action,v)for v in arg_strings]\n \n \n elif action.nargs ==PARSER:\n value=[self._get_value(action,v)for v in arg_strings]\n self._check_value(action,value[0])\n \n \n elif action.nargs ==SUPPRESS:\n value=SUPPRESS\n \n \n else :\n value=[self._get_value(action,v)for v in arg_strings]\n for v in value:\n self._check_value(action,v)\n \n \n return value\n \n def _get_value(self,action,arg_string):\n type_func=self._registry_get('type',action.type,action.type)\n if not callable(type_func):\n msg=_('%r is not callable')\n raise ArgumentError(action,msg %type_func)\n \n \n try :\n result=type_func(arg_string)\n \n \n except ArgumentTypeError as err:\n msg=str(err)\n raise ArgumentError(action,msg)\n \n \n except (TypeError,ValueError):\n name=getattr(action.type,'__name__',repr(action.type))\n args={'type':name,'value':arg_string}\n msg=_('invalid %(type)s value: %(value)r')\n raise ArgumentError(action,msg %args)\n \n \n return result\n \n def _check_value(self,action,value):\n \n if action.choices is not None and value not in action.choices:\n args={'value':value,\n 'choices':', '.join(map(repr,action.choices))}\n msg=_('invalid choice: %(value)r (choose from %(choices)s)')\n raise ArgumentError(action,msg %args)\n \n \n \n \n def format_usage(self):\n formatter=self._get_formatter()\n formatter.add_usage(self.usage,self._actions,\n self._mutually_exclusive_groups)\n return formatter.format_help()\n \n def format_help(self):\n formatter=self._get_formatter()\n \n \n formatter.add_usage(self.usage,self._actions,\n self._mutually_exclusive_groups)\n \n \n formatter.add_text(self.description)\n \n \n for action_group in self._action_groups:\n formatter.start_section(action_group.title)\n formatter.add_text(action_group.description)\n formatter.add_arguments(action_group._group_actions)\n formatter.end_section()\n \n \n formatter.add_text(self.epilog)\n \n \n return formatter.format_help()\n \n def _get_formatter(self):\n return self.formatter_class(prog=self.prog)\n \n \n \n \n def print_usage(self,file=None ):\n if file is None :\n file=_sys.stdout\n self._print_message(self.format_usage(),file)\n \n def print_help(self,file=None ):\n if file is None :\n file=_sys.stdout\n self._print_message(self.format_help(),file)\n \n def _print_message(self,message,file=None ):\n if message:\n file=file or _sys.stderr\n try :\n file.write(message)\n except (AttributeError,OSError):\n pass\n \n \n \n \n def exit(self,status=0,message=None ):\n if message:\n self._print_message(message,_sys.stderr)\n _sys.exit(status)\n \n def error(self,message):\n ''\n\n\n\n\n\n\n \n self.print_usage(_sys.stderr)\n args={'prog':self.prog,'message':message}\n self.exit(2,_('%(prog)s: error: %(message)s\\n')%args)\n", ["copy", "gettext", "os", "re", "shutil", "sys", "textwrap", "warnings"]], "ast": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport sys\nimport re\nfrom _ast import *\nfrom contextlib import contextmanager,nullcontext\nfrom enum import IntEnum,auto,_simple_enum\n\n\ndef parse(source,filename='',mode='exec',*,\ntype_comments=False ,feature_version=None ):\n ''\n\n\n\n \n flags=PyCF_ONLY_AST\n if type_comments:\n flags |=PyCF_TYPE_COMMENTS\n if feature_version is None :\n feature_version=-1\n elif isinstance(feature_version,tuple):\n major,minor=feature_version\n if major !=3:\n raise ValueError(f\"Unsupported major version: {major}\")\n feature_version=minor\n \n return compile(source,filename,mode,flags,\n _feature_version=feature_version)\n \n \ndef literal_eval(node_or_string):\n ''\n\n\n\n\n\n\n \n if isinstance(node_or_string,str):\n node_or_string=parse(node_or_string.lstrip(\" \\t\"),mode='eval')\n if isinstance(node_or_string,Expression):\n node_or_string=node_or_string.body\n def _raise_malformed_node(node):\n msg=\"malformed node or string\"\n if lno :=getattr(node,'lineno',None ):\n msg +=f' on line {lno}'\n raise ValueError(msg+f': {node !r}')\n def _convert_num(node):\n if not isinstance(node,Constant)or type(node.value)not in (int,float,complex):\n _raise_malformed_node(node)\n return node.value\n def _convert_signed_num(node):\n if isinstance(node,UnaryOp)and isinstance(node.op,(UAdd,USub)):\n operand=_convert_num(node.operand)\n if isinstance(node.op,UAdd):\n return +operand\n else :\n return -operand\n return _convert_num(node)\n def _convert(node):\n if isinstance(node,Constant):\n return node.value\n elif isinstance(node,Tuple):\n return tuple(map(_convert,node.elts))\n elif isinstance(node,List):\n return list(map(_convert,node.elts))\n elif isinstance(node,Set):\n return set(map(_convert,node.elts))\n elif (isinstance(node,Call)and isinstance(node.func,Name)and\n node.func.id =='set'and node.args ==node.keywords ==[]):\n return set()\n elif isinstance(node,Dict):\n if len(node.keys)!=len(node.values):\n _raise_malformed_node(node)\n return dict(zip(map(_convert,node.keys),\n map(_convert,node.values)))\n elif isinstance(node,BinOp)and isinstance(node.op,(Add,Sub)):\n left=_convert_signed_num(node.left)\n right=_convert_num(node.right)\n if isinstance(left,(int,float))and isinstance(right,complex):\n if isinstance(node.op,Add):\n return left+right\n else :\n return left -right\n return _convert_signed_num(node)\n return _convert(node_or_string)\n \n \ndef dump(node,annotate_fields=True ,include_attributes=False ,*,indent=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n def _format(node,level=0):\n if indent is not None :\n level +=1\n prefix='\\n'+indent *level\n sep=',\\n'+indent *level\n else :\n prefix=''\n sep=', '\n if isinstance(node,AST):\n cls=type(node)\n args=[]\n allsimple=True\n keywords=annotate_fields\n for name in node._fields:\n try :\n value=getattr(node,name)\n except AttributeError:\n keywords=True\n continue\n if value is None and getattr(cls,name,...)is None :\n keywords=True\n continue\n value,simple=_format(value,level)\n allsimple=allsimple and simple\n if keywords:\n args.append('%s=%s'%(name,value))\n else :\n args.append(value)\n if include_attributes and node._attributes:\n for name in node._attributes:\n try :\n value=getattr(node,name)\n except AttributeError:\n continue\n if value is None and getattr(cls,name,...)is None :\n continue\n value,simple=_format(value,level)\n allsimple=allsimple and simple\n args.append('%s=%s'%(name,value))\n if allsimple and len(args)<=3:\n return '%s(%s)'%(node.__class__.__name__,', '.join(args)),not args\n return '%s(%s%s)'%(node.__class__.__name__,prefix,sep.join(args)),False\n elif isinstance(node,list):\n if not node:\n return '[]',True\n return '[%s%s]'%(prefix,sep.join(_format(x,level)[0]for x in node)),False\n return repr(node),True\n \n if not isinstance(node,AST):\n raise TypeError('expected AST, got %r'%node.__class__.__name__)\n if indent is not None and not isinstance(indent,str):\n indent=' '*indent\n return _format(node)[0]\n \n \ndef copy_location(new_node,old_node):\n ''\n\n\n \n for attr in 'lineno','col_offset','end_lineno','end_col_offset':\n if attr in old_node._attributes and attr in new_node._attributes:\n value=getattr(old_node,attr,None )\n \n \n if value is not None or (\n hasattr(old_node,attr)and attr.startswith(\"end_\")\n ):\n setattr(new_node,attr,value)\n return new_node\n \n \ndef fix_missing_locations(node):\n ''\n\n\n\n\n\n \n def _fix(node,lineno,col_offset,end_lineno,end_col_offset):\n if 'lineno'in node._attributes:\n if not hasattr(node,'lineno'):\n node.lineno=lineno\n else :\n lineno=node.lineno\n if 'end_lineno'in node._attributes:\n if getattr(node,'end_lineno',None )is None :\n node.end_lineno=end_lineno\n else :\n end_lineno=node.end_lineno\n if 'col_offset'in node._attributes:\n if not hasattr(node,'col_offset'):\n node.col_offset=col_offset\n else :\n col_offset=node.col_offset\n if 'end_col_offset'in node._attributes:\n if getattr(node,'end_col_offset',None )is None :\n node.end_col_offset=end_col_offset\n else :\n end_col_offset=node.end_col_offset\n for child in iter_child_nodes(node):\n _fix(child,lineno,col_offset,end_lineno,end_col_offset)\n _fix(node,1,0,1,0)\n return node\n \n \ndef increment_lineno(node,n=1):\n ''\n\n\n\n \n for child in walk(node):\n \n \n if isinstance(child,TypeIgnore):\n child.lineno=getattr(child,'lineno',0)+n\n continue\n \n if 'lineno'in child._attributes:\n child.lineno=getattr(child,'lineno',0)+n\n if (\n \"end_lineno\"in child._attributes\n and (end_lineno :=getattr(child,\"end_lineno\",0))is not None\n ):\n child.end_lineno=end_lineno+n\n return node\n \n \ndef iter_fields(node):\n ''\n\n\n \n for field in node._fields:\n try :\n yield field,getattr(node,field)\n except AttributeError:\n pass\n \n \ndef iter_child_nodes(node):\n ''\n\n\n \n for name,field in iter_fields(node):\n if isinstance(field,AST):\n yield field\n elif isinstance(field,list):\n for item in field:\n if isinstance(item,AST):\n yield item\n \n \ndef get_docstring(node,clean=True ):\n ''\n\n\n\n\n\n\n \n if not isinstance(node,(AsyncFunctionDef,FunctionDef,ClassDef,Module)):\n raise TypeError(\"%r can't have docstrings\"%node.__class__.__name__)\n if not (node.body and isinstance(node.body[0],Expr)):\n return None\n node=node.body[0].value\n if isinstance(node,Constant)and isinstance(node.value,str):\n text=node.value\n else :\n return None\n if clean:\n import inspect\n text=inspect.cleandoc(text)\n return text\n \n \n_line_pattern=re.compile(r\"(.*?(?:\\r\\n|\\n|\\r|$))\")\ndef _splitlines_no_ff(source,maxlines=None ):\n ''\n\n\n \n lines=[]\n for lineno,match in enumerate(_line_pattern.finditer(source),1):\n if maxlines is not None and lineno >maxlines:\n break\n lines.append(match[0])\n return lines\n \n \ndef _pad_whitespace(source):\n ''\n result=''\n for c in source:\n if c in '\\f\\t':\n result +=c\n else :\n result +=' '\n return result\n \n \ndef get_source_segment(source,node,*,padded=False ):\n ''\n\n\n\n\n\n\n \n try :\n if node.end_lineno is None or node.end_col_offset is None :\n return None\n lineno=node.lineno -1\n end_lineno=node.end_lineno -1\n col_offset=node.col_offset\n end_col_offset=node.end_col_offset\n except AttributeError:\n return None\n \n lines=_splitlines_no_ff(source,maxlines=end_lineno+1)\n if end_lineno ==lineno:\n return lines[lineno].encode()[col_offset:end_col_offset].decode()\n \n if padded:\n padding=_pad_whitespace(lines[lineno].encode()[:col_offset].decode())\n else :\n padding=''\n \n first=padding+lines[lineno].encode()[col_offset:].decode()\n last=lines[end_lineno].encode()[:end_col_offset].decode()\n lines=lines[lineno+1:end_lineno]\n \n lines.insert(0,first)\n lines.append(last)\n return ''.join(lines)\n \n \ndef walk(node):\n ''\n\n\n\n \n from collections import deque\n todo=deque([node])\n while todo:\n node=todo.popleft()\n todo.extend(iter_child_nodes(node))\n yield node\n \n \nclass NodeVisitor(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def visit(self,node):\n ''\n method='visit_'+node.__class__.__name__\n visitor=getattr(self,method,self.generic_visit)\n return visitor(node)\n \n def generic_visit(self,node):\n ''\n for field,value in iter_fields(node):\n if isinstance(value,list):\n for item in value:\n if isinstance(item,AST):\n self.visit(item)\n elif isinstance(value,AST):\n self.visit(value)\n \n def visit_Constant(self,node):\n value=node.value\n type_name=_const_node_type_names.get(type(value))\n if type_name is None :\n for cls,name in _const_node_type_names.items():\n if isinstance(value,cls):\n type_name=name\n break\n if type_name is not None :\n method='visit_'+type_name\n try :\n visitor=getattr(self,method)\n except AttributeError:\n pass\n else :\n import warnings\n warnings.warn(f\"{method} is deprecated; add visit_Constant\",\n DeprecationWarning,2)\n return visitor(node)\n return self.generic_visit(node)\n \n \nclass NodeTransformer(NodeVisitor):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def generic_visit(self,node):\n for field,old_value in iter_fields(node):\n if isinstance(old_value,list):\n new_values=[]\n for value in old_value:\n if isinstance(value,AST):\n value=self.visit(value)\n if value is None :\n continue\n elif not isinstance(value,AST):\n new_values.extend(value)\n continue\n new_values.append(value)\n old_value[:]=new_values\n elif isinstance(old_value,AST):\n new_node=self.visit(old_value)\n if new_node is None :\n delattr(node,field)\n else :\n setattr(node,field,new_node)\n return node\n \n \n_DEPRECATED_VALUE_ALIAS_MESSAGE=(\n\"{name} is deprecated and will be removed in Python {remove}; use value instead\"\n)\n_DEPRECATED_CLASS_MESSAGE=(\n\"{name} is deprecated and will be removed in Python {remove}; \"\n\"use ast.Constant instead\"\n)\n\n\n\nif not hasattr(Constant,'n'):\n\n\n\n def _n_getter(self):\n ''\n import warnings\n warnings._deprecated(\n \"Attribute n\",message=_DEPRECATED_VALUE_ALIAS_MESSAGE,remove=(3,14)\n )\n return self.value\n \n def _n_setter(self,value):\n import warnings\n warnings._deprecated(\n \"Attribute n\",message=_DEPRECATED_VALUE_ALIAS_MESSAGE,remove=(3,14)\n )\n self.value=value\n \n def _s_getter(self):\n ''\n import warnings\n warnings._deprecated(\n \"Attribute s\",message=_DEPRECATED_VALUE_ALIAS_MESSAGE,remove=(3,14)\n )\n return self.value\n \n def _s_setter(self,value):\n import warnings\n warnings._deprecated(\n \"Attribute s\",message=_DEPRECATED_VALUE_ALIAS_MESSAGE,remove=(3,14)\n )\n self.value=value\n \n Constant.n=property(_n_getter,_n_setter)\n Constant.s=property(_s_getter,_s_setter)\n \nclass _ABC(type):\n\n def __init__(cls,*args):\n cls.__doc__=\"\"\"Deprecated AST node class. Use ast.Constant instead\"\"\"\n \n def __instancecheck__(cls,inst):\n if cls in _const_types:\n import warnings\n warnings._deprecated(\n f\"ast.{cls.__qualname__}\",\n message=_DEPRECATED_CLASS_MESSAGE,\n remove=(3,14)\n )\n if not isinstance(inst,Constant):\n return False\n if cls in _const_types:\n try :\n value=inst.value\n except AttributeError:\n return False\n else :\n return (\n isinstance(value,_const_types[cls])and\n not isinstance(value,_const_types_not.get(cls,()))\n )\n return type.__instancecheck__(cls,inst)\n \ndef _new(cls,*args,**kwargs):\n for key in kwargs:\n if key not in cls._fields:\n \n continue\n pos=cls._fields.index(key)\n if pos precedence)\n \n def get_precedence(self,node):\n return self._precedences.get(node,_Precedence.TEST)\n \n def set_precedence(self,precedence,*nodes):\n for node in nodes:\n self._precedences[node]=precedence\n \n def get_raw_docstring(self,node):\n ''\n\n\n \n if not isinstance(\n node,(AsyncFunctionDef,FunctionDef,ClassDef,Module)\n )or len(node.body)<1:\n return None\n node=node.body[0]\n if not isinstance(node,Expr):\n return None\n node=node.value\n if isinstance(node,Constant)and isinstance(node.value,str):\n return node\n \n def get_type_comment(self,node):\n comment=self._type_ignores.get(node.lineno)or node.type_comment\n if comment is not None :\n return f\" # type: {comment}\"\n \n def traverse(self,node):\n if isinstance(node,list):\n for item in node:\n self.traverse(item)\n else :\n super().visit(node)\n \n \n \n \n def visit(self,node):\n ''\n \n self._source=[]\n self.traverse(node)\n return \"\".join(self._source)\n \n def _write_docstring_and_traverse_body(self,node):\n if (docstring :=self.get_raw_docstring(node)):\n self._write_docstring(docstring)\n self.traverse(node.body[1:])\n else :\n self.traverse(node.body)\n \n def visit_Module(self,node):\n self._type_ignores={\n ignore.lineno:f\"ignore{ignore.tag}\"\n for ignore in node.type_ignores\n }\n self._write_docstring_and_traverse_body(node)\n self._type_ignores.clear()\n \n def visit_FunctionType(self,node):\n with self.delimit(\"(\",\")\"):\n self.interleave(\n lambda :self.write(\", \"),self.traverse,node.argtypes\n )\n \n self.write(\" -> \")\n self.traverse(node.returns)\n \n def visit_Expr(self,node):\n self.fill()\n self.set_precedence(_Precedence.YIELD,node.value)\n self.traverse(node.value)\n \n def visit_NamedExpr(self,node):\n with self.require_parens(_Precedence.NAMED_EXPR,node):\n self.set_precedence(_Precedence.ATOM,node.target,node.value)\n self.traverse(node.target)\n self.write(\" := \")\n self.traverse(node.value)\n \n def visit_Import(self,node):\n self.fill(\"import \")\n self.interleave(lambda :self.write(\", \"),self.traverse,node.names)\n \n def visit_ImportFrom(self,node):\n self.fill(\"from \")\n self.write(\".\"*(node.level or 0))\n if node.module:\n self.write(node.module)\n self.write(\" import \")\n self.interleave(lambda :self.write(\", \"),self.traverse,node.names)\n \n def visit_Assign(self,node):\n self.fill()\n for target in node.targets:\n self.set_precedence(_Precedence.TUPLE,target)\n self.traverse(target)\n self.write(\" = \")\n self.traverse(node.value)\n if type_comment :=self.get_type_comment(node):\n self.write(type_comment)\n \n def visit_AugAssign(self,node):\n self.fill()\n self.traverse(node.target)\n self.write(\" \"+self.binop[node.op.__class__.__name__]+\"= \")\n self.traverse(node.value)\n \n def visit_AnnAssign(self,node):\n self.fill()\n with self.delimit_if(\"(\",\")\",not node.simple and isinstance(node.target,Name)):\n self.traverse(node.target)\n self.write(\": \")\n self.traverse(node.annotation)\n if node.value:\n self.write(\" = \")\n self.traverse(node.value)\n \n def visit_Return(self,node):\n self.fill(\"return\")\n if node.value:\n self.write(\" \")\n self.traverse(node.value)\n \n def visit_Pass(self,node):\n self.fill(\"pass\")\n \n def visit_Break(self,node):\n self.fill(\"break\")\n \n def visit_Continue(self,node):\n self.fill(\"continue\")\n \n def visit_Delete(self,node):\n self.fill(\"del \")\n self.interleave(lambda :self.write(\", \"),self.traverse,node.targets)\n \n def visit_Assert(self,node):\n self.fill(\"assert \")\n self.traverse(node.test)\n if node.msg:\n self.write(\", \")\n self.traverse(node.msg)\n \n def visit_Global(self,node):\n self.fill(\"global \")\n self.interleave(lambda :self.write(\", \"),self.write,node.names)\n \n def visit_Nonlocal(self,node):\n self.fill(\"nonlocal \")\n self.interleave(lambda :self.write(\", \"),self.write,node.names)\n \n def visit_Await(self,node):\n with self.require_parens(_Precedence.AWAIT,node):\n self.write(\"await\")\n if node.value:\n self.write(\" \")\n self.set_precedence(_Precedence.ATOM,node.value)\n self.traverse(node.value)\n \n def visit_Yield(self,node):\n with self.require_parens(_Precedence.YIELD,node):\n self.write(\"yield\")\n if node.value:\n self.write(\" \")\n self.set_precedence(_Precedence.ATOM,node.value)\n self.traverse(node.value)\n \n def visit_YieldFrom(self,node):\n with self.require_parens(_Precedence.YIELD,node):\n self.write(\"yield from \")\n if not node.value:\n raise ValueError(\"Node can't be used without a value attribute.\")\n self.set_precedence(_Precedence.ATOM,node.value)\n self.traverse(node.value)\n \n def visit_Raise(self,node):\n self.fill(\"raise\")\n if not node.exc:\n if node.cause:\n raise ValueError(f\"Node can't use cause without an exception.\")\n return\n self.write(\" \")\n self.traverse(node.exc)\n if node.cause:\n self.write(\" from \")\n self.traverse(node.cause)\n \n def do_visit_try(self,node):\n self.fill(\"try\")\n with self.block():\n self.traverse(node.body)\n for ex in node.handlers:\n self.traverse(ex)\n if node.orelse:\n self.fill(\"else\")\n with self.block():\n self.traverse(node.orelse)\n if node.finalbody:\n self.fill(\"finally\")\n with self.block():\n self.traverse(node.finalbody)\n \n def visit_Try(self,node):\n prev_in_try_star=self._in_try_star\n try :\n self._in_try_star=False\n self.do_visit_try(node)\n finally :\n self._in_try_star=prev_in_try_star\n \n def visit_TryStar(self,node):\n prev_in_try_star=self._in_try_star\n try :\n self._in_try_star=True\n self.do_visit_try(node)\n finally :\n self._in_try_star=prev_in_try_star\n \n def visit_ExceptHandler(self,node):\n self.fill(\"except*\"if self._in_try_star else \"except\")\n if node.type:\n self.write(\" \")\n self.traverse(node.type)\n if node.name:\n self.write(\" as \")\n self.write(node.name)\n with self.block():\n self.traverse(node.body)\n \n def visit_ClassDef(self,node):\n self.maybe_newline()\n for deco in node.decorator_list:\n self.fill(\"@\")\n self.traverse(deco)\n self.fill(\"class \"+node.name)\n self._type_params_helper(node.type_params)\n with self.delimit_if(\"(\",\")\",condition=node.bases or node.keywords):\n comma=False\n for e in node.bases:\n if comma:\n self.write(\", \")\n else :\n comma=True\n self.traverse(e)\n for e in node.keywords:\n if comma:\n self.write(\", \")\n else :\n comma=True\n self.traverse(e)\n \n with self.block():\n self._write_docstring_and_traverse_body(node)\n \n def visit_FunctionDef(self,node):\n self._function_helper(node,\"def\")\n \n def visit_AsyncFunctionDef(self,node):\n self._function_helper(node,\"async def\")\n \n def _function_helper(self,node,fill_suffix):\n self.maybe_newline()\n for deco in node.decorator_list:\n self.fill(\"@\")\n self.traverse(deco)\n def_str=fill_suffix+\" \"+node.name\n self.fill(def_str)\n self._type_params_helper(node.type_params)\n with self.delimit(\"(\",\")\"):\n self.traverse(node.args)\n if node.returns:\n self.write(\" -> \")\n self.traverse(node.returns)\n with self.block(extra=self.get_type_comment(node)):\n self._write_docstring_and_traverse_body(node)\n \n def _type_params_helper(self,type_params):\n if type_params is not None and len(type_params)>0:\n with self.delimit(\"[\",\"]\"):\n self.interleave(lambda :self.write(\", \"),self.traverse,type_params)\n \n def visit_TypeVar(self,node):\n self.write(node.name)\n if node.bound:\n self.write(\": \")\n self.traverse(node.bound)\n \n def visit_TypeVarTuple(self,node):\n self.write(\"*\"+node.name)\n \n def visit_ParamSpec(self,node):\n self.write(\"**\"+node.name)\n \n def visit_TypeAlias(self,node):\n self.fill(\"type \")\n self.traverse(node.name)\n self._type_params_helper(node.type_params)\n self.write(\" = \")\n self.traverse(node.value)\n \n def visit_For(self,node):\n self._for_helper(\"for \",node)\n \n def visit_AsyncFor(self,node):\n self._for_helper(\"async for \",node)\n \n def _for_helper(self,fill,node):\n self.fill(fill)\n self.set_precedence(_Precedence.TUPLE,node.target)\n self.traverse(node.target)\n self.write(\" in \")\n self.traverse(node.iter)\n with self.block(extra=self.get_type_comment(node)):\n self.traverse(node.body)\n if node.orelse:\n self.fill(\"else\")\n with self.block():\n self.traverse(node.orelse)\n \n def visit_If(self,node):\n self.fill(\"if \")\n self.traverse(node.test)\n with self.block():\n self.traverse(node.body)\n \n while node.orelse and len(node.orelse)==1 and isinstance(node.orelse[0],If):\n node=node.orelse[0]\n self.fill(\"elif \")\n self.traverse(node.test)\n with self.block():\n self.traverse(node.body)\n \n if node.orelse:\n self.fill(\"else\")\n with self.block():\n self.traverse(node.orelse)\n \n def visit_While(self,node):\n self.fill(\"while \")\n self.traverse(node.test)\n with self.block():\n self.traverse(node.body)\n if node.orelse:\n self.fill(\"else\")\n with self.block():\n self.traverse(node.orelse)\n \n def visit_With(self,node):\n self.fill(\"with \")\n self.interleave(lambda :self.write(\", \"),self.traverse,node.items)\n with self.block(extra=self.get_type_comment(node)):\n self.traverse(node.body)\n \n def visit_AsyncWith(self,node):\n self.fill(\"async with \")\n self.interleave(lambda :self.write(\", \"),self.traverse,node.items)\n with self.block(extra=self.get_type_comment(node)):\n self.traverse(node.body)\n \n def _str_literal_helper(\n self,string,*,quote_types=_ALL_QUOTES,escape_special_whitespace=False\n ):\n ''\n\n \n def escape_char(c):\n \n \n if not escape_special_whitespace and c in \"\\n\\t\":\n return c\n \n if c ==\"\\\\\"or not c.isprintable():\n return c.encode(\"unicode_escape\").decode(\"ascii\")\n return c\n \n escaped_string=\"\".join(map(escape_char,string))\n possible_quotes=quote_types\n if \"\\n\"in escaped_string:\n possible_quotes=[q for q in possible_quotes if q in _MULTI_QUOTES]\n possible_quotes=[q for q in possible_quotes if q not in escaped_string]\n if not possible_quotes:\n \n \n \n string=repr(string)\n quote=next((q for q in quote_types if string[0]in q),string[0])\n return string[1:-1],[quote]\n if escaped_string:\n \n possible_quotes.sort(key=lambda q:q[0]==escaped_string[-1])\n \n \n if possible_quotes[0][0]==escaped_string[-1]:\n assert len(possible_quotes[0])==3\n escaped_string=escaped_string[:-1]+\"\\\\\"+escaped_string[-1]\n return escaped_string,possible_quotes\n \n def _write_str_avoiding_backslashes(self,string,*,quote_types=_ALL_QUOTES):\n ''\n string,quote_types=self._str_literal_helper(string,quote_types=quote_types)\n quote_type=quote_types[0]\n self.write(f\"{quote_type}{string}{quote_type}\")\n \n def visit_JoinedStr(self,node):\n self.write(\"f\")\n if self._avoid_backslashes:\n with self.buffered()as buffer:\n self._write_fstring_inner(node)\n return self._write_str_avoiding_backslashes(\"\".join(buffer))\n \n \n \n \n \n \n \n fstring_parts=[]\n for value in node.values:\n with self.buffered()as buffer:\n self._write_fstring_inner(value)\n fstring_parts.append(\n (\"\".join(buffer),isinstance(value,Constant))\n )\n \n new_fstring_parts=[]\n quote_types=list(_ALL_QUOTES)\n for value,is_constant in fstring_parts:\n value,quote_types=self._str_literal_helper(\n value,\n quote_types=quote_types,\n escape_special_whitespace=is_constant,\n )\n new_fstring_parts.append(value)\n \n value=\"\".join(new_fstring_parts)\n quote_type=quote_types[0]\n self.write(f\"{quote_type}{value}{quote_type}\")\n \n def _write_fstring_inner(self,node):\n if isinstance(node,JoinedStr):\n \n for value in node.values:\n self._write_fstring_inner(value)\n elif isinstance(node,Constant)and isinstance(node.value,str):\n value=node.value.replace(\"{\",\"{{\").replace(\"}\",\"}}\")\n self.write(value)\n elif isinstance(node,FormattedValue):\n self.visit_FormattedValue(node)\n else :\n raise ValueError(f\"Unexpected node inside JoinedStr, {node !r}\")\n \n def visit_FormattedValue(self,node):\n def unparse_inner(inner):\n unparser=type(self)(_avoid_backslashes=True )\n unparser.set_precedence(_Precedence.TEST.next(),inner)\n return unparser.visit(inner)\n \n with self.delimit(\"{\",\"}\"):\n expr=unparse_inner(node.value)\n if \"\\\\\"in expr:\n raise ValueError(\n \"Unable to avoid backslash in f-string expression part\"\n )\n if expr.startswith(\"{\"):\n \n self.write(\" \")\n self.write(expr)\n if node.conversion !=-1:\n self.write(f\"!{chr(node.conversion)}\")\n if node.format_spec:\n self.write(\":\")\n self._write_fstring_inner(node.format_spec)\n \n def visit_Name(self,node):\n self.write(node.id)\n \n def _write_docstring(self,node):\n self.fill()\n if node.kind ==\"u\":\n self.write(\"u\")\n self._write_str_avoiding_backslashes(node.value,quote_types=_MULTI_QUOTES)\n \n def _write_constant(self,value):\n if isinstance(value,(float,complex)):\n \n \n self.write(\n repr(value)\n .replace(\"inf\",_INFSTR)\n .replace(\"nan\",f\"({_INFSTR}-{_INFSTR})\")\n )\n elif self._avoid_backslashes and isinstance(value,str):\n self._write_str_avoiding_backslashes(value)\n else :\n self.write(repr(value))\n \n def visit_Constant(self,node):\n value=node.value\n if isinstance(value,tuple):\n with self.delimit(\"(\",\")\"):\n self.items_view(self._write_constant,value)\n elif value is ...:\n self.write(\"...\")\n else :\n if node.kind ==\"u\":\n self.write(\"u\")\n self._write_constant(node.value)\n \n def visit_List(self,node):\n with self.delimit(\"[\",\"]\"):\n self.interleave(lambda :self.write(\", \"),self.traverse,node.elts)\n \n def visit_ListComp(self,node):\n with self.delimit(\"[\",\"]\"):\n self.traverse(node.elt)\n for gen in node.generators:\n self.traverse(gen)\n \n def visit_GeneratorExp(self,node):\n with self.delimit(\"(\",\")\"):\n self.traverse(node.elt)\n for gen in node.generators:\n self.traverse(gen)\n \n def visit_SetComp(self,node):\n with self.delimit(\"{\",\"}\"):\n self.traverse(node.elt)\n for gen in node.generators:\n self.traverse(gen)\n \n def visit_DictComp(self,node):\n with self.delimit(\"{\",\"}\"):\n self.traverse(node.key)\n self.write(\": \")\n self.traverse(node.value)\n for gen in node.generators:\n self.traverse(gen)\n \n def visit_comprehension(self,node):\n if node.is_async:\n self.write(\" async for \")\n else :\n self.write(\" for \")\n self.set_precedence(_Precedence.TUPLE,node.target)\n self.traverse(node.target)\n self.write(\" in \")\n self.set_precedence(_Precedence.TEST.next(),node.iter,*node.ifs)\n self.traverse(node.iter)\n for if_clause in node.ifs:\n self.write(\" if \")\n self.traverse(if_clause)\n \n def visit_IfExp(self,node):\n with self.require_parens(_Precedence.TEST,node):\n self.set_precedence(_Precedence.TEST.next(),node.body,node.test)\n self.traverse(node.body)\n self.write(\" if \")\n self.traverse(node.test)\n self.write(\" else \")\n self.set_precedence(_Precedence.TEST,node.orelse)\n self.traverse(node.orelse)\n \n def visit_Set(self,node):\n if node.elts:\n with self.delimit(\"{\",\"}\"):\n self.interleave(lambda :self.write(\", \"),self.traverse,node.elts)\n else :\n \n \n self.write('{*()}')\n \n def visit_Dict(self,node):\n def write_key_value_pair(k,v):\n self.traverse(k)\n self.write(\": \")\n self.traverse(v)\n \n def write_item(item):\n k,v=item\n if k is None :\n \n \n self.write(\"**\")\n self.set_precedence(_Precedence.EXPR,v)\n self.traverse(v)\n else :\n write_key_value_pair(k,v)\n \n with self.delimit(\"{\",\"}\"):\n self.interleave(\n lambda :self.write(\", \"),write_item,zip(node.keys,node.values)\n )\n \n def visit_Tuple(self,node):\n with self.delimit_if(\n \"(\",\n \")\",\n len(node.elts)==0 or self.get_precedence(node)>_Precedence.TUPLE\n ):\n self.items_view(self.traverse,node.elts)\n \n unop={\"Invert\":\"~\",\"Not\":\"not\",\"UAdd\":\"+\",\"USub\":\"-\"}\n unop_precedence={\n \"not\":_Precedence.NOT,\n \"~\":_Precedence.FACTOR,\n \"+\":_Precedence.FACTOR,\n \"-\":_Precedence.FACTOR,\n }\n \n def visit_UnaryOp(self,node):\n operator=self.unop[node.op.__class__.__name__]\n operator_precedence=self.unop_precedence[operator]\n with self.require_parens(operator_precedence,node):\n self.write(operator)\n \n \n if operator_precedence is not _Precedence.FACTOR:\n self.write(\" \")\n self.set_precedence(operator_precedence,node.operand)\n self.traverse(node.operand)\n \n binop={\n \"Add\":\"+\",\n \"Sub\":\"-\",\n \"Mult\":\"*\",\n \"MatMult\":\"@\",\n \"Div\":\"/\",\n \"Mod\":\"%\",\n \"LShift\":\"<<\",\n \"RShift\":\">>\",\n \"BitOr\":\"|\",\n \"BitXor\":\"^\",\n \"BitAnd\":\"&\",\n \"FloorDiv\":\"//\",\n \"Pow\":\"**\",\n }\n \n binop_precedence={\n \"+\":_Precedence.ARITH,\n \"-\":_Precedence.ARITH,\n \"*\":_Precedence.TERM,\n \"@\":_Precedence.TERM,\n \"/\":_Precedence.TERM,\n \"%\":_Precedence.TERM,\n \"<<\":_Precedence.SHIFT,\n \">>\":_Precedence.SHIFT,\n \"|\":_Precedence.BOR,\n \"^\":_Precedence.BXOR,\n \"&\":_Precedence.BAND,\n \"//\":_Precedence.TERM,\n \"**\":_Precedence.POWER,\n }\n \n binop_rassoc=frozenset((\"**\",))\n def visit_BinOp(self,node):\n operator=self.binop[node.op.__class__.__name__]\n operator_precedence=self.binop_precedence[operator]\n with self.require_parens(operator_precedence,node):\n if operator in self.binop_rassoc:\n left_precedence=operator_precedence.next()\n right_precedence=operator_precedence\n else :\n left_precedence=operator_precedence\n right_precedence=operator_precedence.next()\n \n self.set_precedence(left_precedence,node.left)\n self.traverse(node.left)\n self.write(f\" {operator} \")\n self.set_precedence(right_precedence,node.right)\n self.traverse(node.right)\n \n cmpops={\n \"Eq\":\"==\",\n \"NotEq\":\"!=\",\n \"Lt\":\"<\",\n \"LtE\":\"<=\",\n \"Gt\":\">\",\n \"GtE\":\">=\",\n \"Is\":\"is\",\n \"IsNot\":\"is not\",\n \"In\":\"in\",\n \"NotIn\":\"not in\",\n }\n \n def visit_Compare(self,node):\n with self.require_parens(_Precedence.CMP,node):\n self.set_precedence(_Precedence.CMP.next(),node.left,*node.comparators)\n self.traverse(node.left)\n for o,e in zip(node.ops,node.comparators):\n self.write(\" \"+self.cmpops[o.__class__.__name__]+\" \")\n self.traverse(e)\n \n boolops={\"And\":\"and\",\"Or\":\"or\"}\n boolop_precedence={\"and\":_Precedence.AND,\"or\":_Precedence.OR}\n \n def visit_BoolOp(self,node):\n operator=self.boolops[node.op.__class__.__name__]\n operator_precedence=self.boolop_precedence[operator]\n \n def increasing_level_traverse(node):\n nonlocal operator_precedence\n operator_precedence=operator_precedence.next()\n self.set_precedence(operator_precedence,node)\n self.traverse(node)\n \n with self.require_parens(operator_precedence,node):\n s=f\" {operator} \"\n self.interleave(lambda :self.write(s),increasing_level_traverse,node.values)\n \n def visit_Attribute(self,node):\n self.set_precedence(_Precedence.ATOM,node.value)\n self.traverse(node.value)\n \n \n \n if isinstance(node.value,Constant)and isinstance(node.value.value,int):\n self.write(\" \")\n self.write(\".\")\n self.write(node.attr)\n \n def visit_Call(self,node):\n self.set_precedence(_Precedence.ATOM,node.func)\n self.traverse(node.func)\n with self.delimit(\"(\",\")\"):\n comma=False\n for e in node.args:\n if comma:\n self.write(\", \")\n else :\n comma=True\n self.traverse(e)\n for e in node.keywords:\n if comma:\n self.write(\", \")\n else :\n comma=True\n self.traverse(e)\n \n def visit_Subscript(self,node):\n def is_non_empty_tuple(slice_value):\n return (\n isinstance(slice_value,Tuple)\n and slice_value.elts\n )\n \n self.set_precedence(_Precedence.ATOM,node.value)\n self.traverse(node.value)\n with self.delimit(\"[\",\"]\"):\n if is_non_empty_tuple(node.slice):\n \n self.items_view(self.traverse,node.slice.elts)\n else :\n self.traverse(node.slice)\n \n def visit_Starred(self,node):\n self.write(\"*\")\n self.set_precedence(_Precedence.EXPR,node.value)\n self.traverse(node.value)\n \n def visit_Ellipsis(self,node):\n self.write(\"...\")\n \n def visit_Slice(self,node):\n if node.lower:\n self.traverse(node.lower)\n self.write(\":\")\n if node.upper:\n self.traverse(node.upper)\n if node.step:\n self.write(\":\")\n self.traverse(node.step)\n \n def visit_Match(self,node):\n self.fill(\"match \")\n self.traverse(node.subject)\n with self.block():\n for case in node.cases:\n self.traverse(case)\n \n def visit_arg(self,node):\n self.write(node.arg)\n if node.annotation:\n self.write(\": \")\n self.traverse(node.annotation)\n \n def visit_arguments(self,node):\n first=True\n \n all_args=node.posonlyargs+node.args\n defaults=[None ]*(len(all_args)-len(node.defaults))+node.defaults\n for index,elements in enumerate(zip(all_args,defaults),1):\n a,d=elements\n if first:\n first=False\n else :\n self.write(\", \")\n self.traverse(a)\n if d:\n self.write(\"=\")\n self.traverse(d)\n if index ==len(node.posonlyargs):\n self.write(\", /\")\n \n \n if node.vararg or node.kwonlyargs:\n if first:\n first=False\n else :\n self.write(\", \")\n self.write(\"*\")\n if node.vararg:\n self.write(node.vararg.arg)\n if node.vararg.annotation:\n self.write(\": \")\n self.traverse(node.vararg.annotation)\n \n \n if node.kwonlyargs:\n for a,d in zip(node.kwonlyargs,node.kw_defaults):\n self.write(\", \")\n self.traverse(a)\n if d:\n self.write(\"=\")\n self.traverse(d)\n \n \n if node.kwarg:\n if first:\n first=False\n else :\n self.write(\", \")\n self.write(\"**\"+node.kwarg.arg)\n if node.kwarg.annotation:\n self.write(\": \")\n self.traverse(node.kwarg.annotation)\n \n def visit_keyword(self,node):\n if node.arg is None :\n self.write(\"**\")\n else :\n self.write(node.arg)\n self.write(\"=\")\n self.traverse(node.value)\n \n def visit_Lambda(self,node):\n with self.require_parens(_Precedence.TEST,node):\n self.write(\"lambda\")\n with self.buffered()as buffer:\n self.traverse(node.args)\n if buffer:\n self.write(\" \",*buffer)\n self.write(\": \")\n self.set_precedence(_Precedence.TEST,node.body)\n self.traverse(node.body)\n \n def visit_alias(self,node):\n self.write(node.name)\n if node.asname:\n self.write(\" as \"+node.asname)\n \n def visit_withitem(self,node):\n self.traverse(node.context_expr)\n if node.optional_vars:\n self.write(\" as \")\n self.traverse(node.optional_vars)\n \n def visit_match_case(self,node):\n self.fill(\"case \")\n self.traverse(node.pattern)\n if node.guard:\n self.write(\" if \")\n self.traverse(node.guard)\n with self.block():\n self.traverse(node.body)\n \n def visit_MatchValue(self,node):\n self.traverse(node.value)\n \n def visit_MatchSingleton(self,node):\n self._write_constant(node.value)\n \n def visit_MatchSequence(self,node):\n with self.delimit(\"[\",\"]\"):\n self.interleave(\n lambda :self.write(\", \"),self.traverse,node.patterns\n )\n \n def visit_MatchStar(self,node):\n name=node.name\n if name is None :\n name=\"_\"\n self.write(f\"*{name}\")\n \n def visit_MatchMapping(self,node):\n def write_key_pattern_pair(pair):\n k,p=pair\n self.traverse(k)\n self.write(\": \")\n self.traverse(p)\n \n with self.delimit(\"{\",\"}\"):\n keys=node.keys\n self.interleave(\n lambda :self.write(\", \"),\n write_key_pattern_pair,\n zip(keys,node.patterns,strict=True ),\n )\n rest=node.rest\n if rest is not None :\n if keys:\n self.write(\", \")\n self.write(f\"**{rest}\")\n \n def visit_MatchClass(self,node):\n self.set_precedence(_Precedence.ATOM,node.cls)\n self.traverse(node.cls)\n with self.delimit(\"(\",\")\"):\n patterns=node.patterns\n self.interleave(\n lambda :self.write(\", \"),self.traverse,patterns\n )\n attrs=node.kwd_attrs\n if attrs:\n def write_attr_pattern(pair):\n attr,pattern=pair\n self.write(f\"{attr}=\")\n self.traverse(pattern)\n \n if patterns:\n self.write(\", \")\n self.interleave(\n lambda :self.write(\", \"),\n write_attr_pattern,\n zip(attrs,node.kwd_patterns,strict=True ),\n )\n \n def visit_MatchAs(self,node):\n name=node.name\n pattern=node.pattern\n if name is None :\n self.write(\"_\")\n elif pattern is None :\n self.write(node.name)\n else :\n with self.require_parens(_Precedence.TEST,node):\n self.set_precedence(_Precedence.BOR,node.pattern)\n self.traverse(node.pattern)\n self.write(f\" as {node.name}\")\n \n def visit_MatchOr(self,node):\n with self.require_parens(_Precedence.BOR,node):\n self.set_precedence(_Precedence.BOR.next(),*node.patterns)\n self.interleave(lambda :self.write(\" | \"),self.traverse,node.patterns)\n \ndef unparse(ast_obj):\n unparser=_Unparser()\n return unparser.visit(ast_obj)\n \n \n_deprecated_globals={\nname:globals().pop(name)\nfor name in ('Num','Str','Bytes','NameConstant','Ellipsis')\n}\n\ndef __getattr__(name):\n if name in _deprecated_globals:\n globals()[name]=value=_deprecated_globals[name]\n import warnings\n warnings._deprecated(\n f\"ast.{name}\",message=_DEPRECATED_CLASS_MESSAGE,remove=(3,14)\n )\n return value\n raise AttributeError(f\"module 'ast' has no attribute '{name}'\")\n \n \ndef main():\n import argparse\n \n parser=argparse.ArgumentParser(prog='python -m ast')\n parser.add_argument('infile',type=argparse.FileType(mode='rb'),nargs='?',\n default='-',\n help='the file to parse; defaults to stdin')\n parser.add_argument('-m','--mode',default='exec',\n choices=('exec','single','eval','func_type'),\n help='specify what kind of code must be parsed')\n parser.add_argument('--no-type-comments',default=True ,action='store_false',\n help=\"don't add information about type comments\")\n parser.add_argument('-a','--include-attributes',action='store_true',\n help='include attributes such as line numbers and '\n 'column offsets')\n parser.add_argument('-i','--indent',type=int,default=3,\n help='indentation of nodes (number of spaces)')\n args=parser.parse_args()\n \n with args.infile as infile:\n source=infile.read()\n tree=parse(source,args.infile.name,args.mode,type_comments=args.no_type_comments)\n print(dump(tree,include_attributes=args.include_attributes,indent=args.indent))\n \nif __name__ =='__main__':\n main()\n", ["_ast", "argparse", "collections", "contextlib", "enum", "inspect", "re", "sys", "warnings"]], "asyncio": [".py", "print('Brython implementation of asyncio is present to avoid ImportError '+\n'in some modules, but does not implement the asyncio features '+\n'because of browser limitations.\\nFor asynchronous programming, use '+\n'browser.aio instead')\n\nALL_COMPLETED=\"\"\"ALL_COMPLETED\"\"\"\n\n\nclass AbstractEventLoop:\n\n __module__=\"\"\"asyncio.events\"\"\"\n \n def _timer_handle_cancelled(*args,**kw):\n pass\n \n def add_reader(*args,**kw):\n pass\n \n def add_signal_handler(*args,**kw):\n pass\n \n def add_writer(*args,**kw):\n pass\n \n def call_at(*args,**kw):\n pass\n \n def call_exception_handler(*args,**kw):\n pass\n \n def call_later(*args,**kw):\n pass\n \n def call_soon(*args,**kw):\n pass\n \n def call_soon_threadsafe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect_accepted_socket(*args,**kw):\n pass\n \n def connect_read_pipe(*args,**kw):\n pass\n \n def connect_write_pipe(*args,**kw):\n pass\n \n def create_connection(*args,**kw):\n pass\n \n def create_datagram_endpoint(*args,**kw):\n pass\n \n def create_future(*args,**kw):\n pass\n \n def create_server(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \n def create_unix_connection(*args,**kw):\n pass\n \n def create_unix_server(*args,**kw):\n pass\n \n def default_exception_handler(*args,**kw):\n pass\n \n def get_debug(*args,**kw):\n pass\n \n def get_exception_handler(*args,**kw):\n pass\n \n def get_task_factory(*args,**kw):\n pass\n \n def getaddrinfo(*args,**kw):\n pass\n \n def getnameinfo(*args,**kw):\n pass\n \n def is_closed(*args,**kw):\n pass\n \n def is_running(*args,**kw):\n pass\n \n def remove_reader(*args,**kw):\n pass\n \n def remove_signal_handler(*args,**kw):\n pass\n \n def remove_writer(*args,**kw):\n pass\n \n def run_forever(*args,**kw):\n pass\n \n def run_in_executor(*args,**kw):\n pass\n \n def run_until_complete(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def set_debug(*args,**kw):\n pass\n \n def set_default_executor(*args,**kw):\n pass\n \n def set_exception_handler(*args,**kw):\n pass\n \n def set_task_factory(*args,**kw):\n pass\n \n def shutdown_asyncgens(*args,**kw):\n pass\n \n def shutdown_default_executor(*args,**kw):\n pass\n \n def sock_accept(*args,**kw):\n pass\n \n def sock_connect(*args,**kw):\n pass\n \n def sock_recv(*args,**kw):\n pass\n \n def sock_recv_into(*args,**kw):\n pass\n \n def sock_recvfrom(*args,**kw):\n pass\n \n def sock_recvfrom_into(*args,**kw):\n pass\n \n def sock_sendall(*args,**kw):\n pass\n \n def sock_sendfile(*args,**kw):\n pass\n \n def sock_sendto(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n def stop(*args,**kw):\n pass\n \n def subprocess_exec(*args,**kw):\n pass\n \n def subprocess_shell(*args,**kw):\n pass\n \n def time(*args,**kw):\n pass\n \nclass AbstractEventLoopPolicy:\n\n __module__=\"\"\"asyncio.events\"\"\"\n \n def get_child_watcher(*args,**kw):\n pass\n \n def get_event_loop(*args,**kw):\n pass\n \n def new_event_loop(*args,**kw):\n pass\n \n def set_child_watcher(*args,**kw):\n pass\n \n def set_event_loop(*args,**kw):\n pass\n \nclass AbstractServer:\n\n __module__=\"\"\"asyncio.events\"\"\"\n \n def close(*args,**kw):\n pass\n \n def get_loop(*args,**kw):\n pass\n \n def is_serving(*args,**kw):\n pass\n \n def serve_forever(*args,**kw):\n pass\n \n def start_serving(*args,**kw):\n pass\n \n def wait_closed(*args,**kw):\n pass\n \nclass Barrier:\n\n __module__=\"\"\"asyncio.locks\"\"\"\n \n def _block(*args,**kw):\n pass\n \n def _exit(*args,**kw):\n pass\n \n def _get_loop(*args,**kw):\n pass\n \n _loop=None\n \n def _release(*args,**kw):\n pass\n \n def _wait(*args,**kw):\n pass\n \n def abort(*args,**kw):\n pass\n \n broken=\"\"\n \n n_waiting=\"\"\n \n parties=\"\"\n \n def reset(*args,**kw):\n pass\n \n def wait(*args,**kw):\n pass\n \nclass BaseEventLoop:\n\n __module__=\"\"\"asyncio.base_events\"\"\"\n \n def _add_callback(*args,**kw):\n pass\n \n def _add_callback_signalsafe(*args,**kw):\n pass\n \n def _asyncgen_finalizer_hook(*args,**kw):\n pass\n \n def _asyncgen_firstiter_hook(*args,**kw):\n pass\n \n def _call_soon(*args,**kw):\n pass\n \n def _check_callback(*args,**kw):\n pass\n \n def _check_closed(*args,**kw):\n pass\n \n def _check_default_executor(*args,**kw):\n pass\n \n def _check_running(*args,**kw):\n pass\n \n def _check_sendfile_params(*args,**kw):\n pass\n \n def _check_thread(*args,**kw):\n pass\n \n def _connect_sock(*args,**kw):\n pass\n \n def _create_connection_transport(*args,**kw):\n pass\n \n def _create_server_getaddrinfo(*args,**kw):\n pass\n \n def _do_shutdown(*args,**kw):\n pass\n \n def _ensure_resolved(*args,**kw):\n pass\n \n def _getaddrinfo_debug(*args,**kw):\n pass\n \n def _log_subprocess(*args,**kw):\n pass\n \n def _make_datagram_transport(*args,**kw):\n pass\n \n def _make_read_pipe_transport(*args,**kw):\n pass\n \n def _make_socket_transport(*args,**kw):\n pass\n \n def _make_ssl_transport(*args,**kw):\n pass\n \n def _make_subprocess_transport(*args,**kw):\n pass\n \n def _make_write_pipe_transport(*args,**kw):\n pass\n \n def _process_events(*args,**kw):\n pass\n \n def _run_once(*args,**kw):\n pass\n \n def _sendfile_fallback(*args,**kw):\n pass\n \n def _sendfile_native(*args,**kw):\n pass\n \n def _set_coroutine_origin_tracking(*args,**kw):\n pass\n \n def _sock_sendfile_fallback(*args,**kw):\n pass\n \n def _sock_sendfile_native(*args,**kw):\n pass\n \n def _timer_handle_cancelled(*args,**kw):\n pass\n \n def _write_to_self(*args,**kw):\n pass\n \n def add_reader(*args,**kw):\n pass\n \n def add_signal_handler(*args,**kw):\n pass\n \n def add_writer(*args,**kw):\n pass\n \n def call_at(*args,**kw):\n pass\n \n def call_exception_handler(*args,**kw):\n pass\n \n def call_later(*args,**kw):\n pass\n \n def call_soon(*args,**kw):\n pass\n \n def call_soon_threadsafe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect_accepted_socket(*args,**kw):\n pass\n \n def connect_read_pipe(*args,**kw):\n pass\n \n def connect_write_pipe(*args,**kw):\n pass\n \n def create_connection(*args,**kw):\n pass\n \n def create_datagram_endpoint(*args,**kw):\n pass\n \n def create_future(*args,**kw):\n pass\n \n def create_server(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \n def create_unix_connection(*args,**kw):\n pass\n \n def create_unix_server(*args,**kw):\n pass\n \n def default_exception_handler(*args,**kw):\n pass\n \n def get_debug(*args,**kw):\n pass\n \n def get_exception_handler(*args,**kw):\n pass\n \n def get_task_factory(*args,**kw):\n pass\n \n def getaddrinfo(*args,**kw):\n pass\n \n def getnameinfo(*args,**kw):\n pass\n \n def is_closed(*args,**kw):\n pass\n \n def is_running(*args,**kw):\n pass\n \n def remove_reader(*args,**kw):\n pass\n \n def remove_signal_handler(*args,**kw):\n pass\n \n def remove_writer(*args,**kw):\n pass\n \n def run_forever(*args,**kw):\n pass\n \n def run_in_executor(*args,**kw):\n pass\n \n def run_until_complete(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def set_debug(*args,**kw):\n pass\n \n def set_default_executor(*args,**kw):\n pass\n \n def set_exception_handler(*args,**kw):\n pass\n \n def set_task_factory(*args,**kw):\n pass\n \n def shutdown_asyncgens(*args,**kw):\n pass\n \n def shutdown_default_executor(*args,**kw):\n pass\n \n def sock_accept(*args,**kw):\n pass\n \n def sock_connect(*args,**kw):\n pass\n \n def sock_recv(*args,**kw):\n pass\n \n def sock_recv_into(*args,**kw):\n pass\n \n def sock_recvfrom(*args,**kw):\n pass\n \n def sock_recvfrom_into(*args,**kw):\n pass\n \n def sock_sendall(*args,**kw):\n pass\n \n def sock_sendfile(*args,**kw):\n pass\n \n def sock_sendto(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n def stop(*args,**kw):\n pass\n \n def subprocess_exec(*args,**kw):\n pass\n \n def subprocess_shell(*args,**kw):\n pass\n \n def time(*args,**kw):\n pass\n \nclass BaseProtocol:\n\n __module__=\"\"\"asyncio.protocols\"\"\"\n \n def connection_lost(*args,**kw):\n pass\n \n def connection_made(*args,**kw):\n pass\n \n def pause_writing(*args,**kw):\n pass\n \n def resume_writing(*args,**kw):\n pass\n \nclass BaseTransport:\n\n __module__=\"\"\"asyncio.transports\"\"\"\n \n _extra=\"\"\n \n def close(*args,**kw):\n pass\n \n def get_extra_info(*args,**kw):\n pass\n \n def get_protocol(*args,**kw):\n pass\n \n def is_closing(*args,**kw):\n pass\n \n def set_protocol(*args,**kw):\n pass\n \nclass BoundedSemaphore:\n\n __module__=\"\"\"asyncio.locks\"\"\"\n \n def _get_loop(*args,**kw):\n pass\n \n _loop=None\n \n def _wake_up_next(*args,**kw):\n pass\n \n def acquire(*args,**kw):\n pass\n \n def locked(*args,**kw):\n pass\n \n def release(*args,**kw):\n pass\n \nclass BrokenBarrierError:\n\n __module__=\"\"\"asyncio.exceptions\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass BufferedProtocol:\n\n __module__=\"\"\"asyncio.protocols\"\"\"\n \n def buffer_updated(*args,**kw):\n pass\n \n def connection_lost(*args,**kw):\n pass\n \n def connection_made(*args,**kw):\n pass\n \n def eof_received(*args,**kw):\n pass\n \n def get_buffer(*args,**kw):\n pass\n \n def pause_writing(*args,**kw):\n pass\n \n def resume_writing(*args,**kw):\n pass\n \nclass CancelledError:\n\n __module__=\"\"\"asyncio.exceptions\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass Condition:\n\n __module__=\"\"\"asyncio.locks\"\"\"\n \n def _get_loop(*args,**kw):\n pass\n \n _loop=None\n \n def notify(*args,**kw):\n pass\n \n def notify_all(*args,**kw):\n pass\n \n def wait(*args,**kw):\n pass\n \n def wait_for(*args,**kw):\n pass\n \nclass DatagramProtocol:\n\n __module__=\"\"\"asyncio.protocols\"\"\"\n \n def connection_lost(*args,**kw):\n pass\n \n def connection_made(*args,**kw):\n pass\n \n def datagram_received(*args,**kw):\n pass\n \n def error_received(*args,**kw):\n pass\n \n def pause_writing(*args,**kw):\n pass\n \n def resume_writing(*args,**kw):\n pass\n \nclass DatagramTransport:\n\n __module__=\"\"\"asyncio.transports\"\"\"\n \n _extra=\"\"\n \n def abort(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def get_extra_info(*args,**kw):\n pass\n \n def get_protocol(*args,**kw):\n pass\n \n def is_closing(*args,**kw):\n pass\n \n def sendto(*args,**kw):\n pass\n \n def set_protocol(*args,**kw):\n pass\n \nclass DefaultEventLoopPolicy:\n\n\n class _Local:\n \n __module__=\"\"\"asyncio.events\"\"\"\n \n _loop=None\n \n _set_called=False\n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n \n class _loop_factory:\n \n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n def _add_callback(*args,**kw):\n pass\n \n def _add_callback_signalsafe(*args,**kw):\n pass\n \n def _asyncgen_finalizer_hook(*args,**kw):\n pass\n \n def _asyncgen_firstiter_hook(*args,**kw):\n pass\n \n def _call_soon(*args,**kw):\n pass\n \n def _check_callback(*args,**kw):\n pass\n \n def _check_closed(*args,**kw):\n pass\n \n def _check_default_executor(*args,**kw):\n pass\n \n def _check_running(*args,**kw):\n pass\n \n def _check_sendfile_params(*args,**kw):\n pass\n \n def _check_thread(*args,**kw):\n pass\n \n def _close_self_pipe(*args,**kw):\n pass\n \n def _connect_sock(*args,**kw):\n pass\n \n def _create_connection_transport(*args,**kw):\n pass\n \n def _create_server_getaddrinfo(*args,**kw):\n pass\n \n def _do_shutdown(*args,**kw):\n pass\n \n def _ensure_resolved(*args,**kw):\n pass\n \n def _getaddrinfo_debug(*args,**kw):\n pass\n \n def _log_subprocess(*args,**kw):\n pass\n \n def _loop_self_reading(*args,**kw):\n pass\n \n def _make_datagram_transport(*args,**kw):\n pass\n \n def _make_duplex_pipe_transport(*args,**kw):\n pass\n \n def _make_read_pipe_transport(*args,**kw):\n pass\n \n def _make_self_pipe(*args,**kw):\n pass\n \n def _make_socket_transport(*args,**kw):\n pass\n \n def _make_ssl_transport(*args,**kw):\n pass\n \n def _make_subprocess_transport(*args,**kw):\n pass\n \n def _make_write_pipe_transport(*args,**kw):\n pass\n \n def _process_events(*args,**kw):\n pass\n \n def _run_once(*args,**kw):\n pass\n \n def _sendfile_fallback(*args,**kw):\n pass\n \n def _sendfile_native(*args,**kw):\n pass\n \n def _set_coroutine_origin_tracking(*args,**kw):\n pass\n \n def _sock_sendfile_fallback(*args,**kw):\n pass\n \n def _sock_sendfile_native(*args,**kw):\n pass\n \n def _start_serving(*args,**kw):\n pass\n \n def _stop_accept_futures(*args,**kw):\n pass\n \n def _stop_serving(*args,**kw):\n pass\n \n def _timer_handle_cancelled(*args,**kw):\n pass\n \n def _write_to_self(*args,**kw):\n pass\n \n def add_reader(*args,**kw):\n pass\n \n def add_signal_handler(*args,**kw):\n pass\n \n def add_writer(*args,**kw):\n pass\n \n def call_at(*args,**kw):\n pass\n \n def call_exception_handler(*args,**kw):\n pass\n \n def call_later(*args,**kw):\n pass\n \n def call_soon(*args,**kw):\n pass\n \n def call_soon_threadsafe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect_accepted_socket(*args,**kw):\n pass\n \n def connect_read_pipe(*args,**kw):\n pass\n \n def connect_write_pipe(*args,**kw):\n pass\n \n def create_connection(*args,**kw):\n pass\n \n def create_datagram_endpoint(*args,**kw):\n pass\n \n def create_future(*args,**kw):\n pass\n \n def create_pipe_connection(*args,**kw):\n pass\n \n def create_server(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \n def create_unix_connection(*args,**kw):\n pass\n \n def create_unix_server(*args,**kw):\n pass\n \n def default_exception_handler(*args,**kw):\n pass\n \n def get_debug(*args,**kw):\n pass\n \n def get_exception_handler(*args,**kw):\n pass\n \n def get_task_factory(*args,**kw):\n pass\n \n def getaddrinfo(*args,**kw):\n pass\n \n def getnameinfo(*args,**kw):\n pass\n \n def is_closed(*args,**kw):\n pass\n \n def is_running(*args,**kw):\n pass\n \n def remove_reader(*args,**kw):\n pass\n \n def remove_signal_handler(*args,**kw):\n pass\n \n def remove_writer(*args,**kw):\n pass\n \n def run_forever(*args,**kw):\n pass\n \n def run_in_executor(*args,**kw):\n pass\n \n def run_until_complete(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def set_debug(*args,**kw):\n pass\n \n def set_default_executor(*args,**kw):\n pass\n \n def set_exception_handler(*args,**kw):\n pass\n \n def set_task_factory(*args,**kw):\n pass\n \n def shutdown_asyncgens(*args,**kw):\n pass\n \n def shutdown_default_executor(*args,**kw):\n pass\n \n def sock_accept(*args,**kw):\n pass\n \n def sock_connect(*args,**kw):\n pass\n \n def sock_recv(*args,**kw):\n pass\n \n def sock_recv_into(*args,**kw):\n pass\n \n def sock_recvfrom(*args,**kw):\n pass\n \n def sock_recvfrom_into(*args,**kw):\n pass\n \n def sock_sendall(*args,**kw):\n pass\n \n def sock_sendfile(*args,**kw):\n pass\n \n def sock_sendto(*args,**kw):\n pass\n \n def start_serving_pipe(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n def stop(*args,**kw):\n pass\n \n def subprocess_exec(*args,**kw):\n pass\n \n def subprocess_shell(*args,**kw):\n pass\n \n def time(*args,**kw):\n pass\n def get_child_watcher(*args,**kw):\n pass\n \n def get_event_loop(*args,**kw):\n pass\n \n def new_event_loop(*args,**kw):\n pass\n \n def set_child_watcher(*args,**kw):\n pass\n \n def set_event_loop(*args,**kw):\n pass\n \nclass Event:\n\n __module__=\"\"\"asyncio.locks\"\"\"\n \n def _get_loop(*args,**kw):\n pass\n \n _loop=None\n \n def clear(*args,**kw):\n pass\n \n def is_set(*args,**kw):\n pass\n \n def set(*args,**kw):\n pass\n \n def wait(*args,**kw):\n pass\nFIRST_COMPLETED=\"\"\"FIRST_COMPLETED\"\"\"\n\nFIRST_EXCEPTION=\"\"\"FIRST_EXCEPTION\"\"\"\n\n\nclass Future:\n\n _asyncio_future_blocking=\"\"\n \n _callbacks=\"\"\n \n _cancel_message=\"\"\n \n _exception=\"\"\n \n _log_traceback=\"\"\n \n _loop=\"\"\n \n _make_cancelled_error=\"\"\n \n _result=\"\"\n \n _source_traceback=\"\"\n \n _state=\"\"\n \n add_done_callback=\"\"\n \n cancel=\"\"\n \n cancelled=\"\"\n \n done=\"\"\n \n exception=\"\"\n \n get_loop=\"\"\n \n remove_done_callback=\"\"\n \n result=\"\"\n \n set_exception=\"\"\n \n set_result=\"\"\n \nclass Handle:\n\n __module__=\"\"\"asyncio.events\"\"\"\n \n _args=\"\"\n \n _callback=\"\"\n \n _cancelled=\"\"\n \n _context=\"\"\n \n _loop=\"\"\n \n _repr=\"\"\n \n def _repr_info(*args,**kw):\n pass\n \n def _run(*args,**kw):\n pass\n \n _source_traceback=\"\"\n \n def cancel(*args,**kw):\n pass\n \n def cancelled(*args,**kw):\n pass\n \nclass IncompleteReadError:\n\n __module__=\"\"\"asyncio.exceptions\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass InvalidStateError:\n\n __module__=\"\"\"asyncio.exceptions\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass IocpProactor:\n\n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n def _check_closed(*args,**kw):\n pass\n \n def _get_accept_socket(*args,**kw):\n pass\n \n def _poll(*args,**kw):\n pass\n \n def _register(*args,**kw):\n pass\n \n def _register_with_iocp(*args,**kw):\n pass\n \n def _result(*args,**kw):\n pass\n \n def _stop_serving(*args,**kw):\n pass\n \n def _unregister(*args,**kw):\n pass\n \n def _wait_cancel(*args,**kw):\n pass\n \n def _wait_for_handle(*args,**kw):\n pass\n \n def accept(*args,**kw):\n pass\n \n def accept_pipe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect(*args,**kw):\n pass\n \n def connect_pipe(*args,**kw):\n pass\n \n def recv(*args,**kw):\n pass\n \n def recv_into(*args,**kw):\n pass\n \n def recvfrom(*args,**kw):\n pass\n \n def recvfrom_into(*args,**kw):\n pass\n \n def select(*args,**kw):\n pass\n \n def send(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def sendto(*args,**kw):\n pass\n \n def set_loop(*args,**kw):\n pass\n \n def wait_for_handle(*args,**kw):\n pass\n \nclass LifoQueue:\n\n __module__=\"\"\"asyncio.queues\"\"\"\n \n def _format(*args,**kw):\n pass\n \n def _get(*args,**kw):\n pass\n \n def _get_loop(*args,**kw):\n pass\n \n def _init(*args,**kw):\n pass\n \n _loop=None\n \n def _put(*args,**kw):\n pass\n \n def _wakeup_next(*args,**kw):\n pass\n \n def empty(*args,**kw):\n pass\n \n def full(*args,**kw):\n pass\n \n def get(*args,**kw):\n pass\n \n def get_nowait(*args,**kw):\n pass\n \n def join(*args,**kw):\n pass\n \n maxsize=\"\"\n \n def put(*args,**kw):\n pass\n \n def put_nowait(*args,**kw):\n pass\n \n def qsize(*args,**kw):\n pass\n \n def task_done(*args,**kw):\n pass\n \nclass LimitOverrunError:\n\n __module__=\"\"\"asyncio.exceptions\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass Lock:\n\n __module__=\"\"\"asyncio.locks\"\"\"\n \n def _get_loop(*args,**kw):\n pass\n \n _loop=None\n \n def _wake_up_first(*args,**kw):\n pass\n \n def acquire(*args,**kw):\n pass\n \n def locked(*args,**kw):\n pass\n \n def release(*args,**kw):\n pass\n \nclass PriorityQueue:\n\n __module__=\"\"\"asyncio.queues\"\"\"\n \n def _format(*args,**kw):\n pass\n \n def _get(*args,**kw):\n pass\n \n def _get_loop(*args,**kw):\n pass\n \n def _init(*args,**kw):\n pass\n \n _loop=None\n \n def _put(*args,**kw):\n pass\n \n def _wakeup_next(*args,**kw):\n pass\n \n def empty(*args,**kw):\n pass\n \n def full(*args,**kw):\n pass\n \n def get(*args,**kw):\n pass\n \n def get_nowait(*args,**kw):\n pass\n \n def join(*args,**kw):\n pass\n \n maxsize=\"\"\n \n def put(*args,**kw):\n pass\n \n def put_nowait(*args,**kw):\n pass\n \n def qsize(*args,**kw):\n pass\n \n def task_done(*args,**kw):\n pass\n \nclass ProactorEventLoop:\n\n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n def _add_callback(*args,**kw):\n pass\n \n def _add_callback_signalsafe(*args,**kw):\n pass\n \n def _asyncgen_finalizer_hook(*args,**kw):\n pass\n \n def _asyncgen_firstiter_hook(*args,**kw):\n pass\n \n def _call_soon(*args,**kw):\n pass\n \n def _check_callback(*args,**kw):\n pass\n \n def _check_closed(*args,**kw):\n pass\n \n def _check_default_executor(*args,**kw):\n pass\n \n def _check_running(*args,**kw):\n pass\n \n def _check_sendfile_params(*args,**kw):\n pass\n \n def _check_thread(*args,**kw):\n pass\n \n def _close_self_pipe(*args,**kw):\n pass\n \n def _connect_sock(*args,**kw):\n pass\n \n def _create_connection_transport(*args,**kw):\n pass\n \n def _create_server_getaddrinfo(*args,**kw):\n pass\n \n def _do_shutdown(*args,**kw):\n pass\n \n def _ensure_resolved(*args,**kw):\n pass\n \n def _getaddrinfo_debug(*args,**kw):\n pass\n \n def _log_subprocess(*args,**kw):\n pass\n \n def _loop_self_reading(*args,**kw):\n pass\n \n def _make_datagram_transport(*args,**kw):\n pass\n \n def _make_duplex_pipe_transport(*args,**kw):\n pass\n \n def _make_read_pipe_transport(*args,**kw):\n pass\n \n def _make_self_pipe(*args,**kw):\n pass\n \n def _make_socket_transport(*args,**kw):\n pass\n \n def _make_ssl_transport(*args,**kw):\n pass\n \n def _make_subprocess_transport(*args,**kw):\n pass\n \n def _make_write_pipe_transport(*args,**kw):\n pass\n \n def _process_events(*args,**kw):\n pass\n \n def _run_once(*args,**kw):\n pass\n \n def _sendfile_fallback(*args,**kw):\n pass\n \n def _sendfile_native(*args,**kw):\n pass\n \n def _set_coroutine_origin_tracking(*args,**kw):\n pass\n \n def _sock_sendfile_fallback(*args,**kw):\n pass\n \n def _sock_sendfile_native(*args,**kw):\n pass\n \n def _start_serving(*args,**kw):\n pass\n \n def _stop_accept_futures(*args,**kw):\n pass\n \n def _stop_serving(*args,**kw):\n pass\n \n def _timer_handle_cancelled(*args,**kw):\n pass\n \n def _write_to_self(*args,**kw):\n pass\n \n def add_reader(*args,**kw):\n pass\n \n def add_signal_handler(*args,**kw):\n pass\n \n def add_writer(*args,**kw):\n pass\n \n def call_at(*args,**kw):\n pass\n \n def call_exception_handler(*args,**kw):\n pass\n \n def call_later(*args,**kw):\n pass\n \n def call_soon(*args,**kw):\n pass\n \n def call_soon_threadsafe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect_accepted_socket(*args,**kw):\n pass\n \n def connect_read_pipe(*args,**kw):\n pass\n \n def connect_write_pipe(*args,**kw):\n pass\n \n def create_connection(*args,**kw):\n pass\n \n def create_datagram_endpoint(*args,**kw):\n pass\n \n def create_future(*args,**kw):\n pass\n \n def create_pipe_connection(*args,**kw):\n pass\n \n def create_server(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \n def create_unix_connection(*args,**kw):\n pass\n \n def create_unix_server(*args,**kw):\n pass\n \n def default_exception_handler(*args,**kw):\n pass\n \n def get_debug(*args,**kw):\n pass\n \n def get_exception_handler(*args,**kw):\n pass\n \n def get_task_factory(*args,**kw):\n pass\n \n def getaddrinfo(*args,**kw):\n pass\n \n def getnameinfo(*args,**kw):\n pass\n \n def is_closed(*args,**kw):\n pass\n \n def is_running(*args,**kw):\n pass\n \n def remove_reader(*args,**kw):\n pass\n \n def remove_signal_handler(*args,**kw):\n pass\n \n def remove_writer(*args,**kw):\n pass\n \n def run_forever(*args,**kw):\n pass\n \n def run_in_executor(*args,**kw):\n pass\n \n def run_until_complete(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def set_debug(*args,**kw):\n pass\n \n def set_default_executor(*args,**kw):\n pass\n \n def set_exception_handler(*args,**kw):\n pass\n \n def set_task_factory(*args,**kw):\n pass\n \n def shutdown_asyncgens(*args,**kw):\n pass\n \n def shutdown_default_executor(*args,**kw):\n pass\n \n def sock_accept(*args,**kw):\n pass\n \n def sock_connect(*args,**kw):\n pass\n \n def sock_recv(*args,**kw):\n pass\n \n def sock_recv_into(*args,**kw):\n pass\n \n def sock_recvfrom(*args,**kw):\n pass\n \n def sock_recvfrom_into(*args,**kw):\n pass\n \n def sock_sendall(*args,**kw):\n pass\n \n def sock_sendfile(*args,**kw):\n pass\n \n def sock_sendto(*args,**kw):\n pass\n \n def start_serving_pipe(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n def stop(*args,**kw):\n pass\n \n def subprocess_exec(*args,**kw):\n pass\n \n def subprocess_shell(*args,**kw):\n pass\n \n def time(*args,**kw):\n pass\n \nclass Protocol:\n\n __module__=\"\"\"asyncio.protocols\"\"\"\n \n def connection_lost(*args,**kw):\n pass\n \n def connection_made(*args,**kw):\n pass\n \n def data_received(*args,**kw):\n pass\n \n def eof_received(*args,**kw):\n pass\n \n def pause_writing(*args,**kw):\n pass\n \n def resume_writing(*args,**kw):\n pass\n \nclass Queue:\n\n __module__=\"\"\"asyncio.queues\"\"\"\n \n def _format(*args,**kw):\n pass\n \n def _get(*args,**kw):\n pass\n \n def _get_loop(*args,**kw):\n pass\n \n def _init(*args,**kw):\n pass\n \n _loop=None\n \n def _put(*args,**kw):\n pass\n \n def _wakeup_next(*args,**kw):\n pass\n \n def empty(*args,**kw):\n pass\n \n def full(*args,**kw):\n pass\n \n def get(*args,**kw):\n pass\n \n def get_nowait(*args,**kw):\n pass\n \n def join(*args,**kw):\n pass\n \n maxsize=\"\"\n \n def put(*args,**kw):\n pass\n \n def put_nowait(*args,**kw):\n pass\n \n def qsize(*args,**kw):\n pass\n \n def task_done(*args,**kw):\n pass\n \nclass QueueEmpty:\n\n __module__=\"\"\"asyncio.queues\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass QueueFull:\n\n __module__=\"\"\"asyncio.queues\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass ReadTransport:\n\n __module__=\"\"\"asyncio.transports\"\"\"\n \n _extra=\"\"\n \n def close(*args,**kw):\n pass\n \n def get_extra_info(*args,**kw):\n pass\n \n def get_protocol(*args,**kw):\n pass\n \n def is_closing(*args,**kw):\n pass\n \n def is_reading(*args,**kw):\n pass\n \n def pause_reading(*args,**kw):\n pass\n \n def resume_reading(*args,**kw):\n pass\n \n def set_protocol(*args,**kw):\n pass\n \nclass Runner:\n\n __module__=\"\"\"asyncio.runners\"\"\"\n \n def _lazy_init(*args,**kw):\n pass\n \n def _on_sigint(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def get_loop(*args,**kw):\n pass\n \n def run(*args,**kw):\n pass\n \nclass SelectorEventLoop:\n\n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n def _accept_connection(*args,**kw):\n pass\n \n def _accept_connection2(*args,**kw):\n pass\n \n def _add_callback(*args,**kw):\n pass\n \n def _add_callback_signalsafe(*args,**kw):\n pass\n \n def _add_reader(*args,**kw):\n pass\n \n def _add_writer(*args,**kw):\n pass\n \n def _asyncgen_finalizer_hook(*args,**kw):\n pass\n \n def _asyncgen_firstiter_hook(*args,**kw):\n pass\n \n def _call_soon(*args,**kw):\n pass\n \n def _check_callback(*args,**kw):\n pass\n \n def _check_closed(*args,**kw):\n pass\n \n def _check_default_executor(*args,**kw):\n pass\n \n def _check_running(*args,**kw):\n pass\n \n def _check_sendfile_params(*args,**kw):\n pass\n \n def _check_thread(*args,**kw):\n pass\n \n def _close_self_pipe(*args,**kw):\n pass\n \n def _connect_sock(*args,**kw):\n pass\n \n def _create_connection_transport(*args,**kw):\n pass\n \n def _create_server_getaddrinfo(*args,**kw):\n pass\n \n def _do_shutdown(*args,**kw):\n pass\n \n def _ensure_fd_no_transport(*args,**kw):\n pass\n \n def _ensure_resolved(*args,**kw):\n pass\n \n def _getaddrinfo_debug(*args,**kw):\n pass\n \n def _log_subprocess(*args,**kw):\n pass\n \n def _make_datagram_transport(*args,**kw):\n pass\n \n def _make_read_pipe_transport(*args,**kw):\n pass\n \n def _make_self_pipe(*args,**kw):\n pass\n \n def _make_socket_transport(*args,**kw):\n pass\n \n def _make_ssl_transport(*args,**kw):\n pass\n \n def _make_subprocess_transport(*args,**kw):\n pass\n \n def _make_write_pipe_transport(*args,**kw):\n pass\n \n def _process_events(*args,**kw):\n pass\n \n def _process_self_data(*args,**kw):\n pass\n \n def _read_from_self(*args,**kw):\n pass\n \n def _remove_reader(*args,**kw):\n pass\n \n def _remove_writer(*args,**kw):\n pass\n \n def _run_once(*args,**kw):\n pass\n \n def _sendfile_fallback(*args,**kw):\n pass\n \n def _sendfile_native(*args,**kw):\n pass\n \n def _set_coroutine_origin_tracking(*args,**kw):\n pass\n \n def _sock_accept(*args,**kw):\n pass\n \n def _sock_connect(*args,**kw):\n pass\n \n def _sock_connect_cb(*args,**kw):\n pass\n \n def _sock_read_done(*args,**kw):\n pass\n \n def _sock_recv(*args,**kw):\n pass\n \n def _sock_recv_into(*args,**kw):\n pass\n \n def _sock_recvfrom(*args,**kw):\n pass\n \n def _sock_recvfrom_into(*args,**kw):\n pass\n \n def _sock_sendall(*args,**kw):\n pass\n \n def _sock_sendfile_fallback(*args,**kw):\n pass\n \n def _sock_sendfile_native(*args,**kw):\n pass\n \n def _sock_sendto(*args,**kw):\n pass\n \n def _sock_write_done(*args,**kw):\n pass\n \n def _start_serving(*args,**kw):\n pass\n \n def _stop_serving(*args,**kw):\n pass\n \n def _timer_handle_cancelled(*args,**kw):\n pass\n \n def _write_to_self(*args,**kw):\n pass\n \n def add_reader(*args,**kw):\n pass\n \n def add_signal_handler(*args,**kw):\n pass\n \n def add_writer(*args,**kw):\n pass\n \n def call_at(*args,**kw):\n pass\n \n def call_exception_handler(*args,**kw):\n pass\n \n def call_later(*args,**kw):\n pass\n \n def call_soon(*args,**kw):\n pass\n \n def call_soon_threadsafe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect_accepted_socket(*args,**kw):\n pass\n \n def connect_read_pipe(*args,**kw):\n pass\n \n def connect_write_pipe(*args,**kw):\n pass\n \n def create_connection(*args,**kw):\n pass\n \n def create_datagram_endpoint(*args,**kw):\n pass\n \n def create_future(*args,**kw):\n pass\n \n def create_server(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \n def create_unix_connection(*args,**kw):\n pass\n \n def create_unix_server(*args,**kw):\n pass\n \n def default_exception_handler(*args,**kw):\n pass\n \n def get_debug(*args,**kw):\n pass\n \n def get_exception_handler(*args,**kw):\n pass\n \n def get_task_factory(*args,**kw):\n pass\n \n def getaddrinfo(*args,**kw):\n pass\n \n def getnameinfo(*args,**kw):\n pass\n \n def is_closed(*args,**kw):\n pass\n \n def is_running(*args,**kw):\n pass\n \n def remove_reader(*args,**kw):\n pass\n \n def remove_signal_handler(*args,**kw):\n pass\n \n def remove_writer(*args,**kw):\n pass\n \n def run_forever(*args,**kw):\n pass\n \n def run_in_executor(*args,**kw):\n pass\n \n def run_until_complete(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def set_debug(*args,**kw):\n pass\n \n def set_default_executor(*args,**kw):\n pass\n \n def set_exception_handler(*args,**kw):\n pass\n \n def set_task_factory(*args,**kw):\n pass\n \n def shutdown_asyncgens(*args,**kw):\n pass\n \n def shutdown_default_executor(*args,**kw):\n pass\n \n def sock_accept(*args,**kw):\n pass\n \n def sock_connect(*args,**kw):\n pass\n \n def sock_recv(*args,**kw):\n pass\n \n def sock_recv_into(*args,**kw):\n pass\n \n def sock_recvfrom(*args,**kw):\n pass\n \n def sock_recvfrom_into(*args,**kw):\n pass\n \n def sock_sendall(*args,**kw):\n pass\n \n def sock_sendfile(*args,**kw):\n pass\n \n def sock_sendto(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n def stop(*args,**kw):\n pass\n \n def subprocess_exec(*args,**kw):\n pass\n \n def subprocess_shell(*args,**kw):\n pass\n \n def time(*args,**kw):\n pass\n \nclass Semaphore:\n\n __module__=\"\"\"asyncio.locks\"\"\"\n \n def _get_loop(*args,**kw):\n pass\n \n _loop=None\n \n def _wake_up_next(*args,**kw):\n pass\n \n def acquire(*args,**kw):\n pass\n \n def locked(*args,**kw):\n pass\n \n def release(*args,**kw):\n pass\n \nclass SendfileNotAvailableError:\n\n __module__=\"\"\"asyncio.exceptions\"\"\"\n \n add_note=\"\"\n \n args=\"\"\n \n with_traceback=\"\"\n \nclass Server:\n\n __module__=\"\"\"asyncio.base_events\"\"\"\n \n def _attach(*args,**kw):\n pass\n \n def _detach(*args,**kw):\n pass\n \n def _start_serving(*args,**kw):\n pass\n \n def _wakeup(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def get_loop(*args,**kw):\n pass\n \n def is_serving(*args,**kw):\n pass\n \n def serve_forever(*args,**kw):\n pass\n \n sockets=\"\"\n \n def start_serving(*args,**kw):\n pass\n \n def wait_closed(*args,**kw):\n pass\n \nclass StreamReader:\n\n __module__=\"\"\"asyncio.streams\"\"\"\n \n def _maybe_resume_transport(*args,**kw):\n pass\n \n _source_traceback=None\n \n def _wait_for_data(*args,**kw):\n pass\n \n def _wakeup_waiter(*args,**kw):\n pass\n \n def at_eof(*args,**kw):\n pass\n \n def exception(*args,**kw):\n pass\n \n def feed_data(*args,**kw):\n pass\n \n def feed_eof(*args,**kw):\n pass\n \n def read(*args,**kw):\n pass\n \n def readexactly(*args,**kw):\n pass\n \n def readline(*args,**kw):\n pass\n \n def readuntil(*args,**kw):\n pass\n \n def set_exception(*args,**kw):\n pass\n \n def set_transport(*args,**kw):\n pass\n \nclass StreamReaderProtocol:\n\n __module__=\"\"\"asyncio.streams\"\"\"\n \n def _drain_helper(*args,**kw):\n pass\n \n def _get_close_waiter(*args,**kw):\n pass\n \n def _replace_writer(*args,**kw):\n pass\n \n _source_traceback=None\n \n _stream_reader=\"\"\n \n def connection_lost(*args,**kw):\n pass\n \n def connection_made(*args,**kw):\n pass\n \n def data_received(*args,**kw):\n pass\n \n def eof_received(*args,**kw):\n pass\n \n def pause_writing(*args,**kw):\n pass\n \n def resume_writing(*args,**kw):\n pass\n \nclass StreamWriter:\n\n __module__=\"\"\"asyncio.streams\"\"\"\n \n def can_write_eof(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def drain(*args,**kw):\n pass\n \n def get_extra_info(*args,**kw):\n pass\n \n def is_closing(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n transport=\"\"\n \n def wait_closed(*args,**kw):\n pass\n \n def write(*args,**kw):\n pass\n \n def write_eof(*args,**kw):\n pass\n \n def writelines(*args,**kw):\n pass\n \nclass SubprocessProtocol:\n\n __module__=\"\"\"asyncio.protocols\"\"\"\n \n def connection_lost(*args,**kw):\n pass\n \n def connection_made(*args,**kw):\n pass\n \n def pause_writing(*args,**kw):\n pass\n \n def pipe_connection_lost(*args,**kw):\n pass\n \n def pipe_data_received(*args,**kw):\n pass\n \n def process_exited(*args,**kw):\n pass\n \n def resume_writing(*args,**kw):\n pass\n \nclass SubprocessTransport:\n\n __module__=\"\"\"asyncio.transports\"\"\"\n \n _extra=\"\"\n \n def close(*args,**kw):\n pass\n \n def get_extra_info(*args,**kw):\n pass\n \n def get_pid(*args,**kw):\n pass\n \n def get_pipe_transport(*args,**kw):\n pass\n \n def get_protocol(*args,**kw):\n pass\n \n def get_returncode(*args,**kw):\n pass\n \n def is_closing(*args,**kw):\n pass\n \n def kill(*args,**kw):\n pass\n \n def send_signal(*args,**kw):\n pass\n \n def set_protocol(*args,**kw):\n pass\n \n def terminate(*args,**kw):\n pass\n \nclass Task:\n\n _asyncio_future_blocking=\"\"\n \n _callbacks=\"\"\n \n _cancel_message=\"\"\n \n _check_future=\"\"\n \n _coro=\"\"\n \n _exception=\"\"\n \n _fut_waiter=\"\"\n \n _log_destroy_pending=\"\"\n \n _log_traceback=\"\"\n \n _loop=\"\"\n \n _make_cancelled_error=\"\"\n \n _must_cancel=\"\"\n \n _result=\"\"\n \n _source_traceback=\"\"\n \n _state=\"\"\n \n add_done_callback=\"\"\n \n cancel=\"\"\n \n cancelled=\"\"\n \n cancelling=\"\"\n \n done=\"\"\n \n exception=\"\"\n \n get_coro=\"\"\n \n get_loop=\"\"\n \n get_name=\"\"\n \n get_stack=\"\"\n \n print_stack=\"\"\n \n remove_done_callback=\"\"\n \n result=\"\"\n \n set_exception=\"\"\n \n set_name=\"\"\n \n set_result=\"\"\n \n uncancel=\"\"\n \nclass TaskGroup:\n\n __module__=\"\"\"asyncio.taskgroups\"\"\"\n \n def _abort(*args,**kw):\n pass\n \n def _is_base_error(*args,**kw):\n pass\n \n def _on_task_done(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \nclass Timeout:\n\n __module__=\"\"\"asyncio.timeouts\"\"\"\n \n def _on_timeout(*args,**kw):\n pass\n \n def expired(*args,**kw):\n pass\n \n def reschedule(*args,**kw):\n pass\n \n def when(*args,**kw):\n pass\n \nclass TimeoutError:\n\n add_note=\"\"\n \n args=\"\"\n \n characters_written=\"\"\n \n errno=\"\"\n \n filename=\"\"\n \n filename2=\"\"\n \n strerror=\"\"\n \n winerror=\"\"\n \n with_traceback=\"\"\n \nclass TimerHandle:\n\n __module__=\"\"\"asyncio.events\"\"\"\n \n _args=\"\"\n \n _callback=\"\"\n \n _cancelled=\"\"\n \n _context=\"\"\n \n _loop=\"\"\n \n _repr=\"\"\n \n def _repr_info(*args,**kw):\n pass\n \n def _run(*args,**kw):\n pass\n \n _scheduled=\"\"\n \n _source_traceback=\"\"\n \n _when=\"\"\n \n def cancel(*args,**kw):\n pass\n \n def cancelled(*args,**kw):\n pass\n \n def when(*args,**kw):\n pass\n \nclass Transport:\n\n __module__=\"\"\"asyncio.transports\"\"\"\n \n _extra=\"\"\n \n def abort(*args,**kw):\n pass\n \n def can_write_eof(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def get_extra_info(*args,**kw):\n pass\n \n def get_protocol(*args,**kw):\n pass\n \n def get_write_buffer_limits(*args,**kw):\n pass\n \n def get_write_buffer_size(*args,**kw):\n pass\n \n def is_closing(*args,**kw):\n pass\n \n def is_reading(*args,**kw):\n pass\n \n def pause_reading(*args,**kw):\n pass\n \n def resume_reading(*args,**kw):\n pass\n \n def set_protocol(*args,**kw):\n pass\n \n def set_write_buffer_limits(*args,**kw):\n pass\n \n def write(*args,**kw):\n pass\n \n def write_eof(*args,**kw):\n pass\n \n def writelines(*args,**kw):\n pass\n \nclass WindowsProactorEventLoopPolicy:\n\n\n class _Local:\n \n __module__=\"\"\"asyncio.events\"\"\"\n \n _loop=None\n \n _set_called=False\n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n \n class _loop_factory:\n \n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n def _add_callback(*args,**kw):\n pass\n \n def _add_callback_signalsafe(*args,**kw):\n pass\n \n def _asyncgen_finalizer_hook(*args,**kw):\n pass\n \n def _asyncgen_firstiter_hook(*args,**kw):\n pass\n \n def _call_soon(*args,**kw):\n pass\n \n def _check_callback(*args,**kw):\n pass\n \n def _check_closed(*args,**kw):\n pass\n \n def _check_default_executor(*args,**kw):\n pass\n \n def _check_running(*args,**kw):\n pass\n \n def _check_sendfile_params(*args,**kw):\n pass\n \n def _check_thread(*args,**kw):\n pass\n \n def _close_self_pipe(*args,**kw):\n pass\n \n def _connect_sock(*args,**kw):\n pass\n \n def _create_connection_transport(*args,**kw):\n pass\n \n def _create_server_getaddrinfo(*args,**kw):\n pass\n \n def _do_shutdown(*args,**kw):\n pass\n \n def _ensure_resolved(*args,**kw):\n pass\n \n def _getaddrinfo_debug(*args,**kw):\n pass\n \n def _log_subprocess(*args,**kw):\n pass\n \n def _loop_self_reading(*args,**kw):\n pass\n \n def _make_datagram_transport(*args,**kw):\n pass\n \n def _make_duplex_pipe_transport(*args,**kw):\n pass\n \n def _make_read_pipe_transport(*args,**kw):\n pass\n \n def _make_self_pipe(*args,**kw):\n pass\n \n def _make_socket_transport(*args,**kw):\n pass\n \n def _make_ssl_transport(*args,**kw):\n pass\n \n def _make_subprocess_transport(*args,**kw):\n pass\n \n def _make_write_pipe_transport(*args,**kw):\n pass\n \n def _process_events(*args,**kw):\n pass\n \n def _run_once(*args,**kw):\n pass\n \n def _sendfile_fallback(*args,**kw):\n pass\n \n def _sendfile_native(*args,**kw):\n pass\n \n def _set_coroutine_origin_tracking(*args,**kw):\n pass\n \n def _sock_sendfile_fallback(*args,**kw):\n pass\n \n def _sock_sendfile_native(*args,**kw):\n pass\n \n def _start_serving(*args,**kw):\n pass\n \n def _stop_accept_futures(*args,**kw):\n pass\n \n def _stop_serving(*args,**kw):\n pass\n \n def _timer_handle_cancelled(*args,**kw):\n pass\n \n def _write_to_self(*args,**kw):\n pass\n \n def add_reader(*args,**kw):\n pass\n \n def add_signal_handler(*args,**kw):\n pass\n \n def add_writer(*args,**kw):\n pass\n \n def call_at(*args,**kw):\n pass\n \n def call_exception_handler(*args,**kw):\n pass\n \n def call_later(*args,**kw):\n pass\n \n def call_soon(*args,**kw):\n pass\n \n def call_soon_threadsafe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect_accepted_socket(*args,**kw):\n pass\n \n def connect_read_pipe(*args,**kw):\n pass\n \n def connect_write_pipe(*args,**kw):\n pass\n \n def create_connection(*args,**kw):\n pass\n \n def create_datagram_endpoint(*args,**kw):\n pass\n \n def create_future(*args,**kw):\n pass\n \n def create_pipe_connection(*args,**kw):\n pass\n \n def create_server(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \n def create_unix_connection(*args,**kw):\n pass\n \n def create_unix_server(*args,**kw):\n pass\n \n def default_exception_handler(*args,**kw):\n pass\n \n def get_debug(*args,**kw):\n pass\n \n def get_exception_handler(*args,**kw):\n pass\n \n def get_task_factory(*args,**kw):\n pass\n \n def getaddrinfo(*args,**kw):\n pass\n \n def getnameinfo(*args,**kw):\n pass\n \n def is_closed(*args,**kw):\n pass\n \n def is_running(*args,**kw):\n pass\n \n def remove_reader(*args,**kw):\n pass\n \n def remove_signal_handler(*args,**kw):\n pass\n \n def remove_writer(*args,**kw):\n pass\n \n def run_forever(*args,**kw):\n pass\n \n def run_in_executor(*args,**kw):\n pass\n \n def run_until_complete(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def set_debug(*args,**kw):\n pass\n \n def set_default_executor(*args,**kw):\n pass\n \n def set_exception_handler(*args,**kw):\n pass\n \n def set_task_factory(*args,**kw):\n pass\n \n def shutdown_asyncgens(*args,**kw):\n pass\n \n def shutdown_default_executor(*args,**kw):\n pass\n \n def sock_accept(*args,**kw):\n pass\n \n def sock_connect(*args,**kw):\n pass\n \n def sock_recv(*args,**kw):\n pass\n \n def sock_recv_into(*args,**kw):\n pass\n \n def sock_recvfrom(*args,**kw):\n pass\n \n def sock_recvfrom_into(*args,**kw):\n pass\n \n def sock_sendall(*args,**kw):\n pass\n \n def sock_sendfile(*args,**kw):\n pass\n \n def sock_sendto(*args,**kw):\n pass\n \n def start_serving_pipe(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n def stop(*args,**kw):\n pass\n \n def subprocess_exec(*args,**kw):\n pass\n \n def subprocess_shell(*args,**kw):\n pass\n \n def time(*args,**kw):\n pass\n def get_child_watcher(*args,**kw):\n pass\n \n def get_event_loop(*args,**kw):\n pass\n \n def new_event_loop(*args,**kw):\n pass\n \n def set_child_watcher(*args,**kw):\n pass\n \n def set_event_loop(*args,**kw):\n pass\n \nclass WindowsSelectorEventLoopPolicy:\n\n\n class _Local:\n \n __module__=\"\"\"asyncio.events\"\"\"\n \n _loop=None\n \n _set_called=False\n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n \n class _loop_factory:\n \n __module__=\"\"\"asyncio.windows_events\"\"\"\n \n def _accept_connection(*args,**kw):\n pass\n \n def _accept_connection2(*args,**kw):\n pass\n \n def _add_callback(*args,**kw):\n pass\n \n def _add_callback_signalsafe(*args,**kw):\n pass\n \n def _add_reader(*args,**kw):\n pass\n \n def _add_writer(*args,**kw):\n pass\n \n def _asyncgen_finalizer_hook(*args,**kw):\n pass\n \n def _asyncgen_firstiter_hook(*args,**kw):\n pass\n \n def _call_soon(*args,**kw):\n pass\n \n def _check_callback(*args,**kw):\n pass\n \n def _check_closed(*args,**kw):\n pass\n \n def _check_default_executor(*args,**kw):\n pass\n \n def _check_running(*args,**kw):\n pass\n \n def _check_sendfile_params(*args,**kw):\n pass\n \n def _check_thread(*args,**kw):\n pass\n \n def _close_self_pipe(*args,**kw):\n pass\n \n def _connect_sock(*args,**kw):\n pass\n \n def _create_connection_transport(*args,**kw):\n pass\n \n def _create_server_getaddrinfo(*args,**kw):\n pass\n \n def _do_shutdown(*args,**kw):\n pass\n \n def _ensure_fd_no_transport(*args,**kw):\n pass\n \n def _ensure_resolved(*args,**kw):\n pass\n \n def _getaddrinfo_debug(*args,**kw):\n pass\n \n def _log_subprocess(*args,**kw):\n pass\n \n def _make_datagram_transport(*args,**kw):\n pass\n \n def _make_read_pipe_transport(*args,**kw):\n pass\n \n def _make_self_pipe(*args,**kw):\n pass\n \n def _make_socket_transport(*args,**kw):\n pass\n \n def _make_ssl_transport(*args,**kw):\n pass\n \n def _make_subprocess_transport(*args,**kw):\n pass\n \n def _make_write_pipe_transport(*args,**kw):\n pass\n \n def _process_events(*args,**kw):\n pass\n \n def _process_self_data(*args,**kw):\n pass\n \n def _read_from_self(*args,**kw):\n pass\n \n def _remove_reader(*args,**kw):\n pass\n \n def _remove_writer(*args,**kw):\n pass\n \n def _run_once(*args,**kw):\n pass\n \n def _sendfile_fallback(*args,**kw):\n pass\n \n def _sendfile_native(*args,**kw):\n pass\n \n def _set_coroutine_origin_tracking(*args,**kw):\n pass\n \n def _sock_accept(*args,**kw):\n pass\n \n def _sock_connect(*args,**kw):\n pass\n \n def _sock_connect_cb(*args,**kw):\n pass\n \n def _sock_read_done(*args,**kw):\n pass\n \n def _sock_recv(*args,**kw):\n pass\n \n def _sock_recv_into(*args,**kw):\n pass\n \n def _sock_recvfrom(*args,**kw):\n pass\n \n def _sock_recvfrom_into(*args,**kw):\n pass\n \n def _sock_sendall(*args,**kw):\n pass\n \n def _sock_sendfile_fallback(*args,**kw):\n pass\n \n def _sock_sendfile_native(*args,**kw):\n pass\n \n def _sock_sendto(*args,**kw):\n pass\n \n def _sock_write_done(*args,**kw):\n pass\n \n def _start_serving(*args,**kw):\n pass\n \n def _stop_serving(*args,**kw):\n pass\n \n def _timer_handle_cancelled(*args,**kw):\n pass\n \n def _write_to_self(*args,**kw):\n pass\n \n def add_reader(*args,**kw):\n pass\n \n def add_signal_handler(*args,**kw):\n pass\n \n def add_writer(*args,**kw):\n pass\n \n def call_at(*args,**kw):\n pass\n \n def call_exception_handler(*args,**kw):\n pass\n \n def call_later(*args,**kw):\n pass\n \n def call_soon(*args,**kw):\n pass\n \n def call_soon_threadsafe(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def connect_accepted_socket(*args,**kw):\n pass\n \n def connect_read_pipe(*args,**kw):\n pass\n \n def connect_write_pipe(*args,**kw):\n pass\n \n def create_connection(*args,**kw):\n pass\n \n def create_datagram_endpoint(*args,**kw):\n pass\n \n def create_future(*args,**kw):\n pass\n \n def create_server(*args,**kw):\n pass\n \n def create_task(*args,**kw):\n pass\n \n def create_unix_connection(*args,**kw):\n pass\n \n def create_unix_server(*args,**kw):\n pass\n \n def default_exception_handler(*args,**kw):\n pass\n \n def get_debug(*args,**kw):\n pass\n \n def get_exception_handler(*args,**kw):\n pass\n \n def get_task_factory(*args,**kw):\n pass\n \n def getaddrinfo(*args,**kw):\n pass\n \n def getnameinfo(*args,**kw):\n pass\n \n def is_closed(*args,**kw):\n pass\n \n def is_running(*args,**kw):\n pass\n \n def remove_reader(*args,**kw):\n pass\n \n def remove_signal_handler(*args,**kw):\n pass\n \n def remove_writer(*args,**kw):\n pass\n \n def run_forever(*args,**kw):\n pass\n \n def run_in_executor(*args,**kw):\n pass\n \n def run_until_complete(*args,**kw):\n pass\n \n def sendfile(*args,**kw):\n pass\n \n def set_debug(*args,**kw):\n pass\n \n def set_default_executor(*args,**kw):\n pass\n \n def set_exception_handler(*args,**kw):\n pass\n \n def set_task_factory(*args,**kw):\n pass\n \n def shutdown_asyncgens(*args,**kw):\n pass\n \n def shutdown_default_executor(*args,**kw):\n pass\n \n def sock_accept(*args,**kw):\n pass\n \n def sock_connect(*args,**kw):\n pass\n \n def sock_recv(*args,**kw):\n pass\n \n def sock_recv_into(*args,**kw):\n pass\n \n def sock_recvfrom(*args,**kw):\n pass\n \n def sock_recvfrom_into(*args,**kw):\n pass\n \n def sock_sendall(*args,**kw):\n pass\n \n def sock_sendfile(*args,**kw):\n pass\n \n def sock_sendto(*args,**kw):\n pass\n \n def start_tls(*args,**kw):\n pass\n \n def stop(*args,**kw):\n pass\n \n def subprocess_exec(*args,**kw):\n pass\n \n def subprocess_shell(*args,**kw):\n pass\n \n def time(*args,**kw):\n pass\n def get_child_watcher(*args,**kw):\n pass\n \n def get_event_loop(*args,**kw):\n pass\n \n def new_event_loop(*args,**kw):\n pass\n \n def set_child_watcher(*args,**kw):\n pass\n \n def set_event_loop(*args,**kw):\n pass\n \nclass WriteTransport:\n\n __module__=\"\"\"asyncio.transports\"\"\"\n \n _extra=\"\"\n \n def abort(*args,**kw):\n pass\n \n def can_write_eof(*args,**kw):\n pass\n \n def close(*args,**kw):\n pass\n \n def get_extra_info(*args,**kw):\n pass\n \n def get_protocol(*args,**kw):\n pass\n \n def get_write_buffer_limits(*args,**kw):\n pass\n \n def get_write_buffer_size(*args,**kw):\n pass\n \n def is_closing(*args,**kw):\n pass\n \n def set_protocol(*args,**kw):\n pass\n \n def set_write_buffer_limits(*args,**kw):\n pass\n \n def write(*args,**kw):\n pass\n \n def write_eof(*args,**kw):\n pass\n \n def writelines(*args,**kw):\n pass\ndef _enter_task(*args,**kw):\n pass\n \ndef _get_running_loop(*args,**kw):\n pass\n \ndef _leave_task(*args,**kw):\n pass\n \ndef _register_task(*args,**kw):\n pass\n \ndef _set_running_loop(*args,**kw):\n pass\n \ndef _unregister_task(*args,**kw):\n pass\n \ndef all_tasks(*args,**kw):\n pass\n \ndef as_completed(*args,**kw):\n pass\n \nbase_events=\"\"\n\nbase_futures=\"\"\n\nbase_subprocess=\"\"\n\nbase_tasks=\"\"\n\nconstants=\"\"\n\ncoroutines=\"\"\n\ndef create_subprocess_exec(*args,**kw):\n pass\n \ndef create_subprocess_shell(*args,**kw):\n pass\n \ndef create_task(*args,**kw):\n pass\n \ndef current_task(*args,**kw):\n pass\n \ndef ensure_future(*args,**kw):\n pass\n \nevents=\"\"\n\nexceptions=\"\"\n\nformat_helpers=\"\"\n\nfutures=\"\"\n\ndef gather(*args,**kw):\n pass\n \ndef get_child_watcher(*args,**kw):\n pass\n \ndef get_event_loop(*args,**kw):\n pass\n \ndef get_event_loop_policy(*args,**kw):\n pass\n \ndef get_running_loop(*args,**kw):\n pass\n \ndef iscoroutine(*args,**kw):\n pass\n \ndef iscoroutinefunction(*args,**kw):\n pass\n \ndef isfuture(*args,**kw):\n pass\n \nlocks=\"\"\n\nlog=\"\"\n\nmixins=\"\"\n\ndef new_event_loop(*args,**kw):\n pass\n \ndef open_connection(*args,**kw):\n pass\n \nproactor_events=\"\"\n\nprotocols=\"\"\n\nqueues=\"\"\n\ndef run(*args,**kw):\n pass\n \ndef run_coroutine_threadsafe(*args,**kw):\n pass\n \nrunners=\"\"\n\nselector_events=\"\"\n\ndef set_child_watcher(*args,**kw):\n pass\n \ndef set_event_loop(*args,**kw):\n pass\n \ndef set_event_loop_policy(*args,**kw):\n pass\n \ndef shield(*args,**kw):\n pass\n \ndef sleep(*args,**kw):\n pass\n \nsslproto=\"\"\n\nstaggered=\"\"\n\ndef start_server(*args,**kw):\n pass\n \nstreams=\"\"\n\nsubprocess=\"\"\n\nsys=\"\"\n\ntaskgroups=\"\"\n\ntasks=\"\"\n\nthreads=\"\"\n\ndef timeout(*args,**kw):\n pass\n \ndef timeout_at(*args,**kw):\n pass\n \ntimeouts=\"\"\n\ndef to_thread(*args,**kw):\n pass\n \ntransports=\"\"\n\ntrsock=\"\"\n\ndef wait(*args,**kw):\n pass\n \ndef wait_for(*args,**kw):\n pass\n \nwindows_events=\"\"\n\nwindows_utils=\"\"\n\ndef wrap_future(*args,**kw):\n pass\n \n", []], "atexit": [".py", "''\n\n\n\n\n\nclass __loader__(object):\n pass\n \ndef _clear(*args,**kw):\n ''\n \n pass\n \ndef _run_exitfuncs(*args,**kw):\n ''\n \n pass\n \ndef register(*args,**kw):\n ''\n\n\n\n\n\n\n \n pass\n \ndef unregister(*args,**kw):\n ''\n\n\n\n \n pass\n", []], "base64": [".py", "#! /usr/bin/env python3\n\n\"\"\"Base16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings\"\"\"\n\n\n\n\n\nimport re\nimport struct\nimport binascii\n\n\n__all__=[\n\n'encode','decode','encodebytes','decodebytes',\n\n'b64encode','b64decode','b32encode','b32decode',\n'b32hexencode','b32hexdecode','b16encode','b16decode',\n\n'b85encode','b85decode','a85encode','a85decode',\n\n'standard_b64encode','standard_b64decode',\n\n\n\n\n'urlsafe_b64encode','urlsafe_b64decode',\n]\n\n\nbytes_types=(bytes,bytearray)\n\ndef _bytes_from_decode_data(s):\n if isinstance(s,str):\n try :\n return s.encode('ascii')\n except UnicodeEncodeError:\n raise ValueError('string argument should contain only ASCII characters')\n if isinstance(s,bytes_types):\n return s\n try :\n return memoryview(s).tobytes()\n except TypeError:\n raise TypeError(\"argument should be a bytes-like object or ASCII \"\n \"string, not %r\"%s.__class__.__name__)from None\n \n \n \n \ndef b64encode(s,altchars=None ):\n ''\n\n\n\n\n \n encoded=binascii.b2a_base64(s,newline=False )\n if altchars is not None :\n assert len(altchars)==2,repr(altchars)\n return encoded.translate(bytes.maketrans(b'+/',altchars))\n return encoded\n \n \ndef b64decode(s,altchars=None ,validate=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n s=_bytes_from_decode_data(s)\n if altchars is not None :\n altchars=_bytes_from_decode_data(altchars)\n assert len(altchars)==2,repr(altchars)\n s=s.translate(bytes.maketrans(altchars,b'+/'))\n return binascii.a2b_base64(s,strict_mode=validate)\n \n \ndef standard_b64encode(s):\n ''\n\n\n \n return b64encode(s)\n \ndef standard_b64decode(s):\n ''\n\n\n\n\n\n \n return b64decode(s)\n \n \n_urlsafe_encode_translation=bytes.maketrans(b'+/',b'-_')\n_urlsafe_decode_translation=bytes.maketrans(b'-_',b'+/')\n\ndef urlsafe_b64encode(s):\n ''\n\n\n\n\n \n return b64encode(s).translate(_urlsafe_encode_translation)\n \ndef urlsafe_b64decode(s):\n ''\n\n\n\n\n\n\n\n\n \n s=_bytes_from_decode_data(s)\n s=s.translate(_urlsafe_decode_translation)\n return b64decode(s)\n \n \n \n \n_B32_ENCODE_DOCSTRING='''\nEncode the bytes-like objects using {encoding} and return a bytes object.\n'''\n_B32_DECODE_DOCSTRING='''\nDecode the {encoding} encoded bytes-like object or ASCII string s.\n\nOptional casefold is a flag specifying whether a lowercase alphabet is\nacceptable as input. For security purposes, the default is False.\n{extra_args}\nThe result is returned as a bytes object. A binascii.Error is raised if\nthe input is incorrectly padded or if there are non-alphabet\ncharacters present in the input.\n'''\n_B32_DECODE_MAP01_DOCSTRING='''\nRFC 3548 allows for optional mapping of the digit 0 (zero) to the\nletter O (oh), and for optional mapping of the digit 1 (one) to\neither the letter I (eye) or letter L (el). The optional argument\nmap01 when not None, specifies which letter the digit 1 should be\nmapped to (when map01 is not None, the digit 0 is always mapped to\nthe letter O). For security purposes the default is None, so that\n0 and 1 are not allowed in the input.\n'''\n_b32alphabet=b'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567'\n_b32hexalphabet=b'0123456789ABCDEFGHIJKLMNOPQRSTUV'\n_b32tab2={}\n_b32rev={}\n\ndef _b32encode(alphabet,s):\n global _b32tab2\n \n \n if alphabet not in _b32tab2:\n b32tab=[bytes((i,))for i in alphabet]\n _b32tab2[alphabet]=[a+b for a in b32tab for b in b32tab]\n b32tab=None\n \n if not isinstance(s,bytes_types):\n s=memoryview(s).tobytes()\n leftover=len(s)%5\n \n if leftover:\n s=s+b'\\0'*(5 -leftover)\n encoded=bytearray()\n from_bytes=int.from_bytes\n b32tab2=_b32tab2[alphabet]\n for i in range(0,len(s),5):\n c=from_bytes(s[i:i+5])\n encoded +=(b32tab2[c >>30]+\n b32tab2[(c >>20)&0x3ff]+\n b32tab2[(c >>10)&0x3ff]+\n b32tab2[c&0x3ff]\n )\n \n if leftover ==1:\n encoded[-6:]=b'======'\n elif leftover ==2:\n encoded[-4:]=b'===='\n elif leftover ==3:\n encoded[-3:]=b'==='\n elif leftover ==4:\n encoded[-1:]=b'='\n return bytes(encoded)\n \ndef _b32decode(alphabet,s,casefold=False ,map01=None ):\n global _b32rev\n \n \n if alphabet not in _b32rev:\n _b32rev[alphabet]={v:k for k,v in enumerate(alphabet)}\n s=_bytes_from_decode_data(s)\n if len(s)%8:\n raise binascii.Error('Incorrect padding')\n \n \n \n if map01 is not None :\n map01=_bytes_from_decode_data(map01)\n assert len(map01)==1,repr(map01)\n s=s.translate(bytes.maketrans(b'01',b'O'+map01))\n if casefold:\n s=s.upper()\n \n \n \n l=len(s)\n s=s.rstrip(b'=')\n padchars=l -len(s)\n \n decoded=bytearray()\n b32rev=_b32rev[alphabet]\n for i in range(0,len(s),8):\n quanta=s[i:i+8]\n acc=0\n try :\n for c in quanta:\n acc=(acc <<5)+b32rev[c]\n except KeyError:\n raise binascii.Error('Non-base32 digit found')from None\n decoded +=acc.to_bytes(5)\n \n if l %8 or padchars not in {0,1,3,4,6}:\n raise binascii.Error('Incorrect padding')\n if padchars and decoded:\n acc <<=5 *padchars\n last=acc.to_bytes(5)\n leftover=(43 -5 *padchars)//8\n decoded[-5:]=last[:leftover]\n return bytes(decoded)\n \n \ndef b32encode(s):\n return _b32encode(_b32alphabet,s)\nb32encode.__doc__=_B32_ENCODE_DOCSTRING.format(encoding='base32')\n\ndef b32decode(s,casefold=False ,map01=None ):\n return _b32decode(_b32alphabet,s,casefold,map01)\nb32decode.__doc__=_B32_DECODE_DOCSTRING.format(encoding='base32',\nextra_args=_B32_DECODE_MAP01_DOCSTRING)\n\ndef b32hexencode(s):\n return _b32encode(_b32hexalphabet,s)\nb32hexencode.__doc__=_B32_ENCODE_DOCSTRING.format(encoding='base32hex')\n\ndef b32hexdecode(s,casefold=False ):\n\n return _b32decode(_b32hexalphabet,s,casefold)\nb32hexdecode.__doc__=_B32_DECODE_DOCSTRING.format(encoding='base32hex',\nextra_args='')\n\n\n\n\n\ndef b16encode(s):\n ''\n \n return binascii.hexlify(s).upper()\n \n \ndef b16decode(s,casefold=False ):\n ''\n\n\n\n\n\n\n\n \n s=_bytes_from_decode_data(s)\n if casefold:\n s=s.upper()\n if re.search(b'[^0-9A-F]',s):\n raise binascii.Error('Non-base16 digit found')\n return binascii.unhexlify(s)\n \n \n \n \n \n_a85chars=None\n_a85chars2=None\n_A85START=b\"<~\"\n_A85END=b\"~>\"\n\ndef _85encode(b,chars,chars2,pad=False ,foldnuls=False ,foldspaces=False ):\n\n if not isinstance(b,bytes_types):\n b=memoryview(b).tobytes()\n \n padding=(-len(b))%4\n if padding:\n b=b+b'\\0'*padding\n words=struct.Struct('!%dI'%(len(b)//4)).unpack(b)\n \n chunks=[b'z'if foldnuls and not word else\n b'y'if foldspaces and word ==0x20202020 else\n (chars2[word //614125]+\n chars2[word //85 %7225]+\n chars[word %85])\n for word in words]\n \n if padding and not pad:\n if chunks[-1]==b'z':\n chunks[-1]=chars[0]*5\n chunks[-1]=chunks[-1][:-padding]\n \n return b''.join(chunks)\n \ndef a85encode(b,*,foldspaces=False ,wrapcol=0,pad=False ,adobe=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n global _a85chars,_a85chars2\n \n \n if _a85chars2 is None :\n _a85chars=[bytes((i,))for i in range(33,118)]\n _a85chars2=[(a+b)for a in _a85chars for b in _a85chars]\n \n result=_85encode(b,_a85chars,_a85chars2,pad,True ,foldspaces)\n \n if adobe:\n result=_A85START+result\n if wrapcol:\n wrapcol=max(2 if adobe else 1,wrapcol)\n chunks=[result[i:i+wrapcol]\n for i in range(0,len(result),wrapcol)]\n if adobe:\n if len(chunks[-1])+2 >wrapcol:\n chunks.append(b'')\n result=b'\\n'.join(chunks)\n if adobe:\n result +=_A85END\n \n return result\n \ndef a85decode(b,*,foldspaces=False ,adobe=False ,ignorechars=b' \\t\\n\\r\\v'):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n b=_bytes_from_decode_data(b)\n if adobe:\n if not b.endswith(_A85END):\n raise ValueError(\n \"Ascii85 encoded byte sequences must end \"\n \"with {!r}\".format(_A85END)\n )\n if b.startswith(_A85START):\n b=b[2:-2]\n else :\n b=b[:-2]\n \n \n \n \n packI=struct.Struct('!I').pack\n decoded=[]\n decoded_append=decoded.append\n curr=[]\n curr_append=curr.append\n curr_clear=curr.clear\n for x in b+b'u'*4:\n if b'!'[0]<=x <=b'u'[0]:\n curr_append(x)\n if len(curr)==5:\n acc=0\n for x in curr:\n acc=85 *acc+(x -33)\n try :\n decoded_append(packI(acc))\n except struct.error:\n raise ValueError('Ascii85 overflow')from None\n curr_clear()\n elif x ==b'z'[0]:\n if curr:\n raise ValueError('z inside Ascii85 5-tuple')\n decoded_append(b'\\0\\0\\0\\0')\n elif foldspaces and x ==b'y'[0]:\n if curr:\n raise ValueError('y inside Ascii85 5-tuple')\n decoded_append(b'\\x20\\x20\\x20\\x20')\n elif x in ignorechars:\n \n continue\n else :\n raise ValueError('Non-Ascii85 digit found: %c'%x)\n \n result=b''.join(decoded)\n padding=4 -len(curr)\n if padding:\n \n result=result[:-padding]\n return result\n \n \n \n_b85alphabet=(b\"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\nb\"abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~\")\n_b85chars=None\n_b85chars2=None\n_b85dec=None\n\ndef b85encode(b,pad=False ):\n ''\n\n\n\n \n global _b85chars,_b85chars2\n \n \n if _b85chars2 is None :\n _b85chars=[bytes((i,))for i in _b85alphabet]\n _b85chars2=[(a+b)for a in _b85chars for b in _b85chars]\n return _85encode(b,_b85chars,_b85chars2,pad)\n \ndef b85decode(b):\n ''\n\n\n \n global _b85dec\n \n \n if _b85dec is None :\n _b85dec=[None ]*256\n for i,c in enumerate(_b85alphabet):\n _b85dec[c]=i\n \n b=_bytes_from_decode_data(b)\n padding=(-len(b))%5\n b=b+b'~'*padding\n out=[]\n packI=struct.Struct('!I').pack\n for i in range(0,len(b),5):\n chunk=b[i:i+5]\n acc=0\n try :\n for c in chunk:\n acc=acc *85+_b85dec[c]\n except TypeError:\n for j,c in enumerate(chunk):\n if _b85dec[c]is None :\n raise ValueError('bad base85 character at position %d'\n %(i+j))from None\n raise\n try :\n out.append(packI(acc))\n except struct.error:\n raise ValueError('base85 overflow in hunk starting at byte %d'\n %i)from None\n \n result=b''.join(out)\n if padding:\n result=result[:-padding]\n return result\n \n \n \n \n \nMAXLINESIZE=76\nMAXBINSIZE=(MAXLINESIZE //4)*3\n\ndef encode(input,output):\n ''\n while s :=input.read(MAXBINSIZE):\n while len(s)\":\n return filename\n canonic=self.fncache.get(filename)\n if not canonic:\n canonic=os.path.abspath(filename)\n canonic=os.path.normcase(canonic)\n self.fncache[filename]=canonic\n return canonic\n \n def reset(self):\n ''\n import linecache\n linecache.checkcache()\n self.botframe=None\n self._set_stopinfo(None ,None )\n \n def trace_dispatch(self,frame,event,arg):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if self.quitting:\n return\n if event =='line':\n return self.dispatch_line(frame)\n if event =='call':\n return self.dispatch_call(frame,arg)\n if event =='return':\n return self.dispatch_return(frame,arg)\n if event =='exception':\n return self.dispatch_exception(frame,arg)\n if event =='c_call':\n return self.trace_dispatch\n if event =='c_exception':\n return self.trace_dispatch\n if event =='c_return':\n return self.trace_dispatch\n print('bdb.Bdb.dispatch: unknown debugging event:',repr(event))\n return self.trace_dispatch\n \n def dispatch_line(self,frame):\n ''\n\n\n\n\n \n if self.stop_here(frame)or self.break_here(frame):\n self.user_line(frame)\n if self.quitting:raise BdbQuit\n return self.trace_dispatch\n \n def dispatch_call(self,frame,arg):\n ''\n\n\n\n\n \n \n if self.botframe is None :\n \n self.botframe=frame.f_back\n return self.trace_dispatch\n if not (self.stop_here(frame)or self.break_anywhere(frame)):\n \n return\n \n if self.stopframe and frame.f_code.co_flags&GENERATOR_AND_COROUTINE_FLAGS:\n return self.trace_dispatch\n self.user_call(frame,arg)\n if self.quitting:raise BdbQuit\n return self.trace_dispatch\n \n def dispatch_return(self,frame,arg):\n ''\n\n\n\n\n \n if self.stop_here(frame)or frame ==self.returnframe:\n \n if self.stopframe and frame.f_code.co_flags&GENERATOR_AND_COROUTINE_FLAGS:\n return self.trace_dispatch\n try :\n self.frame_returning=frame\n self.user_return(frame,arg)\n finally :\n self.frame_returning=None\n if self.quitting:raise BdbQuit\n \n if self.stopframe is frame and self.stoplineno !=-1:\n self._set_stopinfo(None ,None )\n return self.trace_dispatch\n \n def dispatch_exception(self,frame,arg):\n ''\n\n\n\n\n \n if self.stop_here(frame):\n \n \n \n if not (frame.f_code.co_flags&GENERATOR_AND_COROUTINE_FLAGS\n and arg[0]is StopIteration and arg[2]is None ):\n self.user_exception(frame,arg)\n if self.quitting:raise BdbQuit\n \n \n \n \n elif (self.stopframe and frame is not self.stopframe\n and self.stopframe.f_code.co_flags&GENERATOR_AND_COROUTINE_FLAGS\n and arg[0]in (StopIteration,GeneratorExit)):\n self.user_exception(frame,arg)\n if self.quitting:raise BdbQuit\n \n return self.trace_dispatch\n \n \n \n \n \n def is_skipped_module(self,module_name):\n ''\n if module_name is None :\n return False\n for pattern in self.skip:\n if fnmatch.fnmatch(module_name,pattern):\n return True\n return False\n \n def stop_here(self,frame):\n ''\n \n \n if self.skip and\\\n self.is_skipped_module(frame.f_globals.get('__name__')):\n return False\n if frame is self.stopframe:\n if self.stoplineno ==-1:\n return False\n return frame.f_lineno >=self.stoplineno\n if not self.stopframe:\n return True\n return False\n \n def break_here(self,frame):\n ''\n\n\n\n \n filename=self.canonic(frame.f_code.co_filename)\n if filename not in self.breaks:\n return False\n lineno=frame.f_lineno\n if lineno not in self.breaks[filename]:\n \n \n lineno=frame.f_code.co_firstlineno\n if lineno not in self.breaks[filename]:\n return False\n \n \n (bp,flag)=effective(filename,lineno,frame)\n if bp:\n self.currentbp=bp.number\n if (flag and bp.temporary):\n self.do_clear(str(bp.number))\n return True\n else :\n return False\n \n def do_clear(self,arg):\n ''\n\n\n \n raise NotImplementedError(\"subclass of bdb must implement do_clear()\")\n \n def break_anywhere(self,frame):\n ''\n \n return self.canonic(frame.f_code.co_filename)in self.breaks\n \n \n \n \n def user_call(self,frame,argument_list):\n ''\n pass\n \n def user_line(self,frame):\n ''\n pass\n \n def user_return(self,frame,return_value):\n ''\n pass\n \n def user_exception(self,frame,exc_info):\n ''\n pass\n \n def _set_stopinfo(self,stopframe,returnframe,stoplineno=0):\n ''\n\n\n\n\n \n self.stopframe=stopframe\n self.returnframe=returnframe\n self.quitting=False\n \n \n self.stoplineno=stoplineno\n \n \n \n \n def set_until(self,frame,lineno=None ):\n ''\n \n \n if lineno is None :\n lineno=frame.f_lineno+1\n self._set_stopinfo(frame,frame,lineno)\n \n def set_step(self):\n ''\n \n \n \n \n if self.frame_returning:\n caller_frame=self.frame_returning.f_back\n if caller_frame and not caller_frame.f_trace:\n caller_frame.f_trace=self.trace_dispatch\n self._set_stopinfo(None ,None )\n \n def set_next(self,frame):\n ''\n self._set_stopinfo(frame,None )\n \n def set_return(self,frame):\n ''\n if frame.f_code.co_flags&GENERATOR_AND_COROUTINE_FLAGS:\n self._set_stopinfo(frame,None ,-1)\n else :\n self._set_stopinfo(frame.f_back,frame)\n \n def set_trace(self,frame=None ):\n ''\n\n\n \n if frame is None :\n frame=sys._getframe().f_back\n self.reset()\n while frame:\n frame.f_trace=self.trace_dispatch\n self.botframe=frame\n frame=frame.f_back\n self.set_step()\n sys.settrace(self.trace_dispatch)\n \n def set_continue(self):\n ''\n\n\n \n \n self._set_stopinfo(self.botframe,None ,-1)\n if not self.breaks:\n \n sys.settrace(None )\n frame=sys._getframe().f_back\n while frame and frame is not self.botframe:\n del frame.f_trace\n frame=frame.f_back\n \n def set_quit(self):\n ''\n\n\n \n self.stopframe=self.botframe\n self.returnframe=None\n self.quitting=True\n sys.settrace(None )\n \n \n \n \n \n \n \n \n def _add_to_breaks(self,filename,lineno):\n ''\n bp_linenos=self.breaks.setdefault(filename,[])\n if lineno not in bp_linenos:\n bp_linenos.append(lineno)\n \n def set_break(self,filename,lineno,temporary=False ,cond=None ,\n funcname=None ):\n ''\n\n\n\n \n filename=self.canonic(filename)\n import linecache\n line=linecache.getline(filename,lineno)\n if not line:\n return 'Line %s:%d does not exist'%(filename,lineno)\n self._add_to_breaks(filename,lineno)\n bp=Breakpoint(filename,lineno,temporary,cond,funcname)\n return None\n \n def _load_breaks(self):\n ''\n\n\n\n\n\n \n for (filename,lineno)in Breakpoint.bplist.keys():\n self._add_to_breaks(filename,lineno)\n \n def _prune_breaks(self,filename,lineno):\n ''\n\n\n\n\n\n \n if (filename,lineno)not in Breakpoint.bplist:\n self.breaks[filename].remove(lineno)\n if not self.breaks[filename]:\n del self.breaks[filename]\n \n def clear_break(self,filename,lineno):\n ''\n\n\n \n filename=self.canonic(filename)\n if filename not in self.breaks:\n return 'There are no breakpoints in %s'%filename\n if lineno not in self.breaks[filename]:\n return 'There is no breakpoint at %s:%d'%(filename,lineno)\n \n \n for bp in Breakpoint.bplist[filename,lineno][:]:\n bp.deleteMe()\n self._prune_breaks(filename,lineno)\n return None\n \n def clear_bpbynumber(self,arg):\n ''\n\n\n \n try :\n bp=self.get_bpbynumber(arg)\n except ValueError as err:\n return str(err)\n bp.deleteMe()\n self._prune_breaks(bp.file,bp.line)\n return None\n \n def clear_all_file_breaks(self,filename):\n ''\n\n\n \n filename=self.canonic(filename)\n if filename not in self.breaks:\n return 'There are no breakpoints in %s'%filename\n for line in self.breaks[filename]:\n blist=Breakpoint.bplist[filename,line]\n for bp in blist:\n bp.deleteMe()\n del self.breaks[filename]\n return None\n \n def clear_all_breaks(self):\n ''\n\n\n \n if not self.breaks:\n return 'There are no breakpoints'\n for bp in Breakpoint.bpbynumber:\n if bp:\n bp.deleteMe()\n self.breaks={}\n return None\n \n def get_bpbynumber(self,arg):\n ''\n\n\n\n \n if not arg:\n raise ValueError('Breakpoint number expected')\n try :\n number=int(arg)\n except ValueError:\n raise ValueError('Non-numeric breakpoint number %s'%arg)from None\n try :\n bp=Breakpoint.bpbynumber[number]\n except IndexError:\n raise ValueError('Breakpoint number %d out of range'%number)from None\n if bp is None :\n raise ValueError('Breakpoint %d already deleted'%number)\n return bp\n \n def get_break(self,filename,lineno):\n ''\n filename=self.canonic(filename)\n return filename in self.breaks and\\\n lineno in self.breaks[filename]\n \n def get_breaks(self,filename,lineno):\n ''\n\n\n \n filename=self.canonic(filename)\n return filename in self.breaks and\\\n lineno in self.breaks[filename]and\\\n Breakpoint.bplist[filename,lineno]or []\n \n def get_file_breaks(self,filename):\n ''\n\n\n \n filename=self.canonic(filename)\n if filename in self.breaks:\n return self.breaks[filename]\n else :\n return []\n \n def get_all_breaks(self):\n ''\n return self.breaks\n \n \n \n \n def get_stack(self,f,t):\n ''\n\n\n\n \n stack=[]\n if t and t.tb_frame is f:\n t=t.tb_next\n while f is not None :\n stack.append((f,f.f_lineno))\n if f is self.botframe:\n break\n f=f.f_back\n stack.reverse()\n i=max(0,len(stack)-1)\n while t is not None :\n stack.append((t.tb_frame,t.tb_lineno))\n t=t.tb_next\n if f is None :\n i=max(0,len(stack)-1)\n return stack,i\n \n def format_stack_entry(self,frame_lineno,lprefix=': '):\n ''\n\n\n\n\n\n\n \n import linecache,reprlib\n frame,lineno=frame_lineno\n filename=self.canonic(frame.f_code.co_filename)\n s='%s(%r)'%(filename,lineno)\n if frame.f_code.co_name:\n s +=frame.f_code.co_name\n else :\n s +=\"\"\n s +='()'\n if '__return__'in frame.f_locals:\n rv=frame.f_locals['__return__']\n s +='->'\n s +=reprlib.repr(rv)\n if lineno is not None :\n line=linecache.getline(filename,lineno,frame.f_globals)\n if line:\n s +=lprefix+line.strip()\n else :\n s +=f'{lprefix}Warning: lineno is None'\n return s\n \n \n \n \n \n def run(self,cmd,globals=None ,locals=None ):\n ''\n\n\n \n if globals is None :\n import __main__\n globals=__main__.__dict__\n if locals is None :\n locals=globals\n self.reset()\n if isinstance(cmd,str):\n cmd=compile(cmd,\"\",\"exec\")\n sys.settrace(self.trace_dispatch)\n try :\n exec(cmd,globals,locals)\n except BdbQuit:\n pass\n finally :\n self.quitting=True\n sys.settrace(None )\n \n def runeval(self,expr,globals=None ,locals=None ):\n ''\n\n\n \n if globals is None :\n import __main__\n globals=__main__.__dict__\n if locals is None :\n locals=globals\n self.reset()\n sys.settrace(self.trace_dispatch)\n try :\n return eval(expr,globals,locals)\n except BdbQuit:\n pass\n finally :\n self.quitting=True\n sys.settrace(None )\n \n def runctx(self,cmd,globals,locals):\n ''\n \n self.run(cmd,globals,locals)\n \n \n \n def runcall(self,func,/,*args,**kwds):\n ''\n\n\n \n self.reset()\n sys.settrace(self.trace_dispatch)\n res=None\n try :\n res=func(*args,**kwds)\n except BdbQuit:\n pass\n finally :\n self.quitting=True\n sys.settrace(None )\n return res\n \n \ndef set_trace():\n ''\n Bdb().set_trace()\n \n \nclass Breakpoint:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n next=1\n bplist={}\n bpbynumber=[None ]\n \n \n \n def __init__(self,file,line,temporary=False ,cond=None ,funcname=None ):\n self.funcname=funcname\n \n self.func_first_executable_line=None\n self.file=file\n self.line=line\n self.temporary=temporary\n self.cond=cond\n self.enabled=True\n self.ignore=0\n self.hits=0\n self.number=Breakpoint.next\n Breakpoint.next +=1\n \n self.bpbynumber.append(self)\n if (file,line)in self.bplist:\n self.bplist[file,line].append(self)\n else :\n self.bplist[file,line]=[self]\n \n @staticmethod\n def clearBreakpoints():\n Breakpoint.next=1\n Breakpoint.bplist={}\n Breakpoint.bpbynumber=[None ]\n \n def deleteMe(self):\n ''\n\n\n\n \n \n index=(self.file,self.line)\n self.bpbynumber[self.number]=None\n self.bplist[index].remove(self)\n if not self.bplist[index]:\n \n del self.bplist[index]\n \n def enable(self):\n ''\n self.enabled=True\n \n def disable(self):\n ''\n self.enabled=False\n \n def bpprint(self,out=None ):\n ''\n\n\n\n \n if out is None :\n out=sys.stdout\n print(self.bpformat(),file=out)\n \n def bpformat(self):\n ''\n\n\n\n\n\n \n if self.temporary:\n disp='del '\n else :\n disp='keep '\n if self.enabled:\n disp=disp+'yes '\n else :\n disp=disp+'no '\n ret='%-4dbreakpoint %s at %s:%d'%(self.number,disp,\n self.file,self.line)\n if self.cond:\n ret +='\\n\\tstop only if %s'%(self.cond,)\n if self.ignore:\n ret +='\\n\\tignore next %d hits'%(self.ignore,)\n if self.hits:\n if self.hits >1:\n ss='s'\n else :\n ss=''\n ret +='\\n\\tbreakpoint already hit %d time%s'%(self.hits,ss)\n return ret\n \n def __str__(self):\n ''\n return 'breakpoint %s at %s:%s'%(self.number,self.file,self.line)\n \n \n \n \ndef checkfuncname(b,frame):\n ''\n\n\n\n\n\n \n if not b.funcname:\n \n if b.line !=frame.f_lineno:\n \n \n return False\n return True\n \n \n if frame.f_code.co_name !=b.funcname:\n \n return False\n \n \n if not b.func_first_executable_line:\n \n b.func_first_executable_line=frame.f_lineno\n \n if b.func_first_executable_line !=frame.f_lineno:\n \n return False\n return True\n \n \ndef effective(file,line,frame):\n ''\n\n\n\n\n\n\n\n\n\n\n \n possibles=Breakpoint.bplist[file,line]\n for b in possibles:\n if not b.enabled:\n continue\n if not checkfuncname(b,frame):\n continue\n \n b.hits +=1\n if not b.cond:\n \n if b.ignore >0:\n b.ignore -=1\n continue\n else :\n \n return (b,True )\n else :\n \n \n \n try :\n val=eval(b.cond,frame.f_globals,frame.f_locals)\n if val:\n if b.ignore >0:\n b.ignore -=1\n \n else :\n return (b,True )\n \n \n except :\n \n \n \n return (b,False )\n return (None ,None )\n \n \n \n \nclass Tdb(Bdb):\n def user_call(self,frame,args):\n name=frame.f_code.co_name\n if not name:name='???'\n print('+++ call',name,args)\n def user_line(self,frame):\n import linecache\n name=frame.f_code.co_name\n if not name:name='???'\n fn=self.canonic(frame.f_code.co_filename)\n line=linecache.getline(fn,frame.f_lineno,frame.f_globals)\n print('+++',fn,frame.f_lineno,name,':',line.strip())\n def user_return(self,frame,retval):\n print('+++ return',retval)\n def user_exception(self,frame,exc_stuff):\n print('+++ exception',exc_stuff)\n self.set_continue()\n \ndef foo(n):\n print('foo(',n,')')\n x=bar(n *10)\n print('bar returned',x)\n \ndef bar(a):\n print('bar(',a,')')\n return a /2\n \ndef test():\n t=Tdb()\n t.run('import bdb; bdb.foo(10)')\n", ["__main__", "fnmatch", "inspect", "linecache", "os", "reprlib", "sys"]], "binascii": [".py", "''\n\n\n\n\n\n\n\nimport _base64\n\nfrom _binascii import *\n\nclass Error(ValueError):\n def __init__(self,msg=''):\n self._msg=msg\n \n def __str__(self):\n return \" binascii.Error: \"+self._msg\n \n \nclass Done(Exception):\n pass\n \nclass Incomplete(Error):\n pass\n \ndef a2b_uu(s):\n if not s:\n return ''\n \n length=(ord(s[0])-0x20)%64\n \n def quadruplets_gen(s):\n while s:\n try :\n yield ord(s[0]),ord(s[1]),ord(s[2]),ord(s[3])\n except IndexError:\n s +=' '\n yield ord(s[0]),ord(s[1]),ord(s[2]),ord(s[3])\n return\n s=s[4:]\n \n try :\n result=[''.join(\n [chr((A -0x20)<<2 |(((B -0x20)>>4)&0x3)),\n chr(((B -0x20)&0xf)<<4 |(((C -0x20)>>2)&0xf)),\n chr(((C -0x20)&0x3)<<6 |((D -0x20)&0x3f))\n ])for A,B,C,D in quadruplets_gen(s[1:].rstrip())]\n except ValueError:\n raise Error('Illegal char')\n result=''.join(result)\n trailingdata=result[length:]\n if trailingdata.strip('\\x00'):\n raise Error('Trailing garbage')\n result=result[:length]\n if len(result)>2)&0x3F],\n table_b2a_base64[((A <<4)|((B >>4)&0xF))&0x3F],\n table_b2a_base64[((B <<2)|((C >>6)&0x3))&0x3F],\n table_b2a_base64[(C)&0x3F]])\n for A,B,C in a]\n \n final=s[length -final_length:]\n if final_length ==0:\n snippet=''\n elif final_length ==1:\n a=final[0]\n snippet=table_b2a_base64[(a >>2)&0x3F]+\\\n table_b2a_base64[(a <<4)&0x3F]+'=='\n else :\n a=final[0]\n b=final[1]\n snippet=table_b2a_base64[(a >>2)&0x3F]+\\\n table_b2a_base64[((a <<4)|(b >>4)&0xF)&0x3F]+\\\n table_b2a_base64[(b <<2)&0x3F]+'='\n \n result=''.join(result)+snippet\n if newline:\n result +='\\n'\n return bytes(result,__BRYTHON__.charset)\n \ndef a2b_qp(s,header=False ):\n inp=0\n odata=[]\n while inp =len(s):\n break\n \n if (s[inp]=='\\n')or (s[inp]=='\\r'):\n if s[inp]!='\\n':\n while inp 0 and data[lf -1]=='\\r'\n \n inp=0\n linelen=0\n odata=[]\n while inp '~'or\n c =='='or\n (header and c =='_')or\n (c =='.'and linelen ==0 and (inp+1 ==len(data)or\n data[inp+1]=='\\n'or\n data[inp+1]=='\\r'))or\n (not istext and (c =='\\r'or c =='\\n'))or\n ((c =='\\t'or c ==' ')and (inp+1 ==len(data)))or\n (c <=' 'and c !='\\r'and c !='\\n'and\n (quotetabs or (not quotetabs and (c !='\\t'and c !=' '))))):\n linelen +=3\n if linelen >=MAXLINESIZE:\n odata.append('=')\n if crlf:odata.append('\\r')\n odata.append('\\n')\n linelen=3\n odata.append('='+two_hex_digits(ord(c)))\n inp +=1\n else :\n if (istext and\n (c =='\\n'or (inp+1 0 and\n (odata[-1]==' 'or odata[-1]=='\\t')):\n ch=ord(odata[-1])\n odata[-1]='='\n odata.append(two_hex_digits(ch))\n \n if crlf:odata.append('\\r')\n odata.append('\\n')\n if c =='\\r':\n inp +=2\n else :\n inp +=1\n else :\n if (inp+1 =MAXLINESIZE):\n odata.append('=')\n if crlf:odata.append('\\r')\n odata.append('\\n')\n linelen=0\n \n linelen +=1\n if header and c ==' ':\n c='_'\n odata.append(c)\n inp +=1\n return ''.join(odata)\n \nhex_numbers='0123456789ABCDEF'\ndef hex(n):\n if n ==0:\n return '0'\n \n if n <0:\n n=-n\n sign='-'\n else :\n sign=''\n arr=[]\n \n def hex_gen(n):\n ''\n while n:\n yield n %0x10\n n=n /0x10\n \n for nibble in hex_gen(n):\n arr=[hex_numbers[nibble]]+arr\n return sign+''.join(arr)\n \ndef two_hex_digits(n):\n return hex_numbers[n /0x10]+hex_numbers[n %0x10]\n \n \ndef strhex_to_int(s):\n i=0\n for c in s:\n i=i *0x10+hex_numbers.index(c)\n return i\n \nhqx_encoding='!\"#$%&\\'()*+,-012345689@ABCDEFGHIJKLMNPQRSTUVXYZ[`abcdefhijklmpqr'\n\nDONE=0x7f\nSKIP=0x7e\nFAIL=0x7d\n\ntable_a2b_hqx=[\n\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\n\nFAIL,FAIL,SKIP,FAIL,FAIL,SKIP,FAIL,FAIL,\n\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\n\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\n\nFAIL,0x00,0x01,0x02,0x03,0x04,0x05,0x06,\n\n0x07,0x08,0x09,0x0A,0x0B,0x0C,FAIL,FAIL,\n\n0x0D,0x0E,0x0F,0x10,0x11,0x12,0x13,FAIL,\n\n0x14,0x15,DONE,FAIL,FAIL,FAIL,FAIL,FAIL,\n\n0x16,0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,\n\n0x1E,0x1F,0x20,0x21,0x22,0x23,0x24,FAIL,\n\n0x25,0x26,0x27,0x28,0x29,0x2A,0x2B,FAIL,\n\n0x2C,0x2D,0x2E,0x2F,FAIL,FAIL,FAIL,FAIL,\n\n0x30,0x31,0x32,0x33,0x34,0x35,0x36,FAIL,\n\n0x37,0x38,0x39,0x3A,0x3B,0x3C,FAIL,FAIL,\n\n0x3D,0x3E,0x3F,FAIL,FAIL,FAIL,FAIL,FAIL,\n\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\nFAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,FAIL,\n]\n\ndef a2b_hqx(s):\n result=[]\n \n def quadruples_gen(s):\n t=[]\n for c in s:\n res=table_a2b_hqx[ord(c)]\n if res ==SKIP:\n continue\n elif res ==FAIL:\n raise Error('Illegal character')\n elif res ==DONE:\n yield t\n raise Done\n else :\n t.append(res)\n if len(t)==4:\n yield t\n t=[]\n yield t\n \n done=0\n try :\n for snippet in quadruples_gen(s):\n length=len(snippet)\n if length ==4:\n result.append(chr(((snippet[0]&0x3f)<<2)|(snippet[1]>>4)))\n result.append(chr(((snippet[1]&0x0f)<<4)|(snippet[2]>>2)))\n result.append(chr(((snippet[2]&0x03)<<6)|(snippet[3])))\n elif length ==3:\n result.append(chr(((snippet[0]&0x3f)<<2)|(snippet[1]>>4)))\n result.append(chr(((snippet[1]&0x0f)<<4)|(snippet[2]>>2)))\n elif length ==2:\n result.append(chr(((snippet[0]&0x3f)<<2)|(snippet[1]>>4)))\n except Done:\n done=1\n except Error:\n raise\n return (''.join(result),done)\n \n \n \ndef b2a_hqx(s):\n result=[]\n \n def triples_gen(s):\n while s:\n try :\n yield ord(s[0]),ord(s[1]),ord(s[2])\n except IndexError:\n yield tuple([ord(c)for c in s])\n s=s[3:]\n \n for snippet in triples_gen(s):\n length=len(snippet)\n if length ==3:\n result.append(\n hqx_encoding[(snippet[0]&0xfc)>>2])\n result.append(hqx_encoding[\n ((snippet[0]&0x03)<<4)|((snippet[1]&0xf0)>>4)])\n result.append(hqx_encoding[\n (snippet[1]&0x0f)<<2 |((snippet[2]&0xc0)>>6)])\n result.append(hqx_encoding[snippet[2]&0x3f])\n elif length ==2:\n result.append(\n hqx_encoding[(snippet[0]&0xfc)>>2])\n result.append(hqx_encoding[\n ((snippet[0]&0x03)<<4)|((snippet[1]&0xf0)>>4)])\n result.append(hqx_encoding[\n (snippet[1]&0x0f)<<2])\n elif length ==1:\n result.append(\n hqx_encoding[(snippet[0]&0xfc)>>2])\n result.append(hqx_encoding[\n ((snippet[0]&0x03)<<4)])\n return ''.join(result)\n \ncrctab_hqx=[\n0x0000,0x1021,0x2042,0x3063,0x4084,0x50a5,0x60c6,0x70e7,\n0x8108,0x9129,0xa14a,0xb16b,0xc18c,0xd1ad,0xe1ce,0xf1ef,\n0x1231,0x0210,0x3273,0x2252,0x52b5,0x4294,0x72f7,0x62d6,\n0x9339,0x8318,0xb37b,0xa35a,0xd3bd,0xc39c,0xf3ff,0xe3de,\n0x2462,0x3443,0x0420,0x1401,0x64e6,0x74c7,0x44a4,0x5485,\n0xa56a,0xb54b,0x8528,0x9509,0xe5ee,0xf5cf,0xc5ac,0xd58d,\n0x3653,0x2672,0x1611,0x0630,0x76d7,0x66f6,0x5695,0x46b4,\n0xb75b,0xa77a,0x9719,0x8738,0xf7df,0xe7fe,0xd79d,0xc7bc,\n0x48c4,0x58e5,0x6886,0x78a7,0x0840,0x1861,0x2802,0x3823,\n0xc9cc,0xd9ed,0xe98e,0xf9af,0x8948,0x9969,0xa90a,0xb92b,\n0x5af5,0x4ad4,0x7ab7,0x6a96,0x1a71,0x0a50,0x3a33,0x2a12,\n0xdbfd,0xcbdc,0xfbbf,0xeb9e,0x9b79,0x8b58,0xbb3b,0xab1a,\n0x6ca6,0x7c87,0x4ce4,0x5cc5,0x2c22,0x3c03,0x0c60,0x1c41,\n0xedae,0xfd8f,0xcdec,0xddcd,0xad2a,0xbd0b,0x8d68,0x9d49,\n0x7e97,0x6eb6,0x5ed5,0x4ef4,0x3e13,0x2e32,0x1e51,0x0e70,\n0xff9f,0xefbe,0xdfdd,0xcffc,0xbf1b,0xaf3a,0x9f59,0x8f78,\n0x9188,0x81a9,0xb1ca,0xa1eb,0xd10c,0xc12d,0xf14e,0xe16f,\n0x1080,0x00a1,0x30c2,0x20e3,0x5004,0x4025,0x7046,0x6067,\n0x83b9,0x9398,0xa3fb,0xb3da,0xc33d,0xd31c,0xe37f,0xf35e,\n0x02b1,0x1290,0x22f3,0x32d2,0x4235,0x5214,0x6277,0x7256,\n0xb5ea,0xa5cb,0x95a8,0x8589,0xf56e,0xe54f,0xd52c,0xc50d,\n0x34e2,0x24c3,0x14a0,0x0481,0x7466,0x6447,0x5424,0x4405,\n0xa7db,0xb7fa,0x8799,0x97b8,0xe75f,0xf77e,0xc71d,0xd73c,\n0x26d3,0x36f2,0x0691,0x16b0,0x6657,0x7676,0x4615,0x5634,\n0xd94c,0xc96d,0xf90e,0xe92f,0x99c8,0x89e9,0xb98a,0xa9ab,\n0x5844,0x4865,0x7806,0x6827,0x18c0,0x08e1,0x3882,0x28a3,\n0xcb7d,0xdb5c,0xeb3f,0xfb1e,0x8bf9,0x9bd8,0xabbb,0xbb9a,\n0x4a75,0x5a54,0x6a37,0x7a16,0x0af1,0x1ad0,0x2ab3,0x3a92,\n0xfd2e,0xed0f,0xdd6c,0xcd4d,0xbdaa,0xad8b,0x9de8,0x8dc9,\n0x7c26,0x6c07,0x5c64,0x4c45,0x3ca2,0x2c83,0x1ce0,0x0cc1,\n0xef1f,0xff3e,0xcf5d,0xdf7c,0xaf9b,0xbfba,0x8fd9,0x9ff8,\n0x6e17,0x7e36,0x4e55,0x5e74,0x2e93,0x3eb2,0x0ed1,0x1ef0,\n]\n\ndef crc_hqx(s,crc):\n for c in s:\n crc=((crc <<8)&0xff00)^crctab_hqx[((crc >>8)&0xff)^ord(c)]\n \n return crc\n \ndef rlecode_hqx(s):\n ''\n\n\n\n \n if not s:\n return ''\n result=[]\n prev=s[0]\n count=1\n \n \n \n \n if s[-1]=='!':\n s=s[1:]+'?'\n else :\n s=s[1:]+'!'\n \n for c in s:\n if c ==prev and count <255:\n count +=1\n else :\n if count ==1:\n if prev !='\\x90':\n result.append(prev)\n else :\n result.extend(['\\x90','\\x00'])\n elif count <4:\n if prev !='\\x90':\n result.extend([prev]*count)\n else :\n result.extend(['\\x90','\\x00']*count)\n else :\n if prev !='\\x90':\n result.extend([prev,'\\x90',chr(count)])\n else :\n result.extend(['\\x90','\\x00','\\x90',chr(count)])\n count=1\n prev=c\n \n return ''.join(result)\n \ndef rledecode_hqx(s):\n s=s.split('\\x90')\n result=[s[0]]\n prev=s[0]\n for snippet in s[1:]:\n count=ord(snippet[0])\n if count >0:\n result.append(prev[-1]*(count -1))\n prev=snippet\n else :\n result.append('\\x90')\n prev='\\x90'\n result.append(snippet[1:])\n \n return ''.join(result)\n \ncrc_32_tab=[\n0x00000000,0x77073096,0xee0e612c,0x990951ba,0x076dc419,\n0x706af48f,0xe963a535,0x9e6495a3,0x0edb8832,0x79dcb8a4,\n0xe0d5e91e,0x97d2d988,0x09b64c2b,0x7eb17cbd,0xe7b82d07,\n0x90bf1d91,0x1db71064,0x6ab020f2,0xf3b97148,0x84be41de,\n0x1adad47d,0x6ddde4eb,0xf4d4b551,0x83d385c7,0x136c9856,\n0x646ba8c0,0xfd62f97a,0x8a65c9ec,0x14015c4f,0x63066cd9,\n0xfa0f3d63,0x8d080df5,0x3b6e20c8,0x4c69105e,0xd56041e4,\n0xa2677172,0x3c03e4d1,0x4b04d447,0xd20d85fd,0xa50ab56b,\n0x35b5a8fa,0x42b2986c,0xdbbbc9d6,0xacbcf940,0x32d86ce3,\n0x45df5c75,0xdcd60dcf,0xabd13d59,0x26d930ac,0x51de003a,\n0xc8d75180,0xbfd06116,0x21b4f4b5,0x56b3c423,0xcfba9599,\n0xb8bda50f,0x2802b89e,0x5f058808,0xc60cd9b2,0xb10be924,\n0x2f6f7c87,0x58684c11,0xc1611dab,0xb6662d3d,0x76dc4190,\n0x01db7106,0x98d220bc,0xefd5102a,0x71b18589,0x06b6b51f,\n0x9fbfe4a5,0xe8b8d433,0x7807c9a2,0x0f00f934,0x9609a88e,\n0xe10e9818,0x7f6a0dbb,0x086d3d2d,0x91646c97,0xe6635c01,\n0x6b6b51f4,0x1c6c6162,0x856530d8,0xf262004e,0x6c0695ed,\n0x1b01a57b,0x8208f4c1,0xf50fc457,0x65b0d9c6,0x12b7e950,\n0x8bbeb8ea,0xfcb9887c,0x62dd1ddf,0x15da2d49,0x8cd37cf3,\n0xfbd44c65,0x4db26158,0x3ab551ce,0xa3bc0074,0xd4bb30e2,\n0x4adfa541,0x3dd895d7,0xa4d1c46d,0xd3d6f4fb,0x4369e96a,\n0x346ed9fc,0xad678846,0xda60b8d0,0x44042d73,0x33031de5,\n0xaa0a4c5f,0xdd0d7cc9,0x5005713c,0x270241aa,0xbe0b1010,\n0xc90c2086,0x5768b525,0x206f85b3,0xb966d409,0xce61e49f,\n0x5edef90e,0x29d9c998,0xb0d09822,0xc7d7a8b4,0x59b33d17,\n0x2eb40d81,0xb7bd5c3b,0xc0ba6cad,0xedb88320,0x9abfb3b6,\n0x03b6e20c,0x74b1d29a,0xead54739,0x9dd277af,0x04db2615,\n0x73dc1683,0xe3630b12,0x94643b84,0x0d6d6a3e,0x7a6a5aa8,\n0xe40ecf0b,0x9309ff9d,0x0a00ae27,0x7d079eb1,0xf00f9344,\n0x8708a3d2,0x1e01f268,0x6906c2fe,0xf762575d,0x806567cb,\n0x196c3671,0x6e6b06e7,0xfed41b76,0x89d32be0,0x10da7a5a,\n0x67dd4acc,0xf9b9df6f,0x8ebeeff9,0x17b7be43,0x60b08ed5,\n0xd6d6a3e8,0xa1d1937e,0x38d8c2c4,0x4fdff252,0xd1bb67f1,\n0xa6bc5767,0x3fb506dd,0x48b2364b,0xd80d2bda,0xaf0a1b4c,\n0x36034af6,0x41047a60,0xdf60efc3,0xa867df55,0x316e8eef,\n0x4669be79,0xcb61b38c,0xbc66831a,0x256fd2a0,0x5268e236,\n0xcc0c7795,0xbb0b4703,0x220216b9,0x5505262f,0xc5ba3bbe,\n0xb2bd0b28,0x2bb45a92,0x5cb36a04,0xc2d7ffa7,0xb5d0cf31,\n0x2cd99e8b,0x5bdeae1d,0x9b64c2b0,0xec63f226,0x756aa39c,\n0x026d930a,0x9c0906a9,0xeb0e363f,0x72076785,0x05005713,\n0x95bf4a82,0xe2b87a14,0x7bb12bae,0x0cb61b38,0x92d28e9b,\n0xe5d5be0d,0x7cdcefb7,0x0bdbdf21,0x86d3d2d4,0xf1d4e242,\n0x68ddb3f8,0x1fda836e,0x81be16cd,0xf6b9265b,0x6fb077e1,\n0x18b74777,0x88085ae6,0xff0f6a70,0x66063bca,0x11010b5c,\n0x8f659eff,0xf862ae69,0x616bffd3,0x166ccf45,0xa00ae278,\n0xd70dd2ee,0x4e048354,0x3903b3c2,0xa7672661,0xd06016f7,\n0x4969474d,0x3e6e77db,0xaed16a4a,0xd9d65adc,0x40df0b66,\n0x37d83bf0,0xa9bcae53,0xdebb9ec5,0x47b2cf7f,0x30b5ffe9,\n0xbdbdf21c,0xcabac28a,0x53b39330,0x24b4a3a6,0xbad03605,\n0xcdd70693,0x54de5729,0x23d967bf,0xb3667a2e,0xc4614ab8,\n0x5d681b02,0x2a6f2b94,0xb40bbe37,0xc30c8ea1,0x5a05df1b,\n0x2d02ef8d\n]\n\ndef crc32(s,crc=0):\n result=0\n crc=~int(crc)&0xffffffff\n \n for c in s:\n crc=crc_32_tab[(crc ^int(ord(c)))&0xff]^(crc >>8)\n \n \n \n result=crc ^0xffffffff\n \n if result >2 **31:\n result=((result+2 **31)%2 **32)-2 **31\n \n return result\n", ["_base64", "_binascii"]], "bisect": [".py", "''\n\n\ndef insort_right(a,x,lo=0,hi=None ,*,key=None ):\n ''\n\n\n\n\n\n\n\n \n if key is None :\n lo=bisect_right(a,x,lo,hi)\n else :\n lo=bisect_right(a,key(x),lo,hi,key=key)\n a.insert(lo,x)\n \n \ndef bisect_right(a,x,lo=0,hi=None ,*,key=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n \n if lo <0:\n raise ValueError('lo must be non-negative')\n if hi is None :\n hi=len(a)\n \n \n if key is None :\n while lo =9:\n names=day_name\n else :\n names=day_abbr\n return names[day][:width].center(width)\n \n def formatweekheader(self,width):\n ''\n\n \n return ' '.join(self.formatweekday(i,width)for i in self.iterweekdays())\n \n def formatmonthname(self,theyear,themonth,width,withyear=True ):\n ''\n\n \n s=month_name[themonth]\n if withyear:\n s=\"%s %r\"%(s,theyear)\n return s.center(width)\n \n def prmonth(self,theyear,themonth,w=0,l=0):\n ''\n\n \n print(self.formatmonth(theyear,themonth,w,l),end='')\n \n def formatmonth(self,theyear,themonth,w=0,l=0):\n ''\n\n \n w=max(2,w)\n l=max(1,l)\n s=self.formatmonthname(theyear,themonth,7 *(w+1)-1)\n s=s.rstrip()\n s +='\\n'*l\n s +=self.formatweekheader(w).rstrip()\n s +='\\n'*l\n for week in self.monthdays2calendar(theyear,themonth):\n s +=self.formatweek(week,w).rstrip()\n s +='\\n'*l\n return s\n \n def formatyear(self,theyear,w=2,l=1,c=6,m=3):\n ''\n\n \n w=max(2,w)\n l=max(1,l)\n c=max(2,c)\n colwidth=(w+1)*7 -1\n v=[]\n a=v.append\n a(repr(theyear).center(colwidth *m+c *(m -1)).rstrip())\n a('\\n'*l)\n header=self.formatweekheader(w)\n for (i,row)in enumerate(self.yeardays2calendar(theyear,m)):\n \n months=range(m *i+1,min(m *(i+1)+1,13))\n a('\\n'*l)\n names=(self.formatmonthname(theyear,k,colwidth,False )\n for k in months)\n a(formatstring(names,colwidth,c).rstrip())\n a('\\n'*l)\n headers=(header for k in months)\n a(formatstring(headers,colwidth,c).rstrip())\n a('\\n'*l)\n \n height=max(len(cal)for cal in row)\n for j in range(height):\n weeks=[]\n for cal in row:\n if j >=len(cal):\n weeks.append('')\n else :\n weeks.append(self.formatweek(cal[j],w))\n a(formatstring(weeks,colwidth,c).rstrip())\n a('\\n'*l)\n return ''.join(v)\n \n def pryear(self,theyear,w=0,l=0,c=6,m=3):\n ''\n print(self.formatyear(theyear,w,l,c,m),end='')\n \n \nclass HTMLCalendar(Calendar):\n ''\n\n \n \n \n cssclasses=[\"mon\",\"tue\",\"wed\",\"thu\",\"fri\",\"sat\",\"sun\"]\n \n \n cssclasses_weekday_head=cssclasses\n \n \n cssclass_noday=\"noday\"\n \n \n cssclass_month_head=\"month\"\n \n \n cssclass_month=\"month\"\n \n \n cssclass_year_head=\"year\"\n \n \n cssclass_year=\"year\"\n \n def formatday(self,day,weekday):\n ''\n\n \n if day ==0:\n \n return ' '%self.cssclass_noday\n else :\n return '%d'%(self.cssclasses[weekday],day)\n \n def formatweek(self,theweek):\n ''\n\n \n s=''.join(self.formatday(d,wd)for (d,wd)in theweek)\n return '%s'%s\n \n def formatweekday(self,day):\n ''\n\n \n return '%s'%(\n self.cssclasses_weekday_head[day],day_abbr[day])\n \n def formatweekheader(self):\n ''\n\n \n s=''.join(self.formatweekday(i)for i in self.iterweekdays())\n return '%s'%s\n \n def formatmonthname(self,theyear,themonth,withyear=True ):\n ''\n\n \n if withyear:\n s='%s %s'%(month_name[themonth],theyear)\n else :\n s='%s'%month_name[themonth]\n return '%s'%(\n self.cssclass_month_head,s)\n \n def formatmonth(self,theyear,themonth,withyear=True ):\n ''\n\n \n v=[]\n a=v.append\n a(''%(\n self.cssclass_month))\n a('\\n')\n a(self.formatmonthname(theyear,themonth,withyear=withyear))\n a('\\n')\n a(self.formatweekheader())\n a('\\n')\n for week in self.monthdays2calendar(theyear,themonth):\n a(self.formatweek(week))\n a('\\n')\n a('
    ')\n a('\\n')\n return ''.join(v)\n \n def formatyear(self,theyear,width=3):\n ''\n\n \n v=[]\n a=v.append\n width=max(width,1)\n a(''%\n self.cssclass_year)\n a('\\n')\n a(''%(\n width,self.cssclass_year_head,theyear))\n for i in range(JANUARY,JANUARY+12,width):\n \n months=range(i,min(i+width,13))\n a('')\n for m in months:\n a('')\n a('')\n a('
    %s
    ')\n a(self.formatmonth(theyear,m,withyear=False ))\n a('
    ')\n return ''.join(v)\n \n def formatyearpage(self,theyear,width=3,css='calendar.css',encoding=None ):\n ''\n\n \n if encoding is None :\n encoding=sys.getdefaultencoding()\n v=[]\n a=v.append\n a('\\n'%encoding)\n a('\\n')\n a('\\n')\n a('\\n')\n a('\\n'%encoding)\n if css is not None :\n a('\\n'%css)\n a('Calendar for %d\\n'%theyear)\n a('\\n')\n a('\\n')\n a(self.formatyear(theyear,width))\n a('\\n')\n a('\\n')\n return ''.join(v).encode(encoding,\"xmlcharrefreplace\")\n \n \nclass different_locale:\n def __init__(self,locale):\n self.locale=locale\n self.oldlocale=None\n \n def __enter__(self):\n self.oldlocale=_locale.setlocale(_locale.LC_TIME,None )\n _locale.setlocale(_locale.LC_TIME,self.locale)\n \n def __exit__(self,*args):\n if self.oldlocale is None :\n return\n _locale.setlocale(_locale.LC_TIME,self.oldlocale)\n \n \ndef _get_default_locale():\n locale=_locale.setlocale(_locale.LC_TIME,None )\n if locale ==\"C\":\n with different_locale(\"\"):\n \n \n locale=_locale.setlocale(_locale.LC_TIME,None )\n return locale\n \n \nclass LocaleTextCalendar(TextCalendar):\n ''\n\n\n \n \n def __init__(self,firstweekday=0,locale=None ):\n TextCalendar.__init__(self,firstweekday)\n if locale is None :\n locale=_get_default_locale()\n self.locale=locale\n \n def formatweekday(self,day,width):\n with different_locale(self.locale):\n return super().formatweekday(day,width)\n \n def formatmonthname(self,theyear,themonth,width,withyear=True ):\n with different_locale(self.locale):\n return super().formatmonthname(theyear,themonth,width,withyear)\n \n \nclass LocaleHTMLCalendar(HTMLCalendar):\n ''\n\n\n \n def __init__(self,firstweekday=0,locale=None ):\n HTMLCalendar.__init__(self,firstweekday)\n if locale is None :\n locale=_get_default_locale()\n self.locale=locale\n \n def formatweekday(self,day):\n with different_locale(self.locale):\n return super().formatweekday(day)\n \n def formatmonthname(self,theyear,themonth,withyear=True ):\n with different_locale(self.locale):\n return super().formatmonthname(theyear,themonth,withyear)\n \n \nc=TextCalendar()\n\nfirstweekday=c.getfirstweekday\n\ndef setfirstweekday(firstweekday):\n if not MONDAY <=firstweekday <=SUNDAY:\n raise IllegalWeekdayError(firstweekday)\n c.firstweekday=firstweekday\n \nmonthcalendar=c.monthdayscalendar\nprweek=c.prweek\nweek=c.formatweek\nweekheader=c.formatweekheader\nprmonth=c.prmonth\nmonth=c.formatmonth\ncalendar=c.formatyear\nprcal=c.pryear\n\n\n\n_colwidth=7 *3 -1\n_spacing=6\n\n\ndef format(cols,colwidth=_colwidth,spacing=_spacing):\n ''\n print(formatstring(cols,colwidth,spacing))\n \n \ndef formatstring(cols,colwidth=_colwidth,spacing=_spacing):\n ''\n spacing *=' '\n return spacing.join(c.center(colwidth)for c in cols)\n \n \nEPOCH=1970\n_EPOCH_ORD=datetime.date(EPOCH,1,1).toordinal()\n\n\ndef timegm(tuple):\n ''\n year,month,day,hour,minute,second=tuple[:6]\n days=datetime.date(year,month,1).toordinal()-_EPOCH_ORD+day -1\n hours=days *24+hour\n minutes=hours *60+minute\n seconds=minutes *60+second\n return seconds\n \n \ndef main(args):\n import argparse\n parser=argparse.ArgumentParser()\n textgroup=parser.add_argument_group('text only arguments')\n htmlgroup=parser.add_argument_group('html only arguments')\n textgroup.add_argument(\n \"-w\",\"--width\",\n type=int,default=2,\n help=\"width of date column (default 2)\"\n )\n textgroup.add_argument(\n \"-l\",\"--lines\",\n type=int,default=1,\n help=\"number of lines for each week (default 1)\"\n )\n textgroup.add_argument(\n \"-s\",\"--spacing\",\n type=int,default=6,\n help=\"spacing between months (default 6)\"\n )\n textgroup.add_argument(\n \"-m\",\"--months\",\n type=int,default=3,\n help=\"months per row (default 3)\"\n )\n htmlgroup.add_argument(\n \"-c\",\"--css\",\n default=\"calendar.css\",\n help=\"CSS to use for page\"\n )\n parser.add_argument(\n \"-L\",\"--locale\",\n default=None ,\n help=\"locale to be used from month and weekday names\"\n )\n parser.add_argument(\n \"-e\",\"--encoding\",\n default=None ,\n help=\"encoding to use for output\"\n )\n parser.add_argument(\n \"-t\",\"--type\",\n default=\"text\",\n choices=(\"text\",\"html\"),\n help=\"output type (text or html)\"\n )\n parser.add_argument(\n \"year\",\n nargs='?',type=int,\n help=\"year number (1-9999)\"\n )\n parser.add_argument(\n \"month\",\n nargs='?',type=int,\n help=\"month number (1-12, text only)\"\n )\n \n options=parser.parse_args(args[1:])\n \n if options.locale and not options.encoding:\n parser.error(\"if --locale is specified --encoding is required\")\n sys.exit(1)\n \n locale=options.locale,options.encoding\n \n if options.type ==\"html\":\n if options.locale:\n cal=LocaleHTMLCalendar(locale=locale)\n else :\n cal=HTMLCalendar()\n encoding=options.encoding\n if encoding is None :\n encoding=sys.getdefaultencoding()\n optdict=dict(encoding=encoding,css=options.css)\n write=sys.stdout.buffer.write\n if options.year is None :\n write(cal.formatyearpage(datetime.date.today().year,**optdict))\n elif options.month is None :\n write(cal.formatyearpage(options.year,**optdict))\n else :\n parser.error(\"incorrect number of arguments\")\n sys.exit(1)\n else :\n if options.locale:\n cal=LocaleTextCalendar(locale=locale)\n else :\n cal=TextCalendar()\n optdict=dict(w=options.width,l=options.lines)\n if options.month is None :\n optdict[\"c\"]=options.spacing\n optdict[\"m\"]=options.months\n if options.year is None :\n result=cal.formatyear(datetime.date.today().year,**optdict)\n elif options.month is None :\n result=cal.formatyear(options.year,**optdict)\n else :\n result=cal.formatmonth(options.year,options.month,**optdict)\n write=sys.stdout.write\n if options.encoding:\n result=result.encode(options.encoding)\n write=sys.stdout.buffer.write\n write(result)\n \n \nif __name__ ==\"__main__\":\n main(sys.argv)\n", ["argparse", "datetime", "enum", "itertools", "locale", "sys", "warnings"]], "cmath": [".py", "\n\n\n\n\n\n\n\n\n\nimport math\nimport sys\n\ndef _takes_complex(func):\n def decorated(x):\n if isinstance(x,complex):\n return func(x)\n elif type(x)in [int,float]:\n return func(complex(x))\n elif hasattr(x,'__complex__'):\n c=x.__complex__()\n if not isinstance(c,complex):\n raise TypeError(\"A complex number is required\")\n else :\n return func(c)\n elif hasattr(x,'__float__'):\n try :\n c=complex(x.__float__(),0)\n except :\n raise TypeError(\"A complex number is required\")\n return func(c)\n elif hasattr(x,'__index__'):\n try :\n c=complex(x.__index__(),0)\n except :\n raise TypeError(\"A complex number is required\")\n return func(c)\n else :\n raise TypeError(\"A complex number is required\")\n if hasattr(func,'__doc__'):\n decorated.__doc__=func.__doc__\n if hasattr(func,'__name__'):\n decorated.__name__=func.__name__\n return decorated\n \n@_takes_complex\ndef isfinite(x):\n return math.isfinite(x.imag)and math.isfinite(x.real)\n \n@_takes_complex\ndef phase(x):\n ''\n return math.atan2(x.imag,x.real)\n \n@_takes_complex\ndef polar(x):\n ''\n\n\n\n\n \n phi=math.atan2(x.imag,x.real)\n if math.isnan(x.imag):\n if math.isinf(x.real):\n return abs(x.real),nan\n return nan,nan\n elif math.isinf(x.imag):\n r=inf\n elif math.isinf(x.real):\n r=inf\n else :\n r=math.sqrt(x.real **2+x.imag **2)\n if math.isinf(r):\n raise OverflowError(\"math range error\")\n return r,phi\n \ndef rect(r,phi):\n ''\n\n \n if math.isnan(r):\n if not math.isnan(phi)and not phi:\n return complex(nan,0)\n return complex(nan,nan)\n elif math.isnan(phi):\n if not r:\n return complex(0,0)\n elif math.isinf(r):\n return complex(inf,nan)\n return complex(nan,nan)\n if math.isinf(r)or math.isinf(phi):\n \n \n if math.isinf(phi)and r !=.0 and not math.isnan(r):\n raise ValueError(\"math domain error\")\n \n \n \n \n if -inf 0:\n _real=math.copysign(inf,math.cos(phi))\n _imag=math.copysign(inf,math.sin(phi))\n else :\n _real=-math.copysign(inf,math.cos(phi));\n _imag=-math.copysign(inf,math.sin(phi));\n return complex(_real,_imag)\n return _SPECIAL_VALUE(complex(r,phi),_rect_special_values)\n \n else :\n if phi ==.0:\n \n \n \n return complex(r,phi *r)\n else :\n return complex(r *math.cos(phi),r *math.sin(phi))\n \n@_takes_complex\ndef sqrt(x):\n ''\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n s,d,ax,ay=.0,.0,math.fabs(x.real),math.fabs(x.imag)\n \n ret=_SPECIAL_VALUE(x,_sqrt_special_values)\n if ret is not None :\n return ret\n \n if math.isinf(x.imag):\n return complex(inf,x.imag)\n \n if x.real ==.0 and x.imag ==.0:\n _real=.0\n _imag=x.imag\n return complex(_real,_imag)\n \n if ay ==0:\n s=math.sqrt(ax)\n d=0\n elif ax 0. or ay >0.):\n \n AX=math.ldexp(ax,_CM_SCALE_UP)\n AY=math.ldexp(ay,_CM_SCALE_UP)\n S=math.sqrt((AX+math.hypot(AX,AY))/2.0)\n D=AY /(2 *S)\n s=math.ldexp(S,_CM_SCALE_DOWN)\n d=math.ldexp(D,_CM_SCALE_DOWN)\n else :\n ax /=8.0 ;\n s=2.0 *math.sqrt(ax+math.hypot(ax,ay /8.0));\n d=ay /(2.0 *s)\n \n if x.real >=.0:\n _real=s ;\n _imag=math.copysign(d,x.imag)\n else :\n _real=d ;\n _imag=math.copysign(s,x.imag)\n \n return complex(_real,_imag)\n \n@_takes_complex\ndef acos(x):\n ''\n\n\n\n\n \n \n ret=_SPECIAL_VALUE(x,_acos_special_values)\n if ret is not None :\n if isinstance(ret,Exception):\n raise ret\n return ret\n \n if math.fabs(x.real)>_CM_LARGE_DOUBLE or math.fabs(x.imag)>_CM_LARGE_DOUBLE:\n \n _real=math.atan2(math.fabs(x.imag),x.real)\n \n \n \n if x.real <0:\n _imag=-math.copysign(math.log(math.hypot(x.real /2.,x.imag /2.))+_M_LN2 *2.,x.imag);\n else :\n _imag=math.copysign(math.log(math.hypot(x.real /2.,x.imag /2.))+_M_LN2 *2.,-x.imag);\n elif math.isnan(x.real):\n return complex(nan,nan)\n elif math.isnan(x.imag):\n if x.real ==0:\n return complex(pi /2,nan)\n return complex(nan,nan)\n else :\n s1=complex(float(1 -x.real),-x.imag)\n s1=sqrt(s1)\n s2=complex(1.0+x.real,x.imag)\n s2=sqrt(s2)\n _real=2.0 *math.atan2(s1.real,s2.real)\n _imag=math.asinh(s2.real *s1.imag -s2.imag *s1.real)\n if not x.imag:\n if x.real >1:\n _real=0\n elif x.real <-1:\n _real=math.pi\n \n return complex(_real,_imag)\n \n@_takes_complex\ndef acosh(x):\n ''\n\n\n\n \n ret=_SPECIAL_VALUE(x,_acosh_special_values)\n if ret is not None :\n return ret\n \n if math.fabs(x.real)>_CM_LARGE_DOUBLE or math.fabs(x.imag)>_CM_LARGE_DOUBLE:\n \n _real=math.log(math.hypot(x.real /2.0,x.imag /2.0))+_M_LN2 *2.0\n _imag=math.atan2(x.imag,x.real);\n else :\n s1=sqrt(complex(x.real -1.0,x.imag))\n s2=sqrt(complex(x.real+1.0,x.imag))\n _real=math.asinh(s1.real *s2.real+s1.imag *s2.imag)\n _imag=2. *math.atan2(s1.imag,s2.real)\n \n return complex(_real,_imag)\n \n@_takes_complex\ndef asin(x):\n ''\n\n\n\n \n \n s=complex(-x.imag,x.real)\n s=asinh(s)\n return complex(s.imag,-s.real)\n \n@_takes_complex\ndef asinh(x):\n ''\n\n\n\n\n \n ret=_SPECIAL_VALUE(x,_asinh_special_values)\n if ret is not None :\n return ret\n \n if math.fabs(x.real)>_CM_LARGE_DOUBLE or math.fabs(x.imag)>_CM_LARGE_DOUBLE:\n if x.imag >=.0:\n _real=math.copysign(math.log(math.hypot(x.real /2.,x.imag /2.))+_M_LN2 *2.,x.real)\n else :\n _real=-math.copysign(math.log(math.hypot(x.real /2.,x.imag /2.))+_M_LN2 *2.,-x.real)\n _imag=math.atan2(x.imag,math.fabs(x.real))\n else :\n s1=sqrt(complex(1.0+x.imag,-x.real))\n s2=sqrt(complex(1.0 -x.imag,x.real))\n _real=math.asinh(s1.real *s2.imag -s2.real *s1.imag)\n _imag=math.atan2(x.imag,s1.real *s2.real -s1.imag *s2.imag)\n return complex(_real,_imag)\n \n@_takes_complex\ndef atan(x):\n ''\n\n\n\n\n \n ret=_SPECIAL_VALUE(x,_atan_special_values)\n if ret is not None :\n return ret\n \n if isinf(x):\n return complex(math.copysign(1,x.real)*pi /2,\n math.copysign(0,x.imag))\n s=atanh(complex(-x.imag,x.real))\n return complex(s.imag,-s.real)\n \n@_takes_complex\ndef atanh(x):\n ''\n\n\n\n\n \n \n ret=_SPECIAL_VALUE(x,_atanh_special_values)\n if ret is not None :\n return ret\n \n if isinf(x):\n return complex(math.copysign(0,x.real),\n math.copysign(1,x.imag)*pi /2)\n \n \n if x.real <.0:\n return -(atanh(-x))\n \n ay=math.fabs(x.imag)\n \n if x.real >_CM_SQRT_LARGE_DOUBLE or ay >_CM_SQRT_LARGE_DOUBLE:\n \n \n \n \n \n h=math.hypot(x.real /2.,x.imag /2.)\n _real=x.real /4. /h /h\n \n \n \n \n \n \n _imag=-math.copysign(math.pi /2.,-x.imag)\n \n elif x.real ==1.0 and ay <_CM_SQRT_DBL_MIN:\n \n \n if (ay ==.0):\n raise ValueError(\"math domain error\")\n else :\n _real=-math.log(math.sqrt(ay)/math.sqrt(math.hypot(ay,2.)))\n _imag=math.copysign(math.atan2(2.0,-ay)/2,x.imag)\n \n else :\n \n _real=math.log1p(4. *x.real /((1 -x.real)*(1 -x.real)+ay *ay))/4.\n _imag=-math.atan2(-2. *x.imag,(1 -x.real)*(1+x.real)-ay *ay)/2.\n errno=0\n \n return complex(_real,_imag)\n \n@_takes_complex\ndef cos(x):\n ''\n return cosh(complex(-x.imag,x.real))\n \n@_takes_complex\ndef cosh(x):\n ''\n \n ret=_SPECIAL_VALUE(x,_cosh_special_values)\n if ret is not None :\n if isinstance(ret,Exception):\n raise ret\n return ret\n \n if not math.isinf(x.real)and math.fabs(x.real)>_CM_LOG_LARGE_DOUBLE:\n \n \n x_minus_one=x.real -math.copysign(1.0,x.real)\n _real=cos(x.imag)*math.cosh(x_minus_one)*math.e\n _imag=sin(x.imag)*math.sinh(x_minus_one)*math.e\n elif math.isinf(x.real)and x.imag ==0:\n if x.real >0:\n return x\n else :\n return complex(inf,-x.imag)\n elif math.isinf(x.imag):\n raise ValueError(\"math domain error\")\n else :\n _real=math.cos(x.imag)*math.cosh(x.real)\n _imag=math.sin(x.imag)*math.sinh(x.real)\n \n ret=complex(_real,_imag)\n return ret\n \n@_takes_complex\ndef exp(x):\n ''\n if math.isinf(x.real)or math.isinf(x.imag):\n \n if math.isinf(x.imag)and (-inf 0):\n raise ValueError(\"math domain error\")\n \n if math.isinf(x.real)and -inf 0:\n _real=math.copysign(inf,math.cos(x.imag))\n _imag=math.copysign(inf,math.sin(x.imag))\n else :\n _real=math.copysign(.0,math.cos(x.imag))\n _imag=math.copysign(.0,math.sin(x.imag))\n return complex(_real,_imag)\n \n return _SPECIAL_VALUE(x,_exp_special_values)\n \n if math.isnan(x.real)and x.imag ==0:\n return x\n \n if x.real >_CM_LOG_LARGE_DOUBLE:\n l=math.exp(x.real -1.);\n _real=l *math.cos(x.imag)*math.e\n _imag=l *math.sin(x.imag)*math.e\n else :\n l=math.exp(x.real);\n _real=l *math.cos(x.imag)\n _imag=l *math.sin(x.imag)\n \n if math.isinf(_real)or math.isinf(_imag):\n raise OverflowError()\n \n return complex(_real,_imag)\n \ndef isclose(x,y,*,rel_tol=1e-09,abs_tol=0.0):\n try :\n complex(x)\n except ValueError:\n raise TypeError(f\"must be a number, not {x.__class__.__name__}\")\n try :\n complex(y)\n except ValueError:\n raise TypeError(f\"must be a number, not {y.__class__.__name__}\")\n rel_tol=float(rel_tol)\n abs_tol=float(abs_tol)\n if rel_tol <0.0 or abs_tol <0.0:\n raise ValueError('tolerances must be non-negative')\n if x is inf or x is _NINF or y is inf or y is _NINF:\n return y is x\n if x is nan or y is nan:\n return False\n return abs(x -y)<=max(rel_tol *float(max(abs(x),abs(y))),abs_tol)\n \n@_takes_complex\ndef isinf(x):\n ''\n return math.isinf(x.real)or math.isinf(x.imag)\n \n@_takes_complex\ndef isnan(x):\n ''\n return math.isnan(x.real)or math.isnan(x.imag)\n \n \n@_takes_complex\ndef _to_complex(x):\n return x\n \ndef log(x,base=None ):\n ''\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n x=_to_complex(x)\n \n \n \n \n \n \n denom=1 if base is None else log(base)\n ''\n\n\n\n \n \n ret=_SPECIAL_VALUE(x,_log_special_values)\n if ret is not None :\n return ret\n \n if math.isnan(x.real):\n return complex(inf if math.isinf(x.imag)else nan,nan)\n elif math.isnan(x.imag):\n return complex(inf if math.isinf(x.real)else nan,nan)\n \n ax=math.fabs(x.real)\n ay=math.fabs(x.imag)\n \n if ax >_CM_LARGE_DOUBLE or ay >_CM_LARGE_DOUBLE:\n _real=math.log(math.hypot(ax /2.0,ay /2.0))+_M_LN2\n elif ax .0 or ay >.0:\n \n _real=math.log(math.hypot(math.ldexp(ax,sys.float_info.mant_dig),math.ldexp(ay,sys.float_info.mant_dig)))-sys.float_info.mant_dig *_M_LN2\n else :\n \n raise ValueError(\"math domain error\")\n _real=-inf\n _imag=math.atan2(x.imag,x.real)\n else :\n h=math.hypot(ax,ay)\n _real=math.log(h)/denom\n if not ay:\n if type(_real)==complex:\n return _real\n if x.real <0:\n return complex(_real,math.copysign(math.pi,x.imag))\n return complex(_real,x.imag)\n _imag=math.atan2(x.imag,x.real)\n return complex(_real,_imag)\n \n@_takes_complex\ndef log10(x):\n ''\n\n\n\n \n ret=log(x)\n _real=ret.real /_M_LN10\n _imag=ret.imag /_M_LN10\n return complex(_real,_imag)\n \n@_takes_complex\ndef sin(x):\n ''\n \n s=complex(-x.imag,x.real)\n s=sinh(s)\n return complex(s.imag,-s.real)\n \n@_takes_complex\ndef sinh(x):\n ''\n \n ret=_SPECIAL_VALUE(x,_sinh_special_values)\n if ret is not None :\n if isinstance(ret,Exception):\n raise ret\n return ret\n \n if math.isinf(x.real)or math.isinf(x.imag):\n \n \n if math.isinf(x.imag)and not math.isnan(x.real):\n raise ValueError(\"math domain error\")\n \n if math.isinf(x.real)and -inf 0:\n _real=math.copysign(inf,math.cos(x.imag))\n _imag=math.copysign(inf,math.sin(x.imag))\n else :\n _real=-math.copysign(inf,math.cos(x.imag))\n _imag=math.copysign(inf,math.sin(x.imag))\n return complex(_real,_imag)\n \n return _SPECIAL_VALUE(x,_sinh_special_values)\n \n if math.fabs(x.real)>_CM_LOG_LARGE_DOUBLE:\n x_minus_one=x.real -math.copysign(1.0,x.real)\n z=complex(x_minus_one,x.imag)\n _real=math.cos(z.imag)*math.sinh(z.real)*math.e\n _imag=math.sin(z.imag)*math.cosh(z.real)*math.e\n else :\n _real=math.cos(x.imag)*math.sinh(x.real)\n _imag=math.sin(x.imag)*math.cosh(x.real)\n \n if math.isinf(_real)or math.isinf(_imag):\n raise OverflowError()\n \n return complex(_real,_imag)\n \n@_takes_complex\ndef tan(x):\n ''\n if math.isnan(x.real):\n if math.isinf(x.imag):\n return complex(0,math.copysign(1,x.imag))\n return complex(nan,nan)\n elif math.isnan(x.imag):\n if not x.real:\n return complex(math.copysign(0,x.real),nan)\n return complex(nan,nan)\n s=tanh(complex(-x.imag,x.real))\n return complex(s.imag,-s.real)\n \n@_takes_complex\ndef tanh(x):\n ''\n ''\n\n\n \n \n \n \n \n \n \n \n \n \n if math.isnan(x.real):\n if x.imag ==0:\n return complex(nan,math.copysign(0,x.imag))\n return complex(nan,nan)\n elif math.isnan(x.imag):\n if math.isinf(x.real):\n return complex(math.copysign(1,x.real),0)\n return complex(nan,nan)\n \n if isinf(x):\n if math.isinf(x.imag)and -inf 0:\n _real=1.0\n _imag=math.copysign(.0,2.0 *math.sin(x.imag)*math.cos(x.imag))\n else :\n _real=-1.0\n _imag=math.copysign(.0,2. *math.sin(x.imag)*math.cos(x.imag))\n return complex(_real,_imag)\n return _SPECIAL_VALUE(x,_tanh_special_values)\n \n \n if math.fabs(x.real)>_CM_LOG_LARGE_DOUBLE:\n _real=math.copysign(1.,x.real)\n _imag=4. *math.sin(x.imag)*math.cos(x.imag)*math.exp(-2. *math.fabs(x.real))\n else :\n tx=math.tanh(x.real)\n ty=math.tan(x.imag)\n cx=1.0 /math.cosh(x.real)\n txty=tx *ty\n denom=1.+txty *txty\n _real=tx *(1.+ty *ty)/denom\n _imag=((ty /denom)*cx)*cx\n return complex(_real,_imag)\n \n \nFunctionType=type(_takes_complex)\nlocs=locals()\nkeys=list(locs.keys())\nfor f in keys:\n if type(locs[f])is FunctionType and not f.startswith(\"_\"):\n locals()[f]=type(abs)(locals()[f])\n \npi=math.pi\ne=math.e\ntau=math.tau\n\n_CM_LARGE_DOUBLE=sys.float_info.max /4\n_CM_SQRT_LARGE_DOUBLE=math.sqrt(_CM_LARGE_DOUBLE)\n_CM_LOG_LARGE_DOUBLE=math.log(_CM_LARGE_DOUBLE)\n_CM_SQRT_DBL_MIN=math.sqrt(sys.float_info.min)\n_M_LN2=0.6931471805599453094\n_M_LN10=2.302585092994045684\n\nif sys.float_info.radix ==2:\n _CM_SCALE_UP=int((2 *(sys.float_info.mant_dig /2)+1))\nelif sys.float_info.radix ==16:\n _CM_SCALE_UP=int((4 *sys.float_info.mant_dig+1))\nelse :\n raise (\"cmath implementation expects the float base to be either 2 or 16, got \"+str(sys.float_info.radix)+\" instead.\")\n_CM_SCALE_DOWN=int((-(_CM_SCALE_UP+1)/2))\n\ninf=float('inf')\ninfj=complex(0.0,inf)\n_NINF=float('-inf')\nnan=float('nan')\nnanj=complex(0.0,float('nan'))\n\n_P14=0.25 *pi\n_P12=0.5 *pi\n_P34=0.75 *pi\n_U=-9.5426319407711027e33\n\n\n_ST_NINF=0\n_ST_NEG=1\n_ST_NZERO=2\n_ST_PZERO=3\n_ST_POS=4\n_ST_PINF=5\n_ST_NAN=6\n\n\ndef _SPECIAL_VALUE(z,table):\n if not math.isfinite(z.real)or not math.isfinite(z.imag):\n return table[_special_type(z.real)][_special_type(z.imag)]\n else :\n return None\n \ndef _special_type(x):\n if -inf ):\"\n misc_header=\"Miscellaneous help topics:\"\n undoc_header=\"Undocumented commands:\"\n nohelp=\"*** No help on %s\"\n use_rawinput=1\n \n def __init__(self,completekey='tab',stdin=None ,stdout=None ):\n ''\n\n\n\n\n\n\n\n\n \n if stdin is not None :\n self.stdin=stdin\n else :\n self.stdin=sys.stdin\n if stdout is not None :\n self.stdout=stdout\n else :\n self.stdout=sys.stdout\n self.cmdqueue=[]\n self.completekey=completekey\n \n def cmdloop(self,intro=None ):\n ''\n\n\n\n \n \n self.preloop()\n if self.use_rawinput and self.completekey:\n try :\n import readline\n self.old_completer=readline.get_completer()\n readline.set_completer(self.complete)\n readline.parse_and_bind(self.completekey+\": complete\")\n except ImportError:\n pass\n try :\n if intro is not None :\n self.intro=intro\n if self.intro:\n self.stdout.write(str(self.intro)+\"\\n\")\n stop=None\n while not stop:\n if self.cmdqueue:\n line=self.cmdqueue.pop(0)\n else :\n if self.use_rawinput:\n try :\n line=input(self.prompt)\n except EOFError:\n line='EOF'\n else :\n self.stdout.write(self.prompt)\n self.stdout.flush()\n line=self.stdin.readline()\n if not len(line):\n line='EOF'\n else :\n line=line.rstrip('\\r\\n')\n line=self.precmd(line)\n stop=self.onecmd(line)\n stop=self.postcmd(stop,line)\n self.postloop()\n finally :\n if self.use_rawinput and self.completekey:\n try :\n import readline\n readline.set_completer(self.old_completer)\n except ImportError:\n pass\n \n \n def precmd(self,line):\n ''\n\n\n \n return line\n \n def postcmd(self,stop,line):\n ''\n return stop\n \n def preloop(self):\n ''\n pass\n \n def postloop(self):\n ''\n\n\n \n pass\n \n def parseline(self,line):\n ''\n\n\n \n line=line.strip()\n if not line:\n return None ,None ,line\n elif line[0]=='?':\n line='help '+line[1:]\n elif line[0]=='!':\n if hasattr(self,'do_shell'):\n line='shell '+line[1:]\n else :\n return None ,None ,line\n i,n=0,len(line)\n while i 0:\n cmd,args,foo=self.parseline(line)\n if cmd =='':\n compfunc=self.completedefault\n else :\n try :\n compfunc=getattr(self,'complete_'+cmd)\n except AttributeError:\n compfunc=self.completedefault\n else :\n compfunc=self.completenames\n self.completion_matches=compfunc(text,line,begidx,endidx)\n try :\n return self.completion_matches[state]\n except IndexError:\n return None\n \n def get_names(self):\n \n \n return dir(self.__class__)\n \n def complete_help(self,*args):\n commands=set(self.completenames(*args))\n topics=set(a[5:]for a in self.get_names()\n if a.startswith('help_'+args[0]))\n return list(commands |topics)\n \n def do_help(self,arg):\n ''\n if arg:\n \n try :\n func=getattr(self,'help_'+arg)\n except AttributeError:\n try :\n doc=getattr(self,'do_'+arg).__doc__\n if doc:\n self.stdout.write(\"%s\\n\"%str(doc))\n return\n except AttributeError:\n pass\n self.stdout.write(\"%s\\n\"%str(self.nohelp %(arg,)))\n return\n func()\n else :\n names=self.get_names()\n cmds_doc=[]\n cmds_undoc=[]\n topics=set()\n for name in names:\n if name[:5]=='help_':\n topics.add(name[5:])\n names.sort()\n \n prevname=''\n for name in names:\n if name[:3]=='do_':\n if name ==prevname:\n continue\n prevname=name\n cmd=name[3:]\n if cmd in topics:\n cmds_doc.append(cmd)\n topics.remove(cmd)\n elif getattr(self,name).__doc__:\n cmds_doc.append(cmd)\n else :\n cmds_undoc.append(cmd)\n self.stdout.write(\"%s\\n\"%str(self.doc_leader))\n self.print_topics(self.doc_header,cmds_doc,15,80)\n self.print_topics(self.misc_header,sorted(topics),15,80)\n self.print_topics(self.undoc_header,cmds_undoc,15,80)\n \n def print_topics(self,header,cmds,cmdlen,maxcol):\n if cmds:\n self.stdout.write(\"%s\\n\"%str(header))\n if self.ruler:\n self.stdout.write(\"%s\\n\"%str(self.ruler *len(header)))\n self.columnize(cmds,maxcol -1)\n self.stdout.write(\"\\n\")\n \n def columnize(self,list,displaywidth=80):\n ''\n\n\n\n \n if not list:\n self.stdout.write(\"\\n\")\n return\n \n nonstrings=[i for i in range(len(list))\n if not isinstance(list[i],str)]\n if nonstrings:\n raise TypeError(\"list[i] not a string for i in %s\"\n %\", \".join(map(str,nonstrings)))\n size=len(list)\n if size ==1:\n self.stdout.write('%s\\n'%str(list[0]))\n return\n \n for nrows in range(1,len(list)):\n ncols=(size+nrows -1)//nrows\n colwidths=[]\n totwidth=-2\n for col in range(ncols):\n colwidth=0\n for row in range(nrows):\n i=row+nrows *col\n if i >=size:\n break\n x=list[i]\n colwidth=max(colwidth,len(x))\n colwidths.append(colwidth)\n totwidth +=colwidth+2\n if totwidth >displaywidth:\n break\n if totwidth <=displaywidth:\n break\n else :\n nrows=len(list)\n ncols=1\n colwidths=[0]\n for row in range(nrows):\n texts=[]\n for col in range(ncols):\n i=row+nrows *col\n if i >=size:\n x=\"\"\n else :\n x=list[i]\n texts.append(x)\n while texts and not texts[-1]:\n del texts[-1]\n for col in range(len(texts)):\n texts[col]=texts[col].ljust(colwidths[col])\n self.stdout.write(\"%s\\n\"%str(\" \".join(texts)))\n", ["readline", "string", "sys"]], "code": [".py", "''\n\n\n\n\n\n\nimport sys\nimport traceback\nfrom codeop import CommandCompiler,compile_command\n\n__all__=[\"InteractiveInterpreter\",\"InteractiveConsole\",\"interact\",\n\"compile_command\"]\n\nclass InteractiveInterpreter:\n ''\n\n\n\n\n\n \n \n def __init__(self,locals=None ):\n ''\n\n\n\n\n\n\n \n if locals is None :\n locals={\"__name__\":\"__console__\",\"__doc__\":None }\n self.locals=locals\n self.compile=CommandCompiler()\n \n def runsource(self,source,filename=\"\",symbol=\"single\"):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n code=self.compile(source,filename,symbol)\n except (OverflowError,SyntaxError,ValueError):\n \n self.showsyntaxerror(filename)\n return False\n \n if code is None :\n \n return True\n \n \n self.runcode(code)\n return False\n \n def runcode(self,code):\n ''\n\n\n\n\n\n\n\n\n\n \n try :\n exec(code,self.locals)\n except SystemExit:\n raise\n except :\n self.showtraceback()\n \n def showsyntaxerror(self,filename=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n type,value,tb=sys.exc_info()\n sys.last_exc=value\n sys.last_type=type\n sys.last_value=value\n sys.last_traceback=tb\n if filename and type is SyntaxError:\n \n try :\n msg,(dummy_filename,lineno,offset,line)=value.args\n except ValueError:\n \n pass\n else :\n \n value=SyntaxError(msg,(filename,lineno,offset,line))\n sys.last_exc=sys.last_value=value\n if sys.excepthook is sys.__excepthook__:\n lines=traceback.format_exception_only(type,value)\n self.write(''.join(lines))\n else :\n \n \n sys.excepthook(type,value,tb)\n \n def showtraceback(self):\n ''\n\n\n\n\n\n \n sys.last_type,sys.last_value,last_tb=ei=sys.exc_info()\n sys.last_traceback=last_tb\n sys.last_exc=ei[1]\n try :\n lines=traceback.format_exception(ei[0],ei[1],last_tb.tb_next)\n if sys.excepthook is sys.__excepthook__:\n self.write(''.join(lines))\n else :\n \n \n sys.excepthook(ei[0],ei[1],last_tb)\n finally :\n last_tb=ei=None\n \n def write(self,data):\n ''\n\n\n\n\n \n sys.stderr.write(data)\n \n \nclass InteractiveConsole(InteractiveInterpreter):\n ''\n\n\n\n\n \n \n def __init__(self,locals=None ,filename=\"\"):\n ''\n\n\n\n\n\n\n\n \n InteractiveInterpreter.__init__(self,locals)\n self.filename=filename\n self.resetbuffer()\n \n def resetbuffer(self):\n ''\n self.buffer=[]\n \n def interact(self,banner=None ,exitmsg=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n sys.ps1\n except AttributeError:\n sys.ps1=\">>> \"\n try :\n sys.ps2\n except AttributeError:\n sys.ps2=\"... \"\n cprt='Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.'\n if banner is None :\n self.write(\"Python %s on %s\\n%s\\n(%s)\\n\"%\n (sys.version,sys.platform,cprt,\n self.__class__.__name__))\n elif banner:\n self.write(\"%s\\n\"%str(banner))\n more=0\n while 1:\n try :\n if more:\n prompt=sys.ps2\n else :\n prompt=sys.ps1\n try :\n line=self.raw_input(prompt)\n except EOFError:\n self.write(\"\\n\")\n break\n else :\n more=self.push(line)\n except KeyboardInterrupt:\n self.write(\"\\nKeyboardInterrupt\\n\")\n self.resetbuffer()\n more=0\n if exitmsg is None :\n self.write('now exiting %s...\\n'%self.__class__.__name__)\n elif exitmsg !='':\n self.write('%s\\n'%exitmsg)\n \n def push(self,line):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n self.buffer.append(line)\n source=\"\\n\".join(self.buffer)\n more=self.runsource(source,self.filename)\n if not more:\n self.resetbuffer()\n return more\n \n def raw_input(self,prompt=\"\"):\n ''\n\n\n\n\n\n\n\n\n \n return input(prompt)\n \n \n \ndef interact(banner=None ,readfunc=None ,local=None ,exitmsg=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n console=InteractiveConsole(local)\n if readfunc is not None :\n console.raw_input=readfunc\n else :\n try :\n import readline\n except ImportError:\n pass\n console.interact(banner,exitmsg)\n \n \nif __name__ ==\"__main__\":\n import argparse\n \n parser=argparse.ArgumentParser()\n parser.add_argument('-q',action='store_true',\n help=\"don't print version and copyright messages\")\n args=parser.parse_args()\n if args.q or sys.flags.quiet:\n banner=''\n else :\n banner=None\n interact(banner)\n", ["argparse", "codeop", "readline", "sys", "traceback"]], "codecs": [".py", "''\n\n\n\n\n\n\n\n\nimport builtins\nimport sys\n\n\n\ntry :\n from _codecs import *\nexcept ImportError as why:\n raise SystemError('Failed to load the builtin codecs: %s'%why)\n \n__all__=[\"register\",\"lookup\",\"open\",\"EncodedFile\",\"BOM\",\"BOM_BE\",\n\"BOM_LE\",\"BOM32_BE\",\"BOM32_LE\",\"BOM64_BE\",\"BOM64_LE\",\n\"BOM_UTF8\",\"BOM_UTF16\",\"BOM_UTF16_LE\",\"BOM_UTF16_BE\",\n\"BOM_UTF32\",\"BOM_UTF32_LE\",\"BOM_UTF32_BE\",\n\"CodecInfo\",\"Codec\",\"IncrementalEncoder\",\"IncrementalDecoder\",\n\"StreamReader\",\"StreamWriter\",\n\"StreamReaderWriter\",\"StreamRecoder\",\n\"getencoder\",\"getdecoder\",\"getincrementalencoder\",\n\"getincrementaldecoder\",\"getreader\",\"getwriter\",\n\"encode\",\"decode\",\"iterencode\",\"iterdecode\",\n\"strict_errors\",\"ignore_errors\",\"replace_errors\",\n\"xmlcharrefreplace_errors\",\n\"backslashreplace_errors\",\"namereplace_errors\",\n\"register_error\",\"lookup_error\"]\n\n\n\n\n\n\n\n\n\n\nBOM_UTF8=b'\\xef\\xbb\\xbf'\n\n\nBOM_LE=BOM_UTF16_LE=b'\\xff\\xfe'\n\n\nBOM_BE=BOM_UTF16_BE=b'\\xfe\\xff'\n\n\nBOM_UTF32_LE=b'\\xff\\xfe\\x00\\x00'\n\n\nBOM_UTF32_BE=b'\\x00\\x00\\xfe\\xff'\n\nif sys.byteorder =='little':\n\n\n BOM=BOM_UTF16=BOM_UTF16_LE\n \n \n BOM_UTF32=BOM_UTF32_LE\n \nelse :\n\n\n BOM=BOM_UTF16=BOM_UTF16_BE\n \n \n BOM_UTF32=BOM_UTF32_BE\n \n \nBOM32_LE=BOM_UTF16_LE\nBOM32_BE=BOM_UTF16_BE\nBOM64_LE=BOM_UTF32_LE\nBOM64_BE=BOM_UTF32_BE\n\n\n\n\nclass CodecInfo(tuple):\n ''\n \n \n \n \n \n \n \n _is_text_encoding=True\n \n def __new__(cls,encode,decode,streamreader=None ,streamwriter=None ,\n incrementalencoder=None ,incrementaldecoder=None ,name=None ,\n *,_is_text_encoding=None ):\n self=tuple.__new__(cls,(encode,decode,streamreader,streamwriter))\n self.name=name\n self.encode=encode\n self.decode=decode\n self.incrementalencoder=incrementalencoder\n self.incrementaldecoder=incrementaldecoder\n self.streamwriter=streamwriter\n self.streamreader=streamreader\n if _is_text_encoding is not None :\n self._is_text_encoding=_is_text_encoding\n return self\n \n def __repr__(self):\n return \"<%s.%s object for encoding %s at %#x>\"%\\\n (self.__class__.__module__,self.__class__.__qualname__,\n self.name,id(self))\n \nclass Codec:\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def encode(self,input,errors='strict'):\n \n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n raise NotImplementedError\n \n def decode(self,input,errors='strict'):\n \n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n raise NotImplementedError\n \nclass IncrementalEncoder(object):\n ''\n\n\n\n \n def __init__(self,errors='strict'):\n ''\n\n\n\n\n\n \n self.errors=errors\n self.buffer=\"\"\n \n def encode(self,input,final=False ):\n ''\n\n \n raise NotImplementedError\n \n def reset(self):\n ''\n\n \n \n def getstate(self):\n ''\n\n \n return 0\n \n def setstate(self,state):\n ''\n\n\n \n \nclass BufferedIncrementalEncoder(IncrementalEncoder):\n ''\n\n\n\n \n def __init__(self,errors='strict'):\n IncrementalEncoder.__init__(self,errors)\n \n self.buffer=\"\"\n \n def _buffer_encode(self,input,errors,final):\n \n \n raise NotImplementedError\n \n def encode(self,input,final=False ):\n \n data=self.buffer+input\n (result,consumed)=self._buffer_encode(data,self.errors,final)\n \n self.buffer=data[consumed:]\n return result\n \n def reset(self):\n IncrementalEncoder.reset(self)\n self.buffer=\"\"\n \n def getstate(self):\n return self.buffer or 0\n \n def setstate(self,state):\n self.buffer=state or \"\"\n \nclass IncrementalDecoder(object):\n ''\n\n\n\n \n def __init__(self,errors='strict'):\n ''\n\n\n\n\n\n \n self.errors=errors\n \n def decode(self,input,final=False ):\n ''\n\n \n raise NotImplementedError\n \n def reset(self):\n ''\n\n \n \n def getstate(self):\n ''\n\n\n\n\n\n\n\n\n\n \n return (b\"\",0)\n \n def setstate(self,state):\n ''\n\n\n\n\n \n \nclass BufferedIncrementalDecoder(IncrementalDecoder):\n ''\n\n\n\n \n def __init__(self,errors='strict'):\n IncrementalDecoder.__init__(self,errors)\n \n self.buffer=b\"\"\n \n def _buffer_decode(self,input,errors,final):\n \n \n raise NotImplementedError\n \n def decode(self,input,final=False ):\n \n data=self.buffer+input\n (result,consumed)=self._buffer_decode(data,self.errors,final)\n \n self.buffer=data[consumed:]\n return result\n \n def reset(self):\n IncrementalDecoder.reset(self)\n self.buffer=b\"\"\n \n def getstate(self):\n \n return (self.buffer,0)\n \n def setstate(self,state):\n \n self.buffer=state[0]\n \n \n \n \n \n \n \n \nclass StreamWriter(Codec):\n\n def __init__(self,stream,errors='strict'):\n \n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self.stream=stream\n self.errors=errors\n \n def write(self,object):\n \n ''\n \n data,consumed=self.encode(object,self.errors)\n self.stream.write(data)\n \n def writelines(self,list):\n \n ''\n\n \n self.write(''.join(list))\n \n def reset(self):\n \n ''\n\n\n\n\n\n\n \n pass\n \n def seek(self,offset,whence=0):\n self.stream.seek(offset,whence)\n if whence ==0 and offset ==0:\n self.reset()\n \n def __getattr__(self,name,\n getattr=getattr):\n \n ''\n \n return getattr(self.stream,name)\n \n def __enter__(self):\n return self\n \n def __exit__(self,type,value,tb):\n self.stream.close()\n \n \n \nclass StreamReader(Codec):\n\n charbuffertype=str\n \n def __init__(self,stream,errors='strict'):\n \n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self.stream=stream\n self.errors=errors\n self.bytebuffer=b\"\"\n self._empty_charbuffer=self.charbuffertype()\n self.charbuffer=self._empty_charbuffer\n self.linebuffer=None\n \n def decode(self,input,errors='strict'):\n raise NotImplementedError\n \n def read(self,size=-1,chars=-1,firstline=False ):\n \n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if self.linebuffer:\n self.charbuffer=self._empty_charbuffer.join(self.linebuffer)\n self.linebuffer=None\n \n if chars <0:\n \n \n chars=size\n \n \n while True :\n \n if chars >=0:\n if len(self.charbuffer)>=chars:\n break\n \n if size <0:\n newdata=self.stream.read()\n else :\n newdata=self.stream.read(size)\n \n data=self.bytebuffer+newdata\n if not data:\n break\n try :\n newchars,decodedbytes=self.decode(data,self.errors)\n except UnicodeDecodeError as exc:\n if firstline:\n newchars,decodedbytes=\\\n self.decode(data[:exc.start],self.errors)\n lines=newchars.splitlines(keepends=True )\n if len(lines)<=1:\n raise\n else :\n raise\n \n self.bytebuffer=data[decodedbytes:]\n \n self.charbuffer +=newchars\n \n if not newdata:\n break\n if chars <0:\n \n result=self.charbuffer\n self.charbuffer=self._empty_charbuffer\n else :\n \n result=self.charbuffer[:chars]\n self.charbuffer=self.charbuffer[chars:]\n return result\n \n def readline(self,size=None ,keepends=True ):\n \n ''\n\n\n\n\n\n \n \n \n if self.linebuffer:\n line=self.linebuffer[0]\n del self.linebuffer[0]\n if len(self.linebuffer)==1:\n \n \n self.charbuffer=self.linebuffer[0]\n self.linebuffer=None\n if not keepends:\n line=line.splitlines(keepends=False )[0]\n return line\n \n readsize=size or 72\n line=self._empty_charbuffer\n \n while True :\n data=self.read(readsize,firstline=True )\n if data:\n \n \n \n if (isinstance(data,str)and data.endswith(\"\\r\"))or\\\n (isinstance(data,bytes)and data.endswith(b\"\\r\")):\n data +=self.read(size=1,chars=1)\n \n line +=data\n lines=line.splitlines(keepends=True )\n if lines:\n if len(lines)>1:\n \n \n line=lines[0]\n del lines[0]\n if len(lines)>1:\n \n lines[-1]+=self.charbuffer\n self.linebuffer=lines\n self.charbuffer=None\n else :\n \n self.charbuffer=lines[0]+self.charbuffer\n if not keepends:\n line=line.splitlines(keepends=False )[0]\n break\n line0withend=lines[0]\n line0withoutend=lines[0].splitlines(keepends=False )[0]\n if line0withend !=line0withoutend:\n \n self.charbuffer=self._empty_charbuffer.join(lines[1:])+\\\n self.charbuffer\n if keepends:\n line=line0withend\n else :\n line=line0withoutend\n break\n \n if not data or size is not None :\n if line and not keepends:\n line=line.splitlines(keepends=False )[0]\n break\n if readsize <8000:\n readsize *=2\n return line\n \n def readlines(self,sizehint=None ,keepends=True ):\n \n ''\n\n\n\n\n\n\n\n\n \n data=self.read()\n return data.splitlines(keepends)\n \n def reset(self):\n \n ''\n\n\n\n\n\n \n self.bytebuffer=b\"\"\n self.charbuffer=self._empty_charbuffer\n self.linebuffer=None\n \n def seek(self,offset,whence=0):\n ''\n\n\n \n self.stream.seek(offset,whence)\n self.reset()\n \n def __next__(self):\n \n ''\n line=self.readline()\n if line:\n return line\n raise StopIteration\n \n def __iter__(self):\n return self\n \n def __getattr__(self,name,\n getattr=getattr):\n \n ''\n \n return getattr(self.stream,name)\n \n def __enter__(self):\n return self\n \n def __exit__(self,type,value,tb):\n self.stream.close()\n \n \n \nclass StreamReaderWriter:\n\n ''\n\n\n\n\n\n\n \n \n encoding='unknown'\n \n def __init__(self,stream,Reader,Writer,errors='strict'):\n \n ''\n\n\n\n\n\n\n\n\n\n \n self.stream=stream\n self.reader=Reader(stream,errors)\n self.writer=Writer(stream,errors)\n self.errors=errors\n \n def read(self,size=-1):\n \n return self.reader.read(size)\n \n def readline(self,size=None ):\n \n return self.reader.readline(size)\n \n def readlines(self,sizehint=None ):\n \n return self.reader.readlines(sizehint)\n \n def __next__(self):\n \n ''\n return next(self.reader)\n \n def __iter__(self):\n return self\n \n def write(self,data):\n \n return self.writer.write(data)\n \n def writelines(self,list):\n \n return self.writer.writelines(list)\n \n def reset(self):\n \n self.reader.reset()\n self.writer.reset()\n \n def seek(self,offset,whence=0):\n self.stream.seek(offset,whence)\n self.reader.reset()\n if whence ==0 and offset ==0:\n self.writer.reset()\n \n def __getattr__(self,name,\n getattr=getattr):\n \n ''\n \n return getattr(self.stream,name)\n \n \n \n def __enter__(self):\n return self\n \n def __exit__(self,type,value,tb):\n self.stream.close()\n \n \n \nclass StreamRecoder:\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n data_encoding='unknown'\n file_encoding='unknown'\n \n def __init__(self,stream,encode,decode,Reader,Writer,\n errors='strict'):\n \n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self.stream=stream\n self.encode=encode\n self.decode=decode\n self.reader=Reader(stream,errors)\n self.writer=Writer(stream,errors)\n self.errors=errors\n \n def read(self,size=-1):\n \n data=self.reader.read(size)\n data,bytesencoded=self.encode(data,self.errors)\n return data\n \n def readline(self,size=None ):\n \n if size is None :\n data=self.reader.readline()\n else :\n data=self.reader.readline(size)\n data,bytesencoded=self.encode(data,self.errors)\n return data\n \n def readlines(self,sizehint=None ):\n \n data=self.reader.read()\n data,bytesencoded=self.encode(data,self.errors)\n return data.splitlines(keepends=True )\n \n def __next__(self):\n \n ''\n data=next(self.reader)\n data,bytesencoded=self.encode(data,self.errors)\n return data\n \n def __iter__(self):\n return self\n \n def write(self,data):\n \n data,bytesdecoded=self.decode(data,self.errors)\n return self.writer.write(data)\n \n def writelines(self,list):\n \n data=b''.join(list)\n data,bytesdecoded=self.decode(data,self.errors)\n return self.writer.write(data)\n \n def reset(self):\n \n self.reader.reset()\n self.writer.reset()\n \n def seek(self,offset,whence=0):\n \n \n self.reader.seek(offset,whence)\n self.writer.seek(offset,whence)\n \n def __getattr__(self,name,\n getattr=getattr):\n \n ''\n \n return getattr(self.stream,name)\n \n def __enter__(self):\n return self\n \n def __exit__(self,type,value,tb):\n self.stream.close()\n \n \n \ndef open(filename,mode='r',encoding=None ,errors='strict',buffering=-1):\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if encoding is not None and\\\n 'b'not in mode:\n \n mode=mode+'b'\n file=builtins.open(filename,mode,buffering)\n if encoding is None :\n return file\n \n try :\n info=lookup(encoding)\n srw=StreamReaderWriter(file,info.streamreader,info.streamwriter,errors)\n \n srw.encoding=encoding\n return srw\n except :\n file.close()\n raise\n \ndef EncodedFile(file,data_encoding,file_encoding=None ,errors='strict'):\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if file_encoding is None :\n file_encoding=data_encoding\n data_info=lookup(data_encoding)\n file_info=lookup(file_encoding)\n sr=StreamRecoder(file,data_info.encode,data_info.decode,\n file_info.streamreader,file_info.streamwriter,errors)\n \n sr.data_encoding=data_encoding\n sr.file_encoding=file_encoding\n return sr\n \n \n \ndef getencoder(encoding):\n\n ''\n\n\n\n\n \n return lookup(encoding).encode\n \ndef getdecoder(encoding):\n\n ''\n\n\n\n\n \n return lookup(encoding).decode\n \ndef getincrementalencoder(encoding):\n\n ''\n\n\n\n\n\n \n encoder=lookup(encoding).incrementalencoder\n if encoder is None :\n raise LookupError(encoding)\n return encoder\n \ndef getincrementaldecoder(encoding):\n\n ''\n\n\n\n\n\n \n decoder=lookup(encoding).incrementaldecoder\n if decoder is None :\n raise LookupError(encoding)\n return decoder\n \ndef getreader(encoding):\n\n ''\n\n\n\n\n \n return lookup(encoding).streamreader\n \ndef getwriter(encoding):\n\n ''\n\n\n\n\n \n return lookup(encoding).streamwriter\n \ndef iterencode(iterator,encoding,errors='strict',**kwargs):\n ''\n\n\n\n\n\n\n \n encoder=getincrementalencoder(encoding)(errors,**kwargs)\n for input in iterator:\n output=encoder.encode(input)\n if output:\n yield output\n output=encoder.encode(\"\",True )\n if output:\n yield output\n \ndef iterdecode(iterator,encoding,errors='strict',**kwargs):\n ''\n\n\n\n\n\n\n \n decoder=getincrementaldecoder(encoding)(errors,**kwargs)\n for input in iterator:\n output=decoder.decode(input)\n if output:\n yield output\n output=decoder.decode(b\"\",True )\n if output:\n yield output\n \n \n \ndef make_identity_dict(rng):\n\n ''\n\n\n\n\n \n return {i:i for i in rng}\n \ndef make_encoding_map(decoding_map):\n\n ''\n\n\n\n\n\n\n\n\n\n \n m={}\n for k,v in decoding_map.items():\n if not v in m:\n m[v]=k\n else :\n m[v]=None\n return m\n \n \n \ntry :\n strict_errors=lookup_error(\"strict\")\n ignore_errors=lookup_error(\"ignore\")\n replace_errors=lookup_error(\"replace\")\n xmlcharrefreplace_errors=lookup_error(\"xmlcharrefreplace\")\n backslashreplace_errors=lookup_error(\"backslashreplace\")\n namereplace_errors=lookup_error(\"namereplace\")\nexcept LookupError:\n\n strict_errors=None\n ignore_errors=None\n replace_errors=None\n xmlcharrefreplace_errors=None\n backslashreplace_errors=None\n namereplace_errors=None\n \n \n \n_false=0\nif _false:\n import encodings\n", ["_codecs", "builtins", "encodings", "sys"]], "codeop": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport __future__\nimport warnings\n\n_features=[getattr(__future__,fname)\nfor fname in __future__.all_feature_names]\n\n__all__=[\"compile_command\",\"Compile\",\"CommandCompiler\"]\n\n\n\n\nPyCF_DONT_IMPLY_DEDENT=0x200\nPyCF_ALLOW_INCOMPLETE_INPUT=0x4000\n\ndef _maybe_compile(compiler,source,filename,symbol):\n\n for line in source.split(\"\\n\"):\n line=line.strip()\n if line and line[0]!='#':\n break\n else :\n if symbol !=\"eval\":\n source=\"pass\"\n \n \n with warnings.catch_warnings():\n warnings.simplefilter(\"ignore\",(SyntaxWarning,DeprecationWarning))\n try :\n compiler(source,filename,symbol)\n except SyntaxError:\n try :\n compiler(source+\"\\n\",filename,symbol)\n return None\n except SyntaxError as e:\n if \"incomplete input\"in str(e):\n return None\n \n \n return compiler(source,filename,symbol)\n \n \ndef _is_syntax_error(err1,err2):\n rep1=repr(err1)\n rep2=repr(err2)\n if \"was never closed\"in rep1 and \"was never closed\"in rep2:\n return False\n if rep1 ==rep2:\n return True\n return False\n \ndef _compile(source,filename,symbol):\n return compile(source,filename,symbol,PyCF_DONT_IMPLY_DEDENT |PyCF_ALLOW_INCOMPLETE_INPUT)\n \ndef compile_command(source,filename=\"\",symbol=\"single\"):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n return _maybe_compile(_compile,source,filename,symbol)\n \nclass Compile:\n ''\n\n\n \n def __init__(self):\n self.flags=PyCF_DONT_IMPLY_DEDENT |PyCF_ALLOW_INCOMPLETE_INPUT\n \n def __call__(self,source,filename,symbol):\n codeob=compile(source,filename,symbol,self.flags,True )\n for feature in _features:\n if codeob.co_flags&feature.compiler_flag:\n self.flags |=feature.compiler_flag\n return codeob\n \nclass CommandCompiler:\n ''\n\n\n\n \n \n def __init__(self,):\n self.compiler=Compile()\n \n def __call__(self,source,filename=\"\",symbol=\"single\"):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n return _maybe_compile(self.compiler,source,filename,symbol)\n", ["__future__", "warnings"]], "colorsys": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=[\"rgb_to_yiq\",\"yiq_to_rgb\",\"rgb_to_hls\",\"hls_to_rgb\",\n\"rgb_to_hsv\",\"hsv_to_rgb\"]\n\n\n\nONE_THIRD=1.0 /3.0\nONE_SIXTH=1.0 /6.0\nTWO_THIRD=2.0 /3.0\n\n\n\n\n\n\n\n\ndef rgb_to_yiq(r,g,b):\n y=0.30 *r+0.59 *g+0.11 *b\n i=0.74 *(r -y)-0.27 *(b -y)\n q=0.48 *(r -y)+0.41 *(b -y)\n return (y,i,q)\n \ndef yiq_to_rgb(y,i,q):\n\n\n\n\n r=y+0.9468822170900693 *i+0.6235565819861433 *q\n g=y -0.27478764629897834 *i -0.6356910791873801 *q\n b=y -1.1085450346420322 *i+1.7090069284064666 *q\n \n if r <0.0:\n r=0.0\n if g <0.0:\n g=0.0\n if b <0.0:\n b=0.0\n if r >1.0:\n r=1.0\n if g >1.0:\n g=1.0\n if b >1.0:\n b=1.0\n return (r,g,b)\n \n \n \n \n \n \n \ndef rgb_to_hls(r,g,b):\n maxc=max(r,g,b)\n minc=min(r,g,b)\n sumc=(maxc+minc)\n rangec=(maxc -minc)\n l=sumc /2.0\n if minc ==maxc:\n return 0.0,l,0.0\n if l <=0.5:\n s=rangec /sumc\n else :\n s=rangec /(2.0 -sumc)\n rc=(maxc -r)/rangec\n gc=(maxc -g)/rangec\n bc=(maxc -b)/rangec\n if r ==maxc:\n h=bc -gc\n elif g ==maxc:\n h=2.0+rc -bc\n else :\n h=4.0+gc -rc\n h=(h /6.0)%1.0\n return h,l,s\n \ndef hls_to_rgb(h,l,s):\n if s ==0.0:\n return l,l,l\n if l <=0.5:\n m2=l *(1.0+s)\n else :\n m2=l+s -(l *s)\n m1=2.0 *l -m2\n return (_v(m1,m2,h+ONE_THIRD),_v(m1,m2,h),_v(m1,m2,h -ONE_THIRD))\n \ndef _v(m1,m2,hue):\n hue=hue %1.0\n if hue MAX_INTERPOLATION_DEPTH:\n raise InterpolationDepthError(option,section,rawval)\n while rest:\n p=rest.find(\"%\")\n if p <0:\n accum.append(rest)\n return\n if p >0:\n accum.append(rest[:p])\n rest=rest[p:]\n \n c=rest[1:2]\n if c ==\"%\":\n accum.append(\"%\")\n rest=rest[2:]\n elif c ==\"(\":\n m=self._KEYCRE.match(rest)\n if m is None :\n raise InterpolationSyntaxError(option,section,\n \"bad interpolation variable reference %r\"%rest)\n var=parser.optionxform(m.group(1))\n rest=rest[m.end():]\n try :\n v=map[var]\n except KeyError:\n raise InterpolationMissingOptionError(\n option,section,rawval,var)from None\n if \"%\"in v:\n self._interpolate_some(parser,option,accum,v,\n section,map,depth+1)\n else :\n accum.append(v)\n else :\n raise InterpolationSyntaxError(\n option,section,\n \"'%%' must be followed by '%%' or '(', \"\n \"found: %r\"%(rest,))\n \n \nclass ExtendedInterpolation(Interpolation):\n ''\n \n \n _KEYCRE=re.compile(r\"\\$\\{([^}]+)\\}\")\n \n def before_get(self,parser,section,option,value,defaults):\n L=[]\n self._interpolate_some(parser,option,L,value,section,defaults,1)\n return ''.join(L)\n \n def before_set(self,parser,section,option,value):\n tmp_value=value.replace('$$','')\n tmp_value=self._KEYCRE.sub('',tmp_value)\n if '$'in tmp_value:\n raise ValueError(\"invalid interpolation syntax in %r at \"\n \"position %d\"%(value,tmp_value.find('$')))\n return value\n \n def _interpolate_some(self,parser,option,accum,rest,section,map,\n depth):\n rawval=parser.get(section,option,raw=True ,fallback=rest)\n if depth >MAX_INTERPOLATION_DEPTH:\n raise InterpolationDepthError(option,section,rawval)\n while rest:\n p=rest.find(\"$\")\n if p <0:\n accum.append(rest)\n return\n if p >0:\n accum.append(rest[:p])\n rest=rest[p:]\n \n c=rest[1:2]\n if c ==\"$\":\n accum.append(\"$\")\n rest=rest[2:]\n elif c ==\"{\":\n m=self._KEYCRE.match(rest)\n if m is None :\n raise InterpolationSyntaxError(option,section,\n \"bad interpolation variable reference %r\"%rest)\n path=m.group(1).split(':')\n rest=rest[m.end():]\n sect=section\n opt=option\n try :\n if len(path)==1:\n opt=parser.optionxform(path[0])\n v=map[opt]\n elif len(path)==2:\n sect=path[0]\n opt=parser.optionxform(path[1])\n v=parser.get(sect,opt,raw=True )\n else :\n raise InterpolationSyntaxError(\n option,section,\n \"More than one ':' found: %r\"%(rest,))\n except (KeyError,NoSectionError,NoOptionError):\n raise InterpolationMissingOptionError(\n option,section,rawval,\":\".join(path))from None\n if \"$\"in v:\n self._interpolate_some(parser,opt,accum,v,sect,\n dict(parser.items(sect,raw=True )),\n depth+1)\n else :\n accum.append(v)\n else :\n raise InterpolationSyntaxError(\n option,section,\n \"'$' must be followed by '$' or '{', \"\n \"found: %r\"%(rest,))\n \n \nclass LegacyInterpolation(Interpolation):\n ''\n \n \n _KEYCRE=re.compile(r\"%\\(([^)]*)\\)s|.\")\n \n def __init__(self,*args,**kwargs):\n super().__init__(*args,**kwargs)\n warnings.warn(\n \"LegacyInterpolation has been deprecated since Python 3.2 \"\n \"and will be removed from the configparser module in Python 3.13. \"\n \"Use BasicInterpolation or ExtendedInterpolation instead.\",\n DeprecationWarning,stacklevel=2\n )\n \n def before_get(self,parser,section,option,value,vars):\n rawval=value\n depth=MAX_INTERPOLATION_DEPTH\n while depth:\n depth -=1\n if value and \"%(\"in value:\n replace=functools.partial(self._interpolation_replace,\n parser=parser)\n value=self._KEYCRE.sub(replace,value)\n try :\n value=value %vars\n except KeyError as e:\n raise InterpolationMissingOptionError(\n option,section,rawval,e.args[0])from None\n else :\n break\n if value and \"%(\"in value:\n raise InterpolationDepthError(option,section,rawval)\n return value\n \n def before_set(self,parser,section,option,value):\n return value\n \n @staticmethod\n def _interpolation_replace(match,parser):\n s=match.group(1)\n if s is None :\n return match.group()\n else :\n return \"%%(%s)s\"%parser.optionxform(s)\n \n \nclass RawConfigParser(MutableMapping):\n ''\n \n \n _SECT_TMPL=r\"\"\"\n \\[ # [\n (?P

    .+) # very permissive!\n \\] # ]\n \"\"\"\n _OPT_TMPL=r\"\"\"\n (?Pn'%(\n toprefix,num_chg)\n else :\n in_change=False\n \n if not flaglist:\n flaglist=[False ]\n next_id=['']\n next_href=['']\n last=0\n if context:\n fromlist=[' No Differences Found ']\n tolist=fromlist\n else :\n fromlist=tolist=[' Empty File ']\n \n if not flaglist[0]:\n next_href[0]='f'%toprefix\n \n next_href[last]='t'%(toprefix)\n \n return fromlist,tolist,flaglist,next_href,next_id\n \n def make_table(self,fromlines,tolines,fromdesc='',todesc='',context=False ,\n numlines=5):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n self._make_prefix()\n \n \n \n fromlines,tolines=self._tab_newline_replace(fromlines,tolines)\n \n \n if context:\n context_lines=numlines\n else :\n context_lines=None\n diffs=_mdiff(fromlines,tolines,context_lines,linejunk=self._linejunk,\n charjunk=self._charjunk)\n \n \n if self._wrapcolumn:\n diffs=self._line_wrapper(diffs)\n \n \n fromlist,tolist,flaglist=self._collect_lines(diffs)\n \n \n fromlist,tolist,flaglist,next_href,next_id=self._convert_flags(\n fromlist,tolist,flaglist,context,numlines)\n \n s=[]\n fmt=' %s%s'+\\\n '%s%s\\n'\n for i in range(len(flaglist)):\n if flaglist[i]is None :\n \n \n if i >0:\n s.append(' \\n \\n')\n else :\n s.append(fmt %(next_id[i],next_href[i],fromlist[i],\n next_href[i],tolist[i]))\n if fromdesc or todesc:\n header_row='%s%s%s%s'%(\n '
    ',\n '%s'%fromdesc,\n '
    ',\n '%s'%todesc)\n else :\n header_row=''\n \n table=self._table_template %dict(\n data_rows=''.join(s),\n header_row=header_row,\n prefix=self._prefix[1])\n \n return table.replace('\\0+','').\\\n replace('\\0-','').\\\n replace('\\0^','').\\\n replace('\\1','').\\\n replace('\\t',' ')\n \ndel re\n\ndef restore(delta,which):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n tag={1:\"- \",2:\"+ \"}[int(which)]\n except KeyError:\n raise ValueError('unknown delta choice (must be 1 or 2): %r'\n %which)from None\n prefixes=(\" \",tag)\n for line in delta:\n if line[:2]in prefixes:\n yield line[2:]\n \ndef _test():\n import doctest,difflib\n return doctest.testmod(difflib)\n \nif __name__ ==\"__main__\":\n _test()\n", ["collections", "difflib", "doctest", "heapq", "re", "types"]], "doctest": [".py", "\n\n\n\n\n\n\n\nr\"\"\"Module doctest -- a framework for running examples in docstrings.\n\nIn simplest use, end each module M to be tested with:\n\ndef _test():\n import doctest\n doctest.testmod()\n\nif __name__ == \"__main__\":\n _test()\n\nThen running the module as a script will cause the examples in the\ndocstrings to get executed and verified:\n\npython M.py\n\nThis won't display anything unless an example fails, in which case the\nfailing example(s) and the cause(s) of the failure(s) are printed to stdout\n(why not stderr? because stderr is a lame hack <0.2 wink>), and the final\nline of output is \"Test failed.\".\n\nRun it with the -v switch instead:\n\npython M.py -v\n\nand a detailed report of all examples tried is printed to stdout, along\nwith assorted summaries at the end.\n\nYou can force verbose mode by passing \"verbose=True\" to testmod, or prohibit\nit by passing \"verbose=False\". In either of those cases, sys.argv is not\nexamined by testmod.\n\nThere are a variety of other ways to run doctests, including integration\nwith the unittest framework, and support for running non-Python text\nfiles containing doctests. There are also many ways to override parts\nof doctest's default behaviors. See the Library Reference Manual for\ndetails.\n\"\"\"\n\n__docformat__='reStructuredText en'\n\n__all__=[\n\n'register_optionflag',\n'DONT_ACCEPT_TRUE_FOR_1',\n'DONT_ACCEPT_BLANKLINE',\n'NORMALIZE_WHITESPACE',\n'ELLIPSIS',\n'SKIP',\n'IGNORE_EXCEPTION_DETAIL',\n'COMPARISON_FLAGS',\n'REPORT_UDIFF',\n'REPORT_CDIFF',\n'REPORT_NDIFF',\n'REPORT_ONLY_FIRST_FAILURE',\n'REPORTING_FLAGS',\n'FAIL_FAST',\n\n\n'Example',\n'DocTest',\n\n'DocTestParser',\n\n'DocTestFinder',\n\n'DocTestRunner',\n'OutputChecker',\n'DocTestFailure',\n'UnexpectedException',\n'DebugRunner',\n\n'testmod',\n'testfile',\n'run_docstring_examples',\n\n'DocTestSuite',\n'DocFileSuite',\n'set_unittest_reportflags',\n\n'script_from_examples',\n'testsource',\n'debug_src',\n'debug',\n]\n\nimport __future__\nimport difflib\nimport inspect\nimport linecache\nimport os\nimport pdb\nimport re\nimport sys\nimport traceback\nimport unittest\nfrom io import StringIO,IncrementalNewlineDecoder\nfrom collections import namedtuple\n\nTestResults=namedtuple('TestResults','failed attempted')\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nOPTIONFLAGS_BY_NAME={}\ndef register_optionflag(name):\n\n return OPTIONFLAGS_BY_NAME.setdefault(name,1 <=2\n \n \n startpos,endpos=0,len(got)\n w=ws[0]\n if w:\n if got.startswith(w):\n startpos=len(w)\n del ws[0]\n else :\n return False\n w=ws[-1]\n if w:\n if got.endswith(w):\n endpos -=len(w)\n del ws[-1]\n else :\n return False\n \n if startpos >endpos:\n \n \n return False\n \n \n \n \n for w in ws:\n \n \n \n startpos=got.find(w,startpos,endpos)\n if startpos <0:\n return False\n startpos +=len(w)\n \n return True\n \ndef _comment_line(line):\n ''\n line=line.rstrip()\n if line:\n return '# '+line\n else :\n return '#'\n \ndef _strip_exception_details(msg):\n\n\n\n\n\n\n\n\n\n\n start,end=0,len(msg)\n \n i=msg.find(\"\\n\")\n if i >=0:\n end=i\n \n i=msg.find(':',0,end)\n if i >=0:\n end=i\n \n i=msg.rfind('.',0,end)\n if i >=0:\n start=i+1\n return msg[start:end]\n \nclass _OutputRedirectingPdb(pdb.Pdb):\n ''\n\n\n\n \n def __init__(self,out):\n self.__out=out\n self.__debugger_used=False\n \n pdb.Pdb.__init__(self,stdout=out,nosigint=True )\n \n self.use_rawinput=1\n \n def set_trace(self,frame=None ):\n self.__debugger_used=True\n if frame is None :\n frame=sys._getframe().f_back\n pdb.Pdb.set_trace(self,frame)\n \n def set_continue(self):\n \n \n if self.__debugger_used:\n pdb.Pdb.set_continue(self)\n \n def trace_dispatch(self,*args):\n \n save_stdout=sys.stdout\n sys.stdout=self.__out\n \n try :\n return pdb.Pdb.trace_dispatch(self,*args)\n finally :\n sys.stdout=save_stdout\n \n \ndef _module_relative_path(module,test_path):\n if not inspect.ismodule(module):\n raise TypeError('Expected a module: %r'%module)\n if test_path.startswith('/'):\n raise ValueError('Module-relative files may not have absolute paths')\n \n \n test_path=os.path.join(*(test_path.split('/')))\n \n \n if hasattr(module,'__file__'):\n \n basedir=os.path.split(module.__file__)[0]\n elif module.__name__ =='__main__':\n \n if len(sys.argv)>0 and sys.argv[0]!='':\n basedir=os.path.split(sys.argv[0])[0]\n else :\n basedir=os.curdir\n else :\n if hasattr(module,'__path__'):\n for directory in module.__path__:\n fullpath=os.path.join(directory,test_path)\n if os.path.exists(fullpath):\n return fullpath\n \n \n raise ValueError(\"Can't resolve paths relative to the module \"\n \"%r (it has no __file__)\"\n %module.__name__)\n \n \n return os.path.join(basedir,test_path)\n \n \n \n \n \n \n \n \n \n \n \n \n \nclass Example:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def __init__(self,source,want,exc_msg=None ,lineno=0,indent=0,\n options=None ):\n \n if not source.endswith('\\n'):\n source +='\\n'\n if want and not want.endswith('\\n'):\n want +='\\n'\n if exc_msg is not None and not exc_msg.endswith('\\n'):\n exc_msg +='\\n'\n \n self.source=source\n self.want=want\n self.lineno=lineno\n self.indent=indent\n if options is None :options={}\n self.options=options\n self.exc_msg=exc_msg\n \n def __eq__(self,other):\n if type(self)is not type(other):\n return NotImplemented\n \n return self.source ==other.source and\\\n self.want ==other.want and\\\n self.lineno ==other.lineno and\\\n self.indent ==other.indent and\\\n self.options ==other.options and\\\n self.exc_msg ==other.exc_msg\n \n def __hash__(self):\n return hash((self.source,self.want,self.lineno,self.indent,\n self.exc_msg))\n \nclass DocTest:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def __init__(self,examples,globs,name,filename,lineno,docstring):\n ''\n\n\n \n assert not isinstance(examples,str),\\\n \"DocTest no longer accepts str; use DocTestParser instead\"\n self.examples=examples\n self.docstring=docstring\n self.globs=globs.copy()\n self.name=name\n self.filename=filename\n self.lineno=lineno\n \n def __repr__(self):\n if len(self.examples)==0:\n examples='no examples'\n elif len(self.examples)==1:\n examples='1 example'\n else :\n examples='%d examples'%len(self.examples)\n return ('<%s %s from %s:%s (%s)>'%\n (self.__class__.__name__,\n self.name,self.filename,self.lineno,examples))\n \n def __eq__(self,other):\n if type(self)is not type(other):\n return NotImplemented\n \n return self.examples ==other.examples and\\\n self.docstring ==other.docstring and\\\n self.globs ==other.globs and\\\n self.name ==other.name and\\\n self.filename ==other.filename and\\\n self.lineno ==other.lineno\n \n def __hash__(self):\n return hash((self.docstring,self.name,self.filename,self.lineno))\n \n \n def __lt__(self,other):\n if not isinstance(other,DocTest):\n return NotImplemented\n return ((self.name,self.filename,self.lineno,id(self))\n <\n (other.name,other.filename,other.lineno,id(other)))\n \n \n \n \n \nclass DocTestParser:\n ''\n\n \n \n \n \n \n \n _EXAMPLE_RE=re.compile(r'''\n # Source consists of a PS1 line followed by zero or more PS2 lines.\n (?P\n (?:^(?P [ ]*) >>> .*) # PS1 line\n (?:\\n [ ]* \\.\\.\\. .*)*) # PS2 lines\n \\n?\n # Want consists of any non-blank lines that do not start with PS1.\n (?P (?:(?![ ]*$) # Not a blank line\n (?![ ]*>>>) # Not a line starting with PS1\n .+$\\n? # But any other line\n )*)\n ''',re.MULTILINE |re.VERBOSE)\n \n \n \n \n \n \n \n \n \n \n _EXCEPTION_RE=re.compile(r\"\"\"\n # Grab the traceback header. Different versions of Python have\n # said different things on the first traceback line.\n ^(?P Traceback\\ \\(\n (?: most\\ recent\\ call\\ last\n | innermost\\ last\n ) \\) :\n )\n \\s* $ # toss trailing whitespace on the header.\n (?P .*?) # don't blink: absorb stuff until...\n ^ (?P \\w+ .*) # a line *starts* with alphanum.\n \"\"\",re.VERBOSE |re.MULTILINE |re.DOTALL)\n \n \n \n _IS_BLANK_OR_COMMENT=re.compile(r'^[ ]*(#.*)?$').match\n \n def parse(self,string,name=''):\n ''\n\n\n\n\n\n \n string=string.expandtabs()\n \n min_indent=self._min_indent(string)\n if min_indent >0:\n string='\\n'.join([l[min_indent:]for l in string.split('\\n')])\n \n output=[]\n charno,lineno=0,0\n \n for m in self._EXAMPLE_RE.finditer(string):\n \n output.append(string[charno:m.start()])\n \n lineno +=string.count('\\n',charno,m.start())\n \n (source,options,want,exc_msg)=\\\n self._parse_example(m,name,lineno)\n \n if not self._IS_BLANK_OR_COMMENT(source):\n output.append(Example(source,want,exc_msg,\n lineno=lineno,\n indent=min_indent+len(m.group('indent')),\n options=options))\n \n lineno +=string.count('\\n',m.start(),m.end())\n \n charno=m.end()\n \n output.append(string[charno:])\n return output\n \n def get_doctest(self,string,globs,name,filename,lineno):\n ''\n\n\n\n\n\n\n \n return DocTest(self.get_examples(string,name),globs,\n name,filename,lineno,string)\n \n def get_examples(self,string,name=''):\n ''\n\n\n\n\n\n\n\n\n \n return [x for x in self.parse(string,name)\n if isinstance(x,Example)]\n \n def _parse_example(self,m,name,lineno):\n ''\n\n\n\n\n\n\n\n\n \n \n indent=len(m.group('indent'))\n \n \n \n source_lines=m.group('source').split('\\n')\n self._check_prompt_blank(source_lines,indent,name,lineno)\n self._check_prefix(source_lines[1:],' '*indent+'.',name,lineno)\n source='\\n'.join([sl[indent+4:]for sl in source_lines])\n \n \n \n \n want=m.group('want')\n want_lines=want.split('\\n')\n if len(want_lines)>1 and re.match(r' *$',want_lines[-1]):\n del want_lines[-1]\n self._check_prefix(want_lines,' '*indent,name,\n lineno+len(source_lines))\n want='\\n'.join([wl[indent:]for wl in want_lines])\n \n \n m=self._EXCEPTION_RE.match(want)\n if m:\n exc_msg=m.group('msg')\n else :\n exc_msg=None\n \n \n options=self._find_options(source,name,lineno)\n \n return source,options,want,exc_msg\n \n \n \n \n \n \n \n \n _OPTION_DIRECTIVE_RE=re.compile(r'#\\s*doctest:\\s*([^\\n\\'\"]*)$',\n re.MULTILINE)\n \n def _find_options(self,source,name,lineno):\n ''\n\n\n\n\n\n \n options={}\n \n for m in self._OPTION_DIRECTIVE_RE.finditer(source):\n option_strings=m.group(1).replace(',',' ').split()\n for option in option_strings:\n if (option[0]not in '+-'or\n option[1:]not in OPTIONFLAGS_BY_NAME):\n raise ValueError('line %r of the doctest for %s '\n 'has an invalid option: %r'%\n (lineno+1,name,option))\n flag=OPTIONFLAGS_BY_NAME[option[1:]]\n options[flag]=(option[0]=='+')\n if options and self._IS_BLANK_OR_COMMENT(source):\n raise ValueError('line %r of the doctest for %s has an option '\n 'directive on a line with no example: %r'%\n (lineno,name,source))\n return options\n \n \n \n _INDENT_RE=re.compile(r'^([ ]*)(?=\\S)',re.MULTILINE)\n \n def _min_indent(self,s):\n ''\n indents=[len(indent)for indent in self._INDENT_RE.findall(s)]\n if len(indents)>0:\n return min(indents)\n else :\n return 0\n \n def _check_prompt_blank(self,lines,indent,name,lineno):\n ''\n\n\n\n\n \n for i,line in enumerate(lines):\n if len(line)>=indent+4 and line[indent+3]!=' ':\n raise ValueError('line %r of the docstring for %s '\n 'lacks blank after %s: %r'%\n (lineno+i+1,name,\n line[indent:indent+3],line))\n \n def _check_prefix(self,lines,prefix,name,lineno):\n ''\n\n\n \n for i,line in enumerate(lines):\n if line and not line.startswith(prefix):\n raise ValueError('line %r of the docstring for %s has '\n 'inconsistent leading whitespace: %r'%\n (lineno+i+1,name,line))\n \n \n \n \n \n \nclass DocTestFinder:\n ''\n\n\n\n\n\n \n \n def __init__(self,verbose=False ,parser=DocTestParser(),\n recurse=True ,exclude_empty=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self._parser=parser\n self._verbose=verbose\n self._recurse=recurse\n self._exclude_empty=exclude_empty\n \n def find(self,obj,name=None ,module=None ,globs=None ,extraglobs=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if name is None :\n name=getattr(obj,'__name__',None )\n if name is None :\n raise ValueError(\"DocTestFinder.find: name must be given \"\n \"when obj.__name__ doesn't exist: %r\"%\n (type(obj),))\n \n \n \n \n if module is False :\n module=None\n elif module is None :\n module=inspect.getmodule(obj)\n \n \n \n \n try :\n file=inspect.getsourcefile(obj)\n except TypeError:\n source_lines=None\n else :\n if not file:\n \n \n file=inspect.getfile(obj)\n if not file[0]+file[-2:]=='<]>':file=None\n if file is None :\n source_lines=None\n else :\n if module is not None :\n \n \n \n source_lines=linecache.getlines(file,module.__dict__)\n else :\n \n \n source_lines=linecache.getlines(file)\n if not source_lines:\n source_lines=None\n \n \n if globs is None :\n if module is None :\n globs={}\n else :\n globs=module.__dict__.copy()\n else :\n globs=globs.copy()\n if extraglobs is not None :\n globs.update(extraglobs)\n if '__name__'not in globs:\n globs['__name__']='__main__'\n \n \n tests=[]\n self._find(tests,obj,name,module,source_lines,globs,{})\n \n \n \n \n tests.sort()\n return tests\n \n def _from_module(self,module,object):\n ''\n\n\n \n if module is None :\n return True\n elif inspect.getmodule(object)is not None :\n return module is inspect.getmodule(object)\n elif inspect.isfunction(object):\n return module.__dict__ is object.__globals__\n elif (inspect.ismethoddescriptor(object)or\n inspect.ismethodwrapper(object)):\n if hasattr(object,'__objclass__'):\n obj_mod=object.__objclass__.__module__\n elif hasattr(object,'__module__'):\n obj_mod=object.__module__\n else :\n return True\n return module.__name__ ==obj_mod\n elif inspect.isclass(object):\n return module.__name__ ==object.__module__\n elif hasattr(object,'__module__'):\n return module.__name__ ==object.__module__\n elif isinstance(object,property):\n return True\n else :\n raise ValueError(\"object must be a class or function\")\n \n def _is_routine(self,obj):\n ''\n\n \n maybe_routine=obj\n try :\n maybe_routine=inspect.unwrap(maybe_routine)\n except ValueError:\n pass\n return inspect.isroutine(maybe_routine)\n \n def _find(self,tests,obj,name,module,source_lines,globs,seen):\n ''\n\n\n \n if self._verbose:\n print('Finding tests in %s'%name)\n \n \n if id(obj)in seen:\n return\n seen[id(obj)]=1\n \n \n test=self._get_test(obj,name,module,globs,source_lines)\n if test is not None :\n tests.append(test)\n \n \n if inspect.ismodule(obj)and self._recurse:\n for valname,val in obj.__dict__.items():\n valname='%s.%s'%(name,valname)\n \n \n if ((self._is_routine(val)or inspect.isclass(val))and\n self._from_module(module,val)):\n self._find(tests,val,valname,module,source_lines,\n globs,seen)\n \n \n if inspect.ismodule(obj)and self._recurse:\n for valname,val in getattr(obj,'__test__',{}).items():\n if not isinstance(valname,str):\n raise ValueError(\"DocTestFinder.find: __test__ keys \"\n \"must be strings: %r\"%\n (type(valname),))\n if not (inspect.isroutine(val)or inspect.isclass(val)or\n inspect.ismodule(val)or isinstance(val,str)):\n raise ValueError(\"DocTestFinder.find: __test__ values \"\n \"must be strings, functions, methods, \"\n \"classes, or modules: %r\"%\n (type(val),))\n valname='%s.__test__.%s'%(name,valname)\n self._find(tests,val,valname,module,source_lines,\n globs,seen)\n \n \n if inspect.isclass(obj)and self._recurse:\n for valname,val in obj.__dict__.items():\n \n if isinstance(val,(staticmethod,classmethod)):\n val=val.__func__\n \n \n if ((inspect.isroutine(val)or inspect.isclass(val)or\n isinstance(val,property))and\n self._from_module(module,val)):\n valname='%s.%s'%(name,valname)\n self._find(tests,val,valname,module,source_lines,\n globs,seen)\n \n def _get_test(self,obj,name,module,globs,source_lines):\n ''\n\n\n \n \n \n if isinstance(obj,str):\n docstring=obj\n else :\n try :\n if obj.__doc__ is None :\n docstring=''\n else :\n docstring=obj.__doc__\n if not isinstance(docstring,str):\n docstring=str(docstring)\n except (TypeError,AttributeError):\n docstring=''\n \n \n lineno=self._find_lineno(obj,source_lines)\n \n \n if self._exclude_empty and not docstring:\n return None\n \n \n if module is None :\n filename=None\n else :\n \n filename=getattr(module,'__file__',None )or module.__name__\n if filename[-4:]==\".pyc\":\n filename=filename[:-1]\n return self._parser.get_doctest(docstring,globs,name,\n filename,lineno)\n \n def _find_lineno(self,obj,source_lines):\n ''\n\n\n\n \n lineno=None\n docstring=getattr(obj,'__doc__',None )\n \n \n if inspect.ismodule(obj)and docstring is not None :\n lineno=0\n \n \n \n \n if inspect.isclass(obj)and docstring is not None :\n if source_lines is None :\n return None\n pat=re.compile(r'^\\s*class\\s*%s\\b'%\n getattr(obj,'__name__','-'))\n for i,line in enumerate(source_lines):\n if pat.match(line):\n lineno=i\n break\n \n \n if inspect.ismethod(obj):obj=obj.__func__\n if inspect.isfunction(obj)and getattr(obj,'__doc__',None ):\n \n obj=obj.__code__\n if inspect.istraceback(obj):obj=obj.tb_frame\n if inspect.isframe(obj):obj=obj.f_code\n if inspect.iscode(obj):\n lineno=obj.co_firstlineno -1\n \n \n \n \n \n \n if lineno is not None :\n if source_lines is None :\n return lineno+1\n pat=re.compile(r'(^|.*:)\\s*\\w*(\"|\\')')\n for lineno in range(lineno,len(source_lines)):\n if pat.match(source_lines[lineno]):\n return lineno\n \n \n return None\n \n \n \n \n \nclass DocTestRunner:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n DIVIDER=\"*\"*70\n \n def __init__(self,checker=None ,verbose=None ,optionflags=0):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self._checker=checker or OutputChecker()\n if verbose is None :\n verbose='-v'in sys.argv\n self._verbose=verbose\n self.optionflags=optionflags\n self.original_optionflags=optionflags\n \n \n self.tries=0\n self.failures=0\n self._name2ft={}\n \n \n self._fakeout=_SpoofOut()\n \n \n \n \n \n def report_start(self,out,test,example):\n ''\n\n\n \n if self._verbose:\n if example.want:\n out('Trying:\\n'+_indent(example.source)+\n 'Expecting:\\n'+_indent(example.want))\n else :\n out('Trying:\\n'+_indent(example.source)+\n 'Expecting nothing\\n')\n \n def report_success(self,out,test,example,got):\n ''\n\n\n \n if self._verbose:\n out(\"ok\\n\")\n \n def report_failure(self,out,test,example,got):\n ''\n\n \n out(self._failure_header(test,example)+\n self._checker.output_difference(example,got,self.optionflags))\n \n def report_unexpected_exception(self,out,test,example,exc_info):\n ''\n\n \n out(self._failure_header(test,example)+\n 'Exception raised:\\n'+_indent(_exception_traceback(exc_info)))\n \n def _failure_header(self,test,example):\n out=[self.DIVIDER]\n if test.filename:\n if test.lineno is not None and example.lineno is not None :\n lineno=test.lineno+example.lineno+1\n else :\n lineno='?'\n out.append('File \"%s\", line %s, in %s'%\n (test.filename,lineno,test.name))\n else :\n out.append('Line %s, in %s'%(example.lineno+1,test.name))\n out.append('Failed example:')\n source=example.source\n out.append(_indent(source))\n return '\\n'.join(out)\n \n \n \n \n \n def __run(self,test,compileflags,out):\n ''\n\n\n\n\n\n\n\n \n \n failures=tries=0\n \n \n \n original_optionflags=self.optionflags\n \n SUCCESS,FAILURE,BOOM=range(3)\n \n check=self._checker.check_output\n \n \n for examplenum,example in enumerate(test.examples):\n \n \n \n quiet=(self.optionflags&REPORT_ONLY_FIRST_FAILURE and\n failures >0)\n \n \n self.optionflags=original_optionflags\n if example.options:\n for (optionflag,val)in example.options.items():\n if val:\n self.optionflags |=optionflag\n else :\n self.optionflags &=~optionflag\n \n \n if self.optionflags&SKIP:\n continue\n \n \n tries +=1\n if not quiet:\n self.report_start(out,test,example)\n \n \n \n \n filename=''%(test.name,examplenum)\n \n \n \n \n try :\n \n exec(compile(example.source,filename,\"single\",\n compileflags,True ),test.globs)\n self.debugger.set_continue()\n exception=None\n except KeyboardInterrupt:\n raise\n except :\n exception=sys.exc_info()\n self.debugger.set_continue()\n \n got=self._fakeout.getvalue()\n self._fakeout.truncate(0)\n outcome=FAILURE\n \n \n \n if exception is None :\n if check(example.want,got,self.optionflags):\n outcome=SUCCESS\n \n \n else :\n exc_msg=traceback.format_exception_only(*exception[:2])[-1]\n if not quiet:\n got +=_exception_traceback(exception)\n \n \n \n if example.exc_msg is None :\n outcome=BOOM\n \n \n elif check(example.exc_msg,exc_msg,self.optionflags):\n outcome=SUCCESS\n \n \n elif self.optionflags&IGNORE_EXCEPTION_DETAIL:\n if check(_strip_exception_details(example.exc_msg),\n _strip_exception_details(exc_msg),\n self.optionflags):\n outcome=SUCCESS\n \n \n if outcome is SUCCESS:\n if not quiet:\n self.report_success(out,test,example,got)\n elif outcome is FAILURE:\n if not quiet:\n self.report_failure(out,test,example,got)\n failures +=1\n elif outcome is BOOM:\n if not quiet:\n self.report_unexpected_exception(out,test,example,\n exception)\n failures +=1\n else :\n assert False ,(\"unknown outcome\",outcome)\n \n if failures and self.optionflags&FAIL_FAST:\n break\n \n \n self.optionflags=original_optionflags\n \n \n self.__record_outcome(test,failures,tries)\n return TestResults(failures,tries)\n \n def __record_outcome(self,test,f,t):\n ''\n\n\n \n f2,t2=self._name2ft.get(test.name,(0,0))\n self._name2ft[test.name]=(f+f2,t+t2)\n self.failures +=f\n self.tries +=t\n \n __LINECACHE_FILENAME_RE=re.compile(r'.+)'\n r'\\[(?P\\d+)\\]>$')\n def __patched_linecache_getlines(self,filename,module_globals=None ):\n m=self.__LINECACHE_FILENAME_RE.match(filename)\n if m and m.group('name')==self.test.name:\n example=self.test.examples[int(m.group('examplenum'))]\n return example.source.splitlines(keepends=True )\n else :\n return self.save_linecache_getlines(filename,module_globals)\n \n def run(self,test,compileflags=None ,out=None ,clear_globs=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self.test=test\n \n if compileflags is None :\n compileflags=_extract_future_flags(test.globs)\n \n save_stdout=sys.stdout\n if out is None :\n encoding=save_stdout.encoding\n if encoding is None or encoding.lower()=='utf-8':\n out=save_stdout.write\n else :\n \n def out(s):\n s=str(s.encode(encoding,'backslashreplace'),encoding)\n save_stdout.write(s)\n sys.stdout=self._fakeout\n \n \n \n \n \n \n save_trace=sys.gettrace()\n save_set_trace=pdb.set_trace\n self.debugger=_OutputRedirectingPdb(save_stdout)\n self.debugger.reset()\n pdb.set_trace=self.debugger.set_trace\n \n \n \n self.save_linecache_getlines=linecache.getlines\n linecache.getlines=self.__patched_linecache_getlines\n \n \n save_displayhook=sys.displayhook\n sys.displayhook=sys.__displayhook__\n \n try :\n return self.__run(test,compileflags,out)\n finally :\n sys.stdout=save_stdout\n pdb.set_trace=save_set_trace\n sys.settrace(save_trace)\n linecache.getlines=self.save_linecache_getlines\n sys.displayhook=save_displayhook\n if clear_globs:\n test.globs.clear()\n import builtins\n builtins._=None\n \n \n \n \n def summarize(self,verbose=None ):\n ''\n\n\n\n\n\n\n\n\n \n if verbose is None :\n verbose=self._verbose\n notests=[]\n passed=[]\n failed=[]\n totalt=totalf=0\n for x in self._name2ft.items():\n name,(f,t)=x\n assert f <=t\n totalt +=t\n totalf +=f\n if t ==0:\n notests.append(name)\n elif f ==0:\n passed.append((name,t))\n else :\n failed.append(x)\n if verbose:\n if notests:\n print(len(notests),\"items had no tests:\")\n notests.sort()\n for thing in notests:\n print(\" \",thing)\n if passed:\n print(len(passed),\"items passed all tests:\")\n passed.sort()\n for thing,count in passed:\n print(\" %3d tests in %s\"%(count,thing))\n if failed:\n print(self.DIVIDER)\n print(len(failed),\"items had failures:\")\n failed.sort()\n for thing,(f,t)in failed:\n print(\" %3d of %3d in %s\"%(f,t,thing))\n if verbose:\n print(totalt,\"tests in\",len(self._name2ft),\"items.\")\n print(totalt -totalf,\"passed and\",totalf,\"failed.\")\n if totalf:\n print(\"***Test Failed***\",totalf,\"failures.\")\n elif verbose:\n print(\"Test passed.\")\n return TestResults(totalf,totalt)\n \n \n \n \n def merge(self,other):\n d=self._name2ft\n for name,(f,t)in other._name2ft.items():\n if name in d:\n \n \n \n \n f2,t2=d[name]\n f=f+f2\n t=t+t2\n d[name]=f,t\n \nclass OutputChecker:\n ''\n\n\n\n\n\n \n def _toAscii(self,s):\n ''\n\n \n return str(s.encode('ASCII','backslashreplace'),\"ASCII\")\n \n def check_output(self,want,got,optionflags):\n ''\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n got=self._toAscii(got)\n want=self._toAscii(want)\n \n \n \n if got ==want:\n return True\n \n \n \n if not (optionflags&DONT_ACCEPT_TRUE_FOR_1):\n if (got,want)==(\"True\\n\",\"1\\n\"):\n return True\n if (got,want)==(\"False\\n\",\"0\\n\"):\n return True\n \n \n \n if not (optionflags&DONT_ACCEPT_BLANKLINE):\n \n want=re.sub(r'(?m)^%s\\s*?$'%re.escape(BLANKLINE_MARKER),\n '',want)\n \n \n got=re.sub(r'(?m)^[^\\S\\n]+$','',got)\n if got ==want:\n return True\n \n \n \n \n if optionflags&NORMALIZE_WHITESPACE:\n got=' '.join(got.split())\n want=' '.join(want.split())\n if got ==want:\n return True\n \n \n \n if optionflags&ELLIPSIS:\n if _ellipsis_match(want,got):\n return True\n \n \n return False\n \n \n def _do_a_fancy_diff(self,want,got,optionflags):\n \n if not optionflags&(REPORT_UDIFF |\n REPORT_CDIFF |\n REPORT_NDIFF):\n return False\n \n \n \n \n \n \n \n \n \n \n \n if optionflags&REPORT_NDIFF:\n return True\n \n \n return want.count('\\n')>2 and got.count('\\n')>2\n \n def output_difference(self,example,got,optionflags):\n ''\n\n\n\n\n \n want=example.want\n \n \n if not (optionflags&DONT_ACCEPT_BLANKLINE):\n got=re.sub('(?m)^[ ]*(?=\\n)',BLANKLINE_MARKER,got)\n \n \n if self._do_a_fancy_diff(want,got,optionflags):\n \n want_lines=want.splitlines(keepends=True )\n got_lines=got.splitlines(keepends=True )\n \n if optionflags&REPORT_UDIFF:\n diff=difflib.unified_diff(want_lines,got_lines,n=2)\n diff=list(diff)[2:]\n kind='unified diff with -expected +actual'\n elif optionflags&REPORT_CDIFF:\n diff=difflib.context_diff(want_lines,got_lines,n=2)\n diff=list(diff)[2:]\n kind='context diff with expected followed by actual'\n elif optionflags&REPORT_NDIFF:\n engine=difflib.Differ(charjunk=difflib.IS_CHARACTER_JUNK)\n diff=list(engine.compare(want_lines,got_lines))\n kind='ndiff with -expected +actual'\n else :\n assert 0,'Bad diff option'\n return 'Differences (%s):\\n'%kind+_indent(''.join(diff))\n \n \n \n if want and got:\n return 'Expected:\\n%sGot:\\n%s'%(_indent(want),_indent(got))\n elif want:\n return 'Expected:\\n%sGot nothing\\n'%_indent(want)\n elif got:\n return 'Expected nothing\\nGot:\\n%s'%_indent(got)\n else :\n return 'Expected nothing\\nGot nothing\\n'\n \nclass DocTestFailure(Exception):\n ''\n\n\n\n\n\n\n\n\n \n def __init__(self,test,example,got):\n self.test=test\n self.example=example\n self.got=got\n \n def __str__(self):\n return str(self.test)\n \nclass UnexpectedException(Exception):\n ''\n\n\n\n\n\n\n\n\n \n def __init__(self,test,example,exc_info):\n self.test=test\n self.example=example\n self.exc_info=exc_info\n \n def __str__(self):\n return str(self.test)\n \nclass DebugRunner(DocTestRunner):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def run(self,test,compileflags=None ,out=None ,clear_globs=True ):\n r=DocTestRunner.run(self,test,compileflags,out,False )\n if clear_globs:\n test.globs.clear()\n return r\n \n def report_unexpected_exception(self,out,test,example,exc_info):\n raise UnexpectedException(test,example,exc_info)\n \n def report_failure(self,out,test,example,got):\n raise DocTestFailure(test,example,got)\n \n \n \n \n \n \n \n \nmaster=None\n\ndef testmod(m=None ,name=None ,globs=None ,verbose=None ,\nreport=True ,optionflags=0,extraglobs=None ,\nraise_on_error=False ,exclude_empty=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n global master\n \n \n if m is None :\n \n \n \n m=sys.modules.get('__main__')\n \n \n if not inspect.ismodule(m):\n raise TypeError(\"testmod: module required; %r\"%(m,))\n \n \n if name is None :\n name=m.__name__\n \n \n finder=DocTestFinder(exclude_empty=exclude_empty)\n \n if raise_on_error:\n runner=DebugRunner(verbose=verbose,optionflags=optionflags)\n else :\n runner=DocTestRunner(verbose=verbose,optionflags=optionflags)\n \n for test in finder.find(m,name,globs=globs,extraglobs=extraglobs):\n runner.run(test)\n \n if report:\n runner.summarize()\n \n if master is None :\n master=runner\n else :\n master.merge(runner)\n \n return TestResults(runner.failures,runner.tries)\n \ndef testfile(filename,module_relative=True ,name=None ,package=None ,\nglobs=None ,verbose=None ,report=True ,optionflags=0,\nextraglobs=None ,raise_on_error=False ,parser=DocTestParser(),\nencoding=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n global master\n \n if package and not module_relative:\n raise ValueError(\"Package may only be specified for module-\"\n \"relative paths.\")\n \n \n text,filename=_load_testfile(filename,package,module_relative,\n encoding or \"utf-8\")\n \n \n if name is None :\n name=os.path.basename(filename)\n \n \n if globs is None :\n globs={}\n else :\n globs=globs.copy()\n if extraglobs is not None :\n globs.update(extraglobs)\n if '__name__'not in globs:\n globs['__name__']='__main__'\n \n if raise_on_error:\n runner=DebugRunner(verbose=verbose,optionflags=optionflags)\n else :\n runner=DocTestRunner(verbose=verbose,optionflags=optionflags)\n \n \n test=parser.get_doctest(text,globs,name,filename,0)\n runner.run(test)\n \n if report:\n runner.summarize()\n \n if master is None :\n master=runner\n else :\n master.merge(runner)\n \n return TestResults(runner.failures,runner.tries)\n \ndef run_docstring_examples(f,globs,verbose=False ,name=\"NoName\",\ncompileflags=None ,optionflags=0):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n finder=DocTestFinder(verbose=verbose,recurse=False )\n runner=DocTestRunner(verbose=verbose,optionflags=optionflags)\n for test in finder.find(f,name,globs=globs):\n runner.run(test,compileflags=compileflags)\n \n \n \n \n \n_unittest_reportflags=0\n\ndef set_unittest_reportflags(flags):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n global _unittest_reportflags\n \n if (flags&REPORTING_FLAGS)!=flags:\n raise ValueError(\"Only reporting flags allowed\",flags)\n old=_unittest_reportflags\n _unittest_reportflags=flags\n return old\n \n \nclass DocTestCase(unittest.TestCase):\n\n def __init__(self,test,optionflags=0,setUp=None ,tearDown=None ,\n checker=None ):\n \n unittest.TestCase.__init__(self)\n self._dt_optionflags=optionflags\n self._dt_checker=checker\n self._dt_globs=test.globs.copy()\n self._dt_test=test\n self._dt_setUp=setUp\n self._dt_tearDown=tearDown\n \n def setUp(self):\n test=self._dt_test\n \n if self._dt_setUp is not None :\n self._dt_setUp(test)\n \n def tearDown(self):\n test=self._dt_test\n \n if self._dt_tearDown is not None :\n self._dt_tearDown(test)\n \n \n test.globs.clear()\n test.globs.update(self._dt_globs)\n \n def runTest(self):\n test=self._dt_test\n old=sys.stdout\n new=StringIO()\n optionflags=self._dt_optionflags\n \n if not (optionflags&REPORTING_FLAGS):\n \n \n optionflags |=_unittest_reportflags\n \n runner=DocTestRunner(optionflags=optionflags,\n checker=self._dt_checker,verbose=False )\n \n try :\n runner.DIVIDER=\"-\"*70\n failures,tries=runner.run(\n test,out=new.write,clear_globs=False )\n finally :\n sys.stdout=old\n \n if failures:\n raise self.failureException(self.format_failure(new.getvalue()))\n \n def format_failure(self,err):\n test=self._dt_test\n if test.lineno is None :\n lineno='unknown line number'\n else :\n lineno='%s'%test.lineno\n lname='.'.join(test.name.split('.')[-1:])\n return ('Failed doctest test for %s\\n'\n ' File \"%s\", line %s, in %s\\n\\n%s'\n %(test.name,test.filename,lineno,lname,err)\n )\n \n def debug(self):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n self.setUp()\n runner=DebugRunner(optionflags=self._dt_optionflags,\n checker=self._dt_checker,verbose=False )\n runner.run(self._dt_test,clear_globs=False )\n self.tearDown()\n \n def id(self):\n return self._dt_test.name\n \n def __eq__(self,other):\n if type(self)is not type(other):\n return NotImplemented\n \n return self._dt_test ==other._dt_test and\\\n self._dt_optionflags ==other._dt_optionflags and\\\n self._dt_setUp ==other._dt_setUp and\\\n self._dt_tearDown ==other._dt_tearDown and\\\n self._dt_checker ==other._dt_checker\n \n def __hash__(self):\n return hash((self._dt_optionflags,self._dt_setUp,self._dt_tearDown,\n self._dt_checker))\n \n def __repr__(self):\n name=self._dt_test.name.split('.')\n return \"%s (%s)\"%(name[-1],'.'.join(name[:-1]))\n \n __str__=object.__str__\n \n def shortDescription(self):\n return \"Doctest: \"+self._dt_test.name\n \nclass SkipDocTestCase(DocTestCase):\n def __init__(self,module):\n self.module=module\n DocTestCase.__init__(self,None )\n \n def setUp(self):\n self.skipTest(\"DocTestSuite will not work with -O2 and above\")\n \n def test_skip(self):\n pass\n \n def shortDescription(self):\n return \"Skipping tests from %s\"%self.module.__name__\n \n __str__=shortDescription\n \n \nclass _DocTestSuite(unittest.TestSuite):\n\n def _removeTestAtIndex(self,index):\n pass\n \n \ndef DocTestSuite(module=None ,globs=None ,extraglobs=None ,test_finder=None ,\n**options):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if test_finder is None :\n test_finder=DocTestFinder()\n \n module=_normalize_module(module)\n tests=test_finder.find(module,globs=globs,extraglobs=extraglobs)\n \n if not tests and sys.flags.optimize >=2:\n \n suite=_DocTestSuite()\n suite.addTest(SkipDocTestCase(module))\n return suite\n \n tests.sort()\n suite=_DocTestSuite()\n \n for test in tests:\n if len(test.examples)==0:\n continue\n if not test.filename:\n filename=module.__file__\n if filename[-4:]==\".pyc\":\n filename=filename[:-1]\n test.filename=filename\n suite.addTest(DocTestCase(test,**options))\n \n return suite\n \nclass DocFileCase(DocTestCase):\n\n def id(self):\n return '_'.join(self._dt_test.name.split('.'))\n \n def __repr__(self):\n return self._dt_test.filename\n \n def format_failure(self,err):\n return ('Failed doctest test for %s\\n File \"%s\", line 0\\n\\n%s'\n %(self._dt_test.name,self._dt_test.filename,err)\n )\n \ndef DocFileTest(path,module_relative=True ,package=None ,\nglobs=None ,parser=DocTestParser(),\nencoding=None ,**options):\n if globs is None :\n globs={}\n else :\n globs=globs.copy()\n \n if package and not module_relative:\n raise ValueError(\"Package may only be specified for module-\"\n \"relative paths.\")\n \n \n doc,path=_load_testfile(path,package,module_relative,\n encoding or \"utf-8\")\n \n if \"__file__\"not in globs:\n globs[\"__file__\"]=path\n \n \n name=os.path.basename(path)\n \n \n test=parser.get_doctest(doc,globs,name,path,0)\n return DocFileCase(test,**options)\n \ndef DocFileSuite(*paths,**kw):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n suite=_DocTestSuite()\n \n \n \n \n if kw.get('module_relative',True ):\n kw['package']=_normalize_module(kw.get('package'))\n \n for path in paths:\n suite.addTest(DocFileTest(path,**kw))\n \n return suite\n \n \n \n \n \ndef script_from_examples(s):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n output=[]\n for piece in DocTestParser().parse(s):\n if isinstance(piece,Example):\n \n output.append(piece.source[:-1])\n \n want=piece.want\n if want:\n output.append('# Expected:')\n output +=['## '+l for l in want.split('\\n')[:-1]]\n else :\n \n output +=[_comment_line(l)\n for l in piece.split('\\n')[:-1]]\n \n \n while output and output[-1]=='#':\n output.pop()\n while output and output[0]=='#':\n output.pop(0)\n \n \n return '\\n'.join(output)+'\\n'\n \ndef testsource(module,name):\n ''\n\n\n\n\n \n module=_normalize_module(module)\n tests=DocTestFinder().find(module)\n test=[t for t in tests if t.name ==name]\n if not test:\n raise ValueError(name,\"not found in tests\")\n test=test[0]\n testsrc=script_from_examples(test.docstring)\n return testsrc\n \ndef debug_src(src,pm=False ,globs=None ):\n ''\n testsrc=script_from_examples(src)\n debug_script(testsrc,pm,globs)\n \ndef debug_script(src,pm=False ,globs=None ):\n ''\n import pdb\n \n if globs:\n globs=globs.copy()\n else :\n globs={}\n \n if pm:\n try :\n exec(src,globs,globs)\n except :\n print(sys.exc_info()[1])\n p=pdb.Pdb(nosigint=True )\n p.reset()\n p.interaction(None ,sys.exc_info()[2])\n else :\n pdb.Pdb(nosigint=True ).run(\"exec(%r)\"%src,globs,globs)\n \ndef debug(module,name,pm=False ):\n ''\n\n\n\n\n \n module=_normalize_module(module)\n testsrc=testsource(module,name)\n debug_script(testsrc,pm,module.__dict__)\n \n \n \n \nclass _TestClass:\n ''\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,val):\n ''\n\n\n\n\n \n \n self.val=val\n \n def square(self):\n ''\n\n\n\n \n \n self.val=self.val **2\n return self\n \n def get(self):\n ''\n\n\n\n\n \n \n return self.val\n \n__test__={\"_TestClass\":_TestClass,\n\"string\":r\"\"\"\n Example of a string object, searched as-is.\n >>> x = 1; y = 2\n >>> x + y, x * y\n (3, 2)\n \"\"\",\n\n\"bool-int equivalence\":r\"\"\"\n In 2.2, boolean expressions displayed\n 0 or 1. By default, we still accept\n them. This can be disabled by passing\n DONT_ACCEPT_TRUE_FOR_1 to the new\n optionflags argument.\n >>> 4 == 4\n 1\n >>> 4 == 4\n True\n >>> 4 > 4\n 0\n >>> 4 > 4\n False\n \"\"\",\n\n\"blank lines\":r\"\"\"\n Blank lines can be marked with :\n >>> print('foo\\n\\nbar\\n')\n foo\n \n bar\n \n \"\"\",\n\n\"ellipsis\":r\"\"\"\n If the ellipsis flag is used, then '...' can be used to\n elide substrings in the desired output:\n >>> print(list(range(1000))) #doctest: +ELLIPSIS\n [0, 1, 2, ..., 999]\n \"\"\",\n\n\"whitespace normalization\":r\"\"\"\n If the whitespace normalization flag is used, then\n differences in whitespace are ignored.\n >>> print(list(range(30))) #doctest: +NORMALIZE_WHITESPACE\n [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,\n 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,\n 27, 28, 29]\n \"\"\",\n}\n\n\ndef _test():\n import argparse\n \n parser=argparse.ArgumentParser(description=\"doctest runner\")\n parser.add_argument('-v','--verbose',action='store_true',default=False ,\n help='print very verbose output for all tests')\n parser.add_argument('-o','--option',action='append',\n choices=OPTIONFLAGS_BY_NAME.keys(),default=[],\n help=('specify a doctest option flag to apply'\n ' to the test run; may be specified more'\n ' than once to apply multiple options'))\n parser.add_argument('-f','--fail-fast',action='store_true',\n help=('stop running tests after first failure (this'\n ' is a shorthand for -o FAIL_FAST, and is'\n ' in addition to any other -o options)'))\n parser.add_argument('file',nargs='+',\n help='file containing the tests to run')\n args=parser.parse_args()\n testfiles=args.file\n \n \n verbose=args.verbose\n options=0\n for option in args.option:\n options |=OPTIONFLAGS_BY_NAME[option]\n if args.fail_fast:\n options |=FAIL_FAST\n for filename in testfiles:\n if filename.endswith(\".py\"):\n \n \n \n dirname,filename=os.path.split(filename)\n sys.path.insert(0,dirname)\n m=__import__(filename[:-3])\n del sys.path[0]\n failures,_=testmod(m,verbose=verbose,optionflags=options)\n else :\n failures,_=testfile(filename,module_relative=False ,\n verbose=verbose,optionflags=options)\n if failures:\n return 1\n return 0\n \n \nif __name__ ==\"__main__\":\n sys.exit(_test())\n", ["__future__", "argparse", "builtins", "collections", "difflib", "inspect", "io", "linecache", "os", "pdb", "re", "sys", "traceback", "unittest"]], "enum": [".py", "import sys\nimport builtins as bltns\nfrom types import MappingProxyType,DynamicClassAttribute\nfrom operator import or_ as _or_\nfrom functools import reduce\n\n\n__all__=[\n'EnumType','EnumMeta',\n'Enum','IntEnum','StrEnum','Flag','IntFlag','ReprEnum',\n'auto','unique','property','verify','member','nonmember',\n'FlagBoundary','STRICT','CONFORM','EJECT','KEEP',\n'global_flag_repr','global_enum_repr','global_str','global_enum',\n'EnumCheck','CONTINUOUS','NAMED_FLAGS','UNIQUE',\n]\n\n\n\n\n\nEnum=Flag=EJECT=_stdlib_enums=ReprEnum=None\n\nclass nonmember(object):\n ''\n\n \n def __init__(self,value):\n self.value=value\n \nclass member(object):\n ''\n\n \n def __init__(self,value):\n self.value=value\n \ndef _is_descriptor(obj):\n ''\n\n \n return (\n hasattr(obj,'__get__')or\n hasattr(obj,'__set__')or\n hasattr(obj,'__delete__')\n )\n \ndef _is_dunder(name):\n ''\n\n \n return (\n len(name)>4 and\n name[:2]==name[-2:]=='__'and\n name[2]!='_'and\n name[-3]!='_'\n )\n \ndef _is_sunder(name):\n ''\n\n \n return (\n len(name)>2 and\n name[0]==name[-1]=='_'and\n name[1:2]!='_'and\n name[-2:-1]!='_'\n )\n \ndef _is_internal_class(cls_name,obj):\n\n if not isinstance(obj,type):\n return False\n qualname=getattr(obj,'__qualname__','')\n s_pattern=cls_name+'.'+getattr(obj,'__name__','')\n e_pattern='.'+s_pattern\n return qualname ==s_pattern or qualname.endswith(e_pattern)\n \ndef _is_private(cls_name,name):\n\n pattern='_%s__'%(cls_name,)\n pat_len=len(pattern)\n if (\n len(name)>pat_len\n and name.startswith(pattern)\n and name[pat_len:pat_len+1]!=['_']\n and (name[-1]!='_'or name[-2]!='_')\n ):\n return True\n else :\n return False\n \ndef _is_single_bit(num):\n ''\n\n \n if num ==0:\n return False\n num &=num -1\n return num ==0\n \ndef _make_class_unpicklable(obj):\n ''\n\n\n\n \n def _break_on_call_reduce(self,proto):\n raise TypeError('%r cannot be pickled'%self)\n if isinstance(obj,dict):\n obj['__reduce_ex__']=_break_on_call_reduce\n obj['__module__']=''\n else :\n setattr(obj,'__reduce_ex__',_break_on_call_reduce)\n setattr(obj,'__module__','')\n \ndef _iter_bits_lsb(num):\n\n original=num\n if isinstance(num,Enum):\n num=num.value\n if num <0:\n raise ValueError('%r is not a positive integer'%original)\n while num:\n b=num&(~num+1)\n yield b\n num ^=b\n \ndef show_flag_values(value):\n return list(_iter_bits_lsb(value))\n \ndef bin(num,max_bits=None ):\n ''\n\n\n\n\n\n\n\n\n \n \n ceiling=2 **(num).bit_length()\n if num >=0:\n s=bltns.bin(num+ceiling).replace('1','0',1)\n else :\n s=bltns.bin(~num ^(ceiling -1)+ceiling)\n sign=s[:3]\n digits=s[3:]\n if max_bits is not None :\n if len(digits) cannot set attribute %r\"%(self.clsname,self.name)\n )\n \n def __delete__(self,instance):\n if self.fdel is not None :\n return self.fdel(instance)\n raise AttributeError(\n \" cannot delete attribute %r\"%(self.clsname,self.name)\n )\n \n def __set_name__(self,ownerclass,name):\n self.name=name\n self.clsname=ownerclass.__name__\n \n \nclass _proto_member:\n ''\n\n \n \n def __init__(self,value):\n self.value=value\n \n def __set_name__(self,enum_class,member_name):\n ''\n\n \n \n delattr(enum_class,member_name)\n \n value=self.value\n if not isinstance(value,tuple):\n args=(value,)\n else :\n args=value\n if enum_class._member_type_ is tuple:\n args=(args,)\n if not enum_class._use_args_:\n enum_member=enum_class._new_member_(enum_class)\n else :\n enum_member=enum_class._new_member_(enum_class,*args)\n if not hasattr(enum_member,'_value_'):\n if enum_class._member_type_ is object:\n enum_member._value_=value\n else :\n try :\n enum_member._value_=enum_class._member_type_(*args)\n except Exception as exc:\n new_exc=TypeError(\n '_value_ not set in __new__, unable to create it'\n )\n new_exc.__cause__=exc\n raise new_exc\n value=enum_member._value_\n enum_member._name_=member_name\n enum_member.__objclass__=enum_class\n enum_member.__init__(*args)\n enum_member._sort_order_=len(enum_class._member_names_)\n \n if Flag is not None and issubclass(enum_class,Flag):\n enum_class._flag_mask_ |=value\n if _is_single_bit(value):\n enum_class._singles_mask_ |=value\n enum_class._all_bits_=2 **((enum_class._flag_mask_).bit_length())-1\n \n \n \n try :\n try :\n \n enum_member=enum_class._value2member_map_[value]\n except TypeError:\n for name,canonical_member in enum_class._member_map_.items():\n if canonical_member._value_ ==value:\n enum_member=canonical_member\n break\n else :\n raise KeyError\n except KeyError:\n \n \n if (\n Flag is None\n or not issubclass(enum_class,Flag)\n ):\n \n enum_class._member_names_.append(member_name)\n elif (\n Flag is not None\n and issubclass(enum_class,Flag)\n and _is_single_bit(value)\n ):\n \n enum_class._member_names_.append(member_name)\n \n found_descriptor=None\n descriptor_type=None\n class_type=None\n for base in enum_class.__mro__[1:]:\n attr=base.__dict__.get(member_name)\n if attr is not None :\n if isinstance(attr,(property,DynamicClassAttribute)):\n found_descriptor=attr\n class_type=base\n descriptor_type='enum'\n break\n elif _is_descriptor(attr):\n found_descriptor=attr\n descriptor_type=descriptor_type or 'desc'\n class_type=class_type or base\n continue\n else :\n descriptor_type='attr'\n class_type=base\n if found_descriptor:\n redirect=property()\n redirect.member=enum_member\n redirect.__set_name__(enum_class,member_name)\n if descriptor_type in ('enum','desc'):\n \n redirect.fget=getattr(found_descriptor,'fget',None )\n redirect._get=getattr(found_descriptor,'__get__',None )\n redirect.fset=getattr(found_descriptor,'fset',None )\n redirect._set=getattr(found_descriptor,'__set__',None )\n redirect.fdel=getattr(found_descriptor,'fdel',None )\n redirect._del=getattr(found_descriptor,'__delete__',None )\n redirect._attr_type=descriptor_type\n redirect._cls_type=class_type\n setattr(enum_class,member_name,redirect)\n else :\n setattr(enum_class,member_name,enum_member)\n \n enum_class._member_map_[member_name]=enum_member\n try :\n \n \n \n enum_class._value2member_map_.setdefault(value,enum_member)\n except TypeError:\n \n enum_class._unhashable_values_.append(value)\n \n \nclass _EnumDict(dict):\n ''\n\n\n\n\n \n def __init__(self):\n super().__init__()\n self._member_names={}\n self._last_values=[]\n self._ignore=[]\n self._auto_called=False\n \n def __setitem__(self,key,value):\n ''\n\n\n\n\n\n\n \n if _is_internal_class(self._cls_name,value):\n import warnings\n warnings.warn(\n \"In 3.13 classes created inside an enum will not become a member. \"\n \"Use the `member` decorator to keep the current behavior.\",\n DeprecationWarning,\n stacklevel=2,\n )\n if _is_private(self._cls_name,key):\n \n pass\n elif _is_sunder(key):\n if key not in (\n '_order_',\n '_generate_next_value_','_numeric_repr_','_missing_','_ignore_',\n '_iter_member_','_iter_member_by_value_','_iter_member_by_def_',\n ):\n raise ValueError(\n '_sunder_ names, such as %r, are reserved for future Enum use'\n %(key,)\n )\n if key =='_generate_next_value_':\n \n if self._auto_called:\n raise TypeError(\"_generate_next_value_ must be defined before members\")\n _gnv=value.__func__ if isinstance(value,staticmethod)else value\n setattr(self,'_generate_next_value',_gnv)\n elif key =='_ignore_':\n if isinstance(value,str):\n value=value.replace(',',' ').split()\n else :\n value=list(value)\n self._ignore=value\n already=set(value)&set(self._member_names)\n if already:\n raise ValueError(\n '_ignore_ cannot specify already set names: %r'\n %(already,)\n )\n elif _is_dunder(key):\n if key =='__order__':\n key='_order_'\n elif key in self._member_names:\n \n raise TypeError('%r already defined as %r'%(key,self[key]))\n elif key in self._ignore:\n pass\n elif isinstance(value,nonmember):\n \n value=value.value\n elif _is_descriptor(value):\n pass\n \n \n \n \n else :\n if key in self:\n \n raise TypeError('%r already defined as %r'%(key,self[key]))\n elif isinstance(value,member):\n \n value=value.value\n non_auto_store=True\n single=False\n if isinstance(value,auto):\n single=True\n value=(value,)\n if type(value)is tuple and any(isinstance(v,auto)for v in value):\n \n \n auto_valued=[]\n for v in value:\n if isinstance(v,auto):\n non_auto_store=False\n if v.value ==_auto_null:\n v.value=self._generate_next_value(\n key,1,len(self._member_names),self._last_values[:],\n )\n self._auto_called=True\n v=v.value\n self._last_values.append(v)\n auto_valued.append(v)\n if single:\n value=auto_valued[0]\n else :\n value=tuple(auto_valued)\n self._member_names[key]=None\n if non_auto_store:\n self._last_values.append(value)\n super().__setitem__(key,value)\n \n def update(self,members,**more_members):\n try :\n for name in members.keys():\n self[name]=members[name]\n except AttributeError:\n for name,value in members:\n self[name]=value\n for name,value in more_members.items():\n self[name]=value\n \n \nclass EnumType(type):\n ''\n\n \n \n @classmethod\n def __prepare__(metacls,cls,bases,**kwds):\n \n metacls._check_for_existing_members_(cls,bases)\n \n enum_dict=_EnumDict()\n enum_dict._cls_name=cls\n \n member_type,first_enum=metacls._get_mixins_(cls,bases)\n if first_enum is not None :\n enum_dict['_generate_next_value_']=getattr(\n first_enum,'_generate_next_value_',None ,\n )\n return enum_dict\n \n def __new__(metacls,cls,bases,classdict,*,boundary=None ,_simple=False ,**kwds):\n \n \n \n \n \n if _simple:\n return super().__new__(metacls,cls,bases,classdict,**kwds)\n \n \n classdict.setdefault('_ignore_',[]).append('_ignore_')\n ignore=classdict['_ignore_']\n for key in ignore:\n classdict.pop(key,None )\n \n \n member_names=classdict._member_names\n \n \n invalid_names=set(member_names)&{'mro',''}\n if invalid_names:\n raise ValueError('invalid enum member name(s) %s'%(\n ','.join(repr(n)for n in invalid_names)\n ))\n \n \n _order_=classdict.pop('_order_',None )\n _gnv=classdict.get('_generate_next_value_')\n if _gnv is not None and type(_gnv)is not staticmethod:\n _gnv=staticmethod(_gnv)\n \n classdict=dict(classdict.items())\n if _gnv is not None :\n classdict['_generate_next_value_']=_gnv\n \n \n member_type,first_enum=metacls._get_mixins_(cls,bases)\n __new__,save_new,use_args=metacls._find_new_(\n classdict,member_type,first_enum,\n )\n classdict['_new_member_']=__new__\n classdict['_use_args_']=use_args\n \n \n for name in member_names:\n value=classdict[name]\n classdict[name]=_proto_member(value)\n \n \n classdict['_member_names_']=[]\n classdict['_member_map_']={}\n classdict['_value2member_map_']={}\n classdict['_unhashable_values_']=[]\n classdict['_member_type_']=member_type\n \n classdict['_value_repr_']=metacls._find_data_repr_(cls,bases)\n \n \n classdict['_boundary_']=(\n boundary\n or getattr(first_enum,'_boundary_',None )\n )\n classdict['_flag_mask_']=0\n classdict['_singles_mask_']=0\n classdict['_all_bits_']=0\n classdict['_inverted_']=None\n try :\n exc=None\n enum_class=super().__new__(metacls,cls,bases,classdict,**kwds)\n except RuntimeError as e:\n \n \n exc=e.__cause__ or e\n if exc is not None :\n raise exc\n \n \n classdict.update(enum_class.__dict__)\n \n \n \n \n \n \n \n if ReprEnum is not None and ReprEnum in bases:\n if member_type is object:\n raise TypeError(\n 'ReprEnum subclasses must be mixed with a data type (i.e.'\n ' int, str, float, etc.)'\n )\n if '__format__'not in classdict:\n enum_class.__format__=member_type.__format__\n classdict['__format__']=enum_class.__format__\n if '__str__'not in classdict:\n method=member_type.__str__\n if method is object.__str__:\n \n \n method=member_type.__repr__\n enum_class.__str__=method\n classdict['__str__']=enum_class.__str__\n for name in ('__repr__','__str__','__format__','__reduce_ex__'):\n if name not in classdict:\n \n enum_method=getattr(first_enum,name)\n found_method=getattr(enum_class,name)\n object_method=getattr(object,name)\n data_type_method=getattr(member_type,name)\n if found_method in (data_type_method,object_method):\n setattr(enum_class,name,enum_method)\n \n \n if Flag is not None and issubclass(enum_class,Flag):\n for name in (\n '__or__','__and__','__xor__',\n '__ror__','__rand__','__rxor__',\n '__invert__'\n ):\n if name not in classdict:\n enum_method=getattr(Flag,name)\n setattr(enum_class,name,enum_method)\n classdict[name]=enum_method\n \n \n \n if Enum is not None :\n \n \n if save_new:\n enum_class.__new_member__=__new__\n enum_class.__new__=Enum.__new__\n \n \n \n \n \n \n \n \n \n \n if _order_ is not None :\n if isinstance(_order_,str):\n _order_=_order_.replace(',',' ').split()\n \n \n if (\n Flag is None and cls !='Flag'\n or Flag is not None and not issubclass(enum_class,Flag)\n ):\n delattr(enum_class,'_boundary_')\n delattr(enum_class,'_flag_mask_')\n delattr(enum_class,'_singles_mask_')\n delattr(enum_class,'_all_bits_')\n delattr(enum_class,'_inverted_')\n elif Flag is not None and issubclass(enum_class,Flag):\n \n member_list=[m._value_ for m in enum_class]\n if member_list !=sorted(member_list):\n enum_class._iter_member_=enum_class._iter_member_by_def_\n if _order_:\n \n _order_=[\n o\n for o in _order_\n if o not in enum_class._member_map_ or _is_single_bit(enum_class[o]._value_)\n ]\n \n if _order_:\n \n _order_=[\n o\n for o in _order_\n if (\n o not in enum_class._member_map_\n or\n (o in enum_class._member_map_ and o in enum_class._member_names_)\n )]\n \n if _order_ !=enum_class._member_names_:\n raise TypeError(\n 'member order does not match _order_:\\n %r\\n %r'\n %(enum_class._member_names_,_order_)\n )\n \n return enum_class\n \n def __bool__(cls):\n ''\n\n \n return True\n \n def __call__(cls,value,names=None ,*values,module=None ,qualname=None ,type=None ,start=1,boundary=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if cls._member_map_:\n \n if names:\n value=(value,names)+values\n return cls.__new__(cls,value)\n \n return cls._create_(\n class_name=value,\n names=names,\n module=module,\n qualname=qualname,\n type=type,\n start=start,\n boundary=boundary,\n )\n \n def __contains__(cls,value):\n ''\n\n\n\n\n \n if isinstance(value,cls):\n return True\n return value in cls._value2member_map_ or value in cls._unhashable_values_\n \n def __delattr__(cls,attr):\n \n \n if attr in cls._member_map_:\n raise AttributeError(\"%r cannot delete member %r.\"%(cls.__name__,attr))\n super().__delattr__(attr)\n \n def __dir__(cls):\n interesting=set([\n '__class__','__contains__','__doc__','__getitem__',\n '__iter__','__len__','__members__','__module__',\n '__name__','__qualname__',\n ]\n +cls._member_names_\n )\n if cls._new_member_ is not object.__new__:\n interesting.add('__new__')\n if cls.__init_subclass__ is not object.__init_subclass__:\n interesting.add('__init_subclass__')\n if cls._member_type_ is object:\n return sorted(interesting)\n else :\n \n return sorted(set(dir(cls._member_type_))|interesting)\n \n def __getitem__(cls,name):\n ''\n\n \n return cls._member_map_[name]\n \n def __iter__(cls):\n ''\n\n \n return (cls._member_map_[name]for name in cls._member_names_)\n \n def __len__(cls):\n ''\n\n \n return len(cls._member_names_)\n \n @bltns.property\n def __members__(cls):\n ''\n\n\n\n\n \n return MappingProxyType(cls._member_map_)\n \n def __repr__(cls):\n if Flag is not None and issubclass(cls,Flag):\n return \"\"%cls.__name__\n else :\n return \"\"%cls.__name__\n \n def __reversed__(cls):\n ''\n\n \n return (cls._member_map_[name]for name in reversed(cls._member_names_))\n \n def __setattr__(cls,name,value):\n ''\n\n\n\n\n\n \n member_map=cls.__dict__.get('_member_map_',{})\n if name in member_map:\n raise AttributeError('cannot reassign member %r'%(name,))\n super().__setattr__(name,value)\n \n def _create_(cls,class_name,names,*,module=None ,qualname=None ,type=None ,start=1,boundary=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n metacls=cls.__class__\n bases=(cls,)if type is None else (type,cls)\n _,first_enum=cls._get_mixins_(class_name,bases)\n classdict=metacls.__prepare__(class_name,bases)\n \n \n if isinstance(names,str):\n names=names.replace(',',' ').split()\n if isinstance(names,(tuple,list))and names and isinstance(names[0],str):\n original_names,names=names,[]\n last_values=[]\n for count,name in enumerate(original_names):\n value=first_enum._generate_next_value_(name,start,count,last_values[:])\n last_values.append(value)\n names.append((name,value))\n \n \n for item in names:\n if isinstance(item,str):\n member_name,member_value=item,names[item]\n else :\n member_name,member_value=item\n classdict[member_name]=member_value\n \n if module is None :\n try :\n module=sys._getframemodulename(2)\n except AttributeError:\n \n try :\n module=sys._getframe(2).f_globals['__name__']\n except (AttributeError,ValueError,KeyError):\n pass\n if module is None :\n _make_class_unpicklable(classdict)\n else :\n classdict['__module__']=module\n if qualname is not None :\n classdict['__qualname__']=qualname\n \n return metacls.__new__(metacls,class_name,bases,classdict,boundary=boundary)\n \n def _convert_(cls,name,module,filter,source=None ,*,boundary=None ,as_global=False ):\n ''\n\n \n \n \n \n \n \n module_globals=sys.modules[module].__dict__\n if source:\n source=source.__dict__\n else :\n source=module_globals\n \n \n \n members=[\n (name,value)\n for name,value in source.items()\n if filter(name)]\n try :\n \n members.sort(key=lambda t:(t[1],t[0]))\n except TypeError:\n \n members.sort(key=lambda t:t[0])\n body={t[0]:t[1]for t in members}\n body['__module__']=module\n tmp_cls=type(name,(object,),body)\n cls=_simple_enum(etype=cls,boundary=boundary or KEEP)(tmp_cls)\n cls.__reduce_ex__=_reduce_ex_by_global_name\n if as_global:\n global_enum(cls)\n else :\n sys.modules[cls.__module__].__dict__.update(cls.__members__)\n module_globals[name]=cls\n return cls\n \n @classmethod\n def _check_for_existing_members_(mcls,class_name,bases):\n for chain in bases:\n for base in chain.__mro__:\n if isinstance(base,EnumType)and base._member_names_:\n raise TypeError(\n \" cannot extend %r\"\n %(class_name,base)\n )\n \n @classmethod\n def _get_mixins_(mcls,class_name,bases):\n ''\n\n\n\n\n \n if not bases:\n return object,Enum\n \n \n first_enum=bases[-1]\n if not isinstance(first_enum,EnumType):\n raise TypeError(\"new enumerations should be created as \"\n \"`EnumName([mixin_type, ...] [data_type,] enum_type)`\")\n member_type=mcls._find_data_type_(class_name,bases)or object\n return member_type,first_enum\n \n @classmethod\n def _find_data_repr_(mcls,class_name,bases):\n for chain in bases:\n for base in chain.__mro__:\n if base is object:\n continue\n elif isinstance(base,EnumType):\n \n return base._value_repr_\n elif '__repr__'in base.__dict__:\n \n \n if (\n '__dataclass_fields__'in base.__dict__\n and '__dataclass_params__'in base.__dict__\n and base.__dict__['__dataclass_params__'].repr\n ):\n return _dataclass_repr\n else :\n return base.__dict__['__repr__']\n return None\n \n @classmethod\n def _find_data_type_(mcls,class_name,bases):\n \n data_types=set()\n base_chain=set()\n for chain in bases:\n candidate=None\n for base in chain.__mro__:\n base_chain.add(base)\n if base is object:\n continue\n elif isinstance(base,EnumType):\n if base._member_type_ is not object:\n data_types.add(base._member_type_)\n break\n elif '__new__'in base.__dict__ or '__dataclass_fields__'in base.__dict__:\n data_types.add(candidate or base)\n break\n else :\n candidate=candidate or base\n if len(data_types)>1:\n raise TypeError('too many data types for %r: %r'%(class_name,data_types))\n elif data_types:\n return data_types.pop()\n else :\n return None\n \n @classmethod\n def _find_new_(mcls,classdict,member_type,first_enum):\n ''\n\n\n\n\n\n \n \n \n \n __new__=classdict.get('__new__',None )\n \n \n save_new=first_enum is not None and __new__ is not None\n \n if __new__ is None :\n \n \n for method in ('__new_member__','__new__'):\n for possible in (member_type,first_enum):\n target=getattr(possible,method,None )\n if target not in {\n None ,\n None .__new__,\n object.__new__,\n Enum.__new__,\n }:\n __new__=target\n break\n if __new__ is not None :\n break\n else :\n __new__=object.__new__\n \n \n \n \n if first_enum is None or __new__ in (Enum.__new__,object.__new__):\n use_args=False\n else :\n use_args=True\n return __new__,save_new,use_args\nEnumMeta=EnumType\n\n\nclass Enum(metaclass=EnumType):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n @classmethod\n def __signature__(cls):\n if cls._member_names_:\n return '(*values)'\n else :\n return '(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)'\n \n def __new__(cls,value):\n \n \n \n if type(value)is cls:\n \n return value\n \n \n try :\n return cls._value2member_map_[value]\n except KeyError:\n \n pass\n except TypeError:\n \n for member in cls._member_map_.values():\n if member._value_ ==value:\n return member\n \n try :\n exc=None\n result=cls._missing_(value)\n except Exception as e:\n exc=e\n result=None\n try :\n if isinstance(result,cls):\n return result\n elif (\n Flag is not None and issubclass(cls,Flag)\n and cls._boundary_ is EJECT and isinstance(result,int)\n ):\n return result\n else :\n ve_exc=ValueError(\"%r is not a valid %s\"%(value,cls.__qualname__))\n if result is None and exc is None :\n raise ve_exc\n elif exc is None :\n exc=TypeError(\n 'error in %s._missing_: returned %r instead of None or a valid member'\n %(cls.__name__,result)\n )\n if not isinstance(exc,ValueError):\n exc.__context__=ve_exc\n raise exc\n finally :\n \n exc=None\n ve_exc=None\n \n def __init__(self,*args,**kwds):\n pass\n \n @staticmethod\n def _generate_next_value_(name,start,count,last_values):\n ''\n\n\n\n\n\n\n \n if not last_values:\n return start\n try :\n last=last_values[-1]\n last_values.sort()\n if last ==last_values[-1]:\n \n return last+1\n else :\n \n raise TypeError\n except TypeError:\n import warnings\n warnings.warn(\n \"In 3.13 the default `auto()`/`_generate_next_value_` will require all values to be sortable and support adding +1\\n\"\n \"and the value returned will be the largest value in the enum incremented by 1\",\n DeprecationWarning,\n stacklevel=3,\n )\n for v in reversed(last_values):\n try :\n return v+1\n except TypeError:\n pass\n return start\n \n @classmethod\n def _missing_(cls,value):\n return None\n \n def __repr__(self):\n v_repr=self.__class__._value_repr_ or repr\n return \"<%s.%s: %s>\"%(self.__class__.__name__,self._name_,v_repr(self._value_))\n \n def __str__(self):\n return \"%s.%s\"%(self.__class__.__name__,self._name_,)\n \n def __dir__(self):\n ''\n\n \n if self.__class__._member_type_ is object:\n interesting=set(['__class__','__doc__','__eq__','__hash__','__module__','name','value'])\n else :\n interesting=set(object.__dir__(self))\n for name in getattr(self,'__dict__',[]):\n if name[0]!='_':\n interesting.add(name)\n for cls in self.__class__.mro():\n for name,obj in cls.__dict__.items():\n if name[0]=='_':\n continue\n if isinstance(obj,property):\n \n if obj.fget is not None or name not in self._member_map_:\n interesting.add(name)\n else :\n \n interesting.discard(name)\n else :\n interesting.add(name)\n names=sorted(\n set(['__class__','__doc__','__eq__','__hash__','__module__'])\n |interesting\n )\n return names\n \n def __format__(self,format_spec):\n return str.__format__(str(self),format_spec)\n \n def __hash__(self):\n return hash(self._name_)\n \n def __reduce_ex__(self,proto):\n return getattr,(self.__class__,self._name_)\n \n \n \n \n \n \n \n \n \n @property\n def name(self):\n ''\n return self._name_\n \n @property\n def value(self):\n ''\n return self._value_\n \n \nclass ReprEnum(Enum):\n ''\n\n \n \n \nclass IntEnum(int,ReprEnum):\n ''\n\n \n \n \nclass StrEnum(str,ReprEnum):\n ''\n\n \n \n def __new__(cls,*values):\n ''\n if len(values)>3:\n raise TypeError('too many arguments for str(): %r'%(values,))\n if len(values)==1:\n \n if not isinstance(values[0],str):\n raise TypeError('%r is not a string'%(values[0],))\n if len(values)>=2:\n \n if not isinstance(values[1],str):\n raise TypeError('encoding must be a string, not %r'%(values[1],))\n if len(values)==3:\n \n if not isinstance(values[2],str):\n raise TypeError('errors must be a string, not %r'%(values[2]))\n value=str(*values)\n member=str.__new__(cls,value)\n member._value_=value\n return member\n \n @staticmethod\n def _generate_next_value_(name,start,count,last_values):\n ''\n\n \n return name.lower()\n \n \ndef _reduce_ex_by_global_name(self,proto):\n return self.name\n \nclass FlagBoundary(StrEnum):\n ''\n\n\n\n\n\n \n STRICT=auto()\n CONFORM=auto()\n EJECT=auto()\n KEEP=auto()\nSTRICT,CONFORM,EJECT,KEEP=FlagBoundary\n\n\nclass Flag(Enum,boundary=STRICT):\n ''\n\n \n \n def __reduce_ex__(self,proto):\n cls=self.__class__\n unknown=self._value_&~cls._flag_mask_\n member_value=self._value_&cls._flag_mask_\n if unknown and member_value:\n return _or_,(cls(member_value),unknown)\n for val in _iter_bits_lsb(member_value):\n rest=member_value&~val\n if rest:\n return _or_,(cls(rest),cls._value2member_map_.get(val))\n else :\n break\n if self._name_ is None :\n return cls,(self._value_,)\n else :\n return getattr,(cls,self._name_)\n \n _numeric_repr_=repr\n \n @staticmethod\n def _generate_next_value_(name,start,count,last_values):\n ''\n\n\n\n\n\n\n \n if not count:\n return start if start is not None else 1\n last_value=max(last_values)\n try :\n high_bit=_high_bit(last_value)\n except Exception:\n raise TypeError('invalid flag value %r'%last_value)from None\n return 2 **(high_bit+1)\n \n @classmethod\n def _iter_member_by_value_(cls,value):\n ''\n\n \n for val in _iter_bits_lsb(value&cls._flag_mask_):\n yield cls._value2member_map_.get(val)\n \n _iter_member_=_iter_member_by_value_\n \n @classmethod\n def _iter_member_by_def_(cls,value):\n ''\n\n \n yield from sorted(\n cls._iter_member_by_value_(value),\n key=lambda m:m._sort_order_,\n )\n \n @classmethod\n def _missing_(cls,value):\n ''\n\n\n\n \n if not isinstance(value,int):\n raise ValueError(\n \"%r is not a valid %s\"%(value,cls.__qualname__)\n )\n \n \n \n \n flag_mask=cls._flag_mask_\n singles_mask=cls._singles_mask_\n all_bits=cls._all_bits_\n neg_value=None\n if (\n not ~all_bits <=value <=all_bits\n or value&(all_bits ^flag_mask)\n ):\n if cls._boundary_ is STRICT:\n max_bits=max(value.bit_length(),flag_mask.bit_length())\n raise ValueError(\n \"%r invalid value %r\\n given %s\\n allowed %s\"%(\n cls,value,bin(value,max_bits),bin(flag_mask,max_bits),\n ))\n elif cls._boundary_ is CONFORM:\n value=value&flag_mask\n elif cls._boundary_ is EJECT:\n return value\n elif cls._boundary_ is KEEP:\n if value <0:\n value=(\n max(all_bits+1,2 **(value.bit_length()))\n +value\n )\n else :\n raise ValueError(\n '%r unknown flag boundary %r'%(cls,cls._boundary_,)\n )\n if value <0:\n neg_value=value\n value=all_bits+1+value\n \n unknown=value&~flag_mask\n aliases=value&~singles_mask\n member_value=value&singles_mask\n if unknown and cls._boundary_ is not KEEP:\n raise ValueError(\n '%s(%r) --> unknown values %r [%s]'\n %(cls.__name__,value,unknown,bin(unknown))\n )\n \n if cls._member_type_ is object:\n \n pseudo_member=object.__new__(cls)\n else :\n pseudo_member=cls._member_type_.__new__(cls,value)\n if not hasattr(pseudo_member,'_value_'):\n pseudo_member._value_=value\n if member_value or aliases:\n members=[]\n combined_value=0\n for m in cls._iter_member_(member_value):\n members.append(m)\n combined_value |=m._value_\n if aliases:\n value=member_value |aliases\n for n,pm in cls._member_map_.items():\n if pm not in members and pm._value_ and pm._value_&value ==pm._value_:\n members.append(pm)\n combined_value |=pm._value_\n unknown=value ^combined_value\n pseudo_member._name_='|'.join([m._name_ for m in members])\n if not combined_value:\n pseudo_member._name_=None\n elif unknown and cls._boundary_ is STRICT:\n raise ValueError('%r: no members with value %r'%(cls,unknown))\n elif unknown:\n pseudo_member._name_ +='|%s'%cls._numeric_repr_(unknown)\n else :\n pseudo_member._name_=None\n \n \n \n if not unknown:\n pseudo_member=cls._value2member_map_.setdefault(value,pseudo_member)\n if neg_value is not None :\n cls._value2member_map_[neg_value]=pseudo_member\n return pseudo_member\n \n def __contains__(self,other):\n ''\n\n \n if not isinstance(other,self.__class__):\n raise TypeError(\n \"unsupported operand type(s) for 'in': %r and %r\"%(\n type(other).__qualname__,self.__class__.__qualname__))\n return other._value_&self._value_ ==other._value_\n \n def __iter__(self):\n ''\n\n \n yield from self._iter_member_(self._value_)\n \n def __len__(self):\n return self._value_.bit_count()\n \n def __repr__(self):\n cls_name=self.__class__.__name__\n v_repr=self.__class__._value_repr_ or repr\n if self._name_ is None :\n return \"<%s: %s>\"%(cls_name,v_repr(self._value_))\n else :\n return \"<%s.%s: %s>\"%(cls_name,self._name_,v_repr(self._value_))\n \n def __str__(self):\n cls_name=self.__class__.__name__\n if self._name_ is None :\n return '%s(%r)'%(cls_name,self._value_)\n else :\n return \"%s.%s\"%(cls_name,self._name_)\n \n def __bool__(self):\n return bool(self._value_)\n \n def __or__(self,other):\n if isinstance(other,self.__class__):\n other=other._value_\n elif self._member_type_ is not object and isinstance(other,self._member_type_):\n other=other\n else :\n return NotImplemented\n value=self._value_\n return self.__class__(value |other)\n \n def __and__(self,other):\n if isinstance(other,self.__class__):\n other=other._value_\n elif self._member_type_ is not object and isinstance(other,self._member_type_):\n other=other\n else :\n return NotImplemented\n value=self._value_\n return self.__class__(value&other)\n \n def __xor__(self,other):\n if isinstance(other,self.__class__):\n other=other._value_\n elif self._member_type_ is not object and isinstance(other,self._member_type_):\n other=other\n else :\n return NotImplemented\n value=self._value_\n return self.__class__(value ^other)\n \n def __invert__(self):\n if self._inverted_ is None :\n if self._boundary_ is KEEP:\n \n self._inverted_=self.__class__(~self._value_)\n else :\n \n self._inverted_=self.__class__(self._flag_mask_ ^self._value_)\n if isinstance(self._inverted_,self.__class__):\n self._inverted_._inverted_=self\n return self._inverted_\n \n __rand__=__and__\n __ror__=__or__\n __rxor__=__xor__\n \n \nclass IntFlag(int,ReprEnum,Flag,boundary=KEEP):\n ''\n\n \n \n \ndef _high_bit(value):\n ''\n\n \n return value.bit_length()-1\n \ndef unique(enumeration):\n ''\n\n \n duplicates=[]\n for name,member in enumeration.__members__.items():\n if name !=member.name:\n duplicates.append((name,member.name))\n if duplicates:\n alias_details=', '.join(\n [\"%s -> %s\"%(alias,name)for (alias,name)in duplicates])\n raise ValueError('duplicate values found in %r: %s'%\n (enumeration,alias_details))\n return enumeration\n \ndef _dataclass_repr(self):\n dcf=self.__dataclass_fields__\n return ', '.join(\n '%s=%r'%(k,getattr(self,k))\n for k in dcf.keys()\n if dcf[k].repr\n )\n \ndef global_enum_repr(self):\n ''\n\n\n\n \n module=self.__class__.__module__.split('.')[-1]\n return '%s.%s'%(module,self._name_)\n \ndef global_flag_repr(self):\n ''\n\n\n\n \n module=self.__class__.__module__.split('.')[-1]\n cls_name=self.__class__.__name__\n if self._name_ is None :\n return \"%s.%s(%r)\"%(module,cls_name,self._value_)\n if _is_single_bit(self):\n return '%s.%s'%(module,self._name_)\n if self._boundary_ is not FlagBoundary.KEEP:\n return '|'.join(['%s.%s'%(module,name)for name in self.name.split('|')])\n else :\n name=[]\n for n in self._name_.split('|'):\n if n[0].isdigit():\n name.append(n)\n else :\n name.append('%s.%s'%(module,n))\n return '|'.join(name)\n \ndef global_str(self):\n ''\n\n \n if self._name_ is None :\n cls_name=self.__class__.__name__\n return \"%s(%r)\"%(cls_name,self._value_)\n else :\n return self._name_\n \ndef global_enum(cls,update_str=False ):\n ''\n\n\n\n \n if issubclass(cls,Flag):\n cls.__repr__=global_flag_repr\n else :\n cls.__repr__=global_enum_repr\n if not issubclass(cls,ReprEnum)or update_str:\n cls.__str__=global_str\n sys.modules[cls.__module__].__dict__.update(cls.__members__)\n return cls\n \ndef _simple_enum(etype=Enum,*,boundary=None ,use_args=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def convert_class(cls):\n nonlocal use_args\n cls_name=cls.__name__\n if use_args is None :\n use_args=etype._use_args_\n __new__=cls.__dict__.get('__new__')\n if __new__ is not None :\n new_member=__new__.__func__\n else :\n new_member=etype._member_type_.__new__\n attrs={}\n body={}\n if __new__ is not None :\n body['__new_member__']=new_member\n body['_new_member_']=new_member\n body['_use_args_']=use_args\n body['_generate_next_value_']=gnv=etype._generate_next_value_\n body['_member_names_']=member_names=[]\n body['_member_map_']=member_map={}\n body['_value2member_map_']=value2member_map={}\n body['_unhashable_values_']=[]\n body['_member_type_']=member_type=etype._member_type_\n body['_value_repr_']=etype._value_repr_\n if issubclass(etype,Flag):\n body['_boundary_']=boundary or etype._boundary_\n body['_flag_mask_']=None\n body['_all_bits_']=None\n body['_singles_mask_']=None\n body['_inverted_']=None\n body['__or__']=Flag.__or__\n body['__xor__']=Flag.__xor__\n body['__and__']=Flag.__and__\n body['__ror__']=Flag.__ror__\n body['__rxor__']=Flag.__rxor__\n body['__rand__']=Flag.__rand__\n body['__invert__']=Flag.__invert__\n for name,obj in cls.__dict__.items():\n if name in ('__dict__','__weakref__'):\n continue\n if _is_dunder(name)or _is_private(cls_name,name)or _is_sunder(name)or _is_descriptor(obj):\n body[name]=obj\n else :\n attrs[name]=obj\n if cls.__dict__.get('__doc__')is None :\n body['__doc__']='An enumeration.'\n \n \n \n \n \n enum_class=type(cls_name,(etype,),body,boundary=boundary,_simple=True )\n for name in ('__repr__','__str__','__format__','__reduce_ex__'):\n if name not in body:\n \n enum_method=getattr(etype,name)\n found_method=getattr(enum_class,name)\n object_method=getattr(object,name)\n data_type_method=getattr(member_type,name)\n if found_method in (data_type_method,object_method):\n setattr(enum_class,name,enum_method)\n gnv_last_values=[]\n if issubclass(enum_class,Flag):\n \n single_bits=multi_bits=0\n for name,value in attrs.items():\n if isinstance(value,auto)and auto.value is _auto_null:\n value=gnv(name,1,len(member_names),gnv_last_values)\n if value in value2member_map:\n \n member=value2member_map[value]\n redirect=property()\n redirect.member=member\n redirect.__set_name__(enum_class,name)\n setattr(enum_class,name,redirect)\n member_map[name]=member\n else :\n \n if use_args:\n if not isinstance(value,tuple):\n value=(value,)\n member=new_member(enum_class,*value)\n value=value[0]\n else :\n member=new_member(enum_class)\n if __new__ is None :\n member._value_=value\n member._name_=name\n member.__objclass__=enum_class\n member.__init__(value)\n redirect=property()\n redirect.member=member\n redirect.__set_name__(enum_class,name)\n setattr(enum_class,name,redirect)\n member_map[name]=member\n member._sort_order_=len(member_names)\n value2member_map[value]=member\n if _is_single_bit(value):\n \n member_names.append(name)\n single_bits |=value\n else :\n multi_bits |=value\n gnv_last_values.append(value)\n enum_class._flag_mask_=single_bits |multi_bits\n enum_class._singles_mask_=single_bits\n enum_class._all_bits_=2 **((single_bits |multi_bits).bit_length())-1\n \n member_list=[m._value_ for m in enum_class]\n if member_list !=sorted(member_list):\n enum_class._iter_member_=enum_class._iter_member_by_def_\n else :\n \n for name,value in attrs.items():\n if isinstance(value,auto):\n if value.value is _auto_null:\n value.value=gnv(name,1,len(member_names),gnv_last_values)\n value=value.value\n if value in value2member_map:\n \n member=value2member_map[value]\n redirect=property()\n redirect.member=member\n redirect.__set_name__(enum_class,name)\n setattr(enum_class,name,redirect)\n member_map[name]=member\n else :\n \n if use_args:\n if not isinstance(value,tuple):\n value=(value,)\n member=new_member(enum_class,*value)\n value=value[0]\n else :\n member=new_member(enum_class)\n if __new__ is None :\n member._value_=value\n member._name_=name\n member.__objclass__=enum_class\n member.__init__(value)\n member._sort_order_=len(member_names)\n redirect=property()\n redirect.member=member\n redirect.__set_name__(enum_class,name)\n setattr(enum_class,name,redirect)\n member_map[name]=member\n value2member_map[value]=member\n member_names.append(name)\n gnv_last_values.append(value)\n if '__new__'in body:\n enum_class.__new_member__=enum_class.__new__\n enum_class.__new__=Enum.__new__\n return enum_class\n return convert_class\n \n@_simple_enum(StrEnum)\nclass EnumCheck:\n ''\n\n \n CONTINUOUS=\"no skipped integer values\"\n NAMED_FLAGS=\"multi-flag aliases may not contain unnamed flags\"\n UNIQUE=\"one name per value\"\nCONTINUOUS,NAMED_FLAGS,UNIQUE=EnumCheck\n\n\nclass verify:\n ''\n\n \n def __init__(self,*checks):\n self.checks=checks\n def __call__(self,enumeration):\n checks=self.checks\n cls_name=enumeration.__name__\n if Flag is not None and issubclass(enumeration,Flag):\n enum_type='flag'\n elif issubclass(enumeration,Enum):\n enum_type='enum'\n else :\n raise TypeError(\"the 'verify' decorator only works with Enum and Flag\")\n for check in checks:\n if check is UNIQUE:\n \n duplicates=[]\n for name,member in enumeration.__members__.items():\n if name !=member.name:\n duplicates.append((name,member.name))\n if duplicates:\n alias_details=', '.join(\n [\"%s -> %s\"%(alias,name)for (alias,name)in duplicates])\n raise ValueError('aliases found in %r: %s'%\n (enumeration,alias_details))\n elif check is CONTINUOUS:\n values=set(e.value for e in enumeration)\n if len(values)<2:\n continue\n low,high=min(values),max(values)\n missing=[]\n if enum_type =='flag':\n \n for i in range(_high_bit(low)+1,_high_bit(high)):\n if 2 **i not in values:\n missing.append(2 **i)\n elif enum_type =='enum':\n \n for i in range(low+1,high):\n if i not in values:\n missing.append(i)\n else :\n raise Exception('verify: unknown type %r'%enum_type)\n if missing:\n raise ValueError(('invalid %s %r: missing values %s'%(\n enum_type,cls_name,', '.join((str(m)for m in missing)))\n )[:256])\n \n elif check is NAMED_FLAGS:\n \n member_names=enumeration._member_names_\n member_values=[m.value for m in enumeration]\n missing_names=[]\n missing_value=0\n for name,alias in enumeration._member_map_.items():\n if name in member_names:\n \n continue\n if alias.value <0:\n \n continue\n values=list(_iter_bits_lsb(alias.value))\n missed=[v for v in values if v not in member_values]\n if missed:\n missing_names.append(name)\n missing_value |=reduce(_or_,missed)\n if missing_names:\n if len(missing_names)==1:\n alias='alias %s is missing'%missing_names[0]\n else :\n alias='aliases %s and %s are missing'%(\n ', '.join(missing_names[:-1]),missing_names[-1]\n )\n if _is_single_bit(missing_value):\n value='value 0x%x'%missing_value\n else :\n value='combined values of 0x%x'%missing_value\n raise ValueError(\n 'invalid Flag %r: %s %s [use enum.show_flag_values(value) for details]'\n %(cls_name,alias,value)\n )\n return enumeration\n \ndef _test_simple_enum(checked_enum,simple_enum):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n failed=[]\n if checked_enum.__dict__ !=simple_enum.__dict__:\n checked_dict=checked_enum.__dict__\n checked_keys=list(checked_dict.keys())\n simple_dict=simple_enum.__dict__\n simple_keys=list(simple_dict.keys())\n member_names=set(\n list(checked_enum._member_map_.keys())\n +list(simple_enum._member_map_.keys())\n )\n for key in set(checked_keys+simple_keys):\n if key in ('__module__','_member_map_','_value2member_map_','__doc__'):\n \n continue\n elif key in member_names:\n \n continue\n elif key not in simple_keys:\n failed.append(\"missing key: %r\"%(key,))\n elif key not in checked_keys:\n failed.append(\"extra key: %r\"%(key,))\n else :\n checked_value=checked_dict[key]\n simple_value=simple_dict[key]\n if callable(checked_value)or isinstance(checked_value,bltns.property):\n continue\n if key =='__doc__':\n \n compressed_checked_value=checked_value.replace(' ','').replace('\\t','')\n compressed_simple_value=simple_value.replace(' ','').replace('\\t','')\n if compressed_checked_value !=compressed_simple_value:\n failed.append(\"%r:\\n %s\\n %s\"%(\n key,\n \"checked -> %r\"%(checked_value,),\n \"simple -> %r\"%(simple_value,),\n ))\n elif checked_value !=simple_value:\n failed.append(\"%r:\\n %s\\n %s\"%(\n key,\n \"checked -> %r\"%(checked_value,),\n \"simple -> %r\"%(simple_value,),\n ))\n failed.sort()\n for name in member_names:\n failed_member=[]\n if name not in simple_keys:\n failed.append('missing member from simple enum: %r'%name)\n elif name not in checked_keys:\n failed.append('extra member in simple enum: %r'%name)\n else :\n checked_member_dict=checked_enum[name].__dict__\n checked_member_keys=list(checked_member_dict.keys())\n simple_member_dict=simple_enum[name].__dict__\n simple_member_keys=list(simple_member_dict.keys())\n for key in set(checked_member_keys+simple_member_keys):\n if key in ('__module__','__objclass__','_inverted_'):\n \n continue\n elif key not in simple_member_keys:\n failed_member.append(\"missing key %r not in the simple enum member %r\"%(key,name))\n elif key not in checked_member_keys:\n failed_member.append(\"extra key %r in simple enum member %r\"%(key,name))\n else :\n checked_value=checked_member_dict[key]\n simple_value=simple_member_dict[key]\n if checked_value !=simple_value:\n failed_member.append(\"%r:\\n %s\\n %s\"%(\n key,\n \"checked member -> %r\"%(checked_value,),\n \"simple member -> %r\"%(simple_value,),\n ))\n if failed_member:\n failed.append('%r member mismatch:\\n %s'%(\n name,'\\n '.join(failed_member),\n ))\n for method in (\n '__str__','__repr__','__reduce_ex__','__format__',\n '__getnewargs_ex__','__getnewargs__','__reduce_ex__','__reduce__'\n ):\n if method in simple_keys and method in checked_keys:\n \n continue\n elif method not in simple_keys and method not in checked_keys:\n \n checked_method=getattr(checked_enum,method,None )\n simple_method=getattr(simple_enum,method,None )\n if hasattr(checked_method,'__func__'):\n checked_method=checked_method.__func__\n simple_method=simple_method.__func__\n if checked_method !=simple_method:\n failed.append(\"%r: %-30s %s\"%(\n method,\n \"checked -> %r\"%(checked_method,),\n \"simple -> %r\"%(simple_method,),\n ))\n else :\n \n \n pass\n if failed:\n raise TypeError('enum mismatch:\\n %s'%'\\n '.join(failed))\n \ndef _old_convert_(etype,name,module,filter,source=None ,*,boundary=None ):\n ''\n\n \n \n \n \n \n \n module_globals=sys.modules[module].__dict__\n if source:\n source=source.__dict__\n else :\n source=module_globals\n \n \n \n members=[\n (name,value)\n for name,value in source.items()\n if filter(name)]\n try :\n \n members.sort(key=lambda t:(t[1],t[0]))\n except TypeError:\n \n members.sort(key=lambda t:t[0])\n cls=etype(name,members,module=module,boundary=boundary or KEEP)\n cls.__reduce_ex__=_reduce_ex_by_global_name\n return cls\n \n_stdlib_enums=IntEnum,StrEnum,IntFlag\n", ["builtins", "functools", "operator", "sys", "types", "warnings"]], "errno": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\nE2BIG=7\n\nEACCES=13\n\nEADDRINUSE=10048\n\nEADDRNOTAVAIL=10049\n\nEAFNOSUPPORT=10047\n\nEAGAIN=11\n\nEALREADY=10037\n\nEBADF=9\n\nEBADMSG=104\n\nEBUSY=16\n\nECANCELED=105\n\nECHILD=10\n\nECONNABORTED=10053\n\nECONNREFUSED=10061\n\nECONNRESET=10054\n\nEDEADLK=36\n\nEDEADLOCK=36\n\nEDESTADDRREQ=10039\n\nEDOM=33\n\nEDQUOT=10069\n\nEEXIST=17\n\nEFAULT=14\n\nEFBIG=27\n\nEHOSTDOWN=10064\n\nEHOSTUNREACH=10065\n\nEIDRM=111\n\nEILSEQ=42\n\nEINPROGRESS=10036\n\nEINTR=4\n\nEINVAL=22\n\nEIO=5\n\nEISCONN=10056\n\nEISDIR=21\n\nELOOP=10062\n\nEMFILE=24\n\nEMLINK=31\n\nEMSGSIZE=10040\n\nENAMETOOLONG=38\n\nENETDOWN=10050\n\nENETRESET=10052\n\nENETUNREACH=10051\n\nENFILE=23\n\nENOBUFS=10055\n\nENODATA=120\n\nENODEV=19\n\nENOENT=2\n\nENOEXEC=8\n\nENOLCK=39\n\nENOLINK=121\n\nENOMEM=12\n\nENOMSG=122\n\nENOPROTOOPT=10042\n\nENOSPC=28\n\nENOSR=124\n\nENOSTR=125\n\nENOSYS=40\n\nENOTCONN=10057\n\nENOTDIR=20\n\nENOTEMPTY=41\n\nENOTRECOVERABLE=127\n\nENOTSOCK=10038\n\nENOTSUP=129\n\nENOTTY=25\n\nENXIO=6\n\nEOPNOTSUPP=10045\n\nEOVERFLOW=132\n\nEOWNERDEAD=133\n\nEPERM=1\n\nEPFNOSUPPORT=10046\n\nEPIPE=32\n\nEPROTO=134\n\nEPROTONOSUPPORT=10043\n\nEPROTOTYPE=10041\n\nERANGE=34\n\nEREMOTE=10071\n\nEROFS=30\n\nESHUTDOWN=10058\n\nESOCKTNOSUPPORT=10044\n\nESPIPE=29\n\nESRCH=3\n\nESTALE=10070\n\nETIME=137\n\nETIMEDOUT=10060\n\nETOOMANYREFS=10059\n\nETXTBSY=139\n\nEUSERS=10068\n\nEWOULDBLOCK=10035\n\nEXDEV=18\n\nWSABASEERR=10000\n\nWSAEACCES=10013\n\nWSAEADDRINUSE=10048\n\nWSAEADDRNOTAVAIL=10049\n\nWSAEAFNOSUPPORT=10047\n\nWSAEALREADY=10037\n\nWSAEBADF=10009\n\nWSAECONNABORTED=10053\n\nWSAECONNREFUSED=10061\n\nWSAECONNRESET=10054\n\nWSAEDESTADDRREQ=10039\n\nWSAEDISCON=10101\n\nWSAEDQUOT=10069\n\nWSAEFAULT=10014\n\nWSAEHOSTDOWN=10064\n\nWSAEHOSTUNREACH=10065\n\nWSAEINPROGRESS=10036\n\nWSAEINTR=10004\n\nWSAEINVAL=10022\n\nWSAEISCONN=10056\n\nWSAELOOP=10062\n\nWSAEMFILE=10024\n\nWSAEMSGSIZE=10040\n\nWSAENAMETOOLONG=10063\n\nWSAENETDOWN=10050\n\nWSAENETRESET=10052\n\nWSAENETUNREACH=10051\n\nWSAENOBUFS=10055\n\nWSAENOPROTOOPT=10042\n\nWSAENOTCONN=10057\n\nWSAENOTEMPTY=10066\n\nWSAENOTSOCK=10038\n\nWSAEOPNOTSUPP=10045\n\nWSAEPFNOSUPPORT=10046\n\nWSAEPROCLIM=10067\n\nWSAEPROTONOSUPPORT=10043\n\nWSAEPROTOTYPE=10041\n\nWSAEREMOTE=10071\n\nWSAESHUTDOWN=10058\n\nWSAESOCKTNOSUPPORT=10044\n\nWSAESTALE=10070\n\nWSAETIMEDOUT=10060\n\nWSAETOOMANYREFS=10059\n\nWSAEUSERS=10068\n\nWSAEWOULDBLOCK=10035\n\nWSANOTINITIALISED=10093\n\nWSASYSNOTREADY=10091\n\nWSAVERNOTSUPPORTED=10092\n\nerrorcode={v:k for (k,v)in globals().items()if k ==k.upper()}\n", []], "external_import": [".py", "import os\nimport sys\nfrom browser import doc\nimport urllib.request\n\n\n\n\n\nclass ModuleFinder:\n def __init__(self,path_entry):\n print(\"external_import here..\")\n \n self._module=None\n if path_entry.startswith('http://'):\n self.path_entry=path_entry\n else :\n raise ImportError()\n \n def __str__(self):\n return '<%s for \"%s\">'%(self.__class__.__name__,self.path_entry)\n \n def find_module(self,fullname,path=None ):\n path=path or self.path_entry\n \n for _ext in ['js','pyj','py']:\n _fp,_url,_headers=urllib.request.urlopen(path+'/'+'%s.%s'%(fullname,_ext))\n self._module=_fp.read()\n _fp.close()\n if self._module is not None :\n print(\"module found at %s:%s\"%(path,fullname))\n return ModuleLoader(path,fullname,self._module)\n \n print('module %s not found'%fullname)\n raise ImportError()\n return None\n \nclass ModuleLoader:\n ''\n \n def __init__(self,filepath,name,module_source):\n self._filepath=filepath\n self._name=name\n self._module_source=module_source\n \n def get_source(self):\n return self._module_source\n \n def is_package(self):\n return '.'in self._name\n \n def load_module(self):\n if self._name in sys.modules:\n \n mod=sys.modules[self._name]\n return mod\n \n _src=self.get_source()\n if self._filepath.endswith('.js'):\n mod=JSObject(import_js_module(_src,self._filepath,self._name))\n elif self._filepath.endswith('.py'):\n mod=JSObject(import_py_module(_src,self._filepath,self._name))\n elif self._filepath.endswith('.pyj'):\n mod=JSObject(import_pyj_module(_src,self._filepath,self._name))\n else :\n raise ImportError('Invalid Module: %s'%self._filepath)\n \n \n mod.__file__=self._filepath\n mod.__name__=self._name\n mod.__path__=os.path.abspath(self._filepath)\n mod.__loader__=self\n mod.__package__='.'.join(self._name.split('.')[:-1])\n \n if self.is_package():\n print('adding path for package')\n \n \n mod.__path__=[self._filepath]\n else :\n print('imported as regular module')\n \n print('creating a new module object for \"%s\"'%self._name)\n sys.modules.setdefault(self._name,mod)\n JSObject(__BRYTHON__.imported)[self._name]=mod\n \n return mod\n", ["browser", "os", "sys", "urllib.request"]], "faulthandler": [".py", "''\n\n\n_EXCEPTION_ACCESS_VIOLATION=-1073741819\n\n_EXCEPTION_INT_DIVIDE_BY_ZERO=-1073741676\n\n_EXCEPTION_NONCONTINUABLE=1\n\n_EXCEPTION_NONCONTINUABLE_EXCEPTION=-1073741787\n\n_EXCEPTION_STACK_OVERFLOW=-1073741571\n\nclass __loader__(object):\n ''\n\n\n\n\n \n \n \n __delattr__=\"\"\n \n __dict__=\"{'__module__': '_frozen_importlib', '__doc__': 'Meta path import for built-in modules.\\n\\n All methods are either class or static methods to avoid the need to\\n instantiate the class.\\n\\n ', 'module_repr': , 'find_spec': , 'find_module': , 'create_module': , 'exec_module': , 'get_code': , 'get_source': , 'is_package': , 'load_module': , '__dict__': , '__weakref__': }\"\n \n __dir__=\"\"\n \n __eq__=\"\"\n \n __format__=\"\"\n \n __ge__=\"\"\n \n __getattribute__=\"\"\n \n __gt__=\"\"\n \n __hash__=\"\"\n \n __init__=\"\"\n \n def __init_subclass__(*args,**kw):\n ''\n\n\n \n pass\n \n __le__=\"\"\n \n __lt__=\"\"\n \n __module__=\"\"\"_frozen_importlib\"\"\"\n \n __ne__=\"\"\n \n def __new__(*args,**kw):\n ''\n pass\n \n __reduce__=\"\"\n \n __reduce_ex__=\"\"\n \n __repr__=\"\"\n \n __setattr__=\"\"\n \n __sizeof__=\"\"\n \n __str__=\"\"\n \n def __subclasshook__(*args,**kw):\n ''\n\n\n\n\n \n pass\n \n __weakref__=\"\"\n \n create_module=\">\"\n \n exec_module=\">\"\n \n find_module=\">\"\n \n find_spec=\">\"\n \n get_code=\">\"\n \n get_source=\">\"\n \n is_package=\">\"\n \n load_module=\">\"\n \n def module_repr(*args,**kw):\n ''\n\n\n \n pass\n__spec__=\"ModuleSpec(name='faulthandler', loader=, origin='built-in')\"\n\ndef _fatal_error(*args,**kw):\n ''\n pass\n \ndef _fatal_error_c_thread(*args,**kw):\n ''\n pass\n \ndef _raise_exception(*args,**kw):\n ''\n pass\n \ndef _read_null(*args,**kw):\n ''\n pass\n \ndef _sigabrt(*args,**kw):\n ''\n pass\n \ndef _sigfpe(*args,**kw):\n ''\n pass\n \ndef _sigsegv(*args,**kw):\n ''\n pass\n \ndef cancel_dump_traceback_later(*args,**kw):\n ''\n pass\n \ndef disable(*args,**kw):\n ''\n pass\n \ndef dump_traceback(*args,**kw):\n ''\n pass\n \ndef dump_traceback_later(*args,**kw):\n ''\n \n pass\n \ndef enable(*args,**kw):\n ''\n pass\n \ndef is_enabled(*args,**kw):\n ''\n pass\n", []], "fnmatch": [".py", "''\n\n\n\n\n\n\n\n\n\n\nimport os\nimport posixpath\nimport re\nimport functools\n\n__all__=[\"filter\",\"fnmatch\",\"fnmatchcase\",\"translate\"]\n\ndef fnmatch(name,pat):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n name=os.path.normcase(name)\n pat=os.path.normcase(pat)\n return fnmatchcase(name,pat)\n \n@functools.lru_cache(maxsize=32768,typed=True )\ndef _compile_pattern(pat):\n if isinstance(pat,bytes):\n pat_str=str(pat,'ISO-8859-1')\n res_str=translate(pat_str)\n res=bytes(res_str,'ISO-8859-1')\n else :\n res=translate(pat)\n return re.compile(res).match\n \ndef filter(names,pat):\n ''\n result=[]\n pat=os.path.normcase(pat)\n match=_compile_pattern(pat)\n if os.path is posixpath:\n \n for name in names:\n if match(name):\n result.append(name)\n else :\n for name in names:\n if match(os.path.normcase(name)):\n result.append(name)\n return result\n \ndef fnmatchcase(name,pat):\n ''\n\n\n\n \n match=_compile_pattern(pat)\n return match(name)is not None\n \n \ndef translate(pat):\n ''\n\n\n \n \n STAR=object()\n res=[]\n add=res.append\n i,n=0,len(pat)\n while i =n:\n add('\\\\[')\n else :\n stuff=pat[i:j]\n if '-'not in stuff:\n stuff=stuff.replace('\\\\',r'\\\\')\n else :\n chunks=[]\n k=i+2 if pat[i]=='!'else i+1\n while True :\n k=pat.find('-',k,j)\n if k <0:\n break\n chunks.append(pat[i:k])\n i=k+1\n k=k+3\n chunk=pat[i:j]\n if chunk:\n chunks.append(chunk)\n else :\n chunks[-1]+='-'\n \n for k in range(len(chunks)-1,0,-1):\n if chunks[k -1][-1]>chunks[k][0]:\n chunks[k -1]=chunks[k -1][:-1]+chunks[k][1:]\n del chunks[k]\n \n \n stuff='-'.join(s.replace('\\\\',r'\\\\').replace('-',r'\\-')\n for s in chunks)\n \n stuff=re.sub(r'([&~|])',r'\\\\\\1',stuff)\n i=j+1\n if not stuff:\n \n add('(?!)')\n elif stuff =='!':\n \n add('.')\n else :\n if stuff[0]=='!':\n stuff='^'+stuff[1:]\n elif stuff[0]in ('^','['):\n stuff='\\\\'+stuff\n add(f'[{stuff}]')\n else :\n add(re.escape(c))\n assert i ==n\n \n \n inp=res\n res=[]\n add=res.append\n i,n=0,len(inp)\n \n while i .*?{fixed})\")\n assert i ==n\n res=\"\".join(res)\n return fr'(?s:{res})\\Z'\n", ["functools", "os", "posixpath", "re"]], "formatter": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport sys\nimport warnings\nwarnings.warn('the formatter module is deprecated',DeprecationWarning,\nstacklevel=2)\n\n\nAS_IS=None\n\n\nclass NullFormatter:\n ''\n\n\n\n\n\n\n\n \n \n def __init__(self,writer=None ):\n if writer is None :\n writer=NullWriter()\n self.writer=writer\n def end_paragraph(self,blankline):pass\n def add_line_break(self):pass\n def add_hor_rule(self,*args,**kw):pass\n def add_label_data(self,format,counter,blankline=None ):pass\n def add_flowing_data(self,data):pass\n def add_literal_data(self,data):pass\n def flush_softspace(self):pass\n def push_alignment(self,align):pass\n def pop_alignment(self):pass\n def push_font(self,x):pass\n def pop_font(self):pass\n def push_margin(self,margin):pass\n def pop_margin(self):pass\n def set_spacing(self,spacing):pass\n def push_style(self,*styles):pass\n def pop_style(self,n=1):pass\n def assert_line_data(self,flag=1):pass\n \n \nclass AbstractFormatter:\n ''\n\n\n\n\n\n \n \n \n \n \n \n \n def __init__(self,writer):\n self.writer=writer\n self.align=None\n self.align_stack=[]\n self.font_stack=[]\n self.margin_stack=[]\n self.spacing=None\n self.style_stack=[]\n self.nospace=1\n self.softspace=0\n self.para_end=1\n self.parskip=0\n self.hard_break=1\n self.have_label=0\n \n def end_paragraph(self,blankline):\n if not self.hard_break:\n self.writer.send_line_break()\n self.have_label=0\n if self.parskip 0:\n label=label+self.format_letter(c,counter)\n elif c in 'iI':\n if counter >0:\n label=label+self.format_roman(c,counter)\n else :\n label=label+c\n return label\n \n def format_letter(self,case,counter):\n label=''\n while counter >0:\n counter,x=divmod(counter -1,26)\n \n \n \n s=chr(ord(case)+x)\n label=s+label\n return label\n \n def format_roman(self,case,counter):\n ones=['i','x','c','m']\n fives=['v','l','d']\n label,index='',0\n \n while counter >0:\n counter,x=divmod(counter,10)\n if x ==9:\n label=ones[index]+ones[index+1]+label\n elif x ==4:\n label=ones[index]+fives[index]+label\n else :\n if x >=5:\n s=fives[index]\n x=x -5\n else :\n s=''\n s=s+ones[index]*x\n label=s+label\n index=index+1\n if case =='I':\n return label.upper()\n return label\n \n def add_flowing_data(self,data):\n if not data:return\n prespace=data[:1].isspace()\n postspace=data[-1:].isspace()\n data=\" \".join(data.split())\n if self.nospace and not data:\n return\n elif prespace or self.softspace:\n if not data:\n if not self.nospace:\n self.softspace=1\n self.parskip=0\n return\n if not self.nospace:\n data=' '+data\n self.hard_break=self.nospace=self.para_end=\\\n self.parskip=self.have_label=0\n self.softspace=postspace\n self.writer.send_flowing_data(data)\n \n def add_literal_data(self,data):\n if not data:return\n if self.softspace:\n self.writer.send_flowing_data(\" \")\n self.hard_break=data[-1:]=='\\n'\n self.nospace=self.para_end=self.softspace=\\\n self.parskip=self.have_label=0\n self.writer.send_literal_data(data)\n \n def flush_softspace(self):\n if self.softspace:\n self.hard_break=self.para_end=self.parskip=\\\n self.have_label=self.softspace=0\n self.nospace=1\n self.writer.send_flowing_data(' ')\n \n def push_alignment(self,align):\n if align and align !=self.align:\n self.writer.new_alignment(align)\n self.align=align\n self.align_stack.append(align)\n else :\n self.align_stack.append(self.align)\n \n def pop_alignment(self):\n if self.align_stack:\n del self.align_stack[-1]\n if self.align_stack:\n self.align=align=self.align_stack[-1]\n self.writer.new_alignment(align)\n else :\n self.align=None\n self.writer.new_alignment(None )\n \n def push_font(self,font):\n size,i,b,tt=font\n if self.softspace:\n self.hard_break=self.para_end=self.softspace=0\n self.nospace=1\n self.writer.send_flowing_data(' ')\n if self.font_stack:\n csize,ci,cb,ctt=self.font_stack[-1]\n if size is AS_IS:size=csize\n if i is AS_IS:i=ci\n if b is AS_IS:b=cb\n if tt is AS_IS:tt=ctt\n font=(size,i,b,tt)\n self.font_stack.append(font)\n self.writer.new_font(font)\n \n def pop_font(self):\n if self.font_stack:\n del self.font_stack[-1]\n if self.font_stack:\n font=self.font_stack[-1]\n else :\n font=None\n self.writer.new_font(font)\n \n def push_margin(self,margin):\n self.margin_stack.append(margin)\n fstack=[m for m in self.margin_stack if m]\n if not margin and fstack:\n margin=fstack[-1]\n self.writer.new_margin(margin,len(fstack))\n \n def pop_margin(self):\n if self.margin_stack:\n del self.margin_stack[-1]\n fstack=[m for m in self.margin_stack if m]\n if fstack:\n margin=fstack[-1]\n else :\n margin=None\n self.writer.new_margin(margin,len(fstack))\n \n def set_spacing(self,spacing):\n self.spacing=spacing\n self.writer.new_spacing(spacing)\n \n def push_style(self,*styles):\n if self.softspace:\n self.hard_break=self.para_end=self.softspace=0\n self.nospace=1\n self.writer.send_flowing_data(' ')\n for style in styles:\n self.style_stack.append(style)\n self.writer.new_styles(tuple(self.style_stack))\n \n def pop_style(self,n=1):\n del self.style_stack[-n:]\n self.writer.new_styles(tuple(self.style_stack))\n \n def assert_line_data(self,flag=1):\n self.nospace=self.hard_break=not flag\n self.para_end=self.parskip=self.have_label=0\n \n \nclass NullWriter:\n ''\n\n\n\n\n\n \n def __init__(self):pass\n def flush(self):pass\n def new_alignment(self,align):pass\n def new_font(self,font):pass\n def new_margin(self,margin,level):pass\n def new_spacing(self,spacing):pass\n def new_styles(self,styles):pass\n def send_paragraph(self,blankline):pass\n def send_line_break(self):pass\n def send_hor_rule(self,*args,**kw):pass\n def send_label_data(self,data):pass\n def send_flowing_data(self,data):pass\n def send_literal_data(self,data):pass\n \n \nclass AbstractWriter(NullWriter):\n ''\n\n\n\n\n \n \n def new_alignment(self,align):\n print(\"new_alignment(%r)\"%(align,))\n \n def new_font(self,font):\n print(\"new_font(%r)\"%(font,))\n \n def new_margin(self,margin,level):\n print(\"new_margin(%r, %d)\"%(margin,level))\n \n def new_spacing(self,spacing):\n print(\"new_spacing(%r)\"%(spacing,))\n \n def new_styles(self,styles):\n print(\"new_styles(%r)\"%(styles,))\n \n def send_paragraph(self,blankline):\n print(\"send_paragraph(%r)\"%(blankline,))\n \n def send_line_break(self):\n print(\"send_line_break()\")\n \n def send_hor_rule(self,*args,**kw):\n print(\"send_hor_rule()\")\n \n def send_label_data(self,data):\n print(\"send_label_data(%r)\"%(data,))\n \n def send_flowing_data(self,data):\n print(\"send_flowing_data(%r)\"%(data,))\n \n def send_literal_data(self,data):\n print(\"send_literal_data(%r)\"%(data,))\n \n \nclass DumbWriter(NullWriter):\n ''\n\n\n\n\n\n \n \n def __init__(self,file=None ,maxcol=72):\n self.file=file or sys.stdout\n self.maxcol=maxcol\n NullWriter.__init__(self)\n self.reset()\n \n def reset(self):\n self.col=0\n self.atbreak=0\n \n def send_paragraph(self,blankline):\n self.file.write('\\n'*blankline)\n self.col=0\n self.atbreak=0\n \n def send_line_break(self):\n self.file.write('\\n')\n self.col=0\n self.atbreak=0\n \n def send_hor_rule(self,*args,**kw):\n self.file.write('\\n')\n self.file.write('-'*self.maxcol)\n self.file.write('\\n')\n self.col=0\n self.atbreak=0\n \n def send_literal_data(self,data):\n self.file.write(data)\n i=data.rfind('\\n')\n if i >=0:\n self.col=0\n data=data[i+1:]\n data=data.expandtabs()\n self.col=self.col+len(data)\n self.atbreak=0\n \n def send_flowing_data(self,data):\n if not data:return\n atbreak=self.atbreak or data[0].isspace()\n col=self.col\n maxcol=self.maxcol\n write=self.file.write\n for word in data.split():\n if atbreak:\n if col+len(word)>=maxcol:\n write('\\n')\n col=0\n else :\n write(' ')\n col=col+1\n write(word)\n col=col+len(word)\n atbreak=1\n self.col=col\n self.atbreak=data[-1].isspace()\n \n \ndef test(file=None ):\n w=DumbWriter()\n f=AbstractFormatter(w)\n if file is not None :\n fp=open(file)\n elif sys.argv[1:]:\n fp=open(sys.argv[1])\n else :\n fp=sys.stdin\n try :\n for line in fp:\n if line =='\\n':\n f.end_paragraph(1)\n else :\n f.add_flowing_data(line)\n finally :\n if fp is not sys.stdin:\n fp.close()\n f.end_paragraph(0)\n \n \nif __name__ =='__main__':\n test()\n", ["sys", "warnings"]], "fractions": [".py", "\n\n\n\"\"\"Fraction, infinite-precision, rational numbers.\"\"\"\n\nfrom decimal import Decimal\nimport functools\nimport math\nimport numbers\nimport operator\nimport re\nimport sys\n\n__all__=['Fraction']\n\n\n\n\n_PyHASH_MODULUS=sys.hash_info.modulus\n\n\n_PyHASH_INF=sys.hash_info.inf\n\n@functools.lru_cache(maxsize=1 <<14)\ndef _hash_algorithm(numerator,denominator):\n\n\n\n\n\n\n try :\n dinv=pow(denominator,-1,_PyHASH_MODULUS)\n except ValueError:\n \n hash_=_PyHASH_INF\n else :\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n hash_=hash(hash(abs(numerator))*dinv)\n result=hash_ if numerator >=0 else -hash_\n return -2 if result ==-1 else result\n \n_RATIONAL_FORMAT=re.compile(r\"\"\"\n \\A\\s* # optional whitespace at the start,\n (?P[-+]?) # an optional sign, then\n (?=\\d|\\.\\d) # lookahead for digit or .digit\n (?P\\d*|\\d+(_\\d+)*) # numerator (possibly empty)\n (?: # followed by\n (?:\\s*/\\s*(?P\\d+(_\\d+)*))? # an optional denominator\n | # or\n (?:\\.(?Pd*|\\d+(_\\d+)*))? # an optional fractional part\n (?:E(?P[-+]?\\d+(_\\d+)*))? # and optional exponent\n )\n \\s*\\Z # and optional whitespace to finish\n\"\"\",re.VERBOSE |re.IGNORECASE)\n\n\n\n\ndef _round_to_exponent(n,d,exponent,no_neg_zero=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n if exponent >=0:\n d *=10 **exponent\n else :\n n *=10 **-exponent\n \n \n \n q,r=divmod(n+(d >>1),d)\n if r ==0 and d&1 ==0:\n q &=-2\n \n sign=q <0 if no_neg_zero else n <0\n return sign,abs(q)\n \n \ndef _round_to_figures(n,d,figures):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if n ==0:\n return False ,0,1 -figures\n \n \n \n str_n,str_d=str(abs(n)),str(d)\n m=len(str_n)-len(str_d)+(str_d <=str_n)\n \n \n \n exponent=m -figures\n sign,significand=_round_to_exponent(n,d,exponent)\n \n \n \n if len(str(significand))==figures+1:\n significand //=10\n exponent +=1\n \n return sign,significand,exponent\n \n \n \n \n_FLOAT_FORMAT_SPECIFICATION_MATCHER=re.compile(r\"\"\"\n (?:\n (?P.)?\n (?P[<>=^])\n )?\n (?P[-+ ]?)\n (?Pz)?\n (?P\\#)?\n # A '0' that's *not* followed by another digit is parsed as a minimum width\n # rather than a zeropad flag.\n (?P0(?=[0-9]))?\n (?P0|[1-9][0-9]*)?\n (?P[,_])?\n (?:\\.(?P0|[1-9][0-9]*))?\n (?P[eEfFgG%])\n\"\"\",re.DOTALL |re.VERBOSE).fullmatch\n\n\nclass Fraction(numbers.Rational):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=('_numerator','_denominator')\n \n \n def __new__(cls,numerator=0,denominator=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self=super(Fraction,cls).__new__(cls)\n \n if denominator is None :\n if type(numerator)is int:\n self._numerator=numerator\n self._denominator=1\n return self\n \n elif isinstance(numerator,numbers.Rational):\n self._numerator=numerator.numerator\n self._denominator=numerator.denominator\n return self\n \n elif isinstance(numerator,(float,Decimal)):\n \n self._numerator,self._denominator=numerator.as_integer_ratio()\n return self\n \n elif isinstance(numerator,str):\n \n m=_RATIONAL_FORMAT.match(numerator)\n if m is None :\n raise ValueError('Invalid literal for Fraction: %r'%\n numerator)\n numerator=int(m.group('num')or '0')\n denom=m.group('denom')\n if denom:\n denominator=int(denom)\n else :\n denominator=1\n decimal=m.group('decimal')\n if decimal:\n decimal=decimal.replace('_','')\n scale=10 **len(decimal)\n numerator=numerator *scale+int(decimal)\n denominator *=scale\n exp=m.group('exp')\n if exp:\n exp=int(exp)\n if exp >=0:\n numerator *=10 **exp\n else :\n denominator *=10 **-exp\n if m.group('sign')=='-':\n numerator=-numerator\n \n else :\n raise TypeError(\"argument should be a string \"\n \"or a Rational instance\")\n \n elif type(numerator)is int is type(denominator):\n pass\n \n elif (isinstance(numerator,numbers.Rational)and\n isinstance(denominator,numbers.Rational)):\n numerator,denominator=(\n numerator.numerator *denominator.denominator,\n denominator.numerator *numerator.denominator\n )\n else :\n raise TypeError(\"both arguments should be \"\n \"Rational instances\")\n \n if denominator ==0:\n raise ZeroDivisionError('Fraction(%s, 0)'%numerator)\n g=math.gcd(numerator,denominator)\n if denominator <0:\n g=-g\n numerator //=g\n denominator //=g\n self._numerator=numerator\n self._denominator=denominator\n return self\n \n @classmethod\n def from_float(cls,f):\n ''\n\n\n\n \n if isinstance(f,numbers.Integral):\n return cls(f)\n elif not isinstance(f,float):\n raise TypeError(\"%s.from_float() only takes floats, not %r (%s)\"%\n (cls.__name__,f,type(f).__name__))\n return cls._from_coprime_ints(*f.as_integer_ratio())\n \n @classmethod\n def from_decimal(cls,dec):\n ''\n from decimal import Decimal\n if isinstance(dec,numbers.Integral):\n dec=Decimal(int(dec))\n elif not isinstance(dec,Decimal):\n raise TypeError(\n \"%s.from_decimal() only takes Decimals, not %r (%s)\"%\n (cls.__name__,dec,type(dec).__name__))\n return cls._from_coprime_ints(*dec.as_integer_ratio())\n \n @classmethod\n def _from_coprime_ints(cls,numerator,denominator,/):\n ''\n\n\n\n \n obj=super(Fraction,cls).__new__(cls)\n obj._numerator=numerator\n obj._denominator=denominator\n return obj\n \n def is_integer(self):\n ''\n return self._denominator ==1\n \n def as_integer_ratio(self):\n ''\n\n\n \n return (self._numerator,self._denominator)\n \n def limit_denominator(self,max_denominator=1000000):\n ''\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n if max_denominator <1:\n raise ValueError(\"max_denominator should be at least 1\")\n if self._denominator <=max_denominator:\n return Fraction(self)\n \n p0,q0,p1,q1=0,1,1,0\n n,d=self._numerator,self._denominator\n while True :\n a=n //d\n q2=q0+a *q1\n if q2 >max_denominator:\n break\n p0,q0,p1,q1=p1,q1,p0+a *p1,q2\n n,d=d,n -a *d\n k=(max_denominator -q0)//q1\n \n \n \n \n \n if 2 *d *(q0+k *q1)<=self._denominator:\n return Fraction._from_coprime_ints(p1,q1)\n else :\n return Fraction._from_coprime_ints(p0+k *p1,q0+k *q1)\n \n @property\n def numerator(a):\n return a._numerator\n \n @property\n def denominator(a):\n return a._denominator\n \n def __repr__(self):\n ''\n return '%s(%s, %s)'%(self.__class__.__name__,\n self._numerator,self._denominator)\n \n def __str__(self):\n ''\n if self._denominator ==1:\n return str(self._numerator)\n else :\n return '%s/%s'%(self._numerator,self._denominator)\n \n def __format__(self,format_spec,/):\n ''\n \n \n if not format_spec:\n return str(self)\n \n \n match=_FLOAT_FORMAT_SPECIFICATION_MATCHER(format_spec)\n if match is None :\n raise ValueError(\n f\"Invalid format specifier {format_spec !r} \"\n f\"for object of type {type(self).__name__ !r}\"\n )\n elif match[\"align\"]is not None and match[\"zeropad\"]is not None :\n \n raise ValueError(\n f\"Invalid format specifier {format_spec !r} \"\n f\"for object of type {type(self).__name__ !r}; \"\n \"can't use explicit alignment when zero-padding\"\n )\n fill=match[\"fill\"]or \" \"\n align=match[\"align\"]or \">\"\n pos_sign=\"\"if match[\"sign\"]==\"-\"else match[\"sign\"]\n no_neg_zero=bool(match[\"no_neg_zero\"])\n alternate_form=bool(match[\"alt\"])\n zeropad=bool(match[\"zeropad\"])\n minimumwidth=int(match[\"minimumwidth\"]or \"0\")\n thousands_sep=match[\"thousands_sep\"]\n precision=int(match[\"precision\"]or \"6\")\n presentation_type=match[\"presentation_type\"]\n trim_zeros=presentation_type in \"gG\"and not alternate_form\n trim_point=not alternate_form\n exponent_indicator=\"E\"if presentation_type in \"EFG\"else \"e\"\n \n \n \n \n \n if presentation_type in \"fF%\":\n exponent=-precision\n if presentation_type ==\"%\":\n exponent -=2\n negative,significand=_round_to_exponent(\n self._numerator,self._denominator,exponent,no_neg_zero)\n scientific=False\n point_pos=precision\n else :\n figures=(\n max(precision,1)\n if presentation_type in \"gG\"\n else precision+1\n )\n negative,significand,exponent=_round_to_figures(\n self._numerator,self._denominator,figures)\n scientific=(\n presentation_type in \"eE\"\n or exponent >0\n or exponent+figures <=-4\n )\n point_pos=figures -1 if scientific else -exponent\n \n \n if presentation_type ==\"%\":\n suffix=\"%\"\n elif scientific:\n suffix=f\"{exponent_indicator}{exponent+point_pos:+03d}\"\n else :\n suffix=\"\"\n \n \n \n digits=f\"{significand:0{point_pos+1}d}\"\n \n \n \n \n sign=\"-\"if negative else pos_sign\n leading=digits[:len(digits)-point_pos]\n frac_part=digits[len(digits)-point_pos:]\n if trim_zeros:\n frac_part=frac_part.rstrip(\"0\")\n separator=\"\"if trim_point and not frac_part else \".\"\n trailing=separator+frac_part+suffix\n \n \n if zeropad:\n min_leading=minimumwidth -len(sign)-len(trailing)\n \n \n leading=leading.zfill(\n 3 *min_leading //4+1 if thousands_sep else min_leading\n )\n \n \n if thousands_sep:\n first_pos=1+(len(leading)-1)%3\n leading=leading[:first_pos]+\"\".join(\n thousands_sep+leading[pos:pos+3]\n for pos in range(first_pos,len(leading),3)\n )\n \n \n \n body=leading+trailing\n padding=fill *(minimumwidth -len(sign)-len(body))\n if align ==\">\":\n return padding+sign+body\n elif align ==\"<\":\n return sign+body+padding\n elif align ==\"^\":\n half=len(padding)//2\n return padding[:half]+sign+body+padding[half:]\n else :\n return sign+padding+body\n \n def _operator_fallbacks(monomorphic_operator,fallback_operator):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def forward(a,b):\n if isinstance(b,Fraction):\n return monomorphic_operator(a,b)\n elif isinstance(b,int):\n return monomorphic_operator(a,Fraction(b))\n elif isinstance(b,float):\n return fallback_operator(float(a),b)\n elif isinstance(b,complex):\n return fallback_operator(complex(a),b)\n else :\n return NotImplemented\n forward.__name__='__'+fallback_operator.__name__+'__'\n forward.__doc__=monomorphic_operator.__doc__\n \n def reverse(b,a):\n if isinstance(a,numbers.Rational):\n \n return monomorphic_operator(Fraction(a),b)\n elif isinstance(a,numbers.Real):\n return fallback_operator(float(a),float(b))\n elif isinstance(a,numbers.Complex):\n return fallback_operator(complex(a),complex(b))\n else :\n return NotImplemented\n reverse.__name__='__r'+fallback_operator.__name__+'__'\n reverse.__doc__=monomorphic_operator.__doc__\n \n return forward,reverse\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n def _add(a,b):\n ''\n na,da=a._numerator,a._denominator\n nb,db=b._numerator,b._denominator\n g=math.gcd(da,db)\n if g ==1:\n return Fraction._from_coprime_ints(na *db+da *nb,da *db)\n s=da //g\n t=na *(db //g)+nb *s\n g2=math.gcd(t,g)\n if g2 ==1:\n return Fraction._from_coprime_ints(t,s *db)\n return Fraction._from_coprime_ints(t //g2,s *(db //g2))\n \n __add__,__radd__=_operator_fallbacks(_add,operator.add)\n \n def _sub(a,b):\n ''\n na,da=a._numerator,a._denominator\n nb,db=b._numerator,b._denominator\n g=math.gcd(da,db)\n if g ==1:\n return Fraction._from_coprime_ints(na *db -da *nb,da *db)\n s=da //g\n t=na *(db //g)-nb *s\n g2=math.gcd(t,g)\n if g2 ==1:\n return Fraction._from_coprime_ints(t,s *db)\n return Fraction._from_coprime_ints(t //g2,s *(db //g2))\n \n __sub__,__rsub__=_operator_fallbacks(_sub,operator.sub)\n \n def _mul(a,b):\n ''\n na,da=a._numerator,a._denominator\n nb,db=b._numerator,b._denominator\n g1=math.gcd(na,db)\n if g1 >1:\n na //=g1\n db //=g1\n g2=math.gcd(nb,da)\n if g2 >1:\n nb //=g2\n da //=g2\n return Fraction._from_coprime_ints(na *nb,db *da)\n \n __mul__,__rmul__=_operator_fallbacks(_mul,operator.mul)\n \n def _div(a,b):\n ''\n \n nb,db=b._numerator,b._denominator\n if nb ==0:\n raise ZeroDivisionError('Fraction(%s, 0)'%db)\n na,da=a._numerator,a._denominator\n g1=math.gcd(na,nb)\n if g1 >1:\n na //=g1\n nb //=g1\n g2=math.gcd(db,da)\n if g2 >1:\n da //=g2\n db //=g2\n n,d=na *db,nb *da\n if d <0:\n n,d=-n,-d\n return Fraction._from_coprime_ints(n,d)\n \n __truediv__,__rtruediv__=_operator_fallbacks(_div,operator.truediv)\n \n def _floordiv(a,b):\n ''\n return (a.numerator *b.denominator)//(a.denominator *b.numerator)\n \n __floordiv__,__rfloordiv__=_operator_fallbacks(_floordiv,operator.floordiv)\n \n def _divmod(a,b):\n ''\n da,db=a.denominator,b.denominator\n div,n_mod=divmod(a.numerator *db,da *b.numerator)\n return div,Fraction(n_mod,da *db)\n \n __divmod__,__rdivmod__=_operator_fallbacks(_divmod,divmod)\n \n def _mod(a,b):\n ''\n da,db=a.denominator,b.denominator\n return Fraction((a.numerator *db)%(b.numerator *da),da *db)\n \n __mod__,__rmod__=_operator_fallbacks(_mod,operator.mod)\n \n def __pow__(a,b):\n ''\n\n\n\n\n\n \n if isinstance(b,numbers.Rational):\n if b.denominator ==1:\n power=b.numerator\n if power >=0:\n return Fraction._from_coprime_ints(a._numerator **power,\n a._denominator **power)\n elif a._numerator >0:\n return Fraction._from_coprime_ints(a._denominator **-power,\n a._numerator **-power)\n elif a._numerator ==0:\n raise ZeroDivisionError('Fraction(%s, 0)'%\n a._denominator **-power)\n else :\n return Fraction._from_coprime_ints((-a._denominator)**-power,\n (-a._numerator)**-power)\n else :\n \n \n return float(a)**float(b)\n else :\n return float(a)**b\n \n def __rpow__(b,a):\n ''\n if b._denominator ==1 and b._numerator >=0:\n \n return a **b._numerator\n \n if isinstance(a,numbers.Rational):\n return Fraction(a.numerator,a.denominator)**b\n \n if b._denominator ==1:\n return a **b._numerator\n \n return a **float(b)\n \n def __pos__(a):\n ''\n return Fraction._from_coprime_ints(a._numerator,a._denominator)\n \n def __neg__(a):\n ''\n return Fraction._from_coprime_ints(-a._numerator,a._denominator)\n \n def __abs__(a):\n ''\n return Fraction._from_coprime_ints(abs(a._numerator),a._denominator)\n \n def __int__(a,_index=operator.index):\n ''\n if a._numerator <0:\n return _index(-(-a._numerator //a._denominator))\n else :\n return _index(a._numerator //a._denominator)\n \n def __trunc__(a):\n ''\n if a._numerator <0:\n return -(-a._numerator //a._denominator)\n else :\n return a._numerator //a._denominator\n \n def __floor__(a):\n ''\n return a._numerator //a._denominator\n \n def __ceil__(a):\n ''\n \n return -(-a._numerator //a._denominator)\n \n def __round__(self,ndigits=None ):\n ''\n\n\n \n if ndigits is None :\n d=self._denominator\n floor,remainder=divmod(self._numerator,d)\n if remainder *2 d:\n return floor+1\n \n elif floor %2 ==0:\n return floor\n else :\n return floor+1\n shift=10 **abs(ndigits)\n \n \n \n if ndigits >0:\n return Fraction(round(self *shift),shift)\n else :\n return Fraction(round(self /shift)*shift)\n \n def __hash__(self):\n ''\n return _hash_algorithm(self._numerator,self._denominator)\n \n def __eq__(a,b):\n ''\n if type(b)is int:\n return a._numerator ==b and a._denominator ==1\n if isinstance(b,numbers.Rational):\n return (a._numerator ==b.numerator and\n a._denominator ==b.denominator)\n if isinstance(b,numbers.Complex)and b.imag ==0:\n b=b.real\n if isinstance(b,float):\n if math.isnan(b)or math.isinf(b):\n \n \n return 0.0 ==b\n else :\n return a ==a.from_float(b)\n else :\n \n \n return NotImplemented\n \n def _richcmp(self,other,op):\n ''\n\n\n\n\n\n\n\n \n \n if isinstance(other,numbers.Rational):\n return op(self._numerator *other.denominator,\n self._denominator *other.numerator)\n if isinstance(other,float):\n if math.isnan(other)or math.isinf(other):\n return op(0.0,other)\n else :\n return op(self,self.from_float(other))\n else :\n return NotImplemented\n \n def __lt__(a,b):\n ''\n return a._richcmp(b,operator.lt)\n \n def __gt__(a,b):\n ''\n return a._richcmp(b,operator.gt)\n \n def __le__(a,b):\n ''\n return a._richcmp(b,operator.le)\n \n def __ge__(a,b):\n ''\n return a._richcmp(b,operator.ge)\n \n def __bool__(a):\n ''\n \n \n return bool(a._numerator)\n \n \n \n def __reduce__(self):\n return (self.__class__,(self._numerator,self._denominator))\n \n def __copy__(self):\n if type(self)==Fraction:\n return self\n return self.__class__(self._numerator,self._denominator)\n \n def __deepcopy__(self,memo):\n if type(self)==Fraction:\n return self\n return self.__class__(self._numerator,self._denominator)\n", ["decimal", "functools", "math", "numbers", "operator", "re", "sys"]], "functools": [".py", "''\n\n\n\n\n\n\n\n\n\n\n__all__=['update_wrapper','wraps','WRAPPER_ASSIGNMENTS','WRAPPER_UPDATES',\n'total_ordering','cache','cmp_to_key','lru_cache','reduce',\n'partial','partialmethod','singledispatch','singledispatchmethod',\n'cached_property']\n\nfrom abc import get_cache_token\nfrom collections import namedtuple\n\nfrom reprlib import recursive_repr\nfrom _thread import RLock\nfrom types import GenericAlias\n\n\n\n\n\n\n\n\n\nWRAPPER_ASSIGNMENTS=('__module__','__name__','__qualname__','__doc__',\n'__annotations__','__type_params__')\nWRAPPER_UPDATES=('__dict__',)\ndef update_wrapper(wrapper,\nwrapped,\nassigned=WRAPPER_ASSIGNMENTS,\nupdated=WRAPPER_UPDATES):\n ''\n\n\n\n\n\n\n\n\n\n \n for attr in assigned:\n try :\n value=getattr(wrapped,attr)\n except AttributeError:\n pass\n else :\n setattr(wrapper,attr,value)\n for attr in updated:\n getattr(wrapper,attr).update(getattr(wrapped,attr,{}))\n \n \n wrapper.__wrapped__=wrapped\n \n return wrapper\n \ndef wraps(wrapped,\nassigned=WRAPPER_ASSIGNMENTS,\nupdated=WRAPPER_UPDATES):\n ''\n\n\n\n\n\n\n \n return partial(update_wrapper,wrapped=wrapped,\n assigned=assigned,updated=updated)\n \n \n \n \n \n \n \n \n \n \n \ndef _gt_from_lt(self,other):\n ''\n op_result=type(self).__lt__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result and self !=other\n \ndef _le_from_lt(self,other):\n ''\n op_result=type(self).__lt__(self,other)\n if op_result is NotImplemented:\n return op_result\n return op_result or self ==other\n \ndef _ge_from_lt(self,other):\n ''\n op_result=type(self).__lt__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result\n \ndef _ge_from_le(self,other):\n ''\n op_result=type(self).__le__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result or self ==other\n \ndef _lt_from_le(self,other):\n ''\n op_result=type(self).__le__(self,other)\n if op_result is NotImplemented:\n return op_result\n return op_result and self !=other\n \ndef _gt_from_le(self,other):\n ''\n op_result=type(self).__le__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result\n \ndef _lt_from_gt(self,other):\n ''\n op_result=type(self).__gt__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result and self !=other\n \ndef _ge_from_gt(self,other):\n ''\n op_result=type(self).__gt__(self,other)\n if op_result is NotImplemented:\n return op_result\n return op_result or self ==other\n \ndef _le_from_gt(self,other):\n ''\n op_result=type(self).__gt__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result\n \ndef _le_from_ge(self,other):\n ''\n op_result=type(self).__ge__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result or self ==other\n \ndef _gt_from_ge(self,other):\n ''\n op_result=type(self).__ge__(self,other)\n if op_result is NotImplemented:\n return op_result\n return op_result and self !=other\n \ndef _lt_from_ge(self,other):\n ''\n op_result=type(self).__ge__(self,other)\n if op_result is NotImplemented:\n return op_result\n return not op_result\n \n_convert={\n'__lt__':[('__gt__',_gt_from_lt),\n('__le__',_le_from_lt),\n('__ge__',_ge_from_lt)],\n'__le__':[('__ge__',_ge_from_le),\n('__lt__',_lt_from_le),\n('__gt__',_gt_from_le)],\n'__gt__':[('__lt__',_lt_from_gt),\n('__ge__',_ge_from_gt),\n('__le__',_le_from_gt)],\n'__ge__':[('__le__',_le_from_ge),\n('__gt__',_gt_from_ge),\n('__lt__',_lt_from_ge)]\n}\n\ndef total_ordering(cls):\n ''\n \n roots={op for op in _convert if getattr(cls,op,None )is not getattr(object,op,None )}\n if not roots:\n raise ValueError('must define at least one ordering operation: < > <= >=')\n root=max(roots)\n for opname,opfunc in _convert[root]:\n if opname not in roots:\n opfunc.__name__=opname\n setattr(cls,opname,opfunc)\n return cls\n \n \n \n \n \n \ndef cmp_to_key(mycmp):\n ''\n class K(object):\n __slots__=['obj']\n def __init__(self,obj):\n self.obj=obj\n def __lt__(self,other):\n return mycmp(self.obj,other.obj)<0\n def __gt__(self,other):\n return mycmp(self.obj,other.obj)>0\n def __eq__(self,other):\n return mycmp(self.obj,other.obj)==0\n def __le__(self,other):\n return mycmp(self.obj,other.obj)<=0\n def __ge__(self,other):\n return mycmp(self.obj,other.obj)>=0\n __hash__=None\n return K\n \ntry :\n from _functools import cmp_to_key\nexcept ImportError:\n pass\n \n \n \n \n \n \n_initial_missing=object()\n\ndef reduce(function,sequence,initial=_initial_missing):\n ''\n\n\n\n\n\n\n\n\n \n \n it=iter(sequence)\n \n if initial is _initial_missing:\n try :\n value=next(it)\n except StopIteration:\n raise TypeError(\n \"reduce() of empty iterable with no initial value\")from None\n else :\n value=initial\n \n for element in it:\n value=function(value,element)\n \n return value\n \ntry :\n from _functools import reduce\nexcept ImportError:\n pass\n \n \n \n \n \n \n \nclass partial:\n ''\n\n \n \n __slots__=\"func\",\"args\",\"keywords\",\"__dict__\",\"__weakref__\"\n \n def __new__(cls,func,/,*args,**keywords):\n if not callable(func):\n raise TypeError(\"the first argument must be callable\")\n \n if hasattr(func,\"func\"):\n args=func.args+args\n keywords={**func.keywords,**keywords}\n func=func.func\n \n self=super(partial,cls).__new__(cls)\n \n self.func=func\n self.args=args\n self.keywords=keywords\n return self\n \n def __call__(self,/,*args,**keywords):\n keywords={**self.keywords,**keywords}\n return self.func(*self.args,*args,**keywords)\n \n @recursive_repr()\n def __repr__(self):\n qualname=type(self).__qualname__\n args=[repr(self.func)]\n args.extend(repr(x)for x in self.args)\n args.extend(f\"{k}={v !r}\"for (k,v)in self.keywords.items())\n if type(self).__module__ ==\"functools\":\n return f\"functools.{qualname}({', '.join(args)})\"\n return f\"{qualname}({', '.join(args)})\"\n \n def __reduce__(self):\n return type(self),(self.func,),(self.func,self.args,\n self.keywords or None ,self.__dict__ or None )\n \n def __setstate__(self,state):\n if not isinstance(state,tuple):\n raise TypeError(\"argument to __setstate__ must be a tuple\")\n if len(state)!=4:\n raise TypeError(f\"expected 4 items in state, got {len(state)}\")\n func,args,kwds,namespace=state\n if (not callable(func)or not isinstance(args,tuple)or\n (kwds is not None and not isinstance(kwds,dict))or\n (namespace is not None and not isinstance(namespace,dict))):\n raise TypeError(\"invalid partial state\")\n \n args=tuple(args)\n if kwds is None :\n kwds={}\n elif type(kwds)is not dict:\n kwds=dict(kwds)\n if namespace is None :\n namespace={}\n \n self.__dict__=namespace\n self.func=func\n self.args=args\n self.keywords=kwds\n \ntry :\n from _functools import partial\nexcept ImportError:\n pass\n \n \nclass partialmethod(object):\n ''\n\n\n\n\n \n \n def __init__(self,func,/,*args,**keywords):\n if not callable(func)and not hasattr(func,\"__get__\"):\n raise TypeError(\"{!r} is not callable or a descriptor\"\n .format(func))\n \n \n \n if isinstance(func,partialmethod):\n \n \n \n self.func=func.func\n self.args=func.args+args\n self.keywords={**func.keywords,**keywords}\n else :\n self.func=func\n self.args=args\n self.keywords=keywords\n \n def __repr__(self):\n args=\", \".join(map(repr,self.args))\n keywords=\", \".join(\"{}={!r}\".format(k,v)\n for k,v in self.keywords.items())\n format_string=\"{module}.{cls}({func}, {args}, {keywords})\"\n return format_string.format(module=self.__class__.__module__,\n cls=self.__class__.__qualname__,\n func=self.func,\n args=args,\n keywords=keywords)\n \n def _make_unbound_method(self):\n def _method(cls_or_self,/,*args,**keywords):\n keywords={**self.keywords,**keywords}\n return self.func(cls_or_self,*self.args,*args,**keywords)\n _method.__isabstractmethod__=self.__isabstractmethod__\n _method._partialmethod=self\n return _method\n \n def __get__(self,obj,cls=None ):\n get=getattr(self.func,\"__get__\",None )\n result=None\n if get is not None :\n new_func=get(obj,cls)\n if new_func is not self.func:\n \n \n result=partial(new_func,*self.args,**self.keywords)\n try :\n result.__self__=new_func.__self__\n except AttributeError:\n pass\n if result is None :\n \n \n result=self._make_unbound_method().__get__(obj,cls)\n return result\n \n @property\n def __isabstractmethod__(self):\n return getattr(self.func,\"__isabstractmethod__\",False )\n \n __class_getitem__=classmethod(GenericAlias)\n \n \n \n \ndef _unwrap_partial(func):\n while isinstance(func,partial):\n func=func.func\n return func\n \n \n \n \n \n_CacheInfo=namedtuple(\"CacheInfo\",[\"hits\",\"misses\",\"maxsize\",\"currsize\"])\n\nclass _HashedSeq(list):\n ''\n\n\n\n \n \n __slots__='hashvalue'\n \n def __init__(self,tup,hash=hash):\n self[:]=tup\n self.hashvalue=hash(tup)\n \n def __hash__(self):\n return self.hashvalue\n \ndef _make_key(args,kwds,typed,\nkwd_mark=(object(),),\nfasttypes={int,str},\ntuple=tuple,type=type,len=len):\n ''\n\n\n\n\n\n\n\n\n \n \n \n \n \n key=args\n if kwds:\n key +=kwd_mark\n for item in kwds.items():\n key +=item\n if typed:\n key +=tuple(type(v)for v in args)\n if kwds:\n key +=tuple(type(v)for v in kwds.values())\n elif len(key)==1 and type(key[0])in fasttypes:\n return key[0]\n return _HashedSeq(key)\n \ndef lru_cache(maxsize=128,typed=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n if isinstance(maxsize,int):\n \n if maxsize <0:\n maxsize=0\n elif callable(maxsize)and isinstance(typed,bool):\n \n user_function,maxsize=maxsize,128\n wrapper=_lru_cache_wrapper(user_function,maxsize,typed,_CacheInfo)\n wrapper.cache_parameters=lambda :{'maxsize':maxsize,'typed':typed}\n return update_wrapper(wrapper,user_function)\n elif maxsize is not None :\n raise TypeError(\n 'Expected first argument to be an integer, a callable, or None')\n \n def decorating_function(user_function):\n wrapper=_lru_cache_wrapper(user_function,maxsize,typed,_CacheInfo)\n wrapper.cache_parameters=lambda :{'maxsize':maxsize,'typed':typed}\n return update_wrapper(wrapper,user_function)\n \n return decorating_function\n \ndef _lru_cache_wrapper(user_function,maxsize,typed,_CacheInfo):\n\n sentinel=object()\n make_key=_make_key\n PREV,NEXT,KEY,RESULT=0,1,2,3\n \n cache={}\n hits=misses=0\n full=False\n cache_get=cache.get\n cache_len=cache.__len__\n lock=RLock()\n root=[]\n root[:]=[root,root,None ,None ]\n \n if maxsize ==0:\n \n def wrapper(*args,**kwds):\n \n nonlocal misses\n misses +=1\n result=user_function(*args,**kwds)\n return result\n \n elif maxsize is None :\n \n def wrapper(*args,**kwds):\n \n nonlocal hits,misses\n key=make_key(args,kwds,typed)\n result=cache_get(key,sentinel)\n if result is not sentinel:\n hits +=1\n return result\n misses +=1\n result=user_function(*args,**kwds)\n cache[key]=result\n return result\n \n else :\n \n def wrapper(*args,**kwds):\n \n nonlocal root,hits,misses,full\n key=make_key(args,kwds,typed)\n with lock:\n link=cache_get(key)\n if link is not None :\n \n link_prev,link_next,_key,result=link\n link_prev[NEXT]=link_next\n link_next[PREV]=link_prev\n last=root[PREV]\n last[NEXT]=root[PREV]=link\n link[PREV]=last\n link[NEXT]=root\n hits +=1\n return result\n misses +=1\n result=user_function(*args,**kwds)\n with lock:\n if key in cache:\n \n \n \n \n pass\n elif full:\n \n oldroot=root\n oldroot[KEY]=key\n oldroot[RESULT]=result\n \n \n \n \n \n \n root=oldroot[NEXT]\n oldkey=root[KEY]\n oldresult=root[RESULT]\n root[KEY]=root[RESULT]=None\n \n del cache[oldkey]\n \n \n \n cache[key]=oldroot\n else :\n \n last=root[PREV]\n link=[last,root,key,result]\n last[NEXT]=root[PREV]=cache[key]=link\n \n \n full=(cache_len()>=maxsize)\n return result\n \n def cache_info():\n ''\n with lock:\n return _CacheInfo(hits,misses,maxsize,cache_len())\n \n def cache_clear():\n ''\n nonlocal hits,misses,full\n with lock:\n cache.clear()\n root[:]=[root,root,None ,None ]\n hits=misses=0\n full=False\n \n wrapper.cache_info=cache_info\n wrapper.cache_clear=cache_clear\n return wrapper\n \ntry :\n from _functools import _lru_cache_wrapper\nexcept ImportError:\n pass\n \n \n \n \n \n \ndef cache(user_function,/):\n ''\n return lru_cache(maxsize=None )(user_function)\n \n \n \n \n \n \ndef _c3_merge(sequences):\n ''\n\n\n\n \n result=[]\n while True :\n sequences=[s for s in sequences if s]\n if not sequences:\n return result\n for s1 in sequences:\n candidate=s1[0]\n for s2 in sequences:\n if candidate in s2[1:]:\n candidate=None\n break\n else :\n break\n if candidate is None :\n raise RuntimeError(\"Inconsistent hierarchy\")\n result.append(candidate)\n \n for seq in sequences:\n if seq[0]==candidate:\n del seq[0]\n \ndef _c3_mro(cls,abcs=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n for i,base in enumerate(reversed(cls.__bases__)):\n if hasattr(base,'__abstractmethods__'):\n boundary=len(cls.__bases__)-i\n break\n else :\n boundary=0\n abcs=list(abcs)if abcs else []\n explicit_bases=list(cls.__bases__[:boundary])\n abstract_bases=[]\n other_bases=list(cls.__bases__[boundary:])\n for base in abcs:\n if issubclass(cls,base)and not any(\n issubclass(b,base)for b in cls.__bases__\n ):\n \n \n abstract_bases.append(base)\n for base in abstract_bases:\n abcs.remove(base)\n explicit_c3_mros=[_c3_mro(base,abcs=abcs)for base in explicit_bases]\n abstract_c3_mros=[_c3_mro(base,abcs=abcs)for base in abstract_bases]\n other_c3_mros=[_c3_mro(base,abcs=abcs)for base in other_bases]\n return _c3_merge(\n [[cls]]+\n explicit_c3_mros+abstract_c3_mros+other_c3_mros+\n [explicit_bases]+[abstract_bases]+[other_bases]\n )\n \ndef _compose_mro(cls,types):\n ''\n\n\n\n\n \n bases=set(cls.__mro__)\n \n def is_related(typ):\n return (typ not in bases and hasattr(typ,'__mro__')\n and not isinstance(typ,GenericAlias)\n and issubclass(cls,typ))\n types=[n for n in types if is_related(n)]\n \n \n def is_strict_base(typ):\n for other in types:\n if typ !=other and typ in other.__mro__:\n return True\n return False\n types=[n for n in types if not is_strict_base(n)]\n \n \n type_set=set(types)\n mro=[]\n for typ in types:\n found=[]\n for sub in typ.__subclasses__():\n if sub not in bases and issubclass(cls,sub):\n found.append([s for s in sub.__mro__ if s in type_set])\n if not found:\n mro.append(typ)\n continue\n \n found.sort(key=len,reverse=True )\n for sub in found:\n for subcls in sub:\n if subcls not in mro:\n mro.append(subcls)\n return _c3_mro(cls,abcs=mro)\n \ndef _find_impl(cls,registry):\n ''\n\n\n\n\n\n\n\n \n mro=_compose_mro(cls,registry.keys())\n match=None\n for t in mro:\n if match is not None :\n \n \n if (t in registry and t not in cls.__mro__\n and match not in cls.__mro__\n and not issubclass(match,t)):\n raise RuntimeError(\"Ambiguous dispatch: {} or {}\".format(\n match,t))\n break\n if t in registry:\n match=t\n return registry.get(match)\n \ndef singledispatch(func):\n ''\n\n\n\n\n\n\n \n \n \n \n import types,weakref\n \n registry={}\n dispatch_cache=weakref.WeakKeyDictionary()\n cache_token=None\n \n def dispatch(cls):\n ''\n\n\n\n\n \n nonlocal cache_token\n if cache_token is not None :\n current_token=get_cache_token()\n if cache_token !=current_token:\n dispatch_cache.clear()\n cache_token=current_token\n try :\n impl=dispatch_cache[cls]\n except KeyError:\n try :\n impl=registry[cls]\n except KeyError:\n impl=_find_impl(cls,registry)\n dispatch_cache[cls]=impl\n return impl\n \n def _is_union_type(cls):\n from typing import get_origin,Union\n return get_origin(cls)in {Union,types.UnionType}\n \n def _is_valid_dispatch_type(cls):\n if isinstance(cls,type):\n return True\n from typing import get_args\n return (_is_union_type(cls)and\n all(isinstance(arg,type)for arg in get_args(cls)))\n \n def register(cls,func=None ):\n ''\n\n\n\n \n nonlocal cache_token\n if _is_valid_dispatch_type(cls):\n if func is None :\n return lambda f:register(cls,f)\n else :\n if func is not None :\n raise TypeError(\n f\"Invalid first argument to `register()`. \"\n f\"{cls !r} is not a class or union type.\"\n )\n ann=getattr(cls,'__annotations__',{})\n if not ann:\n raise TypeError(\n f\"Invalid first argument to `register()`: {cls !r}. \"\n f\"Use either `@register(some_class)` or plain `@register` \"\n f\"on an annotated function.\"\n )\n func=cls\n \n \n from typing import get_type_hints\n argname,cls=next(iter(get_type_hints(func).items()))\n if not _is_valid_dispatch_type(cls):\n if _is_union_type(cls):\n raise TypeError(\n f\"Invalid annotation for {argname !r}. \"\n f\"{cls !r} not all arguments are classes.\"\n )\n else :\n raise TypeError(\n f\"Invalid annotation for {argname !r}. \"\n f\"{cls !r} is not a class.\"\n )\n \n if _is_union_type(cls):\n from typing import get_args\n \n for arg in get_args(cls):\n registry[arg]=func\n else :\n registry[cls]=func\n if cache_token is None and hasattr(cls,'__abstractmethods__'):\n cache_token=get_cache_token()\n dispatch_cache.clear()\n return func\n \n def wrapper(*args,**kw):\n if not args:\n raise TypeError(f'{funcname} requires at least '\n '1 positional argument')\n \n return dispatch(args[0].__class__)(*args,**kw)\n \n funcname=getattr(func,'__name__','singledispatch function')\n registry[object]=func\n wrapper.register=register\n wrapper.dispatch=dispatch\n wrapper.registry=types.MappingProxyType(registry)\n wrapper._clear_cache=dispatch_cache.clear\n update_wrapper(wrapper,func)\n return wrapper\n \n \n \nclass singledispatchmethod:\n ''\n\n\n\n \n \n def __init__(self,func):\n if not callable(func)and not hasattr(func,\"__get__\"):\n raise TypeError(f\"{func !r} is not callable or a descriptor\")\n \n self.dispatcher=singledispatch(func)\n self.func=func\n \n def register(self,cls,method=None ):\n ''\n\n\n \n return self.dispatcher.register(cls,func=method)\n \n def __get__(self,obj,cls=None ):\n def _method(*args,**kwargs):\n method=self.dispatcher.dispatch(args[0].__class__)\n return method.__get__(obj,cls)(*args,**kwargs)\n \n _method.__isabstractmethod__=self.__isabstractmethod__\n _method.register=self.register\n update_wrapper(_method,self.func)\n return _method\n \n @property\n def __isabstractmethod__(self):\n return getattr(self.func,'__isabstractmethod__',False )\n \n \n \n \n \n \n \nclass cached_property:\n def __init__(self,func):\n self.func=func\n self.attrname=None\n self.__doc__=func.__doc__\n \n def __set_name__(self,owner,name):\n if self.attrname is None :\n self.attrname=name\n elif name !=self.attrname:\n raise TypeError(\n \"Cannot assign the same cached_property to two different names \"\n f\"({self.attrname !r} and {name !r}).\"\n )\n \n def __get__(self,instance,owner=None ):\n if instance is None :\n return self\n if self.attrname is None :\n raise TypeError(\n \"Cannot use cached_property instance without calling __set_name__ on it.\")\n try :\n cache=instance.__dict__\n except AttributeError:\n msg=(\n f\"No '__dict__' attribute on {type(instance).__name__ !r} \"\n f\"instance to cache {self.attrname !r} property.\"\n )\n raise TypeError(msg)from None\n val=self.func(instance)\n try :\n cache[self.attrname]=val\n except TypeError:\n msg=(\n f\"The '__dict__' attribute on {type(instance).__name__ !r} instance \"\n f\"does not support item assignment for caching {self.attrname !r} property.\"\n )\n raise TypeError(msg)from None\n return val\n \n __class_getitem__=classmethod(GenericAlias)\n", ["_functools", "_thread", "abc", "collections", "reprlib", "types", "typing", "weakref"]], "gc": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nDEBUG_COLLECTABLE=2\n\nDEBUG_LEAK=38\n\nDEBUG_SAVEALL=32\n\nDEBUG_STATS=1\n\nDEBUG_UNCOLLECTABLE=4\n\nclass __loader__:\n pass\n \ncallbacks=[]\n\ndef collect(*args,**kw):\n ''\n\n\n\n\n\n \n pass\n \ndef disable(*args,**kw):\n ''\n\n \n pass\n \ndef enable(*args,**kw):\n ''\n\n \n pass\n \ngarbage=[]\n\ndef get_count(*args,**kw):\n ''\n\n \n pass\n \ndef get_debug(*args,**kw):\n ''\n\n \n pass\n \ndef get_objects(*args,**kw):\n ''\n\n\n \n pass\n \ndef get_referents(*args,**kw):\n ''\n pass\n \ndef get_referrers(*args,**kw):\n ''\n pass\n \ndef get_threshold(*args,**kw):\n ''\n\n \n pass\n \ndef is_tracked(*args,**kw):\n ''\n\n\n \n pass\n \ndef isenabled(*args,**kw):\n ''\n\n \n pass\n \ndef set_debug(*args,**kw):\n ''\n\n\n\n\n\n\n\n\n\n\n \n pass\n \ndef set_threshold(*args,**kw):\n ''\n\n\n \n pass\n", []], "genericpath": [".py", "''\n\n\n\n\nimport os\nimport stat\n\n__all__=['commonprefix','exists','getatime','getctime','getmtime',\n'getsize','isdir','isfile','islink','samefile','sameopenfile',\n'samestat']\n\n\n\n\ndef exists(path):\n ''\n try :\n os.stat(path)\n except (OSError,ValueError):\n return False\n return True\n \n \n \n \ndef isfile(path):\n ''\n try :\n st=os.stat(path)\n except (OSError,ValueError):\n return False\n return stat.S_ISREG(st.st_mode)\n \n \n \n \n \ndef isdir(s):\n ''\n try :\n st=os.stat(s)\n except (OSError,ValueError):\n return False\n return stat.S_ISDIR(st.st_mode)\n \n \n \n \n \ndef islink(path):\n ''\n try :\n st=os.lstat(path)\n except (OSError,ValueError,AttributeError):\n return False\n return stat.S_ISLNK(st.st_mode)\n \n \ndef getsize(filename):\n ''\n return os.stat(filename).st_size\n \n \ndef getmtime(filename):\n ''\n return os.stat(filename).st_mtime\n \n \ndef getatime(filename):\n ''\n return os.stat(filename).st_atime\n \n \ndef getctime(filename):\n ''\n return os.stat(filename).st_ctime\n \n \n \ndef commonprefix(m):\n ''\n if not m:return ''\n \n \n \n \n if not isinstance(m[0],(list,tuple)):\n m=tuple(map(os.fspath,m))\n s1=min(m)\n s2=max(m)\n for i,c in enumerate(s1):\n if c !=s2[i]:\n return s1[:i]\n return s1\n \n \n \ndef samestat(s1,s2):\n ''\n return (s1.st_ino ==s2.st_ino and\n s1.st_dev ==s2.st_dev)\n \n \n \ndef samefile(f1,f2):\n ''\n\n\n\n \n s1=os.stat(f1)\n s2=os.stat(f2)\n return samestat(s1,s2)\n \n \n \n \ndef sameopenfile(fp1,fp2):\n ''\n s1=os.fstat(fp1)\n s2=os.fstat(fp2)\n return samestat(s1,s2)\n \n \n \n \n \n \n \n \n \ndef _splitext(p,sep,altsep,extsep):\n ''\n\n\n \n \n \n sepIndex=p.rfind(sep)\n if altsep:\n altsepIndex=p.rfind(altsep)\n sepIndex=max(sepIndex,altsepIndex)\n \n dotIndex=p.rfind(extsep)\n if dotIndex >sepIndex:\n \n filenameIndex=sepIndex+1\n while filenameIndex [ \\t]+) | # spaces and horizontal tabs\n (?P[0-9]+\\b) | # decimal integer\n (?Pn\\b) | # only n is allowed\n (?P[()]) |\n (?P[-*/%+?:]|[>,\n # <=, >=, ==, !=, &&, ||,\n # ? :\n # unary and bitwise ops\n # not allowed\n (?P\\w+|.) # invalid token\n \"\"\",re.VERBOSE |re.DOTALL)\n\n\ndef _tokenize(plural):\n for mo in re.finditer(_token_pattern,plural):\n kind=mo.lastgroup\n if kind =='WHITESPACES':\n continue\n value=mo.group(kind)\n if kind =='INVALID':\n raise ValueError('invalid token in plural form: %s'%value)\n yield value\n yield ''\n \n \ndef _error(value):\n if value:\n return ValueError('unexpected token in plural form: %s'%value)\n else :\n return ValueError('unexpected end of plural form')\n \n \n_binary_ops=(\n('||',),\n('&&',),\n('==','!='),\n('<','>','<=','>='),\n('+','-'),\n('*','/','%'),\n)\n_binary_ops={op:i for i,ops in enumerate(_binary_ops,1)for op in ops}\n_c2py_ops={'||':'or','&&':'and','/':'//'}\n\n\ndef _parse(tokens,priority=-1):\n result=''\n nexttok=next(tokens)\n while nexttok =='!':\n result +='not '\n nexttok=next(tokens)\n \n if nexttok =='(':\n sub,nexttok=_parse(tokens)\n result='%s(%s)'%(result,sub)\n if nexttok !=')':\n raise ValueError('unbalanced parenthesis in plural form')\n elif nexttok =='n':\n result='%s%s'%(result,nexttok)\n else :\n try :\n value=int(nexttok,10)\n except ValueError:\n raise _error(nexttok)from None\n result='%s%d'%(result,value)\n nexttok=next(tokens)\n \n j=100\n while nexttok in _binary_ops:\n i=_binary_ops[nexttok]\n if i 1000:\n raise ValueError('plural form expression is too long')\n try :\n result,nexttok=_parse(_tokenize(plural))\n if nexttok:\n raise _error(nexttok)\n \n depth=0\n for c in result:\n if c =='(':\n depth +=1\n if depth >20:\n \n \n raise ValueError('plural form expression is too complex')\n elif c ==')':\n depth -=1\n \n ns={'_as_int':_as_int}\n exec('''if True:\n def func(n):\n if not isinstance(n, int):\n n = _as_int(n)\n return int(%s)\n '''%result,ns)\n return ns['func']\n except RecursionError:\n \n raise ValueError('plural form expression is too complex')\n \n \ndef _expand_lang(loc):\n import locale\n loc=locale.normalize(loc)\n COMPONENT_CODESET=1 <<0\n COMPONENT_TERRITORY=1 <<1\n COMPONENT_MODIFIER=1 <<2\n \n mask=0\n pos=loc.find('@')\n if pos >=0:\n modifier=loc[pos:]\n loc=loc[:pos]\n mask |=COMPONENT_MODIFIER\n else :\n modifier=''\n pos=loc.find('.')\n if pos >=0:\n codeset=loc[pos:]\n loc=loc[:pos]\n mask |=COMPONENT_CODESET\n else :\n codeset=''\n pos=loc.find('_')\n if pos >=0:\n territory=loc[pos:]\n loc=loc[:pos]\n mask |=COMPONENT_TERRITORY\n else :\n territory=''\n language=loc\n ret=[]\n for i in range(mask+1):\n if not (i&~mask):\n val=language\n if i&COMPONENT_TERRITORY:val +=territory\n if i&COMPONENT_CODESET:val +=codeset\n if i&COMPONENT_MODIFIER:val +=modifier\n ret.append(val)\n ret.reverse()\n return ret\n \n \nclass NullTranslations:\n def __init__(self,fp=None ):\n self._info={}\n self._charset=None\n self._fallback=None\n if fp is not None :\n self._parse(fp)\n \n def _parse(self,fp):\n pass\n \n def add_fallback(self,fallback):\n if self._fallback:\n self._fallback.add_fallback(fallback)\n else :\n self._fallback=fallback\n \n def gettext(self,message):\n if self._fallback:\n return self._fallback.gettext(message)\n return message\n \n def ngettext(self,msgid1,msgid2,n):\n if self._fallback:\n return self._fallback.ngettext(msgid1,msgid2,n)\n if n ==1:\n return msgid1\n else :\n return msgid2\n \n def pgettext(self,context,message):\n if self._fallback:\n return self._fallback.pgettext(context,message)\n return message\n \n def npgettext(self,context,msgid1,msgid2,n):\n if self._fallback:\n return self._fallback.npgettext(context,msgid1,msgid2,n)\n if n ==1:\n return msgid1\n else :\n return msgid2\n \n def info(self):\n return self._info\n \n def charset(self):\n return self._charset\n \n def install(self,names=None ):\n import builtins\n builtins.__dict__['_']=self.gettext\n if names is not None :\n allowed={'gettext','ngettext','npgettext','pgettext'}\n for name in allowed&set(names):\n builtins.__dict__[name]=getattr(self,name)\n \n \nclass GNUTranslations(NullTranslations):\n\n LE_MAGIC=0x950412de\n BE_MAGIC=0xde120495\n \n \n \n CONTEXT=\"%s\\x04%s\"\n \n \n VERSIONS=(0,1)\n \n def _get_versions(self,version):\n ''\n return (version >>16,version&0xffff)\n \n def _parse(self,fp):\n ''\n \n \n from struct import unpack\n filename=getattr(fp,'name','')\n \n \n self._catalog=catalog={}\n self.plural=lambda n:int(n !=1)\n buf=fp.read()\n buflen=len(buf)\n \n magic=unpack('4I',buf[4:20])\n ii='>II'\n else :\n raise OSError(0,'Bad magic number',filename)\n \n major_version,minor_version=self._get_versions(version)\n \n if major_version not in self.VERSIONS:\n raise OSError(0,'Bad version number '+str(major_version),filename)\n \n \n \n for i in range(0,msgcount):\n mlen,moff=unpack(ii,buf[masteridx:masteridx+8])\n mend=moff+mlen\n tlen,toff=unpack(ii,buf[transidx:transidx+8])\n tend=toff+tlen\n if mend '\n \n def _init_write(self,filename):\n self.name=filename\n self.crc=zlib.crc32(b\"\")\n self.size=0\n self.writebuf=[]\n self.bufsize=0\n self.offset=0\n \n def _write_gzip_header(self,compresslevel):\n self.fileobj.write(b'\\037\\213')\n self.fileobj.write(b'\\010')\n try :\n \n \n fname=os.path.basename(self.name)\n if not isinstance(fname,bytes):\n fname=fname.encode('latin-1')\n if fname.endswith(b'.gz'):\n fname=fname[:-3]\n except UnicodeEncodeError:\n fname=b''\n flags=0\n if fname:\n flags=FNAME\n self.fileobj.write(chr(flags).encode('latin-1'))\n mtime=self._write_mtime\n if mtime is None :\n mtime=time.time()\n write32u(self.fileobj,int(mtime))\n if compresslevel ==_COMPRESS_LEVEL_BEST:\n xfl=b'\\002'\n elif compresslevel ==_COMPRESS_LEVEL_FAST:\n xfl=b'\\004'\n else :\n xfl=b'\\000'\n self.fileobj.write(xfl)\n self.fileobj.write(b'\\377')\n if fname:\n self.fileobj.write(fname+b'\\000')\n \n def write(self,data):\n self._check_not_closed()\n if self.mode !=WRITE:\n import errno\n raise OSError(errno.EBADF,\"write() on read-only GzipFile object\")\n \n if self.fileobj is None :\n raise ValueError(\"write() on closed GzipFile object\")\n \n if isinstance(data,(bytes,bytearray)):\n length=len(data)\n else :\n \n data=memoryview(data)\n length=data.nbytes\n \n if length >0:\n self.fileobj.write(self.compress.compress(data))\n self.size +=length\n self.crc=zlib.crc32(data,self.crc)\n self.offset +=length\n \n return length\n \n def read(self,size=-1):\n self._check_not_closed()\n if self.mode !=READ:\n import errno\n raise OSError(errno.EBADF,\"read() on write-only GzipFile object\")\n return self._buffer.read(size)\n \n def read1(self,size=-1):\n ''\n\n \n self._check_not_closed()\n if self.mode !=READ:\n import errno\n raise OSError(errno.EBADF,\"read1() on write-only GzipFile object\")\n \n if size <0:\n size=io.DEFAULT_BUFFER_SIZE\n return self._buffer.read1(size)\n \n def peek(self,n):\n self._check_not_closed()\n if self.mode !=READ:\n import errno\n raise OSError(errno.EBADF,\"peek() on write-only GzipFile object\")\n return self._buffer.peek(n)\n \n @property\n def closed(self):\n return self.fileobj is None\n \n def close(self):\n fileobj=self.fileobj\n if fileobj is None :\n return\n self.fileobj=None\n try :\n if self.mode ==WRITE:\n fileobj.write(self.compress.flush())\n write32u(fileobj,self.crc)\n \n write32u(fileobj,self.size&0xffffffff)\n elif self.mode ==READ:\n self._buffer.close()\n finally :\n myfileobj=self.myfileobj\n if myfileobj:\n self.myfileobj=None\n myfileobj.close()\n \n def flush(self,zlib_mode=zlib.Z_SYNC_FLUSH):\n self._check_not_closed()\n if self.mode ==WRITE:\n \n self.fileobj.write(self.compress.flush(zlib_mode))\n self.fileobj.flush()\n \n def fileno(self):\n ''\n\n\n\n \n return self.fileobj.fileno()\n \n def rewind(self):\n ''\n \n if self.mode !=READ:\n raise OSError(\"Can't rewind in write mode\")\n self._buffer.seek(0)\n \n def readable(self):\n return self.mode ==READ\n \n def writable(self):\n return self.mode ==WRITE\n \n def seekable(self):\n return True\n \n def seek(self,offset,whence=io.SEEK_SET):\n if self.mode ==WRITE:\n if whence !=io.SEEK_SET:\n if whence ==io.SEEK_CUR:\n offset=self.offset+offset\n else :\n raise ValueError('Seek from end not supported')\n if offset startpos:\n parentpos=(pos -1)>>1\n parent=heap[parentpos]\n if newitem startpos:\n parentpos=(pos -1)>>1\n parent=heap[parentpos]\n if parent 1:\n try :\n while True :\n value,order,next=s=h[0]\n yield value\n s[0]=next()\n _heapreplace(h,s)\n except StopIteration:\n _heappop(h)\n if h:\n \n value,order,next=h[0]\n yield value\n yield from next.__self__\n return\n \n for order,it in enumerate(map(iter,iterables)):\n try :\n next=it.__next__\n value=next()\n h_append([key(value),order *direction,value,next])\n except StopIteration:\n pass\n _heapify(h)\n while len(h)>1:\n try :\n while True :\n key_value,order,value,next=s=h[0]\n yield value\n value=next()\n s[0]=key(value)\n s[2]=value\n _heapreplace(h,s)\n except StopIteration:\n _heappop(h)\n if h:\n key_value,order,value,next=h[0]\n yield value\n yield from next.__self__\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \ndef nsmallest(n,iterable,key=None ):\n ''\n\n\n \n \n \n if n ==1:\n it=iter(iterable)\n sentinel=object()\n result=min(it,default=sentinel,key=key)\n return []if result is sentinel else [result]\n \n \n try :\n size=len(iterable)\n except (TypeError,AttributeError):\n pass\n else :\n if n >=size:\n return sorted(iterable,key=key)[:n]\n \n \n if key is None :\n it=iter(iterable)\n \n \n result=[(elem,i)for i,elem in zip(range(n),it)]\n if not result:\n return result\n _heapify_max(result)\n top=result[0][0]\n order=n\n _heapreplace=_heapreplace_max\n for elem in it:\n if elem =size:\n return sorted(iterable,key=key,reverse=True )[:n]\n \n \n if key is None :\n it=iter(iterable)\n result=[(elem,i)for i,elem in zip(range(0,-n,-1),it)]\n if not result:\n return result\n heapify(result)\n top=result[0][0]\n order=-n\n _heapreplace=heapreplace\n for elem in it:\n if top blocksize:\n key=digest_cons(key).digest()\n \n \n \n self.block_size=blocksize\n \n key=key.ljust(blocksize,b'\\0')\n self._outer.update(key.translate(trans_5C))\n self._inner.update(key.translate(trans_36))\n if msg is not None :\n self.update(msg)\n \n @property\n def name(self):\n if self._hmac:\n return self._hmac.name\n else :\n return f\"hmac-{self._inner.name}\"\n \n def update(self,msg):\n ''\n inst=self._hmac or self._inner\n inst.update(msg)\n \n def copy(self):\n ''\n\n\n \n \n other=self.__class__.__new__(self.__class__)\n other.digest_size=self.digest_size\n if self._hmac:\n other._hmac=self._hmac.copy()\n other._inner=other._outer=None\n else :\n other._hmac=None\n other._inner=self._inner.copy()\n other._outer=self._outer.copy()\n return other\n \n def _current(self):\n ''\n\n\n \n if self._hmac:\n return self._hmac\n else :\n h=self._outer.copy()\n h.update(self._inner.digest())\n return h\n \n def digest(self):\n ''\n\n\n\n\n \n h=self._current()\n return h.digest()\n \n def hexdigest(self):\n ''\n \n h=self._current()\n return h.hexdigest()\n \ndef new(key,msg=None ,digestmod=''):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n return HMAC(key,msg,digestmod)\n \n \ndef digest(key,msg,digest):\n ''\n\n\n\n\n\n\n \n if _hashopenssl is not None and isinstance(digest,(str,_functype)):\n try :\n return _hashopenssl.hmac_digest(key,msg,digest)\n except _hashopenssl.UnsupportedDigestmodError:\n pass\n \n if callable(digest):\n digest_cons=digest\n elif isinstance(digest,str):\n digest_cons=lambda d=b'':_hashlib.new(digest,d)\n else :\n digest_cons=lambda d=b'':digest.new(d)\n \n inner=digest_cons()\n outer=digest_cons()\n blocksize=getattr(inner,'block_size',64)\n if len(key)>blocksize:\n key=digest_cons(key).digest()\n key=key+b'\\x00'*(blocksize -len(key))\n inner.update(key.translate(trans_36))\n outer.update(key.translate(trans_5C))\n inner.update(msg)\n outer.update(inner.digest())\n return outer.digest()\n", ["_hashlib", "_operator", "hashlib", "warnings"]], "imp": [".py", "''\n\n\n\n\n\n\n\nfrom _imp import (lock_held,acquire_lock,release_lock,\nget_frozen_object,is_frozen_package,\ninit_frozen,is_builtin,is_frozen,\n_fix_co_filename,_frozen_module_names)\ntry :\n from _imp import create_dynamic\nexcept ImportError:\n\n create_dynamic=None\n \nfrom importlib._bootstrap import _ERR_MSG,_exec,_load,_builtin_from_name\nfrom importlib._bootstrap_external import SourcelessFileLoader\n\nfrom importlib import machinery\nfrom importlib import util\nimport importlib\nimport os\nimport sys\nimport tokenize\nimport types\nimport warnings\n\nwarnings.warn(\"the imp module is deprecated in favour of importlib and slated \"\n\"for removal in Python 3.12; \"\n\"see the module's documentation for alternative uses\",\nDeprecationWarning,stacklevel=2)\n\n\nSEARCH_ERROR=0\nPY_SOURCE=1\nPY_COMPILED=2\nC_EXTENSION=3\nPY_RESOURCE=4\nPKG_DIRECTORY=5\nC_BUILTIN=6\nPY_FROZEN=7\nPY_CODERESOURCE=8\nIMP_HOOK=9\n\n\ndef new_module(name):\n ''\n\n\n\n\n\n \n return types.ModuleType(name)\n \n \ndef get_magic():\n ''\n\n\n \n return util.MAGIC_NUMBER\n \n \ndef get_tag():\n ''\n return sys.implementation.cache_tag\n \n \ndef cache_from_source(path,debug_override=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n with warnings.catch_warnings():\n warnings.simplefilter('ignore')\n return util.cache_from_source(path,debug_override)\n \n \ndef source_from_cache(path):\n ''\n\n\n\n\n\n\n\n\n \n return util.source_from_cache(path)\n \n \ndef get_suffixes():\n ''\n extensions=[(s,'rb',C_EXTENSION)for s in machinery.EXTENSION_SUFFIXES]\n source=[(s,'r',PY_SOURCE)for s in machinery.SOURCE_SUFFIXES]\n bytecode=[(s,'rb',PY_COMPILED)for s in machinery.BYTECODE_SUFFIXES]\n \n return extensions+source+bytecode\n \n \nclass NullImporter:\n\n ''\n\n\n\n \n \n def __init__(self,path):\n if path =='':\n raise ImportError('empty pathname',path='')\n elif os.path.isdir(path):\n raise ImportError('existing directory',path=path)\n \n def find_module(self,fullname):\n ''\n return None\n \n \nclass _HackedGetData:\n\n ''\n \n \n def __init__(self,fullname,path,file=None ):\n super().__init__(fullname,path)\n self.file=file\n \n def get_data(self,path):\n ''\n if self.file and path ==self.path:\n \n \n if not self.file.closed:\n file=self.file\n if 'b'not in file.mode:\n file.close()\n if self.file.closed:\n self.file=file=open(self.path,'rb')\n \n with file:\n return file.read()\n else :\n return super().get_data(path)\n \n \nclass _LoadSourceCompatibility(_HackedGetData,machinery.SourceFileLoader):\n\n ''\n \n \ndef load_source(name,pathname,file=None ):\n loader=_LoadSourceCompatibility(name,pathname,file)\n spec=util.spec_from_file_location(name,pathname,loader=loader)\n if name in sys.modules:\n module=_exec(spec,sys.modules[name])\n else :\n module=_load(spec)\n \n \n module.__loader__=machinery.SourceFileLoader(name,pathname)\n module.__spec__.loader=module.__loader__\n return module\n \n \nclass _LoadCompiledCompatibility(_HackedGetData,SourcelessFileLoader):\n\n ''\n \n \ndef load_compiled(name,pathname,file=None ):\n ''\n loader=_LoadCompiledCompatibility(name,pathname,file)\n spec=util.spec_from_file_location(name,pathname,loader=loader)\n if name in sys.modules:\n module=_exec(spec,sys.modules[name])\n else :\n module=_load(spec)\n \n \n module.__loader__=SourcelessFileLoader(name,pathname)\n module.__spec__.loader=module.__loader__\n return module\n \n \ndef load_package(name,path):\n ''\n if os.path.isdir(path):\n extensions=(machinery.SOURCE_SUFFIXES[:]+\n machinery.BYTECODE_SUFFIXES[:])\n for extension in extensions:\n init_path=os.path.join(path,'__init__'+extension)\n if os.path.exists(init_path):\n path=init_path\n break\n else :\n raise ValueError('{!r} is not a package'.format(path))\n spec=util.spec_from_file_location(name,path,\n submodule_search_locations=[])\n if name in sys.modules:\n return _exec(spec,sys.modules[name])\n else :\n return _load(spec)\n \n \ndef load_module(name,file,filename,details):\n ''\n\n\n\n\n\n \n suffix,mode,type_=details\n if mode and (not mode.startswith('r')or '+'in mode):\n raise ValueError('invalid file open mode {!r}'.format(mode))\n elif file is None and type_ in {PY_SOURCE,PY_COMPILED}:\n msg='file object required for import (type code {})'.format(type_)\n raise ValueError(msg)\n elif type_ ==PY_SOURCE:\n return load_source(name,filename,file)\n elif type_ ==PY_COMPILED:\n return load_compiled(name,filename,file)\n elif type_ ==C_EXTENSION and load_dynamic is not None :\n if file is None :\n with open(filename,'rb')as opened_file:\n return load_dynamic(name,filename,opened_file)\n else :\n return load_dynamic(name,filename,file)\n elif type_ ==PKG_DIRECTORY:\n return load_package(name,filename)\n elif type_ ==C_BUILTIN:\n return init_builtin(name)\n elif type_ ==PY_FROZEN:\n return init_frozen(name)\n else :\n msg=\"Don't know how to import {} (type code {})\".format(name,type_)\n raise ImportError(msg,name=name)\n \n \ndef find_module(name,path=None ):\n ''\n\n\n\n\n\n\n\n\n \n if not isinstance(name,str):\n raise TypeError(\"'name' must be a str, not {}\".format(type(name)))\n elif not isinstance(path,(type(None ),list)):\n \n raise RuntimeError(\"'path' must be None or a list, \"\n \"not {}\".format(type(path)))\n \n if path is None :\n if is_builtin(name):\n return None ,None ,('','',C_BUILTIN)\n elif is_frozen(name):\n return None ,None ,('','',PY_FROZEN)\n else :\n path=sys.path\n \n for entry in path:\n package_directory=os.path.join(entry,name)\n for suffix in ['.py',machinery.BYTECODE_SUFFIXES[0]]:\n package_file_name='__init__'+suffix\n file_path=os.path.join(package_directory,package_file_name)\n if os.path.isfile(file_path):\n return None ,package_directory,('','',PKG_DIRECTORY)\n for suffix,mode,type_ in get_suffixes():\n file_name=name+suffix\n file_path=os.path.join(entry,file_name)\n if os.path.isfile(file_path):\n break\n else :\n continue\n break\n else :\n raise ImportError(_ERR_MSG.format(name),name=name)\n \n encoding=None\n if 'b'not in mode:\n with open(file_path,'rb')as file:\n encoding=tokenize.detect_encoding(file.readline)[0]\n file=open(file_path,mode,encoding=encoding)\n return file,file_path,(suffix,mode,type_)\n \n \ndef reload(module):\n ''\n\n\n\n\n\n \n return importlib.reload(module)\n \n \ndef init_builtin(name):\n ''\n\n\n\n \n try :\n return _builtin_from_name(name)\n except ImportError:\n return None\n \n \nif create_dynamic:\n def load_dynamic(name,path,file=None ):\n ''\n\n\n \n import importlib.machinery\n loader=importlib.machinery.ExtensionFileLoader(name,path)\n \n \n \n spec=importlib.machinery.ModuleSpec(\n name=name,loader=loader,origin=path)\n return _load(spec)\n \nelse :\n load_dynamic=None\n", ["_imp", "importlib", "importlib._bootstrap", "importlib._bootstrap_external", "importlib.machinery", "importlib.util", "os", "sys", "tokenize", "types", "warnings"]], "inspect": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__author__=('Ka-Ping Yee ',\n'Yury Selivanov ')\n\n__all__=[\n\"ArgInfo\",\n\"Arguments\",\n\"Attribute\",\n\"BlockFinder\",\n\"BoundArguments\",\n\"CORO_CLOSED\",\n\"CORO_CREATED\",\n\"CORO_RUNNING\",\n\"CORO_SUSPENDED\",\n\"CO_ASYNC_GENERATOR\",\n\"CO_COROUTINE\",\n\"CO_GENERATOR\",\n\"CO_ITERABLE_COROUTINE\",\n\"CO_NESTED\",\n\"CO_NEWLOCALS\",\n\"CO_NOFREE\",\n\"CO_OPTIMIZED\",\n\"CO_VARARGS\",\n\"CO_VARKEYWORDS\",\n\"ClassFoundException\",\n\"ClosureVars\",\n\"EndOfBlock\",\n\"FrameInfo\",\n\"FullArgSpec\",\n\"GEN_CLOSED\",\n\"GEN_CREATED\",\n\"GEN_RUNNING\",\n\"GEN_SUSPENDED\",\n\"Parameter\",\n\"Signature\",\n\"TPFLAGS_IS_ABSTRACT\",\n\"Traceback\",\n\"classify_class_attrs\",\n\"cleandoc\",\n\"currentframe\",\n\"findsource\",\n\"formatannotation\",\n\"formatannotationrelativeto\",\n\"formatargvalues\",\n\"get_annotations\",\n\"getabsfile\",\n\"getargs\",\n\"getargvalues\",\n\"getattr_static\",\n\"getblock\",\n\"getcallargs\",\n\"getclasstree\",\n\"getclosurevars\",\n\"getcomments\",\n\"getcoroutinelocals\",\n\"getcoroutinestate\",\n\"getdoc\",\n\"getfile\",\n\"getframeinfo\",\n\"getfullargspec\",\n\"getgeneratorlocals\",\n\"getgeneratorstate\",\n\"getinnerframes\",\n\"getlineno\",\n\"getmembers\",\n\"getmembers_static\",\n\"getmodule\",\n\"getmodulename\",\n\"getmro\",\n\"getouterframes\",\n\"getsource\",\n\"getsourcefile\",\n\"getsourcelines\",\n\"indentsize\",\n\"isabstract\",\n\"isasyncgen\",\n\"isasyncgenfunction\",\n\"isawaitable\",\n\"isbuiltin\",\n\"isclass\",\n\"iscode\",\n\"iscoroutine\",\n\"iscoroutinefunction\",\n\"isdatadescriptor\",\n\"isframe\",\n\"isfunction\",\n\"isgenerator\",\n\"isgeneratorfunction\",\n\"isgetsetdescriptor\",\n\"ismemberdescriptor\",\n\"ismethod\",\n\"ismethoddescriptor\",\n\"ismethodwrapper\",\n\"ismodule\",\n\"isroutine\",\n\"istraceback\",\n\"signature\",\n\"stack\",\n\"trace\",\n\"unwrap\",\n\"walktree\",\n]\n\n\nimport abc\nimport ast\nimport dis\nimport collections.abc\nimport enum\nimport importlib.machinery\nimport itertools\nimport linecache\nimport os\nimport re\nimport sys\nimport tokenize\nimport token\nimport types\nimport functools\nimport builtins\nfrom keyword import iskeyword\nfrom operator import attrgetter\nfrom collections import namedtuple,OrderedDict\n\n\n\nmod_dict=globals()\nfor k,v in dis.COMPILER_FLAG_NAMES.items():\n mod_dict[\"CO_\"+v]=k\ndel k,v,mod_dict\n\n\nTPFLAGS_IS_ABSTRACT=1 <<20\n\n\ndef get_annotations(obj,*,globals=None ,locals=None ,eval_str=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if isinstance(obj,type):\n \n obj_dict=getattr(obj,'__dict__',None )\n if obj_dict and hasattr(obj_dict,'get'):\n ann=obj_dict.get('__annotations__',None )\n if isinstance(ann,types.GetSetDescriptorType):\n ann=None\n else :\n ann=None\n \n obj_globals=None\n module_name=getattr(obj,'__module__',None )\n if module_name:\n module=sys.modules.get(module_name,None )\n if module:\n obj_globals=getattr(module,'__dict__',None )\n obj_locals=dict(vars(obj))\n unwrap=obj\n elif isinstance(obj,types.ModuleType):\n \n ann=getattr(obj,'__annotations__',None )\n obj_globals=getattr(obj,'__dict__')\n obj_locals=None\n unwrap=None\n elif callable(obj):\n \n \n \n ann=getattr(obj,'__annotations__',None )\n obj_globals=getattr(obj,'__globals__',None )\n obj_locals=None\n unwrap=obj\n else :\n raise TypeError(f\"{obj!r} is not a module, class, or callable.\")\n \n if ann is None :\n return {}\n \n if not isinstance(ann,dict):\n raise ValueError(f\"{obj!r}.__annotations__ is neither a dict nor None\")\n \n if not ann:\n return {}\n \n if not eval_str:\n return dict(ann)\n \n if unwrap is not None :\n while True :\n if hasattr(unwrap,'__wrapped__'):\n unwrap=unwrap.__wrapped__\n continue\n if isinstance(unwrap,functools.partial):\n unwrap=unwrap.func\n continue\n break\n if hasattr(unwrap,\"__globals__\"):\n obj_globals=unwrap.__globals__\n \n if globals is None :\n globals=obj_globals\n if locals is None :\n locals=obj_locals\n \n return_value={key:\n value if not isinstance(value,str)else eval(value,globals,locals)\n for key,value in ann.items()}\n return return_value\n \n \n \ndef ismodule(object):\n ''\n\n\n\n\n \n return isinstance(object,types.ModuleType)\n \ndef isclass(object):\n ''\n\n\n\n \n return isinstance(object,type)\n \ndef ismethod(object):\n ''\n\n\n\n\n\n \n return isinstance(object,types.MethodType)\n \ndef ismethoddescriptor(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n if isclass(object)or ismethod(object)or isfunction(object):\n \n return False\n tp=type(object)\n return hasattr(tp,\"__get__\")and not hasattr(tp,\"__set__\")\n \ndef isdatadescriptor(object):\n ''\n\n\n\n\n\n \n if isclass(object)or ismethod(object)or isfunction(object):\n \n return False\n tp=type(object)\n return hasattr(tp,\"__set__\")or hasattr(tp,\"__delete__\")\n \nif hasattr(types,'MemberDescriptorType'):\n\n def ismemberdescriptor(object):\n ''\n\n\n \n return isinstance(object,types.MemberDescriptorType)\nelse :\n\n def ismemberdescriptor(object):\n ''\n\n\n \n return False\n \nif hasattr(types,'GetSetDescriptorType'):\n\n def isgetsetdescriptor(object):\n ''\n\n\n \n return isinstance(object,types.GetSetDescriptorType)\nelse :\n\n def isgetsetdescriptor(object):\n ''\n\n\n \n return False\n \ndef isfunction(object):\n ''\n\n\n\n\n\n\n\n\n \n return isinstance(object,types.FunctionType)\n \ndef _has_code_flag(f,flag):\n ''\n\n \n while ismethod(f):\n f=f.__func__\n f=functools._unwrap_partial(f)\n if not (isfunction(f)or _signature_is_functionlike(f)):\n return False\n return bool(f.__code__.co_flags&flag)\n \ndef isgeneratorfunction(obj):\n ''\n\n\n \n return _has_code_flag(obj,CO_GENERATOR)\n \ndef iscoroutinefunction(obj):\n ''\n\n\n \n return _has_code_flag(obj,CO_COROUTINE)\n \ndef isasyncgenfunction(obj):\n ''\n\n\n\n \n return _has_code_flag(obj,CO_ASYNC_GENERATOR)\n \ndef isasyncgen(object):\n ''\n return isinstance(object,types.AsyncGeneratorType)\n \ndef isgenerator(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n return isinstance(object,types.GeneratorType)\n \ndef iscoroutine(object):\n ''\n return isinstance(object,types.CoroutineType)\n \ndef isawaitable(object):\n ''\n return (isinstance(object,types.CoroutineType)or\n isinstance(object,types.GeneratorType)and\n bool(object.gi_code.co_flags&CO_ITERABLE_COROUTINE)or\n isinstance(object,collections.abc.Awaitable))\n \ndef istraceback(object):\n ''\n\n\n\n\n\n \n return isinstance(object,types.TracebackType)\n \ndef isframe(object):\n ''\n\n\n\n\n\n\n\n\n\n \n return isinstance(object,types.FrameType)\n \ndef iscode(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n return isinstance(object,types.CodeType)\n \ndef isbuiltin(object):\n ''\n\n\n\n\n \n return isinstance(object,types.BuiltinFunctionType)\n \ndef ismethodwrapper(object):\n ''\n return isinstance(object,types.MethodWrapperType)\n \ndef isroutine(object):\n ''\n return (isbuiltin(object)\n or isfunction(object)\n or ismethod(object)\n or ismethoddescriptor(object)\n or ismethodwrapper(object))\n \ndef isabstract(object):\n ''\n if not isinstance(object,type):\n return False\n if object.__flags__&TPFLAGS_IS_ABSTRACT:\n return True\n if not issubclass(type(object),abc.ABCMeta):\n return False\n if hasattr(object,'__abstractmethods__'):\n \n \n return False\n \n \n for name,value in object.__dict__.items():\n if getattr(value,\"__isabstractmethod__\",False ):\n return True\n for base in object.__bases__:\n for name in getattr(base,\"__abstractmethods__\",()):\n value=getattr(object,name,None )\n if getattr(value,\"__isabstractmethod__\",False ):\n return True\n return False\n \ndef _getmembers(object,predicate,getter):\n results=[]\n processed=set()\n names=dir(object)\n if isclass(object):\n mro=(object,)+getmro(object)\n \n \n \n try :\n for base in object.__bases__:\n for k,v in base.__dict__.items():\n if isinstance(v,types.DynamicClassAttribute):\n names.append(k)\n except AttributeError:\n pass\n else :\n mro=()\n for key in names:\n \n \n \n try :\n value=getter(object,key)\n \n if key in processed:\n raise AttributeError\n except AttributeError:\n for base in mro:\n if key in base.__dict__:\n value=base.__dict__[key]\n break\n else :\n \n \n continue\n if not predicate or predicate(value):\n results.append((key,value))\n processed.add(key)\n results.sort(key=lambda pair:pair[0])\n return results\n \ndef getmembers(object,predicate=None ):\n ''\n \n return _getmembers(object,predicate,getattr)\n \ndef getmembers_static(object,predicate=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n return _getmembers(object,predicate,getattr_static)\n \nAttribute=namedtuple('Attribute','name kind defining_class object')\n\ndef classify_class_attrs(cls):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n mro=getmro(cls)\n metamro=getmro(type(cls))\n metamro=tuple(cls for cls in metamro if cls not in (type,object))\n class_bases=(cls,)+mro\n all_bases=class_bases+metamro\n names=dir(cls)\n \n \n \n for base in mro:\n for k,v in base.__dict__.items():\n if isinstance(v,types.DynamicClassAttribute)and v.fget is not None :\n names.append(k)\n result=[]\n processed=set()\n \n for name in names:\n \n \n \n \n \n \n \n \n \n homecls=None\n get_obj=None\n dict_obj=None\n if name not in processed:\n try :\n if name =='__dict__':\n raise Exception(\"__dict__ is special, don't want the proxy\")\n get_obj=getattr(cls,name)\n except Exception as exc:\n pass\n else :\n homecls=getattr(get_obj,\"__objclass__\",homecls)\n if homecls not in class_bases:\n \n \n homecls=None\n last_cls=None\n \n for srch_cls in class_bases:\n srch_obj=getattr(srch_cls,name,None )\n if srch_obj is get_obj:\n last_cls=srch_cls\n \n for srch_cls in metamro:\n try :\n srch_obj=srch_cls.__getattr__(cls,name)\n except AttributeError:\n continue\n if srch_obj is get_obj:\n last_cls=srch_cls\n if last_cls is not None :\n homecls=last_cls\n for base in all_bases:\n if name in base.__dict__:\n dict_obj=base.__dict__[name]\n if homecls not in metamro:\n homecls=base\n break\n if homecls is None :\n \n \n continue\n obj=get_obj if get_obj is not None else dict_obj\n \n if isinstance(dict_obj,(staticmethod,types.BuiltinMethodType)):\n kind=\"static method\"\n obj=dict_obj\n elif isinstance(dict_obj,(classmethod,types.ClassMethodDescriptorType)):\n kind=\"class method\"\n obj=dict_obj\n elif isinstance(dict_obj,property):\n kind=\"property\"\n obj=dict_obj\n elif isroutine(obj):\n kind=\"method\"\n else :\n kind=\"data\"\n result.append(Attribute(name,kind,homecls,obj))\n processed.add(name)\n return result\n \n \n \ndef getmro(cls):\n ''\n return cls.__mro__\n \n \n \ndef unwrap(func,*,stop=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if stop is None :\n def _is_wrapper(f):\n return hasattr(f,'__wrapped__')\n else :\n def _is_wrapper(f):\n return hasattr(f,'__wrapped__')and not stop(f)\n f=func\n \n \n memo={id(f):f}\n recursion_limit=sys.getrecursionlimit()\n while _is_wrapper(func):\n func=func.__wrapped__\n id_func=id(func)\n if (id_func in memo)or (len(memo)>=recursion_limit):\n raise ValueError('wrapper loop when unwrapping {!r}'.format(f))\n memo[id_func]=func\n return func\n \n \ndef indentsize(line):\n ''\n expline=line.expandtabs()\n return len(expline)-len(expline.lstrip())\n \ndef _findclass(func):\n cls=sys.modules.get(func.__module__)\n if cls is None :\n return None\n for name in func.__qualname__.split('.')[:-1]:\n cls=getattr(cls,name)\n if not isclass(cls):\n return None\n return cls\n \ndef _finddoc(obj):\n if isclass(obj):\n for base in obj.__mro__:\n if base is not object:\n try :\n doc=base.__doc__\n except AttributeError:\n continue\n if doc is not None :\n return doc\n return None\n \n if ismethod(obj):\n name=obj.__func__.__name__\n self=obj.__self__\n if (isclass(self)and\n getattr(getattr(self,name,None ),'__func__')is obj.__func__):\n \n cls=self\n else :\n cls=self.__class__\n elif isfunction(obj):\n name=obj.__name__\n cls=_findclass(obj)\n if cls is None or getattr(cls,name)is not obj:\n return None\n elif isbuiltin(obj):\n name=obj.__name__\n self=obj.__self__\n if (isclass(self)and\n self.__qualname__+'.'+name ==obj.__qualname__):\n \n cls=self\n else :\n cls=self.__class__\n \n elif isinstance(obj,property):\n func=obj.fget\n name=func.__name__\n cls=_findclass(func)\n if cls is None or getattr(cls,name)is not obj:\n return None\n elif ismethoddescriptor(obj)or isdatadescriptor(obj):\n name=obj.__name__\n cls=obj.__objclass__\n if getattr(cls,name)is not obj:\n return None\n if ismemberdescriptor(obj):\n slots=getattr(cls,'__slots__',None )\n if isinstance(slots,dict)and name in slots:\n return slots[name]\n else :\n return None\n for base in cls.__mro__:\n try :\n doc=getattr(base,name).__doc__\n except AttributeError:\n continue\n if doc is not None :\n return doc\n return None\n \ndef getdoc(object):\n ''\n\n\n\n \n try :\n doc=object.__doc__\n except AttributeError:\n return None\n if doc is None :\n try :\n doc=_finddoc(object)\n except (AttributeError,TypeError):\n return None\n if not isinstance(doc,str):\n return None\n return cleandoc(doc)\n \ndef cleandoc(doc):\n ''\n\n\n \n try :\n lines=doc.expandtabs().split('\\n')\n except UnicodeError:\n return None\n else :\n \n margin=sys.maxsize\n for line in lines[1:]:\n content=len(line.lstrip())\n if content:\n indent=len(line)-content\n margin=min(margin,indent)\n \n if lines:\n lines[0]=lines[0].lstrip()\n if margin ')\n self.generic_visit(node)\n self.stack.pop()\n self.stack.pop()\n \n visit_AsyncFunctionDef=visit_FunctionDef\n \n def visit_ClassDef(self,node):\n self.stack.append(node.name)\n if self.qualname =='.'.join(self.stack):\n \n if node.decorator_list:\n line_number=node.decorator_list[0].lineno\n else :\n line_number=node.lineno\n \n \n line_number -=1\n raise ClassFoundException(line_number)\n self.generic_visit(node)\n self.stack.pop()\n \n \ndef findsource(object):\n ''\n\n\n\n\n \n \n file=getsourcefile(object)\n if file:\n \n linecache.checkcache(file)\n else :\n file=getfile(object)\n \n \n \n if not (file.startswith('<')and file.endswith('>')):\n raise OSError('source code not available')\n \n module=getmodule(object,file)\n if module:\n lines=linecache.getlines(file,module.__dict__)\n else :\n lines=linecache.getlines(file)\n if not lines:\n raise OSError('could not get source code')\n \n if ismodule(object):\n return lines,0\n \n if isclass(object):\n qualname=object.__qualname__\n source=''.join(lines)\n tree=ast.parse(source)\n class_finder=_ClassFinder(qualname)\n try :\n class_finder.visit(tree)\n except ClassFoundException as e:\n line_number=e.args[0]\n return lines,line_number\n else :\n raise OSError('could not find class definition')\n \n if ismethod(object):\n object=object.__func__\n if isfunction(object):\n object=object.__code__\n if istraceback(object):\n object=object.tb_frame\n if isframe(object):\n object=object.f_code\n if iscode(object):\n if not hasattr(object,'co_firstlineno'):\n raise OSError('could not find function definition')\n lnum=object.co_firstlineno -1\n pat=re.compile(r'^(\\s*def\\s)|(\\s*async\\s+def\\s)|(.*(?0:\n try :\n line=lines[lnum]\n except IndexError:\n raise OSError('lineno is out of bounds')\n if pat.match(line):\n break\n lnum=lnum -1\n return lines,lnum\n raise OSError('could not find code object')\n \ndef getcomments(object):\n ''\n\n\n \n try :\n lines,lnum=findsource(object)\n except (OSError,TypeError):\n return None\n \n if ismodule(object):\n \n start=0\n if lines and lines[0][:2]=='#!':start=1\n while start 0:\n indent=indentsize(lines[lnum])\n end=lnum -1\n if end >=0 and lines[end].lstrip()[:1]=='#'and\\\n indentsize(lines[end])==indent:\n comments=[lines[end].expandtabs().lstrip()]\n if end >0:\n end=end -1\n comment=lines[end].expandtabs().lstrip()\n while comment[:1]=='#'and indentsize(lines[end])==indent:\n comments[:0]=[comment]\n end=end -1\n if end <0:break\n comment=lines[end].expandtabs().lstrip()\n while comments and comments[0].strip()=='#':\n comments[:1]=[]\n while comments and comments[-1].strip()=='#':\n comments[-1:]=[]\n return ''.join(comments)\n \nclass EndOfBlock(Exception):pass\n\nclass BlockFinder:\n ''\n def __init__(self):\n self.indent=0\n self.islambda=False\n self.started=False\n self.passline=False\n self.indecorator=False\n self.decoratorhasargs=False\n self.last=1\n self.body_col0=None\n \n def tokeneater(self,type,token,srowcol,erowcol,line):\n if not self.started and not self.indecorator:\n \n if token ==\"@\":\n self.indecorator=True\n \n elif token in (\"def\",\"class\",\"lambda\"):\n if token ==\"lambda\":\n self.islambda=True\n self.started=True\n self.passline=True\n elif token ==\"(\":\n if self.indecorator:\n self.decoratorhasargs=True\n elif token ==\")\":\n if self.indecorator:\n self.indecorator=False\n self.decoratorhasargs=False\n elif type ==tokenize.NEWLINE:\n self.passline=False\n self.last=srowcol[0]\n if self.islambda:\n raise EndOfBlock\n \n \n if self.indecorator and not self.decoratorhasargs:\n self.indecorator=False\n elif self.passline:\n pass\n elif type ==tokenize.INDENT:\n if self.body_col0 is None and self.started:\n self.body_col0=erowcol[1]\n self.indent=self.indent+1\n self.passline=True\n elif type ==tokenize.DEDENT:\n self.indent=self.indent -1\n \n \n \n if self.indent <=0:\n raise EndOfBlock\n elif type ==tokenize.COMMENT:\n if self.body_col0 is not None and srowcol[1]>=self.body_col0:\n \n self.last=srowcol[0]\n elif self.indent ==0 and type not in (tokenize.COMMENT,tokenize.NL):\n \n \n raise EndOfBlock\n \ndef getblock(lines):\n ''\n blockfinder=BlockFinder()\n try :\n tokens=tokenize.generate_tokens(iter(lines).__next__)\n for _token in tokens:\n blockfinder.tokeneater(*_token)\n except (EndOfBlock,IndentationError):\n pass\n return lines[:blockfinder.last]\n \ndef getsourcelines(object):\n ''\n\n\n\n\n\n \n object=unwrap(object)\n lines,lnum=findsource(object)\n \n if istraceback(object):\n object=object.tb_frame\n \n \n if (ismodule(object)or\n (isframe(object)and object.f_code.co_name ==\"\")):\n return lines,0\n else :\n return getblock(lines[lnum:]),lnum+1\n \ndef getsource(object):\n ''\n\n\n\n \n lines,lnum=getsourcelines(object)\n return ''.join(lines)\n \n \ndef walktree(classes,children,parent):\n ''\n results=[]\n classes.sort(key=attrgetter('__module__','__name__'))\n for c in classes:\n results.append((c,c.__bases__))\n if c in children:\n results.append(walktree(children[c],children,c))\n return results\n \ndef getclasstree(classes,unique=False ):\n ''\n\n\n\n\n\n\n \n children={}\n roots=[]\n for c in classes:\n if c.__bases__:\n for parent in c.__bases__:\n if parent not in children:\n children[parent]=[]\n if c not in children[parent]:\n children[parent].append(c)\n if unique and parent in classes:break\n elif c not in roots:\n roots.append(c)\n for parent in children:\n if parent not in classes:\n roots.append(parent)\n return walktree(roots,children,None )\n \n \nArguments=namedtuple('Arguments','args, varargs, varkw')\n\ndef getargs(co):\n ''\n\n\n\n\n \n if not iscode(co):\n raise TypeError('{!r} is not a code object'.format(co))\n \n names=co.co_varnames\n nargs=co.co_argcount\n nkwargs=co.co_kwonlyargcount\n args=list(names[:nargs])\n kwonlyargs=list(names[nargs:nargs+nkwargs])\n step=0\n \n nargs +=nkwargs\n varargs=None\n if co.co_flags&CO_VARARGS:\n varargs=co.co_varnames[nargs]\n nargs=nargs+1\n varkw=None\n if co.co_flags&CO_VARKEYWORDS:\n varkw=co.co_varnames[nargs]\n return Arguments(args+kwonlyargs,varargs,varkw)\n \n \nFullArgSpec=namedtuple('FullArgSpec',\n'args, varargs, varkw, defaults, kwonlyargs, kwonlydefaults, annotations')\n\ndef getfullargspec(func):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n sig=_signature_from_callable(func,\n follow_wrapper_chains=False ,\n skip_bound_arg=False ,\n sigcls=Signature,\n eval_str=False )\n except Exception as ex:\n \n \n \n \n raise TypeError('unsupported callable')from ex\n \n args=[]\n varargs=None\n varkw=None\n posonlyargs=[]\n kwonlyargs=[]\n annotations={}\n defaults=()\n kwdefaults={}\n \n if sig.return_annotation is not sig.empty:\n annotations['return']=sig.return_annotation\n \n for param in sig.parameters.values():\n kind=param.kind\n name=param.name\n \n if kind is _POSITIONAL_ONLY:\n posonlyargs.append(name)\n if param.default is not param.empty:\n defaults +=(param.default,)\n elif kind is _POSITIONAL_OR_KEYWORD:\n args.append(name)\n if param.default is not param.empty:\n defaults +=(param.default,)\n elif kind is _VAR_POSITIONAL:\n varargs=name\n elif kind is _KEYWORD_ONLY:\n kwonlyargs.append(name)\n if param.default is not param.empty:\n kwdefaults[name]=param.default\n elif kind is _VAR_KEYWORD:\n varkw=name\n \n if param.annotation is not param.empty:\n annotations[name]=param.annotation\n \n if not kwdefaults:\n \n kwdefaults=None\n \n if not defaults:\n \n defaults=None\n \n return FullArgSpec(posonlyargs+args,varargs,varkw,defaults,\n kwonlyargs,kwdefaults,annotations)\n \n \nArgInfo=namedtuple('ArgInfo','args varargs keywords locals')\n\ndef getargvalues(frame):\n ''\n\n\n\n\n \n args,varargs,varkw=getargs(frame.f_code)\n return ArgInfo(args,varargs,varkw,frame.f_locals)\n \ndef formatannotation(annotation,base_module=None ):\n if getattr(annotation,'__module__',None )=='typing':\n return repr(annotation).replace('typing.','')\n if isinstance(annotation,types.GenericAlias):\n return str(annotation)\n if isinstance(annotation,type):\n if annotation.__module__ in ('builtins',base_module):\n return annotation.__qualname__\n return annotation.__module__+'.'+annotation.__qualname__\n return repr(annotation)\n \ndef formatannotationrelativeto(object):\n module=getattr(object,'__module__',None )\n def _formatannotation(annotation):\n return formatannotation(annotation,module)\n return _formatannotation\n \n \ndef formatargvalues(args,varargs,varkw,locals,\nformatarg=str,\nformatvarargs=lambda name:'*'+name,\nformatvarkw=lambda name:'**'+name,\nformatvalue=lambda value:'='+repr(value)):\n ''\n\n\n\n\n \n def convert(name,locals=locals,\n formatarg=formatarg,formatvalue=formatvalue):\n return formatarg(name)+formatvalue(locals[name])\n specs=[]\n for i in range(len(args)):\n specs.append(convert(args[i]))\n if varargs:\n specs.append(formatvarargs(varargs)+formatvalue(locals[varargs]))\n if varkw:\n specs.append(formatvarkw(varkw)+formatvalue(locals[varkw]))\n return '('+', '.join(specs)+')'\n \ndef _missing_arguments(f_name,argnames,pos,values):\n names=[repr(name)for name in argnames if name not in values]\n missing=len(names)\n if missing ==1:\n s=names[0]\n elif missing ==2:\n s=\"{} and {}\".format(*names)\n else :\n tail=\", {} and {}\".format(*names[-2:])\n del names[-2:]\n s=\", \".join(names)+tail\n raise TypeError(\"%s() missing %i required %s argument%s: %s\"%\n (f_name,missing,\n \"positional\"if pos else \"keyword-only\",\n \"\"if missing ==1 else \"s\",s))\n \ndef _too_many(f_name,args,kwonly,varargs,defcount,given,values):\n atleast=len(args)-defcount\n kwonly_given=len([arg for arg in kwonly if arg in values])\n if varargs:\n plural=atleast !=1\n sig=\"at least %d\"%(atleast,)\n elif defcount:\n plural=True\n sig=\"from %d to %d\"%(atleast,len(args))\n else :\n plural=len(args)!=1\n sig=str(len(args))\n kwonly_sig=\"\"\n if kwonly_given:\n msg=\" positional argument%s (and %d keyword-only argument%s)\"\n kwonly_sig=(msg %(\"s\"if given !=1 else \"\",kwonly_given,\n \"s\"if kwonly_given !=1 else \"\"))\n raise TypeError(\"%s() takes %s positional argument%s but %d%s %s given\"%\n (f_name,sig,\"s\"if plural else \"\",given,kwonly_sig,\n \"was\"if given ==1 and not kwonly_given else \"were\"))\n \ndef getcallargs(func,/,*positional,**named):\n ''\n\n\n\n \n spec=getfullargspec(func)\n args,varargs,varkw,defaults,kwonlyargs,kwonlydefaults,ann=spec\n f_name=func.__name__\n arg2value={}\n \n \n if ismethod(func)and func.__self__ is not None :\n \n positional=(func.__self__,)+positional\n num_pos=len(positional)\n num_args=len(args)\n num_defaults=len(defaults)if defaults else 0\n \n n=min(num_pos,num_args)\n for i in range(n):\n arg2value[args[i]]=positional[i]\n if varargs:\n arg2value[varargs]=tuple(positional[n:])\n possible_kwargs=set(args+kwonlyargs)\n if varkw:\n arg2value[varkw]={}\n for kw,value in named.items():\n if kw not in possible_kwargs:\n if not varkw:\n raise TypeError(\"%s() got an unexpected keyword argument %r\"%\n (f_name,kw))\n arg2value[varkw][kw]=value\n continue\n if kw in arg2value:\n raise TypeError(\"%s() got multiple values for argument %r\"%\n (f_name,kw))\n arg2value[kw]=value\n if num_pos >num_args and not varargs:\n _too_many(f_name,args,kwonlyargs,varargs,num_defaults,\n num_pos,arg2value)\n if num_pos 0:\n start=lineno -1 -context //2\n try :\n lines,lnum=findsource(frame)\n except OSError:\n lines=index=None\n else :\n start=max(0,min(start,len(lines)-context))\n lines=lines[start:start+context]\n index=lineno -1 -start\n else :\n lines=index=None\n \n return Traceback(filename,lineno,frame.f_code.co_name,lines,\n index,positions=dis.Positions(*positions))\n \ndef getlineno(frame):\n ''\n \n return frame.f_lineno\n \n_FrameInfo=namedtuple('_FrameInfo',('frame',)+Traceback._fields)\nclass FrameInfo(_FrameInfo):\n def __new__(cls,frame,filename,lineno,function,code_context,index,*,positions=None ):\n instance=super().__new__(cls,frame,filename,lineno,function,code_context,index)\n instance.positions=positions\n return instance\n \n def __repr__(self):\n return ('FrameInfo(frame={!r}, filename={!r}, lineno={!r}, function={!r}, '\n 'code_context={!r}, index={!r}, positions={!r})'.format(\n self.frame,self.filename,self.lineno,self.function,\n self.code_context,self.index,self.positions))\n \ndef getouterframes(frame,context=1):\n ''\n\n\n \n framelist=[]\n while frame:\n traceback_info=getframeinfo(frame,context)\n frameinfo=(frame,)+traceback_info\n framelist.append(FrameInfo(*frameinfo,positions=traceback_info.positions))\n frame=frame.f_back\n return framelist\n \ndef getinnerframes(tb,context=1):\n ''\n\n\n \n framelist=[]\n while tb:\n traceback_info=getframeinfo(tb,context)\n frameinfo=(tb.tb_frame,)+traceback_info\n framelist.append(FrameInfo(*frameinfo,positions=traceback_info.positions))\n tb=tb.tb_next\n return framelist\n \ndef currentframe():\n ''\n return sys._getframe(1)if hasattr(sys,\"_getframe\")else None\n \ndef stack(context=1):\n ''\n return getouterframes(sys._getframe(1),context)\n \ndef trace(context=1):\n ''\n return getinnerframes(sys.exc_info()[2],context)\n \n \n \n \n_sentinel=object()\n\ndef _static_getmro(klass):\n return type.__dict__['__mro__'].__get__(klass)\n \ndef _check_instance(obj,attr):\n instance_dict={}\n try :\n instance_dict=object.__getattribute__(obj,\"__dict__\")\n except AttributeError:\n pass\n return dict.get(instance_dict,attr,_sentinel)\n \n \ndef _check_class(klass,attr):\n for entry in _static_getmro(klass):\n if _shadowed_dict(type(entry))is _sentinel:\n try :\n return entry.__dict__[attr]\n except KeyError:\n pass\n return _sentinel\n \ndef _is_type(obj):\n try :\n _static_getmro(obj)\n except TypeError:\n return False\n return True\n \ndef _shadowed_dict(klass):\n dict_attr=type.__dict__[\"__dict__\"]\n for entry in _static_getmro(klass):\n try :\n class_dict=dict_attr.__get__(entry)[\"__dict__\"]\n except KeyError:\n pass\n else :\n if not (type(class_dict)is types.GetSetDescriptorType and\n class_dict.__name__ ==\"__dict__\"and\n class_dict.__objclass__ is entry):\n return class_dict\n return _sentinel\n \ndef getattr_static(obj,attr,default=_sentinel):\n ''\n\n\n\n\n\n\n\n\n \n instance_result=_sentinel\n if not _is_type(obj):\n klass=type(obj)\n dict_attr=_shadowed_dict(klass)\n if (dict_attr is _sentinel or\n type(dict_attr)is types.MemberDescriptorType):\n instance_result=_check_instance(obj,attr)\n else :\n klass=obj\n \n klass_result=_check_class(klass,attr)\n \n if instance_result is not _sentinel and klass_result is not _sentinel:\n if (_check_class(type(klass_result),'__get__')is not _sentinel and\n _check_class(type(klass_result),'__set__')is not _sentinel):\n return klass_result\n \n if instance_result is not _sentinel:\n return instance_result\n if klass_result is not _sentinel:\n return klass_result\n \n if obj is klass:\n \n for entry in _static_getmro(type(klass)):\n if _shadowed_dict(type(entry))is _sentinel:\n try :\n return entry.__dict__[attr]\n except KeyError:\n pass\n if default is not _sentinel:\n return default\n raise AttributeError(attr)\n \n \n \n \nGEN_CREATED='GEN_CREATED'\nGEN_RUNNING='GEN_RUNNING'\nGEN_SUSPENDED='GEN_SUSPENDED'\nGEN_CLOSED='GEN_CLOSED'\n\ndef getgeneratorstate(generator):\n ''\n\n\n\n\n\n\n \n if generator.gi_running:\n return GEN_RUNNING\n if generator.gi_suspended:\n return GEN_SUSPENDED\n if generator.gi_frame is None :\n return GEN_CLOSED\n return GEN_CREATED\n \n \ndef getgeneratorlocals(generator):\n ''\n\n\n\n \n \n if not isgenerator(generator):\n raise TypeError(\"{!r} is not a Python generator\".format(generator))\n \n frame=getattr(generator,\"gi_frame\",None )\n if frame is not None :\n return generator.gi_frame.f_locals\n else :\n return {}\n \n \n \n \nCORO_CREATED='CORO_CREATED'\nCORO_RUNNING='CORO_RUNNING'\nCORO_SUSPENDED='CORO_SUSPENDED'\nCORO_CLOSED='CORO_CLOSED'\n\ndef getcoroutinestate(coroutine):\n ''\n\n\n\n\n\n\n \n if coroutine.cr_running:\n return CORO_RUNNING\n if coroutine.cr_suspended:\n return CORO_SUSPENDED\n if coroutine.cr_frame is None :\n return CORO_CLOSED\n return CORO_CREATED\n \n \ndef getcoroutinelocals(coroutine):\n ''\n\n\n\n \n frame=getattr(coroutine,\"cr_frame\",None )\n if frame is not None :\n return frame.f_locals\n else :\n return {}\n \n \n \n \n \n \n \n_NonUserDefinedCallables=(types.WrapperDescriptorType,\ntypes.MethodWrapperType,\ntypes.ClassMethodDescriptorType,\ntypes.BuiltinFunctionType)\n\n\ndef _signature_get_user_defined_method(cls,method_name):\n ''\n\n\n \n try :\n meth=getattr(cls,method_name)\n except AttributeError:\n return\n else :\n if not isinstance(meth,_NonUserDefinedCallables):\n \n \n return meth\n \n \ndef _signature_get_partial(wrapped_sig,partial,extra_args=()):\n ''\n\n\n \n \n old_params=wrapped_sig.parameters\n new_params=OrderedDict(old_params.items())\n \n partial_args=partial.args or ()\n partial_keywords=partial.keywords or {}\n \n if extra_args:\n partial_args=extra_args+partial_args\n \n try :\n ba=wrapped_sig.bind_partial(*partial_args,**partial_keywords)\n except TypeError as ex:\n msg='partial object {!r} has incorrect arguments'.format(partial)\n raise ValueError(msg)from ex\n \n \n transform_to_kwonly=False\n for param_name,param in old_params.items():\n try :\n arg_value=ba.arguments[param_name]\n except KeyError:\n pass\n else :\n if param.kind is _POSITIONAL_ONLY:\n \n \n new_params.pop(param_name)\n continue\n \n if param.kind is _POSITIONAL_OR_KEYWORD:\n if param_name in partial_keywords:\n \n \n \n \n \n \n \n \n \n \n \n \n transform_to_kwonly=True\n \n new_params[param_name]=param.replace(default=arg_value)\n else :\n \n new_params.pop(param.name)\n continue\n \n if param.kind is _KEYWORD_ONLY:\n \n new_params[param_name]=param.replace(default=arg_value)\n \n if transform_to_kwonly:\n assert param.kind is not _POSITIONAL_ONLY\n \n if param.kind is _POSITIONAL_OR_KEYWORD:\n new_param=new_params[param_name].replace(kind=_KEYWORD_ONLY)\n new_params[param_name]=new_param\n new_params.move_to_end(param_name)\n elif param.kind in (_KEYWORD_ONLY,_VAR_KEYWORD):\n new_params.move_to_end(param_name)\n elif param.kind is _VAR_POSITIONAL:\n new_params.pop(param.name)\n \n return wrapped_sig.replace(parameters=new_params.values())\n \n \ndef _signature_bound_method(sig):\n ''\n\n \n \n params=tuple(sig.parameters.values())\n \n if not params or params[0].kind in (_VAR_KEYWORD,_KEYWORD_ONLY):\n raise ValueError('invalid method signature')\n \n kind=params[0].kind\n if kind in (_POSITIONAL_OR_KEYWORD,_POSITIONAL_ONLY):\n \n \n params=params[1:]\n else :\n if kind is not _VAR_POSITIONAL:\n \n \n raise ValueError('invalid argument type')\n \n \n \n return sig.replace(parameters=params)\n \n \ndef _signature_is_builtin(obj):\n ''\n\n \n return (isbuiltin(obj)or\n ismethoddescriptor(obj)or\n isinstance(obj,_NonUserDefinedCallables)or\n \n \n obj in (type,object))\n \n \ndef _signature_is_functionlike(obj):\n ''\n\n\n\n \n \n if not callable(obj)or isclass(obj):\n \n \n return False\n \n name=getattr(obj,'__name__',None )\n code=getattr(obj,'__code__',None )\n defaults=getattr(obj,'__defaults__',_void)\n kwdefaults=getattr(obj,'__kwdefaults__',_void)\n annotations=getattr(obj,'__annotations__',None )\n \n return (isinstance(code,types.CodeType)and\n isinstance(name,str)and\n (defaults is None or isinstance(defaults,tuple))and\n (kwdefaults is None or isinstance(kwdefaults,dict))and\n (isinstance(annotations,(dict))or annotations is None ))\n \n \ndef _signature_strip_non_python_syntax(signature):\n ''\n\n\n\n\n\n\n\n\n\n \n \n if not signature:\n return signature,None ,None\n \n self_parameter=None\n last_positional_only=None\n \n lines=[l.encode('ascii')for l in signature.split('\\n')]\n generator=iter(lines).__next__\n token_stream=tokenize.tokenize(generator)\n \n delayed_comma=False\n skip_next_comma=False\n text=[]\n add=text.append\n \n current_parameter=0\n OP=token.OP\n ERRORTOKEN=token.ERRORTOKEN\n \n \n t=next(token_stream)\n assert t.type ==tokenize.ENCODING\n \n for t in token_stream:\n type,string=t.type,t.string\n \n if type ==OP:\n if string ==',':\n if skip_next_comma:\n skip_next_comma=False\n else :\n assert not delayed_comma\n delayed_comma=True\n current_parameter +=1\n continue\n \n if string =='/':\n assert not skip_next_comma\n assert last_positional_only is None\n skip_next_comma=True\n last_positional_only=current_parameter -1\n continue\n \n if (type ==ERRORTOKEN)and (string =='$'):\n assert self_parameter is None\n self_parameter=current_parameter\n continue\n \n if delayed_comma:\n delayed_comma=False\n if not ((type ==OP)and (string ==')')):\n add(', ')\n add(string)\n if (string ==','):\n add(' ')\n clean_signature=''.join(text)\n return clean_signature,self_parameter,last_positional_only\n \n \ndef _signature_fromstr(cls,obj,s,skip_bound_arg=True ):\n ''\n\n \n Parameter=cls._parameter_cls\n \n clean_signature,self_parameter,last_positional_only=\\\n _signature_strip_non_python_syntax(s)\n \n program=\"def foo\"+clean_signature+\": pass\"\n \n try :\n module=ast.parse(program)\n except SyntaxError:\n module=None\n \n if not isinstance(module,ast.Module):\n raise ValueError(\"{!r} builtin has invalid signature\".format(obj))\n \n f=module.body[0]\n \n parameters=[]\n empty=Parameter.empty\n invalid=object()\n \n module=None\n module_dict={}\n module_name=getattr(obj,'__module__',None )\n if module_name:\n module=sys.modules.get(module_name,None )\n if module:\n module_dict=module.__dict__\n sys_module_dict=sys.modules.copy()\n \n def parse_name(node):\n assert isinstance(node,ast.arg)\n if node.annotation is not None :\n raise ValueError(\"Annotations are not currently supported\")\n return node.arg\n \n def wrap_value(s):\n try :\n value=eval(s,module_dict)\n except NameError:\n try :\n value=eval(s,sys_module_dict)\n except NameError:\n raise RuntimeError()\n \n if isinstance(value,(str,int,float,bytes,bool,type(None ))):\n return ast.Constant(value)\n raise RuntimeError()\n \n class RewriteSymbolics(ast.NodeTransformer):\n def visit_Attribute(self,node):\n a=[]\n n=node\n while isinstance(n,ast.Attribute):\n a.append(n.attr)\n n=n.value\n if not isinstance(n,ast.Name):\n raise RuntimeError()\n a.append(n.id)\n value=\".\".join(reversed(a))\n return wrap_value(value)\n \n def visit_Name(self,node):\n if not isinstance(node.ctx,ast.Load):\n raise ValueError()\n return wrap_value(node.id)\n \n def p(name_node,default_node,default=empty):\n name=parse_name(name_node)\n if name is invalid:\n return None\n if default_node and default_node is not _empty:\n try :\n default_node=RewriteSymbolics().visit(default_node)\n o=ast.literal_eval(default_node)\n except ValueError:\n o=invalid\n if o is invalid:\n return None\n default=o if o is not invalid else default\n parameters.append(Parameter(name,kind,default=default,annotation=empty))\n \n \n args=reversed(f.args.args)\n defaults=reversed(f.args.defaults)\n iter=itertools.zip_longest(args,defaults,fillvalue=None )\n if last_positional_only is not None :\n kind=Parameter.POSITIONAL_ONLY\n else :\n kind=Parameter.POSITIONAL_OR_KEYWORD\n for i,(name,default)in enumerate(reversed(list(iter))):\n p(name,default)\n if i ==last_positional_only:\n kind=Parameter.POSITIONAL_OR_KEYWORD\n \n \n if f.args.vararg:\n kind=Parameter.VAR_POSITIONAL\n p(f.args.vararg,empty)\n \n \n kind=Parameter.KEYWORD_ONLY\n for name,default in zip(f.args.kwonlyargs,f.args.kw_defaults):\n p(name,default)\n \n \n if f.args.kwarg:\n kind=Parameter.VAR_KEYWORD\n p(f.args.kwarg,empty)\n \n if self_parameter is not None :\n \n \n \n \n \n assert parameters\n _self=getattr(obj,'__self__',None )\n self_isbound=_self is not None\n self_ismodule=ismodule(_self)\n if self_isbound and (self_ismodule or skip_bound_arg):\n parameters.pop(0)\n else :\n \n p=parameters[0].replace(kind=Parameter.POSITIONAL_ONLY)\n parameters[0]=p\n \n return cls(parameters,return_annotation=cls.empty)\n \n \ndef _signature_from_builtin(cls,func,skip_bound_arg=True ):\n ''\n\n \n \n if not _signature_is_builtin(func):\n raise TypeError(\"{!r} is not a Python builtin \"\n \"function\".format(func))\n \n s=getattr(func,\"__text_signature__\",None )\n if not s:\n raise ValueError(\"no signature found for builtin {!r}\".format(func))\n \n return _signature_fromstr(cls,func,s,skip_bound_arg)\n \n \ndef _signature_from_function(cls,func,skip_bound_arg=True ,\nglobals=None ,locals=None ,eval_str=False ):\n ''\n \n is_duck_function=False\n if not isfunction(func):\n if _signature_is_functionlike(func):\n is_duck_function=True\n else :\n \n \n raise TypeError('{!r} is not a Python function'.format(func))\n \n s=getattr(func,\"__text_signature__\",None )\n if s:\n return _signature_fromstr(cls,func,s,skip_bound_arg)\n \n Parameter=cls._parameter_cls\n \n \n func_code=func.__code__\n pos_count=func_code.co_argcount\n arg_names=func_code.co_varnames\n posonly_count=func_code.co_posonlyargcount\n positional=arg_names[:pos_count]\n keyword_only_count=func_code.co_kwonlyargcount\n keyword_only=arg_names[pos_count:pos_count+keyword_only_count]\n annotations=get_annotations(func,globals=globals,locals=locals,eval_str=eval_str)\n defaults=func.__defaults__\n kwdefaults=func.__kwdefaults__\n \n if defaults:\n pos_default_count=len(defaults)\n else :\n pos_default_count=0\n \n parameters=[]\n \n non_default_count=pos_count -pos_default_count\n posonly_left=posonly_count\n \n \n for name in positional[:non_default_count]:\n kind=_POSITIONAL_ONLY if posonly_left else _POSITIONAL_OR_KEYWORD\n annotation=annotations.get(name,_empty)\n parameters.append(Parameter(name,annotation=annotation,\n kind=kind))\n if posonly_left:\n posonly_left -=1\n \n \n for offset,name in enumerate(positional[non_default_count:]):\n kind=_POSITIONAL_ONLY if posonly_left else _POSITIONAL_OR_KEYWORD\n annotation=annotations.get(name,_empty)\n parameters.append(Parameter(name,annotation=annotation,\n kind=kind,\n default=defaults[offset]))\n if posonly_left:\n posonly_left -=1\n \n \n if func_code.co_flags&CO_VARARGS:\n name=arg_names[pos_count+keyword_only_count]\n annotation=annotations.get(name,_empty)\n parameters.append(Parameter(name,annotation=annotation,\n kind=_VAR_POSITIONAL))\n \n \n for name in keyword_only:\n default=_empty\n if kwdefaults is not None :\n default=kwdefaults.get(name,_empty)\n \n annotation=annotations.get(name,_empty)\n parameters.append(Parameter(name,annotation=annotation,\n kind=_KEYWORD_ONLY,\n default=default))\n \n if func_code.co_flags&CO_VARKEYWORDS:\n index=pos_count+keyword_only_count\n if func_code.co_flags&CO_VARARGS:\n index +=1\n \n name=arg_names[index]\n annotation=annotations.get(name,_empty)\n parameters.append(Parameter(name,annotation=annotation,\n kind=_VAR_KEYWORD))\n \n \n \n return cls(parameters,\n return_annotation=annotations.get('return',_empty),\n __validate_parameters__=is_duck_function)\n \n \ndef _signature_from_callable(obj,*,\nfollow_wrapper_chains=True ,\nskip_bound_arg=True ,\nglobals=None ,\nlocals=None ,\neval_str=False ,\nsigcls):\n\n ''\n\n \n \n _get_signature_of=functools.partial(_signature_from_callable,\n follow_wrapper_chains=follow_wrapper_chains,\n skip_bound_arg=skip_bound_arg,\n globals=globals,\n locals=locals,\n sigcls=sigcls,\n eval_str=eval_str)\n \n if not callable(obj):\n raise TypeError('{!r} is not a callable object'.format(obj))\n \n if isinstance(obj,types.MethodType):\n \n \n sig=_get_signature_of(obj.__func__)\n \n if skip_bound_arg:\n return _signature_bound_method(sig)\n else :\n return sig\n \n \n if follow_wrapper_chains:\n obj=unwrap(obj,stop=(lambda f:hasattr(f,\"__signature__\")))\n if isinstance(obj,types.MethodType):\n \n \n \n return _get_signature_of(obj)\n \n try :\n sig=obj.__signature__\n except AttributeError:\n pass\n else :\n if sig is not None :\n if not isinstance(sig,Signature):\n raise TypeError(\n 'unexpected object {!r} in __signature__ '\n 'attribute'.format(sig))\n return sig\n \n try :\n partialmethod=obj._partialmethod\n except AttributeError:\n pass\n else :\n if isinstance(partialmethod,functools.partialmethod):\n \n \n \n \n \n \n \n wrapped_sig=_get_signature_of(partialmethod.func)\n \n sig=_signature_get_partial(wrapped_sig,partialmethod,(None ,))\n first_wrapped_param=tuple(wrapped_sig.parameters.values())[0]\n if first_wrapped_param.kind is Parameter.VAR_POSITIONAL:\n \n \n return sig\n else :\n sig_params=tuple(sig.parameters.values())\n assert (not sig_params or\n first_wrapped_param is not sig_params[0])\n new_params=(first_wrapped_param,)+sig_params\n return sig.replace(parameters=new_params)\n \n if isfunction(obj)or _signature_is_functionlike(obj):\n \n \n return _signature_from_function(sigcls,obj,\n skip_bound_arg=skip_bound_arg,\n globals=globals,locals=locals,eval_str=eval_str)\n \n if _signature_is_builtin(obj):\n return _signature_from_builtin(sigcls,obj,\n skip_bound_arg=skip_bound_arg)\n \n if isinstance(obj,functools.partial):\n wrapped_sig=_get_signature_of(obj.func)\n return _signature_get_partial(wrapped_sig,obj)\n \n sig=None\n if isinstance(obj,type):\n \n \n \n \n call=_signature_get_user_defined_method(type(obj),'__call__')\n if call is not None :\n sig=_get_signature_of(call)\n else :\n factory_method=None\n new=_signature_get_user_defined_method(obj,'__new__')\n init=_signature_get_user_defined_method(obj,'__init__')\n \n if '__new__'in obj.__dict__:\n factory_method=new\n \n elif '__init__'in obj.__dict__:\n factory_method=init\n \n elif new is not None :\n factory_method=new\n elif init is not None :\n factory_method=init\n \n if factory_method is not None :\n sig=_get_signature_of(factory_method)\n \n if sig is None :\n \n \n \n for base in obj.__mro__[:-1]:\n \n \n \n \n \n \n \n try :\n text_sig=base.__text_signature__\n except AttributeError:\n pass\n else :\n if text_sig:\n \n \n return _signature_fromstr(sigcls,base,text_sig)\n \n \n \n \n if type not in obj.__mro__:\n \n \n if (obj.__init__ is object.__init__ and\n obj.__new__ is object.__new__):\n \n return sigcls.from_callable(object)\n else :\n raise ValueError(\n 'no signature found for builtin type {!r}'.format(obj))\n \n elif not isinstance(obj,_NonUserDefinedCallables):\n \n \n \n \n call=_signature_get_user_defined_method(type(obj),'__call__')\n if call is not None :\n try :\n sig=_get_signature_of(call)\n except ValueError as ex:\n msg='no signature found for {!r}'.format(obj)\n raise ValueError(msg)from ex\n \n if sig is not None :\n \n \n if skip_bound_arg:\n return _signature_bound_method(sig)\n else :\n return sig\n \n if isinstance(obj,types.BuiltinFunctionType):\n \n msg='no signature found for builtin function {!r}'.format(obj)\n raise ValueError(msg)\n \n raise ValueError('callable {!r} is not supported by signature'.format(obj))\n \n \nclass _void:\n ''\n \n \nclass _empty:\n ''\n \n \nclass _ParameterKind(enum.IntEnum):\n POSITIONAL_ONLY='positional-only'\n POSITIONAL_OR_KEYWORD='positional or keyword'\n VAR_POSITIONAL='variadic positional'\n KEYWORD_ONLY='keyword-only'\n VAR_KEYWORD='variadic keyword'\n \n def __new__(cls,description):\n value=len(cls.__members__)\n member=int.__new__(cls,value)\n member._value_=value\n member.description=description\n return member\n \n def __str__(self):\n return self.name\n \n_POSITIONAL_ONLY=_ParameterKind.POSITIONAL_ONLY\n_POSITIONAL_OR_KEYWORD=_ParameterKind.POSITIONAL_OR_KEYWORD\n_VAR_POSITIONAL=_ParameterKind.VAR_POSITIONAL\n_KEYWORD_ONLY=_ParameterKind.KEYWORD_ONLY\n_VAR_KEYWORD=_ParameterKind.VAR_KEYWORD\n\n\nclass Parameter:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=('_name','_kind','_default','_annotation')\n \n POSITIONAL_ONLY=_POSITIONAL_ONLY\n POSITIONAL_OR_KEYWORD=_POSITIONAL_OR_KEYWORD\n VAR_POSITIONAL=_VAR_POSITIONAL\n KEYWORD_ONLY=_KEYWORD_ONLY\n VAR_KEYWORD=_VAR_KEYWORD\n \n empty=_empty\n \n def __init__(self,name,kind,*,default=_empty,annotation=_empty):\n try :\n self._kind=_ParameterKind(kind)\n except ValueError:\n raise ValueError(f'value {kind!r} is not a valid Parameter.kind')\n if default is not _empty:\n if self._kind in (_VAR_POSITIONAL,_VAR_KEYWORD):\n msg='{} parameters cannot have default values'\n msg=msg.format(self._kind.description)\n raise ValueError(msg)\n self._default=default\n self._annotation=annotation\n \n if name is _empty:\n raise ValueError('name is a required attribute for Parameter')\n \n if not isinstance(name,str):\n msg='name must be a str, not a {}'.format(type(name).__name__)\n raise TypeError(msg)\n \n if name[0]=='.'and name[1:].isdigit():\n \n \n \n \n if self._kind !=_POSITIONAL_OR_KEYWORD:\n msg=(\n 'implicit arguments must be passed as '\n 'positional or keyword arguments, not {}'\n )\n msg=msg.format(self._kind.description)\n raise ValueError(msg)\n self._kind=_POSITIONAL_ONLY\n name='implicit{}'.format(name[1:])\n \n \n \n is_keyword=iskeyword(name)and self._kind is not _POSITIONAL_ONLY\n if is_keyword or not name.isidentifier():\n raise ValueError('{!r} is not a valid parameter name'.format(name))\n \n self._name=name\n \n def __reduce__(self):\n return (type(self),\n (self._name,self._kind),\n {'_default':self._default,\n '_annotation':self._annotation})\n \n def __setstate__(self,state):\n self._default=state['_default']\n self._annotation=state['_annotation']\n \n @property\n def name(self):\n return self._name\n \n @property\n def default(self):\n return self._default\n \n @property\n def annotation(self):\n return self._annotation\n \n @property\n def kind(self):\n return self._kind\n \n def replace(self,*,name=_void,kind=_void,\n annotation=_void,default=_void):\n ''\n \n if name is _void:\n name=self._name\n \n if kind is _void:\n kind=self._kind\n \n if annotation is _void:\n annotation=self._annotation\n \n if default is _void:\n default=self._default\n \n return type(self)(name,kind,default=default,annotation=annotation)\n \n def __str__(self):\n kind=self.kind\n formatted=self._name\n \n \n if self._annotation is not _empty:\n formatted='{}: {}'.format(formatted,\n formatannotation(self._annotation))\n \n if self._default is not _empty:\n if self._annotation is not _empty:\n formatted='{} = {}'.format(formatted,repr(self._default))\n else :\n formatted='{}={}'.format(formatted,repr(self._default))\n \n if kind ==_VAR_POSITIONAL:\n formatted='*'+formatted\n elif kind ==_VAR_KEYWORD:\n formatted='**'+formatted\n \n return formatted\n \n def __repr__(self):\n return '<{} \"{}\">'.format(self.__class__.__name__,self)\n \n def __hash__(self):\n return hash((self.name,self.kind,self.annotation,self.default))\n \n def __eq__(self,other):\n if self is other:\n return True\n if not isinstance(other,Parameter):\n return NotImplemented\n return (self._name ==other._name and\n self._kind ==other._kind and\n self._default ==other._default and\n self._annotation ==other._annotation)\n \n \nclass BoundArguments:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=('arguments','_signature','__weakref__')\n \n def __init__(self,signature,arguments):\n self.arguments=arguments\n self._signature=signature\n \n @property\n def signature(self):\n return self._signature\n \n @property\n def args(self):\n args=[]\n for param_name,param in self._signature.parameters.items():\n if param.kind in (_VAR_KEYWORD,_KEYWORD_ONLY):\n break\n \n try :\n arg=self.arguments[param_name]\n except KeyError:\n \n \n break\n else :\n if param.kind ==_VAR_POSITIONAL:\n \n args.extend(arg)\n else :\n \n args.append(arg)\n \n return tuple(args)\n \n @property\n def kwargs(self):\n kwargs={}\n kwargs_started=False\n for param_name,param in self._signature.parameters.items():\n if not kwargs_started:\n if param.kind in (_VAR_KEYWORD,_KEYWORD_ONLY):\n kwargs_started=True\n else :\n if param_name not in self.arguments:\n kwargs_started=True\n continue\n \n if not kwargs_started:\n continue\n \n try :\n arg=self.arguments[param_name]\n except KeyError:\n pass\n else :\n if param.kind ==_VAR_KEYWORD:\n \n kwargs.update(arg)\n else :\n \n kwargs[param_name]=arg\n \n return kwargs\n \n def apply_defaults(self):\n ''\n\n\n\n\n\n\n \n arguments=self.arguments\n new_arguments=[]\n for name,param in self._signature.parameters.items():\n try :\n new_arguments.append((name,arguments[name]))\n except KeyError:\n if param.default is not _empty:\n val=param.default\n elif param.kind is _VAR_POSITIONAL:\n val=()\n elif param.kind is _VAR_KEYWORD:\n val={}\n else :\n \n \n continue\n new_arguments.append((name,val))\n self.arguments=dict(new_arguments)\n \n def __eq__(self,other):\n if self is other:\n return True\n if not isinstance(other,BoundArguments):\n return NotImplemented\n return (self.signature ==other.signature and\n self.arguments ==other.arguments)\n \n def __setstate__(self,state):\n self._signature=state['_signature']\n self.arguments=state['arguments']\n \n def __getstate__(self):\n return {'_signature':self._signature,'arguments':self.arguments}\n \n def __repr__(self):\n args=[]\n for arg,value in self.arguments.items():\n args.append('{}={!r}'.format(arg,value))\n return '<{} ({})>'.format(self.__class__.__name__,', '.join(args))\n \n \nclass Signature:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=('_return_annotation','_parameters')\n \n _parameter_cls=Parameter\n _bound_arguments_cls=BoundArguments\n \n empty=_empty\n \n def __init__(self,parameters=None ,*,return_annotation=_empty,\n __validate_parameters__=True ):\n ''\n\n \n \n if parameters is None :\n params=OrderedDict()\n else :\n if __validate_parameters__:\n params=OrderedDict()\n top_kind=_POSITIONAL_ONLY\n kind_defaults=False\n \n for param in parameters:\n kind=param.kind\n name=param.name\n \n if kind top_kind:\n kind_defaults=False\n top_kind=kind\n \n if kind in (_POSITIONAL_ONLY,_POSITIONAL_OR_KEYWORD):\n if param.default is _empty:\n if kind_defaults:\n \n \n \n msg='non-default argument follows default '\\\n 'argument'\n raise ValueError(msg)\n else :\n \n kind_defaults=True\n \n if name in params:\n msg='duplicate parameter name: {!r}'.format(name)\n raise ValueError(msg)\n \n params[name]=param\n else :\n params=OrderedDict((param.name,param)for param in parameters)\n \n self._parameters=types.MappingProxyType(params)\n self._return_annotation=return_annotation\n \n @classmethod\n def from_callable(cls,obj,*,\n follow_wrapped=True ,globals=None ,locals=None ,eval_str=False ):\n ''\n return _signature_from_callable(obj,sigcls=cls,\n follow_wrapper_chains=follow_wrapped,\n globals=globals,locals=locals,eval_str=eval_str)\n \n @property\n def parameters(self):\n return self._parameters\n \n @property\n def return_annotation(self):\n return self._return_annotation\n \n def replace(self,*,parameters=_void,return_annotation=_void):\n ''\n\n\n \n \n if parameters is _void:\n parameters=self.parameters.values()\n \n if return_annotation is _void:\n return_annotation=self._return_annotation\n \n return type(self)(parameters,\n return_annotation=return_annotation)\n \n def _hash_basis(self):\n params=tuple(param for param in self.parameters.values()\n if param.kind !=_KEYWORD_ONLY)\n \n kwo_params={param.name:param for param in self.parameters.values()\n if param.kind ==_KEYWORD_ONLY}\n \n return params,kwo_params,self.return_annotation\n \n def __hash__(self):\n params,kwo_params,return_annotation=self._hash_basis()\n kwo_params=frozenset(kwo_params.values())\n return hash((params,kwo_params,return_annotation))\n \n def __eq__(self,other):\n if self is other:\n return True\n if not isinstance(other,Signature):\n return NotImplemented\n return self._hash_basis()==other._hash_basis()\n \n def _bind(self,args,kwargs,*,partial=False ):\n ''\n \n arguments={}\n \n parameters=iter(self.parameters.values())\n parameters_ex=()\n arg_vals=iter(args)\n \n while True :\n \n \n try :\n arg_val=next(arg_vals)\n except StopIteration:\n \n try :\n param=next(parameters)\n except StopIteration:\n \n \n break\n else :\n if param.kind ==_VAR_POSITIONAL:\n \n \n break\n elif param.name in kwargs:\n if param.kind ==_POSITIONAL_ONLY:\n msg='{arg!r} parameter is positional only, '\\\n 'but was passed as a keyword'\n msg=msg.format(arg=param.name)\n raise TypeError(msg)from None\n parameters_ex=(param,)\n break\n elif (param.kind ==_VAR_KEYWORD or\n param.default is not _empty):\n \n \n \n parameters_ex=(param,)\n break\n else :\n \n \n if partial:\n parameters_ex=(param,)\n break\n else :\n msg='missing a required argument: {arg!r}'\n msg=msg.format(arg=param.name)\n raise TypeError(msg)from None\n else :\n \n try :\n param=next(parameters)\n except StopIteration:\n raise TypeError('too many positional arguments')from None\n else :\n if param.kind in (_VAR_KEYWORD,_KEYWORD_ONLY):\n \n \n raise TypeError(\n 'too many positional arguments')from None\n \n if param.kind ==_VAR_POSITIONAL:\n \n \n \n values=[arg_val]\n values.extend(arg_vals)\n arguments[param.name]=tuple(values)\n break\n \n if param.name in kwargs and param.kind !=_POSITIONAL_ONLY:\n raise TypeError(\n 'multiple values for argument {arg!r}'.format(\n arg=param.name))from None\n \n arguments[param.name]=arg_val\n \n \n \n kwargs_param=None\n for param in itertools.chain(parameters_ex,parameters):\n if param.kind ==_VAR_KEYWORD:\n \n kwargs_param=param\n continue\n \n if param.kind ==_VAR_POSITIONAL:\n \n \n \n continue\n \n param_name=param.name\n try :\n arg_val=kwargs.pop(param_name)\n except KeyError:\n \n \n \n \n if (not partial and param.kind !=_VAR_POSITIONAL and\n param.default is _empty):\n raise TypeError('missing a required argument: {arg!r}'.\\\n format(arg=param_name))from None\n \n else :\n if param.kind ==_POSITIONAL_ONLY:\n \n \n \n raise TypeError('{arg!r} parameter is positional only, '\n 'but was passed as a keyword'.\\\n format(arg=param.name))\n \n arguments[param_name]=arg_val\n \n if kwargs:\n if kwargs_param is not None :\n \n arguments[kwargs_param.name]=kwargs\n else :\n raise TypeError(\n 'got an unexpected keyword argument {arg!r}'.format(\n arg=next(iter(kwargs))))\n \n return self._bound_arguments_cls(self,arguments)\n \n def bind(self,/,*args,**kwargs):\n ''\n\n\n \n return self._bind(args,kwargs)\n \n def bind_partial(self,/,*args,**kwargs):\n ''\n\n\n \n return self._bind(args,kwargs,partial=True )\n \n def __reduce__(self):\n return (type(self),\n (tuple(self._parameters.values()),),\n {'_return_annotation':self._return_annotation})\n \n def __setstate__(self,state):\n self._return_annotation=state['_return_annotation']\n \n def __repr__(self):\n return '<{} {}>'.format(self.__class__.__name__,self)\n \n def __str__(self):\n result=[]\n render_pos_only_separator=False\n render_kw_only_separator=True\n for param in self.parameters.values():\n formatted=str(param)\n \n kind=param.kind\n \n if kind ==_POSITIONAL_ONLY:\n render_pos_only_separator=True\n elif render_pos_only_separator:\n \n \n result.append('/')\n render_pos_only_separator=False\n \n if kind ==_VAR_POSITIONAL:\n \n \n render_kw_only_separator=False\n elif kind ==_KEYWORD_ONLY and render_kw_only_separator:\n \n \n \n result.append('*')\n \n \n render_kw_only_separator=False\n \n result.append(formatted)\n \n if render_pos_only_separator:\n \n \n result.append('/')\n \n rendered='({})'.format(', '.join(result))\n \n if self.return_annotation is not _empty:\n anno=formatannotation(self.return_annotation)\n rendered +=' -> {}'.format(anno)\n \n return rendered\n \n \ndef signature(obj,*,follow_wrapped=True ,globals=None ,locals=None ,eval_str=False ):\n ''\n return Signature.from_callable(obj,follow_wrapped=follow_wrapped,\n globals=globals,locals=locals,eval_str=eval_str)\n \n \ndef _main():\n ''\n import argparse\n import importlib\n \n parser=argparse.ArgumentParser()\n parser.add_argument(\n 'object',\n help=\"The object to be analysed. \"\n \"It supports the 'module:qualname' syntax\")\n parser.add_argument(\n '-d','--details',action='store_true',\n help='Display info about the module rather than its source code')\n \n args=parser.parse_args()\n \n target=args.object\n mod_name,has_attrs,attrs=target.partition(\":\")\n try :\n obj=module=importlib.import_module(mod_name)\n except Exception as exc:\n msg=\"Failed to import {} ({}: {})\".format(mod_name,\n type(exc).__name__,\n exc)\n print(msg,file=sys.stderr)\n sys.exit(2)\n \n if has_attrs:\n parts=attrs.split(\".\")\n obj=module\n for part in parts:\n obj=getattr(obj,part)\n \n if module.__name__ in sys.builtin_module_names:\n print(\"Can't get info for builtin modules.\",file=sys.stderr)\n sys.exit(1)\n \n if args.details:\n print('Target: {}'.format(target))\n print('Origin: {}'.format(getsourcefile(module)))\n print('Cached: {}'.format(module.__cached__))\n if obj is module:\n print('Loader: {}'.format(repr(module.__loader__)))\n if hasattr(module,'__path__'):\n print('Submodule search path: {}'.format(module.__path__))\n else :\n try :\n __,lineno=findsource(obj)\n except Exception:\n pass\n else :\n print('Line: {}'.format(lineno))\n \n print('\\n')\n else :\n print(getsource(obj))\n \n \nif __name__ ==\"__main__\":\n _main()\n", ["abc", "argparse", "ast", "builtins", "collections", "collections.abc", "dis", "enum", "functools", "importlib", "importlib.machinery", "itertools", "keyword", "linecache", "operator", "os", "re", "sys", "token", "tokenize", "types"]], "interpreter": [".py", "import sys\nimport builtins\nimport re\n\nimport tb as traceback\n\nfrom browser import console,document,window,html,DOMNode\nfrom browser.widgets.dialog import Dialog\n\n_credits=\"\"\" Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands\n for supporting Python development. See www.python.org for more information.\"\"\"\n\n_copyright=\"\"\"Copyright (c) 2012, Pierre Quentel pierre.quentel@gmail.com\nAll Rights Reserved.\n\nCopyright (c) 2001-2022 Python Software Foundation.\nAll Rights Reserved.\n\nCopyright (c) 2000 BeOpen.com.\nAll Rights Reserved.\n\nCopyright (c) 1995-2001 Corporation for National Research Initiatives.\nAll Rights Reserved.\n\nCopyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.\nAll Rights Reserved.\"\"\"\n\n_help=\"Type help() for interactive help, or help(object) for help about object.\"\n\n_license=\"\"\"Copyright (c) 2012, Pierre Quentel pierre.quentel@gmail.com\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\nRedistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer. Redistributions in binary\nform must reproduce the above copyright notice, this list of conditions and\nthe following disclaimer in the documentation and/or other materials provided\nwith the distribution.\nNeither the name of the nor the names of its contributors may\nbe used to endorse or promote products derived from this software without\nspecific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\nCONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\nSUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\nINTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\nPOSSIBILITY OF SUCH DAMAGE.\n\"\"\"\n\nclass Info:\n\n def __init__(self,msg):\n self.msg=msg\n \n def __repr__(self):\n return self.msg\n \n \n \neditor_ns={\n'credits':Info(_credits),\n'copyright':Info(_copyright),\n'license':Info(_license),\n'__annotations__':{},\n'__builtins__':builtins,\n'__doc__':None ,\n'__file__':'',\n'__name__':'__main__'\n}\n\n\nstyle_sheet=\"\"\"\n.brython-interpreter {\n background-color: #000;\n color: #fff;\n font-family: consolas, courier;\n caret-color: #fff;\n overflow-y: auto;\n overflow-x: hidden;\n}\n\n@keyframes blinker {\n 50% {\n opacity: 0;\n }\n}\n\npre{\n display:inline;\n}\n\"\"\"\n\nactive=[]\n\nclass Output:\n\n def __init__(self,interpreter):\n self.interpreter=interpreter\n \n def write(self,*args,**kw):\n self.interpreter.write(*args,**kw)\n \n def __len__(self):\n return len(self.interpreter.buffer)\n \n \n \n \ncolor_character_pattern=re.compile(r'^\\033\\[([0-9;]*)m')\n\ndef swap_color_bgcolor(element):\n ''\n element.style.color,element.style.backgroundColor=\\\n element.style.backgroundColor,element.style.color\n \ncc_styles={\n0:[\"fontStyle\",\"normal\"],\n1:[\"fontWeight\",\"bold\"],\n2:[\"fontWeight\",\"lighter\"],\n3:[\"fontStyle\",\"italic\"],\n4:[\"textDecoration\",\"underline\"],\n5:[\"animation\",\"blinker 1s step-start infinite\"],\n6:[\"animation\",\"blinker 0.5s step-start infinite\"],\n7:swap_color_bgcolor\n}\n\ncc_colors={\n30:\"Black\",\n31:\"Red\",\n32:\"Green\",\n33:\"Yellow\",\n34:\"Blue\",\n35:\"Magenta\",\n36:\"Cyan\",\n37:\"White\"\n}\n\ncc_bgcolors={k+10:v for (k,v)in cc_colors.items()}\n\n\nclass Trace:\n\n def __init__(self,exc):\n self.buf=\"\"\n self.is_syntax_error=exc.__name__ in ['SyntaxError',\n 'IndentationError']\n \n def write(self,data):\n self.buf +=str(data)\n \n def format(self):\n ''\n lines=self.buf.strip().split(\"\\n\")\n stripped=[lines[0]]if not self.is_syntax_error else ['']\n for i in range(1,len(lines),2):\n if __file__ in lines[i]:\n continue\n stripped +=lines[i:i+2]\n return \"\\n\".join(stripped)\n \n \nclass Interpreter:\n ''\n \n def __init__(self,elt_id=None ,title=\"Interactive Interpreter\",\n globals=None ,locals=None ,history=None ,\n rows=30,cols=120,default_css=True ,\n clear_zone=True ,banner=True ):\n ''\n\n\n\n\n\n \n if default_css:\n \n for stylesheet in document.styleSheets:\n if stylesheet.ownerNode.id ==\"brython-interpreter\":\n break\n else :\n document <=html.STYLE(style_sheet,id=\"brython-interpreter\")\n \n self.cc_style=None\n self.cc_color=None\n self.cc_bgcolor=None\n self.default_cc_color='#fff'\n self.default_cc_bgcolor='#000'\n \n if elt_id is None :\n self.dialog=Dialog(title=title,top=10,left=10,\n default_css=default_css)\n self.dialog.bind('blur',self.blur)\n self.dialog.bind('click',self.focus)\n self.dialog.close_button.bind('click',self.close)\n self.zone=html.DIV(Class=\"brython-interpreter\",\n contenteditable=True )\n self.zone.style.width=f'{cols}ch'\n self.zone.style.height=f'{rows}ch'\n self.dialog.panel <=self.zone\n else :\n if isinstance(elt_id,str):\n try :\n elt=document[elt_id]\n if elt.tagName !=\"DIV\":\n raise ValueError(\n f\"element {elt_id} is a {elt.tagName}, \"+\n \"not a DIV\")\n self.zone=elt\n except KeyError:\n raise KeyError(f\"no element with id '{elt_id}'\")\n elif isinstance(elt_id,DOMNode):\n if elt_id.tagName ==\"DIV\":\n self.zone=elt_id\n else :\n raise ValueError(\"element is not a DIV\")\n else :\n raise ValueError(\"element should be a string or \"+\n f\"a DIV, got '{elt_id.__class__.__name__}'\")\n if self.zone.contentEditable !='true':\n raise ValueError(\"DIV element must be contenteditable\")\n v=sys.implementation.version\n if clear_zone:\n self.clear()\n if banner:\n self.insert(\n f\"Brython {v[0]}.{v[1]}.{v[2]} on \"\n f\"{window.navigator.appName} {window.navigator.appVersion}\"\n \"\\n\"\n )\n self.insert('Type \"help\", \"copyright\", \"credits\" '\n 'or \"license\" for more information.'+'\\n')\n self.insert_prompt()\n \n self._status=\"main\"\n self.history=history or []\n self.current=len(self.history)\n \n self.globals={}if globals is None else globals\n self.globals.update(editor_ns)\n self.locals=self.globals if locals is None else locals\n \n self.zone.bind('keypress',self.keypress)\n self.zone.bind('keydown',self.keydown)\n self.zone.bind('mouseup',self.mouseup)\n \n self.zone.bind('focus',self.focus)\n self.zone.bind('blur',self.blur)\n self.focus()\n \n self.cursor_to_end()\n \n active.append(self)\n \n def clear(self):\n self.zone.text=''\n \n def insert(self,text):\n \n pre=html.PRE(style=\"display:inline;white-space:pre-wrap;\")\n pre.text=text\n if self.cc_color is not None :\n pre.style.color=self.cc_color\n if self.cc_bgcolor is not None :\n pre.style.backgroundColor=self.cc_bgcolor\n if self.cc_style is not None :\n style=cc_styles[self.cc_style]\n if isinstance(style,list):\n attr,value=style\n setattr(pre.style,attr,value)\n else :\n style(pre)\n self.zone <=pre\n \n def insert_prompt(self):\n self.insert('>>> ')\n \n def insert_continuation(self):\n self.insert('\\n... ')\n \n def insert_cr(self):\n self.insert('\\n')\n \n def get_content(self):\n return self.zone.text\n \n def blur(self,ev):\n if hasattr(self,'dialog'):\n self.dialog.style.zIndex=0\n \n def close(self,ev):\n active.remove(self)\n \n def cursor_to_end(self,*args):\n \n sel=window.getSelection()\n \n last_child=self.zone.lastChild.firstChild\n if last_child is None :\n last_child=self.zone.lastChild\n pos=len(last_child.text)\n \n sel.setBaseAndExtent(last_child,pos,last_child,pos)\n \n self.zone.lastChild.scrollIntoView()\n \n def focus(self,*args):\n ''\n if hasattr(self,'dialog'):\n \n for w in active:\n if w is not self:\n w.dialog.style.zIndex=0\n self.dialog.style.zIndex=1\n sys.stdout=sys.stderr=Output(self)\n self.zone.focus()\n \n def keypress(self,event):\n if event.key ==\"Tab\":\n event.preventDefault()\n self.insert(\" \")\n elif event.key ==\"Enter\":\n event.preventDefault()\n selection=window.getSelection().toString()\n if selection:\n \n self.cursor_to_end()\n return\n self.handle_line(event)\n \n def feed(self,src):\n ''\n\n\n \n current_indent=0\n lines=src.strip().split('\\n')\n for line in lines:\n self.insert(line)\n self.handle_line()\n \n def handle_line(self,event=None ):\n src=self.get_content().strip()\n if self._status ==\"main\":\n currentLine=src[src.rfind('\\n>>>')+5:]\n elif self._status ==\"3string\":\n currentLine=src[src.rfind('\\n>>>')+5:]\n currentLine=currentLine.replace('\\n... ','\\n')\n else :\n currentLine=src[src.rfind('\\n...')+5:]\n if self._status =='main'and not currentLine.strip():\n self.insert_cr()\n self.insert_prompt()\n self.cursor_to_end()\n if event is not None :\n event.preventDefault()\n return\n self.history.append(currentLine)\n self.current=len(self.history)\n if self._status in [\"main\",\"3string\"]:\n \n if currentLine ==\"help\":\n self.write(_help)\n self.insert_prompt()\n if event is not None :\n event.preventDefault()\n return\n try :\n code=compile(currentLine,'','eval')\n except IndentationError:\n self.insert_continuation()\n self._status=\"block\"\n except SyntaxError as msg:\n if str(msg).startswith('unterminated triple-quoted string literal'):\n self.insert_continuation()\n self._status=\"3string\"\n elif str(msg)=='decorator expects function':\n self.insert_continuation()\n self._status=\"block\"\n elif str(msg).endswith('was never closed'):\n self.insert_continuation()\n self._status=\"block\"\n else :\n self.insert_cr()\n try :\n code=compile(currentLine,'','exec')\n exec(code,self.globals,self.locals)\n except Exception as exc:\n self.print_tb(msg)\n self.insert_prompt()\n self._status=\"main\"\n except Exception as exc:\n \n \n \n self.print_tb(exc)\n self.insert_prompt()\n self._status=\"main\"\n else :\n self.insert_cr()\n try :\n self.globals['_']=eval(code,\n self.globals,\n self.locals)\n if self.globals['_']is not None :\n self.write(repr(self.globals['_'])+'\\n')\n self.insert_prompt()\n self._status=\"main\"\n except Exception as exc:\n self.print_tb(exc)\n self.insert_prompt()\n self._status=\"main\"\n \n elif currentLine ==\"\":\n block=src[src.rfind('\\n>>>')+5:].splitlines()\n block=[block[0]]+[b[4:]for b in block[1:]]\n block_src='\\n'.join(block)\n self.insert_cr()\n \n self._status=\"main\"\n try :\n exec(block_src,self.globals,self.locals)\n except Exception as exc:\n self.print_tb(exc)\n self.insert_prompt()\n \n else :\n self.insert_continuation()\n \n self.cursor_to_end()\n if event is not None :\n event.preventDefault()\n \n def keydown(self,event):\n sel=window.getSelection()\n if event.key in (\"ArrowLeft\",\"Backspace\"):\n \n if sel.anchorNode is not self.zone:\n caret_column=sel.anchorOffset\n if caret_column >=5:\n return\n event.preventDefault()\n event.stopPropagation()\n elif event.key ==\"Home\":\n anchor=sel.anchorNode\n sel.setBaseAndExtent(anchor,4,anchor,4)\n event.preventDefault()\n event.stopPropagation()\n elif event.key ==\"ArrowUp\":\n if self.current >0:\n last_child=self.zone.lastChild\n last_child.text=last_child.text[:4]+self.history[self.current -1]\n self.current -=1\n self.cursor_to_end()\n event.preventDefault()\n elif event.key ==\"ArrowDown\":\n if self.current \",\">\")\n frames_sel <=html.OPTION(name)\n frame=frame.f_back\n frames_sel.bind(\"change\",self.change_frame)\n frame_div=html.DIV(\"Frame \"+frames_sel)\n panel_style=window.getComputedStyle(self.dialog.panel)\n frame_div.style.paddingLeft=panel_style.paddingLeft\n frame_div.style.paddingTop=panel_style.paddingTop\n self.dialog.insertBefore(frame_div,self.dialog.panel)\n \n def change_frame(self,ev):\n self.globals,self.locals=self.frames[ev.target.selectedIndex]\n \n", ["browser", "browser.widgets.dialog", "builtins", "re", "sys", "tb"]], "io": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__author__=(\"Guido van Rossum , \"\n\"Mike Verdone , \"\n\"Mark Russell , \"\n\"Antoine Pitrou , \"\n\"Amaury Forgeot d'Arc , \"\n\"Benjamin Peterson \")\n\n__all__=[\"BlockingIOError\",\"open\",\"open_code\",\"IOBase\",\"RawIOBase\",\n\"FileIO\",\"BytesIO\",\"StringIO\",\"BufferedIOBase\",\n\"BufferedReader\",\"BufferedWriter\",\"BufferedRWPair\",\n\"BufferedRandom\",\"TextIOBase\",\"TextIOWrapper\",\n\"UnsupportedOperation\",\"SEEK_SET\",\"SEEK_CUR\",\"SEEK_END\"]\n\n\nimport _io\nimport abc\n\nfrom _io import (DEFAULT_BUFFER_SIZE,BlockingIOError,UnsupportedOperation,\nopen,open_code,FileIO,BytesIO,StringIO,BufferedReader,\nBufferedWriter,BufferedRWPair,BufferedRandom,\nIncrementalNewlineDecoder,text_encoding,TextIOWrapper)\n\n\n\nUnsupportedOperation.__module__=\"io\"\n\n\nSEEK_SET=0\nSEEK_CUR=1\nSEEK_END=2\n\n\n\n\nclass IOBase(_io._IOBase,metaclass=abc.ABCMeta):\n __doc__=_io._IOBase.__doc__\n \nclass RawIOBase(_io._RawIOBase,IOBase):\n __doc__=_io._RawIOBase.__doc__\n \nclass BufferedIOBase(_io._BufferedIOBase,IOBase):\n __doc__=_io._BufferedIOBase.__doc__\n \nclass TextIOBase(_io._TextIOBase,IOBase):\n __doc__=_io._TextIOBase.__doc__\n \nRawIOBase.register(FileIO)\n\nfor klass in (BytesIO,BufferedReader,BufferedWriter,BufferedRandom,\nBufferedRWPair):\n BufferedIOBase.register(klass)\n \nfor klass in (StringIO,TextIOWrapper):\n TextIOBase.register(klass)\ndel klass\n\ntry :\n from _io import _WindowsConsoleIO\nexcept ImportError:\n pass\nelse :\n RawIOBase.register(_WindowsConsoleIO)\n", ["_io", "abc"]], "ipaddress": [".py", "\n\n\n\"\"\"A fast, lightweight IPv4/IPv6 manipulation library in Python.\n\nThis library is used to create/poke/manipulate IPv4 and IPv6 addresses\nand networks.\n\n\"\"\"\n\n__version__='1.0'\n\n\nimport functools\n\nIPV4LENGTH=32\nIPV6LENGTH=128\n\n\nclass AddressValueError(ValueError):\n ''\n \n \nclass NetmaskValueError(ValueError):\n ''\n \n \ndef ip_address(address):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n return IPv4Address(address)\n except (AddressValueError,NetmaskValueError):\n pass\n \n try :\n return IPv6Address(address)\n except (AddressValueError,NetmaskValueError):\n pass\n \n raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')\n \n \ndef ip_network(address,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n return IPv4Network(address,strict)\n except (AddressValueError,NetmaskValueError):\n pass\n \n try :\n return IPv6Network(address,strict)\n except (AddressValueError,NetmaskValueError):\n pass\n \n raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 network')\n \n \ndef ip_interface(address):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n return IPv4Interface(address)\n except (AddressValueError,NetmaskValueError):\n pass\n \n try :\n return IPv6Interface(address)\n except (AddressValueError,NetmaskValueError):\n pass\n \n raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 interface')\n \n \ndef v4_int_to_packed(address):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n return address.to_bytes(4)\n except OverflowError:\n raise ValueError(\"Address negative or too large for IPv4\")\n \n \ndef v6_int_to_packed(address):\n ''\n\n\n\n\n\n\n\n \n try :\n return address.to_bytes(16)\n except OverflowError:\n raise ValueError(\"Address negative or too large for IPv6\")\n \n \ndef _split_optional_netmask(address):\n ''\n addr=str(address).split('/')\n if len(addr)>2:\n raise AddressValueError(f\"Only one '/' permitted in {address!r}\")\n return addr\n \n \ndef _find_address_range(addresses):\n ''\n\n\n\n\n\n\n\n \n it=iter(addresses)\n first=last=next(it)\n for ip in it:\n if ip._ip !=last._ip+1:\n yield first,last\n first=ip\n last=ip\n yield first,last\n \n \ndef _count_righthand_zero_bits(number,bits):\n ''\n\n\n\n\n\n\n\n\n \n if number ==0:\n return bits\n return min(bits,(~number&(number -1)).bit_length())\n \n \ndef summarize_address_range(first,last):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if (not (isinstance(first,_BaseAddress)and\n isinstance(last,_BaseAddress))):\n raise TypeError('first and last must be IP addresses, not networks')\n if first.version !=last.version:\n raise TypeError(\"%s and %s are not of the same version\"%(\n first,last))\n if first >last:\n raise ValueError('last IP address must be greater than first')\n \n if first.version ==4:\n ip=IPv4Network\n elif first.version ==6:\n ip=IPv6Network\n else :\n raise ValueError('unknown IP version')\n \n ip_bits=first._max_prefixlen\n first_int=first._ip\n last_int=last._ip\n while first_int <=last_int:\n nbits=min(_count_righthand_zero_bits(first_int,ip_bits),\n (last_int -first_int+1).bit_length()-1)\n net=ip((first_int,ip_bits -nbits))\n yield net\n first_int +=1 <=net.broadcast_address:\n continue\n yield net\n last=net\n \n \ndef collapse_addresses(addresses):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n addrs=[]\n ips=[]\n nets=[]\n \n \n for ip in addresses:\n if isinstance(ip,_BaseAddress):\n if ips and ips[-1]._version !=ip._version:\n raise TypeError(\"%s and %s are not of the same version\"%(\n ip,ips[-1]))\n ips.append(ip)\n elif ip._prefixlen ==ip._max_prefixlen:\n if ips and ips[-1]._version !=ip._version:\n raise TypeError(\"%s and %s are not of the same version\"%(\n ip,ips[-1]))\n try :\n ips.append(ip.ip)\n except AttributeError:\n ips.append(ip.network_address)\n else :\n if nets and nets[-1]._version !=ip._version:\n raise TypeError(\"%s and %s are not of the same version\"%(\n ip,nets[-1]))\n nets.append(ip)\n \n \n ips=sorted(set(ips))\n \n \n if ips:\n for first,last in _find_address_range(ips):\n addrs.extend(summarize_address_range(first,last))\n \n return _collapse_addresses_internal(addrs+nets)\n \n \ndef get_mixed_type_key(obj):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if isinstance(obj,_BaseNetwork):\n return obj._get_networks_key()\n elif isinstance(obj,_BaseAddress):\n return obj._get_address_key()\n return NotImplemented\n \n \nclass _IPAddressBase:\n\n ''\n \n __slots__=()\n \n @property\n def exploded(self):\n ''\n return self._explode_shorthand_ip_string()\n \n @property\n def compressed(self):\n ''\n return str(self)\n \n @property\n def reverse_pointer(self):\n ''\n\n\n\n\n\n \n return self._reverse_pointer()\n \n @property\n def version(self):\n msg='%200s has no version specified'%(type(self),)\n raise NotImplementedError(msg)\n \n def _check_int_address(self,address):\n if address <0:\n msg=\"%d (< 0) is not permitted as an IPv%d address\"\n raise AddressValueError(msg %(address,self._version))\n if address >self._ALL_ONES:\n msg=\"%d (>= 2**%d) is not permitted as an IPv%d address\"\n raise AddressValueError(msg %(address,self._max_prefixlen,\n self._version))\n \n def _check_packed_address(self,address,expected_len):\n address_len=len(address)\n if address_len !=expected_len:\n msg=\"%r (len %d != %d) is not permitted as an IPv%d address\"\n raise AddressValueError(msg %(address,address_len,\n expected_len,self._version))\n \n @classmethod\n def _ip_int_from_prefix(cls,prefixlen):\n ''\n\n\n\n\n\n\n\n \n return cls._ALL_ONES ^(cls._ALL_ONES >>prefixlen)\n \n @classmethod\n def _prefix_from_ip_int(cls,ip_int):\n ''\n\n\n\n\n\n\n\n\n\n \n trailing_zeroes=_count_righthand_zero_bits(ip_int,\n cls._max_prefixlen)\n prefixlen=cls._max_prefixlen -trailing_zeroes\n leading_ones=ip_int >>trailing_zeroes\n all_ones=(1 <1:\n return address\n return address[0],cls._max_prefixlen\n \n def __reduce__(self):\n return self.__class__,(str(self),)\n \n \n_address_fmt_re=None\n\n@functools.total_ordering\nclass _BaseAddress(_IPAddressBase):\n\n ''\n\n\n\n \n \n __slots__=()\n \n def __int__(self):\n return self._ip\n \n def __eq__(self,other):\n try :\n return (self._ip ==other._ip\n and self._version ==other._version)\n except AttributeError:\n return NotImplemented\n \n def __lt__(self,other):\n if not isinstance(other,_BaseAddress):\n return NotImplemented\n if self._version !=other._version:\n raise TypeError('%s and %s are not of the same version'%(\n self,other))\n if self._ip !=other._ip:\n return self._ip =0:\n if network+n >broadcast:\n raise IndexError('address out of range')\n return self._address_class(network+n)\n else :\n n +=1\n if broadcast+n other.network_address:\n return 1\n \n if self.netmask other.netmask:\n return 1\n return 0\n \n def _get_networks_key(self):\n ''\n\n\n\n\n\n \n return (self._version,self.network_address,self.netmask)\n \n def subnets(self,prefixlen_diff=1,new_prefix=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if self._prefixlen ==self._max_prefixlen:\n yield self\n return\n \n if new_prefix is not None :\n if new_prefix 0')\n new_prefixlen=self._prefixlen+prefixlen_diff\n \n if new_prefixlen >self._max_prefixlen:\n raise ValueError(\n 'prefix length diff %d is invalid for netblock %s'%(\n new_prefixlen,self))\n \n start=int(self.network_address)\n end=int(self.broadcast_address)+1\n step=(int(self.hostmask)+1)>>prefixlen_diff\n for new_addr in range(start,end,step):\n current=self.__class__((new_addr,new_prefixlen))\n yield current\n \n def supernet(self,prefixlen_diff=1,new_prefix=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if self._prefixlen ==0:\n return self\n \n if new_prefix is not None :\n if new_prefix >self._prefixlen:\n raise ValueError('new prefix must be shorter')\n if prefixlen_diff !=1:\n raise ValueError('cannot set prefixlen_diff and new_prefix')\n prefixlen_diff=self._prefixlen -new_prefix\n \n new_prefixlen=self.prefixlen -prefixlen_diff\n if new_prefixlen <0:\n raise ValueError(\n 'current prefixlen is %d, cannot have a prefixlen_diff of %d'%\n (self.prefixlen,prefixlen_diff))\n return self.__class__((\n int(self.network_address)&(int(self.netmask)<=a.broadcast_address)\n except AttributeError:\n raise TypeError(f\"Unable to test subnet containment \"\n f\"between {a} and {b}\")\n \n def subnet_of(self,other):\n ''\n return self._is_subnet_of(self,other)\n \n def supernet_of(self,other):\n ''\n return self._is_subnet_of(other,self)\n \n @property\n def is_reserved(self):\n ''\n\n\n\n\n\n \n return (self.network_address.is_reserved and\n self.broadcast_address.is_reserved)\n \n @property\n def is_link_local(self):\n ''\n\n\n\n\n \n return (self.network_address.is_link_local and\n self.broadcast_address.is_link_local)\n \n @property\n def is_private(self):\n ''\n\n\n\n\n\n \n return (self.network_address.is_private and\n self.broadcast_address.is_private)\n \n @property\n def is_global(self):\n ''\n\n\n\n\n\n \n return not self.is_private\n \n @property\n def is_unspecified(self):\n ''\n\n\n\n\n\n \n return (self.network_address.is_unspecified and\n self.broadcast_address.is_unspecified)\n \n @property\n def is_loopback(self):\n ''\n\n\n\n\n\n \n return (self.network_address.is_loopback and\n self.broadcast_address.is_loopback)\n \nclass _BaseV4:\n\n ''\n\n\n\n\n \n \n __slots__=()\n _version=4\n \n _ALL_ONES=(2 **IPV4LENGTH)-1\n \n _max_prefixlen=IPV4LENGTH\n \n \n _netmask_cache={}\n \n def _explode_shorthand_ip_string(self):\n return str(self)\n \n @classmethod\n def _make_netmask(cls,arg):\n ''\n\n\n\n\n\n \n if arg not in cls._netmask_cache:\n if isinstance(arg,int):\n prefixlen=arg\n if not (0 <=prefixlen <=cls._max_prefixlen):\n cls._report_invalid_netmask(prefixlen)\n else :\n try :\n \n prefixlen=cls._prefix_from_prefix_string(arg)\n except NetmaskValueError:\n \n \n prefixlen=cls._prefix_from_ip_string(arg)\n netmask=IPv4Address(cls._ip_int_from_prefix(prefixlen))\n cls._netmask_cache[arg]=netmask,prefixlen\n return cls._netmask_cache[arg]\n \n @classmethod\n def _ip_int_from_string(cls,ip_str):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if not ip_str:\n raise AddressValueError('Address cannot be empty')\n \n octets=ip_str.split('.')\n if len(octets)!=4:\n raise AddressValueError(\"Expected 4 octets in %r\"%ip_str)\n \n try :\n return int.from_bytes(map(cls._parse_octet,octets),'big')\n except ValueError as exc:\n raise AddressValueError(\"%s in %r\"%(exc,ip_str))from None\n \n @classmethod\n def _parse_octet(cls,octet_str):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if not octet_str:\n raise ValueError(\"Empty octet not permitted\")\n \n if not (octet_str.isascii()and octet_str.isdigit()):\n msg=\"Only decimal digits permitted in %r\"\n raise ValueError(msg %octet_str)\n \n \n if len(octet_str)>3:\n msg=\"At most 3 characters permitted in %r\"\n raise ValueError(msg %octet_str)\n \n \n if octet_str !='0'and octet_str[0]=='0':\n msg=\"Leading zeros are not permitted in %r\"\n raise ValueError(msg %octet_str)\n \n octet_int=int(octet_str,10)\n if octet_int >255:\n raise ValueError(\"Octet %d (> 255) not permitted\"%octet_int)\n return octet_int\n \n @classmethod\n def _string_from_ip_int(cls,ip_int):\n ''\n\n\n\n\n\n\n\n \n return '.'.join(map(str,ip_int.to_bytes(4,'big')))\n \n def _reverse_pointer(self):\n ''\n\n\n\n \n reverse_octets=str(self).split('.')[::-1]\n return '.'.join(reverse_octets)+'.in-addr.arpa'\n \n @property\n def max_prefixlen(self):\n return self._max_prefixlen\n \n @property\n def version(self):\n return self._version\n \n \nclass IPv4Address(_BaseV4,_BaseAddress):\n\n ''\n \n __slots__=('_ip','__weakref__')\n \n def __init__(self,address):\n \n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if isinstance(address,int):\n self._check_int_address(address)\n self._ip=address\n return\n \n \n if isinstance(address,bytes):\n self._check_packed_address(address,4)\n self._ip=int.from_bytes(address)\n return\n \n \n \n addr_str=str(address)\n if '/'in addr_str:\n raise AddressValueError(f\"Unexpected '/' in {address!r}\")\n self._ip=self._ip_int_from_string(addr_str)\n \n @property\n def packed(self):\n ''\n return v4_int_to_packed(self._ip)\n \n @property\n def is_reserved(self):\n ''\n\n\n\n\n\n \n return self in self._constants._reserved_network\n \n @property\n @functools.lru_cache()\n def is_private(self):\n ''\n\n\n\n\n\n \n return any(self in net for net in self._constants._private_networks)\n \n @property\n @functools.lru_cache()\n def is_global(self):\n return self not in self._constants._public_network and not self.is_private\n \n @property\n def is_multicast(self):\n ''\n\n\n\n\n\n \n return self in self._constants._multicast_network\n \n @property\n def is_unspecified(self):\n ''\n\n\n\n\n\n \n return self ==self._constants._unspecified_address\n \n @property\n def is_loopback(self):\n ''\n\n\n\n\n \n return self in self._constants._loopback_network\n \n @property\n def is_link_local(self):\n ''\n\n\n\n\n \n return self in self._constants._linklocal_network\n \n \nclass IPv4Interface(IPv4Address):\n\n def __init__(self,address):\n addr,mask=self._split_addr_prefix(address)\n \n IPv4Address.__init__(self,addr)\n self.network=IPv4Network((addr,mask),strict=False )\n self.netmask=self.network.netmask\n self._prefixlen=self.network._prefixlen\n \n @functools.cached_property\n def hostmask(self):\n return self.network.hostmask\n \n def __str__(self):\n return '%s/%d'%(self._string_from_ip_int(self._ip),\n self._prefixlen)\n \n def __eq__(self,other):\n address_equal=IPv4Address.__eq__(self,other)\n if address_equal is NotImplemented or not address_equal:\n return address_equal\n try :\n return self.network ==other.network\n except AttributeError:\n \n \n \n return False\n \n def __lt__(self,other):\n address_less=IPv4Address.__lt__(self,other)\n if address_less is NotImplemented:\n return NotImplemented\n try :\n return (self.network >16)&0xFFFF))\n parts.append('%x'%(ipv4_int&0xFFFF))\n \n \n \n \n _max_parts=cls._HEXTET_COUNT+1\n if len(parts)>_max_parts:\n msg=\"At most %d colons permitted in %r\"%(_max_parts -1,ip_str)\n raise AddressValueError(msg)\n \n \n \n skip_index=None\n for i in range(1,len(parts)-1):\n if not parts[i]:\n if skip_index is not None :\n \n msg=\"At most one '::' permitted in %r\"%ip_str\n raise AddressValueError(msg)\n skip_index=i\n \n \n \n if skip_index is not None :\n \n parts_hi=skip_index\n parts_lo=len(parts)-skip_index -1\n if not parts[0]:\n parts_hi -=1\n if parts_hi:\n msg=\"Leading ':' only permitted as part of '::' in %r\"\n raise AddressValueError(msg %ip_str)\n if not parts[-1]:\n parts_lo -=1\n if parts_lo:\n msg=\"Trailing ':' only permitted as part of '::' in %r\"\n raise AddressValueError(msg %ip_str)\n parts_skipped=cls._HEXTET_COUNT -(parts_hi+parts_lo)\n if parts_skipped <1:\n msg=\"Expected at most %d other parts with '::' in %r\"\n raise AddressValueError(msg %(cls._HEXTET_COUNT -1,ip_str))\n else :\n \n \n \n if len(parts)!=cls._HEXTET_COUNT:\n msg=\"Exactly %d parts expected without '::' in %r\"\n raise AddressValueError(msg %(cls._HEXTET_COUNT,ip_str))\n if not parts[0]:\n msg=\"Leading ':' only permitted as part of '::' in %r\"\n raise AddressValueError(msg %ip_str)\n if not parts[-1]:\n msg=\"Trailing ':' only permitted as part of '::' in %r\"\n raise AddressValueError(msg %ip_str)\n parts_hi=len(parts)\n parts_lo=0\n parts_skipped=0\n \n try :\n \n ip_int=0\n for i in range(parts_hi):\n ip_int <<=16\n ip_int |=cls._parse_hextet(parts[i])\n ip_int <<=16 *parts_skipped\n for i in range(-parts_lo,0):\n ip_int <<=16\n ip_int |=cls._parse_hextet(parts[i])\n return ip_int\n except ValueError as exc:\n raise AddressValueError(\"%s in %r\"%(exc,ip_str))from None\n \n @classmethod\n def _parse_hextet(cls,hextet_str):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n \n if not cls._HEX_DIGITS.issuperset(hextet_str):\n raise ValueError(\"Only hex digits permitted in %r\"%hextet_str)\n \n \n if len(hextet_str)>4:\n msg=\"At most 4 characters permitted in %r\"\n raise ValueError(msg %hextet_str)\n \n return int(hextet_str,16)\n \n @classmethod\n def _compress_hextets(cls,hextets):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n best_doublecolon_start=-1\n best_doublecolon_len=0\n doublecolon_start=-1\n doublecolon_len=0\n for index,hextet in enumerate(hextets):\n if hextet =='0':\n doublecolon_len +=1\n if doublecolon_start ==-1:\n \n doublecolon_start=index\n if doublecolon_len >best_doublecolon_len:\n \n best_doublecolon_len=doublecolon_len\n best_doublecolon_start=doublecolon_start\n else :\n doublecolon_len=0\n doublecolon_start=-1\n \n if best_doublecolon_len >1:\n best_doublecolon_end=(best_doublecolon_start+\n best_doublecolon_len)\n \n if best_doublecolon_end ==len(hextets):\n hextets +=['']\n hextets[best_doublecolon_start:best_doublecolon_end]=['']\n \n if best_doublecolon_start ==0:\n hextets=['']+hextets\n \n return hextets\n \n @classmethod\n def _string_from_ip_int(cls,ip_int=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if ip_int is None :\n ip_int=int(cls._ip)\n \n if ip_int >cls._ALL_ONES:\n raise ValueError('IPv6 address is too large')\n \n hex_str='%032x'%ip_int\n hextets=['%x'%int(hex_str[x:x+4],16)for x in range(0,32,4)]\n \n hextets=cls._compress_hextets(hextets)\n return ':'.join(hextets)\n \n def _explode_shorthand_ip_string(self):\n ''\n\n\n\n\n\n\n\n \n if isinstance(self,IPv6Network):\n ip_str=str(self.network_address)\n elif isinstance(self,IPv6Interface):\n ip_str=str(self.ip)\n else :\n ip_str=str(self)\n \n ip_int=self._ip_int_from_string(ip_str)\n hex_str='%032x'%ip_int\n parts=[hex_str[x:x+4]for x in range(0,32,4)]\n if isinstance(self,(_BaseNetwork,IPv6Interface)):\n return '%s/%d'%(':'.join(parts),self._prefixlen)\n return ':'.join(parts)\n \n def _reverse_pointer(self):\n ''\n\n\n\n \n reverse_chars=self.exploded[::-1].replace(':','')\n return '.'.join(reverse_chars)+'.ip6.arpa'\n \n @staticmethod\n def _split_scope_id(ip_str):\n ''\n\n\n\n\n\n\n\n\n\n \n addr,sep,scope_id=ip_str.partition('%')\n if not sep:\n scope_id=None\n elif not scope_id or '%'in scope_id:\n raise AddressValueError('Invalid IPv6 address: \"%r\"'%ip_str)\n return addr,scope_id\n \n @property\n def max_prefixlen(self):\n return self._max_prefixlen\n \n @property\n def version(self):\n return self._version\n \n \nclass IPv6Address(_BaseV6,_BaseAddress):\n\n ''\n \n __slots__=('_ip','_scope_id','__weakref__')\n \n def __init__(self,address):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if isinstance(address,int):\n self._check_int_address(address)\n self._ip=address\n self._scope_id=None\n return\n \n \n if isinstance(address,bytes):\n self._check_packed_address(address,16)\n self._ip=int.from_bytes(address,'big')\n self._scope_id=None\n return\n \n \n \n addr_str=str(address)\n if '/'in addr_str:\n raise AddressValueError(f\"Unexpected '/' in {address!r}\")\n addr_str,self._scope_id=self._split_scope_id(addr_str)\n \n self._ip=self._ip_int_from_string(addr_str)\n \n def __str__(self):\n ip_str=super().__str__()\n return ip_str+'%'+self._scope_id if self._scope_id else ip_str\n \n def __hash__(self):\n return hash((self._ip,self._scope_id))\n \n def __eq__(self,other):\n address_equal=super().__eq__(other)\n if address_equal is NotImplemented:\n return NotImplemented\n if not address_equal:\n return False\n return self._scope_id ==getattr(other,'_scope_id',None )\n \n @property\n def scope_id(self):\n ''\n\n\n\n\n\n\n \n return self._scope_id\n \n @property\n def packed(self):\n ''\n return v6_int_to_packed(self._ip)\n \n @property\n def is_multicast(self):\n ''\n\n\n\n\n\n \n return self in self._constants._multicast_network\n \n @property\n def is_reserved(self):\n ''\n\n\n\n\n\n \n return any(self in x for x in self._constants._reserved_networks)\n \n @property\n def is_link_local(self):\n ''\n\n\n\n\n \n return self in self._constants._linklocal_network\n \n @property\n def is_site_local(self):\n ''\n\n\n\n\n\n\n\n\n \n return self in self._constants._sitelocal_network\n \n @property\n @functools.lru_cache()\n def is_private(self):\n ''\n\n\n\n\n\n\n \n ipv4_mapped=self.ipv4_mapped\n if ipv4_mapped is not None :\n return ipv4_mapped.is_private\n return any(self in net for net in self._constants._private_networks)\n \n @property\n def is_global(self):\n ''\n\n\n\n\n\n \n return not self.is_private\n \n @property\n def is_unspecified(self):\n ''\n\n\n\n\n\n \n return self._ip ==0\n \n @property\n def is_loopback(self):\n ''\n\n\n\n\n\n \n return self._ip ==1\n \n @property\n def ipv4_mapped(self):\n ''\n\n\n\n\n\n \n if (self._ip >>32)!=0xFFFF:\n return None\n return IPv4Address(self._ip&0xFFFFFFFF)\n \n @property\n def teredo(self):\n ''\n\n\n\n\n\n\n \n if (self._ip >>96)!=0x20010000:\n return None\n return (IPv4Address((self._ip >>64)&0xFFFFFFFF),\n IPv4Address(~self._ip&0xFFFFFFFF))\n \n @property\n def sixtofour(self):\n ''\n\n\n\n\n\n \n if (self._ip >>112)!=0x2002:\n return None\n return IPv4Address((self._ip >>80)&0xFFFFFFFF)\n \n \nclass IPv6Interface(IPv6Address):\n\n def __init__(self,address):\n addr,mask=self._split_addr_prefix(address)\n \n IPv6Address.__init__(self,addr)\n self.network=IPv6Network((addr,mask),strict=False )\n self.netmask=self.network.netmask\n self._prefixlen=self.network._prefixlen\n \n @functools.cached_property\n def hostmask(self):\n return self.network.hostmask\n \n def __str__(self):\n return '%s/%d'%(super().__str__(),\n self._prefixlen)\n \n def __eq__(self,other):\n address_equal=IPv6Address.__eq__(self,other)\n if address_equal is NotImplemented or not address_equal:\n return address_equal\n try :\n return self.network ==other.network\n except AttributeError:\n \n \n \n return False\n \n def __lt__(self,other):\n address_less=IPv6Address.__lt__(self,other)\n if address_less is NotImplemented:\n return address_less\n try :\n return (self.network self.n:\n raise StopIteration\n if not self.zero:\n self.zero=True\n return tuple(self.pool[i]for i in self.indices)\n else :\n try :\n for i in reversed(range(self.r)):\n if self.indices[i]!=i+self.n -self.r:\n break\n self.indices[i]+=1\n for j in range(i+1,self.r):\n self.indices[j]=self.indices[j -1]+1\n return tuple(self.pool[i]for i in self.indices)\n except :\n raise StopIteration\n \nclass combinations_with_replacement:\n def __init__(self,iterable,r):\n self.pool=tuple(iterable)\n self.n=len(self.pool)\n self.r=r\n self.indices=[0]*self.r\n self.zero=False\n \n def __iter__(self):\n return self\n \n def __next__(self):\n if not self.n and self.r:\n raise StopIteration\n if not self.zero:\n self.zero=True\n return tuple(self.pool[i]for i in self.indices)\n else :\n try :\n for i in reversed(range(self.r)):\n if self.indices[i]!=self.n -1:\n break\n self.indices[i:]=[self.indices[i]+1]*(self.r -i)\n return tuple(self.pool[i]for i in self.indices)\n except :\n raise StopIteration\n \n \n \nclass compress:\n def __init__(self,data,selectors):\n self.data=iter(data)\n self.selectors=iter(selectors)\n \n def __iter__(self):\n return self\n \n def __next__(self):\n while True :\n next_item=next(self.data)\n next_selector=next(self.selectors)\n if bool(next_selector):\n return next_item\n \n \n \n \nclass count:\n ''\n\n\n\n \n def __init__(self,start=0,step=1):\n if not isinstance(start,(int,float)):\n raise TypeError('a number is required')\n self.times=start -step\n self.step=step\n \n def __iter__(self):\n return self\n \n def __next__(self):\n self.times +=self.step\n return self.times\n \n def __repr__(self):\n return 'count(%d)'%(self.times+self.step)\n \n \n \nclass cycle:\n def __init__(self,iterable):\n self._cur_iter=iter(iterable)\n self._saved=[]\n self._must_save=True\n \n def __iter__(self):\n return self\n \n def __next__(self):\n try :\n next_elt=next(self._cur_iter)\n if self._must_save:\n self._saved.append(next_elt)\n except StopIteration:\n self._cur_iter=iter(self._saved)\n next_elt=next(self._cur_iter)\n self._must_save=False\n return next_elt\n \n \n \nclass dropwhile:\n def __init__(self,predicate,iterable):\n self._predicate=predicate\n self._iter=iter(iterable)\n self._dropped=False\n \n def __iter__(self):\n return self\n \n def __next__(self):\n value=next(self._iter)\n if self._dropped:\n return value\n while self._predicate(value):\n value=next(self._iter)\n self._dropped=True\n return value\n \n \n \nclass filterfalse:\n def __init__(self,predicate,iterable):\n \n self._iter=iter(iterable)\n if predicate is None :\n self._predicate=bool\n else :\n self._predicate=predicate\n \n def __iter__(self):\n return self\n def __next__(self):\n next_elt=next(self._iter)\n while True :\n if not self._predicate(next_elt):\n return next_elt\n next_elt=next(self._iter)\n \nclass groupby:\n\n\n def __init__(self,iterable,key=None ):\n if key is None :\n key=lambda x:x\n self.keyfunc=key\n self.it=iter(iterable)\n self.tgtkey=self.currkey=self.currvalue=object()\n def __iter__(self):\n return self\n def __next__(self):\n while self.currkey ==self.tgtkey:\n self.currvalue=next(self.it)\n self.currkey=self.keyfunc(self.currvalue)\n self.tgtkey=self.currkey\n return (self.currkey,self._grouper(self.tgtkey))\n def _grouper(self,tgtkey):\n while self.currkey ==tgtkey:\n yield self.currvalue\n self.currvalue=next(self.it)\n self.currkey=self.keyfunc(self.currvalue)\n \n \n \nclass islice:\n def __init__(self,iterable,*args):\n s=slice(*args)\n self.start,self.stop,self.step=s.start or 0,s.stop,s.step\n if not isinstance(self.start,int):\n raise ValueError(\"Start argument must be an integer\")\n if self.stop !=None and not isinstance(self.stop,int):\n raise ValueError(\"Stop argument must be an integer or None\")\n if self.step is None :\n self.step=1\n if self.start <0 or (self.stop !=None and self.stop <0\n )or self.step <=0:\n raise ValueError(\"indices for islice() must be positive\")\n self.it=iter(iterable)\n self.donext=None\n self.cnt=0\n \n def __iter__(self):\n return self\n \n def __next__(self):\n nextindex=self.start\n if self.stop !=None and nextindex >=self.stop:\n raise StopIteration\n while self.cnt <=nextindex:\n nextitem=next(self.it)\n self.cnt +=1\n self.start +=self.step\n return nextitem\n \nclass permutations:\n def __init__(self,iterable,r=None ):\n self.pool=tuple(iterable)\n self.n=len(self.pool)\n self.r=self.n if r is None else r\n self.indices=list(range(self.n))\n self.cycles=list(range(self.n,self.n -self.r,-1))\n self.zero=False\n self.stop=False\n \n def __iter__(self):\n return self\n \n def __next__(self):\n indices=self.indices\n if self.r >self.n:\n raise StopIteration\n if not self.zero:\n self.zero=True\n return tuple(self.pool[i]for i in indices[:self.r])\n \n i=self.r -1\n while i >=0:\n j=self.cycles[i]-1\n if j >0:\n self.cycles[i]=j\n indices[i],indices[-j]=indices[-j],indices[i]\n return tuple(self.pool[i]for i in indices[:self.r])\n self.cycles[i]=len(indices)-i\n n1=len(indices)-1\n assert n1 >=0\n num=indices[i]\n for k in range(i,n1):\n indices[k]=indices[k+1]\n indices[n1]=num\n i -=1\n raise StopIteration\n \n \ndef product(*args,repeat=1):\n\n\n pools=[tuple(pool)for pool in args]*repeat\n result=[[]]\n for pool in pools:\n result=[x+[y]for x in result for y in pool]\n for prod in result:\n yield tuple(prod)\n \n \n \n \n \n \n \n \nclass _product:\n def __init__(self,*args,**kw):\n if len(kw)>1:\n raise TypeError(\"product() takes at most 1 argument (%d given)\"%\n len(kw))\n self.repeat=kw.get('repeat',1)\n if not isinstance(self.repeat,int):\n raise TypeError(\"integer argument expected, got %s\"%\n type(self.repeat))\n self.gears=[x for x in args]*self.repeat\n self.num_gears=len(self.gears)\n \n self.indicies=[(0,len(self.gears[x]))\n for x in range(0,self.num_gears)]\n self.cont=True\n self.zero=False\n \n def roll_gears(self):\n \n \n \n should_carry=True\n for n in range(0,self.num_gears):\n nth_gear=self.num_gears -n -1\n if should_carry:\n count,lim=self.indicies[nth_gear]\n count +=1\n if count ==lim and nth_gear ==0:\n self.cont=False\n if count ==lim:\n should_carry=True\n count=0\n else :\n should_carry=False\n self.indicies[nth_gear]=(count,lim)\n else :\n break\n \n def __iter__(self):\n return self\n \n def __next__(self):\n if self.zero:\n raise StopIteration\n if self.repeat >0:\n if not self.cont:\n raise StopIteration\n l=[]\n for x in range(0,self.num_gears):\n index,limit=self.indicies[x]\n print('itertools 353',self.gears,x,index)\n l.append(self.gears[x][index])\n self.roll_gears()\n return tuple(l)\n elif self.repeat ==0:\n self.zero=True\n return ()\n else :\n raise ValueError(\"repeat argument cannot be negative\")\n \n \n \nclass repeat:\n def __init__(self,obj,times=None ):\n self._obj=obj\n if times is not None :\n range(times)\n if times <0:\n times=0\n self._times=times\n \n def __iter__(self):\n return self\n \n def __next__(self):\n \n if self._times is not None :\n if self._times <=0:\n raise StopIteration()\n self._times -=1\n return self._obj\n \n def __repr__(self):\n if self._times is not None :\n return 'repeat(%r, %r)'%(self._obj,self._times)\n else :\n return 'repeat(%r)'%(self._obj,)\n \n def __len__(self):\n if self._times ==-1 or self._times is None :\n raise TypeError(\"len() of uniszed object\")\n return self._times\n \n \n \nclass starmap(object):\n def __init__(self,function,iterable):\n self._func=function\n self._iter=iter(iterable)\n \n def __iter__(self):\n return self\n \n def __next__(self):\n t=next(self._iter)\n return self._func(*t)\n \n \n \nclass takewhile(object):\n def __init__(self,predicate,iterable):\n self._predicate=predicate\n self._iter=iter(iterable)\n \n def __iter__(self):\n return self\n \n def __next__(self):\n value=next(self._iter)\n if not self._predicate(value):\n raise StopIteration()\n return value\n \n \n \nclass TeeData(object):\n def __init__(self,iterator):\n self.data=[]\n self._iter=iterator\n \n def __getitem__(self,i):\n \n while i >=len(self.data):\n self.data.append(next(self._iter))\n return self.data[i]\n \n \nclass TeeObject(object):\n def __init__(self,iterable=None ,tee_data=None ):\n if tee_data:\n self.tee_data=tee_data\n self.pos=0\n \n elif isinstance(iterable,TeeObject):\n self.tee_data=iterable.tee_data\n self.pos=iterable.pos\n else :\n self.tee_data=TeeData(iter(iterable))\n self.pos=0\n \n def __next__(self):\n data=self.tee_data[self.pos]\n self.pos +=1\n return data\n \n def __iter__(self):\n return self\n \n \ndef tee(iterable,n=2):\n if isinstance(iterable,TeeObject):\n return tuple([iterable]+\n [TeeObject(tee_data=iterable.tee_data)for i in range(n -1)])\n tee_data=TeeData(iter(iterable))\n return tuple([TeeObject(tee_data=tee_data)for i in range(n)])\n \nclass zip_longest:\n def __init__(self,*args,fillvalue=None ):\n self.args=[iter(arg)for arg in args]\n self.fillvalue=fillvalue\n self.units=len(args)\n \n def __iter__(self):\n return self\n \n def __next__(self):\n temp=[]\n nb=0\n for i in range(self.units):\n try :\n temp.append(next(self.args[i]))\n nb +=1\n except StopIteration:\n temp.append(self.fillvalue)\n if nb ==0:\n raise StopIteration\n return tuple(temp)\n", ["operator"]], "keyword": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=[\"iskeyword\",\"issoftkeyword\",\"kwlist\",\"softkwlist\"]\n\nkwlist=[\n'False',\n'None',\n'True',\n'and',\n'as',\n'assert',\n'async',\n'await',\n'break',\n'class',\n'continue',\n'def',\n'del',\n'elif',\n'else',\n'except',\n'finally',\n'for',\n'from',\n'global',\n'if',\n'import',\n'in',\n'is',\n'lambda',\n'nonlocal',\n'not',\n'or',\n'pass',\n'raise',\n'return',\n'try',\n'while',\n'with',\n'yield'\n]\n\nsoftkwlist=[\n'_',\n'case',\n'match',\n'type'\n]\n\niskeyword=frozenset(kwlist).__contains__\nissoftkeyword=frozenset(softkwlist).__contains__\n", []], "linecache": [".py", "''\n\n\n\n\n\n\nimport functools\nimport sys\nimport os\nimport tokenize\n\n__all__=[\"getline\",\"clearcache\",\"checkcache\",\"lazycache\"]\n\n\n\n\ncache={}\n\n\ndef clearcache():\n ''\n cache.clear()\n \n \ndef getline(filename,lineno,module_globals=None ):\n ''\n \n \n lines=getlines(filename,module_globals)\n if 1 <=lineno <=len(lines):\n return lines[lineno -1]\n return ''\n \n \ndef getlines(filename,module_globals=None ):\n ''\n \n \n if filename in cache:\n entry=cache[filename]\n if len(entry)!=1:\n return cache[filename][2]\n \n try :\n return updatecache(filename,module_globals)\n except MemoryError:\n clearcache()\n return []\n \n \ndef checkcache(filename=None ):\n ''\n \n \n if filename is None :\n filenames=list(cache.keys())\n elif filename in cache:\n filenames=[filename]\n else :\n return\n \n for filename in filenames:\n entry=cache[filename]\n if len(entry)==1:\n \n continue\n size,mtime,lines,fullname=entry\n if mtime is None :\n continue\n try :\n stat=os.stat(fullname)\n except OSError:\n cache.pop(filename,None )\n continue\n if size !=stat.st_size or mtime !=stat.st_mtime:\n cache.pop(filename,None )\n \n \ndef updatecache(filename,module_globals=None ):\n ''\n\n \n \n if filename in cache:\n if len(cache[filename])!=1:\n cache.pop(filename,None )\n if not filename or (filename.startswith('<')and filename.endswith('>')):\n return []\n \n fullname=filename\n try :\n stat=os.stat(fullname)\n except OSError:\n basename=filename\n \n \n \n if lazycache(filename,module_globals):\n try :\n data=cache[filename][0]()\n except (ImportError,OSError):\n pass\n else :\n if data is None :\n \n \n return []\n cache[filename]=(\n len(data),\n None ,\n [line+'\\n'for line in data.splitlines()],\n fullname\n )\n return cache[filename][2]\n \n \n \n if os.path.isabs(filename):\n return []\n \n for dirname in sys.path:\n try :\n fullname=os.path.join(dirname,basename)\n except (TypeError,AttributeError):\n \n continue\n try :\n stat=os.stat(fullname)\n break\n except OSError:\n pass\n else :\n return []\n try :\n with tokenize.open(fullname)as fp:\n lines=fp.readlines()\n except (OSError,UnicodeDecodeError,SyntaxError):\n return []\n if lines and not lines[-1].endswith('\\n'):\n lines[-1]+='\\n'\n size,mtime=stat.st_size,stat.st_mtime\n cache[filename]=size,mtime,lines,fullname\n return lines\n \n \ndef lazycache(filename,module_globals):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if filename in cache:\n if len(cache[filename])==1:\n return True\n else :\n return False\n if not filename or (filename.startswith('<')and filename.endswith('>')):\n return False\n \n if module_globals and '__name__'in module_globals:\n name=module_globals['__name__']\n if (loader :=module_globals.get('__loader__'))is None :\n if spec :=module_globals.get('__spec__'):\n try :\n loader=spec.loader\n except AttributeError:\n pass\n get_source=getattr(loader,'get_source',None )\n \n if name and get_source:\n get_lines=functools.partial(get_source,name)\n cache[filename]=(get_lines,)\n return True\n return False\n", ["functools", "os", "sys", "tokenize"]], "locale": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\nimport sys\nimport encodings\nimport encodings.aliases\nimport re\nimport _collections_abc\nfrom builtins import str as _builtin_str\nimport functools\n\n\n\n\n\n\n\n__all__=[\"getlocale\",\"getdefaultlocale\",\"getpreferredencoding\",\"Error\",\n\"setlocale\",\"resetlocale\",\"localeconv\",\"strcoll\",\"strxfrm\",\n\"str\",\"atof\",\"atoi\",\"format_string\",\"currency\",\n\"normalize\",\"LC_CTYPE\",\"LC_COLLATE\",\"LC_TIME\",\"LC_MONETARY\",\n\"LC_NUMERIC\",\"LC_ALL\",\"CHAR_MAX\",\"getencoding\"]\n\ndef _strcoll(a,b):\n ''\n\n \n return (a >b)-(a .*?)\\))?'\nr'(?P[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]')\n\ndef _format(percent,value,grouping=False ,monetary=False ,*additional):\n if additional:\n formatted=percent %((value,)+additional)\n else :\n formatted=percent %value\n if percent[-1]in 'eEfFgGdiu':\n formatted=_localize(formatted,grouping,monetary)\n return formatted\n \n \ndef _localize(formatted,grouping=False ,monetary=False ):\n\n if '.'in formatted:\n seps=0\n parts=formatted.split('.')\n if grouping:\n parts[0],seps=_group(parts[0],monetary=monetary)\n decimal_point=localeconv()[monetary and 'mon_decimal_point'\n or 'decimal_point']\n formatted=decimal_point.join(parts)\n if seps:\n formatted=_strip_padding(formatted,seps)\n else :\n seps=0\n if grouping:\n formatted,seps=_group(formatted,monetary=monetary)\n if seps:\n formatted=_strip_padding(formatted,seps)\n return formatted\n \ndef format_string(f,val,grouping=False ,monetary=False ):\n ''\n\n\n\n\n \n percents=list(_percent_re.finditer(f))\n new_f=_percent_re.sub('%s',f)\n \n if isinstance(val,_collections_abc.Mapping):\n new_val=[]\n for perc in percents:\n if perc.group()[-1]=='%':\n new_val.append('%')\n else :\n new_val.append(_format(perc.group(),val,grouping,monetary))\n else :\n if not isinstance(val,tuple):\n val=(val,)\n new_val=[]\n i=0\n for perc in percents:\n if perc.group()[-1]=='%':\n new_val.append('%')\n else :\n starcount=perc.group('modifiers').count('*')\n new_val.append(_format(perc.group(),\n val[i],\n grouping,\n monetary,\n *val[i+1:i+1+starcount]))\n i +=(1+starcount)\n val=tuple(new_val)\n \n return new_f %val\n \ndef currency(val,symbol=True ,grouping=False ,international=False ):\n ''\n \n conv=localeconv()\n \n \n digits=conv[international and 'int_frac_digits'or 'frac_digits']\n if digits ==127:\n raise ValueError(\"Currency formatting is not possible using \"\n \"the 'C' locale.\")\n \n s=_localize(f'{abs(val):.{digits}f}',grouping,monetary=True )\n \n s='<'+s+'>'\n \n if symbol:\n smb=conv[international and 'int_curr_symbol'or 'currency_symbol']\n precedes=conv[val <0 and 'n_cs_precedes'or 'p_cs_precedes']\n separated=conv[val <0 and 'n_sep_by_space'or 'p_sep_by_space']\n \n if precedes:\n s=smb+(separated and ' 'or '')+s\n else :\n if international and smb[-1]==' ':\n smb=smb[:-1]\n s=s+(separated and ' 'or '')+smb\n \n sign_pos=conv[val <0 and 'n_sign_posn'or 'p_sign_posn']\n sign=conv[val <0 and 'negative_sign'or 'positive_sign']\n \n if sign_pos ==0:\n s='('+s+')'\n elif sign_pos ==1:\n s=sign+s\n elif sign_pos ==2:\n s=s+sign\n elif sign_pos ==3:\n s=s.replace('<',sign)\n elif sign_pos ==4:\n s=s.replace('>',sign)\n else :\n \n \n s=sign+s\n \n return s.replace('<','').replace('>','')\n \ndef str(val):\n ''\n return _format(\"%.12g\",val)\n \ndef delocalize(string):\n ''\n \n conv=localeconv()\n \n \n ts=conv['thousands_sep']\n if ts:\n string=string.replace(ts,'')\n \n \n dd=conv['decimal_point']\n if dd:\n string=string.replace(dd,'.')\n return string\n \ndef localize(string,grouping=False ,monetary=False ):\n ''\n return _localize(string,grouping,monetary)\n \ndef atof(string,func=float):\n ''\n return func(delocalize(string))\n \ndef atoi(string):\n ''\n return int(delocalize(string))\n \ndef _test():\n setlocale(LC_ALL,\"\")\n \n s1=format_string(\"%d\",123456789,1)\n print(s1,\"is\",atoi(s1))\n \n s1=str(3.14)\n print(s1,\"is\",atof(s1))\n \n \n \n \n \n \n \n \n_setlocale=setlocale\n\ndef _replace_encoding(code,encoding):\n if '.'in code:\n langname=code[:code.index('.')]\n else :\n langname=code\n \n norm_encoding=encodings.normalize_encoding(encoding)\n \n norm_encoding=encodings.aliases.aliases.get(norm_encoding.lower(),\n norm_encoding)\n \n encoding=norm_encoding\n norm_encoding=norm_encoding.lower()\n if norm_encoding in locale_encoding_alias:\n encoding=locale_encoding_alias[norm_encoding]\n else :\n norm_encoding=norm_encoding.replace('_','')\n norm_encoding=norm_encoding.replace('-','')\n if norm_encoding in locale_encoding_alias:\n encoding=locale_encoding_alias[norm_encoding]\n \n return langname+'.'+encoding\n \ndef _append_modifier(code,modifier):\n if modifier =='euro':\n if '.'not in code:\n return code+'.ISO8859-15'\n _,_,encoding=code.partition('.')\n if encoding in ('ISO8859-15','UTF-8'):\n return code\n if encoding =='ISO8859-1':\n return _replace_encoding(code,'ISO8859-15')\n return code+'@'+modifier\n \ndef normalize(localename):\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n code=localename.lower()\n if ':'in code:\n \n code=code.replace(':','.')\n if '@'in code:\n code,modifier=code.split('@',1)\n else :\n modifier=''\n if '.'in code:\n langname,encoding=code.split('.')[:2]\n else :\n langname=code\n encoding=''\n \n \n lang_enc=langname\n if encoding:\n norm_encoding=encoding.replace('-','')\n norm_encoding=norm_encoding.replace('_','')\n lang_enc +='.'+norm_encoding\n lookup_name=lang_enc\n if modifier:\n lookup_name +='@'+modifier\n code=locale_alias.get(lookup_name,None )\n if code is not None :\n return code\n \n \n if modifier:\n \n code=locale_alias.get(lang_enc,None )\n if code is not None :\n \n if '@'not in code:\n return _append_modifier(code,modifier)\n if code.split('@',1)[1].lower()==modifier:\n return code\n \n \n if encoding:\n \n lookup_name=langname\n if modifier:\n lookup_name +='@'+modifier\n code=locale_alias.get(lookup_name,None )\n if code is not None :\n \n if '@'not in code:\n return _replace_encoding(code,encoding)\n code,modifier=code.split('@',1)\n return _replace_encoding(code,encoding)+'@'+modifier\n \n if modifier:\n \n code=locale_alias.get(langname,None )\n if code is not None :\n \n if '@'not in code:\n code=_replace_encoding(code,encoding)\n return _append_modifier(code,modifier)\n code,defmod=code.split('@',1)\n if defmod.lower()==modifier:\n return _replace_encoding(code,encoding)+'@'+defmod\n \n return localename\n \ndef _parse_localename(localename):\n\n ''\n\n\n\n\n\n\n\n\n\n\n \n code=normalize(localename)\n if '@'in code:\n \n code,modifier=code.split('@',1)\n if modifier =='euro'and '.'not in code:\n \n \n \n return code,'iso-8859-15'\n \n if '.'in code:\n return tuple(code.split('.')[:2])\n elif code =='C':\n return None ,None\n elif code =='UTF-8':\n \n \n return None ,'UTF-8'\n raise ValueError('unknown locale: %s'%localename)\n \ndef _build_localename(localetuple):\n\n ''\n\n\n\n\n \n try :\n language,encoding=localetuple\n \n if language is None :\n language='C'\n if encoding is None :\n return language\n else :\n return language+'.'+encoding\n except (TypeError,ValueError):\n raise TypeError('Locale must be None, a string, or an iterable of '\n 'two strings -- language code, encoding.')from None\n \ndef getdefaultlocale(envvars=('LC_ALL','LC_CTYPE','LANG','LANGUAGE')):\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n import warnings\n warnings.warn(\n \"Use setlocale(), getencoding() and getlocale() instead\",\n DeprecationWarning,stacklevel=2\n )\n return _getdefaultlocale(envvars)\n \ndef _getdefaultlocale(envvars=('LC_ALL','LC_CTYPE','LANG','LANGUAGE')):\n try :\n \n import _locale\n code,encoding=_locale._getdefaultlocale()\n except (ImportError,AttributeError):\n pass\n else :\n \n if sys.platform ==\"win32\"and code and code[:2]==\"0x\":\n \n code=windows_locale.get(int(code,0))\n \n \n return code,encoding\n \n \n import os\n lookup=os.environ.get\n for variable in envvars:\n localename=lookup(variable,None )\n if localename:\n if variable =='LANGUAGE':\n localename=localename.split(':')[0]\n break\n else :\n localename='C'\n return _parse_localename(localename)\n \n \ndef getlocale(category=LC_CTYPE):\n\n ''\n\n\n\n\n\n\n\n\n\n \n localename=_setlocale(category)\n if category ==LC_ALL and ';'in localename:\n raise TypeError('category LC_ALL is not supported')\n return _parse_localename(localename)\n \ndef setlocale(category,locale=None ):\n\n ''\n\n\n\n\n\n\n\n\n \n if locale and not isinstance(locale,_builtin_str):\n \n locale=normalize(_build_localename(locale))\n return _setlocale(category,locale)\n \ndef resetlocale(category=LC_ALL):\n\n ''\n\n\n\n\n \n import warnings\n warnings.warn(\n 'Use locale.setlocale(locale.LC_ALL, \"\") instead',\n DeprecationWarning,stacklevel=2\n )\n \n with warnings.catch_warnings():\n warnings.simplefilter('ignore',category=DeprecationWarning)\n loc=getdefaultlocale()\n \n _setlocale(category,_build_localename(loc))\n \n \ntry :\n from _locale import getencoding\nexcept ImportError:\n def getencoding():\n if hasattr(sys,'getandroidapilevel'):\n \n \n return 'utf-8'\n encoding=_getdefaultlocale()[1]\n if encoding is None :\n \n encoding='utf-8'\n return encoding\n \ntry :\n CODESET\nexcept NameError:\n def getpreferredencoding(do_setlocale=True ):\n ''\n if sys.flags.warn_default_encoding:\n import warnings\n warnings.warn(\n \"UTF-8 Mode affects locale.getpreferredencoding(). Consider locale.getencoding() instead.\",\n EncodingWarning,2)\n if sys.flags.utf8_mode:\n return 'utf-8'\n return getencoding()\nelse :\n\n def getpreferredencoding(do_setlocale=True ):\n ''\n \n \n if sys.flags.warn_default_encoding:\n import warnings\n warnings.warn(\n \"UTF-8 Mode affects locale.getpreferredencoding(). Consider locale.getencoding() instead.\",\n EncodingWarning,2)\n if sys.flags.utf8_mode:\n return 'utf-8'\n \n if not do_setlocale:\n return getencoding()\n \n old_loc=setlocale(LC_CTYPE)\n try :\n try :\n setlocale(LC_CTYPE,\"\")\n except Error:\n pass\n return getencoding()\n finally :\n setlocale(LC_CTYPE,old_loc)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nlocale_encoding_alias={\n\n\n'437':'C',\n'c':'C',\n'en':'ISO8859-1',\n'jis':'JIS7',\n'jis7':'JIS7',\n'ajec':'eucJP',\n'koi8c':'KOI8-C',\n'microsoftcp1251':'CP1251',\n'microsoftcp1255':'CP1255',\n'microsoftcp1256':'CP1256',\n'88591':'ISO8859-1',\n'88592':'ISO8859-2',\n'88595':'ISO8859-5',\n'885915':'ISO8859-15',\n\n\n'ascii':'ISO8859-1',\n'latin_1':'ISO8859-1',\n'iso8859_1':'ISO8859-1',\n'iso8859_10':'ISO8859-10',\n'iso8859_11':'ISO8859-11',\n'iso8859_13':'ISO8859-13',\n'iso8859_14':'ISO8859-14',\n'iso8859_15':'ISO8859-15',\n'iso8859_16':'ISO8859-16',\n'iso8859_2':'ISO8859-2',\n'iso8859_3':'ISO8859-3',\n'iso8859_4':'ISO8859-4',\n'iso8859_5':'ISO8859-5',\n'iso8859_6':'ISO8859-6',\n'iso8859_7':'ISO8859-7',\n'iso8859_8':'ISO8859-8',\n'iso8859_9':'ISO8859-9',\n'iso2022_jp':'JIS7',\n'shift_jis':'SJIS',\n'tactis':'TACTIS',\n'euc_jp':'eucJP',\n'euc_kr':'eucKR',\n'utf_8':'UTF-8',\n'koi8_r':'KOI8-R',\n'koi8_t':'KOI8-T',\n'koi8_u':'KOI8-U',\n'kz1048':'RK1048',\n'cp1251':'CP1251',\n'cp1255':'CP1255',\n'cp1256':'CP1256',\n\n\n\n}\n\nfor k,v in sorted(locale_encoding_alias.items()):\n k=k.replace('_','')\n locale_encoding_alias.setdefault(k,v)\ndel k,v\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlocale_alias={\n'a3':'az_AZ.KOI8-C',\n'a3_az':'az_AZ.KOI8-C',\n'a3_az.koic':'az_AZ.KOI8-C',\n'aa_dj':'aa_DJ.ISO8859-1',\n'aa_er':'aa_ER.UTF-8',\n'aa_et':'aa_ET.UTF-8',\n'af':'af_ZA.ISO8859-1',\n'af_za':'af_ZA.ISO8859-1',\n'agr_pe':'agr_PE.UTF-8',\n'ak_gh':'ak_GH.UTF-8',\n'am':'am_ET.UTF-8',\n'am_et':'am_ET.UTF-8',\n'american':'en_US.ISO8859-1',\n'an_es':'an_ES.ISO8859-15',\n'anp_in':'anp_IN.UTF-8',\n'ar':'ar_AA.ISO8859-6',\n'ar_aa':'ar_AA.ISO8859-6',\n'ar_ae':'ar_AE.ISO8859-6',\n'ar_bh':'ar_BH.ISO8859-6',\n'ar_dz':'ar_DZ.ISO8859-6',\n'ar_eg':'ar_EG.ISO8859-6',\n'ar_in':'ar_IN.UTF-8',\n'ar_iq':'ar_IQ.ISO8859-6',\n'ar_jo':'ar_JO.ISO8859-6',\n'ar_kw':'ar_KW.ISO8859-6',\n'ar_lb':'ar_LB.ISO8859-6',\n'ar_ly':'ar_LY.ISO8859-6',\n'ar_ma':'ar_MA.ISO8859-6',\n'ar_om':'ar_OM.ISO8859-6',\n'ar_qa':'ar_QA.ISO8859-6',\n'ar_sa':'ar_SA.ISO8859-6',\n'ar_sd':'ar_SD.ISO8859-6',\n'ar_ss':'ar_SS.UTF-8',\n'ar_sy':'ar_SY.ISO8859-6',\n'ar_tn':'ar_TN.ISO8859-6',\n'ar_ye':'ar_YE.ISO8859-6',\n'arabic':'ar_AA.ISO8859-6',\n'as':'as_IN.UTF-8',\n'as_in':'as_IN.UTF-8',\n'ast_es':'ast_ES.ISO8859-15',\n'ayc_pe':'ayc_PE.UTF-8',\n'az':'az_AZ.ISO8859-9E',\n'az_az':'az_AZ.ISO8859-9E',\n'az_az.iso88599e':'az_AZ.ISO8859-9E',\n'az_ir':'az_IR.UTF-8',\n'be':'be_BY.CP1251',\n'be@latin':'be_BY.UTF-8@latin',\n'be_bg.utf8':'bg_BG.UTF-8',\n'be_by':'be_BY.CP1251',\n'be_by@latin':'be_BY.UTF-8@latin',\n'bem_zm':'bem_ZM.UTF-8',\n'ber_dz':'ber_DZ.UTF-8',\n'ber_ma':'ber_MA.UTF-8',\n'bg':'bg_BG.CP1251',\n'bg_bg':'bg_BG.CP1251',\n'bhb_in.utf8':'bhb_IN.UTF-8',\n'bho_in':'bho_IN.UTF-8',\n'bho_np':'bho_NP.UTF-8',\n'bi_vu':'bi_VU.UTF-8',\n'bn_bd':'bn_BD.UTF-8',\n'bn_in':'bn_IN.UTF-8',\n'bo_cn':'bo_CN.UTF-8',\n'bo_in':'bo_IN.UTF-8',\n'bokmal':'nb_NO.ISO8859-1',\n'bokm\\xe5l':'nb_NO.ISO8859-1',\n'br':'br_FR.ISO8859-1',\n'br_fr':'br_FR.ISO8859-1',\n'brx_in':'brx_IN.UTF-8',\n'bs':'bs_BA.ISO8859-2',\n'bs_ba':'bs_BA.ISO8859-2',\n'bulgarian':'bg_BG.CP1251',\n'byn_er':'byn_ER.UTF-8',\n'c':'C',\n'c-french':'fr_CA.ISO8859-1',\n'c.ascii':'C',\n'c.en':'C',\n'c.iso88591':'en_US.ISO8859-1',\n'c.utf8':'C.UTF-8',\n'c_c':'C',\n'c_c.c':'C',\n'ca':'ca_ES.ISO8859-1',\n'ca_ad':'ca_AD.ISO8859-1',\n'ca_es':'ca_ES.ISO8859-1',\n'ca_es@valencia':'ca_ES.UTF-8@valencia',\n'ca_fr':'ca_FR.ISO8859-1',\n'ca_it':'ca_IT.ISO8859-1',\n'catalan':'ca_ES.ISO8859-1',\n'ce_ru':'ce_RU.UTF-8',\n'cextend':'en_US.ISO8859-1',\n'chinese-s':'zh_CN.eucCN',\n'chinese-t':'zh_TW.eucTW',\n'chr_us':'chr_US.UTF-8',\n'ckb_iq':'ckb_IQ.UTF-8',\n'cmn_tw':'cmn_TW.UTF-8',\n'crh_ua':'crh_UA.UTF-8',\n'croatian':'hr_HR.ISO8859-2',\n'cs':'cs_CZ.ISO8859-2',\n'cs_cs':'cs_CZ.ISO8859-2',\n'cs_cz':'cs_CZ.ISO8859-2',\n'csb_pl':'csb_PL.UTF-8',\n'cv_ru':'cv_RU.UTF-8',\n'cy':'cy_GB.ISO8859-1',\n'cy_gb':'cy_GB.ISO8859-1',\n'cz':'cs_CZ.ISO8859-2',\n'cz_cz':'cs_CZ.ISO8859-2',\n'czech':'cs_CZ.ISO8859-2',\n'da':'da_DK.ISO8859-1',\n'da_dk':'da_DK.ISO8859-1',\n'danish':'da_DK.ISO8859-1',\n'dansk':'da_DK.ISO8859-1',\n'de':'de_DE.ISO8859-1',\n'de_at':'de_AT.ISO8859-1',\n'de_be':'de_BE.ISO8859-1',\n'de_ch':'de_CH.ISO8859-1',\n'de_de':'de_DE.ISO8859-1',\n'de_it':'de_IT.ISO8859-1',\n'de_li.utf8':'de_LI.UTF-8',\n'de_lu':'de_LU.ISO8859-1',\n'deutsch':'de_DE.ISO8859-1',\n'doi_in':'doi_IN.UTF-8',\n'dutch':'nl_NL.ISO8859-1',\n'dutch.iso88591':'nl_BE.ISO8859-1',\n'dv_mv':'dv_MV.UTF-8',\n'dz_bt':'dz_BT.UTF-8',\n'ee':'ee_EE.ISO8859-4',\n'ee_ee':'ee_EE.ISO8859-4',\n'eesti':'et_EE.ISO8859-1',\n'el':'el_GR.ISO8859-7',\n'el_cy':'el_CY.ISO8859-7',\n'el_gr':'el_GR.ISO8859-7',\n'el_gr@euro':'el_GR.ISO8859-15',\n'en':'en_US.ISO8859-1',\n'en_ag':'en_AG.UTF-8',\n'en_au':'en_AU.ISO8859-1',\n'en_be':'en_BE.ISO8859-1',\n'en_bw':'en_BW.ISO8859-1',\n'en_ca':'en_CA.ISO8859-1',\n'en_dk':'en_DK.ISO8859-1',\n'en_dl.utf8':'en_DL.UTF-8',\n'en_gb':'en_GB.ISO8859-1',\n'en_hk':'en_HK.ISO8859-1',\n'en_ie':'en_IE.ISO8859-1',\n'en_il':'en_IL.UTF-8',\n'en_in':'en_IN.ISO8859-1',\n'en_ng':'en_NG.UTF-8',\n'en_nz':'en_NZ.ISO8859-1',\n'en_ph':'en_PH.ISO8859-1',\n'en_sc.utf8':'en_SC.UTF-8',\n'en_sg':'en_SG.ISO8859-1',\n'en_uk':'en_GB.ISO8859-1',\n'en_us':'en_US.ISO8859-1',\n'en_us@euro@euro':'en_US.ISO8859-15',\n'en_za':'en_ZA.ISO8859-1',\n'en_zm':'en_ZM.UTF-8',\n'en_zw':'en_ZW.ISO8859-1',\n'en_zw.utf8':'en_ZS.UTF-8',\n'eng_gb':'en_GB.ISO8859-1',\n'english':'en_EN.ISO8859-1',\n'english.iso88591':'en_US.ISO8859-1',\n'english_uk':'en_GB.ISO8859-1',\n'english_united-states':'en_US.ISO8859-1',\n'english_united-states.437':'C',\n'english_us':'en_US.ISO8859-1',\n'eo':'eo_XX.ISO8859-3',\n'eo.utf8':'eo.UTF-8',\n'eo_eo':'eo_EO.ISO8859-3',\n'eo_us.utf8':'eo_US.UTF-8',\n'eo_xx':'eo_XX.ISO8859-3',\n'es':'es_ES.ISO8859-1',\n'es_ar':'es_AR.ISO8859-1',\n'es_bo':'es_BO.ISO8859-1',\n'es_cl':'es_CL.ISO8859-1',\n'es_co':'es_CO.ISO8859-1',\n'es_cr':'es_CR.ISO8859-1',\n'es_cu':'es_CU.UTF-8',\n'es_do':'es_DO.ISO8859-1',\n'es_ec':'es_EC.ISO8859-1',\n'es_es':'es_ES.ISO8859-1',\n'es_gt':'es_GT.ISO8859-1',\n'es_hn':'es_HN.ISO8859-1',\n'es_mx':'es_MX.ISO8859-1',\n'es_ni':'es_NI.ISO8859-1',\n'es_pa':'es_PA.ISO8859-1',\n'es_pe':'es_PE.ISO8859-1',\n'es_pr':'es_PR.ISO8859-1',\n'es_py':'es_PY.ISO8859-1',\n'es_sv':'es_SV.ISO8859-1',\n'es_us':'es_US.ISO8859-1',\n'es_uy':'es_UY.ISO8859-1',\n'es_ve':'es_VE.ISO8859-1',\n'estonian':'et_EE.ISO8859-1',\n'et':'et_EE.ISO8859-15',\n'et_ee':'et_EE.ISO8859-15',\n'eu':'eu_ES.ISO8859-1',\n'eu_es':'eu_ES.ISO8859-1',\n'eu_fr':'eu_FR.ISO8859-1',\n'fa':'fa_IR.UTF-8',\n'fa_ir':'fa_IR.UTF-8',\n'fa_ir.isiri3342':'fa_IR.ISIRI-3342',\n'ff_sn':'ff_SN.UTF-8',\n'fi':'fi_FI.ISO8859-15',\n'fi_fi':'fi_FI.ISO8859-15',\n'fil_ph':'fil_PH.UTF-8',\n'finnish':'fi_FI.ISO8859-1',\n'fo':'fo_FO.ISO8859-1',\n'fo_fo':'fo_FO.ISO8859-1',\n'fr':'fr_FR.ISO8859-1',\n'fr_be':'fr_BE.ISO8859-1',\n'fr_ca':'fr_CA.ISO8859-1',\n'fr_ch':'fr_CH.ISO8859-1',\n'fr_fr':'fr_FR.ISO8859-1',\n'fr_lu':'fr_LU.ISO8859-1',\n'fran\\xe7ais':'fr_FR.ISO8859-1',\n'fre_fr':'fr_FR.ISO8859-1',\n'french':'fr_FR.ISO8859-1',\n'french.iso88591':'fr_CH.ISO8859-1',\n'french_france':'fr_FR.ISO8859-1',\n'fur_it':'fur_IT.UTF-8',\n'fy_de':'fy_DE.UTF-8',\n'fy_nl':'fy_NL.UTF-8',\n'ga':'ga_IE.ISO8859-1',\n'ga_ie':'ga_IE.ISO8859-1',\n'galego':'gl_ES.ISO8859-1',\n'galician':'gl_ES.ISO8859-1',\n'gd':'gd_GB.ISO8859-1',\n'gd_gb':'gd_GB.ISO8859-1',\n'ger_de':'de_DE.ISO8859-1',\n'german':'de_DE.ISO8859-1',\n'german.iso88591':'de_CH.ISO8859-1',\n'german_germany':'de_DE.ISO8859-1',\n'gez_er':'gez_ER.UTF-8',\n'gez_et':'gez_ET.UTF-8',\n'gl':'gl_ES.ISO8859-1',\n'gl_es':'gl_ES.ISO8859-1',\n'greek':'el_GR.ISO8859-7',\n'gu_in':'gu_IN.UTF-8',\n'gv':'gv_GB.ISO8859-1',\n'gv_gb':'gv_GB.ISO8859-1',\n'ha_ng':'ha_NG.UTF-8',\n'hak_tw':'hak_TW.UTF-8',\n'he':'he_IL.ISO8859-8',\n'he_il':'he_IL.ISO8859-8',\n'hebrew':'he_IL.ISO8859-8',\n'hi':'hi_IN.ISCII-DEV',\n'hi_in':'hi_IN.ISCII-DEV',\n'hi_in.isciidev':'hi_IN.ISCII-DEV',\n'hif_fj':'hif_FJ.UTF-8',\n'hne':'hne_IN.UTF-8',\n'hne_in':'hne_IN.UTF-8',\n'hr':'hr_HR.ISO8859-2',\n'hr_hr':'hr_HR.ISO8859-2',\n'hrvatski':'hr_HR.ISO8859-2',\n'hsb_de':'hsb_DE.ISO8859-2',\n'ht_ht':'ht_HT.UTF-8',\n'hu':'hu_HU.ISO8859-2',\n'hu_hu':'hu_HU.ISO8859-2',\n'hungarian':'hu_HU.ISO8859-2',\n'hy_am':'hy_AM.UTF-8',\n'hy_am.armscii8':'hy_AM.ARMSCII_8',\n'ia':'ia.UTF-8',\n'ia_fr':'ia_FR.UTF-8',\n'icelandic':'is_IS.ISO8859-1',\n'id':'id_ID.ISO8859-1',\n'id_id':'id_ID.ISO8859-1',\n'ig_ng':'ig_NG.UTF-8',\n'ik_ca':'ik_CA.UTF-8',\n'in':'id_ID.ISO8859-1',\n'in_id':'id_ID.ISO8859-1',\n'is':'is_IS.ISO8859-1',\n'is_is':'is_IS.ISO8859-1',\n'iso-8859-1':'en_US.ISO8859-1',\n'iso-8859-15':'en_US.ISO8859-15',\n'iso8859-1':'en_US.ISO8859-1',\n'iso8859-15':'en_US.ISO8859-15',\n'iso_8859_1':'en_US.ISO8859-1',\n'iso_8859_15':'en_US.ISO8859-15',\n'it':'it_IT.ISO8859-1',\n'it_ch':'it_CH.ISO8859-1',\n'it_it':'it_IT.ISO8859-1',\n'italian':'it_IT.ISO8859-1',\n'iu':'iu_CA.NUNACOM-8',\n'iu_ca':'iu_CA.NUNACOM-8',\n'iu_ca.nunacom8':'iu_CA.NUNACOM-8',\n'iw':'he_IL.ISO8859-8',\n'iw_il':'he_IL.ISO8859-8',\n'iw_il.utf8':'iw_IL.UTF-8',\n'ja':'ja_JP.eucJP',\n'ja_jp':'ja_JP.eucJP',\n'ja_jp.euc':'ja_JP.eucJP',\n'ja_jp.mscode':'ja_JP.SJIS',\n'ja_jp.pck':'ja_JP.SJIS',\n'japan':'ja_JP.eucJP',\n'japanese':'ja_JP.eucJP',\n'japanese-euc':'ja_JP.eucJP',\n'japanese.euc':'ja_JP.eucJP',\n'jp_jp':'ja_JP.eucJP',\n'ka':'ka_GE.GEORGIAN-ACADEMY',\n'ka_ge':'ka_GE.GEORGIAN-ACADEMY',\n'ka_ge.georgianacademy':'ka_GE.GEORGIAN-ACADEMY',\n'ka_ge.georgianps':'ka_GE.GEORGIAN-PS',\n'ka_ge.georgianrs':'ka_GE.GEORGIAN-ACADEMY',\n'kab_dz':'kab_DZ.UTF-8',\n'kk_kz':'kk_KZ.ptcp154',\n'kl':'kl_GL.ISO8859-1',\n'kl_gl':'kl_GL.ISO8859-1',\n'km_kh':'km_KH.UTF-8',\n'kn':'kn_IN.UTF-8',\n'kn_in':'kn_IN.UTF-8',\n'ko':'ko_KR.eucKR',\n'ko_kr':'ko_KR.eucKR',\n'ko_kr.euc':'ko_KR.eucKR',\n'kok_in':'kok_IN.UTF-8',\n'korean':'ko_KR.eucKR',\n'korean.euc':'ko_KR.eucKR',\n'ks':'ks_IN.UTF-8',\n'ks_in':'ks_IN.UTF-8',\n'ks_in@devanagari.utf8':'ks_IN.UTF-8@devanagari',\n'ku_tr':'ku_TR.ISO8859-9',\n'kw':'kw_GB.ISO8859-1',\n'kw_gb':'kw_GB.ISO8859-1',\n'ky':'ky_KG.UTF-8',\n'ky_kg':'ky_KG.UTF-8',\n'lb_lu':'lb_LU.UTF-8',\n'lg_ug':'lg_UG.ISO8859-10',\n'li_be':'li_BE.UTF-8',\n'li_nl':'li_NL.UTF-8',\n'lij_it':'lij_IT.UTF-8',\n'lithuanian':'lt_LT.ISO8859-13',\n'ln_cd':'ln_CD.UTF-8',\n'lo':'lo_LA.MULELAO-1',\n'lo_la':'lo_LA.MULELAO-1',\n'lo_la.cp1133':'lo_LA.IBM-CP1133',\n'lo_la.ibmcp1133':'lo_LA.IBM-CP1133',\n'lo_la.mulelao1':'lo_LA.MULELAO-1',\n'lt':'lt_LT.ISO8859-13',\n'lt_lt':'lt_LT.ISO8859-13',\n'lv':'lv_LV.ISO8859-13',\n'lv_lv':'lv_LV.ISO8859-13',\n'lzh_tw':'lzh_TW.UTF-8',\n'mag_in':'mag_IN.UTF-8',\n'mai':'mai_IN.UTF-8',\n'mai_in':'mai_IN.UTF-8',\n'mai_np':'mai_NP.UTF-8',\n'mfe_mu':'mfe_MU.UTF-8',\n'mg_mg':'mg_MG.ISO8859-15',\n'mhr_ru':'mhr_RU.UTF-8',\n'mi':'mi_NZ.ISO8859-1',\n'mi_nz':'mi_NZ.ISO8859-1',\n'miq_ni':'miq_NI.UTF-8',\n'mjw_in':'mjw_IN.UTF-8',\n'mk':'mk_MK.ISO8859-5',\n'mk_mk':'mk_MK.ISO8859-5',\n'ml':'ml_IN.UTF-8',\n'ml_in':'ml_IN.UTF-8',\n'mn_mn':'mn_MN.UTF-8',\n'mni_in':'mni_IN.UTF-8',\n'mr':'mr_IN.UTF-8',\n'mr_in':'mr_IN.UTF-8',\n'ms':'ms_MY.ISO8859-1',\n'ms_my':'ms_MY.ISO8859-1',\n'mt':'mt_MT.ISO8859-3',\n'mt_mt':'mt_MT.ISO8859-3',\n'my_mm':'my_MM.UTF-8',\n'nan_tw':'nan_TW.UTF-8',\n'nb':'nb_NO.ISO8859-1',\n'nb_no':'nb_NO.ISO8859-1',\n'nds_de':'nds_DE.UTF-8',\n'nds_nl':'nds_NL.UTF-8',\n'ne_np':'ne_NP.UTF-8',\n'nhn_mx':'nhn_MX.UTF-8',\n'niu_nu':'niu_NU.UTF-8',\n'niu_nz':'niu_NZ.UTF-8',\n'nl':'nl_NL.ISO8859-1',\n'nl_aw':'nl_AW.UTF-8',\n'nl_be':'nl_BE.ISO8859-1',\n'nl_nl':'nl_NL.ISO8859-1',\n'nn':'nn_NO.ISO8859-1',\n'nn_no':'nn_NO.ISO8859-1',\n'no':'no_NO.ISO8859-1',\n'no@nynorsk':'ny_NO.ISO8859-1',\n'no_no':'no_NO.ISO8859-1',\n'no_no.iso88591@bokmal':'no_NO.ISO8859-1',\n'no_no.iso88591@nynorsk':'no_NO.ISO8859-1',\n'norwegian':'no_NO.ISO8859-1',\n'nr':'nr_ZA.ISO8859-1',\n'nr_za':'nr_ZA.ISO8859-1',\n'nso':'nso_ZA.ISO8859-15',\n'nso_za':'nso_ZA.ISO8859-15',\n'ny':'ny_NO.ISO8859-1',\n'ny_no':'ny_NO.ISO8859-1',\n'nynorsk':'nn_NO.ISO8859-1',\n'oc':'oc_FR.ISO8859-1',\n'oc_fr':'oc_FR.ISO8859-1',\n'om_et':'om_ET.UTF-8',\n'om_ke':'om_KE.ISO8859-1',\n'or':'or_IN.UTF-8',\n'or_in':'or_IN.UTF-8',\n'os_ru':'os_RU.UTF-8',\n'pa':'pa_IN.UTF-8',\n'pa_in':'pa_IN.UTF-8',\n'pa_pk':'pa_PK.UTF-8',\n'pap_an':'pap_AN.UTF-8',\n'pap_aw':'pap_AW.UTF-8',\n'pap_cw':'pap_CW.UTF-8',\n'pd':'pd_US.ISO8859-1',\n'pd_de':'pd_DE.ISO8859-1',\n'pd_us':'pd_US.ISO8859-1',\n'ph':'ph_PH.ISO8859-1',\n'ph_ph':'ph_PH.ISO8859-1',\n'pl':'pl_PL.ISO8859-2',\n'pl_pl':'pl_PL.ISO8859-2',\n'polish':'pl_PL.ISO8859-2',\n'portuguese':'pt_PT.ISO8859-1',\n'portuguese_brazil':'pt_BR.ISO8859-1',\n'posix':'C',\n'posix-utf2':'C',\n'pp':'pp_AN.ISO8859-1',\n'pp_an':'pp_AN.ISO8859-1',\n'ps_af':'ps_AF.UTF-8',\n'pt':'pt_PT.ISO8859-1',\n'pt_br':'pt_BR.ISO8859-1',\n'pt_pt':'pt_PT.ISO8859-1',\n'quz_pe':'quz_PE.UTF-8',\n'raj_in':'raj_IN.UTF-8',\n'ro':'ro_RO.ISO8859-2',\n'ro_ro':'ro_RO.ISO8859-2',\n'romanian':'ro_RO.ISO8859-2',\n'ru':'ru_RU.UTF-8',\n'ru_ru':'ru_RU.UTF-8',\n'ru_ua':'ru_UA.KOI8-U',\n'rumanian':'ro_RO.ISO8859-2',\n'russian':'ru_RU.KOI8-R',\n'rw':'rw_RW.ISO8859-1',\n'rw_rw':'rw_RW.ISO8859-1',\n'sa_in':'sa_IN.UTF-8',\n'sat_in':'sat_IN.UTF-8',\n'sc_it':'sc_IT.UTF-8',\n'sd':'sd_IN.UTF-8',\n'sd_in':'sd_IN.UTF-8',\n'sd_in@devanagari.utf8':'sd_IN.UTF-8@devanagari',\n'sd_pk':'sd_PK.UTF-8',\n'se_no':'se_NO.UTF-8',\n'serbocroatian':'sr_RS.UTF-8@latin',\n'sgs_lt':'sgs_LT.UTF-8',\n'sh':'sr_RS.UTF-8@latin',\n'sh_ba.iso88592@bosnia':'sr_CS.ISO8859-2',\n'sh_hr':'sh_HR.ISO8859-2',\n'sh_hr.iso88592':'hr_HR.ISO8859-2',\n'sh_sp':'sr_CS.ISO8859-2',\n'sh_yu':'sr_RS.UTF-8@latin',\n'shn_mm':'shn_MM.UTF-8',\n'shs_ca':'shs_CA.UTF-8',\n'si':'si_LK.UTF-8',\n'si_lk':'si_LK.UTF-8',\n'sid_et':'sid_ET.UTF-8',\n'sinhala':'si_LK.UTF-8',\n'sk':'sk_SK.ISO8859-2',\n'sk_sk':'sk_SK.ISO8859-2',\n'sl':'sl_SI.ISO8859-2',\n'sl_cs':'sl_CS.ISO8859-2',\n'sl_si':'sl_SI.ISO8859-2',\n'slovak':'sk_SK.ISO8859-2',\n'slovene':'sl_SI.ISO8859-2',\n'slovenian':'sl_SI.ISO8859-2',\n'sm_ws':'sm_WS.UTF-8',\n'so_dj':'so_DJ.ISO8859-1',\n'so_et':'so_ET.UTF-8',\n'so_ke':'so_KE.ISO8859-1',\n'so_so':'so_SO.ISO8859-1',\n'sp':'sr_CS.ISO8859-5',\n'sp_yu':'sr_CS.ISO8859-5',\n'spanish':'es_ES.ISO8859-1',\n'spanish_spain':'es_ES.ISO8859-1',\n'sq':'sq_AL.ISO8859-2',\n'sq_al':'sq_AL.ISO8859-2',\n'sq_mk':'sq_MK.UTF-8',\n'sr':'sr_RS.UTF-8',\n'sr@cyrillic':'sr_RS.UTF-8',\n'sr@latn':'sr_CS.UTF-8@latin',\n'sr_cs':'sr_CS.UTF-8',\n'sr_cs.iso88592@latn':'sr_CS.ISO8859-2',\n'sr_cs@latn':'sr_CS.UTF-8@latin',\n'sr_me':'sr_ME.UTF-8',\n'sr_rs':'sr_RS.UTF-8',\n'sr_rs@latn':'sr_RS.UTF-8@latin',\n'sr_sp':'sr_CS.ISO8859-2',\n'sr_yu':'sr_RS.UTF-8@latin',\n'sr_yu.cp1251@cyrillic':'sr_CS.CP1251',\n'sr_yu.iso88592':'sr_CS.ISO8859-2',\n'sr_yu.iso88595':'sr_CS.ISO8859-5',\n'sr_yu.iso88595@cyrillic':'sr_CS.ISO8859-5',\n'sr_yu.microsoftcp1251@cyrillic':'sr_CS.CP1251',\n'sr_yu.utf8':'sr_RS.UTF-8',\n'sr_yu.utf8@cyrillic':'sr_RS.UTF-8',\n'sr_yu@cyrillic':'sr_RS.UTF-8',\n'ss':'ss_ZA.ISO8859-1',\n'ss_za':'ss_ZA.ISO8859-1',\n'st':'st_ZA.ISO8859-1',\n'st_za':'st_ZA.ISO8859-1',\n'sv':'sv_SE.ISO8859-1',\n'sv_fi':'sv_FI.ISO8859-1',\n'sv_se':'sv_SE.ISO8859-1',\n'sw_ke':'sw_KE.UTF-8',\n'sw_tz':'sw_TZ.UTF-8',\n'swedish':'sv_SE.ISO8859-1',\n'szl_pl':'szl_PL.UTF-8',\n'ta':'ta_IN.TSCII-0',\n'ta_in':'ta_IN.TSCII-0',\n'ta_in.tscii':'ta_IN.TSCII-0',\n'ta_in.tscii0':'ta_IN.TSCII-0',\n'ta_lk':'ta_LK.UTF-8',\n'tcy_in.utf8':'tcy_IN.UTF-8',\n'te':'te_IN.UTF-8',\n'te_in':'te_IN.UTF-8',\n'tg':'tg_TJ.KOI8-C',\n'tg_tj':'tg_TJ.KOI8-C',\n'th':'th_TH.ISO8859-11',\n'th_th':'th_TH.ISO8859-11',\n'th_th.tactis':'th_TH.TIS620',\n'th_th.tis620':'th_TH.TIS620',\n'thai':'th_TH.ISO8859-11',\n'the_np':'the_NP.UTF-8',\n'ti_er':'ti_ER.UTF-8',\n'ti_et':'ti_ET.UTF-8',\n'tig_er':'tig_ER.UTF-8',\n'tk_tm':'tk_TM.UTF-8',\n'tl':'tl_PH.ISO8859-1',\n'tl_ph':'tl_PH.ISO8859-1',\n'tn':'tn_ZA.ISO8859-15',\n'tn_za':'tn_ZA.ISO8859-15',\n'to_to':'to_TO.UTF-8',\n'tpi_pg':'tpi_PG.UTF-8',\n'tr':'tr_TR.ISO8859-9',\n'tr_cy':'tr_CY.ISO8859-9',\n'tr_tr':'tr_TR.ISO8859-9',\n'ts':'ts_ZA.ISO8859-1',\n'ts_za':'ts_ZA.ISO8859-1',\n'tt':'tt_RU.TATAR-CYR',\n'tt_ru':'tt_RU.TATAR-CYR',\n'tt_ru.tatarcyr':'tt_RU.TATAR-CYR',\n'tt_ru@iqtelif':'tt_RU.UTF-8@iqtelif',\n'turkish':'tr_TR.ISO8859-9',\n'ug_cn':'ug_CN.UTF-8',\n'uk':'uk_UA.KOI8-U',\n'uk_ua':'uk_UA.KOI8-U',\n'univ':'en_US.utf',\n'universal':'en_US.utf',\n'universal.utf8@ucs4':'en_US.UTF-8',\n'unm_us':'unm_US.UTF-8',\n'ur':'ur_PK.CP1256',\n'ur_in':'ur_IN.UTF-8',\n'ur_pk':'ur_PK.CP1256',\n'uz':'uz_UZ.UTF-8',\n'uz_uz':'uz_UZ.UTF-8',\n'uz_uz@cyrillic':'uz_UZ.UTF-8',\n've':'ve_ZA.UTF-8',\n've_za':'ve_ZA.UTF-8',\n'vi':'vi_VN.TCVN',\n'vi_vn':'vi_VN.TCVN',\n'vi_vn.tcvn':'vi_VN.TCVN',\n'vi_vn.tcvn5712':'vi_VN.TCVN',\n'vi_vn.viscii':'vi_VN.VISCII',\n'vi_vn.viscii111':'vi_VN.VISCII',\n'wa':'wa_BE.ISO8859-1',\n'wa_be':'wa_BE.ISO8859-1',\n'wae_ch':'wae_CH.UTF-8',\n'wal_et':'wal_ET.UTF-8',\n'wo_sn':'wo_SN.UTF-8',\n'xh':'xh_ZA.ISO8859-1',\n'xh_za':'xh_ZA.ISO8859-1',\n'yi':'yi_US.CP1255',\n'yi_us':'yi_US.CP1255',\n'yo_ng':'yo_NG.UTF-8',\n'yue_hk':'yue_HK.UTF-8',\n'yuw_pg':'yuw_PG.UTF-8',\n'zh':'zh_CN.eucCN',\n'zh_cn':'zh_CN.gb2312',\n'zh_cn.big5':'zh_TW.big5',\n'zh_cn.euc':'zh_CN.eucCN',\n'zh_hk':'zh_HK.big5hkscs',\n'zh_hk.big5hk':'zh_HK.big5hkscs',\n'zh_sg':'zh_SG.GB2312',\n'zh_sg.gbk':'zh_SG.GBK',\n'zh_tw':'zh_TW.big5',\n'zh_tw.euc':'zh_TW.eucTW',\n'zh_tw.euctw':'zh_TW.eucTW',\n'zu':'zu_ZA.ISO8859-1',\n'zu_za':'zu_ZA.ISO8859-1',\n}\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nwindows_locale={\n0x0436:\"af_ZA\",\n0x041c:\"sq_AL\",\n0x0484:\"gsw_FR\",\n0x045e:\"am_ET\",\n0x0401:\"ar_SA\",\n0x0801:\"ar_IQ\",\n0x0c01:\"ar_EG\",\n0x1001:\"ar_LY\",\n0x1401:\"ar_DZ\",\n0x1801:\"ar_MA\",\n0x1c01:\"ar_TN\",\n0x2001:\"ar_OM\",\n0x2401:\"ar_YE\",\n0x2801:\"ar_SY\",\n0x2c01:\"ar_JO\",\n0x3001:\"ar_LB\",\n0x3401:\"ar_KW\",\n0x3801:\"ar_AE\",\n0x3c01:\"ar_BH\",\n0x4001:\"ar_QA\",\n0x042b:\"hy_AM\",\n0x044d:\"as_IN\",\n0x042c:\"az_AZ\",\n0x082c:\"az_AZ\",\n0x046d:\"ba_RU\",\n0x042d:\"eu_ES\",\n0x0423:\"be_BY\",\n0x0445:\"bn_IN\",\n0x201a:\"bs_BA\",\n0x141a:\"bs_BA\",\n0x047e:\"br_FR\",\n0x0402:\"bg_BG\",\n\n0x0403:\"ca_ES\",\n0x0004:\"zh_CHS\",\n0x0404:\"zh_TW\",\n0x0804:\"zh_CN\",\n0x0c04:\"zh_HK\",\n0x1004:\"zh_SG\",\n0x1404:\"zh_MO\",\n0x7c04:\"zh_CHT\",\n0x0483:\"co_FR\",\n0x041a:\"hr_HR\",\n0x101a:\"hr_BA\",\n0x0405:\"cs_CZ\",\n0x0406:\"da_DK\",\n0x048c:\"gbz_AF\",\n0x0465:\"div_MV\",\n0x0413:\"nl_NL\",\n0x0813:\"nl_BE\",\n0x0409:\"en_US\",\n0x0809:\"en_GB\",\n0x0c09:\"en_AU\",\n0x1009:\"en_CA\",\n0x1409:\"en_NZ\",\n0x1809:\"en_IE\",\n0x1c09:\"en_ZA\",\n0x2009:\"en_JA\",\n0x2409:\"en_CB\",\n0x2809:\"en_BZ\",\n0x2c09:\"en_TT\",\n0x3009:\"en_ZW\",\n0x3409:\"en_PH\",\n0x4009:\"en_IN\",\n0x4409:\"en_MY\",\n0x4809:\"en_IN\",\n0x0425:\"et_EE\",\n0x0438:\"fo_FO\",\n0x0464:\"fil_PH\",\n0x040b:\"fi_FI\",\n0x040c:\"fr_FR\",\n0x080c:\"fr_BE\",\n0x0c0c:\"fr_CA\",\n0x100c:\"fr_CH\",\n0x140c:\"fr_LU\",\n0x180c:\"fr_MC\",\n0x0462:\"fy_NL\",\n0x0456:\"gl_ES\",\n0x0437:\"ka_GE\",\n0x0407:\"de_DE\",\n0x0807:\"de_CH\",\n0x0c07:\"de_AT\",\n0x1007:\"de_LU\",\n0x1407:\"de_LI\",\n0x0408:\"el_GR\",\n0x046f:\"kl_GL\",\n0x0447:\"gu_IN\",\n0x0468:\"ha_NG\",\n0x040d:\"he_IL\",\n0x0439:\"hi_IN\",\n0x040e:\"hu_HU\",\n0x040f:\"is_IS\",\n0x0421:\"id_ID\",\n0x045d:\"iu_CA\",\n0x085d:\"iu_CA\",\n0x083c:\"ga_IE\",\n0x0410:\"it_IT\",\n0x0810:\"it_CH\",\n0x0411:\"ja_JP\",\n0x044b:\"kn_IN\",\n0x043f:\"kk_KZ\",\n0x0453:\"kh_KH\",\n0x0486:\"qut_GT\",\n0x0487:\"rw_RW\",\n0x0457:\"kok_IN\",\n0x0412:\"ko_KR\",\n0x0440:\"ky_KG\",\n0x0454:\"lo_LA\",\n0x0426:\"lv_LV\",\n0x0427:\"lt_LT\",\n0x082e:\"dsb_DE\",\n0x046e:\"lb_LU\",\n0x042f:\"mk_MK\",\n0x043e:\"ms_MY\",\n0x083e:\"ms_BN\",\n0x044c:\"ml_IN\",\n0x043a:\"mt_MT\",\n0x0481:\"mi_NZ\",\n0x047a:\"arn_CL\",\n0x044e:\"mr_IN\",\n0x047c:\"moh_CA\",\n0x0450:\"mn_MN\",\n0x0850:\"mn_CN\",\n0x0461:\"ne_NP\",\n0x0414:\"nb_NO\",\n0x0814:\"nn_NO\",\n0x0482:\"oc_FR\",\n0x0448:\"or_IN\",\n0x0463:\"ps_AF\",\n0x0429:\"fa_IR\",\n0x0415:\"pl_PL\",\n0x0416:\"pt_BR\",\n0x0816:\"pt_PT\",\n0x0446:\"pa_IN\",\n0x046b:\"quz_BO\",\n0x086b:\"quz_EC\",\n0x0c6b:\"quz_PE\",\n0x0418:\"ro_RO\",\n0x0417:\"rm_CH\",\n0x0419:\"ru_RU\",\n0x243b:\"smn_FI\",\n0x103b:\"smj_NO\",\n0x143b:\"smj_SE\",\n0x043b:\"se_NO\",\n0x083b:\"se_SE\",\n0x0c3b:\"se_FI\",\n0x203b:\"sms_FI\",\n0x183b:\"sma_NO\",\n0x1c3b:\"sma_SE\",\n0x044f:\"sa_IN\",\n0x0c1a:\"sr_SP\",\n0x1c1a:\"sr_BA\",\n0x081a:\"sr_SP\",\n0x181a:\"sr_BA\",\n0x045b:\"si_LK\",\n0x046c:\"ns_ZA\",\n0x0432:\"tn_ZA\",\n0x041b:\"sk_SK\",\n0x0424:\"sl_SI\",\n0x040a:\"es_ES\",\n0x080a:\"es_MX\",\n0x0c0a:\"es_ES\",\n0x100a:\"es_GT\",\n0x140a:\"es_CR\",\n0x180a:\"es_PA\",\n0x1c0a:\"es_DO\",\n0x200a:\"es_VE\",\n0x240a:\"es_CO\",\n0x280a:\"es_PE\",\n0x2c0a:\"es_AR\",\n0x300a:\"es_EC\",\n0x340a:\"es_CL\",\n0x380a:\"es_UR\",\n0x3c0a:\"es_PY\",\n0x400a:\"es_BO\",\n0x440a:\"es_SV\",\n0x480a:\"es_HN\",\n0x4c0a:\"es_NI\",\n0x500a:\"es_PR\",\n0x540a:\"es_US\",\n\n0x0441:\"sw_KE\",\n0x041d:\"sv_SE\",\n0x081d:\"sv_FI\",\n0x045a:\"syr_SY\",\n0x0428:\"tg_TJ\",\n0x085f:\"tmz_DZ\",\n0x0449:\"ta_IN\",\n0x0444:\"tt_RU\",\n0x044a:\"te_IN\",\n0x041e:\"th_TH\",\n0x0851:\"bo_BT\",\n0x0451:\"bo_CN\",\n0x041f:\"tr_TR\",\n0x0442:\"tk_TM\",\n0x0480:\"ug_CN\",\n0x0422:\"uk_UA\",\n0x042e:\"wen_DE\",\n0x0420:\"ur_PK\",\n0x0820:\"ur_IN\",\n0x0443:\"uz_UZ\",\n0x0843:\"uz_UZ\",\n0x042a:\"vi_VN\",\n0x0452:\"cy_GB\",\n0x0488:\"wo_SN\",\n0x0434:\"xh_ZA\",\n0x0485:\"sah_RU\",\n0x0478:\"ii_CN\",\n0x046a:\"yo_NG\",\n0x0435:\"zu_ZA\",\n}\n\ndef _print_locale():\n\n ''\n \n categories={}\n def _init_categories(categories=categories):\n for k,v in globals().items():\n if k[:3]=='LC_':\n categories[k]=v\n _init_categories()\n del categories['LC_ALL']\n \n print('Locale defaults as determined by getdefaultlocale():')\n print('-'*72)\n lang,enc=getdefaultlocale()\n print('Language: ',lang or '(undefined)')\n print('Encoding: ',enc or '(undefined)')\n print()\n \n print('Locale settings on startup:')\n print('-'*72)\n for name,category in categories.items():\n print(name,'...')\n lang,enc=getlocale(category)\n print(' Language: ',lang or '(undefined)')\n print(' Encoding: ',enc or '(undefined)')\n print()\n \n print()\n print('Locale settings after calling resetlocale():')\n print('-'*72)\n resetlocale()\n for name,category in categories.items():\n print(name,'...')\n lang,enc=getlocale(category)\n print(' Language: ',lang or '(undefined)')\n print(' Encoding: ',enc or '(undefined)')\n print()\n \n try :\n setlocale(LC_ALL,\"\")\n except :\n print('NOTE:')\n print('setlocale(LC_ALL, \"\") does not support the default locale')\n print('given in the OS environment variables.')\n else :\n print()\n print('Locale settings after calling setlocale(LC_ALL, \"\"):')\n print('-'*72)\n for name,category in categories.items():\n print(name,'...')\n lang,enc=getlocale(category)\n print(' Language: ',lang or '(undefined)')\n print(' Encoding: ',enc or '(undefined)')\n print()\n \n \n \ntry :\n LC_MESSAGES\nexcept NameError:\n pass\nelse :\n __all__.append(\"LC_MESSAGES\")\n \nif __name__ =='__main__':\n print('Locale aliasing:')\n print()\n _print_locale()\n print()\n print('Number formatting:')\n print()\n _test()\n", ["_collections_abc", "_locale", "builtins", "encodings", "encodings.aliases", "functools", "os", "re", "sys", "warnings"]], "mimetypes": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport os\nimport sys\nimport posixpath\nimport urllib.parse\n\ntry :\n from _winapi import _mimetypes_read_windows_registry\nexcept ImportError:\n _mimetypes_read_windows_registry=None\n \ntry :\n import winreg as _winreg\nexcept ImportError:\n _winreg=None\n \n__all__=[\n\"knownfiles\",\"inited\",\"MimeTypes\",\n\"guess_type\",\"guess_all_extensions\",\"guess_extension\",\n\"add_type\",\"init\",\"read_mime_types\",\n\"suffix_map\",\"encodings_map\",\"types_map\",\"common_types\"\n]\n\nknownfiles=[\n\"/etc/mime.types\",\n\"/etc/httpd/mime.types\",\n\"/etc/httpd/conf/mime.types\",\n\"/etc/apache/mime.types\",\n\"/etc/apache2/mime.types\",\n\"/usr/local/etc/httpd/conf/mime.types\",\n\"/usr/local/lib/netscape/mime.types\",\n\"/usr/local/etc/httpd/conf/mime.types\",\n\"/usr/local/etc/mime.types\",\n]\n\ninited=False\n_db=None\n\n\nclass MimeTypes:\n ''\n\n\n\n\n \n \n def __init__(self,filenames=(),strict=True ):\n if not inited:\n init()\n self.encodings_map=_encodings_map_default.copy()\n self.suffix_map=_suffix_map_default.copy()\n self.types_map=({},{})\n self.types_map_inv=({},{})\n for (ext,type)in _types_map_default.items():\n self.add_type(type,ext,True )\n for (ext,type)in _common_types_default.items():\n self.add_type(type,ext,False )\n for name in filenames:\n self.read(name,strict)\n \n def add_type(self,type,ext,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n \n self.types_map[strict][ext]=type\n exts=self.types_map_inv[strict].setdefault(type,[])\n if ext not in exts:\n exts.append(ext)\n \n def guess_type(self,url,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n url=os.fspath(url)\n scheme,url=urllib.parse._splittype(url)\n if scheme =='data':\n \n \n \n \n \n \n comma=url.find(',')\n if comma <0:\n \n return None ,None\n semi=url.find(';',0,comma)\n if semi >=0:\n type=url[:semi]\n else :\n type=url[:comma]\n if '='in type or '/'not in type:\n type='text/plain'\n return type,None\n base,ext=posixpath.splitext(url)\n while (ext_lower :=ext.lower())in self.suffix_map:\n base,ext=posixpath.splitext(base+self.suffix_map[ext_lower])\n \n if ext in self.encodings_map:\n encoding=self.encodings_map[ext]\n base,ext=posixpath.splitext(base)\n else :\n encoding=None\n ext=ext.lower()\n types_map=self.types_map[True ]\n if ext in types_map:\n return types_map[ext],encoding\n elif strict:\n return None ,encoding\n types_map=self.types_map[False ]\n if ext in types_map:\n return types_map[ext],encoding\n else :\n return None ,encoding\n \n def guess_all_extensions(self,type,strict=True ):\n ''\n\n\n\n\n\n\n\n\n \n type=type.lower()\n extensions=list(self.types_map_inv[True ].get(type,[]))\n if not strict:\n for ext in self.types_map_inv[False ].get(type,[]):\n if ext not in extensions:\n extensions.append(ext)\n return extensions\n \n def guess_extension(self,type,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n extensions=self.guess_all_extensions(type,strict)\n if not extensions:\n return None\n return extensions[0]\n \n def read(self,filename,strict=True ):\n ''\n\n\n\n\n\n \n with open(filename,encoding='utf-8')as fp:\n self.readfp(fp,strict)\n \n def readfp(self,fp,strict=True ):\n ''\n\n\n\n\n\n \n while line :=fp.readline():\n words=line.split()\n for i in range(len(words)):\n if words[i][0]=='#':\n del words[i:]\n break\n if not words:\n continue\n type,suffixes=words[0],words[1:]\n for suff in suffixes:\n self.add_type(type,'.'+suff,strict)\n \n def read_windows_registry(self,strict=True ):\n ''\n\n\n\n\n\n \n \n if not _mimetypes_read_windows_registry and not _winreg:\n return\n \n add_type=self.add_type\n if strict:\n add_type=lambda type,ext:self.add_type(type,ext,True )\n \n \n if _mimetypes_read_windows_registry:\n _mimetypes_read_windows_registry(add_type)\n elif _winreg:\n self._read_windows_registry(add_type)\n \n @classmethod\n def _read_windows_registry(cls,add_type):\n def enum_types(mimedb):\n i=0\n while True :\n try :\n ctype=_winreg.EnumKey(mimedb,i)\n except OSError:\n break\n else :\n if '\\0'not in ctype:\n yield ctype\n i +=1\n \n with _winreg.OpenKey(_winreg.HKEY_CLASSES_ROOT,'')as hkcr:\n for subkeyname in enum_types(hkcr):\n try :\n with _winreg.OpenKey(hkcr,subkeyname)as subkey:\n \n if not subkeyname.startswith(\".\"):\n continue\n \n mimetype,datatype=_winreg.QueryValueEx(\n subkey,'Content Type')\n if datatype !=_winreg.REG_SZ:\n continue\n add_type(mimetype,subkeyname)\n except OSError:\n continue\n \ndef guess_type(url,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if _db is None :\n init()\n return _db.guess_type(url,strict)\n \n \ndef guess_all_extensions(type,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if _db is None :\n init()\n return _db.guess_all_extensions(type,strict)\n \ndef guess_extension(type,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n \n if _db is None :\n init()\n return _db.guess_extension(type,strict)\n \ndef add_type(type,ext,strict=True ):\n ''\n\n\n\n\n\n\n\n\n\n \n if _db is None :\n init()\n return _db.add_type(type,ext,strict)\n \n \ndef init(files=None ):\n global suffix_map,types_map,encodings_map,common_types\n global inited,_db\n inited=True\n \n if files is None or _db is None :\n db=MimeTypes()\n \n db.read_windows_registry()\n \n if files is None :\n files=knownfiles\n else :\n files=knownfiles+list(files)\n else :\n db=_db\n \n for file in files:\n if os.path.isfile(file):\n db.read(file)\n encodings_map=db.encodings_map\n suffix_map=db.suffix_map\n types_map=db.types_map[True ]\n common_types=db.types_map[False ]\n \n _db=db\n \n \ndef read_mime_types(file):\n try :\n f=open(file,encoding='utf-8')\n except OSError:\n return None\n with f:\n db=MimeTypes()\n db.readfp(f,True )\n return db.types_map[True ]\n \n \ndef _default_mime_types():\n global suffix_map,_suffix_map_default\n global encodings_map,_encodings_map_default\n global types_map,_types_map_default\n global common_types,_common_types_default\n \n suffix_map=_suffix_map_default={\n '.svgz':'.svg.gz',\n '.tgz':'.tar.gz',\n '.taz':'.tar.gz',\n '.tz':'.tar.gz',\n '.tbz2':'.tar.bz2',\n '.txz':'.tar.xz',\n }\n \n encodings_map=_encodings_map_default={\n '.gz':'gzip',\n '.Z':'compress',\n '.bz2':'bzip2',\n '.xz':'xz',\n '.br':'br',\n }\n \n \n \n \n \n \n \n \n types_map=_types_map_default={\n '.js':'text/javascript',\n '.mjs':'text/javascript',\n '.json':'application/json',\n '.webmanifest':'application/manifest+json',\n '.doc':'application/msword',\n '.dot':'application/msword',\n '.wiz':'application/msword',\n '.nq':'application/n-quads',\n '.nt':'application/n-triples',\n '.bin':'application/octet-stream',\n '.a':'application/octet-stream',\n '.dll':'application/octet-stream',\n '.exe':'application/octet-stream',\n '.o':'application/octet-stream',\n '.obj':'application/octet-stream',\n '.so':'application/octet-stream',\n '.oda':'application/oda',\n '.pdf':'application/pdf',\n '.p7c':'application/pkcs7-mime',\n '.ps':'application/postscript',\n '.ai':'application/postscript',\n '.eps':'application/postscript',\n '.trig':'application/trig',\n '.m3u':'application/vnd.apple.mpegurl',\n '.m3u8':'application/vnd.apple.mpegurl',\n '.xls':'application/vnd.ms-excel',\n '.xlb':'application/vnd.ms-excel',\n '.ppt':'application/vnd.ms-powerpoint',\n '.pot':'application/vnd.ms-powerpoint',\n '.ppa':'application/vnd.ms-powerpoint',\n '.pps':'application/vnd.ms-powerpoint',\n '.pwz':'application/vnd.ms-powerpoint',\n '.wasm':'application/wasm',\n '.bcpio':'application/x-bcpio',\n '.cpio':'application/x-cpio',\n '.csh':'application/x-csh',\n '.dvi':'application/x-dvi',\n '.gtar':'application/x-gtar',\n '.hdf':'application/x-hdf',\n '.h5':'application/x-hdf5',\n '.latex':'application/x-latex',\n '.mif':'application/x-mif',\n '.cdf':'application/x-netcdf',\n '.nc':'application/x-netcdf',\n '.p12':'application/x-pkcs12',\n '.pfx':'application/x-pkcs12',\n '.ram':'application/x-pn-realaudio',\n '.pyc':'application/x-python-code',\n '.pyo':'application/x-python-code',\n '.sh':'application/x-sh',\n '.shar':'application/x-shar',\n '.swf':'application/x-shockwave-flash',\n '.sv4cpio':'application/x-sv4cpio',\n '.sv4crc':'application/x-sv4crc',\n '.tar':'application/x-tar',\n '.tcl':'application/x-tcl',\n '.tex':'application/x-tex',\n '.texi':'application/x-texinfo',\n '.texinfo':'application/x-texinfo',\n '.roff':'application/x-troff',\n '.t':'application/x-troff',\n '.tr':'application/x-troff',\n '.man':'application/x-troff-man',\n '.me':'application/x-troff-me',\n '.ms':'application/x-troff-ms',\n '.ustar':'application/x-ustar',\n '.src':'application/x-wais-source',\n '.xsl':'application/xml',\n '.rdf':'application/xml',\n '.wsdl':'application/xml',\n '.xpdl':'application/xml',\n '.zip':'application/zip',\n '.3gp':'audio/3gpp',\n '.3gpp':'audio/3gpp',\n '.3g2':'audio/3gpp2',\n '.3gpp2':'audio/3gpp2',\n '.aac':'audio/aac',\n '.adts':'audio/aac',\n '.loas':'audio/aac',\n '.ass':'audio/aac',\n '.au':'audio/basic',\n '.snd':'audio/basic',\n '.mp3':'audio/mpeg',\n '.mp2':'audio/mpeg',\n '.opus':'audio/opus',\n '.aif':'audio/x-aiff',\n '.aifc':'audio/x-aiff',\n '.aiff':'audio/x-aiff',\n '.ra':'audio/x-pn-realaudio',\n '.wav':'audio/x-wav',\n '.avif':'image/avif',\n '.bmp':'image/bmp',\n '.gif':'image/gif',\n '.ief':'image/ief',\n '.jpg':'image/jpeg',\n '.jpe':'image/jpeg',\n '.jpeg':'image/jpeg',\n '.heic':'image/heic',\n '.heif':'image/heif',\n '.png':'image/png',\n '.svg':'image/svg+xml',\n '.tiff':'image/tiff',\n '.tif':'image/tiff',\n '.ico':'image/vnd.microsoft.icon',\n '.ras':'image/x-cmu-raster',\n '.pnm':'image/x-portable-anymap',\n '.pbm':'image/x-portable-bitmap',\n '.pgm':'image/x-portable-graymap',\n '.ppm':'image/x-portable-pixmap',\n '.rgb':'image/x-rgb',\n '.xbm':'image/x-xbitmap',\n '.xpm':'image/x-xpixmap',\n '.xwd':'image/x-xwindowdump',\n '.eml':'message/rfc822',\n '.mht':'message/rfc822',\n '.mhtml':'message/rfc822',\n '.nws':'message/rfc822',\n '.css':'text/css',\n '.csv':'text/csv',\n '.html':'text/html',\n '.htm':'text/html',\n '.n3':'text/n3',\n '.txt':'text/plain',\n '.bat':'text/plain',\n '.c':'text/plain',\n '.h':'text/plain',\n '.ksh':'text/plain',\n '.pl':'text/plain',\n '.srt':'text/plain',\n '.rtx':'text/richtext',\n '.tsv':'text/tab-separated-values',\n '.vtt':'text/vtt',\n '.py':'text/x-python',\n '.etx':'text/x-setext',\n '.sgm':'text/x-sgml',\n '.sgml':'text/x-sgml',\n '.vcf':'text/x-vcard',\n '.xml':'text/xml',\n '.mp4':'video/mp4',\n '.mpeg':'video/mpeg',\n '.m1v':'video/mpeg',\n '.mpa':'video/mpeg',\n '.mpe':'video/mpeg',\n '.mpg':'video/mpeg',\n '.mov':'video/quicktime',\n '.qt':'video/quicktime',\n '.webm':'video/webm',\n '.avi':'video/x-msvideo',\n '.movie':'video/x-sgi-movie',\n }\n \n \n \n \n \n common_types=_common_types_default={\n '.rtf':'application/rtf',\n '.midi':'audio/midi',\n '.mid':'audio/midi',\n '.jpg':'image/jpg',\n '.pict':'image/pict',\n '.pct':'image/pict',\n '.pic':'image/pict',\n '.webp':'image/webp',\n '.xul':'text/xul',\n }\n \n \n_default_mime_types()\n\n\ndef _main():\n import getopt\n \n USAGE=\"\"\"\\\nUsage: mimetypes.py [options] type\n\nOptions:\n --help / -h -- print this message and exit\n --lenient / -l -- additionally search of some common, but non-standard\n types.\n --extension / -e -- guess extension instead of type\n\nMore than one type argument may be given.\n\"\"\"\n \n def usage(code,msg=''):\n print(USAGE)\n if msg:print(msg)\n sys.exit(code)\n \n try :\n opts,args=getopt.getopt(sys.argv[1:],'hle',\n ['help','lenient','extension'])\n except getopt.error as msg:\n usage(1,msg)\n \n strict=1\n extension=0\n for opt,arg in opts:\n if opt in ('-h','--help'):\n usage(0)\n elif opt in ('-l','--lenient'):\n strict=0\n elif opt in ('-e','--extension'):\n extension=1\n for gtype in args:\n if extension:\n guess=guess_extension(gtype,strict)\n if not guess:print(\"I don't know anything about type\",gtype)\n else :print(guess)\n else :\n guess,encoding=guess_type(gtype,strict)\n if not guess:print(\"I don't know anything about type\",gtype)\n else :print('type:',guess,'encoding:',encoding)\n \n \nif __name__ =='__main__':\n _main()\n", ["_winapi", "getopt", "os", "posixpath", "sys", "urllib.parse", "winreg"]], "nntplib": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport re\nimport socket\nimport collections\nimport datetime\nimport sys\nimport warnings\n\ntry :\n import ssl\nexcept ImportError:\n _have_ssl=False\nelse :\n _have_ssl=True\n \nfrom email.header import decode_header as _email_decode_header\nfrom socket import _GLOBAL_DEFAULT_TIMEOUT\n\n__all__=[\"NNTP\",\n\"NNTPError\",\"NNTPReplyError\",\"NNTPTemporaryError\",\n\"NNTPPermanentError\",\"NNTPProtocolError\",\"NNTPDataError\",\n\"decode_header\",\n]\n\nwarnings._deprecated(__name__,remove=(3,13))\n\n\n\n\n\n_MAXLINE=2048\n\n\n\nclass NNTPError(Exception):\n ''\n def __init__(self,*args):\n Exception.__init__(self,*args)\n try :\n self.response=args[0]\n except IndexError:\n self.response='No response given'\n \nclass NNTPReplyError(NNTPError):\n ''\n pass\n \nclass NNTPTemporaryError(NNTPError):\n ''\n pass\n \nclass NNTPPermanentError(NNTPError):\n ''\n pass\n \nclass NNTPProtocolError(NNTPError):\n ''\n pass\n \nclass NNTPDataError(NNTPError):\n ''\n pass\n \n \n \nNNTP_PORT=119\nNNTP_SSL_PORT=563\n\n\n_LONGRESP={\n'100',\n'101',\n'211',\n'215',\n'220',\n'221',\n'222',\n'224',\n'225',\n'230',\n'231',\n'282',\n}\n\n\n_DEFAULT_OVERVIEW_FMT=[\n\"subject\",\"from\",\"date\",\"message-id\",\"references\",\":bytes\",\":lines\"]\n\n\n_OVERVIEW_FMT_ALTERNATIVES={\n'bytes':':bytes',\n'lines':':lines',\n}\n\n\n_CRLF=b'\\r\\n'\n\nGroupInfo=collections.namedtuple('GroupInfo',\n['group','last','first','flag'])\n\nArticleInfo=collections.namedtuple('ArticleInfo',\n['number','message_id','lines'])\n\n\n\ndef decode_header(header_str):\n ''\n \n parts=[]\n for v,enc in _email_decode_header(header_str):\n if isinstance(v,bytes):\n parts.append(v.decode(enc or 'ascii'))\n else :\n parts.append(v)\n return ''.join(parts)\n \ndef _parse_overview_fmt(lines):\n ''\n\n\n \n fmt=[]\n for line in lines:\n if line[0]==':':\n \n name,_,suffix=line[1:].partition(':')\n name=':'+name\n else :\n \n name,_,suffix=line.partition(':')\n name=name.lower()\n name=_OVERVIEW_FMT_ALTERNATIVES.get(name,name)\n \n fmt.append(name)\n defaults=_DEFAULT_OVERVIEW_FMT\n if len(fmt)=len(fmt):\n \n \n \n continue\n field_name=fmt[i]\n is_metadata=field_name.startswith(':')\n if i >=n_defaults and not is_metadata:\n \n \n h=field_name+\": \"\n if token and token[:len(h)].lower()!=h:\n raise NNTPDataError(\"OVER/XOVER response doesn't include \"\n \"names of additional headers\")\n token=token[len(h):]if token else None\n fields[fmt[i]]=token\n overview.append((article_number,fields))\n return overview\n \ndef _parse_datetime(date_str,time_str=None ):\n ''\n\n\n \n if time_str is None :\n time_str=date_str[-6:]\n date_str=date_str[:-6]\n hours=int(time_str[:2])\n minutes=int(time_str[2:4])\n seconds=int(time_str[4:])\n year=int(date_str[:-4])\n month=int(date_str[-4:-2])\n day=int(date_str[-2:])\n \n \n if year <70:\n year +=2000\n elif year <100:\n year +=1900\n return datetime.datetime(year,month,day,hours,minutes,seconds)\n \ndef _unparse_datetime(dt,legacy=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if not isinstance(dt,datetime.datetime):\n time_str=\"000000\"\n else :\n time_str=\"{0.hour:02d}{0.minute:02d}{0.second:02d}\".format(dt)\n y=dt.year\n if legacy:\n y=y %100\n date_str=\"{0:02d}{1.month:02d}{1.day:02d}\".format(y,dt)\n else :\n date_str=\"{0:04d}{1.month:02d}{1.day:02d}\".format(y,dt)\n return date_str,time_str\n \n \nif _have_ssl:\n\n def _encrypt_on(sock,context,hostname):\n ''\n\n\n\n\n \n \n if context is None :\n context=ssl._create_stdlib_context()\n return context.wrap_socket(sock,server_hostname=hostname)\n \n \n \nclass NNTP:\n\n\n\n\n\n\n\n\n\n\n\n\n encoding='utf-8'\n errors='surrogateescape'\n \n def __init__(self,host,port=NNTP_PORT,user=None ,password=None ,\n readermode=None ,usenetrc=False ,\n timeout=_GLOBAL_DEFAULT_TIMEOUT):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self.host=host\n self.port=port\n self.sock=self._create_socket(timeout)\n self.file=None\n try :\n self.file=self.sock.makefile(\"rwb\")\n self._base_init(readermode)\n if user or usenetrc:\n self.login(user,password,usenetrc)\n except :\n if self.file:\n self.file.close()\n self.sock.close()\n raise\n \n def _base_init(self,readermode):\n ''\n\n \n self.debugging=0\n self.welcome=self._getresp()\n \n \n self._caps=None\n self.getcapabilities()\n \n \n \n \n \n \n \n \n self.readermode_afterauth=False\n if readermode and 'READER'not in self._caps:\n self._setreadermode()\n if not self.readermode_afterauth:\n \n self._caps=None\n self.getcapabilities()\n \n \n \n \n self.tls_on=False\n \n \n self.authenticated=False\n \n def __enter__(self):\n return self\n \n def __exit__(self,*args):\n is_connected=lambda :hasattr(self,\"file\")\n if is_connected():\n try :\n self.quit()\n except (OSError,EOFError):\n pass\n finally :\n if is_connected():\n self._close()\n \n def _create_socket(self,timeout):\n if timeout is not None and not timeout:\n raise ValueError('Non-blocking socket (timeout=0) is not supported')\n sys.audit(\"nntplib.connect\",self,self.host,self.port)\n return socket.create_connection((self.host,self.port),timeout)\n \n def getwelcome(self):\n ''\n\n\n \n \n if self.debugging:print('*welcome*',repr(self.welcome))\n return self.welcome\n \n def getcapabilities(self):\n ''\n\n \n if self._caps is None :\n self.nntp_version=1\n self.nntp_implementation=None\n try :\n resp,caps=self.capabilities()\n except (NNTPPermanentError,NNTPTemporaryError):\n \n self._caps={}\n else :\n self._caps=caps\n if 'VERSION'in caps:\n \n \n self.nntp_version=max(map(int,caps['VERSION']))\n if 'IMPLEMENTATION'in caps:\n self.nntp_implementation=' '.join(caps['IMPLEMENTATION'])\n return self._caps\n \n def set_debuglevel(self,level):\n ''\n\n\n \n \n self.debugging=level\n debug=set_debuglevel\n \n def _putline(self,line):\n ''\n \n sys.audit(\"nntplib.putline\",self,line)\n line=line+_CRLF\n if self.debugging >1:print('*put*',repr(line))\n self.file.write(line)\n self.file.flush()\n \n def _putcmd(self,line):\n ''\n \n if self.debugging:print('*cmd*',repr(line))\n line=line.encode(self.encoding,self.errors)\n self._putline(line)\n \n def _getline(self,strip_crlf=True ):\n ''\n\n \n line=self.file.readline(_MAXLINE+1)\n if len(line)>_MAXLINE:\n raise NNTPDataError('line too long')\n if self.debugging >1:\n print('*get*',repr(line))\n if not line:raise EOFError\n if strip_crlf:\n if line[-2:]==_CRLF:\n line=line[:-2]\n elif line[-1:]in _CRLF:\n line=line[:-1]\n return line\n \n def _getresp(self):\n ''\n\n \n resp=self._getline()\n if self.debugging:print('*resp*',repr(resp))\n resp=resp.decode(self.encoding,self.errors)\n c=resp[:1]\n if c =='4':\n raise NNTPTemporaryError(resp)\n if c =='5':\n raise NNTPPermanentError(resp)\n if c not in '123':\n raise NNTPProtocolError(resp)\n return resp\n \n def _getlongresp(self,file=None ):\n ''\n\n\n\n\n\n \n \n openedFile=None\n try :\n \n if isinstance(file,(str,bytes)):\n openedFile=file=open(file,\"wb\")\n \n resp=self._getresp()\n if resp[:3]not in _LONGRESP:\n raise NNTPReplyError(resp)\n \n lines=[]\n if file is not None :\n \n terminators=(b'.'+_CRLF,b'.\\n')\n while 1:\n line=self._getline(False )\n if line in terminators:\n break\n if line.startswith(b'..'):\n line=line[1:]\n file.write(line)\n else :\n terminator=b'.'\n while 1:\n line=self._getline()\n if line ==terminator:\n break\n if line.startswith(b'..'):\n line=line[1:]\n lines.append(line)\n finally :\n \n if openedFile:\n openedFile.close()\n \n return resp,lines\n \n def _shortcmd(self,line):\n ''\n \n self._putcmd(line)\n return self._getresp()\n \n def _longcmd(self,line,file=None ):\n ''\n \n self._putcmd(line)\n return self._getlongresp(file)\n \n def _longcmdstring(self,line,file=None ):\n ''\n\n\n \n self._putcmd(line)\n resp,list=self._getlongresp(file)\n return resp,[line.decode(self.encoding,self.errors)\n for line in list]\n \n def _getoverviewfmt(self):\n ''\n \n try :\n return self._cachedoverviewfmt\n except AttributeError:\n pass\n try :\n resp,lines=self._longcmdstring(\"LIST OVERVIEW.FMT\")\n except NNTPPermanentError:\n \n fmt=_DEFAULT_OVERVIEW_FMT[:]\n else :\n fmt=_parse_overview_fmt(lines)\n self._cachedoverviewfmt=fmt\n return fmt\n \n def _grouplist(self,lines):\n \n return [GroupInfo(*line.split())for line in lines]\n \n def capabilities(self):\n ''\n\n\n\n\n \n caps={}\n resp,lines=self._longcmdstring(\"CAPABILITIES\")\n for line in lines:\n name,*tokens=line.split()\n caps[name]=tokens\n return resp,caps\n \n def newgroups(self,date,*,file=None ):\n ''\n\n\n\n\n \n if not isinstance(date,(datetime.date,datetime.date)):\n raise TypeError(\n \"the date parameter must be a date or datetime object, \"\n \"not '{:40}'\".format(date.__class__.__name__))\n date_str,time_str=_unparse_datetime(date,self.nntp_version <2)\n cmd='NEWGROUPS {0} {1}'.format(date_str,time_str)\n resp,lines=self._longcmdstring(cmd,file)\n return resp,self._grouplist(lines)\n \n def newnews(self,group,date,*,file=None ):\n ''\n\n\n\n\n\n \n if not isinstance(date,(datetime.date,datetime.date)):\n raise TypeError(\n \"the date parameter must be a date or datetime object, \"\n \"not '{:40}'\".format(date.__class__.__name__))\n date_str,time_str=_unparse_datetime(date,self.nntp_version <2)\n cmd='NEWNEWS {0} {1} {2}'.format(group,date_str,time_str)\n return self._longcmdstring(cmd,file)\n \n def list(self,group_pattern=None ,*,file=None ):\n ''\n\n\n\n\n\n \n if group_pattern is not None :\n command='LIST ACTIVE '+group_pattern\n else :\n command='LIST'\n resp,lines=self._longcmdstring(command,file)\n return resp,self._grouplist(lines)\n \n def _getdescriptions(self,group_pattern,return_all):\n line_pat=re.compile('^(?P[^ \\t]+)[ \\t]+(.*)$')\n \n resp,lines=self._longcmdstring('LIST NEWSGROUPS '+group_pattern)\n if not resp.startswith('215'):\n \n \n \n resp,lines=self._longcmdstring('XGTITLE '+group_pattern)\n groups={}\n for raw_line in lines:\n match=line_pat.search(raw_line.strip())\n if match:\n name,desc=match.group(1,2)\n if not return_all:\n return desc\n groups[name]=desc\n if return_all:\n return resp,groups\n else :\n \n return ''\n \n def description(self,group):\n ''\n\n\n\n\n\n\n\n\n \n return self._getdescriptions(group,False )\n \n def descriptions(self,group_pattern):\n ''\n return self._getdescriptions(group_pattern,True )\n \n def group(self,name):\n ''\n\n\n\n\n\n\n\n \n resp=self._shortcmd('GROUP '+name)\n if not resp.startswith('211'):\n raise NNTPReplyError(resp)\n words=resp.split()\n count=first=last=0\n n=len(words)\n if n >1:\n count=words[1]\n if n >2:\n first=words[2]\n if n >3:\n last=words[3]\n if n >4:\n name=words[4].lower()\n return resp,int(count),int(first),int(last),name\n \n def help(self,*,file=None ):\n ''\n\n\n\n\n\n \n return self._longcmdstring('HELP',file)\n \n def _statparse(self,resp):\n ''\n \n if not resp.startswith('22'):\n raise NNTPReplyError(resp)\n words=resp.split()\n art_num=int(words[1])\n message_id=words[2]\n return resp,art_num,message_id\n \n def _statcmd(self,line):\n ''\n resp=self._shortcmd(line)\n return self._statparse(resp)\n \n def stat(self,message_spec=None ):\n ''\n\n\n\n\n\n\n \n if message_spec:\n return self._statcmd('STAT {0}'.format(message_spec))\n else :\n return self._statcmd('STAT')\n \n def next(self):\n ''\n return self._statcmd('NEXT')\n \n def last(self):\n ''\n return self._statcmd('LAST')\n \n def _artcmd(self,line,file=None ):\n ''\n resp,lines=self._longcmd(line,file)\n resp,art_num,message_id=self._statparse(resp)\n return resp,ArticleInfo(art_num,message_id,lines)\n \n def head(self,message_spec=None ,*,file=None ):\n ''\n\n\n\n\n\n \n if message_spec is not None :\n cmd='HEAD {0}'.format(message_spec)\n else :\n cmd='HEAD'\n return self._artcmd(cmd,file)\n \n def body(self,message_spec=None ,*,file=None ):\n ''\n\n\n\n\n\n \n if message_spec is not None :\n cmd='BODY {0}'.format(message_spec)\n else :\n cmd='BODY'\n return self._artcmd(cmd,file)\n \n def article(self,message_spec=None ,*,file=None ):\n ''\n\n\n\n\n\n \n if message_spec is not None :\n cmd='ARTICLE {0}'.format(message_spec)\n else :\n cmd='ARTICLE'\n return self._artcmd(cmd,file)\n \n def slave(self):\n ''\n\n \n return self._shortcmd('SLAVE')\n \n def xhdr(self,hdr,str,*,file=None ):\n ''\n\n\n\n\n\n\n \n pat=re.compile('^([0-9]+) ?(.*)\\n?')\n resp,lines=self._longcmdstring('XHDR {0} {1}'.format(hdr,str),file)\n def remove_number(line):\n m=pat.match(line)\n return m.group(1,2)if m else line\n return resp,[remove_number(line)for line in lines]\n \n def xover(self,start,end,*,file=None ):\n ''\n\n\n\n\n\n\n \n resp,lines=self._longcmdstring('XOVER {0}-{1}'.format(start,end),\n file)\n fmt=self._getoverviewfmt()\n return resp,_parse_overview(lines,fmt)\n \n def over(self,message_spec,*,file=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n cmd='OVER'if 'OVER'in self._caps else 'XOVER'\n if isinstance(message_spec,(tuple,list)):\n start,end=message_spec\n cmd +=' {0}-{1}'.format(start,end or '')\n elif message_spec is not None :\n cmd=cmd+' '+message_spec\n resp,lines=self._longcmdstring(cmd,file)\n fmt=self._getoverviewfmt()\n return resp,_parse_overview(lines,fmt)\n \n def date(self):\n ''\n\n\n\n \n resp=self._shortcmd(\"DATE\")\n if not resp.startswith('111'):\n raise NNTPReplyError(resp)\n elem=resp.split()\n if len(elem)!=2:\n raise NNTPDataError(resp)\n date=elem[1]\n if len(date)!=14:\n raise NNTPDataError(resp)\n return resp,_parse_datetime(date,None )\n \n def _post(self,command,f):\n resp=self._shortcmd(command)\n \n if not resp.startswith('3'):\n raise NNTPReplyError(resp)\n if isinstance(f,(bytes,bytearray)):\n f=f.splitlines()\n \n \n \n \n for line in f:\n if not line.endswith(_CRLF):\n line=line.rstrip(b\"\\r\\n\")+_CRLF\n if line.startswith(b'.'):\n line=b'.'+line\n self.file.write(line)\n self.file.write(b\".\\r\\n\")\n self.file.flush()\n return self._getresp()\n \n def post(self,data):\n ''\n\n\n \n return self._post('POST',data)\n \n def ihave(self,message_id,data):\n ''\n\n\n\n\n \n return self._post('IHAVE {0}'.format(message_id),data)\n \n def _close(self):\n try :\n if self.file:\n self.file.close()\n del self.file\n finally :\n self.sock.close()\n \n def quit(self):\n ''\n \n try :\n resp=self._shortcmd('QUIT')\n finally :\n self._close()\n return resp\n \n def login(self,user=None ,password=None ,usenetrc=True ):\n if self.authenticated:\n raise ValueError(\"Already logged in.\")\n if not user and not usenetrc:\n raise ValueError(\n \"At least one of `user` and `usenetrc` must be specified\")\n \n \n \n try :\n if usenetrc and not user:\n import netrc\n credentials=netrc.netrc()\n auth=credentials.authenticators(self.host)\n if auth:\n user=auth[0]\n password=auth[2]\n except OSError:\n pass\n \n if not user:\n return\n resp=self._shortcmd('authinfo user '+user)\n if resp.startswith('381'):\n if not password:\n raise NNTPReplyError(resp)\n else :\n resp=self._shortcmd('authinfo pass '+password)\n if not resp.startswith('281'):\n raise NNTPPermanentError(resp)\n \n self._caps=None\n self.getcapabilities()\n \n \n if self.readermode_afterauth and 'READER'not in self._caps:\n self._setreadermode()\n \n self._caps=None\n self.getcapabilities()\n \n def _setreadermode(self):\n try :\n self.welcome=self._shortcmd('mode reader')\n except NNTPPermanentError:\n \n pass\n except NNTPTemporaryError as e:\n if e.response.startswith('480'):\n \n self.readermode_afterauth=True\n else :\n raise\n \n if _have_ssl:\n def starttls(self,context=None ):\n ''\n\n \n \n \n if self.tls_on:\n raise ValueError(\"TLS is already enabled.\")\n if self.authenticated:\n raise ValueError(\"TLS cannot be started after authentication.\")\n resp=self._shortcmd('STARTTLS')\n if resp.startswith('382'):\n self.file.close()\n self.sock=_encrypt_on(self.sock,context,self.host)\n self.file=self.sock.makefile(\"rwb\")\n self.tls_on=True\n \n \n self._caps=None\n self.getcapabilities()\n else :\n raise NNTPError(\"TLS failed to start.\")\n \n \nif _have_ssl:\n class NNTP_SSL(NNTP):\n \n def __init__(self,host,port=NNTP_SSL_PORT,\n user=None ,password=None ,ssl_context=None ,\n readermode=None ,usenetrc=False ,\n timeout=_GLOBAL_DEFAULT_TIMEOUT):\n ''\n\n \n self.ssl_context=ssl_context\n super().__init__(host,port,user,password,readermode,\n usenetrc,timeout)\n \n def _create_socket(self,timeout):\n sock=super()._create_socket(timeout)\n try :\n sock=_encrypt_on(sock,self.ssl_context,self.host)\n except :\n sock.close()\n raise\n else :\n return sock\n \n __all__.append(\"NNTP_SSL\")\n \n \n \nif __name__ =='__main__':\n import argparse\n \n parser=argparse.ArgumentParser(description=\"\"\"\\\n nntplib built-in demo - display the latest articles in a newsgroup\"\"\")\n parser.add_argument('-g','--group',default='gmane.comp.python.general',\n help='group to fetch messages from (default: %(default)s)')\n parser.add_argument('-s','--server',default='news.gmane.io',\n help='NNTP server hostname (default: %(default)s)')\n parser.add_argument('-p','--port',default=-1,type=int,\n help='NNTP port number (default: %s / %s)'%(NNTP_PORT,NNTP_SSL_PORT))\n parser.add_argument('-n','--nb-articles',default=10,type=int,\n help='number of articles to fetch (default: %(default)s)')\n parser.add_argument('-S','--ssl',action='store_true',default=False ,\n help='use NNTP over SSL')\n args=parser.parse_args()\n \n port=args.port\n if not args.ssl:\n if port ==-1:\n port=NNTP_PORT\n s=NNTP(host=args.server,port=port)\n else :\n if port ==-1:\n port=NNTP_SSL_PORT\n s=NNTP_SSL(host=args.server,port=port)\n \n caps=s.getcapabilities()\n if 'STARTTLS'in caps:\n s.starttls()\n resp,count,first,last,name=s.group(args.group)\n print('Group',name,'has',count,'articles, range',first,'to',last)\n \n def cut(s,lim):\n if len(s)>lim:\n s=s[:lim -4]+\"...\"\n return s\n \n first=str(int(last)-args.nb_articles+1)\n resp,overviews=s.xover(first,last)\n for artnum,over in overviews:\n author=decode_header(over['from']).split('<',1)[0]\n subject=decode_header(over['subject'])\n lines=int(over[':lines'])\n print(\"{:7} {:20} {:42} ({})\".format(\n artnum,cut(author,20),cut(subject,42),lines)\n )\n \n s.quit()\n", ["argparse", "collections", "datetime", "email.header", "netrc", "re", "socket", "ssl", "sys", "warnings"]], "ntpath": [".py", "\n''\n\n\n\n\n\n\n\n\ncurdir='.'\npardir='..'\nextsep='.'\nsep='\\\\'\npathsep=';'\naltsep='/'\ndefpath='.;C:\\\\bin'\ndevnull='nul'\n\nimport os\nimport sys\nimport stat\nimport genericpath\nfrom genericpath import *\n\n\n__all__=[\"normcase\",\"isabs\",\"join\",\"splitdrive\",\"splitroot\",\"split\",\"splitext\",\n\"basename\",\"dirname\",\"commonprefix\",\"getsize\",\"getmtime\",\n\"getatime\",\"getctime\",\"islink\",\"exists\",\"lexists\",\"isdir\",\"isfile\",\n\"ismount\",\"expanduser\",\"expandvars\",\"normpath\",\"abspath\",\n\"curdir\",\"pardir\",\"sep\",\"pathsep\",\"defpath\",\"altsep\",\n\"extsep\",\"devnull\",\"realpath\",\"supports_unicode_filenames\",\"relpath\",\n\"samefile\",\"sameopenfile\",\"samestat\",\"commonpath\",\"isjunction\"]\n\ndef _get_bothseps(path):\n if isinstance(path,bytes):\n return b'\\\\/'\n else :\n return '\\\\/'\n \n \n \n \n \ntry :\n from _winapi import (\n LCMapStringEx as _LCMapStringEx,\n LOCALE_NAME_INVARIANT as _LOCALE_NAME_INVARIANT,\n LCMAP_LOWERCASE as _LCMAP_LOWERCASE)\n \n def normcase(s):\n ''\n\n\n \n s=os.fspath(s)\n if not s:\n return s\n if isinstance(s,bytes):\n encoding=sys.getfilesystemencoding()\n s=s.decode(encoding,'surrogateescape').replace('/','\\\\')\n s=_LCMapStringEx(_LOCALE_NAME_INVARIANT,\n _LCMAP_LOWERCASE,s)\n return s.encode(encoding,'surrogateescape')\n else :\n return _LCMapStringEx(_LOCALE_NAME_INVARIANT,\n _LCMAP_LOWERCASE,\n s.replace('/','\\\\'))\nexcept ImportError:\n def normcase(s):\n ''\n\n\n \n s=os.fspath(s)\n if isinstance(s,bytes):\n return os.fsencode(os.fsdecode(s).replace('/','\\\\').lower())\n return s.replace('/','\\\\').lower()\n \n \n \n \n \n \n \n \ndef isabs(s):\n ''\n s=os.fspath(s)\n if isinstance(s,bytes):\n sep=b'\\\\'\n altsep=b'/'\n colon_sep=b':\\\\'\n else :\n sep='\\\\'\n altsep='/'\n colon_sep=':\\\\'\n s=s[:3].replace(altsep,sep)\n \n \n if s.startswith(sep)or s.startswith(colon_sep,1):\n return True\n return False\n \n \n \ndef join(path,*paths):\n path=os.fspath(path)\n if isinstance(path,bytes):\n sep=b'\\\\'\n seps=b'\\\\/'\n colon=b':'\n else :\n sep='\\\\'\n seps='\\\\/'\n colon=':'\n try :\n if not paths:\n path[:0]+sep\n result_drive,result_root,result_path=splitroot(path)\n for p in map(os.fspath,paths):\n p_drive,p_root,p_path=splitroot(p)\n if p_root:\n \n if p_drive or not result_drive:\n result_drive=p_drive\n result_root=p_root\n result_path=p_path\n continue\n elif p_drive and p_drive !=result_drive:\n if p_drive.lower()!=result_drive.lower():\n \n result_drive=p_drive\n result_root=p_root\n result_path=p_path\n continue\n \n result_drive=p_drive\n \n if result_path and result_path[-1]not in seps:\n result_path=result_path+sep\n result_path=result_path+p_path\n \n if (result_path and not result_root and\n result_drive and result_drive[-1:]not in colon+seps):\n return result_drive+sep+result_path\n return result_drive+result_root+result_path\n except (TypeError,AttributeError,BytesWarning):\n genericpath._check_arg_types('join',path,*paths)\n raise\n \n \n \n \n \ndef splitdrive(p):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n drive,root,tail=splitroot(p)\n return drive,root+tail\n \n \ndef splitroot(p):\n ''\n\n\n\n\n\n\n\n\n \n p=os.fspath(p)\n if isinstance(p,bytes):\n sep=b'\\\\'\n altsep=b'/'\n colon=b':'\n unc_prefix=b'\\\\\\\\?\\\\UNC\\\\'\n empty=b''\n else :\n sep='\\\\'\n altsep='/'\n colon=':'\n unc_prefix='\\\\\\\\?\\\\UNC\\\\'\n empty=''\n normp=p.replace(altsep,sep)\n if normp[:1]==sep:\n if normp[1:2]==sep:\n \n \n start=8 if normp[:8].upper()==unc_prefix else 2\n index=normp.find(sep,start)\n if index ==-1:\n return p,empty,empty\n index2=normp.find(sep,index+1)\n if index2 ==-1:\n return p,empty,empty\n return p[:index2],p[index2:index2+1],p[index2+1:]\n else :\n \n return empty,p[:1],p[1:]\n elif normp[1:2]==colon:\n if normp[2:3]==sep:\n \n return p[:2],p[2:3],p[3:]\n else :\n \n return p[:2],empty,p[2:]\n else :\n \n return empty,empty,p\n \n \n \n \n \n \n \ndef split(p):\n ''\n\n\n \n p=os.fspath(p)\n seps=_get_bothseps(p)\n d,r,p=splitroot(p)\n \n i=len(p)\n while i and p[i -1]not in seps:\n i -=1\n head,tail=p[:i],p[i:]\n return d+r+head.rstrip(seps),tail\n \n \n \n \n \n \n \ndef splitext(p):\n p=os.fspath(p)\n if isinstance(p,bytes):\n return genericpath._splitext(p,b'\\\\',b'/',b'.')\n else :\n return genericpath._splitext(p,'\\\\','/','.')\nsplitext.__doc__=genericpath._splitext.__doc__\n\n\n\n\ndef basename(p):\n ''\n return split(p)[1]\n \n \n \n \ndef dirname(p):\n ''\n return split(p)[0]\n \n \n \n \nif hasattr(os.stat_result,'st_reparse_tag'):\n def isjunction(path):\n ''\n try :\n st=os.lstat(path)\n except (OSError,ValueError,AttributeError):\n return False\n return bool(st.st_reparse_tag ==stat.IO_REPARSE_TAG_MOUNT_POINT)\nelse :\n def isjunction(path):\n ''\n os.fspath(path)\n return False\n \n \n \n \ndef lexists(path):\n ''\n try :\n st=os.lstat(path)\n except (OSError,ValueError):\n return False\n return True\n \n \n \n \n \n \n \n \n \n \n \ntry :\n from nt import _getvolumepathname\nexcept ImportError:\n _getvolumepathname=None\ndef ismount(path):\n ''\n \n path=os.fspath(path)\n seps=_get_bothseps(path)\n path=abspath(path)\n drive,root,rest=splitroot(path)\n if drive and drive[0]in seps:\n return not rest\n if root and not rest:\n return True\n \n if _getvolumepathname:\n x=path.rstrip(seps)\n y=_getvolumepathname(path).rstrip(seps)\n return x.casefold()==y.casefold()\n else :\n return False\n \n \n \n \n \n \n \n \n \n \n \ndef expanduser(path):\n ''\n\n \n path=os.fspath(path)\n if isinstance(path,bytes):\n tilde=b'~'\n else :\n tilde='~'\n if not path.startswith(tilde):\n return path\n i,n=1,len(path)\n while i 0 and comps[i -1]!=pardir:\n del comps[i -1:i+1]\n i -=1\n elif i ==0 and root:\n del comps[i]\n else :\n i +=1\n else :\n i +=1\n \n if not prefix and not comps:\n comps.append(curdir)\n return prefix+sep.join(comps)\n \nelse :\n def normpath(path):\n ''\n path=os.fspath(path)\n if isinstance(path,bytes):\n return os.fsencode(_path_normpath(os.fsdecode(path)))or b\".\"\n return _path_normpath(path)or \".\"\n \n \ndef _abspath_fallback(path):\n ''\n\n\n\n \n \n path=os.fspath(path)\n if not isabs(path):\n if isinstance(path,bytes):\n cwd=os.getcwdb()\n else :\n cwd=os.getcwd()\n path=join(cwd,path)\n return normpath(path)\n \n \ntry :\n from nt import _getfullpathname\n \nexcept ImportError:\n abspath=_abspath_fallback\n \nelse :\n def abspath(path):\n ''\n try :\n return _getfullpathname(normpath(path))\n except (OSError,ValueError):\n return _abspath_fallback(path)\n \ntry :\n from nt import _getfinalpathname,readlink as _nt_readlink\nexcept ImportError:\n\n realpath=abspath\nelse :\n def _readlink_deep(path):\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n allowed_winerror=1,2,3,5,21,32,50,67,87,4390,4392,4393\n \n seen=set()\n while normcase(path)not in seen:\n seen.add(normcase(path))\n try :\n old_path=path\n path=_nt_readlink(path)\n \n \n if not isabs(path):\n \n \n \n if not islink(old_path):\n path=old_path\n break\n path=normpath(join(dirname(old_path),path))\n except OSError as ex:\n if ex.winerror in allowed_winerror:\n break\n raise\n except ValueError:\n \n break\n return path\n \n def _getfinalpathname_nonstrict(path):\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n allowed_winerror=1,2,3,5,21,32,50,53,65,67,87,123,161,1920,1921\n \n \n \n tail=path[:0]\n while path:\n try :\n path=_getfinalpathname(path)\n return join(path,tail)if tail else path\n except OSError as ex:\n if ex.winerror not in allowed_winerror:\n raise\n try :\n \n \n \n new_path=_readlink_deep(path)\n if new_path !=path:\n return join(new_path,tail)if tail else new_path\n except OSError:\n \n pass\n path,name=split(path)\n \n \n \n if path and not name:\n return path+tail\n tail=join(name,tail)if tail else name\n return tail\n \n def realpath(path,*,strict=False ):\n path=normpath(path)\n if isinstance(path,bytes):\n prefix=b'\\\\\\\\?\\\\'\n unc_prefix=b'\\\\\\\\?\\\\UNC\\\\'\n new_unc_prefix=b'\\\\\\\\'\n cwd=os.getcwdb()\n \n if normcase(path)==normcase(os.fsencode(devnull)):\n return b'\\\\\\\\.\\\\NUL'\n else :\n prefix='\\\\\\\\?\\\\'\n unc_prefix='\\\\\\\\?\\\\UNC\\\\'\n new_unc_prefix='\\\\\\\\'\n cwd=os.getcwd()\n \n if normcase(path)==normcase(devnull):\n return '\\\\\\\\.\\\\NUL'\n had_prefix=path.startswith(prefix)\n if not had_prefix and not isabs(path):\n path=join(cwd,path)\n try :\n path=_getfinalpathname(path)\n initial_winerror=0\n except OSError as ex:\n if strict:\n raise\n initial_winerror=ex.winerror\n path=_getfinalpathname_nonstrict(path)\n \n \n \n if not had_prefix and path.startswith(prefix):\n \n \n if path.startswith(unc_prefix):\n spath=new_unc_prefix+path[len(unc_prefix):]\n else :\n spath=path[len(prefix):]\n \n try :\n if _getfinalpathname(spath)==path:\n path=spath\n except OSError as ex:\n \n \n if ex.winerror ==initial_winerror:\n path=spath\n return path\n \n \n \nsupports_unicode_filenames=True\n\ndef relpath(path,start=None ):\n ''\n path=os.fspath(path)\n if isinstance(path,bytes):\n sep=b'\\\\'\n curdir=b'.'\n pardir=b'..'\n else :\n sep='\\\\'\n curdir='.'\n pardir='..'\n \n if start is None :\n start=curdir\n \n if not path:\n raise ValueError(\"no path specified\")\n \n start=os.fspath(start)\n try :\n start_abs=abspath(normpath(start))\n path_abs=abspath(normpath(path))\n start_drive,_,start_rest=splitroot(start_abs)\n path_drive,_,path_rest=splitroot(path_abs)\n if normcase(start_drive)!=normcase(path_drive):\n raise ValueError(\"path is on mount %r, start on mount %r\"%(\n path_drive,start_drive))\n \n start_list=[x for x in start_rest.split(sep)if x]\n path_list=[x for x in path_rest.split(sep)if x]\n \n i=0\n for e1,e2 in zip(start_list,path_list):\n if normcase(e1)!=normcase(e2):\n break\n i +=1\n \n rel_list=[pardir]*(len(start_list)-i)+path_list[i:]\n if not rel_list:\n return curdir\n return join(*rel_list)\n except (TypeError,ValueError,AttributeError,BytesWarning,DeprecationWarning):\n genericpath._check_arg_types('relpath',path,start)\n raise\n \n \n \n \n \n \n \n \n \n \n \n \ndef commonpath(paths):\n ''\n \n if not paths:\n raise ValueError('commonpath() arg is an empty sequence')\n \n paths=tuple(map(os.fspath,paths))\n if isinstance(paths[0],bytes):\n sep=b'\\\\'\n altsep=b'/'\n curdir=b'.'\n else :\n sep='\\\\'\n altsep='/'\n curdir='.'\n \n try :\n drivesplits=[splitroot(p.replace(altsep,sep).lower())for p in paths]\n split_paths=[p.split(sep)for d,r,p in drivesplits]\n \n if len({r for d,r,p in drivesplits})!=1:\n raise ValueError(\"Can't mix absolute and relative paths\")\n \n \n \n \n if len({d for d,r,p in drivesplits})!=1:\n raise ValueError(\"Paths don't have the same drive\")\n \n drive,root,path=splitroot(paths[0].replace(altsep,sep))\n common=path.split(sep)\n common=[c for c in common if c and c !=curdir]\n \n split_paths=[[c for c in s if c and c !=curdir]for s in split_paths]\n s1=min(split_paths)\n s2=max(split_paths)\n for i,c in enumerate(s1):\n if c !=s2[i]:\n common=common[:i]\n break\n else :\n common=common[:len(s1)]\n \n return drive+root+sep.join(common)\n except (TypeError,AttributeError):\n genericpath._check_arg_types('commonpath',*paths)\n raise\n \n \ntry :\n\n\n\n from nt import _path_isdir as isdir\n from nt import _path_isfile as isfile\n from nt import _path_islink as islink\n from nt import _path_exists as exists\nexcept ImportError:\n\n pass\n \n \ntry :\n from nt import _path_isdevdrive\nexcept ImportError:\n def isdevdrive(path):\n ''\n \n return False\nelse :\n def isdevdrive(path):\n ''\n try :\n return _path_isdevdrive(abspath(path))\n except OSError:\n return False\n", ["_winapi", "genericpath", "nt", "os", "stat", "string", "sys"]], "numbers": [".py", "\n\n\n\"\"\"Abstract Base Classes (ABCs) for numbers, according to PEP 3141.\n\nTODO: Fill out more detailed documentation on the operators.\"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfrom abc import ABCMeta,abstractmethod\n\n__all__=[\"Number\",\"Complex\",\"Real\",\"Rational\",\"Integral\"]\n\nclass Number(metaclass=ABCMeta):\n ''\n\n\n\n \n __slots__=()\n \n \n __hash__=None\n \n \n \n \n \n \n \n \n \n \nclass Complex(Number):\n ''\n\n\n\n\n\n\n\n \n \n __slots__=()\n \n @abstractmethod\n def __complex__(self):\n ''\n \n def __bool__(self):\n ''\n return self !=0\n \n @property\n @abstractmethod\n def real(self):\n ''\n\n\n \n raise NotImplementedError\n \n @property\n @abstractmethod\n def imag(self):\n ''\n\n\n \n raise NotImplementedError\n \n @abstractmethod\n def __add__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __radd__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __neg__(self):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __pos__(self):\n ''\n raise NotImplementedError\n \n def __sub__(self,other):\n ''\n return self+-other\n \n def __rsub__(self,other):\n ''\n return -self+other\n \n @abstractmethod\n def __mul__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rmul__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __truediv__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rtruediv__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __pow__(self,exponent):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rpow__(self,base):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __abs__(self):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def conjugate(self):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __eq__(self,other):\n ''\n raise NotImplementedError\n \nComplex.register(complex)\n\n\nclass Real(Complex):\n ''\n\n\n\n\n\n \n \n __slots__=()\n \n @abstractmethod\n def __float__(self):\n ''\n\n \n raise NotImplementedError\n \n @abstractmethod\n def __trunc__(self):\n ''\n\n\n\n\n\n\n\n \n raise NotImplementedError\n \n @abstractmethod\n def __floor__(self):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __ceil__(self):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __round__(self,ndigits=None ):\n ''\n\n\n\n \n raise NotImplementedError\n \n def __divmod__(self,other):\n ''\n\n\n\n \n return (self //other,self %other)\n \n def __rdivmod__(self,other):\n ''\n\n\n\n \n return (other //self,other %self)\n \n @abstractmethod\n def __floordiv__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rfloordiv__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __mod__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rmod__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __lt__(self,other):\n ''\n\n \n raise NotImplementedError\n \n @abstractmethod\n def __le__(self,other):\n ''\n raise NotImplementedError\n \n \n def __complex__(self):\n ''\n return complex(float(self))\n \n @property\n def real(self):\n ''\n return +self\n \n @property\n def imag(self):\n ''\n return 0\n \n def conjugate(self):\n ''\n return +self\n \nReal.register(float)\n\n\nclass Rational(Real):\n ''\n \n __slots__=()\n \n @property\n @abstractmethod\n def numerator(self):\n raise NotImplementedError\n \n @property\n @abstractmethod\n def denominator(self):\n raise NotImplementedError\n \n \n def __float__(self):\n ''\n\n\n\n\n\n \n return int(self.numerator)/int(self.denominator)\n \n \nclass Integral(Rational):\n ''\n\n\n\n \n \n __slots__=()\n \n @abstractmethod\n def __int__(self):\n ''\n raise NotImplementedError\n \n def __index__(self):\n ''\n return int(self)\n \n @abstractmethod\n def __pow__(self,exponent,modulus=None ):\n ''\n\n\n\n\n\n \n raise NotImplementedError\n \n @abstractmethod\n def __lshift__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rlshift__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rshift__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rrshift__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __and__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rand__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __xor__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __rxor__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __or__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __ror__(self,other):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def __invert__(self):\n ''\n raise NotImplementedError\n \n \n def __float__(self):\n ''\n return float(int(self))\n \n @property\n def numerator(self):\n ''\n return +self\n \n @property\n def denominator(self):\n ''\n return 1\n \nIntegral.register(int)\n", ["abc"]], "opcode": [".py", "\n\"\"\"\nopcode module - potentially shared between dis and other modules which\noperate on bytecodes (e.g. peephole optimizers).\n\"\"\"\n\n__all__=[\"cmp_op\",\"hasarg\",\"hasconst\",\"hasname\",\"hasjrel\",\"hasjabs\",\n\"haslocal\",\"hascompare\",\"hasfree\",\"hasexc\",\"opname\",\"opmap\",\n\"HAVE_ARGUMENT\",\"EXTENDED_ARG\"]\n\n\n\n\n\n\n\n\ntry :\n from _opcode import stack_effect\n __all__.append('stack_effect')\nexcept ImportError:\n pass\n \ncmp_op=('<','<=','==','!=','>','>=')\n\nhasarg=[]\nhasconst=[]\nhasname=[]\nhasjrel=[]\nhasjabs=[]\nhaslocal=[]\nhascompare=[]\nhasfree=[]\nhasexc=[]\n\n\nENABLE_SPECIALIZATION=True\n\ndef is_pseudo(op):\n return op >=MIN_PSEUDO_OPCODE and op <=MAX_PSEUDO_OPCODE\n \noplists=[hasarg,hasconst,hasname,hasjrel,hasjabs,\nhaslocal,hascompare,hasfree,hasexc]\n\nopmap={}\n\n\n\n_pseudo_ops={}\n\ndef def_op(name,op):\n opmap[name]=op\n \ndef name_op(name,op):\n def_op(name,op)\n hasname.append(op)\n \ndef jrel_op(name,op):\n def_op(name,op)\n hasjrel.append(op)\n \ndef jabs_op(name,op):\n def_op(name,op)\n hasjabs.append(op)\n \ndef pseudo_op(name,op,real_ops):\n def_op(name,op)\n _pseudo_ops[name]=real_ops\n \n for oplist in oplists:\n res=[opmap[rop]in oplist for rop in real_ops]\n if any(res):\n assert all(res)\n oplist.append(op)\n \n \n \n \n \ndef_op('CACHE',0)\ndef_op('POP_TOP',1)\ndef_op('PUSH_NULL',2)\ndef_op('INTERPRETER_EXIT',3)\n\ndef_op('END_FOR',4)\ndef_op('END_SEND',5)\n\ndef_op('NOP',9)\n\ndef_op('UNARY_NEGATIVE',11)\ndef_op('UNARY_NOT',12)\n\ndef_op('UNARY_INVERT',15)\n\n\n\ndef_op('RESERVED',17)\n\ndef_op('BINARY_SUBSCR',25)\ndef_op('BINARY_SLICE',26)\ndef_op('STORE_SLICE',27)\n\ndef_op('GET_LEN',30)\ndef_op('MATCH_MAPPING',31)\ndef_op('MATCH_SEQUENCE',32)\ndef_op('MATCH_KEYS',33)\n\ndef_op('PUSH_EXC_INFO',35)\ndef_op('CHECK_EXC_MATCH',36)\ndef_op('CHECK_EG_MATCH',37)\n\ndef_op('WITH_EXCEPT_START',49)\ndef_op('GET_AITER',50)\ndef_op('GET_ANEXT',51)\ndef_op('BEFORE_ASYNC_WITH',52)\ndef_op('BEFORE_WITH',53)\ndef_op('END_ASYNC_FOR',54)\ndef_op('CLEANUP_THROW',55)\n\ndef_op('STORE_SUBSCR',60)\ndef_op('DELETE_SUBSCR',61)\n\ndef_op('GET_ITER',68)\ndef_op('GET_YIELD_FROM_ITER',69)\n\ndef_op('LOAD_BUILD_CLASS',71)\n\ndef_op('LOAD_ASSERTION_ERROR',74)\ndef_op('RETURN_GENERATOR',75)\n\ndef_op('RETURN_VALUE',83)\n\ndef_op('SETUP_ANNOTATIONS',85)\ndef_op('LOAD_LOCALS',87)\n\ndef_op('POP_EXCEPT',89)\n\nHAVE_ARGUMENT=90\n\nname_op('STORE_NAME',90)\nname_op('DELETE_NAME',91)\ndef_op('UNPACK_SEQUENCE',92)\njrel_op('FOR_ITER',93)\ndef_op('UNPACK_EX',94)\nname_op('STORE_ATTR',95)\nname_op('DELETE_ATTR',96)\nname_op('STORE_GLOBAL',97)\nname_op('DELETE_GLOBAL',98)\ndef_op('SWAP',99)\ndef_op('LOAD_CONST',100)\nhasconst.append(100)\nname_op('LOAD_NAME',101)\ndef_op('BUILD_TUPLE',102)\ndef_op('BUILD_LIST',103)\ndef_op('BUILD_SET',104)\ndef_op('BUILD_MAP',105)\nname_op('LOAD_ATTR',106)\ndef_op('COMPARE_OP',107)\nhascompare.append(107)\nname_op('IMPORT_NAME',108)\nname_op('IMPORT_FROM',109)\njrel_op('JUMP_FORWARD',110)\njrel_op('POP_JUMP_IF_FALSE',114)\njrel_op('POP_JUMP_IF_TRUE',115)\nname_op('LOAD_GLOBAL',116)\ndef_op('IS_OP',117)\ndef_op('CONTAINS_OP',118)\ndef_op('RERAISE',119)\ndef_op('COPY',120)\ndef_op('RETURN_CONST',121)\nhasconst.append(121)\ndef_op('BINARY_OP',122)\njrel_op('SEND',123)\ndef_op('LOAD_FAST',124)\nhaslocal.append(124)\ndef_op('STORE_FAST',125)\nhaslocal.append(125)\ndef_op('DELETE_FAST',126)\nhaslocal.append(126)\ndef_op('LOAD_FAST_CHECK',127)\nhaslocal.append(127)\njrel_op('POP_JUMP_IF_NOT_NONE',128)\njrel_op('POP_JUMP_IF_NONE',129)\ndef_op('RAISE_VARARGS',130)\ndef_op('GET_AWAITABLE',131)\ndef_op('MAKE_FUNCTION',132)\ndef_op('BUILD_SLICE',133)\njrel_op('JUMP_BACKWARD_NO_INTERRUPT',134)\ndef_op('MAKE_CELL',135)\nhasfree.append(135)\ndef_op('LOAD_CLOSURE',136)\nhasfree.append(136)\ndef_op('LOAD_DEREF',137)\nhasfree.append(137)\ndef_op('STORE_DEREF',138)\nhasfree.append(138)\ndef_op('DELETE_DEREF',139)\nhasfree.append(139)\njrel_op('JUMP_BACKWARD',140)\nname_op('LOAD_SUPER_ATTR',141)\ndef_op('CALL_FUNCTION_EX',142)\ndef_op('LOAD_FAST_AND_CLEAR',143)\nhaslocal.append(143)\n\ndef_op('EXTENDED_ARG',144)\nEXTENDED_ARG=144\ndef_op('LIST_APPEND',145)\ndef_op('SET_ADD',146)\ndef_op('MAP_ADD',147)\nhasfree.append(148)\ndef_op('COPY_FREE_VARS',149)\ndef_op('YIELD_VALUE',150)\ndef_op('RESUME',151)\ndef_op('MATCH_CLASS',152)\n\ndef_op('FORMAT_VALUE',155)\ndef_op('BUILD_CONST_KEY_MAP',156)\ndef_op('BUILD_STRING',157)\n\ndef_op('LIST_EXTEND',162)\ndef_op('SET_UPDATE',163)\ndef_op('DICT_MERGE',164)\ndef_op('DICT_UPDATE',165)\n\ndef_op('CALL',171)\ndef_op('KW_NAMES',172)\nhasconst.append(172)\ndef_op('CALL_INTRINSIC_1',173)\ndef_op('CALL_INTRINSIC_2',174)\n\nname_op('LOAD_FROM_DICT_OR_GLOBALS',175)\ndef_op('LOAD_FROM_DICT_OR_DEREF',176)\nhasfree.append(176)\n\n\nMIN_INSTRUMENTED_OPCODE=237\n\ndef_op('INSTRUMENTED_LOAD_SUPER_ATTR',237)\ndef_op('INSTRUMENTED_POP_JUMP_IF_NONE',238)\ndef_op('INSTRUMENTED_POP_JUMP_IF_NOT_NONE',239)\ndef_op('INSTRUMENTED_RESUME',240)\ndef_op('INSTRUMENTED_CALL',241)\ndef_op('INSTRUMENTED_RETURN_VALUE',242)\ndef_op('INSTRUMENTED_YIELD_VALUE',243)\ndef_op('INSTRUMENTED_CALL_FUNCTION_EX',244)\ndef_op('INSTRUMENTED_JUMP_FORWARD',245)\ndef_op('INSTRUMENTED_JUMP_BACKWARD',246)\ndef_op('INSTRUMENTED_RETURN_CONST',247)\ndef_op('INSTRUMENTED_FOR_ITER',248)\ndef_op('INSTRUMENTED_POP_JUMP_IF_FALSE',249)\ndef_op('INSTRUMENTED_POP_JUMP_IF_TRUE',250)\ndef_op('INSTRUMENTED_END_FOR',251)\ndef_op('INSTRUMENTED_END_SEND',252)\ndef_op('INSTRUMENTED_INSTRUCTION',253)\ndef_op('INSTRUMENTED_LINE',254)\n\n\nhasarg.extend([op for op in opmap.values()if op >=HAVE_ARGUMENT])\n\nMIN_PSEUDO_OPCODE=256\n\npseudo_op('SETUP_FINALLY',256,['NOP'])\nhasexc.append(256)\npseudo_op('SETUP_CLEANUP',257,['NOP'])\nhasexc.append(257)\npseudo_op('SETUP_WITH',258,['NOP'])\nhasexc.append(258)\npseudo_op('POP_BLOCK',259,['NOP'])\n\npseudo_op('JUMP',260,['JUMP_FORWARD','JUMP_BACKWARD'])\npseudo_op('JUMP_NO_INTERRUPT',261,['JUMP_FORWARD','JUMP_BACKWARD_NO_INTERRUPT'])\n\npseudo_op('LOAD_METHOD',262,['LOAD_ATTR'])\npseudo_op('LOAD_SUPER_METHOD',263,['LOAD_SUPER_ATTR'])\npseudo_op('LOAD_ZERO_SUPER_METHOD',264,['LOAD_SUPER_ATTR'])\npseudo_op('LOAD_ZERO_SUPER_ATTR',265,['LOAD_SUPER_ATTR'])\n\npseudo_op('STORE_FAST_MAYBE_NULL',266,['STORE_FAST'])\n\nMAX_PSEUDO_OPCODE=MIN_PSEUDO_OPCODE+len(_pseudo_ops)-1\n\ndel def_op,name_op,jrel_op,jabs_op,pseudo_op\n\nopname=['<%r>'%(op,)for op in range(MAX_PSEUDO_OPCODE+1)]\nfor op,i in opmap.items():\n opname[i]=op\n \n \n_nb_ops=[\n(\"NB_ADD\",\"+\"),\n(\"NB_AND\",\"&\"),\n(\"NB_FLOOR_DIVIDE\",\"//\"),\n(\"NB_LSHIFT\",\"<<\"),\n(\"NB_MATRIX_MULTIPLY\",\"@\"),\n(\"NB_MULTIPLY\",\"*\"),\n(\"NB_REMAINDER\",\"%\"),\n(\"NB_OR\",\"|\"),\n(\"NB_POWER\",\"**\"),\n(\"NB_RSHIFT\",\">>\"),\n(\"NB_SUBTRACT\",\"-\"),\n(\"NB_TRUE_DIVIDE\",\"/\"),\n(\"NB_XOR\",\"^\"),\n(\"NB_INPLACE_ADD\",\"+=\"),\n(\"NB_INPLACE_AND\",\"&=\"),\n(\"NB_INPLACE_FLOOR_DIVIDE\",\"//=\"),\n(\"NB_INPLACE_LSHIFT\",\"<<=\"),\n(\"NB_INPLACE_MATRIX_MULTIPLY\",\"@=\"),\n(\"NB_INPLACE_MULTIPLY\",\"*=\"),\n(\"NB_INPLACE_REMAINDER\",\"%=\"),\n(\"NB_INPLACE_OR\",\"|=\"),\n(\"NB_INPLACE_POWER\",\"**=\"),\n(\"NB_INPLACE_RSHIFT\",\">>=\"),\n(\"NB_INPLACE_SUBTRACT\",\"-=\"),\n(\"NB_INPLACE_TRUE_DIVIDE\",\"/=\"),\n(\"NB_INPLACE_XOR\",\"^=\"),\n]\n\n_intrinsic_1_descs=[\n\"INTRINSIC_1_INVALID\",\n\"INTRINSIC_PRINT\",\n\"INTRINSIC_IMPORT_STAR\",\n\"INTRINSIC_STOPITERATION_ERROR\",\n\"INTRINSIC_ASYNC_GEN_WRAP\",\n\"INTRINSIC_UNARY_POSITIVE\",\n\"INTRINSIC_LIST_TO_TUPLE\",\n\"INTRINSIC_TYPEVAR\",\n\"INTRINSIC_PARAMSPEC\",\n\"INTRINSIC_TYPEVARTUPLE\",\n\"INTRINSIC_SUBSCRIPT_GENERIC\",\n\"INTRINSIC_TYPEALIAS\",\n]\n\n_intrinsic_2_descs=[\n\"INTRINSIC_2_INVALID\",\n\"INTRINSIC_PREP_RERAISE_STAR\",\n\"INTRINSIC_TYPEVAR_WITH_BOUND\",\n\"INTRINSIC_TYPEVAR_WITH_CONSTRAINTS\",\n\"INTRINSIC_SET_FUNCTION_TYPE_PARAMS\",\n]\n\n_specializations={\n\"BINARY_OP\":[\n\"BINARY_OP_ADD_FLOAT\",\n\"BINARY_OP_ADD_INT\",\n\"BINARY_OP_ADD_UNICODE\",\n\"BINARY_OP_INPLACE_ADD_UNICODE\",\n\"BINARY_OP_MULTIPLY_FLOAT\",\n\"BINARY_OP_MULTIPLY_INT\",\n\"BINARY_OP_SUBTRACT_FLOAT\",\n\"BINARY_OP_SUBTRACT_INT\",\n],\n\"BINARY_SUBSCR\":[\n\"BINARY_SUBSCR_DICT\",\n\"BINARY_SUBSCR_GETITEM\",\n\"BINARY_SUBSCR_LIST_INT\",\n\"BINARY_SUBSCR_TUPLE_INT\",\n],\n\"CALL\":[\n\"CALL_PY_EXACT_ARGS\",\n\"CALL_PY_WITH_DEFAULTS\",\n\"CALL_BOUND_METHOD_EXACT_ARGS\",\n\"CALL_BUILTIN_CLASS\",\n\"CALL_BUILTIN_FAST_WITH_KEYWORDS\",\n\"CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS\",\n\"CALL_NO_KW_BUILTIN_FAST\",\n\"CALL_NO_KW_BUILTIN_O\",\n\"CALL_NO_KW_ISINSTANCE\",\n\"CALL_NO_KW_LEN\",\n\"CALL_NO_KW_LIST_APPEND\",\n\"CALL_NO_KW_METHOD_DESCRIPTOR_FAST\",\n\"CALL_NO_KW_METHOD_DESCRIPTOR_NOARGS\",\n\"CALL_NO_KW_METHOD_DESCRIPTOR_O\",\n\"CALL_NO_KW_STR_1\",\n\"CALL_NO_KW_TUPLE_1\",\n\"CALL_NO_KW_TYPE_1\",\n],\n\"COMPARE_OP\":[\n\"COMPARE_OP_FLOAT\",\n\"COMPARE_OP_INT\",\n\"COMPARE_OP_STR\",\n],\n\"FOR_ITER\":[\n\"FOR_ITER_LIST\",\n\"FOR_ITER_TUPLE\",\n\"FOR_ITER_RANGE\",\n\"FOR_ITER_GEN\",\n],\n\"LOAD_SUPER_ATTR\":[\n\"LOAD_SUPER_ATTR_ATTR\",\n\"LOAD_SUPER_ATTR_METHOD\",\n],\n\"LOAD_ATTR\":[\n\n\"LOAD_ATTR_CLASS\",\n\"LOAD_ATTR_GETATTRIBUTE_OVERRIDDEN\",\n\"LOAD_ATTR_INSTANCE_VALUE\",\n\"LOAD_ATTR_MODULE\",\n\"LOAD_ATTR_PROPERTY\",\n\"LOAD_ATTR_SLOT\",\n\"LOAD_ATTR_WITH_HINT\",\n\n\"LOAD_ATTR_METHOD_LAZY_DICT\",\n\"LOAD_ATTR_METHOD_NO_DICT\",\n\"LOAD_ATTR_METHOD_WITH_VALUES\",\n],\n\"LOAD_CONST\":[\n\"LOAD_CONST__LOAD_FAST\",\n],\n\"LOAD_FAST\":[\n\"LOAD_FAST__LOAD_CONST\",\n\"LOAD_FAST__LOAD_FAST\",\n],\n\"LOAD_GLOBAL\":[\n\"LOAD_GLOBAL_BUILTIN\",\n\"LOAD_GLOBAL_MODULE\",\n],\n\"STORE_ATTR\":[\n\"STORE_ATTR_INSTANCE_VALUE\",\n\"STORE_ATTR_SLOT\",\n\"STORE_ATTR_WITH_HINT\",\n],\n\"STORE_FAST\":[\n\"STORE_FAST__LOAD_FAST\",\n\"STORE_FAST__STORE_FAST\",\n],\n\"STORE_SUBSCR\":[\n\"STORE_SUBSCR_DICT\",\n\"STORE_SUBSCR_LIST_INT\",\n],\n\"UNPACK_SEQUENCE\":[\n\"UNPACK_SEQUENCE_LIST\",\n\"UNPACK_SEQUENCE_TUPLE\",\n\"UNPACK_SEQUENCE_TWO_TUPLE\",\n],\n\"SEND\":[\n\"SEND_GEN\",\n],\n}\n_specialized_instructions=[\nopcode for family in _specializations.values()for opcode in family\n]\n\n_cache_format={\n\"LOAD_GLOBAL\":{\n\"counter\":1,\n\"index\":1,\n\"module_keys_version\":1,\n\"builtin_keys_version\":1,\n},\n\"BINARY_OP\":{\n\"counter\":1,\n},\n\"UNPACK_SEQUENCE\":{\n\"counter\":1,\n},\n\"COMPARE_OP\":{\n\"counter\":1,\n},\n\"BINARY_SUBSCR\":{\n\"counter\":1,\n},\n\"FOR_ITER\":{\n\"counter\":1,\n},\n\"LOAD_SUPER_ATTR\":{\n\"counter\":1,\n},\n\"LOAD_ATTR\":{\n\"counter\":1,\n\"version\":2,\n\"keys_version\":2,\n\"descr\":4,\n},\n\"STORE_ATTR\":{\n\"counter\":1,\n\"version\":2,\n\"index\":1,\n},\n\"CALL\":{\n\"counter\":1,\n\"func_version\":2,\n},\n\"STORE_SUBSCR\":{\n\"counter\":1,\n},\n\"SEND\":{\n\"counter\":1,\n},\n}\n\n_inline_cache_entries=[\nsum(_cache_format.get(opname[opcode],{}).values())for opcode in range(256)\n]\n", ["_opcode"]], "operator": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n__all__=['abs','add','and_','attrgetter','call','concat','contains','countOf',\n'delitem','eq','floordiv','ge','getitem','gt','iadd','iand',\n'iconcat','ifloordiv','ilshift','imatmul','imod','imul',\n'index','indexOf','inv','invert','ior','ipow','irshift',\n'is_','is_not','isub','itemgetter','itruediv','ixor','le',\n'length_hint','lshift','lt','matmul','methodcaller','mod',\n'mul','ne','neg','not_','or_','pos','pow','rshift',\n'setitem','sub','truediv','truth','xor']\n\nfrom builtins import abs as _abs\n\n\n\n\ndef lt(a,b):\n ''\n return a =b\n \ndef gt(a,b):\n ''\n return a >b\n \n \n \ndef not_(a):\n ''\n return not a\n \ndef truth(a):\n ''\n return True if a else False\n \ndef is_(a,b):\n ''\n return a is b\n \ndef is_not(a,b):\n ''\n return a is not b\n \n \n \ndef abs(a):\n ''\n return _abs(a)\n \ndef add(a,b):\n ''\n return a+b\n \ndef and_(a,b):\n ''\n return a&b\n \ndef floordiv(a,b):\n ''\n return a //b\n \ndef index(a):\n ''\n return a.__index__()\n \ndef inv(a):\n ''\n return ~a\ninvert=inv\n\ndef lshift(a,b):\n ''\n return a <>b\n \ndef sub(a,b):\n ''\n return a -b\n \ndef truediv(a,b):\n ''\n return a /b\n \ndef xor(a,b):\n ''\n return a ^b\n \n \n \ndef concat(a,b):\n ''\n if not hasattr(a,'__getitem__'):\n msg=\"'%s' object can't be concatenated\"%type(a).__name__\n raise TypeError(msg)\n return a+b\n \ndef contains(a,b):\n ''\n return b in a\n \ndef countOf(a,b):\n ''\n count=0\n for i in a:\n if i is b or i ==b:\n count +=1\n return count\n \ndef delitem(a,b):\n ''\n del a[b]\n \ndef getitem(a,b):\n ''\n return a[b]\n \ndef indexOf(a,b):\n ''\n for i,j in enumerate(a):\n if j is b or j ==b:\n return i\n else :\n raise ValueError('sequence.index(x): x not in sequence')\n \ndef setitem(a,b,c):\n ''\n a[b]=c\n \ndef length_hint(obj,default=0):\n ''\n\n\n\n\n\n\n \n if not isinstance(default,int):\n msg=(\"'%s' object cannot be interpreted as an integer\"%\n type(default).__name__)\n raise TypeError(msg)\n \n try :\n return len(obj)\n except TypeError:\n pass\n \n try :\n hint=type(obj).__length_hint__\n except AttributeError:\n return default\n \n try :\n val=hint(obj)\n except TypeError:\n return default\n if val is NotImplemented:\n return default\n if not isinstance(val,int):\n msg=('__length_hint__ must be integer, not %s'%\n type(val).__name__)\n raise TypeError(msg)\n if val <0:\n msg='__length_hint__() should return >= 0'\n raise ValueError(msg)\n return val\n \n \n \ndef call(obj,/,*args,**kwargs):\n ''\n return obj(*args,**kwargs)\n \n \n \nclass attrgetter:\n ''\n\n\n\n\n\n \n __slots__=('_attrs','_call')\n \n def __init__(self,attr,*attrs):\n if not attrs:\n if not isinstance(attr,str):\n raise TypeError('attribute name must be a string')\n self._attrs=(attr,)\n names=attr.split('.')\n def func(obj):\n for name in names:\n obj=getattr(obj,name)\n return obj\n self._call=func\n else :\n self._attrs=(attr,)+attrs\n getters=tuple(map(attrgetter,self._attrs))\n def func(obj):\n return tuple(getter(obj)for getter in getters)\n self._call=func\n \n def __call__(self,obj):\n return self._call(obj)\n \n def __repr__(self):\n return '%s.%s(%s)'%(self.__class__.__module__,\n self.__class__.__qualname__,\n ', '.join(map(repr,self._attrs)))\n \n def __reduce__(self):\n return self.__class__,self._attrs\n \nclass itemgetter:\n ''\n\n\n\n \n __slots__=('_items','_call')\n \n def __init__(self,item,*items):\n if not items:\n self._items=(item,)\n def func(obj):\n return obj[item]\n self._call=func\n else :\n self._items=items=(item,)+items\n def func(obj):\n return tuple(obj[i]for i in items)\n self._call=func\n \n def __call__(self,obj):\n return self._call(obj)\n \n def __repr__(self):\n return '%s.%s(%s)'%(self.__class__.__module__,\n self.__class__.__name__,\n ', '.join(map(repr,self._items)))\n \n def __reduce__(self):\n return self.__class__,self._items\n \nclass methodcaller:\n ''\n\n\n\n\n \n __slots__=('_name','_args','_kwargs')\n \n def __init__(self,name,/,*args,**kwargs):\n self._name=name\n if not isinstance(self._name,str):\n raise TypeError('method name must be a string')\n self._args=args\n self._kwargs=kwargs\n \n def __call__(self,obj):\n return getattr(obj,self._name)(*self._args,**self._kwargs)\n \n def __repr__(self):\n args=[repr(self._name)]\n args.extend(map(repr,self._args))\n args.extend('%s=%r'%(k,v)for k,v in self._kwargs.items())\n return '%s.%s(%s)'%(self.__class__.__module__,\n self.__class__.__name__,\n ', '.join(args))\n \n def __reduce__(self):\n if not self._kwargs:\n return self.__class__,(self._name,)+self._args\n else :\n from functools import partial\n return partial(self.__class__,self._name,**self._kwargs),self._args\n \n \n \n \ndef iadd(a,b):\n ''\n a +=b\n return a\n \ndef iand(a,b):\n ''\n a &=b\n return a\n \ndef iconcat(a,b):\n ''\n if not hasattr(a,'__getitem__'):\n msg=\"'%s' object can't be concatenated\"%type(a).__name__\n raise TypeError(msg)\n a +=b\n return a\n \ndef ifloordiv(a,b):\n ''\n a //=b\n return a\n \ndef ilshift(a,b):\n ''\n a <<=b\n return a\n \ndef imod(a,b):\n ''\n a %=b\n return a\n \ndef imul(a,b):\n ''\n a *=b\n return a\n \ndef imatmul(a,b):\n ''\n a @=b\n return a\n \ndef ior(a,b):\n ''\n a |=b\n return a\n \ndef ipow(a,b):\n ''\n a **=b\n return a\n \ndef irshift(a,b):\n ''\n a >>=b\n return a\n \ndef isub(a,b):\n ''\n a -=b\n return a\n \ndef itruediv(a,b):\n ''\n a /=b\n return a\n \ndef ixor(a,b):\n ''\n a ^=b\n return a\n \n \ntry :\n from _operator import *\nexcept ImportError:\n pass\nelse :\n from _operator import __doc__\n \n \n \n__lt__=lt\n__le__=le\n__eq__=eq\n__ne__=ne\n__ge__=ge\n__gt__=gt\n__not__=not_\n__abs__=abs\n__add__=add\n__and__=and_\n__call__=call\n__floordiv__=floordiv\n__index__=index\n__inv__=inv\n__invert__=invert\n__lshift__=lshift\n__mod__=mod\n__mul__=mul\n__matmul__=matmul\n__neg__=neg\n__or__=or_\n__pos__=pos\n__pow__=pow\n__rshift__=rshift\n__sub__=sub\n__truediv__=truediv\n__xor__=xor\n__concat__=concat\n__contains__=contains\n__delitem__=delitem\n__getitem__=getitem\n__setitem__=setitem\n__iadd__=iadd\n__iand__=iand\n__iconcat__=iconcat\n__ifloordiv__=ifloordiv\n__ilshift__=ilshift\n__imod__=imod\n__imul__=imul\n__imatmul__=imatmul\n__ior__=ior\n__ipow__=ipow\n__irshift__=irshift\n__isub__=isub\n__itruediv__=itruediv\n__ixor__=ixor\n", ["_operator", "builtins", "functools"]], "optparse": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__version__=\"1.5.3\"\n\n__all__=['Option',\n'make_option',\n'SUPPRESS_HELP',\n'SUPPRESS_USAGE',\n'Values',\n'OptionContainer',\n'OptionGroup',\n'OptionParser',\n'HelpFormatter',\n'IndentedHelpFormatter',\n'TitledHelpFormatter',\n'OptParseError',\n'OptionError',\n'OptionConflictError',\n'OptionValueError',\n'BadOptionError',\n'check_choice']\n\n__copyright__=\"\"\"\nCopyright (c) 2001-2006 Gregory P. Ward. All rights reserved.\nCopyright (c) 2002-2006 Python Software Foundation. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are\nmet:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in the\n documentation and/or other materials provided with the distribution.\n\n * Neither the name of the author nor the names of its\n contributors may be used to endorse or promote products derived from\n this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\nIS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\nTO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\nPARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\"\"\"\n\nimport sys,os\nimport textwrap\n\ndef _repr(self):\n return \"<%s at 0x%x: %s>\"%(self.__class__.__name__,id(self),self)\n \n \n \n \n \n \n \n \ntry :\n from gettext import gettext,ngettext\nexcept ImportError:\n def gettext(message):\n return message\n \n def ngettext(singular,plural,n):\n if n ==1:\n return singular\n return plural\n \n_=gettext\n\n\nclass OptParseError(Exception):\n def __init__(self,msg):\n self.msg=msg\n \n def __str__(self):\n return self.msg\n \n \nclass OptionError(OptParseError):\n ''\n\n\n \n \n def __init__(self,msg,option):\n self.msg=msg\n self.option_id=str(option)\n \n def __str__(self):\n if self.option_id:\n return \"option %s: %s\"%(self.option_id,self.msg)\n else :\n return self.msg\n \nclass OptionConflictError(OptionError):\n ''\n\n \n \nclass OptionValueError(OptParseError):\n ''\n\n\n \n \nclass BadOptionError(OptParseError):\n ''\n\n \n def __init__(self,opt_str):\n self.opt_str=opt_str\n \n def __str__(self):\n return _(\"no such option: %s\")%self.opt_str\n \nclass AmbiguousOptionError(BadOptionError):\n ''\n\n \n def __init__(self,opt_str,possibilities):\n BadOptionError.__init__(self,opt_str)\n self.possibilities=possibilities\n \n def __str__(self):\n return (_(\"ambiguous option: %s (%s?)\")\n %(self.opt_str,\", \".join(self.possibilities)))\n \n \nclass HelpFormatter:\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n NO_DEFAULT_VALUE=\"none\"\n \n def __init__(self,\n indent_increment,\n max_help_position,\n width,\n short_first):\n self.parser=None\n self.indent_increment=indent_increment\n if width is None :\n try :\n width=int(os.environ['COLUMNS'])\n except (KeyError,ValueError):\n width=80\n width -=2\n self.width=width\n self.help_position=self.max_help_position=\\\n min(max_help_position,max(width -20,indent_increment *2))\n self.current_indent=0\n self.level=0\n self.help_width=None\n self.short_first=short_first\n self.default_tag=\"%default\"\n self.option_strings={}\n self._short_opt_fmt=\"%s %s\"\n self._long_opt_fmt=\"%s=%s\"\n \n def set_parser(self,parser):\n self.parser=parser\n \n def set_short_opt_delimiter(self,delim):\n if delim not in (\"\",\" \"):\n raise ValueError(\n \"invalid metavar delimiter for short options: %r\"%delim)\n self._short_opt_fmt=\"%s\"+delim+\"%s\"\n \n def set_long_opt_delimiter(self,delim):\n if delim not in (\"=\",\" \"):\n raise ValueError(\n \"invalid metavar delimiter for long options: %r\"%delim)\n self._long_opt_fmt=\"%s\"+delim+\"%s\"\n \n def indent(self):\n self.current_indent +=self.indent_increment\n self.level +=1\n \n def dedent(self):\n self.current_indent -=self.indent_increment\n assert self.current_indent >=0,\"Indent decreased below 0.\"\n self.level -=1\n \n def format_usage(self,usage):\n raise NotImplementedError(\"subclasses must implement\")\n \n def format_heading(self,heading):\n raise NotImplementedError(\"subclasses must implement\")\n \n def _format_text(self,text):\n ''\n\n\n \n text_width=max(self.width -self.current_indent,11)\n indent=\" \"*self.current_indent\n return textwrap.fill(text,\n text_width,\n initial_indent=indent,\n subsequent_indent=indent)\n \n def format_description(self,description):\n if description:\n return self._format_text(description)+\"\\n\"\n else :\n return \"\"\n \n def format_epilog(self,epilog):\n if epilog:\n return \"\\n\"+self._format_text(epilog)+\"\\n\"\n else :\n return \"\"\n \n \n def expand_default(self,option):\n if self.parser is None or not self.default_tag:\n return option.help\n \n default_value=self.parser.defaults.get(option.dest)\n if default_value is NO_DEFAULT or default_value is None :\n default_value=self.NO_DEFAULT_VALUE\n \n return option.help.replace(self.default_tag,str(default_value))\n \n def format_option(self,option):\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n result=[]\n opts=self.option_strings[option]\n opt_width=self.help_position -self.current_indent -2\n if len(opts)>opt_width:\n opts=\"%*s%s\\n\"%(self.current_indent,\"\",opts)\n indent_first=self.help_position\n else :\n opts=\"%*s%-*s \"%(self.current_indent,\"\",opt_width,opts)\n indent_first=0\n result.append(opts)\n if option.help:\n help_text=self.expand_default(option)\n help_lines=textwrap.wrap(help_text,self.help_width)\n result.append(\"%*s%s\\n\"%(indent_first,\"\",help_lines[0]))\n result.extend([\"%*s%s\\n\"%(self.help_position,\"\",line)\n for line in help_lines[1:]])\n elif opts[-1]!=\"\\n\":\n result.append(\"\\n\")\n return \"\".join(result)\n \n def store_option_strings(self,parser):\n self.indent()\n max_len=0\n for opt in parser.option_list:\n strings=self.format_option_strings(opt)\n self.option_strings[opt]=strings\n max_len=max(max_len,len(strings)+self.current_indent)\n self.indent()\n for group in parser.option_groups:\n for opt in group.option_list:\n strings=self.format_option_strings(opt)\n self.option_strings[opt]=strings\n max_len=max(max_len,len(strings)+self.current_indent)\n self.dedent()\n self.dedent()\n self.help_position=min(max_len+2,self.max_help_position)\n self.help_width=max(self.width -self.help_position,11)\n \n def format_option_strings(self,option):\n ''\n if option.takes_value():\n metavar=option.metavar or option.dest.upper()\n short_opts=[self._short_opt_fmt %(sopt,metavar)\n for sopt in option._short_opts]\n long_opts=[self._long_opt_fmt %(lopt,metavar)\n for lopt in option._long_opts]\n else :\n short_opts=option._short_opts\n long_opts=option._long_opts\n \n if self.short_first:\n opts=short_opts+long_opts\n else :\n opts=long_opts+short_opts\n \n return \", \".join(opts)\n \nclass IndentedHelpFormatter(HelpFormatter):\n ''\n \n \n def __init__(self,\n indent_increment=2,\n max_help_position=24,\n width=None ,\n short_first=1):\n HelpFormatter.__init__(\n self,indent_increment,max_help_position,width,short_first)\n \n def format_usage(self,usage):\n return _(\"Usage: %s\\n\")%usage\n \n def format_heading(self,heading):\n return \"%*s%s:\\n\"%(self.current_indent,\"\",heading)\n \n \nclass TitledHelpFormatter(HelpFormatter):\n ''\n \n \n def __init__(self,\n indent_increment=0,\n max_help_position=24,\n width=None ,\n short_first=0):\n HelpFormatter.__init__(\n self,indent_increment,max_help_position,width,short_first)\n \n def format_usage(self,usage):\n return \"%s %s\\n\"%(self.format_heading(_(\"Usage\")),usage)\n \n def format_heading(self,heading):\n return \"%s\\n%s\\n\"%(heading,\"=-\"[self.level]*len(heading))\n \n \ndef _parse_num(val,type):\n if val[:2].lower()==\"0x\":\n radix=16\n elif val[:2].lower()==\"0b\":\n radix=2\n val=val[2:]or \"0\"\n elif val[:1]==\"0\":\n radix=8\n else :\n radix=10\n \n return type(val,radix)\n \ndef _parse_int(val):\n return _parse_num(val,int)\n \n_builtin_cvt={\"int\":(_parse_int,_(\"integer\")),\n\"long\":(_parse_int,_(\"integer\")),\n\"float\":(float,_(\"floating-point\")),\n\"complex\":(complex,_(\"complex\"))}\n\ndef check_builtin(option,opt,value):\n (cvt,what)=_builtin_cvt[option.type]\n try :\n return cvt(value)\n except ValueError:\n raise OptionValueError(\n _(\"option %s: invalid %s value: %r\")%(opt,what,value))\n \ndef check_choice(option,opt,value):\n if value in option.choices:\n return value\n else :\n choices=\", \".join(map(repr,option.choices))\n raise OptionValueError(\n _(\"option %s: invalid choice: %r (choose from %s)\")\n %(opt,value,choices))\n \n \n \nNO_DEFAULT=(\"NO\",\"DEFAULT\")\n\n\nclass Option:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n ATTRS=['action',\n 'type',\n 'dest',\n 'default',\n 'nargs',\n 'const',\n 'choices',\n 'callback',\n 'callback_args',\n 'callback_kwargs',\n 'help',\n 'metavar']\n \n \n \n ACTIONS=(\"store\",\n \"store_const\",\n \"store_true\",\n \"store_false\",\n \"append\",\n \"append_const\",\n \"count\",\n \"callback\",\n \"help\",\n \"version\")\n \n \n \n \n STORE_ACTIONS=(\"store\",\n \"store_const\",\n \"store_true\",\n \"store_false\",\n \"append\",\n \"append_const\",\n \"count\")\n \n \n \n TYPED_ACTIONS=(\"store\",\n \"append\",\n \"callback\")\n \n \n \n ALWAYS_TYPED_ACTIONS=(\"store\",\n \"append\")\n \n \n CONST_ACTIONS=(\"store_const\",\n \"append_const\")\n \n \n \n TYPES=(\"string\",\"int\",\"long\",\"float\",\"complex\",\"choice\")\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n TYPE_CHECKER={\"int\":check_builtin,\n \"long\":check_builtin,\n \"float\":check_builtin,\n \"complex\":check_builtin,\n \"choice\":check_choice,\n }\n \n \n \n \n \n \n \n \n \n \n CHECK_METHODS=None\n \n \n \n \n def __init__(self,*opts,**attrs):\n \n \n self._short_opts=[]\n self._long_opts=[]\n opts=self._check_opt_strings(opts)\n self._set_opt_strings(opts)\n \n \n self._set_attrs(attrs)\n \n \n \n \n \n \n for checker in self.CHECK_METHODS:\n checker(self)\n \n def _check_opt_strings(self,opts):\n \n \n \n opts=[opt for opt in opts if opt]\n if not opts:\n raise TypeError(\"at least one option string must be supplied\")\n return opts\n \n def _set_opt_strings(self,opts):\n for opt in opts:\n if len(opt)<2:\n raise OptionError(\n \"invalid option string %r: \"\n \"must be at least two characters long\"%opt,self)\n elif len(opt)==2:\n if not (opt[0]==\"-\"and opt[1]!=\"-\"):\n raise OptionError(\n \"invalid short option string %r: \"\n \"must be of the form -x, (x any non-dash char)\"%opt,\n self)\n self._short_opts.append(opt)\n else :\n if not (opt[0:2]==\"--\"and opt[2]!=\"-\"):\n raise OptionError(\n \"invalid long option string %r: \"\n \"must start with --, followed by non-dash\"%opt,\n self)\n self._long_opts.append(opt)\n \n def _set_attrs(self,attrs):\n for attr in self.ATTRS:\n if attr in attrs:\n setattr(self,attr,attrs[attr])\n del attrs[attr]\n else :\n if attr =='default':\n setattr(self,attr,NO_DEFAULT)\n else :\n setattr(self,attr,None )\n if attrs:\n attrs=sorted(attrs.keys())\n raise OptionError(\n \"invalid keyword arguments: %s\"%\", \".join(attrs),\n self)\n \n \n \n \n def _check_action(self):\n if self.action is None :\n self.action=\"store\"\n elif self.action not in self.ACTIONS:\n raise OptionError(\"invalid action: %r\"%self.action,self)\n \n def _check_type(self):\n if self.type is None :\n if self.action in self.ALWAYS_TYPED_ACTIONS:\n if self.choices is not None :\n \n self.type=\"choice\"\n else :\n \n self.type=\"string\"\n else :\n \n \n if isinstance(self.type,type):\n self.type=self.type.__name__\n \n if self.type ==\"str\":\n self.type=\"string\"\n \n if self.type not in self.TYPES:\n raise OptionError(\"invalid option type: %r\"%self.type,self)\n if self.action not in self.TYPED_ACTIONS:\n raise OptionError(\n \"must not supply a type for action %r\"%self.action,self)\n \n def _check_choice(self):\n if self.type ==\"choice\":\n if self.choices is None :\n raise OptionError(\n \"must supply a list of choices for type 'choice'\",self)\n elif not isinstance(self.choices,(tuple,list)):\n raise OptionError(\n \"choices must be a list of strings ('%s' supplied)\"\n %str(type(self.choices)).split(\"'\")[1],self)\n elif self.choices is not None :\n raise OptionError(\n \"must not supply choices for type %r\"%self.type,self)\n \n def _check_dest(self):\n \n \n takes_value=(self.action in self.STORE_ACTIONS or\n self.type is not None )\n if self.dest is None and takes_value:\n \n \n \n if self._long_opts:\n \n self.dest=self._long_opts[0][2:].replace('-','_')\n else :\n self.dest=self._short_opts[0][1]\n \n def _check_const(self):\n if self.action not in self.CONST_ACTIONS and self.const is not None :\n raise OptionError(\n \"'const' must not be supplied for action %r\"%self.action,\n self)\n \n def _check_nargs(self):\n if self.action in self.TYPED_ACTIONS:\n if self.nargs is None :\n self.nargs=1\n elif self.nargs is not None :\n raise OptionError(\n \"'nargs' must not be supplied for action %r\"%self.action,\n self)\n \n def _check_callback(self):\n if self.action ==\"callback\":\n if not callable(self.callback):\n raise OptionError(\n \"callback not callable: %r\"%self.callback,self)\n if (self.callback_args is not None and\n not isinstance(self.callback_args,tuple)):\n raise OptionError(\n \"callback_args, if supplied, must be a tuple: not %r\"\n %self.callback_args,self)\n if (self.callback_kwargs is not None and\n not isinstance(self.callback_kwargs,dict)):\n raise OptionError(\n \"callback_kwargs, if supplied, must be a dict: not %r\"\n %self.callback_kwargs,self)\n else :\n if self.callback is not None :\n raise OptionError(\n \"callback supplied (%r) for non-callback option\"\n %self.callback,self)\n if self.callback_args is not None :\n raise OptionError(\n \"callback_args supplied for non-callback option\",self)\n if self.callback_kwargs is not None :\n raise OptionError(\n \"callback_kwargs supplied for non-callback option\",self)\n \n \n CHECK_METHODS=[_check_action,\n _check_type,\n _check_choice,\n _check_dest,\n _check_const,\n _check_nargs,\n _check_callback]\n \n \n \n \n def __str__(self):\n return \"/\".join(self._short_opts+self._long_opts)\n \n __repr__=_repr\n \n def takes_value(self):\n return self.type is not None\n \n def get_opt_string(self):\n if self._long_opts:\n return self._long_opts[0]\n else :\n return self._short_opts[0]\n \n \n \n \n def check_value(self,opt,value):\n checker=self.TYPE_CHECKER.get(self.type)\n if checker is None :\n return value\n else :\n return checker(self,opt,value)\n \n def convert_value(self,opt,value):\n if value is not None :\n if self.nargs ==1:\n return self.check_value(opt,value)\n else :\n return tuple([self.check_value(opt,v)for v in value])\n \n def process(self,opt,value,values,parser):\n \n \n \n value=self.convert_value(opt,value)\n \n \n \n \n return self.take_action(\n self.action,self.dest,opt,value,values,parser)\n \n def take_action(self,action,dest,opt,value,values,parser):\n if action ==\"store\":\n setattr(values,dest,value)\n elif action ==\"store_const\":\n setattr(values,dest,self.const)\n elif action ==\"store_true\":\n setattr(values,dest,True )\n elif action ==\"store_false\":\n setattr(values,dest,False )\n elif action ==\"append\":\n values.ensure_value(dest,[]).append(value)\n elif action ==\"append_const\":\n values.ensure_value(dest,[]).append(self.const)\n elif action ==\"count\":\n setattr(values,dest,values.ensure_value(dest,0)+1)\n elif action ==\"callback\":\n args=self.callback_args or ()\n kwargs=self.callback_kwargs or {}\n self.callback(self,opt,value,parser,*args,**kwargs)\n elif action ==\"help\":\n parser.print_help()\n parser.exit()\n elif action ==\"version\":\n parser.print_version()\n parser.exit()\n else :\n raise ValueError(\"unknown action %r\"%self.action)\n \n return 1\n \n \n \n \nSUPPRESS_HELP=\"SUPPRESS\"+\"HELP\"\nSUPPRESS_USAGE=\"SUPPRESS\"+\"USAGE\"\n\nclass Values:\n\n def __init__(self,defaults=None ):\n if defaults:\n for (attr,val)in defaults.items():\n setattr(self,attr,val)\n \n def __str__(self):\n return str(self.__dict__)\n \n __repr__=_repr\n \n def __eq__(self,other):\n if isinstance(other,Values):\n return self.__dict__ ==other.__dict__\n elif isinstance(other,dict):\n return self.__dict__ ==other\n else :\n return NotImplemented\n \n def _update_careful(self,dict):\n ''\n\n\n\n\n \n for attr in dir(self):\n if attr in dict:\n dval=dict[attr]\n if dval is not None :\n setattr(self,attr,dval)\n \n def _update_loose(self,dict):\n ''\n\n\n\n \n self.__dict__.update(dict)\n \n def _update(self,dict,mode):\n if mode ==\"careful\":\n self._update_careful(dict)\n elif mode ==\"loose\":\n self._update_loose(dict)\n else :\n raise ValueError(\"invalid update mode: %r\"%mode)\n \n def read_module(self,modname,mode=\"careful\"):\n __import__(modname)\n mod=sys.modules[modname]\n self._update(vars(mod),mode)\n \n def read_file(self,filename,mode=\"careful\"):\n vars={}\n exec(open(filename).read(),vars)\n self._update(vars,mode)\n \n def ensure_value(self,attr,value):\n if not hasattr(self,attr)or getattr(self,attr)is None :\n setattr(self,attr,value)\n return getattr(self,attr)\n \n \nclass OptionContainer:\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,option_class,conflict_handler,description):\n \n \n \n \n self._create_option_list()\n \n self.option_class=option_class\n self.set_conflict_handler(conflict_handler)\n self.set_description(description)\n \n def _create_option_mappings(self):\n \n \n \n self._short_opt={}\n self._long_opt={}\n self.defaults={}\n \n \n def _share_option_mappings(self,parser):\n \n \n self._short_opt=parser._short_opt\n self._long_opt=parser._long_opt\n self.defaults=parser.defaults\n \n def set_conflict_handler(self,handler):\n if handler not in (\"error\",\"resolve\"):\n raise ValueError(\"invalid conflict_resolution value %r\"%handler)\n self.conflict_handler=handler\n \n def set_description(self,description):\n self.description=description\n \n def get_description(self):\n return self.description\n \n \n def destroy(self):\n ''\n del self._short_opt\n del self._long_opt\n del self.defaults\n \n \n \n \n def _check_conflict(self,option):\n conflict_opts=[]\n for opt in option._short_opts:\n if opt in self._short_opt:\n conflict_opts.append((opt,self._short_opt[opt]))\n for opt in option._long_opts:\n if opt in self._long_opt:\n conflict_opts.append((opt,self._long_opt[opt]))\n \n if conflict_opts:\n handler=self.conflict_handler\n if handler ==\"error\":\n raise OptionConflictError(\n \"conflicting option string(s): %s\"\n %\", \".join([co[0]for co in conflict_opts]),\n option)\n elif handler ==\"resolve\":\n for (opt,c_option)in conflict_opts:\n if opt.startswith(\"--\"):\n c_option._long_opts.remove(opt)\n del self._long_opt[opt]\n else :\n c_option._short_opts.remove(opt)\n del self._short_opt[opt]\n if not (c_option._short_opts or c_option._long_opts):\n c_option.container.option_list.remove(c_option)\n \n def add_option(self,*args,**kwargs):\n ''\n\n \n if isinstance(args[0],str):\n option=self.option_class(*args,**kwargs)\n elif len(args)==1 and not kwargs:\n option=args[0]\n if not isinstance(option,Option):\n raise TypeError(\"not an Option instance: %r\"%option)\n else :\n raise TypeError(\"invalid arguments\")\n \n self._check_conflict(option)\n \n self.option_list.append(option)\n option.container=self\n for opt in option._short_opts:\n self._short_opt[opt]=option\n for opt in option._long_opts:\n self._long_opt[opt]=option\n \n if option.dest is not None :\n if option.default is not NO_DEFAULT:\n self.defaults[option.dest]=option.default\n elif option.dest not in self.defaults:\n self.defaults[option.dest]=None\n \n return option\n \n def add_options(self,option_list):\n for option in option_list:\n self.add_option(option)\n \n \n \n def get_option(self,opt_str):\n return (self._short_opt.get(opt_str)or\n self._long_opt.get(opt_str))\n \n def has_option(self,opt_str):\n return (opt_str in self._short_opt or\n opt_str in self._long_opt)\n \n def remove_option(self,opt_str):\n option=self._short_opt.get(opt_str)\n if option is None :\n option=self._long_opt.get(opt_str)\n if option is None :\n raise ValueError(\"no such option %r\"%opt_str)\n \n for opt in option._short_opts:\n del self._short_opt[opt]\n for opt in option._long_opts:\n del self._long_opt[opt]\n option.container.option_list.remove(option)\n \n \n \n \n def format_option_help(self,formatter):\n if not self.option_list:\n return \"\"\n result=[]\n for option in self.option_list:\n if not option.help is SUPPRESS_HELP:\n result.append(formatter.format_option(option))\n return \"\".join(result)\n \n def format_description(self,formatter):\n return formatter.format_description(self.get_description())\n \n def format_help(self,formatter):\n result=[]\n if self.description:\n result.append(self.format_description(formatter))\n if self.option_list:\n result.append(self.format_option_help(formatter))\n return \"\\n\".join(result)\n \n \nclass OptionGroup(OptionContainer):\n\n def __init__(self,parser,title,description=None ):\n self.parser=parser\n OptionContainer.__init__(\n self,parser.option_class,parser.conflict_handler,description)\n self.title=title\n \n def _create_option_list(self):\n self.option_list=[]\n self._share_option_mappings(self.parser)\n \n def set_title(self,title):\n self.title=title\n \n def destroy(self):\n ''\n OptionContainer.destroy(self)\n del self.option_list\n \n \n \n def format_help(self,formatter):\n result=formatter.format_heading(self.title)\n formatter.indent()\n result +=OptionContainer.format_help(self,formatter)\n formatter.dedent()\n return result\n \n \nclass OptionParser(OptionContainer):\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n standard_option_list=[]\n \n def __init__(self,\n usage=None ,\n option_list=None ,\n option_class=Option,\n version=None ,\n conflict_handler=\"error\",\n description=None ,\n formatter=None ,\n add_help_option=True ,\n prog=None ,\n epilog=None ):\n OptionContainer.__init__(\n self,option_class,conflict_handler,description)\n self.set_usage(usage)\n self.prog=prog\n self.version=version\n self.allow_interspersed_args=True\n self.process_default_values=True\n if formatter is None :\n formatter=IndentedHelpFormatter()\n self.formatter=formatter\n self.formatter.set_parser(self)\n self.epilog=epilog\n \n \n \n \n \n self._populate_option_list(option_list,\n add_help=add_help_option)\n \n self._init_parsing_state()\n \n \n def destroy(self):\n ''\n\n\n\n\n \n OptionContainer.destroy(self)\n for group in self.option_groups:\n group.destroy()\n del self.option_list\n del self.option_groups\n del self.formatter\n \n \n \n \n \n def _create_option_list(self):\n self.option_list=[]\n self.option_groups=[]\n self._create_option_mappings()\n \n def _add_help_option(self):\n self.add_option(\"-h\",\"--help\",\n action=\"help\",\n help=_(\"show this help message and exit\"))\n \n def _add_version_option(self):\n self.add_option(\"--version\",\n action=\"version\",\n help=_(\"show program's version number and exit\"))\n \n def _populate_option_list(self,option_list,add_help=True ):\n if self.standard_option_list:\n self.add_options(self.standard_option_list)\n if option_list:\n self.add_options(option_list)\n if self.version:\n self._add_version_option()\n if add_help:\n self._add_help_option()\n \n def _init_parsing_state(self):\n \n self.rargs=None\n self.largs=None\n self.values=None\n \n \n \n \n def set_usage(self,usage):\n if usage is None :\n self.usage=_(\"%prog [options]\")\n elif usage is SUPPRESS_USAGE:\n self.usage=None\n \n elif usage.lower().startswith(\"usage: \"):\n self.usage=usage[7:]\n else :\n self.usage=usage\n \n def enable_interspersed_args(self):\n ''\n\n\n\n \n self.allow_interspersed_args=True\n \n def disable_interspersed_args(self):\n ''\n\n\n\n \n self.allow_interspersed_args=False\n \n def set_process_default_values(self,process):\n self.process_default_values=process\n \n def set_default(self,dest,value):\n self.defaults[dest]=value\n \n def set_defaults(self,**kwargs):\n self.defaults.update(kwargs)\n \n def _get_all_options(self):\n options=self.option_list[:]\n for group in self.option_groups:\n options.extend(group.option_list)\n return options\n \n def get_default_values(self):\n if not self.process_default_values:\n \n return Values(self.defaults)\n \n defaults=self.defaults.copy()\n for option in self._get_all_options():\n default=defaults.get(option.dest)\n if isinstance(default,str):\n opt_str=option.get_opt_string()\n defaults[option.dest]=option.check_value(opt_str,default)\n \n return Values(defaults)\n \n \n \n \n def add_option_group(self,*args,**kwargs):\n \n if isinstance(args[0],str):\n group=OptionGroup(self,*args,**kwargs)\n elif len(args)==1 and not kwargs:\n group=args[0]\n if not isinstance(group,OptionGroup):\n raise TypeError(\"not an OptionGroup instance: %r\"%group)\n if group.parser is not self:\n raise ValueError(\"invalid OptionGroup (wrong parser)\")\n else :\n raise TypeError(\"invalid arguments\")\n \n self.option_groups.append(group)\n return group\n \n def get_option_group(self,opt_str):\n option=(self._short_opt.get(opt_str)or\n self._long_opt.get(opt_str))\n if option and option.container is not self:\n return option.container\n return None\n \n \n \n \n def _get_args(self,args):\n if args is None :\n return sys.argv[1:]\n else :\n return args[:]\n \n def parse_args(self,args=None ,values=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n rargs=self._get_args(args)\n if values is None :\n values=self.get_default_values()\n \n \n \n \n \n \n \n \n \n \n self.rargs=rargs\n self.largs=largs=[]\n self.values=values\n \n try :\n stop=self._process_args(largs,rargs,values)\n except (BadOptionError,OptionValueError)as err:\n self.error(str(err))\n \n args=largs+rargs\n return self.check_values(values,args)\n \n def check_values(self,values,args):\n ''\n\n\n\n\n\n\n\n\n \n return (values,args)\n \n def _process_args(self,largs,rargs,values):\n ''\n\n\n\n\n\n\n\n \n while rargs:\n arg=rargs[0]\n \n \n \n if arg ==\"--\":\n del rargs[0]\n return\n elif arg[0:2]==\"--\":\n \n self._process_long_opt(rargs,values)\n elif arg[:1]==\"-\"and len(arg)>1:\n \n \n self._process_short_opts(rargs,values)\n elif self.allow_interspersed_args:\n largs.append(arg)\n del rargs[0]\n else :\n return\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n def _match_long_opt(self,opt):\n ''\n\n\n\n\n \n return _match_abbrev(opt,self._long_opt)\n \n def _process_long_opt(self,rargs,values):\n arg=rargs.pop(0)\n \n \n \n if \"=\"in arg:\n (opt,next_arg)=arg.split(\"=\",1)\n rargs.insert(0,next_arg)\n had_explicit_value=True\n else :\n opt=arg\n had_explicit_value=False\n \n opt=self._match_long_opt(opt)\n option=self._long_opt[opt]\n if option.takes_value():\n nargs=option.nargs\n if len(rargs)\".format(self.path)\n return \"\"\n \n def add_dll_directory(path):\n ''\n\n\n\n\n\n\n\n \n import nt\n cookie=nt._add_dll_directory(path)\n return _AddedDllDirectory(\n path,\n cookie,\n nt._remove_dll_directory\n )\n \n \ndef scandir(*args,**kw):\n raise NotImplementedError('browsers cannot read a directory content')\n \ndef waitstatus_to_exitcode(status):\n return status >>8\n \n_set=set()\n\nsupports_dir_fd=_set\n\nsupports_effective_ids=_set\n\nsupports_fd=_set\n\nsupports_follow_symlinks=_set\n\n", ["abc", "nt", "os.path", "posix", "posixpath", "sys"]], "pathlib": [".py", "''\n\n\n\n\n\n\nimport fnmatch\nimport functools\nimport io\nimport ntpath\nimport os\nimport posixpath\nimport re\nimport sys\nimport warnings\nfrom _collections_abc import Sequence\nfrom errno import ENOENT,ENOTDIR,EBADF,ELOOP\nfrom stat import S_ISDIR,S_ISLNK,S_ISREG,S_ISSOCK,S_ISBLK,S_ISCHR,S_ISFIFO\nfrom urllib.parse import quote_from_bytes as urlquote_from_bytes\n\n\n__all__=[\n\"PurePath\",\"PurePosixPath\",\"PureWindowsPath\",\n\"Path\",\"PosixPath\",\"WindowsPath\",\n]\n\n\n\n\n\n\n\n_WIN_RESERVED_NAMES=frozenset(\n{'CON','PRN','AUX','NUL','CONIN$','CONOUT$'}|\n{f'COM{c}'for c in '123456789\\xb9\\xb2\\xb3'}|\n{f'LPT{c}'for c in '123456789\\xb9\\xb2\\xb3'}\n)\n\n_WINERROR_NOT_READY=21\n_WINERROR_INVALID_NAME=123\n_WINERROR_CANT_RESOLVE_FILENAME=1921\n\n\n_IGNORED_ERRNOS=(ENOENT,ENOTDIR,EBADF,ELOOP)\n\n_IGNORED_WINERRORS=(\n_WINERROR_NOT_READY,\n_WINERROR_INVALID_NAME,\n_WINERROR_CANT_RESOLVE_FILENAME)\n\ndef _ignore_error(exception):\n return (getattr(exception,'errno',None )in _IGNORED_ERRNOS or\n getattr(exception,'winerror',None )in _IGNORED_WINERRORS)\n \n \n@functools.cache\ndef _is_case_sensitive(flavour):\n return flavour.normcase('Aa')=='Aa'\n \n \n \n \n \n \n \n \n \n \n \n \n \n_FNMATCH_PREFIX,_FNMATCH_SUFFIX=fnmatch.translate('_').split('_')\n_FNMATCH_SLICE=slice(len(_FNMATCH_PREFIX),-len(_FNMATCH_SUFFIX))\n_SWAP_SEP_AND_NEWLINE={\n'/':str.maketrans({'/':'\\n','\\n':'/'}),\n'\\\\':str.maketrans({'\\\\':'\\n','\\n':'\\\\'}),\n}\n\n\n@functools.lru_cache()\ndef _make_selector(pattern_parts,flavour,case_sensitive):\n pat=pattern_parts[0]\n if not pat:\n return _TerminatingSelector()\n if pat =='**':\n child_parts_idx=1\n while child_parts_idx =len(self)or idx <-len(self):\n raise IndexError(idx)\n if idx <0:\n idx +=len(self)\n return self._path._from_parsed_parts(self._drv,self._root,\n self._tail[:-idx -1])\n \n def __repr__(self):\n return \"<{}.parents>\".format(type(self._path).__name__)\n \n \nclass PurePath(object):\n ''\n\n\n\n\n\n\n \n \n __slots__=(\n \n \n '_raw_path',\n \n \n \n \n \n \n \n \n '_drv','_root','_tail_cached',\n \n \n \n \n '_str',\n \n \n \n \n \n '_str_normcase_cached',\n \n \n \n \n \n '_parts_normcase_cached',\n \n \n \n '_lines_cached',\n \n \n \n '_hash',\n )\n _flavour=os.path\n \n def __new__(cls,*args,**kwargs):\n ''\n\n\n\n \n if cls is PurePath:\n cls=PureWindowsPath if os.name =='nt'else PurePosixPath\n return object.__new__(cls)\n \n def __reduce__(self):\n \n \n return (self.__class__,self.parts)\n \n def __init__(self,*args):\n paths=[]\n for arg in args:\n if isinstance(arg,PurePath):\n path=arg._raw_path\n if arg._flavour is ntpath and self._flavour is posixpath:\n \n path=path.replace('\\\\','/')\n else :\n try :\n path=os.fspath(arg)\n except TypeError:\n path=arg\n if not isinstance(path,str):\n raise TypeError(\n \"argument should be a str or an os.PathLike \"\n \"object where __fspath__ returns a str, \"\n f\"not {type(path).__name__ !r}\")\n paths.append(path)\n if len(paths)==0:\n self._raw_path=''\n elif len(paths)==1:\n self._raw_path=paths[0]\n else :\n self._raw_path=self._flavour.join(*paths)\n \n def with_segments(self,*pathsegments):\n ''\n\n\n \n return type(self)(*pathsegments)\n \n @classmethod\n def _parse_path(cls,path):\n if not path:\n return '','',[]\n sep=cls._flavour.sep\n altsep=cls._flavour.altsep\n if altsep:\n path=path.replace(altsep,sep)\n drv,root,rel=cls._flavour.splitroot(path)\n if not root and drv.startswith(sep)and not drv.endswith(sep):\n drv_parts=drv.split(sep)\n if len(drv_parts)==4 and drv_parts[2]not in '?.':\n \n root=sep\n elif len(drv_parts)==6:\n \n root=sep\n parsed=[sys.intern(str(x))for x in rel.split(sep)if x and x !='.']\n return drv,root,parsed\n \n def _load_parts(self):\n drv,root,tail=self._parse_path(self._raw_path)\n self._drv=drv\n self._root=root\n self._tail_cached=tail\n \n def _from_parsed_parts(self,drv,root,tail):\n path_str=self._format_parsed_parts(drv,root,tail)\n path=self.with_segments(path_str)\n path._str=path_str or '.'\n path._drv=drv\n path._root=root\n path._tail_cached=tail\n return path\n \n @classmethod\n def _format_parsed_parts(cls,drv,root,tail):\n if drv or root:\n return drv+root+cls._flavour.sep.join(tail)\n elif tail and cls._flavour.splitdrive(tail[0])[0]:\n tail=['.']+tail\n return cls._flavour.sep.join(tail)\n \n def __str__(self):\n ''\n \n try :\n return self._str\n except AttributeError:\n self._str=self._format_parsed_parts(self.drive,self.root,\n self._tail)or '.'\n return self._str\n \n def __fspath__(self):\n return str(self)\n \n def as_posix(self):\n ''\n \n f=self._flavour\n return str(self).replace(f.sep,'/')\n \n def __bytes__(self):\n ''\n \n return os.fsencode(self)\n \n def __repr__(self):\n return \"{}({!r})\".format(self.__class__.__name__,self.as_posix())\n \n def as_uri(self):\n ''\n if not self.is_absolute():\n raise ValueError(\"relative path can't be expressed as a file URI\")\n \n drive=self.drive\n if len(drive)==2 and drive[1]==':':\n \n prefix='file:///'+drive\n path=self.as_posix()[2:]\n elif drive:\n \n prefix='file:'\n path=self.as_posix()\n else :\n \n prefix='file://'\n path=str(self)\n return prefix+urlquote_from_bytes(os.fsencode(path))\n \n @property\n def _str_normcase(self):\n \n try :\n return self._str_normcase_cached\n except AttributeError:\n if _is_case_sensitive(self._flavour):\n self._str_normcase_cached=str(self)\n else :\n self._str_normcase_cached=str(self).lower()\n return self._str_normcase_cached\n \n @property\n def _parts_normcase(self):\n \n try :\n return self._parts_normcase_cached\n except AttributeError:\n self._parts_normcase_cached=self._str_normcase.split(self._flavour.sep)\n return self._parts_normcase_cached\n \n @property\n def _lines(self):\n \n try :\n return self._lines_cached\n except AttributeError:\n trans=_SWAP_SEP_AND_NEWLINE[self._flavour.sep]\n self._lines_cached=str(self).translate(trans)\n return self._lines_cached\n \n def __eq__(self,other):\n if not isinstance(other,PurePath):\n return NotImplemented\n return self._str_normcase ==other._str_normcase and self._flavour is other._flavour\n \n def __hash__(self):\n try :\n return self._hash\n except AttributeError:\n self._hash=hash(self._str_normcase)\n return self._hash\n \n def __lt__(self,other):\n if not isinstance(other,PurePath)or self._flavour is not other._flavour:\n return NotImplemented\n return self._parts_normcase other._parts_normcase\n \n def __ge__(self,other):\n if not isinstance(other,PurePath)or self._flavour is not other._flavour:\n return NotImplemented\n return self._parts_normcase >=other._parts_normcase\n \n @property\n def drive(self):\n ''\n try :\n return self._drv\n except AttributeError:\n self._load_parts()\n return self._drv\n \n @property\n def root(self):\n ''\n try :\n return self._root\n except AttributeError:\n self._load_parts()\n return self._root\n \n @property\n def _tail(self):\n try :\n return self._tail_cached\n except AttributeError:\n self._load_parts()\n return self._tail_cached\n \n @property\n def anchor(self):\n ''\n anchor=self.drive+self.root\n return anchor\n \n @property\n def name(self):\n ''\n tail=self._tail\n if not tail:\n return ''\n return tail[-1]\n \n @property\n def suffix(self):\n ''\n\n\n\n \n name=self.name\n i=name.rfind('.')\n if 0 >> import pdb\n >>> pdb.run('')\n\nThe debugger's prompt is '(Pdb) '. This will stop in the first\nfunction call in .\n\nAlternatively, if a statement terminated with an unhandled exception,\nyou can use pdb's post-mortem facility to inspect the contents of the\ntraceback:\n\n >>> \n \n >>> import pdb\n >>> pdb.pm()\n\nThe commands recognized by the debugger are listed in the next\nsection. Most can be abbreviated as indicated; e.g., h(elp) means\nthat 'help' can be typed as 'h' or 'help' (but not as 'he' or 'hel',\nnor as 'H' or 'Help' or 'HELP'). Optional arguments are enclosed in\nsquare brackets. Alternatives in the command syntax are separated\nby a vertical bar (|).\n\nA blank line repeats the previous command literally, except for\n'list', where it lists the next 11 lines.\n\nCommands that the debugger doesn't recognize are assumed to be Python\nstatements and are executed in the context of the program being\ndebugged. Python statements can also be prefixed with an exclamation\npoint ('!'). This is a powerful way to inspect the program being\ndebugged; it is even possible to change variables or call functions.\nWhen an exception occurs in such a statement, the exception name is\nprinted but the debugger's state is not changed.\n\nThe debugger supports aliases, which can save typing. And aliases can\nhave parameters (see the alias help entry) which allows one a certain\nlevel of adaptability to the context under examination.\n\nMultiple commands may be entered on a single line, separated by the\npair ';;'. No intelligence is applied to separating the commands; the\ninput is split at the first ';;', even if it is in the middle of a\nquoted string.\n\nIf a file \".pdbrc\" exists in your home directory or in the current\ndirectory, it is read in and executed as if it had been typed at the\ndebugger prompt. This is particularly useful for aliases. If both\nfiles exist, the one in the home directory is read first and aliases\ndefined there can be overridden by the local file. This behavior can be\ndisabled by passing the \"readrc=False\" argument to the Pdb constructor.\n\nAside from aliases, the debugger is not directly programmable; but it\nis implemented as a class from which you can derive your own debugger\nclass, which you can make as fancy as you like.\n\n\nDebugger commands\n=================\n\n\"\"\"\n\n\n\nimport os\nimport io\nimport re\nimport sys\nimport cmd\nimport bdb\nimport dis\nimport code\nimport glob\nimport pprint\nimport signal\nimport inspect\nimport tokenize\nimport functools\nimport traceback\nimport linecache\n\nfrom typing import Union\n\n\nclass Restart(Exception):\n ''\n pass\n \n__all__=[\"run\",\"pm\",\"Pdb\",\"runeval\",\"runctx\",\"runcall\",\"set_trace\",\n\"post_mortem\",\"help\"]\n\ndef find_function(funcname,filename):\n cre=re.compile(r'def\\s+%s\\s*[(]'%re.escape(funcname))\n try :\n fp=tokenize.open(filename)\n except OSError:\n return None\n \n with fp:\n for lineno,line in enumerate(fp,start=1):\n if cre.match(line):\n return funcname,filename,lineno\n return None\n \ndef lasti2lineno(code,lasti):\n linestarts=list(dis.findlinestarts(code))\n linestarts.reverse()\n for i,lineno in linestarts:\n if lasti >=i:\n return lineno\n return 0\n \n \nclass _rstr(str):\n ''\n def __repr__(self):\n return self\n \n \nclass _ScriptTarget(str):\n def __new__(cls,val):\n \n res=super().__new__(cls,os.path.realpath(val))\n \n \n res.orig=val\n \n return res\n \n def check(self):\n if not os.path.exists(self):\n print('Error:',self.orig,'does not exist')\n sys.exit(1)\n \n \n sys.path[0]=os.path.dirname(self)\n \n @property\n def filename(self):\n return self\n \n @property\n def namespace(self):\n return dict(\n __name__='__main__',\n __file__=self,\n __builtins__=__builtins__,\n )\n \n @property\n def code(self):\n with io.open_code(self)as fp:\n return f\"exec(compile({fp.read()!r}, {self !r}, 'exec'))\"\n \n \nclass _ModuleTarget(str):\n def check(self):\n try :\n self._details\n except Exception:\n traceback.print_exc()\n sys.exit(1)\n \n @functools.cached_property\n def _details(self):\n import runpy\n return runpy._get_module_details(self)\n \n @property\n def filename(self):\n return self.code.co_filename\n \n @property\n def code(self):\n name,spec,code=self._details\n return code\n \n @property\n def _spec(self):\n name,spec,code=self._details\n return spec\n \n @property\n def namespace(self):\n return dict(\n __name__='__main__',\n __file__=os.path.normcase(os.path.abspath(self.filename)),\n __package__=self._spec.parent,\n __loader__=self._spec.loader,\n __spec__=self._spec,\n __builtins__=__builtins__,\n )\n \n \n \n \n \n \n \nline_prefix='\\n-> '\n\nclass Pdb(bdb.Bdb,cmd.Cmd):\n\n _previous_sigint_handler=None\n \n def __init__(self,completekey='tab',stdin=None ,stdout=None ,skip=None ,\n nosigint=False ,readrc=True ):\n bdb.Bdb.__init__(self,skip=skip)\n cmd.Cmd.__init__(self,completekey,stdin,stdout)\n sys.audit(\"pdb.Pdb\")\n if stdout:\n self.use_rawinput=0\n self.prompt='(Pdb) '\n self.aliases={}\n self.displaying={}\n self.mainpyfile=''\n self._wait_for_mainpyfile=False\n self.tb_lineno={}\n \n try :\n import readline\n \n readline.set_completer_delims(' \\t\\n`@#$%^&*()=+[{]}\\\\|;:\\'\",<>?')\n except ImportError:\n pass\n self.allow_kbdint=False\n self.nosigint=nosigint\n \n \n self.rcLines=[]\n if readrc:\n try :\n with open(os.path.expanduser('~/.pdbrc'),encoding='utf-8')as rcFile:\n self.rcLines.extend(rcFile)\n except OSError:\n pass\n try :\n with open(\".pdbrc\",encoding='utf-8')as rcFile:\n self.rcLines.extend(rcFile)\n except OSError:\n pass\n \n self.commands={}\n self.commands_doprompt={}\n \n self.commands_silent={}\n \n self.commands_defining=False\n \n self.commands_bnum=None\n \n \n def sigint_handler(self,signum,frame):\n if self.allow_kbdint:\n raise KeyboardInterrupt\n self.message(\"\\nProgram interrupted. (Use 'cont' to resume).\")\n self.set_step()\n self.set_trace(frame)\n \n def reset(self):\n bdb.Bdb.reset(self)\n self.forget()\n \n def forget(self):\n self.lineno=None\n self.stack=[]\n self.curindex=0\n if hasattr(self,'curframe')and self.curframe:\n self.curframe.f_globals.pop('__pdb_convenience_variables',None )\n self.curframe=None\n self.tb_lineno.clear()\n \n def setup(self,f,tb):\n self.forget()\n self.stack,self.curindex=self.get_stack(f,tb)\n while tb:\n \n \n \n lineno=lasti2lineno(tb.tb_frame.f_code,tb.tb_lasti)\n self.tb_lineno[tb.tb_frame]=lineno\n tb=tb.tb_next\n self.curframe=self.stack[self.curindex][0]\n \n \n \n self.curframe_locals=self.curframe.f_locals\n self.set_convenience_variable(self.curframe,'_frame',self.curframe)\n return self.execRcLines()\n \n \n def execRcLines(self):\n if not self.rcLines:\n return\n \n rcLines=self.rcLines\n rcLines.reverse()\n \n self.rcLines=[]\n while rcLines:\n line=rcLines.pop().strip()\n if line and line[0]!='#':\n if self.onecmd(line):\n \n \n \n self.rcLines +=reversed(rcLines)\n return True\n \n \n \n def user_call(self,frame,argument_list):\n ''\n \n if self._wait_for_mainpyfile:\n return\n if self.stop_here(frame):\n self.message('--Call--')\n self.interaction(frame,None )\n \n def user_line(self,frame):\n ''\n if self._wait_for_mainpyfile:\n if (self.mainpyfile !=self.canonic(frame.f_code.co_filename)\n or frame.f_lineno <=0):\n return\n self._wait_for_mainpyfile=False\n if self.bp_commands(frame):\n self.interaction(frame,None )\n \n def bp_commands(self,frame):\n ''\n\n\n\n \n \n if getattr(self,\"currentbp\",False )and\\\n self.currentbp in self.commands:\n currentbp=self.currentbp\n self.currentbp=0\n lastcmd_back=self.lastcmd\n self.setup(frame,None )\n for line in self.commands[currentbp]:\n self.onecmd(line)\n self.lastcmd=lastcmd_back\n if not self.commands_silent[currentbp]:\n self.print_stack_entry(self.stack[self.curindex])\n if self.commands_doprompt[currentbp]:\n self._cmdloop()\n self.forget()\n return\n return 1\n \n def user_return(self,frame,return_value):\n ''\n if self._wait_for_mainpyfile:\n return\n frame.f_locals['__return__']=return_value\n self.set_convenience_variable(frame,'_retval',return_value)\n self.message('--Return--')\n self.interaction(frame,None )\n \n def user_exception(self,frame,exc_info):\n ''\n \n if self._wait_for_mainpyfile:\n return\n exc_type,exc_value,exc_traceback=exc_info\n frame.f_locals['__exception__']=exc_type,exc_value\n self.set_convenience_variable(frame,'_exception',exc_value)\n \n \n \n \n \n \n prefix='Internal 'if (not exc_traceback\n and exc_type is StopIteration)else ''\n self.message('%s%s'%(prefix,self._format_exc(exc_value)))\n self.interaction(frame,exc_traceback)\n \n \n def _cmdloop(self):\n while True :\n try :\n \n \n self.allow_kbdint=True\n self.cmdloop()\n self.allow_kbdint=False\n break\n except KeyboardInterrupt:\n self.message('--KeyboardInterrupt--')\n \n \n \n def preloop(self):\n displaying=self.displaying.get(self.curframe)\n if displaying:\n for expr,oldvalue in displaying.items():\n newvalue=self._getval_except(expr)\n \n \n \n if newvalue is not oldvalue and newvalue !=oldvalue:\n displaying[expr]=newvalue\n self.message('display %s: %r [old: %r]'%\n (expr,newvalue,oldvalue))\n \n def interaction(self,frame,traceback):\n \n if Pdb._previous_sigint_handler:\n try :\n signal.signal(signal.SIGINT,Pdb._previous_sigint_handler)\n except ValueError:\n pass\n else :\n Pdb._previous_sigint_handler=None\n if self.setup(frame,traceback):\n \n \n self.forget()\n return\n self.print_stack_entry(self.stack[self.curindex])\n self._cmdloop()\n self.forget()\n \n def displayhook(self,obj):\n ''\n\n \n \n if obj is not None :\n self.message(repr(obj))\n \n def default(self,line):\n if line[:1]=='!':line=line[1:].strip()\n locals=self.curframe_locals\n globals=self.curframe.f_globals\n try :\n code=compile(line+'\\n','','single')\n save_stdout=sys.stdout\n save_stdin=sys.stdin\n save_displayhook=sys.displayhook\n try :\n sys.stdin=self.stdin\n sys.stdout=self.stdout\n sys.displayhook=self.displayhook\n exec(code,globals,locals)\n finally :\n sys.stdout=save_stdout\n sys.stdin=save_stdin\n sys.displayhook=save_displayhook\n except :\n self._error_exc()\n \n def precmd(self,line):\n ''\n if not line.strip():\n return line\n args=line.split()\n while args[0]in self.aliases:\n line=self.aliases[args[0]]\n ii=1\n for tmpArg in args[1:]:\n line=line.replace(\"%\"+str(ii),\n tmpArg)\n ii +=1\n line=line.replace(\"%*\",' '.join(args[1:]))\n args=line.split()\n \n \n if args[0]!='alias':\n marker=line.find(';;')\n if marker >=0:\n \n next=line[marker+2:].lstrip()\n self.cmdqueue.append(next)\n line=line[:marker].rstrip()\n \n \n line=re.sub(r'\\$([a-zA-Z_][a-zA-Z0-9_]*)',r'__pdb_convenience_variables[\"\\1\"]',line)\n return line\n \n def onecmd(self,line):\n ''\n\n\n\n\n \n if not self.commands_defining:\n return cmd.Cmd.onecmd(self,line)\n else :\n return self.handle_command_def(line)\n \n def handle_command_def(self,line):\n ''\n cmd,arg,line=self.parseline(line)\n if not cmd:\n return\n if cmd =='silent':\n self.commands_silent[self.commands_bnum]=True\n return\n elif cmd =='end':\n self.cmdqueue=[]\n return 1\n cmdlist=self.commands[self.commands_bnum]\n if arg:\n cmdlist.append(cmd+' '+arg)\n else :\n cmdlist.append(cmd)\n \n try :\n func=getattr(self,'do_'+cmd)\n except AttributeError:\n func=self.default\n \n if func.__name__ in self.commands_resuming:\n self.commands_doprompt[self.commands_bnum]=False\n self.cmdqueue=[]\n return 1\n return\n \n \n \n def message(self,msg):\n print(msg,file=self.stdout)\n \n def error(self,msg):\n print('***',msg,file=self.stdout)\n \n \n \n def set_convenience_variable(self,frame,name,value):\n if '__pdb_convenience_variables'not in frame.f_globals:\n frame.f_globals['__pdb_convenience_variables']={}\n frame.f_globals['__pdb_convenience_variables'][name]=value\n \n \n \n \n def _complete_location(self,text,line,begidx,endidx):\n \n if line.strip().endswith((':',',')):\n \n return []\n \n try :\n ret=self._complete_expression(text,line,begidx,endidx)\n except Exception:\n ret=[]\n \n globs=glob.glob(glob.escape(text)+'*')\n for fn in globs:\n if os.path.isdir(fn):\n ret.append(fn+'/')\n elif os.path.isfile(fn)and fn.lower().endswith(('.py','.pyw')):\n ret.append(fn+':')\n return ret\n \n def _complete_bpnumber(self,text,line,begidx,endidx):\n \n \n \n return [str(i)for i,bp in enumerate(bdb.Breakpoint.bpbynumber)\n if bp is not None and str(i).startswith(text)]\n \n def _complete_expression(self,text,line,begidx,endidx):\n \n if not self.curframe:\n return []\n \n \n \n ns={**self.curframe.f_globals,**self.curframe_locals}\n if '.'in text:\n \n \n \n dotted=text.split('.')\n try :\n obj=ns[dotted[0]]\n for part in dotted[1:-1]:\n obj=getattr(obj,part)\n except (KeyError,AttributeError):\n return []\n prefix='.'.join(dotted[:-1])+'.'\n return [prefix+n for n in dir(obj)if n.startswith(dotted[-1])]\n else :\n \n return [n for n in ns.keys()if n.startswith(text)]\n \n \n \n \n \n def do_commands(self,arg):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not arg:\n bnum=len(bdb.Breakpoint.bpbynumber)-1\n else :\n try :\n bnum=int(arg)\n except :\n self.error(\"Usage: commands [bnum]\\n ...\\n end\")\n return\n try :\n self.get_bpbynumber(bnum)\n except ValueError as err:\n self.error('cannot set commands: %s'%err)\n return\n \n self.commands_bnum=bnum\n \n if bnum in self.commands:\n old_command_defs=(self.commands[bnum],\n self.commands_doprompt[bnum],\n self.commands_silent[bnum])\n else :\n old_command_defs=None\n self.commands[bnum]=[]\n self.commands_doprompt[bnum]=True\n self.commands_silent[bnum]=False\n \n prompt_back=self.prompt\n self.prompt='(com) '\n self.commands_defining=True\n try :\n self.cmdloop()\n except KeyboardInterrupt:\n \n if old_command_defs:\n self.commands[bnum]=old_command_defs[0]\n self.commands_doprompt[bnum]=old_command_defs[1]\n self.commands_silent[bnum]=old_command_defs[2]\n else :\n del self.commands[bnum]\n del self.commands_doprompt[bnum]\n del self.commands_silent[bnum]\n self.error('command definition aborted, old commands restored')\n finally :\n self.commands_defining=False\n self.prompt=prompt_back\n \n complete_commands=_complete_bpnumber\n \n def do_break(self,arg,temporary=0):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not arg:\n if self.breaks:\n self.message(\"Num Type Disp Enb Where\")\n for bp in bdb.Breakpoint.bpbynumber:\n if bp:\n self.message(bp.bpformat())\n return\n \n \n filename=None\n lineno=None\n cond=None\n comma=arg.find(',')\n if comma >0:\n \n cond=arg[comma+1:].lstrip()\n if err :=self._compile_error_message(cond):\n self.error('Invalid condition %s: %r'%(cond,err))\n return\n arg=arg[:comma].rstrip()\n \n colon=arg.rfind(':')\n funcname=None\n if colon >=0:\n filename=arg[:colon].rstrip()\n f=self.lookupmodule(filename)\n if not f:\n self.error('%r not found from sys.path'%filename)\n return\n else :\n filename=f\n arg=arg[colon+1:].lstrip()\n try :\n lineno=int(arg)\n except ValueError:\n self.error('Bad lineno: %s'%arg)\n return\n else :\n \n try :\n lineno=int(arg)\n except ValueError:\n try :\n func=eval(arg,\n self.curframe.f_globals,\n self.curframe_locals)\n except :\n func=arg\n try :\n if hasattr(func,'__func__'):\n func=func.__func__\n code=func.__code__\n \n \n funcname=code.co_name\n lineno=code.co_firstlineno\n filename=code.co_filename\n except :\n \n (ok,filename,ln)=self.lineinfo(arg)\n if not ok:\n self.error('The specified object %r is not a function '\n 'or was not found along sys.path.'%arg)\n return\n funcname=ok\n lineno=int(ln)\n if not filename:\n filename=self.defaultFile()\n \n line=self.checkline(filename,lineno)\n if line:\n \n err=self.set_break(filename,line,temporary,cond,funcname)\n if err:\n self.error(err)\n else :\n bp=self.get_breaks(filename,line)[-1]\n self.message(\"Breakpoint %d at %s:%d\"%\n (bp.number,bp.file,bp.line))\n \n \n def defaultFile(self):\n ''\n filename=self.curframe.f_code.co_filename\n if filename ==''and self.mainpyfile:\n filename=self.mainpyfile\n return filename\n \n do_b=do_break\n \n complete_break=_complete_location\n complete_b=_complete_location\n \n def do_tbreak(self,arg):\n ''\n\n\n\n \n self.do_break(arg,1)\n \n complete_tbreak=_complete_location\n \n def lineinfo(self,identifier):\n failed=(None ,None ,None )\n \n idstring=identifier.split(\"'\")\n if len(idstring)==1:\n \n id=idstring[0].strip()\n elif len(idstring)==3:\n \n id=idstring[1].strip()\n else :\n return failed\n if id =='':return failed\n parts=id.split('.')\n \n if parts[0]=='self':\n del parts[0]\n if len(parts)==0:\n return failed\n \n fname=self.defaultFile()\n if len(parts)==1:\n item=parts[0]\n else :\n \n \n f=self.lookupmodule(parts[0])\n if f:\n fname=f\n item=parts[1]\n answer=find_function(item,fname)\n return answer or failed\n \n def checkline(self,filename,lineno):\n ''\n\n\n\n \n \n \n frame=getattr(self,'curframe',None )\n globs=frame.f_globals if frame else None\n line=linecache.getline(filename,lineno,globs)\n if not line:\n self.message('End of file')\n return 0\n line=line.strip()\n \n if (not line or (line[0]=='#')or\n (line[:3]=='\"\"\"')or line[:3]==\"'''\"):\n self.error('Blank or comment')\n return 0\n return lineno\n \n def do_enable(self,arg):\n ''\n\n\n\n \n args=arg.split()\n for i in args:\n try :\n bp=self.get_bpbynumber(i)\n except ValueError as err:\n self.error(err)\n else :\n bp.enable()\n self.message('Enabled %s'%bp)\n \n complete_enable=_complete_bpnumber\n \n def do_disable(self,arg):\n ''\n\n\n\n\n\n\n \n args=arg.split()\n for i in args:\n try :\n bp=self.get_bpbynumber(i)\n except ValueError as err:\n self.error(err)\n else :\n bp.disable()\n self.message('Disabled %s'%bp)\n \n complete_disable=_complete_bpnumber\n \n def do_condition(self,arg):\n ''\n\n\n\n\n\n \n args=arg.split(' ',1)\n try :\n cond=args[1]\n if err :=self._compile_error_message(cond):\n self.error('Invalid condition %s: %r'%(cond,err))\n return\n except IndexError:\n cond=None\n try :\n bp=self.get_bpbynumber(args[0].strip())\n except IndexError:\n self.error('Breakpoint number expected')\n except ValueError as err:\n self.error(err)\n else :\n bp.cond=cond\n if not cond:\n self.message('Breakpoint %d is now unconditional.'%bp.number)\n else :\n self.message('New condition set for breakpoint %d.'%bp.number)\n \n complete_condition=_complete_bpnumber\n \n def do_ignore(self,arg):\n ''\n\n\n\n\n\n\n\n \n args=arg.split()\n try :\n count=int(args[1].strip())\n except :\n count=0\n try :\n bp=self.get_bpbynumber(args[0].strip())\n except IndexError:\n self.error('Breakpoint number expected')\n except ValueError as err:\n self.error(err)\n else :\n bp.ignore=count\n if count >0:\n if count >1:\n countstr='%d crossings'%count\n else :\n countstr='1 crossing'\n self.message('Will ignore next %s of breakpoint %d.'%\n (countstr,bp.number))\n else :\n self.message('Will stop next time breakpoint %d is reached.'\n %bp.number)\n \n complete_ignore=_complete_bpnumber\n \n def do_clear(self,arg):\n ''\n\n\n\n\n\n \n if not arg:\n try :\n reply=input('Clear all breaks? ')\n except EOFError:\n reply='no'\n reply=reply.strip().lower()\n if reply in ('y','yes'):\n bplist=[bp for bp in bdb.Breakpoint.bpbynumber if bp]\n self.clear_all_breaks()\n for bp in bplist:\n self.message('Deleted %s'%bp)\n return\n if ':'in arg:\n \n i=arg.rfind(':')\n filename=arg[:i]\n arg=arg[i+1:]\n try :\n lineno=int(arg)\n except ValueError:\n err=\"Invalid line number (%s)\"%arg\n else :\n bplist=self.get_breaks(filename,lineno)[:]\n err=self.clear_break(filename,lineno)\n if err:\n self.error(err)\n else :\n for bp in bplist:\n self.message('Deleted %s'%bp)\n return\n numberlist=arg.split()\n for i in numberlist:\n try :\n bp=self.get_bpbynumber(i)\n except ValueError as err:\n self.error(err)\n else :\n self.clear_bpbynumber(i)\n self.message('Deleted %s'%bp)\n do_cl=do_clear\n \n complete_clear=_complete_location\n complete_cl=_complete_location\n \n def do_where(self,arg):\n ''\n\n\n\n\n \n self.print_stack_trace()\n do_w=do_where\n do_bt=do_where\n \n def _select_frame(self,number):\n assert 0 <=number =2:\n self.error('No help for %r; please do not run Python with -OO '\n 'if you need command help'%arg)\n return\n if command.__doc__ is None :\n self.error('No help for %r; __doc__ string missing'%arg)\n return\n self.message(self._help_message_from_doc(command.__doc__))\n \n do_h=do_help\n \n def help_exec(self):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n self.message((self.help_exec.__doc__ or '').strip())\n \n def help_pdb(self):\n help()\n \n \n \n def lookupmodule(self,filename):\n ''\n\n\n\n \n if os.path.isabs(filename)and os.path.exists(filename):\n return filename\n f=os.path.join(sys.path[0],filename)\n if os.path.exists(f)and self.canonic(f)==self.mainpyfile:\n return f\n root,ext=os.path.splitext(filename)\n if ext =='':\n filename=filename+'.py'\n if os.path.isabs(filename):\n return filename\n for dirname in sys.path:\n while os.path.islink(dirname):\n dirname=os.readlink(dirname)\n fullname=os.path.join(dirname,filename)\n if os.path.exists(fullname):\n return fullname\n return None\n \n def _run(self,target:Union[_ModuleTarget,_ScriptTarget]):\n \n \n \n \n \n self._wait_for_mainpyfile=True\n self._user_requested_quit=False\n \n self.mainpyfile=self.canonic(target.filename)\n \n \n \n \n import __main__\n __main__.__dict__.clear()\n __main__.__dict__.update(target.namespace)\n \n self.run(target.code)\n \n def _format_exc(self,exc:BaseException):\n return traceback.format_exception_only(exc)[-1].strip()\n \n def _compile_error_message(self,expr):\n ''\n try :\n compile(expr,\"\",\"eval\")\n except SyntaxError as exc:\n return _rstr(self._format_exc(exc))\n return \"\"\n \n def _getsourcelines(self,obj):\n \n \n \n \n \n lines,lineno=inspect.getsourcelines(obj)\n lineno=max(1,lineno)\n return lines,lineno\n \n def _help_message_from_doc(self,doc):\n lines=[line.strip()for line in doc.rstrip().splitlines()]\n if not lines:\n return \"No help message found.\"\n if \"\"in lines:\n usage_end=lines.index(\"\")\n else :\n usage_end=1\n formatted=[]\n indent=\" \"*len(self.prompt)\n for i,line in enumerate(lines):\n if i ==0:\n prefix=\"Usage: \"\n elif i 0:\n self.commit_frame(force=True )\n self.current_frame=None\n \n def commit_frame(self,force=False ):\n if self.current_frame:\n f=self.current_frame\n if f.tell()>=self._FRAME_SIZE_TARGET or force:\n data=f.getbuffer()\n write=self.file_write\n if len(data)>=self._FRAME_SIZE_MIN:\n \n \n \n \n write(FRAME+pack(\"':\n raise AttributeError(\"Can't get local attribute {!r} on {!r}\"\n .format(name,obj))\n try :\n parent=obj\n obj=getattr(obj,subpath)\n except AttributeError:\n raise AttributeError(\"Can't get attribute {!r} on {!r}\"\n .format(name,obj))from None\n return obj,parent\n \ndef whichmodule(obj,name):\n ''\n module_name=getattr(obj,'__module__',None )\n if module_name is not None :\n return module_name\n \n \n for module_name,module in sys.modules.copy().items():\n if (module_name =='__main__'\n or module_name =='__mp_main__'\n or module is None ):\n continue\n try :\n if _getattribute(module,name)[0]is obj:\n return module_name\n except AttributeError:\n pass\n return '__main__'\n \ndef encode_long(x):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if x ==0:\n return b''\n nbytes=(x.bit_length()>>3)+1\n result=x.to_bytes(nbytes,byteorder='little',signed=True )\n if x <0 and nbytes >1:\n if result[-1]==0xff and (result[-2]&0x80)!=0:\n result=result[:-1]\n return result\n \ndef decode_long(data):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n return int.from_bytes(data,byteorder='little',signed=True )\n \n \n \n \nclass _Pickler:\n\n def __init__(self,file,protocol=None ,*,fix_imports=True ,\n buffer_callback=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if protocol is None :\n protocol=DEFAULT_PROTOCOL\n if protocol <0:\n protocol=HIGHEST_PROTOCOL\n elif not 0 <=protocol <=HIGHEST_PROTOCOL:\n raise ValueError(\"pickle protocol must be <= %d\"%HIGHEST_PROTOCOL)\n if buffer_callback is not None and protocol <5:\n raise ValueError(\"buffer_callback needs protocol >= 5\")\n self._buffer_callback=buffer_callback\n try :\n self._file_write=file.write\n except AttributeError:\n raise TypeError(\"file must have a 'write' attribute\")\n self.framer=_Framer(self._file_write)\n self.write=self.framer.write\n self._write_large_bytes=self.framer.write_large_bytes\n self.memo={}\n self.proto=int(protocol)\n self.bin=protocol >=1\n self.fast=0\n self.fix_imports=fix_imports and protocol <3\n \n def clear_memo(self):\n ''\n\n\n\n\n\n \n self.memo.clear()\n \n def dump(self,obj):\n ''\n \n \n if not hasattr(self,\"_file_write\"):\n raise PicklingError(\"Pickler.__init__() was not called by \"\n \"%s.__init__()\"%(self.__class__.__name__,))\n if self.proto >=2:\n self.write(PROTO+pack(\"=4:\n self.framer.start_framing()\n self.save(obj)\n self.write(STOP)\n self.framer.end_framing()\n \n def memoize(self,obj):\n ''\n \n \n \n \n \n \n \n \n \n \n \n \n \n if self.fast:\n return\n assert id(obj)not in self.memo\n idx=len(self.memo)\n self.write(self.put(idx))\n self.memo[id(obj)]=idx,obj\n \n \n def put(self,idx):\n if self.proto >=4:\n return MEMOIZE\n elif self.bin:\n if idx <256:\n return BINPUT+pack(\"=2 and func_name ==\"__newobj_ex__\":\n cls,args,kwargs=args\n if not hasattr(cls,\"__new__\"):\n raise PicklingError(\"args[0] from {} args has no __new__\"\n .format(func_name))\n if obj is not None and cls is not obj.__class__:\n raise PicklingError(\"args[0] from {} args has the wrong class\"\n .format(func_name))\n if self.proto >=4:\n save(cls)\n save(args)\n save(kwargs)\n write(NEWOBJ_EX)\n else :\n func=partial(cls.__new__,cls,*args,**kwargs)\n save(func)\n save(())\n write(REDUCE)\n elif self.proto >=2 and func_name ==\"__newobj__\":\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n cls=args[0]\n if not hasattr(cls,\"__new__\"):\n raise PicklingError(\n \"args[0] from __newobj__ args has no __new__\")\n if obj is not None and cls is not obj.__class__:\n raise PicklingError(\n \"args[0] from __newobj__ args has the wrong class\")\n args=args[1:]\n save(cls)\n save(args)\n write(NEWOBJ)\n else :\n save(func)\n save(args)\n write(REDUCE)\n \n if obj is not None :\n \n \n \n if id(obj)in self.memo:\n write(POP+self.get(self.memo[id(obj)][0]))\n else :\n self.memoize(obj)\n \n \n \n \n \n \n if listitems is not None :\n self._batch_appends(listitems)\n \n if dictitems is not None :\n self._batch_setitems(dictitems)\n \n if state is not None :\n if state_setter is None :\n save(state)\n write(BUILD)\n else :\n \n \n \n \n save(state_setter)\n save(obj)\n save(state)\n write(TUPLE2)\n \n write(REDUCE)\n \n \n \n \n write(POP)\n \n \n \n dispatch={}\n \n def save_none(self,obj):\n self.write(NONE)\n dispatch[type(None )]=save_none\n \n def save_bool(self,obj):\n if self.proto >=2:\n self.write(NEWTRUE if obj else NEWFALSE)\n else :\n self.write(TRUE if obj else FALSE)\n dispatch[bool]=save_bool\n \n def save_long(self,obj):\n if self.bin:\n \n \n \n \n if obj >=0:\n if obj <=0xff:\n self.write(BININT1+pack(\"=2:\n encoded=encode_long(obj)\n n=len(encoded)\n if n <256:\n self.write(LONG1+pack(\"d',obj))\n else :\n self.write(FLOAT+repr(obj).encode(\"ascii\")+b'\\n')\n dispatch[float]=save_float\n \n def save_bytes(self,obj):\n if self.proto <3:\n if not obj:\n self.save_reduce(bytes,(),obj=obj)\n else :\n self.save_reduce(codecs.encode,\n (str(obj,'latin1'),'latin1'),obj=obj)\n return\n n=len(obj)\n if n <=0xff:\n self.write(SHORT_BINBYTES+pack(\"0xffffffff and self.proto >=4:\n self._write_large_bytes(BINBYTES8+pack(\"=self.framer._FRAME_SIZE_TARGET:\n self._write_large_bytes(BINBYTES+pack(\"=self.framer._FRAME_SIZE_TARGET:\n self._write_large_bytes(BYTEARRAY8+pack(\"= 5\")\n with obj.raw()as m:\n if not m.contiguous:\n raise PicklingError(\"PickleBuffer can not be pickled when \"\n \"pointing to a non-contiguous buffer\")\n in_band=True\n if self._buffer_callback is not None :\n in_band=bool(self._buffer_callback(obj))\n if in_band:\n \n \n if m.readonly:\n self.save_bytes(m.tobytes())\n else :\n self.save_bytearray(m.tobytes())\n else :\n \n self.write(NEXT_BUFFER)\n if m.readonly:\n self.write(READONLY_BUFFER)\n \n dispatch[PickleBuffer]=save_picklebuffer\n \n def save_str(self,obj):\n if self.bin:\n encoded=obj.encode('utf-8','surrogatepass')\n n=len(encoded)\n if n <=0xff and self.proto >=4:\n self.write(SHORT_BINUNICODE+pack(\"0xffffffff and self.proto >=4:\n self._write_large_bytes(BINUNICODE8+pack(\"=self.framer._FRAME_SIZE_TARGET:\n self._write_large_bytes(BINUNICODE+pack(\"=2:\n for element in obj:\n save(element)\n \n if id(obj)in memo:\n get=self.get(memo[id(obj)][0])\n self.write(POP *n+get)\n else :\n self.write(_tuplesize2code[n])\n self.memoize(obj)\n return\n \n \n \n write=self.write\n write(MARK)\n for element in obj:\n save(element)\n \n if id(obj)in memo:\n \n \n \n \n \n \n \n get=self.get(memo[id(obj)][0])\n if self.bin:\n write(POP_MARK+get)\n else :\n write(POP *(n+1)+get)\n return\n \n \n write(TUPLE)\n self.memoize(obj)\n \n dispatch[tuple]=save_tuple\n \n def save_list(self,obj):\n if self.bin:\n self.write(EMPTY_LIST)\n else :\n self.write(MARK+LIST)\n \n self.memoize(obj)\n self._batch_appends(obj)\n \n dispatch[list]=save_list\n \n _BATCHSIZE=1000\n \n def _batch_appends(self,items):\n \n save=self.save\n write=self.write\n \n if not self.bin:\n for x in items:\n save(x)\n write(APPEND)\n return\n \n it=iter(items)\n while True :\n tmp=list(islice(it,self._BATCHSIZE))\n n=len(tmp)\n if n >1:\n write(MARK)\n for x in tmp:\n save(x)\n write(APPENDS)\n elif n:\n save(tmp[0])\n write(APPEND)\n \n if n 1:\n write(MARK)\n for k,v in tmp:\n save(k)\n save(v)\n write(SETITEMS)\n elif n:\n k,v=tmp[0]\n save(k)\n save(v)\n write(SETITEM)\n \n if n 0:\n write(MARK)\n for item in batch:\n save(item)\n write(ADDITEMS)\n if n =2:\n code=_extension_registry.get((module_name,name))\n if code:\n assert code >0\n if code <=0xff:\n write(EXT1+pack(\"=4:\n self.save(module_name)\n self.save(name)\n write(STACK_GLOBAL)\n elif parent is not module:\n self.save_reduce(getattr,(parent,lastname))\n elif self.proto >=3:\n write(GLOBAL+bytes(module_name,\"utf-8\")+b'\\n'+\n bytes(name,\"utf-8\")+b'\\n')\n else :\n if self.fix_imports:\n r_name_mapping=_compat_pickle.REVERSE_NAME_MAPPING\n r_import_mapping=_compat_pickle.REVERSE_IMPORT_MAPPING\n if (module_name,name)in r_name_mapping:\n module_name,name=r_name_mapping[(module_name,name)]\n elif module_name in r_import_mapping:\n module_name=r_import_mapping[module_name]\n try :\n write(GLOBAL+bytes(module_name,\"ascii\")+b'\\n'+\n bytes(name,\"ascii\")+b'\\n')\n except UnicodeEncodeError:\n raise PicklingError(\n \"can't pickle global identifier '%s.%s' using \"\n \"pickle protocol %i\"%(module,name,self.proto))from None\n \n self.memoize(obj)\n \n def save_type(self,obj):\n if obj is type(None ):\n return self.save_reduce(type,(None ,),obj=obj)\n elif obj is type(NotImplemented):\n return self.save_reduce(type,(NotImplemented,),obj=obj)\n elif obj is type(...):\n return self.save_reduce(type,(...,),obj=obj)\n return self.save_global(obj)\n \n dispatch[FunctionType]=save_global\n dispatch[type]=save_type\n \n \n \n \nclass _Unpickler:\n\n def __init__(self,file,*,fix_imports=True ,\n encoding=\"ASCII\",errors=\"strict\",buffers=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n self._buffers=iter(buffers)if buffers is not None else None\n self._file_readline=file.readline\n self._file_read=file.read\n self.memo={}\n self.encoding=encoding\n self.errors=errors\n self.proto=0\n self.fix_imports=fix_imports\n \n def load(self):\n ''\n\n\n \n \n \n if not hasattr(self,\"_file_read\"):\n raise UnpicklingError(\"Unpickler.__init__() was not called by \"\n \"%s.__init__()\"%(self.__class__.__name__,))\n self._unframer=_Unframer(self._file_read,self._file_readline)\n self.read=self._unframer.read\n self.readinto=self._unframer.readinto\n self.readline=self._unframer.readline\n self.metastack=[]\n self.stack=[]\n self.append=self.stack.append\n self.proto=0\n read=self.read\n dispatch=self.dispatch\n try :\n while True :\n key=read(1)\n if not key:\n raise EOFError\n assert isinstance(key,bytes_types)\n dispatch[key[0]](self)\n except _Stop as stopinst:\n return stopinst.value\n \n \n def pop_mark(self):\n items=self.stack\n self.stack=self.metastack.pop()\n self.append=self.stack.append\n return items\n \n def persistent_load(self,pid):\n raise UnpicklingError(\"unsupported persistent id encountered\")\n \n dispatch={}\n \n def load_proto(self):\n proto=self.read(1)[0]\n if not 0 <=proto <=HIGHEST_PROTOCOL:\n raise ValueError(\"unsupported pickle protocol: %d\"%proto)\n self.proto=proto\n dispatch[PROTO[0]]=load_proto\n \n def load_frame(self):\n frame_size,=unpack('sys.maxsize:\n raise ValueError(\"frame size > sys.maxsize: %d\"%frame_size)\n self._unframer.load_frame(frame_size)\n dispatch[FRAME[0]]=load_frame\n \n def load_persid(self):\n try :\n pid=self.readline()[:-1].decode(\"ascii\")\n except UnicodeDecodeError:\n raise UnpicklingError(\n \"persistent IDs in protocol 0 must be ASCII strings\")\n self.append(self.persistent_load(pid))\n dispatch[PERSID[0]]=load_persid\n \n def load_binpersid(self):\n pid=self.stack.pop()\n self.append(self.persistent_load(pid))\n dispatch[BINPERSID[0]]=load_binpersid\n \n def load_none(self):\n self.append(None )\n dispatch[NONE[0]]=load_none\n \n def load_false(self):\n self.append(False )\n dispatch[NEWFALSE[0]]=load_false\n \n def load_true(self):\n self.append(True )\n dispatch[NEWTRUE[0]]=load_true\n \n def load_int(self):\n data=self.readline()\n if data ==FALSE[1:]:\n val=False\n elif data ==TRUE[1:]:\n val=True\n else :\n val=int(data,0)\n self.append(val)\n dispatch[INT[0]]=load_int\n \n def load_binint(self):\n self.append(unpack('d',self.read(8))[0])\n dispatch[BINFLOAT[0]]=load_binfloat\n \n def _decode_string(self,value):\n \n \n \n if self.encoding ==\"bytes\":\n return value\n else :\n return value.decode(self.encoding,self.errors)\n \n def load_string(self):\n data=self.readline()[:-1]\n \n if len(data)>=2 and data[0]==data[-1]and data[0]in b'\"\\'':\n data=data[1:-1]\n else :\n raise UnpicklingError(\"the STRING opcode argument must be quoted\")\n self.append(self._decode_string(codecs.escape_decode(data)[0]))\n dispatch[STRING[0]]=load_string\n \n def load_binstring(self):\n \n len,=unpack('maxsize:\n raise UnpicklingError(\"BINBYTES exceeds system's maximum size \"\n \"of %d bytes\"%maxsize)\n self.append(self.read(len))\n dispatch[BINBYTES[0]]=load_binbytes\n \n def load_unicode(self):\n self.append(str(self.readline()[:-1],'raw-unicode-escape'))\n dispatch[UNICODE[0]]=load_unicode\n \n def load_binunicode(self):\n len,=unpack('maxsize:\n raise UnpicklingError(\"BINUNICODE exceeds system's maximum size \"\n \"of %d bytes\"%maxsize)\n self.append(str(self.read(len),'utf-8','surrogatepass'))\n dispatch[BINUNICODE[0]]=load_binunicode\n \n def load_binunicode8(self):\n len,=unpack('maxsize:\n raise UnpicklingError(\"BINUNICODE8 exceeds system's maximum size \"\n \"of %d bytes\"%maxsize)\n self.append(str(self.read(len),'utf-8','surrogatepass'))\n dispatch[BINUNICODE8[0]]=load_binunicode8\n \n def load_binbytes8(self):\n len,=unpack('maxsize:\n raise UnpicklingError(\"BINBYTES8 exceeds system's maximum size \"\n \"of %d bytes\"%maxsize)\n self.append(self.read(len))\n dispatch[BINBYTES8[0]]=load_binbytes8\n \n def load_bytearray8(self):\n len,=unpack('maxsize:\n raise UnpicklingError(\"BYTEARRAY8 exceeds system's maximum size \"\n \"of %d bytes\"%maxsize)\n b=bytearray(len)\n self.readinto(b)\n self.append(b)\n dispatch[BYTEARRAY8[0]]=load_bytearray8\n \n def load_next_buffer(self):\n if self._buffers is None :\n raise UnpicklingError(\"pickle stream refers to out-of-band data \"\n \"but no *buffers* argument was given\")\n try :\n buf=next(self._buffers)\n except StopIteration:\n raise UnpicklingError(\"not enough out-of-band buffers\")\n self.append(buf)\n dispatch[NEXT_BUFFER[0]]=load_next_buffer\n \n def load_readonly_buffer(self):\n buf=self.stack[-1]\n with memoryview(buf)as m:\n if not m.readonly:\n self.stack[-1]=m.toreadonly()\n dispatch[READONLY_BUFFER[0]]=load_readonly_buffer\n \n def load_short_binstring(self):\n len=self.read(1)[0]\n data=self.read(len)\n self.append(self._decode_string(data))\n dispatch[SHORT_BINSTRING[0]]=load_short_binstring\n \n def load_short_binbytes(self):\n len=self.read(1)[0]\n self.append(self.read(len))\n dispatch[SHORT_BINBYTES[0]]=load_short_binbytes\n \n def load_short_binunicode(self):\n len=self.read(1)[0]\n self.append(str(self.read(len),'utf-8','surrogatepass'))\n dispatch[SHORT_BINUNICODE[0]]=load_short_binunicode\n \n def load_tuple(self):\n items=self.pop_mark()\n self.append(tuple(items))\n dispatch[TUPLE[0]]=load_tuple\n \n def load_empty_tuple(self):\n self.append(())\n dispatch[EMPTY_TUPLE[0]]=load_empty_tuple\n \n def load_tuple1(self):\n self.stack[-1]=(self.stack[-1],)\n dispatch[TUPLE1[0]]=load_tuple1\n \n def load_tuple2(self):\n self.stack[-2:]=[(self.stack[-2],self.stack[-1])]\n dispatch[TUPLE2[0]]=load_tuple2\n \n def load_tuple3(self):\n self.stack[-3:]=[(self.stack[-3],self.stack[-2],self.stack[-1])]\n dispatch[TUPLE3[0]]=load_tuple3\n \n def load_empty_list(self):\n self.append([])\n dispatch[EMPTY_LIST[0]]=load_empty_list\n \n def load_empty_dictionary(self):\n self.append({})\n dispatch[EMPTY_DICT[0]]=load_empty_dictionary\n \n def load_empty_set(self):\n self.append(set())\n dispatch[EMPTY_SET[0]]=load_empty_set\n \n def load_frozenset(self):\n items=self.pop_mark()\n self.append(frozenset(items))\n dispatch[FROZENSET[0]]=load_frozenset\n \n def load_list(self):\n items=self.pop_mark()\n self.append(items)\n dispatch[LIST[0]]=load_list\n \n def load_dict(self):\n items=self.pop_mark()\n d={items[i]:items[i+1]\n for i in range(0,len(items),2)}\n self.append(d)\n dispatch[DICT[0]]=load_dict\n \n \n \n \n \n \n def _instantiate(self,klass,args):\n if (args or not isinstance(klass,type)or\n hasattr(klass,\"__getinitargs__\")):\n try :\n value=klass(*args)\n except TypeError as err:\n raise TypeError(\"in constructor for %s: %s\"%\n (klass.__name__,str(err)),err.__traceback__)\n else :\n value=klass.__new__(klass)\n self.append(value)\n \n def load_inst(self):\n module=self.readline()[:-1].decode(\"ascii\")\n name=self.readline()[:-1].decode(\"ascii\")\n klass=self.find_class(module,name)\n self._instantiate(klass,self.pop_mark())\n dispatch[INST[0]]=load_inst\n \n def load_obj(self):\n \n args=self.pop_mark()\n cls=args.pop(0)\n self._instantiate(cls,args)\n dispatch[OBJ[0]]=load_obj\n \n def load_newobj(self):\n args=self.stack.pop()\n cls=self.stack.pop()\n obj=cls.__new__(cls,*args)\n self.append(obj)\n dispatch[NEWOBJ[0]]=load_newobj\n \n def load_newobj_ex(self):\n kwargs=self.stack.pop()\n args=self.stack.pop()\n cls=self.stack.pop()\n obj=cls.__new__(cls,*args,**kwargs)\n self.append(obj)\n dispatch[NEWOBJ_EX[0]]=load_newobj_ex\n \n def load_global(self):\n module=self.readline()[:-1].decode(\"utf-8\")\n name=self.readline()[:-1].decode(\"utf-8\")\n klass=self.find_class(module,name)\n self.append(klass)\n dispatch[GLOBAL[0]]=load_global\n \n def load_stack_global(self):\n name=self.stack.pop()\n module=self.stack.pop()\n if type(name)is not str or type(module)is not str:\n raise UnpicklingError(\"STACK_GLOBAL requires str\")\n self.append(self.find_class(module,name))\n dispatch[STACK_GLOBAL[0]]=load_stack_global\n \n def load_ext1(self):\n code=self.read(1)[0]\n self.get_extension(code)\n dispatch[EXT1[0]]=load_ext1\n \n def load_ext2(self):\n code,=unpack('=4:\n return _getattribute(sys.modules[module],name)[0]\n else :\n return getattr(sys.modules[module],name)\n \n def load_reduce(self):\n stack=self.stack\n args=stack.pop()\n func=stack[-1]\n stack[-1]=func(*args)\n dispatch[REDUCE[0]]=load_reduce\n \n def load_pop(self):\n if self.stack:\n del self.stack[-1]\n else :\n self.pop_mark()\n dispatch[POP[0]]=load_pop\n \n def load_pop_mark(self):\n self.pop_mark()\n dispatch[POP_MARK[0]]=load_pop_mark\n \n def load_dup(self):\n self.append(self.stack[-1])\n dispatch[DUP[0]]=load_dup\n \n def load_get(self):\n i=int(self.readline()[:-1])\n try :\n self.append(self.memo[i])\n except KeyError:\n msg=f'Memo value not found at index {i}'\n raise UnpicklingError(msg)from None\n dispatch[GET[0]]=load_get\n \n def load_binget(self):\n i=self.read(1)[0]\n try :\n self.append(self.memo[i])\n except KeyError as exc:\n msg=f'Memo value not found at index {i}'\n raise UnpicklingError(msg)from None\n dispatch[BINGET[0]]=load_binget\n \n def load_long_binget(self):\n i,=unpack('maxsize:\n raise ValueError(\"negative LONG_BINPUT argument\")\n self.memo[i]=self.stack[-1]\n dispatch[LONG_BINPUT[0]]=load_long_binput\n \n def load_memoize(self):\n memo=self.memo\n memo[len(memo)]=self.stack[-1]\n dispatch[MEMOIZE[0]]=load_memoize\n \n def load_append(self):\n stack=self.stack\n value=stack.pop()\n list=stack[-1]\n list.append(value)\n dispatch[APPEND[0]]=load_append\n \n def load_appends(self):\n items=self.pop_mark()\n list_obj=self.stack[-1]\n try :\n extend=list_obj.extend\n except AttributeError:\n pass\n else :\n extend(items)\n return\n \n \n \n append=list_obj.append\n for item in items:\n append(item)\n dispatch[APPENDS[0]]=load_appends\n \n def load_setitem(self):\n stack=self.stack\n value=stack.pop()\n key=stack.pop()\n dict=stack[-1]\n dict[key]=value\n dispatch[SETITEM[0]]=load_setitem\n \n def load_setitems(self):\n items=self.pop_mark()\n dict=self.stack[-1]\n for i in range(0,len(items),2):\n dict[items[i]]=items[i+1]\n dispatch[SETITEMS[0]]=load_setitems\n \n def load_additems(self):\n items=self.pop_mark()\n set_obj=self.stack[-1]\n if isinstance(set_obj,set):\n set_obj.update(items)\n else :\n add=set_obj.add\n for item in items:\n add(item)\n dispatch[ADDITEMS[0]]=load_additems\n \n def load_build(self):\n stack=self.stack\n state=stack.pop()\n inst=stack[-1]\n setstate=getattr(inst,\"__setstate__\",None )\n if setstate is not None :\n setstate(state)\n return\n slotstate=None\n if isinstance(state,tuple)and len(state)==2:\n state,slotstate=state\n if state:\n inst_dict=inst.__dict__\n intern=sys.intern\n for k,v in state.items():\n if type(k)is str:\n inst_dict[intern(k)]=v\n else :\n inst_dict[k]=v\n if slotstate:\n for k,v in slotstate.items():\n setattr(inst,k,v)\n dispatch[BUILD[0]]=load_build\n \n def load_mark(self):\n self.metastack.append(self.stack)\n self.stack=[]\n self.append=self.stack.append\n dispatch[MARK[0]]=load_mark\n \n def load_stop(self):\n value=self.stack.pop()\n raise _Stop(value)\n dispatch[STOP[0]]=load_stop\n \n \n \n \ndef _dump(obj,file,protocol=None ,*,fix_imports=True ,buffer_callback=None ):\n _Pickler(file,protocol,fix_imports=fix_imports,\n buffer_callback=buffer_callback).dump(obj)\n \ndef _dumps(obj,protocol=None ,*,fix_imports=True ,buffer_callback=None ):\n f=io.BytesIO()\n _Pickler(f,protocol,fix_imports=fix_imports,\n buffer_callback=buffer_callback).dump(obj)\n res=f.getvalue()\n assert isinstance(res,bytes_types)\n return res\n \ndef _load(file,*,fix_imports=True ,encoding=\"ASCII\",errors=\"strict\",\nbuffers=None ):\n return _Unpickler(file,fix_imports=fix_imports,buffers=buffers,\n encoding=encoding,errors=errors).load()\n \ndef _loads(s,/,*,fix_imports=True ,encoding=\"ASCII\",errors=\"strict\",\nbuffers=None ):\n if isinstance(s,str):\n raise TypeError(\"Can't load pickle from unicode string\")\n file=io.BytesIO(s)\n return _Unpickler(file,fix_imports=fix_imports,buffers=buffers,\n encoding=encoding,errors=errors).load()\n \n \ntry :\n from _pickle import (\n PickleError,\n PicklingError,\n UnpicklingError,\n Pickler,\n Unpickler,\n dump,\n dumps,\n load,\n loads\n )\nexcept ImportError:\n Pickler,Unpickler=_Pickler,_Unpickler\n dump,dumps,load,loads=_dump,_dumps,_load,_loads\n \n \ndef _test():\n import doctest\n return doctest.testmod()\n \nif __name__ ==\"__main__\":\n import argparse\n parser=argparse.ArgumentParser(\n description='display contents of the pickle files')\n parser.add_argument(\n 'pickle_file',type=argparse.FileType('br'),\n nargs='*',help='the pickle file')\n parser.add_argument(\n '-t','--test',action='store_true',\n help='run self-test suite')\n parser.add_argument(\n '-v',action='store_true',\n help='run verbosely; only affects self-test run')\n args=parser.parse_args()\n if args.test:\n _test()\n else :\n if not args.pickle_file:\n parser.print_help()\n else :\n import pprint\n for f in args.pickle_file:\n obj=load(f)\n pprint.pprint(obj)\n", ["_compat_pickle", "_pickle", "argparse", "codecs", "copyreg", "doctest", "functools", "io", "itertools", "pprint", "re", "struct", "sys", "types"]], "pkgutil": [".py", "''\n\nfrom collections import namedtuple\nfrom functools import singledispatch as simplegeneric\nimport importlib\nimport importlib.util\nimport importlib.machinery\nimport os\nimport os.path\nimport sys\nfrom types import ModuleType\nimport warnings\n\n__all__=[\n'get_importer','iter_importers','get_loader','find_loader',\n'walk_packages','iter_modules','get_data',\n'read_code','extend_path',\n'ModuleInfo',\n]\n\n\nModuleInfo=namedtuple('ModuleInfo','module_finder name ispkg')\nModuleInfo.__doc__='A namedtuple with minimal info about a module.'\n\n\ndef read_code(stream):\n\n\n import marshal\n \n magic=stream.read(4)\n if magic !=importlib.util.MAGIC_NUMBER:\n return None\n \n stream.read(12)\n return marshal.load(stream)\n \n \ndef walk_packages(path=None ,prefix='',onerror=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def seen(p,m={}):\n if p in m:\n return True\n m[p]=True\n \n for info in iter_modules(path,prefix):\n yield info\n \n if info.ispkg:\n try :\n __import__(info.name)\n except ImportError:\n if onerror is not None :\n onerror(info.name)\n except Exception:\n if onerror is not None :\n onerror(info.name)\n else :\n raise\n else :\n path=getattr(sys.modules[info.name],'__path__',None )or []\n \n \n path=[p for p in path if not seen(p)]\n \n yield from walk_packages(path,info.name+'.',onerror)\n \n \ndef iter_modules(path=None ,prefix=''):\n ''\n\n\n\n\n\n\n\n \n if path is None :\n importers=iter_importers()\n elif isinstance(path,str):\n raise ValueError(\"path must be None or list of paths to look for \"\n \"modules in\")\n else :\n importers=map(get_importer,path)\n \n yielded={}\n for i in importers:\n for name,ispkg in iter_importer_modules(i,prefix):\n if name not in yielded:\n yielded[name]=1\n yield ModuleInfo(i,name,ispkg)\n \n \n@simplegeneric\ndef iter_importer_modules(importer,prefix=''):\n if not hasattr(importer,'iter_modules'):\n return []\n return importer.iter_modules(prefix)\n \n \n \ndef _iter_file_finder_modules(importer,prefix=''):\n if importer.path is None or not os.path.isdir(importer.path):\n return\n \n yielded={}\n import inspect\n try :\n filenames=os.listdir(importer.path)\n except OSError:\n \n filenames=[]\n filenames.sort()\n \n for fn in filenames:\n modname=inspect.getmodulename(fn)\n if modname =='__init__'or modname in yielded:\n continue\n \n path=os.path.join(importer.path,fn)\n ispkg=False\n \n if not modname and os.path.isdir(path)and '.'not in fn:\n modname=fn\n try :\n dircontents=os.listdir(path)\n except OSError:\n \n dircontents=[]\n for fn in dircontents:\n subname=inspect.getmodulename(fn)\n if subname =='__init__':\n ispkg=True\n break\n else :\n continue\n \n if modname and '.'not in modname:\n yielded[modname]=1\n yield prefix+modname,ispkg\n \niter_importer_modules.register(\nimportlib.machinery.FileFinder,_iter_file_finder_modules)\n\n\ntry :\n import zipimport\n from zipimport import zipimporter\n \n def iter_zipimport_modules(importer,prefix=''):\n dirlist=sorted(zipimport._zip_directory_cache[importer.archive])\n _prefix=importer.prefix\n plen=len(_prefix)\n yielded={}\n import inspect\n for fn in dirlist:\n if not fn.startswith(_prefix):\n continue\n \n fn=fn[plen:].split(os.sep)\n \n if len(fn)==2 and fn[1].startswith('__init__.py'):\n if fn[0]not in yielded:\n yielded[fn[0]]=1\n yield prefix+fn[0],True\n \n if len(fn)!=1:\n continue\n \n modname=inspect.getmodulename(fn[0])\n if modname =='__init__':\n continue\n \n if modname and '.'not in modname and modname not in yielded:\n yielded[modname]=1\n yield prefix+modname,False\n \n iter_importer_modules.register(zipimporter,iter_zipimport_modules)\n \nexcept ImportError:\n pass\n \n \ndef get_importer(path_item):\n ''\n\n\n\n\n\n\n \n path_item=os.fsdecode(path_item)\n try :\n importer=sys.path_importer_cache[path_item]\n except KeyError:\n for path_hook in sys.path_hooks:\n try :\n importer=path_hook(path_item)\n sys.path_importer_cache.setdefault(path_item,importer)\n break\n except ImportError:\n pass\n else :\n importer=None\n return importer\n \n \ndef iter_importers(fullname=\"\"):\n ''\n\n\n\n\n\n\n\n\n\n \n if fullname.startswith('.'):\n msg=\"Relative module name {!r} not supported\".format(fullname)\n raise ImportError(msg)\n if '.'in fullname:\n \n pkg_name=fullname.rpartition(\".\")[0]\n pkg=importlib.import_module(pkg_name)\n path=getattr(pkg,'__path__',None )\n if path is None :\n return\n else :\n yield from sys.meta_path\n path=sys.path\n for item in path:\n yield get_importer(item)\n \n \ndef get_loader(module_or_name):\n ''\n\n\n\n\n \n warnings._deprecated(\"pkgutil.get_loader\",\n f\"{warnings._DEPRECATED_MSG}; \"\n \"use importlib.util.find_spec() instead\",\n remove=(3,14))\n if module_or_name in sys.modules:\n module_or_name=sys.modules[module_or_name]\n if module_or_name is None :\n return None\n if isinstance(module_or_name,ModuleType):\n module=module_or_name\n loader=getattr(module,'__loader__',None )\n if loader is not None :\n return loader\n if getattr(module,'__spec__',None )is None :\n return None\n fullname=module.__name__\n else :\n fullname=module_or_name\n return find_loader(fullname)\n \n \ndef find_loader(fullname):\n ''\n\n\n\n\n \n warnings._deprecated(\"pkgutil.find_loader\",\n f\"{warnings._DEPRECATED_MSG}; \"\n \"use importlib.util.find_spec() instead\",\n remove=(3,14))\n if fullname.startswith('.'):\n msg=\"Relative module name {!r} not supported\".format(fullname)\n raise ImportError(msg)\n try :\n spec=importlib.util.find_spec(fullname)\n except (ImportError,AttributeError,TypeError,ValueError)as ex:\n \n \n \n msg=\"Error while finding loader for {!r} ({}: {})\"\n raise ImportError(msg.format(fullname,type(ex),ex))from ex\n return spec.loader if spec is not None else None\n \n \ndef extend_path(path,name):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if not isinstance(path,list):\n \n \n return path\n \n sname_pkg=name+\".pkg\"\n \n path=path[:]\n \n parent_package,_,final_name=name.rpartition('.')\n if parent_package:\n try :\n search_path=sys.modules[parent_package].__path__\n except (KeyError,AttributeError):\n \n \n return path\n else :\n search_path=sys.path\n \n for dir in search_path:\n if not isinstance(dir,str):\n continue\n \n finder=get_importer(dir)\n if finder is not None :\n portions=[]\n if hasattr(finder,'find_spec'):\n spec=finder.find_spec(final_name)\n if spec is not None :\n portions=spec.submodule_search_locations or []\n \n elif hasattr(finder,'find_loader'):\n _,portions=finder.find_loader(final_name)\n \n for portion in portions:\n \n \n if portion not in path:\n path.append(portion)\n \n \n \n pkgfile=os.path.join(dir,sname_pkg)\n if os.path.isfile(pkgfile):\n try :\n f=open(pkgfile)\n except OSError as msg:\n sys.stderr.write(\"Can't open %s: %s\\n\"%\n (pkgfile,msg))\n else :\n with f:\n for line in f:\n line=line.rstrip('\\n')\n if not line or line.startswith('#'):\n continue\n path.append(line)\n \n return path\n \n \ndef get_data(package,resource):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n spec=importlib.util.find_spec(package)\n if spec is None :\n return None\n loader=spec.loader\n if loader is None or not hasattr(loader,'get_data'):\n return None\n \n mod=(sys.modules.get(package)or\n importlib._bootstrap._load(spec))\n if mod is None or not hasattr(mod,'__file__'):\n return None\n \n \n \n \n parts=resource.split('/')\n parts.insert(0,os.path.dirname(mod.__file__))\n resource_name=os.path.join(*parts)\n return loader.get_data(resource_name)\n \n \n_NAME_PATTERN=None\n\ndef resolve_name(name):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n global _NAME_PATTERN\n if _NAME_PATTERN is None :\n \n import re\n dotted_words=r'(?!\\d)(\\w+)(\\.(?!\\d)(\\w+))*'\n _NAME_PATTERN=re.compile(f'^(?P{dotted_words})'\n f'(?P:(?P{dotted_words})?)?$',\n re.UNICODE)\n \n m=_NAME_PATTERN.match(name)\n if not m:\n raise ValueError(f'invalid format: {name !r}')\n gd=m.groupdict()\n if gd.get('cln'):\n \n mod=importlib.import_module(gd['pkg'])\n parts=gd.get('obj')\n parts=parts.split('.')if parts else []\n else :\n \n parts=name.split('.')\n modname=parts.pop(0)\n \n mod=importlib.import_module(modname)\n while parts:\n p=parts[0]\n s=f'{modname}.{p}'\n try :\n mod=importlib.import_module(s)\n parts.pop(0)\n modname=s\n except ImportError:\n break\n \n \n \n result=mod\n for p in parts:\n result=getattr(result,p)\n return result\n", ["collections", "functools", "importlib", "importlib.machinery", "importlib.util", "inspect", "marshal", "os", "os.path", "re", "sys", "types", "warnings", "zipimport"]], "platform": [".py", "''\n\n\n\nfrom browser import self as window\n\ndef architecture(*args,**kw):\n return \"\",window.navigator.platform\n \ndef machine(*args,**kw):\n return ''\n \ndef node(*args,**kw):\n return ''\n \ndef platform(*args,**kw):\n return window.navigator.platform\n \ndef processor(*args,**kw):\n return ''\n \ndef python_build():\n return ('.'.join(map(str,__BRYTHON__.implementation[:-1])),\n __BRYTHON__.compiled_date)\n \ndef python_compiler():\n return ''\n \ndef python_branch():\n return ''\n \ndef python_implementation():\n return 'Brython'\n \ndef python_revision():\n return ''\n \ndef python_version():\n return '.'.join(map(str,__BRYTHON__.version_info[:3]))\n \ndef python_version_tuple():\n return __BRYTHON__.version_info[:3]\n \ndef release():\n return ''\n \ndef system():\n return window.navigator.platform\n \ndef system_alias(*args,**kw):\n return window.navigator.platform\n \ndef uname():\n from collections import namedtuple\n klass=namedtuple('uname_result',\n 'system node release version machine processor')\n return klass(window.navigator.platform,'','','','','')\n", ["browser", "collections"]], "posixpath": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ncurdir='.'\npardir='..'\nextsep='.'\nsep='/'\npathsep=':'\ndefpath='/bin:/usr/bin'\naltsep=None\ndevnull='/dev/null'\n\nimport os\nimport sys\nimport stat\nimport genericpath\nfrom genericpath import *\n\n__all__=[\"normcase\",\"isabs\",\"join\",\"splitdrive\",\"split\",\"splitext\",\n\"basename\",\"dirname\",\"commonprefix\",\"getsize\",\"getmtime\",\n\"getatime\",\"getctime\",\"islink\",\"exists\",\"lexists\",\"isdir\",\"isfile\",\n\"ismount\",\"expanduser\",\"expandvars\",\"normpath\",\"abspath\",\n\"samefile\",\"sameopenfile\",\"samestat\",\n\"curdir\",\"pardir\",\"sep\",\"pathsep\",\"defpath\",\"altsep\",\"extsep\",\n\"devnull\",\"realpath\",\"supports_unicode_filenames\",\"relpath\",\n\"commonpath\"]\n\n\ndef _get_sep(path):\n if isinstance(path,bytes):\n return b'/'\n else :\n return '/'\n \n \n \n \n \n \ndef normcase(s):\n ''\n return os.fspath(s)\n \n \n \n \n \ndef isabs(s):\n ''\n s=os.fspath(s)\n sep=_get_sep(s)\n return s.startswith(sep)\n \n \n \n \n \n \ndef join(a,*p):\n ''\n\n\n \n a=os.fspath(a)\n sep=_get_sep(a)\n path=a\n try :\n if not p:\n path[:0]+sep\n for b in map(os.fspath,p):\n if b.startswith(sep):\n path=b\n elif not path or path.endswith(sep):\n path +=b\n else :\n path +=sep+b\n except (TypeError,AttributeError,BytesWarning):\n genericpath._check_arg_types('join',a,*p)\n raise\n return path\n \n \n \n \n \n \n \ndef split(p):\n ''\n \n p=os.fspath(p)\n sep=_get_sep(p)\n i=p.rfind(sep)+1\n head,tail=p[:i],p[i:]\n if head and head !=sep *len(head):\n head=head.rstrip(sep)\n return head,tail\n \n \n \n \n \n \n \ndef splitext(p):\n p=os.fspath(p)\n if isinstance(p,bytes):\n sep=b'/'\n extsep=b'.'\n else :\n sep='/'\n extsep='.'\n return genericpath._splitext(p,sep,None ,extsep)\nsplitext.__doc__=genericpath._splitext.__doc__\n\n\n\n\ndef splitdrive(p):\n ''\n \n p=os.fspath(p)\n return p[:0],p\n \n \n \n \ndef basename(p):\n ''\n p=os.fspath(p)\n sep=_get_sep(p)\n i=p.rfind(sep)+1\n return p[i:]\n \n \n \n \ndef dirname(p):\n ''\n p=os.fspath(p)\n sep=_get_sep(p)\n i=p.rfind(sep)+1\n head=p[:i]\n if head and head !=sep *len(head):\n head=head.rstrip(sep)\n return head\n \n \n \n \n \ndef islink(path):\n ''\n try :\n st=os.lstat(path)\n except (OSError,ValueError,AttributeError):\n return False\n return stat.S_ISLNK(st.st_mode)\n \n \n \ndef lexists(path):\n ''\n try :\n os.lstat(path)\n except (OSError,ValueError):\n return False\n return True\n \n \n \n \n \ndef ismount(path):\n ''\n try :\n s1=os.lstat(path)\n except (OSError,ValueError):\n \n return False\n else :\n \n if stat.S_ISLNK(s1.st_mode):\n return False\n \n if isinstance(path,bytes):\n parent=join(path,b'..')\n else :\n parent=join(path,'..')\n parent=realpath(parent)\n try :\n s2=os.lstat(parent)\n except (OSError,ValueError):\n return False\n \n dev1=s1.st_dev\n dev2=s2.st_dev\n if dev1 !=dev2:\n return True\n ino1=s1.st_ino\n ino2=s2.st_ino\n if ino1 ==ino2:\n return True\n return False\n \n \n \n \n \n \n \n \n \n \n \ndef expanduser(path):\n ''\n \n path=os.fspath(path)\n if isinstance(path,bytes):\n tilde=b'~'\n else :\n tilde='~'\n if not path.startswith(tilde):\n return path\n sep=_get_sep(path)\n i=path.find(sep,1)\n if i <0:\n i=len(path)\n if i ==1:\n if 'HOME'not in os.environ:\n try :\n import pwd\n except ImportError:\n \n return path\n try :\n userhome=pwd.getpwuid(os.getuid()).pw_dir\n except KeyError:\n \n \n return path\n else :\n userhome=os.environ['HOME']\n else :\n try :\n import pwd\n except ImportError:\n \n return path\n name=path[1:i]\n if isinstance(name,bytes):\n name=str(name,'ASCII')\n try :\n pwent=pwd.getpwnam(name)\n except KeyError:\n \n \n return path\n userhome=pwent.pw_dir\n \n if userhome is None and sys.platform ==\"vxworks\":\n return path\n if isinstance(path,bytes):\n userhome=os.fsencode(userhome)\n root=b'/'\n else :\n root='/'\n userhome=userhome.rstrip(root)\n return (userhome+path[i:])or root\n \n \n \n \n \n \n_varprog=None\n_varprogb=None\n\ndef expandvars(path):\n ''\n \n path=os.fspath(path)\n global _varprog,_varprogb\n if isinstance(path,bytes):\n if b'$'not in path:\n return path\n if not _varprogb:\n import re\n _varprogb=re.compile(br'\\$(\\w+|\\{[^}]*\\})',re.ASCII)\n search=_varprogb.search\n start=b'{'\n end=b'}'\n environ=getattr(os,'environb',None )\n else :\n if '$'not in path:\n return path\n if not _varprog:\n import re\n _varprog=re.compile(r'\\$(\\w+|\\{[^}]*\\})',re.ASCII)\n search=_varprog.search\n start='{'\n end='}'\n environ=os.environ\n i=0\n while True :\n m=search(path,i)\n if not m:\n break\n i,j=m.span(0)\n name=m.group(1)\n if name.startswith(start)and name.endswith(end):\n name=name[1:-1]\n try :\n if environ is None :\n value=os.fsencode(os.environ[os.fsdecode(name)])\n else :\n value=environ[name]\n except KeyError:\n i=j\n else :\n tail=path[j:]\n path=path[:i]+value\n i=len(path)\n path +=tail\n return path\n \n \n \n \n \n \ntry :\n from posix import _path_normpath\n \nexcept ImportError:\n def normpath(path):\n ''\n path=os.fspath(path)\n if isinstance(path,bytes):\n sep=b'/'\n empty=b''\n dot=b'.'\n dotdot=b'..'\n else :\n sep='/'\n empty=''\n dot='.'\n dotdot='..'\n if path ==empty:\n return dot\n initial_slashes=path.startswith(sep)\n \n \n \n if (initial_slashes and\n path.startswith(sep *2)and not path.startswith(sep *3)):\n initial_slashes=2\n comps=path.split(sep)\n new_comps=[]\n for comp in comps:\n if comp in (empty,dot):\n continue\n if (comp !=dotdot or (not initial_slashes and not new_comps)or\n (new_comps and new_comps[-1]==dotdot)):\n new_comps.append(comp)\n elif new_comps:\n new_comps.pop()\n comps=new_comps\n path=sep.join(comps)\n if initial_slashes:\n path=sep *initial_slashes+path\n return path or dot\n \nelse :\n def normpath(path):\n ''\n path=os.fspath(path)\n if isinstance(path,bytes):\n return os.fsencode(_path_normpath(os.fsdecode(path)))or b\".\"\n return _path_normpath(path)or \".\"\n \n \ndef abspath(path):\n ''\n path=os.fspath(path)\n if not isabs(path):\n if isinstance(path,bytes):\n cwd=os.getcwdb()\n else :\n cwd=os.getcwd()\n path=join(cwd,path)\n return normpath(path)\n \n \n \n \n \ndef realpath(filename,*,strict=False ):\n ''\n \n return filename\n \n \n \ndef _joinrealpath(path,rest,strict,seen):\n if isinstance(path,bytes):\n sep=b'/'\n curdir=b'.'\n pardir=b'..'\n else :\n sep='/'\n curdir='.'\n pardir='..'\n \n if isabs(rest):\n rest=rest[1:]\n path=sep\n \n while rest:\n name,_,rest=rest.partition(sep)\n if not name or name ==curdir:\n \n continue\n if name ==pardir:\n \n if path:\n path,name=split(path)\n if name ==pardir:\n path=join(path,pardir,pardir)\n else :\n path=pardir\n continue\n newpath=join(path,name)\n try :\n st=os.lstat(newpath)\n except OSError:\n if strict:\n raise\n is_link=False\n else :\n is_link=stat.S_ISLNK(st.st_mode)\n if not is_link:\n path=newpath\n continue\n \n if newpath in seen:\n \n path=seen[newpath]\n if path is not None :\n \n continue\n \n if strict:\n \n os.stat(newpath)\n else :\n \n return join(newpath,rest),False\n seen[newpath]=None\n path,ok=_joinrealpath(path,os.readlink(newpath),strict,seen)\n if not ok:\n return join(path,rest),False\n seen[newpath]=path\n \n return path,True\n \n \nsupports_unicode_filenames=(sys.platform =='darwin')\n\ndef relpath(path,start=None ):\n ''\n \n if not path:\n raise ValueError(\"no path specified\")\n \n path=os.fspath(path)\n if isinstance(path,bytes):\n curdir=b'.'\n sep=b'/'\n pardir=b'..'\n else :\n curdir='.'\n sep='/'\n pardir='..'\n \n if start is None :\n start=curdir\n else :\n start=os.fspath(start)\n \n try :\n start_list=[x for x in abspath(start).split(sep)if x]\n path_list=[x for x in abspath(path).split(sep)if x]\n \n i=len(commonprefix([start_list,path_list]))\n \n rel_list=[pardir]*(len(start_list)-i)+path_list[i:]\n if not rel_list:\n return curdir\n return join(*rel_list)\n except (TypeError,AttributeError,BytesWarning,DeprecationWarning):\n genericpath._check_arg_types('relpath',path,start)\n raise\n \n \n \n \n \n \n \ndef commonpath(paths):\n ''\n \n if not paths:\n raise ValueError('commonpath() arg is an empty sequence')\n \n paths=tuple(map(os.fspath,paths))\n if isinstance(paths[0],bytes):\n sep=b'/'\n curdir=b'.'\n else :\n sep='/'\n curdir='.'\n \n try :\n split_paths=[path.split(sep)for path in paths]\n \n try :\n isabs,=set(p[:1]==sep for p in paths)\n except ValueError:\n raise ValueError(\"Can't mix absolute and relative paths\")from None\n \n split_paths=[[c for c in s if c and c !=curdir]for s in split_paths]\n s1=min(split_paths)\n s2=max(split_paths)\n common=s1\n for i,c in enumerate(s1):\n if c !=s2[i]:\n common=s1[:i]\n break\n \n prefix=sep if isabs else sep[:0]\n return prefix+sep.join(common)\n except (TypeError,AttributeError):\n genericpath._check_arg_types('commonpath',*paths)\n raise\n", ["genericpath", "os", "posix", "pwd", "re", "stat", "sys"]], "pprint": [".py", "\n\n\n\n\n\n\n\n\n\n\"\"\"Support to pretty-print lists, tuples, & dictionaries recursively.\n\nVery simple, but useful, especially in debugging data structures.\n\nClasses\n-------\n\nPrettyPrinter()\n Handle pretty-printing operations onto a stream using a configured\n set of formatting parameters.\n\nFunctions\n---------\n\npformat()\n Format a Python object into a pretty-printed representation.\n\npprint()\n Pretty-print a Python object to a stream [default is sys.stdout].\n\nsaferepr()\n Generate a 'standard' repr()-like value, but protect against recursive\n data structures.\n\n\"\"\"\n\nimport collections as _collections\nimport dataclasses as _dataclasses\nimport re\nimport sys as _sys\nimport types as _types\nfrom io import StringIO as _StringIO\n\n__all__=[\"pprint\",\"pformat\",\"isreadable\",\"isrecursive\",\"saferepr\",\n\"PrettyPrinter\",\"pp\"]\n\n\ndef pprint(object,stream=None ,indent=1,width=80,depth=None ,*,\ncompact=False ,sort_dicts=True ,underscore_numbers=False ):\n ''\n printer=PrettyPrinter(\n stream=stream,indent=indent,width=width,depth=depth,\n compact=compact,sort_dicts=sort_dicts,\n underscore_numbers=underscore_numbers)\n printer.pprint(object)\n \ndef pformat(object,indent=1,width=80,depth=None ,*,\ncompact=False ,sort_dicts=True ,underscore_numbers=False ):\n ''\n return PrettyPrinter(indent=indent,width=width,depth=depth,\n compact=compact,sort_dicts=sort_dicts,\n underscore_numbers=underscore_numbers).pformat(object)\n \ndef pp(object,*args,sort_dicts=False ,**kwargs):\n ''\n pprint(object,*args,sort_dicts=sort_dicts,**kwargs)\n \ndef saferepr(object):\n ''\n return PrettyPrinter()._safe_repr(object,{},None ,0)[0]\n \ndef isreadable(object):\n ''\n return PrettyPrinter()._safe_repr(object,{},None ,0)[1]\n \ndef isrecursive(object):\n ''\n return PrettyPrinter()._safe_repr(object,{},None ,0)[2]\n \nclass _safe_key:\n ''\n\n\n\n\n\n\n \n \n __slots__=['obj']\n \n def __init__(self,obj):\n self.obj=obj\n \n def __lt__(self,other):\n try :\n return self.obj = 0')\n if depth is not None and depth <=0:\n raise ValueError('depth must be > 0')\n if not width:\n raise ValueError('width must be != 0')\n self._depth=depth\n self._indent_per_level=indent\n self._width=width\n if stream is not None :\n self._stream=stream\n else :\n self._stream=_sys.stdout\n self._compact=bool(compact)\n self._sort_dicts=sort_dicts\n self._underscore_numbers=underscore_numbers\n \n def pprint(self,object):\n if self._stream is not None :\n self._format(object,self._stream,0,0,{},0)\n self._stream.write(\"\\n\")\n \n def pformat(self,object):\n sio=_StringIO()\n self._format(object,sio,0,0,{},0)\n return sio.getvalue()\n \n def isrecursive(self,object):\n return self.format(object,{},0,0)[2]\n \n def isreadable(self,object):\n s,readable,recursive=self.format(object,{},0,0)\n return readable and not recursive\n \n def _format(self,object,stream,indent,allowance,context,level):\n objid=id(object)\n if objid in context:\n stream.write(_recursion(object))\n self._recursive=True\n self._readable=False\n return\n rep=self._repr(object,context,level)\n max_width=self._width -indent -allowance\n if len(rep)>max_width:\n p=self._dispatch.get(type(object).__repr__,None )\n if p is not None :\n context[objid]=1\n p(self,object,stream,indent,allowance,context,level+1)\n del context[objid]\n return\n elif (_dataclasses.is_dataclass(object)and\n not isinstance(object,type)and\n object.__dataclass_params__.repr and\n \n hasattr(object.__repr__,\"__wrapped__\")and\n \"__create_fn__\"in object.__repr__.__wrapped__.__qualname__):\n context[objid]=1\n self._pprint_dataclass(object,stream,indent,allowance,context,level+1)\n del context[objid]\n return\n stream.write(rep)\n \n def _pprint_dataclass(self,object,stream,indent,allowance,context,level):\n cls_name=object.__class__.__name__\n indent +=len(cls_name)+1\n items=[(f.name,getattr(object,f.name))for f in _dataclasses.fields(object)if f.repr]\n stream.write(cls_name+'(')\n self._format_namespace_items(items,stream,indent,allowance,context,level)\n stream.write(')')\n \n _dispatch={}\n \n def _pprint_dict(self,object,stream,indent,allowance,context,level):\n write=stream.write\n write('{')\n if self._indent_per_level >1:\n write((self._indent_per_level -1)*' ')\n length=len(object)\n if length:\n if self._sort_dicts:\n items=sorted(object.items(),key=_safe_tuple)\n else :\n items=object.items()\n self._format_dict_items(items,stream,indent,allowance+1,\n context,level)\n write('}')\n \n _dispatch[dict.__repr__]=_pprint_dict\n \n def _pprint_ordered_dict(self,object,stream,indent,allowance,context,level):\n if not len(object):\n stream.write(repr(object))\n return\n cls=object.__class__\n stream.write(cls.__name__+'(')\n self._format(list(object.items()),stream,\n indent+len(cls.__name__)+1,allowance+1,\n context,level)\n stream.write(')')\n \n _dispatch[_collections.OrderedDict.__repr__]=_pprint_ordered_dict\n \n def _pprint_list(self,object,stream,indent,allowance,context,level):\n stream.write('[')\n self._format_items(object,stream,indent,allowance+1,\n context,level)\n stream.write(']')\n \n _dispatch[list.__repr__]=_pprint_list\n \n def _pprint_tuple(self,object,stream,indent,allowance,context,level):\n stream.write('(')\n endchar=',)'if len(object)==1 else ')'\n self._format_items(object,stream,indent,allowance+len(endchar),\n context,level)\n stream.write(endchar)\n \n _dispatch[tuple.__repr__]=_pprint_tuple\n \n def _pprint_set(self,object,stream,indent,allowance,context,level):\n if not len(object):\n stream.write(repr(object))\n return\n typ=object.__class__\n if typ is set:\n stream.write('{')\n endchar='}'\n else :\n stream.write(typ.__name__+'({')\n endchar='})'\n indent +=len(typ.__name__)+1\n object=sorted(object,key=_safe_key)\n self._format_items(object,stream,indent,allowance+len(endchar),\n context,level)\n stream.write(endchar)\n \n _dispatch[set.__repr__]=_pprint_set\n _dispatch[frozenset.__repr__]=_pprint_set\n \n def _pprint_str(self,object,stream,indent,allowance,context,level):\n write=stream.write\n if not len(object):\n write(repr(object))\n return\n chunks=[]\n lines=object.splitlines(True )\n if level ==1:\n indent +=1\n allowance +=1\n max_width1=max_width=self._width -indent\n for i,line in enumerate(lines):\n rep=repr(line)\n if i ==len(lines)-1:\n max_width1 -=allowance\n if len(rep)<=max_width1:\n chunks.append(rep)\n else :\n \n parts=re.findall(r'\\S*\\s*',line)\n assert parts\n assert not parts[-1]\n parts.pop()\n max_width2=max_width\n current=''\n for j,part in enumerate(parts):\n candidate=current+part\n if j ==len(parts)-1 and i ==len(lines)-1:\n max_width2 -=allowance\n if len(repr(candidate))>max_width2:\n if current:\n chunks.append(repr(current))\n current=part\n else :\n current=candidate\n if current:\n chunks.append(repr(current))\n if len(chunks)==1:\n write(rep)\n return\n if level ==1:\n write('(')\n for i,rep in enumerate(chunks):\n if i >0:\n write('\\n'+' '*indent)\n write(rep)\n if level ==1:\n write(')')\n \n _dispatch[str.__repr__]=_pprint_str\n \n def _pprint_bytes(self,object,stream,indent,allowance,context,level):\n write=stream.write\n if len(object)<=4:\n write(repr(object))\n return\n parens=level ==1\n if parens:\n indent +=1\n allowance +=1\n write('(')\n delim=''\n for rep in _wrap_bytes_repr(object,self._width -indent,allowance):\n write(delim)\n write(rep)\n if not delim:\n delim='\\n'+' '*indent\n if parens:\n write(')')\n \n _dispatch[bytes.__repr__]=_pprint_bytes\n \n def _pprint_bytearray(self,object,stream,indent,allowance,context,level):\n write=stream.write\n write('bytearray(')\n self._pprint_bytes(bytes(object),stream,indent+10,\n allowance+1,context,level+1)\n write(')')\n \n _dispatch[bytearray.__repr__]=_pprint_bytearray\n \n def _pprint_mappingproxy(self,object,stream,indent,allowance,context,level):\n stream.write('mappingproxy(')\n self._format(object.copy(),stream,indent+13,allowance+1,\n context,level)\n stream.write(')')\n \n _dispatch[_types.MappingProxyType.__repr__]=_pprint_mappingproxy\n \n def _pprint_simplenamespace(self,object,stream,indent,allowance,context,level):\n if type(object)is _types.SimpleNamespace:\n \n \n cls_name='namespace'\n else :\n cls_name=object.__class__.__name__\n indent +=len(cls_name)+1\n items=object.__dict__.items()\n stream.write(cls_name+'(')\n self._format_namespace_items(items,stream,indent,allowance,context,level)\n stream.write(')')\n \n _dispatch[_types.SimpleNamespace.__repr__]=_pprint_simplenamespace\n \n def _format_dict_items(self,items,stream,indent,allowance,context,\n level):\n write=stream.write\n indent +=self._indent_per_level\n delimnl=',\\n'+' '*indent\n last_index=len(items)-1\n for i,(key,ent)in enumerate(items):\n last=i ==last_index\n rep=self._repr(key,context,level)\n write(rep)\n write(': ')\n self._format(ent,stream,indent+len(rep)+2,\n allowance if last else 1,\n context,level)\n if not last:\n write(delimnl)\n \n def _format_namespace_items(self,items,stream,indent,allowance,context,level):\n write=stream.write\n delimnl=',\\n'+' '*indent\n last_index=len(items)-1\n for i,(key,ent)in enumerate(items):\n last=i ==last_index\n write(key)\n write('=')\n if id(ent)in context:\n \n \n write(\"...\")\n else :\n self._format(ent,stream,indent+len(key)+1,\n allowance if last else 1,\n context,level)\n if not last:\n write(delimnl)\n \n def _format_items(self,items,stream,indent,allowance,context,level):\n write=stream.write\n indent +=self._indent_per_level\n if self._indent_per_level >1:\n write((self._indent_per_level -1)*' ')\n delimnl=',\\n'+' '*indent\n delim=''\n width=max_width=self._width -indent+1\n it=iter(items)\n try :\n next_ent=next(it)\n except StopIteration:\n return\n last=False\n while not last:\n ent=next_ent\n try :\n next_ent=next(it)\n except StopIteration:\n last=True\n max_width -=allowance\n width -=allowance\n if self._compact:\n rep=self._repr(ent,context,level)\n w=len(rep)+2\n if width =w:\n width -=w\n write(delim)\n delim=', '\n write(rep)\n continue\n write(delim)\n delim=delimnl\n self._format(ent,stream,indent,\n allowance if last else 1,\n context,level)\n \n def _repr(self,object,context,level):\n repr,readable,recursive=self.format(object,context.copy(),\n self._depth,level)\n if not readable:\n self._readable=False\n if recursive:\n self._recursive=True\n return repr\n \n def format(self,object,context,maxlevels,level):\n ''\n\n\n \n return self._safe_repr(object,context,maxlevels,level)\n \n def _pprint_default_dict(self,object,stream,indent,allowance,context,level):\n if not len(object):\n stream.write(repr(object))\n return\n rdf=self._repr(object.default_factory,context,level)\n cls=object.__class__\n indent +=len(cls.__name__)+1\n stream.write('%s(%s,\\n%s'%(cls.__name__,rdf,' '*indent))\n self._pprint_dict(object,stream,indent,allowance+1,context,level)\n stream.write(')')\n \n _dispatch[_collections.defaultdict.__repr__]=_pprint_default_dict\n \n def _pprint_counter(self,object,stream,indent,allowance,context,level):\n if not len(object):\n stream.write(repr(object))\n return\n cls=object.__class__\n stream.write(cls.__name__+'({')\n if self._indent_per_level >1:\n stream.write((self._indent_per_level -1)*' ')\n items=object.most_common()\n self._format_dict_items(items,stream,\n indent+len(cls.__name__)+1,allowance+2,\n context,level)\n stream.write('})')\n \n _dispatch[_collections.Counter.__repr__]=_pprint_counter\n \n def _pprint_chain_map(self,object,stream,indent,allowance,context,level):\n if not len(object.maps):\n stream.write(repr(object))\n return\n cls=object.__class__\n stream.write(cls.__name__+'(')\n indent +=len(cls.__name__)+1\n for i,m in enumerate(object.maps):\n if i ==len(object.maps)-1:\n self._format(m,stream,indent,allowance+1,context,level)\n stream.write(')')\n else :\n self._format(m,stream,indent,1,context,level)\n stream.write(',\\n'+' '*indent)\n \n _dispatch[_collections.ChainMap.__repr__]=_pprint_chain_map\n \n def _pprint_deque(self,object,stream,indent,allowance,context,level):\n if not len(object):\n stream.write(repr(object))\n return\n cls=object.__class__\n stream.write(cls.__name__+'(')\n indent +=len(cls.__name__)+1\n stream.write('[')\n if object.maxlen is None :\n self._format_items(object,stream,indent,allowance+2,\n context,level)\n stream.write('])')\n else :\n self._format_items(object,stream,indent,2,\n context,level)\n rml=self._repr(object.maxlen,context,level)\n stream.write('],\\n%smaxlen=%s)'%(' '*indent,rml))\n \n _dispatch[_collections.deque.__repr__]=_pprint_deque\n \n def _pprint_user_dict(self,object,stream,indent,allowance,context,level):\n self._format(object.data,stream,indent,allowance,context,level -1)\n \n _dispatch[_collections.UserDict.__repr__]=_pprint_user_dict\n \n def _pprint_user_list(self,object,stream,indent,allowance,context,level):\n self._format(object.data,stream,indent,allowance,context,level -1)\n \n _dispatch[_collections.UserList.__repr__]=_pprint_user_list\n \n def _pprint_user_string(self,object,stream,indent,allowance,context,level):\n self._format(object.data,stream,indent,allowance,context,level -1)\n \n _dispatch[_collections.UserString.__repr__]=_pprint_user_string\n \n def _safe_repr(self,object,context,maxlevels,level):\n \n typ=type(object)\n if typ in _builtin_scalars:\n return repr(object),True ,False\n \n r=getattr(typ,\"__repr__\",None )\n \n if issubclass(typ,int)and r is int.__repr__:\n if self._underscore_numbers:\n return f\"{object:_d}\",True ,False\n else :\n return repr(object),True ,False\n \n if issubclass(typ,dict)and r is dict.__repr__:\n if not object:\n return \"{}\",True ,False\n objid=id(object)\n if maxlevels and level >=maxlevels:\n return \"{...}\",False ,objid in context\n if objid in context:\n return _recursion(object),False ,True\n context[objid]=1\n readable=True\n recursive=False\n components=[]\n append=components.append\n level +=1\n if self._sort_dicts:\n items=sorted(object.items(),key=_safe_tuple)\n else :\n items=object.items()\n for k,v in items:\n krepr,kreadable,krecur=self.format(\n k,context,maxlevels,level)\n vrepr,vreadable,vrecur=self.format(\n v,context,maxlevels,level)\n append(\"%s: %s\"%(krepr,vrepr))\n readable=readable and kreadable and vreadable\n if krecur or vrecur:\n recursive=True\n del context[objid]\n return \"{%s}\"%\", \".join(components),readable,recursive\n \n if (issubclass(typ,list)and r is list.__repr__)or\\\n (issubclass(typ,tuple)and r is tuple.__repr__):\n if issubclass(typ,list):\n if not object:\n return \"[]\",True ,False\n format=\"[%s]\"\n elif len(object)==1:\n format=\"(%s,)\"\n else :\n if not object:\n return \"()\",True ,False\n format=\"(%s)\"\n objid=id(object)\n if maxlevels and level >=maxlevels:\n return format %\"...\",False ,objid in context\n if objid in context:\n return _recursion(object),False ,True\n context[objid]=1\n readable=True\n recursive=False\n components=[]\n append=components.append\n level +=1\n for o in object:\n orepr,oreadable,orecur=self.format(\n o,context,maxlevels,level)\n append(orepr)\n if not oreadable:\n readable=False\n if orecur:\n recursive=True\n del context[objid]\n return format %\", \".join(components),readable,recursive\n \n rep=repr(object)\n return rep,(rep and not rep.startswith('<')),False\n \n_builtin_scalars=frozenset({str,bytes,bytearray,float,complex,\nbool,type(None )})\n\ndef _recursion(object):\n return (\"\"\n %(type(object).__name__,id(object)))\n \n \ndef _wrap_bytes_repr(object,width,allowance):\n current=b''\n last=len(object)//4 *4\n for i in range(0,len(object),4):\n part=object[i:i+4]\n candidate=current+part\n if i ==last:\n width -=allowance\n if len(repr(candidate))>width:\n if current:\n yield repr(current)\n current=part\n else :\n current=candidate\n if current:\n yield repr(current)\n", ["collections", "dataclasses", "io", "re", "sys", "types"]], "profile": [".py", "#! /usr/bin/env python3\n\n\n\n\n\n\n\n\"\"\"Class for profiling Python code.\"\"\"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport importlib.machinery\nimport io\nimport sys\nimport time\nimport marshal\n\n__all__=[\"run\",\"runctx\",\"Profile\"]\n\n\n\n\n\n\n\n\n\nclass _Utils:\n ''\n\n\n \n \n def __init__(self,profiler):\n self.profiler=profiler\n \n def run(self,statement,filename,sort):\n prof=self.profiler()\n try :\n prof.run(statement)\n except SystemExit:\n pass\n finally :\n self._show(prof,filename,sort)\n \n def runctx(self,statement,globals,locals,filename,sort):\n prof=self.profiler()\n try :\n prof.runctx(statement,globals,locals)\n except SystemExit:\n pass\n finally :\n self._show(prof,filename,sort)\n \n def _show(self,prof,filename,sort):\n if filename is not None :\n prof.dump_stats(filename)\n else :\n prof.print_stats(sort)\n \n \n \n \n \n \n \ndef run(statement,filename=None ,sort=-1):\n ''\n\n\n\n\n\n\n\n\n \n return _Utils(Profile).run(statement,filename,sort)\n \ndef runctx(statement,globals,locals,filename=None ,sort=-1):\n ''\n\n\n\n \n return _Utils(Profile).runctx(statement,globals,locals,filename,sort)\n \n \nclass Profile:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n bias=0\n \n def __init__(self,timer=None ,bias=None ):\n self.timings={}\n self.cur=None\n self.cmd=\"\"\n self.c_func_name=\"\"\n \n if bias is None :\n bias=self.bias\n self.bias=bias\n \n if not timer:\n self.timer=self.get_time=time.process_time\n self.dispatcher=self.trace_dispatch_i\n else :\n self.timer=timer\n t=self.timer()\n try :\n length=len(t)\n except TypeError:\n self.get_time=timer\n self.dispatcher=self.trace_dispatch_i\n else :\n if length ==2:\n self.dispatcher=self.trace_dispatch\n else :\n self.dispatcher=self.trace_dispatch_l\n \n \n \n \n \n def get_time_timer(timer=timer,sum=sum):\n return sum(timer())\n self.get_time=get_time_timer\n self.t=self.get_time()\n self.simulate_call('profiler')\n \n \n \n def trace_dispatch(self,frame,event,arg):\n timer=self.timer\n t=timer()\n t=t[0]+t[1]-self.t -self.bias\n \n if event ==\"c_call\":\n self.c_func_name=arg.__name__\n \n if self.dispatch[event](self,frame,t):\n t=timer()\n self.t=t[0]+t[1]\n else :\n r=timer()\n self.t=r[0]+r[1]-t\n \n \n \n \n def trace_dispatch_i(self,frame,event,arg):\n timer=self.timer\n t=timer()-self.t -self.bias\n \n if event ==\"c_call\":\n self.c_func_name=arg.__name__\n \n if self.dispatch[event](self,frame,t):\n self.t=timer()\n else :\n self.t=timer()-t\n \n \n \n \n def trace_dispatch_mac(self,frame,event,arg):\n timer=self.timer\n t=timer()/60.0 -self.t -self.bias\n \n if event ==\"c_call\":\n self.c_func_name=arg.__name__\n \n if self.dispatch[event](self,frame,t):\n self.t=timer()/60.0\n else :\n self.t=timer()/60.0 -t\n \n \n \n def trace_dispatch_l(self,frame,event,arg):\n get_time=self.get_time\n t=get_time()-self.t -self.bias\n \n if event ==\"c_call\":\n self.c_func_name=arg.__name__\n \n if self.dispatch[event](self,frame,t):\n self.t=get_time()\n else :\n self.t=get_time()-t\n \n \n \n \n \n \n \n \n def trace_dispatch_exception(self,frame,t):\n rpt,rit,ret,rfn,rframe,rcur=self.cur\n if (rframe is not frame)and rcur:\n return self.trace_dispatch_return(rframe,t)\n self.cur=rpt,rit+t,ret,rfn,rframe,rcur\n return 1\n \n \n def trace_dispatch_call(self,frame,t):\n if self.cur and frame.f_back is not self.cur[-2]:\n rpt,rit,ret,rfn,rframe,rcur=self.cur\n if not isinstance(rframe,Profile.fake_frame):\n assert rframe.f_back is frame.f_back,(\"Bad call\",rfn,\n rframe,rframe.f_back,\n frame,frame.f_back)\n self.trace_dispatch_return(rframe,0)\n assert (self.cur is None or\\\n frame.f_back is self.cur[-2]),(\"Bad call\",\n self.cur[-3])\n fcode=frame.f_code\n fn=(fcode.co_filename,fcode.co_firstlineno,fcode.co_name)\n self.cur=(t,0,0,fn,frame,self.cur)\n timings=self.timings\n if fn in timings:\n cc,ns,tt,ct,callers=timings[fn]\n timings[fn]=cc,ns+1,tt,ct,callers\n else :\n timings[fn]=0,0,0,0,{}\n return 1\n \n def trace_dispatch_c_call(self,frame,t):\n fn=(\"\",0,self.c_func_name)\n self.cur=(t,0,0,fn,frame,self.cur)\n timings=self.timings\n if fn in timings:\n cc,ns,tt,ct,callers=timings[fn]\n timings[fn]=cc,ns+1,tt,ct,callers\n else :\n timings[fn]=0,0,0,0,{}\n return 1\n \n def trace_dispatch_return(self,frame,t):\n if frame is not self.cur[-2]:\n assert frame is self.cur[-2].f_back,(\"Bad return\",self.cur[-3])\n self.trace_dispatch_return(self.cur[-2],0)\n \n \n \n \n rpt,rit,ret,rfn,frame,rcur=self.cur\n rit=rit+t\n frame_total=rit+ret\n \n ppt,pit,pet,pfn,pframe,pcur=rcur\n self.cur=ppt,pit+rpt,pet+frame_total,pfn,pframe,pcur\n \n timings=self.timings\n cc,ns,tt,ct,callers=timings[rfn]\n if not ns:\n \n \n \n \n ct=ct+frame_total\n cc=cc+1\n \n if pfn in callers:\n callers[pfn]=callers[pfn]+1\n \n \n \n else :\n callers[pfn]=1\n \n timings[rfn]=cc,ns -1,tt+rit,ct,callers\n \n return 1\n \n \n dispatch={\n \"call\":trace_dispatch_call,\n \"exception\":trace_dispatch_exception,\n \"return\":trace_dispatch_return,\n \"c_call\":trace_dispatch_c_call,\n \"c_exception\":trace_dispatch_return,\n \"c_return\":trace_dispatch_return,\n }\n \n \n \n \n \n \n \n \n def set_cmd(self,cmd):\n if self.cur[-1]:return\n self.cmd=cmd\n self.simulate_call(cmd)\n \n class fake_code:\n def __init__(self,filename,line,name):\n self.co_filename=filename\n self.co_line=line\n self.co_name=name\n self.co_firstlineno=0\n \n def __repr__(self):\n return repr((self.co_filename,self.co_line,self.co_name))\n \n class fake_frame:\n def __init__(self,code,prior):\n self.f_code=code\n self.f_back=prior\n \n def simulate_call(self,name):\n code=self.fake_code('profile',0,name)\n if self.cur:\n pframe=self.cur[-2]\n else :\n pframe=None\n frame=self.fake_frame(code,pframe)\n self.dispatch['call'](self,frame,0)\n \n \n \n \n def simulate_cmd_complete(self):\n get_time=self.get_time\n t=get_time()-self.t\n while self.cur[-1]:\n \n \n self.dispatch['return'](self,self.cur[-2],t)\n t=0\n self.t=get_time()-t\n \n \n def print_stats(self,sort=-1):\n import pstats\n pstats.Stats(self).strip_dirs().sort_stats(sort).\\\n print_stats()\n \n def dump_stats(self,file):\n with open(file,'wb')as f:\n self.create_stats()\n marshal.dump(self.stats,f)\n \n def create_stats(self):\n self.simulate_cmd_complete()\n self.snapshot_stats()\n \n def snapshot_stats(self):\n self.stats={}\n for func,(cc,ns,tt,ct,callers)in self.timings.items():\n callers=callers.copy()\n nc=0\n for callcnt in callers.values():\n nc +=callcnt\n self.stats[func]=cc,nc,tt,ct,callers\n \n \n \n \n \n def run(self,cmd):\n import __main__\n dict=__main__.__dict__\n return self.runctx(cmd,dict,dict)\n \n def runctx(self,cmd,globals,locals):\n self.set_cmd(cmd)\n sys.setprofile(self.dispatcher)\n try :\n exec(cmd,globals,locals)\n finally :\n sys.setprofile(None )\n return self\n \n \n def runcall(self,func,/,*args,**kw):\n self.set_cmd(repr(func))\n sys.setprofile(self.dispatcher)\n try :\n return func(*args,**kw)\n finally :\n sys.setprofile(None )\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n def calibrate(self,m,verbose=0):\n if self.__class__ is not Profile:\n raise TypeError(\"Subclasses must override .calibrate().\")\n \n saved_bias=self.bias\n self.bias=0\n try :\n return self._calibrate_inner(m,verbose)\n finally :\n self.bias=saved_bias\n \n def _calibrate_inner(self,m,verbose):\n get_time=self.get_time\n \n \n \n \n \n \n \n def f1(n):\n for i in range(n):\n x=1\n \n def f(m,f1=f1):\n for i in range(m):\n f1(100)\n \n f(m)\n \n \n t0=get_time()\n f(m)\n t1=get_time()\n elapsed_noprofile=t1 -t0\n if verbose:\n print(\"elapsed time without profiling =\",elapsed_noprofile)\n \n \n \n \n p=Profile()\n t0=get_time()\n p.runctx('f(m)',globals(),locals())\n t1=get_time()\n elapsed_profile=t1 -t0\n if verbose:\n print(\"elapsed time with profiling =\",elapsed_profile)\n \n \n total_calls=0.0\n reported_time=0.0\n for (filename,line,funcname),(cc,ns,tt,ct,callers)in\\\n p.timings.items():\n if funcname in (\"f\",\"f1\"):\n total_calls +=cc\n reported_time +=tt\n \n if verbose:\n print(\"'CPU seconds' profiler reported =\",reported_time)\n print(\"total # calls =\",total_calls)\n if total_calls !=m+1:\n raise ValueError(\"internal error: total calls = %d\"%total_calls)\n \n \n \n \n \n mean=(reported_time -elapsed_noprofile)/2.0 /total_calls\n if verbose:\n print(\"mean stopwatch overhead per profile event =\",mean)\n return mean\n \n \n \ndef main():\n import os\n from optparse import OptionParser\n \n usage=\"profile.py [-o output_file_path] [-s sort] [-m module | scriptfile] [arg] ...\"\n parser=OptionParser(usage=usage)\n parser.allow_interspersed_args=False\n parser.add_option('-o','--outfile',dest=\"outfile\",\n help=\"Save stats to \",default=None )\n parser.add_option('-m',dest=\"module\",action=\"store_true\",\n help=\"Profile a library module.\",default=False )\n parser.add_option('-s','--sort',dest=\"sort\",\n help=\"Sort order when printing to stdout, based on pstats.Stats class\",\n default=-1)\n \n if not sys.argv[1:]:\n parser.print_usage()\n sys.exit(2)\n \n (options,args)=parser.parse_args()\n sys.argv[:]=args\n \n \n \n if options.outfile is not None :\n options.outfile=os.path.abspath(options.outfile)\n \n if len(args)>0:\n if options.module:\n import runpy\n code=\"run_module(modname, run_name='__main__')\"\n globs={\n 'run_module':runpy.run_module,\n 'modname':args[0]\n }\n else :\n progname=args[0]\n sys.path.insert(0,os.path.dirname(progname))\n with io.open_code(progname)as fp:\n code=compile(fp.read(),progname,'exec')\n spec=importlib.machinery.ModuleSpec(name='__main__',loader=None ,\n origin=progname)\n globs={\n '__spec__':spec,\n '__file__':spec.origin,\n '__name__':spec.name,\n '__package__':None ,\n '__cached__':None ,\n }\n try :\n runctx(code,globs,None ,options.outfile,options.sort)\n except BrokenPipeError as exc:\n \n sys.stdout=None\n sys.exit(exc.errno)\n else :\n parser.print_usage()\n return parser\n \n \nif __name__ =='__main__':\n main()\n", ["__main__", "importlib.machinery", "io", "marshal", "optparse", "os", "pstats", "runpy", "sys", "time"]], "pwd": [".py", "\ndef getpwuid():\n pass\n", []], "pyclbr": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport ast\nimport sys\nimport importlib.util\n\n__all__=[\"readmodule\",\"readmodule_ex\",\"Class\",\"Function\"]\n\n_modules={}\n\n\nclass _Object:\n ''\n def __init__(self,module,name,file,lineno,end_lineno,parent):\n self.module=module\n self.name=name\n self.file=file\n self.lineno=lineno\n self.end_lineno=end_lineno\n self.parent=parent\n self.children={}\n if parent is not None :\n parent.children[name]=self\n \n \n \nclass Function(_Object):\n ''\n def __init__(self,module,name,file,lineno,\n parent=None ,is_async=False ,*,end_lineno=None ):\n super().__init__(module,name,file,lineno,end_lineno,parent)\n self.is_async=is_async\n if isinstance(parent,Class):\n parent.methods[name]=lineno\n \n \nclass Class(_Object):\n ''\n def __init__(self,module,name,super_,file,lineno,\n parent=None ,*,end_lineno=None ):\n super().__init__(module,name,file,lineno,end_lineno,parent)\n self.super=super_ or []\n self.methods={}\n \n \n \n \ndef _nest_function(ob,func_name,lineno,end_lineno,is_async=False ):\n ''\n return Function(ob.module,func_name,ob.file,lineno,\n parent=ob,is_async=is_async,end_lineno=end_lineno)\n \ndef _nest_class(ob,class_name,lineno,end_lineno,super=None ):\n ''\n return Class(ob.module,class_name,super,ob.file,lineno,\n parent=ob,end_lineno=end_lineno)\n \n \ndef readmodule(module,path=None ):\n ''\n\n\n \n \n res={}\n for key,value in _readmodule(module,path or []).items():\n if isinstance(value,Class):\n res[key]=value\n return res\n \ndef readmodule_ex(module,path=None ):\n ''\n\n\n\n\n \n return _readmodule(module,path or [])\n \n \ndef _readmodule(module,path,inpackage=None ):\n ''\n\n\n\n\n\n \n \n if inpackage is not None :\n fullmodule=\"%s.%s\"%(inpackage,module)\n else :\n fullmodule=module\n \n \n if fullmodule in _modules:\n return _modules[fullmodule]\n \n \n tree={}\n \n \n if module in sys.builtin_module_names and inpackage is None :\n _modules[module]=tree\n return tree\n \n \n i=module.rfind('.')\n if i >=0:\n package=module[:i]\n submodule=module[i+1:]\n parent=_readmodule(package,path,inpackage)\n if inpackage is not None :\n package=\"%s.%s\"%(inpackage,package)\n if not '__path__'in parent:\n raise ImportError('No package named {}'.format(package))\n return _readmodule(submodule,parent['__path__'],package)\n \n \n f=None\n if inpackage is not None :\n search_path=path\n else :\n search_path=path+sys.path\n spec=importlib.util._find_spec_from_path(fullmodule,search_path)\n if spec is None :\n raise ModuleNotFoundError(f\"no module named {fullmodule!r}\",name=fullmodule)\n _modules[fullmodule]=tree\n \n if spec.submodule_search_locations is not None :\n tree['__path__']=spec.submodule_search_locations\n try :\n source=spec.loader.get_source(fullmodule)\n except (AttributeError,ImportError):\n \n return tree\n else :\n if source is None :\n return tree\n \n fname=spec.loader.get_filename(fullmodule)\n return _create_tree(fullmodule,path,fname,source,tree,inpackage)\n \n \nclass _ModuleBrowser(ast.NodeVisitor):\n def __init__(self,module,path,file,tree,inpackage):\n self.path=path\n self.tree=tree\n self.file=file\n self.module=module\n self.inpackage=inpackage\n self.stack=[]\n \n def visit_ClassDef(self,node):\n bases=[]\n for base in node.bases:\n name=ast.unparse(base)\n if name in self.tree:\n \n bases.append(self.tree[name])\n elif len(names :=name.split(\".\"))>1:\n \n \n *_,module,class_=names\n if module in _modules:\n bases.append(_modules[module].get(class_,name))\n else :\n bases.append(name)\n \n parent=self.stack[-1]if self.stack else None\n class_=Class(self.module,node.name,bases,self.file,node.lineno,\n parent=parent,end_lineno=node.end_lineno)\n if parent is None :\n self.tree[node.name]=class_\n self.stack.append(class_)\n self.generic_visit(node)\n self.stack.pop()\n \n def visit_FunctionDef(self,node,*,is_async=False ):\n parent=self.stack[-1]if self.stack else None\n function=Function(self.module,node.name,self.file,node.lineno,\n parent,is_async,end_lineno=node.end_lineno)\n if parent is None :\n self.tree[node.name]=function\n self.stack.append(function)\n self.generic_visit(node)\n self.stack.pop()\n \n def visit_AsyncFunctionDef(self,node):\n self.visit_FunctionDef(node,is_async=True )\n \n def visit_Import(self,node):\n if node.col_offset !=0:\n return\n \n for module in node.names:\n try :\n try :\n _readmodule(module.name,self.path,self.inpackage)\n except ImportError:\n _readmodule(module.name,[])\n except (ImportError,SyntaxError):\n \n \n continue\n \n def visit_ImportFrom(self,node):\n if node.col_offset !=0:\n return\n try :\n module=\".\"*node.level\n if node.module:\n module +=node.module\n module=_readmodule(module,self.path,self.inpackage)\n except (ImportError,SyntaxError):\n return\n \n for name in node.names:\n if name.name in module:\n self.tree[name.asname or name.name]=module[name.name]\n elif name.name ==\"*\":\n for import_name,import_value in module.items():\n if import_name.startswith(\"_\"):\n continue\n self.tree[import_name]=import_value\n \n \ndef _create_tree(fullmodule,path,fname,source,tree,inpackage):\n mbrowser=_ModuleBrowser(fullmodule,path,fname,tree,inpackage)\n mbrowser.visit(ast.parse(source))\n return mbrowser.tree\n \n \ndef _main():\n ''\n import os\n try :\n mod=sys.argv[1]\n except :\n mod=__file__\n if os.path.exists(mod):\n path=[os.path.dirname(mod)]\n mod=os.path.basename(mod)\n if mod.lower().endswith(\".py\"):\n mod=mod[:-3]\n else :\n path=[]\n tree=readmodule_ex(mod,path)\n lineno_key=lambda a:getattr(a,'lineno',0)\n objs=sorted(tree.values(),key=lineno_key,reverse=True )\n indent_level=2\n while objs:\n obj=objs.pop()\n if isinstance(obj,list):\n \n continue\n if not hasattr(obj,'indent'):\n obj.indent=0\n \n if isinstance(obj,_Object):\n new_objs=sorted(obj.children.values(),\n key=lineno_key,reverse=True )\n for ob in new_objs:\n ob.indent=obj.indent+indent_level\n objs.extend(new_objs)\n if isinstance(obj,Class):\n print(\"{}class {} {} {}\"\n .format(' '*obj.indent,obj.name,obj.super,obj.lineno))\n elif isinstance(obj,Function):\n print(\"{}def {} {}\".format(' '*obj.indent,obj.name,obj.lineno))\n \nif __name__ ==\"__main__\":\n _main()\n", ["ast", "importlib.util", "os", "sys"]], "pydoc": [".py", "#!/usr/bin/env python3\n''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=['help']\n__author__=\"Ka-Ping Yee \"\n__date__=\"26 February 2001\"\n\n__credits__=\"\"\"Guido van Rossum, for an excellent programming language.\nTommy Burnette, the original creator of manpy.\nPaul Prescod, for all his work on onlinehelp.\nRichard Chamberlain, for the first implementation of textdoc.\n\"\"\"\n\n\n\n\n\n\n\n\nimport __future__\nimport builtins\nimport importlib._bootstrap\nimport importlib._bootstrap_external\nimport importlib.machinery\nimport importlib.util\nimport inspect\nimport io\nimport os\nimport pkgutil\nimport platform\nimport re\nimport sys\nimport sysconfig\nimport time\nimport tokenize\nimport urllib.parse\nimport warnings\nfrom collections import deque\nfrom reprlib import Repr\nfrom traceback import format_exception_only\n\n\n\n\ndef pathdirs():\n ''\n dirs=[]\n normdirs=[]\n for dir in sys.path:\n dir=os.path.abspath(dir or '.')\n normdir=os.path.normcase(dir)\n if normdir not in normdirs and os.path.isdir(dir):\n dirs.append(dir)\n normdirs.append(normdir)\n return dirs\n \ndef _findclass(func):\n cls=sys.modules.get(func.__module__)\n if cls is None :\n return None\n for name in func.__qualname__.split('.')[:-1]:\n cls=getattr(cls,name)\n if not inspect.isclass(cls):\n return None\n return cls\n \ndef _finddoc(obj):\n if inspect.ismethod(obj):\n name=obj.__func__.__name__\n self=obj.__self__\n if (inspect.isclass(self)and\n getattr(getattr(self,name,None ),'__func__')is obj.__func__):\n \n cls=self\n else :\n cls=self.__class__\n elif inspect.isfunction(obj):\n name=obj.__name__\n cls=_findclass(obj)\n if cls is None or getattr(cls,name)is not obj:\n return None\n elif inspect.isbuiltin(obj):\n name=obj.__name__\n self=obj.__self__\n if (inspect.isclass(self)and\n self.__qualname__+'.'+name ==obj.__qualname__):\n \n cls=self\n else :\n cls=self.__class__\n \n elif isinstance(obj,property):\n func=obj.fget\n name=func.__name__\n cls=_findclass(func)\n if cls is None or getattr(cls,name)is not obj:\n return None\n elif inspect.ismethoddescriptor(obj)or inspect.isdatadescriptor(obj):\n name=obj.__name__\n cls=obj.__objclass__\n if getattr(cls,name)is not obj:\n return None\n if inspect.ismemberdescriptor(obj):\n slots=getattr(cls,'__slots__',None )\n if isinstance(slots,dict)and name in slots:\n return slots[name]\n else :\n return None\n for base in cls.__mro__:\n try :\n doc=_getowndoc(getattr(base,name))\n except AttributeError:\n continue\n if doc is not None :\n return doc\n return None\n \ndef _getowndoc(obj):\n ''\n \n try :\n doc=object.__getattribute__(obj,'__doc__')\n if doc is None :\n return None\n if obj is not type:\n typedoc=type(obj).__doc__\n if isinstance(typedoc,str)and typedoc ==doc:\n return None\n return doc\n except AttributeError:\n return None\n \ndef _getdoc(object):\n ''\n\n\n\n \n doc=_getowndoc(object)\n if doc is None :\n try :\n doc=_finddoc(object)\n except (AttributeError,TypeError):\n return None\n if not isinstance(doc,str):\n return None\n return inspect.cleandoc(doc)\n \ndef getdoc(object):\n ''\n result=_getdoc(object)or inspect.getcomments(object)\n return result and re.sub('^ *\\n','',result.rstrip())or ''\n \ndef splitdoc(doc):\n ''\n lines=doc.strip().split('\\n')\n if len(lines)==1:\n return lines[0],''\n elif len(lines)>=2 and not lines[1].rstrip():\n return lines[0],'\\n'.join(lines[2:])\n return '','\\n'.join(lines)\n \ndef classname(object,modname):\n ''\n name=object.__name__\n if object.__module__ !=modname:\n name=object.__module__+'.'+name\n return name\n \ndef isdata(object):\n ''\n return not (inspect.ismodule(object)or inspect.isclass(object)or\n inspect.isroutine(object)or inspect.isframe(object)or\n inspect.istraceback(object)or inspect.iscode(object))\n \ndef replace(text,*pairs):\n ''\n while pairs:\n text=pairs[1].join(text.split(pairs[0]))\n pairs=pairs[2:]\n return text\n \ndef cram(text,maxlen):\n ''\n if len(text)>maxlen:\n pre=max(0,(maxlen -3)//2)\n post=max(0,maxlen -3 -pre)\n return text[:pre]+'...'+text[len(text)-post:]\n return text\n \n_re_stripid=re.compile(r' at 0x[0-9a-f]{6,16}(>+)$',re.IGNORECASE)\ndef stripid(text):\n ''\n \n return _re_stripid.sub(r'\\1',text)\n \ndef _is_bound_method(fn):\n ''\n\n\n \n if inspect.ismethod(fn):\n return True\n if inspect.isbuiltin(fn):\n self=getattr(fn,'__self__',None )\n return not (inspect.ismodule(self)or (self is None ))\n return False\n \n \ndef allmethods(cl):\n methods={}\n for key,value in inspect.getmembers(cl,inspect.isroutine):\n methods[key]=1\n for base in cl.__bases__:\n methods.update(allmethods(base))\n for key in methods.keys():\n methods[key]=getattr(cl,key)\n return methods\n \ndef _split_list(s,predicate):\n ''\n\n\n\n\n \n \n yes=[]\n no=[]\n for x in s:\n if predicate(x):\n yes.append(x)\n else :\n no.append(x)\n return yes,no\n \n_future_feature_names=set(__future__.all_feature_names)\n\ndef visiblename(name,all=None ,obj=None ):\n ''\n \n \n if name in {'__author__','__builtins__','__cached__','__credits__',\n '__date__','__doc__','__file__','__spec__',\n '__loader__','__module__','__name__','__package__',\n '__path__','__qualname__','__slots__','__version__'}:\n return 0\n \n if name.startswith('__')and name.endswith('__'):return 1\n \n if name.startswith('_')and hasattr(obj,'_fields'):\n return True\n \n if obj is not __future__ and name in _future_feature_names:\n if isinstance(getattr(obj,name,None ),__future__._Feature):\n return False\n if all is not None :\n \n return name in all\n else :\n return not name.startswith('_')\n \ndef classify_class_attrs(object):\n ''\n results=[]\n for (name,kind,cls,value)in inspect.classify_class_attrs(object):\n if inspect.isdatadescriptor(value):\n kind='data descriptor'\n if isinstance(value,property)and value.fset is None :\n kind='readonly property'\n results.append((name,kind,cls,value))\n return results\n \ndef sort_attributes(attrs,object):\n ''\n \n \n fields=getattr(object,'_fields',[])\n try :\n field_order={name:i -len(fields)for (i,name)in enumerate(fields)}\n except TypeError:\n field_order={}\n keyfunc=lambda attr:(field_order.get(attr[0],0),attr[0])\n attrs.sort(key=keyfunc)\n \n \n \ndef ispackage(path):\n ''\n if os.path.isdir(path):\n for ext in ('.py','.pyc'):\n if os.path.isfile(os.path.join(path,'__init__'+ext)):\n return True\n return False\n \ndef source_synopsis(file):\n line=file.readline()\n while line[:1]=='#'or not line.strip():\n line=file.readline()\n if not line:break\n line=line.strip()\n if line[:4]=='r\"\"\"':line=line[1:]\n if line[:3]=='\"\"\"':\n line=line[3:]\n if line[-1:]=='\\\\':line=line[:-1]\n while not line.strip():\n line=file.readline()\n if not line:break\n result=line.split('\"\"\"')[0].strip()\n else :result=None\n return result\n \ndef synopsis(filename,cache={}):\n ''\n mtime=os.stat(filename).st_mtime\n lastupdate,result=cache.get(filename,(None ,None ))\n if lastupdate is None or lastupdate ','>')\n \n def repr(self,object):\n return Repr.repr(self,object)\n \n def repr1(self,x,level):\n if hasattr(type(x),'__name__'):\n methodname='repr_'+'_'.join(type(x).__name__.split())\n if hasattr(self,methodname):\n return getattr(self,methodname)(x,level)\n return self.escape(cram(stripid(repr(x)),self.maxother))\n \n def repr_string(self,x,level):\n test=cram(x,self.maxstring)\n testrepr=repr(test)\n if '\\\\'in test and '\\\\'not in replace(testrepr,r'\\\\',''):\n \n \n return 'r'+testrepr[0]+self.escape(test)+testrepr[0]\n return re.sub(r'((\\\\[\\\\abfnrtv\\'\"]|\\\\[0-9]..|\\\\x..|\\\\u....)+)',\n r'\\1',\n self.escape(testrepr))\n \n repr_str=repr_string\n \n def repr_instance(self,x,level):\n try :\n return self.escape(cram(stripid(repr(x)),self.maxstring))\n except :\n return self.escape('<%s instance>'%x.__class__.__name__)\n \n repr_unicode=repr_string\n \nclass HTMLDoc(Doc):\n ''\n \n \n \n _repr_instance=HTMLRepr()\n repr=_repr_instance.repr\n escape=_repr_instance.escape\n \n def page(self,title,contents):\n ''\n return '''\\\n\n\n\n\nPython: %s\n\n%s\n'''%(title,contents)\n \n def heading(self,title,extras=''):\n ''\n return '''\n\n\n\n
     
    %s
    %s
    \n '''%(title,extras or ' ')\n \n def section(self,title,cls,contents,width=6,\n prelude='',marginalia=None ,gap=' '):\n ''\n if marginalia is None :\n marginalia=''+' '*width+''\n result='''

    \n\n\n\n '''%(cls,title)\n if prelude:\n result=result+'''\n\n\n'''%(cls,marginalia,cls,prelude,gap)\n else :\n result=result+'''\n'''%(cls,marginalia,gap)\n \n return result+'\\n
     
    %s
    %s%s
    %s
    %s%s%s
    '%contents\n \n def bigsection(self,title,*args):\n ''\n title='%s'%title\n return self.section(title,*args)\n \n def preformat(self,text):\n ''\n text=self.escape(text.expandtabs())\n return replace(text,'\\n\\n','\\n \\n','\\n\\n','\\n \\n',\n ' ',' ','\\n','
    \\n')\n \n def multicolumn(self,list,format):\n ''\n result=''\n rows=(len(list)+3)//4\n for col in range(4):\n result=result+''\n for i in range(rows *col,rows *col+rows):\n if i \\n'\n result=result+''\n return '%s
    '%result\n \n def grey(self,text):return '%s'%text\n \n def namelink(self,name,*dicts):\n ''\n for dict in dicts:\n if name in dict:\n return '
    %s'%(dict[name],name)\n return name\n \n def classlink(self,object,modname):\n ''\n name,module=object.__name__,sys.modules.get(object.__module__)\n if hasattr(module,name)and getattr(module,name)is object:\n return '%s'%(\n module.__name__,name,classname(object,modname))\n return classname(object,modname)\n \n def modulelink(self,object):\n ''\n return '%s'%(object.__name__,object.__name__)\n \n def modpkglink(self,modpkginfo):\n ''\n name,path,ispackage,shadowed=modpkginfo\n if shadowed:\n return self.grey(name)\n if path:\n url='%s.%s.html'%(path,name)\n else :\n url='%s.html'%name\n if ispackage:\n text='%s (package)'%name\n else :\n text=name\n return '%s'%(url,text)\n \n def filelink(self,url,path):\n ''\n return '%s'%(url,path)\n \n def markup(self,text,escape=None ,funcs={},classes={},methods={}):\n ''\n \n escape=escape or self.escape\n results=[]\n here=0\n pattern=re.compile(r'\\b((http|https|ftp)://\\S+[\\w/]|'\n r'RFC[- ]?(\\d+)|'\n r'PEP[- ]?(\\d+)|'\n r'(self\\.)?(\\w+))')\n while match :=pattern.search(text,here):\n start,end=match.span()\n results.append(escape(text[here:start]))\n \n all,scheme,rfc,pep,selfdot,name=match.groups()\n if scheme:\n url=escape(all).replace('\"','"')\n results.append('%s'%(url,url))\n elif rfc:\n url='https://www.rfc-editor.org/rfc/rfc%d.txt'%int(rfc)\n results.append('%s'%(url,escape(all)))\n elif pep:\n url='https://peps.python.org/pep-%04d/'%int(pep)\n results.append('%s'%(url,escape(all)))\n elif selfdot:\n \n \n if text[end:end+1]=='(':\n results.append('self.'+self.namelink(name,methods))\n else :\n results.append('self.%s'%name)\n elif text[end:end+1]=='(':\n results.append(self.namelink(name,methods,funcs,classes))\n else :\n results.append(self.namelink(name,classes))\n here=end\n results.append(escape(text[here:]))\n return ''.join(results)\n \n \n \n def formattree(self,tree,modname,parent=None ):\n ''\n result=''\n for entry in tree:\n if isinstance(entry,tuple):\n c,bases=entry\n result=result+'

    '\n result=result+self.classlink(c,modname)\n if bases and bases !=(parent,):\n parents=[]\n for base in bases:\n parents.append(self.classlink(base,modname))\n result=result+'('+', '.join(parents)+')'\n result=result+'\\n
    '\n elif isinstance(entry,list):\n result=result+'
    \\n%s
    \\n'%self.formattree(\n entry,modname,c)\n return '
    \\n%s
    \\n'%result\n \n def docmodule(self,object,name=None ,mod=None ,*ignored):\n ''\n name=object.__name__\n try :\n all=object.__all__\n except AttributeError:\n all=None\n parts=name.split('.')\n links=[]\n for i in range(len(parts)-1):\n links.append(\n '%s'%\n ('.'.join(parts[:i+1]),parts[i]))\n linkedname='.'.join(links+parts[-1:])\n head='%s'%linkedname\n try :\n path=inspect.getabsfile(object)\n url=urllib.parse.quote(path)\n filelink=self.filelink(url,path)\n except TypeError:\n filelink='(built-in)'\n info=[]\n if hasattr(object,'__version__'):\n version=str(object.__version__)\n if version[:11]=='$'+'Revision: 'and version[-1:]=='$':\n version=version[11:-1].strip()\n info.append('version %s'%self.escape(version))\n if hasattr(object,'__date__'):\n info.append(self.escape(str(object.__date__)))\n if info:\n head=head+' (%s)'%', '.join(info)\n docloc=self.getdocloc(object)\n if docloc is not None :\n docloc='
    Module Reference'%locals()\n else :\n docloc=''\n result=self.heading(head,'index
    '+filelink+docloc)\n \n modules=inspect.getmembers(object,inspect.ismodule)\n \n classes,cdict=[],{}\n for key,value in inspect.getmembers(object,inspect.isclass):\n \n if (all is not None or\n (inspect.getmodule(value)or object)is object):\n if visiblename(key,all,object):\n classes.append((key,value))\n cdict[key]=cdict[value]='#'+key\n for key,value in classes:\n for base in value.__bases__:\n key,modname=base.__name__,base.__module__\n module=sys.modules.get(modname)\n if modname !=name and module and hasattr(module,key):\n if getattr(module,key)is base:\n if not key in cdict:\n cdict[key]=cdict[base]=modname+'.html#'+key\n funcs,fdict=[],{}\n for key,value in inspect.getmembers(object,inspect.isroutine):\n \n if (all is not None or\n inspect.isbuiltin(value)or inspect.getmodule(value)is object):\n if visiblename(key,all,object):\n funcs.append((key,value))\n fdict[key]='#-'+key\n if inspect.isfunction(value):fdict[value]=fdict[key]\n data=[]\n for key,value in inspect.getmembers(object,isdata):\n if visiblename(key,all,object):\n data.append((key,value))\n \n doc=self.markup(getdoc(object),self.preformat,fdict,cdict)\n doc=doc and '%s'%doc\n result=result+'

    %s

    \\n'%doc\n \n if hasattr(object,'__path__'):\n modpkgs=[]\n for importer,modname,ispkg in pkgutil.iter_modules(object.__path__):\n modpkgs.append((modname,name,ispkg,0))\n modpkgs.sort()\n contents=self.multicolumn(modpkgs,self.modpkglink)\n result=result+self.bigsection(\n 'Package Contents','pkg-content',contents)\n elif modules:\n contents=self.multicolumn(\n modules,lambda t:self.modulelink(t[1]))\n result=result+self.bigsection(\n 'Modules','pkg-content',contents)\n \n if classes:\n classlist=[value for (key,value)in classes]\n contents=[\n self.formattree(inspect.getclasstree(classlist,1),name)]\n for key,value in classes:\n contents.append(self.document(value,key,name,fdict,cdict))\n result=result+self.bigsection(\n 'Classes','index',' '.join(contents))\n if funcs:\n contents=[]\n for key,value in funcs:\n contents.append(self.document(value,key,name,fdict,cdict))\n result=result+self.bigsection(\n 'Functions','functions',' '.join(contents))\n if data:\n contents=[]\n for key,value in data:\n contents.append(self.document(value,key))\n result=result+self.bigsection(\n 'Data','data','
    \\n'.join(contents))\n if hasattr(object,'__author__'):\n contents=self.markup(str(object.__author__),self.preformat)\n result=result+self.bigsection('Author','author',contents)\n if hasattr(object,'__credits__'):\n contents=self.markup(str(object.__credits__),self.preformat)\n result=result+self.bigsection('Credits','credits',contents)\n \n return result\n \n def docclass(self,object,name=None ,mod=None ,funcs={},classes={},\n *ignored):\n ''\n realname=object.__name__\n name=name or realname\n bases=object.__bases__\n \n contents=[]\n push=contents.append\n \n \n class HorizontalRule:\n def __init__(self):\n self.needone=0\n def maybe(self):\n if self.needone:\n push('
    \\n')\n self.needone=1\n hr=HorizontalRule()\n \n \n mro=deque(inspect.getmro(object))\n if len(mro)>2:\n hr.maybe()\n push('
    Method resolution order:
    \\n')\n for base in mro:\n push('
    %s
    \\n'%self.classlink(base,\n object.__module__))\n push('
    \\n')\n \n def spill(msg,attrs,predicate):\n ok,attrs=_split_list(attrs,predicate)\n if ok:\n hr.maybe()\n push(msg)\n for name,kind,homecls,value in ok:\n try :\n value=getattr(object,name)\n except Exception:\n \n \n push(self.docdata(value,name,mod))\n else :\n push(self.document(value,name,mod,\n funcs,classes,mdict,object))\n push('\\n')\n return attrs\n \n def spilldescriptors(msg,attrs,predicate):\n ok,attrs=_split_list(attrs,predicate)\n if ok:\n hr.maybe()\n push(msg)\n for name,kind,homecls,value in ok:\n push(self.docdata(value,name,mod))\n return attrs\n \n def spilldata(msg,attrs,predicate):\n ok,attrs=_split_list(attrs,predicate)\n if ok:\n hr.maybe()\n push(msg)\n for name,kind,homecls,value in ok:\n base=self.docother(getattr(object,name),name,mod)\n doc=getdoc(value)\n if not doc:\n push('
    %s
    \\n'%base)\n else :\n doc=self.markup(getdoc(value),self.preformat,\n funcs,classes,mdict)\n doc='
    %s'%doc\n push('
    %s%s
    \\n'%(base,doc))\n push('\\n')\n return attrs\n \n attrs=[(name,kind,cls,value)\n for name,kind,cls,value in classify_class_attrs(object)\n if visiblename(name,obj=object)]\n \n mdict={}\n for key,kind,homecls,value in attrs:\n mdict[key]=anchor='#'+name+'-'+key\n try :\n value=getattr(object,name)\n except Exception:\n \n \n pass\n try :\n \n \n mdict[value]=anchor\n except TypeError:\n pass\n \n while attrs:\n if mro:\n thisclass=mro.popleft()\n else :\n thisclass=attrs[0][2]\n attrs,inherited=_split_list(attrs,lambda t:t[2]is thisclass)\n \n if object is not builtins.object and thisclass is builtins.object:\n attrs=inherited\n continue\n elif thisclass is object:\n tag='defined here'\n else :\n tag='inherited from %s'%self.classlink(thisclass,\n object.__module__)\n tag +=':
    \\n'\n \n sort_attributes(attrs,object)\n \n \n attrs=spill('Methods %s'%tag,attrs,\n lambda t:t[1]=='method')\n attrs=spill('Class methods %s'%tag,attrs,\n lambda t:t[1]=='class method')\n attrs=spill('Static methods %s'%tag,attrs,\n lambda t:t[1]=='static method')\n attrs=spilldescriptors(\"Readonly properties %s\"%tag,attrs,\n lambda t:t[1]=='readonly property')\n attrs=spilldescriptors('Data descriptors %s'%tag,attrs,\n lambda t:t[1]=='data descriptor')\n attrs=spilldata('Data and other attributes %s'%tag,attrs,\n lambda t:t[1]=='data')\n assert attrs ==[]\n attrs=inherited\n \n contents=''.join(contents)\n \n if name ==realname:\n title='class %s'%(\n name,realname)\n else :\n title='%s = class %s'%(\n name,name,realname)\n if bases:\n parents=[]\n for base in bases:\n parents.append(self.classlink(base,object.__module__))\n title=title+'(%s)'%', '.join(parents)\n \n decl=''\n try :\n signature=inspect.signature(object)\n except (ValueError,TypeError):\n signature=None\n if signature:\n argspec=str(signature)\n if argspec and argspec !='()':\n decl=name+self.escape(argspec)+'\\n\\n'\n \n doc=getdoc(object)\n if decl:\n doc=decl+(doc or '')\n doc=self.markup(doc,self.preformat,funcs,classes,mdict)\n doc=doc and '%s
     
    '%doc\n \n return self.section(title,'title',contents,3,doc)\n \n def formatvalue(self,object):\n ''\n return self.grey('='+self.repr(object))\n \n def docroutine(self,object,name=None ,mod=None ,\n funcs={},classes={},methods={},cl=None ):\n ''\n realname=object.__name__\n name=name or realname\n anchor=(cl and cl.__name__ or '')+'-'+name\n note=''\n skipdocs=0\n if _is_bound_method(object):\n imclass=object.__self__.__class__\n if cl:\n if imclass is not cl:\n note=' from '+self.classlink(imclass,mod)\n else :\n if object.__self__ is not None :\n note=' method of %s instance'%self.classlink(\n object.__self__.__class__,mod)\n else :\n note=' unbound %s method'%self.classlink(imclass,mod)\n \n if (inspect.iscoroutinefunction(object)or\n inspect.isasyncgenfunction(object)):\n asyncqualifier='async '\n else :\n asyncqualifier=''\n \n if name ==realname:\n title='%s'%(anchor,realname)\n else :\n if cl and inspect.getattr_static(cl,realname,[])is object:\n reallink='%s'%(\n cl.__name__+'-'+realname,realname)\n skipdocs=1\n else :\n reallink=realname\n title='%s = %s'%(\n anchor,name,reallink)\n argspec=None\n if inspect.isroutine(object):\n try :\n signature=inspect.signature(object)\n except (ValueError,TypeError):\n signature=None\n if signature:\n argspec=str(signature)\n if realname =='':\n title='%s lambda '%name\n \n \n \n argspec=argspec[1:-1]\n if not argspec:\n argspec='(...)'\n \n decl=asyncqualifier+title+self.escape(argspec)+(note and\n self.grey('%s'%note))\n \n if skipdocs:\n return '
    %s
    \\n'%decl\n else :\n doc=self.markup(\n getdoc(object),self.preformat,funcs,classes,methods)\n doc=doc and '
    %s
    '%doc\n return '
    %s
    %s
    \\n'%(decl,doc)\n \n def docdata(self,object,name=None ,mod=None ,cl=None ):\n ''\n results=[]\n push=results.append\n \n if name:\n push('
    %s
    \\n'%name)\n doc=self.markup(getdoc(object),self.preformat)\n if doc:\n push('
    %s
    \\n'%doc)\n push('
    \\n')\n \n return ''.join(results)\n \n docproperty=docdata\n \n def docother(self,object,name=None ,mod=None ,*ignored):\n ''\n lhs=name and '%s = '%name or ''\n return lhs+self.repr(object)\n \n def index(self,dir,shadowed=None ):\n ''\n modpkgs=[]\n if shadowed is None :shadowed={}\n for importer,name,ispkg in pkgutil.iter_modules([dir]):\n if any((0xD800 <=ord(ch)<=0xDFFF)for ch in name):\n \n continue\n modpkgs.append((name,'',ispkg,name in shadowed))\n shadowed[name]=1\n \n modpkgs.sort()\n contents=self.multicolumn(modpkgs,self.modpkglink)\n return self.bigsection(dir,'index',contents)\n \n \n \nclass TextRepr(Repr):\n ''\n def __init__(self):\n Repr.__init__(self)\n self.maxlist=self.maxtuple=20\n self.maxdict=10\n self.maxstring=self.maxother=100\n \n def repr1(self,x,level):\n if hasattr(type(x),'__name__'):\n methodname='repr_'+'_'.join(type(x).__name__.split())\n if hasattr(self,methodname):\n return getattr(self,methodname)(x,level)\n return cram(stripid(repr(x)),self.maxother)\n \n def repr_string(self,x,level):\n test=cram(x,self.maxstring)\n testrepr=repr(test)\n if '\\\\'in test and '\\\\'not in replace(testrepr,r'\\\\',''):\n \n \n return 'r'+testrepr[0]+test+testrepr[0]\n return testrepr\n \n repr_str=repr_string\n \n def repr_instance(self,x,level):\n try :\n return cram(stripid(repr(x)),self.maxstring)\n except :\n return '<%s instance>'%x.__class__.__name__\n \nclass TextDoc(Doc):\n ''\n \n \n \n _repr_instance=TextRepr()\n repr=_repr_instance.repr\n \n def bold(self,text):\n ''\n return ''.join(ch+'\\b'+ch for ch in text)\n \n def indent(self,text,prefix=' '):\n ''\n if not text:return ''\n lines=[(prefix+line).rstrip()for line in text.split('\\n')]\n return '\\n'.join(lines)\n \n def section(self,title,contents):\n ''\n clean_contents=self.indent(contents).rstrip()\n return self.bold(title)+'\\n'+clean_contents+'\\n\\n'\n \n \n \n def formattree(self,tree,modname,parent=None ,prefix=''):\n ''\n result=''\n for entry in tree:\n if isinstance(entry,tuple):\n c,bases=entry\n result=result+prefix+classname(c,modname)\n if bases and bases !=(parent,):\n parents=(classname(c,modname)for c in bases)\n result=result+'(%s)'%', '.join(parents)\n result=result+'\\n'\n elif isinstance(entry,list):\n result=result+self.formattree(\n entry,modname,c,prefix+' ')\n return result\n \n def docmodule(self,object,name=None ,mod=None ):\n ''\n name=object.__name__\n synop,desc=splitdoc(getdoc(object))\n result=self.section('NAME',name+(synop and ' - '+synop))\n all=getattr(object,'__all__',None )\n docloc=self.getdocloc(object)\n if docloc is not None :\n result=result+self.section('MODULE REFERENCE',docloc+\"\"\"\n\nThe following documentation is automatically generated from the Python\nsource files. It may be incomplete, incorrect or include features that\nare considered implementation detail and may vary between Python\nimplementations. When in doubt, consult the module reference at the\nlocation listed above.\n\"\"\")\n \n if desc:\n result=result+self.section('DESCRIPTION',desc)\n \n classes=[]\n for key,value in inspect.getmembers(object,inspect.isclass):\n \n if (all is not None\n or (inspect.getmodule(value)or object)is object):\n if visiblename(key,all,object):\n classes.append((key,value))\n funcs=[]\n for key,value in inspect.getmembers(object,inspect.isroutine):\n \n if (all is not None or\n inspect.isbuiltin(value)or inspect.getmodule(value)is object):\n if visiblename(key,all,object):\n funcs.append((key,value))\n data=[]\n for key,value in inspect.getmembers(object,isdata):\n if visiblename(key,all,object):\n data.append((key,value))\n \n modpkgs=[]\n modpkgs_names=set()\n if hasattr(object,'__path__'):\n for importer,modname,ispkg in pkgutil.iter_modules(object.__path__):\n modpkgs_names.add(modname)\n if ispkg:\n modpkgs.append(modname+' (package)')\n else :\n modpkgs.append(modname)\n \n modpkgs.sort()\n result=result+self.section(\n 'PACKAGE CONTENTS','\\n'.join(modpkgs))\n \n \n submodules=[]\n for key,value in inspect.getmembers(object,inspect.ismodule):\n if value.__name__.startswith(name+'.')and key not in modpkgs_names:\n submodules.append(key)\n if submodules:\n submodules.sort()\n result=result+self.section(\n 'SUBMODULES','\\n'.join(submodules))\n \n if classes:\n classlist=[value for key,value in classes]\n contents=[self.formattree(\n inspect.getclasstree(classlist,1),name)]\n for key,value in classes:\n contents.append(self.document(value,key,name))\n result=result+self.section('CLASSES','\\n'.join(contents))\n \n if funcs:\n contents=[]\n for key,value in funcs:\n contents.append(self.document(value,key,name))\n result=result+self.section('FUNCTIONS','\\n'.join(contents))\n \n if data:\n contents=[]\n for key,value in data:\n contents.append(self.docother(value,key,name,maxlen=70))\n result=result+self.section('DATA','\\n'.join(contents))\n \n if hasattr(object,'__version__'):\n version=str(object.__version__)\n if version[:11]=='$'+'Revision: 'and version[-1:]=='$':\n version=version[11:-1].strip()\n result=result+self.section('VERSION',version)\n if hasattr(object,'__date__'):\n result=result+self.section('DATE',str(object.__date__))\n if hasattr(object,'__author__'):\n result=result+self.section('AUTHOR',str(object.__author__))\n if hasattr(object,'__credits__'):\n result=result+self.section('CREDITS',str(object.__credits__))\n try :\n file=inspect.getabsfile(object)\n except TypeError:\n file='(built-in)'\n result=result+self.section('FILE',file)\n return result\n \n def docclass(self,object,name=None ,mod=None ,*ignored):\n ''\n realname=object.__name__\n name=name or realname\n bases=object.__bases__\n \n def makename(c,m=object.__module__):\n return classname(c,m)\n \n if name ==realname:\n title='class '+self.bold(realname)\n else :\n title=self.bold(name)+' = class '+realname\n if bases:\n parents=map(makename,bases)\n title=title+'(%s)'%', '.join(parents)\n \n contents=[]\n push=contents.append\n \n try :\n signature=inspect.signature(object)\n except (ValueError,TypeError):\n signature=None\n if signature:\n argspec=str(signature)\n if argspec and argspec !='()':\n push(name+argspec+'\\n')\n \n doc=getdoc(object)\n if doc:\n push(doc+'\\n')\n \n \n mro=deque(inspect.getmro(object))\n if len(mro)>2:\n push(\"Method resolution order:\")\n for base in mro:\n push(' '+makename(base))\n push('')\n \n \n subclasses=sorted(\n (str(cls.__name__)for cls in type.__subclasses__(object)\n if not cls.__name__.startswith(\"_\")and cls.__module__ ==\"builtins\"),\n key=str.lower\n )\n no_of_subclasses=len(subclasses)\n MAX_SUBCLASSES_TO_DISPLAY=4\n if subclasses:\n push(\"Built-in subclasses:\")\n for subclassname in subclasses[:MAX_SUBCLASSES_TO_DISPLAY]:\n push(' '+subclassname)\n if no_of_subclasses >MAX_SUBCLASSES_TO_DISPLAY:\n push(' ... and '+\n str(no_of_subclasses -MAX_SUBCLASSES_TO_DISPLAY)+\n ' other subclasses')\n push('')\n \n \n class HorizontalRule:\n def __init__(self):\n self.needone=0\n def maybe(self):\n if self.needone:\n push('-'*70)\n self.needone=1\n hr=HorizontalRule()\n \n def spill(msg,attrs,predicate):\n ok,attrs=_split_list(attrs,predicate)\n if ok:\n hr.maybe()\n push(msg)\n for name,kind,homecls,value in ok:\n try :\n value=getattr(object,name)\n except Exception:\n \n \n push(self.docdata(value,name,mod))\n else :\n push(self.document(value,\n name,mod,object))\n return attrs\n \n def spilldescriptors(msg,attrs,predicate):\n ok,attrs=_split_list(attrs,predicate)\n if ok:\n hr.maybe()\n push(msg)\n for name,kind,homecls,value in ok:\n push(self.docdata(value,name,mod))\n return attrs\n \n def spilldata(msg,attrs,predicate):\n ok,attrs=_split_list(attrs,predicate)\n if ok:\n hr.maybe()\n push(msg)\n for name,kind,homecls,value in ok:\n doc=getdoc(value)\n try :\n obj=getattr(object,name)\n except AttributeError:\n obj=homecls.__dict__[name]\n push(self.docother(obj,name,mod,maxlen=70,doc=doc)+\n '\\n')\n return attrs\n \n attrs=[(name,kind,cls,value)\n for name,kind,cls,value in classify_class_attrs(object)\n if visiblename(name,obj=object)]\n \n while attrs:\n if mro:\n thisclass=mro.popleft()\n else :\n thisclass=attrs[0][2]\n attrs,inherited=_split_list(attrs,lambda t:t[2]is thisclass)\n \n if object is not builtins.object and thisclass is builtins.object:\n attrs=inherited\n continue\n elif thisclass is object:\n tag=\"defined here\"\n else :\n tag=\"inherited from %s\"%classname(thisclass,\n object.__module__)\n \n sort_attributes(attrs,object)\n \n \n attrs=spill(\"Methods %s:\\n\"%tag,attrs,\n lambda t:t[1]=='method')\n attrs=spill(\"Class methods %s:\\n\"%tag,attrs,\n lambda t:t[1]=='class method')\n attrs=spill(\"Static methods %s:\\n\"%tag,attrs,\n lambda t:t[1]=='static method')\n attrs=spilldescriptors(\"Readonly properties %s:\\n\"%tag,attrs,\n lambda t:t[1]=='readonly property')\n attrs=spilldescriptors(\"Data descriptors %s:\\n\"%tag,attrs,\n lambda t:t[1]=='data descriptor')\n attrs=spilldata(\"Data and other attributes %s:\\n\"%tag,attrs,\n lambda t:t[1]=='data')\n \n assert attrs ==[]\n attrs=inherited\n \n contents='\\n'.join(contents)\n if not contents:\n return title+'\\n'\n return title+'\\n'+self.indent(contents.rstrip(),' | ')+'\\n'\n \n def formatvalue(self,object):\n ''\n return '='+self.repr(object)\n \n def docroutine(self,object,name=None ,mod=None ,cl=None ):\n ''\n realname=object.__name__\n name=name or realname\n note=''\n skipdocs=0\n if _is_bound_method(object):\n imclass=object.__self__.__class__\n if cl:\n if imclass is not cl:\n note=' from '+classname(imclass,mod)\n else :\n if object.__self__ is not None :\n note=' method of %s instance'%classname(\n object.__self__.__class__,mod)\n else :\n note=' unbound %s method'%classname(imclass,mod)\n \n if (inspect.iscoroutinefunction(object)or\n inspect.isasyncgenfunction(object)):\n asyncqualifier='async '\n else :\n asyncqualifier=''\n \n if name ==realname:\n title=self.bold(realname)\n else :\n if cl and inspect.getattr_static(cl,realname,[])is object:\n skipdocs=1\n title=self.bold(name)+' = '+realname\n argspec=None\n \n if inspect.isroutine(object):\n try :\n signature=inspect.signature(object)\n except (ValueError,TypeError):\n signature=None\n if signature:\n argspec=str(signature)\n if realname =='':\n title=self.bold(name)+' lambda '\n \n \n \n argspec=argspec[1:-1]\n if not argspec:\n argspec='(...)'\n decl=asyncqualifier+title+argspec+note\n \n if skipdocs:\n return decl+'\\n'\n else :\n doc=getdoc(object)or ''\n return decl+'\\n'+(doc and self.indent(doc).rstrip()+'\\n')\n \n def docdata(self,object,name=None ,mod=None ,cl=None ):\n ''\n results=[]\n push=results.append\n \n if name:\n push(self.bold(name))\n push('\\n')\n doc=getdoc(object)or ''\n if doc:\n push(self.indent(doc))\n push('\\n')\n return ''.join(results)\n \n docproperty=docdata\n \n def docother(self,object,name=None ,mod=None ,parent=None ,maxlen=None ,doc=None ):\n ''\n repr=self.repr(object)\n if maxlen:\n line=(name and name+' = 'or '')+repr\n chop=maxlen -len(line)\n if chop <0:repr=repr[:chop]+'...'\n line=(name and self.bold(name)+' = 'or '')+repr\n if not doc:\n doc=getdoc(object)\n if doc:\n line +='\\n'+self.indent(str(doc))+'\\n'\n return line\n \nclass _PlainTextDoc(TextDoc):\n ''\n def bold(self,text):\n return text\n \n \n \ndef pager(text):\n ''\n global pager\n pager=getpager()\n pager(text)\n \ndef getpager():\n ''\n if not hasattr(sys.stdin,\"isatty\"):\n return plainpager\n if not hasattr(sys.stdout,\"isatty\"):\n return plainpager\n if not sys.stdin.isatty()or not sys.stdout.isatty():\n return plainpager\n if sys.platform ==\"emscripten\":\n return plainpager\n use_pager=os.environ.get('MANPAGER')or os.environ.get('PAGER')\n if use_pager:\n if sys.platform =='win32':\n return lambda text:tempfilepager(plain(text),use_pager)\n elif os.environ.get('TERM')in ('dumb','emacs'):\n return lambda text:pipepager(plain(text),use_pager)\n else :\n return lambda text:pipepager(text,use_pager)\n if os.environ.get('TERM')in ('dumb','emacs'):\n return plainpager\n if sys.platform =='win32':\n return lambda text:tempfilepager(plain(text),'more <')\n if hasattr(os,'system')and os.system('(less) 2>/dev/null')==0:\n return lambda text:pipepager(text,'less')\n \n import tempfile\n (fd,filename)=tempfile.mkstemp()\n os.close(fd)\n try :\n if hasattr(os,'system')and os.system('more \"%s\"'%filename)==0:\n return lambda text:pipepager(text,'more')\n else :\n return ttypager\n finally :\n os.unlink(filename)\n \ndef plain(text):\n ''\n return re.sub('.\\b','',text)\n \ndef pipepager(text,cmd):\n ''\n import subprocess\n proc=subprocess.Popen(cmd,shell=True ,stdin=subprocess.PIPE,\n errors='backslashreplace')\n try :\n with proc.stdin as pipe:\n try :\n pipe.write(text)\n except KeyboardInterrupt:\n \n \n pass\n except OSError:\n pass\n while True :\n try :\n proc.wait()\n break\n except KeyboardInterrupt:\n \n \n pass\n \ndef tempfilepager(text,cmd):\n ''\n import tempfile\n with tempfile.TemporaryDirectory()as tempdir:\n filename=os.path.join(tempdir,'pydoc.out')\n with open(filename,'w',errors='backslashreplace',\n encoding=os.device_encoding(0)if\n sys.platform =='win32'else None\n )as file:\n file.write(text)\n os.system(cmd+' \"'+filename+'\"')\n \ndef _escape_stdout(text):\n\n encoding=getattr(sys.stdout,'encoding',None )or 'utf-8'\n return text.encode(encoding,'backslashreplace').decode(encoding)\n \ndef ttypager(text):\n ''\n lines=plain(_escape_stdout(text)).split('\\n')\n try :\n import tty\n fd=sys.stdin.fileno()\n old=tty.tcgetattr(fd)\n tty.setcbreak(fd)\n getchar=lambda :sys.stdin.read(1)\n except (ImportError,AttributeError,io.UnsupportedOperation):\n tty=None\n getchar=lambda :sys.stdin.readline()[:-1][:1]\n \n try :\n try :\n h=int(os.environ.get('LINES',0))\n except ValueError:\n h=0\n if h <=1:\n h=25\n r=inc=h -1\n sys.stdout.write('\\n'.join(lines[:inc])+'\\n')\n while lines[r:]:\n sys.stdout.write('-- more --')\n sys.stdout.flush()\n c=getchar()\n \n if c in ('q','Q'):\n sys.stdout.write('\\r \\r')\n break\n elif c in ('\\r','\\n'):\n sys.stdout.write('\\r \\r'+lines[r]+'\\n')\n r=r+1\n continue\n if c in ('b','B','\\x1b'):\n r=r -inc -inc\n if r <0:r=0\n sys.stdout.write('\\n'+'\\n'.join(lines[r:r+inc])+'\\n')\n r=r+inc\n \n finally :\n if tty:\n tty.tcsetattr(fd,tty.TCSAFLUSH,old)\n \ndef plainpager(text):\n ''\n sys.stdout.write(plain(_escape_stdout(text)))\n \ndef describe(thing):\n ''\n if inspect.ismodule(thing):\n if thing.__name__ in sys.builtin_module_names:\n return 'built-in module '+thing.__name__\n if hasattr(thing,'__path__'):\n return 'package '+thing.__name__\n else :\n return 'module '+thing.__name__\n if inspect.isbuiltin(thing):\n return 'built-in function '+thing.__name__\n if inspect.isgetsetdescriptor(thing):\n return 'getset descriptor %s.%s.%s'%(\n thing.__objclass__.__module__,thing.__objclass__.__name__,\n thing.__name__)\n if inspect.ismemberdescriptor(thing):\n return 'member descriptor %s.%s.%s'%(\n thing.__objclass__.__module__,thing.__objclass__.__name__,\n thing.__name__)\n if inspect.isclass(thing):\n return 'class '+thing.__name__\n if inspect.isfunction(thing):\n return 'function '+thing.__name__\n if inspect.ismethod(thing):\n return 'method '+thing.__name__\n return type(thing).__name__\n \ndef locate(path,forceload=0):\n ''\n parts=[part for part in path.split('.')if part]\n module,n=None ,0\n while n >','&',\n '|','^','~','<','>','<=','>=','==','!=','<>'),\n 'COMPARISON':('<','>','<=','>=','==','!=','<>'),\n 'UNARY':('-','~'),\n 'AUGMENTEDASSIGNMENT':('+=','-=','*=','/=','%=','&=','|=',\n '^=','<<=','>>=','**=','//='),\n 'BITWISE':('<<','>>','&','|','^','~'),\n 'COMPLEX':('j','J')\n }\n symbols={\n '%':'OPERATORS FORMATTING',\n '**':'POWER',\n ',':'TUPLES LISTS FUNCTIONS',\n '.':'ATTRIBUTES FLOAT MODULES OBJECTS',\n '...':'ELLIPSIS',\n ':':'SLICINGS DICTIONARYLITERALS',\n '@':'def class',\n '\\\\':'STRINGS',\n '_':'PRIVATENAMES',\n '__':'PRIVATENAMES SPECIALMETHODS',\n '`':'BACKQUOTES',\n '(':'TUPLES FUNCTIONS CALLS',\n ')':'TUPLES FUNCTIONS CALLS',\n '[':'LISTS SUBSCRIPTS SLICINGS',\n ']':'LISTS SUBSCRIPTS SLICINGS'\n }\n for topic,symbols_ in _symbols_inverse.items():\n for symbol in symbols_:\n topics=symbols.get(symbol,topic)\n if topic not in topics:\n topics=topics+' '+topic\n symbols[symbol]=topics\n del topic,symbols_,symbol,topics\n \n topics={\n 'TYPES':('types','STRINGS UNICODE NUMBERS SEQUENCES MAPPINGS '\n 'FUNCTIONS CLASSES MODULES FILES inspect'),\n 'STRINGS':('strings','str UNICODE SEQUENCES STRINGMETHODS '\n 'FORMATTING TYPES'),\n 'STRINGMETHODS':('string-methods','STRINGS FORMATTING'),\n 'FORMATTING':('formatstrings','OPERATORS'),\n 'UNICODE':('strings','encodings unicode SEQUENCES STRINGMETHODS '\n 'FORMATTING TYPES'),\n 'NUMBERS':('numbers','INTEGER FLOAT COMPLEX TYPES'),\n 'INTEGER':('integers','int range'),\n 'FLOAT':('floating','float math'),\n 'COMPLEX':('imaginary','complex cmath'),\n 'SEQUENCES':('typesseq','STRINGMETHODS FORMATTING range LISTS'),\n 'MAPPINGS':'DICTIONARIES',\n 'FUNCTIONS':('typesfunctions','def TYPES'),\n 'METHODS':('typesmethods','class def CLASSES TYPES'),\n 'CODEOBJECTS':('bltin-code-objects','compile FUNCTIONS TYPES'),\n 'TYPEOBJECTS':('bltin-type-objects','types TYPES'),\n 'FRAMEOBJECTS':'TYPES',\n 'TRACEBACKS':'TYPES',\n 'NONE':('bltin-null-object',''),\n 'ELLIPSIS':('bltin-ellipsis-object','SLICINGS'),\n 'SPECIALATTRIBUTES':('specialattrs',''),\n 'CLASSES':('types','class SPECIALMETHODS PRIVATENAMES'),\n 'MODULES':('typesmodules','import'),\n 'PACKAGES':'import',\n 'EXPRESSIONS':('operator-summary','lambda or and not in is BOOLEAN '\n 'COMPARISON BITWISE SHIFTING BINARY FORMATTING POWER '\n 'UNARY ATTRIBUTES SUBSCRIPTS SLICINGS CALLS TUPLES '\n 'LISTS DICTIONARIES'),\n 'OPERATORS':'EXPRESSIONS',\n 'PRECEDENCE':'EXPRESSIONS',\n 'OBJECTS':('objects','TYPES'),\n 'SPECIALMETHODS':('specialnames','BASICMETHODS ATTRIBUTEMETHODS '\n 'CALLABLEMETHODS SEQUENCEMETHODS MAPPINGMETHODS '\n 'NUMBERMETHODS CLASSES'),\n 'BASICMETHODS':('customization','hash repr str SPECIALMETHODS'),\n 'ATTRIBUTEMETHODS':('attribute-access','ATTRIBUTES SPECIALMETHODS'),\n 'CALLABLEMETHODS':('callable-types','CALLS SPECIALMETHODS'),\n 'SEQUENCEMETHODS':('sequence-types','SEQUENCES SEQUENCEMETHODS '\n 'SPECIALMETHODS'),\n 'MAPPINGMETHODS':('sequence-types','MAPPINGS SPECIALMETHODS'),\n 'NUMBERMETHODS':('numeric-types','NUMBERS AUGMENTEDASSIGNMENT '\n 'SPECIALMETHODS'),\n 'EXECUTION':('execmodel','NAMESPACES DYNAMICFEATURES EXCEPTIONS'),\n 'NAMESPACES':('naming','global nonlocal ASSIGNMENT DELETION DYNAMICFEATURES'),\n 'DYNAMICFEATURES':('dynamic-features',''),\n 'SCOPING':'NAMESPACES',\n 'FRAMES':'NAMESPACES',\n 'EXCEPTIONS':('exceptions','try except finally raise'),\n 'CONVERSIONS':('conversions',''),\n 'IDENTIFIERS':('identifiers','keywords SPECIALIDENTIFIERS'),\n 'SPECIALIDENTIFIERS':('id-classes',''),\n 'PRIVATENAMES':('atom-identifiers',''),\n 'LITERALS':('atom-literals','STRINGS NUMBERS TUPLELITERALS '\n 'LISTLITERALS DICTIONARYLITERALS'),\n 'TUPLES':'SEQUENCES',\n 'TUPLELITERALS':('exprlists','TUPLES LITERALS'),\n 'LISTS':('typesseq-mutable','LISTLITERALS'),\n 'LISTLITERALS':('lists','LISTS LITERALS'),\n 'DICTIONARIES':('typesmapping','DICTIONARYLITERALS'),\n 'DICTIONARYLITERALS':('dict','DICTIONARIES LITERALS'),\n 'ATTRIBUTES':('attribute-references','getattr hasattr setattr ATTRIBUTEMETHODS'),\n 'SUBSCRIPTS':('subscriptions','SEQUENCEMETHODS'),\n 'SLICINGS':('slicings','SEQUENCEMETHODS'),\n 'CALLS':('calls','EXPRESSIONS'),\n 'POWER':('power','EXPRESSIONS'),\n 'UNARY':('unary','EXPRESSIONS'),\n 'BINARY':('binary','EXPRESSIONS'),\n 'SHIFTING':('shifting','EXPRESSIONS'),\n 'BITWISE':('bitwise','EXPRESSIONS'),\n 'COMPARISON':('comparisons','EXPRESSIONS BASICMETHODS'),\n 'BOOLEAN':('booleans','EXPRESSIONS TRUTHVALUE'),\n 'ASSERTION':'assert',\n 'ASSIGNMENT':('assignment','AUGMENTEDASSIGNMENT'),\n 'AUGMENTEDASSIGNMENT':('augassign','NUMBERMETHODS'),\n 'DELETION':'del',\n 'RETURNING':'return',\n 'IMPORTING':'import',\n 'CONDITIONAL':'if',\n 'LOOPING':('compound','for while break continue'),\n 'TRUTHVALUE':('truth','if while and or not BASICMETHODS'),\n 'DEBUGGING':('debugger','pdb'),\n 'CONTEXTMANAGERS':('context-managers','with'),\n }\n \n def __init__(self,input=None ,output=None ):\n self._input=input\n self._output=output\n \n @property\n def input(self):\n return self._input or sys.stdin\n \n @property\n def output(self):\n return self._output or sys.stdout\n \n def __repr__(self):\n if inspect.stack()[1][3]=='?':\n self()\n return ''\n return '<%s.%s instance>'%(self.__class__.__module__,\n self.__class__.__qualname__)\n \n _GoInteractive=object()\n def __call__(self,request=_GoInteractive):\n if request is not self._GoInteractive:\n try :\n self.help(request)\n except ImportError as err:\n self.output.write(f'{err}\\n')\n else :\n self.intro()\n self.interact()\n self.output.write('''\nYou are now leaving help and returning to the Python interpreter.\nIf you want to ask for help on a particular object directly from the\ninterpreter, you can type \"help(object)\". Executing \"help('string')\"\nhas the same effect as typing a particular string at the help> prompt.\n''')\n \n def interact(self):\n self.output.write('\\n')\n while True :\n try :\n request=self.getline('help> ')\n if not request:break\n except (KeyboardInterrupt,EOFError):\n break\n request=request.strip()\n \n \n \n if (len(request)>2 and request[0]==request[-1]in (\"'\",'\"')\n and request[0]not in request[1:-1]):\n request=request[1:-1]\n if request.lower()in ('q','quit'):break\n if request =='help':\n self.intro()\n else :\n self.help(request)\n \n def getline(self,prompt):\n ''\n if self.input is sys.stdin:\n return input(prompt)\n else :\n self.output.write(prompt)\n self.output.flush()\n return self.input.readline()\n \n def help(self,request):\n if isinstance(request,str):\n request=request.strip()\n if request =='keywords':self.listkeywords()\n elif request =='symbols':self.listsymbols()\n elif request =='topics':self.listtopics()\n elif request =='modules':self.listmodules()\n elif request[:8]=='modules ':\n self.listmodules(request.split()[1])\n elif request in self.symbols:self.showsymbol(request)\n elif request in ['True','False','None']:\n \n doc(eval(request),'Help on %s:')\n elif request in self.keywords:self.showtopic(request)\n elif request in self.topics:self.showtopic(request)\n elif request:doc(request,'Help on %s:',output=self._output)\n else :doc(str,'Help on %s:',output=self._output)\n elif isinstance(request,Helper):self()\n else :doc(request,'Help on %s:',output=self._output)\n self.output.write('\\n')\n \n def intro(self):\n self.output.write('''\nWelcome to Python {0}'s help utility!\n\nIf this is your first time using Python, you should definitely check out\nthe tutorial on the internet at https://docs.python.org/{0}/tutorial/.\n\nEnter the name of any module, keyword, or topic to get help on writing\nPython programs and using Python modules. To quit this help utility and\nreturn to the interpreter, just type \"quit\".\n\nTo get a list of available modules, keywords, symbols, or topics, type\n\"modules\", \"keywords\", \"symbols\", or \"topics\". Each module also comes\nwith a one-line summary of what it does; to list the modules whose name\nor summary contain a given string such as \"spam\", type \"modules spam\".\n'''.format('%d.%d'%sys.version_info[:2]))\n \n def list(self,items,columns=4,width=80):\n items=list(sorted(items))\n colw=width //columns\n rows=(len(items)+columns -1)//columns\n for row in range(rows):\n for col in range(columns):\n i=col *rows+row\n if i =0:\n callback(None ,modname,desc)\n \n for importer,modname,ispkg in pkgutil.walk_packages(onerror=onerror):\n if self.quit:\n break\n \n if key is None :\n callback(None ,modname,'')\n else :\n try :\n spec=importer.find_spec(modname)\n except SyntaxError:\n \n continue\n loader=spec.loader\n if hasattr(loader,'get_source'):\n try :\n source=loader.get_source(modname)\n except Exception:\n if onerror:\n onerror(modname)\n continue\n desc=source_synopsis(io.StringIO(source))or ''\n if hasattr(loader,'get_filename'):\n path=loader.get_filename(modname)\n else :\n path=None\n else :\n try :\n module=importlib._bootstrap._load(spec)\n except ImportError:\n if onerror:\n onerror(modname)\n continue\n desc=module.__doc__.splitlines()[0]if module.__doc__ else ''\n path=getattr(module,'__file__',None )\n name=modname+' - '+desc\n if name.lower().find(key)>=0:\n callback(path,modname,desc)\n \n if completer:\n completer()\n \ndef apropos(key):\n ''\n def callback(path,modname,desc):\n if modname[-9:]=='.__init__':\n modname=modname[:-9]+' (package)'\n print(modname,desc and '- '+desc)\n def onerror(modname):\n pass\n with warnings.catch_warnings():\n warnings.filterwarnings('ignore')\n ModuleScanner().run(callback,key,onerror=onerror)\n \n \n \ndef _start_server(urlhandler,hostname,port):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n import http.server\n import email.message\n import select\n import threading\n \n class DocHandler(http.server.BaseHTTPRequestHandler):\n \n def do_GET(self):\n ''\n\n\n\n \n if self.path.endswith('.css'):\n content_type='text/css'\n else :\n content_type='text/html'\n self.send_response(200)\n self.send_header('Content-Type','%s; charset=UTF-8'%content_type)\n self.end_headers()\n self.wfile.write(self.urlhandler(\n self.path,content_type).encode('utf-8'))\n \n def log_message(self,*args):\n \n pass\n \n class DocServer(http.server.HTTPServer):\n \n def __init__(self,host,port,callback):\n self.host=host\n self.address=(self.host,port)\n self.callback=callback\n self.base.__init__(self,self.address,self.handler)\n self.quit=False\n \n def serve_until_quit(self):\n while not self.quit:\n rd,wr,ex=select.select([self.socket.fileno()],[],[],1)\n if rd:\n self.handle_request()\n self.server_close()\n \n def server_activate(self):\n self.base.server_activate(self)\n if self.callback:\n self.callback(self)\n \n class ServerThread(threading.Thread):\n \n def __init__(self,urlhandler,host,port):\n self.urlhandler=urlhandler\n self.host=host\n self.port=int(port)\n threading.Thread.__init__(self)\n self.serving=False\n self.error=None\n \n def run(self):\n ''\n try :\n DocServer.base=http.server.HTTPServer\n DocServer.handler=DocHandler\n DocHandler.MessageClass=email.message.Message\n DocHandler.urlhandler=staticmethod(self.urlhandler)\n docsvr=DocServer(self.host,self.port,self.ready)\n self.docserver=docsvr\n docsvr.serve_until_quit()\n except Exception as err:\n self.error=err\n \n def ready(self,server):\n self.serving=True\n self.host=server.host\n self.port=server.server_port\n self.url='http://%s:%d/'%(self.host,self.port)\n \n def stop(self):\n ''\n self.docserver.quit=True\n self.join()\n \n \n self.docserver=None\n self.serving=False\n self.url=None\n \n thread=ServerThread(urlhandler,hostname,port)\n thread.start()\n \n \n while not thread.error and not thread.serving:\n time.sleep(.01)\n return thread\n \n \ndef _url_handler(url,content_type=\"text/html\"):\n ''\n\n\n\n\n\n\n \n class _HTMLDoc(HTMLDoc):\n \n def page(self,title,contents):\n ''\n css_path=\"pydoc_data/_pydoc.css\"\n css_link=(\n ''%\n css_path)\n return '''\\\n\n\n\n\nPydoc: %s\n%s%s
    %s
    \n'''%(title,css_link,html_navbar(),contents)\n \n \n html=_HTMLDoc()\n \n def html_navbar():\n version=html.escape(\"%s [%s, %s]\"%(platform.python_version(),\n platform.python_build()[0],\n platform.python_compiler()))\n return \"\"\"\n
    \n Python %s
    %s\n
    \n
    \n \n
    \n
    \n \n \n
     \n
    \n \n \n
    \n
    \n
    \n \"\"\"%(version,html.escape(platform.platform(terse=True )))\n \n def html_index():\n ''\n \n def bltinlink(name):\n return '%s'%(name,name)\n \n heading=html.heading(\n 'Index of Modules'\n )\n names=[name for name in sys.builtin_module_names\n if name !='__main__']\n contents=html.multicolumn(names,bltinlink)\n contents=[heading,'

    '+html.bigsection(\n 'Built-in Modules','index',contents)]\n \n seen={}\n for dir in sys.path:\n contents.append(html.index(dir,seen))\n \n contents.append(\n '

    pydoc by Ka-Ping Yee'\n '<ping@lfw.org>

    ')\n return 'Index of Modules',''.join(contents)\n \n def html_search(key):\n ''\n \n search_result=[]\n \n def callback(path,modname,desc):\n if modname[-9:]=='.__init__':\n modname=modname[:-9]+' (package)'\n search_result.append((modname,desc and '- '+desc))\n \n with warnings.catch_warnings():\n warnings.filterwarnings('ignore')\n def onerror(modname):\n pass\n ModuleScanner().run(callback,key,onerror=onerror)\n \n \n def bltinlink(name):\n return '%s'%(name,name)\n \n results=[]\n heading=html.heading(\n 'Search Results',\n )\n for name,desc in search_result:\n results.append(bltinlink(name)+desc)\n contents=heading+html.bigsection(\n 'key = %s'%key,'index','
    '.join(results))\n return 'Search Results',contents\n \n def html_topics():\n ''\n \n def bltinlink(name):\n return '%s'%(name,name)\n \n heading=html.heading(\n 'INDEX',\n )\n names=sorted(Helper.topics.keys())\n \n contents=html.multicolumn(names,bltinlink)\n contents=heading+html.bigsection(\n 'Topics','index',contents)\n return 'Topics',contents\n \n def html_keywords():\n ''\n heading=html.heading(\n 'INDEX',\n )\n names=sorted(Helper.keywords.keys())\n \n def bltinlink(name):\n return '%s'%(name,name)\n \n contents=html.multicolumn(names,bltinlink)\n contents=heading+html.bigsection(\n 'Keywords','index',contents)\n return 'Keywords',contents\n \n def html_topicpage(topic):\n ''\n buf=io.StringIO()\n htmlhelp=Helper(buf,buf)\n contents,xrefs=htmlhelp._gettopic(topic)\n if topic in htmlhelp.keywords:\n title='KEYWORD'\n else :\n title='TOPIC'\n heading=html.heading(\n '%s'%title,\n )\n contents='
    %s
    '%html.markup(contents)\n contents=html.bigsection(topic,'index',contents)\n if xrefs:\n xrefs=sorted(xrefs.split())\n \n def bltinlink(name):\n return '%s'%(name,name)\n \n xrefs=html.multicolumn(xrefs,bltinlink)\n xrefs=html.section('Related help topics: ','index',xrefs)\n return ('%s %s'%(title,topic),\n ''.join((heading,contents,xrefs)))\n \n def html_getobj(url):\n obj=locate(url,forceload=1)\n if obj is None and url !='None':\n raise ValueError('could not find object')\n title=describe(obj)\n content=html.document(obj,url)\n return title,content\n \n def html_error(url,exc):\n heading=html.heading(\n 'Error',\n )\n contents='
    '.join(html.escape(line)for line in\n format_exception_only(type(exc),exc))\n contents=heading+html.bigsection(url,'error',contents)\n return \"Error - %s\"%url,contents\n \n def get_html_page(url):\n ''\n complete_url=url\n if url.endswith('.html'):\n url=url[:-5]\n try :\n if url in (\"\",\"index\"):\n title,content=html_index()\n elif url ==\"topics\":\n title,content=html_topics()\n elif url ==\"keywords\":\n title,content=html_keywords()\n elif '='in url:\n op,_,url=url.partition('=')\n if op ==\"search?key\":\n title,content=html_search(url)\n elif op ==\"topic?key\":\n \n try :\n title,content=html_topicpage(url)\n except ValueError:\n title,content=html_getobj(url)\n elif op ==\"get?key\":\n \n if url in (\"\",\"index\"):\n title,content=html_index()\n else :\n try :\n title,content=html_getobj(url)\n except ValueError:\n title,content=html_topicpage(url)\n else :\n raise ValueError('bad pydoc url')\n else :\n title,content=html_getobj(url)\n except Exception as exc:\n \n title,content=html_error(complete_url,exc)\n return html.page(title,content)\n \n if url.startswith('/'):\n url=url[1:]\n if content_type =='text/css':\n path_here=os.path.dirname(os.path.realpath(__file__))\n css_path=os.path.join(path_here,url)\n with open(css_path)as fp:\n return ''.join(fp.readlines())\n elif content_type =='text/html':\n return get_html_page(url)\n \n raise TypeError('unknown content type %r for url %s'%(content_type,url))\n \n \ndef browse(port=0,*,open_browser=True ,hostname='localhost'):\n ''\n\n\n\n \n import webbrowser\n serverthread=_start_server(_url_handler,hostname,port)\n if serverthread.error:\n print(serverthread.error)\n return\n if serverthread.serving:\n server_help_msg='Server commands: [b]rowser, [q]uit'\n if open_browser:\n webbrowser.open(serverthread.url)\n try :\n print('Server ready at',serverthread.url)\n print(server_help_msg)\n while serverthread.serving:\n cmd=input('server> ')\n cmd=cmd.lower()\n if cmd =='q':\n break\n elif cmd =='b':\n webbrowser.open(serverthread.url)\n else :\n print(server_help_msg)\n except (KeyboardInterrupt,EOFError):\n print()\n finally :\n if serverthread.serving:\n serverthread.stop()\n print('Server stopped')\n \n \n \n \ndef ispath(x):\n return isinstance(x,str)and x.find(os.sep)>=0\n \ndef _get_revised_path(given_path,argv0):\n ''\n\n\n\n\n \n \n \n \n \n \n \n if ''in given_path or os.curdir in given_path or os.getcwd()in given_path:\n return None\n \n \n \n stdlib_dir=os.path.dirname(__file__)\n script_dir=os.path.dirname(argv0)\n revised_path=given_path.copy()\n if script_dir in given_path and not os.path.samefile(script_dir,stdlib_dir):\n revised_path.remove(script_dir)\n revised_path.insert(0,os.getcwd())\n return revised_path\n \n \n \ndef _adjust_cli_sys_path():\n ''\n\n\n \n revised_path=_get_revised_path(sys.path,sys.argv[0])\n if revised_path is not None :\n sys.path[:]=revised_path\n \n \ndef cli():\n ''\n import getopt\n class BadUsage(Exception):pass\n \n _adjust_cli_sys_path()\n \n try :\n opts,args=getopt.getopt(sys.argv[1:],'bk:n:p:w')\n writing=False\n start_server=False\n open_browser=False\n port=0\n hostname='localhost'\n for opt,val in opts:\n if opt =='-b':\n start_server=True\n open_browser=True\n if opt =='-k':\n apropos(val)\n return\n if opt =='-p':\n start_server=True\n port=val\n if opt =='-w':\n writing=True\n if opt =='-n':\n start_server=True\n hostname=val\n \n if start_server:\n browse(port,hostname=hostname,open_browser=open_browser)\n return\n \n if not args:raise BadUsage\n for arg in args:\n if ispath(arg)and not os.path.exists(arg):\n print('file %r does not exist'%arg)\n sys.exit(1)\n try :\n if ispath(arg)and os.path.isfile(arg):\n arg=importfile(arg)\n if writing:\n if ispath(arg)and os.path.isdir(arg):\n writedocs(arg)\n else :\n writedoc(arg)\n else :\n help.help(arg)\n except (ImportError,ErrorDuringImport)as value:\n print(value)\n sys.exit(1)\n \n except (getopt.error,BadUsage):\n cmd=os.path.splitext(os.path.basename(sys.argv[0]))[0]\n print(\"\"\"pydoc - the Python documentation tool\n\n{cmd} ...\n Show text documentation on something. may be the name of a\n Python keyword, topic, function, module, or package, or a dotted\n reference to a class or function within a module or module in a\n package. If contains a '{sep}', it is used as the path to a\n Python source file to document. If name is 'keywords', 'topics',\n or 'modules', a listing of these things is displayed.\n\n{cmd} -k \n Search for a keyword in the synopsis lines of all available modules.\n\n{cmd} -n \n Start an HTTP server with the given hostname (default: localhost).\n\n{cmd} -p \n Start an HTTP server on the given port on the local machine. Port\n number 0 can be used to get an arbitrary unused port.\n\n{cmd} -b\n Start an HTTP server on an arbitrary unused port and open a web browser\n to interactively browse documentation. This option can be used in\n combination with -n and/or -p.\n\n{cmd} -w ...\n Write out the HTML documentation for a module to a file in the current\n directory. If contains a '{sep}', it is treated as a filename; if\n it names a directory, documentation is written for all the contents.\n\"\"\".format(cmd=cmd,sep=os.sep))\n \nif __name__ =='__main__':\n cli()\n", ["__future__", "builtins", "collections", "email.message", "getopt", "http.server", "importlib._bootstrap", "importlib._bootstrap_external", "importlib.machinery", "importlib.util", "inspect", "io", "os", "pkgutil", "platform", "pydoc_data.topics", "re", "reprlib", "select", "subprocess", "sys", "sysconfig", "tempfile", "textwrap", "threading", "time", "tokenize", "traceback", "tty", "urllib.parse", "warnings", "webbrowser"]], "py_compile": [".py", "''\n\n\n\n\nimport enum\nimport importlib._bootstrap_external\nimport importlib.machinery\nimport importlib.util\nimport os\nimport os.path\nimport sys\nimport traceback\n\n__all__=[\"compile\",\"main\",\"PyCompileError\",\"PycInvalidationMode\"]\n\n\nclass PyCompileError(Exception):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,exc_type,exc_value,file,msg=''):\n exc_type_name=exc_type.__name__\n if exc_type is SyntaxError:\n tbtext=''.join(traceback.format_exception_only(\n exc_type,exc_value))\n errmsg=tbtext.replace('File \"\"','File \"%s\"'%file)\n else :\n errmsg=\"Sorry: %s: %s\"%(exc_type_name,exc_value)\n \n Exception.__init__(self,msg or errmsg,exc_type_name,exc_value,file)\n \n self.exc_type_name=exc_type_name\n self.exc_value=exc_value\n self.file=file\n self.msg=msg or errmsg\n \n def __str__(self):\n return self.msg\n \n \nclass PycInvalidationMode(enum.Enum):\n TIMESTAMP=1\n CHECKED_HASH=2\n UNCHECKED_HASH=3\n \n \ndef _get_default_invalidation_mode():\n if os.environ.get('SOURCE_DATE_EPOCH'):\n return PycInvalidationMode.CHECKED_HASH\n else :\n return PycInvalidationMode.TIMESTAMP\n \n \ndef compile(file,cfile=None ,dfile=None ,doraise=False ,optimize=-1,\ninvalidation_mode=None ,quiet=0):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if invalidation_mode is None :\n invalidation_mode=_get_default_invalidation_mode()\n if cfile is None :\n if optimize >=0:\n optimization=optimize if optimize >=1 else ''\n cfile=importlib.util.cache_from_source(file,\n optimization=optimization)\n else :\n cfile=importlib.util.cache_from_source(file)\n if os.path.islink(cfile):\n msg=('{} is a symlink and will be changed into a regular file if '\n 'import writes a byte-compiled file to it')\n raise FileExistsError(msg.format(cfile))\n elif os.path.exists(cfile)and not os.path.isfile(cfile):\n msg=('{} is a non-regular file and will be changed into a regular '\n 'one if import writes a byte-compiled file to it')\n raise FileExistsError(msg.format(cfile))\n loader=importlib.machinery.SourceFileLoader('',file)\n source_bytes=loader.get_data(file)\n try :\n code=loader.source_to_code(source_bytes,dfile or file,\n _optimize=optimize)\n except Exception as err:\n py_exc=PyCompileError(err.__class__,err,dfile or file)\n if quiet <2:\n if doraise:\n raise py_exc\n else :\n sys.stderr.write(py_exc.msg+'\\n')\n return\n try :\n dirname=os.path.dirname(cfile)\n if dirname:\n os.makedirs(dirname)\n except FileExistsError:\n pass\n if invalidation_mode ==PycInvalidationMode.TIMESTAMP:\n source_stats=loader.path_stats(file)\n bytecode=importlib._bootstrap_external._code_to_timestamp_pyc(\n code,source_stats['mtime'],source_stats['size'])\n else :\n source_hash=importlib.util.source_hash(source_bytes)\n bytecode=importlib._bootstrap_external._code_to_hash_pyc(\n code,\n source_hash,\n (invalidation_mode ==PycInvalidationMode.CHECKED_HASH),\n )\n mode=importlib._bootstrap_external._calc_mode(file)\n importlib._bootstrap_external._write_atomic(cfile,bytecode,mode)\n return cfile\n \n \ndef main():\n import argparse\n \n description='A simple command-line interface for py_compile module.'\n parser=argparse.ArgumentParser(description=description)\n parser.add_argument(\n '-q','--quiet',\n action='store_true',\n help='Suppress error output',\n )\n parser.add_argument(\n 'filenames',\n nargs='+',\n help='Files to compile',\n )\n args=parser.parse_args()\n if args.filenames ==['-']:\n filenames=[filename.rstrip('\\n')for filename in sys.stdin.readlines()]\n else :\n filenames=args.filenames\n for filename in filenames:\n try :\n compile(filename,doraise=True )\n except PyCompileError as error:\n if args.quiet:\n parser.exit(1)\n else :\n parser.exit(1,error.msg)\n except OSError as error:\n if args.quiet:\n parser.exit(1)\n else :\n parser.exit(1,str(error))\n \n \nif __name__ ==\"__main__\":\n main()\n", ["argparse", "enum", "importlib._bootstrap_external", "importlib.machinery", "importlib.util", "os", "os.path", "sys", "traceback"]], "queue": [".py", "''\n\nimport threading\nimport types\nfrom collections import deque\nfrom heapq import heappush,heappop\nfrom time import monotonic as time\ntry :\n from _queue import SimpleQueue\nexcept ImportError:\n SimpleQueue=None\n \n__all__=['Empty','Full','Queue','PriorityQueue','LifoQueue','SimpleQueue']\n\n\ntry :\n from _queue import Empty\nexcept ImportError:\n class Empty(Exception):\n ''\n pass\n \nclass Full(Exception):\n ''\n pass\n \n \nclass Queue:\n ''\n\n\n \n \n def __init__(self,maxsize=0):\n self.maxsize=maxsize\n self._init(maxsize)\n \n \n \n \n \n self.mutex=threading.Lock()\n \n \n \n self.not_empty=threading.Condition(self.mutex)\n \n \n \n self.not_full=threading.Condition(self.mutex)\n \n \n \n self.all_tasks_done=threading.Condition(self.mutex)\n self.unfinished_tasks=0\n \n def task_done(self):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n with self.all_tasks_done:\n unfinished=self.unfinished_tasks -1\n if unfinished <=0:\n if unfinished <0:\n raise ValueError('task_done() called too many times')\n self.all_tasks_done.notify_all()\n self.unfinished_tasks=unfinished\n \n def join(self):\n ''\n\n\n\n\n\n\n \n with self.all_tasks_done:\n while self.unfinished_tasks:\n self.all_tasks_done.wait()\n \n def qsize(self):\n ''\n with self.mutex:\n return self._qsize()\n \n def empty(self):\n ''\n\n\n\n\n\n\n\n\n \n with self.mutex:\n return not self._qsize()\n \n def full(self):\n ''\n\n\n\n\n\n \n with self.mutex:\n return 0 0:\n if not block:\n if self._qsize()>=self.maxsize:\n raise Full\n elif timeout is None :\n while self._qsize()>=self.maxsize:\n self.not_full.wait()\n elif timeout <0:\n raise ValueError(\"'timeout' must be a non-negative number\")\n else :\n endtime=time()+timeout\n while self._qsize()>=self.maxsize:\n remaining=endtime -time()\n if remaining <=0.0:\n raise Full\n self.not_full.wait(remaining)\n self._put(item)\n self.unfinished_tasks +=1\n self.not_empty.notify()\n \n def get(self,block=True ,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n \n with self.not_empty:\n if not block:\n if not self._qsize():\n raise Empty\n elif timeout is None :\n while not self._qsize():\n self.not_empty.wait()\n elif timeout <0:\n raise ValueError(\"'timeout' must be a non-negative number\")\n else :\n endtime=time()+timeout\n while not self._qsize():\n remaining=endtime -time()\n if remaining <=0.0:\n raise Empty\n self.not_empty.wait(remaining)\n item=self._get()\n self.not_full.notify()\n return item\n \n def put_nowait(self,item):\n ''\n\n\n\n \n return self.put(item,block=False )\n \n def get_nowait(self):\n ''\n\n\n\n \n return self.get(block=False )\n \n \n \n \n \n \n def _init(self,maxsize):\n self.queue=deque()\n \n def _qsize(self):\n return len(self.queue)\n \n \n def _put(self,item):\n self.queue.append(item)\n \n \n def _get(self):\n return self.queue.popleft()\n \n __class_getitem__=classmethod(types.GenericAlias)\n \n \nclass PriorityQueue(Queue):\n ''\n\n\n \n \n def _init(self,maxsize):\n self.queue=[]\n \n def _qsize(self):\n return len(self.queue)\n \n def _put(self,item):\n heappush(self.queue,item)\n \n def _get(self):\n return heappop(self.queue)\n \n \nclass LifoQueue(Queue):\n ''\n \n def _init(self,maxsize):\n self.queue=[]\n \n def _qsize(self):\n return len(self.queue)\n \n def _put(self,item):\n self.queue.append(item)\n \n def _get(self):\n return self.queue.pop()\n \n \nclass _PySimpleQueue:\n ''\n\n\n \n \n \n \n \n \n def __init__(self):\n self._queue=deque()\n self._count=threading.Semaphore(0)\n \n def put(self,item,block=True ,timeout=None ):\n ''\n\n\n\n \n self._queue.append(item)\n self._count.release()\n \n def get(self,block=True ,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n \n if timeout is not None and timeout <0:\n raise ValueError(\"'timeout' must be a non-negative number\")\n if not self._count.acquire(block,timeout):\n raise Empty\n return self._queue.popleft()\n \n def put_nowait(self,item):\n ''\n\n\n\n \n return self.put(item,block=False )\n \n def get_nowait(self):\n ''\n\n\n\n \n return self.get(block=False )\n \n def empty(self):\n ''\n return len(self._queue)==0\n \n def qsize(self):\n ''\n return len(self._queue)\n \n __class_getitem__=classmethod(types.GenericAlias)\n \n \nif SimpleQueue is None :\n SimpleQueue=_PySimpleQueue\n", ["_queue", "collections", "heapq", "threading", "time", "types"]], "quopri": [".py", "#! /usr/bin/env python3\n\n\"\"\"Conversions to/from quoted-printable transport encoding as per RFC 1521.\"\"\"\n\n\n\n__all__=[\"encode\",\"decode\",\"encodestring\",\"decodestring\"]\n\nESCAPE=b'='\nMAXLINESIZE=76\nHEX=b'0123456789ABCDEF'\nEMPTYSTRING=b''\n\ntry :\n from binascii import a2b_qp,b2a_qp\nexcept ImportError:\n a2b_qp=None\n b2a_qp=None\n \n \ndef needsquoting(c,quotetabs,header):\n ''\n\n\n\n\n \n assert isinstance(c,bytes)\n if c in b' \\t':\n return quotetabs\n \n if c ==b'_':\n return header\n return c ==ESCAPE or not (b' '<=c <=b'~')\n \ndef quote(c):\n ''\n assert isinstance(c,bytes)and len(c)==1\n c=ord(c)\n return ESCAPE+bytes((HEX[c //16],HEX[c %16]))\n \n \n \ndef encode(input,output,quotetabs,header=False ):\n ''\n\n\n\n\n\n \n \n if b2a_qp is not None :\n data=input.read()\n odata=b2a_qp(data,quotetabs=quotetabs,header=header)\n output.write(odata)\n return\n \n def write(s,output=output,lineEnd=b'\\n'):\n \n \n if s and s[-1:]in b' \\t':\n output.write(s[:-1]+quote(s[-1:])+lineEnd)\n elif s ==b'.':\n output.write(quote(s)+lineEnd)\n else :\n output.write(s+lineEnd)\n \n prevline=None\n while line :=input.readline():\n outline=[]\n \n stripped=b''\n if line[-1:]==b'\\n':\n line=line[:-1]\n stripped=b'\\n'\n \n for c in line:\n c=bytes((c,))\n if needsquoting(c,quotetabs,header):\n c=quote(c)\n if header and c ==b' ':\n outline.append(b'_')\n else :\n outline.append(c)\n \n if prevline is not None :\n write(prevline)\n \n \n thisline=EMPTYSTRING.join(outline)\n while len(thisline)>MAXLINESIZE:\n \n \n write(thisline[:MAXLINESIZE -1],lineEnd=b'=\\n')\n thisline=thisline[MAXLINESIZE -1:]\n \n prevline=thisline\n \n if prevline is not None :\n write(prevline,lineEnd=stripped)\n \ndef encodestring(s,quotetabs=False ,header=False ):\n if b2a_qp is not None :\n return b2a_qp(s,quotetabs=quotetabs,header=header)\n from io import BytesIO\n infp=BytesIO(s)\n outfp=BytesIO()\n encode(infp,outfp,quotetabs,header)\n return outfp.getvalue()\n \n \n \ndef decode(input,output,header=False ):\n ''\n\n \n \n if a2b_qp is not None :\n data=input.read()\n odata=a2b_qp(data,header=header)\n output.write(odata)\n return\n \n new=b''\n while line :=input.readline():\n i,n=0,len(line)\n if n >0 and line[n -1:n]==b'\\n':\n partial=0 ;n=n -1\n \n while n >0 and line[n -1:n]in b\" \\t\\r\":\n n=n -1\n else :\n partial=1\n while i =n:\n r=getrandbits(k)\n return r\n \n def _randbelow_without_getrandbits(self,n,maxsize=1 <=maxsize:\n _warn(\"Underlying random() generator does not supply \\n\"\n \"enough bits to choose from a population range this large.\\n\"\n \"To remove the range limitation, add a getrandbits() method.\")\n return _floor(random()*n)\n rem=maxsize %n\n limit=(maxsize -rem)/maxsize\n r=random()\n while r >=limit:\n r=random()\n return _floor(r *maxsize)%n\n \n _randbelow=_randbelow_with_getrandbits\n \n \n \n \n \n \n \n \n \n \n \n \n def randbytes(self,n):\n ''\n return self.getrandbits(n *8).to_bytes(n,'little')\n \n \n \n \n def randrange(self,start,stop=None ,step=_ONE):\n ''\n\n\n\n\n \n \n \n \n istart=_index(start)\n if stop is None :\n \n \n if step is not _ONE:\n raise TypeError(\"Missing a non-None stop argument\")\n if istart >0:\n return self._randbelow(istart)\n raise ValueError(\"empty range for randrange()\")\n \n \n istop=_index(stop)\n width=istop -istart\n istep=_index(step)\n \n if istep ==1:\n if width >0:\n return istart+self._randbelow(width)\n raise ValueError(f\"empty range in randrange({start}, {stop})\")\n \n \n if istep >0:\n n=(width+istep -1)//istep\n elif istep <0:\n n=(width+istep+1)//istep\n else :\n raise ValueError(\"zero step for randrange()\")\n if n <=0:\n raise ValueError(f\"empty range in randrange({start}, {stop}, {step})\")\n return istart+istep *self._randbelow(n)\n \n def randint(self,a,b):\n ''\n \n \n return self.randrange(a,b+1)\n \n \n \n \n def choice(self,seq):\n ''\n \n \n \n if not len(seq):\n raise IndexError('Cannot choose from an empty sequence')\n return seq[self._randbelow(len(seq))]\n \n def shuffle(self,x):\n ''\n \n randbelow=self._randbelow\n for i in reversed(range(1,len(x))):\n \n j=randbelow(i+1)\n x[i],x[j]=x[j],x[i]\n \n def sample(self,population,k,*,counts=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n if not isinstance(population,_Sequence):\n raise TypeError(\"Population must be a sequence. \"\n \"For dicts or sets, use sorted(d).\")\n n=len(population)\n if counts is not None :\n cum_counts=list(_accumulate(counts))\n if len(cum_counts)!=n:\n raise ValueError('The number of counts does not match the population')\n total=cum_counts.pop()\n if not isinstance(total,int):\n raise TypeError('Counts must be integers')\n if total <=0:\n raise ValueError('Total of counts must be greater than zero')\n selections=self.sample(range(total),k=k)\n bisect=_bisect\n return [population[bisect(cum_counts,s)]for s in selections]\n randbelow=self._randbelow\n if not 0 <=k <=n:\n raise ValueError(\"Sample larger than population or is negative\")\n result=[None ]*k\n setsize=21\n if k >5:\n setsize +=4 **_ceil(_log(k *3,4))\n if n <=setsize:\n \n \n pool=list(population)\n for i in range(k):\n j=randbelow(n -i)\n result[i]=pool[j]\n pool[j]=pool[n -i -1]\n else :\n selected=set()\n selected_add=selected.add\n for i in range(k):\n j=randbelow(n)\n while j in selected:\n j=randbelow(n)\n selected_add(j)\n result[i]=population[j]\n return result\n \n def choices(self,population,weights=None ,*,cum_weights=None ,k=1):\n ''\n\n\n\n\n \n random=self.random\n n=len(population)\n if cum_weights is None :\n if weights is None :\n floor=_floor\n n +=0.0\n return [population[floor(random()*n)]for i in _repeat(None ,k)]\n try :\n cum_weights=list(_accumulate(weights))\n except TypeError:\n if not isinstance(weights,int):\n raise\n k=weights\n raise TypeError(\n f'The number of choices must be a keyword argument: {k=}'\n )from None\n elif weights is not None :\n raise TypeError('Cannot specify both weights and cumulative weights')\n if len(cum_weights)!=n:\n raise ValueError('The number of weights does not match the population')\n total=cum_weights[-1]+0.0\n if total <=0.0:\n raise ValueError('Total of weights must be greater than zero')\n if not _isfinite(total):\n raise ValueError('Total of weights must be finite')\n bisect=_bisect\n hi=n -1\n return [population[bisect(cum_weights,random()*total,0,hi)]\n for i in _repeat(None ,k)]\n \n \n \n \n def uniform(self,a,b):\n ''\n return a+(b -a)*self.random()\n \n def triangular(self,low=0.0,high=1.0,mode=None ):\n ''\n\n\n\n\n\n\n \n u=self.random()\n try :\n c=0.5 if mode is None else (mode -low)/(high -low)\n except ZeroDivisionError:\n return low\n if u >c:\n u=1.0 -u\n c=1.0 -c\n low,high=high,low\n return low+(high -low)*_sqrt(u *c)\n \n def normalvariate(self,mu=0.0,sigma=1.0):\n ''\n\n\n\n \n \n \n \n \n \n random=self.random\n while True :\n u1=random()\n u2=1.0 -random()\n z=NV_MAGICCONST *(u1 -0.5)/u2\n zz=z *z /4.0\n if zz <=-_log(u2):\n break\n return mu+z *sigma\n \n def gauss(self,mu=0.0,sigma=1.0):\n ''\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n random=self.random\n z=self.gauss_next\n self.gauss_next=None\n if z is None :\n x2pi=random()*TWOPI\n g2rad=_sqrt(-2.0 *_log(1.0 -random()))\n z=_cos(x2pi)*g2rad\n self.gauss_next=_sin(x2pi)*g2rad\n \n return mu+z *sigma\n \n def lognormvariate(self,mu,sigma):\n ''\n\n\n\n\n\n \n return _exp(self.normalvariate(mu,sigma))\n \n def expovariate(self,lambd=1.0):\n ''\n\n\n\n\n\n\n\n \n \n \n \n \n \n return -_log(1.0 -self.random())/lambd\n \n def vonmisesvariate(self,mu,kappa):\n ''\n\n\n\n\n\n\n \n \n \n \n \n \n \n \n random=self.random\n if kappa <=1e-6:\n return TWOPI *random()\n \n s=0.5 /kappa\n r=s+_sqrt(1.0+s *s)\n \n while True :\n u1=random()\n z=_cos(_pi *u1)\n \n d=z /(r+z)\n u2=random()\n if u2 <1.0 -d *d or u2 <=(1.0 -d)*_exp(d):\n break\n \n q=1.0 /r\n f=(q+z)/(1.0+q *z)\n u3=random()\n if u3 >0.5:\n theta=(mu+_acos(f))%TWOPI\n else :\n theta=(mu -_acos(f))%TWOPI\n \n return theta\n \n def gammavariate(self,alpha,beta):\n ''\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n if alpha <=0.0 or beta <=0.0:\n raise ValueError('gammavariate: alpha and beta must be > 0.0')\n \n random=self.random\n if alpha >1.0:\n \n \n \n \n \n ainv=_sqrt(2.0 *alpha -1.0)\n bbb=alpha -LOG4\n ccc=alpha+ainv\n \n while True :\n u1=random()\n if not 1e-7 =0.0 or r >=_log(z):\n return x *beta\n \n elif alpha ==1.0:\n \n return -_log(1.0 -random())*beta\n \n else :\n \n \n while True :\n u=random()\n b=(_e+alpha)/_e\n p=b *u\n if p <=1.0:\n x=p **(1.0 /alpha)\n else :\n x=-_log((b -p)/alpha)\n u1=random()\n if p >1.0:\n if u1 <=x **(alpha -1.0):\n break\n elif u1 <=_exp(-x):\n break\n return x *beta\n \n def betavariate(self,alpha,beta):\n ''\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n y=self.gammavariate(alpha,1.0)\n if y:\n return y /(y+self.gammavariate(beta,1.0))\n return 0.0\n \n def paretovariate(self,alpha):\n ''\n \n \n u=1.0 -self.random()\n return u **(-1.0 /alpha)\n \n def weibullvariate(self,alpha,beta):\n ''\n\n\n\n \n \n \n u=1.0 -self.random()\n return alpha *(-_log(u))**(1.0 /beta)\n \n \n \n \n def binomialvariate(self,n=1,p=0.5):\n ''\n\n\n\n\n\n\n\n\n \n \n if n <0:\n raise ValueError(\"n must be non-negative\")\n if p <=0.0 or p >=1.0:\n if p ==0.0:\n return 0\n if p ==1.0:\n return n\n raise ValueError(\"p must be in the range 0.0 <= p <= 1.0\")\n \n random=self.random\n \n \n if n ==1:\n return _index(random()0.5:\n return n -self.binomialvariate(n,1.0 -p)\n \n if n *p <10.0:\n \n \n x=y=0\n c=_log2(1.0 -p)\n if not c:\n return x\n while True :\n y +=_floor(_log2(random())/c)+1\n if y >n:\n return x\n x +=1\n \n \n \n assert n *p >=10.0 and p <=0.5\n setup_complete=False\n \n spq=_sqrt(n *p *(1.0 -p))\n b=1.15+2.53 *spq\n a=-0.0873+0.0248 *b+0.01 *p\n c=n *p+0.5\n vr=0.92 -4.2 /b\n \n while True :\n \n u=random()\n u -=0.5\n us=0.5 -_fabs(u)\n k=_floor((2.0 *a /us+b)*u+c)\n if k <0 or k >n:\n continue\n \n \n \n v=random()\n if us >=0.07 and v <=vr:\n return k\n \n \n \n \n if not setup_complete:\n alpha=(2.83+5.1 /b)*spq\n lpq=_log(p /(1.0 -p))\n m=_floor((n+1)*p)\n h=_lgamma(m+1)+_lgamma(n -m+1)\n setup_complete=True\n v *=alpha /(a /(us *us)+b)\n if _log(v)<=h -_lgamma(k+1)-_lgamma(n -k+1)+(k -m)*lpq:\n return k\n \n \n \n \n \n \nclass SystemRandom(Random):\n ''\n\n\n\n\n\n \n \n def random(self):\n ''\n return (int.from_bytes(_urandom(7))>>3)*RECIP_BPF\n \n def getrandbits(self,k):\n ''\n if k <0:\n raise ValueError('number of bits must be non-negative')\n numbytes=(k+7)//8\n x=int.from_bytes(_urandom(numbytes))\n return x >>(numbytes *8 -k)\n \n def randbytes(self,n):\n ''\n \n \n return _urandom(n)\n \n def seed(self,*args,**kwds):\n ''\n return None\n \n def _notimplemented(self,*args,**kwds):\n ''\n raise NotImplementedError('System entropy source does not have state.')\n getstate=setstate=_notimplemented\n \n \n \n \n \n \n \n \n \n_inst=Random()\nseed=_inst.seed\nrandom=_inst.random\nuniform=_inst.uniform\ntriangular=_inst.triangular\nrandint=_inst.randint\nchoice=_inst.choice\nrandrange=_inst.randrange\nsample=_inst.sample\nshuffle=_inst.shuffle\nchoices=_inst.choices\nnormalvariate=_inst.normalvariate\nlognormvariate=_inst.lognormvariate\nexpovariate=_inst.expovariate\nvonmisesvariate=_inst.vonmisesvariate\ngammavariate=_inst.gammavariate\ngauss=_inst.gauss\nbetavariate=_inst.betavariate\nbinomialvariate=_inst.binomialvariate\nparetovariate=_inst.paretovariate\nweibullvariate=_inst.weibullvariate\ngetstate=_inst.getstate\nsetstate=_inst.setstate\ngetrandbits=_inst.getrandbits\nrandbytes=_inst.randbytes\n\n\n\n\n\ndef _test_generator(n,func,args):\n from statistics import stdev,fmean as mean\n from time import perf_counter\n \n t0=perf_counter()\n data=[func(*args)for i in _repeat(None ,n)]\n t1=perf_counter()\n \n xbar=mean(data)\n sigma=stdev(data,xbar)\n low=min(data)\n high=max(data)\n \n print(f'{t1 -t0:.3f} sec, {n} times {func.__name__}{args !r}')\n print('avg %g, stddev %g, min %g, max %g\\n'%(xbar,sigma,low,high))\n \n \ndef _test(N=10_000):\n _test_generator(N,random,())\n _test_generator(N,normalvariate,(0.0,1.0))\n _test_generator(N,lognormvariate,(0.0,1.0))\n _test_generator(N,vonmisesvariate,(0.0,1.0))\n _test_generator(N,binomialvariate,(15,0.60))\n _test_generator(N,binomialvariate,(100,0.75))\n _test_generator(N,gammavariate,(0.01,1.0))\n _test_generator(N,gammavariate,(0.1,1.0))\n _test_generator(N,gammavariate,(0.1,2.0))\n _test_generator(N,gammavariate,(0.5,1.0))\n _test_generator(N,gammavariate,(0.9,1.0))\n _test_generator(N,gammavariate,(1.0,1.0))\n _test_generator(N,gammavariate,(2.0,1.0))\n _test_generator(N,gammavariate,(20.0,1.0))\n _test_generator(N,gammavariate,(200.0,1.0))\n _test_generator(N,gauss,(0.0,1.0))\n _test_generator(N,betavariate,(3.0,3.0))\n _test_generator(N,triangular,(0.0,1.0,1.0 /3.0))\n \n \n \n \n \nif hasattr(_os,\"fork\"):\n _os.register_at_fork(after_in_child=_inst.seed)\n \n \nif __name__ =='__main__':\n _test()\n", ["_collections_abc", "_random", "_sha512", "bisect", "hashlib", "itertools", "math", "operator", "os", "statistics", "time", "warnings"]], "re": [".py", "from python_re import *\n\nimport python_re\n_compile=python_re._compile\n_reconstructor=python_re._reconstructor\n\npython_re._reconstructor.__module__='re'\n", ["python_re"]], "re1": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nr\"\"\"Support for regular expressions (RE).\n\nThis module provides regular expression matching operations similar to\nthose found in Perl. It supports both 8-bit and Unicode strings; both\nthe pattern and the strings being processed can contain null bytes and\ncharacters outside the US ASCII range.\n\nRegular expressions can contain both special and ordinary characters.\nMost ordinary characters, like \"A\", \"a\", or \"0\", are the simplest\nregular expressions; they simply match themselves. You can\nconcatenate ordinary characters, so last matches the string 'last'.\n\nThe special characters are:\n \".\" Matches any character except a newline.\n \"^\" Matches the start of the string.\n \"$\" Matches the end of the string or just before the newline at\n the end of the string.\n \"*\" Matches 0 or more (greedy) repetitions of the preceding RE.\n Greedy means that it will match as many repetitions as possible.\n \"+\" Matches 1 or more (greedy) repetitions of the preceding RE.\n \"?\" Matches 0 or 1 (greedy) of the preceding RE.\n *?,+?,?? Non-greedy versions of the previous three special characters.\n {m,n} Matches from m to n repetitions of the preceding RE.\n {m,n}? Non-greedy version of the above.\n \"\\\\\" Either escapes special characters or signals a special sequence.\n [] Indicates a set of characters.\n A \"^\" as the first character indicates a complementing set.\n \"|\" A|B, creates an RE that will match either A or B.\n (...) Matches the RE inside the parentheses.\n The contents can be retrieved or matched later in the string.\n (?aiLmsux) The letters set the corresponding flags defined below.\n (?:...) Non-grouping version of regular parentheses.\n (?P...) The substring matched by the group is accessible by name.\n (?P=name) Matches the text matched earlier by the group named name.\n (?#...) A comment; ignored.\n (?=...) Matches if ... matches next, but doesn't consume the string.\n (?!...) Matches if ... doesn't match next.\n (?<=...) Matches if preceded by ... (must be fixed length).\n (?1:\n res=f'~({res})'\n else :\n res=f'~{res}'\n return res\n __str__=object.__str__\nglobals().update(RegexFlag.__members__)\n\n\nerror=sre_compile.error\n\n\n\n\ndef match(pattern,string,flags=0):\n ''\n \n return _compile(pattern,flags).match(string)\n \ndef fullmatch(pattern,string,flags=0):\n ''\n \n return _compile(pattern,flags).fullmatch(string)\n \ndef search(pattern,string,flags=0):\n ''\n \n return _compile(pattern,flags).search(string)\n \ndef sub(pattern,repl,string,count=0,flags=0):\n ''\n\n\n\n\n \n return _compile(pattern,flags).sub(repl,string,count)\n \ndef subn(pattern,repl,string,count=0,flags=0):\n ''\n\n\n\n\n\n\n \n return _compile(pattern,flags).subn(repl,string,count)\n \ndef split(pattern,string,maxsplit=0,flags=0):\n ''\n\n\n\n\n\n \n return _compile(pattern,flags).split(string,maxsplit)\n \ndef findall(pattern,string,flags=0):\n ''\n\n\n\n\n\n \n return _compile(pattern,flags).findall(string)\n \ndef finditer(pattern,string,flags=0):\n ''\n\n\n \n return _compile(pattern,flags).finditer(string)\n \ndef compile(pattern,flags=0):\n ''\n return _compile(pattern,flags)\n \ndef purge():\n ''\n _cache.clear()\n _compile_repl.cache_clear()\n \ndef template(pattern,flags=0):\n ''\n return _compile(pattern,flags |T)\n \n \n \n \n \n \n_special_chars_map={i:'\\\\'+chr(i)for i in b'()[]{}?*+-|^$\\\\.&~# \\t\\n\\r\\v\\f'}\n\ndef escape(pattern):\n ''\n\n \n if isinstance(pattern,str):\n return pattern.translate(_special_chars_map)\n else :\n pattern=str(pattern,'latin1')\n return pattern.translate(_special_chars_map).encode('latin1')\n \nPattern=type(sre_compile.compile('',0))\nMatch=type(sre_compile.compile('',0).match(''))\n\n\n\n\n_cache={}\n\n_MAXCACHE=512\ndef _compile(pattern,flags):\n\n if isinstance(flags,RegexFlag):\n flags=flags.value\n try :\n return _cache[type(pattern),pattern,flags]\n except KeyError:\n pass\n if isinstance(pattern,Pattern):\n if flags:\n raise ValueError(\n \"cannot process flags argument with a compiled pattern\")\n return pattern\n if not sre_compile.isstring(pattern):\n raise TypeError(\"first argument must be string or compiled pattern\")\n p=sre_compile.compile(pattern,flags)\n if not (flags&DEBUG):\n if len(_cache)>=_MAXCACHE:\n \n try :\n del _cache[next(iter(_cache))]\n except (StopIteration,RuntimeError,KeyError):\n pass\n _cache[type(pattern),pattern,flags]=p\n return p\n \n@functools.lru_cache(_MAXCACHE)\ndef _compile_repl(repl,pattern):\n\n return sre_parse.parse_template(repl,pattern)\n \ndef _expand(pattern,match,template):\n\n template=sre_parse.parse_template(template,pattern)\n return sre_parse.expand_template(template,match)\n \ndef _subx(pattern,template):\n\n template=_compile_repl(template,pattern)\n if not template[0]and len(template[1])==1:\n \n return template[1][0]\n def filter(match,template=template):\n return sre_parse.expand_template(template,match)\n return filter\n \n \n \nimport copyreg\n\ndef _pickle(p):\n return _compile,(p.pattern,p.flags)\n \ncopyreg.pickle(Pattern,_pickle,_compile)\n\n\n\n\nclass Scanner:\n def __init__(self,lexicon,flags=0):\n from sre_constants import BRANCH,SUBPATTERN\n if isinstance(flags,RegexFlag):\n flags=flags.value\n self.lexicon=lexicon\n \n p=[]\n s=sre_parse.State()\n s.flags=flags\n for phrase,action in lexicon:\n gid=s.opengroup()\n p.append(sre_parse.SubPattern(s,[\n (SUBPATTERN,(gid,0,0,sre_parse.parse(phrase,flags))),\n ]))\n s.closegroup(gid,p[-1])\n p=sre_parse.SubPattern(s,[(BRANCH,(None ,p))])\n self.scanner=sre_compile.compile(p)\n def scan(self,string):\n result=[]\n append=result.append\n match=self.scanner.scanner(string).match\n i=0\n while True :\n m=match()\n if not m:\n break\n j=m.end()\n if i ==j:\n break\n action=self.lexicon[m.lastindex -1][1]\n if callable(action):\n self.match=m\n action=action(self,m.group())\n if action is not None :\n append(action)\n i=j\n return result,string[i:]\n", ["_locale", "copyreg", "enum", "functools", "sre_compile", "sre_constants", "sre_parse"]], "reprlib": [".py", "''\n\n__all__=[\"Repr\",\"repr\",\"recursive_repr\"]\n\nimport builtins\nfrom itertools import islice\nfrom _thread import get_ident\n\ndef recursive_repr(fillvalue='...'):\n ''\n \n def decorating_function(user_function):\n repr_running=set()\n \n def wrapper(self):\n key=id(self),get_ident()\n if key in repr_running:\n return fillvalue\n repr_running.add(key)\n try :\n result=user_function(self)\n finally :\n repr_running.discard(key)\n return result\n \n \n wrapper.__module__=getattr(user_function,'__module__')\n wrapper.__doc__=getattr(user_function,'__doc__')\n wrapper.__name__=getattr(user_function,'__name__')\n wrapper.__qualname__=getattr(user_function,'__qualname__')\n wrapper.__annotations__=getattr(user_function,'__annotations__',{})\n return wrapper\n \n return decorating_function\n \nclass Repr:\n\n def __init__(\n self,*,maxlevel=6,maxtuple=6,maxlist=6,maxarray=5,maxdict=4,\n maxset=6,maxfrozenset=6,maxdeque=6,maxstring=30,maxlong=40,\n maxother=30,fillvalue='...',indent=None ,\n ):\n self.maxlevel=maxlevel\n self.maxtuple=maxtuple\n self.maxlist=maxlist\n self.maxarray=maxarray\n self.maxdict=maxdict\n self.maxset=maxset\n self.maxfrozenset=maxfrozenset\n self.maxdeque=maxdeque\n self.maxstring=maxstring\n self.maxlong=maxlong\n self.maxother=maxother\n self.fillvalue=fillvalue\n self.indent=indent\n \n def repr(self,x):\n return self.repr1(x,self.maxlevel)\n \n def repr1(self,x,level):\n typename=type(x).__name__\n if ' 'in typename:\n parts=typename.split()\n typename='_'.join(parts)\n if hasattr(self,'repr_'+typename):\n return getattr(self,'repr_'+typename)(x,level)\n else :\n return self.repr_instance(x,level)\n \n def _join(self,pieces,level):\n if self.indent is None :\n return ', '.join(pieces)\n if not pieces:\n return ''\n indent=self.indent\n if isinstance(indent,int):\n if indent <0:\n raise ValueError(\n f'Repr.indent cannot be negative int (was {indent !r})'\n )\n indent *=' '\n try :\n sep=',\\n'+(self.maxlevel -level+1)*indent\n except TypeError as error:\n raise TypeError(\n f'Repr.indent must be a str, int or None, not {type(indent)}'\n )from error\n return sep.join(('',*pieces,''))[1:-len(indent)or None ]\n \n def _repr_iterable(self,x,level,left,right,maxiter,trail=''):\n n=len(x)\n if level <=0 and n:\n s=self.fillvalue\n else :\n newlevel=level -1\n repr1=self.repr1\n pieces=[repr1(elem,newlevel)for elem in islice(x,maxiter)]\n if n >maxiter:\n pieces.append(self.fillvalue)\n s=self._join(pieces,level)\n if n ==1 and trail and self.indent is None :\n right=trail+right\n return '%s%s%s'%(left,s,right)\n \n def repr_tuple(self,x,level):\n return self._repr_iterable(x,level,'(',')',self.maxtuple,',')\n \n def repr_list(self,x,level):\n return self._repr_iterable(x,level,'[',']',self.maxlist)\n \n def repr_array(self,x,level):\n if not x:\n return \"array('%s')\"%x.typecode\n header=\"array('%s', [\"%x.typecode\n return self._repr_iterable(x,level,header,'])',self.maxarray)\n \n def repr_set(self,x,level):\n if not x:\n return 'set()'\n x=_possibly_sorted(x)\n return self._repr_iterable(x,level,'{','}',self.maxset)\n \n def repr_frozenset(self,x,level):\n if not x:\n return 'frozenset()'\n x=_possibly_sorted(x)\n return self._repr_iterable(x,level,'frozenset({','})',\n self.maxfrozenset)\n \n def repr_deque(self,x,level):\n return self._repr_iterable(x,level,'deque([','])',self.maxdeque)\n \n def repr_dict(self,x,level):\n n=len(x)\n if n ==0:\n return '{}'\n if level <=0:\n return '{'+self.fillvalue+'}'\n newlevel=level -1\n repr1=self.repr1\n pieces=[]\n for key in islice(_possibly_sorted(x),self.maxdict):\n keyrepr=repr1(key,newlevel)\n valrepr=repr1(x[key],newlevel)\n pieces.append('%s: %s'%(keyrepr,valrepr))\n if n >self.maxdict:\n pieces.append(self.fillvalue)\n s=self._join(pieces,level)\n return '{%s}'%(s,)\n \n def repr_str(self,x,level):\n s=builtins.repr(x[:self.maxstring])\n if len(s)>self.maxstring:\n i=max(0,(self.maxstring -3)//2)\n j=max(0,self.maxstring -3 -i)\n s=builtins.repr(x[:i]+x[len(x)-j:])\n s=s[:i]+self.fillvalue+s[len(s)-j:]\n return s\n \n def repr_int(self,x,level):\n s=builtins.repr(x)\n if len(s)>self.maxlong:\n i=max(0,(self.maxlong -3)//2)\n j=max(0,self.maxlong -3 -i)\n s=s[:i]+self.fillvalue+s[len(s)-j:]\n return s\n \n def repr_instance(self,x,level):\n try :\n s=builtins.repr(x)\n \n \n except Exception:\n return '<%s instance at %#x>'%(x.__class__.__name__,id(x))\n if len(s)>self.maxother:\n i=max(0,(self.maxother -3)//2)\n j=max(0,self.maxother -3 -i)\n s=s[:i]+self.fillvalue+s[len(s)-j:]\n return s\n \n \ndef _possibly_sorted(x):\n\n\n\n try :\n return sorted(x)\n except Exception:\n return list(x)\n \naRepr=Repr()\nrepr=aRepr.repr\n", ["_thread", "builtins", "itertools"]], "secrets": [".py", "''\n\n\n\n\n\n\n\n__all__=['choice','randbelow','randbits','SystemRandom',\n'token_bytes','token_hex','token_urlsafe',\n'compare_digest',\n]\n\n\nimport base64\n\nfrom hmac import compare_digest\nfrom random import SystemRandom\n\n_sysrand=SystemRandom()\n\nrandbits=_sysrand.getrandbits\nchoice=_sysrand.choice\n\ndef randbelow(exclusive_upper_bound):\n ''\n if exclusive_upper_bound <=0:\n raise ValueError(\"Upper bound must be positive.\")\n return _sysrand._randbelow(exclusive_upper_bound)\n \nDEFAULT_ENTROPY=32\n\ndef token_bytes(nbytes=None ):\n ''\n\n\n\n\n\n\n\n \n if nbytes is None :\n nbytes=DEFAULT_ENTROPY\n return _sysrand.randbytes(nbytes)\n \ndef token_hex(nbytes=None ):\n ''\n\n\n\n\n\n\n\n\n \n return token_bytes(nbytes).hex()\n \ndef token_urlsafe(nbytes=None ):\n ''\n\n\n\n\n\n\n\n \n tok=token_bytes(nbytes)\n return base64.urlsafe_b64encode(tok).rstrip(b'=').decode('ascii')\n", ["base64", "hmac", "random"]], "select": [".py", "''\n\n\n\n\nimport errno\nimport os\n\nclass error(Exception):\n pass\n \nALL=None\n\n_exception_map={}\n\ndef _map_exception(exc,circumstance=ALL):\n try :\n mapped_exception=_exception_map[(exc.__class__,circumstance)]\n mapped_exception.java_exception=exc\n return mapped_exception\n except KeyError:\n return error(-1,'Unmapped java exception: <%s:%s>'%(exc.toString(),circumstance))\n \nPOLLIN=1\nPOLLOUT=2\n\n\n\n\n\nPOLLPRI=4\nPOLLERR=8\nPOLLHUP=16\nPOLLNVAL=32\n\ndef _getselectable(selectable_object):\n try :\n channel=selectable_object.getchannel()\n except :\n try :\n channel=selectable_object.fileno().getChannel()\n except :\n raise TypeError(\"Object '%s' is not watchable\"%selectable_object,\n errno.ENOTSOCK)\n \n return channel\n \n \nclass Selector:\n\n def close(self):\n pass\n \n def keys(self):\n return []\n \n def select(self,timeout=None ):\n return []\n \n def selectedKeys(self):\n class SelectedKeys:\n def iterator(self):\n return []\n return SelectedKeys()\n \n def selectNow(self,timeout=None ):\n return []\n \nclass poll:\n\n def __init__(self):\n self.selector=Selector()\n self.chanmap={}\n self.unconnected_sockets=[]\n \n def _register_channel(self,socket_object,channel,mask):\n jmask=0\n if mask&POLLIN:\n \n if channel.validOps()&OP_ACCEPT:\n jmask=OP_ACCEPT\n else :\n jmask=OP_READ\n if mask&POLLOUT:\n if channel.validOps()&OP_WRITE:\n jmask |=OP_WRITE\n if channel.validOps()&OP_CONNECT:\n jmask |=OP_CONNECT\n selectionkey=channel.register(self.selector,jmask)\n self.chanmap[channel]=(socket_object,selectionkey)\n \n def _check_unconnected_sockets(self):\n temp_list=[]\n for socket_object,mask in self.unconnected_sockets:\n channel=_getselectable(socket_object)\n if channel is not None :\n self._register_channel(socket_object,channel,mask)\n else :\n temp_list.append((socket_object,mask))\n self.unconnected_sockets=temp_list\n \n def register(self,socket_object,mask=POLLIN |POLLOUT |POLLPRI):\n try :\n channel=_getselectable(socket_object)\n if channel is None :\n \n \n self.unconnected_sockets.append((socket_object,mask))\n return\n self._register_channel(socket_object,channel,mask)\n except BaseException as exc:\n raise _map_exception(exc)\n \n def unregister(self,socket_object):\n try :\n channel=_getselectable(socket_object)\n self.chanmap[channel][1].cancel()\n del self.chanmap[channel]\n except BaseException as exc:\n raise _map_exception(exc)\n \n def _dopoll(self,timeout):\n if timeout is None or timeout <0:\n self.selector.select()\n else :\n try :\n timeout=int(timeout)\n if not timeout:\n self.selector.selectNow()\n else :\n \n self.selector.select(timeout)\n except ValueError as vx:\n raise error(\"poll timeout must be a number of milliseconds or None\",errno.EINVAL)\n \n return self.selector.selectedKeys()\n \n def poll(self,timeout=None ):\n return []\n \n def _deregister_all(self):\n try :\n for k in self.selector.keys():\n k.cancel()\n \n self.selector.selectNow()\n except BaseException as exc:\n raise _map_exception(exc)\n \n def close(self):\n try :\n self._deregister_all()\n self.selector.close()\n except BaseException as exc:\n raise _map_exception(exc)\n \ndef _calcselecttimeoutvalue(value):\n if value is None :\n return None\n try :\n floatvalue=float(value)\n except Exception as x:\n raise TypeError(\"Select timeout value must be a number or None\")\n if value <0:\n raise error(\"Select timeout value cannot be negative\",errno.EINVAL)\n if floatvalue <0.000001:\n return 0\n return int(floatvalue *1000)\n \n \n \n \nclass poll_object_cache:\n\n def __init__(self):\n self.is_windows=os.name =='nt'\n if self.is_windows:\n self.poll_object_queue=Queue.Queue()\n import atexit\n atexit.register(self.finalize)\n \n def get_poll_object(self):\n if not self.is_windows:\n return poll()\n try :\n return self.poll_object_queue.get(False )\n except Queue.Empty:\n return poll()\n \n def release_poll_object(self,pobj):\n if self.is_windows:\n pobj._deregister_all()\n self.poll_object_queue.put(pobj)\n else :\n pobj.close()\n \n def finalize(self):\n if self.is_windows:\n while True :\n try :\n p=self.poll_object_queue.get(False )\n p.close()\n except Queue.Empty:\n return\n \n_poll_object_cache=poll_object_cache()\n\ndef native_select(read_fd_list,write_fd_list,outofband_fd_list,timeout=None ):\n timeout=_calcselecttimeoutvalue(timeout)\n \n pobj=_poll_object_cache.get_poll_object()\n try :\n registered_for_read={}\n \n for fd in read_fd_list:\n pobj.register(fd,POLLIN)\n registered_for_read[fd]=1\n \n for fd in write_fd_list:\n if fd in registered_for_read:\n \n pobj.register(fd,POLLIN |POLLOUT)\n else :\n pobj.register(fd,POLLOUT)\n results=pobj.poll(timeout)\n \n read_ready_list,write_ready_list,oob_ready_list=[],[],[]\n for fd,mask in results:\n if mask&POLLIN:\n read_ready_list.append(fd)\n if mask&POLLOUT:\n write_ready_list.append(fd)\n return read_ready_list,write_ready_list,oob_ready_list\n finally :\n _poll_object_cache.release_poll_object(pobj)\n \nselect=native_select\n\ndef cpython_compatible_select(read_fd_list,write_fd_list,outofband_fd_list,timeout=None ):\n\n\n modified_channels=[]\n try :\n for socket_list in [read_fd_list,write_fd_list,outofband_fd_list]:\n for s in socket_list:\n channel=_getselectable(s)\n if channel.isBlocking():\n modified_channels.append(channel)\n channel.configureBlocking(0)\n return native_select(read_fd_list,write_fd_list,outofband_fd_list,timeout)\n finally :\n for channel in modified_channels:\n channel.configureBlocking(1)\n", ["atexit", "errno", "os"]], "selectors": [".py", "''\n\n\n\n\n\n\nfrom abc import ABCMeta,abstractmethod\nfrom collections import namedtuple\nfrom collections.abc import Mapping\nimport math\nimport select\nimport sys\n\n\n\nEVENT_READ=(1 <<0)\nEVENT_WRITE=(1 <<1)\n\n\ndef _fileobj_to_fd(fileobj):\n ''\n\n\n\n\n\n\n\n\n\n \n if isinstance(fileobj,int):\n fd=fileobj\n else :\n try :\n fd=int(fileobj.fileno())\n except (AttributeError,TypeError,ValueError):\n raise ValueError(\"Invalid file object: \"\n \"{!r}\".format(fileobj))from None\n if fd <0:\n raise ValueError(\"Invalid file descriptor: {}\".format(fd))\n return fd\n \n \nSelectorKey=namedtuple('SelectorKey',['fileobj','fd','events','data'])\n\nSelectorKey.__doc__=\"\"\"SelectorKey(fileobj, fd, events, data)\n\n Object used to associate a file object to its backing\n file descriptor, selected event mask, and attached data.\n\"\"\"\nSelectorKey.fileobj.__doc__='File object registered.'\nSelectorKey.fd.__doc__='Underlying file descriptor.'\nSelectorKey.events.__doc__='Events that must be waited for on this file object.'\nSelectorKey.data.__doc__=('''Optional opaque data associated to this file object.\nFor example, this could be used to store a per-client session ID.''')\n\n\nclass _SelectorMapping(Mapping):\n ''\n \n def __init__(self,selector):\n self._selector=selector\n \n def __len__(self):\n return len(self._selector._fd_to_key)\n \n def __getitem__(self,fileobj):\n try :\n fd=self._selector._fileobj_lookup(fileobj)\n return self._selector._fd_to_key[fd]\n except KeyError:\n raise KeyError(\"{!r} is not registered\".format(fileobj))from None\n \n def __iter__(self):\n return iter(self._selector._fd_to_key)\n \n \nclass BaseSelector(metaclass=ABCMeta):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n \n @abstractmethod\n def register(self,fileobj,events,data=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n raise NotImplementedError\n \n @abstractmethod\n def unregister(self,fileobj):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n raise NotImplementedError\n \n def modify(self,fileobj,events,data=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n self.unregister(fileobj)\n return self.register(fileobj,events,data)\n \n @abstractmethod\n def select(self,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n raise NotImplementedError\n \n def close(self):\n ''\n\n\n \n pass\n \n def get_key(self,fileobj):\n ''\n\n\n\n \n mapping=self.get_map()\n if mapping is None :\n raise RuntimeError('Selector is closed')\n try :\n return mapping[fileobj]\n except KeyError:\n raise KeyError(\"{!r} is not registered\".format(fileobj))from None\n \n @abstractmethod\n def get_map(self):\n ''\n raise NotImplementedError\n \n def __enter__(self):\n return self\n \n def __exit__(self,*args):\n self.close()\n \n \nclass _BaseSelectorImpl(BaseSelector):\n ''\n \n def __init__(self):\n \n self._fd_to_key={}\n \n self._map=_SelectorMapping(self)\n \n def _fileobj_lookup(self,fileobj):\n ''\n\n\n\n\n\n\n \n try :\n return _fileobj_to_fd(fileobj)\n except ValueError:\n \n for key in self._fd_to_key.values():\n if key.fileobj is fileobj:\n return key.fd\n \n raise\n \n def register(self,fileobj,events,data=None ):\n if (not events)or (events&~(EVENT_READ |EVENT_WRITE)):\n raise ValueError(\"Invalid events: {!r}\".format(events))\n \n key=SelectorKey(fileobj,self._fileobj_lookup(fileobj),events,data)\n \n if key.fd in self._fd_to_key:\n raise KeyError(\"{!r} (FD {}) is already registered\"\n .format(fileobj,key.fd))\n \n self._fd_to_key[key.fd]=key\n return key\n \n def unregister(self,fileobj):\n try :\n key=self._fd_to_key.pop(self._fileobj_lookup(fileobj))\n except KeyError:\n raise KeyError(\"{!r} is not registered\".format(fileobj))from None\n return key\n \n def modify(self,fileobj,events,data=None ):\n try :\n key=self._fd_to_key[self._fileobj_lookup(fileobj)]\n except KeyError:\n raise KeyError(\"{!r} is not registered\".format(fileobj))from None\n if events !=key.events:\n self.unregister(fileobj)\n key=self.register(fileobj,events,data)\n elif data !=key.data:\n \n key=key._replace(data=data)\n self._fd_to_key[key.fd]=key\n return key\n \n def close(self):\n self._fd_to_key.clear()\n self._map=None\n \n def get_map(self):\n return self._map\n \n def _key_from_fd(self,fd):\n ''\n\n\n\n\n\n\n \n try :\n return self._fd_to_key[fd]\n except KeyError:\n return None\n \n \nclass SelectSelector(_BaseSelectorImpl):\n ''\n \n def __init__(self):\n super().__init__()\n self._readers=set()\n self._writers=set()\n \n def register(self,fileobj,events,data=None ):\n key=super().register(fileobj,events,data)\n if events&EVENT_READ:\n self._readers.add(key.fd)\n if events&EVENT_WRITE:\n self._writers.add(key.fd)\n return key\n \n def unregister(self,fileobj):\n key=super().unregister(fileobj)\n self._readers.discard(key.fd)\n self._writers.discard(key.fd)\n return key\n \n if sys.platform =='win32':\n def _select(self,r,w,_,timeout=None ):\n r,w,x=select.select(r,w,w,timeout)\n return r,w+x,[]\n else :\n _select=select.select\n \n def select(self,timeout=None ):\n timeout=None if timeout is None else max(timeout,0)\n ready=[]\n try :\n r,w,_=self._select(self._readers,self._writers,[],timeout)\n except InterruptedError:\n return ready\n r=set(r)\n w=set(w)\n for fd in r |w:\n events=0\n if fd in r:\n events |=EVENT_READ\n if fd in w:\n events |=EVENT_WRITE\n \n key=self._key_from_fd(fd)\n if key:\n ready.append((key,events&key.events))\n return ready\n \n \nclass _PollLikeSelector(_BaseSelectorImpl):\n ''\n _selector_cls=None\n _EVENT_READ=None\n _EVENT_WRITE=None\n \n def __init__(self):\n super().__init__()\n self._selector=self._selector_cls()\n \n def register(self,fileobj,events,data=None ):\n key=super().register(fileobj,events,data)\n poller_events=0\n if events&EVENT_READ:\n poller_events |=self._EVENT_READ\n if events&EVENT_WRITE:\n poller_events |=self._EVENT_WRITE\n try :\n self._selector.register(key.fd,poller_events)\n except :\n super().unregister(fileobj)\n raise\n return key\n \n def unregister(self,fileobj):\n key=super().unregister(fileobj)\n try :\n self._selector.unregister(key.fd)\n except OSError:\n \n \n pass\n return key\n \n def modify(self,fileobj,events,data=None ):\n try :\n key=self._fd_to_key[self._fileobj_lookup(fileobj)]\n except KeyError:\n raise KeyError(f\"{fileobj!r} is not registered\")from None\n \n changed=False\n if events !=key.events:\n selector_events=0\n if events&EVENT_READ:\n selector_events |=self._EVENT_READ\n if events&EVENT_WRITE:\n selector_events |=self._EVENT_WRITE\n try :\n self._selector.modify(key.fd,selector_events)\n except :\n super().unregister(fileobj)\n raise\n changed=True\n if data !=key.data:\n changed=True\n \n if changed:\n key=key._replace(events=events,data=data)\n self._fd_to_key[key.fd]=key\n return key\n \n def select(self,timeout=None ):\n \n \n if timeout is None :\n timeout=None\n elif timeout <=0:\n timeout=0\n else :\n \n \n timeout=math.ceil(timeout *1e3)\n ready=[]\n try :\n fd_event_list=self._selector.poll(timeout)\n except InterruptedError:\n return ready\n for fd,event in fd_event_list:\n events=0\n if event&~self._EVENT_READ:\n events |=EVENT_WRITE\n if event&~self._EVENT_WRITE:\n events |=EVENT_READ\n \n key=self._key_from_fd(fd)\n if key:\n ready.append((key,events&key.events))\n return ready\n \n \nif hasattr(select,'poll'):\n\n class PollSelector(_PollLikeSelector):\n ''\n _selector_cls=select.poll\n _EVENT_READ=select.POLLIN\n _EVENT_WRITE=select.POLLOUT\n \n \nif hasattr(select,'epoll'):\n\n class EpollSelector(_PollLikeSelector):\n ''\n _selector_cls=select.epoll\n _EVENT_READ=select.EPOLLIN\n _EVENT_WRITE=select.EPOLLOUT\n \n def fileno(self):\n return self._selector.fileno()\n \n def select(self,timeout=None ):\n if timeout is None :\n timeout=-1\n elif timeout <=0:\n timeout=0\n else :\n \n \n timeout=math.ceil(timeout *1e3)*1e-3\n \n \n \n \n max_ev=max(len(self._fd_to_key),1)\n \n ready=[]\n try :\n fd_event_list=self._selector.poll(timeout,max_ev)\n except InterruptedError:\n return ready\n for fd,event in fd_event_list:\n events=0\n if event&~select.EPOLLIN:\n events |=EVENT_WRITE\n if event&~select.EPOLLOUT:\n events |=EVENT_READ\n \n key=self._key_from_fd(fd)\n if key:\n ready.append((key,events&key.events))\n return ready\n \n def close(self):\n self._selector.close()\n super().close()\n \n \nif hasattr(select,'devpoll'):\n\n class DevpollSelector(_PollLikeSelector):\n ''\n _selector_cls=select.devpoll\n _EVENT_READ=select.POLLIN\n _EVENT_WRITE=select.POLLOUT\n \n def fileno(self):\n return self._selector.fileno()\n \n def close(self):\n self._selector.close()\n super().close()\n \n \nif hasattr(select,'kqueue'):\n\n class KqueueSelector(_BaseSelectorImpl):\n ''\n \n def __init__(self):\n super().__init__()\n self._selector=select.kqueue()\n \n def fileno(self):\n return self._selector.fileno()\n \n def register(self,fileobj,events,data=None ):\n key=super().register(fileobj,events,data)\n try :\n if events&EVENT_READ:\n kev=select.kevent(key.fd,select.KQ_FILTER_READ,\n select.KQ_EV_ADD)\n self._selector.control([kev],0,0)\n if events&EVENT_WRITE:\n kev=select.kevent(key.fd,select.KQ_FILTER_WRITE,\n select.KQ_EV_ADD)\n self._selector.control([kev],0,0)\n except :\n super().unregister(fileobj)\n raise\n return key\n \n def unregister(self,fileobj):\n key=super().unregister(fileobj)\n if key.events&EVENT_READ:\n kev=select.kevent(key.fd,select.KQ_FILTER_READ,\n select.KQ_EV_DELETE)\n try :\n self._selector.control([kev],0,0)\n except OSError:\n \n \n pass\n if key.events&EVENT_WRITE:\n kev=select.kevent(key.fd,select.KQ_FILTER_WRITE,\n select.KQ_EV_DELETE)\n try :\n self._selector.control([kev],0,0)\n except OSError:\n \n pass\n return key\n \n def select(self,timeout=None ):\n timeout=None if timeout is None else max(timeout,0)\n \n \n \n max_ev=max(len(self._fd_to_key),1)\n ready=[]\n try :\n kev_list=self._selector.control(None ,max_ev,timeout)\n except InterruptedError:\n return ready\n for kev in kev_list:\n fd=kev.ident\n flag=kev.filter\n events=0\n if flag ==select.KQ_FILTER_READ:\n events |=EVENT_READ\n if flag ==select.KQ_FILTER_WRITE:\n events |=EVENT_WRITE\n \n key=self._key_from_fd(fd)\n if key:\n ready.append((key,events&key.events))\n return ready\n \n def close(self):\n self._selector.close()\n super().close()\n \n \ndef _can_use(method):\n ''\n \n \n selector=getattr(select,method,None )\n if selector is None :\n \n return False\n \n \n try :\n selector_obj=selector()\n if method =='poll':\n \n selector_obj.poll(0)\n else :\n \n selector_obj.close()\n return True\n except OSError:\n return False\n \n \n \n \n \nif _can_use('kqueue'):\n DefaultSelector=KqueueSelector\nelif _can_use('epoll'):\n DefaultSelector=EpollSelector\nelif _can_use('devpoll'):\n DefaultSelector=DevpollSelector\nelif _can_use('poll'):\n DefaultSelector=PollSelector\nelse :\n DefaultSelector=SelectSelector\n", ["abc", "collections", "collections.abc", "math", "select", "sys"]], "shlex": [".py", "''\n\n\n\n\n\n\n\n\nimport os\nimport re\nimport sys\nfrom collections import deque\n\nfrom io import StringIO\n\n__all__=[\"shlex\",\"split\",\"quote\",\"join\"]\n\nclass shlex:\n ''\n def __init__(self,instream=None ,infile=None ,posix=False ,\n punctuation_chars=False ):\n if isinstance(instream,str):\n instream=StringIO(instream)\n if instream is not None :\n self.instream=instream\n self.infile=infile\n else :\n self.instream=sys.stdin\n self.infile=None\n self.posix=posix\n if posix:\n self.eof=None\n else :\n self.eof=''\n self.commenters='#'\n self.wordchars=('abcdfeghijklmnopqrstuvwxyz'\n 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_')\n if self.posix:\n self.wordchars +=('\u00df\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u00e6\u00e7\u00e8\u00e9\u00ea\u00eb\u00ec\u00ed\u00ee\u00ef\u00f0\u00f1\u00f2\u00f3\u00f4\u00f5\u00f6\u00f8\u00f9\u00fa\u00fb\u00fc\u00fd\u00fe\u00ff'\n '\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u00c6\u00c7\u00c8\u00c9\u00ca\u00cb\u00cc\u00cd\u00ce\u00cf\u00d0\u00d1\u00d2\u00d3\u00d4\u00d5\u00d6\u00d8\u00d9\u00da\u00db\u00dc\u00dd\u00de')\n self.whitespace=' \\t\\r\\n'\n self.whitespace_split=False\n self.quotes='\\'\"'\n self.escape='\\\\'\n self.escapedquotes='\"'\n self.state=' '\n self.pushback=deque()\n self.lineno=1\n self.debug=0\n self.token=''\n self.filestack=deque()\n self.source=None\n if not punctuation_chars:\n punctuation_chars=''\n elif punctuation_chars is True :\n punctuation_chars='();<>|&'\n self._punctuation_chars=punctuation_chars\n if punctuation_chars:\n \n self._pushback_chars=deque()\n \n self.wordchars +='~-./*?='\n \n t=self.wordchars.maketrans(dict.fromkeys(punctuation_chars))\n self.wordchars=self.wordchars.translate(t)\n \n @property\n def punctuation_chars(self):\n return self._punctuation_chars\n \n def push_token(self,tok):\n ''\n if self.debug >=1:\n print(\"shlex: pushing token \"+repr(tok))\n self.pushback.appendleft(tok)\n \n def push_source(self,newstream,newfile=None ):\n ''\n if isinstance(newstream,str):\n newstream=StringIO(newstream)\n self.filestack.appendleft((self.infile,self.instream,self.lineno))\n self.infile=newfile\n self.instream=newstream\n self.lineno=1\n if self.debug:\n if newfile is not None :\n print('shlex: pushing to file %s'%(self.infile,))\n else :\n print('shlex: pushing to stream %s'%(self.instream,))\n \n def pop_source(self):\n ''\n self.instream.close()\n (self.infile,self.instream,self.lineno)=self.filestack.popleft()\n if self.debug:\n print('shlex: popping to %s, line %d'\\\n %(self.instream,self.lineno))\n self.state=' '\n \n def get_token(self):\n ''\n if self.pushback:\n tok=self.pushback.popleft()\n if self.debug >=1:\n print(\"shlex: popping token \"+repr(tok))\n return tok\n \n raw=self.read_token()\n \n if self.source is not None :\n while raw ==self.source:\n spec=self.sourcehook(self.read_token())\n if spec:\n (newfile,newstream)=spec\n self.push_source(newstream,newfile)\n raw=self.get_token()\n \n while raw ==self.eof:\n if not self.filestack:\n return self.eof\n else :\n self.pop_source()\n raw=self.get_token()\n \n if self.debug >=1:\n if raw !=self.eof:\n print(\"shlex: token=\"+repr(raw))\n else :\n print(\"shlex: token=EOF\")\n return raw\n \n def read_token(self):\n quoted=False\n escapedstate=' '\n while True :\n if self.punctuation_chars and self._pushback_chars:\n nextchar=self._pushback_chars.pop()\n else :\n nextchar=self.instream.read(1)\n if nextchar =='\\n':\n self.lineno +=1\n if self.debug >=3:\n print(\"shlex: in state %r I see character: %r\"%(self.state,\n nextchar))\n if self.state is None :\n self.token=''\n break\n elif self.state ==' ':\n if not nextchar:\n self.state=None\n break\n elif nextchar in self.whitespace:\n if self.debug >=2:\n print(\"shlex: I see whitespace in whitespace state\")\n if self.token or (self.posix and quoted):\n break\n else :\n continue\n elif nextchar in self.commenters:\n self.instream.readline()\n self.lineno +=1\n elif self.posix and nextchar in self.escape:\n escapedstate='a'\n self.state=nextchar\n elif nextchar in self.wordchars:\n self.token=nextchar\n self.state='a'\n elif nextchar in self.punctuation_chars:\n self.token=nextchar\n self.state='c'\n elif nextchar in self.quotes:\n if not self.posix:\n self.token=nextchar\n self.state=nextchar\n elif self.whitespace_split:\n self.token=nextchar\n self.state='a'\n else :\n self.token=nextchar\n if self.token or (self.posix and quoted):\n break\n else :\n continue\n elif self.state in self.quotes:\n quoted=True\n if not nextchar:\n if self.debug >=2:\n print(\"shlex: I see EOF in quotes state\")\n \n raise ValueError(\"No closing quotation\")\n if nextchar ==self.state:\n if not self.posix:\n self.token +=nextchar\n self.state=' '\n break\n else :\n self.state='a'\n elif (self.posix and nextchar in self.escape and self.state\n in self.escapedquotes):\n escapedstate=self.state\n self.state=nextchar\n else :\n self.token +=nextchar\n elif self.state in self.escape:\n if not nextchar:\n if self.debug >=2:\n print(\"shlex: I see EOF in escape state\")\n \n raise ValueError(\"No escaped character\")\n \n \n if (escapedstate in self.quotes and\n nextchar !=self.state and nextchar !=escapedstate):\n self.token +=self.state\n self.token +=nextchar\n self.state=escapedstate\n elif self.state in ('a','c'):\n if not nextchar:\n self.state=None\n break\n elif nextchar in self.whitespace:\n if self.debug >=2:\n print(\"shlex: I see whitespace in word state\")\n self.state=' '\n if self.token or (self.posix and quoted):\n break\n else :\n continue\n elif nextchar in self.commenters:\n self.instream.readline()\n self.lineno +=1\n if self.posix:\n self.state=' '\n if self.token or (self.posix and quoted):\n break\n else :\n continue\n elif self.state =='c':\n if nextchar in self.punctuation_chars:\n self.token +=nextchar\n else :\n if nextchar not in self.whitespace:\n self._pushback_chars.append(nextchar)\n self.state=' '\n break\n elif self.posix and nextchar in self.quotes:\n self.state=nextchar\n elif self.posix and nextchar in self.escape:\n escapedstate='a'\n self.state=nextchar\n elif (nextchar in self.wordchars or nextchar in self.quotes\n or (self.whitespace_split and\n nextchar not in self.punctuation_chars)):\n self.token +=nextchar\n else :\n if self.punctuation_chars:\n self._pushback_chars.append(nextchar)\n else :\n self.pushback.appendleft(nextchar)\n if self.debug >=2:\n print(\"shlex: I see punctuation in word state\")\n self.state=' '\n if self.token or (self.posix and quoted):\n break\n else :\n continue\n result=self.token\n self.token=''\n if self.posix and not quoted and result =='':\n result=None\n if self.debug >1:\n if result:\n print(\"shlex: raw token=\"+repr(result))\n else :\n print(\"shlex: raw token=EOF\")\n return result\n \n def sourcehook(self,newfile):\n ''\n if newfile[0]=='\"':\n newfile=newfile[1:-1]\n \n if isinstance(self.infile,str)and not os.path.isabs(newfile):\n newfile=os.path.join(os.path.dirname(self.infile),newfile)\n return (newfile,open(newfile,\"r\"))\n \n def error_leader(self,infile=None ,lineno=None ):\n ''\n if infile is None :\n infile=self.infile\n if lineno is None :\n lineno=self.lineno\n return \"\\\"%s\\\", line %d: \"%(infile,lineno)\n \n def __iter__(self):\n return self\n \n def __next__(self):\n token=self.get_token()\n if token ==self.eof:\n raise StopIteration\n return token\n \ndef split(s,comments=False ,posix=True ):\n ''\n if s is None :\n raise ValueError(\"s argument must not be None\")\n lex=shlex(s,posix=posix)\n lex.whitespace_split=True\n if not comments:\n lex.commenters=''\n return list(lex)\n \n \ndef join(split_command):\n ''\n return ' '.join(quote(arg)for arg in split_command)\n \n \n_find_unsafe=re.compile(r'[^\\w@%+=:,./-]',re.ASCII).search\n\ndef quote(s):\n ''\n if not s:\n return \"''\"\n if _find_unsafe(s)is None :\n return s\n \n \n \n return \"'\"+s.replace(\"'\",\"'\\\"'\\\"'\")+\"'\"\n \n \ndef _print_tokens(lexer):\n while tt :=lexer.get_token():\n print(\"Token: \"+repr(tt))\n \nif __name__ =='__main__':\n if len(sys.argv)==1:\n _print_tokens(shlex())\n else :\n fn=sys.argv[1]\n with open(fn)as f:\n _print_tokens(shlex(f,fn))\n", ["collections", "io", "os", "re", "sys"]], "shutil": [".py", "''\n\n\n\n\n\nimport os\nimport sys\nimport stat\nimport fnmatch\nimport collections\nimport errno\n\ntry :\n import zlib\n del zlib\n _ZLIB_SUPPORTED=True\nexcept ImportError:\n _ZLIB_SUPPORTED=False\n \ntry :\n import bz2\n del bz2\n _BZ2_SUPPORTED=True\nexcept ImportError:\n _BZ2_SUPPORTED=False\n \ntry :\n import lzma\n del lzma\n _LZMA_SUPPORTED=True\nexcept ImportError:\n _LZMA_SUPPORTED=False\n \n_WINDOWS=os.name =='nt'\nposix=nt=None\nif os.name =='posix':\n import posix\nelif _WINDOWS:\n import nt\n \nCOPY_BUFSIZE=1024 *1024 if _WINDOWS else 64 *1024\n_USE_CP_SENDFILE=hasattr(os,\"sendfile\")and sys.platform.startswith(\"linux\")\n_HAS_FCOPYFILE=posix and hasattr(posix,\"_fcopyfile\")\n\n\n_WIN_DEFAULT_PATHEXT=\".COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC\"\n\n__all__=[\"copyfileobj\",\"copyfile\",\"copymode\",\"copystat\",\"copy\",\"copy2\",\n\"copytree\",\"move\",\"rmtree\",\"Error\",\"SpecialFileError\",\n\"ExecError\",\"make_archive\",\"get_archive_formats\",\n\"register_archive_format\",\"unregister_archive_format\",\n\"get_unpack_formats\",\"register_unpack_format\",\n\"unregister_unpack_format\",\"unpack_archive\",\n\"ignore_patterns\",\"chown\",\"which\",\"get_terminal_size\",\n\"SameFileError\"]\n\n\nclass Error(OSError):\n pass\n \nclass SameFileError(Error):\n ''\n \nclass SpecialFileError(OSError):\n ''\n \n \nclass ExecError(OSError):\n ''\n \nclass ReadError(OSError):\n ''\n \nclass RegistryError(Exception):\n ''\n \n \nclass _GiveupOnFastCopy(Exception):\n ''\n\n \n \ndef _fastcopy_fcopyfile(fsrc,fdst,flags):\n ''\n\n \n try :\n infd=fsrc.fileno()\n outfd=fdst.fileno()\n except Exception as err:\n raise _GiveupOnFastCopy(err)\n \n try :\n posix._fcopyfile(infd,outfd,flags)\n except OSError as err:\n err.filename=fsrc.name\n err.filename2=fdst.name\n if err.errno in {errno.EINVAL,errno.ENOTSUP}:\n raise _GiveupOnFastCopy(err)\n else :\n raise err from None\n \ndef _fastcopy_sendfile(fsrc,fdst):\n ''\n\n\n \n \n \n \n \n \n \n \n \n \n global _USE_CP_SENDFILE\n try :\n infd=fsrc.fileno()\n outfd=fdst.fileno()\n except Exception as err:\n raise _GiveupOnFastCopy(err)\n \n \n \n \n \n \n try :\n blocksize=max(os.fstat(infd).st_size,2 **23)\n except OSError:\n blocksize=2 **27\n \n \n if sys.maxsize <2 **32:\n blocksize=min(blocksize,2 **30)\n \n offset=0\n while True :\n try :\n sent=os.sendfile(outfd,infd,offset,blocksize)\n except OSError as err:\n \n err.filename=fsrc.name\n err.filename2=fdst.name\n \n if err.errno ==errno.ENOTSOCK:\n \n \n \n _USE_CP_SENDFILE=False\n raise _GiveupOnFastCopy(err)\n \n if err.errno ==errno.ENOSPC:\n raise err from None\n \n \n if offset ==0 and os.lseek(outfd,0,os.SEEK_CUR)==0:\n raise _GiveupOnFastCopy(err)\n \n raise err\n else :\n if sent ==0:\n break\n offset +=sent\n \ndef _copyfileobj_readinto(fsrc,fdst,length=COPY_BUFSIZE):\n ''\n\n\n \n \n fsrc_readinto=fsrc.readinto\n fdst_write=fdst.write\n with memoryview(bytearray(length))as mv:\n while True :\n n=fsrc_readinto(mv)\n if not n:\n break\n elif n 0:\n _copyfileobj_readinto(fsrc,fdst,min(file_size,COPY_BUFSIZE))\n return dst\n \n copyfileobj(fsrc,fdst)\n \n \n except IsADirectoryError as e:\n if os.path.exists(dst):\n raise\n else :\n raise FileNotFoundError(f'Directory does not exist: {dst}')from e\n \n return dst\n \ndef copymode(src,dst,*,follow_symlinks=True ):\n ''\n\n\n\n\n\n \n sys.audit(\"shutil.copymode\",src,dst)\n \n if not follow_symlinks and _islink(src)and os.path.islink(dst):\n if hasattr(os,'lchmod'):\n stat_func,chmod_func=os.lstat,os.lchmod\n else :\n return\n else :\n stat_func,chmod_func=_stat,os.chmod\n \n st=stat_func(src)\n chmod_func(dst,stat.S_IMODE(st.st_mode))\n \nif hasattr(os,'listxattr'):\n def _copyxattr(src,dst,*,follow_symlinks=True ):\n ''\n\n\n\n\n\n \n \n try :\n names=os.listxattr(src,follow_symlinks=follow_symlinks)\n except OSError as e:\n if e.errno not in (errno.ENOTSUP,errno.ENODATA,errno.EINVAL):\n raise\n return\n for name in names:\n try :\n value=os.getxattr(src,name,follow_symlinks=follow_symlinks)\n os.setxattr(dst,name,value,follow_symlinks=follow_symlinks)\n except OSError as e:\n if e.errno not in (errno.EPERM,errno.ENOTSUP,errno.ENODATA,\n errno.EINVAL):\n raise\nelse :\n def _copyxattr(*args,**kwargs):\n pass\n \ndef copystat(src,dst,*,follow_symlinks=True ):\n ''\n\n\n\n\n\n\n\n\n\n \n sys.audit(\"shutil.copystat\",src,dst)\n \n def _nop(*args,ns=None ,follow_symlinks=None ):\n pass\n \n \n follow=follow_symlinks or not (_islink(src)and os.path.islink(dst))\n if follow:\n \n def lookup(name):\n return getattr(os,name,_nop)\n else :\n \n \n def lookup(name):\n fn=getattr(os,name,_nop)\n if fn in os.supports_follow_symlinks:\n return fn\n return _nop\n \n if isinstance(src,os.DirEntry):\n st=src.stat(follow_symlinks=follow)\n else :\n st=lookup(\"stat\")(src,follow_symlinks=follow)\n mode=stat.S_IMODE(st.st_mode)\n lookup(\"utime\")(dst,ns=(st.st_atime_ns,st.st_mtime_ns),\n follow_symlinks=follow)\n \n \n _copyxattr(src,dst,follow_symlinks=follow)\n try :\n lookup(\"chmod\")(dst,mode,follow_symlinks=follow)\n except NotImplementedError:\n \n \n \n \n \n \n \n \n \n \n pass\n if hasattr(st,'st_flags'):\n try :\n lookup(\"chflags\")(dst,st.st_flags,follow_symlinks=follow)\n except OSError as why:\n for err in 'EOPNOTSUPP','ENOTSUP':\n if hasattr(errno,err)and why.errno ==getattr(errno,err):\n break\n else :\n raise\n \ndef copy(src,dst,*,follow_symlinks=True ):\n ''\n\n\n\n\n\n\n\n\n\n \n if os.path.isdir(dst):\n dst=os.path.join(dst,os.path.basename(src))\n copyfile(src,dst,follow_symlinks=follow_symlinks)\n copymode(src,dst,follow_symlinks=follow_symlinks)\n return dst\n \ndef copy2(src,dst,*,follow_symlinks=True ):\n ''\n\n\n\n\n\n\n\n\n \n if os.path.isdir(dst):\n dst=os.path.join(dst,os.path.basename(src))\n copyfile(src,dst,follow_symlinks=follow_symlinks)\n copystat(src,dst,follow_symlinks=follow_symlinks)\n return dst\n \ndef ignore_patterns(*patterns):\n ''\n\n\n \n def _ignore_patterns(path,names):\n ignored_names=[]\n for pattern in patterns:\n ignored_names.extend(fnmatch.filter(names,pattern))\n return set(ignored_names)\n return _ignore_patterns\n \ndef _copytree(entries,src,dst,symlinks,ignore,copy_function,\nignore_dangling_symlinks,dirs_exist_ok=False ):\n if ignore is not None :\n ignored_names=ignore(os.fspath(src),[x.name for x in entries])\n else :\n ignored_names=set()\n \n os.makedirs(dst,exist_ok=dirs_exist_ok)\n errors=[]\n use_srcentry=copy_function is copy2 or copy_function is copy\n \n for srcentry in entries:\n if srcentry.name in ignored_names:\n continue\n srcname=os.path.join(src,srcentry.name)\n dstname=os.path.join(dst,srcentry.name)\n srcobj=srcentry if use_srcentry else srcname\n try :\n is_symlink=srcentry.is_symlink()\n if is_symlink and os.name =='nt':\n \n \n lstat=srcentry.stat(follow_symlinks=False )\n if lstat.st_reparse_tag ==stat.IO_REPARSE_TAG_MOUNT_POINT:\n is_symlink=False\n if is_symlink:\n linkto=os.readlink(srcname)\n if symlinks:\n \n \n \n os.symlink(linkto,dstname)\n copystat(srcobj,dstname,follow_symlinks=not symlinks)\n else :\n \n if not os.path.exists(linkto)and ignore_dangling_symlinks:\n continue\n \n if srcentry.is_dir():\n copytree(srcobj,dstname,symlinks,ignore,\n copy_function,dirs_exist_ok=dirs_exist_ok)\n else :\n copy_function(srcobj,dstname)\n elif srcentry.is_dir():\n copytree(srcobj,dstname,symlinks,ignore,copy_function,\n dirs_exist_ok=dirs_exist_ok)\n else :\n \n copy_function(srcobj,dstname)\n \n \n except Error as err:\n errors.extend(err.args[0])\n except OSError as why:\n errors.append((srcname,dstname,str(why)))\n try :\n copystat(src,dst)\n except OSError as why:\n \n if getattr(why,'winerror',None )is None :\n errors.append((src,dst,str(why)))\n if errors:\n raise Error(errors)\n return dst\n \ndef copytree(src,dst,symlinks=False ,ignore=None ,copy_function=copy2,\nignore_dangling_symlinks=False ,dirs_exist_ok=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n sys.audit(\"shutil.copytree\",src,dst)\n with os.scandir(src)as itr:\n entries=list(itr)\n return _copytree(entries=entries,src=src,dst=dst,symlinks=symlinks,\n ignore=ignore,copy_function=copy_function,\n ignore_dangling_symlinks=ignore_dangling_symlinks,\n dirs_exist_ok=dirs_exist_ok)\n \nif hasattr(os.stat_result,'st_file_attributes'):\n\n\n\n def _rmtree_isdir(entry):\n try :\n st=entry.stat(follow_symlinks=False )\n return (stat.S_ISDIR(st.st_mode)and not\n (st.st_file_attributes&stat.FILE_ATTRIBUTE_REPARSE_POINT\n and st.st_reparse_tag ==stat.IO_REPARSE_TAG_MOUNT_POINT))\n except OSError:\n return False\n \n def _rmtree_islink(path):\n try :\n st=os.lstat(path)\n return (stat.S_ISLNK(st.st_mode)or\n (st.st_file_attributes&stat.FILE_ATTRIBUTE_REPARSE_POINT\n and st.st_reparse_tag ==stat.IO_REPARSE_TAG_MOUNT_POINT))\n except OSError:\n return False\nelse :\n def _rmtree_isdir(entry):\n try :\n return entry.is_dir(follow_symlinks=False )\n except OSError:\n return False\n \n def _rmtree_islink(path):\n return os.path.islink(path)\n \n \ndef _rmtree_unsafe(path,onerror):\n try :\n with os.scandir(path)as scandir_it:\n entries=list(scandir_it)\n except OSError:\n onerror(os.scandir,path,sys.exc_info())\n entries=[]\n for entry in entries:\n fullname=entry.path\n if _rmtree_isdir(entry):\n try :\n if entry.is_symlink():\n \n \n \n raise OSError(\"Cannot call rmtree on a symbolic link\")\n except OSError:\n onerror(os.path.islink,fullname,sys.exc_info())\n continue\n _rmtree_unsafe(fullname,onerror)\n else :\n try :\n os.unlink(fullname)\n except OSError:\n onerror(os.unlink,fullname,sys.exc_info())\n try :\n os.rmdir(path)\n except OSError:\n onerror(os.rmdir,path,sys.exc_info())\n \n \ndef _rmtree_safe_fd(topfd,path,onerror):\n try :\n with os.scandir(topfd)as scandir_it:\n entries=list(scandir_it)\n except OSError as err:\n err.filename=path\n onerror(os.scandir,path,sys.exc_info())\n return\n for entry in entries:\n fullname=os.path.join(path,entry.name)\n try :\n is_dir=entry.is_dir(follow_symlinks=False )\n except OSError:\n is_dir=False\n else :\n if is_dir:\n try :\n orig_st=entry.stat(follow_symlinks=False )\n is_dir=stat.S_ISDIR(orig_st.st_mode)\n except OSError:\n onerror(os.lstat,fullname,sys.exc_info())\n continue\n if is_dir:\n try :\n dirfd=os.open(entry.name,os.O_RDONLY,dir_fd=topfd)\n except OSError:\n onerror(os.open,fullname,sys.exc_info())\n else :\n try :\n if os.path.samestat(orig_st,os.fstat(dirfd)):\n _rmtree_safe_fd(dirfd,fullname,onerror)\n try :\n os.rmdir(entry.name,dir_fd=topfd)\n except OSError:\n onerror(os.rmdir,fullname,sys.exc_info())\n else :\n try :\n \n \n \n raise OSError(\"Cannot call rmtree on a symbolic \"\n \"link\")\n except OSError:\n onerror(os.path.islink,fullname,sys.exc_info())\n finally :\n os.close(dirfd)\n else :\n try :\n os.unlink(entry.name,dir_fd=topfd)\n except OSError:\n onerror(os.unlink,fullname,sys.exc_info())\n \n_use_fd_functions=({os.open,os.stat,os.unlink,os.rmdir}<=\nos.supports_dir_fd and\nos.scandir in os.supports_fd and\nos.stat in os.supports_follow_symlinks)\n\ndef rmtree(path,ignore_errors=False ,onerror=None ):\n ''\n\n\n\n\n\n\n\n\n \n sys.audit(\"shutil.rmtree\",path)\n if ignore_errors:\n def onerror(*args):\n pass\n elif onerror is None :\n def onerror(*args):\n raise\n if _use_fd_functions:\n \n if isinstance(path,bytes):\n path=os.fsdecode(path)\n \n \n try :\n orig_st=os.lstat(path)\n except Exception:\n onerror(os.lstat,path,sys.exc_info())\n return\n try :\n fd=os.open(path,os.O_RDONLY)\n except Exception:\n onerror(os.open,path,sys.exc_info())\n return\n try :\n if os.path.samestat(orig_st,os.fstat(fd)):\n _rmtree_safe_fd(fd,path,onerror)\n try :\n os.rmdir(path)\n except OSError:\n onerror(os.rmdir,path,sys.exc_info())\n else :\n try :\n \n raise OSError(\"Cannot call rmtree on a symbolic link\")\n except OSError:\n onerror(os.path.islink,path,sys.exc_info())\n finally :\n os.close(fd)\n else :\n try :\n if _rmtree_islink(path):\n \n raise OSError(\"Cannot call rmtree on a symbolic link\")\n except OSError:\n onerror(os.path.islink,path,sys.exc_info())\n \n return\n return _rmtree_unsafe(path,onerror)\n \n \n \nrmtree.avoids_symlink_attacks=_use_fd_functions\n\ndef _basename(path):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n path=os.fspath(path)\n sep=os.path.sep+(os.path.altsep or '')\n return os.path.basename(path.rstrip(sep))\n \ndef move(src,dst,copy_function=copy2):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n sys.audit(\"shutil.move\",src,dst)\n real_dst=dst\n if os.path.isdir(dst):\n if _samefile(src,dst):\n \n \n os.rename(src,dst)\n return\n \n \n \n real_dst=os.path.join(dst,_basename(src))\n \n if os.path.exists(real_dst):\n raise Error(\"Destination path '%s' already exists\"%real_dst)\n try :\n os.rename(src,real_dst)\n except OSError:\n if os.path.islink(src):\n linkto=os.readlink(src)\n os.symlink(linkto,real_dst)\n os.unlink(src)\n elif os.path.isdir(src):\n if _destinsrc(src,dst):\n raise Error(\"Cannot move a directory '%s' into itself\"\n \" '%s'.\"%(src,dst))\n if (_is_immutable(src)\n or (not os.access(src,os.W_OK)and os.listdir(src)\n and sys.platform =='darwin')):\n raise PermissionError(\"Cannot move the non-empty directory \"\n \"'%s': Lacking write permission to '%s'.\"\n %(src,src))\n copytree(src,real_dst,copy_function=copy_function,\n symlinks=True )\n rmtree(src)\n else :\n copy_function(src,real_dst)\n os.unlink(src)\n return real_dst\n \ndef _destinsrc(src,dst):\n src=os.path.abspath(src)\n dst=os.path.abspath(dst)\n if not src.endswith(os.path.sep):\n src +=os.path.sep\n if not dst.endswith(os.path.sep):\n dst +=os.path.sep\n return dst.startswith(src)\n \ndef _is_immutable(src):\n st=_stat(src)\n immutable_states=[stat.UF_IMMUTABLE,stat.SF_IMMUTABLE]\n return hasattr(st,'st_flags')and st.st_flags in immutable_states\n \ndef _get_gid(name):\n ''\n if name is None :\n return None\n \n try :\n from grp import getgrnam\n except ImportError:\n return None\n \n try :\n result=getgrnam(name)\n except KeyError:\n result=None\n if result is not None :\n return result[2]\n return None\n \ndef _get_uid(name):\n ''\n if name is None :\n return None\n \n try :\n from pwd import getpwnam\n except ImportError:\n return None\n \n try :\n result=getpwnam(name)\n except KeyError:\n result=None\n if result is not None :\n return result[2]\n return None\n \ndef _make_tarball(base_name,base_dir,compress=\"gzip\",verbose=0,dry_run=0,\nowner=None ,group=None ,logger=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n if compress is None :\n tar_compression=''\n elif _ZLIB_SUPPORTED and compress =='gzip':\n tar_compression='gz'\n elif _BZ2_SUPPORTED and compress =='bzip2':\n tar_compression='bz2'\n elif _LZMA_SUPPORTED and compress =='xz':\n tar_compression='xz'\n else :\n raise ValueError(\"bad value for 'compress', or compression format not \"\n \"supported : {0}\".format(compress))\n \n import tarfile\n \n compress_ext='.'+tar_compression if compress else ''\n archive_name=base_name+'.tar'+compress_ext\n archive_dir=os.path.dirname(archive_name)\n \n if archive_dir and not os.path.exists(archive_dir):\n if logger is not None :\n logger.info(\"creating %s\",archive_dir)\n if not dry_run:\n os.makedirs(archive_dir)\n \n \n if logger is not None :\n logger.info('Creating tar archive')\n \n uid=_get_uid(owner)\n gid=_get_gid(group)\n \n def _set_uid_gid(tarinfo):\n if gid is not None :\n tarinfo.gid=gid\n tarinfo.gname=group\n if uid is not None :\n tarinfo.uid=uid\n tarinfo.uname=owner\n return tarinfo\n \n if not dry_run:\n tar=tarfile.open(archive_name,'w|%s'%tar_compression)\n try :\n tar.add(base_dir,filter=_set_uid_gid)\n finally :\n tar.close()\n \n return archive_name\n \ndef _make_zipfile(base_name,base_dir,verbose=0,dry_run=0,logger=None ):\n ''\n\n\n\n \n import zipfile\n \n zip_filename=base_name+\".zip\"\n archive_dir=os.path.dirname(base_name)\n \n if archive_dir and not os.path.exists(archive_dir):\n if logger is not None :\n logger.info(\"creating %s\",archive_dir)\n if not dry_run:\n os.makedirs(archive_dir)\n \n if logger is not None :\n logger.info(\"creating '%s' and adding '%s' to it\",\n zip_filename,base_dir)\n \n if not dry_run:\n with zipfile.ZipFile(zip_filename,\"w\",\n compression=zipfile.ZIP_DEFLATED)as zf:\n path=os.path.normpath(base_dir)\n if path !=os.curdir:\n zf.write(path,path)\n if logger is not None :\n logger.info(\"adding '%s'\",path)\n for dirpath,dirnames,filenames in os.walk(base_dir):\n for name in sorted(dirnames):\n path=os.path.normpath(os.path.join(dirpath,name))\n zf.write(path,path)\n if logger is not None :\n logger.info(\"adding '%s'\",path)\n for name in filenames:\n path=os.path.normpath(os.path.join(dirpath,name))\n if os.path.isfile(path):\n zf.write(path,path)\n if logger is not None :\n logger.info(\"adding '%s'\",path)\n \n return zip_filename\n \n_ARCHIVE_FORMATS={\n'tar':(_make_tarball,[('compress',None )],\"uncompressed tar file\"),\n}\n\nif _ZLIB_SUPPORTED:\n _ARCHIVE_FORMATS['gztar']=(_make_tarball,[('compress','gzip')],\n \"gzip'ed tar-file\")\n _ARCHIVE_FORMATS['zip']=(_make_zipfile,[],\"ZIP file\")\n \nif _BZ2_SUPPORTED:\n _ARCHIVE_FORMATS['bztar']=(_make_tarball,[('compress','bzip2')],\n \"bzip2'ed tar-file\")\n \nif _LZMA_SUPPORTED:\n _ARCHIVE_FORMATS['xztar']=(_make_tarball,[('compress','xz')],\n \"xz'ed tar-file\")\n \ndef get_archive_formats():\n ''\n\n\n \n formats=[(name,registry[2])for name,registry in\n _ARCHIVE_FORMATS.items()]\n formats.sort()\n return formats\n \ndef register_archive_format(name,function,extra_args=None ,description=''):\n ''\n\n\n\n\n\n\n \n if extra_args is None :\n extra_args=[]\n if not callable(function):\n raise TypeError('The %s object is not callable'%function)\n if not isinstance(extra_args,(tuple,list)):\n raise TypeError('extra_args needs to be a sequence')\n for element in extra_args:\n if not isinstance(element,(tuple,list))or len(element)!=2:\n raise TypeError('extra_args elements are : (arg_name, value)')\n \n _ARCHIVE_FORMATS[name]=(function,extra_args,description)\n \ndef unregister_archive_format(name):\n del _ARCHIVE_FORMATS[name]\n \ndef make_archive(base_name,format,root_dir=None ,base_dir=None ,verbose=0,\ndry_run=0,owner=None ,group=None ,logger=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n sys.audit(\"shutil.make_archive\",base_name,format,root_dir,base_dir)\n save_cwd=os.getcwd()\n if root_dir is not None :\n if logger is not None :\n logger.debug(\"changing into '%s'\",root_dir)\n base_name=os.path.abspath(base_name)\n if not dry_run:\n os.chdir(root_dir)\n \n if base_dir is None :\n base_dir=os.curdir\n \n kwargs={'dry_run':dry_run,'logger':logger}\n \n try :\n format_info=_ARCHIVE_FORMATS[format]\n except KeyError:\n raise ValueError(\"unknown archive format '%s'\"%format)from None\n \n func=format_info[0]\n for arg,val in format_info[1]:\n kwargs[arg]=val\n \n if format !='zip':\n kwargs['owner']=owner\n kwargs['group']=group\n \n try :\n filename=func(base_name,base_dir,**kwargs)\n finally :\n if root_dir is not None :\n if logger is not None :\n logger.debug(\"changing back to '%s'\",save_cwd)\n os.chdir(save_cwd)\n \n return filename\n \n \ndef get_unpack_formats():\n ''\n\n\n\n \n formats=[(name,info[0],info[3])for name,info in\n _UNPACK_FORMATS.items()]\n formats.sort()\n return formats\n \ndef _check_unpack_options(extensions,function,extra_args):\n ''\n \n existing_extensions={}\n for name,info in _UNPACK_FORMATS.items():\n for ext in info[0]:\n existing_extensions[ext]=name\n \n for extension in extensions:\n if extension in existing_extensions:\n msg='%s is already registered for \"%s\"'\n raise RegistryError(msg %(extension,\n existing_extensions[extension]))\n \n if not callable(function):\n raise TypeError('The registered function must be a callable')\n \n \ndef register_unpack_format(name,extensions,function,extra_args=None ,\ndescription=''):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if extra_args is None :\n extra_args=[]\n _check_unpack_options(extensions,function,extra_args)\n _UNPACK_FORMATS[name]=extensions,function,extra_args,description\n \ndef unregister_unpack_format(name):\n ''\n del _UNPACK_FORMATS[name]\n \ndef _ensure_directory(path):\n ''\n dirname=os.path.dirname(path)\n if not os.path.isdir(dirname):\n os.makedirs(dirname)\n \ndef _unpack_zipfile(filename,extract_dir):\n ''\n \n import zipfile\n \n if not zipfile.is_zipfile(filename):\n raise ReadError(\"%s is not a zip file\"%filename)\n \n zip=zipfile.ZipFile(filename)\n try :\n for info in zip.infolist():\n name=info.filename\n \n \n if name.startswith('/')or '..'in name:\n continue\n \n targetpath=os.path.join(extract_dir,*name.split('/'))\n if not targetpath:\n continue\n \n _ensure_directory(targetpath)\n if not name.endswith('/'):\n \n with zip.open(name,'r')as source,\\\n open(targetpath,'wb')as target:\n copyfileobj(source,target)\n finally :\n zip.close()\n \ndef _unpack_tarfile(filename,extract_dir):\n ''\n \n import tarfile\n try :\n tarobj=tarfile.open(filename)\n except tarfile.TarError:\n raise ReadError(\n \"%s is not a compressed or uncompressed tar file\"%filename)\n try :\n tarobj.extractall(extract_dir)\n finally :\n tarobj.close()\n \n_UNPACK_FORMATS={\n'tar':(['.tar'],_unpack_tarfile,[],\"uncompressed tar file\"),\n'zip':(['.zip'],_unpack_zipfile,[],\"ZIP file\"),\n}\n\nif _ZLIB_SUPPORTED:\n _UNPACK_FORMATS['gztar']=(['.tar.gz','.tgz'],_unpack_tarfile,[],\n \"gzip'ed tar-file\")\n \nif _BZ2_SUPPORTED:\n _UNPACK_FORMATS['bztar']=(['.tar.bz2','.tbz2'],_unpack_tarfile,[],\n \"bzip2'ed tar-file\")\n \nif _LZMA_SUPPORTED:\n _UNPACK_FORMATS['xztar']=(['.tar.xz','.txz'],_unpack_tarfile,[],\n \"xz'ed tar-file\")\n \ndef _find_unpack_format(filename):\n for name,info in _UNPACK_FORMATS.items():\n for extension in info[0]:\n if filename.endswith(extension):\n return name\n return None\n \ndef unpack_archive(filename,extract_dir=None ,format=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n sys.audit(\"shutil.unpack_archive\",filename,extract_dir,format)\n \n if extract_dir is None :\n extract_dir=os.getcwd()\n \n extract_dir=os.fspath(extract_dir)\n filename=os.fspath(filename)\n \n if format is not None :\n try :\n format_info=_UNPACK_FORMATS[format]\n except KeyError:\n raise ValueError(\"Unknown unpack format '{0}'\".format(format))from None\n \n func=format_info[1]\n func(filename,extract_dir,**dict(format_info[2]))\n else :\n \n format=_find_unpack_format(filename)\n if format is None :\n raise ReadError(\"Unknown archive format '{0}'\".format(filename))\n \n func=_UNPACK_FORMATS[format][1]\n kwargs=dict(_UNPACK_FORMATS[format][2])\n func(filename,extract_dir,**kwargs)\n \n \nif hasattr(os,'statvfs'):\n\n __all__.append('disk_usage')\n _ntuple_diskusage=collections.namedtuple('usage','total used free')\n _ntuple_diskusage.total.__doc__='Total space in bytes'\n _ntuple_diskusage.used.__doc__='Used space in bytes'\n _ntuple_diskusage.free.__doc__='Free space in bytes'\n \n def disk_usage(path):\n ''\n\n\n\n \n st=os.statvfs(path)\n free=st.f_bavail *st.f_frsize\n total=st.f_blocks *st.f_frsize\n used=(st.f_blocks -st.f_bfree)*st.f_frsize\n return _ntuple_diskusage(total,used,free)\n \nelif _WINDOWS:\n\n __all__.append('disk_usage')\n _ntuple_diskusage=collections.namedtuple('usage','total used free')\n \n def disk_usage(path):\n ''\n\n\n\n \n total,free=nt._getdiskusage(path)\n used=total -free\n return _ntuple_diskusage(total,used,free)\n \n \ndef chown(path,user=None ,group=None ):\n ''\n\n\n\n \n sys.audit('shutil.chown',path,user,group)\n \n if user is None and group is None :\n raise ValueError(\"user and/or group must be set\")\n \n _user=user\n _group=group\n \n \n if user is None :\n _user=-1\n \n elif isinstance(user,str):\n _user=_get_uid(user)\n if _user is None :\n raise LookupError(\"no such user: {!r}\".format(user))\n \n if group is None :\n _group=-1\n elif not isinstance(group,int):\n _group=_get_gid(group)\n if _group is None :\n raise LookupError(\"no such group: {!r}\".format(group))\n \n os.chown(path,_user,_group)\n \ndef get_terminal_size(fallback=(80,24)):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n try :\n columns=int(os.environ['COLUMNS'])\n except (KeyError,ValueError):\n columns=0\n \n try :\n lines=int(os.environ['LINES'])\n except (KeyError,ValueError):\n lines=0\n \n \n if columns <=0 or lines <=0:\n try :\n size=os.get_terminal_size(sys.__stdout__.fileno())\n except (AttributeError,ValueError,OSError):\n \n \n size=os.terminal_size(fallback)\n if columns <=0:\n columns=size.columns\n if lines <=0:\n lines=size.lines\n \n return os.terminal_size((columns,lines))\n \n \n \n \n \ndef _access_check(fn,mode):\n return (os.path.exists(fn)and os.access(fn,mode)\n and not os.path.isdir(fn))\n \n \ndef which(cmd,mode=os.F_OK |os.X_OK,path=None ):\n ''\n\n\n\n\n\n\n\n \n \n \n \n if os.path.dirname(cmd):\n if _access_check(cmd,mode):\n return cmd\n return None\n \n use_bytes=isinstance(cmd,bytes)\n \n if path is None :\n path=os.environ.get(\"PATH\",None )\n if path is None :\n try :\n path=os.confstr(\"CS_PATH\")\n except (AttributeError,ValueError):\n \n path=os.defpath\n \n \n \n \n if not path:\n return None\n \n if use_bytes:\n path=os.fsencode(path)\n path=path.split(os.fsencode(os.pathsep))\n else :\n path=os.fsdecode(path)\n path=path.split(os.pathsep)\n \n if sys.platform ==\"win32\":\n \n curdir=os.curdir\n if use_bytes:\n curdir=os.fsencode(curdir)\n if curdir not in path:\n path.insert(0,curdir)\n \n \n pathext_source=os.getenv(\"PATHEXT\")or _WIN_DEFAULT_PATHEXT\n pathext=[ext for ext in pathext_source.split(os.pathsep)if ext]\n \n if use_bytes:\n pathext=[os.fsencode(ext)for ext in pathext]\n \n \n \n \n if any(cmd.lower().endswith(ext.lower())for ext in pathext):\n files=[cmd]\n else :\n files=[cmd+ext for ext in pathext]\n else :\n \n \n files=[cmd]\n \n seen=set()\n for dir in path:\n normdir=os.path.normcase(dir)\n if not normdir in seen:\n seen.add(normdir)\n for thefile in files:\n name=os.path.join(dir,thefile)\n if _access_check(name,mode):\n return name\n return None\n", ["bz2", "collections", "errno", "fnmatch", "grp", "lzma", "nt", "os", "posix", "pwd", "stat", "sys", "tarfile", "zipfile", "zlib"]], "signal": [".py", "import _signal\nfrom _signal import *\nfrom enum import IntEnum as _IntEnum\n\n_globals=globals()\n\n_IntEnum._convert_(\n'Signals',__name__,\nlambda name:\nname.isupper()\nand (name.startswith('SIG')and not name.startswith('SIG_'))\nor name.startswith('CTRL_'))\n\n_IntEnum._convert_(\n'Handlers',__name__,\nlambda name:name in ('SIG_DFL','SIG_IGN'))\n\nif 'pthread_sigmask'in _globals:\n _IntEnum._convert_(\n 'Sigmasks',__name__,\n lambda name:name in ('SIG_BLOCK','SIG_UNBLOCK','SIG_SETMASK'))\n \n \ndef _int_to_enum(value,enum_klass):\n ''\n\n \n try :\n return enum_klass(value)\n except ValueError:\n return value\n \n \ndef _enum_to_int(value):\n ''\n\n \n try :\n return int(value)\n except (ValueError,TypeError):\n return value\n \n \n \n \n \n \ndef _wraps(wrapped):\n def decorator(wrapper):\n wrapper.__doc__=wrapped.__doc__\n return wrapper\n return decorator\n \n@_wraps(_signal.signal)\ndef signal(signalnum,handler):\n handler=_signal.signal(_enum_to_int(signalnum),_enum_to_int(handler))\n return _int_to_enum(handler,Handlers)\n \n \n@_wraps(_signal.getsignal)\ndef getsignal(signalnum):\n handler=_signal.getsignal(signalnum)\n return _int_to_enum(handler,Handlers)\n \n \nif 'pthread_sigmask'in _globals:\n @_wraps(_signal.pthread_sigmask)\n def pthread_sigmask(how,mask):\n sigs_set=_signal.pthread_sigmask(how,mask)\n return set(_int_to_enum(x,Signals)for x in sigs_set)\n \n \nif 'sigpending'in _globals:\n @_wraps(_signal.sigpending)\n def sigpending():\n return {_int_to_enum(x,Signals)for x in _signal.sigpending()}\n \n \nif 'sigwait'in _globals:\n @_wraps(_signal.sigwait)\n def sigwait(sigset):\n retsig=_signal.sigwait(sigset)\n return _int_to_enum(retsig,Signals)\n \n \nif 'valid_signals'in _globals:\n @_wraps(_signal.valid_signals)\n def valid_signals():\n return {_int_to_enum(x,Signals)for x in _signal.valid_signals()}\n \n \ndel _globals,_wraps\n", ["_signal", "enum"]], "site": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport sys\nimport os\nimport builtins\nimport _sitebuiltins\nimport io\n\n\nPREFIXES=[sys.prefix,sys.exec_prefix]\n\n\nENABLE_USER_SITE=None\n\n\n\n\nUSER_SITE=None\nUSER_BASE=None\n\n\ndef _trace(message):\n if sys.flags.verbose:\n print(message,file=sys.stderr)\n \n \ndef makepath(*paths):\n dir=os.path.join(*paths)\n try :\n dir=os.path.abspath(dir)\n except OSError:\n pass\n return dir,os.path.normcase(dir)\n \n \ndef abs_paths():\n ''\n for m in set(sys.modules.values()):\n loader_module=None\n try :\n loader_module=m.__loader__.__module__\n except AttributeError:\n try :\n loader_module=m.__spec__.loader.__module__\n except AttributeError:\n pass\n if loader_module not in {'_frozen_importlib','_frozen_importlib_external'}:\n continue\n try :\n m.__file__=os.path.abspath(m.__file__)\n except (AttributeError,OSError,TypeError):\n pass\n try :\n m.__cached__=os.path.abspath(m.__cached__)\n except (AttributeError,OSError,TypeError):\n pass\n \n \ndef removeduppaths():\n ''\n \n \n \n L=[]\n known_paths=set()\n for dir in sys.path:\n \n \n \n dir,dircase=makepath(dir)\n if dircase not in known_paths:\n L.append(dir)\n known_paths.add(dircase)\n sys.path[:]=L\n return known_paths\n \n \ndef _init_pathinfo():\n ''\n d=set()\n for item in sys.path:\n try :\n if os.path.exists(item):\n _,itemcase=makepath(item)\n d.add(itemcase)\n except TypeError:\n continue\n return d\n \n \ndef addpackage(sitedir,name,known_paths):\n ''\n\n\n \n if known_paths is None :\n known_paths=_init_pathinfo()\n reset=True\n else :\n reset=False\n fullname=os.path.join(sitedir,name)\n _trace(f\"Processing .pth file: {fullname !r}\")\n try :\n \n \n f=io.TextIOWrapper(io.open_code(fullname),encoding=\"locale\")\n except OSError:\n return\n with f:\n for n,line in enumerate(f):\n if line.startswith(\"#\"):\n continue\n if line.strip()==\"\":\n continue\n try :\n if line.startswith((\"import \",\"import\\t\")):\n exec(line)\n continue\n line=line.rstrip()\n dir,dircase=makepath(sitedir,line)\n if not dircase in known_paths and os.path.exists(dir):\n sys.path.append(dir)\n known_paths.add(dircase)\n except Exception as exc:\n print(\"Error processing line {:d} of {}:\\n\".format(n+1,fullname),\n file=sys.stderr)\n import traceback\n for record in traceback.format_exception(exc):\n for line in record.splitlines():\n print(' '+line,file=sys.stderr)\n print(\"\\nRemainder of file ignored\",file=sys.stderr)\n break\n if reset:\n known_paths=None\n return known_paths\n \n \ndef addsitedir(sitedir,known_paths=None ):\n ''\n \n _trace(f\"Adding directory: {sitedir !r}\")\n if known_paths is None :\n known_paths=_init_pathinfo()\n reset=True\n else :\n reset=False\n sitedir,sitedircase=makepath(sitedir)\n if not sitedircase in known_paths:\n sys.path.append(sitedir)\n known_paths.add(sitedircase)\n try :\n names=os.listdir(sitedir)\n except OSError:\n return\n names=[name for name in names if name.endswith(\".pth\")]\n for name in sorted(names):\n addpackage(sitedir,name,known_paths)\n if reset:\n known_paths=None\n return known_paths\n \n \ndef check_enableusersite():\n ''\n\n\n\n\n\n\n\n \n if sys.flags.no_user_site:\n return False\n \n if hasattr(os,\"getuid\")and hasattr(os,\"geteuid\"):\n \n if os.geteuid()!=os.getuid():\n return None\n if hasattr(os,\"getgid\")and hasattr(os,\"getegid\"):\n \n if os.getegid()!=os.getgid():\n return None\n \n return True\n \n \n \n \n \n \n \n \n \ndef _getuserbase():\n env_base=os.environ.get(\"PYTHONUSERBASE\",None )\n if env_base:\n return env_base\n \n \n if sys.platform in {\"emscripten\",\"vxworks\",\"wasi\"}:\n return None\n \n def joinuser(*args):\n return os.path.expanduser(os.path.join(*args))\n \n if os.name ==\"nt\":\n base=os.environ.get(\"APPDATA\")or \"~\"\n return joinuser(base,\"Python\")\n \n if sys.platform ==\"darwin\"and sys._framework:\n return joinuser(\"~\",\"Library\",sys._framework,\n \"%d.%d\"%sys.version_info[:2])\n \n return joinuser(\"~\",\".local\")\n \n \n \ndef _get_path(userbase):\n version=sys.version_info\n \n if os.name =='nt':\n ver_nodot=sys.winver.replace('.','')\n return f'{userbase}\\\\Python{ver_nodot}\\\\site-packages'\n \n if sys.platform =='darwin'and sys._framework:\n return f'{userbase}/lib/python/site-packages'\n \n return f'{userbase}/lib/python{version[0]}.{version[1]}/site-packages'\n \n \ndef getuserbase():\n ''\n\n\n\n\n \n global USER_BASE\n if USER_BASE is None :\n USER_BASE=_getuserbase()\n return USER_BASE\n \n \ndef getusersitepackages():\n ''\n\n\n\n \n global USER_SITE,ENABLE_USER_SITE\n userbase=getuserbase()\n \n if USER_SITE is None :\n if userbase is None :\n ENABLE_USER_SITE=False\n else :\n USER_SITE=_get_path(userbase)\n \n return USER_SITE\n \ndef addusersitepackages(known_paths):\n ''\n\n\n\n \n \n \n _trace(\"Processing user site-packages\")\n user_site=getusersitepackages()\n \n if ENABLE_USER_SITE and os.path.isdir(user_site):\n addsitedir(user_site,known_paths)\n return known_paths\n \ndef getsitepackages(prefixes=None ):\n ''\n\n\n\n\n \n sitepackages=[]\n seen=set()\n \n if prefixes is None :\n prefixes=PREFIXES\n \n for prefix in prefixes:\n if not prefix or prefix in seen:\n continue\n seen.add(prefix)\n \n if os.sep =='/':\n libdirs=[sys.platlibdir]\n if sys.platlibdir !=\"lib\":\n libdirs.append(\"lib\")\n \n for libdir in libdirs:\n path=os.path.join(prefix,libdir,\n \"python%d.%d\"%sys.version_info[:2],\n \"site-packages\")\n sitepackages.append(path)\n else :\n sitepackages.append(prefix)\n sitepackages.append(os.path.join(prefix,\"Lib\",\"site-packages\"))\n return sitepackages\n \ndef addsitepackages(known_paths,prefixes=None ):\n ''\n _trace(\"Processing global site-packages\")\n for sitedir in getsitepackages(prefixes):\n if os.path.isdir(sitedir):\n addsitedir(sitedir,known_paths)\n \n return known_paths\n \ndef setquit():\n ''\n\n\n\n\n \n if os.sep =='\\\\':\n eof='Ctrl-Z plus Return'\n else :\n eof='Ctrl-D (i.e. EOF)'\n \n builtins.quit=_sitebuiltins.Quitter('quit',eof)\n builtins.exit=_sitebuiltins.Quitter('exit',eof)\n \n \ndef setcopyright():\n ''\n builtins.copyright=_sitebuiltins._Printer(\"copyright\",sys.copyright)\n builtins.credits=_sitebuiltins._Printer(\"credits\",\"\"\"\\\n Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands\n for supporting Python development. See www.python.org for more information.\"\"\")\n files,dirs=[],[]\n \n \n here=getattr(sys,'_stdlib_dir',None )\n if not here and hasattr(os,'__file__'):\n here=os.path.dirname(os.__file__)\n if here:\n files.extend([\"LICENSE.txt\",\"LICENSE\"])\n dirs.extend([os.path.join(here,os.pardir),here,os.curdir])\n builtins.license=_sitebuiltins._Printer(\n \"license\",\n \"See https://www.python.org/psf/license/\",\n files,dirs)\n \n \ndef sethelper():\n builtins.help=_sitebuiltins._Helper()\n \ndef enablerlcompleter():\n ''\n\n\n\n\n\n\n \n def register_readline():\n import atexit\n try :\n import readline\n import rlcompleter\n except ImportError:\n return\n \n \n \n readline_doc=getattr(readline,'__doc__','')\n if readline_doc is not None and 'libedit'in readline_doc:\n readline.parse_and_bind('bind ^I rl_complete')\n else :\n readline.parse_and_bind('tab: complete')\n \n try :\n readline.read_init_file()\n except OSError:\n \n \n \n \n pass\n \n if readline.get_current_history_length()==0:\n \n \n \n \n \n history=os.path.join(os.path.expanduser('~'),\n '.python_history')\n try :\n readline.read_history_file(history)\n except OSError:\n pass\n \n def write_history():\n try :\n readline.write_history_file(history)\n except OSError:\n \n \n pass\n \n atexit.register(write_history)\n \n sys.__interactivehook__=register_readline\n \ndef venv(known_paths):\n global PREFIXES,ENABLE_USER_SITE\n \n env=os.environ\n if sys.platform =='darwin'and '__PYVENV_LAUNCHER__'in env:\n executable=sys._base_executable=os.environ['__PYVENV_LAUNCHER__']\n else :\n executable=sys.executable\n exe_dir=os.path.dirname(os.path.abspath(executable))\n site_prefix=os.path.dirname(exe_dir)\n sys._home=None\n conf_basename='pyvenv.cfg'\n candidate_conf=next(\n (\n conffile for conffile in (\n os.path.join(exe_dir,conf_basename),\n os.path.join(site_prefix,conf_basename)\n )\n if os.path.isfile(conffile)\n ),\n None\n )\n \n if candidate_conf:\n virtual_conf=candidate_conf\n system_site=\"true\"\n \n \n with open(virtual_conf,encoding='utf-8')as f:\n for line in f:\n if '='in line:\n key,_,value=line.partition('=')\n key=key.strip().lower()\n value=value.strip()\n if key =='include-system-site-packages':\n system_site=value.lower()\n elif key =='home':\n sys._home=value\n \n sys.prefix=sys.exec_prefix=site_prefix\n \n \n addsitepackages(known_paths,[sys.prefix])\n \n \n \n if system_site ==\"true\":\n PREFIXES.insert(0,sys.prefix)\n else :\n PREFIXES=[sys.prefix]\n ENABLE_USER_SITE=False\n \n return known_paths\n \n \ndef execsitecustomize():\n ''\n try :\n try :\n import sitecustomize\n except ImportError as exc:\n if exc.name =='sitecustomize':\n pass\n else :\n raise\n except Exception as err:\n if sys.flags.verbose:\n sys.excepthook(*sys.exc_info())\n else :\n sys.stderr.write(\n \"Error in sitecustomize; set PYTHONVERBOSE for traceback:\\n\"\n \"%s: %s\\n\"%\n (err.__class__.__name__,err))\n \n \ndef execusercustomize():\n ''\n try :\n try :\n import usercustomize\n except ImportError as exc:\n if exc.name =='usercustomize':\n pass\n else :\n raise\n except Exception as err:\n if sys.flags.verbose:\n sys.excepthook(*sys.exc_info())\n else :\n sys.stderr.write(\n \"Error in usercustomize; set PYTHONVERBOSE for traceback:\\n\"\n \"%s: %s\\n\"%\n (err.__class__.__name__,err))\n \n \ndef main():\n ''\n\n\n\n \n global ENABLE_USER_SITE\n \n orig_path=sys.path[:]\n known_paths=removeduppaths()\n if orig_path !=sys.path:\n \n \n abs_paths()\n \n known_paths=venv(known_paths)\n if ENABLE_USER_SITE is None :\n ENABLE_USER_SITE=check_enableusersite()\n known_paths=addusersitepackages(known_paths)\n known_paths=addsitepackages(known_paths)\n setquit()\n setcopyright()\n sethelper()\n if not sys.flags.isolated:\n enablerlcompleter()\n execsitecustomize()\n if ENABLE_USER_SITE:\n execusercustomize()\n \n \n \nif not sys.flags.no_site:\n main()\n \ndef _script():\n help=\"\"\"\\\n %s [--user-base] [--user-site]\n\n Without arguments print some useful information\n With arguments print the value of USER_BASE and/or USER_SITE separated\n by '%s'.\n\n Exit codes with --user-base or --user-site:\n 0 - user site directory is enabled\n 1 - user site directory is disabled by user\n 2 - user site directory is disabled by super user\n or for security reasons\n >2 - unknown error\n \"\"\"\n args=sys.argv[1:]\n if not args:\n user_base=getuserbase()\n user_site=getusersitepackages()\n print(\"sys.path = [\")\n for dir in sys.path:\n print(\" %r,\"%(dir,))\n print(\"]\")\n def exists(path):\n if path is not None and os.path.isdir(path):\n return \"exists\"\n else :\n return \"doesn't exist\"\n print(f\"USER_BASE: {user_base !r} ({exists(user_base)})\")\n print(f\"USER_SITE: {user_site !r} ({exists(user_site)})\")\n print(f\"ENABLE_USER_SITE: {ENABLE_USER_SITE !r}\")\n sys.exit(0)\n \n buffer=[]\n if '--user-base'in args:\n buffer.append(USER_BASE)\n if '--user-site'in args:\n buffer.append(USER_SITE)\n \n if buffer:\n print(os.pathsep.join(buffer))\n if ENABLE_USER_SITE:\n sys.exit(0)\n elif ENABLE_USER_SITE is False :\n sys.exit(1)\n elif ENABLE_USER_SITE is None :\n sys.exit(2)\n else :\n sys.exit(3)\n else :\n import textwrap\n print(textwrap.dedent(help %(sys.argv[0],os.pathsep)))\n sys.exit(10)\n \nif __name__ =='__main__':\n _script()\n", ["_sitebuiltins", "atexit", "builtins", "io", "os", "readline", "rlcompleter", "sitecustomize", "sys", "textwrap", "traceback", "usercustomize"]], "socket": [".py", "\n\n\n\"\"\"\\\nThis module provides socket operations and some related functions.\nOn Unix, it supports IP (Internet Protocol) and Unix domain sockets.\nOn other systems, it only supports IP. Functions specific for a\nsocket are available as methods of the socket object.\n\nFunctions:\n\nsocket() -- create a new socket object\nsocketpair() -- create a pair of new socket objects [*]\nfromfd() -- create a socket object from an open file descriptor [*]\nsend_fds() -- Send file descriptor to the socket.\nrecv_fds() -- Receive file descriptors from the socket.\nfromshare() -- create a socket object from data received from socket.share() [*]\ngethostname() -- return the current hostname\ngethostbyname() -- map a hostname to its IP number\ngethostbyaddr() -- map an IP number or hostname to DNS info\ngetservbyname() -- map a service name and a protocol name to a port number\ngetprotobyname() -- map a protocol name (e.g. 'tcp') to a number\nntohs(), ntohl() -- convert 16, 32 bit int from network to host byte order\nhtons(), htonl() -- convert 16, 32 bit int from host to network byte order\ninet_aton() -- convert IP addr string (123.45.67.89) to 32-bit packed format\ninet_ntoa() -- convert 32-bit packed format IP to string (123.45.67.89)\nsocket.getdefaulttimeout() -- get the default timeout value\nsocket.setdefaulttimeout() -- set the default timeout value\ncreate_connection() -- connects to an address, with an optional timeout and\n optional source address.\n\n [*] not available on all platforms!\n\nSpecial objects:\n\nSocketType -- type object for socket objects\nerror -- exception raised for I/O errors\nhas_ipv6 -- boolean value indicating if IPv6 is supported\n\nIntEnum constants:\n\nAF_INET, AF_UNIX -- socket domains (first argument to socket() call)\nSOCK_STREAM, SOCK_DGRAM, SOCK_RAW -- socket types (second argument)\n\nInteger constants:\n\nMany other constants may be defined; these may be used in calls to\nthe setsockopt() and getsockopt() methods.\n\"\"\"\n\nimport _socket\nfrom _socket import *\n\nimport os,sys,io,selectors\nfrom enum import IntEnum,IntFlag\n\ntry :\n import errno\nexcept ImportError:\n errno=None\nEBADF=getattr(errno,'EBADF',9)\nEAGAIN=getattr(errno,'EAGAIN',11)\nEWOULDBLOCK=getattr(errno,'EWOULDBLOCK',11)\n\n__all__=[\"fromfd\",\"getfqdn\",\"create_connection\",\"create_server\",\n\"has_dualstack_ipv6\",\"AddressFamily\",\"SocketKind\"]\n__all__.extend(os._get_exports_list(_socket))\n\n\n\n\n\n\n\nIntEnum._convert_(\n'AddressFamily',\n__name__,\nlambda C:C.isupper()and C.startswith('AF_'))\n\nIntEnum._convert_(\n'SocketKind',\n__name__,\nlambda C:C.isupper()and C.startswith('SOCK_'))\n\nIntFlag._convert_(\n'MsgFlag',\n__name__,\nlambda C:C.isupper()and C.startswith('MSG_'))\n\nIntFlag._convert_(\n'AddressInfo',\n__name__,\nlambda C:C.isupper()and C.startswith('AI_'))\n\n_LOCALHOST='127.0.0.1'\n_LOCALHOST_V6='::1'\n\n\ndef _intenum_converter(value,enum_klass):\n ''\n\n\n \n try :\n return enum_klass(value)\n except ValueError:\n return value\n \n \n \nif sys.platform.lower().startswith(\"win\"):\n errorTab={}\n errorTab[6]=\"Specified event object handle is invalid.\"\n errorTab[8]=\"Insufficient memory available.\"\n errorTab[87]=\"One or more parameters are invalid.\"\n errorTab[995]=\"Overlapped operation aborted.\"\n errorTab[996]=\"Overlapped I/O event object not in signaled state.\"\n errorTab[997]=\"Overlapped operation will complete later.\"\n errorTab[10004]=\"The operation was interrupted.\"\n errorTab[10009]=\"A bad file handle was passed.\"\n errorTab[10013]=\"Permission denied.\"\n errorTab[10014]=\"A fault occurred on the network??\"\n errorTab[10022]=\"An invalid operation was attempted.\"\n errorTab[10024]=\"Too many open files.\"\n errorTab[10035]=\"The socket operation would block.\"\n errorTab[10036]=\"A blocking operation is already in progress.\"\n errorTab[10037]=\"Operation already in progress.\"\n errorTab[10038]=\"Socket operation on nonsocket.\"\n errorTab[10039]=\"Destination address required.\"\n errorTab[10040]=\"Message too long.\"\n errorTab[10041]=\"Protocol wrong type for socket.\"\n errorTab[10042]=\"Bad protocol option.\"\n errorTab[10043]=\"Protocol not supported.\"\n errorTab[10044]=\"Socket type not supported.\"\n errorTab[10045]=\"Operation not supported.\"\n errorTab[10046]=\"Protocol family not supported.\"\n errorTab[10047]=\"Address family not supported by protocol family.\"\n errorTab[10048]=\"The network address is in use.\"\n errorTab[10049]=\"Cannot assign requested address.\"\n errorTab[10050]=\"Network is down.\"\n errorTab[10051]=\"Network is unreachable.\"\n errorTab[10052]=\"Network dropped connection on reset.\"\n errorTab[10053]=\"Software caused connection abort.\"\n errorTab[10054]=\"The connection has been reset.\"\n errorTab[10055]=\"No buffer space available.\"\n errorTab[10056]=\"Socket is already connected.\"\n errorTab[10057]=\"Socket is not connected.\"\n errorTab[10058]=\"The network has been shut down.\"\n errorTab[10059]=\"Too many references.\"\n errorTab[10060]=\"The operation timed out.\"\n errorTab[10061]=\"Connection refused.\"\n errorTab[10062]=\"Cannot translate name.\"\n errorTab[10063]=\"The name is too long.\"\n errorTab[10064]=\"The host is down.\"\n errorTab[10065]=\"The host is unreachable.\"\n errorTab[10066]=\"Directory not empty.\"\n errorTab[10067]=\"Too many processes.\"\n errorTab[10068]=\"User quota exceeded.\"\n errorTab[10069]=\"Disk quota exceeded.\"\n errorTab[10070]=\"Stale file handle reference.\"\n errorTab[10071]=\"Item is remote.\"\n errorTab[10091]=\"Network subsystem is unavailable.\"\n errorTab[10092]=\"Winsock.dll version out of range.\"\n errorTab[10093]=\"Successful WSAStartup not yet performed.\"\n errorTab[10101]=\"Graceful shutdown in progress.\"\n errorTab[10102]=\"No more results from WSALookupServiceNext.\"\n errorTab[10103]=\"Call has been canceled.\"\n errorTab[10104]=\"Procedure call table is invalid.\"\n errorTab[10105]=\"Service provider is invalid.\"\n errorTab[10106]=\"Service provider failed to initialize.\"\n errorTab[10107]=\"System call failure.\"\n errorTab[10108]=\"Service not found.\"\n errorTab[10109]=\"Class type not found.\"\n errorTab[10110]=\"No more results from WSALookupServiceNext.\"\n errorTab[10111]=\"Call was canceled.\"\n errorTab[10112]=\"Database query was refused.\"\n errorTab[11001]=\"Host not found.\"\n errorTab[11002]=\"Nonauthoritative host not found.\"\n errorTab[11003]=\"This is a nonrecoverable error.\"\n errorTab[11004]=\"Valid name, no data record requested type.\"\n errorTab[11005]=\"QoS receivers.\"\n errorTab[11006]=\"QoS senders.\"\n errorTab[11007]=\"No QoS senders.\"\n errorTab[11008]=\"QoS no receivers.\"\n errorTab[11009]=\"QoS request confirmed.\"\n errorTab[11010]=\"QoS admission error.\"\n errorTab[11011]=\"QoS policy failure.\"\n errorTab[11012]=\"QoS bad style.\"\n errorTab[11013]=\"QoS bad object.\"\n errorTab[11014]=\"QoS traffic control error.\"\n errorTab[11015]=\"QoS generic error.\"\n errorTab[11016]=\"QoS service type error.\"\n errorTab[11017]=\"QoS flowspec error.\"\n errorTab[11018]=\"Invalid QoS provider buffer.\"\n errorTab[11019]=\"Invalid QoS filter style.\"\n errorTab[11020]=\"Invalid QoS filter style.\"\n errorTab[11021]=\"Incorrect QoS filter count.\"\n errorTab[11022]=\"Invalid QoS object length.\"\n errorTab[11023]=\"Incorrect QoS flow count.\"\n errorTab[11024]=\"Unrecognized QoS object.\"\n errorTab[11025]=\"Invalid QoS policy object.\"\n errorTab[11026]=\"Invalid QoS flow descriptor.\"\n errorTab[11027]=\"Invalid QoS provider-specific flowspec.\"\n errorTab[11028]=\"Invalid QoS provider-specific filterspec.\"\n errorTab[11029]=\"Invalid QoS shape discard mode object.\"\n errorTab[11030]=\"Invalid QoS shaping rate object.\"\n errorTab[11031]=\"Reserved policy QoS element type.\"\n __all__.append(\"errorTab\")\n \n \nclass _GiveupOnSendfile(Exception):pass\n\n\nclass socket(_socket.socket):\n\n ''\n \n __slots__=[\"__weakref__\",\"_io_refs\",\"_closed\"]\n \n def __init__(self,family=-1,type=-1,proto=-1,fileno=None ):\n \n \n \n \n if fileno is None :\n if family ==-1:\n family=AF_INET\n if type ==-1:\n type=SOCK_STREAM\n if proto ==-1:\n proto=0\n _socket.socket.__init__(self,family,type,proto,fileno)\n self._io_refs=0\n self._closed=False\n \n def __enter__(self):\n return self\n \n def __exit__(self,*args):\n if not self._closed:\n self.close()\n \n def __repr__(self):\n ''\n\n \n closed=getattr(self,'_closed',False )\n s=\"<%s.%s%s fd=%i, family=%s, type=%s, proto=%i\"\\\n %(self.__class__.__module__,\n self.__class__.__qualname__,\n \" [closed]\"if closed else \"\",\n self.fileno(),\n self.family,\n self.type,\n self.proto)\n if not closed:\n try :\n laddr=self.getsockname()\n if laddr:\n s +=\", laddr=%s\"%str(laddr)\n except error:\n pass\n try :\n raddr=self.getpeername()\n if raddr:\n s +=\", raddr=%s\"%str(raddr)\n except error:\n pass\n s +='>'\n return s\n \n def __getstate__(self):\n raise TypeError(f\"cannot pickle {self.__class__.__name__!r} object\")\n \n def dup(self):\n ''\n\n\n\n \n fd=dup(self.fileno())\n sock=self.__class__(self.family,self.type,self.proto,fileno=fd)\n sock.settimeout(self.gettimeout())\n return sock\n \n def accept(self):\n ''\n\n\n\n\n \n fd,addr=self._accept()\n sock=socket(self.family,self.type,self.proto,fileno=fd)\n \n \n \n if getdefaulttimeout()is None and self.gettimeout():\n sock.setblocking(True )\n return sock,addr\n \n def makefile(self,mode=\"r\",buffering=None ,*,\n encoding=None ,errors=None ,newline=None ):\n ''\n\n\n\n \n \n if not set(mode)<={\"r\",\"w\",\"b\"}:\n raise ValueError(\"invalid mode %r (only r, w, b allowed)\"%(mode,))\n writing=\"w\"in mode\n reading=\"r\"in mode or not writing\n assert reading or writing\n binary=\"b\"in mode\n rawmode=\"\"\n if reading:\n rawmode +=\"r\"\n if writing:\n rawmode +=\"w\"\n raw=SocketIO(self,rawmode)\n self._io_refs +=1\n if buffering is None :\n buffering=-1\n if buffering <0:\n buffering=io.DEFAULT_BUFFER_SIZE\n if buffering ==0:\n if not binary:\n raise ValueError(\"unbuffered streams must be binary\")\n return raw\n if reading and writing:\n buffer=io.BufferedRWPair(raw,raw,buffering)\n elif reading:\n buffer=io.BufferedReader(raw,buffering)\n else :\n assert writing\n buffer=io.BufferedWriter(raw,buffering)\n if binary:\n return buffer\n encoding=io.text_encoding(encoding)\n text=io.TextIOWrapper(buffer,encoding,errors,newline)\n text.mode=mode\n return text\n \n if hasattr(os,'sendfile'):\n \n def _sendfile_use_sendfile(self,file,offset=0,count=None ):\n self._check_sendfile_params(file,offset,count)\n sockno=self.fileno()\n try :\n fileno=file.fileno()\n except (AttributeError,io.UnsupportedOperation)as err:\n raise _GiveupOnSendfile(err)\n try :\n fsize=os.fstat(fileno).st_size\n except OSError as err:\n raise _GiveupOnSendfile(err)\n if not fsize:\n return 0\n \n blocksize=min(count or fsize,2 **30)\n timeout=self.gettimeout()\n if timeout ==0:\n raise ValueError(\"non-blocking sockets are not supported\")\n \n \n \n if hasattr(selectors,'PollSelector'):\n selector=selectors.PollSelector()\n else :\n selector=selectors.SelectSelector()\n selector.register(sockno,selectors.EVENT_WRITE)\n \n total_sent=0\n \n selector_select=selector.select\n os_sendfile=os.sendfile\n try :\n while True :\n if timeout and not selector_select(timeout):\n raise TimeoutError('timed out')\n if count:\n blocksize=count -total_sent\n if blocksize <=0:\n break\n try :\n sent=os_sendfile(sockno,fileno,offset,blocksize)\n except BlockingIOError:\n if not timeout:\n \n \n selector_select()\n continue\n except OSError as err:\n if total_sent ==0:\n \n \n \n \n raise _GiveupOnSendfile(err)\n raise err from None\n else :\n if sent ==0:\n break\n offset +=sent\n total_sent +=sent\n return total_sent\n finally :\n if total_sent >0 and hasattr(file,'seek'):\n file.seek(offset)\n else :\n def _sendfile_use_sendfile(self,file,offset=0,count=None ):\n raise _GiveupOnSendfile(\n \"os.sendfile() not available on this platform\")\n \n def _sendfile_use_send(self,file,offset=0,count=None ):\n self._check_sendfile_params(file,offset,count)\n if self.gettimeout()==0:\n raise ValueError(\"non-blocking sockets are not supported\")\n if offset:\n file.seek(offset)\n blocksize=min(count,8192)if count else 8192\n total_sent=0\n \n file_read=file.read\n sock_send=self.send\n try :\n while True :\n if count:\n blocksize=min(count -total_sent,blocksize)\n if blocksize <=0:\n break\n data=memoryview(file_read(blocksize))\n if not data:\n break\n while True :\n try :\n sent=sock_send(data)\n except BlockingIOError:\n continue\n else :\n total_sent +=sent\n if sent 0 and hasattr(file,'seek'):\n file.seek(offset+total_sent)\n \n def _check_sendfile_params(self,file,offset,count):\n if 'b'not in getattr(file,'mode','b'):\n raise ValueError(\"file should be opened in binary mode\")\n if not self.type&SOCK_STREAM:\n raise ValueError(\"only SOCK_STREAM type sockets are supported\")\n if count is not None :\n if not isinstance(count,int):\n raise TypeError(\n \"count must be a positive integer (got {!r})\".format(count))\n if count <=0:\n raise ValueError(\n \"count must be a positive integer (got {!r})\".format(count))\n \n def sendfile(self,file,offset=0,count=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n return self._sendfile_use_sendfile(file,offset,count)\n except _GiveupOnSendfile:\n return self._sendfile_use_send(file,offset,count)\n \n def _decref_socketios(self):\n if self._io_refs >0:\n self._io_refs -=1\n if self._closed:\n self.close()\n \n def _real_close(self,_ss=_socket.socket):\n \n _ss.close(self)\n \n def close(self):\n \n self._closed=True\n if self._io_refs <=0:\n self._real_close()\n \n def detach(self):\n ''\n\n\n\n\n \n self._closed=True\n return super().detach()\n \n @property\n def family(self):\n ''\n \n return _intenum_converter(super().family,AddressFamily)\n \n @property\n def type(self):\n ''\n \n return _intenum_converter(super().type,SocketKind)\n \n if os.name =='nt':\n def get_inheritable(self):\n return os.get_handle_inheritable(self.fileno())\n def set_inheritable(self,inheritable):\n os.set_handle_inheritable(self.fileno(),inheritable)\n else :\n def get_inheritable(self):\n return os.get_inheritable(self.fileno())\n def set_inheritable(self,inheritable):\n os.set_inheritable(self.fileno(),inheritable)\n get_inheritable.__doc__=\"Get the inheritable flag of the socket\"\n set_inheritable.__doc__=\"Set the inheritable flag of the socket\"\n \ndef fromfd(fd,family,type,proto=0):\n ''\n\n\n\n \n nfd=dup(fd)\n return socket(family,type,proto,nfd)\n \nif hasattr(_socket.socket,\"sendmsg\"):\n import array\n \n def send_fds(sock,buffers,fds,flags=0,address=None ):\n ''\n\n\n \n return sock.sendmsg(buffers,[(_socket.SOL_SOCKET,\n _socket.SCM_RIGHTS,array.array(\"i\",fds))])\n __all__.append(\"send_fds\")\n \nif hasattr(_socket.socket,\"recvmsg\"):\n import array\n \n def recv_fds(sock,bufsize,maxfds,flags=0):\n ''\n\n\n\n\n \n \n fds=array.array(\"i\")\n msg,ancdata,flags,addr=sock.recvmsg(bufsize,\n _socket.CMSG_LEN(maxfds *fds.itemsize))\n for cmsg_level,cmsg_type,cmsg_data in ancdata:\n if (cmsg_level ==_socket.SOL_SOCKET and cmsg_type ==_socket.SCM_RIGHTS):\n fds.frombytes(cmsg_data[:\n len(cmsg_data)-(len(cmsg_data)%fds.itemsize)])\n \n return msg,list(fds),flags,addr\n __all__.append(\"recv_fds\")\n \nif hasattr(_socket.socket,\"share\"):\n def fromshare(info):\n ''\n\n\n\n \n return socket(0,0,0,info)\n __all__.append(\"fromshare\")\n \nif hasattr(_socket,\"socketpair\"):\n\n def socketpair(family=None ,type=SOCK_STREAM,proto=0):\n ''\n\n\n\n\n\n \n if family is None :\n try :\n family=AF_UNIX\n except NameError:\n family=AF_INET\n a,b=_socket.socketpair(family,type,proto)\n a=socket(family,type,proto,a.detach())\n b=socket(family,type,proto,b.detach())\n return a,b\n \nelse :\n\n\n def socketpair(family=AF_INET,type=SOCK_STREAM,proto=0):\n if family ==AF_INET:\n host=_LOCALHOST\n elif family ==AF_INET6:\n host=_LOCALHOST_V6\n else :\n raise ValueError(\"Only AF_INET and AF_INET6 socket address families \"\n \"are supported\")\n if type !=SOCK_STREAM:\n raise ValueError(\"Only SOCK_STREAM socket type is supported\")\n if proto !=0:\n raise ValueError(\"Only protocol zero is supported\")\n \n \n \n lsock=socket(family,type,proto)\n try :\n lsock.bind((host,0))\n lsock.listen()\n \n addr,port=lsock.getsockname()[:2]\n csock=socket(family,type,proto)\n try :\n csock.setblocking(False )\n try :\n csock.connect((addr,port))\n except (BlockingIOError,InterruptedError):\n pass\n csock.setblocking(True )\n ssock,_=lsock.accept()\n except :\n csock.close()\n raise\n finally :\n lsock.close()\n return (ssock,csock)\n __all__.append(\"socketpair\")\n \nsocketpair.__doc__=\"\"\"socketpair([family[, type[, proto]]]) -> (socket object, socket object)\nCreate a pair of socket objects from the sockets returned by the platform\nsocketpair() function.\nThe arguments are the same as for socket() except the default family is AF_UNIX\nif defined on the platform; otherwise, the default is AF_INET.\n\"\"\"\n\n_blocking_errnos={EAGAIN,EWOULDBLOCK}\n\nclass SocketIO(io.RawIOBase):\n\n ''\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n def __init__(self,sock,mode):\n if mode not in (\"r\",\"w\",\"rw\",\"rb\",\"wb\",\"rwb\"):\n raise ValueError(\"invalid mode: %r\"%mode)\n io.RawIOBase.__init__(self)\n self._sock=sock\n if \"b\"not in mode:\n mode +=\"b\"\n self._mode=mode\n self._reading=\"r\"in mode\n self._writing=\"w\"in mode\n self._timeout_occurred=False\n \n def readinto(self,b):\n ''\n\n\n\n\n\n \n self._checkClosed()\n self._checkReadable()\n if self._timeout_occurred:\n raise OSError(\"cannot read from timed out object\")\n while True :\n try :\n return self._sock.recv_into(b)\n except timeout:\n self._timeout_occurred=True\n raise\n except error as e:\n if e.errno in _blocking_errnos:\n return None\n raise\n \n def write(self,b):\n ''\n\n\n\n \n self._checkClosed()\n self._checkWritable()\n try :\n return self._sock.send(b)\n except error as e:\n \n if e.errno in _blocking_errnos:\n return None\n raise\n \n def readable(self):\n ''\n \n if self.closed:\n raise ValueError(\"I/O operation on closed socket.\")\n return self._reading\n \n def writable(self):\n ''\n \n if self.closed:\n raise ValueError(\"I/O operation on closed socket.\")\n return self._writing\n \n def seekable(self):\n ''\n \n if self.closed:\n raise ValueError(\"I/O operation on closed socket.\")\n return super().seekable()\n \n def fileno(self):\n ''\n \n self._checkClosed()\n return self._sock.fileno()\n \n @property\n def name(self):\n if not self.closed:\n return self.fileno()\n else :\n return -1\n \n @property\n def mode(self):\n return self._mode\n \n def close(self):\n ''\n\n \n if self.closed:\n return\n io.RawIOBase.close(self)\n self._sock._decref_socketios()\n self._sock=None\n \n \ndef getfqdn(name=''):\n ''\n\n\n\n\n\n\n\n \n name=name.strip()\n if not name or name =='0.0.0.0':\n name=gethostname()\n try :\n hostname,aliases,ipaddrs=gethostbyaddr(name)\n except error:\n pass\n else :\n aliases.insert(0,hostname)\n for name in aliases:\n if '.'in name:\n break\n else :\n name=hostname\n return name\n \n \n_GLOBAL_DEFAULT_TIMEOUT=object()\n\ndef create_connection(address,timeout=_GLOBAL_DEFAULT_TIMEOUT,\nsource_address=None ,*,all_errors=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n \n host,port=address\n exceptions=[]\n for res in getaddrinfo(host,port,0,SOCK_STREAM):\n af,socktype,proto,canonname,sa=res\n sock=None\n try :\n sock=socket(af,socktype,proto)\n if timeout is not _GLOBAL_DEFAULT_TIMEOUT:\n sock.settimeout(timeout)\n if source_address:\n sock.bind(source_address)\n sock.connect(sa)\n \n exceptions.clear()\n return sock\n \n except error as exc:\n if not all_errors:\n exceptions.clear()\n exceptions.append(exc)\n if sock is not None :\n sock.close()\n \n if len(exceptions):\n try :\n if not all_errors:\n raise exceptions[0]\n raise ExceptionGroup(\"create_connection failed\",exceptions)\n finally :\n \n exceptions.clear()\n else :\n raise error(\"getaddrinfo returns an empty list\")\n \n \ndef has_dualstack_ipv6():\n ''\n\n \n if not has_ipv6\\\n or not hasattr(_socket,'IPPROTO_IPV6')\\\n or not hasattr(_socket,'IPV6_V6ONLY'):\n return False\n try :\n with socket(AF_INET6,SOCK_STREAM)as sock:\n sock.setsockopt(IPPROTO_IPV6,IPV6_V6ONLY,0)\n return True\n except error:\n return False\n \n \ndef create_server(address,*,family=AF_INET,backlog=None ,reuse_port=False ,\ndualstack_ipv6=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if reuse_port and not hasattr(_socket,\"SO_REUSEPORT\"):\n raise ValueError(\"SO_REUSEPORT not supported on this platform\")\n if dualstack_ipv6:\n if not has_dualstack_ipv6():\n raise ValueError(\"dualstack_ipv6 not supported on this platform\")\n if family !=AF_INET6:\n raise ValueError(\"dualstack_ipv6 requires AF_INET6 family\")\n sock=socket(family,SOCK_STREAM)\n try :\n \n \n \n \n \n \n \n \n \n if os.name not in ('nt','cygwin')and\\\n hasattr(_socket,'SO_REUSEADDR'):\n try :\n sock.setsockopt(SOL_SOCKET,SO_REUSEADDR,1)\n except error:\n \n \n pass\n if reuse_port:\n sock.setsockopt(SOL_SOCKET,SO_REUSEPORT,1)\n if has_ipv6 and family ==AF_INET6:\n if dualstack_ipv6:\n sock.setsockopt(IPPROTO_IPV6,IPV6_V6ONLY,0)\n elif hasattr(_socket,\"IPV6_V6ONLY\")and\\\n hasattr(_socket,\"IPPROTO_IPV6\"):\n sock.setsockopt(IPPROTO_IPV6,IPV6_V6ONLY,1)\n try :\n sock.bind(address)\n except error as err:\n msg='%s (while attempting to bind on address %r)'%\\\n (err.strerror,address)\n raise error(err.errno,msg)from None\n if backlog is None :\n sock.listen()\n else :\n sock.listen(backlog)\n return sock\n except error:\n sock.close()\n raise\n \n \ndef getaddrinfo(host,port,family=0,type=0,proto=0,flags=0):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n addrlist=[]\n for res in _socket.getaddrinfo(host,port,family,type,proto,flags):\n af,socktype,proto,canonname,sa=res\n addrlist.append((_intenum_converter(af,AddressFamily),\n _intenum_converter(socktype,SocketKind),\n proto,canonname,sa))\n return addrlist\n", ["_socket", "array", "enum", "errno", "io", "os", "selectors", "sys"]], "sre_compile": [".py", "import warnings\nwarnings.warn(f\"module {__name__!r} is deprecated\",\nDeprecationWarning,\nstacklevel=2)\n\nfrom re import _compiler as _\nglobals().update({k:v for k,v in vars(_).items()if k[:2]!='__'})\n", ["re", "warnings"]], "sre_constants": [".py", "import warnings\nwarnings.warn(f\"module {__name__!r} is deprecated\",\nDeprecationWarning,\nstacklevel=2)\n\nfrom re import _constants as _\nglobals().update({k:v for k,v in vars(_).items()if k[:2]!='__'})\n", ["re", "warnings"]], "sre_parse": [".py", "import warnings\nwarnings.warn(f\"module {__name__!r} is deprecated\",\nDeprecationWarning,\nstacklevel=2)\n\nfrom re import _parser as _\nglobals().update({k:v for k,v in vars(_).items()if k[:2]!='__'})\n", ["re", "warnings"]], "stat": [".py", "''\n\n\n\n\n\n\nST_MODE=0\nST_INO=1\nST_DEV=2\nST_NLINK=3\nST_UID=4\nST_GID=5\nST_SIZE=6\nST_ATIME=7\nST_MTIME=8\nST_CTIME=9\n\n\n\ndef S_IMODE(mode):\n ''\n\n \n return mode&0o7777\n \ndef S_IFMT(mode):\n ''\n\n \n return mode&0o170000\n \n \n \n \nS_IFDIR=0o040000\nS_IFCHR=0o020000\nS_IFBLK=0o060000\nS_IFREG=0o100000\nS_IFIFO=0o010000\nS_IFLNK=0o120000\nS_IFSOCK=0o140000\n\nS_IFDOOR=0\nS_IFPORT=0\nS_IFWHT=0\n\n\n\ndef S_ISDIR(mode):\n ''\n return S_IFMT(mode)==S_IFDIR\n \ndef S_ISCHR(mode):\n ''\n return S_IFMT(mode)==S_IFCHR\n \ndef S_ISBLK(mode):\n ''\n return S_IFMT(mode)==S_IFBLK\n \ndef S_ISREG(mode):\n ''\n return S_IFMT(mode)==S_IFREG\n \ndef S_ISFIFO(mode):\n ''\n return S_IFMT(mode)==S_IFIFO\n \ndef S_ISLNK(mode):\n ''\n return S_IFMT(mode)==S_IFLNK\n \ndef S_ISSOCK(mode):\n ''\n return S_IFMT(mode)==S_IFSOCK\n \ndef S_ISDOOR(mode):\n ''\n return False\n \ndef S_ISPORT(mode):\n ''\n return False\n \ndef S_ISWHT(mode):\n ''\n return False\n \n \n \nS_ISUID=0o4000\nS_ISGID=0o2000\nS_ENFMT=S_ISGID\nS_ISVTX=0o1000\nS_IREAD=0o0400\nS_IWRITE=0o0200\nS_IEXEC=0o0100\nS_IRWXU=0o0700\nS_IRUSR=0o0400\nS_IWUSR=0o0200\nS_IXUSR=0o0100\nS_IRWXG=0o0070\nS_IRGRP=0o0040\nS_IWGRP=0o0020\nS_IXGRP=0o0010\nS_IRWXO=0o0007\nS_IROTH=0o0004\nS_IWOTH=0o0002\nS_IXOTH=0o0001\n\n\n\nUF_NODUMP=0x00000001\nUF_IMMUTABLE=0x00000002\nUF_APPEND=0x00000004\nUF_OPAQUE=0x00000008\nUF_NOUNLINK=0x00000010\nUF_COMPRESSED=0x00000020\nUF_HIDDEN=0x00008000\nSF_ARCHIVED=0x00010000\nSF_IMMUTABLE=0x00020000\nSF_APPEND=0x00040000\nSF_NOUNLINK=0x00100000\nSF_SNAPSHOT=0x00200000\n\n\n_filemode_table=(\n((S_IFLNK,\"l\"),\n(S_IFSOCK,\"s\"),\n(S_IFREG,\"-\"),\n(S_IFBLK,\"b\"),\n(S_IFDIR,\"d\"),\n(S_IFCHR,\"c\"),\n(S_IFIFO,\"p\")),\n\n((S_IRUSR,\"r\"),),\n((S_IWUSR,\"w\"),),\n((S_IXUSR |S_ISUID,\"s\"),\n(S_ISUID,\"S\"),\n(S_IXUSR,\"x\")),\n\n((S_IRGRP,\"r\"),),\n((S_IWGRP,\"w\"),),\n((S_IXGRP |S_ISGID,\"s\"),\n(S_ISGID,\"S\"),\n(S_IXGRP,\"x\")),\n\n((S_IROTH,\"r\"),),\n((S_IWOTH,\"w\"),),\n((S_IXOTH |S_ISVTX,\"t\"),\n(S_ISVTX,\"T\"),\n(S_IXOTH,\"x\"))\n)\n\ndef filemode(mode):\n ''\n perm=[]\n for table in _filemode_table:\n for bit,char in table:\n if mode&bit ==bit:\n perm.append(char)\n break\n else :\n perm.append(\"-\")\n return \"\".join(perm)\n \n \n \n \n \nFILE_ATTRIBUTE_ARCHIVE=32\nFILE_ATTRIBUTE_COMPRESSED=2048\nFILE_ATTRIBUTE_DEVICE=64\nFILE_ATTRIBUTE_DIRECTORY=16\nFILE_ATTRIBUTE_ENCRYPTED=16384\nFILE_ATTRIBUTE_HIDDEN=2\nFILE_ATTRIBUTE_INTEGRITY_STREAM=32768\nFILE_ATTRIBUTE_NORMAL=128\nFILE_ATTRIBUTE_NOT_CONTENT_INDEXED=8192\nFILE_ATTRIBUTE_NO_SCRUB_DATA=131072\nFILE_ATTRIBUTE_OFFLINE=4096\nFILE_ATTRIBUTE_READONLY=1\nFILE_ATTRIBUTE_REPARSE_POINT=1024\nFILE_ATTRIBUTE_SPARSE_FILE=512\nFILE_ATTRIBUTE_SYSTEM=4\nFILE_ATTRIBUTE_TEMPORARY=256\nFILE_ATTRIBUTE_VIRTUAL=65536\n\n\n\ntry :\n from _stat import *\nexcept ImportError:\n pass\n", ["_stat"]], "statistics": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=[\n'NormalDist',\n'StatisticsError',\n'correlation',\n'covariance',\n'fmean',\n'geometric_mean',\n'harmonic_mean',\n'linear_regression',\n'mean',\n'median',\n'median_grouped',\n'median_high',\n'median_low',\n'mode',\n'multimode',\n'pstdev',\n'pvariance',\n'quantiles',\n'stdev',\n'variance',\n]\n\nimport math\nimport numbers\nimport random\nimport sys\n\nfrom fractions import Fraction\nfrom decimal import Decimal\nfrom itertools import count,groupby,repeat\nfrom bisect import bisect_left,bisect_right\nfrom math import hypot,sqrt,fabs,exp,erf,tau,log,fsum,sumprod\nfrom functools import reduce\nfrom operator import itemgetter\nfrom collections import Counter,namedtuple,defaultdict\n\n_SQRT2=sqrt(2.0)\n\n\n\nclass StatisticsError(ValueError):\n pass\n \n \n \n \ndef _sum(data):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n count=0\n types=set()\n types_add=types.add\n partials={}\n partials_get=partials.get\n for typ,values in groupby(data,type):\n types_add(typ)\n for n,d in map(_exact_ratio,values):\n count +=1\n partials[d]=partials_get(d,0)+n\n if None in partials:\n \n \n total=partials[None ]\n assert not _isfinite(total)\n else :\n \n total=sum(Fraction(n,d)for d,n in partials.items())\n T=reduce(_coerce,types,int)\n return (T,total,count)\n \n \ndef _ss(data,c=None ):\n ''\n\n\n\n\n\n\n \n if c is not None :\n T,ssd,count=_sum((d :=x -c)*d for x in data)\n return (T,ssd,c,count)\n count=0\n types=set()\n types_add=types.add\n sx_partials=defaultdict(int)\n sxx_partials=defaultdict(int)\n for typ,values in groupby(data,type):\n types_add(typ)\n for n,d in map(_exact_ratio,values):\n count +=1\n sx_partials[d]+=n\n sxx_partials[d]+=n *n\n if not count:\n ssd=c=Fraction(0)\n elif None in sx_partials:\n \n \n ssd=c=sx_partials[None ]\n assert not _isfinite(ssd)\n else :\n sx=sum(Fraction(n,d)for d,n in sx_partials.items())\n sxx=sum(Fraction(n,d *d)for d,n in sxx_partials.items())\n \n \n ssd=(count *sxx -sx *sx)/count\n c=sx /count\n T=reduce(_coerce,types,int)\n return (T,ssd,c,count)\n \n \ndef _isfinite(x):\n try :\n return x.is_finite()\n except AttributeError:\n return math.isfinite(x)\n \n \ndef _coerce(T,S):\n ''\n\n\n\n \n \n assert T is not bool,\"initial type T is bool\"\n \n \n \n if T is S:return T\n \n if S is int or S is bool:return T\n if T is int:return S\n \n if issubclass(S,T):return S\n if issubclass(T,S):return T\n \n if issubclass(T,int):return S\n if issubclass(S,int):return T\n \n if issubclass(T,Fraction)and issubclass(S,float):\n return S\n if issubclass(T,float)and issubclass(S,Fraction):\n return T\n \n msg=\"don't know how to coerce %s and %s\"\n raise TypeError(msg %(T.__name__,S.__name__))\n \n \ndef _exact_ratio(x):\n ''\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n try :\n return x.as_integer_ratio()\n except AttributeError:\n pass\n except (OverflowError,ValueError):\n \n assert not _isfinite(x)\n return (x,None )\n try :\n \n return (x.numerator,x.denominator)\n except AttributeError:\n msg=f\"can't convert type '{type(x).__name__}' to numerator/denominator\"\n raise TypeError(msg)\n \n \ndef _convert(value,T):\n ''\n if type(value)is T:\n \n \n return value\n if issubclass(T,int)and value.denominator !=1:\n T=float\n try :\n \n return T(value)\n except TypeError:\n if issubclass(T,Decimal):\n return T(value.numerator)/T(value.denominator)\n else :\n raise\n \n \ndef _fail_neg(values,errmsg='negative value'):\n ''\n for x in values:\n if x <0:\n raise StatisticsError(errmsg)\n yield x\n \n \ndef _rank(data,/,*,key=None ,reverse=False ,ties='average',start=1)->list[float]:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n if ties !='average':\n raise ValueError(f'Unknown tie resolution method: {ties !r}')\n if key is not None :\n data=map(key,data)\n val_pos=sorted(zip(data,count()),reverse=reverse)\n i=start -1\n result=[0]*len(val_pos)\n for _,g in groupby(val_pos,key=itemgetter(0)):\n group=list(g)\n size=len(group)\n rank=i+(size+1)/2\n for value,orig_pos in group:\n result[orig_pos]=rank\n i +=size\n return result\n \n \ndef _integer_sqrt_of_frac_rto(n:int,m:int)->int:\n ''\n \n a=math.isqrt(n //m)\n return a |(a *a *m !=n)\n \n \n \n \n_sqrt_bit_width:int=2 *sys.float_info.mant_dig+3\n\n\ndef _float_sqrt_of_frac(n:int,m:int)->float:\n ''\n \n q=(n.bit_length()-m.bit_length()-_sqrt_bit_width)//2\n if q >=0:\n numerator=_integer_sqrt_of_frac_rto(n,m <<2 *q)<Decimal:\n ''\n \n \n \n if n <=0:\n if not n:\n return Decimal('0.0')\n n,m=-n,-m\n \n root=(Decimal(n)/Decimal(m)).sqrt()\n nr,dr=root.as_integer_ratio()\n \n plus=root.next_plus()\n np,dp=plus.as_integer_ratio()\n \n if 4 *n *(dr *dp)**2 >m *(dr *np+dp *nr)**2:\n return plus\n \n minus=root.next_minus()\n nm,dm=minus.as_integer_ratio()\n \n if 4 *n *(dr *dm)**2 ld -1 else j\n delta=i *m -j *n\n interpolated=(data[j -1]*(n -delta)+data[j]*delta)/n\n result.append(interpolated)\n return result\n raise ValueError(f'Unknown method: {method !r}')\n \n \n \n \n \n \n \n \ndef variance(data,xbar=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n T,ss,c,n=_ss(data,xbar)\n if n <2:\n raise StatisticsError('variance requires at least two data points')\n return _convert(ss /(n -1),T)\n \n \ndef pvariance(data,mu=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n T,ss,c,n=_ss(data,mu)\n if n <1:\n raise StatisticsError('pvariance requires at least one data point')\n return _convert(ss /n,T)\n \n \ndef stdev(data,xbar=None ):\n ''\n\n\n\n\n\n\n \n T,ss,c,n=_ss(data,xbar)\n if n <2:\n raise StatisticsError('stdev requires at least two data points')\n mss=ss /(n -1)\n if issubclass(T,Decimal):\n return _decimal_sqrt_of_frac(mss.numerator,mss.denominator)\n return _float_sqrt_of_frac(mss.numerator,mss.denominator)\n \n \ndef pstdev(data,mu=None ):\n ''\n\n\n\n\n\n\n \n T,ss,c,n=_ss(data,mu)\n if n <1:\n raise StatisticsError('pstdev requires at least one data point')\n mss=ss /n\n if issubclass(T,Decimal):\n return _decimal_sqrt_of_frac(mss.numerator,mss.denominator)\n return _float_sqrt_of_frac(mss.numerator,mss.denominator)\n \n \ndef _mean_stdev(data):\n ''\n T,ss,xbar,n=_ss(data)\n if n <2:\n raise StatisticsError('stdev requires at least two data points')\n mss=ss /(n -1)\n try :\n return float(xbar),_float_sqrt_of_frac(mss.numerator,mss.denominator)\n except AttributeError:\n \n return float(xbar),float(xbar)/float(ss)\n \n \n \n \n \n \n \n \n \ndef covariance(x,y,/):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n n=len(x)\n if len(y)!=n:\n raise StatisticsError('covariance requires that both inputs have same number of data points')\n if n <2:\n raise StatisticsError('covariance requires at least two data points')\n xbar=fsum(x)/n\n ybar=fsum(y)/n\n sxy=sumprod((xi -xbar for xi in x),(yi -ybar for yi in y))\n return sxy /(n -1)\n \n \ndef correlation(x,y,/,*,method='linear'):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n n=len(x)\n if len(y)!=n:\n raise StatisticsError('correlation requires that both inputs have same number of data points')\n if n <2:\n raise StatisticsError('correlation requires at least two data points')\n if method not in {'linear','ranked'}:\n raise ValueError(f'Unknown method: {method !r}')\n if method =='ranked':\n start=(n -1)/-2\n x=_rank(x,start=start)\n y=_rank(y,start=start)\n else :\n xbar=fsum(x)/n\n ybar=fsum(y)/n\n x=[xi -xbar for xi in x]\n y=[yi -ybar for yi in y]\n sxy=sumprod(x,y)\n sxx=sumprod(x,x)\n syy=sumprod(y,y)\n try :\n return sxy /sqrt(sxx *syy)\n except ZeroDivisionError:\n raise StatisticsError('at least one of the inputs is constant')\n \n \nLinearRegression=namedtuple('LinearRegression',('slope','intercept'))\n\n\ndef linear_regression(x,y,/,*,proportional=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n n=len(x)\n if len(y)!=n:\n raise StatisticsError('linear regression requires that both inputs have same number of data points')\n if n <2:\n raise StatisticsError('linear regression requires at least two data points')\n if not proportional:\n xbar=fsum(x)/n\n ybar=fsum(y)/n\n x=[xi -xbar for xi in x]\n y=(yi -ybar for yi in y)\n sxy=sumprod(x,y)+0.0\n sxx=sumprod(x,x)\n try :\n slope=sxy /sxx\n except ZeroDivisionError:\n raise StatisticsError('x is constant')\n intercept=0.0 if proportional else ybar -slope *xbar\n return LinearRegression(slope=slope,intercept=intercept)\n \n \n \n \n \ndef _normal_dist_inv_cdf(p,mu,sigma):\n\n\n\n\n\n q=p -0.5\n if fabs(q)<=0.425:\n r=0.180625 -q *q\n \n num=(((((((2.50908_09287_30122_6727e+3 *r+\n 3.34305_75583_58812_8105e+4)*r+\n 6.72657_70927_00870_0853e+4)*r+\n 4.59219_53931_54987_1457e+4)*r+\n 1.37316_93765_50946_1125e+4)*r+\n 1.97159_09503_06551_4427e+3)*r+\n 1.33141_66789_17843_7745e+2)*r+\n 3.38713_28727_96366_6080e+0)*q\n den=(((((((5.22649_52788_52854_5610e+3 *r+\n 2.87290_85735_72194_2674e+4)*r+\n 3.93078_95800_09271_0610e+4)*r+\n 2.12137_94301_58659_5867e+4)*r+\n 5.39419_60214_24751_1077e+3)*r+\n 6.87187_00749_20579_0830e+2)*r+\n 4.23133_30701_60091_1252e+1)*r+\n 1.0)\n x=num /den\n return mu+(x *sigma)\n r=p if q <=0.0 else 1.0 -p\n r=sqrt(-log(r))\n if r <=5.0:\n r=r -1.6\n \n num=(((((((7.74545_01427_83414_07640e-4 *r+\n 2.27238_44989_26918_45833e-2)*r+\n 2.41780_72517_74506_11770e-1)*r+\n 1.27045_82524_52368_38258e+0)*r+\n 3.64784_83247_63204_60504e+0)*r+\n 5.76949_72214_60691_40550e+0)*r+\n 4.63033_78461_56545_29590e+0)*r+\n 1.42343_71107_49683_57734e+0)\n den=(((((((1.05075_00716_44416_84324e-9 *r+\n 5.47593_80849_95344_94600e-4)*r+\n 1.51986_66563_61645_71966e-2)*r+\n 1.48103_97642_74800_74590e-1)*r+\n 6.89767_33498_51000_04550e-1)*r+\n 1.67638_48301_83803_84940e+0)*r+\n 2.05319_16266_37758_82187e+0)*r+\n 1.0)\n else :\n r=r -5.0\n \n num=(((((((2.01033_43992_92288_13265e-7 *r+\n 2.71155_55687_43487_57815e-5)*r+\n 1.24266_09473_88078_43860e-3)*r+\n 2.65321_89526_57612_30930e-2)*r+\n 2.96560_57182_85048_91230e-1)*r+\n 1.78482_65399_17291_33580e+0)*r+\n 5.46378_49111_64114_36990e+0)*r+\n 6.65790_46435_01103_77720e+0)\n den=(((((((2.04426_31033_89939_78564e-15 *r+\n 1.42151_17583_16445_88870e-7)*r+\n 1.84631_83175_10054_68180e-5)*r+\n 7.86869_13114_56132_59100e-4)*r+\n 1.48753_61290_85061_48525e-2)*r+\n 1.36929_88092_27358_05310e-1)*r+\n 5.99832_20655_58879_37690e-1)*r+\n 1.0)\n x=num /den\n if q <0.0:\n x=-x\n return mu+(x *sigma)\n \n \n \ntry :\n from _statistics import _normal_dist_inv_cdf\nexcept ImportError:\n pass\n \n \nclass NormalDist:\n ''\n \n \n \n __slots__={\n '_mu':'Arithmetic mean of a normal distribution',\n '_sigma':'Standard deviation of a normal distribution',\n }\n \n def __init__(self,mu=0.0,sigma=1.0):\n ''\n if sigma <0.0:\n raise StatisticsError('sigma must be non-negative')\n self._mu=float(mu)\n self._sigma=float(sigma)\n \n @classmethod\n def from_samples(cls,data):\n ''\n return cls(*_mean_stdev(data))\n \n def samples(self,n,*,seed=None ):\n ''\n gauss=random.gauss if seed is None else random.Random(seed).gauss\n mu,sigma=self._mu,self._sigma\n return [gauss(mu,sigma)for _ in repeat(None ,n)]\n \n def pdf(self,x):\n ''\n variance=self._sigma *self._sigma\n if not variance:\n raise StatisticsError('pdf() not defined when sigma is zero')\n diff=x -self._mu\n return exp(diff *diff /(-2.0 *variance))/sqrt(tau *variance)\n \n def cdf(self,x):\n ''\n if not self._sigma:\n raise StatisticsError('cdf() not defined when sigma is zero')\n return 0.5 *(1.0+erf((x -self._mu)/(self._sigma *_SQRT2)))\n \n def inv_cdf(self,p):\n ''\n\n\n\n\n\n\n\n \n if p <=0.0 or p >=1.0:\n raise StatisticsError('p must be in the range 0.0 < p < 1.0')\n return _normal_dist_inv_cdf(p,self._mu,self._sigma)\n \n def quantiles(self,n=4):\n ''\n\n\n\n\n\n\n \n return [self.inv_cdf(i /n)for i in range(1,n)]\n \n def overlap(self,other):\n ''\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n if not isinstance(other,NormalDist):\n raise TypeError('Expected another NormalDist instance')\n X,Y=self,other\n if (Y._sigma,Y._mu)<(X._sigma,X._mu):\n X,Y=Y,X\n X_var,Y_var=X.variance,Y.variance\n if not X_var or not Y_var:\n raise StatisticsError('overlap() not defined when sigma is zero')\n dv=Y_var -X_var\n dm=fabs(Y._mu -X._mu)\n if not dv:\n return 1.0 -erf(dm /(2.0 *X._sigma *_SQRT2))\n a=X._mu *Y_var -Y._mu *X_var\n b=X._sigma *Y._sigma *sqrt(dm *dm+dv *log(Y_var /X_var))\n x1=(a+b)/dv\n x2=(a -b)/dv\n return 1.0 -(fabs(Y.cdf(x1)-X.cdf(x1))+fabs(Y.cdf(x2)-X.cdf(x2)))\n \n def zscore(self,x):\n ''\n\n\n\n \n \n if not self._sigma:\n raise StatisticsError('zscore() not defined when sigma is zero')\n return (x -self._mu)/self._sigma\n \n @property\n def mean(self):\n ''\n return self._mu\n \n @property\n def median(self):\n ''\n return self._mu\n \n @property\n def mode(self):\n ''\n\n\n\n \n return self._mu\n \n @property\n def stdev(self):\n ''\n return self._sigma\n \n @property\n def variance(self):\n ''\n return self._sigma *self._sigma\n \n def __add__(x1,x2):\n ''\n\n\n\n\n\n\n\n \n if isinstance(x2,NormalDist):\n return NormalDist(x1._mu+x2._mu,hypot(x1._sigma,x2._sigma))\n return NormalDist(x1._mu+x2,x1._sigma)\n \n def __sub__(x1,x2):\n ''\n\n\n\n\n\n\n\n \n if isinstance(x2,NormalDist):\n return NormalDist(x1._mu -x2._mu,hypot(x1._sigma,x2._sigma))\n return NormalDist(x1._mu -x2,x1._sigma)\n \n def __mul__(x1,x2):\n ''\n\n\n\n \n return NormalDist(x1._mu *x2,x1._sigma *fabs(x2))\n \n def __truediv__(x1,x2):\n ''\n\n\n\n \n return NormalDist(x1._mu /x2,x1._sigma /fabs(x2))\n \n def __pos__(x1):\n ''\n return NormalDist(x1._mu,x1._sigma)\n \n def __neg__(x1):\n ''\n return NormalDist(-x1._mu,x1._sigma)\n \n __radd__=__add__\n \n def __rsub__(x1,x2):\n ''\n return -(x1 -x2)\n \n __rmul__=__mul__\n \n def __eq__(x1,x2):\n ''\n if not isinstance(x2,NormalDist):\n return NotImplemented\n return x1._mu ==x2._mu and x1._sigma ==x2._sigma\n \n def __hash__(self):\n ''\n return hash((self._mu,self._sigma))\n \n def __repr__(self):\n return f'{type(self).__name__}(mu={self._mu !r}, sigma={self._sigma !r})'\n \n def __getstate__(self):\n return self._mu,self._sigma\n \n def __setstate__(self,state):\n self._mu,self._sigma=state\n", ["_statistics", "bisect", "collections", "decimal", "fractions", "functools", "itertools", "math", "numbers", "operator", "random", "sys"]], "string": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=[\"ascii_letters\",\"ascii_lowercase\",\"ascii_uppercase\",\"capwords\",\n\"digits\",\"hexdigits\",\"octdigits\",\"printable\",\"punctuation\",\n\"whitespace\",\"Formatter\",\"Template\"]\n\nimport _string\n\n\nwhitespace=' \\t\\n\\r\\v\\f'\nascii_lowercase='abcdefghijklmnopqrstuvwxyz'\nascii_uppercase='ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nascii_letters=ascii_lowercase+ascii_uppercase\ndigits='0123456789'\nhexdigits=digits+'abcdef'+'ABCDEF'\noctdigits='01234567'\npunctuation=r\"\"\"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~\"\"\"\nprintable=digits+ascii_letters+punctuation+whitespace\n\n\n\n\ndef capwords(s,sep=None ):\n ''\n\n\n\n\n\n\n\n\n \n return (sep or ' ').join(map(str.capitalize,s.split(sep)))\n \n \n \nimport re as _re\nfrom collections import ChainMap as _ChainMap\n\n_sentinel_dict={}\n\nclass Template:\n ''\n \n delimiter='$'\n \n \n \n \n idpattern=r'(?a:[_a-z][_a-z0-9]*)'\n braceidpattern=None\n flags=_re.IGNORECASE\n \n def __init_subclass__(cls):\n super().__init_subclass__()\n if 'pattern'in cls.__dict__:\n pattern=cls.pattern\n else :\n delim=_re.escape(cls.delimiter)\n id=cls.idpattern\n bid=cls.braceidpattern or cls.idpattern\n pattern=fr\"\"\"\n {delim}(?:\n (?P{delim}) | # Escape sequence of two delimiters\n (?P{id}) | # delimiter and a Python identifier\n {(?P{bid})} | # delimiter and a braced identifier\n (?P) # Other ill-formed delimiter exprs\n )\n \"\"\"\n cls.pattern=_re.compile(pattern,cls.flags |_re.VERBOSE)\n \n def __init__(self,template):\n self.template=template\n \n \n \n def _invalid(self,mo):\n i=mo.start('invalid')\n lines=self.template[:i].splitlines(keepends=True )\n if not lines:\n colno=1\n lineno=1\n else :\n colno=i -len(''.join(lines[:-1]))\n lineno=len(lines)\n raise ValueError('Invalid placeholder in string: line %d, col %d'%\n (lineno,colno))\n \n def substitute(self,mapping=_sentinel_dict,/,**kws):\n if mapping is _sentinel_dict:\n mapping=kws\n elif kws:\n mapping=_ChainMap(kws,mapping)\n \n def convert(mo):\n \n named=mo.group('named')or mo.group('braced')\n if named is not None :\n return str(mapping[named])\n if mo.group('escaped')is not None :\n return self.delimiter\n if mo.group('invalid')is not None :\n self._invalid(mo)\n raise ValueError('Unrecognized named group in pattern',\n self.pattern)\n return self.pattern.sub(convert,self.template)\n \n def safe_substitute(self,mapping=_sentinel_dict,/,**kws):\n if mapping is _sentinel_dict:\n mapping=kws\n elif kws:\n mapping=_ChainMap(kws,mapping)\n \n def convert(mo):\n named=mo.group('named')or mo.group('braced')\n if named is not None :\n try :\n return str(mapping[named])\n except KeyError:\n return mo.group()\n if mo.group('escaped')is not None :\n return self.delimiter\n if mo.group('invalid')is not None :\n return mo.group()\n raise ValueError('Unrecognized named group in pattern',\n self.pattern)\n return self.pattern.sub(convert,self.template)\n \n def is_valid(self):\n for mo in self.pattern.finditer(self.template):\n if mo.group('invalid')is not None :\n return False\n if (mo.group('named')is None\n and mo.group('braced')is None\n and mo.group('escaped')is None ):\n \n \n raise ValueError('Unrecognized named group in pattern',\n self.pattern)\n return True\n \n def get_identifiers(self):\n ids=[]\n for mo in self.pattern.finditer(self.template):\n named=mo.group('named')or mo.group('braced')\n if named is not None and named not in ids:\n \n ids.append(named)\n elif (named is None\n and mo.group('invalid')is None\n and mo.group('escaped')is None ):\n \n \n raise ValueError('Unrecognized named group in pattern',\n self.pattern)\n return ids\n \n \n \nTemplate.__init_subclass__()\n\n\n\n\n\n\n\n\n\n\n\n\nclass Formatter:\n def format(self,format_string,/,*args,**kwargs):\n return self.vformat(format_string,args,kwargs)\n \n def vformat(self,format_string,args,kwargs):\n used_args=set()\n result,_=self._vformat(format_string,args,kwargs,used_args,2)\n self.check_unused_args(used_args,args,kwargs)\n return result\n \n def _vformat(self,format_string,args,kwargs,used_args,recursion_depth,\n auto_arg_index=0):\n if recursion_depth <0:\n raise ValueError('Max string recursion exceeded')\n result=[]\n for literal_text,field_name,format_spec,conversion in\\\n self.parse(format_string):\n \n \n if literal_text:\n result.append(literal_text)\n \n \n if field_name is not None :\n \n \n \n \n if field_name =='':\n if auto_arg_index is False :\n raise ValueError('cannot switch from manual field '\n 'specification to automatic field '\n 'numbering')\n field_name=str(auto_arg_index)\n auto_arg_index +=1\n elif field_name.isdigit():\n if auto_arg_index:\n raise ValueError('cannot switch from manual field '\n 'specification to automatic field '\n 'numbering')\n \n \n auto_arg_index=False\n \n \n \n obj,arg_used=self.get_field(field_name,args,kwargs)\n used_args.add(arg_used)\n \n \n obj=self.convert_field(obj,conversion)\n \n \n format_spec,auto_arg_index=self._vformat(\n format_spec,args,kwargs,\n used_args,recursion_depth -1,\n auto_arg_index=auto_arg_index)\n \n \n result.append(self.format_field(obj,format_spec))\n \n return ''.join(result),auto_arg_index\n \n \n def get_value(self,key,args,kwargs):\n if isinstance(key,int):\n return args[key]\n else :\n return kwargs[key]\n \n \n def check_unused_args(self,used_args,args,kwargs):\n pass\n \n \n def format_field(self,value,format_spec):\n return format(value,format_spec)\n \n \n def convert_field(self,value,conversion):\n \n if conversion is None :\n return value\n elif conversion =='s':\n return str(value)\n elif conversion =='r':\n return repr(value)\n elif conversion =='a':\n return ascii(value)\n raise ValueError(\"Unknown conversion specifier {0!s}\".format(conversion))\n \n \n \n \n \n \n \n \n \n def parse(self,format_string):\n return _string.formatter_parser(format_string)\n \n \n \n \n \n \n \n def get_field(self,field_name,args,kwargs):\n first,rest=_string.formatter_field_name_split(field_name)\n \n obj=self.get_value(first,args,kwargs)\n \n \n \n for is_attr,i in rest:\n if is_attr:\n obj=getattr(obj,i)\n else :\n obj=obj[i]\n \n return obj,first\n", ["_string", "collections", "re"]], "stringprep": [".py", "\n''\n\n\n\n\n\nfrom unicodedata import ucd_3_2_0 as unicodedata\n\nassert unicodedata.unidata_version =='3.2.0'\n\ndef in_table_a1(code):\n if unicodedata.category(code)!='Cn':return False\n c=ord(code)\n if 0xFDD0 <=c <0xFDF0:return False\n return (c&0xFFFF)not in (0xFFFE,0xFFFF)\n \n \nb1_set=set([173,847,6150,6155,6156,6157,8203,8204,8205,8288,65279]+list(range(65024,65040)))\ndef in_table_b1(code):\n return ord(code)in b1_set\n \n \nb3_exceptions={\n0xb5:'\\u03bc',0xdf:'ss',0x130:'i\\u0307',0x149:'\\u02bcn',\n0x17f:'s',0x1f0:'j\\u030c',0x345:'\\u03b9',0x37a:' \\u03b9',\n0x390:'\\u03b9\\u0308\\u0301',0x3b0:'\\u03c5\\u0308\\u0301',0x3c2:'\\u03c3',0x3d0:'\\u03b2',\n0x3d1:'\\u03b8',0x3d2:'\\u03c5',0x3d3:'\\u03cd',0x3d4:'\\u03cb',\n0x3d5:'\\u03c6',0x3d6:'\\u03c0',0x3f0:'\\u03ba',0x3f1:'\\u03c1',\n0x3f2:'\\u03c3',0x3f5:'\\u03b5',0x587:'\\u0565\\u0582',0x1e96:'h\\u0331',\n0x1e97:'t\\u0308',0x1e98:'w\\u030a',0x1e99:'y\\u030a',0x1e9a:'a\\u02be',\n0x1e9b:'\\u1e61',0x1f50:'\\u03c5\\u0313',0x1f52:'\\u03c5\\u0313\\u0300',0x1f54:'\\u03c5\\u0313\\u0301',\n0x1f56:'\\u03c5\\u0313\\u0342',0x1f80:'\\u1f00\\u03b9',0x1f81:'\\u1f01\\u03b9',0x1f82:'\\u1f02\\u03b9',\n0x1f83:'\\u1f03\\u03b9',0x1f84:'\\u1f04\\u03b9',0x1f85:'\\u1f05\\u03b9',0x1f86:'\\u1f06\\u03b9',\n0x1f87:'\\u1f07\\u03b9',0x1f88:'\\u1f00\\u03b9',0x1f89:'\\u1f01\\u03b9',0x1f8a:'\\u1f02\\u03b9',\n0x1f8b:'\\u1f03\\u03b9',0x1f8c:'\\u1f04\\u03b9',0x1f8d:'\\u1f05\\u03b9',0x1f8e:'\\u1f06\\u03b9',\n0x1f8f:'\\u1f07\\u03b9',0x1f90:'\\u1f20\\u03b9',0x1f91:'\\u1f21\\u03b9',0x1f92:'\\u1f22\\u03b9',\n0x1f93:'\\u1f23\\u03b9',0x1f94:'\\u1f24\\u03b9',0x1f95:'\\u1f25\\u03b9',0x1f96:'\\u1f26\\u03b9',\n0x1f97:'\\u1f27\\u03b9',0x1f98:'\\u1f20\\u03b9',0x1f99:'\\u1f21\\u03b9',0x1f9a:'\\u1f22\\u03b9',\n0x1f9b:'\\u1f23\\u03b9',0x1f9c:'\\u1f24\\u03b9',0x1f9d:'\\u1f25\\u03b9',0x1f9e:'\\u1f26\\u03b9',\n0x1f9f:'\\u1f27\\u03b9',0x1fa0:'\\u1f60\\u03b9',0x1fa1:'\\u1f61\\u03b9',0x1fa2:'\\u1f62\\u03b9',\n0x1fa3:'\\u1f63\\u03b9',0x1fa4:'\\u1f64\\u03b9',0x1fa5:'\\u1f65\\u03b9',0x1fa6:'\\u1f66\\u03b9',\n0x1fa7:'\\u1f67\\u03b9',0x1fa8:'\\u1f60\\u03b9',0x1fa9:'\\u1f61\\u03b9',0x1faa:'\\u1f62\\u03b9',\n0x1fab:'\\u1f63\\u03b9',0x1fac:'\\u1f64\\u03b9',0x1fad:'\\u1f65\\u03b9',0x1fae:'\\u1f66\\u03b9',\n0x1faf:'\\u1f67\\u03b9',0x1fb2:'\\u1f70\\u03b9',0x1fb3:'\\u03b1\\u03b9',0x1fb4:'\\u03ac\\u03b9',\n0x1fb6:'\\u03b1\\u0342',0x1fb7:'\\u03b1\\u0342\\u03b9',0x1fbc:'\\u03b1\\u03b9',0x1fbe:'\\u03b9',\n0x1fc2:'\\u1f74\\u03b9',0x1fc3:'\\u03b7\\u03b9',0x1fc4:'\\u03ae\\u03b9',0x1fc6:'\\u03b7\\u0342',\n0x1fc7:'\\u03b7\\u0342\\u03b9',0x1fcc:'\\u03b7\\u03b9',0x1fd2:'\\u03b9\\u0308\\u0300',0x1fd3:'\\u03b9\\u0308\\u0301',\n0x1fd6:'\\u03b9\\u0342',0x1fd7:'\\u03b9\\u0308\\u0342',0x1fe2:'\\u03c5\\u0308\\u0300',0x1fe3:'\\u03c5\\u0308\\u0301',\n0x1fe4:'\\u03c1\\u0313',0x1fe6:'\\u03c5\\u0342',0x1fe7:'\\u03c5\\u0308\\u0342',0x1ff2:'\\u1f7c\\u03b9',\n0x1ff3:'\\u03c9\\u03b9',0x1ff4:'\\u03ce\\u03b9',0x1ff6:'\\u03c9\\u0342',0x1ff7:'\\u03c9\\u0342\\u03b9',\n0x1ffc:'\\u03c9\\u03b9',0x20a8:'rs',0x2102:'c',0x2103:'\\xb0c',\n0x2107:'\\u025b',0x2109:'\\xb0f',0x210b:'h',0x210c:'h',\n0x210d:'h',0x2110:'i',0x2111:'i',0x2112:'l',\n0x2115:'n',0x2116:'no',0x2119:'p',0x211a:'q',\n0x211b:'r',0x211c:'r',0x211d:'r',0x2120:'sm',\n0x2121:'tel',0x2122:'tm',0x2124:'z',0x2128:'z',\n0x212c:'b',0x212d:'c',0x2130:'e',0x2131:'f',\n0x2133:'m',0x213e:'\\u03b3',0x213f:'\\u03c0',0x2145:'d',\n0x3371:'hpa',0x3373:'au',0x3375:'ov',0x3380:'pa',\n0x3381:'na',0x3382:'\\u03bca',0x3383:'ma',0x3384:'ka',\n0x3385:'kb',0x3386:'mb',0x3387:'gb',0x338a:'pf',\n0x338b:'nf',0x338c:'\\u03bcf',0x3390:'hz',0x3391:'khz',\n0x3392:'mhz',0x3393:'ghz',0x3394:'thz',0x33a9:'pa',\n0x33aa:'kpa',0x33ab:'mpa',0x33ac:'gpa',0x33b4:'pv',\n0x33b5:'nv',0x33b6:'\\u03bcv',0x33b7:'mv',0x33b8:'kv',\n0x33b9:'mv',0x33ba:'pw',0x33bb:'nw',0x33bc:'\\u03bcw',\n0x33bd:'mw',0x33be:'kw',0x33bf:'mw',0x33c0:'k\\u03c9',\n0x33c1:'m\\u03c9',0x33c3:'bq',0x33c6:'c\\u2215kg',0x33c7:'co.',\n0x33c8:'db',0x33c9:'gy',0x33cb:'hp',0x33cd:'kk',\n0x33ce:'km',0x33d7:'ph',0x33d9:'ppm',0x33da:'pr',\n0x33dc:'sv',0x33dd:'wb',0xfb00:'ff',0xfb01:'fi',\n0xfb02:'fl',0xfb03:'ffi',0xfb04:'ffl',0xfb05:'st',\n0xfb06:'st',0xfb13:'\\u0574\\u0576',0xfb14:'\\u0574\\u0565',0xfb15:'\\u0574\\u056b',\n0xfb16:'\\u057e\\u0576',0xfb17:'\\u0574\\u056d',0x1d400:'a',0x1d401:'b',\n0x1d402:'c',0x1d403:'d',0x1d404:'e',0x1d405:'f',\n0x1d406:'g',0x1d407:'h',0x1d408:'i',0x1d409:'j',\n0x1d40a:'k',0x1d40b:'l',0x1d40c:'m',0x1d40d:'n',\n0x1d40e:'o',0x1d40f:'p',0x1d410:'q',0x1d411:'r',\n0x1d412:'s',0x1d413:'t',0x1d414:'u',0x1d415:'v',\n0x1d416:'w',0x1d417:'x',0x1d418:'y',0x1d419:'z',\n0x1d434:'a',0x1d435:'b',0x1d436:'c',0x1d437:'d',\n0x1d438:'e',0x1d439:'f',0x1d43a:'g',0x1d43b:'h',\n0x1d43c:'i',0x1d43d:'j',0x1d43e:'k',0x1d43f:'l',\n0x1d440:'m',0x1d441:'n',0x1d442:'o',0x1d443:'p',\n0x1d444:'q',0x1d445:'r',0x1d446:'s',0x1d447:'t',\n0x1d448:'u',0x1d449:'v',0x1d44a:'w',0x1d44b:'x',\n0x1d44c:'y',0x1d44d:'z',0x1d468:'a',0x1d469:'b',\n0x1d46a:'c',0x1d46b:'d',0x1d46c:'e',0x1d46d:'f',\n0x1d46e:'g',0x1d46f:'h',0x1d470:'i',0x1d471:'j',\n0x1d472:'k',0x1d473:'l',0x1d474:'m',0x1d475:'n',\n0x1d476:'o',0x1d477:'p',0x1d478:'q',0x1d479:'r',\n0x1d47a:'s',0x1d47b:'t',0x1d47c:'u',0x1d47d:'v',\n0x1d47e:'w',0x1d47f:'x',0x1d480:'y',0x1d481:'z',\n0x1d49c:'a',0x1d49e:'c',0x1d49f:'d',0x1d4a2:'g',\n0x1d4a5:'j',0x1d4a6:'k',0x1d4a9:'n',0x1d4aa:'o',\n0x1d4ab:'p',0x1d4ac:'q',0x1d4ae:'s',0x1d4af:'t',\n0x1d4b0:'u',0x1d4b1:'v',0x1d4b2:'w',0x1d4b3:'x',\n0x1d4b4:'y',0x1d4b5:'z',0x1d4d0:'a',0x1d4d1:'b',\n0x1d4d2:'c',0x1d4d3:'d',0x1d4d4:'e',0x1d4d5:'f',\n0x1d4d6:'g',0x1d4d7:'h',0x1d4d8:'i',0x1d4d9:'j',\n0x1d4da:'k',0x1d4db:'l',0x1d4dc:'m',0x1d4dd:'n',\n0x1d4de:'o',0x1d4df:'p',0x1d4e0:'q',0x1d4e1:'r',\n0x1d4e2:'s',0x1d4e3:'t',0x1d4e4:'u',0x1d4e5:'v',\n0x1d4e6:'w',0x1d4e7:'x',0x1d4e8:'y',0x1d4e9:'z',\n0x1d504:'a',0x1d505:'b',0x1d507:'d',0x1d508:'e',\n0x1d509:'f',0x1d50a:'g',0x1d50d:'j',0x1d50e:'k',\n0x1d50f:'l',0x1d510:'m',0x1d511:'n',0x1d512:'o',\n0x1d513:'p',0x1d514:'q',0x1d516:'s',0x1d517:'t',\n0x1d518:'u',0x1d519:'v',0x1d51a:'w',0x1d51b:'x',\n0x1d51c:'y',0x1d538:'a',0x1d539:'b',0x1d53b:'d',\n0x1d53c:'e',0x1d53d:'f',0x1d53e:'g',0x1d540:'i',\n0x1d541:'j',0x1d542:'k',0x1d543:'l',0x1d544:'m',\n0x1d546:'o',0x1d54a:'s',0x1d54b:'t',0x1d54c:'u',\n0x1d54d:'v',0x1d54e:'w',0x1d54f:'x',0x1d550:'y',\n0x1d56c:'a',0x1d56d:'b',0x1d56e:'c',0x1d56f:'d',\n0x1d570:'e',0x1d571:'f',0x1d572:'g',0x1d573:'h',\n0x1d574:'i',0x1d575:'j',0x1d576:'k',0x1d577:'l',\n0x1d578:'m',0x1d579:'n',0x1d57a:'o',0x1d57b:'p',\n0x1d57c:'q',0x1d57d:'r',0x1d57e:'s',0x1d57f:'t',\n0x1d580:'u',0x1d581:'v',0x1d582:'w',0x1d583:'x',\n0x1d584:'y',0x1d585:'z',0x1d5a0:'a',0x1d5a1:'b',\n0x1d5a2:'c',0x1d5a3:'d',0x1d5a4:'e',0x1d5a5:'f',\n0x1d5a6:'g',0x1d5a7:'h',0x1d5a8:'i',0x1d5a9:'j',\n0x1d5aa:'k',0x1d5ab:'l',0x1d5ac:'m',0x1d5ad:'n',\n0x1d5ae:'o',0x1d5af:'p',0x1d5b0:'q',0x1d5b1:'r',\n0x1d5b2:'s',0x1d5b3:'t',0x1d5b4:'u',0x1d5b5:'v',\n0x1d5b6:'w',0x1d5b7:'x',0x1d5b8:'y',0x1d5b9:'z',\n0x1d5d4:'a',0x1d5d5:'b',0x1d5d6:'c',0x1d5d7:'d',\n0x1d5d8:'e',0x1d5d9:'f',0x1d5da:'g',0x1d5db:'h',\n0x1d5dc:'i',0x1d5dd:'j',0x1d5de:'k',0x1d5df:'l',\n0x1d5e0:'m',0x1d5e1:'n',0x1d5e2:'o',0x1d5e3:'p',\n0x1d5e4:'q',0x1d5e5:'r',0x1d5e6:'s',0x1d5e7:'t',\n0x1d5e8:'u',0x1d5e9:'v',0x1d5ea:'w',0x1d5eb:'x',\n0x1d5ec:'y',0x1d5ed:'z',0x1d608:'a',0x1d609:'b',\n0x1d60a:'c',0x1d60b:'d',0x1d60c:'e',0x1d60d:'f',\n0x1d60e:'g',0x1d60f:'h',0x1d610:'i',0x1d611:'j',\n0x1d612:'k',0x1d613:'l',0x1d614:'m',0x1d615:'n',\n0x1d616:'o',0x1d617:'p',0x1d618:'q',0x1d619:'r',\n0x1d61a:'s',0x1d61b:'t',0x1d61c:'u',0x1d61d:'v',\n0x1d61e:'w',0x1d61f:'x',0x1d620:'y',0x1d621:'z',\n0x1d63c:'a',0x1d63d:'b',0x1d63e:'c',0x1d63f:'d',\n0x1d640:'e',0x1d641:'f',0x1d642:'g',0x1d643:'h',\n0x1d644:'i',0x1d645:'j',0x1d646:'k',0x1d647:'l',\n0x1d648:'m',0x1d649:'n',0x1d64a:'o',0x1d64b:'p',\n0x1d64c:'q',0x1d64d:'r',0x1d64e:'s',0x1d64f:'t',\n0x1d650:'u',0x1d651:'v',0x1d652:'w',0x1d653:'x',\n0x1d654:'y',0x1d655:'z',0x1d670:'a',0x1d671:'b',\n0x1d672:'c',0x1d673:'d',0x1d674:'e',0x1d675:'f',\n0x1d676:'g',0x1d677:'h',0x1d678:'i',0x1d679:'j',\n0x1d67a:'k',0x1d67b:'l',0x1d67c:'m',0x1d67d:'n',\n0x1d67e:'o',0x1d67f:'p',0x1d680:'q',0x1d681:'r',\n0x1d682:'s',0x1d683:'t',0x1d684:'u',0x1d685:'v',\n0x1d686:'w',0x1d687:'x',0x1d688:'y',0x1d689:'z',\n0x1d6a8:'\\u03b1',0x1d6a9:'\\u03b2',0x1d6aa:'\\u03b3',0x1d6ab:'\\u03b4',\n0x1d6ac:'\\u03b5',0x1d6ad:'\\u03b6',0x1d6ae:'\\u03b7',0x1d6af:'\\u03b8',\n0x1d6b0:'\\u03b9',0x1d6b1:'\\u03ba',0x1d6b2:'\\u03bb',0x1d6b3:'\\u03bc',\n0x1d6b4:'\\u03bd',0x1d6b5:'\\u03be',0x1d6b6:'\\u03bf',0x1d6b7:'\\u03c0',\n0x1d6b8:'\\u03c1',0x1d6b9:'\\u03b8',0x1d6ba:'\\u03c3',0x1d6bb:'\\u03c4',\n0x1d6bc:'\\u03c5',0x1d6bd:'\\u03c6',0x1d6be:'\\u03c7',0x1d6bf:'\\u03c8',\n0x1d6c0:'\\u03c9',0x1d6d3:'\\u03c3',0x1d6e2:'\\u03b1',0x1d6e3:'\\u03b2',\n0x1d6e4:'\\u03b3',0x1d6e5:'\\u03b4',0x1d6e6:'\\u03b5',0x1d6e7:'\\u03b6',\n0x1d6e8:'\\u03b7',0x1d6e9:'\\u03b8',0x1d6ea:'\\u03b9',0x1d6eb:'\\u03ba',\n0x1d6ec:'\\u03bb',0x1d6ed:'\\u03bc',0x1d6ee:'\\u03bd',0x1d6ef:'\\u03be',\n0x1d6f0:'\\u03bf',0x1d6f1:'\\u03c0',0x1d6f2:'\\u03c1',0x1d6f3:'\\u03b8',\n0x1d6f4:'\\u03c3',0x1d6f5:'\\u03c4',0x1d6f6:'\\u03c5',0x1d6f7:'\\u03c6',\n0x1d6f8:'\\u03c7',0x1d6f9:'\\u03c8',0x1d6fa:'\\u03c9',0x1d70d:'\\u03c3',\n0x1d71c:'\\u03b1',0x1d71d:'\\u03b2',0x1d71e:'\\u03b3',0x1d71f:'\\u03b4',\n0x1d720:'\\u03b5',0x1d721:'\\u03b6',0x1d722:'\\u03b7',0x1d723:'\\u03b8',\n0x1d724:'\\u03b9',0x1d725:'\\u03ba',0x1d726:'\\u03bb',0x1d727:'\\u03bc',\n0x1d728:'\\u03bd',0x1d729:'\\u03be',0x1d72a:'\\u03bf',0x1d72b:'\\u03c0',\n0x1d72c:'\\u03c1',0x1d72d:'\\u03b8',0x1d72e:'\\u03c3',0x1d72f:'\\u03c4',\n0x1d730:'\\u03c5',0x1d731:'\\u03c6',0x1d732:'\\u03c7',0x1d733:'\\u03c8',\n0x1d734:'\\u03c9',0x1d747:'\\u03c3',0x1d756:'\\u03b1',0x1d757:'\\u03b2',\n0x1d758:'\\u03b3',0x1d759:'\\u03b4',0x1d75a:'\\u03b5',0x1d75b:'\\u03b6',\n0x1d75c:'\\u03b7',0x1d75d:'\\u03b8',0x1d75e:'\\u03b9',0x1d75f:'\\u03ba',\n0x1d760:'\\u03bb',0x1d761:'\\u03bc',0x1d762:'\\u03bd',0x1d763:'\\u03be',\n0x1d764:'\\u03bf',0x1d765:'\\u03c0',0x1d766:'\\u03c1',0x1d767:'\\u03b8',\n0x1d768:'\\u03c3',0x1d769:'\\u03c4',0x1d76a:'\\u03c5',0x1d76b:'\\u03c6',\n0x1d76c:'\\u03c7',0x1d76d:'\\u03c8',0x1d76e:'\\u03c9',0x1d781:'\\u03c3',\n0x1d790:'\\u03b1',0x1d791:'\\u03b2',0x1d792:'\\u03b3',0x1d793:'\\u03b4',\n0x1d794:'\\u03b5',0x1d795:'\\u03b6',0x1d796:'\\u03b7',0x1d797:'\\u03b8',\n0x1d798:'\\u03b9',0x1d799:'\\u03ba',0x1d79a:'\\u03bb',0x1d79b:'\\u03bc',\n0x1d79c:'\\u03bd',0x1d79d:'\\u03be',0x1d79e:'\\u03bf',0x1d79f:'\\u03c0',\n0x1d7a0:'\\u03c1',0x1d7a1:'\\u03b8',0x1d7a2:'\\u03c3',0x1d7a3:'\\u03c4',\n0x1d7a4:'\\u03c5',0x1d7a5:'\\u03c6',0x1d7a6:'\\u03c7',0x1d7a7:'\\u03c8',\n0x1d7a8:'\\u03c9',0x1d7bb:'\\u03c3',}\n\ndef map_table_b3(code):\n r=b3_exceptions.get(ord(code))\n if r is not None :return r\n return code.lower()\n \n \ndef map_table_b2(a):\n al=map_table_b3(a)\n b=unicodedata.normalize(\"NFKC\",al)\n bl=\"\".join([map_table_b3(ch)for ch in b])\n c=unicodedata.normalize(\"NFKC\",bl)\n if b !=c:\n return c\n else :\n return al\n \n \ndef in_table_c11(code):\n return code ==\" \"\n \n \ndef in_table_c12(code):\n return unicodedata.category(code)==\"Zs\"and code !=\" \"\n \ndef in_table_c11_c12(code):\n return unicodedata.category(code)==\"Zs\"\n \n \ndef in_table_c21(code):\n return ord(code)<128 and unicodedata.category(code)==\"Cc\"\n \nc22_specials=set([1757,1807,6158,8204,8205,8232,8233,65279]+list(range(8288,8292))+list(range(8298,8304))+list(range(65529,65533))+list(range(119155,119163)))\ndef in_table_c22(code):\n c=ord(code)\n if c <128:return False\n if unicodedata.category(code)==\"Cc\":return True\n return c in c22_specials\n \ndef in_table_c21_c22(code):\n return unicodedata.category(code)==\"Cc\"or\\\n ord(code)in c22_specials\n \n \ndef in_table_c3(code):\n return unicodedata.category(code)==\"Co\"\n \n \ndef in_table_c4(code):\n c=ord(code)\n if c <0xFDD0:return False\n if c <0xFDF0:return True\n return (ord(code)&0xFFFF)in (0xFFFE,0xFFFF)\n \n \ndef in_table_c5(code):\n return unicodedata.category(code)==\"Cs\"\n \n \nc6_set=set(range(65529,65534))\ndef in_table_c6(code):\n return ord(code)in c6_set\n \n \nc7_set=set(range(12272,12284))\ndef in_table_c7(code):\n return ord(code)in c7_set\n \n \nc8_set=set([832,833,8206,8207]+list(range(8234,8239))+list(range(8298,8304)))\ndef in_table_c8(code):\n return ord(code)in c8_set\n \n \nc9_set=set([917505]+list(range(917536,917632)))\ndef in_table_c9(code):\n return ord(code)in c9_set\n \n \ndef in_table_d1(code):\n return unicodedata.bidirectional(code)in (\"R\",\"AL\")\n \n \ndef in_table_d2(code):\n return unicodedata.bidirectional(code)==\"L\"\n", ["unicodedata"]], "struct": [".py", "__all__=[\n\n'calcsize','pack','pack_into','unpack','unpack_from',\n'iter_unpack',\n\n\n'Struct',\n\n\n'error'\n]\n\nfrom _struct import *\nfrom _struct import _clearcache\nfrom _struct import __doc__\n", ["_struct"]], "subprocess": [".py", "\n\n\n\n\n\n\n\nr\"\"\"Subprocesses with accessible I/O streams\n\nThis module allows you to spawn processes, connect to their\ninput/output/error pipes, and obtain their return codes.\n\nFor a complete description of this module see the Python documentation.\n\nMain API\n========\nrun(...): Runs a command, waits for it to complete, then returns a\n CompletedProcess instance.\nPopen(...): A class for flexibly executing a command in a new process\n\nConstants\n---------\nDEVNULL: Special value that indicates that os.devnull should be used\nPIPE: Special value that indicates a pipe should be created\nSTDOUT: Special value that indicates that stderr should go to stdout\n\n\nOlder API\n=========\ncall(...): Runs a command, waits for it to complete, then returns\n the return code.\ncheck_call(...): Same as call() but raises CalledProcessError()\n if return code is not 0\ncheck_output(...): Same as check_call() but returns the contents of\n stdout instead of a return code\ngetoutput(...): Runs a command in the shell, waits for it to complete,\n then returns the output\ngetstatusoutput(...): Runs a command in the shell, waits for it to complete,\n then returns a (exitcode, output) tuple\n\"\"\"\n\nimport builtins\nimport errno\nimport io\nimport locale\nimport os\nimport time\nimport signal\nimport sys\nimport threading\nimport warnings\nimport contextlib\nfrom time import monotonic as _time\nimport types\n\ntry :\n import fcntl\nexcept ImportError:\n fcntl=None\n \n \n__all__=[\"Popen\",\"PIPE\",\"STDOUT\",\"call\",\"check_call\",\"getstatusoutput\",\n\"getoutput\",\"check_output\",\"run\",\"CalledProcessError\",\"DEVNULL\",\n\"SubprocessError\",\"TimeoutExpired\",\"CompletedProcess\"]\n\n\n\n\ntry :\n import msvcrt\nexcept ModuleNotFoundError:\n _mswindows=False\nelse :\n _mswindows=True\n \n \n_can_fork_exec=sys.platform not in {\"emscripten\",\"wasi\"}\n\nif _mswindows:\n import _winapi\n from _winapi import (CREATE_NEW_CONSOLE,CREATE_NEW_PROCESS_GROUP,\n STD_INPUT_HANDLE,STD_OUTPUT_HANDLE,\n STD_ERROR_HANDLE,SW_HIDE,\n STARTF_USESTDHANDLES,STARTF_USESHOWWINDOW,\n ABOVE_NORMAL_PRIORITY_CLASS,BELOW_NORMAL_PRIORITY_CLASS,\n HIGH_PRIORITY_CLASS,IDLE_PRIORITY_CLASS,\n NORMAL_PRIORITY_CLASS,REALTIME_PRIORITY_CLASS,\n CREATE_NO_WINDOW,DETACHED_PROCESS,\n CREATE_DEFAULT_ERROR_MODE,CREATE_BREAKAWAY_FROM_JOB)\n \n __all__.extend([\"CREATE_NEW_CONSOLE\",\"CREATE_NEW_PROCESS_GROUP\",\n \"STD_INPUT_HANDLE\",\"STD_OUTPUT_HANDLE\",\n \"STD_ERROR_HANDLE\",\"SW_HIDE\",\n \"STARTF_USESTDHANDLES\",\"STARTF_USESHOWWINDOW\",\n \"STARTUPINFO\",\n \"ABOVE_NORMAL_PRIORITY_CLASS\",\"BELOW_NORMAL_PRIORITY_CLASS\",\n \"HIGH_PRIORITY_CLASS\",\"IDLE_PRIORITY_CLASS\",\n \"NORMAL_PRIORITY_CLASS\",\"REALTIME_PRIORITY_CLASS\",\n \"CREATE_NO_WINDOW\",\"DETACHED_PROCESS\",\n \"CREATE_DEFAULT_ERROR_MODE\",\"CREATE_BREAKAWAY_FROM_JOB\"])\nelse :\n if _can_fork_exec:\n from _posixsubprocess import fork_exec as _fork_exec\n \n _waitpid=os.waitpid\n _waitstatus_to_exitcode=os.waitstatus_to_exitcode\n _WIFSTOPPED=os.WIFSTOPPED\n _WSTOPSIG=os.WSTOPSIG\n _WNOHANG=os.WNOHANG\n else :\n _fork_exec=None\n _waitpid=None\n _waitstatus_to_exitcode=None\n _WIFSTOPPED=None\n _WSTOPSIG=None\n _WNOHANG=None\n import select\n import selectors\n \n \n \nclass SubprocessError(Exception):pass\n\n\nclass CalledProcessError(SubprocessError):\n ''\n\n\n\n\n \n def __init__(self,returncode,cmd,output=None ,stderr=None ):\n self.returncode=returncode\n self.cmd=cmd\n self.output=output\n self.stderr=stderr\n \n def __str__(self):\n if self.returncode and self.returncode <0:\n try :\n return \"Command '%s' died with %r.\"%(\n self.cmd,signal.Signals(-self.returncode))\n except ValueError:\n return \"Command '%s' died with unknown signal %d.\"%(\n self.cmd,-self.returncode)\n else :\n return \"Command '%s' returned non-zero exit status %d.\"%(\n self.cmd,self.returncode)\n \n @property\n def stdout(self):\n ''\n return self.output\n \n @stdout.setter\n def stdout(self,value):\n \n \n self.output=value\n \n \nclass TimeoutExpired(SubprocessError):\n ''\n\n\n\n\n \n def __init__(self,cmd,timeout,output=None ,stderr=None ):\n self.cmd=cmd\n self.timeout=timeout\n self.output=output\n self.stderr=stderr\n \n def __str__(self):\n return (\"Command '%s' timed out after %s seconds\"%\n (self.cmd,self.timeout))\n \n @property\n def stdout(self):\n return self.output\n \n @stdout.setter\n def stdout(self,value):\n \n \n self.output=value\n \n \nif _mswindows:\n class STARTUPINFO:\n def __init__(self,*,dwFlags=0,hStdInput=None ,hStdOutput=None ,\n hStdError=None ,wShowWindow=0,lpAttributeList=None ):\n self.dwFlags=dwFlags\n self.hStdInput=hStdInput\n self.hStdOutput=hStdOutput\n self.hStdError=hStdError\n self.wShowWindow=wShowWindow\n self.lpAttributeList=lpAttributeList or {\"handle_list\":[]}\n \n def copy(self):\n attr_list=self.lpAttributeList.copy()\n if 'handle_list'in attr_list:\n attr_list['handle_list']=list(attr_list['handle_list'])\n \n return STARTUPINFO(dwFlags=self.dwFlags,\n hStdInput=self.hStdInput,\n hStdOutput=self.hStdOutput,\n hStdError=self.hStdError,\n wShowWindow=self.wShowWindow,\n lpAttributeList=attr_list)\n \n \n class Handle(int):\n closed=False\n \n def Close(self,CloseHandle=_winapi.CloseHandle):\n if not self.closed:\n self.closed=True\n CloseHandle(self)\n \n def Detach(self):\n if not self.closed:\n self.closed=True\n return int(self)\n raise ValueError(\"already closed\")\n \n def __repr__(self):\n return \"%s(%d)\"%(self.__class__.__name__,int(self))\n \n __del__=Close\nelse :\n\n\n\n _PIPE_BUF=getattr(select,'PIPE_BUF',512)\n \n \n \n \n if hasattr(selectors,'PollSelector'):\n _PopenSelector=selectors.PollSelector\n else :\n _PopenSelector=selectors.SelectSelector\n \n \nif _mswindows:\n\n\n\n\n\n\n\n\n _active=None\n \n def _cleanup():\n pass\nelse :\n\n\n\n\n _active=[]\n \n def _cleanup():\n if _active is None :\n return\n for inst in _active[:]:\n res=inst._internal_poll(_deadstate=sys.maxsize)\n if res is not None :\n try :\n _active.remove(inst)\n except ValueError:\n \n \n pass\n \nPIPE=-1\nSTDOUT=-2\nDEVNULL=-3\n\n\n\n\n\n\ndef _optim_args_from_interpreter_flags():\n ''\n \n args=[]\n value=sys.flags.optimize\n if value >0:\n args.append('-'+'O'*value)\n return args\n \n \ndef _args_from_interpreter_flags():\n ''\n \n flag_opt_map={\n 'debug':'d',\n \n \n 'dont_write_bytecode':'B',\n 'no_site':'S',\n 'verbose':'v',\n 'bytes_warning':'b',\n 'quiet':'q',\n \n }\n args=_optim_args_from_interpreter_flags()\n for flag,opt in flag_opt_map.items():\n v=getattr(sys.flags,flag)\n if v >0:\n args.append('-'+opt *v)\n \n if sys.flags.isolated:\n args.append('-I')\n else :\n if sys.flags.ignore_environment:\n args.append('-E')\n if sys.flags.no_user_site:\n args.append('-s')\n if sys.flags.safe_path:\n args.append('-P')\n \n \n warnopts=sys.warnoptions[:]\n xoptions=getattr(sys,'_xoptions',{})\n bytes_warning=sys.flags.bytes_warning\n dev_mode=sys.flags.dev_mode\n \n if bytes_warning >1:\n warnopts.remove(\"error::BytesWarning\")\n elif bytes_warning:\n warnopts.remove(\"default::BytesWarning\")\n if dev_mode:\n warnopts.remove('default')\n for opt in warnopts:\n args.append('-W'+opt)\n \n \n if dev_mode:\n args.extend(('-X','dev'))\n for opt in ('faulthandler','tracemalloc','importtime',\n 'showrefcount','utf8'):\n if opt in xoptions:\n value=xoptions[opt]\n if value is True :\n arg=opt\n else :\n arg='%s=%s'%(opt,value)\n args.extend(('-X',arg))\n \n return args\n \n \ndef _text_encoding():\n\n\n if sys.flags.warn_default_encoding:\n f=sys._getframe()\n filename=f.f_code.co_filename\n stacklevel=2\n while f :=f.f_back:\n if f.f_code.co_filename !=filename:\n break\n stacklevel +=1\n warnings.warn(\"'encoding' argument not specified.\",\n EncodingWarning,stacklevel)\n \n if sys.flags.utf8_mode:\n return \"utf-8\"\n else :\n return locale.getencoding()\n \n \ndef call(*popenargs,timeout=None ,**kwargs):\n ''\n\n\n\n\n\n \n with Popen(*popenargs,**kwargs)as p:\n try :\n return p.wait(timeout=timeout)\n except :\n p.kill()\n \n raise\n \n \ndef check_call(*popenargs,**kwargs):\n ''\n\n\n\n\n\n\n\n \n retcode=call(*popenargs,**kwargs)\n if retcode:\n cmd=kwargs.get(\"args\")\n if cmd is None :\n cmd=popenargs[0]\n raise CalledProcessError(retcode,cmd)\n return 0\n \n \ndef check_output(*popenargs,timeout=None ,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n for kw in ('stdout','check'):\n if kw in kwargs:\n raise ValueError(f'{kw} argument not allowed, it will be overridden.')\n \n if 'input'in kwargs and kwargs['input']is None :\n \n \n if kwargs.get('universal_newlines')or kwargs.get('text'):\n empty=''\n else :\n empty=b''\n kwargs['input']=empty\n \n return run(*popenargs,stdout=PIPE,timeout=timeout,check=True ,\n **kwargs).stdout\n \n \nclass CompletedProcess(object):\n ''\n\n\n\n\n\n\n\n\n \n def __init__(self,args,returncode,stdout=None ,stderr=None ):\n self.args=args\n self.returncode=returncode\n self.stdout=stdout\n self.stderr=stderr\n \n def __repr__(self):\n args=['args={!r}'.format(self.args),\n 'returncode={!r}'.format(self.returncode)]\n if self.stdout is not None :\n args.append('stdout={!r}'.format(self.stdout))\n if self.stderr is not None :\n args.append('stderr={!r}'.format(self.stderr))\n return \"{}({})\".format(type(self).__name__,', '.join(args))\n \n __class_getitem__=classmethod(types.GenericAlias)\n \n \n def check_returncode(self):\n ''\n if self.returncode:\n raise CalledProcessError(self.returncode,self.args,self.stdout,\n self.stderr)\n \n \ndef run(*popenargs,\ninput=None ,capture_output=False ,timeout=None ,check=False ,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if input is not None :\n if kwargs.get('stdin')is not None :\n raise ValueError('stdin and input arguments may not both be used.')\n kwargs['stdin']=PIPE\n \n if capture_output:\n if kwargs.get('stdout')is not None or kwargs.get('stderr')is not None :\n raise ValueError('stdout and stderr arguments may not be used '\n 'with capture_output.')\n kwargs['stdout']=PIPE\n kwargs['stderr']=PIPE\n \n with Popen(*popenargs,**kwargs)as process:\n try :\n stdout,stderr=process.communicate(input,timeout=timeout)\n except TimeoutExpired as exc:\n process.kill()\n if _mswindows:\n \n \n \n \n \n exc.stdout,exc.stderr=process.communicate()\n else :\n \n \n process.wait()\n raise\n except :\n process.kill()\n \n raise\n retcode=process.poll()\n if check and retcode:\n raise CalledProcessError(retcode,process.args,\n output=stdout,stderr=stderr)\n return CompletedProcess(process.args,retcode,stdout,stderr)\n \n \ndef list2cmdline(seq):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n result=[]\n needquote=False\n for arg in map(os.fsdecode,seq):\n bs_buf=[]\n \n \n if result:\n result.append(' ')\n \n needquote=(\" \"in arg)or (\"\\t\"in arg)or not arg\n if needquote:\n result.append('\"')\n \n for c in arg:\n if c =='\\\\':\n \n bs_buf.append(c)\n elif c =='\"':\n \n result.append('\\\\'*len(bs_buf)*2)\n bs_buf=[]\n result.append('\\\\\"')\n else :\n \n if bs_buf:\n result.extend(bs_buf)\n bs_buf=[]\n result.append(c)\n \n \n if bs_buf:\n result.extend(bs_buf)\n \n if needquote:\n result.extend(bs_buf)\n result.append('\"')\n \n return ''.join(result)\n \n \n \n \n \ndef getstatusoutput(cmd,*,encoding=None ,errors=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n data=check_output(cmd,shell=True ,text=True ,stderr=STDOUT,\n encoding=encoding,errors=errors)\n exitcode=0\n except CalledProcessError as ex:\n data=ex.output\n exitcode=ex.returncode\n if data[-1:]=='\\n':\n data=data[:-1]\n return exitcode,data\n \ndef getoutput(cmd,*,encoding=None ,errors=None ):\n ''\n\n\n\n\n\n\n\n \n return getstatusoutput(cmd,encoding=encoding,errors=errors)[1]\n \n \n \ndef _use_posix_spawn():\n ''\n\n\n\n\n\n\n\n\n\n\n \n if _mswindows or not hasattr(os,'posix_spawn'):\n \n return False\n \n if sys.platform in ('darwin','sunos5'):\n \n \n return True\n \n \n try :\n ver=os.confstr('CS_GNU_LIBC_VERSION')\n \n parts=ver.split(maxsplit=1)\n if len(parts)!=2:\n \n raise ValueError\n libc=parts[0]\n version=tuple(map(int,parts[1].split('.')))\n \n if sys.platform =='linux'and libc =='glibc'and version >=(2,24):\n \n \n return True\n \n \n \n except (AttributeError,ValueError,OSError):\n \n pass\n \n \n return False\n \n \n \n \n_USE_POSIX_SPAWN=_use_posix_spawn()\n_USE_VFORK=True\n\n\nclass Popen:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n _child_created=False\n \n def __init__(self,args,bufsize=-1,executable=None ,\n stdin=None ,stdout=None ,stderr=None ,\n preexec_fn=None ,close_fds=True ,\n shell=False ,cwd=None ,env=None ,universal_newlines=None ,\n startupinfo=None ,creationflags=0,\n restore_signals=True ,start_new_session=False ,\n pass_fds=(),*,user=None ,group=None ,extra_groups=None ,\n encoding=None ,errors=None ,text=None ,umask=-1,pipesize=-1,\n process_group=None ):\n ''\n if not _can_fork_exec:\n raise OSError(\n errno.ENOTSUP,f\"{sys.platform} does not support processes.\"\n )\n \n _cleanup()\n \n \n \n \n \n self._waitpid_lock=threading.Lock()\n \n self._input=None\n self._communication_started=False\n if bufsize is None :\n bufsize=-1\n if not isinstance(bufsize,int):\n raise TypeError(\"bufsize must be an integer\")\n \n if pipesize is None :\n pipesize=-1\n if not isinstance(pipesize,int):\n raise TypeError(\"pipesize must be an integer\")\n \n if _mswindows:\n if preexec_fn is not None :\n raise ValueError(\"preexec_fn is not supported on Windows \"\n \"platforms\")\n else :\n \n if pass_fds and not close_fds:\n warnings.warn(\"pass_fds overriding close_fds.\",RuntimeWarning)\n close_fds=True\n if startupinfo is not None :\n raise ValueError(\"startupinfo is only supported on Windows \"\n \"platforms\")\n if creationflags !=0:\n raise ValueError(\"creationflags is only supported on Windows \"\n \"platforms\")\n \n self.args=args\n self.stdin=None\n self.stdout=None\n self.stderr=None\n self.pid=None\n self.returncode=None\n self.encoding=encoding\n self.errors=errors\n self.pipesize=pipesize\n \n \n if (text is not None and universal_newlines is not None\n and bool(universal_newlines)!=bool(text)):\n raise SubprocessError('Cannot disambiguate when both text '\n 'and universal_newlines are supplied but '\n 'different. Pass one or the other.')\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n (p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite)=self._get_handles(stdin,stdout,stderr)\n \n \n \n \n \n if _mswindows:\n if p2cwrite !=-1:\n p2cwrite=msvcrt.open_osfhandle(p2cwrite.Detach(),0)\n if c2pread !=-1:\n c2pread=msvcrt.open_osfhandle(c2pread.Detach(),0)\n if errread !=-1:\n errread=msvcrt.open_osfhandle(errread.Detach(),0)\n \n self.text_mode=encoding or errors or text or universal_newlines\n if self.text_mode and encoding is None :\n self.encoding=encoding=_text_encoding()\n \n \n \n \n self._sigint_wait_secs=0.25\n \n self._closed_child_pipe_fds=False\n \n if self.text_mode:\n if bufsize ==1:\n line_buffering=True\n \n \n bufsize=-1\n else :\n line_buffering=False\n \n if process_group is None :\n process_group=-1\n \n gid=None\n if group is not None :\n if not hasattr(os,'setregid'):\n raise ValueError(\"The 'group' parameter is not supported on the \"\n \"current platform\")\n \n elif isinstance(group,str):\n try :\n import grp\n except ImportError:\n raise ValueError(\"The group parameter cannot be a string \"\n \"on systems without the grp module\")\n \n gid=grp.getgrnam(group).gr_gid\n elif isinstance(group,int):\n gid=group\n else :\n raise TypeError(\"Group must be a string or an integer, not {}\"\n .format(type(group)))\n \n if gid <0:\n raise ValueError(f\"Group ID cannot be negative, got {gid}\")\n \n gids=None\n if extra_groups is not None :\n if not hasattr(os,'setgroups'):\n raise ValueError(\"The 'extra_groups' parameter is not \"\n \"supported on the current platform\")\n \n elif isinstance(extra_groups,str):\n raise ValueError(\"Groups must be a list, not a string\")\n \n gids=[]\n for extra_group in extra_groups:\n if isinstance(extra_group,str):\n try :\n import grp\n except ImportError:\n raise ValueError(\"Items in extra_groups cannot be \"\n \"strings on systems without the \"\n \"grp module\")\n \n gids.append(grp.getgrnam(extra_group).gr_gid)\n elif isinstance(extra_group,int):\n gids.append(extra_group)\n else :\n raise TypeError(\"Items in extra_groups must be a string \"\n \"or integer, not {}\"\n .format(type(extra_group)))\n \n \n \n for gid_check in gids:\n if gid_check <0:\n raise ValueError(f\"Group ID cannot be negative, got {gid_check}\")\n \n uid=None\n if user is not None :\n if not hasattr(os,'setreuid'):\n raise ValueError(\"The 'user' parameter is not supported on \"\n \"the current platform\")\n \n elif isinstance(user,str):\n try :\n import pwd\n except ImportError:\n raise ValueError(\"The user parameter cannot be a string \"\n \"on systems without the pwd module\")\n uid=pwd.getpwnam(user).pw_uid\n elif isinstance(user,int):\n uid=user\n else :\n raise TypeError(\"User must be a string or an integer\")\n \n if uid <0:\n raise ValueError(f\"User ID cannot be negative, got {uid}\")\n \n try :\n if p2cwrite !=-1:\n self.stdin=io.open(p2cwrite,'wb',bufsize)\n if self.text_mode:\n self.stdin=io.TextIOWrapper(self.stdin,write_through=True ,\n line_buffering=line_buffering,\n encoding=encoding,errors=errors)\n if c2pread !=-1:\n self.stdout=io.open(c2pread,'rb',bufsize)\n if self.text_mode:\n self.stdout=io.TextIOWrapper(self.stdout,\n encoding=encoding,errors=errors)\n if errread !=-1:\n self.stderr=io.open(errread,'rb',bufsize)\n if self.text_mode:\n self.stderr=io.TextIOWrapper(self.stderr,\n encoding=encoding,errors=errors)\n \n self._execute_child(args,executable,preexec_fn,close_fds,\n pass_fds,cwd,env,\n startupinfo,creationflags,shell,\n p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite,\n restore_signals,\n gid,gids,uid,umask,\n start_new_session,process_group)\n except :\n \n for f in filter(None ,(self.stdin,self.stdout,self.stderr)):\n try :\n f.close()\n except OSError:\n pass\n \n if not self._closed_child_pipe_fds:\n to_close=[]\n if stdin ==PIPE:\n to_close.append(p2cread)\n if stdout ==PIPE:\n to_close.append(c2pwrite)\n if stderr ==PIPE:\n to_close.append(errwrite)\n if hasattr(self,'_devnull'):\n to_close.append(self._devnull)\n for fd in to_close:\n try :\n if _mswindows and isinstance(fd,Handle):\n fd.Close()\n else :\n os.close(fd)\n except OSError:\n pass\n \n raise\n \n def __repr__(self):\n obj_repr=(\n f\"<{self.__class__.__name__}: \"\n f\"returncode: {self.returncode} args: {self.args!r}>\"\n )\n if len(obj_repr)>80:\n obj_repr=obj_repr[:76]+\"...>\"\n return obj_repr\n \n __class_getitem__=classmethod(types.GenericAlias)\n \n @property\n def universal_newlines(self):\n \n \n return self.text_mode\n \n @universal_newlines.setter\n def universal_newlines(self,universal_newlines):\n self.text_mode=bool(universal_newlines)\n \n def _translate_newlines(self,data,encoding,errors):\n data=data.decode(encoding,errors)\n return data.replace(\"\\r\\n\",\"\\n\").replace(\"\\r\",\"\\n\")\n \n def __enter__(self):\n return self\n \n def __exit__(self,exc_type,value,traceback):\n if self.stdout:\n self.stdout.close()\n if self.stderr:\n self.stderr.close()\n try :\n if self.stdin:\n self.stdin.close()\n finally :\n if exc_type ==KeyboardInterrupt:\n \n \n \n \n \n \n \n if self._sigint_wait_secs >0:\n try :\n self._wait(timeout=self._sigint_wait_secs)\n except TimeoutExpired:\n pass\n self._sigint_wait_secs=0\n return\n \n \n self.wait()\n \n def __del__(self,_maxsize=sys.maxsize,_warn=warnings.warn):\n if not self._child_created:\n \n return\n if self.returncode is None :\n \n \n _warn(\"subprocess %s is still running\"%self.pid,\n ResourceWarning,source=self)\n \n self._internal_poll(_deadstate=_maxsize)\n if self.returncode is None and _active is not None :\n \n _active.append(self)\n \n def _get_devnull(self):\n if not hasattr(self,'_devnull'):\n self._devnull=os.open(os.devnull,os.O_RDWR)\n return self._devnull\n \n def _stdin_write(self,input):\n if input:\n try :\n self.stdin.write(input)\n except BrokenPipeError:\n pass\n except OSError as exc:\n if exc.errno ==errno.EINVAL:\n \n \n \n pass\n else :\n raise\n \n try :\n self.stdin.close()\n except BrokenPipeError:\n pass\n except OSError as exc:\n if exc.errno ==errno.EINVAL:\n pass\n else :\n raise\n \n def communicate(self,input=None ,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if self._communication_started and input:\n raise ValueError(\"Cannot send input after starting communication\")\n \n \n \n \n if (timeout is None and not self._communication_started and\n [self.stdin,self.stdout,self.stderr].count(None )>=2):\n stdout=None\n stderr=None\n if self.stdin:\n self._stdin_write(input)\n elif self.stdout:\n stdout=self.stdout.read()\n self.stdout.close()\n elif self.stderr:\n stderr=self.stderr.read()\n self.stderr.close()\n self.wait()\n else :\n if timeout is not None :\n endtime=_time()+timeout\n else :\n endtime=None\n \n try :\n stdout,stderr=self._communicate(input,endtime,timeout)\n except KeyboardInterrupt:\n \n \n if timeout is not None :\n sigint_timeout=min(self._sigint_wait_secs,\n self._remaining_time(endtime))\n else :\n sigint_timeout=self._sigint_wait_secs\n self._sigint_wait_secs=0\n try :\n self._wait(timeout=sigint_timeout)\n except TimeoutExpired:\n pass\n raise\n \n finally :\n self._communication_started=True\n \n sts=self.wait(timeout=self._remaining_time(endtime))\n \n return (stdout,stderr)\n \n \n def poll(self):\n ''\n \n return self._internal_poll()\n \n \n def _remaining_time(self,endtime):\n ''\n if endtime is None :\n return None\n else :\n return endtime -_time()\n \n \n def _check_timeout(self,endtime,orig_timeout,stdout_seq,stderr_seq,\n skip_check_and_raise=False ):\n ''\n if endtime is None :\n return\n if skip_check_and_raise or _time()>endtime:\n raise TimeoutExpired(\n self.args,orig_timeout,\n output=b''.join(stdout_seq)if stdout_seq else None ,\n stderr=b''.join(stderr_seq)if stderr_seq else None )\n \n \n def wait(self,timeout=None ):\n ''\n if timeout is not None :\n endtime=_time()+timeout\n try :\n return self._wait(timeout=timeout)\n except KeyboardInterrupt:\n \n \n \n \n if timeout is not None :\n sigint_timeout=min(self._sigint_wait_secs,\n self._remaining_time(endtime))\n else :\n sigint_timeout=self._sigint_wait_secs\n self._sigint_wait_secs=0\n try :\n self._wait(timeout=sigint_timeout)\n except TimeoutExpired:\n pass\n raise\n \n def _close_pipe_fds(self,\n p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite):\n \n devnull_fd=getattr(self,'_devnull',None )\n \n with contextlib.ExitStack()as stack:\n if _mswindows:\n if p2cread !=-1:\n stack.callback(p2cread.Close)\n if c2pwrite !=-1:\n stack.callback(c2pwrite.Close)\n if errwrite !=-1:\n stack.callback(errwrite.Close)\n else :\n if p2cread !=-1 and p2cwrite !=-1 and p2cread !=devnull_fd:\n stack.callback(os.close,p2cread)\n if c2pwrite !=-1 and c2pread !=-1 and c2pwrite !=devnull_fd:\n stack.callback(os.close,c2pwrite)\n if errwrite !=-1 and errread !=-1 and errwrite !=devnull_fd:\n stack.callback(os.close,errwrite)\n \n if devnull_fd is not None :\n stack.callback(os.close,devnull_fd)\n \n \n self._closed_child_pipe_fds=True\n \n if _mswindows:\n \n \n \n def _get_handles(self,stdin,stdout,stderr):\n ''\n\n \n if stdin is None and stdout is None and stderr is None :\n return (-1,-1,-1,-1,-1,-1)\n \n p2cread,p2cwrite=-1,-1\n c2pread,c2pwrite=-1,-1\n errread,errwrite=-1,-1\n \n if stdin is None :\n p2cread=_winapi.GetStdHandle(_winapi.STD_INPUT_HANDLE)\n if p2cread is None :\n p2cread,_=_winapi.CreatePipe(None ,0)\n p2cread=Handle(p2cread)\n _winapi.CloseHandle(_)\n elif stdin ==PIPE:\n p2cread,p2cwrite=_winapi.CreatePipe(None ,0)\n p2cread,p2cwrite=Handle(p2cread),Handle(p2cwrite)\n elif stdin ==DEVNULL:\n p2cread=msvcrt.get_osfhandle(self._get_devnull())\n elif isinstance(stdin,int):\n p2cread=msvcrt.get_osfhandle(stdin)\n else :\n \n p2cread=msvcrt.get_osfhandle(stdin.fileno())\n p2cread=self._make_inheritable(p2cread)\n \n if stdout is None :\n c2pwrite=_winapi.GetStdHandle(_winapi.STD_OUTPUT_HANDLE)\n if c2pwrite is None :\n _,c2pwrite=_winapi.CreatePipe(None ,0)\n c2pwrite=Handle(c2pwrite)\n _winapi.CloseHandle(_)\n elif stdout ==PIPE:\n c2pread,c2pwrite=_winapi.CreatePipe(None ,0)\n c2pread,c2pwrite=Handle(c2pread),Handle(c2pwrite)\n elif stdout ==DEVNULL:\n c2pwrite=msvcrt.get_osfhandle(self._get_devnull())\n elif isinstance(stdout,int):\n c2pwrite=msvcrt.get_osfhandle(stdout)\n else :\n \n c2pwrite=msvcrt.get_osfhandle(stdout.fileno())\n c2pwrite=self._make_inheritable(c2pwrite)\n \n if stderr is None :\n errwrite=_winapi.GetStdHandle(_winapi.STD_ERROR_HANDLE)\n if errwrite is None :\n _,errwrite=_winapi.CreatePipe(None ,0)\n errwrite=Handle(errwrite)\n _winapi.CloseHandle(_)\n elif stderr ==PIPE:\n errread,errwrite=_winapi.CreatePipe(None ,0)\n errread,errwrite=Handle(errread),Handle(errwrite)\n elif stderr ==STDOUT:\n errwrite=c2pwrite\n elif stderr ==DEVNULL:\n errwrite=msvcrt.get_osfhandle(self._get_devnull())\n elif isinstance(stderr,int):\n errwrite=msvcrt.get_osfhandle(stderr)\n else :\n \n errwrite=msvcrt.get_osfhandle(stderr.fileno())\n errwrite=self._make_inheritable(errwrite)\n \n return (p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite)\n \n \n def _make_inheritable(self,handle):\n ''\n h=_winapi.DuplicateHandle(\n _winapi.GetCurrentProcess(),handle,\n _winapi.GetCurrentProcess(),0,1,\n _winapi.DUPLICATE_SAME_ACCESS)\n return Handle(h)\n \n \n def _filter_handle_list(self,handle_list):\n ''\n\n \n \n \n \n return list({handle for handle in handle_list\n if handle&0x3 !=0x3\n or _winapi.GetFileType(handle)!=\n _winapi.FILE_TYPE_CHAR})\n \n \n def _execute_child(self,args,executable,preexec_fn,close_fds,\n pass_fds,cwd,env,\n startupinfo,creationflags,shell,\n p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite,\n unused_restore_signals,\n unused_gid,unused_gids,unused_uid,\n unused_umask,\n unused_start_new_session,unused_process_group):\n ''\n \n assert not pass_fds,\"pass_fds not supported on Windows.\"\n \n if isinstance(args,str):\n pass\n elif isinstance(args,bytes):\n if shell:\n raise TypeError('bytes args is not allowed on Windows')\n args=list2cmdline([args])\n elif isinstance(args,os.PathLike):\n if shell:\n raise TypeError('path-like args is not allowed when '\n 'shell is true')\n args=list2cmdline([args])\n else :\n args=list2cmdline(args)\n \n if executable is not None :\n executable=os.fsdecode(executable)\n \n \n if startupinfo is None :\n startupinfo=STARTUPINFO()\n else :\n \n \n startupinfo=startupinfo.copy()\n \n use_std_handles=-1 not in (p2cread,c2pwrite,errwrite)\n if use_std_handles:\n startupinfo.dwFlags |=_winapi.STARTF_USESTDHANDLES\n startupinfo.hStdInput=p2cread\n startupinfo.hStdOutput=c2pwrite\n startupinfo.hStdError=errwrite\n \n attribute_list=startupinfo.lpAttributeList\n have_handle_list=bool(attribute_list and\n \"handle_list\"in attribute_list and\n attribute_list[\"handle_list\"])\n \n \n if have_handle_list or (use_std_handles and close_fds):\n if attribute_list is None :\n attribute_list=startupinfo.lpAttributeList={}\n handle_list=attribute_list[\"handle_list\"]=\\\n list(attribute_list.get(\"handle_list\",[]))\n \n if use_std_handles:\n handle_list +=[int(p2cread),int(c2pwrite),int(errwrite)]\n \n handle_list[:]=self._filter_handle_list(handle_list)\n \n if handle_list:\n if not close_fds:\n warnings.warn(\"startupinfo.lpAttributeList['handle_list'] \"\n \"overriding close_fds\",RuntimeWarning)\n \n \n \n \n close_fds=False\n \n if shell:\n startupinfo.dwFlags |=_winapi.STARTF_USESHOWWINDOW\n startupinfo.wShowWindow=_winapi.SW_HIDE\n comspec=os.environ.get(\"COMSPEC\",\"cmd.exe\")\n args='{} /c \"{}\"'.format(comspec,args)\n \n if cwd is not None :\n cwd=os.fsdecode(cwd)\n \n sys.audit(\"subprocess.Popen\",executable,args,cwd,env)\n \n \n try :\n hp,ht,pid,tid=_winapi.CreateProcess(executable,args,\n \n None ,None ,\n int(not close_fds),\n creationflags,\n env,\n cwd,\n startupinfo)\n finally :\n \n \n \n \n \n \n self._close_pipe_fds(p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite)\n \n \n self._child_created=True\n self._handle=Handle(hp)\n self.pid=pid\n _winapi.CloseHandle(ht)\n \n def _internal_poll(self,_deadstate=None ,\n _WaitForSingleObject=_winapi.WaitForSingleObject,\n _WAIT_OBJECT_0=_winapi.WAIT_OBJECT_0,\n _GetExitCodeProcess=_winapi.GetExitCodeProcess):\n ''\n\n\n\n\n\n \n if self.returncode is None :\n if _WaitForSingleObject(self._handle,0)==_WAIT_OBJECT_0:\n self.returncode=_GetExitCodeProcess(self._handle)\n return self.returncode\n \n \n def _wait(self,timeout):\n ''\n if timeout is None :\n timeout_millis=_winapi.INFINITE\n else :\n timeout_millis=int(timeout *1000)\n if self.returncode is None :\n \n result=_winapi.WaitForSingleObject(self._handle,\n timeout_millis)\n if result ==_winapi.WAIT_TIMEOUT:\n raise TimeoutExpired(self.args,timeout)\n self.returncode=_winapi.GetExitCodeProcess(self._handle)\n return self.returncode\n \n \n def _readerthread(self,fh,buffer):\n buffer.append(fh.read())\n fh.close()\n \n \n def _communicate(self,input,endtime,orig_timeout):\n \n \n if self.stdout and not hasattr(self,\"_stdout_buff\"):\n self._stdout_buff=[]\n self.stdout_thread=\\\n threading.Thread(target=self._readerthread,\n args=(self.stdout,self._stdout_buff))\n self.stdout_thread.daemon=True\n self.stdout_thread.start()\n if self.stderr and not hasattr(self,\"_stderr_buff\"):\n self._stderr_buff=[]\n self.stderr_thread=\\\n threading.Thread(target=self._readerthread,\n args=(self.stderr,self._stderr_buff))\n self.stderr_thread.daemon=True\n self.stderr_thread.start()\n \n if self.stdin:\n self._stdin_write(input)\n \n \n \n \n if self.stdout is not None :\n self.stdout_thread.join(self._remaining_time(endtime))\n if self.stdout_thread.is_alive():\n raise TimeoutExpired(self.args,orig_timeout)\n if self.stderr is not None :\n self.stderr_thread.join(self._remaining_time(endtime))\n if self.stderr_thread.is_alive():\n raise TimeoutExpired(self.args,orig_timeout)\n \n \n \n stdout=None\n stderr=None\n if self.stdout:\n stdout=self._stdout_buff\n self.stdout.close()\n if self.stderr:\n stderr=self._stderr_buff\n self.stderr.close()\n \n \n stdout=stdout[0]if stdout else None\n stderr=stderr[0]if stderr else None\n \n return (stdout,stderr)\n \n def send_signal(self,sig):\n ''\n \n if self.returncode is not None :\n return\n if sig ==signal.SIGTERM:\n self.terminate()\n elif sig ==signal.CTRL_C_EVENT:\n os.kill(self.pid,signal.CTRL_C_EVENT)\n elif sig ==signal.CTRL_BREAK_EVENT:\n os.kill(self.pid,signal.CTRL_BREAK_EVENT)\n else :\n raise ValueError(\"Unsupported signal: {}\".format(sig))\n \n def terminate(self):\n ''\n \n if self.returncode is not None :\n return\n try :\n _winapi.TerminateProcess(self._handle,1)\n except PermissionError:\n \n \n rc=_winapi.GetExitCodeProcess(self._handle)\n if rc ==_winapi.STILL_ACTIVE:\n raise\n self.returncode=rc\n \n kill=terminate\n \n else :\n \n \n \n def _get_handles(self,stdin,stdout,stderr):\n ''\n\n \n p2cread,p2cwrite=-1,-1\n c2pread,c2pwrite=-1,-1\n errread,errwrite=-1,-1\n \n if stdin is None :\n pass\n elif stdin ==PIPE:\n p2cread,p2cwrite=os.pipe()\n if self.pipesize >0 and hasattr(fcntl,\"F_SETPIPE_SZ\"):\n fcntl.fcntl(p2cwrite,fcntl.F_SETPIPE_SZ,self.pipesize)\n elif stdin ==DEVNULL:\n p2cread=self._get_devnull()\n elif isinstance(stdin,int):\n p2cread=stdin\n else :\n \n p2cread=stdin.fileno()\n \n if stdout is None :\n pass\n elif stdout ==PIPE:\n c2pread,c2pwrite=os.pipe()\n if self.pipesize >0 and hasattr(fcntl,\"F_SETPIPE_SZ\"):\n fcntl.fcntl(c2pwrite,fcntl.F_SETPIPE_SZ,self.pipesize)\n elif stdout ==DEVNULL:\n c2pwrite=self._get_devnull()\n elif isinstance(stdout,int):\n c2pwrite=stdout\n else :\n \n c2pwrite=stdout.fileno()\n \n if stderr is None :\n pass\n elif stderr ==PIPE:\n errread,errwrite=os.pipe()\n if self.pipesize >0 and hasattr(fcntl,\"F_SETPIPE_SZ\"):\n fcntl.fcntl(errwrite,fcntl.F_SETPIPE_SZ,self.pipesize)\n elif stderr ==STDOUT:\n if c2pwrite !=-1:\n errwrite=c2pwrite\n else :\n errwrite=sys.__stdout__.fileno()\n elif stderr ==DEVNULL:\n errwrite=self._get_devnull()\n elif isinstance(stderr,int):\n errwrite=stderr\n else :\n \n errwrite=stderr.fileno()\n \n return (p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite)\n \n \n def _posix_spawn(self,args,executable,env,restore_signals,\n p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite):\n ''\n if env is None :\n env=os.environ\n \n kwargs={}\n if restore_signals:\n \n sigset=[]\n for signame in ('SIGPIPE','SIGXFZ','SIGXFSZ'):\n signum=getattr(signal,signame,None )\n if signum is not None :\n sigset.append(signum)\n kwargs['setsigdef']=sigset\n \n file_actions=[]\n for fd in (p2cwrite,c2pread,errread):\n if fd !=-1:\n file_actions.append((os.POSIX_SPAWN_CLOSE,fd))\n for fd,fd2 in (\n (p2cread,0),\n (c2pwrite,1),\n (errwrite,2),\n ):\n if fd !=-1:\n file_actions.append((os.POSIX_SPAWN_DUP2,fd,fd2))\n if file_actions:\n kwargs['file_actions']=file_actions\n \n self.pid=os.posix_spawn(executable,args,env,**kwargs)\n self._child_created=True\n \n self._close_pipe_fds(p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite)\n \n def _execute_child(self,args,executable,preexec_fn,close_fds,\n pass_fds,cwd,env,\n startupinfo,creationflags,shell,\n p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite,\n restore_signals,\n gid,gids,uid,umask,\n start_new_session,process_group):\n ''\n \n if isinstance(args,(str,bytes)):\n args=[args]\n elif isinstance(args,os.PathLike):\n if shell:\n raise TypeError('path-like args is not allowed when '\n 'shell is true')\n args=[args]\n else :\n args=list(args)\n \n if shell:\n \n unix_shell=('/system/bin/sh'if\n hasattr(sys,'getandroidapilevel')else '/bin/sh')\n args=[unix_shell,\"-c\"]+args\n if executable:\n args[0]=executable\n \n if executable is None :\n executable=args[0]\n \n sys.audit(\"subprocess.Popen\",executable,args,cwd,env)\n \n if (_USE_POSIX_SPAWN\n and os.path.dirname(executable)\n and preexec_fn is None\n and not close_fds\n and not pass_fds\n and cwd is None\n and (p2cread ==-1 or p2cread >2)\n and (c2pwrite ==-1 or c2pwrite >2)\n and (errwrite ==-1 or errwrite >2)\n and not start_new_session\n and process_group ==-1\n and gid is None\n and gids is None\n and uid is None\n and umask <0):\n self._posix_spawn(args,executable,env,restore_signals,\n p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite)\n return\n \n orig_executable=executable\n \n \n \n \n errpipe_read,errpipe_write=os.pipe()\n \n low_fds_to_close=[]\n while errpipe_write <3:\n low_fds_to_close.append(errpipe_write)\n errpipe_write=os.dup(errpipe_write)\n for low_fd in low_fds_to_close:\n os.close(low_fd)\n try :\n try :\n \n \n \n \n \n if env is not None :\n env_list=[]\n for k,v in env.items():\n k=os.fsencode(k)\n if b'='in k:\n raise ValueError(\"illegal environment variable name\")\n env_list.append(k+b'='+os.fsencode(v))\n else :\n env_list=None\n executable=os.fsencode(executable)\n if os.path.dirname(executable):\n executable_list=(executable,)\n else :\n \n executable_list=tuple(\n os.path.join(os.fsencode(dir),executable)\n for dir in os.get_exec_path(env))\n fds_to_keep=set(pass_fds)\n fds_to_keep.add(errpipe_write)\n self.pid=_fork_exec(\n args,executable_list,\n close_fds,tuple(sorted(map(int,fds_to_keep))),\n cwd,env_list,\n p2cread,p2cwrite,c2pread,c2pwrite,\n errread,errwrite,\n errpipe_read,errpipe_write,\n restore_signals,start_new_session,\n process_group,gid,gids,uid,umask,\n preexec_fn,_USE_VFORK)\n self._child_created=True\n finally :\n \n os.close(errpipe_write)\n \n self._close_pipe_fds(p2cread,p2cwrite,\n c2pread,c2pwrite,\n errread,errwrite)\n \n \n \n errpipe_data=bytearray()\n while True :\n part=os.read(errpipe_read,50000)\n errpipe_data +=part\n if not part or len(errpipe_data)>50000:\n break\n finally :\n \n os.close(errpipe_read)\n \n if errpipe_data:\n try :\n pid,sts=os.waitpid(self.pid,0)\n if pid ==self.pid:\n self._handle_exitstatus(sts)\n else :\n self.returncode=sys.maxsize\n except ChildProcessError:\n pass\n \n try :\n exception_name,hex_errno,err_msg=(\n errpipe_data.split(b':',2))\n \n \n \n err_msg=err_msg.decode()\n except ValueError:\n exception_name=b'SubprocessError'\n hex_errno=b'0'\n err_msg='Bad exception data from child: {!r}'.format(\n bytes(errpipe_data))\n child_exception_type=getattr(\n builtins,exception_name.decode('ascii'),\n SubprocessError)\n if issubclass(child_exception_type,OSError)and hex_errno:\n errno_num=int(hex_errno,16)\n child_exec_never_called=(err_msg ==\"noexec\")\n if child_exec_never_called:\n err_msg=\"\"\n \n err_filename=cwd\n else :\n err_filename=orig_executable\n if errno_num !=0:\n err_msg=os.strerror(errno_num)\n raise child_exception_type(errno_num,err_msg,err_filename)\n raise child_exception_type(err_msg)\n \n \n def _handle_exitstatus(self,sts,\n _waitstatus_to_exitcode=_waitstatus_to_exitcode,\n _WIFSTOPPED=_WIFSTOPPED,\n _WSTOPSIG=_WSTOPSIG):\n ''\n \n \n if _WIFSTOPPED(sts):\n self.returncode=-_WSTOPSIG(sts)\n else :\n self.returncode=_waitstatus_to_exitcode(sts)\n \n def _internal_poll(self,_deadstate=None ,_waitpid=_waitpid,\n _WNOHANG=_WNOHANG,_ECHILD=errno.ECHILD):\n ''\n\n\n\n\n\n \n if self.returncode is None :\n if not self._waitpid_lock.acquire(False ):\n \n \n return None\n try :\n if self.returncode is not None :\n return self.returncode\n pid,sts=_waitpid(self.pid,_WNOHANG)\n if pid ==self.pid:\n self._handle_exitstatus(sts)\n except OSError as e:\n if _deadstate is not None :\n self.returncode=_deadstate\n elif e.errno ==_ECHILD:\n \n \n \n \n \n self.returncode=0\n finally :\n self._waitpid_lock.release()\n return self.returncode\n \n \n def _try_wait(self,wait_flags):\n ''\n try :\n (pid,sts)=os.waitpid(self.pid,wait_flags)\n except ChildProcessError:\n \n \n \n pid=self.pid\n sts=0\n return (pid,sts)\n \n \n def _wait(self,timeout):\n ''\n if self.returncode is not None :\n return self.returncode\n \n if timeout is not None :\n endtime=_time()+timeout\n \n \n delay=0.0005\n while True :\n if self._waitpid_lock.acquire(False ):\n try :\n if self.returncode is not None :\n break\n (pid,sts)=self._try_wait(os.WNOHANG)\n assert pid ==self.pid or pid ==0\n if pid ==self.pid:\n self._handle_exitstatus(sts)\n break\n finally :\n self._waitpid_lock.release()\n remaining=self._remaining_time(endtime)\n if remaining <=0:\n raise TimeoutExpired(self.args,timeout)\n delay=min(delay *2,remaining,.05)\n time.sleep(delay)\n else :\n while self.returncode is None :\n with self._waitpid_lock:\n if self.returncode is not None :\n break\n (pid,sts)=self._try_wait(0)\n \n \n \n if pid ==self.pid:\n self._handle_exitstatus(sts)\n return self.returncode\n \n \n def _communicate(self,input,endtime,orig_timeout):\n if self.stdin and not self._communication_started:\n \n \n try :\n self.stdin.flush()\n except BrokenPipeError:\n pass\n if not input:\n try :\n self.stdin.close()\n except BrokenPipeError:\n pass\n \n stdout=None\n stderr=None\n \n \n if not self._communication_started:\n self._fileobj2output={}\n if self.stdout:\n self._fileobj2output[self.stdout]=[]\n if self.stderr:\n self._fileobj2output[self.stderr]=[]\n \n if self.stdout:\n stdout=self._fileobj2output[self.stdout]\n if self.stderr:\n stderr=self._fileobj2output[self.stderr]\n \n self._save_input(input)\n \n if self._input:\n input_view=memoryview(self._input)\n \n with _PopenSelector()as selector:\n if self.stdin and input:\n selector.register(self.stdin,selectors.EVENT_WRITE)\n if self.stdout and not self.stdout.closed:\n selector.register(self.stdout,selectors.EVENT_READ)\n if self.stderr and not self.stderr.closed:\n selector.register(self.stderr,selectors.EVENT_READ)\n \n while selector.get_map():\n timeout=self._remaining_time(endtime)\n if timeout is not None and timeout <0:\n self._check_timeout(endtime,orig_timeout,\n stdout,stderr,\n skip_check_and_raise=True )\n raise RuntimeError(\n '_check_timeout(..., skip_check_and_raise=True) '\n 'failed to raise TimeoutExpired.')\n \n ready=selector.select(timeout)\n self._check_timeout(endtime,orig_timeout,stdout,stderr)\n \n \n \n \n for key,events in ready:\n if key.fileobj is self.stdin:\n chunk=input_view[self._input_offset:\n self._input_offset+_PIPE_BUF]\n try :\n self._input_offset +=os.write(key.fd,chunk)\n except BrokenPipeError:\n selector.unregister(key.fileobj)\n key.fileobj.close()\n else :\n if self._input_offset >=len(self._input):\n selector.unregister(key.fileobj)\n key.fileobj.close()\n elif key.fileobj in (self.stdout,self.stderr):\n data=os.read(key.fd,32768)\n if not data:\n selector.unregister(key.fileobj)\n key.fileobj.close()\n self._fileobj2output[key.fileobj].append(data)\n \n self.wait(timeout=self._remaining_time(endtime))\n \n \n if stdout is not None :\n stdout=b''.join(stdout)\n if stderr is not None :\n stderr=b''.join(stderr)\n \n \n \n if self.text_mode:\n if stdout is not None :\n stdout=self._translate_newlines(stdout,\n self.stdout.encoding,\n self.stdout.errors)\n if stderr is not None :\n stderr=self._translate_newlines(stderr,\n self.stderr.encoding,\n self.stderr.errors)\n \n return (stdout,stderr)\n \n \n def _save_input(self,input):\n \n \n \n if self.stdin and self._input is None :\n self._input_offset=0\n self._input=input\n if input is not None and self.text_mode:\n self._input=self._input.encode(self.stdin.encoding,\n self.stdin.errors)\n \n \n def send_signal(self,sig):\n ''\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n self.poll()\n if self.returncode is not None :\n \n return\n \n \n \n \n try :\n os.kill(self.pid,sig)\n except ProcessLookupError:\n \n pass\n \n def terminate(self):\n ''\n \n self.send_signal(signal.SIGTERM)\n \n def kill(self):\n ''\n \n self.send_signal(signal.SIGKILL)\n", ["_posixsubprocess", "_winapi", "builtins", "contextlib", "errno", "fcntl", "grp", "io", "locale", "msvcrt", "os", "pwd", "select", "selectors", "signal", "sys", "threading", "time", "types", "warnings"]], "symtable": [".py", "''\n\nimport _symtable\nfrom _symtable import (USE,DEF_GLOBAL,DEF_NONLOCAL,DEF_LOCAL,DEF_PARAM,\nDEF_IMPORT,DEF_BOUND,DEF_ANNOT,SCOPE_OFF,SCOPE_MASK,FREE,\nLOCAL,GLOBAL_IMPLICIT,GLOBAL_EXPLICIT,CELL)\n\nimport weakref\n\n__all__=[\"symtable\",\"SymbolTable\",\"Class\",\"Function\",\"Symbol\"]\n\ndef symtable(code,filename,compile_type):\n ''\n\n\n\n \n top=_symtable.symtable(code,filename,compile_type)\n return _newSymbolTable(top,filename)\n \nclass SymbolTableFactory:\n def __init__(self):\n self.__memo=weakref.WeakValueDictionary()\n \n def new(self,table,filename):\n if table.type ==_symtable.TYPE_FUNCTION:\n return Function(table,filename)\n if table.type ==_symtable.TYPE_CLASS:\n return Class(table,filename)\n return SymbolTable(table,filename)\n \n def __call__(self,table,filename):\n key=table,filename\n obj=self.__memo.get(key,None )\n if obj is None :\n obj=self.__memo[key]=self.new(table,filename)\n return obj\n \n_newSymbolTable=SymbolTableFactory()\n\n\nclass SymbolTable:\n\n def __init__(self,raw_table,filename):\n self._table=raw_table\n self._filename=filename\n self._symbols={}\n \n def __repr__(self):\n if self.__class__ ==SymbolTable:\n kind=\"\"\n else :\n kind=\"%s \"%self.__class__.__name__\n \n if self._table.name ==\"top\":\n return \"<{0}SymbolTable for module {1}>\".format(kind,self._filename)\n else :\n return \"<{0}SymbolTable for {1} in {2}>\".format(kind,\n self._table.name,\n self._filename)\n \n def get_type(self):\n ''\n\n\n\n \n if self._table.type ==_symtable.TYPE_MODULE:\n return \"module\"\n if self._table.type ==_symtable.TYPE_FUNCTION:\n return \"function\"\n if self._table.type ==_symtable.TYPE_CLASS:\n return \"class\"\n assert self._table.type in (1,2,3),\\\n \"unexpected type: {0}\".format(self._table.type)\n \n def get_id(self):\n ''\n \n return self._table.id\n \n def get_name(self):\n ''\n\n\n\n\n \n return self._table.name\n \n def get_lineno(self):\n ''\n\n \n return self._table.lineno\n \n def is_optimized(self):\n ''\n\n \n return bool(self._table.type ==_symtable.TYPE_FUNCTION)\n \n def is_nested(self):\n ''\n \n return bool(self._table.nested)\n \n def has_children(self):\n ''\n \n return bool(self._table.children)\n \n def get_identifiers(self):\n ''\n \n return self._table.symbols.keys()\n \n def lookup(self,name):\n ''\n\n\n \n sym=self._symbols.get(name)\n if sym is None :\n flags=self._table.symbols[name]\n namespaces=self.__check_children(name)\n module_scope=(self._table.name ==\"top\")\n sym=self._symbols[name]=Symbol(name,flags,namespaces,\n module_scope=module_scope)\n return sym\n \n def get_symbols(self):\n ''\n\n \n return [self.lookup(ident)for ident in self.get_identifiers()]\n \n def __check_children(self,name):\n return [_newSymbolTable(st,self._filename)\n for st in self._table.children\n if st.name ==name]\n \n def get_children(self):\n ''\n \n return [_newSymbolTable(st,self._filename)\n for st in self._table.children]\n \n \nclass Function(SymbolTable):\n\n\n __params=None\n __locals=None\n __frees=None\n __globals=None\n __nonlocals=None\n \n def __idents_matching(self,test_func):\n return tuple(ident for ident in self.get_identifiers()\n if test_func(self._table.symbols[ident]))\n \n def get_parameters(self):\n ''\n \n if self.__params is None :\n self.__params=self.__idents_matching(lambda x:x&DEF_PARAM)\n return self.__params\n \n def get_locals(self):\n ''\n \n if self.__locals is None :\n locs=(LOCAL,CELL)\n test=lambda x:((x >>SCOPE_OFF)&SCOPE_MASK)in locs\n self.__locals=self.__idents_matching(test)\n return self.__locals\n \n def get_globals(self):\n ''\n \n if self.__globals is None :\n glob=(GLOBAL_IMPLICIT,GLOBAL_EXPLICIT)\n test=lambda x:((x >>SCOPE_OFF)&SCOPE_MASK)in glob\n self.__globals=self.__idents_matching(test)\n return self.__globals\n \n def get_nonlocals(self):\n ''\n \n if self.__nonlocals is None :\n self.__nonlocals=self.__idents_matching(lambda x:x&DEF_NONLOCAL)\n return self.__nonlocals\n \n def get_frees(self):\n ''\n \n if self.__frees is None :\n is_free=lambda x:((x >>SCOPE_OFF)&SCOPE_MASK)==FREE\n self.__frees=self.__idents_matching(is_free)\n return self.__frees\n \n \nclass Class(SymbolTable):\n\n __methods=None\n \n def get_methods(self):\n ''\n \n if self.__methods is None :\n d={}\n for st in self._table.children:\n d[st.name]=1\n self.__methods=tuple(d)\n return self.__methods\n \n \nclass Symbol:\n\n def __init__(self,name,flags,namespaces=None ,*,module_scope=False ):\n self.__name=name\n self.__flags=flags\n self.__scope=(flags >>SCOPE_OFF)&SCOPE_MASK\n self.__namespaces=namespaces or ()\n self.__module_scope=module_scope\n \n def __repr__(self):\n return \"\".format(self.__name)\n \n def get_name(self):\n ''\n \n return self.__name\n \n def is_referenced(self):\n ''\n\n \n return bool(self.__flags&_symtable.USE)\n \n def is_parameter(self):\n ''\n \n return bool(self.__flags&DEF_PARAM)\n \n def is_global(self):\n ''\n \n return bool(self.__scope in (GLOBAL_IMPLICIT,GLOBAL_EXPLICIT)\n or (self.__module_scope and self.__flags&DEF_BOUND))\n \n def is_nonlocal(self):\n ''\n return bool(self.__flags&DEF_NONLOCAL)\n \n def is_declared_global(self):\n ''\n \n return bool(self.__scope ==GLOBAL_EXPLICIT)\n \n def is_local(self):\n ''\n \n return bool(self.__scope in (LOCAL,CELL)\n or (self.__module_scope and self.__flags&DEF_BOUND))\n \n def is_annotated(self):\n ''\n \n return bool(self.__flags&DEF_ANNOT)\n \n def is_free(self):\n ''\n\n \n return bool(self.__scope ==FREE)\n \n def is_imported(self):\n ''\n\n \n return bool(self.__flags&DEF_IMPORT)\n \n def is_assigned(self):\n ''\n return bool(self.__flags&DEF_LOCAL)\n \n def is_namespace(self):\n ''\n\n\n\n\n\n\n\n\n \n return bool(self.__namespaces)\n \n def get_namespaces(self):\n ''\n return self.__namespaces\n \n def get_namespace(self):\n ''\n\n\n\n \n if len(self.__namespaces)==0:\n raise ValueError(\"name is not bound to any namespaces\")\n elif len(self.__namespaces)>1:\n raise ValueError(\"name is bound to multiple namespaces\")\n else :\n return self.__namespaces[0]\n \nif __name__ ==\"__main__\":\n import os,sys\n with open(sys.argv[0])as f:\n src=f.read()\n mod=symtable(src,os.path.split(sys.argv[0])[1],\"exec\")\n for ident in mod.get_identifiers():\n info=mod.lookup(ident)\n print(info,info.is_local(),info.is_namespace())\n", ["_symtable", "os", "sys", "weakref"]], "sys": [".py", "\nfrom _sys import *\n\nimport browser\nimport javascript\n\nclass Error(Exception):\n pass\n \n_getframe=Getframe\n\nabiflags=0\n\ndef audit(event,*args):\n ''\n pass\n \nbrython_debug_mode=__BRYTHON__.get_option('debug')\n\nbase_exec_prefix=__BRYTHON__.brython_path\n\nbase_prefix=__BRYTHON__.brython_path\n\nbuiltin_module_names=__BRYTHON__.builtin_module_names\n\nbyteorder='little'\n\ndont_write_bytecode=True\n\nexec_prefix=__BRYTHON__.brython_path\n\nexecutable=__BRYTHON__.brython_path+'brython.js'\n\nargv=orig_argv=[__BRYTHON__.script_path]+list(__BRYTHON__.get_option('args'))\n\ndef displayhook(value):\n if value is not None :\n stdout.write(repr(value))\n \n__displayhook__=displayhook\n\ndef exit(i=None ):\n raise SystemExit('')\n \nclass flag_class:\n\n def __init__(self):\n self.debug=0\n self.inspect=0\n self.interactive=0\n self.optimize=0\n self.dont_write_bytecode=0\n self.no_user_site=0\n self.no_site=0\n self.ignore_environment=0\n self.verbose=0\n self.bytes_warning=0\n self.quiet=0\n self.hash_randomization=1\n self.isolated=0\n self.dev_mode=False\n self.utf8_mode=0\n self.warn_default_encoding=0\n \nflags=flag_class()\n\ndef getfilesystemencoding(*args,**kw):\n ''\n\n \n return 'utf-8'\n \ndef getfilesystemencodeerrors():\n return \"utf-8\"\n \ndef intern(string):\n return string\n \nclass int_info:\n bits_per_digit=30\n sizeof_digit=4\n default_max_str_digits=__BRYTHON__.int_max_str_digits\n str_digits_check_threshold=__BRYTHON__.str_digits_check_threshold\n \ndef get_int_max_str_digits():\n return __BRYTHON__.int_max_str_digits\n \ndef set_int_max_str_digits(value):\n try :\n value=int(value)\n except :\n raise ValueError(f\"'{value.__class__.__name__}' object \"\n \"cannot be interpreted as an integer\")\n if value !=0 and value =other\n \n raise Error(\"Error! I don't know how to compare!\")\n \n def __gt__(self,other):\n if isinstance(other,tuple):\n return (self.major,self.minor,self.micro)>other\n \n raise Error(\"Error! I don't know how to compare!\")\n \n def __le__(self,other):\n if isinstance(other,tuple):\n return (self.major,self.minor,self.micro)<=other\n \n raise Error(\"Error! I don't know how to compare!\")\n \n def __lt__(self,other):\n if isinstance(other,tuple):\n return (self.major,self.minor,self.micro)0:\n for name in tuple(variables):\n value=notdone[name]\n m1=re.search(_findvar1_rx,value)\n m2=re.search(_findvar2_rx,value)\n if m1 and m2:\n m=m1 if m1.start()=\"5\":\n osname=\"solaris\"\n release=f\"{int(release[0])-3}.{release[2:]}\"\n \n \n \n bitness={2147483647:\"32bit\",9223372036854775807:\"64bit\"}\n machine +=f\".{bitness[sys.maxsize]}\"\n \n elif osname[:3]==\"aix\":\n from _aix_support import aix_platform\n return aix_platform()\n elif osname[:6]==\"cygwin\":\n osname=\"cygwin\"\n import re\n rel_re=re.compile(r'[\\d.]+')\n m=rel_re.match(release)\n if m:\n release=m.group()\n elif osname[:6]==\"darwin\":\n import _osx_support\n osname,release,machine=_osx_support.get_platform_osx(\n get_config_vars(),\n osname,release,machine)\n \n return f\"{osname}-{release}-{machine}\"\n \n \ndef get_python_version():\n return _PY_VERSION_SHORT\n \n \ndef expand_makefile_vars(s,vars):\n ''\n\n\n\n\n\n \n import re\n \n \n \n \n \n \n \n while True :\n m=re.search(_findvar1_rx,s)or re.search(_findvar2_rx,s)\n if m:\n (beg,end)=m.span()\n s=s[0:beg]+vars.get(m.group(1))+s[end:]\n else :\n break\n return s\n \n \ndef _print_dict(title,data):\n for index,(key,value)in enumerate(sorted(data.items())):\n if index ==0:\n print(f'{title}: ')\n print(f'\\t{key} = \"{value}\"')\n \n \ndef _main():\n ''\n if '--generate-posix-vars'in sys.argv:\n _generate_posix_vars()\n return\n print(f'Platform: \"{get_platform()}\"')\n print(f'Python version: \"{get_python_version()}\"')\n print(f'Current installation scheme: \"{get_default_scheme()}\"')\n print()\n _print_dict('Paths',get_paths())\n print()\n _print_dict('Variables',get_config_vars())\n \n \nif __name__ =='__main__':\n _main()\n", ["_aix_support", "_imp", "_osx_support", "os", "os.path", "pprint", "re", "sys", "threading", "types", "warnings"]], "tabnanny": [".py", "#! /usr/bin/env python3\n\n\"\"\"The Tab Nanny despises ambiguous indentation. She knows no mercy.\n\ntabnanny -- Detection of ambiguous indentation\n\nFor the time being this module is intended to be called as a script.\nHowever it is possible to import it into an IDE and use the function\ncheck() described below.\n\nWarning: The API provided by this module is likely to change in future\nreleases; such changes may not be backward compatible.\n\"\"\"\n\n\n\n\n\n\n\n__version__=\"6\"\n\nimport os\nimport sys\nimport tokenize\n\n__all__=[\"check\",\"NannyNag\",\"process_tokens\"]\n\nverbose=0\nfilename_only=0\n\ndef errprint(*args):\n sep=\"\"\n for arg in args:\n sys.stderr.write(sep+str(arg))\n sep=\" \"\n sys.stderr.write(\"\\n\")\n sys.exit(1)\n \ndef main():\n import getopt\n \n global verbose,filename_only\n try :\n opts,args=getopt.getopt(sys.argv[1:],\"qv\")\n except getopt.error as msg:\n errprint(msg)\n for o,a in opts:\n if o =='-q':\n filename_only=filename_only+1\n if o =='-v':\n verbose=verbose+1\n if not args:\n errprint(\"Usage:\",sys.argv[0],\"[-v] file_or_directory ...\")\n for arg in args:\n check(arg)\n \nclass NannyNag(Exception):\n ''\n\n\n \n def __init__(self,lineno,msg,line):\n self.lineno,self.msg,self.line=lineno,msg,line\n def get_lineno(self):\n return self.lineno\n def get_msg(self):\n return self.msg\n def get_line(self):\n return self.line\n \ndef check(file):\n ''\n\n\n\n\n\n\n \n \n if os.path.isdir(file)and not os.path.islink(file):\n if verbose:\n print(\"%r: listing directory\"%(file,))\n names=os.listdir(file)\n for name in names:\n fullname=os.path.join(file,name)\n if (os.path.isdir(fullname)and\n not os.path.islink(fullname)or\n os.path.normcase(name[-3:])==\".py\"):\n check(fullname)\n return\n \n try :\n f=tokenize.open(file)\n except OSError as msg:\n errprint(\"%r: I/O Error: %s\"%(file,msg))\n return\n \n if verbose >1:\n print(\"checking %r ...\"%file)\n \n try :\n process_tokens(tokenize.generate_tokens(f.readline))\n \n except tokenize.TokenError as msg:\n errprint(\"%r: Token Error: %s\"%(file,msg))\n return\n \n except SyntaxError as msg:\n errprint(\"%r: Token Error: %s\"%(file,msg))\n return\n \n except IndentationError as msg:\n errprint(\"%r: Indentation Error: %s\"%(file,msg))\n return\n \n except NannyNag as nag:\n badline=nag.get_lineno()\n line=nag.get_line()\n if verbose:\n print(\"%r: *** Line %d: trouble in tab city! ***\"%(file,badline))\n print(\"offending line: %r\"%(line,))\n print(nag.get_msg())\n else :\n if ' 'in file:file='\"'+file+'\"'\n if filename_only:print(file)\n else :print(file,badline,repr(line))\n return\n \n finally :\n f.close()\n \n if verbose:\n print(\"%r: Clean bill of health.\"%(file,))\n \nclass Whitespace:\n\n S,T=' \\t'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n def __init__(self,ws):\n self.raw=ws\n S,T=Whitespace.S,Whitespace.T\n count=[]\n b=n=nt=0\n for ch in self.raw:\n if ch ==S:\n n=n+1\n b=b+1\n elif ch ==T:\n n=n+1\n nt=nt+1\n if b >=len(count):\n count=count+[0]*(b -len(count)+1)\n count[b]=count[b]+1\n b=0\n else :\n break\n self.n=n\n self.nt=nt\n self.norm=tuple(count),b\n self.is_simple=len(count)<=1\n \n \n \n def longest_run_of_spaces(self):\n count,trailing=self.norm\n return max(len(count)-1,trailing)\n \n def indent_level(self,tabsize):\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n count,trailing=self.norm\n il=0\n for i in range(tabsize,len(count)):\n il=il+i //tabsize *count[i]\n return trailing+tabsize *(il+self.nt)\n \n \n \n def equal(self,other):\n return self.norm ==other.norm\n \n \n \n \n \n def not_equal_witness(self,other):\n n=max(self.longest_run_of_spaces(),\n other.longest_run_of_spaces())+1\n a=[]\n for ts in range(1,n+1):\n if self.indent_level(ts)!=other.indent_level(ts):\n a.append((ts,\n self.indent_level(ts),\n other.indent_level(ts)))\n return a\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n def less(self,other):\n if self.n >=other.n:\n return False\n if self.is_simple and other.is_simple:\n return self.nt <=other.nt\n n=max(self.longest_run_of_spaces(),\n other.longest_run_of_spaces())+1\n \n for ts in range(2,n+1):\n if self.indent_level(ts)>=other.indent_level(ts):\n return False\n return True\n \n \n \n \n \n def not_less_witness(self,other):\n n=max(self.longest_run_of_spaces(),\n other.longest_run_of_spaces())+1\n a=[]\n for ts in range(1,n+1):\n if self.indent_level(ts)>=other.indent_level(ts):\n a.append((ts,\n self.indent_level(ts),\n other.indent_level(ts)))\n return a\n \ndef format_witnesses(w):\n firsts=(str(tup[0])for tup in w)\n prefix=\"at tab size\"\n if len(w)>1:\n prefix=prefix+\"s\"\n return prefix+\" \"+', '.join(firsts)\n \ndef process_tokens(tokens):\n try :\n _process_tokens(tokens)\n except TabError as e:\n raise NannyNag(e.lineno,e.msg,e.text)\n \ndef _process_tokens(tokens):\n INDENT=tokenize.INDENT\n DEDENT=tokenize.DEDENT\n NEWLINE=tokenize.NEWLINE\n JUNK=tokenize.COMMENT,tokenize.NL\n indents=[Whitespace(\"\")]\n check_equal=0\n \n for (type,token,start,end,line)in tokens:\n if type ==NEWLINE:\n \n \n \n \n \n check_equal=1\n \n elif type ==INDENT:\n check_equal=0\n thisguy=Whitespace(token)\n if not indents[-1].less(thisguy):\n witness=indents[-1].not_less_witness(thisguy)\n msg=\"indent not greater e.g. \"+format_witnesses(witness)\n raise NannyNag(start[0],msg,line)\n indents.append(thisguy)\n \n elif type ==DEDENT:\n \n \n \n \n \n \n \n \n \n check_equal=1\n \n del indents[-1]\n \n elif check_equal and type not in JUNK:\n \n \n \n \n \n \n check_equal=0\n thisguy=Whitespace(line)\n if not indents[-1].equal(thisguy):\n witness=indents[-1].not_equal_witness(thisguy)\n msg=\"indent not equal e.g. \"+format_witnesses(witness)\n raise NannyNag(start[0],msg,line)\n \n \nif __name__ =='__main__':\n main()\n", ["getopt", "os", "sys", "tokenize"]], "tarfile": [".py", "#!/usr/bin/env python3\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n''\n\n\nversion=\"0.9.0\"\n__author__=\"Lars Gust\\u00e4bel (lars@gustaebel.de)\"\n__credits__=\"Gustavo Niemeyer, Niels Gust\\u00e4bel, Richard Townsend.\"\n\n\n\n\nfrom builtins import open as bltn_open\nimport sys\nimport os\nimport io\nimport shutil\nimport stat\nimport time\nimport struct\nimport copy\nimport re\nimport warnings\n\ntry :\n import pwd\nexcept ImportError:\n pwd=None\ntry :\n import grp\nexcept ImportError:\n grp=None\n \n \n \n \nsymlink_exception=(AttributeError,NotImplementedError,OSError)\n\n\n__all__=[\"TarFile\",\"TarInfo\",\"is_tarfile\",\"TarError\",\"ReadError\",\n\"CompressionError\",\"StreamError\",\"ExtractError\",\"HeaderError\",\n\"ENCODING\",\"USTAR_FORMAT\",\"GNU_FORMAT\",\"PAX_FORMAT\",\n\"DEFAULT_FORMAT\",\"open\",\"fully_trusted_filter\",\"data_filter\",\n\"tar_filter\",\"FilterError\",\"AbsoluteLinkError\",\n\"OutsideDestinationError\",\"SpecialFileError\",\"AbsolutePathError\",\n\"LinkOutsideDestinationError\"]\n\n\n\n\n\nNUL=b\"\\0\"\nBLOCKSIZE=512\nRECORDSIZE=BLOCKSIZE *20\nGNU_MAGIC=b\"ustar \\0\"\nPOSIX_MAGIC=b\"ustar\\x0000\"\n\nLENGTH_NAME=100\nLENGTH_LINK=100\nLENGTH_PREFIX=155\n\nREGTYPE=b\"0\"\nAREGTYPE=b\"\\0\"\nLNKTYPE=b\"1\"\nSYMTYPE=b\"2\"\nCHRTYPE=b\"3\"\nBLKTYPE=b\"4\"\nDIRTYPE=b\"5\"\nFIFOTYPE=b\"6\"\nCONTTYPE=b\"7\"\n\nGNUTYPE_LONGNAME=b\"L\"\nGNUTYPE_LONGLINK=b\"K\"\nGNUTYPE_SPARSE=b\"S\"\n\nXHDTYPE=b\"x\"\nXGLTYPE=b\"g\"\nSOLARIS_XHDTYPE=b\"X\"\n\nUSTAR_FORMAT=0\nGNU_FORMAT=1\nPAX_FORMAT=2\nDEFAULT_FORMAT=PAX_FORMAT\n\n\n\n\n\nSUPPORTED_TYPES=(REGTYPE,AREGTYPE,LNKTYPE,\nSYMTYPE,DIRTYPE,FIFOTYPE,\nCONTTYPE,CHRTYPE,BLKTYPE,\nGNUTYPE_LONGNAME,GNUTYPE_LONGLINK,\nGNUTYPE_SPARSE)\n\n\nREGULAR_TYPES=(REGTYPE,AREGTYPE,\nCONTTYPE,GNUTYPE_SPARSE)\n\n\nGNU_TYPES=(GNUTYPE_LONGNAME,GNUTYPE_LONGLINK,\nGNUTYPE_SPARSE)\n\n\nPAX_FIELDS=(\"path\",\"linkpath\",\"size\",\"mtime\",\n\"uid\",\"gid\",\"uname\",\"gname\")\n\n\nPAX_NAME_FIELDS={\"path\",\"linkpath\",\"uname\",\"gname\"}\n\n\n\nPAX_NUMBER_FIELDS={\n\"atime\":float,\n\"ctime\":float,\n\"mtime\":float,\n\"uid\":int,\n\"gid\":int,\n\"size\":int\n}\n\n\n\n\nif os.name ==\"nt\":\n ENCODING=\"utf-8\"\nelse :\n ENCODING=sys.getfilesystemencoding()\n \n \n \n \n \ndef stn(s,length,encoding,errors):\n ''\n \n if s is None :\n raise ValueError(\"metadata cannot contain None\")\n s=s.encode(encoding,errors)\n return s[:length]+(length -len(s))*NUL\n \ndef nts(s,encoding,errors):\n ''\n \n p=s.find(b\"\\0\")\n if p !=-1:\n s=s[:p]\n return s.decode(encoding,errors)\n \ndef nti(s):\n ''\n \n \n \n if s[0]in (0o200,0o377):\n n=0\n for i in range(len(s)-1):\n n <<=8\n n +=s[i+1]\n if s[0]==0o377:\n n=-(256 **(len(s)-1)-n)\n else :\n try :\n s=nts(s,\"ascii\",\"strict\")\n n=int(s.strip()or \"0\",8)\n except ValueError:\n raise InvalidHeaderError(\"invalid header\")\n return n\n \ndef itn(n,digits=8,format=DEFAULT_FORMAT):\n ''\n \n \n \n \n \n \n \n \n \n original_n=n\n n=int(n)\n if 0 <=n <8 **(digits -1):\n s=bytes(\"%0*o\"%(digits -1,n),\"ascii\")+NUL\n elif format ==GNU_FORMAT and -256 **(digits -1)<=n <256 **(digits -1):\n if n >=0:\n s=bytearray([0o200])\n else :\n s=bytearray([0o377])\n n=256 **digits+n\n \n for i in range(digits -1):\n s.insert(1,n&0o377)\n n >>=8\n else :\n raise ValueError(\"overflow in number field\")\n \n return s\n \ndef calc_chksums(buf):\n ''\n\n\n\n\n\n\n \n unsigned_chksum=256+sum(struct.unpack_from(\"148B8x356B\",buf))\n signed_chksum=256+sum(struct.unpack_from(\"148b8x356b\",buf))\n return unsigned_chksum,signed_chksum\n \ndef copyfileobj(src,dst,length=None ,exception=OSError,bufsize=None ):\n ''\n\n \n bufsize=bufsize or 16 *1024\n if length ==0:\n return\n if length is None :\n shutil.copyfileobj(src,dst,bufsize)\n return\n \n blocks,remainder=divmod(length,bufsize)\n for b in range(blocks):\n buf=src.read(bufsize)\n if len(buf)self.bufsize:\n self.fileobj.write(self.buf[:self.bufsize])\n self.buf=self.buf[self.bufsize:]\n \n def close(self):\n ''\n\n \n if self.closed:\n return\n \n self.closed=True\n try :\n if self.mode ==\"w\"and self.comptype !=\"tar\":\n self.buf +=self.cmp.flush()\n \n if self.mode ==\"w\"and self.buf:\n self.fileobj.write(self.buf)\n self.buf=b\"\"\n if self.comptype ==\"gz\":\n self.fileobj.write(struct.pack(\"=0:\n blocks,remainder=divmod(pos -self.pos,self.bufsize)\n for i in range(blocks):\n self.read(self.bufsize)\n self.read(remainder)\n else :\n raise StreamError(\"seeking backwards is not allowed\")\n return self.pos\n \n def read(self,size):\n ''\n assert size is not None\n buf=self._read(size)\n self.pos +=len(buf)\n return buf\n \n def _read(self,size):\n ''\n \n if self.comptype ==\"tar\":\n return self.__read(size)\n \n c=len(self.dbuf)\n t=[self.dbuf]\n while c lastpos:\n self.map.append((False ,lastpos,offset,None ))\n self.map.append((True ,offset,offset+size,realpos))\n realpos +=size\n lastpos=offset+size\n if lastpos 0:\n while True :\n data,start,stop,offset=self.map[self.map_index]\n if start <=self.position \"%(self.__class__.__name__,self.name,id(self))\n \n def replace(self,*,\n name=_KEEP,mtime=_KEEP,mode=_KEEP,linkname=_KEEP,\n uid=_KEEP,gid=_KEEP,uname=_KEEP,gname=_KEEP,\n deep=True ,_KEEP=_KEEP):\n ''\n \n if deep:\n result=copy.deepcopy(self)\n else :\n result=copy.copy(self)\n if name is not _KEEP:\n result.name=name\n if mtime is not _KEEP:\n result.mtime=mtime\n if mode is not _KEEP:\n result.mode=mode\n if linkname is not _KEEP:\n result.linkname=linkname\n if uid is not _KEEP:\n result.uid=uid\n if gid is not _KEEP:\n result.gid=gid\n if uname is not _KEEP:\n result.uname=uname\n if gname is not _KEEP:\n result.gname=gname\n return result\n \n def get_info(self):\n ''\n \n if self.mode is None :\n mode=None\n else :\n mode=self.mode&0o7777\n info={\n \"name\":self.name,\n \"mode\":mode,\n \"uid\":self.uid,\n \"gid\":self.gid,\n \"size\":self.size,\n \"mtime\":self.mtime,\n \"chksum\":self.chksum,\n \"type\":self.type,\n \"linkname\":self.linkname,\n \"uname\":self.uname,\n \"gname\":self.gname,\n \"devmajor\":self.devmajor,\n \"devminor\":self.devminor\n }\n \n if info[\"type\"]==DIRTYPE and not info[\"name\"].endswith(\"/\"):\n info[\"name\"]+=\"/\"\n \n return info\n \n def tobuf(self,format=DEFAULT_FORMAT,encoding=ENCODING,errors=\"surrogateescape\"):\n ''\n \n info=self.get_info()\n for name,value in info.items():\n if value is None :\n raise ValueError(\"%s may not be None\"%name)\n \n if format ==USTAR_FORMAT:\n return self.create_ustar_header(info,encoding,errors)\n elif format ==GNU_FORMAT:\n return self.create_gnu_header(info,encoding,errors)\n elif format ==PAX_FORMAT:\n return self.create_pax_header(info,encoding)\n else :\n raise ValueError(\"invalid format\")\n \n def create_ustar_header(self,info,encoding,errors):\n ''\n \n info[\"magic\"]=POSIX_MAGIC\n \n if len(info[\"linkname\"].encode(encoding,errors))>LENGTH_LINK:\n raise ValueError(\"linkname is too long\")\n \n if len(info[\"name\"].encode(encoding,errors))>LENGTH_NAME:\n info[\"prefix\"],info[\"name\"]=self._posix_split_name(info[\"name\"],encoding,errors)\n \n return self._create_header(info,USTAR_FORMAT,encoding,errors)\n \n def create_gnu_header(self,info,encoding,errors):\n ''\n \n info[\"magic\"]=GNU_MAGIC\n \n buf=b\"\"\n if len(info[\"linkname\"].encode(encoding,errors))>LENGTH_LINK:\n buf +=self._create_gnu_long_header(info[\"linkname\"],GNUTYPE_LONGLINK,encoding,errors)\n \n if len(info[\"name\"].encode(encoding,errors))>LENGTH_NAME:\n buf +=self._create_gnu_long_header(info[\"name\"],GNUTYPE_LONGNAME,encoding,errors)\n \n return buf+self._create_header(info,GNU_FORMAT,encoding,errors)\n \n def create_pax_header(self,info,encoding):\n ''\n\n\n \n info[\"magic\"]=POSIX_MAGIC\n pax_headers=self.pax_headers.copy()\n \n \n \n for name,hname,length in (\n (\"name\",\"path\",LENGTH_NAME),(\"linkname\",\"linkpath\",LENGTH_LINK),\n (\"uname\",\"uname\",32),(\"gname\",\"gname\",32)):\n \n if hname in pax_headers:\n \n continue\n \n \n try :\n info[name].encode(\"ascii\",\"strict\")\n except UnicodeEncodeError:\n pax_headers[hname]=info[name]\n continue\n \n if len(info[name])>length:\n pax_headers[hname]=info[name]\n \n \n \n for name,digits in ((\"uid\",8),(\"gid\",8),(\"size\",12),(\"mtime\",12)):\n needs_pax=False\n \n val=info[name]\n val_is_float=isinstance(val,float)\n val_int=round(val)if val_is_float else val\n if not 0 <=val_int <8 **(digits -1):\n \n info[name]=0\n needs_pax=True\n elif val_is_float:\n \n \n info[name]=val_int\n needs_pax=True\n \n \n if needs_pax and name not in pax_headers:\n pax_headers[name]=str(val)\n \n \n if pax_headers:\n buf=self._create_pax_generic_header(pax_headers,XHDTYPE,encoding)\n else :\n buf=b\"\"\n \n return buf+self._create_header(info,USTAR_FORMAT,\"ascii\",\"replace\")\n \n @classmethod\n def create_pax_global_header(cls,pax_headers):\n ''\n \n return cls._create_pax_generic_header(pax_headers,XGLTYPE,\"utf-8\")\n \n def _posix_split_name(self,name,encoding,errors):\n ''\n\n \n components=name.split(\"/\")\n for i in range(1,len(components)):\n prefix=\"/\".join(components[:i])\n name=\"/\".join(components[i:])\n if len(prefix.encode(encoding,errors))<=LENGTH_PREFIX and\\\n len(name.encode(encoding,errors))<=LENGTH_NAME:\n break\n else :\n raise ValueError(\"name is too long\")\n \n return prefix,name\n \n @staticmethod\n def _create_header(info,format,encoding,errors):\n ''\n\n \n has_device_fields=info.get(\"type\")in (CHRTYPE,BLKTYPE)\n if has_device_fields:\n devmajor=itn(info.get(\"devmajor\",0),8,format)\n devminor=itn(info.get(\"devminor\",0),8,format)\n else :\n devmajor=stn(\"\",8,encoding,errors)\n devminor=stn(\"\",8,encoding,errors)\n \n \n \n filetype=info.get(\"type\",REGTYPE)\n if filetype is None :\n raise ValueError(\"TarInfo.type must not be None\")\n \n parts=[\n stn(info.get(\"name\",\"\"),100,encoding,errors),\n itn(info.get(\"mode\",0)&0o7777,8,format),\n itn(info.get(\"uid\",0),8,format),\n itn(info.get(\"gid\",0),8,format),\n itn(info.get(\"size\",0),12,format),\n itn(info.get(\"mtime\",0),12,format),\n b\" \",\n filetype,\n stn(info.get(\"linkname\",\"\"),100,encoding,errors),\n info.get(\"magic\",POSIX_MAGIC),\n stn(info.get(\"uname\",\"\"),32,encoding,errors),\n stn(info.get(\"gname\",\"\"),32,encoding,errors),\n devmajor,\n devminor,\n stn(info.get(\"prefix\",\"\"),155,encoding,errors)\n ]\n \n buf=struct.pack(\"%ds\"%BLOCKSIZE,b\"\".join(parts))\n chksum=calc_chksums(buf[-BLOCKSIZE:])[0]\n buf=buf[:-364]+bytes(\"%06o\\0\"%chksum,\"ascii\")+buf[-357:]\n return buf\n \n @staticmethod\n def _create_payload(payload):\n ''\n\n \n blocks,remainder=divmod(len(payload),BLOCKSIZE)\n if remainder >0:\n payload +=(BLOCKSIZE -remainder)*NUL\n return payload\n \n @classmethod\n def _create_gnu_long_header(cls,name,type,encoding,errors):\n ''\n\n \n name=name.encode(encoding,errors)+NUL\n \n info={}\n info[\"name\"]=\"././@LongLink\"\n info[\"type\"]=type\n info[\"size\"]=len(name)\n info[\"magic\"]=GNU_MAGIC\n \n \n return cls._create_header(info,USTAR_FORMAT,encoding,errors)+\\\n cls._create_payload(name)\n \n @classmethod\n def _create_pax_generic_header(cls,pax_headers,type,encoding):\n ''\n\n\n \n \n \n binary=False\n for keyword,value in pax_headers.items():\n try :\n value.encode(\"utf-8\",\"strict\")\n except UnicodeEncodeError:\n binary=True\n break\n \n records=b\"\"\n if binary:\n \n records +=b\"21 hdrcharset=BINARY\\n\"\n \n for keyword,value in pax_headers.items():\n keyword=keyword.encode(\"utf-8\")\n if binary:\n \n \n value=value.encode(encoding,\"surrogateescape\")\n else :\n value=value.encode(\"utf-8\")\n \n l=len(keyword)+len(value)+3\n n=p=0\n while True :\n n=l+len(str(p))\n if n ==p:\n break\n p=n\n records +=bytes(str(p),\"ascii\")+b\" \"+keyword+b\"=\"+value+b\"\\n\"\n \n \n \n info={}\n info[\"name\"]=\"././@PaxHeader\"\n info[\"type\"]=type\n info[\"size\"]=len(records)\n info[\"magic\"]=POSIX_MAGIC\n \n \n return cls._create_header(info,USTAR_FORMAT,\"ascii\",\"replace\")+\\\n cls._create_payload(records)\n \n @classmethod\n def frombuf(cls,buf,encoding,errors):\n ''\n \n if len(buf)==0:\n raise EmptyHeaderError(\"empty header\")\n if len(buf)!=BLOCKSIZE:\n raise TruncatedHeaderError(\"truncated header\")\n if buf.count(NUL)==BLOCKSIZE:\n raise EOFHeaderError(\"end of file header\")\n \n chksum=nti(buf[148:156])\n if chksum not in calc_chksums(buf):\n raise InvalidHeaderError(\"bad checksum\")\n \n obj=cls()\n obj.name=nts(buf[0:100],encoding,errors)\n obj.mode=nti(buf[100:108])\n obj.uid=nti(buf[108:116])\n obj.gid=nti(buf[116:124])\n obj.size=nti(buf[124:136])\n obj.mtime=nti(buf[136:148])\n obj.chksum=chksum\n obj.type=buf[156:157]\n obj.linkname=nts(buf[157:257],encoding,errors)\n obj.uname=nts(buf[265:297],encoding,errors)\n obj.gname=nts(buf[297:329],encoding,errors)\n obj.devmajor=nti(buf[329:337])\n obj.devminor=nti(buf[337:345])\n prefix=nts(buf[345:500],encoding,errors)\n \n \n \n if obj.type ==AREGTYPE and obj.name.endswith(\"/\"):\n obj.type=DIRTYPE\n \n \n \n \n if obj.type ==GNUTYPE_SPARSE:\n pos=386\n structs=[]\n for i in range(4):\n try :\n offset=nti(buf[pos:pos+12])\n numbytes=nti(buf[pos+12:pos+24])\n except ValueError:\n break\n structs.append((offset,numbytes))\n pos +=24\n isextended=bool(buf[482])\n origsize=nti(buf[483:495])\n obj._sparse_structs=(structs,isextended,origsize)\n \n \n if obj.isdir():\n obj.name=obj.name.rstrip(\"/\")\n \n \n if prefix and obj.type not in GNU_TYPES:\n obj.name=prefix+\"/\"+obj.name\n return obj\n \n @classmethod\n def fromtarfile(cls,tarfile):\n ''\n\n \n buf=tarfile.fileobj.read(BLOCKSIZE)\n obj=cls.frombuf(buf,tarfile.encoding,tarfile.errors)\n obj.offset=tarfile.fileobj.tell()-BLOCKSIZE\n return obj._proc_member(tarfile)\n \n \n \n \n \n \n \n \n \n \n \n \n def _proc_member(self,tarfile):\n ''\n\n \n if self.type in (GNUTYPE_LONGNAME,GNUTYPE_LONGLINK):\n return self._proc_gnulong(tarfile)\n elif self.type ==GNUTYPE_SPARSE:\n return self._proc_sparse(tarfile)\n elif self.type in (XHDTYPE,XGLTYPE,SOLARIS_XHDTYPE):\n return self._proc_pax(tarfile)\n else :\n return self._proc_builtin(tarfile)\n \n def _proc_builtin(self,tarfile):\n ''\n\n \n self.offset_data=tarfile.fileobj.tell()\n offset=self.offset_data\n if self.isreg()or self.type not in SUPPORTED_TYPES:\n \n offset +=self._block(self.size)\n tarfile.offset=offset\n \n \n \n self._apply_pax_info(tarfile.pax_headers,tarfile.encoding,tarfile.errors)\n \n \n \n if self.isdir():\n self.name=self.name.rstrip(\"/\")\n \n return self\n \n def _proc_gnulong(self,tarfile):\n ''\n\n \n buf=tarfile.fileobj.read(self._block(self.size))\n \n \n try :\n next=self.fromtarfile(tarfile)\n except HeaderError as e:\n raise SubsequentHeaderError(str(e))from None\n \n \n \n next.offset=self.offset\n if self.type ==GNUTYPE_LONGNAME:\n next.name=nts(buf,tarfile.encoding,tarfile.errors)\n elif self.type ==GNUTYPE_LONGLINK:\n next.linkname=nts(buf,tarfile.encoding,tarfile.errors)\n \n \n \n if next.isdir():\n next.name=next.name.removesuffix(\"/\")\n \n return next\n \n def _proc_sparse(self,tarfile):\n ''\n \n \n structs,isextended,origsize=self._sparse_structs\n del self._sparse_structs\n \n \n while isextended:\n buf=tarfile.fileobj.read(BLOCKSIZE)\n pos=0\n for i in range(21):\n try :\n offset=nti(buf[pos:pos+12])\n numbytes=nti(buf[pos+12:pos+24])\n except ValueError:\n break\n if offset and numbytes:\n structs.append((offset,numbytes))\n pos +=24\n isextended=bool(buf[504])\n self.sparse=structs\n \n self.offset_data=tarfile.fileobj.tell()\n tarfile.offset=self.offset_data+self._block(self.size)\n self.size=origsize\n return self\n \n def _proc_pax(self,tarfile):\n ''\n\n \n \n buf=tarfile.fileobj.read(self._block(self.size))\n \n \n \n \n if self.type ==XGLTYPE:\n pax_headers=tarfile.pax_headers\n else :\n pax_headers=tarfile.pax_headers.copy()\n \n \n \n \n \n \n match=re.search(br\"\\d+ hdrcharset=([^\\n]+)\\n\",buf)\n if match is not None :\n pax_headers[\"hdrcharset\"]=match.group(1).decode(\"utf-8\")\n \n \n \n \n hdrcharset=pax_headers.get(\"hdrcharset\")\n if hdrcharset ==\"BINARY\":\n encoding=tarfile.encoding\n else :\n encoding=\"utf-8\"\n \n \n \n \n \n regex=re.compile(br\"(\\d+) ([^=]+)=\")\n pos=0\n while match :=regex.match(buf,pos):\n length,keyword=match.groups()\n length=int(length)\n if length ==0:\n raise InvalidHeaderError(\"invalid header\")\n value=buf[match.end(2)+1:match.start(1)+length -1]\n \n \n \n \n \n \n \n \n keyword=self._decode_pax_field(keyword,\"utf-8\",\"utf-8\",\n tarfile.errors)\n if keyword in PAX_NAME_FIELDS:\n value=self._decode_pax_field(value,encoding,tarfile.encoding,\n tarfile.errors)\n else :\n value=self._decode_pax_field(value,\"utf-8\",\"utf-8\",\n tarfile.errors)\n \n pax_headers[keyword]=value\n pos +=length\n \n \n try :\n next=self.fromtarfile(tarfile)\n except HeaderError as e:\n raise SubsequentHeaderError(str(e))from None\n \n \n if \"GNU.sparse.map\"in pax_headers:\n \n self._proc_gnusparse_01(next,pax_headers)\n \n elif \"GNU.sparse.size\"in pax_headers:\n \n self._proc_gnusparse_00(next,pax_headers,buf)\n \n elif pax_headers.get(\"GNU.sparse.major\")==\"1\"and pax_headers.get(\"GNU.sparse.minor\")==\"0\":\n \n self._proc_gnusparse_10(next,pax_headers,tarfile)\n \n if self.type in (XHDTYPE,SOLARIS_XHDTYPE):\n \n next._apply_pax_info(pax_headers,tarfile.encoding,tarfile.errors)\n next.offset=self.offset\n \n if \"size\"in pax_headers:\n \n \n \n offset=next.offset_data\n if next.isreg()or next.type not in SUPPORTED_TYPES:\n offset +=next._block(next.size)\n tarfile.offset=offset\n \n return next\n \n def _proc_gnusparse_00(self,next,pax_headers,buf):\n ''\n \n offsets=[]\n for match in re.finditer(br\"\\d+ GNU.sparse.offset=(\\d+)\\n\",buf):\n offsets.append(int(match.group(1)))\n numbytes=[]\n for match in re.finditer(br\"\\d+ GNU.sparse.numbytes=(\\d+)\\n\",buf):\n numbytes.append(int(match.group(1)))\n next.sparse=list(zip(offsets,numbytes))\n \n def _proc_gnusparse_01(self,next,pax_headers):\n ''\n \n sparse=[int(x)for x in pax_headers[\"GNU.sparse.map\"].split(\",\")]\n next.sparse=list(zip(sparse[::2],sparse[1::2]))\n \n def _proc_gnusparse_10(self,next,pax_headers,tarfile):\n ''\n \n fields=None\n sparse=[]\n buf=tarfile.fileobj.read(BLOCKSIZE)\n fields,buf=buf.split(b\"\\n\",1)\n fields=int(fields)\n while len(sparse)0:\n self.fileobj.write(NUL *(RECORDSIZE -remainder))\n finally :\n if not self._extfileobj:\n self.fileobj.close()\n \n def getmember(self,name):\n ''\n\n\n\n \n tarinfo=self._getmember(name.rstrip('/'))\n if tarinfo is None :\n raise KeyError(\"filename %r not found\"%name)\n return tarinfo\n \n def getmembers(self):\n ''\n\n \n self._check()\n if not self._loaded:\n self._load()\n \n return self.members\n \n def getnames(self):\n ''\n\n \n return [tarinfo.name for tarinfo in self.getmembers()]\n \n def gettarinfo(self,name=None ,arcname=None ,fileobj=None ):\n ''\n\n\n\n\n\n\n \n self._check(\"awx\")\n \n \n \n if fileobj is not None :\n name=fileobj.name\n \n \n \n \n if arcname is None :\n arcname=name\n drv,arcname=os.path.splitdrive(arcname)\n arcname=arcname.replace(os.sep,\"/\")\n arcname=arcname.lstrip(\"/\")\n \n \n \n tarinfo=self.tarinfo()\n tarinfo.tarfile=self\n \n \n if fileobj is None :\n if not self.dereference:\n statres=os.lstat(name)\n else :\n statres=os.stat(name)\n else :\n statres=os.fstat(fileobj.fileno())\n linkname=\"\"\n \n stmd=statres.st_mode\n if stat.S_ISREG(stmd):\n inode=(statres.st_ino,statres.st_dev)\n if not self.dereference and statres.st_nlink >1 and\\\n inode in self.inodes and arcname !=self.inodes[inode]:\n \n \n type=LNKTYPE\n linkname=self.inodes[inode]\n else :\n \n \n type=REGTYPE\n if inode[0]:\n self.inodes[inode]=arcname\n elif stat.S_ISDIR(stmd):\n type=DIRTYPE\n elif stat.S_ISFIFO(stmd):\n type=FIFOTYPE\n elif stat.S_ISLNK(stmd):\n type=SYMTYPE\n linkname=os.readlink(name)\n elif stat.S_ISCHR(stmd):\n type=CHRTYPE\n elif stat.S_ISBLK(stmd):\n type=BLKTYPE\n else :\n return None\n \n \n \n tarinfo.name=arcname\n tarinfo.mode=stmd\n tarinfo.uid=statres.st_uid\n tarinfo.gid=statres.st_gid\n if type ==REGTYPE:\n tarinfo.size=statres.st_size\n else :\n tarinfo.size=0\n tarinfo.mtime=statres.st_mtime\n tarinfo.type=type\n tarinfo.linkname=linkname\n if pwd:\n try :\n tarinfo.uname=pwd.getpwuid(tarinfo.uid)[0]\n except KeyError:\n pass\n if grp:\n try :\n tarinfo.gname=grp.getgrgid(tarinfo.gid)[0]\n except KeyError:\n pass\n \n if type in (CHRTYPE,BLKTYPE):\n if hasattr(os,\"major\")and hasattr(os,\"minor\"):\n tarinfo.devmajor=os.major(statres.st_rdev)\n tarinfo.devminor=os.minor(statres.st_rdev)\n return tarinfo\n \n def list(self,verbose=True ,*,members=None ):\n ''\n\n\n\n \n self._check()\n \n if members is None :\n members=self\n for tarinfo in members:\n if verbose:\n if tarinfo.mode is None :\n _safe_print(\"??????????\")\n else :\n _safe_print(stat.filemode(tarinfo.mode))\n _safe_print(\"%s/%s\"%(tarinfo.uname or tarinfo.uid,\n tarinfo.gname or tarinfo.gid))\n if tarinfo.ischr()or tarinfo.isblk():\n _safe_print(\"%10s\"%\n (\"%d,%d\"%(tarinfo.devmajor,tarinfo.devminor)))\n else :\n _safe_print(\"%10d\"%tarinfo.size)\n if tarinfo.mtime is None :\n _safe_print(\"????-??-?? ??:??:??\")\n else :\n _safe_print(\"%d-%02d-%02d %02d:%02d:%02d\"\\\n %time.localtime(tarinfo.mtime)[:6])\n \n _safe_print(tarinfo.name+(\"/\"if tarinfo.isdir()else \"\"))\n \n if verbose:\n if tarinfo.issym():\n _safe_print(\"-> \"+tarinfo.linkname)\n if tarinfo.islnk():\n _safe_print(\"link to \"+tarinfo.linkname)\n print()\n \n def add(self,name,arcname=None ,recursive=True ,*,filter=None ):\n ''\n\n\n\n\n\n\n\n \n self._check(\"awx\")\n \n if arcname is None :\n arcname=name\n \n \n if self.name is not None and os.path.abspath(name)==self.name:\n self._dbg(2,\"tarfile: Skipped %r\"%name)\n return\n \n self._dbg(1,name)\n \n \n tarinfo=self.gettarinfo(name,arcname)\n \n if tarinfo is None :\n self._dbg(1,\"tarfile: Unsupported type %r\"%name)\n return\n \n \n if filter is not None :\n tarinfo=filter(tarinfo)\n if tarinfo is None :\n self._dbg(2,\"tarfile: Excluded %r\"%name)\n return\n \n \n if tarinfo.isreg():\n with bltn_open(name,\"rb\")as f:\n self.addfile(tarinfo,f)\n \n elif tarinfo.isdir():\n self.addfile(tarinfo)\n if recursive:\n for f in sorted(os.listdir(name)):\n self.add(os.path.join(name,f),os.path.join(arcname,f),\n recursive,filter=filter)\n \n else :\n self.addfile(tarinfo)\n \n def addfile(self,tarinfo,fileobj=None ):\n ''\n\n\n\n \n self._check(\"awx\")\n \n tarinfo=copy.copy(tarinfo)\n \n buf=tarinfo.tobuf(self.format,self.encoding,self.errors)\n self.fileobj.write(buf)\n self.offset +=len(buf)\n bufsize=self.copybufsize\n \n if fileobj is not None :\n copyfileobj(fileobj,self.fileobj,tarinfo.size,bufsize=bufsize)\n blocks,remainder=divmod(tarinfo.size,BLOCKSIZE)\n if remainder >0:\n self.fileobj.write(NUL *(BLOCKSIZE -remainder))\n blocks +=1\n self.offset +=blocks *BLOCKSIZE\n \n self.members.append(tarinfo)\n \n def _get_filter_function(self,filter):\n if filter is None :\n filter=self.extraction_filter\n if filter is None :\n warnings.warn(\n 'Python 3.14 will, by default, filter extracted tar '\n +'archives and reject files or modify their metadata. '\n +'Use the filter argument to control this behavior.',\n DeprecationWarning)\n return fully_trusted_filter\n if isinstance(filter,str):\n raise TypeError(\n 'String names are not supported for '\n +'TarFile.extraction_filter. Use a function such as '\n +'tarfile.data_filter directly.')\n return filter\n if callable(filter):\n return filter\n try :\n return _NAMED_FILTERS[filter]\n except KeyError:\n raise ValueError(f\"filter {filter !r} not found\")from None\n \n def extractall(self,path=\".\",members=None ,*,numeric_owner=False ,\n filter=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n directories=[]\n \n filter_function=self._get_filter_function(filter)\n if members is None :\n members=self\n \n for member in members:\n tarinfo=self._get_extract_tarinfo(member,filter_function,path)\n if tarinfo is None :\n continue\n if tarinfo.isdir():\n \n \n \n directories.append(tarinfo)\n self._extract_one(tarinfo,path,set_attrs=not tarinfo.isdir(),\n numeric_owner=numeric_owner)\n \n \n directories.sort(key=lambda a:a.name,reverse=True )\n \n \n for tarinfo in directories:\n dirpath=os.path.join(path,tarinfo.name)\n try :\n self.chown(tarinfo,dirpath,numeric_owner=numeric_owner)\n self.utime(tarinfo,dirpath)\n self.chmod(tarinfo,dirpath)\n except ExtractError as e:\n self._handle_nonfatal_error(e)\n \n def extract(self,member,path=\"\",set_attrs=True ,*,numeric_owner=False ,\n filter=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n filter_function=self._get_filter_function(filter)\n tarinfo=self._get_extract_tarinfo(member,filter_function,path)\n if tarinfo is not None :\n self._extract_one(tarinfo,path,set_attrs,numeric_owner)\n \n def _get_extract_tarinfo(self,member,filter_function,path):\n ''\n if isinstance(member,str):\n tarinfo=self.getmember(member)\n else :\n tarinfo=member\n \n unfiltered=tarinfo\n try :\n tarinfo=filter_function(tarinfo,path)\n except (OSError,FilterError)as e:\n self._handle_fatal_error(e)\n except ExtractError as e:\n self._handle_nonfatal_error(e)\n if tarinfo is None :\n self._dbg(2,\"tarfile: Excluded %r\"%unfiltered.name)\n return None\n \n if tarinfo.islnk():\n tarinfo=copy.copy(tarinfo)\n tarinfo._link_target=os.path.join(path,tarinfo.linkname)\n return tarinfo\n \n def _extract_one(self,tarinfo,path,set_attrs,numeric_owner):\n ''\n self._check(\"r\")\n \n try :\n self._extract_member(tarinfo,os.path.join(path,tarinfo.name),\n set_attrs=set_attrs,\n numeric_owner=numeric_owner)\n except OSError as e:\n self._handle_fatal_error(e)\n except ExtractError as e:\n self._handle_nonfatal_error(e)\n \n def _handle_nonfatal_error(self,e):\n ''\n if self.errorlevel >1:\n raise\n else :\n self._dbg(1,\"tarfile: %s\"%e)\n \n def _handle_fatal_error(self,e):\n ''\n if self.errorlevel >0:\n raise\n elif isinstance(e,OSError):\n if e.filename is None :\n self._dbg(1,\"tarfile: %s\"%e.strerror)\n else :\n self._dbg(1,\"tarfile: %s %r\"%(e.strerror,e.filename))\n else :\n self._dbg(1,\"tarfile: %s %s\"%(type(e).__name__,e))\n \n def extractfile(self,member):\n ''\n\n\n\n\n \n self._check(\"r\")\n \n if isinstance(member,str):\n tarinfo=self.getmember(member)\n else :\n tarinfo=member\n \n if tarinfo.isreg()or tarinfo.type not in SUPPORTED_TYPES:\n \n return self.fileobject(self,tarinfo)\n \n elif tarinfo.islnk()or tarinfo.issym():\n if isinstance(self.fileobj,_Stream):\n \n \n \n raise StreamError(\"cannot extract (sym)link as file object\")\n else :\n \n return self.extractfile(self._find_link_target(tarinfo))\n else :\n \n \n return None\n \n def _extract_member(self,tarinfo,targetpath,set_attrs=True ,\n numeric_owner=False ):\n ''\n\n \n \n \n \n targetpath=targetpath.rstrip(\"/\")\n targetpath=targetpath.replace(\"/\",os.sep)\n \n \n upperdirs=os.path.dirname(targetpath)\n if upperdirs and not os.path.exists(upperdirs):\n \n \n os.makedirs(upperdirs)\n \n if tarinfo.islnk()or tarinfo.issym():\n self._dbg(1,\"%s -> %s\"%(tarinfo.name,tarinfo.linkname))\n else :\n self._dbg(1,tarinfo.name)\n \n if tarinfo.isreg():\n self.makefile(tarinfo,targetpath)\n elif tarinfo.isdir():\n self.makedir(tarinfo,targetpath)\n elif tarinfo.isfifo():\n self.makefifo(tarinfo,targetpath)\n elif tarinfo.ischr()or tarinfo.isblk():\n self.makedev(tarinfo,targetpath)\n elif tarinfo.islnk()or tarinfo.issym():\n self.makelink(tarinfo,targetpath)\n elif tarinfo.type not in SUPPORTED_TYPES:\n self.makeunknown(tarinfo,targetpath)\n else :\n self.makefile(tarinfo,targetpath)\n \n if set_attrs:\n self.chown(tarinfo,targetpath,numeric_owner)\n if not tarinfo.issym():\n self.chmod(tarinfo,targetpath)\n self.utime(tarinfo,targetpath)\n \n \n \n \n \n \n def makedir(self,tarinfo,targetpath):\n ''\n \n try :\n if tarinfo.mode is None :\n \n os.mkdir(targetpath)\n else :\n \n \n os.mkdir(targetpath,0o700)\n except FileExistsError:\n pass\n \n def makefile(self,tarinfo,targetpath):\n ''\n \n source=self.fileobj\n source.seek(tarinfo.offset_data)\n bufsize=self.copybufsize\n with bltn_open(targetpath,\"wb\")as target:\n if tarinfo.sparse is not None :\n for offset,size in tarinfo.sparse:\n target.seek(offset)\n copyfileobj(source,target,size,ReadError,bufsize)\n target.seek(tarinfo.size)\n target.truncate()\n else :\n copyfileobj(source,target,tarinfo.size,ReadError,bufsize)\n \n def makeunknown(self,tarinfo,targetpath):\n ''\n\n \n self.makefile(tarinfo,targetpath)\n self._dbg(1,\"tarfile: Unknown file type %r, \"\\\n \"extracted as regular file.\"%tarinfo.type)\n \n def makefifo(self,tarinfo,targetpath):\n ''\n \n if hasattr(os,\"mkfifo\"):\n os.mkfifo(targetpath)\n else :\n raise ExtractError(\"fifo not supported by system\")\n \n def makedev(self,tarinfo,targetpath):\n ''\n \n if not hasattr(os,\"mknod\")or not hasattr(os,\"makedev\"):\n raise ExtractError(\"special devices not supported by system\")\n \n mode=tarinfo.mode\n if mode is None :\n \n mode=0o600\n if tarinfo.isblk():\n mode |=stat.S_IFBLK\n else :\n mode |=stat.S_IFCHR\n \n os.mknod(targetpath,mode,\n os.makedev(tarinfo.devmajor,tarinfo.devminor))\n \n def makelink(self,tarinfo,targetpath):\n ''\n\n\n \n try :\n \n if tarinfo.issym():\n if os.path.lexists(targetpath):\n \n os.unlink(targetpath)\n os.symlink(tarinfo.linkname,targetpath)\n else :\n if os.path.exists(tarinfo._link_target):\n os.link(tarinfo._link_target,targetpath)\n else :\n self._extract_member(self._find_link_target(tarinfo),\n targetpath)\n except symlink_exception:\n try :\n self._extract_member(self._find_link_target(tarinfo),\n targetpath)\n except KeyError:\n raise ExtractError(\"unable to resolve link inside archive\")from None\n \n def chown(self,tarinfo,targetpath,numeric_owner):\n ''\n\n\n\n \n if hasattr(os,\"geteuid\")and os.geteuid()==0:\n \n g=tarinfo.gid\n u=tarinfo.uid\n if not numeric_owner:\n try :\n if grp and tarinfo.gname:\n g=grp.getgrnam(tarinfo.gname)[2]\n except KeyError:\n pass\n try :\n if pwd and tarinfo.uname:\n u=pwd.getpwnam(tarinfo.uname)[2]\n except KeyError:\n pass\n if g is None :\n g=-1\n if u is None :\n u=-1\n try :\n if tarinfo.issym()and hasattr(os,\"lchown\"):\n os.lchown(targetpath,u,g)\n else :\n os.chown(targetpath,u,g)\n except OSError as e:\n raise ExtractError(\"could not change owner\")from e\n \n def chmod(self,tarinfo,targetpath):\n ''\n \n if tarinfo.mode is None :\n return\n try :\n os.chmod(targetpath,tarinfo.mode)\n except OSError as e:\n raise ExtractError(\"could not change mode\")from e\n \n def utime(self,tarinfo,targetpath):\n ''\n \n mtime=tarinfo.mtime\n if mtime is None :\n return\n if not hasattr(os,'utime'):\n return\n try :\n os.utime(targetpath,(mtime,mtime))\n except OSError as e:\n raise ExtractError(\"could not change modification time\")from e\n \n \n def next(self):\n ''\n\n\n \n self._check(\"ra\")\n if self.firstmember is not None :\n m=self.firstmember\n self.firstmember=None\n return m\n \n \n if self.offset !=self.fileobj.tell():\n if self.offset ==0:\n return None\n self.fileobj.seek(self.offset -1)\n if not self.fileobj.read(1):\n raise ReadError(\"unexpected end of data\")\n \n \n tarinfo=None\n while True :\n try :\n tarinfo=self.tarinfo.fromtarfile(self)\n except EOFHeaderError as e:\n if self.ignore_zeros:\n self._dbg(2,\"0x%X: %s\"%(self.offset,e))\n self.offset +=BLOCKSIZE\n continue\n except InvalidHeaderError as e:\n if self.ignore_zeros:\n self._dbg(2,\"0x%X: %s\"%(self.offset,e))\n self.offset +=BLOCKSIZE\n continue\n elif self.offset ==0:\n raise ReadError(str(e))from None\n except EmptyHeaderError:\n if self.offset ==0:\n raise ReadError(\"empty file\")from None\n except TruncatedHeaderError as e:\n if self.offset ==0:\n raise ReadError(str(e))from None\n except SubsequentHeaderError as e:\n raise ReadError(str(e))from None\n except Exception as e:\n try :\n import zlib\n if isinstance(e,zlib.error):\n raise ReadError(f'zlib error: {e}')from None\n else :\n raise e\n except ImportError:\n raise e\n break\n \n if tarinfo is not None :\n self.members.append(tarinfo)\n else :\n self._loaded=True\n \n return tarinfo\n \n \n \n \n def _getmember(self,name,tarinfo=None ,normalize=False ):\n ''\n\n \n \n members=self.getmembers()\n \n \n skipping=False\n if tarinfo is not None :\n try :\n index=members.index(tarinfo)\n except ValueError:\n \n \n skipping=True\n else :\n \n members=members[:index]\n \n if normalize:\n name=os.path.normpath(name)\n \n for member in reversed(members):\n if skipping:\n if tarinfo.offset ==member.offset:\n skipping=False\n continue\n if normalize:\n member_name=os.path.normpath(member.name)\n else :\n member_name=member.name\n \n if name ==member_name:\n return member\n \n if skipping:\n \n raise ValueError(tarinfo)\n \n def _load(self):\n ''\n\n \n while self.next()is not None :\n pass\n self._loaded=True\n \n def _check(self,mode=None ):\n ''\n\n \n if self.closed:\n raise OSError(\"%s is closed\"%self.__class__.__name__)\n if mode is not None and self.mode not in mode:\n raise OSError(\"bad operation for mode %r\"%self.mode)\n \n def _find_link_target(self,tarinfo):\n ''\n\n \n if tarinfo.issym():\n \n linkname=\"/\".join(filter(None ,(os.path.dirname(tarinfo.name),tarinfo.linkname)))\n limit=None\n else :\n \n \n linkname=tarinfo.linkname\n limit=tarinfo\n \n member=self._getmember(linkname,tarinfo=limit,normalize=True )\n if member is None :\n raise KeyError(\"linkname %r not found\"%linkname)\n return member\n \n def __iter__(self):\n ''\n \n if self._loaded:\n yield from self.members\n return\n \n \n \n index=0\n \n \n \n if self.firstmember is not None :\n tarinfo=self.next()\n index +=1\n yield tarinfo\n \n while True :\n if index ',''),\n help='Extract tarfile into target dir')\n group.add_argument('-c','--create',nargs='+',\n metavar=('',''),\n help='Create tarfile from sources')\n group.add_argument('-t','--test',metavar='',\n help='Test if a tarfile is valid')\n \n args=parser.parse_args()\n \n if args.filter and args.extract is None :\n parser.exit(1,'--filter is only valid for extraction\\n')\n \n if args.test is not None :\n src=args.test\n if is_tarfile(src):\n with open(src,'r')as tar:\n tar.getmembers()\n print(tar.getmembers(),file=sys.stderr)\n if args.verbose:\n print('{!r} is a tar archive.'.format(src))\n else :\n parser.exit(1,'{!r} is not a tar archive.\\n'.format(src))\n \n elif args.list is not None :\n src=args.list\n if is_tarfile(src):\n with TarFile.open(src,'r:*')as tf:\n tf.list(verbose=args.verbose)\n else :\n parser.exit(1,'{!r} is not a tar archive.\\n'.format(src))\n \n elif args.extract is not None :\n if len(args.extract)==1:\n src=args.extract[0]\n curdir=os.curdir\n elif len(args.extract)==2:\n src,curdir=args.extract\n else :\n parser.exit(1,parser.format_help())\n \n if is_tarfile(src):\n with TarFile.open(src,'r:*')as tf:\n tf.extractall(path=curdir,filter=args.filter)\n if args.verbose:\n if curdir =='.':\n msg='{!r} file is extracted.'.format(src)\n else :\n msg=('{!r} file is extracted '\n 'into {!r} directory.').format(src,curdir)\n print(msg)\n else :\n parser.exit(1,'{!r} is not a tar archive.\\n'.format(src))\n \n elif args.create is not None :\n tar_name=args.create.pop(0)\n _,ext=os.path.splitext(tar_name)\n compressions={\n \n '.gz':'gz',\n '.tgz':'gz',\n \n '.xz':'xz',\n '.txz':'xz',\n \n '.bz2':'bz2',\n '.tbz':'bz2',\n '.tbz2':'bz2',\n '.tb2':'bz2',\n }\n tar_mode='w:'+compressions[ext]if ext in compressions else 'w'\n tar_files=args.create\n \n with TarFile.open(tar_name,tar_mode)as tf:\n for file_name in tar_files:\n tf.add(file_name)\n \n if args.verbose:\n print('{!r} file created.'.format(tar_name))\n \nif __name__ =='__main__':\n main()\n", ["argparse", "builtins", "bz2", "copy", "grp", "gzip", "io", "lzma", "os", "pwd", "re", "shutil", "stat", "struct", "sys", "time", "warnings", "zlib"]], "tb": [".py", "import sys\nfrom browser import console\n\nclass Trace:\n\n def __init__(self):\n self.lines=[]\n \n def write(self,*data):\n self.lines.append(\" \".join([str(x)for x in data]))\n \n def format(self):\n return '\\n'.join(self.lines)+'\\n'\n \ndef format_exc():\n trace=Trace()\n exc_class,exc,tb=sys.exc_info()\n exc_msg=str(exc)\n \n def handle_repeats(filename,lineno,count_repeats):\n if count_repeats >0:\n trace_lines=trace.lines[:]\n for _ in range(2):\n if not filename.startswith('<'):\n trace.write(trace_lines[-2])\n trace.write(trace_lines[-1])\n else :\n trace.write(trace_lines[-1])\n count_repeats -=1\n if count_repeats ==0:\n break\n if count_repeats:\n trace.write(f'[Previous line repeated {count_repeats} '+\n f'more time{\"s\"if count_repeats >1 else \"\"}]')\n \n def show_line():\n trace.write(f' File \"{filename}\", line {lineno}, in {name}')\n if not filename.startswith(\"<\"):\n src=open(filename,encoding='utf-8').read()\n lines=src.split('\\n')\n line=lines[tb.tb_lineno -1]\n trace.write(f\" {line.strip()}\")\n \n show=True\n started=False\n save_filename=None\n save_lineno=None\n save_scope=None\n same_line=False\n count_repeats=0\n \n while tb is not None :\n if show:\n trace.write(\"Traceback (most recent call last):\")\n show=False\n frame=tb.tb_frame\n code=frame.f_code\n lineno=frame.f_lineno\n name=code.co_name\n filename=code.co_filename\n if filename ==save_filename and lineno ==save_lineno\\\n and name ==save_name:\n count_repeats +=1\n tb=tb.tb_next\n continue\n handle_repeats(save_filename,save_lineno,count_repeats)\n save_filename=filename\n save_lineno=lineno\n save_name=name\n count_repeats=0\n show_line()\n tb=tb.tb_next\n \n handle_repeats(filename,lineno,count_repeats)\n \n if isinstance(exc,SyntaxError):\n trace.write(syntax_error(exc.args))\n else :\n message=exc_msg\n if isinstance(exc,AttributeError):\n suggestion=__BRYTHON__.offer_suggestions_for_attribute_error(exc)\n if suggestion is not None :\n message +=f\". Did you mean: '{suggestion}'?\"\n elif isinstance(exc,NameError):\n suggestion=__BRYTHON__.offer_suggestions_for_name_error(exc)\n if suggestion is not None :\n message +=f\". Did you mean: '{suggestion}'?\"\n elif exc.name in __BRYTHON__.stdlib_module_names:\n message +=f\". Did you forget to import '{exc.name}'?\"\n trace.write(f\"{exc_class}: {message}\")\n \n return trace.format()\n \ndef print_exc(file=None ):\n if file is None :\n file=sys.stderr\n file.write(format_exc())\n \ndef syntax_error(args):\n trace=Trace()\n info,[filename,lineno,offset,line,*extra]=args\n trace.write(f' File \"{filename}\", line {lineno}')\n indent=len(line)-len(line.lstrip())\n trace.write(\" \"+line.strip())\n nb_marks=1\n if extra:\n end_lineno,end_offset=extra\n if end_lineno >lineno:\n nb_marks=len(line)-offset\n else :\n nb_marks=end_offset -offset\n nb_marks=max(nb_marks,1)\n trace.write(\" \"+(offset -1)*\" \"+\"^\"*nb_marks)\n trace.write(\"SyntaxError:\",info)\n return trace.format()\n", ["browser", "sys"]], "tempfile": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=[\n\"NamedTemporaryFile\",\"TemporaryFile\",\n\"SpooledTemporaryFile\",\"TemporaryDirectory\",\n\"mkstemp\",\"mkdtemp\",\n\"mktemp\",\n\"TMP_MAX\",\"gettempprefix\",\n\"tempdir\",\"gettempdir\",\n\"gettempprefixb\",\"gettempdirb\",\n]\n\n\n\n\nimport functools as _functools\nimport warnings as _warnings\nimport io as _io\nimport os as _os\nimport shutil as _shutil\nimport errno as _errno\nfrom random import Random as _Random\nimport sys as _sys\nimport types as _types\nimport weakref as _weakref\nimport _thread\n_allocate_lock=_thread.allocate_lock\n\n_text_openflags=_os.O_RDWR |_os.O_CREAT |_os.O_EXCL\nif hasattr(_os,'O_NOFOLLOW'):\n _text_openflags |=_os.O_NOFOLLOW\n \n_bin_openflags=_text_openflags\nif hasattr(_os,'O_BINARY'):\n _bin_openflags |=_os.O_BINARY\n \nif hasattr(_os,'TMP_MAX'):\n TMP_MAX=_os.TMP_MAX\nelse :\n TMP_MAX=10000\n \n \n \n \n \ntemplate=\"tmp\"\n\n\n\n_once_lock=_allocate_lock()\n\n\ndef _exists(fn):\n try :\n _os.lstat(fn)\n except OSError:\n return False\n else :\n return True\n \n \ndef _infer_return_type(*args):\n ''\n return_type=None\n for arg in args:\n if arg is None :\n continue\n \n if isinstance(arg,_os.PathLike):\n arg=_os.fspath(arg)\n \n if isinstance(arg,bytes):\n if return_type is str:\n raise TypeError(\"Can't mix bytes and non-bytes in \"\n \"path components.\")\n return_type=bytes\n else :\n if return_type is bytes:\n raise TypeError(\"Can't mix bytes and non-bytes in \"\n \"path components.\")\n return_type=str\n if return_type is None :\n if tempdir is None or isinstance(tempdir,str):\n return str\n else :\n \n return bytes\n return return_type\n \n \ndef _sanitize_params(prefix,suffix,dir):\n ''\n output_type=_infer_return_type(prefix,suffix,dir)\n if suffix is None :\n suffix=output_type()\n if prefix is None :\n if output_type is str:\n prefix=template\n else :\n prefix=_os.fsencode(template)\n if dir is None :\n if output_type is str:\n dir=gettempdir()\n else :\n dir=gettempdirb()\n return prefix,suffix,dir,output_type\n \n \nclass _RandomNameSequence:\n ''\n\n\n\n\n \n \n characters=\"abcdefghijklmnopqrstuvwxyz0123456789_\"\n \n @property\n def rng(self):\n cur_pid=_os.getpid()\n if cur_pid !=getattr(self,'_rng_pid',None ):\n self._rng=_Random()\n self._rng_pid=cur_pid\n return self._rng\n \n def __iter__(self):\n return self\n \n def __next__(self):\n return ''.join(self.rng.choices(self.characters,k=8))\n \ndef _candidate_tempdir_list():\n ''\n \n \n dirlist=[]\n \n \n for envname in 'TMPDIR','TEMP','TMP':\n dirname=_os.getenv(envname)\n if dirname:dirlist.append(dirname)\n \n \n if _os.name =='nt':\n dirlist.extend([_os.path.expanduser(r'~\\AppData\\Local\\Temp'),\n _os.path.expandvars(r'%SYSTEMROOT%\\Temp'),\n r'c:\\temp',r'c:\\tmp',r'\\temp',r'\\tmp'])\n else :\n dirlist.extend(['/tmp','/var/tmp','/usr/tmp'])\n \n \n try :\n dirlist.append(_os.getcwd())\n except (AttributeError,OSError):\n dirlist.append(_os.curdir)\n \n return dirlist\n \ndef _get_default_tempdir():\n ''\n\n\n\n\n\n \n \n namer=_RandomNameSequence()\n dirlist=_candidate_tempdir_list()\n \n for dir in dirlist:\n if dir !=_os.curdir:\n dir=_os.path.abspath(dir)\n \n for seq in range(100):\n name=next(namer)\n filename=_os.path.join(dir,name)\n try :\n fd=_os.open(filename,_bin_openflags,0o600)\n try :\n try :\n _os.write(fd,b'blat')\n finally :\n _os.close(fd)\n finally :\n _os.unlink(filename)\n return dir\n except FileExistsError:\n pass\n except PermissionError:\n \n \n if (_os.name =='nt'and _os.path.isdir(dir)and\n _os.access(dir,_os.W_OK)):\n continue\n break\n except OSError:\n break\n raise FileNotFoundError(_errno.ENOENT,\n \"No usable temporary directory found in %s\"%\n dirlist)\n \n_name_sequence=None\n\ndef _get_candidate_names():\n ''\n \n global _name_sequence\n if _name_sequence is None :\n _once_lock.acquire()\n try :\n if _name_sequence is None :\n _name_sequence=_RandomNameSequence()\n finally :\n _once_lock.release()\n return _name_sequence\n \n \ndef _mkstemp_inner(dir,pre,suf,flags,output_type):\n ''\n \n dir=_os.path.abspath(dir)\n names=_get_candidate_names()\n if output_type is bytes:\n names=map(_os.fsencode,names)\n \n for seq in range(TMP_MAX):\n name=next(names)\n file=_os.path.join(dir,pre+name+suf)\n _sys.audit(\"tempfile.mkstemp\",file)\n try :\n fd=_os.open(file,flags,0o600)\n except FileExistsError:\n continue\n except PermissionError:\n \n \n if (_os.name =='nt'and _os.path.isdir(dir)and\n _os.access(dir,_os.W_OK)):\n continue\n else :\n raise\n return fd,file\n \n raise FileExistsError(_errno.EEXIST,\n \"No usable temporary file name found\")\n \n \n \n \ndef gettempprefix():\n ''\n return _os.fsdecode(template)\n \ndef gettempprefixb():\n ''\n return _os.fsencode(template)\n \ntempdir=None\n\ndef _gettempdir():\n ''\n global tempdir\n if tempdir is None :\n _once_lock.acquire()\n try :\n if tempdir is None :\n tempdir=_get_default_tempdir()\n finally :\n _once_lock.release()\n return tempdir\n \ndef gettempdir():\n ''\n return _os.fsdecode(_gettempdir())\n \ndef gettempdirb():\n ''\n return _os.fsencode(_gettempdir())\n \ndef mkstemp(suffix=None ,prefix=None ,dir=None ,text=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n prefix,suffix,dir,output_type=_sanitize_params(prefix,suffix,dir)\n \n if text:\n flags=_text_openflags\n else :\n flags=_bin_openflags\n \n return _mkstemp_inner(dir,prefix,suffix,flags,output_type)\n \n \ndef mkdtemp(suffix=None ,prefix=None ,dir=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n \n prefix,suffix,dir,output_type=_sanitize_params(prefix,suffix,dir)\n \n names=_get_candidate_names()\n if output_type is bytes:\n names=map(_os.fsencode,names)\n \n for seq in range(TMP_MAX):\n name=next(names)\n file=_os.path.join(dir,prefix+name+suffix)\n _sys.audit(\"tempfile.mkdtemp\",file)\n try :\n _os.mkdir(file,0o700)\n except FileExistsError:\n continue\n except PermissionError:\n \n \n if (_os.name =='nt'and _os.path.isdir(dir)and\n _os.access(dir,_os.W_OK)):\n continue\n else :\n raise\n return _os.path.abspath(file)\n \n raise FileExistsError(_errno.EEXIST,\n \"No usable temporary directory name found\")\n \ndef mktemp(suffix=\"\",prefix=template,dir=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n if dir is None :\n dir=gettempdir()\n \n names=_get_candidate_names()\n for seq in range(TMP_MAX):\n name=next(names)\n file=_os.path.join(dir,prefix+name+suffix)\n if not _exists(file):\n return file\n \n raise FileExistsError(_errno.EEXIST,\n \"No usable temporary filename found\")\n \n \nclass _TemporaryFileCloser:\n ''\n\n \n \n cleanup_called=False\n close_called=False\n \n def __init__(self,file,name,delete=True ,delete_on_close=True ):\n self.file=file\n self.name=name\n self.delete=delete\n self.delete_on_close=delete_on_close\n \n def cleanup(self,windows=(_os.name =='nt'),unlink=_os.unlink):\n if not self.cleanup_called:\n self.cleanup_called=True\n try :\n if not self.close_called:\n self.close_called=True\n self.file.close()\n finally :\n \n \n if self.delete and not (windows and self.delete_on_close):\n try :\n unlink(self.name)\n except FileNotFoundError:\n pass\n \n def close(self):\n if not self.close_called:\n self.close_called=True\n try :\n self.file.close()\n finally :\n if self.delete and self.delete_on_close:\n self.cleanup()\n \n def __del__(self):\n self.cleanup()\n \n \nclass _TemporaryFileWrapper:\n ''\n\n\n\n\n \n \n def __init__(self,file,name,delete=True ,delete_on_close=True ):\n self.file=file\n self.name=name\n self._closer=_TemporaryFileCloser(file,name,delete,\n delete_on_close)\n \n def __getattr__(self,name):\n \n \n \n file=self.__dict__['file']\n a=getattr(file,name)\n if hasattr(a,'__call__'):\n func=a\n @_functools.wraps(func)\n def func_wrapper(*args,**kwargs):\n return func(*args,**kwargs)\n \n \n func_wrapper._closer=self._closer\n a=func_wrapper\n if not isinstance(a,int):\n setattr(self,name,a)\n return a\n \n \n \n def __enter__(self):\n self.file.__enter__()\n return self\n \n \n \n def __exit__(self,exc,value,tb):\n result=self.file.__exit__(exc,value,tb)\n self._closer.cleanup()\n return result\n \n def close(self):\n ''\n\n \n self._closer.close()\n \n \n def __iter__(self):\n \n \n \n \n \n for line in self.file:\n yield line\n \ndef NamedTemporaryFile(mode='w+b',buffering=-1,encoding=None ,\nnewline=None ,suffix=None ,prefix=None ,\ndir=None ,delete=True ,*,errors=None ,\ndelete_on_close=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n prefix,suffix,dir,output_type=_sanitize_params(prefix,suffix,dir)\n \n flags=_bin_openflags\n \n \n \n if _os.name =='nt'and delete and delete_on_close:\n flags |=_os.O_TEMPORARY\n \n if \"b\"not in mode:\n encoding=_io.text_encoding(encoding)\n \n name=None\n def opener(*args):\n nonlocal name\n fd,name=_mkstemp_inner(dir,prefix,suffix,flags,output_type)\n return fd\n try :\n file=_io.open(dir,mode,buffering=buffering,\n newline=newline,encoding=encoding,errors=errors,\n opener=opener)\n try :\n raw=getattr(file,'buffer',file)\n raw=getattr(raw,'raw',raw)\n raw.name=name\n return _TemporaryFileWrapper(file,name,delete,delete_on_close)\n except :\n file.close()\n raise\n except :\n if name is not None and not (\n _os.name =='nt'and delete and delete_on_close):\n _os.unlink(name)\n raise\n \nif _os.name !='posix'or _sys.platform =='cygwin':\n\n\n TemporaryFile=NamedTemporaryFile\n \nelse :\n\n\n\n _O_TMPFILE_WORKS=hasattr(_os,'O_TMPFILE')\n \n def TemporaryFile(mode='w+b',buffering=-1,encoding=None ,\n newline=None ,suffix=None ,prefix=None ,\n dir=None ,*,errors=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n global _O_TMPFILE_WORKS\n \n if \"b\"not in mode:\n encoding=_io.text_encoding(encoding)\n \n prefix,suffix,dir,output_type=_sanitize_params(prefix,suffix,dir)\n \n flags=_bin_openflags\n if _O_TMPFILE_WORKS:\n fd=None\n def opener(*args):\n nonlocal fd\n flags2=(flags |_os.O_TMPFILE)&~_os.O_CREAT\n fd=_os.open(dir,flags2,0o600)\n return fd\n try :\n file=_io.open(dir,mode,buffering=buffering,\n newline=newline,encoding=encoding,\n errors=errors,opener=opener)\n raw=getattr(file,'buffer',file)\n raw=getattr(raw,'raw',raw)\n raw.name=fd\n return file\n except IsADirectoryError:\n \n \n \n \n \n _O_TMPFILE_WORKS=False\n except OSError:\n \n \n \n \n \n \n \n pass\n \n \n fd=None\n def opener(*args):\n nonlocal fd\n fd,name=_mkstemp_inner(dir,prefix,suffix,flags,output_type)\n try :\n _os.unlink(name)\n except BaseException as e:\n _os.close(fd)\n raise\n return fd\n file=_io.open(dir,mode,buffering=buffering,\n newline=newline,encoding=encoding,errors=errors,\n opener=opener)\n raw=getattr(file,'buffer',file)\n raw=getattr(raw,'raw',raw)\n raw.name=fd\n return file\n \nclass SpooledTemporaryFile(_io.IOBase):\n ''\n\n\n \n _rolled=False\n \n def __init__(self,max_size=0,mode='w+b',buffering=-1,\n encoding=None ,newline=None ,\n suffix=None ,prefix=None ,dir=None ,*,errors=None ):\n if 'b'in mode:\n self._file=_io.BytesIO()\n else :\n encoding=_io.text_encoding(encoding)\n self._file=_io.TextIOWrapper(_io.BytesIO(),\n encoding=encoding,errors=errors,\n newline=newline)\n self._max_size=max_size\n self._rolled=False\n self._TemporaryFileArgs={'mode':mode,'buffering':buffering,\n 'suffix':suffix,'prefix':prefix,\n 'encoding':encoding,'newline':newline,\n 'dir':dir,'errors':errors}\n \n __class_getitem__=classmethod(_types.GenericAlias)\n \n def _check(self,file):\n if self._rolled:return\n max_size=self._max_size\n if max_size and file.tell()>max_size:\n self.rollover()\n \n def rollover(self):\n if self._rolled:return\n file=self._file\n newfile=self._file=TemporaryFile(**self._TemporaryFileArgs)\n del self._TemporaryFileArgs\n \n pos=file.tell()\n if hasattr(newfile,'buffer'):\n newfile.buffer.write(file.detach().getvalue())\n else :\n newfile.write(file.getvalue())\n newfile.seek(pos,0)\n \n self._rolled=True\n \n \n \n \n \n \n \n def __enter__(self):\n if self._file.closed:\n raise ValueError(\"Cannot enter context with closed file\")\n return self\n \n def __exit__(self,exc,value,tb):\n self._file.close()\n \n \n def __iter__(self):\n return self._file.__iter__()\n \n def __del__(self):\n if not self.closed:\n _warnings.warn(\n \"Unclosed file {!r}\".format(self),\n ResourceWarning,\n stacklevel=2,\n source=self\n )\n self.close()\n \n def close(self):\n self._file.close()\n \n @property\n def closed(self):\n return self._file.closed\n \n @property\n def encoding(self):\n return self._file.encoding\n \n @property\n def errors(self):\n return self._file.errors\n \n def fileno(self):\n self.rollover()\n return self._file.fileno()\n \n def flush(self):\n self._file.flush()\n \n def isatty(self):\n return self._file.isatty()\n \n @property\n def mode(self):\n try :\n return self._file.mode\n except AttributeError:\n return self._TemporaryFileArgs['mode']\n \n @property\n def name(self):\n try :\n return self._file.name\n except AttributeError:\n return None\n \n @property\n def newlines(self):\n return self._file.newlines\n \n def readable(self):\n return self._file.readable()\n \n def read(self,*args):\n return self._file.read(*args)\n \n def read1(self,*args):\n return self._file.read1(*args)\n \n def readinto(self,b):\n return self._file.readinto(b)\n \n def readinto1(self,b):\n return self._file.readinto1(b)\n \n def readline(self,*args):\n return self._file.readline(*args)\n \n def readlines(self,*args):\n return self._file.readlines(*args)\n \n def seekable(self):\n return self._file.seekable()\n \n def seek(self,*args):\n return self._file.seek(*args)\n \n def tell(self):\n return self._file.tell()\n \n def truncate(self,size=None ):\n if size is None :\n return self._file.truncate()\n else :\n if size >self._max_size:\n self.rollover()\n return self._file.truncate(size)\n \n def writable(self):\n return self._file.writable()\n \n def write(self,s):\n file=self._file\n rv=file.write(s)\n self._check(file)\n return rv\n \n def writelines(self,iterable):\n file=self._file\n rv=file.writelines(iterable)\n self._check(file)\n return rv\n \n def detach(self):\n return self._file.detach()\n \n \nclass TemporaryDirectory:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,suffix=None ,prefix=None ,dir=None ,\n ignore_cleanup_errors=False ,*,delete=True ):\n self.name=mkdtemp(suffix,prefix,dir)\n self._ignore_cleanup_errors=ignore_cleanup_errors\n self._delete=delete\n self._finalizer=_weakref.finalize(\n self,self._cleanup,self.name,\n warn_message=\"Implicitly cleaning up {!r}\".format(self),\n ignore_errors=self._ignore_cleanup_errors,delete=self._delete)\n \n @classmethod\n def _rmtree(cls,name,ignore_errors=False ):\n def onexc(func,path,exc):\n if isinstance(exc,PermissionError):\n def resetperms(path):\n try :\n _os.chflags(path,0)\n except AttributeError:\n pass\n _os.chmod(path,0o700)\n \n try :\n if path !=name:\n resetperms(_os.path.dirname(path))\n resetperms(path)\n \n try :\n _os.unlink(path)\n \n except (IsADirectoryError,PermissionError):\n cls._rmtree(path,ignore_errors=ignore_errors)\n except FileNotFoundError:\n pass\n elif isinstance(exc,FileNotFoundError):\n pass\n else :\n if not ignore_errors:\n raise\n \n _shutil.rmtree(name,onexc=onexc)\n \n @classmethod\n def _cleanup(cls,name,warn_message,ignore_errors=False ,delete=True ):\n if delete:\n cls._rmtree(name,ignore_errors=ignore_errors)\n _warnings.warn(warn_message,ResourceWarning)\n \n def __repr__(self):\n return \"<{} {!r}>\".format(self.__class__.__name__,self.name)\n \n def __enter__(self):\n return self.name\n \n def __exit__(self,exc,value,tb):\n if self._delete:\n self.cleanup()\n \n def cleanup(self):\n if self._finalizer.detach()or _os.path.exists(self.name):\n self._rmtree(self.name,ignore_errors=self._ignore_cleanup_errors)\n \n __class_getitem__=classmethod(_types.GenericAlias)\n", ["_thread", "errno", "functools", "io", "os", "random", "shutil", "sys", "types", "warnings", "weakref"]], "textwrap": [".py", "''\n\n\n\n\n\n\nimport re\n\n__all__=['TextWrapper','wrap','fill','dedent','indent','shorten']\n\n\n\n\n_whitespace='\\t\\n\\x0b\\x0c\\r '\n\nclass TextWrapper:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n unicode_whitespace_trans=dict.fromkeys(map(ord,_whitespace),ord(' '))\n \n \n \n \n \n \n \n word_punct=r'[\\w!\"\\'&.,?]'\n letter=r'[^\\d\\W]'\n whitespace=r'[%s]'%re.escape(_whitespace)\n nowhitespace='[^'+whitespace[1:]\n wordsep_re=re.compile(r'''\n ( # any whitespace\n %(ws)s+\n | # em-dash between words\n (?<=%(wp)s) -{2,} (?=\\w)\n | # word, possibly hyphenated\n %(nws)s+? (?:\n # hyphenated word\n -(?: (?<=%(lt)s{2}-) | (?<=%(lt)s-%(lt)s-))\n (?= %(lt)s -? %(lt)s)\n | # end of word\n (?=%(ws)s|\\Z)\n | # em-dash\n (?<=%(wp)s) (?=-{2,}\\w)\n )\n )'''%{'wp':word_punct,'lt':letter,\n 'ws':whitespace,'nws':nowhitespace},\n re.VERBOSE)\n del word_punct,letter,nowhitespace\n \n \n \n \n \n wordsep_simple_re=re.compile(r'(%s+)'%whitespace)\n del whitespace\n \n \n \n sentence_end_re=re.compile(r'[a-z]'\n r'[\\.\\!\\?]'\n r'[\\\"\\']?'\n r'\\Z')\n \n def __init__(self,\n width=70,\n initial_indent=\"\",\n subsequent_indent=\"\",\n expand_tabs=True ,\n replace_whitespace=True ,\n fix_sentence_endings=False ,\n break_long_words=True ,\n drop_whitespace=True ,\n break_on_hyphens=True ,\n tabsize=8,\n *,\n max_lines=None ,\n placeholder=' [...]'):\n self.width=width\n self.initial_indent=initial_indent\n self.subsequent_indent=subsequent_indent\n self.expand_tabs=expand_tabs\n self.replace_whitespace=replace_whitespace\n self.fix_sentence_endings=fix_sentence_endings\n self.break_long_words=break_long_words\n self.drop_whitespace=drop_whitespace\n self.break_on_hyphens=break_on_hyphens\n self.tabsize=tabsize\n self.max_lines=max_lines\n self.placeholder=placeholder\n \n \n \n \n \n def _munge_whitespace(self,text):\n ''\n\n\n\n\n \n if self.expand_tabs:\n text=text.expandtabs(self.tabsize)\n if self.replace_whitespace:\n text=text.translate(self.unicode_whitespace_trans)\n return text\n \n \n def _split(self,text):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n if self.break_on_hyphens is True :\n chunks=self.wordsep_re.split(text)\n else :\n chunks=self.wordsep_simple_re.split(text)\n chunks=[c for c in chunks if c]\n return chunks\n \n def _fix_sentence_endings(self,chunks):\n ''\n\n\n\n\n\n\n \n i=0\n patsearch=self.sentence_end_re.search\n while i space_left:\n \n \n hyphen=chunk.rfind('-',0,space_left)\n if hyphen >0 and any(c !='-'for c in chunk[:hyphen]):\n end=hyphen+1\n cur_line.append(chunk[:end])\n reversed_chunks[-1]=chunk[end:]\n \n \n \n \n elif not cur_line:\n cur_line.append(reversed_chunks.pop())\n \n \n \n \n \n \n \n def _wrap_chunks(self,chunks):\n ''\n\n\n\n\n\n\n\n\n\n\n \n lines=[]\n if self.width <=0:\n raise ValueError(\"invalid width %r (must be > 0)\"%self.width)\n if self.max_lines is not None :\n if self.max_lines >1:\n indent=self.subsequent_indent\n else :\n indent=self.initial_indent\n if len(indent)+len(self.placeholder.lstrip())>self.width:\n raise ValueError(\"placeholder too large for max width\")\n \n \n \n chunks.reverse()\n \n while chunks:\n \n \n \n cur_line=[]\n cur_len=0\n \n \n if lines:\n indent=self.subsequent_indent\n else :\n indent=self.initial_indent\n \n \n width=self.width -len(indent)\n \n \n \n if self.drop_whitespace and chunks[-1].strip()==''and lines:\n del chunks[-1]\n \n while chunks:\n l=len(chunks[-1])\n \n \n if cur_len+l <=width:\n cur_line.append(chunks.pop())\n cur_len +=l\n \n \n else :\n break\n \n \n \n if chunks and len(chunks[-1])>width:\n self._handle_long_word(chunks,cur_line,cur_len,width)\n cur_len=sum(map(len,cur_line))\n \n \n if self.drop_whitespace and cur_line and cur_line[-1].strip()=='':\n cur_len -=len(cur_line[-1])\n del cur_line[-1]\n \n if cur_line:\n if (self.max_lines is None or\n len(lines)+1 \"%(\n \"locked\"if self._block.locked()else \"unlocked\",\n self.__class__.__module__,\n self.__class__.__qualname__,\n owner,\n self._count,\n hex(id(self))\n )\n \n def _at_fork_reinit(self):\n self._block._at_fork_reinit()\n self._owner=None\n self._count=0\n \n def acquire(self,blocking=True ,timeout=-1):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n me=get_ident()\n if self._owner ==me:\n self._count +=1\n return 1\n rc=self._block.acquire(blocking,timeout)\n if rc:\n self._owner=me\n self._count=1\n return rc\n \n __enter__=acquire\n \n def release(self):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if self._owner !=get_ident():\n raise RuntimeError(\"cannot release un-acquired lock\")\n self._count=count=self._count -1\n if not count:\n self._owner=None\n self._block.release()\n \n def __exit__(self,t,v,tb):\n self.release()\n \n \n \n def _acquire_restore(self,state):\n self._block.acquire()\n self._count,self._owner=state\n \n def _release_save(self):\n if self._count ==0:\n raise RuntimeError(\"cannot release un-acquired lock\")\n count=self._count\n self._count=0\n owner=self._owner\n self._owner=None\n self._block.release()\n return (count,owner)\n \n def _is_owned(self):\n return self._owner ==get_ident()\n \n_PyRLock=_RLock\n\n\nclass Condition:\n ''\n\n\n\n\n\n\n\n\n \n \n def __init__(self,lock=None ):\n if lock is None :\n lock=RLock()\n self._lock=lock\n \n self.acquire=lock.acquire\n self.release=lock.release\n \n \n \n if hasattr(lock,'_release_save'):\n self._release_save=lock._release_save\n if hasattr(lock,'_acquire_restore'):\n self._acquire_restore=lock._acquire_restore\n if hasattr(lock,'_is_owned'):\n self._is_owned=lock._is_owned\n self._waiters=_deque()\n \n def _at_fork_reinit(self):\n self._lock._at_fork_reinit()\n self._waiters.clear()\n \n def __enter__(self):\n return self._lock.__enter__()\n \n def __exit__(self,*args):\n return self._lock.__exit__(*args)\n \n def __repr__(self):\n return \"\"%(self._lock,len(self._waiters))\n \n def _release_save(self):\n self._lock.release()\n \n def _acquire_restore(self,x):\n self._lock.acquire()\n \n def _is_owned(self):\n \n \n if self._lock.acquire(False ):\n self._lock.release()\n return False\n else :\n return True\n \n def wait(self,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not self._is_owned():\n raise RuntimeError(\"cannot wait on un-acquired lock\")\n waiter=_allocate_lock()\n waiter.acquire()\n self._waiters.append(waiter)\n saved_state=self._release_save()\n gotit=False\n try :\n if timeout is None :\n waiter.acquire()\n gotit=True\n else :\n if timeout >0:\n gotit=waiter.acquire(True ,timeout)\n else :\n gotit=waiter.acquire(False )\n return gotit\n finally :\n self._acquire_restore(saved_state)\n if not gotit:\n try :\n self._waiters.remove(waiter)\n except ValueError:\n pass\n \n def wait_for(self,predicate,timeout=None ):\n ''\n\n\n\n\n\n \n endtime=None\n waittime=timeout\n result=predicate()\n while not result:\n if waittime is not None :\n if endtime is None :\n endtime=_time()+waittime\n else :\n waittime=endtime -_time()\n if waittime <=0:\n break\n self.wait(waittime)\n result=predicate()\n return result\n \n def notify(self,n=1):\n ''\n\n\n\n\n\n\n\n \n if not self._is_owned():\n raise RuntimeError(\"cannot notify on un-acquired lock\")\n waiters=self._waiters\n while waiters and n >0:\n waiter=waiters[0]\n try :\n waiter.release()\n except RuntimeError:\n \n \n \n \n pass\n else :\n n -=1\n try :\n waiters.remove(waiter)\n except ValueError:\n pass\n \n def notify_all(self):\n ''\n\n\n\n\n \n self.notify(len(self._waiters))\n \n def notifyAll(self):\n ''\n\n\n\n \n import warnings\n warnings.warn('notifyAll() is deprecated, use notify_all() instead',\n DeprecationWarning,stacklevel=2)\n self.notify_all()\n \n \nclass Semaphore:\n ''\n\n\n\n\n\n\n \n \n \n \n def __init__(self,value=1):\n if value <0:\n raise ValueError(\"semaphore initial value must be >= 0\")\n self._cond=Condition(Lock())\n self._value=value\n \n def __repr__(self):\n cls=self.__class__\n return (f\"<{cls.__module__}.{cls.__qualname__} at {id(self):#x}:\"\n f\" value={self._value}>\")\n \n def acquire(self,blocking=True ,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not blocking and timeout is not None :\n raise ValueError(\"can't specify timeout for non-blocking acquire\")\n rc=False\n endtime=None\n with self._cond:\n while self._value ==0:\n if not blocking:\n break\n if timeout is not None :\n if endtime is None :\n endtime=_time()+timeout\n else :\n timeout=endtime -_time()\n if timeout <=0:\n break\n self._cond.wait(timeout)\n else :\n self._value -=1\n rc=True\n return rc\n \n __enter__=acquire\n \n def release(self,n=1):\n ''\n\n\n\n\n \n if n <1:\n raise ValueError('n must be one or more')\n with self._cond:\n self._value +=n\n self._cond.notify(n)\n \n def __exit__(self,t,v,tb):\n self.release()\n \n \nclass BoundedSemaphore(Semaphore):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,value=1):\n super().__init__(value)\n self._initial_value=value\n \n def __repr__(self):\n cls=self.__class__\n return (f\"<{cls.__module__}.{cls.__qualname__} at {id(self):#x}:\"\n f\" value={self._value}/{self._initial_value}>\")\n \n def release(self,n=1):\n ''\n\n\n\n\n\n\n\n \n if n <1:\n raise ValueError('n must be one or more')\n with self._cond:\n if self._value+n >self._initial_value:\n raise ValueError(\"Semaphore released too many times\")\n self._value +=n\n self._cond.notify(n)\n \n \nclass Event:\n ''\n\n\n\n\n\n \n \n \n \n def __init__(self):\n self._cond=Condition(Lock())\n self._flag=False\n \n def __repr__(self):\n cls=self.__class__\n status='set'if self._flag else 'unset'\n return f\"<{cls.__module__}.{cls.__qualname__} at {id(self):#x}: {status}>\"\n \n def _at_fork_reinit(self):\n \n self._cond._at_fork_reinit()\n \n def is_set(self):\n ''\n return self._flag\n \n def isSet(self):\n ''\n\n\n\n \n import warnings\n warnings.warn('isSet() is deprecated, use is_set() instead',\n DeprecationWarning,stacklevel=2)\n return self.is_set()\n \n def set(self):\n ''\n\n\n\n\n \n with self._cond:\n self._flag=True\n self._cond.notify_all()\n \n def clear(self):\n ''\n\n\n\n\n \n with self._cond:\n self._flag=False\n \n def wait(self,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n with self._cond:\n signaled=self._flag\n if not signaled:\n signaled=self._cond.wait(timeout)\n return signaled\n \n \n \n \n \n \n \n \n \n \n \n \n \nclass Barrier:\n ''\n\n\n\n\n\n \n \n def __init__(self,parties,action=None ,timeout=None ):\n ''\n\n\n\n\n\n\n \n self._cond=Condition(Lock())\n self._action=action\n self._timeout=timeout\n self._parties=parties\n self._state=0\n self._count=0\n \n def __repr__(self):\n cls=self.__class__\n if self.broken:\n return f\"<{cls.__module__}.{cls.__qualname__} at {id(self):#x}: broken>\"\n return (f\"<{cls.__module__}.{cls.__qualname__} at {id(self):#x}:\"\n f\" waiters={self.n_waiting}/{self.parties}>\")\n \n def wait(self,timeout=None ):\n ''\n\n\n\n\n\n\n \n if timeout is None :\n timeout=self._timeout\n with self._cond:\n self._enter()\n index=self._count\n self._count +=1\n try :\n if index+1 ==self._parties:\n \n self._release()\n else :\n \n self._wait(timeout)\n return index\n finally :\n self._count -=1\n \n self._exit()\n \n \n \n def _enter(self):\n while self._state in (-1,1):\n \n self._cond.wait()\n \n if self._state <0:\n raise BrokenBarrierError\n assert self._state ==0\n \n \n \n def _release(self):\n try :\n if self._action:\n self._action()\n \n self._state=1\n self._cond.notify_all()\n except :\n \n self._break()\n raise\n \n \n \n def _wait(self,timeout):\n if not self._cond.wait_for(lambda :self._state !=0,timeout):\n \n self._break()\n raise BrokenBarrierError\n if self._state <0:\n raise BrokenBarrierError\n assert self._state ==1\n \n \n \n def _exit(self):\n if self._count ==0:\n if self._state in (-1,1):\n \n self._state=0\n self._cond.notify_all()\n \n def reset(self):\n ''\n\n\n\n\n \n with self._cond:\n if self._count >0:\n if self._state ==0:\n \n self._state=-1\n elif self._state ==-2:\n \n \n self._state=-1\n else :\n self._state=0\n self._cond.notify_all()\n \n def abort(self):\n ''\n\n\n\n\n \n with self._cond:\n self._break()\n \n def _break(self):\n \n \n self._state=-2\n self._cond.notify_all()\n \n @property\n def parties(self):\n ''\n return self._parties\n \n @property\n def n_waiting(self):\n ''\n \n \n if self._state ==0:\n return self._count\n return 0\n \n @property\n def broken(self):\n ''\n return self._state ==-2\n \n \nclass BrokenBarrierError(RuntimeError):\n pass\n \n \n \n_counter=_count(1).__next__\ndef _newname(name_template):\n return name_template %_counter()\n \n \n \n \n \n_active_limbo_lock=RLock()\n_active={}\n_limbo={}\n_dangling=WeakSet()\n\n\n\n\n_shutdown_locks_lock=_allocate_lock()\n_shutdown_locks=set()\n\ndef _maintain_shutdown_locks():\n ''\n\n\n\n\n\n\n \n \n to_remove=[lock for lock in _shutdown_locks if not lock.locked()]\n _shutdown_locks.difference_update(to_remove)\n \n \n \n \nclass Thread:\n ''\n\n\n\n\n\n \n \n _initialized=False\n \n def __init__(self,group=None ,target=None ,name=None ,\n args=(),kwargs=None ,*,daemon=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n assert group is None ,\"group argument must be None for now\"\n if kwargs is None :\n kwargs={}\n if name:\n name=str(name)\n else :\n name=_newname(\"Thread-%d\")\n if target is not None :\n try :\n target_name=target.__name__\n name +=f\" ({target_name})\"\n except AttributeError:\n pass\n \n self._target=target\n self._name=name\n self._args=args\n self._kwargs=kwargs\n if daemon is not None :\n if daemon and not _daemon_threads_allowed():\n raise RuntimeError('daemon threads are disabled in this (sub)interpreter')\n self._daemonic=daemon\n else :\n self._daemonic=current_thread().daemon\n self._ident=None\n if _HAVE_THREAD_NATIVE_ID:\n self._native_id=None\n self._tstate_lock=None\n self._started=Event()\n self._is_stopped=False\n self._initialized=True\n \n self._stderr=_sys.stderr\n self._invoke_excepthook=_make_invoke_excepthook()\n \n _dangling.add(self)\n \n def _reset_internal_locks(self,is_alive):\n \n \n self._started._at_fork_reinit()\n if is_alive:\n \n \n \n if self._tstate_lock is not None :\n self._tstate_lock._at_fork_reinit()\n self._tstate_lock.acquire()\n else :\n \n \n self._is_stopped=True\n self._tstate_lock=None\n \n def __repr__(self):\n assert self._initialized,\"Thread.__init__() was not called\"\n status=\"initial\"\n if self._started.is_set():\n status=\"started\"\n self.is_alive()\n if self._is_stopped:\n status=\"stopped\"\n if self._daemonic:\n status +=\" daemon\"\n if self._ident is not None :\n status +=\" %s\"%self._ident\n return \"<%s(%s, %s)>\"%(self.__class__.__name__,self._name,status)\n \n def start(self):\n ''\n\n\n\n\n\n\n\n \n if not self._initialized:\n raise RuntimeError(\"thread.__init__() not called\")\n \n if self._started.is_set():\n raise RuntimeError(\"threads can only be started once\")\n \n with _active_limbo_lock:\n _limbo[self]=self\n try :\n _start_new_thread(self._bootstrap,())\n except Exception:\n with _active_limbo_lock:\n del _limbo[self]\n raise\n self._started.wait()\n \n def run(self):\n ''\n\n\n\n\n\n\n \n try :\n if self._target is not None :\n self._target(*self._args,**self._kwargs)\n finally :\n \n \n del self._target,self._args,self._kwargs\n \n def _bootstrap(self):\n \n \n \n \n \n \n \n \n \n \n \n \n try :\n self._bootstrap_inner()\n except :\n if self._daemonic and _sys is None :\n return\n raise\n \n def _set_ident(self):\n self._ident=get_ident()\n \n if _HAVE_THREAD_NATIVE_ID:\n def _set_native_id(self):\n self._native_id=get_native_id()\n \n def _set_tstate_lock(self):\n ''\n\n\n \n self._tstate_lock=_set_sentinel()\n self._tstate_lock.acquire()\n \n if not self.daemon:\n with _shutdown_locks_lock:\n _maintain_shutdown_locks()\n _shutdown_locks.add(self._tstate_lock)\n \n def _bootstrap_inner(self):\n try :\n self._set_ident()\n self._set_tstate_lock()\n if _HAVE_THREAD_NATIVE_ID:\n self._set_native_id()\n self._started.set()\n with _active_limbo_lock:\n _active[self._ident]=self\n del _limbo[self]\n \n if _trace_hook:\n _sys.settrace(_trace_hook)\n if _profile_hook:\n _sys.setprofile(_profile_hook)\n \n try :\n self.run()\n except :\n self._invoke_excepthook(self)\n finally :\n self._delete()\n \n def _stop(self):\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n lock=self._tstate_lock\n if lock is not None :\n assert not lock.locked()\n self._is_stopped=True\n self._tstate_lock=None\n if not self.daemon:\n with _shutdown_locks_lock:\n \n _maintain_shutdown_locks()\n \n def _delete(self):\n ''\n with _active_limbo_lock:\n del _active[get_ident()]\n \n \n \n \n \n def join(self,timeout=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not self._initialized:\n raise RuntimeError(\"Thread.__init__() not called\")\n if not self._started.is_set():\n raise RuntimeError(\"cannot join thread before it is started\")\n if self is current_thread():\n raise RuntimeError(\"cannot join current thread\")\n \n if timeout is None :\n self._wait_for_tstate_lock()\n else :\n \n \n self._wait_for_tstate_lock(timeout=max(timeout,0))\n \n def _wait_for_tstate_lock(self,block=True ,timeout=-1):\n \n \n \n \n \n \n lock=self._tstate_lock\n if lock is None :\n \n assert self._is_stopped\n return\n \n try :\n if lock.acquire(block,timeout):\n lock.release()\n self._stop()\n except :\n if lock.locked():\n \n \n \n \n lock.release()\n self._stop()\n raise\n \n @property\n def name(self):\n ''\n\n\n\n\n \n assert self._initialized,\"Thread.__init__() not called\"\n return self._name\n \n @name.setter\n def name(self,name):\n assert self._initialized,\"Thread.__init__() not called\"\n self._name=str(name)\n \n @property\n def ident(self):\n ''\n\n\n\n\n\n \n assert self._initialized,\"Thread.__init__() not called\"\n return self._ident\n \n if _HAVE_THREAD_NATIVE_ID:\n @property\n def native_id(self):\n ''\n\n\n\n\n \n assert self._initialized,\"Thread.__init__() not called\"\n return self._native_id\n \n def is_alive(self):\n ''\n\n\n\n\n\n \n assert self._initialized,\"Thread.__init__() not called\"\n if self._is_stopped or not self._started.is_set():\n return False\n self._wait_for_tstate_lock(False )\n return not self._is_stopped\n \n @property\n def daemon(self):\n ''\n\n\n\n\n\n\n\n\n \n assert self._initialized,\"Thread.__init__() not called\"\n return self._daemonic\n \n @daemon.setter\n def daemon(self,daemonic):\n if not self._initialized:\n raise RuntimeError(\"Thread.__init__() not called\")\n if daemonic and not _daemon_threads_allowed():\n raise RuntimeError('daemon threads are disabled in this interpreter')\n if self._started.is_set():\n raise RuntimeError(\"cannot set daemon status of active thread\")\n self._daemonic=daemonic\n \n def isDaemon(self):\n ''\n\n\n\n \n import warnings\n warnings.warn('isDaemon() is deprecated, get the daemon attribute instead',\n DeprecationWarning,stacklevel=2)\n return self.daemon\n \n def setDaemon(self,daemonic):\n ''\n\n\n\n \n import warnings\n warnings.warn('setDaemon() is deprecated, set the daemon attribute instead',\n DeprecationWarning,stacklevel=2)\n self.daemon=daemonic\n \n def getName(self):\n ''\n\n\n\n \n import warnings\n warnings.warn('getName() is deprecated, get the name attribute instead',\n DeprecationWarning,stacklevel=2)\n return self.name\n \n def setName(self,name):\n ''\n\n\n\n \n import warnings\n warnings.warn('setName() is deprecated, set the name attribute instead',\n DeprecationWarning,stacklevel=2)\n self.name=name\n \n \ntry :\n from _thread import (_excepthook as excepthook,\n _ExceptHookArgs as ExceptHookArgs)\nexcept ImportError:\n\n from traceback import print_exception as _print_exception\n from collections import namedtuple\n \n _ExceptHookArgs=namedtuple(\n 'ExceptHookArgs',\n 'exc_type exc_value exc_traceback thread')\n \n def ExceptHookArgs(args):\n return _ExceptHookArgs(*args)\n \n def excepthook(args,/):\n ''\n\n \n if args.exc_type ==SystemExit:\n \n return\n \n if _sys is not None and _sys.stderr is not None :\n stderr=_sys.stderr\n elif args.thread is not None :\n stderr=args.thread._stderr\n if stderr is None :\n \n \n return\n else :\n \n return\n \n if args.thread is not None :\n name=args.thread.name\n else :\n name=get_ident()\n print(f\"Exception in thread {name}:\",\n file=stderr,flush=True )\n _print_exception(args.exc_type,args.exc_value,args.exc_traceback,\n file=stderr)\n stderr.flush()\n \n \n \n__excepthook__=excepthook\n\n\ndef _make_invoke_excepthook():\n\n\n\n\n old_excepthook=excepthook\n old_sys_excepthook=_sys.excepthook\n if old_excepthook is None :\n raise RuntimeError(\"threading.excepthook is None\")\n if old_sys_excepthook is None :\n raise RuntimeError(\"sys.excepthook is None\")\n \n sys_exc_info=_sys.exc_info\n local_print=print\n local_sys=_sys\n \n def invoke_excepthook(thread):\n global excepthook\n try :\n hook=excepthook\n if hook is None :\n hook=old_excepthook\n \n args=ExceptHookArgs([*sys_exc_info(),thread])\n \n hook(args)\n except Exception as exc:\n exc.__suppress_context__=True\n del exc\n \n if local_sys is not None and local_sys.stderr is not None :\n stderr=local_sys.stderr\n else :\n stderr=thread._stderr\n \n local_print(\"Exception in threading.excepthook:\",\n file=stderr,flush=True )\n \n if local_sys is not None and local_sys.excepthook is not None :\n sys_excepthook=local_sys.excepthook\n else :\n sys_excepthook=old_sys_excepthook\n \n sys_excepthook(*sys_exc_info())\n finally :\n \n args=None\n \n return invoke_excepthook\n \n \n \n \nclass Timer(Thread):\n ''\n\n\n\n\n\n \n \n def __init__(self,interval,function,args=None ,kwargs=None ):\n Thread.__init__(self)\n self.interval=interval\n self.function=function\n self.args=args if args is not None else []\n self.kwargs=kwargs if kwargs is not None else {}\n self.finished=Event()\n \n def cancel(self):\n ''\n self.finished.set()\n \n def run(self):\n self.finished.wait(self.interval)\n if not self.finished.is_set():\n self.function(*self.args,**self.kwargs)\n self.finished.set()\n \n \n \n \nclass _MainThread(Thread):\n\n def __init__(self):\n Thread.__init__(self,name=\"MainThread\",daemon=False )\n self._set_tstate_lock()\n self._started.set()\n self._set_ident()\n if _HAVE_THREAD_NATIVE_ID:\n self._set_native_id()\n with _active_limbo_lock:\n _active[self._ident]=self\n \n \n \n \n \n \n \n \n \n \nclass _DummyThread(Thread):\n\n def __init__(self):\n Thread.__init__(self,name=_newname(\"Dummy-%d\"),\n daemon=_daemon_threads_allowed())\n \n self._started.set()\n self._set_ident()\n if _HAVE_THREAD_NATIVE_ID:\n self._set_native_id()\n with _active_limbo_lock:\n _active[self._ident]=self\n \n def _stop(self):\n pass\n \n def is_alive(self):\n assert not self._is_stopped and self._started.is_set()\n return True\n \n def join(self,timeout=None ):\n assert False ,\"cannot join a dummy thread\"\n \n \n \n \ndef current_thread():\n ''\n\n\n\n\n \n try :\n return _active[get_ident()]\n except KeyError:\n return _DummyThread()\n \ndef currentThread():\n ''\n\n\n\n \n import warnings\n warnings.warn('currentThread() is deprecated, use current_thread() instead',\n DeprecationWarning,stacklevel=2)\n return current_thread()\n \ndef active_count():\n ''\n\n\n\n\n \n \n \n with _active_limbo_lock:\n return len(_active)+len(_limbo)\n \ndef activeCount():\n ''\n\n\n\n \n import warnings\n warnings.warn('activeCount() is deprecated, use active_count() instead',\n DeprecationWarning,stacklevel=2)\n return active_count()\n \ndef _enumerate():\n\n return list(_active.values())+list(_limbo.values())\n \ndef enumerate():\n ''\n\n\n\n\n\n \n with _active_limbo_lock:\n return list(_active.values())+list(_limbo.values())\n \n \n_threading_atexits=[]\n_SHUTTING_DOWN=False\n\ndef _register_atexit(func,*arg,**kwargs):\n ''\n\n\n\n\n\n\n\n \n if _SHUTTING_DOWN:\n raise RuntimeError(\"can't register atexit after shutdown\")\n \n call=functools.partial(func,*arg,**kwargs)\n _threading_atexits.append(call)\n \n \nfrom _thread import stack_size\n\n\n\n\n\n_main_thread=_MainThread()\n\ndef _shutdown():\n ''\n\n \n \n \n \n \n \n if _main_thread._is_stopped:\n \n return\n \n global _SHUTTING_DOWN\n _SHUTTING_DOWN=True\n \n \n \n for atexit_call in reversed(_threading_atexits):\n atexit_call()\n \n \n if _main_thread.ident ==get_ident():\n tlock=_main_thread._tstate_lock\n \n \n assert tlock is not None\n assert tlock.locked()\n tlock.release()\n _main_thread._stop()\n else :\n \n \n \n \n \n pass\n \n \n while True :\n with _shutdown_locks_lock:\n locks=list(_shutdown_locks)\n _shutdown_locks.clear()\n \n if not locks:\n break\n \n for lock in locks:\n \n lock.acquire()\n lock.release()\n \n \n \n \n \ndef main_thread():\n ''\n\n\n\n \n return _main_thread\n \n \n \n \ntry :\n from _thread import _local as local\nexcept ImportError:\n from _threading_local import local\n \n \ndef _after_fork():\n ''\n\n \n \n \n global _active_limbo_lock,_main_thread\n global _shutdown_locks_lock,_shutdown_locks\n _active_limbo_lock=RLock()\n \n \n new_active={}\n \n try :\n current=_active[get_ident()]\n except KeyError:\n \n \n \n current=_MainThread()\n \n _main_thread=current\n \n \n _shutdown_locks_lock=_allocate_lock()\n _shutdown_locks=set()\n \n with _active_limbo_lock:\n \n \n threads=set(_enumerate())\n threads.update(_dangling)\n for thread in threads:\n \n \n if thread is current:\n \n \n thread._reset_internal_locks(True )\n ident=get_ident()\n thread._ident=ident\n new_active[ident]=thread\n else :\n \n thread._reset_internal_locks(False )\n thread._stop()\n \n _limbo.clear()\n _active.clear()\n _active.update(new_active)\n assert len(_active)==1\n \n \nif hasattr(_os,\"register_at_fork\"):\n _os.register_at_fork(after_in_child=_after_fork)\n", ["_collections", "_thread", "_threading_local", "_weakrefset", "collections", "functools", "itertools", "os", "sys", "time", "traceback", "warnings"]], "time": [".py", "from browser import self as window\nimport _locale\nimport javascript\n\n\ndate=javascript.Date.new\nnow=javascript.Date.now\n\n\n\n\n\n\n\n_STRUCT_TM_ITEMS=9\n\n\n\n\n\ndef _get_day_of_year(arg):\n ''\n\n\n\n\n\n\n\n\n\n \n ml=[31,28,31,30,31,30,31,31,30,31,30,31]\n if arg[0]%4 ==0:\n ml[1]+=1\n i=1\n yday=0\n while i mm >13:\n raise ValueError(\"month out of range\")\n \n dd=t[2]\n if dd ==0:dd=1\n if -1 >dd >32:\n raise ValueError(\"day of month out of range\")\n \n hh=t[3]\n if -1 >hh >24:\n raise ValueError(\"hour out of range\")\n \n minu=t[4]\n if -1 >minu >60:\n raise ValueError(\"minute out of range\")\n \n ss=t[5]\n if -1 >ss >62:\n raise ValueError(\"seconds out of range\")\n \n wd=t[6]%7\n if wd <-2:\n raise ValueError(\"day of week out of range\")\n \n dy=t[7]\n if dy ==0:dy=1\n if -1 >dy >367:\n raise ValueError(\"day of year out of range\")\n \n return t[0],mm,dd,hh,minu,ss,wd,dy,t[-1]\n \n \ndef _is_dst(secs=None ):\n ''\n d=date()\n if secs is not None :\n d=date(secs *1000)\n \n \n \n jan=date(d.getFullYear(),0,1)\n jul=date(d.getFullYear(),6,1)\n dst=int(d.getTimezoneOffset()=0 else 6\n tmp=struct_time([d.getUTCFullYear(),\n d.getUTCMonth()+1,d.getUTCDate(),\n d.getUTCHours(),d.getUTCMinutes(),d.getUTCSeconds(),\n wday,0,0])\n tmp.args[7]=_get_day_of_year(tmp.args)\n return tmp\n \ndef localtime(secs=None ):\n d=date()\n if secs is not None :\n d=date(secs *1000)\n dst=_is_dst(secs)\n wday=d.getDay()-1 if d.getDay()-1 >=0 else 6\n tmp=struct_time([d.getFullYear(),\n d.getMonth()+1,d.getDate(),\n d.getHours(),d.getMinutes(),d.getSeconds(),\n wday,0,dst])\n tmp.args[7]=_get_day_of_year(tmp.args)\n return tmp\n \ndef mktime(t):\n if isinstance(t,struct_time):\n d1=date(t.tm_year,t.tm_mon -1,t.tm_mday,\n t.tm_hour,t.tm_min,t.tm_sec,0).getTime()\n elif isinstance(t,tuple):\n d1=date(t[0],t[1]-1,t[2],t[3],t[4],t[5],0).getTime()\n else :\n raise ValueError(\"Tuple or struct_time argument required\")\n d2=date(0).getTime()\n return (d1 -d2)/1000.\n \ndef monotonic():\n return now()/1000.\n \ndef perf_counter():\n return window.performance.now()/1000.\n \ndef process_time():\n return now()/1000.\n \ndef time():\n return float(date().getTime()/1000)\n \ndef sleep(secs):\n ''\n\n \n \n float(secs)\n raise NotImplementedError(\"Blocking functions like time.sleep() are not \"\n \"supported in the browser. Use functions in module browser.timer \"\n \"instead.\")\n \ndef strftime(_format,t=None ):\n def ns(t,nb):\n \n res=str(t)\n while len(res) float\n repeat(string, string) -> list\n default_timer() -> float\n\n\"\"\"\n\nimport gc\nimport sys\nimport time\nimport itertools\n\n__all__=[\"Timer\",\"timeit\",\"repeat\",\"default_timer\"]\n\ndummy_src_name=\"\"\ndefault_number=1000000\ndefault_repeat=5\ndefault_timer=time.perf_counter\n\n_globals=globals\n\n\n\n\ntemplate=\"\"\"\ndef inner(_it, _timer{init}):\n {setup}\n _t0 = _timer()\n for _i in _it:\n {stmt}\n pass\n _t1 = _timer()\n return _t1 - _t0\n\"\"\"\n\ndef reindent(src,indent):\n ''\n return src.replace(\"\\n\",\"\\n\"+\" \"*indent)\n \nclass Timer:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,stmt=\"pass\",setup=\"pass\",timer=default_timer,\n globals=None ):\n ''\n self.timer=timer\n local_ns={}\n global_ns=_globals()if globals is None else globals\n init=''\n if isinstance(setup,str):\n \n compile(setup,dummy_src_name,\"exec\")\n stmtprefix=setup+'\\n'\n setup=reindent(setup,4)\n elif callable(setup):\n local_ns['_setup']=setup\n init +=', _setup=_setup'\n stmtprefix=''\n setup='_setup()'\n else :\n raise ValueError(\"setup is neither a string nor callable\")\n if isinstance(stmt,str):\n \n compile(stmtprefix+stmt,dummy_src_name,\"exec\")\n stmt=reindent(stmt,8)\n elif callable(stmt):\n local_ns['_stmt']=stmt\n init +=', _stmt=_stmt'\n stmt='_stmt()'\n else :\n raise ValueError(\"stmt is neither a string nor callable\")\n src=template.format(stmt=stmt,setup=setup,init=init)\n self.src=src\n code=compile(src,dummy_src_name,\"exec\")\n exec(code,global_ns,local_ns)\n self.inner=local_ns[\"inner\"]\n \n def print_exc(self,file=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n import linecache,traceback\n if self.src is not None :\n linecache.cache[dummy_src_name]=(len(self.src),\n None ,\n self.src.split(\"\\n\"),\n dummy_src_name)\n \n \n traceback.print_exc(file=file)\n \n def timeit(self,number=default_number):\n ''\n\n\n\n\n\n\n\n \n it=itertools.repeat(None ,number)\n gcold=gc.isenabled()\n gc.disable()\n try :\n timing=self.inner(it,self.timer)\n finally :\n if gcold:\n gc.enable()\n return timing\n \n def repeat(self,repeat=default_repeat,number=default_number):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n r=[]\n for i in range(repeat):\n t=self.timeit(number)\n r.append(t)\n return r\n \n def autorange(self,callback=None ):\n ''\n\n\n\n\n\n\n\n \n i=1\n while True :\n for j in 1,2,5:\n number=i *j\n time_taken=self.timeit(number)\n if callback:\n callback(number,time_taken)\n if time_taken >=0.2:\n return (number,time_taken)\n i *=10\n \ndef timeit(stmt=\"pass\",setup=\"pass\",timer=default_timer,\nnumber=default_number,globals=None ):\n ''\n return Timer(stmt,setup,timer,globals).timeit(number)\n \ndef repeat(stmt=\"pass\",setup=\"pass\",timer=default_timer,\nrepeat=default_repeat,number=default_number,globals=None ):\n ''\n return Timer(stmt,setup,timer,globals).repeat(repeat,number)\n \ndef main(args=None ,*,_wrap_timer=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if args is None :\n args=sys.argv[1:]\n import getopt\n try :\n opts,args=getopt.getopt(args,\"n:u:s:r:pvh\",\n [\"number=\",\"setup=\",\"repeat=\",\n \"process\",\"verbose\",\"unit=\",\"help\"])\n except getopt.error as err:\n print(err)\n print(\"use -h/--help for command line help\")\n return 2\n \n timer=default_timer\n stmt=\"\\n\".join(args)or \"pass\"\n number=0\n setup=[]\n repeat=default_repeat\n verbose=0\n time_unit=None\n units={\"nsec\":1e-9,\"usec\":1e-6,\"msec\":1e-3,\"sec\":1.0}\n precision=3\n for o,a in opts:\n if o in (\"-n\",\"--number\"):\n number=int(a)\n if o in (\"-s\",\"--setup\"):\n setup.append(a)\n if o in (\"-u\",\"--unit\"):\n if a in units:\n time_unit=a\n else :\n print(\"Unrecognized unit. Please select nsec, usec, msec, or sec.\",\n file=sys.stderr)\n return 2\n if o in (\"-r\",\"--repeat\"):\n repeat=int(a)\n if repeat <=0:\n repeat=1\n if o in (\"-p\",\"--process\"):\n timer=time.process_time\n if o in (\"-v\",\"--verbose\"):\n if verbose:\n precision +=1\n verbose +=1\n if o in (\"-h\",\"--help\"):\n print(__doc__,end=' ')\n return 0\n setup=\"\\n\".join(setup)or \"pass\"\n \n \n \n \n import os\n sys.path.insert(0,os.curdir)\n if _wrap_timer is not None :\n timer=_wrap_timer(timer)\n \n t=Timer(stmt,setup,timer)\n if number ==0:\n \n callback=None\n if verbose:\n def callback(number,time_taken):\n msg=\"{num} loop{s} -> {secs:.{prec}g} secs\"\n plural=(number !=1)\n print(msg.format(num=number,s='s'if plural else '',\n secs=time_taken,prec=precision))\n try :\n number,_=t.autorange(callback)\n except :\n t.print_exc()\n return 1\n \n if verbose:\n print()\n \n try :\n raw_timings=t.repeat(repeat,number)\n except :\n t.print_exc()\n return 1\n \n def format_time(dt):\n unit=time_unit\n \n if unit is not None :\n scale=units[unit]\n else :\n scales=[(scale,unit)for unit,scale in units.items()]\n scales.sort(reverse=True )\n for scale,unit in scales:\n if dt >=scale:\n break\n \n return \"%.*g %s\"%(precision,dt /scale,unit)\n \n if verbose:\n print(\"raw times: %s\"%\", \".join(map(format_time,raw_timings)))\n print()\n timings=[dt /number for dt in raw_timings]\n \n best=min(timings)\n print(\"%d loop%s, best of %d: %s per loop\"\n %(number,'s'if number !=1 else '',\n repeat,format_time(best)))\n \n best=min(timings)\n worst=max(timings)\n if worst >=best *4:\n import warnings\n warnings.warn_explicit(\"The test results are likely unreliable. \"\n \"The worst time (%s) was more than four times \"\n \"slower than the best time (%s).\"\n %(format_time(worst),format_time(best)),\n UserWarning,'',0)\n return None\n \nif __name__ ==\"__main__\":\n sys.exit(main())\n", ["gc", "getopt", "itertools", "linecache", "os", "sys", "time", "traceback", "warnings"]], "token": [".py", "''\n\n\n__all__=['tok_name','ISTERMINAL','ISNONTERMINAL','ISEOF']\n\nENDMARKER=0\nNAME=1\nNUMBER=2\nSTRING=3\nNEWLINE=4\nINDENT=5\nDEDENT=6\nLPAR=7\nRPAR=8\nLSQB=9\nRSQB=10\nCOLON=11\nCOMMA=12\nSEMI=13\nPLUS=14\nMINUS=15\nSTAR=16\nSLASH=17\nVBAR=18\nAMPER=19\nLESS=20\nGREATER=21\nEQUAL=22\nDOT=23\nPERCENT=24\nLBRACE=25\nRBRACE=26\nEQEQUAL=27\nNOTEQUAL=28\nLESSEQUAL=29\nGREATEREQUAL=30\nTILDE=31\nCIRCUMFLEX=32\nLEFTSHIFT=33\nRIGHTSHIFT=34\nDOUBLESTAR=35\nPLUSEQUAL=36\nMINEQUAL=37\nSTAREQUAL=38\nSLASHEQUAL=39\nPERCENTEQUAL=40\nAMPEREQUAL=41\nVBAREQUAL=42\nCIRCUMFLEXEQUAL=43\nLEFTSHIFTEQUAL=44\nRIGHTSHIFTEQUAL=45\nDOUBLESTAREQUAL=46\nDOUBLESLASH=47\nDOUBLESLASHEQUAL=48\nAT=49\nATEQUAL=50\nRARROW=51\nELLIPSIS=52\nCOLONEQUAL=53\nEXCLAMATION=54\nOP=55\nAWAIT=56\nASYNC=57\nTYPE_IGNORE=58\nTYPE_COMMENT=59\nSOFT_KEYWORD=60\nFSTRING_START=61\nFSTRING_MIDDLE=62\nFSTRING_END=63\nCOMMENT=64\nNL=65\n\nERRORTOKEN=66\nENCODING=67\nN_TOKENS=68\n\nNT_OFFSET=256\n\ntok_name={value:name\nfor name,value in globals().items()\nif isinstance(value,int)and not name.startswith('_')}\n__all__.extend(tok_name.values())\n\nEXACT_TOKEN_TYPES={\n'!':EXCLAMATION,\n'!=':NOTEQUAL,\n'%':PERCENT,\n'%=':PERCENTEQUAL,\n'&':AMPER,\n'&=':AMPEREQUAL,\n'(':LPAR,\n')':RPAR,\n'*':STAR,\n'**':DOUBLESTAR,\n'**=':DOUBLESTAREQUAL,\n'*=':STAREQUAL,\n'+':PLUS,\n'+=':PLUSEQUAL,\n',':COMMA,\n'-':MINUS,\n'-=':MINEQUAL,\n'->':RARROW,\n'.':DOT,\n'...':ELLIPSIS,\n'/':SLASH,\n'//':DOUBLESLASH,\n'//=':DOUBLESLASHEQUAL,\n'/=':SLASHEQUAL,\n':':COLON,\n':=':COLONEQUAL,\n';':SEMI,\n'<':LESS,\n'<<':LEFTSHIFT,\n'<<=':LEFTSHIFTEQUAL,\n'<=':LESSEQUAL,\n'=':EQUAL,\n'==':EQEQUAL,\n'>':GREATER,\n'>=':GREATEREQUAL,\n'>>':RIGHTSHIFT,\n'>>=':RIGHTSHIFTEQUAL,\n'@':AT,\n'@=':ATEQUAL,\n'[':LSQB,\n']':RSQB,\n'^':CIRCUMFLEX,\n'^=':CIRCUMFLEXEQUAL,\n'{':LBRACE,\n'|':VBAR,\n'|=':VBAREQUAL,\n'}':RBRACE,\n'~':TILDE,\n}\n\ndef ISTERMINAL(x):\n return x =NT_OFFSET\n \ndef ISEOF(x):\n return x ==ENDMARKER\n", []], "tokenize": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__author__='Ka-Ping Yee '\n__credits__=('GvR, ESR, Tim Peters, Thomas Wouters, Fred Drake, '\n'Skip Montanaro, Raymond Hettinger, Trent Nelson, '\n'Michael Foord')\nfrom builtins import open as _builtin_open\nfrom codecs import lookup,BOM_UTF8\nimport collections\nimport functools\nfrom io import TextIOWrapper\nimport itertools as _itertools\nimport re\nimport sys\nfrom token import *\nfrom token import EXACT_TOKEN_TYPES\nimport _tokenize\n\ncookie_re=re.compile(r'^[ \\t\\f]*#.*?coding[:=][ \\t]*([-\\w.]+)',re.ASCII)\nblank_re=re.compile(br'^[ \\t\\f]*(?:[#\\r\\n]|$)',re.ASCII)\n\nimport token\n__all__=token.__all__+[\"tokenize\",\"generate_tokens\",\"detect_encoding\",\n\"untokenize\",\"TokenInfo\"]\ndel token\n\nclass TokenInfo(collections.namedtuple('TokenInfo','type string start end line')):\n def __repr__(self):\n annotated_type='%d (%s)'%(self.type,tok_name[self.type])\n return ('TokenInfo(type=%s, string=%r, start=%r, end=%r, line=%r)'%\n self._replace(type=annotated_type))\n \n @property\n def exact_type(self):\n if self.type ==OP and self.string in EXACT_TOKEN_TYPES:\n return EXACT_TOKEN_TYPES[self.string]\n else :\n return self.type\n \ndef group(*choices):return '('+'|'.join(choices)+')'\ndef any(*choices):return group(*choices)+'*'\ndef maybe(*choices):return group(*choices)+'?'\n\n\n\nWhitespace=r'[ \\f\\t]*'\nComment=r'#[^\\r\\n]*'\nIgnore=Whitespace+any(r'\\\\\\r?\\n'+Whitespace)+maybe(Comment)\nName=r'\\w+'\n\nHexnumber=r'0[xX](?:_?[0-9a-fA-F])+'\nBinnumber=r'0[bB](?:_?[01])+'\nOctnumber=r'0[oO](?:_?[0-7])+'\nDecnumber=r'(?:0(?:_?0)*|[1-9](?:_?[0-9])*)'\nIntnumber=group(Hexnumber,Binnumber,Octnumber,Decnumber)\nExponent=r'[eE][-+]?[0-9](?:_?[0-9])*'\nPointfloat=group(r'[0-9](?:_?[0-9])*\\.(?:[0-9](?:_?[0-9])*)?',\nr'\\.[0-9](?:_?[0-9])*')+maybe(Exponent)\nExpfloat=r'[0-9](?:_?[0-9])*'+Exponent\nFloatnumber=group(Pointfloat,Expfloat)\nImagnumber=group(r'[0-9](?:_?[0-9])*[jJ]',Floatnumber+r'[jJ]')\nNumber=group(Imagnumber,Floatnumber,Intnumber)\n\n\ndef _all_string_prefixes():\n\n\n\n _valid_string_prefixes=['b','r','u','f','br','fr']\n \n result={''}\n for prefix in _valid_string_prefixes:\n for t in _itertools.permutations(prefix):\n \n \n for u in _itertools.product(*[(c,c.upper())for c in t]):\n result.add(''.join(u))\n return result\n \n@functools.lru_cache\ndef _compile(expr):\n return re.compile(expr,re.UNICODE)\n \n \n \nStringPrefix=group(*_all_string_prefixes())\n\n\nSingle=r\"[^'\\\\]*(?:\\\\.[^'\\\\]*)*'\"\n\nDouble=r'[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\"'\n\nSingle3=r\"[^'\\\\]*(?:(?:\\\\.|'(?!''))[^'\\\\]*)*'''\"\n\nDouble3=r'[^\"\\\\]*(?:(?:\\\\.|\"(?!\"\"))[^\"\\\\]*)*\"\"\"'\nTriple=group(StringPrefix+\"'''\",StringPrefix+'\"\"\"')\n\nString=group(StringPrefix+r\"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*'\",\nStringPrefix+r'\"[^\\n\"\\\\]*(?:\\\\.[^\\n\"\\\\]*)*\"')\n\n\n\n\nSpecial=group(*map(re.escape,sorted(EXACT_TOKEN_TYPES,reverse=True )))\nFunny=group(r'\\r?\\n',Special)\n\nPlainToken=group(Number,Funny,String,Name)\nToken=Ignore+PlainToken\n\n\nContStr=group(StringPrefix+r\"'[^\\n'\\\\]*(?:\\\\.[^\\n'\\\\]*)*\"+\ngroup(\"'\",r'\\\\\\r?\\n'),\nStringPrefix+r'\"[^\\n\"\\\\]*(?:\\\\.[^\\n\"\\\\]*)*'+\ngroup('\"',r'\\\\\\r?\\n'))\nPseudoExtras=group(r'\\\\\\r?\\n|\\Z',Comment,Triple)\nPseudoToken=Whitespace+group(PseudoExtras,Number,Funny,ContStr,Name)\n\n\n\n\nendpats={}\nfor _prefix in _all_string_prefixes():\n endpats[_prefix+\"'\"]=Single\n endpats[_prefix+'\"']=Double\n endpats[_prefix+\"'''\"]=Single3\n endpats[_prefix+'\"\"\"']=Double3\ndel _prefix\n\n\n\nsingle_quoted=set()\ntriple_quoted=set()\nfor t in _all_string_prefixes():\n for u in (t+'\"',t+\"'\"):\n single_quoted.add(u)\n for u in (t+'\"\"\"',t+\"'''\"):\n triple_quoted.add(u)\ndel t,u\n\ntabsize=8\n\nclass TokenError(Exception):pass\n\n\nclass StopTokenizing(Exception):pass\n\nclass Untokenizer:\n\n def __init__(self):\n self.tokens=[]\n self.prev_row=1\n self.prev_col=0\n self.encoding=None\n \n def add_whitespace(self,start):\n row,col=start\n if row =len(indent):\n self.tokens.append(indent)\n self.prev_col=len(indent)\n startline=False\n elif tok_type ==FSTRING_MIDDLE:\n if '{'in token or '}'in token:\n end_line,end_col=end\n end=(end_line,end_col+token.count('{')+token.count('}'))\n token=re.sub('{','{{',token)\n token=re.sub('}','}}',token)\n \n \n self.add_whitespace(start)\n self.tokens.append(token)\n self.prev_row,self.prev_col=end\n if tok_type in (NEWLINE,NL):\n self.prev_row +=1\n self.prev_col=0\n return \"\".join(self.tokens)\n \n def compat(self,token,iterable):\n indents=[]\n toks_append=self.tokens.append\n startline=token[0]in (NEWLINE,NL)\n prevstring=False\n \n for tok in _itertools.chain([token],iterable):\n toknum,tokval=tok[:2]\n if toknum ==ENCODING:\n self.encoding=tokval\n continue\n \n if toknum in (NAME,NUMBER):\n tokval +=' '\n \n \n if toknum ==STRING:\n if prevstring:\n tokval=' '+tokval\n prevstring=True\n else :\n prevstring=False\n \n if toknum ==INDENT:\n indents.append(tokval)\n continue\n elif toknum ==DEDENT:\n indents.pop()\n continue\n elif toknum in (NEWLINE,NL):\n startline=True\n elif startline and indents:\n toks_append(indents[-1])\n startline=False\n elif toknum ==FSTRING_MIDDLE:\n if '{'in tokval or '}'in tokval:\n tokval=re.sub('{','{{',tokval)\n tokval=re.sub('}','}}',tokval)\n \n toks_append(tokval)\n \n \ndef untokenize(iterable):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n ut=Untokenizer()\n out=ut.untokenize(iterable)\n if ut.encoding is not None :\n out=out.encode(ut.encoding)\n return out\n \n \ndef _get_normal_name(orig_enc):\n ''\n \n enc=orig_enc[:12].lower().replace(\"_\",\"-\")\n if enc ==\"utf-8\"or enc.startswith(\"utf-8-\"):\n return \"utf-8\"\n if enc in (\"latin-1\",\"iso-8859-1\",\"iso-latin-1\")or\\\n enc.startswith((\"latin-1-\",\"iso-8859-1-\",\"iso-latin-1-\")):\n return \"iso-8859-1\"\n return orig_enc\n \ndef detect_encoding(readline):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n filename=readline.__self__.name\n except AttributeError:\n filename=None\n bom_found=False\n encoding=None\n default='utf-8'\n def read_or_stop():\n try :\n return readline()\n except StopIteration:\n return b''\n \n def find_cookie(line):\n try :\n \n \n \n line_string=line.decode('utf-8')\n except UnicodeDecodeError:\n msg=\"invalid or missing encoding declaration\"\n if filename is not None :\n msg='{} for {!r}'.format(msg,filename)\n raise SyntaxError(msg)\n \n match=cookie_re.match(line_string)\n if not match:\n return None\n encoding=_get_normal_name(match.group(1))\n try :\n codec=lookup(encoding)\n except LookupError:\n \n if filename is None :\n msg=\"unknown encoding: \"+encoding\n else :\n msg=\"unknown encoding for {!r}: {}\".format(filename,\n encoding)\n raise SyntaxError(msg)\n \n if bom_found:\n if encoding !='utf-8':\n \n if filename is None :\n msg='encoding problem: utf-8'\n else :\n msg='encoding problem for {!r}: utf-8'.format(filename)\n raise SyntaxError(msg)\n encoding +='-sig'\n return encoding\n \n first=read_or_stop()\n if first.startswith(BOM_UTF8):\n bom_found=True\n first=first[3:]\n default='utf-8-sig'\n if not first:\n return default,[]\n \n encoding=find_cookie(first)\n if encoding:\n return encoding,[first]\n if not blank_re.match(first):\n return default,[first]\n \n second=read_or_stop()\n if not second:\n return default,[first]\n \n encoding=find_cookie(second)\n if encoding:\n return encoding,[first,second]\n \n return default,[first,second]\n \n \ndef open(filename):\n ''\n\n \n buffer=_builtin_open(filename,'rb')\n try :\n encoding,lines=detect_encoding(buffer.readline)\n buffer.seek(0)\n text=TextIOWrapper(buffer,encoding,line_buffering=True )\n text.mode='r'\n return text\n except :\n buffer.close()\n raise\n \ndef tokenize(readline):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n encoding,consumed=detect_encoding(readline)\n rl_gen=_itertools.chain(consumed,iter(readline,b\"\"))\n if encoding is not None :\n if encoding ==\"utf-8-sig\":\n \n encoding=\"utf-8\"\n yield TokenInfo(ENCODING,encoding,(0,0),(0,0),'')\n yield from _generate_tokens_from_c_tokenizer(rl_gen.__next__,encoding,extra_tokens=True )\n \ndef generate_tokens(readline):\n ''\n\n\n\n \n return _generate_tokens_from_c_tokenizer(readline,extra_tokens=True )\n \ndef main():\n import argparse\n \n \n def perror(message):\n sys.stderr.write(message)\n sys.stderr.write('\\n')\n \n def error(message,filename=None ,location=None ):\n if location:\n args=(filename,)+location+(message,)\n perror(\"%s:%d:%d: error: %s\"%args)\n elif filename:\n perror(\"%s: error: %s\"%(filename,message))\n else :\n perror(\"error: %s\"%message)\n sys.exit(1)\n \n \n parser=argparse.ArgumentParser(prog='python -m tokenize')\n parser.add_argument(dest='filename',nargs='?',\n metavar='filename.py',\n help='the file to tokenize; defaults to stdin')\n parser.add_argument('-e','--exact',dest='exact',action='store_true',\n help='display token names using the exact type')\n args=parser.parse_args()\n \n try :\n \n if args.filename:\n filename=args.filename\n with _builtin_open(filename,'rb')as f:\n tokens=list(tokenize(f.readline))\n else :\n filename=\"\"\n tokens=_generate_tokens_from_c_tokenizer(\n sys.stdin.readline,extra_tokens=True )\n \n \n \n for token in tokens:\n token_type=token.type\n if args.exact:\n token_type=token.exact_type\n token_range=\"%d,%d-%d,%d:\"%(token.start+token.end)\n print(\"%-20s%-15s%-15r\"%\n (token_range,tok_name[token_type],token.string))\n except IndentationError as err:\n line,column=err.args[1][1:3]\n error(err.args[0],filename,(line,column))\n except TokenError as err:\n line,column=err.args[1]\n error(err.args[0],filename,(line,column))\n except SyntaxError as err:\n error(err,filename)\n except OSError as err:\n error(err)\n except KeyboardInterrupt:\n print(\"interrupted\\n\")\n except Exception as err:\n perror(\"unexpected error: %s\"%err)\n raise\n \ndef _generate_tokens_from_c_tokenizer(source,encoding=None ,extra_tokens=False ):\n ''\n if encoding is None :\n it=_tokenize.TokenizerIter(source,extra_tokens=extra_tokens)\n else :\n it=_tokenize.TokenizerIter(source,encoding=encoding,extra_tokens=extra_tokens)\n for info in it:\n yield TokenInfo._make(info)\n \n \nif __name__ ==\"__main__\":\n main()\n", ["_tokenize", "argparse", "builtins", "codecs", "collections", "functools", "io", "itertools", "re", "sys", "token"]], "traceback": [".py", "''\n\nimport collections.abc\nimport itertools\nimport linecache\nimport sys\nimport textwrap\nfrom contextlib import suppress\n\n__all__=['extract_stack','extract_tb','format_exception',\n'format_exception_only','format_list','format_stack',\n'format_tb','print_exc','format_exc','print_exception',\n'print_last','print_stack','print_tb','clear_frames',\n'FrameSummary','StackSummary','TracebackException',\n'walk_stack','walk_tb']\n\n\n\n\n\ndef print_list(extracted_list,file=None ):\n ''\n \n if file is None :\n file=sys.stderr\n for item in StackSummary.from_list(extracted_list).format():\n print(item,file=file,end=\"\")\n \ndef format_list(extracted_list):\n ''\n\n\n\n\n\n\n\n\n\n \n return StackSummary.from_list(extracted_list).format()\n \n \n \n \n \ndef print_tb(tb,limit=None ,file=None ):\n ''\n\n\n\n\n\n \n print_list(extract_tb(tb,limit=limit),file=file)\n \ndef format_tb(tb,limit=None ):\n ''\n return extract_tb(tb,limit=limit).format()\n \ndef extract_tb(tb,limit=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n return StackSummary._extract_from_extended_frame_gen(\n _walk_tb_with_full_positions(tb),limit=limit)\n \n \n \n \n \n_cause_message=(\n\"\\nThe above exception was the direct cause \"\n\"of the following exception:\\n\\n\")\n\n_context_message=(\n\"\\nDuring handling of the above exception, \"\n\"another exception occurred:\\n\\n\")\n\n\nclass _Sentinel:\n def __repr__(self):\n return \"\"\n \n_sentinel=_Sentinel()\n\ndef _parse_value_tb(exc,value,tb):\n if (value is _sentinel)!=(tb is _sentinel):\n raise ValueError(\"Both or neither of value and tb must be given\")\n if value is tb is _sentinel:\n if exc is not None :\n if isinstance(exc,BaseException):\n return exc,exc.__traceback__\n \n raise TypeError(f'Exception expected for value, '\n f'{type(exc).__name__} found')\n else :\n return None ,None\n return value,tb\n \n \ndef print_exception(exc,/,value=_sentinel,tb=_sentinel,limit=None ,\\\nfile=None ,chain=True ):\n ''\n\n\n\n\n\n\n\n\n \n value,tb=_parse_value_tb(exc,value,tb)\n te=TracebackException(type(value),value,tb,limit=limit,compact=True )\n te.print(file=file,chain=chain)\n \n \ndef format_exception(exc,/,value=_sentinel,tb=_sentinel,limit=None ,\\\nchain=True ):\n ''\n\n\n\n\n\n\n \n value,tb=_parse_value_tb(exc,value,tb)\n te=TracebackException(type(value),value,tb,limit=limit,compact=True )\n return list(te.format(chain=chain))\n \n \ndef format_exception_only(exc,/,value=_sentinel):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n if value is _sentinel:\n value=exc\n te=TracebackException(type(value),value,None ,compact=True )\n return list(te.format_exception_only())\n \n \n \n \ndef _format_final_exc_line(etype,value):\n valuestr=_safe_string(value,'exception')\n if value is None or not valuestr:\n line=\"%s\\n\"%etype\n else :\n line=\"%s: %s\\n\"%(etype,valuestr)\n return line\n \ndef _safe_string(value,what,func=str):\n try :\n return func(value)\n except :\n return f'<{what} {func.__name__}() failed>'\n \n \n \ndef print_exc(limit=None ,file=None ,chain=True ):\n ''\n print_exception(sys.exception(),limit=limit,file=file,chain=chain)\n \ndef format_exc(limit=None ,chain=True ):\n ''\n return \"\".join(format_exception(sys.exception(),limit=limit,chain=chain))\n \ndef print_last(limit=None ,file=None ,chain=True ):\n ''\n if not hasattr(sys,\"last_exc\")and not hasattr(sys,\"last_type\"):\n raise ValueError(\"no last exception\")\n \n if hasattr(sys,\"last_exc\"):\n print_exception(sys.last_exc,limit,file,chain)\n else :\n print_exception(sys.last_type,sys.last_value,sys.last_traceback,\n limit,file,chain)\n \n \n \n \n \n \ndef print_stack(f=None ,limit=None ,file=None ):\n ''\n\n\n\n\n \n if f is None :\n f=sys._getframe().f_back\n print_list(extract_stack(f,limit=limit),file=file)\n \n \ndef format_stack(f=None ,limit=None ):\n ''\n if f is None :\n f=sys._getframe().f_back\n return format_list(extract_stack(f,limit=limit))\n \n \ndef extract_stack(f=None ,limit=None ):\n ''\n\n\n\n\n\n\n \n if f is None :\n f=sys._getframe().f_back\n stack=StackSummary.extract(walk_stack(f),limit=limit)\n stack.reverse()\n return stack\n \n \ndef clear_frames(tb):\n ''\n while tb is not None :\n try :\n tb.tb_frame.clear()\n except RuntimeError:\n \n pass\n tb=tb.tb_next\n \n \nclass FrameSummary:\n ''\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=('filename','lineno','end_lineno','colno','end_colno',\n 'name','_line','locals')\n \n def __init__(self,filename,lineno,name,*,lookup_line=True ,\n locals=None ,line=None ,\n end_lineno=None ,colno=None ,end_colno=None ):\n ''\n\n\n\n\n\n\n\n \n self.filename=filename\n self.lineno=lineno\n self.name=name\n self._line=line\n if lookup_line:\n self.line\n self.locals={k:_safe_string(v,'local',func=repr)\n for k,v in locals.items()}if locals else None\n self.end_lineno=end_lineno\n self.colno=colno\n self.end_colno=end_colno\n \n def __eq__(self,other):\n if isinstance(other,FrameSummary):\n return (self.filename ==other.filename and\n self.lineno ==other.lineno and\n self.name ==other.name and\n self.locals ==other.locals)\n if isinstance(other,tuple):\n return (self.filename,self.lineno,self.name,self.line)==other\n return NotImplemented\n \n def __getitem__(self,pos):\n return (self.filename,self.lineno,self.name,self.line)[pos]\n \n def __iter__(self):\n return iter([self.filename,self.lineno,self.name,self.line])\n \n def __repr__(self):\n return \"\".format(\n filename=self.filename,lineno=self.lineno,name=self.name)\n \n def __len__(self):\n return 4\n \n @property\n def _original_line(self):\n \n self.line\n return self._line\n \n @property\n def line(self):\n if self._line is None :\n if self.lineno is None :\n return None\n self._line=linecache.getline(self.filename,self.lineno)\n return self._line.strip()\n \n \ndef walk_stack(f):\n ''\n\n\n\n \n if f is None :\n f=sys._getframe().f_back.f_back.f_back.f_back\n while f is not None :\n yield f,f.f_lineno\n f=f.f_back\n \n \ndef walk_tb(tb):\n ''\n\n\n\n \n while tb is not None :\n yield tb.tb_frame,tb.tb_lineno\n tb=tb.tb_next\n \n \ndef _walk_tb_with_full_positions(tb):\n\n\n while tb is not None :\n positions=_get_code_position(tb.tb_frame.f_code,tb.tb_lasti)\n \n \n if positions[0]is None :\n yield tb.tb_frame,(tb.tb_lineno,)+positions[1:]\n else :\n yield tb.tb_frame,positions\n tb=tb.tb_next\n \n \ndef _get_code_position(code,instruction_index):\n if instruction_index <0:\n return (None ,None ,None ,None )\n positions_gen=code.co_positions()\n return next(itertools.islice(positions_gen,instruction_index //2,None ))\n \n \n_RECURSIVE_CUTOFF=3\n\nclass StackSummary(list):\n ''\n \n @classmethod\n def extract(klass,frame_gen,*,limit=None ,lookup_lines=True ,\n capture_locals=False ):\n ''\n\n\n\n\n\n\n\n\n\n \n def extended_frame_gen():\n for f,lineno in frame_gen:\n yield f,(lineno,None ,None ,None )\n \n return klass._extract_from_extended_frame_gen(\n extended_frame_gen(),limit=limit,lookup_lines=lookup_lines,\n capture_locals=capture_locals)\n \n @classmethod\n def _extract_from_extended_frame_gen(klass,frame_gen,*,limit=None ,\n lookup_lines=True ,capture_locals=False ):\n \n \n \n \n if limit is None :\n limit=getattr(sys,'tracebacklimit',None )\n if limit is not None and limit <0:\n limit=0\n if limit is not None :\n if limit >=0:\n frame_gen=itertools.islice(frame_gen,limit)\n else :\n frame_gen=collections.deque(frame_gen,maxlen=-limit)\n \n result=klass()\n fnames=set()\n for f,(lineno,end_lineno,colno,end_colno)in frame_gen:\n co=f.f_code\n filename=co.co_filename\n name=co.co_name\n \n fnames.add(filename)\n linecache.lazycache(filename,f.f_globals)\n \n if capture_locals:\n f_locals=f.f_locals\n else :\n f_locals=None\n result.append(FrameSummary(\n filename,lineno,name,lookup_line=False ,locals=f_locals,\n end_lineno=end_lineno,colno=colno,end_colno=end_colno))\n for filename in fnames:\n linecache.checkcache(filename)\n \n if lookup_lines:\n for f in result:\n f.line\n return result\n \n @classmethod\n def from_list(klass,a_list):\n ''\n\n\n \n \n \n \n \n result=StackSummary()\n for frame in a_list:\n if isinstance(frame,FrameSummary):\n result.append(frame)\n else :\n filename,lineno,name,line=frame\n result.append(FrameSummary(filename,lineno,name,line=line))\n return result\n \n def format_frame_summary(self,frame_summary):\n ''\n\n\n\n \n row=[]\n row.append(' File \"{}\", line {}, in {}\\n'.format(\n frame_summary.filename,frame_summary.lineno,frame_summary.name))\n if frame_summary.line:\n stripped_line=frame_summary.line.strip()\n row.append(' {}\\n'.format(stripped_line))\n \n orig_line_len=len(frame_summary._original_line)\n frame_line_len=len(frame_summary.line.lstrip())\n stripped_characters=orig_line_len -frame_line_len\n if (\n frame_summary.colno is not None\n and frame_summary.end_colno is not None\n ):\n start_offset=_byte_offset_to_character_offset(\n frame_summary._original_line,frame_summary.colno)+1\n end_offset=_byte_offset_to_character_offset(\n frame_summary._original_line,frame_summary.end_colno)+1\n \n anchors=None\n if frame_summary.lineno ==frame_summary.end_lineno:\n with suppress(Exception):\n anchors=_extract_caret_anchors_from_line_segment(\n frame_summary._original_line[start_offset -1:end_offset -1]\n )\n else :\n end_offset=stripped_characters+len(stripped_line)\n \n \n if end_offset -start_offset 0):\n row.append(' ')\n row.append(' '*(start_offset -stripped_characters))\n \n if anchors:\n row.append(anchors.primary_char *(anchors.left_end_offset))\n row.append(anchors.secondary_char *(anchors.right_start_offset -anchors.left_end_offset))\n row.append(anchors.primary_char *(end_offset -start_offset -anchors.right_start_offset))\n else :\n row.append('^'*(end_offset -start_offset))\n \n row.append('\\n')\n \n if frame_summary.locals:\n for name,value in sorted(frame_summary.locals.items()):\n row.append(' {name} = {value}\\n'.format(name=name,value=value))\n \n return ''.join(row)\n \n def format(self):\n ''\n\n\n\n\n\n\n\n\n\n \n result=[]\n last_file=None\n last_line=None\n last_name=None\n count=0\n for frame_summary in self:\n formatted_frame=self.format_frame_summary(frame_summary)\n if formatted_frame is None :\n continue\n if (last_file is None or last_file !=frame_summary.filename or\n last_line is None or last_line !=frame_summary.lineno or\n last_name is None or last_name !=frame_summary.name):\n if count >_RECURSIVE_CUTOFF:\n count -=_RECURSIVE_CUTOFF\n result.append(\n f' [Previous line repeated {count} more '\n f'time{\"s\"if count >1 else \"\"}]\\n'\n )\n last_file=frame_summary.filename\n last_line=frame_summary.lineno\n last_name=frame_summary.name\n count=0\n count +=1\n if count >_RECURSIVE_CUTOFF:\n continue\n result.append(formatted_frame)\n \n if count >_RECURSIVE_CUTOFF:\n count -=_RECURSIVE_CUTOFF\n result.append(\n f' [Previous line repeated {count} more '\n f'time{\"s\"if count >1 else \"\"}]\\n'\n )\n return result\n \n \ndef _byte_offset_to_character_offset(str,offset):\n as_utf8=str.encode('utf-8')\n return len(as_utf8[:offset].decode(\"utf-8\",errors=\"replace\"))\n \n \n_Anchors=collections.namedtuple(\n\"_Anchors\",\n[\n\"left_end_offset\",\n\"right_start_offset\",\n\"primary_char\",\n\"secondary_char\",\n],\ndefaults=[\"~\",\"^\"]\n)\n\ndef _extract_caret_anchors_from_line_segment(segment):\n import ast\n \n try :\n tree=ast.parse(segment)\n except SyntaxError:\n return None\n \n if len(tree.body)!=1:\n return None\n \n normalize=lambda offset:_byte_offset_to_character_offset(segment,offset)\n statement=tree.body[0]\n match statement:\n case ast.Expr(expr):\n match expr:\n case ast.BinOp():\n operator_start=normalize(expr.left.end_col_offset)\n operator_end=normalize(expr.right.col_offset)\n operator_str=segment[operator_start:operator_end]\n operator_offset=len(operator_str)-len(operator_str.lstrip())\n \n left_anchor=expr.left.end_col_offset+operator_offset\n right_anchor=left_anchor+1\n if (\n operator_offset+1 \"\n stype=smod+'.'+stype\n \n if not issubclass(self.exc_type,SyntaxError):\n yield _format_final_exc_line(stype,self._str)\n else :\n yield from self._format_syntax_error(stype)\n \n if (\n isinstance(self.__notes__,collections.abc.Sequence)\n and not isinstance(self.__notes__,(str,bytes))\n ):\n for note in self.__notes__:\n note=_safe_string(note,'note')\n yield from [l+'\\n'for l in note.split('\\n')]\n elif self.__notes__ is not None :\n yield \"{}\\n\".format(_safe_string(self.__notes__,'__notes__',func=repr))\n \n def _format_syntax_error(self,stype):\n ''\n \n filename_suffix=''\n if self.lineno is not None :\n yield ' File \"{}\", line {}\\n'.format(\n self.filename or \"\",self.lineno)\n elif self.filename is not None :\n filename_suffix=' ({})'.format(self.filename)\n \n text=self.text\n if text is not None :\n \n \n \n rtext=text.rstrip('\\n')\n ltext=rtext.lstrip(' \\n\\f')\n spaces=len(rtext)-len(ltext)\n yield ' {}\\n'.format(ltext)\n \n if self.offset is not None :\n offset=self.offset\n end_offset=self.end_offset if self.end_offset not in {None ,0}else offset\n if offset ==end_offset or end_offset ==-1:\n end_offset=offset+1\n \n \n colno=offset -1 -spaces\n end_colno=end_offset -1 -spaces\n if colno >=0:\n \n caretspace=((c if c.isspace()else ' ')for c in ltext[:colno])\n yield ' {}{}'.format(\"\".join(caretspace),('^'*(end_colno -colno)+\"\\n\"))\n msg=self.msg or \"\"\n yield \"{}: {}{}\\n\".format(stype,msg,filename_suffix)\n \n def format(self,*,chain=True ,_ctx=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n \n if _ctx is None :\n _ctx=_ExceptionPrintContext()\n \n output=[]\n exc=self\n if chain:\n while exc:\n if exc.__cause__ is not None :\n chained_msg=_cause_message\n chained_exc=exc.__cause__\n elif (exc.__context__ is not None and\n not exc.__suppress_context__):\n chained_msg=_context_message\n chained_exc=exc.__context__\n else :\n chained_msg=None\n chained_exc=None\n \n output.append((chained_msg,exc))\n exc=chained_exc\n else :\n output.append((None ,exc))\n \n for msg,exc in reversed(output):\n if msg is not None :\n yield from _ctx.emit(msg)\n if exc.exceptions is None :\n if exc.stack:\n yield from _ctx.emit('Traceback (most recent call last):\\n')\n yield from _ctx.emit(exc.stack.format())\n yield from _ctx.emit(exc.format_exception_only())\n elif _ctx.exception_group_depth >self.max_group_depth:\n \n yield from _ctx.emit(\n f\"... (max_group_depth is {self.max_group_depth})\\n\")\n else :\n \n is_toplevel=(_ctx.exception_group_depth ==0)\n if is_toplevel:\n _ctx.exception_group_depth +=1\n \n if exc.stack:\n yield from _ctx.emit(\n 'Exception Group Traceback (most recent call last):\\n',\n margin_char='+'if is_toplevel else None )\n yield from _ctx.emit(exc.stack.format())\n \n yield from _ctx.emit(exc.format_exception_only())\n num_excs=len(exc.exceptions)\n if num_excs <=self.max_group_width:\n n=num_excs\n else :\n n=self.max_group_width+1\n _ctx.need_close=False\n for i in range(n):\n last_exc=(i ==n -1)\n if last_exc:\n \n _ctx.need_close=True\n \n if self.max_group_width is not None :\n truncated=(i >=self.max_group_width)\n else :\n truncated=False\n title=f'{i+1}'if not truncated else '...'\n yield (_ctx.indent()+\n ('+-'if i ==0 else ' ')+\n f'+---------------- {title} ----------------\\n')\n _ctx.exception_group_depth +=1\n if not truncated:\n yield from exc.exceptions[i].format(chain=chain,_ctx=_ctx)\n else :\n remaining=num_excs -self.max_group_width\n plural='s'if remaining >1 else ''\n yield from _ctx.emit(\n f\"and {remaining} more exception{plural}\\n\")\n \n if last_exc and _ctx.need_close:\n yield (_ctx.indent()+\n \"+------------------------------------\\n\")\n _ctx.need_close=False\n _ctx.exception_group_depth -=1\n \n if is_toplevel:\n assert _ctx.exception_group_depth ==1\n _ctx.exception_group_depth=0\n \n \n def print(self,*,file=None ,chain=True ):\n ''\n if file is None :\n file=sys.stderr\n for line in self.format(chain=chain):\n print(line,file=file,end=\"\")\n \n \n_MAX_CANDIDATE_ITEMS=750\n_MAX_STRING_SIZE=40\n_MOVE_COST=2\n_CASE_COST=1\n\n\ndef _substitution_cost(ch_a,ch_b):\n if ch_a ==ch_b:\n return 0\n if ch_a.lower()==ch_b.lower():\n return _CASE_COST\n return _MOVE_COST\n \n \ndef _compute_suggestion_error(exc_value,tb,wrong_name):\n if wrong_name is None or not isinstance(wrong_name,str):\n return None\n if isinstance(exc_value,AttributeError):\n obj=exc_value.obj\n try :\n d=dir(obj)\n except Exception:\n return None\n elif isinstance(exc_value,ImportError):\n try :\n mod=__import__(exc_value.name)\n d=dir(mod)\n except Exception:\n return None\n else :\n assert isinstance(exc_value,NameError)\n \n if tb is None :\n return None\n while tb.tb_next is not None :\n tb=tb.tb_next\n frame=tb.tb_frame\n d=(\n list(frame.f_locals)\n +list(frame.f_globals)\n +list(frame.f_builtins)\n )\n \n \n \n if 'self'in frame.f_locals:\n self=frame.f_locals['self']\n if hasattr(self,wrong_name):\n return f\"self.{wrong_name}\"\n \n \n \n if len(d)>_MAX_CANDIDATE_ITEMS:\n return None\n wrong_name_len=len(wrong_name)\n if wrong_name_len >_MAX_STRING_SIZE:\n return None\n best_distance=wrong_name_len\n suggestion=None\n for possible_name in d:\n if possible_name ==wrong_name:\n \n continue\n \n max_distance=(len(possible_name)+wrong_name_len+3)*_MOVE_COST //6\n \n max_distance=min(max_distance,best_distance -1)\n current_distance=_levenshtein_distance(wrong_name,possible_name,max_distance)\n if current_distance >max_distance:\n continue\n if not suggestion or current_distance _MAX_STRING_SIZE or len(b)>_MAX_STRING_SIZE:\n return max_cost+1\n \n \n if len(b)max_cost:\n return max_cost+1\n \n \n \n \n row=list(range(_MOVE_COST,_MOVE_COST *(len(a)+1),_MOVE_COST))\n \n result=0\n for bindex in range(len(b)):\n bchar=b[bindex]\n distance=result=bindex *_MOVE_COST\n minimum=sys.maxsize\n for index in range(len(a)):\n \n substitute=distance+_substitution_cost(bchar,a[index])\n \n distance=row[index]\n \n \n insert_delete=min(result,distance)+_MOVE_COST\n result=min(insert_delete,substitute)\n \n \n row[index]=result\n if result max_cost:\n \n return max_cost+1\n return result\n", ["ast", "collections.abc", "contextlib", "itertools", "linecache", "sys", "textwrap"]], "turtle": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport math\nimport sys\n\nfrom math import cos,sin\n\nfrom browser import console,document,html,timer\nimport _svg as svg\n\n\n\n\n\n\n_CFG={\n\n\n\"canvwidth\":500,\n\"canvheight\":500,\n\n\n\"mode\":\"standard\",\n\n\n\n\"shape\":\"classic\",\n\"pencolor\":\"black\",\n\"fillcolor\":\"black\",\n\n\"visible\":True ,\n\n\n\n\n\n\n\n\"turtle_canvas_wrapper\":None ,\n\"turtle_canvas_id\":\"turtle-canvas\",\n\"min_duration\":\"1ms\"\n}\n\n_cfg_copy=_CFG.copy()\n\n\ndef set_defaults(**params):\n ''\n _CFG.update(**params)\n Screen().reset()\n \n \nclass FormattedTuple(tuple):\n ''\n def __new__(cls,x,y):\n return tuple.__new__(cls,(x,y))\n def __repr__(self):\n return \"(%.2f, %.2f)\"%self\n \ndef create_circle(r):\n ''\n circle=svg.circle(x=0,y=0,r=r,stroke=\"black\",fill=\"black\")\n circle.setAttribute(\"stroke-width\",1)\n return circle\n \n \ndef create_polygon(points):\n ''\n points=[\"%s,%s \"%(x,y)for x,y in points]\n polygon=svg.polygon(points=points,stroke=\"black\",fill=\"black\")\n polygon.setAttribute(\"stroke-width\",1)\n return polygon\n \n \ndef create_rectangle(width=2,height=2,rx=None ,ry=None ):\n ''\n \n rectangle=svg.rect(x=-width /2,y=-height /2,width=width,\n height=height,stroke=\"black\",fill=\"black\")\n rectangle.setAttribute(\"stroke-width\",1)\n if rx is not None :\n rectangle.setAttribute(\"rx\",rx)\n if ry is not None :\n rectangle.setAttribute(\"ry\",ry)\n return rectangle\n \n \ndef create_square(size=2,r=None ):\n ''\n \n return create_rectangle(width=size,height=size,rx=r,ry=r)\n \n \nclass TurtleGraphicsError(Exception):\n ''\n \n pass\n \n \nclass Singleton(type):\n _instances={}\n def __call__(cls,*args,**kwargs):\n if cls not in cls._instances:\n cls._instances[cls]=super(Singleton,cls).__call__(*args,**kwargs)\n return cls._instances[cls]\n \n \nclass Screen(metaclass=Singleton):\n\n def __init__(self):\n self.shapes={\n 'arrow':(create_polygon,((-10,0),(10,0),(0,10))),\n 'turtle':(create_polygon,((0,16),(-2,14),(-1,10),(-4,7),\n (-7,9),(-9,8),(-6,5),(-7,1),(-5,-3),(-8,-6),\n (-6,-8),(-4,-5),(0,-7),(4,-5),(6,-8),(8,-6),\n (5,-3),(7,1),(6,5),(9,8),(7,9),(4,7),(1,10),\n (2,14))),\n 'classic':(create_polygon,((0,0),(-5,-9),(0,-7),(5,-9))),\n 'triangle':(create_polygon,((10,-5.77),(0,11.55),(-10,-5.77))),\n 'square':(create_square,20),\n 'circle':(create_circle,10)\n }\n self.reset()\n self._set_geometry()\n \n def bgcolor(self,color=None ):\n ''\n\n \n if color is None :\n return self.background_color\n self.background_color=color\n width=_CFG['canvwidth']\n height=_CFG['canvheight']\n if self.mode()in ['logo','standard']:\n x=-width //2\n y=-height //2\n else :\n x=0\n y=-height\n \n self.frame_index +=1\n rect=svg.rect(x=x,y=y,width=width,height=height,fill=color,\n style={'display':'none'})\n an=svg.animate(Id=\"animation_frame%s\"%self.frame_index,\n attributeName=\"display\",attributeType=\"CSS\",\n From=\"block\",to=\"block\",\n dur=_CFG[\"min_duration\"],fill='freeze')\n an.setAttribute('begin',\"animation_frame%s.end\"%(self.frame_index -1))\n rect <=an\n \n self.background_canvas <=rect\n \n def _convert_coordinates(self,x,y):\n ''\n\n\n\n\n\n \n return x *self.yscale,self.y_points_down *y *self.yscale\n \n \n def create_svg_turtle(self,_turtle,name):\n if name in self.shapes:\n fn=self.shapes[name][0]\n arg=self.shapes[name][1]\n else :\n print(\"Unknown turtle '%s'; the default turtle will be used\")\n fn=self.shapes[_CVG[\"shape\"]][0]\n arg=self.shapes[_CVG[\"shape\"]][1]\n shape=fn(arg)\n if self._mode =='standard'or self._mode =='world':\n rotation=-90\n else :\n rotation=0\n return shape,rotation\n \n def _dot(self,pos,size,color):\n ''\n if color is None :\n color='black'\n if size is None or size <1:\n size=1\n self.frame_index +=1\n \n \n radius=size /2\n \n x,y=self._convert_coordinates(pos[0],pos[1])\n \n circle=svg.circle(cx=x,cy=y,r=radius,fill=color,\n style={'display':'none'})\n an=svg.animate(Id=\"animation_frame%s\"%self.frame_index,\n attributeName=\"display\",attributeType=\"CSS\",\n From=\"block\",to=\"block\",\n dur=_CFG[\"min_duration\"],fill='freeze')\n an.setAttribute('begin',\"animation_frame%s.end\"%(self.frame_index -1))\n circle <=an\n self.canvas <=circle\n \n def _drawline(self,_turtle,coordlist=None ,\n color=None ,width=1,speed=None ):\n ''\n\n\n\n\n \n \n outline=color[0]\n fill=color[1]\n \n x0,y0=coordlist[0]\n x1,y1=coordlist[1]\n \n x0,y0=self._convert_coordinates(x0,y0)\n x1,y1=self._convert_coordinates(x1,y1)\n \n \n if speed ==0:\n duration=_CFG[\"min_duration\"]\n else :\n dist=_turtle._distance\n if speed is None or speed ==1:\n duration=0.02 *dist\n else :\n duration=0.02 *dist /speed **1.2\n if duration <0.001:\n duration=_CFG[\"min_duration\"]\n else :\n duration=\"%6.3fs\"%duration\n \n drawing=_turtle._drawing\n \n _line=svg.line(x1=x0,y1=y0,x2=x0,y2=y0,\n style={'stroke':outline,'stroke-width':width})\n if not drawing:\n _line.setAttribute('opacity',0)\n \n \n begin=\"animation_frame%s.end\"%self.frame_index\n self.frame_index +=1\n _an1=svg.animate(Id=\"animation_frame%s\"%self.frame_index,\n attributeName=\"x2\",attributeType=\"XML\",\n From=x0,to=x1,dur=duration,fill='freeze',\n begin=begin)\n _line <=_an1\n \n \n if drawing:\n _an2=svg.animate(attributeName=\"y2\",attributeType=\"XML\",\n begin=begin,\n From=y0,to=y1,dur=duration,fill='freeze')\n _line <=_an2\n \n if width >2:\n _line_cap=svg.set(attributeName=\"stroke-linecap\",\n begin=begin,\n attributeType=\"xml\",to=\"round\",dur=duration,fill='freeze')\n _line <=_line_cap\n \n self.canvas <=_line\n return begin,duration,(x0,y0),(x1,y1)\n \n def _drawpoly(self,coordlist,outline=None ,fill=None ,width=None ):\n ''\n\n\n\n\n \n self.frame_index +=1\n shape=[\"%s,%s\"%self._convert_coordinates(x,y)for x,y in coordlist]\n \n style={'display':'none'}\n if fill is not None :\n style['fill']=fill\n if outline is not None :\n style['stroke']=outline\n if width is not None :\n style['stroke-width']=width\n else :\n style['stroke-width']=1\n \n polygon=svg.polygon(points=\" \".join(shape),style=style)\n \n an=svg.animate(Id=\"animation_frame%s\"%self.frame_index,\n attributeName=\"display\",attributeType=\"CSS\",\n From=\"block\",to=\"block\",\n dur=_CFG[\"min_duration\"],fill='freeze')\n \n an.setAttribute('begin',\"animation_frame%s.end\"%(self.frame_index -1))\n polygon <=an\n self.canvas <=polygon\n \n \n def _new_frame(self):\n ''\n \n previous_end=\"animation_frame%s.end\"%self.frame_index\n self.frame_index +=1\n new_frame_id=\"animation_frame%s\"%self.frame_index\n return previous_end,new_frame_id\n \n def mode(self,_mode=None ):\n if _mode is None :\n return self._mode\n _CFG['mode']=_mode\n self.reset()\n \n \n def reset(self):\n self._turtles=[]\n self.frame_index=0\n self.background_color=\"white\"\n self._set_geometry()\n \n def _set_geometry(self):\n self.width=_CFG[\"canvwidth\"]\n self.height=_CFG[\"canvheight\"]\n self.x_offset=self.y_offset=0\n self.xscale=self.yscale=1\n \n self.y_points_down=-1\n self._mode=_CFG[\"mode\"].lower()\n if self._mode in ['logo','standard']:\n self.translate_canvas=(self.width //2,self.height //2)\n elif self._mode =='world':\n self.translate_canvas=(0,self.height)\n self._setup_canvas()\n \n def _setup_canvas(self):\n self.svg_scene=svg.svg(Id=_CFG[\"turtle_canvas_id\"],width=self.width,\n height=self.height)\n translate=\"translate(%d %d)\"%self.translate_canvas\n \n \n self.svg_scene <=svg.animate(\n Id=\"animation_frame%s\"%self.frame_index,\n attributeName=\"width\",attributeType=\"CSS\",\n From=self.width,to=self.width,begin=\"0s\",\n dur=_CFG[\"min_duration\"],fill='freeze')\n \n \n \n \n self.background_canvas=svg.g(transform=translate)\n self.canvas=svg.g(transform=translate)\n self.writing_canvas=svg.g(transform=translate)\n self.turtle_canvas=svg.g(transform=translate)\n \n self.svg_scene <=self.background_canvas\n self.svg_scene <=self.canvas\n self.svg_scene <=self.writing_canvas\n self.svg_scene <=self.turtle_canvas\n \n \n def setworldcoordinates(self,llx,lly,urx,ury):\n ''\n\n\n\n\n\n\n\n\n\n\n \n self._mode=\"world\"\n \n if urx 2:\n self.screen._drawpoly(self._fillpath,outline=self._pencolor,\n fill=self._fillcolor,)\n else :\n print(\"No path to fill.\")\n self._fillpath=None\n \n def dot(self,size=None ,color=None ):\n ''\n \n if size is None :\n size=max(self._pensize+4,2 *self._pensize)\n if color is None :\n color=self._pencolor\n item=self.screen._dot((self._x,self._y),size,color=color)\n \n def _write(self,txt,align,font,color=None ):\n ''\n \n if color is None :\n color=self._pencolor\n self.screen._write((self._x,self._y),txt,align,font,color)\n \n \n def write(self,arg,align=\"left\",font=(\"Arial\",8,\"normal\"),color=None ):\n ''\n\n\n\n\n\n\n \n self._write(str(arg),align.lower(),font,color=color)\n \n def begin_poly(self):\n ''\n \n self._poly=[(self._x,self._y)]\n self._creatingPoly=True\n \n def end_poly(self):\n ''\n \n self._creatingPoly=False\n \n def get_poly(self):\n ''\n \n \n if self._poly is not None :\n return tuple(self._poly)\n \n def getscreen(self):\n ''\n \n return self.screen\n \n def getturtle(self):\n ''\n\n\n \n return self\n getpen=getturtle\n \n def _make_copy(self,name=None ):\n ''\n\n \n \n if name is None :\n name=self.name\n \n \n \n \n \n _turtle,rotation=self.screen.create_svg_turtle(self,name=name)\n _turtle.setAttribute(\"opacity\",0)\n _turtle.setAttribute(\"fill\",self._fillcolor)\n _turtle.setAttribute(\"stroke\",self._pencolor)\n \n \n \n previous_end,new_frame_id=self.screen._new_frame()\n x,y=self.screen._convert_coordinates(self._x,self._y)\n _turtle <=svg.animateMotion(begin=previous_end,dur=_CFG[\"min_duration\"],\n fill=\"remove\")\n \n _turtle <=svg.animateMotion(Id=new_frame_id,\n From=\"%s,%s\"%(x,y),to=\"%s,%s\"%(x,y),\n dur=_CFG[\"min_duration\"],begin=previous_end,\n fill=\"freeze\")\n _turtle <=svg.animateTransform(attributeName=\"transform\",\n type=\"rotate\",\n From=\"%s,%s,%s\"%(self._old_heading,0,0),\n to=\"%s,%s,%s\"%(self._old_heading,0,0),\n begin=previous_end,\n dur=_CFG[\"min_duration\"],fill=\"freeze\")\n _turtle <=svg.animate(begin=previous_end,\n dur=_CFG[\"min_duration\"],fill=\"freeze\",\n attributeName=\"opacity\",attributeType=\"XML\",\n From=0,to=1)\n return _turtle\n \n def stamp(self):\n ''\n \n _turtle=self._make_copy(name=self.name)\n self.screen.canvas <=_turtle\n \n \n def clone(self):\n ''\n \n n=Turtle(self.name)\n \n attrs=vars(self)\n new_dict={}\n for attr in attrs:\n if isinstance(getattr(self,attr),(int,str,float)):\n new_dict[attr]=getattr(self,attr)\n n.__dict__.update(**new_dict)\n \n if not n._shown:\n n._shown=True\n n.hideturtle()\n n.left(0)\n n.fd(0)\n n.color(n.color())\n return n\n \n \nPen=Turtle\n\n\ndef done():\n Screen().show_scene()\nshow_scene=done\n\n\ndef replay_scene():\n ''\n if (_CFG[\"turtle_canvas_id\"]in document and\n document[_CFG[\"turtle_canvas_id\"]]is not None ):\n element=document[_CFG[\"turtle_canvas_id\"]]\n element.parentNode.removeChild(element)\n show_scene()\n \n \ndef restart():\n ''\n _CFG.update(_cfg_copy)\n Screen().reset()\n Turtle._pen=None\n \n if (_CFG[\"turtle_canvas_id\"]in document and\n document[_CFG[\"turtle_canvas_id\"]]is not None ):\n element=document[_CFG[\"turtle_canvas_id\"]]\n element.parentNode.removeChild(element)\n \n \n \n_tg_screen_functions=['addshape','bgcolor','bgpic','bye',\n'clearscreen','colormode','delay','exitonclick','getcanvas',\n'getshapes','listen','mainloop','mode','numinput',\n'onkey','onkeypress','onkeyrelease','onscreenclick','ontimer',\n'register_shape','resetscreen','screensize','setup',\n'setworldcoordinates','textinput','title','tracer','turtles','update',\n'window_height','window_width']\n\n_tg_turtle_functions=['back','backward','begin_fill','begin_poly','bk',\n'circle','clear','clearstamp','clearstamps','clone','color',\n'degrees','distance','dot','down','end_fill','end_poly','fd',\n'fillcolor','filling','forward','get_poly','getpen','getscreen','get_shapepoly',\n'getturtle','goto','heading','hideturtle','home','ht','isdown',\n'isvisible','left','lt','onclick','ondrag','onrelease','pd',\n'pen','pencolor','pendown','pensize','penup','pos','position',\n'pu','radians','right','reset','resizemode','rt',\n'seth','setheading','setpos','setposition','settiltangle',\n'setundobuffer','setx','sety','shape','shapesize','shapetransform','shearfactor','showturtle',\n'speed','st','stamp','tilt','tiltangle','towards',\n'turtlesize','undo','undobufferentries','up','width',\n'write','xcor','ycor']\n\n\n__all__=(_tg_screen_functions+_tg_turtle_functions+\n['done','restart','replay_scene','Turtle','Screen'])\n\n\n\n\n\n__func_body=\"\"\"\\\ndef {name}(*args, **kw):\n if {obj} is None:\n {obj} = {init}\n return {obj}.{name}(*args, **kw)\n\"\"\"\n\ndef _make_global_funcs(functions,cls,obj,init):\n for methodname in functions:\n try :\n method=getattr(cls,methodname)\n except AttributeError:\n print(\"methodname missing:\",methodname)\n continue\n defstr=__func_body.format(obj=obj,init=init,name=methodname)\n exec(defstr,globals())\n \n_make_global_funcs(_tg_turtle_functions,Turtle,'Turtle._pen','Turtle()')\n\n_make_global_funcs(_tg_screen_functions,Screen,'Turtle.screen','Screen()')\n", ["_svg", "browser", "browser.timer", "math", "sys"]], "types": [".py", "''\n\n\nimport sys\n\n\n\n\n\n\ndef _f():pass\nFunctionType=type(_f)\nLambdaType=type(lambda :None )\nCodeType=type(_f.__code__)\nMappingProxyType=type(type.__dict__)\nSimpleNamespace=type(sys.implementation)\n\ndef _cell_factory():\n a=1\n def f():\n nonlocal a\n return f.__closure__[0]\nCellType=type(_cell_factory())\n\ndef _g():\n yield 1\nGeneratorType=type(_g())\n\nasync def _c():pass\n_c=_c()\nCoroutineType=type(_c)\n_c.close()\n\nasync def _ag():\n yield\n_ag=_ag()\nAsyncGeneratorType=type(_ag)\n\nclass _C:\n def _m(self):pass\nMethodType=type(_C()._m)\n\nBuiltinFunctionType=type(len)\nBuiltinMethodType=type([].append)\n\nWrapperDescriptorType=type(object.__init__)\nMethodWrapperType=type(object().__str__)\nMethodDescriptorType=type(str.join)\nClassMethodDescriptorType=type(dict.__dict__['fromkeys'])\n\nModuleType=type(sys)\n\ntry :\n raise TypeError\nexcept TypeError as exc:\n TracebackType=type(exc.__traceback__)\n FrameType=type(exc.__traceback__.tb_frame)\n \nGetSetDescriptorType=type(FunctionType.__code__)\nMemberDescriptorType=type(FunctionType.__globals__)\n\ndel sys,_f,_g,_C,_c,_ag,_cell_factory\n\n\n\ndef new_class(name,bases=(),kwds=None ,exec_body=None ):\n ''\n resolved_bases=resolve_bases(bases)\n meta,ns,kwds=prepare_class(name,resolved_bases,kwds)\n if exec_body is not None :\n exec_body(ns)\n if resolved_bases is not bases:\n ns['__orig_bases__']=bases\n return meta(name,resolved_bases,ns,**kwds)\n \ndef resolve_bases(bases):\n ''\n new_bases=list(bases)\n updated=False\n shift=0\n for i,base in enumerate(bases):\n if isinstance(base,type):\n continue\n if not hasattr(base,\"__mro_entries__\"):\n continue\n new_base=base.__mro_entries__(bases)\n updated=True\n if not isinstance(new_base,tuple):\n raise TypeError(\"__mro_entries__ must return a tuple\")\n else :\n new_bases[i+shift:i+shift+1]=new_base\n shift +=len(new_base)-1\n if not updated:\n return bases\n return tuple(new_bases)\n \ndef prepare_class(name,bases=(),kwds=None ):\n ''\n\n\n\n\n\n\n\n\n \n if kwds is None :\n kwds={}\n else :\n kwds=dict(kwds)\n if 'metaclass'in kwds:\n meta=kwds.pop('metaclass')\n else :\n if bases:\n meta=type(bases[0])\n else :\n meta=type\n if isinstance(meta,type):\n \n \n meta=_calculate_meta(meta,bases)\n if hasattr(meta,'__prepare__'):\n ns=meta.__prepare__(name,bases,**kwds)\n else :\n ns={}\n return meta,ns,kwds\n \ndef _calculate_meta(meta,bases):\n ''\n winner=meta\n for base in bases:\n base_meta=type(base)\n if issubclass(winner,base_meta):\n continue\n if issubclass(base_meta,winner):\n winner=base_meta\n continue\n \n raise TypeError(\"metaclass conflict: \"\n \"the metaclass of a derived class \"\n \"must be a (non-strict) subclass \"\n \"of the metaclasses of all its bases\")\n return winner\n \n \ndef get_original_bases(cls,/):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n return cls.__orig_bases__\n except AttributeError:\n try :\n return cls.__bases__\n except AttributeError:\n raise TypeError(\n f'Expected an instance of type, not {type(cls).__name__ !r}'\n )from None\n \n \nclass DynamicClassAttribute:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def __init__(self,fget=None ,fset=None ,fdel=None ,doc=None ):\n self.fget=fget\n self.fset=fset\n self.fdel=fdel\n \n self.__doc__=doc or fget.__doc__\n self.overwrite_doc=doc is None\n \n self.__isabstractmethod__=bool(getattr(fget,'__isabstractmethod__',False ))\n \n def __get__(self,instance,ownerclass=None ):\n if instance is None :\n if self.__isabstractmethod__:\n return self\n raise AttributeError()\n elif self.fget is None :\n raise AttributeError(\"unreadable attribute\")\n return self.fget(instance)\n \n def __set__(self,instance,value):\n if self.fset is None :\n raise AttributeError(\"can't set attribute\")\n self.fset(instance,value)\n \n def __delete__(self,instance):\n if self.fdel is None :\n raise AttributeError(\"can't delete attribute\")\n self.fdel(instance)\n \n def getter(self,fget):\n fdoc=fget.__doc__ if self.overwrite_doc else None\n result=type(self)(fget,self.fset,self.fdel,fdoc or self.__doc__)\n result.overwrite_doc=self.overwrite_doc\n return result\n \n def setter(self,fset):\n result=type(self)(self.fget,fset,self.fdel,self.__doc__)\n result.overwrite_doc=self.overwrite_doc\n return result\n \n def deleter(self,fdel):\n result=type(self)(self.fget,self.fset,fdel,self.__doc__)\n result.overwrite_doc=self.overwrite_doc\n return result\n \n \nclass _GeneratorWrapper:\n\n def __init__(self,gen):\n self.__wrapped=gen\n self.__isgen=gen.__class__ is GeneratorType\n self.__name__=getattr(gen,'__name__',None )\n self.__qualname__=getattr(gen,'__qualname__',None )\n def send(self,val):\n return self.__wrapped.send(val)\n def throw(self,tp,*rest):\n return self.__wrapped.throw(tp,*rest)\n def close(self):\n return self.__wrapped.close()\n @property\n def gi_code(self):\n return self.__wrapped.gi_code\n @property\n def gi_frame(self):\n return self.__wrapped.gi_frame\n @property\n def gi_running(self):\n return self.__wrapped.gi_running\n @property\n def gi_yieldfrom(self):\n return self.__wrapped.gi_yieldfrom\n cr_code=gi_code\n cr_frame=gi_frame\n cr_running=gi_running\n cr_await=gi_yieldfrom\n def __next__(self):\n return next(self.__wrapped)\n def __iter__(self):\n if self.__isgen:\n return self.__wrapped\n return self\n __await__=__iter__\n \ndef coroutine(func):\n ''\n \n if not callable(func):\n raise TypeError('types.coroutine() expects a callable')\n \n if (func.__class__ is FunctionType and\n getattr(func,'__code__',None ).__class__ is CodeType):\n \n co_flags=func.__code__.co_flags\n \n \n \n if co_flags&0x180:\n return func\n \n \n \n if co_flags&0x20:\n \n co=func.__code__\n \n func.__code__=co.replace(co_flags=co.co_flags |0x100)\n return func\n \n \n \n \n \n \n import functools\n import _collections_abc\n @functools.wraps(func)\n def wrapped(*args,**kwargs):\n coro=func(*args,**kwargs)\n if (coro.__class__ is CoroutineType or\n coro.__class__ is GeneratorType and coro.gi_code.co_flags&0x100):\n \n return coro\n if (isinstance(coro,_collections_abc.Generator)and\n not isinstance(coro,_collections_abc.Coroutine)):\n \n \n \n return _GeneratorWrapper(coro)\n \n \n return coro\n \n return wrapped\n \nGenericAlias=type(list[int])\nUnionType=type(int |str)\n\nEllipsisType=type(Ellipsis)\nNoneType=type(None )\nNotImplementedType=type(NotImplemented)\n\n__all__=[n for n in globals()if n[:1]!='_']\n", ["_collections_abc", "functools", "sys"]], "typing": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfrom abc import abstractmethod,ABCMeta\nimport collections\nfrom collections import defaultdict\nimport collections.abc\nimport copyreg\nimport contextlib\nimport functools\nimport operator\nimport re as stdlib_re\nimport sys\nimport types\nimport warnings\nfrom types import WrapperDescriptorType,MethodWrapperType,MethodDescriptorType,GenericAlias\n\nfrom _typing import (\n_idfunc,\nTypeVar,\nParamSpec,\nTypeVarTuple,\nParamSpecArgs,\nParamSpecKwargs,\nTypeAliasType,\nGeneric,\n)\n\n\n__all__=[\n\n'Annotated',\n'Any',\n'Callable',\n'ClassVar',\n'Concatenate',\n'Final',\n'ForwardRef',\n'Generic',\n'Literal',\n'Optional',\n'ParamSpec',\n'Protocol',\n'Tuple',\n'Type',\n'TypeVar',\n'TypeVarTuple',\n'Union',\n\n\n'AbstractSet',\n'ByteString',\n'Container',\n'ContextManager',\n'Hashable',\n'ItemsView',\n'Iterable',\n'Iterator',\n'KeysView',\n'Mapping',\n'MappingView',\n'MutableMapping',\n'MutableSequence',\n'MutableSet',\n'Sequence',\n'Sized',\n'ValuesView',\n'Awaitable',\n'AsyncIterator',\n'AsyncIterable',\n'Coroutine',\n'Collection',\n'AsyncGenerator',\n'AsyncContextManager',\n\n\n'Reversible',\n'SupportsAbs',\n'SupportsBytes',\n'SupportsComplex',\n'SupportsFloat',\n'SupportsIndex',\n'SupportsInt',\n'SupportsRound',\n\n\n'ChainMap',\n'Counter',\n'Deque',\n'Dict',\n'DefaultDict',\n'List',\n'OrderedDict',\n'Set',\n'FrozenSet',\n'NamedTuple',\n'TypedDict',\n'Generator',\n\n\n'BinaryIO',\n'IO',\n'Match',\n'Pattern',\n'TextIO',\n\n\n'AnyStr',\n'assert_type',\n'assert_never',\n'cast',\n'clear_overloads',\n'dataclass_transform',\n'final',\n'get_args',\n'get_origin',\n'get_overloads',\n'get_type_hints',\n'is_typeddict',\n'LiteralString',\n'Never',\n'NewType',\n'no_type_check',\n'no_type_check_decorator',\n'NoReturn',\n'NotRequired',\n'overload',\n'override',\n'ParamSpecArgs',\n'ParamSpecKwargs',\n'Required',\n'reveal_type',\n'runtime_checkable',\n'Self',\n'Text',\n'TYPE_CHECKING',\n'TypeAlias',\n'TypeGuard',\n'TypeAliasType',\n'Unpack',\n]\n\n\n\n\n\n\ndef _type_convert(arg,module=None ,*,allow_special_forms=False ):\n ''\n if arg is None :\n return type(None )\n if isinstance(arg,str):\n return ForwardRef(arg,module=module,is_class=allow_special_forms)\n return arg\n \n \ndef _type_check(arg,msg,is_argument=True ,module=None ,*,allow_special_forms=False ):\n ''\n\n\n\n\n\n\n\n\n\n \n invalid_generic_forms=(Generic,Protocol)\n if not allow_special_forms:\n invalid_generic_forms +=(ClassVar,)\n if is_argument:\n invalid_generic_forms +=(Final,)\n \n arg=_type_convert(arg,module=module,allow_special_forms=allow_special_forms)\n if (isinstance(arg,_GenericAlias)and\n arg.__origin__ in invalid_generic_forms):\n raise TypeError(f\"{arg} is not valid as type argument\")\n if arg in (Any,LiteralString,NoReturn,Never,Self,TypeAlias):\n return arg\n if allow_special_forms and arg in (ClassVar,Final):\n return arg\n if isinstance(arg,_SpecialForm)or arg in (Generic,Protocol):\n raise TypeError(f\"Plain {arg} is not valid as type argument\")\n if type(arg)is tuple:\n raise TypeError(f\"{msg} Got {arg !r:.100}.\")\n return arg\n \n \ndef _is_param_expr(arg):\n return arg is ...or isinstance(arg,\n (tuple,list,ParamSpec,_ConcatenateGenericAlias))\n \n \ndef _should_unflatten_callable_args(typ,args):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n return (\n typ.__origin__ is collections.abc.Callable\n and not (len(args)==2 and _is_param_expr(args[0]))\n )\n \n \ndef _type_repr(obj):\n ''\n\n\n\n\n\n \n \n \n \n if isinstance(obj,type):\n if obj.__module__ =='builtins':\n return obj.__qualname__\n return f'{obj.__module__}.{obj.__qualname__}'\n if obj is ...:\n return '...'\n if isinstance(obj,types.FunctionType):\n return obj.__name__\n if isinstance(obj,tuple):\n \n return '['+', '.join(_type_repr(t)for t in obj)+']'\n return repr(obj)\n \n \ndef _collect_parameters(args):\n ''\n\n\n\n\n\n \n parameters=[]\n for t in args:\n if isinstance(t,type):\n \n pass\n elif isinstance(t,tuple):\n \n \n for x in t:\n for collected in _collect_parameters([x]):\n if collected not in parameters:\n parameters.append(collected)\n elif hasattr(t,'__typing_subst__'):\n if t not in parameters:\n parameters.append(t)\n else :\n for x in getattr(t,'__parameters__',()):\n if x not in parameters:\n parameters.append(x)\n return tuple(parameters)\n \n \ndef _check_generic(cls,parameters,elen):\n ''\n\n\n \n if not elen:\n raise TypeError(f\"{cls} is not a generic class\")\n alen=len(parameters)\n if alen !=elen:\n raise TypeError(f\"Too {'many'if alen >elen else 'few'} arguments for {cls};\"\n f\" actual {alen}, expected {elen}\")\n \ndef _unpack_args(args):\n newargs=[]\n for arg in args:\n subargs=getattr(arg,'__typing_unpacked_tuple_args__',None )\n if subargs is not None and not (subargs and subargs[-1]is ...):\n newargs.extend(subargs)\n else :\n newargs.append(arg)\n return newargs\n \ndef _deduplicate(params):\n\n all_params=set(params)\n if len(all_params)','eval')\n except SyntaxError:\n raise SyntaxError(f\"Forward reference must be an expression -- got {arg !r}\")\n \n self.__forward_arg__=arg\n self.__forward_code__=code\n self.__forward_evaluated__=False\n self.__forward_value__=None\n self.__forward_is_argument__=is_argument\n self.__forward_is_class__=is_class\n self.__forward_module__=module\n \n def _evaluate(self,globalns,localns,recursive_guard):\n if self.__forward_arg__ in recursive_guard:\n return self\n if not self.__forward_evaluated__ or localns is not globalns:\n if globalns is None and localns is None :\n globalns=localns={}\n elif globalns is None :\n globalns=localns\n elif localns is None :\n localns=globalns\n if self.__forward_module__ is not None :\n globalns=getattr(\n sys.modules.get(self.__forward_module__,None ),'__dict__',globalns\n )\n type_=_type_check(\n eval(self.__forward_code__,globalns,localns),\n \"Forward references must evaluate to types.\",\n is_argument=self.__forward_is_argument__,\n allow_special_forms=self.__forward_is_class__,\n )\n self.__forward_value__=_eval_type(\n type_,globalns,localns,recursive_guard |{self.__forward_arg__}\n )\n self.__forward_evaluated__=True\n return self.__forward_value__\n \n def __eq__(self,other):\n if not isinstance(other,ForwardRef):\n return NotImplemented\n if self.__forward_evaluated__ and other.__forward_evaluated__:\n return (self.__forward_arg__ ==other.__forward_arg__ and\n self.__forward_value__ ==other.__forward_value__)\n return (self.__forward_arg__ ==other.__forward_arg__ and\n self.__forward_module__ ==other.__forward_module__)\n \n def __hash__(self):\n return hash((self.__forward_arg__,self.__forward_module__))\n \n def __or__(self,other):\n return Union[self,other]\n \n def __ror__(self,other):\n return Union[other,self]\n \n def __repr__(self):\n if self.__forward_module__ is None :\n module_repr=''\n else :\n module_repr=f', module={self.__forward_module__ !r}'\n return f'ForwardRef({self.__forward_arg__ !r}{module_repr})'\n \n \ndef _is_unpacked_typevartuple(x:Any)->bool:\n return ((not isinstance(x,type))and\n getattr(x,'__typing_is_unpacked_typevartuple__',False ))\n \n \ndef _is_typevar_like(x:Any)->bool:\n return isinstance(x,(TypeVar,ParamSpec))or _is_unpacked_typevartuple(x)\n \n \nclass _PickleUsingNameMixin:\n ''\n \n def __reduce__(self):\n return self.__name__\n \n \ndef _typevar_subst(self,arg):\n msg=\"Parameters to generic types must be types.\"\n arg=_type_check(arg,msg,is_argument=True )\n if ((isinstance(arg,_GenericAlias)and arg.__origin__ is Unpack)or\n (isinstance(arg,GenericAlias)and getattr(arg,'__unpacked__',False ))):\n raise TypeError(f\"{arg} is not valid as type argument\")\n return arg\n \n \ndef _typevartuple_prepare_subst(self,alias,args):\n params=alias.__parameters__\n typevartuple_index=params.index(self)\n for param in params[typevartuple_index+1:]:\n if isinstance(param,TypeVarTuple):\n raise TypeError(f\"More than one TypeVarTuple parameter in {alias}\")\n \n alen=len(args)\n plen=len(params)\n left=typevartuple_index\n right=plen -typevartuple_index -1\n var_tuple_index=None\n fillarg=None\n for k,arg in enumerate(args):\n if not isinstance(arg,type):\n subargs=getattr(arg,'__typing_unpacked_tuple_args__',None )\n if subargs and len(subargs)==2 and subargs[-1]is ...:\n if var_tuple_index is not None :\n raise TypeError(\"More than one unpacked arbitrary-length tuple argument\")\n var_tuple_index=k\n fillarg=subargs[0]\n if var_tuple_index is not None :\n left=min(left,var_tuple_index)\n right=min(right,alen -var_tuple_index -1)\n elif left+right >alen:\n raise TypeError(f\"Too few arguments for {alias};\"\n f\" actual {alen}, expected at least {plen -1}\")\n \n return (\n *args[:left],\n *([fillarg]*(typevartuple_index -left)),\n tuple(args[left:alen -right]),\n *([fillarg]*(plen -right -left -typevartuple_index -1)),\n *args[alen -right:],\n )\n \n \ndef _paramspec_subst(self,arg):\n if isinstance(arg,(list,tuple)):\n arg=tuple(_type_check(a,\"Expected a type.\")for a in arg)\n elif not _is_param_expr(arg):\n raise TypeError(f\"Expected a list of types, an ellipsis, \"\n f\"ParamSpec, or Concatenate. Got {arg}\")\n return arg\n \n \ndef _paramspec_prepare_subst(self,alias,args):\n params=alias.__parameters__\n i=params.index(self)\n if i >=len(args):\n raise TypeError(f\"Too few arguments for {alias}\")\n \n if len(params)==1 and not _is_param_expr(args[0]):\n assert i ==0\n args=(args,)\n \n elif isinstance(args[i],list):\n args=(*args[:i],tuple(args[i]),*args[i+1:])\n return args\n \n \n@_tp_cache\ndef _generic_class_getitem(cls,params):\n ''\n\n\n\n\n\n\n\n \n if not isinstance(params,tuple):\n params=(params,)\n \n params=tuple(_type_convert(p)for p in params)\n is_generic_or_protocol=cls in (Generic,Protocol)\n \n if is_generic_or_protocol:\n \n if not params:\n raise TypeError(\n f\"Parameter list to {cls.__qualname__}[...] cannot be empty\"\n )\n if not all(_is_typevar_like(p)for p in params):\n raise TypeError(\n f\"Parameters to {cls.__name__}[...] must all be type variables \"\n f\"or parameter specification variables.\")\n if len(set(params))!=len(params):\n raise TypeError(\n f\"Parameters to {cls.__name__}[...] must all be unique\")\n else :\n \n for param in cls.__parameters__:\n prepare=getattr(param,'__typing_prepare_subst__',None )\n if prepare is not None :\n params=prepare(cls,params)\n _check_generic(cls,params,len(cls.__parameters__))\n \n new_args=[]\n for param,new_arg in zip(cls.__parameters__,params):\n if isinstance(param,TypeVarTuple):\n new_args.extend(new_arg)\n else :\n new_args.append(new_arg)\n params=tuple(new_args)\n \n return _GenericAlias(cls,params)\n \n \ndef _generic_init_subclass(cls,*args,**kwargs):\n super(Generic,cls).__init_subclass__(*args,**kwargs)\n tvars=[]\n if '__orig_bases__'in cls.__dict__:\n error=Generic in cls.__orig_bases__\n else :\n error=(Generic in cls.__bases__ and\n cls.__name__ !='Protocol'and\n type(cls)!=_TypedDictMeta)\n if error:\n raise TypeError(\"Cannot inherit from plain Generic\")\n if '__orig_bases__'in cls.__dict__:\n tvars=_collect_parameters(cls.__orig_bases__)\n \n \n \n \n \n gvars=None\n for base in cls.__orig_bases__:\n if (isinstance(base,_GenericAlias)and\n base.__origin__ is Generic):\n if gvars is not None :\n raise TypeError(\n \"Cannot inherit from Generic[...] multiple times.\")\n gvars=base.__parameters__\n if gvars is not None :\n tvarset=set(tvars)\n gvarset=set(gvars)\n if not tvarset <=gvarset:\n s_vars=', '.join(str(t)for t in tvars if t not in gvarset)\n s_args=', '.join(str(g)for g in gvars)\n raise TypeError(f\"Some type variables ({s_vars}) are\"\n f\" not listed in Generic[{s_args}]\")\n tvars=gvars\n cls.__parameters__=tuple(tvars)\n \n \ndef _is_dunder(attr):\n return attr.startswith('__')and attr.endswith('__')\n \nclass _BaseGenericAlias(_Final,_root=True ):\n ''\n\n\n\n\n\n\n \n \n def __init__(self,origin,*,inst=True ,name=None ):\n self._inst=inst\n self._name=name\n self.__origin__=origin\n self.__slots__=None\n \n def __call__(self,*args,**kwargs):\n if not self._inst:\n raise TypeError(f\"Type {self._name} cannot be instantiated; \"\n f\"use {self.__origin__.__name__}() instead\")\n result=self.__origin__(*args,**kwargs)\n try :\n result.__orig_class__=self\n except AttributeError:\n pass\n return result\n \n def __mro_entries__(self,bases):\n res=[]\n if self.__origin__ not in bases:\n res.append(self.__origin__)\n i=bases.index(self)\n for b in bases[i+1:]:\n if isinstance(b,_BaseGenericAlias)or issubclass(b,Generic):\n break\n else :\n res.append(Generic)\n return tuple(res)\n \n def __getattr__(self,attr):\n if attr in {'__name__','__qualname__'}:\n return self._name or self.__origin__.__name__\n \n \n \n if '__origin__'in self.__dict__ and not _is_dunder(attr):\n return getattr(self.__origin__,attr)\n raise AttributeError(attr)\n \n def __setattr__(self,attr,val):\n if _is_dunder(attr)or attr in {'_name','_inst','_nparams'}:\n super().__setattr__(attr,val)\n else :\n setattr(self.__origin__,attr,val)\n \n def __instancecheck__(self,obj):\n return self.__subclasscheck__(type(obj))\n \n def __subclasscheck__(self,cls):\n raise TypeError(\"Subscripted generics cannot be used with\"\n \" class and instance checks\")\n \n def __dir__(self):\n return list(set(super().__dir__()\n +[attr for attr in dir(self.__origin__)if not _is_dunder(attr)]))\n \n \n \n \n \n \n \n \n \n \n \n \n \nclass _GenericAlias(_BaseGenericAlias,_root=True ):\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n def __init__(self,origin,args,*,inst=True ,name=None ):\n super().__init__(origin,inst=inst,name=name)\n if not isinstance(args,tuple):\n args=(args,)\n self.__args__=tuple(...if a is _TypingEllipsis else\n a for a in args)\n self.__parameters__=_collect_parameters(args)\n if not name:\n self.__module__=origin.__module__\n \n def __eq__(self,other):\n if not isinstance(other,_GenericAlias):\n return NotImplemented\n return (self.__origin__ ==other.__origin__\n and self.__args__ ==other.__args__)\n \n def __hash__(self):\n return hash((self.__origin__,self.__args__))\n \n def __or__(self,right):\n return Union[self,right]\n \n def __ror__(self,left):\n return Union[left,self]\n \n @_tp_cache\n def __getitem__(self,args):\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n if self.__origin__ in (Generic,Protocol):\n \n raise TypeError(f\"Cannot subscript already-subscripted {self}\")\n if not self.__parameters__:\n raise TypeError(f\"{self} is not a generic class\")\n \n \n if not isinstance(args,tuple):\n args=(args,)\n args=tuple(_type_convert(p)for p in args)\n args=_unpack_args(args)\n new_args=self._determine_new_args(args)\n r=self.copy_with(new_args)\n return r\n \n def _determine_new_args(self,args):\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n params=self.__parameters__\n \n for param in params:\n prepare=getattr(param,'__typing_prepare_subst__',None )\n if prepare is not None :\n args=prepare(self,args)\n alen=len(args)\n plen=len(params)\n if alen !=plen:\n raise TypeError(f\"Too {'many'if alen >plen else 'few'} arguments for {self};\"\n f\" actual {alen}, expected {plen}\")\n new_arg_by_param=dict(zip(params,args))\n return tuple(self._make_substitution(self.__args__,new_arg_by_param))\n \n def _make_substitution(self,args,new_arg_by_param):\n ''\n new_args=[]\n for old_arg in args:\n if isinstance(old_arg,type):\n new_args.append(old_arg)\n continue\n \n substfunc=getattr(old_arg,'__typing_subst__',None )\n if substfunc:\n new_arg=substfunc(new_arg_by_param[old_arg])\n else :\n subparams=getattr(old_arg,'__parameters__',())\n if not subparams:\n new_arg=old_arg\n else :\n subargs=[]\n for x in subparams:\n if isinstance(x,TypeVarTuple):\n subargs.extend(new_arg_by_param[x])\n else :\n subargs.append(new_arg_by_param[x])\n new_arg=old_arg[tuple(subargs)]\n \n if self.__origin__ ==collections.abc.Callable and isinstance(new_arg,tuple):\n \n \n \n \n \n \n \n \n \n \n new_args.extend(new_arg)\n elif _is_unpacked_typevartuple(old_arg):\n \n \n \n \n \n \n \n \n \n new_args.extend(new_arg)\n elif isinstance(old_arg,tuple):\n \n \n \n \n \n \n \n new_args.append(\n tuple(self._make_substitution(old_arg,new_arg_by_param)),\n )\n else :\n new_args.append(new_arg)\n return new_args\n \n def copy_with(self,args):\n return self.__class__(self.__origin__,args,name=self._name,inst=self._inst)\n \n def __repr__(self):\n if self._name:\n name='typing.'+self._name\n else :\n name=_type_repr(self.__origin__)\n if self.__args__:\n args=\", \".join([_type_repr(a)for a in self.__args__])\n else :\n \n args=\"()\"\n return f'{name}[{args}]'\n \n def __reduce__(self):\n if self._name:\n origin=globals()[self._name]\n else :\n origin=self.__origin__\n args=tuple(self.__args__)\n if len(args)==1 and not isinstance(args[0],tuple):\n args,=args\n return operator.getitem,(origin,args)\n \n def __mro_entries__(self,bases):\n if isinstance(self.__origin__,_SpecialForm):\n raise TypeError(f\"Cannot subclass {self !r}\")\n \n if self._name:\n return super().__mro_entries__(bases)\n if self.__origin__ is Generic:\n if Protocol in bases:\n return ()\n i=bases.index(self)\n for b in bases[i+1:]:\n if isinstance(b,_BaseGenericAlias)and b is not self:\n return ()\n return (self.__origin__,)\n \n def __iter__(self):\n yield Unpack[self]\n \n \n \n \n \n \nclass _SpecialGenericAlias(_NotIterable,_BaseGenericAlias,_root=True ):\n def __init__(self,origin,nparams,*,inst=True ,name=None ):\n if name is None :\n name=origin.__name__\n super().__init__(origin,inst=inst,name=name)\n self._nparams=nparams\n if origin.__module__ =='builtins':\n self.__doc__=f'A generic version of {origin.__qualname__}.'\n else :\n self.__doc__=f'A generic version of {origin.__module__}.{origin.__qualname__}.'\n \n @_tp_cache\n def __getitem__(self,params):\n if not isinstance(params,tuple):\n params=(params,)\n msg=\"Parameters to generic types must be types.\"\n params=tuple(_type_check(p,msg)for p in params)\n _check_generic(self,params,self._nparams)\n return self.copy_with(params)\n \n def copy_with(self,params):\n return _GenericAlias(self.__origin__,params,\n name=self._name,inst=self._inst)\n \n def __repr__(self):\n return 'typing.'+self._name\n \n def __subclasscheck__(self,cls):\n if isinstance(cls,_SpecialGenericAlias):\n return issubclass(cls.__origin__,self.__origin__)\n if not isinstance(cls,_GenericAlias):\n return issubclass(cls,self.__origin__)\n return super().__subclasscheck__(cls)\n \n def __reduce__(self):\n return self._name\n \n def __or__(self,right):\n return Union[self,right]\n \n def __ror__(self,left):\n return Union[left,self]\n \n \nclass _DeprecatedGenericAlias(_SpecialGenericAlias,_root=True ):\n def __init__(\n self,origin,nparams,*,removal_version,inst=True ,name=None\n ):\n super().__init__(origin,nparams,inst=inst,name=name)\n self._removal_version=removal_version\n \n def __instancecheck__(self,inst):\n import warnings\n warnings._deprecated(\n f\"{self.__module__}.{self._name}\",remove=self._removal_version\n )\n return super().__instancecheck__(inst)\n \n \nclass _CallableGenericAlias(_NotIterable,_GenericAlias,_root=True ):\n def __repr__(self):\n assert self._name =='Callable'\n args=self.__args__\n if len(args)==2 and _is_param_expr(args[0]):\n return super().__repr__()\n return (f'typing.Callable'\n f'[[{\", \".join([_type_repr(a)for a in args[:-1]])}], '\n f'{_type_repr(args[-1])}]')\n \n def __reduce__(self):\n args=self.__args__\n if not (len(args)==2 and _is_param_expr(args[0])):\n args=list(args[:-1]),args[-1]\n return operator.getitem,(Callable,args)\n \n \nclass _CallableType(_SpecialGenericAlias,_root=True ):\n def copy_with(self,params):\n return _CallableGenericAlias(self.__origin__,params,\n name=self._name,inst=self._inst)\n \n def __getitem__(self,params):\n if not isinstance(params,tuple)or len(params)!=2:\n raise TypeError(\"Callable must be used as \"\n \"Callable[[arg, ...], result].\")\n args,result=params\n \n \n \n if isinstance(args,list):\n params=(tuple(args),result)\n else :\n params=(args,result)\n return self.__getitem_inner__(params)\n \n @_tp_cache\n def __getitem_inner__(self,params):\n args,result=params\n msg=\"Callable[args, result]: result must be a type.\"\n result=_type_check(result,msg)\n if args is Ellipsis:\n return self.copy_with((_TypingEllipsis,result))\n if not isinstance(args,tuple):\n args=(args,)\n args=tuple(_type_convert(arg)for arg in args)\n params=args+(result,)\n return self.copy_with(params)\n \n \nclass _TupleType(_SpecialGenericAlias,_root=True ):\n @_tp_cache\n def __getitem__(self,params):\n if not isinstance(params,tuple):\n params=(params,)\n if len(params)>=2 and params[-1]is ...:\n msg=\"Tuple[t, ...]: t must be a type.\"\n params=tuple(_type_check(p,msg)for p in params[:-1])\n return self.copy_with((*params,_TypingEllipsis))\n msg=\"Tuple[t0, t1, ...]: each t must be a type.\"\n params=tuple(_type_check(p,msg)for p in params)\n return self.copy_with(params)\n \n \nclass _UnionGenericAlias(_NotIterable,_GenericAlias,_root=True ):\n def copy_with(self,params):\n return Union[params]\n \n def __eq__(self,other):\n if not isinstance(other,(_UnionGenericAlias,types.UnionType)):\n return NotImplemented\n return set(self.__args__)==set(other.__args__)\n \n def __hash__(self):\n return hash(frozenset(self.__args__))\n \n def __repr__(self):\n args=self.__args__\n if len(args)==2:\n if args[0]is type(None ):\n return f'typing.Optional[{_type_repr(args[1])}]'\n elif args[1]is type(None ):\n return f'typing.Optional[{_type_repr(args[0])}]'\n return super().__repr__()\n \n def __instancecheck__(self,obj):\n return self.__subclasscheck__(type(obj))\n \n def __subclasscheck__(self,cls):\n for arg in self.__args__:\n if issubclass(cls,arg):\n return True\n \n def __reduce__(self):\n func,(origin,args)=super().__reduce__()\n return func,(Union,args)\n \n \ndef _value_and_type_iter(parameters):\n return ((p,type(p))for p in parameters)\n \n \nclass _LiteralGenericAlias(_GenericAlias,_root=True ):\n def __eq__(self,other):\n if not isinstance(other,_LiteralGenericAlias):\n return NotImplemented\n \n return set(_value_and_type_iter(self.__args__))==set(_value_and_type_iter(other.__args__))\n \n def __hash__(self):\n return hash(frozenset(_value_and_type_iter(self.__args__)))\n \n \nclass _ConcatenateGenericAlias(_GenericAlias,_root=True ):\n def copy_with(self,params):\n if isinstance(params[-1],(list,tuple)):\n return (*params[:-1],*params[-1])\n if isinstance(params[-1],_ConcatenateGenericAlias):\n params=(*params[:-1],*params[-1].__args__)\n return super().copy_with(params)\n \n \n@_SpecialForm\ndef Unpack(self,parameters):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n item=_type_check(parameters,f'{self} accepts only single type.')\n return _UnpackGenericAlias(origin=self,args=(item,))\n \n \nclass _UnpackGenericAlias(_GenericAlias,_root=True ):\n def __repr__(self):\n \n \n return f'typing.Unpack[{_type_repr(self.__args__[0])}]'\n \n def __getitem__(self,args):\n if self.__typing_is_unpacked_typevartuple__:\n return args\n return super().__getitem__(args)\n \n @property\n def __typing_unpacked_tuple_args__(self):\n assert self.__origin__ is Unpack\n assert len(self.__args__)==1\n arg,=self.__args__\n if isinstance(arg,_GenericAlias):\n assert arg.__origin__ is tuple\n return arg.__args__\n return None\n \n @property\n def __typing_is_unpacked_typevartuple__(self):\n assert self.__origin__ is Unpack\n assert len(self.__args__)==1\n return isinstance(self.__args__[0],TypeVarTuple)\n \n \nclass _TypingEllipsis:\n ''\n \n \n_TYPING_INTERNALS=frozenset({\n'__parameters__','__orig_bases__','__orig_class__',\n'_is_protocol','_is_runtime_protocol','__protocol_attrs__',\n'__callable_proto_members_only__','__type_params__',\n})\n\n_SPECIAL_NAMES=frozenset({\n'__abstractmethods__','__annotations__','__dict__','__doc__',\n'__init__','__module__','__new__','__slots__',\n'__subclasshook__','__weakref__','__class_getitem__'\n})\n\n\nEXCLUDED_ATTRIBUTES=_TYPING_INTERNALS |_SPECIAL_NAMES |{'_MutableMapping__marker'}\n\n\ndef _get_protocol_attrs(cls):\n ''\n\n\n\n \n attrs=set()\n for base in cls.__mro__[:-1]:\n if base.__name__ in {'Protocol','Generic'}:\n continue\n annotations=getattr(base,'__annotations__',{})\n for attr in (*base.__dict__,*annotations):\n if not attr.startswith('_abc_')and attr not in EXCLUDED_ATTRIBUTES:\n attrs.add(attr)\n return attrs\n \n \ndef _no_init_or_replace_init(self,*args,**kwargs):\n cls=type(self)\n \n if cls._is_protocol:\n raise TypeError('Protocols cannot be instantiated')\n \n \n \n if cls.__init__ is not _no_init_or_replace_init:\n return\n \n \n \n \n \n \n \n for base in cls.__mro__:\n init=base.__dict__.get('__init__',_no_init_or_replace_init)\n if init is not _no_init_or_replace_init:\n cls.__init__=init\n break\n else :\n \n cls.__init__=object.__init__\n \n cls.__init__(self,*args,**kwargs)\n \n \ndef _caller(depth=1,default='__main__'):\n try :\n return sys._getframemodulename(depth+1)or default\n except AttributeError:\n pass\n try :\n return sys._getframe(depth+1).f_globals.get('__name__',default)\n except (AttributeError,ValueError):\n pass\n return None\n \ndef _allow_reckless_class_checks(depth=2):\n ''\n\n\n\n \n return _caller(depth)in {'abc','functools',None }\n \n \n_PROTO_ALLOWLIST={\n'collections.abc':[\n'Callable','Awaitable','Iterable','Iterator','AsyncIterable',\n'Hashable','Sized','Container','Collection','Reversible','Buffer',\n],\n'contextlib':['AbstractContextManager','AbstractAsyncContextManager'],\n}\n\n\n@functools.cache\ndef _lazy_load_getattr_static():\n\n\n from inspect import getattr_static\n return getattr_static\n \n \n_cleanups.append(_lazy_load_getattr_static.cache_clear)\n\ndef _pickle_psargs(psargs):\n return ParamSpecArgs,(psargs.__origin__,)\n \ncopyreg.pickle(ParamSpecArgs,_pickle_psargs)\n\ndef _pickle_pskwargs(pskwargs):\n return ParamSpecKwargs,(pskwargs.__origin__,)\n \ncopyreg.pickle(ParamSpecKwargs,_pickle_pskwargs)\n\ndel _pickle_psargs,_pickle_pskwargs\n\n\nclass _ProtocolMeta(ABCMeta):\n\n\n def __new__(mcls,name,bases,namespace,/,**kwargs):\n if name ==\"Protocol\"and bases ==(Generic,):\n pass\n elif Protocol in bases:\n for base in bases:\n if not (\n base in {object,Generic}\n or base.__name__ in _PROTO_ALLOWLIST.get(base.__module__,[])\n or (\n issubclass(base,Generic)\n and getattr(base,\"_is_protocol\",False )\n )\n ):\n raise TypeError(\n f\"Protocols can only inherit from other protocols, \"\n f\"got {base !r}\"\n )\n return super().__new__(mcls,name,bases,namespace,**kwargs)\n \n def __init__(cls,*args,**kwargs):\n super().__init__(*args,**kwargs)\n if getattr(cls,\"_is_protocol\",False ):\n cls.__protocol_attrs__=_get_protocol_attrs(cls)\n \n \n cls.__callable_proto_members_only__=all(\n callable(getattr(cls,attr,None ))for attr in cls.__protocol_attrs__\n )\n \n def __subclasscheck__(cls,other):\n if cls is Protocol:\n return type.__subclasscheck__(cls,other)\n if (\n getattr(cls,'_is_protocol',False )\n and not _allow_reckless_class_checks()\n ):\n if not isinstance(other,type):\n \n raise TypeError('issubclass() arg 1 must be a class')\n if (\n not cls.__callable_proto_members_only__\n and cls.__dict__.get(\"__subclasshook__\")is _proto_hook\n ):\n raise TypeError(\n \"Protocols with non-method members don't support issubclass()\"\n )\n if not getattr(cls,'_is_runtime_protocol',False ):\n raise TypeError(\n \"Instance and class checks can only be used with \"\n \"@runtime_checkable protocols\"\n )\n return super().__subclasscheck__(other)\n \n def __instancecheck__(cls,instance):\n \n \n if cls is Protocol:\n return type.__instancecheck__(cls,instance)\n if not getattr(cls,\"_is_protocol\",False ):\n \n return super().__instancecheck__(instance)\n \n if (\n not getattr(cls,'_is_runtime_protocol',False )and\n not _allow_reckless_class_checks()\n ):\n raise TypeError(\"Instance and class checks can only be used with\"\n \" @runtime_checkable protocols\")\n \n if super().__instancecheck__(instance):\n return True\n \n getattr_static=_lazy_load_getattr_static()\n for attr in cls.__protocol_attrs__:\n try :\n val=getattr_static(instance,attr)\n except AttributeError:\n break\n if val is None and callable(getattr(cls,attr,None )):\n break\n else :\n return True\n \n return False\n \n \n@classmethod\ndef _proto_hook(cls,other):\n if not cls.__dict__.get('_is_protocol',False ):\n return NotImplemented\n \n for attr in cls.__protocol_attrs__:\n for base in other.__mro__:\n \n if attr in base.__dict__:\n if base.__dict__[attr]is None :\n return NotImplemented\n break\n \n \n annotations=getattr(base,'__annotations__',{})\n if (isinstance(annotations,collections.abc.Mapping)and\n attr in annotations and\n issubclass(other,Generic)and getattr(other,'_is_protocol',False )):\n break\n else :\n return NotImplemented\n return True\n \n \nclass Protocol(Generic,metaclass=_ProtocolMeta):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=()\n _is_protocol=True\n _is_runtime_protocol=False\n \n def __init_subclass__(cls,*args,**kwargs):\n super().__init_subclass__(*args,**kwargs)\n \n \n if not cls.__dict__.get('_is_protocol',False ):\n cls._is_protocol=any(b is Protocol for b in cls.__bases__)\n \n \n if '__subclasshook__'not in cls.__dict__:\n cls.__subclasshook__=_proto_hook\n \n \n if cls._is_protocol and cls.__init__ is Protocol.__init__:\n cls.__init__=_no_init_or_replace_init\n \n \nclass _AnnotatedAlias(_NotIterable,_GenericAlias,_root=True ):\n ''\n\n\n\n\n\n\n\n \n \n def __init__(self,origin,metadata):\n if isinstance(origin,_AnnotatedAlias):\n metadata=origin.__metadata__+metadata\n origin=origin.__origin__\n super().__init__(origin,origin,name='Annotated')\n self.__metadata__=metadata\n \n def copy_with(self,params):\n assert len(params)==1\n new_type=params[0]\n return _AnnotatedAlias(new_type,self.__metadata__)\n \n def __repr__(self):\n return \"typing.Annotated[{}, {}]\".format(\n _type_repr(self.__origin__),\n \", \".join(repr(a)for a in self.__metadata__)\n )\n \n def __reduce__(self):\n return operator.getitem,(\n Annotated,(self.__origin__,)+self.__metadata__\n )\n \n def __eq__(self,other):\n if not isinstance(other,_AnnotatedAlias):\n return NotImplemented\n return (self.__origin__ ==other.__origin__\n and self.__metadata__ ==other.__metadata__)\n \n def __hash__(self):\n return hash((self.__origin__,self.__metadata__))\n \n def __getattr__(self,attr):\n if attr in {'__name__','__qualname__'}:\n return 'Annotated'\n return super().__getattr__(attr)\n \n def __mro_entries__(self,bases):\n return (self.__origin__,)\n \n \nclass Annotated:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=()\n \n def __new__(cls,*args,**kwargs):\n raise TypeError(\"Type Annotated cannot be instantiated.\")\n \n @_tp_cache\n def __class_getitem__(cls,params):\n if not isinstance(params,tuple)or len(params)<2:\n raise TypeError(\"Annotated[...] should be used \"\n \"with at least two arguments (a type and an \"\n \"annotation).\")\n if _is_unpacked_typevartuple(params[0]):\n raise TypeError(\"Annotated[...] should not be used with an \"\n \"unpacked TypeVarTuple\")\n msg=\"Annotated[t, ...]: t must be a type.\"\n origin=_type_check(params[0],msg,allow_special_forms=True )\n metadata=tuple(params[1:])\n return _AnnotatedAlias(origin,metadata)\n \n def __init_subclass__(cls,*args,**kwargs):\n raise TypeError(\n \"Cannot subclass {}.Annotated\".format(cls.__module__)\n )\n \n \ndef runtime_checkable(cls):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not issubclass(cls,Generic)or not getattr(cls,'_is_protocol',False ):\n raise TypeError('@runtime_checkable can be only applied to protocol classes,'\n ' got %r'%cls)\n cls._is_runtime_protocol=True\n return cls\n \n \ndef cast(typ,val):\n ''\n\n\n\n\n\n \n return val\n \n \ndef assert_type(val,typ,/):\n ''\n\n\n\n\n\n\n\n\n\n\n \n return val\n \n \n_allowed_types=(types.FunctionType,types.BuiltinFunctionType,\ntypes.MethodType,types.ModuleType,\nWrapperDescriptorType,MethodWrapperType,MethodDescriptorType)\n\n\ndef get_type_hints(obj,globalns=None ,localns=None ,include_extras=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if getattr(obj,'__no_type_check__',None ):\n return {}\n \n if isinstance(obj,type):\n hints={}\n for base in reversed(obj.__mro__):\n if globalns is None :\n base_globals=getattr(sys.modules.get(base.__module__,None ),'__dict__',{})\n else :\n base_globals=globalns\n ann=base.__dict__.get('__annotations__',{})\n if isinstance(ann,types.GetSetDescriptorType):\n ann={}\n base_locals=dict(vars(base))if localns is None else localns\n if localns is None and globalns is None :\n \n \n \n \n \n \n base_globals,base_locals=base_locals,base_globals\n for name,value in ann.items():\n if value is None :\n value=type(None )\n if isinstance(value,str):\n value=ForwardRef(value,is_argument=False ,is_class=True )\n value=_eval_type(value,base_globals,base_locals)\n hints[name]=value\n return hints if include_extras else {k:_strip_annotations(t)for k,t in hints.items()}\n \n if globalns is None :\n if isinstance(obj,types.ModuleType):\n globalns=obj.__dict__\n else :\n nsobj=obj\n \n while hasattr(nsobj,'__wrapped__'):\n nsobj=nsobj.__wrapped__\n globalns=getattr(nsobj,'__globals__',{})\n if localns is None :\n localns=globalns\n elif localns is None :\n localns=globalns\n hints=getattr(obj,'__annotations__',None )\n if hints is None :\n \n if isinstance(obj,_allowed_types):\n return {}\n else :\n raise TypeError('{!r} is not a module, class, method, '\n 'or function.'.format(obj))\n hints=dict(hints)\n for name,value in hints.items():\n if value is None :\n value=type(None )\n if isinstance(value,str):\n \n \n value=ForwardRef(\n value,\n is_argument=not isinstance(obj,types.ModuleType),\n is_class=False ,\n )\n hints[name]=_eval_type(value,globalns,localns)\n return hints if include_extras else {k:_strip_annotations(t)for k,t in hints.items()}\n \n \ndef _strip_annotations(t):\n ''\n if isinstance(t,_AnnotatedAlias):\n return _strip_annotations(t.__origin__)\n if hasattr(t,\"__origin__\")and t.__origin__ in (Required,NotRequired):\n return _strip_annotations(t.__args__[0])\n if isinstance(t,_GenericAlias):\n stripped_args=tuple(_strip_annotations(a)for a in t.__args__)\n if stripped_args ==t.__args__:\n return t\n return t.copy_with(stripped_args)\n if isinstance(t,GenericAlias):\n stripped_args=tuple(_strip_annotations(a)for a in t.__args__)\n if stripped_args ==t.__args__:\n return t\n return GenericAlias(t.__origin__,stripped_args)\n if isinstance(t,types.UnionType):\n stripped_args=tuple(_strip_annotations(a)for a in t.__args__)\n if stripped_args ==t.__args__:\n return t\n return functools.reduce(operator.or_,stripped_args)\n \n return t\n \n \ndef get_origin(tp):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if isinstance(tp,_AnnotatedAlias):\n return Annotated\n if isinstance(tp,(_BaseGenericAlias,GenericAlias,\n ParamSpecArgs,ParamSpecKwargs)):\n return tp.__origin__\n if tp is Generic:\n return Generic\n if isinstance(tp,types.UnionType):\n return types.UnionType\n return None\n \n \ndef get_args(tp):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if isinstance(tp,_AnnotatedAlias):\n return (tp.__origin__,)+tp.__metadata__\n if isinstance(tp,(_GenericAlias,GenericAlias)):\n res=tp.__args__\n if _should_unflatten_callable_args(tp,res):\n res=(list(res[:-1]),res[-1])\n return res\n if isinstance(tp,types.UnionType):\n return tp.__args__\n return ()\n \n \ndef is_typeddict(tp):\n ''\n\n\n\n\n\n\n\n\n\n \n return isinstance(tp,_TypedDictMeta)\n \n \n_ASSERT_NEVER_REPR_MAX_LENGTH=100\n\n\ndef assert_never(arg:Never,/)->Never:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n value=repr(arg)\n if len(value)>_ASSERT_NEVER_REPR_MAX_LENGTH:\n value=value[:_ASSERT_NEVER_REPR_MAX_LENGTH]+'...'\n raise AssertionError(f\"Expected code to be unreachable, but got: {value}\")\n \n \ndef no_type_check(arg):\n ''\n\n\n\n\n\n\n \n if isinstance(arg,type):\n for key in dir(arg):\n obj=getattr(arg,key)\n if (\n not hasattr(obj,'__qualname__')\n or obj.__qualname__ !=f'{arg.__qualname__}.{obj.__name__}'\n or getattr(obj,'__module__',None )!=arg.__module__\n ):\n \n \n \n continue\n \n if isinstance(obj,types.FunctionType):\n obj.__no_type_check__=True\n if isinstance(obj,types.MethodType):\n obj.__func__.__no_type_check__=True\n \n if isinstance(obj,type):\n no_type_check(obj)\n try :\n arg.__no_type_check__=True\n except TypeError:\n pass\n return arg\n \n \ndef no_type_check_decorator(decorator):\n ''\n\n\n\n \n @functools.wraps(decorator)\n def wrapped_decorator(*args,**kwds):\n func=decorator(*args,**kwds)\n func=no_type_check(func)\n return func\n \n return wrapped_decorator\n \n \ndef _overload_dummy(*args,**kwds):\n ''\n raise NotImplementedError(\n \"You should not call an overloaded function. \"\n \"A series of @overload-decorated functions \"\n \"outside a stub module should always be followed \"\n \"by an implementation that is not @overload-ed.\")\n \n \n \n_overload_registry=defaultdict(functools.partial(defaultdict,dict))\n\n\ndef overload(func):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n f=getattr(func,\"__func__\",func)\n try :\n _overload_registry[f.__module__][f.__qualname__][f.__code__.co_firstlineno]=func\n except AttributeError:\n \n pass\n return _overload_dummy\n \n \ndef get_overloads(func):\n ''\n \n f=getattr(func,\"__func__\",func)\n if f.__module__ not in _overload_registry:\n return []\n mod_dict=_overload_registry[f.__module__]\n if f.__qualname__ not in mod_dict:\n return []\n return list(mod_dict[f.__qualname__].values())\n \n \ndef clear_overloads():\n ''\n _overload_registry.clear()\n \n \ndef final(f):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n f.__final__=True\n except (AttributeError,TypeError):\n \n \n \n pass\n return f\n \n \n \n \n \nT=TypeVar('T')\nKT=TypeVar('KT')\nVT=TypeVar('VT')\nT_co=TypeVar('T_co',covariant=True )\nV_co=TypeVar('V_co',covariant=True )\nVT_co=TypeVar('VT_co',covariant=True )\nT_contra=TypeVar('T_contra',contravariant=True )\n\nCT_co=TypeVar('CT_co',covariant=True ,bound=type)\n\n\n\n\nAnyStr=TypeVar('AnyStr',bytes,str)\n\n\n\n_alias=_SpecialGenericAlias\n\nHashable=_alias(collections.abc.Hashable,0)\nAwaitable=_alias(collections.abc.Awaitable,1)\nCoroutine=_alias(collections.abc.Coroutine,3)\nAsyncIterable=_alias(collections.abc.AsyncIterable,1)\nAsyncIterator=_alias(collections.abc.AsyncIterator,1)\nIterable=_alias(collections.abc.Iterable,1)\nIterator=_alias(collections.abc.Iterator,1)\nReversible=_alias(collections.abc.Reversible,1)\nSized=_alias(collections.abc.Sized,0)\nContainer=_alias(collections.abc.Container,1)\nCollection=_alias(collections.abc.Collection,1)\nCallable=_CallableType(collections.abc.Callable,2)\nCallable.__doc__=\\\n\"\"\"Deprecated alias to collections.abc.Callable.\n\n Callable[[int], str] signifies a function that takes a single\n parameter of type int and returns a str.\n\n The subscription syntax must always be used with exactly two\n values: the argument list and the return type.\n The argument list must be a list of types, a ParamSpec,\n Concatenate or ellipsis. The return type must be a single type.\n\n There is no syntax to indicate optional or keyword arguments;\n such function types are rarely used as callback types.\n \"\"\"\nAbstractSet=_alias(collections.abc.Set,1,name='AbstractSet')\nMutableSet=_alias(collections.abc.MutableSet,1)\n\nMapping=_alias(collections.abc.Mapping,2)\nMutableMapping=_alias(collections.abc.MutableMapping,2)\nSequence=_alias(collections.abc.Sequence,1)\nMutableSequence=_alias(collections.abc.MutableSequence,1)\nByteString=_DeprecatedGenericAlias(\ncollections.abc.ByteString,0,removal_version=(3,14)\n)\n\nTuple=_TupleType(tuple,-1,inst=False ,name='Tuple')\nTuple.__doc__=\\\n\"\"\"Deprecated alias to builtins.tuple.\n\n Tuple[X, Y] is the cross-product type of X and Y.\n\n Example: Tuple[T1, T2] is a tuple of two elements corresponding\n to type variables T1 and T2. Tuple[int, float, str] is a tuple\n of an int, a float and a string.\n\n To specify a variable-length tuple of homogeneous type, use Tuple[T, ...].\n \"\"\"\nList=_alias(list,1,inst=False ,name='List')\nDeque=_alias(collections.deque,1,name='Deque')\nSet=_alias(set,1,inst=False ,name='Set')\nFrozenSet=_alias(frozenset,1,inst=False ,name='FrozenSet')\nMappingView=_alias(collections.abc.MappingView,1)\nKeysView=_alias(collections.abc.KeysView,1)\nItemsView=_alias(collections.abc.ItemsView,2)\nValuesView=_alias(collections.abc.ValuesView,1)\nContextManager=_alias(contextlib.AbstractContextManager,1,name='ContextManager')\nAsyncContextManager=_alias(contextlib.AbstractAsyncContextManager,1,name='AsyncContextManager')\nDict=_alias(dict,2,inst=False ,name='Dict')\nDefaultDict=_alias(collections.defaultdict,2,name='DefaultDict')\nOrderedDict=_alias(collections.OrderedDict,2)\nCounter=_alias(collections.Counter,1)\nChainMap=_alias(collections.ChainMap,2)\nGenerator=_alias(collections.abc.Generator,3)\nAsyncGenerator=_alias(collections.abc.AsyncGenerator,2)\nType=_alias(type,1,inst=False ,name='Type')\nType.__doc__=\\\n\"\"\"Deprecated alias to builtins.type.\n\n builtins.type or typing.Type can be used to annotate class objects.\n For example, suppose we have the following classes::\n\n class User: ... # Abstract base for User classes\n class BasicUser(User): ...\n class ProUser(User): ...\n class TeamUser(User): ...\n\n And a function that takes a class argument that's a subclass of\n User and returns an instance of the corresponding class::\n\n def new_user[U](user_class: Type[U]) -> U:\n user = user_class()\n # (Here we could write the user object to a database)\n return user\n\n joe = new_user(BasicUser)\n\n At this point the type checker knows that joe has type BasicUser.\n \"\"\"\n\n\n@runtime_checkable\nclass SupportsInt(Protocol):\n ''\n \n __slots__=()\n \n @abstractmethod\n def __int__(self)->int:\n pass\n \n \n@runtime_checkable\nclass SupportsFloat(Protocol):\n ''\n \n __slots__=()\n \n @abstractmethod\n def __float__(self)->float:\n pass\n \n \n@runtime_checkable\nclass SupportsComplex(Protocol):\n ''\n \n __slots__=()\n \n @abstractmethod\n def __complex__(self)->complex:\n pass\n \n \n@runtime_checkable\nclass SupportsBytes(Protocol):\n ''\n \n __slots__=()\n \n @abstractmethod\n def __bytes__(self)->bytes:\n pass\n \n \n@runtime_checkable\nclass SupportsIndex(Protocol):\n ''\n \n __slots__=()\n \n @abstractmethod\n def __index__(self)->int:\n pass\n \n \n@runtime_checkable\nclass SupportsAbs[T](Protocol):\n ''\n \n __slots__=()\n \n @abstractmethod\n def __abs__(self)->T:\n pass\n \n \n@runtime_checkable\nclass SupportsRound[T](Protocol):\n ''\n \n __slots__=()\n \n @abstractmethod\n def __round__(self,ndigits:int=0)->T:\n pass\n \n \ndef _make_nmtuple(name,types,module,defaults=()):\n fields=[n for n,t in types]\n types={n:_type_check(t,f\"field {n} annotation must be a type\")\n for n,t in types}\n nm_tpl=collections.namedtuple(name,fields,\n defaults=defaults,module=module)\n nm_tpl.__annotations__=nm_tpl.__new__.__annotations__=types\n return nm_tpl\n \n \n \n_prohibited=frozenset({'__new__','__init__','__slots__','__getnewargs__',\n'_fields','_field_defaults',\n'_make','_replace','_asdict','_source'})\n\n_special=frozenset({'__module__','__name__','__annotations__'})\n\n\nclass NamedTupleMeta(type):\n def __new__(cls,typename,bases,ns):\n assert _NamedTuple in bases\n for base in bases:\n if base is not _NamedTuple and base is not Generic:\n raise TypeError(\n 'can only inherit from a NamedTuple type and Generic')\n bases=tuple(tuple if base is _NamedTuple else base for base in bases)\n types=ns.get('__annotations__',{})\n default_names=[]\n for field_name in types:\n if field_name in ns:\n default_names.append(field_name)\n elif default_names:\n raise TypeError(f\"Non-default namedtuple field {field_name} \"\n f\"cannot follow default field\"\n f\"{'s'if len(default_names)>1 else ''} \"\n f\"{', '.join(default_names)}\")\n nm_tpl=_make_nmtuple(typename,types.items(),\n defaults=[ns[n]for n in default_names],\n module=ns['__module__'])\n nm_tpl.__bases__=bases\n if Generic in bases:\n class_getitem=_generic_class_getitem\n nm_tpl.__class_getitem__=classmethod(class_getitem)\n \n for key in ns:\n if key in _prohibited:\n raise AttributeError(\"Cannot overwrite NamedTuple attribute \"+key)\n elif key not in _special and key not in nm_tpl._fields:\n setattr(nm_tpl,key,ns[key])\n if Generic in bases:\n nm_tpl.__init_subclass__()\n return nm_tpl\n \n \ndef NamedTuple(typename,fields=None ,/,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if fields is None :\n fields=kwargs.items()\n elif kwargs:\n raise TypeError(\"Either list of fields or keywords\"\n \" can be provided to NamedTuple, not both\")\n nt=_make_nmtuple(typename,fields,module=_caller())\n nt.__orig_bases__=(NamedTuple,)\n return nt\n \n_NamedTuple=type.__new__(NamedTupleMeta,'NamedTuple',(),{})\n\ndef _namedtuple_mro_entries(bases):\n assert NamedTuple in bases\n return (_NamedTuple,)\n \nNamedTuple.__mro_entries__=_namedtuple_mro_entries\n\n\nclass _TypedDictMeta(type):\n def __new__(cls,name,bases,ns,total=True ):\n ''\n\n\n\n\n\n \n for base in bases:\n if type(base)is not _TypedDictMeta and base is not Generic:\n raise TypeError('cannot inherit from both a TypedDict type '\n 'and a non-TypedDict base class')\n \n if any(issubclass(b,Generic)for b in bases):\n generic_base=(Generic,)\n else :\n generic_base=()\n \n tp_dict=type.__new__(_TypedDictMeta,name,(*generic_base,dict),ns)\n \n if not hasattr(tp_dict,'__orig_bases__'):\n tp_dict.__orig_bases__=bases\n \n annotations={}\n own_annotations=ns.get('__annotations__',{})\n msg=\"TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a type\"\n own_annotations={\n n:_type_check(tp,msg,module=tp_dict.__module__)\n for n,tp in own_annotations.items()\n }\n required_keys=set()\n optional_keys=set()\n \n for base in bases:\n annotations.update(base.__dict__.get('__annotations__',{}))\n required_keys.update(base.__dict__.get('__required_keys__',()))\n optional_keys.update(base.__dict__.get('__optional_keys__',()))\n \n annotations.update(own_annotations)\n for annotation_key,annotation_type in own_annotations.items():\n annotation_origin=get_origin(annotation_type)\n if annotation_origin is Annotated:\n annotation_args=get_args(annotation_type)\n if annotation_args:\n annotation_type=annotation_args[0]\n annotation_origin=get_origin(annotation_type)\n \n if annotation_origin is Required:\n required_keys.add(annotation_key)\n elif annotation_origin is NotRequired:\n optional_keys.add(annotation_key)\n elif total:\n required_keys.add(annotation_key)\n else :\n optional_keys.add(annotation_key)\n \n tp_dict.__annotations__=annotations\n tp_dict.__required_keys__=frozenset(required_keys)\n tp_dict.__optional_keys__=frozenset(optional_keys)\n if not hasattr(tp_dict,'__total__'):\n tp_dict.__total__=total\n return tp_dict\n \n __call__=dict\n \n def __subclasscheck__(cls,other):\n \n raise TypeError('TypedDict does not support instance and class checks')\n \n __instancecheck__=__subclasscheck__\n \n \ndef TypedDict(typename,fields=None ,/,*,total=True ,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if fields is None :\n fields=kwargs\n elif kwargs:\n raise TypeError(\"TypedDict takes either a dict or keyword arguments,\"\n \" but not both\")\n if kwargs:\n warnings.warn(\n \"The kwargs-based syntax for TypedDict definitions is deprecated \"\n \"in Python 3.11, will be removed in Python 3.13, and may not be \"\n \"understood by third-party type checkers.\",\n DeprecationWarning,\n stacklevel=2,\n )\n \n ns={'__annotations__':dict(fields)}\n module=_caller()\n if module is not None :\n \n ns['__module__']=module\n \n td=_TypedDictMeta(typename,(),ns,total=total)\n td.__orig_bases__=(TypedDict,)\n return td\n \n_TypedDict=type.__new__(_TypedDictMeta,'TypedDict',(),{})\nTypedDict.__mro_entries__=lambda bases:(_TypedDict,)\n\n\n@_SpecialForm\ndef Required(self,parameters):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n item=_type_check(parameters,f'{self._name} accepts only a single type.')\n return _GenericAlias(self,(item,))\n \n \n@_SpecialForm\ndef NotRequired(self,parameters):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n item=_type_check(parameters,f'{self._name} accepts only a single type.')\n return _GenericAlias(self,(item,))\n \n \nclass NewType:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __call__=_idfunc\n \n def __init__(self,name,tp):\n self.__qualname__=name\n if '.'in name:\n name=name.rpartition('.')[-1]\n self.__name__=name\n self.__supertype__=tp\n def_mod=_caller()\n if def_mod !='typing':\n self.__module__=def_mod\n \n def __mro_entries__(self,bases):\n \n \n superclass_name=self.__name__\n \n class Dummy:\n def __init_subclass__(cls):\n subclass_name=cls.__name__\n raise TypeError(\n f\"Cannot subclass an instance of NewType. Perhaps you were looking for: \"\n f\"`{subclass_name} = NewType({subclass_name !r}, {superclass_name})`\"\n )\n \n return (Dummy,)\n \n def __repr__(self):\n return f'{self.__module__}.{self.__qualname__}'\n \n def __reduce__(self):\n return self.__qualname__\n \n def __or__(self,other):\n return Union[self,other]\n \n def __ror__(self,other):\n return Union[other,self]\n \n \n \nText=str\n\n\n\nTYPE_CHECKING=False\n\n\nclass IO(Generic[AnyStr]):\n ''\n\n\n\n\n\n\n\n\n\n \n \n __slots__=()\n \n @property\n @abstractmethod\n def mode(self)->str:\n pass\n \n @property\n @abstractmethod\n def name(self)->str:\n pass\n \n @abstractmethod\n def close(self)->None :\n pass\n \n @property\n @abstractmethod\n def closed(self)->bool:\n pass\n \n @abstractmethod\n def fileno(self)->int:\n pass\n \n @abstractmethod\n def flush(self)->None :\n pass\n \n @abstractmethod\n def isatty(self)->bool:\n pass\n \n @abstractmethod\n def read(self,n:int=-1)->AnyStr:\n pass\n \n @abstractmethod\n def readable(self)->bool:\n pass\n \n @abstractmethod\n def readline(self,limit:int=-1)->AnyStr:\n pass\n \n @abstractmethod\n def readlines(self,hint:int=-1)->List[AnyStr]:\n pass\n \n @abstractmethod\n def seek(self,offset:int,whence:int=0)->int:\n pass\n \n @abstractmethod\n def seekable(self)->bool:\n pass\n \n @abstractmethod\n def tell(self)->int:\n pass\n \n @abstractmethod\n def truncate(self,size:int=None )->int:\n pass\n \n @abstractmethod\n def writable(self)->bool:\n pass\n \n @abstractmethod\n def write(self,s:AnyStr)->int:\n pass\n \n @abstractmethod\n def writelines(self,lines:List[AnyStr])->None :\n pass\n \n @abstractmethod\n def __enter__(self)->'IO[AnyStr]':\n pass\n \n @abstractmethod\n def __exit__(self,type,value,traceback)->None :\n pass\n \n \nclass BinaryIO(IO[bytes]):\n ''\n \n __slots__=()\n \n @abstractmethod\n def write(self,s:Union[bytes,bytearray])->int:\n pass\n \n @abstractmethod\n def __enter__(self)->'BinaryIO':\n pass\n \n \nclass TextIO(IO[str]):\n ''\n \n __slots__=()\n \n @property\n @abstractmethod\n def buffer(self)->BinaryIO:\n pass\n \n @property\n @abstractmethod\n def encoding(self)->str:\n pass\n \n @property\n @abstractmethod\n def errors(self)->Optional[str]:\n pass\n \n @property\n @abstractmethod\n def line_buffering(self)->bool:\n pass\n \n @property\n @abstractmethod\n def newlines(self)->Any:\n pass\n \n @abstractmethod\n def __enter__(self)->'TextIO':\n pass\n \n \nclass _DeprecatedType(type):\n def __getattribute__(cls,name):\n if name not in (\"__dict__\",\"__module__\")and name in cls.__dict__:\n warnings.warn(\n f\"{cls.__name__} is deprecated, import directly \"\n f\"from typing instead. {cls.__name__} will be removed \"\n \"in Python 3.12.\",\n DeprecationWarning,\n stacklevel=2,\n )\n return super().__getattribute__(name)\n \n \nclass io(metaclass=_DeprecatedType):\n ''\n \n __all__=['IO','TextIO','BinaryIO']\n IO=IO\n TextIO=TextIO\n BinaryIO=BinaryIO\n \n \nio.__name__=__name__+'.io'\nsys.modules[io.__name__]=io\n\nPattern=_alias(stdlib_re.Pattern,1)\nMatch=_alias(stdlib_re.Match,1)\n\nclass re(metaclass=_DeprecatedType):\n ''\n \n __all__=['Pattern','Match']\n Pattern=Pattern\n Match=Match\n \n \nre.__name__=__name__+'.re'\nsys.modules[re.__name__]=re\n\n\ndef reveal_type[T](obj:T,/)->T:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n print(f\"Runtime type is {type(obj).__name__ !r}\",file=sys.stderr)\n return obj\n \n \nclass _IdentityCallable(Protocol):\n def __call__[T](self,arg:T,/)->T:\n ...\n \n \ndef dataclass_transform(\n*,\neq_default:bool=True ,\norder_default:bool=False ,\nkw_only_default:bool=False ,\nfrozen_default:bool=False ,\nfield_specifiers:tuple[type[Any]|Callable[...,Any],...]=(),\n**kwargs:Any,\n)->_IdentityCallable:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def decorator(cls_or_fn):\n cls_or_fn.__dataclass_transform__={\n \"eq_default\":eq_default,\n \"order_default\":order_default,\n \"kw_only_default\":kw_only_default,\n \"frozen_default\":frozen_default,\n \"field_specifiers\":field_specifiers,\n \"kwargs\":kwargs,\n }\n return cls_or_fn\n return decorator\n \n \ntype _Func=Callable[...,Any]\n\n\ndef override[F:_Func](method:F,/)->F:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n try :\n method.__override__=True\n except (AttributeError,TypeError):\n \n \n \n pass\n return method\n", ["_typing", "abc", "collections", "collections.abc", "contextlib", "copyreg", "functools", "inspect", "operator", "re", "sys", "types", "warnings"]], "uu": [".py", "#! /usr/bin/env python3\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\"\"\"Implementation of the UUencode and UUdecode functions.\n\nencode(in_file, out_file [,name, mode], *, backtick=False)\ndecode(in_file [, out_file, mode, quiet])\n\"\"\"\n\nimport binascii\nimport os\nimport sys\nimport warnings\n\nwarnings._deprecated(__name__,remove=(3,13))\n\n__all__=[\"Error\",\"encode\",\"decode\"]\n\nclass Error(Exception):\n pass\n \ndef encode(in_file,out_file,name=None ,mode=None ,*,backtick=False ):\n ''\n \n \n \n opened_files=[]\n try :\n if in_file =='-':\n in_file=sys.stdin.buffer\n elif isinstance(in_file,str):\n if name is None :\n name=os.path.basename(in_file)\n if mode is None :\n try :\n mode=os.stat(in_file).st_mode\n except AttributeError:\n pass\n in_file=open(in_file,'rb')\n opened_files.append(in_file)\n \n \n \n if out_file =='-':\n out_file=sys.stdout.buffer\n elif isinstance(out_file,str):\n out_file=open(out_file,'wb')\n opened_files.append(out_file)\n \n \n \n if name is None :\n name='-'\n if mode is None :\n mode=0o666\n \n \n \n \n name=name.replace('\\n','\\\\n')\n name=name.replace('\\r','\\\\r')\n \n \n \n \n out_file.write(('begin %o %s\\n'%((mode&0o777),name)).encode(\"ascii\"))\n data=in_file.read(45)\n while len(data)>0:\n out_file.write(binascii.b2a_uu(data,backtick=backtick))\n data=in_file.read(45)\n if backtick:\n out_file.write(b'`\\nend\\n')\n else :\n out_file.write(b' \\nend\\n')\n finally :\n for f in opened_files:\n f.close()\n \n \ndef decode(in_file,out_file=None ,mode=None ,quiet=False ):\n ''\n \n \n \n opened_files=[]\n if in_file =='-':\n in_file=sys.stdin.buffer\n elif isinstance(in_file,str):\n in_file=open(in_file,'rb')\n opened_files.append(in_file)\n \n try :\n \n \n \n while True :\n hdr=in_file.readline()\n if not hdr:\n raise Error('No valid begin line found in input file')\n if not hdr.startswith(b'begin'):\n continue\n hdrfields=hdr.split(b' ',2)\n if len(hdrfields)==3 and hdrfields[0]==b'begin':\n try :\n int(hdrfields[1],8)\n break\n except ValueError:\n pass\n if out_file is None :\n \n out_file=hdrfields[2].rstrip(b' \\t\\r\\n\\f').decode(\"ascii\")\n if os.path.exists(out_file):\n raise Error(f'Cannot overwrite existing file: {out_file}')\n if (out_file.startswith(os.sep)or\n f'..{os.sep}'in out_file or (\n os.altsep and\n (out_file.startswith(os.altsep)or\n f'..{os.altsep}'in out_file))\n ):\n raise Error(f'Refusing to write to {out_file} due to directory traversal')\n if mode is None :\n mode=int(hdrfields[1],8)\n \n \n \n if out_file =='-':\n out_file=sys.stdout.buffer\n elif isinstance(out_file,str):\n fp=open(out_file,'wb')\n os.chmod(out_file,mode)\n out_file=fp\n opened_files.append(out_file)\n \n \n \n s=in_file.readline()\n while s and s.strip(b' \\t\\r\\n\\f')!=b'end':\n try :\n data=binascii.a2b_uu(s)\n except binascii.Error as v:\n \n nbytes=(((s[0]-32)&63)*4+5)//3\n data=binascii.a2b_uu(s[:nbytes])\n if not quiet:\n sys.stderr.write(\"Warning: %s\\n\"%v)\n out_file.write(data)\n s=in_file.readline()\n if not s:\n raise Error('Truncated input file')\n finally :\n for f in opened_files:\n f.close()\n \ndef test():\n ''\n \n import optparse\n parser=optparse.OptionParser(usage='usage: %prog [-d] [-t] [input [output]]')\n parser.add_option('-d','--decode',dest='decode',help='Decode (instead of encode)?',default=False ,action='store_true')\n parser.add_option('-t','--text',dest='text',help='data is text, encoded format unix-compatible text?',default=False ,action='store_true')\n \n (options,args)=parser.parse_args()\n if len(args)>2:\n parser.error('incorrect number of arguments')\n sys.exit(1)\n \n \n input=sys.stdin.buffer\n output=sys.stdout.buffer\n if len(args)>0:\n input=args[0]\n if len(args)>1:\n output=args[1]\n \n if options.decode:\n if options.text:\n if isinstance(output,str):\n output=open(output,'wb')\n else :\n print(sys.argv[0],': cannot do -t to stdout')\n sys.exit(1)\n decode(input,output)\n else :\n if options.text:\n if isinstance(input,str):\n input=open(input,'rb')\n else :\n print(sys.argv[0],': cannot do -t from stdin')\n sys.exit(1)\n encode(input,output)\n \nif __name__ =='__main__':\n test()\n", ["binascii", "optparse", "os", "sys", "warnings"]], "uuid": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport os\nimport sys\n\nfrom enum import Enum,_simple_enum\n\n\n__author__='Ka-Ping Yee '\n\n\nif sys.platform in ('win32','darwin','emscripten','wasi'):\n _AIX=_LINUX=False\nelse :\n import platform\n _platform_system=platform.system()\n _AIX=_platform_system =='AIX'\n _LINUX=_platform_system =='Linux'\n \n_MAC_DELIM=b':'\n_MAC_OMITS_LEADING_ZEROES=False\nif _AIX:\n _MAC_DELIM=b'.'\n _MAC_OMITS_LEADING_ZEROES=True\n \nRESERVED_NCS,RFC_4122,RESERVED_MICROSOFT,RESERVED_FUTURE=[\n'reserved for NCS compatibility','specified in RFC 4122',\n'reserved for Microsoft compatibility','reserved for future definition']\n\nint_=int\nbytes_=bytes\n\n\n@_simple_enum(Enum)\nclass SafeUUID:\n safe=0\n unsafe=-1\n unknown=None\n \n \nclass UUID:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __slots__=('int','is_safe','__weakref__')\n \n def __init__(self,hex=None ,bytes=None ,bytes_le=None ,fields=None ,\n int=None ,version=None ,\n *,is_safe=SafeUUID.unknown):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if [hex,bytes,bytes_le,fields,int].count(None )!=4:\n raise TypeError('one of the hex, bytes, bytes_le, fields, '\n 'or int arguments must be given')\n if hex is not None :\n hex=hex.replace('urn:','').replace('uuid:','')\n hex=hex.strip('{}').replace('-','')\n if len(hex)!=32:\n raise ValueError('badly formed hexadecimal UUID string')\n int=int_(hex,16)\n if bytes_le is not None :\n if len(bytes_le)!=16:\n raise ValueError('bytes_le is not a 16-char string')\n bytes=(bytes_le[4 -1::-1]+bytes_le[6 -1:4 -1:-1]+\n bytes_le[8 -1:6 -1:-1]+bytes_le[8:])\n if bytes is not None :\n if len(bytes)!=16:\n raise ValueError('bytes is not a 16-char string')\n assert isinstance(bytes,bytes_),repr(bytes)\n int=int_.from_bytes(bytes)\n if fields is not None :\n if len(fields)!=6:\n raise ValueError('fields is not a 6-tuple')\n (time_low,time_mid,time_hi_version,\n clock_seq_hi_variant,clock_seq_low,node)=fields\n if not 0 <=time_low <1 <<32:\n raise ValueError('field 1 out of range (need a 32-bit value)')\n if not 0 <=time_mid <1 <<16:\n raise ValueError('field 2 out of range (need a 16-bit value)')\n if not 0 <=time_hi_version <1 <<16:\n raise ValueError('field 3 out of range (need a 16-bit value)')\n if not 0 <=clock_seq_hi_variant <1 <<8:\n raise ValueError('field 4 out of range (need an 8-bit value)')\n if not 0 <=clock_seq_low <1 <<8:\n raise ValueError('field 5 out of range (need an 8-bit value)')\n if not 0 <=node <1 <<48:\n raise ValueError('field 6 out of range (need a 48-bit value)')\n clock_seq=(clock_seq_hi_variant <<8)|clock_seq_low\n int=((time_low <<96)|(time_mid <<80)|\n (time_hi_version <<64)|(clock_seq <<48)|node)\n if int is not None :\n if not 0 <=int <1 <<128:\n raise ValueError('int is out of range (need a 128-bit value)')\n if version is not None :\n if not 1 <=version <=5:\n raise ValueError('illegal version number')\n \n int &=~(0xc000 <<48)\n int |=0x8000 <<48\n \n int &=~(0xf000 <<64)\n int |=version <<76\n object.__setattr__(self,'int',int)\n object.__setattr__(self,'is_safe',is_safe)\n \n def __getstate__(self):\n d={'int':self.int}\n if self.is_safe !=SafeUUID.unknown:\n \n \n d['is_safe']=self.is_safe.value\n return d\n \n def __setstate__(self,state):\n object.__setattr__(self,'int',state['int'])\n \n object.__setattr__(self,'is_safe',\n SafeUUID(state['is_safe'])\n if 'is_safe'in state else SafeUUID.unknown)\n \n def __eq__(self,other):\n if isinstance(other,UUID):\n return self.int ==other.int\n return NotImplemented\n \n \n \n \n def __lt__(self,other):\n if isinstance(other,UUID):\n return self.int other.int\n return NotImplemented\n \n def __le__(self,other):\n if isinstance(other,UUID):\n return self.int <=other.int\n return NotImplemented\n \n def __ge__(self,other):\n if isinstance(other,UUID):\n return self.int >=other.int\n return NotImplemented\n \n def __hash__(self):\n return hash(self.int)\n \n def __int__(self):\n return self.int\n \n def __repr__(self):\n return '%s(%r)'%(self.__class__.__name__,str(self))\n \n def __setattr__(self,name,value):\n raise TypeError('UUID objects are immutable')\n \n def __str__(self):\n hex='%032x'%self.int\n return '%s-%s-%s-%s-%s'%(\n hex[:8],hex[8:12],hex[12:16],hex[16:20],hex[20:])\n \n @property\n def bytes(self):\n return self.int.to_bytes(16)\n \n @property\n def bytes_le(self):\n bytes=self.bytes\n return (bytes[4 -1::-1]+bytes[6 -1:4 -1:-1]+bytes[8 -1:6 -1:-1]+\n bytes[8:])\n \n @property\n def fields(self):\n return (self.time_low,self.time_mid,self.time_hi_version,\n self.clock_seq_hi_variant,self.clock_seq_low,self.node)\n \n @property\n def time_low(self):\n return self.int >>96\n \n @property\n def time_mid(self):\n return (self.int >>80)&0xffff\n \n @property\n def time_hi_version(self):\n return (self.int >>64)&0xffff\n \n @property\n def clock_seq_hi_variant(self):\n return (self.int >>56)&0xff\n \n @property\n def clock_seq_low(self):\n return (self.int >>48)&0xff\n \n @property\n def time(self):\n return (((self.time_hi_version&0x0fff)<<48)|\n (self.time_mid <<32)|self.time_low)\n \n @property\n def clock_seq(self):\n return (((self.clock_seq_hi_variant&0x3f)<<8)|\n self.clock_seq_low)\n \n @property\n def node(self):\n return self.int&0xffffffffffff\n \n @property\n def hex(self):\n return '%032x'%self.int\n \n @property\n def urn(self):\n return 'urn:uuid:'+str(self)\n \n @property\n def variant(self):\n if not self.int&(0x8000 <<48):\n return RESERVED_NCS\n elif not self.int&(0x4000 <<48):\n return RFC_4122\n elif not self.int&(0x2000 <<48):\n return RESERVED_MICROSOFT\n else :\n return RESERVED_FUTURE\n \n @property\n def version(self):\n \n if self.variant ==RFC_4122:\n return int((self.int >>76)&0xf)\n \n \ndef _get_command_stdout(command,*args):\n import io,os,shutil,subprocess\n \n try :\n path_dirs=os.environ.get('PATH',os.defpath).split(os.pathsep)\n path_dirs.extend(['/sbin','/usr/sbin'])\n executable=shutil.which(command,path=os.pathsep.join(path_dirs))\n if executable is None :\n return None\n \n \n \n env=dict(os.environ)\n env['LC_ALL']='C'\n \n if args !=('',):\n command=(executable,*args)\n else :\n command=(executable,)\n proc=subprocess.Popen(command,\n stdout=subprocess.PIPE,\n stderr=subprocess.DEVNULL,\n env=env)\n if not proc:\n return None\n stdout,stderr=proc.communicate()\n return io.BytesIO(stdout)\n except (OSError,subprocess.SubprocessError):\n return None\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \ndef _is_universal(mac):\n return not (mac&(1 <<41))\n \n \ndef _find_mac_near_keyword(command,args,keywords,get_word_index):\n ''\n\n\n\n\n\n\n \n stdout=_get_command_stdout(command,args)\n if stdout is None :\n return None\n \n first_local_mac=None\n for line in stdout:\n words=line.lower().rstrip().split()\n for i in range(len(words)):\n if words[i]in keywords:\n try :\n word=words[get_word_index(i)]\n mac=int(word.replace(_MAC_DELIM,b''),16)\n except (ValueError,IndexError):\n \n \n \n \n \n pass\n else :\n if _is_universal(mac):\n return mac\n first_local_mac=first_local_mac or mac\n return first_local_mac or None\n \n \ndef _parse_mac(word):\n\n\n\n\n\n\n parts=word.split(_MAC_DELIM)\n if len(parts)!=6:\n return\n if _MAC_OMITS_LEADING_ZEROES:\n \n \n \n \n if not all(1 <=len(part)<=2 for part in parts):\n return\n hexstr=b''.join(part.rjust(2,b'0')for part in parts)\n else :\n if not all(len(part)==2 for part in parts):\n return\n hexstr=b''.join(parts)\n try :\n return int(hexstr,16)\n except ValueError:\n return\n \n \ndef _find_mac_under_heading(command,args,heading):\n ''\n\n\n\n\n \n stdout=_get_command_stdout(command,args)\n if stdout is None :\n return None\n \n keywords=stdout.readline().rstrip().split()\n try :\n column_index=keywords.index(heading)\n except ValueError:\n return None\n \n first_local_mac=None\n for line in stdout:\n words=line.rstrip().split()\n try :\n word=words[column_index]\n except IndexError:\n continue\n \n mac=_parse_mac(word)\n if mac is None :\n continue\n if _is_universal(mac):\n return mac\n if first_local_mac is None :\n first_local_mac=mac\n \n return first_local_mac\n \n \n \n \ndef _ifconfig_getnode():\n ''\n \n keywords=(b'hwaddr',b'ether',b'address:',b'lladdr')\n for args in ('','-a','-av'):\n mac=_find_mac_near_keyword('ifconfig',args,keywords,lambda i:i+1)\n if mac:\n return mac\n return None\n \ndef _ip_getnode():\n ''\n \n mac=_find_mac_near_keyword('ip','link',[b'link/ether'],lambda i:i+1)\n if mac:\n return mac\n return None\n \ndef _arp_getnode():\n ''\n import os,socket\n if not hasattr(socket,\"gethostbyname\"):\n return None\n try :\n ip_addr=socket.gethostbyname(socket.gethostname())\n except OSError:\n return None\n \n \n mac=_find_mac_near_keyword('arp','-an',[os.fsencode(ip_addr)],lambda i:-1)\n if mac:\n return mac\n \n \n mac=_find_mac_near_keyword('arp','-an',[os.fsencode(ip_addr)],lambda i:i+1)\n if mac:\n return mac\n \n \n mac=_find_mac_near_keyword('arp','-an',[os.fsencode('(%s)'%ip_addr)],\n lambda i:i+2)\n \n if mac:\n return mac\n return None\n \ndef _lanscan_getnode():\n ''\n \n return _find_mac_near_keyword('lanscan','-ai',[b'lan0'],lambda i:0)\n \ndef _netstat_getnode():\n ''\n \n return _find_mac_under_heading('netstat','-ian',b'Address')\n \ndef _ipconfig_getnode():\n ''\n \n return _windll_getnode()\n \ndef _netbios_getnode():\n ''\n \n return _windll_getnode()\n \n \n \ntry :\n import _uuid\n _generate_time_safe=getattr(_uuid,\"generate_time_safe\",None )\n _UuidCreate=getattr(_uuid,\"UuidCreate\",None )\n _has_uuid_generate_time_safe=_uuid.has_uuid_generate_time_safe\nexcept ImportError:\n _uuid=None\n _generate_time_safe=None\n _UuidCreate=None\n _has_uuid_generate_time_safe=None\n \n \ndef _load_system_functions():\n ''\n \n \ndef _unix_getnode():\n ''\n if _generate_time_safe:\n uuid_time,_=_generate_time_safe()\n return UUID(bytes=uuid_time).node\n \ndef _windll_getnode():\n ''\n if _UuidCreate:\n uuid_bytes=_UuidCreate()\n return UUID(bytes_le=uuid_bytes).node\n \ndef _random_getnode():\n ''\n \n \n \n \n \n \n \n \n \n \n import random\n return random.getrandbits(48)|(1 <<40)\n \n \n \n \n \n \n \n \nif _LINUX:\n _OS_GETTERS=[_ip_getnode,_ifconfig_getnode]\nelif sys.platform =='darwin':\n _OS_GETTERS=[_ifconfig_getnode,_arp_getnode,_netstat_getnode]\nelif sys.platform =='win32':\n\n _OS_GETTERS=[]\nelif _AIX:\n _OS_GETTERS=[_netstat_getnode]\nelse :\n _OS_GETTERS=[_ifconfig_getnode,_ip_getnode,_arp_getnode,\n _netstat_getnode,_lanscan_getnode]\nif os.name =='posix':\n _GETTERS=[_unix_getnode]+_OS_GETTERS\nelif os.name =='nt':\n _GETTERS=[_windll_getnode]+_OS_GETTERS\nelse :\n _GETTERS=_OS_GETTERS\n \n_node=None\n\ndef getnode():\n ''\n\n\n\n\n\n \n global _node\n if _node is not None :\n return _node\n \n for getter in _GETTERS+[_random_getnode]:\n try :\n _node=getter()\n except :\n continue\n if (_node is not None )and (0 <=_node <(1 <<48)):\n return _node\n assert False ,'_random_getnode() returned invalid value: {}'.format(_node)\n \n \n_last_timestamp=None\n\ndef uuid1(node=None ,clock_seq=None ):\n ''\n\n\n \n \n \n \n if _generate_time_safe is not None and node is clock_seq is None :\n uuid_time,safely_generated=_generate_time_safe()\n try :\n is_safe=SafeUUID(safely_generated)\n except ValueError:\n is_safe=SafeUUID.unknown\n return UUID(bytes=uuid_time,is_safe=is_safe)\n \n global _last_timestamp\n import time\n nanoseconds=time.time_ns()\n \n \n timestamp=nanoseconds //100+0x01b21dd213814000\n if _last_timestamp is not None and timestamp <=_last_timestamp:\n timestamp=_last_timestamp+1\n _last_timestamp=timestamp\n if clock_seq is None :\n import random\n clock_seq=random.getrandbits(14)\n time_low=timestamp&0xffffffff\n time_mid=(timestamp >>32)&0xffff\n time_hi_version=(timestamp >>48)&0x0fff\n clock_seq_low=clock_seq&0xff\n clock_seq_hi_variant=(clock_seq >>8)&0x3f\n if node is None :\n node=getnode()\n return UUID(fields=(time_low,time_mid,time_hi_version,\n clock_seq_hi_variant,clock_seq_low,node),version=1)\n \ndef uuid3(namespace,name):\n ''\n if isinstance(name,str):\n name=bytes(name,\"utf-8\")\n from hashlib import md5\n digest=md5(\n namespace.bytes+name,\n usedforsecurity=False\n ).digest()\n return UUID(bytes=digest[:16],version=3)\n \ndef uuid4():\n ''\n return UUID(bytes=os.urandom(16),version=4)\n \ndef uuid5(namespace,name):\n ''\n if isinstance(name,str):\n name=bytes(name,\"utf-8\")\n from hashlib import sha1\n hash=sha1(namespace.bytes+name).digest()\n return UUID(bytes=hash[:16],version=5)\n \n \ndef main():\n ''\n uuid_funcs={\n \"uuid1\":uuid1,\n \"uuid3\":uuid3,\n \"uuid4\":uuid4,\n \"uuid5\":uuid5\n }\n uuid_namespace_funcs=(\"uuid3\",\"uuid5\")\n namespaces={\n \"@dns\":NAMESPACE_DNS,\n \"@url\":NAMESPACE_URL,\n \"@oid\":NAMESPACE_OID,\n \"@x500\":NAMESPACE_X500\n }\n \n import argparse\n parser=argparse.ArgumentParser(\n description=\"Generates a uuid using the selected uuid function.\")\n parser.add_argument(\"-u\",\"--uuid\",choices=uuid_funcs.keys(),default=\"uuid4\",\n help=\"The function to use to generate the uuid. \"\n \"By default uuid4 function is used.\")\n parser.add_argument(\"-n\",\"--namespace\",\n help=\"The namespace is a UUID, or '@ns' where 'ns' is a \"\n \"well-known predefined UUID addressed by namespace name. \"\n \"Such as @dns, @url, @oid, and @x500. \"\n \"Only required for uuid3/uuid5 functions.\")\n parser.add_argument(\"-N\",\"--name\",\n help=\"The name used as part of generating the uuid. \"\n \"Only required for uuid3/uuid5 functions.\")\n \n args=parser.parse_args()\n uuid_func=uuid_funcs[args.uuid]\n namespace=args.namespace\n name=args.name\n \n if args.uuid in uuid_namespace_funcs:\n if not namespace or not name:\n parser.error(\n \"Incorrect number of arguments. \"\n f\"{args.uuid} requires a namespace and a name. \"\n \"Run 'python -m uuid -h' for more information.\"\n )\n namespace=namespaces[namespace]if namespace in namespaces else UUID(namespace)\n print(uuid_func(namespace,name))\n else :\n print(uuid_func())\n \n \n \n \nNAMESPACE_DNS=UUID('6ba7b810-9dad-11d1-80b4-00c04fd430c8')\nNAMESPACE_URL=UUID('6ba7b811-9dad-11d1-80b4-00c04fd430c8')\nNAMESPACE_OID=UUID('6ba7b812-9dad-11d1-80b4-00c04fd430c8')\nNAMESPACE_X500=UUID('6ba7b814-9dad-11d1-80b4-00c04fd430c8')\n\nif __name__ ==\"__main__\":\n main()\n", ["_uuid", "argparse", "enum", "hashlib", "io", "os", "platform", "random", "shutil", "socket", "subprocess", "sys", "time"]], "VFS_import": [".py", "import os\nimport sys\nfrom browser import doc\n\n\n\n\n\n\nVFS=dict(JSObject(__BRYTHON__.py_VFS))\nclass VFSModuleFinder:\n def __init__(self,path_entry):\n print(\"in VFSModuleFinder\")\n if path_entry.startswith('/libs')or path_entry.startswith('/Lib'):\n self.path_entry=path_entry\n else :\n raise ImportError()\n \n def __str__(self):\n return '<%s for \"%s\">'%(self.__class__.__name__,self.path_entry)\n \n def find_module(self,fullname,path=None ):\n path=path or self.path_entry\n \n for _ext in ['js','pyj','py']:\n _filepath=os.path.join(self.path_entry,'%s.%s'%(fullname,_ext))\n if _filepath in VFS:\n print(\"module found at %s:%s\"%(_filepath,fullname))\n return VFSModuleLoader(_filepath,fullname)\n \n print('module %s not found'%fullname)\n raise ImportError()\n return None\n \nclass VFSModuleLoader:\n ''\n \n def __init__(self,filepath,name):\n self._filepath=filepath\n self._name=name\n \n def get_source(self):\n if self._filepath in VFS:\n return JSObject(readFromVFS(self._filepath))\n \n raise ImportError('could not find source for %s'%fullname)\n \n def is_package(self):\n return '.'in self._name\n \n def load_module(self):\n if self._name in sys.modules:\n \n mod=sys.modules[self._name]\n return mod\n \n _src=self.get_source()\n if self._filepath.endswith('.js'):\n mod=JSObject(import_js_module(_src,self._filepath,self._name))\n elif self._filepath.endswith('.py'):\n mod=JSObject(import_py_module(_src,self._filepath,self._name))\n elif self._filepath.endswith('.pyj'):\n mod=JSObject(import_pyj_module(_src,self._filepath,self._name))\n else :\n raise ImportError('Invalid Module: %s'%self._filepath)\n \n \n mod.__file__=self._filepath\n mod.__name__=self._name\n mod.__path__=os.path.abspath(self._filepath)\n mod.__loader__=self\n mod.__package__='.'.join(self._name.split('.')[:-1])\n \n if self.is_package():\n print('adding path for package')\n \n \n mod.__path__=[self.path_entry]\n else :\n print('imported as regular module')\n \n print('creating a new module object for \"%s\"'%self._name)\n sys.modules.setdefault(self._name,mod)\n JSObject(__BRYTHON__.imported)[self._name]=mod\n \n return mod\n \nJSObject(__BRYTHON__.path_hooks.insert(0,VFSModuleFinder))\n", ["browser", "os", "sys"]], "warnings": [".py", "''\n\nimport sys\n\n\n__all__=[\"warn\",\"warn_explicit\",\"showwarning\",\n\"formatwarning\",\"filterwarnings\",\"simplefilter\",\n\"resetwarnings\",\"catch_warnings\"]\n\ndef showwarning(message,category,filename,lineno,file=None ,line=None ):\n ''\n msg=WarningMessage(message,category,filename,lineno,file,line)\n _showwarnmsg_impl(msg)\n \ndef formatwarning(message,category,filename,lineno,line=None ):\n ''\n msg=WarningMessage(message,category,filename,lineno,None ,line)\n return _formatwarnmsg_impl(msg)\n \ndef _showwarnmsg_impl(msg):\n file=msg.file\n if file is None :\n file=sys.stderr\n if file is None :\n \n \n return\n text=_formatwarnmsg(msg)\n try :\n file.write(text)\n except OSError:\n \n pass\n \ndef _formatwarnmsg_impl(msg):\n category=msg.category.__name__\n s=f\"{msg.filename}:{msg.lineno}: {category}: {msg.message}\\n\"\n \n if msg.line is None :\n try :\n import linecache\n line=linecache.getline(msg.filename,msg.lineno)\n except Exception:\n \n \n line=None\n linecache=None\n else :\n line=msg.line\n if line:\n line=line.strip()\n s +=\" %s\\n\"%line\n \n if msg.source is not None :\n try :\n import tracemalloc\n \n \n except Exception:\n \n tracing=True\n tb=None\n else :\n tracing=tracemalloc.is_tracing()\n try :\n tb=tracemalloc.get_object_traceback(msg.source)\n except Exception:\n \n \n tb=None\n \n if tb is not None :\n s +='Object allocated at (most recent call last):\\n'\n for frame in tb:\n s +=(' File \"%s\", lineno %s\\n'\n %(frame.filename,frame.lineno))\n \n try :\n if linecache is not None :\n line=linecache.getline(frame.filename,frame.lineno)\n else :\n line=None\n except Exception:\n line=None\n if line:\n line=line.strip()\n s +=' %s\\n'%line\n elif not tracing:\n s +=(f'{category}: Enable tracemalloc to get the object '\n f'allocation traceback\\n')\n return s\n \n \n_showwarning_orig=showwarning\n\ndef _showwarnmsg(msg):\n ''\n try :\n sw=showwarning\n except NameError:\n pass\n else :\n if sw is not _showwarning_orig:\n \n if not callable(sw):\n raise TypeError(\"warnings.showwarning() must be set to a \"\n \"function or method\")\n \n sw(msg.message,msg.category,msg.filename,msg.lineno,\n msg.file,msg.line)\n return\n _showwarnmsg_impl(msg)\n \n \n_formatwarning_orig=formatwarning\n\ndef _formatwarnmsg(msg):\n ''\n try :\n fw=formatwarning\n except NameError:\n pass\n else :\n if fw is not _formatwarning_orig:\n \n return fw(msg.message,msg.category,\n msg.filename,msg.lineno,msg.line)\n return _formatwarnmsg_impl(msg)\n \ndef filterwarnings(action,message=\"\",category=Warning,module=\"\",lineno=0,\nappend=False ):\n ''\n\n\n\n\n\n\n\n\n \n assert action in (\"error\",\"ignore\",\"always\",\"default\",\"module\",\n \"once\"),\"invalid action: %r\"%(action,)\n assert isinstance(message,str),\"message must be a string\"\n assert isinstance(category,type),\"category must be a class\"\n assert issubclass(category,Warning),\"category must be a Warning subclass\"\n assert isinstance(module,str),\"module must be a string\"\n assert isinstance(lineno,int)and lineno >=0,\\\n \"lineno must be an int >= 0\"\n \n if message or module:\n import re\n \n if message:\n message=re.compile(message,re.I)\n else :\n message=None\n if module:\n module=re.compile(module)\n else :\n module=None\n \n _add_filter(action,message,category,module,lineno,append=append)\n \ndef simplefilter(action,category=Warning,lineno=0,append=False ):\n ''\n\n\n\n\n\n\n\n \n assert action in (\"error\",\"ignore\",\"always\",\"default\",\"module\",\n \"once\"),\"invalid action: %r\"%(action,)\n assert isinstance(lineno,int)and lineno >=0,\\\n \"lineno must be an int >= 0\"\n _add_filter(action,None ,category,None ,lineno,append=append)\n \ndef _add_filter(*item,append):\n\n\n if not append:\n try :\n filters.remove(item)\n except ValueError:\n pass\n filters.insert(0,item)\n else :\n if item not in filters:\n filters.append(item)\n _filters_mutated()\n \ndef resetwarnings():\n ''\n filters[:]=[]\n _filters_mutated()\n \nclass _OptionError(Exception):\n ''\n pass\n \n \ndef _processoptions(args):\n for arg in args:\n try :\n _setoption(arg)\n except _OptionError as msg:\n print(\"Invalid -W option ignored:\",msg,file=sys.stderr)\n \n \ndef _setoption(arg):\n parts=arg.split(':')\n if len(parts)>5:\n raise _OptionError(\"too many fields (max 5): %r\"%(arg,))\n while len(parts)<5:\n parts.append('')\n action,message,category,module,lineno=[s.strip()\n for s in parts]\n action=_getaction(action)\n category=_getcategory(category)\n if message or module:\n import re\n if message:\n message=re.escape(message)\n if module:\n module=re.escape(module)+r'\\Z'\n if lineno:\n try :\n lineno=int(lineno)\n if lineno <0:\n raise ValueError\n except (ValueError,OverflowError):\n raise _OptionError(\"invalid lineno %r\"%(lineno,))from None\n else :\n lineno=0\n filterwarnings(action,message,category,module,lineno)\n \n \ndef _getaction(action):\n if not action:\n return \"default\"\n if action ==\"all\":return \"always\"\n for a in ('default','always','ignore','module','once','error'):\n if a.startswith(action):\n return a\n raise _OptionError(\"invalid action: %r\"%(action,))\n \n \ndef _getcategory(category):\n if not category:\n return Warning\n if '.'not in category:\n import builtins as m\n klass=category\n else :\n module,_,klass=category.rpartition('.')\n try :\n m=__import__(module,None ,None ,[klass])\n except ImportError:\n raise _OptionError(\"invalid module name: %r\"%(module,))from None\n try :\n cat=getattr(m,klass)\n except AttributeError:\n raise _OptionError(\"unknown warning category: %r\"%(category,))from None\n if not issubclass(cat,Warning):\n raise _OptionError(\"invalid warning category: %r\"%(category,))\n return cat\n \n \ndef _is_internal_filename(filename):\n return 'importlib'in filename and '_bootstrap'in filename\n \n \ndef _is_filename_to_skip(filename,skip_file_prefixes):\n return any(filename.startswith(prefix)for prefix in skip_file_prefixes)\n \n \ndef _is_internal_frame(frame):\n ''\n return _is_internal_filename(frame.f_code.co_filename)\n \n \ndef _next_external_frame(frame,skip_file_prefixes):\n ''\n frame=frame.f_back\n while frame is not None and (\n _is_internal_filename(filename :=frame.f_code.co_filename)or\n _is_filename_to_skip(filename,skip_file_prefixes)):\n frame=frame.f_back\n return frame\n \n \n \ndef warn(message,category=None ,stacklevel=1,source=None ,\n*,skip_file_prefixes=()):\n ''\n \n if isinstance(message,Warning):\n category=message.__class__\n \n if category is None :\n category=UserWarning\n if not (isinstance(category,type)and issubclass(category,Warning)):\n raise TypeError(\"category must be a Warning subclass, \"\n \"not '{:s}'\".format(type(category).__name__))\n if not isinstance(skip_file_prefixes,tuple):\n \n raise TypeError('skip_file_prefixes must be a tuple of strs.')\n if skip_file_prefixes:\n stacklevel=max(2,stacklevel)\n \n try :\n if stacklevel <=1 or _is_internal_frame(sys._getframe(1)):\n \n \n frame=sys._getframe(stacklevel)\n else :\n frame=sys._getframe(1)\n \n for x in range(stacklevel -1):\n frame=_next_external_frame(frame,skip_file_prefixes)\n if frame is None :\n raise ValueError\n except ValueError:\n globals=sys.__dict__\n filename=\"sys\"\n lineno=1\n else :\n globals=frame.f_globals\n filename=frame.f_code.co_filename\n lineno=frame.f_lineno\n if '__name__'in globals:\n module=globals['__name__']\n else :\n module=\"\"\n registry=globals.setdefault(\"__warningregistry__\",{})\n warn_explicit(message,category,filename,lineno,module,registry,\n globals,source)\n \ndef warn_explicit(message,category,filename,lineno,\nmodule=None ,registry=None ,module_globals=None ,\nsource=None ):\n lineno=int(lineno)\n if module is None :\n module=filename or \"\"\n if module[-3:].lower()==\".py\":\n module=module[:-3]\n if registry is None :\n registry={}\n if registry.get('version',0)!=_filters_version:\n registry.clear()\n registry['version']=_filters_version\n if isinstance(message,Warning):\n text=str(message)\n category=message.__class__\n else :\n text=message\n message=category(message)\n key=(text,category,lineno)\n \n if registry.get(key):\n return\n \n for item in filters:\n action,msg,cat,mod,ln=item\n if ((msg is None or msg.match(text))and\n issubclass(category,cat)and\n (mod is None or mod.match(module))and\n (ln ==0 or lineno ==ln)):\n break\n else :\n action=defaultaction\n \n if action ==\"ignore\":\n return\n \n \n \n import linecache\n linecache.getlines(filename,module_globals)\n \n if action ==\"error\":\n raise message\n \n if action ==\"once\":\n registry[key]=1\n oncekey=(text,category)\n if onceregistry.get(oncekey):\n return\n onceregistry[oncekey]=1\n elif action ==\"always\":\n pass\n elif action ==\"module\":\n registry[key]=1\n altkey=(text,category,0)\n if registry.get(altkey):\n return\n registry[altkey]=1\n elif action ==\"default\":\n registry[key]=1\n else :\n \n raise RuntimeError(\n \"Unrecognized action (%r) in warnings.filters:\\n %s\"%\n (action,item))\n \n msg=WarningMessage(message,category,filename,lineno,source)\n _showwarnmsg(msg)\n \n \nclass WarningMessage(object):\n\n _WARNING_DETAILS=(\"message\",\"category\",\"filename\",\"lineno\",\"file\",\n \"line\",\"source\")\n \n def __init__(self,message,category,filename,lineno,file=None ,\n line=None ,source=None ):\n self.message=message\n self.category=category\n self.filename=filename\n self.lineno=lineno\n self.file=file\n self.line=line\n self.source=source\n self._category_name=category.__name__ if category else None\n \n def __str__(self):\n return (\"{message : %r, category : %r, filename : %r, lineno : %s, \"\n \"line : %r}\"%(self.message,self._category_name,\n self.filename,self.lineno,self.line))\n \n \nclass catch_warnings(object):\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,*,record=False ,module=None ,\n action=None ,category=Warning,lineno=0,append=False ):\n ''\n\n\n\n\n\n \n self._record=record\n self._module=sys.modules['warnings']if module is None else module\n self._entered=False\n if action is None :\n self._filter=None\n else :\n self._filter=(action,category,lineno,append)\n \n def __repr__(self):\n args=[]\n if self._record:\n args.append(\"record=True\")\n if self._module is not sys.modules['warnings']:\n args.append(\"module=%r\"%self._module)\n name=type(self).__name__\n return \"%s(%s)\"%(name,\", \".join(args))\n \n def __enter__(self):\n if self._entered:\n raise RuntimeError(\"Cannot enter %r twice\"%self)\n self._entered=True\n self._filters=self._module.filters\n self._module.filters=self._filters[:]\n self._module._filters_mutated()\n self._showwarning=self._module.showwarning\n self._showwarnmsg_impl=self._module._showwarnmsg_impl\n if self._filter is not None :\n simplefilter(*self._filter)\n if self._record:\n log=[]\n self._module._showwarnmsg_impl=log.append\n \n \n self._module.showwarning=self._module._showwarning_orig\n return log\n else :\n return None\n \n def __exit__(self,*exc_info):\n if not self._entered:\n raise RuntimeError(\"Cannot exit %r without entering first\"%self)\n self._module.filters=self._filters\n self._module._filters_mutated()\n self._module.showwarning=self._showwarning\n self._module._showwarnmsg_impl=self._showwarnmsg_impl\n \n \n_DEPRECATED_MSG=\"{name!r} is deprecated and slated for removal in Python {remove}\"\n\ndef _deprecated(name,message=_DEPRECATED_MSG,*,remove,_version=sys.version_info):\n ''\n\n\n\n\n\n\n\n \n remove_formatted=f\"{remove[0]}.{remove[1]}\"\n if (_version[:2]>remove)or (_version[:2]==remove and _version[3]!=\"alpha\"):\n msg=f\"{name !r} was slated for removal after Python {remove_formatted} alpha\"\n raise RuntimeError(msg)\n else :\n msg=message.format(name=name,remove=remove_formatted)\n warn(msg,DeprecationWarning,stacklevel=3)\n \n \n \ndef _warn_unawaited_coroutine(coro):\n msg_lines=[\n f\"coroutine '{coro.__qualname__}' was never awaited\\n\"\n ]\n if coro.cr_origin is not None :\n import linecache,traceback\n def extract():\n for filename,lineno,funcname in reversed(coro.cr_origin):\n line=linecache.getline(filename,lineno)\n yield (filename,lineno,funcname,line)\n msg_lines.append(\"Coroutine created at (most recent call last)\\n\")\n msg_lines +=traceback.format_list(list(extract()))\n msg=\"\".join(msg_lines).rstrip(\"\\n\")\n \n \n \n \n \n \n warn(msg,category=RuntimeWarning,stacklevel=2,source=coro)\n \n \n \n \n \n \n \n \n \n \ntry :\n from _warnings import (filters,_defaultaction,_onceregistry,\n warn,warn_explicit,_filters_mutated)\n defaultaction=_defaultaction\n onceregistry=_onceregistry\n _warnings_defaults=True\nexcept ImportError:\n filters=[]\n defaultaction=\"default\"\n onceregistry={}\n \n _filters_version=1\n \n def _filters_mutated():\n global _filters_version\n _filters_version +=1\n \n _warnings_defaults=False\n \n \n \n_processoptions(sys.warnoptions)\nif not _warnings_defaults:\n\n if not hasattr(sys,'gettotalrefcount'):\n filterwarnings(\"default\",category=DeprecationWarning,\n module=\"__main__\",append=1)\n simplefilter(\"ignore\",category=DeprecationWarning,append=1)\n simplefilter(\"ignore\",category=PendingDeprecationWarning,append=1)\n simplefilter(\"ignore\",category=ImportWarning,append=1)\n simplefilter(\"ignore\",category=ResourceWarning,append=1)\n \ndel _warnings_defaults\n", ["_warnings", "builtins", "linecache", "re", "sys", "traceback", "tracemalloc"]], "weakref": [".py", "''\n\n\n\n\n\n\n\n\n\n\nfrom _weakref import (\ngetweakrefcount,\ngetweakrefs,\nref,\nproxy,\nCallableProxyType,\nProxyType,\nReferenceType,\n_remove_dead_weakref)\n\nfrom _weakrefset import WeakSet,_IterationGuard\n\nimport _collections_abc\nimport sys\nimport itertools\n\nProxyTypes=(ProxyType,CallableProxyType)\n\n__all__=[\"ref\",\"proxy\",\"getweakrefcount\",\"getweakrefs\",\n\"WeakKeyDictionary\",\"ReferenceType\",\"ProxyType\",\n\"CallableProxyType\",\"ProxyTypes\",\"WeakValueDictionary\",\n\"WeakSet\",\"WeakMethod\",\"finalize\"]\n\n\n_collections_abc.MutableSet.register(WeakSet)\n\nclass WeakMethod(ref):\n ''\n\n\n \n \n __slots__=\"_func_ref\",\"_meth_type\",\"_alive\",\"__weakref__\"\n \n def __new__(cls,meth,callback=None ):\n try :\n obj=meth.__self__\n func=meth.__func__\n except AttributeError:\n raise TypeError(\"argument should be a bound method, not {}\"\n .format(type(meth)))from None\n def _cb(arg):\n \n \n self=self_wr()\n if self._alive:\n self._alive=False\n if callback is not None :\n callback(self)\n self=ref.__new__(cls,obj,_cb)\n self._func_ref=ref(func,_cb)\n self._meth_type=type(meth)\n self._alive=True\n self_wr=ref(self)\n return self\n \n def __call__(self):\n obj=super().__call__()\n func=self._func_ref()\n if obj is None or func is None :\n return None\n return self._meth_type(func,obj)\n \n def __eq__(self,other):\n if isinstance(other,WeakMethod):\n if not self._alive or not other._alive:\n return self is other\n return ref.__eq__(self,other)and self._func_ref ==other._func_ref\n return NotImplemented\n \n def __ne__(self,other):\n if isinstance(other,WeakMethod):\n if not self._alive or not other._alive:\n return self is not other\n return ref.__ne__(self,other)or self._func_ref !=other._func_ref\n return NotImplemented\n \n __hash__=ref.__hash__\n \n \nclass WeakValueDictionary(_collections_abc.MutableMapping):\n ''\n\n\n\n \n \n \n \n \n \n \n def __init__(self,other=(),/,**kw):\n def remove(wr,selfref=ref(self),_atomic_removal=_remove_dead_weakref):\n self=selfref()\n if self is not None :\n if self._iterating:\n self._pending_removals.append(wr.key)\n else :\n \n \n _atomic_removal(self.data,wr.key)\n self._remove=remove\n \n self._pending_removals=[]\n self._iterating=set()\n self.data={}\n self.update(other,**kw)\n \n def _commit_removals(self,_atomic_removal=_remove_dead_weakref):\n pop=self._pending_removals.pop\n d=self.data\n \n \n while True :\n try :\n key=pop()\n except IndexError:\n return\n _atomic_removal(d,key)\n \n def __getitem__(self,key):\n if self._pending_removals:\n self._commit_removals()\n o=self.data[key]()\n if o is None :\n raise KeyError(key)\n else :\n return o\n \n def __delitem__(self,key):\n if self._pending_removals:\n self._commit_removals()\n del self.data[key]\n \n def __len__(self):\n if self._pending_removals:\n self._commit_removals()\n return len(self.data)\n \n def __contains__(self,key):\n if self._pending_removals:\n self._commit_removals()\n try :\n o=self.data[key]()\n except KeyError:\n return False\n return o is not None\n \n def __repr__(self):\n return \"<%s at %#x>\"%(self.__class__.__name__,id(self))\n \n def __setitem__(self,key,value):\n if self._pending_removals:\n self._commit_removals()\n self.data[key]=KeyedRef(value,self._remove,key)\n \n def copy(self):\n if self._pending_removals:\n self._commit_removals()\n new=WeakValueDictionary()\n with _IterationGuard(self):\n for key,wr in self.data.items():\n o=wr()\n if o is not None :\n new[key]=o\n return new\n \n __copy__=copy\n \n def __deepcopy__(self,memo):\n from copy import deepcopy\n if self._pending_removals:\n self._commit_removals()\n new=self.__class__()\n with _IterationGuard(self):\n for key,wr in self.data.items():\n o=wr()\n if o is not None :\n new[deepcopy(key,memo)]=o\n return new\n \n def get(self,key,default=None ):\n if self._pending_removals:\n self._commit_removals()\n try :\n wr=self.data[key]\n except KeyError:\n return default\n else :\n o=wr()\n if o is None :\n \n return default\n else :\n return o\n \n def items(self):\n if self._pending_removals:\n self._commit_removals()\n with _IterationGuard(self):\n for k,wr in self.data.items():\n v=wr()\n if v is not None :\n yield k,v\n \n def keys(self):\n if self._pending_removals:\n self._commit_removals()\n with _IterationGuard(self):\n for k,wr in self.data.items():\n if wr()is not None :\n yield k\n \n __iter__=keys\n \n def itervaluerefs(self):\n ''\n\n\n\n\n\n\n\n \n if self._pending_removals:\n self._commit_removals()\n with _IterationGuard(self):\n yield from self.data.values()\n \n def values(self):\n if self._pending_removals:\n self._commit_removals()\n with _IterationGuard(self):\n for wr in self.data.values():\n obj=wr()\n if obj is not None :\n yield obj\n \n def popitem(self):\n if self._pending_removals:\n self._commit_removals()\n while True :\n key,wr=self.data.popitem()\n o=wr()\n if o is not None :\n return key,o\n \n def pop(self,key,*args):\n if self._pending_removals:\n self._commit_removals()\n try :\n o=self.data.pop(key)()\n except KeyError:\n o=None\n if o is None :\n if args:\n return args[0]\n else :\n raise KeyError(key)\n else :\n return o\n \n def setdefault(self,key,default=None ):\n try :\n o=self.data[key]()\n except KeyError:\n o=None\n if o is None :\n if self._pending_removals:\n self._commit_removals()\n self.data[key]=KeyedRef(default,self._remove,key)\n return default\n else :\n return o\n \n def update(self,other=None ,/,**kwargs):\n if self._pending_removals:\n self._commit_removals()\n d=self.data\n if other is not None :\n if not hasattr(other,\"items\"):\n other=dict(other)\n for key,o in other.items():\n d[key]=KeyedRef(o,self._remove,key)\n for key,o in kwargs.items():\n d[key]=KeyedRef(o,self._remove,key)\n \n def valuerefs(self):\n ''\n\n\n\n\n\n\n\n \n if self._pending_removals:\n self._commit_removals()\n return list(self.data.values())\n \n def __ior__(self,other):\n self.update(other)\n return self\n \n def __or__(self,other):\n if isinstance(other,_collections_abc.Mapping):\n c=self.copy()\n c.update(other)\n return c\n return NotImplemented\n \n def __ror__(self,other):\n if isinstance(other,_collections_abc.Mapping):\n c=self.__class__()\n c.update(other)\n c.update(self)\n return c\n return NotImplemented\n \n \nclass KeyedRef(ref):\n ''\n\n\n\n\n\n\n \n \n __slots__=\"key\",\n \n def __new__(type,ob,callback,key):\n self=ref.__new__(type,ob,callback)\n self.key=key\n return self\n \n def __init__(self,ob,callback,key):\n super().__init__(ob,callback)\n \n \nclass WeakKeyDictionary(_collections_abc.MutableMapping):\n ''\n\n\n\n\n\n\n\n \n \n def __init__(self,dict=None ):\n self.data={}\n def remove(k,selfref=ref(self)):\n self=selfref()\n if self is not None :\n if self._iterating:\n self._pending_removals.append(k)\n else :\n try :\n del self.data[k]\n except KeyError:\n pass\n self._remove=remove\n \n self._pending_removals=[]\n self._iterating=set()\n self._dirty_len=False\n if dict is not None :\n self.update(dict)\n \n def _commit_removals(self):\n \n \n \n \n pop=self._pending_removals.pop\n d=self.data\n while True :\n try :\n key=pop()\n except IndexError:\n return\n \n try :\n del d[key]\n except KeyError:\n pass\n \n def _scrub_removals(self):\n d=self.data\n self._pending_removals=[k for k in self._pending_removals if k in d]\n self._dirty_len=False\n \n def __delitem__(self,key):\n self._dirty_len=True\n del self.data[ref(key)]\n \n def __getitem__(self,key):\n return self.data[ref(key)]\n \n def __len__(self):\n if self._dirty_len and self._pending_removals:\n \n \n self._scrub_removals()\n return len(self.data)-len(self._pending_removals)\n \n def __repr__(self):\n return \"<%s at %#x>\"%(self.__class__.__name__,id(self))\n \n def __setitem__(self,key,value):\n self.data[ref(key,self._remove)]=value\n \n def copy(self):\n new=WeakKeyDictionary()\n with _IterationGuard(self):\n for key,value in self.data.items():\n o=key()\n if o is not None :\n new[o]=value\n return new\n \n __copy__=copy\n \n def __deepcopy__(self,memo):\n from copy import deepcopy\n new=self.__class__()\n with _IterationGuard(self):\n for key,value in self.data.items():\n o=key()\n if o is not None :\n new[o]=deepcopy(value,memo)\n return new\n \n def get(self,key,default=None ):\n return self.data.get(ref(key),default)\n \n def __contains__(self,key):\n try :\n wr=ref(key)\n except TypeError:\n return False\n return wr in self.data\n \n def items(self):\n with _IterationGuard(self):\n for wr,value in self.data.items():\n key=wr()\n if key is not None :\n yield key,value\n \n def keys(self):\n with _IterationGuard(self):\n for wr in self.data:\n obj=wr()\n if obj is not None :\n yield obj\n \n __iter__=keys\n \n def values(self):\n with _IterationGuard(self):\n for wr,value in self.data.items():\n if wr()is not None :\n yield value\n \n def keyrefs(self):\n ''\n\n\n\n\n\n\n\n \n return list(self.data)\n \n def popitem(self):\n self._dirty_len=True\n while True :\n key,value=self.data.popitem()\n o=key()\n if o is not None :\n return o,value\n \n def pop(self,key,*args):\n self._dirty_len=True\n return self.data.pop(ref(key),*args)\n \n def setdefault(self,key,default=None ):\n return self.data.setdefault(ref(key,self._remove),default)\n \n def update(self,dict=None ,/,**kwargs):\n d=self.data\n if dict is not None :\n if not hasattr(dict,\"items\"):\n dict=type({})(dict)\n for key,value in dict.items():\n d[ref(key,self._remove)]=value\n if len(kwargs):\n self.update(kwargs)\n \n def __ior__(self,other):\n self.update(other)\n return self\n \n def __or__(self,other):\n if isinstance(other,_collections_abc.Mapping):\n c=self.copy()\n c.update(other)\n return c\n return NotImplemented\n \n def __ror__(self,other):\n if isinstance(other,_collections_abc.Mapping):\n c=self.__class__()\n c.update(other)\n c.update(self)\n return c\n return NotImplemented\n \n \nclass finalize:\n ''\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n __slots__=()\n _registry={}\n _shutdown=False\n _index_iter=itertools.count()\n _dirty=False\n _registered_with_atexit=False\n \n class _Info:\n __slots__=(\"weakref\",\"func\",\"args\",\"kwargs\",\"atexit\",\"index\")\n \n def __init__(self,obj,func,/,*args,**kwargs):\n if not self._registered_with_atexit:\n \n \n import atexit\n atexit.register(self._exitfunc)\n finalize._registered_with_atexit=True\n info=self._Info()\n info.weakref=ref(obj,self)\n info.func=func\n info.args=args\n info.kwargs=kwargs or None\n info.atexit=True\n info.index=next(self._index_iter)\n self._registry[self]=info\n finalize._dirty=True\n \n def __call__(self,_=None ):\n ''\n \n info=self._registry.pop(self,None )\n if info and not self._shutdown:\n return info.func(*info.args,**(info.kwargs or {}))\n \n def detach(self):\n ''\n \n info=self._registry.get(self)\n obj=info and info.weakref()\n if obj is not None and self._registry.pop(self,None ):\n return (obj,info.func,info.args,info.kwargs or {})\n \n def peek(self):\n ''\n \n info=self._registry.get(self)\n obj=info and info.weakref()\n if obj is not None :\n return (obj,info.func,info.args,info.kwargs or {})\n \n @property\n def alive(self):\n ''\n return self in self._registry\n \n @property\n def atexit(self):\n ''\n info=self._registry.get(self)\n return bool(info)and info.atexit\n \n @atexit.setter\n def atexit(self,value):\n info=self._registry.get(self)\n if info:\n info.atexit=bool(value)\n \n def __repr__(self):\n info=self._registry.get(self)\n obj=info and info.weakref()\n if obj is None :\n return '<%s object at %#x; dead>'%(type(self).__name__,id(self))\n else :\n return '<%s object at %#x; for %r at %#x>'%\\\n (type(self).__name__,id(self),type(obj).__name__,id(obj))\n \n @classmethod\n def _select_for_exit(cls):\n \n L=[(f,i)for (f,i)in cls._registry.items()if i.atexit]\n L.sort(key=lambda item:item[1].index)\n return [f for (f,i)in L]\n \n @classmethod\n def _exitfunc(cls):\n \n \n \n reenable_gc=False\n try :\n if cls._registry:\n import gc\n if gc.isenabled():\n reenable_gc=True\n gc.disable()\n pending=None\n while True :\n if pending is None or finalize._dirty:\n pending=cls._select_for_exit()\n finalize._dirty=False\n if not pending:\n break\n f=pending.pop()\n try :\n \n \n \n \n f()\n except Exception:\n sys.excepthook(*sys.exc_info())\n assert f not in cls._registry\n finally :\n \n finalize._shutdown=True\n if reenable_gc:\n gc.enable()\n", ["_collections_abc", "_weakref", "_weakrefset", "atexit", "copy", "gc", "itertools", "sys"]], "webbrowser": [".py", "\n\nfrom browser import window\n\ndef open(url,new=0,autoraise=True ):\n window.open(url)\n \ndef open_new(url):\n return window.open(url,\"_blank\")\n \ndef open_new_tab(url):\n return open(url)\n \n", ["browser"]], "zipfile": [".py", "''\n\n\n\n\nimport binascii\nimport importlib.util\nimport io\nimport itertools\nimport os\nimport posixpath\nimport shutil\nimport stat\nimport struct\nimport sys\nimport threading\nimport time\nimport contextlib\nimport pathlib\n\ntry :\n import zlib\n crc32=zlib.crc32\nexcept ImportError:\n zlib=None\n crc32=binascii.crc32\n \ntry :\n import bz2\nexcept ImportError:\n bz2=None\n \ntry :\n import lzma\nexcept ImportError:\n lzma=None\n \n__all__=[\"BadZipFile\",\"BadZipfile\",\"error\",\n\"ZIP_STORED\",\"ZIP_DEFLATED\",\"ZIP_BZIP2\",\"ZIP_LZMA\",\n\"is_zipfile\",\"ZipInfo\",\"ZipFile\",\"PyZipFile\",\"LargeZipFile\",\n\"Path\"]\n\nclass BadZipFile(Exception):\n pass\n \n \nclass LargeZipFile(Exception):\n ''\n\n\n \n \nerror=BadZipfile=BadZipFile\n\n\nZIP64_LIMIT=(1 <<31)-1\nZIP_FILECOUNT_LIMIT=(1 <<16)-1\nZIP_MAX_COMMENT=(1 <<16)-1\n\n\nZIP_STORED=0\nZIP_DEFLATED=8\nZIP_BZIP2=12\nZIP_LZMA=14\n\n\nDEFAULT_VERSION=20\nZIP64_VERSION=45\nBZIP2_VERSION=46\nLZMA_VERSION=63\n\nMAX_EXTRACT_VERSION=63\n\n\n\n\n\n\n\n\n\nstructEndArchive=b\"<4s4H2LH\"\nstringEndArchive=b\"PK\\005\\006\"\nsizeEndCentDir=struct.calcsize(structEndArchive)\n\n_ECD_SIGNATURE=0\n_ECD_DISK_NUMBER=1\n_ECD_DISK_START=2\n_ECD_ENTRIES_THIS_DISK=3\n_ECD_ENTRIES_TOTAL=4\n_ECD_SIZE=5\n_ECD_OFFSET=6\n_ECD_COMMENT_SIZE=7\n\n\n_ECD_COMMENT=8\n_ECD_LOCATION=9\n\n\n\nstructCentralDir=\"<4s4B4HL2L5H2L\"\nstringCentralDir=b\"PK\\001\\002\"\nsizeCentralDir=struct.calcsize(structCentralDir)\n\n\n_CD_SIGNATURE=0\n_CD_CREATE_VERSION=1\n_CD_CREATE_SYSTEM=2\n_CD_EXTRACT_VERSION=3\n_CD_EXTRACT_SYSTEM=4\n_CD_FLAG_BITS=5\n_CD_COMPRESS_TYPE=6\n_CD_TIME=7\n_CD_DATE=8\n_CD_CRC=9\n_CD_COMPRESSED_SIZE=10\n_CD_UNCOMPRESSED_SIZE=11\n_CD_FILENAME_LENGTH=12\n_CD_EXTRA_FIELD_LENGTH=13\n_CD_COMMENT_LENGTH=14\n_CD_DISK_NUMBER_START=15\n_CD_INTERNAL_FILE_ATTRIBUTES=16\n_CD_EXTERNAL_FILE_ATTRIBUTES=17\n_CD_LOCAL_HEADER_OFFSET=18\n\n\n\n_MASK_ENCRYPTED=1 <<0\n\n_MASK_COMPRESS_OPTION_1=1 <<1\n\n\n\n\n_MASK_USE_DATA_DESCRIPTOR=1 <<3\n\n\n_MASK_COMPRESSED_PATCH=1 <<5\n_MASK_STRONG_ENCRYPTION=1 <<6\n\n\n\n\n_MASK_UTF_FILENAME=1 <<11\n\n\n\n\n\n\n\n\n\nstructFileHeader=\"<4s2B4HL2L2H\"\nstringFileHeader=b\"PK\\003\\004\"\nsizeFileHeader=struct.calcsize(structFileHeader)\n\n_FH_SIGNATURE=0\n_FH_EXTRACT_VERSION=1\n_FH_EXTRACT_SYSTEM=2\n_FH_GENERAL_PURPOSE_FLAG_BITS=3\n_FH_COMPRESSION_METHOD=4\n_FH_LAST_MOD_TIME=5\n_FH_LAST_MOD_DATE=6\n_FH_CRC=7\n_FH_COMPRESSED_SIZE=8\n_FH_UNCOMPRESSED_SIZE=9\n_FH_FILENAME_LENGTH=10\n_FH_EXTRA_FIELD_LENGTH=11\n\n\nstructEndArchive64Locator=\"<4sLQL\"\nstringEndArchive64Locator=b\"PK\\x06\\x07\"\nsizeEndCentDir64Locator=struct.calcsize(structEndArchive64Locator)\n\n\n\nstructEndArchive64=\"<4sQ2H2L4Q\"\nstringEndArchive64=b\"PK\\x06\\x06\"\nsizeEndCentDir64=struct.calcsize(structEndArchive64)\n\n_CD64_SIGNATURE=0\n_CD64_DIRECTORY_RECSIZE=1\n_CD64_CREATE_VERSION=2\n_CD64_EXTRACT_VERSION=3\n_CD64_DISK_NUMBER=4\n_CD64_DISK_NUMBER_START=5\n_CD64_NUMBER_ENTRIES_THIS_DISK=6\n_CD64_NUMBER_ENTRIES_TOTAL=7\n_CD64_DIRECTORY_SIZE=8\n_CD64_OFFSET_START_CENTDIR=9\n\n_DD_SIGNATURE=0x08074b50\n\n_EXTRA_FIELD_STRUCT=struct.Struct('1:\n raise BadZipFile(\"zipfiles that span multiple disks are not supported\")\n \n \n fpin.seek(offset -sizeEndCentDir64Locator -sizeEndCentDir64,2)\n data=fpin.read(sizeEndCentDir64)\n if len(data)!=sizeEndCentDir64:\n return endrec\n sig,sz,create_version,read_version,disk_num,disk_dir,\\\n dircount,dircount2,dirsize,diroffset=\\\n struct.unpack(structEndArchive64,data)\n if sig !=stringEndArchive64:\n return endrec\n \n \n endrec[_ECD_SIGNATURE]=sig\n endrec[_ECD_DISK_NUMBER]=disk_num\n endrec[_ECD_DISK_START]=disk_dir\n endrec[_ECD_ENTRIES_THIS_DISK]=dircount\n endrec[_ECD_ENTRIES_TOTAL]=dircount2\n endrec[_ECD_SIZE]=dirsize\n endrec[_ECD_OFFSET]=diroffset\n return endrec\n \n \ndef _EndRecData(fpin):\n ''\n\n\n \n \n \n fpin.seek(0,2)\n filesize=fpin.tell()\n \n \n \n \n try :\n fpin.seek(-sizeEndCentDir,2)\n except OSError:\n return None\n data=fpin.read()\n if (len(data)==sizeEndCentDir and\n data[0:4]==stringEndArchive and\n data[-2:]==b\"\\000\\000\"):\n \n endrec=struct.unpack(structEndArchive,data)\n endrec=list(endrec)\n \n \n endrec.append(b\"\")\n endrec.append(filesize -sizeEndCentDir)\n \n \n return _EndRecData64(fpin,-sizeEndCentDir,endrec)\n \n \n \n \n \n \n maxCommentStart=max(filesize -(1 <<16)-sizeEndCentDir,0)\n fpin.seek(maxCommentStart,0)\n data=fpin.read()\n start=data.rfind(stringEndArchive)\n if start >=0:\n \n recData=data[start:start+sizeEndCentDir]\n if len(recData)!=sizeEndCentDir:\n \n return None\n endrec=list(struct.unpack(structEndArchive,recData))\n commentSize=endrec[_ECD_COMMENT_SIZE]\n comment=data[start+sizeEndCentDir:start+sizeEndCentDir+commentSize]\n endrec.append(comment)\n endrec.append(maxCommentStart+start)\n \n \n return _EndRecData64(fpin,maxCommentStart+start -filesize,\n endrec)\n \n \n return None\n \n \nclass ZipInfo(object):\n ''\n \n __slots__=(\n 'orig_filename',\n 'filename',\n 'date_time',\n 'compress_type',\n '_compresslevel',\n 'comment',\n 'extra',\n 'create_system',\n 'create_version',\n 'extract_version',\n 'reserved',\n 'flag_bits',\n 'volume',\n 'internal_attr',\n 'external_attr',\n 'header_offset',\n 'CRC',\n 'compress_size',\n 'file_size',\n '_raw_time',\n )\n \n def __init__(self,filename=\"NoName\",date_time=(1980,1,1,0,0,0)):\n self.orig_filename=filename\n \n \n \n null_byte=filename.find(chr(0))\n if null_byte >=0:\n filename=filename[0:null_byte]\n \n \n \n if os.sep !=\"/\"and os.sep in filename:\n filename=filename.replace(os.sep,\"/\")\n \n self.filename=filename\n self.date_time=date_time\n \n if date_time[0]<1980:\n raise ValueError('ZIP does not support timestamps before 1980')\n \n \n self.compress_type=ZIP_STORED\n self._compresslevel=None\n self.comment=b\"\"\n self.extra=b\"\"\n if sys.platform =='win32':\n self.create_system=0\n else :\n \n self.create_system=3\n self.create_version=DEFAULT_VERSION\n self.extract_version=DEFAULT_VERSION\n self.reserved=0\n self.flag_bits=0\n self.volume=0\n self.internal_attr=0\n self.external_attr=0\n self.compress_size=0\n self.file_size=0\n \n \n \n \n def __repr__(self):\n result=['<%s filename=%r'%(self.__class__.__name__,self.filename)]\n if self.compress_type !=ZIP_STORED:\n result.append(' compress_type=%s'%\n compressor_names.get(self.compress_type,\n self.compress_type))\n hi=self.external_attr >>16\n lo=self.external_attr&0xFFFF\n if hi:\n result.append(' filemode=%r'%stat.filemode(hi))\n if lo:\n result.append(' external_attr=%#x'%lo)\n isdir=self.is_dir()\n if not isdir or self.file_size:\n result.append(' file_size=%r'%self.file_size)\n if ((not isdir or self.compress_size)and\n (self.compress_type !=ZIP_STORED or\n self.file_size !=self.compress_size)):\n result.append(' compress_size=%r'%self.compress_size)\n result.append('>')\n return ''.join(result)\n \n def FileHeader(self,zip64=None ):\n ''\n dt=self.date_time\n dosdate=(dt[0]-1980)<<9 |dt[1]<<5 |dt[2]\n dostime=dt[3]<<11 |dt[4]<<5 |(dt[5]//2)\n if self.flag_bits&_MASK_USE_DATA_DESCRIPTOR:\n \n CRC=compress_size=file_size=0\n else :\n CRC=self.CRC\n compress_size=self.compress_size\n file_size=self.file_size\n \n extra=self.extra\n \n min_version=0\n if zip64 is None :\n zip64=file_size >ZIP64_LIMIT or compress_size >ZIP64_LIMIT\n if zip64:\n fmt='ZIP64_LIMIT or compress_size >ZIP64_LIMIT:\n if not zip64:\n raise LargeZipFile(\"Filesize would require ZIP64 extensions\")\n \n \n file_size=0xffffffff\n compress_size=0xffffffff\n min_version=ZIP64_VERSION\n \n if self.compress_type ==ZIP_BZIP2:\n min_version=max(BZIP2_VERSION,min_version)\n elif self.compress_type ==ZIP_LZMA:\n min_version=max(LZMA_VERSION,min_version)\n \n self.extract_version=max(min_version,self.extract_version)\n self.create_version=max(min_version,self.create_version)\n filename,flag_bits=self._encodeFilenameFlags()\n header=struct.pack(structFileHeader,stringFileHeader,\n self.extract_version,self.reserved,flag_bits,\n self.compress_type,dostime,dosdate,CRC,\n compress_size,file_size,\n len(filename),len(extra))\n return header+filename+extra\n \n def _encodeFilenameFlags(self):\n try :\n return self.filename.encode('ascii'),self.flag_bits\n except UnicodeEncodeError:\n return self.filename.encode('utf-8'),self.flag_bits |_MASK_UTF_FILENAME\n \n def _decodeExtra(self):\n \n extra=self.extra\n unpack=struct.unpack\n while len(extra)>=4:\n tp,ln=unpack('len(extra):\n raise BadZipFile(\"Corrupt extra field %04x (size=%d)\"%(tp,ln))\n if tp ==0x0001:\n data=extra[4:ln+4]\n \n try :\n if self.file_size in (0xFFFF_FFFF_FFFF_FFFF,0xFFFF_FFFF):\n field=\"File size\"\n self.file_size,=unpack('2107:\n date_time=(2107,12,31,23,59,59)\n \n if arcname is None :\n arcname=filename\n arcname=os.path.normpath(os.path.splitdrive(arcname)[1])\n while arcname[0]in (os.sep,os.altsep):\n arcname=arcname[1:]\n if isdir:\n arcname +='/'\n zinfo=cls(arcname,date_time)\n zinfo.external_attr=(st.st_mode&0xFFFF)<<16\n if isdir:\n zinfo.file_size=0\n zinfo.external_attr |=0x10\n else :\n zinfo.file_size=st.st_size\n \n return zinfo\n \n def is_dir(self):\n ''\n return self.filename[-1]=='/'\n \n \n \n \n \n \n_crctable=None\ndef _gen_crc(crc):\n for j in range(8):\n if crc&1:\n crc=(crc >>1)^0xEDB88320\n else :\n crc >>=1\n return crc\n \n \n \n \n \n \n \n \n \ndef _ZipDecrypter(pwd):\n key0=305419896\n key1=591751049\n key2=878082192\n \n global _crctable\n if _crctable is None :\n _crctable=list(map(_gen_crc,range(256)))\n crctable=_crctable\n \n def crc32(ch,crc):\n ''\n return (crc >>8)^crctable[(crc ^ch)&0xFF]\n \n def update_keys(c):\n nonlocal key0,key1,key2\n key0=crc32(c,key0)\n key1=(key1+(key0&0xFF))&0xFFFFFFFF\n key1=(key1 *134775813+1)&0xFFFFFFFF\n key2=crc32(key1 >>24,key2)\n \n for p in pwd:\n update_keys(p)\n \n def decrypter(data):\n ''\n result=bytearray()\n append=result.append\n for c in data:\n k=key2 |2\n c ^=((k *(k ^1))>>8)&0xFF\n update_keys(c)\n append(c)\n return bytes(result)\n \n return decrypter\n \n \nclass LZMACompressor:\n\n def __init__(self):\n self._comp=None\n \n def _init(self):\n props=lzma._encode_filter_properties({'id':lzma.FILTER_LZMA1})\n self._comp=lzma.LZMACompressor(lzma.FORMAT_RAW,filters=[\n lzma._decode_filter_properties(lzma.FILTER_LZMA1,props)\n ])\n return struct.pack('>8)&0xff\n else :\n \n check_byte=(zipinfo.CRC >>24)&0xff\n h=self._init_decrypter()\n if h !=check_byte:\n raise RuntimeError(\"Bad password for file %r\"%zipinfo.orig_filename)\n \n \n def _init_decrypter(self):\n self._decrypter=_ZipDecrypter(self._pwd)\n \n \n \n \n \n header=self._fileobj.read(12)\n self._compress_left -=12\n return self._decrypter(header)[11]\n \n def __repr__(self):\n result=['<%s.%s'%(self.__class__.__module__,\n self.__class__.__qualname__)]\n if not self.closed:\n result.append(' name=%r mode=%r'%(self.name,self.mode))\n if self._compress_type !=ZIP_STORED:\n result.append(' compress_type=%s'%\n compressor_names.get(self._compress_type,\n self._compress_type))\n else :\n result.append(' [closed]')\n result.append('>')\n return ''.join(result)\n \n def readline(self,limit=-1):\n ''\n\n\n \n \n if limit <0:\n \n i=self._readbuffer.find(b'\\n',self._offset)+1\n if i >0:\n line=self._readbuffer[self._offset:i]\n self._offset=i\n return line\n \n return io.BufferedIOBase.readline(self,limit)\n \n def peek(self,n=1):\n ''\n if n >len(self._readbuffer)-self._offset:\n chunk=self.read(n)\n if len(chunk)>self._offset:\n self._readbuffer=chunk+self._readbuffer[self._offset:]\n self._offset=0\n else :\n self._offset -=len(chunk)\n \n \n return self._readbuffer[self._offset:self._offset+512]\n \n def readable(self):\n if self.closed:\n raise ValueError(\"I/O operation on closed file.\")\n return True\n \n def read(self,n=-1):\n ''\n\n \n if self.closed:\n raise ValueError(\"read from closed file.\")\n if n is None or n <0:\n buf=self._readbuffer[self._offset:]\n self._readbuffer=b''\n self._offset=0\n while not self._eof:\n buf +=self._read1(self.MAX_N)\n return buf\n \n end=n+self._offset\n if end 0 and not self._eof:\n data=self._read1(n)\n if n 0:\n while not self._eof:\n data=self._read1(n)\n if n len(data):\n data +=self._read2(n -len(data))\n else :\n data=self._read2(n)\n \n if self._compress_type ==ZIP_STORED:\n self._eof=self._compress_left <=0\n elif self._compress_type ==ZIP_DEFLATED:\n n=max(n,self.MIN_READ_SIZE)\n data=self._decompressor.decompress(data,n)\n self._eof=(self._decompressor.eof or\n self._compress_left <=0 and\n not self._decompressor.unconsumed_tail)\n if self._eof:\n data +=self._decompressor.flush()\n else :\n data=self._decompressor.decompress(data)\n self._eof=self._decompressor.eof or self._compress_left <=0\n \n data=data[:self._left]\n self._left -=len(data)\n if self._left <=0:\n self._eof=True\n self._update_crc(data)\n return data\n \n def _read2(self,n):\n if self._compress_left <=0:\n return b''\n \n n=max(n,self.MIN_READ_SIZE)\n n=min(n,self._compress_left)\n \n data=self._fileobj.read(n)\n self._compress_left -=len(data)\n if not data:\n raise EOFError\n \n if self._decrypter is not None :\n data=self._decrypter(data)\n return data\n \n def close(self):\n try :\n if self._close_fileobj:\n self._fileobj.close()\n finally :\n super().close()\n \n def seekable(self):\n if self.closed:\n raise ValueError(\"I/O operation on closed file.\")\n return self._seekable\n \n def seek(self,offset,whence=0):\n if self.closed:\n raise ValueError(\"seek on closed file.\")\n if not self._seekable:\n raise io.UnsupportedOperation(\"underlying stream is not seekable\")\n curr_pos=self.tell()\n if whence ==0:\n new_pos=offset\n elif whence ==1:\n new_pos=curr_pos+offset\n elif whence ==2:\n new_pos=self._orig_file_size+offset\n else :\n raise ValueError(\"whence must be os.SEEK_SET (0), \"\n \"os.SEEK_CUR (1), or os.SEEK_END (2)\")\n \n if new_pos >self._orig_file_size:\n new_pos=self._orig_file_size\n \n if new_pos <0:\n new_pos=0\n \n read_offset=new_pos -curr_pos\n buff_offset=read_offset+self._offset\n \n if buff_offset >=0 and buff_offset 0:\n read_len=min(self.MAX_SEEK_READ,read_offset)\n self.read(read_len)\n read_offset -=read_len\n \n return self.tell()\n \n def tell(self):\n if self.closed:\n raise ValueError(\"tell on closed file.\")\n if not self._seekable:\n raise io.UnsupportedOperation(\"underlying stream is not seekable\")\n filepos=self._orig_file_size -self._left -len(self._readbuffer)+self._offset\n return filepos\n \n \nclass _ZipWriteFile(io.BufferedIOBase):\n def __init__(self,zf,zinfo,zip64):\n self._zinfo=zinfo\n self._zip64=zip64\n self._zipfile=zf\n self._compressor=_get_compressor(zinfo.compress_type,\n zinfo._compresslevel)\n self._file_size=0\n self._compress_size=0\n self._crc=0\n \n @property\n def _fileobj(self):\n return self._zipfile.fp\n \n def writable(self):\n return True\n \n def write(self,data):\n if self.closed:\n raise ValueError('I/O operation on closed file.')\n \n \n if isinstance(data,(bytes,bytearray)):\n nbytes=len(data)\n else :\n data=memoryview(data)\n nbytes=data.nbytes\n self._file_size +=nbytes\n \n self._crc=crc32(data,self._crc)\n if self._compressor:\n data=self._compressor.compress(data)\n self._compress_size +=len(data)\n self._fileobj.write(data)\n return nbytes\n \n def close(self):\n if self.closed:\n return\n try :\n super().close()\n \n if self._compressor:\n buf=self._compressor.flush()\n self._compress_size +=len(buf)\n self._fileobj.write(buf)\n self._zinfo.compress_size=self._compress_size\n else :\n self._zinfo.compress_size=self._file_size\n self._zinfo.CRC=self._crc\n self._zinfo.file_size=self._file_size\n \n \n if self._zinfo.flag_bits&_MASK_USE_DATA_DESCRIPTOR:\n \n fmt='ZIP64_LIMIT:\n raise RuntimeError(\n 'File size unexpectedly exceeded ZIP64 limit')\n if self._compress_size >ZIP64_LIMIT:\n raise RuntimeError(\n 'Compressed size unexpectedly exceeded ZIP64 limit')\n \n \n \n \n self._zipfile.start_dir=self._fileobj.tell()\n self._fileobj.seek(self._zinfo.header_offset)\n self._fileobj.write(self._zinfo.FileHeader(self._zip64))\n self._fileobj.seek(self._zipfile.start_dir)\n \n \n self._zipfile.filelist.append(self._zinfo)\n self._zipfile.NameToInfo[self._zinfo.filename]=self._zinfo\n finally :\n self._zipfile._writing=False\n \n \n \nclass ZipFile:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n fp=None\n _windows_illegal_name_trans_table=None\n \n def __init__(self,file,mode=\"r\",compression=ZIP_STORED,allowZip64=True ,\n compresslevel=None ,*,strict_timestamps=True ,metadata_encoding=None ):\n ''\n \n if mode not in ('r','w','x','a'):\n raise ValueError(\"ZipFile requires mode 'r', 'w', 'x', or 'a'\")\n \n _check_compression(compression)\n \n self._allowZip64=allowZip64\n self._didModify=False\n self.debug=0\n self.NameToInfo={}\n self.filelist=[]\n self.compression=compression\n self.compresslevel=compresslevel\n self.mode=mode\n self.pwd=None\n self._comment=b''\n self._strict_timestamps=strict_timestamps\n self.metadata_encoding=metadata_encoding\n \n \n if self.metadata_encoding and mode !='r':\n raise ValueError(\n \"metadata_encoding is only supported for reading files\")\n \n \n if isinstance(file,os.PathLike):\n file=os.fspath(file)\n if isinstance(file,str):\n \n self._filePassed=0\n self.filename=file\n modeDict={'r':'rb','w':'w+b','x':'x+b','a':'r+b',\n 'r+b':'w+b','w+b':'wb','x+b':'xb'}\n filemode=modeDict[mode]\n while True :\n try :\n self.fp=io.open(file,filemode)\n except OSError:\n if filemode in modeDict:\n filemode=modeDict[filemode]\n continue\n raise\n break\n else :\n self._filePassed=1\n self.fp=file\n self.filename=getattr(file,'name',None )\n self._fileRefCnt=1\n self._lock=threading.RLock()\n self._seekable=True\n self._writing=False\n \n try :\n if mode =='r':\n self._RealGetContents()\n elif mode in ('w','x'):\n \n \n self._didModify=True\n try :\n self.start_dir=self.fp.tell()\n except (AttributeError,OSError):\n self.fp=_Tellable(self.fp)\n self.start_dir=0\n self._seekable=False\n else :\n \n try :\n self.fp.seek(self.start_dir)\n except (AttributeError,OSError):\n self._seekable=False\n elif mode =='a':\n try :\n \n self._RealGetContents()\n \n self.fp.seek(self.start_dir)\n except BadZipFile:\n \n self.fp.seek(0,2)\n \n \n \n self._didModify=True\n self.start_dir=self.fp.tell()\n else :\n raise ValueError(\"Mode must be 'r', 'w', 'x', or 'a'\")\n except :\n fp=self.fp\n self.fp=None\n self._fpclose(fp)\n raise\n \n def __enter__(self):\n return self\n \n def __exit__(self,type,value,traceback):\n self.close()\n \n def __repr__(self):\n result=['<%s.%s'%(self.__class__.__module__,\n self.__class__.__qualname__)]\n if self.fp is not None :\n if self._filePassed:\n result.append(' file=%r'%self.fp)\n elif self.filename is not None :\n result.append(' filename=%r'%self.filename)\n result.append(' mode=%r'%self.mode)\n else :\n result.append(' [closed]')\n result.append('>')\n return ''.join(result)\n \n def _RealGetContents(self):\n ''\n fp=self.fp\n try :\n endrec=_EndRecData(fp)\n except OSError:\n raise BadZipFile(\"File is not a zip file\")\n if not endrec:\n raise BadZipFile(\"File is not a zip file\")\n if self.debug >1:\n print(endrec)\n size_cd=endrec[_ECD_SIZE]\n offset_cd=endrec[_ECD_OFFSET]\n self._comment=endrec[_ECD_COMMENT]\n \n \n concat=endrec[_ECD_LOCATION]-size_cd -offset_cd\n if endrec[_ECD_SIGNATURE]==stringEndArchive64:\n \n concat -=(sizeEndCentDir64+sizeEndCentDir64Locator)\n \n if self.debug >2:\n inferred=concat+offset_cd\n print(\"given, inferred, offset\",offset_cd,inferred,concat)\n \n self.start_dir=offset_cd+concat\n if self.start_dir <0:\n raise BadZipFile(\"Bad offset for central directory\")\n fp.seek(self.start_dir,0)\n data=fp.read(size_cd)\n fp=io.BytesIO(data)\n total=0\n while total 2:\n print(centdir)\n filename=fp.read(centdir[_CD_FILENAME_LENGTH])\n flags=centdir[_CD_FLAG_BITS]\n if flags&_MASK_UTF_FILENAME:\n \n filename=filename.decode('utf-8')\n else :\n \n filename=filename.decode(self.metadata_encoding or 'cp437')\n \n x=ZipInfo(filename)\n x.extra=fp.read(centdir[_CD_EXTRA_FIELD_LENGTH])\n x.comment=fp.read(centdir[_CD_COMMENT_LENGTH])\n x.header_offset=centdir[_CD_LOCAL_HEADER_OFFSET]\n (x.create_version,x.create_system,x.extract_version,x.reserved,\n x.flag_bits,x.compress_type,t,d,\n x.CRC,x.compress_size,x.file_size)=centdir[1:12]\n if x.extract_version >MAX_EXTRACT_VERSION:\n raise NotImplementedError(\"zip file version %.1f\"%\n (x.extract_version /10))\n x.volume,x.internal_attr,x.external_attr=centdir[15:18]\n \n x._raw_time=t\n x.date_time=((d >>9)+1980,(d >>5)&0xF,d&0x1F,\n t >>11,(t >>5)&0x3F,(t&0x1F)*2)\n \n x._decodeExtra()\n x.header_offset=x.header_offset+concat\n self.filelist.append(x)\n self.NameToInfo[x.filename]=x\n \n \n total=(total+sizeCentralDir+centdir[_CD_FILENAME_LENGTH]\n +centdir[_CD_EXTRA_FIELD_LENGTH]\n +centdir[_CD_COMMENT_LENGTH])\n \n if self.debug >2:\n print(\"total\",total)\n \n \n def namelist(self):\n ''\n return [data.filename for data in self.filelist]\n \n def infolist(self):\n ''\n \n return self.filelist\n \n def printdir(self,file=None ):\n ''\n print(\"%-46s %19s %12s\"%(\"File Name\",\"Modified \",\"Size\"),\n file=file)\n for zinfo in self.filelist:\n date=\"%d-%02d-%02d %02d:%02d:%02d\"%zinfo.date_time[:6]\n print(\"%-46s %s %12d\"%(zinfo.filename,date,zinfo.file_size),\n file=file)\n \n def testzip(self):\n ''\n chunk_size=2 **20\n for zinfo in self.filelist:\n try :\n \n \n with self.open(zinfo.filename,\"r\")as f:\n while f.read(chunk_size):\n pass\n except BadZipFile:\n return zinfo.filename\n \n def getinfo(self,name):\n ''\n info=self.NameToInfo.get(name)\n if info is None :\n raise KeyError(\n 'There is no item named %r in the archive'%name)\n \n return info\n \n def setpassword(self,pwd):\n ''\n if pwd and not isinstance(pwd,bytes):\n raise TypeError(\"pwd: expected bytes, got %s\"%type(pwd).__name__)\n if pwd:\n self.pwd=pwd\n else :\n self.pwd=None\n \n @property\n def comment(self):\n ''\n return self._comment\n \n @comment.setter\n def comment(self,comment):\n if not isinstance(comment,bytes):\n raise TypeError(\"comment: expected bytes, got %s\"%type(comment).__name__)\n \n if len(comment)>ZIP_MAX_COMMENT:\n import warnings\n warnings.warn('Archive comment is too long; truncating to %d bytes'\n %ZIP_MAX_COMMENT,stacklevel=2)\n comment=comment[:ZIP_MAX_COMMENT]\n self._comment=comment\n self._didModify=True\n \n def read(self,name,pwd=None ):\n ''\n with self.open(name,\"r\",pwd)as fp:\n return fp.read()\n \n def open(self,name,mode=\"r\",pwd=None ,*,force_zip64=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if mode not in {\"r\",\"w\"}:\n raise ValueError('open() requires mode \"r\" or \"w\"')\n if pwd and (mode ==\"w\"):\n raise ValueError(\"pwd is only supported for reading files\")\n if not self.fp:\n raise ValueError(\n \"Attempt to use ZIP archive that was already closed\")\n \n \n if isinstance(name,ZipInfo):\n \n zinfo=name\n elif mode =='w':\n zinfo=ZipInfo(name)\n zinfo.compress_type=self.compression\n zinfo._compresslevel=self.compresslevel\n else :\n \n zinfo=self.getinfo(name)\n \n if mode =='w':\n return self._open_to_write(zinfo,force_zip64=force_zip64)\n \n if self._writing:\n raise ValueError(\"Can't read from the ZIP file while there \"\n \"is an open writing handle on it. \"\n \"Close the writing handle before trying to read.\")\n \n \n self._fileRefCnt +=1\n zef_file=_SharedFile(self.fp,zinfo.header_offset,\n self._fpclose,self._lock,lambda :self._writing)\n try :\n \n fheader=zef_file.read(sizeFileHeader)\n if len(fheader)!=sizeFileHeader:\n raise BadZipFile(\"Truncated file header\")\n fheader=struct.unpack(structFileHeader,fheader)\n if fheader[_FH_SIGNATURE]!=stringFileHeader:\n raise BadZipFile(\"Bad magic number for file header\")\n \n fname=zef_file.read(fheader[_FH_FILENAME_LENGTH])\n if fheader[_FH_EXTRA_FIELD_LENGTH]:\n zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH])\n \n if zinfo.flag_bits&_MASK_COMPRESSED_PATCH:\n \n raise NotImplementedError(\"compressed patched data (flag bit 5)\")\n \n if zinfo.flag_bits&_MASK_STRONG_ENCRYPTION:\n \n raise NotImplementedError(\"strong encryption (flag bit 6)\")\n \n if fheader[_FH_GENERAL_PURPOSE_FLAG_BITS]&_MASK_UTF_FILENAME:\n \n fname_str=fname.decode(\"utf-8\")\n else :\n fname_str=fname.decode(self.metadata_encoding or \"cp437\")\n \n if fname_str !=zinfo.orig_filename:\n raise BadZipFile(\n 'File name in directory %r and header %r differ.'\n %(zinfo.orig_filename,fname))\n \n \n is_encrypted=zinfo.flag_bits&_MASK_ENCRYPTED\n if is_encrypted:\n if not pwd:\n pwd=self.pwd\n if pwd and not isinstance(pwd,bytes):\n raise TypeError(\"pwd: expected bytes, got %s\"%type(pwd).__name__)\n if not pwd:\n raise RuntimeError(\"File %r is encrypted, password \"\n \"required for extraction\"%name)\n else :\n pwd=None\n \n return ZipExtFile(zef_file,mode,zinfo,pwd,True )\n except :\n zef_file.close()\n raise\n \n def _open_to_write(self,zinfo,force_zip64=False ):\n if force_zip64 and not self._allowZip64:\n raise ValueError(\n \"force_zip64 is True, but allowZip64 was False when opening \"\n \"the ZIP file.\"\n )\n if self._writing:\n raise ValueError(\"Can't write to the ZIP file while there is \"\n \"another write handle open on it. \"\n \"Close the first handle before opening another.\")\n \n \n zinfo.compress_size=0\n zinfo.CRC=0\n \n zinfo.flag_bits=0x00\n if zinfo.compress_type ==ZIP_LZMA:\n \n zinfo.flag_bits |=_MASK_COMPRESS_OPTION_1\n if not self._seekable:\n zinfo.flag_bits |=_MASK_USE_DATA_DESCRIPTOR\n \n if not zinfo.external_attr:\n zinfo.external_attr=0o600 <<16\n \n \n zip64=self._allowZip64 and\\\n (force_zip64 or zinfo.file_size *1.05 >ZIP64_LIMIT)\n \n if self._seekable:\n self.fp.seek(self.start_dir)\n zinfo.header_offset=self.fp.tell()\n \n self._writecheck(zinfo)\n self._didModify=True\n \n self.fp.write(zinfo.FileHeader(zip64))\n \n self._writing=True\n return _ZipWriteFile(self,zinfo,zip64)\n \n def extract(self,member,path=None ,pwd=None ):\n ''\n\n\n\n \n if path is None :\n path=os.getcwd()\n else :\n path=os.fspath(path)\n \n return self._extract_member(member,path,pwd)\n \n def extractall(self,path=None ,members=None ,pwd=None ):\n ''\n\n\n\n \n if members is None :\n members=self.namelist()\n \n if path is None :\n path=os.getcwd()\n else :\n path=os.fspath(path)\n \n for zipinfo in members:\n self._extract_member(zipinfo,path,pwd)\n \n @classmethod\n def _sanitize_windows_name(cls,arcname,pathsep):\n ''\n table=cls._windows_illegal_name_trans_table\n if not table:\n illegal=':<>|\"?*'\n table=str.maketrans(illegal,'_'*len(illegal))\n cls._windows_illegal_name_trans_table=table\n arcname=arcname.translate(table)\n \n arcname=(x.rstrip('.')for x in arcname.split(pathsep))\n \n arcname=pathsep.join(x for x in arcname if x)\n return arcname\n \n def _extract_member(self,member,targetpath,pwd):\n ''\n\n \n if not isinstance(member,ZipInfo):\n member=self.getinfo(member)\n \n \n \n arcname=member.filename.replace('/',os.path.sep)\n \n if os.path.altsep:\n arcname=arcname.replace(os.path.altsep,os.path.sep)\n \n \n arcname=os.path.splitdrive(arcname)[1]\n invalid_path_parts=('',os.path.curdir,os.path.pardir)\n arcname=os.path.sep.join(x for x in arcname.split(os.path.sep)\n if x not in invalid_path_parts)\n if os.path.sep =='\\\\':\n \n arcname=self._sanitize_windows_name(arcname,os.path.sep)\n \n targetpath=os.path.join(targetpath,arcname)\n targetpath=os.path.normpath(targetpath)\n \n \n upperdirs=os.path.dirname(targetpath)\n if upperdirs and not os.path.exists(upperdirs):\n os.makedirs(upperdirs)\n \n if member.is_dir():\n if not os.path.isdir(targetpath):\n os.mkdir(targetpath)\n return targetpath\n \n with self.open(member,pwd=pwd)as source,\\\n open(targetpath,\"wb\")as target:\n shutil.copyfileobj(source,target)\n \n return targetpath\n \n def _writecheck(self,zinfo):\n ''\n if zinfo.filename in self.NameToInfo:\n import warnings\n warnings.warn('Duplicate name: %r'%zinfo.filename,stacklevel=3)\n if self.mode not in ('w','x','a'):\n raise ValueError(\"write() requires mode 'w', 'x', or 'a'\")\n if not self.fp:\n raise ValueError(\n \"Attempt to write ZIP archive that was already closed\")\n _check_compression(zinfo.compress_type)\n if not self._allowZip64:\n requires_zip64=None\n if len(self.filelist)>=ZIP_FILECOUNT_LIMIT:\n requires_zip64=\"Files count\"\n elif zinfo.file_size >ZIP64_LIMIT:\n requires_zip64=\"Filesize\"\n elif zinfo.header_offset >ZIP64_LIMIT:\n requires_zip64=\"Zipfile size\"\n if requires_zip64:\n raise LargeZipFile(requires_zip64+\n \" would require ZIP64 extensions\")\n \n def write(self,filename,arcname=None ,\n compress_type=None ,compresslevel=None ):\n ''\n \n if not self.fp:\n raise ValueError(\n \"Attempt to write to ZIP archive that was already closed\")\n if self._writing:\n raise ValueError(\n \"Can't write to ZIP archive while an open writing handle exists\"\n )\n \n zinfo=ZipInfo.from_file(filename,arcname,\n strict_timestamps=self._strict_timestamps)\n \n if zinfo.is_dir():\n zinfo.compress_size=0\n zinfo.CRC=0\n self.mkdir(zinfo)\n else :\n if compress_type is not None :\n zinfo.compress_type=compress_type\n else :\n zinfo.compress_type=self.compression\n \n if compresslevel is not None :\n zinfo._compresslevel=compresslevel\n else :\n zinfo._compresslevel=self.compresslevel\n \n with open(filename,\"rb\")as src,self.open(zinfo,'w')as dest:\n shutil.copyfileobj(src,dest,1024 *8)\n \n def writestr(self,zinfo_or_arcname,data,\n compress_type=None ,compresslevel=None ):\n ''\n\n\n\n \n if isinstance(data,str):\n data=data.encode(\"utf-8\")\n if not isinstance(zinfo_or_arcname,ZipInfo):\n zinfo=ZipInfo(filename=zinfo_or_arcname,\n date_time=time.localtime(time.time())[:6])\n zinfo.compress_type=self.compression\n zinfo._compresslevel=self.compresslevel\n if zinfo.filename[-1]=='/':\n zinfo.external_attr=0o40775 <<16\n zinfo.external_attr |=0x10\n else :\n zinfo.external_attr=0o600 <<16\n else :\n zinfo=zinfo_or_arcname\n \n if not self.fp:\n raise ValueError(\n \"Attempt to write to ZIP archive that was already closed\")\n if self._writing:\n raise ValueError(\n \"Can't write to ZIP archive while an open writing handle exists.\"\n )\n \n if compress_type is not None :\n zinfo.compress_type=compress_type\n \n if compresslevel is not None :\n zinfo._compresslevel=compresslevel\n \n zinfo.file_size=len(data)\n with self._lock:\n with self.open(zinfo,mode='w')as dest:\n dest.write(data)\n \n def mkdir(self,zinfo_or_directory_name,mode=511):\n ''\n if isinstance(zinfo_or_directory_name,ZipInfo):\n zinfo=zinfo_or_directory_name\n if not zinfo.is_dir():\n raise ValueError(\"The given ZipInfo does not describe a directory\")\n elif isinstance(zinfo_or_directory_name,str):\n directory_name=zinfo_or_directory_name\n if not directory_name.endswith(\"/\"):\n directory_name +=\"/\"\n zinfo=ZipInfo(directory_name)\n zinfo.compress_size=0\n zinfo.CRC=0\n zinfo.external_attr=((0o40000 |mode)&0xFFFF)<<16\n zinfo.file_size=0\n zinfo.external_attr |=0x10\n else :\n raise TypeError(\"Expected type str or ZipInfo\")\n \n with self._lock:\n if self._seekable:\n self.fp.seek(self.start_dir)\n zinfo.header_offset=self.fp.tell()\n if zinfo.compress_type ==ZIP_LZMA:\n \n zinfo.flag_bits |=_MASK_COMPRESS_OPTION_1\n \n self._writecheck(zinfo)\n self._didModify=True\n \n self.filelist.append(zinfo)\n self.NameToInfo[zinfo.filename]=zinfo\n self.fp.write(zinfo.FileHeader(False ))\n self.start_dir=self.fp.tell()\n \n def __del__(self):\n ''\n self.close()\n \n def close(self):\n ''\n \n if self.fp is None :\n return\n \n if self._writing:\n raise ValueError(\"Can't close the ZIP file while there is \"\n \"an open writing handle on it. \"\n \"Close the writing handle before closing the zip.\")\n \n try :\n if self.mode in ('w','x','a')and self._didModify:\n with self._lock:\n if self._seekable:\n self.fp.seek(self.start_dir)\n self._write_end_record()\n finally :\n fp=self.fp\n self.fp=None\n self._fpclose(fp)\n \n def _write_end_record(self):\n for zinfo in self.filelist:\n dt=zinfo.date_time\n dosdate=(dt[0]-1980)<<9 |dt[1]<<5 |dt[2]\n dostime=dt[3]<<11 |dt[4]<<5 |(dt[5]//2)\n extra=[]\n if zinfo.file_size >ZIP64_LIMIT\\\n or zinfo.compress_size >ZIP64_LIMIT:\n extra.append(zinfo.file_size)\n extra.append(zinfo.compress_size)\n file_size=0xffffffff\n compress_size=0xffffffff\n else :\n file_size=zinfo.file_size\n compress_size=zinfo.compress_size\n \n if zinfo.header_offset >ZIP64_LIMIT:\n extra.append(zinfo.header_offset)\n header_offset=0xffffffff\n else :\n header_offset=zinfo.header_offset\n \n extra_data=zinfo.extra\n min_version=0\n if extra:\n \n extra_data=_strip_extra(extra_data,(1,))\n extra_data=struct.pack(\n 'ZIP_FILECOUNT_LIMIT:\n requires_zip64=\"Files count\"\n elif centDirOffset >ZIP64_LIMIT:\n requires_zip64=\"Central directory offset\"\n elif centDirSize >ZIP64_LIMIT:\n requires_zip64=\"Central directory size\"\n if requires_zip64:\n \n if not self._allowZip64:\n raise LargeZipFile(requires_zip64+\n \" would require ZIP64 extensions\")\n zip64endrec=struct.pack(\n structEndArchive64,stringEndArchive64,\n 44,45,45,0,0,centDirCount,centDirCount,\n centDirSize,centDirOffset)\n self.fp.write(zip64endrec)\n \n zip64locrec=struct.pack(\n structEndArchive64Locator,\n stringEndArchive64Locator,0,pos2,1)\n self.fp.write(zip64locrec)\n centDirCount=min(centDirCount,0xFFFF)\n centDirSize=min(centDirSize,0xFFFFFFFF)\n centDirOffset=min(centDirOffset,0xFFFFFFFF)\n \n endrec=struct.pack(structEndArchive,stringEndArchive,\n 0,0,centDirCount,centDirCount,\n centDirSize,centDirOffset,len(self._comment))\n self.fp.write(endrec)\n self.fp.write(self._comment)\n if self.mode ==\"a\":\n self.fp.truncate()\n self.fp.flush()\n \n def _fpclose(self,fp):\n assert self._fileRefCnt >0\n self._fileRefCnt -=1\n if not self._fileRefCnt and not self._filePassed:\n fp.close()\n \n \nclass PyZipFile(ZipFile):\n ''\n \n def __init__(self,file,mode=\"r\",compression=ZIP_STORED,\n allowZip64=True ,optimize=-1):\n ZipFile.__init__(self,file,mode=mode,compression=compression,\n allowZip64=allowZip64)\n self._optimize=optimize\n \n def writepy(self,pathname,basename=\"\",filterfunc=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n pathname=os.fspath(pathname)\n if filterfunc and not filterfunc(pathname):\n if self.debug:\n label='path'if os.path.isdir(pathname)else 'file'\n print('%s %r skipped by filterfunc'%(label,pathname))\n return\n dir,name=os.path.split(pathname)\n if os.path.isdir(pathname):\n initname=os.path.join(pathname,\"__init__.py\")\n if os.path.isfile(initname):\n \n if basename:\n basename=\"%s/%s\"%(basename,name)\n else :\n basename=name\n if self.debug:\n print(\"Adding package in\",pathname,\"as\",basename)\n fname,arcname=self._get_codename(initname[0:-3],basename)\n if self.debug:\n print(\"Adding\",arcname)\n self.write(fname,arcname)\n dirlist=sorted(os.listdir(pathname))\n dirlist.remove(\"__init__.py\")\n \n for filename in dirlist:\n path=os.path.join(pathname,filename)\n root,ext=os.path.splitext(filename)\n if os.path.isdir(path):\n if os.path.isfile(os.path.join(path,\"__init__.py\")):\n \n self.writepy(path,basename,\n filterfunc=filterfunc)\n elif ext ==\".py\":\n if filterfunc and not filterfunc(path):\n if self.debug:\n print('file %r skipped by filterfunc'%path)\n continue\n fname,arcname=self._get_codename(path[0:-3],\n basename)\n if self.debug:\n print(\"Adding\",arcname)\n self.write(fname,arcname)\n else :\n \n if self.debug:\n print(\"Adding files from directory\",pathname)\n for filename in sorted(os.listdir(pathname)):\n path=os.path.join(pathname,filename)\n root,ext=os.path.splitext(filename)\n if ext ==\".py\":\n if filterfunc and not filterfunc(path):\n if self.debug:\n print('file %r skipped by filterfunc'%path)\n continue\n fname,arcname=self._get_codename(path[0:-3],\n basename)\n if self.debug:\n print(\"Adding\",arcname)\n self.write(fname,arcname)\n else :\n if pathname[-3:]!=\".py\":\n raise RuntimeError(\n 'Files added with writepy() must end with \".py\"')\n fname,arcname=self._get_codename(pathname[0:-3],basename)\n if self.debug:\n print(\"Adding file\",arcname)\n self.write(fname,arcname)\n \n def _get_codename(self,pathname,basename):\n ''\n\n\n\n\n \n def _compile(file,optimize=-1):\n import py_compile\n if self.debug:\n print(\"Compiling\",file)\n try :\n py_compile.compile(file,doraise=True ,optimize=optimize)\n except py_compile.PyCompileError as err:\n print(err.msg)\n return False\n return True\n \n file_py=pathname+\".py\"\n file_pyc=pathname+\".pyc\"\n pycache_opt0=importlib.util.cache_from_source(file_py,optimization='')\n pycache_opt1=importlib.util.cache_from_source(file_py,optimization=1)\n pycache_opt2=importlib.util.cache_from_source(file_py,optimization=2)\n if self._optimize ==-1:\n \n if (os.path.isfile(file_pyc)and\n os.stat(file_pyc).st_mtime >=os.stat(file_py).st_mtime):\n \n arcname=fname=file_pyc\n elif (os.path.isfile(pycache_opt0)and\n os.stat(pycache_opt0).st_mtime >=os.stat(file_py).st_mtime):\n \n \n fname=pycache_opt0\n arcname=file_pyc\n elif (os.path.isfile(pycache_opt1)and\n os.stat(pycache_opt1).st_mtime >=os.stat(file_py).st_mtime):\n \n \n fname=pycache_opt1\n arcname=file_pyc\n elif (os.path.isfile(pycache_opt2)and\n os.stat(pycache_opt2).st_mtime >=os.stat(file_py).st_mtime):\n \n \n fname=pycache_opt2\n arcname=file_pyc\n else :\n \n if _compile(file_py):\n if sys.flags.optimize ==0:\n fname=pycache_opt0\n elif sys.flags.optimize ==1:\n fname=pycache_opt1\n else :\n fname=pycache_opt2\n arcname=file_pyc\n else :\n fname=arcname=file_py\n else :\n \n if self._optimize ==0:\n fname=pycache_opt0\n arcname=file_pyc\n else :\n arcname=file_pyc\n if self._optimize ==1:\n fname=pycache_opt1\n elif self._optimize ==2:\n fname=pycache_opt2\n else :\n msg=\"invalid value for 'optimize': {!r}\".format(self._optimize)\n raise ValueError(msg)\n if not (os.path.isfile(fname)and\n os.stat(fname).st_mtime >=os.stat(file_py).st_mtime):\n if not _compile(file_py,optimize=self._optimize):\n fname=arcname=file_py\n archivename=os.path.split(arcname)[1]\n if basename:\n archivename=\"%s/%s\"%(basename,archivename)\n return (fname,archivename)\n \n \ndef _parents(path):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n return itertools.islice(_ancestry(path),1,None )\n \n \ndef _ancestry(path):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n path=path.rstrip(posixpath.sep)\n while path and path !=posixpath.sep:\n yield path\n path,tail=posixpath.split(path)\n \n \n_dedupe=dict.fromkeys\n''\n\n\ndef _difference(minuend,subtrahend):\n ''\n\n\n \n return itertools.filterfalse(set(subtrahend).__contains__,minuend)\n \n \nclass CompleteDirs(ZipFile):\n ''\n\n\n \n \n @staticmethod\n def _implied_dirs(names):\n parents=itertools.chain.from_iterable(map(_parents,names))\n as_dirs=(p+posixpath.sep for p in parents)\n return _dedupe(_difference(as_dirs,names))\n \n def namelist(self):\n names=super(CompleteDirs,self).namelist()\n return names+list(self._implied_dirs(names))\n \n def _name_set(self):\n return set(self.namelist())\n \n def resolve_dir(self,name):\n ''\n\n\n \n names=self._name_set()\n dirname=name+'/'\n dir_match=name not in names and dirname in names\n return dirname if dir_match else name\n \n @classmethod\n def make(cls,source):\n ''\n\n\n \n if isinstance(source,CompleteDirs):\n return source\n \n if not isinstance(source,ZipFile):\n return cls(source)\n \n \n if 'r'not in source.mode:\n cls=CompleteDirs\n \n source.__class__=cls\n return source\n \n \nclass FastLookup(CompleteDirs):\n ''\n\n\n \n \n def namelist(self):\n with contextlib.suppress(AttributeError):\n return self.__names\n self.__names=super(FastLookup,self).namelist()\n return self.__names\n \n def _name_set(self):\n with contextlib.suppress(AttributeError):\n return self.__lookup\n self.__lookup=super(FastLookup,self)._name_set()\n return self.__lookup\n \n \nclass Path:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n __repr=\"{self.__class__.__name__}({self.root.filename!r}, {self.at!r})\"\n \n def __init__(self,root,at=\"\"):\n ''\n\n\n\n\n\n\n\n \n self.root=FastLookup.make(root)\n self.at=at\n \n def open(self,mode='r',*args,pwd=None ,**kwargs):\n ''\n\n\n\n \n if self.is_dir():\n raise IsADirectoryError(self)\n zip_mode=mode[0]\n if not self.exists()and zip_mode =='r':\n raise FileNotFoundError(self)\n stream=self.root.open(self.at,zip_mode,pwd=pwd)\n if 'b'in mode:\n if args or kwargs:\n raise ValueError(\"encoding args invalid for binary operation\")\n return stream\n else :\n kwargs[\"encoding\"]=io.text_encoding(kwargs.get(\"encoding\"))\n return io.TextIOWrapper(stream,*args,**kwargs)\n \n @property\n def name(self):\n return pathlib.Path(self.at).name or self.filename.name\n \n @property\n def suffix(self):\n return pathlib.Path(self.at).suffix or self.filename.suffix\n \n @property\n def suffixes(self):\n return pathlib.Path(self.at).suffixes or self.filename.suffixes\n \n @property\n def stem(self):\n return pathlib.Path(self.at).stem or self.filename.stem\n \n @property\n def filename(self):\n return pathlib.Path(self.root.filename).joinpath(self.at)\n \n def read_text(self,*args,**kwargs):\n kwargs[\"encoding\"]=io.text_encoding(kwargs.get(\"encoding\"))\n with self.open('r',*args,**kwargs)as strm:\n return strm.read()\n \n def read_bytes(self):\n with self.open('rb')as strm:\n return strm.read()\n \n def _is_child(self,path):\n return posixpath.dirname(path.at.rstrip(\"/\"))==self.at.rstrip(\"/\")\n \n def _next(self,at):\n return self.__class__(self.root,at)\n \n def is_dir(self):\n return not self.at or self.at.endswith(\"/\")\n \n def is_file(self):\n return self.exists()and not self.is_dir()\n \n def exists(self):\n return self.at in self.root._name_set()\n \n def iterdir(self):\n if not self.is_dir():\n raise ValueError(\"Can't listdir a file\")\n subs=map(self._next,self.root.namelist())\n return filter(self._is_child,subs)\n \n def __str__(self):\n return posixpath.join(self.root.filename,self.at)\n \n def __repr__(self):\n return self.__repr.format(self=self)\n \n def joinpath(self,*other):\n next=posixpath.join(self.at,*other)\n return self._next(self.root.resolve_dir(next))\n \n __truediv__=joinpath\n \n @property\n def parent(self):\n if not self.at:\n return self.filename.parent\n parent_at=posixpath.dirname(self.at.rstrip('/'))\n if parent_at:\n parent_at +='/'\n return self._next(parent_at)\n \n \ndef main(args=None ):\n import argparse\n \n description='A simple command-line interface for zipfile module.'\n parser=argparse.ArgumentParser(description=description)\n group=parser.add_mutually_exclusive_group(required=True )\n group.add_argument('-l','--list',metavar='',\n help='Show listing of a zipfile')\n group.add_argument('-e','--extract',nargs=2,\n metavar=('',''),\n help='Extract zipfile into target dir')\n group.add_argument('-c','--create',nargs='+',\n metavar=('',''),\n help='Create zipfile from sources')\n group.add_argument('-t','--test',metavar='',\n help='Test if a zipfile is valid')\n parser.add_argument('--metadata-encoding',metavar='',\n help='Specify encoding of member names for -l, -e and -t')\n args=parser.parse_args(args)\n \n encoding=args.metadata_encoding\n \n if args.test is not None :\n src=args.test\n with ZipFile(src,'r',metadata_encoding=encoding)as zf:\n badfile=zf.testzip()\n if badfile:\n print(\"The following enclosed file is corrupted: {!r}\".format(badfile))\n print(\"Done testing\")\n \n elif args.list is not None :\n src=args.list\n with ZipFile(src,'r',metadata_encoding=encoding)as zf:\n zf.printdir()\n \n elif args.extract is not None :\n src,curdir=args.extract\n with ZipFile(src,'r',metadata_encoding=encoding)as zf:\n zf.extractall(curdir)\n \n elif args.create is not None :\n if encoding:\n print(\"Non-conforming encodings not supported with -c.\",\n file=sys.stderr)\n sys.exit(1)\n \n zip_name=args.create.pop(0)\n files=args.create\n \n def addToZip(zf,path,zippath):\n if os.path.isfile(path):\n zf.write(path,zippath,ZIP_DEFLATED)\n elif os.path.isdir(path):\n if zippath:\n zf.write(path,zippath)\n for nm in sorted(os.listdir(path)):\n addToZip(zf,\n os.path.join(path,nm),os.path.join(zippath,nm))\n \n \n with ZipFile(zip_name,'w')as zf:\n for path in files:\n zippath=os.path.basename(path)\n if not zippath:\n zippath=os.path.basename(os.path.dirname(path))\n if zippath in ('',os.curdir,os.pardir):\n zippath=''\n addToZip(zf,path,zippath)\n \n \nif __name__ ==\"__main__\":\n main()\n", ["argparse", "binascii", "bz2", "contextlib", "importlib.util", "io", "itertools", "lzma", "os", "pathlib", "posixpath", "py_compile", "shutil", "stat", "struct", "sys", "threading", "time", "warnings", "zlib"]], "zipimport": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport _frozen_importlib_external as _bootstrap_external\nfrom _frozen_importlib_external import _unpack_uint16,_unpack_uint32\nimport _frozen_importlib as _bootstrap\nimport _imp\nimport _io\nimport marshal\nimport sys\nimport time\nimport _warnings\n\n__all__=['ZipImportError','zipimporter']\n\n\npath_sep=_bootstrap_external.path_sep\nalt_path_sep=_bootstrap_external.path_separators[1:]\n\n\nclass ZipImportError(ImportError):\n pass\n \n \n_zip_directory_cache={}\n\n_module_type=type(sys)\n\nEND_CENTRAL_DIR_SIZE=22\nSTRING_END_ARCHIVE=b'PK\\x05\\x06'\nMAX_COMMENT_LEN=(1 <<16)-1\n\nclass zipimporter(_bootstrap_external._LoaderBasics):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n def __init__(self,path):\n if not isinstance(path,str):\n raise TypeError(f\"expected str, not {type(path)!r}\")\n if not path:\n raise ZipImportError('archive path is empty',path=path)\n if alt_path_sep:\n path=path.replace(alt_path_sep,path_sep)\n \n prefix=[]\n while True :\n try :\n st=_bootstrap_external._path_stat(path)\n except (OSError,ValueError):\n \n \n dirname,basename=_bootstrap_external._path_split(path)\n if dirname ==path:\n raise ZipImportError('not a Zip file',path=path)\n path=dirname\n prefix.append(basename)\n else :\n \n if (st.st_mode&0o170000)!=0o100000:\n \n raise ZipImportError('not a Zip file',path=path)\n break\n \n try :\n files=_zip_directory_cache[path]\n except KeyError:\n files=_read_directory(path)\n _zip_directory_cache[path]=files\n self._files=files\n self.archive=path\n \n self.prefix=_bootstrap_external._path_join(*prefix[::-1])\n if self.prefix:\n self.prefix +=path_sep\n \n \n def find_spec(self,fullname,target=None ):\n ''\n\n\n \n module_info=_get_module_info(self,fullname)\n if module_info is not None :\n return _bootstrap.spec_from_loader(fullname,self,is_package=module_info)\n else :\n \n \n \n \n \n modpath=_get_module_path(self,fullname)\n if _is_dir(self,modpath):\n \n \n \n path=f'{self.archive}{path_sep}{modpath}'\n spec=_bootstrap.ModuleSpec(name=fullname,loader=None ,\n is_package=True )\n spec.submodule_search_locations.append(path)\n return spec\n else :\n return None\n \n def get_code(self,fullname):\n ''\n\n\n\n \n code,ispackage,modpath=_get_module_code(self,fullname)\n return code\n \n \n def get_data(self,pathname):\n ''\n\n\n\n \n if alt_path_sep:\n pathname=pathname.replace(alt_path_sep,path_sep)\n \n key=pathname\n if pathname.startswith(self.archive+path_sep):\n key=pathname[len(self.archive+path_sep):]\n \n try :\n toc_entry=self._files[key]\n except KeyError:\n raise OSError(0,'',key)\n return _get_data(self.archive,toc_entry)\n \n \n \n def get_filename(self,fullname):\n ''\n\n\n\n \n \n \n code,ispackage,modpath=_get_module_code(self,fullname)\n return modpath\n \n \n def get_source(self,fullname):\n ''\n\n\n\n\n \n mi=_get_module_info(self,fullname)\n if mi is None :\n raise ZipImportError(f\"can't find module {fullname !r}\",name=fullname)\n \n path=_get_module_path(self,fullname)\n if mi:\n fullpath=_bootstrap_external._path_join(path,'__init__.py')\n else :\n fullpath=f'{path}.py'\n \n try :\n toc_entry=self._files[fullpath]\n except KeyError:\n \n return None\n return _get_data(self.archive,toc_entry).decode()\n \n \n \n def is_package(self,fullname):\n ''\n\n\n\n \n mi=_get_module_info(self,fullname)\n if mi is None :\n raise ZipImportError(f\"can't find module {fullname !r}\",name=fullname)\n return mi\n \n \n \n def load_module(self,fullname):\n ''\n\n\n\n\n\n\n \n msg=(\"zipimport.zipimporter.load_module() is deprecated and slated for \"\n \"removal in Python 3.12; use exec_module() instead\")\n _warnings.warn(msg,DeprecationWarning)\n code,ispackage,modpath=_get_module_code(self,fullname)\n mod=sys.modules.get(fullname)\n if mod is None or not isinstance(mod,_module_type):\n mod=_module_type(fullname)\n sys.modules[fullname]=mod\n mod.__loader__=self\n \n try :\n if ispackage:\n \n \n path=_get_module_path(self,fullname)\n fullpath=_bootstrap_external._path_join(self.archive,path)\n mod.__path__=[fullpath]\n \n if not hasattr(mod,'__builtins__'):\n mod.__builtins__=__builtins__\n _bootstrap_external._fix_up_module(mod.__dict__,fullname,modpath)\n exec(code,mod.__dict__)\n except :\n del sys.modules[fullname]\n raise\n \n try :\n mod=sys.modules[fullname]\n except KeyError:\n raise ImportError(f'Loaded module {fullname !r} not found in sys.modules')\n _bootstrap._verbose_message('import {} # loaded from Zip {}',fullname,modpath)\n return mod\n \n \n def get_resource_reader(self,fullname):\n ''\n\n\n\n \n try :\n if not self.is_package(fullname):\n return None\n except ZipImportError:\n return None\n from importlib.readers import ZipReader\n return ZipReader(self,fullname)\n \n \n def invalidate_caches(self):\n ''\n try :\n self._files=_read_directory(self.archive)\n _zip_directory_cache[self.archive]=self._files\n except ZipImportError:\n _zip_directory_cache.pop(self.archive,None )\n self._files={}\n \n \n def __repr__(self):\n return f''\n \n \n \n \n \n \n \n_zip_searchorder=(\n(path_sep+'__init__.pyc',True ,True ),\n(path_sep+'__init__.py',False ,True ),\n('.pyc',True ,False ),\n('.py',False ,False ),\n)\n\n\n\ndef _get_module_path(self,fullname):\n return self.prefix+fullname.rpartition('.')[2]\n \n \ndef _is_dir(self,path):\n\n\n\n dirpath=path+path_sep\n \n return dirpath in self._files\n \n \ndef _get_module_info(self,fullname):\n path=_get_module_path(self,fullname)\n for suffix,isbytecode,ispackage in _zip_searchorder:\n fullpath=path+suffix\n if fullpath in self._files:\n return ispackage\n return None\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \ndef _read_directory(archive):\n try :\n fp=_io.open_code(archive)\n except OSError:\n raise ZipImportError(f\"can't open Zip file: {archive !r}\",path=archive)\n \n with fp:\n \n \n \n start_offset=fp.tell()\n try :\n try :\n fp.seek(-END_CENTRAL_DIR_SIZE,2)\n header_position=fp.tell()\n buffer=fp.read(END_CENTRAL_DIR_SIZE)\n except OSError:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n if len(buffer)!=END_CENTRAL_DIR_SIZE:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n if buffer[:4]!=STRING_END_ARCHIVE:\n \n \n try :\n fp.seek(0,2)\n file_size=fp.tell()\n except OSError:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",\n path=archive)\n max_comment_start=max(file_size -MAX_COMMENT_LEN -\n END_CENTRAL_DIR_SIZE,0)\n try :\n fp.seek(max_comment_start)\n data=fp.read()\n except OSError:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",\n path=archive)\n pos=data.rfind(STRING_END_ARCHIVE)\n if pos <0:\n raise ZipImportError(f'not a Zip file: {archive !r}',\n path=archive)\n buffer=data[pos:pos+END_CENTRAL_DIR_SIZE]\n if len(buffer)!=END_CENTRAL_DIR_SIZE:\n raise ZipImportError(f\"corrupt Zip file: {archive !r}\",\n path=archive)\n header_position=file_size -len(data)+pos\n \n header_size=_unpack_uint32(buffer[12:16])\n header_offset=_unpack_uint32(buffer[16:20])\n if header_position header_offset:\n raise ZipImportError(f'bad local header offset: {archive !r}',path=archive)\n file_offset +=arc_offset\n \n try :\n name=fp.read(name_size)\n except OSError:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n if len(name)!=name_size:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n \n \n \n try :\n if len(fp.read(header_size -name_size))!=header_size -name_size:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n except OSError:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n \n if flags&0x800:\n \n name=name.decode()\n else :\n \n try :\n name=name.decode('ascii')\n except UnicodeDecodeError:\n name=name.decode('latin1').translate(cp437_table)\n \n name=name.replace('/',path_sep)\n path=_bootstrap_external._path_join(archive,name)\n t=(path,compress,data_size,file_size,file_offset,time,date,crc)\n files[name]=t\n count +=1\n finally :\n fp.seek(start_offset)\n _bootstrap._verbose_message('zipimport: found {} names in {!r}',count,archive)\n return files\n \n \n \n \n \n \n \ncp437_table=(\n\n'\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\x08\\t\\n\\x0b\\x0c\\r\\x0e\\x0f'\n'\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f'\n' !\"#$%&\\'()*+,-./'\n'0123456789:;<=>?'\n'@ABCDEFGHIJKLMNO'\n'PQRSTUVWXYZ[\\\\]^_'\n'`abcdefghijklmno'\n'pqrstuvwxyz{|}~\\x7f'\n\n'\\xc7\\xfc\\xe9\\xe2\\xe4\\xe0\\xe5\\xe7'\n'\\xea\\xeb\\xe8\\xef\\xee\\xec\\xc4\\xc5'\n'\\xc9\\xe6\\xc6\\xf4\\xf6\\xf2\\xfb\\xf9'\n'\\xff\\xd6\\xdc\\xa2\\xa3\\xa5\\u20a7\\u0192'\n'\\xe1\\xed\\xf3\\xfa\\xf1\\xd1\\xaa\\xba'\n'\\xbf\\u2310\\xac\\xbd\\xbc\\xa1\\xab\\xbb'\n'\\u2591\\u2592\\u2593\\u2502\\u2524\\u2561\\u2562\\u2556'\n'\\u2555\\u2563\\u2551\\u2557\\u255d\\u255c\\u255b\\u2510'\n'\\u2514\\u2534\\u252c\\u251c\\u2500\\u253c\\u255e\\u255f'\n'\\u255a\\u2554\\u2569\\u2566\\u2560\\u2550\\u256c\\u2567'\n'\\u2568\\u2564\\u2565\\u2559\\u2558\\u2552\\u2553\\u256b'\n'\\u256a\\u2518\\u250c\\u2588\\u2584\\u258c\\u2590\\u2580'\n'\\u03b1\\xdf\\u0393\\u03c0\\u03a3\\u03c3\\xb5\\u03c4'\n'\\u03a6\\u0398\\u03a9\\u03b4\\u221e\\u03c6\\u03b5\\u2229'\n'\\u2261\\xb1\\u2265\\u2264\\u2320\\u2321\\xf7\\u2248'\n'\\xb0\\u2219\\xb7\\u221a\\u207f\\xb2\\u25a0\\xa0'\n)\n\n_importing_zlib=False\n\n\n\n\ndef _get_decompress_func():\n global _importing_zlib\n if _importing_zlib:\n \n \n _bootstrap._verbose_message('zipimport: zlib UNAVAILABLE')\n raise ZipImportError(\"can't decompress data; zlib not available\")\n \n _importing_zlib=True\n try :\n from zlib import decompress\n except Exception:\n _bootstrap._verbose_message('zipimport: zlib UNAVAILABLE')\n raise ZipImportError(\"can't decompress data; zlib not available\")\n finally :\n _importing_zlib=False\n \n _bootstrap._verbose_message('zipimport: zlib available')\n return decompress\n \n \ndef _get_data(archive,toc_entry):\n datapath,compress,data_size,file_size,file_offset,time,date,crc=toc_entry\n if data_size <0:\n raise ZipImportError('negative data size')\n \n with _io.open_code(archive)as fp:\n \n try :\n fp.seek(file_offset)\n except OSError:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n buffer=fp.read(30)\n if len(buffer)!=30:\n raise EOFError('EOF read where not expected')\n \n if buffer[:4]!=b'PK\\x03\\x04':\n \n raise ZipImportError(f'bad local file header: {archive !r}',path=archive)\n \n name_size=_unpack_uint16(buffer[26:28])\n extra_size=_unpack_uint16(buffer[28:30])\n header_size=30+name_size+extra_size\n file_offset +=header_size\n try :\n fp.seek(file_offset)\n except OSError:\n raise ZipImportError(f\"can't read Zip file: {archive !r}\",path=archive)\n raw_data=fp.read(data_size)\n if len(raw_data)!=data_size:\n raise OSError(\"zipimport: can't read data\")\n \n if compress ==0:\n \n return raw_data\n \n \n try :\n decompress=_get_decompress_func()\n except Exception:\n raise ZipImportError(\"can't decompress data; zlib not available\")\n return decompress(raw_data,-15)\n \n \n \n \n \ndef _eq_mtime(t1,t2):\n\n return abs(t1 -t2)<=1\n \n \n \n \n \ndef _unmarshal_code(self,pathname,fullpath,fullname,data):\n exc_details={\n 'name':fullname,\n 'path':fullpath,\n }\n \n flags=_bootstrap_external._classify_pyc(data,fullname,exc_details)\n \n hash_based=flags&0b1 !=0\n if hash_based:\n check_source=flags&0b10 !=0\n if (_imp.check_hash_based_pycs !='never'and\n (check_source or _imp.check_hash_based_pycs =='always')):\n source_bytes=_get_pyc_source(self,fullpath)\n if source_bytes is not None :\n source_hash=_imp.source_hash(\n _bootstrap_external._RAW_MAGIC_NUMBER,\n source_bytes,\n )\n \n _bootstrap_external._validate_hash_pyc(\n data,source_hash,fullname,exc_details)\n else :\n source_mtime,source_size=\\\n _get_mtime_and_size_of_source(self,fullpath)\n \n if source_mtime:\n \n \n if (not _eq_mtime(_unpack_uint32(data[8:12]),source_mtime)or\n _unpack_uint32(data[12:16])!=source_size):\n _bootstrap._verbose_message(\n f'bytecode is stale for {fullname !r}')\n return None\n \n code=marshal.loads(data[16:])\n if not isinstance(code,_code_type):\n raise TypeError(f'compiled module {pathname !r} is not a code object')\n return code\n \n_code_type=type(_unmarshal_code.__code__)\n\n\n\n\ndef _normalize_line_endings(source):\n source=source.replace(b'\\r\\n',b'\\n')\n source=source.replace(b'\\r',b'\\n')\n return source\n \n \n \ndef _compile_source(pathname,source):\n source=_normalize_line_endings(source)\n return compile(source,pathname,'exec',dont_inherit=True )\n \n \n \ndef _parse_dostime(d,t):\n return time.mktime((\n (d >>9)+1980,\n (d >>5)&0xF,\n d&0x1F,\n t >>11,\n (t >>5)&0x3F,\n (t&0x1F)*2,\n -1,-1,-1))\n \n \n \n \ndef _get_mtime_and_size_of_source(self,path):\n try :\n \n assert path[-1:]in ('c','o')\n path=path[:-1]\n toc_entry=self._files[path]\n \n \n time=toc_entry[5]\n date=toc_entry[6]\n uncompressed_size=toc_entry[3]\n return _parse_dostime(date,time),uncompressed_size\n except (KeyError,IndexError,TypeError):\n return 0,0\n \n \n \n \n \ndef _get_pyc_source(self,path):\n\n assert path[-1:]in ('c','o')\n path=path[:-1]\n \n try :\n toc_entry=self._files[path]\n except KeyError:\n return None\n else :\n return _get_data(self.archive,toc_entry)\n \n \n \n \ndef _get_module_code(self,fullname):\n path=_get_module_path(self,fullname)\n import_error=None\n for suffix,isbytecode,ispackage in _zip_searchorder:\n fullpath=path+suffix\n _bootstrap._verbose_message('trying {}{}{}',self.archive,path_sep,fullpath,verbosity=2)\n try :\n toc_entry=self._files[fullpath]\n except KeyError:\n pass\n else :\n modpath=toc_entry[0]\n data=_get_data(self.archive,toc_entry)\n code=None\n if isbytecode:\n try :\n code=_unmarshal_code(self,modpath,fullpath,fullname,data)\n except ImportError as exc:\n import_error=exc\n else :\n code=_compile_source(modpath,data)\n if code is None :\n \n \n continue\n modpath=toc_entry[0]\n return code,ispackage,modpath\n else :\n if import_error:\n msg=f\"module load failed: {import_error}\"\n raise ZipImportError(msg,name=fullname)from import_error\n else :\n raise ZipImportError(f\"can't find module {fullname !r}\",name=fullname)\n", ["_frozen_importlib", "_frozen_importlib_external", "_imp", "_io", "_warnings", "importlib.readers", "marshal", "sys", "time", "zlib"]], "zlib": [".py", "from _zlib_utils import lz_generator,crc32\n\nDEFLATED=8\nDEF_BUF_SIZE=16384\nDEF_MEM_LEVEL=8\nMAX_WBITS=15\nZLIB_RUNTIME_VERSION='1.2.11'\nZLIB_VERSION='1.2.11'\nZ_BEST_COMPRESSION=9\nZ_BEST_SPEED=1\nZ_BLOCK=5\nZ_DEFAULT_COMPRESSION=-1\nZ_DEFAULT_STRATEGY=0\nZ_FILTERED=1\nZ_FINISH=4\nZ_FIXED=4\nZ_FULL_FLUSH=3\nZ_HUFFMAN_ONLY=2\nZ_NO_COMPRESSION=0\nZ_NO_FLUSH=0\nZ_PARTIAL_FLUSH=1\nZ_RLE=3\nZ_SYNC_FLUSH=2\nZ_TREES=6\n\nclass BitIO:\n\n def __init__(self,bytestream=b''):\n self.bytestream=bytearray(bytestream)\n self.bytenum=0\n self.bitnum=0\n \n @property\n def pos(self):\n return self.bytenum *8+self.bitnum\n \n def read(self,nb,order=\"lsf\",trace=False ):\n result=0\n coef=1 if order ==\"lsf\"else 2 **(nb -1)\n for _ in range(nb):\n if self.bitnum ==8:\n if self.bytenum ==len(self.bytestream)-1:\n return None\n self.bytenum +=1\n self.bitnum=0\n mask=2 **self.bitnum\n if trace:\n print(\"byte\",self.bytenum,\"bitnum\",self.bitnum,\n \"bit\",int(bool(mask&self.bytestream[self.bytenum])))\n result +=coef *bool(mask&self.bytestream[self.bytenum])\n self.bitnum +=1\n if order ==\"lsf\":\n coef *=2\n else :\n coef //=2\n return result\n \n def move(self,nb):\n if nb ==0:\n return\n elif nb >0:\n bitpos=self.bitnum+nb\n while bitpos >7:\n self.bytenum +=1\n if self.bytenum ==len(self.bytestream):\n raise Exception(\"can't move {} bits\".format(nb))\n bitpos -=8\n self.bitnum=bitpos\n else :\n bitpos=self.bitnum+nb\n while bitpos <0:\n self.bytenum -=1\n if self.bytenum ==-1:\n raise Exception(\"can't move {} bits\".format(nb))\n bitpos +=8\n self.bitnum=bitpos\n \n def show(self):\n res=\"\"\n for x in self.bytestream:\n s=str(bin(x))[2:]\n s=\"0\"*(8 -len(s))+s\n res +=s+\" \"\n return res\n \n def write(self,*bits):\n for bit in bits:\n if not self.bytestream:\n self.bytestream.append(0)\n byte=self.bytestream[self.bytenum]\n if self.bitnum ==8:\n if self.bytenum ==len(self.bytestream)-1:\n byte=0\n self.bytestream +=bytes([byte])\n self.bytenum +=1\n self.bitnum=0\n mask=2 **self.bitnum\n if bit:\n byte |=mask\n else :\n byte &=~mask\n self.bytestream[self.bytenum]=byte\n self.bitnum +=1\n \n def write_int(self,value,nb,order=\"lsf\"):\n ''\n if value >=2 **nb:\n raise ValueError(\"can't write value on {} bits\".format(nb))\n bits=[]\n while value:\n bits.append(value&1)\n value >>=1\n \n bits=bits+[0]*(nb -len(bits))\n if order !=\"lsf\":\n bits.reverse()\n assert len(bits)==nb\n self.write(*bits)\n \nclass Error(Exception):\n pass\n \n \nclass ResizeError(Exception):\n pass\n \n \nclass Node:\n\n def __init__(self,char=None ,weight=0,level=0):\n self.char=char\n self.is_leaf=char is not None\n self.level=level\n self.weight=weight\n \n def add(self,children):\n self.children=children\n for child in self.children:\n child.parent=self\n child.level=self.level+1\n \n \nclass Tree:\n\n def __init__(self,root):\n self.root=root\n \n def length(self):\n self.root.level=0\n node=self.root\n nb_levels=0\n def set_level(node):\n nonlocal nb_levels\n for child in node.children:\n child.level=node.level+1\n nb_levels=max(nb_levels,child.level)\n if not child.is_leaf:\n set_level(child)\n set_level(self.root)\n return nb_levels\n \n def reduce_tree(self):\n ''\n\n\n \n currentlen=self.length()\n deepest=self.nodes_at(currentlen)\n deepest_leaves=[node for node in deepest if node.is_leaf]\n rightmost_leaf=deepest_leaves[-1]\n sibling=rightmost_leaf.parent.children[0]\n \n \n parent=rightmost_leaf.parent\n grand_parent=parent.parent\n rank=grand_parent.children.index(parent)\n children=grand_parent.children\n children[rank]=rightmost_leaf\n grand_parent.add(children)\n \n \n up_level=rightmost_leaf.level -2\n while up_level >0:\n nodes=self.nodes_at(up_level)\n leaf_nodes=[node for node in nodes if node.is_leaf]\n if leaf_nodes:\n leftmost_leaf=leaf_nodes[0]\n \n parent=leftmost_leaf.parent\n rank=parent.children.index(leftmost_leaf)\n new_node=Node()\n new_node.level=leftmost_leaf.level\n children=[sibling,leftmost_leaf]\n new_node.add(children)\n parent.children[rank]=new_node\n new_node.parent=parent\n break\n else :\n up_level -=1\n if up_level ==0:\n raise ResizeError\n \n def nodes_at(self,level,top=None ):\n ''\n res=[]\n if top is None :\n top=self.root\n if top.level ==level:\n res=[top]\n elif not top.is_leaf:\n for child in top.children:\n res +=self.nodes_at(level,child)\n return res\n \n def reduce(self,maxlevels):\n ''\n while self.length()>maxlevels:\n self.reduce_tree()\n \n def codes(self,node=None ,code=''):\n ''\n \n if node is None :\n self.dic={}\n node=self.root\n if node.is_leaf:\n self.dic[node.char]=code\n else :\n for i,child in enumerate(node.children):\n self.codes(child,code+str(i))\n return self.dic\n \n \ndef codelengths_from_frequencies(freqs):\n ''\n\n\n\n \n freqs=sorted(freqs.items(),\n key=lambda item:(item[1],-item[0]),reverse=True )\n nodes=[Node(char=key,weight=value)for (key,value)in freqs]\n while len(nodes)>1:\n right,left=nodes.pop(),nodes.pop()\n node=Node(weight=right.weight+left.weight)\n node.add([left,right])\n if not nodes:\n nodes.append(node)\n else :\n pos=0\n while pos node.weight:\n pos +=1\n nodes.insert(pos,node)\n \n top=nodes[0]\n tree=Tree(top)\n tree.reduce(15)\n \n codes=tree.codes()\n \n code_items=list(codes.items())\n code_items.sort(key=lambda item:(len(item[1]),item[0]))\n return [(car,len(value))for car,value in code_items]\n \ndef normalized(codelengths):\n car,codelength=codelengths[0]\n value=0\n codes={car:\"0\"*codelength}\n \n for (newcar,nbits)in codelengths[1:]:\n value +=1\n bvalue=str(bin(value))[2:]\n bvalue=\"0\"*(codelength -len(bvalue))+bvalue\n if nbits >codelength:\n codelength=nbits\n bvalue +=\"0\"*(codelength -len(bvalue))\n value=int(bvalue,2)\n assert len(bvalue)==nbits\n codes[newcar]=bvalue\n \n return codes\n \ndef make_tree(node,codes):\n if not hasattr(node,\"parent\"):\n node.code=''\n children=[]\n for bit in '01':\n next_code=node.code+bit\n if next_code in codes:\n child=Node(char=codes[next_code])\n else :\n child=Node()\n child.code=next_code\n children.append(child)\n node.add(children)\n for child in children:\n if not child.is_leaf:\n make_tree(child,codes)\n \ndef decompresser(codelengths):\n lengths=list(codelengths.items())\n \n lengths=[x for x in lengths if x[1]>0]\n lengths.sort(key=lambda item:(item[1],item[0]))\n codes=normalized(lengths)\n codes={value:key for key,value in codes.items()}\n root=Node()\n make_tree(root,codes)\n return {\"root\":root,\"codes\":codes}\n \ndef tree_from_codelengths(codelengths):\n return decompresser(codelengths)[\"root\"]\n \nclass error(Exception):\n pass\n \n \nfixed_codelengths={}\nfor car in range(144):\n fixed_codelengths[car]=8\nfor car in range(144,256):\n fixed_codelengths[car]=9\nfor car in range(256,280):\n fixed_codelengths[car]=7\nfor car in range(280,288):\n fixed_codelengths[car]=8\n \nfixed_decomp=decompresser(fixed_codelengths)\nfixed_lit_len_tree=fixed_decomp[\"root\"]\nfixed_lit_len_codes={value:key\nfor (key,value)in fixed_decomp[\"codes\"].items()}\n\ndef cl_encode(lengths):\n ''\n \n dic={char:len(code)for (char,code)in lengths.items()}\n items=[dic.get(i,0)for i in range(max(dic)+1)]\n pos=0\n while pos 3:\n yield (16,3)\n nb -=3\n yield (16,nb)\n pos +=repeat+1\n \ndef read_codelengths(reader,root,num):\n ''\n\n \n node=root\n lengths=[]\n nb=0\n while len(lengths)256:\n \n if child.char <265:\n length=child.char -254\n elif child.char <269:\n length=11+2 *(child.char -265)+reader.read(1)\n elif child.char <273:\n length=19+4 *(child.char -269)+reader.read(2)\n elif child.char <277:\n length=35+8 *(child.char -273)+reader.read(3)\n elif child.char <281:\n length=67+16 *(child.char -277)+reader.read(4)\n elif child.char <285:\n length=131+31 *(child.char -281)+reader.read(5)\n elif child.char ==285:\n length=258\n return (\"length\",length)\n else :\n node=child\n \ndef adler32(source):\n a=1\n b=0\n for byte in source:\n a +=byte\n a %=65521\n b +=a\n b %=65521\n return a,b\n \n \ndef compress_dynamic(out,source,store,lit_len_count,distance_count):\n\n lit_len_count[256]=1\n \n \n \n \n \n \n lit_len_codes=normalized(codelengths_from_frequencies(lit_len_count))\n HLIT=1+max(lit_len_codes)-257\n \n \n \n \n \n \n coded_lit_len=list(cl_encode(lit_len_codes))\n \n \n distance_codes=normalized(codelengths_from_frequencies(distance_count))\n HDIST=max(distance_codes)\n coded_distance=list(cl_encode(distance_codes))\n \n \n codelengths_count={}\n for coded in coded_lit_len,coded_distance:\n for item in coded:\n length=item[0]if isinstance(item,tuple)else item\n codelengths_count[length]=codelengths_count.get(length,0)+1\n \n \n codelengths_codes=normalized(\n codelengths_from_frequencies(codelengths_count))\n codelengths_dict={char:len(value)\n for (char,value)in codelengths_codes.items()}\n \n alphabet=(16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,\n 15)\n \n \n codelengths_list=[codelengths_dict.get(car,0)for car in alphabet]\n \n while codelengths_list[-1]==0:\n codelengths_list.pop()\n HCLEN=len(codelengths_list)-4\n \n out.write(0,1)\n \n out.write_int(HLIT,5)\n out.write_int(HDIST,5)\n out.write_int(HCLEN,4)\n \n \n for length,car in zip(codelengths_list,alphabet):\n out.write_int(length,3)\n \n \n for item in coded_lit_len+coded_distance:\n if isinstance(item,tuple):\n length,extra=item\n code=codelengths_codes[length]\n value,nbits=int(code,2),len(code)\n out.write_int(value,nbits,order=\"msf\")\n if length ==16:\n out.write_int(extra,2)\n elif length ==17:\n out.write_int(extra,3)\n elif length ==18:\n out.write_int(extra,7)\n else :\n code=codelengths_codes[item]\n value,nbits=int(code,2),len(code)\n out.write_int(value,nbits,order=\"msf\")\n \n \n for item in store:\n if isinstance(item,tuple):\n length,extra_length,distance,extra_distance=item\n \n code=lit_len_codes[length]\n value,nb=int(code,2),len(code)\n out.write_int(value,nb,order=\"msf\")\n \n value,nb=extra_length\n if nb:\n out.write_int(value,nb)\n \n code=distance_codes[distance]\n value,nb=int(code,2),len(code)\n out.write_int(value,nb,order=\"msf\")\n \n value,nb=extra_distance\n if nb:\n out.write_int(value,nb)\n else :\n literal=item\n code=lit_len_codes[item]\n value,nb=int(code,2),len(code)\n out.write_int(value,nb,order=\"msf\")\n \ndef compress_fixed(out,source,items):\n ''\n out.write(1,0)\n \n for item in items:\n if isinstance(item,tuple):\n length,extra_length,distance,extra_distance=item\n \n code=fixed_lit_len_codes[length]\n value,nb=int(code,2),len(code)\n out.write_int(value,nb,order=\"msf\")\n \n value,nb=extra_length\n if nb:\n out.write_int(value,nb)\n \n out.write_int(distance,5,order=\"msf\")\n \n value,nb=extra_distance\n if nb:\n out.write_int(value,nb)\n else :\n literal=item\n code=fixed_lit_len_codes[item]\n value,nb=int(code,2),len(code)\n out.write_int(value,nb,order=\"msf\")\n \ndef compress(data,/,level=-1,wbits=MAX_WBITS):\n\n window_size=32 *1024\n \n \n out=BitIO()\n \n \n out.write_int(8,4)\n size=window_size >>8\n nb=0\n while size >1:\n size >>=1\n nb +=1\n out.write_int(nb,4)\n out.write_int(0x9c,8)\n header=out.bytestream\n compressor=_Compressor(level)\n payload=compressor.compress(data)+compressor.flush()\n a,b=adler32(data)\n checksum=divmod(b,256)+divmod(a,256)\n return header+payload+bytes(checksum)\n \ndef convert32bits(n):\n result=[]\n for _ in range(4):\n n,rest=divmod(n,256)\n result.append(rest)\n return result\n \nclass _Compressor:\n\n def __init__(self,level=-1,method=DEFLATED,wbits=MAX_WBITS,\n memLevel=DEF_MEM_LEVEL,strategy=Z_DEFAULT_STRATEGY,\n zdict=None ):\n self.level=level\n self.method=method\n self.wbits=wbits\n self.window_size=32 *1024\n self.memLevel=memLevel\n self.strategy=strategy\n self.zdict=zdict\n self._flushed=False\n \n def compress(self,source):\n \n \n lit_len_count={}\n \n \n distance_count={}\n \n store=[]\n replaced=0\n nb_tuples=0\n \n for item in lz_generator(source,self.window_size):\n if isinstance(item,tuple):\n nb_tuples +=1\n length,distance=item\n replaced +=length\n \n \n length_code,*extra_length=length_to_code(length)\n \n lit_len_count[length_code]=lit_len_count.get(length_code,0)+1\n \n \n \n distance_code,*extra_dist=distance_to_code(distance)\n \n distance_count[distance_code]=\\\n distance_count.get(distance_code,0)+1\n \n \n store.append((length_code,extra_length,distance_code,\n extra_dist))\n else :\n literal=item\n lit_len_count[literal]=lit_len_count.get(literal,0)+1\n store.append(literal)\n \n store.append(256)\n \n \n \n \n score=replaced -100 -(nb_tuples *20 //8)\n \n \n out=BitIO()\n \n out.write(1)\n \n if score <0:\n compress_fixed(out,source,store)\n else :\n compress_dynamic(out,source,store,lit_len_count,distance_count)\n \n \n while out.bitnum !=8:\n out.write(0)\n \n self._compressed=bytes(out.bytestream)\n \n return b''\n \n def flush(self,mode=Z_FINISH):\n if self._flushed:\n raise Error('inconsistent flush state')\n self._flushed=True\n return self._compressed\n \n \ndef compressobj(level=-1,method=DEFLATED,wbits=MAX_WBITS,\nmemLevel=DEF_MEM_LEVEL,strategy=Z_DEFAULT_STRATEGY,\nzdict=None ):\n return _Compressor(level,method,wbits,memLevel,strategy,zdict)\n \n \ndef decompress(data,/,wbits=MAX_WBITS,bufsize=DEF_BUF_SIZE):\n if wbits >0:\n decompressor=_Decompressor(wbits,bufsize)\n source=BitIO(data)\n assert source.read(4)==8\n nb=source.read(4)\n window_size=2 **(nb+8)\n assert source.read(8)==0x9c\n checksum=data[-4:]\n a=256 *checksum[2]+checksum[3]\n b=256 *checksum[0]+checksum[1]\n assert a,b ==adler32(data)\n return decompressor.decompress(data[2:-4])\n else :\n decompressor=_Decompressor(-wbits,bufsize)\n return decompressor.decompress(data)\n \nclass _Decompressor:\n\n def __init__(self,wbits=MAX_WBITS,bufsize=DEF_BUF_SIZE,zdict=None ):\n self.wbits=wbits\n self.bufsize=bufsize\n self.zdict=zdict\n self.eof=False\n self.unconsumed_tail=b''\n self.unused_data=b''\n \n def decompress(self,data,max_length=0):\n self.data=data\n if data ==b'':\n return data\n \n reader=self._reader=BitIO(data)\n \n result=bytearray()\n \n while True :\n BFINAL=reader.read(1)\n \n BTYPE=reader.read(2)\n \n if BTYPE ==0b01:\n \n \n root=fixed_lit_len_tree\n \n while True :\n \n _type,value=read_literal_or_length(reader,root)\n if _type =='eob':\n break\n elif _type =='literal':\n result.append(value)\n elif _type =='length':\n length=value\n \n dist_code=reader.read(5,\"msf\")\n if dist_code <3:\n distance=dist_code+1\n else :\n nb=(dist_code //2)-1\n extra=reader.read(nb)\n half,delta=divmod(dist_code,2)\n distance=(1+(2 **half)+\n delta *(2 **(half -1))+extra)\n for _ in range(length):\n result.append(result[-distance])\n \n node=root\n else :\n node=child\n elif BTYPE ==0b10:\n \n \n \n lit_len_tree,distance_tree=dynamic_trees(reader)\n \n while True :\n \n _type,value=read_literal_or_length(reader,lit_len_tree)\n if _type =='eob':\n break\n elif _type =='literal':\n result.append(value)\n elif _type =='length':\n \n length=value\n distance=read_distance(reader,distance_tree)\n for _ in range(length):\n result.append(result[-distance])\n \n if BFINAL:\n rank=reader.bytenum\n self.unused_data=bytes(data[rank+1:])\n self.eof=True\n return bytes(result)\n \ndef decompressobj(wbits=MAX_WBITS,zdict=None ):\n return _Decompressor(wbits,zdict)\n", ["_zlib_utils"]], "_codecs": [".py", "\ndef ascii_decode(*args,**kw):\n pass\n \ndef ascii_encode(*args,**kw):\n pass\n \ndef charbuffer_encode(*args,**kw):\n pass\n \ndef charmap_build(decoding_table):\n return {car:i for (i,car)in enumerate(decoding_table)}\n \ndef charmap_decode(input,errors,decoding_table):\n res=''\n for car in input:\n code=decoding_table[car]\n if code is None :\n raise UnicodeDecodeError(input)\n res +=code\n return res,len(input)\n \ndef charmap_encode(input,errors,encoding_table):\n t=[]\n for car in input:\n code=encoding_table.get(car)\n if code is None :\n raise UnicodeEncodeError(input)\n t.append(code)\n return bytes(t),len(input)\n \ndef decode(obj,encoding=\"utf-8\",errors=\"strict\"):\n ''\n\n\n\n\n\n \n return __BRYTHON__.decode(obj,encoding,errors)\n \ndef encode(obj,encoding=\"utf-8\",errors=\"strict\"):\n ''\n\n\n\n\n\n \n return __BRYTHON__.encode(obj,encoding,errors)\n \ndef escape_decode(*args,**kw):\n pass\n \ndef escape_encode(*args,**kw):\n pass\n \ndef latin_1_decode(*args,**kw):\n pass\n \ndef latin_1_encode(*args,**kw):\n pass\n \ndef lookup(encoding):\n ''\n\n \n if encoding in ('utf-8','utf_8'):\n from browser import console\n import encodings.utf_8\n return encodings.utf_8.getregentry()\n \n LookupError(encoding)\n \ndef lookup_error(*args,**kw):\n ''\n\n \n pass\n \ndef mbcs_decode(*args,**kw):\n pass\n \ndef mbcs_encode(*args,**kw):\n pass\n \ndef raw_unicode_escape_decode(*args,**kw):\n pass\n \ndef raw_unicode_escape_encode(*args,**kw):\n pass\n \ndef readbuffer_encode(*args,**kw):\n pass\n \ndef register(*args,**kw):\n ''\n\n\n\n \n pass\n \ndef register_error(*args,**kw):\n ''\n\n\n\n\n \n pass\n \ndef unicode_escape_decode(*args,**kw):\n pass\n \ndef unicode_escape_encode(*args,**kw):\n pass\n \ndef unicode_internal_decode(*args,**kw):\n pass\n \ndef unicode_internal_encode(*args,**kw):\n pass\n \ndef utf_16_be_decode(*args,**kw):\n pass\n \ndef utf_16_be_encode(*args,**kw):\n pass\n \ndef utf_16_decode(*args,**kw):\n pass\n \ndef utf_16_encode(*args,**kw):\n pass\n \ndef utf_16_ex_decode(*args,**kw):\n pass\n \ndef utf_16_le_decode(*args,**kw):\n pass\n \ndef utf_16_le_encode(*args,**kw):\n pass\n \ndef utf_32_be_decode(*args,**kw):\n pass\n \ndef utf_32_be_encode(*args,**kw):\n pass\n \ndef utf_32_decode(*args,**kw):\n pass\n \ndef utf_32_encode(*args,**kw):\n pass\n \ndef utf_32_ex_decode(*args,**kw):\n pass\n \ndef utf_32_le_decode(*args,**kw):\n pass\n \ndef utf_32_le_encode(*args,**kw):\n pass\n \ndef utf_7_decode(*args,**kw):\n pass\n \ndef utf_7_encode(*args,**kw):\n pass\n \ndef utf_8_decode(decoder,bytes_obj,errors,*args):\n return (bytes_obj.decode(\"utf-8\"),len(bytes_obj))\n \ndef utf_8_encode(*args,**kw):\n input=args[0]\n if len(args)==2:\n errors=args[1]\n else :\n errors=kw.get('errors','strict')\n \n \n return (bytes(input,'utf-8'),len(input))\n", ["browser", "encodings.utf_8"]], "_codecs_jp": [".py", "from encoding_cp932 import encoding_table,decoding_table\n\n\n\nclass Codec:\n\n def encode(self,input,errors='strict'):\n b=[]\n for pos,car in enumerate(input):\n cp=ord(car)\n try :\n code=encoding_table[cp]\n high=((code >>8)&0xff)\n low=code&0xff\n if high:\n b.append(high)\n b.append(low)\n except IndexError:\n raise UnicodeEncodeError(pos)\n return [bytes(b),len(input)]\n \n def decode(self,input,errors='strict'):\n i=0\n string=''\n while i self.maxlen:\n self.popleft()\n \n def appendleft(self,x):\n self.state +=1\n self.leftndx -=1\n if self.leftndx ==-1:\n newblock=[None ]*BLOCKSIZ\n self.left[LFTLNK]=newblock\n newblock[RGTLNK]=self.left\n self.left=newblock\n self.leftndx=n -1\n self.length +=1\n self.left[self.leftndx]=x\n if self.maxlen is not None and self.length >self.maxlen:\n self.pop()\n \n def extend(self,iterable):\n if iterable is self:\n iterable=list(iterable)\n for elem in iterable:\n self.append(elem)\n \n def extendleft(self,iterable):\n if iterable is self:\n iterable=list(iterable)\n for elem in iterable:\n self.appendleft(elem)\n \n def pop(self):\n if self.left is self.right and self.leftndx >self.rightndx:\n \n raise IndexError(\"pop from an empty deque\")\n x=self.right[self.rightndx]\n self.right[self.rightndx]=None\n self.length -=1\n self.rightndx -=1\n self.state +=1\n if self.rightndx ==-1:\n prevblock=self.right[LFTLNK]\n if prevblock is None :\n \n self.rightndx=n //2\n self.leftndx=n //2+1\n else :\n prevblock[RGTLNK]=None\n self.right[LFTLNK]=None\n self.right=prevblock\n self.rightndx=n -1\n return x\n \n def popleft(self):\n if self.left is self.right and self.leftndx >self.rightndx:\n \n raise IndexError(\"pop from an empty deque\")\n x=self.left[self.leftndx]\n self.left[self.leftndx]=None\n self.length -=1\n self.leftndx +=1\n self.state +=1\n if self.leftndx ==n:\n prevblock=self.left[RGTLNK]\n if prevblock is None :\n \n self.rightndx=n //2\n self.leftndx=n //2+1\n else :\n prevblock[LFTLNK]=None\n self.left[RGTLNK]=None\n self.left=prevblock\n self.leftndx=0\n return x\n \n def count(self,value):\n c=0\n for item in self:\n if item ==value:\n c +=1\n return c\n \n def remove(self,value):\n \n for i in range(len(self)):\n if self[i]==value:\n del self[i]\n return\n raise ValueError(\"deque.remove(x): x not in deque\")\n \n def rotate(self,n=1):\n length=len(self)\n if length ==0:\n return\n halflen=(length+1)>>1\n if n >halflen or n <-halflen:\n n %=length\n if n >halflen:\n n -=length\n elif n <-halflen:\n n +=length\n while n >0:\n self.appendleft(self.pop())\n n -=1\n while n <0:\n self.append(self.popleft())\n n +=1\n \n def reverse(self):\n ''\n leftblock=self.left\n rightblock=self.right\n leftindex=self.leftndx\n rightindex=self.rightndx\n for i in range(self.length //2):\n \n assert leftblock !=rightblock or leftindex =0:\n block=self.left\n while block:\n l,r=0,n\n if block is self.left:\n l=self.leftndx\n if block is self.right:\n r=self.rightndx+1\n span=r -l\n if index =negative_span:\n return block,r+index\n index -=negative_span\n block=block[LFTLNK]\n raise IndexError(\"deque index out of range\")\n \n def __getitem__(self,index):\n block,index=self.__getref(index)\n return block[index]\n \n def __setitem__(self,index,value):\n block,index=self.__getref(index)\n block[index]=value\n \n def __delitem__(self,index):\n length=len(self)\n if index >=0:\n if index >=length:\n raise IndexError(\"deque index out of range\")\n self.rotate(-index)\n self.popleft()\n self.rotate(index)\n else :\n \n index=index ^(2 **31)\n if index >=length:\n raise IndexError(\"deque index out of range\")\n self.rotate(index)\n self.pop()\n self.rotate(-index)\n \n def __reduce_ex__(self,proto):\n return type(self),(list(self),self.maxlen)\n \n def __hash__(self):\n \n raise TypeError(\"deque objects are unhashable\")\n \n def __copy__(self):\n return self.__class__(self,self.maxlen)\n \n \n def __eq__(self,other):\n if isinstance(other,deque):\n return list(self)==list(other)\n else :\n return NotImplemented\n \n def __ne__(self,other):\n if isinstance(other,deque):\n return list(self)!=list(other)\n else :\n return NotImplemented\n \n def __lt__(self,other):\n if isinstance(other,deque):\n return list(self)list(other)\n else :\n return NotImplemented\n \n def __ge__(self,other):\n if isinstance(other,deque):\n return list(self)>=list(other)\n else :\n return NotImplemented\n \n def __iadd__(self,other):\n self.extend(other)\n return self\n \n \nclass deque_iterator(object):\n\n def __init__(self,deq,itergen):\n self.counter=len(deq)\n def giveup():\n self.counter=0\n \n raise RuntimeError(\"deque mutated during iteration\")\n self._gen=itergen(deq.state,giveup)\n \n def __next__(self):\n res=self._gen.__next__()\n self.counter -=1\n return res\n \n def __iter__(self):\n return self\n \nclass defaultdict(dict):\n\n def __init__(self,*args,**kwds):\n if len(args)>0:\n default_factory=args[0]\n args=args[1:]\n if not callable(default_factory)and default_factory is not None :\n raise TypeError(\"first argument must be callable\")\n else :\n default_factory=None\n dict.__init__(self,*args,**kwds)\n self.default_factory=default_factory\n self.update(*args,**kwds)\n super(defaultdict,self).__init__(*args,**kwds)\n \n def __missing__(self,key):\n \n if self.default_factory is None :\n raise KeyError(key)\n self[key]=value=self.default_factory()\n return value\n \n def __repr__(self,recurse=set()):\n if id(self)in recurse:\n return \"defaultdict(...)\"\n try :\n recurse.add(id(self))\n return \"defaultdict(%s, %s)\"%(repr(self.default_factory),super(defaultdict,self).__repr__())\n finally :\n recurse.remove(id(self))\n \n def copy(self):\n return type(self)(self.default_factory,self)\n \n def __copy__(self):\n return self.copy()\n \n def __reduce__(self):\n \n \n \n \n \n \n \n \n \n \n \n return (type(self),(self.default_factory,),None ,None ,self.items())\n \nfrom operator import itemgetter as _itemgetter\nfrom keyword import iskeyword as _iskeyword\nimport sys as _sys\n\ndef namedtuple(typename,field_names,verbose=False ,rename=False ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n if isinstance(field_names,str):\n field_names=field_names.replace(',',' ').split()\n field_names=tuple(map(str,field_names))\n if rename:\n names=list(field_names)\n seen=set()\n for i,name in enumerate(names):\n if (not min(c.isalnum()or c =='_'for c in name)or _iskeyword(name)\n or not name or name[0].isdigit()or name.startswith('_')\n or name in seen):\n names[i]='_%d'%i\n seen.add(name)\n field_names=tuple(names)\n for name in (typename,)+field_names:\n if not min(c.isalnum()or c =='_'for c in name):\n raise ValueError('Type names and field names can only contain alphanumeric characters and underscores: %r'%name)\n if _iskeyword(name):\n raise ValueError('Type names and field names cannot be a keyword: %r'%name)\n if name[0].isdigit():\n raise ValueError('Type names and field names cannot start with a number: %r'%name)\n seen_names=set()\n for name in field_names:\n if name.startswith('_')and not rename:\n raise ValueError('Field names cannot start with an underscore: %r'%name)\n if name in seen_names:\n raise ValueError('Encountered duplicate field name: %r'%name)\n seen_names.add(name)\n \n \n numfields=len(field_names)\n argtxt=repr(field_names).replace(\"'\",\"\")[1:-1]\n reprtxt=', '.join('%s=%%r'%name for name in field_names)\n \n template='''class %(typename)s(tuple):\n '%(typename)s(%(argtxt)s)' \\n\n __slots__ = () \\n\n _fields = %(field_names)r \\n\n def __new__(_cls, %(argtxt)s):\n return tuple.__new__(_cls, (%(argtxt)s)) \\n\n @classmethod\n def _make(cls, iterable, new=tuple.__new__, len=len):\n 'Make a new %(typename)s object from a sequence or iterable'\n result = new(cls, iterable)\n if len(result) != %(numfields)d:\n raise TypeError('Expected %(numfields)d arguments, got %%d' %% len(result))\n return result \\n\n def __repr__(self):\n return '%(typename)s(%(reprtxt)s)' %% self \\n\n def _asdict(self):\n 'Return a new dict which maps field names to their values'\n return dict(zip(self._fields, self)) \\n\n def _replace(_self, **kwds):\n 'Return a new %(typename)s object replacing specified fields with new values'\n result = _self._make(map(kwds.pop, %(field_names)r, _self))\n if kwds:\n raise ValueError('Got unexpected field names: %%r' %% kwds.keys())\n return result \\n\n def __getnewargs__(self):\n return tuple(self) \\n\\n'''%locals()\n for i,name in enumerate(field_names):\n template +=' %s = _property(_itemgetter(%d))\\n'%(name,i)\n \n if verbose:\n print(template)\n \n \n namespace=dict(_itemgetter=_itemgetter,__name__='namedtuple_%s'%typename,\n _property=property,_tuple=tuple)\n try :\n exec(template,namespace)\n except SyntaxError as e:\n raise SyntaxError(e.message+':\\n'+template)\n result=namespace[typename]\n \n \n \n \n \n try :\n result.__module__=_sys._getframe(1).f_globals.get('__name__','__main__')\n except (AttributeError,ValueError):\n pass\n \n return result\n \nif __name__ =='__main__':\n Point=namedtuple('Point',['x','y'])\n p=Point(11,y=22)\n print(p[0]+p[1])\n x,y=p\n print(x,y)\n print(p.x+p.y)\n print(p)\n", ["keyword", "operator", "sys"]], "_collections_abc": [".py", "\n\n\n\"\"\"Abstract Base Classes (ABCs) for collections, according to PEP 3119.\n\nUnit tests are in test_collections.\n\"\"\"\n\nfrom abc import ABCMeta,abstractmethod\nimport sys\n\nGenericAlias=type(list[int])\nEllipsisType=type(...)\ndef _f():pass\nFunctionType=type(_f)\ndel _f\n\n__all__=[\"Awaitable\",\"Coroutine\",\n\"AsyncIterable\",\"AsyncIterator\",\"AsyncGenerator\",\n\"Hashable\",\"Iterable\",\"Iterator\",\"Generator\",\"Reversible\",\n\"Sized\",\"Container\",\"Callable\",\"Collection\",\n\"Set\",\"MutableSet\",\n\"Mapping\",\"MutableMapping\",\n\"MappingView\",\"KeysView\",\"ItemsView\",\"ValuesView\",\n\"Sequence\",\"MutableSequence\",\n\"ByteString\",\n]\n\n\n\n\n\n__name__=\"collections.abc\"\n\n\n\n\n\n\n\n\nbytes_iterator=type(iter(b''))\nbytearray_iterator=type(iter(bytearray()))\n\ndict_keyiterator=type(iter({}.keys()))\ndict_valueiterator=type(iter({}.values()))\ndict_itemiterator=type(iter({}.items()))\nlist_iterator=type(iter([]))\nlist_reverseiterator=type(iter(reversed([])))\nrange_iterator=type(iter(range(0)))\nlongrange_iterator=type(iter(range(1 <<1000)))\nset_iterator=type(iter(set()))\nstr_iterator=type(iter(\"\"))\ntuple_iterator=type(iter(()))\nzip_iterator=type(iter(zip()))\n\ndict_keys=type({}.keys())\ndict_values=type({}.values())\ndict_items=type({}.items())\n\nmappingproxy=type(type.__dict__)\ngenerator=type((lambda :(yield ))())\n\nasync def _coro():pass\n_coro=_coro()\ncoroutine=type(_coro)\n_coro.close()\ndel _coro\n\nasync def _ag():yield\n_ag=_ag()\nasync_generator=type(_ag)\ndel _ag\n\n\n\n\ndef _check_methods(C,*methods):\n mro=C.__mro__\n for method in methods:\n for B in mro:\n if method in B.__dict__:\n if B.__dict__[method]is None :\n return NotImplemented\n break\n else :\n return NotImplemented\n return True\n \nclass Hashable(metaclass=ABCMeta):\n\n __slots__=()\n \n @abstractmethod\n def __hash__(self):\n return 0\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Hashable:\n return _check_methods(C,\"__hash__\")\n return NotImplemented\n \n \nclass Awaitable(metaclass=ABCMeta):\n\n __slots__=()\n \n @abstractmethod\n def __await__(self):\n yield\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Awaitable:\n return _check_methods(C,\"__await__\")\n return NotImplemented\n \n __class_getitem__=classmethod(GenericAlias)\n \n \nclass Coroutine(Awaitable):\n\n __slots__=()\n \n @abstractmethod\n def send(self,value):\n ''\n\n \n raise StopIteration\n \n @abstractmethod\n def throw(self,typ,val=None ,tb=None ):\n ''\n\n \n if val is None :\n if tb is None :\n raise typ\n val=typ()\n if tb is not None :\n val=val.with_traceback(tb)\n raise val\n \n def close(self):\n ''\n \n try :\n self.throw(GeneratorExit)\n except (GeneratorExit,StopIteration):\n pass\n else :\n raise RuntimeError(\"coroutine ignored GeneratorExit\")\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Coroutine:\n return _check_methods(C,'__await__','send','throw','close')\n return NotImplemented\n \n \nCoroutine.register(coroutine)\n\n\nclass AsyncIterable(metaclass=ABCMeta):\n\n __slots__=()\n \n @abstractmethod\n def __aiter__(self):\n return AsyncIterator()\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is AsyncIterable:\n return _check_methods(C,\"__aiter__\")\n return NotImplemented\n \n __class_getitem__=classmethod(GenericAlias)\n \n \nclass AsyncIterator(AsyncIterable):\n\n __slots__=()\n \n @abstractmethod\n async def __anext__(self):\n ''\n raise StopAsyncIteration\n \n def __aiter__(self):\n return self\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is AsyncIterator:\n return _check_methods(C,\"__anext__\",\"__aiter__\")\n return NotImplemented\n \n \nclass AsyncGenerator(AsyncIterator):\n\n __slots__=()\n \n async def __anext__(self):\n ''\n\n \n return await self.asend(None )\n \n @abstractmethod\n async def asend(self,value):\n ''\n\n \n raise StopAsyncIteration\n \n @abstractmethod\n async def athrow(self,typ,val=None ,tb=None ):\n ''\n\n \n if val is None :\n if tb is None :\n raise typ\n val=typ()\n if tb is not None :\n val=val.with_traceback(tb)\n raise val\n \n async def aclose(self):\n ''\n \n try :\n await self.athrow(GeneratorExit)\n except (GeneratorExit,StopAsyncIteration):\n pass\n else :\n raise RuntimeError(\"asynchronous generator ignored GeneratorExit\")\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is AsyncGenerator:\n return _check_methods(C,'__aiter__','__anext__',\n 'asend','athrow','aclose')\n return NotImplemented\n \n \nAsyncGenerator.register(async_generator)\n\n\nclass Iterable(metaclass=ABCMeta):\n\n __slots__=()\n \n @abstractmethod\n def __iter__(self):\n while False :\n yield None\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Iterable:\n return _check_methods(C,\"__iter__\")\n return NotImplemented\n \n __class_getitem__=classmethod(GenericAlias)\n \n \nclass Iterator(Iterable):\n\n __slots__=()\n \n @abstractmethod\n def __next__(self):\n ''\n raise StopIteration\n \n def __iter__(self):\n return self\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Iterator:\n return _check_methods(C,'__iter__','__next__')\n return NotImplemented\n \n \nIterator.register(bytes_iterator)\nIterator.register(bytearray_iterator)\n\nIterator.register(dict_keyiterator)\nIterator.register(dict_valueiterator)\nIterator.register(dict_itemiterator)\nIterator.register(list_iterator)\nIterator.register(list_reverseiterator)\nIterator.register(range_iterator)\nIterator.register(longrange_iterator)\nIterator.register(set_iterator)\nIterator.register(str_iterator)\nIterator.register(tuple_iterator)\nIterator.register(zip_iterator)\n\n\nclass Reversible(Iterable):\n\n __slots__=()\n \n @abstractmethod\n def __reversed__(self):\n while False :\n yield None\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Reversible:\n return _check_methods(C,\"__reversed__\",\"__iter__\")\n return NotImplemented\n \n \nclass Generator(Iterator):\n\n __slots__=()\n \n def __next__(self):\n ''\n\n \n return self.send(None )\n \n @abstractmethod\n def send(self,value):\n ''\n\n \n raise StopIteration\n \n @abstractmethod\n def throw(self,typ,val=None ,tb=None ):\n ''\n\n \n if val is None :\n if tb is None :\n raise typ\n val=typ()\n if tb is not None :\n val=val.with_traceback(tb)\n raise val\n \n def close(self):\n ''\n \n try :\n self.throw(GeneratorExit)\n except (GeneratorExit,StopIteration):\n pass\n else :\n raise RuntimeError(\"generator ignored GeneratorExit\")\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Generator:\n return _check_methods(C,'__iter__','__next__',\n 'send','throw','close')\n return NotImplemented\n \n \nGenerator.register(generator)\n\n\nclass Sized(metaclass=ABCMeta):\n\n __slots__=()\n \n @abstractmethod\n def __len__(self):\n return 0\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Sized:\n return _check_methods(C,\"__len__\")\n return NotImplemented\n \n \nclass Container(metaclass=ABCMeta):\n\n __slots__=()\n \n @abstractmethod\n def __contains__(self,x):\n return False\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Container:\n return _check_methods(C,\"__contains__\")\n return NotImplemented\n \n __class_getitem__=classmethod(GenericAlias)\n \n \nclass Collection(Sized,Iterable,Container):\n\n __slots__=()\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Collection:\n return _check_methods(C,\"__len__\",\"__iter__\",\"__contains__\")\n return NotImplemented\n \n \nclass _CallableGenericAlias(GenericAlias):\n ''\n\n\n\n\n\n\n \n \n __slots__=()\n \n def __new__(cls,origin,args):\n return cls.__create_ga(origin,args)\n \n @classmethod\n def __create_ga(cls,origin,args):\n if not isinstance(args,tuple)or len(args)!=2:\n raise TypeError(\n \"Callable must be used as Callable[[arg, ...], result].\")\n t_args,t_result=args\n if isinstance(t_args,(list,tuple)):\n ga_args=tuple(t_args)+(t_result,)\n \n \n \n else :\n ga_args=args\n return super().__new__(cls,origin,ga_args)\n \n @property\n def __parameters__(self):\n params=[]\n for arg in self.__args__:\n \n if hasattr(arg,\"__parameters__\")and isinstance(arg.__parameters__,tuple):\n params.extend(arg.__parameters__)\n else :\n if _is_typevarlike(arg):\n params.append(arg)\n return tuple(dict.fromkeys(params))\n \n def __repr__(self):\n if _has_special_args(self.__args__):\n return super().__repr__()\n return (f'collections.abc.Callable'\n f'[[{\", \".join([_type_repr(a) for a in self.__args__[:-1]])}], '\n f'{_type_repr(self.__args__[-1])}]')\n \n def __reduce__(self):\n args=self.__args__\n if not _has_special_args(args):\n args=list(args[:-1]),args[-1]\n return _CallableGenericAlias,(Callable,args)\n \n def __getitem__(self,item):\n \n \n \n \n \n \n \n param_len=len(self.__parameters__)\n if param_len ==0:\n raise TypeError(f'{self} is not a generic class')\n if (param_len ==1\n and isinstance(item,(tuple,list))\n and len(item)>1)or not isinstance(item,tuple):\n item=(item,)\n item_len=len(item)\n if item_len !=param_len:\n raise TypeError(f'Too {\"many\" if item_len > param_len else \"few\"}'\n f' arguments for {self};'\n f' actual {item_len}, expected {param_len}')\n subst=dict(zip(self.__parameters__,item))\n new_args=[]\n for arg in self.__args__:\n if _is_typevarlike(arg):\n arg=subst[arg]\n \n elif hasattr(arg,'__parameters__')and isinstance(arg.__parameters__,tuple):\n subparams=arg.__parameters__\n if subparams:\n subargs=tuple(subst[x]for x in subparams)\n arg=arg[subargs]\n new_args.append(arg)\n \n \n if not isinstance(new_args[0],(tuple,list)):\n t_result=new_args[-1]\n t_args=new_args[:-1]\n new_args=(t_args,t_result)\n return _CallableGenericAlias(Callable,tuple(new_args))\n \ndef _is_typevarlike(arg):\n obj=type(arg)\n \n return (obj.__module__ =='typing'\n and obj.__name__ in {'ParamSpec','TypeVar'})\n \ndef _has_special_args(args):\n ''\n\n \n if len(args)!=2:\n return False\n obj=args[0]\n if obj is Ellipsis:\n return True\n obj=type(obj)\n names=('ParamSpec','_ConcatenateGenericAlias')\n return obj.__module__ =='typing'and any(obj.__name__ ==name for name in names)\n \n \ndef _type_repr(obj):\n ''\n\n\n\n \n if isinstance(obj,GenericAlias):\n return repr(obj)\n if isinstance(obj,type):\n if obj.__module__ =='builtins':\n return obj.__qualname__\n return f'{obj.__module__}.{obj.__qualname__}'\n if obj is Ellipsis:\n return '...'\n if isinstance(obj,FunctionType):\n return obj.__name__\n return repr(obj)\n \n \nclass Callable(metaclass=ABCMeta):\n\n __slots__=()\n \n @abstractmethod\n def __call__(self,*args,**kwds):\n return False\n \n @classmethod\n def __subclasshook__(cls,C):\n if cls is Callable:\n return _check_methods(C,\"__call__\")\n return NotImplemented\n \n __class_getitem__=classmethod(_CallableGenericAlias)\n \n \n \n \n \nclass Set(Collection):\n ''\n\n\n\n\n\n\n\n \n \n __slots__=()\n \n def __le__(self,other):\n if not isinstance(other,Set):\n return NotImplemented\n if len(self)>len(other):\n return False\n for elem in self:\n if elem not in other:\n return False\n return True\n \n def __lt__(self,other):\n if not isinstance(other,Set):\n return NotImplemented\n return len(self)len(other)and self.__ge__(other)\n \n def __ge__(self,other):\n if not isinstance(other,Set):\n return NotImplemented\n if len(self)>11)^(h >>25)\n h=h *69069+907133923\n h &=MASK\n if h >MAX:\n h -=MASK+1\n if h ==-1:\n h=590923713\n return h\n \n \nSet.register(frozenset)\n\n\nclass MutableSet(Set):\n ''\n\n\n\n\n\n\n\n\n \n \n __slots__=()\n \n @abstractmethod\n def add(self,value):\n ''\n raise NotImplementedError\n \n @abstractmethod\n def discard(self,value):\n ''\n raise NotImplementedError\n \n def remove(self,value):\n ''\n if value not in self:\n raise KeyError(value)\n self.discard(value)\n \n def pop(self):\n ''\n it=iter(self)\n try :\n value=next(it)\n except StopIteration:\n raise KeyError from None\n self.discard(value)\n return value\n \n def clear(self):\n ''\n try :\n while True :\n self.pop()\n except KeyError:\n pass\n \n def __ior__(self,it):\n for value in it:\n self.add(value)\n return self\n \n def __iand__(self,it):\n for value in (self -it):\n self.discard(value)\n return self\n \n def __ixor__(self,it):\n if it is self:\n self.clear()\n else :\n if not isinstance(it,Set):\n it=self._from_iterable(it)\n for value in it:\n if value in self:\n self.discard(value)\n else :\n self.add(value)\n return self\n \n def __isub__(self,it):\n if it is self:\n self.clear()\n else :\n for value in it:\n self.discard(value)\n return self\n \n \nMutableSet.register(set)\n\n\n\n\nclass Mapping(Collection):\n ''\n\n\n\n\n \n \n __slots__=()\n \n \n __abc_tpflags__=1 <<6\n \n @abstractmethod\n def __getitem__(self,key):\n raise KeyError\n \n def get(self,key,default=None ):\n ''\n try :\n return self[key]\n except KeyError:\n return default\n \n def __contains__(self,key):\n try :\n self[key]\n except KeyError:\n return False\n else :\n return True\n \n def keys(self):\n ''\n return KeysView(self)\n \n def items(self):\n ''\n return ItemsView(self)\n \n def values(self):\n ''\n return ValuesView(self)\n \n def __eq__(self,other):\n if not isinstance(other,Mapping):\n return NotImplemented\n return dict(self.items())==dict(other.items())\n \n __reversed__=None\n \nMapping.register(mappingproxy)\n\n\nclass MappingView(Sized):\n\n __slots__='_mapping',\n \n def __init__(self,mapping):\n self._mapping=mapping\n \n def __len__(self):\n return len(self._mapping)\n \n def __repr__(self):\n return '{0.__class__.__name__}({0._mapping!r})'.format(self)\n \n __class_getitem__=classmethod(GenericAlias)\n \n \nclass KeysView(MappingView,Set):\n\n __slots__=()\n \n @classmethod\n def _from_iterable(self,it):\n return set(it)\n \n def __contains__(self,key):\n return key in self._mapping\n \n def __iter__(self):\n yield from self._mapping\n \n \nKeysView.register(dict_keys)\n\n\nclass ItemsView(MappingView,Set):\n\n __slots__=()\n \n @classmethod\n def _from_iterable(self,it):\n return set(it)\n \n def __contains__(self,item):\n key,value=item\n try :\n v=self._mapping[key]\n except KeyError:\n return False\n else :\n return v is value or v ==value\n \n def __iter__(self):\n for key in self._mapping:\n yield (key,self._mapping[key])\n \n \nItemsView.register(dict_items)\n\n\nclass ValuesView(MappingView,Collection):\n\n __slots__=()\n \n def __contains__(self,value):\n for key in self._mapping:\n v=self._mapping[key]\n if v is value or v ==value:\n return True\n return False\n \n def __iter__(self):\n for key in self._mapping:\n yield self._mapping[key]\n \n \nValuesView.register(dict_values)\n\n\nclass MutableMapping(Mapping):\n ''\n\n\n\n\n\n \n \n __slots__=()\n \n @abstractmethod\n def __setitem__(self,key,value):\n raise KeyError\n \n @abstractmethod\n def __delitem__(self,key):\n raise KeyError\n \n __marker=object()\n \n def pop(self,key,default=__marker):\n ''\n\n \n try :\n value=self[key]\n except KeyError:\n if default is self.__marker:\n raise\n return default\n else :\n del self[key]\n return value\n \n def popitem(self):\n ''\n\n \n try :\n key=next(iter(self))\n except StopIteration:\n raise KeyError from None\n value=self[key]\n del self[key]\n return key,value\n \n def clear(self):\n ''\n try :\n while True :\n self.popitem()\n except KeyError:\n pass\n \n def update(self,other=(),/,**kwds):\n ''\n\n\n\n \n if isinstance(other,Mapping):\n for key in other:\n self[key]=other[key]\n elif hasattr(other,\"keys\"):\n for key in other.keys():\n self[key]=other[key]\n else :\n for key,value in other:\n self[key]=value\n for key,value in kwds.items():\n self[key]=value\n \n def setdefault(self,key,default=None ):\n ''\n try :\n return self[key]\n except KeyError:\n self[key]=default\n return default\n \n \nMutableMapping.register(dict)\n\n\n\n\nclass Sequence(Reversible,Collection):\n ''\n\n\n\n \n \n __slots__=()\n \n \n __abc_tpflags__=1 <<5\n \n @abstractmethod\n def __getitem__(self,index):\n raise IndexError\n \n def __iter__(self):\n i=0\n try :\n while True :\n v=self[i]\n yield v\n i +=1\n except IndexError:\n return\n \n def __contains__(self,value):\n for v in self:\n if v is value or v ==value:\n return True\n return False\n \n def __reversed__(self):\n for i in reversed(range(len(self))):\n yield self[i]\n \n def index(self,value,start=0,stop=None ):\n ''\n\n\n\n\n \n if start is not None and start <0:\n start=max(len(self)+start,0)\n if stop is not None and stop <0:\n stop +=len(self)\n \n i=start\n while stop is None or i 0:\n data=self.read(min(io.DEFAULT_BUFFER_SIZE,offset))\n if not data:\n break\n offset -=len(data)\n \n return self._pos\n \n def tell(self):\n ''\n return self._pos\n", ["io", "sys"]], "_contextvars": [".py", "''\n\n\nclass Context(object):\n\n __contains__=\"\"\n \n copy=\"\"\n \n def get(self,*args):\n pass\n \n items=\"\"\n \n keys=\"\"\n \n run=\"\"\n \n values=\"\"\n \nclass ContextVar:\n\n def __init__(self,name,**kw):\n ''\n self.name=name\n if \"default\"in kw:\n self.default=kw[\"default\"]\n \n def get(self,*args):\n if hasattr(self,\"value\"):\n return self.value\n elif len(args)==1:\n return args[0]\n elif hasattr(self,\"default\"):\n return self.default\n raise LookupError(self.name)\n \n def reset(self,token):\n if token.old_value ==Token.MISSING:\n del self.value\n else :\n self.value=token.old_value\n \n def set(self,value):\n self.value=value\n return Token(self)\n \nclass Token(object):\n\n MISSING=\"\"\n \n def __init__(self,contextvar):\n self.var=contextvar\n try :\n self.old_value=contextvar.get()\n except LookupError:\n self.old_value=Token.MISSING\n \ndef copy_context(*args,**kw):\n pass\n", []], "_csv": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__version__=\"1.0\"\n\nQUOTE_MINIMAL,QUOTE_ALL,QUOTE_NONNUMERIC,QUOTE_NONE=range(4)\n_dialects={}\n_field_limit=128 *1024\n\nclass Error(Exception):\n pass\n \nclass Dialect(object):\n ''\n\n \n \n __slots__=[\"_delimiter\",\"_doublequote\",\"_escapechar\",\n \"_lineterminator\",\"_quotechar\",\"_quoting\",\n \"_skipinitialspace\",\"_strict\"]\n \n def __new__(cls,dialect,**kwargs):\n \n for name in kwargs:\n if '_'+name not in Dialect.__slots__:\n raise TypeError(\"unexpected keyword argument '%s'\"%\n (name,))\n \n if dialect is not None :\n if isinstance(dialect,str):\n dialect=get_dialect(dialect)\n \n \n if (isinstance(dialect,Dialect)\n and all(value is None for value in kwargs.values())):\n return dialect\n \n self=object.__new__(cls)\n \n \n def set_char(x):\n if x is None :\n return None\n if isinstance(x,str)and len(x)<=1:\n return x\n raise TypeError(\"%r must be a 1-character string\"%(name,))\n def set_str(x):\n if isinstance(x,str):\n return x\n raise TypeError(\"%r must be a string\"%(name,))\n def set_quoting(x):\n if x in range(4):\n return x\n raise TypeError(\"bad 'quoting' value\")\n \n attributes={\"delimiter\":(',',set_char),\n \"doublequote\":(True ,bool),\n \"escapechar\":(None ,set_char),\n \"lineterminator\":(\"\\r\\n\",set_str),\n \"quotechar\":('\"',set_char),\n \"quoting\":(QUOTE_MINIMAL,set_quoting),\n \"skipinitialspace\":(False ,bool),\n \"strict\":(False ,bool),\n }\n \n \n notset=object()\n for name in Dialect.__slots__:\n name=name[1:]\n value=notset\n if name in kwargs:\n value=kwargs[name]\n elif dialect is not None :\n value=getattr(dialect,name,notset)\n \n \n if value is notset:\n value=attributes[name][0]\n if name =='quoting'and not self.quotechar:\n value=QUOTE_NONE\n else :\n converter=attributes[name][1]\n if converter:\n value=converter(value)\n \n setattr(self,'_'+name,value)\n \n if not self.delimiter:\n raise TypeError(\"delimiter must be set\")\n \n if self.quoting !=QUOTE_NONE and not self.quotechar:\n raise TypeError(\"quotechar must be set if quoting enabled\")\n \n if not self.lineterminator:\n raise TypeError(\"lineterminator must be set\")\n \n return self\n \n delimiter=property(lambda self:self._delimiter)\n doublequote=property(lambda self:self._doublequote)\n escapechar=property(lambda self:self._escapechar)\n lineterminator=property(lambda self:self._lineterminator)\n quotechar=property(lambda self:self._quotechar)\n quoting=property(lambda self:self._quoting)\n skipinitialspace=property(lambda self:self._skipinitialspace)\n strict=property(lambda self:self._strict)\n \n \ndef _call_dialect(dialect_inst,kwargs):\n return Dialect(dialect_inst,**kwargs)\n \ndef register_dialect(name,dialect=None ,**kwargs):\n ''\n \n if not isinstance(name,str):\n raise TypeError(\"dialect name must be a string or unicode\")\n \n dialect=_call_dialect(dialect,kwargs)\n _dialects[name]=dialect\n \ndef unregister_dialect(name):\n ''\n \n try :\n del _dialects[name]\n except KeyError:\n raise Error(\"unknown dialect\")\n \ndef get_dialect(name):\n ''\n \n try :\n return _dialects[name]\n except KeyError:\n raise Error(\"unknown dialect\")\n \ndef list_dialects():\n ''\n \n return list(_dialects)\n \nclass Reader(object):\n ''\n\n\n \n \n \n (START_RECORD,START_FIELD,ESCAPED_CHAR,IN_FIELD,\n IN_QUOTED_FIELD,ESCAPE_IN_QUOTED_FIELD,QUOTE_IN_QUOTED_FIELD,\n EAT_CRNL)=range(8)\n \n def __init__(self,iterator,dialect=None ,**kwargs):\n self.dialect=_call_dialect(dialect,kwargs)\n \n \n \n self._delimiter=self.dialect.delimiter if self.dialect.delimiter else '\\0'\n self._quotechar=self.dialect.quotechar if self.dialect.quotechar else '\\0'\n self._escapechar=self.dialect.escapechar if self.dialect.escapechar else '\\0'\n self._doublequote=self.dialect.doublequote\n self._quoting=self.dialect.quoting\n self._skipinitialspace=self.dialect.skipinitialspace\n self._strict=self.dialect.strict\n \n self.input_iter=iter(iterator)\n self.line_num=0\n \n self._parse_reset()\n \n def _parse_reset(self):\n self.field=''\n self.fields=[]\n self.state=self.START_RECORD\n self.numeric_field=False\n \n def __iter__(self):\n return self\n \n def __next__(self):\n self._parse_reset()\n while True :\n try :\n line=next(self.input_iter)\n except StopIteration:\n \n if len(self.field)>0:\n raise Error(\"newline inside string\")\n raise\n \n self.line_num +=1\n \n if '\\0'in line:\n raise Error(\"line contains NULL byte\")\n self._parse_process_char(line)\n self._parse_eol()\n \n if self.state ==self.START_RECORD:\n break\n \n fields=self.fields\n self.fields=[]\n return fields\n \n def _parse_process_char(self,line):\n pos=0\n while pos pos:\n self._parse_add_str(line[pos:pos2])\n pos=pos2\n self._parse_save_field()\n self.state=self.EAT_CRNL\n break\n elif line[pos2]==self._escapechar[0]:\n \n if pos2 >pos:\n self._parse_add_str(line[pos:pos2])\n pos=pos2\n self.state=self.ESCAPED_CHAR\n break\n elif line[pos2]==self._delimiter[0]:\n \n if pos2 >pos:\n self._parse_add_str(line[pos:pos2])\n pos=pos2\n self._parse_save_field()\n self.state=self.START_FIELD\n break\n \n pos2 +=1\n else :\n if pos2 >pos:\n self._parse_add_str(line[pos:pos2])\n pos=pos2\n continue\n \n elif self.state ==self.START_RECORD:\n if line[pos]=='\\n'or line[pos]=='\\r':\n self.state=self.EAT_CRNL\n else :\n self.state=self.START_FIELD\n \n continue\n \n elif self.state ==self.START_FIELD:\n if line[pos]=='\\n'or line[pos]=='\\r':\n \n self._parse_save_field()\n self.state=self.EAT_CRNL\n elif (line[pos]==self._quotechar[0]\n and self._quoting !=QUOTE_NONE):\n \n self.state=self.IN_QUOTED_FIELD\n elif line[pos]==self._escapechar[0]:\n \n self.state=self.ESCAPED_CHAR\n elif self._skipinitialspace and line[pos]==' ':\n \n pass\n elif line[pos]==self._delimiter[0]:\n \n self._parse_save_field()\n else :\n \n if self._quoting ==QUOTE_NONNUMERIC:\n self.numeric_field=True\n self.state=self.IN_FIELD\n continue\n \n elif self.state ==self.ESCAPED_CHAR:\n self._parse_add_char(line[pos])\n self.state=self.IN_FIELD\n \n elif self.state ==self.IN_QUOTED_FIELD:\n if line[pos]==self._escapechar:\n \n self.state=self.ESCAPE_IN_QUOTED_FIELD\n elif (line[pos]==self._quotechar\n and self._quoting !=QUOTE_NONE):\n if self._doublequote:\n \n self.state=self.QUOTE_IN_QUOTED_FIELD\n else :\n \n self.state=self.IN_FIELD\n else :\n \n self._parse_add_char(line[pos])\n \n elif self.state ==self.ESCAPE_IN_QUOTED_FIELD:\n self._parse_add_char(line[pos])\n self.state=self.IN_QUOTED_FIELD\n \n elif self.state ==self.QUOTE_IN_QUOTED_FIELD:\n \n if (line[pos]==self._quotechar\n and self._quoting !=QUOTE_NONE):\n \n self._parse_add_char(line[pos])\n self.state=self.IN_QUOTED_FIELD\n elif line[pos]==self._delimiter[0]:\n \n self._parse_save_field()\n self.state=self.START_FIELD\n elif line[pos]=='\\r'or line[pos]=='\\n':\n \n self._parse_save_field()\n self.state=self.EAT_CRNL\n elif not self._strict:\n self._parse_add_char(line[pos])\n self.state=self.IN_FIELD\n else :\n raise Error(\"'%c' expected after '%c'\"%\n (self._delimiter,self._quotechar))\n \n elif self.state ==self.EAT_CRNL:\n if line[pos]=='\\r'or line[pos]=='\\n':\n pass\n else :\n raise Error(\"new-line character seen in unquoted field - \"\n \"do you need to open the file \"\n \"in universal-newline mode?\")\n \n else :\n raise RuntimeError(\"unknown state: %r\"%(self.state,))\n \n pos +=1\n \n def _parse_eol(self):\n if self.state ==self.EAT_CRNL:\n self.state=self.START_RECORD\n elif self.state ==self.START_RECORD:\n \n pass\n elif self.state ==self.IN_FIELD:\n \n \n self._parse_save_field()\n self.state=self.START_RECORD\n elif self.state ==self.START_FIELD:\n \n self._parse_save_field()\n self.state=self.START_RECORD\n elif self.state ==self.ESCAPED_CHAR:\n self._parse_add_char('\\n')\n self.state=self.IN_FIELD\n elif self.state ==self.IN_QUOTED_FIELD:\n pass\n elif self.state ==self.ESCAPE_IN_QUOTED_FIELD:\n self._parse_add_char('\\n')\n self.state=self.IN_QUOTED_FIELD\n elif self.state ==self.QUOTE_IN_QUOTED_FIELD:\n \n self._parse_save_field()\n self.state=self.START_RECORD\n else :\n raise RuntimeError(\"unknown state: %r\"%(self.state,))\n \n def _parse_save_field(self):\n field,self.field=self.field,''\n if self.numeric_field:\n self.numeric_field=False\n field=float(field)\n self.fields.append(field)\n \n def _parse_add_char(self,c):\n if len(self.field)+1 >_field_limit:\n raise Error(\"field larget than field limit (%d)\"%(_field_limit))\n self.field +=c\n \n def _parse_add_str(self,s):\n if len(self.field)+len(s)>_field_limit:\n raise Error(\"field larget than field limit (%d)\"%(_field_limit))\n self.field +=s\n \n \nclass Writer(object):\n ''\n\n\n \n \n def __init__(self,file,dialect=None ,**kwargs):\n if not (hasattr(file,'write')and callable(file.write)):\n raise TypeError(\"argument 1 must have a 'write' method\")\n self.writeline=file.write\n self.dialect=_call_dialect(dialect,kwargs)\n \n def _join_reset(self):\n self.rec=[]\n self.num_fields=0\n \n def _join_append(self,field,quoted,quote_empty):\n dialect=self.dialect\n \n if self.num_fields >0:\n self.rec.append(dialect.delimiter)\n \n if dialect.quoting ==QUOTE_NONE:\n need_escape=tuple(dialect.lineterminator)+(\n dialect.escapechar,\n dialect.delimiter,dialect.quotechar)\n \n else :\n for c in tuple(dialect.lineterminator)+(\n dialect.delimiter,dialect.escapechar):\n if c and c in field:\n quoted=True\n \n need_escape=()\n if dialect.quotechar in field:\n if dialect.doublequote:\n field=field.replace(dialect.quotechar,\n dialect.quotechar *2)\n quoted=True\n else :\n need_escape=(dialect.quotechar,)\n \n \n for c in need_escape:\n if c and c in field:\n if not dialect.escapechar:\n raise Error(\"need to escape, but no escapechar set\")\n field=field.replace(c,dialect.escapechar+c)\n \n \n if field ==''and quote_empty:\n if dialect.quoting ==QUOTE_NONE:\n raise Error(\"single empty field record must be quoted\")\n quoted=1\n \n if quoted:\n field=dialect.quotechar+field+dialect.quotechar\n \n self.rec.append(field)\n self.num_fields +=1\n \n \n \n def writerow(self,row):\n dialect=self.dialect\n try :\n rowlen=len(row)\n except TypeError:\n raise Error(\"sequence expected\")\n \n \n self._join_reset()\n \n for field in row:\n quoted=False\n if dialect.quoting ==QUOTE_NONNUMERIC:\n try :\n float(field)\n except :\n quoted=True\n \n \n elif dialect.quoting ==QUOTE_ALL:\n quoted=True\n \n if field is None :\n self._join_append(\"\",quoted,rowlen ==1)\n else :\n self._join_append(str(field),quoted,rowlen ==1)\n \n \n self.rec.append(dialect.lineterminator)\n \n self.writeline(''.join(self.rec))\n \n def writerows(self,rows):\n for row in rows:\n self.writerow(row)\n \ndef reader(*args,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n return Reader(*args,**kwargs)\n \ndef writer(*args,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n return Writer(*args,**kwargs)\n \n \nundefined=object()\ndef field_size_limit(limit=undefined):\n ''\n\n\n\n \n \n global _field_limit\n old_limit=_field_limit\n \n if limit is not undefined:\n if not isinstance(limit,(int,long)):\n raise TypeError(\"int expected, got %s\"%\n (limit.__class__.__name__,))\n _field_limit=limit\n \n return old_limit\n", []], "_dummy_thread": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=['error','start_new_thread','exit','get_ident','allocate_lock',\n'interrupt_main','LockType','RLock']\n\n\nTIMEOUT_MAX=2 **31\n\n\n\n\n\n\nerror=RuntimeError\n\ndef start_new_thread(function,args,kwargs={}):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if type(args)!=type(tuple()):\n raise TypeError(\"2nd arg must be a tuple\")\n if type(kwargs)!=type(dict()):\n raise TypeError(\"3rd arg must be a dict\")\n global _main\n _main=False\n try :\n function(*args,**kwargs)\n except SystemExit:\n pass\n except :\n import traceback\n traceback.print_exc()\n _main=True\n global _interrupt\n if _interrupt:\n _interrupt=False\n raise KeyboardInterrupt\n \ndef exit():\n ''\n raise SystemExit\n \ndef get_ident():\n ''\n\n\n\n\n \n return 1\n \ndef allocate_lock():\n ''\n return LockType()\n \ndef stack_size(size=None ):\n ''\n if size is not None :\n raise error(\"setting thread stack size not supported\")\n return 0\n \ndef _set_sentinel():\n ''\n return LockType()\n \nclass LockType(object):\n ''\n\n\n\n\n\n\n\n \n \n def __init__(self):\n self.locked_status=False\n \n def acquire(self,waitflag=None ,timeout=-1):\n ''\n\n\n\n\n\n\n\n\n \n if waitflag is None or waitflag:\n self.locked_status=True\n return True\n else :\n if not self.locked_status:\n self.locked_status=True\n return True\n else :\n if timeout >0:\n import time\n time.sleep(timeout)\n return False\n \n __enter__=acquire\n \n def __exit__(self,typ,val,tb):\n self.release()\n \n def release(self):\n ''\n \n \n if not self.locked_status:\n raise error\n self.locked_status=False\n return True\n \n def locked(self):\n return self.locked_status\n \n def __repr__(self):\n return \"<%s %s.%s object at %s>\"%(\n \"locked\"if self.locked_status else \"unlocked\",\n self.__class__.__module__,\n self.__class__.__qualname__,\n hex(id(self))\n )\n \n \nclass RLock(LockType):\n ''\n\n\n\n\n\n \n def __init__(self):\n super().__init__()\n self._levels=0\n \n def acquire(self,waitflag=None ,timeout=-1):\n ''\n \n locked=super().acquire(waitflag,timeout)\n if locked:\n self._levels +=1\n return locked\n \n def release(self):\n ''\n \n if self._levels ==0:\n raise error\n if self._levels ==1:\n super().release()\n self._levels -=1\n \n \n_interrupt=False\n\n_main=True\n\ndef interrupt_main():\n ''\n \n if _main:\n raise KeyboardInterrupt\n else :\n global _interrupt\n _interrupt=True\n", ["time", "traceback"]], "_frozen_importlib": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n_bootstrap_external=None\n_thread=None\nimport _weakref\n\nimport _imp\nimport sys\n\ndef _wrap(new,old):\n ''\n for replace in ['__module__','__name__','__qualname__','__doc__']:\n if hasattr(old,replace):\n setattr(new,replace,getattr(old,replace))\n new.__dict__.update(old.__dict__)\n \n \ndef _new_module(name):\n return type(sys)(name)\n \n \n \n \n \n \n_module_locks={}\n\n_blocking_on={}\n\n\nclass _DeadlockError(RuntimeError):\n pass\n \n \nclass _ModuleLock:\n ''\n\n\n \n \n def __init__(self,name):\n self.lock=_thread.allocate_lock()\n self.wakeup=_thread.allocate_lock()\n self.name=name\n self.owner=None\n self.count=0\n self.waiters=0\n \n def has_deadlock(self):\n \n me=_thread.get_ident()\n tid=self.owner\n while True :\n lock=_blocking_on.get(tid)\n if lock is None :\n return False\n tid=lock.owner\n if tid ==me:\n return True\n \n def acquire(self):\n ''\n\n\n\n \n tid=_thread.get_ident()\n _blocking_on[tid]=self\n try :\n while True :\n with self.lock:\n if self.count ==0 or self.owner ==tid:\n self.owner=tid\n self.count +=1\n return True\n if self.has_deadlock():\n raise _DeadlockError('deadlock detected by %r'%self)\n if self.wakeup.acquire(False ):\n self.waiters +=1\n \n self.wakeup.acquire()\n self.wakeup.release()\n finally :\n del _blocking_on[tid]\n \n def release(self):\n tid=_thread.get_ident()\n with self.lock:\n if self.owner !=tid:\n raise RuntimeError('cannot release un-acquired lock')\n assert self.count >0\n self.count -=1\n if self.count ==0:\n self.owner=None\n if self.waiters:\n self.waiters -=1\n self.wakeup.release()\n \n def __repr__(self):\n return '_ModuleLock({!r}) at {}'.format(self.name,id(self))\n \n \nclass _DummyModuleLock:\n ''\n \n \n def __init__(self,name):\n self.name=name\n self.count=0\n \n def acquire(self):\n self.count +=1\n return True\n \n def release(self):\n if self.count ==0:\n raise RuntimeError('cannot release un-acquired lock')\n self.count -=1\n \n def __repr__(self):\n return '_DummyModuleLock({!r}) at {}'.format(self.name,id(self))\n \n \nclass _ModuleLockManager:\n\n def __init__(self,name):\n self._name=name\n self._lock=None\n \n def __enter__(self):\n self._lock=_get_module_lock(self._name)\n self._lock.acquire()\n \n def __exit__(self,*args,**kwargs):\n self._lock.release()\n \n \n \n \ndef _get_module_lock(name):\n ''\n\n\n \n \n _imp.acquire_lock()\n try :\n try :\n lock=_module_locks[name]()\n except KeyError:\n lock=None\n \n if lock is None :\n if _thread is None :\n lock=_DummyModuleLock(name)\n else :\n lock=_ModuleLock(name)\n \n def cb(ref,name=name):\n _imp.acquire_lock()\n try :\n \n \n \n if _module_locks.get(name)is ref:\n del _module_locks[name]\n finally :\n _imp.release_lock()\n \n _module_locks[name]=_weakref.ref(lock,cb)\n finally :\n _imp.release_lock()\n \n return lock\n \n \ndef _lock_unlock_module(name):\n ''\n\n\n\n \n lock=_get_module_lock(name)\n try :\n lock.acquire()\n except _DeadlockError:\n \n \n pass\n else :\n lock.release()\n \n \ndef _call_with_frames_removed(f,*args,**kwds):\n ''\n\n\n\n\n\n \n return f(*args,**kwds)\n \n \ndef _verbose_message(message,*args,verbosity=1):\n ''\n if sys.flags.verbose >=verbosity:\n if not message.startswith(('#','import ')):\n message='# '+message\n print(message.format(*args),file=sys.stderr)\n \n \ndef _requires_builtin(fxn):\n ''\n def _requires_builtin_wrapper(self,fullname):\n if fullname not in sys.builtin_module_names:\n raise ImportError('{!r} is not a built-in module'.format(fullname),\n name=fullname)\n return fxn(self,fullname)\n _wrap(_requires_builtin_wrapper,fxn)\n return _requires_builtin_wrapper\n \n \ndef _requires_frozen(fxn):\n ''\n def _requires_frozen_wrapper(self,fullname):\n if not _imp.is_frozen(fullname):\n raise ImportError('{!r} is not a frozen module'.format(fullname),\n name=fullname)\n return fxn(self,fullname)\n _wrap(_requires_frozen_wrapper,fxn)\n return _requires_frozen_wrapper\n \n \n \ndef _load_module_shim(self,fullname):\n ''\n\n\n\n \n spec=spec_from_loader(fullname,self)\n if fullname in sys.modules:\n module=sys.modules[fullname]\n _exec(spec,module)\n return sys.modules[fullname]\n else :\n return _load(spec)\n \n \n \ndef _module_repr(module):\n\n loader=getattr(module,'__loader__',None )\n if hasattr(loader,'module_repr'):\n \n \n \n try :\n return loader.module_repr(module)\n except Exception:\n pass\n try :\n spec=module.__spec__\n except AttributeError:\n pass\n else :\n if spec is not None :\n return _module_repr_from_spec(spec)\n \n \n \n try :\n name=module.__name__\n except AttributeError:\n name='?'\n try :\n filename=module.__file__\n except AttributeError:\n if loader is None :\n return ''.format(name)\n else :\n return ''.format(name,loader)\n else :\n return ''.format(name,filename)\n \n \nclass _installed_safely:\n\n def __init__(self,module):\n self._module=module\n self._spec=module.__spec__\n \n def __enter__(self):\n \n \n \n self._spec._initializing=True\n sys.modules[self._spec.name]=self._module\n \n def __exit__(self,*args):\n try :\n spec=self._spec\n if any(arg is not None for arg in args):\n try :\n del sys.modules[spec.name]\n except KeyError:\n pass\n else :\n _verbose_message('import {!r} # {!r}',spec.name,spec.loader)\n finally :\n self._spec._initializing=False\n \n \nclass ModuleSpec:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,name,loader,*,origin=None ,loader_state=None ,\n is_package=None ):\n self.name=name\n self.loader=loader\n self.origin=origin\n self.loader_state=loader_state\n self.submodule_search_locations=[]if is_package else None\n \n \n self._set_fileattr=False\n self._cached=None\n \n def __repr__(self):\n args=['name={!r}'.format(self.name),\n 'loader={!r}'.format(self.loader)]\n if self.origin is not None :\n args.append('origin={!r}'.format(self.origin))\n if self.submodule_search_locations is not None :\n args.append('submodule_search_locations={}'\n .format(self.submodule_search_locations))\n return '{}({})'.format(self.__class__.__name__,', '.join(args))\n \n def __eq__(self,other):\n smsl=self.submodule_search_locations\n try :\n return (self.name ==other.name and\n self.loader ==other.loader and\n self.origin ==other.origin and\n smsl ==other.submodule_search_locations and\n self.cached ==other.cached and\n self.has_location ==other.has_location)\n except AttributeError:\n return False\n \n @property\n def cached(self):\n if self._cached is None :\n if self.origin is not None and self._set_fileattr:\n if _bootstrap_external is None :\n raise NotImplementedError\n self._cached=_bootstrap_external._get_cached(self.origin)\n return self._cached\n \n @cached.setter\n def cached(self,cached):\n self._cached=cached\n \n @property\n def parent(self):\n ''\n if self.submodule_search_locations is None :\n return self.name.rpartition('.')[0]\n else :\n return self.name\n \n @property\n def has_location(self):\n return self._set_fileattr\n \n @has_location.setter\n def has_location(self,value):\n self._set_fileattr=bool(value)\n \n \ndef spec_from_loader(name,loader,*,origin=None ,is_package=None ):\n ''\n if hasattr(loader,'get_filename'):\n if _bootstrap_external is None :\n raise NotImplementedError\n spec_from_file_location=_bootstrap_external.spec_from_file_location\n \n if is_package is None :\n return spec_from_file_location(name,loader=loader)\n search=[]if is_package else None\n return spec_from_file_location(name,loader=loader,\n submodule_search_locations=search)\n \n if is_package is None :\n if hasattr(loader,'is_package'):\n try :\n is_package=loader.is_package(name)\n except ImportError:\n is_package=None\n else :\n \n is_package=False\n \n return ModuleSpec(name,loader,origin=origin,is_package=is_package)\n \n \ndef _spec_from_module(module,loader=None ,origin=None ):\n\n try :\n spec=module.__spec__\n except AttributeError:\n pass\n else :\n if spec is not None :\n return spec\n \n name=module.__name__\n if loader is None :\n try :\n loader=module.__loader__\n except AttributeError:\n \n pass\n try :\n location=module.__file__\n except AttributeError:\n location=None\n if origin is None :\n if location is None :\n try :\n origin=loader._ORIGIN\n except AttributeError:\n origin=None\n else :\n origin=location\n try :\n cached=module.__cached__\n except AttributeError:\n cached=None\n try :\n submodule_search_locations=list(module.__path__)\n except AttributeError:\n submodule_search_locations=None\n \n spec=ModuleSpec(name,loader,origin=origin)\n spec._set_fileattr=False if location is None else True\n spec.cached=cached\n spec.submodule_search_locations=submodule_search_locations\n return spec\n \n \ndef _init_module_attrs(spec,module,*,override=False ):\n\n\n\n if (override or getattr(module,'__name__',None )is None ):\n try :\n module.__name__=spec.name\n except AttributeError:\n pass\n \n if override or getattr(module,'__loader__',None )is None :\n loader=spec.loader\n if loader is None :\n \n if spec.submodule_search_locations is not None :\n if _bootstrap_external is None :\n raise NotImplementedError\n _NamespaceLoader=_bootstrap_external._NamespaceLoader\n \n loader=_NamespaceLoader.__new__(_NamespaceLoader)\n loader._path=spec.submodule_search_locations\n spec.loader=loader\n \n \n \n \n \n \n \n \n \n \n module.__file__=None\n try :\n module.__loader__=loader\n except AttributeError:\n pass\n \n if override or getattr(module,'__package__',None )is None :\n try :\n module.__package__=spec.parent\n except AttributeError:\n pass\n \n try :\n module.__spec__=spec\n except AttributeError:\n pass\n \n if override or getattr(module,'__path__',None )is None :\n if spec.submodule_search_locations is not None :\n try :\n module.__path__=spec.submodule_search_locations\n except AttributeError:\n pass\n \n if spec.has_location:\n if override or getattr(module,'__file__',None )is None :\n try :\n module.__file__=spec.origin\n except AttributeError:\n pass\n \n if override or getattr(module,'__cached__',None )is None :\n if spec.cached is not None :\n try :\n module.__cached__=spec.cached\n except AttributeError:\n pass\n return module\n \n \ndef module_from_spec(spec):\n ''\n \n module=None\n if hasattr(spec.loader,'create_module'):\n \n \n module=spec.loader.create_module(spec)\n elif hasattr(spec.loader,'exec_module'):\n raise ImportError('loaders that define exec_module() '\n 'must also define create_module()')\n if module is None :\n module=_new_module(spec.name)\n _init_module_attrs(spec,module)\n return module\n \n \ndef _module_repr_from_spec(spec):\n ''\n \n name='?'if spec.name is None else spec.name\n if spec.origin is None :\n if spec.loader is None :\n return ''.format(name)\n else :\n return ''.format(name,spec.loader)\n else :\n if spec.has_location:\n return ''.format(name,spec.origin)\n else :\n return ''.format(spec.name,spec.origin)\n \n \n \ndef _exec(spec,module):\n ''\n name=spec.name\n with _ModuleLockManager(name):\n if sys.modules.get(name)is not module:\n msg='module {!r} not in sys.modules'.format(name)\n raise ImportError(msg,name=name)\n if spec.loader is None :\n if spec.submodule_search_locations is None :\n raise ImportError('missing loader',name=spec.name)\n \n _init_module_attrs(spec,module,override=True )\n return module\n _init_module_attrs(spec,module,override=True )\n if not hasattr(spec.loader,'exec_module'):\n \n \n \n spec.loader.load_module(name)\n else :\n spec.loader.exec_module(module)\n return sys.modules[name]\n \n \ndef _load_backward_compatible(spec):\n\n\n\n spec.loader.load_module(spec.name)\n \n module=sys.modules[spec.name]\n if getattr(module,'__loader__',None )is None :\n try :\n module.__loader__=spec.loader\n except AttributeError:\n pass\n if getattr(module,'__package__',None )is None :\n try :\n \n \n \n module.__package__=module.__name__\n if not hasattr(module,'__path__'):\n module.__package__=spec.name.rpartition('.')[0]\n except AttributeError:\n pass\n if getattr(module,'__spec__',None )is None :\n try :\n module.__spec__=spec\n except AttributeError:\n pass\n return module\n \ndef _load_unlocked(spec):\n\n if spec.loader is not None :\n \n if not hasattr(spec.loader,'exec_module'):\n return _load_backward_compatible(spec)\n \n module=module_from_spec(spec)\n with _installed_safely(module):\n if spec.loader is None :\n if spec.submodule_search_locations is None :\n raise ImportError('missing loader',name=spec.name)\n \n else :\n spec.loader.exec_module(module)\n \n \n \n \n return sys.modules[spec.name]\n \n \n \ndef _load(spec):\n ''\n\n\n\n\n\n\n \n with _ModuleLockManager(spec.name):\n return _load_unlocked(spec)\n \n \n \n \nclass BuiltinImporter:\n\n ''\n\n\n\n\n \n \n @staticmethod\n def module_repr(module):\n ''\n\n\n\n \n return ''.format(module.__name__)\n \n @classmethod\n def find_spec(cls,fullname,path=None ,target=None ):\n if path is not None :\n return None\n if _imp.is_builtin(fullname):\n return spec_from_loader(fullname,cls,origin='built-in')\n else :\n return None\n \n @classmethod\n def find_module(cls,fullname,path=None ):\n ''\n\n\n\n\n\n \n spec=cls.find_spec(fullname,path)\n return spec.loader if spec is not None else None\n \n @classmethod\n def create_module(self,spec):\n ''\n if spec.name not in sys.builtin_module_names:\n raise ImportError('{!r} is not a built-in module'.format(spec.name),\n name=spec.name)\n return _call_with_frames_removed(_imp.create_builtin,spec)\n \n @classmethod\n def exec_module(self,module):\n ''\n _call_with_frames_removed(_imp.exec_builtin,module)\n \n @classmethod\n @_requires_builtin\n def get_code(cls,fullname):\n ''\n return None\n \n @classmethod\n @_requires_builtin\n def get_source(cls,fullname):\n ''\n return None\n \n @classmethod\n @_requires_builtin\n def is_package(cls,fullname):\n ''\n return False\n \n load_module=classmethod(_load_module_shim)\n \n \nclass FrozenImporter:\n\n ''\n\n\n\n\n \n \n @staticmethod\n def module_repr(m):\n ''\n\n\n\n \n return ''.format(m.__name__)\n \n @classmethod\n def find_spec(cls,fullname,path=None ,target=None ):\n if _imp.is_frozen(fullname):\n return spec_from_loader(fullname,cls,origin='frozen')\n else :\n return None\n \n @classmethod\n def find_module(cls,fullname,path=None ):\n ''\n\n\n\n \n return cls if _imp.is_frozen(fullname)else None\n \n @classmethod\n def create_module(cls,spec):\n ''\n \n @staticmethod\n def exec_module(module):\n name=module.__spec__.name\n if not _imp.is_frozen(name):\n raise ImportError('{!r} is not a frozen module'.format(name),\n name=name)\n code=_call_with_frames_removed(_imp.get_frozen_object,name)\n exec(code,module.__dict__)\n \n @classmethod\n def load_module(cls,fullname):\n ''\n\n\n\n \n return _load_module_shim(cls,fullname)\n \n @classmethod\n @_requires_frozen\n def get_code(cls,fullname):\n ''\n return _imp.get_frozen_object(fullname)\n \n @classmethod\n @_requires_frozen\n def get_source(cls,fullname):\n ''\n return None\n \n @classmethod\n @_requires_frozen\n def is_package(cls,fullname):\n ''\n return _imp.is_frozen_package(fullname)\n \n \n \n \nclass _ImportLockContext:\n\n ''\n \n def __enter__(self):\n ''\n _imp.acquire_lock()\n \n def __exit__(self,exc_type,exc_value,exc_traceback):\n ''\n _imp.release_lock()\n \n \ndef _resolve_name(name,package,level):\n ''\n bits=package.rsplit('.',level -1)\n if len(bits)= 0')\n if level >0:\n if not isinstance(package,str):\n raise TypeError('__package__ not set to a string')\n elif not package:\n raise ImportError('attempted relative import with no known parent '\n 'package')\n if not name and level ==0:\n raise ValueError('Empty module name')\n \n \n_ERR_MSG_PREFIX='No module named '\n_ERR_MSG=_ERR_MSG_PREFIX+'{!r}'\n\ndef _find_and_load_unlocked(name,import_):\n path=None\n parent=name.rpartition('.')[0]\n if parent:\n if parent not in sys.modules:\n _call_with_frames_removed(import_,parent)\n \n if name in sys.modules:\n return sys.modules[name]\n parent_module=sys.modules[parent]\n try :\n path=parent_module.__path__\n except AttributeError:\n msg=(_ERR_MSG+'; {!r} is not a package').format(name,parent)\n raise ModuleNotFoundError(msg,name=name)from None\n spec=_find_spec(name,path)\n if spec is None :\n raise ModuleNotFoundError(_ERR_MSG.format(name),name=name)\n else :\n module=_load_unlocked(spec)\n if parent:\n \n parent_module=sys.modules[parent]\n setattr(parent_module,name.rpartition('.')[2],module)\n return module\n \n \n_NEEDS_LOADING=object()\n\n\ndef _find_and_load(name,import_):\n ''\n with _ModuleLockManager(name):\n module=sys.modules.get(name,_NEEDS_LOADING)\n if module is _NEEDS_LOADING:\n return _find_and_load_unlocked(name,import_)\n \n if module is None :\n message=('import of {} halted; '\n 'None in sys.modules'.format(name))\n raise ModuleNotFoundError(message,name=name)\n \n _lock_unlock_module(name)\n return module\n \n \ndef _gcd_import(name,package=None ,level=0):\n ''\n\n\n\n\n\n\n \n _sanity_check(name,package,level)\n if level >0:\n name=_resolve_name(name,package,level)\n return _find_and_load(name,_gcd_import)\n \n \ndef _handle_fromlist(module,fromlist,import_,*,recursive=False ):\n ''\n\n\n\n\n\n \n \n \n if hasattr(module,'__path__'):\n for x in fromlist:\n if not isinstance(x,str):\n if recursive:\n where=module.__name__+'.__all__'\n else :\n where=\"``from list''\"\n raise TypeError(f\"Item in {where} must be str, \"\n f\"not {type(x).__name__}\")\n elif x =='*':\n if not recursive and hasattr(module,'__all__'):\n _handle_fromlist(module,module.__all__,import_,\n recursive=True )\n elif not hasattr(module,x):\n from_name='{}.{}'.format(module.__name__,x)\n try :\n _call_with_frames_removed(import_,from_name)\n except ModuleNotFoundError as exc:\n \n \n \n if (exc.name ==from_name and\n sys.modules.get(from_name,_NEEDS_LOADING)is not None ):\n continue\n raise\n return module\n \n \ndef _calc___package__(globals):\n ''\n\n\n\n\n \n package=globals.get('__package__')\n spec=globals.get('__spec__')\n if package is not None :\n if spec is not None and package !=spec.parent:\n _warnings.warn(\"__package__ != __spec__.parent \"\n f\"({package!r} != {spec.parent!r})\",\n ImportWarning,stacklevel=3)\n return package\n elif spec is not None :\n return spec.parent\n else :\n _warnings.warn(\"can't resolve package from __spec__ or __package__, \"\n \"falling back on __name__ and __path__\",\n ImportWarning,stacklevel=3)\n package=globals['__name__']\n if '__path__'not in globals:\n package=package.rpartition('.')[0]\n return package\n \n \ndef __import__(name,globals=None ,locals=None ,fromlist=(),level=0):\n ''\n\n\n\n\n\n\n\n\n \n if level ==0:\n module=_gcd_import(name)\n else :\n globals_=globals if globals is not None else {}\n package=_calc___package__(globals_)\n module=_gcd_import(name,package,level)\n if not fromlist:\n \n \n if level ==0:\n return _gcd_import(name.partition('.')[0])\n elif not name:\n return module\n else :\n \n \n cut_off=len(name)-len(name.partition('.')[0])\n \n \n return sys.modules[module.__name__[:len(module.__name__)-cut_off]]\n else :\n return _handle_fromlist(module,fromlist,_gcd_import)\n \n \ndef _builtin_from_name(name):\n spec=BuiltinImporter.find_spec(name)\n if spec is None :\n raise ImportError('no built-in module named '+name)\n return _load_unlocked(spec)\n \n \nmodule_type=type(sys)\nfor name,module in sys.modules.items():\n if isinstance(module,module_type):\n if name in sys.builtin_module_names:\n loader=BuiltinImporter\n elif _imp.is_frozen(name):\n loader=FrozenImporter\n else :\n continue\n spec=_spec_from_module(module,loader)\n _init_module_attrs(spec,module)\n \n \nself_module=sys.modules[__name__]\n\n\nfor builtin_name in ('_warnings',):\n if builtin_name not in sys.modules:\n builtin_module=_builtin_from_name(builtin_name)\n else :\n builtin_module=sys.modules[builtin_name]\n setattr(self_module,builtin_name,builtin_module)\n \n \ndef _install(sys_module,_imp_module):\n ''\n _setup(sys_module,_imp_module)\n \n sys.meta_path.append(BuiltinImporter)\n sys.meta_path.append(FrozenImporter)\n \n \ndef _install_external_importers():\n ''\n global _bootstrap_external\n import _frozen_importlib_external\n _bootstrap_external=_frozen_importlib_external\n _frozen_importlib_external._install(sys.modules[__name__])\n \n", ["_frozen_importlib_external", "_imp", "_weakref", "sys"]], "_functools": [".py", "from reprlib import recursive_repr\n\nclass partial:\n ''\n\n \n \n __slots__=\"func\",\"args\",\"keywords\",\"__dict__\",\"__weakref__\"\n \n def __new__(*args,**keywords):\n if not args:\n raise TypeError(\"descriptor '__new__' of partial needs an argument\")\n if len(args)<2:\n raise TypeError(\"type 'partial' takes at least one argument\")\n cls,func,*args=args\n if not callable(func):\n raise TypeError(\"the first argument must be callable\")\n args=tuple(args)\n \n if hasattr(func,\"func\")and isinstance(func.args,tuple):\n args=func.args+args\n tmpkw=func.keywords.copy()\n tmpkw.update(keywords)\n keywords=tmpkw\n del tmpkw\n func=func.func\n \n self=super(partial,cls).__new__(cls)\n \n self.func=func\n self.args=args\n self.keywords=keywords\n return self\n \n def __call__(*args,**keywords):\n if not args:\n raise TypeError(\"descriptor '__call__' of partial needs an argument\")\n self,*args=args\n newkeywords=self.keywords.copy()\n newkeywords.update(keywords)\n return self.func(*self.args,*args,**newkeywords)\n \n @recursive_repr()\n def __repr__(self):\n qualname=type(self).__qualname__\n args=[repr(self.func)]\n args.extend(repr(x)for x in self.args)\n args.extend(f\"{k}={v!r}\"for (k,v)in self.keywords.items())\n if type(self).__module__ ==\"functools\":\n return f\"functools.{qualname}({', '.join(args)})\"\n return f\"{qualname}({', '.join(args)})\"\n \n def __reduce__(self):\n return type(self),(self.func,),(self.func,self.args,\n self.keywords or None ,self.__dict__ or None )\n \n def __setstate__(self,state):\n if not isinstance(state,tuple):\n raise TypeError(\"argument to __setstate__ must be a tuple\")\n if len(state)!=4:\n raise TypeError(f\"expected 4 items in state, got {len(state)}\")\n func,args,kwds,namespace=state\n if (not callable(func)or not isinstance(args,tuple)or\n (kwds is not None and not isinstance(kwds,dict))or\n (namespace is not None and not isinstance(namespace,dict))):\n raise TypeError(\"invalid partial state\")\n \n args=tuple(args)\n if kwds is None :\n kwds={}\n elif type(kwds)is not dict:\n kwds=dict(kwds)\n if namespace is None :\n namespace={}\n \n self.__dict__=namespace\n self.func=func\n self.args=args\n self.keywords=kwds\n \ndef reduce(func,iterable,initializer=None ):\n args=iter(iterable)\n if initializer is not None :\n res=initializer\n else :\n res=next(args)\n while True :\n try :\n res=func(res,next(args))\n except StopIteration:\n return res\n", ["reprlib"]], "_imp": [".py", "''\nimport sys\n\ndef _fix_co_filename(*args,**kw):\n ''\n\n\n\n \n pass\n \ndef acquire_lock(*args,**kw):\n ''\n\n \n pass\n \ncheck_hash_based_pycs=\"\"\"default\"\"\"\n\ndef create_builtin(spec):\n ''\n return __import__(spec.name)\n \ndef create_dynamic(*args,**kw):\n ''\n pass\n \ndef exec_builtin(*args,**kw):\n ''\n pass\n \ndef exec_dynamic(*args,**kw):\n ''\n pass\n \ndef extension_suffixes(*args,**kw):\n ''\n return []\n \ndef get_frozen_object(*args,**kw):\n ''\n pass\n \ndef init_frozen(*args,**kw):\n ''\n pass\n \ndef is_builtin(module_name):\n\n return module_name in __BRYTHON__.builtin_module_names\n \ndef is_frozen(*args,**kw):\n ''\n return False\n \ndef is_frozen_package(*args,**kw):\n ''\n pass\n \ndef lock_held(*args,**kw):\n ''\n \n return False\n \ndef release_lock(*args,**kw):\n ''\n \n pass\n \ndef source_hash(*args,**kw):\n pass\n", ["sys"]], "_io": [".py", "''\n\n\n\nimport os\nimport abc\nimport codecs\nimport errno\n\ntry :\n from _thread import allocate_lock as Lock\nexcept ImportError:\n from _dummy_thread import allocate_lock as Lock\n \n \nfrom _io_classes import *\nimport _io_classes\n_IOBase=_io_classes._IOBase\n_RawIOBase=_io_classes._RawIOBase\n_BufferedIOBase=_io_classes._BufferedIOBase\n_TextIOBase=_io_classes._TextIOBase\n\nSEEK_SET=0\nSEEK_CUR=1\nSEEK_END=2\n\nvalid_seek_flags={0,1,2}\nif hasattr(os,'SEEK_HOLE'):\n valid_seek_flags.add(os.SEEK_HOLE)\n valid_seek_flags.add(os.SEEK_DATA)\n \n \nDEFAULT_BUFFER_SIZE=8 *1024\n\n\n\n\n\n\nBlockingIOError=BlockingIOError\n\n\ndef __open(file,mode=\"r\",buffering=-1,encoding=None ,errors=None ,\nnewline=None ,closefd=True ,opener=None ):\n\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if not isinstance(file,(str,bytes,int)):\n raise TypeError(\"invalid file: %r\"%file)\n if not isinstance(mode,str):\n raise TypeError(\"invalid mode: %r\"%mode)\n if not isinstance(buffering,int):\n raise TypeError(\"invalid buffering: %r\"%buffering)\n if encoding is not None and not isinstance(encoding,str):\n raise TypeError(\"invalid encoding: %r\"%encoding)\n if errors is not None and not isinstance(errors,str):\n raise TypeError(\"invalid errors: %r\"%errors)\n modes=set(mode)\n if modes -set(\"axrwb+tU\")or len(mode)>len(modes):\n raise ValueError(\"invalid mode: %r\"%mode)\n creating=\"x\"in modes\n reading=\"r\"in modes\n writing=\"w\"in modes\n appending=\"a\"in modes\n updating=\"+\"in modes\n text=\"t\"in modes\n binary=\"b\"in modes\n if \"U\"in modes:\n if creating or writing or appending:\n raise ValueError(\"can't use U and writing mode at once\")\n reading=True\n if text and binary:\n raise ValueError(\"can't have text and binary mode at once\")\n if creating+reading+writing+appending >1:\n raise ValueError(\"can't have read/write/append mode at once\")\n if not (creating or reading or writing or appending):\n raise ValueError(\"must have exactly one of read/write/append mode\")\n if binary and encoding is not None :\n raise ValueError(\"binary mode doesn't take an encoding argument\")\n if binary and errors is not None :\n raise ValueError(\"binary mode doesn't take an errors argument\")\n if binary and newline is not None :\n raise ValueError(\"binary mode doesn't take a newline argument\")\n raw=FileIO(file,\n (creating and \"x\"or \"\")+\n (reading and \"r\"or \"\")+\n (writing and \"w\"or \"\")+\n (appending and \"a\"or \"\")+\n (updating and \"+\"or \"\"),\n closefd,opener=opener)\n line_buffering=False\n if buffering ==1 or buffering <0 and raw.isatty():\n buffering=-1\n line_buffering=True\n if buffering <0:\n buffering=DEFAULT_BUFFER_SIZE\n try :\n bs=os.fstat(raw.fileno()).st_blksize\n except (os.error,AttributeError):\n pass\n else :\n if bs >1:\n buffering=bs\n if buffering <0:\n raise ValueError(\"invalid buffering size\")\n if buffering ==0:\n if binary:\n return raw\n raise ValueError(\"can't have unbuffered text I/O\")\n if updating:\n buffer=BufferedRandom(raw,buffering)\n elif creating or writing or appending:\n buffer=BufferedWriter(raw,buffering)\n elif reading:\n buffer=BufferedReader(raw,buffering)\n else :\n raise ValueError(\"unknown mode: %r\"%mode)\n if binary:\n return buffer\n text=TextIOWrapper(buffer,encoding,errors,newline,line_buffering)\n text.mode=mode\n return text\n \nopen=__open\n\ndef open_code(file):\n return __builtins__.open(file,encoding=\"utf-8\")\n \ndef text_encoding(encoding,stacklevel=2):\n if encoding is None :\n return \"locale\"\n return encoding\n \nclass DocDescriptor:\n ''\n \n def __get__(self,obj,typ):\n return (\n \"open(file, mode='r', buffering=-1, encoding=None, \"\n \"errors=None, newline=None, closefd=True)\\n\\n\"+\n open.__doc__)\n \nclass OpenWrapper:\n ''\n\n\n\n\n\n \n __doc__=DocDescriptor()\n \n def __new__(cls,*args,**kwargs):\n return open(*args,**kwargs)\n \n \n \n \nclass UnsupportedOperation(ValueError,IOError):\n pass\n \n", ["_dummy_thread", "_io_classes", "_thread", "abc", "codecs", "errno", "os"]], "_markupbase": [".py", "''\n\n\n\n\n\n\nimport re\n\n_declname_match=re.compile(r'[a-zA-Z][-_.a-zA-Z0-9]*\\s*').match\n_declstringlit_match=re.compile(r'(\\'[^\\']*\\'|\"[^\"]*\")\\s*').match\n_commentclose=re.compile(r'--\\s*>')\n_markedsectionclose=re.compile(r']\\s*]\\s*>')\n\n\n\n\n_msmarkedsectionclose=re.compile(r']\\s*>')\n\ndel re\n\n\nclass ParserBase:\n ''\n \n \n def __init__(self):\n if self.__class__ is ParserBase:\n raise RuntimeError(\n \"_markupbase.ParserBase must be subclassed\")\n \n def reset(self):\n self.lineno=1\n self.offset=0\n \n def getpos(self):\n ''\n return self.lineno,self.offset\n \n \n \n \n \n def updatepos(self,i,j):\n if i >=j:\n return j\n rawdata=self.rawdata\n nlines=rawdata.count(\"\\n\",i,j)\n if nlines:\n self.lineno=self.lineno+nlines\n pos=rawdata.rindex(\"\\n\",i,j)\n self.offset=j -(pos+1)\n else :\n self.offset=self.offset+j -i\n return j\n \n _decl_otherchars=''\n \n \n def parse_declaration(self,i):\n \n \n \n \n \n \n \n \n \n \n rawdata=self.rawdata\n j=i+2\n assert rawdata[i:j]==\"\":\n \n return j+1\n if rawdata[j:j+1]in (\"-\",\"\"):\n \n \n return -1\n \n n=len(rawdata)\n if rawdata[j:j+2]=='--':\n \n return self.parse_comment(i)\n elif rawdata[j]=='[':\n \n \n \n \n return self.parse_marked_section(i)\n else :\n decltype,j=self._scan_name(j,i)\n if j <0:\n return j\n if decltype ==\"doctype\":\n self._decl_otherchars=''\n while j \":\n \n data=rawdata[i+2:j]\n if decltype ==\"doctype\":\n self.handle_decl(data)\n else :\n \n \n \n \n self.unknown_decl(data)\n return j+1\n if c in \"\\\"'\":\n m=_declstringlit_match(rawdata,j)\n if not m:\n return -1\n j=m.end()\n elif c in \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\":\n name,j=self._scan_name(j,i)\n elif c in self._decl_otherchars:\n j=j+1\n elif c ==\"[\":\n \n if decltype ==\"doctype\":\n j=self._parse_doctype_subset(j+1,i)\n elif decltype in {\"attlist\",\"linktype\",\"link\",\"element\"}:\n \n \n \n \n raise AssertionError(\"unsupported '[' char in %s declaration\"%decltype)\n else :\n raise AssertionError(\"unexpected '[' char in declaration\")\n else :\n raise AssertionError(\"unexpected %r char in declaration\"%rawdata[j])\n if j <0:\n return j\n return -1\n \n \n \n def parse_marked_section(self,i,report=1):\n rawdata=self.rawdata\n assert rawdata[i:i+3]=='n:\n \n return -1\n if rawdata[j:j+4]==\"\n \n \"\"\"%(self.OutputString(attrs).replace('\"',r'\\\"'))\n \n def OutputString(self,attrs=None ):\n \n \n result=[]\n append=result.append\n \n \n append(\"%s=%s\"%(self.key,self.coded_value))\n \n \n if attrs is None :\n attrs=self._reserved\n items=sorted(self.items())\n for key,value in items:\n if value ==\"\":\n continue\n if key not in attrs:\n continue\n if key ==\"expires\"and isinstance(value,int):\n append(\"%s=%s\"%(self._reserved[key],_getdate(value)))\n elif key ==\"max-age\"and isinstance(value,int):\n append(\"%s=%d\"%(self._reserved[key],value))\n elif key ==\"secure\":\n append(str(self._reserved[key]))\n elif key ==\"httponly\":\n append(str(self._reserved[key]))\n else :\n append(\"%s=%s\"%(self._reserved[key],value))\n \n \n return _semispacejoin(result)\n \n \n \n \n \n \n \n \n \n \n \n_LegalCharsPatt=r\"[\\w\\d!#%&'~_`><@,:/\\$\\*\\+\\-\\.\\^\\|\\)\\(\\?\\}\\{\\=]\"\n_CookiePattern=re.compile(r\"\"\"\n (?x) # This is a verbose pattern\n (?P # Start of group 'key'\n \"\"\"+_LegalCharsPatt+r\"\"\"+? # Any word of at least one letter\n ) # End of group 'key'\n ( # Optional group: there may not be a value.\n \\s*=\\s* # Equal Sign\n (?P # Start of group 'val'\n \"(?:[^\\\\\"]|\\\\.)*\" # Any doublequoted string\n | # or\n \\w{3},\\s[\\w\\d\\s-]{9,11}\\s[\\d:]{8}\\sGMT # Special case for \"expires\" attr\n | # or\n \"\"\"+_LegalCharsPatt+r\"\"\"* # Any word or empty string\n ) # End of group 'val'\n )? # End of optional value group\n \\s* # Any number of spaces.\n (\\s+|;|$) # Ending either at space, semicolon, or EOS.\n \"\"\",re.ASCII)\n\n\n\n\n\nclass BaseCookie(dict):\n ''\n \n def value_decode(self,val):\n ''\n\n\n\n\n \n return val,val\n \n def value_encode(self,val):\n ''\n\n\n\n \n strval=str(val)\n return strval,strval\n \n def __init__(self,input=None ):\n if input:\n self.load(input)\n \n def __set(self,key,real_value,coded_value):\n ''\n M=self.get(key,Morsel())\n M.set(key,real_value,coded_value)\n dict.__setitem__(self,key,M)\n \n def __setitem__(self,key,value):\n ''\n rval,cval=self.value_encode(value)\n self.__set(key,rval,cval)\n \n def output(self,attrs=None ,header=\"Set-Cookie:\",sep=\"\\015\\012\"):\n ''\n result=[]\n items=sorted(self.items())\n for key,value in items:\n result.append(value.output(attrs,header))\n return sep.join(result)\n \n __str__=output\n \n def __repr__(self):\n l=[]\n items=sorted(self.items())\n for key,value in items:\n l.append('%s=%s'%(key,repr(value.value)))\n return '<%s: %s>'%(self.__class__.__name__,_spacejoin(l))\n \n def js_output(self,attrs=None ):\n ''\n result=[]\n items=sorted(self.items())\n for key,value in items:\n result.append(value.js_output(attrs))\n return _nulljoin(result)\n \n def load(self,rawdata):\n ''\n\n\n\n \n if isinstance(rawdata,str):\n self.__parse_string(rawdata)\n else :\n \n for key,value in rawdata.items():\n self[key]=value\n return\n \n def __parse_string(self,str,patt=_CookiePattern):\n i=0\n n=len(str)\n M=None\n \n while 0 <=i 0\n self.count -=1\n if self.count ==0:\n self.owner=None\n if self.waiters:\n self.waiters -=1\n self.wakeup.release()\n \n def __repr__(self):\n return '_ModuleLock({!r}) at {}'.format(self.name,id(self))\n \n \nclass _DummyModuleLock:\n ''\n \n \n def __init__(self,name):\n self.name=name\n self.count=0\n \n def acquire(self):\n self.count +=1\n return True\n \n def release(self):\n if self.count ==0:\n raise RuntimeError('cannot release un-acquired lock')\n self.count -=1\n \n def __repr__(self):\n return '_DummyModuleLock({!r}) at {}'.format(self.name,id(self))\n \n \nclass _ModuleLockManager:\n\n def __init__(self,name):\n self._name=name\n self._lock=None\n \n def __enter__(self):\n self._lock=_get_module_lock(self._name)\n self._lock.acquire()\n \n def __exit__(self,*args,**kwargs):\n self._lock.release()\n \n \n \n \ndef _get_module_lock(name):\n ''\n\n\n \n \n _imp.acquire_lock()\n try :\n try :\n lock=_module_locks[name]()\n except KeyError:\n lock=None\n \n if lock is None :\n if _thread is None :\n lock=_DummyModuleLock(name)\n else :\n lock=_ModuleLock(name)\n \n def cb(ref,name=name):\n _imp.acquire_lock()\n try :\n \n \n \n if _module_locks.get(name)is ref:\n del _module_locks[name]\n finally :\n _imp.release_lock()\n \n _module_locks[name]=_weakref.ref(lock,cb)\n finally :\n _imp.release_lock()\n \n return lock\n \n \ndef _lock_unlock_module(name):\n ''\n\n\n\n \n lock=_get_module_lock(name)\n try :\n lock.acquire()\n except _DeadlockError:\n \n \n pass\n else :\n lock.release()\n \n \ndef _call_with_frames_removed(f,*args,**kwds):\n ''\n\n\n\n\n\n \n return f(*args,**kwds)\n \n \ndef _verbose_message(message,*args,verbosity=1):\n ''\n if sys.flags.verbose >=verbosity:\n if not message.startswith(('#','import ')):\n message='# '+message\n print(message.format(*args),file=sys.stderr)\n \n \ndef _requires_builtin(fxn):\n ''\n def _requires_builtin_wrapper(self,fullname):\n if fullname not in sys.builtin_module_names:\n raise ImportError('{!r} is not a built-in module'.format(fullname),\n name=fullname)\n return fxn(self,fullname)\n _wrap(_requires_builtin_wrapper,fxn)\n return _requires_builtin_wrapper\n \n \ndef _requires_frozen(fxn):\n ''\n def _requires_frozen_wrapper(self,fullname):\n if not _imp.is_frozen(fullname):\n raise ImportError('{!r} is not a frozen module'.format(fullname),\n name=fullname)\n return fxn(self,fullname)\n _wrap(_requires_frozen_wrapper,fxn)\n return _requires_frozen_wrapper\n \n \n \ndef _load_module_shim(self,fullname):\n ''\n\n\n\n \n spec=spec_from_loader(fullname,self)\n if fullname in sys.modules:\n module=sys.modules[fullname]\n _exec(spec,module)\n return sys.modules[fullname]\n else :\n return _load(spec)\n \n \n \ndef _module_repr(module):\n\n loader=getattr(module,'__loader__',None )\n if hasattr(loader,'module_repr'):\n \n \n \n try :\n return loader.module_repr(module)\n except Exception:\n pass\n try :\n spec=module.__spec__\n except AttributeError:\n pass\n else :\n if spec is not None :\n return _module_repr_from_spec(spec)\n \n \n \n try :\n name=module.__name__\n except AttributeError:\n name='?'\n try :\n filename=module.__file__\n except AttributeError:\n if loader is None :\n return ''.format(name)\n else :\n return ''.format(name,loader)\n else :\n return ''.format(name,filename)\n \n \nclass _installed_safely:\n\n def __init__(self,module):\n self._module=module\n self._spec=module.__spec__\n \n def __enter__(self):\n \n \n \n self._spec._initializing=True\n sys.modules[self._spec.name]=self._module\n \n def __exit__(self,*args):\n try :\n spec=self._spec\n if any(arg is not None for arg in args):\n try :\n del sys.modules[spec.name]\n except KeyError:\n pass\n else :\n _verbose_message('import {!r} # {!r}',spec.name,spec.loader)\n finally :\n self._spec._initializing=False\n \n \nclass ModuleSpec:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,name,loader,*,origin=None ,loader_state=None ,\n is_package=None ):\n self.name=name\n self.loader=loader\n self.origin=origin\n self.loader_state=loader_state\n self.submodule_search_locations=[]if is_package else None\n \n \n self._set_fileattr=False\n self._cached=None\n \n def __repr__(self):\n args=['name={!r}'.format(self.name),\n 'loader={!r}'.format(self.loader)]\n if self.origin is not None :\n args.append('origin={!r}'.format(self.origin))\n if self.submodule_search_locations is not None :\n args.append('submodule_search_locations={}'\n .format(self.submodule_search_locations))\n return '{}({})'.format(self.__class__.__name__,', '.join(args))\n \n def __eq__(self,other):\n smsl=self.submodule_search_locations\n try :\n return (self.name ==other.name and\n self.loader ==other.loader and\n self.origin ==other.origin and\n smsl ==other.submodule_search_locations and\n self.cached ==other.cached and\n self.has_location ==other.has_location)\n except AttributeError:\n return False\n \n @property\n def cached(self):\n if self._cached is None :\n if self.origin is not None and self._set_fileattr:\n if _bootstrap_external is None :\n raise NotImplementedError\n self._cached=_bootstrap_external._get_cached(self.origin)\n return self._cached\n \n @cached.setter\n def cached(self,cached):\n self._cached=cached\n \n @property\n def parent(self):\n ''\n if self.submodule_search_locations is None :\n return self.name.rpartition('.')[0]\n else :\n return self.name\n \n @property\n def has_location(self):\n return self._set_fileattr\n \n @has_location.setter\n def has_location(self,value):\n self._set_fileattr=bool(value)\n \n \ndef spec_from_loader(name,loader,*,origin=None ,is_package=None ):\n ''\n if hasattr(loader,'get_filename'):\n if _bootstrap_external is None :\n raise NotImplementedError\n spec_from_file_location=_bootstrap_external.spec_from_file_location\n \n if is_package is None :\n return spec_from_file_location(name,loader=loader)\n search=[]if is_package else None\n return spec_from_file_location(name,loader=loader,\n submodule_search_locations=search)\n \n if is_package is None :\n if hasattr(loader,'is_package'):\n try :\n is_package=loader.is_package(name)\n except ImportError:\n is_package=None\n else :\n \n is_package=False\n \n return ModuleSpec(name,loader,origin=origin,is_package=is_package)\n \n \ndef _spec_from_module(module,loader=None ,origin=None ):\n\n try :\n spec=module.__spec__\n except AttributeError:\n pass\n else :\n if spec is not None :\n return spec\n \n name=module.__name__\n if loader is None :\n try :\n loader=module.__loader__\n except AttributeError:\n \n pass\n try :\n location=module.__file__\n except AttributeError:\n location=None\n if origin is None :\n if location is None :\n try :\n origin=loader._ORIGIN\n except AttributeError:\n origin=None\n else :\n origin=location\n try :\n cached=module.__cached__\n except AttributeError:\n cached=None\n try :\n submodule_search_locations=list(module.__path__)\n except AttributeError:\n submodule_search_locations=None\n \n spec=ModuleSpec(name,loader,origin=origin)\n spec._set_fileattr=False if location is None else True\n spec.cached=cached\n spec.submodule_search_locations=submodule_search_locations\n return spec\n \n \ndef _init_module_attrs(spec,module,*,override=False ):\n\n\n\n if (override or getattr(module,'__name__',None )is None ):\n try :\n module.__name__=spec.name\n except AttributeError:\n pass\n \n if override or getattr(module,'__loader__',None )is None :\n loader=spec.loader\n if loader is None :\n \n if spec.submodule_search_locations is not None :\n if _bootstrap_external is None :\n raise NotImplementedError\n _NamespaceLoader=_bootstrap_external._NamespaceLoader\n \n loader=_NamespaceLoader.__new__(_NamespaceLoader)\n loader._path=spec.submodule_search_locations\n spec.loader=loader\n \n \n \n \n \n \n \n \n \n \n module.__file__=None\n try :\n module.__loader__=loader\n except AttributeError:\n pass\n \n if override or getattr(module,'__package__',None )is None :\n try :\n module.__package__=spec.parent\n except AttributeError:\n pass\n \n try :\n module.__spec__=spec\n except AttributeError:\n pass\n \n if override or getattr(module,'__path__',None )is None :\n if spec.submodule_search_locations is not None :\n try :\n module.__path__=spec.submodule_search_locations\n except AttributeError:\n pass\n \n if spec.has_location:\n if override or getattr(module,'__file__',None )is None :\n try :\n module.__file__=spec.origin\n except AttributeError:\n pass\n \n if override or getattr(module,'__cached__',None )is None :\n if spec.cached is not None :\n try :\n module.__cached__=spec.cached\n except AttributeError:\n pass\n return module\n \n \ndef module_from_spec(spec):\n ''\n \n module=None\n if hasattr(spec.loader,'create_module'):\n \n \n module=spec.loader.create_module(spec)\n elif hasattr(spec.loader,'exec_module'):\n raise ImportError('loaders that define exec_module() '\n 'must also define create_module()')\n if module is None :\n module=_new_module(spec.name)\n _init_module_attrs(spec,module)\n return module\n \n \ndef _module_repr_from_spec(spec):\n ''\n \n name='?'if spec.name is None else spec.name\n if spec.origin is None :\n if spec.loader is None :\n return ''.format(name)\n else :\n return ''.format(name,spec.loader)\n else :\n if spec.has_location:\n return ''.format(name,spec.origin)\n else :\n return ''.format(spec.name,spec.origin)\n \n \n \ndef _exec(spec,module):\n ''\n name=spec.name\n with _ModuleLockManager(name):\n if sys.modules.get(name)is not module:\n msg='module {!r} not in sys.modules'.format(name)\n raise ImportError(msg,name=name)\n if spec.loader is None :\n if spec.submodule_search_locations is None :\n raise ImportError('missing loader',name=spec.name)\n \n _init_module_attrs(spec,module,override=True )\n return module\n _init_module_attrs(spec,module,override=True )\n if not hasattr(spec.loader,'exec_module'):\n \n \n \n spec.loader.load_module(name)\n else :\n spec.loader.exec_module(module)\n return sys.modules[name]\n \n \ndef _load_backward_compatible(spec):\n\n\n\n spec.loader.load_module(spec.name)\n \n module=sys.modules[spec.name]\n if getattr(module,'__loader__',None )is None :\n try :\n module.__loader__=spec.loader\n except AttributeError:\n pass\n if getattr(module,'__package__',None )is None :\n try :\n \n \n \n module.__package__=module.__name__\n if not hasattr(module,'__path__'):\n module.__package__=spec.name.rpartition('.')[0]\n except AttributeError:\n pass\n if getattr(module,'__spec__',None )is None :\n try :\n module.__spec__=spec\n except AttributeError:\n pass\n return module\n \ndef _load_unlocked(spec):\n\n if spec.loader is not None :\n \n if not hasattr(spec.loader,'exec_module'):\n return _load_backward_compatible(spec)\n \n module=module_from_spec(spec)\n with _installed_safely(module):\n if spec.loader is None :\n if spec.submodule_search_locations is None :\n raise ImportError('missing loader',name=spec.name)\n \n else :\n spec.loader.exec_module(module)\n \n \n \n \n return sys.modules[spec.name]\n \n \n \ndef _load(spec):\n ''\n\n\n\n\n\n\n \n with _ModuleLockManager(spec.name):\n return _load_unlocked(spec)\n \n \n \n \nclass BuiltinImporter:\n\n ''\n\n\n\n\n \n \n @staticmethod\n def module_repr(module):\n ''\n\n\n\n \n return ''.format(module.__name__)\n \n @classmethod\n def find_spec(cls,fullname,path=None ,target=None ):\n if path is not None :\n return None\n if _imp.is_builtin(fullname):\n return spec_from_loader(fullname,cls,origin='built-in')\n else :\n return None\n \n @classmethod\n def find_module(cls,fullname,path=None ):\n ''\n\n\n\n\n\n \n spec=cls.find_spec(fullname,path)\n return spec.loader if spec is not None else None\n \n @classmethod\n def create_module(self,spec):\n ''\n if spec.name not in sys.builtin_module_names:\n raise ImportError('{!r} is not a built-in module'.format(spec.name),\n name=spec.name)\n return _call_with_frames_removed(_imp.create_builtin,spec)\n \n @classmethod\n def exec_module(self,module):\n ''\n _call_with_frames_removed(_imp.exec_builtin,module)\n \n @classmethod\n @_requires_builtin\n def get_code(cls,fullname):\n ''\n return None\n \n @classmethod\n @_requires_builtin\n def get_source(cls,fullname):\n ''\n return None\n \n @classmethod\n @_requires_builtin\n def is_package(cls,fullname):\n ''\n return False\n \n load_module=classmethod(_load_module_shim)\n \n \nclass FrozenImporter:\n\n ''\n\n\n\n\n \n \n @staticmethod\n def module_repr(m):\n ''\n\n\n\n \n return ''.format(m.__name__)\n \n @classmethod\n def find_spec(cls,fullname,path=None ,target=None ):\n if _imp.is_frozen(fullname):\n return spec_from_loader(fullname,cls,origin='frozen')\n else :\n return None\n \n @classmethod\n def find_module(cls,fullname,path=None ):\n ''\n\n\n\n \n return cls if _imp.is_frozen(fullname)else None\n \n @classmethod\n def create_module(cls,spec):\n ''\n \n @staticmethod\n def exec_module(module):\n name=module.__spec__.name\n if not _imp.is_frozen(name):\n raise ImportError('{!r} is not a frozen module'.format(name),\n name=name)\n code=_call_with_frames_removed(_imp.get_frozen_object,name)\n exec(code,module.__dict__)\n \n @classmethod\n def load_module(cls,fullname):\n ''\n\n\n\n \n return _load_module_shim(cls,fullname)\n \n @classmethod\n @_requires_frozen\n def get_code(cls,fullname):\n ''\n return _imp.get_frozen_object(fullname)\n \n @classmethod\n @_requires_frozen\n def get_source(cls,fullname):\n ''\n return None\n \n @classmethod\n @_requires_frozen\n def is_package(cls,fullname):\n ''\n return _imp.is_frozen_package(fullname)\n \n \n \n \nclass _ImportLockContext:\n\n ''\n \n def __enter__(self):\n ''\n _imp.acquire_lock()\n \n def __exit__(self,exc_type,exc_value,exc_traceback):\n ''\n _imp.release_lock()\n \n \ndef _resolve_name(name,package,level):\n ''\n bits=package.rsplit('.',level -1)\n if len(bits)= 0')\n if level >0:\n if not isinstance(package,str):\n raise TypeError('__package__ not set to a string')\n elif not package:\n raise ImportError('attempted relative import with no known parent '\n 'package')\n if not name and level ==0:\n raise ValueError('Empty module name')\n \n \n_ERR_MSG_PREFIX='No module named '\n_ERR_MSG=_ERR_MSG_PREFIX+'{!r}'\n\ndef _find_and_load_unlocked(name,import_):\n path=None\n parent=name.rpartition('.')[0]\n if parent:\n if parent not in sys.modules:\n _call_with_frames_removed(import_,parent)\n \n if name in sys.modules:\n return sys.modules[name]\n parent_module=sys.modules[parent]\n try :\n path=parent_module.__path__\n except AttributeError:\n msg=(_ERR_MSG+'; {!r} is not a package').format(name,parent)\n raise ModuleNotFoundError(msg,name=name)from None\n spec=_find_spec(name,path)\n if spec is None :\n raise ModuleNotFoundError(_ERR_MSG.format(name),name=name)\n else :\n module=_load_unlocked(spec)\n if parent:\n \n parent_module=sys.modules[parent]\n setattr(parent_module,name.rpartition('.')[2],module)\n return module\n \n \n_NEEDS_LOADING=object()\n\n\ndef _find_and_load(name,import_):\n ''\n with _ModuleLockManager(name):\n module=sys.modules.get(name,_NEEDS_LOADING)\n if module is _NEEDS_LOADING:\n return _find_and_load_unlocked(name,import_)\n \n if module is None :\n message=('import of {} halted; '\n 'None in sys.modules'.format(name))\n raise ModuleNotFoundError(message,name=name)\n \n _lock_unlock_module(name)\n return module\n \n \ndef _gcd_import(name,package=None ,level=0):\n ''\n\n\n\n\n\n\n \n _sanity_check(name,package,level)\n if level >0:\n name=_resolve_name(name,package,level)\n return _find_and_load(name,_gcd_import)\n \n \ndef _handle_fromlist(module,fromlist,import_,*,recursive=False ):\n ''\n\n\n\n\n\n \n \n \n if hasattr(module,'__path__'):\n for x in fromlist:\n if not isinstance(x,str):\n if recursive:\n where=module.__name__+'.__all__'\n else :\n where=\"``from list''\"\n raise TypeError(f\"Item in {where} must be str, \"\n f\"not {type(x).__name__}\")\n elif x =='*':\n if not recursive and hasattr(module,'__all__'):\n _handle_fromlist(module,module.__all__,import_,\n recursive=True )\n elif not hasattr(module,x):\n from_name='{}.{}'.format(module.__name__,x)\n try :\n _call_with_frames_removed(import_,from_name)\n except ModuleNotFoundError as exc:\n \n \n \n if (exc.name ==from_name and\n sys.modules.get(from_name,_NEEDS_LOADING)is not None ):\n continue\n raise\n return module\n \n \ndef _calc___package__(globals):\n ''\n\n\n\n\n \n package=globals.get('__package__')\n spec=globals.get('__spec__')\n if package is not None :\n if spec is not None and package !=spec.parent:\n _warnings.warn(\"__package__ != __spec__.parent \"\n f\"({package!r} != {spec.parent!r})\",\n ImportWarning,stacklevel=3)\n return package\n elif spec is not None :\n return spec.parent\n else :\n _warnings.warn(\"can't resolve package from __spec__ or __package__, \"\n \"falling back on __name__ and __path__\",\n ImportWarning,stacklevel=3)\n package=globals['__name__']\n if '__path__'not in globals:\n package=package.rpartition('.')[0]\n return package\n \n \ndef __import__(name,globals=None ,locals=None ,fromlist=(),level=0):\n ''\n\n\n\n\n\n\n\n\n \n if level ==0:\n module=_gcd_import(name)\n else :\n globals_=globals if globals is not None else {}\n package=_calc___package__(globals_)\n module=_gcd_import(name,package,level)\n if not fromlist:\n \n \n if level ==0:\n return _gcd_import(name.partition('.')[0])\n elif not name:\n return module\n else :\n \n \n cut_off=len(name)-len(name.partition('.')[0])\n \n \n return sys.modules[module.__name__[:len(module.__name__)-cut_off]]\n else :\n return _handle_fromlist(module,fromlist,_gcd_import)\n \n \ndef _builtin_from_name(name):\n spec=BuiltinImporter.find_spec(name)\n if spec is None :\n raise ImportError('no built-in module named '+name)\n return _load_unlocked(spec)\n \n \ndef _setup(sys_module,_imp_module):\n ''\n\n\n\n\n\n \n global _imp,sys\n _imp=_imp_module\n sys=sys_module\n \n \n module_type=type(sys)\n for name,module in sys.modules.items():\n if isinstance(module,module_type):\n if name in sys.builtin_module_names:\n loader=BuiltinImporter\n elif _imp.is_frozen(name):\n loader=FrozenImporter\n else :\n continue\n spec=_spec_from_module(module,loader)\n _init_module_attrs(spec,module)\n \n \n self_module=sys.modules[__name__]\n \n \n for builtin_name in ('_warnings',):\n if builtin_name not in sys.modules:\n builtin_module=_builtin_from_name(builtin_name)\n else :\n builtin_module=sys.modules[builtin_name]\n setattr(self_module,builtin_name,builtin_module)\n \n \ndef _install(sys_module,_imp_module):\n ''\n _setup(sys_module,_imp_module)\n \n sys.meta_path.append(BuiltinImporter)\n sys.meta_path.append(FrozenImporter)\n \n \ndef _install_external_importers():\n ''\n global _bootstrap_external\n import _frozen_importlib_external\n _bootstrap_external=_frozen_importlib_external\n _frozen_importlib_external._install(sys.modules[__name__])\n", ["_frozen_importlib_external", "_weakref"]], "importlib._bootstrap_external": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n_bootstrap=None\n\n\nimport _imp\nimport _io\nimport sys\nimport _warnings\nimport marshal\n\n\n_MS_WINDOWS=(sys.platform =='win32')\nif _MS_WINDOWS:\n import nt as _os\n import winreg\nelse :\n import posix as _os\n \n \nif _MS_WINDOWS:\n path_separators=['\\\\','/']\nelse :\n path_separators=['/']\n \nassert all(len(sep)==1 for sep in path_separators)\npath_sep=path_separators[0]\npath_sep_tuple=tuple(path_separators)\npath_separators=''.join(path_separators)\n_pathseps_with_colon={f':{s}'for s in path_separators}\n\n\n\n_CASE_INSENSITIVE_PLATFORMS_STR_KEY='win',\n_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY='cygwin','darwin'\n_CASE_INSENSITIVE_PLATFORMS=(_CASE_INSENSITIVE_PLATFORMS_BYTES_KEY\n+_CASE_INSENSITIVE_PLATFORMS_STR_KEY)\n\n\ndef _make_relax_case():\n if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):\n if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS_STR_KEY):\n key='PYTHONCASEOK'\n else :\n key=b'PYTHONCASEOK'\n \n def _relax_case():\n ''\n return not sys.flags.ignore_environment and key in _os.environ\n else :\n def _relax_case():\n ''\n return False\n return _relax_case\n \n_relax_case=_make_relax_case()\n\n\ndef _pack_uint32(x):\n ''\n return (int(x)&0xFFFFFFFF).to_bytes(4,'little')\n \n \ndef _unpack_uint32(data):\n ''\n assert len(data)==4\n return int.from_bytes(data,'little')\n \ndef _unpack_uint16(data):\n ''\n assert len(data)==2\n return int.from_bytes(data,'little')\n \n \nif _MS_WINDOWS:\n def _path_join(*path_parts):\n ''\n if not path_parts:\n return \"\"\n if len(path_parts)==1:\n return path_parts[0]\n root=\"\"\n path=[]\n for new_root,tail in map(_os._path_splitroot,path_parts):\n if new_root.startswith(path_sep_tuple)or new_root.endswith(path_sep_tuple):\n root=new_root.rstrip(path_separators)or root\n path=[path_sep+tail]\n elif new_root.endswith(':'):\n if root.casefold()!=new_root.casefold():\n \n \n root=new_root\n path=[tail]\n else :\n path.append(tail)\n else :\n root=new_root or root\n path.append(tail)\n path=[p.rstrip(path_separators)for p in path if p]\n if len(path)==1 and not path[0]:\n \n return root+path_sep\n return root+path_sep.join(path)\n \nelse :\n def _path_join(*path_parts):\n ''\n return path_sep.join([part.rstrip(path_separators)\n for part in path_parts if part])\n \n \ndef _path_split(path):\n ''\n i=max(path.rfind(p)for p in path_separators)\n if i <0:\n return '',path\n return path[:i],path[i+1:]\n \n \ndef _path_stat(path):\n ''\n\n\n\n\n \n return _os.stat(path)\n \n \ndef _path_is_mode_type(path,mode):\n ''\n try :\n stat_info=_path_stat(path)\n except OSError:\n return False\n return (stat_info.st_mode&0o170000)==mode\n \n \ndef _path_isfile(path):\n ''\n return _path_is_mode_type(path,0o100000)\n \n \ndef _path_isdir(path):\n ''\n if not path:\n path=_os.getcwd()\n return _path_is_mode_type(path,0o040000)\n \n \nif _MS_WINDOWS:\n def _path_isabs(path):\n ''\n if not path:\n return False\n root=_os._path_splitroot(path)[0].replace('/','\\\\')\n return len(root)>1 and (root.startswith('\\\\\\\\')or root.endswith('\\\\'))\n \nelse :\n def _path_isabs(path):\n ''\n return path.startswith(path_separators)\n \n \ndef _path_abspath(path):\n ''\n if not _path_isabs(path):\n for sep in path_separators:\n path=path.removeprefix(f\".{sep}\")\n return _path_join(_os.getcwd(),path)\n else :\n return path\n \n \ndef _write_atomic(path,data,mode=0o666):\n ''\n\n \n \n path_tmp=f'{path}.{id(path)}'\n fd=_os.open(path_tmp,\n _os.O_EXCL |_os.O_CREAT |_os.O_WRONLY,mode&0o666)\n try :\n \n \n with _io.FileIO(fd,'wb')as file:\n file.write(data)\n _os.replace(path_tmp,path)\n except OSError:\n try :\n _os.unlink(path_tmp)\n except OSError:\n pass\n raise\n \n \n_code_type=type(_write_atomic.__code__)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nMAGIC_NUMBER=(3531).to_bytes(2,'little')+b'\\r\\n'\n\n_RAW_MAGIC_NUMBER=int.from_bytes(MAGIC_NUMBER,'little')\n\n_PYCACHE='__pycache__'\n_OPT='opt-'\n\nSOURCE_SUFFIXES=['.py']\nif _MS_WINDOWS:\n SOURCE_SUFFIXES.append('.pyw')\n \nEXTENSION_SUFFIXES=_imp.extension_suffixes()\n\nBYTECODE_SUFFIXES=['.pyc']\n\nDEBUG_BYTECODE_SUFFIXES=OPTIMIZED_BYTECODE_SUFFIXES=BYTECODE_SUFFIXES\n\ndef cache_from_source(path,debug_override=None ,*,optimization=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if debug_override is not None :\n _warnings.warn('the debug_override parameter is deprecated; use '\n \"'optimization' instead\",DeprecationWarning)\n if optimization is not None :\n message='debug_override or optimization must be set to None'\n raise TypeError(message)\n optimization=''if debug_override else 1\n path=_os.fspath(path)\n head,tail=_path_split(path)\n base,sep,rest=tail.rpartition('.')\n tag=sys.implementation.cache_tag\n if tag is None :\n raise NotImplementedError('sys.implementation.cache_tag is None')\n almost_filename=''.join([(base if base else rest),sep,tag])\n if optimization is None :\n if sys.flags.optimize ==0:\n optimization=''\n else :\n optimization=sys.flags.optimize\n optimization=str(optimization)\n if optimization !='':\n if not optimization.isalnum():\n raise ValueError(f'{optimization !r} is not alphanumeric')\n almost_filename=f'{almost_filename}.{_OPT}{optimization}'\n filename=almost_filename+BYTECODE_SUFFIXES[0]\n if sys.pycache_prefix is not None :\n \n \n \n \n \n \n \n \n head=_path_abspath(head)\n \n \n \n \n if head[1]==':'and head[0]not in path_separators:\n head=head[2:]\n \n \n \n return _path_join(\n sys.pycache_prefix,\n head.lstrip(path_separators),\n filename,\n )\n return _path_join(head,_PYCACHE,filename)\n \n \ndef source_from_cache(path):\n ''\n\n\n\n\n\n\n \n if sys.implementation.cache_tag is None :\n raise NotImplementedError('sys.implementation.cache_tag is None')\n path=_os.fspath(path)\n head,pycache_filename=_path_split(path)\n found_in_pycache_prefix=False\n if sys.pycache_prefix is not None :\n stripped_path=sys.pycache_prefix.rstrip(path_separators)\n if head.startswith(stripped_path+path_sep):\n head=head[len(stripped_path):]\n found_in_pycache_prefix=True\n if not found_in_pycache_prefix:\n head,pycache=_path_split(head)\n if pycache !=_PYCACHE:\n raise ValueError(f'{_PYCACHE} not bottom-level directory in '\n f'{path !r}')\n dot_count=pycache_filename.count('.')\n if dot_count not in {2,3}:\n raise ValueError(f'expected only 2 or 3 dots in {pycache_filename !r}')\n elif dot_count ==3:\n optimization=pycache_filename.rsplit('.',2)[-2]\n if not optimization.startswith(_OPT):\n raise ValueError(\"optimization portion of filename does not start \"\n f\"with {_OPT !r}\")\n opt_level=optimization[len(_OPT):]\n if not opt_level.isalnum():\n raise ValueError(f\"optimization level {optimization !r} is not an \"\n \"alphanumeric value\")\n base_filename=pycache_filename.partition('.')[0]\n return _path_join(head,base_filename+SOURCE_SUFFIXES[0])\n \n \ndef _get_sourcefile(bytecode_path):\n ''\n\n\n\n\n \n if len(bytecode_path)==0:\n return None\n rest,_,extension=bytecode_path.rpartition('.')\n if not rest or extension.lower()[-3:-1]!='py':\n return bytecode_path\n try :\n source_path=source_from_cache(bytecode_path)\n except (NotImplementedError,ValueError):\n source_path=bytecode_path[:-1]\n return source_path if _path_isfile(source_path)else bytecode_path\n \n \ndef _get_cached(filename):\n if filename.endswith(tuple(SOURCE_SUFFIXES)):\n try :\n return cache_from_source(filename)\n except NotImplementedError:\n pass\n elif filename.endswith(tuple(BYTECODE_SUFFIXES)):\n return filename\n else :\n return None\n \n \ndef _calc_mode(path):\n ''\n try :\n mode=_path_stat(path).st_mode\n except OSError:\n mode=0o666\n \n \n mode |=0o200\n return mode\n \n \ndef _check_name(method):\n ''\n\n\n\n\n\n \n def _check_name_wrapper(self,name=None ,*args,**kwargs):\n if name is None :\n name=self.name\n elif self.name !=name:\n raise ImportError('loader for %s cannot handle %s'%\n (self.name,name),name=name)\n return method(self,name,*args,**kwargs)\n \n \n \n if _bootstrap is not None :\n _wrap=_bootstrap._wrap\n else :\n def _wrap(new,old):\n for replace in ['__module__','__name__','__qualname__','__doc__']:\n if hasattr(old,replace):\n setattr(new,replace,getattr(old,replace))\n new.__dict__.update(old.__dict__)\n \n _wrap(_check_name_wrapper,method)\n return _check_name_wrapper\n \n \ndef _classify_pyc(data,name,exc_details):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n magic=data[:4]\n if magic !=MAGIC_NUMBER:\n message=f'bad magic number in {name !r}: {magic !r}'\n _bootstrap._verbose_message('{}',message)\n raise ImportError(message,**exc_details)\n if len(data)<16:\n message=f'reached EOF while reading pyc header of {name !r}'\n _bootstrap._verbose_message('{}',message)\n raise EOFError(message)\n flags=_unpack_uint32(data[4:8])\n \n if flags&~0b11:\n message=f'invalid flags {flags !r} in {name !r}'\n raise ImportError(message,**exc_details)\n return flags\n \n \ndef _validate_timestamp_pyc(data,source_mtime,source_size,name,\nexc_details):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if _unpack_uint32(data[8:12])!=(source_mtime&0xFFFFFFFF):\n message=f'bytecode is stale for {name !r}'\n _bootstrap._verbose_message('{}',message)\n raise ImportError(message,**exc_details)\n if (source_size is not None and\n _unpack_uint32(data[12:16])!=(source_size&0xFFFFFFFF)):\n raise ImportError(f'bytecode is stale for {name !r}',**exc_details)\n \n \ndef _validate_hash_pyc(data,source_hash,name,exc_details):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if data[8:16]!=source_hash:\n raise ImportError(\n f'hash in bytecode doesn\\'t match hash of source {name !r}',\n **exc_details,\n )\n \n \ndef _compile_bytecode(data,name=None ,bytecode_path=None ,source_path=None ):\n ''\n code=marshal.loads(data)\n if isinstance(code,_code_type):\n _bootstrap._verbose_message('code object from {!r}',bytecode_path)\n if source_path is not None :\n _imp._fix_co_filename(code,source_path)\n return code\n else :\n raise ImportError(f'Non-code object in {bytecode_path !r}',\n name=name,path=bytecode_path)\n \n \ndef _code_to_timestamp_pyc(code,mtime=0,source_size=0):\n ''\n data=bytearray(MAGIC_NUMBER)\n data.extend(_pack_uint32(0))\n data.extend(_pack_uint32(mtime))\n data.extend(_pack_uint32(source_size))\n data.extend(marshal.dumps(code))\n return data\n \n \ndef _code_to_hash_pyc(code,source_hash,checked=True ):\n ''\n data=bytearray(MAGIC_NUMBER)\n flags=0b1 |checked <<1\n data.extend(_pack_uint32(flags))\n assert len(source_hash)==8\n data.extend(source_hash)\n data.extend(marshal.dumps(code))\n return data\n \n \ndef decode_source(source_bytes):\n ''\n\n\n \n import tokenize\n source_bytes_readline=_io.BytesIO(source_bytes).readline\n encoding=tokenize.detect_encoding(source_bytes_readline)\n newline_decoder=_io.IncrementalNewlineDecoder(None ,True )\n return newline_decoder.decode(source_bytes.decode(encoding[0]))\n \n \n \n \n_POPULATE=object()\n\n\ndef spec_from_file_location(name,location=None ,*,loader=None ,\nsubmodule_search_locations=_POPULATE):\n ''\n\n\n\n\n\n\n\n\n \n if location is None :\n \n \n \n location=''\n if hasattr(loader,'get_filename'):\n \n try :\n location=loader.get_filename(name)\n except ImportError:\n pass\n else :\n location=_os.fspath(location)\n try :\n location=_path_abspath(location)\n except OSError:\n pass\n \n \n \n \n \n \n \n spec=_bootstrap.ModuleSpec(name,loader,origin=location)\n spec._set_fileattr=True\n \n \n if loader is None :\n for loader_class,suffixes in _get_supported_file_loaders():\n if location.endswith(tuple(suffixes)):\n loader=loader_class(name,location)\n spec.loader=loader\n break\n else :\n return None\n \n \n if submodule_search_locations is _POPULATE:\n \n if hasattr(loader,'is_package'):\n try :\n is_package=loader.is_package(name)\n except ImportError:\n pass\n else :\n if is_package:\n spec.submodule_search_locations=[]\n else :\n spec.submodule_search_locations=submodule_search_locations\n if spec.submodule_search_locations ==[]:\n if location:\n dirname=_path_split(location)[0]\n spec.submodule_search_locations.append(dirname)\n \n return spec\n \n \ndef _bless_my_loader(module_globals):\n ''\n\n\n \n \n \n \n \n \n \n \n if not isinstance(module_globals,dict):\n return None\n \n missing=object()\n loader=module_globals.get('__loader__',None )\n spec=module_globals.get('__spec__',missing)\n \n if loader is None :\n if spec is missing:\n \n \n return None\n elif spec is None :\n raise ValueError('Module globals is missing a __spec__.loader')\n \n spec_loader=getattr(spec,'loader',missing)\n \n if spec_loader in (missing,None ):\n if loader is None :\n exc=AttributeError if spec_loader is missing else ValueError\n raise exc('Module globals is missing a __spec__.loader')\n _warnings.warn(\n 'Module globals is missing a __spec__.loader',\n DeprecationWarning)\n spec_loader=loader\n \n assert spec_loader is not None\n if loader is not None and loader !=spec_loader:\n _warnings.warn(\n 'Module globals; __loader__ != __spec__.loader',\n DeprecationWarning)\n return loader\n \n return spec_loader\n \n \n \n \nclass WindowsRegistryFinder:\n\n ''\n \n REGISTRY_KEY=(\n 'Software\\\\Python\\\\PythonCore\\\\{sys_version}'\n '\\\\Modules\\\\{fullname}')\n REGISTRY_KEY_DEBUG=(\n 'Software\\\\Python\\\\PythonCore\\\\{sys_version}'\n '\\\\Modules\\\\{fullname}\\\\Debug')\n DEBUG_BUILD=(_MS_WINDOWS and '_d.pyd'in EXTENSION_SUFFIXES)\n \n @staticmethod\n def _open_registry(key):\n try :\n return winreg.OpenKey(winreg.HKEY_CURRENT_USER,key)\n except OSError:\n return winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,key)\n \n @classmethod\n def _search_registry(cls,fullname):\n if cls.DEBUG_BUILD:\n registry_key=cls.REGISTRY_KEY_DEBUG\n else :\n registry_key=cls.REGISTRY_KEY\n key=registry_key.format(fullname=fullname,\n sys_version='%d.%d'%sys.version_info[:2])\n try :\n with cls._open_registry(key)as hkey:\n filepath=winreg.QueryValue(hkey,'')\n except OSError:\n return None\n return filepath\n \n @classmethod\n def find_spec(cls,fullname,path=None ,target=None ):\n filepath=cls._search_registry(fullname)\n if filepath is None :\n return None\n try :\n _path_stat(filepath)\n except OSError:\n return None\n for loader,suffixes in _get_supported_file_loaders():\n if filepath.endswith(tuple(suffixes)):\n spec=_bootstrap.spec_from_loader(fullname,\n loader(fullname,filepath),\n origin=filepath)\n return spec\n \n \nclass _LoaderBasics:\n\n ''\n \n \n def is_package(self,fullname):\n ''\n \n filename=_path_split(self.get_filename(fullname))[1]\n filename_base=filename.rsplit('.',1)[0]\n tail_name=fullname.rpartition('.')[2]\n return filename_base =='__init__'and tail_name !='__init__'\n \n def create_module(self,spec):\n ''\n \n def exec_module(self,module):\n ''\n code=self.get_code(module.__name__)\n if code is None :\n raise ImportError(f'cannot load module {module.__name__ !r} when '\n 'get_code() returns None')\n _bootstrap._call_with_frames_removed(exec,code,module.__dict__)\n \n def load_module(self,fullname):\n ''\n \n return _bootstrap._load_module_shim(self,fullname)\n \n \nclass SourceLoader(_LoaderBasics):\n\n def path_mtime(self,path):\n ''\n\n\n\n \n raise OSError\n \n def path_stats(self,path):\n ''\n\n\n\n\n\n\n\n\n\n \n return {'mtime':self.path_mtime(path)}\n \n def _cache_bytecode(self,source_path,cache_path,data):\n ''\n\n\n\n\n \n \n return self.set_data(cache_path,data)\n \n def set_data(self,path,data):\n ''\n\n\n \n \n \n def get_source(self,fullname):\n ''\n path=self.get_filename(fullname)\n try :\n source_bytes=self.get_data(path)\n except OSError as exc:\n raise ImportError('source not available through get_data()',\n name=fullname)from exc\n return decode_source(source_bytes)\n \n def source_to_code(self,data,path,*,_optimize=-1):\n ''\n\n\n \n return _bootstrap._call_with_frames_removed(compile,data,path,'exec',\n dont_inherit=True ,optimize=_optimize)\n \n def get_code(self,fullname):\n ''\n\n\n\n\n \n source_path=self.get_filename(fullname)\n source_mtime=None\n source_bytes=None\n source_hash=None\n hash_based=False\n check_source=True\n try :\n bytecode_path=cache_from_source(source_path)\n except NotImplementedError:\n bytecode_path=None\n else :\n try :\n st=self.path_stats(source_path)\n except OSError:\n pass\n else :\n source_mtime=int(st['mtime'])\n try :\n data=self.get_data(bytecode_path)\n except OSError:\n pass\n else :\n exc_details={\n 'name':fullname,\n 'path':bytecode_path,\n }\n try :\n flags=_classify_pyc(data,fullname,exc_details)\n bytes_data=memoryview(data)[16:]\n hash_based=flags&0b1 !=0\n if hash_based:\n check_source=flags&0b10 !=0\n if (_imp.check_hash_based_pycs !='never'and\n (check_source or\n _imp.check_hash_based_pycs =='always')):\n source_bytes=self.get_data(source_path)\n source_hash=_imp.source_hash(\n _RAW_MAGIC_NUMBER,\n source_bytes,\n )\n _validate_hash_pyc(data,source_hash,fullname,\n exc_details)\n else :\n _validate_timestamp_pyc(\n data,\n source_mtime,\n st['size'],\n fullname,\n exc_details,\n )\n except (ImportError,EOFError):\n pass\n else :\n _bootstrap._verbose_message('{} matches {}',bytecode_path,\n source_path)\n return _compile_bytecode(bytes_data,name=fullname,\n bytecode_path=bytecode_path,\n source_path=source_path)\n if source_bytes is None :\n source_bytes=self.get_data(source_path)\n code_object=self.source_to_code(source_bytes,source_path)\n _bootstrap._verbose_message('code object from {}',source_path)\n if (not sys.dont_write_bytecode and bytecode_path is not None and\n source_mtime is not None ):\n if hash_based:\n if source_hash is None :\n source_hash=_imp.source_hash(_RAW_MAGIC_NUMBER,\n source_bytes)\n data=_code_to_hash_pyc(code_object,source_hash,check_source)\n else :\n data=_code_to_timestamp_pyc(code_object,source_mtime,\n len(source_bytes))\n try :\n self._cache_bytecode(source_path,bytecode_path,data)\n except NotImplementedError:\n pass\n return code_object\n \n \nclass FileLoader:\n\n ''\n \n \n def __init__(self,fullname,path):\n ''\n \n self.name=fullname\n self.path=path\n \n def __eq__(self,other):\n return (self.__class__ ==other.__class__ and\n self.__dict__ ==other.__dict__)\n \n def __hash__(self):\n return hash(self.name)^hash(self.path)\n \n @_check_name\n def load_module(self,fullname):\n ''\n\n\n\n \n \n \n \n return super(FileLoader,self).load_module(fullname)\n \n @_check_name\n def get_filename(self,fullname):\n ''\n return self.path\n \n def get_data(self,path):\n ''\n if isinstance(self,(SourceLoader,ExtensionFileLoader)):\n with _io.open_code(str(path))as file:\n return file.read()\n else :\n with _io.FileIO(path,'r')as file:\n return file.read()\n \n @_check_name\n def get_resource_reader(self,module):\n from importlib.readers import FileReader\n return FileReader(self)\n \n \nclass SourceFileLoader(FileLoader,SourceLoader):\n\n ''\n \n def path_stats(self,path):\n ''\n st=_path_stat(path)\n return {'mtime':st.st_mtime,'size':st.st_size}\n \n def _cache_bytecode(self,source_path,bytecode_path,data):\n \n mode=_calc_mode(source_path)\n return self.set_data(bytecode_path,data,_mode=mode)\n \n def set_data(self,path,data,*,_mode=0o666):\n ''\n parent,filename=_path_split(path)\n path_parts=[]\n \n while parent and not _path_isdir(parent):\n parent,part=_path_split(parent)\n path_parts.append(part)\n \n for part in reversed(path_parts):\n parent=_path_join(parent,part)\n try :\n _os.mkdir(parent)\n except FileExistsError:\n \n continue\n except OSError as exc:\n \n \n _bootstrap._verbose_message('could not create {!r}: {!r}',\n parent,exc)\n return\n try :\n _write_atomic(path,data,_mode)\n _bootstrap._verbose_message('created {!r}',path)\n except OSError as exc:\n \n _bootstrap._verbose_message('could not create {!r}: {!r}',path,\n exc)\n \n \nclass SourcelessFileLoader(FileLoader,_LoaderBasics):\n\n ''\n \n def get_code(self,fullname):\n path=self.get_filename(fullname)\n data=self.get_data(path)\n \n \n exc_details={\n 'name':fullname,\n 'path':path,\n }\n _classify_pyc(data,fullname,exc_details)\n return _compile_bytecode(\n memoryview(data)[16:],\n name=fullname,\n bytecode_path=path,\n )\n \n def get_source(self,fullname):\n ''\n return None\n \n \nclass ExtensionFileLoader(FileLoader,_LoaderBasics):\n\n ''\n\n\n\n \n \n def __init__(self,name,path):\n self.name=name\n self.path=path\n \n def __eq__(self,other):\n return (self.__class__ ==other.__class__ and\n self.__dict__ ==other.__dict__)\n \n def __hash__(self):\n return hash(self.name)^hash(self.path)\n \n def create_module(self,spec):\n ''\n module=_bootstrap._call_with_frames_removed(\n _imp.create_dynamic,spec)\n _bootstrap._verbose_message('extension module {!r} loaded from {!r}',\n spec.name,self.path)\n return module\n \n def exec_module(self,module):\n ''\n _bootstrap._call_with_frames_removed(_imp.exec_dynamic,module)\n _bootstrap._verbose_message('extension module {!r} executed from {!r}',\n self.name,self.path)\n \n def is_package(self,fullname):\n ''\n file_name=_path_split(self.path)[1]\n return any(file_name =='__init__'+suffix\n for suffix in EXTENSION_SUFFIXES)\n \n def get_code(self,fullname):\n ''\n return None\n \n def get_source(self,fullname):\n ''\n return None\n \n @_check_name\n def get_filename(self,fullname):\n ''\n return self.path\n \n \nclass _NamespacePath:\n ''\n\n\n\n \n \n \n \n _epoch=0\n \n def __init__(self,name,path,path_finder):\n self._name=name\n self._path=path\n self._last_parent_path=tuple(self._get_parent_path())\n self._last_epoch=self._epoch\n self._path_finder=path_finder\n \n def _find_parent_path_names(self):\n ''\n parent,dot,me=self._name.rpartition('.')\n if dot =='':\n \n return 'sys','path'\n \n \n return parent,'__path__'\n \n def _get_parent_path(self):\n parent_module_name,path_attr_name=self._find_parent_path_names()\n return getattr(sys.modules[parent_module_name],path_attr_name)\n \n def _recalculate(self):\n \n parent_path=tuple(self._get_parent_path())\n if parent_path !=self._last_parent_path or self._epoch !=self._last_epoch:\n spec=self._path_finder(self._name,parent_path)\n \n \n if spec is not None and spec.loader is None :\n if spec.submodule_search_locations:\n self._path=spec.submodule_search_locations\n self._last_parent_path=parent_path\n self._last_epoch=self._epoch\n return self._path\n \n def __iter__(self):\n return iter(self._recalculate())\n \n def __getitem__(self,index):\n return self._recalculate()[index]\n \n def __setitem__(self,index,path):\n self._path[index]=path\n \n def __len__(self):\n return len(self._recalculate())\n \n def __repr__(self):\n return f'_NamespacePath({self._path !r})'\n \n def __contains__(self,item):\n return item in self._recalculate()\n \n def append(self,item):\n self._path.append(item)\n \n \n \n \n \nclass NamespaceLoader:\n def __init__(self,name,path,path_finder):\n self._path=_NamespacePath(name,path,path_finder)\n \n def is_package(self,fullname):\n return True\n \n def get_source(self,fullname):\n return ''\n \n def get_code(self,fullname):\n return compile('','','exec',dont_inherit=True )\n \n def create_module(self,spec):\n ''\n \n def exec_module(self,module):\n pass\n \n def load_module(self,fullname):\n ''\n\n\n\n \n \n _bootstrap._verbose_message('namespace module loaded with path {!r}',\n self._path)\n \n return _bootstrap._load_module_shim(self,fullname)\n \n def get_resource_reader(self,module):\n from importlib.readers import NamespaceReader\n return NamespaceReader(self._path)\n \n \n \n_NamespaceLoader=NamespaceLoader\n\n\n\n\nclass PathFinder:\n\n ''\n \n @staticmethod\n def invalidate_caches():\n ''\n \n for name,finder in list(sys.path_importer_cache.items()):\n \n \n if finder is None or not _path_isabs(name):\n del sys.path_importer_cache[name]\n elif hasattr(finder,'invalidate_caches'):\n finder.invalidate_caches()\n \n \n _NamespacePath._epoch +=1\n \n @staticmethod\n def _path_hooks(path):\n ''\n if sys.path_hooks is not None and not sys.path_hooks:\n _warnings.warn('sys.path_hooks is empty',ImportWarning)\n for hook in sys.path_hooks:\n try :\n return hook(path)\n except ImportError:\n continue\n else :\n return None\n \n @classmethod\n def _path_importer_cache(cls,path):\n ''\n\n\n\n\n \n if path =='':\n try :\n path=_os.getcwd()\n except FileNotFoundError:\n \n \n return None\n try :\n finder=sys.path_importer_cache[path]\n except KeyError:\n finder=cls._path_hooks(path)\n sys.path_importer_cache[path]=finder\n return finder\n \n @classmethod\n def _get_spec(cls,fullname,path,target=None ):\n ''\n \n \n namespace_path=[]\n for entry in path:\n if not isinstance(entry,str):\n continue\n finder=cls._path_importer_cache(entry)\n if finder is not None :\n spec=finder.find_spec(fullname,target)\n if spec is None :\n continue\n if spec.loader is not None :\n return spec\n portions=spec.submodule_search_locations\n if portions is None :\n raise ImportError('spec missing loader')\n \n \n \n \n namespace_path.extend(portions)\n else :\n spec=_bootstrap.ModuleSpec(fullname,None )\n spec.submodule_search_locations=namespace_path\n return spec\n \n @classmethod\n def find_spec(cls,fullname,path=None ,target=None ):\n ''\n\n\n \n if path is None :\n path=sys.path\n spec=cls._get_spec(fullname,path,target)\n if spec is None :\n return None\n elif spec.loader is None :\n namespace_path=spec.submodule_search_locations\n if namespace_path:\n \n \n spec.origin=None\n spec.submodule_search_locations=_NamespacePath(fullname,namespace_path,cls._get_spec)\n return spec\n else :\n return None\n else :\n return spec\n \n @staticmethod\n def find_distributions(*args,**kwargs):\n ''\n\n\n\n\n\n\n \n from importlib.metadata import MetadataPathFinder\n return MetadataPathFinder.find_distributions(*args,**kwargs)\n \n \nclass FileFinder:\n\n ''\n\n\n\n\n \n \n def __init__(self,path,*loader_details):\n ''\n\n \n loaders=[]\n for loader,suffixes in loader_details:\n loaders.extend((suffix,loader)for suffix in suffixes)\n self._loaders=loaders\n \n if not path or path =='.':\n self.path=_os.getcwd()\n else :\n self.path=_path_abspath(path)\n self._path_mtime=-1\n self._path_cache=set()\n self._relaxed_path_cache=set()\n \n def invalidate_caches(self):\n ''\n self._path_mtime=-1\n \n def _get_spec(self,loader_class,fullname,path,smsl,target):\n loader=loader_class(fullname,path)\n return spec_from_file_location(fullname,path,loader=loader,\n submodule_search_locations=smsl)\n \n def find_spec(self,fullname,target=None ):\n ''\n\n\n \n is_namespace=False\n tail_module=fullname.rpartition('.')[2]\n try :\n mtime=_path_stat(self.path or _os.getcwd()).st_mtime\n except OSError:\n mtime=-1\n if mtime !=self._path_mtime:\n self._fill_cache()\n self._path_mtime=mtime\n \n if _relax_case():\n cache=self._relaxed_path_cache\n cache_module=tail_module.lower()\n else :\n cache=self._path_cache\n cache_module=tail_module\n \n if cache_module in cache:\n base_path=_path_join(self.path,tail_module)\n for suffix,loader_class in self._loaders:\n init_filename='__init__'+suffix\n full_path=_path_join(base_path,init_filename)\n if _path_isfile(full_path):\n return self._get_spec(loader_class,fullname,full_path,[base_path],target)\n else :\n \n \n is_namespace=_path_isdir(base_path)\n \n for suffix,loader_class in self._loaders:\n try :\n full_path=_path_join(self.path,tail_module+suffix)\n except ValueError:\n return None\n _bootstrap._verbose_message('trying {}',full_path,verbosity=2)\n if cache_module+suffix in cache:\n if _path_isfile(full_path):\n return self._get_spec(loader_class,fullname,full_path,\n None ,target)\n if is_namespace:\n _bootstrap._verbose_message('possible namespace for {}',base_path)\n spec=_bootstrap.ModuleSpec(fullname,None )\n spec.submodule_search_locations=[base_path]\n return spec\n return None\n \n def _fill_cache(self):\n ''\n path=self.path\n try :\n contents=_os.listdir(path or _os.getcwd())\n except (FileNotFoundError,PermissionError,NotADirectoryError):\n \n \n contents=[]\n \n \n if not sys.platform.startswith('win'):\n self._path_cache=set(contents)\n else :\n \n \n \n \n \n lower_suffix_contents=set()\n for item in contents:\n name,dot,suffix=item.partition('.')\n if dot:\n new_name=f'{name}.{suffix.lower()}'\n else :\n new_name=name\n lower_suffix_contents.add(new_name)\n self._path_cache=lower_suffix_contents\n if sys.platform.startswith(_CASE_INSENSITIVE_PLATFORMS):\n self._relaxed_path_cache={fn.lower()for fn in contents}\n \n @classmethod\n def path_hook(cls,*loader_details):\n ''\n\n\n\n\n\n\n \n def path_hook_for_FileFinder(path):\n ''\n if not _path_isdir(path):\n raise ImportError('only directories are supported',path=path)\n return cls(path,*loader_details)\n \n return path_hook_for_FileFinder\n \n def __repr__(self):\n return f'FileFinder({self.path !r})'\n \n \n \n \ndef _fix_up_module(ns,name,pathname,cpathname=None ):\n\n loader=ns.get('__loader__')\n spec=ns.get('__spec__')\n if not loader:\n if spec:\n loader=spec.loader\n elif pathname ==cpathname:\n loader=SourcelessFileLoader(name,pathname)\n else :\n loader=SourceFileLoader(name,pathname)\n if not spec:\n spec=spec_from_file_location(name,pathname,loader=loader)\n if cpathname:\n spec.cached=_path_abspath(cpathname)\n try :\n ns['__spec__']=spec\n ns['__loader__']=loader\n ns['__file__']=pathname\n ns['__cached__']=cpathname\n except Exception:\n \n pass\n \n \ndef _get_supported_file_loaders():\n ''\n\n\n \n extensions=ExtensionFileLoader,_imp.extension_suffixes()\n source=SourceFileLoader,SOURCE_SUFFIXES\n bytecode=SourcelessFileLoader,BYTECODE_SUFFIXES\n return [extensions,source,bytecode]\n \n \ndef _set_bootstrap_module(_bootstrap_module):\n global _bootstrap\n _bootstrap=_bootstrap_module\n \n \ndef _install(_bootstrap_module):\n ''\n _set_bootstrap_module(_bootstrap_module)\n supported_loaders=_get_supported_file_loaders()\n sys.path_hooks.extend([FileFinder.path_hook(*supported_loaders)])\n sys.meta_path.append(PathFinder)\n", ["_imp", "_io", "_warnings", "importlib.metadata", "importlib.readers", "marshal", "nt", "posix", "sys", "tokenize", "winreg"]], "importlib": [".py", "''\n__all__=['__import__','import_module','invalidate_caches','reload']\n\n\n\n\n\n\n\n\n\nimport _imp\nimport sys\n\ntry :\n import _frozen_importlib as _bootstrap\nexcept ImportError:\n from . import _bootstrap\n _bootstrap._setup(sys,_imp)\nelse :\n\n\n _bootstrap.__name__='importlib._bootstrap'\n _bootstrap.__package__='importlib'\n try :\n _bootstrap.__file__=__file__.replace('__init__.py','_bootstrap.py')\n except NameError:\n \n \n pass\n sys.modules['importlib._bootstrap']=_bootstrap\n \ntry :\n import _frozen_importlib_external as _bootstrap_external\nexcept ImportError:\n from . import _bootstrap_external\n _bootstrap_external._set_bootstrap_module(_bootstrap)\n _bootstrap._bootstrap_external=_bootstrap_external\nelse :\n _bootstrap_external.__name__='importlib._bootstrap_external'\n _bootstrap_external.__package__='importlib'\n try :\n _bootstrap_external.__file__=__file__.replace('__init__.py','_bootstrap_external.py')\n except NameError:\n \n \n pass\n sys.modules['importlib._bootstrap_external']=_bootstrap_external\n \n \n_pack_uint32=_bootstrap_external._pack_uint32\n_unpack_uint32=_bootstrap_external._unpack_uint32\n\n\n\n\nimport warnings\n\n\n\n\nfrom ._bootstrap import __import__\n\n\ndef invalidate_caches():\n ''\n \n for finder in sys.meta_path:\n if hasattr(finder,'invalidate_caches'):\n finder.invalidate_caches()\n \n \ndef import_module(name,package=None ):\n ''\n\n\n\n\n\n \n level=0\n if name.startswith('.'):\n if not package:\n raise TypeError(\"the 'package' argument is required to perform a \"\n f\"relative import for {name !r}\")\n for character in name:\n if character !='.':\n break\n level +=1\n return _bootstrap._gcd_import(name[level:],package,level)\n \n \n_RELOADING={}\n\n\ndef reload(module):\n ''\n\n\n\n \n try :\n name=module.__spec__.name\n except AttributeError:\n try :\n name=module.__name__\n except AttributeError:\n raise TypeError(\"reload() argument must be a module\")\n \n if sys.modules.get(name)is not module:\n raise ImportError(f\"module {name} not in sys.modules\",name=name)\n if name in _RELOADING:\n return _RELOADING[name]\n _RELOADING[name]=module\n try :\n parent_name=name.rpartition('.')[0]\n if parent_name:\n try :\n parent=sys.modules[parent_name]\n except KeyError:\n raise ImportError(f\"parent {parent_name !r} not in sys.modules\",\n name=parent_name)from None\n else :\n pkgpath=parent.__path__\n else :\n pkgpath=None\n target=module\n spec=module.__spec__=_bootstrap._find_spec(name,pkgpath,target)\n if spec is None :\n raise ModuleNotFoundError(f\"spec not found for the module {name !r}\",name=name)\n _bootstrap._exec(spec,module)\n \n return sys.modules[name]\n finally :\n try :\n del _RELOADING[name]\n except KeyError:\n pass\n", ["_frozen_importlib", "_frozen_importlib_external", "_imp", "importlib", "importlib._bootstrap", "importlib._bootstrap_external", "sys", "warnings"], 1], "importlib.metadata._adapters": [".py", "import re\nimport textwrap\nimport email.message\n\nfrom ._text import FoldedCase\n\n\nclass Message(email.message.Message):\n multiple_use_keys=set(\n map(\n FoldedCase,\n [\n 'Classifier',\n 'Obsoletes-Dist',\n 'Platform',\n 'Project-URL',\n 'Provides-Dist',\n 'Provides-Extra',\n 'Requires-Dist',\n 'Requires-External',\n 'Supported-Platform',\n 'Dynamic',\n ],\n )\n )\n ''\n\n \n \n def __new__(cls,orig:email.message.Message):\n res=super().__new__(cls)\n vars(res).update(vars(orig))\n return res\n \n def __init__(self,*args,**kwargs):\n self._headers=self._repair_headers()\n \n \n def __iter__(self):\n return super().__iter__()\n \n def _repair_headers(self):\n def redent(value):\n ''\n if not value or '\\n'not in value:\n return value\n return textwrap.dedent(' '*8+value)\n \n headers=[(key,redent(value))for key,value in vars(self)['_headers']]\n if self._payload:\n headers.append(('Description',self.get_payload()))\n return headers\n \n @property\n def json(self):\n ''\n\n\n \n \n def transform(key):\n value=self.get_all(key)if key in self.multiple_use_keys else self[key]\n if key =='Keywords':\n value=re.split(r'\\s+',value)\n tk=key.lower().replace('-','_')\n return tk,value\n \n return dict(map(transform,map(FoldedCase,self)))\n", ["email.message", "importlib.metadata._text", "re", "textwrap"]], "importlib.metadata._collections": [".py", "import collections\n\n\n\nclass FreezableDefaultDict(collections.defaultdict):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __missing__(self,key):\n return getattr(self,'_frozen',super().__missing__)(key)\n \n def freeze(self):\n self._frozen=lambda key:self.default_factory()\n \n \nclass Pair(collections.namedtuple('Pair','name value')):\n @classmethod\n def parse(cls,text):\n return cls(*map(str.strip,text.split(\"=\",1)))\n", ["collections"]], "importlib.metadata._functools": [".py", "import types\nimport functools\n\n\n\ndef method_cache(method,cache_wrapper=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n cache_wrapper=cache_wrapper or functools.lru_cache()\n \n def wrapper(self,*args,**kwargs):\n \n bound_method=types.MethodType(method,self)\n cached_method=cache_wrapper(bound_method)\n setattr(self,method.__name__,cached_method)\n return cached_method(*args,**kwargs)\n \n \n wrapper.cache_clear=lambda :None\n \n return wrapper\n \n \n \ndef pass_none(func):\n ''\n\n\n\n\n\n\n \n \n @functools.wraps(func)\n def wrapper(param,*args,**kwargs):\n if param is not None :\n return func(param,*args,**kwargs)\n \n return wrapper\n", ["functools", "types"]], "importlib.metadata._itertools": [".py", "from itertools import filterfalse\n\n\ndef unique_everseen(iterable,key=None ):\n ''\n \n \n seen=set()\n seen_add=seen.add\n if key is None :\n for element in filterfalse(seen.__contains__,iterable):\n seen_add(element)\n yield element\n else :\n for element in iterable:\n k=key(element)\n if k not in seen:\n seen_add(k)\n yield element\n \n \n \ndef always_iterable(obj,base_type=(str,bytes)):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if obj is None :\n return iter(())\n \n if (base_type is not None )and isinstance(obj,base_type):\n return iter((obj,))\n \n try :\n return iter(obj)\n except TypeError:\n return iter((obj,))\n", ["itertools"]], "importlib.metadata._meta": [".py", "from typing import Any,Dict,Iterator,List,Protocol,TypeVar,Union\n\n\n_T=TypeVar(\"_T\")\n\n\nclass PackageMetadata(Protocol):\n def __len__(self)->int:\n ...\n \n def __contains__(self,item:str)->bool:\n ...\n \n def __getitem__(self,key:str)->str:\n ...\n \n def __iter__(self)->Iterator[str]:\n ...\n \n def get_all(self,name:str,failobj:_T=...)->Union[List[Any],_T]:\n ''\n\n \n \n @property\n def json(self)->Dict[str,Union[str,List[str]]]:\n ''\n\n \n \n \nclass SimplePath(Protocol):\n ''\n\n \n \n def joinpath(self)->'SimplePath':\n ...\n \n def __truediv__(self)->'SimplePath':\n ...\n \n def parent(self)->'SimplePath':\n ...\n \n def read_text(self)->str:\n ...\n", ["typing"]], "importlib.metadata._text": [".py", "import re\n\nfrom ._functools import method_cache\n\n\n\nclass FoldedCase(str):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __lt__(self,other):\n return self.lower()other.lower()\n \n def __eq__(self,other):\n return self.lower()==other.lower()\n \n def __ne__(self,other):\n return self.lower()!=other.lower()\n \n def __hash__(self):\n return hash(self.lower())\n \n def __contains__(self,other):\n return super().lower().__contains__(other.lower())\n \n def in_(self,other):\n ''\n return self in FoldedCase(other)\n \n \n @method_cache\n def lower(self):\n return super().lower()\n \n def index(self,sub):\n return self.lower().index(sub.lower())\n \n def split(self,splitter=' ',maxsplit=0):\n pattern=re.compile(re.escape(splitter),re.I)\n return pattern.split(self,maxsplit)\n", ["importlib.metadata._functools", "re"]], "importlib.metadata": [".py", "import os\nimport re\nimport abc\nimport csv\nimport sys\nimport email\nimport pathlib\nimport zipfile\nimport operator\nimport textwrap\nimport warnings\nimport functools\nimport itertools\nimport posixpath\nimport collections\n\nfrom . import _adapters,_meta\nfrom ._collections import FreezableDefaultDict,Pair\nfrom ._functools import method_cache,pass_none\nfrom ._itertools import always_iterable,unique_everseen\nfrom ._meta import PackageMetadata,SimplePath\n\nfrom contextlib import suppress\nfrom importlib import import_module\nfrom importlib.abc import MetaPathFinder\nfrom itertools import starmap\nfrom typing import List,Mapping,Optional,Union\n\n\n__all__=[\n'Distribution',\n'DistributionFinder',\n'PackageMetadata',\n'PackageNotFoundError',\n'distribution',\n'distributions',\n'entry_points',\n'files',\n'metadata',\n'packages_distributions',\n'requires',\n'version',\n]\n\n\nclass PackageNotFoundError(ModuleNotFoundError):\n ''\n \n def __str__(self):\n return f\"No package metadata was found for {self.name}\"\n \n @property\n def name(self):\n (name,)=self.args\n return name\n \n \nclass Sectioned:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n _sample=textwrap.dedent(\n \"\"\"\n [sec1]\n # comments ignored\n a = 1\n b = 2\n\n [sec2]\n a = 2\n \"\"\"\n ).lstrip()\n \n @classmethod\n def section_pairs(cls,text):\n return (\n section._replace(value=Pair.parse(section.value))\n for section in cls.read(text,filter_=cls.valid)\n if section.name is not None\n )\n \n @staticmethod\n def read(text,filter_=None ):\n lines=filter(filter_,map(str.strip,text.splitlines()))\n name=None\n for value in lines:\n section_match=value.startswith('[')and value.endswith(']')\n if section_match:\n name=value.strip('[]')\n continue\n yield Pair(name,value)\n \n @staticmethod\n def valid(line):\n return line and not line.startswith('#')\n \n \nclass DeprecatedTuple:\n ''\n\n\n\n\n\n\n\n\n\n\n \n \n _warn=functools.partial(\n warnings.warn,\n \"EntryPoint tuple interface is deprecated. Access members by name.\",\n DeprecationWarning,\n stacklevel=2,\n )\n \n def __getitem__(self,item):\n self._warn()\n return self._key()[item]\n \n \nclass EntryPoint(DeprecatedTuple):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n pattern=re.compile(\n r'(?P[\\w.]+)\\s*'\n r'(:\\s*(?P[\\w.]+)\\s*)?'\n r'((?P\\[.*\\])\\s*)?$'\n )\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n name:str\n value:str\n group:str\n \n dist:Optional['Distribution']=None\n \n def __init__(self,name,value,group):\n vars(self).update(name=name,value=value,group=group)\n \n def load(self):\n ''\n\n\n \n match=self.pattern.match(self.value)\n module=import_module(match.group('module'))\n attrs=filter(None ,(match.group('attr')or '').split('.'))\n return functools.reduce(getattr,attrs,module)\n \n @property\n def module(self):\n match=self.pattern.match(self.value)\n return match.group('module')\n \n @property\n def attr(self):\n match=self.pattern.match(self.value)\n return match.group('attr')\n \n @property\n def extras(self):\n match=self.pattern.match(self.value)\n return re.findall(r'\\w+',match.group('extras')or '')\n \n def _for(self,dist):\n vars(self).update(dist=dist)\n return self\n \n def __iter__(self):\n ''\n\n \n msg=(\n \"Construction of dict of EntryPoints is deprecated in \"\n \"favor of EntryPoints.\"\n )\n warnings.warn(msg,DeprecationWarning)\n return iter((self.name,self))\n \n def matches(self,**params):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n attrs=(getattr(self,param)for param in params)\n return all(map(operator.eq,params.values(),attrs))\n \n def _key(self):\n return self.name,self.value,self.group\n \n def __lt__(self,other):\n return self._key()'\n \n \nclass Distribution:\n ''\n \n @abc.abstractmethod\n def read_text(self,filename):\n ''\n\n\n\n \n \n @abc.abstractmethod\n def locate_file(self,path):\n ''\n\n\n \n \n @classmethod\n def from_name(cls,name:str):\n ''\n\n\n\n\n\n\n\n \n if not name:\n raise ValueError(\"A distribution name is required.\")\n try :\n return next(cls.discover(name=name))\n except StopIteration:\n raise PackageNotFoundError(name)\n \n @classmethod\n def discover(cls,**kwargs):\n ''\n\n\n\n\n\n\n \n context=kwargs.pop('context',None )\n if context and kwargs:\n raise ValueError(\"cannot accept context and kwargs\")\n context=context or DistributionFinder.Context(**kwargs)\n return itertools.chain.from_iterable(\n resolver(context)for resolver in cls._discover_resolvers()\n )\n \n @staticmethod\n def at(path):\n ''\n\n\n\n \n return PathDistribution(pathlib.Path(path))\n \n @staticmethod\n def _discover_resolvers():\n ''\n declared=(\n getattr(finder,'find_distributions',None )for finder in sys.meta_path\n )\n return filter(None ,declared)\n \n @property\n def metadata(self)->_meta.PackageMetadata:\n ''\n\n\n\n \n text=(\n self.read_text('METADATA')\n or self.read_text('PKG-INFO')\n \n \n \n or self.read_text('')\n )\n return _adapters.Message(email.message_from_string(text))\n \n @property\n def name(self):\n ''\n return self.metadata['Name']\n \n @property\n def _normalized_name(self):\n ''\n return Prepared.normalize(self.name)\n \n @property\n def version(self):\n ''\n return self.metadata['Version']\n \n @property\n def entry_points(self):\n return EntryPoints._from_text_for(self.read_text('entry_points.txt'),self)\n \n @property\n def files(self):\n ''\n\n\n\n\n\n\n\n \n \n def make_file(name,hash=None ,size_str=None ):\n result=PackagePath(name)\n result.hash=FileHash(hash)if hash else None\n result.size=int(size_str)if size_str else None\n result.dist=self\n return result\n \n @pass_none\n def make_files(lines):\n return list(starmap(make_file,csv.reader(lines)))\n \n return make_files(self._read_files_distinfo()or self._read_files_egginfo())\n \n def _read_files_distinfo(self):\n ''\n\n \n text=self.read_text('RECORD')\n return text and text.splitlines()\n \n def _read_files_egginfo(self):\n ''\n\n\n \n text=self.read_text('SOURCES.txt')\n return text and map('\"{}\"'.format,text.splitlines())\n \n @property\n def requires(self):\n ''\n reqs=self._read_dist_info_reqs()or self._read_egg_info_reqs()\n return reqs and list(reqs)\n \n def _read_dist_info_reqs(self):\n return self.metadata.get_all('Requires-Dist')\n \n def _read_egg_info_reqs(self):\n source=self.read_text('requires.txt')\n return pass_none(self._deps_from_requires_text)(source)\n \n @classmethod\n def _deps_from_requires_text(cls,source):\n return cls._convert_egg_info_reqs_to_simple_reqs(Sectioned.read(source))\n \n @staticmethod\n def _convert_egg_info_reqs_to_simple_reqs(sections):\n ''\n\n\n\n\n\n\n\n \n \n def make_condition(name):\n return name and f'extra == \"{name}\"'\n \n def quoted_marker(section):\n section=section or ''\n extra,sep,markers=section.partition(':')\n if extra and markers:\n markers=f'({markers})'\n conditions=list(filter(None ,[markers,make_condition(extra)]))\n return '; '+' and '.join(conditions)if conditions else ''\n \n def url_req_space(req):\n ''\n\n\n \n \n return ' '*('@'in req)\n \n for section in sections:\n space=url_req_space(section.value)\n yield section.value+space+quoted_marker(section.name)\n \n \nclass DistributionFinder(MetaPathFinder):\n ''\n\n \n \n class Context:\n ''\n\n\n\n\n\n\n\n\n \n \n name=None\n ''\n\n\n \n \n def __init__(self,**kwargs):\n vars(self).update(kwargs)\n \n @property\n def path(self):\n ''\n\n\n\n\n\n \n return vars(self).get('path',sys.path)\n \n @abc.abstractmethod\n def find_distributions(self,context=Context()):\n ''\n\n\n\n\n\n \n \n \nclass FastPath:\n ''\n\n\n\n\n\n \n \n @functools.lru_cache()\n def __new__(cls,root):\n return super().__new__(cls)\n \n def __init__(self,root):\n self.root=root\n \n def joinpath(self,child):\n return pathlib.Path(self.root,child)\n \n def children(self):\n with suppress(Exception):\n return os.listdir(self.root or '.')\n with suppress(Exception):\n return self.zip_children()\n return []\n \n def zip_children(self):\n zip_path=zipfile.Path(self.root)\n names=zip_path.root.namelist()\n self.joinpath=zip_path.joinpath\n \n return dict.fromkeys(child.split(posixpath.sep,1)[0]for child in names)\n \n def search(self,name):\n return self.lookup(self.mtime).search(name)\n \n @property\n def mtime(self):\n with suppress(OSError):\n return os.stat(self.root).st_mtime\n self.lookup.cache_clear()\n \n @method_cache\n def lookup(self,mtime):\n return Lookup(self)\n \n \nclass Lookup:\n def __init__(self,path:FastPath):\n base=os.path.basename(path.root).lower()\n base_is_egg=base.endswith(\".egg\")\n self.infos=FreezableDefaultDict(list)\n self.eggs=FreezableDefaultDict(list)\n \n for child in path.children():\n low=child.lower()\n if low.endswith((\".dist-info\",\".egg-info\")):\n \n name=low.rpartition(\".\")[0].partition(\"-\")[0]\n normalized=Prepared.normalize(name)\n self.infos[normalized].append(path.joinpath(child))\n elif base_is_egg and low ==\"egg-info\":\n name=base.rpartition(\".\")[0].partition(\"-\")[0]\n legacy_normalized=Prepared.legacy_normalize(name)\n self.eggs[legacy_normalized].append(path.joinpath(child))\n \n self.infos.freeze()\n self.eggs.freeze()\n \n def search(self,prepared):\n infos=(\n self.infos[prepared.normalized]\n if prepared\n else itertools.chain.from_iterable(self.infos.values())\n )\n eggs=(\n self.eggs[prepared.legacy_normalized]\n if prepared\n else itertools.chain.from_iterable(self.eggs.values())\n )\n return itertools.chain(infos,eggs)\n \n \nclass Prepared:\n ''\n\n \n \n normalized=None\n legacy_normalized=None\n \n def __init__(self,name):\n self.name=name\n if name is None :\n return\n self.normalized=self.normalize(name)\n self.legacy_normalized=self.legacy_normalize(name)\n \n @staticmethod\n def normalize(name):\n ''\n\n \n return re.sub(r\"[-_.]+\",\"-\",name).lower().replace('-','_')\n \n @staticmethod\n def legacy_normalize(name):\n ''\n\n\n \n return name.lower().replace('-','_')\n \n def __bool__(self):\n return bool(self.name)\n \n \nclass MetadataPathFinder(DistributionFinder):\n @classmethod\n def find_distributions(cls,context=DistributionFinder.Context()):\n ''\n\n\n\n\n\n\n \n found=cls._search_paths(context.name,context.path)\n return map(PathDistribution,found)\n \n @classmethod\n def _search_paths(cls,name,paths):\n ''\n prepared=Prepared(name)\n return itertools.chain.from_iterable(\n path.search(prepared)for path in map(FastPath,paths)\n )\n \n def invalidate_caches(cls):\n FastPath.__new__.cache_clear()\n \n \nclass PathDistribution(Distribution):\n def __init__(self,path:SimplePath):\n ''\n\n\n \n self._path=path\n \n def read_text(self,filename):\n with suppress(\n FileNotFoundError,\n IsADirectoryError,\n KeyError,\n NotADirectoryError,\n PermissionError,\n ):\n return self._path.joinpath(filename).read_text(encoding='utf-8')\n \n read_text.__doc__=Distribution.read_text.__doc__\n \n def locate_file(self,path):\n return self._path.parent /path\n \n @property\n def _normalized_name(self):\n ''\n\n\n \n stem=os.path.basename(str(self._path))\n return (\n pass_none(Prepared.normalize)(self._name_from_stem(stem))\n or super()._normalized_name\n )\n \n @staticmethod\n def _name_from_stem(stem):\n ''\n\n\n\n\n\n\n\n \n filename,ext=os.path.splitext(stem)\n if ext not in ('.dist-info','.egg-info'):\n return\n name,sep,rest=filename.partition('-')\n return name\n \n \ndef distribution(distribution_name):\n ''\n\n\n\n \n return Distribution.from_name(distribution_name)\n \n \ndef distributions(**kwargs):\n ''\n\n\n \n return Distribution.discover(**kwargs)\n \n \ndef metadata(distribution_name)->_meta.PackageMetadata:\n ''\n\n\n\n \n return Distribution.from_name(distribution_name).metadata\n \n \ndef version(distribution_name):\n ''\n\n\n\n\n \n return distribution(distribution_name).version\n \n \n_unique=functools.partial(\nunique_everseen,\nkey=operator.attrgetter('_normalized_name'),\n)\n''\n\n\n\n\ndef entry_points(**params)->Union[EntryPoints,SelectableGroups]:\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n eps=itertools.chain.from_iterable(\n dist.entry_points for dist in _unique(distributions())\n )\n return SelectableGroups.load(eps).select(**params)\n \n \ndef files(distribution_name):\n ''\n\n\n\n \n return distribution(distribution_name).files\n \n \ndef requires(distribution_name):\n ''\n\n\n\n\n \n return distribution(distribution_name).requires\n \n \ndef packages_distributions()->Mapping[str,List[str]]:\n ''\n\n\n\n\n\n\n\n \n pkg_to_dist=collections.defaultdict(list)\n for dist in distributions():\n for pkg in _top_level_declared(dist)or _top_level_inferred(dist):\n pkg_to_dist[pkg].append(dist.metadata['Name'])\n return dict(pkg_to_dist)\n \n \ndef _top_level_declared(dist):\n return (dist.read_text('top_level.txt')or '').split()\n \n \ndef _top_level_inferred(dist):\n return {\n f.parts[0]if len(f.parts)>1 else f.with_suffix('').name\n for f in always_iterable(dist.files)\n if f.suffix ==\".py\"\n }\n", ["abc", "collections", "contextlib", "csv", "email", "functools", "importlib", "importlib.abc", "importlib.metadata", "importlib.metadata._adapters", "importlib.metadata._collections", "importlib.metadata._functools", "importlib.metadata._itertools", "importlib.metadata._meta", "itertools", "operator", "os", "pathlib", "posixpath", "re", "sys", "textwrap", "typing", "warnings", "zipfile"], 1], "importlib.resources.abc": [".py", "import abc\nimport io\nimport os\nfrom typing import Any,BinaryIO,Iterable,Iterator,NoReturn,Text,Optional\nfrom typing import runtime_checkable,Protocol\nfrom typing import Union\n\n\nStrPath=Union[str,os.PathLike[str]]\n\n__all__=[\"ResourceReader\",\"Traversable\",\"TraversableResources\"]\n\n\nclass ResourceReader(metaclass=abc.ABCMeta):\n ''\n \n @abc.abstractmethod\n def open_resource(self,resource:Text)->BinaryIO:\n ''\n\n\n\n \n \n \n \n raise FileNotFoundError\n \n @abc.abstractmethod\n def resource_path(self,resource:Text)->Text:\n ''\n\n\n\n\n \n \n \n \n raise FileNotFoundError\n \n @abc.abstractmethod\n def is_resource(self,path:Text)->bool:\n ''\n\n\n \n raise FileNotFoundError\n \n @abc.abstractmethod\n def contents(self)->Iterable[str]:\n ''\n raise FileNotFoundError\n \n \n@runtime_checkable\nclass Traversable(Protocol):\n ''\n\n\n\n\n\n \n \n @abc.abstractmethod\n def iterdir(self)->Iterator[\"Traversable\"]:\n ''\n\n \n \n def read_bytes(self)->bytes:\n ''\n\n \n with self.open('rb')as strm:\n return strm.read()\n \n def read_text(self,encoding:Optional[str]=None )->str:\n ''\n\n \n with self.open(encoding=encoding)as strm:\n return strm.read()\n \n @abc.abstractmethod\n def is_dir(self)->bool:\n ''\n\n \n \n @abc.abstractmethod\n def is_file(self)->bool:\n ''\n\n \n \n @abc.abstractmethod\n def joinpath(self,*descendants:StrPath)->\"Traversable\":\n ''\n\n\n\n\n\n \n \n def __truediv__(self,child:StrPath)->\"Traversable\":\n ''\n\n \n return self.joinpath(child)\n \n @abc.abstractmethod\n def open(self,mode='r',*args,**kwargs):\n ''\n\n\n\n\n\n \n \n @abc.abstractproperty\n def name(self)->str:\n ''\n\n \n \n \nclass TraversableResources(ResourceReader):\n ''\n\n\n \n \n @abc.abstractmethod\n def files(self)->\"Traversable\":\n ''\n \n def open_resource(self,resource:StrPath)->io.BufferedReader:\n return self.files().joinpath(resource).open('rb')\n \n def resource_path(self,resource:Any)->NoReturn:\n raise FileNotFoundError(resource)\n \n def is_resource(self,path:StrPath)->bool:\n return self.files().joinpath(path).is_file()\n \n def contents(self)->Iterator[str]:\n return (item.name for item in self.files().iterdir())\n", ["abc", "io", "os", "typing"]], "importlib.resources.readers": [".py", "import collections\nimport operator\nimport pathlib\nimport zipfile\n\nfrom . import abc\n\nfrom ._itertools import unique_everseen\n\n\ndef remove_duplicates(items):\n return iter(collections.OrderedDict.fromkeys(items))\n \n \nclass FileReader(abc.TraversableResources):\n def __init__(self,loader):\n self.path=pathlib.Path(loader.path).parent\n \n def resource_path(self,resource):\n ''\n\n\n\n \n return str(self.path.joinpath(resource))\n \n def files(self):\n return self.path\n \n \nclass ZipReader(abc.TraversableResources):\n def __init__(self,loader,module):\n _,_,name=module.rpartition('.')\n self.prefix=loader.prefix.replace('\\\\','/')+name+'/'\n self.archive=loader.archive\n \n def open_resource(self,resource):\n try :\n return super().open_resource(resource)\n except KeyError as exc:\n raise FileNotFoundError(exc.args[0])\n \n def is_resource(self,path):\n \n \n target=self.files().joinpath(path)\n return target.is_file()and target.exists()\n \n def files(self):\n return zipfile.Path(self.archive,self.prefix)\n \n \nclass MultiplexedPath(abc.Traversable):\n ''\n\n\n\n\n \n \n def __init__(self,*paths):\n self._paths=list(map(pathlib.Path,remove_duplicates(paths)))\n if not self._paths:\n message='MultiplexedPath must contain at least one path'\n raise FileNotFoundError(message)\n if not all(path.is_dir()for path in self._paths):\n raise NotADirectoryError('MultiplexedPath only supports directories')\n \n def iterdir(self):\n files=(file for path in self._paths for file in path.iterdir())\n return unique_everseen(files,key=operator.attrgetter('name'))\n \n def read_bytes(self):\n raise FileNotFoundError(f'{self} is not a file')\n \n def read_text(self,*args,**kwargs):\n raise FileNotFoundError(f'{self} is not a file')\n \n def is_dir(self):\n return True\n \n def is_file(self):\n return False\n \n def joinpath(self,child):\n \n for file in self.iterdir():\n if file.name ==child:\n return file\n \n return self._paths[0]/child\n \n __truediv__=joinpath\n \n def open(self,*args,**kwargs):\n raise FileNotFoundError(f'{self} is not a file')\n \n @property\n def name(self):\n return self._paths[0].name\n \n def __repr__(self):\n paths=', '.join(f\"'{path}'\"for path in self._paths)\n return f'MultiplexedPath({paths})'\n \n \nclass NamespaceReader(abc.TraversableResources):\n def __init__(self,namespace_path):\n if 'NamespacePath'not in str(namespace_path):\n raise ValueError('Invalid path')\n self.path=MultiplexedPath(*list(namespace_path))\n \n def resource_path(self,resource):\n ''\n\n\n\n \n return str(self.path.joinpath(resource))\n \n def files(self):\n return self.path\n", ["collections", "importlib.resources", "importlib.resources._itertools", "importlib.resources.abc", "operator", "pathlib", "zipfile"]], "importlib.resources.simple": [".py", "''\n\n\n\nimport abc\nimport io\nimport itertools\nfrom typing import BinaryIO,List\n\nfrom .abc import Traversable,TraversableResources\n\n\nclass SimpleReader(abc.ABC):\n ''\n\n\n \n \n @abc.abstractproperty\n def package(self):\n \n ''\n\n \n \n @abc.abstractmethod\n def children(self):\n \n ''\n\n\n \n \n @abc.abstractmethod\n def resources(self):\n \n ''\n\n \n \n @abc.abstractmethod\n def open_binary(self,resource):\n \n ''\n\n \n \n @property\n def name(self):\n return self.package.split('.')[-1]\n \n \nclass ResourceHandle(Traversable):\n ''\n\n \n \n def __init__(self,parent,name):\n \n self.parent=parent\n self.name=name\n \n def is_file(self):\n return True\n \n def is_dir(self):\n return False\n \n def open(self,mode='r',*args,**kwargs):\n stream=self.parent.reader.open_binary(self.name)\n if 'b'not in mode:\n stream=io.TextIOWrapper(*args,**kwargs)\n return stream\n \n def joinpath(self,name):\n raise RuntimeError(\"Cannot traverse into a resource\")\n \n \nclass ResourceContainer(Traversable):\n ''\n\n \n \n def __init__(self,reader):\n \n self.reader=reader\n \n def is_dir(self):\n return True\n \n def is_file(self):\n return False\n \n def iterdir(self):\n files=(ResourceHandle(self,name)for name in self.reader.resources)\n dirs=map(ResourceContainer,self.reader.children())\n return itertools.chain(files,dirs)\n \n def open(self,*args,**kwargs):\n raise IsADirectoryError()\n \n @staticmethod\n def _flatten(compound_names):\n for name in compound_names:\n yield from name.split('/')\n \n def joinpath(self,*descendants):\n if not descendants:\n return self\n names=self._flatten(descendants)\n target=next(names)\n return next(\n traversable for traversable in self.iterdir()if traversable.name ==target\n ).joinpath(*names)\n \n \nclass TraversableReader(TraversableResources,SimpleReader):\n ''\n\n\n\n \n \n def files(self):\n return ResourceContainer(self)\n", ["abc", "importlib.resources.abc", "io", "itertools", "typing"]], "importlib.resources._adapters": [".py", "from contextlib import suppress\nfrom io import TextIOWrapper\n\nfrom . import abc\n\n\nclass SpecLoaderAdapter:\n ''\n\n \n \n def __init__(self,spec,adapter=lambda spec:spec.loader):\n self.spec=spec\n self.loader=adapter(spec)\n \n def __getattr__(self,name):\n return getattr(self.spec,name)\n \n \nclass TraversableResourcesLoader:\n ''\n\n \n \n def __init__(self,spec):\n self.spec=spec\n \n def get_resource_reader(self,name):\n return CompatibilityFiles(self.spec)._native()\n \n \ndef _io_wrapper(file,mode='r',*args,**kwargs):\n if mode =='r':\n return TextIOWrapper(file,*args,**kwargs)\n elif mode =='rb':\n return file\n raise ValueError(\n \"Invalid mode value '{}', only 'r' and 'rb' are supported\".format(mode)\n )\n \n \nclass CompatibilityFiles:\n ''\n\n\n \n \n class SpecPath(abc.Traversable):\n ''\n\n\n \n \n def __init__(self,spec,reader):\n self._spec=spec\n self._reader=reader\n \n def iterdir(self):\n if not self._reader:\n return iter(())\n return iter(\n CompatibilityFiles.ChildPath(self._reader,path)\n for path in self._reader.contents()\n )\n \n def is_file(self):\n return False\n \n is_dir=is_file\n \n def joinpath(self,other):\n if not self._reader:\n return CompatibilityFiles.OrphanPath(other)\n return CompatibilityFiles.ChildPath(self._reader,other)\n \n @property\n def name(self):\n return self._spec.name\n \n def open(self,mode='r',*args,**kwargs):\n return _io_wrapper(self._reader.open_resource(None ),mode,*args,**kwargs)\n \n class ChildPath(abc.Traversable):\n ''\n\n\n \n \n def __init__(self,reader,name):\n self._reader=reader\n self._name=name\n \n def iterdir(self):\n return iter(())\n \n def is_file(self):\n return self._reader.is_resource(self.name)\n \n def is_dir(self):\n return not self.is_file()\n \n def joinpath(self,other):\n return CompatibilityFiles.OrphanPath(self.name,other)\n \n @property\n def name(self):\n return self._name\n \n def open(self,mode='r',*args,**kwargs):\n return _io_wrapper(\n self._reader.open_resource(self.name),mode,*args,**kwargs\n )\n \n class OrphanPath(abc.Traversable):\n ''\n\n\n \n \n def __init__(self,*path_parts):\n if len(path_parts)<1:\n raise ValueError('Need at least one path part to construct a path')\n self._path=path_parts\n \n def iterdir(self):\n return iter(())\n \n def is_file(self):\n return False\n \n is_dir=is_file\n \n def joinpath(self,other):\n return CompatibilityFiles.OrphanPath(*self._path,other)\n \n @property\n def name(self):\n return self._path[-1]\n \n def open(self,mode='r',*args,**kwargs):\n raise FileNotFoundError(\"Can't open orphan path\")\n \n def __init__(self,spec):\n self.spec=spec\n \n @property\n def _reader(self):\n with suppress(AttributeError):\n return self.spec.loader.get_resource_reader(self.spec.name)\n \n def _native(self):\n ''\n\n \n reader=self._reader\n return reader if hasattr(reader,'files')else self\n \n def __getattr__(self,attr):\n return getattr(self._reader,attr)\n \n def files(self):\n return CompatibilityFiles.SpecPath(self.spec,self._reader)\n \n \ndef wrap_spec(package):\n ''\n\n\n \n return SpecLoaderAdapter(package.__spec__,TraversableResourcesLoader)\n", ["contextlib", "importlib.resources", "importlib.resources.abc", "io"]], "importlib.resources._common": [".py", "import os\nimport pathlib\nimport tempfile\nimport functools\nimport contextlib\nimport types\nimport importlib\n\nfrom typing import Union,Optional\nfrom .abc import ResourceReader,Traversable\n\nfrom ._adapters import wrap_spec\n\nPackage=Union[types.ModuleType,str]\n\n\ndef files(package):\n\n ''\n\n \n return from_package(get_package(package))\n \n \ndef get_resource_reader(package):\n\n ''\n\n \n \n \n \n \n \n spec=package.__spec__\n reader=getattr(spec.loader,'get_resource_reader',None )\n if reader is None :\n return None\n return reader(spec.name)\n \n \ndef resolve(cand):\n\n return cand if isinstance(cand,types.ModuleType)else importlib.import_module(cand)\n \n \ndef get_package(package):\n\n ''\n\n\n \n resolved=resolve(package)\n if wrap_spec(resolved).submodule_search_locations is None :\n raise TypeError(f'{package!r} is not a package')\n return resolved\n \n \ndef from_package(package):\n ''\n\n\n \n spec=wrap_spec(package)\n reader=spec.loader.get_resource_reader(spec.name)\n return reader.files()\n \n \n@contextlib.contextmanager\ndef _tempfile(reader,suffix='',\n\n\n*,_os_remove=os.remove):\n\n\n\n fd,raw_path=tempfile.mkstemp(suffix=suffix)\n try :\n try :\n os.write(fd,reader())\n finally :\n os.close(fd)\n del reader\n yield pathlib.Path(raw_path)\n finally :\n try :\n _os_remove(raw_path)\n except FileNotFoundError:\n pass\n \n \n@functools.singledispatch\ndef as_file(path):\n ''\n\n\n \n return _tempfile(path.read_bytes,suffix=path.name)\n \n \n@as_file.register(pathlib.Path)\n@contextlib.contextmanager\ndef _(path):\n ''\n\n \n yield path\n", ["contextlib", "functools", "importlib", "importlib.resources._adapters", "importlib.resources.abc", "os", "pathlib", "tempfile", "types", "typing"]], "importlib.resources._itertools": [".py", "from itertools import filterfalse\n\nfrom typing import (\nCallable,\nIterable,\nIterator,\nOptional,\nSet,\nTypeVar,\nUnion,\n)\n\n\n_T=TypeVar('_T')\n_U=TypeVar('_U')\n\n\ndef unique_everseen(\niterable:Iterable[_T],key:Optional[Callable[[_T],_U]]=None\n)->Iterator[_T]:\n ''\n \n \n seen:Set[Union[_T,_U]]=set()\n seen_add=seen.add\n if key is None :\n for element in filterfalse(seen.__contains__,iterable):\n seen_add(element)\n yield element\n else :\n for element in iterable:\n k=key(element)\n if k not in seen:\n seen_add(k)\n yield element\n", ["itertools", "typing"]], "importlib.resources._legacy": [".py", "import functools\nimport os\nimport pathlib\nimport types\nimport warnings\n\nfrom typing import Union,Iterable,ContextManager,BinaryIO,TextIO,Any\n\nfrom . import _common\n\nPackage=Union[types.ModuleType,str]\nResource=str\n\n\ndef deprecated(func):\n @functools.wraps(func)\n def wrapper(*args,**kwargs):\n warnings.warn(\n f\"{func.__name__} is deprecated. Use files() instead. \"\n \"Refer to https://importlib-resources.readthedocs.io\"\n \"/en/latest/using.html#migrating-from-legacy for migration advice.\",\n DeprecationWarning,\n stacklevel=2,\n )\n return func(*args,**kwargs)\n \n return wrapper\n \n \ndef normalize_path(path):\n\n ''\n\n\n \n str_path=str(path)\n parent,file_name=os.path.split(str_path)\n if parent:\n raise ValueError(f'{path!r} must be only a file name')\n return file_name\n \n \n@deprecated\ndef open_binary(package:Package,resource:Resource)->BinaryIO:\n ''\n return (_common.files(package)/normalize_path(resource)).open('rb')\n \n \n@deprecated\ndef read_binary(package:Package,resource:Resource)->bytes:\n ''\n return (_common.files(package)/normalize_path(resource)).read_bytes()\n \n \n@deprecated\ndef open_text(\npackage:Package,\nresource:Resource,\nencoding:str='utf-8',\nerrors:str='strict',\n)->TextIO:\n ''\n return (_common.files(package)/normalize_path(resource)).open(\n 'r',encoding=encoding,errors=errors\n )\n \n \n@deprecated\ndef read_text(\npackage:Package,\nresource:Resource,\nencoding:str='utf-8',\nerrors:str='strict',\n)->str:\n ''\n\n\n\n \n with open_text(package,resource,encoding,errors)as fp:\n return fp.read()\n \n \n@deprecated\ndef contents(package:Package)->Iterable[str]:\n ''\n\n\n\n\n \n return [path.name for path in _common.files(package).iterdir()]\n \n \n@deprecated\ndef is_resource(package:Package,name:str)->bool:\n ''\n\n\n \n resource=normalize_path(name)\n return any(\n traversable.name ==resource and traversable.is_file()\n for traversable in _common.files(package).iterdir()\n )\n \n \n@deprecated\ndef path(\npackage:Package,\nresource:Resource,\n)->ContextManager[pathlib.Path]:\n ''\n\n\n\n\n\n\n \n return _common.as_file(_common.files(package)/normalize_path(resource))\n", ["functools", "importlib.resources", "importlib.resources._common", "os", "pathlib", "types", "typing", "warnings"]], "importlib.resources": [".py", "''\n\nfrom ._common import (\nas_file,\nfiles,\nPackage,\n)\n\nfrom ._legacy import (\ncontents,\nopen_binary,\nread_binary,\nopen_text,\nread_text,\nis_resource,\npath,\nResource,\n)\n\nfrom .abc import ResourceReader\n\n\n__all__=[\n'Package',\n'Resource',\n'ResourceReader',\n'as_file',\n'contents',\n'files',\n'is_resource',\n'open_binary',\n'open_text',\n'path',\n'read_binary',\n'read_text',\n]\n", ["importlib.resources._common", "importlib.resources._legacy", "importlib.resources.abc"], 1], "json.encoder": [".py", "''\n\nimport re\n\ntry :\n from _json import encode_basestring_ascii as c_encode_basestring_ascii\nexcept ImportError:\n c_encode_basestring_ascii=None\ntry :\n from _json import encode_basestring as c_encode_basestring\nexcept ImportError:\n c_encode_basestring=None\ntry :\n from _json import make_encoder as c_make_encoder\nexcept ImportError:\n c_make_encoder=None\n \nESCAPE=re.compile(r'[\\x00-\\x1f\\\\\"\\b\\f\\n\\r\\t]')\nESCAPE_ASCII=re.compile(r'([\\\\\"]|[^\\ -~])')\nHAS_UTF8=re.compile(b'[\\x80-\\xff]')\nESCAPE_DCT={\n'\\\\':'\\\\\\\\',\n'\"':'\\\\\"',\n'\\b':'\\\\b',\n'\\f':'\\\\f',\n'\\n':'\\\\n',\n'\\r':'\\\\r',\n'\\t':'\\\\t',\n}\nfor i in range(0x20):\n ESCAPE_DCT.setdefault(chr(i),'\\\\u{0:04x}'.format(i))\n \ndel i\n\nINFINITY=float('inf')\n\ndef py_encode_basestring(s):\n ''\n\n \n def replace(match):\n return ESCAPE_DCT[match.group(0)]\n return '\"'+ESCAPE.sub(replace,s)+'\"'\n \n \nencode_basestring=(c_encode_basestring or py_encode_basestring)\n\n\ndef py_encode_basestring_ascii(s):\n ''\n\n \n def replace(match):\n s=match.group(0)\n try :\n return ESCAPE_DCT[s]\n except KeyError:\n n=ord(s)\n if n <0x10000:\n return '\\\\u{0:04x}'.format(n)\n \n else :\n \n n -=0x10000\n s1=0xd800 |((n >>10)&0x3ff)\n s2=0xdc00 |(n&0x3ff)\n return '\\\\u{0:04x}\\\\u{1:04x}'.format(s1,s2)\n return '\"'+ESCAPE_ASCII.sub(replace,s)+'\"'\n \n \nencode_basestring_ascii=(\nc_encode_basestring_ascii or py_encode_basestring_ascii)\n\nclass JSONEncoder(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n item_separator=', '\n key_separator=': '\n def __init__(self,*,skipkeys=False ,ensure_ascii=True ,\n check_circular=True ,allow_nan=True ,sort_keys=False ,\n indent=None ,separators=None ,default=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n self.skipkeys=skipkeys\n self.ensure_ascii=ensure_ascii\n self.check_circular=check_circular\n self.allow_nan=allow_nan\n self.sort_keys=sort_keys\n self.indent=indent\n if separators is not None :\n self.item_separator,self.key_separator=separators\n elif indent is not None :\n self.item_separator=','\n if default is not None :\n self.default=default\n \n def default(self,o):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n raise TypeError(f'Object of type {o.__class__.__name__} '\n f'is not JSON serializable')\n \n def encode(self,o):\n ''\n\n\n\n\n\n \n \n if isinstance(o,str):\n if self.ensure_ascii:\n return encode_basestring_ascii(o)\n else :\n return encode_basestring(o)\n \n \n \n chunks=self.iterencode(o,_one_shot=True )\n if not isinstance(chunks,(list,tuple)):\n chunks=list(chunks)\n return ''.join(chunks)\n \n def iterencode(self,o,_one_shot=False ):\n ''\n\n\n\n\n\n\n\n \n if self.check_circular:\n markers={}\n else :\n markers=None\n if self.ensure_ascii:\n _encoder=encode_basestring_ascii\n else :\n _encoder=encode_basestring\n \n def floatstr(o,allow_nan=self.allow_nan,\n _repr=float.__repr__,_inf=INFINITY,_neginf=-INFINITY):\n \n \n \n \n if o !=o:\n text='NaN'\n elif o ==_inf:\n text='Infinity'\n elif o ==_neginf:\n text='-Infinity'\n else :\n return _repr(o)\n \n if not allow_nan:\n raise ValueError(\n \"Out of range float values are not JSON compliant: \"+\n repr(o))\n \n return text\n \n \n if (_one_shot and c_make_encoder is not None\n and self.indent is None ):\n _iterencode=c_make_encoder(\n markers,self.default,_encoder,self.indent,\n self.key_separator,self.item_separator,self.sort_keys,\n self.skipkeys,self.allow_nan)\n else :\n _iterencode=_make_iterencode(\n markers,self.default,_encoder,self.indent,floatstr,\n self.key_separator,self.item_separator,self.sort_keys,\n self.skipkeys,_one_shot)\n return _iterencode(o,0)\n \ndef _make_iterencode(markers,_default,_encoder,_indent,_floatstr,\n_key_separator,_item_separator,_sort_keys,_skipkeys,_one_shot,\n\nValueError=ValueError,\ndict=dict,\nfloat=float,\nid=id,\nint=int,\nisinstance=isinstance,\nlist=list,\nstr=str,\ntuple=tuple,\n_intstr=int.__repr__,\n):\n\n if _indent is not None and not isinstance(_indent,str):\n _indent=' '*_indent\n \n def _iterencode_list(lst,_current_indent_level):\n if not lst:\n yield '[]'\n return\n if markers is not None :\n markerid=id(lst)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")\n markers[markerid]=lst\n buf='['\n if _indent is not None :\n _current_indent_level +=1\n newline_indent='\\n'+_indent *_current_indent_level\n separator=_item_separator+newline_indent\n buf +=newline_indent\n else :\n newline_indent=None\n separator=_item_separator\n first=True\n for value in lst:\n if first:\n first=False\n else :\n buf=separator\n if isinstance(value,str):\n yield buf+_encoder(value)\n elif value is None :\n yield buf+'null'\n elif value is True :\n yield buf+'true'\n elif value is False :\n yield buf+'false'\n elif isinstance(value,int):\n \n \n \n yield buf+_intstr(value)\n elif isinstance(value,float):\n \n yield buf+_floatstr(value)\n else :\n yield buf\n if isinstance(value,(list,tuple)):\n chunks=_iterencode_list(value,_current_indent_level)\n elif isinstance(value,dict):\n chunks=_iterencode_dict(value,_current_indent_level)\n else :\n chunks=_iterencode(value,_current_indent_level)\n yield from chunks\n if newline_indent is not None :\n _current_indent_level -=1\n yield '\\n'+_indent *_current_indent_level\n yield ']'\n if markers is not None :\n del markers[markerid]\n \n def _iterencode_dict(dct,_current_indent_level):\n if not dct:\n yield '{}'\n return\n if markers is not None :\n markerid=id(dct)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")\n markers[markerid]=dct\n yield '{'\n if _indent is not None :\n _current_indent_level +=1\n newline_indent='\\n'+_indent *_current_indent_level\n item_separator=_item_separator+newline_indent\n yield newline_indent\n else :\n newline_indent=None\n item_separator=_item_separator\n first=True\n if _sort_keys:\n items=sorted(dct.items())\n else :\n items=dct.items()\n for key,value in items:\n if isinstance(key,str):\n pass\n \n \n elif isinstance(key,float):\n \n key=_floatstr(key)\n elif key is True :\n key='true'\n elif key is False :\n key='false'\n elif key is None :\n key='null'\n elif isinstance(key,int):\n \n key=_intstr(key)\n elif _skipkeys:\n continue\n else :\n raise TypeError(f'keys must be str, int, float, bool or None, '\n f'not {key.__class__.__name__}')\n if first:\n first=False\n else :\n yield item_separator\n yield _encoder(key)\n yield _key_separator\n if isinstance(value,str):\n yield _encoder(value)\n elif value is None :\n yield 'null'\n elif value is True :\n yield 'true'\n elif value is False :\n yield 'false'\n elif isinstance(value,int):\n \n yield _intstr(value)\n elif isinstance(value,float):\n \n yield _floatstr(value)\n else :\n if isinstance(value,(list,tuple)):\n chunks=_iterencode_list(value,_current_indent_level)\n elif isinstance(value,dict):\n chunks=_iterencode_dict(value,_current_indent_level)\n else :\n chunks=_iterencode(value,_current_indent_level)\n yield from chunks\n if newline_indent is not None :\n _current_indent_level -=1\n yield '\\n'+_indent *_current_indent_level\n yield '}'\n if markers is not None :\n del markers[markerid]\n \n def _iterencode(o,_current_indent_level):\n if isinstance(o,str):\n yield _encoder(o)\n elif o is None :\n yield 'null'\n elif o is True :\n yield 'true'\n elif o is False :\n yield 'false'\n elif isinstance(o,int):\n \n yield _intstr(o)\n elif isinstance(o,float):\n \n yield _floatstr(o)\n elif isinstance(o,(list,tuple)):\n yield from _iterencode_list(o,_current_indent_level)\n elif isinstance(o,dict):\n yield from _iterencode_dict(o,_current_indent_level)\n else :\n if markers is not None :\n markerid=id(o)\n if markerid in markers:\n raise ValueError(\"Circular reference detected\")\n markers[markerid]=o\n o=_default(o)\n yield from _iterencode(o,_current_indent_level)\n if markers is not None :\n del markers[markerid]\n return _iterencode\n", ["_json", "re"]], "json": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__version__='2.0.9'\n__all__=[\n'dump','dumps','load','loads',\n'JSONDecoder','JSONDecodeError','JSONEncoder',\n]\n\n__author__='Bob Ippolito '\n\n\n\n\n\nclass codecs:\n\n BOM_UTF8=b'\\xef\\xbb\\xbf'\n BOM_LE=BOM_UTF16_LE=b'\\xff\\xfe'\n BOM_BE=BOM_UTF16_BE=b'\\xfe\\xff'\n BOM_UTF32_LE=b'\\xff\\xfe\\x00\\x00'\n BOM_UTF32_BE=b'\\x00\\x00\\xfe\\xff'\n \n \nimport _json\nfrom .encoder import JSONEncoder\n\nJSONDecoder=_json.JSONDecoder\n\nclass decoder:\n JSONDecoder=_json.JSONDecoder\n \nclass JSONDecodeError(ValueError):\n ''\n\n\n\n\n\n\n\n \n \n def __init__(self,msg,doc,pos):\n lineno=doc.count('\\n',0,pos)+1\n colno=pos -doc.rfind('\\n',0,pos)\n errmsg='%s: line %d column %d (char %d)'%(msg,lineno,colno,pos)\n ValueError.__init__(self,errmsg)\n self.msg=msg\n self.doc=doc\n self.pos=pos\n self.lineno=lineno\n self.colno=colno\n \n def __reduce__(self):\n return self.__class__,(self.msg,self.doc,self.pos)\n \ndef dump(obj,fp,**kw):\n fp.write(dumps(obj,**kw))\n \ndef dumps(obj,*,skipkeys=False ,ensure_ascii=True ,check_circular=True ,\nallow_nan=True ,cls=None ,indent=None ,separators=None ,\ndefault=None ,sort_keys=False ,**kw):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if cls is None :\n return _json.dumps(obj,1,**kw)\n return cls(\n skipkeys=skipkeys,ensure_ascii=ensure_ascii,\n check_circular=check_circular,allow_nan=allow_nan,indent=indent,\n separators=separators,default=default,sort_keys=sort_keys,\n **kw).encode(obj)\n \ndef detect_encoding(b):\n bstartswith=b.startswith\n if bstartswith((codecs.BOM_UTF32_BE,codecs.BOM_UTF32_LE)):\n return 'utf-32'\n if bstartswith((codecs.BOM_UTF16_BE,codecs.BOM_UTF16_LE)):\n return 'utf-16'\n if bstartswith(codecs.BOM_UTF8):\n return 'utf-8-sig'\n \n if len(b)>=4:\n if not b[0]:\n \n \n return 'utf-16-be'if b[1]else 'utf-32-be'\n if not b[1]:\n \n \n \n return 'utf-16-le'if b[2]or b[3]else 'utf-32-le'\n elif len(b)==2:\n if not b[0]:\n \n return 'utf-16-be'\n if not b[1]:\n \n return 'utf-16-le'\n \n return 'utf-8'\n \n \ndef load(fp,*,cls=None ,object_hook=None ,parse_float=None ,\nparse_int=None ,parse_constant=None ,object_pairs_hook=None ,**kw):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n return loads(fp.read(),\n cls=cls,object_hook=object_hook,\n parse_float=parse_float,parse_int=parse_int,\n parse_constant=parse_constant,object_pairs_hook=object_pairs_hook,**kw)\n \n \ndef loads(s,*,cls=None ,**kw):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if isinstance(s,str):\n if s.startswith('\\ufeff'):\n raise JSONDecodeError(\"Unexpected UTF-8 BOM (decode using utf-8-sig)\",\n s,0)\n else :\n if not isinstance(s,(bytes,bytearray)):\n raise TypeError(f'the JSON object must be str, bytes or bytearray, '\n f'not {s.__class__.__name__}')\n s=s.decode(detect_encoding(s),'surrogatepass')\n \n \n if \"encoding\"in kw:\n import warnings\n warnings.warn(\n \"'encoding' is ignored and deprecated. It will be removed in Python 3.9\",\n DeprecationWarning,\n stacklevel=2\n )\n del kw['encoding']\n \n if cls is None :\n \n \n return _json.loads(s,**kw)\n if object_hook is not None :\n kw['object_hook']=object_hook\n if object_pairs_hook is not None :\n kw['object_pairs_hook']=object_pairs_hook\n if parse_float is not None :\n kw['parse_float']=parse_float\n if parse_int is not None :\n kw['parse_int']=parse_int\n if parse_constant is not None :\n kw['parse_constant']=parse_constant\n return cls(**kw).decode(s)\n", ["_json", "json.encoder", "warnings"], 1], "logging.brython_handlers": [".py", "import logging\n\nfrom browser.ajax import ajax\n\n\nclass XMLHTTPHandler(logging.Handler):\n ''\n\n\n \n def __init__(self,url,method=\"GET\"):\n ''\n\n\n \n logging.Handler.__init__(self)\n method=method.upper()\n if method not in [\"GET\",\"POST\"]:\n raise ValueError(\"method must be GET or POST\")\n self.url=url\n self.method=method\n \n def mapLogRecord(self,record):\n ''\n\n\n\n \n return record.__dict__\n \n def emit(self,record):\n ''\n\n\n\n \n try :\n req=ajax.open(self.method,self.url,sync=False )\n req.send(self.mapLogRecord(record))\n except :\n self.handleError(record)\n", ["browser.ajax", "logging"]], "logging.config": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\"\"\"\nConfiguration functions for the logging package for Python. The core package\nis based on PEP 282 and comments thereto in comp.lang.python, and influenced\nby Apache's log4j system.\n\nCopyright (C) 2001-2022 Vinay Sajip. All Rights Reserved.\n\nTo use, simply 'import logging' and log away!\n\"\"\"\n\nimport errno\nimport functools\nimport io\nimport logging\nimport logging.handlers\nimport os\nimport queue\nimport re\nimport struct\nimport threading\nimport traceback\n\nfrom socketserver import ThreadingTCPServer,StreamRequestHandler\n\n\nDEFAULT_LOGGING_CONFIG_PORT=9030\n\nRESET_ERROR=errno.ECONNRESET\n\n\n\n\n\n\n_listener=None\n\ndef fileConfig(fname,defaults=None ,disable_existing_loggers=True ,encoding=None ):\n ''\n\n\n\n\n\n\n \n import configparser\n \n if isinstance(fname,str):\n if not os.path.exists(fname):\n raise FileNotFoundError(f\"{fname} doesn't exist\")\n elif not os.path.getsize(fname):\n raise RuntimeError(f'{fname} is an empty file')\n \n if isinstance(fname,configparser.RawConfigParser):\n cp=fname\n else :\n try :\n cp=configparser.ConfigParser(defaults)\n if hasattr(fname,'readline'):\n cp.read_file(fname)\n else :\n encoding=io.text_encoding(encoding)\n cp.read(fname,encoding=encoding)\n except configparser.ParsingError as e:\n raise RuntimeError(f'{fname} is invalid: {e}')\n \n formatters=_create_formatters(cp)\n \n \n logging._acquireLock()\n try :\n _clearExistingHandlers()\n \n \n handlers=_install_handlers(cp,formatters)\n _install_loggers(cp,handlers,disable_existing_loggers)\n finally :\n logging._releaseLock()\n \n \ndef _resolve(name):\n ''\n name=name.split('.')\n used=name.pop(0)\n found=__import__(used)\n for n in name:\n used=used+'.'+n\n try :\n found=getattr(found,n)\n except AttributeError:\n __import__(used)\n found=getattr(found,n)\n return found\n \ndef _strip_spaces(alist):\n return map(str.strip,alist)\n \ndef _create_formatters(cp):\n ''\n flist=cp[\"formatters\"][\"keys\"]\n if not len(flist):\n return {}\n flist=flist.split(\",\")\n flist=_strip_spaces(flist)\n formatters={}\n for form in flist:\n sectname=\"formatter_%s\"%form\n fs=cp.get(sectname,\"format\",raw=True ,fallback=None )\n dfs=cp.get(sectname,\"datefmt\",raw=True ,fallback=None )\n stl=cp.get(sectname,\"style\",raw=True ,fallback='%')\n defaults=cp.get(sectname,\"defaults\",raw=True ,fallback=None )\n \n c=logging.Formatter\n class_name=cp[sectname].get(\"class\")\n if class_name:\n c=_resolve(class_name)\n \n if defaults is not None :\n defaults=eval(defaults,vars(logging))\n f=c(fs,dfs,stl,defaults=defaults)\n else :\n f=c(fs,dfs,stl)\n formatters[form]=f\n return formatters\n \n \ndef _install_handlers(cp,formatters):\n ''\n hlist=cp[\"handlers\"][\"keys\"]\n if not len(hlist):\n return {}\n hlist=hlist.split(\",\")\n hlist=_strip_spaces(hlist)\n handlers={}\n fixups=[]\n for hand in hlist:\n section=cp[\"handler_%s\"%hand]\n klass=section[\"class\"]\n fmt=section.get(\"formatter\",\"\")\n try :\n klass=eval(klass,vars(logging))\n except (AttributeError,NameError):\n klass=_resolve(klass)\n args=section.get(\"args\",'()')\n args=eval(args,vars(logging))\n kwargs=section.get(\"kwargs\",'{}')\n kwargs=eval(kwargs,vars(logging))\n h=klass(*args,**kwargs)\n h.name=hand\n if \"level\"in section:\n level=section[\"level\"]\n h.setLevel(level)\n if len(fmt):\n h.setFormatter(formatters[fmt])\n if issubclass(klass,logging.handlers.MemoryHandler):\n target=section.get(\"target\",\"\")\n if len(target):\n fixups.append((h,target))\n handlers[hand]=h\n \n for h,t in fixups:\n h.setTarget(handlers[t])\n return handlers\n \ndef _handle_existing_loggers(existing,child_loggers,disable_existing):\n ''\n\n\n\n\n\n\n\n\n \n root=logging.root\n for log in existing:\n logger=root.manager.loggerDict[log]\n if log in child_loggers:\n if not isinstance(logger,logging.PlaceHolder):\n logger.setLevel(logging.NOTSET)\n logger.handlers=[]\n logger.propagate=True\n else :\n logger.disabled=disable_existing\n \ndef _install_loggers(cp,handlers,disable_existing):\n ''\n \n \n llist=cp[\"loggers\"][\"keys\"]\n llist=llist.split(\",\")\n llist=list(_strip_spaces(llist))\n llist.remove(\"root\")\n section=cp[\"logger_root\"]\n root=logging.root\n log=root\n if \"level\"in section:\n level=section[\"level\"]\n log.setLevel(level)\n for h in root.handlers[:]:\n root.removeHandler(h)\n hlist=section[\"handlers\"]\n if len(hlist):\n hlist=hlist.split(\",\")\n hlist=_strip_spaces(hlist)\n for hand in hlist:\n log.addHandler(handlers[hand])\n \n \n \n \n \n \n \n \n \n \n existing=list(root.manager.loggerDict.keys())\n \n \n \n \n existing.sort()\n \n \n child_loggers=[]\n \n for log in llist:\n section=cp[\"logger_%s\"%log]\n qn=section[\"qualname\"]\n propagate=section.getint(\"propagate\",fallback=1)\n logger=logging.getLogger(qn)\n if qn in existing:\n i=existing.index(qn)+1\n prefixed=qn+\".\"\n pflen=len(prefixed)\n num_existing=len(existing)\n while i [a-z]+)://(?P.*)$')\n \n WORD_PATTERN=re.compile(r'^\\s*(\\w+)\\s*')\n DOT_PATTERN=re.compile(r'^\\.\\s*(\\w+)\\s*')\n INDEX_PATTERN=re.compile(r'^\\[\\s*(\\w+)\\s*\\]\\s*')\n DIGIT_PATTERN=re.compile(r'^\\d+$')\n \n value_converters={\n 'ext':'ext_convert',\n 'cfg':'cfg_convert',\n }\n \n \n importer=staticmethod(__import__)\n \n def __init__(self,config):\n self.config=ConvertingDict(config)\n self.config.configurator=self\n \n def resolve(self,s):\n ''\n\n\n \n name=s.split('.')\n used=name.pop(0)\n try :\n found=self.importer(used)\n for frag in name:\n used +='.'+frag\n try :\n found=getattr(found,frag)\n except AttributeError:\n self.importer(used)\n found=getattr(found,frag)\n return found\n except ImportError as e:\n v=ValueError('Cannot resolve %r: %s'%(s,e))\n raise v from e\n \n def ext_convert(self,value):\n ''\n return self.resolve(value)\n \n def cfg_convert(self,value):\n ''\n rest=value\n m=self.WORD_PATTERN.match(rest)\n if m is None :\n raise ValueError(\"Unable to convert %r\"%value)\n else :\n rest=rest[m.end():]\n d=self.config[m.groups()[0]]\n \n while rest:\n m=self.DOT_PATTERN.match(rest)\n if m:\n d=d[m.groups()[0]]\n else :\n m=self.INDEX_PATTERN.match(rest)\n if m:\n idx=m.groups()[0]\n if not self.DIGIT_PATTERN.match(idx):\n d=d[idx]\n else :\n try :\n n=int(idx)\n d=d[n]\n except TypeError:\n d=d[idx]\n if m:\n rest=rest[m.end():]\n else :\n raise ValueError('Unable to convert '\n '%r at %r'%(value,rest))\n \n return d\n \n def convert(self,value):\n ''\n\n\n\n \n if not isinstance(value,ConvertingDict)and isinstance(value,dict):\n value=ConvertingDict(value)\n value.configurator=self\n elif not isinstance(value,ConvertingList)and isinstance(value,list):\n value=ConvertingList(value)\n value.configurator=self\n elif not isinstance(value,ConvertingTuple)and\\\n isinstance(value,tuple)and not hasattr(value,'_fields'):\n value=ConvertingTuple(value)\n value.configurator=self\n elif isinstance(value,str):\n m=self.CONVERT_PATTERN.match(value)\n if m:\n d=m.groupdict()\n prefix=d['prefix']\n converter=self.value_converters.get(prefix,None )\n if converter:\n suffix=d['suffix']\n converter=getattr(self,converter)\n value=converter(suffix)\n return value\n \n def configure_custom(self,config):\n ''\n c=config.pop('()')\n if not callable(c):\n c=self.resolve(c)\n props=config.pop('.',None )\n \n kwargs={k:config[k]for k in config if valid_ident(k)}\n result=c(**kwargs)\n if props:\n for name,value in props.items():\n setattr(result,name,value)\n return result\n \n def as_tuple(self,value):\n ''\n if isinstance(value,list):\n value=tuple(value)\n return value\n \nclass DictConfigurator(BaseConfigurator):\n ''\n\n\n \n \n def configure(self):\n ''\n \n config=self.config\n if 'version'not in config:\n raise ValueError(\"dictionary doesn't specify a version\")\n if config['version']!=1:\n raise ValueError(\"Unsupported version: %s\"%config['version'])\n incremental=config.pop('incremental',False )\n EMPTY_DICT={}\n logging._acquireLock()\n try :\n if incremental:\n handlers=config.get('handlers',EMPTY_DICT)\n for name in handlers:\n if name not in logging._handlers:\n raise ValueError('No handler found with '\n 'name %r'%name)\n else :\n try :\n handler=logging._handlers[name]\n handler_config=handlers[name]\n level=handler_config.get('level',None )\n if level:\n handler.setLevel(logging._checkLevel(level))\n except Exception as e:\n raise ValueError('Unable to configure handler '\n '%r'%name)from e\n loggers=config.get('loggers',EMPTY_DICT)\n for name in loggers:\n try :\n self.configure_logger(name,loggers[name],True )\n except Exception as e:\n raise ValueError('Unable to configure logger '\n '%r'%name)from e\n root=config.get('root',None )\n if root:\n try :\n self.configure_root(root,True )\n except Exception as e:\n raise ValueError('Unable to configure root '\n 'logger')from e\n else :\n disable_existing=config.pop('disable_existing_loggers',True )\n \n _clearExistingHandlers()\n \n \n formatters=config.get('formatters',EMPTY_DICT)\n for name in formatters:\n try :\n formatters[name]=self.configure_formatter(\n formatters[name])\n except Exception as e:\n raise ValueError('Unable to configure '\n 'formatter %r'%name)from e\n \n filters=config.get('filters',EMPTY_DICT)\n for name in filters:\n try :\n filters[name]=self.configure_filter(filters[name])\n except Exception as e:\n raise ValueError('Unable to configure '\n 'filter %r'%name)from e\n \n \n \n \n handlers=config.get('handlers',EMPTY_DICT)\n deferred=[]\n for name in sorted(handlers):\n try :\n handler=self.configure_handler(handlers[name])\n handler.name=name\n handlers[name]=handler\n except Exception as e:\n if ' not configured yet'in str(e.__cause__):\n deferred.append(name)\n else :\n raise ValueError('Unable to configure handler '\n '%r'%name)from e\n \n \n for name in deferred:\n try :\n handler=self.configure_handler(handlers[name])\n handler.name=name\n handlers[name]=handler\n except Exception as e:\n raise ValueError('Unable to configure handler '\n '%r'%name)from e\n \n \n \n \n \n \n \n \n \n \n \n root=logging.root\n existing=list(root.manager.loggerDict.keys())\n \n \n \n \n existing.sort()\n \n \n child_loggers=[]\n \n loggers=config.get('loggers',EMPTY_DICT)\n for name in loggers:\n if name in existing:\n i=existing.index(name)+1\n prefixed=name+\".\"\n pflen=len(prefixed)\n num_existing=len(existing)\n while i L\",chunk)[0]\n chunk=self.connection.recv(slen)\n while len(chunk)0:\n mode='a'\n if \"b\"not in mode:\n encoding=io.text_encoding(encoding)\n BaseRotatingHandler.__init__(self,filename,mode,encoding=encoding,\n delay=delay,errors=errors)\n self.maxBytes=maxBytes\n self.backupCount=backupCount\n \n def doRollover(self):\n ''\n\n \n if self.stream:\n self.stream.close()\n self.stream=None\n if self.backupCount >0:\n for i in range(self.backupCount -1,0,-1):\n sfn=self.rotation_filename(\"%s.%d\"%(self.baseFilename,i))\n dfn=self.rotation_filename(\"%s.%d\"%(self.baseFilename,\n i+1))\n if os.path.exists(sfn):\n if os.path.exists(dfn):\n os.remove(dfn)\n os.rename(sfn,dfn)\n dfn=self.rotation_filename(self.baseFilename+\".1\")\n if os.path.exists(dfn):\n os.remove(dfn)\n self.rotate(self.baseFilename,dfn)\n if not self.delay:\n self.stream=self._open()\n \n def shouldRollover(self,record):\n ''\n\n\n\n\n \n \n if os.path.exists(self.baseFilename)and not os.path.isfile(self.baseFilename):\n return False\n if self.stream is None :\n self.stream=self._open()\n if self.maxBytes >0:\n msg=\"%s\\n\"%self.format(record)\n self.stream.seek(0,2)\n if self.stream.tell()+len(msg)>=self.maxBytes:\n return True\n return False\n \nclass TimedRotatingFileHandler(BaseRotatingHandler):\n ''\n\n\n\n\n\n \n def __init__(self,filename,when='h',interval=1,backupCount=0,\n encoding=None ,delay=False ,utc=False ,atTime=None ,\n errors=None ):\n encoding=io.text_encoding(encoding)\n BaseRotatingHandler.__init__(self,filename,'a',encoding=encoding,\n delay=delay,errors=errors)\n self.when=when.upper()\n self.backupCount=backupCount\n self.utc=utc\n self.atTime=atTime\n \n \n \n \n \n \n \n \n \n \n \n \n if self.when =='S':\n self.interval=1\n self.suffix=\"%Y-%m-%d_%H-%M-%S\"\n self.extMatch=r\"^\\d{4}-\\d{2}-\\d{2}_\\d{2}-\\d{2}-\\d{2}(\\.\\w+)?$\"\n elif self.when =='M':\n self.interval=60\n self.suffix=\"%Y-%m-%d_%H-%M\"\n self.extMatch=r\"^\\d{4}-\\d{2}-\\d{2}_\\d{2}-\\d{2}(\\.\\w+)?$\"\n elif self.when =='H':\n self.interval=60 *60\n self.suffix=\"%Y-%m-%d_%H\"\n self.extMatch=r\"^\\d{4}-\\d{2}-\\d{2}_\\d{2}(\\.\\w+)?$\"\n elif self.when =='D'or self.when =='MIDNIGHT':\n self.interval=60 *60 *24\n self.suffix=\"%Y-%m-%d\"\n self.extMatch=r\"^\\d{4}-\\d{2}-\\d{2}(\\.\\w+)?$\"\n elif self.when.startswith('W'):\n self.interval=60 *60 *24 *7\n if len(self.when)!=2:\n raise ValueError(\"You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s\"%self.when)\n if self.when[1]<'0'or self.when[1]>'6':\n raise ValueError(\"Invalid day specified for weekly rollover: %s\"%self.when)\n self.dayOfWeek=int(self.when[1])\n self.suffix=\"%Y-%m-%d\"\n self.extMatch=r\"^\\d{4}-\\d{2}-\\d{2}(\\.\\w+)?$\"\n else :\n raise ValueError(\"Invalid rollover interval specified: %s\"%self.when)\n \n self.extMatch=re.compile(self.extMatch,re.ASCII)\n self.interval=self.interval *interval\n \n \n filename=self.baseFilename\n if os.path.exists(filename):\n t=os.stat(filename)[ST_MTIME]\n else :\n t=int(time.time())\n self.rolloverAt=self.computeRollover(t)\n \n def computeRollover(self,currentTime):\n ''\n\n \n result=currentTime+self.interval\n \n \n \n \n \n \n \n if self.when =='MIDNIGHT'or self.when.startswith('W'):\n \n if self.utc:\n t=time.gmtime(currentTime)\n else :\n t=time.localtime(currentTime)\n currentHour=t[3]\n currentMinute=t[4]\n currentSecond=t[5]\n currentDay=t[6]\n \n if self.atTime is None :\n rotate_ts=_MIDNIGHT\n else :\n rotate_ts=((self.atTime.hour *60+self.atTime.minute)*60+\n self.atTime.second)\n \n r=rotate_ts -((currentHour *60+currentMinute)*60+\n currentSecond)\n if r <0:\n \n \n \n r +=_MIDNIGHT\n currentDay=(currentDay+1)%7\n result=currentTime+r\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n if self.when.startswith('W'):\n day=currentDay\n if day !=self.dayOfWeek:\n if day =self.rolloverAt:\n \n if os.path.exists(self.baseFilename)and not os.path.isfile(self.baseFilename):\n \n \n self.rolloverAt=self.computeRollover(t)\n return False\n \n return True\n return False\n \n def getFilesToDelete(self):\n ''\n\n\n\n \n dirName,baseName=os.path.split(self.baseFilename)\n fileNames=os.listdir(dirName)\n result=[]\n \n n,e=os.path.splitext(baseName)\n prefix=n+'.'\n plen=len(prefix)\n for fileName in fileNames:\n if self.namer is None :\n \n if not fileName.startswith(baseName):\n continue\n else :\n \n \n \n if (not fileName.startswith(baseName)and fileName.endswith(e)and\n len(fileName)>(plen+1)and not fileName[plen+1].isdigit()):\n continue\n \n if fileName[:plen]==prefix:\n suffix=fileName[plen:]\n \n \n parts=suffix.split('.')\n for part in parts:\n if self.extMatch.match(part):\n result.append(os.path.join(dirName,fileName))\n break\n if len(result)0:\n for s in self.getFilesToDelete():\n os.remove(s)\n if not self.delay:\n self.stream=self._open()\n newRolloverAt=self.computeRollover(currentTime)\n while newRolloverAt <=currentTime:\n newRolloverAt=newRolloverAt+self.interval\n \n if (self.when =='MIDNIGHT'or self.when.startswith('W'))and not self.utc:\n dstAtRollover=time.localtime(newRolloverAt)[-1]\n if dstNow !=dstAtRollover:\n if not dstNow:\n addend=-3600\n else :\n addend=3600\n newRolloverAt +=addend\n self.rolloverAt=newRolloverAt\n \nclass WatchedFileHandler(logging.FileHandler):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def __init__(self,filename,mode='a',encoding=None ,delay=False ,\n errors=None ):\n if \"b\"not in mode:\n encoding=io.text_encoding(encoding)\n logging.FileHandler.__init__(self,filename,mode=mode,\n encoding=encoding,delay=delay,\n errors=errors)\n self.dev,self.ino=-1,-1\n self._statstream()\n \n def _statstream(self):\n if self.stream:\n sres=os.fstat(self.stream.fileno())\n self.dev,self.ino=sres[ST_DEV],sres[ST_INO]\n \n def reopenIfNeeded(self):\n ''\n\n\n\n\n\n \n \n \n \n \n try :\n \n sres=os.stat(self.baseFilename)\n except FileNotFoundError:\n sres=None\n \n if not sres or sres[ST_DEV]!=self.dev or sres[ST_INO]!=self.ino:\n if self.stream is not None :\n \n self.stream.flush()\n self.stream.close()\n self.stream=None\n \n self.stream=self._open()\n self._statstream()\n \n def emit(self,record):\n ''\n\n\n\n\n \n self.reopenIfNeeded()\n logging.FileHandler.emit(self,record)\n \n \nclass SocketHandler(logging.Handler):\n ''\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,host,port):\n ''\n\n\n\n\n\n \n logging.Handler.__init__(self)\n self.host=host\n self.port=port\n if port is None :\n self.address=host\n else :\n self.address=(host,port)\n self.sock=None\n self.closeOnError=False\n self.retryTime=None\n \n \n \n self.retryStart=1.0\n self.retryMax=30.0\n self.retryFactor=2.0\n \n def makeSocket(self,timeout=1):\n ''\n\n\n \n if self.port is not None :\n result=socket.create_connection(self.address,timeout=timeout)\n else :\n result=socket.socket(socket.AF_UNIX,socket.SOCK_STREAM)\n result.settimeout(timeout)\n try :\n result.connect(self.address)\n except OSError:\n result.close()\n raise\n return result\n \n def createSocket(self):\n ''\n\n\n\n \n now=time.time()\n \n \n \n if self.retryTime is None :\n attempt=True\n else :\n attempt=(now >=self.retryTime)\n if attempt:\n try :\n self.sock=self.makeSocket()\n self.retryTime=None\n except OSError:\n \n if self.retryTime is None :\n self.retryPeriod=self.retryStart\n else :\n self.retryPeriod=self.retryPeriod *self.retryFactor\n if self.retryPeriod >self.retryMax:\n self.retryPeriod=self.retryMax\n self.retryTime=now+self.retryPeriod\n \n def send(self,s):\n ''\n\n\n\n\n \n if self.sock is None :\n self.createSocket()\n \n \n \n if self.sock:\n try :\n self.sock.sendall(s)\n except OSError:\n self.sock.close()\n self.sock=None\n \n def makePickle(self,record):\n ''\n\n\n \n ei=record.exc_info\n if ei:\n \n dummy=self.format(record)\n \n \n \n d=dict(record.__dict__)\n d['msg']=record.getMessage()\n d['args']=None\n d['exc_info']=None\n \n d.pop('message',None )\n s=pickle.dumps(d,1)\n slen=struct.pack(\">L\",len(s))\n return slen+s\n \n def handleError(self,record):\n ''\n\n\n\n\n\n \n if self.closeOnError and self.sock:\n self.sock.close()\n self.sock=None\n else :\n logging.Handler.handleError(self,record)\n \n def emit(self,record):\n ''\n\n\n\n\n\n\n \n try :\n s=self.makePickle(record)\n self.send(s)\n except Exception:\n self.handleError(record)\n \n def close(self):\n ''\n\n \n self.acquire()\n try :\n sock=self.sock\n if sock:\n self.sock=None\n sock.close()\n logging.Handler.close(self)\n finally :\n self.release()\n \nclass DatagramHandler(SocketHandler):\n ''\n\n\n\n\n\n\n\n\n \n def __init__(self,host,port):\n ''\n\n \n SocketHandler.__init__(self,host,port)\n self.closeOnError=False\n \n def makeSocket(self):\n ''\n\n\n \n if self.port is None :\n family=socket.AF_UNIX\n else :\n family=socket.AF_INET\n s=socket.socket(family,socket.SOCK_DGRAM)\n return s\n \n def send(self,s):\n ''\n\n\n\n\n\n \n if self.sock is None :\n self.createSocket()\n self.sock.sendto(s,self.address)\n \nclass SysLogHandler(logging.Handler):\n ''\n\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n LOG_EMERG=0\n LOG_ALERT=1\n LOG_CRIT=2\n LOG_ERR=3\n LOG_WARNING=4\n LOG_NOTICE=5\n LOG_INFO=6\n LOG_DEBUG=7\n \n \n LOG_KERN=0\n LOG_USER=1\n LOG_MAIL=2\n LOG_DAEMON=3\n LOG_AUTH=4\n LOG_SYSLOG=5\n LOG_LPR=6\n LOG_NEWS=7\n LOG_UUCP=8\n LOG_CRON=9\n LOG_AUTHPRIV=10\n LOG_FTP=11\n LOG_NTP=12\n LOG_SECURITY=13\n LOG_CONSOLE=14\n LOG_SOLCRON=15\n \n \n LOG_LOCAL0=16\n LOG_LOCAL1=17\n LOG_LOCAL2=18\n LOG_LOCAL3=19\n LOG_LOCAL4=20\n LOG_LOCAL5=21\n LOG_LOCAL6=22\n LOG_LOCAL7=23\n \n priority_names={\n \"alert\":LOG_ALERT,\n \"crit\":LOG_CRIT,\n \"critical\":LOG_CRIT,\n \"debug\":LOG_DEBUG,\n \"emerg\":LOG_EMERG,\n \"err\":LOG_ERR,\n \"error\":LOG_ERR,\n \"info\":LOG_INFO,\n \"notice\":LOG_NOTICE,\n \"panic\":LOG_EMERG,\n \"warn\":LOG_WARNING,\n \"warning\":LOG_WARNING,\n }\n \n facility_names={\n \"auth\":LOG_AUTH,\n \"authpriv\":LOG_AUTHPRIV,\n \"console\":LOG_CONSOLE,\n \"cron\":LOG_CRON,\n \"daemon\":LOG_DAEMON,\n \"ftp\":LOG_FTP,\n \"kern\":LOG_KERN,\n \"lpr\":LOG_LPR,\n \"mail\":LOG_MAIL,\n \"news\":LOG_NEWS,\n \"ntp\":LOG_NTP,\n \"security\":LOG_SECURITY,\n \"solaris-cron\":LOG_SOLCRON,\n \"syslog\":LOG_SYSLOG,\n \"user\":LOG_USER,\n \"uucp\":LOG_UUCP,\n \"local0\":LOG_LOCAL0,\n \"local1\":LOG_LOCAL1,\n \"local2\":LOG_LOCAL2,\n \"local3\":LOG_LOCAL3,\n \"local4\":LOG_LOCAL4,\n \"local5\":LOG_LOCAL5,\n \"local6\":LOG_LOCAL6,\n \"local7\":LOG_LOCAL7,\n }\n \n \n \n \n \n priority_map={\n \"DEBUG\":\"debug\",\n \"INFO\":\"info\",\n \"WARNING\":\"warning\",\n \"ERROR\":\"error\",\n \"CRITICAL\":\"critical\"\n }\n \n def __init__(self,address=('localhost',SYSLOG_UDP_PORT),\n facility=LOG_USER,socktype=None ):\n ''\n\n\n\n\n\n\n\n\n\n \n logging.Handler.__init__(self)\n \n self.address=address\n self.facility=facility\n self.socktype=socktype\n self.socket=None\n self.createSocket()\n \n def _connect_unixsocket(self,address):\n use_socktype=self.socktype\n if use_socktype is None :\n use_socktype=socket.SOCK_DGRAM\n self.socket=socket.socket(socket.AF_UNIX,use_socktype)\n try :\n self.socket.connect(address)\n \n self.socktype=use_socktype\n except OSError:\n self.socket.close()\n if self.socktype is not None :\n \n raise\n use_socktype=socket.SOCK_STREAM\n self.socket=socket.socket(socket.AF_UNIX,use_socktype)\n try :\n self.socket.connect(address)\n \n self.socktype=use_socktype\n except OSError:\n self.socket.close()\n raise\n \n def createSocket(self):\n address=self.address\n socktype=self.socktype\n \n if isinstance(address,str):\n self.unixsocket=True\n \n \n \n \n try :\n self._connect_unixsocket(address)\n except OSError:\n pass\n else :\n self.unixsocket=False\n if socktype is None :\n socktype=socket.SOCK_DGRAM\n host,port=address\n ress=socket.getaddrinfo(host,port,0,socktype)\n if not ress:\n raise OSError(\"getaddrinfo returns an empty list\")\n for res in ress:\n af,socktype,proto,_,sa=res\n err=sock=None\n try :\n sock=socket.socket(af,socktype,proto)\n if socktype ==socket.SOCK_STREAM:\n sock.connect(sa)\n break\n except OSError as exc:\n err=exc\n if sock is not None :\n sock.close()\n if err is not None :\n raise err\n self.socket=sock\n self.socktype=socktype\n \n def encodePriority(self,facility,priority):\n ''\n\n\n\n\n \n if isinstance(facility,str):\n facility=self.facility_names[facility]\n if isinstance(priority,str):\n priority=self.priority_names[priority]\n return (facility <<3)|priority\n \n def close(self):\n ''\n\n \n self.acquire()\n try :\n sock=self.socket\n if sock:\n self.socket=None\n sock.close()\n logging.Handler.close(self)\n finally :\n self.release()\n \n def mapPriority(self,levelName):\n ''\n\n\n\n\n\n \n return self.priority_map.get(levelName,\"warning\")\n \n ident=''\n append_nul=True\n \n def emit(self,record):\n ''\n\n\n\n\n \n try :\n msg=self.format(record)\n if self.ident:\n msg=self.ident+msg\n if self.append_nul:\n msg +='\\000'\n \n \n \n prio='<%d>'%self.encodePriority(self.facility,\n self.mapPriority(record.levelname))\n prio=prio.encode('utf-8')\n \n msg=msg.encode('utf-8')\n msg=prio+msg\n \n if not self.socket:\n self.createSocket()\n \n if self.unixsocket:\n try :\n self.socket.send(msg)\n except OSError:\n self.socket.close()\n self._connect_unixsocket(self.address)\n self.socket.send(msg)\n elif self.socktype ==socket.SOCK_DGRAM:\n self.socket.sendto(msg,self.address)\n else :\n self.socket.sendall(msg)\n except Exception:\n self.handleError(record)\n \nclass SMTPHandler(logging.Handler):\n ''\n\n \n def __init__(self,mailhost,fromaddr,toaddrs,subject,\n credentials=None ,secure=None ,timeout=5.0):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n logging.Handler.__init__(self)\n if isinstance(mailhost,(list,tuple)):\n self.mailhost,self.mailport=mailhost\n else :\n self.mailhost,self.mailport=mailhost,None\n if isinstance(credentials,(list,tuple)):\n self.username,self.password=credentials\n else :\n self.username=None\n self.fromaddr=fromaddr\n if isinstance(toaddrs,str):\n toaddrs=[toaddrs]\n self.toaddrs=toaddrs\n self.subject=subject\n self.secure=secure\n self.timeout=timeout\n \n def getSubject(self,record):\n ''\n\n\n\n\n \n return self.subject\n \n def emit(self,record):\n ''\n\n\n\n \n try :\n import smtplib\n from email.message import EmailMessage\n import email.utils\n \n port=self.mailport\n if not port:\n port=smtplib.SMTP_PORT\n smtp=smtplib.SMTP(self.mailhost,port,timeout=self.timeout)\n msg=EmailMessage()\n msg['From']=self.fromaddr\n msg['To']=','.join(self.toaddrs)\n msg['Subject']=self.getSubject(record)\n msg['Date']=email.utils.localtime()\n msg.set_content(self.format(record))\n if self.username:\n if self.secure is not None :\n smtp.ehlo()\n smtp.starttls(*self.secure)\n smtp.ehlo()\n smtp.login(self.username,self.password)\n smtp.send_message(msg)\n smtp.quit()\n except Exception:\n self.handleError(record)\n \nclass NTEventLogHandler(logging.Handler):\n ''\n\n\n\n\n\n\n\n \n def __init__(self,appname,dllname=None ,logtype=\"Application\"):\n logging.Handler.__init__(self)\n try :\n import win32evtlogutil,win32evtlog\n self.appname=appname\n self._welu=win32evtlogutil\n if not dllname:\n dllname=os.path.split(self._welu.__file__)\n dllname=os.path.split(dllname[0])\n dllname=os.path.join(dllname[0],r'win32service.pyd')\n self.dllname=dllname\n self.logtype=logtype\n \n \n \n try :\n self._welu.AddSourceToRegistry(appname,dllname,logtype)\n except Exception as e:\n \n \n if getattr(e,'winerror',None )!=5:\n raise\n self.deftype=win32evtlog.EVENTLOG_ERROR_TYPE\n self.typemap={\n logging.DEBUG:win32evtlog.EVENTLOG_INFORMATION_TYPE,\n logging.INFO:win32evtlog.EVENTLOG_INFORMATION_TYPE,\n logging.WARNING:win32evtlog.EVENTLOG_WARNING_TYPE,\n logging.ERROR:win32evtlog.EVENTLOG_ERROR_TYPE,\n logging.CRITICAL:win32evtlog.EVENTLOG_ERROR_TYPE,\n }\n except ImportError:\n print(\"The Python Win32 extensions for NT (service, event \"\\\n \"logging) appear not to be available.\")\n self._welu=None\n \n def getMessageID(self,record):\n ''\n\n\n\n\n\n \n return 1\n \n def getEventCategory(self,record):\n ''\n\n\n\n\n \n return 0\n \n def getEventType(self,record):\n ''\n\n\n\n\n\n\n\n\n \n return self.typemap.get(record.levelno,self.deftype)\n \n def emit(self,record):\n ''\n\n\n\n\n \n if self._welu:\n try :\n id=self.getMessageID(record)\n cat=self.getEventCategory(record)\n type=self.getEventType(record)\n msg=self.format(record)\n self._welu.ReportEvent(self.appname,id,cat,type,[msg])\n except Exception:\n self.handleError(record)\n \n def close(self):\n ''\n\n\n\n\n\n\n\n \n \n logging.Handler.close(self)\n \nclass HTTPHandler(logging.Handler):\n ''\n\n\n \n def __init__(self,host,url,method=\"GET\",secure=False ,credentials=None ,\n context=None ):\n ''\n\n\n \n logging.Handler.__init__(self)\n method=method.upper()\n if method not in [\"GET\",\"POST\"]:\n raise ValueError(\"method must be GET or POST\")\n if not secure and context is not None :\n raise ValueError(\"context parameter only makes sense \"\n \"with secure=True\")\n self.host=host\n self.url=url\n self.method=method\n self.secure=secure\n self.credentials=credentials\n self.context=context\n \n def mapLogRecord(self,record):\n ''\n\n\n\n \n return record.__dict__\n \n def getConnection(self,host,secure):\n ''\n\n\n\n\n \n import http.client\n if secure:\n connection=http.client.HTTPSConnection(host,context=self.context)\n else :\n connection=http.client.HTTPConnection(host)\n return connection\n \n def emit(self,record):\n ''\n\n\n\n \n try :\n import urllib.parse\n host=self.host\n h=self.getConnection(host,self.secure)\n url=self.url\n data=urllib.parse.urlencode(self.mapLogRecord(record))\n if self.method ==\"GET\":\n if (url.find('?')>=0):\n sep='&'\n else :\n sep='?'\n url=url+\"%c%s\"%(sep,data)\n h.putrequest(self.method,url)\n \n \n i=host.find(\":\")\n if i >=0:\n host=host[:i]\n \n \n \n if self.method ==\"POST\":\n h.putheader(\"Content-type\",\n \"application/x-www-form-urlencoded\")\n h.putheader(\"Content-length\",str(len(data)))\n if self.credentials:\n import base64\n s=('%s:%s'%self.credentials).encode('utf-8')\n s='Basic '+base64.b64encode(s).strip().decode('ascii')\n h.putheader('Authorization',s)\n h.endheaders()\n if self.method ==\"POST\":\n h.send(data.encode('utf-8'))\n h.getresponse()\n except Exception:\n self.handleError(record)\n \nclass BufferingHandler(logging.Handler):\n ''\n\n\n\n \n def __init__(self,capacity):\n ''\n\n \n logging.Handler.__init__(self)\n self.capacity=capacity\n self.buffer=[]\n \n def shouldFlush(self,record):\n ''\n\n\n\n\n \n return (len(self.buffer)>=self.capacity)\n \n def emit(self,record):\n ''\n\n\n\n\n \n self.buffer.append(record)\n if self.shouldFlush(record):\n self.flush()\n \n def flush(self):\n ''\n\n\n\n \n self.acquire()\n try :\n self.buffer.clear()\n finally :\n self.release()\n \n def close(self):\n ''\n\n\n\n \n try :\n self.flush()\n finally :\n logging.Handler.close(self)\n \nclass MemoryHandler(BufferingHandler):\n ''\n\n\n\n \n def __init__(self,capacity,flushLevel=logging.ERROR,target=None ,\n flushOnClose=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n BufferingHandler.__init__(self,capacity)\n self.flushLevel=flushLevel\n self.target=target\n \n self.flushOnClose=flushOnClose\n \n def shouldFlush(self,record):\n ''\n\n \n return (len(self.buffer)>=self.capacity)or\\\n (record.levelno >=self.flushLevel)\n \n def setTarget(self,target):\n ''\n\n \n self.acquire()\n try :\n self.target=target\n finally :\n self.release()\n \n def flush(self):\n ''\n\n\n\n\n\n \n self.acquire()\n try :\n if self.target:\n for record in self.buffer:\n self.target.handle(record)\n self.buffer.clear()\n finally :\n self.release()\n \n def close(self):\n ''\n\n\n \n try :\n if self.flushOnClose:\n self.flush()\n finally :\n self.acquire()\n try :\n self.target=None\n BufferingHandler.close(self)\n finally :\n self.release()\n \n \nclass QueueHandler(logging.Handler):\n ''\n\n\n\n\n\n\n\n \n \n def __init__(self,queue):\n ''\n\n \n logging.Handler.__init__(self)\n self.queue=queue\n \n def enqueue(self,record):\n ''\n\n\n\n\n\n \n self.queue.put_nowait(record)\n \n def prepare(self,record):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \n \n \n msg=self.format(record)\n \n record=copy.copy(record)\n record.message=msg\n record.msg=msg\n record.args=None\n record.exc_info=None\n record.exc_text=None\n record.stack_info=None\n return record\n \n def emit(self,record):\n ''\n\n\n\n \n try :\n self.enqueue(self.prepare(record))\n except Exception:\n self.handleError(record)\n \n \nclass QueueListener(object):\n ''\n\n\n\n \n _sentinel=None\n \n def __init__(self,queue,*handlers,respect_handler_level=False ):\n ''\n\n\n \n self.queue=queue\n self.handlers=handlers\n self._thread=None\n self.respect_handler_level=respect_handler_level\n \n def dequeue(self,block):\n ''\n\n\n\n\n \n return self.queue.get(block)\n \n def start(self):\n ''\n\n\n\n\n \n self._thread=t=threading.Thread(target=self._monitor)\n t.daemon=True\n t.start()\n \n def prepare(self,record):\n ''\n\n\n\n\n\n \n return record\n \n def handle(self,record):\n ''\n\n\n\n\n \n record=self.prepare(record)\n for handler in self.handlers:\n if not self.respect_handler_level:\n process=True\n else :\n process=record.levelno >=handler.level\n if process:\n handler.handle(record)\n \n def _monitor(self):\n ''\n\n\n\n\n\n \n q=self.queue\n has_task_done=hasattr(q,'task_done')\n while True :\n try :\n record=self.dequeue(True )\n if record is self._sentinel:\n if has_task_done:\n q.task_done()\n break\n self.handle(record)\n if has_task_done:\n q.task_done()\n except queue.Empty:\n break\n \n def enqueue_sentinel(self):\n ''\n\n\n\n\n\n \n self.queue.put_nowait(self._sentinel)\n \n def stop(self):\n ''\n\n\n\n\n\n \n self.enqueue_sentinel()\n self._thread.join()\n self._thread=None\n", ["base64", "copy", "email.message", "email.utils", "http.client", "io", "logging", "os", "pickle", "queue", "re", "smtplib", "socket", "stat", "struct", "threading", "time", "urllib.parse", "win32evtlog", "win32evtlogutil"]], "logging": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\"\"\"\nLogging package for Python. Based on PEP 282 and comments thereto in\ncomp.lang.python.\n\nCopyright (C) 2001-2019 Vinay Sajip. All Rights Reserved.\n\nTo use, simply 'import logging' and log away!\n\"\"\"\n\nimport sys,os,time,io,re,traceback,warnings,weakref,collections.abc\n\nfrom string import Template\nfrom string import Formatter as StrFormatter\n\n\n__all__=['BASIC_FORMAT','BufferingFormatter','CRITICAL','DEBUG','ERROR',\n'FATAL','FileHandler','Filter','Formatter','Handler','INFO',\n'LogRecord','Logger','LoggerAdapter','NOTSET','NullHandler',\n'StreamHandler','WARN','WARNING','addLevelName','basicConfig',\n'captureWarnings','critical','debug','disable','error',\n'exception','fatal','getLevelName','getLogger','getLoggerClass',\n'info','log','makeLogRecord','setLoggerClass','shutdown',\n'warn','warning','getLogRecordFactory','setLogRecordFactory',\n'lastResort','raiseExceptions']\n\nimport threading\n\n__author__=\"Vinay Sajip \"\n__status__=\"production\"\n\n__version__=\"0.5.1.2\"\n__date__=\"07 February 2010\"\n\n\n\n\n\n\n\n\n_startTime=time.time()\n\n\n\n\n\nraiseExceptions=True\n\n\n\n\nlogThreads=True\n\n\n\n\nlogMultiprocessing=True\n\n\n\n\nlogProcesses=True\n\n\n\n\n\n\n\n\n\n\n\n\nCRITICAL=50\nFATAL=CRITICAL\nERROR=40\nWARNING=30\nWARN=WARNING\nINFO=20\nDEBUG=10\nNOTSET=0\n\n_levelToName={\nCRITICAL:'CRITICAL',\nERROR:'ERROR',\nWARNING:'WARNING',\nINFO:'INFO',\nDEBUG:'DEBUG',\nNOTSET:'NOTSET',\n}\n_nameToLevel={\n'CRITICAL':CRITICAL,\n'FATAL':FATAL,\n'ERROR':ERROR,\n'WARN':WARNING,\n'WARNING':WARNING,\n'INFO':INFO,\n'DEBUG':DEBUG,\n'NOTSET':NOTSET,\n}\n\ndef getLevelName(level):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n \n result=_levelToName.get(level)\n if result is not None :\n return result\n result=_nameToLevel.get(level)\n if result is not None :\n return result\n return \"Level %s\"%level\n \ndef addLevelName(level,levelName):\n ''\n\n\n\n \n _acquireLock()\n try :\n _levelToName[level]=levelName\n _nameToLevel[levelName]=level\n finally :\n _releaseLock()\n \nif hasattr(sys,'_getframe'):\n currentframe=lambda :sys._getframe(3)\nelse :\n def currentframe():\n ''\n try :\n raise Exception\n except Exception:\n return sys.exc_info()[2].tb_frame.f_back\n \n \n \n \n \n \n \n \n \n \n \n \n \n_srcfile=os.path.normcase(addLevelName.__code__.co_filename)\n\n\n\n\n\n\n\n\n\n\n\ndef _checkLevel(level):\n if isinstance(level,int):\n rv=level\n elif str(level)==level:\n if level not in _nameToLevel:\n raise ValueError(\"Unknown level: %r\"%level)\n rv=_nameToLevel[level]\n else :\n raise TypeError(\"Level not an integer or a valid string: %r\"%level)\n return rv\n \n \n \n \n \n \n \n \n \n \n \n \n \n_lock=threading.RLock()\n\ndef _acquireLock():\n ''\n\n\n\n \n if _lock:\n _lock.acquire()\n \ndef _releaseLock():\n ''\n\n \n if _lock:\n _lock.release()\n \n \n \n \nif not hasattr(os,'register_at_fork'):\n def _register_at_fork_reinit_lock(instance):\n pass\nelse :\n\n\n\n _at_fork_reinit_lock_weakset=weakref.WeakSet()\n \n def _register_at_fork_reinit_lock(instance):\n _acquireLock()\n try :\n _at_fork_reinit_lock_weakset.add(instance)\n finally :\n _releaseLock()\n \n def _after_at_fork_child_reinit_locks():\n for handler in _at_fork_reinit_lock_weakset:\n handler._at_fork_reinit()\n \n \n \n _lock._at_fork_reinit()\n \n os.register_at_fork(before=_acquireLock,\n after_in_child=_after_at_fork_child_reinit_locks,\n after_in_parent=_releaseLock)\n \n \n \n \n \n \nclass LogRecord(object):\n ''\n\n\n\n\n\n\n\n\n\n \n def __init__(self,name,level,pathname,lineno,\n msg,args,exc_info,func=None ,sinfo=None ,**kwargs):\n ''\n\n \n ct=time.time()\n self.name=name\n self.msg=msg\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n if (args and len(args)==1 and isinstance(args[0],collections.abc.Mapping)\n and args[0]):\n args=args[0]\n self.args=args\n self.levelname=getLevelName(level)\n self.levelno=level\n self.pathname=pathname\n try :\n self.filename=os.path.basename(pathname)\n self.module=os.path.splitext(self.filename)[0]\n except (TypeError,ValueError,AttributeError):\n self.filename=pathname\n self.module=\"Unknown module\"\n self.exc_info=exc_info\n self.exc_text=None\n self.stack_info=sinfo\n self.lineno=lineno\n self.funcName=func\n self.created=ct\n self.msecs=(ct -int(ct))*1000\n self.relativeCreated=(self.created -_startTime)*1000\n if logThreads:\n self.thread=threading.get_ident()\n self.threadName=threading.current_thread().name\n else :\n self.thread=None\n self.threadName=None\n if not logMultiprocessing:\n self.processName=None\n else :\n self.processName='MainProcess'\n mp=sys.modules.get('multiprocessing')\n if mp is not None :\n \n \n \n \n try :\n self.processName=mp.current_process().name\n except Exception:\n pass\n if logProcesses and hasattr(os,'getpid'):\n self.process=os.getpid()\n else :\n self.process=None\n \n def __repr__(self):\n return ''%(self.name,self.levelno,\n self.pathname,self.lineno,self.msg)\n \n def getMessage(self):\n ''\n\n\n\n\n \n msg=str(self.msg)\n if self.args:\n msg=msg %self.args\n return msg\n \n \n \n \n_logRecordFactory=LogRecord\n\ndef setLogRecordFactory(factory):\n ''\n\n\n\n\n \n global _logRecordFactory\n _logRecordFactory=factory\n \ndef getLogRecordFactory():\n ''\n\n \n \n return _logRecordFactory\n \ndef makeLogRecord(dict):\n ''\n\n\n\n\n \n rv=_logRecordFactory(None ,None ,\"\",0,\"\",(),None ,None )\n rv.__dict__.update(dict)\n return rv\n \n \n \n \n \n_str_formatter=StrFormatter()\ndel StrFormatter\n\n\nclass PercentStyle(object):\n\n default_format='%(message)s'\n asctime_format='%(asctime)s'\n asctime_search='%(asctime)'\n validation_pattern=re.compile(r'%\\(\\w+\\)[#0+ -]*(\\*|\\d+)?(\\.(\\*|\\d+))?[diouxefgcrsa%]',re.I)\n \n def __init__(self,fmt):\n self._fmt=fmt or self.default_format\n \n def usesTime(self):\n return self._fmt.find(self.asctime_search)>=0\n \n def validate(self):\n ''\n if not self.validation_pattern.search(self._fmt):\n raise ValueError(\"Invalid format '%s' for '%s' style\"%(self._fmt,self.default_format[0]))\n \n def _format(self,record):\n return self._fmt %record.__dict__\n \n def format(self,record):\n try :\n return self._format(record)\n except KeyError as e:\n raise ValueError('Formatting field not found in record: %s'%e)\n \n \nclass StrFormatStyle(PercentStyle):\n default_format='{message}'\n asctime_format='{asctime}'\n asctime_search='{asctime'\n \n fmt_spec=re.compile(r'^(.?[<>=^])?[+ -]?#?0?(\\d+|{\\w+})?[,_]?(\\.(\\d+|{\\w+}))?[bcdefgnosx%]?$',re.I)\n field_spec=re.compile(r'^(\\d+|\\w+)(\\.\\w+|\\[[^]]+\\])*$')\n \n def _format(self,record):\n return self._fmt.format(**record.__dict__)\n \n def validate(self):\n ''\n fields=set()\n try :\n for _,fieldname,spec,conversion in _str_formatter.parse(self._fmt):\n if fieldname:\n if not self.field_spec.match(fieldname):\n raise ValueError('invalid field name/expression: %r'%fieldname)\n fields.add(fieldname)\n if conversion and conversion not in 'rsa':\n raise ValueError('invalid conversion: %r'%conversion)\n if spec and not self.fmt_spec.match(spec):\n raise ValueError('bad specifier: %r'%spec)\n except ValueError as e:\n raise ValueError('invalid format: %s'%e)\n if not fields:\n raise ValueError('invalid format: no fields')\n \n \nclass StringTemplateStyle(PercentStyle):\n default_format='${message}'\n asctime_format='${asctime}'\n asctime_search='${asctime}'\n \n def __init__(self,fmt):\n self._fmt=fmt or self.default_format\n self._tpl=Template(self._fmt)\n \n def usesTime(self):\n fmt=self._fmt\n return fmt.find('$asctime')>=0 or fmt.find(self.asctime_format)>=0\n \n def validate(self):\n pattern=Template.pattern\n fields=set()\n for m in pattern.finditer(self._fmt):\n d=m.groupdict()\n if d['named']:\n fields.add(d['named'])\n elif d['braced']:\n fields.add(d['braced'])\n elif m.group(0)=='$':\n raise ValueError('invalid format: bare \\'$\\' not allowed')\n if not fields:\n raise ValueError('invalid format: no fields')\n \n def _format(self,record):\n return self._tpl.substitute(**record.__dict__)\n \n \nBASIC_FORMAT=\"%(levelname)s:%(name)s:%(message)s\"\n\n_STYLES={\n'%':(PercentStyle,BASIC_FORMAT),\n'{':(StrFormatStyle,'{levelname}:{name}:{message}'),\n'$':(StringTemplateStyle,'${levelname}:${name}:${message}'),\n}\n\nclass Formatter(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n converter=time.localtime\n \n def __init__(self,fmt=None ,datefmt=None ,style='%',validate=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if style not in _STYLES:\n raise ValueError('Style must be one of: %s'%','.join(\n _STYLES.keys()))\n self._style=_STYLES[style][0](fmt)\n if validate:\n self._style.validate()\n \n self._fmt=self._style._fmt\n self.datefmt=datefmt\n \n default_time_format='%Y-%m-%d %H:%M:%S'\n default_msec_format='%s,%03d'\n \n def formatTime(self,record,datefmt=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n ct=self.converter(record.created)\n if datefmt:\n s=time.strftime(datefmt,ct)\n else :\n s=time.strftime(self.default_time_format,ct)\n if self.default_msec_format:\n s=self.default_msec_format %(s,record.msecs)\n return s\n \n def formatException(self,ei):\n ''\n\n\n\n\n \n sio=io.StringIO()\n tb=ei[2]\n \n \n \n traceback.print_exception(ei[0],ei[1],tb,None ,sio)\n s=sio.getvalue()\n sio.close()\n if s[-1:]==\"\\n\":\n s=s[:-1]\n return s\n \n def usesTime(self):\n ''\n\n \n return self._style.usesTime()\n \n def formatMessage(self,record):\n return self._style.format(record)\n \n def formatStack(self,stack_info):\n ''\n\n\n\n\n\n\n\n\n \n return stack_info\n \n def format(self,record):\n ''\n\n\n\n\n\n\n\n\n\n\n \n record.message=record.getMessage()\n if self.usesTime():\n record.asctime=self.formatTime(record,self.datefmt)\n s=self.formatMessage(record)\n if record.exc_info:\n \n \n if not record.exc_text:\n record.exc_text=self.formatException(record.exc_info)\n if record.exc_text:\n if s[-1:]!=\"\\n\":\n s=s+\"\\n\"\n s=s+record.exc_text\n if record.stack_info:\n if s[-1:]!=\"\\n\":\n s=s+\"\\n\"\n s=s+self.formatStack(record.stack_info)\n return s\n \n \n \n \n_defaultFormatter=Formatter()\n\nclass BufferingFormatter(object):\n ''\n\n \n def __init__(self,linefmt=None ):\n ''\n\n\n \n if linefmt:\n self.linefmt=linefmt\n else :\n self.linefmt=_defaultFormatter\n \n def formatHeader(self,records):\n ''\n\n \n return \"\"\n \n def formatFooter(self,records):\n ''\n\n \n return \"\"\n \n def format(self,records):\n ''\n\n \n rv=\"\"\n if len(records)>0:\n rv=rv+self.formatHeader(records)\n for record in records:\n rv=rv+self.linefmt.format(record)\n rv=rv+self.formatFooter(records)\n return rv\n \n \n \n \n \nclass Filter(object):\n ''\n\n\n\n\n\n\n\n\n \n def __init__(self,name=''):\n ''\n\n\n\n\n\n \n self.name=name\n self.nlen=len(name)\n \n def filter(self,record):\n ''\n\n\n\n\n \n if self.nlen ==0:\n return True\n elif self.name ==record.name:\n return True\n elif record.name.find(self.name,0,self.nlen)!=0:\n return False\n return (record.name[self.nlen]==\".\")\n \nclass Filterer(object):\n ''\n\n\n \n def __init__(self):\n ''\n\n \n self.filters=[]\n \n def addFilter(self,filter):\n ''\n\n \n if not (filter in self.filters):\n self.filters.append(filter)\n \n def removeFilter(self,filter):\n ''\n\n \n if filter in self.filters:\n self.filters.remove(filter)\n \n def filter(self,record):\n ''\n\n\n\n\n\n\n\n\n\n \n rv=True\n for f in self.filters:\n if hasattr(f,'filter'):\n result=f.filter(record)\n else :\n result=f(record)\n if not result:\n rv=False\n break\n return rv\n \n \n \n \n \n_handlers=weakref.WeakValueDictionary()\n_handlerList=[]\n\ndef _removeHandlerRef(wr):\n ''\n\n \n \n \n \n \n acquire,release,handlers=_acquireLock,_releaseLock,_handlerList\n if acquire and release and handlers:\n acquire()\n try :\n if wr in handlers:\n handlers.remove(wr)\n finally :\n release()\n \ndef _addHandlerRef(handler):\n ''\n\n \n _acquireLock()\n try :\n _handlerList.append(weakref.ref(handler,_removeHandlerRef))\n finally :\n _releaseLock()\n \nclass Handler(Filterer):\n ''\n\n\n\n\n\n\n \n def __init__(self,level=NOTSET):\n ''\n\n\n \n Filterer.__init__(self)\n self._name=None\n self.level=_checkLevel(level)\n self.formatter=None\n \n _addHandlerRef(self)\n self.createLock()\n \n def get_name(self):\n return self._name\n \n def set_name(self,name):\n _acquireLock()\n try :\n if self._name in _handlers:\n del _handlers[self._name]\n self._name=name\n if name:\n _handlers[name]=self\n finally :\n _releaseLock()\n \n name=property(get_name,set_name)\n \n def createLock(self):\n ''\n\n \n self.lock=threading.RLock()\n _register_at_fork_reinit_lock(self)\n \n def _at_fork_reinit(self):\n self.lock._at_fork_reinit()\n \n def acquire(self):\n ''\n\n \n if self.lock:\n self.lock.acquire()\n \n def release(self):\n ''\n\n \n if self.lock:\n self.lock.release()\n \n def setLevel(self,level):\n ''\n\n \n self.level=_checkLevel(level)\n \n def format(self,record):\n ''\n\n\n\n\n \n if self.formatter:\n fmt=self.formatter\n else :\n fmt=_defaultFormatter\n return fmt.format(record)\n \n def emit(self,record):\n ''\n\n\n\n\n \n raise NotImplementedError('emit must be implemented '\n 'by Handler subclasses')\n \n def handle(self,record):\n ''\n\n\n\n\n\n\n \n rv=self.filter(record)\n if rv:\n self.acquire()\n try :\n self.emit(record)\n finally :\n self.release()\n return rv\n \n def setFormatter(self,fmt):\n ''\n\n \n self.formatter=fmt\n \n def flush(self):\n ''\n\n\n\n\n \n pass\n \n def close(self):\n ''\n\n\n\n\n\n\n \n \n _acquireLock()\n try :\n if self._name and self._name in _handlers:\n del _handlers[self._name]\n finally :\n _releaseLock()\n \n def handleError(self,record):\n ''\n\n\n\n\n\n\n\n\n\n \n if raiseExceptions and sys.stderr:\n t,v,tb=sys.exc_info()\n try :\n sys.stderr.write('--- Logging error ---\\n')\n traceback.print_exception(t,v,tb,None ,sys.stderr)\n sys.stderr.write('Call stack:\\n')\n \n \n frame=tb.tb_frame\n while (frame and os.path.dirname(frame.f_code.co_filename)==\n __path__[0]):\n frame=frame.f_back\n if frame:\n traceback.print_stack(frame,file=sys.stderr)\n else :\n \n sys.stderr.write('Logged from file %s, line %s\\n'%(\n record.filename,record.lineno))\n \n try :\n sys.stderr.write('Message: %r\\n'\n 'Arguments: %s\\n'%(record.msg,\n record.args))\n except RecursionError:\n raise\n except Exception:\n sys.stderr.write('Unable to print the message and arguments'\n ' - possible formatting error.\\nUse the'\n ' traceback above to help find the error.\\n'\n )\n except OSError:\n pass\n finally :\n del t,v,tb\n \n def __repr__(self):\n level=getLevelName(self.level)\n return '<%s (%s)>'%(self.__class__.__name__,level)\n \nclass StreamHandler(Handler):\n ''\n\n\n\n \n \n terminator='\\n'\n \n def __init__(self,stream=None ):\n ''\n\n\n\n \n Handler.__init__(self)\n if stream is None :\n stream=sys.stderr\n self.stream=stream\n \n def flush(self):\n ''\n\n \n self.acquire()\n try :\n if self.stream and hasattr(self.stream,\"flush\"):\n self.stream.flush()\n finally :\n self.release()\n \n def emit(self,record):\n ''\n\n\n\n\n\n\n\n\n \n try :\n msg=self.format(record)\n stream=self.stream\n \n stream.write(msg+self.terminator)\n self.flush()\n except RecursionError:\n raise\n except Exception:\n self.handleError(record)\n \n def setStream(self,stream):\n ''\n\n\n\n\n\n \n if stream is self.stream:\n result=None\n else :\n result=self.stream\n self.acquire()\n try :\n self.flush()\n self.stream=stream\n finally :\n self.release()\n return result\n \n def __repr__(self):\n level=getLevelName(self.level)\n name=getattr(self.stream,'name','')\n \n name=str(name)\n if name:\n name +=' '\n return '<%s %s(%s)>'%(self.__class__.__name__,name,level)\n \n \nclass FileHandler(StreamHandler):\n ''\n\n \n def __init__(self,filename,mode='a',encoding=None ,delay=False ,errors=None ):\n ''\n\n \n \n filename=os.fspath(filename)\n \n \n self.baseFilename=os.path.abspath(filename)\n self.mode=mode\n self.encoding=encoding\n self.errors=errors\n self.delay=delay\n if delay:\n \n \n Handler.__init__(self)\n self.stream=None\n else :\n StreamHandler.__init__(self,self._open())\n \n def close(self):\n ''\n\n \n self.acquire()\n try :\n try :\n if self.stream:\n try :\n self.flush()\n finally :\n stream=self.stream\n self.stream=None\n if hasattr(stream,\"close\"):\n stream.close()\n finally :\n \n \n StreamHandler.close(self)\n finally :\n self.release()\n \n def _open(self):\n ''\n\n\n \n return open(self.baseFilename,self.mode,encoding=self.encoding,\n errors=self.errors)\n \n def emit(self,record):\n ''\n\n\n\n\n \n if self.stream is None :\n self.stream=self._open()\n StreamHandler.emit(self,record)\n \n def __repr__(self):\n level=getLevelName(self.level)\n return '<%s %s (%s)>'%(self.__class__.__name__,self.baseFilename,level)\n \n \nclass _StderrHandler(StreamHandler):\n ''\n\n\n\n \n def __init__(self,level=NOTSET):\n ''\n\n \n Handler.__init__(self,level)\n \n @property\n def stream(self):\n return sys.stderr\n \n \n_defaultLastResort=_StderrHandler(WARNING)\nlastResort=_defaultLastResort\n\n\n\n\n\nclass PlaceHolder(object):\n ''\n\n\n\n \n def __init__(self,alogger):\n ''\n\n \n self.loggerMap={alogger:None }\n \n def append(self,alogger):\n ''\n\n \n if alogger not in self.loggerMap:\n self.loggerMap[alogger]=None\n \n \n \n \n \ndef setLoggerClass(klass):\n ''\n\n\n\n \n if klass !=Logger:\n if not issubclass(klass,Logger):\n raise TypeError(\"logger not derived from logging.Logger: \"\n +klass.__name__)\n global _loggerClass\n _loggerClass=klass\n \ndef getLoggerClass():\n ''\n\n \n return _loggerClass\n \nclass Manager(object):\n ''\n\n\n \n def __init__(self,rootnode):\n ''\n\n \n self.root=rootnode\n self.disable=0\n self.emittedNoHandlerWarning=False\n self.loggerDict={}\n self.loggerClass=None\n self.logRecordFactory=None\n \n def getLogger(self,name):\n ''\n\n\n\n\n\n\n\n\n \n rv=None\n if not isinstance(name,str):\n raise TypeError('A logger name must be a string')\n _acquireLock()\n try :\n if name in self.loggerDict:\n rv=self.loggerDict[name]\n if isinstance(rv,PlaceHolder):\n ph=rv\n rv=(self.loggerClass or _loggerClass)(name)\n rv.manager=self\n self.loggerDict[name]=rv\n self._fixupChildren(ph,rv)\n self._fixupParents(rv)\n else :\n rv=(self.loggerClass or _loggerClass)(name)\n rv.manager=self\n self.loggerDict[name]=rv\n self._fixupParents(rv)\n finally :\n _releaseLock()\n return rv\n \n def setLoggerClass(self,klass):\n ''\n\n \n if klass !=Logger:\n if not issubclass(klass,Logger):\n raise TypeError(\"logger not derived from logging.Logger: \"\n +klass.__name__)\n self.loggerClass=klass\n \n def setLogRecordFactory(self,factory):\n ''\n\n\n \n self.logRecordFactory=factory\n \n def _fixupParents(self,alogger):\n ''\n\n\n \n name=alogger.name\n i=name.rfind(\".\")\n rv=None\n while (i >0)and not rv:\n substr=name[:i]\n if substr not in self.loggerDict:\n self.loggerDict[substr]=PlaceHolder(alogger)\n else :\n obj=self.loggerDict[substr]\n if isinstance(obj,Logger):\n rv=obj\n else :\n assert isinstance(obj,PlaceHolder)\n obj.append(alogger)\n i=name.rfind(\".\",0,i -1)\n if not rv:\n rv=self.root\n alogger.parent=rv\n \n def _fixupChildren(self,ph,alogger):\n ''\n\n\n \n name=alogger.name\n namelen=len(name)\n for c in ph.loggerMap.keys():\n \n if c.parent.name[:namelen]!=name:\n alogger.parent=c.parent\n c.parent=alogger\n \n def _clear_cache(self):\n ''\n\n\n \n \n _acquireLock()\n for logger in self.loggerDict.values():\n if isinstance(logger,Logger):\n logger._cache.clear()\n self.root._cache.clear()\n _releaseLock()\n \n \n \n \n \nclass Logger(Filterer):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n def __init__(self,name,level=NOTSET):\n ''\n\n \n Filterer.__init__(self)\n self.name=name\n self.level=_checkLevel(level)\n self.parent=None\n self.propagate=True\n self.handlers=[]\n self.disabled=False\n self._cache={}\n \n def setLevel(self,level):\n ''\n\n \n self.level=_checkLevel(level)\n self.manager._clear_cache()\n \n def debug(self,msg,*args,**kwargs):\n ''\n\n\n\n\n\n\n \n if self.isEnabledFor(DEBUG):\n self._log(DEBUG,msg,args,**kwargs)\n \n def info(self,msg,*args,**kwargs):\n ''\n\n\n\n\n\n\n \n if self.isEnabledFor(INFO):\n self._log(INFO,msg,args,**kwargs)\n \n def warning(self,msg,*args,**kwargs):\n ''\n\n\n\n\n\n\n \n if self.isEnabledFor(WARNING):\n self._log(WARNING,msg,args,**kwargs)\n \n def warn(self,msg,*args,**kwargs):\n warnings.warn(\"The 'warn' method is deprecated, \"\n \"use 'warning' instead\",DeprecationWarning,2)\n self.warning(msg,*args,**kwargs)\n \n def error(self,msg,*args,**kwargs):\n ''\n\n\n\n\n\n\n \n if self.isEnabledFor(ERROR):\n self._log(ERROR,msg,args,**kwargs)\n \n def exception(self,msg,*args,exc_info=True ,**kwargs):\n ''\n\n \n self.error(msg,*args,exc_info=exc_info,**kwargs)\n \n def critical(self,msg,*args,**kwargs):\n ''\n\n\n\n\n\n\n \n if self.isEnabledFor(CRITICAL):\n self._log(CRITICAL,msg,args,**kwargs)\n \n fatal=critical\n \n def log(self,level,msg,*args,**kwargs):\n ''\n\n\n\n\n\n\n \n if not isinstance(level,int):\n if raiseExceptions:\n raise TypeError(\"level must be an integer\")\n else :\n return\n if self.isEnabledFor(level):\n self._log(level,msg,args,**kwargs)\n \n def findCaller(self,stack_info=False ,stacklevel=1):\n ''\n\n\n \n f=currentframe()\n \n \n if f is not None :\n f=f.f_back\n orig_f=f\n while f and stacklevel >1:\n f=f.f_back\n stacklevel -=1\n if not f:\n f=orig_f\n rv=\"(unknown file)\",0,\"(unknown function)\",None\n while hasattr(f,\"f_code\"):\n co=f.f_code\n filename=os.path.normcase(co.co_filename)\n if filename ==_srcfile:\n f=f.f_back\n continue\n sinfo=None\n if stack_info:\n sio=io.StringIO()\n sio.write('Stack (most recent call last):\\n')\n traceback.print_stack(f,file=sio)\n sinfo=sio.getvalue()\n if sinfo[-1]=='\\n':\n sinfo=sinfo[:-1]\n sio.close()\n rv=(co.co_filename,f.f_lineno,co.co_name,sinfo)\n break\n return rv\n \n def makeRecord(self,name,level,fn,lno,msg,args,exc_info,\n func=None ,extra=None ,sinfo=None ):\n ''\n\n\n \n rv=_logRecordFactory(name,level,fn,lno,msg,args,exc_info,func,\n sinfo)\n if extra is not None :\n for key in extra:\n if (key in [\"message\",\"asctime\"])or (key in rv.__dict__):\n raise KeyError(\"Attempt to overwrite %r in LogRecord\"%key)\n rv.__dict__[key]=extra[key]\n return rv\n \n def _log(self,level,msg,args,exc_info=None ,extra=None ,stack_info=False ,\n stacklevel=1):\n ''\n\n\n \n sinfo=None\n if _srcfile:\n \n \n \n try :\n fn,lno,func,sinfo=self.findCaller(stack_info,stacklevel)\n except ValueError:\n fn,lno,func=\"(unknown file)\",0,\"(unknown function)\"\n else :\n fn,lno,func=\"(unknown file)\",0,\"(unknown function)\"\n if exc_info:\n if isinstance(exc_info,BaseException):\n exc_info=(type(exc_info),exc_info,exc_info.__traceback__)\n elif not isinstance(exc_info,tuple):\n exc_info=sys.exc_info()\n record=self.makeRecord(self.name,level,fn,lno,msg,args,\n exc_info,func,extra,sinfo)\n self.handle(record)\n \n def handle(self,record):\n ''\n\n\n\n\n \n if (not self.disabled)and self.filter(record):\n self.callHandlers(record)\n \n def addHandler(self,hdlr):\n ''\n\n \n _acquireLock()\n try :\n if not (hdlr in self.handlers):\n self.handlers.append(hdlr)\n finally :\n _releaseLock()\n \n def removeHandler(self,hdlr):\n ''\n\n \n _acquireLock()\n try :\n if hdlr in self.handlers:\n self.handlers.remove(hdlr)\n finally :\n _releaseLock()\n \n def hasHandlers(self):\n ''\n\n\n\n\n\n\n\n \n c=self\n rv=False\n while c:\n if c.handlers:\n rv=True\n break\n if not c.propagate:\n break\n else :\n c=c.parent\n return rv\n \n def callHandlers(self,record):\n ''\n\n\n\n\n\n\n\n \n c=self\n found=0\n while c:\n for hdlr in c.handlers:\n found=found+1\n if record.levelno >=hdlr.level:\n hdlr.handle(record)\n if not c.propagate:\n c=None\n else :\n c=c.parent\n if (found ==0):\n if lastResort:\n if record.levelno >=lastResort.level:\n lastResort.handle(record)\n elif raiseExceptions and not self.manager.emittedNoHandlerWarning:\n sys.stderr.write(\"No handlers could be found for logger\"\n \" \\\"%s\\\"\\n\"%self.name)\n self.manager.emittedNoHandlerWarning=True\n \n def getEffectiveLevel(self):\n ''\n\n\n\n\n \n logger=self\n while logger:\n if logger.level:\n return logger.level\n logger=logger.parent\n return NOTSET\n \n def isEnabledFor(self,level):\n ''\n\n \n if self.disabled:\n return False\n \n try :\n return self._cache[level]\n except KeyError:\n _acquireLock()\n try :\n if self.manager.disable >=level:\n is_enabled=self._cache[level]=False\n else :\n is_enabled=self._cache[level]=(\n level >=self.getEffectiveLevel()\n )\n finally :\n _releaseLock()\n return is_enabled\n \n def getChild(self,suffix):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n if self.root is not self:\n suffix='.'.join((self.name,suffix))\n return self.manager.getLogger(suffix)\n \n def __repr__(self):\n level=getLevelName(self.getEffectiveLevel())\n return '<%s %s (%s)>'%(self.__class__.__name__,self.name,level)\n \n def __reduce__(self):\n \n \n if getLogger(self.name)is not self:\n import pickle\n raise pickle.PicklingError('logger cannot be pickled')\n return getLogger,(self.name,)\n \n \nclass RootLogger(Logger):\n ''\n\n\n\n \n def __init__(self,level):\n ''\n\n \n Logger.__init__(self,\"root\",level)\n \n def __reduce__(self):\n return getLogger,()\n \n_loggerClass=Logger\n\nclass LoggerAdapter(object):\n ''\n\n\n \n \n def __init__(self,logger,extra):\n ''\n\n\n\n\n\n\n\n\n \n self.logger=logger\n self.extra=extra\n \n def process(self,msg,kwargs):\n ''\n\n\n\n\n\n\n\n \n kwargs[\"extra\"]=self.extra\n return msg,kwargs\n \n \n \n \n def debug(self,msg,*args,**kwargs):\n ''\n\n \n self.log(DEBUG,msg,*args,**kwargs)\n \n def info(self,msg,*args,**kwargs):\n ''\n\n \n self.log(INFO,msg,*args,**kwargs)\n \n def warning(self,msg,*args,**kwargs):\n ''\n\n \n self.log(WARNING,msg,*args,**kwargs)\n \n def warn(self,msg,*args,**kwargs):\n warnings.warn(\"The 'warn' method is deprecated, \"\n \"use 'warning' instead\",DeprecationWarning,2)\n self.warning(msg,*args,**kwargs)\n \n def error(self,msg,*args,**kwargs):\n ''\n\n \n self.log(ERROR,msg,*args,**kwargs)\n \n def exception(self,msg,*args,exc_info=True ,**kwargs):\n ''\n\n \n self.log(ERROR,msg,*args,exc_info=exc_info,**kwargs)\n \n def critical(self,msg,*args,**kwargs):\n ''\n\n \n self.log(CRITICAL,msg,*args,**kwargs)\n \n def log(self,level,msg,*args,**kwargs):\n ''\n\n\n \n if self.isEnabledFor(level):\n msg,kwargs=self.process(msg,kwargs)\n self.logger.log(level,msg,*args,**kwargs)\n \n def isEnabledFor(self,level):\n ''\n\n \n return self.logger.isEnabledFor(level)\n \n def setLevel(self,level):\n ''\n\n \n self.logger.setLevel(level)\n \n def getEffectiveLevel(self):\n ''\n\n \n return self.logger.getEffectiveLevel()\n \n def hasHandlers(self):\n ''\n\n \n return self.logger.hasHandlers()\n \n def _log(self,level,msg,args,exc_info=None ,extra=None ,stack_info=False ):\n ''\n\n \n return self.logger._log(\n level,\n msg,\n args,\n exc_info=exc_info,\n extra=extra,\n stack_info=stack_info,\n )\n \n @property\n def manager(self):\n return self.logger.manager\n \n @manager.setter\n def manager(self,value):\n self.logger.manager=value\n \n @property\n def name(self):\n return self.logger.name\n \n def __repr__(self):\n logger=self.logger\n level=getLevelName(logger.getEffectiveLevel())\n return '<%s %s (%s)>'%(self.__class__.__name__,logger.name,level)\n \nroot=RootLogger(WARNING)\nLogger.root=root\nLogger.manager=Manager(Logger.root)\n\n\n\n\n\ndef basicConfig(**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n _acquireLock()\n try :\n force=kwargs.pop('force',False )\n encoding=kwargs.pop('encoding',None )\n errors=kwargs.pop('errors','backslashreplace')\n if force:\n for h in root.handlers[:]:\n root.removeHandler(h)\n h.close()\n if len(root.handlers)==0:\n handlers=kwargs.pop(\"handlers\",None )\n if handlers is None :\n if \"stream\"in kwargs and \"filename\"in kwargs:\n raise ValueError(\"'stream' and 'filename' should not be \"\n \"specified together\")\n else :\n if \"stream\"in kwargs or \"filename\"in kwargs:\n raise ValueError(\"'stream' or 'filename' should not be \"\n \"specified together with 'handlers'\")\n if handlers is None :\n filename=kwargs.pop(\"filename\",None )\n mode=kwargs.pop(\"filemode\",'a')\n if filename:\n if 'b'in mode:\n errors=None\n h=FileHandler(filename,mode,\n encoding=encoding,errors=errors)\n else :\n stream=kwargs.pop(\"stream\",None )\n h=StreamHandler(stream)\n handlers=[h]\n dfs=kwargs.pop(\"datefmt\",None )\n style=kwargs.pop(\"style\",'%')\n if style not in _STYLES:\n raise ValueError('Style must be one of: %s'%','.join(\n _STYLES.keys()))\n fs=kwargs.pop(\"format\",_STYLES[style][1])\n fmt=Formatter(fs,dfs,style)\n for h in handlers:\n if h.formatter is None :\n h.setFormatter(fmt)\n root.addHandler(h)\n level=kwargs.pop(\"level\",None )\n if level is not None :\n root.setLevel(level)\n if kwargs:\n keys=', '.join(kwargs.keys())\n raise ValueError('Unrecognised argument(s): %s'%keys)\n finally :\n _releaseLock()\n \n \n \n \n \n \ndef getLogger(name=None ):\n ''\n\n\n\n \n if not name or isinstance(name,str)and name ==root.name:\n return root\n return Logger.manager.getLogger(name)\n \ndef critical(msg,*args,**kwargs):\n ''\n\n\n\n \n if len(root.handlers)==0:\n basicConfig()\n root.critical(msg,*args,**kwargs)\n \nfatal=critical\n\ndef error(msg,*args,**kwargs):\n ''\n\n\n\n \n if len(root.handlers)==0:\n basicConfig()\n root.error(msg,*args,**kwargs)\n \ndef exception(msg,*args,exc_info=True ,**kwargs):\n ''\n\n\n\n \n error(msg,*args,exc_info=exc_info,**kwargs)\n \ndef warning(msg,*args,**kwargs):\n ''\n\n\n\n \n if len(root.handlers)==0:\n basicConfig()\n root.warning(msg,*args,**kwargs)\n \ndef warn(msg,*args,**kwargs):\n warnings.warn(\"The 'warn' function is deprecated, \"\n \"use 'warning' instead\",DeprecationWarning,2)\n warning(msg,*args,**kwargs)\n \ndef info(msg,*args,**kwargs):\n ''\n\n\n\n \n if len(root.handlers)==0:\n basicConfig()\n root.info(msg,*args,**kwargs)\n \ndef debug(msg,*args,**kwargs):\n ''\n\n\n\n \n if len(root.handlers)==0:\n basicConfig()\n root.debug(msg,*args,**kwargs)\n \ndef log(level,msg,*args,**kwargs):\n ''\n\n\n\n \n if len(root.handlers)==0:\n basicConfig()\n root.log(level,msg,*args,**kwargs)\n \ndef disable(level=CRITICAL):\n ''\n\n \n root.manager.disable=level\n root.manager._clear_cache()\n \ndef shutdown(handlerList=_handlerList):\n ''\n\n\n\n\n \n for wr in reversed(handlerList[:]):\n \n \n try :\n h=wr()\n if h:\n try :\n h.acquire()\n h.flush()\n h.close()\n except (OSError,ValueError):\n \n \n \n \n pass\n finally :\n h.release()\n except :\n if raiseExceptions:\n raise\n \n \n \nimport atexit\natexit.register(shutdown)\n\n\n\nclass NullHandler(Handler):\n ''\n\n\n\n\n\n\n\n \n def handle(self,record):\n ''\n \n def emit(self,record):\n ''\n \n def createLock(self):\n self.lock=None\n \n def _at_fork_reinit(self):\n pass\n \n \n \n_warnings_showwarning=None\n\ndef _showwarning(message,category,filename,lineno,file=None ,line=None ):\n ''\n\n\n\n\n\n \n if file is not None :\n if _warnings_showwarning is not None :\n _warnings_showwarning(message,category,filename,lineno,file,line)\n else :\n s=warnings.formatwarning(message,category,filename,lineno,line)\n logger=getLogger(\"py.warnings\")\n if not logger.handlers:\n logger.addHandler(NullHandler())\n logger.warning(\"%s\",s)\n \ndef captureWarnings(capture):\n ''\n\n\n\n \n global _warnings_showwarning\n if capture:\n if _warnings_showwarning is None :\n _warnings_showwarning=warnings.showwarning\n warnings.showwarning=_showwarning\n else :\n if _warnings_showwarning is not None :\n warnings.showwarning=_warnings_showwarning\n _warnings_showwarning=None\n", ["atexit", "collections.abc", "io", "os", "pickle", "re", "string", "sys", "threading", "time", "traceback", "warnings", "weakref"], 1], "multiprocessing.connection": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=['Client','Listener','Pipe']\n\nfrom queue import Queue\n\n\nfamilies=[None ]\n\n\nclass Listener(object):\n\n def __init__(self,address=None ,family=None ,backlog=1):\n self._backlog_queue=Queue(backlog)\n \n def accept(self):\n return Connection(*self._backlog_queue.get())\n \n def close(self):\n self._backlog_queue=None\n \n address=property(lambda self:self._backlog_queue)\n \n def __enter__(self):\n return self\n \n def __exit__(self,exc_type,exc_value,exc_tb):\n self.close()\n \n \ndef Client(address):\n _in,_out=Queue(),Queue()\n address.put((_out,_in))\n return Connection(_in,_out)\n \n \ndef Pipe(duplex=True ):\n a,b=Queue(),Queue()\n return Connection(a,b),Connection(b,a)\n \n \nclass Connection(object):\n\n def __init__(self,_in,_out):\n self._out=_out\n self._in=_in\n self.send=self.send_bytes=_out.put\n self.recv=self.recv_bytes=_in.get\n \n def poll(self,timeout=0.0):\n if self._in.qsize()>0:\n return True\n if timeout <=0.0:\n return False\n self._in.not_empty.acquire()\n self._in.not_empty.wait(timeout)\n self._in.not_empty.release()\n return self._in.qsize()>0\n \n def close(self):\n pass\n \n def __enter__(self):\n return self\n \n def __exit__(self,exc_type,exc_value,exc_tb):\n self.close()\n", ["queue"]], "multiprocessing.pool": [".py", "\n\n\n\n\n\n\n\n\n__all__=['Pool']\n\n\n\n\n\nimport threading\nimport queue\nimport itertools\nimport collections\nimport time\n\nfrom multiprocessing import Process,cpu_count,TimeoutError\nfrom multiprocessing.util import Finalize,debug\n\n\n\n\n\nRUN=0\nCLOSE=1\nTERMINATE=2\n\n\n\n\n\njob_counter=itertools.count()\n\ndef mapstar(args):\n return list(map(*args))\n \ndef starmapstar(args):\n return list(itertools.starmap(args[0],args[1]))\n \n \n \n \n \nclass MaybeEncodingError(Exception):\n ''\n \n \n def __init__(self,exc,value):\n self.exc=repr(exc)\n self.value=repr(value)\n super(MaybeEncodingError,self).__init__(self.exc,self.value)\n \n def __str__(self):\n return \"Error sending result: '%s'. Reason: '%s'\"%(self.value,\n self.exc)\n \n def __repr__(self):\n return \"\"%str(self)\n \n \ndef worker(inqueue,outqueue,initializer=None ,initargs=(),maxtasks=None ):\n assert maxtasks is None or (type(maxtasks)==int and maxtasks >0)\n put=outqueue.put\n get=inqueue.get\n if hasattr(inqueue,'_writer'):\n inqueue._writer.close()\n outqueue._reader.close()\n \n if initializer is not None :\n initializer(*initargs)\n \n completed=0\n while maxtasks is None or (maxtasks and completed 1\n task_batches=Pool._get_tasks(func,iterable,chunksize)\n result=IMapIterator(self._cache)\n self._taskqueue.put((((result._job,i,mapstar,(x,),{})\n for i,x in enumerate(task_batches)),result._set_length))\n return (item for chunk in result for item in chunk)\n \n def imap_unordered(self,func,iterable,chunksize=1):\n ''\n\n \n if self._state !=RUN:\n raise ValueError(\"Pool not running\")\n if chunksize ==1:\n result=IMapUnorderedIterator(self._cache)\n self._taskqueue.put((((result._job,i,func,(x,),{})\n for i,x in enumerate(iterable)),result._set_length))\n return result\n else :\n assert chunksize >1\n task_batches=Pool._get_tasks(func,iterable,chunksize)\n result=IMapUnorderedIterator(self._cache)\n self._taskqueue.put((((result._job,i,mapstar,(x,),{})\n for i,x in enumerate(task_batches)),result._set_length))\n return (item for chunk in result for item in chunk)\n \n def apply_async(self,func,args=(),kwds={},callback=None ,\n error_callback=None ):\n ''\n\n \n if self._state !=RUN:\n raise ValueError(\"Pool not running\")\n result=ApplyResult(self._cache,callback,error_callback)\n self._taskqueue.put(([(result._job,None ,func,args,kwds)],None ))\n return result\n \n def map_async(self,func,iterable,chunksize=None ,callback=None ,\n error_callback=None ):\n ''\n\n \n return self._map_async(func,iterable,mapstar,chunksize,callback,\n error_callback)\n \n def _map_async(self,func,iterable,mapper,chunksize=None ,callback=None ,\n error_callback=None ):\n ''\n\n \n if self._state !=RUN:\n raise ValueError(\"Pool not running\")\n if not hasattr(iterable,'__len__'):\n iterable=list(iterable)\n \n if chunksize is None :\n chunksize,extra=divmod(len(iterable),len(self._pool)*4)\n if extra:\n chunksize +=1\n if len(iterable)==0:\n chunksize=0\n \n task_batches=Pool._get_tasks(func,iterable,chunksize)\n result=MapResult(self._cache,chunksize,len(iterable),callback,\n error_callback=error_callback)\n self._taskqueue.put((((result._job,i,mapper,(x,),{})\n for i,x in enumerate(task_batches)),None ))\n return result\n \n @staticmethod\n def _handle_workers(pool):\n thread=threading.current_thread()\n \n \n \n while thread._state ==RUN or (pool._cache and thread._state !=TERMINATE):\n pool._maintain_pool()\n time.sleep(0.1)\n \n pool._taskqueue.put(None )\n debug('worker handler exiting')\n \n @staticmethod\n def _handle_tasks(taskqueue,put,outqueue,pool):\n thread=threading.current_thread()\n \n for taskseq,set_length in iter(taskqueue.get,None ):\n i=-1\n for i,task in enumerate(taskseq):\n if thread._state:\n debug('task handler found thread._state != RUN')\n break\n try :\n put(task)\n except IOError:\n debug('could not put task on queue')\n break\n else :\n if set_length:\n debug('doing set_length()')\n set_length(i+1)\n continue\n break\n else :\n debug('task handler got sentinel')\n \n \n try :\n \n debug('task handler sending sentinel to result handler')\n outqueue.put(None )\n \n \n debug('task handler sending sentinel to workers')\n for p in pool:\n put(None )\n except IOError:\n debug('task handler got IOError when sending sentinels')\n \n debug('task handler exiting')\n \n @staticmethod\n def _handle_results(outqueue,get,cache):\n thread=threading.current_thread()\n \n while 1:\n try :\n task=get()\n except (IOError,EOFError):\n debug('result handler got EOFError/IOError -- exiting')\n return\n \n if thread._state:\n assert thread._state ==TERMINATE\n debug('result handler found thread._state=TERMINATE')\n break\n \n if task is None :\n debug('result handler got sentinel')\n break\n \n job,i,obj=task\n try :\n cache[job]._set(i,obj)\n except KeyError:\n pass\n \n while cache and thread._state !=TERMINATE:\n try :\n task=get()\n except (IOError,EOFError):\n debug('result handler got EOFError/IOError -- exiting')\n return\n \n if task is None :\n debug('result handler ignoring extra sentinel')\n continue\n job,i,obj=task\n try :\n cache[job]._set(i,obj)\n except KeyError:\n pass\n \n if hasattr(outqueue,'_reader'):\n debug('ensuring that outqueue is not full')\n \n \n \n try :\n for i in range(10):\n if not outqueue._reader.poll():\n break\n get()\n except (IOError,EOFError):\n pass\n \n debug('result handler exiting: len(cache)=%s, thread._state=%s',\n len(cache),thread._state)\n \n @staticmethod\n def _get_tasks(func,it,size):\n it=iter(it)\n while 1:\n x=tuple(itertools.islice(it,size))\n if not x:\n return\n yield (func,x)\n \n def __reduce__(self):\n raise NotImplementedError(\n 'pool objects cannot be passed between processes or pickled'\n )\n \n def close(self):\n debug('closing pool')\n if self._state ==RUN:\n self._state=CLOSE\n self._worker_handler._state=CLOSE\n \n def terminate(self):\n debug('terminating pool')\n self._state=TERMINATE\n self._worker_handler._state=TERMINATE\n self._terminate()\n \n def join(self):\n debug('joining pool')\n assert self._state in (CLOSE,TERMINATE)\n self._worker_handler.join()\n self._task_handler.join()\n self._result_handler.join()\n for p in self._pool:\n p.join()\n \n @staticmethod\n def _help_stuff_finish(inqueue,task_handler,size):\n \n debug('removing tasks from inqueue until task handler finished')\n inqueue._rlock.acquire()\n while task_handler.is_alive()and inqueue._reader.poll():\n inqueue._reader.recv()\n time.sleep(0)\n \n @classmethod\n def _terminate_pool(cls,taskqueue,inqueue,outqueue,pool,\n worker_handler,task_handler,result_handler,cache):\n \n debug('finalizing pool')\n \n worker_handler._state=TERMINATE\n task_handler._state=TERMINATE\n \n debug('helping task handler/workers to finish')\n cls._help_stuff_finish(inqueue,task_handler,len(pool))\n \n assert result_handler.is_alive()or len(cache)==0\n \n result_handler._state=TERMINATE\n outqueue.put(None )\n \n \n \n debug('joining worker handler')\n if threading.current_thread()is not worker_handler:\n worker_handler.join()\n \n \n if pool and hasattr(pool[0],'terminate'):\n debug('terminating workers')\n for p in pool:\n if p.exitcode is None :\n p.terminate()\n \n debug('joining task handler')\n if threading.current_thread()is not task_handler:\n task_handler.join()\n \n debug('joining result handler')\n if threading.current_thread()is not result_handler:\n result_handler.join()\n \n if pool and hasattr(pool[0],'terminate'):\n debug('joining pool workers')\n for p in pool:\n if p.is_alive():\n \n debug('cleaning up worker %d'%p.pid)\n p.join()\n \n def __enter__(self):\n return self\n \n def __exit__(self,exc_type,exc_val,exc_tb):\n self.terminate()\n \n \n \n \n \nclass ApplyResult(object):\n\n def __init__(self,cache,callback,error_callback):\n self._event=threading.Event()\n self._job=next(job_counter)\n self._cache=cache\n self._callback=callback\n self._error_callback=error_callback\n cache[self._job]=self\n \n def ready(self):\n return self._event.is_set()\n \n def successful(self):\n assert self.ready()\n return self._success\n \n def wait(self,timeout=None ):\n self._event.wait(timeout)\n \n def get(self,timeout=None ):\n self.wait(timeout)\n if not self.ready():\n raise TimeoutError\n if self._success:\n return self._value\n else :\n raise self._value\n \n def _set(self,i,obj):\n self._success,self._value=obj\n if self._callback and self._success:\n self._callback(self._value)\n if self._error_callback and not self._success:\n self._error_callback(self._value)\n self._event.set()\n del self._cache[self._job]\n \nAsyncResult=ApplyResult\n\n\n\n\n\nclass MapResult(ApplyResult):\n\n def __init__(self,cache,chunksize,length,callback,error_callback):\n ApplyResult.__init__(self,cache,callback,\n error_callback=error_callback)\n self._success=True\n self._value=[None ]*length\n self._chunksize=chunksize\n if chunksize <=0:\n self._number_left=0\n self._event.set()\n del cache[self._job]\n else :\n self._number_left=length //chunksize+bool(length %chunksize)\n \n def _set(self,i,success_result):\n success,result=success_result\n if success:\n self._value[i *self._chunksize:(i+1)*self._chunksize]=result\n self._number_left -=1\n if self._number_left ==0:\n if self._callback:\n self._callback(self._value)\n del self._cache[self._job]\n self._event.set()\n else :\n self._success=False\n self._value=result\n if self._error_callback:\n self._error_callback(self._value)\n del self._cache[self._job]\n self._event.set()\n \n \n \n \n \nclass IMapIterator(object):\n\n def __init__(self,cache):\n self._cond=threading.Condition(threading.Lock())\n self._job=next(job_counter)\n self._cache=cache\n self._items=collections.deque()\n self._index=0\n self._length=None\n self._unsorted={}\n cache[self._job]=self\n \n def __iter__(self):\n return self\n \n def next(self,timeout=None ):\n self._cond.acquire()\n try :\n try :\n item=self._items.popleft()\n except IndexError:\n if self._index ==self._length:\n raise StopIteration\n self._cond.wait(timeout)\n try :\n item=self._items.popleft()\n except IndexError:\n if self._index ==self._length:\n raise StopIteration\n raise TimeoutError\n finally :\n self._cond.release()\n \n success,value=item\n if success:\n return value\n raise value\n \n __next__=next\n \n def _set(self,i,obj):\n self._cond.acquire()\n try :\n if self._index ==i:\n self._items.append(obj)\n self._index +=1\n while self._index in self._unsorted:\n obj=self._unsorted.pop(self._index)\n self._items.append(obj)\n self._index +=1\n self._cond.notify()\n else :\n self._unsorted[i]=obj\n \n if self._index ==self._length:\n del self._cache[self._job]\n finally :\n self._cond.release()\n \n def _set_length(self,length):\n self._cond.acquire()\n try :\n self._length=length\n if self._index ==self._length:\n self._cond.notify()\n del self._cache[self._job]\n finally :\n self._cond.release()\n \n \n \n \n \nclass IMapUnorderedIterator(IMapIterator):\n\n def _set(self,i,obj):\n self._cond.acquire()\n try :\n self._items.append(obj)\n self._index +=1\n self._cond.notify()\n if self._index ==self._length:\n del self._cache[self._job]\n finally :\n self._cond.release()\n \n \n \n \n \nclass ThreadPool(Pool):\n\n from .dummy import Process\n \n def __init__(self,processes=None ,initializer=None ,initargs=()):\n Pool.__init__(self,processes,initializer,initargs)\n \n def _setup_queues(self):\n self._inqueue=queue.Queue()\n self._outqueue=queue.Queue()\n self._quick_put=self._inqueue.put\n self._quick_get=self._outqueue.get\n \n @staticmethod\n def _help_stuff_finish(inqueue,task_handler,size):\n \n inqueue.not_empty.acquire()\n try :\n inqueue.queue.clear()\n inqueue.queue.extend([None ]*size)\n inqueue.not_empty.notify_all()\n finally :\n inqueue.not_empty.release()\n", ["collections", "itertools", "multiprocessing", "multiprocessing.Process", "multiprocessing.dummy", "multiprocessing.queues", "multiprocessing.util", "queue", "threading", "time"]], "multiprocessing.process": [".py", "\n\n\n\n\n\n\n\n\n__all__=['Process','current_process','active_children']\n\n\n\n\n\nimport os\nimport sys\nimport signal\nimport itertools\nfrom _weakrefset import WeakSet\n\n\nfrom _multiprocessing import Process\n\n\n\n\ntry :\n ORIGINAL_DIR=os.path.abspath(os.getcwd())\nexcept OSError:\n ORIGINAL_DIR=None\n \n \n \n \n \ndef current_process():\n ''\n\n \n return _current_process\n \ndef active_children():\n ''\n\n \n _cleanup()\n return list(_current_process._children)\n \n \n \n \n \ndef _cleanup():\n\n for p in list(_current_process._children):\n if p._popen.poll()is not None :\n _current_process._children.discard(p)\n \n \n \n \n \n \n \n \n \n \n \n \nclass AuthenticationString(bytes):\n def __reduce__(self):\n from .forking import Popen\n if not Popen.thread_is_spawning():\n raise TypeError(\n 'Pickling an AuthenticationString object is '\n 'disallowed for security reasons'\n )\n return AuthenticationString,(bytes(self),)\n \n \n \n \n \nclass _MainProcess(Process):\n\n def __init__(self):\n self._identity=()\n self._daemonic=False\n self._name='MainProcess'\n self._parent_pid=None\n self._popen=None\n self._counter=itertools.count(1)\n self._children=set()\n self._authkey=AuthenticationString(os.urandom(32))\n self._tempdir=None\n \n_current_process=_MainProcess()\ndel _MainProcess\n\n\n\n\n\n_exitcode_to_name={}\n\nfor name,signum in list(signal.__dict__.items()):\n if name[:3]=='SIG'and '_'not in name:\n _exitcode_to_name[-signum]=name\n \n \n_dangling=WeakSet()\n", ["_multiprocessing", "_weakrefset", "itertools", "multiprocessing.forking", "os", "signal", "sys"]], "multiprocessing.util": [".py", "\n\n\n\n\n\n\n\n\nimport sys\nimport functools\nimport os\nimport itertools\nimport weakref\nimport atexit\nimport threading\n\nfrom subprocess import _args_from_interpreter_flags\n\nfrom multiprocessing.process import current_process,active_children\n\n__all__=[\n'sub_debug','debug','info','sub_warning','get_logger',\n'log_to_stderr','get_temp_dir','register_after_fork',\n'is_exiting','Finalize','ForkAwareThreadLock','ForkAwareLocal',\n'SUBDEBUG','SUBWARNING',\n]\n\n\n\n\n\nNOTSET=0\nSUBDEBUG=5\nDEBUG=10\nINFO=20\nSUBWARNING=25\n\nLOGGER_NAME='multiprocessing'\nDEFAULT_LOGGING_FORMAT='[%(levelname)s/%(processName)s] %(message)s'\n\n_logger=None\n_log_to_stderr=False\n\ndef sub_debug(msg,*args):\n if _logger:\n _logger.log(SUBDEBUG,msg,*args)\n \ndef debug(msg,*args):\n if _logger:\n _logger.log(DEBUG,msg,*args)\n \ndef info(msg,*args):\n if _logger:\n _logger.log(INFO,msg,*args)\n \ndef sub_warning(msg,*args):\n if _logger:\n _logger.log(SUBWARNING,msg,*args)\n \ndef get_logger():\n ''\n\n \n global _logger\n import logging\n \n logging._acquireLock()\n try :\n if not _logger:\n \n _logger=logging.getLogger(LOGGER_NAME)\n _logger.propagate=0\n logging.addLevelName(SUBDEBUG,'SUBDEBUG')\n logging.addLevelName(SUBWARNING,'SUBWARNING')\n \n \n if hasattr(atexit,'unregister'):\n atexit.unregister(_exit_function)\n atexit.register(_exit_function)\n else :\n atexit._exithandlers.remove((_exit_function,(),{}))\n atexit._exithandlers.append((_exit_function,(),{}))\n \n finally :\n logging._releaseLock()\n \n return _logger\n \ndef log_to_stderr(level=None ):\n ''\n\n \n global _log_to_stderr\n import logging\n \n logger=get_logger()\n formatter=logging.Formatter(DEFAULT_LOGGING_FORMAT)\n handler=logging.StreamHandler()\n handler.setFormatter(formatter)\n logger.addHandler(handler)\n \n if level:\n logger.setLevel(level)\n _log_to_stderr=True\n return _logger\n \n \n \n \n \ndef get_temp_dir():\n\n if current_process()._tempdir is None :\n import shutil,tempfile\n tempdir=tempfile.mkdtemp(prefix='pymp-')\n info('created temp directory %s',tempdir)\n Finalize(None ,shutil.rmtree,args=[tempdir],exitpriority=-100)\n current_process()._tempdir=tempdir\n return current_process()._tempdir\n \n \n \n \n \n_afterfork_registry=weakref.WeakValueDictionary()\n_afterfork_counter=itertools.count()\n\ndef _run_after_forkers():\n items=list(_afterfork_registry.items())\n items.sort()\n for (index,ident,func),obj in items:\n try :\n func(obj)\n except Exception as e:\n info('after forker raised exception %s',e)\n \ndef register_after_fork(obj,func):\n _afterfork_registry[(next(_afterfork_counter),id(obj),func)]=obj\n \n \n \n \n \n_finalizer_registry={}\n_finalizer_counter=itertools.count()\n\n\nclass Finalize(object):\n ''\n\n \n def __init__(self,obj,callback,args=(),kwargs=None ,exitpriority=None ):\n assert exitpriority is None or type(exitpriority)is int\n \n if obj is not None :\n self._weakref=weakref.ref(obj,self)\n else :\n assert exitpriority is not None\n \n self._callback=callback\n self._args=args\n self._kwargs=kwargs or {}\n self._key=(exitpriority,next(_finalizer_counter))\n self._pid=os.getpid()\n \n _finalizer_registry[self._key]=self\n \n def __call__(self,wr=None ,\n \n \n _finalizer_registry=_finalizer_registry,\n sub_debug=sub_debug,getpid=os.getpid):\n ''\n\n \n try :\n del _finalizer_registry[self._key]\n except KeyError:\n sub_debug('finalizer no longer registered')\n else :\n if self._pid !=getpid():\n sub_debug('finalizer ignored because different process')\n res=None\n else :\n sub_debug('finalizer calling %s with args %s and kwargs %s',\n self._callback,self._args,self._kwargs)\n res=self._callback(*self._args,**self._kwargs)\n self._weakref=self._callback=self._args=\\\n self._kwargs=self._key=None\n return res\n \n def cancel(self):\n ''\n\n \n try :\n del _finalizer_registry[self._key]\n except KeyError:\n pass\n else :\n self._weakref=self._callback=self._args=\\\n self._kwargs=self._key=None\n \n def still_active(self):\n ''\n\n \n return self._key in _finalizer_registry\n \n def __repr__(self):\n try :\n obj=self._weakref()\n except (AttributeError,TypeError):\n obj=None\n \n if obj is None :\n return ''\n \n x=''\n \n \ndef _run_finalizers(minpriority=None ):\n ''\n\n\n\n\n \n if _finalizer_registry is None :\n \n \n \n return\n \n if minpriority is None :\n f=lambda p:p[0][0]is not None\n else :\n f=lambda p:p[0][0]is not None and p[0][0]>=minpriority\n \n items=[x for x in list(_finalizer_registry.items())if f(x)]\n items.sort(reverse=True )\n \n for key,finalizer in items:\n sub_debug('calling %s',finalizer)\n try :\n finalizer()\n except Exception:\n import traceback\n traceback.print_exc()\n \n if minpriority is None :\n _finalizer_registry.clear()\n \n \n \n \n \ndef is_exiting():\n ''\n\n \n return _exiting or _exiting is None\n \n_exiting=False\n\ndef _exit_function(info=info,debug=debug,_run_finalizers=_run_finalizers,\nactive_children=active_children,\ncurrent_process=current_process):\n\n\n\n\n global _exiting\n \n if not _exiting:\n _exiting=True\n \n info('process shutting down')\n debug('running all \"atexit\" finalizers with priority >= 0')\n _run_finalizers(0)\n \n if current_process()is not None :\n \n \n \n \n \n \n \n \n \n \n \n \n \n for p in active_children():\n if p._daemonic:\n info('calling terminate() for daemon %s',p.name)\n p._popen.terminate()\n \n for p in active_children():\n info('calling join() for process %s',p.name)\n p.join()\n \n debug('running the remaining \"atexit\" finalizers')\n _run_finalizers()\n \natexit.register(_exit_function)\n\n\n\n\n\nclass ForkAwareThreadLock(object):\n def __init__(self):\n self._reset()\n register_after_fork(self,ForkAwareThreadLock._reset)\n \n def _reset(self):\n self._lock=threading.Lock()\n self.acquire=self._lock.acquire\n self.release=self._lock.release\n \nclass ForkAwareLocal(threading.local):\n def __init__(self):\n register_after_fork(self,lambda obj:obj.__dict__.clear())\n def __reduce__(self):\n return type(self),()\n", ["atexit", "functools", "itertools", "logging", "multiprocessing.process", "os", "shutil", "subprocess", "sys", "tempfile", "threading", "traceback", "weakref"]], "multiprocessing": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__version__='0.70a1'\n\n__all__=[\n'Process','current_process','active_children','freeze_support',\n'Manager','Pipe','cpu_count','log_to_stderr','get_logger',\n'allow_connection_pickling','BufferTooShort','TimeoutError',\n'Lock','RLock','Semaphore','BoundedSemaphore','Condition',\n'Event','Barrier','Queue','SimpleQueue','JoinableQueue','Pool',\n'Value','Array','RawValue','RawArray','SUBDEBUG','SUBWARNING',\n]\n\n__author__='R. Oudkerk (r.m.oudkerk@gmail.com)'\n\n\n\n\n\nimport os\nimport sys\n\nfrom multiprocessing.process import Process,current_process,active_children\nfrom multiprocessing.util import SUBDEBUG,SUBWARNING\n\n\n\n\n\nclass ProcessError(Exception):\n pass\n \nclass BufferTooShort(ProcessError):\n pass\n \nclass TimeoutError(ProcessError):\n pass\n \nclass AuthenticationError(ProcessError):\n pass\n \nimport _multiprocessing\n\n\n\n\n\ndef Manager():\n ''\n\n\n\n\n \n from multiprocessing.managers import SyncManager\n m=SyncManager()\n m.start()\n return m\n \n \n \n \n \n \n \n \n \ndef cpu_count():\n ''\n\n \n if sys.platform =='win32':\n try :\n num=int(os.environ['NUMBER_OF_PROCESSORS'])\n except (ValueError,KeyError):\n num=0\n elif 'bsd'in sys.platform or sys.platform =='darwin':\n comm='/sbin/sysctl -n hw.ncpu'\n if sys.platform =='darwin':\n comm='/usr'+comm\n try :\n with os.popen(comm)as p:\n num=int(p.read())\n except ValueError:\n num=0\n else :\n try :\n num=os.sysconf('SC_NPROCESSORS_ONLN')\n except (ValueError,OSError,AttributeError):\n num=0\n \n if num >=1:\n return num\n else :\n raise NotImplementedError('cannot determine number of cpus')\n \ndef freeze_support():\n ''\n\n\n \n if sys.platform =='win32'and getattr(sys,'frozen',False ):\n from multiprocessing.forking import freeze_support\n freeze_support()\n \ndef get_logger():\n ''\n\n \n from multiprocessing.util import get_logger\n return get_logger()\n \ndef log_to_stderr(level=None ):\n ''\n\n \n from multiprocessing.util import log_to_stderr\n return log_to_stderr(level)\n \n \n \n \n \n \n \n \n \n \n \n \n \n \ndef Lock():\n ''\n\n \n from multiprocessing.synchronize import Lock\n return Lock()\n \ndef RLock():\n ''\n\n \n from multiprocessing.synchronize import RLock\n return RLock()\n \ndef Condition(lock=None ):\n ''\n\n \n from multiprocessing.synchronize import Condition\n return Condition(lock)\n \ndef Semaphore(value=1):\n ''\n\n \n from multiprocessing.synchronize import Semaphore\n return Semaphore(value)\n \ndef BoundedSemaphore(value=1):\n ''\n\n \n from multiprocessing.synchronize import BoundedSemaphore\n return BoundedSemaphore(value)\n \ndef Event():\n ''\n\n \n from multiprocessing.synchronize import Event\n return Event()\n \ndef Barrier(parties,action=None ,timeout=None ):\n ''\n\n \n from multiprocessing.synchronize import Barrier\n return Barrier(parties,action,timeout)\n \ndef Queue(maxsize=0):\n ''\n\n \n from multiprocessing.queues import Queue\n return Queue(maxsize)\n \ndef JoinableQueue(maxsize=0):\n ''\n\n \n from multiprocessing.queues import JoinableQueue\n return JoinableQueue(maxsize)\n \ndef SimpleQueue():\n ''\n\n \n from multiprocessing.queues import SimpleQueue\n return SimpleQueue()\n \ndef Pool(processes=None ,initializer=None ,initargs=(),maxtasksperchild=None ):\n ''\n\n \n from multiprocessing.pool import Pool\n return Pool(processes,initializer,initargs,maxtasksperchild)\n \ndef RawValue(typecode_or_type,*args):\n ''\n\n \n from multiprocessing.sharedctypes import RawValue\n return RawValue(typecode_or_type,*args)\n \ndef RawArray(typecode_or_type,size_or_initializer):\n ''\n\n \n from multiprocessing.sharedctypes import RawArray\n return RawArray(typecode_or_type,size_or_initializer)\n \ndef Value(typecode_or_type,*args,lock=True ):\n ''\n\n \n from multiprocessing.sharedctypes import Value\n return Value(typecode_or_type,*args,lock=lock)\n \ndef Array(typecode_or_type,size_or_initializer,*,lock=True ):\n ''\n\n \n from multiprocessing.sharedctypes import Array\n return Array(typecode_or_type,size_or_initializer,lock=lock)\n \n \n \n \n \nif sys.platform =='win32':\n\n def set_executable(executable):\n ''\n\n\n\n \n from multiprocessing.forking import set_executable\n set_executable(executable)\n \n __all__ +=['set_executable']\n", ["_multiprocessing", "multiprocessing.forking", "multiprocessing.managers", "multiprocessing.pool", "multiprocessing.process", "multiprocessing.queues", "multiprocessing.sharedctypes", "multiprocessing.synchronize", "multiprocessing.util", "os", "sys"], 1], "multiprocessing.dummy.connection": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=['Client','Listener','Pipe']\n\nfrom queue import Queue\n\n\nfamilies=[None ]\n\n\nclass Listener(object):\n\n def __init__(self,address=None ,family=None ,backlog=1):\n self._backlog_queue=Queue(backlog)\n \n def accept(self):\n return Connection(*self._backlog_queue.get())\n \n def close(self):\n self._backlog_queue=None\n \n address=property(lambda self:self._backlog_queue)\n \n def __enter__(self):\n return self\n \n def __exit__(self,exc_type,exc_value,exc_tb):\n self.close()\n \n \ndef Client(address):\n _in,_out=Queue(),Queue()\n address.put((_out,_in))\n return Connection(_in,_out)\n \n \ndef Pipe(duplex=True ):\n a,b=Queue(),Queue()\n return Connection(a,b),Connection(b,a)\n \n \nclass Connection(object):\n\n def __init__(self,_in,_out):\n self._out=_out\n self._in=_in\n self.send=self.send_bytes=_out.put\n self.recv=self.recv_bytes=_in.get\n \n def poll(self,timeout=0.0):\n if self._in.qsize()>0:\n return True\n if timeout <=0.0:\n return False\n self._in.not_empty.acquire()\n self._in.not_empty.wait(timeout)\n self._in.not_empty.release()\n return self._in.qsize()>0\n \n def close(self):\n pass\n \n def __enter__(self):\n return self\n \n def __exit__(self,exc_type,exc_value,exc_tb):\n self.close()\n", ["queue"]], "multiprocessing.dummy": [".py", "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=[\n'Process','current_process','active_children','freeze_support',\n'Lock','RLock','Semaphore','BoundedSemaphore','Condition',\n'Event','Barrier','Queue','Manager','Pipe','Pool','JoinableQueue'\n]\n\n\n\n\n\nimport threading\nimport sys\nimport weakref\n\n\n\nfrom multiprocessing.dummy.connection import Pipe\nfrom threading import Lock,RLock,Semaphore,BoundedSemaphore\nfrom threading import Event,Condition,Barrier\nfrom queue import Queue\n\n\n\n\n\nclass DummyProcess(threading.Thread):\n\n def __init__(self,group=None ,target=None ,name=None ,args=(),kwargs={}):\n threading.Thread.__init__(self,group,target,name,args,kwargs)\n self._pid=None\n self._children=weakref.WeakKeyDictionary()\n self._start_called=False\n self._parent=current_process()\n \n def start(self):\n assert self._parent is current_process()\n self._start_called=True\n if hasattr(self._parent,'_children'):\n self._parent._children[self]=None\n threading.Thread.start(self)\n \n @property\n def exitcode(self):\n if self._start_called and not self.is_alive():\n return 0\n else :\n return None\n \n \n \n \n \nProcess=DummyProcess\ncurrent_process=threading.current_thread\ncurrent_process()._children=weakref.WeakKeyDictionary()\n\ndef active_children():\n children=current_process()._children\n for p in list(children):\n if not p.is_alive():\n children.pop(p,None )\n return list(children)\n \ndef freeze_support():\n pass\n \n \n \n \n \nclass Namespace(object):\n def __init__(self,**kwds):\n self.__dict__.update(kwds)\n def __repr__(self):\n items=list(self.__dict__.items())\n temp=[]\n for name,value in items:\n if not name.startswith('_'):\n temp.append('%s=%r'%(name,value))\n temp.sort()\n return 'Namespace(%s)'%str.join(', ',temp)\n \ndict=dict\nlist=list\n\n\n\n\n\nclass Value(object):\n def __init__(self,typecode,value,lock=True ):\n self._typecode=typecode\n self._value=value\n def _get(self):\n return self._value\n def _set(self,value):\n self._value=value\n value=property(_get,_set)\n def __repr__(self):\n return '<%r(%r, %r)>'%(type(self).__name__,self._typecode,self._value)\n \ndef Manager():\n return sys.modules[__name__]\n \ndef shutdown():\n pass\n \ndef Pool(processes=None ,initializer=None ,initargs=()):\n from multiprocessing.pool import ThreadPool\n return ThreadPool(processes,initializer,initargs)\n \nJoinableQueue=Queue\n", ["multiprocessing.dummy.connection", "multiprocessing.pool", "queue", "sys", "threading", "weakref"], 1], "pydoc_data.topics": [".py", "\n\ntopics={'assert':'The \"assert\" statement\\n'\n'**********************\\n'\n'\\n'\n'Assert statements are a convenient way to insert debugging '\n'assertions\\n'\n'into a program:\\n'\n'\\n'\n' assert_stmt ::= \"assert\" expression [\",\" expression]\\n'\n'\\n'\n'The simple form, \"assert expression\", is equivalent to\\n'\n'\\n'\n' if __debug__:\\n'\n' if not expression: raise AssertionError\\n'\n'\\n'\n'The extended form, \"assert expression1, expression2\", is '\n'equivalent to\\n'\n'\\n'\n' if __debug__:\\n'\n' if not expression1: raise AssertionError(expression2)\\n'\n'\\n'\n'These equivalences assume that \"__debug__\" and \"AssertionError\" '\n'refer\\n'\n'to the built-in variables with those names. In the current\\n'\n'implementation, the built-in variable \"__debug__\" is \"True\" under\\n'\n'normal circumstances, \"False\" when optimization is requested '\n'(command\\n'\n'line option \"-O\"). The current code generator emits no code for '\n'an\\n'\n'assert statement when optimization is requested at compile time. '\n'Note\\n'\n'that it is unnecessary to include the source code for the '\n'expression\\n'\n'that failed in the error message; it will be displayed as part of '\n'the\\n'\n'stack trace.\\n'\n'\\n'\n'Assignments to \"__debug__\" are illegal. The value for the '\n'built-in\\n'\n'variable is determined when the interpreter starts.\\n',\n'assignment':'Assignment statements\\n'\n'*********************\\n'\n'\\n'\n'Assignment statements are used to (re)bind names to values and '\n'to\\n'\n'modify attributes or items of mutable objects:\\n'\n'\\n'\n' assignment_stmt ::= (target_list \"=\")+ (starred_expression '\n'| yield_expression)\\n'\n' target_list ::= target (\",\" target)* [\",\"]\\n'\n' target ::= identifier\\n'\n' | \"(\" [target_list] \")\"\\n'\n' | \"[\" [target_list] \"]\"\\n'\n' | attributeref\\n'\n' | subscription\\n'\n' | slicing\\n'\n' | \"*\" target\\n'\n'\\n'\n'(See section Primaries for the syntax definitions for '\n'*attributeref*,\\n'\n'*subscription*, and *slicing*.)\\n'\n'\\n'\n'An assignment statement evaluates the expression list '\n'(remember that\\n'\n'this can be a single expression or a comma-separated list, the '\n'latter\\n'\n'yielding a tuple) and assigns the single resulting object to '\n'each of\\n'\n'the target lists, from left to right.\\n'\n'\\n'\n'Assignment is defined recursively depending on the form of the '\n'target\\n'\n'(list). When a target is part of a mutable object (an '\n'attribute\\n'\n'reference, subscription or slicing), the mutable object must\\n'\n'ultimately perform the assignment and decide about its '\n'validity, and\\n'\n'may raise an exception if the assignment is unacceptable. The '\n'rules\\n'\n'observed by various types and the exceptions raised are given '\n'with the\\n'\n'definition of the object types (see section The standard type\\n'\n'hierarchy).\\n'\n'\\n'\n'Assignment of an object to a target list, optionally enclosed '\n'in\\n'\n'parentheses or square brackets, is recursively defined as '\n'follows.\\n'\n'\\n'\n'* If the target list is a single target with no trailing '\n'comma,\\n'\n' optionally in parentheses, the object is assigned to that '\n'target.\\n'\n'\\n'\n'* Else: The object must be an iterable with the same number of '\n'items\\n'\n' as there are targets in the target list, and the items are '\n'assigned,\\n'\n' from left to right, to the corresponding targets.\\n'\n'\\n'\n' * If the target list contains one target prefixed with an '\n'asterisk,\\n'\n' called a \u201cstarred\u201d target: The object must be an iterable '\n'with at\\n'\n' least as many items as there are targets in the target '\n'list, minus\\n'\n' one. The first items of the iterable are assigned, from '\n'left to\\n'\n' right, to the targets before the starred target. The '\n'final items\\n'\n' of the iterable are assigned to the targets after the '\n'starred\\n'\n' target. A list of the remaining items in the iterable is '\n'then\\n'\n' assigned to the starred target (the list can be empty).\\n'\n'\\n'\n' * Else: The object must be an iterable with the same number '\n'of items\\n'\n' as there are targets in the target list, and the items '\n'are\\n'\n' assigned, from left to right, to the corresponding '\n'targets.\\n'\n'\\n'\n'Assignment of an object to a single target is recursively '\n'defined as\\n'\n'follows.\\n'\n'\\n'\n'* If the target is an identifier (name):\\n'\n'\\n'\n' * If the name does not occur in a \"global\" or \"nonlocal\" '\n'statement\\n'\n' in the current code block: the name is bound to the object '\n'in the\\n'\n' current local namespace.\\n'\n'\\n'\n' * Otherwise: the name is bound to the object in the global '\n'namespace\\n'\n' or the outer namespace determined by \"nonlocal\", '\n'respectively.\\n'\n'\\n'\n' The name is rebound if it was already bound. This may cause '\n'the\\n'\n' reference count for the object previously bound to the name '\n'to reach\\n'\n' zero, causing the object to be deallocated and its '\n'destructor (if it\\n'\n' has one) to be called.\\n'\n'\\n'\n'* If the target is an attribute reference: The primary '\n'expression in\\n'\n' the reference is evaluated. It should yield an object with\\n'\n' assignable attributes; if this is not the case, \"TypeError\" '\n'is\\n'\n' raised. That object is then asked to assign the assigned '\n'object to\\n'\n' the given attribute; if it cannot perform the assignment, it '\n'raises\\n'\n' an exception (usually but not necessarily '\n'\"AttributeError\").\\n'\n'\\n'\n' Note: If the object is a class instance and the attribute '\n'reference\\n'\n' occurs on both sides of the assignment operator, the '\n'right-hand side\\n'\n' expression, \"a.x\" can access either an instance attribute or '\n'(if no\\n'\n' instance attribute exists) a class attribute. The left-hand '\n'side\\n'\n' target \"a.x\" is always set as an instance attribute, '\n'creating it if\\n'\n' necessary. Thus, the two occurrences of \"a.x\" do not '\n'necessarily\\n'\n' refer to the same attribute: if the right-hand side '\n'expression\\n'\n' refers to a class attribute, the left-hand side creates a '\n'new\\n'\n' instance attribute as the target of the assignment:\\n'\n'\\n'\n' class Cls:\\n'\n' x = 3 # class variable\\n'\n' inst = Cls()\\n'\n' inst.x = inst.x + 1 # writes inst.x as 4 leaving Cls.x '\n'as 3\\n'\n'\\n'\n' This description does not necessarily apply to descriptor\\n'\n' attributes, such as properties created with \"property()\".\\n'\n'\\n'\n'* If the target is a subscription: The primary expression in '\n'the\\n'\n' reference is evaluated. It should yield either a mutable '\n'sequence\\n'\n' object (such as a list) or a mapping object (such as a '\n'dictionary).\\n'\n' Next, the subscript expression is evaluated.\\n'\n'\\n'\n' If the primary is a mutable sequence object (such as a '\n'list), the\\n'\n' subscript must yield an integer. If it is negative, the '\n'sequence\u2019s\\n'\n' length is added to it. The resulting value must be a '\n'nonnegative\\n'\n' integer less than the sequence\u2019s length, and the sequence is '\n'asked\\n'\n' to assign the assigned object to its item with that index. '\n'If the\\n'\n' index is out of range, \"IndexError\" is raised (assignment to '\n'a\\n'\n' subscripted sequence cannot add new items to a list).\\n'\n'\\n'\n' If the primary is a mapping object (such as a dictionary), '\n'the\\n'\n' subscript must have a type compatible with the mapping\u2019s key '\n'type,\\n'\n' and the mapping is then asked to create a key/datum pair '\n'which maps\\n'\n' the subscript to the assigned object. This can either '\n'replace an\\n'\n' existing key/value pair with the same key value, or insert a '\n'new\\n'\n' key/value pair (if no key with the same value existed).\\n'\n'\\n'\n' For user-defined objects, the \"__setitem__()\" method is '\n'called with\\n'\n' appropriate arguments.\\n'\n'\\n'\n'* If the target is a slicing: The primary expression in the '\n'reference\\n'\n' is evaluated. It should yield a mutable sequence object '\n'(such as a\\n'\n' list). The assigned object should be a sequence object of '\n'the same\\n'\n' type. Next, the lower and upper bound expressions are '\n'evaluated,\\n'\n' insofar they are present; defaults are zero and the '\n'sequence\u2019s\\n'\n' length. The bounds should evaluate to integers. If either '\n'bound is\\n'\n' negative, the sequence\u2019s length is added to it. The '\n'resulting\\n'\n' bounds are clipped to lie between zero and the sequence\u2019s '\n'length,\\n'\n' inclusive. Finally, the sequence object is asked to replace '\n'the\\n'\n' slice with the items of the assigned sequence. The length '\n'of the\\n'\n' slice may be different from the length of the assigned '\n'sequence,\\n'\n' thus changing the length of the target sequence, if the '\n'target\\n'\n' sequence allows it.\\n'\n'\\n'\n'**CPython implementation detail:** In the current '\n'implementation, the\\n'\n'syntax for targets is taken to be the same as for expressions, '\n'and\\n'\n'invalid syntax is rejected during the code generation phase, '\n'causing\\n'\n'less detailed error messages.\\n'\n'\\n'\n'Although the definition of assignment implies that overlaps '\n'between\\n'\n'the left-hand side and the right-hand side are \u2018simultaneous\u2019 '\n'(for\\n'\n'example \"a, b = b, a\" swaps two variables), overlaps *within* '\n'the\\n'\n'collection of assigned-to variables occur left-to-right, '\n'sometimes\\n'\n'resulting in confusion. For instance, the following program '\n'prints\\n'\n'\"[0, 2]\":\\n'\n'\\n'\n' x = [0, 1]\\n'\n' i = 0\\n'\n' i, x[i] = 1, 2 # i is updated, then x[i] is '\n'updated\\n'\n' print(x)\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3132** - Extended Iterable Unpacking\\n'\n' The specification for the \"*target\" feature.\\n'\n'\\n'\n'\\n'\n'Augmented assignment statements\\n'\n'===============================\\n'\n'\\n'\n'Augmented assignment is the combination, in a single '\n'statement, of a\\n'\n'binary operation and an assignment statement:\\n'\n'\\n'\n' augmented_assignment_stmt ::= augtarget augop '\n'(expression_list | yield_expression)\\n'\n' augtarget ::= identifier | attributeref | '\n'subscription | slicing\\n'\n' augop ::= \"+=\" | \"-=\" | \"*=\" | \"@=\" | '\n'\"/=\" | \"//=\" | \"%=\" | \"**=\"\\n'\n' | \">>=\" | \"<<=\" | \"&=\" | \"^=\" | \"|=\"\\n'\n'\\n'\n'(See section Primaries for the syntax definitions of the last '\n'three\\n'\n'symbols.)\\n'\n'\\n'\n'An augmented assignment evaluates the target (which, unlike '\n'normal\\n'\n'assignment statements, cannot be an unpacking) and the '\n'expression\\n'\n'list, performs the binary operation specific to the type of '\n'assignment\\n'\n'on the two operands, and assigns the result to the original '\n'target.\\n'\n'The target is only evaluated once.\\n'\n'\\n'\n'An augmented assignment expression like \"x += 1\" can be '\n'rewritten as\\n'\n'\"x = x + 1\" to achieve a similar, but not exactly equal '\n'effect. In the\\n'\n'augmented version, \"x\" is only evaluated once. Also, when '\n'possible,\\n'\n'the actual operation is performed *in-place*, meaning that '\n'rather than\\n'\n'creating a new object and assigning that to the target, the '\n'old object\\n'\n'is modified instead.\\n'\n'\\n'\n'Unlike normal assignments, augmented assignments evaluate the '\n'left-\\n'\n'hand side *before* evaluating the right-hand side. For '\n'example, \"a[i]\\n'\n'+= f(x)\" first looks-up \"a[i]\", then it evaluates \"f(x)\" and '\n'performs\\n'\n'the addition, and lastly, it writes the result back to '\n'\"a[i]\".\\n'\n'\\n'\n'With the exception of assigning to tuples and multiple targets '\n'in a\\n'\n'single statement, the assignment done by augmented assignment\\n'\n'statements is handled the same way as normal assignments. '\n'Similarly,\\n'\n'with the exception of the possible *in-place* behavior, the '\n'binary\\n'\n'operation performed by augmented assignment is the same as the '\n'normal\\n'\n'binary operations.\\n'\n'\\n'\n'For targets which are attribute references, the same caveat '\n'about\\n'\n'class and instance attributes applies as for regular '\n'assignments.\\n'\n'\\n'\n'\\n'\n'Annotated assignment statements\\n'\n'===============================\\n'\n'\\n'\n'*Annotation* assignment is the combination, in a single '\n'statement, of\\n'\n'a variable or attribute annotation and an optional assignment\\n'\n'statement:\\n'\n'\\n'\n' annotated_assignment_stmt ::= augtarget \":\" expression\\n'\n' [\"=\" (starred_expression | '\n'yield_expression)]\\n'\n'\\n'\n'The difference from normal Assignment statements is that only '\n'single\\n'\n'target is allowed.\\n'\n'\\n'\n'For simple names as assignment targets, if in class or module '\n'scope,\\n'\n'the annotations are evaluated and stored in a special class or '\n'module\\n'\n'attribute \"__annotations__\" that is a dictionary mapping from '\n'variable\\n'\n'names (mangled if private) to evaluated annotations. This '\n'attribute is\\n'\n'writable and is automatically created at the start of class or '\n'module\\n'\n'body execution, if annotations are found statically.\\n'\n'\\n'\n'For expressions as assignment targets, the annotations are '\n'evaluated\\n'\n'if in class or module scope, but not stored.\\n'\n'\\n'\n'If a name is annotated in a function scope, then this name is '\n'local\\n'\n'for that scope. Annotations are never evaluated and stored in '\n'function\\n'\n'scopes.\\n'\n'\\n'\n'If the right hand side is present, an annotated assignment '\n'performs\\n'\n'the actual assignment before evaluating annotations (where\\n'\n'applicable). If the right hand side is not present for an '\n'expression\\n'\n'target, then the interpreter evaluates the target except for '\n'the last\\n'\n'\"__setitem__()\" or \"__setattr__()\" call.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 526** - Syntax for Variable Annotations\\n'\n' The proposal that added syntax for annotating the types '\n'of\\n'\n' variables (including class variables and instance '\n'variables),\\n'\n' instead of expressing them through comments.\\n'\n'\\n'\n' **PEP 484** - Type hints\\n'\n' The proposal that added the \"typing\" module to provide a '\n'standard\\n'\n' syntax for type annotations that can be used in static '\n'analysis\\n'\n' tools and IDEs.\\n'\n'\\n'\n'Changed in version 3.8: Now annotated assignments allow same\\n'\n'expressions in the right hand side as the regular '\n'assignments.\\n'\n'Previously, some expressions (like un-parenthesized tuple '\n'expressions)\\n'\n'caused a syntax error.\\n',\n'async':'Coroutines\\n'\n'**********\\n'\n'\\n'\n'New in version 3.5.\\n'\n'\\n'\n'\\n'\n'Coroutine function definition\\n'\n'=============================\\n'\n'\\n'\n' async_funcdef ::= [decorators] \"async\" \"def\" funcname \"(\" '\n'[parameter_list] \")\"\\n'\n' [\"->\" expression] \":\" suite\\n'\n'\\n'\n'Execution of Python coroutines can be suspended and resumed at '\n'many\\n'\n'points (see *coroutine*). \"await\" expressions, \"async for\" and '\n'\"async\\n'\n'with\" can only be used in the body of a coroutine function.\\n'\n'\\n'\n'Functions defined with \"async def\" syntax are always coroutine\\n'\n'functions, even if they do not contain \"await\" or \"async\" '\n'keywords.\\n'\n'\\n'\n'It is a \"SyntaxError\" to use a \"yield from\" expression inside the '\n'body\\n'\n'of a coroutine function.\\n'\n'\\n'\n'An example of a coroutine function:\\n'\n'\\n'\n' async def func(param1, param2):\\n'\n' do_stuff()\\n'\n' await some_coroutine()\\n'\n'\\n'\n'Changed in version 3.7: \"await\" and \"async\" are now keywords;\\n'\n'previously they were only treated as such inside the body of a\\n'\n'coroutine function.\\n'\n'\\n'\n'\\n'\n'The \"async for\" statement\\n'\n'=========================\\n'\n'\\n'\n' async_for_stmt ::= \"async\" for_stmt\\n'\n'\\n'\n'An *asynchronous iterable* provides an \"__aiter__\" method that\\n'\n'directly returns an *asynchronous iterator*, which can call\\n'\n'asynchronous code in its \"__anext__\" method.\\n'\n'\\n'\n'The \"async for\" statement allows convenient iteration over\\n'\n'asynchronous iterables.\\n'\n'\\n'\n'The following code:\\n'\n'\\n'\n' async for TARGET in ITER:\\n'\n' SUITE\\n'\n' else:\\n'\n' SUITE2\\n'\n'\\n'\n'Is semantically equivalent to:\\n'\n'\\n'\n' iter = (ITER)\\n'\n' iter = type(iter).__aiter__(iter)\\n'\n' running = True\\n'\n'\\n'\n' while running:\\n'\n' try:\\n'\n' TARGET = await type(iter).__anext__(iter)\\n'\n' except StopAsyncIteration:\\n'\n' running = False\\n'\n' else:\\n'\n' SUITE\\n'\n' else:\\n'\n' SUITE2\\n'\n'\\n'\n'See also \"__aiter__()\" and \"__anext__()\" for details.\\n'\n'\\n'\n'It is a \"SyntaxError\" to use an \"async for\" statement outside the '\n'body\\n'\n'of a coroutine function.\\n'\n'\\n'\n'\\n'\n'The \"async with\" statement\\n'\n'==========================\\n'\n'\\n'\n' async_with_stmt ::= \"async\" with_stmt\\n'\n'\\n'\n'An *asynchronous context manager* is a *context manager* that is '\n'able\\n'\n'to suspend execution in its *enter* and *exit* methods.\\n'\n'\\n'\n'The following code:\\n'\n'\\n'\n' async with EXPRESSION as TARGET:\\n'\n' SUITE\\n'\n'\\n'\n'is semantically equivalent to:\\n'\n'\\n'\n' manager = (EXPRESSION)\\n'\n' aenter = type(manager).__aenter__\\n'\n' aexit = type(manager).__aexit__\\n'\n' value = await aenter(manager)\\n'\n' hit_except = False\\n'\n'\\n'\n' try:\\n'\n' TARGET = value\\n'\n' SUITE\\n'\n' except:\\n'\n' hit_except = True\\n'\n' if not await aexit(manager, *sys.exc_info()):\\n'\n' raise\\n'\n' finally:\\n'\n' if not hit_except:\\n'\n' await aexit(manager, None, None, None)\\n'\n'\\n'\n'See also \"__aenter__()\" and \"__aexit__()\" for details.\\n'\n'\\n'\n'It is a \"SyntaxError\" to use an \"async with\" statement outside the\\n'\n'body of a coroutine function.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 492** - Coroutines with async and await syntax\\n'\n' The proposal that made coroutines a proper standalone concept '\n'in\\n'\n' Python, and added supporting syntax.\\n'\n'\\n'\n'-[ Footnotes ]-\\n'\n'\\n'\n'[1] The exception is propagated to the invocation stack unless '\n'there\\n'\n' is a \"finally\" clause which happens to raise another '\n'exception.\\n'\n' That new exception causes the old one to be lost.\\n'\n'\\n'\n'[2] In pattern matching, a sequence is defined as one of the\\n'\n' following:\\n'\n'\\n'\n' * a class that inherits from \"collections.abc.Sequence\"\\n'\n'\\n'\n' * a Python class that has been registered as\\n'\n' \"collections.abc.Sequence\"\\n'\n'\\n'\n' * a builtin class that has its (CPython) '\n'\"Py_TPFLAGS_SEQUENCE\"\\n'\n' bit set\\n'\n'\\n'\n' * a class that inherits from any of the above\\n'\n'\\n'\n' The following standard library classes are sequences:\\n'\n'\\n'\n' * \"array.array\"\\n'\n'\\n'\n' * \"collections.deque\"\\n'\n'\\n'\n' * \"list\"\\n'\n'\\n'\n' * \"memoryview\"\\n'\n'\\n'\n' * \"range\"\\n'\n'\\n'\n' * \"tuple\"\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' Subject values of type \"str\", \"bytes\", and \"bytearray\" do '\n'not\\n'\n' match sequence patterns.\\n'\n'\\n'\n'[3] In pattern matching, a mapping is defined as one of the '\n'following:\\n'\n'\\n'\n' * a class that inherits from \"collections.abc.Mapping\"\\n'\n'\\n'\n' * a Python class that has been registered as\\n'\n' \"collections.abc.Mapping\"\\n'\n'\\n'\n' * a builtin class that has its (CPython) '\n'\"Py_TPFLAGS_MAPPING\"\\n'\n' bit set\\n'\n'\\n'\n' * a class that inherits from any of the above\\n'\n'\\n'\n' The standard library classes \"dict\" and '\n'\"types.MappingProxyType\"\\n'\n' are mappings.\\n'\n'\\n'\n'[4] A string literal appearing as the first statement in the '\n'function\\n'\n' body is transformed into the function\u2019s \"__doc__\" attribute '\n'and\\n'\n' therefore the function\u2019s *docstring*.\\n'\n'\\n'\n'[5] A string literal appearing as the first statement in the class\\n'\n' body is transformed into the namespace\u2019s \"__doc__\" item and\\n'\n' therefore the class\u2019s *docstring*.\\n',\n'atom-identifiers':'Identifiers (Names)\\n'\n'*******************\\n'\n'\\n'\n'An identifier occurring as an atom is a name. See '\n'section Identifiers\\n'\n'and keywords for lexical definition and section Naming '\n'and binding for\\n'\n'documentation of naming and binding.\\n'\n'\\n'\n'When the name is bound to an object, evaluation of the '\n'atom yields\\n'\n'that object. When a name is not bound, an attempt to '\n'evaluate it\\n'\n'raises a \"NameError\" exception.\\n'\n'\\n'\n'**Private name mangling:** When an identifier that '\n'textually occurs in\\n'\n'a class definition begins with two or more underscore '\n'characters and\\n'\n'does not end in two or more underscores, it is '\n'considered a *private\\n'\n'name* of that class. Private names are transformed to a '\n'longer form\\n'\n'before code is generated for them. The transformation '\n'inserts the\\n'\n'class name, with leading underscores removed and a '\n'single underscore\\n'\n'inserted, in front of the name. For example, the '\n'identifier \"__spam\"\\n'\n'occurring in a class named \"Ham\" will be transformed to '\n'\"_Ham__spam\".\\n'\n'This transformation is independent of the syntactical '\n'context in which\\n'\n'the identifier is used. If the transformed name is '\n'extremely long\\n'\n'(longer than 255 characters), implementation defined '\n'truncation may\\n'\n'happen. If the class name consists only of underscores, '\n'no\\n'\n'transformation is done.\\n',\n'atom-literals':'Literals\\n'\n'********\\n'\n'\\n'\n'Python supports string and bytes literals and various '\n'numeric\\n'\n'literals:\\n'\n'\\n'\n' literal ::= stringliteral | bytesliteral\\n'\n' | integer | floatnumber | imagnumber\\n'\n'\\n'\n'Evaluation of a literal yields an object of the given type '\n'(string,\\n'\n'bytes, integer, floating point number, complex number) with '\n'the given\\n'\n'value. The value may be approximated in the case of '\n'floating point\\n'\n'and imaginary (complex) literals. See section Literals for '\n'details.\\n'\n'\\n'\n'All literals correspond to immutable data types, and hence '\n'the\\n'\n'object\u2019s identity is less important than its value. '\n'Multiple\\n'\n'evaluations of literals with the same value (either the '\n'same\\n'\n'occurrence in the program text or a different occurrence) '\n'may obtain\\n'\n'the same object or a different object with the same '\n'value.\\n',\n'attribute-access':'Customizing attribute access\\n'\n'****************************\\n'\n'\\n'\n'The following methods can be defined to customize the '\n'meaning of\\n'\n'attribute access (use of, assignment to, or deletion of '\n'\"x.name\") for\\n'\n'class instances.\\n'\n'\\n'\n'object.__getattr__(self, name)\\n'\n'\\n'\n' Called when the default attribute access fails with '\n'an\\n'\n' \"AttributeError\" (either \"__getattribute__()\" raises '\n'an\\n'\n' \"AttributeError\" because *name* is not an instance '\n'attribute or an\\n'\n' attribute in the class tree for \"self\"; or '\n'\"__get__()\" of a *name*\\n'\n' property raises \"AttributeError\"). This method '\n'should either\\n'\n' return the (computed) attribute value or raise an '\n'\"AttributeError\"\\n'\n' exception.\\n'\n'\\n'\n' Note that if the attribute is found through the '\n'normal mechanism,\\n'\n' \"__getattr__()\" is not called. (This is an '\n'intentional asymmetry\\n'\n' between \"__getattr__()\" and \"__setattr__()\".) This is '\n'done both for\\n'\n' efficiency reasons and because otherwise '\n'\"__getattr__()\" would have\\n'\n' no way to access other attributes of the instance. '\n'Note that at\\n'\n' least for instance variables, you can fake total '\n'control by not\\n'\n' inserting any values in the instance attribute '\n'dictionary (but\\n'\n' instead inserting them in another object). See the\\n'\n' \"__getattribute__()\" method below for a way to '\n'actually get total\\n'\n' control over attribute access.\\n'\n'\\n'\n'object.__getattribute__(self, name)\\n'\n'\\n'\n' Called unconditionally to implement attribute '\n'accesses for\\n'\n' instances of the class. If the class also defines '\n'\"__getattr__()\",\\n'\n' the latter will not be called unless '\n'\"__getattribute__()\" either\\n'\n' calls it explicitly or raises an \"AttributeError\". '\n'This method\\n'\n' should return the (computed) attribute value or raise '\n'an\\n'\n' \"AttributeError\" exception. In order to avoid '\n'infinite recursion in\\n'\n' this method, its implementation should always call '\n'the base class\\n'\n' method with the same name to access any attributes it '\n'needs, for\\n'\n' example, \"object.__getattribute__(self, name)\".\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' This method may still be bypassed when looking up '\n'special methods\\n'\n' as the result of implicit invocation via language '\n'syntax or\\n'\n' built-in functions. See Special method lookup.\\n'\n'\\n'\n' For certain sensitive attribute accesses, raises an '\n'auditing event\\n'\n' \"object.__getattr__\" with arguments \"obj\" and '\n'\"name\".\\n'\n'\\n'\n'object.__setattr__(self, name, value)\\n'\n'\\n'\n' Called when an attribute assignment is attempted. '\n'This is called\\n'\n' instead of the normal mechanism (i.e. store the value '\n'in the\\n'\n' instance dictionary). *name* is the attribute name, '\n'*value* is the\\n'\n' value to be assigned to it.\\n'\n'\\n'\n' If \"__setattr__()\" wants to assign to an instance '\n'attribute, it\\n'\n' should call the base class method with the same name, '\n'for example,\\n'\n' \"object.__setattr__(self, name, value)\".\\n'\n'\\n'\n' For certain sensitive attribute assignments, raises '\n'an auditing\\n'\n' event \"object.__setattr__\" with arguments \"obj\", '\n'\"name\", \"value\".\\n'\n'\\n'\n'object.__delattr__(self, name)\\n'\n'\\n'\n' Like \"__setattr__()\" but for attribute deletion '\n'instead of\\n'\n' assignment. This should only be implemented if \"del '\n'obj.name\" is\\n'\n' meaningful for the object.\\n'\n'\\n'\n' For certain sensitive attribute deletions, raises an '\n'auditing event\\n'\n' \"object.__delattr__\" with arguments \"obj\" and '\n'\"name\".\\n'\n'\\n'\n'object.__dir__(self)\\n'\n'\\n'\n' Called when \"dir()\" is called on the object. A '\n'sequence must be\\n'\n' returned. \"dir()\" converts the returned sequence to a '\n'list and\\n'\n' sorts it.\\n'\n'\\n'\n'\\n'\n'Customizing module attribute access\\n'\n'===================================\\n'\n'\\n'\n'Special names \"__getattr__\" and \"__dir__\" can be also '\n'used to\\n'\n'customize access to module attributes. The \"__getattr__\" '\n'function at\\n'\n'the module level should accept one argument which is the '\n'name of an\\n'\n'attribute and return the computed value or raise an '\n'\"AttributeError\".\\n'\n'If an attribute is not found on a module object through '\n'the normal\\n'\n'lookup, i.e. \"object.__getattribute__()\", then '\n'\"__getattr__\" is\\n'\n'searched in the module \"__dict__\" before raising an '\n'\"AttributeError\".\\n'\n'If found, it is called with the attribute name and the '\n'result is\\n'\n'returned.\\n'\n'\\n'\n'The \"__dir__\" function should accept no arguments, and '\n'return a\\n'\n'sequence of strings that represents the names accessible '\n'on module. If\\n'\n'present, this function overrides the standard \"dir()\" '\n'search on a\\n'\n'module.\\n'\n'\\n'\n'For a more fine grained customization of the module '\n'behavior (setting\\n'\n'attributes, properties, etc.), one can set the '\n'\"__class__\" attribute\\n'\n'of a module object to a subclass of \"types.ModuleType\". '\n'For example:\\n'\n'\\n'\n' import sys\\n'\n' from types import ModuleType\\n'\n'\\n'\n' class VerboseModule(ModuleType):\\n'\n' def __repr__(self):\\n'\n\" return f'Verbose {self.__name__}'\\n\"\n'\\n'\n' def __setattr__(self, attr, value):\\n'\n\" print(f'Setting {attr}...')\\n\"\n' super().__setattr__(attr, value)\\n'\n'\\n'\n' sys.modules[__name__].__class__ = VerboseModule\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Defining module \"__getattr__\" and setting module '\n'\"__class__\" only\\n'\n' affect lookups made using the attribute access syntax '\n'\u2013 directly\\n'\n' accessing the module globals (whether by code within '\n'the module, or\\n'\n' via a reference to the module\u2019s globals dictionary) is '\n'unaffected.\\n'\n'\\n'\n'Changed in version 3.5: \"__class__\" module attribute is '\n'now writable.\\n'\n'\\n'\n'New in version 3.7: \"__getattr__\" and \"__dir__\" module '\n'attributes.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 562** - Module __getattr__ and __dir__\\n'\n' Describes the \"__getattr__\" and \"__dir__\" functions '\n'on modules.\\n'\n'\\n'\n'\\n'\n'Implementing Descriptors\\n'\n'========================\\n'\n'\\n'\n'The following methods only apply when an instance of the '\n'class\\n'\n'containing the method (a so-called *descriptor* class) '\n'appears in an\\n'\n'*owner* class (the descriptor must be in either the '\n'owner\u2019s class\\n'\n'dictionary or in the class dictionary for one of its '\n'parents). In the\\n'\n'examples below, \u201cthe attribute\u201d refers to the attribute '\n'whose name is\\n'\n'the key of the property in the owner class\u2019 \"__dict__\".\\n'\n'\\n'\n'object.__get__(self, instance, owner=None)\\n'\n'\\n'\n' Called to get the attribute of the owner class (class '\n'attribute\\n'\n' access) or of an instance of that class (instance '\n'attribute\\n'\n' access). The optional *owner* argument is the owner '\n'class, while\\n'\n' *instance* is the instance that the attribute was '\n'accessed through,\\n'\n' or \"None\" when the attribute is accessed through the '\n'*owner*.\\n'\n'\\n'\n' This method should return the computed attribute '\n'value or raise an\\n'\n' \"AttributeError\" exception.\\n'\n'\\n'\n' **PEP 252** specifies that \"__get__()\" is callable '\n'with one or two\\n'\n' arguments. Python\u2019s own built-in descriptors support '\n'this\\n'\n' specification; however, it is likely that some '\n'third-party tools\\n'\n' have descriptors that require both arguments. '\n'Python\u2019s own\\n'\n' \"__getattribute__()\" implementation always passes in '\n'both arguments\\n'\n' whether they are required or not.\\n'\n'\\n'\n'object.__set__(self, instance, value)\\n'\n'\\n'\n' Called to set the attribute on an instance *instance* '\n'of the owner\\n'\n' class to a new value, *value*.\\n'\n'\\n'\n' Note, adding \"__set__()\" or \"__delete__()\" changes '\n'the kind of\\n'\n' descriptor to a \u201cdata descriptor\u201d. See Invoking '\n'Descriptors for\\n'\n' more details.\\n'\n'\\n'\n'object.__delete__(self, instance)\\n'\n'\\n'\n' Called to delete the attribute on an instance '\n'*instance* of the\\n'\n' owner class.\\n'\n'\\n'\n'object.__set_name__(self, owner, name)\\n'\n'\\n'\n' Called at the time the owning class *owner* is '\n'created. The\\n'\n' descriptor has been assigned to *name*.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' \"__set_name__()\" is only called implicitly as part '\n'of the \"type\"\\n'\n' constructor, so it will need to be called '\n'explicitly with the\\n'\n' appropriate parameters when a descriptor is added '\n'to a class\\n'\n' after initial creation:\\n'\n'\\n'\n' class A:\\n'\n' pass\\n'\n' descr = custom_descriptor()\\n'\n' A.attr = descr\\n'\n\" descr.__set_name__(A, 'attr')\\n\"\n'\\n'\n' See Creating the class object for more details.\\n'\n'\\n'\n' New in version 3.6.\\n'\n'\\n'\n'The attribute \"__objclass__\" is interpreted by the '\n'\"inspect\" module as\\n'\n'specifying the class where this object was defined '\n'(setting this\\n'\n'appropriately can assist in runtime introspection of '\n'dynamic class\\n'\n'attributes). For callables, it may indicate that an '\n'instance of the\\n'\n'given type (or a subclass) is expected or required as '\n'the first\\n'\n'positional argument (for example, CPython sets this '\n'attribute for\\n'\n'unbound methods that are implemented in C).\\n'\n'\\n'\n'\\n'\n'Invoking Descriptors\\n'\n'====================\\n'\n'\\n'\n'In general, a descriptor is an object attribute with '\n'\u201cbinding\\n'\n'behavior\u201d, one whose attribute access has been '\n'overridden by methods\\n'\n'in the descriptor protocol: \"__get__()\", \"__set__()\", '\n'and\\n'\n'\"__delete__()\". If any of those methods are defined for '\n'an object, it\\n'\n'is said to be a descriptor.\\n'\n'\\n'\n'The default behavior for attribute access is to get, '\n'set, or delete\\n'\n'the attribute from an object\u2019s dictionary. For instance, '\n'\"a.x\" has a\\n'\n'lookup chain starting with \"a.__dict__[\\'x\\']\", then\\n'\n'\"type(a).__dict__[\\'x\\']\", and continuing through the '\n'base classes of\\n'\n'\"type(a)\" excluding metaclasses.\\n'\n'\\n'\n'However, if the looked-up value is an object defining '\n'one of the\\n'\n'descriptor methods, then Python may override the default '\n'behavior and\\n'\n'invoke the descriptor method instead. Where this occurs '\n'in the\\n'\n'precedence chain depends on which descriptor methods '\n'were defined and\\n'\n'how they were called.\\n'\n'\\n'\n'The starting point for descriptor invocation is a '\n'binding, \"a.x\". How\\n'\n'the arguments are assembled depends on \"a\":\\n'\n'\\n'\n'Direct Call\\n'\n' The simplest and least common call is when user code '\n'directly\\n'\n' invokes a descriptor method: \"x.__get__(a)\".\\n'\n'\\n'\n'Instance Binding\\n'\n' If binding to an object instance, \"a.x\" is '\n'transformed into the\\n'\n' call: \"type(a).__dict__[\\'x\\'].__get__(a, type(a))\".\\n'\n'\\n'\n'Class Binding\\n'\n' If binding to a class, \"A.x\" is transformed into the '\n'call:\\n'\n' \"A.__dict__[\\'x\\'].__get__(None, A)\".\\n'\n'\\n'\n'Super Binding\\n'\n' If \"a\" is an instance of \"super\", then the binding '\n'\"super(B,\\n'\n' obj).m()\" searches \"obj.__class__.__mro__\" for the '\n'base class \"A\"\\n'\n' immediately preceding \"B\" and then invokes the '\n'descriptor with the\\n'\n' call: \"A.__dict__[\\'m\\'].__get__(obj, '\n'obj.__class__)\".\\n'\n'\\n'\n'For instance bindings, the precedence of descriptor '\n'invocation depends\\n'\n'on which descriptor methods are defined. A descriptor '\n'can define any\\n'\n'combination of \"__get__()\", \"__set__()\" and '\n'\"__delete__()\". If it\\n'\n'does not define \"__get__()\", then accessing the '\n'attribute will return\\n'\n'the descriptor object itself unless there is a value in '\n'the object\u2019s\\n'\n'instance dictionary. If the descriptor defines '\n'\"__set__()\" and/or\\n'\n'\"__delete__()\", it is a data descriptor; if it defines '\n'neither, it is\\n'\n'a non-data descriptor. Normally, data descriptors '\n'define both\\n'\n'\"__get__()\" and \"__set__()\", while non-data descriptors '\n'have just the\\n'\n'\"__get__()\" method. Data descriptors with \"__get__()\" '\n'and \"__set__()\"\\n'\n'(and/or \"__delete__()\") defined always override a '\n'redefinition in an\\n'\n'instance dictionary. In contrast, non-data descriptors '\n'can be\\n'\n'overridden by instances.\\n'\n'\\n'\n'Python methods (including \"staticmethod()\" and '\n'\"classmethod()\") are\\n'\n'implemented as non-data descriptors. Accordingly, '\n'instances can\\n'\n'redefine and override methods. This allows individual '\n'instances to\\n'\n'acquire behaviors that differ from other instances of '\n'the same class.\\n'\n'\\n'\n'The \"property()\" function is implemented as a data '\n'descriptor.\\n'\n'Accordingly, instances cannot override the behavior of a '\n'property.\\n'\n'\\n'\n'\\n'\n'__slots__\\n'\n'=========\\n'\n'\\n'\n'*__slots__* allow us to explicitly declare data members '\n'(like\\n'\n'properties) and deny the creation of *__dict__* and '\n'*__weakref__*\\n'\n'(unless explicitly declared in *__slots__* or available '\n'in a parent.)\\n'\n'\\n'\n'The space saved over using *__dict__* can be '\n'significant. Attribute\\n'\n'lookup speed can be significantly improved as well.\\n'\n'\\n'\n'object.__slots__\\n'\n'\\n'\n' This class variable can be assigned a string, '\n'iterable, or sequence\\n'\n' of strings with variable names used by instances. '\n'*__slots__*\\n'\n' reserves space for the declared variables and '\n'prevents the\\n'\n' automatic creation of *__dict__* and *__weakref__* '\n'for each\\n'\n' instance.\\n'\n'\\n'\n'\\n'\n'Notes on using *__slots__*\\n'\n'--------------------------\\n'\n'\\n'\n'* When inheriting from a class without *__slots__*, the '\n'*__dict__* and\\n'\n' *__weakref__* attribute of the instances will always '\n'be accessible.\\n'\n'\\n'\n'* Without a *__dict__* variable, instances cannot be '\n'assigned new\\n'\n' variables not listed in the *__slots__* definition. '\n'Attempts to\\n'\n' assign to an unlisted variable name raises '\n'\"AttributeError\". If\\n'\n' dynamic assignment of new variables is desired, then '\n'add\\n'\n' \"\\'__dict__\\'\" to the sequence of strings in the '\n'*__slots__*\\n'\n' declaration.\\n'\n'\\n'\n'* Without a *__weakref__* variable for each instance, '\n'classes defining\\n'\n' *__slots__* do not support weak references to its '\n'instances. If weak\\n'\n' reference support is needed, then add '\n'\"\\'__weakref__\\'\" to the\\n'\n' sequence of strings in the *__slots__* declaration.\\n'\n'\\n'\n'* *__slots__* are implemented at the class level by '\n'creating\\n'\n' descriptors (Implementing Descriptors) for each '\n'variable name. As a\\n'\n' result, class attributes cannot be used to set default '\n'values for\\n'\n' instance variables defined by *__slots__*; otherwise, '\n'the class\\n'\n' attribute would overwrite the descriptor assignment.\\n'\n'\\n'\n'* The action of a *__slots__* declaration is not limited '\n'to the class\\n'\n' where it is defined. *__slots__* declared in parents '\n'are available\\n'\n' in child classes. However, child subclasses will get a '\n'*__dict__*\\n'\n' and *__weakref__* unless they also define *__slots__* '\n'(which should\\n'\n' only contain names of any *additional* slots).\\n'\n'\\n'\n'* If a class defines a slot also defined in a base '\n'class, the instance\\n'\n' variable defined by the base class slot is '\n'inaccessible (except by\\n'\n' retrieving its descriptor directly from the base '\n'class). This\\n'\n' renders the meaning of the program undefined. In the '\n'future, a\\n'\n' check may be added to prevent this.\\n'\n'\\n'\n'* Nonempty *__slots__* does not work for classes derived '\n'from\\n'\n' \u201cvariable-length\u201d built-in types such as \"int\", '\n'\"bytes\" and \"tuple\".\\n'\n'\\n'\n'* Any non-string iterable may be assigned to '\n'*__slots__*. Mappings may\\n'\n' also be used; however, in the future, special meaning '\n'may be\\n'\n' assigned to the values corresponding to each key.\\n'\n'\\n'\n'* *__class__* assignment works only if both classes have '\n'the same\\n'\n' *__slots__*.\\n'\n'\\n'\n'* Multiple inheritance with multiple slotted parent '\n'classes can be\\n'\n' used, but only one parent is allowed to have '\n'attributes created by\\n'\n' slots (the other bases must have empty slot layouts) - '\n'violations\\n'\n' raise \"TypeError\".\\n'\n'\\n'\n'* If an iterator is used for *__slots__* then a '\n'descriptor is created\\n'\n' for each of the iterator\u2019s values. However, the '\n'*__slots__*\\n'\n' attribute will be an empty iterator.\\n',\n'attribute-references':'Attribute references\\n'\n'********************\\n'\n'\\n'\n'An attribute reference is a primary followed by a '\n'period and a name:\\n'\n'\\n'\n' attributeref ::= primary \".\" identifier\\n'\n'\\n'\n'The primary must evaluate to an object of a type '\n'that supports\\n'\n'attribute references, which most objects do. This '\n'object is then\\n'\n'asked to produce the attribute whose name is the '\n'identifier. This\\n'\n'production can be customized by overriding the '\n'\"__getattr__()\" method.\\n'\n'If this attribute is not available, the exception '\n'\"AttributeError\" is\\n'\n'raised. Otherwise, the type and value of the object '\n'produced is\\n'\n'determined by the object. Multiple evaluations of '\n'the same attribute\\n'\n'reference may yield different objects.\\n',\n'augassign':'Augmented assignment statements\\n'\n'*******************************\\n'\n'\\n'\n'Augmented assignment is the combination, in a single statement, '\n'of a\\n'\n'binary operation and an assignment statement:\\n'\n'\\n'\n' augmented_assignment_stmt ::= augtarget augop '\n'(expression_list | yield_expression)\\n'\n' augtarget ::= identifier | attributeref | '\n'subscription | slicing\\n'\n' augop ::= \"+=\" | \"-=\" | \"*=\" | \"@=\" | '\n'\"/=\" | \"//=\" | \"%=\" | \"**=\"\\n'\n' | \">>=\" | \"<<=\" | \"&=\" | \"^=\" | \"|=\"\\n'\n'\\n'\n'(See section Primaries for the syntax definitions of the last '\n'three\\n'\n'symbols.)\\n'\n'\\n'\n'An augmented assignment evaluates the target (which, unlike '\n'normal\\n'\n'assignment statements, cannot be an unpacking) and the '\n'expression\\n'\n'list, performs the binary operation specific to the type of '\n'assignment\\n'\n'on the two operands, and assigns the result to the original '\n'target.\\n'\n'The target is only evaluated once.\\n'\n'\\n'\n'An augmented assignment expression like \"x += 1\" can be '\n'rewritten as\\n'\n'\"x = x + 1\" to achieve a similar, but not exactly equal effect. '\n'In the\\n'\n'augmented version, \"x\" is only evaluated once. Also, when '\n'possible,\\n'\n'the actual operation is performed *in-place*, meaning that '\n'rather than\\n'\n'creating a new object and assigning that to the target, the old '\n'object\\n'\n'is modified instead.\\n'\n'\\n'\n'Unlike normal assignments, augmented assignments evaluate the '\n'left-\\n'\n'hand side *before* evaluating the right-hand side. For '\n'example, \"a[i]\\n'\n'+= f(x)\" first looks-up \"a[i]\", then it evaluates \"f(x)\" and '\n'performs\\n'\n'the addition, and lastly, it writes the result back to \"a[i]\".\\n'\n'\\n'\n'With the exception of assigning to tuples and multiple targets '\n'in a\\n'\n'single statement, the assignment done by augmented assignment\\n'\n'statements is handled the same way as normal assignments. '\n'Similarly,\\n'\n'with the exception of the possible *in-place* behavior, the '\n'binary\\n'\n'operation performed by augmented assignment is the same as the '\n'normal\\n'\n'binary operations.\\n'\n'\\n'\n'For targets which are attribute references, the same caveat '\n'about\\n'\n'class and instance attributes applies as for regular '\n'assignments.\\n',\n'await':'Await expression\\n'\n'****************\\n'\n'\\n'\n'Suspend the execution of *coroutine* on an *awaitable* object. Can\\n'\n'only be used inside a *coroutine function*.\\n'\n'\\n'\n' await_expr ::= \"await\" primary\\n'\n'\\n'\n'New in version 3.5.\\n',\n'binary':'Binary arithmetic operations\\n'\n'****************************\\n'\n'\\n'\n'The binary arithmetic operations have the conventional priority\\n'\n'levels. Note that some of these operations also apply to certain '\n'non-\\n'\n'numeric types. Apart from the power operator, there are only two\\n'\n'levels, one for multiplicative operators and one for additive\\n'\n'operators:\\n'\n'\\n'\n' m_expr ::= u_expr | m_expr \"*\" u_expr | m_expr \"@\" m_expr |\\n'\n' m_expr \"//\" u_expr | m_expr \"/\" u_expr |\\n'\n' m_expr \"%\" u_expr\\n'\n' a_expr ::= m_expr | a_expr \"+\" m_expr | a_expr \"-\" m_expr\\n'\n'\\n'\n'The \"*\" (multiplication) operator yields the product of its '\n'arguments.\\n'\n'The arguments must either both be numbers, or one argument must be '\n'an\\n'\n'integer and the other must be a sequence. In the former case, the\\n'\n'numbers are converted to a common type and then multiplied '\n'together.\\n'\n'In the latter case, sequence repetition is performed; a negative\\n'\n'repetition factor yields an empty sequence.\\n'\n'\\n'\n'This operation can be customized using the special \"__mul__()\" '\n'and\\n'\n'\"__rmul__()\" methods.\\n'\n'\\n'\n'The \"@\" (at) operator is intended to be used for matrix\\n'\n'multiplication. No builtin Python types implement this operator.\\n'\n'\\n'\n'New in version 3.5.\\n'\n'\\n'\n'The \"/\" (division) and \"//\" (floor division) operators yield the\\n'\n'quotient of their arguments. The numeric arguments are first\\n'\n'converted to a common type. Division of integers yields a float, '\n'while\\n'\n'floor division of integers results in an integer; the result is '\n'that\\n'\n'of mathematical division with the \u2018floor\u2019 function applied to the\\n'\n'result. Division by zero raises the \"ZeroDivisionError\" '\n'exception.\\n'\n'\\n'\n'This operation can be customized using the special \"__div__()\" '\n'and\\n'\n'\"__floordiv__()\" methods.\\n'\n'\\n'\n'The \"%\" (modulo) operator yields the remainder from the division '\n'of\\n'\n'the first argument by the second. The numeric arguments are '\n'first\\n'\n'converted to a common type. A zero right argument raises the\\n'\n'\"ZeroDivisionError\" exception. The arguments may be floating '\n'point\\n'\n'numbers, e.g., \"3.14%0.7\" equals \"0.34\" (since \"3.14\" equals '\n'\"4*0.7 +\\n'\n'0.34\".) The modulo operator always yields a result with the same '\n'sign\\n'\n'as its second operand (or zero); the absolute value of the result '\n'is\\n'\n'strictly smaller than the absolute value of the second operand '\n'[1].\\n'\n'\\n'\n'The floor division and modulo operators are connected by the '\n'following\\n'\n'identity: \"x == (x//y)*y + (x%y)\". Floor division and modulo are '\n'also\\n'\n'connected with the built-in function \"divmod()\": \"divmod(x, y) ==\\n'\n'(x//y, x%y)\". [2].\\n'\n'\\n'\n'In addition to performing the modulo operation on numbers, the '\n'\"%\"\\n'\n'operator is also overloaded by string objects to perform '\n'old-style\\n'\n'string formatting (also known as interpolation). The syntax for\\n'\n'string formatting is described in the Python Library Reference,\\n'\n'section printf-style String Formatting.\\n'\n'\\n'\n'The *modulo* operation can be customized using the special '\n'\"__mod__()\"\\n'\n'method.\\n'\n'\\n'\n'The floor division operator, the modulo operator, and the '\n'\"divmod()\"\\n'\n'function are not defined for complex numbers. Instead, convert to '\n'a\\n'\n'floating point number using the \"abs()\" function if appropriate.\\n'\n'\\n'\n'The \"+\" (addition) operator yields the sum of its arguments. The\\n'\n'arguments must either both be numbers or both be sequences of the '\n'same\\n'\n'type. In the former case, the numbers are converted to a common '\n'type\\n'\n'and then added together. In the latter case, the sequences are\\n'\n'concatenated.\\n'\n'\\n'\n'This operation can be customized using the special \"__add__()\" '\n'and\\n'\n'\"__radd__()\" methods.\\n'\n'\\n'\n'The \"-\" (subtraction) operator yields the difference of its '\n'arguments.\\n'\n'The numeric arguments are first converted to a common type.\\n'\n'\\n'\n'This operation can be customized using the special \"__sub__()\" '\n'method.\\n',\n'bitwise':'Binary bitwise operations\\n'\n'*************************\\n'\n'\\n'\n'Each of the three bitwise operations has a different priority '\n'level:\\n'\n'\\n'\n' and_expr ::= shift_expr | and_expr \"&\" shift_expr\\n'\n' xor_expr ::= and_expr | xor_expr \"^\" and_expr\\n'\n' or_expr ::= xor_expr | or_expr \"|\" xor_expr\\n'\n'\\n'\n'The \"&\" operator yields the bitwise AND of its arguments, which '\n'must\\n'\n'be integers or one of them must be a custom object overriding\\n'\n'\"__and__()\" or \"__rand__()\" special methods.\\n'\n'\\n'\n'The \"^\" operator yields the bitwise XOR (exclusive OR) of its\\n'\n'arguments, which must be integers or one of them must be a '\n'custom\\n'\n'object overriding \"__xor__()\" or \"__rxor__()\" special methods.\\n'\n'\\n'\n'The \"|\" operator yields the bitwise (inclusive) OR of its '\n'arguments,\\n'\n'which must be integers or one of them must be a custom object\\n'\n'overriding \"__or__()\" or \"__ror__()\" special methods.\\n',\n'bltin-code-objects':'Code Objects\\n'\n'************\\n'\n'\\n'\n'Code objects are used by the implementation to '\n'represent \u201cpseudo-\\n'\n'compiled\u201d executable Python code such as a function '\n'body. They differ\\n'\n'from function objects because they don\u2019t contain a '\n'reference to their\\n'\n'global execution environment. Code objects are '\n'returned by the built-\\n'\n'in \"compile()\" function and can be extracted from '\n'function objects\\n'\n'through their \"__code__\" attribute. See also the '\n'\"code\" module.\\n'\n'\\n'\n'Accessing \"__code__\" raises an auditing event '\n'\"object.__getattr__\"\\n'\n'with arguments \"obj\" and \"\"__code__\"\".\\n'\n'\\n'\n'A code object can be executed or evaluated by passing '\n'it (instead of a\\n'\n'source string) to the \"exec()\" or \"eval()\" built-in '\n'functions.\\n'\n'\\n'\n'See The standard type hierarchy for more '\n'information.\\n',\n'bltin-ellipsis-object':'The Ellipsis Object\\n'\n'*******************\\n'\n'\\n'\n'This object is commonly used by slicing (see '\n'Slicings). It supports\\n'\n'no special operations. There is exactly one '\n'ellipsis object, named\\n'\n'\"Ellipsis\" (a built-in name). \"type(Ellipsis)()\" '\n'produces the\\n'\n'\"Ellipsis\" singleton.\\n'\n'\\n'\n'It is written as \"Ellipsis\" or \"...\".\\n',\n'bltin-null-object':'The Null Object\\n'\n'***************\\n'\n'\\n'\n'This object is returned by functions that don\u2019t '\n'explicitly return a\\n'\n'value. It supports no special operations. There is '\n'exactly one null\\n'\n'object, named \"None\" (a built-in name). \"type(None)()\" '\n'produces the\\n'\n'same singleton.\\n'\n'\\n'\n'It is written as \"None\".\\n',\n'bltin-type-objects':'Type Objects\\n'\n'************\\n'\n'\\n'\n'Type objects represent the various object types. An '\n'object\u2019s type is\\n'\n'accessed by the built-in function \"type()\". There are '\n'no special\\n'\n'operations on types. The standard module \"types\" '\n'defines names for\\n'\n'all standard built-in types.\\n'\n'\\n'\n'Types are written like this: \"\".\\n',\n'booleans':'Boolean operations\\n'\n'******************\\n'\n'\\n'\n' or_test ::= and_test | or_test \"or\" and_test\\n'\n' and_test ::= not_test | and_test \"and\" not_test\\n'\n' not_test ::= comparison | \"not\" not_test\\n'\n'\\n'\n'In the context of Boolean operations, and also when expressions '\n'are\\n'\n'used by control flow statements, the following values are '\n'interpreted\\n'\n'as false: \"False\", \"None\", numeric zero of all types, and empty\\n'\n'strings and containers (including strings, tuples, lists,\\n'\n'dictionaries, sets and frozensets). All other values are '\n'interpreted\\n'\n'as true. User-defined objects can customize their truth value '\n'by\\n'\n'providing a \"__bool__()\" method.\\n'\n'\\n'\n'The operator \"not\" yields \"True\" if its argument is false, '\n'\"False\"\\n'\n'otherwise.\\n'\n'\\n'\n'The expression \"x and y\" first evaluates *x*; if *x* is false, '\n'its\\n'\n'value is returned; otherwise, *y* is evaluated and the resulting '\n'value\\n'\n'is returned.\\n'\n'\\n'\n'The expression \"x or y\" first evaluates *x*; if *x* is true, its '\n'value\\n'\n'is returned; otherwise, *y* is evaluated and the resulting value '\n'is\\n'\n'returned.\\n'\n'\\n'\n'Note that neither \"and\" nor \"or\" restrict the value and type '\n'they\\n'\n'return to \"False\" and \"True\", but rather return the last '\n'evaluated\\n'\n'argument. This is sometimes useful, e.g., if \"s\" is a string '\n'that\\n'\n'should be replaced by a default value if it is empty, the '\n'expression\\n'\n'\"s or \\'foo\\'\" yields the desired value. Because \"not\" has to '\n'create a\\n'\n'new value, it returns a boolean value regardless of the type of '\n'its\\n'\n'argument (for example, \"not \\'foo\\'\" produces \"False\" rather '\n'than \"\\'\\'\".)\\n',\n'break':'The \"break\" statement\\n'\n'*********************\\n'\n'\\n'\n' break_stmt ::= \"break\"\\n'\n'\\n'\n'\"break\" may only occur syntactically nested in a \"for\" or \"while\"\\n'\n'loop, but not nested in a function or class definition within that\\n'\n'loop.\\n'\n'\\n'\n'It terminates the nearest enclosing loop, skipping the optional '\n'\"else\"\\n'\n'clause if the loop has one.\\n'\n'\\n'\n'If a \"for\" loop is terminated by \"break\", the loop control target\\n'\n'keeps its current value.\\n'\n'\\n'\n'When \"break\" passes control out of a \"try\" statement with a '\n'\"finally\"\\n'\n'clause, that \"finally\" clause is executed before really leaving '\n'the\\n'\n'loop.\\n',\n'callable-types':'Emulating callable objects\\n'\n'**************************\\n'\n'\\n'\n'object.__call__(self[, args...])\\n'\n'\\n'\n' Called when the instance is \u201ccalled\u201d as a function; if '\n'this method\\n'\n' is defined, \"x(arg1, arg2, ...)\" roughly translates to\\n'\n' \"type(x).__call__(x, arg1, ...)\".\\n',\n'calls':'Calls\\n'\n'*****\\n'\n'\\n'\n'A call calls a callable object (e.g., a *function*) with a '\n'possibly\\n'\n'empty series of *arguments*:\\n'\n'\\n'\n' call ::= primary \"(\" [argument_list [\",\"] | '\n'comprehension] \")\"\\n'\n' argument_list ::= positional_arguments [\",\" '\n'starred_and_keywords]\\n'\n' [\",\" keywords_arguments]\\n'\n' | starred_and_keywords [\",\" '\n'keywords_arguments]\\n'\n' | keywords_arguments\\n'\n' positional_arguments ::= positional_item (\",\" positional_item)*\\n'\n' positional_item ::= assignment_expression | \"*\" expression\\n'\n' starred_and_keywords ::= (\"*\" expression | keyword_item)\\n'\n' (\",\" \"*\" expression | \",\" '\n'keyword_item)*\\n'\n' keywords_arguments ::= (keyword_item | \"**\" expression)\\n'\n' (\",\" keyword_item | \",\" \"**\" '\n'expression)*\\n'\n' keyword_item ::= identifier \"=\" expression\\n'\n'\\n'\n'An optional trailing comma may be present after the positional and\\n'\n'keyword arguments but does not affect the semantics.\\n'\n'\\n'\n'The primary must evaluate to a callable object (user-defined\\n'\n'functions, built-in functions, methods of built-in objects, class\\n'\n'objects, methods of class instances, and all objects having a\\n'\n'\"__call__()\" method are callable). All argument expressions are\\n'\n'evaluated before the call is attempted. Please refer to section\\n'\n'Function definitions for the syntax of formal *parameter* lists.\\n'\n'\\n'\n'If keyword arguments are present, they are first converted to\\n'\n'positional arguments, as follows. First, a list of unfilled slots '\n'is\\n'\n'created for the formal parameters. If there are N positional\\n'\n'arguments, they are placed in the first N slots. Next, for each\\n'\n'keyword argument, the identifier is used to determine the\\n'\n'corresponding slot (if the identifier is the same as the first '\n'formal\\n'\n'parameter name, the first slot is used, and so on). If the slot '\n'is\\n'\n'already filled, a \"TypeError\" exception is raised. Otherwise, the\\n'\n'value of the argument is placed in the slot, filling it (even if '\n'the\\n'\n'expression is \"None\", it fills the slot). When all arguments have\\n'\n'been processed, the slots that are still unfilled are filled with '\n'the\\n'\n'corresponding default value from the function definition. '\n'(Default\\n'\n'values are calculated, once, when the function is defined; thus, a\\n'\n'mutable object such as a list or dictionary used as default value '\n'will\\n'\n'be shared by all calls that don\u2019t specify an argument value for '\n'the\\n'\n'corresponding slot; this should usually be avoided.) If there are '\n'any\\n'\n'unfilled slots for which no default value is specified, a '\n'\"TypeError\"\\n'\n'exception is raised. Otherwise, the list of filled slots is used '\n'as\\n'\n'the argument list for the call.\\n'\n'\\n'\n'**CPython implementation detail:** An implementation may provide\\n'\n'built-in functions whose positional parameters do not have names, '\n'even\\n'\n'if they are \u2018named\u2019 for the purpose of documentation, and which\\n'\n'therefore cannot be supplied by keyword. In CPython, this is the '\n'case\\n'\n'for functions implemented in C that use \"PyArg_ParseTuple()\" to '\n'parse\\n'\n'their arguments.\\n'\n'\\n'\n'If there are more positional arguments than there are formal '\n'parameter\\n'\n'slots, a \"TypeError\" exception is raised, unless a formal '\n'parameter\\n'\n'using the syntax \"*identifier\" is present; in this case, that '\n'formal\\n'\n'parameter receives a tuple containing the excess positional '\n'arguments\\n'\n'(or an empty tuple if there were no excess positional arguments).\\n'\n'\\n'\n'If any keyword argument does not correspond to a formal parameter\\n'\n'name, a \"TypeError\" exception is raised, unless a formal parameter\\n'\n'using the syntax \"**identifier\" is present; in this case, that '\n'formal\\n'\n'parameter receives a dictionary containing the excess keyword\\n'\n'arguments (using the keywords as keys and the argument values as\\n'\n'corresponding values), or a (new) empty dictionary if there were '\n'no\\n'\n'excess keyword arguments.\\n'\n'\\n'\n'If the syntax \"*expression\" appears in the function call, '\n'\"expression\"\\n'\n'must evaluate to an *iterable*. Elements from these iterables are\\n'\n'treated as if they were additional positional arguments. For the '\n'call\\n'\n'\"f(x1, x2, *y, x3, x4)\", if *y* evaluates to a sequence *y1*, \u2026, '\n'*yM*,\\n'\n'this is equivalent to a call with M+4 positional arguments *x1*, '\n'*x2*,\\n'\n'*y1*, \u2026, *yM*, *x3*, *x4*.\\n'\n'\\n'\n'A consequence of this is that although the \"*expression\" syntax '\n'may\\n'\n'appear *after* explicit keyword arguments, it is processed '\n'*before*\\n'\n'the keyword arguments (and any \"**expression\" arguments \u2013 see '\n'below).\\n'\n'So:\\n'\n'\\n'\n' >>> def f(a, b):\\n'\n' ... print(a, b)\\n'\n' ...\\n'\n' >>> f(b=1, *(2,))\\n'\n' 2 1\\n'\n' >>> f(a=1, *(2,))\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 1, in \\n'\n\" TypeError: f() got multiple values for keyword argument 'a'\\n\"\n' >>> f(1, *(2,))\\n'\n' 1 2\\n'\n'\\n'\n'It is unusual for both keyword arguments and the \"*expression\" '\n'syntax\\n'\n'to be used in the same call, so in practice this confusion does '\n'not\\n'\n'arise.\\n'\n'\\n'\n'If the syntax \"**expression\" appears in the function call,\\n'\n'\"expression\" must evaluate to a *mapping*, the contents of which '\n'are\\n'\n'treated as additional keyword arguments. If a keyword is already\\n'\n'present (as an explicit keyword argument, or from another '\n'unpacking),\\n'\n'a \"TypeError\" exception is raised.\\n'\n'\\n'\n'Formal parameters using the syntax \"*identifier\" or \"**identifier\"\\n'\n'cannot be used as positional argument slots or as keyword argument\\n'\n'names.\\n'\n'\\n'\n'Changed in version 3.5: Function calls accept any number of \"*\" '\n'and\\n'\n'\"**\" unpackings, positional arguments may follow iterable '\n'unpackings\\n'\n'(\"*\"), and keyword arguments may follow dictionary unpackings '\n'(\"**\").\\n'\n'Originally proposed by **PEP 448**.\\n'\n'\\n'\n'A call always returns some value, possibly \"None\", unless it raises '\n'an\\n'\n'exception. How this value is computed depends on the type of the\\n'\n'callable object.\\n'\n'\\n'\n'If it is\u2014\\n'\n'\\n'\n'a user-defined function:\\n'\n' The code block for the function is executed, passing it the\\n'\n' argument list. The first thing the code block will do is bind '\n'the\\n'\n' formal parameters to the arguments; this is described in '\n'section\\n'\n' Function definitions. When the code block executes a \"return\"\\n'\n' statement, this specifies the return value of the function '\n'call.\\n'\n'\\n'\n'a built-in function or method:\\n'\n' The result is up to the interpreter; see Built-in Functions for '\n'the\\n'\n' descriptions of built-in functions and methods.\\n'\n'\\n'\n'a class object:\\n'\n' A new instance of that class is returned.\\n'\n'\\n'\n'a class instance method:\\n'\n' The corresponding user-defined function is called, with an '\n'argument\\n'\n' list that is one longer than the argument list of the call: the\\n'\n' instance becomes the first argument.\\n'\n'\\n'\n'a class instance:\\n'\n' The class must define a \"__call__()\" method; the effect is then '\n'the\\n'\n' same as if that method was called.\\n',\n'class':'Class definitions\\n'\n'*****************\\n'\n'\\n'\n'A class definition defines a class object (see section The '\n'standard\\n'\n'type hierarchy):\\n'\n'\\n'\n' classdef ::= [decorators] \"class\" classname [inheritance] \":\" '\n'suite\\n'\n' inheritance ::= \"(\" [argument_list] \")\"\\n'\n' classname ::= identifier\\n'\n'\\n'\n'A class definition is an executable statement. The inheritance '\n'list\\n'\n'usually gives a list of base classes (see Metaclasses for more\\n'\n'advanced uses), so each item in the list should evaluate to a '\n'class\\n'\n'object which allows subclassing. Classes without an inheritance '\n'list\\n'\n'inherit, by default, from the base class \"object\"; hence,\\n'\n'\\n'\n' class Foo:\\n'\n' pass\\n'\n'\\n'\n'is equivalent to\\n'\n'\\n'\n' class Foo(object):\\n'\n' pass\\n'\n'\\n'\n'The class\u2019s suite is then executed in a new execution frame (see\\n'\n'Naming and binding), using a newly created local namespace and the\\n'\n'original global namespace. (Usually, the suite contains mostly\\n'\n'function definitions.) When the class\u2019s suite finishes execution, '\n'its\\n'\n'execution frame is discarded but its local namespace is saved. [5] '\n'A\\n'\n'class object is then created using the inheritance list for the '\n'base\\n'\n'classes and the saved local namespace for the attribute '\n'dictionary.\\n'\n'The class name is bound to this class object in the original local\\n'\n'namespace.\\n'\n'\\n'\n'The order in which attributes are defined in the class body is\\n'\n'preserved in the new class\u2019s \"__dict__\". Note that this is '\n'reliable\\n'\n'only right after the class is created and only for classes that '\n'were\\n'\n'defined using the definition syntax.\\n'\n'\\n'\n'Class creation can be customized heavily using metaclasses.\\n'\n'\\n'\n'Classes can also be decorated: just like when decorating '\n'functions,\\n'\n'\\n'\n' @f1(arg)\\n'\n' @f2\\n'\n' class Foo: pass\\n'\n'\\n'\n'is roughly equivalent to\\n'\n'\\n'\n' class Foo: pass\\n'\n' Foo = f1(arg)(f2(Foo))\\n'\n'\\n'\n'The evaluation rules for the decorator expressions are the same as '\n'for\\n'\n'function decorators. The result is then bound to the class name.\\n'\n'\\n'\n'Changed in version 3.9: Classes may be decorated with any valid\\n'\n'\"assignment_expression\". Previously, the grammar was much more\\n'\n'restrictive; see **PEP 614** for details.\\n'\n'\\n'\n'**Programmer\u2019s note:** Variables defined in the class definition '\n'are\\n'\n'class attributes; they are shared by instances. Instance '\n'attributes\\n'\n'can be set in a method with \"self.name = value\". Both class and\\n'\n'instance attributes are accessible through the notation '\n'\u201c\"self.name\"\u201d,\\n'\n'and an instance attribute hides a class attribute with the same '\n'name\\n'\n'when accessed in this way. Class attributes can be used as '\n'defaults\\n'\n'for instance attributes, but using mutable values there can lead '\n'to\\n'\n'unexpected results. Descriptors can be used to create instance\\n'\n'variables with different implementation details.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3115** - Metaclasses in Python 3000\\n'\n' The proposal that changed the declaration of metaclasses to '\n'the\\n'\n' current syntax, and the semantics for how classes with\\n'\n' metaclasses are constructed.\\n'\n'\\n'\n' **PEP 3129** - Class Decorators\\n'\n' The proposal that added class decorators. Function and '\n'method\\n'\n' decorators were introduced in **PEP 318**.\\n',\n'comparisons':'Comparisons\\n'\n'***********\\n'\n'\\n'\n'Unlike C, all comparison operations in Python have the same '\n'priority,\\n'\n'which is lower than that of any arithmetic, shifting or '\n'bitwise\\n'\n'operation. Also unlike C, expressions like \"a < b < c\" have '\n'the\\n'\n'interpretation that is conventional in mathematics:\\n'\n'\\n'\n' comparison ::= or_expr (comp_operator or_expr)*\\n'\n' comp_operator ::= \"<\" | \">\" | \"==\" | \">=\" | \"<=\" | \"!=\"\\n'\n' | \"is\" [\"not\"] | [\"not\"] \"in\"\\n'\n'\\n'\n'Comparisons yield boolean values: \"True\" or \"False\". Custom '\n'*rich\\n'\n'comparison methods* may return non-boolean values. In this '\n'case Python\\n'\n'will call \"bool()\" on such value in boolean contexts.\\n'\n'\\n'\n'Comparisons can be chained arbitrarily, e.g., \"x < y <= z\" '\n'is\\n'\n'equivalent to \"x < y and y <= z\", except that \"y\" is '\n'evaluated only\\n'\n'once (but in both cases \"z\" is not evaluated at all when \"x < '\n'y\" is\\n'\n'found to be false).\\n'\n'\\n'\n'Formally, if *a*, *b*, *c*, \u2026, *y*, *z* are expressions and '\n'*op1*,\\n'\n'*op2*, \u2026, *opN* are comparison operators, then \"a op1 b op2 c '\n'... y\\n'\n'opN z\" is equivalent to \"a op1 b and b op2 c and ... y opN '\n'z\", except\\n'\n'that each expression is evaluated at most once.\\n'\n'\\n'\n'Note that \"a op1 b op2 c\" doesn\u2019t imply any kind of '\n'comparison between\\n'\n'*a* and *c*, so that, e.g., \"x < y > z\" is perfectly legal '\n'(though\\n'\n'perhaps not pretty).\\n'\n'\\n'\n'\\n'\n'Value comparisons\\n'\n'=================\\n'\n'\\n'\n'The operators \"<\", \">\", \"==\", \">=\", \"<=\", and \"!=\" compare '\n'the values\\n'\n'of two objects. The objects do not need to have the same '\n'type.\\n'\n'\\n'\n'Chapter Objects, values and types states that objects have a '\n'value (in\\n'\n'addition to type and identity). The value of an object is a '\n'rather\\n'\n'abstract notion in Python: For example, there is no canonical '\n'access\\n'\n'method for an object\u2019s value. Also, there is no requirement '\n'that the\\n'\n'value of an object should be constructed in a particular way, '\n'e.g.\\n'\n'comprised of all its data attributes. Comparison operators '\n'implement a\\n'\n'particular notion of what the value of an object is. One can '\n'think of\\n'\n'them as defining the value of an object indirectly, by means '\n'of their\\n'\n'comparison implementation.\\n'\n'\\n'\n'Because all types are (direct or indirect) subtypes of '\n'\"object\", they\\n'\n'inherit the default comparison behavior from \"object\". Types '\n'can\\n'\n'customize their comparison behavior by implementing *rich '\n'comparison\\n'\n'methods* like \"__lt__()\", described in Basic customization.\\n'\n'\\n'\n'The default behavior for equality comparison (\"==\" and \"!=\") '\n'is based\\n'\n'on the identity of the objects. Hence, equality comparison '\n'of\\n'\n'instances with the same identity results in equality, and '\n'equality\\n'\n'comparison of instances with different identities results in\\n'\n'inequality. A motivation for this default behavior is the '\n'desire that\\n'\n'all objects should be reflexive (i.e. \"x is y\" implies \"x == '\n'y\").\\n'\n'\\n'\n'A default order comparison (\"<\", \">\", \"<=\", and \">=\") is not '\n'provided;\\n'\n'an attempt raises \"TypeError\". A motivation for this default '\n'behavior\\n'\n'is the lack of a similar invariant as for equality.\\n'\n'\\n'\n'The behavior of the default equality comparison, that '\n'instances with\\n'\n'different identities are always unequal, may be in contrast '\n'to what\\n'\n'types will need that have a sensible definition of object '\n'value and\\n'\n'value-based equality. Such types will need to customize '\n'their\\n'\n'comparison behavior, and in fact, a number of built-in types '\n'have done\\n'\n'that.\\n'\n'\\n'\n'The following list describes the comparison behavior of the '\n'most\\n'\n'important built-in types.\\n'\n'\\n'\n'* Numbers of built-in numeric types (Numeric Types \u2014 int, '\n'float,\\n'\n' complex) and of the standard library types '\n'\"fractions.Fraction\" and\\n'\n' \"decimal.Decimal\" can be compared within and across their '\n'types,\\n'\n' with the restriction that complex numbers do not support '\n'order\\n'\n' comparison. Within the limits of the types involved, they '\n'compare\\n'\n' mathematically (algorithmically) correct without loss of '\n'precision.\\n'\n'\\n'\n' The not-a-number values \"float(\\'NaN\\')\" and '\n'\"decimal.Decimal(\\'NaN\\')\"\\n'\n' are special. Any ordered comparison of a number to a '\n'not-a-number\\n'\n' value is false. A counter-intuitive implication is that '\n'not-a-number\\n'\n' values are not equal to themselves. For example, if \"x =\\n'\n' float(\\'NaN\\')\", \"3 < x\", \"x < 3\" and \"x == x\" are all '\n'false, while \"x\\n'\n' != x\" is true. This behavior is compliant with IEEE 754.\\n'\n'\\n'\n'* \"None\" and \"NotImplemented\" are singletons. **PEP 8** '\n'advises that\\n'\n' comparisons for singletons should always be done with \"is\" '\n'or \"is\\n'\n' not\", never the equality operators.\\n'\n'\\n'\n'* Binary sequences (instances of \"bytes\" or \"bytearray\") can '\n'be\\n'\n' compared within and across their types. They compare\\n'\n' lexicographically using the numeric values of their '\n'elements.\\n'\n'\\n'\n'* Strings (instances of \"str\") compare lexicographically '\n'using the\\n'\n' numerical Unicode code points (the result of the built-in '\n'function\\n'\n' \"ord()\") of their characters. [3]\\n'\n'\\n'\n' Strings and binary sequences cannot be directly compared.\\n'\n'\\n'\n'* Sequences (instances of \"tuple\", \"list\", or \"range\") can be '\n'compared\\n'\n' only within each of their types, with the restriction that '\n'ranges do\\n'\n' not support order comparison. Equality comparison across '\n'these\\n'\n' types results in inequality, and ordering comparison across '\n'these\\n'\n' types raises \"TypeError\".\\n'\n'\\n'\n' Sequences compare lexicographically using comparison of\\n'\n' corresponding elements. The built-in containers typically '\n'assume\\n'\n' identical objects are equal to themselves. That lets them '\n'bypass\\n'\n' equality tests for identical objects to improve performance '\n'and to\\n'\n' maintain their internal invariants.\\n'\n'\\n'\n' Lexicographical comparison between built-in collections '\n'works as\\n'\n' follows:\\n'\n'\\n'\n' * For two collections to compare equal, they must be of the '\n'same\\n'\n' type, have the same length, and each pair of '\n'corresponding\\n'\n' elements must compare equal (for example, \"[1,2] == '\n'(1,2)\" is\\n'\n' false because the type is not the same).\\n'\n'\\n'\n' * Collections that support order comparison are ordered the '\n'same as\\n'\n' their first unequal elements (for example, \"[1,2,x] <= '\n'[1,2,y]\"\\n'\n' has the same value as \"x <= y\"). If a corresponding '\n'element does\\n'\n' not exist, the shorter collection is ordered first (for '\n'example,\\n'\n' \"[1,2] < [1,2,3]\" is true).\\n'\n'\\n'\n'* Mappings (instances of \"dict\") compare equal if and only if '\n'they\\n'\n' have equal *(key, value)* pairs. Equality comparison of the '\n'keys and\\n'\n' values enforces reflexivity.\\n'\n'\\n'\n' Order comparisons (\"<\", \">\", \"<=\", and \">=\") raise '\n'\"TypeError\".\\n'\n'\\n'\n'* Sets (instances of \"set\" or \"frozenset\") can be compared '\n'within and\\n'\n' across their types.\\n'\n'\\n'\n' They define order comparison operators to mean subset and '\n'superset\\n'\n' tests. Those relations do not define total orderings (for '\n'example,\\n'\n' the two sets \"{1,2}\" and \"{2,3}\" are not equal, nor subsets '\n'of one\\n'\n' another, nor supersets of one another). Accordingly, sets '\n'are not\\n'\n' appropriate arguments for functions which depend on total '\n'ordering\\n'\n' (for example, \"min()\", \"max()\", and \"sorted()\" produce '\n'undefined\\n'\n' results given a list of sets as inputs).\\n'\n'\\n'\n' Comparison of sets enforces reflexivity of its elements.\\n'\n'\\n'\n'* Most other built-in types have no comparison methods '\n'implemented, so\\n'\n' they inherit the default comparison behavior.\\n'\n'\\n'\n'User-defined classes that customize their comparison behavior '\n'should\\n'\n'follow some consistency rules, if possible:\\n'\n'\\n'\n'* Equality comparison should be reflexive. In other words, '\n'identical\\n'\n' objects should compare equal:\\n'\n'\\n'\n' \"x is y\" implies \"x == y\"\\n'\n'\\n'\n'* Comparison should be symmetric. In other words, the '\n'following\\n'\n' expressions should have the same result:\\n'\n'\\n'\n' \"x == y\" and \"y == x\"\\n'\n'\\n'\n' \"x != y\" and \"y != x\"\\n'\n'\\n'\n' \"x < y\" and \"y > x\"\\n'\n'\\n'\n' \"x <= y\" and \"y >= x\"\\n'\n'\\n'\n'* Comparison should be transitive. The following '\n'(non-exhaustive)\\n'\n' examples illustrate that:\\n'\n'\\n'\n' \"x > y and y > z\" implies \"x > z\"\\n'\n'\\n'\n' \"x < y and y <= z\" implies \"x < z\"\\n'\n'\\n'\n'* Inverse comparison should result in the boolean negation. '\n'In other\\n'\n' words, the following expressions should have the same '\n'result:\\n'\n'\\n'\n' \"x == y\" and \"not x != y\"\\n'\n'\\n'\n' \"x < y\" and \"not x >= y\" (for total ordering)\\n'\n'\\n'\n' \"x > y\" and \"not x <= y\" (for total ordering)\\n'\n'\\n'\n' The last two expressions apply to totally ordered '\n'collections (e.g.\\n'\n' to sequences, but not to sets or mappings). See also the\\n'\n' \"total_ordering()\" decorator.\\n'\n'\\n'\n'* The \"hash()\" result should be consistent with equality. '\n'Objects that\\n'\n' are equal should either have the same hash value, or be '\n'marked as\\n'\n' unhashable.\\n'\n'\\n'\n'Python does not enforce these consistency rules. In fact, '\n'the\\n'\n'not-a-number values are an example for not following these '\n'rules.\\n'\n'\\n'\n'\\n'\n'Membership test operations\\n'\n'==========================\\n'\n'\\n'\n'The operators \"in\" and \"not in\" test for membership. \"x in '\n's\"\\n'\n'evaluates to \"True\" if *x* is a member of *s*, and \"False\" '\n'otherwise.\\n'\n'\"x not in s\" returns the negation of \"x in s\". All built-in '\n'sequences\\n'\n'and set types support this as well as dictionary, for which '\n'\"in\" tests\\n'\n'whether the dictionary has a given key. For container types '\n'such as\\n'\n'list, tuple, set, frozenset, dict, or collections.deque, the\\n'\n'expression \"x in y\" is equivalent to \"any(x is e or x == e '\n'for e in\\n'\n'y)\".\\n'\n'\\n'\n'For the string and bytes types, \"x in y\" is \"True\" if and '\n'only if *x*\\n'\n'is a substring of *y*. An equivalent test is \"y.find(x) != '\n'-1\".\\n'\n'Empty strings are always considered to be a substring of any '\n'other\\n'\n'string, so \"\"\" in \"abc\"\" will return \"True\".\\n'\n'\\n'\n'For user-defined classes which define the \"__contains__()\" '\n'method, \"x\\n'\n'in y\" returns \"True\" if \"y.__contains__(x)\" returns a true '\n'value, and\\n'\n'\"False\" otherwise.\\n'\n'\\n'\n'For user-defined classes which do not define \"__contains__()\" '\n'but do\\n'\n'define \"__iter__()\", \"x in y\" is \"True\" if some value \"z\", '\n'for which\\n'\n'the expression \"x is z or x == z\" is true, is produced while '\n'iterating\\n'\n'over \"y\". If an exception is raised during the iteration, it '\n'is as if\\n'\n'\"in\" raised that exception.\\n'\n'\\n'\n'Lastly, the old-style iteration protocol is tried: if a class '\n'defines\\n'\n'\"__getitem__()\", \"x in y\" is \"True\" if and only if there is a '\n'non-\\n'\n'negative integer index *i* such that \"x is y[i] or x == '\n'y[i]\", and no\\n'\n'lower integer index raises the \"IndexError\" exception. (If '\n'any other\\n'\n'exception is raised, it is as if \"in\" raised that '\n'exception).\\n'\n'\\n'\n'The operator \"not in\" is defined to have the inverse truth '\n'value of\\n'\n'\"in\".\\n'\n'\\n'\n'\\n'\n'Identity comparisons\\n'\n'====================\\n'\n'\\n'\n'The operators \"is\" and \"is not\" test for an object\u2019s '\n'identity: \"x is\\n'\n'y\" is true if and only if *x* and *y* are the same object. '\n'An\\n'\n'Object\u2019s identity is determined using the \"id()\" function. '\n'\"x is not\\n'\n'y\" yields the inverse truth value. [4]\\n',\n'compound':'Compound statements\\n'\n'*******************\\n'\n'\\n'\n'Compound statements contain (groups of) other statements; they '\n'affect\\n'\n'or control the execution of those other statements in some way. '\n'In\\n'\n'general, compound statements span multiple lines, although in '\n'simple\\n'\n'incarnations a whole compound statement may be contained in one '\n'line.\\n'\n'\\n'\n'The \"if\", \"while\" and \"for\" statements implement traditional '\n'control\\n'\n'flow constructs. \"try\" specifies exception handlers and/or '\n'cleanup\\n'\n'code for a group of statements, while the \"with\" statement '\n'allows the\\n'\n'execution of initialization and finalization code around a block '\n'of\\n'\n'code. Function and class definitions are also syntactically '\n'compound\\n'\n'statements.\\n'\n'\\n'\n'A compound statement consists of one or more \u2018clauses.\u2019 A '\n'clause\\n'\n'consists of a header and a \u2018suite.\u2019 The clause headers of a\\n'\n'particular compound statement are all at the same indentation '\n'level.\\n'\n'Each clause header begins with a uniquely identifying keyword '\n'and ends\\n'\n'with a colon. A suite is a group of statements controlled by a\\n'\n'clause. A suite can be one or more semicolon-separated simple\\n'\n'statements on the same line as the header, following the '\n'header\u2019s\\n'\n'colon, or it can be one or more indented statements on '\n'subsequent\\n'\n'lines. Only the latter form of a suite can contain nested '\n'compound\\n'\n'statements; the following is illegal, mostly because it wouldn\u2019t '\n'be\\n'\n'clear to which \"if\" clause a following \"else\" clause would '\n'belong:\\n'\n'\\n'\n' if test1: if test2: print(x)\\n'\n'\\n'\n'Also note that the semicolon binds tighter than the colon in '\n'this\\n'\n'context, so that in the following example, either all or none of '\n'the\\n'\n'\"print()\" calls are executed:\\n'\n'\\n'\n' if x < y < z: print(x); print(y); print(z)\\n'\n'\\n'\n'Summarizing:\\n'\n'\\n'\n' compound_stmt ::= if_stmt\\n'\n' | while_stmt\\n'\n' | for_stmt\\n'\n' | try_stmt\\n'\n' | with_stmt\\n'\n' | match_stmt\\n'\n' | funcdef\\n'\n' | classdef\\n'\n' | async_with_stmt\\n'\n' | async_for_stmt\\n'\n' | async_funcdef\\n'\n' suite ::= stmt_list NEWLINE | NEWLINE INDENT '\n'statement+ DEDENT\\n'\n' statement ::= stmt_list NEWLINE | compound_stmt\\n'\n' stmt_list ::= simple_stmt (\";\" simple_stmt)* [\";\"]\\n'\n'\\n'\n'Note that statements always end in a \"NEWLINE\" possibly followed '\n'by a\\n'\n'\"DEDENT\". Also note that optional continuation clauses always '\n'begin\\n'\n'with a keyword that cannot start a statement, thus there are no\\n'\n'ambiguities (the \u2018dangling \"else\"\u2019 problem is solved in Python '\n'by\\n'\n'requiring nested \"if\" statements to be indented).\\n'\n'\\n'\n'The formatting of the grammar rules in the following sections '\n'places\\n'\n'each clause on a separate line for clarity.\\n'\n'\\n'\n'\\n'\n'The \"if\" statement\\n'\n'==================\\n'\n'\\n'\n'The \"if\" statement is used for conditional execution:\\n'\n'\\n'\n' if_stmt ::= \"if\" assignment_expression \":\" suite\\n'\n' (\"elif\" assignment_expression \":\" suite)*\\n'\n' [\"else\" \":\" suite]\\n'\n'\\n'\n'It selects exactly one of the suites by evaluating the '\n'expressions one\\n'\n'by one until one is found to be true (see section Boolean '\n'operations\\n'\n'for the definition of true and false); then that suite is '\n'executed\\n'\n'(and no other part of the \"if\" statement is executed or '\n'evaluated).\\n'\n'If all expressions are false, the suite of the \"else\" clause, '\n'if\\n'\n'present, is executed.\\n'\n'\\n'\n'\\n'\n'The \"while\" statement\\n'\n'=====================\\n'\n'\\n'\n'The \"while\" statement is used for repeated execution as long as '\n'an\\n'\n'expression is true:\\n'\n'\\n'\n' while_stmt ::= \"while\" assignment_expression \":\" suite\\n'\n' [\"else\" \":\" suite]\\n'\n'\\n'\n'This repeatedly tests the expression and, if it is true, '\n'executes the\\n'\n'first suite; if the expression is false (which may be the first '\n'time\\n'\n'it is tested) the suite of the \"else\" clause, if present, is '\n'executed\\n'\n'and the loop terminates.\\n'\n'\\n'\n'A \"break\" statement executed in the first suite terminates the '\n'loop\\n'\n'without executing the \"else\" clause\u2019s suite. A \"continue\" '\n'statement\\n'\n'executed in the first suite skips the rest of the suite and goes '\n'back\\n'\n'to testing the expression.\\n'\n'\\n'\n'\\n'\n'The \"for\" statement\\n'\n'===================\\n'\n'\\n'\n'The \"for\" statement is used to iterate over the elements of a '\n'sequence\\n'\n'(such as a string, tuple or list) or other iterable object:\\n'\n'\\n'\n' for_stmt ::= \"for\" target_list \"in\" expression_list \":\" '\n'suite\\n'\n' [\"else\" \":\" suite]\\n'\n'\\n'\n'The expression list is evaluated once; it should yield an '\n'iterable\\n'\n'object. An iterator is created for the result of the\\n'\n'\"expression_list\". The suite is then executed once for each '\n'item\\n'\n'provided by the iterator, in the order returned by the '\n'iterator. Each\\n'\n'item in turn is assigned to the target list using the standard '\n'rules\\n'\n'for assignments (see Assignment statements), and then the suite '\n'is\\n'\n'executed. When the items are exhausted (which is immediately '\n'when the\\n'\n'sequence is empty or an iterator raises a \"StopIteration\" '\n'exception),\\n'\n'the suite in the \"else\" clause, if present, is executed, and the '\n'loop\\n'\n'terminates.\\n'\n'\\n'\n'A \"break\" statement executed in the first suite terminates the '\n'loop\\n'\n'without executing the \"else\" clause\u2019s suite. A \"continue\" '\n'statement\\n'\n'executed in the first suite skips the rest of the suite and '\n'continues\\n'\n'with the next item, or with the \"else\" clause if there is no '\n'next\\n'\n'item.\\n'\n'\\n'\n'The for-loop makes assignments to the variables in the target '\n'list.\\n'\n'This overwrites all previous assignments to those variables '\n'including\\n'\n'those made in the suite of the for-loop:\\n'\n'\\n'\n' for i in range(10):\\n'\n' print(i)\\n'\n' i = 5 # this will not affect the for-loop\\n'\n' # because i will be overwritten with '\n'the next\\n'\n' # index in the range\\n'\n'\\n'\n'Names in the target list are not deleted when the loop is '\n'finished,\\n'\n'but if the sequence is empty, they will not have been assigned '\n'to at\\n'\n'all by the loop. Hint: the built-in function \"range()\" returns '\n'an\\n'\n'iterator of integers suitable to emulate the effect of Pascal\u2019s '\n'\"for i\\n'\n':= a to b do\"; e.g., \"list(range(3))\" returns the list \"[0, 1, '\n'2]\".\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' There is a subtlety when the sequence is being modified by the '\n'loop\\n'\n' (this can only occur for mutable sequences, e.g. lists). An\\n'\n' internal counter is used to keep track of which item is used '\n'next,\\n'\n' and this is incremented on each iteration. When this counter '\n'has\\n'\n' reached the length of the sequence the loop terminates. This '\n'means\\n'\n' that if the suite deletes the current (or a previous) item '\n'from the\\n'\n' sequence, the next item will be skipped (since it gets the '\n'index of\\n'\n' the current item which has already been treated). Likewise, '\n'if the\\n'\n' suite inserts an item in the sequence before the current item, '\n'the\\n'\n' current item will be treated again the next time through the '\n'loop.\\n'\n' This can lead to nasty bugs that can be avoided by making a\\n'\n' temporary copy using a slice of the whole sequence, e.g.,\\n'\n'\\n'\n' for x in a[:]:\\n'\n' if x < 0: a.remove(x)\\n'\n'\\n'\n'\\n'\n'The \"try\" statement\\n'\n'===================\\n'\n'\\n'\n'The \"try\" statement specifies exception handlers and/or cleanup '\n'code\\n'\n'for a group of statements:\\n'\n'\\n'\n' try_stmt ::= try1_stmt | try2_stmt\\n'\n' try1_stmt ::= \"try\" \":\" suite\\n'\n' (\"except\" [expression [\"as\" identifier]] \":\" '\n'suite)+\\n'\n' [\"else\" \":\" suite]\\n'\n' [\"finally\" \":\" suite]\\n'\n' try2_stmt ::= \"try\" \":\" suite\\n'\n' \"finally\" \":\" suite\\n'\n'\\n'\n'The \"except\" clause(s) specify one or more exception handlers. '\n'When no\\n'\n'exception occurs in the \"try\" clause, no exception handler is\\n'\n'executed. When an exception occurs in the \"try\" suite, a search '\n'for an\\n'\n'exception handler is started. This search inspects the except '\n'clauses\\n'\n'in turn until one is found that matches the exception. An '\n'expression-\\n'\n'less except clause, if present, must be last; it matches any\\n'\n'exception. For an except clause with an expression, that '\n'expression\\n'\n'is evaluated, and the clause matches the exception if the '\n'resulting\\n'\n'object is \u201ccompatible\u201d with the exception. An object is '\n'compatible\\n'\n'with an exception if it is the class or a base class of the '\n'exception\\n'\n'object, or a tuple containing an item that is the class or a '\n'base\\n'\n'class of the exception object.\\n'\n'\\n'\n'If no except clause matches the exception, the search for an '\n'exception\\n'\n'handler continues in the surrounding code and on the invocation '\n'stack.\\n'\n'[1]\\n'\n'\\n'\n'If the evaluation of an expression in the header of an except '\n'clause\\n'\n'raises an exception, the original search for a handler is '\n'canceled and\\n'\n'a search starts for the new exception in the surrounding code '\n'and on\\n'\n'the call stack (it is treated as if the entire \"try\" statement '\n'raised\\n'\n'the exception).\\n'\n'\\n'\n'When a matching except clause is found, the exception is '\n'assigned to\\n'\n'the target specified after the \"as\" keyword in that except '\n'clause, if\\n'\n'present, and the except clause\u2019s suite is executed. All except\\n'\n'clauses must have an executable block. When the end of this '\n'block is\\n'\n'reached, execution continues normally after the entire try '\n'statement.\\n'\n'(This means that if two nested handlers exist for the same '\n'exception,\\n'\n'and the exception occurs in the try clause of the inner handler, '\n'the\\n'\n'outer handler will not handle the exception.)\\n'\n'\\n'\n'When an exception has been assigned using \"as target\", it is '\n'cleared\\n'\n'at the end of the except clause. This is as if\\n'\n'\\n'\n' except E as N:\\n'\n' foo\\n'\n'\\n'\n'was translated to\\n'\n'\\n'\n' except E as N:\\n'\n' try:\\n'\n' foo\\n'\n' finally:\\n'\n' del N\\n'\n'\\n'\n'This means the exception must be assigned to a different name to '\n'be\\n'\n'able to refer to it after the except clause. Exceptions are '\n'cleared\\n'\n'because with the traceback attached to them, they form a '\n'reference\\n'\n'cycle with the stack frame, keeping all locals in that frame '\n'alive\\n'\n'until the next garbage collection occurs.\\n'\n'\\n'\n'Before an except clause\u2019s suite is executed, details about the\\n'\n'exception are stored in the \"sys\" module and can be accessed '\n'via\\n'\n'\"sys.exc_info()\". \"sys.exc_info()\" returns a 3-tuple consisting '\n'of the\\n'\n'exception class, the exception instance and a traceback object '\n'(see\\n'\n'section The standard type hierarchy) identifying the point in '\n'the\\n'\n'program where the exception occurred. The details about the '\n'exception\\n'\n'accessed via \"sys.exc_info()\" are restored to their previous '\n'values\\n'\n'when leaving an exception handler:\\n'\n'\\n'\n' >>> print(sys.exc_info())\\n'\n' (None, None, None)\\n'\n' >>> try:\\n'\n' ... raise TypeError\\n'\n' ... except:\\n'\n' ... print(sys.exc_info())\\n'\n' ... try:\\n'\n' ... raise ValueError\\n'\n' ... except:\\n'\n' ... print(sys.exc_info())\\n'\n' ... print(sys.exc_info())\\n'\n' ...\\n'\n\" (, TypeError(), )\\n'\n\" (, ValueError(), )\\n'\n\" (, TypeError(), )\\n'\n' >>> print(sys.exc_info())\\n'\n' (None, None, None)\\n'\n'\\n'\n'The optional \"else\" clause is executed if the control flow '\n'leaves the\\n'\n'\"try\" suite, no exception was raised, and no \"return\", '\n'\"continue\", or\\n'\n'\"break\" statement was executed. Exceptions in the \"else\" clause '\n'are\\n'\n'not handled by the preceding \"except\" clauses.\\n'\n'\\n'\n'If \"finally\" is present, it specifies a \u2018cleanup\u2019 handler. The '\n'\"try\"\\n'\n'clause is executed, including any \"except\" and \"else\" clauses. '\n'If an\\n'\n'exception occurs in any of the clauses and is not handled, the\\n'\n'exception is temporarily saved. The \"finally\" clause is '\n'executed. If\\n'\n'there is a saved exception it is re-raised at the end of the '\n'\"finally\"\\n'\n'clause. If the \"finally\" clause raises another exception, the '\n'saved\\n'\n'exception is set as the context of the new exception. If the '\n'\"finally\"\\n'\n'clause executes a \"return\", \"break\" or \"continue\" statement, the '\n'saved\\n'\n'exception is discarded:\\n'\n'\\n'\n' >>> def f():\\n'\n' ... try:\\n'\n' ... 1/0\\n'\n' ... finally:\\n'\n' ... return 42\\n'\n' ...\\n'\n' >>> f()\\n'\n' 42\\n'\n'\\n'\n'The exception information is not available to the program '\n'during\\n'\n'execution of the \"finally\" clause.\\n'\n'\\n'\n'When a \"return\", \"break\" or \"continue\" statement is executed in '\n'the\\n'\n'\"try\" suite of a \"try\"\u2026\"finally\" statement, the \"finally\" clause '\n'is\\n'\n'also executed \u2018on the way out.\u2019\\n'\n'\\n'\n'The return value of a function is determined by the last '\n'\"return\"\\n'\n'statement executed. Since the \"finally\" clause always executes, '\n'a\\n'\n'\"return\" statement executed in the \"finally\" clause will always '\n'be the\\n'\n'last one executed:\\n'\n'\\n'\n' >>> def foo():\\n'\n' ... try:\\n'\n\" ... return 'try'\\n\"\n' ... finally:\\n'\n\" ... return 'finally'\\n\"\n' ...\\n'\n' >>> foo()\\n'\n\" 'finally'\\n\"\n'\\n'\n'Additional information on exceptions can be found in section\\n'\n'Exceptions, and information on using the \"raise\" statement to '\n'generate\\n'\n'exceptions may be found in section The raise statement.\\n'\n'\\n'\n'Changed in version 3.8: Prior to Python 3.8, a \"continue\" '\n'statement\\n'\n'was illegal in the \"finally\" clause due to a problem with the\\n'\n'implementation.\\n'\n'\\n'\n'\\n'\n'The \"with\" statement\\n'\n'====================\\n'\n'\\n'\n'The \"with\" statement is used to wrap the execution of a block '\n'with\\n'\n'methods defined by a context manager (see section With '\n'Statement\\n'\n'Context Managers). This allows common \"try\"\u2026\"except\"\u2026\"finally\" '\n'usage\\n'\n'patterns to be encapsulated for convenient reuse.\\n'\n'\\n'\n' with_stmt ::= \"with\" ( \"(\" with_stmt_contents \",\"? '\n'\")\" | with_stmt_contents ) \":\" suite\\n'\n' with_stmt_contents ::= with_item (\",\" with_item)*\\n'\n' with_item ::= expression [\"as\" target]\\n'\n'\\n'\n'The execution of the \"with\" statement with one \u201citem\u201d proceeds '\n'as\\n'\n'follows:\\n'\n'\\n'\n'1. The context expression (the expression given in the '\n'\"with_item\") is\\n'\n' evaluated to obtain a context manager.\\n'\n'\\n'\n'2. The context manager\u2019s \"__enter__()\" is loaded for later use.\\n'\n'\\n'\n'3. The context manager\u2019s \"__exit__()\" is loaded for later use.\\n'\n'\\n'\n'4. The context manager\u2019s \"__enter__()\" method is invoked.\\n'\n'\\n'\n'5. If a target was included in the \"with\" statement, the return '\n'value\\n'\n' from \"__enter__()\" is assigned to it.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' The \"with\" statement guarantees that if the \"__enter__()\" '\n'method\\n'\n' returns without an error, then \"__exit__()\" will always be\\n'\n' called. Thus, if an error occurs during the assignment to '\n'the\\n'\n' target list, it will be treated the same as an error '\n'occurring\\n'\n' within the suite would be. See step 6 below.\\n'\n'\\n'\n'6. The suite is executed.\\n'\n'\\n'\n'7. The context manager\u2019s \"__exit__()\" method is invoked. If an\\n'\n' exception caused the suite to be exited, its type, value, '\n'and\\n'\n' traceback are passed as arguments to \"__exit__()\". Otherwise, '\n'three\\n'\n' \"None\" arguments are supplied.\\n'\n'\\n'\n' If the suite was exited due to an exception, and the return '\n'value\\n'\n' from the \"__exit__()\" method was false, the exception is '\n'reraised.\\n'\n' If the return value was true, the exception is suppressed, '\n'and\\n'\n' execution continues with the statement following the \"with\"\\n'\n' statement.\\n'\n'\\n'\n' If the suite was exited for any reason other than an '\n'exception, the\\n'\n' return value from \"__exit__()\" is ignored, and execution '\n'proceeds\\n'\n' at the normal location for the kind of exit that was taken.\\n'\n'\\n'\n'The following code:\\n'\n'\\n'\n' with EXPRESSION as TARGET:\\n'\n' SUITE\\n'\n'\\n'\n'is semantically equivalent to:\\n'\n'\\n'\n' manager = (EXPRESSION)\\n'\n' enter = type(manager).__enter__\\n'\n' exit = type(manager).__exit__\\n'\n' value = enter(manager)\\n'\n' hit_except = False\\n'\n'\\n'\n' try:\\n'\n' TARGET = value\\n'\n' SUITE\\n'\n' except:\\n'\n' hit_except = True\\n'\n' if not exit(manager, *sys.exc_info()):\\n'\n' raise\\n'\n' finally:\\n'\n' if not hit_except:\\n'\n' exit(manager, None, None, None)\\n'\n'\\n'\n'With more than one item, the context managers are processed as '\n'if\\n'\n'multiple \"with\" statements were nested:\\n'\n'\\n'\n' with A() as a, B() as b:\\n'\n' SUITE\\n'\n'\\n'\n'is semantically equivalent to:\\n'\n'\\n'\n' with A() as a:\\n'\n' with B() as b:\\n'\n' SUITE\\n'\n'\\n'\n'You can also write multi-item context managers in multiple lines '\n'if\\n'\n'the items are surrounded by parentheses. For example:\\n'\n'\\n'\n' with (\\n'\n' A() as a,\\n'\n' B() as b,\\n'\n' ):\\n'\n' SUITE\\n'\n'\\n'\n'Changed in version 3.1: Support for multiple context '\n'expressions.\\n'\n'\\n'\n'Changed in version 3.10: Support for using grouping parentheses '\n'to\\n'\n'break the statement in multiple lines.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 343** - The \u201cwith\u201d statement\\n'\n' The specification, background, and examples for the Python '\n'\"with\"\\n'\n' statement.\\n'\n'\\n'\n'\\n'\n'The \"match\" statement\\n'\n'=====================\\n'\n'\\n'\n'New in version 3.10.\\n'\n'\\n'\n'The match statement is used for pattern matching. Syntax:\\n'\n'\\n'\n' match_stmt ::= \\'match\\' subject_expr \":\" NEWLINE INDENT '\n'case_block+ DEDENT\\n'\n' subject_expr ::= star_named_expression \",\" '\n'star_named_expressions?\\n'\n' | named_expression\\n'\n' case_block ::= \\'case\\' patterns [guard] \":\" block\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' This section uses single quotes to denote soft keywords.\\n'\n'\\n'\n'Pattern matching takes a pattern as input (following \"case\") and '\n'a\\n'\n'subject value (following \"match\"). The pattern (which may '\n'contain\\n'\n'subpatterns) is matched against the subject value. The outcomes '\n'are:\\n'\n'\\n'\n'* A match success or failure (also termed a pattern success or\\n'\n' failure).\\n'\n'\\n'\n'* Possible binding of matched values to a name. The '\n'prerequisites for\\n'\n' this are further discussed below.\\n'\n'\\n'\n'The \"match\" and \"case\" keywords are soft keywords.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' * **PEP 634** \u2013 Structural Pattern Matching: Specification\\n'\n'\\n'\n' * **PEP 636** \u2013 Structural Pattern Matching: Tutorial\\n'\n'\\n'\n'\\n'\n'Overview\\n'\n'--------\\n'\n'\\n'\n'Here\u2019s an overview of the logical flow of a match statement:\\n'\n'\\n'\n'1. The subject expression \"subject_expr\" is evaluated and a '\n'resulting\\n'\n' subject value obtained. If the subject expression contains a '\n'comma,\\n'\n' a tuple is constructed using the standard rules.\\n'\n'\\n'\n'2. Each pattern in a \"case_block\" is attempted to match with '\n'the\\n'\n' subject value. The specific rules for success or failure are\\n'\n' described below. The match attempt can also bind some or all '\n'of the\\n'\n' standalone names within the pattern. The precise pattern '\n'binding\\n'\n' rules vary per pattern type and are specified below. **Name\\n'\n' bindings made during a successful pattern match outlive the\\n'\n' executed block and can be used after the match statement**.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' During failed pattern matches, some subpatterns may '\n'succeed.\\n'\n' Do not rely on bindings being made for a failed match.\\n'\n' Conversely, do not rely on variables remaining unchanged '\n'after\\n'\n' a failed match. The exact behavior is dependent on\\n'\n' implementation and may vary. This is an intentional '\n'decision\\n'\n' made to allow different implementations to add '\n'optimizations.\\n'\n'\\n'\n'3. If the pattern succeeds, the corresponding guard (if present) '\n'is\\n'\n' evaluated. In this case all name bindings are guaranteed to '\n'have\\n'\n' happened.\\n'\n'\\n'\n' * If the guard evaluates as truthy or missing, the \"block\" '\n'inside\\n'\n' \"case_block\" is executed.\\n'\n'\\n'\n' * Otherwise, the next \"case_block\" is attempted as described '\n'above.\\n'\n'\\n'\n' * If there are no further case blocks, the match statement '\n'is\\n'\n' completed.\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Users should generally never rely on a pattern being '\n'evaluated.\\n'\n' Depending on implementation, the interpreter may cache values '\n'or use\\n'\n' other optimizations which skip repeated evaluations.\\n'\n'\\n'\n'A sample match statement:\\n'\n'\\n'\n' >>> flag = False\\n'\n' >>> match (100, 200):\\n'\n' ... case (100, 300): # Mismatch: 200 != 300\\n'\n\" ... print('Case 1')\\n\"\n' ... case (100, 200) if flag: # Successful match, but '\n'guard fails\\n'\n\" ... print('Case 2')\\n\"\n' ... case (100, y): # Matches and binds y to 200\\n'\n\" ... print(f'Case 3, y: {y}')\\n\"\n' ... case _: # Pattern not attempted\\n'\n\" ... print('Case 4, I match anything!')\\n\"\n' ...\\n'\n' Case 3, y: 200\\n'\n'\\n'\n'In this case, \"if flag\" is a guard. Read more about that in the '\n'next\\n'\n'section.\\n'\n'\\n'\n'\\n'\n'Guards\\n'\n'------\\n'\n'\\n'\n' guard ::= \"if\" named_expression\\n'\n'\\n'\n'A \"guard\" (which is part of the \"case\") must succeed for code '\n'inside\\n'\n'the \"case\" block to execute. It takes the form: \"if\" followed '\n'by an\\n'\n'expression.\\n'\n'\\n'\n'The logical flow of a \"case\" block with a \"guard\" follows:\\n'\n'\\n'\n'1. Check that the pattern in the \"case\" block succeeded. If '\n'the\\n'\n' pattern failed, the \"guard\" is not evaluated and the next '\n'\"case\"\\n'\n' block is checked.\\n'\n'\\n'\n'2. If the pattern succeeded, evaluate the \"guard\".\\n'\n'\\n'\n' * If the \"guard\" condition evaluates to \u201ctruthy\u201d, the case '\n'block is\\n'\n' selected.\\n'\n'\\n'\n' * If the \"guard\" condition evaluates to \u201cfalsy\u201d, the case '\n'block is\\n'\n' not selected.\\n'\n'\\n'\n' * If the \"guard\" raises an exception during evaluation, the\\n'\n' exception bubbles up.\\n'\n'\\n'\n'Guards are allowed to have side effects as they are '\n'expressions.\\n'\n'Guard evaluation must proceed from the first to the last case '\n'block,\\n'\n'one at a time, skipping case blocks whose pattern(s) don\u2019t all\\n'\n'succeed. (I.e., guard evaluation must happen in order.) Guard\\n'\n'evaluation must stop once a case block is selected.\\n'\n'\\n'\n'\\n'\n'Irrefutable Case Blocks\\n'\n'-----------------------\\n'\n'\\n'\n'An irrefutable case block is a match-all case block. A match\\n'\n'statement may have at most one irrefutable case block, and it '\n'must be\\n'\n'last.\\n'\n'\\n'\n'A case block is considered irrefutable if it has no guard and '\n'its\\n'\n'pattern is irrefutable. A pattern is considered irrefutable if '\n'we can\\n'\n'prove from its syntax alone that it will always succeed. Only '\n'the\\n'\n'following patterns are irrefutable:\\n'\n'\\n'\n'* AS Patterns whose left-hand side is irrefutable\\n'\n'\\n'\n'* OR Patterns containing at least one irrefutable pattern\\n'\n'\\n'\n'* Capture Patterns\\n'\n'\\n'\n'* Wildcard Patterns\\n'\n'\\n'\n'* parenthesized irrefutable patterns\\n'\n'\\n'\n'\\n'\n'Patterns\\n'\n'--------\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' This section uses grammar notations beyond standard EBNF:\\n'\n'\\n'\n' * the notation \"SEP.RULE+\" is shorthand for \"RULE (SEP '\n'RULE)*\"\\n'\n'\\n'\n' * the notation \"!RULE\" is shorthand for a negative lookahead\\n'\n' assertion\\n'\n'\\n'\n'The top-level syntax for \"patterns\" is:\\n'\n'\\n'\n' patterns ::= open_sequence_pattern | pattern\\n'\n' pattern ::= as_pattern | or_pattern\\n'\n' closed_pattern ::= | literal_pattern\\n'\n' | capture_pattern\\n'\n' | wildcard_pattern\\n'\n' | value_pattern\\n'\n' | group_pattern\\n'\n' | sequence_pattern\\n'\n' | mapping_pattern\\n'\n' | class_pattern\\n'\n'\\n'\n'The descriptions below will include a description \u201cin simple '\n'terms\u201d of\\n'\n'what a pattern does for illustration purposes (credits to '\n'Raymond\\n'\n'Hettinger for a document that inspired most of the '\n'descriptions). Note\\n'\n'that these descriptions are purely for illustration purposes and '\n'**may\\n'\n'not** reflect the underlying implementation. Furthermore, they '\n'do not\\n'\n'cover all valid forms.\\n'\n'\\n'\n'\\n'\n'OR Patterns\\n'\n'~~~~~~~~~~~\\n'\n'\\n'\n'An OR pattern is two or more patterns separated by vertical bars '\n'\"|\".\\n'\n'Syntax:\\n'\n'\\n'\n' or_pattern ::= \"|\".closed_pattern+\\n'\n'\\n'\n'Only the final subpattern may be irrefutable, and each '\n'subpattern must\\n'\n'bind the same set of names to avoid ambiguity.\\n'\n'\\n'\n'An OR pattern matches each of its subpatterns in turn to the '\n'subject\\n'\n'value, until one succeeds. The OR pattern is then considered\\n'\n'successful. Otherwise, if none of the subpatterns succeed, the '\n'OR\\n'\n'pattern fails.\\n'\n'\\n'\n'In simple terms, \"P1 | P2 | ...\" will try to match \"P1\", if it '\n'fails\\n'\n'it will try to match \"P2\", succeeding immediately if any '\n'succeeds,\\n'\n'failing otherwise.\\n'\n'\\n'\n'\\n'\n'AS Patterns\\n'\n'~~~~~~~~~~~\\n'\n'\\n'\n'An AS pattern matches an OR pattern on the left of the \"as\" '\n'keyword\\n'\n'against a subject. Syntax:\\n'\n'\\n'\n' as_pattern ::= or_pattern \"as\" capture_pattern\\n'\n'\\n'\n'If the OR pattern fails, the AS pattern fails. Otherwise, the '\n'AS\\n'\n'pattern binds the subject to the name on the right of the as '\n'keyword\\n'\n'and succeeds. \"capture_pattern\" cannot be a a \"_\".\\n'\n'\\n'\n'In simple terms \"P as NAME\" will match with \"P\", and on success '\n'it\\n'\n'will set \"NAME = \".\\n'\n'\\n'\n'\\n'\n'Literal Patterns\\n'\n'~~~~~~~~~~~~~~~~\\n'\n'\\n'\n'A literal pattern corresponds to most literals in Python. '\n'Syntax:\\n'\n'\\n'\n' literal_pattern ::= signed_number\\n'\n' | signed_number \"+\" NUMBER\\n'\n' | signed_number \"-\" NUMBER\\n'\n' | strings\\n'\n' | \"None\"\\n'\n' | \"True\"\\n'\n' | \"False\"\\n'\n' | signed_number: NUMBER | \"-\" NUMBER\\n'\n'\\n'\n'The rule \"strings\" and the token \"NUMBER\" are defined in the '\n'standard\\n'\n'Python grammar. Triple-quoted strings are supported. Raw '\n'strings and\\n'\n'byte strings are supported. Formatted string literals are not\\n'\n'supported.\\n'\n'\\n'\n'The forms \"signed_number \\'+\\' NUMBER\" and \"signed_number \\'-\\' '\n'NUMBER\"\\n'\n'are for expressing complex numbers; they require a real number '\n'on the\\n'\n'left and an imaginary number on the right. E.g. \"3 + 4j\".\\n'\n'\\n'\n'In simple terms, \"LITERAL\" will succeed only if \" ==\\n'\n'LITERAL\". For the singletons \"None\", \"True\" and \"False\", the '\n'\"is\"\\n'\n'operator is used.\\n'\n'\\n'\n'\\n'\n'Capture Patterns\\n'\n'~~~~~~~~~~~~~~~~\\n'\n'\\n'\n'A capture pattern binds the subject value to a name. Syntax:\\n'\n'\\n'\n\" capture_pattern ::= !'_' NAME\\n\"\n'\\n'\n'A single underscore \"_\" is not a capture pattern (this is what '\n'\"!\\'_\\'\"\\n'\n'expresses). It is instead treated as a \"wildcard_pattern\".\\n'\n'\\n'\n'In a given pattern, a given name can only be bound once. E.g. '\n'\"case\\n'\n'x, x: ...\" is invalid while \"case [x] | x: ...\" is allowed.\\n'\n'\\n'\n'Capture patterns always succeed. The binding follows scoping '\n'rules\\n'\n'established by the assignment expression operator in **PEP '\n'572**; the\\n'\n'name becomes a local variable in the closest containing function '\n'scope\\n'\n'unless there\u2019s an applicable \"global\" or \"nonlocal\" statement.\\n'\n'\\n'\n'In simple terms \"NAME\" will always succeed and it will set \"NAME '\n'=\\n'\n'\".\\n'\n'\\n'\n'\\n'\n'Wildcard Patterns\\n'\n'~~~~~~~~~~~~~~~~~\\n'\n'\\n'\n'A wildcard pattern always succeeds (matches anything) and binds '\n'no\\n'\n'name. Syntax:\\n'\n'\\n'\n\" wildcard_pattern ::= '_'\\n\"\n'\\n'\n'\"_\" is a soft keyword within any pattern, but only within '\n'patterns.\\n'\n'It is an identifier, as usual, even within \"match\" subject\\n'\n'expressions, \"guard\"s, and \"case\" blocks.\\n'\n'\\n'\n'In simple terms, \"_\" will always succeed.\\n'\n'\\n'\n'\\n'\n'Value Patterns\\n'\n'~~~~~~~~~~~~~~\\n'\n'\\n'\n'A value pattern represents a named value in Python. Syntax:\\n'\n'\\n'\n' value_pattern ::= attr\\n'\n' attr ::= name_or_attr \".\" NAME\\n'\n' name_or_attr ::= attr | NAME\\n'\n'\\n'\n'The dotted name in the pattern is looked up using standard '\n'Python name\\n'\n'resolution rules. The pattern succeeds if the value found '\n'compares\\n'\n'equal to the subject value (using the \"==\" equality operator).\\n'\n'\\n'\n'In simple terms \"NAME1.NAME2\" will succeed only if \" '\n'==\\n'\n'NAME1.NAME2\"\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' If the same value occurs multiple times in the same match '\n'statement,\\n'\n' the interpreter may cache the first value found and reuse it '\n'rather\\n'\n' than repeat the same lookup. This cache is strictly tied to a '\n'given\\n'\n' execution of a given match statement.\\n'\n'\\n'\n'\\n'\n'Group Patterns\\n'\n'~~~~~~~~~~~~~~\\n'\n'\\n'\n'A group pattern allows users to add parentheses around patterns '\n'to\\n'\n'emphasize the intended grouping. Otherwise, it has no '\n'additional\\n'\n'syntax. Syntax:\\n'\n'\\n'\n' group_pattern ::= \"(\" pattern \")\"\\n'\n'\\n'\n'In simple terms \"(P)\" has the same effect as \"P\".\\n'\n'\\n'\n'\\n'\n'Sequence Patterns\\n'\n'~~~~~~~~~~~~~~~~~\\n'\n'\\n'\n'A sequence pattern contains several subpatterns to be matched '\n'against\\n'\n'sequence elements. The syntax is similar to the unpacking of a '\n'list or\\n'\n'tuple.\\n'\n'\\n'\n' sequence_pattern ::= \"[\" [maybe_sequence_pattern] \"]\"\\n'\n' | \"(\" [open_sequence_pattern] \")\"\\n'\n' open_sequence_pattern ::= maybe_star_pattern \",\" '\n'[maybe_sequence_pattern]\\n'\n' maybe_sequence_pattern ::= \",\".maybe_star_pattern+ \",\"?\\n'\n' maybe_star_pattern ::= star_pattern | pattern\\n'\n' star_pattern ::= \"*\" (capture_pattern | '\n'wildcard_pattern)\\n'\n'\\n'\n'There is no difference if parentheses or square brackets are '\n'used for\\n'\n'sequence patterns (i.e. \"(...)\" vs \"[...]\" ).\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' A single pattern enclosed in parentheses without a trailing '\n'comma\\n'\n' (e.g. \"(3 | 4)\") is a group pattern. While a single pattern '\n'enclosed\\n'\n' in square brackets (e.g. \"[3 | 4]\") is still a sequence '\n'pattern.\\n'\n'\\n'\n'At most one star subpattern may be in a sequence pattern. The '\n'star\\n'\n'subpattern may occur in any position. If no star subpattern is\\n'\n'present, the sequence pattern is a fixed-length sequence '\n'pattern;\\n'\n'otherwise it is a variable-length sequence pattern.\\n'\n'\\n'\n'The following is the logical flow for matching a sequence '\n'pattern\\n'\n'against a subject value:\\n'\n'\\n'\n'1. If the subject value is not a sequence [2], the sequence '\n'pattern\\n'\n' fails.\\n'\n'\\n'\n'2. If the subject value is an instance of \"str\", \"bytes\" or\\n'\n' \"bytearray\" the sequence pattern fails.\\n'\n'\\n'\n'3. The subsequent steps depend on whether the sequence pattern '\n'is\\n'\n' fixed or variable-length.\\n'\n'\\n'\n' If the sequence pattern is fixed-length:\\n'\n'\\n'\n' 1. If the length of the subject sequence is not equal to the '\n'number\\n'\n' of subpatterns, the sequence pattern fails\\n'\n'\\n'\n' 2. Subpatterns in the sequence pattern are matched to their\\n'\n' corresponding items in the subject sequence from left to '\n'right.\\n'\n' Matching stops as soon as a subpattern fails. If all\\n'\n' subpatterns succeed in matching their corresponding item, '\n'the\\n'\n' sequence pattern succeeds.\\n'\n'\\n'\n' Otherwise, if the sequence pattern is variable-length:\\n'\n'\\n'\n' 1. If the length of the subject sequence is less than the '\n'number of\\n'\n' non-star subpatterns, the sequence pattern fails.\\n'\n'\\n'\n' 2. The leading non-star subpatterns are matched to their\\n'\n' corresponding items as for fixed-length sequences.\\n'\n'\\n'\n' 3. If the previous step succeeds, the star subpattern matches '\n'a\\n'\n' list formed of the remaining subject items, excluding the\\n'\n' remaining items corresponding to non-star subpatterns '\n'following\\n'\n' the star subpattern.\\n'\n'\\n'\n' 4. Remaining non-star subpatterns are matched to their\\n'\n' corresponding subject items, as for a fixed-length '\n'sequence.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' The length of the subject sequence is obtained via \"len()\" '\n'(i.e.\\n'\n' via the \"__len__()\" protocol). This length may be cached '\n'by the\\n'\n' interpreter in a similar manner as value patterns.\\n'\n'\\n'\n'In simple terms \"[P1, P2, P3,\" \u2026 \", P]\" matches only if all '\n'the\\n'\n'following happens:\\n'\n'\\n'\n'* check \"\" is a sequence\\n'\n'\\n'\n'* \"len(subject) == \"\\n'\n'\\n'\n'* \"P1\" matches \"[0]\" (note that this match can also '\n'bind\\n'\n' names)\\n'\n'\\n'\n'* \"P2\" matches \"[1]\" (note that this match can also '\n'bind\\n'\n' names)\\n'\n'\\n'\n'* \u2026 and so on for the corresponding pattern/element.\\n'\n'\\n'\n'\\n'\n'Mapping Patterns\\n'\n'~~~~~~~~~~~~~~~~\\n'\n'\\n'\n'A mapping pattern contains one or more key-value patterns. The '\n'syntax\\n'\n'is similar to the construction of a dictionary. Syntax:\\n'\n'\\n'\n' mapping_pattern ::= \"{\" [items_pattern] \"}\"\\n'\n' items_pattern ::= \",\".key_value_pattern+ \",\"?\\n'\n' key_value_pattern ::= (literal_pattern | value_pattern) \":\" '\n'pattern\\n'\n' | double_star_pattern\\n'\n' double_star_pattern ::= \"**\" capture_pattern\\n'\n'\\n'\n'At most one double star pattern may be in a mapping pattern. '\n'The\\n'\n'double star pattern must be the last subpattern in the mapping\\n'\n'pattern.\\n'\n'\\n'\n'Duplicate keys in mapping patterns are disallowed. Duplicate '\n'literal\\n'\n'keys will raise a \"SyntaxError\". Two keys that otherwise have '\n'the same\\n'\n'value will raise a \"ValueError\" at runtime.\\n'\n'\\n'\n'The following is the logical flow for matching a mapping '\n'pattern\\n'\n'against a subject value:\\n'\n'\\n'\n'1. If the subject value is not a mapping [3],the mapping '\n'pattern\\n'\n' fails.\\n'\n'\\n'\n'2. If every key given in the mapping pattern is present in the '\n'subject\\n'\n' mapping, and the pattern for each key matches the '\n'corresponding\\n'\n' item of the subject mapping, the mapping pattern succeeds.\\n'\n'\\n'\n'3. If duplicate keys are detected in the mapping pattern, the '\n'pattern\\n'\n' is considered invalid. A \"SyntaxError\" is raised for '\n'duplicate\\n'\n' literal values; or a \"ValueError\" for named keys of the same '\n'value.\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Key-value pairs are matched using the two-argument form of '\n'the\\n'\n' mapping subject\u2019s \"get()\" method. Matched key-value pairs '\n'must\\n'\n' already be present in the mapping, and not created on-the-fly '\n'via\\n'\n' \"__missing__()\" or \"__getitem__()\".\\n'\n'\\n'\n'In simple terms \"{KEY1: P1, KEY2: P2, ... }\" matches only if all '\n'the\\n'\n'following happens:\\n'\n'\\n'\n'* check \"\" is a mapping\\n'\n'\\n'\n'* \"KEY1 in \"\\n'\n'\\n'\n'* \"P1\" matches \"[KEY1]\"\\n'\n'\\n'\n'* \u2026 and so on for the corresponding KEY/pattern pair.\\n'\n'\\n'\n'\\n'\n'Class Patterns\\n'\n'~~~~~~~~~~~~~~\\n'\n'\\n'\n'A class pattern represents a class and its positional and '\n'keyword\\n'\n'arguments (if any). Syntax:\\n'\n'\\n'\n' class_pattern ::= name_or_attr \"(\" [pattern_arguments '\n'\",\"?] \")\"\\n'\n' pattern_arguments ::= positional_patterns [\",\" '\n'keyword_patterns]\\n'\n' | keyword_patterns\\n'\n' positional_patterns ::= \",\".pattern+\\n'\n' keyword_patterns ::= \",\".keyword_pattern+\\n'\n' keyword_pattern ::= NAME \"=\" pattern\\n'\n'\\n'\n'The same keyword should not be repeated in class patterns.\\n'\n'\\n'\n'The following is the logical flow for matching a mapping '\n'pattern\\n'\n'against a subject value:\\n'\n'\\n'\n'1. If \"name_or_attr\" is not an instance of the builtin \"type\" , '\n'raise\\n'\n' \"TypeError\".\\n'\n'\\n'\n'2. If the subject value is not an instance of \"name_or_attr\" '\n'(tested\\n'\n' via \"isinstance()\"), the class pattern fails.\\n'\n'\\n'\n'3. If no pattern arguments are present, the pattern succeeds.\\n'\n' Otherwise, the subsequent steps depend on whether keyword or\\n'\n' positional argument patterns are present.\\n'\n'\\n'\n' For a number of built-in types (specified below), a single\\n'\n' positional subpattern is accepted which will match the '\n'entire\\n'\n' subject; for these types keyword patterns also work as for '\n'other\\n'\n' types.\\n'\n'\\n'\n' If only keyword patterns are present, they are processed as\\n'\n' follows, one by one:\\n'\n'\\n'\n' I. The keyword is looked up as an attribute on the subject.\\n'\n'\\n'\n' * If this raises an exception other than \"AttributeError\", '\n'the\\n'\n' exception bubbles up.\\n'\n'\\n'\n' * If this raises \"AttributeError\", the class pattern has '\n'failed.\\n'\n'\\n'\n' * Else, the subpattern associated with the keyword pattern '\n'is\\n'\n' matched against the subject\u2019s attribute value. If this '\n'fails,\\n'\n' the class pattern fails; if this succeeds, the match '\n'proceeds\\n'\n' to the next keyword.\\n'\n'\\n'\n' II. If all keyword patterns succeed, the class pattern '\n'succeeds.\\n'\n'\\n'\n' If any positional patterns are present, they are converted '\n'to\\n'\n' keyword patterns using the \"__match_args__\" attribute on the '\n'class\\n'\n' \"name_or_attr\" before matching:\\n'\n'\\n'\n' I. The equivalent of \"getattr(cls, \"__match_args__\", ()))\" '\n'is\\n'\n' called.\\n'\n'\\n'\n' * If this raises an exception, the exception bubbles up.\\n'\n'\\n'\n' * If the returned value is not a tuple, the conversion '\n'fails and\\n'\n' \"TypeError\" is raised.\\n'\n'\\n'\n' * If there are more positional patterns than\\n'\n' \"len(cls.__match_args__)\", \"TypeError\" is raised.\\n'\n'\\n'\n' * Otherwise, positional pattern \"i\" is converted to a '\n'keyword\\n'\n' pattern using \"__match_args__[i]\" as the keyword.\\n'\n' \"__match_args__[i]\" must be a string; if not \"TypeError\" '\n'is\\n'\n' raised.\\n'\n'\\n'\n' * If there are duplicate keywords, \"TypeError\" is raised.\\n'\n'\\n'\n' See also:\\n'\n'\\n'\n' Customizing positional arguments in class pattern '\n'matching\\n'\n'\\n'\n' II. Once all positional patterns have been converted to '\n'keyword\\n'\n' patterns,\\n'\n' the match proceeds as if there were only keyword '\n'patterns.\\n'\n'\\n'\n' For the following built-in types the handling of positional\\n'\n' subpatterns is different:\\n'\n'\\n'\n' * \"bool\"\\n'\n'\\n'\n' * \"bytearray\"\\n'\n'\\n'\n' * \"bytes\"\\n'\n'\\n'\n' * \"dict\"\\n'\n'\\n'\n' * \"float\"\\n'\n'\\n'\n' * \"frozenset\"\\n'\n'\\n'\n' * \"int\"\\n'\n'\\n'\n' * \"list\"\\n'\n'\\n'\n' * \"set\"\\n'\n'\\n'\n' * \"str\"\\n'\n'\\n'\n' * \"tuple\"\\n'\n'\\n'\n' These classes accept a single positional argument, and the '\n'pattern\\n'\n' there is matched against the whole object rather than an '\n'attribute.\\n'\n' For example \"int(0|1)\" matches the value \"0\", but not the '\n'values\\n'\n' \"0.0\" or \"False\".\\n'\n'\\n'\n'In simple terms \"CLS(P1, attr=P2)\" matches only if the '\n'following\\n'\n'happens:\\n'\n'\\n'\n'* \"isinstance(, CLS)\"\\n'\n'\\n'\n'* convert \"P1\" to a keyword pattern using \"CLS.__match_args__\"\\n'\n'\\n'\n'* For each keyword argument \"attr=P2\":\\n'\n' * \"hasattr(, \"attr\")\"\\n'\n'\\n'\n' * \"P2\" matches \".attr\"\\n'\n'\\n'\n'* \u2026 and so on for the corresponding keyword argument/pattern '\n'pair.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' * **PEP 634** \u2013 Structural Pattern Matching: Specification\\n'\n'\\n'\n' * **PEP 636** \u2013 Structural Pattern Matching: Tutorial\\n'\n'\\n'\n'\\n'\n'Function definitions\\n'\n'====================\\n'\n'\\n'\n'A function definition defines a user-defined function object '\n'(see\\n'\n'section The standard type hierarchy):\\n'\n'\\n'\n' funcdef ::= [decorators] \"def\" funcname \"(\" '\n'[parameter_list] \")\"\\n'\n' [\"->\" expression] \":\" suite\\n'\n' decorators ::= decorator+\\n'\n' decorator ::= \"@\" assignment_expression '\n'NEWLINE\\n'\n' parameter_list ::= defparameter (\",\" '\n'defparameter)* \",\" \"/\" [\",\" [parameter_list_no_posonly]]\\n'\n' | parameter_list_no_posonly\\n'\n' parameter_list_no_posonly ::= defparameter (\",\" '\n'defparameter)* [\",\" [parameter_list_starargs]]\\n'\n' | parameter_list_starargs\\n'\n' parameter_list_starargs ::= \"*\" [parameter] (\",\" '\n'defparameter)* [\",\" [\"**\" parameter [\",\"]]]\\n'\n' | \"**\" parameter [\",\"]\\n'\n' parameter ::= identifier [\":\" expression]\\n'\n' defparameter ::= parameter [\"=\" expression]\\n'\n' funcname ::= identifier\\n'\n'\\n'\n'A function definition is an executable statement. Its execution '\n'binds\\n'\n'the function name in the current local namespace to a function '\n'object\\n'\n'(a wrapper around the executable code for the function). This\\n'\n'function object contains a reference to the current global '\n'namespace\\n'\n'as the global namespace to be used when the function is called.\\n'\n'\\n'\n'The function definition does not execute the function body; this '\n'gets\\n'\n'executed only when the function is called. [4]\\n'\n'\\n'\n'A function definition may be wrapped by one or more *decorator*\\n'\n'expressions. Decorator expressions are evaluated when the '\n'function is\\n'\n'defined, in the scope that contains the function definition. '\n'The\\n'\n'result must be a callable, which is invoked with the function '\n'object\\n'\n'as the only argument. The returned value is bound to the '\n'function name\\n'\n'instead of the function object. Multiple decorators are applied '\n'in\\n'\n'nested fashion. For example, the following code\\n'\n'\\n'\n' @f1(arg)\\n'\n' @f2\\n'\n' def func(): pass\\n'\n'\\n'\n'is roughly equivalent to\\n'\n'\\n'\n' def func(): pass\\n'\n' func = f1(arg)(f2(func))\\n'\n'\\n'\n'except that the original function is not temporarily bound to '\n'the name\\n'\n'\"func\".\\n'\n'\\n'\n'Changed in version 3.9: Functions may be decorated with any '\n'valid\\n'\n'\"assignment_expression\". Previously, the grammar was much more\\n'\n'restrictive; see **PEP 614** for details.\\n'\n'\\n'\n'When one or more *parameters* have the form *parameter* \"=\"\\n'\n'*expression*, the function is said to have \u201cdefault parameter '\n'values.\u201d\\n'\n'For a parameter with a default value, the corresponding '\n'*argument* may\\n'\n'be omitted from a call, in which case the parameter\u2019s default '\n'value is\\n'\n'substituted. If a parameter has a default value, all following\\n'\n'parameters up until the \u201c\"*\"\u201d must also have a default value \u2014 '\n'this is\\n'\n'a syntactic restriction that is not expressed by the grammar.\\n'\n'\\n'\n'**Default parameter values are evaluated from left to right when '\n'the\\n'\n'function definition is executed.** This means that the '\n'expression is\\n'\n'evaluated once, when the function is defined, and that the same '\n'\u201cpre-\\n'\n'computed\u201d value is used for each call. This is especially '\n'important\\n'\n'to understand when a default parameter value is a mutable '\n'object, such\\n'\n'as a list or a dictionary: if the function modifies the object '\n'(e.g.\\n'\n'by appending an item to a list), the default parameter value is '\n'in\\n'\n'effect modified. This is generally not what was intended. A '\n'way\\n'\n'around this is to use \"None\" as the default, and explicitly test '\n'for\\n'\n'it in the body of the function, e.g.:\\n'\n'\\n'\n' def whats_on_the_telly(penguin=None):\\n'\n' if penguin is None:\\n'\n' penguin = []\\n'\n' penguin.append(\"property of the zoo\")\\n'\n' return penguin\\n'\n'\\n'\n'Function call semantics are described in more detail in section '\n'Calls.\\n'\n'A function call always assigns values to all parameters '\n'mentioned in\\n'\n'the parameter list, either from positional arguments, from '\n'keyword\\n'\n'arguments, or from default values. If the form \u201c\"*identifier\"\u201d '\n'is\\n'\n'present, it is initialized to a tuple receiving any excess '\n'positional\\n'\n'parameters, defaulting to the empty tuple. If the form\\n'\n'\u201c\"**identifier\"\u201d is present, it is initialized to a new ordered\\n'\n'mapping receiving any excess keyword arguments, defaulting to a '\n'new\\n'\n'empty mapping of the same type. Parameters after \u201c\"*\"\u201d or\\n'\n'\u201c\"*identifier\"\u201d are keyword-only parameters and may only be '\n'passed by\\n'\n'keyword arguments. Parameters before \u201c\"/\"\u201d are positional-only\\n'\n'parameters and may only be passed by positional arguments.\\n'\n'\\n'\n'Changed in version 3.8: The \"/\" function parameter syntax may be '\n'used\\n'\n'to indicate positional-only parameters. See **PEP 570** for '\n'details.\\n'\n'\\n'\n'Parameters may have an *annotation* of the form \u201c\": '\n'expression\"\u201d\\n'\n'following the parameter name. Any parameter may have an '\n'annotation,\\n'\n'even those of the form \"*identifier\" or \"**identifier\". '\n'Functions may\\n'\n'have \u201creturn\u201d annotation of the form \u201c\"-> expression\"\u201d after '\n'the\\n'\n'parameter list. These annotations can be any valid Python '\n'expression.\\n'\n'The presence of annotations does not change the semantics of a\\n'\n'function. The annotation values are available as values of a\\n'\n'dictionary keyed by the parameters\u2019 names in the '\n'\"__annotations__\"\\n'\n'attribute of the function object. If the \"annotations\" import '\n'from\\n'\n'\"__future__\" is used, annotations are preserved as strings at '\n'runtime\\n'\n'which enables postponed evaluation. Otherwise, they are '\n'evaluated\\n'\n'when the function definition is executed. In this case '\n'annotations\\n'\n'may be evaluated in a different order than they appear in the '\n'source\\n'\n'code.\\n'\n'\\n'\n'It is also possible to create anonymous functions (functions not '\n'bound\\n'\n'to a name), for immediate use in expressions. This uses lambda\\n'\n'expressions, described in section Lambdas. Note that the '\n'lambda\\n'\n'expression is merely a shorthand for a simplified function '\n'definition;\\n'\n'a function defined in a \u201c\"def\"\u201d statement can be passed around '\n'or\\n'\n'assigned to another name just like a function defined by a '\n'lambda\\n'\n'expression. The \u201c\"def\"\u201d form is actually more powerful since '\n'it\\n'\n'allows the execution of multiple statements and annotations.\\n'\n'\\n'\n'**Programmer\u2019s note:** Functions are first-class objects. A '\n'\u201c\"def\"\u201d\\n'\n'statement executed inside a function definition defines a local\\n'\n'function that can be returned or passed around. Free variables '\n'used\\n'\n'in the nested function can access the local variables of the '\n'function\\n'\n'containing the def. See section Naming and binding for '\n'details.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3107** - Function Annotations\\n'\n' The original specification for function annotations.\\n'\n'\\n'\n' **PEP 484** - Type Hints\\n'\n' Definition of a standard meaning for annotations: type '\n'hints.\\n'\n'\\n'\n' **PEP 526** - Syntax for Variable Annotations\\n'\n' Ability to type hint variable declarations, including '\n'class\\n'\n' variables and instance variables\\n'\n'\\n'\n' **PEP 563** - Postponed Evaluation of Annotations\\n'\n' Support for forward references within annotations by '\n'preserving\\n'\n' annotations in a string form at runtime instead of eager\\n'\n' evaluation.\\n'\n'\\n'\n'\\n'\n'Class definitions\\n'\n'=================\\n'\n'\\n'\n'A class definition defines a class object (see section The '\n'standard\\n'\n'type hierarchy):\\n'\n'\\n'\n' classdef ::= [decorators] \"class\" classname [inheritance] '\n'\":\" suite\\n'\n' inheritance ::= \"(\" [argument_list] \")\"\\n'\n' classname ::= identifier\\n'\n'\\n'\n'A class definition is an executable statement. The inheritance '\n'list\\n'\n'usually gives a list of base classes (see Metaclasses for more\\n'\n'advanced uses), so each item in the list should evaluate to a '\n'class\\n'\n'object which allows subclassing. Classes without an inheritance '\n'list\\n'\n'inherit, by default, from the base class \"object\"; hence,\\n'\n'\\n'\n' class Foo:\\n'\n' pass\\n'\n'\\n'\n'is equivalent to\\n'\n'\\n'\n' class Foo(object):\\n'\n' pass\\n'\n'\\n'\n'The class\u2019s suite is then executed in a new execution frame '\n'(see\\n'\n'Naming and binding), using a newly created local namespace and '\n'the\\n'\n'original global namespace. (Usually, the suite contains mostly\\n'\n'function definitions.) When the class\u2019s suite finishes '\n'execution, its\\n'\n'execution frame is discarded but its local namespace is saved. '\n'[5] A\\n'\n'class object is then created using the inheritance list for the '\n'base\\n'\n'classes and the saved local namespace for the attribute '\n'dictionary.\\n'\n'The class name is bound to this class object in the original '\n'local\\n'\n'namespace.\\n'\n'\\n'\n'The order in which attributes are defined in the class body is\\n'\n'preserved in the new class\u2019s \"__dict__\". Note that this is '\n'reliable\\n'\n'only right after the class is created and only for classes that '\n'were\\n'\n'defined using the definition syntax.\\n'\n'\\n'\n'Class creation can be customized heavily using metaclasses.\\n'\n'\\n'\n'Classes can also be decorated: just like when decorating '\n'functions,\\n'\n'\\n'\n' @f1(arg)\\n'\n' @f2\\n'\n' class Foo: pass\\n'\n'\\n'\n'is roughly equivalent to\\n'\n'\\n'\n' class Foo: pass\\n'\n' Foo = f1(arg)(f2(Foo))\\n'\n'\\n'\n'The evaluation rules for the decorator expressions are the same '\n'as for\\n'\n'function decorators. The result is then bound to the class '\n'name.\\n'\n'\\n'\n'Changed in version 3.9: Classes may be decorated with any valid\\n'\n'\"assignment_expression\". Previously, the grammar was much more\\n'\n'restrictive; see **PEP 614** for details.\\n'\n'\\n'\n'**Programmer\u2019s note:** Variables defined in the class definition '\n'are\\n'\n'class attributes; they are shared by instances. Instance '\n'attributes\\n'\n'can be set in a method with \"self.name = value\". Both class '\n'and\\n'\n'instance attributes are accessible through the notation '\n'\u201c\"self.name\"\u201d,\\n'\n'and an instance attribute hides a class attribute with the same '\n'name\\n'\n'when accessed in this way. Class attributes can be used as '\n'defaults\\n'\n'for instance attributes, but using mutable values there can lead '\n'to\\n'\n'unexpected results. Descriptors can be used to create instance\\n'\n'variables with different implementation details.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3115** - Metaclasses in Python 3000\\n'\n' The proposal that changed the declaration of metaclasses to '\n'the\\n'\n' current syntax, and the semantics for how classes with\\n'\n' metaclasses are constructed.\\n'\n'\\n'\n' **PEP 3129** - Class Decorators\\n'\n' The proposal that added class decorators. Function and '\n'method\\n'\n' decorators were introduced in **PEP 318**.\\n'\n'\\n'\n'\\n'\n'Coroutines\\n'\n'==========\\n'\n'\\n'\n'New in version 3.5.\\n'\n'\\n'\n'\\n'\n'Coroutine function definition\\n'\n'-----------------------------\\n'\n'\\n'\n' async_funcdef ::= [decorators] \"async\" \"def\" funcname \"(\" '\n'[parameter_list] \")\"\\n'\n' [\"->\" expression] \":\" suite\\n'\n'\\n'\n'Execution of Python coroutines can be suspended and resumed at '\n'many\\n'\n'points (see *coroutine*). \"await\" expressions, \"async for\" and '\n'\"async\\n'\n'with\" can only be used in the body of a coroutine function.\\n'\n'\\n'\n'Functions defined with \"async def\" syntax are always coroutine\\n'\n'functions, even if they do not contain \"await\" or \"async\" '\n'keywords.\\n'\n'\\n'\n'It is a \"SyntaxError\" to use a \"yield from\" expression inside '\n'the body\\n'\n'of a coroutine function.\\n'\n'\\n'\n'An example of a coroutine function:\\n'\n'\\n'\n' async def func(param1, param2):\\n'\n' do_stuff()\\n'\n' await some_coroutine()\\n'\n'\\n'\n'Changed in version 3.7: \"await\" and \"async\" are now keywords;\\n'\n'previously they were only treated as such inside the body of a\\n'\n'coroutine function.\\n'\n'\\n'\n'\\n'\n'The \"async for\" statement\\n'\n'-------------------------\\n'\n'\\n'\n' async_for_stmt ::= \"async\" for_stmt\\n'\n'\\n'\n'An *asynchronous iterable* provides an \"__aiter__\" method that\\n'\n'directly returns an *asynchronous iterator*, which can call\\n'\n'asynchronous code in its \"__anext__\" method.\\n'\n'\\n'\n'The \"async for\" statement allows convenient iteration over\\n'\n'asynchronous iterables.\\n'\n'\\n'\n'The following code:\\n'\n'\\n'\n' async for TARGET in ITER:\\n'\n' SUITE\\n'\n' else:\\n'\n' SUITE2\\n'\n'\\n'\n'Is semantically equivalent to:\\n'\n'\\n'\n' iter = (ITER)\\n'\n' iter = type(iter).__aiter__(iter)\\n'\n' running = True\\n'\n'\\n'\n' while running:\\n'\n' try:\\n'\n' TARGET = await type(iter).__anext__(iter)\\n'\n' except StopAsyncIteration:\\n'\n' running = False\\n'\n' else:\\n'\n' SUITE\\n'\n' else:\\n'\n' SUITE2\\n'\n'\\n'\n'See also \"__aiter__()\" and \"__anext__()\" for details.\\n'\n'\\n'\n'It is a \"SyntaxError\" to use an \"async for\" statement outside '\n'the body\\n'\n'of a coroutine function.\\n'\n'\\n'\n'\\n'\n'The \"async with\" statement\\n'\n'--------------------------\\n'\n'\\n'\n' async_with_stmt ::= \"async\" with_stmt\\n'\n'\\n'\n'An *asynchronous context manager* is a *context manager* that is '\n'able\\n'\n'to suspend execution in its *enter* and *exit* methods.\\n'\n'\\n'\n'The following code:\\n'\n'\\n'\n' async with EXPRESSION as TARGET:\\n'\n' SUITE\\n'\n'\\n'\n'is semantically equivalent to:\\n'\n'\\n'\n' manager = (EXPRESSION)\\n'\n' aenter = type(manager).__aenter__\\n'\n' aexit = type(manager).__aexit__\\n'\n' value = await aenter(manager)\\n'\n' hit_except = False\\n'\n'\\n'\n' try:\\n'\n' TARGET = value\\n'\n' SUITE\\n'\n' except:\\n'\n' hit_except = True\\n'\n' if not await aexit(manager, *sys.exc_info()):\\n'\n' raise\\n'\n' finally:\\n'\n' if not hit_except:\\n'\n' await aexit(manager, None, None, None)\\n'\n'\\n'\n'See also \"__aenter__()\" and \"__aexit__()\" for details.\\n'\n'\\n'\n'It is a \"SyntaxError\" to use an \"async with\" statement outside '\n'the\\n'\n'body of a coroutine function.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 492** - Coroutines with async and await syntax\\n'\n' The proposal that made coroutines a proper standalone '\n'concept in\\n'\n' Python, and added supporting syntax.\\n'\n'\\n'\n'-[ Footnotes ]-\\n'\n'\\n'\n'[1] The exception is propagated to the invocation stack unless '\n'there\\n'\n' is a \"finally\" clause which happens to raise another '\n'exception.\\n'\n' That new exception causes the old one to be lost.\\n'\n'\\n'\n'[2] In pattern matching, a sequence is defined as one of the\\n'\n' following:\\n'\n'\\n'\n' * a class that inherits from \"collections.abc.Sequence\"\\n'\n'\\n'\n' * a Python class that has been registered as\\n'\n' \"collections.abc.Sequence\"\\n'\n'\\n'\n' * a builtin class that has its (CPython) '\n'\"Py_TPFLAGS_SEQUENCE\"\\n'\n' bit set\\n'\n'\\n'\n' * a class that inherits from any of the above\\n'\n'\\n'\n' The following standard library classes are sequences:\\n'\n'\\n'\n' * \"array.array\"\\n'\n'\\n'\n' * \"collections.deque\"\\n'\n'\\n'\n' * \"list\"\\n'\n'\\n'\n' * \"memoryview\"\\n'\n'\\n'\n' * \"range\"\\n'\n'\\n'\n' * \"tuple\"\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' Subject values of type \"str\", \"bytes\", and \"bytearray\" do '\n'not\\n'\n' match sequence patterns.\\n'\n'\\n'\n'[3] In pattern matching, a mapping is defined as one of the '\n'following:\\n'\n'\\n'\n' * a class that inherits from \"collections.abc.Mapping\"\\n'\n'\\n'\n' * a Python class that has been registered as\\n'\n' \"collections.abc.Mapping\"\\n'\n'\\n'\n' * a builtin class that has its (CPython) '\n'\"Py_TPFLAGS_MAPPING\"\\n'\n' bit set\\n'\n'\\n'\n' * a class that inherits from any of the above\\n'\n'\\n'\n' The standard library classes \"dict\" and '\n'\"types.MappingProxyType\"\\n'\n' are mappings.\\n'\n'\\n'\n'[4] A string literal appearing as the first statement in the '\n'function\\n'\n' body is transformed into the function\u2019s \"__doc__\" attribute '\n'and\\n'\n' therefore the function\u2019s *docstring*.\\n'\n'\\n'\n'[5] A string literal appearing as the first statement in the '\n'class\\n'\n' body is transformed into the namespace\u2019s \"__doc__\" item and\\n'\n' therefore the class\u2019s *docstring*.\\n',\n'context-managers':'With Statement Context Managers\\n'\n'*******************************\\n'\n'\\n'\n'A *context manager* is an object that defines the '\n'runtime context to\\n'\n'be established when executing a \"with\" statement. The '\n'context manager\\n'\n'handles the entry into, and the exit from, the desired '\n'runtime context\\n'\n'for the execution of the block of code. Context '\n'managers are normally\\n'\n'invoked using the \"with\" statement (described in section '\n'The with\\n'\n'statement), but can also be used by directly invoking '\n'their methods.\\n'\n'\\n'\n'Typical uses of context managers include saving and '\n'restoring various\\n'\n'kinds of global state, locking and unlocking resources, '\n'closing opened\\n'\n'files, etc.\\n'\n'\\n'\n'For more information on context managers, see Context '\n'Manager Types.\\n'\n'\\n'\n'object.__enter__(self)\\n'\n'\\n'\n' Enter the runtime context related to this object. The '\n'\"with\"\\n'\n' statement will bind this method\u2019s return value to the '\n'target(s)\\n'\n' specified in the \"as\" clause of the statement, if '\n'any.\\n'\n'\\n'\n'object.__exit__(self, exc_type, exc_value, traceback)\\n'\n'\\n'\n' Exit the runtime context related to this object. The '\n'parameters\\n'\n' describe the exception that caused the context to be '\n'exited. If the\\n'\n' context was exited without an exception, all three '\n'arguments will\\n'\n' be \"None\".\\n'\n'\\n'\n' If an exception is supplied, and the method wishes to '\n'suppress the\\n'\n' exception (i.e., prevent it from being propagated), '\n'it should\\n'\n' return a true value. Otherwise, the exception will be '\n'processed\\n'\n' normally upon exit from this method.\\n'\n'\\n'\n' Note that \"__exit__()\" methods should not reraise the '\n'passed-in\\n'\n' exception; this is the caller\u2019s responsibility.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 343** - The \u201cwith\u201d statement\\n'\n' The specification, background, and examples for the '\n'Python \"with\"\\n'\n' statement.\\n',\n'continue':'The \"continue\" statement\\n'\n'************************\\n'\n'\\n'\n' continue_stmt ::= \"continue\"\\n'\n'\\n'\n'\"continue\" may only occur syntactically nested in a \"for\" or '\n'\"while\"\\n'\n'loop, but not nested in a function or class definition within '\n'that\\n'\n'loop. It continues with the next cycle of the nearest enclosing '\n'loop.\\n'\n'\\n'\n'When \"continue\" passes control out of a \"try\" statement with a\\n'\n'\"finally\" clause, that \"finally\" clause is executed before '\n'really\\n'\n'starting the next loop cycle.\\n',\n'conversions':'Arithmetic conversions\\n'\n'**********************\\n'\n'\\n'\n'When a description of an arithmetic operator below uses the '\n'phrase\\n'\n'\u201cthe numeric arguments are converted to a common type\u201d, this '\n'means\\n'\n'that the operator implementation for built-in types works as '\n'follows:\\n'\n'\\n'\n'* If either argument is a complex number, the other is '\n'converted to\\n'\n' complex;\\n'\n'\\n'\n'* otherwise, if either argument is a floating point number, '\n'the other\\n'\n' is converted to floating point;\\n'\n'\\n'\n'* otherwise, both must be integers and no conversion is '\n'necessary.\\n'\n'\\n'\n'Some additional rules apply for certain operators (e.g., a '\n'string as a\\n'\n'left argument to the \u2018%\u2019 operator). Extensions must define '\n'their own\\n'\n'conversion behavior.\\n',\n'customization':'Basic customization\\n'\n'*******************\\n'\n'\\n'\n'object.__new__(cls[, ...])\\n'\n'\\n'\n' Called to create a new instance of class *cls*. '\n'\"__new__()\" is a\\n'\n' static method (special-cased so you need not declare it '\n'as such)\\n'\n' that takes the class of which an instance was requested '\n'as its\\n'\n' first argument. The remaining arguments are those '\n'passed to the\\n'\n' object constructor expression (the call to the class). '\n'The return\\n'\n' value of \"__new__()\" should be the new object instance '\n'(usually an\\n'\n' instance of *cls*).\\n'\n'\\n'\n' Typical implementations create a new instance of the '\n'class by\\n'\n' invoking the superclass\u2019s \"__new__()\" method using\\n'\n' \"super().__new__(cls[, ...])\" with appropriate arguments '\n'and then\\n'\n' modifying the newly-created instance as necessary before '\n'returning\\n'\n' it.\\n'\n'\\n'\n' If \"__new__()\" is invoked during object construction and '\n'it returns\\n'\n' an instance or subclass of *cls*, then the new '\n'instance\u2019s\\n'\n' \"__init__()\" method will be invoked like '\n'\"__init__(self[, ...])\",\\n'\n' where *self* is the new instance and the remaining '\n'arguments are\\n'\n' the same as were passed to the object constructor.\\n'\n'\\n'\n' If \"__new__()\" does not return an instance of *cls*, '\n'then the new\\n'\n' instance\u2019s \"__init__()\" method will not be invoked.\\n'\n'\\n'\n' \"__new__()\" is intended mainly to allow subclasses of '\n'immutable\\n'\n' types (like int, str, or tuple) to customize instance '\n'creation. It\\n'\n' is also commonly overridden in custom metaclasses in '\n'order to\\n'\n' customize class creation.\\n'\n'\\n'\n'object.__init__(self[, ...])\\n'\n'\\n'\n' Called after the instance has been created (by '\n'\"__new__()\"), but\\n'\n' before it is returned to the caller. The arguments are '\n'those\\n'\n' passed to the class constructor expression. If a base '\n'class has an\\n'\n' \"__init__()\" method, the derived class\u2019s \"__init__()\" '\n'method, if\\n'\n' any, must explicitly call it to ensure proper '\n'initialization of the\\n'\n' base class part of the instance; for example:\\n'\n' \"super().__init__([args...])\".\\n'\n'\\n'\n' Because \"__new__()\" and \"__init__()\" work together in '\n'constructing\\n'\n' objects (\"__new__()\" to create it, and \"__init__()\" to '\n'customize\\n'\n' it), no non-\"None\" value may be returned by '\n'\"__init__()\"; doing so\\n'\n' will cause a \"TypeError\" to be raised at runtime.\\n'\n'\\n'\n'object.__del__(self)\\n'\n'\\n'\n' Called when the instance is about to be destroyed. This '\n'is also\\n'\n' called a finalizer or (improperly) a destructor. If a '\n'base class\\n'\n' has a \"__del__()\" method, the derived class\u2019s '\n'\"__del__()\" method,\\n'\n' if any, must explicitly call it to ensure proper '\n'deletion of the\\n'\n' base class part of the instance.\\n'\n'\\n'\n' It is possible (though not recommended!) for the '\n'\"__del__()\" method\\n'\n' to postpone destruction of the instance by creating a '\n'new reference\\n'\n' to it. This is called object *resurrection*. It is\\n'\n' implementation-dependent whether \"__del__()\" is called a '\n'second\\n'\n' time when a resurrected object is about to be destroyed; '\n'the\\n'\n' current *CPython* implementation only calls it once.\\n'\n'\\n'\n' It is not guaranteed that \"__del__()\" methods are called '\n'for\\n'\n' objects that still exist when the interpreter exits.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' \"del x\" doesn\u2019t directly call \"x.__del__()\" \u2014 the '\n'former\\n'\n' decrements the reference count for \"x\" by one, and the '\n'latter is\\n'\n' only called when \"x\"\u2019s reference count reaches zero.\\n'\n'\\n'\n' **CPython implementation detail:** It is possible for a '\n'reference\\n'\n' cycle to prevent the reference count of an object from '\n'going to\\n'\n' zero. In this case, the cycle will be later detected '\n'and deleted\\n'\n' by the *cyclic garbage collector*. A common cause of '\n'reference\\n'\n' cycles is when an exception has been caught in a local '\n'variable.\\n'\n' The frame\u2019s locals then reference the exception, which '\n'references\\n'\n' its own traceback, which references the locals of all '\n'frames caught\\n'\n' in the traceback.\\n'\n'\\n'\n' See also: Documentation for the \"gc\" module.\\n'\n'\\n'\n' Warning:\\n'\n'\\n'\n' Due to the precarious circumstances under which '\n'\"__del__()\"\\n'\n' methods are invoked, exceptions that occur during '\n'their execution\\n'\n' are ignored, and a warning is printed to \"sys.stderr\" '\n'instead.\\n'\n' In particular:\\n'\n'\\n'\n' * \"__del__()\" can be invoked when arbitrary code is '\n'being\\n'\n' executed, including from any arbitrary thread. If '\n'\"__del__()\"\\n'\n' needs to take a lock or invoke any other blocking '\n'resource, it\\n'\n' may deadlock as the resource may already be taken by '\n'the code\\n'\n' that gets interrupted to execute \"__del__()\".\\n'\n'\\n'\n' * \"__del__()\" can be executed during interpreter '\n'shutdown. As a\\n'\n' consequence, the global variables it needs to access '\n'(including\\n'\n' other modules) may already have been deleted or set '\n'to \"None\".\\n'\n' Python guarantees that globals whose name begins '\n'with a single\\n'\n' underscore are deleted from their module before '\n'other globals\\n'\n' are deleted; if no other references to such globals '\n'exist, this\\n'\n' may help in assuring that imported modules are still '\n'available\\n'\n' at the time when the \"__del__()\" method is called.\\n'\n'\\n'\n'object.__repr__(self)\\n'\n'\\n'\n' Called by the \"repr()\" built-in function to compute the '\n'\u201cofficial\u201d\\n'\n' string representation of an object. If at all possible, '\n'this\\n'\n' should look like a valid Python expression that could be '\n'used to\\n'\n' recreate an object with the same value (given an '\n'appropriate\\n'\n' environment). If this is not possible, a string of the '\n'form\\n'\n' \"<...some useful description...>\" should be returned. '\n'The return\\n'\n' value must be a string object. If a class defines '\n'\"__repr__()\" but\\n'\n' not \"__str__()\", then \"__repr__()\" is also used when an '\n'\u201cinformal\u201d\\n'\n' string representation of instances of that class is '\n'required.\\n'\n'\\n'\n' This is typically used for debugging, so it is important '\n'that the\\n'\n' representation is information-rich and unambiguous.\\n'\n'\\n'\n'object.__str__(self)\\n'\n'\\n'\n' Called by \"str(object)\" and the built-in functions '\n'\"format()\" and\\n'\n' \"print()\" to compute the \u201cinformal\u201d or nicely printable '\n'string\\n'\n' representation of an object. The return value must be a '\n'string\\n'\n' object.\\n'\n'\\n'\n' This method differs from \"object.__repr__()\" in that '\n'there is no\\n'\n' expectation that \"__str__()\" return a valid Python '\n'expression: a\\n'\n' more convenient or concise representation can be used.\\n'\n'\\n'\n' The default implementation defined by the built-in type '\n'\"object\"\\n'\n' calls \"object.__repr__()\".\\n'\n'\\n'\n'object.__bytes__(self)\\n'\n'\\n'\n' Called by bytes to compute a byte-string representation '\n'of an\\n'\n' object. This should return a \"bytes\" object.\\n'\n'\\n'\n'object.__format__(self, format_spec)\\n'\n'\\n'\n' Called by the \"format()\" built-in function, and by '\n'extension,\\n'\n' evaluation of formatted string literals and the '\n'\"str.format()\"\\n'\n' method, to produce a \u201cformatted\u201d string representation '\n'of an\\n'\n' object. The *format_spec* argument is a string that '\n'contains a\\n'\n' description of the formatting options desired. The '\n'interpretation\\n'\n' of the *format_spec* argument is up to the type '\n'implementing\\n'\n' \"__format__()\", however most classes will either '\n'delegate\\n'\n' formatting to one of the built-in types, or use a '\n'similar\\n'\n' formatting option syntax.\\n'\n'\\n'\n' See Format Specification Mini-Language for a description '\n'of the\\n'\n' standard formatting syntax.\\n'\n'\\n'\n' The return value must be a string object.\\n'\n'\\n'\n' Changed in version 3.4: The __format__ method of '\n'\"object\" itself\\n'\n' raises a \"TypeError\" if passed any non-empty string.\\n'\n'\\n'\n' Changed in version 3.7: \"object.__format__(x, \\'\\')\" is '\n'now\\n'\n' equivalent to \"str(x)\" rather than \"format(str(x), '\n'\\'\\')\".\\n'\n'\\n'\n'object.__lt__(self, other)\\n'\n'object.__le__(self, other)\\n'\n'object.__eq__(self, other)\\n'\n'object.__ne__(self, other)\\n'\n'object.__gt__(self, other)\\n'\n'object.__ge__(self, other)\\n'\n'\\n'\n' These are the so-called \u201crich comparison\u201d methods. The\\n'\n' correspondence between operator symbols and method names '\n'is as\\n'\n' follows: \"xy\" calls\\n'\n' \"x.__gt__(y)\", and \"x>=y\" calls \"x.__ge__(y)\".\\n'\n'\\n'\n' A rich comparison method may return the singleton '\n'\"NotImplemented\"\\n'\n' if it does not implement the operation for a given pair '\n'of\\n'\n' arguments. By convention, \"False\" and \"True\" are '\n'returned for a\\n'\n' successful comparison. However, these methods can return '\n'any value,\\n'\n' so if the comparison operator is used in a Boolean '\n'context (e.g.,\\n'\n' in the condition of an \"if\" statement), Python will call '\n'\"bool()\"\\n'\n' on the value to determine if the result is true or '\n'false.\\n'\n'\\n'\n' By default, \"object\" implements \"__eq__()\" by using '\n'\"is\", returning\\n'\n' \"NotImplemented\" in the case of a false comparison: '\n'\"True if x is y\\n'\n' else NotImplemented\". For \"__ne__()\", by default it '\n'delegates to\\n'\n' \"__eq__()\" and inverts the result unless it is '\n'\"NotImplemented\".\\n'\n' There are no other implied relationships among the '\n'comparison\\n'\n' operators or default implementations; for example, the '\n'truth of\\n'\n' \"(x.__hash__\".\\n'\n'\\n'\n' If a class that does not override \"__eq__()\" wishes to '\n'suppress\\n'\n' hash support, it should include \"__hash__ = None\" in the '\n'class\\n'\n' definition. A class which defines its own \"__hash__()\" '\n'that\\n'\n' explicitly raises a \"TypeError\" would be incorrectly '\n'identified as\\n'\n' hashable by an \"isinstance(obj, '\n'collections.abc.Hashable)\" call.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' By default, the \"__hash__()\" values of str and bytes '\n'objects are\\n'\n' \u201csalted\u201d with an unpredictable random value. Although '\n'they\\n'\n' remain constant within an individual Python process, '\n'they are not\\n'\n' predictable between repeated invocations of '\n'Python.This is\\n'\n' intended to provide protection against a '\n'denial-of-service caused\\n'\n' by carefully-chosen inputs that exploit the worst '\n'case\\n'\n' performance of a dict insertion, O(n^2) complexity. '\n'See\\n'\n' http://www.ocert.org/advisories/ocert-2011-003.html '\n'for\\n'\n' details.Changing hash values affects the iteration '\n'order of sets.\\n'\n' Python has never made guarantees about this ordering '\n'(and it\\n'\n' typically varies between 32-bit and 64-bit builds).See '\n'also\\n'\n' \"PYTHONHASHSEED\".\\n'\n'\\n'\n' Changed in version 3.3: Hash randomization is enabled by '\n'default.\\n'\n'\\n'\n'object.__bool__(self)\\n'\n'\\n'\n' Called to implement truth value testing and the built-in '\n'operation\\n'\n' \"bool()\"; should return \"False\" or \"True\". When this '\n'method is not\\n'\n' defined, \"__len__()\" is called, if it is defined, and '\n'the object is\\n'\n' considered true if its result is nonzero. If a class '\n'defines\\n'\n' neither \"__len__()\" nor \"__bool__()\", all its instances '\n'are\\n'\n' considered true.\\n',\n'debugger':'\"pdb\" \u2014 The Python Debugger\\n'\n'***************************\\n'\n'\\n'\n'**Source code:** Lib/pdb.py\\n'\n'\\n'\n'======================================================================\\n'\n'\\n'\n'The module \"pdb\" defines an interactive source code debugger '\n'for\\n'\n'Python programs. It supports setting (conditional) breakpoints '\n'and\\n'\n'single stepping at the source line level, inspection of stack '\n'frames,\\n'\n'source code listing, and evaluation of arbitrary Python code in '\n'the\\n'\n'context of any stack frame. It also supports post-mortem '\n'debugging\\n'\n'and can be called under program control.\\n'\n'\\n'\n'The debugger is extensible \u2013 it is actually defined as the '\n'class\\n'\n'\"Pdb\". This is currently undocumented but easily understood by '\n'reading\\n'\n'the source. The extension interface uses the modules \"bdb\" and '\n'\"cmd\".\\n'\n'\\n'\n'The debugger\u2019s prompt is \"(Pdb)\". Typical usage to run a program '\n'under\\n'\n'control of the debugger is:\\n'\n'\\n'\n' >>> import pdb\\n'\n' >>> import mymodule\\n'\n\" >>> pdb.run('mymodule.test()')\\n\"\n' > (0)?()\\n'\n' (Pdb) continue\\n'\n' > (1)?()\\n'\n' (Pdb) continue\\n'\n\" NameError: 'spam'\\n\"\n' > (1)?()\\n'\n' (Pdb)\\n'\n'\\n'\n'Changed in version 3.3: Tab-completion via the \"readline\" module '\n'is\\n'\n'available for commands and command arguments, e.g. the current '\n'global\\n'\n'and local names are offered as arguments of the \"p\" command.\\n'\n'\\n'\n'\"pdb.py\" can also be invoked as a script to debug other '\n'scripts. For\\n'\n'example:\\n'\n'\\n'\n' python3 -m pdb myscript.py\\n'\n'\\n'\n'When invoked as a script, pdb will automatically enter '\n'post-mortem\\n'\n'debugging if the program being debugged exits abnormally. After '\n'post-\\n'\n'mortem debugging (or after normal exit of the program), pdb '\n'will\\n'\n'restart the program. Automatic restarting preserves pdb\u2019s state '\n'(such\\n'\n'as breakpoints) and in most cases is more useful than quitting '\n'the\\n'\n'debugger upon program\u2019s exit.\\n'\n'\\n'\n'New in version 3.2: \"pdb.py\" now accepts a \"-c\" option that '\n'executes\\n'\n'commands as if given in a \".pdbrc\" file, see Debugger Commands.\\n'\n'\\n'\n'New in version 3.7: \"pdb.py\" now accepts a \"-m\" option that '\n'execute\\n'\n'modules similar to the way \"python3 -m\" does. As with a script, '\n'the\\n'\n'debugger will pause execution just before the first line of the\\n'\n'module.\\n'\n'\\n'\n'The typical usage to break into the debugger from a running '\n'program is\\n'\n'to insert\\n'\n'\\n'\n' import pdb; pdb.set_trace()\\n'\n'\\n'\n'at the location you want to break into the debugger. You can '\n'then\\n'\n'step through the code following this statement, and continue '\n'running\\n'\n'without the debugger using the \"continue\" command.\\n'\n'\\n'\n'New in version 3.7: The built-in \"breakpoint()\", when called '\n'with\\n'\n'defaults, can be used instead of \"import pdb; pdb.set_trace()\".\\n'\n'\\n'\n'The typical usage to inspect a crashed program is:\\n'\n'\\n'\n' >>> import pdb\\n'\n' >>> import mymodule\\n'\n' >>> mymodule.test()\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 1, in \\n'\n' File \"./mymodule.py\", line 4, in test\\n'\n' test2()\\n'\n' File \"./mymodule.py\", line 3, in test2\\n'\n' print(spam)\\n'\n' NameError: spam\\n'\n' >>> pdb.pm()\\n'\n' > ./mymodule.py(3)test2()\\n'\n' -> print(spam)\\n'\n' (Pdb)\\n'\n'\\n'\n'The module defines the following functions; each enters the '\n'debugger\\n'\n'in a slightly different way:\\n'\n'\\n'\n'pdb.run(statement, globals=None, locals=None)\\n'\n'\\n'\n' Execute the *statement* (given as a string or a code object) '\n'under\\n'\n' debugger control. The debugger prompt appears before any '\n'code is\\n'\n' executed; you can set breakpoints and type \"continue\", or you '\n'can\\n'\n' step through the statement using \"step\" or \"next\" (all these\\n'\n' commands are explained below). The optional *globals* and '\n'*locals*\\n'\n' arguments specify the environment in which the code is '\n'executed; by\\n'\n' default the dictionary of the module \"__main__\" is used. '\n'(See the\\n'\n' explanation of the built-in \"exec()\" or \"eval()\" functions.)\\n'\n'\\n'\n'pdb.runeval(expression, globals=None, locals=None)\\n'\n'\\n'\n' Evaluate the *expression* (given as a string or a code '\n'object)\\n'\n' under debugger control. When \"runeval()\" returns, it returns '\n'the\\n'\n' value of the expression. Otherwise this function is similar '\n'to\\n'\n' \"run()\".\\n'\n'\\n'\n'pdb.runcall(function, *args, **kwds)\\n'\n'\\n'\n' Call the *function* (a function or method object, not a '\n'string)\\n'\n' with the given arguments. When \"runcall()\" returns, it '\n'returns\\n'\n' whatever the function call returned. The debugger prompt '\n'appears\\n'\n' as soon as the function is entered.\\n'\n'\\n'\n'pdb.set_trace(*, header=None)\\n'\n'\\n'\n' Enter the debugger at the calling stack frame. This is '\n'useful to\\n'\n' hard-code a breakpoint at a given point in a program, even if '\n'the\\n'\n' code is not otherwise being debugged (e.g. when an assertion\\n'\n' fails). If given, *header* is printed to the console just '\n'before\\n'\n' debugging begins.\\n'\n'\\n'\n' Changed in version 3.7: The keyword-only argument *header*.\\n'\n'\\n'\n'pdb.post_mortem(traceback=None)\\n'\n'\\n'\n' Enter post-mortem debugging of the given *traceback* object. '\n'If no\\n'\n' *traceback* is given, it uses the one of the exception that '\n'is\\n'\n' currently being handled (an exception must be being handled '\n'if the\\n'\n' default is to be used).\\n'\n'\\n'\n'pdb.pm()\\n'\n'\\n'\n' Enter post-mortem debugging of the traceback found in\\n'\n' \"sys.last_traceback\".\\n'\n'\\n'\n'The \"run*\" functions and \"set_trace()\" are aliases for '\n'instantiating\\n'\n'the \"Pdb\" class and calling the method of the same name. If you '\n'want\\n'\n'to access further features, you have to do this yourself:\\n'\n'\\n'\n\"class pdb.Pdb(completekey='tab', stdin=None, stdout=None, \"\n'skip=None, nosigint=False, readrc=True)\\n'\n'\\n'\n' \"Pdb\" is the debugger class.\\n'\n'\\n'\n' The *completekey*, *stdin* and *stdout* arguments are passed '\n'to the\\n'\n' underlying \"cmd.Cmd\" class; see the description there.\\n'\n'\\n'\n' The *skip* argument, if given, must be an iterable of '\n'glob-style\\n'\n' module name patterns. The debugger will not step into frames '\n'that\\n'\n' originate in a module that matches one of these patterns. '\n'[1]\\n'\n'\\n'\n' By default, Pdb sets a handler for the SIGINT signal (which '\n'is sent\\n'\n' when the user presses \"Ctrl-C\" on the console) when you give '\n'a\\n'\n' \"continue\" command. This allows you to break into the '\n'debugger\\n'\n' again by pressing \"Ctrl-C\". If you want Pdb not to touch '\n'the\\n'\n' SIGINT handler, set *nosigint* to true.\\n'\n'\\n'\n' The *readrc* argument defaults to true and controls whether '\n'Pdb\\n'\n' will load .pdbrc files from the filesystem.\\n'\n'\\n'\n' Example call to enable tracing with *skip*:\\n'\n'\\n'\n\" import pdb; pdb.Pdb(skip=['django.*']).set_trace()\\n\"\n'\\n'\n' Raises an auditing event \"pdb.Pdb\" with no arguments.\\n'\n'\\n'\n' New in version 3.1: The *skip* argument.\\n'\n'\\n'\n' New in version 3.2: The *nosigint* argument. Previously, a '\n'SIGINT\\n'\n' handler was never set by Pdb.\\n'\n'\\n'\n' Changed in version 3.6: The *readrc* argument.\\n'\n'\\n'\n' run(statement, globals=None, locals=None)\\n'\n' runeval(expression, globals=None, locals=None)\\n'\n' runcall(function, *args, **kwds)\\n'\n' set_trace()\\n'\n'\\n'\n' See the documentation for the functions explained above.\\n'\n'\\n'\n'\\n'\n'Debugger Commands\\n'\n'=================\\n'\n'\\n'\n'The commands recognized by the debugger are listed below. Most\\n'\n'commands can be abbreviated to one or two letters as indicated; '\n'e.g.\\n'\n'\"h(elp)\" means that either \"h\" or \"help\" can be used to enter '\n'the help\\n'\n'command (but not \"he\" or \"hel\", nor \"H\" or \"Help\" or \"HELP\").\\n'\n'Arguments to commands must be separated by whitespace (spaces '\n'or\\n'\n'tabs). Optional arguments are enclosed in square brackets '\n'(\"[]\") in\\n'\n'the command syntax; the square brackets must not be typed.\\n'\n'Alternatives in the command syntax are separated by a vertical '\n'bar\\n'\n'(\"|\").\\n'\n'\\n'\n'Entering a blank line repeats the last command entered. '\n'Exception: if\\n'\n'the last command was a \"list\" command, the next 11 lines are '\n'listed.\\n'\n'\\n'\n'Commands that the debugger doesn\u2019t recognize are assumed to be '\n'Python\\n'\n'statements and are executed in the context of the program being\\n'\n'debugged. Python statements can also be prefixed with an '\n'exclamation\\n'\n'point (\"!\"). This is a powerful way to inspect the program '\n'being\\n'\n'debugged; it is even possible to change a variable or call a '\n'function.\\n'\n'When an exception occurs in such a statement, the exception name '\n'is\\n'\n'printed but the debugger\u2019s state is not changed.\\n'\n'\\n'\n'The debugger supports aliases. Aliases can have parameters '\n'which\\n'\n'allows one a certain level of adaptability to the context under\\n'\n'examination.\\n'\n'\\n'\n'Multiple commands may be entered on a single line, separated by '\n'\";;\".\\n'\n'(A single \";\" is not used as it is the separator for multiple '\n'commands\\n'\n'in a line that is passed to the Python parser.) No intelligence '\n'is\\n'\n'applied to separating the commands; the input is split at the '\n'first\\n'\n'\";;\" pair, even if it is in the middle of a quoted string.\\n'\n'\\n'\n'If a file \".pdbrc\" exists in the user\u2019s home directory or in '\n'the\\n'\n'current directory, it is read in and executed as if it had been '\n'typed\\n'\n'at the debugger prompt. This is particularly useful for '\n'aliases. If\\n'\n'both files exist, the one in the home directory is read first '\n'and\\n'\n'aliases defined there can be overridden by the local file.\\n'\n'\\n'\n'Changed in version 3.2: \".pdbrc\" can now contain commands that\\n'\n'continue debugging, such as \"continue\" or \"next\". Previously, '\n'these\\n'\n'commands had no effect.\\n'\n'\\n'\n'h(elp) [command]\\n'\n'\\n'\n' Without argument, print the list of available commands. With '\n'a\\n'\n' *command* as argument, print help about that command. \"help '\n'pdb\"\\n'\n' displays the full documentation (the docstring of the \"pdb\"\\n'\n' module). Since the *command* argument must be an identifier, '\n'\"help\\n'\n' exec\" must be entered to get help on the \"!\" command.\\n'\n'\\n'\n'w(here)\\n'\n'\\n'\n' Print a stack trace, with the most recent frame at the '\n'bottom. An\\n'\n' arrow indicates the current frame, which determines the '\n'context of\\n'\n' most commands.\\n'\n'\\n'\n'd(own) [count]\\n'\n'\\n'\n' Move the current frame *count* (default one) levels down in '\n'the\\n'\n' stack trace (to a newer frame).\\n'\n'\\n'\n'u(p) [count]\\n'\n'\\n'\n' Move the current frame *count* (default one) levels up in the '\n'stack\\n'\n' trace (to an older frame).\\n'\n'\\n'\n'b(reak) [([filename:]lineno | function) [, condition]]\\n'\n'\\n'\n' With a *lineno* argument, set a break there in the current '\n'file.\\n'\n' With a *function* argument, set a break at the first '\n'executable\\n'\n' statement within that function. The line number may be '\n'prefixed\\n'\n' with a filename and a colon, to specify a breakpoint in '\n'another\\n'\n' file (probably one that hasn\u2019t been loaded yet). The file '\n'is\\n'\n' searched on \"sys.path\". Note that each breakpoint is '\n'assigned a\\n'\n' number to which all the other breakpoint commands refer.\\n'\n'\\n'\n' If a second argument is present, it is an expression which '\n'must\\n'\n' evaluate to true before the breakpoint is honored.\\n'\n'\\n'\n' Without argument, list all breaks, including for each '\n'breakpoint,\\n'\n' the number of times that breakpoint has been hit, the '\n'current\\n'\n' ignore count, and the associated condition if any.\\n'\n'\\n'\n'tbreak [([filename:]lineno | function) [, condition]]\\n'\n'\\n'\n' Temporary breakpoint, which is removed automatically when it '\n'is\\n'\n' first hit. The arguments are the same as for \"break\".\\n'\n'\\n'\n'cl(ear) [filename:lineno | bpnumber ...]\\n'\n'\\n'\n' With a *filename:lineno* argument, clear all the breakpoints '\n'at\\n'\n' this line. With a space separated list of breakpoint numbers, '\n'clear\\n'\n' those breakpoints. Without argument, clear all breaks (but '\n'first\\n'\n' ask confirmation).\\n'\n'\\n'\n'disable [bpnumber ...]\\n'\n'\\n'\n' Disable the breakpoints given as a space separated list of\\n'\n' breakpoint numbers. Disabling a breakpoint means it cannot '\n'cause\\n'\n' the program to stop execution, but unlike clearing a '\n'breakpoint, it\\n'\n' remains in the list of breakpoints and can be (re-)enabled.\\n'\n'\\n'\n'enable [bpnumber ...]\\n'\n'\\n'\n' Enable the breakpoints specified.\\n'\n'\\n'\n'ignore bpnumber [count]\\n'\n'\\n'\n' Set the ignore count for the given breakpoint number. If '\n'count is\\n'\n' omitted, the ignore count is set to 0. A breakpoint becomes '\n'active\\n'\n' when the ignore count is zero. When non-zero, the count is\\n'\n' decremented each time the breakpoint is reached and the '\n'breakpoint\\n'\n' is not disabled and any associated condition evaluates to '\n'true.\\n'\n'\\n'\n'condition bpnumber [condition]\\n'\n'\\n'\n' Set a new *condition* for the breakpoint, an expression which '\n'must\\n'\n' evaluate to true before the breakpoint is honored. If '\n'*condition*\\n'\n' is absent, any existing condition is removed; i.e., the '\n'breakpoint\\n'\n' is made unconditional.\\n'\n'\\n'\n'commands [bpnumber]\\n'\n'\\n'\n' Specify a list of commands for breakpoint number *bpnumber*. '\n'The\\n'\n' commands themselves appear on the following lines. Type a '\n'line\\n'\n' containing just \"end\" to terminate the commands. An example:\\n'\n'\\n'\n' (Pdb) commands 1\\n'\n' (com) p some_variable\\n'\n' (com) end\\n'\n' (Pdb)\\n'\n'\\n'\n' To remove all commands from a breakpoint, type \"commands\" '\n'and\\n'\n' follow it immediately with \"end\"; that is, give no commands.\\n'\n'\\n'\n' With no *bpnumber* argument, \"commands\" refers to the last\\n'\n' breakpoint set.\\n'\n'\\n'\n' You can use breakpoint commands to start your program up '\n'again.\\n'\n' Simply use the \"continue\" command, or \"step\", or any other '\n'command\\n'\n' that resumes execution.\\n'\n'\\n'\n' Specifying any command resuming execution (currently '\n'\"continue\",\\n'\n' \"step\", \"next\", \"return\", \"jump\", \"quit\" and their '\n'abbreviations)\\n'\n' terminates the command list (as if that command was '\n'immediately\\n'\n' followed by end). This is because any time you resume '\n'execution\\n'\n' (even with a simple next or step), you may encounter another\\n'\n' breakpoint\u2014which could have its own command list, leading to\\n'\n' ambiguities about which list to execute.\\n'\n'\\n'\n' If you use the \u2018silent\u2019 command in the command list, the '\n'usual\\n'\n' message about stopping at a breakpoint is not printed. This '\n'may be\\n'\n' desirable for breakpoints that are to print a specific '\n'message and\\n'\n' then continue. If none of the other commands print anything, '\n'you\\n'\n' see no sign that the breakpoint was reached.\\n'\n'\\n'\n's(tep)\\n'\n'\\n'\n' Execute the current line, stop at the first possible '\n'occasion\\n'\n' (either in a function that is called or on the next line in '\n'the\\n'\n' current function).\\n'\n'\\n'\n'n(ext)\\n'\n'\\n'\n' Continue execution until the next line in the current '\n'function is\\n'\n' reached or it returns. (The difference between \"next\" and '\n'\"step\"\\n'\n' is that \"step\" stops inside a called function, while \"next\"\\n'\n' executes called functions at (nearly) full speed, only '\n'stopping at\\n'\n' the next line in the current function.)\\n'\n'\\n'\n'unt(il) [lineno]\\n'\n'\\n'\n' Without argument, continue execution until the line with a '\n'number\\n'\n' greater than the current one is reached.\\n'\n'\\n'\n' With a line number, continue execution until a line with a '\n'number\\n'\n' greater or equal to that is reached. In both cases, also '\n'stop when\\n'\n' the current frame returns.\\n'\n'\\n'\n' Changed in version 3.2: Allow giving an explicit line '\n'number.\\n'\n'\\n'\n'r(eturn)\\n'\n'\\n'\n' Continue execution until the current function returns.\\n'\n'\\n'\n'c(ont(inue))\\n'\n'\\n'\n' Continue execution, only stop when a breakpoint is '\n'encountered.\\n'\n'\\n'\n'j(ump) lineno\\n'\n'\\n'\n' Set the next line that will be executed. Only available in '\n'the\\n'\n' bottom-most frame. This lets you jump back and execute code '\n'again,\\n'\n' or jump forward to skip code that you don\u2019t want to run.\\n'\n'\\n'\n' It should be noted that not all jumps are allowed \u2013 for '\n'instance it\\n'\n' is not possible to jump into the middle of a \"for\" loop or '\n'out of a\\n'\n' \"finally\" clause.\\n'\n'\\n'\n'l(ist) [first[, last]]\\n'\n'\\n'\n' List source code for the current file. Without arguments, '\n'list 11\\n'\n' lines around the current line or continue the previous '\n'listing.\\n'\n' With \".\" as argument, list 11 lines around the current line. '\n'With\\n'\n' one argument, list 11 lines around at that line. With two\\n'\n' arguments, list the given range; if the second argument is '\n'less\\n'\n' than the first, it is interpreted as a count.\\n'\n'\\n'\n' The current line in the current frame is indicated by \"->\". '\n'If an\\n'\n' exception is being debugged, the line where the exception '\n'was\\n'\n' originally raised or propagated is indicated by \">>\", if it '\n'differs\\n'\n' from the current line.\\n'\n'\\n'\n' New in version 3.2: The \">>\" marker.\\n'\n'\\n'\n'll | longlist\\n'\n'\\n'\n' List all source code for the current function or frame.\\n'\n' Interesting lines are marked as for \"list\".\\n'\n'\\n'\n' New in version 3.2.\\n'\n'\\n'\n'a(rgs)\\n'\n'\\n'\n' Print the argument list of the current function.\\n'\n'\\n'\n'p expression\\n'\n'\\n'\n' Evaluate the *expression* in the current context and print '\n'its\\n'\n' value.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' \"print()\" can also be used, but is not a debugger command \u2014 '\n'this\\n'\n' executes the Python \"print()\" function.\\n'\n'\\n'\n'pp expression\\n'\n'\\n'\n' Like the \"p\" command, except the value of the expression is '\n'pretty-\\n'\n' printed using the \"pprint\" module.\\n'\n'\\n'\n'whatis expression\\n'\n'\\n'\n' Print the type of the *expression*.\\n'\n'\\n'\n'source expression\\n'\n'\\n'\n' Try to get source code for the given object and display it.\\n'\n'\\n'\n' New in version 3.2.\\n'\n'\\n'\n'display [expression]\\n'\n'\\n'\n' Display the value of the expression if it changed, each time\\n'\n' execution stops in the current frame.\\n'\n'\\n'\n' Without expression, list all display expressions for the '\n'current\\n'\n' frame.\\n'\n'\\n'\n' New in version 3.2.\\n'\n'\\n'\n'undisplay [expression]\\n'\n'\\n'\n' Do not display the expression any more in the current frame.\\n'\n' Without expression, clear all display expressions for the '\n'current\\n'\n' frame.\\n'\n'\\n'\n' New in version 3.2.\\n'\n'\\n'\n'interact\\n'\n'\\n'\n' Start an interactive interpreter (using the \"code\" module) '\n'whose\\n'\n' global namespace contains all the (global and local) names '\n'found in\\n'\n' the current scope.\\n'\n'\\n'\n' New in version 3.2.\\n'\n'\\n'\n'alias [name [command]]\\n'\n'\\n'\n' Create an alias called *name* that executes *command*. The '\n'command\\n'\n' must *not* be enclosed in quotes. Replaceable parameters can '\n'be\\n'\n' indicated by \"%1\", \"%2\", and so on, while \"%*\" is replaced by '\n'all\\n'\n' the parameters. If no command is given, the current alias '\n'for\\n'\n' *name* is shown. If no arguments are given, all aliases are '\n'listed.\\n'\n'\\n'\n' Aliases may be nested and can contain anything that can be '\n'legally\\n'\n' typed at the pdb prompt. Note that internal pdb commands '\n'*can* be\\n'\n' overridden by aliases. Such a command is then hidden until '\n'the\\n'\n' alias is removed. Aliasing is recursively applied to the '\n'first\\n'\n' word of the command line; all other words in the line are '\n'left\\n'\n' alone.\\n'\n'\\n'\n' As an example, here are two useful aliases (especially when '\n'placed\\n'\n' in the \".pdbrc\" file):\\n'\n'\\n'\n' # Print instance variables (usage \"pi classInst\")\\n'\n' alias pi for k in %1.__dict__.keys(): '\n'print(\"%1.\",k,\"=\",%1.__dict__[k])\\n'\n' # Print instance variables in self\\n'\n' alias ps pi self\\n'\n'\\n'\n'unalias name\\n'\n'\\n'\n' Delete the specified alias.\\n'\n'\\n'\n'! statement\\n'\n'\\n'\n' Execute the (one-line) *statement* in the context of the '\n'current\\n'\n' stack frame. The exclamation point can be omitted unless the '\n'first\\n'\n' word of the statement resembles a debugger command. To set '\n'a\\n'\n' global variable, you can prefix the assignment command with '\n'a\\n'\n' \"global\" statement on the same line, e.g.:\\n'\n'\\n'\n\" (Pdb) global list_options; list_options = ['-l']\\n\"\n' (Pdb)\\n'\n'\\n'\n'run [args ...]\\n'\n'restart [args ...]\\n'\n'\\n'\n' Restart the debugged Python program. If an argument is '\n'supplied,\\n'\n' it is split with \"shlex\" and the result is used as the new\\n'\n' \"sys.argv\". History, breakpoints, actions and debugger '\n'options are\\n'\n' preserved. \"restart\" is an alias for \"run\".\\n'\n'\\n'\n'q(uit)\\n'\n'\\n'\n' Quit from the debugger. The program being executed is '\n'aborted.\\n'\n'\\n'\n'debug code\\n'\n'\\n'\n' Enter a recursive debugger that steps through the code '\n'argument\\n'\n' (which is an arbitrary expression or statement to be executed '\n'in\\n'\n' the current environment).\\n'\n'\\n'\n'retval\\n'\n'\\n'\n' Print the return value for the last return of a function.\\n'\n'\\n'\n'-[ Footnotes ]-\\n'\n'\\n'\n'[1] Whether a frame is considered to originate in a certain '\n'module is\\n'\n' determined by the \"__name__\" in the frame globals.\\n',\n'del':'The \"del\" statement\\n'\n'*******************\\n'\n'\\n'\n' del_stmt ::= \"del\" target_list\\n'\n'\\n'\n'Deletion is recursively defined very similar to the way assignment '\n'is\\n'\n'defined. Rather than spelling it out in full details, here are some\\n'\n'hints.\\n'\n'\\n'\n'Deletion of a target list recursively deletes each target, from left\\n'\n'to right.\\n'\n'\\n'\n'Deletion of a name removes the binding of that name from the local '\n'or\\n'\n'global namespace, depending on whether the name occurs in a \"global\"\\n'\n'statement in the same code block. If the name is unbound, a\\n'\n'\"NameError\" exception will be raised.\\n'\n'\\n'\n'Deletion of attribute references, subscriptions and slicings is '\n'passed\\n'\n'to the primary object involved; deletion of a slicing is in general\\n'\n'equivalent to assignment of an empty slice of the right type (but '\n'even\\n'\n'this is determined by the sliced object).\\n'\n'\\n'\n'Changed in version 3.2: Previously it was illegal to delete a name\\n'\n'from the local namespace if it occurs as a free variable in a nested\\n'\n'block.\\n',\n'dict':'Dictionary displays\\n'\n'*******************\\n'\n'\\n'\n'A dictionary display is a possibly empty series of key/datum pairs\\n'\n'enclosed in curly braces:\\n'\n'\\n'\n' dict_display ::= \"{\" [key_datum_list | dict_comprehension] '\n'\"}\"\\n'\n' key_datum_list ::= key_datum (\",\" key_datum)* [\",\"]\\n'\n' key_datum ::= expression \":\" expression | \"**\" or_expr\\n'\n' dict_comprehension ::= expression \":\" expression comp_for\\n'\n'\\n'\n'A dictionary display yields a new dictionary object.\\n'\n'\\n'\n'If a comma-separated sequence of key/datum pairs is given, they are\\n'\n'evaluated from left to right to define the entries of the '\n'dictionary:\\n'\n'each key object is used as a key into the dictionary to store the\\n'\n'corresponding datum. This means that you can specify the same key\\n'\n'multiple times in the key/datum list, and the final dictionary\u2019s '\n'value\\n'\n'for that key will be the last one given.\\n'\n'\\n'\n'A double asterisk \"**\" denotes *dictionary unpacking*. Its operand\\n'\n'must be a *mapping*. Each mapping item is added to the new\\n'\n'dictionary. Later values replace values already set by earlier\\n'\n'key/datum pairs and earlier dictionary unpackings.\\n'\n'\\n'\n'New in version 3.5: Unpacking into dictionary displays, originally\\n'\n'proposed by **PEP 448**.\\n'\n'\\n'\n'A dict comprehension, in contrast to list and set comprehensions,\\n'\n'needs two expressions separated with a colon followed by the usual\\n'\n'\u201cfor\u201d and \u201cif\u201d clauses. When the comprehension is run, the '\n'resulting\\n'\n'key and value elements are inserted in the new dictionary in the '\n'order\\n'\n'they are produced.\\n'\n'\\n'\n'Restrictions on the types of the key values are listed earlier in\\n'\n'section The standard type hierarchy. (To summarize, the key type\\n'\n'should be *hashable*, which excludes all mutable objects.) Clashes\\n'\n'between duplicate keys are not detected; the last datum (textually\\n'\n'rightmost in the display) stored for a given key value prevails.\\n'\n'\\n'\n'Changed in version 3.8: Prior to Python 3.8, in dict '\n'comprehensions,\\n'\n'the evaluation order of key and value was not well-defined. In\\n'\n'CPython, the value was evaluated before the key. Starting with '\n'3.8,\\n'\n'the key is evaluated before the value, as proposed by **PEP 572**.\\n',\n'dynamic-features':'Interaction with dynamic features\\n'\n'*********************************\\n'\n'\\n'\n'Name resolution of free variables occurs at runtime, not '\n'at compile\\n'\n'time. This means that the following code will print 42:\\n'\n'\\n'\n' i = 10\\n'\n' def f():\\n'\n' print(i)\\n'\n' i = 42\\n'\n' f()\\n'\n'\\n'\n'The \"eval()\" and \"exec()\" functions do not have access '\n'to the full\\n'\n'environment for resolving names. Names may be resolved '\n'in the local\\n'\n'and global namespaces of the caller. Free variables are '\n'not resolved\\n'\n'in the nearest enclosing namespace, but in the global '\n'namespace. [1]\\n'\n'The \"exec()\" and \"eval()\" functions have optional '\n'arguments to\\n'\n'override the global and local namespace. If only one '\n'namespace is\\n'\n'specified, it is used for both.\\n',\n'else':'The \"if\" statement\\n'\n'******************\\n'\n'\\n'\n'The \"if\" statement is used for conditional execution:\\n'\n'\\n'\n' if_stmt ::= \"if\" assignment_expression \":\" suite\\n'\n' (\"elif\" assignment_expression \":\" suite)*\\n'\n' [\"else\" \":\" suite]\\n'\n'\\n'\n'It selects exactly one of the suites by evaluating the expressions '\n'one\\n'\n'by one until one is found to be true (see section Boolean '\n'operations\\n'\n'for the definition of true and false); then that suite is executed\\n'\n'(and no other part of the \"if\" statement is executed or evaluated).\\n'\n'If all expressions are false, the suite of the \"else\" clause, if\\n'\n'present, is executed.\\n',\n'exceptions':'Exceptions\\n'\n'**********\\n'\n'\\n'\n'Exceptions are a means of breaking out of the normal flow of '\n'control\\n'\n'of a code block in order to handle errors or other '\n'exceptional\\n'\n'conditions. An exception is *raised* at the point where the '\n'error is\\n'\n'detected; it may be *handled* by the surrounding code block or '\n'by any\\n'\n'code block that directly or indirectly invoked the code block '\n'where\\n'\n'the error occurred.\\n'\n'\\n'\n'The Python interpreter raises an exception when it detects a '\n'run-time\\n'\n'error (such as division by zero). A Python program can also\\n'\n'explicitly raise an exception with the \"raise\" statement. '\n'Exception\\n'\n'handlers are specified with the \"try\" \u2026 \"except\" statement. '\n'The\\n'\n'\"finally\" clause of such a statement can be used to specify '\n'cleanup\\n'\n'code which does not handle the exception, but is executed '\n'whether an\\n'\n'exception occurred or not in the preceding code.\\n'\n'\\n'\n'Python uses the \u201ctermination\u201d model of error handling: an '\n'exception\\n'\n'handler can find out what happened and continue execution at '\n'an outer\\n'\n'level, but it cannot repair the cause of the error and retry '\n'the\\n'\n'failing operation (except by re-entering the offending piece '\n'of code\\n'\n'from the top).\\n'\n'\\n'\n'When an exception is not handled at all, the interpreter '\n'terminates\\n'\n'execution of the program, or returns to its interactive main '\n'loop. In\\n'\n'either case, it prints a stack traceback, except when the '\n'exception is\\n'\n'\"SystemExit\".\\n'\n'\\n'\n'Exceptions are identified by class instances. The \"except\" '\n'clause is\\n'\n'selected depending on the class of the instance: it must '\n'reference the\\n'\n'class of the instance or a base class thereof. The instance '\n'can be\\n'\n'received by the handler and can carry additional information '\n'about the\\n'\n'exceptional condition.\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Exception messages are not part of the Python API. Their '\n'contents\\n'\n' may change from one version of Python to the next without '\n'warning\\n'\n' and should not be relied on by code which will run under '\n'multiple\\n'\n' versions of the interpreter.\\n'\n'\\n'\n'See also the description of the \"try\" statement in section The '\n'try\\n'\n'statement and \"raise\" statement in section The raise '\n'statement.\\n'\n'\\n'\n'-[ Footnotes ]-\\n'\n'\\n'\n'[1] This limitation occurs because the code that is executed '\n'by these\\n'\n' operations is not available at the time the module is '\n'compiled.\\n',\n'execmodel':'Execution model\\n'\n'***************\\n'\n'\\n'\n'\\n'\n'Structure of a program\\n'\n'======================\\n'\n'\\n'\n'A Python program is constructed from code blocks. A *block* is '\n'a piece\\n'\n'of Python program text that is executed as a unit. The '\n'following are\\n'\n'blocks: a module, a function body, and a class definition. '\n'Each\\n'\n'command typed interactively is a block. A script file (a file '\n'given\\n'\n'as standard input to the interpreter or specified as a command '\n'line\\n'\n'argument to the interpreter) is a code block. A script command '\n'(a\\n'\n'command specified on the interpreter command line with the '\n'\"-c\"\\n'\n'option) is a code block. A module run as a top level script (as '\n'module\\n'\n'\"__main__\") from the command line using a \"-m\" argument is also '\n'a code\\n'\n'block. The string argument passed to the built-in functions '\n'\"eval()\"\\n'\n'and \"exec()\" is a code block.\\n'\n'\\n'\n'A code block is executed in an *execution frame*. A frame '\n'contains\\n'\n'some administrative information (used for debugging) and '\n'determines\\n'\n'where and how execution continues after the code block\u2019s '\n'execution has\\n'\n'completed.\\n'\n'\\n'\n'\\n'\n'Naming and binding\\n'\n'==================\\n'\n'\\n'\n'\\n'\n'Binding of names\\n'\n'----------------\\n'\n'\\n'\n'*Names* refer to objects. Names are introduced by name '\n'binding\\n'\n'operations.\\n'\n'\\n'\n'The following constructs bind names: formal parameters to '\n'functions,\\n'\n'\"import\" statements, class and function definitions (these bind '\n'the\\n'\n'class or function name in the defining block), and targets that '\n'are\\n'\n'identifiers if occurring in an assignment, \"for\" loop header, '\n'or after\\n'\n'\"as\" in a \"with\" statement or \"except\" clause. The \"import\" '\n'statement\\n'\n'of the form \"from ... import *\" binds all names defined in the\\n'\n'imported module, except those beginning with an underscore. '\n'This form\\n'\n'may only be used at the module level.\\n'\n'\\n'\n'A target occurring in a \"del\" statement is also considered '\n'bound for\\n'\n'this purpose (though the actual semantics are to unbind the '\n'name).\\n'\n'\\n'\n'Each assignment or import statement occurs within a block '\n'defined by a\\n'\n'class or function definition or at the module level (the '\n'top-level\\n'\n'code block).\\n'\n'\\n'\n'If a name is bound in a block, it is a local variable of that '\n'block,\\n'\n'unless declared as \"nonlocal\" or \"global\". If a name is bound '\n'at the\\n'\n'module level, it is a global variable. (The variables of the '\n'module\\n'\n'code block are local and global.) If a variable is used in a '\n'code\\n'\n'block but not defined there, it is a *free variable*.\\n'\n'\\n'\n'Each occurrence of a name in the program text refers to the '\n'*binding*\\n'\n'of that name established by the following name resolution '\n'rules.\\n'\n'\\n'\n'\\n'\n'Resolution of names\\n'\n'-------------------\\n'\n'\\n'\n'A *scope* defines the visibility of a name within a block. If '\n'a local\\n'\n'variable is defined in a block, its scope includes that block. '\n'If the\\n'\n'definition occurs in a function block, the scope extends to any '\n'blocks\\n'\n'contained within the defining one, unless a contained block '\n'introduces\\n'\n'a different binding for the name.\\n'\n'\\n'\n'When a name is used in a code block, it is resolved using the '\n'nearest\\n'\n'enclosing scope. The set of all such scopes visible to a code '\n'block\\n'\n'is called the block\u2019s *environment*.\\n'\n'\\n'\n'When a name is not found at all, a \"NameError\" exception is '\n'raised. If\\n'\n'the current scope is a function scope, and the name refers to a '\n'local\\n'\n'variable that has not yet been bound to a value at the point '\n'where the\\n'\n'name is used, an \"UnboundLocalError\" exception is raised.\\n'\n'\"UnboundLocalError\" is a subclass of \"NameError\".\\n'\n'\\n'\n'If a name binding operation occurs anywhere within a code '\n'block, all\\n'\n'uses of the name within the block are treated as references to '\n'the\\n'\n'current block. This can lead to errors when a name is used '\n'within a\\n'\n'block before it is bound. This rule is subtle. Python lacks\\n'\n'declarations and allows name binding operations to occur '\n'anywhere\\n'\n'within a code block. The local variables of a code block can '\n'be\\n'\n'determined by scanning the entire text of the block for name '\n'binding\\n'\n'operations.\\n'\n'\\n'\n'If the \"global\" statement occurs within a block, all uses of '\n'the name\\n'\n'specified in the statement refer to the binding of that name in '\n'the\\n'\n'top-level namespace. Names are resolved in the top-level '\n'namespace by\\n'\n'searching the global namespace, i.e. the namespace of the '\n'module\\n'\n'containing the code block, and the builtins namespace, the '\n'namespace\\n'\n'of the module \"builtins\". The global namespace is searched '\n'first. If\\n'\n'the name is not found there, the builtins namespace is '\n'searched. The\\n'\n'\"global\" statement must precede all uses of the name.\\n'\n'\\n'\n'The \"global\" statement has the same scope as a name binding '\n'operation\\n'\n'in the same block. If the nearest enclosing scope for a free '\n'variable\\n'\n'contains a global statement, the free variable is treated as a '\n'global.\\n'\n'\\n'\n'The \"nonlocal\" statement causes corresponding names to refer '\n'to\\n'\n'previously bound variables in the nearest enclosing function '\n'scope.\\n'\n'\"SyntaxError\" is raised at compile time if the given name does '\n'not\\n'\n'exist in any enclosing function scope.\\n'\n'\\n'\n'The namespace for a module is automatically created the first '\n'time a\\n'\n'module is imported. The main module for a script is always '\n'called\\n'\n'\"__main__\".\\n'\n'\\n'\n'Class definition blocks and arguments to \"exec()\" and \"eval()\" '\n'are\\n'\n'special in the context of name resolution. A class definition '\n'is an\\n'\n'executable statement that may use and define names. These '\n'references\\n'\n'follow the normal rules for name resolution with an exception '\n'that\\n'\n'unbound local variables are looked up in the global namespace. '\n'The\\n'\n'namespace of the class definition becomes the attribute '\n'dictionary of\\n'\n'the class. The scope of names defined in a class block is '\n'limited to\\n'\n'the class block; it does not extend to the code blocks of '\n'methods \u2013\\n'\n'this includes comprehensions and generator expressions since '\n'they are\\n'\n'implemented using a function scope. This means that the '\n'following\\n'\n'will fail:\\n'\n'\\n'\n' class A:\\n'\n' a = 42\\n'\n' b = list(a + i for i in range(10))\\n'\n'\\n'\n'\\n'\n'Builtins and restricted execution\\n'\n'---------------------------------\\n'\n'\\n'\n'**CPython implementation detail:** Users should not touch\\n'\n'\"__builtins__\"; it is strictly an implementation detail. '\n'Users\\n'\n'wanting to override values in the builtins namespace should '\n'\"import\"\\n'\n'the \"builtins\" module and modify its attributes appropriately.\\n'\n'\\n'\n'The builtins namespace associated with the execution of a code '\n'block\\n'\n'is actually found by looking up the name \"__builtins__\" in its '\n'global\\n'\n'namespace; this should be a dictionary or a module (in the '\n'latter case\\n'\n'the module\u2019s dictionary is used). By default, when in the '\n'\"__main__\"\\n'\n'module, \"__builtins__\" is the built-in module \"builtins\"; when '\n'in any\\n'\n'other module, \"__builtins__\" is an alias for the dictionary of '\n'the\\n'\n'\"builtins\" module itself.\\n'\n'\\n'\n'\\n'\n'Interaction with dynamic features\\n'\n'---------------------------------\\n'\n'\\n'\n'Name resolution of free variables occurs at runtime, not at '\n'compile\\n'\n'time. This means that the following code will print 42:\\n'\n'\\n'\n' i = 10\\n'\n' def f():\\n'\n' print(i)\\n'\n' i = 42\\n'\n' f()\\n'\n'\\n'\n'The \"eval()\" and \"exec()\" functions do not have access to the '\n'full\\n'\n'environment for resolving names. Names may be resolved in the '\n'local\\n'\n'and global namespaces of the caller. Free variables are not '\n'resolved\\n'\n'in the nearest enclosing namespace, but in the global '\n'namespace. [1]\\n'\n'The \"exec()\" and \"eval()\" functions have optional arguments to\\n'\n'override the global and local namespace. If only one namespace '\n'is\\n'\n'specified, it is used for both.\\n'\n'\\n'\n'\\n'\n'Exceptions\\n'\n'==========\\n'\n'\\n'\n'Exceptions are a means of breaking out of the normal flow of '\n'control\\n'\n'of a code block in order to handle errors or other exceptional\\n'\n'conditions. An exception is *raised* at the point where the '\n'error is\\n'\n'detected; it may be *handled* by the surrounding code block or '\n'by any\\n'\n'code block that directly or indirectly invoked the code block '\n'where\\n'\n'the error occurred.\\n'\n'\\n'\n'The Python interpreter raises an exception when it detects a '\n'run-time\\n'\n'error (such as division by zero). A Python program can also\\n'\n'explicitly raise an exception with the \"raise\" statement. '\n'Exception\\n'\n'handlers are specified with the \"try\" \u2026 \"except\" statement. '\n'The\\n'\n'\"finally\" clause of such a statement can be used to specify '\n'cleanup\\n'\n'code which does not handle the exception, but is executed '\n'whether an\\n'\n'exception occurred or not in the preceding code.\\n'\n'\\n'\n'Python uses the \u201ctermination\u201d model of error handling: an '\n'exception\\n'\n'handler can find out what happened and continue execution at an '\n'outer\\n'\n'level, but it cannot repair the cause of the error and retry '\n'the\\n'\n'failing operation (except by re-entering the offending piece of '\n'code\\n'\n'from the top).\\n'\n'\\n'\n'When an exception is not handled at all, the interpreter '\n'terminates\\n'\n'execution of the program, or returns to its interactive main '\n'loop. In\\n'\n'either case, it prints a stack traceback, except when the '\n'exception is\\n'\n'\"SystemExit\".\\n'\n'\\n'\n'Exceptions are identified by class instances. The \"except\" '\n'clause is\\n'\n'selected depending on the class of the instance: it must '\n'reference the\\n'\n'class of the instance or a base class thereof. The instance '\n'can be\\n'\n'received by the handler and can carry additional information '\n'about the\\n'\n'exceptional condition.\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Exception messages are not part of the Python API. Their '\n'contents\\n'\n' may change from one version of Python to the next without '\n'warning\\n'\n' and should not be relied on by code which will run under '\n'multiple\\n'\n' versions of the interpreter.\\n'\n'\\n'\n'See also the description of the \"try\" statement in section The '\n'try\\n'\n'statement and \"raise\" statement in section The raise '\n'statement.\\n'\n'\\n'\n'-[ Footnotes ]-\\n'\n'\\n'\n'[1] This limitation occurs because the code that is executed by '\n'these\\n'\n' operations is not available at the time the module is '\n'compiled.\\n',\n'exprlists':'Expression lists\\n'\n'****************\\n'\n'\\n'\n' expression_list ::= expression (\",\" expression)* [\",\"]\\n'\n' starred_list ::= starred_item (\",\" starred_item)* '\n'[\",\"]\\n'\n' starred_expression ::= expression | (starred_item \",\")* '\n'[starred_item]\\n'\n' starred_item ::= assignment_expression | \"*\" or_expr\\n'\n'\\n'\n'Except when part of a list or set display, an expression list\\n'\n'containing at least one comma yields a tuple. The length of '\n'the tuple\\n'\n'is the number of expressions in the list. The expressions are\\n'\n'evaluated from left to right.\\n'\n'\\n'\n'An asterisk \"*\" denotes *iterable unpacking*. Its operand must '\n'be an\\n'\n'*iterable*. The iterable is expanded into a sequence of items, '\n'which\\n'\n'are included in the new tuple, list, or set, at the site of '\n'the\\n'\n'unpacking.\\n'\n'\\n'\n'New in version 3.5: Iterable unpacking in expression lists, '\n'originally\\n'\n'proposed by **PEP 448**.\\n'\n'\\n'\n'The trailing comma is required only to create a single tuple '\n'(a.k.a. a\\n'\n'*singleton*); it is optional in all other cases. A single '\n'expression\\n'\n'without a trailing comma doesn\u2019t create a tuple, but rather '\n'yields the\\n'\n'value of that expression. (To create an empty tuple, use an '\n'empty pair\\n'\n'of parentheses: \"()\".)\\n',\n'floating':'Floating point literals\\n'\n'***********************\\n'\n'\\n'\n'Floating point literals are described by the following lexical\\n'\n'definitions:\\n'\n'\\n'\n' floatnumber ::= pointfloat | exponentfloat\\n'\n' pointfloat ::= [digitpart] fraction | digitpart \".\"\\n'\n' exponentfloat ::= (digitpart | pointfloat) exponent\\n'\n' digitpart ::= digit ([\"_\"] digit)*\\n'\n' fraction ::= \".\" digitpart\\n'\n' exponent ::= (\"e\" | \"E\") [\"+\" | \"-\"] digitpart\\n'\n'\\n'\n'Note that the integer and exponent parts are always interpreted '\n'using\\n'\n'radix 10. For example, \"077e010\" is legal, and denotes the same '\n'number\\n'\n'as \"77e10\". The allowed range of floating point literals is\\n'\n'implementation-dependent. As in integer literals, underscores '\n'are\\n'\n'supported for digit grouping.\\n'\n'\\n'\n'Some examples of floating point literals:\\n'\n'\\n'\n' 3.14 10. .001 1e100 3.14e-10 0e0 '\n'3.14_15_93\\n'\n'\\n'\n'Changed in version 3.6: Underscores are now allowed for '\n'grouping\\n'\n'purposes in literals.\\n',\n'for':'The \"for\" statement\\n'\n'*******************\\n'\n'\\n'\n'The \"for\" statement is used to iterate over the elements of a '\n'sequence\\n'\n'(such as a string, tuple or list) or other iterable object:\\n'\n'\\n'\n' for_stmt ::= \"for\" target_list \"in\" expression_list \":\" suite\\n'\n' [\"else\" \":\" suite]\\n'\n'\\n'\n'The expression list is evaluated once; it should yield an iterable\\n'\n'object. An iterator is created for the result of the\\n'\n'\"expression_list\". The suite is then executed once for each item\\n'\n'provided by the iterator, in the order returned by the iterator. '\n'Each\\n'\n'item in turn is assigned to the target list using the standard rules\\n'\n'for assignments (see Assignment statements), and then the suite is\\n'\n'executed. When the items are exhausted (which is immediately when '\n'the\\n'\n'sequence is empty or an iterator raises a \"StopIteration\" '\n'exception),\\n'\n'the suite in the \"else\" clause, if present, is executed, and the '\n'loop\\n'\n'terminates.\\n'\n'\\n'\n'A \"break\" statement executed in the first suite terminates the loop\\n'\n'without executing the \"else\" clause\u2019s suite. A \"continue\" statement\\n'\n'executed in the first suite skips the rest of the suite and '\n'continues\\n'\n'with the next item, or with the \"else\" clause if there is no next\\n'\n'item.\\n'\n'\\n'\n'The for-loop makes assignments to the variables in the target list.\\n'\n'This overwrites all previous assignments to those variables '\n'including\\n'\n'those made in the suite of the for-loop:\\n'\n'\\n'\n' for i in range(10):\\n'\n' print(i)\\n'\n' i = 5 # this will not affect the for-loop\\n'\n' # because i will be overwritten with the '\n'next\\n'\n' # index in the range\\n'\n'\\n'\n'Names in the target list are not deleted when the loop is finished,\\n'\n'but if the sequence is empty, they will not have been assigned to at\\n'\n'all by the loop. Hint: the built-in function \"range()\" returns an\\n'\n'iterator of integers suitable to emulate the effect of Pascal\u2019s \"for '\n'i\\n'\n':= a to b do\"; e.g., \"list(range(3))\" returns the list \"[0, 1, 2]\".\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' There is a subtlety when the sequence is being modified by the '\n'loop\\n'\n' (this can only occur for mutable sequences, e.g. lists). An\\n'\n' internal counter is used to keep track of which item is used next,\\n'\n' and this is incremented on each iteration. When this counter has\\n'\n' reached the length of the sequence the loop terminates. This '\n'means\\n'\n' that if the suite deletes the current (or a previous) item from '\n'the\\n'\n' sequence, the next item will be skipped (since it gets the index '\n'of\\n'\n' the current item which has already been treated). Likewise, if '\n'the\\n'\n' suite inserts an item in the sequence before the current item, the\\n'\n' current item will be treated again the next time through the loop.\\n'\n' This can lead to nasty bugs that can be avoided by making a\\n'\n' temporary copy using a slice of the whole sequence, e.g.,\\n'\n'\\n'\n' for x in a[:]:\\n'\n' if x < 0: a.remove(x)\\n',\n'formatstrings':'Format String Syntax\\n'\n'********************\\n'\n'\\n'\n'The \"str.format()\" method and the \"Formatter\" class share '\n'the same\\n'\n'syntax for format strings (although in the case of '\n'\"Formatter\",\\n'\n'subclasses can define their own format string syntax). The '\n'syntax is\\n'\n'related to that of formatted string literals, but it is '\n'less\\n'\n'sophisticated and, in particular, does not support '\n'arbitrary\\n'\n'expressions.\\n'\n'\\n'\n'Format strings contain \u201creplacement fields\u201d surrounded by '\n'curly braces\\n'\n'\"{}\". Anything that is not contained in braces is '\n'considered literal\\n'\n'text, which is copied unchanged to the output. If you need '\n'to include\\n'\n'a brace character in the literal text, it can be escaped by '\n'doubling:\\n'\n'\"{{\" and \"}}\".\\n'\n'\\n'\n'The grammar for a replacement field is as follows:\\n'\n'\\n'\n' replacement_field ::= \"{\" [field_name] [\"!\" '\n'conversion] [\":\" format_spec] \"}\"\\n'\n' field_name ::= arg_name (\".\" attribute_name | '\n'\"[\" element_index \"]\")*\\n'\n' arg_name ::= [identifier | digit+]\\n'\n' attribute_name ::= identifier\\n'\n' element_index ::= digit+ | index_string\\n'\n' index_string ::= +\\n'\n' conversion ::= \"r\" | \"s\" | \"a\"\\n'\n' format_spec ::= \\n'\n'\\n'\n'In less formal terms, the replacement field can start with '\n'a\\n'\n'*field_name* that specifies the object whose value is to be '\n'formatted\\n'\n'and inserted into the output instead of the replacement '\n'field. The\\n'\n'*field_name* is optionally followed by a *conversion* '\n'field, which is\\n'\n'preceded by an exclamation point \"\\'!\\'\", and a '\n'*format_spec*, which is\\n'\n'preceded by a colon \"\\':\\'\". These specify a non-default '\n'format for the\\n'\n'replacement value.\\n'\n'\\n'\n'See also the Format Specification Mini-Language section.\\n'\n'\\n'\n'The *field_name* itself begins with an *arg_name* that is '\n'either a\\n'\n'number or a keyword. If it\u2019s a number, it refers to a '\n'positional\\n'\n'argument, and if it\u2019s a keyword, it refers to a named '\n'keyword\\n'\n'argument. If the numerical arg_names in a format string '\n'are 0, 1, 2,\\n'\n'\u2026 in sequence, they can all be omitted (not just some) and '\n'the numbers\\n'\n'0, 1, 2, \u2026 will be automatically inserted in that order. '\n'Because\\n'\n'*arg_name* is not quote-delimited, it is not possible to '\n'specify\\n'\n'arbitrary dictionary keys (e.g., the strings \"\\'10\\'\" or '\n'\"\\':-]\\'\") within\\n'\n'a format string. The *arg_name* can be followed by any '\n'number of index\\n'\n'or attribute expressions. An expression of the form '\n'\"\\'.name\\'\" selects\\n'\n'the named attribute using \"getattr()\", while an expression '\n'of the form\\n'\n'\"\\'[index]\\'\" does an index lookup using \"__getitem__()\".\\n'\n'\\n'\n'Changed in version 3.1: The positional argument specifiers '\n'can be\\n'\n'omitted for \"str.format()\", so \"\\'{} {}\\'.format(a, b)\" is '\n'equivalent to\\n'\n'\"\\'{0} {1}\\'.format(a, b)\".\\n'\n'\\n'\n'Changed in version 3.4: The positional argument specifiers '\n'can be\\n'\n'omitted for \"Formatter\".\\n'\n'\\n'\n'Some simple format string examples:\\n'\n'\\n'\n' \"First, thou shalt count to {0}\" # References first '\n'positional argument\\n'\n' \"Bring me a {}\" # Implicitly '\n'references the first positional argument\\n'\n' \"From {} to {}\" # Same as \"From {0} to '\n'{1}\"\\n'\n' \"My quest is {name}\" # References keyword '\n\"argument 'name'\\n\"\n' \"Weight in tons {0.weight}\" # \\'weight\\' attribute '\n'of first positional arg\\n'\n' \"Units destroyed: {players[0]}\" # First element of '\n\"keyword argument 'players'.\\n\"\n'\\n'\n'The *conversion* field causes a type coercion before '\n'formatting.\\n'\n'Normally, the job of formatting a value is done by the '\n'\"__format__()\"\\n'\n'method of the value itself. However, in some cases it is '\n'desirable to\\n'\n'force a type to be formatted as a string, overriding its '\n'own\\n'\n'definition of formatting. By converting the value to a '\n'string before\\n'\n'calling \"__format__()\", the normal formatting logic is '\n'bypassed.\\n'\n'\\n'\n'Three conversion flags are currently supported: \"\\'!s\\'\" '\n'which calls\\n'\n'\"str()\" on the value, \"\\'!r\\'\" which calls \"repr()\" and '\n'\"\\'!a\\'\" which\\n'\n'calls \"ascii()\".\\n'\n'\\n'\n'Some examples:\\n'\n'\\n'\n' \"Harold\\'s a clever {0!s}\" # Calls str() on the '\n'argument first\\n'\n' \"Bring out the holy {name!r}\" # Calls repr() on the '\n'argument first\\n'\n' \"More {!a}\" # Calls ascii() on the '\n'argument first\\n'\n'\\n'\n'The *format_spec* field contains a specification of how the '\n'value\\n'\n'should be presented, including such details as field width, '\n'alignment,\\n'\n'padding, decimal precision and so on. Each value type can '\n'define its\\n'\n'own \u201cformatting mini-language\u201d or interpretation of the '\n'*format_spec*.\\n'\n'\\n'\n'Most built-in types support a common formatting '\n'mini-language, which\\n'\n'is described in the next section.\\n'\n'\\n'\n'A *format_spec* field can also include nested replacement '\n'fields\\n'\n'within it. These nested replacement fields may contain a '\n'field name,\\n'\n'conversion flag and format specification, but deeper '\n'nesting is not\\n'\n'allowed. The replacement fields within the format_spec '\n'are\\n'\n'substituted before the *format_spec* string is interpreted. '\n'This\\n'\n'allows the formatting of a value to be dynamically '\n'specified.\\n'\n'\\n'\n'See the Format examples section for some examples.\\n'\n'\\n'\n'\\n'\n'Format Specification Mini-Language\\n'\n'==================================\\n'\n'\\n'\n'\u201cFormat specifications\u201d are used within replacement fields '\n'contained\\n'\n'within a format string to define how individual values are '\n'presented\\n'\n'(see Format String Syntax and Formatted string literals). '\n'They can\\n'\n'also be passed directly to the built-in \"format()\" '\n'function. Each\\n'\n'formattable type may define how the format specification is '\n'to be\\n'\n'interpreted.\\n'\n'\\n'\n'Most built-in types implement the following options for '\n'format\\n'\n'specifications, although some of the formatting options are '\n'only\\n'\n'supported by the numeric types.\\n'\n'\\n'\n'A general convention is that an empty format specification '\n'produces\\n'\n'the same result as if you had called \"str()\" on the value. '\n'A non-empty\\n'\n'format specification typically modifies the result.\\n'\n'\\n'\n'The general form of a *standard format specifier* is:\\n'\n'\\n'\n' format_spec ::= '\n'[[fill]align][sign][#][0][width][grouping_option][.precision][type]\\n'\n' fill ::= \\n'\n' align ::= \"<\" | \">\" | \"=\" | \"^\"\\n'\n' sign ::= \"+\" | \"-\" | \" \"\\n'\n' width ::= digit+\\n'\n' grouping_option ::= \"_\" | \",\"\\n'\n' precision ::= digit+\\n'\n' type ::= \"b\" | \"c\" | \"d\" | \"e\" | \"E\" | \"f\" | '\n'\"F\" | \"g\" | \"G\" | \"n\" | \"o\" | \"s\" | \"x\" | \"X\" | \"%\"\\n'\n'\\n'\n'If a valid *align* value is specified, it can be preceded '\n'by a *fill*\\n'\n'character that can be any character and defaults to a space '\n'if\\n'\n'omitted. It is not possible to use a literal curly brace '\n'(\u201d\"{\"\u201d or\\n'\n'\u201c\"}\"\u201d) as the *fill* character in a formatted string '\n'literal or when\\n'\n'using the \"str.format()\" method. However, it is possible '\n'to insert a\\n'\n'curly brace with a nested replacement field. This '\n'limitation doesn\u2019t\\n'\n'affect the \"format()\" function.\\n'\n'\\n'\n'The meaning of the various alignment options is as '\n'follows:\\n'\n'\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | Option | '\n'Meaning '\n'|\\n'\n' '\n'|===========|============================================================|\\n'\n' | \"\\'<\\'\" | Forces the field to be left-aligned '\n'within the available |\\n'\n' | | space (this is the default for most '\n'objects). |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'>\\'\" | Forces the field to be right-aligned '\n'within the available |\\n'\n' | | space (this is the default for '\n'numbers). |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'=\\'\" | Forces the padding to be placed after '\n'the sign (if any) |\\n'\n' | | but before the digits. This is used for '\n'printing fields |\\n'\n' | | in the form \u2018+000000120\u2019. This alignment '\n'option is only |\\n'\n' | | valid for numeric types. It becomes the '\n'default for |\\n'\n' | | numbers when \u20180\u2019 immediately precedes the '\n'field width. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'^\\'\" | Forces the field to be centered within '\n'the available |\\n'\n' | | '\n'space. '\n'|\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n'\\n'\n'Note that unless a minimum field width is defined, the '\n'field width\\n'\n'will always be the same size as the data to fill it, so '\n'that the\\n'\n'alignment option has no meaning in this case.\\n'\n'\\n'\n'The *sign* option is only valid for number types, and can '\n'be one of\\n'\n'the following:\\n'\n'\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | Option | '\n'Meaning '\n'|\\n'\n' '\n'|===========|============================================================|\\n'\n' | \"\\'+\\'\" | indicates that a sign should be used for '\n'both positive as |\\n'\n' | | well as negative '\n'numbers. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'-\\'\" | indicates that a sign should be used '\n'only for negative |\\n'\n' | | numbers (this is the default '\n'behavior). |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | space | indicates that a leading space should be '\n'used on positive |\\n'\n' | | numbers, and a minus sign on negative '\n'numbers. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n'\\n'\n'The \"\\'#\\'\" option causes the \u201calternate form\u201d to be used '\n'for the\\n'\n'conversion. The alternate form is defined differently for '\n'different\\n'\n'types. This option is only valid for integer, float and '\n'complex\\n'\n'types. For integers, when binary, octal, or hexadecimal '\n'output is\\n'\n'used, this option adds the respective prefix \"\\'0b\\'\", '\n'\"\\'0o\\'\", \"\\'0x\\'\",\\n'\n'or \"\\'0X\\'\" to the output value. For float and complex the '\n'alternate\\n'\n'form causes the result of the conversion to always contain '\n'a decimal-\\n'\n'point character, even if no digits follow it. Normally, a '\n'decimal-\\n'\n'point character appears in the result of these conversions '\n'only if a\\n'\n'digit follows it. In addition, for \"\\'g\\'\" and \"\\'G\\'\" '\n'conversions,\\n'\n'trailing zeros are not removed from the result.\\n'\n'\\n'\n'The \"\\',\\'\" option signals the use of a comma for a '\n'thousands separator.\\n'\n'For a locale aware separator, use the \"\\'n\\'\" integer '\n'presentation type\\n'\n'instead.\\n'\n'\\n'\n'Changed in version 3.1: Added the \"\\',\\'\" option (see also '\n'**PEP 378**).\\n'\n'\\n'\n'The \"\\'_\\'\" option signals the use of an underscore for a '\n'thousands\\n'\n'separator for floating point presentation types and for '\n'integer\\n'\n'presentation type \"\\'d\\'\". For integer presentation types '\n'\"\\'b\\'\", \"\\'o\\'\",\\n'\n'\"\\'x\\'\", and \"\\'X\\'\", underscores will be inserted every 4 '\n'digits. For\\n'\n'other presentation types, specifying this option is an '\n'error.\\n'\n'\\n'\n'Changed in version 3.6: Added the \"\\'_\\'\" option (see also '\n'**PEP 515**).\\n'\n'\\n'\n'*width* is a decimal integer defining the minimum total '\n'field width,\\n'\n'including any prefixes, separators, and other formatting '\n'characters.\\n'\n'If not specified, then the field width will be determined '\n'by the\\n'\n'content.\\n'\n'\\n'\n'When no explicit alignment is given, preceding the *width* '\n'field by a\\n'\n'zero (\"\\'0\\'\") character enables sign-aware zero-padding '\n'for numeric\\n'\n'types. This is equivalent to a *fill* character of \"\\'0\\'\" '\n'with an\\n'\n'*alignment* type of \"\\'=\\'\".\\n'\n'\\n'\n'Changed in version 3.10: Preceding the *width* field by '\n'\"\\'0\\'\" no\\n'\n'longer affects the default alignment for strings.\\n'\n'\\n'\n'The *precision* is a decimal number indicating how many '\n'digits should\\n'\n'be displayed after the decimal point for a floating point '\n'value\\n'\n'formatted with \"\\'f\\'\" and \"\\'F\\'\", or before and after the '\n'decimal point\\n'\n'for a floating point value formatted with \"\\'g\\'\" or '\n'\"\\'G\\'\". For non-\\n'\n'number types the field indicates the maximum field size - '\n'in other\\n'\n'words, how many characters will be used from the field '\n'content. The\\n'\n'*precision* is not allowed for integer values.\\n'\n'\\n'\n'Finally, the *type* determines how the data should be '\n'presented.\\n'\n'\\n'\n'The available string presentation types are:\\n'\n'\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | Type | '\n'Meaning '\n'|\\n'\n' '\n'|===========|============================================================|\\n'\n' | \"\\'s\\'\" | String format. This is the default type '\n'for strings and |\\n'\n' | | may be '\n'omitted. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | None | The same as '\n'\"\\'s\\'\". |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n'\\n'\n'The available integer presentation types are:\\n'\n'\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | Type | '\n'Meaning '\n'|\\n'\n' '\n'|===========|============================================================|\\n'\n' | \"\\'b\\'\" | Binary format. Outputs the number in '\n'base 2. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'c\\'\" | Character. Converts the integer to the '\n'corresponding |\\n'\n' | | unicode character before '\n'printing. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'d\\'\" | Decimal Integer. Outputs the number in '\n'base 10. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'o\\'\" | Octal format. Outputs the number in base '\n'8. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'x\\'\" | Hex format. Outputs the number in base '\n'16, using lower- |\\n'\n' | | case letters for the digits above '\n'9. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'X\\'\" | Hex format. Outputs the number in base '\n'16, using upper- |\\n'\n' | | case letters for the digits above 9. In '\n'case \"\\'#\\'\" is |\\n'\n' | | specified, the prefix \"\\'0x\\'\" will be '\n'upper-cased to \"\\'0X\\'\" |\\n'\n' | | as '\n'well. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'n\\'\" | Number. This is the same as \"\\'d\\'\", '\n'except that it uses the |\\n'\n' | | current locale setting to insert the '\n'appropriate number |\\n'\n' | | separator '\n'characters. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | None | The same as '\n'\"\\'d\\'\". |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n'\\n'\n'In addition to the above presentation types, integers can '\n'be formatted\\n'\n'with the floating point presentation types listed below '\n'(except \"\\'n\\'\"\\n'\n'and \"None\"). When doing so, \"float()\" is used to convert '\n'the integer\\n'\n'to a floating point number before formatting.\\n'\n'\\n'\n'The available presentation types for \"float\" and \"Decimal\" '\n'values are:\\n'\n'\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | Type | '\n'Meaning '\n'|\\n'\n' '\n'|===========|============================================================|\\n'\n' | \"\\'e\\'\" | Scientific notation. For a given '\n'precision \"p\", formats |\\n'\n' | | the number in scientific notation with the '\n'letter \u2018e\u2019 |\\n'\n' | | separating the coefficient from the '\n'exponent. The |\\n'\n' | | coefficient has one digit before and \"p\" '\n'digits after the |\\n'\n' | | decimal point, for a total of \"p + 1\" '\n'significant digits. |\\n'\n' | | With no precision given, uses a precision '\n'of \"6\" digits |\\n'\n' | | after the decimal point for \"float\", and '\n'shows all |\\n'\n' | | coefficient digits for \"Decimal\". If no '\n'digits follow the |\\n'\n' | | decimal point, the decimal point is also '\n'removed unless |\\n'\n' | | the \"#\" option is '\n'used. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'E\\'\" | Scientific notation. Same as \"\\'e\\'\" '\n'except it uses an upper |\\n'\n' | | case \u2018E\u2019 as the separator '\n'character. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'f\\'\" | Fixed-point notation. For a given '\n'precision \"p\", formats |\\n'\n' | | the number as a decimal number with '\n'exactly \"p\" digits |\\n'\n' | | following the decimal point. With no '\n'precision given, uses |\\n'\n' | | a precision of \"6\" digits after the '\n'decimal point for |\\n'\n' | | \"float\", and uses a precision large enough '\n'to show all |\\n'\n' | | coefficient digits for \"Decimal\". If no '\n'digits follow the |\\n'\n' | | decimal point, the decimal point is also '\n'removed unless |\\n'\n' | | the \"#\" option is '\n'used. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'F\\'\" | Fixed-point notation. Same as \"\\'f\\'\", '\n'but converts \"nan\" to |\\n'\n' | | \"NAN\" and \"inf\" to '\n'\"INF\". |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'g\\'\" | General format. For a given precision '\n'\"p >= 1\", this |\\n'\n' | | rounds the number to \"p\" significant '\n'digits and then |\\n'\n' | | formats the result in either fixed-point '\n'format or in |\\n'\n' | | scientific notation, depending on its '\n'magnitude. A |\\n'\n' | | precision of \"0\" is treated as equivalent '\n'to a precision |\\n'\n' | | of \"1\". The precise rules are as follows: '\n'suppose that |\\n'\n' | | the result formatted with presentation '\n'type \"\\'e\\'\" and |\\n'\n' | | precision \"p-1\" would have exponent '\n'\"exp\". Then, if \"m <= |\\n'\n' | | exp < p\", where \"m\" is -4 for floats and '\n'-6 for |\\n'\n' | | \"Decimals\", the number is formatted with '\n'presentation type |\\n'\n' | | \"\\'f\\'\" and precision \"p-1-exp\". '\n'Otherwise, the number is |\\n'\n' | | formatted with presentation type \"\\'e\\'\" '\n'and precision |\\n'\n' | | \"p-1\". In both cases insignificant '\n'trailing zeros are |\\n'\n' | | removed from the significand, and the '\n'decimal point is |\\n'\n' | | also removed if there are no remaining '\n'digits following |\\n'\n' | | it, unless the \"\\'#\\'\" option is used. '\n'With no precision |\\n'\n' | | given, uses a precision of \"6\" significant '\n'digits for |\\n'\n' | | \"float\". For \"Decimal\", the coefficient of '\n'the result is |\\n'\n' | | formed from the coefficient digits of the '\n'value; |\\n'\n' | | scientific notation is used for values '\n'smaller than \"1e-6\" |\\n'\n' | | in absolute value and values where the '\n'place value of the |\\n'\n' | | least significant digit is larger than 1, '\n'and fixed-point |\\n'\n' | | notation is used otherwise. Positive and '\n'negative |\\n'\n' | | infinity, positive and negative zero, and '\n'nans, are |\\n'\n' | | formatted as \"inf\", \"-inf\", \"0\", \"-0\" and '\n'\"nan\" |\\n'\n' | | respectively, regardless of the '\n'precision. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'G\\'\" | General format. Same as \"\\'g\\'\" except '\n'switches to \"\\'E\\'\" if |\\n'\n' | | the number gets too large. The '\n'representations of infinity |\\n'\n' | | and NaN are uppercased, '\n'too. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'n\\'\" | Number. This is the same as \"\\'g\\'\", '\n'except that it uses the |\\n'\n' | | current locale setting to insert the '\n'appropriate number |\\n'\n' | | separator '\n'characters. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | \"\\'%\\'\" | Percentage. Multiplies the number by 100 '\n'and displays in |\\n'\n' | | fixed (\"\\'f\\'\") format, followed by a '\n'percent sign. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n' | None | For \"float\" this is the same as \"\\'g\\'\", '\n'except that when |\\n'\n' | | fixed-point notation is used to format the '\n'result, it |\\n'\n' | | always includes at least one digit past '\n'the decimal point. |\\n'\n' | | The precision used is as large as needed '\n'to represent the |\\n'\n' | | given value faithfully. For \"Decimal\", '\n'this is the same |\\n'\n' | | as either \"\\'g\\'\" or \"\\'G\\'\" depending on '\n'the value of |\\n'\n' | | \"context.capitals\" for the current decimal '\n'context. The |\\n'\n' | | overall effect is to match the output of '\n'\"str()\" as |\\n'\n' | | altered by the other format '\n'modifiers. |\\n'\n' '\n'+-----------+------------------------------------------------------------+\\n'\n'\\n'\n'\\n'\n'Format examples\\n'\n'===============\\n'\n'\\n'\n'This section contains examples of the \"str.format()\" syntax '\n'and\\n'\n'comparison with the old \"%\"-formatting.\\n'\n'\\n'\n'In most of the cases the syntax is similar to the old '\n'\"%\"-formatting,\\n'\n'with the addition of the \"{}\" and with \":\" used instead of '\n'\"%\". For\\n'\n'example, \"\\'%03.2f\\'\" can be translated to \"\\'{:03.2f}\\'\".\\n'\n'\\n'\n'The new format syntax also supports new and different '\n'options, shown\\n'\n'in the following examples.\\n'\n'\\n'\n'Accessing arguments by position:\\n'\n'\\n'\n\" >>> '{0}, {1}, {2}'.format('a', 'b', 'c')\\n\"\n\" 'a, b, c'\\n\"\n\" >>> '{}, {}, {}'.format('a', 'b', 'c') # 3.1+ only\\n\"\n\" 'a, b, c'\\n\"\n\" >>> '{2}, {1}, {0}'.format('a', 'b', 'c')\\n\"\n\" 'c, b, a'\\n\"\n\" >>> '{2}, {1}, {0}'.format(*'abc') # unpacking \"\n'argument sequence\\n'\n\" 'c, b, a'\\n\"\n\" >>> '{0}{1}{0}'.format('abra', 'cad') # arguments' \"\n'indices can be repeated\\n'\n\" 'abracadabra'\\n\"\n'\\n'\n'Accessing arguments by name:\\n'\n'\\n'\n\" >>> 'Coordinates: {latitude}, \"\n\"{longitude}'.format(latitude='37.24N', \"\n\"longitude='-115.81W')\\n\"\n\" 'Coordinates: 37.24N, -115.81W'\\n\"\n\" >>> coord = {'latitude': '37.24N', 'longitude': \"\n\"'-115.81W'}\\n\"\n\" >>> 'Coordinates: {latitude}, \"\n\"{longitude}'.format(**coord)\\n\"\n\" 'Coordinates: 37.24N, -115.81W'\\n\"\n'\\n'\n'Accessing arguments\u2019 attributes:\\n'\n'\\n'\n' >>> c = 3-5j\\n'\n\" >>> ('The complex number {0} is formed from the real \"\n\"part {0.real} '\\n\"\n\" ... 'and the imaginary part {0.imag}.').format(c)\\n\"\n\" 'The complex number (3-5j) is formed from the real part \"\n\"3.0 and the imaginary part -5.0.'\\n\"\n' >>> class Point:\\n'\n' ... def __init__(self, x, y):\\n'\n' ... self.x, self.y = x, y\\n'\n' ... def __str__(self):\\n'\n\" ... return 'Point({self.x}, \"\n\"{self.y})'.format(self=self)\\n\"\n' ...\\n'\n' >>> str(Point(4, 2))\\n'\n\" 'Point(4, 2)'\\n\"\n'\\n'\n'Accessing arguments\u2019 items:\\n'\n'\\n'\n' >>> coord = (3, 5)\\n'\n\" >>> 'X: {0[0]}; Y: {0[1]}'.format(coord)\\n\"\n\" 'X: 3; Y: 5'\\n\"\n'\\n'\n'Replacing \"%s\" and \"%r\":\\n'\n'\\n'\n' >>> \"repr() shows quotes: {!r}; str() doesn\\'t: '\n'{!s}\".format(\\'test1\\', \\'test2\\')\\n'\n' \"repr() shows quotes: \\'test1\\'; str() doesn\\'t: test2\"\\n'\n'\\n'\n'Aligning the text and specifying a width:\\n'\n'\\n'\n\" >>> '{:<30}'.format('left aligned')\\n\"\n\" 'left aligned '\\n\"\n\" >>> '{:>30}'.format('right aligned')\\n\"\n\" ' right aligned'\\n\"\n\" >>> '{:^30}'.format('centered')\\n\"\n\" ' centered '\\n\"\n\" >>> '{:*^30}'.format('centered') # use '*' as a fill \"\n'char\\n'\n\" '***********centered***********'\\n\"\n'\\n'\n'Replacing \"%+f\", \"%-f\", and \"% f\" and specifying a sign:\\n'\n'\\n'\n\" >>> '{:+f}; {:+f}'.format(3.14, -3.14) # show it \"\n'always\\n'\n\" '+3.140000; -3.140000'\\n\"\n\" >>> '{: f}; {: f}'.format(3.14, -3.14) # show a space \"\n'for positive numbers\\n'\n\" ' 3.140000; -3.140000'\\n\"\n\" >>> '{:-f}; {:-f}'.format(3.14, -3.14) # show only the \"\n\"minus -- same as '{:f}; {:f}'\\n\"\n\" '3.140000; -3.140000'\\n\"\n'\\n'\n'Replacing \"%x\" and \"%o\" and converting the value to '\n'different bases:\\n'\n'\\n'\n' >>> # format also supports binary numbers\\n'\n' >>> \"int: {0:d}; hex: {0:x}; oct: {0:o}; bin: '\n'{0:b}\".format(42)\\n'\n\" 'int: 42; hex: 2a; oct: 52; bin: 101010'\\n\"\n' >>> # with 0x, 0o, or 0b as prefix:\\n'\n' >>> \"int: {0:d}; hex: {0:#x}; oct: {0:#o}; bin: '\n'{0:#b}\".format(42)\\n'\n\" 'int: 42; hex: 0x2a; oct: 0o52; bin: 0b101010'\\n\"\n'\\n'\n'Using the comma as a thousands separator:\\n'\n'\\n'\n\" >>> '{:,}'.format(1234567890)\\n\"\n\" '1,234,567,890'\\n\"\n'\\n'\n'Expressing a percentage:\\n'\n'\\n'\n' >>> points = 19\\n'\n' >>> total = 22\\n'\n\" >>> 'Correct answers: {:.2%}'.format(points/total)\\n\"\n\" 'Correct answers: 86.36%'\\n\"\n'\\n'\n'Using type-specific formatting:\\n'\n'\\n'\n' >>> import datetime\\n'\n' >>> d = datetime.datetime(2010, 7, 4, 12, 15, 58)\\n'\n\" >>> '{:%Y-%m-%d %H:%M:%S}'.format(d)\\n\"\n\" '2010-07-04 12:15:58'\\n\"\n'\\n'\n'Nesting arguments and more complex examples:\\n'\n'\\n'\n\" >>> for align, text in zip('<^>', ['left', 'center', \"\n\"'right']):\\n\"\n\" ... '{0:{fill}{align}16}'.format(text, fill=align, \"\n'align=align)\\n'\n' ...\\n'\n\" 'left<<<<<<<<<<<<'\\n\"\n\" '^^^^^center^^^^^'\\n\"\n\" '>>>>>>>>>>>right'\\n\"\n' >>>\\n'\n' >>> octets = [192, 168, 0, 1]\\n'\n\" >>> '{:02X}{:02X}{:02X}{:02X}'.format(*octets)\\n\"\n\" 'C0A80001'\\n\"\n' >>> int(_, 16)\\n'\n' 3232235521\\n'\n' >>>\\n'\n' >>> width = 5\\n'\n' >>> for num in range(5,12): \\n'\n\" ... for base in 'dXob':\\n\"\n\" ... print('{0:{width}{base}}'.format(num, \"\n\"base=base, width=width), end=' ')\\n\"\n' ... print()\\n'\n' ...\\n'\n' 5 5 5 101\\n'\n' 6 6 6 110\\n'\n' 7 7 7 111\\n'\n' 8 8 10 1000\\n'\n' 9 9 11 1001\\n'\n' 10 A 12 1010\\n'\n' 11 B 13 1011\\n',\n'function':'Function definitions\\n'\n'********************\\n'\n'\\n'\n'A function definition defines a user-defined function object '\n'(see\\n'\n'section The standard type hierarchy):\\n'\n'\\n'\n' funcdef ::= [decorators] \"def\" funcname \"(\" '\n'[parameter_list] \")\"\\n'\n' [\"->\" expression] \":\" suite\\n'\n' decorators ::= decorator+\\n'\n' decorator ::= \"@\" assignment_expression '\n'NEWLINE\\n'\n' parameter_list ::= defparameter (\",\" '\n'defparameter)* \",\" \"/\" [\",\" [parameter_list_no_posonly]]\\n'\n' | parameter_list_no_posonly\\n'\n' parameter_list_no_posonly ::= defparameter (\",\" '\n'defparameter)* [\",\" [parameter_list_starargs]]\\n'\n' | parameter_list_starargs\\n'\n' parameter_list_starargs ::= \"*\" [parameter] (\",\" '\n'defparameter)* [\",\" [\"**\" parameter [\",\"]]]\\n'\n' | \"**\" parameter [\",\"]\\n'\n' parameter ::= identifier [\":\" expression]\\n'\n' defparameter ::= parameter [\"=\" expression]\\n'\n' funcname ::= identifier\\n'\n'\\n'\n'A function definition is an executable statement. Its execution '\n'binds\\n'\n'the function name in the current local namespace to a function '\n'object\\n'\n'(a wrapper around the executable code for the function). This\\n'\n'function object contains a reference to the current global '\n'namespace\\n'\n'as the global namespace to be used when the function is called.\\n'\n'\\n'\n'The function definition does not execute the function body; this '\n'gets\\n'\n'executed only when the function is called. [4]\\n'\n'\\n'\n'A function definition may be wrapped by one or more *decorator*\\n'\n'expressions. Decorator expressions are evaluated when the '\n'function is\\n'\n'defined, in the scope that contains the function definition. '\n'The\\n'\n'result must be a callable, which is invoked with the function '\n'object\\n'\n'as the only argument. The returned value is bound to the '\n'function name\\n'\n'instead of the function object. Multiple decorators are applied '\n'in\\n'\n'nested fashion. For example, the following code\\n'\n'\\n'\n' @f1(arg)\\n'\n' @f2\\n'\n' def func(): pass\\n'\n'\\n'\n'is roughly equivalent to\\n'\n'\\n'\n' def func(): pass\\n'\n' func = f1(arg)(f2(func))\\n'\n'\\n'\n'except that the original function is not temporarily bound to '\n'the name\\n'\n'\"func\".\\n'\n'\\n'\n'Changed in version 3.9: Functions may be decorated with any '\n'valid\\n'\n'\"assignment_expression\". Previously, the grammar was much more\\n'\n'restrictive; see **PEP 614** for details.\\n'\n'\\n'\n'When one or more *parameters* have the form *parameter* \"=\"\\n'\n'*expression*, the function is said to have \u201cdefault parameter '\n'values.\u201d\\n'\n'For a parameter with a default value, the corresponding '\n'*argument* may\\n'\n'be omitted from a call, in which case the parameter\u2019s default '\n'value is\\n'\n'substituted. If a parameter has a default value, all following\\n'\n'parameters up until the \u201c\"*\"\u201d must also have a default value \u2014 '\n'this is\\n'\n'a syntactic restriction that is not expressed by the grammar.\\n'\n'\\n'\n'**Default parameter values are evaluated from left to right when '\n'the\\n'\n'function definition is executed.** This means that the '\n'expression is\\n'\n'evaluated once, when the function is defined, and that the same '\n'\u201cpre-\\n'\n'computed\u201d value is used for each call. This is especially '\n'important\\n'\n'to understand when a default parameter value is a mutable '\n'object, such\\n'\n'as a list or a dictionary: if the function modifies the object '\n'(e.g.\\n'\n'by appending an item to a list), the default parameter value is '\n'in\\n'\n'effect modified. This is generally not what was intended. A '\n'way\\n'\n'around this is to use \"None\" as the default, and explicitly test '\n'for\\n'\n'it in the body of the function, e.g.:\\n'\n'\\n'\n' def whats_on_the_telly(penguin=None):\\n'\n' if penguin is None:\\n'\n' penguin = []\\n'\n' penguin.append(\"property of the zoo\")\\n'\n' return penguin\\n'\n'\\n'\n'Function call semantics are described in more detail in section '\n'Calls.\\n'\n'A function call always assigns values to all parameters '\n'mentioned in\\n'\n'the parameter list, either from positional arguments, from '\n'keyword\\n'\n'arguments, or from default values. If the form \u201c\"*identifier\"\u201d '\n'is\\n'\n'present, it is initialized to a tuple receiving any excess '\n'positional\\n'\n'parameters, defaulting to the empty tuple. If the form\\n'\n'\u201c\"**identifier\"\u201d is present, it is initialized to a new ordered\\n'\n'mapping receiving any excess keyword arguments, defaulting to a '\n'new\\n'\n'empty mapping of the same type. Parameters after \u201c\"*\"\u201d or\\n'\n'\u201c\"*identifier\"\u201d are keyword-only parameters and may only be '\n'passed by\\n'\n'keyword arguments. Parameters before \u201c\"/\"\u201d are positional-only\\n'\n'parameters and may only be passed by positional arguments.\\n'\n'\\n'\n'Changed in version 3.8: The \"/\" function parameter syntax may be '\n'used\\n'\n'to indicate positional-only parameters. See **PEP 570** for '\n'details.\\n'\n'\\n'\n'Parameters may have an *annotation* of the form \u201c\": '\n'expression\"\u201d\\n'\n'following the parameter name. Any parameter may have an '\n'annotation,\\n'\n'even those of the form \"*identifier\" or \"**identifier\". '\n'Functions may\\n'\n'have \u201creturn\u201d annotation of the form \u201c\"-> expression\"\u201d after '\n'the\\n'\n'parameter list. These annotations can be any valid Python '\n'expression.\\n'\n'The presence of annotations does not change the semantics of a\\n'\n'function. The annotation values are available as values of a\\n'\n'dictionary keyed by the parameters\u2019 names in the '\n'\"__annotations__\"\\n'\n'attribute of the function object. If the \"annotations\" import '\n'from\\n'\n'\"__future__\" is used, annotations are preserved as strings at '\n'runtime\\n'\n'which enables postponed evaluation. Otherwise, they are '\n'evaluated\\n'\n'when the function definition is executed. In this case '\n'annotations\\n'\n'may be evaluated in a different order than they appear in the '\n'source\\n'\n'code.\\n'\n'\\n'\n'It is also possible to create anonymous functions (functions not '\n'bound\\n'\n'to a name), for immediate use in expressions. This uses lambda\\n'\n'expressions, described in section Lambdas. Note that the '\n'lambda\\n'\n'expression is merely a shorthand for a simplified function '\n'definition;\\n'\n'a function defined in a \u201c\"def\"\u201d statement can be passed around '\n'or\\n'\n'assigned to another name just like a function defined by a '\n'lambda\\n'\n'expression. The \u201c\"def\"\u201d form is actually more powerful since '\n'it\\n'\n'allows the execution of multiple statements and annotations.\\n'\n'\\n'\n'**Programmer\u2019s note:** Functions are first-class objects. A '\n'\u201c\"def\"\u201d\\n'\n'statement executed inside a function definition defines a local\\n'\n'function that can be returned or passed around. Free variables '\n'used\\n'\n'in the nested function can access the local variables of the '\n'function\\n'\n'containing the def. See section Naming and binding for '\n'details.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3107** - Function Annotations\\n'\n' The original specification for function annotations.\\n'\n'\\n'\n' **PEP 484** - Type Hints\\n'\n' Definition of a standard meaning for annotations: type '\n'hints.\\n'\n'\\n'\n' **PEP 526** - Syntax for Variable Annotations\\n'\n' Ability to type hint variable declarations, including '\n'class\\n'\n' variables and instance variables\\n'\n'\\n'\n' **PEP 563** - Postponed Evaluation of Annotations\\n'\n' Support for forward references within annotations by '\n'preserving\\n'\n' annotations in a string form at runtime instead of eager\\n'\n' evaluation.\\n',\n'global':'The \"global\" statement\\n'\n'**********************\\n'\n'\\n'\n' global_stmt ::= \"global\" identifier (\",\" identifier)*\\n'\n'\\n'\n'The \"global\" statement is a declaration which holds for the '\n'entire\\n'\n'current code block. It means that the listed identifiers are to '\n'be\\n'\n'interpreted as globals. It would be impossible to assign to a '\n'global\\n'\n'variable without \"global\", although free variables may refer to\\n'\n'globals without being declared global.\\n'\n'\\n'\n'Names listed in a \"global\" statement must not be used in the same '\n'code\\n'\n'block textually preceding that \"global\" statement.\\n'\n'\\n'\n'Names listed in a \"global\" statement must not be defined as '\n'formal\\n'\n'parameters, or as targets in \"with\" statements or \"except\" '\n'clauses, or\\n'\n'in a \"for\" target list, \"class\" definition, function definition,\\n'\n'\"import\" statement, or variable annotation.\\n'\n'\\n'\n'**CPython implementation detail:** The current implementation does '\n'not\\n'\n'enforce some of these restrictions, but programs should not abuse '\n'this\\n'\n'freedom, as future implementations may enforce them or silently '\n'change\\n'\n'the meaning of the program.\\n'\n'\\n'\n'**Programmer\u2019s note:** \"global\" is a directive to the parser. It\\n'\n'applies only to code parsed at the same time as the \"global\"\\n'\n'statement. In particular, a \"global\" statement contained in a '\n'string\\n'\n'or code object supplied to the built-in \"exec()\" function does '\n'not\\n'\n'affect the code block *containing* the function call, and code\\n'\n'contained in such a string is unaffected by \"global\" statements in '\n'the\\n'\n'code containing the function call. The same applies to the '\n'\"eval()\"\\n'\n'and \"compile()\" functions.\\n',\n'id-classes':'Reserved classes of identifiers\\n'\n'*******************************\\n'\n'\\n'\n'Certain classes of identifiers (besides keywords) have '\n'special\\n'\n'meanings. These classes are identified by the patterns of '\n'leading and\\n'\n'trailing underscore characters:\\n'\n'\\n'\n'\"_*\"\\n'\n' Not imported by \"from module import *\". The special '\n'identifier \"_\"\\n'\n' is used in the interactive interpreter to store the result '\n'of the\\n'\n' last evaluation; it is stored in the \"builtins\" module. '\n'When not\\n'\n' in interactive mode, \"_\" has no special meaning and is not '\n'defined.\\n'\n' See section The import statement.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' The name \"_\" is often used in conjunction with\\n'\n' internationalization; refer to the documentation for the\\n'\n' \"gettext\" module for more information on this '\n'convention.\\n'\n'\\n'\n'\"__*__\"\\n'\n' System-defined names, informally known as \u201cdunder\u201d names. '\n'These\\n'\n' names are defined by the interpreter and its '\n'implementation\\n'\n' (including the standard library). Current system names are\\n'\n' discussed in the Special method names section and '\n'elsewhere. More\\n'\n' will likely be defined in future versions of Python. *Any* '\n'use of\\n'\n' \"__*__\" names, in any context, that does not follow '\n'explicitly\\n'\n' documented use, is subject to breakage without warning.\\n'\n'\\n'\n'\"__*\"\\n'\n' Class-private names. Names in this category, when used '\n'within the\\n'\n' context of a class definition, are re-written to use a '\n'mangled form\\n'\n' to help avoid name clashes between \u201cprivate\u201d attributes of '\n'base and\\n'\n' derived classes. See section Identifiers (Names).\\n',\n'identifiers':'Identifiers and keywords\\n'\n'************************\\n'\n'\\n'\n'Identifiers (also referred to as *names*) are described by '\n'the\\n'\n'following lexical definitions.\\n'\n'\\n'\n'The syntax of identifiers in Python is based on the Unicode '\n'standard\\n'\n'annex UAX-31, with elaboration and changes as defined below; '\n'see also\\n'\n'**PEP 3131** for further details.\\n'\n'\\n'\n'Within the ASCII range (U+0001..U+007F), the valid characters '\n'for\\n'\n'identifiers are the same as in Python 2.x: the uppercase and '\n'lowercase\\n'\n'letters \"A\" through \"Z\", the underscore \"_\" and, except for '\n'the first\\n'\n'character, the digits \"0\" through \"9\".\\n'\n'\\n'\n'Python 3.0 introduces additional characters from outside the '\n'ASCII\\n'\n'range (see **PEP 3131**). For these characters, the '\n'classification\\n'\n'uses the version of the Unicode Character Database as '\n'included in the\\n'\n'\"unicodedata\" module.\\n'\n'\\n'\n'Identifiers are unlimited in length. Case is significant.\\n'\n'\\n'\n' identifier ::= xid_start xid_continue*\\n'\n' id_start ::= \\n'\n' id_continue ::= \\n'\n' xid_start ::= \\n'\n' xid_continue ::= \\n'\n'\\n'\n'The Unicode category codes mentioned above stand for:\\n'\n'\\n'\n'* *Lu* - uppercase letters\\n'\n'\\n'\n'* *Ll* - lowercase letters\\n'\n'\\n'\n'* *Lt* - titlecase letters\\n'\n'\\n'\n'* *Lm* - modifier letters\\n'\n'\\n'\n'* *Lo* - other letters\\n'\n'\\n'\n'* *Nl* - letter numbers\\n'\n'\\n'\n'* *Mn* - nonspacing marks\\n'\n'\\n'\n'* *Mc* - spacing combining marks\\n'\n'\\n'\n'* *Nd* - decimal numbers\\n'\n'\\n'\n'* *Pc* - connector punctuations\\n'\n'\\n'\n'* *Other_ID_Start* - explicit list of characters in '\n'PropList.txt to\\n'\n' support backwards compatibility\\n'\n'\\n'\n'* *Other_ID_Continue* - likewise\\n'\n'\\n'\n'All identifiers are converted into the normal form NFKC while '\n'parsing;\\n'\n'comparison of identifiers is based on NFKC.\\n'\n'\\n'\n'A non-normative HTML file listing all valid identifier '\n'characters for\\n'\n'Unicode 4.1 can be found at\\n'\n'https://www.unicode.org/Public/13.0.0/ucd/DerivedCoreProperties.txt\\n'\n'\\n'\n'\\n'\n'Keywords\\n'\n'========\\n'\n'\\n'\n'The following identifiers are used as reserved words, or '\n'*keywords* of\\n'\n'the language, and cannot be used as ordinary identifiers. '\n'They must\\n'\n'be spelled exactly as written here:\\n'\n'\\n'\n' False await else import pass\\n'\n' None break except in raise\\n'\n' True class finally is return\\n'\n' and continue for lambda try\\n'\n' as def from nonlocal while\\n'\n' assert del global not with\\n'\n' async elif if or yield\\n'\n'\\n'\n'\\n'\n'Soft Keywords\\n'\n'=============\\n'\n'\\n'\n'New in version 3.10.\\n'\n'\\n'\n'Some identifiers are only reserved under specific contexts. '\n'These are\\n'\n'known as *soft keywords*. The identifiers \"match\", \"case\" '\n'and \"_\" can\\n'\n'syntactically act as keywords in contexts related to the '\n'pattern\\n'\n'matching statement, but this distinction is done at the '\n'parser level,\\n'\n'not when tokenizing.\\n'\n'\\n'\n'As soft keywords, their use with pattern matching is possible '\n'while\\n'\n'still preserving compatibility with existing code that uses '\n'\"match\",\\n'\n'\"case\" and \"_\" as identifier names.\\n'\n'\\n'\n'\\n'\n'Reserved classes of identifiers\\n'\n'===============================\\n'\n'\\n'\n'Certain classes of identifiers (besides keywords) have '\n'special\\n'\n'meanings. These classes are identified by the patterns of '\n'leading and\\n'\n'trailing underscore characters:\\n'\n'\\n'\n'\"_*\"\\n'\n' Not imported by \"from module import *\". The special '\n'identifier \"_\"\\n'\n' is used in the interactive interpreter to store the result '\n'of the\\n'\n' last evaluation; it is stored in the \"builtins\" module. '\n'When not\\n'\n' in interactive mode, \"_\" has no special meaning and is not '\n'defined.\\n'\n' See section The import statement.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' The name \"_\" is often used in conjunction with\\n'\n' internationalization; refer to the documentation for '\n'the\\n'\n' \"gettext\" module for more information on this '\n'convention.\\n'\n'\\n'\n'\"__*__\"\\n'\n' System-defined names, informally known as \u201cdunder\u201d names. '\n'These\\n'\n' names are defined by the interpreter and its '\n'implementation\\n'\n' (including the standard library). Current system names '\n'are\\n'\n' discussed in the Special method names section and '\n'elsewhere. More\\n'\n' will likely be defined in future versions of Python. '\n'*Any* use of\\n'\n' \"__*__\" names, in any context, that does not follow '\n'explicitly\\n'\n' documented use, is subject to breakage without warning.\\n'\n'\\n'\n'\"__*\"\\n'\n' Class-private names. Names in this category, when used '\n'within the\\n'\n' context of a class definition, are re-written to use a '\n'mangled form\\n'\n' to help avoid name clashes between \u201cprivate\u201d attributes of '\n'base and\\n'\n' derived classes. See section Identifiers (Names).\\n',\n'if':'The \"if\" statement\\n'\n'******************\\n'\n'\\n'\n'The \"if\" statement is used for conditional execution:\\n'\n'\\n'\n' if_stmt ::= \"if\" assignment_expression \":\" suite\\n'\n' (\"elif\" assignment_expression \":\" suite)*\\n'\n' [\"else\" \":\" suite]\\n'\n'\\n'\n'It selects exactly one of the suites by evaluating the expressions '\n'one\\n'\n'by one until one is found to be true (see section Boolean operations\\n'\n'for the definition of true and false); then that suite is executed\\n'\n'(and no other part of the \"if\" statement is executed or evaluated).\\n'\n'If all expressions are false, the suite of the \"else\" clause, if\\n'\n'present, is executed.\\n',\n'imaginary':'Imaginary literals\\n'\n'******************\\n'\n'\\n'\n'Imaginary literals are described by the following lexical '\n'definitions:\\n'\n'\\n'\n' imagnumber ::= (floatnumber | digitpart) (\"j\" | \"J\")\\n'\n'\\n'\n'An imaginary literal yields a complex number with a real part '\n'of 0.0.\\n'\n'Complex numbers are represented as a pair of floating point '\n'numbers\\n'\n'and have the same restrictions on their range. To create a '\n'complex\\n'\n'number with a nonzero real part, add a floating point number to '\n'it,\\n'\n'e.g., \"(3+4j)\". Some examples of imaginary literals:\\n'\n'\\n'\n' 3.14j 10.j 10j .001j 1e100j 3.14e-10j '\n'3.14_15_93j\\n',\n'import':'The \"import\" statement\\n'\n'**********************\\n'\n'\\n'\n' import_stmt ::= \"import\" module [\"as\" identifier] (\",\" '\n'module [\"as\" identifier])*\\n'\n' | \"from\" relative_module \"import\" identifier '\n'[\"as\" identifier]\\n'\n' (\",\" identifier [\"as\" identifier])*\\n'\n' | \"from\" relative_module \"import\" \"(\" '\n'identifier [\"as\" identifier]\\n'\n' (\",\" identifier [\"as\" identifier])* [\",\"] \")\"\\n'\n' | \"from\" relative_module \"import\" \"*\"\\n'\n' module ::= (identifier \".\")* identifier\\n'\n' relative_module ::= \".\"* module | \".\"+\\n'\n'\\n'\n'The basic import statement (no \"from\" clause) is executed in two\\n'\n'steps:\\n'\n'\\n'\n'1. find a module, loading and initializing it if necessary\\n'\n'\\n'\n'2. define a name or names in the local namespace for the scope '\n'where\\n'\n' the \"import\" statement occurs.\\n'\n'\\n'\n'When the statement contains multiple clauses (separated by commas) '\n'the\\n'\n'two steps are carried out separately for each clause, just as '\n'though\\n'\n'the clauses had been separated out into individual import '\n'statements.\\n'\n'\\n'\n'The details of the first step, finding and loading modules are\\n'\n'described in greater detail in the section on the import system, '\n'which\\n'\n'also describes the various types of packages and modules that can '\n'be\\n'\n'imported, as well as all the hooks that can be used to customize '\n'the\\n'\n'import system. Note that failures in this step may indicate '\n'either\\n'\n'that the module could not be located, *or* that an error occurred\\n'\n'while initializing the module, which includes execution of the\\n'\n'module\u2019s code.\\n'\n'\\n'\n'If the requested module is retrieved successfully, it will be '\n'made\\n'\n'available in the local namespace in one of three ways:\\n'\n'\\n'\n'* If the module name is followed by \"as\", then the name following '\n'\"as\"\\n'\n' is bound directly to the imported module.\\n'\n'\\n'\n'* If no other name is specified, and the module being imported is '\n'a\\n'\n' top level module, the module\u2019s name is bound in the local '\n'namespace\\n'\n' as a reference to the imported module\\n'\n'\\n'\n'* If the module being imported is *not* a top level module, then '\n'the\\n'\n' name of the top level package that contains the module is bound '\n'in\\n'\n' the local namespace as a reference to the top level package. '\n'The\\n'\n' imported module must be accessed using its full qualified name\\n'\n' rather than directly\\n'\n'\\n'\n'The \"from\" form uses a slightly more complex process:\\n'\n'\\n'\n'1. find the module specified in the \"from\" clause, loading and\\n'\n' initializing it if necessary;\\n'\n'\\n'\n'2. for each of the identifiers specified in the \"import\" clauses:\\n'\n'\\n'\n' 1. check if the imported module has an attribute by that name\\n'\n'\\n'\n' 2. if not, attempt to import a submodule with that name and '\n'then\\n'\n' check the imported module again for that attribute\\n'\n'\\n'\n' 3. if the attribute is not found, \"ImportError\" is raised.\\n'\n'\\n'\n' 4. otherwise, a reference to that value is stored in the local\\n'\n' namespace, using the name in the \"as\" clause if it is '\n'present,\\n'\n' otherwise using the attribute name\\n'\n'\\n'\n'Examples:\\n'\n'\\n'\n' import foo # foo imported and bound locally\\n'\n' import foo.bar.baz # foo.bar.baz imported, foo bound '\n'locally\\n'\n' import foo.bar.baz as fbb # foo.bar.baz imported and bound as '\n'fbb\\n'\n' from foo.bar import baz # foo.bar.baz imported and bound as '\n'baz\\n'\n' from foo import attr # foo imported and foo.attr bound as '\n'attr\\n'\n'\\n'\n'If the list of identifiers is replaced by a star (\"\\'*\\'\"), all '\n'public\\n'\n'names defined in the module are bound in the local namespace for '\n'the\\n'\n'scope where the \"import\" statement occurs.\\n'\n'\\n'\n'The *public names* defined by a module are determined by checking '\n'the\\n'\n'module\u2019s namespace for a variable named \"__all__\"; if defined, it '\n'must\\n'\n'be a sequence of strings which are names defined or imported by '\n'that\\n'\n'module. The names given in \"__all__\" are all considered public '\n'and\\n'\n'are required to exist. If \"__all__\" is not defined, the set of '\n'public\\n'\n'names includes all names found in the module\u2019s namespace which do '\n'not\\n'\n'begin with an underscore character (\"\\'_\\'\"). \"__all__\" should '\n'contain\\n'\n'the entire public API. It is intended to avoid accidentally '\n'exporting\\n'\n'items that are not part of the API (such as library modules which '\n'were\\n'\n'imported and used within the module).\\n'\n'\\n'\n'The wild card form of import \u2014 \"from module import *\" \u2014 is only\\n'\n'allowed at the module level. Attempting to use it in class or\\n'\n'function definitions will raise a \"SyntaxError\".\\n'\n'\\n'\n'When specifying what module to import you do not have to specify '\n'the\\n'\n'absolute name of the module. When a module or package is '\n'contained\\n'\n'within another package it is possible to make a relative import '\n'within\\n'\n'the same top package without having to mention the package name. '\n'By\\n'\n'using leading dots in the specified module or package after \"from\" '\n'you\\n'\n'can specify how high to traverse up the current package hierarchy\\n'\n'without specifying exact names. One leading dot means the current\\n'\n'package where the module making the import exists. Two dots means '\n'up\\n'\n'one package level. Three dots is up two levels, etc. So if you '\n'execute\\n'\n'\"from . import mod\" from a module in the \"pkg\" package then you '\n'will\\n'\n'end up importing \"pkg.mod\". If you execute \"from ..subpkg2 import '\n'mod\"\\n'\n'from within \"pkg.subpkg1\" you will import \"pkg.subpkg2.mod\". The\\n'\n'specification for relative imports is contained in the Package\\n'\n'Relative Imports section.\\n'\n'\\n'\n'\"importlib.import_module()\" is provided to support applications '\n'that\\n'\n'determine dynamically the modules to be loaded.\\n'\n'\\n'\n'Raises an auditing event \"import\" with arguments \"module\", '\n'\"filename\",\\n'\n'\"sys.path\", \"sys.meta_path\", \"sys.path_hooks\".\\n'\n'\\n'\n'\\n'\n'Future statements\\n'\n'=================\\n'\n'\\n'\n'A *future statement* is a directive to the compiler that a '\n'particular\\n'\n'module should be compiled using syntax or semantics that will be\\n'\n'available in a specified future release of Python where the '\n'feature\\n'\n'becomes standard.\\n'\n'\\n'\n'The future statement is intended to ease migration to future '\n'versions\\n'\n'of Python that introduce incompatible changes to the language. '\n'It\\n'\n'allows use of the new features on a per-module basis before the\\n'\n'release in which the feature becomes standard.\\n'\n'\\n'\n' future_stmt ::= \"from\" \"__future__\" \"import\" feature [\"as\" '\n'identifier]\\n'\n' (\",\" feature [\"as\" identifier])*\\n'\n' | \"from\" \"__future__\" \"import\" \"(\" feature '\n'[\"as\" identifier]\\n'\n' (\",\" feature [\"as\" identifier])* [\",\"] \")\"\\n'\n' feature ::= identifier\\n'\n'\\n'\n'A future statement must appear near the top of the module. The '\n'only\\n'\n'lines that can appear before a future statement are:\\n'\n'\\n'\n'* the module docstring (if any),\\n'\n'\\n'\n'* comments,\\n'\n'\\n'\n'* blank lines, and\\n'\n'\\n'\n'* other future statements.\\n'\n'\\n'\n'The only feature that requires using the future statement is\\n'\n'\"annotations\" (see **PEP 563**).\\n'\n'\\n'\n'All historical features enabled by the future statement are still\\n'\n'recognized by Python 3. The list includes \"absolute_import\",\\n'\n'\"division\", \"generators\", \"generator_stop\", \"unicode_literals\",\\n'\n'\"print_function\", \"nested_scopes\" and \"with_statement\". They are '\n'all\\n'\n'redundant because they are always enabled, and only kept for '\n'backwards\\n'\n'compatibility.\\n'\n'\\n'\n'A future statement is recognized and treated specially at compile\\n'\n'time: Changes to the semantics of core constructs are often\\n'\n'implemented by generating different code. It may even be the '\n'case\\n'\n'that a new feature introduces new incompatible syntax (such as a '\n'new\\n'\n'reserved word), in which case the compiler may need to parse the\\n'\n'module differently. Such decisions cannot be pushed off until\\n'\n'runtime.\\n'\n'\\n'\n'For any given release, the compiler knows which feature names '\n'have\\n'\n'been defined, and raises a compile-time error if a future '\n'statement\\n'\n'contains a feature not known to it.\\n'\n'\\n'\n'The direct runtime semantics are the same as for any import '\n'statement:\\n'\n'there is a standard module \"__future__\", described later, and it '\n'will\\n'\n'be imported in the usual way at the time the future statement is\\n'\n'executed.\\n'\n'\\n'\n'The interesting runtime semantics depend on the specific feature\\n'\n'enabled by the future statement.\\n'\n'\\n'\n'Note that there is nothing special about the statement:\\n'\n'\\n'\n' import __future__ [as name]\\n'\n'\\n'\n'That is not a future statement; it\u2019s an ordinary import statement '\n'with\\n'\n'no special semantics or syntax restrictions.\\n'\n'\\n'\n'Code compiled by calls to the built-in functions \"exec()\" and\\n'\n'\"compile()\" that occur in a module \"M\" containing a future '\n'statement\\n'\n'will, by default, use the new syntax or semantics associated with '\n'the\\n'\n'future statement. This can be controlled by optional arguments '\n'to\\n'\n'\"compile()\" \u2014 see the documentation of that function for details.\\n'\n'\\n'\n'A future statement typed at an interactive interpreter prompt '\n'will\\n'\n'take effect for the rest of the interpreter session. If an\\n'\n'interpreter is started with the \"-i\" option, is passed a script '\n'name\\n'\n'to execute, and the script includes a future statement, it will be '\n'in\\n'\n'effect in the interactive session started after the script is\\n'\n'executed.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 236** - Back to the __future__\\n'\n' The original proposal for the __future__ mechanism.\\n',\n'in':'Membership test operations\\n'\n'**************************\\n'\n'\\n'\n'The operators \"in\" and \"not in\" test for membership. \"x in s\"\\n'\n'evaluates to \"True\" if *x* is a member of *s*, and \"False\" otherwise.\\n'\n'\"x not in s\" returns the negation of \"x in s\". All built-in '\n'sequences\\n'\n'and set types support this as well as dictionary, for which \"in\" '\n'tests\\n'\n'whether the dictionary has a given key. For container types such as\\n'\n'list, tuple, set, frozenset, dict, or collections.deque, the\\n'\n'expression \"x in y\" is equivalent to \"any(x is e or x == e for e in\\n'\n'y)\".\\n'\n'\\n'\n'For the string and bytes types, \"x in y\" is \"True\" if and only if *x*\\n'\n'is a substring of *y*. An equivalent test is \"y.find(x) != -1\".\\n'\n'Empty strings are always considered to be a substring of any other\\n'\n'string, so \"\"\" in \"abc\"\" will return \"True\".\\n'\n'\\n'\n'For user-defined classes which define the \"__contains__()\" method, \"x\\n'\n'in y\" returns \"True\" if \"y.__contains__(x)\" returns a true value, and\\n'\n'\"False\" otherwise.\\n'\n'\\n'\n'For user-defined classes which do not define \"__contains__()\" but do\\n'\n'define \"__iter__()\", \"x in y\" is \"True\" if some value \"z\", for which\\n'\n'the expression \"x is z or x == z\" is true, is produced while '\n'iterating\\n'\n'over \"y\". If an exception is raised during the iteration, it is as if\\n'\n'\"in\" raised that exception.\\n'\n'\\n'\n'Lastly, the old-style iteration protocol is tried: if a class defines\\n'\n'\"__getitem__()\", \"x in y\" is \"True\" if and only if there is a non-\\n'\n'negative integer index *i* such that \"x is y[i] or x == y[i]\", and no\\n'\n'lower integer index raises the \"IndexError\" exception. (If any other\\n'\n'exception is raised, it is as if \"in\" raised that exception).\\n'\n'\\n'\n'The operator \"not in\" is defined to have the inverse truth value of\\n'\n'\"in\".\\n',\n'integers':'Integer literals\\n'\n'****************\\n'\n'\\n'\n'Integer literals are described by the following lexical '\n'definitions:\\n'\n'\\n'\n' integer ::= decinteger | bininteger | octinteger | '\n'hexinteger\\n'\n' decinteger ::= nonzerodigit ([\"_\"] digit)* | \"0\"+ ([\"_\"] '\n'\"0\")*\\n'\n' bininteger ::= \"0\" (\"b\" | \"B\") ([\"_\"] bindigit)+\\n'\n' octinteger ::= \"0\" (\"o\" | \"O\") ([\"_\"] octdigit)+\\n'\n' hexinteger ::= \"0\" (\"x\" | \"X\") ([\"_\"] hexdigit)+\\n'\n' nonzerodigit ::= \"1\"...\"9\"\\n'\n' digit ::= \"0\"...\"9\"\\n'\n' bindigit ::= \"0\" | \"1\"\\n'\n' octdigit ::= \"0\"...\"7\"\\n'\n' hexdigit ::= digit | \"a\"...\"f\" | \"A\"...\"F\"\\n'\n'\\n'\n'There is no limit for the length of integer literals apart from '\n'what\\n'\n'can be stored in available memory.\\n'\n'\\n'\n'Underscores are ignored for determining the numeric value of '\n'the\\n'\n'literal. They can be used to group digits for enhanced '\n'readability.\\n'\n'One underscore can occur between digits, and after base '\n'specifiers\\n'\n'like \"0x\".\\n'\n'\\n'\n'Note that leading zeros in a non-zero decimal number are not '\n'allowed.\\n'\n'This is for disambiguation with C-style octal literals, which '\n'Python\\n'\n'used before version 3.0.\\n'\n'\\n'\n'Some examples of integer literals:\\n'\n'\\n'\n' 7 2147483647 0o177 0b100110111\\n'\n' 3 79228162514264337593543950336 0o377 0xdeadbeef\\n'\n' 100_000_000_000 0b_1110_0101\\n'\n'\\n'\n'Changed in version 3.6: Underscores are now allowed for '\n'grouping\\n'\n'purposes in literals.\\n',\n'lambda':'Lambdas\\n'\n'*******\\n'\n'\\n'\n' lambda_expr ::= \"lambda\" [parameter_list] \":\" expression\\n'\n'\\n'\n'Lambda expressions (sometimes called lambda forms) are used to '\n'create\\n'\n'anonymous functions. The expression \"lambda parameters: '\n'expression\"\\n'\n'yields a function object. The unnamed object behaves like a '\n'function\\n'\n'object defined with:\\n'\n'\\n'\n' def (parameters):\\n'\n' return expression\\n'\n'\\n'\n'See section Function definitions for the syntax of parameter '\n'lists.\\n'\n'Note that functions created with lambda expressions cannot '\n'contain\\n'\n'statements or annotations.\\n',\n'lists':'List displays\\n'\n'*************\\n'\n'\\n'\n'A list display is a possibly empty series of expressions enclosed '\n'in\\n'\n'square brackets:\\n'\n'\\n'\n' list_display ::= \"[\" [starred_list | comprehension] \"]\"\\n'\n'\\n'\n'A list display yields a new list object, the contents being '\n'specified\\n'\n'by either a list of expressions or a comprehension. When a comma-\\n'\n'separated list of expressions is supplied, its elements are '\n'evaluated\\n'\n'from left to right and placed into the list object in that order.\\n'\n'When a comprehension is supplied, the list is constructed from the\\n'\n'elements resulting from the comprehension.\\n',\n'naming':'Naming and binding\\n'\n'******************\\n'\n'\\n'\n'\\n'\n'Binding of names\\n'\n'================\\n'\n'\\n'\n'*Names* refer to objects. Names are introduced by name binding\\n'\n'operations.\\n'\n'\\n'\n'The following constructs bind names: formal parameters to '\n'functions,\\n'\n'\"import\" statements, class and function definitions (these bind '\n'the\\n'\n'class or function name in the defining block), and targets that '\n'are\\n'\n'identifiers if occurring in an assignment, \"for\" loop header, or '\n'after\\n'\n'\"as\" in a \"with\" statement or \"except\" clause. The \"import\" '\n'statement\\n'\n'of the form \"from ... import *\" binds all names defined in the\\n'\n'imported module, except those beginning with an underscore. This '\n'form\\n'\n'may only be used at the module level.\\n'\n'\\n'\n'A target occurring in a \"del\" statement is also considered bound '\n'for\\n'\n'this purpose (though the actual semantics are to unbind the '\n'name).\\n'\n'\\n'\n'Each assignment or import statement occurs within a block defined '\n'by a\\n'\n'class or function definition or at the module level (the '\n'top-level\\n'\n'code block).\\n'\n'\\n'\n'If a name is bound in a block, it is a local variable of that '\n'block,\\n'\n'unless declared as \"nonlocal\" or \"global\". If a name is bound at '\n'the\\n'\n'module level, it is a global variable. (The variables of the '\n'module\\n'\n'code block are local and global.) If a variable is used in a '\n'code\\n'\n'block but not defined there, it is a *free variable*.\\n'\n'\\n'\n'Each occurrence of a name in the program text refers to the '\n'*binding*\\n'\n'of that name established by the following name resolution rules.\\n'\n'\\n'\n'\\n'\n'Resolution of names\\n'\n'===================\\n'\n'\\n'\n'A *scope* defines the visibility of a name within a block. If a '\n'local\\n'\n'variable is defined in a block, its scope includes that block. If '\n'the\\n'\n'definition occurs in a function block, the scope extends to any '\n'blocks\\n'\n'contained within the defining one, unless a contained block '\n'introduces\\n'\n'a different binding for the name.\\n'\n'\\n'\n'When a name is used in a code block, it is resolved using the '\n'nearest\\n'\n'enclosing scope. The set of all such scopes visible to a code '\n'block\\n'\n'is called the block\u2019s *environment*.\\n'\n'\\n'\n'When a name is not found at all, a \"NameError\" exception is '\n'raised. If\\n'\n'the current scope is a function scope, and the name refers to a '\n'local\\n'\n'variable that has not yet been bound to a value at the point where '\n'the\\n'\n'name is used, an \"UnboundLocalError\" exception is raised.\\n'\n'\"UnboundLocalError\" is a subclass of \"NameError\".\\n'\n'\\n'\n'If a name binding operation occurs anywhere within a code block, '\n'all\\n'\n'uses of the name within the block are treated as references to '\n'the\\n'\n'current block. This can lead to errors when a name is used within '\n'a\\n'\n'block before it is bound. This rule is subtle. Python lacks\\n'\n'declarations and allows name binding operations to occur anywhere\\n'\n'within a code block. The local variables of a code block can be\\n'\n'determined by scanning the entire text of the block for name '\n'binding\\n'\n'operations.\\n'\n'\\n'\n'If the \"global\" statement occurs within a block, all uses of the '\n'name\\n'\n'specified in the statement refer to the binding of that name in '\n'the\\n'\n'top-level namespace. Names are resolved in the top-level '\n'namespace by\\n'\n'searching the global namespace, i.e. the namespace of the module\\n'\n'containing the code block, and the builtins namespace, the '\n'namespace\\n'\n'of the module \"builtins\". The global namespace is searched '\n'first. If\\n'\n'the name is not found there, the builtins namespace is searched. '\n'The\\n'\n'\"global\" statement must precede all uses of the name.\\n'\n'\\n'\n'The \"global\" statement has the same scope as a name binding '\n'operation\\n'\n'in the same block. If the nearest enclosing scope for a free '\n'variable\\n'\n'contains a global statement, the free variable is treated as a '\n'global.\\n'\n'\\n'\n'The \"nonlocal\" statement causes corresponding names to refer to\\n'\n'previously bound variables in the nearest enclosing function '\n'scope.\\n'\n'\"SyntaxError\" is raised at compile time if the given name does '\n'not\\n'\n'exist in any enclosing function scope.\\n'\n'\\n'\n'The namespace for a module is automatically created the first time '\n'a\\n'\n'module is imported. The main module for a script is always '\n'called\\n'\n'\"__main__\".\\n'\n'\\n'\n'Class definition blocks and arguments to \"exec()\" and \"eval()\" '\n'are\\n'\n'special in the context of name resolution. A class definition is '\n'an\\n'\n'executable statement that may use and define names. These '\n'references\\n'\n'follow the normal rules for name resolution with an exception '\n'that\\n'\n'unbound local variables are looked up in the global namespace. '\n'The\\n'\n'namespace of the class definition becomes the attribute dictionary '\n'of\\n'\n'the class. The scope of names defined in a class block is limited '\n'to\\n'\n'the class block; it does not extend to the code blocks of methods '\n'\u2013\\n'\n'this includes comprehensions and generator expressions since they '\n'are\\n'\n'implemented using a function scope. This means that the '\n'following\\n'\n'will fail:\\n'\n'\\n'\n' class A:\\n'\n' a = 42\\n'\n' b = list(a + i for i in range(10))\\n'\n'\\n'\n'\\n'\n'Builtins and restricted execution\\n'\n'=================================\\n'\n'\\n'\n'**CPython implementation detail:** Users should not touch\\n'\n'\"__builtins__\"; it is strictly an implementation detail. Users\\n'\n'wanting to override values in the builtins namespace should '\n'\"import\"\\n'\n'the \"builtins\" module and modify its attributes appropriately.\\n'\n'\\n'\n'The builtins namespace associated with the execution of a code '\n'block\\n'\n'is actually found by looking up the name \"__builtins__\" in its '\n'global\\n'\n'namespace; this should be a dictionary or a module (in the latter '\n'case\\n'\n'the module\u2019s dictionary is used). By default, when in the '\n'\"__main__\"\\n'\n'module, \"__builtins__\" is the built-in module \"builtins\"; when in '\n'any\\n'\n'other module, \"__builtins__\" is an alias for the dictionary of '\n'the\\n'\n'\"builtins\" module itself.\\n'\n'\\n'\n'\\n'\n'Interaction with dynamic features\\n'\n'=================================\\n'\n'\\n'\n'Name resolution of free variables occurs at runtime, not at '\n'compile\\n'\n'time. This means that the following code will print 42:\\n'\n'\\n'\n' i = 10\\n'\n' def f():\\n'\n' print(i)\\n'\n' i = 42\\n'\n' f()\\n'\n'\\n'\n'The \"eval()\" and \"exec()\" functions do not have access to the '\n'full\\n'\n'environment for resolving names. Names may be resolved in the '\n'local\\n'\n'and global namespaces of the caller. Free variables are not '\n'resolved\\n'\n'in the nearest enclosing namespace, but in the global namespace. '\n'[1]\\n'\n'The \"exec()\" and \"eval()\" functions have optional arguments to\\n'\n'override the global and local namespace. If only one namespace '\n'is\\n'\n'specified, it is used for both.\\n',\n'nonlocal':'The \"nonlocal\" statement\\n'\n'************************\\n'\n'\\n'\n' nonlocal_stmt ::= \"nonlocal\" identifier (\",\" identifier)*\\n'\n'\\n'\n'The \"nonlocal\" statement causes the listed identifiers to refer '\n'to\\n'\n'previously bound variables in the nearest enclosing scope '\n'excluding\\n'\n'globals. This is important because the default behavior for '\n'binding is\\n'\n'to search the local namespace first. The statement allows\\n'\n'encapsulated code to rebind variables outside of the local '\n'scope\\n'\n'besides the global (module) scope.\\n'\n'\\n'\n'Names listed in a \"nonlocal\" statement, unlike those listed in '\n'a\\n'\n'\"global\" statement, must refer to pre-existing bindings in an\\n'\n'enclosing scope (the scope in which a new binding should be '\n'created\\n'\n'cannot be determined unambiguously).\\n'\n'\\n'\n'Names listed in a \"nonlocal\" statement must not collide with '\n'pre-\\n'\n'existing bindings in the local scope.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3104** - Access to Names in Outer Scopes\\n'\n' The specification for the \"nonlocal\" statement.\\n',\n'numbers':'Numeric literals\\n'\n'****************\\n'\n'\\n'\n'There are three types of numeric literals: integers, floating '\n'point\\n'\n'numbers, and imaginary numbers. There are no complex literals\\n'\n'(complex numbers can be formed by adding a real number and an\\n'\n'imaginary number).\\n'\n'\\n'\n'Note that numeric literals do not include a sign; a phrase like '\n'\"-1\"\\n'\n'is actually an expression composed of the unary operator \u2018\"-\"\u2019 '\n'and the\\n'\n'literal \"1\".\\n',\n'numeric-types':'Emulating numeric types\\n'\n'***********************\\n'\n'\\n'\n'The following methods can be defined to emulate numeric '\n'objects.\\n'\n'Methods corresponding to operations that are not supported '\n'by the\\n'\n'particular kind of number implemented (e.g., bitwise '\n'operations for\\n'\n'non-integral numbers) should be left undefined.\\n'\n'\\n'\n'object.__add__(self, other)\\n'\n'object.__sub__(self, other)\\n'\n'object.__mul__(self, other)\\n'\n'object.__matmul__(self, other)\\n'\n'object.__truediv__(self, other)\\n'\n'object.__floordiv__(self, other)\\n'\n'object.__mod__(self, other)\\n'\n'object.__divmod__(self, other)\\n'\n'object.__pow__(self, other[, modulo])\\n'\n'object.__lshift__(self, other)\\n'\n'object.__rshift__(self, other)\\n'\n'object.__and__(self, other)\\n'\n'object.__xor__(self, other)\\n'\n'object.__or__(self, other)\\n'\n'\\n'\n' These methods are called to implement the binary '\n'arithmetic\\n'\n' operations (\"+\", \"-\", \"*\", \"@\", \"/\", \"//\", \"%\", '\n'\"divmod()\",\\n'\n' \"pow()\", \"**\", \"<<\", \">>\", \"&\", \"^\", \"|\"). For '\n'instance, to\\n'\n' evaluate the expression \"x + y\", where *x* is an '\n'instance of a\\n'\n' class that has an \"__add__()\" method, \"x.__add__(y)\" is '\n'called.\\n'\n' The \"__divmod__()\" method should be the equivalent to '\n'using\\n'\n' \"__floordiv__()\" and \"__mod__()\"; it should not be '\n'related to\\n'\n' \"__truediv__()\". Note that \"__pow__()\" should be '\n'defined to accept\\n'\n' an optional third argument if the ternary version of the '\n'built-in\\n'\n' \"pow()\" function is to be supported.\\n'\n'\\n'\n' If one of those methods does not support the operation '\n'with the\\n'\n' supplied arguments, it should return \"NotImplemented\".\\n'\n'\\n'\n'object.__radd__(self, other)\\n'\n'object.__rsub__(self, other)\\n'\n'object.__rmul__(self, other)\\n'\n'object.__rmatmul__(self, other)\\n'\n'object.__rtruediv__(self, other)\\n'\n'object.__rfloordiv__(self, other)\\n'\n'object.__rmod__(self, other)\\n'\n'object.__rdivmod__(self, other)\\n'\n'object.__rpow__(self, other[, modulo])\\n'\n'object.__rlshift__(self, other)\\n'\n'object.__rrshift__(self, other)\\n'\n'object.__rand__(self, other)\\n'\n'object.__rxor__(self, other)\\n'\n'object.__ror__(self, other)\\n'\n'\\n'\n' These methods are called to implement the binary '\n'arithmetic\\n'\n' operations (\"+\", \"-\", \"*\", \"@\", \"/\", \"//\", \"%\", '\n'\"divmod()\",\\n'\n' \"pow()\", \"**\", \"<<\", \">>\", \"&\", \"^\", \"|\") with reflected '\n'(swapped)\\n'\n' operands. These functions are only called if the left '\n'operand does\\n'\n' not support the corresponding operation [3] and the '\n'operands are of\\n'\n' different types. [4] For instance, to evaluate the '\n'expression \"x -\\n'\n' y\", where *y* is an instance of a class that has an '\n'\"__rsub__()\"\\n'\n' method, \"y.__rsub__(x)\" is called if \"x.__sub__(y)\" '\n'returns\\n'\n' *NotImplemented*.\\n'\n'\\n'\n' Note that ternary \"pow()\" will not try calling '\n'\"__rpow__()\" (the\\n'\n' coercion rules would become too complicated).\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' If the right operand\u2019s type is a subclass of the left '\n'operand\u2019s\\n'\n' type and that subclass provides a different '\n'implementation of the\\n'\n' reflected method for the operation, this method will '\n'be called\\n'\n' before the left operand\u2019s non-reflected method. This '\n'behavior\\n'\n' allows subclasses to override their ancestors\u2019 '\n'operations.\\n'\n'\\n'\n'object.__iadd__(self, other)\\n'\n'object.__isub__(self, other)\\n'\n'object.__imul__(self, other)\\n'\n'object.__imatmul__(self, other)\\n'\n'object.__itruediv__(self, other)\\n'\n'object.__ifloordiv__(self, other)\\n'\n'object.__imod__(self, other)\\n'\n'object.__ipow__(self, other[, modulo])\\n'\n'object.__ilshift__(self, other)\\n'\n'object.__irshift__(self, other)\\n'\n'object.__iand__(self, other)\\n'\n'object.__ixor__(self, other)\\n'\n'object.__ior__(self, other)\\n'\n'\\n'\n' These methods are called to implement the augmented '\n'arithmetic\\n'\n' assignments (\"+=\", \"-=\", \"*=\", \"@=\", \"/=\", \"//=\", \"%=\", '\n'\"**=\",\\n'\n' \"<<=\", \">>=\", \"&=\", \"^=\", \"|=\"). These methods should '\n'attempt to\\n'\n' do the operation in-place (modifying *self*) and return '\n'the result\\n'\n' (which could be, but does not have to be, *self*). If a '\n'specific\\n'\n' method is not defined, the augmented assignment falls '\n'back to the\\n'\n' normal methods. For instance, if *x* is an instance of '\n'a class\\n'\n' with an \"__iadd__()\" method, \"x += y\" is equivalent to '\n'\"x =\\n'\n' x.__iadd__(y)\" . Otherwise, \"x.__add__(y)\" and '\n'\"y.__radd__(x)\" are\\n'\n' considered, as with the evaluation of \"x + y\". In '\n'certain\\n'\n' situations, augmented assignment can result in '\n'unexpected errors\\n'\n' (see Why does a_tuple[i] += [\u2018item\u2019] raise an exception '\n'when the\\n'\n' addition works?), but this behavior is in fact part of '\n'the data\\n'\n' model.\\n'\n'\\n'\n'object.__neg__(self)\\n'\n'object.__pos__(self)\\n'\n'object.__abs__(self)\\n'\n'object.__invert__(self)\\n'\n'\\n'\n' Called to implement the unary arithmetic operations '\n'(\"-\", \"+\",\\n'\n' \"abs()\" and \"~\").\\n'\n'\\n'\n'object.__complex__(self)\\n'\n'object.__int__(self)\\n'\n'object.__float__(self)\\n'\n'\\n'\n' Called to implement the built-in functions \"complex()\", '\n'\"int()\" and\\n'\n' \"float()\". Should return a value of the appropriate '\n'type.\\n'\n'\\n'\n'object.__index__(self)\\n'\n'\\n'\n' Called to implement \"operator.index()\", and whenever '\n'Python needs\\n'\n' to losslessly convert the numeric object to an integer '\n'object (such\\n'\n' as in slicing, or in the built-in \"bin()\", \"hex()\" and '\n'\"oct()\"\\n'\n' functions). Presence of this method indicates that the '\n'numeric\\n'\n' object is an integer type. Must return an integer.\\n'\n'\\n'\n' If \"__int__()\", \"__float__()\" and \"__complex__()\" are '\n'not defined\\n'\n' then corresponding built-in functions \"int()\", \"float()\" '\n'and\\n'\n' \"complex()\" fall back to \"__index__()\".\\n'\n'\\n'\n'object.__round__(self[, ndigits])\\n'\n'object.__trunc__(self)\\n'\n'object.__floor__(self)\\n'\n'object.__ceil__(self)\\n'\n'\\n'\n' Called to implement the built-in function \"round()\" and '\n'\"math\"\\n'\n' functions \"trunc()\", \"floor()\" and \"ceil()\". Unless '\n'*ndigits* is\\n'\n' passed to \"__round__()\" all these methods should return '\n'the value\\n'\n' of the object truncated to an \"Integral\" (typically an '\n'\"int\").\\n'\n'\\n'\n' If \"__int__()\" is not defined then the built-in function '\n'\"int()\"\\n'\n' falls back to \"__trunc__()\".\\n',\n'objects':'Objects, values and types\\n'\n'*************************\\n'\n'\\n'\n'*Objects* are Python\u2019s abstraction for data. All data in a '\n'Python\\n'\n'program is represented by objects or by relations between '\n'objects. (In\\n'\n'a sense, and in conformance to Von Neumann\u2019s model of a \u201cstored\\n'\n'program computer\u201d, code is also represented by objects.)\\n'\n'\\n'\n'Every object has an identity, a type and a value. An object\u2019s\\n'\n'*identity* never changes once it has been created; you may think '\n'of it\\n'\n'as the object\u2019s address in memory. The \u2018\"is\"\u2019 operator compares '\n'the\\n'\n'identity of two objects; the \"id()\" function returns an integer\\n'\n'representing its identity.\\n'\n'\\n'\n'**CPython implementation detail:** For CPython, \"id(x)\" is the '\n'memory\\n'\n'address where \"x\" is stored.\\n'\n'\\n'\n'An object\u2019s type determines the operations that the object '\n'supports\\n'\n'(e.g., \u201cdoes it have a length?\u201d) and also defines the possible '\n'values\\n'\n'for objects of that type. The \"type()\" function returns an '\n'object\u2019s\\n'\n'type (which is an object itself). Like its identity, an '\n'object\u2019s\\n'\n'*type* is also unchangeable. [1]\\n'\n'\\n'\n'The *value* of some objects can change. Objects whose value can\\n'\n'change are said to be *mutable*; objects whose value is '\n'unchangeable\\n'\n'once they are created are called *immutable*. (The value of an\\n'\n'immutable container object that contains a reference to a '\n'mutable\\n'\n'object can change when the latter\u2019s value is changed; however '\n'the\\n'\n'container is still considered immutable, because the collection '\n'of\\n'\n'objects it contains cannot be changed. So, immutability is not\\n'\n'strictly the same as having an unchangeable value, it is more '\n'subtle.)\\n'\n'An object\u2019s mutability is determined by its type; for instance,\\n'\n'numbers, strings and tuples are immutable, while dictionaries '\n'and\\n'\n'lists are mutable.\\n'\n'\\n'\n'Objects are never explicitly destroyed; however, when they '\n'become\\n'\n'unreachable they may be garbage-collected. An implementation is\\n'\n'allowed to postpone garbage collection or omit it altogether \u2014 it '\n'is a\\n'\n'matter of implementation quality how garbage collection is\\n'\n'implemented, as long as no objects are collected that are still\\n'\n'reachable.\\n'\n'\\n'\n'**CPython implementation detail:** CPython currently uses a '\n'reference-\\n'\n'counting scheme with (optional) delayed detection of cyclically '\n'linked\\n'\n'garbage, which collects most objects as soon as they become\\n'\n'unreachable, but is not guaranteed to collect garbage containing\\n'\n'circular references. See the documentation of the \"gc\" module '\n'for\\n'\n'information on controlling the collection of cyclic garbage. '\n'Other\\n'\n'implementations act differently and CPython may change. Do not '\n'depend\\n'\n'on immediate finalization of objects when they become unreachable '\n'(so\\n'\n'you should always close files explicitly).\\n'\n'\\n'\n'Note that the use of the implementation\u2019s tracing or debugging\\n'\n'facilities may keep objects alive that would normally be '\n'collectable.\\n'\n'Also note that catching an exception with a \u2018\"try\"\u2026\"except\"\u2019 '\n'statement\\n'\n'may keep objects alive.\\n'\n'\\n'\n'Some objects contain references to \u201cexternal\u201d resources such as '\n'open\\n'\n'files or windows. It is understood that these resources are '\n'freed\\n'\n'when the object is garbage-collected, but since garbage '\n'collection is\\n'\n'not guaranteed to happen, such objects also provide an explicit '\n'way to\\n'\n'release the external resource, usually a \"close()\" method. '\n'Programs\\n'\n'are strongly recommended to explicitly close such objects. The\\n'\n'\u2018\"try\"\u2026\"finally\"\u2019 statement and the \u2018\"with\"\u2019 statement provide\\n'\n'convenient ways to do this.\\n'\n'\\n'\n'Some objects contain references to other objects; these are '\n'called\\n'\n'*containers*. Examples of containers are tuples, lists and\\n'\n'dictionaries. The references are part of a container\u2019s value. '\n'In\\n'\n'most cases, when we talk about the value of a container, we imply '\n'the\\n'\n'values, not the identities of the contained objects; however, '\n'when we\\n'\n'talk about the mutability of a container, only the identities of '\n'the\\n'\n'immediately contained objects are implied. So, if an immutable\\n'\n'container (like a tuple) contains a reference to a mutable '\n'object, its\\n'\n'value changes if that mutable object is changed.\\n'\n'\\n'\n'Types affect almost all aspects of object behavior. Even the\\n'\n'importance of object identity is affected in some sense: for '\n'immutable\\n'\n'types, operations that compute new values may actually return a\\n'\n'reference to any existing object with the same type and value, '\n'while\\n'\n'for mutable objects this is not allowed. E.g., after \"a = 1; b = '\n'1\",\\n'\n'\"a\" and \"b\" may or may not refer to the same object with the '\n'value\\n'\n'one, depending on the implementation, but after \"c = []; d = []\", '\n'\"c\"\\n'\n'and \"d\" are guaranteed to refer to two different, unique, newly\\n'\n'created empty lists. (Note that \"c = d = []\" assigns the same '\n'object\\n'\n'to both \"c\" and \"d\".)\\n',\n'operator-summary':'Operator precedence\\n'\n'*******************\\n'\n'\\n'\n'The following table summarizes the operator precedence '\n'in Python, from\\n'\n'highest precedence (most binding) to lowest precedence '\n'(least\\n'\n'binding). Operators in the same box have the same '\n'precedence. Unless\\n'\n'the syntax is explicitly given, operators are binary. '\n'Operators in\\n'\n'the same box group left to right (except for '\n'exponentiation, which\\n'\n'groups from right to left).\\n'\n'\\n'\n'Note that comparisons, membership tests, and identity '\n'tests, all have\\n'\n'the same precedence and have a left-to-right chaining '\n'feature as\\n'\n'described in the Comparisons section.\\n'\n'\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| Operator | '\n'Description |\\n'\n'|=================================================|=======================================|\\n'\n'| \"(expressions...)\", \"[expressions...]\", \"{key: | '\n'Binding or parenthesized expression, |\\n'\n'| value...}\", \"{expressions...}\" | list '\n'display, dictionary display, set |\\n'\n'| | '\n'display |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"x[index]\", \"x[index:index]\", | '\n'Subscription, slicing, call, |\\n'\n'| \"x(arguments...)\", \"x.attribute\" | '\n'attribute reference |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"await\" \"x\" | '\n'Await expression |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"**\" | '\n'Exponentiation [5] |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"+x\", \"-x\", \"~x\" | '\n'Positive, negative, bitwise NOT |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"*\", \"@\", \"/\", \"//\", \"%\" | '\n'Multiplication, matrix |\\n'\n'| | '\n'multiplication, division, floor |\\n'\n'| | '\n'division, remainder [6] |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"+\", \"-\" | '\n'Addition and subtraction |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"<<\", \">>\" | '\n'Shifts |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"&\" | '\n'Bitwise AND |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"^\" | '\n'Bitwise XOR |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"|\" | '\n'Bitwise OR |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"in\", \"not in\", \"is\", \"is not\", \"<\", \"<=\", \">\", | '\n'Comparisons, including membership |\\n'\n'| \">=\", \"!=\", \"==\" | '\n'tests and identity tests |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"not\" \"x\" | '\n'Boolean NOT |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"and\" | '\n'Boolean AND |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"or\" | '\n'Boolean OR |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"if\" \u2013 \"else\" | '\n'Conditional expression |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \"lambda\" | '\n'Lambda expression |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'| \":=\" | '\n'Assignment expression |\\n'\n'+-------------------------------------------------+---------------------------------------+\\n'\n'\\n'\n'-[ Footnotes ]-\\n'\n'\\n'\n'[1] While \"abs(x%y) < abs(y)\" is true mathematically, '\n'for floats it\\n'\n' may not be true numerically due to roundoff. For '\n'example, and\\n'\n' assuming a platform on which a Python float is an '\n'IEEE 754 double-\\n'\n' precision number, in order that \"-1e-100 % 1e100\" '\n'have the same\\n'\n' sign as \"1e100\", the computed result is \"-1e-100 + '\n'1e100\", which\\n'\n' is numerically exactly equal to \"1e100\". The '\n'function\\n'\n' \"math.fmod()\" returns a result whose sign matches '\n'the sign of the\\n'\n' first argument instead, and so returns \"-1e-100\" in '\n'this case.\\n'\n' Which approach is more appropriate depends on the '\n'application.\\n'\n'\\n'\n'[2] If x is very close to an exact integer multiple of '\n'y, it\u2019s\\n'\n' possible for \"x//y\" to be one larger than '\n'\"(x-x%y)//y\" due to\\n'\n' rounding. In such cases, Python returns the latter '\n'result, in\\n'\n' order to preserve that \"divmod(x,y)[0] * y + x % y\" '\n'be very close\\n'\n' to \"x\".\\n'\n'\\n'\n'[3] The Unicode standard distinguishes between *code '\n'points* (e.g.\\n'\n' U+0041) and *abstract characters* (e.g. \u201cLATIN '\n'CAPITAL LETTER A\u201d).\\n'\n' While most abstract characters in Unicode are only '\n'represented\\n'\n' using one code point, there is a number of abstract '\n'characters\\n'\n' that can in addition be represented using a sequence '\n'of more than\\n'\n' one code point. For example, the abstract character '\n'\u201cLATIN\\n'\n' CAPITAL LETTER C WITH CEDILLA\u201d can be represented as '\n'a single\\n'\n' *precomposed character* at code position U+00C7, or '\n'as a sequence\\n'\n' of a *base character* at code position U+0043 (LATIN '\n'CAPITAL\\n'\n' LETTER C), followed by a *combining character* at '\n'code position\\n'\n' U+0327 (COMBINING CEDILLA).\\n'\n'\\n'\n' The comparison operators on strings compare at the '\n'level of\\n'\n' Unicode code points. This may be counter-intuitive '\n'to humans. For\\n'\n' example, \"\"\\\\u00C7\" == \"\\\\u0043\\\\u0327\"\" is \"False\", '\n'even though both\\n'\n' strings represent the same abstract character \u201cLATIN '\n'CAPITAL\\n'\n' LETTER C WITH CEDILLA\u201d.\\n'\n'\\n'\n' To compare strings at the level of abstract '\n'characters (that is,\\n'\n' in a way intuitive to humans), use '\n'\"unicodedata.normalize()\".\\n'\n'\\n'\n'[4] Due to automatic garbage-collection, free lists, and '\n'the dynamic\\n'\n' nature of descriptors, you may notice seemingly '\n'unusual behaviour\\n'\n' in certain uses of the \"is\" operator, like those '\n'involving\\n'\n' comparisons between instance methods, or constants. '\n'Check their\\n'\n' documentation for more info.\\n'\n'\\n'\n'[5] The power operator \"**\" binds less tightly than an '\n'arithmetic or\\n'\n' bitwise unary operator on its right, that is, '\n'\"2**-1\" is \"0.5\".\\n'\n'\\n'\n'[6] The \"%\" operator is also used for string formatting; '\n'the same\\n'\n' precedence applies.\\n',\n'pass':'The \"pass\" statement\\n'\n'********************\\n'\n'\\n'\n' pass_stmt ::= \"pass\"\\n'\n'\\n'\n'\"pass\" is a null operation \u2014 when it is executed, nothing happens. '\n'It\\n'\n'is useful as a placeholder when a statement is required '\n'syntactically,\\n'\n'but no code needs to be executed, for example:\\n'\n'\\n'\n' def f(arg): pass # a function that does nothing (yet)\\n'\n'\\n'\n' class C: pass # a class with no methods (yet)\\n',\n'power':'The power operator\\n'\n'******************\\n'\n'\\n'\n'The power operator binds more tightly than unary operators on its\\n'\n'left; it binds less tightly than unary operators on its right. '\n'The\\n'\n'syntax is:\\n'\n'\\n'\n' power ::= (await_expr | primary) [\"**\" u_expr]\\n'\n'\\n'\n'Thus, in an unparenthesized sequence of power and unary operators, '\n'the\\n'\n'operators are evaluated from right to left (this does not '\n'constrain\\n'\n'the evaluation order for the operands): \"-1**2\" results in \"-1\".\\n'\n'\\n'\n'The power operator has the same semantics as the built-in \"pow()\"\\n'\n'function, when called with two arguments: it yields its left '\n'argument\\n'\n'raised to the power of its right argument. The numeric arguments '\n'are\\n'\n'first converted to a common type, and the result is of that type.\\n'\n'\\n'\n'For int operands, the result has the same type as the operands '\n'unless\\n'\n'the second argument is negative; in that case, all arguments are\\n'\n'converted to float and a float result is delivered. For example,\\n'\n'\"10**2\" returns \"100\", but \"10**-2\" returns \"0.01\".\\n'\n'\\n'\n'Raising \"0.0\" to a negative power results in a '\n'\"ZeroDivisionError\".\\n'\n'Raising a negative number to a fractional power results in a '\n'\"complex\"\\n'\n'number. (In earlier versions it raised a \"ValueError\".)\\n'\n'\\n'\n'This operation can be customized using the special \"__pow__()\" '\n'method.\\n',\n'raise':'The \"raise\" statement\\n'\n'*********************\\n'\n'\\n'\n' raise_stmt ::= \"raise\" [expression [\"from\" expression]]\\n'\n'\\n'\n'If no expressions are present, \"raise\" re-raises the last '\n'exception\\n'\n'that was active in the current scope. If no exception is active '\n'in\\n'\n'the current scope, a \"RuntimeError\" exception is raised indicating\\n'\n'that this is an error.\\n'\n'\\n'\n'Otherwise, \"raise\" evaluates the first expression as the exception\\n'\n'object. It must be either a subclass or an instance of\\n'\n'\"BaseException\". If it is a class, the exception instance will be\\n'\n'obtained when needed by instantiating the class with no arguments.\\n'\n'\\n'\n'The *type* of the exception is the exception instance\u2019s class, the\\n'\n'*value* is the instance itself.\\n'\n'\\n'\n'A traceback object is normally created automatically when an '\n'exception\\n'\n'is raised and attached to it as the \"__traceback__\" attribute, '\n'which\\n'\n'is writable. You can create an exception and set your own traceback '\n'in\\n'\n'one step using the \"with_traceback()\" exception method (which '\n'returns\\n'\n'the same exception instance, with its traceback set to its '\n'argument),\\n'\n'like so:\\n'\n'\\n'\n' raise Exception(\"foo occurred\").with_traceback(tracebackobj)\\n'\n'\\n'\n'The \"from\" clause is used for exception chaining: if given, the '\n'second\\n'\n'*expression* must be another exception class or instance. If the\\n'\n'second expression is an exception instance, it will be attached to '\n'the\\n'\n'raised exception as the \"__cause__\" attribute (which is writable). '\n'If\\n'\n'the expression is an exception class, the class will be '\n'instantiated\\n'\n'and the resulting exception instance will be attached to the '\n'raised\\n'\n'exception as the \"__cause__\" attribute. If the raised exception is '\n'not\\n'\n'handled, both exceptions will be printed:\\n'\n'\\n'\n' >>> try:\\n'\n' ... print(1 / 0)\\n'\n' ... except Exception as exc:\\n'\n' ... raise RuntimeError(\"Something bad happened\") from exc\\n'\n' ...\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 2, in \\n'\n' ZeroDivisionError: division by zero\\n'\n'\\n'\n' The above exception was the direct cause of the following '\n'exception:\\n'\n'\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 4, in \\n'\n' RuntimeError: Something bad happened\\n'\n'\\n'\n'A similar mechanism works implicitly if an exception is raised '\n'inside\\n'\n'an exception handler or a \"finally\" clause: the previous exception '\n'is\\n'\n'then attached as the new exception\u2019s \"__context__\" attribute:\\n'\n'\\n'\n' >>> try:\\n'\n' ... print(1 / 0)\\n'\n' ... except:\\n'\n' ... raise RuntimeError(\"Something bad happened\")\\n'\n' ...\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 2, in \\n'\n' ZeroDivisionError: division by zero\\n'\n'\\n'\n' During handling of the above exception, another exception '\n'occurred:\\n'\n'\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 4, in \\n'\n' RuntimeError: Something bad happened\\n'\n'\\n'\n'Exception chaining can be explicitly suppressed by specifying '\n'\"None\"\\n'\n'in the \"from\" clause:\\n'\n'\\n'\n' >>> try:\\n'\n' ... print(1 / 0)\\n'\n' ... except:\\n'\n' ... raise RuntimeError(\"Something bad happened\") from None\\n'\n' ...\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 4, in \\n'\n' RuntimeError: Something bad happened\\n'\n'\\n'\n'Additional information on exceptions can be found in section\\n'\n'Exceptions, and information about handling exceptions is in '\n'section\\n'\n'The try statement.\\n'\n'\\n'\n'Changed in version 3.3: \"None\" is now permitted as \"Y\" in \"raise X\\n'\n'from Y\".\\n'\n'\\n'\n'New in version 3.3: The \"__suppress_context__\" attribute to '\n'suppress\\n'\n'automatic display of the exception context.\\n',\n'return':'The \"return\" statement\\n'\n'**********************\\n'\n'\\n'\n' return_stmt ::= \"return\" [expression_list]\\n'\n'\\n'\n'\"return\" may only occur syntactically nested in a function '\n'definition,\\n'\n'not within a nested class definition.\\n'\n'\\n'\n'If an expression list is present, it is evaluated, else \"None\" is\\n'\n'substituted.\\n'\n'\\n'\n'\"return\" leaves the current function call with the expression list '\n'(or\\n'\n'\"None\") as return value.\\n'\n'\\n'\n'When \"return\" passes control out of a \"try\" statement with a '\n'\"finally\"\\n'\n'clause, that \"finally\" clause is executed before really leaving '\n'the\\n'\n'function.\\n'\n'\\n'\n'In a generator function, the \"return\" statement indicates that '\n'the\\n'\n'generator is done and will cause \"StopIteration\" to be raised. '\n'The\\n'\n'returned value (if any) is used as an argument to construct\\n'\n'\"StopIteration\" and becomes the \"StopIteration.value\" attribute.\\n'\n'\\n'\n'In an asynchronous generator function, an empty \"return\" '\n'statement\\n'\n'indicates that the asynchronous generator is done and will cause\\n'\n'\"StopAsyncIteration\" to be raised. A non-empty \"return\" statement '\n'is\\n'\n'a syntax error in an asynchronous generator function.\\n',\n'sequence-types':'Emulating container types\\n'\n'*************************\\n'\n'\\n'\n'The following methods can be defined to implement '\n'container objects.\\n'\n'Containers usually are sequences (such as lists or tuples) '\n'or mappings\\n'\n'(like dictionaries), but can represent other containers as '\n'well. The\\n'\n'first set of methods is used either to emulate a sequence '\n'or to\\n'\n'emulate a mapping; the difference is that for a sequence, '\n'the\\n'\n'allowable keys should be the integers *k* for which \"0 <= '\n'k < N\" where\\n'\n'*N* is the length of the sequence, or slice objects, which '\n'define a\\n'\n'range of items. It is also recommended that mappings '\n'provide the\\n'\n'methods \"keys()\", \"values()\", \"items()\", \"get()\", '\n'\"clear()\",\\n'\n'\"setdefault()\", \"pop()\", \"popitem()\", \"copy()\", and '\n'\"update()\"\\n'\n'behaving similar to those for Python\u2019s standard dictionary '\n'objects.\\n'\n'The \"collections.abc\" module provides a \"MutableMapping\" '\n'abstract base\\n'\n'class to help create those methods from a base set of '\n'\"__getitem__()\",\\n'\n'\"__setitem__()\", \"__delitem__()\", and \"keys()\". Mutable '\n'sequences\\n'\n'should provide methods \"append()\", \"count()\", \"index()\", '\n'\"extend()\",\\n'\n'\"insert()\", \"pop()\", \"remove()\", \"reverse()\" and \"sort()\", '\n'like Python\\n'\n'standard list objects. Finally, sequence types should '\n'implement\\n'\n'addition (meaning concatenation) and multiplication '\n'(meaning\\n'\n'repetition) by defining the methods \"__add__()\", '\n'\"__radd__()\",\\n'\n'\"__iadd__()\", \"__mul__()\", \"__rmul__()\" and \"__imul__()\" '\n'described\\n'\n'below; they should not define other numerical operators. '\n'It is\\n'\n'recommended that both mappings and sequences implement '\n'the\\n'\n'\"__contains__()\" method to allow efficient use of the \"in\" '\n'operator;\\n'\n'for mappings, \"in\" should search the mapping\u2019s keys; for '\n'sequences, it\\n'\n'should search through the values. It is further '\n'recommended that both\\n'\n'mappings and sequences implement the \"__iter__()\" method '\n'to allow\\n'\n'efficient iteration through the container; for mappings, '\n'\"__iter__()\"\\n'\n'should iterate through the object\u2019s keys; for sequences, '\n'it should\\n'\n'iterate through the values.\\n'\n'\\n'\n'object.__len__(self)\\n'\n'\\n'\n' Called to implement the built-in function \"len()\". '\n'Should return\\n'\n' the length of the object, an integer \">=\" 0. Also, an '\n'object that\\n'\n' doesn\u2019t define a \"__bool__()\" method and whose '\n'\"__len__()\" method\\n'\n' returns zero is considered to be false in a Boolean '\n'context.\\n'\n'\\n'\n' **CPython implementation detail:** In CPython, the '\n'length is\\n'\n' required to be at most \"sys.maxsize\". If the length is '\n'larger than\\n'\n' \"sys.maxsize\" some features (such as \"len()\") may '\n'raise\\n'\n' \"OverflowError\". To prevent raising \"OverflowError\" by '\n'truth value\\n'\n' testing, an object must define a \"__bool__()\" method.\\n'\n'\\n'\n'object.__length_hint__(self)\\n'\n'\\n'\n' Called to implement \"operator.length_hint()\". Should '\n'return an\\n'\n' estimated length for the object (which may be greater '\n'or less than\\n'\n' the actual length). The length must be an integer \">=\" '\n'0. The\\n'\n' return value may also be \"NotImplemented\", which is '\n'treated the\\n'\n' same as if the \"__length_hint__\" method didn\u2019t exist at '\n'all. This\\n'\n' method is purely an optimization and is never required '\n'for\\n'\n' correctness.\\n'\n'\\n'\n' New in version 3.4.\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Slicing is done exclusively with the following three '\n'methods. A\\n'\n' call like\\n'\n'\\n'\n' a[1:2] = b\\n'\n'\\n'\n' is translated to\\n'\n'\\n'\n' a[slice(1, 2, None)] = b\\n'\n'\\n'\n' and so forth. Missing slice items are always filled in '\n'with \"None\".\\n'\n'\\n'\n'object.__getitem__(self, key)\\n'\n'\\n'\n' Called to implement evaluation of \"self[key]\". For '\n'sequence types,\\n'\n' the accepted keys should be integers and slice '\n'objects. Note that\\n'\n' the special interpretation of negative indexes (if the '\n'class wishes\\n'\n' to emulate a sequence type) is up to the '\n'\"__getitem__()\" method. If\\n'\n' *key* is of an inappropriate type, \"TypeError\" may be '\n'raised; if of\\n'\n' a value outside the set of indexes for the sequence '\n'(after any\\n'\n' special interpretation of negative values), '\n'\"IndexError\" should be\\n'\n' raised. For mapping types, if *key* is missing (not in '\n'the\\n'\n' container), \"KeyError\" should be raised.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' \"for\" loops expect that an \"IndexError\" will be '\n'raised for\\n'\n' illegal indexes to allow proper detection of the end '\n'of the\\n'\n' sequence.\\n'\n'\\n'\n'object.__setitem__(self, key, value)\\n'\n'\\n'\n' Called to implement assignment to \"self[key]\". Same '\n'note as for\\n'\n' \"__getitem__()\". This should only be implemented for '\n'mappings if\\n'\n' the objects support changes to the values for keys, or '\n'if new keys\\n'\n' can be added, or for sequences if elements can be '\n'replaced. The\\n'\n' same exceptions should be raised for improper *key* '\n'values as for\\n'\n' the \"__getitem__()\" method.\\n'\n'\\n'\n'object.__delitem__(self, key)\\n'\n'\\n'\n' Called to implement deletion of \"self[key]\". Same note '\n'as for\\n'\n' \"__getitem__()\". This should only be implemented for '\n'mappings if\\n'\n' the objects support removal of keys, or for sequences '\n'if elements\\n'\n' can be removed from the sequence. The same exceptions '\n'should be\\n'\n' raised for improper *key* values as for the '\n'\"__getitem__()\" method.\\n'\n'\\n'\n'object.__missing__(self, key)\\n'\n'\\n'\n' Called by \"dict\".\"__getitem__()\" to implement '\n'\"self[key]\" for dict\\n'\n' subclasses when key is not in the dictionary.\\n'\n'\\n'\n'object.__iter__(self)\\n'\n'\\n'\n' This method is called when an iterator is required for '\n'a container.\\n'\n' This method should return a new iterator object that '\n'can iterate\\n'\n' over all the objects in the container. For mappings, '\n'it should\\n'\n' iterate over the keys of the container.\\n'\n'\\n'\n' Iterator objects also need to implement this method; '\n'they are\\n'\n' required to return themselves. For more information on '\n'iterator\\n'\n' objects, see Iterator Types.\\n'\n'\\n'\n'object.__reversed__(self)\\n'\n'\\n'\n' Called (if present) by the \"reversed()\" built-in to '\n'implement\\n'\n' reverse iteration. It should return a new iterator '\n'object that\\n'\n' iterates over all the objects in the container in '\n'reverse order.\\n'\n'\\n'\n' If the \"__reversed__()\" method is not provided, the '\n'\"reversed()\"\\n'\n' built-in will fall back to using the sequence protocol '\n'(\"__len__()\"\\n'\n' and \"__getitem__()\"). Objects that support the '\n'sequence protocol\\n'\n' should only provide \"__reversed__()\" if they can '\n'provide an\\n'\n' implementation that is more efficient than the one '\n'provided by\\n'\n' \"reversed()\".\\n'\n'\\n'\n'The membership test operators (\"in\" and \"not in\") are '\n'normally\\n'\n'implemented as an iteration through a container. However, '\n'container\\n'\n'objects can supply the following special method with a '\n'more efficient\\n'\n'implementation, which also does not require the object be '\n'iterable.\\n'\n'\\n'\n'object.__contains__(self, item)\\n'\n'\\n'\n' Called to implement membership test operators. Should '\n'return true\\n'\n' if *item* is in *self*, false otherwise. For mapping '\n'objects, this\\n'\n' should consider the keys of the mapping rather than the '\n'values or\\n'\n' the key-item pairs.\\n'\n'\\n'\n' For objects that don\u2019t define \"__contains__()\", the '\n'membership test\\n'\n' first tries iteration via \"__iter__()\", then the old '\n'sequence\\n'\n' iteration protocol via \"__getitem__()\", see this '\n'section in the\\n'\n' language reference.\\n',\n'shifting':'Shifting operations\\n'\n'*******************\\n'\n'\\n'\n'The shifting operations have lower priority than the arithmetic\\n'\n'operations:\\n'\n'\\n'\n' shift_expr ::= a_expr | shift_expr (\"<<\" | \">>\") a_expr\\n'\n'\\n'\n'These operators accept integers as arguments. They shift the '\n'first\\n'\n'argument to the left or right by the number of bits given by '\n'the\\n'\n'second argument.\\n'\n'\\n'\n'This operation can be customized using the special '\n'\"__lshift__()\" and\\n'\n'\"__rshift__()\" methods.\\n'\n'\\n'\n'A right shift by *n* bits is defined as floor division by '\n'\"pow(2,n)\".\\n'\n'A left shift by *n* bits is defined as multiplication with '\n'\"pow(2,n)\".\\n',\n'slicings':'Slicings\\n'\n'********\\n'\n'\\n'\n'A slicing selects a range of items in a sequence object (e.g., '\n'a\\n'\n'string, tuple or list). Slicings may be used as expressions or '\n'as\\n'\n'targets in assignment or \"del\" statements. The syntax for a '\n'slicing:\\n'\n'\\n'\n' slicing ::= primary \"[\" slice_list \"]\"\\n'\n' slice_list ::= slice_item (\",\" slice_item)* [\",\"]\\n'\n' slice_item ::= expression | proper_slice\\n'\n' proper_slice ::= [lower_bound] \":\" [upper_bound] [ \":\" '\n'[stride] ]\\n'\n' lower_bound ::= expression\\n'\n' upper_bound ::= expression\\n'\n' stride ::= expression\\n'\n'\\n'\n'There is ambiguity in the formal syntax here: anything that '\n'looks like\\n'\n'an expression list also looks like a slice list, so any '\n'subscription\\n'\n'can be interpreted as a slicing. Rather than further '\n'complicating the\\n'\n'syntax, this is disambiguated by defining that in this case the\\n'\n'interpretation as a subscription takes priority over the\\n'\n'interpretation as a slicing (this is the case if the slice list\\n'\n'contains no proper slice).\\n'\n'\\n'\n'The semantics for a slicing are as follows. The primary is '\n'indexed\\n'\n'(using the same \"__getitem__()\" method as normal subscription) '\n'with a\\n'\n'key that is constructed from the slice list, as follows. If the '\n'slice\\n'\n'list contains at least one comma, the key is a tuple containing '\n'the\\n'\n'conversion of the slice items; otherwise, the conversion of the '\n'lone\\n'\n'slice item is the key. The conversion of a slice item that is '\n'an\\n'\n'expression is that expression. The conversion of a proper slice '\n'is a\\n'\n'slice object (see section The standard type hierarchy) whose '\n'\"start\",\\n'\n'\"stop\" and \"step\" attributes are the values of the expressions '\n'given\\n'\n'as lower bound, upper bound and stride, respectively, '\n'substituting\\n'\n'\"None\" for missing expressions.\\n',\n'specialattrs':'Special Attributes\\n'\n'******************\\n'\n'\\n'\n'The implementation adds a few special read-only attributes '\n'to several\\n'\n'object types, where they are relevant. Some of these are '\n'not reported\\n'\n'by the \"dir()\" built-in function.\\n'\n'\\n'\n'object.__dict__\\n'\n'\\n'\n' A dictionary or other mapping object used to store an '\n'object\u2019s\\n'\n' (writable) attributes.\\n'\n'\\n'\n'instance.__class__\\n'\n'\\n'\n' The class to which a class instance belongs.\\n'\n'\\n'\n'class.__bases__\\n'\n'\\n'\n' The tuple of base classes of a class object.\\n'\n'\\n'\n'definition.__name__\\n'\n'\\n'\n' The name of the class, function, method, descriptor, or '\n'generator\\n'\n' instance.\\n'\n'\\n'\n'definition.__qualname__\\n'\n'\\n'\n' The *qualified name* of the class, function, method, '\n'descriptor, or\\n'\n' generator instance.\\n'\n'\\n'\n' New in version 3.3.\\n'\n'\\n'\n'class.__mro__\\n'\n'\\n'\n' This attribute is a tuple of classes that are considered '\n'when\\n'\n' looking for base classes during method resolution.\\n'\n'\\n'\n'class.mro()\\n'\n'\\n'\n' This method can be overridden by a metaclass to customize '\n'the\\n'\n' method resolution order for its instances. It is called '\n'at class\\n'\n' instantiation, and its result is stored in \"__mro__\".\\n'\n'\\n'\n'class.__subclasses__()\\n'\n'\\n'\n' Each class keeps a list of weak references to its '\n'immediate\\n'\n' subclasses. This method returns a list of all those '\n'references\\n'\n' still alive. The list is in definition order. Example:\\n'\n'\\n'\n' >>> int.__subclasses__()\\n'\n\" []\\n\"\n'\\n'\n'-[ Footnotes ]-\\n'\n'\\n'\n'[1] Additional information on these special methods may be '\n'found in\\n'\n' the Python Reference Manual (Basic customization).\\n'\n'\\n'\n'[2] As a consequence, the list \"[1, 2]\" is considered equal '\n'to \"[1.0,\\n'\n' 2.0]\", and similarly for tuples.\\n'\n'\\n'\n'[3] They must have since the parser can\u2019t tell the type of '\n'the\\n'\n' operands.\\n'\n'\\n'\n'[4] Cased characters are those with general category '\n'property being\\n'\n' one of \u201cLu\u201d (Letter, uppercase), \u201cLl\u201d (Letter, '\n'lowercase), or \u201cLt\u201d\\n'\n' (Letter, titlecase).\\n'\n'\\n'\n'[5] To format only a tuple you should therefore provide a '\n'singleton\\n'\n' tuple whose only element is the tuple to be formatted.\\n',\n'specialnames':'Special method names\\n'\n'********************\\n'\n'\\n'\n'A class can implement certain operations that are invoked by '\n'special\\n'\n'syntax (such as arithmetic operations or subscripting and '\n'slicing) by\\n'\n'defining methods with special names. This is Python\u2019s '\n'approach to\\n'\n'*operator overloading*, allowing classes to define their own '\n'behavior\\n'\n'with respect to language operators. For instance, if a '\n'class defines\\n'\n'a method named \"__getitem__()\", and \"x\" is an instance of '\n'this class,\\n'\n'then \"x[i]\" is roughly equivalent to \"type(x).__getitem__(x, '\n'i)\".\\n'\n'Except where mentioned, attempts to execute an operation '\n'raise an\\n'\n'exception when no appropriate method is defined (typically\\n'\n'\"AttributeError\" or \"TypeError\").\\n'\n'\\n'\n'Setting a special method to \"None\" indicates that the '\n'corresponding\\n'\n'operation is not available. For example, if a class sets '\n'\"__iter__()\"\\n'\n'to \"None\", the class is not iterable, so calling \"iter()\" on '\n'its\\n'\n'instances will raise a \"TypeError\" (without falling back to\\n'\n'\"__getitem__()\"). [2]\\n'\n'\\n'\n'When implementing a class that emulates any built-in type, '\n'it is\\n'\n'important that the emulation only be implemented to the '\n'degree that it\\n'\n'makes sense for the object being modelled. For example, '\n'some\\n'\n'sequences may work well with retrieval of individual '\n'elements, but\\n'\n'extracting a slice may not make sense. (One example of this '\n'is the\\n'\n'\"NodeList\" interface in the W3C\u2019s Document Object Model.)\\n'\n'\\n'\n'\\n'\n'Basic customization\\n'\n'===================\\n'\n'\\n'\n'object.__new__(cls[, ...])\\n'\n'\\n'\n' Called to create a new instance of class *cls*. '\n'\"__new__()\" is a\\n'\n' static method (special-cased so you need not declare it '\n'as such)\\n'\n' that takes the class of which an instance was requested '\n'as its\\n'\n' first argument. The remaining arguments are those passed '\n'to the\\n'\n' object constructor expression (the call to the class). '\n'The return\\n'\n' value of \"__new__()\" should be the new object instance '\n'(usually an\\n'\n' instance of *cls*).\\n'\n'\\n'\n' Typical implementations create a new instance of the '\n'class by\\n'\n' invoking the superclass\u2019s \"__new__()\" method using\\n'\n' \"super().__new__(cls[, ...])\" with appropriate arguments '\n'and then\\n'\n' modifying the newly-created instance as necessary before '\n'returning\\n'\n' it.\\n'\n'\\n'\n' If \"__new__()\" is invoked during object construction and '\n'it returns\\n'\n' an instance or subclass of *cls*, then the new '\n'instance\u2019s\\n'\n' \"__init__()\" method will be invoked like \"__init__(self[, '\n'...])\",\\n'\n' where *self* is the new instance and the remaining '\n'arguments are\\n'\n' the same as were passed to the object constructor.\\n'\n'\\n'\n' If \"__new__()\" does not return an instance of *cls*, then '\n'the new\\n'\n' instance\u2019s \"__init__()\" method will not be invoked.\\n'\n'\\n'\n' \"__new__()\" is intended mainly to allow subclasses of '\n'immutable\\n'\n' types (like int, str, or tuple) to customize instance '\n'creation. It\\n'\n' is also commonly overridden in custom metaclasses in '\n'order to\\n'\n' customize class creation.\\n'\n'\\n'\n'object.__init__(self[, ...])\\n'\n'\\n'\n' Called after the instance has been created (by '\n'\"__new__()\"), but\\n'\n' before it is returned to the caller. The arguments are '\n'those\\n'\n' passed to the class constructor expression. If a base '\n'class has an\\n'\n' \"__init__()\" method, the derived class\u2019s \"__init__()\" '\n'method, if\\n'\n' any, must explicitly call it to ensure proper '\n'initialization of the\\n'\n' base class part of the instance; for example:\\n'\n' \"super().__init__([args...])\".\\n'\n'\\n'\n' Because \"__new__()\" and \"__init__()\" work together in '\n'constructing\\n'\n' objects (\"__new__()\" to create it, and \"__init__()\" to '\n'customize\\n'\n' it), no non-\"None\" value may be returned by \"__init__()\"; '\n'doing so\\n'\n' will cause a \"TypeError\" to be raised at runtime.\\n'\n'\\n'\n'object.__del__(self)\\n'\n'\\n'\n' Called when the instance is about to be destroyed. This '\n'is also\\n'\n' called a finalizer or (improperly) a destructor. If a '\n'base class\\n'\n' has a \"__del__()\" method, the derived class\u2019s \"__del__()\" '\n'method,\\n'\n' if any, must explicitly call it to ensure proper deletion '\n'of the\\n'\n' base class part of the instance.\\n'\n'\\n'\n' It is possible (though not recommended!) for the '\n'\"__del__()\" method\\n'\n' to postpone destruction of the instance by creating a new '\n'reference\\n'\n' to it. This is called object *resurrection*. It is\\n'\n' implementation-dependent whether \"__del__()\" is called a '\n'second\\n'\n' time when a resurrected object is about to be destroyed; '\n'the\\n'\n' current *CPython* implementation only calls it once.\\n'\n'\\n'\n' It is not guaranteed that \"__del__()\" methods are called '\n'for\\n'\n' objects that still exist when the interpreter exits.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' \"del x\" doesn\u2019t directly call \"x.__del__()\" \u2014 the '\n'former\\n'\n' decrements the reference count for \"x\" by one, and the '\n'latter is\\n'\n' only called when \"x\"\u2019s reference count reaches zero.\\n'\n'\\n'\n' **CPython implementation detail:** It is possible for a '\n'reference\\n'\n' cycle to prevent the reference count of an object from '\n'going to\\n'\n' zero. In this case, the cycle will be later detected and '\n'deleted\\n'\n' by the *cyclic garbage collector*. A common cause of '\n'reference\\n'\n' cycles is when an exception has been caught in a local '\n'variable.\\n'\n' The frame\u2019s locals then reference the exception, which '\n'references\\n'\n' its own traceback, which references the locals of all '\n'frames caught\\n'\n' in the traceback.\\n'\n'\\n'\n' See also: Documentation for the \"gc\" module.\\n'\n'\\n'\n' Warning:\\n'\n'\\n'\n' Due to the precarious circumstances under which '\n'\"__del__()\"\\n'\n' methods are invoked, exceptions that occur during their '\n'execution\\n'\n' are ignored, and a warning is printed to \"sys.stderr\" '\n'instead.\\n'\n' In particular:\\n'\n'\\n'\n' * \"__del__()\" can be invoked when arbitrary code is '\n'being\\n'\n' executed, including from any arbitrary thread. If '\n'\"__del__()\"\\n'\n' needs to take a lock or invoke any other blocking '\n'resource, it\\n'\n' may deadlock as the resource may already be taken by '\n'the code\\n'\n' that gets interrupted to execute \"__del__()\".\\n'\n'\\n'\n' * \"__del__()\" can be executed during interpreter '\n'shutdown. As a\\n'\n' consequence, the global variables it needs to access '\n'(including\\n'\n' other modules) may already have been deleted or set '\n'to \"None\".\\n'\n' Python guarantees that globals whose name begins with '\n'a single\\n'\n' underscore are deleted from their module before other '\n'globals\\n'\n' are deleted; if no other references to such globals '\n'exist, this\\n'\n' may help in assuring that imported modules are still '\n'available\\n'\n' at the time when the \"__del__()\" method is called.\\n'\n'\\n'\n'object.__repr__(self)\\n'\n'\\n'\n' Called by the \"repr()\" built-in function to compute the '\n'\u201cofficial\u201d\\n'\n' string representation of an object. If at all possible, '\n'this\\n'\n' should look like a valid Python expression that could be '\n'used to\\n'\n' recreate an object with the same value (given an '\n'appropriate\\n'\n' environment). If this is not possible, a string of the '\n'form\\n'\n' \"<...some useful description...>\" should be returned. The '\n'return\\n'\n' value must be a string object. If a class defines '\n'\"__repr__()\" but\\n'\n' not \"__str__()\", then \"__repr__()\" is also used when an '\n'\u201cinformal\u201d\\n'\n' string representation of instances of that class is '\n'required.\\n'\n'\\n'\n' This is typically used for debugging, so it is important '\n'that the\\n'\n' representation is information-rich and unambiguous.\\n'\n'\\n'\n'object.__str__(self)\\n'\n'\\n'\n' Called by \"str(object)\" and the built-in functions '\n'\"format()\" and\\n'\n' \"print()\" to compute the \u201cinformal\u201d or nicely printable '\n'string\\n'\n' representation of an object. The return value must be a '\n'string\\n'\n' object.\\n'\n'\\n'\n' This method differs from \"object.__repr__()\" in that '\n'there is no\\n'\n' expectation that \"__str__()\" return a valid Python '\n'expression: a\\n'\n' more convenient or concise representation can be used.\\n'\n'\\n'\n' The default implementation defined by the built-in type '\n'\"object\"\\n'\n' calls \"object.__repr__()\".\\n'\n'\\n'\n'object.__bytes__(self)\\n'\n'\\n'\n' Called by bytes to compute a byte-string representation '\n'of an\\n'\n' object. This should return a \"bytes\" object.\\n'\n'\\n'\n'object.__format__(self, format_spec)\\n'\n'\\n'\n' Called by the \"format()\" built-in function, and by '\n'extension,\\n'\n' evaluation of formatted string literals and the '\n'\"str.format()\"\\n'\n' method, to produce a \u201cformatted\u201d string representation of '\n'an\\n'\n' object. The *format_spec* argument is a string that '\n'contains a\\n'\n' description of the formatting options desired. The '\n'interpretation\\n'\n' of the *format_spec* argument is up to the type '\n'implementing\\n'\n' \"__format__()\", however most classes will either '\n'delegate\\n'\n' formatting to one of the built-in types, or use a '\n'similar\\n'\n' formatting option syntax.\\n'\n'\\n'\n' See Format Specification Mini-Language for a description '\n'of the\\n'\n' standard formatting syntax.\\n'\n'\\n'\n' The return value must be a string object.\\n'\n'\\n'\n' Changed in version 3.4: The __format__ method of \"object\" '\n'itself\\n'\n' raises a \"TypeError\" if passed any non-empty string.\\n'\n'\\n'\n' Changed in version 3.7: \"object.__format__(x, \\'\\')\" is '\n'now\\n'\n' equivalent to \"str(x)\" rather than \"format(str(x), '\n'\\'\\')\".\\n'\n'\\n'\n'object.__lt__(self, other)\\n'\n'object.__le__(self, other)\\n'\n'object.__eq__(self, other)\\n'\n'object.__ne__(self, other)\\n'\n'object.__gt__(self, other)\\n'\n'object.__ge__(self, other)\\n'\n'\\n'\n' These are the so-called \u201crich comparison\u201d methods. The\\n'\n' correspondence between operator symbols and method names '\n'is as\\n'\n' follows: \"xy\" calls\\n'\n' \"x.__gt__(y)\", and \"x>=y\" calls \"x.__ge__(y)\".\\n'\n'\\n'\n' A rich comparison method may return the singleton '\n'\"NotImplemented\"\\n'\n' if it does not implement the operation for a given pair '\n'of\\n'\n' arguments. By convention, \"False\" and \"True\" are returned '\n'for a\\n'\n' successful comparison. However, these methods can return '\n'any value,\\n'\n' so if the comparison operator is used in a Boolean '\n'context (e.g.,\\n'\n' in the condition of an \"if\" statement), Python will call '\n'\"bool()\"\\n'\n' on the value to determine if the result is true or '\n'false.\\n'\n'\\n'\n' By default, \"object\" implements \"__eq__()\" by using \"is\", '\n'returning\\n'\n' \"NotImplemented\" in the case of a false comparison: \"True '\n'if x is y\\n'\n' else NotImplemented\". For \"__ne__()\", by default it '\n'delegates to\\n'\n' \"__eq__()\" and inverts the result unless it is '\n'\"NotImplemented\".\\n'\n' There are no other implied relationships among the '\n'comparison\\n'\n' operators or default implementations; for example, the '\n'truth of\\n'\n' \"(x.__hash__\".\\n'\n'\\n'\n' If a class that does not override \"__eq__()\" wishes to '\n'suppress\\n'\n' hash support, it should include \"__hash__ = None\" in the '\n'class\\n'\n' definition. A class which defines its own \"__hash__()\" '\n'that\\n'\n' explicitly raises a \"TypeError\" would be incorrectly '\n'identified as\\n'\n' hashable by an \"isinstance(obj, '\n'collections.abc.Hashable)\" call.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' By default, the \"__hash__()\" values of str and bytes '\n'objects are\\n'\n' \u201csalted\u201d with an unpredictable random value. Although '\n'they\\n'\n' remain constant within an individual Python process, '\n'they are not\\n'\n' predictable between repeated invocations of Python.This '\n'is\\n'\n' intended to provide protection against a '\n'denial-of-service caused\\n'\n' by carefully-chosen inputs that exploit the worst case\\n'\n' performance of a dict insertion, O(n^2) complexity. '\n'See\\n'\n' http://www.ocert.org/advisories/ocert-2011-003.html '\n'for\\n'\n' details.Changing hash values affects the iteration '\n'order of sets.\\n'\n' Python has never made guarantees about this ordering '\n'(and it\\n'\n' typically varies between 32-bit and 64-bit builds).See '\n'also\\n'\n' \"PYTHONHASHSEED\".\\n'\n'\\n'\n' Changed in version 3.3: Hash randomization is enabled by '\n'default.\\n'\n'\\n'\n'object.__bool__(self)\\n'\n'\\n'\n' Called to implement truth value testing and the built-in '\n'operation\\n'\n' \"bool()\"; should return \"False\" or \"True\". When this '\n'method is not\\n'\n' defined, \"__len__()\" is called, if it is defined, and the '\n'object is\\n'\n' considered true if its result is nonzero. If a class '\n'defines\\n'\n' neither \"__len__()\" nor \"__bool__()\", all its instances '\n'are\\n'\n' considered true.\\n'\n'\\n'\n'\\n'\n'Customizing attribute access\\n'\n'============================\\n'\n'\\n'\n'The following methods can be defined to customize the '\n'meaning of\\n'\n'attribute access (use of, assignment to, or deletion of '\n'\"x.name\") for\\n'\n'class instances.\\n'\n'\\n'\n'object.__getattr__(self, name)\\n'\n'\\n'\n' Called when the default attribute access fails with an\\n'\n' \"AttributeError\" (either \"__getattribute__()\" raises an\\n'\n' \"AttributeError\" because *name* is not an instance '\n'attribute or an\\n'\n' attribute in the class tree for \"self\"; or \"__get__()\" of '\n'a *name*\\n'\n' property raises \"AttributeError\"). This method should '\n'either\\n'\n' return the (computed) attribute value or raise an '\n'\"AttributeError\"\\n'\n' exception.\\n'\n'\\n'\n' Note that if the attribute is found through the normal '\n'mechanism,\\n'\n' \"__getattr__()\" is not called. (This is an intentional '\n'asymmetry\\n'\n' between \"__getattr__()\" and \"__setattr__()\".) This is '\n'done both for\\n'\n' efficiency reasons and because otherwise \"__getattr__()\" '\n'would have\\n'\n' no way to access other attributes of the instance. Note '\n'that at\\n'\n' least for instance variables, you can fake total control '\n'by not\\n'\n' inserting any values in the instance attribute dictionary '\n'(but\\n'\n' instead inserting them in another object). See the\\n'\n' \"__getattribute__()\" method below for a way to actually '\n'get total\\n'\n' control over attribute access.\\n'\n'\\n'\n'object.__getattribute__(self, name)\\n'\n'\\n'\n' Called unconditionally to implement attribute accesses '\n'for\\n'\n' instances of the class. If the class also defines '\n'\"__getattr__()\",\\n'\n' the latter will not be called unless \"__getattribute__()\" '\n'either\\n'\n' calls it explicitly or raises an \"AttributeError\". This '\n'method\\n'\n' should return the (computed) attribute value or raise an\\n'\n' \"AttributeError\" exception. In order to avoid infinite '\n'recursion in\\n'\n' this method, its implementation should always call the '\n'base class\\n'\n' method with the same name to access any attributes it '\n'needs, for\\n'\n' example, \"object.__getattribute__(self, name)\".\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' This method may still be bypassed when looking up '\n'special methods\\n'\n' as the result of implicit invocation via language '\n'syntax or\\n'\n' built-in functions. See Special method lookup.\\n'\n'\\n'\n' For certain sensitive attribute accesses, raises an '\n'auditing event\\n'\n' \"object.__getattr__\" with arguments \"obj\" and \"name\".\\n'\n'\\n'\n'object.__setattr__(self, name, value)\\n'\n'\\n'\n' Called when an attribute assignment is attempted. This '\n'is called\\n'\n' instead of the normal mechanism (i.e. store the value in '\n'the\\n'\n' instance dictionary). *name* is the attribute name, '\n'*value* is the\\n'\n' value to be assigned to it.\\n'\n'\\n'\n' If \"__setattr__()\" wants to assign to an instance '\n'attribute, it\\n'\n' should call the base class method with the same name, for '\n'example,\\n'\n' \"object.__setattr__(self, name, value)\".\\n'\n'\\n'\n' For certain sensitive attribute assignments, raises an '\n'auditing\\n'\n' event \"object.__setattr__\" with arguments \"obj\", \"name\", '\n'\"value\".\\n'\n'\\n'\n'object.__delattr__(self, name)\\n'\n'\\n'\n' Like \"__setattr__()\" but for attribute deletion instead '\n'of\\n'\n' assignment. This should only be implemented if \"del '\n'obj.name\" is\\n'\n' meaningful for the object.\\n'\n'\\n'\n' For certain sensitive attribute deletions, raises an '\n'auditing event\\n'\n' \"object.__delattr__\" with arguments \"obj\" and \"name\".\\n'\n'\\n'\n'object.__dir__(self)\\n'\n'\\n'\n' Called when \"dir()\" is called on the object. A sequence '\n'must be\\n'\n' returned. \"dir()\" converts the returned sequence to a '\n'list and\\n'\n' sorts it.\\n'\n'\\n'\n'\\n'\n'Customizing module attribute access\\n'\n'-----------------------------------\\n'\n'\\n'\n'Special names \"__getattr__\" and \"__dir__\" can be also used '\n'to\\n'\n'customize access to module attributes. The \"__getattr__\" '\n'function at\\n'\n'the module level should accept one argument which is the '\n'name of an\\n'\n'attribute and return the computed value or raise an '\n'\"AttributeError\".\\n'\n'If an attribute is not found on a module object through the '\n'normal\\n'\n'lookup, i.e. \"object.__getattribute__()\", then \"__getattr__\" '\n'is\\n'\n'searched in the module \"__dict__\" before raising an '\n'\"AttributeError\".\\n'\n'If found, it is called with the attribute name and the '\n'result is\\n'\n'returned.\\n'\n'\\n'\n'The \"__dir__\" function should accept no arguments, and '\n'return a\\n'\n'sequence of strings that represents the names accessible on '\n'module. If\\n'\n'present, this function overrides the standard \"dir()\" search '\n'on a\\n'\n'module.\\n'\n'\\n'\n'For a more fine grained customization of the module behavior '\n'(setting\\n'\n'attributes, properties, etc.), one can set the \"__class__\" '\n'attribute\\n'\n'of a module object to a subclass of \"types.ModuleType\". For '\n'example:\\n'\n'\\n'\n' import sys\\n'\n' from types import ModuleType\\n'\n'\\n'\n' class VerboseModule(ModuleType):\\n'\n' def __repr__(self):\\n'\n\" return f'Verbose {self.__name__}'\\n\"\n'\\n'\n' def __setattr__(self, attr, value):\\n'\n\" print(f'Setting {attr}...')\\n\"\n' super().__setattr__(attr, value)\\n'\n'\\n'\n' sys.modules[__name__].__class__ = VerboseModule\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Defining module \"__getattr__\" and setting module '\n'\"__class__\" only\\n'\n' affect lookups made using the attribute access syntax \u2013 '\n'directly\\n'\n' accessing the module globals (whether by code within the '\n'module, or\\n'\n' via a reference to the module\u2019s globals dictionary) is '\n'unaffected.\\n'\n'\\n'\n'Changed in version 3.5: \"__class__\" module attribute is now '\n'writable.\\n'\n'\\n'\n'New in version 3.7: \"__getattr__\" and \"__dir__\" module '\n'attributes.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 562** - Module __getattr__ and __dir__\\n'\n' Describes the \"__getattr__\" and \"__dir__\" functions on '\n'modules.\\n'\n'\\n'\n'\\n'\n'Implementing Descriptors\\n'\n'------------------------\\n'\n'\\n'\n'The following methods only apply when an instance of the '\n'class\\n'\n'containing the method (a so-called *descriptor* class) '\n'appears in an\\n'\n'*owner* class (the descriptor must be in either the owner\u2019s '\n'class\\n'\n'dictionary or in the class dictionary for one of its '\n'parents). In the\\n'\n'examples below, \u201cthe attribute\u201d refers to the attribute '\n'whose name is\\n'\n'the key of the property in the owner class\u2019 \"__dict__\".\\n'\n'\\n'\n'object.__get__(self, instance, owner=None)\\n'\n'\\n'\n' Called to get the attribute of the owner class (class '\n'attribute\\n'\n' access) or of an instance of that class (instance '\n'attribute\\n'\n' access). The optional *owner* argument is the owner '\n'class, while\\n'\n' *instance* is the instance that the attribute was '\n'accessed through,\\n'\n' or \"None\" when the attribute is accessed through the '\n'*owner*.\\n'\n'\\n'\n' This method should return the computed attribute value or '\n'raise an\\n'\n' \"AttributeError\" exception.\\n'\n'\\n'\n' **PEP 252** specifies that \"__get__()\" is callable with '\n'one or two\\n'\n' arguments. Python\u2019s own built-in descriptors support '\n'this\\n'\n' specification; however, it is likely that some '\n'third-party tools\\n'\n' have descriptors that require both arguments. Python\u2019s '\n'own\\n'\n' \"__getattribute__()\" implementation always passes in both '\n'arguments\\n'\n' whether they are required or not.\\n'\n'\\n'\n'object.__set__(self, instance, value)\\n'\n'\\n'\n' Called to set the attribute on an instance *instance* of '\n'the owner\\n'\n' class to a new value, *value*.\\n'\n'\\n'\n' Note, adding \"__set__()\" or \"__delete__()\" changes the '\n'kind of\\n'\n' descriptor to a \u201cdata descriptor\u201d. See Invoking '\n'Descriptors for\\n'\n' more details.\\n'\n'\\n'\n'object.__delete__(self, instance)\\n'\n'\\n'\n' Called to delete the attribute on an instance *instance* '\n'of the\\n'\n' owner class.\\n'\n'\\n'\n'object.__set_name__(self, owner, name)\\n'\n'\\n'\n' Called at the time the owning class *owner* is created. '\n'The\\n'\n' descriptor has been assigned to *name*.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' \"__set_name__()\" is only called implicitly as part of '\n'the \"type\"\\n'\n' constructor, so it will need to be called explicitly '\n'with the\\n'\n' appropriate parameters when a descriptor is added to a '\n'class\\n'\n' after initial creation:\\n'\n'\\n'\n' class A:\\n'\n' pass\\n'\n' descr = custom_descriptor()\\n'\n' A.attr = descr\\n'\n\" descr.__set_name__(A, 'attr')\\n\"\n'\\n'\n' See Creating the class object for more details.\\n'\n'\\n'\n' New in version 3.6.\\n'\n'\\n'\n'The attribute \"__objclass__\" is interpreted by the \"inspect\" '\n'module as\\n'\n'specifying the class where this object was defined (setting '\n'this\\n'\n'appropriately can assist in runtime introspection of dynamic '\n'class\\n'\n'attributes). For callables, it may indicate that an instance '\n'of the\\n'\n'given type (or a subclass) is expected or required as the '\n'first\\n'\n'positional argument (for example, CPython sets this '\n'attribute for\\n'\n'unbound methods that are implemented in C).\\n'\n'\\n'\n'\\n'\n'Invoking Descriptors\\n'\n'--------------------\\n'\n'\\n'\n'In general, a descriptor is an object attribute with '\n'\u201cbinding\\n'\n'behavior\u201d, one whose attribute access has been overridden by '\n'methods\\n'\n'in the descriptor protocol: \"__get__()\", \"__set__()\", and\\n'\n'\"__delete__()\". If any of those methods are defined for an '\n'object, it\\n'\n'is said to be a descriptor.\\n'\n'\\n'\n'The default behavior for attribute access is to get, set, or '\n'delete\\n'\n'the attribute from an object\u2019s dictionary. For instance, '\n'\"a.x\" has a\\n'\n'lookup chain starting with \"a.__dict__[\\'x\\']\", then\\n'\n'\"type(a).__dict__[\\'x\\']\", and continuing through the base '\n'classes of\\n'\n'\"type(a)\" excluding metaclasses.\\n'\n'\\n'\n'However, if the looked-up value is an object defining one of '\n'the\\n'\n'descriptor methods, then Python may override the default '\n'behavior and\\n'\n'invoke the descriptor method instead. Where this occurs in '\n'the\\n'\n'precedence chain depends on which descriptor methods were '\n'defined and\\n'\n'how they were called.\\n'\n'\\n'\n'The starting point for descriptor invocation is a binding, '\n'\"a.x\". How\\n'\n'the arguments are assembled depends on \"a\":\\n'\n'\\n'\n'Direct Call\\n'\n' The simplest and least common call is when user code '\n'directly\\n'\n' invokes a descriptor method: \"x.__get__(a)\".\\n'\n'\\n'\n'Instance Binding\\n'\n' If binding to an object instance, \"a.x\" is transformed '\n'into the\\n'\n' call: \"type(a).__dict__[\\'x\\'].__get__(a, type(a))\".\\n'\n'\\n'\n'Class Binding\\n'\n' If binding to a class, \"A.x\" is transformed into the '\n'call:\\n'\n' \"A.__dict__[\\'x\\'].__get__(None, A)\".\\n'\n'\\n'\n'Super Binding\\n'\n' If \"a\" is an instance of \"super\", then the binding '\n'\"super(B,\\n'\n' obj).m()\" searches \"obj.__class__.__mro__\" for the base '\n'class \"A\"\\n'\n' immediately preceding \"B\" and then invokes the descriptor '\n'with the\\n'\n' call: \"A.__dict__[\\'m\\'].__get__(obj, obj.__class__)\".\\n'\n'\\n'\n'For instance bindings, the precedence of descriptor '\n'invocation depends\\n'\n'on which descriptor methods are defined. A descriptor can '\n'define any\\n'\n'combination of \"__get__()\", \"__set__()\" and \"__delete__()\". '\n'If it\\n'\n'does not define \"__get__()\", then accessing the attribute '\n'will return\\n'\n'the descriptor object itself unless there is a value in the '\n'object\u2019s\\n'\n'instance dictionary. If the descriptor defines \"__set__()\" '\n'and/or\\n'\n'\"__delete__()\", it is a data descriptor; if it defines '\n'neither, it is\\n'\n'a non-data descriptor. Normally, data descriptors define '\n'both\\n'\n'\"__get__()\" and \"__set__()\", while non-data descriptors have '\n'just the\\n'\n'\"__get__()\" method. Data descriptors with \"__get__()\" and '\n'\"__set__()\"\\n'\n'(and/or \"__delete__()\") defined always override a '\n'redefinition in an\\n'\n'instance dictionary. In contrast, non-data descriptors can '\n'be\\n'\n'overridden by instances.\\n'\n'\\n'\n'Python methods (including \"staticmethod()\" and '\n'\"classmethod()\") are\\n'\n'implemented as non-data descriptors. Accordingly, instances '\n'can\\n'\n'redefine and override methods. This allows individual '\n'instances to\\n'\n'acquire behaviors that differ from other instances of the '\n'same class.\\n'\n'\\n'\n'The \"property()\" function is implemented as a data '\n'descriptor.\\n'\n'Accordingly, instances cannot override the behavior of a '\n'property.\\n'\n'\\n'\n'\\n'\n'__slots__\\n'\n'---------\\n'\n'\\n'\n'*__slots__* allow us to explicitly declare data members '\n'(like\\n'\n'properties) and deny the creation of *__dict__* and '\n'*__weakref__*\\n'\n'(unless explicitly declared in *__slots__* or available in a '\n'parent.)\\n'\n'\\n'\n'The space saved over using *__dict__* can be significant. '\n'Attribute\\n'\n'lookup speed can be significantly improved as well.\\n'\n'\\n'\n'object.__slots__\\n'\n'\\n'\n' This class variable can be assigned a string, iterable, '\n'or sequence\\n'\n' of strings with variable names used by instances. '\n'*__slots__*\\n'\n' reserves space for the declared variables and prevents '\n'the\\n'\n' automatic creation of *__dict__* and *__weakref__* for '\n'each\\n'\n' instance.\\n'\n'\\n'\n'\\n'\n'Notes on using *__slots__*\\n'\n'~~~~~~~~~~~~~~~~~~~~~~~~~~\\n'\n'\\n'\n'* When inheriting from a class without *__slots__*, the '\n'*__dict__* and\\n'\n' *__weakref__* attribute of the instances will always be '\n'accessible.\\n'\n'\\n'\n'* Without a *__dict__* variable, instances cannot be '\n'assigned new\\n'\n' variables not listed in the *__slots__* definition. '\n'Attempts to\\n'\n' assign to an unlisted variable name raises '\n'\"AttributeError\". If\\n'\n' dynamic assignment of new variables is desired, then add\\n'\n' \"\\'__dict__\\'\" to the sequence of strings in the '\n'*__slots__*\\n'\n' declaration.\\n'\n'\\n'\n'* Without a *__weakref__* variable for each instance, '\n'classes defining\\n'\n' *__slots__* do not support weak references to its '\n'instances. If weak\\n'\n' reference support is needed, then add \"\\'__weakref__\\'\" to '\n'the\\n'\n' sequence of strings in the *__slots__* declaration.\\n'\n'\\n'\n'* *__slots__* are implemented at the class level by '\n'creating\\n'\n' descriptors (Implementing Descriptors) for each variable '\n'name. As a\\n'\n' result, class attributes cannot be used to set default '\n'values for\\n'\n' instance variables defined by *__slots__*; otherwise, the '\n'class\\n'\n' attribute would overwrite the descriptor assignment.\\n'\n'\\n'\n'* The action of a *__slots__* declaration is not limited to '\n'the class\\n'\n' where it is defined. *__slots__* declared in parents are '\n'available\\n'\n' in child classes. However, child subclasses will get a '\n'*__dict__*\\n'\n' and *__weakref__* unless they also define *__slots__* '\n'(which should\\n'\n' only contain names of any *additional* slots).\\n'\n'\\n'\n'* If a class defines a slot also defined in a base class, '\n'the instance\\n'\n' variable defined by the base class slot is inaccessible '\n'(except by\\n'\n' retrieving its descriptor directly from the base class). '\n'This\\n'\n' renders the meaning of the program undefined. In the '\n'future, a\\n'\n' check may be added to prevent this.\\n'\n'\\n'\n'* Nonempty *__slots__* does not work for classes derived '\n'from\\n'\n' \u201cvariable-length\u201d built-in types such as \"int\", \"bytes\" '\n'and \"tuple\".\\n'\n'\\n'\n'* Any non-string iterable may be assigned to *__slots__*. '\n'Mappings may\\n'\n' also be used; however, in the future, special meaning may '\n'be\\n'\n' assigned to the values corresponding to each key.\\n'\n'\\n'\n'* *__class__* assignment works only if both classes have the '\n'same\\n'\n' *__slots__*.\\n'\n'\\n'\n'* Multiple inheritance with multiple slotted parent classes '\n'can be\\n'\n' used, but only one parent is allowed to have attributes '\n'created by\\n'\n' slots (the other bases must have empty slot layouts) - '\n'violations\\n'\n' raise \"TypeError\".\\n'\n'\\n'\n'* If an iterator is used for *__slots__* then a descriptor '\n'is created\\n'\n' for each of the iterator\u2019s values. However, the '\n'*__slots__*\\n'\n' attribute will be an empty iterator.\\n'\n'\\n'\n'\\n'\n'Customizing class creation\\n'\n'==========================\\n'\n'\\n'\n'Whenever a class inherits from another class, '\n'*__init_subclass__* is\\n'\n'called on that class. This way, it is possible to write '\n'classes which\\n'\n'change the behavior of subclasses. This is closely related '\n'to class\\n'\n'decorators, but where class decorators only affect the '\n'specific class\\n'\n'they\u2019re applied to, \"__init_subclass__\" solely applies to '\n'future\\n'\n'subclasses of the class defining the method.\\n'\n'\\n'\n'classmethod object.__init_subclass__(cls)\\n'\n'\\n'\n' This method is called whenever the containing class is '\n'subclassed.\\n'\n' *cls* is then the new subclass. If defined as a normal '\n'instance\\n'\n' method, this method is implicitly converted to a class '\n'method.\\n'\n'\\n'\n' Keyword arguments which are given to a new class are '\n'passed to the\\n'\n' parent\u2019s class \"__init_subclass__\". For compatibility '\n'with other\\n'\n' classes using \"__init_subclass__\", one should take out '\n'the needed\\n'\n' keyword arguments and pass the others over to the base '\n'class, as\\n'\n' in:\\n'\n'\\n'\n' class Philosopher:\\n'\n' def __init_subclass__(cls, /, default_name, '\n'**kwargs):\\n'\n' super().__init_subclass__(**kwargs)\\n'\n' cls.default_name = default_name\\n'\n'\\n'\n' class AustralianPhilosopher(Philosopher, '\n'default_name=\"Bruce\"):\\n'\n' pass\\n'\n'\\n'\n' The default implementation \"object.__init_subclass__\" '\n'does nothing,\\n'\n' but raises an error if it is called with any arguments.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' The metaclass hint \"metaclass\" is consumed by the rest '\n'of the\\n'\n' type machinery, and is never passed to '\n'\"__init_subclass__\"\\n'\n' implementations. The actual metaclass (rather than the '\n'explicit\\n'\n' hint) can be accessed as \"type(cls)\".\\n'\n'\\n'\n' New in version 3.6.\\n'\n'\\n'\n'\\n'\n'Metaclasses\\n'\n'-----------\\n'\n'\\n'\n'By default, classes are constructed using \"type()\". The '\n'class body is\\n'\n'executed in a new namespace and the class name is bound '\n'locally to the\\n'\n'result of \"type(name, bases, namespace)\".\\n'\n'\\n'\n'The class creation process can be customized by passing the\\n'\n'\"metaclass\" keyword argument in the class definition line, '\n'or by\\n'\n'inheriting from an existing class that included such an '\n'argument. In\\n'\n'the following example, both \"MyClass\" and \"MySubclass\" are '\n'instances\\n'\n'of \"Meta\":\\n'\n'\\n'\n' class Meta(type):\\n'\n' pass\\n'\n'\\n'\n' class MyClass(metaclass=Meta):\\n'\n' pass\\n'\n'\\n'\n' class MySubclass(MyClass):\\n'\n' pass\\n'\n'\\n'\n'Any other keyword arguments that are specified in the class '\n'definition\\n'\n'are passed through to all metaclass operations described '\n'below.\\n'\n'\\n'\n'When a class definition is executed, the following steps '\n'occur:\\n'\n'\\n'\n'* MRO entries are resolved;\\n'\n'\\n'\n'* the appropriate metaclass is determined;\\n'\n'\\n'\n'* the class namespace is prepared;\\n'\n'\\n'\n'* the class body is executed;\\n'\n'\\n'\n'* the class object is created.\\n'\n'\\n'\n'\\n'\n'Resolving MRO entries\\n'\n'---------------------\\n'\n'\\n'\n'If a base that appears in class definition is not an '\n'instance of\\n'\n'\"type\", then an \"__mro_entries__\" method is searched on it. '\n'If found,\\n'\n'it is called with the original bases tuple. This method must '\n'return a\\n'\n'tuple of classes that will be used instead of this base. The '\n'tuple may\\n'\n'be empty, in such case the original base is ignored.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 560** - Core support for typing module and generic '\n'types\\n'\n'\\n'\n'\\n'\n'Determining the appropriate metaclass\\n'\n'-------------------------------------\\n'\n'\\n'\n'The appropriate metaclass for a class definition is '\n'determined as\\n'\n'follows:\\n'\n'\\n'\n'* if no bases and no explicit metaclass are given, then '\n'\"type()\" is\\n'\n' used;\\n'\n'\\n'\n'* if an explicit metaclass is given and it is *not* an '\n'instance of\\n'\n' \"type()\", then it is used directly as the metaclass;\\n'\n'\\n'\n'* if an instance of \"type()\" is given as the explicit '\n'metaclass, or\\n'\n' bases are defined, then the most derived metaclass is '\n'used.\\n'\n'\\n'\n'The most derived metaclass is selected from the explicitly '\n'specified\\n'\n'metaclass (if any) and the metaclasses (i.e. \"type(cls)\") of '\n'all\\n'\n'specified base classes. The most derived metaclass is one '\n'which is a\\n'\n'subtype of *all* of these candidate metaclasses. If none of '\n'the\\n'\n'candidate metaclasses meets that criterion, then the class '\n'definition\\n'\n'will fail with \"TypeError\".\\n'\n'\\n'\n'\\n'\n'Preparing the class namespace\\n'\n'-----------------------------\\n'\n'\\n'\n'Once the appropriate metaclass has been identified, then the '\n'class\\n'\n'namespace is prepared. If the metaclass has a \"__prepare__\" '\n'attribute,\\n'\n'it is called as \"namespace = metaclass.__prepare__(name, '\n'bases,\\n'\n'**kwds)\" (where the additional keyword arguments, if any, '\n'come from\\n'\n'the class definition). The \"__prepare__\" method should be '\n'implemented\\n'\n'as a \"classmethod()\". The namespace returned by '\n'\"__prepare__\" is\\n'\n'passed in to \"__new__\", but when the final class object is '\n'created the\\n'\n'namespace is copied into a new \"dict\".\\n'\n'\\n'\n'If the metaclass has no \"__prepare__\" attribute, then the '\n'class\\n'\n'namespace is initialised as an empty ordered mapping.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3115** - Metaclasses in Python 3000\\n'\n' Introduced the \"__prepare__\" namespace hook\\n'\n'\\n'\n'\\n'\n'Executing the class body\\n'\n'------------------------\\n'\n'\\n'\n'The class body is executed (approximately) as \"exec(body, '\n'globals(),\\n'\n'namespace)\". The key difference from a normal call to '\n'\"exec()\" is that\\n'\n'lexical scoping allows the class body (including any '\n'methods) to\\n'\n'reference names from the current and outer scopes when the '\n'class\\n'\n'definition occurs inside a function.\\n'\n'\\n'\n'However, even when the class definition occurs inside the '\n'function,\\n'\n'methods defined inside the class still cannot see names '\n'defined at the\\n'\n'class scope. Class variables must be accessed through the '\n'first\\n'\n'parameter of instance or class methods, or through the '\n'implicit\\n'\n'lexically scoped \"__class__\" reference described in the next '\n'section.\\n'\n'\\n'\n'\\n'\n'Creating the class object\\n'\n'-------------------------\\n'\n'\\n'\n'Once the class namespace has been populated by executing the '\n'class\\n'\n'body, the class object is created by calling '\n'\"metaclass(name, bases,\\n'\n'namespace, **kwds)\" (the additional keywords passed here are '\n'the same\\n'\n'as those passed to \"__prepare__\").\\n'\n'\\n'\n'This class object is the one that will be referenced by the '\n'zero-\\n'\n'argument form of \"super()\". \"__class__\" is an implicit '\n'closure\\n'\n'reference created by the compiler if any methods in a class '\n'body refer\\n'\n'to either \"__class__\" or \"super\". This allows the zero '\n'argument form\\n'\n'of \"super()\" to correctly identify the class being defined '\n'based on\\n'\n'lexical scoping, while the class or instance that was used '\n'to make the\\n'\n'current call is identified based on the first argument '\n'passed to the\\n'\n'method.\\n'\n'\\n'\n'**CPython implementation detail:** In CPython 3.6 and later, '\n'the\\n'\n'\"__class__\" cell is passed to the metaclass as a '\n'\"__classcell__\" entry\\n'\n'in the class namespace. If present, this must be propagated '\n'up to the\\n'\n'\"type.__new__\" call in order for the class to be '\n'initialised\\n'\n'correctly. Failing to do so will result in a \"RuntimeError\" '\n'in Python\\n'\n'3.8.\\n'\n'\\n'\n'When using the default metaclass \"type\", or any metaclass '\n'that\\n'\n'ultimately calls \"type.__new__\", the following additional\\n'\n'customisation steps are invoked after creating the class '\n'object:\\n'\n'\\n'\n'* first, \"type.__new__\" collects all of the descriptors in '\n'the class\\n'\n' namespace that define a \"__set_name__()\" method;\\n'\n'\\n'\n'* second, all of these \"__set_name__\" methods are called '\n'with the\\n'\n' class being defined and the assigned name of that '\n'particular\\n'\n' descriptor;\\n'\n'\\n'\n'* finally, the \"__init_subclass__()\" hook is called on the '\n'immediate\\n'\n' parent of the new class in its method resolution order.\\n'\n'\\n'\n'After the class object is created, it is passed to the '\n'class\\n'\n'decorators included in the class definition (if any) and the '\n'resulting\\n'\n'object is bound in the local namespace as the defined '\n'class.\\n'\n'\\n'\n'When a new class is created by \"type.__new__\", the object '\n'provided as\\n'\n'the namespace parameter is copied to a new ordered mapping '\n'and the\\n'\n'original object is discarded. The new copy is wrapped in a '\n'read-only\\n'\n'proxy, which becomes the \"__dict__\" attribute of the class '\n'object.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3135** - New super\\n'\n' Describes the implicit \"__class__\" closure reference\\n'\n'\\n'\n'\\n'\n'Uses for metaclasses\\n'\n'--------------------\\n'\n'\\n'\n'The potential uses for metaclasses are boundless. Some ideas '\n'that have\\n'\n'been explored include enum, logging, interface checking, '\n'automatic\\n'\n'delegation, automatic property creation, proxies, '\n'frameworks, and\\n'\n'automatic resource locking/synchronization.\\n'\n'\\n'\n'\\n'\n'Customizing instance and subclass checks\\n'\n'========================================\\n'\n'\\n'\n'The following methods are used to override the default '\n'behavior of the\\n'\n'\"isinstance()\" and \"issubclass()\" built-in functions.\\n'\n'\\n'\n'In particular, the metaclass \"abc.ABCMeta\" implements these '\n'methods in\\n'\n'order to allow the addition of Abstract Base Classes (ABCs) '\n'as\\n'\n'\u201cvirtual base classes\u201d to any class or type (including '\n'built-in\\n'\n'types), including other ABCs.\\n'\n'\\n'\n'class.__instancecheck__(self, instance)\\n'\n'\\n'\n' Return true if *instance* should be considered a (direct '\n'or\\n'\n' indirect) instance of *class*. If defined, called to '\n'implement\\n'\n' \"isinstance(instance, class)\".\\n'\n'\\n'\n'class.__subclasscheck__(self, subclass)\\n'\n'\\n'\n' Return true if *subclass* should be considered a (direct '\n'or\\n'\n' indirect) subclass of *class*. If defined, called to '\n'implement\\n'\n' \"issubclass(subclass, class)\".\\n'\n'\\n'\n'Note that these methods are looked up on the type '\n'(metaclass) of a\\n'\n'class. They cannot be defined as class methods in the '\n'actual class.\\n'\n'This is consistent with the lookup of special methods that '\n'are called\\n'\n'on instances, only in this case the instance is itself a '\n'class.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 3119** - Introducing Abstract Base Classes\\n'\n' Includes the specification for customizing '\n'\"isinstance()\" and\\n'\n' \"issubclass()\" behavior through \"__instancecheck__()\" '\n'and\\n'\n' \"__subclasscheck__()\", with motivation for this '\n'functionality in\\n'\n' the context of adding Abstract Base Classes (see the '\n'\"abc\"\\n'\n' module) to the language.\\n'\n'\\n'\n'\\n'\n'Emulating generic types\\n'\n'=======================\\n'\n'\\n'\n'One can implement the generic class syntax as specified by '\n'**PEP 484**\\n'\n'(for example \"List[int]\") by defining a special method:\\n'\n'\\n'\n'classmethod object.__class_getitem__(cls, key)\\n'\n'\\n'\n' Return an object representing the specialization of a '\n'generic class\\n'\n' by type arguments found in *key*.\\n'\n'\\n'\n'This method is looked up on the class object itself, and '\n'when defined\\n'\n'in the class body, this method is implicitly a class '\n'method. Note,\\n'\n'this mechanism is primarily reserved for use with static '\n'type hints,\\n'\n'other usage is discouraged.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 560** - Core support for typing module and generic '\n'types\\n'\n'\\n'\n'\\n'\n'Emulating callable objects\\n'\n'==========================\\n'\n'\\n'\n'object.__call__(self[, args...])\\n'\n'\\n'\n' Called when the instance is \u201ccalled\u201d as a function; if '\n'this method\\n'\n' is defined, \"x(arg1, arg2, ...)\" roughly translates to\\n'\n' \"type(x).__call__(x, arg1, ...)\".\\n'\n'\\n'\n'\\n'\n'Emulating container types\\n'\n'=========================\\n'\n'\\n'\n'The following methods can be defined to implement container '\n'objects.\\n'\n'Containers usually are sequences (such as lists or tuples) '\n'or mappings\\n'\n'(like dictionaries), but can represent other containers as '\n'well. The\\n'\n'first set of methods is used either to emulate a sequence or '\n'to\\n'\n'emulate a mapping; the difference is that for a sequence, '\n'the\\n'\n'allowable keys should be the integers *k* for which \"0 <= k '\n'< N\" where\\n'\n'*N* is the length of the sequence, or slice objects, which '\n'define a\\n'\n'range of items. It is also recommended that mappings '\n'provide the\\n'\n'methods \"keys()\", \"values()\", \"items()\", \"get()\", '\n'\"clear()\",\\n'\n'\"setdefault()\", \"pop()\", \"popitem()\", \"copy()\", and '\n'\"update()\"\\n'\n'behaving similar to those for Python\u2019s standard dictionary '\n'objects.\\n'\n'The \"collections.abc\" module provides a \"MutableMapping\" '\n'abstract base\\n'\n'class to help create those methods from a base set of '\n'\"__getitem__()\",\\n'\n'\"__setitem__()\", \"__delitem__()\", and \"keys()\". Mutable '\n'sequences\\n'\n'should provide methods \"append()\", \"count()\", \"index()\", '\n'\"extend()\",\\n'\n'\"insert()\", \"pop()\", \"remove()\", \"reverse()\" and \"sort()\", '\n'like Python\\n'\n'standard list objects. Finally, sequence types should '\n'implement\\n'\n'addition (meaning concatenation) and multiplication '\n'(meaning\\n'\n'repetition) by defining the methods \"__add__()\", '\n'\"__radd__()\",\\n'\n'\"__iadd__()\", \"__mul__()\", \"__rmul__()\" and \"__imul__()\" '\n'described\\n'\n'below; they should not define other numerical operators. It '\n'is\\n'\n'recommended that both mappings and sequences implement the\\n'\n'\"__contains__()\" method to allow efficient use of the \"in\" '\n'operator;\\n'\n'for mappings, \"in\" should search the mapping\u2019s keys; for '\n'sequences, it\\n'\n'should search through the values. It is further recommended '\n'that both\\n'\n'mappings and sequences implement the \"__iter__()\" method to '\n'allow\\n'\n'efficient iteration through the container; for mappings, '\n'\"__iter__()\"\\n'\n'should iterate through the object\u2019s keys; for sequences, it '\n'should\\n'\n'iterate through the values.\\n'\n'\\n'\n'object.__len__(self)\\n'\n'\\n'\n' Called to implement the built-in function \"len()\". '\n'Should return\\n'\n' the length of the object, an integer \">=\" 0. Also, an '\n'object that\\n'\n' doesn\u2019t define a \"__bool__()\" method and whose '\n'\"__len__()\" method\\n'\n' returns zero is considered to be false in a Boolean '\n'context.\\n'\n'\\n'\n' **CPython implementation detail:** In CPython, the length '\n'is\\n'\n' required to be at most \"sys.maxsize\". If the length is '\n'larger than\\n'\n' \"sys.maxsize\" some features (such as \"len()\") may raise\\n'\n' \"OverflowError\". To prevent raising \"OverflowError\" by '\n'truth value\\n'\n' testing, an object must define a \"__bool__()\" method.\\n'\n'\\n'\n'object.__length_hint__(self)\\n'\n'\\n'\n' Called to implement \"operator.length_hint()\". Should '\n'return an\\n'\n' estimated length for the object (which may be greater or '\n'less than\\n'\n' the actual length). The length must be an integer \">=\" 0. '\n'The\\n'\n' return value may also be \"NotImplemented\", which is '\n'treated the\\n'\n' same as if the \"__length_hint__\" method didn\u2019t exist at '\n'all. This\\n'\n' method is purely an optimization and is never required '\n'for\\n'\n' correctness.\\n'\n'\\n'\n' New in version 3.4.\\n'\n'\\n'\n'Note:\\n'\n'\\n'\n' Slicing is done exclusively with the following three '\n'methods. A\\n'\n' call like\\n'\n'\\n'\n' a[1:2] = b\\n'\n'\\n'\n' is translated to\\n'\n'\\n'\n' a[slice(1, 2, None)] = b\\n'\n'\\n'\n' and so forth. Missing slice items are always filled in '\n'with \"None\".\\n'\n'\\n'\n'object.__getitem__(self, key)\\n'\n'\\n'\n' Called to implement evaluation of \"self[key]\". For '\n'sequence types,\\n'\n' the accepted keys should be integers and slice objects. '\n'Note that\\n'\n' the special interpretation of negative indexes (if the '\n'class wishes\\n'\n' to emulate a sequence type) is up to the \"__getitem__()\" '\n'method. If\\n'\n' *key* is of an inappropriate type, \"TypeError\" may be '\n'raised; if of\\n'\n' a value outside the set of indexes for the sequence '\n'(after any\\n'\n' special interpretation of negative values), \"IndexError\" '\n'should be\\n'\n' raised. For mapping types, if *key* is missing (not in '\n'the\\n'\n' container), \"KeyError\" should be raised.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' \"for\" loops expect that an \"IndexError\" will be raised '\n'for\\n'\n' illegal indexes to allow proper detection of the end of '\n'the\\n'\n' sequence.\\n'\n'\\n'\n'object.__setitem__(self, key, value)\\n'\n'\\n'\n' Called to implement assignment to \"self[key]\". Same note '\n'as for\\n'\n' \"__getitem__()\". This should only be implemented for '\n'mappings if\\n'\n' the objects support changes to the values for keys, or if '\n'new keys\\n'\n' can be added, or for sequences if elements can be '\n'replaced. The\\n'\n' same exceptions should be raised for improper *key* '\n'values as for\\n'\n' the \"__getitem__()\" method.\\n'\n'\\n'\n'object.__delitem__(self, key)\\n'\n'\\n'\n' Called to implement deletion of \"self[key]\". Same note '\n'as for\\n'\n' \"__getitem__()\". This should only be implemented for '\n'mappings if\\n'\n' the objects support removal of keys, or for sequences if '\n'elements\\n'\n' can be removed from the sequence. The same exceptions '\n'should be\\n'\n' raised for improper *key* values as for the '\n'\"__getitem__()\" method.\\n'\n'\\n'\n'object.__missing__(self, key)\\n'\n'\\n'\n' Called by \"dict\".\"__getitem__()\" to implement \"self[key]\" '\n'for dict\\n'\n' subclasses when key is not in the dictionary.\\n'\n'\\n'\n'object.__iter__(self)\\n'\n'\\n'\n' This method is called when an iterator is required for a '\n'container.\\n'\n' This method should return a new iterator object that can '\n'iterate\\n'\n' over all the objects in the container. For mappings, it '\n'should\\n'\n' iterate over the keys of the container.\\n'\n'\\n'\n' Iterator objects also need to implement this method; they '\n'are\\n'\n' required to return themselves. For more information on '\n'iterator\\n'\n' objects, see Iterator Types.\\n'\n'\\n'\n'object.__reversed__(self)\\n'\n'\\n'\n' Called (if present) by the \"reversed()\" built-in to '\n'implement\\n'\n' reverse iteration. It should return a new iterator '\n'object that\\n'\n' iterates over all the objects in the container in reverse '\n'order.\\n'\n'\\n'\n' If the \"__reversed__()\" method is not provided, the '\n'\"reversed()\"\\n'\n' built-in will fall back to using the sequence protocol '\n'(\"__len__()\"\\n'\n' and \"__getitem__()\"). Objects that support the sequence '\n'protocol\\n'\n' should only provide \"__reversed__()\" if they can provide '\n'an\\n'\n' implementation that is more efficient than the one '\n'provided by\\n'\n' \"reversed()\".\\n'\n'\\n'\n'The membership test operators (\"in\" and \"not in\") are '\n'normally\\n'\n'implemented as an iteration through a container. However, '\n'container\\n'\n'objects can supply the following special method with a more '\n'efficient\\n'\n'implementation, which also does not require the object be '\n'iterable.\\n'\n'\\n'\n'object.__contains__(self, item)\\n'\n'\\n'\n' Called to implement membership test operators. Should '\n'return true\\n'\n' if *item* is in *self*, false otherwise. For mapping '\n'objects, this\\n'\n' should consider the keys of the mapping rather than the '\n'values or\\n'\n' the key-item pairs.\\n'\n'\\n'\n' For objects that don\u2019t define \"__contains__()\", the '\n'membership test\\n'\n' first tries iteration via \"__iter__()\", then the old '\n'sequence\\n'\n' iteration protocol via \"__getitem__()\", see this section '\n'in the\\n'\n' language reference.\\n'\n'\\n'\n'\\n'\n'Emulating numeric types\\n'\n'=======================\\n'\n'\\n'\n'The following methods can be defined to emulate numeric '\n'objects.\\n'\n'Methods corresponding to operations that are not supported '\n'by the\\n'\n'particular kind of number implemented (e.g., bitwise '\n'operations for\\n'\n'non-integral numbers) should be left undefined.\\n'\n'\\n'\n'object.__add__(self, other)\\n'\n'object.__sub__(self, other)\\n'\n'object.__mul__(self, other)\\n'\n'object.__matmul__(self, other)\\n'\n'object.__truediv__(self, other)\\n'\n'object.__floordiv__(self, other)\\n'\n'object.__mod__(self, other)\\n'\n'object.__divmod__(self, other)\\n'\n'object.__pow__(self, other[, modulo])\\n'\n'object.__lshift__(self, other)\\n'\n'object.__rshift__(self, other)\\n'\n'object.__and__(self, other)\\n'\n'object.__xor__(self, other)\\n'\n'object.__or__(self, other)\\n'\n'\\n'\n' These methods are called to implement the binary '\n'arithmetic\\n'\n' operations (\"+\", \"-\", \"*\", \"@\", \"/\", \"//\", \"%\", '\n'\"divmod()\",\\n'\n' \"pow()\", \"**\", \"<<\", \">>\", \"&\", \"^\", \"|\"). For instance, '\n'to\\n'\n' evaluate the expression \"x + y\", where *x* is an instance '\n'of a\\n'\n' class that has an \"__add__()\" method, \"x.__add__(y)\" is '\n'called.\\n'\n' The \"__divmod__()\" method should be the equivalent to '\n'using\\n'\n' \"__floordiv__()\" and \"__mod__()\"; it should not be '\n'related to\\n'\n' \"__truediv__()\". Note that \"__pow__()\" should be defined '\n'to accept\\n'\n' an optional third argument if the ternary version of the '\n'built-in\\n'\n' \"pow()\" function is to be supported.\\n'\n'\\n'\n' If one of those methods does not support the operation '\n'with the\\n'\n' supplied arguments, it should return \"NotImplemented\".\\n'\n'\\n'\n'object.__radd__(self, other)\\n'\n'object.__rsub__(self, other)\\n'\n'object.__rmul__(self, other)\\n'\n'object.__rmatmul__(self, other)\\n'\n'object.__rtruediv__(self, other)\\n'\n'object.__rfloordiv__(self, other)\\n'\n'object.__rmod__(self, other)\\n'\n'object.__rdivmod__(self, other)\\n'\n'object.__rpow__(self, other[, modulo])\\n'\n'object.__rlshift__(self, other)\\n'\n'object.__rrshift__(self, other)\\n'\n'object.__rand__(self, other)\\n'\n'object.__rxor__(self, other)\\n'\n'object.__ror__(self, other)\\n'\n'\\n'\n' These methods are called to implement the binary '\n'arithmetic\\n'\n' operations (\"+\", \"-\", \"*\", \"@\", \"/\", \"//\", \"%\", '\n'\"divmod()\",\\n'\n' \"pow()\", \"**\", \"<<\", \">>\", \"&\", \"^\", \"|\") with reflected '\n'(swapped)\\n'\n' operands. These functions are only called if the left '\n'operand does\\n'\n' not support the corresponding operation [3] and the '\n'operands are of\\n'\n' different types. [4] For instance, to evaluate the '\n'expression \"x -\\n'\n' y\", where *y* is an instance of a class that has an '\n'\"__rsub__()\"\\n'\n' method, \"y.__rsub__(x)\" is called if \"x.__sub__(y)\" '\n'returns\\n'\n' *NotImplemented*.\\n'\n'\\n'\n' Note that ternary \"pow()\" will not try calling '\n'\"__rpow__()\" (the\\n'\n' coercion rules would become too complicated).\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' If the right operand\u2019s type is a subclass of the left '\n'operand\u2019s\\n'\n' type and that subclass provides a different '\n'implementation of the\\n'\n' reflected method for the operation, this method will be '\n'called\\n'\n' before the left operand\u2019s non-reflected method. This '\n'behavior\\n'\n' allows subclasses to override their ancestors\u2019 '\n'operations.\\n'\n'\\n'\n'object.__iadd__(self, other)\\n'\n'object.__isub__(self, other)\\n'\n'object.__imul__(self, other)\\n'\n'object.__imatmul__(self, other)\\n'\n'object.__itruediv__(self, other)\\n'\n'object.__ifloordiv__(self, other)\\n'\n'object.__imod__(self, other)\\n'\n'object.__ipow__(self, other[, modulo])\\n'\n'object.__ilshift__(self, other)\\n'\n'object.__irshift__(self, other)\\n'\n'object.__iand__(self, other)\\n'\n'object.__ixor__(self, other)\\n'\n'object.__ior__(self, other)\\n'\n'\\n'\n' These methods are called to implement the augmented '\n'arithmetic\\n'\n' assignments (\"+=\", \"-=\", \"*=\", \"@=\", \"/=\", \"//=\", \"%=\", '\n'\"**=\",\\n'\n' \"<<=\", \">>=\", \"&=\", \"^=\", \"|=\"). These methods should '\n'attempt to\\n'\n' do the operation in-place (modifying *self*) and return '\n'the result\\n'\n' (which could be, but does not have to be, *self*). If a '\n'specific\\n'\n' method is not defined, the augmented assignment falls '\n'back to the\\n'\n' normal methods. For instance, if *x* is an instance of a '\n'class\\n'\n' with an \"__iadd__()\" method, \"x += y\" is equivalent to \"x '\n'=\\n'\n' x.__iadd__(y)\" . Otherwise, \"x.__add__(y)\" and '\n'\"y.__radd__(x)\" are\\n'\n' considered, as with the evaluation of \"x + y\". In '\n'certain\\n'\n' situations, augmented assignment can result in unexpected '\n'errors\\n'\n' (see Why does a_tuple[i] += [\u2018item\u2019] raise an exception '\n'when the\\n'\n' addition works?), but this behavior is in fact part of '\n'the data\\n'\n' model.\\n'\n'\\n'\n'object.__neg__(self)\\n'\n'object.__pos__(self)\\n'\n'object.__abs__(self)\\n'\n'object.__invert__(self)\\n'\n'\\n'\n' Called to implement the unary arithmetic operations (\"-\", '\n'\"+\",\\n'\n' \"abs()\" and \"~\").\\n'\n'\\n'\n'object.__complex__(self)\\n'\n'object.__int__(self)\\n'\n'object.__float__(self)\\n'\n'\\n'\n' Called to implement the built-in functions \"complex()\", '\n'\"int()\" and\\n'\n' \"float()\". Should return a value of the appropriate '\n'type.\\n'\n'\\n'\n'object.__index__(self)\\n'\n'\\n'\n' Called to implement \"operator.index()\", and whenever '\n'Python needs\\n'\n' to losslessly convert the numeric object to an integer '\n'object (such\\n'\n' as in slicing, or in the built-in \"bin()\", \"hex()\" and '\n'\"oct()\"\\n'\n' functions). Presence of this method indicates that the '\n'numeric\\n'\n' object is an integer type. Must return an integer.\\n'\n'\\n'\n' If \"__int__()\", \"__float__()\" and \"__complex__()\" are not '\n'defined\\n'\n' then corresponding built-in functions \"int()\", \"float()\" '\n'and\\n'\n' \"complex()\" fall back to \"__index__()\".\\n'\n'\\n'\n'object.__round__(self[, ndigits])\\n'\n'object.__trunc__(self)\\n'\n'object.__floor__(self)\\n'\n'object.__ceil__(self)\\n'\n'\\n'\n' Called to implement the built-in function \"round()\" and '\n'\"math\"\\n'\n' functions \"trunc()\", \"floor()\" and \"ceil()\". Unless '\n'*ndigits* is\\n'\n' passed to \"__round__()\" all these methods should return '\n'the value\\n'\n' of the object truncated to an \"Integral\" (typically an '\n'\"int\").\\n'\n'\\n'\n' If \"__int__()\" is not defined then the built-in function '\n'\"int()\"\\n'\n' falls back to \"__trunc__()\".\\n'\n'\\n'\n'\\n'\n'With Statement Context Managers\\n'\n'===============================\\n'\n'\\n'\n'A *context manager* is an object that defines the runtime '\n'context to\\n'\n'be established when executing a \"with\" statement. The '\n'context manager\\n'\n'handles the entry into, and the exit from, the desired '\n'runtime context\\n'\n'for the execution of the block of code. Context managers '\n'are normally\\n'\n'invoked using the \"with\" statement (described in section The '\n'with\\n'\n'statement), but can also be used by directly invoking their '\n'methods.\\n'\n'\\n'\n'Typical uses of context managers include saving and '\n'restoring various\\n'\n'kinds of global state, locking and unlocking resources, '\n'closing opened\\n'\n'files, etc.\\n'\n'\\n'\n'For more information on context managers, see Context '\n'Manager Types.\\n'\n'\\n'\n'object.__enter__(self)\\n'\n'\\n'\n' Enter the runtime context related to this object. The '\n'\"with\"\\n'\n' statement will bind this method\u2019s return value to the '\n'target(s)\\n'\n' specified in the \"as\" clause of the statement, if any.\\n'\n'\\n'\n'object.__exit__(self, exc_type, exc_value, traceback)\\n'\n'\\n'\n' Exit the runtime context related to this object. The '\n'parameters\\n'\n' describe the exception that caused the context to be '\n'exited. If the\\n'\n' context was exited without an exception, all three '\n'arguments will\\n'\n' be \"None\".\\n'\n'\\n'\n' If an exception is supplied, and the method wishes to '\n'suppress the\\n'\n' exception (i.e., prevent it from being propagated), it '\n'should\\n'\n' return a true value. Otherwise, the exception will be '\n'processed\\n'\n' normally upon exit from this method.\\n'\n'\\n'\n' Note that \"__exit__()\" methods should not reraise the '\n'passed-in\\n'\n' exception; this is the caller\u2019s responsibility.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 343** - The \u201cwith\u201d statement\\n'\n' The specification, background, and examples for the '\n'Python \"with\"\\n'\n' statement.\\n'\n'\\n'\n'\\n'\n'Customizing positional arguments in class pattern matching\\n'\n'==========================================================\\n'\n'\\n'\n'When using a class name in a pattern, positional arguments '\n'in the\\n'\n'pattern are not allowed by default, i.e. \"case MyClass(x, '\n'y)\" is\\n'\n'typically invalid without special support in \"MyClass\". To '\n'be able to\\n'\n'use that kind of patterns, the class needs to define a\\n'\n'*__match_args__* attribute.\\n'\n'\\n'\n'object.__match_args__\\n'\n'\\n'\n' This class variable can be assigned a tuple of strings. '\n'When this\\n'\n' class is used in a class pattern with positional '\n'arguments, each\\n'\n' positional argument will be converted into a keyword '\n'argument,\\n'\n' using the corresponding value in *__match_args__* as the '\n'keyword.\\n'\n' The absence of this attribute is equivalent to setting it '\n'to \"()\".\\n'\n'\\n'\n'For example, if \"MyClass.__match_args__\" is \"(\"left\", '\n'\"center\",\\n'\n'\"right\")\" that means that \"case MyClass(x, y)\" is equivalent '\n'to \"case\\n'\n'MyClass(left=x, center=y)\". Note that the number of '\n'arguments in the\\n'\n'pattern must be smaller than or equal to the number of '\n'elements in\\n'\n'*__match_args__*; if it is larger, the pattern match attempt '\n'will\\n'\n'raise a \"TypeError\".\\n'\n'\\n'\n'New in version 3.10.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 634** - Structural Pattern Matching\\n'\n' The specification for the Python \"match\" statement.\\n'\n'\\n'\n'\\n'\n'Special method lookup\\n'\n'=====================\\n'\n'\\n'\n'For custom classes, implicit invocations of special methods '\n'are only\\n'\n'guaranteed to work correctly if defined on an object\u2019s type, '\n'not in\\n'\n'the object\u2019s instance dictionary. That behaviour is the '\n'reason why\\n'\n'the following code raises an exception:\\n'\n'\\n'\n' >>> class C:\\n'\n' ... pass\\n'\n' ...\\n'\n' >>> c = C()\\n'\n' >>> c.__len__ = lambda: 5\\n'\n' >>> len(c)\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 1, in \\n'\n\" TypeError: object of type 'C' has no len()\\n\"\n'\\n'\n'The rationale behind this behaviour lies with a number of '\n'special\\n'\n'methods such as \"__hash__()\" and \"__repr__()\" that are '\n'implemented by\\n'\n'all objects, including type objects. If the implicit lookup '\n'of these\\n'\n'methods used the conventional lookup process, they would '\n'fail when\\n'\n'invoked on the type object itself:\\n'\n'\\n'\n' >>> 1 .__hash__() == hash(1)\\n'\n' True\\n'\n' >>> int.__hash__() == hash(int)\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 1, in \\n'\n\" TypeError: descriptor '__hash__' of 'int' object needs an \"\n'argument\\n'\n'\\n'\n'Incorrectly attempting to invoke an unbound method of a '\n'class in this\\n'\n'way is sometimes referred to as \u2018metaclass confusion\u2019, and '\n'is avoided\\n'\n'by bypassing the instance when looking up special methods:\\n'\n'\\n'\n' >>> type(1).__hash__(1) == hash(1)\\n'\n' True\\n'\n' >>> type(int).__hash__(int) == hash(int)\\n'\n' True\\n'\n'\\n'\n'In addition to bypassing any instance attributes in the '\n'interest of\\n'\n'correctness, implicit special method lookup generally also '\n'bypasses\\n'\n'the \"__getattribute__()\" method even of the object\u2019s '\n'metaclass:\\n'\n'\\n'\n' >>> class Meta(type):\\n'\n' ... def __getattribute__(*args):\\n'\n' ... print(\"Metaclass getattribute invoked\")\\n'\n' ... return type.__getattribute__(*args)\\n'\n' ...\\n'\n' >>> class C(object, metaclass=Meta):\\n'\n' ... def __len__(self):\\n'\n' ... return 10\\n'\n' ... def __getattribute__(*args):\\n'\n' ... print(\"Class getattribute invoked\")\\n'\n' ... return object.__getattribute__(*args)\\n'\n' ...\\n'\n' >>> c = C()\\n'\n' >>> c.__len__() # Explicit lookup via '\n'instance\\n'\n' Class getattribute invoked\\n'\n' 10\\n'\n' >>> type(c).__len__(c) # Explicit lookup via '\n'type\\n'\n' Metaclass getattribute invoked\\n'\n' 10\\n'\n' >>> len(c) # Implicit lookup\\n'\n' 10\\n'\n'\\n'\n'Bypassing the \"__getattribute__()\" machinery in this fashion '\n'provides\\n'\n'significant scope for speed optimisations within the '\n'interpreter, at\\n'\n'the cost of some flexibility in the handling of special '\n'methods (the\\n'\n'special method *must* be set on the class object itself in '\n'order to be\\n'\n'consistently invoked by the interpreter).\\n',\n'string-methods':'String Methods\\n'\n'**************\\n'\n'\\n'\n'Strings implement all of the common sequence operations, '\n'along with\\n'\n'the additional methods described below.\\n'\n'\\n'\n'Strings also support two styles of string formatting, one '\n'providing a\\n'\n'large degree of flexibility and customization (see '\n'\"str.format()\",\\n'\n'Format String Syntax and Custom String Formatting) and the '\n'other based\\n'\n'on C \"printf\" style formatting that handles a narrower '\n'range of types\\n'\n'and is slightly harder to use correctly, but is often '\n'faster for the\\n'\n'cases it can handle (printf-style String Formatting).\\n'\n'\\n'\n'The Text Processing Services section of the standard '\n'library covers a\\n'\n'number of other modules that provide various text related '\n'utilities\\n'\n'(including regular expression support in the \"re\" '\n'module).\\n'\n'\\n'\n'str.capitalize()\\n'\n'\\n'\n' Return a copy of the string with its first character '\n'capitalized\\n'\n' and the rest lowercased.\\n'\n'\\n'\n' Changed in version 3.8: The first character is now put '\n'into\\n'\n' titlecase rather than uppercase. This means that '\n'characters like\\n'\n' digraphs will only have their first letter capitalized, '\n'instead of\\n'\n' the full character.\\n'\n'\\n'\n'str.casefold()\\n'\n'\\n'\n' Return a casefolded copy of the string. Casefolded '\n'strings may be\\n'\n' used for caseless matching.\\n'\n'\\n'\n' Casefolding is similar to lowercasing but more '\n'aggressive because\\n'\n' it is intended to remove all case distinctions in a '\n'string. For\\n'\n' example, the German lowercase letter \"\\'\u00df\\'\" is '\n'equivalent to \"\"ss\"\".\\n'\n' Since it is already lowercase, \"lower()\" would do '\n'nothing to \"\\'\u00df\\'\";\\n'\n' \"casefold()\" converts it to \"\"ss\"\".\\n'\n'\\n'\n' The casefolding algorithm is described in section 3.13 '\n'of the\\n'\n' Unicode Standard.\\n'\n'\\n'\n' New in version 3.3.\\n'\n'\\n'\n'str.center(width[, fillchar])\\n'\n'\\n'\n' Return centered in a string of length *width*. Padding '\n'is done\\n'\n' using the specified *fillchar* (default is an ASCII '\n'space). The\\n'\n' original string is returned if *width* is less than or '\n'equal to\\n'\n' \"len(s)\".\\n'\n'\\n'\n'str.count(sub[, start[, end]])\\n'\n'\\n'\n' Return the number of non-overlapping occurrences of '\n'substring *sub*\\n'\n' in the range [*start*, *end*]. Optional arguments '\n'*start* and\\n'\n' *end* are interpreted as in slice notation.\\n'\n'\\n'\n\"str.encode(encoding='utf-8', errors='strict')\\n\"\n'\\n'\n' Return an encoded version of the string as a bytes '\n'object. Default\\n'\n' encoding is \"\\'utf-8\\'\". *errors* may be given to set a '\n'different\\n'\n' error handling scheme. The default for *errors* is '\n'\"\\'strict\\'\",\\n'\n' meaning that encoding errors raise a \"UnicodeError\". '\n'Other possible\\n'\n' values are \"\\'ignore\\'\", \"\\'replace\\'\", '\n'\"\\'xmlcharrefreplace\\'\",\\n'\n' \"\\'backslashreplace\\'\" and any other name registered '\n'via\\n'\n' \"codecs.register_error()\", see section Error Handlers. '\n'For a list\\n'\n' of possible encodings, see section Standard Encodings.\\n'\n'\\n'\n' By default, the *errors* argument is not checked for '\n'best\\n'\n' performances, but only used at the first encoding '\n'error. Enable the\\n'\n' Python Development Mode, or use a debug build to check '\n'*errors*.\\n'\n'\\n'\n' Changed in version 3.1: Support for keyword arguments '\n'added.\\n'\n'\\n'\n' Changed in version 3.9: The *errors* is now checked in '\n'development\\n'\n' mode and in debug mode.\\n'\n'\\n'\n'str.endswith(suffix[, start[, end]])\\n'\n'\\n'\n' Return \"True\" if the string ends with the specified '\n'*suffix*,\\n'\n' otherwise return \"False\". *suffix* can also be a tuple '\n'of suffixes\\n'\n' to look for. With optional *start*, test beginning at '\n'that\\n'\n' position. With optional *end*, stop comparing at that '\n'position.\\n'\n'\\n'\n'str.expandtabs(tabsize=8)\\n'\n'\\n'\n' Return a copy of the string where all tab characters '\n'are replaced\\n'\n' by one or more spaces, depending on the current column '\n'and the\\n'\n' given tab size. Tab positions occur every *tabsize* '\n'characters\\n'\n' (default is 8, giving tab positions at columns 0, 8, 16 '\n'and so on).\\n'\n' To expand the string, the current column is set to zero '\n'and the\\n'\n' string is examined character by character. If the '\n'character is a\\n'\n' tab (\"\\\\t\"), one or more space characters are inserted '\n'in the result\\n'\n' until the current column is equal to the next tab '\n'position. (The\\n'\n' tab character itself is not copied.) If the character '\n'is a newline\\n'\n' (\"\\\\n\") or return (\"\\\\r\"), it is copied and the current '\n'column is\\n'\n' reset to zero. Any other character is copied unchanged '\n'and the\\n'\n' current column is incremented by one regardless of how '\n'the\\n'\n' character is represented when printed.\\n'\n'\\n'\n\" >>> '01\\\\t012\\\\t0123\\\\t01234'.expandtabs()\\n\"\n\" '01 012 0123 01234'\\n\"\n\" >>> '01\\\\t012\\\\t0123\\\\t01234'.expandtabs(4)\\n\"\n\" '01 012 0123 01234'\\n\"\n'\\n'\n'str.find(sub[, start[, end]])\\n'\n'\\n'\n' Return the lowest index in the string where substring '\n'*sub* is\\n'\n' found within the slice \"s[start:end]\". Optional '\n'arguments *start*\\n'\n' and *end* are interpreted as in slice notation. Return '\n'\"-1\" if\\n'\n' *sub* is not found.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' The \"find()\" method should be used only if you need '\n'to know the\\n'\n' position of *sub*. To check if *sub* is a substring '\n'or not, use\\n'\n' the \"in\" operator:\\n'\n'\\n'\n\" >>> 'Py' in 'Python'\\n\"\n' True\\n'\n'\\n'\n'str.format(*args, **kwargs)\\n'\n'\\n'\n' Perform a string formatting operation. The string on '\n'which this\\n'\n' method is called can contain literal text or '\n'replacement fields\\n'\n' delimited by braces \"{}\". Each replacement field '\n'contains either\\n'\n' the numeric index of a positional argument, or the name '\n'of a\\n'\n' keyword argument. Returns a copy of the string where '\n'each\\n'\n' replacement field is replaced with the string value of '\n'the\\n'\n' corresponding argument.\\n'\n'\\n'\n' >>> \"The sum of 1 + 2 is {0}\".format(1+2)\\n'\n\" 'The sum of 1 + 2 is 3'\\n\"\n'\\n'\n' See Format String Syntax for a description of the '\n'various\\n'\n' formatting options that can be specified in format '\n'strings.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' When formatting a number (\"int\", \"float\", \"complex\",\\n'\n' \"decimal.Decimal\" and subclasses) with the \"n\" type '\n'(ex:\\n'\n' \"\\'{:n}\\'.format(1234)\"), the function temporarily '\n'sets the\\n'\n' \"LC_CTYPE\" locale to the \"LC_NUMERIC\" locale to '\n'decode\\n'\n' \"decimal_point\" and \"thousands_sep\" fields of '\n'\"localeconv()\" if\\n'\n' they are non-ASCII or longer than 1 byte, and the '\n'\"LC_NUMERIC\"\\n'\n' locale is different than the \"LC_CTYPE\" locale. This '\n'temporary\\n'\n' change affects other threads.\\n'\n'\\n'\n' Changed in version 3.7: When formatting a number with '\n'the \"n\" type,\\n'\n' the function sets temporarily the \"LC_CTYPE\" locale to '\n'the\\n'\n' \"LC_NUMERIC\" locale in some cases.\\n'\n'\\n'\n'str.format_map(mapping)\\n'\n'\\n'\n' Similar to \"str.format(**mapping)\", except that '\n'\"mapping\" is used\\n'\n' directly and not copied to a \"dict\". This is useful if '\n'for example\\n'\n' \"mapping\" is a dict subclass:\\n'\n'\\n'\n' >>> class Default(dict):\\n'\n' ... def __missing__(self, key):\\n'\n' ... return key\\n'\n' ...\\n'\n\" >>> '{name} was born in \"\n\"{country}'.format_map(Default(name='Guido'))\\n\"\n\" 'Guido was born in country'\\n\"\n'\\n'\n' New in version 3.2.\\n'\n'\\n'\n'str.index(sub[, start[, end]])\\n'\n'\\n'\n' Like \"find()\", but raise \"ValueError\" when the '\n'substring is not\\n'\n' found.\\n'\n'\\n'\n'str.isalnum()\\n'\n'\\n'\n' Return \"True\" if all characters in the string are '\n'alphanumeric and\\n'\n' there is at least one character, \"False\" otherwise. A '\n'character\\n'\n' \"c\" is alphanumeric if one of the following returns '\n'\"True\":\\n'\n' \"c.isalpha()\", \"c.isdecimal()\", \"c.isdigit()\", or '\n'\"c.isnumeric()\".\\n'\n'\\n'\n'str.isalpha()\\n'\n'\\n'\n' Return \"True\" if all characters in the string are '\n'alphabetic and\\n'\n' there is at least one character, \"False\" otherwise. '\n'Alphabetic\\n'\n' characters are those characters defined in the Unicode '\n'character\\n'\n' database as \u201cLetter\u201d, i.e., those with general category '\n'property\\n'\n' being one of \u201cLm\u201d, \u201cLt\u201d, \u201cLu\u201d, \u201cLl\u201d, or \u201cLo\u201d. Note '\n'that this is\\n'\n' different from the \u201cAlphabetic\u201d property defined in the '\n'Unicode\\n'\n' Standard.\\n'\n'\\n'\n'str.isascii()\\n'\n'\\n'\n' Return \"True\" if the string is empty or all characters '\n'in the\\n'\n' string are ASCII, \"False\" otherwise. ASCII characters '\n'have code\\n'\n' points in the range U+0000-U+007F.\\n'\n'\\n'\n' New in version 3.7.\\n'\n'\\n'\n'str.isdecimal()\\n'\n'\\n'\n' Return \"True\" if all characters in the string are '\n'decimal\\n'\n' characters and there is at least one character, \"False\" '\n'otherwise.\\n'\n' Decimal characters are those that can be used to form '\n'numbers in\\n'\n' base 10, e.g. U+0660, ARABIC-INDIC DIGIT ZERO. '\n'Formally a decimal\\n'\n' character is a character in the Unicode General '\n'Category \u201cNd\u201d.\\n'\n'\\n'\n'str.isdigit()\\n'\n'\\n'\n' Return \"True\" if all characters in the string are '\n'digits and there\\n'\n' is at least one character, \"False\" otherwise. Digits '\n'include\\n'\n' decimal characters and digits that need special '\n'handling, such as\\n'\n' the compatibility superscript digits. This covers '\n'digits which\\n'\n' cannot be used to form numbers in base 10, like the '\n'Kharosthi\\n'\n' numbers. Formally, a digit is a character that has the '\n'property\\n'\n' value Numeric_Type=Digit or Numeric_Type=Decimal.\\n'\n'\\n'\n'str.isidentifier()\\n'\n'\\n'\n' Return \"True\" if the string is a valid identifier '\n'according to the\\n'\n' language definition, section Identifiers and keywords.\\n'\n'\\n'\n' Call \"keyword.iskeyword()\" to test whether string \"s\" '\n'is a reserved\\n'\n' identifier, such as \"def\" and \"class\".\\n'\n'\\n'\n' Example:\\n'\n'\\n'\n' >>> from keyword import iskeyword\\n'\n'\\n'\n\" >>> 'hello'.isidentifier(), iskeyword('hello')\\n\"\n' True, False\\n'\n\" >>> 'def'.isidentifier(), iskeyword('def')\\n\"\n' True, True\\n'\n'\\n'\n'str.islower()\\n'\n'\\n'\n' Return \"True\" if all cased characters [4] in the string '\n'are\\n'\n' lowercase and there is at least one cased character, '\n'\"False\"\\n'\n' otherwise.\\n'\n'\\n'\n'str.isnumeric()\\n'\n'\\n'\n' Return \"True\" if all characters in the string are '\n'numeric\\n'\n' characters, and there is at least one character, '\n'\"False\" otherwise.\\n'\n' Numeric characters include digit characters, and all '\n'characters\\n'\n' that have the Unicode numeric value property, e.g. '\n'U+2155, VULGAR\\n'\n' FRACTION ONE FIFTH. Formally, numeric characters are '\n'those with\\n'\n' the property value Numeric_Type=Digit, '\n'Numeric_Type=Decimal or\\n'\n' Numeric_Type=Numeric.\\n'\n'\\n'\n'str.isprintable()\\n'\n'\\n'\n' Return \"True\" if all characters in the string are '\n'printable or the\\n'\n' string is empty, \"False\" otherwise. Nonprintable '\n'characters are\\n'\n' those characters defined in the Unicode character '\n'database as\\n'\n' \u201cOther\u201d or \u201cSeparator\u201d, excepting the ASCII space '\n'(0x20) which is\\n'\n' considered printable. (Note that printable characters '\n'in this\\n'\n' context are those which should not be escaped when '\n'\"repr()\" is\\n'\n' invoked on a string. It has no bearing on the handling '\n'of strings\\n'\n' written to \"sys.stdout\" or \"sys.stderr\".)\\n'\n'\\n'\n'str.isspace()\\n'\n'\\n'\n' Return \"True\" if there are only whitespace characters '\n'in the string\\n'\n' and there is at least one character, \"False\" '\n'otherwise.\\n'\n'\\n'\n' A character is *whitespace* if in the Unicode character '\n'database\\n'\n' (see \"unicodedata\"), either its general category is '\n'\"Zs\"\\n'\n' (\u201cSeparator, space\u201d), or its bidirectional class is one '\n'of \"WS\",\\n'\n' \"B\", or \"S\".\\n'\n'\\n'\n'str.istitle()\\n'\n'\\n'\n' Return \"True\" if the string is a titlecased string and '\n'there is at\\n'\n' least one character, for example uppercase characters '\n'may only\\n'\n' follow uncased characters and lowercase characters only '\n'cased ones.\\n'\n' Return \"False\" otherwise.\\n'\n'\\n'\n'str.isupper()\\n'\n'\\n'\n' Return \"True\" if all cased characters [4] in the string '\n'are\\n'\n' uppercase and there is at least one cased character, '\n'\"False\"\\n'\n' otherwise.\\n'\n'\\n'\n\" >>> 'BANANA'.isupper()\\n\"\n' True\\n'\n\" >>> 'banana'.isupper()\\n\"\n' False\\n'\n\" >>> 'baNana'.isupper()\\n\"\n' False\\n'\n\" >>> ' '.isupper()\\n\"\n' False\\n'\n'\\n'\n'str.join(iterable)\\n'\n'\\n'\n' Return a string which is the concatenation of the '\n'strings in\\n'\n' *iterable*. A \"TypeError\" will be raised if there are '\n'any non-\\n'\n' string values in *iterable*, including \"bytes\" '\n'objects. The\\n'\n' separator between elements is the string providing this '\n'method.\\n'\n'\\n'\n'str.ljust(width[, fillchar])\\n'\n'\\n'\n' Return the string left justified in a string of length '\n'*width*.\\n'\n' Padding is done using the specified *fillchar* (default '\n'is an ASCII\\n'\n' space). The original string is returned if *width* is '\n'less than or\\n'\n' equal to \"len(s)\".\\n'\n'\\n'\n'str.lower()\\n'\n'\\n'\n' Return a copy of the string with all the cased '\n'characters [4]\\n'\n' converted to lowercase.\\n'\n'\\n'\n' The lowercasing algorithm used is described in section '\n'3.13 of the\\n'\n' Unicode Standard.\\n'\n'\\n'\n'str.lstrip([chars])\\n'\n'\\n'\n' Return a copy of the string with leading characters '\n'removed. The\\n'\n' *chars* argument is a string specifying the set of '\n'characters to be\\n'\n' removed. If omitted or \"None\", the *chars* argument '\n'defaults to\\n'\n' removing whitespace. The *chars* argument is not a '\n'prefix; rather,\\n'\n' all combinations of its values are stripped:\\n'\n'\\n'\n\" >>> ' spacious '.lstrip()\\n\"\n\" 'spacious '\\n\"\n\" >>> 'www.example.com'.lstrip('cmowz.')\\n\"\n\" 'example.com'\\n\"\n'\\n'\n' See \"str.removeprefix()\" for a method that will remove '\n'a single\\n'\n' prefix string rather than all of a set of characters. '\n'For example:\\n'\n'\\n'\n\" >>> 'Arthur: three!'.lstrip('Arthur: ')\\n\"\n\" 'ee!'\\n\"\n\" >>> 'Arthur: three!'.removeprefix('Arthur: ')\\n\"\n\" 'three!'\\n\"\n'\\n'\n'static str.maketrans(x[, y[, z]])\\n'\n'\\n'\n' This static method returns a translation table usable '\n'for\\n'\n' \"str.translate()\".\\n'\n'\\n'\n' If there is only one argument, it must be a dictionary '\n'mapping\\n'\n' Unicode ordinals (integers) or characters (strings of '\n'length 1) to\\n'\n' Unicode ordinals, strings (of arbitrary lengths) or '\n'\"None\".\\n'\n' Character keys will then be converted to ordinals.\\n'\n'\\n'\n' If there are two arguments, they must be strings of '\n'equal length,\\n'\n' and in the resulting dictionary, each character in x '\n'will be mapped\\n'\n' to the character at the same position in y. If there '\n'is a third\\n'\n' argument, it must be a string, whose characters will be '\n'mapped to\\n'\n' \"None\" in the result.\\n'\n'\\n'\n'str.partition(sep)\\n'\n'\\n'\n' Split the string at the first occurrence of *sep*, and '\n'return a\\n'\n' 3-tuple containing the part before the separator, the '\n'separator\\n'\n' itself, and the part after the separator. If the '\n'separator is not\\n'\n' found, return a 3-tuple containing the string itself, '\n'followed by\\n'\n' two empty strings.\\n'\n'\\n'\n'str.removeprefix(prefix, /)\\n'\n'\\n'\n' If the string starts with the *prefix* string, return\\n'\n' \"string[len(prefix):]\". Otherwise, return a copy of the '\n'original\\n'\n' string:\\n'\n'\\n'\n\" >>> 'TestHook'.removeprefix('Test')\\n\"\n\" 'Hook'\\n\"\n\" >>> 'BaseTestCase'.removeprefix('Test')\\n\"\n\" 'BaseTestCase'\\n\"\n'\\n'\n' New in version 3.9.\\n'\n'\\n'\n'str.removesuffix(suffix, /)\\n'\n'\\n'\n' If the string ends with the *suffix* string and that '\n'*suffix* is\\n'\n' not empty, return \"string[:-len(suffix)]\". Otherwise, '\n'return a copy\\n'\n' of the original string:\\n'\n'\\n'\n\" >>> 'MiscTests'.removesuffix('Tests')\\n\"\n\" 'Misc'\\n\"\n\" >>> 'TmpDirMixin'.removesuffix('Tests')\\n\"\n\" 'TmpDirMixin'\\n\"\n'\\n'\n' New in version 3.9.\\n'\n'\\n'\n'str.replace(old, new[, count])\\n'\n'\\n'\n' Return a copy of the string with all occurrences of '\n'substring *old*\\n'\n' replaced by *new*. If the optional argument *count* is '\n'given, only\\n'\n' the first *count* occurrences are replaced.\\n'\n'\\n'\n'str.rfind(sub[, start[, end]])\\n'\n'\\n'\n' Return the highest index in the string where substring '\n'*sub* is\\n'\n' found, such that *sub* is contained within '\n'\"s[start:end]\".\\n'\n' Optional arguments *start* and *end* are interpreted as '\n'in slice\\n'\n' notation. Return \"-1\" on failure.\\n'\n'\\n'\n'str.rindex(sub[, start[, end]])\\n'\n'\\n'\n' Like \"rfind()\" but raises \"ValueError\" when the '\n'substring *sub* is\\n'\n' not found.\\n'\n'\\n'\n'str.rjust(width[, fillchar])\\n'\n'\\n'\n' Return the string right justified in a string of length '\n'*width*.\\n'\n' Padding is done using the specified *fillchar* (default '\n'is an ASCII\\n'\n' space). The original string is returned if *width* is '\n'less than or\\n'\n' equal to \"len(s)\".\\n'\n'\\n'\n'str.rpartition(sep)\\n'\n'\\n'\n' Split the string at the last occurrence of *sep*, and '\n'return a\\n'\n' 3-tuple containing the part before the separator, the '\n'separator\\n'\n' itself, and the part after the separator. If the '\n'separator is not\\n'\n' found, return a 3-tuple containing two empty strings, '\n'followed by\\n'\n' the string itself.\\n'\n'\\n'\n'str.rsplit(sep=None, maxsplit=- 1)\\n'\n'\\n'\n' Return a list of the words in the string, using *sep* '\n'as the\\n'\n' delimiter string. If *maxsplit* is given, at most '\n'*maxsplit* splits\\n'\n' are done, the *rightmost* ones. If *sep* is not '\n'specified or\\n'\n' \"None\", any whitespace string is a separator. Except '\n'for splitting\\n'\n' from the right, \"rsplit()\" behaves like \"split()\" which '\n'is\\n'\n' described in detail below.\\n'\n'\\n'\n'str.rstrip([chars])\\n'\n'\\n'\n' Return a copy of the string with trailing characters '\n'removed. The\\n'\n' *chars* argument is a string specifying the set of '\n'characters to be\\n'\n' removed. If omitted or \"None\", the *chars* argument '\n'defaults to\\n'\n' removing whitespace. The *chars* argument is not a '\n'suffix; rather,\\n'\n' all combinations of its values are stripped:\\n'\n'\\n'\n\" >>> ' spacious '.rstrip()\\n\"\n\" ' spacious'\\n\"\n\" >>> 'mississippi'.rstrip('ipz')\\n\"\n\" 'mississ'\\n\"\n'\\n'\n' See \"str.removesuffix()\" for a method that will remove '\n'a single\\n'\n' suffix string rather than all of a set of characters. '\n'For example:\\n'\n'\\n'\n\" >>> 'Monty Python'.rstrip(' Python')\\n\"\n\" 'M'\\n\"\n\" >>> 'Monty Python'.removesuffix(' Python')\\n\"\n\" 'Monty'\\n\"\n'\\n'\n'str.split(sep=None, maxsplit=- 1)\\n'\n'\\n'\n' Return a list of the words in the string, using *sep* '\n'as the\\n'\n' delimiter string. If *maxsplit* is given, at most '\n'*maxsplit*\\n'\n' splits are done (thus, the list will have at most '\n'\"maxsplit+1\"\\n'\n' elements). If *maxsplit* is not specified or \"-1\", '\n'then there is\\n'\n' no limit on the number of splits (all possible splits '\n'are made).\\n'\n'\\n'\n' If *sep* is given, consecutive delimiters are not '\n'grouped together\\n'\n' and are deemed to delimit empty strings (for example,\\n'\n' \"\\'1,,2\\'.split(\\',\\')\" returns \"[\\'1\\', \\'\\', '\n'\\'2\\']\"). The *sep* argument\\n'\n' may consist of multiple characters (for example,\\n'\n' \"\\'1<>2<>3\\'.split(\\'<>\\')\" returns \"[\\'1\\', \\'2\\', '\n'\\'3\\']\"). Splitting an\\n'\n' empty string with a specified separator returns '\n'\"[\\'\\']\".\\n'\n'\\n'\n' For example:\\n'\n'\\n'\n\" >>> '1,2,3'.split(',')\\n\"\n\" ['1', '2', '3']\\n\"\n\" >>> '1,2,3'.split(',', maxsplit=1)\\n\"\n\" ['1', '2,3']\\n\"\n\" >>> '1,2,,3,'.split(',')\\n\"\n\" ['1', '2', '', '3', '']\\n\"\n'\\n'\n' If *sep* is not specified or is \"None\", a different '\n'splitting\\n'\n' algorithm is applied: runs of consecutive whitespace '\n'are regarded\\n'\n' as a single separator, and the result will contain no '\n'empty strings\\n'\n' at the start or end if the string has leading or '\n'trailing\\n'\n' whitespace. Consequently, splitting an empty string or '\n'a string\\n'\n' consisting of just whitespace with a \"None\" separator '\n'returns \"[]\".\\n'\n'\\n'\n' For example:\\n'\n'\\n'\n\" >>> '1 2 3'.split()\\n\"\n\" ['1', '2', '3']\\n\"\n\" >>> '1 2 3'.split(maxsplit=1)\\n\"\n\" ['1', '2 3']\\n\"\n\" >>> ' 1 2 3 '.split()\\n\"\n\" ['1', '2', '3']\\n\"\n'\\n'\n'str.splitlines([keepends])\\n'\n'\\n'\n' Return a list of the lines in the string, breaking at '\n'line\\n'\n' boundaries. Line breaks are not included in the '\n'resulting list\\n'\n' unless *keepends* is given and true.\\n'\n'\\n'\n' This method splits on the following line boundaries. '\n'In\\n'\n' particular, the boundaries are a superset of *universal '\n'newlines*.\\n'\n'\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | Representation | '\n'Description |\\n'\n' '\n'|=========================|===============================|\\n'\n' | \"\\\\n\" | Line '\n'Feed |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\r\" | Carriage '\n'Return |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\r\\\\n\" | Carriage Return + Line '\n'Feed |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\v\" or \"\\\\x0b\" | Line '\n'Tabulation |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\f\" or \"\\\\x0c\" | Form '\n'Feed |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\x1c\" | File '\n'Separator |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\x1d\" | Group '\n'Separator |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\x1e\" | Record '\n'Separator |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\x85\" | Next Line (C1 Control '\n'Code) |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\u2028\" | Line '\n'Separator |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n' | \"\\\\u2029\" | Paragraph '\n'Separator |\\n'\n' '\n'+-------------------------+-------------------------------+\\n'\n'\\n'\n' Changed in version 3.2: \"\\\\v\" and \"\\\\f\" added to list '\n'of line\\n'\n' boundaries.\\n'\n'\\n'\n' For example:\\n'\n'\\n'\n\" >>> 'ab c\\\\n\\\\nde fg\\\\rkl\\\\r\\\\n'.splitlines()\\n\"\n\" ['ab c', '', 'de fg', 'kl']\\n\"\n\" >>> 'ab c\\\\n\\\\nde \"\n\"fg\\\\rkl\\\\r\\\\n'.splitlines(keepends=True)\\n\"\n\" ['ab c\\\\n', '\\\\n', 'de fg\\\\r', 'kl\\\\r\\\\n']\\n\"\n'\\n'\n' Unlike \"split()\" when a delimiter string *sep* is '\n'given, this\\n'\n' method returns an empty list for the empty string, and '\n'a terminal\\n'\n' line break does not result in an extra line:\\n'\n'\\n'\n' >>> \"\".splitlines()\\n'\n' []\\n'\n' >>> \"One line\\\\n\".splitlines()\\n'\n\" ['One line']\\n\"\n'\\n'\n' For comparison, \"split(\\'\\\\n\\')\" gives:\\n'\n'\\n'\n\" >>> ''.split('\\\\n')\\n\"\n\" ['']\\n\"\n\" >>> 'Two lines\\\\n'.split('\\\\n')\\n\"\n\" ['Two lines', '']\\n\"\n'\\n'\n'str.startswith(prefix[, start[, end]])\\n'\n'\\n'\n' Return \"True\" if string starts with the *prefix*, '\n'otherwise return\\n'\n' \"False\". *prefix* can also be a tuple of prefixes to '\n'look for.\\n'\n' With optional *start*, test string beginning at that '\n'position.\\n'\n' With optional *end*, stop comparing string at that '\n'position.\\n'\n'\\n'\n'str.strip([chars])\\n'\n'\\n'\n' Return a copy of the string with the leading and '\n'trailing\\n'\n' characters removed. The *chars* argument is a string '\n'specifying the\\n'\n' set of characters to be removed. If omitted or \"None\", '\n'the *chars*\\n'\n' argument defaults to removing whitespace. The *chars* '\n'argument is\\n'\n' not a prefix or suffix; rather, all combinations of its '\n'values are\\n'\n' stripped:\\n'\n'\\n'\n\" >>> ' spacious '.strip()\\n\"\n\" 'spacious'\\n\"\n\" >>> 'www.example.com'.strip('cmowz.')\\n\"\n\" 'example'\\n\"\n'\\n'\n' The outermost leading and trailing *chars* argument '\n'values are\\n'\n' stripped from the string. Characters are removed from '\n'the leading\\n'\n' end until reaching a string character that is not '\n'contained in the\\n'\n' set of characters in *chars*. A similar action takes '\n'place on the\\n'\n' trailing end. For example:\\n'\n'\\n'\n\" >>> comment_string = '#....... Section 3.2.1 Issue \"\n\"#32 .......'\\n\"\n\" >>> comment_string.strip('.#! ')\\n\"\n\" 'Section 3.2.1 Issue #32'\\n\"\n'\\n'\n'str.swapcase()\\n'\n'\\n'\n' Return a copy of the string with uppercase characters '\n'converted to\\n'\n' lowercase and vice versa. Note that it is not '\n'necessarily true that\\n'\n' \"s.swapcase().swapcase() == s\".\\n'\n'\\n'\n'str.title()\\n'\n'\\n'\n' Return a titlecased version of the string where words '\n'start with an\\n'\n' uppercase character and the remaining characters are '\n'lowercase.\\n'\n'\\n'\n' For example:\\n'\n'\\n'\n\" >>> 'Hello world'.title()\\n\"\n\" 'Hello World'\\n\"\n'\\n'\n' The algorithm uses a simple language-independent '\n'definition of a\\n'\n' word as groups of consecutive letters. The definition '\n'works in\\n'\n' many contexts but it means that apostrophes in '\n'contractions and\\n'\n' possessives form word boundaries, which may not be the '\n'desired\\n'\n' result:\\n'\n'\\n'\n' >>> \"they\\'re bill\\'s friends from the UK\".title()\\n'\n' \"They\\'Re Bill\\'S Friends From The Uk\"\\n'\n'\\n'\n' A workaround for apostrophes can be constructed using '\n'regular\\n'\n' expressions:\\n'\n'\\n'\n' >>> import re\\n'\n' >>> def titlecase(s):\\n'\n' ... return re.sub(r\"[A-Za-z]+(\\'[A-Za-z]+)?\",\\n'\n' ... lambda mo: '\n'mo.group(0).capitalize(),\\n'\n' ... s)\\n'\n' ...\\n'\n' >>> titlecase(\"they\\'re bill\\'s friends.\")\\n'\n' \"They\\'re Bill\\'s Friends.\"\\n'\n'\\n'\n'str.translate(table)\\n'\n'\\n'\n' Return a copy of the string in which each character has '\n'been mapped\\n'\n' through the given translation table. The table must be '\n'an object\\n'\n' that implements indexing via \"__getitem__()\", typically '\n'a *mapping*\\n'\n' or *sequence*. When indexed by a Unicode ordinal (an '\n'integer), the\\n'\n' table object can do any of the following: return a '\n'Unicode ordinal\\n'\n' or a string, to map the character to one or more other '\n'characters;\\n'\n' return \"None\", to delete the character from the return '\n'string; or\\n'\n' raise a \"LookupError\" exception, to map the character '\n'to itself.\\n'\n'\\n'\n' You can use \"str.maketrans()\" to create a translation '\n'map from\\n'\n' character-to-character mappings in different formats.\\n'\n'\\n'\n' See also the \"codecs\" module for a more flexible '\n'approach to custom\\n'\n' character mappings.\\n'\n'\\n'\n'str.upper()\\n'\n'\\n'\n' Return a copy of the string with all the cased '\n'characters [4]\\n'\n' converted to uppercase. Note that '\n'\"s.upper().isupper()\" might be\\n'\n' \"False\" if \"s\" contains uncased characters or if the '\n'Unicode\\n'\n' category of the resulting character(s) is not \u201cLu\u201d '\n'(Letter,\\n'\n' uppercase), but e.g. \u201cLt\u201d (Letter, titlecase).\\n'\n'\\n'\n' The uppercasing algorithm used is described in section '\n'3.13 of the\\n'\n' Unicode Standard.\\n'\n'\\n'\n'str.zfill(width)\\n'\n'\\n'\n' Return a copy of the string left filled with ASCII '\n'\"\\'0\\'\" digits to\\n'\n' make a string of length *width*. A leading sign prefix\\n'\n' (\"\\'+\\'\"/\"\\'-\\'\") is handled by inserting the padding '\n'*after* the sign\\n'\n' character rather than before. The original string is '\n'returned if\\n'\n' *width* is less than or equal to \"len(s)\".\\n'\n'\\n'\n' For example:\\n'\n'\\n'\n' >>> \"42\".zfill(5)\\n'\n\" '00042'\\n\"\n' >>> \"-42\".zfill(5)\\n'\n\" '-0042'\\n\",\n'strings':'String and Bytes literals\\n'\n'*************************\\n'\n'\\n'\n'String literals are described by the following lexical '\n'definitions:\\n'\n'\\n'\n' stringliteral ::= [stringprefix](shortstring | longstring)\\n'\n' stringprefix ::= \"r\" | \"u\" | \"R\" | \"U\" | \"f\" | \"F\"\\n'\n' | \"fr\" | \"Fr\" | \"fR\" | \"FR\" | \"rf\" | \"rF\" | '\n'\"Rf\" | \"RF\"\\n'\n' shortstring ::= \"\\'\" shortstringitem* \"\\'\" | \\'\"\\' '\n'shortstringitem* \\'\"\\'\\n'\n' longstring ::= \"\\'\\'\\'\" longstringitem* \"\\'\\'\\'\" | '\n'\\'\"\"\"\\' longstringitem* \\'\"\"\"\\'\\n'\n' shortstringitem ::= shortstringchar | stringescapeseq\\n'\n' longstringitem ::= longstringchar | stringescapeseq\\n'\n' shortstringchar ::= \\n'\n' longstringchar ::= \\n'\n' stringescapeseq ::= \"\\\\\" \\n'\n'\\n'\n' bytesliteral ::= bytesprefix(shortbytes | longbytes)\\n'\n' bytesprefix ::= \"b\" | \"B\" | \"br\" | \"Br\" | \"bR\" | \"BR\" | '\n'\"rb\" | \"rB\" | \"Rb\" | \"RB\"\\n'\n' shortbytes ::= \"\\'\" shortbytesitem* \"\\'\" | \\'\"\\' '\n'shortbytesitem* \\'\"\\'\\n'\n' longbytes ::= \"\\'\\'\\'\" longbytesitem* \"\\'\\'\\'\" | \\'\"\"\"\\' '\n'longbytesitem* \\'\"\"\"\\'\\n'\n' shortbytesitem ::= shortbyteschar | bytesescapeseq\\n'\n' longbytesitem ::= longbyteschar | bytesescapeseq\\n'\n' shortbyteschar ::= \\n'\n' longbyteschar ::= \\n'\n' bytesescapeseq ::= \"\\\\\" \\n'\n'\\n'\n'One syntactic restriction not indicated by these productions is '\n'that\\n'\n'whitespace is not allowed between the \"stringprefix\" or '\n'\"bytesprefix\"\\n'\n'and the rest of the literal. The source character set is defined '\n'by\\n'\n'the encoding declaration; it is UTF-8 if no encoding declaration '\n'is\\n'\n'given in the source file; see section Encoding declarations.\\n'\n'\\n'\n'In plain English: Both types of literals can be enclosed in '\n'matching\\n'\n'single quotes (\"\\'\") or double quotes (\"\"\"). They can also be '\n'enclosed\\n'\n'in matching groups of three single or double quotes (these are\\n'\n'generally referred to as *triple-quoted strings*). The '\n'backslash\\n'\n'(\"\\\\\") character is used to escape characters that otherwise have '\n'a\\n'\n'special meaning, such as newline, backslash itself, or the quote\\n'\n'character.\\n'\n'\\n'\n'Bytes literals are always prefixed with \"\\'b\\'\" or \"\\'B\\'\"; they '\n'produce\\n'\n'an instance of the \"bytes\" type instead of the \"str\" type. They '\n'may\\n'\n'only contain ASCII characters; bytes with a numeric value of 128 '\n'or\\n'\n'greater must be expressed with escapes.\\n'\n'\\n'\n'Both string and bytes literals may optionally be prefixed with a\\n'\n'letter \"\\'r\\'\" or \"\\'R\\'\"; such strings are called *raw strings* '\n'and treat\\n'\n'backslashes as literal characters. As a result, in string '\n'literals,\\n'\n'\"\\'\\\\U\\'\" and \"\\'\\\\u\\'\" escapes in raw strings are not treated '\n'specially.\\n'\n'Given that Python 2.x\u2019s raw unicode literals behave differently '\n'than\\n'\n'Python 3.x\u2019s the \"\\'ur\\'\" syntax is not supported.\\n'\n'\\n'\n'New in version 3.3: The \"\\'rb\\'\" prefix of raw bytes literals has '\n'been\\n'\n'added as a synonym of \"\\'br\\'\".\\n'\n'\\n'\n'New in version 3.3: Support for the unicode legacy literal\\n'\n'(\"u\\'value\\'\") was reintroduced to simplify the maintenance of '\n'dual\\n'\n'Python 2.x and 3.x codebases. See **PEP 414** for more '\n'information.\\n'\n'\\n'\n'A string literal with \"\\'f\\'\" or \"\\'F\\'\" in its prefix is a '\n'*formatted\\n'\n'string literal*; see Formatted string literals. The \"\\'f\\'\" may '\n'be\\n'\n'combined with \"\\'r\\'\", but not with \"\\'b\\'\" or \"\\'u\\'\", therefore '\n'raw\\n'\n'formatted strings are possible, but formatted bytes literals are '\n'not.\\n'\n'\\n'\n'In triple-quoted literals, unescaped newlines and quotes are '\n'allowed\\n'\n'(and are retained), except that three unescaped quotes in a row\\n'\n'terminate the literal. (A \u201cquote\u201d is the character used to open '\n'the\\n'\n'literal, i.e. either \"\\'\" or \"\"\".)\\n'\n'\\n'\n'Unless an \"\\'r\\'\" or \"\\'R\\'\" prefix is present, escape sequences '\n'in string\\n'\n'and bytes literals are interpreted according to rules similar to '\n'those\\n'\n'used by Standard C. The recognized escape sequences are:\\n'\n'\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| Escape Sequence | Meaning | Notes '\n'|\\n'\n'|===================|===================================|=========|\\n'\n'| \"\\\\newline\" | Backslash and newline ignored '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\\\\\\" | Backslash (\"\\\\\") '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\\\'\" | Single quote (\"\\'\") '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\\"\" | Double quote (\"\"\") '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\a\" | ASCII Bell (BEL) '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\b\" | ASCII Backspace (BS) '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\f\" | ASCII Formfeed (FF) '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\n\" | ASCII Linefeed (LF) '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\r\" | ASCII Carriage Return (CR) '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\t\" | ASCII Horizontal Tab (TAB) '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\v\" | ASCII Vertical Tab (VT) '\n'| |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\ooo\" | Character with octal value *ooo* | '\n'(1,3) |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\xhh\" | Character with hex value *hh* | '\n'(2,3) |\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'\\n'\n'Escape sequences only recognized in string literals are:\\n'\n'\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| Escape Sequence | Meaning | Notes '\n'|\\n'\n'|===================|===================================|=========|\\n'\n'| \"\\\\N{name}\" | Character named *name* in the | '\n'(4) |\\n'\n'| | Unicode database | '\n'|\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\uxxxx\" | Character with 16-bit hex value | '\n'(5) |\\n'\n'| | *xxxx* | '\n'|\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'| \"\\\\Uxxxxxxxx\" | Character with 32-bit hex value | '\n'(6) |\\n'\n'| | *xxxxxxxx* | '\n'|\\n'\n'+-------------------+-----------------------------------+---------+\\n'\n'\\n'\n'Notes:\\n'\n'\\n'\n'1. As in Standard C, up to three octal digits are accepted.\\n'\n'\\n'\n'2. Unlike in Standard C, exactly two hex digits are required.\\n'\n'\\n'\n'3. In a bytes literal, hexadecimal and octal escapes denote the '\n'byte\\n'\n' with the given value. In a string literal, these escapes '\n'denote a\\n'\n' Unicode character with the given value.\\n'\n'\\n'\n'4. Changed in version 3.3: Support for name aliases [1] has been\\n'\n' added.\\n'\n'\\n'\n'5. Exactly four hex digits are required.\\n'\n'\\n'\n'6. Any Unicode character can be encoded this way. Exactly eight '\n'hex\\n'\n' digits are required.\\n'\n'\\n'\n'Unlike Standard C, all unrecognized escape sequences are left in '\n'the\\n'\n'string unchanged, i.e., *the backslash is left in the result*. '\n'(This\\n'\n'behavior is useful when debugging: if an escape sequence is '\n'mistyped,\\n'\n'the resulting output is more easily recognized as broken.) It is '\n'also\\n'\n'important to note that the escape sequences only recognized in '\n'string\\n'\n'literals fall into the category of unrecognized escapes for '\n'bytes\\n'\n'literals.\\n'\n'\\n'\n' Changed in version 3.6: Unrecognized escape sequences produce '\n'a\\n'\n' \"DeprecationWarning\". In a future Python version they will be '\n'a\\n'\n' \"SyntaxWarning\" and eventually a \"SyntaxError\".\\n'\n'\\n'\n'Even in a raw literal, quotes can be escaped with a backslash, '\n'but the\\n'\n'backslash remains in the result; for example, \"r\"\\\\\"\"\" is a '\n'valid\\n'\n'string literal consisting of two characters: a backslash and a '\n'double\\n'\n'quote; \"r\"\\\\\"\" is not a valid string literal (even a raw string '\n'cannot\\n'\n'end in an odd number of backslashes). Specifically, *a raw '\n'literal\\n'\n'cannot end in a single backslash* (since the backslash would '\n'escape\\n'\n'the following quote character). Note also that a single '\n'backslash\\n'\n'followed by a newline is interpreted as those two characters as '\n'part\\n'\n'of the literal, *not* as a line continuation.\\n',\n'subscriptions':'Subscriptions\\n'\n'*************\\n'\n'\\n'\n'Subscription of a sequence (string, tuple or list) or '\n'mapping\\n'\n'(dictionary) object usually selects an item from the '\n'collection:\\n'\n'\\n'\n' subscription ::= primary \"[\" expression_list \"]\"\\n'\n'\\n'\n'The primary must evaluate to an object that supports '\n'subscription\\n'\n'(lists or dictionaries for example). User-defined objects '\n'can support\\n'\n'subscription by defining a \"__getitem__()\" method.\\n'\n'\\n'\n'For built-in objects, there are two types of objects that '\n'support\\n'\n'subscription:\\n'\n'\\n'\n'If the primary is a mapping, the expression list must '\n'evaluate to an\\n'\n'object whose value is one of the keys of the mapping, and '\n'the\\n'\n'subscription selects the value in the mapping that '\n'corresponds to that\\n'\n'key. (The expression list is a tuple except if it has '\n'exactly one\\n'\n'item.)\\n'\n'\\n'\n'If the primary is a sequence, the expression list must '\n'evaluate to an\\n'\n'integer or a slice (as discussed in the following '\n'section).\\n'\n'\\n'\n'The formal syntax makes no special provision for negative '\n'indices in\\n'\n'sequences; however, built-in sequences all provide a '\n'\"__getitem__()\"\\n'\n'method that interprets negative indices by adding the '\n'length of the\\n'\n'sequence to the index (so that \"x[-1]\" selects the last '\n'item of \"x\").\\n'\n'The resulting value must be a nonnegative integer less than '\n'the number\\n'\n'of items in the sequence, and the subscription selects the '\n'item whose\\n'\n'index is that value (counting from zero). Since the support '\n'for\\n'\n'negative indices and slicing occurs in the object\u2019s '\n'\"__getitem__()\"\\n'\n'method, subclasses overriding this method will need to '\n'explicitly add\\n'\n'that support.\\n'\n'\\n'\n'A string\u2019s items are characters. A character is not a '\n'separate data\\n'\n'type but a string of exactly one character.\\n'\n'\\n'\n'Subscription of certain *classes* or *types* creates a '\n'generic alias.\\n'\n'In this case, user-defined classes can support subscription '\n'by\\n'\n'providing a \"__class_getitem__()\" classmethod.\\n',\n'truth':'Truth Value Testing\\n'\n'*******************\\n'\n'\\n'\n'Any object can be tested for truth value, for use in an \"if\" or\\n'\n'\"while\" condition or as operand of the Boolean operations below.\\n'\n'\\n'\n'By default, an object is considered true unless its class defines\\n'\n'either a \"__bool__()\" method that returns \"False\" or a \"__len__()\"\\n'\n'method that returns zero, when called with the object. [1] Here '\n'are\\n'\n'most of the built-in objects considered false:\\n'\n'\\n'\n'* constants defined to be false: \"None\" and \"False\".\\n'\n'\\n'\n'* zero of any numeric type: \"0\", \"0.0\", \"0j\", \"Decimal(0)\",\\n'\n' \"Fraction(0, 1)\"\\n'\n'\\n'\n'* empty sequences and collections: \"\\'\\'\", \"()\", \"[]\", \"{}\", '\n'\"set()\",\\n'\n' \"range(0)\"\\n'\n'\\n'\n'Operations and built-in functions that have a Boolean result '\n'always\\n'\n'return \"0\" or \"False\" for false and \"1\" or \"True\" for true, unless\\n'\n'otherwise stated. (Important exception: the Boolean operations '\n'\"or\"\\n'\n'and \"and\" always return one of their operands.)\\n',\n'try':'The \"try\" statement\\n'\n'*******************\\n'\n'\\n'\n'The \"try\" statement specifies exception handlers and/or cleanup code\\n'\n'for a group of statements:\\n'\n'\\n'\n' try_stmt ::= try1_stmt | try2_stmt\\n'\n' try1_stmt ::= \"try\" \":\" suite\\n'\n' (\"except\" [expression [\"as\" identifier]] \":\" '\n'suite)+\\n'\n' [\"else\" \":\" suite]\\n'\n' [\"finally\" \":\" suite]\\n'\n' try2_stmt ::= \"try\" \":\" suite\\n'\n' \"finally\" \":\" suite\\n'\n'\\n'\n'The \"except\" clause(s) specify one or more exception handlers. When '\n'no\\n'\n'exception occurs in the \"try\" clause, no exception handler is\\n'\n'executed. When an exception occurs in the \"try\" suite, a search for '\n'an\\n'\n'exception handler is started. This search inspects the except '\n'clauses\\n'\n'in turn until one is found that matches the exception. An '\n'expression-\\n'\n'less except clause, if present, must be last; it matches any\\n'\n'exception. For an except clause with an expression, that expression\\n'\n'is evaluated, and the clause matches the exception if the resulting\\n'\n'object is \u201ccompatible\u201d with the exception. An object is compatible\\n'\n'with an exception if it is the class or a base class of the '\n'exception\\n'\n'object, or a tuple containing an item that is the class or a base\\n'\n'class of the exception object.\\n'\n'\\n'\n'If no except clause matches the exception, the search for an '\n'exception\\n'\n'handler continues in the surrounding code and on the invocation '\n'stack.\\n'\n'[1]\\n'\n'\\n'\n'If the evaluation of an expression in the header of an except clause\\n'\n'raises an exception, the original search for a handler is canceled '\n'and\\n'\n'a search starts for the new exception in the surrounding code and on\\n'\n'the call stack (it is treated as if the entire \"try\" statement '\n'raised\\n'\n'the exception).\\n'\n'\\n'\n'When a matching except clause is found, the exception is assigned to\\n'\n'the target specified after the \"as\" keyword in that except clause, '\n'if\\n'\n'present, and the except clause\u2019s suite is executed. All except\\n'\n'clauses must have an executable block. When the end of this block '\n'is\\n'\n'reached, execution continues normally after the entire try '\n'statement.\\n'\n'(This means that if two nested handlers exist for the same '\n'exception,\\n'\n'and the exception occurs in the try clause of the inner handler, the\\n'\n'outer handler will not handle the exception.)\\n'\n'\\n'\n'When an exception has been assigned using \"as target\", it is cleared\\n'\n'at the end of the except clause. This is as if\\n'\n'\\n'\n' except E as N:\\n'\n' foo\\n'\n'\\n'\n'was translated to\\n'\n'\\n'\n' except E as N:\\n'\n' try:\\n'\n' foo\\n'\n' finally:\\n'\n' del N\\n'\n'\\n'\n'This means the exception must be assigned to a different name to be\\n'\n'able to refer to it after the except clause. Exceptions are cleared\\n'\n'because with the traceback attached to them, they form a reference\\n'\n'cycle with the stack frame, keeping all locals in that frame alive\\n'\n'until the next garbage collection occurs.\\n'\n'\\n'\n'Before an except clause\u2019s suite is executed, details about the\\n'\n'exception are stored in the \"sys\" module and can be accessed via\\n'\n'\"sys.exc_info()\". \"sys.exc_info()\" returns a 3-tuple consisting of '\n'the\\n'\n'exception class, the exception instance and a traceback object (see\\n'\n'section The standard type hierarchy) identifying the point in the\\n'\n'program where the exception occurred. The details about the '\n'exception\\n'\n'accessed via \"sys.exc_info()\" are restored to their previous values\\n'\n'when leaving an exception handler:\\n'\n'\\n'\n' >>> print(sys.exc_info())\\n'\n' (None, None, None)\\n'\n' >>> try:\\n'\n' ... raise TypeError\\n'\n' ... except:\\n'\n' ... print(sys.exc_info())\\n'\n' ... try:\\n'\n' ... raise ValueError\\n'\n' ... except:\\n'\n' ... print(sys.exc_info())\\n'\n' ... print(sys.exc_info())\\n'\n' ...\\n'\n\" (, TypeError(), )\\n'\n\" (, ValueError(), )\\n'\n\" (, TypeError(), )\\n'\n' >>> print(sys.exc_info())\\n'\n' (None, None, None)\\n'\n'\\n'\n'The optional \"else\" clause is executed if the control flow leaves '\n'the\\n'\n'\"try\" suite, no exception was raised, and no \"return\", \"continue\", '\n'or\\n'\n'\"break\" statement was executed. Exceptions in the \"else\" clause are\\n'\n'not handled by the preceding \"except\" clauses.\\n'\n'\\n'\n'If \"finally\" is present, it specifies a \u2018cleanup\u2019 handler. The '\n'\"try\"\\n'\n'clause is executed, including any \"except\" and \"else\" clauses. If '\n'an\\n'\n'exception occurs in any of the clauses and is not handled, the\\n'\n'exception is temporarily saved. The \"finally\" clause is executed. '\n'If\\n'\n'there is a saved exception it is re-raised at the end of the '\n'\"finally\"\\n'\n'clause. If the \"finally\" clause raises another exception, the saved\\n'\n'exception is set as the context of the new exception. If the '\n'\"finally\"\\n'\n'clause executes a \"return\", \"break\" or \"continue\" statement, the '\n'saved\\n'\n'exception is discarded:\\n'\n'\\n'\n' >>> def f():\\n'\n' ... try:\\n'\n' ... 1/0\\n'\n' ... finally:\\n'\n' ... return 42\\n'\n' ...\\n'\n' >>> f()\\n'\n' 42\\n'\n'\\n'\n'The exception information is not available to the program during\\n'\n'execution of the \"finally\" clause.\\n'\n'\\n'\n'When a \"return\", \"break\" or \"continue\" statement is executed in the\\n'\n'\"try\" suite of a \"try\"\u2026\"finally\" statement, the \"finally\" clause is\\n'\n'also executed \u2018on the way out.\u2019\\n'\n'\\n'\n'The return value of a function is determined by the last \"return\"\\n'\n'statement executed. Since the \"finally\" clause always executes, a\\n'\n'\"return\" statement executed in the \"finally\" clause will always be '\n'the\\n'\n'last one executed:\\n'\n'\\n'\n' >>> def foo():\\n'\n' ... try:\\n'\n\" ... return 'try'\\n\"\n' ... finally:\\n'\n\" ... return 'finally'\\n\"\n' ...\\n'\n' >>> foo()\\n'\n\" 'finally'\\n\"\n'\\n'\n'Additional information on exceptions can be found in section\\n'\n'Exceptions, and information on using the \"raise\" statement to '\n'generate\\n'\n'exceptions may be found in section The raise statement.\\n'\n'\\n'\n'Changed in version 3.8: Prior to Python 3.8, a \"continue\" statement\\n'\n'was illegal in the \"finally\" clause due to a problem with the\\n'\n'implementation.\\n',\n'types':'The standard type hierarchy\\n'\n'***************************\\n'\n'\\n'\n'Below is a list of the types that are built into Python. '\n'Extension\\n'\n'modules (written in C, Java, or other languages, depending on the\\n'\n'implementation) can define additional types. Future versions of\\n'\n'Python may add types to the type hierarchy (e.g., rational '\n'numbers,\\n'\n'efficiently stored arrays of integers, etc.), although such '\n'additions\\n'\n'will often be provided via the standard library instead.\\n'\n'\\n'\n'Some of the type descriptions below contain a paragraph listing\\n'\n'\u2018special attributes.\u2019 These are attributes that provide access to '\n'the\\n'\n'implementation and are not intended for general use. Their '\n'definition\\n'\n'may change in the future.\\n'\n'\\n'\n'None\\n'\n' This type has a single value. There is a single object with '\n'this\\n'\n' value. This object is accessed through the built-in name \"None\". '\n'It\\n'\n' is used to signify the absence of a value in many situations, '\n'e.g.,\\n'\n' it is returned from functions that don\u2019t explicitly return\\n'\n' anything. Its truth value is false.\\n'\n'\\n'\n'NotImplemented\\n'\n' This type has a single value. There is a single object with '\n'this\\n'\n' value. This object is accessed through the built-in name\\n'\n' \"NotImplemented\". Numeric methods and rich comparison methods\\n'\n' should return this value if they do not implement the operation '\n'for\\n'\n' the operands provided. (The interpreter will then try the\\n'\n' reflected operation, or some other fallback, depending on the\\n'\n' operator.) It should not be evaluated in a boolean context.\\n'\n'\\n'\n' See Implementing the arithmetic operations for more details.\\n'\n'\\n'\n' Changed in version 3.9: Evaluating \"NotImplemented\" in a '\n'boolean\\n'\n' context is deprecated. While it currently evaluates as true, it\\n'\n' will emit a \"DeprecationWarning\". It will raise a \"TypeError\" in '\n'a\\n'\n' future version of Python.\\n'\n'\\n'\n'Ellipsis\\n'\n' This type has a single value. There is a single object with '\n'this\\n'\n' value. This object is accessed through the literal \"...\" or the\\n'\n' built-in name \"Ellipsis\". Its truth value is true.\\n'\n'\\n'\n'\"numbers.Number\"\\n'\n' These are created by numeric literals and returned as results '\n'by\\n'\n' arithmetic operators and arithmetic built-in functions. '\n'Numeric\\n'\n' objects are immutable; once created their value never changes.\\n'\n' Python numbers are of course strongly related to mathematical\\n'\n' numbers, but subject to the limitations of numerical '\n'representation\\n'\n' in computers.\\n'\n'\\n'\n' The string representations of the numeric classes, computed by\\n'\n' \"__repr__()\" and \"__str__()\", have the following properties:\\n'\n'\\n'\n' * They are valid numeric literals which, when passed to their '\n'class\\n'\n' constructor, produce an object having the value of the '\n'original\\n'\n' numeric.\\n'\n'\\n'\n' * The representation is in base 10, when possible.\\n'\n'\\n'\n' * Leading zeros, possibly excepting a single zero before a '\n'decimal\\n'\n' point, are not shown.\\n'\n'\\n'\n' * Trailing zeros, possibly excepting a single zero after a '\n'decimal\\n'\n' point, are not shown.\\n'\n'\\n'\n' * A sign is shown only when the number is negative.\\n'\n'\\n'\n' Python distinguishes between integers, floating point numbers, '\n'and\\n'\n' complex numbers:\\n'\n'\\n'\n' \"numbers.Integral\"\\n'\n' These represent elements from the mathematical set of '\n'integers\\n'\n' (positive and negative).\\n'\n'\\n'\n' There are two types of integers:\\n'\n'\\n'\n' Integers (\"int\")\\n'\n' These represent numbers in an unlimited range, subject to\\n'\n' available (virtual) memory only. For the purpose of '\n'shift\\n'\n' and mask operations, a binary representation is assumed, '\n'and\\n'\n' negative numbers are represented in a variant of 2\u2019s\\n'\n' complement which gives the illusion of an infinite string '\n'of\\n'\n' sign bits extending to the left.\\n'\n'\\n'\n' Booleans (\"bool\")\\n'\n' These represent the truth values False and True. The two\\n'\n' objects representing the values \"False\" and \"True\" are '\n'the\\n'\n' only Boolean objects. The Boolean type is a subtype of '\n'the\\n'\n' integer type, and Boolean values behave like the values 0 '\n'and\\n'\n' 1, respectively, in almost all contexts, the exception '\n'being\\n'\n' that when converted to a string, the strings \"\"False\"\" or\\n'\n' \"\"True\"\" are returned, respectively.\\n'\n'\\n'\n' The rules for integer representation are intended to give '\n'the\\n'\n' most meaningful interpretation of shift and mask operations\\n'\n' involving negative integers.\\n'\n'\\n'\n' \"numbers.Real\" (\"float\")\\n'\n' These represent machine-level double precision floating '\n'point\\n'\n' numbers. You are at the mercy of the underlying machine\\n'\n' architecture (and C or Java implementation) for the accepted\\n'\n' range and handling of overflow. Python does not support '\n'single-\\n'\n' precision floating point numbers; the savings in processor '\n'and\\n'\n' memory usage that are usually the reason for using these are\\n'\n' dwarfed by the overhead of using objects in Python, so there '\n'is\\n'\n' no reason to complicate the language with two kinds of '\n'floating\\n'\n' point numbers.\\n'\n'\\n'\n' \"numbers.Complex\" (\"complex\")\\n'\n' These represent complex numbers as a pair of machine-level\\n'\n' double precision floating point numbers. The same caveats '\n'apply\\n'\n' as for floating point numbers. The real and imaginary parts '\n'of a\\n'\n' complex number \"z\" can be retrieved through the read-only\\n'\n' attributes \"z.real\" and \"z.imag\".\\n'\n'\\n'\n'Sequences\\n'\n' These represent finite ordered sets indexed by non-negative\\n'\n' numbers. The built-in function \"len()\" returns the number of '\n'items\\n'\n' of a sequence. When the length of a sequence is *n*, the index '\n'set\\n'\n' contains the numbers 0, 1, \u2026, *n*-1. Item *i* of sequence *a* '\n'is\\n'\n' selected by \"a[i]\".\\n'\n'\\n'\n' Sequences also support slicing: \"a[i:j]\" selects all items with\\n'\n' index *k* such that *i* \"<=\" *k* \"<\" *j*. When used as an\\n'\n' expression, a slice is a sequence of the same type. This '\n'implies\\n'\n' that the index set is renumbered so that it starts at 0.\\n'\n'\\n'\n' Some sequences also support \u201cextended slicing\u201d with a third '\n'\u201cstep\u201d\\n'\n' parameter: \"a[i:j:k]\" selects all items of *a* with index *x* '\n'where\\n'\n' \"x = i + n*k\", *n* \">=\" \"0\" and *i* \"<=\" *x* \"<\" *j*.\\n'\n'\\n'\n' Sequences are distinguished according to their mutability:\\n'\n'\\n'\n' Immutable sequences\\n'\n' An object of an immutable sequence type cannot change once it '\n'is\\n'\n' created. (If the object contains references to other '\n'objects,\\n'\n' these other objects may be mutable and may be changed; '\n'however,\\n'\n' the collection of objects directly referenced by an '\n'immutable\\n'\n' object cannot change.)\\n'\n'\\n'\n' The following types are immutable sequences:\\n'\n'\\n'\n' Strings\\n'\n' A string is a sequence of values that represent Unicode '\n'code\\n'\n' points. All the code points in the range \"U+0000 - '\n'U+10FFFF\"\\n'\n' can be represented in a string. Python doesn\u2019t have a '\n'*char*\\n'\n' type; instead, every code point in the string is '\n'represented\\n'\n' as a string object with length \"1\". The built-in '\n'function\\n'\n' \"ord()\" converts a code point from its string form to an\\n'\n' integer in the range \"0 - 10FFFF\"; \"chr()\" converts an\\n'\n' integer in the range \"0 - 10FFFF\" to the corresponding '\n'length\\n'\n' \"1\" string object. \"str.encode()\" can be used to convert '\n'a\\n'\n' \"str\" to \"bytes\" using the given text encoding, and\\n'\n' \"bytes.decode()\" can be used to achieve the opposite.\\n'\n'\\n'\n' Tuples\\n'\n' The items of a tuple are arbitrary Python objects. Tuples '\n'of\\n'\n' two or more items are formed by comma-separated lists of\\n'\n' expressions. A tuple of one item (a \u2018singleton\u2019) can be\\n'\n' formed by affixing a comma to an expression (an expression '\n'by\\n'\n' itself does not create a tuple, since parentheses must be\\n'\n' usable for grouping of expressions). An empty tuple can '\n'be\\n'\n' formed by an empty pair of parentheses.\\n'\n'\\n'\n' Bytes\\n'\n' A bytes object is an immutable array. The items are '\n'8-bit\\n'\n' bytes, represented by integers in the range 0 <= x < 256.\\n'\n' Bytes literals (like \"b\\'abc\\'\") and the built-in '\n'\"bytes()\"\\n'\n' constructor can be used to create bytes objects. Also, '\n'bytes\\n'\n' objects can be decoded to strings via the \"decode()\" '\n'method.\\n'\n'\\n'\n' Mutable sequences\\n'\n' Mutable sequences can be changed after they are created. '\n'The\\n'\n' subscription and slicing notations can be used as the target '\n'of\\n'\n' assignment and \"del\" (delete) statements.\\n'\n'\\n'\n' There are currently two intrinsic mutable sequence types:\\n'\n'\\n'\n' Lists\\n'\n' The items of a list are arbitrary Python objects. Lists '\n'are\\n'\n' formed by placing a comma-separated list of expressions '\n'in\\n'\n' square brackets. (Note that there are no special cases '\n'needed\\n'\n' to form lists of length 0 or 1.)\\n'\n'\\n'\n' Byte Arrays\\n'\n' A bytearray object is a mutable array. They are created '\n'by\\n'\n' the built-in \"bytearray()\" constructor. Aside from being\\n'\n' mutable (and hence unhashable), byte arrays otherwise '\n'provide\\n'\n' the same interface and functionality as immutable \"bytes\"\\n'\n' objects.\\n'\n'\\n'\n' The extension module \"array\" provides an additional example '\n'of a\\n'\n' mutable sequence type, as does the \"collections\" module.\\n'\n'\\n'\n'Set types\\n'\n' These represent unordered, finite sets of unique, immutable\\n'\n' objects. As such, they cannot be indexed by any subscript. '\n'However,\\n'\n' they can be iterated over, and the built-in function \"len()\"\\n'\n' returns the number of items in a set. Common uses for sets are '\n'fast\\n'\n' membership testing, removing duplicates from a sequence, and\\n'\n' computing mathematical operations such as intersection, union,\\n'\n' difference, and symmetric difference.\\n'\n'\\n'\n' For set elements, the same immutability rules apply as for\\n'\n' dictionary keys. Note that numeric types obey the normal rules '\n'for\\n'\n' numeric comparison: if two numbers compare equal (e.g., \"1\" and\\n'\n' \"1.0\"), only one of them can be contained in a set.\\n'\n'\\n'\n' There are currently two intrinsic set types:\\n'\n'\\n'\n' Sets\\n'\n' These represent a mutable set. They are created by the '\n'built-in\\n'\n' \"set()\" constructor and can be modified afterwards by '\n'several\\n'\n' methods, such as \"add()\".\\n'\n'\\n'\n' Frozen sets\\n'\n' These represent an immutable set. They are created by the\\n'\n' built-in \"frozenset()\" constructor. As a frozenset is '\n'immutable\\n'\n' and *hashable*, it can be used again as an element of '\n'another\\n'\n' set, or as a dictionary key.\\n'\n'\\n'\n'Mappings\\n'\n' These represent finite sets of objects indexed by arbitrary '\n'index\\n'\n' sets. The subscript notation \"a[k]\" selects the item indexed by '\n'\"k\"\\n'\n' from the mapping \"a\"; this can be used in expressions and as '\n'the\\n'\n' target of assignments or \"del\" statements. The built-in '\n'function\\n'\n' \"len()\" returns the number of items in a mapping.\\n'\n'\\n'\n' There is currently a single intrinsic mapping type:\\n'\n'\\n'\n' Dictionaries\\n'\n' These represent finite sets of objects indexed by nearly\\n'\n' arbitrary values. The only types of values not acceptable '\n'as\\n'\n' keys are values containing lists or dictionaries or other\\n'\n' mutable types that are compared by value rather than by '\n'object\\n'\n' identity, the reason being that the efficient implementation '\n'of\\n'\n' dictionaries requires a key\u2019s hash value to remain constant.\\n'\n' Numeric types used for keys obey the normal rules for '\n'numeric\\n'\n' comparison: if two numbers compare equal (e.g., \"1\" and '\n'\"1.0\")\\n'\n' then they can be used interchangeably to index the same\\n'\n' dictionary entry.\\n'\n'\\n'\n' Dictionaries preserve insertion order, meaning that keys will '\n'be\\n'\n' produced in the same order they were added sequentially over '\n'the\\n'\n' dictionary. Replacing an existing key does not change the '\n'order,\\n'\n' however removing a key and re-inserting it will add it to '\n'the\\n'\n' end instead of keeping its old place.\\n'\n'\\n'\n' Dictionaries are mutable; they can be created by the \"{...}\"\\n'\n' notation (see section Dictionary displays).\\n'\n'\\n'\n' The extension modules \"dbm.ndbm\" and \"dbm.gnu\" provide\\n'\n' additional examples of mapping types, as does the '\n'\"collections\"\\n'\n' module.\\n'\n'\\n'\n' Changed in version 3.7: Dictionaries did not preserve '\n'insertion\\n'\n' order in versions of Python before 3.6. In CPython 3.6,\\n'\n' insertion order was preserved, but it was considered an\\n'\n' implementation detail at that time rather than a language\\n'\n' guarantee.\\n'\n'\\n'\n'Callable types\\n'\n' These are the types to which the function call operation (see\\n'\n' section Calls) can be applied:\\n'\n'\\n'\n' User-defined functions\\n'\n' A user-defined function object is created by a function\\n'\n' definition (see section Function definitions). It should be\\n'\n' called with an argument list containing the same number of '\n'items\\n'\n' as the function\u2019s formal parameter list.\\n'\n'\\n'\n' Special attributes:\\n'\n'\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | Attribute | Meaning '\n'| |\\n'\n' '\n'|===========================|=================================|=============|\\n'\n' | \"__doc__\" | The function\u2019s documentation '\n'| Writable |\\n'\n' | | string, or \"None\" if '\n'| |\\n'\n' | | unavailable; not inherited by '\n'| |\\n'\n' | | subclasses. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__name__\" | The function\u2019s name. '\n'| Writable |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__qualname__\" | The function\u2019s *qualified '\n'| Writable |\\n'\n' | | name*. New in version 3.3. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__module__\" | The name of the module the '\n'| Writable |\\n'\n' | | function was defined in, or '\n'| |\\n'\n' | | \"None\" if unavailable. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__defaults__\" | A tuple containing default '\n'| Writable |\\n'\n' | | argument values for those '\n'| |\\n'\n' | | arguments that have defaults, '\n'| |\\n'\n' | | or \"None\" if no arguments have '\n'| |\\n'\n' | | a default value. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__code__\" | The code object representing '\n'| Writable |\\n'\n' | | the compiled function body. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__globals__\" | A reference to the dictionary '\n'| Read-only |\\n'\n' | | that holds the function\u2019s '\n'| |\\n'\n' | | global variables \u2014 the global '\n'| |\\n'\n' | | namespace of the module in '\n'| |\\n'\n' | | which the function was defined. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__dict__\" | The namespace supporting '\n'| Writable |\\n'\n' | | arbitrary function attributes. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__closure__\" | \"None\" or a tuple of cells that '\n'| Read-only |\\n'\n' | | contain bindings for the '\n'| |\\n'\n' | | function\u2019s free variables. See '\n'| |\\n'\n' | | below for information on the '\n'| |\\n'\n' | | \"cell_contents\" attribute. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__annotations__\" | A dict containing annotations '\n'| Writable |\\n'\n' | | of parameters. The keys of the '\n'| |\\n'\n' | | dict are the parameter names, '\n'| |\\n'\n' | | and \"\\'return\\'\" for the '\n'return | |\\n'\n' | | annotation, if provided. For '\n'| |\\n'\n' | | more information on working '\n'| |\\n'\n' | | with this attribute, see '\n'| |\\n'\n' | | Annotations Best Practices. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n' | \"__kwdefaults__\" | A dict containing defaults for '\n'| Writable |\\n'\n' | | keyword-only parameters. '\n'| |\\n'\n' '\n'+---------------------------+---------------------------------+-------------+\\n'\n'\\n'\n' Most of the attributes labelled \u201cWritable\u201d check the type of '\n'the\\n'\n' assigned value.\\n'\n'\\n'\n' Function objects also support getting and setting arbitrary\\n'\n' attributes, which can be used, for example, to attach '\n'metadata\\n'\n' to functions. Regular attribute dot-notation is used to get '\n'and\\n'\n' set such attributes. *Note that the current implementation '\n'only\\n'\n' supports function attributes on user-defined functions. '\n'Function\\n'\n' attributes on built-in functions may be supported in the\\n'\n' future.*\\n'\n'\\n'\n' A cell object has the attribute \"cell_contents\". This can be\\n'\n' used to get the value of the cell, as well as set the value.\\n'\n'\\n'\n' Additional information about a function\u2019s definition can be\\n'\n' retrieved from its code object; see the description of '\n'internal\\n'\n' types below. The \"cell\" type can be accessed in the \"types\"\\n'\n' module.\\n'\n'\\n'\n' Instance methods\\n'\n' An instance method object combines a class, a class instance '\n'and\\n'\n' any callable object (normally a user-defined function).\\n'\n'\\n'\n' Special read-only attributes: \"__self__\" is the class '\n'instance\\n'\n' object, \"__func__\" is the function object; \"__doc__\" is the\\n'\n' method\u2019s documentation (same as \"__func__.__doc__\"); '\n'\"__name__\"\\n'\n' is the method name (same as \"__func__.__name__\"); '\n'\"__module__\"\\n'\n' is the name of the module the method was defined in, or '\n'\"None\"\\n'\n' if unavailable.\\n'\n'\\n'\n' Methods also support accessing (but not setting) the '\n'arbitrary\\n'\n' function attributes on the underlying function object.\\n'\n'\\n'\n' User-defined method objects may be created when getting an\\n'\n' attribute of a class (perhaps via an instance of that class), '\n'if\\n'\n' that attribute is a user-defined function object or a class\\n'\n' method object.\\n'\n'\\n'\n' When an instance method object is created by retrieving a '\n'user-\\n'\n' defined function object from a class via one of its '\n'instances,\\n'\n' its \"__self__\" attribute is the instance, and the method '\n'object\\n'\n' is said to be bound. The new method\u2019s \"__func__\" attribute '\n'is\\n'\n' the original function object.\\n'\n'\\n'\n' When an instance method object is created by retrieving a '\n'class\\n'\n' method object from a class or instance, its \"__self__\" '\n'attribute\\n'\n' is the class itself, and its \"__func__\" attribute is the\\n'\n' function object underlying the class method.\\n'\n'\\n'\n' When an instance method object is called, the underlying\\n'\n' function (\"__func__\") is called, inserting the class '\n'instance\\n'\n' (\"__self__\") in front of the argument list. For instance, '\n'when\\n'\n' \"C\" is a class which contains a definition for a function '\n'\"f()\",\\n'\n' and \"x\" is an instance of \"C\", calling \"x.f(1)\" is equivalent '\n'to\\n'\n' calling \"C.f(x, 1)\".\\n'\n'\\n'\n' When an instance method object is derived from a class '\n'method\\n'\n' object, the \u201cclass instance\u201d stored in \"__self__\" will '\n'actually\\n'\n' be the class itself, so that calling either \"x.f(1)\" or '\n'\"C.f(1)\"\\n'\n' is equivalent to calling \"f(C,1)\" where \"f\" is the '\n'underlying\\n'\n' function.\\n'\n'\\n'\n' Note that the transformation from function object to '\n'instance\\n'\n' method object happens each time the attribute is retrieved '\n'from\\n'\n' the instance. In some cases, a fruitful optimization is to\\n'\n' assign the attribute to a local variable and call that local\\n'\n' variable. Also notice that this transformation only happens '\n'for\\n'\n' user-defined functions; other callable objects (and all non-\\n'\n' callable objects) are retrieved without transformation. It '\n'is\\n'\n' also important to note that user-defined functions which are\\n'\n' attributes of a class instance are not converted to bound\\n'\n' methods; this *only* happens when the function is an '\n'attribute\\n'\n' of the class.\\n'\n'\\n'\n' Generator functions\\n'\n' A function or method which uses the \"yield\" statement (see\\n'\n' section The yield statement) is called a *generator '\n'function*.\\n'\n' Such a function, when called, always returns an iterator '\n'object\\n'\n' which can be used to execute the body of the function: '\n'calling\\n'\n' the iterator\u2019s \"iterator.__next__()\" method will cause the\\n'\n' function to execute until it provides a value using the '\n'\"yield\"\\n'\n' statement. When the function executes a \"return\" statement '\n'or\\n'\n' falls off the end, a \"StopIteration\" exception is raised and '\n'the\\n'\n' iterator will have reached the end of the set of values to '\n'be\\n'\n' returned.\\n'\n'\\n'\n' Coroutine functions\\n'\n' A function or method which is defined using \"async def\" is\\n'\n' called a *coroutine function*. Such a function, when '\n'called,\\n'\n' returns a *coroutine* object. It may contain \"await\"\\n'\n' expressions, as well as \"async with\" and \"async for\" '\n'statements.\\n'\n' See also the Coroutine Objects section.\\n'\n'\\n'\n' Asynchronous generator functions\\n'\n' A function or method which is defined using \"async def\" and\\n'\n' which uses the \"yield\" statement is called a *asynchronous\\n'\n' generator function*. Such a function, when called, returns '\n'an\\n'\n' asynchronous iterator object which can be used in an \"async '\n'for\"\\n'\n' statement to execute the body of the function.\\n'\n'\\n'\n' Calling the asynchronous iterator\u2019s \"aiterator.__anext__()\"\\n'\n' method will return an *awaitable* which when awaited will\\n'\n' execute until it provides a value using the \"yield\" '\n'expression.\\n'\n' When the function executes an empty \"return\" statement or '\n'falls\\n'\n' off the end, a \"StopAsyncIteration\" exception is raised and '\n'the\\n'\n' asynchronous iterator will have reached the end of the set '\n'of\\n'\n' values to be yielded.\\n'\n'\\n'\n' Built-in functions\\n'\n' A built-in function object is a wrapper around a C function.\\n'\n' Examples of built-in functions are \"len()\" and \"math.sin()\"\\n'\n' (\"math\" is a standard built-in module). The number and type '\n'of\\n'\n' the arguments are determined by the C function. Special '\n'read-\\n'\n' only attributes: \"__doc__\" is the function\u2019s documentation\\n'\n' string, or \"None\" if unavailable; \"__name__\" is the '\n'function\u2019s\\n'\n' name; \"__self__\" is set to \"None\" (but see the next item);\\n'\n' \"__module__\" is the name of the module the function was '\n'defined\\n'\n' in or \"None\" if unavailable.\\n'\n'\\n'\n' Built-in methods\\n'\n' This is really a different disguise of a built-in function, '\n'this\\n'\n' time containing an object passed to the C function as an\\n'\n' implicit extra argument. An example of a built-in method is\\n'\n' \"alist.append()\", assuming *alist* is a list object. In this\\n'\n' case, the special read-only attribute \"__self__\" is set to '\n'the\\n'\n' object denoted by *alist*.\\n'\n'\\n'\n' Classes\\n'\n' Classes are callable. These objects normally act as '\n'factories\\n'\n' for new instances of themselves, but variations are possible '\n'for\\n'\n' class types that override \"__new__()\". The arguments of the\\n'\n' call are passed to \"__new__()\" and, in the typical case, to\\n'\n' \"__init__()\" to initialize the new instance.\\n'\n'\\n'\n' Class Instances\\n'\n' Instances of arbitrary classes can be made callable by '\n'defining\\n'\n' a \"__call__()\" method in their class.\\n'\n'\\n'\n'Modules\\n'\n' Modules are a basic organizational unit of Python code, and are\\n'\n' created by the import system as invoked either by the \"import\"\\n'\n' statement, or by calling functions such as\\n'\n' \"importlib.import_module()\" and built-in \"__import__()\". A '\n'module\\n'\n' object has a namespace implemented by a dictionary object (this '\n'is\\n'\n' the dictionary referenced by the \"__globals__\" attribute of\\n'\n' functions defined in the module). Attribute references are\\n'\n' translated to lookups in this dictionary, e.g., \"m.x\" is '\n'equivalent\\n'\n' to \"m.__dict__[\"x\"]\". A module object does not contain the code\\n'\n' object used to initialize the module (since it isn\u2019t needed '\n'once\\n'\n' the initialization is done).\\n'\n'\\n'\n' Attribute assignment updates the module\u2019s namespace dictionary,\\n'\n' e.g., \"m.x = 1\" is equivalent to \"m.__dict__[\"x\"] = 1\".\\n'\n'\\n'\n' Predefined (writable) attributes:\\n'\n'\\n'\n' \"__name__\"\\n'\n' The module\u2019s name.\\n'\n'\\n'\n' \"__doc__\"\\n'\n' The module\u2019s documentation string, or \"None\" if '\n'unavailable.\\n'\n'\\n'\n' \"__file__\"\\n'\n' The pathname of the file from which the module was loaded, '\n'if\\n'\n' it was loaded from a file. The \"__file__\" attribute may '\n'be\\n'\n' missing for certain types of modules, such as C modules '\n'that\\n'\n' are statically linked into the interpreter. For '\n'extension\\n'\n' modules loaded dynamically from a shared library, it\u2019s '\n'the\\n'\n' pathname of the shared library file.\\n'\n'\\n'\n' \"__annotations__\"\\n'\n' A dictionary containing *variable annotations* collected\\n'\n' during module body execution. For best practices on '\n'working\\n'\n' with \"__annotations__\", please see Annotations Best\\n'\n' Practices.\\n'\n'\\n'\n' Special read-only attribute: \"__dict__\" is the module\u2019s '\n'namespace\\n'\n' as a dictionary object.\\n'\n'\\n'\n' **CPython implementation detail:** Because of the way CPython\\n'\n' clears module dictionaries, the module dictionary will be '\n'cleared\\n'\n' when the module falls out of scope even if the dictionary still '\n'has\\n'\n' live references. To avoid this, copy the dictionary or keep '\n'the\\n'\n' module around while using its dictionary directly.\\n'\n'\\n'\n'Custom classes\\n'\n' Custom class types are typically created by class definitions '\n'(see\\n'\n' section Class definitions). A class has a namespace implemented '\n'by\\n'\n' a dictionary object. Class attribute references are translated '\n'to\\n'\n' lookups in this dictionary, e.g., \"C.x\" is translated to\\n'\n' \"C.__dict__[\"x\"]\" (although there are a number of hooks which '\n'allow\\n'\n' for other means of locating attributes). When the attribute name '\n'is\\n'\n' not found there, the attribute search continues in the base\\n'\n' classes. This search of the base classes uses the C3 method\\n'\n' resolution order which behaves correctly even in the presence '\n'of\\n'\n' \u2018diamond\u2019 inheritance structures where there are multiple\\n'\n' inheritance paths leading back to a common ancestor. Additional\\n'\n' details on the C3 MRO used by Python can be found in the\\n'\n' documentation accompanying the 2.3 release at\\n'\n' https://www.python.org/download/releases/2.3/mro/.\\n'\n'\\n'\n' When a class attribute reference (for class \"C\", say) would '\n'yield a\\n'\n' class method object, it is transformed into an instance method\\n'\n' object whose \"__self__\" attribute is \"C\". When it would yield '\n'a\\n'\n' static method object, it is transformed into the object wrapped '\n'by\\n'\n' the static method object. See section Implementing Descriptors '\n'for\\n'\n' another way in which attributes retrieved from a class may '\n'differ\\n'\n' from those actually contained in its \"__dict__\".\\n'\n'\\n'\n' Class attribute assignments update the class\u2019s dictionary, '\n'never\\n'\n' the dictionary of a base class.\\n'\n'\\n'\n' A class object can be called (see above) to yield a class '\n'instance\\n'\n' (see below).\\n'\n'\\n'\n' Special attributes:\\n'\n'\\n'\n' \"__name__\"\\n'\n' The class name.\\n'\n'\\n'\n' \"__module__\"\\n'\n' The name of the module in which the class was defined.\\n'\n'\\n'\n' \"__dict__\"\\n'\n' The dictionary containing the class\u2019s namespace.\\n'\n'\\n'\n' \"__bases__\"\\n'\n' A tuple containing the base classes, in the order of '\n'their\\n'\n' occurrence in the base class list.\\n'\n'\\n'\n' \"__doc__\"\\n'\n' The class\u2019s documentation string, or \"None\" if undefined.\\n'\n'\\n'\n' \"__annotations__\"\\n'\n' A dictionary containing *variable annotations* collected\\n'\n' during class body execution. For best practices on '\n'working\\n'\n' with \"__annotations__\", please see Annotations Best\\n'\n' Practices.\\n'\n'\\n'\n'Class instances\\n'\n' A class instance is created by calling a class object (see '\n'above).\\n'\n' A class instance has a namespace implemented as a dictionary '\n'which\\n'\n' is the first place in which attribute references are searched.\\n'\n' When an attribute is not found there, and the instance\u2019s class '\n'has\\n'\n' an attribute by that name, the search continues with the class\\n'\n' attributes. If a class attribute is found that is a '\n'user-defined\\n'\n' function object, it is transformed into an instance method '\n'object\\n'\n' whose \"__self__\" attribute is the instance. Static method and\\n'\n' class method objects are also transformed; see above under\\n'\n' \u201cClasses\u201d. See section Implementing Descriptors for another way '\n'in\\n'\n' which attributes of a class retrieved via its instances may '\n'differ\\n'\n' from the objects actually stored in the class\u2019s \"__dict__\". If '\n'no\\n'\n' class attribute is found, and the object\u2019s class has a\\n'\n' \"__getattr__()\" method, that is called to satisfy the lookup.\\n'\n'\\n'\n' Attribute assignments and deletions update the instance\u2019s\\n'\n' dictionary, never a class\u2019s dictionary. If the class has a\\n'\n' \"__setattr__()\" or \"__delattr__()\" method, this is called '\n'instead\\n'\n' of updating the instance dictionary directly.\\n'\n'\\n'\n' Class instances can pretend to be numbers, sequences, or '\n'mappings\\n'\n' if they have methods with certain special names. See section\\n'\n' Special method names.\\n'\n'\\n'\n' Special attributes: \"__dict__\" is the attribute dictionary;\\n'\n' \"__class__\" is the instance\u2019s class.\\n'\n'\\n'\n'I/O objects (also known as file objects)\\n'\n' A *file object* represents an open file. Various shortcuts are\\n'\n' available to create file objects: the \"open()\" built-in '\n'function,\\n'\n' and also \"os.popen()\", \"os.fdopen()\", and the \"makefile()\" '\n'method\\n'\n' of socket objects (and perhaps by other functions or methods\\n'\n' provided by extension modules).\\n'\n'\\n'\n' The objects \"sys.stdin\", \"sys.stdout\" and \"sys.stderr\" are\\n'\n' initialized to file objects corresponding to the interpreter\u2019s\\n'\n' standard input, output and error streams; they are all open in '\n'text\\n'\n' mode and therefore follow the interface defined by the\\n'\n' \"io.TextIOBase\" abstract class.\\n'\n'\\n'\n'Internal types\\n'\n' A few types used internally by the interpreter are exposed to '\n'the\\n'\n' user. Their definitions may change with future versions of the\\n'\n' interpreter, but they are mentioned here for completeness.\\n'\n'\\n'\n' Code objects\\n'\n' Code objects represent *byte-compiled* executable Python '\n'code,\\n'\n' or *bytecode*. The difference between a code object and a\\n'\n' function object is that the function object contains an '\n'explicit\\n'\n' reference to the function\u2019s globals (the module in which it '\n'was\\n'\n' defined), while a code object contains no context; also the\\n'\n' default argument values are stored in the function object, '\n'not\\n'\n' in the code object (because they represent values calculated '\n'at\\n'\n' run-time). Unlike function objects, code objects are '\n'immutable\\n'\n' and contain no references (directly or indirectly) to '\n'mutable\\n'\n' objects.\\n'\n'\\n'\n' Special read-only attributes: \"co_name\" gives the function '\n'name;\\n'\n' \"co_argcount\" is the total number of positional arguments\\n'\n' (including positional-only arguments and arguments with '\n'default\\n'\n' values); \"co_posonlyargcount\" is the number of '\n'positional-only\\n'\n' arguments (including arguments with default values);\\n'\n' \"co_kwonlyargcount\" is the number of keyword-only arguments\\n'\n' (including arguments with default values); \"co_nlocals\" is '\n'the\\n'\n' number of local variables used by the function (including\\n'\n' arguments); \"co_varnames\" is a tuple containing the names of '\n'the\\n'\n' local variables (starting with the argument names);\\n'\n' \"co_cellvars\" is a tuple containing the names of local '\n'variables\\n'\n' that are referenced by nested functions; \"co_freevars\" is a\\n'\n' tuple containing the names of free variables; \"co_code\" is a\\n'\n' string representing the sequence of bytecode instructions;\\n'\n' \"co_consts\" is a tuple containing the literals used by the\\n'\n' bytecode; \"co_names\" is a tuple containing the names used by '\n'the\\n'\n' bytecode; \"co_filename\" is the filename from which the code '\n'was\\n'\n' compiled; \"co_firstlineno\" is the first line number of the\\n'\n' function; \"co_lnotab\" is a string encoding the mapping from\\n'\n' bytecode offsets to line numbers (for details see the source\\n'\n' code of the interpreter); \"co_stacksize\" is the required '\n'stack\\n'\n' size; \"co_flags\" is an integer encoding a number of flags '\n'for\\n'\n' the interpreter.\\n'\n'\\n'\n' The following flag bits are defined for \"co_flags\": bit '\n'\"0x04\"\\n'\n' is set if the function uses the \"*arguments\" syntax to accept '\n'an\\n'\n' arbitrary number of positional arguments; bit \"0x08\" is set '\n'if\\n'\n' the function uses the \"**keywords\" syntax to accept '\n'arbitrary\\n'\n' keyword arguments; bit \"0x20\" is set if the function is a\\n'\n' generator.\\n'\n'\\n'\n' Future feature declarations (\"from __future__ import '\n'division\")\\n'\n' also use bits in \"co_flags\" to indicate whether a code '\n'object\\n'\n' was compiled with a particular feature enabled: bit \"0x2000\" '\n'is\\n'\n' set if the function was compiled with future division '\n'enabled;\\n'\n' bits \"0x10\" and \"0x1000\" were used in earlier versions of\\n'\n' Python.\\n'\n'\\n'\n' Other bits in \"co_flags\" are reserved for internal use.\\n'\n'\\n'\n' If a code object represents a function, the first item in\\n'\n' \"co_consts\" is the documentation string of the function, or\\n'\n' \"None\" if undefined.\\n'\n'\\n'\n' Frame objects\\n'\n' Frame objects represent execution frames. They may occur in\\n'\n' traceback objects (see below), and are also passed to '\n'registered\\n'\n' trace functions.\\n'\n'\\n'\n' Special read-only attributes: \"f_back\" is to the previous '\n'stack\\n'\n' frame (towards the caller), or \"None\" if this is the bottom\\n'\n' stack frame; \"f_code\" is the code object being executed in '\n'this\\n'\n' frame; \"f_locals\" is the dictionary used to look up local\\n'\n' variables; \"f_globals\" is used for global variables;\\n'\n' \"f_builtins\" is used for built-in (intrinsic) names; '\n'\"f_lasti\"\\n'\n' gives the precise instruction (this is an index into the\\n'\n' bytecode string of the code object).\\n'\n'\\n'\n' Accessing \"f_code\" raises an auditing event '\n'\"object.__getattr__\"\\n'\n' with arguments \"obj\" and \"\"f_code\"\".\\n'\n'\\n'\n' Special writable attributes: \"f_trace\", if not \"None\", is a\\n'\n' function called for various events during code execution '\n'(this\\n'\n' is used by the debugger). Normally an event is triggered for\\n'\n' each new source line - this can be disabled by setting\\n'\n' \"f_trace_lines\" to \"False\".\\n'\n'\\n'\n' Implementations *may* allow per-opcode events to be requested '\n'by\\n'\n' setting \"f_trace_opcodes\" to \"True\". Note that this may lead '\n'to\\n'\n' undefined interpreter behaviour if exceptions raised by the\\n'\n' trace function escape to the function being traced.\\n'\n'\\n'\n' \"f_lineno\" is the current line number of the frame \u2014 writing '\n'to\\n'\n' this from within a trace function jumps to the given line '\n'(only\\n'\n' for the bottom-most frame). A debugger can implement a Jump\\n'\n' command (aka Set Next Statement) by writing to f_lineno.\\n'\n'\\n'\n' Frame objects support one method:\\n'\n'\\n'\n' frame.clear()\\n'\n'\\n'\n' This method clears all references to local variables held '\n'by\\n'\n' the frame. Also, if the frame belonged to a generator, '\n'the\\n'\n' generator is finalized. This helps break reference '\n'cycles\\n'\n' involving frame objects (for example when catching an\\n'\n' exception and storing its traceback for later use).\\n'\n'\\n'\n' \"RuntimeError\" is raised if the frame is currently '\n'executing.\\n'\n'\\n'\n' New in version 3.4.\\n'\n'\\n'\n' Traceback objects\\n'\n' Traceback objects represent a stack trace of an exception. '\n'A\\n'\n' traceback object is implicitly created when an exception '\n'occurs,\\n'\n' and may also be explicitly created by calling\\n'\n' \"types.TracebackType\".\\n'\n'\\n'\n' For implicitly created tracebacks, when the search for an\\n'\n' exception handler unwinds the execution stack, at each '\n'unwound\\n'\n' level a traceback object is inserted in front of the current\\n'\n' traceback. When an exception handler is entered, the stack\\n'\n' trace is made available to the program. (See section The try\\n'\n' statement.) It is accessible as the third item of the tuple\\n'\n' returned by \"sys.exc_info()\", and as the \"__traceback__\"\\n'\n' attribute of the caught exception.\\n'\n'\\n'\n' When the program contains no suitable handler, the stack '\n'trace\\n'\n' is written (nicely formatted) to the standard error stream; '\n'if\\n'\n' the interpreter is interactive, it is also made available to '\n'the\\n'\n' user as \"sys.last_traceback\".\\n'\n'\\n'\n' For explicitly created tracebacks, it is up to the creator '\n'of\\n'\n' the traceback to determine how the \"tb_next\" attributes '\n'should\\n'\n' be linked to form a full stack trace.\\n'\n'\\n'\n' Special read-only attributes: \"tb_frame\" points to the '\n'execution\\n'\n' frame of the current level; \"tb_lineno\" gives the line '\n'number\\n'\n' where the exception occurred; \"tb_lasti\" indicates the '\n'precise\\n'\n' instruction. The line number and last instruction in the\\n'\n' traceback may differ from the line number of its frame object '\n'if\\n'\n' the exception occurred in a \"try\" statement with no matching\\n'\n' except clause or with a finally clause.\\n'\n'\\n'\n' Accessing \"tb_frame\" raises an auditing event\\n'\n' \"object.__getattr__\" with arguments \"obj\" and \"\"tb_frame\"\".\\n'\n'\\n'\n' Special writable attribute: \"tb_next\" is the next level in '\n'the\\n'\n' stack trace (towards the frame where the exception occurred), '\n'or\\n'\n' \"None\" if there is no next level.\\n'\n'\\n'\n' Changed in version 3.7: Traceback objects can now be '\n'explicitly\\n'\n' instantiated from Python code, and the \"tb_next\" attribute '\n'of\\n'\n' existing instances can be updated.\\n'\n'\\n'\n' Slice objects\\n'\n' Slice objects are used to represent slices for '\n'\"__getitem__()\"\\n'\n' methods. They are also created by the built-in \"slice()\"\\n'\n' function.\\n'\n'\\n'\n' Special read-only attributes: \"start\" is the lower bound; '\n'\"stop\"\\n'\n' is the upper bound; \"step\" is the step value; each is \"None\" '\n'if\\n'\n' omitted. These attributes can have any type.\\n'\n'\\n'\n' Slice objects support one method:\\n'\n'\\n'\n' slice.indices(self, length)\\n'\n'\\n'\n' This method takes a single integer argument *length* and\\n'\n' computes information about the slice that the slice '\n'object\\n'\n' would describe if applied to a sequence of *length* '\n'items.\\n'\n' It returns a tuple of three integers; respectively these '\n'are\\n'\n' the *start* and *stop* indices and the *step* or stride\\n'\n' length of the slice. Missing or out-of-bounds indices are\\n'\n' handled in a manner consistent with regular slices.\\n'\n'\\n'\n' Static method objects\\n'\n' Static method objects provide a way of defeating the\\n'\n' transformation of function objects to method objects '\n'described\\n'\n' above. A static method object is a wrapper around any other\\n'\n' object, usually a user-defined method object. When a static\\n'\n' method object is retrieved from a class or a class instance, '\n'the\\n'\n' object actually returned is the wrapped object, which is not\\n'\n' subject to any further transformation. Static method objects '\n'are\\n'\n' also callable. Static method objects are created by the '\n'built-in\\n'\n' \"staticmethod()\" constructor.\\n'\n'\\n'\n' Class method objects\\n'\n' A class method object, like a static method object, is a '\n'wrapper\\n'\n' around another object that alters the way in which that '\n'object\\n'\n' is retrieved from classes and class instances. The behaviour '\n'of\\n'\n' class method objects upon such retrieval is described above,\\n'\n' under \u201cUser-defined methods\u201d. Class method objects are '\n'created\\n'\n' by the built-in \"classmethod()\" constructor.\\n',\n'typesfunctions':'Functions\\n'\n'*********\\n'\n'\\n'\n'Function objects are created by function definitions. The '\n'only\\n'\n'operation on a function object is to call it: '\n'\"func(argument-list)\".\\n'\n'\\n'\n'There are really two flavors of function objects: built-in '\n'functions\\n'\n'and user-defined functions. Both support the same '\n'operation (to call\\n'\n'the function), but the implementation is different, hence '\n'the\\n'\n'different object types.\\n'\n'\\n'\n'See Function definitions for more information.\\n',\n'typesmapping':'Mapping Types \u2014 \"dict\"\\n'\n'**********************\\n'\n'\\n'\n'A *mapping* object maps *hashable* values to arbitrary '\n'objects.\\n'\n'Mappings are mutable objects. There is currently only one '\n'standard\\n'\n'mapping type, the *dictionary*. (For other containers see '\n'the built-\\n'\n'in \"list\", \"set\", and \"tuple\" classes, and the \"collections\" '\n'module.)\\n'\n'\\n'\n'A dictionary\u2019s keys are *almost* arbitrary values. Values '\n'that are\\n'\n'not *hashable*, that is, values containing lists, '\n'dictionaries or\\n'\n'other mutable types (that are compared by value rather than '\n'by object\\n'\n'identity) may not be used as keys. Numeric types used for '\n'keys obey\\n'\n'the normal rules for numeric comparison: if two numbers '\n'compare equal\\n'\n'(such as \"1\" and \"1.0\") then they can be used '\n'interchangeably to index\\n'\n'the same dictionary entry. (Note however, that since '\n'computers store\\n'\n'floating-point numbers as approximations it is usually '\n'unwise to use\\n'\n'them as dictionary keys.)\\n'\n'\\n'\n'Dictionaries can be created by placing a comma-separated '\n'list of \"key:\\n'\n'value\" pairs within braces, for example: \"{\\'jack\\': 4098, '\n\"'sjoerd':\\n\"\n'4127}\" or \"{4098: \\'jack\\', 4127: \\'sjoerd\\'}\", or by the '\n'\"dict\"\\n'\n'constructor.\\n'\n'\\n'\n'class dict(**kwarg)\\n'\n'class dict(mapping, **kwarg)\\n'\n'class dict(iterable, **kwarg)\\n'\n'\\n'\n' Return a new dictionary initialized from an optional '\n'positional\\n'\n' argument and a possibly empty set of keyword arguments.\\n'\n'\\n'\n' Dictionaries can be created by several means:\\n'\n'\\n'\n' * Use a comma-separated list of \"key: value\" pairs within '\n'braces:\\n'\n' \"{\\'jack\\': 4098, \\'sjoerd\\': 4127}\" or \"{4098: '\n\"'jack', 4127:\\n\"\n' \\'sjoerd\\'}\"\\n'\n'\\n'\n' * Use a dict comprehension: \"{}\", \"{x: x ** 2 for x in '\n'range(10)}\"\\n'\n'\\n'\n' * Use the type constructor: \"dict()\", \"dict([(\\'foo\\', '\n\"100), ('bar',\\n\"\n' 200)])\", \"dict(foo=100, bar=200)\"\\n'\n'\\n'\n' If no positional argument is given, an empty dictionary '\n'is created.\\n'\n' If a positional argument is given and it is a mapping '\n'object, a\\n'\n' dictionary is created with the same key-value pairs as '\n'the mapping\\n'\n' object. Otherwise, the positional argument must be an '\n'*iterable*\\n'\n' object. Each item in the iterable must itself be an '\n'iterable with\\n'\n' exactly two objects. The first object of each item '\n'becomes a key\\n'\n' in the new dictionary, and the second object the '\n'corresponding\\n'\n' value. If a key occurs more than once, the last value '\n'for that key\\n'\n' becomes the corresponding value in the new dictionary.\\n'\n'\\n'\n' If keyword arguments are given, the keyword arguments and '\n'their\\n'\n' values are added to the dictionary created from the '\n'positional\\n'\n' argument. If a key being added is already present, the '\n'value from\\n'\n' the keyword argument replaces the value from the '\n'positional\\n'\n' argument.\\n'\n'\\n'\n' To illustrate, the following examples all return a '\n'dictionary equal\\n'\n' to \"{\"one\": 1, \"two\": 2, \"three\": 3}\":\\n'\n'\\n'\n' >>> a = dict(one=1, two=2, three=3)\\n'\n\" >>> b = {'one': 1, 'two': 2, 'three': 3}\\n\"\n\" >>> c = dict(zip(['one', 'two', 'three'], [1, 2, 3]))\\n\"\n\" >>> d = dict([('two', 2), ('one', 1), ('three', 3)])\\n\"\n\" >>> e = dict({'three': 3, 'one': 1, 'two': 2})\\n\"\n\" >>> f = dict({'one': 1, 'three': 3}, two=2)\\n\"\n' >>> a == b == c == d == e == f\\n'\n' True\\n'\n'\\n'\n' Providing keyword arguments as in the first example only '\n'works for\\n'\n' keys that are valid Python identifiers. Otherwise, any '\n'valid keys\\n'\n' can be used.\\n'\n'\\n'\n' These are the operations that dictionaries support (and '\n'therefore,\\n'\n' custom mapping types should support too):\\n'\n'\\n'\n' list(d)\\n'\n'\\n'\n' Return a list of all the keys used in the dictionary '\n'*d*.\\n'\n'\\n'\n' len(d)\\n'\n'\\n'\n' Return the number of items in the dictionary *d*.\\n'\n'\\n'\n' d[key]\\n'\n'\\n'\n' Return the item of *d* with key *key*. Raises a '\n'\"KeyError\" if\\n'\n' *key* is not in the map.\\n'\n'\\n'\n' If a subclass of dict defines a method \"__missing__()\" '\n'and *key*\\n'\n' is not present, the \"d[key]\" operation calls that '\n'method with\\n'\n' the key *key* as argument. The \"d[key]\" operation '\n'then returns\\n'\n' or raises whatever is returned or raised by the\\n'\n' \"__missing__(key)\" call. No other operations or '\n'methods invoke\\n'\n' \"__missing__()\". If \"__missing__()\" is not defined, '\n'\"KeyError\"\\n'\n' is raised. \"__missing__()\" must be a method; it cannot '\n'be an\\n'\n' instance variable:\\n'\n'\\n'\n' >>> class Counter(dict):\\n'\n' ... def __missing__(self, key):\\n'\n' ... return 0\\n'\n' >>> c = Counter()\\n'\n\" >>> c['red']\\n\"\n' 0\\n'\n\" >>> c['red'] += 1\\n\"\n\" >>> c['red']\\n\"\n' 1\\n'\n'\\n'\n' The example above shows part of the implementation of\\n'\n' \"collections.Counter\". A different \"__missing__\" '\n'method is used\\n'\n' by \"collections.defaultdict\".\\n'\n'\\n'\n' d[key] = value\\n'\n'\\n'\n' Set \"d[key]\" to *value*.\\n'\n'\\n'\n' del d[key]\\n'\n'\\n'\n' Remove \"d[key]\" from *d*. Raises a \"KeyError\" if '\n'*key* is not\\n'\n' in the map.\\n'\n'\\n'\n' key in d\\n'\n'\\n'\n' Return \"True\" if *d* has a key *key*, else \"False\".\\n'\n'\\n'\n' key not in d\\n'\n'\\n'\n' Equivalent to \"not key in d\".\\n'\n'\\n'\n' iter(d)\\n'\n'\\n'\n' Return an iterator over the keys of the dictionary. '\n'This is a\\n'\n' shortcut for \"iter(d.keys())\".\\n'\n'\\n'\n' clear()\\n'\n'\\n'\n' Remove all items from the dictionary.\\n'\n'\\n'\n' copy()\\n'\n'\\n'\n' Return a shallow copy of the dictionary.\\n'\n'\\n'\n' classmethod fromkeys(iterable[, value])\\n'\n'\\n'\n' Create a new dictionary with keys from *iterable* and '\n'values set\\n'\n' to *value*.\\n'\n'\\n'\n' \"fromkeys()\" is a class method that returns a new '\n'dictionary.\\n'\n' *value* defaults to \"None\". All of the values refer '\n'to just a\\n'\n' single instance, so it generally doesn\u2019t make sense '\n'for *value*\\n'\n' to be a mutable object such as an empty list. To get '\n'distinct\\n'\n' values, use a dict comprehension instead.\\n'\n'\\n'\n' get(key[, default])\\n'\n'\\n'\n' Return the value for *key* if *key* is in the '\n'dictionary, else\\n'\n' *default*. If *default* is not given, it defaults to '\n'\"None\", so\\n'\n' that this method never raises a \"KeyError\".\\n'\n'\\n'\n' items()\\n'\n'\\n'\n' Return a new view of the dictionary\u2019s items (\"(key, '\n'value)\"\\n'\n' pairs). See the documentation of view objects.\\n'\n'\\n'\n' keys()\\n'\n'\\n'\n' Return a new view of the dictionary\u2019s keys. See the\\n'\n' documentation of view objects.\\n'\n'\\n'\n' pop(key[, default])\\n'\n'\\n'\n' If *key* is in the dictionary, remove it and return '\n'its value,\\n'\n' else return *default*. If *default* is not given and '\n'*key* is\\n'\n' not in the dictionary, a \"KeyError\" is raised.\\n'\n'\\n'\n' popitem()\\n'\n'\\n'\n' Remove and return a \"(key, value)\" pair from the '\n'dictionary.\\n'\n' Pairs are returned in LIFO (last-in, first-out) '\n'order.\\n'\n'\\n'\n' \"popitem()\" is useful to destructively iterate over a\\n'\n' dictionary, as often used in set algorithms. If the '\n'dictionary\\n'\n' is empty, calling \"popitem()\" raises a \"KeyError\".\\n'\n'\\n'\n' Changed in version 3.7: LIFO order is now guaranteed. '\n'In prior\\n'\n' versions, \"popitem()\" would return an arbitrary '\n'key/value pair.\\n'\n'\\n'\n' reversed(d)\\n'\n'\\n'\n' Return a reverse iterator over the keys of the '\n'dictionary. This\\n'\n' is a shortcut for \"reversed(d.keys())\".\\n'\n'\\n'\n' New in version 3.8.\\n'\n'\\n'\n' setdefault(key[, default])\\n'\n'\\n'\n' If *key* is in the dictionary, return its value. If '\n'not, insert\\n'\n' *key* with a value of *default* and return *default*. '\n'*default*\\n'\n' defaults to \"None\".\\n'\n'\\n'\n' update([other])\\n'\n'\\n'\n' Update the dictionary with the key/value pairs from '\n'*other*,\\n'\n' overwriting existing keys. Return \"None\".\\n'\n'\\n'\n' \"update()\" accepts either another dictionary object or '\n'an\\n'\n' iterable of key/value pairs (as tuples or other '\n'iterables of\\n'\n' length two). If keyword arguments are specified, the '\n'dictionary\\n'\n' is then updated with those key/value pairs: '\n'\"d.update(red=1,\\n'\n' blue=2)\".\\n'\n'\\n'\n' values()\\n'\n'\\n'\n' Return a new view of the dictionary\u2019s values. See '\n'the\\n'\n' documentation of view objects.\\n'\n'\\n'\n' An equality comparison between one \"dict.values()\" '\n'view and\\n'\n' another will always return \"False\". This also applies '\n'when\\n'\n' comparing \"dict.values()\" to itself:\\n'\n'\\n'\n\" >>> d = {'a': 1}\\n\"\n' >>> d.values() == d.values()\\n'\n' False\\n'\n'\\n'\n' d | other\\n'\n'\\n'\n' Create a new dictionary with the merged keys and '\n'values of *d*\\n'\n' and *other*, which must both be dictionaries. The '\n'values of\\n'\n' *other* take priority when *d* and *other* share '\n'keys.\\n'\n'\\n'\n' New in version 3.9.\\n'\n'\\n'\n' d |= other\\n'\n'\\n'\n' Update the dictionary *d* with keys and values from '\n'*other*,\\n'\n' which may be either a *mapping* or an *iterable* of '\n'key/value\\n'\n' pairs. The values of *other* take priority when *d* '\n'and *other*\\n'\n' share keys.\\n'\n'\\n'\n' New in version 3.9.\\n'\n'\\n'\n' Dictionaries compare equal if and only if they have the '\n'same \"(key,\\n'\n' value)\" pairs (regardless of ordering). Order comparisons '\n'(\u2018<\u2019,\\n'\n' \u2018<=\u2019, \u2018>=\u2019, \u2018>\u2019) raise \"TypeError\".\\n'\n'\\n'\n' Dictionaries preserve insertion order. Note that '\n'updating a key\\n'\n' does not affect the order. Keys added after deletion are '\n'inserted\\n'\n' at the end.\\n'\n'\\n'\n' >>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\\n'\n' >>> d\\n'\n\" {'one': 1, 'two': 2, 'three': 3, 'four': 4}\\n\"\n' >>> list(d)\\n'\n\" ['one', 'two', 'three', 'four']\\n\"\n' >>> list(d.values())\\n'\n' [1, 2, 3, 4]\\n'\n' >>> d[\"one\"] = 42\\n'\n' >>> d\\n'\n\" {'one': 42, 'two': 2, 'three': 3, 'four': 4}\\n\"\n' >>> del d[\"two\"]\\n'\n' >>> d[\"two\"] = None\\n'\n' >>> d\\n'\n\" {'one': 42, 'three': 3, 'four': 4, 'two': None}\\n\"\n'\\n'\n' Changed in version 3.7: Dictionary order is guaranteed to '\n'be\\n'\n' insertion order. This behavior was an implementation '\n'detail of\\n'\n' CPython from 3.6.\\n'\n'\\n'\n' Dictionaries and dictionary views are reversible.\\n'\n'\\n'\n' >>> d = {\"one\": 1, \"two\": 2, \"three\": 3, \"four\": 4}\\n'\n' >>> d\\n'\n\" {'one': 1, 'two': 2, 'three': 3, 'four': 4}\\n\"\n' >>> list(reversed(d))\\n'\n\" ['four', 'three', 'two', 'one']\\n\"\n' >>> list(reversed(d.values()))\\n'\n' [4, 3, 2, 1]\\n'\n' >>> list(reversed(d.items()))\\n'\n\" [('four', 4), ('three', 3), ('two', 2), ('one', 1)]\\n\"\n'\\n'\n' Changed in version 3.8: Dictionaries are now reversible.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' \"types.MappingProxyType\" can be used to create a read-only '\n'view of a\\n'\n' \"dict\".\\n'\n'\\n'\n'\\n'\n'Dictionary view objects\\n'\n'=======================\\n'\n'\\n'\n'The objects returned by \"dict.keys()\", \"dict.values()\" and\\n'\n'\"dict.items()\" are *view objects*. They provide a dynamic '\n'view on the\\n'\n'dictionary\u2019s entries, which means that when the dictionary '\n'changes,\\n'\n'the view reflects these changes.\\n'\n'\\n'\n'Dictionary views can be iterated over to yield their '\n'respective data,\\n'\n'and support membership tests:\\n'\n'\\n'\n'len(dictview)\\n'\n'\\n'\n' Return the number of entries in the dictionary.\\n'\n'\\n'\n'iter(dictview)\\n'\n'\\n'\n' Return an iterator over the keys, values or items '\n'(represented as\\n'\n' tuples of \"(key, value)\") in the dictionary.\\n'\n'\\n'\n' Keys and values are iterated over in insertion order. '\n'This allows\\n'\n' the creation of \"(value, key)\" pairs using \"zip()\": '\n'\"pairs =\\n'\n' zip(d.values(), d.keys())\". Another way to create the '\n'same list is\\n'\n' \"pairs = [(v, k) for (k, v) in d.items()]\".\\n'\n'\\n'\n' Iterating views while adding or deleting entries in the '\n'dictionary\\n'\n' may raise a \"RuntimeError\" or fail to iterate over all '\n'entries.\\n'\n'\\n'\n' Changed in version 3.7: Dictionary order is guaranteed to '\n'be\\n'\n' insertion order.\\n'\n'\\n'\n'x in dictview\\n'\n'\\n'\n' Return \"True\" if *x* is in the underlying dictionary\u2019s '\n'keys, values\\n'\n' or items (in the latter case, *x* should be a \"(key, '\n'value)\"\\n'\n' tuple).\\n'\n'\\n'\n'reversed(dictview)\\n'\n'\\n'\n' Return a reverse iterator over the keys, values or items '\n'of the\\n'\n' dictionary. The view will be iterated in reverse order of '\n'the\\n'\n' insertion.\\n'\n'\\n'\n' Changed in version 3.8: Dictionary views are now '\n'reversible.\\n'\n'\\n'\n'dictview.mapping\\n'\n'\\n'\n' Return a \"types.MappingProxyType\" that wraps the '\n'original\\n'\n' dictionary to which the view refers.\\n'\n'\\n'\n' New in version 3.10.\\n'\n'\\n'\n'Keys views are set-like since their entries are unique and '\n'hashable.\\n'\n'If all values are hashable, so that \"(key, value)\" pairs are '\n'unique\\n'\n'and hashable, then the items view is also set-like. (Values '\n'views are\\n'\n'not treated as set-like since the entries are generally not '\n'unique.)\\n'\n'For set-like views, all of the operations defined for the '\n'abstract\\n'\n'base class \"collections.abc.Set\" are available (for example, '\n'\"==\",\\n'\n'\"<\", or \"^\").\\n'\n'\\n'\n'An example of dictionary view usage:\\n'\n'\\n'\n\" >>> dishes = {'eggs': 2, 'sausage': 1, 'bacon': 1, \"\n\"'spam': 500}\\n\"\n' >>> keys = dishes.keys()\\n'\n' >>> values = dishes.values()\\n'\n'\\n'\n' >>> # iteration\\n'\n' >>> n = 0\\n'\n' >>> for val in values:\\n'\n' ... n += val\\n'\n' >>> print(n)\\n'\n' 504\\n'\n'\\n'\n' >>> # keys and values are iterated over in the same order '\n'(insertion order)\\n'\n' >>> list(keys)\\n'\n\" ['eggs', 'sausage', 'bacon', 'spam']\\n\"\n' >>> list(values)\\n'\n' [2, 1, 1, 500]\\n'\n'\\n'\n' >>> # view objects are dynamic and reflect dict changes\\n'\n\" >>> del dishes['eggs']\\n\"\n\" >>> del dishes['sausage']\\n\"\n' >>> list(keys)\\n'\n\" ['bacon', 'spam']\\n\"\n'\\n'\n' >>> # set operations\\n'\n\" >>> keys & {'eggs', 'bacon', 'salad'}\\n\"\n\" {'bacon'}\\n\"\n\" >>> keys ^ {'sausage', 'juice'}\\n\"\n\" {'juice', 'sausage', 'bacon', 'spam'}\\n\"\n'\\n'\n' >>> # get back a read-only proxy for the original '\n'dictionary\\n'\n' >>> values.mapping\\n'\n\" mappingproxy({'eggs': 2, 'sausage': 1, 'bacon': 1, \"\n\"'spam': 500})\\n\"\n\" >>> values.mapping['spam']\\n\"\n' 500\\n',\n'typesmethods':'Methods\\n'\n'*******\\n'\n'\\n'\n'Methods are functions that are called using the attribute '\n'notation.\\n'\n'There are two flavors: built-in methods (such as \"append()\" '\n'on lists)\\n'\n'and class instance methods. Built-in methods are described '\n'with the\\n'\n'types that support them.\\n'\n'\\n'\n'If you access a method (a function defined in a class '\n'namespace)\\n'\n'through an instance, you get a special object: a *bound '\n'method* (also\\n'\n'called *instance method*) object. When called, it will add '\n'the \"self\"\\n'\n'argument to the argument list. Bound methods have two '\n'special read-\\n'\n'only attributes: \"m.__self__\" is the object on which the '\n'method\\n'\n'operates, and \"m.__func__\" is the function implementing the '\n'method.\\n'\n'Calling \"m(arg-1, arg-2, ..., arg-n)\" is completely '\n'equivalent to\\n'\n'calling \"m.__func__(m.__self__, arg-1, arg-2, ..., arg-n)\".\\n'\n'\\n'\n'Like function objects, bound method objects support getting '\n'arbitrary\\n'\n'attributes. However, since method attributes are actually '\n'stored on\\n'\n'the underlying function object (\"meth.__func__\"), setting '\n'method\\n'\n'attributes on bound methods is disallowed. Attempting to '\n'set an\\n'\n'attribute on a method results in an \"AttributeError\" being '\n'raised. In\\n'\n'order to set a method attribute, you need to explicitly set '\n'it on the\\n'\n'underlying function object:\\n'\n'\\n'\n' >>> class C:\\n'\n' ... def method(self):\\n'\n' ... pass\\n'\n' ...\\n'\n' >>> c = C()\\n'\n\" >>> c.method.whoami = 'my name is method' # can't set on \"\n'the method\\n'\n' Traceback (most recent call last):\\n'\n' File \"\", line 1, in \\n'\n\" AttributeError: 'method' object has no attribute \"\n\"'whoami'\\n\"\n\" >>> c.method.__func__.whoami = 'my name is method'\\n\"\n' >>> c.method.whoami\\n'\n\" 'my name is method'\\n\"\n'\\n'\n'See The standard type hierarchy for more information.\\n',\n'typesmodules':'Modules\\n'\n'*******\\n'\n'\\n'\n'The only special operation on a module is attribute access: '\n'\"m.name\",\\n'\n'where *m* is a module and *name* accesses a name defined in '\n'*m*\u2019s\\n'\n'symbol table. Module attributes can be assigned to. (Note '\n'that the\\n'\n'\"import\" statement is not, strictly speaking, an operation '\n'on a module\\n'\n'object; \"import foo\" does not require a module object named '\n'*foo* to\\n'\n'exist, rather it requires an (external) *definition* for a '\n'module\\n'\n'named *foo* somewhere.)\\n'\n'\\n'\n'A special attribute of every module is \"__dict__\". This is '\n'the\\n'\n'dictionary containing the module\u2019s symbol table. Modifying '\n'this\\n'\n'dictionary will actually change the module\u2019s symbol table, '\n'but direct\\n'\n'assignment to the \"__dict__\" attribute is not possible (you '\n'can write\\n'\n'\"m.__dict__[\\'a\\'] = 1\", which defines \"m.a\" to be \"1\", but '\n'you can\u2019t\\n'\n'write \"m.__dict__ = {}\"). Modifying \"__dict__\" directly is '\n'not\\n'\n'recommended.\\n'\n'\\n'\n'Modules built into the interpreter are written like this: '\n'\"\". If loaded from a file, they are '\n'written as\\n'\n'\"\".\\n',\n'typesseq':'Sequence Types \u2014 \"list\", \"tuple\", \"range\"\\n'\n'*****************************************\\n'\n'\\n'\n'There are three basic sequence types: lists, tuples, and range\\n'\n'objects. Additional sequence types tailored for processing of '\n'binary\\n'\n'data and text strings are described in dedicated sections.\\n'\n'\\n'\n'\\n'\n'Common Sequence Operations\\n'\n'==========================\\n'\n'\\n'\n'The operations in the following table are supported by most '\n'sequence\\n'\n'types, both mutable and immutable. The '\n'\"collections.abc.Sequence\" ABC\\n'\n'is provided to make it easier to correctly implement these '\n'operations\\n'\n'on custom sequence types.\\n'\n'\\n'\n'This table lists the sequence operations sorted in ascending '\n'priority.\\n'\n'In the table, *s* and *t* are sequences of the same type, *n*, '\n'*i*,\\n'\n'*j* and *k* are integers and *x* is an arbitrary object that '\n'meets any\\n'\n'type and value restrictions imposed by *s*.\\n'\n'\\n'\n'The \"in\" and \"not in\" operations have the same priorities as '\n'the\\n'\n'comparison operations. The \"+\" (concatenation) and \"*\" '\n'(repetition)\\n'\n'operations have the same priority as the corresponding numeric\\n'\n'operations. [3]\\n'\n'\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| Operation | Result '\n'| Notes |\\n'\n'|============================|==================================|============|\\n'\n'| \"x in s\" | \"True\" if an item of *s* is '\n'| (1) |\\n'\n'| | equal to *x*, else \"False\" '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"x not in s\" | \"False\" if an item of *s* is '\n'| (1) |\\n'\n'| | equal to *x*, else \"True\" '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"s + t\" | the concatenation of *s* and *t* '\n'| (6)(7) |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"s * n\" or \"n * s\" | equivalent to adding *s* to '\n'| (2)(7) |\\n'\n'| | itself *n* times '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"s[i]\" | *i*th item of *s*, origin 0 '\n'| (3) |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"s[i:j]\" | slice of *s* from *i* to *j* '\n'| (3)(4) |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"s[i:j:k]\" | slice of *s* from *i* to *j* '\n'| (3)(5) |\\n'\n'| | with step *k* '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"len(s)\" | length of *s* '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"min(s)\" | smallest item of *s* '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"max(s)\" | largest item of *s* '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"s.index(x[, i[, j]])\" | index of the first occurrence of '\n'| (8) |\\n'\n'| | *x* in *s* (at or after index '\n'| |\\n'\n'| | *i* and before index *j*) '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'| \"s.count(x)\" | total number of occurrences of '\n'| |\\n'\n'| | *x* in *s* '\n'| |\\n'\n'+----------------------------+----------------------------------+------------+\\n'\n'\\n'\n'Sequences of the same type also support comparisons. In '\n'particular,\\n'\n'tuples and lists are compared lexicographically by comparing\\n'\n'corresponding elements. This means that to compare equal, every\\n'\n'element must compare equal and the two sequences must be of the '\n'same\\n'\n'type and have the same length. (For full details see '\n'Comparisons in\\n'\n'the language reference.)\\n'\n'\\n'\n'Notes:\\n'\n'\\n'\n'1. While the \"in\" and \"not in\" operations are used only for '\n'simple\\n'\n' containment testing in the general case, some specialised '\n'sequences\\n'\n' (such as \"str\", \"bytes\" and \"bytearray\") also use them for\\n'\n' subsequence testing:\\n'\n'\\n'\n' >>> \"gg\" in \"eggs\"\\n'\n' True\\n'\n'\\n'\n'2. Values of *n* less than \"0\" are treated as \"0\" (which yields '\n'an\\n'\n' empty sequence of the same type as *s*). Note that items in '\n'the\\n'\n' sequence *s* are not copied; they are referenced multiple '\n'times.\\n'\n' This often haunts new Python programmers; consider:\\n'\n'\\n'\n' >>> lists = [[]] * 3\\n'\n' >>> lists\\n'\n' [[], [], []]\\n'\n' >>> lists[0].append(3)\\n'\n' >>> lists\\n'\n' [[3], [3], [3]]\\n'\n'\\n'\n' What has happened is that \"[[]]\" is a one-element list '\n'containing\\n'\n' an empty list, so all three elements of \"[[]] * 3\" are '\n'references\\n'\n' to this single empty list. Modifying any of the elements of\\n'\n' \"lists\" modifies this single list. You can create a list of\\n'\n' different lists this way:\\n'\n'\\n'\n' >>> lists = [[] for i in range(3)]\\n'\n' >>> lists[0].append(3)\\n'\n' >>> lists[1].append(5)\\n'\n' >>> lists[2].append(7)\\n'\n' >>> lists\\n'\n' [[3], [5], [7]]\\n'\n'\\n'\n' Further explanation is available in the FAQ entry How do I '\n'create a\\n'\n' multidimensional list?.\\n'\n'\\n'\n'3. If *i* or *j* is negative, the index is relative to the end '\n'of\\n'\n' sequence *s*: \"len(s) + i\" or \"len(s) + j\" is substituted. '\n'But\\n'\n' note that \"-0\" is still \"0\".\\n'\n'\\n'\n'4. The slice of *s* from *i* to *j* is defined as the sequence '\n'of\\n'\n' items with index *k* such that \"i <= k < j\". If *i* or *j* '\n'is\\n'\n' greater than \"len(s)\", use \"len(s)\". If *i* is omitted or '\n'\"None\",\\n'\n' use \"0\". If *j* is omitted or \"None\", use \"len(s)\". If *i* '\n'is\\n'\n' greater than or equal to *j*, the slice is empty.\\n'\n'\\n'\n'5. The slice of *s* from *i* to *j* with step *k* is defined as '\n'the\\n'\n' sequence of items with index \"x = i + n*k\" such that \"0 <= n '\n'<\\n'\n' (j-i)/k\". In other words, the indices are \"i\", \"i+k\", '\n'\"i+2*k\",\\n'\n' \"i+3*k\" and so on, stopping when *j* is reached (but never\\n'\n' including *j*). When *k* is positive, *i* and *j* are '\n'reduced to\\n'\n' \"len(s)\" if they are greater. When *k* is negative, *i* and '\n'*j* are\\n'\n' reduced to \"len(s) - 1\" if they are greater. If *i* or *j* '\n'are\\n'\n' omitted or \"None\", they become \u201cend\u201d values (which end '\n'depends on\\n'\n' the sign of *k*). Note, *k* cannot be zero. If *k* is '\n'\"None\", it\\n'\n' is treated like \"1\".\\n'\n'\\n'\n'6. Concatenating immutable sequences always results in a new '\n'object.\\n'\n' This means that building up a sequence by repeated '\n'concatenation\\n'\n' will have a quadratic runtime cost in the total sequence '\n'length.\\n'\n' To get a linear runtime cost, you must switch to one of the\\n'\n' alternatives below:\\n'\n'\\n'\n' * if concatenating \"str\" objects, you can build a list and '\n'use\\n'\n' \"str.join()\" at the end or else write to an \"io.StringIO\"\\n'\n' instance and retrieve its value when complete\\n'\n'\\n'\n' * if concatenating \"bytes\" objects, you can similarly use\\n'\n' \"bytes.join()\" or \"io.BytesIO\", or you can do in-place\\n'\n' concatenation with a \"bytearray\" object. \"bytearray\" '\n'objects are\\n'\n' mutable and have an efficient overallocation mechanism\\n'\n'\\n'\n' * if concatenating \"tuple\" objects, extend a \"list\" instead\\n'\n'\\n'\n' * for other types, investigate the relevant class '\n'documentation\\n'\n'\\n'\n'7. Some sequence types (such as \"range\") only support item '\n'sequences\\n'\n' that follow specific patterns, and hence don\u2019t support '\n'sequence\\n'\n' concatenation or repetition.\\n'\n'\\n'\n'8. \"index\" raises \"ValueError\" when *x* is not found in *s*. Not '\n'all\\n'\n' implementations support passing the additional arguments *i* '\n'and\\n'\n' *j*. These arguments allow efficient searching of subsections '\n'of\\n'\n' the sequence. Passing the extra arguments is roughly '\n'equivalent to\\n'\n' using \"s[i:j].index(x)\", only without copying any data and '\n'with the\\n'\n' returned index being relative to the start of the sequence '\n'rather\\n'\n' than the start of the slice.\\n'\n'\\n'\n'\\n'\n'Immutable Sequence Types\\n'\n'========================\\n'\n'\\n'\n'The only operation that immutable sequence types generally '\n'implement\\n'\n'that is not also implemented by mutable sequence types is '\n'support for\\n'\n'the \"hash()\" built-in.\\n'\n'\\n'\n'This support allows immutable sequences, such as \"tuple\" '\n'instances, to\\n'\n'be used as \"dict\" keys and stored in \"set\" and \"frozenset\" '\n'instances.\\n'\n'\\n'\n'Attempting to hash an immutable sequence that contains '\n'unhashable\\n'\n'values will result in \"TypeError\".\\n'\n'\\n'\n'\\n'\n'Mutable Sequence Types\\n'\n'======================\\n'\n'\\n'\n'The operations in the following table are defined on mutable '\n'sequence\\n'\n'types. The \"collections.abc.MutableSequence\" ABC is provided to '\n'make\\n'\n'it easier to correctly implement these operations on custom '\n'sequence\\n'\n'types.\\n'\n'\\n'\n'In the table *s* is an instance of a mutable sequence type, *t* '\n'is any\\n'\n'iterable object and *x* is an arbitrary object that meets any '\n'type and\\n'\n'value restrictions imposed by *s* (for example, \"bytearray\" '\n'only\\n'\n'accepts integers that meet the value restriction \"0 <= x <= '\n'255\").\\n'\n'\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| Operation | '\n'Result | Notes |\\n'\n'|================================|==================================|=======================|\\n'\n'| \"s[i] = x\" | item *i* of *s* is replaced '\n'by | |\\n'\n'| | '\n'*x* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s[i:j] = t\" | slice of *s* from *i* to *j* '\n'is | |\\n'\n'| | replaced by the contents of '\n'the | |\\n'\n'| | iterable '\n'*t* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"del s[i:j]\" | same as \"s[i:j] = '\n'[]\" | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s[i:j:k] = t\" | the elements of \"s[i:j:k]\" '\n'are | (1) |\\n'\n'| | replaced by those of '\n'*t* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"del s[i:j:k]\" | removes the elements '\n'of | |\\n'\n'| | \"s[i:j:k]\" from the '\n'list | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.append(x)\" | appends *x* to the end of '\n'the | |\\n'\n'| | sequence (same '\n'as | |\\n'\n'| | \"s[len(s):len(s)] = '\n'[x]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.clear()\" | removes all items from *s* '\n'(same | (5) |\\n'\n'| | as \"del '\n's[:]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.copy()\" | creates a shallow copy of '\n'*s* | (5) |\\n'\n'| | (same as '\n'\"s[:]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.extend(t)\" or \"s += t\" | extends *s* with the contents '\n'of | |\\n'\n'| | *t* (for the most part the '\n'same | |\\n'\n'| | as \"s[len(s):len(s)] = '\n't\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s *= n\" | updates *s* with its '\n'contents | (6) |\\n'\n'| | repeated *n* '\n'times | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.insert(i, x)\" | inserts *x* into *s* at '\n'the | |\\n'\n'| | index given by *i* (same '\n'as | |\\n'\n'| | \"s[i:i] = '\n'[x]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.pop()\" or \"s.pop(i)\" | retrieves the item at *i* '\n'and | (2) |\\n'\n'| | also removes it from '\n'*s* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.remove(x)\" | remove the first item from '\n'*s* | (3) |\\n'\n'| | where \"s[i]\" is equal to '\n'*x* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.reverse()\" | reverses the items of *s* '\n'in | (4) |\\n'\n'| | '\n'place | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'\\n'\n'Notes:\\n'\n'\\n'\n'1. *t* must have the same length as the slice it is replacing.\\n'\n'\\n'\n'2. The optional argument *i* defaults to \"-1\", so that by '\n'default the\\n'\n' last item is removed and returned.\\n'\n'\\n'\n'3. \"remove()\" raises \"ValueError\" when *x* is not found in *s*.\\n'\n'\\n'\n'4. The \"reverse()\" method modifies the sequence in place for '\n'economy\\n'\n' of space when reversing a large sequence. To remind users '\n'that it\\n'\n' operates by side effect, it does not return the reversed '\n'sequence.\\n'\n'\\n'\n'5. \"clear()\" and \"copy()\" are included for consistency with the\\n'\n' interfaces of mutable containers that don\u2019t support slicing\\n'\n' operations (such as \"dict\" and \"set\"). \"copy()\" is not part '\n'of the\\n'\n' \"collections.abc.MutableSequence\" ABC, but most concrete '\n'mutable\\n'\n' sequence classes provide it.\\n'\n'\\n'\n' New in version 3.3: \"clear()\" and \"copy()\" methods.\\n'\n'\\n'\n'6. The value *n* is an integer, or an object implementing\\n'\n' \"__index__()\". Zero and negative values of *n* clear the '\n'sequence.\\n'\n' Items in the sequence are not copied; they are referenced '\n'multiple\\n'\n' times, as explained for \"s * n\" under Common Sequence '\n'Operations.\\n'\n'\\n'\n'\\n'\n'Lists\\n'\n'=====\\n'\n'\\n'\n'Lists are mutable sequences, typically used to store collections '\n'of\\n'\n'homogeneous items (where the precise degree of similarity will '\n'vary by\\n'\n'application).\\n'\n'\\n'\n'class list([iterable])\\n'\n'\\n'\n' Lists may be constructed in several ways:\\n'\n'\\n'\n' * Using a pair of square brackets to denote the empty list: '\n'\"[]\"\\n'\n'\\n'\n' * Using square brackets, separating items with commas: \"[a]\", '\n'\"[a,\\n'\n' b, c]\"\\n'\n'\\n'\n' * Using a list comprehension: \"[x for x in iterable]\"\\n'\n'\\n'\n' * Using the type constructor: \"list()\" or \"list(iterable)\"\\n'\n'\\n'\n' The constructor builds a list whose items are the same and in '\n'the\\n'\n' same order as *iterable*\u2019s items. *iterable* may be either '\n'a\\n'\n' sequence, a container that supports iteration, or an '\n'iterator\\n'\n' object. If *iterable* is already a list, a copy is made and\\n'\n' returned, similar to \"iterable[:]\". For example, '\n'\"list(\\'abc\\')\"\\n'\n' returns \"[\\'a\\', \\'b\\', \\'c\\']\" and \"list( (1, 2, 3) )\" '\n'returns \"[1, 2,\\n'\n' 3]\". If no argument is given, the constructor creates a new '\n'empty\\n'\n' list, \"[]\".\\n'\n'\\n'\n' Many other operations also produce lists, including the '\n'\"sorted()\"\\n'\n' built-in.\\n'\n'\\n'\n' Lists implement all of the common and mutable sequence '\n'operations.\\n'\n' Lists also provide the following additional method:\\n'\n'\\n'\n' sort(*, key=None, reverse=False)\\n'\n'\\n'\n' This method sorts the list in place, using only \"<\" '\n'comparisons\\n'\n' between items. Exceptions are not suppressed - if any '\n'comparison\\n'\n' operations fail, the entire sort operation will fail (and '\n'the\\n'\n' list will likely be left in a partially modified state).\\n'\n'\\n'\n' \"sort()\" accepts two arguments that can only be passed by\\n'\n' keyword (keyword-only arguments):\\n'\n'\\n'\n' *key* specifies a function of one argument that is used '\n'to\\n'\n' extract a comparison key from each list element (for '\n'example,\\n'\n' \"key=str.lower\"). The key corresponding to each item in '\n'the list\\n'\n' is calculated once and then used for the entire sorting '\n'process.\\n'\n' The default value of \"None\" means that list items are '\n'sorted\\n'\n' directly without calculating a separate key value.\\n'\n'\\n'\n' The \"functools.cmp_to_key()\" utility is available to '\n'convert a\\n'\n' 2.x style *cmp* function to a *key* function.\\n'\n'\\n'\n' *reverse* is a boolean value. If set to \"True\", then the '\n'list\\n'\n' elements are sorted as if each comparison were reversed.\\n'\n'\\n'\n' This method modifies the sequence in place for economy of '\n'space\\n'\n' when sorting a large sequence. To remind users that it '\n'operates\\n'\n' by side effect, it does not return the sorted sequence '\n'(use\\n'\n' \"sorted()\" to explicitly request a new sorted list '\n'instance).\\n'\n'\\n'\n' The \"sort()\" method is guaranteed to be stable. A sort '\n'is\\n'\n' stable if it guarantees not to change the relative order '\n'of\\n'\n' elements that compare equal \u2014 this is helpful for sorting '\n'in\\n'\n' multiple passes (for example, sort by department, then by '\n'salary\\n'\n' grade).\\n'\n'\\n'\n' For sorting examples and a brief sorting tutorial, see '\n'Sorting\\n'\n' HOW TO.\\n'\n'\\n'\n' **CPython implementation detail:** While a list is being '\n'sorted,\\n'\n' the effect of attempting to mutate, or even inspect, the '\n'list is\\n'\n' undefined. The C implementation of Python makes the list '\n'appear\\n'\n' empty for the duration, and raises \"ValueError\" if it can '\n'detect\\n'\n' that the list has been mutated during a sort.\\n'\n'\\n'\n'\\n'\n'Tuples\\n'\n'======\\n'\n'\\n'\n'Tuples are immutable sequences, typically used to store '\n'collections of\\n'\n'heterogeneous data (such as the 2-tuples produced by the '\n'\"enumerate()\"\\n'\n'built-in). Tuples are also used for cases where an immutable '\n'sequence\\n'\n'of homogeneous data is needed (such as allowing storage in a '\n'\"set\" or\\n'\n'\"dict\" instance).\\n'\n'\\n'\n'class tuple([iterable])\\n'\n'\\n'\n' Tuples may be constructed in a number of ways:\\n'\n'\\n'\n' * Using a pair of parentheses to denote the empty tuple: '\n'\"()\"\\n'\n'\\n'\n' * Using a trailing comma for a singleton tuple: \"a,\" or '\n'\"(a,)\"\\n'\n'\\n'\n' * Separating items with commas: \"a, b, c\" or \"(a, b, c)\"\\n'\n'\\n'\n' * Using the \"tuple()\" built-in: \"tuple()\" or '\n'\"tuple(iterable)\"\\n'\n'\\n'\n' The constructor builds a tuple whose items are the same and '\n'in the\\n'\n' same order as *iterable*\u2019s items. *iterable* may be either '\n'a\\n'\n' sequence, a container that supports iteration, or an '\n'iterator\\n'\n' object. If *iterable* is already a tuple, it is returned\\n'\n' unchanged. For example, \"tuple(\\'abc\\')\" returns \"(\\'a\\', '\n'\\'b\\', \\'c\\')\"\\n'\n' and \"tuple( [1, 2, 3] )\" returns \"(1, 2, 3)\". If no argument '\n'is\\n'\n' given, the constructor creates a new empty tuple, \"()\".\\n'\n'\\n'\n' Note that it is actually the comma which makes a tuple, not '\n'the\\n'\n' parentheses. The parentheses are optional, except in the '\n'empty\\n'\n' tuple case, or when they are needed to avoid syntactic '\n'ambiguity.\\n'\n' For example, \"f(a, b, c)\" is a function call with three '\n'arguments,\\n'\n' while \"f((a, b, c))\" is a function call with a 3-tuple as the '\n'sole\\n'\n' argument.\\n'\n'\\n'\n' Tuples implement all of the common sequence operations.\\n'\n'\\n'\n'For heterogeneous collections of data where access by name is '\n'clearer\\n'\n'than access by index, \"collections.namedtuple()\" may be a more\\n'\n'appropriate choice than a simple tuple object.\\n'\n'\\n'\n'\\n'\n'Ranges\\n'\n'======\\n'\n'\\n'\n'The \"range\" type represents an immutable sequence of numbers and '\n'is\\n'\n'commonly used for looping a specific number of times in \"for\" '\n'loops.\\n'\n'\\n'\n'class range(stop)\\n'\n'class range(start, stop[, step])\\n'\n'\\n'\n' The arguments to the range constructor must be integers '\n'(either\\n'\n' built-in \"int\" or any object that implements the \"__index__\"\\n'\n' special method). If the *step* argument is omitted, it '\n'defaults to\\n'\n' \"1\". If the *start* argument is omitted, it defaults to \"0\". '\n'If\\n'\n' *step* is zero, \"ValueError\" is raised.\\n'\n'\\n'\n' For a positive *step*, the contents of a range \"r\" are '\n'determined\\n'\n' by the formula \"r[i] = start + step*i\" where \"i >= 0\" and '\n'\"r[i] <\\n'\n' stop\".\\n'\n'\\n'\n' For a negative *step*, the contents of the range are still\\n'\n' determined by the formula \"r[i] = start + step*i\", but the\\n'\n' constraints are \"i >= 0\" and \"r[i] > stop\".\\n'\n'\\n'\n' A range object will be empty if \"r[0]\" does not meet the '\n'value\\n'\n' constraint. Ranges do support negative indices, but these '\n'are\\n'\n' interpreted as indexing from the end of the sequence '\n'determined by\\n'\n' the positive indices.\\n'\n'\\n'\n' Ranges containing absolute values larger than \"sys.maxsize\" '\n'are\\n'\n' permitted but some features (such as \"len()\") may raise\\n'\n' \"OverflowError\".\\n'\n'\\n'\n' Range examples:\\n'\n'\\n'\n' >>> list(range(10))\\n'\n' [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\\n'\n' >>> list(range(1, 11))\\n'\n' [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\\n'\n' >>> list(range(0, 30, 5))\\n'\n' [0, 5, 10, 15, 20, 25]\\n'\n' >>> list(range(0, 10, 3))\\n'\n' [0, 3, 6, 9]\\n'\n' >>> list(range(0, -10, -1))\\n'\n' [0, -1, -2, -3, -4, -5, -6, -7, -8, -9]\\n'\n' >>> list(range(0))\\n'\n' []\\n'\n' >>> list(range(1, 0))\\n'\n' []\\n'\n'\\n'\n' Ranges implement all of the common sequence operations '\n'except\\n'\n' concatenation and repetition (due to the fact that range '\n'objects\\n'\n' can only represent sequences that follow a strict pattern '\n'and\\n'\n' repetition and concatenation will usually violate that '\n'pattern).\\n'\n'\\n'\n' start\\n'\n'\\n'\n' The value of the *start* parameter (or \"0\" if the '\n'parameter was\\n'\n' not supplied)\\n'\n'\\n'\n' stop\\n'\n'\\n'\n' The value of the *stop* parameter\\n'\n'\\n'\n' step\\n'\n'\\n'\n' The value of the *step* parameter (or \"1\" if the parameter '\n'was\\n'\n' not supplied)\\n'\n'\\n'\n'The advantage of the \"range\" type over a regular \"list\" or '\n'\"tuple\" is\\n'\n'that a \"range\" object will always take the same (small) amount '\n'of\\n'\n'memory, no matter the size of the range it represents (as it '\n'only\\n'\n'stores the \"start\", \"stop\" and \"step\" values, calculating '\n'individual\\n'\n'items and subranges as needed).\\n'\n'\\n'\n'Range objects implement the \"collections.abc.Sequence\" ABC, and\\n'\n'provide features such as containment tests, element index '\n'lookup,\\n'\n'slicing and support for negative indices (see Sequence Types \u2014 '\n'list,\\n'\n'tuple, range):\\n'\n'\\n'\n'>>> r = range(0, 20, 2)\\n'\n'>>> r\\n'\n'range(0, 20, 2)\\n'\n'>>> 11 in r\\n'\n'False\\n'\n'>>> 10 in r\\n'\n'True\\n'\n'>>> r.index(10)\\n'\n'5\\n'\n'>>> r[5]\\n'\n'10\\n'\n'>>> r[:5]\\n'\n'range(0, 10, 2)\\n'\n'>>> r[-1]\\n'\n'18\\n'\n'\\n'\n'Testing range objects for equality with \"==\" and \"!=\" compares '\n'them as\\n'\n'sequences. That is, two range objects are considered equal if '\n'they\\n'\n'represent the same sequence of values. (Note that two range '\n'objects\\n'\n'that compare equal might have different \"start\", \"stop\" and '\n'\"step\"\\n'\n'attributes, for example \"range(0) == range(2, 1, 3)\" or '\n'\"range(0, 3,\\n'\n'2) == range(0, 4, 2)\".)\\n'\n'\\n'\n'Changed in version 3.2: Implement the Sequence ABC. Support '\n'slicing\\n'\n'and negative indices. Test \"int\" objects for membership in '\n'constant\\n'\n'time instead of iterating through all items.\\n'\n'\\n'\n'Changed in version 3.3: Define \u2018==\u2019 and \u2018!=\u2019 to compare range '\n'objects\\n'\n'based on the sequence of values they define (instead of '\n'comparing\\n'\n'based on object identity).\\n'\n'\\n'\n'New in version 3.3: The \"start\", \"stop\" and \"step\" attributes.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' * The linspace recipe shows how to implement a lazy version of '\n'range\\n'\n' suitable for floating point applications.\\n',\n'typesseq-mutable':'Mutable Sequence Types\\n'\n'**********************\\n'\n'\\n'\n'The operations in the following table are defined on '\n'mutable sequence\\n'\n'types. The \"collections.abc.MutableSequence\" ABC is '\n'provided to make\\n'\n'it easier to correctly implement these operations on '\n'custom sequence\\n'\n'types.\\n'\n'\\n'\n'In the table *s* is an instance of a mutable sequence '\n'type, *t* is any\\n'\n'iterable object and *x* is an arbitrary object that '\n'meets any type and\\n'\n'value restrictions imposed by *s* (for example, '\n'\"bytearray\" only\\n'\n'accepts integers that meet the value restriction \"0 <= x '\n'<= 255\").\\n'\n'\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| Operation | '\n'Result | Notes '\n'|\\n'\n'|================================|==================================|=======================|\\n'\n'| \"s[i] = x\" | item *i* of *s* is '\n'replaced by | |\\n'\n'| | '\n'*x* | '\n'|\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s[i:j] = t\" | slice of *s* from *i* '\n'to *j* is | |\\n'\n'| | replaced by the '\n'contents of the | |\\n'\n'| | iterable '\n'*t* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"del s[i:j]\" | same as \"s[i:j] = '\n'[]\" | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s[i:j:k] = t\" | the elements of '\n'\"s[i:j:k]\" are | (1) |\\n'\n'| | replaced by those of '\n'*t* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"del s[i:j:k]\" | removes the elements '\n'of | |\\n'\n'| | \"s[i:j:k]\" from the '\n'list | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.append(x)\" | appends *x* to the '\n'end of the | |\\n'\n'| | sequence (same '\n'as | |\\n'\n'| | \"s[len(s):len(s)] = '\n'[x]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.clear()\" | removes all items '\n'from *s* (same | (5) |\\n'\n'| | as \"del '\n's[:]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.copy()\" | creates a shallow '\n'copy of *s* | (5) |\\n'\n'| | (same as '\n'\"s[:]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.extend(t)\" or \"s += t\" | extends *s* with the '\n'contents of | |\\n'\n'| | *t* (for the most '\n'part the same | |\\n'\n'| | as \"s[len(s):len(s)] '\n'= t\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s *= n\" | updates *s* with its '\n'contents | (6) |\\n'\n'| | repeated *n* '\n'times | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.insert(i, x)\" | inserts *x* into *s* '\n'at the | |\\n'\n'| | index given by *i* '\n'(same as | |\\n'\n'| | \"s[i:i] = '\n'[x]\") | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.pop()\" or \"s.pop(i)\" | retrieves the item at '\n'*i* and | (2) |\\n'\n'| | also removes it from '\n'*s* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.remove(x)\" | remove the first item '\n'from *s* | (3) |\\n'\n'| | where \"s[i]\" is equal '\n'to *x* | |\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'| \"s.reverse()\" | reverses the items of '\n'*s* in | (4) |\\n'\n'| | '\n'place | '\n'|\\n'\n'+--------------------------------+----------------------------------+-----------------------+\\n'\n'\\n'\n'Notes:\\n'\n'\\n'\n'1. *t* must have the same length as the slice it is '\n'replacing.\\n'\n'\\n'\n'2. The optional argument *i* defaults to \"-1\", so that '\n'by default the\\n'\n' last item is removed and returned.\\n'\n'\\n'\n'3. \"remove()\" raises \"ValueError\" when *x* is not found '\n'in *s*.\\n'\n'\\n'\n'4. The \"reverse()\" method modifies the sequence in place '\n'for economy\\n'\n' of space when reversing a large sequence. To remind '\n'users that it\\n'\n' operates by side effect, it does not return the '\n'reversed sequence.\\n'\n'\\n'\n'5. \"clear()\" and \"copy()\" are included for consistency '\n'with the\\n'\n' interfaces of mutable containers that don\u2019t support '\n'slicing\\n'\n' operations (such as \"dict\" and \"set\"). \"copy()\" is '\n'not part of the\\n'\n' \"collections.abc.MutableSequence\" ABC, but most '\n'concrete mutable\\n'\n' sequence classes provide it.\\n'\n'\\n'\n' New in version 3.3: \"clear()\" and \"copy()\" methods.\\n'\n'\\n'\n'6. The value *n* is an integer, or an object '\n'implementing\\n'\n' \"__index__()\". Zero and negative values of *n* clear '\n'the sequence.\\n'\n' Items in the sequence are not copied; they are '\n'referenced multiple\\n'\n' times, as explained for \"s * n\" under Common Sequence '\n'Operations.\\n',\n'unary':'Unary arithmetic and bitwise operations\\n'\n'***************************************\\n'\n'\\n'\n'All unary arithmetic and bitwise operations have the same '\n'priority:\\n'\n'\\n'\n' u_expr ::= power | \"-\" u_expr | \"+\" u_expr | \"~\" u_expr\\n'\n'\\n'\n'The unary \"-\" (minus) operator yields the negation of its numeric\\n'\n'argument; the operation can be overridden with the \"__neg__()\" '\n'special\\n'\n'method.\\n'\n'\\n'\n'The unary \"+\" (plus) operator yields its numeric argument '\n'unchanged;\\n'\n'the operation can be overridden with the \"__pos__()\" special '\n'method.\\n'\n'\\n'\n'The unary \"~\" (invert) operator yields the bitwise inversion of '\n'its\\n'\n'integer argument. The bitwise inversion of \"x\" is defined as\\n'\n'\"-(x+1)\". It only applies to integral numbers or to custom '\n'objects\\n'\n'that override the \"__invert__()\" special method.\\n'\n'\\n'\n'In all three cases, if the argument does not have the proper type, '\n'a\\n'\n'\"TypeError\" exception is raised.\\n',\n'while':'The \"while\" statement\\n'\n'*********************\\n'\n'\\n'\n'The \"while\" statement is used for repeated execution as long as an\\n'\n'expression is true:\\n'\n'\\n'\n' while_stmt ::= \"while\" assignment_expression \":\" suite\\n'\n' [\"else\" \":\" suite]\\n'\n'\\n'\n'This repeatedly tests the expression and, if it is true, executes '\n'the\\n'\n'first suite; if the expression is false (which may be the first '\n'time\\n'\n'it is tested) the suite of the \"else\" clause, if present, is '\n'executed\\n'\n'and the loop terminates.\\n'\n'\\n'\n'A \"break\" statement executed in the first suite terminates the '\n'loop\\n'\n'without executing the \"else\" clause\u2019s suite. A \"continue\" '\n'statement\\n'\n'executed in the first suite skips the rest of the suite and goes '\n'back\\n'\n'to testing the expression.\\n',\n'with':'The \"with\" statement\\n'\n'********************\\n'\n'\\n'\n'The \"with\" statement is used to wrap the execution of a block with\\n'\n'methods defined by a context manager (see section With Statement\\n'\n'Context Managers). This allows common \"try\"\u2026\"except\"\u2026\"finally\" '\n'usage\\n'\n'patterns to be encapsulated for convenient reuse.\\n'\n'\\n'\n' with_stmt ::= \"with\" ( \"(\" with_stmt_contents \",\"? \")\" | '\n'with_stmt_contents ) \":\" suite\\n'\n' with_stmt_contents ::= with_item (\",\" with_item)*\\n'\n' with_item ::= expression [\"as\" target]\\n'\n'\\n'\n'The execution of the \"with\" statement with one \u201citem\u201d proceeds as\\n'\n'follows:\\n'\n'\\n'\n'1. The context expression (the expression given in the \"with_item\") '\n'is\\n'\n' evaluated to obtain a context manager.\\n'\n'\\n'\n'2. The context manager\u2019s \"__enter__()\" is loaded for later use.\\n'\n'\\n'\n'3. The context manager\u2019s \"__exit__()\" is loaded for later use.\\n'\n'\\n'\n'4. The context manager\u2019s \"__enter__()\" method is invoked.\\n'\n'\\n'\n'5. If a target was included in the \"with\" statement, the return '\n'value\\n'\n' from \"__enter__()\" is assigned to it.\\n'\n'\\n'\n' Note:\\n'\n'\\n'\n' The \"with\" statement guarantees that if the \"__enter__()\" '\n'method\\n'\n' returns without an error, then \"__exit__()\" will always be\\n'\n' called. Thus, if an error occurs during the assignment to the\\n'\n' target list, it will be treated the same as an error occurring\\n'\n' within the suite would be. See step 6 below.\\n'\n'\\n'\n'6. The suite is executed.\\n'\n'\\n'\n'7. The context manager\u2019s \"__exit__()\" method is invoked. If an\\n'\n' exception caused the suite to be exited, its type, value, and\\n'\n' traceback are passed as arguments to \"__exit__()\". Otherwise, '\n'three\\n'\n' \"None\" arguments are supplied.\\n'\n'\\n'\n' If the suite was exited due to an exception, and the return '\n'value\\n'\n' from the \"__exit__()\" method was false, the exception is '\n'reraised.\\n'\n' If the return value was true, the exception is suppressed, and\\n'\n' execution continues with the statement following the \"with\"\\n'\n' statement.\\n'\n'\\n'\n' If the suite was exited for any reason other than an exception, '\n'the\\n'\n' return value from \"__exit__()\" is ignored, and execution '\n'proceeds\\n'\n' at the normal location for the kind of exit that was taken.\\n'\n'\\n'\n'The following code:\\n'\n'\\n'\n' with EXPRESSION as TARGET:\\n'\n' SUITE\\n'\n'\\n'\n'is semantically equivalent to:\\n'\n'\\n'\n' manager = (EXPRESSION)\\n'\n' enter = type(manager).__enter__\\n'\n' exit = type(manager).__exit__\\n'\n' value = enter(manager)\\n'\n' hit_except = False\\n'\n'\\n'\n' try:\\n'\n' TARGET = value\\n'\n' SUITE\\n'\n' except:\\n'\n' hit_except = True\\n'\n' if not exit(manager, *sys.exc_info()):\\n'\n' raise\\n'\n' finally:\\n'\n' if not hit_except:\\n'\n' exit(manager, None, None, None)\\n'\n'\\n'\n'With more than one item, the context managers are processed as if\\n'\n'multiple \"with\" statements were nested:\\n'\n'\\n'\n' with A() as a, B() as b:\\n'\n' SUITE\\n'\n'\\n'\n'is semantically equivalent to:\\n'\n'\\n'\n' with A() as a:\\n'\n' with B() as b:\\n'\n' SUITE\\n'\n'\\n'\n'You can also write multi-item context managers in multiple lines if\\n'\n'the items are surrounded by parentheses. For example:\\n'\n'\\n'\n' with (\\n'\n' A() as a,\\n'\n' B() as b,\\n'\n' ):\\n'\n' SUITE\\n'\n'\\n'\n'Changed in version 3.1: Support for multiple context expressions.\\n'\n'\\n'\n'Changed in version 3.10: Support for using grouping parentheses to\\n'\n'break the statement in multiple lines.\\n'\n'\\n'\n'See also:\\n'\n'\\n'\n' **PEP 343** - The \u201cwith\u201d statement\\n'\n' The specification, background, and examples for the Python '\n'\"with\"\\n'\n' statement.\\n',\n'yield':'The \"yield\" statement\\n'\n'*********************\\n'\n'\\n'\n' yield_stmt ::= yield_expression\\n'\n'\\n'\n'A \"yield\" statement is semantically equivalent to a yield '\n'expression.\\n'\n'The yield statement can be used to omit the parentheses that would\\n'\n'otherwise be required in the equivalent yield expression '\n'statement.\\n'\n'For example, the yield statements\\n'\n'\\n'\n' yield \\n'\n' yield from \\n'\n'\\n'\n'are equivalent to the yield expression statements\\n'\n'\\n'\n' (yield )\\n'\n' (yield from )\\n'\n'\\n'\n'Yield expressions and statements are only used when defining a\\n'\n'*generator* function, and are only used in the body of the '\n'generator\\n'\n'function. Using yield in a function definition is sufficient to '\n'cause\\n'\n'that definition to create a generator function instead of a normal\\n'\n'function.\\n'\n'\\n'\n'For full details of \"yield\" semantics, refer to the Yield '\n'expressions\\n'\n'section.\\n'}\n", []], "pydoc_data": [".py", "", [], 1], "unittest.async_case": [".py", "import asyncio\nimport contextvars\nimport inspect\nimport warnings\n\nfrom .case import TestCase\n\n\nclass IsolatedAsyncioTestCase(TestCase):\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n def __init__(self,methodName='runTest'):\n super().__init__(methodName)\n self._asyncioRunner=None\n self._asyncioTestContext=contextvars.copy_context()\n \n async def asyncSetUp(self):\n pass\n \n async def asyncTearDown(self):\n pass\n \n def addAsyncCleanup(self,func,/,*args,**kwargs):\n \n \n \n \n \n \n \n \n \n \n \n \n self.addCleanup(*(func,*args),**kwargs)\n \n async def enterAsyncContext(self,cm):\n ''\n\n\n\n \n \n \n cls=type(cm)\n try :\n enter=cls.__aenter__\n exit=cls.__aexit__\n except AttributeError:\n raise TypeError(f\"'{cls.__module__}.{cls.__qualname__}' object does \"\n f\"not support the asynchronous context manager protocol\"\n )from None\n result=await enter(cm)\n self.addAsyncCleanup(exit,cm,None ,None ,None )\n return result\n \n def _callSetUp(self):\n \n \n \n self._asyncioRunner.get_loop()\n self._asyncioTestContext.run(self.setUp)\n self._callAsync(self.asyncSetUp)\n \n def _callTestMethod(self,method):\n if self._callMaybeAsync(method)is not None :\n warnings.warn(f'It is deprecated to return a value!=None from a '\n f'test case ({method})',DeprecationWarning,stacklevel=4)\n \n def _callTearDown(self):\n self._callAsync(self.asyncTearDown)\n self._asyncioTestContext.run(self.tearDown)\n \n def _callCleanup(self,function,*args,**kwargs):\n self._callMaybeAsync(function,*args,**kwargs)\n \n def _callAsync(self,func,/,*args,**kwargs):\n assert self._asyncioRunner is not None ,'asyncio runner is not initialized'\n assert inspect.iscoroutinefunction(func),f'{func!r} is not an async function'\n return self._asyncioRunner.run(\n func(*args,**kwargs),\n context=self._asyncioTestContext\n )\n \n def _callMaybeAsync(self,func,/,*args,**kwargs):\n assert self._asyncioRunner is not None ,'asyncio runner is not initialized'\n if inspect.iscoroutinefunction(func):\n return self._asyncioRunner.run(\n func(*args,**kwargs),\n context=self._asyncioTestContext,\n )\n else :\n return self._asyncioTestContext.run(func,*args,**kwargs)\n \n def _setupAsyncioRunner(self):\n assert self._asyncioRunner is None ,'asyncio runner is already initialized'\n runner=asyncio.Runner(debug=True )\n self._asyncioRunner=runner\n \n def _tearDownAsyncioRunner(self):\n runner=self._asyncioRunner\n runner.close()\n \n def run(self,result=None ):\n self._setupAsyncioRunner()\n try :\n return super().run(result)\n finally :\n self._tearDownAsyncioRunner()\n \n def debug(self):\n self._setupAsyncioRunner()\n super().debug()\n self._tearDownAsyncioRunner()\n \n def __del__(self):\n if self._asyncioRunner is not None :\n self._tearDownAsyncioRunner()\n", ["asyncio", "contextvars", "inspect", "unittest.case", "warnings"]], "unittest.case": [".py", "''\n\nimport sys\nimport functools\nimport difflib\nimport pprint\nimport re\nimport warnings\nimport collections\nimport contextlib\nimport traceback\nimport types\n\nfrom . import result\nfrom .util import (strclass,safe_repr,_count_diff_all_purpose,\n_count_diff_hashable,_common_shorten_repr)\n\n__unittest=True\n\n_subtest_msg_sentinel=object()\n\nDIFF_OMITTED=('\\nDiff is %s characters long. '\n'Set self.maxDiff to None to see it.')\n\nclass SkipTest(Exception):\n ''\n\n\n\n\n \n \nclass _ShouldStop(Exception):\n ''\n\n \n \nclass _UnexpectedSuccess(Exception):\n ''\n\n \n \n \nclass _Outcome(object):\n def __init__(self,result=None ):\n self.expecting_failure=False\n self.result=result\n self.result_supports_subtests=hasattr(result,\"addSubTest\")\n self.success=True\n self.expectedFailure=None\n \n @contextlib.contextmanager\n def testPartExecutor(self,test_case,subTest=False ):\n old_success=self.success\n self.success=True\n try :\n yield\n except KeyboardInterrupt:\n raise\n except SkipTest as e:\n self.success=False\n _addSkip(self.result,test_case,str(e))\n except _ShouldStop:\n pass\n except :\n exc_info=sys.exc_info()\n if self.expecting_failure:\n self.expectedFailure=exc_info\n else :\n self.success=False\n if subTest:\n self.result.addSubTest(test_case.test_case,test_case,exc_info)\n else :\n _addError(self.result,test_case,exc_info)\n \n \n exc_info=None\n else :\n if subTest and self.success:\n self.result.addSubTest(test_case.test_case,test_case,None )\n finally :\n self.success=self.success and old_success\n \n \ndef _addSkip(result,test_case,reason):\n addSkip=getattr(result,'addSkip',None )\n if addSkip is not None :\n addSkip(test_case,reason)\n else :\n warnings.warn(\"TestResult has no addSkip method, skips not reported\",\n RuntimeWarning,2)\n result.addSuccess(test_case)\n \ndef _addError(result,test,exc_info):\n if result is not None and exc_info is not None :\n if issubclass(exc_info[0],test.failureException):\n result.addFailure(test,exc_info)\n else :\n result.addError(test,exc_info)\n \ndef _id(obj):\n return obj\n \n \ndef _enter_context(cm,addcleanup):\n\n\n cls=type(cm)\n try :\n enter=cls.__enter__\n exit=cls.__exit__\n except AttributeError:\n raise TypeError(f\"'{cls.__module__}.{cls.__qualname__}' object does \"\n f\"not support the context manager protocol\")from None\n result=enter(cm)\n addcleanup(exit,cm,None ,None ,None )\n return result\n \n \n_module_cleanups=[]\ndef addModuleCleanup(function,/,*args,**kwargs):\n ''\n \n _module_cleanups.append((function,args,kwargs))\n \ndef enterModuleContext(cm):\n ''\n return _enter_context(cm,addModuleCleanup)\n \n \ndef doModuleCleanups():\n ''\n \n exceptions=[]\n while _module_cleanups:\n function,args,kwargs=_module_cleanups.pop()\n try :\n function(*args,**kwargs)\n except Exception as exc:\n exceptions.append(exc)\n if exceptions:\n \n \n raise exceptions[0]\n \n \ndef skip(reason):\n ''\n\n \n def decorator(test_item):\n if not isinstance(test_item,type):\n @functools.wraps(test_item)\n def skip_wrapper(*args,**kwargs):\n raise SkipTest(reason)\n test_item=skip_wrapper\n \n test_item.__unittest_skip__=True\n test_item.__unittest_skip_why__=reason\n return test_item\n if isinstance(reason,types.FunctionType):\n test_item=reason\n reason=''\n return decorator(test_item)\n return decorator\n \ndef skipIf(condition,reason):\n ''\n\n \n if condition:\n return skip(reason)\n return _id\n \ndef skipUnless(condition,reason):\n ''\n\n \n if not condition:\n return skip(reason)\n return _id\n \ndef expectedFailure(test_item):\n test_item.__unittest_expecting_failure__=True\n return test_item\n \ndef _is_subtype(expected,basetype):\n if isinstance(expected,tuple):\n return all(_is_subtype(e,basetype)for e in expected)\n return isinstance(expected,type)and issubclass(expected,basetype)\n \nclass _BaseTestCaseContext:\n\n def __init__(self,test_case):\n self.test_case=test_case\n \n def _raiseFailure(self,standardMsg):\n msg=self.test_case._formatMessage(self.msg,standardMsg)\n raise self.test_case.failureException(msg)\n \nclass _AssertRaisesBaseContext(_BaseTestCaseContext):\n\n def __init__(self,expected,test_case,expected_regex=None ):\n _BaseTestCaseContext.__init__(self,test_case)\n self.expected=expected\n self.test_case=test_case\n if expected_regex is not None :\n expected_regex=re.compile(expected_regex)\n self.expected_regex=expected_regex\n self.obj_name=None\n self.msg=None\n \n def handle(self,name,args,kwargs):\n ''\n\n\n\n\n \n try :\n if not _is_subtype(self.expected,self._base_type):\n raise TypeError('%s() arg 1 must be %s'%\n (name,self._base_type_str))\n if not args:\n self.msg=kwargs.pop('msg',None )\n if kwargs:\n raise TypeError('%r is an invalid keyword argument for '\n 'this function'%(next(iter(kwargs)),))\n return self\n \n callable_obj,*args=args\n try :\n self.obj_name=callable_obj.__name__\n except AttributeError:\n self.obj_name=str(callable_obj)\n with self:\n callable_obj(*args,**kwargs)\n finally :\n \n self=None\n \n \nclass _AssertRaisesContext(_AssertRaisesBaseContext):\n ''\n \n _base_type=BaseException\n _base_type_str='an exception type or tuple of exception types'\n \n def __enter__(self):\n return self\n \n def __exit__(self,exc_type,exc_value,tb):\n if exc_type is None :\n try :\n exc_name=self.expected.__name__\n except AttributeError:\n exc_name=str(self.expected)\n if self.obj_name:\n self._raiseFailure(\"{} not raised by {}\".format(exc_name,\n self.obj_name))\n else :\n self._raiseFailure(\"{} not raised\".format(exc_name))\n else :\n traceback.clear_frames(tb)\n if not issubclass(exc_type,self.expected):\n \n return False\n \n self.exception=exc_value.with_traceback(None )\n if self.expected_regex is None :\n return True\n \n expected_regex=self.expected_regex\n if not expected_regex.search(str(exc_value)):\n self._raiseFailure('\"{}\" does not match \"{}\"'.format(\n expected_regex.pattern,str(exc_value)))\n return True\n \n __class_getitem__=classmethod(types.GenericAlias)\n \n \nclass _AssertWarnsContext(_AssertRaisesBaseContext):\n ''\n \n _base_type=Warning\n _base_type_str='a warning type or tuple of warning types'\n \n def __enter__(self):\n \n \n for v in list(sys.modules.values()):\n if getattr(v,'__warningregistry__',None ):\n v.__warningregistry__={}\n self.warnings_manager=warnings.catch_warnings(record=True )\n self.warnings=self.warnings_manager.__enter__()\n warnings.simplefilter(\"always\",self.expected)\n return self\n \n def __exit__(self,exc_type,exc_value,tb):\n self.warnings_manager.__exit__(exc_type,exc_value,tb)\n if exc_type is not None :\n \n return\n try :\n exc_name=self.expected.__name__\n except AttributeError:\n exc_name=str(self.expected)\n first_matching=None\n for m in self.warnings:\n w=m.message\n if not isinstance(w,self.expected):\n continue\n if first_matching is None :\n first_matching=w\n if (self.expected_regex is not None and\n not self.expected_regex.search(str(w))):\n continue\n \n self.warning=w\n self.filename=m.filename\n self.lineno=m.lineno\n return\n \n if first_matching is not None :\n self._raiseFailure('\"{}\" does not match \"{}\"'.format(\n self.expected_regex.pattern,str(first_matching)))\n if self.obj_name:\n self._raiseFailure(\"{} not triggered by {}\".format(exc_name,\n self.obj_name))\n else :\n self._raiseFailure(\"{} not triggered\".format(exc_name))\n \n \nclass _OrderedChainMap(collections.ChainMap):\n def __iter__(self):\n seen=set()\n for mapping in self.maps:\n for k in mapping:\n if k not in seen:\n seen.add(k)\n yield k\n \n \nclass TestCase(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n failureException=AssertionError\n \n longMessage=True\n \n maxDiff=80 *8\n \n \n \n _diffThreshold=2 **16\n \n \n \n _classSetupFailed=False\n \n _class_cleanups=[]\n \n def __init__(self,methodName='runTest'):\n ''\n\n\n \n self._testMethodName=methodName\n self._outcome=None\n self._testMethodDoc='No test'\n try :\n testMethod=getattr(self,methodName)\n except AttributeError:\n if methodName !='runTest':\n \n \n raise ValueError(\"no such test method in %s: %s\"%\n (self.__class__,methodName))\n else :\n self._testMethodDoc=testMethod.__doc__\n self._cleanups=[]\n self._subtest=None\n \n \n \n \n self._type_equality_funcs={}\n self.addTypeEqualityFunc(dict,'assertDictEqual')\n self.addTypeEqualityFunc(list,'assertListEqual')\n self.addTypeEqualityFunc(tuple,'assertTupleEqual')\n self.addTypeEqualityFunc(set,'assertSetEqual')\n self.addTypeEqualityFunc(frozenset,'assertSetEqual')\n self.addTypeEqualityFunc(str,'assertMultiLineEqual')\n \n def addTypeEqualityFunc(self,typeobj,function):\n ''\n\n\n\n\n\n\n\n\n\n\n \n self._type_equality_funcs[typeobj]=function\n \n def addCleanup(self,function,/,*args,**kwargs):\n ''\n\n\n\n \n self._cleanups.append((function,args,kwargs))\n \n def enterContext(self,cm):\n ''\n\n\n\n \n return _enter_context(cm,self.addCleanup)\n \n @classmethod\n def addClassCleanup(cls,function,/,*args,**kwargs):\n ''\n \n cls._class_cleanups.append((function,args,kwargs))\n \n @classmethod\n def enterClassContext(cls,cm):\n ''\n return _enter_context(cm,cls.addClassCleanup)\n \n def setUp(self):\n ''\n pass\n \n def tearDown(self):\n ''\n pass\n \n @classmethod\n def setUpClass(cls):\n ''\n \n @classmethod\n def tearDownClass(cls):\n ''\n \n def countTestCases(self):\n return 1\n \n def defaultTestResult(self):\n return result.TestResult()\n \n def shortDescription(self):\n ''\n\n\n\n\n \n doc=self._testMethodDoc\n return doc.strip().split(\"\\n\")[0].strip()if doc else None\n \n \n def id(self):\n return \"%s.%s\"%(strclass(self.__class__),self._testMethodName)\n \n def __eq__(self,other):\n if type(self)is not type(other):\n return NotImplemented\n \n return self._testMethodName ==other._testMethodName\n \n def __hash__(self):\n return hash((type(self),self._testMethodName))\n \n def __str__(self):\n return \"%s (%s.%s)\"%(self._testMethodName,strclass(self.__class__),self._testMethodName)\n \n def __repr__(self):\n return \"<%s testMethod=%s>\"%\\\n (strclass(self.__class__),self._testMethodName)\n \n @contextlib.contextmanager\n def subTest(self,msg=_subtest_msg_sentinel,**params):\n ''\n\n\n\n\n \n if self._outcome is None or not self._outcome.result_supports_subtests:\n yield\n return\n parent=self._subtest\n if parent is None :\n params_map=_OrderedChainMap(params)\n else :\n params_map=parent.params.new_child(params)\n self._subtest=_SubTest(self,msg,params_map)\n try :\n with self._outcome.testPartExecutor(self._subtest,subTest=True ):\n yield\n if not self._outcome.success:\n result=self._outcome.result\n if result is not None and result.failfast:\n raise _ShouldStop\n elif self._outcome.expectedFailure:\n \n \n raise _ShouldStop\n finally :\n self._subtest=parent\n \n def _addExpectedFailure(self,result,exc_info):\n try :\n addExpectedFailure=result.addExpectedFailure\n except AttributeError:\n warnings.warn(\"TestResult has no addExpectedFailure method, reporting as passes\",\n RuntimeWarning)\n result.addSuccess(self)\n else :\n addExpectedFailure(self,exc_info)\n \n def _addUnexpectedSuccess(self,result):\n try :\n addUnexpectedSuccess=result.addUnexpectedSuccess\n except AttributeError:\n warnings.warn(\"TestResult has no addUnexpectedSuccess method, reporting as failure\",\n RuntimeWarning)\n \n \n try :\n raise _UnexpectedSuccess from None\n except _UnexpectedSuccess:\n result.addFailure(self,sys.exc_info())\n else :\n addUnexpectedSuccess(self)\n \n def _callSetUp(self):\n self.setUp()\n \n def _callTestMethod(self,method):\n if method()is not None :\n warnings.warn(f'It is deprecated to return a value!=None from a '\n f'test case ({method})',DeprecationWarning,stacklevel=3)\n \n def _callTearDown(self):\n self.tearDown()\n \n def _callCleanup(self,function,/,*args,**kwargs):\n function(*args,**kwargs)\n \n def run(self,result=None ):\n if result is None :\n result=self.defaultTestResult()\n startTestRun=getattr(result,'startTestRun',None )\n stopTestRun=getattr(result,'stopTestRun',None )\n if startTestRun is not None :\n startTestRun()\n else :\n stopTestRun=None\n \n result.startTest(self)\n try :\n testMethod=getattr(self,self._testMethodName)\n if (getattr(self.__class__,\"__unittest_skip__\",False )or\n getattr(testMethod,\"__unittest_skip__\",False )):\n \n skip_why=(getattr(self.__class__,'__unittest_skip_why__','')\n or getattr(testMethod,'__unittest_skip_why__',''))\n _addSkip(result,self,skip_why)\n return result\n \n expecting_failure=(\n getattr(self,\"__unittest_expecting_failure__\",False )or\n getattr(testMethod,\"__unittest_expecting_failure__\",False )\n )\n outcome=_Outcome(result)\n try :\n self._outcome=outcome\n \n with outcome.testPartExecutor(self):\n self._callSetUp()\n if outcome.success:\n outcome.expecting_failure=expecting_failure\n with outcome.testPartExecutor(self):\n self._callTestMethod(testMethod)\n outcome.expecting_failure=False\n with outcome.testPartExecutor(self):\n self._callTearDown()\n self.doCleanups()\n \n if outcome.success:\n if expecting_failure:\n if outcome.expectedFailure:\n self._addExpectedFailure(result,outcome.expectedFailure)\n else :\n self._addUnexpectedSuccess(result)\n else :\n result.addSuccess(self)\n return result\n finally :\n \n \n outcome.expectedFailure=None\n outcome=None\n \n \n self._outcome=None\n \n finally :\n result.stopTest(self)\n if stopTestRun is not None :\n stopTestRun()\n \n def doCleanups(self):\n ''\n \n outcome=self._outcome or _Outcome()\n while self._cleanups:\n function,args,kwargs=self._cleanups.pop()\n with outcome.testPartExecutor(self):\n self._callCleanup(function,*args,**kwargs)\n \n \n \n return outcome.success\n \n @classmethod\n def doClassCleanups(cls):\n ''\n \n cls.tearDown_exceptions=[]\n while cls._class_cleanups:\n function,args,kwargs=cls._class_cleanups.pop()\n try :\n function(*args,**kwargs)\n except Exception:\n cls.tearDown_exceptions.append(sys.exc_info())\n \n def __call__(self,*args,**kwds):\n return self.run(*args,**kwds)\n \n def debug(self):\n ''\n testMethod=getattr(self,self._testMethodName)\n if (getattr(self.__class__,\"__unittest_skip__\",False )or\n getattr(testMethod,\"__unittest_skip__\",False )):\n \n skip_why=(getattr(self.__class__,'__unittest_skip_why__','')\n or getattr(testMethod,'__unittest_skip_why__',''))\n raise SkipTest(skip_why)\n \n self._callSetUp()\n self._callTestMethod(testMethod)\n self._callTearDown()\n while self._cleanups:\n function,args,kwargs=self._cleanups.pop()\n self._callCleanup(function,*args,**kwargs)\n \n def skipTest(self,reason):\n ''\n raise SkipTest(reason)\n \n def fail(self,msg=None ):\n ''\n raise self.failureException(msg)\n \n def assertFalse(self,expr,msg=None ):\n ''\n if expr:\n msg=self._formatMessage(msg,\"%s is not false\"%safe_repr(expr))\n raise self.failureException(msg)\n \n def assertTrue(self,expr,msg=None ):\n ''\n if not expr:\n msg=self._formatMessage(msg,\"%s is not true\"%safe_repr(expr))\n raise self.failureException(msg)\n \n def _formatMessage(self,msg,standardMsg):\n ''\n\n\n\n\n\n\n\n \n if not self.longMessage:\n return msg or standardMsg\n if msg is None :\n return standardMsg\n try :\n \n \n return '%s : %s'%(standardMsg,msg)\n except UnicodeDecodeError:\n return '%s : %s'%(safe_repr(standardMsg),safe_repr(msg))\n \n def assertRaises(self,expected_exception,*args,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n context=_AssertRaisesContext(expected_exception,self)\n try :\n return context.handle('assertRaises',args,kwargs)\n finally :\n \n context=None\n \n def assertWarns(self,expected_warning,*args,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n context=_AssertWarnsContext(expected_warning,self)\n return context.handle('assertWarns',args,kwargs)\n \n def assertLogs(self,logger=None ,level=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n from ._log import _AssertLogsContext\n return _AssertLogsContext(self,logger,level,no_logs=False )\n \n def assertNoLogs(self,logger=None ,level=None ):\n ''\n\n\n\n \n from ._log import _AssertLogsContext\n return _AssertLogsContext(self,logger,level,no_logs=True )\n \n def _getAssertEqualityFunc(self,first,second):\n ''\n\n\n\n\n \n \n \n \n \n \n \n \n \n \n \n if type(first)is type(second):\n asserter=self._type_equality_funcs.get(type(first))\n if asserter is not None :\n if isinstance(asserter,str):\n asserter=getattr(self,asserter)\n return asserter\n \n return self._baseAssertEqual\n \n def _baseAssertEqual(self,first,second,msg=None ):\n ''\n if not first ==second:\n standardMsg='%s != %s'%_common_shorten_repr(first,second)\n msg=self._formatMessage(msg,standardMsg)\n raise self.failureException(msg)\n \n def assertEqual(self,first,second,msg=None ):\n ''\n\n \n assertion_func=self._getAssertEqualityFunc(first,second)\n assertion_func(first,second,msg=msg)\n \n def assertNotEqual(self,first,second,msg=None ):\n ''\n\n \n if not first !=second:\n msg=self._formatMessage(msg,'%s == %s'%(safe_repr(first),\n safe_repr(second)))\n raise self.failureException(msg)\n \n def assertAlmostEqual(self,first,second,places=None ,msg=None ,\n delta=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n \n if first ==second:\n \n return\n if delta is not None and places is not None :\n raise TypeError(\"specify delta or places not both\")\n \n diff=abs(first -second)\n if delta is not None :\n if diff <=delta:\n return\n \n standardMsg='%s != %s within %s delta (%s difference)'%(\n safe_repr(first),\n safe_repr(second),\n safe_repr(delta),\n safe_repr(diff))\n else :\n if places is None :\n places=7\n \n if round(diff,places)==0:\n return\n \n standardMsg='%s != %s within %r places (%s difference)'%(\n safe_repr(first),\n safe_repr(second),\n places,\n safe_repr(diff))\n msg=self._formatMessage(msg,standardMsg)\n raise self.failureException(msg)\n \n def assertNotAlmostEqual(self,first,second,places=None ,msg=None ,\n delta=None ):\n ''\n\n\n\n\n\n\n\n\n \n if delta is not None and places is not None :\n raise TypeError(\"specify delta or places not both\")\n diff=abs(first -second)\n if delta is not None :\n if not (first ==second)and diff >delta:\n return\n standardMsg='%s == %s within %s delta (%s difference)'%(\n safe_repr(first),\n safe_repr(second),\n safe_repr(delta),\n safe_repr(diff))\n else :\n if places is None :\n places=7\n if not (first ==second)and round(diff,places)!=0:\n return\n standardMsg='%s == %s within %r places'%(safe_repr(first),\n safe_repr(second),\n places)\n \n msg=self._formatMessage(msg,standardMsg)\n raise self.failureException(msg)\n \n def assertSequenceEqual(self,seq1,seq2,msg=None ,seq_type=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n if seq_type is not None :\n seq_type_name=seq_type.__name__\n if not isinstance(seq1,seq_type):\n raise self.failureException('First sequence is not a %s: %s'\n %(seq_type_name,safe_repr(seq1)))\n if not isinstance(seq2,seq_type):\n raise self.failureException('Second sequence is not a %s: %s'\n %(seq_type_name,safe_repr(seq2)))\n else :\n seq_type_name=\"sequence\"\n \n differing=None\n try :\n len1=len(seq1)\n except (TypeError,NotImplementedError):\n differing='First %s has no length. Non-sequence?'%(\n seq_type_name)\n \n if differing is None :\n try :\n len2=len(seq2)\n except (TypeError,NotImplementedError):\n differing='Second %s has no length. Non-sequence?'%(\n seq_type_name)\n \n if differing is None :\n if seq1 ==seq2:\n return\n \n differing='%ss differ: %s != %s\\n'%(\n (seq_type_name.capitalize(),)+\n _common_shorten_repr(seq1,seq2))\n \n for i in range(min(len1,len2)):\n try :\n item1=seq1[i]\n except (TypeError,IndexError,NotImplementedError):\n differing +=('\\nUnable to index element %d of first %s\\n'%\n (i,seq_type_name))\n break\n \n try :\n item2=seq2[i]\n except (TypeError,IndexError,NotImplementedError):\n differing +=('\\nUnable to index element %d of second %s\\n'%\n (i,seq_type_name))\n break\n \n if item1 !=item2:\n differing +=('\\nFirst differing element %d:\\n%s\\n%s\\n'%\n ((i,)+_common_shorten_repr(item1,item2)))\n break\n else :\n if (len1 ==len2 and seq_type is None and\n type(seq1)!=type(seq2)):\n \n return\n \n if len1 >len2:\n differing +=('\\nFirst %s contains %d additional '\n 'elements.\\n'%(seq_type_name,len1 -len2))\n try :\n differing +=('First extra element %d:\\n%s\\n'%\n (len2,safe_repr(seq1[len2])))\n except (TypeError,IndexError,NotImplementedError):\n differing +=('Unable to index element %d '\n 'of first %s\\n'%(len2,seq_type_name))\n elif len1 self._diffThreshold or\n len(second)>self._diffThreshold):\n self._baseAssertEqual(first,second,msg)\n firstlines=first.splitlines(keepends=True )\n secondlines=second.splitlines(keepends=True )\n if len(firstlines)==1 and first.strip('\\r\\n')==first:\n firstlines=[first+'\\n']\n secondlines=[second+'\\n']\n standardMsg='%s != %s'%_common_shorten_repr(first,second)\n diff='\\n'+''.join(difflib.ndiff(firstlines,secondlines))\n standardMsg=self._truncateMessage(standardMsg,diff)\n self.fail(self._formatMessage(msg,standardMsg))\n \n def assertLess(self,a,b,msg=None ):\n ''\n if not a b:\n standardMsg='%s not greater than %s'%(safe_repr(a),safe_repr(b))\n self.fail(self._formatMessage(msg,standardMsg))\n \n def assertGreaterEqual(self,a,b,msg=None ):\n ''\n if not a >=b:\n standardMsg='%s not greater than or equal to %s'%(safe_repr(a),safe_repr(b))\n self.fail(self._formatMessage(msg,standardMsg))\n \n def assertIsNone(self,obj,msg=None ):\n ''\n if obj is not None :\n standardMsg='%s is not None'%(safe_repr(obj),)\n self.fail(self._formatMessage(msg,standardMsg))\n \n def assertIsNotNone(self,obj,msg=None ):\n ''\n if obj is None :\n standardMsg='unexpectedly None'\n self.fail(self._formatMessage(msg,standardMsg))\n \n def assertIsInstance(self,obj,cls,msg=None ):\n ''\n \n if not isinstance(obj,cls):\n standardMsg='%s is not an instance of %r'%(safe_repr(obj),cls)\n self.fail(self._formatMessage(msg,standardMsg))\n \n def assertNotIsInstance(self,obj,cls,msg=None ):\n ''\n if isinstance(obj,cls):\n standardMsg='%s is an instance of %r'%(safe_repr(obj),cls)\n self.fail(self._formatMessage(msg,standardMsg))\n \n def assertRaisesRegex(self,expected_exception,expected_regex,\n *args,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n \n context=_AssertRaisesContext(expected_exception,self,expected_regex)\n return context.handle('assertRaisesRegex',args,kwargs)\n \n def assertWarnsRegex(self,expected_warning,expected_regex,\n *args,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n context=_AssertWarnsContext(expected_warning,self,expected_regex)\n return context.handle('assertWarnsRegex',args,kwargs)\n \n def assertRegex(self,text,expected_regex,msg=None ):\n ''\n if isinstance(expected_regex,(str,bytes)):\n assert expected_regex,\"expected_regex must not be empty.\"\n expected_regex=re.compile(expected_regex)\n if not expected_regex.search(text):\n standardMsg=\"Regex didn't match: %r not found in %r\"%(\n expected_regex.pattern,text)\n \n msg=self._formatMessage(msg,standardMsg)\n raise self.failureException(msg)\n \n def assertNotRegex(self,text,unexpected_regex,msg=None ):\n ''\n if isinstance(unexpected_regex,(str,bytes)):\n unexpected_regex=re.compile(unexpected_regex)\n match=unexpected_regex.search(text)\n if match:\n standardMsg='Regex matched: %r matches %r in %r'%(\n text[match.start():match.end()],\n unexpected_regex.pattern,\n text)\n \n msg=self._formatMessage(msg,standardMsg)\n raise self.failureException(msg)\n \n \n def _deprecate(original_func):\n def deprecated_func(*args,**kwargs):\n warnings.warn(\n 'Please use {0} instead.'.format(original_func.__name__),\n DeprecationWarning,2)\n return original_func(*args,**kwargs)\n return deprecated_func\n \n \n failUnlessEqual=assertEquals=_deprecate(assertEqual)\n failIfEqual=assertNotEquals=_deprecate(assertNotEqual)\n failUnlessAlmostEqual=assertAlmostEquals=_deprecate(assertAlmostEqual)\n failIfAlmostEqual=assertNotAlmostEquals=_deprecate(assertNotAlmostEqual)\n failUnless=assert_=_deprecate(assertTrue)\n failUnlessRaises=_deprecate(assertRaises)\n failIf=_deprecate(assertFalse)\n assertRaisesRegexp=_deprecate(assertRaisesRegex)\n assertRegexpMatches=_deprecate(assertRegex)\n assertNotRegexpMatches=_deprecate(assertNotRegex)\n \n \n \nclass FunctionTestCase(TestCase):\n ''\n\n\n\n\n\n \n \n def __init__(self,testFunc,setUp=None ,tearDown=None ,description=None ):\n super(FunctionTestCase,self).__init__()\n self._setUpFunc=setUp\n self._tearDownFunc=tearDown\n self._testFunc=testFunc\n self._description=description\n \n def setUp(self):\n if self._setUpFunc is not None :\n self._setUpFunc()\n \n def tearDown(self):\n if self._tearDownFunc is not None :\n self._tearDownFunc()\n \n def runTest(self):\n self._testFunc()\n \n def id(self):\n return self._testFunc.__name__\n \n def __eq__(self,other):\n if not isinstance(other,self.__class__):\n return NotImplemented\n \n return self._setUpFunc ==other._setUpFunc and\\\n self._tearDownFunc ==other._tearDownFunc and\\\n self._testFunc ==other._testFunc and\\\n self._description ==other._description\n \n def __hash__(self):\n return hash((type(self),self._setUpFunc,self._tearDownFunc,\n self._testFunc,self._description))\n \n def __str__(self):\n return \"%s (%s)\"%(strclass(self.__class__),\n self._testFunc.__name__)\n \n def __repr__(self):\n return \"<%s tec=%s>\"%(strclass(self.__class__),\n self._testFunc)\n \n def shortDescription(self):\n if self._description is not None :\n return self._description\n doc=self._testFunc.__doc__\n return doc and doc.split(\"\\n\")[0].strip()or None\n \n \nclass _SubTest(TestCase):\n\n def __init__(self,test_case,message,params):\n super().__init__()\n self._message=message\n self.test_case=test_case\n self.params=params\n self.failureException=test_case.failureException\n \n def runTest(self):\n raise NotImplementedError(\"subtests cannot be run directly\")\n \n def _subDescription(self):\n parts=[]\n if self._message is not _subtest_msg_sentinel:\n parts.append(\"[{}]\".format(self._message))\n if self.params:\n params_desc=', '.join(\n \"{}={!r}\".format(k,v)\n for (k,v)in self.params.items())\n parts.append(\"({})\".format(params_desc))\n return \" \".join(parts)or '()'\n \n def id(self):\n return \"{} {}\".format(self.test_case.id(),self._subDescription())\n \n def shortDescription(self):\n ''\n\n \n return self.test_case.shortDescription()\n \n def __str__(self):\n return \"{} {}\".format(self.test_case,self._subDescription())\n", ["collections", "contextlib", "difflib", "functools", "pprint", "re", "sys", "traceback", "types", "unittest", "unittest._log", "unittest.result", "unittest.util", "warnings"]], "unittest.loader": [".py", "''\n\nimport os\nimport re\nimport sys\nimport traceback\nimport types\nimport functools\n\nfrom fnmatch import fnmatch,fnmatchcase\n\nfrom . import case,suite,util\n\n__unittest=True\n\n\n\n\nVALID_MODULE_NAME=re.compile(r'[_a-z]\\w*\\.py$',re.IGNORECASE)\n\n\nclass _FailedTest(case.TestCase):\n _testMethodName=None\n \n def __init__(self,method_name,exception):\n self._exception=exception\n super(_FailedTest,self).__init__(method_name)\n \n def __getattr__(self,name):\n if name !=self._testMethodName:\n return super(_FailedTest,self).__getattr__(name)\n def testFailure():\n raise self._exception\n return testFailure\n \n \ndef _make_failed_import_test(name,suiteClass):\n message='Failed to import test module: %s\\n%s'%(\n name,traceback.format_exc())\n return _make_failed_test(name,ImportError(message),suiteClass,message)\n \ndef _make_failed_load_tests(name,exception,suiteClass):\n message='Failed to call load_tests:\\n%s'%(traceback.format_exc(),)\n return _make_failed_test(\n name,exception,suiteClass,message)\n \ndef _make_failed_test(methodname,exception,suiteClass,message):\n test=_FailedTest(methodname,exception)\n return suiteClass((test,)),message\n \ndef _make_skipped_test(methodname,exception,suiteClass):\n @case.skip(str(exception))\n def testSkipped(self):\n pass\n attrs={methodname:testSkipped}\n TestClass=type(\"ModuleSkipped\",(case.TestCase,),attrs)\n return suiteClass((TestClass(methodname),))\n \ndef _splitext(path):\n return os.path.splitext(path)[0]\n \n \nclass TestLoader(object):\n ''\n\n\n \n testMethodPrefix='test'\n sortTestMethodsUsing=staticmethod(util.three_way_cmp)\n testNamePatterns=None\n suiteClass=suite.TestSuite\n _top_level_dir=None\n \n def __init__(self):\n super(TestLoader,self).__init__()\n self.errors=[]\n \n \n self._loading_packages=set()\n \n def loadTestsFromTestCase(self,testCaseClass):\n ''\n if issubclass(testCaseClass,suite.TestSuite):\n raise TypeError(\"Test cases should not be derived from \"\n \"TestSuite. Maybe you meant to derive from \"\n \"TestCase?\")\n testCaseNames=self.getTestCaseNames(testCaseClass)\n if not testCaseNames and hasattr(testCaseClass,'runTest'):\n testCaseNames=['runTest']\n loaded_suite=self.suiteClass(map(testCaseClass,testCaseNames))\n return loaded_suite\n \n def loadTestsFromModule(self,module,*,pattern=None ):\n ''\n tests=[]\n for name in dir(module):\n obj=getattr(module,name)\n if isinstance(obj,type)and issubclass(obj,case.TestCase):\n tests.append(self.loadTestsFromTestCase(obj))\n \n load_tests=getattr(module,'load_tests',None )\n tests=self.suiteClass(tests)\n if load_tests is not None :\n try :\n return load_tests(self,tests,pattern)\n except Exception as e:\n error_case,error_message=_make_failed_load_tests(\n module.__name__,e,self.suiteClass)\n self.errors.append(error_message)\n return error_case\n return tests\n \n def loadTestsFromName(self,name,module=None ):\n ''\n\n\n\n\n\n\n \n parts=name.split('.')\n error_case,error_message=None ,None\n if module is None :\n parts_copy=parts[:]\n while parts_copy:\n try :\n module_name='.'.join(parts_copy)\n module=__import__(module_name)\n break\n except ImportError:\n next_attribute=parts_copy.pop()\n \n error_case,error_message=_make_failed_import_test(\n next_attribute,self.suiteClass)\n if not parts_copy:\n \n self.errors.append(error_message)\n return error_case\n parts=parts[1:]\n obj=module\n for part in parts:\n try :\n parent,obj=obj,getattr(obj,part)\n except AttributeError as e:\n \n if (getattr(obj,'__path__',None )is not None\n and error_case is not None ):\n \n \n \n \n \n self.errors.append(error_message)\n return error_case\n else :\n \n error_case,error_message=_make_failed_test(\n part,e,self.suiteClass,\n 'Failed to access attribute:\\n%s'%(\n traceback.format_exc(),))\n self.errors.append(error_message)\n return error_case\n \n if isinstance(obj,types.ModuleType):\n return self.loadTestsFromModule(obj)\n elif isinstance(obj,type)and issubclass(obj,case.TestCase):\n return self.loadTestsFromTestCase(obj)\n elif (isinstance(obj,types.FunctionType)and\n isinstance(parent,type)and\n issubclass(parent,case.TestCase)):\n name=parts[-1]\n inst=parent(name)\n \n if not isinstance(getattr(inst,name),types.FunctionType):\n return self.suiteClass([inst])\n elif isinstance(obj,suite.TestSuite):\n return obj\n if callable(obj):\n test=obj()\n if isinstance(test,suite.TestSuite):\n return test\n elif isinstance(test,case.TestCase):\n return self.suiteClass([test])\n else :\n raise TypeError(\"calling %s returned %s, not a test\"%\n (obj,test))\n else :\n raise TypeError(\"don't know how to make test from: %s\"%obj)\n \n def loadTestsFromNames(self,names,module=None ):\n ''\n\n \n suites=[self.loadTestsFromName(name,module)for name in names]\n return self.suiteClass(suites)\n \n def getTestCaseNames(self,testCaseClass):\n ''\n \n def shouldIncludeMethod(attrname):\n if not attrname.startswith(self.testMethodPrefix):\n return False\n testFunc=getattr(testCaseClass,attrname)\n if not callable(testFunc):\n return False\n fullName=f'%s.%s.%s'%(\n testCaseClass.__module__,testCaseClass.__qualname__,attrname\n )\n return self.testNamePatterns is None or\\\n any(fnmatchcase(fullName,pattern)for pattern in self.testNamePatterns)\n testFnNames=list(filter(shouldIncludeMethod,dir(testCaseClass)))\n if self.sortTestMethodsUsing:\n testFnNames.sort(key=functools.cmp_to_key(self.sortTestMethodsUsing))\n return testFnNames\n \n def discover(self,start_dir,pattern='test*.py',top_level_dir=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n set_implicit_top=False\n if top_level_dir is None and self._top_level_dir is not None :\n \n top_level_dir=self._top_level_dir\n elif top_level_dir is None :\n set_implicit_top=True\n top_level_dir=start_dir\n \n top_level_dir=os.path.abspath(top_level_dir)\n \n if not top_level_dir in sys.path:\n \n \n \n \n sys.path.insert(0,top_level_dir)\n self._top_level_dir=top_level_dir\n \n is_not_importable=False\n if os.path.isdir(os.path.abspath(start_dir)):\n start_dir=os.path.abspath(start_dir)\n if start_dir !=top_level_dir:\n is_not_importable=not os.path.isfile(os.path.join(start_dir,'__init__.py'))\n else :\n \n try :\n __import__(start_dir)\n except ImportError:\n is_not_importable=True\n else :\n the_module=sys.modules[start_dir]\n top_part=start_dir.split('.')[0]\n try :\n start_dir=os.path.abspath(\n os.path.dirname((the_module.__file__)))\n except AttributeError:\n if the_module.__name__ in sys.builtin_module_names:\n \n raise TypeError('Can not use builtin modules '\n 'as dotted module names')from None\n else :\n raise TypeError(\n f\"don't know how to discover from {the_module !r}\"\n )from None\n \n if set_implicit_top:\n self._top_level_dir=self._get_directory_containing_module(top_part)\n sys.path.remove(top_level_dir)\n \n if is_not_importable:\n raise ImportError('Start directory is not importable: %r'%start_dir)\n \n tests=list(self._find_tests(start_dir,pattern))\n return self.suiteClass(tests)\n \n def _get_directory_containing_module(self,module_name):\n module=sys.modules[module_name]\n full_path=os.path.abspath(module.__file__)\n \n if os.path.basename(full_path).lower().startswith('__init__.py'):\n return os.path.dirname(os.path.dirname(full_path))\n else :\n \n \n \n return os.path.dirname(full_path)\n \n def _get_name_from_path(self,path):\n if path ==self._top_level_dir:\n return '.'\n path=_splitext(os.path.normpath(path))\n \n _relpath=os.path.relpath(path,self._top_level_dir)\n assert not os.path.isabs(_relpath),\"Path must be within the project\"\n assert not _relpath.startswith('..'),\"Path must be within the project\"\n \n name=_relpath.replace(os.path.sep,'.')\n return name\n \n def _get_module_from_name(self,name):\n __import__(name)\n return sys.modules[name]\n \n def _match_path(self,path,full_path,pattern):\n \n return fnmatch(path,pattern)\n \n def _find_tests(self,start_dir,pattern):\n ''\n \n name=self._get_name_from_path(start_dir)\n \n \n if name !='.'and name not in self._loading_packages:\n \n \n tests,should_recurse=self._find_test_path(start_dir,pattern)\n if tests is not None :\n yield tests\n if not should_recurse:\n \n \n return\n \n paths=sorted(os.listdir(start_dir))\n for path in paths:\n full_path=os.path.join(start_dir,path)\n tests,should_recurse=self._find_test_path(full_path,pattern)\n if tests is not None :\n yield tests\n if should_recurse:\n \n name=self._get_name_from_path(full_path)\n self._loading_packages.add(name)\n try :\n yield from self._find_tests(full_path,pattern)\n finally :\n self._loading_packages.discard(name)\n \n def _find_test_path(self,full_path,pattern):\n ''\n\n\n\n\n\n \n basename=os.path.basename(full_path)\n if os.path.isfile(full_path):\n if not VALID_MODULE_NAME.match(basename):\n \n return None ,False\n if not self._match_path(basename,full_path,pattern):\n return None ,False\n \n name=self._get_name_from_path(full_path)\n try :\n module=self._get_module_from_name(name)\n except case.SkipTest as e:\n return _make_skipped_test(name,e,self.suiteClass),False\n except :\n error_case,error_message=\\\n _make_failed_import_test(name,self.suiteClass)\n self.errors.append(error_message)\n return error_case,False\n else :\n mod_file=os.path.abspath(\n getattr(module,'__file__',full_path))\n realpath=_splitext(\n os.path.realpath(mod_file))\n fullpath_noext=_splitext(\n os.path.realpath(full_path))\n if realpath.lower()!=fullpath_noext.lower():\n module_dir=os.path.dirname(realpath)\n mod_name=_splitext(\n os.path.basename(full_path))\n expected_dir=os.path.dirname(full_path)\n msg=(\"%r module incorrectly imported from %r. Expected \"\n \"%r. Is this module globally installed?\")\n raise ImportError(\n msg %(mod_name,module_dir,expected_dir))\n return self.loadTestsFromModule(module,pattern=pattern),False\n elif os.path.isdir(full_path):\n if not os.path.isfile(os.path.join(full_path,'__init__.py')):\n return None ,False\n \n load_tests=None\n tests=None\n name=self._get_name_from_path(full_path)\n try :\n package=self._get_module_from_name(name)\n except case.SkipTest as e:\n return _make_skipped_test(name,e,self.suiteClass),False\n except :\n error_case,error_message=\\\n _make_failed_import_test(name,self.suiteClass)\n self.errors.append(error_message)\n return error_case,False\n else :\n load_tests=getattr(package,'load_tests',None )\n \n self._loading_packages.add(name)\n try :\n tests=self.loadTestsFromModule(package,pattern=pattern)\n if load_tests is not None :\n \n return tests,False\n return tests,True\n finally :\n self._loading_packages.discard(name)\n else :\n return None ,False\n \n \ndefaultTestLoader=TestLoader()\n\n\n\n\n\ndef _makeLoader(prefix,sortUsing,suiteClass=None ,testNamePatterns=None ):\n loader=TestLoader()\n loader.sortTestMethodsUsing=sortUsing\n loader.testMethodPrefix=prefix\n loader.testNamePatterns=testNamePatterns\n if suiteClass:\n loader.suiteClass=suiteClass\n return loader\n \ndef getTestCaseNames(testCaseClass,prefix,sortUsing=util.three_way_cmp,testNamePatterns=None ):\n import warnings\n warnings.warn(\n \"unittest.getTestCaseNames() is deprecated and will be removed in Python 3.13. \"\n \"Please use unittest.TestLoader.getTestCaseNames() instead.\",\n DeprecationWarning,stacklevel=2\n )\n return _makeLoader(prefix,sortUsing,testNamePatterns=testNamePatterns).getTestCaseNames(testCaseClass)\n \ndef makeSuite(testCaseClass,prefix='test',sortUsing=util.three_way_cmp,\nsuiteClass=suite.TestSuite):\n import warnings\n warnings.warn(\n \"unittest.makeSuite() is deprecated and will be removed in Python 3.13. \"\n \"Please use unittest.TestLoader.loadTestsFromTestCase() instead.\",\n DeprecationWarning,stacklevel=2\n )\n return _makeLoader(prefix,sortUsing,suiteClass).loadTestsFromTestCase(\n testCaseClass)\n \ndef findTestCases(module,prefix='test',sortUsing=util.three_way_cmp,\nsuiteClass=suite.TestSuite):\n import warnings\n warnings.warn(\n \"unittest.findTestCases() is deprecated and will be removed in Python 3.13. \"\n \"Please use unittest.TestLoader.loadTestsFromModule() instead.\",\n DeprecationWarning,stacklevel=2\n )\n return _makeLoader(prefix,sortUsing,suiteClass).loadTestsFromModule(\\\n module)\n", ["fnmatch", "functools", "os", "re", "sys", "traceback", "types", "unittest", "unittest.case", "unittest.suite", "unittest.util", "warnings"]], "unittest.main": [".py", "''\n\nimport sys\nimport argparse\nimport os\nimport warnings\n\nfrom . import loader,runner\nfrom .signals import installHandler\n\n__unittest=True\n_NO_TESTS_EXITCODE=5\n\nMAIN_EXAMPLES=\"\"\"\\\nExamples:\n %(prog)s test_module - run tests from test_module\n %(prog)s module.TestClass - run tests from module.TestClass\n %(prog)s module.Class.test_method - run specified test method\n %(prog)s path/to/test_file.py - run tests from test_file.py\n\"\"\"\n\nMODULE_EXAMPLES=\"\"\"\\\nExamples:\n %(prog)s - run default set of tests\n %(prog)s MyTestSuite - run suite 'MyTestSuite'\n %(prog)s MyTestCase.testSomething - run MyTestCase.testSomething\n %(prog)s MyTestCase - run all 'test*' test methods\n in MyTestCase\n\"\"\"\n\ndef _convert_name(name):\n\n\n\n\n if os.path.isfile(name)and name.lower().endswith('.py'):\n if os.path.isabs(name):\n rel_path=os.path.relpath(name,os.getcwd())\n if os.path.isabs(rel_path)or rel_path.startswith(os.pardir):\n return name\n name=rel_path\n \n \n return os.path.normpath(name)[:-3].replace('\\\\','.').replace('/','.')\n return name\n \ndef _convert_names(names):\n return [_convert_name(name)for name in names]\n \n \ndef _convert_select_pattern(pattern):\n if not '*'in pattern:\n pattern='*%s*'%pattern\n return pattern\n \n \nclass TestProgram(object):\n ''\n\n \n \n module=None\n verbosity=1\n failfast=catchbreak=buffer=progName=warnings=testNamePatterns=None\n _discovery_parser=None\n \n def __init__(self,module='__main__',defaultTest=None ,argv=None ,\n testRunner=None ,testLoader=loader.defaultTestLoader,\n exit=True ,verbosity=1,failfast=None ,catchbreak=None ,\n buffer=None ,warnings=None ,*,tb_locals=False ,\n durations=None ):\n if isinstance(module,str):\n self.module=__import__(module)\n for part in module.split('.')[1:]:\n self.module=getattr(self.module,part)\n else :\n self.module=module\n if argv is None :\n argv=sys.argv\n \n self.exit=exit\n self.failfast=failfast\n self.catchbreak=catchbreak\n self.verbosity=verbosity\n self.buffer=buffer\n self.tb_locals=tb_locals\n self.durations=durations\n if warnings is None and not sys.warnoptions:\n \n \n \n self.warnings='default'\n else :\n \n \n \n \n \n self.warnings=warnings\n self.defaultTest=defaultTest\n self.testRunner=testRunner\n self.testLoader=testLoader\n self.progName=os.path.basename(argv[0])\n self.parseArgs(argv)\n self.runTests()\n \n def usageExit(self,msg=None ):\n warnings.warn(\"TestProgram.usageExit() is deprecated and will be\"\n \" removed in Python 3.13\",DeprecationWarning)\n if msg:\n print(msg)\n if self._discovery_parser is None :\n self._initArgParsers()\n self._print_help()\n sys.exit(2)\n \n def _print_help(self,*args,**kwargs):\n if self.module is None :\n print(self._main_parser.format_help())\n print(MAIN_EXAMPLES %{'prog':self.progName})\n self._discovery_parser.print_help()\n else :\n print(self._main_parser.format_help())\n print(MODULE_EXAMPLES %{'prog':self.progName})\n \n def parseArgs(self,argv):\n self._initArgParsers()\n if self.module is None :\n if len(argv)>1 and argv[1].lower()=='discover':\n self._do_discovery(argv[2:])\n return\n self._main_parser.parse_args(argv[1:],self)\n if not self.tests:\n \n \n self._do_discovery([])\n return\n else :\n self._main_parser.parse_args(argv[1:],self)\n \n if self.tests:\n self.testNames=_convert_names(self.tests)\n if __name__ =='__main__':\n \n self.module=None\n elif self.defaultTest is None :\n \n self.testNames=None\n elif isinstance(self.defaultTest,str):\n self.testNames=(self.defaultTest,)\n else :\n self.testNames=list(self.defaultTest)\n self.createTests()\n \n def createTests(self,from_discovery=False ,Loader=None ):\n if self.testNamePatterns:\n self.testLoader.testNamePatterns=self.testNamePatterns\n if from_discovery:\n loader=self.testLoader if Loader is None else Loader()\n self.test=loader.discover(self.start,self.pattern,self.top)\n elif self.testNames is None :\n self.test=self.testLoader.loadTestsFromModule(self.module)\n else :\n self.test=self.testLoader.loadTestsFromNames(self.testNames,\n self.module)\n \n def _initArgParsers(self):\n parent_parser=self._getParentArgParser()\n self._main_parser=self._getMainArgParser(parent_parser)\n self._discovery_parser=self._getDiscoveryArgParser(parent_parser)\n \n def _getParentArgParser(self):\n parser=argparse.ArgumentParser(add_help=False )\n \n parser.add_argument('-v','--verbose',dest='verbosity',\n action='store_const',const=2,\n help='Verbose output')\n parser.add_argument('-q','--quiet',dest='verbosity',\n action='store_const',const=0,\n help='Quiet output')\n parser.add_argument('--locals',dest='tb_locals',\n action='store_true',\n help='Show local variables in tracebacks')\n parser.add_argument('--durations',dest='durations',type=int,\n default=None ,metavar=\"N\",\n help='Show the N slowest test cases (N=0 for all)')\n if self.failfast is None :\n parser.add_argument('-f','--failfast',dest='failfast',\n action='store_true',\n help='Stop on first fail or error')\n self.failfast=False\n if self.catchbreak is None :\n parser.add_argument('-c','--catch',dest='catchbreak',\n action='store_true',\n help='Catch Ctrl-C and display results so far')\n self.catchbreak=False\n if self.buffer is None :\n parser.add_argument('-b','--buffer',dest='buffer',\n action='store_true',\n help='Buffer stdout and stderr during tests')\n self.buffer=False\n if self.testNamePatterns is None :\n parser.add_argument('-k',dest='testNamePatterns',\n action='append',type=_convert_select_pattern,\n help='Only run tests which match the given substring')\n self.testNamePatterns=[]\n \n return parser\n \n def _getMainArgParser(self,parent):\n parser=argparse.ArgumentParser(parents=[parent])\n parser.prog=self.progName\n parser.print_help=self._print_help\n \n parser.add_argument('tests',nargs='*',\n help='a list of any number of test modules, '\n 'classes and test methods.')\n \n return parser\n \n def _getDiscoveryArgParser(self,parent):\n parser=argparse.ArgumentParser(parents=[parent])\n parser.prog='%s discover'%self.progName\n parser.epilog=('For test discovery all test modules must be '\n 'importable from the top level directory of the '\n 'project.')\n \n parser.add_argument('-s','--start-directory',dest='start',\n help=\"Directory to start discovery ('.' default)\")\n parser.add_argument('-p','--pattern',dest='pattern',\n help=\"Pattern to match tests ('test*.py' default)\")\n parser.add_argument('-t','--top-level-directory',dest='top',\n help='Top level directory of project (defaults to '\n 'start directory)')\n for arg in ('start','pattern','top'):\n parser.add_argument(arg,nargs='?',\n default=argparse.SUPPRESS,\n help=argparse.SUPPRESS)\n \n return parser\n \n def _do_discovery(self,argv,Loader=None ):\n self.start='.'\n self.pattern='test*.py'\n self.top=None\n if argv is not None :\n \n if self._discovery_parser is None :\n \n self._initArgParsers()\n self._discovery_parser.parse_args(argv,self)\n \n self.createTests(from_discovery=True ,Loader=Loader)\n \n def runTests(self):\n if self.catchbreak:\n installHandler()\n if self.testRunner is None :\n self.testRunner=runner.TextTestRunner\n if isinstance(self.testRunner,type):\n try :\n try :\n testRunner=self.testRunner(verbosity=self.verbosity,\n failfast=self.failfast,\n buffer=self.buffer,\n warnings=self.warnings,\n tb_locals=self.tb_locals,\n durations=self.durations)\n except TypeError:\n \n testRunner=self.testRunner(verbosity=self.verbosity,\n failfast=self.failfast,\n buffer=self.buffer,\n warnings=self.warnings)\n except TypeError:\n \n testRunner=self.testRunner()\n else :\n \n testRunner=self.testRunner\n self.result=testRunner.run(self.test)\n if self.exit:\n if self.result.testsRun ==0:\n sys.exit(_NO_TESTS_EXITCODE)\n elif self.result.wasSuccessful():\n sys.exit(0)\n else :\n sys.exit(1)\n \n \nmain=TestProgram\n", ["argparse", "os", "sys", "unittest", "unittest.loader", "unittest.runner", "unittest.signals", "warnings"]], "unittest.mock": [".py", "\n\n\n\n\n\n__all__=(\n'Mock',\n'MagicMock',\n'patch',\n'sentinel',\n'DEFAULT',\n'ANY',\n'call',\n'create_autospec',\n'AsyncMock',\n'FILTER_DIR',\n'NonCallableMock',\n'NonCallableMagicMock',\n'mock_open',\n'PropertyMock',\n'seal',\n)\n\n\nimport asyncio\nimport contextlib\nimport io\nimport inspect\nimport pprint\nimport sys\nimport builtins\nimport pkgutil\nfrom asyncio import iscoroutinefunction\nfrom types import CodeType,ModuleType,MethodType\nfrom unittest.util import safe_repr\nfrom functools import wraps,partial\n\n\nclass InvalidSpecError(Exception):\n ''\n \n \n_builtins={name for name in dir(builtins)if not name.startswith('_')}\n\nFILTER_DIR=True\n\n\n\n_safe_super=super\n\ndef _is_async_obj(obj):\n if _is_instance_mock(obj)and not isinstance(obj,AsyncMock):\n return False\n if hasattr(obj,'__func__'):\n obj=getattr(obj,'__func__')\n return iscoroutinefunction(obj)or inspect.isawaitable(obj)\n \n \ndef _is_async_func(func):\n if getattr(func,'__code__',None ):\n return iscoroutinefunction(func)\n else :\n return False\n \n \ndef _is_instance_mock(obj):\n\n\n return issubclass(type(obj),NonCallableMock)\n \n \ndef _is_exception(obj):\n return (\n isinstance(obj,BaseException)or\n isinstance(obj,type)and issubclass(obj,BaseException)\n )\n \n \ndef _extract_mock(obj):\n\n\n if isinstance(obj,FunctionTypes)and hasattr(obj,'mock'):\n return obj.mock\n else :\n return obj\n \n \ndef _get_signature_object(func,as_instance,eat_self):\n ''\n\n\n\n \n if isinstance(func,type)and not as_instance:\n \n func=func.__init__\n \n eat_self=True\n elif not isinstance(func,FunctionTypes):\n \n \n try :\n func=func.__call__\n except AttributeError:\n return None\n if eat_self:\n sig_func=partial(func,None )\n else :\n sig_func=func\n try :\n return func,inspect.signature(sig_func)\n except ValueError:\n \n return None\n \n \ndef _check_signature(func,mock,skipfirst,instance=False ):\n sig=_get_signature_object(func,instance,skipfirst)\n if sig is None :\n return\n func,sig=sig\n def checksig(self,/,*args,**kwargs):\n sig.bind(*args,**kwargs)\n _copy_func_details(func,checksig)\n type(mock)._mock_check_sig=checksig\n type(mock).__signature__=sig\n \n \ndef _copy_func_details(func,funcopy):\n\n\n for attribute in (\n '__name__','__doc__','__text_signature__',\n '__module__','__defaults__','__kwdefaults__',\n ):\n try :\n setattr(funcopy,attribute,getattr(func,attribute))\n except AttributeError:\n pass\n \n \ndef _callable(obj):\n if isinstance(obj,type):\n return True\n if isinstance(obj,(staticmethod,classmethod,MethodType)):\n return _callable(obj.__func__)\n if getattr(obj,'__call__',None )is not None :\n return True\n return False\n \n \ndef _is_list(obj):\n\n\n return type(obj)in (list,tuple)\n \n \ndef _instance_callable(obj):\n ''\n \n if not isinstance(obj,type):\n \n return getattr(obj,'__call__',None )is not None\n \n \n \n for base in (obj,)+obj.__mro__:\n if base.__dict__.get('__call__')is not None :\n return True\n return False\n \n \ndef _set_signature(mock,original,instance=False ):\n\n\n\n\n skipfirst=isinstance(original,type)\n result=_get_signature_object(original,instance,skipfirst)\n if result is None :\n return mock\n func,sig=result\n def checksig(*args,**kwargs):\n sig.bind(*args,**kwargs)\n _copy_func_details(func,checksig)\n \n name=original.__name__\n if not name.isidentifier():\n name='funcopy'\n context={'_checksig_':checksig,'mock':mock}\n src=\"\"\"def %s(*args, **kwargs):\n _checksig_(*args, **kwargs)\n return mock(*args, **kwargs)\"\"\"%name\n exec(src,context)\n funcopy=context[name]\n _setup_func(funcopy,mock,sig)\n return funcopy\n \n \ndef _setup_func(funcopy,mock,sig):\n funcopy.mock=mock\n \n def assert_called_with(*args,**kwargs):\n return mock.assert_called_with(*args,**kwargs)\n def assert_called(*args,**kwargs):\n return mock.assert_called(*args,**kwargs)\n def assert_not_called(*args,**kwargs):\n return mock.assert_not_called(*args,**kwargs)\n def assert_called_once(*args,**kwargs):\n return mock.assert_called_once(*args,**kwargs)\n def assert_called_once_with(*args,**kwargs):\n return mock.assert_called_once_with(*args,**kwargs)\n def assert_has_calls(*args,**kwargs):\n return mock.assert_has_calls(*args,**kwargs)\n def assert_any_call(*args,**kwargs):\n return mock.assert_any_call(*args,**kwargs)\n def reset_mock():\n funcopy.method_calls=_CallList()\n funcopy.mock_calls=_CallList()\n mock.reset_mock()\n ret=funcopy.return_value\n if _is_instance_mock(ret)and not ret is mock:\n ret.reset_mock()\n \n funcopy.called=False\n funcopy.call_count=0\n funcopy.call_args=None\n funcopy.call_args_list=_CallList()\n funcopy.method_calls=_CallList()\n funcopy.mock_calls=_CallList()\n \n funcopy.return_value=mock.return_value\n funcopy.side_effect=mock.side_effect\n funcopy._mock_children=mock._mock_children\n \n funcopy.assert_called_with=assert_called_with\n funcopy.assert_called_once_with=assert_called_once_with\n funcopy.assert_has_calls=assert_has_calls\n funcopy.assert_any_call=assert_any_call\n funcopy.reset_mock=reset_mock\n funcopy.assert_called=assert_called\n funcopy.assert_not_called=assert_not_called\n funcopy.assert_called_once=assert_called_once\n funcopy.__signature__=sig\n \n mock._mock_delegate=funcopy\n \n \ndef _setup_async_mock(mock):\n mock._is_coroutine=asyncio.coroutines._is_coroutine\n mock.await_count=0\n mock.await_args=None\n mock.await_args_list=_CallList()\n \n \n \n \n def wrapper(attr,/,*args,**kwargs):\n return getattr(mock.mock,attr)(*args,**kwargs)\n \n for attribute in ('assert_awaited',\n 'assert_awaited_once',\n 'assert_awaited_with',\n 'assert_awaited_once_with',\n 'assert_any_await',\n 'assert_has_awaits',\n 'assert_not_awaited'):\n \n \n \n \n \n setattr(mock,attribute,partial(wrapper,attribute))\n \n \ndef _is_magic(name):\n return '__%s__'%name[2:-2]==name\n \n \nclass _SentinelObject(object):\n ''\n def __init__(self,name):\n self.name=name\n \n def __repr__(self):\n return 'sentinel.%s'%self.name\n \n def __reduce__(self):\n return 'sentinel.%s'%self.name\n \n \nclass _Sentinel(object):\n ''\n def __init__(self):\n self._sentinels={}\n \n def __getattr__(self,name):\n if name =='__bases__':\n \n raise AttributeError\n return self._sentinels.setdefault(name,_SentinelObject(name))\n \n def __reduce__(self):\n return 'sentinel'\n \n \nsentinel=_Sentinel()\n\nDEFAULT=sentinel.DEFAULT\n_missing=sentinel.MISSING\n_deleted=sentinel.DELETED\n\n\n_allowed_names={\n'return_value','_mock_return_value','side_effect',\n'_mock_side_effect','_mock_parent','_mock_new_parent',\n'_mock_name','_mock_new_name'\n}\n\n\ndef _delegating_property(name):\n _allowed_names.add(name)\n _the_name='_mock_'+name\n def _get(self,name=name,_the_name=_the_name):\n sig=self._mock_delegate\n if sig is None :\n return getattr(self,_the_name)\n return getattr(sig,name)\n def _set(self,value,name=name,_the_name=_the_name):\n sig=self._mock_delegate\n if sig is None :\n self.__dict__[_the_name]=value\n else :\n setattr(sig,name,value)\n \n return property(_get,_set)\n \n \n \nclass _CallList(list):\n\n def __contains__(self,value):\n if not isinstance(value,list):\n return list.__contains__(self,value)\n len_value=len(value)\n len_self=len(self)\n if len_value >len_self:\n return False\n \n for i in range(0,len_self -len_value+1):\n sub_list=self[i:i+len_value]\n if sub_list ==value:\n return True\n return False\n \n def __repr__(self):\n return pprint.pformat(list(self))\n \n \ndef _check_and_set_parent(parent,value,name,new_name):\n value=_extract_mock(value)\n \n if not _is_instance_mock(value):\n return False\n if ((value._mock_name or value._mock_new_name)or\n (value._mock_parent is not None )or\n (value._mock_new_parent is not None )):\n return False\n \n _parent=parent\n while _parent is not None :\n \n \n if _parent is value:\n return False\n _parent=_parent._mock_new_parent\n \n if new_name:\n value._mock_new_parent=parent\n value._mock_new_name=new_name\n if name:\n value._mock_parent=parent\n value._mock_name=name\n return True\n \n \nclass _MockIter(object):\n def __init__(self,obj):\n self.obj=iter(obj)\n def __next__(self):\n return next(self.obj)\n \nclass Base(object):\n _mock_return_value=DEFAULT\n _mock_side_effect=None\n def __init__(self,/,*args,**kwargs):\n pass\n \n \n \nclass NonCallableMock(Base):\n ''\n \n def __new__(cls,/,*args,**kw):\n \n \n \n bases=(cls,)\n if not issubclass(cls,AsyncMockMixin):\n \n bound_args=_MOCK_SIG.bind_partial(cls,*args,**kw).arguments\n spec_arg=bound_args.get('spec_set',bound_args.get('spec'))\n if spec_arg is not None and _is_async_obj(spec_arg):\n bases=(AsyncMockMixin,cls)\n new=type(cls.__name__,bases,{'__doc__':cls.__doc__})\n instance=_safe_super(NonCallableMock,cls).__new__(new)\n return instance\n \n \n def __init__(\n self,spec=None ,wraps=None ,name=None ,spec_set=None ,\n parent=None ,_spec_state=None ,_new_name='',_new_parent=None ,\n _spec_as_instance=False ,_eat_self=None ,unsafe=False ,**kwargs\n ):\n if _new_parent is None :\n _new_parent=parent\n \n __dict__=self.__dict__\n __dict__['_mock_parent']=parent\n __dict__['_mock_name']=name\n __dict__['_mock_new_name']=_new_name\n __dict__['_mock_new_parent']=_new_parent\n __dict__['_mock_sealed']=False\n \n if spec_set is not None :\n spec=spec_set\n spec_set=True\n if _eat_self is None :\n _eat_self=parent is not None\n \n self._mock_add_spec(spec,spec_set,_spec_as_instance,_eat_self)\n \n __dict__['_mock_children']={}\n __dict__['_mock_wraps']=wraps\n __dict__['_mock_delegate']=None\n \n __dict__['_mock_called']=False\n __dict__['_mock_call_args']=None\n __dict__['_mock_call_count']=0\n __dict__['_mock_call_args_list']=_CallList()\n __dict__['_mock_mock_calls']=_CallList()\n \n __dict__['method_calls']=_CallList()\n __dict__['_mock_unsafe']=unsafe\n \n if kwargs:\n self.configure_mock(**kwargs)\n \n _safe_super(NonCallableMock,self).__init__(\n spec,wraps,name,spec_set,parent,\n _spec_state\n )\n \n \n def attach_mock(self,mock,attribute):\n ''\n\n\n \n inner_mock=_extract_mock(mock)\n \n inner_mock._mock_parent=None\n inner_mock._mock_new_parent=None\n inner_mock._mock_name=''\n inner_mock._mock_new_name=None\n \n setattr(self,attribute,mock)\n \n \n def mock_add_spec(self,spec,spec_set=False ):\n ''\n\n\n\n \n self._mock_add_spec(spec,spec_set)\n \n \n def _mock_add_spec(self,spec,spec_set,_spec_as_instance=False ,\n _eat_self=False ):\n if _is_instance_mock(spec):\n raise InvalidSpecError(f'Cannot spec a Mock object. [object={spec!r}]')\n \n _spec_class=None\n _spec_signature=None\n _spec_asyncs=[]\n \n for attr in dir(spec):\n if iscoroutinefunction(getattr(spec,attr,None )):\n _spec_asyncs.append(attr)\n \n if spec is not None and not _is_list(spec):\n if isinstance(spec,type):\n _spec_class=spec\n else :\n _spec_class=type(spec)\n res=_get_signature_object(spec,\n _spec_as_instance,_eat_self)\n _spec_signature=res and res[1]\n \n spec=dir(spec)\n \n __dict__=self.__dict__\n __dict__['_spec_class']=_spec_class\n __dict__['_spec_set']=spec_set\n __dict__['_spec_signature']=_spec_signature\n __dict__['_mock_methods']=spec\n __dict__['_spec_asyncs']=_spec_asyncs\n \n def __get_return_value(self):\n ret=self._mock_return_value\n if self._mock_delegate is not None :\n ret=self._mock_delegate.return_value\n \n if ret is DEFAULT:\n ret=self._get_child_mock(\n _new_parent=self,_new_name='()'\n )\n self.return_value=ret\n return ret\n \n \n def __set_return_value(self,value):\n if self._mock_delegate is not None :\n self._mock_delegate.return_value=value\n else :\n self._mock_return_value=value\n _check_and_set_parent(self,value,None ,'()')\n \n __return_value_doc=\"The value to be returned when the mock is called.\"\n return_value=property(__get_return_value,__set_return_value,\n __return_value_doc)\n \n \n @property\n def __class__(self):\n if self._spec_class is None :\n return type(self)\n return self._spec_class\n \n called=_delegating_property('called')\n call_count=_delegating_property('call_count')\n call_args=_delegating_property('call_args')\n call_args_list=_delegating_property('call_args_list')\n mock_calls=_delegating_property('mock_calls')\n \n \n def __get_side_effect(self):\n delegated=self._mock_delegate\n if delegated is None :\n return self._mock_side_effect\n sf=delegated.side_effect\n if (sf is not None and not callable(sf)\n and not isinstance(sf,_MockIter)and not _is_exception(sf)):\n sf=_MockIter(sf)\n delegated.side_effect=sf\n return sf\n \n def __set_side_effect(self,value):\n value=_try_iter(value)\n delegated=self._mock_delegate\n if delegated is None :\n self._mock_side_effect=value\n else :\n delegated.side_effect=value\n \n side_effect=property(__get_side_effect,__set_side_effect)\n \n \n def reset_mock(self,visited=None ,*,return_value=False ,side_effect=False ):\n ''\n if visited is None :\n visited=[]\n if id(self)in visited:\n return\n visited.append(id(self))\n \n self.called=False\n self.call_args=None\n self.call_count=0\n self.mock_calls=_CallList()\n self.call_args_list=_CallList()\n self.method_calls=_CallList()\n \n if return_value:\n self._mock_return_value=DEFAULT\n if side_effect:\n self._mock_side_effect=None\n \n for child in self._mock_children.values():\n if isinstance(child,_SpecState)or child is _deleted:\n continue\n child.reset_mock(visited,return_value=return_value,side_effect=side_effect)\n \n ret=self._mock_return_value\n if _is_instance_mock(ret)and ret is not self:\n ret.reset_mock(visited)\n \n \n def configure_mock(self,/,**kwargs):\n ''\n\n\n\n\n\n\n \n for arg,val in sorted(kwargs.items(),\n \n \n \n key=lambda entry:entry[0].count('.')):\n args=arg.split('.')\n final=args.pop()\n obj=self\n for entry in args:\n obj=getattr(obj,entry)\n setattr(obj,final,val)\n \n \n def __getattr__(self,name):\n if name in {'_mock_methods','_mock_unsafe'}:\n raise AttributeError(name)\n elif self._mock_methods is not None :\n if name not in self._mock_methods or name in _all_magics:\n raise AttributeError(\"Mock object has no attribute %r\"%name)\n elif _is_magic(name):\n raise AttributeError(name)\n if not self._mock_unsafe:\n if name.startswith(('assert','assret','asert','aseert','assrt')):\n raise AttributeError(\n f\"{name!r} is not a valid assertion. Use a spec \"\n f\"for the mock if {name!r} is meant to be an attribute.\")\n \n result=self._mock_children.get(name)\n if result is _deleted:\n raise AttributeError(name)\n elif result is None :\n wraps=None\n if self._mock_wraps is not None :\n \n \n wraps=getattr(self._mock_wraps,name)\n \n result=self._get_child_mock(\n parent=self,name=name,wraps=wraps,_new_name=name,\n _new_parent=self\n )\n self._mock_children[name]=result\n \n elif isinstance(result,_SpecState):\n try :\n result=create_autospec(\n result.spec,result.spec_set,result.instance,\n result.parent,result.name\n )\n except InvalidSpecError:\n target_name=self.__dict__['_mock_name']or self\n raise InvalidSpecError(\n f'Cannot autospec attr {name!r} from target '\n f'{target_name!r} as it has already been mocked out. '\n f'[target={self!r}, attr={result.spec!r}]')\n self._mock_children[name]=result\n \n return result\n \n \n def _extract_mock_name(self):\n _name_list=[self._mock_new_name]\n _parent=self._mock_new_parent\n last=self\n \n dot='.'\n if _name_list ==['()']:\n dot=''\n \n while _parent is not None :\n last=_parent\n \n _name_list.append(_parent._mock_new_name+dot)\n dot='.'\n if _parent._mock_new_name =='()':\n dot=''\n \n _parent=_parent._mock_new_parent\n \n _name_list=list(reversed(_name_list))\n _first=last._mock_name or 'mock'\n if len(_name_list)>1:\n if _name_list[1]not in ('()','().'):\n _first +='.'\n _name_list[0]=_first\n return ''.join(_name_list)\n \n def __repr__(self):\n name=self._extract_mock_name()\n \n name_string=''\n if name not in ('mock','mock.'):\n name_string=' name=%r'%name\n \n spec_string=''\n if self._spec_class is not None :\n spec_string=' spec=%r'\n if self._spec_set:\n spec_string=' spec_set=%r'\n spec_string=spec_string %self._spec_class.__name__\n return \"<%s%s%s id='%s'>\"%(\n type(self).__name__,\n name_string,\n spec_string,\n id(self)\n )\n \n \n def __dir__(self):\n ''\n if not FILTER_DIR:\n return object.__dir__(self)\n \n extras=self._mock_methods or []\n from_type=dir(type(self))\n from_dict=list(self.__dict__)\n from_child_mocks=[\n m_name for m_name,m_value in self._mock_children.items()\n if m_value is not _deleted]\n \n from_type=[e for e in from_type if not e.startswith('_')]\n from_dict=[e for e in from_dict if not e.startswith('_')or\n _is_magic(e)]\n return sorted(set(extras+from_type+from_dict+from_child_mocks))\n \n \n def __setattr__(self,name,value):\n if name in _allowed_names:\n \n return object.__setattr__(self,name,value)\n elif (self._spec_set and self._mock_methods is not None and\n name not in self._mock_methods and\n name not in self.__dict__):\n raise AttributeError(\"Mock object has no attribute '%s'\"%name)\n elif name in _unsupported_magics:\n msg='Attempting to set unsupported magic method %r.'%name\n raise AttributeError(msg)\n elif name in _all_magics:\n if self._mock_methods is not None and name not in self._mock_methods:\n raise AttributeError(\"Mock object has no attribute '%s'\"%name)\n \n if not _is_instance_mock(value):\n setattr(type(self),name,_get_method(name,value))\n original=value\n value=lambda *args,**kw:original(self,*args,**kw)\n else :\n \n \n _check_and_set_parent(self,value,None ,name)\n setattr(type(self),name,value)\n self._mock_children[name]=value\n elif name =='__class__':\n self._spec_class=value\n return\n else :\n if _check_and_set_parent(self,value,name,name):\n self._mock_children[name]=value\n \n if self._mock_sealed and not hasattr(self,name):\n mock_name=f'{self._extract_mock_name()}.{name}'\n raise AttributeError(f'Cannot set {mock_name}')\n \n return object.__setattr__(self,name,value)\n \n \n def __delattr__(self,name):\n if name in _all_magics and name in type(self).__dict__:\n delattr(type(self),name)\n if name not in self.__dict__:\n \n \n return\n \n obj=self._mock_children.get(name,_missing)\n if name in self.__dict__:\n _safe_super(NonCallableMock,self).__delattr__(name)\n elif obj is _deleted:\n raise AttributeError(name)\n if obj is not _missing:\n del self._mock_children[name]\n self._mock_children[name]=_deleted\n \n \n def _format_mock_call_signature(self,args,kwargs):\n name=self._mock_name or 'mock'\n return _format_call_signature(name,args,kwargs)\n \n \n def _format_mock_failure_message(self,args,kwargs,action='call'):\n message='expected %s not found.\\nExpected: %s\\nActual: %s'\n expected_string=self._format_mock_call_signature(args,kwargs)\n call_args=self.call_args\n actual_string=self._format_mock_call_signature(*call_args)\n return message %(action,expected_string,actual_string)\n \n \n def _get_call_signature_from_name(self,name):\n ''\n\n\n\n\n\n\n\n\n \n if not name:\n return self._spec_signature\n \n sig=None\n names=name.replace('()','').split('.')\n children=self._mock_children\n \n for name in names:\n child=children.get(name)\n if child is None or isinstance(child,_SpecState):\n break\n else :\n \n \n \n child=_extract_mock(child)\n children=child._mock_children\n sig=child._spec_signature\n \n return sig\n \n \n def _call_matcher(self,_call):\n ''\n\n\n\n\n \n \n if isinstance(_call,tuple)and len(_call)>2:\n sig=self._get_call_signature_from_name(_call[0])\n else :\n sig=self._spec_signature\n \n if sig is not None :\n if len(_call)==2:\n name=''\n args,kwargs=_call\n else :\n name,args,kwargs=_call\n try :\n bound_call=sig.bind(*args,**kwargs)\n return call(name,bound_call.args,bound_call.kwargs)\n except TypeError as e:\n return e.with_traceback(None )\n else :\n return _call\n \n def assert_not_called(self):\n ''\n \n if self.call_count !=0:\n msg=(\"Expected '%s' to not have been called. Called %s times.%s\"\n %(self._mock_name or 'mock',\n self.call_count,\n self._calls_repr()))\n raise AssertionError(msg)\n \n def assert_called(self):\n ''\n \n if self.call_count ==0:\n msg=(\"Expected '%s' to have been called.\"%\n (self._mock_name or 'mock'))\n raise AssertionError(msg)\n \n def assert_called_once(self):\n ''\n \n if not self.call_count ==1:\n msg=(\"Expected '%s' to have been called once. Called %s times.%s\"\n %(self._mock_name or 'mock',\n self.call_count,\n self._calls_repr()))\n raise AssertionError(msg)\n \n def assert_called_with(self,/,*args,**kwargs):\n ''\n\n\n \n if self.call_args is None :\n expected=self._format_mock_call_signature(args,kwargs)\n actual='not called.'\n error_message=('expected call not found.\\nExpected: %s\\nActual: %s'\n %(expected,actual))\n raise AssertionError(error_message)\n \n def _error_message():\n msg=self._format_mock_failure_message(args,kwargs)\n return msg\n expected=self._call_matcher(_Call((args,kwargs),two=True ))\n actual=self._call_matcher(self.call_args)\n if actual !=expected:\n cause=expected if isinstance(expected,Exception)else None\n raise AssertionError(_error_message())from cause\n \n \n def assert_called_once_with(self,/,*args,**kwargs):\n ''\n \n if not self.call_count ==1:\n msg=(\"Expected '%s' to be called once. Called %s times.%s\"\n %(self._mock_name or 'mock',\n self.call_count,\n self._calls_repr()))\n raise AssertionError(msg)\n return self.assert_called_with(*args,**kwargs)\n \n \n def assert_has_calls(self,calls,any_order=False ):\n ''\n\n\n\n\n\n\n\n \n expected=[self._call_matcher(c)for c in calls]\n cause=next((e for e in expected if isinstance(e,Exception)),None )\n all_calls=_CallList(self._call_matcher(c)for c in self.mock_calls)\n if not any_order:\n if expected not in all_calls:\n if cause is None :\n problem='Calls not found.'\n else :\n problem=('Error processing expected calls.\\n'\n 'Errors: {}').format(\n [e if isinstance(e,Exception)else None\n for e in expected])\n raise AssertionError(\n f'{problem}\\n'\n f'Expected: {_CallList(calls)}'\n f'{self._calls_repr(prefix=\"Actual\").rstrip(\".\")}'\n )from cause\n return\n \n all_calls=list(all_calls)\n \n not_found=[]\n for kall in expected:\n try :\n all_calls.remove(kall)\n except ValueError:\n not_found.append(kall)\n if not_found:\n raise AssertionError(\n '%r does not contain all of %r in its call list, '\n 'found %r instead'%(self._mock_name or 'mock',\n tuple(not_found),all_calls)\n )from cause\n \n \n def assert_any_call(self,/,*args,**kwargs):\n ''\n\n\n\n \n expected=self._call_matcher(_Call((args,kwargs),two=True ))\n cause=expected if isinstance(expected,Exception)else None\n actual=[self._call_matcher(c)for c in self.call_args_list]\n if cause or expected not in _AnyComparer(actual):\n expected_string=self._format_mock_call_signature(args,kwargs)\n raise AssertionError(\n '%s call not found'%expected_string\n )from cause\n \n \n def _get_child_mock(self,/,**kw):\n ''\n\n\n\n\n\n \n _new_name=kw.get(\"_new_name\")\n if _new_name in self.__dict__['_spec_asyncs']:\n return AsyncMock(**kw)\n \n if self._mock_sealed:\n attribute=f\".{kw['name']}\"if \"name\"in kw else \"()\"\n mock_name=self._extract_mock_name()+attribute\n raise AttributeError(mock_name)\n \n _type=type(self)\n if issubclass(_type,MagicMock)and _new_name in _async_method_magics:\n \n klass=AsyncMock\n elif issubclass(_type,AsyncMockMixin):\n if (_new_name in _all_sync_magics or\n self._mock_methods and _new_name in self._mock_methods):\n \n klass=MagicMock\n else :\n klass=AsyncMock\n elif not issubclass(_type,CallableMixin):\n if issubclass(_type,NonCallableMagicMock):\n klass=MagicMock\n elif issubclass(_type,NonCallableMock):\n klass=Mock\n else :\n klass=_type.__mro__[1]\n return klass(**kw)\n \n \n def _calls_repr(self,prefix=\"Calls\"):\n ''\n\n\n\n\n\n \n if not self.mock_calls:\n return \"\"\n return f\"\\n{prefix}: {safe_repr(self.mock_calls)}.\"\n \n \n_MOCK_SIG=inspect.signature(NonCallableMock.__init__)\n\n\nclass _AnyComparer(list):\n ''\n\n\n \n def __contains__(self,item):\n for _call in self:\n assert len(item)==len(_call)\n if all([\n expected ==actual\n for expected,actual in zip(item,_call)\n ]):\n return True\n return False\n \n \ndef _try_iter(obj):\n if obj is None :\n return obj\n if _is_exception(obj):\n return obj\n if _callable(obj):\n return obj\n try :\n return iter(obj)\n except TypeError:\n \n \n return obj\n \n \nclass CallableMixin(Base):\n\n def __init__(self,spec=None ,side_effect=None ,return_value=DEFAULT,\n wraps=None ,name=None ,spec_set=None ,parent=None ,\n _spec_state=None ,_new_name='',_new_parent=None ,**kwargs):\n self.__dict__['_mock_return_value']=return_value\n _safe_super(CallableMixin,self).__init__(\n spec,wraps,name,spec_set,parent,\n _spec_state,_new_name,_new_parent,**kwargs\n )\n \n self.side_effect=side_effect\n \n \n def _mock_check_sig(self,/,*args,**kwargs):\n \n pass\n \n \n def __call__(self,/,*args,**kwargs):\n \n \n self._mock_check_sig(*args,**kwargs)\n self._increment_mock_call(*args,**kwargs)\n return self._mock_call(*args,**kwargs)\n \n \n def _mock_call(self,/,*args,**kwargs):\n return self._execute_mock_call(*args,**kwargs)\n \n def _increment_mock_call(self,/,*args,**kwargs):\n self.called=True\n self.call_count +=1\n \n \n \n \n _call=_Call((args,kwargs),two=True )\n self.call_args=_call\n self.call_args_list.append(_call)\n \n \n do_method_calls=self._mock_parent is not None\n method_call_name=self._mock_name\n \n \n mock_call_name=self._mock_new_name\n is_a_call=mock_call_name =='()'\n self.mock_calls.append(_Call(('',args,kwargs)))\n \n \n _new_parent=self._mock_new_parent\n while _new_parent is not None :\n \n \n if do_method_calls:\n _new_parent.method_calls.append(_Call((method_call_name,args,kwargs)))\n do_method_calls=_new_parent._mock_parent is not None\n if do_method_calls:\n method_call_name=_new_parent._mock_name+'.'+method_call_name\n \n \n this_mock_call=_Call((mock_call_name,args,kwargs))\n _new_parent.mock_calls.append(this_mock_call)\n \n if _new_parent._mock_new_name:\n if is_a_call:\n dot=''\n else :\n dot='.'\n is_a_call=_new_parent._mock_new_name =='()'\n mock_call_name=_new_parent._mock_new_name+dot+mock_call_name\n \n \n _new_parent=_new_parent._mock_new_parent\n \n def _execute_mock_call(self,/,*args,**kwargs):\n \n \n \n effect=self.side_effect\n if effect is not None :\n if _is_exception(effect):\n raise effect\n elif not _callable(effect):\n result=next(effect)\n if _is_exception(result):\n raise result\n else :\n result=effect(*args,**kwargs)\n \n if result is not DEFAULT:\n return result\n \n if self._mock_return_value is not DEFAULT:\n return self.return_value\n \n if self._mock_wraps is not None :\n return self._mock_wraps(*args,**kwargs)\n \n return self.return_value\n \n \n \nclass Mock(CallableMixin,NonCallableMock):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n \n \ndef _check_spec_arg_typos(kwargs_to_check):\n typos=(\"autospect\",\"auto_spec\",\"set_spec\")\n for typo in typos:\n if typo in kwargs_to_check:\n raise RuntimeError(\n f\"{typo!r} might be a typo; use unsafe=True if this is intended\"\n )\n \n \nclass _patch(object):\n\n attribute_name=None\n _active_patches=[]\n \n def __init__(\n self,getter,attribute,new,spec,create,\n spec_set,autospec,new_callable,kwargs,*,unsafe=False\n ):\n if new_callable is not None :\n if new is not DEFAULT:\n raise ValueError(\n \"Cannot use 'new' and 'new_callable' together\"\n )\n if autospec is not None :\n raise ValueError(\n \"Cannot use 'autospec' and 'new_callable' together\"\n )\n if not unsafe:\n _check_spec_arg_typos(kwargs)\n if _is_instance_mock(spec):\n raise InvalidSpecError(\n f'Cannot spec attr {attribute!r} as the spec '\n f'has already been mocked out. [spec={spec!r}]')\n if _is_instance_mock(spec_set):\n raise InvalidSpecError(\n f'Cannot spec attr {attribute!r} as the spec_set '\n f'target has already been mocked out. [spec_set={spec_set!r}]')\n \n self.getter=getter\n self.attribute=attribute\n self.new=new\n self.new_callable=new_callable\n self.spec=spec\n self.create=create\n self.has_local=False\n self.spec_set=spec_set\n self.autospec=autospec\n self.kwargs=kwargs\n self.additional_patchers=[]\n \n \n def copy(self):\n patcher=_patch(\n self.getter,self.attribute,self.new,self.spec,\n self.create,self.spec_set,\n self.autospec,self.new_callable,self.kwargs\n )\n patcher.attribute_name=self.attribute_name\n patcher.additional_patchers=[\n p.copy()for p in self.additional_patchers\n ]\n return patcher\n \n \n def __call__(self,func):\n if isinstance(func,type):\n return self.decorate_class(func)\n if inspect.iscoroutinefunction(func):\n return self.decorate_async_callable(func)\n return self.decorate_callable(func)\n \n \n def decorate_class(self,klass):\n for attr in dir(klass):\n if not attr.startswith(patch.TEST_PREFIX):\n continue\n \n attr_value=getattr(klass,attr)\n if not hasattr(attr_value,\"__call__\"):\n continue\n \n patcher=self.copy()\n setattr(klass,attr,patcher(attr_value))\n return klass\n \n \n @contextlib.contextmanager\n def decoration_helper(self,patched,args,keywargs):\n extra_args=[]\n with contextlib.ExitStack()as exit_stack:\n for patching in patched.patchings:\n arg=exit_stack.enter_context(patching)\n if patching.attribute_name is not None :\n keywargs.update(arg)\n elif patching.new is DEFAULT:\n extra_args.append(arg)\n \n args +=tuple(extra_args)\n yield (args,keywargs)\n \n \n def decorate_callable(self,func):\n \n if hasattr(func,'patchings'):\n func.patchings.append(self)\n return func\n \n @wraps(func)\n def patched(*args,**keywargs):\n with self.decoration_helper(patched,\n args,\n keywargs)as (newargs,newkeywargs):\n return func(*newargs,**newkeywargs)\n \n patched.patchings=[self]\n return patched\n \n \n def decorate_async_callable(self,func):\n \n if hasattr(func,'patchings'):\n func.patchings.append(self)\n return func\n \n @wraps(func)\n async def patched(*args,**keywargs):\n with self.decoration_helper(patched,\n args,\n keywargs)as (newargs,newkeywargs):\n return await func(*newargs,**newkeywargs)\n \n patched.patchings=[self]\n return patched\n \n \n def get_original(self):\n target=self.getter()\n name=self.attribute\n \n original=DEFAULT\n local=False\n \n try :\n original=target.__dict__[name]\n except (AttributeError,KeyError):\n original=getattr(target,name,DEFAULT)\n else :\n local=True\n \n if name in _builtins and isinstance(target,ModuleType):\n self.create=True\n \n if not self.create and original is DEFAULT:\n raise AttributeError(\n \"%s does not have the attribute %r\"%(target,name)\n )\n return original,local\n \n \n def __enter__(self):\n ''\n new,spec,spec_set=self.new,self.spec,self.spec_set\n autospec,kwargs=self.autospec,self.kwargs\n new_callable=self.new_callable\n self.target=self.getter()\n \n \n if spec is False :\n spec=None\n if spec_set is False :\n spec_set=None\n if autospec is False :\n autospec=None\n \n if spec is not None and autospec is not None :\n raise TypeError(\"Can't specify spec and autospec\")\n if ((spec is not None or autospec is not None )and\n spec_set not in (True ,None )):\n raise TypeError(\"Can't provide explicit spec_set *and* spec or autospec\")\n \n original,local=self.get_original()\n \n if new is DEFAULT and autospec is None :\n inherit=False\n if spec is True :\n \n spec=original\n if spec_set is True :\n spec_set=original\n spec=None\n elif spec is not None :\n if spec_set is True :\n spec_set=spec\n spec=None\n elif spec_set is True :\n spec_set=original\n \n if spec is not None or spec_set is not None :\n if original is DEFAULT:\n raise TypeError(\"Can't use 'spec' with create=True\")\n if isinstance(original,type):\n \n inherit=True\n if spec is None and _is_async_obj(original):\n Klass=AsyncMock\n else :\n Klass=MagicMock\n _kwargs={}\n if new_callable is not None :\n Klass=new_callable\n elif spec is not None or spec_set is not None :\n this_spec=spec\n if spec_set is not None :\n this_spec=spec_set\n if _is_list(this_spec):\n not_callable='__call__'not in this_spec\n else :\n not_callable=not callable(this_spec)\n if _is_async_obj(this_spec):\n Klass=AsyncMock\n elif not_callable:\n Klass=NonCallableMagicMock\n \n if spec is not None :\n _kwargs['spec']=spec\n if spec_set is not None :\n _kwargs['spec_set']=spec_set\n \n \n if (isinstance(Klass,type)and\n issubclass(Klass,NonCallableMock)and self.attribute):\n _kwargs['name']=self.attribute\n \n _kwargs.update(kwargs)\n new=Klass(**_kwargs)\n \n if inherit and _is_instance_mock(new):\n \n \n this_spec=spec\n if spec_set is not None :\n this_spec=spec_set\n if (not _is_list(this_spec)and not\n _instance_callable(this_spec)):\n Klass=NonCallableMagicMock\n \n _kwargs.pop('name')\n new.return_value=Klass(_new_parent=new,_new_name='()',\n **_kwargs)\n elif autospec is not None :\n \n \n \n if new is not DEFAULT:\n raise TypeError(\n \"autospec creates the mock for you. Can't specify \"\n \"autospec and new.\"\n )\n if original is DEFAULT:\n raise TypeError(\"Can't use 'autospec' with create=True\")\n spec_set=bool(spec_set)\n if autospec is True :\n autospec=original\n \n if _is_instance_mock(self.target):\n raise InvalidSpecError(\n f'Cannot autospec attr {self.attribute!r} as the patch '\n f'target has already been mocked out. '\n f'[target={self.target!r}, attr={autospec!r}]')\n if _is_instance_mock(autospec):\n target_name=getattr(self.target,'__name__',self.target)\n raise InvalidSpecError(\n f'Cannot autospec attr {self.attribute!r} from target '\n f'{target_name!r} as it has already been mocked out. '\n f'[target={self.target!r}, attr={autospec!r}]')\n \n new=create_autospec(autospec,spec_set=spec_set,\n _name=self.attribute,**kwargs)\n elif kwargs:\n \n \n raise TypeError(\"Can't pass kwargs to a mock we aren't creating\")\n \n new_attr=new\n \n self.temp_original=original\n self.is_local=local\n self._exit_stack=contextlib.ExitStack()\n try :\n setattr(self.target,self.attribute,new_attr)\n if self.attribute_name is not None :\n extra_args={}\n if self.new is DEFAULT:\n extra_args[self.attribute_name]=new\n for patching in self.additional_patchers:\n arg=self._exit_stack.enter_context(patching)\n if patching.new is DEFAULT:\n extra_args.update(arg)\n return extra_args\n \n return new\n except :\n if not self.__exit__(*sys.exc_info()):\n raise\n \n def __exit__(self,*exc_info):\n ''\n if self.is_local and self.temp_original is not DEFAULT:\n setattr(self.target,self.attribute,self.temp_original)\n else :\n delattr(self.target,self.attribute)\n if not self.create and (not hasattr(self.target,self.attribute)or\n self.attribute in ('__doc__','__module__',\n '__defaults__','__annotations__',\n '__kwdefaults__')):\n \n setattr(self.target,self.attribute,self.temp_original)\n \n del self.temp_original\n del self.is_local\n del self.target\n exit_stack=self._exit_stack\n del self._exit_stack\n return exit_stack.__exit__(*exc_info)\n \n \n def start(self):\n ''\n result=self.__enter__()\n self._active_patches.append(self)\n return result\n \n \n def stop(self):\n ''\n try :\n self._active_patches.remove(self)\n except ValueError:\n \n return None\n \n return self.__exit__(None ,None ,None )\n \n \n \ndef _get_target(target):\n try :\n target,attribute=target.rsplit('.',1)\n except (TypeError,ValueError,AttributeError):\n raise TypeError(\n f\"Need a valid target to patch. You supplied: {target!r}\")\n return partial(pkgutil.resolve_name,target),attribute\n \n \ndef _patch_object(\ntarget,attribute,new=DEFAULT,spec=None ,\ncreate=False ,spec_set=None ,autospec=None ,\nnew_callable=None ,*,unsafe=False ,**kwargs\n):\n ''\n\n\n\n\n\n\n\n\n\n\n\n \n if type(target)is str:\n raise TypeError(\n f\"{target!r} must be the actual object to be patched, not a str\"\n )\n getter=lambda :target\n return _patch(\n getter,attribute,new,spec,create,\n spec_set,autospec,new_callable,kwargs,unsafe=unsafe\n )\n \n \ndef _patch_multiple(target,spec=None ,create=False ,spec_set=None ,\nautospec=None ,new_callable=None ,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if type(target)is str:\n getter=partial(pkgutil.resolve_name,target)\n else :\n getter=lambda :target\n \n if not kwargs:\n raise ValueError(\n 'Must supply at least one keyword argument with patch.multiple'\n )\n \n items=list(kwargs.items())\n attribute,new=items[0]\n patcher=_patch(\n getter,attribute,new,spec,create,spec_set,\n autospec,new_callable,{}\n )\n patcher.attribute_name=attribute\n for attribute,new in items[1:]:\n this_patcher=_patch(\n getter,attribute,new,spec,create,spec_set,\n autospec,new_callable,{}\n )\n this_patcher.attribute_name=attribute\n patcher.additional_patchers.append(this_patcher)\n return patcher\n \n \ndef patch(\ntarget,new=DEFAULT,spec=None ,create=False ,\nspec_set=None ,autospec=None ,new_callable=None ,*,unsafe=False ,**kwargs\n):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n getter,attribute=_get_target(target)\n return _patch(\n getter,attribute,new,spec,create,\n spec_set,autospec,new_callable,kwargs,unsafe=unsafe\n )\n \n \nclass _patch_dict(object):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n def __init__(self,in_dict,values=(),clear=False ,**kwargs):\n self.in_dict=in_dict\n \n self.values=dict(values)\n self.values.update(kwargs)\n self.clear=clear\n self._original=None\n \n \n def __call__(self,f):\n if isinstance(f,type):\n return self.decorate_class(f)\n @wraps(f)\n def _inner(*args,**kw):\n self._patch_dict()\n try :\n return f(*args,**kw)\n finally :\n self._unpatch_dict()\n \n return _inner\n \n \n def decorate_class(self,klass):\n for attr in dir(klass):\n attr_value=getattr(klass,attr)\n if (attr.startswith(patch.TEST_PREFIX)and\n hasattr(attr_value,\"__call__\")):\n decorator=_patch_dict(self.in_dict,self.values,self.clear)\n decorated=decorator(attr_value)\n setattr(klass,attr,decorated)\n return klass\n \n \n def __enter__(self):\n ''\n self._patch_dict()\n return self.in_dict\n \n \n def _patch_dict(self):\n values=self.values\n if isinstance(self.in_dict,str):\n self.in_dict=pkgutil.resolve_name(self.in_dict)\n in_dict=self.in_dict\n clear=self.clear\n \n try :\n original=in_dict.copy()\n except AttributeError:\n \n \n original={}\n for key in in_dict:\n original[key]=in_dict[key]\n self._original=original\n \n if clear:\n _clear_dict(in_dict)\n \n try :\n in_dict.update(values)\n except AttributeError:\n \n for key in values:\n in_dict[key]=values[key]\n \n \n def _unpatch_dict(self):\n in_dict=self.in_dict\n original=self._original\n \n _clear_dict(in_dict)\n \n try :\n in_dict.update(original)\n except AttributeError:\n for key in original:\n in_dict[key]=original[key]\n \n \n def __exit__(self,*args):\n ''\n if self._original is not None :\n self._unpatch_dict()\n return False\n \n \n def start(self):\n ''\n result=self.__enter__()\n _patch._active_patches.append(self)\n return result\n \n \n def stop(self):\n ''\n try :\n _patch._active_patches.remove(self)\n except ValueError:\n \n return None\n \n return self.__exit__(None ,None ,None )\n \n \ndef _clear_dict(in_dict):\n try :\n in_dict.clear()\n except AttributeError:\n keys=list(in_dict)\n for key in keys:\n del in_dict[key]\n \n \ndef _patch_stopall():\n ''\n for patch in reversed(_patch._active_patches):\n patch.stop()\n \n \npatch.object=_patch_object\npatch.dict=_patch_dict\npatch.multiple=_patch_multiple\npatch.stopall=_patch_stopall\npatch.TEST_PREFIX='test'\n\nmagic_methods=(\n\"lt le gt ge eq ne \"\n\"getitem setitem delitem \"\n\"len contains iter \"\n\"hash str sizeof \"\n\"enter exit \"\n\n\n\"divmod rdivmod neg pos abs invert \"\n\"complex int float index \"\n\"round trunc floor ceil \"\n\"bool next \"\n\"fspath \"\n\"aiter \"\n)\n\nnumerics=(\n\"add sub mul matmul truediv floordiv mod lshift rshift and xor or pow\"\n)\ninplace=' '.join('i%s'%n for n in numerics.split())\nright=' '.join('r%s'%n for n in numerics.split())\n\n\n\n\n\n_non_defaults={\n'__get__','__set__','__delete__','__reversed__','__missing__',\n'__reduce__','__reduce_ex__','__getinitargs__','__getnewargs__',\n'__getstate__','__setstate__','__getformat__',\n'__repr__','__dir__','__subclasses__','__format__',\n'__getnewargs_ex__',\n}\n\n\ndef _get_method(name,func):\n ''\n def method(self,/,*args,**kw):\n return func(self,*args,**kw)\n method.__name__=name\n return method\n \n \n_magics={\n'__%s__'%method for method in\n' '.join([magic_methods,numerics,inplace,right]).split()\n}\n\n\n_async_method_magics={\"__aenter__\",\"__aexit__\",\"__anext__\"}\n\n_sync_async_magics={\"__aiter__\"}\n_async_magics=_async_method_magics |_sync_async_magics\n\n_all_sync_magics=_magics |_non_defaults\n_all_magics=_all_sync_magics |_async_magics\n\n_unsupported_magics={\n'__getattr__','__setattr__',\n'__init__','__new__','__prepare__',\n'__instancecheck__','__subclasscheck__',\n'__del__'\n}\n\n_calculate_return_value={\n'__hash__':lambda self:object.__hash__(self),\n'__str__':lambda self:object.__str__(self),\n'__sizeof__':lambda self:object.__sizeof__(self),\n'__fspath__':lambda self:f\"{type(self).__name__}/{self._extract_mock_name()}/{id(self)}\",\n}\n\n_return_values={\n'__lt__':NotImplemented,\n'__gt__':NotImplemented,\n'__le__':NotImplemented,\n'__ge__':NotImplemented,\n'__int__':1,\n'__contains__':False ,\n'__len__':0,\n'__exit__':False ,\n'__complex__':1j,\n'__float__':1.0,\n'__bool__':True ,\n'__index__':1,\n'__aexit__':False ,\n}\n\n\ndef _get_eq(self):\n def __eq__(other):\n ret_val=self.__eq__._mock_return_value\n if ret_val is not DEFAULT:\n return ret_val\n if self is other:\n return True\n return NotImplemented\n return __eq__\n \ndef _get_ne(self):\n def __ne__(other):\n if self.__ne__._mock_return_value is not DEFAULT:\n return DEFAULT\n if self is other:\n return False\n return NotImplemented\n return __ne__\n \ndef _get_iter(self):\n def __iter__():\n ret_val=self.__iter__._mock_return_value\n if ret_val is DEFAULT:\n return iter([])\n \n \n return iter(ret_val)\n return __iter__\n \ndef _get_async_iter(self):\n def __aiter__():\n ret_val=self.__aiter__._mock_return_value\n if ret_val is DEFAULT:\n return _AsyncIterator(iter([]))\n return _AsyncIterator(iter(ret_val))\n return __aiter__\n \n_side_effect_methods={\n'__eq__':_get_eq,\n'__ne__':_get_ne,\n'__iter__':_get_iter,\n'__aiter__':_get_async_iter\n}\n\n\n\ndef _set_return_value(mock,method,name):\n fixed=_return_values.get(name,DEFAULT)\n if fixed is not DEFAULT:\n method.return_value=fixed\n return\n \n return_calculator=_calculate_return_value.get(name)\n if return_calculator is not None :\n return_value=return_calculator(mock)\n method.return_value=return_value\n return\n \n side_effector=_side_effect_methods.get(name)\n if side_effector is not None :\n method.side_effect=side_effector(mock)\n \n \n \nclass MagicMixin(Base):\n def __init__(self,/,*args,**kw):\n self._mock_set_magics()\n _safe_super(MagicMixin,self).__init__(*args,**kw)\n self._mock_set_magics()\n \n \n def _mock_set_magics(self):\n orig_magics=_magics |_async_method_magics\n these_magics=orig_magics\n \n if getattr(self,\"_mock_methods\",None )is not None :\n these_magics=orig_magics.intersection(self._mock_methods)\n \n remove_magics=set()\n remove_magics=orig_magics -these_magics\n \n for entry in remove_magics:\n if entry in type(self).__dict__:\n \n delattr(self,entry)\n \n \n these_magics=these_magics -set(type(self).__dict__)\n \n _type=type(self)\n for entry in these_magics:\n setattr(_type,entry,MagicProxy(entry,self))\n \n \n \nclass NonCallableMagicMock(MagicMixin,NonCallableMock):\n ''\n def mock_add_spec(self,spec,spec_set=False ):\n ''\n\n\n\n \n self._mock_add_spec(spec,spec_set)\n self._mock_set_magics()\n \n \nclass AsyncMagicMixin(MagicMixin):\n def __init__(self,/,*args,**kw):\n self._mock_set_magics()\n _safe_super(AsyncMagicMixin,self).__init__(*args,**kw)\n self._mock_set_magics()\n \nclass MagicMock(MagicMixin,Mock):\n ''\n\n\n\n\n\n\n\n\n \n def mock_add_spec(self,spec,spec_set=False ):\n ''\n\n\n\n \n self._mock_add_spec(spec,spec_set)\n self._mock_set_magics()\n \n \n \nclass MagicProxy(Base):\n def __init__(self,name,parent):\n self.name=name\n self.parent=parent\n \n def create_mock(self):\n entry=self.name\n parent=self.parent\n m=parent._get_child_mock(name=entry,_new_name=entry,\n _new_parent=parent)\n setattr(parent,entry,m)\n _set_return_value(parent,m,entry)\n return m\n \n def __get__(self,obj,_type=None ):\n return self.create_mock()\n \n \nclass AsyncMockMixin(Base):\n await_count=_delegating_property('await_count')\n await_args=_delegating_property('await_args')\n await_args_list=_delegating_property('await_args_list')\n \n def __init__(self,/,*args,**kwargs):\n super().__init__(*args,**kwargs)\n \n \n \n \n \n \n self.__dict__['_is_coroutine']=asyncio.coroutines._is_coroutine\n self.__dict__['_mock_await_count']=0\n self.__dict__['_mock_await_args']=None\n self.__dict__['_mock_await_args_list']=_CallList()\n code_mock=NonCallableMock(spec_set=CodeType)\n code_mock.co_flags=inspect.CO_COROUTINE\n self.__dict__['__code__']=code_mock\n self.__dict__['__name__']='AsyncMock'\n self.__dict__['__defaults__']=tuple()\n self.__dict__['__kwdefaults__']={}\n self.__dict__['__annotations__']=None\n \n async def _execute_mock_call(self,/,*args,**kwargs):\n \n \n \n _call=_Call((args,kwargs),two=True )\n self.await_count +=1\n self.await_args=_call\n self.await_args_list.append(_call)\n \n effect=self.side_effect\n if effect is not None :\n if _is_exception(effect):\n raise effect\n elif not _callable(effect):\n try :\n result=next(effect)\n except StopIteration:\n \n \n raise StopAsyncIteration\n if _is_exception(result):\n raise result\n elif iscoroutinefunction(effect):\n result=await effect(*args,**kwargs)\n else :\n result=effect(*args,**kwargs)\n \n if result is not DEFAULT:\n return result\n \n if self._mock_return_value is not DEFAULT:\n return self.return_value\n \n if self._mock_wraps is not None :\n if iscoroutinefunction(self._mock_wraps):\n return await self._mock_wraps(*args,**kwargs)\n return self._mock_wraps(*args,**kwargs)\n \n return self.return_value\n \n def assert_awaited(self):\n ''\n\n \n if self.await_count ==0:\n msg=f\"Expected {self._mock_name or 'mock'} to have been awaited.\"\n raise AssertionError(msg)\n \n def assert_awaited_once(self):\n ''\n\n \n if not self.await_count ==1:\n msg=(f\"Expected {self._mock_name or 'mock'} to have been awaited once.\"\n f\" Awaited {self.await_count} times.\")\n raise AssertionError(msg)\n \n def assert_awaited_with(self,/,*args,**kwargs):\n ''\n\n \n if self.await_args is None :\n expected=self._format_mock_call_signature(args,kwargs)\n raise AssertionError(f'Expected await: {expected}\\nNot awaited')\n \n def _error_message():\n msg=self._format_mock_failure_message(args,kwargs,action='await')\n return msg\n \n expected=self._call_matcher(_Call((args,kwargs),two=True ))\n actual=self._call_matcher(self.await_args)\n if actual !=expected:\n cause=expected if isinstance(expected,Exception)else None\n raise AssertionError(_error_message())from cause\n \n def assert_awaited_once_with(self,/,*args,**kwargs):\n ''\n\n\n \n if not self.await_count ==1:\n msg=(f\"Expected {self._mock_name or 'mock'} to have been awaited once.\"\n f\" Awaited {self.await_count} times.\")\n raise AssertionError(msg)\n return self.assert_awaited_with(*args,**kwargs)\n \n def assert_any_await(self,/,*args,**kwargs):\n ''\n\n \n expected=self._call_matcher(_Call((args,kwargs),two=True ))\n cause=expected if isinstance(expected,Exception)else None\n actual=[self._call_matcher(c)for c in self.await_args_list]\n if cause or expected not in _AnyComparer(actual):\n expected_string=self._format_mock_call_signature(args,kwargs)\n raise AssertionError(\n '%s await not found'%expected_string\n )from cause\n \n def assert_has_awaits(self,calls,any_order=False ):\n ''\n\n\n\n\n\n\n\n\n\n \n expected=[self._call_matcher(c)for c in calls]\n cause=next((e for e in expected if isinstance(e,Exception)),None )\n all_awaits=_CallList(self._call_matcher(c)for c in self.await_args_list)\n if not any_order:\n if expected not in all_awaits:\n if cause is None :\n problem='Awaits not found.'\n else :\n problem=('Error processing expected awaits.\\n'\n 'Errors: {}').format(\n [e if isinstance(e,Exception)else None\n for e in expected])\n raise AssertionError(\n f'{problem}\\n'\n f'Expected: {_CallList(calls)}\\n'\n f'Actual: {self.await_args_list}'\n )from cause\n return\n \n all_awaits=list(all_awaits)\n \n not_found=[]\n for kall in expected:\n try :\n all_awaits.remove(kall)\n except ValueError:\n not_found.append(kall)\n if not_found:\n raise AssertionError(\n '%r not all found in await list'%(tuple(not_found),)\n )from cause\n \n def assert_not_awaited(self):\n ''\n\n \n if self.await_count !=0:\n msg=(f\"Expected {self._mock_name or 'mock'} to not have been awaited.\"\n f\" Awaited {self.await_count} times.\")\n raise AssertionError(msg)\n \n def reset_mock(self,/,*args,**kwargs):\n ''\n\n \n super().reset_mock(*args,**kwargs)\n self.await_count=0\n self.await_args=None\n self.await_args_list=_CallList()\n \n \nclass AsyncMock(AsyncMockMixin,AsyncMagicMixin,Mock):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \nclass _ANY(object):\n ''\n \n def __eq__(self,other):\n return True\n \n def __ne__(self,other):\n return False\n \n def __repr__(self):\n return ''\n \nANY=_ANY()\n\n\n\ndef _format_call_signature(name,args,kwargs):\n message='%s(%%s)'%name\n formatted_args=''\n args_string=', '.join([repr(arg)for arg in args])\n kwargs_string=', '.join([\n '%s=%r'%(key,value)for key,value in kwargs.items()\n ])\n if args_string:\n formatted_args=args_string\n if kwargs_string:\n if formatted_args:\n formatted_args +=', '\n formatted_args +=kwargs_string\n \n return message %formatted_args\n \n \n \nclass _Call(tuple):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n def __new__(cls,value=(),name='',parent=None ,two=False ,\n from_kall=True ):\n args=()\n kwargs={}\n _len=len(value)\n if _len ==3:\n name,args,kwargs=value\n elif _len ==2:\n first,second=value\n if isinstance(first,str):\n name=first\n if isinstance(second,tuple):\n args=second\n else :\n kwargs=second\n else :\n args,kwargs=first,second\n elif _len ==1:\n value,=value\n if isinstance(value,str):\n name=value\n elif isinstance(value,tuple):\n args=value\n else :\n kwargs=value\n \n if two:\n return tuple.__new__(cls,(args,kwargs))\n \n return tuple.__new__(cls,(name,args,kwargs))\n \n \n def __init__(self,value=(),name=None ,parent=None ,two=False ,\n from_kall=True ):\n self._mock_name=name\n self._mock_parent=parent\n self._mock_from_kall=from_kall\n \n \n def __eq__(self,other):\n try :\n len_other=len(other)\n except TypeError:\n return NotImplemented\n \n self_name=''\n if len(self)==2:\n self_args,self_kwargs=self\n else :\n self_name,self_args,self_kwargs=self\n \n if (getattr(self,'_mock_parent',None )and getattr(other,'_mock_parent',None )\n and self._mock_parent !=other._mock_parent):\n return False\n \n other_name=''\n if len_other ==0:\n other_args,other_kwargs=(),{}\n elif len_other ==3:\n other_name,other_args,other_kwargs=other\n elif len_other ==1:\n value,=other\n if isinstance(value,tuple):\n other_args=value\n other_kwargs={}\n elif isinstance(value,str):\n other_name=value\n other_args,other_kwargs=(),{}\n else :\n other_args=()\n other_kwargs=value\n elif len_other ==2:\n \n first,second=other\n if isinstance(first,str):\n other_name=first\n if isinstance(second,tuple):\n other_args,other_kwargs=second,{}\n else :\n other_args,other_kwargs=(),second\n else :\n other_args,other_kwargs=first,second\n else :\n return False\n \n if self_name and other_name !=self_name:\n return False\n \n \n return (other_args,other_kwargs)==(self_args,self_kwargs)\n \n \n __ne__=object.__ne__\n \n \n def __call__(self,/,*args,**kwargs):\n if self._mock_name is None :\n return _Call(('',args,kwargs),name='()')\n \n name=self._mock_name+'()'\n return _Call((self._mock_name,args,kwargs),name=name,parent=self)\n \n \n def __getattr__(self,attr):\n if self._mock_name is None :\n return _Call(name=attr,from_kall=False )\n name='%s.%s'%(self._mock_name,attr)\n return _Call(name=name,parent=self,from_kall=False )\n \n \n def __getattribute__(self,attr):\n if attr in tuple.__dict__:\n raise AttributeError\n return tuple.__getattribute__(self,attr)\n \n \n def _get_call_arguments(self):\n if len(self)==2:\n args,kwargs=self\n else :\n name,args,kwargs=self\n \n return args,kwargs\n \n @property\n def args(self):\n return self._get_call_arguments()[0]\n \n @property\n def kwargs(self):\n return self._get_call_arguments()[1]\n \n def __repr__(self):\n if not self._mock_from_kall:\n name=self._mock_name or 'call'\n if name.startswith('()'):\n name='call%s'%name\n return name\n \n if len(self)==2:\n name='call'\n args,kwargs=self\n else :\n name,args,kwargs=self\n if not name:\n name='call'\n elif not name.startswith('()'):\n name='call.%s'%name\n else :\n name='call%s'%name\n return _format_call_signature(name,args,kwargs)\n \n \n def call_list(self):\n ''\n\n \n vals=[]\n thing=self\n while thing is not None :\n if thing._mock_from_kall:\n vals.append(thing)\n thing=thing._mock_parent\n return _CallList(reversed(vals))\n \n \ncall=_Call(from_kall=False )\n\n\ndef create_autospec(spec,spec_set=False ,instance=False ,_parent=None ,\n_name=None ,*,unsafe=False ,**kwargs):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if _is_list(spec):\n \n \n spec=type(spec)\n \n is_type=isinstance(spec,type)\n if _is_instance_mock(spec):\n raise InvalidSpecError(f'Cannot autospec a Mock object. '\n f'[object={spec!r}]')\n is_async_func=_is_async_func(spec)\n _kwargs={'spec':spec}\n if spec_set:\n _kwargs={'spec_set':spec}\n elif spec is None :\n \n _kwargs={}\n if _kwargs and instance:\n _kwargs['_spec_as_instance']=True\n if not unsafe:\n _check_spec_arg_typos(kwargs)\n \n _kwargs.update(kwargs)\n \n Klass=MagicMock\n if inspect.isdatadescriptor(spec):\n \n \n _kwargs={}\n elif is_async_func:\n if instance:\n raise RuntimeError(\"Instance can not be True when create_autospec \"\n \"is mocking an async function\")\n Klass=AsyncMock\n elif not _callable(spec):\n Klass=NonCallableMagicMock\n elif is_type and instance and not _instance_callable(spec):\n Klass=NonCallableMagicMock\n \n _name=_kwargs.pop('name',_name)\n \n _new_name=_name\n if _parent is None :\n \n _new_name=''\n \n mock=Klass(parent=_parent,_new_parent=_parent,_new_name=_new_name,\n name=_name,**_kwargs)\n \n if isinstance(spec,FunctionTypes):\n \n \n mock=_set_signature(mock,spec)\n if is_async_func:\n _setup_async_mock(mock)\n else :\n _check_signature(spec,mock,is_type,instance)\n \n if _parent is not None and not instance:\n _parent._mock_children[_name]=mock\n \n if is_type and not instance and 'return_value'not in kwargs:\n mock.return_value=create_autospec(spec,spec_set,instance=True ,\n _name='()',_parent=mock)\n \n for entry in dir(spec):\n if _is_magic(entry):\n \n continue\n \n \n \n \n \n \n \n \n \n \n try :\n original=getattr(spec,entry)\n except AttributeError:\n continue\n \n kwargs={'spec':original}\n if spec_set:\n kwargs={'spec_set':original}\n \n if not isinstance(original,FunctionTypes):\n new=_SpecState(original,spec_set,mock,entry,instance)\n mock._mock_children[entry]=new\n else :\n parent=mock\n if isinstance(spec,FunctionTypes):\n parent=mock.mock\n \n skipfirst=_must_skip(spec,entry,is_type)\n kwargs['_eat_self']=skipfirst\n if iscoroutinefunction(original):\n child_klass=AsyncMock\n else :\n child_klass=MagicMock\n new=child_klass(parent=parent,name=entry,_new_name=entry,\n _new_parent=parent,\n **kwargs)\n mock._mock_children[entry]=new\n _check_signature(original,new,skipfirst=skipfirst)\n \n \n \n \n \n if isinstance(new,FunctionTypes):\n setattr(mock,entry,new)\n \n return mock\n \n \ndef _must_skip(spec,entry,is_type):\n ''\n\n\n \n if not isinstance(spec,type):\n if entry in getattr(spec,'__dict__',{}):\n \n return False\n spec=spec.__class__\n \n for klass in spec.__mro__:\n result=klass.__dict__.get(entry,DEFAULT)\n if result is DEFAULT:\n continue\n if isinstance(result,(staticmethod,classmethod)):\n return False\n elif isinstance(result,FunctionTypes):\n \n \n return is_type\n else :\n return False\n \n \n return is_type\n \n \nclass _SpecState(object):\n\n def __init__(self,spec,spec_set=False ,parent=None ,\n name=None ,ids=None ,instance=False ):\n self.spec=spec\n self.ids=ids\n self.spec_set=spec_set\n self.parent=parent\n self.instance=instance\n self.name=name\n \n \nFunctionTypes=(\n\ntype(create_autospec),\n\ntype(ANY.__eq__),\n)\n\n\nfile_spec=None\nopen_spec=None\n\n\ndef _to_stream(read_data):\n if isinstance(read_data,bytes):\n return io.BytesIO(read_data)\n else :\n return io.StringIO(read_data)\n \n \ndef mock_open(mock=None ,read_data=''):\n ''\n\n\n\n\n\n\n\n\n\n \n _read_data=_to_stream(read_data)\n _state=[_read_data,None ]\n \n def _readlines_side_effect(*args,**kwargs):\n if handle.readlines.return_value is not None :\n return handle.readlines.return_value\n return _state[0].readlines(*args,**kwargs)\n \n def _read_side_effect(*args,**kwargs):\n if handle.read.return_value is not None :\n return handle.read.return_value\n return _state[0].read(*args,**kwargs)\n \n def _readline_side_effect(*args,**kwargs):\n yield from _iter_side_effect()\n while True :\n yield _state[0].readline(*args,**kwargs)\n \n def _iter_side_effect():\n if handle.readline.return_value is not None :\n while True :\n yield handle.readline.return_value\n for line in _state[0]:\n yield line\n \n def _next_side_effect():\n if handle.readline.return_value is not None :\n return handle.readline.return_value\n return next(_state[0])\n \n global file_spec\n if file_spec is None :\n import _io\n file_spec=list(set(dir(_io.TextIOWrapper)).union(set(dir(_io.BytesIO))))\n \n global open_spec\n if open_spec is None :\n import _io\n open_spec=list(set(dir(_io.open)))\n if mock is None :\n mock=MagicMock(name='open',spec=open_spec)\n \n handle=MagicMock(spec=file_spec)\n handle.__enter__.return_value=handle\n \n handle.write.return_value=None\n handle.read.return_value=None\n handle.readline.return_value=None\n handle.readlines.return_value=None\n \n handle.read.side_effect=_read_side_effect\n _state[1]=_readline_side_effect()\n handle.readline.side_effect=_state[1]\n handle.readlines.side_effect=_readlines_side_effect\n handle.__iter__.side_effect=_iter_side_effect\n handle.__next__.side_effect=_next_side_effect\n \n def reset_data(*args,**kwargs):\n _state[0]=_to_stream(read_data)\n if handle.readline.side_effect ==_state[1]:\n \n _state[1]=_readline_side_effect()\n handle.readline.side_effect=_state[1]\n return DEFAULT\n \n mock.side_effect=reset_data\n mock.return_value=handle\n return mock\n \n \nclass PropertyMock(Mock):\n ''\n\n\n\n\n\n\n \n def _get_child_mock(self,/,**kwargs):\n return MagicMock(**kwargs)\n \n def __get__(self,obj,obj_type=None ):\n return self()\n def __set__(self,obj,val):\n self(val)\n \n \ndef seal(mock):\n ''\n\n\n\n\n\n\n\n \n mock._mock_sealed=True\n for attr in dir(mock):\n try :\n m=getattr(mock,attr)\n except AttributeError:\n continue\n if not isinstance(m,NonCallableMock):\n continue\n if isinstance(m._mock_children.get(attr),_SpecState):\n continue\n if m._mock_new_parent is mock:\n seal(m)\n \n \nclass _AsyncIterator:\n ''\n\n \n def __init__(self,iterator):\n self.iterator=iterator\n code_mock=NonCallableMock(spec_set=CodeType)\n code_mock.co_flags=inspect.CO_ITERABLE_COROUTINE\n self.__dict__['__code__']=code_mock\n \n async def __anext__(self):\n try :\n return next(self.iterator)\n except StopIteration:\n pass\n raise StopAsyncIteration\n", ["_io", "asyncio", "builtins", "contextlib", "functools", "inspect", "io", "pkgutil", "pprint", "sys", "types", "unittest.util"]], "unittest.result": [".py", "''\n\nimport io\nimport sys\nimport traceback\n\nfrom . import util\nfrom functools import wraps\n\n__unittest=True\n\ndef failfast(method):\n @wraps(method)\n def inner(self,*args,**kw):\n if getattr(self,'failfast',False ):\n self.stop()\n return method(self,*args,**kw)\n return inner\n \nSTDOUT_LINE='\\nStdout:\\n%s'\nSTDERR_LINE='\\nStderr:\\n%s'\n\n\nclass TestResult(object):\n ''\n\n\n\n\n\n\n\n\n \n _previousTestClass=None\n _testRunEntered=False\n _moduleSetUpFailed=False\n def __init__(self,stream=None ,descriptions=None ,verbosity=None ):\n self.failfast=False\n self.failures=[]\n self.errors=[]\n self.testsRun=0\n self.skipped=[]\n self.expectedFailures=[]\n self.unexpectedSuccesses=[]\n self.shouldStop=False\n self.buffer=False\n self.tb_locals=False\n self._stdout_buffer=None\n self._stderr_buffer=None\n self._original_stdout=sys.stdout\n self._original_stderr=sys.stderr\n self._mirrorOutput=False\n \n def printErrors(self):\n ''\n \n def startTest(self,test):\n ''\n self.testsRun +=1\n self._mirrorOutput=False\n self._setupStdout()\n \n def _setupStdout(self):\n if self.buffer:\n if self._stderr_buffer is None :\n self._stderr_buffer=io.StringIO()\n self._stdout_buffer=io.StringIO()\n sys.stdout=self._stdout_buffer\n sys.stderr=self._stderr_buffer\n \n def startTestRun(self):\n ''\n\n\n \n \n def stopTest(self,test):\n ''\n self._restoreStdout()\n self._mirrorOutput=False\n \n def _restoreStdout(self):\n if self.buffer:\n if self._mirrorOutput:\n output=sys.stdout.getvalue()\n error=sys.stderr.getvalue()\n if output:\n if not output.endswith('\\n'):\n output +='\\n'\n self._original_stdout.write(STDOUT_LINE %output)\n if error:\n if not error.endswith('\\n'):\n error +='\\n'\n self._original_stderr.write(STDERR_LINE %error)\n \n sys.stdout=self._original_stdout\n sys.stderr=self._original_stderr\n self._stdout_buffer.seek(0)\n self._stdout_buffer.truncate()\n self._stderr_buffer.seek(0)\n self._stderr_buffer.truncate()\n \n def stopTestRun(self):\n ''\n\n\n \n \n @failfast\n def addError(self,test,err):\n ''\n\n \n self.errors.append((test,self._exc_info_to_string(err,test)))\n self._mirrorOutput=True\n \n @failfast\n def addFailure(self,test,err):\n ''\n \n self.failures.append((test,self._exc_info_to_string(err,test)))\n self._mirrorOutput=True\n \n def addSubTest(self,test,subtest,err):\n ''\n\n\n \n \n \n if err is not None :\n if getattr(self,'failfast',False ):\n self.stop()\n if issubclass(err[0],test.failureException):\n errors=self.failures\n else :\n errors=self.errors\n errors.append((subtest,self._exc_info_to_string(err,test)))\n self._mirrorOutput=True\n \n def addSuccess(self,test):\n ''\n pass\n \n def addSkip(self,test,reason):\n ''\n self.skipped.append((test,reason))\n \n def addExpectedFailure(self,test,err):\n ''\n self.expectedFailures.append(\n (test,self._exc_info_to_string(err,test)))\n \n @failfast\n def addUnexpectedSuccess(self,test):\n ''\n self.unexpectedSuccesses.append(test)\n \n def wasSuccessful(self):\n ''\n \n \n \n return ((len(self.failures)==len(self.errors)==0)and\n (not hasattr(self,'unexpectedSuccesses')or\n len(self.unexpectedSuccesses)==0))\n \n def stop(self):\n ''\n self.shouldStop=True\n \n def _exc_info_to_string(self,err,test):\n ''\n exctype,value,tb=err\n tb=self._clean_tracebacks(exctype,value,tb,test)\n tb_e=traceback.TracebackException(\n exctype,value,tb,\n capture_locals=self.tb_locals,compact=True )\n msgLines=list(tb_e.format())\n \n if self.buffer:\n output=sys.stdout.getvalue()\n error=sys.stderr.getvalue()\n if output:\n if not output.endswith('\\n'):\n output +='\\n'\n msgLines.append(STDOUT_LINE %output)\n if error:\n if not error.endswith('\\n'):\n error +='\\n'\n msgLines.append(STDERR_LINE %error)\n return ''.join(msgLines)\n \n def _clean_tracebacks(self,exctype,value,tb,test):\n ret=None\n first=True\n excs=[(exctype,value,tb)]\n while excs:\n (exctype,value,tb)=excs.pop()\n \n while tb and self._is_relevant_tb_level(tb):\n tb=tb.tb_next\n \n \n if exctype is test.failureException:\n self._remove_unittest_tb_frames(tb)\n \n if first:\n ret=tb\n first=False\n else :\n value.__traceback__=tb\n \n if value is not None :\n for c in (value.__cause__,value.__context__):\n if c is not None :\n excs.append((type(c),c,c.__traceback__))\n return ret\n \n def _is_relevant_tb_level(self,tb):\n return '__unittest'in tb.tb_frame.f_globals\n \n def _remove_unittest_tb_frames(self,tb):\n ''\n\n\n\n\n\n \n prev=None\n while tb and not self._is_relevant_tb_level(tb):\n prev=tb\n tb=tb.tb_next\n if prev is not None :\n prev.tb_next=None\n \n def __repr__(self):\n return (\"<%s run=%i errors=%i failures=%i>\"%\n (util.strclass(self.__class__),self.testsRun,len(self.errors),\n len(self.failures)))\n", ["functools", "io", "sys", "traceback", "unittest", "unittest.util"]], "unittest.runner": [".py", "''\n\nimport sys\nimport time\nimport warnings\n\nfrom . import result\nfrom .case import _SubTest\nfrom .signals import registerResult\n\n__unittest=True\n\n\nclass _WritelnDecorator(object):\n ''\n def __init__(self,stream):\n self.stream=stream\n \n def __getattr__(self,attr):\n if attr in ('stream','__getstate__'):\n raise AttributeError(attr)\n return getattr(self.stream,attr)\n \n def writeln(self,arg=None ):\n if arg:\n self.write(arg)\n self.write('\\n')\n \n \nclass TextTestResult(result.TestResult):\n ''\n\n\n \n separator1='='*70\n separator2='-'*70\n \n def __init__(self,stream,descriptions,verbosity,*,durations=None ):\n ''\n \n super(TextTestResult,self).__init__(stream,descriptions,verbosity)\n self.stream=stream\n self.showAll=verbosity >1\n self.dots=verbosity ==1\n self.descriptions=descriptions\n self._newline=True\n self.durations=durations\n \n def getDescription(self,test):\n doc_first_line=test.shortDescription()\n if self.descriptions and doc_first_line:\n return '\\n'.join((str(test),doc_first_line))\n else :\n return str(test)\n \n def startTest(self,test):\n super(TextTestResult,self).startTest(test)\n if self.showAll:\n self.stream.write(self.getDescription(test))\n self.stream.write(\" ... \")\n self.stream.flush()\n self._newline=False\n \n def _write_status(self,test,status):\n is_subtest=isinstance(test,_SubTest)\n if is_subtest or self._newline:\n if not self._newline:\n self.stream.writeln()\n if is_subtest:\n self.stream.write(\" \")\n self.stream.write(self.getDescription(test))\n self.stream.write(\" ... \")\n self.stream.writeln(status)\n self.stream.flush()\n self._newline=True\n \n def addSubTest(self,test,subtest,err):\n if err is not None :\n if self.showAll:\n if issubclass(err[0],subtest.failureException):\n self._write_status(subtest,\"FAIL\")\n else :\n self._write_status(subtest,\"ERROR\")\n elif self.dots:\n if issubclass(err[0],subtest.failureException):\n self.stream.write('F')\n else :\n self.stream.write('E')\n self.stream.flush()\n super(TextTestResult,self).addSubTest(test,subtest,err)\n \n def addSuccess(self,test):\n super(TextTestResult,self).addSuccess(test)\n if self.showAll:\n self._write_status(test,\"ok\")\n elif self.dots:\n self.stream.write('.')\n self.stream.flush()\n \n def addError(self,test,err):\n super(TextTestResult,self).addError(test,err)\n if self.showAll:\n self._write_status(test,\"ERROR\")\n elif self.dots:\n self.stream.write('E')\n self.stream.flush()\n \n def addFailure(self,test,err):\n super(TextTestResult,self).addFailure(test,err)\n if self.showAll:\n self._write_status(test,\"FAIL\")\n elif self.dots:\n self.stream.write('F')\n self.stream.flush()\n \n def addSkip(self,test,reason):\n super(TextTestResult,self).addSkip(test,reason)\n if self.showAll:\n self._write_status(test,\"skipped {0!r}\".format(reason))\n elif self.dots:\n self.stream.write(\"s\")\n self.stream.flush()\n \n def addExpectedFailure(self,test,err):\n super(TextTestResult,self).addExpectedFailure(test,err)\n if self.showAll:\n self.stream.writeln(\"expected failure\")\n self.stream.flush()\n elif self.dots:\n self.stream.write(\"x\")\n self.stream.flush()\n \n def addUnexpectedSuccess(self,test):\n super(TextTestResult,self).addUnexpectedSuccess(test)\n if self.showAll:\n self.stream.writeln(\"unexpected success\")\n self.stream.flush()\n elif self.dots:\n self.stream.write(\"u\")\n self.stream.flush()\n \n def printErrors(self):\n if self.dots or self.showAll:\n self.stream.writeln()\n self.stream.flush()\n self.printErrorList('ERROR',self.errors)\n self.printErrorList('FAIL',self.failures)\n unexpectedSuccesses=getattr(self,'unexpectedSuccesses',())\n if unexpectedSuccesses:\n self.stream.writeln(self.separator1)\n for test in unexpectedSuccesses:\n self.stream.writeln(f\"UNEXPECTED SUCCESS: {self.getDescription(test)}\")\n self.stream.flush()\n \n def printErrorList(self,flavour,errors):\n for test,err in errors:\n self.stream.writeln(self.separator1)\n self.stream.writeln(\"%s: %s\"%(flavour,self.getDescription(test)))\n self.stream.writeln(self.separator2)\n self.stream.writeln(\"%s\"%err)\n self.stream.flush()\n \n \nclass TextTestRunner(object):\n ''\n\n\n\n \n resultclass=TextTestResult\n \n def __init__(self,stream=None ,descriptions=True ,verbosity=1,\n failfast=False ,buffer=False ,resultclass=None ,warnings=None ,\n *,tb_locals=False ,durations=None ):\n ''\n\n\n\n \n if stream is None :\n stream=sys.stderr\n self.stream=_WritelnDecorator(stream)\n self.descriptions=descriptions\n self.verbosity=verbosity\n self.failfast=failfast\n self.buffer=buffer\n self.tb_locals=tb_locals\n self.durations=durations\n self.warnings=warnings\n if resultclass is not None :\n self.resultclass=resultclass\n \n def _makeResult(self):\n try :\n return self.resultclass(self.stream,self.descriptions,\n self.verbosity,durations=self.durations)\n except TypeError:\n \n return self.resultclass(self.stream,self.descriptions,\n self.verbosity)\n \n def _printDurations(self,result):\n if not result.collectedDurations:\n return\n ls=sorted(result.collectedDurations,key=lambda x:x[1],\n reverse=True )\n if self.durations >0:\n ls=ls[:self.durations]\n self.stream.writeln(\"Slowest test durations\")\n if hasattr(result,'separator2'):\n self.stream.writeln(result.separator2)\n hidden=False\n for test,elapsed in ls:\n if self.verbosity <2 and elapsed <0.001:\n hidden=True\n continue\n self.stream.writeln(\"%-10s %s\"%(\"%.3fs\"%elapsed,test))\n if hidden:\n self.stream.writeln(\"\\n(durations < 0.001s were hidden; \"\n \"use -v to show these durations)\")\n else :\n self.stream.writeln(\"\")\n \n def run(self,test):\n ''\n result=self._makeResult()\n registerResult(result)\n result.failfast=self.failfast\n result.buffer=self.buffer\n result.tb_locals=self.tb_locals\n with warnings.catch_warnings():\n if self.warnings:\n \n warnings.simplefilter(self.warnings)\n startTime=time.perf_counter()\n startTestRun=getattr(result,'startTestRun',None )\n if startTestRun is not None :\n startTestRun()\n try :\n test(result)\n finally :\n stopTestRun=getattr(result,'stopTestRun',None )\n if stopTestRun is not None :\n stopTestRun()\n stopTime=time.perf_counter()\n timeTaken=stopTime -startTime\n result.printErrors()\n if self.durations is not None :\n self._printDurations(result)\n \n if hasattr(result,'separator2'):\n self.stream.writeln(result.separator2)\n \n run=result.testsRun\n self.stream.writeln(\"Ran %d test%s in %.3fs\"%\n (run,run !=1 and \"s\"or \"\",timeTaken))\n self.stream.writeln()\n \n expectedFails=unexpectedSuccesses=skipped=0\n try :\n results=map(len,(result.expectedFailures,\n result.unexpectedSuccesses,\n result.skipped))\n except AttributeError:\n pass\n else :\n expectedFails,unexpectedSuccesses,skipped=results\n \n infos=[]\n if not result.wasSuccessful():\n self.stream.write(\"FAILED\")\n failed,errored=len(result.failures),len(result.errors)\n if failed:\n infos.append(\"failures=%d\"%failed)\n if errored:\n infos.append(\"errors=%d\"%errored)\n elif run ==0:\n self.stream.write(\"NO TESTS RAN\")\n else :\n self.stream.write(\"OK\")\n if skipped:\n infos.append(\"skipped=%d\"%skipped)\n if expectedFails:\n infos.append(\"expected failures=%d\"%expectedFails)\n if unexpectedSuccesses:\n infos.append(\"unexpected successes=%d\"%unexpectedSuccesses)\n if infos:\n self.stream.writeln(\" (%s)\"%(\", \".join(infos),))\n else :\n self.stream.write(\"\\n\")\n self.stream.flush()\n return result\n", ["sys", "time", "unittest", "unittest.case", "unittest.result", "unittest.signals", "warnings"]], "unittest.signals": [".py", "import signal\nimport weakref\n\nfrom functools import wraps\n\n__unittest=True\n\n\nclass _InterruptHandler(object):\n def __init__(self,default_handler):\n self.called=False\n self.original_handler=default_handler\n if isinstance(default_handler,int):\n if default_handler ==signal.SIG_DFL:\n \n default_handler=signal.default_int_handler\n elif default_handler ==signal.SIG_IGN:\n \n \n def default_handler(unused_signum,unused_frame):\n pass\n else :\n raise TypeError(\"expected SIGINT signal handler to be \"\n \"signal.SIG_IGN, signal.SIG_DFL, or a \"\n \"callable object\")\n self.default_handler=default_handler\n \n def __call__(self,signum,frame):\n installed_handler=signal.getsignal(signal.SIGINT)\n if installed_handler is not self:\n \n \n self.default_handler(signum,frame)\n \n if self.called:\n self.default_handler(signum,frame)\n self.called=True\n for result in _results.keys():\n result.stop()\n \n_results=weakref.WeakKeyDictionary()\ndef registerResult(result):\n _results[result]=1\n \ndef removeResult(result):\n return bool(_results.pop(result,None ))\n \n_interrupt_handler=None\ndef installHandler():\n global _interrupt_handler\n if _interrupt_handler is None :\n default_handler=signal.getsignal(signal.SIGINT)\n _interrupt_handler=_InterruptHandler(default_handler)\n signal.signal(signal.SIGINT,_interrupt_handler)\n \n \ndef removeHandler(method=None ):\n if method is not None :\n @wraps(method)\n def inner(*args,**kwargs):\n initial=signal.getsignal(signal.SIGINT)\n removeHandler()\n try :\n return method(*args,**kwargs)\n finally :\n signal.signal(signal.SIGINT,initial)\n return inner\n \n global _interrupt_handler\n if _interrupt_handler is not None :\n signal.signal(signal.SIGINT,_interrupt_handler.original_handler)\n", ["functools", "signal", "weakref"]], "unittest.suite": [".py", "''\n\nimport sys\n\nfrom . import case\nfrom . import util\n\n__unittest=True\n\n\ndef _call_if_exists(parent,attr):\n func=getattr(parent,attr,lambda :None )\n func()\n \n \nclass BaseTestSuite(object):\n ''\n \n _cleanup=True\n \n def __init__(self,tests=()):\n self._tests=[]\n self._removed_tests=0\n self.addTests(tests)\n \n def __repr__(self):\n return \"<%s tests=%s>\"%(util.strclass(self.__class__),list(self))\n \n def __eq__(self,other):\n if not isinstance(other,self.__class__):\n return NotImplemented\n return list(self)==list(other)\n \n def __iter__(self):\n return iter(self._tests)\n \n def countTestCases(self):\n cases=self._removed_tests\n for test in self:\n if test:\n cases +=test.countTestCases()\n return cases\n \n def addTest(self,test):\n \n if not callable(test):\n raise TypeError(\"{} is not callable\".format(repr(test)))\n if isinstance(test,type)and issubclass(test,\n (case.TestCase,TestSuite)):\n raise TypeError(\"TestCases and TestSuites must be instantiated \"\n \"before passing them to addTest()\")\n self._tests.append(test)\n \n def addTests(self,tests):\n if isinstance(tests,str):\n raise TypeError(\"tests must be an iterable of tests, not a string\")\n for test in tests:\n self.addTest(test)\n \n def run(self,result):\n for index,test in enumerate(self):\n if result.shouldStop:\n break\n test(result)\n if self._cleanup:\n self._removeTestAtIndex(index)\n return result\n \n def _removeTestAtIndex(self,index):\n ''\n try :\n test=self._tests[index]\n except TypeError:\n \n pass\n else :\n \n \n if hasattr(test,'countTestCases'):\n self._removed_tests +=test.countTestCases()\n self._tests[index]=None\n \n def __call__(self,*args,**kwds):\n return self.run(*args,**kwds)\n \n def debug(self):\n ''\n for test in self:\n test.debug()\n \n \nclass TestSuite(BaseTestSuite):\n ''\n\n\n\n\n\n\n \n \n def run(self,result,debug=False ):\n topLevel=False\n if getattr(result,'_testRunEntered',False )is False :\n result._testRunEntered=topLevel=True\n \n for index,test in enumerate(self):\n if result.shouldStop:\n break\n \n if _isnotsuite(test):\n self._tearDownPreviousClass(test,result)\n self._handleModuleFixture(test,result)\n self._handleClassSetUp(test,result)\n result._previousTestClass=test.__class__\n \n if (getattr(test.__class__,'_classSetupFailed',False )or\n getattr(result,'_moduleSetUpFailed',False )):\n continue\n \n if not debug:\n test(result)\n else :\n test.debug()\n \n if self._cleanup:\n self._removeTestAtIndex(index)\n \n if topLevel:\n self._tearDownPreviousClass(None ,result)\n self._handleModuleTearDown(result)\n result._testRunEntered=False\n return result\n \n def debug(self):\n ''\n debug=_DebugResult()\n self.run(debug,True )\n \n \n \n def _handleClassSetUp(self,test,result):\n previousClass=getattr(result,'_previousTestClass',None )\n currentClass=test.__class__\n if currentClass ==previousClass:\n return\n if result._moduleSetUpFailed:\n return\n if getattr(currentClass,\"__unittest_skip__\",False ):\n return\n \n failed=False\n try :\n currentClass._classSetupFailed=False\n except TypeError:\n \n \n pass\n \n setUpClass=getattr(currentClass,'setUpClass',None )\n doClassCleanups=getattr(currentClass,'doClassCleanups',None )\n if setUpClass is not None :\n _call_if_exists(result,'_setupStdout')\n try :\n try :\n setUpClass()\n except Exception as e:\n if isinstance(result,_DebugResult):\n raise\n failed=True\n try :\n currentClass._classSetupFailed=True\n except TypeError:\n pass\n className=util.strclass(currentClass)\n self._createClassOrModuleLevelException(result,e,\n 'setUpClass',\n className)\n if failed and doClassCleanups is not None :\n doClassCleanups()\n for exc_info in currentClass.tearDown_exceptions:\n self._createClassOrModuleLevelException(\n result,exc_info[1],'setUpClass',className,\n info=exc_info)\n finally :\n _call_if_exists(result,'_restoreStdout')\n \n def _get_previous_module(self,result):\n previousModule=None\n previousClass=getattr(result,'_previousTestClass',None )\n if previousClass is not None :\n previousModule=previousClass.__module__\n return previousModule\n \n \n def _handleModuleFixture(self,test,result):\n previousModule=self._get_previous_module(result)\n currentModule=test.__class__.__module__\n if currentModule ==previousModule:\n return\n \n self._handleModuleTearDown(result)\n \n \n result._moduleSetUpFailed=False\n try :\n module=sys.modules[currentModule]\n except KeyError:\n return\n setUpModule=getattr(module,'setUpModule',None )\n if setUpModule is not None :\n _call_if_exists(result,'_setupStdout')\n try :\n try :\n setUpModule()\n except Exception as e:\n if isinstance(result,_DebugResult):\n raise\n result._moduleSetUpFailed=True\n self._createClassOrModuleLevelException(result,e,\n 'setUpModule',\n currentModule)\n if result._moduleSetUpFailed:\n try :\n case.doModuleCleanups()\n except Exception as e:\n self._createClassOrModuleLevelException(result,e,\n 'setUpModule',\n currentModule)\n finally :\n _call_if_exists(result,'_restoreStdout')\n \n def _createClassOrModuleLevelException(self,result,exc,method_name,\n parent,info=None ):\n errorName=f'{method_name} ({parent})'\n self._addClassOrModuleLevelException(result,exc,errorName,info)\n \n def _addClassOrModuleLevelException(self,result,exception,errorName,\n info=None ):\n error=_ErrorHolder(errorName)\n addSkip=getattr(result,'addSkip',None )\n if addSkip is not None and isinstance(exception,case.SkipTest):\n addSkip(error,str(exception))\n else :\n if not info:\n result.addError(error,sys.exc_info())\n else :\n result.addError(error,info)\n \n def _handleModuleTearDown(self,result):\n previousModule=self._get_previous_module(result)\n if previousModule is None :\n return\n if result._moduleSetUpFailed:\n return\n \n try :\n module=sys.modules[previousModule]\n except KeyError:\n return\n \n _call_if_exists(result,'_setupStdout')\n try :\n tearDownModule=getattr(module,'tearDownModule',None )\n if tearDownModule is not None :\n try :\n tearDownModule()\n except Exception as e:\n if isinstance(result,_DebugResult):\n raise\n self._createClassOrModuleLevelException(result,e,\n 'tearDownModule',\n previousModule)\n try :\n case.doModuleCleanups()\n except Exception as e:\n if isinstance(result,_DebugResult):\n raise\n self._createClassOrModuleLevelException(result,e,\n 'tearDownModule',\n previousModule)\n finally :\n _call_if_exists(result,'_restoreStdout')\n \n def _tearDownPreviousClass(self,test,result):\n previousClass=getattr(result,'_previousTestClass',None )\n currentClass=test.__class__\n if currentClass ==previousClass or previousClass is None :\n return\n if getattr(previousClass,'_classSetupFailed',False ):\n return\n if getattr(result,'_moduleSetUpFailed',False ):\n return\n if getattr(previousClass,\"__unittest_skip__\",False ):\n return\n \n tearDownClass=getattr(previousClass,'tearDownClass',None )\n doClassCleanups=getattr(previousClass,'doClassCleanups',None )\n if tearDownClass is None and doClassCleanups is None :\n return\n \n _call_if_exists(result,'_setupStdout')\n try :\n if tearDownClass is not None :\n try :\n tearDownClass()\n except Exception as e:\n if isinstance(result,_DebugResult):\n raise\n className=util.strclass(previousClass)\n self._createClassOrModuleLevelException(result,e,\n 'tearDownClass',\n className)\n if doClassCleanups is not None :\n doClassCleanups()\n for exc_info in previousClass.tearDown_exceptions:\n if isinstance(result,_DebugResult):\n raise exc_info[1]\n className=util.strclass(previousClass)\n self._createClassOrModuleLevelException(result,exc_info[1],\n 'tearDownClass',\n className,\n info=exc_info)\n finally :\n _call_if_exists(result,'_restoreStdout')\n \n \nclass _ErrorHolder(object):\n ''\n\n\n\n \n \n \n \n \n failureException=None\n \n def __init__(self,description):\n self.description=description\n \n def id(self):\n return self.description\n \n def shortDescription(self):\n return None\n \n def __repr__(self):\n return \"\"%(self.description,)\n \n def __str__(self):\n return self.id()\n \n def run(self,result):\n \n \n pass\n \n def __call__(self,result):\n return self.run(result)\n \n def countTestCases(self):\n return 0\n \ndef _isnotsuite(test):\n ''\n try :\n iter(test)\n except TypeError:\n return True\n return False\n \n \nclass _DebugResult(object):\n ''\n _previousTestClass=None\n _moduleSetUpFailed=False\n shouldStop=False\n", ["sys", "unittest", "unittest.case", "unittest.util"]], "unittest.util": [".py", "''\n\nfrom collections import namedtuple,Counter\nfrom os.path import commonprefix\n\n__unittest=True\n\n_MAX_LENGTH=80\n_PLACEHOLDER_LEN=12\n_MIN_BEGIN_LEN=5\n_MIN_END_LEN=5\n_MIN_COMMON_LEN=5\n_MIN_DIFF_LEN=_MAX_LENGTH -\\\n(_MIN_BEGIN_LEN+_PLACEHOLDER_LEN+_MIN_COMMON_LEN+\n_PLACEHOLDER_LEN+_MIN_END_LEN)\nassert _MIN_DIFF_LEN >=0\n\ndef _shorten(s,prefixlen,suffixlen):\n skip=len(s)-prefixlen -suffixlen\n if skip >_PLACEHOLDER_LEN:\n s='%s[%d chars]%s'%(s[:prefixlen],skip,s[len(s)-suffixlen:])\n return s\n \ndef _common_shorten_repr(*args):\n args=tuple(map(safe_repr,args))\n maxlen=max(map(len,args))\n if maxlen <=_MAX_LENGTH:\n return args\n \n prefix=commonprefix(args)\n prefixlen=len(prefix)\n \n common_len=_MAX_LENGTH -\\\n (maxlen -prefixlen+_MIN_BEGIN_LEN+_PLACEHOLDER_LEN)\n if common_len >_MIN_COMMON_LEN:\n assert _MIN_BEGIN_LEN+_PLACEHOLDER_LEN+_MIN_COMMON_LEN+\\\n (maxlen -prefixlen)<_MAX_LENGTH\n prefix=_shorten(prefix,_MIN_BEGIN_LEN,common_len)\n return tuple(prefix+s[prefixlen:]for s in args)\n \n prefix=_shorten(prefix,_MIN_BEGIN_LEN,_MIN_COMMON_LEN)\n return tuple(prefix+_shorten(s[prefixlen:],_MIN_DIFF_LEN,_MIN_END_LEN)\n for s in args)\n \ndef safe_repr(obj,short=False ):\n try :\n result=repr(obj)\n except Exception:\n result=object.__repr__(obj)\n if not short or len(result)<_MAX_LENGTH:\n return result\n return result[:_MAX_LENGTH]+' [truncated]...'\n \ndef strclass(cls):\n return \"%s.%s\"%(cls.__module__,cls.__qualname__)\n \ndef sorted_list_difference(expected,actual):\n ''\n\n\n\n\n\n \n i=j=0\n missing=[]\n unexpected=[]\n while True :\n try :\n e=expected[i]\n a=actual[j]\n if e a:\n unexpected.append(a)\n j +=1\n while actual[j]==a:\n j +=1\n else :\n i +=1\n try :\n while expected[i]==e:\n i +=1\n finally :\n j +=1\n while actual[j]==a:\n j +=1\n except IndexError:\n missing.extend(expected[i:])\n unexpected.extend(actual[j:])\n break\n return missing,unexpected\n \n \ndef unorderable_list_difference(expected,actual):\n ''\n\n\n\n \n missing=[]\n while expected:\n item=expected.pop()\n try :\n actual.remove(item)\n except ValueError:\n missing.append(item)\n \n \n return missing,actual\n \ndef three_way_cmp(x,y):\n ''\n return (x >y)-(x 0:\n self._raiseFailure(\n \"Unexpected logs found: {!r}\".format(\n self.watcher.output\n )\n )\n \n else :\n \n if len(self.watcher.records)==0:\n self._raiseFailure(\n \"no logs of level {} or higher triggered on {}\"\n .format(logging.getLevelName(self.level),self.logger.name))\n", ["collections", "logging", "unittest.case"]], "unittest": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n__all__=['TestResult','TestCase','IsolatedAsyncioTestCase','TestSuite',\n'TextTestRunner','TestLoader','FunctionTestCase','main',\n'defaultTestLoader','SkipTest','skip','skipIf','skipUnless',\n'expectedFailure','TextTestResult','installHandler',\n'registerResult','removeResult','removeHandler',\n'addModuleCleanup','doModuleCleanups','enterModuleContext']\n\n\n\n__all__.extend(['getTestCaseNames','makeSuite','findTestCases'])\n\n__unittest=True\n\nfrom .result import TestResult\nfrom .case import (addModuleCleanup,TestCase,FunctionTestCase,SkipTest,skip,\nskipIf,skipUnless,expectedFailure,doModuleCleanups,\nenterModuleContext)\nfrom .suite import BaseTestSuite,TestSuite\nfrom .loader import TestLoader,defaultTestLoader\nfrom .main import TestProgram,main\nfrom .runner import TextTestRunner,TextTestResult\nfrom .signals import installHandler,registerResult,removeResult,removeHandler\n\nfrom .loader import makeSuite,getTestCaseNames,findTestCases\n\n\n\n\n\n\ndef __dir__():\n return globals().keys()|{'IsolatedAsyncioTestCase'}\n \ndef __getattr__(name):\n if name =='IsolatedAsyncioTestCase':\n global IsolatedAsyncioTestCase\n from .async_case import IsolatedAsyncioTestCase\n return IsolatedAsyncioTestCase\n raise AttributeError(f\"module {__name__ !r} has no attribute {name !r}\")\n", ["unittest.async_case", "unittest.case", "unittest.loader", "unittest.main", "unittest.result", "unittest.runner", "unittest.signals", "unittest.suite"], 1], "unittest.__main__": [".py", "''\n\nimport sys\nif sys.argv[0].endswith(\"__main__.py\"):\n import os.path\n \n \n \n \n executable=os.path.basename(sys.executable)\n sys.argv[0]=executable+\" -m unittest\"\n del os\n \n__unittest=True\n\nfrom .main import main\n\nmain(module=None )\n", ["os.path", "sys", "unittest.main"]], "urllib.error": [".py", "class HTTPError(Exception):pass\n", []], "urllib.parse": [".py", "''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfrom collections import namedtuple\nimport functools\nimport re\nimport sys\nimport types\nimport warnings\n\n__all__=[\"urlparse\",\"urlunparse\",\"urljoin\",\"urldefrag\",\n\"urlsplit\",\"urlunsplit\",\"urlencode\",\"parse_qs\",\n\"parse_qsl\",\"quote\",\"quote_plus\",\"quote_from_bytes\",\n\"unquote\",\"unquote_plus\",\"unquote_to_bytes\",\n\"DefragResult\",\"ParseResult\",\"SplitResult\",\n\"DefragResultBytes\",\"ParseResultBytes\",\"SplitResultBytes\"]\n\n\n\n\n\nuses_relative=['','ftp','http','gopher','nntp','imap',\n'wais','file','https','shttp','mms',\n'prospero','rtsp','rtspu','sftp',\n'svn','svn+ssh','ws','wss']\n\nuses_netloc=['','ftp','http','gopher','nntp','telnet',\n'imap','wais','file','mms','https','shttp',\n'snews','prospero','rtsp','rtspu','rsync',\n'svn','svn+ssh','sftp','nfs','git','git+ssh',\n'ws','wss']\n\nuses_params=['','ftp','hdl','prospero','http','imap',\n'https','shttp','rtsp','rtspu','sip','sips',\n'mms','sftp','tel']\n\n\n\n\nnon_hierarchical=['gopher','hdl','mailto','news',\n'telnet','wais','imap','snews','sip','sips']\n\nuses_query=['','http','wais','imap','https','shttp','mms',\n'gopher','rtsp','rtspu','sip','sips']\n\nuses_fragment=['','ftp','hdl','http','gopher','news',\n'nntp','wais','https','shttp','snews',\n'file','prospero']\n\n\nscheme_chars=('abcdefghijklmnopqrstuvwxyz'\n'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\n'0123456789'\n'+-.')\n\n\n_UNSAFE_URL_BYTES_TO_REMOVE=['\\t','\\r','\\n']\n\ndef clear_cache():\n ''\n urlsplit.cache_clear()\n _byte_quoter_factory.cache_clear()\n \n \n \n \n \n \n \n_implicit_encoding='ascii'\n_implicit_errors='strict'\n\ndef _noop(obj):\n return obj\n \ndef _encode_result(obj,encoding=_implicit_encoding,\nerrors=_implicit_errors):\n return obj.encode(encoding,errors)\n \ndef _decode_args(args,encoding=_implicit_encoding,\nerrors=_implicit_errors):\n return tuple(x.decode(encoding,errors)if x else ''for x in args)\n \ndef _coerce_args(*args):\n\n\n\n\n\n str_input=isinstance(args[0],str)\n for arg in args[1:]:\n \n \n if arg and isinstance(arg,str)!=str_input:\n raise TypeError(\"Cannot mix str and non-str arguments\")\n if str_input:\n return args+(_noop,)\n return _decode_args(args)+(_encode_result,)\n \n \nclass _ResultMixinStr(object):\n ''\n __slots__=()\n \n def encode(self,encoding='ascii',errors='strict'):\n return self._encoded_counterpart(*(x.encode(encoding,errors)for x in self))\n \n \nclass _ResultMixinBytes(object):\n ''\n __slots__=()\n \n def decode(self,encoding='ascii',errors='strict'):\n return self._decoded_counterpart(*(x.decode(encoding,errors)for x in self))\n \n \nclass _NetlocResultMixinBase(object):\n ''\n __slots__=()\n \n @property\n def username(self):\n return self._userinfo[0]\n \n @property\n def password(self):\n return self._userinfo[1]\n \n @property\n def hostname(self):\n hostname=self._hostinfo[0]\n if not hostname:\n return None\n \n \n separator='%'if isinstance(hostname,str)else b'%'\n hostname,percent,zone=hostname.partition(separator)\n return hostname.lower()+percent+zone\n \n @property\n def port(self):\n port=self._hostinfo[1]\n if port is not None :\n try :\n port=int(port,10)\n except ValueError:\n message=f'Port could not be cast to integer value as {port!r}'\n raise ValueError(message)from None\n if not (0 <=port <=65535):\n raise ValueError(\"Port out of range 0-65535\")\n return port\n \n __class_getitem__=classmethod(types.GenericAlias)\n \n \nclass _NetlocResultMixinStr(_NetlocResultMixinBase,_ResultMixinStr):\n __slots__=()\n \n @property\n def _userinfo(self):\n netloc=self.netloc\n userinfo,have_info,hostinfo=netloc.rpartition('@')\n if have_info:\n username,have_password,password=userinfo.partition(':')\n if not have_password:\n password=None\n else :\n username=password=None\n return username,password\n \n @property\n def _hostinfo(self):\n netloc=self.netloc\n _,_,hostinfo=netloc.rpartition('@')\n _,have_open_br,bracketed=hostinfo.partition('[')\n if have_open_br:\n hostname,_,port=bracketed.partition(']')\n _,_,port=port.partition(':')\n else :\n hostname,_,port=hostinfo.partition(':')\n if not port:\n port=None\n return hostname,port\n \n \nclass _NetlocResultMixinBytes(_NetlocResultMixinBase,_ResultMixinBytes):\n __slots__=()\n \n @property\n def _userinfo(self):\n netloc=self.netloc\n userinfo,have_info,hostinfo=netloc.rpartition(b'@')\n if have_info:\n username,have_password,password=userinfo.partition(b':')\n if not have_password:\n password=None\n else :\n username=password=None\n return username,password\n \n @property\n def _hostinfo(self):\n netloc=self.netloc\n _,_,hostinfo=netloc.rpartition(b'@')\n _,have_open_br,bracketed=hostinfo.partition(b'[')\n if have_open_br:\n hostname,_,port=bracketed.partition(b']')\n _,_,port=port.partition(b':')\n else :\n hostname,_,port=hostinfo.partition(b':')\n if not port:\n port=None\n return hostname,port\n \n \n_DefragResultBase=namedtuple('DefragResult','url fragment')\n_SplitResultBase=namedtuple(\n'SplitResult','scheme netloc path query fragment')\n_ParseResultBase=namedtuple(\n'ParseResult','scheme netloc path params query fragment')\n\n_DefragResultBase.__doc__=\"\"\"\nDefragResult(url, fragment)\n\nA 2-tuple that contains the url without fragment identifier and the fragment\nidentifier as a separate argument.\n\"\"\"\n\n_DefragResultBase.url.__doc__=\"\"\"The URL with no fragment identifier.\"\"\"\n\n_DefragResultBase.fragment.__doc__=\"\"\"\nFragment identifier separated from URL, that allows indirect identification of a\nsecondary resource by reference to a primary resource and additional identifying\ninformation.\n\"\"\"\n\n_SplitResultBase.__doc__=\"\"\"\nSplitResult(scheme, netloc, path, query, fragment)\n\nA 5-tuple that contains the different components of a URL. Similar to\nParseResult, but does not split params.\n\"\"\"\n\n_SplitResultBase.scheme.__doc__=\"\"\"Specifies URL scheme for the request.\"\"\"\n\n_SplitResultBase.netloc.__doc__=\"\"\"\nNetwork location where the request is made to.\n\"\"\"\n\n_SplitResultBase.path.__doc__=\"\"\"\nThe hierarchical path, such as the path to a file to download.\n\"\"\"\n\n_SplitResultBase.query.__doc__=\"\"\"\nThe query component, that contains non-hierarchical data, that along with data\nin path component, identifies a resource in the scope of URI's scheme and\nnetwork location.\n\"\"\"\n\n_SplitResultBase.fragment.__doc__=\"\"\"\nFragment identifier, that allows indirect identification of a secondary resource\nby reference to a primary resource and additional identifying information.\n\"\"\"\n\n_ParseResultBase.__doc__=\"\"\"\nParseResult(scheme, netloc, path, params, query, fragment)\n\nA 6-tuple that contains components of a parsed URL.\n\"\"\"\n\n_ParseResultBase.scheme.__doc__=_SplitResultBase.scheme.__doc__\n_ParseResultBase.netloc.__doc__=_SplitResultBase.netloc.__doc__\n_ParseResultBase.path.__doc__=_SplitResultBase.path.__doc__\n_ParseResultBase.params.__doc__=\"\"\"\nParameters for last path element used to dereference the URI in order to provide\naccess to perform some operation on the resource.\n\"\"\"\n\n_ParseResultBase.query.__doc__=_SplitResultBase.query.__doc__\n_ParseResultBase.fragment.__doc__=_SplitResultBase.fragment.__doc__\n\n\n\n\n\nResultBase=_NetlocResultMixinStr\n\n\nclass DefragResult(_DefragResultBase,_ResultMixinStr):\n __slots__=()\n def geturl(self):\n if self.fragment:\n return self.url+'#'+self.fragment\n else :\n return self.url\n \nclass SplitResult(_SplitResultBase,_NetlocResultMixinStr):\n __slots__=()\n def geturl(self):\n return urlunsplit(self)\n \nclass ParseResult(_ParseResultBase,_NetlocResultMixinStr):\n __slots__=()\n def geturl(self):\n return urlunparse(self)\n \n \nclass DefragResultBytes(_DefragResultBase,_ResultMixinBytes):\n __slots__=()\n def geturl(self):\n if self.fragment:\n return self.url+b'#'+self.fragment\n else :\n return self.url\n \nclass SplitResultBytes(_SplitResultBase,_NetlocResultMixinBytes):\n __slots__=()\n def geturl(self):\n return urlunsplit(self)\n \nclass ParseResultBytes(_ParseResultBase,_NetlocResultMixinBytes):\n __slots__=()\n def geturl(self):\n return urlunparse(self)\n \n \ndef _fix_result_transcoding():\n _result_pairs=(\n (DefragResult,DefragResultBytes),\n (SplitResult,SplitResultBytes),\n (ParseResult,ParseResultBytes),\n )\n for _decoded,_encoded in _result_pairs:\n _decoded._encoded_counterpart=_encoded\n _encoded._decoded_counterpart=_decoded\n \n_fix_result_transcoding()\ndel _fix_result_transcoding\n\ndef urlparse(url,scheme='',allow_fragments=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n url,scheme,_coerce_result=_coerce_args(url,scheme)\n splitresult=urlsplit(url,scheme,allow_fragments)\n scheme,netloc,url,query,fragment=splitresult\n if scheme in uses_params and ';'in url:\n url,params=_splitparams(url)\n else :\n params=''\n result=ParseResult(scheme,netloc,url,params,query,fragment)\n return _coerce_result(result)\n \ndef _splitparams(url):\n if '/'in url:\n i=url.find(';',url.rfind('/'))\n if i <0:\n return url,''\n else :\n i=url.find(';')\n return url[:i],url[i+1:]\n \ndef _splitnetloc(url,start=0):\n delim=len(url)\n for c in '/?#':\n wdelim=url.find(c,start)\n if wdelim >=0:\n delim=min(delim,wdelim)\n return url[start:delim],url[delim:]\n \ndef _checknetloc(netloc):\n if not netloc or netloc.isascii():\n return\n \n \n import unicodedata\n n=netloc.replace('@','')\n n=n.replace(':','')\n n=n.replace('#','')\n n=n.replace('?','')\n netloc2=unicodedata.normalize('NFKC',n)\n if n ==netloc2:\n return\n for c in '/?#@:':\n if c in netloc2:\n raise ValueError(\"netloc '\"+netloc+\"' contains invalid \"+\n \"characters under NFKC normalization\")\n \n \n \n@functools.lru_cache(typed=True )\ndef urlsplit(url,scheme='',allow_fragments=True ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n url,scheme,_coerce_result=_coerce_args(url,scheme)\n \n for b in _UNSAFE_URL_BYTES_TO_REMOVE:\n url=url.replace(b,\"\")\n scheme=scheme.replace(b,\"\")\n \n allow_fragments=bool(allow_fragments)\n netloc=query=fragment=''\n i=url.find(':')\n if i >0:\n for c in url[:i]:\n if c not in scheme_chars:\n break\n else :\n scheme,url=url[:i].lower(),url[i+1:]\n \n if url[:2]=='//':\n netloc,url=_splitnetloc(url,2)\n if (('['in netloc and ']'not in netloc)or\n (']'in netloc and '['not in netloc)):\n raise ValueError(\"Invalid IPv6 URL\")\n if allow_fragments and '#'in url:\n url,fragment=url.split('#',1)\n if '?'in url:\n url,query=url.split('?',1)\n _checknetloc(netloc)\n v=SplitResult(scheme,netloc,url,query,fragment)\n return _coerce_result(v)\n \ndef urlunparse(components):\n ''\n\n\n \n scheme,netloc,url,params,query,fragment,_coerce_result=(\n _coerce_args(*components))\n if params:\n url=\"%s;%s\"%(url,params)\n return _coerce_result(urlunsplit((scheme,netloc,url,query,fragment)))\n \ndef urlunsplit(components):\n ''\n\n\n\n \n scheme,netloc,url,query,fragment,_coerce_result=(\n _coerce_args(*components))\n if netloc or (scheme and scheme in uses_netloc and url[:2]!='//'):\n if url and url[:1]!='/':url='/'+url\n url='//'+(netloc or '')+url\n if scheme:\n url=scheme+':'+url\n if query:\n url=url+'?'+query\n if fragment:\n url=url+'#'+fragment\n return _coerce_result(url)\n \ndef urljoin(base,url,allow_fragments=True ):\n ''\n \n if not base:\n return url\n if not url:\n return base\n \n base,url,_coerce_result=_coerce_args(base,url)\n bscheme,bnetloc,bpath,bparams,bquery,bfragment=\\\n urlparse(base,'',allow_fragments)\n scheme,netloc,path,params,query,fragment=\\\n urlparse(url,bscheme,allow_fragments)\n \n if scheme !=bscheme or scheme not in uses_relative:\n return _coerce_result(url)\n if scheme in uses_netloc:\n if netloc:\n return _coerce_result(urlunparse((scheme,netloc,path,\n params,query,fragment)))\n netloc=bnetloc\n \n if not path and not params:\n path=bpath\n params=bparams\n if not query:\n query=bquery\n return _coerce_result(urlunparse((scheme,netloc,path,\n params,query,fragment)))\n \n base_parts=bpath.split('/')\n if base_parts[-1]!='':\n \n \n del base_parts[-1]\n \n \n if path[:1]=='/':\n segments=path.split('/')\n else :\n segments=base_parts+path.split('/')\n \n \n segments[1:-1]=filter(None ,segments[1:-1])\n \n resolved_path=[]\n \n for seg in segments:\n if seg =='..':\n try :\n resolved_path.pop()\n except IndexError:\n \n \n pass\n elif seg =='.':\n continue\n else :\n resolved_path.append(seg)\n \n if segments[-1]in ('.','..'):\n \n \n resolved_path.append('')\n \n return _coerce_result(urlunparse((scheme,netloc,'/'.join(\n resolved_path)or '/',params,query,fragment)))\n \n \ndef urldefrag(url):\n ''\n\n\n\n\n \n url,_coerce_result=_coerce_args(url)\n if '#'in url:\n s,n,p,a,q,frag=urlparse(url)\n defrag=urlunparse((s,n,p,a,q,''))\n else :\n frag=''\n defrag=url\n return _coerce_result(DefragResult(defrag,frag))\n \n_hexdig='0123456789ABCDEFabcdef'\n_hextobyte=None\n\ndef unquote_to_bytes(string):\n ''\n \n \n if not string:\n \n string.split\n return b''\n if isinstance(string,str):\n string=string.encode('utf-8')\n bits=string.split(b'%')\n if len(bits)==1:\n return string\n res=[bits[0]]\n append=res.append\n \n \n global _hextobyte\n if _hextobyte is None :\n _hextobyte={(a+b).encode():bytes.fromhex(a+b)\n for a in _hexdig for b in _hexdig}\n for item in bits[1:]:\n try :\n append(_hextobyte[item[:2]])\n append(item[2:])\n except KeyError:\n append(b'%')\n append(item)\n return b''.join(res)\n \n_asciire=re.compile('([\\x00-\\x7f]+)')\n\ndef unquote(string,encoding='utf-8',errors='replace'):\n ''\n\n\n\n\n\n\n\n \n if isinstance(string,bytes):\n return unquote_to_bytes(string).decode(encoding,errors)\n if '%'not in string:\n string.split\n return string\n if encoding is None :\n encoding='utf-8'\n if errors is None :\n errors='replace'\n bits=_asciire.split(string)\n res=[bits[0]]\n append=res.append\n for i in range(1,len(bits),2):\n append(unquote_to_bytes(bits[i]).decode(encoding,errors))\n append(bits[i+1])\n return ''.join(res)\n \n \ndef parse_qs(qs,keep_blank_values=False ,strict_parsing=False ,\nencoding='utf-8',errors='replace',max_num_fields=None ,separator='&'):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n parsed_result={}\n pairs=parse_qsl(qs,keep_blank_values,strict_parsing,\n encoding=encoding,errors=errors,\n max_num_fields=max_num_fields,separator=separator)\n for name,value in pairs:\n if name in parsed_result:\n parsed_result[name].append(value)\n else :\n parsed_result[name]=[value]\n return parsed_result\n \n \ndef parse_qsl(qs,keep_blank_values=False ,strict_parsing=False ,\nencoding='utf-8',errors='replace',max_num_fields=None ,separator='&'):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n qs,_coerce_result=_coerce_args(qs)\n separator,_=_coerce_args(separator)\n \n if not separator or (not isinstance(separator,(str,bytes))):\n raise ValueError(\"Separator must be of type string or bytes.\")\n \n \n \n \n if max_num_fields is not None :\n num_fields=1+qs.count(separator)if qs else 0\n if max_num_fields \"\n \n def __missing__(self,b):\n \n res=chr(b)if b in self.safe else '%{:02X}'.format(b)\n self[b]=res\n return res\n \ndef quote(string,safe='/',encoding=None ,errors=None ):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n if isinstance(string,str):\n if not string:\n return string\n if encoding is None :\n encoding='utf-8'\n if errors is None :\n errors='strict'\n string=string.encode(encoding,errors)\n else :\n if encoding is not None :\n raise TypeError(\"quote() doesn't support 'encoding' for bytes\")\n if errors is not None :\n raise TypeError(\"quote() doesn't support 'errors' for bytes\")\n return quote_from_bytes(string,safe)\n \ndef quote_plus(string,safe='',encoding=None ,errors=None ):\n ''\n\n\n \n \n \n if ((isinstance(string,str)and ' 'not in string)or\n (isinstance(string,bytes)and b' 'not in string)):\n return quote(string,safe,encoding,errors)\n if isinstance(safe,str):\n space=' '\n else :\n space=b' '\n string=quote(string,safe+space,encoding,errors)\n return string.replace(' ','+')\n \n \n@functools.lru_cache\ndef _byte_quoter_factory(safe):\n return _Quoter(safe).__getitem__\n \ndef quote_from_bytes(bs,safe='/'):\n ''\n\n\n \n if not isinstance(bs,(bytes,bytearray)):\n raise TypeError(\"quote_from_bytes() expected bytes\")\n if not bs:\n return ''\n if isinstance(safe,str):\n \n safe=safe.encode('ascii','ignore')\n else :\n \n safe=bytes([c for c in safe if c <128])\n if not bs.rstrip(_ALWAYS_SAFE_BYTES+safe):\n return bs.decode()\n quoter=_byte_quoter_factory(safe)\n return ''.join([quoter(char)for char in bs])\n \ndef urlencode(query,doseq=False ,safe='',encoding=None ,errors=None ,\nquote_via=quote_plus):\n ''\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n if hasattr(query,\"items\"):\n query=query.items()\n else :\n \n \n try :\n \n \n if len(query)and not isinstance(query[0],tuple):\n raise TypeError\n \n \n \n \n except TypeError as err:\n raise TypeError(\"not a valid non-string sequence \"\n \"or mapping object\")from err\n \n l=[]\n if not doseq:\n for k,v in query:\n if isinstance(k,bytes):\n k=quote_via(k,safe)\n else :\n k=quote_via(str(k),safe,encoding,errors)\n \n if isinstance(v,bytes):\n v=quote_via(v,safe)\n else :\n v=quote_via(str(v),safe,encoding,errors)\n l.append(k+'='+v)\n else :\n for k,v in query:\n if isinstance(k,bytes):\n k=quote_via(k,safe)\n else :\n k=quote_via(str(k),safe,encoding,errors)\n \n if isinstance(v,bytes):\n v=quote_via(v,safe)\n l.append(k+'='+v)\n elif isinstance(v,str):\n v=quote_via(v,safe,encoding,errors)\n l.append(k+'='+v)\n else :\n try :\n \n x=len(v)\n except TypeError:\n \n v=quote_via(str(v),safe,encoding,errors)\n l.append(k+'='+v)\n else :\n \n for elt in v:\n if isinstance(elt,bytes):\n elt=quote_via(elt,safe)\n else :\n elt=quote_via(str(elt),safe,encoding,errors)\n l.append(k+'='+elt)\n return '&'.join(l)\n \n \ndef to_bytes(url):\n warnings.warn(\"urllib.parse.to_bytes() is deprecated as of 3.8\",\n DeprecationWarning,stacklevel=2)\n return _to_bytes(url)\n \n \ndef _to_bytes(url):\n ''\n \n \n \n if isinstance(url,str):\n try :\n url=url.encode(\"ASCII\").decode()\n except UnicodeError:\n raise UnicodeError(\"URL \"+repr(url)+\n \" contains non-ASCII characters\")\n return url\n \n \ndef unwrap(url):\n ''\n\n\n \n url=str(url).strip()\n if url[:1]=='<'and url[-1:]=='>':\n url=url[1:-1].strip()\n if url[:4]=='URL:':\n url=url[4:].strip()\n return url\n \n \ndef splittype(url):\n warnings.warn(\"urllib.parse.splittype() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splittype(url)\n \n \n_typeprog=None\ndef _splittype(url):\n ''\n global _typeprog\n if _typeprog is None :\n _typeprog=re.compile('([^/:]+):(.*)',re.DOTALL)\n \n match=_typeprog.match(url)\n if match:\n scheme,data=match.groups()\n return scheme.lower(),data\n return None ,url\n \n \ndef splithost(url):\n warnings.warn(\"urllib.parse.splithost() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splithost(url)\n \n \n_hostprog=None\ndef _splithost(url):\n ''\n global _hostprog\n if _hostprog is None :\n _hostprog=re.compile('//([^/#?]*)(.*)',re.DOTALL)\n \n match=_hostprog.match(url)\n if match:\n host_port,path=match.groups()\n if path and path[0]!='/':\n path='/'+path\n return host_port,path\n return None ,url\n \n \ndef splituser(host):\n warnings.warn(\"urllib.parse.splituser() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splituser(host)\n \n \ndef _splituser(host):\n ''\n user,delim,host=host.rpartition('@')\n return (user if delim else None ),host\n \n \ndef splitpasswd(user):\n warnings.warn(\"urllib.parse.splitpasswd() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splitpasswd(user)\n \n \ndef _splitpasswd(user):\n ''\n user,delim,passwd=user.partition(':')\n return user,(passwd if delim else None )\n \n \ndef splitport(host):\n warnings.warn(\"urllib.parse.splitport() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splitport(host)\n \n \n \n_portprog=None\ndef _splitport(host):\n ''\n global _portprog\n if _portprog is None :\n _portprog=re.compile('(.*):([0-9]*)',re.DOTALL)\n \n match=_portprog.fullmatch(host)\n if match:\n host,port=match.groups()\n if port:\n return host,port\n return host,None\n \n \ndef splitnport(host,defport=-1):\n warnings.warn(\"urllib.parse.splitnport() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splitnport(host,defport)\n \n \ndef _splitnport(host,defport=-1):\n ''\n\n\n \n host,delim,port=host.rpartition(':')\n if not delim:\n host=port\n elif port:\n try :\n nport=int(port)\n except ValueError:\n nport=None\n return host,nport\n return host,defport\n \n \ndef splitquery(url):\n warnings.warn(\"urllib.parse.splitquery() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splitquery(url)\n \n \ndef _splitquery(url):\n ''\n path,delim,query=url.rpartition('?')\n if delim:\n return path,query\n return url,None\n \n \ndef splittag(url):\n warnings.warn(\"urllib.parse.splittag() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splittag(url)\n \n \ndef _splittag(url):\n ''\n path,delim,tag=url.rpartition('#')\n if delim:\n return path,tag\n return url,None\n \n \ndef splitattr(url):\n warnings.warn(\"urllib.parse.splitattr() is deprecated as of 3.8, \"\n \"use urllib.parse.urlparse() instead\",\n DeprecationWarning,stacklevel=2)\n return _splitattr(url)\n \n \ndef _splitattr(url):\n ''\n \n words=url.split(';')\n return words[0],words[1:]\n \n \ndef splitvalue(attr):\n warnings.warn(\"urllib.parse.splitvalue() is deprecated as of 3.8, \"\n \"use urllib.parse.parse_qsl() instead\",\n DeprecationWarning,stacklevel=2)\n return _splitvalue(attr)\n \n \ndef _splitvalue(attr):\n ''\n attr,delim,value=attr.partition('=')\n return attr,(value if delim else None )\n", ["collections", "functools", "re", "sys", "types", "unicodedata", "warnings"]], "urllib.request": [".py", "from browser import ajax\nfrom . import error\n\nclass FileIO:\n\n def __init__(self,data):\n self._data=data\n \n def __enter__(self):\n return self\n \n def __exit__(self,*args):\n pass\n \n def read(self):\n return self._data\n \ndef urlopen(url,data=None ,timeout=None ):\n global result\n result=None\n \n def on_complete(req):\n global result\n if req.status ==200:\n result=req\n \n _ajax=ajax.ajax()\n _ajax.bind('complete',on_complete)\n if timeout is not None :\n _ajax.set_timeout(timeout)\n \n if data is None :\n _ajax.open('GET',url,False )\n _ajax.send()\n else :\n _ajax.open('POST',url,False )\n _ajax.send(data)\n \n if result is not None :\n if isinstance(result.text,str):\n return FileIO(result.text)\n \n return FileIO(result.text())\n raise error.HTTPError('file not found')\n", ["browser", "browser.ajax", "urllib", "urllib.error"]], "urllib": [".py", "", [], 1]} -__BRYTHON__.update_VFS(scripts) diff --git a/lib/brython_stdlib.min.js b/lib/brython_stdlib.min.js deleted file mode 120000 index c55102a..0000000 --- a/lib/brython_stdlib.min.js +++ /dev/null @@ -1 +0,0 @@ -brython_stdlib.js \ No newline at end of file diff --git a/lib/plotly-latest.min.js b/lib/plotly-latest.min.js deleted file mode 100644 index 3ab41f3..0000000 --- a/lib/plotly-latest.min.js +++ /dev/null @@ -1,61 +0,0 @@ -/** -* plotly.js v1.58.5 -* Copyright 2012-2021, Plotly, Inc. -* All rights reserved. -* Licensed under the MIT license -*/ -!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Plotly=t()}}((function(){return function t(e,r,n){function i(o,s){if(!r[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};e[o][0].call(u.exports,(function(t){return i(e[o][1][t]||t)}),u,u.exports,t,e,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o:not(.watermark)":"opacity:0;-webkit-transition:opacity 0.3s ease 0s;-moz-transition:opacity 0.3s ease 0s;-ms-transition:opacity 0.3s ease 0s;-o-transition:opacity 0.3s ease 0s;transition:opacity 0.3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X .modebar-group":"float:left;display:inline-block;box-sizing:border-box;padding-left:8px;position:relative;vertical-align:middle;white-space:nowrap;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;","X .modebar-btn svg":"position:relative;top:2px;","X .modebar.vertical":"display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-end;max-height:100%;","X .modebar.vertical svg":"top:-1px;","X .modebar.vertical .modebar-group":"display:block;float:none;padding-left:0px;padding-bottom:8px;","X .modebar.vertical .modebar-group .modebar-btn":"display:block;text-align:center;","X [data-title]:before,X [data-title]:after":"position:absolute;-webkit-transform:translate3d(0, 0, 0);-moz-transform:translate3d(0, 0, 0);-ms-transform:translate3d(0, 0, 0);-o-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);display:none;opacity:0;z-index:1001;pointer-events:none;top:110%;right:50%;","X [data-title]:hover:before,X [data-title]:hover:after":"display:block;opacity:1;","X [data-title]:before":"content:'';position:absolute;background:transparent;border:6px solid transparent;z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;","X [data-title]:after":"content:attr(data-title);background:#69738a;color:white;padding:8px 10px;font-size:12px;line-height:12px;white-space:nowrap;margin-right:-18px;border-radius:2px;","X .vertical [data-title]:before,X .vertical [data-title]:after":"top:0%;right:200%;","X .vertical [data-title]:before":"border:6px solid transparent;border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .select-outline":"fill:none;stroke-width:1;shape-rendering:crispEdges;","X .select-outline-1":"stroke:white;","X .select-outline-2":"stroke:black;stroke-dasharray:2px 2px;",Y:"font-family:'Open Sans', verdana, arial, sans-serif;position:fixed;top:50px;right:20px;z-index:10000;font-size:10pt;max-width:180px;","Y p":"margin:0;","Y .notifier-note":"min-width:180px;max-width:250px;border:1px solid #fff;z-index:3000;margin:0;background-color:#8c97af;background-color:rgba(140,151,175,0.9);color:#fff;padding:10px;overflow-wrap:break-word;word-wrap:break-word;-ms-hyphens:auto;-webkit-hyphens:auto;hyphens:auto;","Y .notifier-close":"color:#fff;opacity:0.8;float:right;padding:0 5px;background:none;border:none;font-size:20px;font-weight:bold;line-height:20px;","Y .notifier-close:hover":"color:#444;text-decoration:none;cursor:pointer;"};for(var a in i){var o=a.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");n.addStyleRule(o,i[a])}},{"../src/lib":778}],2:[function(t,e,r){"use strict";e.exports=t("../src/transforms/aggregate")},{"../src/transforms/aggregate":1365}],3:[function(t,e,r){"use strict";e.exports=t("../src/traces/bar")},{"../src/traces/bar":929}],4:[function(t,e,r){"use strict";e.exports=t("../src/traces/barpolar")},{"../src/traces/barpolar":942}],5:[function(t,e,r){"use strict";e.exports=t("../src/traces/box")},{"../src/traces/box":952}],6:[function(t,e,r){"use strict";e.exports=t("../src/components/calendars")},{"../src/components/calendars":641}],7:[function(t,e,r){"use strict";e.exports=t("../src/traces/candlestick")},{"../src/traces/candlestick":961}],8:[function(t,e,r){"use strict";e.exports=t("../src/traces/carpet")},{"../src/traces/carpet":980}],9:[function(t,e,r){"use strict";e.exports=t("../src/traces/choropleth")},{"../src/traces/choropleth":994}],10:[function(t,e,r){"use strict";e.exports=t("../src/traces/choroplethmapbox")},{"../src/traces/choroplethmapbox":1001}],11:[function(t,e,r){"use strict";e.exports=t("../src/traces/cone")},{"../src/traces/cone":1007}],12:[function(t,e,r){"use strict";e.exports=t("../src/traces/contour")},{"../src/traces/contour":1022}],13:[function(t,e,r){"use strict";e.exports=t("../src/traces/contourcarpet")},{"../src/traces/contourcarpet":1033}],14:[function(t,e,r){"use strict";e.exports=t("../src/core")},{"../src/core":755}],15:[function(t,e,r){"use strict";e.exports=t("../src/traces/densitymapbox")},{"../src/traces/densitymapbox":1041}],16:[function(t,e,r){"use strict";e.exports=t("../src/transforms/filter")},{"../src/transforms/filter":1366}],17:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnel")},{"../src/traces/funnel":1051}],18:[function(t,e,r){"use strict";e.exports=t("../src/traces/funnelarea")},{"../src/traces/funnelarea":1060}],19:[function(t,e,r){"use strict";e.exports=t("../src/transforms/groupby")},{"../src/transforms/groupby":1367}],20:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmap")},{"../src/traces/heatmap":1073}],21:[function(t,e,r){"use strict";e.exports=t("../src/traces/heatmapgl")},{"../src/traces/heatmapgl":1083}],22:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram")},{"../src/traces/histogram":1095}],23:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2d")},{"../src/traces/histogram2d":1101}],24:[function(t,e,r){"use strict";e.exports=t("../src/traces/histogram2dcontour")},{"../src/traces/histogram2dcontour":1105}],25:[function(t,e,r){"use strict";e.exports=t("../src/traces/image")},{"../src/traces/image":1113}],26:[function(t,e,r){"use strict";var n=t("./core");n.register([t("./bar"),t("./box"),t("./heatmap"),t("./histogram"),t("./histogram2d"),t("./histogram2dcontour"),t("./contour"),t("./scatterternary"),t("./violin"),t("./funnel"),t("./waterfall"),t("./image"),t("./pie"),t("./sunburst"),t("./treemap"),t("./funnelarea"),t("./scatter3d"),t("./surface"),t("./isosurface"),t("./volume"),t("./mesh3d"),t("./cone"),t("./streamtube"),t("./scattergeo"),t("./choropleth"),t("./scattergl"),t("./splom"),t("./pointcloud"),t("./heatmapgl"),t("./parcoords"),t("./parcats"),t("./scattermapbox"),t("./choroplethmapbox"),t("./densitymapbox"),t("./sankey"),t("./indicator"),t("./table"),t("./carpet"),t("./scattercarpet"),t("./contourcarpet"),t("./ohlc"),t("./candlestick"),t("./scatterpolar"),t("./scatterpolargl"),t("./barpolar")]),n.register([t("./aggregate"),t("./filter"),t("./groupby"),t("./sort")]),n.register([t("./calendars")]),e.exports=n},{"./aggregate":2,"./bar":3,"./barpolar":4,"./box":5,"./calendars":6,"./candlestick":7,"./carpet":8,"./choropleth":9,"./choroplethmapbox":10,"./cone":11,"./contour":12,"./contourcarpet":13,"./core":14,"./densitymapbox":15,"./filter":16,"./funnel":17,"./funnelarea":18,"./groupby":19,"./heatmap":20,"./heatmapgl":21,"./histogram":22,"./histogram2d":23,"./histogram2dcontour":24,"./image":25,"./indicator":27,"./isosurface":28,"./mesh3d":29,"./ohlc":30,"./parcats":31,"./parcoords":32,"./pie":33,"./pointcloud":34,"./sankey":35,"./scatter3d":36,"./scattercarpet":37,"./scattergeo":38,"./scattergl":39,"./scattermapbox":40,"./scatterpolar":41,"./scatterpolargl":42,"./scatterternary":43,"./sort":44,"./splom":45,"./streamtube":46,"./sunburst":47,"./surface":48,"./table":49,"./treemap":50,"./violin":51,"./volume":52,"./waterfall":53}],27:[function(t,e,r){"use strict";e.exports=t("../src/traces/indicator")},{"../src/traces/indicator":1121}],28:[function(t,e,r){"use strict";e.exports=t("../src/traces/isosurface")},{"../src/traces/isosurface":1127}],29:[function(t,e,r){"use strict";e.exports=t("../src/traces/mesh3d")},{"../src/traces/mesh3d":1132}],30:[function(t,e,r){"use strict";e.exports=t("../src/traces/ohlc")},{"../src/traces/ohlc":1137}],31:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcats")},{"../src/traces/parcats":1146}],32:[function(t,e,r){"use strict";e.exports=t("../src/traces/parcoords")},{"../src/traces/parcoords":1156}],33:[function(t,e,r){"use strict";e.exports=t("../src/traces/pie")},{"../src/traces/pie":1167}],34:[function(t,e,r){"use strict";e.exports=t("../src/traces/pointcloud")},{"../src/traces/pointcloud":1176}],35:[function(t,e,r){"use strict";e.exports=t("../src/traces/sankey")},{"../src/traces/sankey":1182}],36:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatter3d")},{"../src/traces/scatter3d":1220}],37:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattercarpet")},{"../src/traces/scattercarpet":1227}],38:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergeo")},{"../src/traces/scattergeo":1235}],39:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattergl")},{"../src/traces/scattergl":1248}],40:[function(t,e,r){"use strict";e.exports=t("../src/traces/scattermapbox")},{"../src/traces/scattermapbox":1258}],41:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolar")},{"../src/traces/scatterpolar":1266}],42:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterpolargl")},{"../src/traces/scatterpolargl":1273}],43:[function(t,e,r){"use strict";e.exports=t("../src/traces/scatterternary")},{"../src/traces/scatterternary":1281}],44:[function(t,e,r){"use strict";e.exports=t("../src/transforms/sort")},{"../src/transforms/sort":1369}],45:[function(t,e,r){"use strict";e.exports=t("../src/traces/splom")},{"../src/traces/splom":1290}],46:[function(t,e,r){"use strict";e.exports=t("../src/traces/streamtube")},{"../src/traces/streamtube":1298}],47:[function(t,e,r){"use strict";e.exports=t("../src/traces/sunburst")},{"../src/traces/sunburst":1306}],48:[function(t,e,r){"use strict";e.exports=t("../src/traces/surface")},{"../src/traces/surface":1315}],49:[function(t,e,r){"use strict";e.exports=t("../src/traces/table")},{"../src/traces/table":1323}],50:[function(t,e,r){"use strict";e.exports=t("../src/traces/treemap")},{"../src/traces/treemap":1332}],51:[function(t,e,r){"use strict";e.exports=t("../src/traces/violin")},{"../src/traces/violin":1344}],52:[function(t,e,r){"use strict";e.exports=t("../src/traces/volume")},{"../src/traces/volume":1352}],53:[function(t,e,r){"use strict";e.exports=t("../src/traces/waterfall")},{"../src/traces/waterfall":1360}],54:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).eye||[0,0,1],r=t.center||[0,0,0],s=t.up||[0,1,0],l=t.distanceLimits||[0,1/0],c=t.mode||"turntable",u=n(),f=i(),h=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,e,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,e,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,e,r,s),new o({turntable:u,orbit:f,matrix:h},c)};var n=t("turntable-camera-controller"),i=t("orbit-camera-controller"),a=t("matrix-camera-controller");function o(t,e){this._controllerNames=Object.keys(t),this._controllerList=this._controllerNames.map((function(e){return t[e]})),this._mode=e,this._active=t[e],this._active||(this._mode="turntable",this._active=t.turntable),this.modes=this._controllerNames,this.computedMatrix=this._active.computedMatrix,this.computedEye=this._active.computedEye,this.computedUp=this._active.computedUp,this.computedCenter=this._active.computedCenter,this.computedRadius=this._active.computedRadius}var s=o.prototype;[["flush",1],["idle",1],["lookAt",4],["rotate",4],["pan",4],["translate",4],["setMatrix",2],["setDistanceLimits",2],["setDistance",2]].forEach((function(t){for(var e=t[0],r=[],n=0;n1||i>1)}function A(t,e,r){return t.sort(E),t.forEach((function(n,i){var a,o,s=0;if(H(n,r)&&M(n))n.circularPathData.verticalBuffer=s+n.width/2;else{for(var l=0;lo.source.column)){var c=t[l].circularPathData.verticalBuffer+t[l].width/2+e;s=c>s?c:s}n.circularPathData.verticalBuffer=s+n.width/2}})),t}function S(t,r,i,a){var o=e.min(t.links,(function(t){return t.source.y0}));t.links.forEach((function(t){t.circular&&(t.circularPathData={})})),A(t.links.filter((function(t){return"top"==t.circularLinkType})),r,a),A(t.links.filter((function(t){return"bottom"==t.circularLinkType})),r,a),t.links.forEach((function(e){if(e.circular){if(e.circularPathData.arcRadius=e.width+10,e.circularPathData.leftNodeBuffer=5,e.circularPathData.rightNodeBuffer=5,e.circularPathData.sourceWidth=e.source.x1-e.source.x0,e.circularPathData.sourceX=e.source.x0+e.circularPathData.sourceWidth,e.circularPathData.targetX=e.target.x0,e.circularPathData.sourceY=e.y0,e.circularPathData.targetY=e.y1,H(e,a)&&M(e))e.circularPathData.leftSmallArcRadius=10+e.width/2,e.circularPathData.leftLargeArcRadius=10+e.width/2,e.circularPathData.rightSmallArcRadius=10+e.width/2,e.circularPathData.rightLargeArcRadius=10+e.width/2,"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=e.source.y1+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=e.source.y0-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius);else{var s=e.source.column,l=e.circularLinkType,c=t.links.filter((function(t){return t.source.column==s&&t.circularLinkType==l}));"bottom"==e.circularLinkType?c.sort(L):c.sort(C);var u=0;c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.leftSmallArcRadius=10+e.width/2+u,e.circularPathData.leftLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),s=e.target.column,c=t.links.filter((function(t){return t.target.column==s&&t.circularLinkType==l})),"bottom"==e.circularLinkType?c.sort(P):c.sort(I),u=0,c.forEach((function(t,n){t.circularLinkID==e.circularLinkID&&(e.circularPathData.rightSmallArcRadius=10+e.width/2+u,e.circularPathData.rightLargeArcRadius=10+e.width/2+n*r+u),u+=t.width})),"bottom"==e.circularLinkType?(e.circularPathData.verticalFullExtent=Math.max(i,e.source.y1,e.target.y1)+25+e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent-e.circularPathData.rightLargeArcRadius):(e.circularPathData.verticalFullExtent=o-25-e.circularPathData.verticalBuffer,e.circularPathData.verticalLeftInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.leftLargeArcRadius,e.circularPathData.verticalRightInnerExtent=e.circularPathData.verticalFullExtent+e.circularPathData.rightLargeArcRadius)}e.circularPathData.leftInnerExtent=e.circularPathData.sourceX+e.circularPathData.leftNodeBuffer,e.circularPathData.rightInnerExtent=e.circularPathData.targetX-e.circularPathData.rightNodeBuffer,e.circularPathData.leftFullExtent=e.circularPathData.sourceX+e.circularPathData.leftLargeArcRadius+e.circularPathData.leftNodeBuffer,e.circularPathData.rightFullExtent=e.circularPathData.targetX-e.circularPathData.rightLargeArcRadius-e.circularPathData.rightNodeBuffer}if(e.circular)e.path=function(t){var e="";e="top"==t.circularLinkType?"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 0 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY-t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 0 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 0 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY-t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 0 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY:"M"+t.circularPathData.sourceX+" "+t.circularPathData.sourceY+" L"+t.circularPathData.leftInnerExtent+" "+t.circularPathData.sourceY+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftSmallArcRadius+" 0 0 1 "+t.circularPathData.leftFullExtent+" "+(t.circularPathData.sourceY+t.circularPathData.leftSmallArcRadius)+" L"+t.circularPathData.leftFullExtent+" "+t.circularPathData.verticalLeftInnerExtent+" A"+t.circularPathData.leftLargeArcRadius+" "+t.circularPathData.leftLargeArcRadius+" 0 0 1 "+t.circularPathData.leftInnerExtent+" "+t.circularPathData.verticalFullExtent+" L"+t.circularPathData.rightInnerExtent+" "+t.circularPathData.verticalFullExtent+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightLargeArcRadius+" 0 0 1 "+t.circularPathData.rightFullExtent+" "+t.circularPathData.verticalRightInnerExtent+" L"+t.circularPathData.rightFullExtent+" "+(t.circularPathData.targetY+t.circularPathData.rightSmallArcRadius)+" A"+t.circularPathData.rightLargeArcRadius+" "+t.circularPathData.rightSmallArcRadius+" 0 0 1 "+t.circularPathData.rightInnerExtent+" "+t.circularPathData.targetY+" L"+t.circularPathData.targetX+" "+t.circularPathData.targetY;return e}(e);else{var f=n.linkHorizontal().source((function(t){return[t.source.x0+(t.source.x1-t.source.x0),t.y0]})).target((function(t){return[t.target.x0,t.y1]}));e.path=f(e)}}))}function E(t,e){return z(t)==z(e)?"bottom"==t.circularLinkType?L(t,e):C(t,e):z(e)-z(t)}function C(t,e){return t.y0-e.y0}function L(t,e){return e.y0-t.y0}function I(t,e){return t.y1-e.y1}function P(t,e){return e.y1-t.y1}function z(t){return t.target.column-t.source.column}function O(t){return t.target.x0-t.source.x1}function D(t,e){var r=T(t),n=O(e)/Math.tan(r);return"up"==q(t)?t.y1+n:t.y1-n}function R(t,e){var r=T(t),n=O(e)/Math.tan(r);return"up"==q(t)?t.y1-n:t.y1+n}function F(t,e,r,n){t.links.forEach((function(i){if(!i.circular&&i.target.column-i.source.column>1){var a=i.source.column+1,o=i.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)t.nodes.forEach((function(o){if(o.column==a){var c,u=s/(l+1),f=Math.pow(1-u,3),h=3*u*Math.pow(1-u,2),p=3*Math.pow(u,2)*(1-u),d=Math.pow(u,3),g=f*i.y0+h*i.y0+p*i.y1+d*i.y1,m=g-i.width/2,v=g+i.width/2;m>o.y0&&mo.y0&&vo.y1)&&(c=v-o.y0+10,o=N(o,c,e,r),t.nodes.forEach((function(t){b(t,n)!=b(o,n)&&t.column==o.column&&t.y0o.y1&&N(t,c,e,r)})))}}))}}))}function B(t,e){return t.y0>e.y0&&t.y0e.y0&&t.y1e.y1)}function N(t,e,r,n){return t.y0+e>=r&&t.y1+e<=n&&(t.y0=t.y0+e,t.y1=t.y1+e,t.targetLinks.forEach((function(t){t.y1=t.y1+e})),t.sourceLinks.forEach((function(t){t.y0=t.y0+e}))),t}function j(t,e,r,n){t.nodes.forEach((function(i){n&&i.y+(i.y1-i.y0)>e&&(i.y=i.y-(i.y+(i.y1-i.y0)-e));var a=t.links.filter((function(t){return b(t.source,r)==b(i,r)})),o=a.length;o>1&&a.sort((function(t,e){if(!t.circular&&!e.circular){if(t.target.column==e.target.column)return t.y1-e.y1;if(!V(t,e))return t.y1-e.y1;if(t.target.column>e.target.column){var r=R(e,t);return t.y1-r}if(e.target.column>t.target.column)return R(t,e)-e.y1}return t.circular&&!e.circular?"top"==t.circularLinkType?-1:1:e.circular&&!t.circular?"top"==e.circularLinkType?1:-1:t.circular&&e.circular?t.circularLinkType===e.circularLinkType&&"top"==t.circularLinkType?t.target.column===e.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:t.circularLinkType===e.circularLinkType&&"bottom"==t.circularLinkType?t.target.column===e.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:"top"==t.circularLinkType?-1:1:void 0}));var s=i.y0;a.forEach((function(t){t.y0=s+t.width/2,s+=t.width})),a.forEach((function(t,e){if("bottom"==t.circularLinkType){for(var r=e+1,n=0;r1&&n.sort((function(t,e){if(!t.circular&&!e.circular){if(t.source.column==e.source.column)return t.y0-e.y0;if(!V(t,e))return t.y0-e.y0;if(e.source.column0?"up":"down"}function H(t,e){return b(t.source,e)==b(t.target,e)}function G(t,r,n){var i=t.nodes,a=t.links,o=!1,s=!1;if(a.forEach((function(t){"top"==t.circularLinkType?o=!0:"bottom"==t.circularLinkType&&(s=!0)})),0==o||0==s){var l=e.min(i,(function(t){return t.y0})),c=(n-r)/(e.max(i,(function(t){return t.y1}))-l);i.forEach((function(t){var e=(t.y1-t.y0)*c;t.y0=(t.y0-l)*c,t.y1=t.y0+e})),a.forEach((function(t){t.y0=(t.y0-l)*c,t.y1=(t.y1-l)*c,t.width=t.width*c}))}}t.sankeyCircular=function(){var t,n,i=0,a=0,b=1,T=1,M=24,A=m,E=o,C=v,L=y,I=32,P=2,z=null;function O(){var t={nodes:C.apply(null,arguments),links:L.apply(null,arguments)};D(t),_(t,A,z),R(t),B(t),w(t,A),N(t,I,A),V(t);for(var e=4,r=0;r0?r+25+10:r,bottom:n=n>0?n+25+10:n,left:a=a>0?a+25+10:a,right:i=i>0?i+25+10:i}}(o),f=function(t,r){var n=e.max(t.nodes,(function(t){return t.column})),o=b-i,s=T-a,l=o/(o+r.right+r.left),c=s/(s+r.top+r.bottom);return i=i*l+r.left,b=0==r.right?b:b*l,a=a*c+r.top,T*=c,t.nodes.forEach((function(t){t.x0=i+t.column*((b-i-M)/n),t.x1=t.x0+M})),c}(o,u);l*=f,o.links.forEach((function(t){t.width=t.value*l})),c.forEach((function(t){var e=t.length;t.forEach((function(t,n){t.depth==c.length-1&&1==e||0==t.depth&&1==e?(t.y0=T/2-t.value*l,t.y1=t.y0+t.value*l):t.partOfCycle?0==k(t,r)?(t.y0=T/2+n,t.y1=t.y0+t.value*l):"top"==t.circularLinkType?(t.y0=a+n,t.y1=t.y0+t.value*l):(t.y0=T-t.value*l-n,t.y1=t.y0+t.value*l):0==u.top||0==u.bottom?(t.y0=(T-a)/e*n,t.y1=t.y0+t.value*l):(t.y0=(T-a)/2-e/2+n,t.y1=t.y0+t.value*l)}))}))}(l),y();for(var u=1,m=s;m>0;--m)v(u*=.99,l),y();function v(t,r){var n=c.length;c.forEach((function(i){var a=i.length,o=i[0].depth;i.forEach((function(i){var s;if(i.sourceLinks.length||i.targetLinks.length)if(i.partOfCycle&&k(i,r)>0);else if(0==o&&1==a)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else{var l=e.mean(i.sourceLinks,g),c=e.mean(i.targetLinks,d),u=((l&&c?(l+c)/2:l||c)-p(i))*t;i.y0+=u,i.y1+=u}}))}))}function y(){c.forEach((function(e){var r,n,i,o=a,s=e.length;for(e.sort(f),i=0;i0&&(r.y0+=n,r.y1+=n),o=r.y1+t;if((n=o-t-T)>0)for(o=r.y0-=n,r.y1-=n,i=s-2;i>=0;--i)(n=(r=e[i]).y1+t-o)>0&&(r.y0-=n,r.y1-=n),o=r.y0}))}}function V(t){t.nodes.forEach((function(t){t.sourceLinks.sort(u),t.targetLinks.sort(c)})),t.nodes.forEach((function(t){var e=t.y0,r=e,n=t.y1,i=n;t.sourceLinks.forEach((function(t){t.circular?(t.y0=n-t.width/2,n-=t.width):(t.y0=e+t.width/2,e+=t.width)})),t.targetLinks.forEach((function(t){t.circular?(t.y1=i-t.width/2,i-=t.width):(t.y1=r+t.width/2,r+=t.width)}))}))}return O.nodeId=function(t){return arguments.length?(A="function"==typeof t?t:s(t),O):A},O.nodeAlign=function(t){return arguments.length?(E="function"==typeof t?t:s(t),O):E},O.nodeWidth=function(t){return arguments.length?(M=+t,O):M},O.nodePadding=function(e){return arguments.length?(t=+e,O):t},O.nodes=function(t){return arguments.length?(C="function"==typeof t?t:s(t),O):C},O.links=function(t){return arguments.length?(L="function"==typeof t?t:s(t),O):L},O.size=function(t){return arguments.length?(i=a=0,b=+t[0],T=+t[1],O):[b-i,T-a]},O.extent=function(t){return arguments.length?(i=+t[0][0],b=+t[1][0],a=+t[0][1],T=+t[1][1],O):[[i,a],[b,T]]},O.iterations=function(t){return arguments.length?(I=+t,O):I},O.circularLinkGap=function(t){return arguments.length?(P=+t,O):P},O.nodePaddingRatio=function(t){return arguments.length?(n=+t,O):n},O.sortNodes=function(t){return arguments.length?(z=t,O):z},O.update=function(t){return w(t,A),V(t),t.links.forEach((function(t){t.circular&&(t.circularLinkType=t.y0+t.y1a&&(b=a);var o=e.min(i,(function(t){return(y-n-(t.length-1)*b)/e.sum(t,u)}));i.forEach((function(t){t.forEach((function(t,e){t.y1=(t.y0=e)+t.value*o}))})),t.links.forEach((function(t){t.width=t.value*o}))}(),d();for(var a=1,o=M;o>0;--o)l(a*=.99),d(),s(a),d();function s(t){i.forEach((function(r){r.forEach((function(r){if(r.targetLinks.length){var n=(e.sum(r.targetLinks,h)/e.sum(r.targetLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function l(t){i.slice().reverse().forEach((function(r){r.forEach((function(r){if(r.sourceLinks.length){var n=(e.sum(r.sourceLinks,p)/e.sum(r.sourceLinks,u)-f(r))*t;r.y0+=n,r.y1+=n}}))}))}function d(){i.forEach((function(t){var e,r,i,a=n,o=t.length;for(t.sort(c),i=0;i0&&(e.y0+=r,e.y1+=r),a=e.y1+b;if((r=a-b-y)>0)for(a=e.y0-=r,e.y1-=r,i=o-2;i>=0;--i)(r=(e=t[i]).y1+b-a)>0&&(e.y0-=r,e.y1-=r),a=e.y0}))}}function I(t){t.nodes.forEach((function(t){t.sourceLinks.sort(l),t.targetLinks.sort(s)})),t.nodes.forEach((function(t){var e=t.y0,r=e;t.sourceLinks.forEach((function(t){t.y0=e+t.width/2,e+=t.width})),t.targetLinks.forEach((function(t){t.y1=r+t.width/2,r+=t.width}))}))}return A.update=function(t){return I(t),t},A.nodeId=function(t){return arguments.length?(_="function"==typeof t?t:o(t),A):_},A.nodeAlign=function(t){return arguments.length?(w="function"==typeof t?t:o(t),A):w},A.nodeWidth=function(t){return arguments.length?(x=+t,A):x},A.nodePadding=function(t){return arguments.length?(b=+t,A):b},A.nodes=function(t){return arguments.length?(T="function"==typeof t?t:o(t),A):T},A.links=function(t){return arguments.length?(k="function"==typeof t?t:o(t),A):k},A.size=function(e){return arguments.length?(t=n=0,i=+e[0],y=+e[1],A):[i-t,y-n]},A.extent=function(e){return arguments.length?(t=+e[0][0],i=+e[1][0],n=+e[0][1],y=+e[1][1],A):[[t,n],[i,y]]},A.iterations=function(t){return arguments.length?(M=+t,A):M},A},t.sankeyCenter=function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?e.min(t.sourceLinks,i)-1:0},t.sankeyLeft=function(t){return t.depth},t.sankeyRight=function(t,e){return e-1-t.height},t.sankeyJustify=a,t.sankeyLinkHorizontal=function(){return n.linkHorizontal().source(y).target(x)},Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-array":156,"d3-collection":157,"d3-shape":165}],57:[function(t,e,r){"use strict";e.exports=t("./quad")},{"./quad":58}],58:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),i=t("clamp"),a=t("parse-rect"),o=t("array-bounds"),s=t("pick-by-alias"),l=t("defined"),c=t("flatten-vertex-data"),u=t("is-obj"),f=t("dtype"),h=t("math-log2");function p(t,e){for(var r=e[0],n=e[1],a=1/(e[2]-r),o=1/(e[3]-n),s=new Array(t.length),l=0,c=t.length/2;l>>1;e.dtype||(e.dtype="array"),"string"==typeof e.dtype?d=new(f(e.dtype))(m):e.dtype&&(d=e.dtype,Array.isArray(d)&&(d.length=m));for(var v=0;vr||s>1073741824){for(var h=0;he+n||w>r+n||T=M||a===o)){var s=y[i];void 0===o&&(o=s.length);for(var l=a;l=d&&u<=m&&f>=g&&f<=v&&S.push(c)}var h=x[i],p=h[4*a+0],b=h[4*a+1],A=h[4*a+2],E=h[4*a+3],I=L(h,a+1),P=.5*n,z=i+1;C(e,r,P,z,p,b||A||E||I),C(e,r+P,P,z,b,A||E||I),C(e+P,r,P,z,A,E||I),C(e+P,r+P,P,z,E,I)}}function L(t,e){for(var r=null,n=0;null===r;)if(r=t[4*e+n],++n>t.length)return null;return r}return C(0,0,1,0,0,1),S},d;function E(t,e,r,i,a){for(var o=[],s=0;s0){e+=Math.abs(a(t[0]));for(var r=1;r2){for(s=0;st[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]=0))throw new Error("precision must be a positive number");var r=Math.pow(10,e||0);return Math.round(t*r)/r},r.radiansToLength=f,r.lengthToRadians=h,r.lengthToDegrees=function(t,e){return p(h(t,e))},r.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},r.radiansToDegrees=p,r.degreesToRadians=function(t){return t%360*Math.PI/180},r.convertLength=function(t,e,r){if(void 0===e&&(e="kilometers"),void 0===r&&(r="kilometers"),!(t>=0))throw new Error("length must be a positive number");return f(h(t,e),r)},r.convertArea=function(t,e,n){if(void 0===e&&(e="meters"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("area must be a positive number");var i=r.areaFactors[e];if(!i)throw new Error("invalid original units");var a=r.areaFactors[n];if(!a)throw new Error("invalid final units");return t/i*a},r.isNumber=d,r.isObject=function(t){return!!t&&t.constructor===Object},r.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!d(t))throw new Error("bbox must only contain numbers")}))},r.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")},r.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},r.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},r.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},r.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},r.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},r.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},r.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},{}],63:[function(t,e,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t("@turf/helpers");function i(t,e,r){if(null!==t)for(var n,a,o,s,l,c,u,f,h=0,p=0,d=t.type,g="FeatureCollection"===d,m="Feature"===d,v=g?t.features.length:1,y=0;yc||p>u||d>f)return l=i,c=r,u=p,f=d,void(o=0);var g=n.lineString([l,i],t.properties);if(!1===e(g,r,a,d,o))return!1;o++,l=i}))&&void 0}}}))}function u(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,r,i){if(null!==t.geometry){var a=t.geometry.type,o=t.geometry.coordinates;switch(a){case"LineString":if(!1===e(t,r,i,0,0))return!1;break;case"Polygon":for(var s=0;si&&(i=t[o]),t[o] - * @license MIT - */function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i=0;c--)if(u[c]!==f[c])return!1;for(c=u.length-1;c>=0;c--)if(s=u[c],!x(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function _(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function w(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&v(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!t&&i&&!r;if((!t&&o.isError(i)&&a&&_(i,r)||s)&&v(i,r,"Got unwanted exception"+n),t&&i&&r&&!_(i,r)||!t&&i)throw i}h.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return g(m(t.actual),128)+" "+t.operator+" "+g(m(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=d(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=v,h.ok=y,h.equal=function(t,e,r){t!=e&&v(t,e,r,"==",h.equal)},h.notEqual=function(t,e,r){t==e&&v(t,e,r,"!=",h.notEqual)},h.deepEqual=function(t,e,r){x(t,e,!1)||v(t,e,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(t,e,r){x(t,e,!0)||v(t,e,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(t,e,r){x(t,e,!1)&&v(t,e,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function t(e,r,n){x(e,r,!0)&&v(e,r,n,"notDeepStrictEqual",t)},h.strictEqual=function(t,e,r){t!==e&&v(t,e,r,"===",h.strictEqual)},h.notStrictEqual=function(t,e,r){t===e&&v(t,e,r,"!==",h.notStrictEqual)},h.throws=function(t,e,r){w(!0,t,e,r)},h.doesNotThrow=function(t,e,r){w(!1,t,e,r)},h.ifError=function(t){if(t)throw t},h.strict=n((function t(e,r){e||v(e,!0,r,"==",t)}),h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var T=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":499,"util/":76}],74:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],75:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],76:[function(t,e,r){(function(e,n){(function(){var i=/%[sdj%]/g;r.format=function(t){if(!v(t)){for(var e=[],r=0;r=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),l=n[r];r=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),d(e)?n.showHidden=e:e&&r._extend(n,e),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),u(n,t,n.depth)}function l(t,e){var r=s.styles[e];return r?"\x1b["+s.colors[r][0]+"m"+t+"\x1b["+s.colors[r][1]+"m":t}function c(t,e){return t}function u(t,e,n){if(t.customInspect&&e&&T(e.inspect)&&e.inspect!==r.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(n,t);return v(i)||(i=u(t,i,n)),i}var a=function(t,e){if(y(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(m(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),w(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(e);if(0===o.length){if(T(e)){var l=e.name?": "+e.name:"";return t.stylize("[Function"+l+"]","special")}if(x(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(_(e))return t.stylize(Date.prototype.toString.call(e),"date");if(w(e))return f(e)}var c,b="",k=!1,M=["{","}"];(p(e)&&(k=!0,M=["[","]"]),T(e))&&(b=" [Function"+(e.name?": "+e.name:"")+"]");return x(e)&&(b=" "+RegExp.prototype.toString.call(e)),_(e)&&(b=" "+Date.prototype.toUTCString.call(e)),w(e)&&(b=" "+f(e)),0!==o.length||k&&0!=e.length?n<0?x(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),c=k?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,b,M)):M[0]+b+M[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,r,n,i,a){var o,s,l;if((l=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=l.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):l.set&&(s=t.stylize("[Setter]","special")),E(n,i)||(o="["+i+"]"),s||(t.seen.indexOf(l.value)<0?(s=g(r)?u(t,l.value,null):u(t,l.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+s.split("\n").map((function(t){return" "+t})).join("\n")):s=t.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function m(t){return"number"==typeof t}function v(t){return"string"==typeof t}function y(t){return void 0===t}function x(t){return b(t)&&"[object RegExp]"===k(t)}function b(t){return"object"==typeof t&&null!==t}function _(t){return b(t)&&"[object Date]"===k(t)}function w(t){return b(t)&&("[object Error]"===k(t)||t instanceof Error)}function T(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function M(t){return t<10?"0"+t.toString(10):t.toString(10)}r.debuglog=function(t){if(y(a)&&(a=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var n=e.pid;o[t]=function(){var e=r.format.apply(r,arguments);console.error("%s %d: %s",t,n,e)}}else o[t]=function(){};return o[t]},r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=d,r.isNull=g,r.isNullOrUndefined=function(t){return null==t},r.isNumber=m,r.isString=v,r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=y,r.isRegExp=x,r.isObject=b,r.isDate=_,r.isError=w,r.isFunction=T,r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t},r.isBuffer=t("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function S(){var t=new Date,e=[M(t.getHours()),M(t.getMinutes()),M(t.getSeconds())].join(":");return[t.getDate(),A[t.getMonth()],e].join(" ")}function E(t,e){return Object.prototype.hasOwnProperty.call(t,e)}r.log=function(){console.log("%s - %s",S(),r.format.apply(r,arguments))},r.inherits=t("inherits"),r._extend=function(t,e){if(!e||!b(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this)}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":75,_process:526,inherits:74}],77:[function(t,e,r){e.exports=function(t){return atob(t)}},{}],78:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=e.length,a=new Array(r+1),o=0;o0?o-4:o;for(r=0;r>16&255,l[u++]=e>>8&255,l[u++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,l[u++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e);return l},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;os?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,l=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function u(t,e,r){for(var i,a,o=[],s=e;s>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],80:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).add(e[0].mul(t[1])),t[1].mul(e[1]))}},{"./lib/rationalize":90}],81:[function(t,e,r){"use strict";e.exports=function(t,e){return t[0].mul(e[1]).cmp(e[0].mul(t[1]))}},{}],82:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]),t[1].mul(e[0]))}},{"./lib/rationalize":90}],83:[function(t,e,r){"use strict";var n=t("./is-rat"),i=t("./lib/is-bn"),a=t("./lib/num-to-bn"),o=t("./lib/str-to-bn"),s=t("./lib/rationalize"),l=t("./div");e.exports=function t(e,r){if(n(e))return r?l(e,t(r)):[e[0].clone(),e[1].clone()];var c,u,f=0;if(i(e))c=e.clone();else if("string"==typeof e)c=o(e);else{if(0===e)return[a(0),a(1)];if(e===Math.floor(e))c=a(e);else{for(;e!==Math.floor(e);)e*=Math.pow(2,256),f-=256;c=a(e)}}if(n(r))c.mul(r[1]),u=r[0].clone();else if(i(r))u=r.clone();else if("string"==typeof r)u=o(r);else if(r)if(r===Math.floor(r))u=a(r);else{for(;r!==Math.floor(r);)r*=Math.pow(2,256),f+=256;u=a(r)}else u=a(1);f>0?c=c.ushln(f):f<0&&(u=u.ushln(-f));return s(c,u)}},{"./div":82,"./is-rat":84,"./lib/is-bn":88,"./lib/num-to-bn":89,"./lib/rationalize":90,"./lib/str-to-bn":91}],84:[function(t,e,r){"use strict";var n=t("./lib/is-bn");e.exports=function(t){return Array.isArray(t)&&2===t.length&&n(t[0])&&n(t[1])}},{"./lib/is-bn":88}],85:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return t.cmp(new n(0))}},{"bn.js":99}],86:[function(t,e,r){"use strict";var n=t("./bn-sign");e.exports=function(t){var e=t.length,r=t.words,i=0;if(1===e)i=r[0];else if(2===e)i=r[0]+67108864*r[1];else for(var a=0;a20)return 52;return r+32}},{"bit-twiddle":97,"double-bits":173}],88:[function(t,e,r){"use strict";t("bn.js");e.exports=function(t){return t&&"object"==typeof t&&Boolean(t.words)}},{"bn.js":99}],89:[function(t,e,r){"use strict";var n=t("bn.js"),i=t("double-bits");e.exports=function(t){var e=i.exponent(t);return e<52?new n(t):new n(t*Math.pow(2,52-e)).ushln(e-52)}},{"bn.js":99,"double-bits":173}],90:[function(t,e,r){"use strict";var n=t("./num-to-bn"),i=t("./bn-sign");e.exports=function(t,e){var r=i(t),a=i(e);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(t=t.neg(),e=e.neg());var o=t.gcd(e);if(o.cmpn(1))return[t.div(o),e.div(o)];return[t,e]}},{"./bn-sign":85,"./num-to-bn":89}],91:[function(t,e,r){"use strict";var n=t("bn.js");e.exports=function(t){return new n(t)}},{"bn.js":99}],92:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[0]),t[1].mul(e[1]))}},{"./lib/rationalize":90}],93:[function(t,e,r){"use strict";var n=t("./lib/bn-sign");e.exports=function(t){return n(t[0])*n(t[1])}},{"./lib/bn-sign":85}],94:[function(t,e,r){"use strict";var n=t("./lib/rationalize");e.exports=function(t,e){return n(t[0].mul(e[1]).sub(t[1].mul(e[0])),t[1].mul(e[1]))}},{"./lib/rationalize":90}],95:[function(t,e,r){"use strict";var n=t("./lib/bn-to-num"),i=t("./lib/ctz");e.exports=function(t){var e=t[0],r=t[1];if(0===e.cmpn(0))return 0;var a=e.abs().divmod(r.abs()),o=a.div,s=n(o),l=a.mod,c=e.negative!==r.negative?-1:1;if(0===l.cmpn(0))return c*s;if(s){var u=i(s)+4,f=n(l.ushln(u).divRound(r));return c*(s+f*Math.pow(2,-u))}var h=r.bitLength()-l.bitLength()+53;f=n(l.ushln(h).divRound(r));return h<1023?c*f*Math.pow(2,-h):(f*=Math.pow(2,-1023),c*f*Math.pow(2,1023-h))}},{"./lib/bn-to-num":86,"./lib/ctz":87}],96:[function(t,e,r){"use strict";function n(t,e,r,n,i){var a=["function ",t,"(a,l,h,",n.join(","),"){",i?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a[m]"];return i?e.indexOf("c")<0?a.push(";if(x===y){return m}else if(x<=y){"):a.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):a.push(";if(",e,"){i=m;"),r?a.push("l=m+1}else{h=m-1}"):a.push("h=m-1}else{l=m+1}"),a.push("}"),i?a.push("return -1};"):a.push("return i};"),a.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],i),n("P","c(x,y)"+t+"0",e,["y","c"],i),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],97:[function(t,e,r){"use strict";function n(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}r.INT_BITS=32,r.INT_MAX=2147483647,r.INT_MIN=-1<<31,r.sign=function(t){return(t>0)-(t<0)},r.abs=function(t){var e=t>>31;return(t^e)-e},r.min=function(t,e){return e^(t^e)&-(t65535)<<4,e|=r=((t>>>=e)>255)<<3,e|=r=((t>>>=r)>15)<<2,(e|=r=((t>>>=r)>3)<<1)|(t>>>=r)>>1},r.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},r.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},r.countTrailingZeros=n,r.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},r.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},r.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var r=e,n=e,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;t[e]=n<>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},r.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},r.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},r.interleave3=function(t,e,r){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2))<<2},r.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},r.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>n(t)+1}},{}],98:[function(t,e,r){"use strict";var n=t("clamp");e.exports=function(t,e){e||(e={});var r,o,s,l,c,u,f,h,p,d,g,m=null==e.cutoff?.25:e.cutoff,v=null==e.radius?8:e.radius,y=e.channel||0;if(ArrayBuffer.isView(t)||Array.isArray(t)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");r=e.width,o=e.height,l=t,u=e.stride?e.stride:Math.floor(t.length/r/o)}else window.HTMLCanvasElement&&t instanceof window.HTMLCanvasElement?(f=(h=t).getContext("2d"),r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.CanvasRenderingContext2D&&t instanceof window.CanvasRenderingContext2D?(h=t.canvas,f=t,r=h.width,o=h.height,p=f.getImageData(0,0,r,o),l=p.data,u=4):window.ImageData&&t instanceof window.ImageData&&(p=t,r=t.width,o=t.height,l=p.data,u=4);if(s=Math.max(r,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(c=l,l=Array(r*o),d=0,g=c.length;d=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function l(t,e,r,n){for(var i=0,a=Math.min(t.length,r),o=e;o=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(t){return t instanceof a||null!==t&&"object"==typeof t&&t.constructor.wordSize===a.wordSize&&Array.isArray(t.words)},a.max=function(t,e){return t.cmp(e)>0?t:e},a.min=function(t,e){return t.cmp(e)<0?t:e},a.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},a.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[a]|=o<>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var r=0;r=e;r-=6)i=s(t,r,r+6),this.words[n]|=i<>>26-a&4194303,(a+=24)>=26&&(a-=26,n++);r+6!==e&&(i=s(t,e,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var a=t.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],a=0|e.words[0],o=i*a,s=67108863&o,l=o/67108864|0;r.words[0]=s;for(var c=1;c>>26,f=67108863&l,h=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=h;p++){var d=c-p|0;u+=(o=(i=0|t.words[d])*(a=0|e.words[p])+f)/67108864|0,f=67108863&o}r.words[c]=0|f,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}a.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,a=0,o=0;o>>24-i&16777215)||o!==this.length-1?c[6-l.length]+l+r:l+r,(i+=2)>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var h=u[t],p=f[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:c[h-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(t,e){return n("undefined"!=typeof o),this.toArrayLike(o,t,e)},a.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},a.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,l="le"===e,c=new t(a),u=this.clone();if(l){for(s=0;!u.isZero();s++)o=u.andln(255),u.iushrn(8),c[s]=o;for(;s=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},a.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},a.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},a.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},a.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},a.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},a.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;nt.length?this.clone().ixor(t):t.clone().ixor(this)},a.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},a.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(t){return this.clone().inotn(t)},a.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<t.length?(r=this,n=t):(r=t,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;at.length?this.clone().iadd(t):t.clone().iadd(this)},a.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var a=0,o=0;o>26,this.words[o]=67108863&e;for(;0!==a&&o>26,this.words[o]=67108863&e;if(0===a&&o>>13,p=0|o[1],d=8191&p,g=p>>>13,m=0|o[2],v=8191&m,y=m>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],T=8191&w,k=w>>>13,M=0|o[5],A=8191&M,S=M>>>13,E=0|o[6],C=8191&E,L=E>>>13,I=0|o[7],P=8191&I,z=I>>>13,O=0|o[8],D=8191&O,R=O>>>13,F=0|o[9],B=8191&F,N=F>>>13,j=0|s[0],U=8191&j,V=j>>>13,q=0|s[1],H=8191&q,G=q>>>13,Y=0|s[2],W=8191&Y,X=Y>>>13,Z=0|s[3],J=8191&Z,K=Z>>>13,Q=0|s[4],$=8191&Q,tt=Q>>>13,et=0|s[5],rt=8191&et,nt=et>>>13,it=0|s[6],at=8191&it,ot=it>>>13,st=0|s[7],lt=8191&st,ct=st>>>13,ut=0|s[8],ft=8191&ut,ht=ut>>>13,pt=0|s[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var mt=(c+(n=Math.imul(f,U))|0)+((8191&(i=(i=Math.imul(f,V))+Math.imul(h,U)|0))<<13)|0;c=((a=Math.imul(h,V))+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(d,U),i=(i=Math.imul(d,V))+Math.imul(g,U)|0,a=Math.imul(g,V);var vt=(c+(n=n+Math.imul(f,H)|0)|0)+((8191&(i=(i=i+Math.imul(f,G)|0)+Math.imul(h,H)|0))<<13)|0;c=((a=a+Math.imul(h,G)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(v,U),i=(i=Math.imul(v,V))+Math.imul(y,U)|0,a=Math.imul(y,V),n=n+Math.imul(d,H)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,H)|0,a=a+Math.imul(g,G)|0;var yt=(c+(n=n+Math.imul(f,W)|0)|0)+((8191&(i=(i=i+Math.imul(f,X)|0)+Math.imul(h,W)|0))<<13)|0;c=((a=a+Math.imul(h,X)|0)+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(v,H)|0,i=(i=i+Math.imul(v,G)|0)+Math.imul(y,H)|0,a=a+Math.imul(y,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,X)|0)+Math.imul(g,W)|0,a=a+Math.imul(g,X)|0;var xt=(c+(n=n+Math.imul(f,J)|0)|0)+((8191&(i=(i=i+Math.imul(f,K)|0)+Math.imul(h,J)|0))<<13)|0;c=((a=a+Math.imul(h,K)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(T,U),i=(i=Math.imul(T,V))+Math.imul(k,U)|0,a=Math.imul(k,V),n=n+Math.imul(b,H)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,n=n+Math.imul(v,W)|0,i=(i=i+Math.imul(v,X)|0)+Math.imul(y,W)|0,a=a+Math.imul(y,X)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,K)|0)+Math.imul(g,J)|0,a=a+Math.imul(g,K)|0;var bt=(c+(n=n+Math.imul(f,$)|0)|0)+((8191&(i=(i=i+Math.imul(f,tt)|0)+Math.imul(h,$)|0))<<13)|0;c=((a=a+Math.imul(h,tt)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(A,U),i=(i=Math.imul(A,V))+Math.imul(S,U)|0,a=Math.imul(S,V),n=n+Math.imul(T,H)|0,i=(i=i+Math.imul(T,G)|0)+Math.imul(k,H)|0,a=a+Math.imul(k,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,W)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(v,J)|0,i=(i=i+Math.imul(v,K)|0)+Math.imul(y,J)|0,a=a+Math.imul(y,K)|0,n=n+Math.imul(d,$)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,$)|0,a=a+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(f,rt)|0)|0)+((8191&(i=(i=i+Math.imul(f,nt)|0)+Math.imul(h,rt)|0))<<13)|0;c=((a=a+Math.imul(h,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,U),i=(i=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),n=n+Math.imul(A,H)|0,i=(i=i+Math.imul(A,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,n=n+Math.imul(T,W)|0,i=(i=i+Math.imul(T,X)|0)+Math.imul(k,W)|0,a=a+Math.imul(k,X)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,J)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(v,$)|0,i=(i=i+Math.imul(v,tt)|0)+Math.imul(y,$)|0,a=a+Math.imul(y,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,a=a+Math.imul(g,nt)|0;var wt=(c+(n=n+Math.imul(f,at)|0)|0)+((8191&(i=(i=i+Math.imul(f,ot)|0)+Math.imul(h,at)|0))<<13)|0;c=((a=a+Math.imul(h,ot)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(P,U),i=(i=Math.imul(P,V))+Math.imul(z,U)|0,a=Math.imul(z,V),n=n+Math.imul(C,H)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,n=n+Math.imul(A,W)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(S,W)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(T,J)|0,i=(i=i+Math.imul(T,K)|0)+Math.imul(k,J)|0,a=a+Math.imul(k,K)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,tt)|0,n=n+Math.imul(v,rt)|0,i=(i=i+Math.imul(v,nt)|0)+Math.imul(y,rt)|0,a=a+Math.imul(y,nt)|0,n=n+Math.imul(d,at)|0,i=(i=i+Math.imul(d,ot)|0)+Math.imul(g,at)|0,a=a+Math.imul(g,ot)|0;var Tt=(c+(n=n+Math.imul(f,lt)|0)|0)+((8191&(i=(i=i+Math.imul(f,ct)|0)+Math.imul(h,lt)|0))<<13)|0;c=((a=a+Math.imul(h,ct)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(D,U),i=(i=Math.imul(D,V))+Math.imul(R,U)|0,a=Math.imul(R,V),n=n+Math.imul(P,H)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,W)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(A,J)|0,i=(i=i+Math.imul(A,K)|0)+Math.imul(S,J)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(T,$)|0,i=(i=i+Math.imul(T,tt)|0)+Math.imul(k,$)|0,a=a+Math.imul(k,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(_,rt)|0,a=a+Math.imul(_,nt)|0,n=n+Math.imul(v,at)|0,i=(i=i+Math.imul(v,ot)|0)+Math.imul(y,at)|0,a=a+Math.imul(y,ot)|0,n=n+Math.imul(d,lt)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,lt)|0,a=a+Math.imul(g,ct)|0;var kt=(c+(n=n+Math.imul(f,ft)|0)|0)+((8191&(i=(i=i+Math.imul(f,ht)|0)+Math.imul(h,ft)|0))<<13)|0;c=((a=a+Math.imul(h,ht)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(B,U),i=(i=Math.imul(B,V))+Math.imul(N,U)|0,a=Math.imul(N,V),n=n+Math.imul(D,H)|0,i=(i=i+Math.imul(D,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(z,W)|0,a=a+Math.imul(z,X)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(L,J)|0,a=a+Math.imul(L,K)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,tt)|0,n=n+Math.imul(T,rt)|0,i=(i=i+Math.imul(T,nt)|0)+Math.imul(k,rt)|0,a=a+Math.imul(k,nt)|0,n=n+Math.imul(b,at)|0,i=(i=i+Math.imul(b,ot)|0)+Math.imul(_,at)|0,a=a+Math.imul(_,ot)|0,n=n+Math.imul(v,lt)|0,i=(i=i+Math.imul(v,ct)|0)+Math.imul(y,lt)|0,a=a+Math.imul(y,ct)|0,n=n+Math.imul(d,ft)|0,i=(i=i+Math.imul(d,ht)|0)+Math.imul(g,ft)|0,a=a+Math.imul(g,ht)|0;var Mt=(c+(n=n+Math.imul(f,dt)|0)|0)+((8191&(i=(i=i+Math.imul(f,gt)|0)+Math.imul(h,dt)|0))<<13)|0;c=((a=a+Math.imul(h,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(B,H),i=(i=Math.imul(B,G))+Math.imul(N,H)|0,a=Math.imul(N,G),n=n+Math.imul(D,W)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,W)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(z,J)|0,a=a+Math.imul(z,K)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(S,rt)|0,a=a+Math.imul(S,nt)|0,n=n+Math.imul(T,at)|0,i=(i=i+Math.imul(T,ot)|0)+Math.imul(k,at)|0,a=a+Math.imul(k,ot)|0,n=n+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(_,lt)|0,a=a+Math.imul(_,ct)|0,n=n+Math.imul(v,ft)|0,i=(i=i+Math.imul(v,ht)|0)+Math.imul(y,ft)|0,a=a+Math.imul(y,ht)|0;var At=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((a=a+Math.imul(g,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(B,W),i=(i=Math.imul(B,X))+Math.imul(N,W)|0,a=Math.imul(N,X),n=n+Math.imul(D,J)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(R,J)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(z,$)|0,a=a+Math.imul(z,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(L,rt)|0,a=a+Math.imul(L,nt)|0,n=n+Math.imul(A,at)|0,i=(i=i+Math.imul(A,ot)|0)+Math.imul(S,at)|0,a=a+Math.imul(S,ot)|0,n=n+Math.imul(T,lt)|0,i=(i=i+Math.imul(T,ct)|0)+Math.imul(k,lt)|0,a=a+Math.imul(k,ct)|0,n=n+Math.imul(b,ft)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(_,ft)|0,a=a+Math.imul(_,ht)|0;var St=(c+(n=n+Math.imul(v,dt)|0)|0)+((8191&(i=(i=i+Math.imul(v,gt)|0)+Math.imul(y,dt)|0))<<13)|0;c=((a=a+Math.imul(y,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(B,J),i=(i=Math.imul(B,K))+Math.imul(N,J)|0,a=Math.imul(N,K),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,tt)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(z,rt)|0,a=a+Math.imul(z,nt)|0,n=n+Math.imul(C,at)|0,i=(i=i+Math.imul(C,ot)|0)+Math.imul(L,at)|0,a=a+Math.imul(L,ot)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(S,lt)|0,a=a+Math.imul(S,ct)|0,n=n+Math.imul(T,ft)|0,i=(i=i+Math.imul(T,ht)|0)+Math.imul(k,ft)|0,a=a+Math.imul(k,ht)|0;var Et=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((a=a+Math.imul(_,gt)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(B,$),i=(i=Math.imul(B,tt))+Math.imul(N,$)|0,a=Math.imul(N,tt),n=n+Math.imul(D,rt)|0,i=(i=i+Math.imul(D,nt)|0)+Math.imul(R,rt)|0,a=a+Math.imul(R,nt)|0,n=n+Math.imul(P,at)|0,i=(i=i+Math.imul(P,ot)|0)+Math.imul(z,at)|0,a=a+Math.imul(z,ot)|0,n=n+Math.imul(C,lt)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(L,lt)|0,a=a+Math.imul(L,ct)|0,n=n+Math.imul(A,ft)|0,i=(i=i+Math.imul(A,ht)|0)+Math.imul(S,ft)|0,a=a+Math.imul(S,ht)|0;var Ct=(c+(n=n+Math.imul(T,dt)|0)|0)+((8191&(i=(i=i+Math.imul(T,gt)|0)+Math.imul(k,dt)|0))<<13)|0;c=((a=a+Math.imul(k,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(B,rt),i=(i=Math.imul(B,nt))+Math.imul(N,rt)|0,a=Math.imul(N,nt),n=n+Math.imul(D,at)|0,i=(i=i+Math.imul(D,ot)|0)+Math.imul(R,at)|0,a=a+Math.imul(R,ot)|0,n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(z,lt)|0,a=a+Math.imul(z,ct)|0,n=n+Math.imul(C,ft)|0,i=(i=i+Math.imul(C,ht)|0)+Math.imul(L,ft)|0,a=a+Math.imul(L,ht)|0;var Lt=(c+(n=n+Math.imul(A,dt)|0)|0)+((8191&(i=(i=i+Math.imul(A,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((a=a+Math.imul(S,gt)|0)+(i>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(B,at),i=(i=Math.imul(B,ot))+Math.imul(N,at)|0,a=Math.imul(N,ot),n=n+Math.imul(D,lt)|0,i=(i=i+Math.imul(D,ct)|0)+Math.imul(R,lt)|0,a=a+Math.imul(R,ct)|0,n=n+Math.imul(P,ft)|0,i=(i=i+Math.imul(P,ht)|0)+Math.imul(z,ft)|0,a=a+Math.imul(z,ht)|0;var It=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,gt)|0)+Math.imul(L,dt)|0))<<13)|0;c=((a=a+Math.imul(L,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(B,lt),i=(i=Math.imul(B,ct))+Math.imul(N,lt)|0,a=Math.imul(N,ct),n=n+Math.imul(D,ft)|0,i=(i=i+Math.imul(D,ht)|0)+Math.imul(R,ft)|0,a=a+Math.imul(R,ht)|0;var Pt=(c+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,gt)|0)+Math.imul(z,dt)|0))<<13)|0;c=((a=a+Math.imul(z,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(B,ft),i=(i=Math.imul(B,ht))+Math.imul(N,ft)|0,a=Math.imul(N,ht);var zt=(c+(n=n+Math.imul(D,dt)|0)|0)+((8191&(i=(i=i+Math.imul(D,gt)|0)+Math.imul(R,dt)|0))<<13)|0;c=((a=a+Math.imul(R,gt)|0)+(i>>>13)|0)+(zt>>>26)|0,zt&=67108863;var Ot=(c+(n=Math.imul(B,dt))|0)+((8191&(i=(i=Math.imul(B,gt))+Math.imul(N,dt)|0))<<13)|0;return c=((a=Math.imul(N,gt))+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,l[0]=mt,l[1]=vt,l[2]=yt,l[3]=xt,l[4]=bt,l[5]=_t,l[6]=wt,l[7]=Tt,l[8]=kt,l[9]=Mt,l[10]=At,l[11]=St,l[12]=Et,l[13]=Ct,l[14]=Lt,l[15]=It,l[16]=Pt,l[17]=zt,l[18]=Ot,0!==c&&(l[19]=c,r.length++),r};function d(t,e,r){return(new g).mulp(t,e,r)}function g(t,e){this.x=t,this.y=e}Math.imul||(p=h),a.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?p(this,t,e):r<63?h(this,t,e):r<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,t,e):d(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),r=a.prototype._countBits(t)-1,n=0;n>=1;return n},g.prototype.permute=function(t,e,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*e;o>=26,e+=i/67108864|0,e+=a>>>26,this.words[r]=67108863&a}return 0!==e&&(this.words[r]=e,this.length++),this},a.prototype.muln=function(t){return this.clone().imuln(t)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>i}return e}(t);if(0===e.length)return new a(1);for(var r=this,n=0;n=0);var e,r=t%26,i=(t-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(e=0;e>>26-r}o&&(this.words[e]=o,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e=0),i=e?(e-e%26)/26:0;var a=t%26,o=Math.min((t-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,c=0;c=0&&(0!==u||c>=i);c--){var f=0|this.words[c];this.words[c]=u<<26-a|f>>>a,u=f&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},a.prototype.shln=function(t){return this.clone().ishln(t)},a.prototype.ushln=function(t){return this.clone().iushln(t)},a.prototype.shrn=function(t){return this.clone().ishrn(t)},a.prototype.ushrn=function(t){return this.clone().iushrn(t)},a.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},a.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(l/67108864|0),this.words[i+r]=67108863&a}for(;i>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,o=0|i.words[i.length-1];0!==(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==e){(s=new a(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);s&&(s.words[f]=h)}return s&&s.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===t.negative?(s=this.neg().divmod(t,e),"mod"!==e&&(i=s.div.neg()),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(t)),{div:i,mod:o}):0===this.negative&&0!==t.negative?(s=this.divmod(t.neg(),e),"mod"!==e&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&t.negative)?(s=this.neg().divmod(t.neg(),e),"div"!==e&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(t)),{div:s.div,mod:o}):t.length>this.length||this.cmp(t)<0?{div:new a(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new a(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new a(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,o,s},a.prototype.div=function(t){return this.divmod(t,"div",!1).div},a.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},a.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},a.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},a.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},a.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},a.prototype.divn=function(t){return this.clone().idivn(t)},a.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),f=e.clone();!e.isZero();){for(var h=0,p=1;0==(e.words[0]&p)&&h<26;++h,p<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(f)),i.iushrn(1),o.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(f)),s.iushrn(1),l.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(s),o.isub(l)):(r.isub(e),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,o=new a(1),s=new a(0),l=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(e.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(e.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var f=0,h=1;0==(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);e.cmp(r)>=0?(e.isub(r),o.isub(s)):(r.isub(e),s.isub(o))}return(i=0===e.cmpn(1)?o:s).cmpn(0)<0&&i.iadd(t),i},a.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var a=e;e=r,r=a}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},a.prototype.invm=function(t){return this.egcd(t).a.umod(t)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(t){return this.words[0]&t},a.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:it.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){ni&&(e=1);break}}return e},a.prototype.gtn=function(t){return 1===this.cmpn(t)},a.prototype.gt=function(t){return 1===this.cmp(t)},a.prototype.gten=function(t){return this.cmpn(t)>=0},a.prototype.gte=function(t){return this.cmp(t)>=0},a.prototype.ltn=function(t){return-1===this.cmpn(t)},a.prototype.lt=function(t){return-1===this.cmp(t)},a.prototype.lten=function(t){return this.cmpn(t)<=0},a.prototype.lte=function(t){return this.cmp(t)<=0},a.prototype.eqn=function(t){return 0===this.cmpn(t)},a.prototype.eq=function(t){return 0===this.cmp(t)},a.red=function(t){return new w(t)},a.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(t){return this.red=t,this},a.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},a.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},a.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},a.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},a.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},a.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},a.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},a.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var m={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new a(e,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function b(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function w(t){if("string"==typeof t){var e=a._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function T(t){w.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new a(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e0?r.isub(this.p):r.strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(y,v),y.prototype.split=function(t,e){for(var r=Math.min(t.length,9),n=0;n>>22,i=a}i>>>=22,t.words[n-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},y.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},a._prime=function(t){if(m[t])return m[t];var e;if("k256"===t)e=new y;else if("p224"===t)e=new x;else if("p192"===t)e=new b;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return m[t]=e,e},w.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},w.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},w.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},w.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},w.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},w.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},w.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},w.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},w.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},w.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},w.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},w.prototype.isqr=function(t){return this.imul(t,t.clone())},w.prototype.sqr=function(t){return this.mul(t,t)},w.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new a(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new a(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var f=this.pow(u,i),h=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=o;0!==p.cmp(s);){for(var g=p,m=0;0!==g.cmp(s);m++)g=g.redSqr();n(m=0;n--){for(var c=e.words[n],u=l-1;u>=0;u--){var f=c>>u&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==o?(o<<=1,o|=f,(4===++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)):s=0}l=26}return i},w.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},w.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},a.mont=function(t){return new T(t)},i(T,w),T.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},T.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},T.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new a(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}("undefined"==typeof e||e,this)},{buffer:108}],100:[function(t,e,r){"use strict";e.exports=function(t){var e,r,n,i=t.length,a=0;for(e=0;e>>1;if(!(u<=0)){var f,h=i.mallocDouble(2*u*s),p=i.mallocInt32(s);if((s=l(t,u,h,p))>0){if(1===u&&n)a.init(s),f=a.sweepComplete(u,r,0,s,h,p,0,s,h,p);else{var d=i.mallocDouble(2*u*c),g=i.mallocInt32(c);(c=l(e,u,d,g))>0&&(a.init(s+c),f=1===u?a.sweepBipartite(u,r,0,s,h,p,0,c,d,g):o(u,r,n,s,h,p,c,d,g),i.free(d),i.free(g))}i.free(h),i.free(p)}return f}}}function u(t,e){n.push([t,e])}function f(t){return n=[],c(t,t,u,!0),n}function h(t,e){return n=[],c(t,e,u,!1),n}},{"./lib/intersect":103,"./lib/sweep":107,"typedarray-pool":595}],102:[function(t,e,r){"use strict";var n=["d","ax","vv","rs","re","rb","ri","bs","be","bb","bi"];function i(t){var e="bruteForce"+(t?"Full":"Partial"),r=[],i=n.slice();t||i.splice(3,0,"fp");var a=["function "+e+"("+i.join()+"){"];function o(e,i){var o=function(t,e,r){var i="bruteForce"+(t?"Red":"Blue")+(e?"Flip":"")+(r?"Full":""),a=["function ",i,"(",n.join(),"){","var ","es","=2*","d",";"],o="for(var i=rs,rp=es*rs;ibe-bs){"),t?(o(!0,!1),a.push("}else{"),o(!1,!1)):(a.push("if(fp){"),o(!0,!0),a.push("}else{"),o(!0,!1),a.push("}}else{if(fp){"),o(!1,!0),a.push("}else{"),o(!1,!1),a.push("}")),a.push("}}return "+e);var s=r.join("")+a.join("");return new Function(s)()}r.partial=i(!1),r.full=i(!0)},{}],103:[function(t,e,r){"use strict";e.exports=function(t,e,r,a,u,w,T,k,M){!function(t,e){var r=8*i.log2(e+1)*(t+1)|0,a=i.nextPow2(6*r);v.length0;){var C=6*(S-=1),L=v[C],I=v[C+1],P=v[C+2],z=v[C+3],O=v[C+4],D=v[C+5],R=2*S,F=y[R],B=y[R+1],N=1&D,j=!!(16&D),U=u,V=w,q=k,H=M;if(N&&(U=k,V=M,q=u,H=w),!(2&D&&(P=p(t,L,I,P,U,V,B),I>=P)||4&D&&(I=d(t,L,I,P,U,V,F))>=P)){var G=P-I,Y=O-z;if(j){if(t*G*(G+Y)<1<<22){if(void 0!==(A=l.scanComplete(t,L,e,I,P,U,V,z,O,q,H)))return A;continue}}else{if(t*Math.min(G,Y)<128){if(void 0!==(A=o(t,L,e,N,I,P,U,V,z,O,q,H)))return A;continue}if(t*G*Y<1<<22){if(void 0!==(A=l.scanBipartite(t,L,e,N,I,P,U,V,z,O,q,H)))return A;continue}}var W=f(t,L,I,P,U,V,F,B);if(I=p0)&&!(p1>=hi)",["p0","p1"]),h=u("lo===p0",["p0"]),p=u("lo>>1,f=2*t,h=u,p=o[f*u+e];for(;l=y?(h=v,p=y):m>=b?(h=g,p=m):(h=x,p=b):y>=b?(h=v,p=y):b>=m?(h=g,p=m):(h=x,p=b);for(var _=f*(c-1),w=f*h,T=0;Tr&&i[f+e]>c;--u,f-=o){for(var h=f,p=f+o,d=0;d=0&&n.push("lo=e[k+n]");t.indexOf("hi")>=0&&n.push("hi=e[k+o]");return r.push("for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m".replace("_",n.join()).replace("$",t)),Function.apply(void 0,r)}},{}],106:[function(t,e,r){"use strict";e.exports=function(t,e){e<=128?n(0,e-1,t):function t(e,r,u){var f=(r-e+1)/6|0,h=e+f,p=r-f,d=e+r>>1,g=d-f,m=d+f,v=h,y=g,x=d,b=m,_=p,w=e+1,T=r-1,k=0;l(v,y,u)&&(k=v,v=y,y=k);l(b,_,u)&&(k=b,b=_,_=k);l(v,x,u)&&(k=v,v=x,x=k);l(y,x,u)&&(k=y,y=x,x=k);l(v,b,u)&&(k=v,v=b,b=k);l(x,b,u)&&(k=x,x=b,b=k);l(y,_,u)&&(k=y,y=_,_=k);l(y,x,u)&&(k=y,y=x,x=k);l(b,_,u)&&(k=b,b=_,_=k);for(var M=u[2*y],A=u[2*y+1],S=u[2*b],E=u[2*b+1],C=2*v,L=2*x,I=2*_,P=2*h,z=2*d,O=2*p,D=0;D<2;++D){var R=u[C+D],F=u[L+D],B=u[I+D];u[P+D]=R,u[z+D]=F,u[O+D]=B}a(g,e,u),a(m,r,u);for(var N=w;N<=T;++N)if(c(N,M,A,u))N!==w&&i(N,w,u),++w;else if(!c(N,S,E,u))for(;;){if(c(T,S,E,u)){c(T,M,A,u)?(o(N,w,T,u),++w,--T):(i(N,T,u),--T);break}if(--Tt;){var c=r[l-2],u=r[l-1];if(cr[e+1])}function c(t,e,r,n){var i=n[t*=2];return i>>1;a(h,A);var S=0,E=0;for(w=0;w=1<<28)p(l,c,E--,C=C-(1<<28)|0);else if(C>=0)p(o,s,S--,C);else if(C<=-(1<<28)){C=-C-(1<<28)|0;for(var L=0;L>>1;a(h,E);var C=0,L=0,I=0;for(k=0;k>1==h[2*k+3]>>1&&(z=2,k+=1),P<0){for(var O=-(P>>1)-1,D=0;D>1)-1;0===z?p(o,s,C--,O):1===z?p(l,c,L--,O):2===z&&p(u,f,I--,O)}}},scanBipartite:function(t,e,r,n,i,l,c,u,f,g,m,v){var y=0,x=2*t,b=e,_=e+t,w=1,T=1;n?T=1<<28:w=1<<28;for(var k=i;k>>1;a(h,E);var C=0;for(k=0;k=1<<28?(I=!n,M-=1<<28):(I=!!n,M-=1),I)d(o,s,C++,M);else{var P=v[M],z=x*M,O=m[z+e+1],D=m[z+e+1+t];t:for(var R=0;R>>1;a(h,w);var T=0;for(y=0;y=1<<28)o[T++]=x-(1<<28);else{var M=p[x-=1],A=g*x,S=f[A+e+1],E=f[A+e+1+t];t:for(var C=0;C=0;--C)if(o[C]===x){for(z=C+1;z0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=t,l.type=e,l.count=o.length,s=l,console&&console.warn&&console.warn(s)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(void 0===l)return!1;if("function"==typeof l)a(l,this,e);else{var c=l.length,u=m(l,c);for(r=0;r=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return d(this,t,!0)},s.prototype.rawListeners=function(t){return d(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],111:[function(t,e,r){(function(e){(function(){ -/*! - * The buffer module from node.js, for the browser. - * - * @author Feross Aboukhadijeh - * @license MIT - */ -"use strict";var e=t("base64-js"),n=t("ieee754");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;function i(t){if(t>2147483647)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return o(t,e,r)}function o(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|f(t,e),n=i(r),o=n.write(t,e);o!==r&&(n=n.slice(0,o));return n}(t,e);if(ArrayBuffer.isView(t))return c(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(B(t,ArrayBuffer)||t&&B(t.buffer,ArrayBuffer))return function(t,e,r){if(e<0||t.byteLength=2147483647)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|t}function f(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||B(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return D(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return R(t).length;default:if(i)return n?-1:D(t).length;e=(""+e).toLowerCase(),i=!0}}function h(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return k(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return w(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function p(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function d(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),N(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:g(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):g(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,r,n,i){var a,o=1,s=t.length,l=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,l/=2,r/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var f=!0,h=0;hi&&(n=i):n=i;var a=e.length;n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function w(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function T(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=r)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(a=t[i+1]))&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(l=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;ne&&(t+=" ... "),""},a.prototype.compare=function(t,e,r,n,i){if(B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),l=Math.min(o,s),c=this.slice(n,i),u=t.slice(e,r),f=0;f>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return y(this,t,e,r);case"latin1":case"binary":return x(this,t,e,r);case"base64":return b(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",a=e;ar)throw new RangeError("Trying to access beyond buffer length")}function C(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function L(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,i,a){return e=+e,r>>>=0,a||L(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function P(t,e,r,i,a){return e=+e,r>>>=0,a||L(t,0,r,8),n.write(t,e,r,i,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||E(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=this[t],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||E(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},a.prototype.readInt8=function(t,e){return t>>>=0,e||E(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||E(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||E(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||E(t,4,this.length),n.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||E(t,8,this.length),n.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a>>=0,r>>>=0,n)||C(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a>0)-s&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);C(this,t,e,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||C(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return P(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return P(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,n),e);return i},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t&&(t&=255);if(e<0||this.length>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function R(t){return e.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function N(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":79,buffer:111,ieee754:442}],112:[function(t,e,r){"use strict";var n=t("./lib/monotone"),i=t("./lib/triangulation"),a=t("./lib/delaunay"),o=t("./lib/filter");function s(t){return[Math.min(t[0],t[1]),Math.max(t[0],t[1])]}function l(t,e){return t[0]-e[0]||t[1]-e[1]}function c(t,e,r){return e in t?t[e]:r}e.exports=function(t,e,r){Array.isArray(e)?(r=r||{},e=e||[]):(r=e||{},e=[]);var u=!!c(r,"delaunay",!0),f=!!c(r,"interior",!0),h=!!c(r,"exterior",!0),p=!!c(r,"infinity",!1);if(!f&&!h||0===t.length)return[];var d=n(t,e);if(u||f!==h||p){for(var g=i(t.length,function(t){return t.map(s).sort(l)}(e)),m=0;m0;){for(var p=r.pop(),d=(s=r.pop(),u=-1,f=-1,l=o[s],1);d=0||(e.flip(s,p),i(t,e,r,u,s,f),i(t,e,r,s,f,u),i(t,e,r,f,p,u),i(t,e,r,p,u,f)))}}},{"binary-search-bounds":96,"robust-in-sphere":546}],114:[function(t,e,r){"use strict";var n,i=t("binary-search-bounds");function a(t,e,r,n,i,a,o){this.cells=t,this.neighbor=e,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(t,e){return t[0]-e[0]||t[1]-e[1]||t[2]-e[2]}e.exports=function(t,e,r){var n=function(t,e){for(var r=t.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var p=s.pop();if(c[p]!==-i){c[p]=i;u[p];for(var d=0;d<3;++d){var g=h[3*p+d];g>=0&&0===c[g]&&(f[3*p+d]?l.push(g):(s.push(g),c[g]=i))}}}var m=l;l=s,s=m,l.length=0,i=-i}var v=function(t,e,r){for(var n=0,i=0;i1&&i(r[h[p-2]],r[h[p-1]],a)>0;)t.push([h[p-1],h[p-2],o]),p-=1;h.length=p,h.push(o);var d=f.upperIds;for(p=d.length;p>1&&i(r[d[p-2]],r[d[p-1]],a)<0;)t.push([d[p-2],d[p-1],o]),p-=1;d.length=p,d.push(o)}}function u(t,e){var r;return(r=t.a[0]d[0]&&i.push(new o(d,p,2,l),new o(p,d,1,l))}i.sort(s);for(var g=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),m=[new a([g,1],[g,0],-1,[],[],[],[])],v=[],y=(l=0,i.length);l=0}}(),a.removeTriangle=function(t,e,r){var n=this.stars;o(n[t],e,r),o(n[e],r,t),o(n[r],t,e)},a.addTriangle=function(t,e,r){var n=this.stars;n[t].push(e,r),n[e].push(r,t),n[r].push(t,e)},a.opposite=function(t,e){for(var r=this.stars[e],n=1,i=r.length;nr?r:t:te?e:t}},{}],121:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n;if(r){n=e;for(var i=new Array(e.length),a=0;ae[2]?1:0)}function v(t,e,r){if(0!==t.length){if(e)for(var n=0;n=0;--a){var x=e[u=(S=n[a])[0]],b=x[0],_=x[1],w=t[b],T=t[_];if((w[0]-T[0]||w[1]-T[1])<0){var k=b;b=_,_=k}x[0]=b;var M,A=x[1]=S[1];for(i&&(M=x[2]);a>0&&n[a-1][0]===u;){var S,E=(S=n[--a])[1];i?e.push([A,E,M]):e.push([A,E]),A=E}i?e.push([A,_,M]):e.push([A,_])}return h}(t,e,h,m,r));return v(e,y,r),!!y||(h.length>0||m.length>0)}},{"./lib/rat-seg-intersect":122,"big-rat":83,"big-rat/cmp":81,"big-rat/to-float":95,"box-intersect":101,nextafter:496,"rat-vec":530,"robust-segment-intersect":551,"union-find":596}],122:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var a=s(e,t),f=s(n,r),h=u(a,f);if(0===o(h))return null;var p=s(t,r),d=u(f,p),g=i(d,h),m=c(a,g);return l(t,m)};var n=t("big-rat/mul"),i=t("big-rat/div"),a=t("big-rat/sub"),o=t("big-rat/sign"),s=t("rat-vec/sub"),l=t("rat-vec/add"),c=t("rat-vec/muls");function u(t,e){return a(n(t[0],e[1]),n(t[1],e[0]))}},{"big-rat/div":82,"big-rat/mul":92,"big-rat/sign":93,"big-rat/sub":94,"rat-vec/add":529,"rat-vec/muls":531,"rat-vec/sub":532}],123:[function(t,e,r){"use strict";var n=t("clamp");function i(t,e){null==e&&(e=!0);var r=t[0],i=t[1],a=t[2],o=t[3];return null==o&&(o=e?1:255),e&&(r*=255,i*=255,a*=255,o*=255),16777216*(r=255&n(r,0,255))+((i=255&n(i,0,255))<<16)+((a=255&n(a,0,255))<<8)+(o=255&n(o,0,255))}e.exports=i,e.exports.to=i,e.exports.from=function(t,e){var r=(t=+t)>>>24,n=(16711680&t)>>>16,i=(65280&t)>>>8,a=255&t;return!1===e?[r,n,i,a]:[r/255,n/255,i/255,a/255]}},{clamp:120}],124:[function(t,e,r){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],125:[function(t,e,r){"use strict";var n=t("color-rgba"),i=t("clamp"),a=t("dtype");e.exports=function(t,e){"float"!==e&&e||(e="array"),"uint"===e&&(e="uint8"),"uint_clamped"===e&&(e="uint8_clamped");var r=new(a(e))(4),o="uint8"!==e&&"uint8_clamped"!==e;return t.length&&"string"!=typeof t||((t=n(t))[0]/=255,t[1]/=255,t[2]/=255),function(t){return t instanceof Uint8Array||t instanceof Uint8ClampedArray||!!(Array.isArray(t)&&(t[0]>1||0===t[0])&&(t[1]>1||0===t[1])&&(t[2]>1||0===t[2])&&(!t[3]||t[3]>1))}(t)?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:255,o&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(o?(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=null!=t[3]?t[3]:1):(r[0]=i(Math.floor(255*t[0]),0,255),r[1]=i(Math.floor(255*t[1]),0,255),r[2]=i(Math.floor(255*t[2]),0,255),r[3]=null==t[3]?255:i(Math.floor(255*t[3]),0,255)),r)}},{clamp:120,"color-rgba":127,dtype:175}],126:[function(t,e,r){(function(r){(function(){"use strict";var n=t("color-name"),i=t("is-plain-obj"),a=t("defined");e.exports=function(t){var e,s,l=[],c=1;if("string"==typeof t)if(n[t])l=n[t].slice(),s="rgb";else if("transparent"===t)c=0,s="rgb",l=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(t)){var u=(p=t.slice(1)).length;c=1,u<=4?(l=[parseInt(p[0]+p[0],16),parseInt(p[1]+p[1],16),parseInt(p[2]+p[2],16)],4===u&&(c=parseInt(p[3]+p[3],16)/255)):(l=[parseInt(p[0]+p[1],16),parseInt(p[2]+p[3],16),parseInt(p[4]+p[5],16)],8===u&&(c=parseInt(p[6]+p[7],16)/255)),l[0]||(l[0]=0),l[1]||(l[1]=0),l[2]||(l[2]=0),s="rgb"}else if(e=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(t)){var f=e[1],h="rgb"===f,p=f.replace(/a$/,"");s=p;u="cmyk"===p?4:"gray"===p?1:3;l=e[2].trim().split(/\s*,\s*/).map((function(t,e){if(/%$/.test(t))return e===u?parseFloat(t)/100:"rgb"===p?255*parseFloat(t)/100:parseFloat(t);if("h"===p[e]){if(/deg$/.test(t))return parseFloat(t);if(void 0!==o[t])return o[t]}return parseFloat(t)})),f===p&&l.push(1),c=h||void 0===l[u]?1:l[u],l=l.slice(0,u)}else t.length>10&&/[0-9](?:\s|\/)/.test(t)&&(l=t.match(/([0-9]+)/g).map((function(t){return parseFloat(t)})),s=t.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(t))if(i(t)){var d=a(t.r,t.red,t.R,null);null!==d?(s="rgb",l=[d,a(t.g,t.green,t.G),a(t.b,t.blue,t.B)]):(s="hsl",l=[a(t.h,t.hue,t.H),a(t.s,t.saturation,t.S),a(t.l,t.lightness,t.L,t.b,t.brightness)]),c=a(t.a,t.alpha,t.opacity,1),null!=t.opacity&&(c/=100)}else(Array.isArray(t)||r.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(t))&&(l=[t[0],t[1],t[2]],s="rgb",c=4===t.length?t[3]:1);else s="rgb",l=[t>>>16,(65280&t)>>>8,255&t];return{space:s,values:l,alpha:c}};var o={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"color-name":124,defined:170,"is-plain-obj":469}],127:[function(t,e,r){"use strict";var n=t("color-parse"),i=t("color-space/hsl"),a=t("clamp");e.exports=function(t){var e,r=n(t);return r.space?((e=Array(3))[0]=a(r.values[0],0,255),e[1]=a(r.values[1],0,255),e[2]=a(r.values[2],0,255),"h"===r.space[0]&&(e=i.rgb(e)),e.push(a(r.alpha,0,1)),e):[]}},{clamp:120,"color-parse":126,"color-space/hsl":128}],128:[function(t,e,r){"use strict";var n=t("./rgb");e.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(t){var e,r,n,i,a,o=t[0]/360,s=t[1]/100,l=t[2]/100;if(0===s)return[a=255*l,a,a];e=2*l-(r=l<.5?l*(1+s):l+s-l*s),i=[0,0,0];for(var c=0;c<3;c++)(n=o+1/3*-(c-1))<0?n++:n>1&&n--,a=6*n<1?e+6*(r-e)*n:2*n<1?r:3*n<2?e+(r-e)*(2/3-n)*6:e,i[c]=255*a;return i}},n.hsl=function(t){var e,r,n=t[0]/255,i=t[1]/255,a=t[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?e=0:n===s?e=(i-a)/l:i===s?e=2+(a-n)/l:a===s&&(e=4+(n-i)/l),(e=Math.min(60*e,360))<0&&(e+=360),r=(o+s)/2,[e,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}},{"./rgb":129}],129:[function(t,e,r){"use strict";e.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},{}],130:[function(t,e,r){e.exports={jet:[{index:0,rgb:[0,0,131]},{index:.125,rgb:[0,60,170]},{index:.375,rgb:[5,255,255]},{index:.625,rgb:[255,255,0]},{index:.875,rgb:[250,0,0]},{index:1,rgb:[128,0,0]}],hsv:[{index:0,rgb:[255,0,0]},{index:.169,rgb:[253,255,2]},{index:.173,rgb:[247,255,2]},{index:.337,rgb:[0,252,4]},{index:.341,rgb:[0,252,10]},{index:.506,rgb:[1,249,255]},{index:.671,rgb:[2,0,253]},{index:.675,rgb:[8,0,253]},{index:.839,rgb:[255,0,251]},{index:.843,rgb:[255,0,245]},{index:1,rgb:[255,0,6]}],hot:[{index:0,rgb:[0,0,0]},{index:.3,rgb:[230,0,0]},{index:.6,rgb:[255,210,0]},{index:1,rgb:[255,255,255]}],cool:[{index:0,rgb:[0,255,255]},{index:1,rgb:[255,0,255]}],spring:[{index:0,rgb:[255,0,255]},{index:1,rgb:[255,255,0]}],summer:[{index:0,rgb:[0,128,102]},{index:1,rgb:[255,255,102]}],autumn:[{index:0,rgb:[255,0,0]},{index:1,rgb:[255,255,0]}],winter:[{index:0,rgb:[0,0,255]},{index:1,rgb:[0,255,128]}],bone:[{index:0,rgb:[0,0,0]},{index:.376,rgb:[84,84,116]},{index:.753,rgb:[169,200,200]},{index:1,rgb:[255,255,255]}],copper:[{index:0,rgb:[0,0,0]},{index:.804,rgb:[255,160,102]},{index:1,rgb:[255,199,127]}],greys:[{index:0,rgb:[0,0,0]},{index:1,rgb:[255,255,255]}],yignbu:[{index:0,rgb:[8,29,88]},{index:.125,rgb:[37,52,148]},{index:.25,rgb:[34,94,168]},{index:.375,rgb:[29,145,192]},{index:.5,rgb:[65,182,196]},{index:.625,rgb:[127,205,187]},{index:.75,rgb:[199,233,180]},{index:.875,rgb:[237,248,217]},{index:1,rgb:[255,255,217]}],greens:[{index:0,rgb:[0,68,27]},{index:.125,rgb:[0,109,44]},{index:.25,rgb:[35,139,69]},{index:.375,rgb:[65,171,93]},{index:.5,rgb:[116,196,118]},{index:.625,rgb:[161,217,155]},{index:.75,rgb:[199,233,192]},{index:.875,rgb:[229,245,224]},{index:1,rgb:[247,252,245]}],yiorrd:[{index:0,rgb:[128,0,38]},{index:.125,rgb:[189,0,38]},{index:.25,rgb:[227,26,28]},{index:.375,rgb:[252,78,42]},{index:.5,rgb:[253,141,60]},{index:.625,rgb:[254,178,76]},{index:.75,rgb:[254,217,118]},{index:.875,rgb:[255,237,160]},{index:1,rgb:[255,255,204]}],bluered:[{index:0,rgb:[0,0,255]},{index:1,rgb:[255,0,0]}],rdbu:[{index:0,rgb:[5,10,172]},{index:.35,rgb:[106,137,247]},{index:.5,rgb:[190,190,190]},{index:.6,rgb:[220,170,132]},{index:.7,rgb:[230,145,90]},{index:1,rgb:[178,10,28]}],picnic:[{index:0,rgb:[0,0,255]},{index:.1,rgb:[51,153,255]},{index:.2,rgb:[102,204,255]},{index:.3,rgb:[153,204,255]},{index:.4,rgb:[204,204,255]},{index:.5,rgb:[255,255,255]},{index:.6,rgb:[255,204,255]},{index:.7,rgb:[255,153,255]},{index:.8,rgb:[255,102,204]},{index:.9,rgb:[255,102,102]},{index:1,rgb:[255,0,0]}],rainbow:[{index:0,rgb:[150,0,90]},{index:.125,rgb:[0,0,200]},{index:.25,rgb:[0,25,255]},{index:.375,rgb:[0,152,255]},{index:.5,rgb:[44,255,150]},{index:.625,rgb:[151,255,0]},{index:.75,rgb:[255,234,0]},{index:.875,rgb:[255,111,0]},{index:1,rgb:[255,0,0]}],portland:[{index:0,rgb:[12,51,131]},{index:.25,rgb:[10,136,186]},{index:.5,rgb:[242,211,56]},{index:.75,rgb:[242,143,56]},{index:1,rgb:[217,30,30]}],blackbody:[{index:0,rgb:[0,0,0]},{index:.2,rgb:[230,0,0]},{index:.4,rgb:[230,210,0]},{index:.7,rgb:[255,255,255]},{index:1,rgb:[160,200,255]}],earth:[{index:0,rgb:[0,0,130]},{index:.1,rgb:[0,180,180]},{index:.2,rgb:[40,210,40]},{index:.4,rgb:[230,230,50]},{index:.6,rgb:[120,70,20]},{index:1,rgb:[255,255,255]}],electric:[{index:0,rgb:[0,0,0]},{index:.15,rgb:[30,0,100]},{index:.4,rgb:[120,0,100]},{index:.6,rgb:[160,90,0]},{index:.8,rgb:[230,200,0]},{index:1,rgb:[255,250,220]}],alpha:[{index:0,rgb:[255,255,255,0]},{index:1,rgb:[255,255,255,1]}],viridis:[{index:0,rgb:[68,1,84]},{index:.13,rgb:[71,44,122]},{index:.25,rgb:[59,81,139]},{index:.38,rgb:[44,113,142]},{index:.5,rgb:[33,144,141]},{index:.63,rgb:[39,173,129]},{index:.75,rgb:[92,200,99]},{index:.88,rgb:[170,220,50]},{index:1,rgb:[253,231,37]}],inferno:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[31,12,72]},{index:.25,rgb:[85,15,109]},{index:.38,rgb:[136,34,106]},{index:.5,rgb:[186,54,85]},{index:.63,rgb:[227,89,51]},{index:.75,rgb:[249,140,10]},{index:.88,rgb:[249,201,50]},{index:1,rgb:[252,255,164]}],magma:[{index:0,rgb:[0,0,4]},{index:.13,rgb:[28,16,68]},{index:.25,rgb:[79,18,123]},{index:.38,rgb:[129,37,129]},{index:.5,rgb:[181,54,122]},{index:.63,rgb:[229,80,100]},{index:.75,rgb:[251,135,97]},{index:.88,rgb:[254,194,135]},{index:1,rgb:[252,253,191]}],plasma:[{index:0,rgb:[13,8,135]},{index:.13,rgb:[75,3,161]},{index:.25,rgb:[125,3,168]},{index:.38,rgb:[168,34,150]},{index:.5,rgb:[203,70,121]},{index:.63,rgb:[229,107,93]},{index:.75,rgb:[248,148,65]},{index:.88,rgb:[253,195,40]},{index:1,rgb:[240,249,33]}],warm:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[172,0,187]},{index:.25,rgb:[219,0,170]},{index:.38,rgb:[255,0,130]},{index:.5,rgb:[255,63,74]},{index:.63,rgb:[255,123,0]},{index:.75,rgb:[234,176,0]},{index:.88,rgb:[190,228,0]},{index:1,rgb:[147,255,0]}],cool:[{index:0,rgb:[125,0,179]},{index:.13,rgb:[116,0,218]},{index:.25,rgb:[98,74,237]},{index:.38,rgb:[68,146,231]},{index:.5,rgb:[0,204,197]},{index:.63,rgb:[0,247,146]},{index:.75,rgb:[0,255,88]},{index:.88,rgb:[40,255,8]},{index:1,rgb:[147,255,0]}],"rainbow-soft":[{index:0,rgb:[125,0,179]},{index:.1,rgb:[199,0,180]},{index:.2,rgb:[255,0,121]},{index:.3,rgb:[255,108,0]},{index:.4,rgb:[222,194,0]},{index:.5,rgb:[150,255,0]},{index:.6,rgb:[0,255,55]},{index:.7,rgb:[0,246,150]},{index:.8,rgb:[50,167,222]},{index:.9,rgb:[103,51,235]},{index:1,rgb:[124,0,186]}],bathymetry:[{index:0,rgb:[40,26,44]},{index:.13,rgb:[59,49,90]},{index:.25,rgb:[64,76,139]},{index:.38,rgb:[63,110,151]},{index:.5,rgb:[72,142,158]},{index:.63,rgb:[85,174,163]},{index:.75,rgb:[120,206,163]},{index:.88,rgb:[187,230,172]},{index:1,rgb:[253,254,204]}],cdom:[{index:0,rgb:[47,15,62]},{index:.13,rgb:[87,23,86]},{index:.25,rgb:[130,28,99]},{index:.38,rgb:[171,41,96]},{index:.5,rgb:[206,67,86]},{index:.63,rgb:[230,106,84]},{index:.75,rgb:[242,149,103]},{index:.88,rgb:[249,193,135]},{index:1,rgb:[254,237,176]}],chlorophyll:[{index:0,rgb:[18,36,20]},{index:.13,rgb:[25,63,41]},{index:.25,rgb:[24,91,59]},{index:.38,rgb:[13,119,72]},{index:.5,rgb:[18,148,80]},{index:.63,rgb:[80,173,89]},{index:.75,rgb:[132,196,122]},{index:.88,rgb:[175,221,162]},{index:1,rgb:[215,249,208]}],density:[{index:0,rgb:[54,14,36]},{index:.13,rgb:[89,23,80]},{index:.25,rgb:[110,45,132]},{index:.38,rgb:[120,77,178]},{index:.5,rgb:[120,113,213]},{index:.63,rgb:[115,151,228]},{index:.75,rgb:[134,185,227]},{index:.88,rgb:[177,214,227]},{index:1,rgb:[230,241,241]}],"freesurface-blue":[{index:0,rgb:[30,4,110]},{index:.13,rgb:[47,14,176]},{index:.25,rgb:[41,45,236]},{index:.38,rgb:[25,99,212]},{index:.5,rgb:[68,131,200]},{index:.63,rgb:[114,156,197]},{index:.75,rgb:[157,181,203]},{index:.88,rgb:[200,208,216]},{index:1,rgb:[241,237,236]}],"freesurface-red":[{index:0,rgb:[60,9,18]},{index:.13,rgb:[100,17,27]},{index:.25,rgb:[142,20,29]},{index:.38,rgb:[177,43,27]},{index:.5,rgb:[192,87,63]},{index:.63,rgb:[205,125,105]},{index:.75,rgb:[216,162,148]},{index:.88,rgb:[227,199,193]},{index:1,rgb:[241,237,236]}],oxygen:[{index:0,rgb:[64,5,5]},{index:.13,rgb:[106,6,15]},{index:.25,rgb:[144,26,7]},{index:.38,rgb:[168,64,3]},{index:.5,rgb:[188,100,4]},{index:.63,rgb:[206,136,11]},{index:.75,rgb:[220,174,25]},{index:.88,rgb:[231,215,44]},{index:1,rgb:[248,254,105]}],par:[{index:0,rgb:[51,20,24]},{index:.13,rgb:[90,32,35]},{index:.25,rgb:[129,44,34]},{index:.38,rgb:[159,68,25]},{index:.5,rgb:[182,99,19]},{index:.63,rgb:[199,134,22]},{index:.75,rgb:[212,171,35]},{index:.88,rgb:[221,210,54]},{index:1,rgb:[225,253,75]}],phase:[{index:0,rgb:[145,105,18]},{index:.13,rgb:[184,71,38]},{index:.25,rgb:[186,58,115]},{index:.38,rgb:[160,71,185]},{index:.5,rgb:[110,97,218]},{index:.63,rgb:[50,123,164]},{index:.75,rgb:[31,131,110]},{index:.88,rgb:[77,129,34]},{index:1,rgb:[145,105,18]}],salinity:[{index:0,rgb:[42,24,108]},{index:.13,rgb:[33,50,162]},{index:.25,rgb:[15,90,145]},{index:.38,rgb:[40,118,137]},{index:.5,rgb:[59,146,135]},{index:.63,rgb:[79,175,126]},{index:.75,rgb:[120,203,104]},{index:.88,rgb:[193,221,100]},{index:1,rgb:[253,239,154]}],temperature:[{index:0,rgb:[4,35,51]},{index:.13,rgb:[23,51,122]},{index:.25,rgb:[85,59,157]},{index:.38,rgb:[129,79,143]},{index:.5,rgb:[175,95,130]},{index:.63,rgb:[222,112,101]},{index:.75,rgb:[249,146,66]},{index:.88,rgb:[249,196,65]},{index:1,rgb:[232,250,91]}],turbidity:[{index:0,rgb:[34,31,27]},{index:.13,rgb:[65,50,41]},{index:.25,rgb:[98,69,52]},{index:.38,rgb:[131,89,57]},{index:.5,rgb:[161,112,59]},{index:.63,rgb:[185,140,66]},{index:.75,rgb:[202,174,88]},{index:.88,rgb:[216,209,126]},{index:1,rgb:[233,246,171]}],"velocity-blue":[{index:0,rgb:[17,32,64]},{index:.13,rgb:[35,52,116]},{index:.25,rgb:[29,81,156]},{index:.38,rgb:[31,113,162]},{index:.5,rgb:[50,144,169]},{index:.63,rgb:[87,173,176]},{index:.75,rgb:[149,196,189]},{index:.88,rgb:[203,221,211]},{index:1,rgb:[254,251,230]}],"velocity-green":[{index:0,rgb:[23,35,19]},{index:.13,rgb:[24,64,38]},{index:.25,rgb:[11,95,45]},{index:.38,rgb:[39,123,35]},{index:.5,rgb:[95,146,12]},{index:.63,rgb:[152,165,18]},{index:.75,rgb:[201,186,69]},{index:.88,rgb:[233,216,137]},{index:1,rgb:[255,253,205]}],cubehelix:[{index:0,rgb:[0,0,0]},{index:.07,rgb:[22,5,59]},{index:.13,rgb:[60,4,105]},{index:.2,rgb:[109,1,135]},{index:.27,rgb:[161,0,147]},{index:.33,rgb:[210,2,142]},{index:.4,rgb:[251,11,123]},{index:.47,rgb:[255,29,97]},{index:.53,rgb:[255,54,69]},{index:.6,rgb:[255,85,46]},{index:.67,rgb:[255,120,34]},{index:.73,rgb:[255,157,37]},{index:.8,rgb:[241,191,57]},{index:.87,rgb:[224,220,93]},{index:.93,rgb:[218,241,142]},{index:1,rgb:[227,253,198]}]}},{}],131:[function(t,e,r){"use strict";var n=t("./colorScale"),i=t("lerp");function a(t){return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function o(t){for(var e,r="#",n=0;n<3;++n)r+=("00"+(e=(e=t[n]).toString(16))).substr(e.length);return r}function s(t){return"rgba("+t.join(",")+")"}e.exports=function(t){var e,r,l,c,u,f,h,p,d,g;t||(t={});p=(t.nshades||72)-1,h=t.format||"hex",(f=t.colormap)||(f="jet");if("string"==typeof f){if(f=f.toLowerCase(),!n[f])throw Error(f+" not a supported colorscale");u=n[f]}else{if(!Array.isArray(f))throw Error("unsupported colormap option",f);u=f.slice()}if(u.length>p+1)throw new Error(f+" map requires nshades to be at least size "+u.length);d=Array.isArray(t.alpha)?2!==t.alpha.length?[1,1]:t.alpha.slice():"number"==typeof t.alpha?[t.alpha,t.alpha]:[1,1];e=u.map((function(t){return Math.round(t.index*p)})),d[0]=Math.min(Math.max(d[0],0),1),d[1]=Math.min(Math.max(d[1],0),1);var m=u.map((function(t,e){var r=u[e].index,n=u[e].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=d[0]+(d[1]-d[0])*r),n})),v=[];for(g=0;g0||l(t,e,a)?-1:1:0===s?c>0||l(t,e,r)?1:-1:i(c-s)}var h=n(t,e,r);return h>0?o>0&&n(t,e,a)>0?1:-1:h<0?o>0||n(t,e,a)>0?1:-1:n(t,e,a)>0||l(t,e,r)?1:-1};var n=t("robust-orientation"),i=t("signum"),a=t("two-sum"),o=t("robust-product"),s=t("robust-sum");function l(t,e,r){var n=a(t[0],-e[0]),i=a(t[1],-e[1]),l=a(r[0],-e[0]),c=a(r[1],-e[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},{"robust-orientation":548,"robust-product":549,"robust-sum":553,signum:554,"two-sum":583}],133:[function(t,e,r){e.exports=function(t,e){var r=t.length,a=t.length-e.length;if(a)return a;switch(r){case 0:return 0;case 1:return t[0]-e[0];case 2:return t[0]+t[1]-e[0]-e[1]||n(t[0],t[1])-n(e[0],e[1]);case 3:var o=t[0]+t[1],s=e[0]+e[1];if(a=o+t[2]-(s+e[2]))return a;var l=n(t[0],t[1]),c=n(e[0],e[1]);return n(l,t[2])-n(c,e[2])||n(l+t[2],o)-n(c+e[2],s);case 4:var u=t[0],f=t[1],h=t[2],p=t[3],d=e[0],g=e[1],m=e[2],v=e[3];return u+f+h+p-(d+g+m+v)||n(u,f,h,p)-n(d,g,m,v,d)||n(u+f,u+h,u+p,f+h,f+p,h+p)-n(d+g,d+m,d+v,g+m,g+v,m+v)||n(u+f+h,u+f+p,u+h+p,f+h+p)-n(d+g+m,d+g+v,d+m+v,g+m+v);default:for(var y=t.slice().sort(i),x=e.slice().sort(i),b=0;bt[r][0]&&(r=n);return er?[[r],[e]]:[[e]]}},{}],137:[function(t,e,r){"use strict";e.exports=function(t){var e=n(t),r=e.length;if(r<=2)return[];for(var i=new Array(r),a=e[r-1],o=0;o=e[l]&&(s+=1);a[o]=s}}return t}(n(a,!0),r)}};var n=t("incremental-convex-hull"),i=t("affine-hull")},{"affine-hull":67,"incremental-convex-hull":459}],139:[function(t,e,r){e.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},{}],140:[function(t,e,r){e.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]},{}],141:[function(t,e,r){e.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]},{}],142:[function(t,e,r){e.exports=["normal","italic","oblique"]},{}],143:[function(t,e,r){e.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]},{}],144:[function(t,e,r){"use strict";e.exports={parse:t("./parse"),stringify:t("./stringify")}},{"./parse":146,"./stringify":147}],145:[function(t,e,r){"use strict";var n=t("css-font-size-keywords");e.exports={isSize:function(t){return/^[\d\.]/.test(t)||-1!==t.indexOf("/")||-1!==n.indexOf(t)}}},{"css-font-size-keywords":140}],146:[function(t,e,r){"use strict";var n=t("unquote"),i=t("css-global-keywords"),a=t("css-system-font-keywords"),o=t("css-font-weight-keywords"),s=t("css-font-style-keywords"),l=t("css-font-stretch-keywords"),c=t("string-split-by"),u=t("./lib/util").isSize;e.exports=h;var f=h.cache={};function h(t){if("string"!=typeof t)throw new Error("Font argument must be a string.");if(f[t])return f[t];if(""===t)throw new Error("Cannot parse an empty string.");if(-1!==a.indexOf(t))return f[t]={system:t};for(var e,r={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},h=c(t,/\s+/);e=h.shift();){if(-1!==i.indexOf(e))return["style","variant","weight","stretch"].forEach((function(t){r[t]=e})),f[t]=r;if(-1===s.indexOf(e))if("normal"!==e&&"small-caps"!==e)if(-1===l.indexOf(e)){if(-1===o.indexOf(e)){if(u(e)){var d=c(e,"/");if(r.size=d[0],null!=d[1]?r.lineHeight=p(d[1]):"/"===h[0]&&(h.shift(),r.lineHeight=p(h.shift())),!h.length)throw new Error("Missing required font-family.");return r.family=c(h.join(" "),/\s*,\s*/).map(n),f[t]=r}throw new Error("Unknown or unsupported font token: "+e)}r.weight=e}else r.stretch=e;else r.variant=e;else r.style=e}throw new Error("Missing required font-size.")}function p(t){var e=parseFloat(t);return e.toString()===t?e:t}},{"./lib/util":145,"css-font-stretch-keywords":141,"css-font-style-keywords":142,"css-font-weight-keywords":143,"css-global-keywords":148,"css-system-font-keywords":149,"string-split-by":568,unquote:598}],147:[function(t,e,r){"use strict";var n=t("pick-by-alias"),i=t("./lib/util").isSize,a=g(t("css-global-keywords")),o=g(t("css-system-font-keywords")),s=g(t("css-font-weight-keywords")),l=g(t("css-font-style-keywords")),c=g(t("css-font-stretch-keywords")),u={normal:1,"small-caps":1},f={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},h="1rem",p="serif";function d(t,e){if(t&&!e[t]&&!a[t])throw Error("Unknown keyword `"+t+"`");return t}function g(t){for(var e={},r=0;r=0;--p)a[p]=c*t[p]+u*e[p]+f*r[p]+h*n[p];return a}return c*t+u*e+f*r+h*n},e.exports.derivative=function(t,e,r,n,i,a){var o=6*i*i-6*i,s=3*i*i-4*i+1,l=-6*i*i+6*i,c=3*i*i-2*i;if(t.length){a||(a=new Array(t.length));for(var u=t.length-1;u>=0;--u)a[u]=o*t[u]+s*e[u]+l*r[u]+c*n[u];return a}return o*t+s*e+l*r[u]+c*n}},{}],151:[function(t,e,r){"use strict";var n=t("./lib/thunk.js");function i(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1}e.exports=function(t){var e=new i;e.pre=t.pre,e.body=t.body,e.post=t.post;var r=t.args.slice(0);e.argTypes=r;for(var a=0;a0)throw new Error("cwise: pre() block may not reference array args");if(a0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===o)e.scalarArgs.push(a),e.shimArgs.push("scalar"+a);else if("index"===o){if(e.indexArgs.push(a),a0)throw new Error("cwise: pre() block may not reference array index");if(a0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===o){if(e.shapeArgs.push(a),ar.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>r.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>r.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,n(e)}},{"./lib/thunk.js":153}],152:[function(t,e,r){"use strict";var n=t("uniq");function i(t,e,r){var n,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,l=[],c=[],u=0,f=0;for(n=0;n0&&l.push("var "+c.join(",")),n=a-1;n>=0;--n)u=t[n],l.push(["for(i",n,"=0;i",n,"0&&l.push(["index[",f,"]-=s",f].join("")),l.push(["++index[",u,"]"].join(""))),l.push("}")}return l.join("\n")}function a(t,e,r){for(var n=t.body,i=[],a=[],o=0;o0&&(r=r&&e[n]===e[n-1])}return r?e[0]:e.join("")}e.exports=function(t,e){for(var r=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,s=new Array(t.arrayArgs.length),l=new Array(t.arrayArgs.length),c=0;c0&&x.push("shape=SS.slice(0)"),t.indexArgs.length>0){var b=new Array(r);for(c=0;c0&&y.push("var "+x.join(",")),c=0;c3&&y.push(a(t.pre,t,l));var k=a(t.body,t,l),M=function(t){for(var e=0,r=t[0].length;e0,c=[],u=0;u0;){"].join("")),c.push(["if(j",u,"<",s,"){"].join("")),c.push(["s",e[u],"=j",u].join("")),c.push(["j",u,"=0"].join("")),c.push(["}else{s",e[u],"=",s].join("")),c.push(["j",u,"-=",s,"}"].join("")),l&&c.push(["index[",e[u],"]=j",u].join(""));for(u=0;u3&&y.push(a(t.post,t,l)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+y.join("\n")+"\n----------");var A=[t.funcName||"unnamed","_cwise_loop_",s[0].join("s"),"m",M,o(l)].join("");return new Function(["function ",A,"(",v.join(","),"){",y.join("\n"),"} return ",A].join(""))()}},{uniq:597}],153:[function(t,e,r){"use strict";var n=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],r=[],i=t.funcName+"_cwise_thunk";e.push(["return function ",i,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],l=[],c=[],u=0;u0&&(l.push("array"+t.arrayArgs[0]+".shape.length===array"+f+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[u]))),c.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+f+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[u])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+c.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),u=0;ue?1:t>=e?0:NaN}function r(t){var r;return 1===t.length&&(r=t,t=function(t,n){return e(r(t),n)}),{left:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(null==n&&(n=0),null==i&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}var n=r(e),i=n.right,a=n.left;function o(t,e){return[t,e]}function s(t){return null===t?NaN:+t}function l(t,e){var r,n,i=t.length,a=0,o=-1,l=0,c=0;if(null==e)for(;++o1)return c/(a-1)}function c(t,e){var r=l(t,e);return r?Math.sqrt(r):r}function u(t,e){var r,n,i,a=t.length,o=-1;if(null==e){for(;++o=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=v?10:a>=y?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=v?10:a>=y?5:a>=x?2:1)}function _(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=v?i*=10:a>=y?i*=5:a>=x&&(i*=2),e=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),o=+r(t[a],a,t);return o+(+r(t[a+1],a+1,t)-o)*(i-a)}}function k(t,e){var r,n,i=t.length,a=-1;if(null==e){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function M(t){if(!(i=t.length))return[];for(var e=-1,r=k(t,A),n=new Array(r);++et?1:e>=t?0:NaN},t.deviation=c,t.extent=u,t.histogram=function(){var t=g,e=u,r=w;function n(n){var a,o,s=n.length,l=new Array(s);for(a=0;af;)h.pop(),--p;var d,g=new Array(p+1);for(a=0;a<=p;++a)(d=g[a]=[]).x0=a>0?h[a-1]:u,d.x1=a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n},t.mean=function(t,e){var r,n=t.length,i=n,a=-1,o=0;if(null==e)for(;++a=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r},t.min=k,t.pairs=function(t,e){null==e&&(e=o);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r0)return[t];if((n=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=l.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var s,c,f,h=-1,p=n.length,d=l[i++],g=r(),m=a();++hl.length)return r;var i,a=c[n-1];return null!=e&&n>=l.length?i=r.entries():(i=[],r.each((function(e,r){i.push({key:r,values:t(e,n)})}))),null!=a?i.sort((function(t,e){return a(t.key,e.key)})):i}(u(t,0,a,o),0)},key:function(t){return l.push(t),s},sortKeys:function(t){return c[l.length-1]=t,s},sortValues:function(e){return t=e,s},rollup:function(t){return e=t,s}}},t.set=c,t.map=r,t.keys=function(t){var e=[];for(var r in t)e.push(r);return e},t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.entries=function(t){var e=[];for(var r in t)e.push({key:r,value:t[r]});return e},Object.defineProperty(t,"__esModule",{value:!0})}))},{}],158:[function(t,e,r){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function r(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function n(){}var i="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",o="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,l=new RegExp("^rgb\\("+[i,i,i]+"\\)$"),c=new RegExp("^rgb\\("+[o,o,o]+"\\)$"),u=new RegExp("^rgba\\("+[i,i,i,a]+"\\)$"),f=new RegExp("^rgba\\("+[o,o,o,a]+"\\)$"),h=new RegExp("^hsl\\("+[a,o,o]+"\\)$"),p=new RegExp("^hsla\\("+[a,o,o,a]+"\\)$"),d={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function g(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function v(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=s.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?y(e):3===r?new w(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?x(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?x(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=l.exec(t))?new w(e[1],e[2],e[3],1):(e=c.exec(t))?new w(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?x(e[1],e[2],e[3],e[4]):(e=f.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=h.exec(t))?A(e[1],e[2]/100,e[3]/100,1):(e=p.exec(t))?A(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?y(d[t]):"transparent"===t?new w(NaN,NaN,NaN,0):null}function y(t){return new w(t>>16&255,t>>8&255,255&t,1)}function x(t,e,r,n){return n<=0&&(t=e=r=NaN),new w(t,e,r,n)}function b(t){return t instanceof n||(t=v(t)),t?new w((t=t.rgb()).r,t.g,t.b,t.opacity):new w}function _(t,e,r,n){return 1===arguments.length?b(t):new w(t,e,r,null==n?1:n)}function w(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function T(){return"#"+M(this.r)+M(this.g)+M(this.b)}function k(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function M(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function A(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new C(t,e,r,n)}function S(t){if(t instanceof C)return new C(t.h,t.s,t.l,t.opacity);if(t instanceof n||(t=v(t)),!t)return new C;if(t instanceof C)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,a=Math.min(e,r,i),o=Math.max(e,r,i),s=NaN,l=o-a,c=(o+a)/2;return l?(s=e===o?(r-i)/l+6*(r0&&c<1?0:s,new C(s,l,c,t.opacity)}function E(t,e,r,n){return 1===arguments.length?S(t):new C(t,e,r,null==n?1:n)}function C(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}function L(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}e(n,v,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:g,formatHex:g,formatHsl:function(){return S(this).formatHsl()},formatRgb:m,toString:m}),e(w,_,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new w(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:T,formatHex:T,formatRgb:k,toString:k})),e(C,E,r(n,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new C(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new C(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new w(L(t>=240?t-240:t+120,i,n),L(t,i,n),L(t<120?t+240:t-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var I=Math.PI/180,P=180/Math.PI,z=6/29,O=3*z*z;function D(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof H)return G(t);t instanceof w||(t=b(t));var e,r,n=U(t.r),i=U(t.g),a=U(t.b),o=B((.2225045*n+.7168786*i+.0606169*a)/1);return n===i&&i===a?e=r=o:(e=B((.4360747*n+.3850649*i+.1430804*a)/.96422),r=B((.0139322*n+.0971045*i+.7141733*a)/.82521)),new F(116*o-16,500*(e-o),200*(o-r),t.opacity)}function R(t,e,r,n){return 1===arguments.length?D(t):new F(t,e,r,null==n?1:n)}function F(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function B(t){return t>.008856451679035631?Math.pow(t,1/3):t/O+4/29}function N(t){return t>z?t*t*t:O*(t-4/29)}function j(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function U(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function V(t){if(t instanceof H)return new H(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=D(t)),0===t.a&&0===t.b)return new H(NaN,0=0&&(r=t.slice(n+1),t=t.slice(0,n)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}}))}function a(t,e){for(var r,n=0,i=t.length;n0)for(var r,n,i=new Array(r),a=0;ah+c||np+c||au.index){var f=h-s.x-s.vx,m=p-s.y-s.vy,v=f*f+m*m;vt.r&&(t.r=t[e].r)}function h(){if(r){var e,i,a=r.length;for(n=new Array(a),e=0;e=c)){(t.data!==r||t.next)&&(0===f&&(d+=(f=o())*f),0===h&&(d+=(h=o())*h),d1?(null==r?u.remove(t):u.set(t,v(r)),e):u.get(t)},find:function(e,r,n){var i,a,o,s,l,c=0,u=t.length;for(null==n?n=1/0:n*=n,c=0;c1?(h.on(t,r),e):h.on(t)}}},t.forceX=function(t){var e,r,n,i=a(.1);function o(t){for(var i,a=0,o=e.length;a=0;)e+=r[n].value;else e=1;t.value=e}function a(t,e){var r,n,i,a,s,u=new c(t),f=+t.value&&(u.value=t.value),h=[u];for(null==e&&(e=o);r=h.pop();)if(f&&(r.value=+r.data.value),(i=e(r.data))&&(s=i.length))for(r.children=new Array(s),a=s-1;a>=0;--a)h.push(n=r.children[a]=new c(i[a])),n.parent=r,n.depth=r.depth+1;return u.eachBefore(l)}function o(t){return t.children}function s(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function c(t){this.data=t,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(t){var e,r,n,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(e[r]);return this},sum:function(t){return this.eachAfter((function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;t=r.pop(),e=n.pop();for(;t===e;)i=t,t=r.pop(),e=n.pop();return i}(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(r){r!==t&&e.push({source:r.parent,target:r})})),e},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function f(t){for(var e,r,n=0,i=(t=function(t){for(var e,r,n=t.length;n;)r=Math.random()*n--|0,e=t[n],t[n]=t[r],t[r]=e;return t}(u.call(t))).length,a=[];n0&&r*r>n*n+i*i}function g(t,e){for(var r=0;r(o*=o)?(n=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-n*n)),r.x=t.x-n*s-a*l,r.y=t.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=e.x+n*s-a*l,r.y=e.y+n*l+a*s)):(r.x=e.x+r.r,r.y=e.y)}function b(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function _(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function w(t){this._=t,this.next=null,this.previous=null}function T(t){if(!(i=t.length))return 0;var e,r,n,i,a,o,s,l,c,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(r=t[1],e.x=-r.r,r.x=e.r,r.y=0,!(i>2))return e.r+r.r;x(r,e,n=t[2]),e=new w(e),r=new w(r),n=new w(n),e.next=n.previous=r,r.next=e.previous=n,n.next=r.previous=e;t:for(s=3;sh&&(h=s),m=u*u*g,(p=Math.max(h/m,m/f))>d){u-=s;break}d=p}v.push(o={value:u,dice:l1?e:1)},r}(G);var X=function t(e){function r(t,r,n,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,l,c,u,f=-1,h=o.length,p=t.value;++f1?e:1)},r}(G);t.cluster=function(){var t=e,i=1,a=1,o=!1;function s(e){var s,l=0;e.eachAfter((function(e){var i=e.children;i?(e.x=function(t){return t.reduce(r,0)/t.length}(i),e.y=function(t){return 1+t.reduce(n,0)}(i)):(e.x=s?l+=t(e,s):0,e.y=0,s=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(e),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(e),f=c.x-t(c,u)/2,h=u.x+t(u,c)/2;return e.eachAfter(o?function(t){t.x=(t.x-e.x)*i,t.y=(e.y-t.y)*a}:function(t){t.x=(t.x-f)/(h-f)*i,t.y=(1-(e.y?t.y/e.y:1))*a})}return s.separation=function(e){return arguments.length?(t=e,s):t},s.size=function(t){return arguments.length?(o=!1,i=+t[0],a=+t[1],s):o?null:[i,a]},s.nodeSize=function(t){return arguments.length?(o=!0,i=+t[0],a=+t[1],s):o?[i,a]:null},s},t.hierarchy=a,t.pack=function(){var t=null,e=1,r=1,n=A;function i(i){return i.x=e/2,i.y=r/2,t?i.eachBefore(C(t)).eachAfter(L(n,.5)).eachBefore(I(1)):i.eachBefore(C(E)).eachAfter(L(A,1)).eachAfter(L(n,i.r/Math.min(e,r))).eachBefore(I(Math.min(e,r)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=k(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],r=+t[1],i):[e,r]},i.padding=function(t){return arguments.length?(n="function"==typeof t?t:S(+t),i):n},i},t.packEnclose=f,t.packSiblings=function(t){return T(t),t},t.partition=function(){var t=1,e=1,r=0,n=!1;function i(i){var a=i.height+1;return i.x0=i.y0=r,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(n){n.children&&z(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var i=n.x0,a=n.y0,o=n.x1-r,s=n.y1-r;o0)throw new Error("cycle");return a}return r.id=function(e){return arguments.length?(t=M(e),r):t},r.parentId=function(t){return arguments.length?(e=M(t),r):e},r},t.tree=function(){var t=B,e=1,r=1,n=null;function i(i){var l=function(t){for(var e,r,n,i,a,o=new q(t,0),s=[o];e=s.pop();)if(n=e._.children)for(e.children=new Array(a=n.length),i=a-1;i>=0;--i)s.push(r=e.children[i]=new q(n[i],i)),r.parent=e;return(o.parent=new q(null,0)).children=[o],o}(i);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),n)i.eachBefore(s);else{var c=i,u=i,f=i;i.eachBefore((function(t){t.xu.x&&(u=t),t.depth>f.depth&&(f=t)}));var h=c===u?1:t(c,u)/2,p=h-c.x,d=e/(u.x+h+p),g=r/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*g}))}return i}function a(e){var r=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(r){!function(t){for(var e,r=0,n=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(e);var a=(r[0].z+r[r.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,r,n){if(r){for(var i,a=e,o=e,s=r,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=j(s),a=N(a),s&&a;)l=N(l),(o=j(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(U(V(s,e,n),e,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!j(o)&&(o.t=s,o.m+=f-u),a&&!N(l)&&(l.t=a,l.m+=c-h,n=e)}return n}(e,i,e.parent.A||n[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(n=!1,e=+t[0],r=+t[1],i):n?null:[e,r]},i.nodeSize=function(t){return arguments.length?(n=!0,e=+t[0],r=+t[1],i):n?[e,r]:null},i},t.treemap=function(){var t=W,e=!1,r=1,n=1,i=[0],a=A,o=A,s=A,l=A,c=A;function u(t){return t.x0=t.y0=0,t.x1=r,t.y1=n,t.eachBefore(f),i=[0],e&&t.eachBefore(P),t}function f(e){var r=i[e.depth],n=e.x0+r,u=e.y0+r,f=e.x1-r,h=e.y1-r;f=r-1){var u=s[e];return u.x0=i,u.y0=a,u.x1=o,void(u.y1=l)}var f=c[e],h=n/2+f,p=e+1,d=r-1;for(;p>>1;c[g]l-a){var y=(i*v+o*m)/n;t(e,p,m,i,a,y,l),t(p,r,v,y,a,o,l)}else{var x=(a*v+l*m)/n;t(e,p,m,i,a,o,x),t(p,r,v,i,x,o,l)}}(0,l,t.value,e,r,n,i)},t.treemapDice=z,t.treemapResquarify=X,t.treemapSlice=H,t.treemapSliceDice=function(t,e,r,n,i){(1&t.depth?H:z)(t,e,r,n,i)},t.treemapSquarify=W,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],162:[function(t,e,r){!function(n,i){"object"==typeof r&&"undefined"!=typeof e?i(r,t("d3-color")):i((n=n||self).d3=n.d3||{},n.d3)}(this,(function(t,e){"use strict";function r(t,e,r,n,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*r+(1+3*t+3*a-3*o)*n+o*i)/6}function n(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,l=i180||r<-180?r-360*Math.round(r/360):r):a(isNaN(t)?e:t)}function l(t){return 1==(t=+t)?c:function(e,r){return r-e?function(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}(e,r,t):a(isNaN(e)?r:e)}}function c(t,e){var r=e-t;return r?o(t,r):a(isNaN(t)?e:t)}var u=function t(r){var n=l(r);function i(t,r){var i=n((t=e.rgb(t)).r,(r=e.rgb(r)).r),a=n(t.g,r.g),o=n(t.b,r.b),s=c(t.opacity,r.opacity);return function(e){return t.r=i(e),t.g=a(e),t.b=o(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);function f(t){return function(r){var n,i,a=r.length,o=new Array(a),s=new Array(a),l=new Array(a);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:y(r,n)})),a=_.lastIndex;return a180?e+=360:e-t>180&&(t+=360),a.push({i:r.push(i(r)+"rotate(",null,n)-2,x:y(t,e)})):e&&r.push(i(r)+"rotate("+e+n)}(a.rotate,o.rotate,s,l),function(t,e,r,a){t!==e?a.push({i:r.push(i(r)+"skewX(",null,n)-2,x:y(t,e)}):e&&r.push(i(r)+"skewX("+e+n)}(a.skewX,o.skewX,s,l),function(t,e,r,n,a,o){if(t!==r||e!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:y(t,r)},{i:s-2,x:y(e,n)})}else 1===r&&1===n||a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,l),a=o=null,function(t){for(var e,r=-1,n=l.length;++r1e-6)if(Math.abs(f*l-c*u)>1e-6&&a){var p=n-o,d=i-s,g=l*l+c*c,m=p*p+d*d,v=Math.sqrt(g),y=Math.sqrt(h),x=a*Math.tan((e-Math.acos((g+h-m)/(2*v*y)))/2),b=x/y,_=x/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(r+b*f)),this._+="A"+a+","+a+",0,0,"+ +(f*p>u*d)+","+(this._x1=t+_*l)+","+(this._y1=r+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=r);else;},arc:function(t,i,a,o,s,l){t=+t,i=+i,l=!!l;var c=(a=+a)*Math.cos(o),u=a*Math.sin(o),f=t+c,h=i+u,p=1^l,d=l?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+f+","+h),a&&(d<0&&(d=d%r+r),d>n?this._+="A"+a+","+a+",0,1,"+p+","+(t-c)+","+(i-u)+"A"+a+","+a+",0,1,"+p+","+(this._x1=f)+","+(this._y1=h):d>1e-6&&(this._+="A"+a+","+a+",0,"+ +(d>=e)+","+p+","+(this._x1=t+a*Math.cos(s))+","+(this._y1=i+a*Math.sin(s))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}},t.path=a,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],164:[function(t,e,r){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";function e(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a,o,s,l,c,u,f,h,p=t._root,d={data:n},g=t._x0,m=t._y0,v=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o,i=p,!(p=p[f=u<<1|c]))return i[f]=d,t;if(s=+t._x.call(null,p.data),l=+t._y.call(null,p.data),e===s&&r===l)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(g+v)/2))?g=a:v=a,(u=r>=(o=(m+y)/2))?m=o:y=o}while((f=u<<1|c)==(h=(l>=o)<<1|s>=a));return i[h]=p,i[f]=d,t}function r(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i}function n(t){return t[0]}function i(t){return t[1]}function a(t,e,r){var a=new o(null==e?n:e,null==r?i:r,NaN,NaN,NaN,NaN);return null==t?a:a.addAll(t)}function o(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var l=a.prototype=o.prototype;l.copy=function(){var t,e,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),n=this._root;if(!n)return r;if(!n.length)return r._root=s(n),r;for(t=[{source:n,target:r._root=new Array(4)}];n=t.pop();)for(var i=0;i<4;++i)(e=n.source[i])&&(e.length?t.push({source:e,target:n.target[i]=new Array(4)}):n.target[i]=s(e));return r},l.add=function(t){var r=+this._x.call(null,t),n=+this._y.call(null,t);return e(this.cover(r,n),r,n,t)},l.addAll=function(t){var r,n,i,a,o=t.length,s=new Array(o),l=new Array(o),c=1/0,u=1/0,f=-1/0,h=-1/0;for(n=0;nf&&(f=i),ah&&(h=a));if(c>f||u>h)return this;for(this.cover(c,u).cover(f,h),n=0;nt||t>=i||n>e||e>=a;)switch(s=(ep||(o=c.y0)>d||(s=c.x1)=y)<<1|t>=v)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-u],g[g.length-1-u]=c)}else{var x=t-+this._x.call(null,m.data),b=e-+this._y.call(null,m.data),_=x*x+b*b;if(_=(s=(d+m)/2))?d=s:m=s,(u=o>=(l=(g+v)/2))?g=l:v=l,e=p,!(p=p[f=u<<1|c]))return this;if(!p.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(r=e,h=f)}for(;p.data!==t;)if(n=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,n?(i?n.next=i:delete n.next,this):e?(i?e[f]=i:delete e[f],(p=e[0]||e[1]||e[2]||e[3])&&p===(e[3]||e[2]||e[1]||e[0])&&!p.length&&(r?r[h]=p:this._root=p),this):(this._root=i,this)},l.removeAll=function(t){for(var e=0,r=t.length;e1?0:t<-1?u:Math.acos(t)}function d(t){return t>=1?f:t<=-1?-f:Math.asin(t)}function g(t){return t.innerRadius}function m(t){return t.outerRadius}function v(t){return t.startAngle}function y(t){return t.endAngle}function x(t){return t&&t.padAngle}function b(t,e,r,n,i,a,o,s){var l=r-t,c=n-e,u=o-i,f=s-a,h=f*l-u*c;if(!(h*h<1e-12))return[t+(h=(u*(e-a)-f*(t-i))/h)*l,e+h*c]}function _(t,e,r,n,i,a,s){var l=t-r,u=e-n,f=(s?a:-a)/c(l*l+u*u),h=f*u,p=-f*l,d=t+h,g=e+p,m=r+h,v=n+p,y=(d+m)/2,x=(g+v)/2,b=m-d,_=v-g,w=b*b+_*_,T=i-a,k=d*v-m*g,M=(_<0?-1:1)*c(o(0,T*T*w-k*k)),A=(k*_-b*M)/w,S=(-k*b-_*M)/w,E=(k*_+b*M)/w,C=(-k*b+_*M)/w,L=A-y,I=S-x,P=E-y,z=C-x;return L*L+I*I>P*P+z*z&&(A=E,S=C),{cx:A,cy:S,x01:-h,y01:-p,x11:A*(i/T-1),y11:S*(i/T-1)}}function w(t){this._context=t}function T(t){return new w(t)}function k(t){return t[0]}function M(t){return t[1]}function A(){var t=k,n=M,i=r(!0),a=null,o=T,s=null;function l(r){var l,c,u,f=r.length,h=!1;for(null==a&&(s=o(u=e.path())),l=0;l<=f;++l)!(l=f;--h)c.point(v[h],y[h]);c.lineEnd(),c.areaEnd()}m&&(v[u]=+t(p,u,r),y[u]=+i(p,u,r),c.point(n?+n(p,u,r):v[u],a?+a(p,u,r):y[u]))}if(d)return c=null,d+""||null}function f(){return A().defined(o).curve(l).context(s)}return u.x=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),n=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),u):t},u.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:r(+t),u):n},u.y=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),a=null,u):i},u.y0=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),u):i},u.y1=function(t){return arguments.length?(a=null==t?null:"function"==typeof t?t:r(+t),u):a},u.lineX0=u.lineY0=function(){return f().x(t).y(i)},u.lineY1=function(){return f().x(t).y(a)},u.lineX1=function(){return f().x(n).y(i)},u.defined=function(t){return arguments.length?(o="function"==typeof t?t:r(!!t),u):o},u.curve=function(t){return arguments.length?(l=t,null!=s&&(c=l(s)),u):l},u.context=function(t){return arguments.length?(null==t?s=c=null:c=l(s=t),u):s},u}function E(t,e){return et?1:e>=t?0:NaN}function C(t){return t}w.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var L=P(T);function I(t){this._curve=t}function P(t){function e(e){return new I(t(e))}return e._curve=t,e}function z(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(P(t)):e()._curve},t}function O(){return z(A().curve(L))}function D(){var t=S().curve(L),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return z(r())},delete t.lineX0,t.lineEndAngle=function(){return z(n())},delete t.lineX1,t.lineInnerRadius=function(){return z(i())},delete t.lineY0,t.lineOuterRadius=function(){return z(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(P(t)):e()._curve},t}function R(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}I.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function B(t){return t.source}function N(t){return t.target}function j(t){var n=B,i=N,a=k,o=M,s=null;function l(){var r,l=F.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=e.path()),t(s,+a.apply(this,(l[0]=c,l)),+o.apply(this,l),+a.apply(this,(l[0]=u,l)),+o.apply(this,l)),r)return s=null,r+""||null}return l.source=function(t){return arguments.length?(n=t,l):n},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(a="function"==typeof t?t:r(+t),l):a},l.y=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),l):o},l.context=function(t){return arguments.length?(s=null==t?null:t,l):s},l}function U(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function V(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e,r=(r+i)/2,n,r,n,i)}function q(t,e,r,n,i){var a=R(e,r),o=R(e,r=(r+i)/2),s=R(n,r),l=R(n,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var H={draw:function(t,e){var r=Math.sqrt(e/u);t.moveTo(r,0),t.arc(0,0,r,0,h)}},G={draw:function(t,e){var r=Math.sqrt(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Y=Math.sqrt(1/3),W=2*Y,X={draw:function(t,e){var r=Math.sqrt(e/W),n=r*Y;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},Z=Math.sin(u/10)/Math.sin(7*u/10),J=Math.sin(h/10)*Z,K=-Math.cos(h/10)*Z,Q={draw:function(t,e){var r=Math.sqrt(.8908130915292852*e),n=J*r,i=K*r;t.moveTo(0,-r),t.lineTo(n,i);for(var a=1;a<5;++a){var o=h*a/5,s=Math.cos(o),l=Math.sin(o);t.lineTo(l*r,-s*r),t.lineTo(s*n-l*i,l*n+s*i)}t.closePath()}},$={draw:function(t,e){var r=Math.sqrt(e),n=-r/2;t.rect(n,n,r,r)}},tt=Math.sqrt(3),et={draw:function(t,e){var r=-Math.sqrt(e/(3*tt));t.moveTo(0,2*r),t.lineTo(-tt*r,-r),t.lineTo(tt*r,-r),t.closePath()}},rt=-.5,nt=Math.sqrt(3)/2,it=1/Math.sqrt(12),at=3*(it/2+1),ot={draw:function(t,e){var r=Math.sqrt(e/at),n=r/2,i=r*it,a=n,o=r*it+r,s=-a,l=o;t.moveTo(n,i),t.lineTo(a,o),t.lineTo(s,l),t.lineTo(rt*n-nt*i,nt*n+rt*i),t.lineTo(rt*a-nt*o,nt*a+rt*o),t.lineTo(rt*s-nt*l,nt*s+rt*l),t.lineTo(rt*n+nt*i,rt*i-nt*n),t.lineTo(rt*a+nt*o,rt*o-nt*a),t.lineTo(rt*s+nt*l,rt*l-nt*s),t.closePath()}},st=[H,G,X,$,Q,et,ot];function lt(){}function ct(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function ut(t){this._context=t}function ft(t){this._context=t}function ht(t){this._context=t}function pt(t,e){this._basis=new ut(t),this._beta=e}ut.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ct(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ft.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ht.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:ct(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},pt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var n,i=t[0],a=e[0],o=t[r]-i,s=e[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+n*o),this._beta*e[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var dt=function t(e){function r(t){return 1===e?new ut(t):new pt(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function gt(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function mt(t,e){this._context=t,this._k=(1-e)/6}mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var vt=function t(e){function r(t){return new mt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function yt(t,e){this._context=t,this._k=(1-e)/6}yt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var xt=function t(e){function r(t){return new yt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function bt(t,e){this._context=t,this._k=(1-e)/6}bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gt(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var _t=function t(e){function r(t){return new bt(t,e)}return r.tension=function(e){return t(+e)},r}(0);function wt(t,e,r){var n=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*c+t._y1*t._l23_2a-r*t._l12_2a)/u}t._context.bezierCurveTo(n,i,a,o,t._x2,t._y2)}function Tt(t,e){this._context=t,this._alpha=e}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kt=function t(e){function r(t){return e?new Tt(t,e):new mt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Mt(t,e){this._context=t,this._alpha=e}Mt.prototype={areaStart:lt,areaEnd:lt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var At=function t(e){function r(t){return e?new Mt(t,e):new yt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function St(t,e){this._context=t,this._alpha=e}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Et=function t(e){function r(t){return e?new St(t,e):new bt(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Ct(t){this._context=t}function Lt(t){return t<0?-1:1}function It(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),o=(r-t._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Lt(a)+Lt(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Pt(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function zt(t,e,r){var n=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-n)/3;t._context.bezierCurveTo(n+s,i+s*e,a-s,o-s*r,a,o)}function Ot(t){this._context=t}function Dt(t){this._context=new Rt(t)}function Rt(t){this._context=t}function Ft(t){this._context=t}function Bt(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),o=new Array(n);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[n-1]=(t[n]+i[n-1])/2,e=0;e1)for(var r,n,i,a=1,o=t[e[0]],s=o.length;a=0;)r[e]=e;return r}function Vt(t,e){return t[e]}function qt(t){var e=t.map(Ht);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Ht(t){for(var e,r=-1,n=0,i=t.length,a=-1/0;++ra&&(a=e,n=r);return n}function Gt(t){var e=t.map(Yt);return Ut(t).sort((function(t,r){return e[t]-e[r]}))}function Yt(t){for(var e,r=0,n=-1,i=t.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}}this._x=t,this._y=e}},t.arc=function(){var t=g,o=m,w=r(0),T=null,k=v,M=y,A=x,S=null;function E(){var r,g,m=+t.apply(this,arguments),v=+o.apply(this,arguments),y=k.apply(this,arguments)-f,x=M.apply(this,arguments)-f,E=n(x-y),C=x>y;if(S||(S=r=e.path()),v1e-12)if(E>h-1e-12)S.moveTo(v*a(y),v*l(y)),S.arc(0,0,v,y,x,!C),m>1e-12&&(S.moveTo(m*a(x),m*l(x)),S.arc(0,0,m,x,y,C));else{var L,I,P=y,z=x,O=y,D=x,R=E,F=E,B=A.apply(this,arguments)/2,N=B>1e-12&&(T?+T.apply(this,arguments):c(m*m+v*v)),j=s(n(v-m)/2,+w.apply(this,arguments)),U=j,V=j;if(N>1e-12){var q=d(N/m*l(B)),H=d(N/v*l(B));(R-=2*q)>1e-12?(O+=q*=C?1:-1,D-=q):(R=0,O=D=(y+x)/2),(F-=2*H)>1e-12?(P+=H*=C?1:-1,z-=H):(F=0,P=z=(y+x)/2)}var G=v*a(P),Y=v*l(P),W=m*a(D),X=m*l(D);if(j>1e-12){var Z,J=v*a(z),K=v*l(z),Q=m*a(O),$=m*l(O);if(E1e-12?V>1e-12?(L=_(Q,$,G,Y,v,V,C),I=_(J,K,W,X,v,V,C),S.moveTo(L.cx+L.x01,L.cy+L.y01),V1e-12&&R>1e-12?U>1e-12?(L=_(W,X,J,K,m,-U,C),I=_(G,Y,Q,$,m,-U,C),S.lineTo(L.cx+L.x01,L.cy+L.y01),U0&&(d+=f);for(null!=e?g.sort((function(t,r){return e(m[t],m[r])})):null!=n&&g.sort((function(t,e){return n(r[t],r[e])})),s=0,c=d?(y-p*b)/d:0;s0?f*c:0)+b,m[l]={data:r[l],index:s,value:f,startAngle:v,endAngle:u,padAngle:x};return m}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,n=null,s):e},s.sort=function(t){return arguments.length?(n=t,e=null,s):n},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:r(+t),s):i},s.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:r(+t),s):a},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:r(+t),s):o},s},t.pointRadial=R,t.radialArea=D,t.radialLine=O,t.stack=function(){var t=r([]),e=Ut,n=jt,i=Vt;function a(r){var a,o,s=t.apply(this,arguments),l=r.length,c=s.length,u=new Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=t[e[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},t.stackOffsetExpand=function(t,e){if((n=t.length)>0){for(var r,n,i,a=0,o=t[0].length;a0){for(var r,n=0,i=t[e[0]],a=i.length;n0&&(n=(r=t[e[0]]).length)>0){for(var r,n,i,a=0,o=1;o=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mt,s:vt,S:q,u:H,U:G,V:Y,w:W,W:X,x:null,X:null,y:Z,Y:J,Z:K,"%":gt},Lt={a:function(t){return f[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return yt[t.getUTCMonth()]},B:function(t){return h[t.getUTCMonth()]},c:null,d:Q,e:Q,f:nt,H:$,I:tt,j:et,L:rt,m:it,M:at,p:function(t){return c[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mt,s:vt,S:ot,u:st,U:lt,V:ct,w:ut,W:ft,x:null,X:null,y:ht,Y:pt,Z:dt,"%":gt},It={a:function(t,e,r){var n=Tt.exec(e.slice(r));return n?(t.w=kt[n[0].toLowerCase()],r+n[0].length):-1},A:function(t,e,r){var n=_t.exec(e.slice(r));return n?(t.w=wt[n[0].toLowerCase()],r+n[0].length):-1},b:function(t,e,r){var n=St.exec(e.slice(r));return n?(t.m=Et[n[0].toLowerCase()],r+n[0].length):-1},B:function(t,e,r){var n=Mt.exec(e.slice(r));return n?(t.m=At[n[0].toLowerCase()],r+n[0].length):-1},c:function(t,e,r){return Ot(t,a,e,r)},d:M,e:M,f:I,H:S,I:S,j:A,L:L,m:k,M:E,p:function(t,e,r){var n=xt.exec(e.slice(r));return n?(t.p=bt[n[0].toLowerCase()],r+n[0].length):-1},q:T,Q:z,s:O,S:C,u:m,U:v,V:y,w:g,W:x,x:function(t,e,r){return Ot(t,o,e,r)},X:function(t,e,r){return Ot(t,l,e,r)},y:_,Y:b,Z:w,"%":P};function Pt(t,e){return function(r){var n,i,a,o=[],l=-1,c=0,u=t.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(l=(s=n(i(c.y,0,1))).getUTCDay(),s=l>4||0===l?e.utcMonday.ceil(s):e.utcMonday(s),s=e.utcDay.offset(s,7*(c.V-1)),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(l=(s=r(i(c.y,0,1))).getDay(),s=l>4||0===l?e.timeMonday.ceil(s):e.timeMonday(s),s=e.timeDay.offset(s,7*(c.V-1)),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),l="Z"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function Ot(t,e,r,n){for(var i,a,o=0,l=e.length,c=r.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=It[i in s?e.charAt(o++):i])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}return Ct.x=Pt(o,Ct),Ct.X=Pt(l,Ct),Ct.c=Pt(a,Ct),Lt.x=Pt(o,Lt),Lt.X=Pt(l,Lt),Lt.c=Pt(a,Lt),{format:function(t){var e=Pt(t+="",Ct);return e.toString=function(){return t},e},parse:function(t){var e=zt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Pt(t+="",Lt);return e.toString=function(){return t},e},utcParse:function(t){var e=zt(t+="",!0);return e.toString=function(){return t},e}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function f(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function T(t,e,r){var n=l.exec(e.slice(r,r+1));return n?(t.q=3*n[0]-3,r+n[0].length):-1}function k(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function M(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function A(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function S(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function E(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function C(t,e,r){var n=l.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function L(t,e,r){var n=l.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function I(t,e,r){var n=l.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function P(t,e,r){var n=c.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function z(t,e,r){var n=l.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function O(t,e,r){var n=l.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function D(t,e){return f(t.getDate(),e,2)}function R(t,e){return f(t.getHours(),e,2)}function F(t,e){return f(t.getHours()%12||12,e,2)}function B(t,r){return f(1+e.timeDay.count(e.timeYear(t),t),r,3)}function N(t,e){return f(t.getMilliseconds(),e,3)}function j(t,e){return N(t,e)+"000"}function U(t,e){return f(t.getMonth()+1,e,2)}function V(t,e){return f(t.getMinutes(),e,2)}function q(t,e){return f(t.getSeconds(),e,2)}function H(t){var e=t.getDay();return 0===e?7:e}function G(t,r){return f(e.timeSunday.count(e.timeYear(t)-1,t),r,2)}function Y(t,r){var n=t.getDay();return t=n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),r,2)}function W(t){return t.getDay()}function X(t,r){return f(e.timeMonday.count(e.timeYear(t)-1,t),r,2)}function Z(t,e){return f(t.getFullYear()%100,e,2)}function J(t,e){return f(t.getFullYear()%1e4,e,4)}function K(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+f(e/60|0,"0",2)+f(e%60,"0",2)}function Q(t,e){return f(t.getUTCDate(),e,2)}function $(t,e){return f(t.getUTCHours(),e,2)}function tt(t,e){return f(t.getUTCHours()%12||12,e,2)}function et(t,r){return f(1+e.utcDay.count(e.utcYear(t),t),r,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function nt(t,e){return rt(t,e)+"000"}function it(t,e){return f(t.getUTCMonth()+1,e,2)}function at(t,e){return f(t.getUTCMinutes(),e,2)}function ot(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function lt(t,r){return f(e.utcSunday.count(e.utcYear(t)-1,t),r,2)}function ct(t,r){var n=t.getUTCDay();return t=n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),r,2)}function ut(t){return t.getUTCDay()}function ft(t,r){return f(e.utcMonday.count(e.utcYear(t)-1,t),r,2)}function ht(t,e){return f(t.getUTCFullYear()%100,e,2)}function pt(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function dt(){return"+0000"}function gt(){return"%"}function mt(t){return+t}function vt(t){return Math.floor(+t/1e3)}function yt(e){return o=a(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}yt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var xt=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");var bt=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:t.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");t.isoFormat=xt,t.isoParse=bt,t.timeFormatDefaultLocale=yt,t.timeFormatLocale=a,Object.defineProperty(t,"__esModule",{value:!0})}))},{"d3-time":167}],167:[function(t,e,r){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";var e=new Date,r=new Date;function n(t,i,a,o){function s(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return s.floor=function(e){return t(e=new Date(+e)),e},s.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},s.round=function(t){var e=s(t),r=s.ceil(t);return t-e0))return o;do{o.push(a=new Date(+e)),i(e,n),t(e)}while(a=r)for(;t(r),!e(r);)r.setTime(r-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;i(t,-1),!e(t););else for(;--r>=0;)for(;i(t,1),!e(t););}))},a&&(s.count=function(n,i){return e.setTime(+n),r.setTime(+i),t(e),t(r),Math.floor(a(e,r))},s.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?s.filter(o?function(e){return o(e)%t==0}:function(e){return s.count(0,e)%t==0}):s:null}),s}var i=n((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?n((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,r){e.setTime(+e+r*t)}),(function(e,r){return(r-e)/t})):i:null};var a=i.range,o=n((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),s=o.range,l=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),c=l.range,u=n((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),f=u.range,h=n((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),p=h.range;function d(t){return n((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var g=d(0),m=d(1),v=d(2),y=d(3),x=d(4),b=d(5),_=d(6),w=g.range,T=m.range,k=v.range,M=y.range,A=x.range,S=b.range,E=_.range,C=n((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),L=C.range,I=n((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));I.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,r){e.setFullYear(e.getFullYear()+r*t)})):null};var P=I.range,z=n((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),O=z.range,D=n((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),R=D.range,F=n((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),B=F.range;function N(t){return n((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var j=N(0),U=N(1),V=N(2),q=N(3),H=N(4),G=N(5),Y=N(6),W=j.range,X=U.range,Z=V.range,J=q.range,K=H.range,Q=G.range,$=Y.range,tt=n((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),et=tt.range,rt=n((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));rt.every=function(t){return isFinite(t=Math.floor(t))&&t>0?n((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})):null};var nt=rt.range;t.timeDay=h,t.timeDays=p,t.timeFriday=b,t.timeFridays=S,t.timeHour=u,t.timeHours=f,t.timeInterval=n,t.timeMillisecond=i,t.timeMilliseconds=a,t.timeMinute=l,t.timeMinutes=c,t.timeMonday=m,t.timeMondays=T,t.timeMonth=C,t.timeMonths=L,t.timeSaturday=_,t.timeSaturdays=E,t.timeSecond=o,t.timeSeconds=s,t.timeSunday=g,t.timeSundays=w,t.timeThursday=x,t.timeThursdays=A,t.timeTuesday=v,t.timeTuesdays=k,t.timeWednesday=y,t.timeWednesdays=M,t.timeWeek=g,t.timeWeeks=w,t.timeYear=I,t.timeYears=P,t.utcDay=F,t.utcDays=B,t.utcFriday=G,t.utcFridays=Q,t.utcHour=D,t.utcHours=R,t.utcMillisecond=i,t.utcMilliseconds=a,t.utcMinute=z,t.utcMinutes=O,t.utcMonday=U,t.utcMondays=X,t.utcMonth=tt,t.utcMonths=et,t.utcSaturday=Y,t.utcSaturdays=$,t.utcSecond=o,t.utcSeconds=s,t.utcSunday=j,t.utcSundays=W,t.utcThursday=H,t.utcThursdays=K,t.utcTuesday=V,t.utcTuesdays=Z,t.utcWednesday=q,t.utcWednesdays=J,t.utcWeek=j,t.utcWeeks=W,t.utcYear=rt,t.utcYears=nt,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],168:[function(t,e,r){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?n(r):n((t=t||self).d3=t.d3||{})}(this,(function(t){"use strict";var e,r,n=0,i=0,a=0,o=0,s=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function f(){return s||(u(h),s=c.now()+l)}function h(){s=0}function p(){this._call=this._time=this._next=null}function d(t,e,r){var n=new p;return n.restart(t,e,r),n}function g(){f(),++n;for(var t,r=e;r;)(t=s-r._time)>=0&&r._call.call(null,t),r=r._next;--n}function m(){s=(o=c.now())+l,n=i=0;try{g()}finally{n=0,function(){var t,n,i=e,a=1/0;for(;i;)i._call?(a>i._time&&(a=i._time),t=i,i=i._next):(n=i._next,i._next=null,i=t?t._next=n:e=n);r=t,y(a)}(),s=0}}function v(){var t=c.now(),e=t-o;e>1e3&&(l-=e,o=t)}function y(t){n||(i&&(i=clearTimeout(i)),t-s>24?(t<1/0&&(i=setTimeout(m,t-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(v,1e3)),n=1,u(m)))}p.prototype=d.prototype={constructor:p,restart:function(t,n,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?f():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:e=this,r=this),this._call=t,this._time=i,y()},stop:function(){this._call&&(this._call=null,this._time=1/0,y())}},t.interval=function(t,e,r){var n=new p,i=e;return null==e?(n.restart(t,e,r),n):(e=+e,r=null==r?f():+r,n.restart((function a(o){o+=i,n.restart(a,i+=e,r),t(o)}),e,r),n)},t.now=f,t.timeout=function(t,e,r){var n=new p;return e=null==e?0:+e,n.restart((function(r){n.stop(),t(r+e)}),e,r),n},t.timer=d,t.timerFlush=g,Object.defineProperty(t,"__esModule",{value:!0})}))},{}],169:[function(t,e,r){!function(){var t={version:"3.5.17"},r=[].slice,n=function(t){return r.call(t)},i=this.document;function a(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch(t){n=function(t){for(var e=t.length,r=new Array(e);e--;)r[e]=t[e];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,f=u.setProperty;s.setAttribute=function(t,e){l.call(this,t,e+"")},s.setAttributeNS=function(t,e,r){c.call(this,t,e,r+"")},u.setProperty=function(t,e,r){f.call(this,t,e+"",r)}}function h(t,e){return te?1:t>=e?0:NaN}function p(t){return null===t?NaN:+t}function d(t){return!isNaN(t)}function g(t){return{left:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)<0?n=a+1:i=a}return n},right:function(e,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=e.length);n>>1;t(e[a],r)>0?i=a:n=a+1}return n}}}t.ascending=h,t.descending=function(t,e){return et?1:e>=t?0:NaN},t.min=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++in&&(r=n)}else{for(;++i=n){r=n;break}for(;++in&&(r=n)}return r},t.max=function(t,e){var r,n,i=-1,a=t.length;if(1===arguments.length){for(;++i=n){r=n;break}for(;++ir&&(r=n)}else{for(;++i=n){r=n;break}for(;++ir&&(r=n)}return r},t.extent=function(t,e){var r,n,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n){r=i=n;break}for(;++an&&(r=n),i=n){r=i=n;break}for(;++an&&(r=n),i1)return o/(l-1)},t.deviation=function(){var e=t.variance.apply(this,arguments);return e?Math.sqrt(e):e};var m=g(h);function v(t){return t.length}t.bisectLeft=m.left,t.bisect=t.bisectRight=m.right,t.bisector=function(t){return g(1===t.length?function(e,r){return h(t(e),r)}:t)},t.shuffle=function(t,e,r){(a=arguments.length)<3&&(r=t.length,a<2&&(e=0));for(var n,i,a=r-e;a;)i=Math.random()*a--|0,n=t[a+e],t[a+e]=t[i+e],t[i+e]=n;return t},t.permute=function(t,e){for(var r=e.length,n=new Array(r);r--;)n[r]=t[e[r]];return n},t.pairs=function(t){for(var e=0,r=t.length-1,n=t[0],i=new Array(r<0?0:r);e=0;)for(e=(n=t[i]).length;--e>=0;)r[--o]=n[e];return r};var y=Math.abs;function x(t){for(var e=1;t*e%1;)e*=10;return e}function b(t,e){for(var r in e)Object.defineProperty(t.prototype,r,{value:e[r],enumerable:!1})}function _(){this._=Object.create(null)}t.range=function(t,e,r){if(arguments.length<3&&(r=1,arguments.length<2&&(e=t,t=0)),(e-t)/r==1/0)throw new Error("infinite range");var n,i=[],a=x(y(r)),o=-1;if(t*=a,e*=a,(r*=a)<0)for(;(n=t+r*++o)>e;)i.push(n/a);else for(;(n=t+r*++o)=i.length)return r?r.call(n,a):e?a.sort(e):a;for(var l,c,u,f,h=-1,p=a.length,d=i[s++],g=new _;++h=i.length)return e;var n=[],o=a[r++];return e.forEach((function(e,i){n.push({key:e,values:t(i,r)})})),o?n.sort((function(t,e){return o(t.key,e.key)})):n}(o(t.map,e,0),0)},n.key=function(t){return i.push(t),n},n.sortKeys=function(t){return a[i.length-1]=t,n},n.sortValues=function(t){return e=t,n},n.rollup=function(t){return r=t,n},n},t.set=function(t){var e=new C;if(t)for(var r=0,n=t.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}},t.event=null,t.requote=function(t){return t.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,U={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var r in e)t[r]=e[r]};function V(t){return U(t,Y),t}var q=function(t,e){return e.querySelector(t)},H=function(t,e){return e.querySelectorAll(t)},G=function(t,e){var r=t.matches||t[P(t,"matchesSelector")];return(G=function(t,e){return r.call(t,e)})(t,e)};"function"==typeof Sizzle&&(q=function(t,e){return Sizzle(t,e)[0]||null},H=Sizzle,G=Sizzle.matchesSelector),t.selection=function(){return t.select(i.documentElement)};var Y=t.selection.prototype=[];function W(t){return"function"==typeof t?t:function(){return q(t,this)}}function X(t){return"function"==typeof t?t:function(){return H(t,this)}}Y.select=function(t){var e,r,n,i,a=[];t=W(t);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=t.slice(0,e))&&(t=t.slice(e+1)),J.hasOwnProperty(r)?{space:J[r],local:t}:t}},Y.attr=function(e,r){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=t.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(r in e)this.each(K(r,e[r]));return this}return this.each(K(e,r))},Y.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var r=this.node(),n=(t=tt(t)).length,i=-1;if(e=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},Y.sort=function(t){t=ct.apply(this,arguments);for(var e=-1,r=this.length;++e=e&&(e=i+1);!(o=s[e])&&++e0&&(e=e.slice(0,o));var l=gt.get(e);function c(){var t=this[a];t&&(this.removeEventListener(e,t,t.$),delete this[a])}return l&&(e=l,s=vt),o?r?function(){var t=s(r,n(arguments));c.call(this),this.addEventListener(e,this[a]=t,t.$=i),t._=r}:c:r?O:function(){var r,n=new RegExp("^__on([^.]+)"+t.requote(e)+"$");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}t.selection.enter=ft,t.selection.enter.prototype=ht,ht.append=Y.append,ht.empty=Y.empty,ht.node=Y.node,ht.call=Y.call,ht.size=Y.size,ht.select=function(t){for(var e,r,n,i,a,o=[],s=-1,l=this.length;++s0?1:t<0?-1:0}function zt(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function Ot(t){return t>1?0:t<-1?At:Math.acos(t)}function Dt(t){return t>1?Ct:t<-1?-Ct:Math.asin(t)}function Rt(t){return((t=Math.exp(t))+1/t)/2}function Ft(t){return(t=Math.sin(t/2))*t}var Bt=Math.SQRT2;t.interpolateZoom=function(t,e){var r,n,i=t[0],a=t[1],o=t[2],s=e[0],l=e[1],c=e[2],u=s-i,f=l-a,h=u*u+f*f;if(h0&&(e=e.transition().duration(g)),e.call(w.event)}function S(){c&&c.domain(l.range().map((function(t){return(t-h.x)/h.k})).map(l.invert)),f&&f.domain(u.range().map((function(t){return(t-h.y)/h.k})).map(u.invert))}function E(t){m++||t({type:"zoomstart"})}function C(t){S(),t({type:"zoom",scale:h.k,translate:[h.x,h.y]})}function L(t){--m||(t({type:"zoomend"}),r=null)}function I(){var e=this,r=_.of(e,arguments),n=0,i=t.select(o(e)).on(y,l).on(x,c),a=T(t.mouse(e)),s=bt(e);function l(){n=1,M(t.mouse(e),a),C(r)}function c(){i.on(y,null).on(x,null),s(n),L(r)}vs.call(e),E(r)}function P(){var e,r=this,n=_.of(r,arguments),i={},a=0,o=".zoom-"+t.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],f=t.select(r),p=bt(r);function d(){var n=t.touches(r);return e=h.k,n.forEach((function(t){t.identifier in i&&(i[t.identifier]=T(t))})),n}function g(){var e=t.event.target;t.select(e).on(l,m).on(c,y),u.push(e);for(var n=t.event.changedTouches,o=0,f=n.length;o1){v=p[0];var x=p[1],b=v[0]-x[0],_=v[1]-x[1];a=b*b+_*_}}function m(){var o,l,c,u,f=t.touches(r);vs.call(r);for(var h=0,p=f.length;h360?t-=360:t<0&&(t+=360),t<60?n+(i-n)*t/60:t<180?i:t<240?n+(i-n)*(240-t)/60:n}(t))}return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=2*(r=r<0?0:r>1?1:r)-(i=r<=.5?r*(1+e):r+e-r*e),new ne(a(t+120),a(t),a(t-120))}function Yt(e,r,n){return this instanceof Yt?(this.h=+e,this.c=+r,void(this.l=+n)):arguments.length<2?e instanceof Yt?new Yt(e.h,e.c,e.l):$t(e instanceof Zt?e.l:(e=ue((e=t.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Yt(e,r,n)}Ht.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new qt(this.h,this.s,this.l/t)},Ht.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new qt(this.h,this.s,t*this.l)},Ht.rgb=function(){return Gt(this.h,this.s,this.l)},t.hcl=Yt;var Wt=Yt.prototype=new Vt;function Xt(t,e,r){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Zt(r,Math.cos(t*=Lt)*e,Math.sin(t)*e)}function Zt(t,e,r){return this instanceof Zt?(this.l=+t,this.a=+e,void(this.b=+r)):arguments.length<2?t instanceof Zt?new Zt(t.l,t.a,t.b):t instanceof Yt?Xt(t.h,t.c,t.l):ue((t=ne(t)).r,t.g,t.b):new Zt(t,e,r)}Wt.brighter=function(t){return new Yt(this.h,this.c,Math.min(100,this.l+Jt*(arguments.length?t:1)))},Wt.darker=function(t){return new Yt(this.h,this.c,Math.max(0,this.l-Jt*(arguments.length?t:1)))},Wt.rgb=function(){return Xt(this.h,this.c,this.l).rgb()},t.lab=Zt;var Jt=18,Kt=Zt.prototype=new Vt;function Qt(t,e,r){var n=(t+16)/116,i=n+e/500,a=n-r/200;return new ne(re(3.2404542*(i=.95047*te(i))-1.5371385*(n=1*te(n))-.4985314*(a=1.08883*te(a))),re(-.969266*i+1.8760108*n+.041556*a),re(.0556434*i-.2040259*n+1.0572252*a))}function $t(t,e,r){return t>0?new Yt(Math.atan2(r,e)*It,Math.sqrt(e*e+r*r),t):new Yt(NaN,NaN,t)}function te(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ee(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function re(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function ne(t,e,r){return this instanceof ne?(this.r=~~t,this.g=~~e,void(this.b=~~r)):arguments.length<2?t instanceof ne?new ne(t.r,t.g,t.b):le(""+t,ne,Gt):new ne(t,e,r)}function ie(t){return new ne(t>>16,t>>8&255,255&t)}function ae(t){return ie(t)+""}Kt.brighter=function(t){return new Zt(Math.min(100,this.l+Jt*(arguments.length?t:1)),this.a,this.b)},Kt.darker=function(t){return new Zt(Math.max(0,this.l-Jt*(arguments.length?t:1)),this.a,this.b)},Kt.rgb=function(){return Qt(this.l,this.a,this.b)},t.rgb=ne;var oe=ne.prototype=new Vt;function se(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function le(t,e,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=n[2].split(","),n[1]){case"hsl":return r(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(he(i[0]),he(i[1]),he(i[2]))}return(a=pe.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o|=o>>4,s=240&a,s|=s>>4,l=15&a,l|=l<<4):7===t.length&&(o=(16711680&a)>>16,s=(65280&a)>>8,l=255&a)),e(o,s,l))}function ce(t,e,r){var n,i,a=Math.min(t/=255,e/=255,r/=255),o=Math.max(t,e,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=t==o?(e-r)/s+(e0&&l<1?0:n),new qt(n,i,l)}function ue(t,e,r){var n=ee((.4124564*(t=fe(t))+.3575761*(e=fe(e))+.1804375*(r=fe(r)))/.95047),i=ee((.2126729*t+.7151522*e+.072175*r)/1);return Zt(116*i-16,500*(n-i),200*(i-ee((.0193339*t+.119192*e+.9503041*r)/1.08883)))}function fe(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function he(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}oe.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,r=this.g,n=this.b,i=30;return e||r||n?(e&&e=200&&e<300||304===e){try{t=i.call(o,c)}catch(t){return void s.error.call(o,t)}s.load.call(o,t)}else s.error.call(o,c)}return this.XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(e)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=f:c.onreadystatechange=function(){c.readyState>3&&f()},c.onprogress=function(e){var r=t.event;t.event=e;try{s.progress.call(o,c)}finally{t.event=r}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?l[t]:(null==e?delete l[t]:l[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(r=null==t?null:t+"",o):r},o.responseType=function(t){return arguments.length?(u=t,o):u},o.response=function(t){return i=t,o},["get","post"].forEach((function(t){o[t]=function(){return o.send.apply(o,[t].concat(n(arguments)))}})),o.send=function(t,n,i){if(2===arguments.length&&"function"==typeof n&&(i=n,n=null),c.open(t,e,!0),null==r||"accept"in l||(l.accept=r+",*/*"),c.setRequestHeader)for(var a in l)c.setRequestHeader(a,l[a]);return null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=u&&(c.responseType=u),null!=i&&o.on("error",i).on("load",(function(t){i(null,t)})),s.beforesend.call(o,c),c.send(null==n?null:n),o},o.abort=function(){return c.abort(),o},t.rebind(o,s,"on"),null==a?o:o.get(function(t){return 1===t.length?function(e,r){t(null==e?r:null)}:t}(a))}pe.forEach((function(t,e){pe.set(t,ie(e))})),t.functor=de,t.xhr=ge(L),t.dsv=function(t,e){var r=new RegExp('["'+t+"\n]"),n=t.charCodeAt(0);function i(t,r,n){arguments.length<3&&(n=r,r=null);var i=me(t,e,null==r?a:o(r),n);return i.row=function(t){return arguments.length?i.response(null==(r=t)?a:o(t)):r},i}function a(t){return i.parse(t.responseText)}function o(t){return function(e){return i.parse(e.responseText,t)}}function s(e){return e.map(l).join(t)}function l(t){return r.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}return i.parse=function(t,e){var r;return i.parseRows(t,(function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+"]"})).join(",")+"}");r=e?function(t,r){return e(i(t),r)}:i}))},i.parseRows=function(t,e){var r,i,a={},o={},s=[],l=t.length,c=0,u=0;function f(){if(c>=l)return o;if(i)return i=!1,a;var e=c;if(34===t.charCodeAt(e)){for(var r=e;r++24?(isFinite(e)&&(clearTimeout(be),be=setTimeout(Te,e)),xe=0):(xe=1,_e(Te))}function ke(){for(var t=Date.now(),e=ve;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Me(){for(var t,e=ve,r=1/0;e;)e.c?(e.t8?function(t){return t/r}:function(t){return t*r},symbol:t}}));function Ee(e){var r=e.decimal,n=e.thousands,i=e.grouping,a=e.currency,o=i&&n?function(t,e){for(var r=t.length,a=[],o=0,s=i[0],l=0;r>0&&s>0&&(l+s+1>e&&(s=Math.max(1,e-l)),a.push(t.substring(r-=s,r+s)),!((l+=s+1)>e));)s=i[o=(o+1)%i.length];return a.reverse().join(n)}:L;return function(e){var n=Ce.exec(e),i=n[1]||" ",s=n[2]||">",l=n[3]||"-",c=n[4]||"",u=n[5],f=+n[6],h=n[7],p=n[8],d=n[9],g=1,m="",v="",y=!1,x=!0;switch(p&&(p=+p.substring(1)),(u||"0"===i&&"="===s)&&(u=i="0",s="="),d){case"n":h=!0,d="g";break;case"%":g=100,v="%",d="f";break;case"p":g=100,v="%",d="r";break;case"b":case"o":case"x":case"X":"#"===c&&(m="0"+d.toLowerCase());case"c":x=!1;case"d":y=!0,p=0;break;case"s":g=-1,d="r"}"$"===c&&(m=a[0],v=a[1]),"r"!=d||p||(d="g"),null!=p&&("g"==d?p=Math.max(1,Math.min(21,p)):"e"!=d&&"f"!=d||(p=Math.max(0,Math.min(20,p)))),d=Le.get(d)||Ie;var b=u&&h;return function(e){var n=v;if(y&&e%1)return"";var a=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(g<0){var c=t.formatPrefix(e,p);e=c.scale(e),n=c.symbol+v}else e*=g;var _,w,T=(e=d(e,p)).lastIndexOf(".");if(T<0){var k=x?e.lastIndexOf("e"):-1;k<0?(_=e,w=""):(_=e.substring(0,k),w=e.substring(k))}else _=e.substring(0,T),w=r+e.substring(T+1);!u&&h&&(_=o(_,1/0));var M=m.length+_.length+w.length+(b?0:a.length),A=M"===s?A+a+e:"^"===s?A.substring(0,M>>=1)+a+e+A.substring(M):a+(b?e:A+e))+n}}}t.formatPrefix=function(e,r){var n=0;return(e=+e)&&(e<0&&(e*=-1),r&&(e=t.round(e,Ae(e,r))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),Se[8+n/3]};var Ce=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Le=t.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(e,r){return(e=t.round(e,Ae(e,r))).toFixed(Math.max(0,Math.min(20,Ae(e*(1+1e-15),r))))}});function Ie(t){return t+""}var Pe=t.time={},ze=Date;function Oe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Oe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){De.setUTCDate.apply(this._,arguments)},setDay:function(){De.setUTCDay.apply(this._,arguments)},setFullYear:function(){De.setUTCFullYear.apply(this._,arguments)},setHours:function(){De.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){De.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){De.setUTCMinutes.apply(this._,arguments)},setMonth:function(){De.setUTCMonth.apply(this._,arguments)},setSeconds:function(){De.setUTCSeconds.apply(this._,arguments)},setTime:function(){De.setTime.apply(this._,arguments)}};var De=Date.prototype;function Re(t,e,r){function n(e){var r=t(e),n=a(r,1);return e-r1)for(;o=c)return-1;if(37===(i=e.charCodeAt(s++))){if(o=e.charAt(s++),!(a=w[o in Ne?e.charAt(s++):o])||(n=a(t,r,n))<0)return-1}else if(i!=r.charCodeAt(n++))return-1}return n}u.utc=function(t){var e=u(t);function r(t){try{var r=new(ze=Oe);return r._=t,e(r)}finally{ze=Date}}return r.parse=function(t){try{ze=Oe;var r=e.parse(t);return r&&r._}finally{ze=Date}},r.toString=e.toString,r},u.multi=u.utc.multi=or;var h=t.map(),p=qe(o),d=He(o),g=qe(s),m=He(s),v=qe(l),y=He(l),x=qe(c),b=He(c);a.forEach((function(t,e){h.set(t.toLowerCase(),e)}));var _={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return l[t.getMonth()]},c:u(r),d:function(t,e){return Ve(t.getDate(),e,2)},e:function(t,e){return Ve(t.getDate(),e,2)},H:function(t,e){return Ve(t.getHours(),e,2)},I:function(t,e){return Ve(t.getHours()%12||12,e,2)},j:function(t,e){return Ve(1+Pe.dayOfYear(t),e,3)},L:function(t,e){return Ve(t.getMilliseconds(),e,3)},m:function(t,e){return Ve(t.getMonth()+1,e,2)},M:function(t,e){return Ve(t.getMinutes(),e,2)},p:function(t){return a[+(t.getHours()>=12)]},S:function(t,e){return Ve(t.getSeconds(),e,2)},U:function(t,e){return Ve(Pe.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return Ve(Pe.mondayOfYear(t),e,2)},x:u(n),X:u(i),y:function(t,e){return Ve(t.getFullYear()%100,e,2)},Y:function(t,e){return Ve(t.getFullYear()%1e4,e,4)},Z:ir,"%":function(){return"%"}},w={a:function(t,e,r){g.lastIndex=0;var n=g.exec(e.slice(r));return n?(t.w=m.get(n[0].toLowerCase()),r+n[0].length):-1},A:function(t,e,r){p.lastIndex=0;var n=p.exec(e.slice(r));return n?(t.w=d.get(n[0].toLowerCase()),r+n[0].length):-1},b:function(t,e,r){x.lastIndex=0;var n=x.exec(e.slice(r));return n?(t.m=b.get(n[0].toLowerCase()),r+n[0].length):-1},B:function(t,e,r){v.lastIndex=0;var n=v.exec(e.slice(r));return n?(t.m=y.get(n[0].toLowerCase()),r+n[0].length):-1},c:function(t,e,r){return f(t,_.c.toString(),e,r)},d:Qe,e:Qe,H:tr,I:tr,j:$e,L:nr,m:Ke,M:er,p:function(t,e,r){var n=h.get(e.slice(r,r+=2).toLowerCase());return null==n?-1:(t.p=n,r)},S:rr,U:Ye,w:Ge,W:We,x:function(t,e,r){return f(t,_.x.toString(),e,r)},X:function(t,e,r){return f(t,_.X.toString(),e,r)},y:Ze,Y:Xe,Z:Je,"%":ar};return u}Pe.year=Re((function(t){return(t=Pe.day(t)).setMonth(0,1),t}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t){return t.getFullYear()})),Pe.years=Pe.year.range,Pe.years.utc=Pe.year.utc.range,Pe.day=Re((function(t){var e=new ze(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t){return t.getDate()-1})),Pe.days=Pe.day.range,Pe.days.utc=Pe.day.utc.range,Pe.dayOfYear=function(t){var e=Pe.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(t,e){e=7-e;var r=Pe[t]=Re((function(t){return(t=Pe.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t}),(function(t,e){t.setDate(t.getDate()+7*Math.floor(e))}),(function(t){var r=Pe.year(t).getDay();return Math.floor((Pe.dayOfYear(t)+(r+e)%7)/7)-(r!==e)}));Pe[t+"s"]=r.range,Pe[t+"s"].utc=r.utc.range,Pe[t+"OfYear"]=function(t){var r=Pe.year(t).getDay();return Math.floor((Pe.dayOfYear(t)+(r+e)%7)/7)}})),Pe.week=Pe.sunday,Pe.weeks=Pe.sunday.range,Pe.weeks.utc=Pe.sunday.utc.range,Pe.weekOfYear=Pe.sundayOfYear;var Ne={"-":"",_:" ",0:"0"},je=/^\s*\d+/,Ue=/^%/;function Ve(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a68?1900:2e3),r+i[0].length):-1}function Je(t,e,r){return/^[+-]\d{4}$/.test(e=e.slice(r,r+5))?(t.Z=-e,r+5):-1}function Ke(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function Qe(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function $e(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.j=+n[0],r+n[0].length):-1}function tr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function er(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function rr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function nr(t,e,r){je.lastIndex=0;var n=je.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function ir(t){var e=t.getTimezoneOffset(),r=e>0?"-":"+",n=y(e)/60|0,i=y(e)%60;return r+Ve(n,"0",2)+Ve(i,"0",2)}function ar(t,e,r){Ue.lastIndex=0;var n=Ue.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function or(t){for(var e=t.length,r=-1;++r=0?1:-1,s=o*a,l=Math.cos(e),c=Math.sin(e),u=i*c,f=n*l+u*Math.cos(s),h=u*o*Math.sin(s);Er.add(Math.atan2(h,f)),r=t,n=l,i=c}Cr.point=function(o,s){Cr.point=a,r=(t=o)*Lt,n=Math.cos(s=(e=s)*Lt/2+At/4),i=Math.sin(s)},Cr.lineEnd=function(){a(t,e)}}function Ir(t){var e=t[0],r=t[1],n=Math.cos(r);return[n*Math.cos(e),n*Math.sin(e),Math.sin(r)]}function Pr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function zr(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Or(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Dr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Rr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Fr(t){return[Math.atan2(t[1],t[0]),Dt(t[2])]}function Br(t,e){return y(t[0]-e[0])kt?i=90:c<-kt&&(r=-90),f[0]=e,f[1]=n}};function p(t,a){u.push(f=[e=t,n=t]),ai&&(i=a)}function d(t,o){var s=Ir([t*Lt,o*Lt]);if(l){var c=zr(l,s),u=zr([c[1],-c[0],0],c);Rr(u),u=Fr(u);var f=t-a,h=f>0?1:-1,d=u[0]*It*h,g=y(f)>180;if(g^(h*ai&&(i=m);else if(g^(h*a<(d=(d+360)%360-180)&&di&&(i=o);g?t_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t):n>=e?(tn&&(n=t)):t>a?_(e,t)>_(e,n)&&(n=t):_(t,n)>_(e,n)&&(e=t)}else p(t,o);l=s,a=t}function g(){h.point=d}function m(){f[0]=e,f[1]=n,h.point=p,l=null}function v(t,e){if(l){var r=t-a;c+=y(r)>180?r+(r>0?360:-360):r}else o=t,s=e;Cr.point(t,e),d(t,e)}function x(){Cr.lineStart()}function b(){v(o,s),Cr.lineEnd(),y(c)>kt&&(e=-(n=180)),f[0]=e,f[1]=n,l=null}function _(t,e){return(e-=t)<0?e+360:e}function w(t,e){return t[0]-e[0]}function T(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t_(g[0],g[1])&&(g[1]=p[1]),_(p[0],g[1])>_(g[0],g[1])&&(g[0]=p[0])):s.push(g=p);for(var l,c,p,d=-1/0,g=(o=0,s[c=s.length-1]);o<=c;g=p,++o)p=s[o],(l=_(g[1],p[0]))>d&&(d=l,e=p[0],n=g[1])}return u=f=null,e===1/0||r===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,r],[n,i]]}}(),t.geo.centroid=function(e){vr=yr=xr=br=_r=wr=Tr=kr=Mr=Ar=Sr=0,t.geo.stream(e,Nr);var r=Mr,n=Ar,i=Sr,a=r*r+n*n+i*i;return a=0;--s)i.point((f=u[s])[0],f[1]);else n(p.x,p.p.x,-1,i);p=p.p}u=(p=p.o).z,d=!d}while(!p.v);i.lineEnd()}}}function Xr(t){if(e=t.length){for(var e,r,n=0,i=t[0];++n=0?1:-1,T=w*_,k=T>At,M=d*x;if(Er.add(Math.atan2(M*w*Math.sin(T),g*b+M*Math.cos(T))),a+=k?_+w*St:_,k^h>=r^v>=r){var A=zr(Ir(f),Ir(t));Rr(A);var S=zr(i,A);Rr(S);var E=(k^_>=0?-1:1)*Dt(S[2]);(n>E||n===E&&(A[0]||A[1]))&&(o+=k^_>=0?1:-1)}if(!m++)break;h=v,d=x,g=b,f=t}}return(a<-kt||a0){for(x||(o.polygonStart(),x=!0),o.lineStart();++a1&&2&e&&r.push(r.pop().concat(r.shift())),s.push(r.filter(Kr))}return u}}function Kr(t){return t.length>1}function Qr(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,r){t.push([e,r])},lineEnd:O,buffer:function(){var r=e;return e=[],t=null,r},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function $r(t,e){return((t=t.x)[0]<0?t[1]-Ct-kt:Ct-t[1])-((e=e.x)[0]<0?e[1]-Ct-kt:Ct-e[1])}var tn=Jr(Yr,(function(t){var e,r=NaN,n=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?At:-At,l=y(a-r);y(l-At)0?Ct:-Ct),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(a,n),e=0):i!==s&&l>=At&&(y(r-i)kt?Math.atan((Math.sin(e)*(a=Math.cos(n))*Math.sin(r)-Math.sin(n)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+n)/2}(r,n,a,o),t.point(i,n),t.lineEnd(),t.lineStart(),t.point(s,n),e=0),t.point(r=a,n=o),i=s},lineEnd:function(){t.lineEnd(),r=n=NaN},clean:function(){return 2-e}}}),(function(t,e,r,n){var i;if(null==t)i=r*Ct,n.point(-At,i),n.point(0,i),n.point(At,i),n.point(At,0),n.point(At,-i),n.point(0,-i),n.point(-At,-i),n.point(-At,0),n.point(-At,i);else if(y(t[0]-e[0])>kt){var a=t[0]0,n=y(e)>kt;return Jr(i,(function(t){var e,s,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(f,h){var p,d=[f,h],g=i(f,h),m=r?g?0:o(f,h):g?o(f+(f<0?At:-At),h):0;if(!e&&(c=l=g)&&t.lineStart(),g!==l&&(p=a(e,d),(Br(e,p)||Br(d,p))&&(d[0]+=kt,d[1]+=kt,g=i(d[0],d[1]))),g!==l)u=0,g?(t.lineStart(),p=a(d,e),t.point(p[0],p[1])):(p=a(e,d),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(n&&e&&r^g){var v;m&s||!(v=a(d,e,!0))||(u=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||e&&Br(e,d)||t.point(d[0],d[1]),e=d,l=g,s=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return u|(c&&l)<<1}}}),Bn(t,6*Lt),r?[0,-t]:[-At,t-At]);function i(t,r){return Math.cos(t)*Math.cos(r)>e}function a(t,r,n){var i=[1,0,0],a=zr(Ir(t),Ir(r)),o=Pr(a,a),s=a[0],l=o-s*s;if(!l)return!n&&t;var c=e*o/l,u=-e*s/l,f=zr(i,a),h=Dr(i,c);Or(h,Dr(a,u));var p=f,d=Pr(h,p),g=Pr(p,p),m=d*d-g*(Pr(h,h)-1);if(!(m<0)){var v=Math.sqrt(m),x=Dr(p,(-d-v)/g);if(Or(x,h),x=Fr(x),!n)return x;var b,_=t[0],w=r[0],T=t[1],k=r[1];w<_&&(b=_,_=w,w=b);var M=w-_,A=y(M-At)0^x[1]<(y(x[0]-_)At^(_<=x[0]&&x[0]<=w)){var S=Dr(p,(-d+v)/g);return Or(S,h),[x,Fr(S)]}}}function o(e,n){var i=r?t:At-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}}function rn(t,e,r,n){return function(i){var a,o=i.a,s=i.b,l=o.x,c=o.y,u=0,f=1,h=s.x-l,p=s.y-c;if(a=t-l,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>f)return;a>u&&(u=a)}if(a=r-l,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>u&&(u=a)}else if(h>0){if(a0)){if(a/=p,p<0){if(a0){if(a>f)return;a>u&&(u=a)}if(a=n-c,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>u&&(u=a)}else if(p>0){if(a0&&(i.a={x:l+u*h,y:c+u*p}),f<1&&(i.b={x:l+f*h,y:c+f*p}),i}}}}}}function nn(e,r,n,i){return function(l){var c,u,f,h,p,d,g,m,v,y,x,b=l,_=Qr(),w=rn(e,r,n,i),T={point:A,lineStart:function(){T.point=S,u&&u.push(f=[]);y=!0,v=!1,g=m=NaN},lineEnd:function(){c&&(S(h,p),d&&v&&_.rejoin(),c.push(_.buffer()));T.point=A,v&&l.lineEnd()},polygonStart:function(){l=_,c=[],u=[],x=!0},polygonEnd:function(){l=b,c=t.merge(c);var r=function(t){for(var e=0,r=u.length,n=t[1],i=0;in&&zt(c,a,t)>0&&++e:a[1]<=n&&zt(c,a,t)<0&&--e,c=a;return 0!==e}([e,i]),n=x&&r,a=c.length;(n||a)&&(l.polygonStart(),n&&(l.lineStart(),k(null,null,1,l),l.lineEnd()),a&&Wr(c,o,r,k,l),l.polygonEnd()),c=u=f=null}};function k(t,o,l,c){var u=0,f=0;if(null==t||(u=a(t,l))!==(f=a(o,l))||s(t,o)<0^l>0)do{c.point(0===u||3===u?e:n,u>1?i:r)}while((u=(u+l+4)%4)!==f);else c.point(o[0],o[1])}function M(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function A(t,e){M(t,e)&&l.point(t,e)}function S(t,e){var r=M(t=Math.max(-1e9,Math.min(1e9,t)),e=Math.max(-1e9,Math.min(1e9,e)));if(u&&f.push([t,e]),y)h=t,p=e,d=r,y=!1,r&&(l.lineStart(),l.point(t,e));else if(r&&v)l.point(t,e);else{var n={a:{x:g,y:m},b:{x:t,y:e}};w(n)?(v||(l.lineStart(),l.point(n.a.x,n.a.y)),l.point(n.b.x,n.b.y),r||l.lineEnd(),x=!1):r&&(l.lineStart(),l.point(t,e),x=!1)}g=t,m=e,v=r}return T};function a(t,i){return y(t[0]-e)0?0:3:y(t[0]-n)0?2:1:y(t[1]-r)0?1:0:i>0?3:2}function o(t,e){return s(t.x,e.x)}function s(t,e){var r=a(t,1),n=a(e,1);return r!==n?r-n:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}}function an(t){var e=0,r=At/3,n=Ln(t),i=n(e,r);return i.parallels=function(t){return arguments.length?n(e=t[0]*At/180,r=t[1]*At/180):[e/At*180,r/At*180]},i}function on(t,e){var r=Math.sin(t),n=(r+Math.sin(e))/2,i=1+r*(2*n-r),a=Math.sqrt(i)/n;function o(t,e){var r=Math.sqrt(i-2*n*Math.sin(e))/n;return[r*Math.sin(t*=n),a-r*Math.cos(t)]}return o.invert=function(t,e){var r=a-e;return[Math.atan2(t,r)/n,Dt((i-(t*t+r*r)*n*n)/(2*n))]},o}t.geo.clipExtent=function(){var t,e,r,n,i,a,o={stream:function(t){return i&&(i.valid=!1),(i=a(t)).valid=!0,i},extent:function(s){return arguments.length?(a=nn(t=+s[0][0],e=+s[0][1],r=+s[1][0],n=+s[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[r,n]]}};return o.extent([[0,0],[960,500]])},(t.geo.conicEqualArea=function(){return an(on)}).raw=on,t.geo.albers=function(){return t.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},t.geo.albersUsa=function(){var e,r,n,i,a=t.geo.albers(),o=t.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=t.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(t,r){e=[t,r]}};function c(t){var a=t[0],o=t[1];return e=null,r(a,o),e||(n(a,o),e)||i(a,o),e}return c.invert=function(t){var e=a.scale(),r=a.translate(),n=(t[0]-r[0])/e,i=(t[1]-r[1])/e;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?o:i>=.166&&i<.234&&n>=-.214&&n<-.115?s:a).invert(t)},c.stream=function(t){var e=a.stream(t),r=o.stream(t),n=s.stream(t);return{point:function(t,i){e.point(t,i),r.point(t,i),n.point(t,i)},sphere:function(){e.sphere(),r.sphere(),n.sphere()},lineStart:function(){e.lineStart(),r.lineStart(),n.lineStart()},lineEnd:function(){e.lineEnd(),r.lineEnd(),n.lineEnd()},polygonStart:function(){e.polygonStart(),r.polygonStart(),n.polygonStart()},polygonEnd:function(){e.polygonEnd(),r.polygonEnd(),n.polygonEnd()}}},c.precision=function(t){return arguments.length?(a.precision(t),o.precision(t),s.precision(t),c):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),o.scale(.35*t),s.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),u=+t[0],f=+t[1];return r=a.translate(t).clipExtent([[u-.455*e,f-.238*e],[u+.455*e,f+.238*e]]).stream(l).point,n=o.translate([u-.307*e,f+.201*e]).clipExtent([[u-.425*e+kt,f+.12*e+kt],[u-.214*e-kt,f+.234*e-kt]]).stream(l).point,i=s.translate([u-.205*e,f+.212*e]).clipExtent([[u-.214*e+kt,f+.166*e+kt],[u-.115*e-kt,f+.234*e-kt]]).stream(l).point,c},c.scale(1070)};var sn,ln,cn,un,fn,hn,pn={point:O,lineStart:O,lineEnd:O,polygonStart:function(){ln=0,pn.lineStart=dn},polygonEnd:function(){pn.lineStart=pn.lineEnd=pn.point=O,sn+=y(ln/2)}};function dn(){var t,e,r,n;function i(t,e){ln+=n*t-r*e,r=t,n=e}pn.point=function(a,o){pn.point=i,t=r=a,e=n=o},pn.lineEnd=function(){i(t,e)}}var gn={point:function(t,e){tfn&&(fn=t);ehn&&(hn=e)},lineStart:O,lineEnd:O,polygonStart:O,polygonEnd:O};function mn(){var t=vn(4.5),e=[],r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(e){return t=vn(e),r},result:function(){if(e.length){var t=e.join("");return e=[],t}}};function n(r,n){e.push("M",r,",",n,t)}function i(t,n){e.push("M",t,",",n),r.point=a}function a(t,r){e.push("L",t,",",r)}function o(){r.point=n}function s(){e.push("Z")}return r}function vn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var yn,xn={point:bn,lineStart:_n,lineEnd:wn,polygonStart:function(){xn.lineStart=Tn},polygonEnd:function(){xn.point=bn,xn.lineStart=_n,xn.lineEnd=wn}};function bn(t,e){xr+=t,br+=e,++_r}function _n(){var t,e;function r(r,n){var i=r-t,a=n-e,o=Math.sqrt(i*i+a*a);wr+=o*(t+r)/2,Tr+=o*(e+n)/2,kr+=o,bn(t=r,e=n)}xn.point=function(n,i){xn.point=r,bn(t=n,e=i)}}function wn(){xn.point=bn}function Tn(){var t,e,r,n;function i(t,e){var i=t-r,a=e-n,o=Math.sqrt(i*i+a*a);wr+=o*(r+t)/2,Tr+=o*(n+e)/2,kr+=o,Mr+=(o=n*t-r*e)*(r+t),Ar+=o*(n+e),Sr+=3*o,bn(r=t,n=e)}xn.point=function(a,o){xn.point=i,bn(t=r=a,e=n=o)},xn.lineEnd=function(){i(t,e)}}function kn(t){var e=4.5,r={point:n,lineStart:function(){r.point=i},lineEnd:o,polygonStart:function(){r.lineEnd=s},polygonEnd:function(){r.lineEnd=o,r.point=n},pointRadius:function(t){return e=t,r},result:O};function n(r,n){t.moveTo(r+e,n),t.arc(r,n,e,0,St)}function i(e,n){t.moveTo(e,n),r.point=a}function a(e,r){t.lineTo(e,r)}function o(){r.point=n}function s(){t.closePath()}return r}function Mn(t){var e=.5,r=Math.cos(30*Lt),n=16;function i(t){return(n?o:a)(t)}function a(e){return En(e,(function(r,n){r=t(r,n),e.point(r[0],r[1])}))}function o(e){var r,i,a,o,l,c,u,f,h,p,d,g,m={point:v,lineStart:y,lineEnd:b,polygonStart:function(){e.polygonStart(),m.lineStart=_},polygonEnd:function(){e.polygonEnd(),m.lineStart=y}};function v(r,n){r=t(r,n),e.point(r[0],r[1])}function y(){f=NaN,m.point=x,e.lineStart()}function x(r,i){var a=Ir([r,i]),o=t(r,i);s(f,h,u,p,d,g,f=o[0],h=o[1],u=r,p=a[0],d=a[1],g=a[2],n,e),e.point(f,h)}function b(){m.point=v,e.lineEnd()}function _(){y(),m.point=w,m.lineEnd=T}function w(t,e){x(r=t,e),i=f,a=h,o=p,l=d,c=g,m.point=x}function T(){s(f,h,u,p,d,g,i,a,r,o,l,c,n,e),m.lineEnd=b,b()}return m}function s(n,i,a,o,l,c,u,f,h,p,d,g,m,v){var x=u-n,b=f-i,_=x*x+b*b;if(_>4*e&&m--){var w=o+p,T=l+d,k=c+g,M=Math.sqrt(w*w+T*T+k*k),A=Math.asin(k/=M),S=y(y(k)-1)e||y((x*I+b*P)/_-.5)>.3||o*p+l*d+c*g0&&16,i):Math.sqrt(e)},i}function An(t){var e=Mn((function(e,r){return t([e*It,r*It])}));return function(t){return In(e(t))}}function Sn(t){this.stream=t}function En(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function Cn(t){return Ln((function(){return t}))()}function Ln(e){var r,n,i,a,o,s,l=Mn((function(t,e){return[(t=r(t,e))[0]*c+a,o-t[1]*c]})),c=150,u=480,f=250,h=0,p=0,d=0,g=0,m=0,v=tn,y=L,x=null,b=null;function _(t){return[(t=i(t[0]*Lt,t[1]*Lt))[0]*c+a,o-t[1]*c]}function w(t){return(t=i.invert((t[0]-a)/c,(o-t[1])/c))&&[t[0]*It,t[1]*It]}function T(){i=Gr(n=On(d,g,m),r);var t=r(h,p);return a=u-t[0]*c,o=f+t[1]*c,k()}function k(){return s&&(s.valid=!1,s=null),_}return _.stream=function(t){return s&&(s.valid=!1),(s=In(v(n,l(y(t))))).valid=!0,s},_.clipAngle=function(t){return arguments.length?(v=null==t?(x=t,tn):en((x=+t)*Lt),k()):x},_.clipExtent=function(t){return arguments.length?(b=t,y=t?nn(t[0][0],t[0][1],t[1][0],t[1][1]):L,k()):b},_.scale=function(t){return arguments.length?(c=+t,T()):c},_.translate=function(t){return arguments.length?(u=+t[0],f=+t[1],T()):[u,f]},_.center=function(t){return arguments.length?(h=t[0]%360*Lt,p=t[1]%360*Lt,T()):[h*It,p*It]},_.rotate=function(t){return arguments.length?(d=t[0]%360*Lt,g=t[1]%360*Lt,m=t.length>2?t[2]%360*Lt:0,T()):[d*It,g*It,m*It]},t.rebind(_,l,"precision"),function(){return r=e.apply(this,arguments),_.invert=r.invert&&w,T()}}function In(t){return En(t,(function(e,r){t.point(e*Lt,r*Lt)}))}function Pn(t,e){return[t,e]}function zn(t,e){return[t>At?t-St:t<-At?t+St:t,e]}function On(t,e,r){return t?e||r?Gr(Rn(t),Fn(e,r)):Rn(t):e||r?Fn(e,r):zn}function Dn(t){return function(e,r){return[(e+=t)>At?e-St:e<-At?e+St:e,r]}}function Rn(t){var e=Dn(t);return e.invert=Dn(-t),e}function Fn(t,e){var r=Math.cos(t),n=Math.sin(t),i=Math.cos(e),a=Math.sin(e);function o(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*r+s*n;return[Math.atan2(l*i-u*a,s*r-c*n),Dt(u*i+l*a)]}return o.invert=function(t,e){var o=Math.cos(e),s=Math.cos(t)*o,l=Math.sin(t)*o,c=Math.sin(e),u=c*i-l*a;return[Math.atan2(l*i+c*a,s*r+u*n),Dt(u*r-s*n)]},o}function Bn(t,e){var r=Math.cos(t),n=Math.sin(t);return function(i,a,o,s){var l=o*e;null!=i?(i=Nn(r,i),a=Nn(r,a),(o>0?ia)&&(i+=o*St)):(i=t+o*St,a=t-.5*l);for(var c,u=i;o>0?u>a:u2?t[2]*Lt:0),e.invert=function(e){return(e=t.invert(e[0]*Lt,e[1]*Lt))[0]*=It,e[1]*=It,e},e},zn.invert=Pn,t.geo.circle=function(){var t,e,r=[0,0],n=6;function i(){var t="function"==typeof r?r.apply(this,arguments):r,n=On(-t[0]*Lt,-t[1]*Lt,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=It,t[1]*=It}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(t){return arguments.length?(r=t,i):r},i.angle=function(r){return arguments.length?(e=Bn((t=+r)*Lt,n*Lt),i):t},i.precision=function(r){return arguments.length?(e=Bn(t*Lt,(n=+r)*Lt),i):n},i.angle(90)},t.geo.distance=function(t,e){var r,n=(e[0]-t[0])*Lt,i=t[1]*Lt,a=e[1]*Lt,o=Math.sin(n),s=Math.cos(n),l=Math.sin(i),c=Math.cos(i),u=Math.sin(a),f=Math.cos(a);return Math.atan2(Math.sqrt((r=f*o)*r+(r=c*u-l*f*s)*r),l*u+c*f*s)},t.geo.graticule=function(){var e,r,n,i,a,o,s,l,c,u,f,h,p=10,d=p,g=90,m=360,v=2.5;function x(){return{type:"MultiLineString",coordinates:b()}}function b(){return t.range(Math.ceil(i/g)*g,n,g).map(f).concat(t.range(Math.ceil(l/m)*m,s,m).map(h)).concat(t.range(Math.ceil(r/p)*p,e,p).filter((function(t){return y(t%g)>kt})).map(c)).concat(t.range(Math.ceil(o/d)*d,a,d).filter((function(t){return y(t%m)>kt})).map(u))}return x.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},x.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(h(s).slice(1),f(n).reverse().slice(1),h(l).reverse().slice(1))]}},x.extent=function(t){return arguments.length?x.majorExtent(t).minorExtent(t):x.minorExtent()},x.majorExtent=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),l>s&&(t=l,l=s,s=t),x.precision(v)):[[i,l],[n,s]]},x.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],o=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),o>a&&(t=o,o=a,a=t),x.precision(v)):[[r,o],[e,a]]},x.step=function(t){return arguments.length?x.majorStep(t).minorStep(t):x.minorStep()},x.majorStep=function(t){return arguments.length?(g=+t[0],m=+t[1],x):[g,m]},x.minorStep=function(t){return arguments.length?(p=+t[0],d=+t[1],x):[p,d]},x.precision=function(t){return arguments.length?(v=+t,c=jn(o,a,90),u=Un(r,e,v),f=jn(l,s,90),h=Un(i,n,v),x):v},x.majorExtent([[-180,-90+kt],[180,90-kt]]).minorExtent([[-180,-80-kt],[180,80+kt]])},t.geo.greatArc=function(){var e,r,n=Vn,i=qn;function a(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),r||i.apply(this,arguments)]}}return a.distance=function(){return t.geo.distance(e||n.apply(this,arguments),r||i.apply(this,arguments))},a.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,a):n},a.target=function(t){return arguments.length?(i=t,r="function"==typeof t?null:t,a):i},a.precision=function(){return arguments.length?a:0},a},t.geo.interpolate=function(t,e){return r=t[0]*Lt,n=t[1]*Lt,i=e[0]*Lt,a=e[1]*Lt,o=Math.cos(n),s=Math.sin(n),l=Math.cos(a),c=Math.sin(a),u=o*Math.cos(r),f=o*Math.sin(r),h=l*Math.cos(i),p=l*Math.sin(i),d=2*Math.asin(Math.sqrt(Ft(a-n)+o*l*Ft(i-r))),g=1/Math.sin(d),(m=d?function(t){var e=Math.sin(t*=d)*g,r=Math.sin(d-t)*g,n=r*u+e*h,i=r*f+e*p,a=r*s+e*c;return[Math.atan2(i,n)*It,Math.atan2(a,Math.sqrt(n*n+i*i))*It]}:function(){return[r*It,n*It]}).distance=d,m;var r,n,i,a,o,s,l,c,u,f,h,p,d,g,m},t.geo.length=function(e){return yn=0,t.geo.stream(e,Hn),yn};var Hn={sphere:O,point:O,lineStart:function(){var t,e,r;function n(n,i){var a=Math.sin(i*=Lt),o=Math.cos(i),s=y((n*=Lt)-t),l=Math.cos(s);yn+=Math.atan2(Math.sqrt((s=o*Math.sin(s))*s+(s=r*a-e*o*l)*s),e*a+r*o*l),t=n,e=a,r=o}Hn.point=function(i,a){t=i*Lt,e=Math.sin(a*=Lt),r=Math.cos(a),Hn.point=n},Hn.lineEnd=function(){Hn.point=Hn.lineEnd=O}},lineEnd:O,polygonStart:O,polygonEnd:O};function Gn(t,e){function r(e,r){var n=Math.cos(e),i=Math.cos(r),a=t(n*i);return[a*i*Math.sin(e),a*Math.sin(r)]}return r.invert=function(t,r){var n=Math.sqrt(t*t+r*r),i=e(n),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,n*o),Math.asin(n&&r*a/n)]},r}var Yn=Gn((function(t){return Math.sqrt(2/(1+t))}),(function(t){return 2*Math.asin(t/2)}));(t.geo.azimuthalEqualArea=function(){return Cn(Yn)}).raw=Yn;var Wn=Gn((function(t){var e=Math.acos(t);return e&&e/Math.sin(e)}),L);function Xn(t,e){var r=Math.cos(t),n=function(t){return Math.tan(At/4+t/2)},i=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(n(e)/n(t)),a=r*Math.pow(n(t),i)/i;if(!i)return Kn;function o(t,e){a>0?e<-Ct+kt&&(e=-Ct+kt):e>Ct-kt&&(e=Ct-kt);var r=a/Math.pow(n(e),i);return[r*Math.sin(i*t),a-r*Math.cos(i*t)]}return o.invert=function(t,e){var r=a-e,n=Pt(i)*Math.sqrt(t*t+r*r);return[Math.atan2(t,r)/i,2*Math.atan(Math.pow(a/n,1/i))-Ct]},o}function Zn(t,e){var r=Math.cos(t),n=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),i=r/n+t;if(y(n)1&&zt(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function ai(t,e){return t[0]-e[0]||t[1]-e[1]}(t.geo.stereographic=function(){return Cn(ti)}).raw=ti,ei.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ct]},(t.geo.transverseMercator=function(){var t=Qn(ei),e=t.center,r=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return t?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90])}).raw=ei,t.geom={},t.geom.hull=function(t){var e=ri,r=ni;if(arguments.length)return n(t);function n(t){if(t.length<3)return[];var n,i=de(e),a=de(r),o=t.length,s=[],l=[];for(n=0;n=0;--n)p.push(t[s[c[n]][2]]);for(n=+f;nkt)s=s.L;else{if(!((i=a-Ti(s,o))>kt)){n>-kt?(e=s.P,r=s):i>-kt?(e=s,r=s.N):e=r=s;break}if(!s.R){e=s;break}s=s.R}var l=yi(t);if(hi.insert(e,l),e||r){if(e===r)return Ei(e),r=yi(e.site),hi.insert(l,r),l.edge=r.edge=Ii(e.site,l.site),Si(e),void Si(r);if(r){Ei(e),Ei(r);var c=e.site,u=c.x,f=c.y,h=t.x-u,p=t.y-f,d=r.site,g=d.x-u,m=d.y-f,v=2*(h*m-p*g),y=h*h+p*p,x=g*g+m*m,b={x:(m*y-p*x)/v+u,y:(h*x-g*y)/v+f};zi(r.edge,c,d,b),l.edge=Ii(c,t,null,b),r.edge=Ii(t,d,null,b),Si(e),Si(r)}else l.edge=Ii(e.site,l.site)}}function wi(t,e){var r=t.site,n=r.x,i=r.y,a=i-e;if(!a)return n;var o=t.P;if(!o)return-1/0;var s=(r=o.site).x,l=r.y,c=l-e;if(!c)return s;var u=s-n,f=1/a-1/c,h=u/c;return f?(-h+Math.sqrt(h*h-2*f*(u*u/(-2*c)-l+c/2+i-a/2)))/f+n:(n+s)/2}function Ti(t,e){var r=t.N;if(r)return wi(r,e);var n=t.site;return n.y===e?n.x:1/0}function ki(t){this.site=t,this.edges=[]}function Mi(t,e){return e.angle-t.angle}function Ai(){Ri(this),this.x=this.y=this.arc=this.site=this.cy=null}function Si(t){var e=t.P,r=t.N;if(e&&r){var n=e.site,i=t.site,a=r.site;if(n!==a){var o=i.x,s=i.y,l=n.x-o,c=n.y-s,u=a.x-o,f=2*(l*(m=a.y-s)-c*u);if(!(f>=-Mt)){var h=l*l+c*c,p=u*u+m*m,d=(m*h-c*p)/f,g=(l*p-u*h)/f,m=g+s,v=mi.pop()||new Ai;v.arc=t,v.site=i,v.x=d+o,v.y=m+Math.sqrt(d*d+g*g),v.cy=m,t.circle=v;for(var y=null,x=di._;x;)if(v.y=s)return;if(h>d){if(a){if(a.y>=c)return}else a={x:m,y:l};r={x:m,y:c}}else{if(a){if(a.y1)if(h>d){if(a){if(a.y>=c)return}else a={x:(l-i)/n,y:l};r={x:(c-i)/n,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:n*o+i};r={x:s,y:n*s+i}}else{if(a){if(a.xkt||y(i-r)>kt)&&(s.splice(o,0,new Oi(Pi(a.site,u,y(n-f)kt?{x:f,y:y(e-f)kt?{x:y(r-d)kt?{x:h,y:y(e-h)kt?{x:y(r-p)=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=t[s]})),e}function s(t){return t.map((function(t,e){return{x:Math.round(n(t,e)/kt)*kt,y:Math.round(i(t,e)/kt)*kt,i:e}}))}return o.links=function(t){return ji(s(t)).edges.filter((function(t){return t.l&&t.r})).map((function(e){return{source:t[e.l.i],target:t[e.r.i]}}))},o.triangles=function(t){var e=[];return ji(s(t)).cells.forEach((function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(Mi),u=-1,f=c.length,h=c[f-1].edge,p=h.l===l?h.r:h.l;++ua||f>o||h=_)<<1|e>=b,T=w+4;wa&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(r=r[0])===(n=n[0])?s[o]?s[o]+=n:s[++o]=n:(s[++o]=null,l.push({i:o,x:Zi(r,n)})),a=Qi.lastIndex;return ag&&(g=l.x),l.y>m&&(m=l.y),c.push(l.x),u.push(l.y);else for(f=0;fg&&(g=b),_>m&&(m=_),c.push(b),u.push(_)}var w=g-p,T=m-d;function k(t,e,r,n,i,a,o,s){if(!isNaN(r)&&!isNaN(n))if(t.leaf){var l=t.x,c=t.y;if(null!=l)if(y(l-r)+y(c-n)<.01)M(t,e,r,n,i,a,o,s);else{var u=t.point;t.x=t.y=t.point=null,M(t,u,l,c,i,a,o,s),M(t,e,r,n,i,a,o,s)}else t.x=r,t.y=n,t.point=e}else M(t,e,r,n,i,a,o,s)}function M(t,e,r,n,i,a,o,s){var l=.5*(i+o),c=.5*(a+s),u=r>=l,f=n>=c,h=f<<1|u;t.leaf=!1,u?i=l:o=l,f?a=c:s=c,k(t=t.nodes[h]||(t.nodes[h]={leaf:!0,nodes:[],point:null,x:null,y:null}),e,r,n,i,a,o,s)}w>T?m=d+w:g=p+T;var A={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(t){k(A,t,+v(t,++f),+x(t,f),p,d,g,m)},visit:function(t){Gi(t,A,p,d,g,m)},find:function(t){return Yi(A,t[0],t[1],p,d,g,m)}};if(f=-1,null==e){for(;++f=0&&!(n=t.interpolators[i](e,r)););return n}function ta(t,e){var r,n=[],i=[],a=t.length,o=e.length,s=Math.min(t.length,e.length);for(r=0;r=1?1:t(e)}}function aa(t){return function(e){return 1-t(1-e)}}function oa(t){return function(e){return.5*(e<.5?t(2*e):2-t(2-2*e))}}function sa(t){return t*t}function la(t){return t*t*t}function ca(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}function ua(t){return 1-Math.cos(t*Ct)}function fa(t){return Math.pow(2,10*(t-1))}function ha(t){return 1-Math.sqrt(1-t*t)}function pa(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function da(t,e){return e-=t,function(r){return Math.round(t+e*r)}}function ga(t){var e,r,n,i=[t.a,t.b],a=[t.c,t.d],o=va(i),s=ma(i,a),l=va(((e=a)[0]+=(n=-s)*(r=i)[0],e[1]+=n*r[1],e))||0;i[0]*a[1]=0?t.slice(0,e):t,i=e>=0?t.slice(e+1):"in";return n=ra.get(n)||ea,ia((i=na.get(i)||L)(n.apply(null,r.call(arguments,1))))},t.interpolateHcl=function(e,r){e=t.hcl(e),r=t.hcl(r);var n=e.h,i=e.c,a=e.l,o=r.h-n,s=r.c-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.c:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Xt(n+o*t,i+s*t,a+l*t)+""}},t.interpolateHsl=function(e,r){e=t.hsl(e),r=t.hsl(r);var n=e.h,i=e.s,a=e.l,o=r.h-n,s=r.s-i,l=r.l-a;isNaN(s)&&(s=0,i=isNaN(i)?r.s:i);isNaN(o)?(o=0,n=isNaN(n)?r.h:n):o>180?o-=360:o<-180&&(o+=360);return function(t){return Gt(n+o*t,i+s*t,a+l*t)+""}},t.interpolateLab=function(e,r){e=t.lab(e),r=t.lab(r);var n=e.l,i=e.a,a=e.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(t){return Qt(n+o*t,i+s*t,a+l*t)+""}},t.interpolateRound=da,t.transform=function(e){var r=i.createElementNS(t.ns.prefix.svg,"g");return(t.transform=function(t){if(null!=t){r.setAttribute("transform",t);var e=r.transform.baseVal.consolidate()}return new ga(e?e.matrix:ya)})(e)},ga.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ya={a:1,b:0,c:0,d:1,e:0,f:0};function xa(t){return t.length?t.pop()+",":""}function ba(e,r){var n=[],i=[];return e=t.transform(e),r=t.transform(r),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:Zi(t[0],e[0])},{i:i-2,x:Zi(t[1],e[1])})}else(e[0]||e[1])&&r.push("translate("+e+")")}(e.translate,r.translate,n,i),function(t,e,r,n){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),n.push({i:r.push(xa(r)+"rotate(",null,")")-2,x:Zi(t,e)})):e&&r.push(xa(r)+"rotate("+e+")")}(e.rotate,r.rotate,n,i),function(t,e,r,n){t!==e?n.push({i:r.push(xa(r)+"skewX(",null,")")-2,x:Zi(t,e)}):e&&r.push(xa(r)+"skewX("+e+")")}(e.skew,r.skew,n,i),function(t,e,r,n){if(t[0]!==e[0]||t[1]!==e[1]){var i=r.push(xa(r)+"scale(",null,",",null,")");n.push({i:i-4,x:Zi(t[0],e[0])},{i:i-2,x:Zi(t[1],e[1])})}else 1===e[0]&&1===e[1]||r.push(xa(r)+"scale("+e+")")}(e.scale,r.scale,n,i),e=r=null,function(t){for(var e,r=-1,a=i.length;++r0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=we(s.tick)),s):n},s.start=function(){var t,e,r,n=v.length,l=y.length,u=c[0],d=c[1];for(t=0;t=0;)r.push(i[n])}function Oa(t,e){for(var r=[t],n=[];null!=(t=r.pop());)if(n.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)o.push(u=c[l]),u.parent=a,u.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(n,a,a.depth)||0),delete a.children;return Oa(i,(function(e){var n,i;t&&(n=e.children)&&n.sort(t),r&&(i=e.parent)&&(i.value+=e.value)})),s}return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(za(t,(function(t){t.children&&(t.value=0)})),Oa(t,(function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)}))),t},n},t.layout.partition=function(){var e=t.layout.hierarchy(),r=[1,1];function n(t,n){var i=e.call(this,t,n);return function t(e,r,n,i){var a=e.children;if(e.x=r,e.y=e.depth*i,e.dx=n,e.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(n=e.value?n/e.value:0;++cs&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=e);return n}function Xa(t){return t.reduce(Za,0)}function Za(t,e){return t+e[1]}function Ja(t,e){return Ka(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Ka(t,e){for(var r=-1,n=+t[0],i=(t[1]-n)/e,a=[];++r<=e;)a[r]=i*r+n;return a}function Qa(e){return[t.min(e),t.max(e)]}function $a(t,e){return t.value-e.value}function to(t,e){var r=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=r,r._pack_prev=e}function eo(t,e){t._pack_next=e,e._pack_prev=t}function ro(t,e){var r=e.x-t.x,n=e.y-t.y,i=t.r+e.r;return.999*i*i>r*r+n*n}function no(t){if((e=t.children)&&(l=e.length)){var e,r,n,i,a,o,s,l,c=1/0,u=-1/0,f=1/0,h=-1/0;if(e.forEach(io),(r=e[0]).x=-r.r,r.y=0,x(r),l>1&&((n=e[1]).x=n.r,n.y=0,x(n),l>2))for(oo(r,n,i=e[2]),x(i),to(r,i),r._pack_prev=i,to(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=f[0]&&l<=f[1]&&((s=c[t.bisect(h,l,1,d)-1]).y+=g,s.push(a[o]));return c}return a.value=function(t){return arguments.length?(r=t,a):r},a.range=function(t){return arguments.length?(n=de(t),a):n},a.bins=function(t){return arguments.length?(i="number"==typeof t?function(e){return Ka(e,t)}:de(t),a):i},a.frequency=function(t){return arguments.length?(e=!!t,a):e},a},t.layout.pack=function(){var e,r=t.layout.hierarchy().sort($a),n=0,i=[1,1];function a(t,a){var o=r.call(this,t,a),s=o[0],l=i[0],c=i[1],u=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Oa(s,(function(t){t.r=+u(t.value)})),Oa(s,no),n){var f=n*(e?1:Math.max(2*s.r/l,2*s.r/c))/2;Oa(s,(function(t){t.r+=f})),Oa(s,no),Oa(s,(function(t){t.r-=f}))}return function t(e,r,n,i){var a=e.children;if(e.x=r+=i*e.x,e.y=n+=i*e.y,e.r*=i,a)for(var o=-1,s=a.length;++op.x&&(p=t),t.depth>d.depth&&(d=t)}));var g=r(h,p)/2-h.x,m=n[0]/(p.x+r(p,h)/2+g),v=n[1]/(d.depth||1);za(u,(function(t){t.x=(t.x+g)*m,t.y=t.depth*v}))}return c}function o(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e.length){!function(t){var e,r=0,n=0,i=t.children,a=i.length;for(;--a>=0;)(e=i[a]).z+=r,e.m+=r,r+=e.s+(n+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+r(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+r(t._,i._));t.parent.A=function(t,e,n){if(e){for(var i,a=t,o=t,s=e,l=a.parent.children[0],c=a.m,u=o.m,f=s.m,h=l.m;s=co(s),a=lo(a),s&&a;)l=lo(l),(o=co(o)).a=t,(i=s.z+f-a.z-c+r(s._,a._))>0&&(uo(fo(s,t,n),t,i),c+=i,u+=i),f+=s.m,c+=a.m,h+=l.m,u+=o.m;s&&!co(o)&&(o.t=s,o.m+=f-u),a&&!lo(l)&&(l.t=a,l.m+=c-h,n=t)}return n}(t,i,t.parent.A||n[0])}function s(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function l(t){t.x*=n[0],t.y=t.depth*n[1]}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t)?l:null,a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null==(n=t)?null:l,a):i?n:null},Pa(a,e)},t.layout.cluster=function(){var e=t.layout.hierarchy().sort(null).value(null),r=so,n=[1,1],i=!1;function a(a,o){var s,l=e.call(this,a,o),c=l[0],u=0;Oa(c,(function(e){var n=e.children;n&&n.length?(e.x=function(t){return t.reduce((function(t,e){return t+e.x}),0)/t.length}(n),e.y=function(e){return 1+t.max(e,(function(t){return t.y}))}(n)):(e.x=s?u+=r(e,s):0,e.y=0,s=e)}));var f=function t(e){var r=e.children;return r&&r.length?t(r[0]):e}(c),h=function t(e){var r,n=e.children;return n&&(r=n.length)?t(n[r-1]):e}(c),p=f.x-r(f,h)/2,d=h.x+r(h,f)/2;return Oa(c,i?function(t){t.x=(t.x-c.x)*n[0],t.y=(c.y-t.y)*n[1]}:function(t){t.x=(t.x-p)/(d-p)*n[0],t.y=(1-(c.y?t.y/c.y:1))*n[1]}),l}return a.separation=function(t){return arguments.length?(r=t,a):r},a.size=function(t){return arguments.length?(i=null==(n=t),a):i?null:n},a.nodeSize=function(t){return arguments.length?(i=null!=(n=t),a):i?n:null},Pa(a,e)},t.layout.treemap=function(){var e,r=t.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=ho,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(t,e){for(var r,n,i=-1,a=t.length;++i0;)s.push(r=c[i-1]),s.area+=r.area,"squarify"!==l||(n=p(s,g))<=h?(c.pop(),h=n):(s.area-=s.pop().area,d(s,g,a,!1),g=Math.min(a.dx,a.dy),s.length=s.area=0,h=1/0);s.length&&(d(s,g,a,!0),s.length=s.area=0),e.forEach(f)}}function h(t){var e=t.children;if(e&&e.length){var r,n=o(t),i=e.slice(),a=[];for(u(i,n.dx*n.dy/t.value),a.area=0;r=i.pop();)a.push(r),a.area+=r.area,null!=r.z&&(d(a,r.z?n.dx:n.dy,n,!i.length),a.length=a.area=0);e.forEach(h)}}function p(t,e){for(var r,n=t.area,i=0,a=1/0,o=-1,s=t.length;++oi&&(i=r));return e*=e,(n*=n)?Math.max(e*i*c/n,n/(e*a*c)):1/0}function d(t,e,r,i){var a,o=-1,s=t.length,l=r.x,c=r.y,u=e?n(t.area/e):0;if(e==r.dx){for((i||u>r.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o1);return t+e*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=t.random.normal.apply(t,arguments);return function(){return Math.exp(e())}},bates:function(e){var r=t.random.irwinHall(e);return function(){return r()/e}},irwinHall:function(t){return function(){for(var e=0,r=0;r2?_o:vo,s=i?wa:_a;return a=t(e,r,s,n),o=t(r,e,s,$i),l}function l(t){return a(t)}return l.invert=function(t){return o(t)},l.domain=function(t){return arguments.length?(e=t.map(Number),s()):e},l.range=function(t){return arguments.length?(r=t,s()):r},l.rangeRound=function(t){return l.range(t).interpolate(da)},l.clamp=function(t){return arguments.length?(i=t,s()):i},l.interpolate=function(t){return arguments.length?(n=t,s()):n},l.ticks=function(t){return Mo(e,t)},l.tickFormat=function(t,r){return Ao(e,t,r)},l.nice=function(t){return To(e,t),s()},l.copy=function(){return t(e,r,n,i)},s()}([0,1],[0,1],$i,!1)};var So={s:1,g:1,p:1,r:1,e:1};function Eo(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}t.scale.log=function(){return function e(r,n,i,a){function o(t){return(i?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function s(t){return i?Math.pow(n,t):-Math.pow(n,-t)}function l(t){return r(o(t))}return l.invert=function(t){return s(r.invert(t))},l.domain=function(t){return arguments.length?(i=t[0]>=0,r.domain((a=t.map(Number)).map(o)),l):a},l.base=function(t){return arguments.length?(n=+t,r.domain(a.map(o)),l):n},l.nice=function(){var t=yo(a.map(o),i?Math:Lo);return r.domain(t),a=t.map(s),l},l.ticks=function(){var t=go(a),e=[],r=t[0],l=t[1],c=Math.floor(o(r)),u=Math.ceil(o(l)),f=n%1?2:n;if(isFinite(u-c)){if(i){for(;c0;h--)e.push(s(c)*h);for(c=0;e[c]l;u--);e=e.slice(c,u)}return e},l.tickFormat=function(e,r){if(!arguments.length)return Co;arguments.length<2?r=Co:"function"!=typeof r&&(r=t.format(r));var i=Math.max(1,n*e/l.ticks().length);return function(t){var e=t/s(Math.round(o(t)));return e*n0?i[t-1]:r[0],tf?0:1;if(c=Et)return l(c,p)+(s?l(s,1-p):"")+"Z";var d,g,m,v,y,x,b,_,w,T,k,M,A=0,S=0,E=[];if((v=(+o.apply(this,arguments)||0)/2)&&(m=n===Fo?Math.sqrt(s*s+c*c):+n.apply(this,arguments),p||(S*=-1),c&&(S=Dt(m/c*Math.sin(v))),s&&(A=Dt(m/s*Math.sin(v)))),c){y=c*Math.cos(u+S),x=c*Math.sin(u+S),b=c*Math.cos(f-S),_=c*Math.sin(f-S);var C=Math.abs(f-u-2*S)<=At?0:1;if(S&&qo(y,x,b,_)===p^C){var L=(u+f)/2;y=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else y=x=0;if(s){w=s*Math.cos(f-A),T=s*Math.sin(f-A),k=s*Math.cos(u+A),M=s*Math.sin(u+A);var I=Math.abs(u-f+2*A)<=At?0:1;if(A&&qo(w,T,k,M)===1-p^I){var P=(u+f)/2;w=s*Math.cos(P),T=s*Math.sin(P),k=M=null}}else w=T=0;if(h>kt&&(d=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){g=s0?0:1}function Ho(t,e,r,n,i){var a=t[0]-e[0],o=t[1]-e[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=t[0]+l,f=t[1]+c,h=e[0]+l,p=e[1]+c,d=(u+h)/2,g=(f+p)/2,m=h-u,v=p-f,y=m*m+v*v,x=r-n,b=u*p-h*f,_=(v<0?-1:1)*Math.sqrt(Math.max(0,x*x*y-b*b)),w=(b*v-m*_)/y,T=(-b*m-v*_)/y,k=(b*v+m*_)/y,M=(-b*m+v*_)/y,A=w-d,S=T-g,E=k-d,C=M-g;return A*A+S*S>E*E+C*C&&(w=k,T=M),[[w-l,T-c],[w*r/x,T*r/x]]}function Go(t){var e=ri,r=ni,n=Yr,i=Wo,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,f=a.length,h=de(e),p=de(r);function d(){l.push("M",i(t(c),o))}for(;++u1&&i.push("H",n[0]);return i.join("")},"step-before":Zo,"step-after":Jo,basis:$o,"basis-open":function(t){if(t.length<4)return Wo(t);var e,r=[],n=-1,i=t.length,a=[0],o=[0];for(;++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);r.push(ts(ns,a)+","+ts(ns,o)),--n;for(;++n9&&(i=3*e/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n));s=-1;for(;++s<=l;)i=(t[Math.min(l,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([i||0,o[s]*i||0]);return a}(t))}});function Wo(t){return t.length>1?t.join("L"):t+"Z"}function Xo(t){return t.join("L")+"Z"}function Zo(t){for(var e=0,r=t.length,n=t[0],i=[n[0],",",n[1]];++e1){s=e[1],a=t[l],l++,n+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cAt)+",1 "+e}function l(t,e,r,n){return"Q 0,0 "+n}return a.radius=function(t){return arguments.length?(r=de(t),a):r},a.source=function(e){return arguments.length?(t=de(e),a):t},a.target=function(t){return arguments.length?(e=de(t),a):e},a.startAngle=function(t){return arguments.length?(n=de(t),a):n},a.endAngle=function(t){return arguments.length?(i=de(t),a):i},a},t.svg.diagonal=function(){var t=Vn,e=qn,r=cs;function n(n,i){var a=t.call(this,n,i),o=e.call(this,n,i),s=(a.y+o.y)/2,l=[a,{x:a.x,y:s},{x:o.x,y:s},o];return"M"+(l=l.map(r))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return n.source=function(e){return arguments.length?(t=de(e),n):t},n.target=function(t){return arguments.length?(e=de(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},t.svg.diagonal.radial=function(){var e=t.svg.diagonal(),r=cs,n=e.projection;return e.projection=function(t){return arguments.length?n(us(r=t)):r},e},t.svg.symbol=function(){var t=hs,e=fs;function r(r,n){return(ds.get(t.call(this,r,n))||ps)(e.call(this,r,n))}return r.type=function(e){return arguments.length?(t=de(e),r):t},r.size=function(t){return arguments.length?(e=de(t),r):e},r};var ds=t.map({circle:ps,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*ms)),r=e*ms;return"M0,"+-e+"L"+r+",0 0,"+e+" "+-r+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/gs),r=e*gs/2;return"M0,"+r+"L"+e+","+-r+" "+-e+","+-r+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/gs),r=e*gs/2;return"M0,"+-r+"L"+e+","+r+" "+-e+","+r+"Z"}});t.svg.symbolTypes=ds.keys();var gs=Math.sqrt(3),ms=Math.tan(30*Lt);Y.transition=function(t){for(var e,r,n=bs||++Ts,i=As(t),a=[],o=_s||{time:Date.now(),ease:ca,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--h].call(t,o);if(a>=1)return f.event&&f.event.end.call(t,t.__data__,e),--u.count?delete u[n]:delete t[r],1}f||(a=i.time,o=we((function(t){var e=f.delay;if(o.t=e+a,e<=t)return h(t-e);o.c=h}),0,a),f=u[n]={tween:new _,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++u.count)}ws.call=Y.call,ws.empty=Y.empty,ws.node=Y.node,ws.size=Y.size,t.transition=function(e,r){return e&&e.transition?bs?e.transition(r):e:t.selection().transition(e)},t.transition.prototype=ws,ws.select=function(t){var e,r,n,i=this.id,a=this.namespace,o=[];t=W(t);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function g(t){t.select(".extent").attr("y",l[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function m(){var f,m,v=this,y=t.select(t.event.target),x=n.of(v,arguments),b=t.select(v),_=y.datum(),w=!/^(n|s)$/.test(_)&&i,T=!/^(e|w)$/.test(_)&&a,k=y.classed("extent"),M=bt(v),A=t.mouse(v),S=t.select(o(v)).on("keydown.brush",L).on("keyup.brush",I);if(t.event.changedTouches?S.on("touchmove.brush",P).on("touchend.brush",O):S.on("mousemove.brush",P).on("mouseup.brush",O),b.interrupt().selectAll("*").interrupt(),k)A[0]=s[0]-A[0],A[1]=l[0]-A[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);m=[s[1-E]-A[0],l[1-C]-A[1]],A[0]=s[E],A[1]=l[C]}else t.event.altKey&&(f=A.slice());function L(){32==t.event.keyCode&&(k||(f=null,A[0]-=s[1],A[1]-=l[1],k=2),F())}function I(){32==t.event.keyCode&&2==k&&(A[0]+=s[1],A[1]+=l[1],k=0,F())}function P(){var e=t.mouse(v),r=!1;m&&(e[0]+=m[0],e[1]+=m[1]),k||(t.event.altKey?(f||(f=[(s[0]+s[1])/2,(l[0]+l[1])/2]),A[0]=s[+(e[0]1?{floor:function(e){for(;s(e=t.floor(e));)e=Ns(e-1);return e},ceil:function(e){for(;s(e=t.ceil(e));)e=Ns(+e+1);return e}}:t))},i.ticks=function(t,e){var r=go(i.domain()),n=null==t?a(r,10):"number"==typeof t?a(r,t):!t.range&&[{range:t},e];return n&&(t=n[0],e=n[1]),t.range(r[0],Ns(+r[1]+1),e<1?1:e)},i.tickFormat=function(){return n},i.copy=function(){return Bs(e.copy(),r,n)},wo(i,e)}function Ns(t){return new Date(t)}Os.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Fs:Rs,Fs.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Fs.toString=Rs.toString,Pe.second=Re((function(t){return new ze(1e3*Math.floor(t/1e3))}),(function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))}),(function(t){return t.getSeconds()})),Pe.seconds=Pe.second.range,Pe.seconds.utc=Pe.second.utc.range,Pe.minute=Re((function(t){return new ze(6e4*Math.floor(t/6e4))}),(function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))}),(function(t){return t.getMinutes()})),Pe.minutes=Pe.minute.range,Pe.minutes.utc=Pe.minute.utc.range,Pe.hour=Re((function(t){var e=t.getTimezoneOffset()/60;return new ze(36e5*(Math.floor(t/36e5-e)+e))}),(function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))}),(function(t){return t.getHours()})),Pe.hours=Pe.hour.range,Pe.hours.utc=Pe.hour.utc.range,Pe.month=Re((function(t){return(t=Pe.day(t)).setDate(1),t}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t){return t.getMonth()})),Pe.months=Pe.month.range,Pe.months.utc=Pe.month.utc.range;var js=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Us=[[Pe.second,1],[Pe.second,5],[Pe.second,15],[Pe.second,30],[Pe.minute,1],[Pe.minute,5],[Pe.minute,15],[Pe.minute,30],[Pe.hour,1],[Pe.hour,3],[Pe.hour,6],[Pe.hour,12],[Pe.day,1],[Pe.day,2],[Pe.week,1],[Pe.month,1],[Pe.month,3],[Pe.year,1]],Vs=Os.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Yr]]),qs={range:function(e,r,n){return t.range(Math.ceil(e/n)*n,+r,n).map(Ns)},floor:L,ceil:L};Us.year=Pe.year,Pe.scale=function(){return Bs(t.scale.linear(),Us,Vs)};var Hs=Us.map((function(t){return[t[0].utc,t[1]]})),Gs=Ds.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Yr]]);function Ys(t){return JSON.parse(t.responseText)}function Ws(t){var e=i.createRange();return e.selectNode(i.body),e.createContextualFragment(t.responseText)}Hs.year=Pe.year.utc,Pe.scale.utc=function(){return Bs(t.scale.linear(),Hs,Gs)},t.text=ge((function(t){return t.responseText})),t.json=function(t,e){return me(t,"application/json",Ys,e)},t.html=function(t,e){return me(t,"text/html",Ws,e)},t.xml=ge((function(t){return t.responseXML})),"object"==typeof e&&e.exports?e.exports=t:this.d3=t}()},{}],170:[function(t,e,r){e.exports=function(){for(var t=0;t=2)return!1;t[r]=n}return!0})):_.filter((function(t){for(var e=0;e<=s;++e){var r=v[t[e]];if(r<0)return!1;t[e]=r}return!0}));if(1&s)for(u=0;u<_.length;++u){h=(b=_[u])[0];b[0]=b[1],b[1]=h}return _}},{"incremental-convex-hull":459,uniq:597}],172:[function(t,e,r){"use strict";e.exports=a;var n=(a.canvas=document.createElement("canvas")).getContext("2d"),i=o([32,126]);function a(t,e){Array.isArray(t)&&(t=t.join(", "));var r,a={},s=16,l=.05;e&&(2===e.length&&"number"==typeof e[0]?r=o(e):Array.isArray(e)?r=e:(e.o?r=o(e.o):e.pairs&&(r=e.pairs),e.fontSize&&(s=e.fontSize),null!=e.threshold&&(l=e.threshold))),r||(r=i),n.font=s+"px "+t;for(var c=0;cs*l){var p=(h-f)/s;a[u]=1e3*p}}return a}function o(t){for(var e=[],r=t[0];r<=t[1];r++)for(var n=String.fromCharCode(r),i=t[0];i>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 2146435072&n&&(i+=1<<20),[r,i]},e.exports.denormalized=function(t){return!(2146435072&e.exports.hi(t))}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:111}],174:[function(t,e,r){var n=t("abs-svg-path"),i=t("normalize-svg-path"),a={M:"moveTo",C:"bezierCurveTo"};e.exports=function(t,e){t.beginPath(),i(n(e)).forEach((function(e){var r=e[0],n=e.slice(1);t[a[r]].apply(t,n)})),t.closePath()}},{"abs-svg-path":65,"normalize-svg-path":497}],175:[function(t,e,r){e.exports=function(t){switch(t){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}},{}],176:[function(t,e,r){"use strict";e.exports=function(t,e){switch("undefined"==typeof e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var r,n;for(r=new Array(t),n=0;n80*r){n=l=t[0],s=c=t[1];for(var b=r;bl&&(l=u),p>c&&(c=p);d=0!==(d=Math.max(l-n,c-s))?1/d:0}return o(y,x,r,n,s,d),x}function i(t,e,r,n,i){var a,o;if(i===E(t,e,r,n)>0)for(a=e;a=e;a-=n)o=M(a,t[a],t[a+1],o);return o&&x(o,o.next)&&(A(o),o=o.next),o}function a(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!x(n,n.next)&&0!==y(n.prev,n,n.next))n=n.next;else{if(A(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function o(t,e,r,n,i,f,h){if(t){!h&&f&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=d(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,f);for(var p,g,m=t;t.prev!==t.next;)if(p=t.prev,g=t.next,f?l(t,n,i,f):s(t))e.push(p.i/r),e.push(t.i/r),e.push(g.i/r),A(t),t=g.next,m=g.next;else if((t=g)===m){h?1===h?o(t=c(a(t),e,r),e,r,n,i,f,2):2===h&&u(t,e,r,n,i,f):o(a(t),e,r,n,i,f,1);break}}}function s(t){var e=t.prev,r=t,n=t.next;if(y(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&y(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function l(t,e,r,n){var i=t.prev,a=t,o=t.next;if(y(i,a,o)>=0)return!1;for(var s=i.xa.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,u=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,f=d(s,l,e,r,n),h=d(c,u,e,r,n),p=t.prevZ,g=t.nextZ;p&&p.z>=f&&g&&g.z<=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;p&&p.z>=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,p.x,p.y)&&y(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;g&&g.z<=h;){if(g!==t.prev&&g!==t.next&&m(i.x,i.y,a.x,a.y,o.x,o.y,g.x,g.y)&&y(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function c(t,e,r){var n=t;do{var i=n.prev,o=n.next.next;!x(i,o)&&b(i,n,n.next,o)&&T(i,o)&&T(o,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(o.i/r),A(n),A(n.next),n=t=o),n=n.next}while(n!==t);return a(n)}function u(t,e,r,n,i,s){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&v(l,c)){var u=k(l,c);return l=a(l,l.next),u=a(u,u.next),o(l,e,r,n,i,s),void o(u,e,r,n,i,s)}c=c.next}l=l.next}while(l!==t)}function f(t,e){return t.x-e.x}function h(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&m(ar.x||n.x===r.x&&p(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=k(e,t);a(e,e.next),a(r,r.next)}}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function d(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function g(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&b(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||x(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function x(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,r,n){var i=w(y(t,e,r)),a=w(y(t,e,n)),o=w(y(r,n,t)),s=w(y(r,n,e));return i!==a&&o!==s||(!(0!==i||!_(t,r,e))||(!(0!==a||!_(t,n,e))||(!(0!==o||!_(r,t,n))||!(0!==s||!_(r,e,n)))))}function _(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function w(t){return t>0?1:t<0?-1:0}function T(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function k(t,e){var r=new S(t.i,t.x,t.y),n=new S(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function M(t,e,r,n){var i=new S(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function E(t,e,r,n){for(var i=0,a=e,o=r-n;a0&&(n+=t[i-1].length,r.holes.push(n))}return r}},{}],178:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.length;if("number"!=typeof e){e=0;for(var i=0;i=e}))}(e);for(var r,i=n(t).components.filter((function(t){return t.length>1})),a=1/0,o=0;o=55296&&y<=56319&&(w+=t[++r]),w=T?h.call(T,k,w,g):w,e?(p.value=w,d(m,g,p)):m[g]=w,++g;v=g}if(void 0===v)for(v=o(t.length),e&&(m=new e(v)),r=0;r0?1:-1}},{}],190:[function(t,e,r){"use strict";var n=t("../math/sign"),i=Math.abs,a=Math.floor;e.exports=function(t){return isNaN(t)?0:0!==(t=Number(t))&&isFinite(t)?n(t)*a(i(t)):t}},{"../math/sign":187}],191:[function(t,e,r){"use strict";var n=t("./to-integer"),i=Math.max;e.exports=function(t){return i(0,n(t))}},{"./to-integer":190}],192:[function(t,e,r){"use strict";var n=t("./valid-callable"),i=t("./valid-value"),a=Function.prototype.bind,o=Function.prototype.call,s=Object.keys,l=Object.prototype.propertyIsEnumerable;e.exports=function(t,e){return function(r,c){var u,f=arguments[2],h=arguments[3];return r=Object(i(r)),n(c),u=s(r),h&&u.sort("function"==typeof h?a.call(h,r):void 0),"function"!=typeof t&&(t=u[t]),o.call(t,u,(function(t,n){return l.call(r,t)?o.call(c,f,r[t],t,r,n):e}))}}},{"./valid-callable":209,"./valid-value":211}],193:[function(t,e,r){"use strict";e.exports=t("./is-implemented")()?Object.assign:t("./shim")},{"./is-implemented":194,"./shim":195}],194:[function(t,e,r){"use strict";e.exports=function(){var t,e=Object.assign;return"function"==typeof e&&(e(t={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}},{}],195:[function(t,e,r){"use strict";var n=t("../keys"),i=t("../valid-value"),a=Math.max;e.exports=function(t,e){var r,o,s,l=a(arguments.length,2);for(t=Object(i(t)),s=function(n){try{t[n]=e[n]}catch(t){r||(r=t)}},o=1;o-1}},{}],215:[function(t,e,r){"use strict";var n=Object.prototype.toString,i=n.call("");e.exports=function(t){return"string"==typeof t||t&&"object"==typeof t&&(t instanceof String||n.call(t)===i)||!1}},{}],216:[function(t,e,r){"use strict";var n=Object.create(null),i=Math.random;e.exports=function(){var t;do{t=i().toString(36).slice(2)}while(n[t]);return t}},{}],217:[function(t,e,r){"use strict";var n,i=t("es5-ext/object/set-prototype-of"),a=t("es5-ext/string/#/contains"),o=t("d"),s=t("es6-symbol"),l=t("./"),c=Object.defineProperty;n=e.exports=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");l.call(this,t),e=e?a.call(e,"key+value")?"key+value":a.call(e,"key")?"key":"value":"value",c(this,"__kind__",o("",e))},i&&i(n,l),delete n.prototype.constructor,n.prototype=Object.create(l.prototype,{_resolve:o((function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t}))}),c(n.prototype,s.toStringTag,o("c","Array Iterator"))},{"./":220,d:155,"es5-ext/object/set-prototype-of":206,"es5-ext/string/#/contains":212,"es6-symbol":225}],218:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),i=t("es5-ext/object/valid-callable"),a=t("es5-ext/string/is-string"),o=t("./get"),s=Array.isArray,l=Function.prototype.call,c=Array.prototype.some;e.exports=function(t,e){var r,u,f,h,p,d,g,m,v=arguments[2];if(s(t)||n(t)?r="array":a(t)?r="string":t=o(t),i(e),f=function(){h=!0},"array"!==r)if("string"!==r)for(u=t.next();!u.done;){if(l.call(e,v,u.value,f),h)return;u=t.next()}else for(d=t.length,p=0;p=55296&&m<=56319&&(g+=t[++p]),l.call(e,v,g,f),!h);++p);else c.call(t,(function(t){return l.call(e,v,t,f),h}))}},{"./get":219,"es5-ext/function/is-arguments":184,"es5-ext/object/valid-callable":209,"es5-ext/string/is-string":215}],219:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),i=t("es5-ext/string/is-string"),a=t("./array"),o=t("./string"),s=t("./valid-iterable"),l=t("es6-symbol").iterator;e.exports=function(t){return"function"==typeof s(t)[l]?t[l]():n(t)?new a(t):i(t)?new o(t):new a(t)}},{"./array":217,"./string":222,"./valid-iterable":223,"es5-ext/function/is-arguments":184,"es5-ext/string/is-string":215,"es6-symbol":225}],220:[function(t,e,r){"use strict";var n,i=t("es5-ext/array/#/clear"),a=t("es5-ext/object/assign"),o=t("es5-ext/object/valid-callable"),s=t("es5-ext/object/valid-value"),l=t("d"),c=t("d/auto-bind"),u=t("es6-symbol"),f=Object.defineProperty,h=Object.defineProperties;e.exports=n=function(t,e){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");h(this,{__list__:l("w",s(t)),__context__:l("w",e),__nextIndex__:l("w",0)}),e&&(o(e.on),e.on("_add",this._onAdd),e.on("_delete",this._onDelete),e.on("_clear",this._onClear))},delete n.prototype.constructor,h(n.prototype,a({_next:l((function(){var t;if(this.__list__)return this.__redo__&&void 0!==(t=this.__redo__.shift())?t:this.__nextIndex__=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach((function(e,r){e>=t&&(this.__redo__[r]=++e)}),this),this.__redo__.push(t)):f(this,"__redo__",l("c",[t])))})),_onDelete:l((function(t){var e;t>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(e=this.__redo__.indexOf(t))&&this.__redo__.splice(e,1),this.__redo__.forEach((function(e,r){e>t&&(this.__redo__[r]=--e)}),this)))})),_onClear:l((function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0}))}))),f(n.prototype,u.iterator,l((function(){return this})))},{d:155,"d/auto-bind":154,"es5-ext/array/#/clear":180,"es5-ext/object/assign":193,"es5-ext/object/valid-callable":209,"es5-ext/object/valid-value":211,"es6-symbol":225}],221:[function(t,e,r){"use strict";var n=t("es5-ext/function/is-arguments"),i=t("es5-ext/object/is-value"),a=t("es5-ext/string/is-string"),o=t("es6-symbol").iterator,s=Array.isArray;e.exports=function(t){return!!i(t)&&(!!s(t)||(!!a(t)||(!!n(t)||"function"==typeof t[o])))}},{"es5-ext/function/is-arguments":184,"es5-ext/object/is-value":200,"es5-ext/string/is-string":215,"es6-symbol":225}],222:[function(t,e,r){"use strict";var n,i=t("es5-ext/object/set-prototype-of"),a=t("d"),o=t("es6-symbol"),s=t("./"),l=Object.defineProperty;n=e.exports=function(t){if(!(this instanceof n))throw new TypeError("Constructor requires 'new'");t=String(t),s.call(this,t),l(this,"__length__",a("",t.length))},i&&i(n,s),delete n.prototype.constructor,n.prototype=Object.create(s.prototype,{_next:a((function(){if(this.__list__)return this.__nextIndex__=55296&&e<=56319?r+this.__list__[this.__nextIndex__++]:r}))}),l(n.prototype,o.toStringTag,a("c","String Iterator"))},{"./":220,d:155,"es5-ext/object/set-prototype-of":206,"es6-symbol":225}],223:[function(t,e,r){"use strict";var n=t("./is-iterable");e.exports=function(t){if(!n(t))throw new TypeError(t+" is not iterable");return t}},{"./is-iterable":221}],224:[function(t,e,r){(function(n,i){(function(){ -/*! - * @overview es6-promise - a tiny implementation of Promises/A+. - * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) - * @license Licensed under MIT license - * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE - * @version v4.2.8+1e68dce6 - */ -!function(t,n){"object"==typeof r&&"undefined"!=typeof e?e.exports=n():t.ES6Promise=n()}(this,(function(){"use strict";function e(t){return"function"==typeof t}var r=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=0,o=void 0,s=void 0,l=function(t,e){g[a]=t,g[a+1]=e,2===(a+=2)&&(s?s(m):_())};var c="undefined"!=typeof window?window:void 0,u=c||{},f=u.MutationObserver||u.WebKitMutationObserver,h="undefined"==typeof self&&"undefined"!=typeof n&&"[object process]"==={}.toString.call(n),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function d(){var t=setTimeout;return function(){return t(m,1)}}var g=new Array(1e3);function m(){for(var t=0;t=r-1){h=l.length-1;var d=t-e[r-1];for(p=0;p=r-1)for(var u=s.length-1,f=(e[r-1],0);f=0;--r)if(t[--e])return!1;return!0},s.jump=function(t){var e=this.lastT(),r=this.dimension;if(!(t0;--f)n.push(a(l[f-1],c[f-1],arguments[f])),i.push(0)}},s.push=function(t){var e=this.lastT(),r=this.dimension;if(!(t1e-6?1/s:0;this._time.push(t);for(var h=r;h>0;--h){var p=a(c[h-1],u[h-1],arguments[h]);n.push(p),i.push((p-n[o++])*f)}}},s.set=function(t){var e=this.dimension;if(!(t0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(t){var e=this.lastT(),r=this.dimension;if(!(t<=e||arguments.length!==r+1)){var n=this._state,i=this._velocity,o=n.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=t-e,f=u>1e-6?1/u:0;this._time.push(t);for(var h=r;h>0;--h){var p=arguments[h];n.push(a(l[h-1],c[h-1],n[o++]+p)),i.push(p*f)}}},s.idle=function(t){var e=this.lastT();if(!(t=0;--f)n.push(a(l[f],c[f],n[o]+u*i[o])),i.push(0),o+=1}}},{"binary-search-bounds":243,"cubic-hermite":150}],243:[function(t,e,r){"use strict";function n(t,e,r,n,i,a){var o=["function ",t,"(a,l,h,",n.join(","),"){",a?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a",i?".get(m)":"[m]"];return a?e.indexOf("c")<0?o.push(";if(x===y){return m}else if(x<=y){"):o.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):o.push(";if(",e,"){i=m;"),r?o.push("l=m+1}else{h=m-1}"):o.push("h=m-1}else{l=m+1}"),o.push("}"),a?o.push("return -1};"):o.push("return i};"),o.join("")}function i(t,e,r,i){return new Function([n("A","x"+t+"y",e,["y"],!1,i),n("B","x"+t+"y",e,["y"],!0,i),n("P","c(x,y)"+t+"0",e,["y","c"],!1,i),n("Q","c(x,y)"+t+"0",e,["y","c"],!0,i),"function dispatchBsearch",r,"(a,y,c,l,h){if(a.shape){if(typeof(c)==='function'){return Q(a,(l===undefined)?0:l|0,(h===undefined)?a.shape[0]-1:h|0,y,c)}else{return B(a,(c===undefined)?0:c|0,(l===undefined)?a.shape[0]-1:l|0,y)}}else{if(typeof(c)==='function'){return P(a,(l===undefined)?0:l|0,(h===undefined)?a.length-1:h|0,y,c)}else{return A(a,(c===undefined)?0:c|0,(l===undefined)?a.length-1:l|0,y)}}}return dispatchBsearch",r].join(""))()}e.exports={ge:i(">=",!1,"GE"),gt:i(">",!1,"GT"),lt:i("<",!0,"LT"),le:i("<=",!0,"LE"),eq:i("-",!0,"EQ",!0)}},{}],244:[function(t,e,r){var n=t("dtype");e.exports=function(t,e,r){if(!t)throw new TypeError("must specify data as first parameter");if(r=0|+(r||0),Array.isArray(t)&&t[0]&&"number"==typeof t[0][0]){var i,a,o,s,l=t[0].length,c=t.length*l;e&&"string"!=typeof e||(e=new(n(e||"float32"))(c+r));var u=e.length-r;if(c!==u)throw new Error("source length "+c+" ("+l+"x"+t.length+") does not match destination length "+u);for(i=0,o=r;ie[0]-o[0]/2&&(h=o[0]/2,p+=o[1]);return r}},{"css-font/stringify":147}],246:[function(t,e,r){"use strict";function n(t,e){e||(e={}),("string"==typeof t||Array.isArray(t))&&(e.family=t);var r=Array.isArray(e.family)?e.family.join(", "):e.family;if(!r)throw Error("`family` must be defined");var s=e.size||e.fontSize||e.em||48,l=e.weight||e.fontWeight||"",c=(t=[e.style||e.fontStyle||"",l,s].join(" ")+"px "+r,e.origin||"top");if(n.cache[r]&&s<=n.cache[r].em)return i(n.cache[r],c);var u=e.canvas||n.canvas,f=u.getContext("2d"),h={upper:void 0!==e.upper?e.upper:"H",lower:void 0!==e.lower?e.lower:"x",descent:void 0!==e.descent?e.descent:"p",ascent:void 0!==e.ascent?e.ascent:"h",tittle:void 0!==e.tittle?e.tittle:"i",overshoot:void 0!==e.overshoot?e.overshoot:"O"},p=Math.ceil(1.5*s);u.height=p,u.width=.5*p,f.font=t;var d={top:0};f.clearRect(0,0,p,p),f.textBaseline="top",f.fillStyle="black",f.fillText("H",0,0);var g=a(f.getImageData(0,0,p,p));f.clearRect(0,0,p,p),f.textBaseline="bottom",f.fillText("H",0,p);var m=a(f.getImageData(0,0,p,p));d.lineHeight=d.bottom=p-m+g,f.clearRect(0,0,p,p),f.textBaseline="alphabetic",f.fillText("H",0,p);var v=p-a(f.getImageData(0,0,p,p))-1+g;d.baseline=d.alphabetic=v,f.clearRect(0,0,p,p),f.textBaseline="middle",f.fillText("H",0,.5*p);var y=a(f.getImageData(0,0,p,p));d.median=d.middle=p-y-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline="hanging",f.fillText("H",0,.5*p);var x=a(f.getImageData(0,0,p,p));d.hanging=p-x-1+g-.5*p,f.clearRect(0,0,p,p),f.textBaseline="ideographic",f.fillText("H",0,p);var b=a(f.getImageData(0,0,p,p));if(d.ideographic=p-b-1+g,h.upper&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.upper,0,0),d.upper=a(f.getImageData(0,0,p,p)),d.capHeight=d.baseline-d.upper),h.lower&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.lower,0,0),d.lower=a(f.getImageData(0,0,p,p)),d.xHeight=d.baseline-d.lower),h.tittle&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.tittle,0,0),d.tittle=a(f.getImageData(0,0,p,p))),h.ascent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.ascent,0,0),d.ascent=a(f.getImageData(0,0,p,p))),h.descent&&(f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.descent,0,0),d.descent=o(f.getImageData(0,0,p,p))),h.overshoot){f.clearRect(0,0,p,p),f.textBaseline="top",f.fillText(h.overshoot,0,0);var _=o(f.getImageData(0,0,p,p));d.overshoot=_-v}for(var w in d)d[w]/=s;return d.em=s,n.cache[r]=d,i(d,c)}function i(t,e){var r={};for(var n in"string"==typeof e&&(e=t[e]),t)"em"!==n&&(r[n]=t[n]-e);return r}function a(t){for(var e=t.height,r=t.data,n=3;n0;n-=4)if(0!==r[n])return Math.floor(.25*(n-3)/e)}e.exports=n,n.canvas=document.createElement("canvas"),n.cache={}},{}],247:[function(t,e,r){"use strict";e.exports=function(t){return new s(t||g,null)};function n(t,e,r,n,i,a){this._color=t,this.key=e,this.value=r,this.left=n,this.right=i,this._count=a}function i(t){return new n(t._color,t.key,t.value,t.left,t.right,t._count)}function a(t,e){return new n(t,e.key,e.value,e.left,e.right,e._count)}function o(t){t._count=1+(t.left?t.left._count:0)+(t.right?t.right._count:0)}function s(t,e){this._compare=t,this.root=e}var l=s.prototype;function c(t,e){var r;if(e.left&&(r=c(t,e.left)))return r;return(r=t(e.key,e.value))||(e.right?c(t,e.right):void 0)}function u(t,e,r,n){if(e(t,n.key)<=0){var i;if(n.left)if(i=u(t,e,r,n.left))return i;if(i=r(n.key,n.value))return i}if(n.right)return u(t,e,r,n.right)}function f(t,e,r,n,i){var a,o=r(t,i.key),s=r(e,i.key);if(o<=0){if(i.left&&(a=f(t,e,r,n,i.left)))return a;if(s>0&&(a=n(i.key,i.value)))return a}if(s>0&&i.right)return f(t,e,r,n,i.right)}function h(t,e){this.tree=t,this._stack=e}Object.defineProperty(l,"keys",{get:function(){var t=[];return this.forEach((function(e,r){t.push(e)})),t}}),Object.defineProperty(l,"values",{get:function(){var t=[];return this.forEach((function(e,r){t.push(r)})),t}}),Object.defineProperty(l,"length",{get:function(){return this.root?this.root._count:0}}),l.insert=function(t,e){for(var r=this._compare,i=this.root,l=[],c=[];i;){var u=r(t,i.key);l.push(i),c.push(u),i=u<=0?i.left:i.right}l.push(new n(0,t,e,null,null,1));for(var f=l.length-2;f>=0;--f){i=l[f];c[f]<=0?l[f]=new n(i._color,i.key,i.value,l[f+1],i.right,i._count+1):l[f]=new n(i._color,i.key,i.value,i.left,l[f+1],i._count+1)}for(f=l.length-1;f>1;--f){var h=l[f-1];i=l[f];if(1===h._color||1===i._color)break;var p=l[f-2];if(p.left===h)if(h.left===i){if(!(d=p.right)||0!==d._color){if(p._color=0,p.left=h.right,h._color=1,h.right=p,l[f-2]=h,l[f-1]=i,o(p),o(h),f>=3)(g=l[f-3]).left===p?g.left=h:g.right=h;break}h._color=1,p.right=a(1,d),p._color=0,f-=1}else{if(!(d=p.right)||0!==d._color){if(h.right=i.left,p._color=0,p.left=i.right,i._color=1,i.left=h,i.right=p,l[f-2]=i,l[f-1]=h,o(p),o(h),o(i),f>=3)(g=l[f-3]).left===p?g.left=i:g.right=i;break}h._color=1,p.right=a(1,d),p._color=0,f-=1}else if(h.right===i){if(!(d=p.left)||0!==d._color){if(p._color=0,p.right=h.left,h._color=1,h.left=p,l[f-2]=h,l[f-1]=i,o(p),o(h),f>=3)(g=l[f-3]).right===p?g.right=h:g.left=h;break}h._color=1,p.left=a(1,d),p._color=0,f-=1}else{var d;if(!(d=p.left)||0!==d._color){var g;if(h.left=i.right,p._color=0,p.right=i.left,i._color=1,i.right=h,i.left=p,l[f-2]=i,l[f-1]=h,o(p),o(h),o(i),f>=3)(g=l[f-3]).right===p?g.right=i:g.left=i;break}h._color=1,p.left=a(1,d),p._color=0,f-=1}}return l[0]._color=1,new s(r,l[0])},l.forEach=function(t,e,r){if(this.root)switch(arguments.length){case 1:return c(t,this.root);case 2:return u(e,this._compare,t,this.root);case 3:if(this._compare(e,r)>=0)return;return f(e,r,this._compare,t,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.left;return new h(this,t)}}),Object.defineProperty(l,"end",{get:function(){for(var t=[],e=this.root;e;)t.push(e),e=e.right;return new h(this,t)}}),l.at=function(t){if(t<0)return new h(this,[]);for(var e=this.root,r=[];;){if(r.push(e),e.left){if(t=e.right._count)break;e=e.right}return new h(this,[])},l.ge=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},l.gt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},l.lt=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new h(this,n)},l.le=function(t){for(var e=this._compare,r=this.root,n=[],i=0;r;){var a=e(t,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new h(this,n)},l.find=function(t){for(var e=this._compare,r=this.root,n=[];r;){var i=e(t,r.key);if(n.push(r),0===i)return new h(this,n);r=i<=0?r.left:r.right}return new h(this,[])},l.remove=function(t){var e=this.find(t);return e?e.remove():this},l.get=function(t){for(var e=this._compare,r=this.root;r;){var n=e(t,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var p=h.prototype;function d(t,e){t.key=e.key,t.value=e.value,t.left=e.left,t.right=e.right,t._color=e._color,t._count=e._count}function g(t,e){return te?1:0}Object.defineProperty(p,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(p,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),p.clone=function(){return new h(this.tree,this._stack.slice())},p.remove=function(){var t=this._stack;if(0===t.length)return this.tree;var e=new Array(t.length),r=t[t.length-1];e[e.length-1]=new n(r._color,r.key,r.value,r.left,r.right,r._count);for(var l=t.length-2;l>=0;--l){(r=t[l]).left===t[l+1]?e[l]=new n(r._color,r.key,r.value,e[l+1],r.right,r._count):e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count)}if((r=e[e.length-1]).left&&r.right){var c=e.length;for(r=r.left;r.right;)e.push(r),r=r.right;var u=e[c-1];e.push(new n(r._color,u.key,u.value,r.left,r.right,r._count)),e[c-1].key=r.key,e[c-1].value=r.value;for(l=e.length-2;l>=c;--l)r=e[l],e[l]=new n(r._color,r.key,r.value,r.left,e[l+1],r._count);e[c-1].left=e[c]}if(0===(r=e[e.length-1])._color){var f=e[e.length-2];f.left===r?f.left=null:f.right===r&&(f.right=null),e.pop();for(l=0;l=0;--l){if(e=t[l],0===l)return void(e._color=1);if((r=t[l-1]).left===e){if((n=r.right).right&&0===n.right._color){if(s=(n=r.right=i(n)).right=i(n.right),r.right=n.left,n.left=r,n.right=s,n._color=r._color,e._color=1,r._color=1,s._color=1,o(r),o(n),l>1)(c=t[l-2]).left===r?c.left=n:c.right=n;return void(t[l-1]=n)}if(n.left&&0===n.left._color){if(s=(n=r.right=i(n)).left=i(n.left),r.right=s.left,n.left=s.right,s.left=r,s.right=n,s._color=r._color,r._color=1,n._color=1,e._color=1,o(r),o(n),o(s),l>1)(c=t[l-2]).left===r?c.left=s:c.right=s;return void(t[l-1]=s)}if(1===n._color){if(0===r._color)return r._color=1,void(r.right=a(0,n));r.right=a(0,n);continue}n=i(n),r.right=n.left,n.left=r,n._color=r._color,r._color=0,o(r),o(n),l>1&&((c=t[l-2]).left===r?c.left=n:c.right=n),t[l-1]=n,t[l]=r,l+11)(c=t[l-2]).right===r?c.right=n:c.left=n;return void(t[l-1]=n)}if(n.right&&0===n.right._color){if(s=(n=r.left=i(n)).right=i(n.right),r.left=s.right,n.right=s.left,s.right=r,s.left=n,s._color=r._color,r._color=1,n._color=1,e._color=1,o(r),o(n),o(s),l>1)(c=t[l-2]).right===r?c.right=s:c.left=s;return void(t[l-1]=s)}if(1===n._color){if(0===r._color)return r._color=1,void(r.left=a(0,n));r.left=a(0,n);continue}var c;n=i(n),r.left=n.right,n.right=r,n._color=r._color,r._color=0,o(r),o(n),l>1&&((c=t[l-2]).right===r?c.right=n:c.left=n),t[l-1]=n,t[l]=r,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(p,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(p,"index",{get:function(){var t=0,e=this._stack;if(0===e.length){var r=this.tree.root;return r?r._count:0}e[e.length-1].left&&(t=e[e.length-1].left._count);for(var n=e.length-2;n>=0;--n)e[n+1]===e[n].right&&(++t,e[n].left&&(t+=e[n].left._count));return t},enumerable:!0}),p.next=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.right)for(e=e.right;e;)t.push(e),e=e.left;else for(t.pop();t.length>0&&t[t.length-1].right===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(p,"hasNext",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].right)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].left===t[e])return!0;return!1}}),p.update=function(t){var e=this._stack;if(0===e.length)throw new Error("Can't update empty node!");var r=new Array(e.length),i=e[e.length-1];r[r.length-1]=new n(i._color,i.key,t,i.left,i.right,i._count);for(var a=e.length-2;a>=0;--a)(i=e[a]).left===e[a+1]?r[a]=new n(i._color,i.key,i.value,r[a+1],i.right,i._count):r[a]=new n(i._color,i.key,i.value,i.left,r[a+1],i._count);return new s(this.tree._compare,r[0])},p.prev=function(){var t=this._stack;if(0!==t.length){var e=t[t.length-1];if(e.left)for(e=e.left;e;)t.push(e),e=e.right;else for(t.pop();t.length>0&&t[t.length-1].left===e;)e=t[t.length-1],t.pop()}},Object.defineProperty(p,"hasPrev",{get:function(){var t=this._stack;if(0===t.length)return!1;if(t[t.length-1].left)return!0;for(var e=t.length-1;e>0;--e)if(t[e-1].right===t[e])return!0;return!1}})},{}],248:[function(t,e,r){var n=[.9999999999998099,676.5203681218851,-1259.1392167224028,771.3234287776531,-176.6150291621406,12.507343278686905,-.13857109526572012,9984369578019572e-21,1.5056327351493116e-7],i=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];function a(t){if(t<0)return Number("0/0");for(var e=i[0],r=i.length-1;r>0;--r)e+=i[r]/(t+r);var n=t+607/128+.5;return.5*Math.log(2*Math.PI)+(t+.5)*Math.log(n)-n+Math.log(e)-Math.log(t)}e.exports=function t(e){if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*t(1-e));if(e>100)return Math.exp(a(e));e-=1;for(var r=n[0],i=1;i<9;i++)r+=n[i]/(e+i);var o=e+7+.5;return Math.sqrt(2*Math.PI)*Math.pow(o,e+.5)*Math.exp(-o)*r},e.exports.log=a},{}],249:[function(t,e,r){e.exports=function(t,e){if("string"!=typeof t)throw new TypeError("must specify type string");if(e=e||{},"undefined"==typeof document&&!e.canvas)return null;var r=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(r.width=e.width);"number"==typeof e.height&&(r.height=e.height);var n,i=e;try{var a=[t];0===t.indexOf("webgl")&&a.push("experimental-"+t);for(var o=0;o0?(p[u]=-1,d[u]=0):(p[u]=0,d[u]=1)}}var g=[0,0,0],m={model:l,view:l,projection:l,_ortho:!1};f.isOpaque=function(){return!0},f.isTransparent=function(){return!1},f.drawTransparent=function(t){};var v=[0,0,0],y=[0,0,0],x=[0,0,0];f.draw=function(t){t=t||m;for(var e=this.gl,r=t.model||l,n=t.view||l,i=t.projection||l,a=this.bounds,s=t._ortho||!1,u=o(r,n,i,a,s),f=u.cubeEdges,h=u.axis,b=n[12],_=n[13],w=n[14],T=n[15],k=(s?2:1)*this.pixelRatio*(i[3]*b+i[7]*_+i[11]*w+i[15]*T)/e.drawingBufferHeight,M=0;M<3;++M)this.lastCubeProps.cubeEdges[M]=f[M],this.lastCubeProps.axis[M]=h[M];var A=p;for(M=0;M<3;++M)d(p[M],M,this.bounds,f,h);e=this.gl;var S,E=g;for(M=0;M<3;++M)this.backgroundEnable[M]?E[M]=h[M]:E[M]=0;this._background.draw(r,n,i,a,E,this.backgroundColor),this._lines.bind(r,n,i,this);for(M=0;M<3;++M){var C=[0,0,0];h[M]>0?C[M]=a[1][M]:C[M]=a[0][M];for(var L=0;L<2;++L){var I=(M+1+L)%3,P=(M+1+(1^L))%3;this.gridEnable[I]&&this._lines.drawGrid(I,P,this.bounds,C,this.gridColor[I],this.gridWidth[I]*this.pixelRatio)}for(L=0;L<2;++L){I=(M+1+L)%3,P=(M+1+(1^L))%3;this.zeroEnable[P]&&Math.min(a[0][P],a[1][P])<=0&&Math.max(a[0][P],a[1][P])>=0&&this._lines.drawZero(I,P,this.bounds,C,this.zeroLineColor[P],this.zeroLineWidth[P]*this.pixelRatio)}}for(M=0;M<3;++M){this.lineEnable[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].primalOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio),this.lineMirror[M]&&this._lines.drawAxisLine(M,this.bounds,A[M].mirrorOffset,this.lineColor[M],this.lineWidth[M]*this.pixelRatio);var z=c(v,A[M].primalMinor),O=c(y,A[M].mirrorMinor),D=this.lineTickLength;for(L=0;L<3;++L){var R=k/r[5*L];z[L]*=D[L]*R,O[L]*=D[L]*R}this.lineTickEnable[M]&&this._lines.drawAxisTicks(M,A[M].primalOffset,z,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio),this.lineTickMirror[M]&&this._lines.drawAxisTicks(M,A[M].mirrorOffset,O,this.lineTickColor[M],this.lineTickWidth[M]*this.pixelRatio)}this._lines.unbind(),this._text.bind(r,n,i,this.pixelRatio);var F,B;function N(t){(B=[0,0,0])[t]=1}function j(t,e,r){var n=(t+1)%3,i=(t+2)%3,a=e[n],o=e[i],s=r[n],l=r[i];a>0&&l>0||a>0&&l<0||a<0&&l>0||a<0&&l<0?N(n):(o>0&&s>0||o>0&&s<0||o<0&&s>0||o<0&&s<0)&&N(i)}for(M=0;M<3;++M){var U=A[M].primalMinor,V=A[M].mirrorMinor,q=c(x,A[M].primalOffset);for(L=0;L<3;++L)this.lineTickEnable[M]&&(q[L]+=k*U[L]*Math.max(this.lineTickLength[L],0)/r[5*L]);var H=[0,0,0];if(H[M]=1,this.tickEnable[M]){-3600===this.tickAngle[M]?(this.tickAngle[M]=0,this.tickAlign[M]="auto"):this.tickAlign[M]=-1,F=1,"auto"===(S=[this.tickAlign[M],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]),B=[0,0,0],j(M,U,V);for(L=0;L<3;++L)q[L]+=k*U[L]*this.tickPad[L]/r[5*L];this._text.drawTicks(M,this.tickSize[M],this.tickAngle[M],q,this.tickColor[M],H,B,S)}if(this.labelEnable[M]){F=0,B=[0,0,0],this.labels[M].length>4&&(N(M),F=1),"auto"===(S=[this.labelAlign[M],.5,F])[0]?S[0]=0:S[0]=parseInt(""+S[0]);for(L=0;L<3;++L)q[L]+=k*U[L]*this.labelPad[L]/r[5*L];q[M]+=.5*(a[0][M]+a[1][M]),this._text.drawLabel(M,this.labelSize[M],this.labelAngle[M],q,this.labelColor[M],[0,0,0],B,S)}}this._text.unbind()},f.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},{"./lib/background.js":251,"./lib/cube.js":252,"./lib/lines.js":253,"./lib/text.js":255,"./lib/ticks.js":256}],251:[function(t,e,r){"use strict";e.exports=function(t){for(var e=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,f=[0,0,0],h=[0,0,0],p=-1;p<=1;p+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),f[l]=p,h[l]=p;for(var d=-1;d<=1;d+=2){f[c]=d;for(var g=-1;g<=1;g+=2)f[u]=g,e.push(f[0],f[1],f[2],h[0],h[1],h[2]),s+=1}var m=c;c=u,u=m}var v=n(t,new Float32Array(e)),y=n(t,new Uint16Array(r),t.ELEMENT_ARRAY_BUFFER),x=i(t,[{buffer:v,type:t.FLOAT,size:3,offset:0,stride:24},{buffer:v,type:t.FLOAT,size:3,offset:12,stride:24}],y),b=a(t);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(t,v,x,b)};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders").bg;function o(t,e,r,n){this.gl=t,this.buffer=e,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(t,e,r,n,i,a){for(var o=!1,s=0;s<3;++s)o=o||i[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:t,view:e,projection:r,bounds:n,enable:i,colors:a},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),l.disable(l.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},{"./shaders":254,"gl-buffer":259,"gl-vao":358}],252:[function(t,e,r){"use strict";e.exports=function(t,e,r,a,p){i(s,e,t),i(s,r,s);for(var y=0,x=0;x<2;++x){u[2]=a[x][2];for(var b=0;b<2;++b){u[1]=a[b][1];for(var _=0;_<2;++_)u[0]=a[_][0],h(l[y],u,s),y+=1}}var w=-1;for(x=0;x<8;++x){for(var T=l[x][3],k=0;k<3;++k)c[x][k]=l[x][k]/T;p&&(c[x][2]*=-1),T<0&&(w<0||c[x][2]E&&(w|=1<E&&(w|=1<c[x][1])&&(R=x);var F=-1;for(x=0;x<3;++x){if((N=R^1<c[B][0]&&(B=N)}var j=g;j[0]=j[1]=j[2]=0,j[n.log2(F^R)]=R&F,j[n.log2(R^B)]=R&B;var U=7^B;U===w||U===D?(U=7^F,j[n.log2(B^U)]=U&B):j[n.log2(F^U)]=U&F;var V=m,q=w;for(M=0;M<3;++M)V[M]=q&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ?\n b - PI :\n b;\n}\n\nfloat look_horizontal_or_vertical(float a, float ratio) {\n // ratio controls the ratio between being horizontal to (vertical + horizontal)\n // if ratio is set to 0.5 then it is 50%, 50%.\n // when using a higher ratio e.g. 0.75 the result would\n // likely be more horizontal than vertical.\n\n float b = positive_angle(a);\n\n return\n (b < ( ratio) * HALF_PI) ? 0.0 :\n (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI :\n (b < (2.0 + ratio) * HALF_PI) ? 0.0 :\n (b < (4.0 - ratio) * HALF_PI) ? HALF_PI :\n 0.0;\n}\n\nfloat roundTo(float a, float b) {\n return float(b * floor((a + 0.5 * b) / b));\n}\n\nfloat look_round_n_directions(float a, int n) {\n float b = positive_angle(a);\n float div = TWO_PI / float(n);\n float c = roundTo(b, div);\n return look_upwards(c);\n}\n\nfloat applyAlignOption(float rawAngle, float delta) {\n return\n (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions\n (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical\n (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis\n (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards\n (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal\n rawAngle; // otherwise return back raw input angle\n}\n\nbool isAxisTitle = (axis.x == 0.0) &&\n (axis.y == 0.0) &&\n (axis.z == 0.0);\n\nvoid main() {\n //Compute world offset\n float axisDistance = position.z;\n vec3 dataPosition = axisDistance * axis + offset;\n\n float beta = angle; // i.e. user defined attributes for each tick\n\n float axisAngle;\n float clipAngle;\n float flip;\n\n if (enableAlign) {\n axisAngle = (isAxisTitle) ? HALF_PI :\n computeViewAngle(dataPosition, dataPosition + axis);\n clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir);\n\n axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0;\n clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0;\n\n flip = (dot(vec2(cos(axisAngle), sin(axisAngle)),\n vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0;\n\n beta += applyAlignOption(clipAngle, flip * PI);\n }\n\n //Compute plane offset\n vec2 planeCoord = position.xy * pixelScale;\n\n mat2 planeXform = scale * mat2(\n cos(beta), sin(beta),\n -sin(beta), cos(beta)\n );\n\n vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution;\n\n //Compute clip position\n vec3 clipPosition = project(dataPosition);\n\n //Apply text offset in clip coordinates\n clipPosition += vec3(viewOffset, 0.0);\n\n //Done\n gl_Position = vec4(clipPosition, 1.0);\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n gl_FragColor = color;\n}"]);r.text=function(t){return i(t,s,l,null,[{name:"position",type:"vec3"}])};var c=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec3 normal;\n\nuniform mat4 model, view, projection;\nuniform vec3 enable;\nuniform vec3 bounds[2];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n\n vec3 signAxis = sign(bounds[1] - bounds[0]);\n\n vec3 realNormal = signAxis * normal;\n\n if(dot(realNormal, enable) > 0.0) {\n vec3 minRange = min(bounds[0], bounds[1]);\n vec3 maxRange = max(bounds[0], bounds[1]);\n vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0));\n gl_Position = projection * view * model * vec4(nPosition, 1.0);\n } else {\n gl_Position = vec4(0,0,0,0);\n }\n\n colorChannel = abs(realNormal);\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 colors[3];\n\nvarying vec3 colorChannel;\n\nvoid main() {\n gl_FragColor = colorChannel.x * colors[0] +\n colorChannel.y * colors[1] +\n colorChannel.z * colors[2];\n}"]);r.bg=function(t){return i(t,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},{"gl-shader":335,glslify:257}],255:[function(t,e,r){(function(r){(function(){"use strict";e.exports=function(t,e,r,a,s,l){var u=n(t),f=i(t,[{buffer:u,size:3}]),h=o(t);h.attributes.position.location=0;var p=new c(t,h,u,f);return p.update(e,r,a,s,l),p};var n=t("gl-buffer"),i=t("gl-vao"),a=t("vectorize-text"),o=t("./shaders").text,s=window||r.global||{},l=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};function c(t,e,r,n){this.gl=t,this.shader=e,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var u=c.prototype,f=[0,0];u.bind=function(t,e,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=t,i.view=e,i.projection=r,i.pixelScale=n,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},u.unbind=function(){this.vao.unbind()},u.update=function(t,e,r,n,i){var o=[];function s(t,e,r,n,i,s){var c=l[r];c||(c=l[r]={});var u=c[e];u||(u=c[e]=function(t,e){try{return a(t,e)}catch(e){return console.warn('error vectorizing text:"'+t+'" error:',e),{cells:[],positions:[]}}}(e,{triangles:!0,font:r,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,h=u.positions,p=u.cells,d=0,g=p.length;d=0;--v){var y=h[m[v]];o.push(f*y[0],-f*y[1],t)}}for(var c=[0,0,0],u=[0,0,0],f=[0,0,0],h=[0,0,0],p={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},d=0;d<3;++d){f[d]=o.length/3|0,s(.5*(t[0][d]+t[1][d]),e[d],r[d],12,1.25,p),h[d]=(o.length/3|0)-f[d],c[d]=o.length/3|0;for(var g=0;g=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(t*e*a),s=o+"";if(s.indexOf("e")>=0)return s;var l=o/a,c=o%a;o<0?(l=0|-Math.ceil(l),c=0|-c):(l=0|Math.floor(l),c|=0);var u=""+l;if(o<0&&(u="-"+u),i){for(var f=""+c;f.length=t[0][i];--o)a.push({x:o*e[i],text:n(e[i],o)});r.push(a)}return r},r.equal=function(t,e){for(var r=0;r<3;++r){if(t[r].length!==e[r].length)return!1;for(var n=0;nr)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return t.bufferSubData(e,a,i),r}function u(t,e){for(var r=n.malloc(t.length,e),i=t.length,a=0;a=0;--n){if(e[n]!==r)return!1;r*=t[n]}return!0}(t.shape,t.stride))0===t.offset&&t.data.length===t.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,t.data,e):this.length=c(this.gl,this.type,this.length,this.usage,t.data.subarray(t.offset,t.shape[0]),e);else{var s=n.malloc(t.size,r),l=a(s,t.shape);i.assign(l,t),this.length=c(this.gl,this.type,this.length,this.usage,e<0?s:s.subarray(0,t.size),e),n.free(s)}}else if(Array.isArray(t)){var f;f=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(t,"uint16"):u(t,"float32"),this.length=c(this.gl,this.type,this.length,this.usage,e<0?f:f.subarray(0,t.length),e),n.free(f)}else if("object"==typeof t&&"number"==typeof t.length)this.length=c(this.gl,this.type,this.length,this.usage,t,e);else{if("number"!=typeof t&&void 0!==t)throw new Error("gl-buffer: Invalid data type");if(e>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(t|=0)<=0&&(t=1),this.gl.bufferData(this.type,0|t,this.usage),this.length=t}},e.exports=function(t,e,r,n){if(r=r||t.ARRAY_BUFFER,n=n||t.DYNAMIC_DRAW,r!==t.ARRAY_BUFFER&&r!==t.ELEMENT_ARRAY_BUFFER)throw new Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==t.DYNAMIC_DRAW&&n!==t.STATIC_DRAW&&n!==t.STREAM_DRAW)throw new Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=t.createBuffer(),a=new s(t,r,i,0,n);return a.update(e),a}},{ndarray:495,"ndarray-ops":490,"typedarray-pool":595}],260:[function(t,e,r){"use strict";var n=t("gl-vec3");e.exports=function(t,e){var r=t.positions,i=t.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:t.vertexIntensityBounds,vectors:[],cells:[],coneOffset:t.coneOffset,colormap:t.colormap};if(0===t.positions.length)return e&&(e[0]=[0,0,0],e[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,f=1/0,h=-1/0,p=null,d=null,g=[],m=1/0,v=!1,y=0;yo&&(o=n.length(b)),y){var _=2*n.distance(p,x)/(n.length(d)+n.length(b));_?(m=Math.min(m,_),v=!1):v=!0}v||(p=x,d=b),g.push(b)}var w=[s,c,f],T=[l,u,h];e&&(e[0]=w,e[1]=T),0===o&&(o=1);var k=1/o;isFinite(m)||(m=1),a.vectorScale=m;var M=t.coneSize||.5;t.absoluteConeSize&&(M=t.absoluteConeSize*k),a.coneScale=M;y=0;for(var A=0;y=1},p.isTransparent=function(){return this.opacity<1},p.pickSlots=1,p.setPickBase=function(t){this.pickId=t},p.update=function(t){t=t||{};var e=this.gl;this.dirty=!0,"lightPosition"in t&&(this.lightPosition=t.lightPosition),"opacity"in t&&(this.opacity=t.opacity),"ambient"in t&&(this.ambientLight=t.ambient),"diffuse"in t&&(this.diffuseLight=t.diffuse),"specular"in t&&(this.specularLight=t.specular),"roughness"in t&&(this.roughness=t.roughness),"fresnel"in t&&(this.fresnel=t.fresnel),void 0!==t.tubeScale&&(this.tubeScale=t.tubeScale),void 0!==t.vectorScale&&(this.vectorScale=t.vectorScale),void 0!==t.coneScale&&(this.coneScale=t.coneScale),void 0!==t.coneOffset&&(this.coneOffset=t.coneOffset),t.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=e.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=e.LINEAR,this.texture.setPixels(function(t){for(var e=u({colormap:t,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=e[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(t.colormap)),this.texture.generateMipmap());var r=t.cells,n=t.positions,i=t.vectors;if(n&&r&&i){var a=[],o=[],s=[],l=[],f=[];this.cells=r,this.positions=n,this.vectors=i;var h=t.meshColor||[1,1,1,1],p=t.vertexIntensity,d=1/0,g=-1/0;if(p)if(t.vertexIntensityBounds)d=+t.vertexIntensityBounds[0],g=+t.vertexIntensityBounds[1];else for(var m=0;m0){var g=this.triShader;g.bind(),g.uniforms=c,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},p.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||f,n=t.view||f,i=t.projection||f,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},l=this.pickShader;l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},p.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=e),i},p.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.pickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleVectors.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleIds.dispose()},e.exports=function(t,e,r){var n=r.shaders;1===arguments.length&&(t=(e=t).gl);var s=d(t,n),l=g(t,n),u=o(t,c(new Uint8Array([255,255,255,255]),[1,1,4]));u.generateMipmap(),u.minFilter=t.LINEAR_MIPMAP_LINEAR,u.magFilter=t.LINEAR;var f=i(t),p=i(t),m=i(t),v=i(t),y=i(t),x=a(t,[{buffer:f,type:t.FLOAT,size:4},{buffer:y,type:t.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:m,type:t.FLOAT,size:4},{buffer:v,type:t.FLOAT,size:2},{buffer:p,type:t.FLOAT,size:4}]),b=new h(t,u,s,l,f,p,y,m,v,x,r.traceType||"cone");return b.update(e),b}},{colormap:131,"gl-buffer":259,"gl-mat4/invert":293,"gl-mat4/multiply":295,"gl-shader":335,"gl-texture2d":353,"gl-vao":358,ndarray:495}],262:[function(t,e,r){var n=t("glslify"),i=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec3 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, coneScale, coneOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * conePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(conePosition, 1.0);\n vec4 t_position = view * conePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = conePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the cone vertex and normal at the given index.\n//\n// The returned vertex is for a cone with its top at origin and height of 1.0,\n// pointing in the direction of the vector attribute.\n//\n// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices.\n// These vertices are used to make up the triangles of the cone by the following:\n// segment + 0 top vertex\n// segment + 1 perimeter vertex a+1\n// segment + 2 perimeter vertex a\n// segment + 3 center base vertex\n// segment + 4 perimeter vertex a\n// segment + 5 perimeter vertex a+1\n// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment.\n// To go from index to segment, floor(index / 6)\n// To go from segment to angle, 2*pi * (segment/segmentCount)\n// To go from index to segment index, index - (segment*6)\n//\nvec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) {\n\n const float segmentCount = 8.0;\n\n float index = rawIndex - floor(rawIndex /\n (segmentCount * 6.0)) *\n (segmentCount * 6.0);\n\n float segment = floor(0.001 + index/6.0);\n float segmentIndex = index - (segment*6.0);\n\n normal = -normalize(d);\n\n if (segmentIndex > 2.99 && segmentIndex < 3.01) {\n return mix(vec3(0.0), -d, coneOffset);\n }\n\n float nextAngle = (\n (segmentIndex > 0.99 && segmentIndex < 1.01) ||\n (segmentIndex > 4.99 && segmentIndex < 5.01)\n ) ? 1.0 : 0.0;\n float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount);\n\n vec3 v1 = mix(d, vec3(0.0), coneOffset);\n vec3 v2 = v1 - d;\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d)*0.25;\n vec3 y = v * sin(angle) * length(d)*0.25;\n vec3 v3 = v2 + x + y;\n if (segmentIndex < 3.0) {\n vec3 tx = u * sin(angle);\n vec3 ty = v * -cos(angle);\n vec3 tangent = tx + ty;\n normal = normalize(cross(v3 - v1, tangent));\n }\n\n if (segmentIndex == 0.0) {\n return mix(d, vec3(0.0), coneOffset);\n }\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float vectorScale, coneScale, coneOffset;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal);\n vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n gl_Position = projection * view * conePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},{glslify:263}],263:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],264:[function(t,e,r){e.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}},{}],265:[function(t,e,r){var n=t("./1.0/numbers");e.exports=function(t){return n[t]}},{"./1.0/numbers":264}],266:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=n(e),o=i(e,[{buffer:r,type:e.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:e.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:e.FLOAT,size:3,offset:28,stride:40}]),l=a(e);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(e,r,o,l);return c.update(t),c};var n=t("gl-buffer"),i=t("gl-vao"),a=t("./shaders/index"),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(t,e,r,n){this.gl=t,this.shader=n,this.buffer=e,this.vao=r,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=s.prototype;function c(t,e){for(var r=0;r<3;++r)t[0][r]=Math.min(t[0][r],e[r]),t[1][r]=Math.max(t[1][r],e[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(t){var e=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=t.view||o,i=r.projection=t.projection||o;r.model=t.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=(t._ortho||!1?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/e.drawingBufferHeight;this.vao.bind();for(var f=0;f<3;++f)e.lineWidth(this.lineWidth[f]*this.pixelRatio),r.capSize=this.capSize[f]*u,this.lineCount[f]&&e.drawArrays(e.LINES,this.lineOffset[f],this.lineCount[f]);this.vao.unbind()};var u=function(){for(var t=new Array(3),e=0;e<3;++e){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+e)%3]=i,r.push(a)}t[e]=r}return t}();function f(t,e,r,n){for(var i=u[n],a=0;a0)(g=u.slice())[s]+=p[1][s],i.push(u[0],u[1],u[2],d[0],d[1],d[2],d[3],0,0,0,g[0],g[1],g[2],d[0],d[1],d[2],d[3],0,0,0),c(this.bounds,g),o+=2+f(i,g,d,s)}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},{"./shaders/index":268,"gl-buffer":259,"gl-vao":358}],267:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],268:[function(t,e,r){"use strict";var n=t("glslify"),i=t("gl-shader"),a=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, offset;\nattribute vec4 color;\nuniform mat4 model, view, projection;\nuniform float capSize;\nvarying vec4 fragColor;\nvarying vec3 fragPosition;\n\nvoid main() {\n vec4 worldPosition = model * vec4(position, 1.0);\n worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0);\n gl_Position = projection * view * worldPosition;\n fragColor = color;\n fragPosition = position;\n}"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float opacity;\nvarying vec3 fragPosition;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], fragPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n gl_FragColor = opacity * fragColor;\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},{"gl-shader":335,glslify:267}],269:[function(t,e,r){"use strict";var n=t("gl-texture2d");e.exports=function(t,e,r,n){i||(i=t.FRAMEBUFFER_UNSUPPORTED,a=t.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=t.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=t.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=t.getExtension("WEBGL_draw_buffers");!l&&c&&function(t,e){var r=t.getParameter(e.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(r+1);for(var n=0;n<=r;++n){for(var i=new Array(r),a=0;au||r<0||r>u)throw new Error("gl-fbo: Parameters are too large for FBO");var f=1;if("color"in(n=n||{})){if((f=Math.max(0|n.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(f>1){if(!c)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(f>t.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+f+" draw buffers")}}var h=t.UNSIGNED_BYTE,p=t.getExtension("OES_texture_float");if(n.float&&f>0){if(!p)throw new Error("gl-fbo: Context does not support floating point textures");h=t.FLOAT}else n.preferFloat&&f>0&&p&&(h=t.FLOAT);var g=!0;"depth"in n&&(g=!!n.depth);var m=!1;"stencil"in n&&(m=!!n.stencil);return new d(t,e,r,h,f,g,m,c)};var i,a,o,s,l=null;function c(t){return[t.getParameter(t.FRAMEBUFFER_BINDING),t.getParameter(t.RENDERBUFFER_BINDING),t.getParameter(t.TEXTURE_BINDING_2D)]}function u(t,e){t.bindFramebuffer(t.FRAMEBUFFER,e[0]),t.bindRenderbuffer(t.RENDERBUFFER,e[1]),t.bindTexture(t.TEXTURE_2D,e[2])}function f(t){switch(t){case i:throw new Error("gl-fbo: Framebuffer unsupported");case a:throw new Error("gl-fbo: Framebuffer incomplete attachment");case o:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function h(t,e,r,i,a,o){if(!i)return null;var s=n(t,e,r,a,i);return s.magFilter=t.NEAREST,s.minFilter=t.NEAREST,s.mipSamples=1,s.bind(),t.framebufferTexture2D(t.FRAMEBUFFER,o,t.TEXTURE_2D,s.handle,0),s}function p(t,e,r,n,i){var a=t.createRenderbuffer();return t.bindRenderbuffer(t.RENDERBUFFER,a),t.renderbufferStorage(t.RENDERBUFFER,n,e,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,i,t.RENDERBUFFER,a),a}function d(t,e,r,n,i,a,o,s){this.gl=t,this._shape=[0|e,0|r],this._destroyed=!1,this._ext=s,this.color=new Array(i);for(var d=0;d1&&s.drawBuffersWEBGL(l[o]);var y=r.getExtension("WEBGL_depth_texture");y?d?t.depth=h(r,i,a,y.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g&&(t.depth=h(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):g&&d?t._depth_rb=p(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):g?t._depth_rb=p(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):d&&(t._depth_rb=p(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){t._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(t.handle),t.handle=null,t.depth&&(t.depth.dispose(),t.depth=null),t._depth_rb&&(r.deleteRenderbuffer(t._depth_rb),t._depth_rb=null);for(v=0;vi||r<0||r>i)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");t._shape[0]=e,t._shape[1]=r;for(var a=c(n),o=0;o>8*p&255;this.pickOffset=r,i.bind();var d=i.uniforms;d.viewTransform=t,d.pickOffset=e,d.shape=this.shape;var g=i.attributes;return this.positionBuffer.bind(),g.position.pointer(),this.weightBuffer.bind(),g.weight.pointer(s.UNSIGNED_BYTE,!1),this.idBuffer.bind(),g.pickId.pointer(s.UNSIGNED_BYTE,!1),s.drawArrays(s.TRIANGLES,0,o),r+this.shape[0]*this.shape[1]}}}(),f.pick=function(t,e,r){var n=this.pickOffset,i=this.shape[0]*this.shape[1];if(r=n+i)return null;var a=r-n,o=this.xData,s=this.yData;return{object:this,pointId:a,dataCoord:[o[a%this.shape[0]],s[a/this.shape[0]|0]]}},f.update=function(t){var e=(t=t||{}).shape||[0,0],r=t.x||i(e[0]),o=t.y||i(e[1]),s=t.z||new Float32Array(e[0]*e[1]),l=!1!==t.zsmooth;this.xData=r,this.yData=o;var c,u,f,p,d=t.colorLevels||[0],g=t.colorValues||[0,0,0,1],m=d.length,v=this.bounds;l?(c=v[0]=r[0],u=v[1]=o[0],f=v[2]=r[r.length-1],p=v[3]=o[o.length-1]):(c=v[0]=r[0]+(r[1]-r[0])/2,u=v[1]=o[0]+(o[1]-o[0])/2,f=v[2]=r[r.length-1]+(r[r.length-1]-r[r.length-2])/2,p=v[3]=o[o.length-1]+(o[o.length-1]-o[o.length-2])/2);var y=1/(f-c),x=1/(p-u),b=e[0],_=e[1];this.shape=[b,_];var w=(l?(b-1)*(_-1):b*_)*(h.length>>>1);this.numVertices=w;for(var T=a.mallocUint8(4*w),k=a.mallocFloat32(2*w),M=a.mallocUint8(2*w),A=a.mallocUint32(w),S=0,E=l?b-1:b,C=l?_-1:_,L=0;L max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D dashTexture;\nuniform float dashScale;\nuniform float opacity;\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (\n outOfRange(clipBounds[0], clipBounds[1], worldPosition) ||\n fragColor.a * opacity == 0.\n ) discard;\n\n float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r;\n if(dashWeight < 0.5) {\n discard;\n }\n gl_FragColor = fragColor * opacity;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\n#define FLOAT_MAX 1.70141184e38\n#define FLOAT_MIN 1.17549435e-38\n\n// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl\nvec4 packFloat(float v) {\n float av = abs(v);\n\n //Handle special cases\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(127.0, 128.0, 0.0, 0.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(255.0, 128.0, 0.0, 0.0) / 255.0;\n }\n\n vec4 c = vec4(0,0,0,0);\n\n //Compute exponent and mantissa\n float e = floor(log2(av));\n float m = av * pow(2.0, -e) - 1.0;\n\n //Unpack mantissa\n c[1] = floor(128.0 * m);\n m -= c[1] / 128.0;\n c[2] = floor(32768.0 * m);\n m -= c[2] / 32768.0;\n c[3] = floor(8388608.0 * m);\n\n //Unpack exponent\n float ebias = e + 127.0;\n c[0] = floor(ebias / 2.0);\n ebias -= c[0] * 2.0;\n c[1] += floor(ebias) * 128.0;\n\n //Unpack sign bit\n c[0] += 128.0 * step(0.0, -v);\n\n //Scale back to range\n return c / 255.0;\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform float pickId;\nuniform vec3 clipBounds[2];\n\nvarying vec3 worldPosition;\nvarying float pixelArcLength;\nvarying vec4 fragColor;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard;\n\n gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz);\n}"]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];r.createShader=function(t){return i(t,a,o,null,l)},r.createPickShader=function(t){return i(t,a,s,null,l)}},{"gl-shader":335,glslify:276}],275:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl||t.scene&&t.scene.gl,r=f(e);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=h(e);o.attributes.position.location=0,o.attributes.nextPosition.location=1,o.attributes.arcLength.location=2,o.attributes.lineWidth.location=3,o.attributes.color.location=4;for(var s=n(e),l=i(e,[{buffer:s,size:3,offset:0,stride:48},{buffer:s,size:3,offset:12,stride:48},{buffer:s,size:1,offset:24,stride:48},{buffer:s,size:1,offset:28,stride:48},{buffer:s,size:4,offset:32,stride:48}]),u=c(new Array(1024),[256,1,4]),p=0;p<1024;++p)u.data[p]=255;var d=a(e,u);d.wrap=e.REPEAT;var g=new v(e,r,o,s,l,d);return g.update(t),g};var n=t("gl-buffer"),i=t("gl-vao"),a=t("gl-texture2d"),o=new Uint8Array(4),s=new Float32Array(o.buffer);var l=t("binary-search-bounds"),c=t("ndarray"),u=t("./lib/shaders"),f=u.createShader,h=u.createPickShader,p=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function d(t,e){for(var r=0,n=0;n<3;++n){var i=t[n]-e[n];r+=i*i}return Math.sqrt(r)}function g(t){for(var e=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)e[0][r]=Math.max(t[0][r],e[0][r]),e[1][r]=Math.min(t[1][r],e[1][r]);return e}function m(t,e,r,n){this.arcLength=t,this.position=e,this.index=r,this.dataCoordinate=n}function v(t,e,r,n,i,a){this.gl=t,this.shader=e,this.pickShader=r,this.buffer=n,this.vao=i,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=a,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var y=v.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(t){this.pickId=t},y.drawTransparent=y.draw=function(t){if(this.vertexCount){var e=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,clipBounds:g(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(t){if(this.vertexCount){var e=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:t.model||p,view:t.view||p,projection:t.projection||p,pickId:this.pickId,clipBounds:g(this.clipBounds),screenShape:[e.drawingBufferWidth,e.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(e.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(t){var e,r;this.dirty=!0;var n=!!t.connectGaps;"dashScale"in t&&(this.dashScale=t.dashScale),this.hasAlpha=!1,"opacity"in t&&(this.opacity=+t.opacity,this.opacity<1&&(this.hasAlpha=!0));var i=[],a=[],o=[],s=0,u=0,f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],h=t.position||t.positions;if(h){var p=t.color||t.colors||[0,0,0,1],g=t.lineWidth||1,m=!1;t:for(e=1;e0){for(var w=0;w<24;++w)i.push(i[i.length-12]);u+=2,m=!0}continue t}f[0][r]=Math.min(f[0][r],b[r],_[r]),f[1][r]=Math.max(f[1][r],b[r],_[r])}Array.isArray(p[0])?(v=p.length>e-1?p[e-1]:p.length>0?p[p.length-1]:[0,0,0,1],y=p.length>e?p[e]:p.length>0?p[p.length-1]:[0,0,0,1]):v=y=p,3===v.length&&(v=[v[0],v[1],v[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&v[3]<1&&(this.hasAlpha=!0),x=Array.isArray(g)?g.length>e-1?g[e-1]:g.length>0?g[g.length-1]:[0,0,0,1]:g;var T=s;if(s+=d(b,_),m){for(r=0;r<2;++r)i.push(b[0],b[1],b[2],_[0],_[1],_[2],T,x,v[0],v[1],v[2],v[3]);u+=2,m=!1}i.push(b[0],b[1],b[2],_[0],_[1],_[2],T,x,v[0],v[1],v[2],v[3],b[0],b[1],b[2],_[0],_[1],_[2],T,-x,v[0],v[1],v[2],v[3],_[0],_[1],_[2],b[0],b[1],b[2],s,-x,y[0],y[1],y[2],y[3],_[0],_[1],_[2],b[0],b[1],b[2],s,x,y[0],y[1],y[2],y[3]),u+=4}}if(this.buffer.update(i),a.push(s),o.push(h[h.length-1].slice()),this.bounds=f,this.vertexCount=u,this.points=o,this.arcLength=a,"dashes"in t){var k=t.dashes.slice();for(k.unshift(0),e=1;e1.0001)return null;v+=m[f]}if(Math.abs(v-1)>.001)return null;return[h,s(t,m),m]}},{barycentric:78,"polytope-closest-point/lib/closest_point_2d.js":525}],308:[function(t,e,r){var n=t("glslify"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position, normal;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model\n , view\n , projection\n , inverseModel;\nuniform vec3 eyePosition\n , lightPosition;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvec4 project(vec3 p) {\n return projection * view * model * vec4(p, 1.0);\n}\n\nvoid main() {\n gl_Position = project(position);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * vec4(position , 1.0);\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n f_color = color;\n f_data = position;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\n//#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness\n , fresnel\n , kambient\n , kdiffuse\n , kspecular;\nuniform sampler2D texture;\n\nvarying vec3 f_normal\n , f_lightDirection\n , f_eyeDirection\n , f_data;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (f_color.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], f_data)\n ) discard;\n\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d\n\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * f_color.a;\n}\n"]),o=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\n\nuniform mat4 model, view, projection;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_color = color;\n f_data = position;\n f_uv = uv;\n}"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec3 f_data;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard;\n\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),l=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 uv;\nattribute float pointSize;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n }\n gl_PointSize = pointSize;\n f_color = color;\n f_uv = uv;\n}"]),c=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D texture;\nuniform float opacity;\n\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5);\n if(dot(pointR, pointR) > 0.25) {\n discard;\n }\n gl_FragColor = f_color * texture2D(texture, f_uv) * opacity;\n}"]),u=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n f_id = id;\n f_position = position;\n}"]),f=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]),h=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute float pointSize;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0.0, 0.0, 0.0, 0.0);\n } else {\n gl_Position = projection * view * model * vec4(position, 1.0);\n gl_PointSize = pointSize;\n }\n f_id = id;\n f_position = position;\n}"]),p=n(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec3 position;\n\nuniform mat4 model, view, projection;\n\nvoid main() {\n gl_Position = projection * view * model * vec4(position, 1.0);\n}"]),d=n(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},r.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},r.pickShader={vertex:u,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},r.pointPickShader={vertex:h,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},r.contourShader={vertex:p,fragment:d,attributes:[{name:"position",type:"vec3"}]}},{glslify:310}],309:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("normals"),l=t("gl-mat4/multiply"),c=t("gl-mat4/invert"),u=t("ndarray"),f=t("colormap"),h=t("simplicial-complex-contour"),p=t("typedarray-pool"),d=t("./lib/shaders"),g=t("./lib/closest-point"),m=d.meshShader,v=d.wireShader,y=d.pointShader,x=d.pickShader,b=d.pointPickShader,_=d.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,T,k,M,A,S){this.gl=t,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=e,this.dirty=!0,this.triShader=r,this.lineShader=n,this.pointShader=i,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=h,this.triangleUVs=f,this.triangleIds=c,this.triangleVAO=p,this.triangleCount=0,this.lineWidth=1,this.edgePositions=d,this.edgeColors=m,this.edgeUVs=v,this.edgeIds=g,this.edgeVAO=y,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=T,this.pointSizes=k,this.pointIds=b,this.pointVAO=M,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!0,this.pickId=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lightPosition=[1e5,1e5,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.opacity=1,this.hasAlpha=!1,this.opacityscale=!1,this._model=w,this._view=w,this._projection=w,this._resolution=[1,1]}var k=T.prototype;function M(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}function A(t){var e=n(t,m.vertex,m.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.normal.location=4,e}function S(t){var e=n(t,v.vertex,v.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e}function E(t){var e=n(t,y.vertex,y.fragment);return e.attributes.position.location=0,e.attributes.color.location=2,e.attributes.uv.location=3,e.attributes.pointSize.location=4,e}function C(t){var e=n(t,x.vertex,x.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e}function L(t){var e=n(t,b.vertex,b.fragment);return e.attributes.position.location=0,e.attributes.id.location=1,e.attributes.pointSize.location=4,e}function I(t){var e=n(t,_.vertex,_.fragment);return e.attributes.position.location=0,e}k.isOpaque=function(){return!this.hasAlpha},k.isTransparent=function(){return this.hasAlpha},k.pickSlots=1,k.setPickBase=function(t){this.pickId=t},k.highlight=function(t){if(t&&this.contourEnable){for(var e=h(this.cells,this.intensity,t.intensity),r=e.cells,n=e.vertexIds,i=e.vertexWeights,a=r.length,o=p.mallocFloat32(6*a),s=0,l=0;l0&&((f=this.triShader).bind(),f.uniforms=s,this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind());this.edgeCount>0&&this.lineWidth>0&&((f=this.lineShader).bind(),f.uniforms=s,this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind());this.pointCount>0&&((f=this.pointShader).bind(),f.uniforms=s,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind());this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((f=this.contourShader).bind(),f.uniforms=s,this.contourVAO.bind(),e.drawArrays(e.LINES,0,this.contourCount),this.contourVAO.unbind())},k.drawPick=function(t){t=t||{};for(var e=this.gl,r=t.model||w,n=t.view||w,i=t.projection||w,a=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],o=0;o<3;++o)a[0][o]=Math.max(a[0][o],this.clipBounds[0][o]),a[1][o]=Math.min(a[1][o],this.clipBounds[1][o]);this._model=[].slice.call(r),this._view=[].slice.call(n),this._projection=[].slice.call(i),this._resolution=[e.drawingBufferWidth,e.drawingBufferHeight];var s,l={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255};((s=this.pickShader).bind(),s.uniforms=l,this.triangleCount>0&&(this.triangleVAO.bind(),e.drawArrays(e.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),e.lineWidth(this.lineWidth*this.pixelRatio),e.drawArrays(e.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0)&&((s=this.pointPickShader).bind(),s.uniforms=l,this.pointVAO.bind(),e.drawArrays(e.POINTS,0,this.pointCount),this.pointVAO.unbind())},k.pick=function(t){if(!t)return null;if(t.id!==this.pickId)return null;for(var e=t.value[0]+256*t.value[1]+65536*t.value[2],r=this.cells[e],n=this.positions,i=new Array(r.length),a=0;ai[k]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=m[t],r.uniforms.angle=v[t],a.drawArrays(a.TRIANGLES,i[k],i[M]-i[k]))),y[t]&&T&&(u[1^t]-=A*p*x[t],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t],r.uniforms.angle=_[t],a.drawArrays(a.TRIANGLES,w,T)),u[1^t]=A*s[2+(1^t)]-1,d[t+2]&&(u[1^t]+=A*p*g[t+2],ki[k]&&(r.uniforms.dataAxis=c,r.uniforms.screenOffset=u,r.uniforms.color=m[t+2],r.uniforms.angle=v[t+2],a.drawArrays(a.TRIANGLES,i[k],i[M]-i[k]))),y[t+2]&&T&&(u[1^t]+=A*p*x[t+2],r.uniforms.dataAxis=f,r.uniforms.screenOffset=u,r.uniforms.color=b[t+2],r.uniforms.angle=_[t+2],a.drawArrays(a.TRIANGLES,w,T))}),g.drawTitle=function(){var t=[0,0],e=[0,0];return function(){var r=this.plot,n=this.shader,i=r.gl,a=r.screenBox,o=r.titleCenter,s=r.titleAngle,l=r.titleColor,c=r.pixelRatio;if(this.titleCount){for(var u=0;u<2;++u)e[u]=2*(o[u]*c-a[u])/(a[2+u]-a[u])-1;n.bind(),n.uniforms.dataAxis=t,n.uniforms.screenOffset=e,n.uniforms.angle=s,n.uniforms.color=l,i.drawArrays(i.TRIANGLES,this.titleOffset,this.titleCount)}}}(),g.bind=(h=[0,0],p=[0,0],d=[0,0],function(){var t=this.plot,e=this.shader,r=t._tickBounds,n=t.dataBox,i=t.screenBox,a=t.viewBox;e.bind();for(var o=0;o<2;++o){var s=r[o],l=r[o+2]-s,c=.5*(n[o+2]+n[o]),u=n[o+2]-n[o],f=a[o],g=a[o+2]-f,m=i[o],v=i[o+2]-m;p[o]=2*l/u*g/v,h[o]=2*(s-c)/u*g/v}d[1]=2*t.pixelRatio/(i[3]-i[1]),d[0]=d[1]*(i[3]-i[1])/(i[2]-i[0]),e.uniforms.dataScale=p,e.uniforms.dataShift=h,e.uniforms.textScale=d,this.vbo.bind(),e.attributes.textCoordinate.pointer()}),g.update=function(t){var e,r,n,i,o,s=[],l=t.ticks,c=t.bounds;for(o=0;o<2;++o){var u=[Math.floor(s.length/3)],f=[-1/0],h=l[o];for(e=0;e=0){var g=e[d]-n[d]*(e[d+2]-e[d])/(n[d+2]-n[d]);0===d?o.drawLine(g,e[1],g,e[3],p[d],h[d]):o.drawLine(e[0],g,e[2],g,p[d],h[d])}}for(d=0;d=0;--t)this.objects[t].dispose();this.objects.length=0;for(t=this.overlays.length-1;t>=0;--t)this.overlays[t].dispose();this.overlays.length=0,this.gl=null},c.addObject=function(t){this.objects.indexOf(t)<0&&(this.objects.push(t),this.setDirty())},c.removeObject=function(t){for(var e=this.objects,r=0;rMath.abs(e))c.rotate(a,0,0,-t*r*Math.PI*d.rotateSpeed/window.innerWidth);else if(!d._ortho){var o=-d.zoomSpeed*i*e/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,f*(Math.exp(o)-1))}}}),!0)},d.enableMouseListeners(),d};var n=t("right-now"),i=t("3d-view"),a=t("mouse-change"),o=t("mouse-wheel"),s=t("mouse-event-offset"),l=t("has-passive-events")},{"3d-view":54,"has-passive-events":441,"mouse-change":483,"mouse-event-offset":484,"mouse-wheel":486,"right-now":542}],319:[function(t,e,r){var n=t("glslify"),i=t("gl-shader"),a=n(["precision mediump float;\n#define GLSLIFY 1\nattribute vec2 position;\nvarying vec2 uv;\nvoid main() {\n uv = position;\n gl_Position = vec4(position, 0, 1);\n}"]),o=n(["precision mediump float;\n#define GLSLIFY 1\n\nuniform sampler2D accumBuffer;\nvarying vec2 uv;\n\nvoid main() {\n vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0));\n gl_FragColor = min(vec4(1,1,1,1), accum);\n}"]);e.exports=function(t){return i(t,a,o,null,[{name:"position",type:"vec2"}])}},{"gl-shader":335,glslify:320}],320:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],321:[function(t,e,r){"use strict";var n=t("./camera.js"),i=t("gl-axes3d"),a=t("gl-axes3d/properties"),o=t("gl-spikes3d"),s=t("gl-select-static"),l=t("gl-fbo"),c=t("a-big-triangle"),u=t("mouse-change"),f=t("gl-mat4/perspective"),h=t("gl-mat4/ortho"),p=t("./lib/shader"),d=t("is-mobile")({tablet:!0,featureDetect:!0});function g(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function m(t){var e=Math.round(Math.log(Math.abs(t))/Math.log(10));if(e<0){var r=Math.round(Math.pow(10,-e));return Math.ceil(t*r)/r}if(e>0){r=Math.round(Math.pow(10,e));return Math.ceil(t/r)*r}return Math.ceil(t)}function v(t){return"boolean"!=typeof t||t}e.exports={createScene:function(t){(t=t||{}).camera=t.camera||{};var e=t.canvas;if(!e){if(e=document.createElement("canvas"),t.container)t.container.appendChild(e);else document.body.appendChild(e)}var r=t.gl;r||(t.glOptions&&(d=!!t.glOptions.preserveDrawingBuffer),r=function(t,e){var r=null;try{(r=t.getContext("webgl",e))||(r=t.getContext("experimental-webgl",e))}catch(t){return null}return r}(e,t.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:d}));if(!r)throw new Error("webgl not supported");var y=t.bounds||[[-10,-10,-10],[10,10,10]],x=new g,b=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!d}),_=p(r),w=t.cameraObject&&!0===t.cameraObject._ortho||t.camera.projection&&"orthographic"===t.camera.projection.type||!1,T={eye:t.camera.eye||[2,0,0],center:t.camera.center||[0,0,0],up:t.camera.up||[0,1,0],zoomMin:t.camera.zoomMax||.1,zoomMax:t.camera.zoomMin||100,mode:t.camera.mode||"turntable",_ortho:w},k=t.axes||{},M=i(r,k);M.enable=!k.disable;var A=t.spikes||{},S=o(r,A),E=[],C=[],L=[],I=[],P=!0,z=!0,O=new Array(16),D=new Array(16),R={view:null,projection:O,model:D,_ortho:!1},F=(z=!0,[r.drawingBufferWidth,r.drawingBufferHeight]),B=t.cameraObject||n(e,T),N={gl:r,contextLost:!1,pixelRatio:t.pixelRatio||1,canvas:e,selection:x,camera:B,axes:M,axesPixels:null,spikes:S,bounds:y,objects:E,shape:F,aspect:t.aspectRatio||[1,1,1],pickRadius:t.pickRadius||10,zNear:t.zNear||.01,zFar:t.zFar||1e3,fovy:t.fovy||Math.PI/4,clearColor:t.clearColor||[0,0,0,0],autoResize:v(t.autoResize),autoBounds:v(t.autoBounds),autoScale:!!t.autoScale,autoCenter:v(t.autoCenter),clipToBounds:v(t.clipToBounds),snapToData:!!t.snapToData,onselect:t.onselect||null,onrender:t.onrender||null,onclick:t.onclick||null,cameraParams:R,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(t){this.aspect[0]=t.x,this.aspect[1]=t.y,this.aspect[2]=t.z,z=!0},setBounds:function(t,e){this.bounds[0][t]=e.min,this.bounds[1][t]=e.max},setClearColor:function(t){this.clearColor=t},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},j=[r.drawingBufferWidth/N.pixelRatio|0,r.drawingBufferHeight/N.pixelRatio|0];function U(){if(!N._stopped&&N.autoResize){var t=e.parentNode,r=1,n=1;t&&t!==document.body?(r=t.clientWidth,n=t.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*N.pixelRatio),a=0|Math.ceil(n*N.pixelRatio);if(i!==e.width||a!==e.height){e.width=i,e.height=a;var o=e.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",P=!0}}}N.autoResize&&U();function V(){for(var t=E.length,e=I.length,n=0;n0&&0===L[e-1];)L.pop(),I.pop().dispose()}function q(){if(N.contextLost)return!0;r.isContextLost()&&(N.contextLost=!0,N.mouseListener.enabled=!1,N.selection.object=null,N.oncontextloss&&N.oncontextloss())}window.addEventListener("resize",U),N.update=function(t){N._stopped||(t=t||{},P=!0,z=!0)},N.add=function(t){N._stopped||(t.axes=M,E.push(t),C.push(-1),P=!0,z=!0,V())},N.remove=function(t){if(!N._stopped){var e=E.indexOf(t);e<0||(E.splice(e,1),C.pop(),P=!0,z=!0,V())}},N.dispose=function(){if(!N._stopped&&(N._stopped=!0,window.removeEventListener("resize",U),e.removeEventListener("webglcontextlost",q),N.mouseListener.enabled=!1,!N.contextLost)){M.dispose(),S.dispose();for(var t=0;tx.distance)continue;for(var c=0;c 1.0) {\n discard;\n }\n baseColor = mix(borderColor, color, step(radius, centerFraction));\n gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a);\n }\n}\n"]),r.pickVertex=n(["precision mediump float;\n#define GLSLIFY 1\n\nattribute vec2 position;\nattribute vec4 pickId;\n\nuniform mat3 matrix;\nuniform float pointSize;\nuniform vec4 pickOffset;\n\nvarying vec4 fragId;\n\nvoid main() {\n vec3 hgPosition = matrix * vec3(position, 1);\n gl_Position = vec4(hgPosition.xy, 0, hgPosition.z);\n gl_PointSize = pointSize;\n\n vec4 id = pickId + pickOffset;\n id.y += floor(id.x / 256.0);\n id.x -= floor(id.x / 256.0) * 256.0;\n\n id.z += floor(id.y / 256.0);\n id.y -= floor(id.y / 256.0) * 256.0;\n\n id.w += floor(id.z / 256.0);\n id.z -= floor(id.z / 256.0) * 256.0;\n\n fragId = id;\n}\n"]),r.pickFragment=n(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragId;\n\nvoid main() {\n float radius = length(2.0 * gl_PointCoord.xy - 1.0);\n if(radius > 1.0) {\n discard;\n }\n gl_FragColor = fragId / 255.0;\n}\n"])},{glslify:323}],323:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],324:[function(t,e,r){"use strict";var n=t("gl-shader"),i=t("gl-buffer"),a=t("typedarray-pool"),o=t("./lib/shader");function s(t,e,r,n,i){this.plot=t,this.offsetBuffer=e,this.pickBuffer=r,this.shader=n,this.pickShader=i,this.sizeMin=.5,this.sizeMinCap=2,this.sizeMax=20,this.areaRatio=1,this.pointCount=0,this.color=[1,0,0,1],this.borderColor=[0,0,0,1],this.blend=!1,this.pickOffset=0,this.points=null}e.exports=function(t,e){var r=t.gl,a=i(r),l=i(r),c=n(r,o.pointVertex,o.pointFragment),u=n(r,o.pickVertex,o.pickFragment),f=new s(t,a,l,c,u);return f.update(e),t.addObject(f),f};var l,c,u=s.prototype;u.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},u.update=function(t){var e;function r(e,r){return e in t?t[e]:r}t=t||{},this.sizeMin=r("sizeMin",.5),this.sizeMax=r("sizeMax",20),this.color=r("color",[1,0,0,1]).slice(),this.areaRatio=r("areaRatio",1),this.borderColor=r("borderColor",[0,0,0,1]).slice(),this.blend=r("blend",!1);var n=t.positions.length>>>1,i=t.positions instanceof Float32Array,o=t.idToIndex instanceof Int32Array&&t.idToIndex.length>=n,s=t.positions,l=i?s:a.mallocFloat32(s.length),c=o?t.idToIndex:a.mallocInt32(n);if(i||l.set(s),!o)for(l.set(s),e=0;e>>1;for(r=0;r=e[0]&&a<=e[2]&&o>=e[1]&&o<=e[3]&&n++}return n}(this.points,i),u=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(s,.33333)));l[0]=2/a,l[4]=2/o,l[6]=-2*i[0]/a-1,l[7]=-2*i[1]/o-1,this.offsetBuffer.bind(),r.bind(),r.attributes.position.pointer(),r.uniforms.matrix=l,r.uniforms.color=this.color,r.uniforms.borderColor=this.borderColor,r.uniforms.pointCloud=u<5,r.uniforms.pointSize=u,r.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),e&&(c[0]=255&t,c[1]=t>>8&255,c[2]=t>>16&255,c[3]=t>>24&255,this.pickBuffer.bind(),r.attributes.pickId.pointer(n.UNSIGNED_BYTE),r.uniforms.pickOffset=c,this.pickOffset=t);var f=n.getParameter(n.BLEND),h=n.getParameter(n.DITHER);return f&&!this.blend&&n.disable(n.BLEND),h&&n.disable(n.DITHER),n.drawArrays(n.POINTS,0,this.pointCount),f&&!this.blend&&n.enable(n.BLEND),h&&n.enable(n.DITHER),t+this.pointCount}),u.draw=u.unifiedDraw,u.drawPick=u.unifiedDraw,u.pick=function(t,e,r){var n=this.pickOffset,i=this.pointCount;if(r=n+i)return null;var a=r-n,o=this.points;return{object:this,pointId:a,dataCoord:[o[2*a],o[2*a+1]]}}},{"./lib/shader":322,"gl-buffer":259,"gl-shader":335,"typedarray-pool":595}],325:[function(t,e,r){e.exports=function(t,e,r,n){var i,a,o,s,l,c=e[0],u=e[1],f=e[2],h=e[3],p=r[0],d=r[1],g=r[2],m=r[3];(a=c*p+u*d+f*g+h*m)<0&&(a=-a,p=-p,d=-d,g=-g,m=-m);1-a>1e-6?(i=Math.acos(a),o=Math.sin(i),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n);return t[0]=s*c+l*p,t[1]=s*u+l*d,t[2]=s*f+l*g,t[3]=s*h+l*m,t}},{}],326:[function(t,e,r){"use strict";e.exports=function(t){return t||0===t?t.toString():""}},{}],327:[function(t,e,r){"use strict";var n=t("vectorize-text");e.exports=function(t,e,r){var a=i[e];a||(a=i[e]={});if(t in a)return a[t];var o={textAlign:"center",textBaseline:"middle",lineHeight:1,font:e,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},s=n(t,o);o.triangles=!1;var l,c,u=n(t,o);if(r&&1!==r){for(l=0;l max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform vec4 highlightId;\nuniform float highlightScale;\nuniform mat4 model, view, projection;\nuniform vec3 clipBounds[2];\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = 1.0;\n if(distance(highlightId, id) < 0.0001) {\n scale = highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1);\n vec4 viewPosition = view * worldPosition;\n viewPosition = viewPosition / viewPosition.w;\n vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0));\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float highlightScale, pixelRatio;\nuniform vec4 highlightId;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float scale = pixelRatio;\n if(distance(highlightId.bgr, id.bgr) < 0.001) {\n scale *= highlightScale;\n }\n\n vec4 worldPosition = model * vec4(position, 1.0);\n vec4 viewPosition = view * worldPosition;\n vec4 clipPosition = projection * viewPosition;\n clipPosition /= clipPosition.w;\n\n gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0);\n interpColor = color;\n pickId = id;\n dataCoordinate = position;\n }\n}"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nattribute vec3 position;\nattribute vec4 color;\nattribute vec2 glyph;\nattribute vec4 id;\n\nuniform float highlightScale;\nuniform vec4 highlightId;\nuniform vec3 axes[2];\nuniform mat4 model, view, projection;\nuniform vec2 screenSize;\nuniform vec3 clipBounds[2];\nuniform float scale, pixelRatio;\n\nvarying vec4 interpColor;\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], position)) {\n\n gl_Position = vec4(0,0,0,0);\n } else {\n float lscale = pixelRatio * scale;\n if(distance(highlightId, id) < 0.0001) {\n lscale *= highlightScale;\n }\n\n vec4 clipCenter = projection * view * model * vec4(position, 1);\n vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y;\n vec4 clipPosition = projection * view * model * vec4(dataPosition, 1);\n\n gl_Position = clipPosition;\n interpColor = color;\n pickId = id;\n dataCoordinate = dataPosition;\n }\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float opacity;\n\nvarying vec4 interpColor;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (\n outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) ||\n interpColor.a * opacity == 0.\n ) discard;\n gl_FragColor = interpColor * opacity;\n}\n"]),c=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 fragClipBounds[2];\nuniform float pickGroup;\n\nvarying vec4 pickId;\nvarying vec3 dataCoordinate;\n\nvoid main() {\n if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard;\n\n gl_FragColor = vec4(pickGroup, pickId.bgr);\n}"]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],f={vertex:a,fragment:l,attributes:u},h={vertex:o,fragment:l,attributes:u},p={vertex:s,fragment:l,attributes:u},d={vertex:a,fragment:c,attributes:u},g={vertex:o,fragment:c,attributes:u},m={vertex:s,fragment:c,attributes:u};function v(t,e){var r=n(t,e),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}r.createPerspective=function(t){return v(t,f)},r.createOrtho=function(t){return v(t,h)},r.createProject=function(t){return v(t,p)},r.createPickPerspective=function(t){return v(t,d)},r.createPickOrtho=function(t){return v(t,g)},r.createPickProject=function(t){return v(t,m)}},{"gl-shader":335,glslify:329}],329:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],330:[function(t,e,r){"use strict";var n=t("is-string-blank"),i=t("gl-buffer"),a=t("gl-vao"),o=t("typedarray-pool"),s=t("gl-mat4/multiply"),l=t("./lib/shaders"),c=t("./lib/glyphs"),u=t("./lib/get-simple-string"),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function h(t,e){var r=t[0],n=t[1],i=t[2],a=t[3];return t[0]=e[0]*r+e[4]*n+e[8]*i+e[12]*a,t[1]=e[1]*r+e[5]*n+e[9]*i+e[13]*a,t[2]=e[2]*r+e[6]*n+e[10]*i+e[14]*a,t[3]=e[3]*r+e[7]*n+e[11]*i+e[15]*a,t}function p(t,e,r,n){return h(n,n),h(n,n),h(n,n)}function d(t,e){this.index=t,this.dataCoordinate=this.position=e}function g(t){return!0===t||t>1?1:t}function m(t,e,r,n,i,a,o,s,l,c,u,f){this.gl=t,this.pixelRatio=1,this.shader=e,this.orthoShader=r,this.projectShader=n,this.pointBuffer=i,this.colorBuffer=a,this.glyphBuffer=o,this.idBuffer=s,this.vao=l,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[2/3,2/3,2/3],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=c,this.pickOrthoShader=u,this.pickProjectShader=f,this.points=[],this._selectResult=new d(0,[0,0,0]),this.useOrtho=!0,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.axesProject=[!0,!0,!0],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.highlightId=[1,1,1,1],this.highlightScale=2,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.dirty=!0}e.exports=function(t){var e=t.gl,r=l.createPerspective(e),n=l.createOrtho(e),o=l.createProject(e),s=l.createPickPerspective(e),c=l.createPickOrtho(e),u=l.createPickProject(e),f=i(e),h=i(e),p=i(e),d=i(e),g=a(e,[{buffer:f,size:3,type:e.FLOAT},{buffer:h,size:4,type:e.FLOAT},{buffer:p,size:2,type:e.FLOAT},{buffer:d,size:4,type:e.UNSIGNED_BYTE,normalized:!0}]),v=new m(e,r,n,o,f,h,p,d,g,s,c,u);return v.update(t),v};var v=m.prototype;v.pickSlots=1,v.setPickBase=function(t){this.pickId=t},v.isTransparent=function(){if(this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&this.projectHasAlpha)return!0;return!1},v.isOpaque=function(){if(!this.hasAlpha)return!0;for(var t=0;t<3;++t)if(this.axesProject[t]&&!this.projectHasAlpha)return!0;return!1};var y=[0,0],x=[0,0,0],b=[0,0,0],_=[0,0,0,1],w=[0,0,0,1],T=f.slice(),k=[0,0,0],M=[[0,0,0],[0,0,0]];function A(t){return t[0]=t[1]=t[2]=0,t}function S(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=1,t}function E(t,e,r,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[r]=n,t}function C(t,e,r,n){var i,a=e.axesProject,o=e.gl,l=t.uniforms,c=r.model||f,u=r.view||f,h=r.projection||f,d=e.axesBounds,g=function(t){for(var e=M,r=0;r<2;++r)for(var n=0;n<3;++n)e[r][n]=Math.max(Math.min(t[r][n],1e8),-1e8);return e}(e.clipBounds);i=e.axes&&e.axes.lastCubeProps?e.axes.lastCubeProps.axis:[1,1,1],y[0]=2/o.drawingBufferWidth,y[1]=2/o.drawingBufferHeight,t.bind(),l.view=u,l.projection=h,l.screenSize=y,l.highlightId=e.highlightId,l.highlightScale=e.highlightScale,l.clipBounds=g,l.pickGroup=e.pickId/255,l.pixelRatio=n;for(var m=0;m<3;++m)if(a[m]){l.scale=e.projectScale[m],l.opacity=e.projectOpacity[m];for(var v=T,C=0;C<16;++C)v[C]=0;for(C=0;C<4;++C)v[5*C]=1;v[5*m]=0,i[m]<0?v[12+m]=d[0][m]:v[12+m]=d[1][m],s(v,c,v),l.model=v;var L=(m+1)%3,I=(m+2)%3,P=A(x),z=A(b);P[L]=1,z[I]=1;var O=p(0,0,0,S(_,P)),D=p(0,0,0,S(w,z));if(Math.abs(O[1])>Math.abs(D[1])){var R=O;O=D,D=R,R=P,P=z,z=R;var F=L;L=I,I=F}O[0]<0&&(P[L]=-1),D[1]>0&&(z[I]=-1);var B=0,N=0;for(C=0;C<4;++C)B+=Math.pow(c[4*L+C],2),N+=Math.pow(c[4*I+C],2);P[L]/=Math.sqrt(B),z[I]/=Math.sqrt(N),l.axes[0]=P,l.axes[1]=z,l.fragClipBounds[0]=E(k,g[0],m,-1e8),l.fragClipBounds[1]=E(k,g[1],m,1e8),e.vao.bind(),e.vao.draw(o.TRIANGLES,e.vertexCount),e.lineWidth>0&&(o.lineWidth(e.lineWidth*n),e.vao.draw(o.LINES,e.lineVertexCount,e.vertexCount)),e.vao.unbind()}}var L=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function I(t,e,r,n,i,a,o){var s=r.gl;if((a===r.projectHasAlpha||o)&&C(e,r,n,i),a===r.hasAlpha||o){t.bind();var l=t.uniforms;l.model=n.model||f,l.view=n.view||f,l.projection=n.projection||f,y[0]=2/s.drawingBufferWidth,y[1]=2/s.drawingBufferHeight,l.screenSize=y,l.highlightId=r.highlightId,l.highlightScale=r.highlightScale,l.fragClipBounds=L,l.clipBounds=r.axes.bounds,l.opacity=r.opacity,l.pickGroup=r.pickId/255,l.pixelRatio=i,r.vao.bind(),r.vao.draw(s.TRIANGLES,r.vertexCount),r.lineWidth>0&&(s.lineWidth(r.lineWidth*i),r.vao.draw(s.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function P(t,e,r,i){var a;a=Array.isArray(t)?e=this.pointCount||e<0)return null;var r=this.points[e],n=this._selectResult;n.index=e;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},v.highlight=function(t){if(t){var e=t.index,r=255&e,n=e>>8&255,i=e>>16&255;this.highlightId=[r/255,n/255,i/255,0]}else this.highlightId=[1,1,1,1]},v.update=function(t){if("perspective"in(t=t||{})&&(this.useOrtho=!t.perspective),"orthographic"in t&&(this.useOrtho=!!t.orthographic),"lineWidth"in t&&(this.lineWidth=t.lineWidth),"project"in t)if(Array.isArray(t.project))this.axesProject=t.project;else{var e=!!t.project;this.axesProject=[e,e,e]}if("projectScale"in t)if(Array.isArray(t.projectScale))this.projectScale=t.projectScale.slice();else{var r=+t.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in t){if(Array.isArray(t.projectOpacity))this.projectOpacity=t.projectOpacity.slice();else{r=+t.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=g(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in t&&(this.opacity=g(t.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=t.position,l=t.font||"normal",c=t.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else{i=[],a=[];for(n=0;n0){var z=0,O=x,D=[0,0,0,1],R=[0,0,0,1],F=Array.isArray(p)&&Array.isArray(p[0]),B=Array.isArray(v)&&Array.isArray(v[0]);t:for(n=0;n<_;++n){y+=1;for(w=s[n],T=0;T<3;++T){if(isNaN(w[T])||!isFinite(w[T]))continue t;f[T]=Math.max(f[T],w[T]),u[T]=Math.min(u[T],w[T])}k=(N=P(h,n,l,this.pixelRatio)).mesh,M=N.lines,A=N.bounds;var N,j=N.visible;if(j)if(Array.isArray(p)){if(3===(U=F?n0?1-A[0][0]:Y<0?1+A[1][0]:1,W*=W>0?1-A[0][1]:W<0?1+A[1][1]:1],Z=k.cells||[],J=k.positions||[];for(T=0;T0){var v=r*u;o.drawBox(f-v,h-v,p+v,h+v,a),o.drawBox(f-v,d-v,p+v,d+v,a),o.drawBox(f-v,h-v,f+v,d+v,a),o.drawBox(p-v,h-v,p+v,d+v,a)}}}},s.update=function(t){t=t||{},this.innerFill=!!t.innerFill,this.outerFill=!!t.outerFill,this.innerColor=(t.innerColor||[0,0,0,.5]).slice(),this.outerColor=(t.outerColor||[0,0,0,.5]).slice(),this.borderColor=(t.borderColor||[0,0,0,1]).slice(),this.borderWidth=t.borderWidth||0,this.selectBox=(t.selectBox||this.selectBox).slice()},s.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},{"./lib/shaders":331,"gl-buffer":259,"gl-shader":335}],334:[function(t,e,r){"use strict";e.exports=function(t,e){var r=e[0],a=e[1],o=n(t,r,a,{}),s=i.mallocUint8(r*a*4);return new l(t,o,s)};var n=t("gl-fbo"),i=t("typedarray-pool"),a=t("ndarray"),o=t("bit-twiddle").nextPow2;function s(t,e,r,n,i){this.coord=[t,e],this.id=r,this.value=n,this.distance=i}function l(t,e,r){this.gl=t,this.fbo=e,this.buffer=r,this._readTimeout=null;var n=this;this._readCallback=function(){n.gl&&(e.bind(),t.readPixels(0,0,e.shape[0],e.shape[1],t.RGBA,t.UNSIGNED_BYTE,n.buffer),n._readTimeout=null)}}var c=l.prototype;Object.defineProperty(c,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(t){if(this.gl){this.fbo.shape=t;var e=this.fbo.shape[0],r=this.fbo.shape[1];if(r*e*4>this.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*e*4)),a=0;ar)for(t=r;te)for(t=e;t=0){for(var T=0|w.type.charAt(w.type.length-1),k=new Array(T),M=0;M=0;)A+=1;_[y]=A}var S=new Array(r.length);function E(){h.program=o.program(p,h._vref,h._fref,b,_);for(var t=0;t=0){if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+f+": "+h);o(t,e,p[0],i,d,a,f)}else{if(!(h.indexOf("mat")>=0))throw new n("","Unknown data type for attribute "+f+": "+h);var d;if((d=h.charCodeAt(h.length-1)-48)<2||d>4)throw new n("","Invalid data type for attribute "+f+": "+h);s(t,e,p,i,d,a,f)}}}return a};var n=t("./GLError");function i(t,e,r,n,i,a){this._gl=t,this._wrapper=e,this._index=r,this._locations=n,this._dimension=i,this._constFunc=a}var a=i.prototype;function o(t,e,r,n,a,o,s){for(var l=["gl","v"],c=[],u=0;u4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+r);return"gl.uniformMatrix"+a+"fv(locations["+e+"],false,obj"+t+")"}throw new i("","Unknown uniform data type for "+name+": "+r)}if((a=r.charCodeAt(r.length-1)-48)<2||a>4)throw new i("","Invalid data type");switch(r.charAt(0)){case"b":case"i":return"gl.uniform"+a+"iv(locations["+e+"],obj"+t+")";case"v":return"gl.uniform"+a+"fv(locations["+e+"],obj"+t+")";default:throw new i("","Unrecognized data type for vector "+name+": "+r)}}}function c(e){for(var n=["return function updateProperty(obj){"],i=function t(e,r){if("object"!=typeof r)return[[e,r]];var n=[];for(var i in r){var a=r[i],o=e;parseInt(i)+""===i?o+="["+i+"]":o+="."+i,"object"==typeof a?n.push.apply(n,t(o,a)):n.push([o,a])}return n}("",e),a=0;a4)throw new i("","Invalid data type");return"b"===t.charAt(0)?o(r,!1):o(r,0)}if(0===t.indexOf("mat")&&4===t.length){var r;if((r=t.charCodeAt(t.length-1)-48)<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+t);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+t)}}(r[u].type);var p}function f(t){var e;if(Array.isArray(t)){e=new Array(t.length);for(var r=0;r1){s[0]in a||(a[s[0]]=[]),a=a[s[0]];for(var l=1;l1)for(var l=0;l 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 color, position;\nattribute vec2 uv;\n\nuniform float vectorScale, tubeScale;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 eyePosition, lightPosition;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n // Scale the vector magnitude to stay constant with\n // model & view changes.\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * tubePosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n f_lightDirection = lightPosition - cameraCoordinate.xyz;\n f_eyeDirection = eyePosition - cameraCoordinate.xyz;\n f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz);\n\n // vec4 m_position = model * vec4(tubePosition, 1.0);\n vec4 t_position = view * tubePosition;\n gl_Position = projection * t_position;\n\n f_color = color;\n f_data = tubePosition.xyz;\n f_position = position.xyz;\n f_uv = uv;\n}\n"]),a=n(["#extension GL_OES_standard_derivatives : enable\n\nprecision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat cookTorranceSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness,\n float fresnel) {\n\n float VdotN = max(dot(viewDirection, surfaceNormal), 0.0);\n float LdotN = max(dot(lightDirection, surfaceNormal), 0.0);\n\n //Half angle vector\n vec3 H = normalize(lightDirection + viewDirection);\n\n //Geometric term\n float NdotH = max(dot(surfaceNormal, H), 0.0);\n float VdotH = max(dot(viewDirection, H), 0.000001);\n float LdotH = max(dot(lightDirection, H), 0.000001);\n float G1 = (2.0 * NdotH * VdotN) / VdotH;\n float G2 = (2.0 * NdotH * LdotN) / LdotH;\n float G = min(1.0, min(G1, G2));\n \n //Distribution term\n float D = beckmannDistribution(NdotH, roughness);\n\n //Fresnel term\n float F = pow(1.0 - VdotN, fresnel);\n\n //Multiply terms and done\n return G * F * D / max(3.14159265 * VdotN, 0.000001);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform sampler2D texture;\n\nvarying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position;\nvarying vec4 f_color;\nvarying vec2 f_uv;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n vec3 N = normalize(f_normal);\n vec3 L = normalize(f_lightDirection);\n vec3 V = normalize(f_eyeDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel)));\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n vec4 surfaceColor = f_color * texture2D(texture, f_uv);\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = litColor * opacity;\n}\n"]),o=n(["precision highp float;\n\nprecision highp float;\n#define GLSLIFY 1\n\nvec3 getOrthogonalVector(vec3 v) {\n // Return up-vector for only-z vector.\n // Return ax + by + cz = 0, a point that lies on the plane that has v as a normal and that isn't (0,0,0).\n // From the above if-statement we have ||a|| > 0 U ||b|| > 0.\n // Assign z = 0, x = -b, y = a:\n // a*-b + b*a + c*0 = -ba + ba + 0 = 0\n if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) {\n return normalize(vec3(-v.y, v.x, 0.0));\n } else {\n return normalize(vec3(0.0, v.z, -v.y));\n }\n}\n\n// Calculate the tube vertex and normal at the given index.\n//\n// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d.\n//\n// Each tube segment is made up of a ring of vertices.\n// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array.\n// The indexes of tube segments run from 0 to 8.\n//\nvec3 getTubePosition(vec3 d, float index, out vec3 normal) {\n float segmentCount = 8.0;\n\n float angle = 2.0 * 3.14159 * (index / segmentCount);\n\n vec3 u = getOrthogonalVector(d);\n vec3 v = normalize(cross(u, d));\n\n vec3 x = u * cos(angle) * length(d);\n vec3 y = v * sin(angle) * length(d);\n vec3 v3 = x + y;\n\n normal = normalize(v3);\n\n return v3;\n}\n\nattribute vec4 vector;\nattribute vec4 position;\nattribute vec4 id;\n\nuniform mat4 model, view, projection;\nuniform float tubeScale;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n vec3 normal;\n vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal);\n vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0);\n\n gl_Position = projection * view * tubePosition;\n f_id = id;\n f_position = position.xyz;\n}\n"]),s=n(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying vec3 f_position;\nvarying vec4 f_id;\n\nvoid main() {\n if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard;\n\n gl_FragColor = vec4(pickId, f_id.xyz);\n}"]);r.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},r.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},{glslify:347}],347:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],348:[function(t,e,r){"use strict";var n=t("gl-vec3"),i=t("gl-vec4"),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(t,e,r,a){for(var o=0,s=0;s0)for(T=0;T<8;T++){var k=(T+1)%8;c.push(h[T],p[T],p[k],p[k],h[k],h[T]),f.push(y,v,v,v,y,y),d.push(g,m,m,m,g,g);var M=c.length;u.push([M-6,M-5,M-4],[M-3,M-2,M-1])}var A=h;h=p,p=A;var S=y;y=v,v=S;var E=g;g=m,m=E}return{positions:c,cells:u,vectors:f,vertexIntensity:d}}(t,r,a,o)})),f=[],h=[],p=[],d=[];for(s=0;se)return r-1}return r},l=function(t,e,r){return tr?r:t},c=function(t){var e=1/0;t.sort((function(t,e){return t-e}));for(var r=t.length,n=1;nf-1||y>h-1||x>p-1)return n.create();var b,_,w,T,k,M,A=a[0][d],S=a[0][v],E=a[1][g],C=a[1][y],L=a[2][m],I=(o-A)/(S-A),P=(c-E)/(C-E),z=(u-L)/(a[2][x]-L);switch(isFinite(I)||(I=.5),isFinite(P)||(P=.5),isFinite(z)||(z=.5),r.reversedX&&(d=f-1-d,v=f-1-v),r.reversedY&&(g=h-1-g,y=h-1-y),r.reversedZ&&(m=p-1-m,x=p-1-x),r.filled){case 5:k=m,M=x,w=g*p,T=y*p,b=d*p*h,_=v*p*h;break;case 4:k=m,M=x,b=d*p,_=v*p,w=g*p*f,T=y*p*f;break;case 3:w=g,T=y,k=m*h,M=x*h,b=d*h*p,_=v*h*p;break;case 2:w=g,T=y,b=d*h,_=v*h,k=m*h*f,M=x*h*f;break;case 1:b=d,_=v,k=m*f,M=x*f,w=g*f*p,T=y*f*p;break;default:b=d,_=v,w=g*f,T=y*f,k=m*f*h,M=x*f*h}var O=i[b+w+k],D=i[b+w+M],R=i[b+T+k],F=i[b+T+M],B=i[_+w+k],N=i[_+w+M],j=i[_+T+k],U=i[_+T+M],V=n.create(),q=n.create(),H=n.create(),G=n.create();n.lerp(V,O,B,I),n.lerp(q,D,N,I),n.lerp(H,R,j,I),n.lerp(G,F,U,I);var Y=n.create(),W=n.create();n.lerp(Y,V,H,P),n.lerp(W,q,G,P);var X=n.create();return n.lerp(X,Y,W,z),X}(e,t,p)},g=t.getDivergence||function(t,e){var r=n.create(),i=1e-4;n.add(r,t,[i,0,0]);var a=d(r);n.subtract(a,a,e),n.scale(a,a,1/i),n.add(r,t,[0,i,0]);var o=d(r);n.subtract(o,o,e),n.scale(o,o,1/i),n.add(r,t,[0,0,i]);var s=d(r);return n.subtract(s,s,e),n.scale(s,s,1/i),n.add(r,a,o),n.add(r,r,s),r},m=[],v=e[0][0],y=e[0][1],x=e[0][2],b=e[1][0],_=e[1][1],w=e[1][2],T=function(t){var e=t[0],r=t[1],n=t[2];return!(eb||r_||nw)},k=10*n.distance(e[0],e[1])/i,M=k*k,A=1,S=0,E=r.length;E>1&&(A=function(t){for(var e=[],r=[],n=[],i={},a={},o={},s=t.length,l=0;lS&&(S=F),D.push(F),m.push({points:I,velocities:P,divergences:D});for(var B=0;B<100*i&&I.lengthM&&n.scale(N,N,k/Math.sqrt(j)),n.add(N,N,L),z=d(N),n.squaredDistance(O,N)-M>-1e-4*M){I.push(N),O=N,P.push(z);R=g(N,z),F=n.length(R);isFinite(F)&&F>S&&(S=F),D.push(F)}L=N}}var U=o(m,t.colormap,S,A);return f?U.tubeScale=f:(0===S&&(S=1),U.tubeScale=.5*u*A/S),U};var u=t("./lib/shaders"),f=t("gl-cone3d").createMesh;e.exports.createTubeMesh=function(t,e){return f(t,e,{shaders:u,traceType:"streamtube"})}},{"./lib/shaders":346,"gl-cone3d":260,"gl-vec3":377,"gl-vec4":413}],349:[function(t,e,r){var n=t("gl-shader"),i=t("glslify"),a=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute vec3 f;\nattribute vec3 normal;\n\nuniform vec3 objectOffset;\nuniform mat4 model, view, projection, inverseModel;\nuniform vec3 lightPosition, eyePosition;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 localCoordinate = vec3(uv.zw, f.x);\n worldCoordinate = objectOffset + localCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n vec4 clipPosition = projection * view * worldPosition;\n gl_Position = clipPosition;\n kill = f.y;\n value = f.z;\n planeCoordinate = uv.xy;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Lighting geometry parameters\n vec4 cameraCoordinate = view * worldPosition;\n cameraCoordinate.xyz /= cameraCoordinate.w;\n lightDirection = lightPosition - cameraCoordinate.xyz;\n eyeDirection = eyePosition - cameraCoordinate.xyz;\n surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz);\n}\n"]),o=i(["precision highp float;\n#define GLSLIFY 1\n\nfloat beckmannDistribution(float x, float roughness) {\n float NdotH = max(x, 0.0001);\n float cos2Alpha = NdotH * NdotH;\n float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha;\n float roughness2 = roughness * roughness;\n float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha;\n return exp(tan2Alpha / roughness2) / denom;\n}\n\nfloat beckmannSpecular(\n vec3 lightDirection,\n vec3 viewDirection,\n vec3 surfaceNormal,\n float roughness) {\n return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness);\n}\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec3 lowerBound, upperBound;\nuniform float contourTint;\nuniform vec4 contourColor;\nuniform sampler2D colormap;\nuniform vec3 clipBounds[2];\nuniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity;\nuniform float vertexColor;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n if (\n kill > 0.0 ||\n vColor.a == 0.0 ||\n outOfRange(clipBounds[0], clipBounds[1], worldCoordinate)\n ) discard;\n\n vec3 N = normalize(surfaceNormal);\n vec3 V = normalize(eyeDirection);\n vec3 L = normalize(lightDirection);\n\n if(gl_FrontFacing) {\n N = -N;\n }\n\n float specular = max(beckmannSpecular(L, V, N, roughness), 0.);\n float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0);\n\n //decide how to interpolate color \u2014 in vertex or in fragment\n vec4 surfaceColor =\n step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) +\n step(.5, vertexColor) * vColor;\n\n vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0);\n\n gl_FragColor = mix(litColor, contourColor, contourTint) * opacity;\n}\n"]),s=i(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec4 uv;\nattribute float f;\n\nuniform vec3 objectOffset;\nuniform mat3 permutation;\nuniform mat4 model, view, projection;\nuniform float height, zOffset;\nuniform sampler2D colormap;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 lightDirection, eyeDirection, surfaceNormal;\nvarying vec4 vColor;\n\nvoid main() {\n vec3 dataCoordinate = permutation * vec3(uv.xy, height);\n worldCoordinate = objectOffset + dataCoordinate;\n vec4 worldPosition = model * vec4(worldCoordinate, 1.0);\n\n vec4 clipPosition = projection * view * worldPosition;\n clipPosition.z += zOffset;\n\n gl_Position = clipPosition;\n value = f + objectOffset.z;\n kill = -1.0;\n planeCoordinate = uv.zw;\n\n vColor = texture2D(colormap, vec2(value, value));\n\n //Don't do lighting for contours\n surfaceNormal = vec3(1,0,0);\n eyeDirection = vec3(0,1,0);\n lightDirection = vec3(0,0,1);\n}\n"]),l=i(["precision highp float;\n#define GLSLIFY 1\n\nbool outOfRange(float a, float b, float p) {\n return ((p > max(a, b)) || \n (p < min(a, b)));\n}\n\nbool outOfRange(vec2 a, vec2 b, vec2 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y));\n}\n\nbool outOfRange(vec3 a, vec3 b, vec3 p) {\n return (outOfRange(a.x, b.x, p.x) ||\n outOfRange(a.y, b.y, p.y) ||\n outOfRange(a.z, b.z, p.z));\n}\n\nbool outOfRange(vec4 a, vec4 b, vec4 p) {\n return outOfRange(a.xyz, b.xyz, p.xyz);\n}\n\nuniform vec2 shape;\nuniform vec3 clipBounds[2];\nuniform float pickId;\n\nvarying float value, kill;\nvarying vec3 worldCoordinate;\nvarying vec2 planeCoordinate;\nvarying vec3 surfaceNormal;\n\nvec2 splitFloat(float v) {\n float vh = 255.0 * v;\n float upper = floor(vh);\n float lower = fract(vh);\n return vec2(upper / 255.0, floor(lower * 16.0) / 16.0);\n}\n\nvoid main() {\n if ((kill > 0.0) ||\n (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard;\n\n vec2 ux = splitFloat(planeCoordinate.x / shape.x);\n vec2 uy = splitFloat(planeCoordinate.y / shape.y);\n gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0));\n}\n"]);r.createShader=function(t){var e=n(t,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createPickShader=function(t){var e=n(t,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e.attributes.normal.location=2,e},r.createContourShader=function(t){var e=n(t,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e},r.createPickContourShader=function(t){var e=n(t,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return e.attributes.uv.location=0,e.attributes.f.location=1,e}},{"gl-shader":335,glslify:350}],350:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],351:[function(t,e,r){"use strict";e.exports=function(t){var e=t.gl,r=y(e),n=b(e),s=x(e),l=_(e),c=i(e),u=a(e,[{buffer:c,size:4,stride:40,offset:0},{buffer:c,size:3,stride:40,offset:16},{buffer:c,size:3,stride:40,offset:28}]),f=i(e),h=a(e,[{buffer:f,size:4,stride:20,offset:0},{buffer:f,size:1,stride:20,offset:16}]),p=i(e),d=a(e,[{buffer:p,size:2,type:e.FLOAT}]),g=o(e,1,256,e.RGBA,e.UNSIGNED_BYTE);g.minFilter=e.LINEAR,g.magFilter=e.LINEAR;var m=new A(e,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,g,s,l,f,h,p,d,[0,0,0]),v={levels:[[],[],[]]};for(var w in t)v[w]=t[w];return v.colormap=v.colormap||"jet",m.update(v),m};var n=t("bit-twiddle"),i=t("gl-buffer"),a=t("gl-vao"),o=t("gl-texture2d"),s=t("typedarray-pool"),l=t("colormap"),c=t("ndarray-ops"),u=t("ndarray-pack"),f=t("ndarray"),h=t("surface-nets"),p=t("gl-mat4/multiply"),d=t("gl-mat4/invert"),g=t("binary-search-bounds"),m=t("ndarray-gradient"),v=t("./lib/shaders"),y=v.createShader,x=v.createContourShader,b=v.createPickShader,_=v.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],T=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],k=[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]];function M(t,e,r,n,i){this.position=t,this.index=e,this.uv=r,this.level=n,this.dataCoordinate=i}!function(){for(var t=0;t<3;++t){var e=k[t],r=(t+2)%3;e[(t+1)%3+0]=1,e[r+3]=1,e[t+6]=1}}();function A(t,e,r,n,i,a,o,l,c,u,h,p,d,g,m){this.gl=t,this.shape=e,this.bounds=r,this.objectOffset=m,this.intensityBounds=[],this._shader=n,this._pickShader=i,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=h,this._contourVAO=p,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new M([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=d,this._dynamicVAO=g,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0]),f(s.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var S=A.prototype;S.genColormap=function(t,e){var r=!1,n=u([l({colormap:t,nshades:256,format:"rgba"}).map((function(t,n){var i=e?function(t,e){if(!e)return 1;if(!e.length)return 1;for(var r=0;rt&&r>0){var n=(e[r][0]-t)/(e[r][0]-e[r-1][0]);return e[r][1]*(1-n)+n*e[r-1][1]}}return 1}(n/255,e):t[3];return i<1&&(r=!0),[t[0],t[1],t[2],255*i]}))]);return c.divseq(n,255),this.hasAlphaScale=r,n},S.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},S.isOpaque=function(){return!this.isTransparent()},S.pickSlots=1,S.setPickBase=function(t){this.pickId=t};var E=[0,0,0],C={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function L(t,e){var r,n,i,a=e.axes&&e.axes.lastCubeProps.axis||E,o=e.showSurface,s=e.showContour;for(r=0;r<3;++r)for(o=o||e.surfaceProject[r],n=0;n<3;++n)s=s||e.contourProject[r][n];for(r=0;r<3;++r){var l=C.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=e.axesBounds[+(a[r]>0)][r],p(l,t.model,l);var c=C.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=t.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return C.showSurface=o,C.showContour=s,C}var I={model:w,view:w,projection:w,inverseModel:w.slice(),lowerBound:[0,0,0],upperBound:[0,0,0],colorMap:0,clipBounds:[[0,0,0],[0,0,0]],height:0,contourTint:0,contourColor:[0,0,0,1],permutation:[1,0,0,0,1,0,0,0,1],zOffset:-1e-4,objectOffset:[0,0,0],kambient:1,kdiffuse:1,kspecular:1,lightPosition:[1e3,1e3,1e3],eyePosition:[0,0,0],roughness:1,fresnel:1,opacity:1,vertexColor:0},P=w.slice(),z=[1,0,0,0,1,0,0,0,1];function O(t,e){t=t||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0);var n=I;n.model=t.model||w,n.view=t.view||w,n.projection=t.projection||w,n.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],n.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],n.objectOffset=this.objectOffset,n.contourColor=this.contourColor[0],n.inverseModel=d(n.inverseModel,n.model);for(var i=0;i<2;++i)for(var a=n.clipBounds[i],o=0;o<3;++o)a[o]=Math.min(Math.max(this.clipBounds[i][o],-1e8),1e8);n.kambient=this.ambientLight,n.kdiffuse=this.diffuseLight,n.kspecular=this.specularLight,n.roughness=this.roughness,n.fresnel=this.fresnel,n.opacity=this.opacity,n.height=0,n.permutation=z,n.vertexColor=this.vertexColor;var s=P;for(p(s,n.view,n.model),p(s,n.projection,s),d(s,s),i=0;i<3;++i)n.eyePosition[i]=s[12+i]/s[15];var l=s[15];for(i=0;i<3;++i)l+=this.lightPosition[i]*s[4*i+3];for(i=0;i<3;++i){var c=s[12+i];for(o=0;o<3;++o)c+=s[4*o+i]*this.lightPosition[o];n.lightPosition[i]=c/l}var u=L(n,this);if(u.showSurface){for(this._shader.bind(),this._shader.uniforms=n,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),i=0;i<3;++i)this.surfaceProject[i]&&this.vertexCount&&(this._shader.uniforms.model=u.projections[i],this._shader.uniforms.clipBounds=u.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(u.showContour){var f=this._contourShader;n.kambient=1,n.kdiffuse=0,n.kspecular=0,n.opacity=1,f.bind(),f.uniforms=n;var h=this._contourVAO;for(h.bind(),i=0;i<3;++i)for(f.uniforms.permutation=k[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),o=0;o>4)/16)/255,i=Math.floor(n),a=n-i,o=e[1]*(t.value[1]+(15&t.value[2])/16)/255,s=Math.floor(o),l=o-s;i+=1,s+=1;var c=r.position;c[0]=c[1]=c[2]=0;for(var u=0;u<2;++u)for(var f=u?a:1-a,h=0;h<2;++h)for(var p=i+u,d=s+h,m=f*(h?l:1-l),v=0;v<3;++v)c[v]+=this._field[v].get(p,d)*m;for(var y=this._pickResult.level,x=0;x<3;++x)if(y[x]=g.le(this.contourLevels[x],c[x]),y[x]<0)this.contourLevels[x].length>0&&(y[x]=0);else if(y[x]Math.abs(_-c[x])&&(y[x]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/e[0],r.uv[1]=o/e[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},S.padField=function(t,e){var r=e.shape.slice(),n=t.shape.slice();c.assign(t.lo(1,1).hi(r[0],r[1]),e),c.assign(t.lo(1).hi(r[0],1),e.hi(r[0],1)),c.assign(t.lo(1,n[1]-1).hi(r[0],1),e.lo(0,r[1]-1).hi(r[0],1)),c.assign(t.lo(0,1).hi(1,r[1]),e.hi(1)),c.assign(t.lo(n[0]-1,1).hi(1,r[1]),e.lo(r[0]-1)),t.set(0,0,e.get(0,0)),t.set(0,n[1]-1,e.get(0,r[1]-1)),t.set(n[0]-1,0,e.get(r[0]-1,0)),t.set(n[0]-1,n[1]-1,e.get(r[0]-1,r[1]-1))},S.update=function(t){t=t||{},this.objectOffset=t.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in t&&(this.contourWidth=R(t.contourWidth,Number)),"showContour"in t&&(this.showContour=R(t.showContour,Boolean)),"showSurface"in t&&(this.showSurface=!!t.showSurface),"contourTint"in t&&(this.contourTint=R(t.contourTint,Boolean)),"contourColor"in t&&(this.contourColor=B(t.contourColor)),"contourProject"in t&&(this.contourProject=R(t.contourProject,(function(t){return R(t,Boolean)}))),"surfaceProject"in t&&(this.surfaceProject=t.surfaceProject),"dynamicColor"in t&&(this.dynamicColor=B(t.dynamicColor)),"dynamicTint"in t&&(this.dynamicTint=R(t.dynamicTint,Number)),"dynamicWidth"in t&&(this.dynamicWidth=R(t.dynamicWidth,Number)),"opacity"in t&&(this.opacity=t.opacity),"opacityscale"in t&&(this.opacityscale=t.opacityscale),"colorBounds"in t&&(this.colorBounds=t.colorBounds),"vertexColor"in t&&(this.vertexColor=t.vertexColor?1:0),"colormap"in t&&this._colorMap.setPixels(this.genColormap(t.colormap,this.opacityscale));var e=t.field||t.coords&&t.coords[2]||null,r=!1;if(e||(e=this._field[2].shape[0]||this._field[2].shape[2]?this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):this._field[2].hi(0,0)),"field"in t||"coords"in t){var i=(e.shape[0]+2)*(e.shape[1]+2);i>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(i))),this._field[2]=f(this._field[2].data,[e.shape[0]+2,e.shape[1]+2]),this.padField(this._field[2],e),this.shape=e.shape.slice();for(var a=this.shape,o=0;o<2;++o)this._field[2].size>this._field[o].data.length&&(s.freeFloat(this._field[o].data),this._field[o].data=s.mallocFloat(this._field[2].size)),this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2]);if(t.coords){var l=t.coords;if(!Array.isArray(l)||3!==l.length)throw new Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(v=0;v<2;++v)if(c.shape[v]!==a[v])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(t.ticks){var u=t.ticks;if(!Array.isArray(u)||2!==u.length)throw new Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var p=u[o];if((Array.isArray(p)||p.length)&&(p=f(p)),p.shape[0]!==a[o])throw new Error("gl-surface: invalid tick length");var d=f(p.data,a);d.stride[o]=p.stride[0],d.stride[1^o]=0,this.padField(this._field[o],d)}}else{for(o=0;o<2;++o){var g=[0,0];g[o]=1,this._field[o]=f(this._field[o].data,[a[0]+2,a[1]+2],g,0)}this._field[0].set(0,0,0);for(var v=0;v0){for(var xt=0;xt<5;++xt)Q.pop();U-=1}continue t}Q.push(nt[0],nt[1],ot[0],ot[1],nt[2]),U+=1}}rt.push(U)}this._contourOffsets[$]=et,this._contourCounts[$]=rt}var bt=s.mallocFloat(Q.length);for(o=0;o halfCharStep + halfCharWidth ||\n\t\t\t\t\tfloor(uv.x) < halfCharStep - halfCharWidth) return;\n\n\t\t\t\tuv += charId * charStep;\n\t\t\t\tuv = uv / atlasSize;\n\n\t\t\t\tvec4 color = fontColor;\n\t\t\t\tvec4 mask = texture2D(atlas, uv);\n\n\t\t\t\tfloat maskY = lightness(mask);\n\t\t\t\t// float colorY = lightness(color);\n\t\t\t\tcolor.a *= maskY;\n\t\t\t\tcolor.a *= opacity;\n\n\t\t\t\t// color.a += .1;\n\n\t\t\t\t// antialiasing, see yiq color space y-channel formula\n\t\t\t\t// color.rgb += (1. - color.rgb) * (1. - mask.rgb);\n\n\t\t\t\tgl_FragColor = color;\n\t\t\t}"});return{regl:t,draw:e,atlas:{}}},T.prototype.update=function(t){var e=this;if("string"==typeof t)t={text:t};else if(!t)return;null!=(t=i(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0)).opacity&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map((function(t){return parseFloat(t)})):this.opacity=parseFloat(t.opacity)),null!=t.viewport&&(this.viewport=f(t.viewport),T.normalViewport&&(this.viewport.y=this.canvas.height-this.viewport.y-this.viewport.height),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=t.kerning&&(this.kerning=t.kerning),null!=t.offset&&("number"==typeof t.offset&&(t.offset=[t.offset,0]),this.positionOffset=y(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||t.font||(t.font=T.baseFontSize+"px sans-serif");var r,a=!1,o=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach((function(t,r){if("string"==typeof t)try{t=n.parse(t)}catch(e){t=n.parse(T.baseFontSize+"px "+t)}else t=n.parse(n.stringify(t));var i=n.stringify({size:T.baseFontSize,family:t.family,stretch:_?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style}),s=p(t.size),l=Math.round(s[0]*d(s[1]));if(l!==e.fontSize[r]&&(o=!0,e.fontSize[r]=l),!(e.font[r]&&i==e.font[r].baseString||(a=!0,e.font[r]=T.fonts[i],e.font[r]))){var c=t.family.join(", "),u=[t.style];t.style!=t.variant&&u.push(t.variant),t.variant!=t.weight&&u.push(t.weight),_&&t.weight!=t.stretch&&u.push(t.stretch),e.font[r]={baseString:i,family:c,weight:t.weight,stretch:t.stretch,style:t.style,variant:t.variant,width:{},kerning:{},metrics:v(c,{origin:"top",fontSize:T.baseFontSize,fontStyle:u.join(" ")})},T.fonts[i]=e.font[r]}})),(a||o)&&this.font.forEach((function(r,i){var a=n.stringify({size:e.fontSize[i],family:r.family,stretch:_?r.stretch:void 0,variant:r.variant,weight:r.weight,style:r.style});if(e.fontAtlas[i]=e.shader.atlas[a],!e.fontAtlas[i]){var o=r.metrics;e.shader.atlas[a]=e.fontAtlas[i]={fontString:a,step:2*Math.ceil(e.fontSize[i]*o.bottom*.5),em:e.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:e.regl.texture()}}null==t.text&&(t.text=e.text)})),"string"==typeof t.text&&t.position&&t.position.length>2){for(var s=Array(.5*t.position.length),h=0;h2){for(var w=!t.position[0].length,k=u.mallocFloat(2*this.count),M=0,A=0;M1?e.align[r]:e.align[0]:e.align;if("number"==typeof n)return n;switch(n){case"right":case"end":return-t;case"center":case"centre":case"middle":return.5*-t}return 0}))),null==this.baseline&&null==t.baseline&&(t.baseline=0),null!=t.baseline&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map((function(t,r){var n=(e.font[r]||e.font[0]).metrics,i=0;return i+=.5*n.bottom,i+="number"==typeof t?t-n.baseline:-n[t],T.normalViewport||(i*=-1),i}))),null!=t.color)if(t.color||(t.color="transparent"),"string"!=typeof t.color&&isNaN(t.color)){var H;if("number"==typeof t.color[0]&&t.color.length>this.counts.length){var G=t.color.length;H=u.mallocUint8(G);for(var Y=(t.color.subarray||t.color.slice).bind(t.color),W=0;W4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var J=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array(J);for(var K=0;K1?this.counts[K]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[K]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*K,4*K+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[K]:this.opacity,baseline:null!=this.baselineOffset[K]?this.baselineOffset[K]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[K]?this.alignOffset[K]:this.alignOffset[0]:0,atlas:this.fontAtlas[K]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*K,2*K+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]},T.prototype.destroy=function(){},T.prototype.kerning=!0,T.prototype.position={constant:new Float32Array(2)},T.prototype.translate=null,T.prototype.scale=null,T.prototype.font=null,T.prototype.text="",T.prototype.positionOffset=[0,0],T.prototype.opacity=1,T.prototype.color=new Uint8Array([0,0,0,255]),T.prototype.alignOffset=[0,0],T.normalViewport=!1,T.maxAtlasSize=1024,T.atlasCanvas=document.createElement("canvas"),T.atlasContext=T.atlasCanvas.getContext("2d",{alpha:!1}),T.baseFontSize=64,T.fonts={},e.exports=T},{"bit-twiddle":97,"color-normalize":125,"css-font":144,"detect-kerning":172,"es6-weak-map":233,"flatten-vertex-data":244,"font-atlas":245,"font-measure":246,"gl-util/context":354,"is-plain-obj":469,"object-assign":499,"parse-rect":504,"parse-unit":506,"pick-by-alias":511,regl:540,"to-px":578,"typedarray-pool":595}],353:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("ndarray-ops"),a=t("typedarray-pool");e.exports=function(t){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");o||c(t);if("number"==typeof arguments[1])return v(t,arguments[1],arguments[2],arguments[3]||t.RGBA,arguments[4]||t.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return v(t,0|arguments[1][0],0|arguments[1][1],arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var e=arguments[1],r=u(e)?e:e.raw;if(r)return y(t,r,0|e.width,0|e.height,arguments[2]||t.RGBA,arguments[3]||t.UNSIGNED_BYTE);if(e.shape&&e.data&&e.stride)return x(t,e)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(t){o=[t.LINEAR,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_NEAREST],s=[t.NEAREST,t.LINEAR,t.NEAREST_MIPMAP_NEAREST,t.NEAREST_MIPMAP_LINEAR,t.LINEAR_MIPMAP_NEAREST,t.LINEAR_MIPMAP_LINEAR],l=[t.REPEAT,t.CLAMP_TO_EDGE,t.MIRRORED_REPEAT]}function u(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement||"undefined"!=typeof ImageData&&t instanceof ImageData}var f=function(t,e){i.muls(t,e,255)};function h(t,e,r){var n=t.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(e<0||e>i||r<0||r>i)throw new Error("gl-texture2d: Invalid texture size");return t._shape=[e,r],t.bind(),n.texImage2D(n.TEXTURE_2D,0,t.format,e,r,0,t.format,t.type,null),t._mipLevels=[0],t}function p(t,e,r,n,i,a){this.gl=t,this.handle=e,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=t.NEAREST,this._minFilter=t.NEAREST,this._wrapS=t.CLAMP_TO_EDGE,this._wrapT=t.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(t){return o.wrapS=t}},{get:function(){return o._wrapT},set:function(t){return o.wrapT=t}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(t){return o.width=t}},{get:function(){return o._shape[1]},set:function(t){return o.height=t}}]),this._shapeVector=l}var d=p.prototype;function g(t,e){return 3===t.length?1===e[2]&&e[1]===t[0]*t[2]&&e[0]===t[2]:1===e[0]&&e[1]===t[0]}function m(t){var e=t.createTexture();return t.bindTexture(t.TEXTURE_2D,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),e}function v(t,e,r,n,i){var a=t.getParameter(t.MAX_TEXTURE_SIZE);if(e<0||e>a||r<0||r>a)throw new Error("gl-texture2d: Invalid texture shape");if(i===t.FLOAT&&!t.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(t);return t.texImage2D(t.TEXTURE_2D,0,n,e,r,0,n,i,null),new p(t,o,e,r,n,i)}function y(t,e,r,n,i,a){var o=m(t);return t.texImage2D(t.TEXTURE_2D,0,i,i,a,e),new p(t,o,r,n,i,a)}function x(t,e){var r=e.dtype,o=e.shape.slice(),s=t.getParameter(t.MAX_TEXTURE_SIZE);if(o[0]<0||o[0]>s||o[1]<0||o[1]>s)throw new Error("gl-texture2d: Invalid texture size");var l=g(o,e.stride.slice()),c=0;"float32"===r?c=t.FLOAT:"float64"===r?(c=t.FLOAT,l=!1,r="float32"):"uint8"===r?c=t.UNSIGNED_BYTE:(c=t.UNSIGNED_BYTE,l=!1,r="uint8");var u,h,d=0;if(2===o.length)d=t.LUMINANCE,o=[o[0],o[1],1],e=n(e.data,o,[e.stride[0],e.stride[1],1],e.offset);else{if(3!==o.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===o[2])d=t.ALPHA;else if(2===o[2])d=t.LUMINANCE_ALPHA;else if(3===o[2])d=t.RGB;else{if(4!==o[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");d=t.RGBA}}c!==t.FLOAT||t.getExtension("OES_texture_float")||(c=t.UNSIGNED_BYTE,l=!1);var v=e.size;if(l)u=0===e.offset&&e.data.length===v?e.data:e.data.subarray(e.offset,e.offset+v);else{var y=[o[2],o[2]*o[0],1];h=a.malloc(v,r);var x=n(h,o,y,0);"float32"!==r&&"float64"!==r||c!==t.UNSIGNED_BYTE?i.assign(x,e):f(x,e),u=h.subarray(0,v)}var b=m(t);return t.texImage2D(t.TEXTURE_2D,0,d,o[0],o[1],0,d,c,u),l||a.free(h),new p(t,b,o[0],o[1],d,c)}Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),this._minFilter=t}},magFilter:{get:function(){return this._magFilter},set:function(t){this.bind();var e=this.gl;if(this.type===e.FLOAT&&o.indexOf(t)>=0&&(e.getExtension("OES_texture_float_linear")||(t=e.NEAREST)),s.indexOf(t)<0)throw new Error("gl-texture2d: Unknown filter mode "+t);return e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t),this._magFilter=t}},mipSamples:{get:function(){return this._anisoSamples},set:function(t){var e=this._anisoSamples;if(this._anisoSamples=0|Math.max(t,1),e!==this._anisoSamples){var r=this.gl.getExtension("EXT_texture_filter_anisotropic");r&&this.gl.texParameterf(this.gl.TEXTURE_2D,r.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,t),this._wrapS=t}},wrapT:{get:function(){return this._wrapT},set:function(t){if(this.bind(),l.indexOf(t)<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,t),this._wrapT=t}},wrap:{get:function(){return this._wrapVector},set:function(t){if(Array.isArray(t)||(t=[t,t]),2!==t.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var e=0;e<2;++e)if(l.indexOf(t[e])<0)throw new Error("gl-texture2d: Unknown wrap mode "+t);this._wrapS=t[0],this._wrapT=t[1];var r=this.gl;return this.bind(),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,this._wrapS),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,this._wrapT),t}},shape:{get:function(){return this._shapeVector},set:function(t){if(Array.isArray(t)){if(2!==t.length)throw new Error("gl-texture2d: Invalid texture shape")}else t=[0|t,0|t];return h(this,0|t[0],0|t[1]),[0|t[0],0|t[1]]}},width:{get:function(){return this._shape[0]},set:function(t){return h(this,t|=0,this._shape[1]),t}},height:{get:function(){return this._shape[1]},set:function(t){return t|=0,h(this,this._shape[0],t),t}}}),d.bind=function(t){var e=this.gl;return void 0!==t&&e.activeTexture(e.TEXTURE0+(0|t)),e.bindTexture(e.TEXTURE_2D,this.handle),void 0!==t?0|t:e.getParameter(e.ACTIVE_TEXTURE)-e.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var t=Math.min(this._shape[0],this._shape[1]),e=0;t>0;++e,t>>>=1)this._mipLevels.indexOf(e)<0&&this._mipLevels.push(e)},d.setPixels=function(t,e,r,o){var s=this.gl;this.bind(),Array.isArray(e)?(o=r,r=0|e[1],e=0|e[0]):(e=e||0,r=r||0),o=o||0;var l=u(t)?t:t.raw;if(l){this._mipLevels.indexOf(o)<0?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,e,r,this.format,this.type,l)}else{if(!(t.shape&&t.stride&&t.data))throw new Error("gl-texture2d: Unsupported data type");if(t.shape.length<2||e+t.shape[1]>this._shape[1]>>>o||r+t.shape[0]>this._shape[0]>>>o||e<0||r<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(t,e,r,o,s,l,c,u){var h=u.dtype,p=u.shape.slice();if(p.length<2||p.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var d=0,m=0,v=g(p,u.stride.slice());"float32"===h?d=t.FLOAT:"float64"===h?(d=t.FLOAT,v=!1,h="float32"):"uint8"===h?d=t.UNSIGNED_BYTE:(d=t.UNSIGNED_BYTE,v=!1,h="uint8");if(2===p.length)m=t.LUMINANCE,p=[p[0],p[1],1],u=n(u.data,p,[u.stride[0],u.stride[1],1],u.offset);else{if(3!==p.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===p[2])m=t.ALPHA;else if(2===p[2])m=t.LUMINANCE_ALPHA;else if(3===p[2])m=t.RGB;else{if(4!==p[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");m=t.RGBA}p[2]}m!==t.LUMINANCE&&m!==t.ALPHA||s!==t.LUMINANCE&&s!==t.ALPHA||(m=s);if(m!==s)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var y=u.size,x=c.indexOf(o)<0;x&&c.push(o);if(d===l&&v)0===u.offset&&u.data.length===y?x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,u.data):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,u.data):x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,u.data.subarray(u.offset,u.offset+y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,u.data.subarray(u.offset,u.offset+y));else{var b;b=l===t.FLOAT?a.mallocFloat32(y):a.mallocUint8(y);var _=n(b,p,[p[2],p[2]*p[0],1]);d===t.FLOAT&&l===t.UNSIGNED_BYTE?f(_,u):i.assign(_,u),x?t.texImage2D(t.TEXTURE_2D,o,s,p[0],p[1],0,s,l,b.subarray(0,y)):t.texSubImage2D(t.TEXTURE_2D,o,e,r,p[0],p[1],s,l,b.subarray(0,y)),l===t.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,e,r,o,this.format,this.type,this._mipLevels,t)}}},{ndarray:495,"ndarray-ops":490,"typedarray-pool":595}],354:[function(t,e,r){(function(r){(function(){"use strict";var n=t("pick-by-alias");function i(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*r.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*r.innerHeight);else{var e=t.container.getBoundingClientRect();t.canvas.width=t.width||e.right-e.left,t.canvas.height=t.height||e.bottom-e.top}}function a(t){return"function"==typeof t.getContext&&"width"in t&&"height"in t}function o(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}e.exports=function(t){var e;if(t?"string"==typeof t&&(t={container:t}):t={},a(t)?t={container:t}:t="string"==typeof(e=t).nodeName&&"function"==typeof e.appendChild&&"function"==typeof e.getBoundingClientRect?{container:t}:function(t){return"function"==typeof t.drawArrays||"function"==typeof t.drawElements}(t)?{gl:t}:n(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),t.pixelRatio||(t.pixelRatio=r.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if("string"==typeof t.container){var s=document.querySelector(t.container);if(!s)throw Error("Element "+t.container+" is not found");t.container=s}a(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=o(),t.container.appendChild(t.canvas),i(t))}else if(!t.canvas){if("undefined"==typeof document)throw Error("Not DOM environment. Use headless-gl.");t.container=document.body||document.documentElement,t.canvas=o(),t.container.appendChild(t.canvas),i(t)}if(!t.gl)try{t.gl=t.canvas.getContext("webgl",t.attrs)}catch(e){try{t.gl=t.canvas.getContext("experimental-webgl",t.attrs)}catch(e){t.gl=t.canvas.getContext("webgl-experimental",t.attrs)}}return t.gl}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"pick-by-alias":511}],355:[function(t,e,r){"use strict";e.exports=function(t,e,r){e?e.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=0|t.getParameter(t.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=t("./fromValues"),i=t("./normalize"),a=t("./dot")},{"./dot":370,"./fromValues":376,"./normalize":387}],361:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t}},{}],362:[function(t,e,r){e.exports=function(t){var e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},{}],363:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},{}],364:[function(t,e,r){e.exports=function(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},{}],365:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t}},{}],366:[function(t,e,r){e.exports=t("./distance")},{"./distance":367}],367:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},{}],368:[function(t,e,r){e.exports=t("./divide")},{"./divide":369}],369:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t}},{}],370:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}},{}],371:[function(t,e,r){e.exports=1e-6},{}],372:[function(t,e,r){e.exports=function(t,e){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1],l=e[2];return Math.abs(r-o)<=n*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=n*Math.max(1,Math.abs(i),Math.abs(s))&&Math.abs(a-l)<=n*Math.max(1,Math.abs(a),Math.abs(l))};var n=t("./epsilon")},{"./epsilon":371}],373:[function(t,e,r){e.exports=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}},{}],374:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t}},{}],375:[function(t,e,r){e.exports=function(t,e,r,i,a,o){var s,l;e||(e=3);r||(r=0);l=i?Math.min(i*e+r,t.length):t.length;for(s=r;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a);return t}},{}],388:[function(t,e,r){e.exports=function(t,e){e=e||1;var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*e;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*e,t}},{}],389:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[1],a=r[2],o=e[1]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=e[0],t[1]=i+o*c-s*l,t[2]=a+o*l+s*c,t}},{}],390:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[2],o=e[0]-i,s=e[2]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+s*l+o*c,t[1]=e[1],t[2]=a+s*c-o*l,t}},{}],391:[function(t,e,r){e.exports=function(t,e,r,n){var i=r[0],a=r[1],o=e[0]-i,s=e[1]-a,l=Math.sin(n),c=Math.cos(n);return t[0]=i+o*c-s*l,t[1]=a+o*l+s*c,t[2]=e[2],t}},{}],392:[function(t,e,r){e.exports=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t}},{}],393:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}},{}],394:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}},{}],395:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}},{}],396:[function(t,e,r){e.exports=t("./squaredDistance")},{"./squaredDistance":398}],397:[function(t,e,r){e.exports=t("./squaredLength")},{"./squaredLength":399}],398:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2];return r*r+n*n+i*i}},{}],399:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}},{}],400:[function(t,e,r){e.exports=t("./subtract")},{"./subtract":401}],401:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}},{}],402:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2];return t[0]=n*r[0]+i*r[3]+a*r[6],t[1]=n*r[1]+i*r[4]+a*r[7],t[2]=n*r[2]+i*r[5]+a*r[8],t}},{}],403:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,t[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,t[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,t[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,t}},{}],404:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t}},{}],405:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t}},{}],406:[function(t,e,r){e.exports=function(t){var e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},{}],407:[function(t,e,r){e.exports=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},{}],408:[function(t,e,r){e.exports=function(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},{}],409:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},{}],410:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[2],t[3]=e[3]/r[3],t}},{}],411:[function(t,e,r){e.exports=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}},{}],412:[function(t,e,r){e.exports=function(t,e,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=e,i[2]=r,i[3]=n,i}},{}],413:[function(t,e,r){e.exports={create:t("./create"),clone:t("./clone"),fromValues:t("./fromValues"),copy:t("./copy"),set:t("./set"),add:t("./add"),subtract:t("./subtract"),multiply:t("./multiply"),divide:t("./divide"),min:t("./min"),max:t("./max"),scale:t("./scale"),scaleAndAdd:t("./scaleAndAdd"),distance:t("./distance"),squaredDistance:t("./squaredDistance"),length:t("./length"),squaredLength:t("./squaredLength"),negate:t("./negate"),inverse:t("./inverse"),normalize:t("./normalize"),dot:t("./dot"),lerp:t("./lerp"),random:t("./random"),transformMat4:t("./transformMat4"),transformQuat:t("./transformQuat")}},{"./add":405,"./clone":406,"./copy":407,"./create":408,"./distance":409,"./divide":410,"./dot":411,"./fromValues":412,"./inverse":414,"./length":415,"./lerp":416,"./max":417,"./min":418,"./multiply":419,"./negate":420,"./normalize":421,"./random":422,"./scale":423,"./scaleAndAdd":424,"./set":425,"./squaredDistance":426,"./squaredLength":427,"./subtract":428,"./transformMat4":429,"./transformQuat":430}],414:[function(t,e,r){e.exports=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t[3]=1/e[3],t}},{}],415:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(e*e+r*r+n*n+i*i)}},{}],416:[function(t,e,r){e.exports=function(t,e,r,n){var i=e[0],a=e[1],o=e[2],s=e[3];return t[0]=i+n*(r[0]-i),t[1]=a+n*(r[1]-a),t[2]=o+n*(r[2]-o),t[3]=s+n*(r[3]-s),t}},{}],417:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t[3]=Math.max(e[3],r[3]),t}},{}],418:[function(t,e,r){e.exports=function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t[3]=Math.min(e[3],r[3]),t}},{}],419:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t[3]=e[3]*r[3],t}},{}],420:[function(t,e,r){e.exports=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=-e[3],t}},{}],421:[function(t,e,r){e.exports=function(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=r*r+n*n+i*i+a*a;o>0&&(o=1/Math.sqrt(o),t[0]=r*o,t[1]=n*o,t[2]=i*o,t[3]=a*o);return t}},{}],422:[function(t,e,r){var n=t("./normalize"),i=t("./scale");e.exports=function(t,e){return e=e||1,t[0]=Math.random(),t[1]=Math.random(),t[2]=Math.random(),t[3]=Math.random(),n(t,t),i(t,t,e),t}},{"./normalize":421,"./scale":423}],423:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t}},{}],424:[function(t,e,r){e.exports=function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t}},{}],425:[function(t,e,r){e.exports=function(t,e,r,n,i){return t[0]=e,t[1]=r,t[2]=n,t[3]=i,t}},{}],426:[function(t,e,r){e.exports=function(t,e){var r=e[0]-t[0],n=e[1]-t[1],i=e[2]-t[2],a=e[3]-t[3];return r*r+n*n+i*i+a*a}},{}],427:[function(t,e,r){e.exports=function(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}},{}],428:[function(t,e,r){e.exports=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t}},{}],429:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}},{}],430:[function(t,e,r){e.exports=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*n+s*a-l*i,f=c*i+l*n-o*a,h=c*a+o*i-s*n,p=-o*n-s*i-l*a;return t[0]=u*c+p*-o+f*-l-h*-s,t[1]=f*c+p*-s+h*-o-u*-l,t[2]=h*c+p*-l+u*-s-f*-o,t[3]=e[3],t}},{}],431:[function(t,e,r){var n=t("glsl-tokenizer"),i=t("atob-lite");e.exports=function(t){for(var e=Array.isArray(t)?t:n(t),r=0;r0)continue;r=t.slice(0,1).join("")}return M(r),v+=r.length,(p=p.slice(r.length)).length}}function P(){return/[^a-fA-F0-9]/.test(e)?(M(p.join("")),h=999,u):(p.push(e),r=e,u+1)}function z(){return"."===e||/[eE]/.test(e)?(p.push(e),h=5,r=e,u+1):"x"===e&&1===p.length&&"0"===p[0]?(h=11,p.push(e),r=e,u+1):/[^\d]/.test(e)?(M(p.join("")),h=999,u):(p.push(e),r=e,u+1)}function O(){return"f"===e&&(p.push(e),r=e,u+=1),/[eE]/.test(e)?(p.push(e),r=e,u+1):("-"!==e&&"+"!==e||!/[eE]/.test(r))&&/[^\d]/.test(e)?(M(p.join("")),h=999,u):(p.push(e),r=e,u+1)}function D(){if(/[^\d\w_]/.test(e)){var t=p.join("");return h=k[t]?8:T[t]?7:6,M(p.join("")),h=999,u}return p.push(e),r=e,u+1}};var n=t("./lib/literals"),i=t("./lib/operators"),a=t("./lib/builtins"),o=t("./lib/literals-300es"),s=t("./lib/builtins-300es"),l=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},{"./lib/builtins":434,"./lib/builtins-300es":433,"./lib/literals":436,"./lib/literals-300es":435,"./lib/operators":437}],433:[function(t,e,r){var n=t("./builtins");n=n.slice().filter((function(t){return!/^(gl\_|texture)/.test(t)})),e.exports=n.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])},{"./builtins":434}],434:[function(t,e,r){e.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]},{}],435:[function(t,e,r){var n=t("./literals");e.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])},{"./literals":436}],436:[function(t,e,r){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]},{}],437:[function(t,e,r){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},{}],438:[function(t,e,r){var n=t("./index");e.exports=function(t,e){var r=n(e),i=[];return i=(i=i.concat(r(t))).concat(r(null))}},{"./index":432}],439:[function(t,e,r){arguments[4][257][0].apply(r,arguments)},{dup:257}],440:[function(t,e,r){(function(r){(function(){"use strict";var n,i=t("is-browser");n="function"==typeof r.matchMedia?!r.matchMedia("(hover: none)").matches:i,e.exports=n}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"is-browser":464}],441:[function(t,e,r){"use strict";var n=t("is-browser");e.exports=n&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){t=!1}return t}()},{"is-browser":464}],442:[function(t,e,r){r.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},r.write=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g}},{}],443:[function(t,e,r){"use strict";var n=t("./types");e.exports=function(t,e){var r;for(r in n)if(n[r].detect(t,e))return r}},{"./types":446}],444:[function(t,e,r){(function(r){(function(){"use strict";var n=t("fs"),i=t("path"),a=t("./types"),o=t("./detector");function s(t,e){var r=o(t,e);if(r in a){var n=a[r].calculate(t,e);if(!1!==n)return n.type=r,n}throw new TypeError("unsupported file type: "+r+" (file: "+e+")")}e.exports=function(t,e){if(r.isBuffer(t))return s(t);if("string"!=typeof t)throw new TypeError("invalid invocation");var a=i.resolve(t);if("function"!=typeof e)return s(function(t){var e=n.openSync(t,"r"),i=n.fstatSync(e).size,a=Math.min(i,524288),o=r.alloc(a);return n.readSync(e,o,0,a,0),n.closeSync(e),o}(a),a);!function(t,e){n.open(t,"r",(function(i,a){if(i)return e(i);n.fstat(a,(function(i,o){if(i)return e(i);var s=o.size;if(s<=0)return e(new Error("File size is not greater than 0 \u2014\u2014 "+t));var l=Math.min(s,524288),c=r.alloc(l);n.read(a,c,0,l,0,(function(t){if(t)return e(t);n.close(a,(function(t){e(t,c)}))}))}))}))}(a,(function(t,r){if(t)return e(t);var n;try{n=s(r,a)}catch(e){t=e}e(t,n)}))},e.exports.types=Object.keys(a)}).call(this)}).call(this,t("buffer").Buffer)},{"./detector":443,"./types":446,buffer:111,fs:109,path:507}],445:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){return r=r||0,t["readUInt"+e+(n?"BE":"LE")].call(t,r)}},{}],446:[function(t,e,r){"use strict";var n={bmp:t("./types/bmp"),cur:t("./types/cur"),dds:t("./types/dds"),gif:t("./types/gif"),icns:t("./types/icns"),ico:t("./types/ico"),jpg:t("./types/jpg"),png:t("./types/png"),psd:t("./types/psd"),svg:t("./types/svg"),tiff:t("./types/tiff"),webp:t("./types/webp")};e.exports=n},{"./types/bmp":447,"./types/cur":448,"./types/dds":449,"./types/gif":450,"./types/icns":451,"./types/ico":452,"./types/jpg":453,"./types/png":454,"./types/psd":455,"./types/svg":456,"./types/tiff":457,"./types/webp":458}],447:[function(t,e,r){"use strict";e.exports={detect:function(t){return"BM"===t.toString("ascii",0,2)},calculate:function(t){return{width:t.readUInt32LE(18),height:Math.abs(t.readInt32LE(22))}}}},{}],448:[function(t,e,r){"use strict";e.exports={detect:function(t){return 0===t.readUInt16LE(0)&&2===t.readUInt16LE(2)},calculate:t("./ico").calculate}},{"./ico":452}],449:[function(t,e,r){"use strict";e.exports={detect:function(t){return 542327876===t.readUInt32LE(0)},calculate:function(t){return{height:t.readUInt32LE(12),width:t.readUInt32LE(16)}}}},{}],450:[function(t,e,r){"use strict";var n=/^GIF8[79]a/;e.exports={detect:function(t){var e=t.toString("ascii",0,6);return n.test(e)},calculate:function(t){return{width:t.readUInt16LE(6),height:t.readUInt16LE(8)}}}},{}],451:[function(t,e,r){"use strict";var n={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function i(t,e){var r=e+4;return[t.toString("ascii",e,r),t.readUInt32BE(r)]}function a(t){var e=n[t];return{width:e,height:e,type:t}}e.exports={detect:function(t){return"icns"===t.toString("ascii",0,4)},calculate:function(t){var e,r,n,o=t.length,s=8,l=t.readUInt32BE(4);if(r=a((e=i(t,s))[0]),(s+=e[1])===l)return r;for(n={width:r.width,height:r.height,images:[r]};st.length)return;var s=t.slice(r,i);if(274===n(s,16,0,e)){if(3!==n(s,16,2,e))return;if(1!==n(s,32,4,e))return;return n(s,16,8,e)}}}(r,a)}function s(t,e){if(e>t.length)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(255!==t[e])throw new TypeError("Invalid JPG, marker table corrupted")}e.exports={detect:function(t){return"ffd8"===t.toString("hex",0,2)},calculate:function(t){var e,r,n;for(t=t.slice(4);t.length;){if(r=t.readUInt16BE(0),i(t)&&(e=o(t,r)),s(t,r),192===(n=t[r+1])||193===n||194===n){var l=a(t,r+5);return e?{width:l.width,height:l.height,orientation:e}:l}t=t.slice(r+2)}throw new TypeError("Invalid JPG, no size found")}}},{"../readUInt":445}],454:[function(t,e,r){"use strict";e.exports={detect:function(t){if("PNG\r\n\x1a\n"===t.toString("ascii",1,8)){var e=t.toString("ascii",12,16);if("CgBI"===e&&(e=t.toString("ascii",28,32)),"IHDR"!==e)throw new TypeError("invalid png");return!0}},calculate:function(t){return"CgBI"===t.toString("ascii",12,16)?{width:t.readUInt32BE(32),height:t.readUInt32BE(36)}:{width:t.readUInt32BE(16),height:t.readUInt32BE(20)}}}},{}],455:[function(t,e,r){"use strict";e.exports={detect:function(t){return"8BPS"===t.toString("ascii",0,4)},calculate:function(t){return{width:t.readUInt32BE(18),height:t.readUInt32BE(14)}}}},{}],456:[function(t,e,r){"use strict";var n=/"']|"[^"]*"|'[^']*')*>/;var i={root:n,width:/\swidth=(['"])([^%]+?)\1/,height:/\sheight=(['"])([^%]+?)\1/,viewbox:/\sviewBox=(['"])(.+?)\1/},a={cm:96/2.54,mm:96/2.54/10,m:96/2.54*100,pt:96/72,pc:96/72/12,em:16,ex:8};function o(t){var e=/([0-9.]+)([a-z]*)/.exec(t);if(e)return Math.round(parseFloat(e[1])*(a[e[2]]||1))}function s(t){var e=t.split(" ");return{width:o(e[2]),height:o(e[3])}}e.exports={detect:function(t){return n.test(t)},calculate:function(t){var e=t.toString("utf8").match(i.root);if(e){var r=function(t){var e=t.match(i.width),r=t.match(i.height),n=t.match(i.viewbox);return{width:e&&o(e[2]),height:r&&o(r[2]),viewbox:n&&s(n[2])}}(e[0]);if(r.width&&r.height)return function(t){return{width:t.width,height:t.height}}(r);if(r.viewbox)return function(t){var e=t.viewbox.width/t.viewbox.height;return t.width?{width:t.width,height:Math.floor(t.width/e)}:t.height?{width:Math.floor(t.height*e),height:t.height}:{width:t.viewbox.width,height:t.viewbox.height}}(r)}throw new TypeError("invalid svg")}}},{}],457:[function(t,e,r){(function(r){(function(){"use strict";var n=t("fs"),i=t("../readUInt");function a(t,e){var r=i(t,16,8,e);return(i(t,16,10,e)<<16)+r}function o(t){if(t.length>24)return t.slice(12)}e.exports={detect:function(t){var e=t.toString("hex",0,4);return"49492a00"===e||"4d4d002a"===e},calculate:function(t,e){if(!e)throw new TypeError("Tiff doesn't support buffer");var s="BE"===function(t){var e=t.toString("ascii",0,2);return"II"===e?"LE":"MM"===e?"BE":void 0}(t),l=function(t,e){for(var r,n,s,l={};t&&t.length&&(r=i(t,16,0,e),n=i(t,16,2,e),s=i(t,32,4,e),0!==r);)1!==s||3!==n&&4!==n||(l[r]=a(t,e)),t=o(t);return l}(function(t,e,a){var o=i(t,32,4,a),s=1024,l=n.statSync(e).size;o+s>l&&(s=l-o-10);var c=r.alloc(s),u=n.openSync(e,"r");return n.readSync(u,c,0,s,o),c.slice(2)}(t,e,s),s),c=l[256],u=l[257];if(!c||!u)throw new TypeError("Invalid Tiff, missing tags");return{width:c,height:u}}}}).call(this)}).call(this,t("buffer").Buffer)},{"../readUInt":445,buffer:111,fs:109}],458:[function(t,e,r){"use strict";e.exports={detect:function(t){var e="RIFF"===t.toString("ascii",0,4),r="WEBP"===t.toString("ascii",8,12),n="VP8"===t.toString("ascii",12,15);return e&&r&&n},calculate:function(t){var e=t.toString("ascii",12,16);if(t=t.slice(20,30),"VP8X"===e){var r=t[0];return!(!(0==(192&r))||!(0==(1&r)))&&function(t){return{width:1+t.readUIntLE(4,3),height:1+t.readUIntLE(7,3)}}(t)}if("VP8 "===e&&47!==t[0])return function(t){return{width:16383&t.readInt16LE(6),height:16383&t.readInt16LE(8)}}(t);var n=t.toString("hex",3,6);return"VP8L"===e&&"9d012a"!==n&&function(t){return{width:1+((63&t[2])<<8|t[1]),height:1+((15&t[4])<<10|t[3]<<2|(192&t[2])>>6)}}(t)}}},{}],459:[function(t,e,r){"use strict";e.exports=function(t,e){var r=t.length;if(0===r)throw new Error("Must have at least d+1 points");var i=t[0].length;if(r<=i)throw new Error("Must input at least d+1 points");var o=t.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw new Error("Input not in general position");for(var l=new Array(i+1),u=0;u<=i;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);var f=new a(l,new Array(i+1),!1),h=f.adjacent,p=new Array(i+2);for(u=0;u<=i;++u){for(var d=l.slice(),g=0;g<=i;++g)g===u&&(d[g]=-1);var m=d[0];d[0]=d[1],d[1]=m;var v=new a(d,new Array(i+1),!0);h[u]=v,p[u]=v}p[i+1]=f;for(u=0;u<=i;++u){d=h[u].vertices;var y=h[u].adjacent;for(g=0;g<=i;++g){var x=d[g];if(x<0)y[g]=f;else for(var b=0;b<=i;++b)h[b].vertices.indexOf(x)<0&&(y[g]=h[b])}}var _=new c(i,o,p),w=!!e;for(u=i+1;u0&&e.push(","),e.push("tuple[",r,"]");e.push(")}return orient");var i=new Function("test",e.join("")),a=n[t+1];return a||(a=n),i(a)}(t)),this.orient=a}var u=c.prototype;u.handleBoundaryDegeneracy=function(t,e){var r=this.dimension,n=this.vertices.length-1,i=this.tuple,a=this.vertices,o=[t];for(t.lastVisited=-n;o.length>0;){(t=o.pop()).vertices;for(var s=t.adjacent,l=0;l<=r;++l){var c=s[l];if(c.boundary&&!(c.lastVisited<=-n)){for(var u=c.vertices,f=0;f<=r;++f){var h=u[f];i[f]=h<0?e:a[h]}var p=this.orient();if(p>0)return c;c.lastVisited=-n,0===p&&o.push(c)}}}return null},u.walk=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=e?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];t:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=n;++u)a[u]=i[l[u]];s.lastVisited=r;for(u=0;u<=n;++u){var f=c[u];if(!(f.lastVisited>=r)){var h=a[u];a[u]=t;var p=this.orient();if(a[u]=h,p<0){s=f;continue t}f.boundary?f.lastVisited=-r:f.lastVisited=r}}return}return s},u.addPeaks=function(t,e){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,f=[e];e.lastVisited=r,e.vertices[e.vertices.indexOf(-1)]=r,e.boundary=!1,c.push(e);for(var h=[];f.length>0;){var p=(e=f.pop()).vertices,d=e.adjacent,g=p.indexOf(r);if(!(g<0))for(var m=0;m<=n;++m)if(m!==g){var v=d[m];if(v.boundary&&!(v.lastVisited>=r)){var y=v.vertices;if(v.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)y[b]<0?(x=b,l[b]=t):l[b]=i[y[b]];if(this.orient()>0){y[x]=r,v.boundary=!1,c.push(v),f.push(v),v.lastVisited=r;continue}v.lastVisited=-r}var _=v.adjacent,w=p.slice(),T=d.slice(),k=new a(w,T,!0);u.push(k);var M=_.indexOf(e);if(!(M<0)){_[M]=k,T[g]=v,w[m]=-1,T[m]=e,d[m]=k,k.flip();for(b=0;b<=n;++b){var A=w[b];if(!(A<0||A===r)){for(var S=new Array(n-1),E=0,C=0;C<=n;++C){var L=w[C];L<0||C===b||(S[E++]=L)}h.push(new o(S,k,b))}}}}}}h.sort(s);for(m=0;m+1=0?o[l++]=s[u]:c=1&u;if(c===(1&t)){var f=o[0];o[0]=o[1],o[1]=f}e.push(o)}}return e}},{"robust-orientation":548,"simplicial-complex":558}],460:[function(t,e,r){"use strict";var n=t("binary-search-bounds");function i(t,e,r,n,i){this.mid=t,this.left=e,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(e?e.count:0)+(r?r.count:0)+n.length}e.exports=function(t){if(!t||0===t.length)return new v(null);return new v(m(t))};var a=i.prototype;function o(t,e){t.mid=e.mid,t.left=e.left,t.right=e.right,t.leftPoints=e.leftPoints,t.rightPoints=e.rightPoints,t.count=e.count}function s(t,e){var r=m(e);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function l(t,e){var r=t.intervals([]);r.push(e),s(t,r)}function c(t,e){var r=t.intervals([]),n=r.indexOf(e);return n<0?0:(r.splice(n,1),s(t,r),1)}function u(t,e,r){for(var n=0;n=0&&t[n][1]>=e;--n){var i=r(t[n]);if(i)return i}}function h(t,e){for(var r=0;r>1],a=[],o=[],s=[];for(r=0;r3*(e+1)?l(this,t):this.left.insert(t):this.left=m([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(e+1)?l(this,t):this.right.insert(t):this.right=m([t]);else{var r=n.ge(this.leftPoints,t,d),i=n.ge(this.rightPoints,t,g);this.leftPoints.splice(r,0,t),this.rightPoints.splice(i,0,t)}},a.remove=function(t){var e=this.count-this.leftPoints;if(t[1]3*(e-1)?c(this,t):2===(s=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(e-1)?c(this,t):2===(s=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===s&&(this.count-=1),s):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,i=this.left;i.right;)r=i,i=i.right;if(r===this)i.right=this.right;else{var a=this.left,s=this.right;r.count-=i.count,r.right=i.left,i.left=a,i.right=s}o(this,i),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(a=n.ge(this.leftPoints,t,d);athis.mid){var r;if(this.right)if(r=this.right.queryPoint(t,e))return r;return f(this.rightPoints,t,e)}return h(this.leftPoints,e)},a.queryInterval=function(t,e,r){var n;if(tthis.mid&&this.right&&(n=this.right.queryInterval(t,e,r)))return n;return ethis.mid?f(this.rightPoints,t,r):h(this.leftPoints,r)};var y=v.prototype;y.insert=function(t){this.root?this.root.insert(t):this.root=new i(t[0],null,null,[t],[t])},y.remove=function(t){if(this.root){var e=this.root.remove(t);return 2===e&&(this.root=null),0!==e}return!1},y.queryPoint=function(t,e){if(this.root)return this.root.queryPoint(t,e)},y.queryInterval=function(t,e,r){if(t<=e&&this.root)return this.root.queryInterval(t,e,r)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":461}],461:[function(t,e,r){arguments[4][243][0].apply(r,arguments)},{dup:243}],462:[function(t,e,r){"use strict";e.exports=function(t,e){e=e||new Array(t.length);for(var r=0;r - * @license MIT - */ -e.exports=function(t){return null!=t&&(n(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],466:[function(t,e,r){"use strict";e.exports="undefined"!=typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},{}],467:[function(t,e,r){"use strict";e.exports=a,e.exports.isMobile=a,e.exports.default=a;var n=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function a(t){t||(t={});var e=t.ua;if(e||"undefined"==typeof navigator||(e=navigator.userAgent),e&&e.headers&&"string"==typeof e.headers["user-agent"]&&(e=e.headers["user-agent"]),"string"!=typeof e)return!1;var r=t.tablet?i.test(e):n.test(e);return!r&&t.tablet&&t.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==e.indexOf("Macintosh")&&-1!==e.indexOf("Safari")&&(r=!0),r}},{}],468:[function(t,e,r){"use strict";e.exports=function(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}},{}],469:[function(t,e,r){"use strict";var n=Object.prototype.toString;e.exports=function(t){var e;return"[object Object]"===n.call(t)&&(null===(e=Object.getPrototypeOf(t))||e===Object.getPrototypeOf({}))}},{}],470:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=t.length,n=0;n13)&&32!==e&&133!==e&&160!==e&&5760!==e&&6158!==e&&(e<8192||e>8205)&&8232!==e&&8233!==e&&8239!==e&&8287!==e&&8288!==e&&12288!==e&&65279!==e)return!1;return!0}},{}],471:[function(t,e,r){"use strict";e.exports=function(t){return"string"==typeof t&&(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}},{}],472:[function(t,e,r){e.exports=function(t,e,r){return t*(1-r)+e*r}},{}],473:[function(t,e,r){!function(t,n){"object"==typeof r&&"undefined"!=typeof e?e.exports=n():(t=t||self).mapboxgl=n()}(this,(function(){"use strict";var t,e,r;function n(n,i){if(t)if(e){var a="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",o={};t(o),(r=i(o)).workerUrl=window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))}else e=i;else t=i}return n(0,(function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=n;function n(t,e,r,n){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(n-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=n,this.p2x=r,this.p2y=n}n.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},n.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},n.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},n.prototype.solveCurveX=function(t,e){var r,n,i,a,o;for(void 0===e&&(e=1e-6),i=t,o=0;o<8;o++){if(a=this.sampleCurveX(i)-t,Math.abs(a)(n=1))return n;for(;ra?r=i:n=i,i=.5*(n-r)+r}return i},n.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var i=a;function a(t,e){this.x=t,this.y=e}function o(t,e,n,i){var a=new r(t,e,n,i);return function(t){return a.solve(t)}}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),n=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=n,this},_rotateAround:function(t,e){var r=Math.cos(t),n=Math.sin(t),i=e.y+n*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-n*(this.y-e.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.convert=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t};var s=o(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function c(t,e,r){var n=r-e,i=((t-e)%n+n)%n+e;return i===e?r:i}function u(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function g(t,e){t.forEach((function(t){e[t]&&(e[t]=e[t].bind(e))}))}function m(t,e){return-1!==t.indexOf(e,t.length-e.length)}function v(t,e,r){var n={};for(var i in t)n[i]=e.call(r||this,t[i],i,t);return n}function y(t,e,r){var n={};for(var i in t)e.call(r||this,t[i],i,t)&&(n[i]=t[i]);return n}function x(t){return Array.isArray(t)?t.map(x):"object"==typeof t&&t?v(t,x):t}var b={};function _(t){b[t]||("undefined"!=typeof console&&console.warn(t),b[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function T(t){for(var e=0,r=0,n=t.length,i=n-1,a=void 0,o=void 0;r@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(function(t,r,n,i){var a=n||i;return e[r]=!a||a.toLowerCase(),""})),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}var A=null;function S(t){if(null==A){var e=t.navigator?t.navigator.userAgent:null;A=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return A}function E(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var C,L,I,P,z=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),O=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,D=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:z,frame:function(t){var e=O(t);return{cancel:function(){return D(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement("canvas"),n=r.getContext("2d");if(!n)throw new Error("failed to create canvas 2d context");return r.width=t.width,r.height=t.height,n.drawImage(t,0,0,t.width,t.height),n.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return C||(C=self.document.createElement("a")),C.href=t,C.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==L&&(L=self.matchMedia("(prefers-reduced-motion: reduce)")),L.matches)}},F={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},B={supported:!1,testSupport:function(t){!N&&P&&(j?U(t):I=t)}},N=!1,j=!1;function U(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,P),t.isContextLost())return;B.supported=!0}catch(t){}t.deleteTexture(e),N=!0}self.document&&((P=self.document.createElement("img")).onload=function(){I&&U(I),I=null,j=!0},P.onerror=function(){N=!0,I=null},P.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var V="01",q=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function H(t){return 0===t.indexOf("mapbox:")}q.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",V,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!H(t))return t;var r=X(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!H(t))return t;var r=X(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!H(t))return t;var r=X(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,r,n){var i=X(t);return H(t)?(i.path="/styles/v1"+i.path+"/sprite"+e+r,this._makeAPIURL(i,this._customAccessToken||n)):(i.path+=""+e+r,Z(i))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!H(t))return t;var r=X(t);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(R.devicePixelRatio>=2||512===e?"@2x":"")+(B.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var n=this._customAccessToken||function(t){for(var e=0,r=t;e=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){_("Unable to write to LocalStorage")}},K.prototype.processRequests=function(t){},K.prototype.postEvent=function(t,e,r,n){var i=this;if(F.EVENTS_URL){var a=X(F.EVENTS_URL);a.params.push("access_token="+(n||F.ACCESS_TOKEN||""));var o={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:V,userId:this.anonId},s=e?u(o,e):o,l={url:Z(a),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=xt(l,(function(t){i.pendingRequest=null,r(t),i.saveEventData(),i.processRequests(n)}))}},K.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,n){this.skuToken=r,(F.EVENTS_URL&&n||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return H(t)||Y(t)})))&&this.queueRequest({id:e,timestamp:Date.now()},n)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),n=r.id,i=r.timestamp;n&&this.success[n]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=p()),this.postEvent(i,{skuToken:this.skuToken},(function(t){t||n&&(e.success[n]=!0)}),t))}},e}(K),et=new(function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some((function(t){return H(t)||Y(t)}))&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),n=r?r.u:F.ACCESS_TOKEN,i=n!==this.eventData.tokenU;d(this.anonId)||(this.anonId=p(),i=!0);var a=this.queue.shift();if(this.eventData.lastSuccess){var o=new Date(this.eventData.lastSuccess),s=new Date(a),l=(a-this.eventData.lastSuccess)/864e5;i=i||l>=1||l<-1||o.getDate()!==s.getDate()}else i=!0;if(!i)return this.processRequests();this.postEvent(a,{"enabled.telemetry":!1},(function(t){t||(e.eventData.lastSuccess=a,e.eventData.tokenU=n)}),t)}},e}(K)),rt=et.postTurnstileEvent.bind(et),nt=new tt,it=nt.postMapLoadEvent.bind(nt),at=500,ot=50;function st(){self.caches&&!Q&&(Q=self.caches.open("mapbox-tiles"))}function lt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var ct,ut=1/0;function ft(){return null==ct&&(ct=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),ct}var ht={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ht);var pt,dt,gt=function(t){function e(e,r,n){401===r&&Y(n)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=n,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),mt=k()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href},vt=function(t,e){if(!(/^file:/.test(r=t.url)||/^file:/.test(mt())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return function(t,e){var r,n=new self.AbortController,i=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:mt(),signal:n.signal}),a=!1,o=!1,s=(r=i.url).indexOf("sku=")>0&&Y(r);"json"===t.type&&i.headers.set("Accept","application/json");var l=function(r,n,a){if(!o){if(r&&"SecurityError"!==r.message&&_(r),n&&a)return c(n);var l=Date.now();self.fetch(i).then((function(r){if(r.ok){var n=s?r.clone():null;return c(r,n,l)}return e(new gt(r.statusText,r.status,t.url))})).catch((function(t){20!==t.code&&e(new Error(t.message))}))}},c=function(r,n,s){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then((function(t){o||(n&&s&&function(t,e,r){if(st(),Q){var n={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach((function(t,e){return n.headers.set(e,t)}));var i=M(e.headers.get("Cache-Control")||"");i["no-store"]||(i["max-age"]&&n.headers.set("Expires",new Date(r+1e3*i["max-age"]).toUTCString()),new Date(n.headers.get("Expires")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,(function(e){var r=new self.Response(e,n);st(),Q&&Q.then((function(e){return e.put(lt(t.url),r)})).catch((function(t){return _(t.message)}))})))}}(i,n,s),a=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))})).catch((function(t){o||e(new Error(t.message))}))};return s?function(t,e){if(st(),!Q)return e(null);var r=lt(t.url);Q.then((function(t){t.match(r).then((function(n){var i=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),r=M(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}(n);t.delete(r),i&&t.put(r,n.clone()),e(null,n,i)})).catch(e)})).catch(e)}(i,l):l(null,null),{cancel:function(){o=!0,a||n.abort()}}}(t,e);if(k()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var n in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(n,t.headers[n]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var n=r.response;if("json"===t.type)try{n=JSON.parse(r.response)}catch(t){return e(t)}e(null,n,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new gt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},yt=function(t,e){return vt(u(t,{type:"arrayBuffer"}),e)},xt=function(t,e){return vt(u(t,{method:"POST"}),e)};pt=[],dt=0;var bt=function(t,e){if(B.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),dt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return pt.push(r),r}dt++;var n=!1,i=function(){if(!n)for(n=!0,dt--;pt.length&&dt0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},Mt.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var At={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},St=function(t,e,r,n){this.message=(t?t+": ":"")+r,n&&(this.identifier=n),null!=e&&e.__line__&&(this.line=e.__line__)};function Et(t){var e=t.value;return e?[new St(t.key,e,"constants have been deprecated as of v8")]:[]}function Ct(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var n=0,i=e;n":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Yt=[Ot,Dt,Rt,Ft,Bt,Vt,Nt,Ht(jt),qt];function Wt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Wt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,n=Yt;r255?255:t}function i(t){return n("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function a(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function o(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,s=t.replace(/ /g,"").toLowerCase();if(s in r)return r[s].slice();if("#"===s[0])return 4===s.length?(e=parseInt(s.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===s.length&&(e=parseInt(s.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=s.indexOf("("),c=s.indexOf(")");if(-1!==l&&c+1===s.length){var u=s.substr(0,l),f=s.substr(l+1,c-(l+1)).split(","),h=1;switch(u){case"rgba":if(4!==f.length)return null;h=a(f.pop());case"rgb":return 3!==f.length?null:[i(f[0]),i(f[1]),i(f[2]),h];case"hsla":if(4!==f.length)return null;h=a(f.pop());case"hsl":if(3!==f.length)return null;var p=(parseFloat(f[0])%360+360)%360/360,d=a(f[1]),g=a(f[2]),m=g<=.5?g*(d+1):g+d-g*d,v=2*g-m;return[n(255*o(v,m,p+1/3)),n(255*o(v,m,p)),n(255*o(v,m,p-1/3)),h];default:return null}}return null}}catch(t){}})).parseCSSColor,Kt=function(t,e,r,n){void 0===n&&(n=1),this.r=t,this.g=e,this.b=r,this.a=n};Kt.parse=function(t){if(t){if(t instanceof Kt)return t;if("string"==typeof t){var e=Jt(t);if(e)return new Kt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Kt.prototype.toString=function(){var t=this.toArray(),e=t[1],r=t[2],n=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(r)+","+n+")"},Kt.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},Kt.black=new Kt(0,0,0,1),Kt.white=new Kt(1,1,1,1),Kt.transparent=new Kt(0,0,0,0),Kt.red=new Kt(1,0,0,1);var Qt=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Qt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Qt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var $t=function(t,e,r,n,i){this.text=t,this.image=e,this.scale=r,this.fontStack=n,this.textColor=i},te=function(t){this.sections=t};te.fromString=function(t){return new te([new $t(t,null,null,null,null)])},te.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some((function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length}))},te.factory=function(t){return t instanceof te?t:te.fromString(t)},te.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map((function(t){return t.text})).join("")},te.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:"Invalid rgba value ["+[t,e,r,n].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof n?[t,e,r,n]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ne(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Kt)return!0;if(t instanceof Qt)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(Array.isArray(t)){for(var e=0,r=t;e2){var s=t[1];if("string"!=typeof s||!(s in le)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);a=le[s],n++}else a=jt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);o=t[2],n++}r=Ht(a,o)}else r=le[i];for(var l=[];n1)&&e.push(n)}}return e.concat(this.args.map((function(t){return t.serialize()})))};var ue=function(t){this.type=Vt,this.sections=t};ue.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var n=[],i=!1,a=1;a<=t.length-1;++a){var o=t[a];if(i&&"object"==typeof o&&!Array.isArray(o)){i=!1;var s=null;if(o["font-scale"]&&!(s=e.parse(o["font-scale"],1,Dt)))return null;var l=null;if(o["text-font"]&&!(l=e.parse(o["text-font"],1,Ht(Rt))))return null;var c=null;if(o["text-color"]&&!(c=e.parse(o["text-color"],1,Bt)))return null;var u=n[n.length-1];u.scale=s,u.font=l,u.textColor=c}else{var f=e.parse(t[a],1,jt);if(!f)return null;var h=f.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:f,scale:null,font:null,textColor:null})}}return new ue(n)},ue.prototype.evaluate=function(t){return new te(this.sections.map((function(e){var r=e.content.evaluate(t);return ie(r)===qt?new $t("",r,null,null,null):new $t(ae(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)})))},ue.prototype.eachChild=function(t){for(var e=0,r=this.sections;e-1),r},fe.prototype.eachChild=function(t){t(this.input)},fe.prototype.outputDefined=function(){return!1},fe.prototype.serialize=function(){return["image",this.input.serialize()]};var he={"to-boolean":Ft,"to-color":Bt,"to-number":Dt,"to-string":Rt},pe=function(t,e){this.type=t,this.args=e};pe.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var n=he[r],i=[],a=1;a4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":re(e[0],e[1],e[2],e[3])))return new Kt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new se(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var o=null,s=0,l=this.args;s=e[2]||t[1]<=e[1]||t[3]>=e[3])}function be(t,e){var r=(180+t[0])/360,n=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,i=Math.pow(2,e.z);return[Math.round(r*i*8192),Math.round(n*i*8192)]}function _e(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function we(t,e){for(var r,n,i,a,o,s,l,c=!1,u=0,f=e.length;u0&&s<0||o<0&&s>0}function Me(t,e,r){for(var n=0,i=r;nr[2]){var i=.5*n,a=t[0]-r[0]>i?-n:r[0]-t[0]>i?n:0;0===a&&(a=t[0]-r[2]>i?-n:r[2]-t[0]>i?n:0),t[0]+=a}ye(e,t)}function Ie(t,e,r,n){for(var i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[],s=0,l=t;s=0)return!1;var r=!0;return t.eachChild((function(t){r&&!Re(t,e)&&(r=!1)})),r}ze.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(ne(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var n=0;ne))throw new se("Input is not a number.");a=o-1}return 0}Be.prototype.parse=function(t,e,r,n,i){return void 0===i&&(i={}),e?this.concat(e,r,n)._parse(t,i):this._parse(t,i)},Be.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ce(e,[t]):"coerce"===r?new pe(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var n=t[0];if("string"!=typeof n)return this.error("Expression name must be a string, but found "+typeof n+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var i=this.registry[n];if(i){var a=i.parse(t,this);if(!a)return null;if(this.expectedType){var o=this.expectedType,s=a.type;if("string"!==o.kind&&"number"!==o.kind&&"boolean"!==o.kind&&"object"!==o.kind&&"array"!==o.kind||"value"!==s.kind)if("color"!==o.kind&&"formatted"!==o.kind&&"resolvedImage"!==o.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(o,s))return null}else a=r(a,o,e.typeAnnotation||"coerce");else a=r(a,o,e.typeAnnotation||"assert")}if(!(a instanceof oe)&&"resolvedImage"!==a.type.kind&&function t(e){if(e instanceof Fe)return t(e.boundExpression);if(e instanceof me&&"error"===e.name)return!1;if(e instanceof ve)return!1;if(e instanceof ze)return!1;var r=e instanceof pe||e instanceof ce,n=!0;return e.eachChild((function(e){n=r?n&&t(e):n&&e instanceof oe})),!!n&&Oe(e)&&Re(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(a)){var l=new ge;try{a=new oe(a.type,a.evaluate(l))}catch(t){return this.error(t.message),null}}return a}return this.error('Unknown expression "'+n+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")},Be.prototype.concat=function(t,e,r){var n="number"==typeof t?this.path.concat(t):this.path,i=r?this.scope.concat(r):this.scope;return new Be(this.registry,n,e||null,i,this.errors)},Be.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var n=""+this.key+e.map((function(t){return"["+t+"]"})).join("");this.errors.push(new Pt(n,t))},Be.prototype.checkSubtype=function(t,e){var r=Wt(t,e);return r&&this.error(r),r};var je=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var n=0,i=r;n=o)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var u=e.parse(s,c,i);if(!u)return null;i=i||u.type,n.push([o,u])}return new je(i,r,n)},je.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;return n>=e[i-1]?r[i-1].evaluate(t):r[Ne(e,n)].evaluate(t)},je.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var Ve=Object.freeze({__proto__:null,number:Ue,color:function(t,e,r){return new Kt(Ue(t.r,e.r,r),Ue(t.g,e.g,r),Ue(t.b,e.b,r),Ue(t.a,e.a,r))},array:function(t,e,r){return t.map((function(t,n){return Ue(t,e[n],r)}))}}),qe=6/29*3*(6/29),He=Math.PI/180,Ge=180/Math.PI;function Ye(t){return t>.008856451679035631?Math.pow(t,1/3):t/qe+4/29}function We(t){return t>6/29?t*t*t:qe*(t-4/29)}function Xe(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ze(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Je(t){var e=Ze(t.r),r=Ze(t.g),n=Ze(t.b),i=Ye((.4124564*e+.3575761*r+.1804375*n)/.95047),a=Ye((.2126729*e+.7151522*r+.072175*n)/1);return{l:116*a-16,a:500*(i-a),b:200*(a-Ye((.0193339*e+.119192*r+.9503041*n)/1.08883)),alpha:t.a}}function Ke(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,n=isNaN(t.b)?e:e-t.b/200;return e=1*We(e),r=.95047*We(r),n=1.08883*We(n),new Kt(Xe(3.2404542*r-1.5371385*e-.4985314*n),Xe(-.969266*r+1.8760108*e+.041556*n),Xe(.0556434*r-.2040259*e+1.0572252*n),t.alpha)}function Qe(t,e,r){var n=e-t;return t+r*(n>180||n<-180?n-360*Math.round(n/360):n)}var $e={forward:Je,reverse:Ke,interpolate:function(t,e,r){return{l:Ue(t.l,e.l,r),a:Ue(t.a,e.a,r),b:Ue(t.b,e.b,r),alpha:Ue(t.alpha,e.alpha,r)}}},tr={forward:function(t){var e=Je(t),r=e.l,n=e.a,i=e.b,a=Math.atan2(i,n)*Ge;return{h:a<0?a+360:a,c:Math.sqrt(n*n+i*i),l:r,alpha:t.a}},reverse:function(t){var e=t.h*He,r=t.c;return Ke({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:Qe(t.h,e.h,r),c:Ue(t.c,e.c,r),l:Ue(t.l,e.l,r),alpha:Ue(t.alpha,e.alpha,r)}}},er=Object.freeze({__proto__:null,lab:$e,hcl:tr}),rr=function(t,e,r,n,i){this.type=t,this.operator=e,this.interpolation=r,this.input=n,this.labels=[],this.outputs=[];for(var a=0,o=i;a1})))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(i=e.parse(i,2,Dt)))return null;var l=[],c=null;"interpolate-hcl"===r||"interpolate-lab"===r?c=Bt:e.expectedType&&"value"!==e.expectedType.kind&&(c=e.expectedType);for(var u=0;u=f)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',p);var g=e.parse(h,d,c);if(!g)return null;c=c||g.type,l.push([f,g])}return"number"===c.kind||"color"===c.kind||"array"===c.kind&&"number"===c.itemType.kind&&"number"==typeof c.N?new rr(c,r,n,i,l):e.error("Type "+Gt(c)+" is not interpolatable.")},rr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var n=this.input.evaluate(t);if(n<=e[0])return r[0].evaluate(t);var i=e.length;if(n>=e[i-1])return r[i-1].evaluate(t);var a=Ne(e,n),o=rr.interpolationFactor(this.interpolation,n,e[a],e[a+1]),s=r[a].evaluate(t),l=r[a+1].evaluate(t);return"interpolate"===this.operator?Ve[this.type.kind.toLowerCase()](s,l,o):"interpolate-hcl"===this.operator?tr.reverse(tr.interpolate(tr.forward(s),tr.forward(l),o)):$e.reverse($e.interpolate($e.forward(s),$e.forward(l),o))},rr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e=r.length)throw new se("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new se("Array index must be an integer, but found "+e+" instead.");return r[e]},or.prototype.eachChild=function(t){t(this.index),t(this.input)},or.prototype.outputDefined=function(){return!1},or.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var sr=function(t,e){this.type=Ft,this.needle=t,this.haystack=e};sr.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,jt),n=e.parse(t[2],2,jt);return r&&n?Xt(r.type,[Ft,Rt,Dt,Ot,jt])?new sr(r,n):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(r.type)+" instead"):null},sr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Zt(e,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Gt(ie(e))+" instead.");if(!Zt(r,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Gt(ie(r))+" instead.");return r.indexOf(e)>=0},sr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},sr.prototype.outputDefined=function(){return!0},sr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var lr=function(t,e,r){this.type=Dt,this.needle=t,this.haystack=e,this.fromIndex=r};lr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,jt),n=e.parse(t[2],2,jt);if(!r||!n)return null;if(!Xt(r.type,[Ft,Rt,Dt,Ot,jt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Dt);return i?new lr(r,n,i):null}return new lr(r,n)},lr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Zt(e,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Gt(ie(e))+" instead.");if(!Zt(r,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Gt(ie(r))+" instead.");if(this.fromIndex){var n=this.fromIndex.evaluate(t);return r.indexOf(e,n)}return r.indexOf(e)},lr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},lr.prototype.outputDefined=function(){return!1},lr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var cr=function(t,e,r,n,i,a){this.inputType=t,this.type=e,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a};cr.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,n;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var i={},a=[],o=2;oNumber.MAX_SAFE_INTEGER)return c.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return c.error("Numeric branch labels must be integer values.");if(r){if(c.checkSubtype(r,ie(h)))return null}else r=ie(h);if(void 0!==i[String(h)])return c.error("Branch labels must be unique.");i[String(h)]=a.length}var p=e.parse(l,o,n);if(!p)return null;n=n||p.type,a.push(p)}var d=e.parse(t[1],1,jt);if(!d)return null;var g=e.parse(t[t.length-1],t.length-1,n);return g?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new cr(r,n,d,i,a,g):null},cr.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ie(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},cr.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},cr.prototype.outputDefined=function(){return this.outputs.every((function(t){return t.outputDefined()}))&&this.otherwise.outputDefined()},cr.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],n={},i=0,a=Object.keys(this.cases).sort();i=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,jt),n=e.parse(t[2],2,Dt);if(!r||!n)return null;if(!Xt(r.type,[Ht(jt),Rt,jt]))return e.error("Expected first argument to be of type array or string, but found "+Gt(r.type)+" instead");if(4===t.length){var i=e.parse(t[3],3,Dt);return i?new fr(r.type,r,n,i):null}return new fr(r.type,r,n)},fr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Zt(e,["string","array"]))throw new se("Expected first argument to be of type array or string, but found "+Gt(ie(e))+" instead.");if(this.endIndex){var n=this.endIndex.evaluate(t);return e.slice(r,n)}return e.slice(r)},fr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},fr.prototype.outputDefined=function(){return!1},fr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var gr=dr("==",(function(t,e,r){return e===r}),pr),mr=dr("!=",(function(t,e,r){return e!==r}),(function(t,e,r,n){return!pr(0,e,r,n)})),vr=dr("<",(function(t,e,r){return e",(function(t,e,r){return e>r}),(function(t,e,r,n){return n.compare(e,r)>0})),xr=dr("<=",(function(t,e,r){return e<=r}),(function(t,e,r,n){return n.compare(e,r)<=0})),br=dr(">=",(function(t,e,r){return e>=r}),(function(t,e,r,n){return n.compare(e,r)>=0})),_r=function(t,e,r,n,i){this.type=Rt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i};_r.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Dt);if(!r)return null;var n=t[2];if("object"!=typeof n||Array.isArray(n))return e.error("NumberFormat options argument must be an object.");var i=null;if(n.locale&&!(i=e.parse(n.locale,1,Rt)))return null;var a=null;if(n.currency&&!(a=e.parse(n.currency,1,Rt)))return null;var o=null;if(n["min-fraction-digits"]&&!(o=e.parse(n["min-fraction-digits"],1,Dt)))return null;var s=null;return n["max-fraction-digits"]&&!(s=e.parse(n["max-fraction-digits"],1,Dt))?null:new _r(r,i,a,o,s)},_r.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},_r.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},_r.prototype.outputDefined=function(){return!1},_r.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var wr=function(t){this.type=Dt,this.input=t};wr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Gt(r.type)+" instead."):new wr(r):null},wr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new se("Expected value to be of type string or array, but found "+Gt(ie(e))+" instead.")},wr.prototype.eachChild=function(t){t(this.input)},wr.prototype.outputDefined=function(){return!1},wr.prototype.serialize=function(){var t=["length"];return this.eachChild((function(e){t.push(e.serialize())})),t};var Tr={"==":gr,"!=":mr,">":yr,"<":vr,">=":br,"<=":xr,array:ce,at:or,boolean:ce,case:ur,coalesce:ir,collator:ve,format:ue,image:fe,in:sr,"index-of":lr,interpolate:rr,"interpolate-hcl":rr,"interpolate-lab":rr,length:wr,let:ar,literal:oe,match:cr,number:ce,"number-format":_r,object:ce,slice:fr,step:je,string:ce,"to-boolean":pe,"to-color":pe,"to-number":pe,"to-string":pe,var:Fe,within:ze};function kr(t,e){var r=e[0],n=e[1],i=e[2],a=e[3];r=r.evaluate(t),n=n.evaluate(t),i=i.evaluate(t);var o=a?a.evaluate(t):1,s=re(r,n,i,o);if(s)throw new se(s);return new Kt(r/255*o,n/255*o,i/255*o,o)}function Mr(t,e){return t in e}function Ar(t,e){var r=e[t];return void 0===r?null:r}function Sr(t){return{type:t}}function Er(t){return{result:"success",value:t}}function Cr(t){return{result:"error",value:t}}function Lr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function Ir(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Pr(t){return!!t.expression&&t.expression.interpolated}function zr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Or(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Dr(t){return t}function Rr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Fr(t,e,r,n,i){return Rr(typeof r===i?n[r]:void 0,t.default,e.default)}function Br(t,e,r){if("number"!==zr(r))return Rr(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var i=Ne(t.stops.map((function(t){return t[0]})),r);return t.stops[i][1]}function Nr(t,e,r){var n=void 0!==t.base?t.base:1;if("number"!==zr(r))return Rr(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var a=Ne(t.stops.map((function(t){return t[0]})),r),o=function(t,e,r,n){var i=n-r,a=t-r;return 0===i?0:1===e?a/i:(Math.pow(e,a)-1)/(Math.pow(e,i)-1)}(r,n,t.stops[a][0],t.stops[a+1][0]),s=t.stops[a][1],l=t.stops[a+1][1],c=Ve[e.type]||Dr;if(t.colorSpace&&"rgb"!==t.colorSpace){var u=er[t.colorSpace];c=function(t,e){return u.reverse(u.interpolate(u.forward(t),u.forward(e),o))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),n=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return c(r,n,o)}}:c(s,l,o)}function jr(t,e,r){return"color"===e.type?r=Kt.parse(r):"formatted"===e.type?r=te.fromString(r.toString()):"resolvedImage"===e.type?r=ee.fromString(r.toString()):zr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Rr(r,t.default,e.default)}me.register(Tr,{error:[{kind:"error"},[Rt],function(t,e){throw new se(e[0].evaluate(t))}],typeof:[Rt,[jt],function(t,e){return Gt(ie(e[0].evaluate(t)))}],"to-rgba":[Ht(Dt,4),[Bt],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Bt,[Dt,Dt,Dt],kr],rgba:[Bt,[Dt,Dt,Dt,Dt],kr],has:{type:Ft,overloads:[[[Rt],function(t,e){return Mr(e[0].evaluate(t),t.properties())}],[[Rt,Nt],function(t,e){var r=e[1];return Mr(e[0].evaluate(t),r.evaluate(t))}]]},get:{type:jt,overloads:[[[Rt],function(t,e){return Ar(e[0].evaluate(t),t.properties())}],[[Rt,Nt],function(t,e){var r=e[1];return Ar(e[0].evaluate(t),r.evaluate(t))}]]},"feature-state":[jt,[Rt],function(t,e){return Ar(e[0].evaluate(t),t.featureState||{})}],properties:[Nt,[],function(t){return t.properties()}],"geometry-type":[Rt,[],function(t){return t.geometryType()}],id:[jt,[],function(t){return t.id()}],zoom:[Dt,[],function(t){return t.globals.zoom}],"heatmap-density":[Dt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Dt,[],function(t){return t.globals.lineProgress||0}],accumulated:[jt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Dt,Sr(Dt),function(t,e){for(var r=0,n=0,i=e;n":[Ft,[Rt,jt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>a}],"filter-id->":[Ft,[jt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>i}],"filter-<=":[Ft,[Rt,jt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i<=a}],"filter-id-<=":[Ft,[jt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n<=i}],"filter->=":[Ft,[Rt,jt],function(t,e){var r=e[0],n=e[1],i=t.properties()[r.value],a=n.value;return typeof i==typeof a&&i>=a}],"filter-id->=":[Ft,[jt],function(t,e){var r=e[0],n=t.id(),i=r.value;return typeof n==typeof i&&n>=i}],"filter-has":[Ft,[jt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ft,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ft,[Ht(Rt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Ft,[Ht(jt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Ft,[Rt,Ht(jt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Ft,[Rt,Ht(jt)],function(t,e){var r=e[0],n=e[1];return function(t,e,r,n){for(;r<=n;){var i=r+n>>1;if(e[i]===t)return!0;e[i]>t?n=i-1:r=i+1}return!1}(t.properties()[r.value],n.value,0,n.value.length-1)}],all:{type:Ft,overloads:[[[Ft,Ft],function(t,e){var r=e[1];return e[0].evaluate(t)&&r.evaluate(t)}],[Sr(Ft),function(t,e){for(var r=0,n=e;r0&&"string"==typeof t[0]&&t[0]in Tr}function qr(t,e){var r=new Be(Tr,[],e?function(t){var e={color:Bt,string:Rt,number:Dt,enum:Rt,boolean:Ft,formatted:Vt,resolvedImage:qt};return"array"===t.type?Ht(e[t.value]||jt,t.length):e[t.type]}(e):void 0),n=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return n?Er(new Ur(n,e)):Cr(r.errors)}Ur.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)},Ur.prototype.evaluate=function(t,e,r,n,i,a){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{var o=this.expression.evaluate(this._evaluator);if(null==o||"number"==typeof o&&o!=o)return this._defaultValue;if(this._enumValues&&!(o in this._enumValues))throw new se("Expected value to be one of "+Object.keys(this._enumValues).map((function(t){return JSON.stringify(t)})).join(", ")+", but found "+JSON.stringify(o)+" instead.");return o}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Hr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!De(e.expression)};Hr.prototype.evaluateWithoutErrorHandling=function(t,e,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,n,i,a)},Hr.prototype.evaluate=function(t,e,r,n,i,a){return this._styleExpression.evaluate(t,e,r,n,i,a)};var Gr=function(t,e,r,n){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!De(e.expression),this.interpolationType=n};function Yr(t,e){if("error"===(t=qr(t,e)).result)return t;var r=t.value.expression,n=Oe(r);if(!n&&!Lr(e))return Cr([new Pt("","data expressions not supported")]);var i=Re(r,["zoom"]);if(!i&&!Ir(e))return Cr([new Pt("","zoom expressions not supported")]);var a=function t(e){var r=null;if(e instanceof ar)r=t(e.result);else if(e instanceof ir)for(var n=0,i=e.args;nn.maximum?[new St(e,r,r+" is greater than the maximum value "+n.maximum)]:[]}function Kr(t){var e,r,n,i=t.valueSpec,a=Lt(t.value.type),o={},s="categorical"!==a&&void 0===t.value.property,l=!s,c="array"===zr(t.value.stops)&&"array"===zr(t.value.stops[0])&&"object"===zr(t.value.stops[0][0]),u=Xr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===a)return[new St(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Zr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:f})),"array"===zr(r)&&0===r.length&&e.push(new St(t.key,r,"array must have at least one stop")),e},default:function(t){return bn({key:t.key,value:t.value,valueSpec:i,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===a&&s&&u.push(new St(t.key,t.value,'missing required property "property"')),"identity"===a||t.value.stops||u.push(new St(t.key,t.value,'missing required property "stops"')),"exponential"===a&&t.valueSpec.expression&&!Pr(t.valueSpec)&&u.push(new St(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Lr(t.valueSpec)?u.push(new St(t.key,t.value,"property functions not supported")):s&&!Ir(t.valueSpec)&&u.push(new St(t.key,t.value,"zoom functions not supported"))),"categorical"!==a&&!c||void 0!==t.value.property||u.push(new St(t.key,t.value,'"property" property is required')),u;function f(t){var e=[],a=t.value,s=t.key;if("array"!==zr(a))return[new St(s,a,"array expected, "+zr(a)+" found")];if(2!==a.length)return[new St(s,a,"array length 2 expected, length "+a.length+" found")];if(c){if("object"!==zr(a[0]))return[new St(s,a,"object expected, "+zr(a[0])+" found")];if(void 0===a[0].zoom)return[new St(s,a,"object stop key must have zoom")];if(void 0===a[0].value)return[new St(s,a,"object stop key must have value")];if(n&&n>Lt(a[0].zoom))return[new St(s,a[0].zoom,"stop zoom values must appear in ascending order")];Lt(a[0].zoom)!==n&&(n=Lt(a[0].zoom),r=void 0,o={}),e=e.concat(Xr({key:s+"[0]",value:a[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Jr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:a[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},a));return Vr(It(a[1]))?e.concat([new St(s+"[1]",a[1],"expressions are not allowed in function stops.")]):e.concat(bn({key:s+"[1]",value:a[1],valueSpec:i,style:t.style,styleSpec:t.styleSpec}))}function h(t,n){var s=zr(t.value),l=Lt(t.value),c=null!==t.value?t.value:n;if(e){if(s!==e)return[new St(t.key,c,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new St(t.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==a){var u="number expected, "+s+" found";return Lr(i)&&void 0===a&&(u+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new St(t.key,c,u)]}return"categorical"!==a||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==a&&"number"===s&&void 0!==r&&l=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);ee?1:0}function an(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?on(t[1],t[2],"=="):"!="===r?cn(on(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?on(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(an))):"all"===r?["all"].concat(t.slice(1).map(an)):"none"===r?["all"].concat(t.slice(1).map(an).map(cn)):"in"===r?sn(t[1],t.slice(2)):"!in"===r?cn(sn(t[1],t.slice(2))):"has"===r?ln(t[1]):"!has"===r?cn(ln(t[1])):"within"!==r||t}function on(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function sn(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some((function(t){return typeof t!=typeof e[0]}))?["filter-in-large",t,["literal",e.sort(nn)]]:["filter-in-small",t,["literal",e]]}}function ln(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function cn(t){return["!",t]}function un(t){return tn(It(t.value))?Qr(Ct({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,n=e.key;if("array"!==zr(r))return[new St(n,r,"array expected, "+zr(r)+" found")];var i,a=e.styleSpec,o=[];if(r.length<1)return[new St(n,r,"filter array must have at least 1 element")];switch(o=o.concat($r({key:n+"[0]",value:r[0],valueSpec:a.filter_operator,style:e.style,styleSpec:e.styleSpec})),Lt(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Lt(r[1])&&o.push(new St(n,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&o.push(new St(n,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(i=zr(r[1]))&&o.push(new St(n+"[1]",r[1],"string expected, "+i+" found"));for(var s=2;s=u[p+0]&&n>=u[p+1])?(o[h]=!0,a.push(c[h])):o[h]=!1}}},In.prototype._forEachCell=function(t,e,r,n,i,a,o,s){for(var l=this._convertToCellCoord(t),c=this._convertToCellCoord(e),u=this._convertToCellCoord(r),f=this._convertToCellCoord(n),h=l;h<=u;h++)for(var p=c;p<=f;p++){var d=this.d*p+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(p),this._convertFromCellCoord(h+1),this._convertFromCellCoord(p+1)))&&i.call(this,t,e,r,n,d,a,o,s))return}},In.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},In.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},In.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,n=0;n=0)){var u=t[c];l[c]=On[s].shallow.indexOf(c)>=0?u:Nn(u,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof t)}function jn(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Fn(t)||Bn(t)||ArrayBuffer.isView(t)||t instanceof Pn)return t;if(Array.isArray(t))return t.map(jn);if("object"==typeof t){var e=t.$name||"Object",r=On[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var n=Object.create(r.prototype),i=0,a=Object.keys(t);i=0?s:jn(s)}}return n}throw new Error("can't deserialize object of type "+typeof t)}var Un=function(){this.first=!0};Un.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function qn(t){for(var e=0,r=t;e=65097&&t<=65103)||Vn["CJK Compatibility Ideographs"](t)||Vn["CJK Compatibility"](t)||Vn["CJK Radicals Supplement"](t)||Vn["CJK Strokes"](t)||!(!Vn["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Vn["CJK Unified Ideographs Extension A"](t)||Vn["CJK Unified Ideographs"](t)||Vn["Enclosed CJK Letters and Months"](t)||Vn["Hangul Compatibility Jamo"](t)||Vn["Hangul Jamo Extended-A"](t)||Vn["Hangul Jamo Extended-B"](t)||Vn["Hangul Jamo"](t)||Vn["Hangul Syllables"](t)||Vn.Hiragana(t)||Vn["Ideographic Description Characters"](t)||Vn.Kanbun(t)||Vn["Kangxi Radicals"](t)||Vn["Katakana Phonetic Extensions"](t)||Vn.Katakana(t)&&12540!==t||!(!Vn["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Vn["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Vn["Unified Canadian Aboriginal Syllabics"](t)||Vn["Unified Canadian Aboriginal Syllabics Extended"](t)||Vn["Vertical Forms"](t)||Vn["Yijing Hexagram Symbols"](t)||Vn["Yi Syllables"](t)||Vn["Yi Radicals"](t))))}function Gn(t){return!(Hn(t)||function(t){return!!(Vn["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Vn["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Vn["Letterlike Symbols"](t)||Vn["Number Forms"](t)||Vn["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Vn["Control Pictures"](t)&&9251!==t||Vn["Optical Character Recognition"](t)||Vn["Enclosed Alphanumerics"](t)||Vn["Geometric Shapes"](t)||Vn["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Vn["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Vn["CJK Symbols and Punctuation"](t)||Vn.Katakana(t)||Vn["Private Use Area"](t)||Vn["CJK Compatibility Forms"](t)||Vn["Small Form Variants"](t)||Vn["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Yn(t){return t>=1424&&t<=2303||Vn["Arabic Presentation Forms-A"](t)||Vn["Arabic Presentation Forms-B"](t)}function Wn(t,e){return!(!e&&Yn(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Vn.Khmer(t))}function Xn(t){for(var e=0,r=t;e-1&&(Jn="error"),Zn&&Zn(t)};function $n(){ti.fire(new Tt("pluginStateChange",{pluginStatus:Jn,pluginURL:Kn}))}var ti=new Mt,ei=function(){return Jn},ri=function(){if("deferred"!==Jn||!Kn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Jn="loading",$n(),Kn&&yt({url:Kn},(function(t){t?Qn(t):(Jn="loaded",$n())}))},ni={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Jn||null!=ni.applyArabicShaping},isLoading:function(){return"loading"===Jn},setState:function(t){Jn=t.pluginStatus,Kn=t.pluginURL},isParsed:function(){return null!=ni.applyArabicShaping&&null!=ni.processBidirectionalText&&null!=ni.processStyledBidirectionalText},getPluginURL:function(){return Kn}},ii=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Un,this.transition={})};ii.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,n=t;rthis.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var ai=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Or(t))return new Wr(t,e);if(Vr(t)){var r=Yr(t,e);if("error"===r.result)throw new Error(r.value.map((function(t){return t.key+": "+t.message})).join(", "));return r.value}var n=t;return"string"==typeof t&&"color"===e.type&&(n=Kt.parse(t)),{kind:"constant",evaluate:function(){return n}}}(void 0===e?t.specification.default:e,t.specification)};ai.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},ai.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var oi=function(t){this.property=t,this.value=new ai(t,void 0)};oi.prototype.transitioned=function(t,e){return new li(this.property,this.value,e,u({},t.transition,this.transition),t.now)},oi.prototype.untransitioned=function(){return new li(this.property,this.value,null,{},0)};var si=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};si.prototype.getValue=function(t){return x(this._values[t].value.value)},si.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new oi(this._values[t].property)),this._values[t].value=new ai(this._values[t].property,null===e?void 0:x(e))},si.prototype.getTransition=function(t){return x(this._values[t].transition)},si.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new oi(this._values[t].property)),this._values[t].transition=x(e)||void 0},si.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);ethis.end)return this.prior=null,i;if(this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;var e=t*t,r=e*t;return 4*(t<.5?r:3*(t-e)+r-.75)}(o))}return i};var ci=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};ci.prototype.possiblyEvaluate=function(t,e,r){for(var n=new hi(this._properties),i=0,a=Object.keys(this._values);in.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(di),mi=function(t){this.specification=t};mi.prototype.possiblyEvaluate=function(t,e,r,n){if(void 0!==t.value){if("constant"===t.expression.kind){var i=t.expression.evaluate(e,null,{},r,n);return this._calculate(i,i,i,e)}return this._calculate(t.expression.evaluate(new ii(Math.floor(e.zoom-1),e)),t.expression.evaluate(new ii(Math.floor(e.zoom),e)),t.expression.evaluate(new ii(Math.floor(e.zoom+1),e)),e)}},mi.prototype._calculate=function(t,e,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},mi.prototype.interpolate=function(t){return t};var vi=function(t){this.specification=t};vi.prototype.possiblyEvaluate=function(t,e,r,n){return!!t.expression.evaluate(e,null,{},r,n)},vi.prototype.interpolate=function(){return!1};var yi=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var n=this.defaultPropertyValues[e]=new ai(r,void 0),i=this.defaultTransitionablePropertyValues[e]=new oi(r);this.defaultTransitioningPropertyValues[e]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=n.possiblyEvaluate({})}};Dn("DataDrivenProperty",di),Dn("DataConstantProperty",pi),Dn("CrossFadedDataDrivenProperty",gi),Dn("CrossFadedProperty",mi),Dn("ColorRampProperty",vi);var xi=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=(e=e).metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new ui(r.layout)),r.paint)){for(var n in this._transitionablePaint=new si(r.paint),e.paint)this.setPaintProperty(n,e.paint[n],{validate:!1});for(var i in e.layout)this.setLayoutProperty(i,e.layout[i],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new hi(r.paint)}}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){void 0===r&&(r={}),null!=e&&this._validate(En,"layers."+this.id+".layout."+t,t,e,r)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},e.prototype.getPaintProperty=function(t){return m(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e&&this._validate(Sn,"layers."+this.id+".paint."+t,t,e,r))return!1;if(m(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var n=this._transitionablePaint._values[t],i="cross-faded-data-driven"===n.property.specification["property-type"],a=n.value.isDataDriven(),o=n.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||a||i||this._handleOverridablePaintPropertyUpdate(t,o,s)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),y(t,(function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)}))},e.prototype._validate=function(t,e,r,n,i){return void 0===i&&(i={}),(!i||!1!==i.validate)&&Cn(this,t.call(Mn,{key:e,layerType:this.type,objectKey:r,value:n,styleSpec:At,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof fi&&Lr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(Mt),bi={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},_i=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},wi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Ti(t,e){void 0===e&&(e=1);var r=0,n=0;return{members:t.map((function(t){var i=bi[t.type].BYTES_PER_ELEMENT,a=r=ki(r,Math.max(e,i)),o=t.components||1;return n=Math.max(n,i),r+=i*o,{name:t.name,type:t.type,components:o,offset:a}})),size:ki(r,Math.max(n,e)),alignment:e}}function ki(t,e){return Math.ceil(t/e)*e}wi.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},wi.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},wi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},wi.prototype.clear=function(){this.length=0},wi.prototype.resize=function(t){this.reserve(t),this.length=t},wi.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},wi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Mi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.int16[n+0]=e,this.int16[n+1]=r,t},e}(wi);Mi.prototype.bytesPerElement=4,Dn("StructArrayLayout2i4",Mi);var Ai=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.int16[a+0]=e,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,t},e}(wi);Ai.prototype.bytesPerElement=8,Dn("StructArrayLayout4i8",Ai);var Si=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(wi);Si.prototype.bytesPerElement=12,Dn("StructArrayLayout2i4i12",Si);var Ei=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=n,this.uint8[l+5]=i,this.uint8[l+6]=a,this.uint8[l+7]=o,t},e}(wi);Ei.prototype.bytesPerElement=8,Dn("StructArrayLayout2i4ub8",Ei);var Ci=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,n,i,a,o,s,l,c)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u){var f=9*t,h=18*t;return this.uint16[f+0]=e,this.uint16[f+1]=r,this.uint16[f+2]=n,this.uint16[f+3]=i,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.uint8[h+16]=c,this.uint8[h+17]=u,t},e}(wi);Ci.prototype.bytesPerElement=18,Dn("StructArrayLayout8ui2ub18",Ci);var Li=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,n,i,a,o,s,l,c,u,f)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h){var p=12*t;return this.int16[p+0]=e,this.int16[p+1]=r,this.int16[p+2]=n,this.int16[p+3]=i,this.uint16[p+4]=a,this.uint16[p+5]=o,this.uint16[p+6]=s,this.uint16[p+7]=l,this.int16[p+8]=c,this.int16[p+9]=u,this.int16[p+10]=f,this.int16[p+11]=h,t},e}(wi);Li.prototype.bytesPerElement=24,Dn("StructArrayLayout4i4ui4i24",Li);var Ii=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.float32[i+0]=e,this.float32[i+1]=r,this.float32[i+2]=n,t},e}(wi);Ii.prototype.bytesPerElement=12,Dn("StructArrayLayout3f12",Ii);var Pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint32[1*t+0]=e,t},e}(wi);Pi.prototype.bytesPerElement=4,Dn("StructArrayLayout1ul4",Pi);var zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,n,i,a,o,s,l)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c){var u=10*t,f=5*t;return this.int16[u+0]=e,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[f+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,t},e}(wi);zi.prototype.bytesPerElement=20,Dn("StructArrayLayout6i1ul2ui20",zi);var Oi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,n,i,a)},e.prototype.emplace=function(t,e,r,n,i,a,o){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=n,this.int16[s+3]=i,this.int16[s+4]=a,this.int16[s+5]=o,t},e}(wi);Oi.prototype.bytesPerElement=12,Dn("StructArrayLayout2i2i2i12",Oi);var Di=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,n,i)},e.prototype.emplace=function(t,e,r,n,i,a){var o=4*t,s=8*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,t},e}(wi);Di.prototype.bytesPerElement=16,Dn("StructArrayLayout2f1f2i16",Di);var Ri=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=12*t,o=3*t;return this.uint8[a+0]=e,this.uint8[a+1]=r,this.float32[o+1]=n,this.float32[o+2]=i,t},e}(wi);Ri.prototype.bytesPerElement=12,Dn("StructArrayLayout2ub2f12",Ri);var Fi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,this.uint16[i+2]=n,t},e}(wi);Fi.prototype.bytesPerElement=6,Dn("StructArrayLayout3ui6",Fi);var Bi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m){var v=this.length;return this.resize(v+1),this.emplace(v,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v){var y=24*t,x=12*t,b=48*t;return this.int16[y+0]=e,this.int16[y+1]=r,this.uint16[y+2]=n,this.uint16[y+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[y+10]=l,this.uint16[y+11]=c,this.uint16[y+12]=u,this.float32[x+7]=f,this.float32[x+8]=h,this.uint8[b+36]=p,this.uint8[b+37]=d,this.uint8[b+38]=g,this.uint32[x+10]=m,this.int16[y+22]=v,t},e}(wi);Bi.prototype.bytesPerElement=48,Dn("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Bi);var Ni=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,M,A,S){var E=this.length;return this.resize(E+1),this.emplace(E,t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,M,A,S)},e.prototype.emplace=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,_,w,T,k,M,A,S,E){var C=34*t,L=17*t;return this.int16[C+0]=e,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=f,this.uint16[C+11]=h,this.uint16[C+12]=p,this.uint16[C+13]=d,this.uint16[C+14]=g,this.uint16[C+15]=m,this.uint16[C+16]=v,this.uint16[C+17]=y,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[L+12]=k,this.float32[L+13]=M,this.float32[L+14]=A,this.float32[L+15]=S,this.float32[L+16]=E,t},e}(wi);Ni.prototype.bytesPerElement=68,Dn("StructArrayLayout8i15ui1ul4f68",Ni);var ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.float32[1*t+0]=e,t},e}(wi);ji.prototype.bytesPerElement=4,Dn("StructArrayLayout1f4",ji);var Ui=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=3*t;return this.int16[i+0]=e,this.int16[i+1]=r,this.int16[i+2]=n,t},e}(wi);Ui.prototype.bytesPerElement=6,Dn("StructArrayLayout3i6",Ui);var Vi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r)},e.prototype.emplace=function(t,e,r,n){var i=4*t;return this.uint32[2*t+0]=e,this.uint16[i+2]=r,this.uint16[i+3]=n,t},e}(wi);Vi.prototype.bytesPerElement=8,Dn("StructArrayLayout1ul2ui8",Vi);var qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,t},e}(wi);qi.prototype.bytesPerElement=4,Dn("StructArrayLayout2ui4",qi);var Hi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint16[1*t+0]=e,t},e}(wi);Hi.prototype.bytesPerElement=2,Dn("StructArrayLayout1ui2",Hi);var Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var n=2*t;return this.float32[n+0]=e,this.float32[n+1]=r,t},e}(wi);Gi.prototype.bytesPerElement=8,Dn("StructArrayLayout2f8",Gi);var Yi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,n){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r,n)},e.prototype.emplace=function(t,e,r,n,i){var a=4*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,t},e}(wi);Yi.prototype.bytesPerElement=16,Dn("StructArrayLayout4f16",Yi);var Wi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new i(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(_i);Wi.prototype.size=20;var Xi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Wi(this,t)},e}(zi);Dn("CollisionBoxArray",Xi);var Zi=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(_i);Zi.prototype.size=48;var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Zi(this,t)},e}(Bi);Dn("PlacedSymbolArray",Ji);var Ki=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(_i);Ki.prototype.size=68;var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Ki(this,t)},e}(Ni);Dn("SymbolInstanceArray",Qi);var $i=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(ji);Dn("GlyphOffsetArray",$i);var ta=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(Ui);Dn("SymbolLineVertexArray",ta);var ea=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(_i);ea.prototype.size=8;var ra=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new ea(this,t)},e}(Vi);Dn("FeatureIndexArray",ra);var na=Ti([{name:"a_pos",components:2,type:"Int16"}],4).members,ia=function(t){void 0===t&&(t=[]),this.segments=t};function aa(t,e){return 256*(t=l(Math.floor(t),0,255))+l(Math.floor(e),0,255)}ia.prototype.prepareSegment=function(t,e,r,n){var i=this.segments[this.segments.length-1];return t>ia.MAX_VERTEX_ARRAY_LENGTH&&_("Max vertices per segment is "+ia.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!i||i.vertexLength+t>ia.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i},ia.prototype.get=function(){return this.segments},ia.prototype.destroy=function(){for(var t=0,e=this.segments;t>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(a>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(c+2))<<16;case 2:l^=(255&t.charCodeAt(c+1))<<8;case 1:i^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(c)))*o+(((l>>>16)*o&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return i^=t.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0}})),la=e((function(t){t.exports=function(t,e){for(var r,n=t.length,i=e^n,a=0;n>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(a)|(255&t.charCodeAt(++a))<<8|(255&t.charCodeAt(++a))<<16|(255&t.charCodeAt(++a))<<24))+((1540483477*(r>>>16)&65535)<<16),i=1540483477*(65535&i)+((1540483477*(i>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&t.charCodeAt(a+2))<<16;case 2:i^=(255&t.charCodeAt(a+1))<<8;case 1:i=1540483477*(65535&(i^=255&t.charCodeAt(a)))+((1540483477*(i>>>16)&65535)<<16)}return i=1540483477*(65535&(i^=i>>>13))+((1540483477*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0}})),ca=sa,ua=la;ca.murmur3=sa,ca.murmur2=ua;var fa=function(){this.ids=[],this.positions=[],this.indexed=!1};fa.prototype.add=function(t,e,r,n){this.ids.push(pa(t)),this.positions.push(e,r,n)},fa.prototype.getPositions=function(t){for(var e=pa(t),r=0,n=this.ids.length-1;r>1;this.ids[i]>=e?n=i:r=i+1}for(var a=[];this.ids[r]===e;)a.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return a},fa.serialize=function(t,e){var r=new Float64Array(t.ids),n=new Uint32Array(t.positions);return function t(e,r,n,i){for(;n>1],o=n-1,s=i+1;;){do{o++}while(e[o]a);if(o>=s)break;da(e,o,s),da(r,3*o,3*s),da(r,3*o+1,3*s+1),da(r,3*o+2,3*s+2)}s-nOa.max||o.yOa.max)&&(_("Geometry exceeds allowed extent, reduce your vector tile buffer size"),o.x=l(o.x,Oa.min,Oa.max),o.y=l(o.y,Oa.min,Oa.max))}return r}function Ra(t,e,r,n,i){t.emplaceBack(2*e+(n+1)/2,2*r+(i+1)/2)}var Fa=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Mi,this.indexArray=new Fi,this.segments=new ia,this.programConfigurations=new Ia(na,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function Ba(t,e){for(var r=0;r1){if(Va(t,e))return!0;for(var n=0;n1?r:r.sub(e)._mult(i)._add(e))}function Ya(t,e){for(var r,n,i,a=!1,o=0;oe.y!=(i=r[l]).y>e.y&&e.x<(i.x-n.x)*(e.y-n.y)/(i.y-n.y)+n.x&&(a=!a);return a}function Wa(t,e){for(var r=!1,n=0,i=t.length-1;ne.y!=o.y>e.y&&e.x<(o.x-a.x)*(e.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function Xa(t,e,r){var n=r[0],i=r[2];if(t.xi.x&&e.x>i.x||t.yi.y&&e.y>i.y)return!1;var a=w(t,e,r[0]);return a!==w(t,e,r[1])||a!==w(t,e,r[2])||a!==w(t,e,r[3])}function Za(t,e,r){var n=e.paint.get(t).value;return"constant"===n.kind?n.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Ja(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Ka(t,e,r,n,a){if(!e[0]&&!e[1])return t;var o=i.convert(e)._mult(a);"viewport"===r&&o._rotate(-n);for(var s=[],l=0;l=8192||u<0||u>=8192)){var f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=f.vertexLength;Ra(this.layoutVertexArray,c,u,-1,-1),Ra(this.layoutVertexArray,c,u,1,-1),Ra(this.layoutVertexArray,c,u,1,1),Ra(this.layoutVertexArray,c,u,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),f.vertexLength+=4,f.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},n)},Dn("CircleBucket",Fa,{omit:["layers"]});var Qa=new yi({"circle-sort-key":new di(At.layout_circle["circle-sort-key"])}),$a={paint:new yi({"circle-radius":new di(At.paint_circle["circle-radius"]),"circle-color":new di(At.paint_circle["circle-color"]),"circle-blur":new di(At.paint_circle["circle-blur"]),"circle-opacity":new di(At.paint_circle["circle-opacity"]),"circle-translate":new pi(At.paint_circle["circle-translate"]),"circle-translate-anchor":new pi(At.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new pi(At.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new pi(At.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new di(At.paint_circle["circle-stroke-width"]),"circle-stroke-color":new di(At.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new di(At.paint_circle["circle-stroke-opacity"])}),layout:Qa},to="undefined"!=typeof Float32Array?Float32Array:Array;function eo(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ro(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=e[5],c=e[6],u=e[7],f=e[8],h=e[9],p=e[10],d=e[11],g=e[12],m=e[13],v=e[14],y=e[15],x=r[0],b=r[1],_=r[2],w=r[3];return t[0]=x*n+b*s+_*f+w*g,t[1]=x*i+b*l+_*h+w*m,t[2]=x*a+b*c+_*p+w*v,t[3]=x*o+b*u+_*d+w*y,t[4]=(x=r[4])*n+(b=r[5])*s+(_=r[6])*f+(w=r[7])*g,t[5]=x*i+b*l+_*h+w*m,t[6]=x*a+b*c+_*p+w*v,t[7]=x*o+b*u+_*d+w*y,t[8]=(x=r[8])*n+(b=r[9])*s+(_=r[10])*f+(w=r[11])*g,t[9]=x*i+b*l+_*h+w*m,t[10]=x*a+b*c+_*p+w*v,t[11]=x*o+b*u+_*d+w*y,t[12]=(x=r[12])*n+(b=r[13])*s+(_=r[14])*f+(w=r[15])*g,t[13]=x*i+b*l+_*h+w*m,t[14]=x*a+b*c+_*p+w*v,t[15]=x*o+b*u+_*d+w*y,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var no,io=ro;function ao(t,e,r){var n=e[0],i=e[1],a=e[2],o=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,t[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,t[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,t[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,t}no=new to(3),to!=Float32Array&&(no[0]=0,no[1]=0,no[2]=0),function(){var t=new to(4);to!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var oo=(function(){var t=new to(2);to!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,$a)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new Fa(t)},e.prototype.queryRadius=function(t){var e=t;return Za("circle-radius",this,e)+Za("circle-stroke-width",this,e)+Ja(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,i,a,o,s){for(var l=Ka(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),c=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),u="map"===this.paint.get("circle-pitch-alignment"),f=u?l:function(t,e){return t.map((function(t){return so(t,e)}))}(l,s),h=u?c*o:c,p=0,d=n;pt.width||i.height>t.height||r.x>t.width-i.width||r.y>t.height-i.height)throw new RangeError("out of range source coordinates for image copy");if(i.width>e.width||i.height>e.height||n.x>e.width-i.width||n.y>e.height-i.height)throw new RangeError("out of range destination coordinates for image copy");for(var o=t.data,s=e.data,l=0;l80*r){n=a=t[0],i=o=t[1];for(var d=r;da&&(a=s),l>o&&(o=l);c=0!==(c=Math.max(a-n,o-i))?1/c:0}return Ao(h,p,r,n,i,c),p}function ko(t,e,r,n,i){var a,o;if(i===Xo(t,e,r,n)>0)for(a=e;a=e;a-=n)o=Go(a,t[a],t[a+1],o);return o&&No(o,o.next)&&(Yo(o),o=o.next),o}function Mo(t,e){if(!t)return t;e||(e=t);var r,n=t;do{if(r=!1,n.steiner||!No(n,n.next)&&0!==Bo(n.prev,n,n.next))n=n.next;else{if(Yo(n),(n=e=n.prev)===n.next)break;r=!0}}while(r||n!==e);return e}function Ao(t,e,r,n,i,a,o){if(t){!o&&a&&function(t,e,r,n){var i=t;do{null===i.z&&(i.z=Oo(i.x,i.y,e,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,r,n,i,a,o,s,l,c=1;do{for(r=t,t=null,a=null,o=0;r;){for(o++,n=r,s=0,e=0;e0||l>0&&n;)0!==s&&(0===l||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:t=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,n,i,a);for(var s,l,c=t;t.prev!==t.next;)if(s=t.prev,l=t.next,a?Eo(t,n,i,a):So(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Yo(t),t=l.next,c=l.next;else if((t=l)===c){o?1===o?Ao(t=Co(Mo(t),e,r),e,r,n,i,a,2):2===o&&Lo(t,e,r,n,i,a):Ao(Mo(t),e,r,n,i,a,1);break}}}function So(t){var e=t.prev,r=t,n=t.next;if(Bo(e,r,n)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(Ro(e.x,e.y,r.x,r.y,n.x,n.y,i.x,i.y)&&Bo(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Eo(t,e,r,n){var i=t.prev,a=t,o=t.next;if(Bo(i,a,o)>=0)return!1;for(var s=i.x>a.x?i.x>o.x?i.x:o.x:a.x>o.x?a.x:o.x,l=i.y>a.y?i.y>o.y?i.y:o.y:a.y>o.y?a.y:o.y,c=Oo(i.x=c&&h&&h.z<=u;){if(f!==t.prev&&f!==t.next&&Ro(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Bo(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,h!==t.prev&&h!==t.next&&Ro(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&Bo(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;f&&f.z>=c;){if(f!==t.prev&&f!==t.next&&Ro(i.x,i.y,a.x,a.y,o.x,o.y,f.x,f.y)&&Bo(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;h&&h.z<=u;){if(h!==t.prev&&h!==t.next&&Ro(i.x,i.y,a.x,a.y,o.x,o.y,h.x,h.y)&&Bo(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function Co(t,e,r){var n=t;do{var i=n.prev,a=n.next.next;!No(i,a)&&jo(i,n,n.next,a)&&qo(i,a)&&qo(a,i)&&(e.push(i.i/r),e.push(n.i/r),e.push(a.i/r),Yo(n),Yo(n.next),n=t=a),n=n.next}while(n!==t);return Mo(n)}function Lo(t,e,r,n,i,a){var o=t;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&Fo(o,s)){var l=Ho(o,s);return o=Mo(o,o.next),l=Mo(l,l.next),Ao(o,e,r,n,i,a),void Ao(l,e,r,n,i,a)}s=s.next}o=o.next}while(o!==t)}function Io(t,e){return t.x-e.x}function Po(t,e){if(e=function(t,e){var r,n=e,i=t.x,a=t.y,o=-1/0;do{if(a<=n.y&&a>=n.next.y&&n.next.y!==n.y){var s=n.x+(a-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(s<=i&&s>o){if(o=s,s===i){if(a===n.y)return n;if(a===n.next.y)return n.next}r=n.x=n.x&&n.x>=u&&i!==n.x&&Ro(ar.x||n.x===r.x&&zo(r,n)))&&(r=n,h=l)),n=n.next}while(n!==c);return r}(t,e)){var r=Ho(e,t);Mo(e,e.next),Mo(r,r.next)}}function zo(t,e){return Bo(t.prev,t,e.prev)<0&&Bo(e.next,t,t.next)<0}function Oo(t,e,r,n,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Do(t){var e=t,r=t;do{(e.x=0&&(t-o)*(n-s)-(r-o)*(e-s)>=0&&(r-o)*(a-s)-(i-o)*(n-s)>=0}function Fo(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&jo(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(qo(t,e)&&qo(e,t)&&function(t,e){var r=t,n=!1,i=(t.x+e.x)/2,a=(t.y+e.y)/2;do{r.y>a!=r.next.y>a&&r.next.y!==r.y&&i<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next}while(r!==t);return n}(t,e)&&(Bo(t.prev,t,e.prev)||Bo(t,e.prev,e))||No(t,e)&&Bo(t.prev,t,t.next)>0&&Bo(e.prev,e,e.next)>0)}function Bo(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function No(t,e){return t.x===e.x&&t.y===e.y}function jo(t,e,r,n){var i=Vo(Bo(t,e,r)),a=Vo(Bo(t,e,n)),o=Vo(Bo(r,n,t)),s=Vo(Bo(r,n,e));return i!==a&&o!==s||!(0!==i||!Uo(t,r,e))||!(0!==a||!Uo(t,n,e))||!(0!==o||!Uo(r,t,n))||!(0!==s||!Uo(r,e,n))}function Uo(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function Vo(t){return t>0?1:t<0?-1:0}function qo(t,e){return Bo(t.prev,t,t.next)<0?Bo(t,e,t.next)>=0&&Bo(t,t.prev,e)>=0:Bo(t,e,t.prev)<0||Bo(t,t.next,e)<0}function Ho(t,e){var r=new Wo(t.i,t.x,t.y),n=new Wo(e.i,e.x,e.y),i=t.next,a=e.prev;return t.next=e,e.prev=t,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function Go(t,e,r,n){var i=new Wo(t,e,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Yo(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wo(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Xo(t,e,r,n){for(var i=0,a=e,o=r-n;an;){if(i-n>600){var o=i-n+1,s=r-n+1,l=Math.log(o),c=.5*Math.exp(2*l/3),u=.5*Math.sqrt(l*c*(o-c)/o)*(s-o/2<0?-1:1);t(e,r,Math.max(n,Math.floor(r-s*c/o+u)),Math.min(i,Math.floor(r+(o-s)*c/o+u)),a)}var f=e[r],h=n,p=i;for(Jo(e,n,r),a(e[i],f)>0&&Jo(e,n,i);h0;)p--}0===a(e[n],f)?Jo(e,n,p):Jo(e,++p,i),p<=r&&(n=p+1),r<=p&&(i=p-1)}}(t,e,r||0,n||t.length-1,i||Ko)}function Jo(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function Ko(t,e){return te?1:0}function Qo(t,e){var r=t.length;if(r<=1)return[t];for(var n,i,a=[],o=0;o1)for(var l=0;l0&&r.holes.push(n+=t[i-1].length)}return r},_o.default=wo;var rs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Mi,this.indexArray=new Fi,this.indexArray2=new qi,this.programConfigurations=new Ia(bo,t.layers,t.zoom),this.segments=new ia,this.segments2=new ia,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};rs.prototype.populate=function(t,e,r){this.hasPattern=ts("fill",this.layers,e);for(var n=this.layers[0].layout.get("fill-sort-key"),i=[],a=0,o=t;a>3}if(a--,1===n||2===n)o+=t.readSVarint(),s+=t.readSVarint(),1===n&&(e&&l.push(e),e=[]),e.push(new i(o,s));else{if(7!==n)throw new Error("unknown command "+n);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ls.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;t.pos>3}if(n--,1===r||2===r)(i+=t.readSVarint())s&&(s=i),(a+=t.readSVarint())c&&(c=a);else if(7!==r)throw new Error("unknown command "+r)}return[o,l,s,c]},ls.prototype.toGeoJSON=function(t,e,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*t,s=this.extent*e,l=this.loadGeometry(),c=ls.types[this.type];function u(t){for(var e=0;e>3;e=1===n?t.readString():2===n?t.readFloat():3===n?t.readDouble():4===n?t.readVarint64():5===n?t.readVarint():6===n?t.readSVarint():7===n?t.readBoolean():null}return e}(r))}function ds(t,e,r){if(3===t){var n=new fs(r,r.readVarint()+r.pos);n.length&&(e[n.name]=n)}}hs.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new ss(this._pbf,e,this.extent,this._keys,this._values)};var gs={VectorTile:function(t,e){this.layers=t.readFields(ds,{},e)},VectorTileFeature:ss,VectorTileLayer:fs},ms=gs.VectorTileFeature.types,vs=Math.pow(2,13);function ys(t,e,r,n,i,a,o,s){t.emplaceBack(e,r,2*Math.floor(n*vs)+o,i*vs*2,a*vs*2,Math.round(s))}var xs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map((function(t){return t.id})),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new Si,this.indexArray=new Fi,this.programConfigurations=new Ia(os,t.layers,t.zoom),this.segments=new ia,this.stateDependentLayerIds=this.layers.filter((function(t){return t.isStateDependent()})).map((function(t){return t.id}))};function bs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}xs.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ts("fill-extrusion",this.layers,e);for(var n=0,i=t;n8192}))||P.every((function(t){return t.y<0}))||P.every((function(t){return t.y>8192}))))for(var g=0,m=0;m=1){var y=d[m-1];if(!bs(v,y)){f.vertexLength+4>ia.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var x=v.sub(y)._perp()._unit(),b=y.dist(v);g+b>32768&&(g=0),ys(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,0,g),ys(this.layoutVertexArray,v.x,v.y,x.x,x.y,0,1,g),ys(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,0,g+=b),ys(this.layoutVertexArray,y.x,y.y,x.x,x.y,0,1,g);var _=f.vertexLength;this.indexArray.emplaceBack(_,_+2,_+1),this.indexArray.emplaceBack(_+1,_+2,_+3),f.vertexLength+=4,f.primitiveLength+=2}}}}if(f.vertexLength+l>ia.MAX_VERTEX_ARRAY_LENGTH&&(f=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===ms[t.type]){for(var w=[],T=[],k=f.vertexLength,M=0,A=s;M=2&&t[l-1].equals(t[l-2]);)l--;for(var c=0;c0;if(T&&v>c){var M=u.dist(p);if(M>2*f){var A=u.sub(u.sub(p)._mult(f/M)._round());this.updateDistance(p,A),this.addCurrentVertex(A,g,0,0,h),p=A}}var S=p&&d,E=S?r:s?"butt":n;if(S&&"round"===E&&(_i&&(E="bevel"),"bevel"===E&&(_>2&&(E="flipbevel"),_100)y=m.mult(-1);else{var C=_*g.add(m).mag()/g.sub(m).mag();y._perp()._mult(C*(k?-1:1))}this.addCurrentVertex(u,y,0,0,h),this.addCurrentVertex(u,y.mult(-1),0,0,h)}else if("bevel"===E||"fakeround"===E){var L=-Math.sqrt(_*_-1),I=k?L:0,P=k?0:L;if(p&&this.addCurrentVertex(u,g,I,P,h),"fakeround"===E)for(var z=Math.round(180*w/Math.PI/20),O=1;O2*f){var j=u.add(d.sub(u)._mult(f/N)._round());this.updateDistance(u,j),this.addCurrentVertex(j,m,0,0,h),u=j}}}}},Cs.prototype.addCurrentVertex=function(t,e,r,n,i,a){void 0===a&&(a=!1);var o=e.y*n-e.x,s=-e.y-e.x*n;this.addHalfVertex(t,e.x+e.y*r,e.y-e.x*r,a,!1,r,i),this.addHalfVertex(t,o,s,a,!0,-n,i),this.distance>Es/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,n,i,a))},Cs.prototype.addHalfVertex=function(t,e,r,n,i,a,o){var s=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((t.x<<1)+(n?1:0),(t.y<<1)+(i?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===a?0:a<0?-1:1)|(63&s)<<2,s>>6);var l=o.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),o.primitiveLength++),i?this.e2=l:this.e1=l},Cs.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(Es-1):this.distance},Cs.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Dn("LineBucket",Cs,{omit:["layers","patternFeatures"]});var Ls=new yi({"line-cap":new pi(At.layout_line["line-cap"]),"line-join":new di(At.layout_line["line-join"]),"line-miter-limit":new pi(At.layout_line["line-miter-limit"]),"line-round-limit":new pi(At.layout_line["line-round-limit"]),"line-sort-key":new di(At.layout_line["line-sort-key"])}),Is={paint:new yi({"line-opacity":new di(At.paint_line["line-opacity"]),"line-color":new di(At.paint_line["line-color"]),"line-translate":new pi(At.paint_line["line-translate"]),"line-translate-anchor":new pi(At.paint_line["line-translate-anchor"]),"line-width":new di(At.paint_line["line-width"]),"line-gap-width":new di(At.paint_line["line-gap-width"]),"line-offset":new di(At.paint_line["line-offset"]),"line-blur":new di(At.paint_line["line-blur"]),"line-dasharray":new mi(At.paint_line["line-dasharray"]),"line-pattern":new gi(At.paint_line["line-pattern"]),"line-gradient":new vi(At.paint_line["line-gradient"])}),layout:Ls},Ps=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new ii(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,n,i){return r=u({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,n,i)},e}(di))(Is.paint.properties["line-width"].specification);Ps.useIntegerZoom=!0;var zs=function(t){function e(e){t.call(this,e,Is)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){this.gradient=mo(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=Ps.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Cs(t)},e.prototype.queryRadius=function(t){var e=t,r=Os(Za("line-width",this,e),Za("line-gap-width",this,e)),n=Za("line-offset",this,e);return r/2+Math.abs(n)+Ja(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,n,a,o,s){var l=Ka(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),o.angle,s),c=s/2*Os(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),u=this.paint.get("line-offset").evaluate(e,r);return u&&(n=function(t,e){for(var r=[],n=new i(0,0),a=0;a=3)for(var a=0;a0?e+2*t:t}var Ds=Ti([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Rs=Ti([{name:"a_projected_pos",components:3,type:"Float32"}],4),Fs=(Ti([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Ti([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Bs=(Ti([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Ti([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Ns=Ti([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function js(t,e,r){return t.sections.forEach((function(t){t.text=function(t,e,r){var n=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===n?t=t.toLocaleUpperCase():"lowercase"===n&&(t=t.toLocaleLowerCase()),ni.applyArabicShaping&&(t=ni.applyArabicShaping(t)),t}(t.text,e,r)})),t}Ti([{name:"triangle",components:3,type:"Uint16"}]),Ti([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Ti([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Ti([{type:"Float32",name:"offsetX"}]),Ti([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Us={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"},Vs=function(t,e,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,f=r?i-1:0,h=r?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=256*a+t[e+f],f+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+t[e+f],f+=h,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,n),a-=c}return(p?-1:1)*o*Math.pow(2,a-n)},qs=function(t,e,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:a-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+f>=1?h/l:h*Math.pow(2,1-f))*l>=2&&(o++,l/=2),o+f>=u?(s=0,o=u):o+f>=1?(s=(e*l-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[r+p]=255&s,p+=d,s/=256,i-=8);for(o=o<0;t[r+p]=255&o,p+=d,o/=256,c-=8);t[r+p-d]|=128*g},Hs=Gs;function Gs(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Gs.Varint=0,Gs.Fixed64=1,Gs.Bytes=2,Gs.Fixed32=5;var Ys="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Ws(t){return t.type===Gs.Bytes?t.readVarint()+t.pos:t.pos+1}function Xs(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Zs(t,e,r){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=t;i--)r.buf[i+n]=r.buf[i]}function Js(t,e){for(var r=0;r>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function sl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function ll(t,e,r){1===t&&r.readMessage(cl,e)}function cl(t,e,r){if(3===t){var n=r.readMessage(ul,{}),i=n.width,a=n.height,o=n.left,s=n.top,l=n.advance;e.push({id:n.id,bitmap:new ho({width:i+6,height:a+6},n.bitmap),metrics:{width:i,height:a,left:o,top:s,advance:l}})}}function ul(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function fl(t){for(var e=0,r=0,n=0,i=t;n=0;h--){var p=o[h];if(!(f.w>p.w||f.h>p.h)){if(f.x=p.x,f.y=p.y,l=Math.max(l,f.y+f.h),s=Math.max(s,f.x+f.w),f.w===p.w&&f.h===p.h){var d=o.pop();h>3,a=this.pos;this.type=7&n,t(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=al(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=sl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=al(this.buf,this.pos)+4294967296*al(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=al(this.buf,this.pos)+4294967296*sl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=Vs(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=Vs(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,n=this.buf;return e=127&(r=n[this.pos++]),r<128?e:(e|=(127&(r=n[this.pos++]))<<7,r<128?e:(e|=(127&(r=n[this.pos++]))<<14,r<128?e:(e|=(127&(r=n[this.pos++]))<<21,r<128?e:function(t,e,r){var n,i,a=r.buf;if(n=(112&(i=a[r.pos++]))>>4,i<128)return Xs(t,n,e);if(n|=(127&(i=a[r.pos++]))<<3,i<128)return Xs(t,n,e);if(n|=(127&(i=a[r.pos++]))<<10,i<128)return Xs(t,n,e);if(n|=(127&(i=a[r.pos++]))<<17,i<128)return Xs(t,n,e);if(n|=(127&(i=a[r.pos++]))<<24,i<128)return Xs(t,n,e);if(n|=(1&(i=a[r.pos++]))<<31,i<128)return Xs(t,n,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=n[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Ys?function(t,e,r){return Ys.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var n="",i=e;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?128==(192&(a=t[i+1]))&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(o=t[i+2],128==(192&(a=t[i+1]))&&128==(192&o)&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=t[i+2],s=t[i+3],128==(192&(a=t[i+1]))&&128==(192&o)&&128==(192&s)&&((c=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||c>=1114112)&&(c=null)),null===c?(c=65533,u=1):c>65535&&(c-=65536,n+=String.fromCharCode(c>>>10&1023|55296),c=56320|1023&c),n+=String.fromCharCode(c),i+=u}return n}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Gs.Bytes)return t.push(this.readVarint(e));var r=Ws(this);for(t=t||[];this.pos127;);else if(e===Gs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Gs.Fixed32)this.pos+=4;else{if(e!==Gs.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e268435455||t<0?function(t,e){var r,n;if(t>=0?(r=t%4294967296|0,n=t/4294967296|0):(n=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,n=n+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,r.buf[r.pos]=127&(t>>>=7)}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(n,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):i=n;continue}if(n<56320){t[r++]=239,t[r++]=191,t[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(t[r++]=239,t[r++]=191,t[r++]=189,i=null);n<128?t[r++]=n:(n<2048?t[r++]=n>>6|192:(n<65536?t[r++]=n>>12|224:(t[r++]=n>>18|240,t[r++]=n>>12&63|128),t[r++]=n>>6&63|128),t[r++]=63&n|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Zs(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),qs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),qs(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r=128&&Zs(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(t,e,r){this.writeTag(t,Gs.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Js,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ks,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,tl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Qs,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,$s,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,el,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,rl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,nl,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,il,e)},writeBytesField:function(t,e){this.writeTag(t,Gs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Gs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Gs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Gs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var hl=function(t,e){var r=e.pixelRatio,n=e.version,i=e.stretchX,a=e.stretchY,o=e.content;this.paddedRect=t,this.pixelRatio=r,this.stretchX=i,this.stretchY=a,this.content=o,this.version=n},pl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};pl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},pl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},pl.tlbr.get=function(){return this.tl.concat(this.br)},pl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(hl.prototype,pl);var dl=function(t,e){var r={},n={};this.haveRenderCallbacks=[];var i=[];this.addImages(t,r,i),this.addImages(e,n,i);var a=fl(i),o=new po({width:a.w||1,height:a.h||1});for(var s in t){var l=t[s],c=r[s].paddedRect;po.copy(l.data,o,{x:0,y:0},{x:c.x+1,y:c.y+1},l.data)}for(var u in e){var f=e[u],h=n[u].paddedRect,p=h.x+1,d=h.y+1,g=f.data.width,m=f.data.height;po.copy(f.data,o,{x:0,y:0},{x:p,y:d},f.data),po.copy(f.data,o,{x:0,y:m-1},{x:p,y:d-1},{width:g,height:1}),po.copy(f.data,o,{x:0,y:0},{x:p,y:d+m},{width:g,height:1}),po.copy(f.data,o,{x:g-1,y:0},{x:p-1,y:d},{width:1,height:m}),po.copy(f.data,o,{x:0,y:0},{x:p+g,y:d},{width:1,height:m})}this.image=o,this.iconPositions=r,this.patternPositions=n};dl.prototype.addImages=function(t,e,r){for(var n in t){var i=t[n],a={x:0,y:0,w:i.data.width+2,h:i.data.height+2};r.push(a),e[n]=new hl(a,i),i.hasRenderCallback&&this.haveRenderCallbacks.push(n)}},dl.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},dl.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var n=t.tl;r.update(e.data,void 0,{x:n[0],y:n[1]})}},Dn("ImagePosition",hl),Dn("ImageAtlas",dl);var gl={horizontal:1,vertical:2,horizontalOnly:3},ml=function(){this.scale=1,this.fontStack="",this.imageName=null};ml.forText=function(t,e){var r=new ml;return r.scale=t||1,r.fontStack=e,r},ml.forImage=function(t){var e=new ml;return e.imageName=t,e};var vl=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function yl(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=vl.fromFeature(t,i);f===gl.vertical&&v.verticalizePunctuation();var y=ni.processBidirectionalText,x=ni.processStyledBidirectionalText;if(y&&1===v.sections.length){m=[];for(var b=0,_=y(v.toString(),Ml(v,c,a,e,n,p,d));b<_.length;b+=1){var w=_[b],T=new vl;T.text=w,T.sections=v.sections;for(var k=0;k0&&B>M&&(M=B)}else{var N=r[S.fontStack],j=N&&N[C];if(j&&j.rect)P=j.rect,I=j.metrics;else{var U=e[S.fontStack],V=U&&U[C];if(!V)continue;I=V.metrics}L=24*(_-S.scale)}D?(t.verticalizable=!0,k.push({glyph:C,imageName:z,x:h,y:p+L,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:I,rect:P}),h+=O*S.scale+c):(k.push({glyph:C,imageName:z,x:h,y:p+L,vertical:D,scale:S.scale,fontStack:S.fontStack,sectionIndex:E,metrics:I,rect:P}),h+=I.advance*S.scale+c)}0!==k.length&&(d=Math.max(h-c,d),Sl(k,0,k.length-1,m,M)),h=0;var q=a*_+M;T.lineOffset=Math.max(M,w),p+=q,g=Math.max(q,g),++v}else p+=a,++v}var H,G=p- -17,Y=Al(o),W=Y.horizontalAlign,X=Y.verticalAlign;(function(t,e,r,n,i,a,o,s,l){var c,u=(e-r)*i;c=a!==o?-s*n- -17:(-n*l+.5)*o;for(var f=0,h=t;f=0&&n>=t&&xl[this.text.charCodeAt(n)];n--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},vl.prototype.substring=function(t,e){var r=new vl;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},vl.prototype.toString=function(){return this.text},vl.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce((function(e,r){return Math.max(e,t.sections[r].scale)}),0)},vl.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(ml.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,n=0;n=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var xl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},bl={};function _l(t,e,r,n,i,a){if(e.imageName){var o=n[e.imageName];return o?o.displaySize[0]*e.scale*24/a+i:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+i:0}function wl(t,e,r,n){var i=Math.pow(t-e,2);return n?t=0,f=0,h=0;h-r/2;){if(--o<0)return!1;s-=t[o].dist(a),a=t[o]}s+=t[o].dist(t[o+1]),o++;for(var l=[],c=0;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=u.dist(f)}return!0}function Dl(t){for(var e=0,r=0;rc){var d=(c-l)/p,g=Ue(f.x,h.x,d),m=Ue(f.y,h.y,d),v=new Cl(g,m,h.angleTo(f),u);return v._round(),!o||Ol(t,v,s,o,e)?v:void 0}l+=p}}function Nl(t,e,r,n,i,a,o,s,l){var c=Rl(n,a,o),u=Fl(n,i),f=u*o,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-f=0&&_=0&&w=0&&p+u<=f){var T=new Cl(_,w,x,g);T._round(),i&&!Ol(e,T,o,i,a)||d.push(T)}}h+=y}return l||d.length||s||(d=t(e,h/2,n,i,a,o,s,!0,c)),d}(t,h?e/2*s%e:(u/2+2*a)*o*s%e,e,c,r,f,h,!1,l)}function jl(t,e,r,n,a){for(var o=[],s=0;s=n&&h.x>=n||(f.x>=n?f=new i(n,f.y+(n-f.x)/(h.x-f.x)*(h.y-f.y))._round():h.x>=n&&(h=new i(n,f.y+(n-f.x)/(h.x-f.x)*(h.y-f.y))._round()),f.y>=a&&h.y>=a||(f.y>=a?f=new i(f.x+(a-f.y)/(h.y-f.y)*(h.x-f.x),a)._round():h.y>=a&&(h=new i(f.x+(a-f.y)/(h.y-f.y)*(h.x-f.x),a)._round()),c&&f.equals(c[c.length-1])||o.push(c=[f]),c.push(h)))))}return o}function Ul(t,e,r,n){var a=[],o=t.image,s=o.pixelRatio,l=o.paddedRect.w-2,c=o.paddedRect.h-2,u=t.right-t.left,f=t.bottom-t.top,h=o.stretchX||[[0,l]],p=o.stretchY||[[0,c]],d=function(t,e){return t+e[1]-e[0]},g=h.reduce(d,0),m=p.reduce(d,0),v=l-g,y=c-m,x=0,b=g,_=0,w=m,T=0,k=v,M=0,A=y;if(o.content&&n){var S=o.content;x=Vl(h,0,S[0]),_=Vl(p,0,S[1]),b=Vl(h,S[0],S[2]),w=Vl(p,S[1],S[3]),T=S[0]-x,M=S[1]-_,k=S[2]-S[0]-b,A=S[3]-S[1]-w}var E=function(n,a,l,c){var h=Hl(n.stretch-x,b,u,t.left),p=Gl(n.fixed-T,k,n.stretch,g),d=Hl(a.stretch-_,w,f,t.top),v=Gl(a.fixed-M,A,a.stretch,m),y=Hl(l.stretch-x,b,u,t.left),S=Gl(l.fixed-T,k,l.stretch,g),E=Hl(c.stretch-_,w,f,t.top),C=Gl(c.fixed-M,A,c.stretch,m),L=new i(h,d),I=new i(y,d),P=new i(y,E),z=new i(h,E),O=new i(p/s,v/s),D=new i(S/s,C/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),B=Math.cos(R),N=[B,-F,F,B];L._matMult(N),I._matMult(N),z._matMult(N),P._matMult(N)}var j=n.stretch+n.fixed,U=a.stretch+a.fixed;return{tl:L,tr:I,bl:z,br:P,tex:{x:o.paddedRect.x+1+j,y:o.paddedRect.y+1+U,w:l.stretch+l.fixed-j,h:c.stretch+c.fixed-U},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:O,pixelOffsetBR:D,minFontScaleX:k/s/u,minFontScaleY:A/s/f,isSDF:r}};if(n&&(o.stretchX||o.stretchY))for(var C=ql(h,v,g),L=ql(p,y,m),I=0;I0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var g=o.top*s-l,m=o.bottom*s+l,v=o.left*s-l,y=o.right*s+l,x=o.collisionPadding;if(x&&(v-=x[0]*s,g-=x[1]*s,y+=x[2]*s,m+=x[3]*s),u){var b=new i(v,g),_=new i(y,g),w=new i(v,m),T=new i(y,m),k=u*Math.PI/180;b._rotate(k),_._rotate(k),w._rotate(k),T._rotate(k),v=Math.min(b.x,_.x,w.x,T.x),y=Math.max(b.x,_.x,w.x,T.x),g=Math.min(b.y,_.y,w.y,T.y),m=Math.max(b.y,_.y,w.y,T.y)}t.emplaceBack(e.x,e.y,v,g,y,m,r,n,a)}this.boxEndIndex=t.length},Wl=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Xl),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Xl(t,e){return te?1:0}function Zl(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var n=1/0,a=1/0,o=-1/0,s=-1/0,l=t[0],c=0;co)&&(o=u.x),(!c||u.y>s)&&(s=u.y)}var f=Math.min(o-n,s-a),h=f/2,p=new Wl([],Jl);if(0===f)return new i(n,a);for(var d=n;dm.d||!m.d)&&(m=y,r&&console.log("found best %d after %d probes",Math.round(1e4*y.d)/1e4,v)),y.max-m.d<=e||(p.push(new Kl(y.p.x-(h=y.h/2),y.p.y-h,h,t)),p.push(new Kl(y.p.x+h,y.p.y-h,h,t)),p.push(new Kl(y.p.x-h,y.p.y+h,h,t)),p.push(new Kl(y.p.x+h,y.p.y+h,h,t)),v+=4)}return r&&(console.log("num probes: "+v),console.log("best distance: "+m.d)),m.p}function Jl(t,e){return e.max-t.max}function Kl(t,e,r,n){this.p=new i(t,e),this.h=r,this.d=function(t,e){for(var r=!1,n=1/0,i=0;it.y!=u.y>t.y&&t.x<(u.x-c.x)*(t.y-c.y)/(u.y-c.y)+c.x&&(r=!r),n=Math.min(n,Ga(t,c,u))}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}Wl.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Wl.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Wl.prototype.peek=function(){return this.data[0]},Wl.prototype._up=function(t){for(var e=this.data,r=this.compare,n=e[t];t>0;){var i=t-1>>1,a=e[i];if(r(n,a)>=0)break;e[t]=a,t=i}e[t]=n},Wl.prototype._down=function(t){for(var e=this.data,r=this.compare,n=this.length>>1,i=e[t];t=0)break;e[t]=o,t=a}e[t]=i};var Ql=Number.POSITIVE_INFINITY;function $l(t,e){return e[1]!==Ql?function(t,e,r){var n=0,i=0;switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=7-r}switch(t){case"top-right":case"bottom-right":case"right":n=-e;break;case"top-left":case"bottom-left":case"left":n=e}return[n,i]}(t,e[0],e[1]):function(t,e){var r=0,n=0;e<0&&(e=0);var i=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=7-i;break;case"bottom":n=7-e;break;case"top":n=e-7}switch(t){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=e;break;case"right":r=-e}return[r,n]}(t,e[0])}function tc(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function ec(t,e,r,n,a,o,s,l,c,u,f,h,p,d,g){var m=function(t,e,r,n,a,o,s,l){for(var c=n.layout.get("text-rotate").evaluate(o,{})*Math.PI/180,u=[],f=0,h=e.positionedLines;f32640&&_(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===v.kind&&((y=[128*d.compositeTextSizes[0].evaluate(s,{},g),128*d.compositeTextSizes[1].evaluate(s,{},g)])[0]>32640||y[1]>32640)&&_(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,m,y,l,o,s,u,e,c.lineStartIndex,c.lineLength,p,g);for(var x=0,b=f;x=0;o--)if(n.dist(a[o])0)&&("constant"!==a.value.kind||a.value.value.length>0),c="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,u=i.get("symbol-sort-key");if(this.features=[],l||c){for(var f=e.iconDependencies,h=e.glyphDependencies,p=e.availableImages,d=new ii(this.zoom),g=0,m=t;g=0;for(var z=0,O=k.sections;z=0;s--)a[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:i},s>0&&(i+=e[s-1].dist(e[s]));for(var l=0;l0},fc.prototype.hasIconData=function(){return this.icon.segments.get().length>0},fc.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},fc.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},fc.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},fc.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),n=r.vertexStartIndex+4*r.numGlyphs,i=r.vertexStartIndex;i1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,n=this.symbolInstanceIndexes;r=0&&n.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)})),i.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,i.verticalPlacedTextSymbolIndex),i.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.placedIconSymbolIndex),i.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,i.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Dn("SymbolBucket",fc,{omit:["layers","collisionBoxArray","features","compareText"]}),fc.MAX_GLYPHS=65535,fc.addDynamicAttributes=sc;var hc=new yi({"symbol-placement":new pi(At.layout_symbol["symbol-placement"]),"symbol-spacing":new pi(At.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new pi(At.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new di(At.layout_symbol["symbol-sort-key"]),"symbol-z-order":new pi(At.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new pi(At.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new pi(At.layout_symbol["icon-ignore-placement"]),"icon-optional":new pi(At.layout_symbol["icon-optional"]),"icon-rotation-alignment":new pi(At.layout_symbol["icon-rotation-alignment"]),"icon-size":new di(At.layout_symbol["icon-size"]),"icon-text-fit":new pi(At.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new pi(At.layout_symbol["icon-text-fit-padding"]),"icon-image":new di(At.layout_symbol["icon-image"]),"icon-rotate":new di(At.layout_symbol["icon-rotate"]),"icon-padding":new pi(At.layout_symbol["icon-padding"]),"icon-keep-upright":new pi(At.layout_symbol["icon-keep-upright"]),"icon-offset":new di(At.layout_symbol["icon-offset"]),"icon-anchor":new di(At.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new pi(At.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new pi(At.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new pi(At.layout_symbol["text-rotation-alignment"]),"text-field":new di(At.layout_symbol["text-field"]),"text-font":new di(At.layout_symbol["text-font"]),"text-size":new di(At.layout_symbol["text-size"]),"text-max-width":new di(At.layout_symbol["text-max-width"]),"text-line-height":new pi(At.layout_symbol["text-line-height"]),"text-letter-spacing":new di(At.layout_symbol["text-letter-spacing"]),"text-justify":new di(At.layout_symbol["text-justify"]),"text-radial-offset":new di(At.layout_symbol["text-radial-offset"]),"text-variable-anchor":new pi(At.layout_symbol["text-variable-anchor"]),"text-anchor":new di(At.layout_symbol["text-anchor"]),"text-max-angle":new pi(At.layout_symbol["text-max-angle"]),"text-writing-mode":new pi(At.layout_symbol["text-writing-mode"]),"text-rotate":new di(At.layout_symbol["text-rotate"]),"text-padding":new pi(At.layout_symbol["text-padding"]),"text-keep-upright":new pi(At.layout_symbol["text-keep-upright"]),"text-transform":new di(At.layout_symbol["text-transform"]),"text-offset":new di(At.layout_symbol["text-offset"]),"text-allow-overlap":new pi(At.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new pi(At.layout_symbol["text-ignore-placement"]),"text-optional":new pi(At.layout_symbol["text-optional"])}),pc={paint:new yi({"icon-opacity":new di(At.paint_symbol["icon-opacity"]),"icon-color":new di(At.paint_symbol["icon-color"]),"icon-halo-color":new di(At.paint_symbol["icon-halo-color"]),"icon-halo-width":new di(At.paint_symbol["icon-halo-width"]),"icon-halo-blur":new di(At.paint_symbol["icon-halo-blur"]),"icon-translate":new pi(At.paint_symbol["icon-translate"]),"icon-translate-anchor":new pi(At.paint_symbol["icon-translate-anchor"]),"text-opacity":new di(At.paint_symbol["text-opacity"]),"text-color":new di(At.paint_symbol["text-color"],{runtimeType:Bt,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new di(At.paint_symbol["text-halo-color"]),"text-halo-width":new di(At.paint_symbol["text-halo-width"]),"text-halo-blur":new di(At.paint_symbol["text-halo-blur"]),"text-translate":new pi(At.paint_symbol["text-translate"]),"text-translate-anchor":new pi(At.paint_symbol["text-translate-anchor"])}),layout:hc},dc=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Ot,this.defaultValue=t};dc.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},dc.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},dc.prototype.outputDefined=function(){return!1},dc.prototype.serialize=function(){return null},Dn("FormatSectionOverride",dc,{omit:["defaultValue"]});var gc=function(t){function e(e){t.call(this,e,pc)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var n=this.layout.get("text-writing-mode");if(n){for(var i=[],a=0,o=n;a",targetMapId:n,sourceMapId:a.mapId})}}},Cc.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if(""===e.type){delete this.tasks[r];var n=this.cancelCallbacks[r];delete this.cancelCallbacks[r],n&&n()}else k()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},Cc.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Cc.prototype.processTask=function(t,e){var r=this;if(""===e.type){var n=this.callbacks[t];delete this.callbacks[t],n&&(e.error?n(jn(e.error)):n(null,jn(e.data)))}else{var i=!1,a=S(this.globalScope)?void 0:[],o=e.hasCallback?function(e,n){i=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"",sourceMapId:r.mapId,error:e?Nn(e):null,data:Nn(n,a)},a)}:function(t){i=!0},s=null,l=jn(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,o);else if(this.parent.getWorkerSource){var c=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,c[0],l.source)[c[1]](l,o)}else o(new Error("Could not find function "+e.type));!i&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Cc.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var Ic=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};Ic.prototype.setNorthEast=function(t){return this._ne=t instanceof Pc?new Pc(t.lng,t.lat):Pc.convert(t),this},Ic.prototype.setSouthWest=function(t){return this._sw=t instanceof Pc?new Pc(t.lng,t.lat):Pc.convert(t),this},Ic.prototype.extend=function(t){var e,r,n=this._sw,i=this._ne;if(t instanceof Pc)e=t,r=t;else{if(!(t instanceof Ic))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(Ic.convert(t)):this.extend(Pc.convert(t)):this;if(r=t._ne,!(e=t._sw)||!r)return this}return n||i?(n.lng=Math.min(e.lng,n.lng),n.lat=Math.min(e.lat,n.lat),i.lng=Math.max(r.lng,i.lng),i.lat=Math.max(r.lat,i.lat)):(this._sw=new Pc(e.lng,e.lat),this._ne=new Pc(r.lng,r.lat)),this},Ic.prototype.getCenter=function(){return new Pc((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Ic.prototype.getSouthWest=function(){return this._sw},Ic.prototype.getNorthEast=function(){return this._ne},Ic.prototype.getNorthWest=function(){return new Pc(this.getWest(),this.getNorth())},Ic.prototype.getSouthEast=function(){return new Pc(this.getEast(),this.getSouth())},Ic.prototype.getWest=function(){return this._sw.lng},Ic.prototype.getSouth=function(){return this._sw.lat},Ic.prototype.getEast=function(){return this._ne.lng},Ic.prototype.getNorth=function(){return this._ne.lat},Ic.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Ic.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Ic.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Ic.prototype.contains=function(t){var e=Pc.convert(t),r=e.lng,n=e.lat,i=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&i},Ic.convert=function(t){return!t||t instanceof Ic?t:new Ic(t)};var Pc=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Pc.prototype.wrap=function(){return new Pc(c(this.lng,-180,180),this.lat)},Pc.prototype.toArray=function(){return[this.lng,this.lat]},Pc.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Pc.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,n=t.lat*e,i=Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(i,1))},Pc.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new Ic(new Pc(this.lng-r,this.lat-e),new Pc(this.lng+r,this.lat+e))},Pc.convert=function(t){if(t instanceof Pc)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Pc(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Pc(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var zc=2*Math.PI*6371008.8;function Oc(t){return zc*Math.cos(t*Math.PI/180)}function Dc(t){return(180+t)/360}function Rc(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Fc(t,e){return t/Oc(e)}function Bc(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var Nc=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Nc.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Pc.convert(t);return new Nc(Dc(r.lng),Rc(r.lat),Fc(e,r.lat))},Nc.prototype.toLngLat=function(){return new Pc(360*this.x-180,Bc(this.y))},Nc.prototype.toAltitude=function(){return this.z*Oc(Bc(this.y))},Nc.prototype.meterInMercatorCoordinateUnits=function(){return 1/zc*(t=Bc(this.y),1/Math.cos(t*Math.PI/180));var t};var jc=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=qc(0,t,t,e,r)};jc.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},jc.prototype.url=function(t,e){var r,n,i,a,o,s=(n=this.y,i=this.z,a=Lc(256*(r=this.x),256*(n=Math.pow(2,i)-n-1),i),o=Lc(256*(r+1),256*(n+1),i),a[0]+","+a[1]+","+o[0]+","+o[1]),l=function(t,e,r){for(var n,i="",a=t;a>0;a--)i+=(e&(n=1<this.canonical.z?new Vc(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Vc(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},Vc.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?qc(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):qc(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},Vc.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ>e&&t.canonical.y===this.canonical.y>>e},Vc.prototype.children=function(t){if(this.overscaledZ>=t)return[new Vc(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new Vc(e,this.wrap,e,r,n),new Vc(e,this.wrap,e,r+1,n),new Vc(e,this.wrap,e,r,n+1),new Vc(e,this.wrap,e,r+1,n+1)]},Vc.prototype.isLessThan=function(t){return this.wrapt.wrap)&&(this.overscaledZt.overscaledZ)&&(this.canonical.xt.canonical.x)&&this.canonical.y=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},Hc.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Hc.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Hc.prototype.getPixels=function(){return new po({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Hc.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var n=e*this.dim,i=e*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(e){case-1:n=i-1;break;case 1:i=n+1}switch(r){case-1:a=o-1;break;case 1:o=a+1}for(var s=-e*this.dim,l=-r*this.dim,c=a;c=0&&u[3]>=0&&s.insert(o,u[0],u[1],u[2],u[3])}},Zc.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new gs.VectorTile(new Hs(this.rawTileData)).layers,this.sourceLayerCoder=new Gc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Zc.prototype.query=function(t,e,r,n){var a=this;this.loadVTLayers();for(var o=t.params||{},s=8192/t.tileSize/t.scale,l=rn(o.filter),c=t.queryGeometry,u=t.queryPadding*s,f=Kc(c),h=this.grid.query(f.minX-u,f.minY-u,f.maxX+u,f.maxY+u),p=Kc(t.cameraQueryGeometry),d=0,g=this.grid3D.query(p.minX-u,p.minY-u,p.maxX+u,p.maxY+u,(function(e,r,n,a){return function(t,e,r,n,a){for(var o=0,s=t;o=l.x&&a>=l.y)return!0}var c=[new i(e,r),new i(e,a),new i(n,a),new i(n,r)];if(t.length>2)for(var u=0,f=c;u=0)return!0;return!1}(a,f)){var h=this.sourceLayerCoder.decode(r),p=this.vtLayers[h].feature(n);if(i.filter(new ii(this.tileID.overscaledZ),p))for(var d=this.getId(p,h),g=0;gn)i=!1;else if(e)if(this.expirationTimeot&&(t.getActor().send("enforceCacheSizeLimit",at),ut=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete("mapbox-tiles");t&&e.catch(t).then((function(){return t()}))},t.clipLine=jl,t.clone=function(t){var e=new to(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=x,t.clone$2=function(t){var e=new to(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Ns,t.config=F,t.create=function(){var t=new to(16);return to!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new to(9);return to!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new to(4);return to!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=qr,t.createLayout=Ti,t.createStyleLayer=function(t){return"custom"===t.type?new bc(t):new _c[t.type](t)},t.cross=function(t,e,r){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1],l=r[2];return t[0]=i*l-a*s,t[1]=a*o-n*l,t[2]=n*s-i*o,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var n=0;n0&&(a=1/Math.sqrt(a)),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a,t},t.number=Ue,t.offscreenCanvasSupported=ft,t.ortho=function(t,e,r,n,i,a,o){var s=1/(e-r),l=1/(n-i),c=1/(a-o);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*s,t[13]=(i+n)*l,t[14]=(o+a)*c,t[15]=1,t},t.parseGlyphPBF=function(t){return new Hs(t).readFields(ll,[])},t.pbf=Hs,t.performSymbolLayout=function(t,e,r,n,i,a,o){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,c={};if("composite"===t.textSizeData.kind){var u=t.textSizeData,f=u.maxZoom;c.compositeTextSizes=[l["text-size"].possiblyEvaluate(new ii(u.minZoom),o),l["text-size"].possiblyEvaluate(new ii(f),o)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,p=h.maxZoom;c.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new ii(h.minZoom),o),l["icon-size"].possiblyEvaluate(new ii(p),o)]}c.layoutTextSize=l["text-size"].possiblyEvaluate(new ii(t.zoom+1),o),c.layoutIconSize=l["icon-size"].possiblyEvaluate(new ii(t.zoom+1),o),c.textMaxSize=l["text-size"].possiblyEvaluate(new ii(18));for(var d=24*s.get("text-line-height"),g="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),m=s.get("text-keep-upright"),v=s.get("text-size"),y=function(){var a=b[x],l=s.get("text-font").evaluate(a,{},o).join(","),u=v.evaluate(a,{},o),f=c.layoutTextSize.evaluate(a,{},o),h=c.layoutIconSize.evaluate(a,{},o),p={horizontal:{},vertical:void 0},y=a.text,w=[0,0];if(y){var T=y.toString(),k=24*s.get("text-letter-spacing").evaluate(a,{},o),M=function(t){for(var e=0,r=t;e=8192||f.y<0||f.y>=8192||function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g,m,v,y,x,b,w,T,k,M){var A,S,E,C,L,I=t.addToLineVertexArray(e,r),P=0,z=0,O=0,D=0,R=-1,F=-1,B={},N=ca(""),j=0,U=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(j=(A=s.layout.get("text-offset").evaluate(b,{},k).map((function(t){return 24*t})))[0],U=A[1]):(j=24*s.layout.get("text-radial-offset").evaluate(b,{},k),U=Ql),t.allowVerticalPlacement&&n.vertical){var V=s.layout.get("text-rotate").evaluate(b,{},k)+90;C=new Yl(l,e,c,u,f,n.vertical,h,p,d,V),o&&(L=new Yl(l,e,c,u,f,o,m,v,d,V))}if(i){var q=s.layout.get("icon-rotate").evaluate(b,{}),H="none"!==s.layout.get("icon-text-fit"),G=Ul(i,q,T,H),Y=o?Ul(o,q,T,H):void 0;E=new Yl(l,e,c,u,f,i,m,v,!1,q),P=4*G.length;var W=t.iconSizeData,X=null;"source"===W.kind?(X=[128*s.layout.get("icon-size").evaluate(b,{})])[0]>32640&&_(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===W.kind&&((X=[128*w.compositeIconSizes[0].evaluate(b,{},k),128*w.compositeIconSizes[1].evaluate(b,{},k)])[0]>32640||X[1]>32640)&&_(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,G,X,x,y,b,!1,e,I.lineStartIndex,I.lineLength,-1,k),R=t.icon.placedSymbolArray.length-1,Y&&(z=4*Y.length,t.addSymbols(t.icon,Y,X,x,y,b,gl.vertical,e,I.lineStartIndex,I.lineLength,-1,k),F=t.icon.placedSymbolArray.length-1)}for(var Z in n.horizontal){var J=n.horizontal[Z];if(!S){N=ca(J.text);var K=s.layout.get("text-rotate").evaluate(b,{},k);S=new Yl(l,e,c,u,f,J,h,p,d,K)}var Q=1===J.positionedLines.length;if(O+=ec(t,e,J,a,s,d,b,g,I,n.vertical?gl.horizontal:gl.horizontalOnly,Q?Object.keys(n.horizontal):[Z],B,R,w,k),Q)break}n.vertical&&(D+=ec(t,e,n.vertical,a,s,d,b,g,I,gl.vertical,["vertical"],B,F,w,k));var $=S?S.boxStartIndex:t.collisionBoxArray.length,tt=S?S.boxEndIndex:t.collisionBoxArray.length,et=C?C.boxStartIndex:t.collisionBoxArray.length,rt=C?C.boxEndIndex:t.collisionBoxArray.length,nt=E?E.boxStartIndex:t.collisionBoxArray.length,it=E?E.boxEndIndex:t.collisionBoxArray.length,at=L?L.boxStartIndex:t.collisionBoxArray.length,ot=L?L.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};st=lt(S,st),st=lt(C,st),st=lt(E,st);var ct=(st=lt(L,st))>-1?1:0;ct&&(st*=M/24),t.glyphOffsetArray.length>=fc.MAX_GLYPHS&&_("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==b.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,b.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,B.right>=0?B.right:-1,B.center>=0?B.center:-1,B.left>=0?B.left:-1,B.vertical||-1,R,F,N,$,tt,et,rt,nt,it,at,ot,c,O,D,P,z,ct,0,h,j,U,st)}(t,f,s,r,n,i,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,v,w,M,l,x,T,A,d,e,a,c,u,o)};if("line"===S)for(var I=0,P=jl(e.geometry,0,0,8192,8192);I1){var j=Bl(N,k,r.vertical||g,n,24,y);j&&L(N,j)}}else if("Polygon"===e.type)for(var U=0,V=Qo(e.geometry,0);U=E.maxzoom||"none"!==E.visibility&&(o(S,this.zoom,n),(g[E.id]=E.createBucket({index:u.bucketLayerIDs.length,layers:S,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:b,sourceID:this.source})).populate(_,m,this.tileID.canonical),u.bucketLayerIDs.push(S.map((function(t){return t.id}))))}}}var C=t.mapObject(m.glyphDependencies,(function(t){return Object.keys(t).map(Number)}));Object.keys(C).length?a.send("getGlyphs",{uid:this.uid,stacks:C},(function(t,e){f||(f=t,h=e,P.call(l))})):h={};var L=Object.keys(m.iconDependencies);L.length?a.send("getImages",{icons:L,source:this.source,tileID:this.tileID,type:"icons"},(function(t,e){f||(f=t,p=e,P.call(l))})):p={};var I=Object.keys(m.patternDependencies);function P(){if(f)return s(f);if(h&&p&&d){var e=new i(h),r=new t.ImageAtlas(p,d);for(var a in g){var l=g[a];l instanceof t.SymbolBucket?(o(l.layers,this.zoom,n),t.performSymbolLayout(l,h,e.positions,p,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(o(l.layers,this.zoom,n),l.addFeatures(m,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:t.values(g).filter((function(t){return!t.isEmpty()})),featureIndex:u,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?p:null,glyphPositions:this.returnDependencies?e.positions:null})}}I.length?a.send("getImages",{icons:I,source:this.source,tileID:this.tileID,type:"patterns"},(function(t,e){f||(f=t,d=e,P.call(l))})):d={},P.call(this)};var l=function(t,e,r,n){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=n||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var n=this,i=e.uid;this.loading||(this.loading={});var o=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[i]=new a(e);s.abort=this.loadVectorData(e,(function(e,a){if(delete n.loading[i],e||!a)return s.status="done",n.loaded[i]=s,r(e);var l=a.rawData,c={};a.expires&&(c.expires=a.expires),a.cacheControl&&(c.cacheControl=a.cacheControl);var u={};if(o){var f=o.finish();f&&(u.resourceTiming=JSON.parse(JSON.stringify(f)))}s.vectorTile=a.vectorTile,s.parse(a.vectorTile,n.layerIndex,n.availableImages,n.actor,(function(e,n){if(e||!n)return r(e);r(null,t.extend({rawTileData:l.slice(0)},n,c,u))})),n.loaded=n.loaded||{},n.loaded[i]=s}))},l.prototype.reloadTile=function(t,e){var r=this,n=this.loaded,i=t.uid,a=this;if(n&&n[i]){var o=n[i];o.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,n){var i=o.reloadCallback;i&&(delete o.reloadCallback,o.parse(o.vectorTile,a.layerIndex,r.availableImages,a.actor,i)),e(t,n)};"parsing"===o.status?o.reloadCallback=s:"done"===o.status&&(o.vectorTile?o.parse(o.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,n=t.uid;r&&r[n]&&r[n].abort&&(r[n].abort(),delete r[n]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,n=t.uid;r&&r[n]&&delete r[n],e()};var c=t.window.ImageBitmap,u=function(){this.loaded={}};function f(t,e){if(0!==t.length){h(t[0],e);for(var r=1;r=0!=!!e&&t.reverse()}u.prototype.loadTile=function(e,r){var n=e.uid,i=e.encoding,a=e.rawImageData,o=c&&a instanceof c?this.getImageData(a):a,s=new t.DEMData(n,o,i);this.loaded=this.loaded||{},this.loaded[n]=s,r(null,s)},u.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},u.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var p=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,n=this._feature.geometry;r>31}function E(t,e){for(var r=t.loadGeometry(),n=t.type,i=0,a=0,o=r.length,s=0;s>1;!function t(e,r,n,i,a,o){for(;a>i;){if(a-i>600){var s=a-i+1,l=n-i+1,c=Math.log(s),u=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*u*(s-u)/s)*(l-s/2<0?-1:1);t(e,r,n,Math.max(i,Math.floor(n-l*u/s+f)),Math.min(a,Math.floor(n+(s-l)*u/s+f)),o)}var h=r[2*n+o],p=i,d=a;for(L(e,r,i,n),r[2*a+o]>h&&L(e,r,i,a);ph;)d--}r[2*i+o]===h?L(e,r,i,d):L(e,r,++d,a),d<=n&&(i=d+1),n<=d&&(a=d-1)}}(e,r,s,i,a,o%2),t(e,r,n,i,s-1,o+1),t(e,r,n,s+1,a,o+1)}}(o,s,n,0,o.length-1,0)};D.prototype.range=function(t,e,r,n){return function(t,e,r,n,i,a,o){for(var s,l,c=[0,t.length-1,0],u=[];c.length;){var f=c.pop(),h=c.pop(),p=c.pop();if(h-p<=o)for(var d=p;d<=h;d++)l=e[2*d+1],(s=e[2*d])>=r&&s<=i&&l>=n&&l<=a&&u.push(t[d]);else{var g=Math.floor((p+h)/2);l=e[2*g+1],(s=e[2*g])>=r&&s<=i&&l>=n&&l<=a&&u.push(t[g]);var m=(f+1)%2;(0===f?r<=s:n<=l)&&(c.push(p),c.push(g-1),c.push(m)),(0===f?i>=s:a>=l)&&(c.push(g+1),c.push(h),c.push(m))}}return u}(this.ids,this.coords,t,e,r,n,this.nodeSize)},D.prototype.within=function(t,e,r){return function(t,e,r,n,i,a){for(var o=[0,t.length-1,0],s=[],l=i*i;o.length;){var c=o.pop(),u=o.pop(),f=o.pop();if(u-f<=a)for(var h=f;h<=u;h++)P(e[2*h],e[2*h+1],r,n)<=l&&s.push(t[h]);else{var p=Math.floor((f+u)/2),d=e[2*p],g=e[2*p+1];P(d,g,r,n)<=l&&s.push(t[p]);var m=(c+1)%2;(0===c?r-i<=d:n-i<=g)&&(o.push(f),o.push(p-1),o.push(m)),(0===c?r+i>=d:n+i>=g)&&(o.push(p+1),o.push(u),o.push(m))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var R={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},F=function(t){this.options=H(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1)};function B(t,e,r,n,i){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:n,properties:i}}function N(t,e){var r=t.geometry.coordinates,n=r[1];return{x:V(r[0]),y:q(n),zoom:1/0,index:e,parentId:-1}}function j(t){return{type:"Feature",id:t.id,properties:U(t),geometry:{type:"Point",coordinates:[(n=t.x,360*(n-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,n}function U(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return H(H({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function V(t){return t/360+.5}function q(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function H(t,e){for(var r in e)t[r]=e[r];return t}function G(t){return t.x}function Y(t){return t.y}function W(t,e,r,n,i,a){var o=i-r,s=a-n;if(0!==o||0!==s){var l=((t-r)*o+(e-n)*s)/(o*o+s*s);l>1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=t-r)*o+(s=e-n)*s}function X(t,e,r,n){var i={id:void 0===t?null:t,type:e,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)Z(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var n=0;n0&&(o+=n?(i*c-l*a)/2:Math.sqrt(Math.pow(l-i,2)+Math.pow(c-a,2))),i=l,a=c}var u=e.length-3;e[2]=1,function t(e,r,n,i){for(var a,o=i,s=n-r>>1,l=n-r,c=e[r],u=e[r+1],f=e[n],h=e[n+1],p=r+3;po)a=p,o=d;else if(d===o){var g=Math.abs(p-s);gi&&(a-r>3&&t(e,r,a,i),e[a+2]=o,n-a>3&&t(e,a,n,i))}(e,0,u,r),e[u+2]=1,e.size=Math.abs(o),e.start=0,e.end=e.size}function $(t,e,r,n){for(var i=0;i1?1:r}function rt(t,e,r,n,i,a,o,s){if(n/=e,a>=(r/=e)&&o=n)return null;for(var l=[],c=0;c=r&&d=n)){var g=[];if("Point"===h||"MultiPoint"===h)nt(f,g,r,n,i);else if("LineString"===h)it(f,g,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===h)ot(f,g,r,n,i,!1);else if("Polygon"===h)ot(f,g,r,n,i,!0);else if("MultiPolygon"===h)for(var m=0;m=r&&o<=n&&(e.push(t[a]),e.push(t[a+1]),e.push(t[a+2]))}}function it(t,e,r,n,i,a,o){for(var s,l,c=at(t),u=0===i?lt:ct,f=t.start,h=0;hr&&(l=u(c,p,d,m,v,r),o&&(c.start=f+s*l)):y>n?x=r&&(l=u(c,p,d,m,v,r),b=!0),x>n&&y<=n&&(l=u(c,p,d,m,v,n),b=!0),!a&&b&&(o&&(c.end=f+s*l),e.push(c),c=at(t)),o&&(f+=s)}var _=t.length-3;p=t[_],d=t[_+1],g=t[_+2],(y=0===i?p:d)>=r&&y<=n&&st(c,p,d,g),_=c.length-3,a&&_>=3&&(c[_]!==c[0]||c[_+1]!==c[1])&&st(c,c[0],c[1],c[2]),c.length&&e.push(c)}function at(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function ot(t,e,r,n,i,a){for(var o=0;oo.maxX&&(o.maxX=u),f>o.maxY&&(o.maxY=f)}return o}function gt(t,e,r,n){var i=e.geometry,a=e.type,o=[];if("Point"===a||"MultiPoint"===a)for(var s=0;s0&&e.size<(i?o:n))r.numPoints+=e.length/3;else{for(var s=[],l=0;lo)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;i&&function(t,e){for(var r=0,n=0,i=t.length,a=i-2;n0===e)for(n=0,i=t.length;n24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var n=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var n=0;n=n;c--){var u=+Date.now();s=this._cluster(s,c),this.trees[c]=new D(s,G,Y,a,Float32Array),r&&console.log("z%d: %d clusters in %dms",c,s.length,+Date.now()-u)}return r&&console.timeEnd("total time"),this},F.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,i=180;else if(r>i){var o=this.getClusters([r,n,180,a],e),s=this.getClusters([-180,n,i,a],e);return o.concat(s)}for(var l=this.trees[this._limitZoom(e)],c=[],u=0,f=l.range(V(r),q(a),V(i),q(n));u1?this._map(s,!0):null,d=(o<<5)+(e+1)+this.points.length,g=0,m=c;g>5},F.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},F.prototype._map=function(t,e){if(t.numPoints)return e?H({},t.properties):t.properties;var r=this.points[t.index].properties,n=this.options.map(r);return e&&n===r?H({},n):n},vt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},vt.prototype.splitTile=function(t,e,r,n,i,a,o){for(var s=[t,e,r,n],l=this.options,c=l.debug;s.length;){n=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var u=1<1&&console.time("creation"),h=this.tiles[f]=dt(t,e,r,n,l),this.tileCoords.push({z:e,x:r,y:n}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,n,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var p="z"+e;this.stats[p]=(this.stats[p]||0)+1,this.total++}if(h.source=t,i){if(e===l.maxZoom||e===i)continue;var d=1<1&&console.time("clipping");var g,m,v,y,x,b,_=.5*l.buffer/l.extent,w=.5-_,T=.5+_,k=1+_;g=m=v=y=null,x=rt(t,u,r-_,r+T,0,h.minX,h.maxX,l),b=rt(t,u,r+w,r+k,0,h.minX,h.maxX,l),t=null,x&&(g=rt(x,u,n-_,n+T,1,h.minY,h.maxY,l),m=rt(x,u,n+w,n+k,1,h.minY,h.maxY,l),x=null),b&&(v=rt(b,u,n-_,n+T,1,h.minY,h.maxY,l),y=rt(b,u,n+w,n+k,1,h.minY,h.maxY,l),b=null),c>1&&console.timeEnd("clipping"),s.push(g||[],e+1,2*r,2*n),s.push(m||[],e+1,2*r,2*n+1),s.push(v||[],e+1,2*r+1,2*n),s.push(y||[],e+1,2*r+1,2*n+1)}}},vt.prototype.getTile=function(t,e,r){var n=this.options,i=n.extent,a=n.debug;if(t<0||t>24)return null;var o=1<1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,c=t,u=e,f=r;!l&&c>0;)c--,u=Math.floor(u/2),f=Math.floor(f/2),l=this.tiles[yt(c,u,f)];return l&&l.source?(a>1&&console.log("found parent tile z%d-%d-%d",c,u,f),a>1&&console.time("drilling down"),this.splitTile(l.source,c,u,f,t,e,r),a>1&&console.timeEnd("drilling down"),this.tiles[s]?ht(this.tiles[s],i):null):null};var bt=function(e){function r(t,r,n,i){e.call(this,t,r,n,xt),i&&(this.loadGeoJSON=i)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,n=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var i=!!(n&&n.request&&n.request.collectResourceTiming)&&new t.RequestPerformance(n.request);this.loadGeoJSON(n,(function(a,o){if(a||!o)return r(a);if("object"!=typeof o)return r(new Error("Input data given to '"+n.source+"' is not a valid GeoJSON object."));!function t(e,r){var n,i=e&&e.type;if("FeatureCollection"===i)for(n=0;n=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e=0?1.2:1))}function v(t,e,r,n,i,a,o){for(var s=0;s65535)e(new Error("glyphs > 65535 not supported"));else if(a.ranges[s])e(null,{stack:r,id:i,glyph:o});else{var l=a.requests[s];l||(l=a.requests[s]=[],x.loadGlyphRange(r,s,n.url,n.requestManager,(function(t,e){if(e){for(var r in e)n._doesCharSupportLocalGlyph(+r)||(a.glyphs[+r]=e[+r]);a.ranges[s]=!0}for(var i=0,o=l;i1&&(s=t[++o]);var c=Math.abs(l-s.left),u=Math.abs(l-s.right),f=Math.min(c,u),h=void 0,p=i/r*(n+1);if(s.isDash){var d=n-Math.abs(p);h=Math.sqrt(f*f+d*d)}else h=n-Math.sqrt(f*f+p*p);this.data[a+l]=Math.max(0,Math.min(255,h+128))}},T.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],n=t[e+1];r.zeroLength?t.splice(e,1):n&&n.isDash===r.isDash&&(n.left=r.left,t.splice(e,1))}var i=t[0],a=t[t.length-1];i.isDash===a.isDash&&(i.left=a.left-this.width,a.right=i.right+this.width);for(var o=this.width*this.nextRow,s=0,l=t[s],c=0;c1&&(l=t[++s]);var u=Math.abs(c-l.left),f=Math.abs(c-l.right),h=Math.min(u,f);this.data[o+c]=Math.max(0,Math.min(255,(l.isDash?h:-h)+128))}},T.prototype.addDash=function(e,r){var n=r?7:0,i=2*n+1;if(this.nextRow+i>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var a=0,o=0;o=n&&e.x=i&&e.y0&&(l[new t.OverscaledTileID(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&(n.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",n))}}))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData((function(e){if(e)r.fire(new t.ErrorEvent(e));else{var n={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(n.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",n))}})),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,n){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},n),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var n=t.extend({},this.workerOptions),i=this._data;"string"==typeof i?(n.request=this.map._requestManager.transformRequest(t.browser.resolveURL(i),t.ResourceType.Source),n.request.collectResourceTiming=this._collectResourceTiming):n.data=JSON.stringify(i),this.actor.send(this.type+".loadData",n,(function(t,i){r._removed||i&&i.abandoned||(r._loaded=!0,i&&i.resourceTiming&&i.resourceTiming[r.id]&&(r._resourceTiming=i.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:n.source},null),e(t))}))},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var n=this,i=e.actor?"reloadTile":"loadTile";e.actor=this.actor,e.request=this.actor.send(i,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},(function(t,a){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(a,n.map.painter,"reloadTile"===i),r(null))}))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),I=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),P=function(e){function r(t,r,n,i){e.call(this),this.id=t,this.dispatcher=n,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=r}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(e,r){var n=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),(function(i,a){n._loaded=!0,i?n.fire(new t.ErrorEvent(i)):a&&(n.image=a,e&&(n.coordinates=e),r&&r(),n._finishLoading())}))},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,(function(){e.texture=null})),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var n=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,n=1/0,i=-1/0,a=-1/0,o=0,s=e;or.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,I.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var i=this.tiles[n];"loaded"!==i.state&&(i.state="loaded",i.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(P),O=function(e){function r(r,n,i,a){e.call(this,r,n,i,a),n.coordinates?Array.isArray(n.coordinates)&&4===n.coordinates.length&&!n.coordinates.some((function(t){return!Array.isArray(t)||2!==t.length||t.some((function(t){return"number"!=typeof t}))}))||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),n.animate&&"boolean"!=typeof n.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),n.canvas?"string"==typeof n.canvas||n.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=n,this.animate=void 0===n.animate||n.animate}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,n=r.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,I.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,n.RGBA,{premultiply:!0}),this.tiles){var a=this.tiles[i];"loaded"!==a.state&&(a.state="loaded",a.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];tthis.max){var o=this._getAndRemoveByKey(this.order[0]);o&&this.onRemove(o)}return this},N.prototype.has=function(t){return t.wrapped().key in this.data},N.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},N.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},N.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},N.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},N.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,n=void 0===e?0:this.data[r].indexOf(e),i=this.data[r][n];return this.data[r].splice(n,1),i.timeout&&clearTimeout(i.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(i.value),this.order.splice(this.order.indexOf(r),1),this},N.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},N.prototype.filter=function(t){var e=[];for(var r in this.data)for(var n=0,i=this.data[r];n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,n),t.neighboringTiles&&t.neighboringTiles[a]&&(t.neighboringTiles[a].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,n){for(var i in this._tiles){var a=this._tiles[i];if(!(n[i]||!a.hasData()||a.tileID.overscaledZ<=e||a.tileID.overscaledZ>r)){for(var o=a.tileID;a&&a.tileID.overscaledZ>e+1;){var s=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[s.key])&&a.hasData()&&(o=s)}for(var l=o;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){n[o.key]=o;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var n=t.overscaledZ-1;n>=e;n--){var i=t.scaledTo(n),a=this._getLoadedTile(i);if(a)return a}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,r=Math.ceil(t.height/this._source.tileSize)+1,n=Math.floor(e*r*5),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,n):n;this._cache.setMaxSize(i)},r.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var r={};for(var n in this._tiles){var i=this._tiles[n];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),r[i.tileID.key]=i}for(var a in this._tiles=r,this._timers)clearTimeout(this._timers[a]),delete this._timers[a];for(var o in this._tiles)this._setTileReloadTimer(o,this._tiles[o])}},r.prototype.update=function(e){var n=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var i;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map((function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)})):(i=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(i=i.filter((function(t){return n._source.hasTile(t)})))):i=[];var a=e.coveringZoomLevel(this._source),o=Math.max(a-r.maxOverzooming,this._source.minzoom),s=Math.max(a+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(i,a);if(Pt(this._source.type)){for(var c={},u={},f=0,h=Object.keys(l);fthis._source.maxzoom){var m=d.children(this._source.maxzoom)[0],v=this.getTile(m);if(v&&v.hasData()){n[m.key]=m;continue}}else{var y=d.children(this._source.maxzoom);if(n[y[0].key]&&n[y[1].key]&&n[y[2].key]&&n[y[3].key])continue}for(var x=g.wasRequested(),b=d.overscaledZ-1;b>=a;--b){var _=d.scaledTo(b);if(i[_.key])break;if(i[_.key]=!0,!(g=this.getTile(_))&&x&&(g=this._addTile(_)),g&&(n[_.key]=_,x=g.wasRequested(),g.hasData()))break}}}return n},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,n=this._tiles[t].tileID;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}e.push(n.key);var i=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(i))break;n=i}for(var a=0,o=e;a0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,n){var i=this,a=[],o=this.transform;if(!o)return a;for(var s=n?o.getCameraQueryGeometry(e):e,l=e.map((function(t){return o.pointCoordinate(t)})),c=s.map((function(t){return o.pointCoordinate(t)})),u=this.getIds(),f=1/0,h=1/0,p=-1/0,d=-1/0,g=0,m=c;g=0&&v[1].y+m>=0){var y=l.map((function(t){return s.getTilePoint(t)})),x=c.map((function(t){return s.getTilePoint(t)}));a.push({tile:n,tileID:s,queryGeometry:y,cameraQueryGeometry:x,scale:g})}}},x=0;x=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){this._state.updateState(t=t||"_geojsonTileLayer",e,r)},r.prototype.removeFeatureState=function(t,e,r){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,r)},r.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},r.prototype.setDependencies=function(t,e,r){var n=this._tiles[t];n&&n.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,"reloading");this._cache.filter((function(r){return!r.hasDependency(t,e)}))},r}(t.Evented);function It(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),n=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||n-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function Pt(t){return"raster"===t||"image"===t||"video"===t}function zt(){return new t.window.Worker(Yi.workerUrl)}Lt.maxOverzooming=10,Lt.maxUnderzooming=3;var Ot="mapboxgl_preloaded_worker_pool",Dt=function(){this.active={}};Dt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))};var Jt=function(t,e,r){var n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var a=0;a=-e[0]&&r<=e[0]&&n>=-e[1]&&n<=e[1]}function re(e,r,n,i,a,o,s,l){var c=i?e.textSizeData:e.iconSizeData,u=t.evaluateSizeForZoom(c,n.transform.zoom),f=[256/n.width*2+1,256/n.height*2+1],h=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var p=e.lineVertexArray,d=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,g=n.transform.width/n.transform.height,m=!1,v=0;vMath.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.WritingMode.vertical?r.yn.x)?{needsFlipping:!0}:null}function ae(e,r,n,i,a,o,s,l,c,u,f,h,p,d){var g,m=r/24,v=e.lineOffsetX*m,y=e.lineOffsetY*m;if(e.numGlyphs>1){var x=e.glyphStartIndex+e.numGlyphs,b=e.lineStartIndex,_=e.lineStartIndex+e.lineLength,w=ne(m,l,v,y,n,f,h,e,c,o,p);if(!w)return{notEnoughRoom:!0};var T=$t(w.first.point,s).point,k=$t(w.last.point,s).point;if(i&&!n){var M=ie(e.writingMode,T,k,d);if(M)return M}g=[w.first];for(var A=e.glyphStartIndex+1;A0?L.point:oe(h,C,S,1,a),P=ie(e.writingMode,S,I,d);if(P)return P}var z=se(m*l.getoffsetX(e.glyphStartIndex),v,y,n,f,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,c,o,p);if(!z)return{notEnoughRoom:!0};g=[z]}for(var O=0,D=g;O0?1:-1,g=0;i&&(d*=-1,g=Math.PI),d<0&&(g+=Math.PI);for(var m=d>0?l+s:l+s+1,v=a,y=a,x=0,b=0,_=Math.abs(p),w=[];x+b<=_;){if((m+=d)=c)return null;if(y=v,w.push(v),void 0===(v=h[m])){var T=new t.Point(u.getx(m),u.gety(m)),k=$t(T,f);if(k.signedDistanceFromCamera>0)v=h[m]=k.point;else{var M=m-d;v=oe(0===x?o:new t.Point(u.getx(M),u.gety(M)),T,y,_-x+1,f)}}x+=b,b=y.dist(v)}var A=(_-x)/b,S=v.sub(y),E=S.mult(A)._add(y);E._add(S._unit()._perp()._mult(n*d));var C=g+Math.atan2(v.y-y.y,v.x-y.x);return w.push(E),{point:E,angle:C,path:w}}Jt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Jt.prototype.insert=function(t,e,r,n,i){this._forEachCell(e,r,n,i,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(n),this.bboxes.push(i)},Jt.prototype.insertCircle=function(t,e,r,n){this._forEachCell(e-n,r-n,e+n,r+n,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(n)},Jt.prototype._insertBoxCell=function(t,e,r,n,i,a){this.boxCells[i].push(a)},Jt.prototype._insertCircleCell=function(t,e,r,n,i,a){this.circleCells[i].push(a)},Jt.prototype._query=function(t,e,r,n,i,a){if(r<0||t>this.width||n<0||e>this.height)return!i&&[];var o=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=n){if(i)return!0;for(var s=0;s0:o},Jt.prototype._queryCircle=function(t,e,r,n,i){var a=t-r,o=t+r,s=e-r,l=e+r;if(o<0||a>this.width||l<0||s>this.height)return!n&&[];var c=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,c,{hitTest:n,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}},i),n?c.length>0:c},Jt.prototype.query=function(t,e,r,n,i){return this._query(t,e,r,n,!1,i)},Jt.prototype.hitTest=function(t,e,r,n,i){return this._query(t,e,r,n,!0,i)},Jt.prototype.hitTestCircle=function(t,e,r,n){return this._queryCircle(t,e,r,!0,n)},Jt.prototype._queryCell=function(t,e,r,n,i,a,o,s){var l=o.seenUids,c=this.boxCells[i];if(null!==c)for(var u=this.bboxes,f=0,h=c;f=u[d+0]&&n>=u[d+1]&&(!s||s(this.boxKeys[p]))){if(o.hitTest)return a.push(!0),!0;a.push({key:this.boxKeys[p],x1:u[d],y1:u[d+1],x2:u[d+2],y2:u[d+3]})}}}var g=this.circleCells[i];if(null!==g)for(var m=this.circles,v=0,y=g;vo*o+s*s},Jt.prototype._circleAndRectCollide=function(t,e,r,n,i,a,o){var s=(a-n)/2,l=Math.abs(t-(n+s));if(l>s+r)return!1;var c=(o-i)/2,u=Math.abs(e-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;var f=l-s,h=u-c;return f*f+h*h<=r*r};var le=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ce(t,e){for(var r=0;r=1;I--)L.push(E.path[I]);for(var P=1;P0){for(var R=L[0].clone(),F=L[0].clone(),B=1;B=M.x&&F.x<=A.x&&R.y>=M.y&&F.y<=A.y?[L]:F.xA.x||F.yA.y?[]:t.clipLine([L],M.x,M.y,A.x,A.y)}for(var N=0,j=D;N=this.screenRightBoundary||n<100||e>this.screenBottomBoundary},fe.prototype.isInsideGrid=function(t,e,r,n){return r>=0&&t=0&&e0?(this.prevPlacement&&this.prevPlacement.variableOffsets[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID]&&this.prevPlacement.placements[f.crossTileID].text&&(g=this.prevPlacement.variableOffsets[f.crossTileID].anchor),this.variableOffsets[f.crossTileID]={textOffset:m,width:r,height:n,anchor:t,textBoxScale:i,prevAnchor:g},this.markUsedJustification(h,t,f,p),h.allowVerticalPlacement&&(this.markUsedOrientation(h,p,f),this.placedOrientations[f.crossTileID]=p),{shift:v,placedGlyphBoxes:y}):void 0},_e.prototype.placeLayerBucketPart=function(e,r,n){var i=this,a=e.parameters,o=a.bucket,s=a.layout,l=a.posMatrix,c=a.textLabelPlaneMatrix,u=a.labelToScreenMatrix,f=a.textPixelRatio,h=a.holdingForFade,p=a.collisionBoxArray,d=a.partiallyEvaluatedTextSize,g=a.collisionGroup,m=s.get("text-optional"),v=s.get("icon-optional"),y=s.get("text-allow-overlap"),x=s.get("icon-allow-overlap"),b="map"===s.get("text-rotation-alignment"),_="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),T="viewport-y"===s.get("symbol-z-order"),k=y&&(x||!o.hasIconData()||v),M=x&&(y||!o.hasTextData()||m);!o.collisionArrays&&p&&o.deserializeCollisionBoxes(p);var A=function(e,a){if(!r[e.crossTileID])if(h)i.placements[e.crossTileID]=new ge(!1,!1,!1);else{var p,T=!1,A=!1,S=!0,E=null,C={box:null,offscreen:null},L={box:null,offscreen:null},I=null,P=null,z=0,O=0,D=0;a.textFeatureIndex?z=a.textFeatureIndex:e.useRuntimeCollisionCircles&&(z=e.featureIndex),a.verticalTextFeatureIndex&&(O=a.verticalTextFeatureIndex);var R=a.textBox;if(R){var F=function(r){var n=t.WritingMode.horizontal;if(o.allowVerticalPlacement&&!r&&i.prevPlacement){var a=i.prevPlacement.placedOrientations[e.crossTileID];a&&(i.placedOrientations[e.crossTileID]=a,i.markUsedOrientation(o,n=a,e))}return n},B=function(r,n){if(o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&a.verticalTextBox)for(var i=0,s=o.writingModes;i0&&(N=N.filter((function(t){return t!==j.anchor}))).unshift(j.anchor)}var U=function(t,r,n){for(var a=t.x2-t.x1,s=t.y2-t.y1,c=e.textBoxScale,u=w&&!x?r:null,h={box:[],offscreen:!1},p=y?2*N.length:N.length,d=0;d=N.length,e,o,n,u);if(m&&(h=m.placedGlyphBoxes)&&h.box&&h.box.length){T=!0,E=m.shift;break}}return h};B((function(){return U(R,a.iconBox,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&!(C&&C.box&&C.box.length)&&e.numVerticalGlyphVertices>0&&r?U(r,a.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}})),C&&(T=C.box,S=C.offscreen);var V=F(C&&C.box);if(!T&&i.prevPlacement){var q=i.prevPlacement.variableOffsets[e.crossTileID];q&&(i.variableOffsets[e.crossTileID]=q,i.markUsedJustification(o,q.anchor,e,V))}}else{var H=function(t,r){var n=i.collisionIndex.placeCollisionBox(t,y,f,l,g.predicate);return n&&n.box&&n.box.length&&(i.markUsedOrientation(o,r,e),i.placedOrientations[e.crossTileID]=r),n};B((function(){return H(R,t.WritingMode.horizontal)}),(function(){var r=a.verticalTextBox;return o.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?H(r,t.WritingMode.vertical):{box:null,offscreen:null}})),F(C&&C.box&&C.box.length)}}if(T=(p=C)&&p.box&&p.box.length>0,S=p&&p.offscreen,e.useRuntimeCollisionCircles){var G=o.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),Y=t.evaluateSizeForFeature(o.textSizeData,d,G),W=s.get("text-padding");I=i.collisionIndex.placeCollisionCircles(y,G,o.lineVertexArray,o.glyphOffsetArray,Y,l,c,u,n,_,g.predicate,e.collisionCircleDiameter,W),T=y||I.circles.length>0&&!I.collisionDetected,S=S&&I.offscreen}if(a.iconFeatureIndex&&(D=a.iconFeatureIndex),a.iconBox){var X=function(t){var e=w&&E?be(t,E.x,E.y,b,_,i.transform.angle):t;return i.collisionIndex.placeCollisionBox(e,x,f,l,g.predicate)};A=L&&L.box&&L.box.length&&a.verticalIconBox?(P=X(a.verticalIconBox)).box.length>0:(P=X(a.iconBox)).box.length>0,S=S&&P.offscreen}var Z=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,J=v||0===e.numIconVertices;if(Z||J?J?Z||(A=A&&T):T=A&&T:A=T=A&&T,T&&p&&p.box&&i.collisionIndex.insertCollisionBox(p.box,s.get("text-ignore-placement"),o.bucketInstanceId,L&&L.box&&O?O:z,g.ID),A&&P&&i.collisionIndex.insertCollisionBox(P.box,s.get("icon-ignore-placement"),o.bucketInstanceId,D,g.ID),I&&(T&&i.collisionIndex.insertCollisionCircles(I.circles,s.get("text-ignore-placement"),o.bucketInstanceId,z,g.ID),n)){var K=o.bucketInstanceId,Q=i.collisionCircleArrays[K];void 0===Q&&(Q=i.collisionCircleArrays[K]=new me);for(var $=0;$=0;--E){var C=S[E];A(o.symbolInstances.get(C),o.collisionArrays[C])}else for(var L=e.symbolInstanceStart;L=0&&(e.text.placedSymbolArray.get(l).crossTileID=a>=0&&l!==a?0:n.crossTileID)}},_e.prototype.markUsedOrientation=function(e,r,n){for(var i=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,a=r===t.WritingMode.vertical?r:0,o=0,s=[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex];o0,y=i.placedOrientations[a.crossTileID],x=y===t.WritingMode.vertical,b=y===t.WritingMode.horizontal||y===t.WritingMode.horizontalOnly;if(s>0||l>0){var _=Le(m.text);d(e.text,s,x?Ie:_),d(e.text,l,b?Ie:_);var w=m.text.isHidden();[a.rightJustifiedTextSymbolIndex,a.centerJustifiedTextSymbolIndex,a.leftJustifiedTextSymbolIndex].forEach((function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=w||x?1:0)})),a.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(a.verticalPlacedTextSymbolIndex).hidden=w||b?1:0);var T=i.variableOffsets[a.crossTileID];T&&i.markUsedJustification(e,T.anchor,a,y);var k=i.placedOrientations[a.crossTileID];k&&(i.markUsedJustification(e,"left",a,k),i.markUsedOrientation(e,k,a))}if(v){var M=Le(m.icon),A=!(h&&a.verticalPlacedIconSymbolIndex&&x);a.placedIconSymbolIndex>=0&&(d(e.icon,a.numIconVertices,A?M:Ie),e.icon.placedSymbolArray.get(a.placedIconSymbolIndex).hidden=m.icon.isHidden()),a.verticalPlacedIconSymbolIndex>=0&&(d(e.icon,a.numVerticalIconVertices,A?Ie:M),e.icon.placedSymbolArray.get(a.verticalPlacedIconSymbolIndex).hidden=m.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var S=e.collisionArrays[n];if(S){var E=new t.Point(0,0);if(S.textBox||S.verticalTextBox){var C=!0;if(c){var L=i.variableOffsets[g];L?(E=xe(L.anchor,L.width,L.height,L.textOffset,L.textBoxScale),u&&E._rotate(f?i.transform.angle:-i.transform.angle)):C=!1}S.textBox&&we(e.textCollisionBox.collisionVertexArray,m.text.placed,!C||x,E.x,E.y),S.verticalTextBox&&we(e.textCollisionBox.collisionVertexArray,m.text.placed,!C||b,E.x,E.y)}var I=Boolean(!b&&S.verticalIconBox);S.iconBox&&we(e.iconCollisionBox.collisionVertexArray,m.icon.placed,I,h?E.x:0,h?E.y:0),S.verticalIconBox&&we(e.iconCollisionBox.collisionVertexArray,m.icon.placed,!I,h?E.x:0,h?E.y:0)}}},m=0;mt},_e.prototype.setStale=function(){this.stale=!0};var Te=Math.pow(2,25),ke=Math.pow(2,24),Me=Math.pow(2,17),Ae=Math.pow(2,16),Se=Math.pow(2,9),Ee=Math.pow(2,8),Ce=Math.pow(2,1);function Le(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Te+e*ke+r*Me+e*Ae+r*Se+e*Ee+r*Ce+e}var Ie=0,Pe=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Pe.prototype.continuePlacement=function(t,e,r,n,i){for(var a=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Pe(s)),this._inProgressLayer.continuePlacement(n[s.source],this.placement,this._showCollisionBoxes,s,o))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},ze.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Oe=512/t.EXTENT/2,De=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var n=0;nt.overscaledZ)for(var s in o){var l=o[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,i)}else{var c=o[t.scaledTo(Number(a)).key];c&&c.findMatches(e.symbolInstances,t,i)}}for(var u=0;u1?"@2x":"",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),(function(t,e){l=null,o||(o=t,i=e,u())})),c=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),(function(t,e){c=null,o||(o=t,a=e,u())}));function u(){if(o)n(o);else if(i&&a){var e=t.browser.getImageData(a),r={};for(var s in i){var l=i[s],c=l.width,u=l.height,f=l.x,h=l.y,p=l.sdf,d=l.pixelRatio,g=l.stretchX,m=l.stretchY,v=l.content,y=new t.RGBAImage({width:c,height:u});t.RGBAImage.copy(e,y,{x:f,y:h},{x:0,y:0},{width:c,height:u}),r[s]={data:y,pixelRatio:d,sdf:p,stretchX:g,stretchY:m,content:v}}n(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),c&&(c.cancel(),c=null)}}}(e,this.map._requestManager,(function(e,n){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(n)for(var i in n)r.imageManager.addImage(i,n[i]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new t.Event("data",{dataType:"style"}))}))},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var n=e.sourceLayer;if(n){var i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+n+'" does not exist on source "'+i.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,n=t;r0)throw new Error("Unimplemented: "+i.map((function(t){return t.command})).join(", ")+".");return n.forEach((function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)})),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,n){var i=this;if(void 0===n&&(n={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,n))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var a=this.sourceCaches[e]=new Lt(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,(function(){return{isSourceLoaded:i.loaded(),source:a.serialize(),sourceId:e}})),a.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var n=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],n.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),n.setEventedParent(null),n.clearTiles(),n.onRemove&&n.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=e.id;if(this.getLayer(i))this.fire(new t.ErrorEvent(new Error('Layer with id "'+i+'" already exists on this map')));else{var a;if("custom"===e.type){if(Ne(this,t.validateCustomStyleLayer(e)))return;a=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(i,e.source),e=t.clone$1(e),e=t.extend(e,{source:i})),this._validate(t.validateStyle.layer,"layers."+i,e,{arrayIndex:-1},n))return;a=t.createStyleLayer(e),this._validateLayer(a),a.setEventedParent(this,{layer:{id:i}}),this._serializedLayers[a.id]=a.serialize()}var o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(o,0,i),this._layerOrderChanged=!0,this._layers[i]=a,this._removedLayers[i]&&a.source&&"custom"!==a.type){var s=this._removedLayers[i];delete this._removedLayers[i],s.type!==a.type?this._updatedSources[a.source]="clear":(this._updatedSources[a.source]="reload",this.sourceCaches[a.source].pause())}this._updateLayer(a),a.onAdd&&a.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var n=this._order.indexOf(e);this._order.splice(n,1);var i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,n){this._checkLoaded();var i=this.getLayer(e);i?i.minzoom===r&&i.maxzoom===n||(null!=r&&(i.minzoom=r),null!=n&&(i.maxzoom=n),this._updateLayer(i)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,n){void 0===n&&(n={}),this._checkLoaded();var i=this.getLayer(e);if(i){if(!t.deepEqual(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.validateStyle.filter,"layers."+i.id+".filter",r,null,n)||(i.filter=t.clone$1(r),this._updateLayer(i)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,n,i){void 0===i&&(i={}),this._checkLoaded();var a=this.getLayer(e);a?t.deepEqual(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0!==a){var o=a.getSource().type;"geojson"===o&&i?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var n=e.source,i=this.sourceCaches[n];if(void 0!==i){var a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):i.removeFeatureState(o,e.id,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+n+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i){if("vector"!==i.getSource().type||n)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,(function(t){return t.serialize()})),layers:this._serializeLayers(this._order)},(function(t){return void 0!==t}))},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},n={},i=[],a=this._order.length-1;a>=0;a--){var o=this._order[a];if(r(o)){n[o]=a;for(var s=0,l=t;s=0;p--){var d=this._order[p];if(r(d))for(var g=i.length-1;g>=0;g--){var m=i[g].feature;if(n[m.layer.id] 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),$e=vr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),tr=vr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),er=vr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),rr=vr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),nr=vr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),ir=vr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),ar=vr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),or=vr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),sr=vr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),lr=vr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),cr=vr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),ur=vr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),fr=vr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),hr=vr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),pr=vr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),dr=vr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),gr=vr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),mr=vr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function vr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n={};return{fragmentSource:t=t.replace(r,(function(t,e,r,i,a){return n[a]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nvarying "+r+" "+i+" "+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n"})),vertexSource:e=e.replace(r,(function(t,e,r,i,a){var o="float"===i?"vec2":"vec4",s=a.match(/color/)?"color":o;return n[a]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+r+" "+o+" a_"+a+";\nvarying "+r+" "+i+" "+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = a_"+a+";\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+a+"\nuniform lowp float u_"+a+"_t;\nattribute "+r+" "+o+" a_"+a+";\n#else\nuniform "+r+" "+i+" u_"+a+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = a_"+a+";\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+a+"\n "+r+" "+i+" "+a+" = unpack_mix_"+s+"(a_"+a+", u_"+a+"_t);\n#else\n "+r+" "+i+" "+a+" = u_"+a+";\n#endif\n"}))}}var yr=Object.freeze({__proto__:null,prelude:Ge,background:Ye,backgroundPattern:We,circle:Xe,clippingMask:Ze,heatmap:Je,heatmapTexture:Ke,collisionBox:Qe,collisionCircle:$e,debug:tr,fill:er,fillOutline:rr,fillOutlinePattern:nr,fillPattern:ir,fillExtrusion:ar,fillExtrusionPattern:or,hillshadePrepare:sr,hillshade:lr,line:cr,lineGradient:ur,linePattern:fr,lineSDF:hr,raster:pr,symbolIcon:dr,symbolSDF:gr,symbolTextAndIcon:mr}),xr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};xr.prototype.bind=function(t,e,r,n,i,a,o,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==n.length,c=0;!l&&c>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}br.prototype.draw=function(t,e,r,n,i,a,o,s,l,c,u,f,h,p,d,g){var m,v=t.gl;if(!this.failedToCreate){for(var y in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(n),t.setColorMode(i),t.setCullFace(a),this.fixedUniforms)this.fixedUniforms[y].set(o[y]);p&&p.setUniforms(t,this.binderUniforms,f,{zoom:h});for(var x=(m={},m[v.LINES]=2,m[v.TRIANGLES]=3,m[v.LINE_STRIP]=1,m)[e],b=0,_=u.get();b<_.length;b+=1){var w=_[b],T=w.vaos||(w.vaos={});(T[s]||(T[s]=new xr)).bind(t,this,l,p?p.getPaintVertexBuffers():[],c,w.vertexOffset,d,g),v.drawElements(e,w.primitiveLength*x,v.UNSIGNED_SHORT,w.primitiveOffset*x*2)}}};var wr=function(e,r,n,i){var a=r.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=t.create$1();"viewport"===a.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var c=a.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[c.r,c.g,c.b],u_vertical_gradient:+n,u_opacity:i}},Tr=function(e,r,n,i,a,o,s){return t.extend(wr(e,r,n,i),_r(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8})},kr=function(t){return{u_matrix:t}},Mr=function(e,r,n,i){return t.extend(kr(e),_r(n,r,i))},Ar=function(t,e){return{u_matrix:t,u_world:e}},Sr=function(e,r,n,i,a){return t.extend(Mr(e,r,n,i),{u_world:a})},Er=function(e,r,n,i){var a,o,s=e.transform;if("map"===i.paint.get("circle-pitch-alignment")){var l=he(n,1,s.zoom);a=!0,o=[l,l]}else a=!1,o=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,n,i.paint.get("circle-translate"),i.paint.get("circle-translate-anchor")),u_pitch_with_map:+a,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:o}},Cr=function(t,e,r){var n=he(r,1,e.zoom),i=Math.pow(2,e.zoom-r.tileID.overscaledZ),a=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:n,u_extrude_scale:[e.pixelsToGLUnits[0]/(n*i),e.pixelsToGLUnits[1]/(n*i)],u_overscale_factor:a}},Lr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},Ir=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Pr=function(t){return{u_matrix:t}},zr=function(t,e,r,n){return{u_matrix:t,u_extrude_scale:he(e,1,r),u_intensity:n}},Or=function(e,r,n){var i=e.transform;return{u_matrix:Nr(e,r,n),u_ratio:1/he(r,1,i.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},Dr=function(e,r,n){return t.extend(Or(e,r,n),{u_image:0})},Rr=function(e,r,n,i){var a=e.transform,o=Br(r,a);return{u_matrix:Nr(e,r,n),u_texsize:r.imageAtlasTexture.size,u_ratio:1/he(r,1,a.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[o,i.fromScale,i.toScale],u_fade:i.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},Fr=function(e,r,n,i,a){var o=e.lineAtlas,s=Br(r,e.transform),l="round"===n.layout.get("line-cap"),c=o.getDash(i.from,l),u=o.getDash(i.to,l),f=c.width*a.fromScale,h=u.width*a.toScale;return t.extend(Or(e,r,n),{u_patternscale_a:[s/f,-c.height/2],u_patternscale_b:[s/h,-u.height/2],u_sdfgamma:o.width/(256*Math.min(f,h)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:c.y,u_tex_y_b:u.y,u_mix:a.t})};function Br(t,e){return 1/he(t,1,e.tileZoom)}function Nr(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var jr=function(t,e,r,n,i){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:n.mix,u_opacity:n.opacity*i.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:i.paint.get("raster-brightness-min"),u_brightness_high:i.paint.get("raster-brightness-max"),u_saturation_factor:(o=i.paint.get("raster-saturation"),o>0?1-1/(1.001-o):-o),u_contrast_factor:(a=i.paint.get("raster-contrast"),a>0?1/(1-a):1+a),u_spin_weights:Ur(i.paint.get("raster-hue-rotate"))};var a,o};function Ur(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var Vr,qr=function(t,e,r,n,i,a,o,s,l,c){var u=i.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:u.cameraToCenterDistance,u_pitch:u.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:u.width/u.height,u_fade_change:i.options.fadeDuration?i.symbolFadeChange:1,u_matrix:a,u_label_plane_matrix:o,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+n,u_texsize:c,u_texture:0}},Hr=function(e,r,n,i,a,o,s,l,c,u,f){var h=a.transform;return t.extend(qr(e,r,n,i,a,o,s,l,c,u),{u_gamma_scale:i?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+f})},Gr=function(e,r,n,i,a,o,s,l,c,u){return t.extend(Hr(e,r,n,i,a,o,s,l,!0,c,!0),{u_texsize_icon:u,u_texture_icon:1})},Yr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Wr=function(e,r,n,i,a,o){return t.extend(function(t,e,r,n){var i=r.imageManager.getPattern(t.from.toString()),a=r.imageManager.getPattern(t.to.toString()),o=r.imageManager.getPixelSize(),s=o.width,l=o.height,c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,r.transform.tileZoom)/c,f=u*(n.tileID.canonical.x+n.tileID.wrap*c),h=u*n.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:i.tl,u_pattern_br_a:i.br,u_pattern_tl_b:a.tl,u_pattern_br_b:a.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/he(n,1,r.transform.tileZoom),u_pixel_coord_upper:[f>>16,h>>16],u_pixel_coord_lower:[65535&f,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r})},Xr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Zr(e,r,n,i,a,o,s){for(var l=e.context,c=l.gl,u=e.useProgram("collisionBox"),f=[],h=0,p=0,d=0;d0){var _=t.create(),w=y;t.mul(_,v.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(_,_,v.placementViewportMatrix),f.push({circleArray:b,circleOffset:p,transform:w,invTransform:_}),p=h+=b.length/4}x&&u.draw(l,c.LINES,Mt.disabled,At.disabled,e.colorModeForRenderPass(),Et.disabled,Cr(y,e.transform,m),n.id,x.layoutVertexBuffer,x.indexBuffer,x.segments,null,e.transform.zoom,null,null,x.collisionVertexBuffer)}}if(s&&f.length){var T=e.useProgram("collisionCircle"),k=new t.StructArrayLayout2f1f2i16;k.resize(4*h),k._trim();for(var M=0,A=0,S=f;A=0&&(g[v.associatedIconIndex]={shiftedAnchor:k,angle:M})}else ce(v.numGlyphs,p)}if(f){d.clear();for(var S=e.icon.placedSymbolArray,E=0;E0){var s=t.browser.now(),l=(s-e.timeAdded)/o,c=r?(s-r.timeAdded)/o:-1,u=n.getSource(),f=a.coveringZoomLevel({tileSize:u.tileSize,roundZoom:u.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-f)>Math.abs(e.tileID.overscaledZ-f),p=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-c,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-p}:{opacity:p,mix:0}}return{opacity:1,mix:0}}var ln=new t.Color(1,0,0,1),cn=new t.Color(0,1,0,1),un=new t.Color(0,0,1,1),fn=new t.Color(1,0,1,1),hn=new t.Color(0,1,1,1);function pn(t,e,r,n){gn(t,0,e+r/2,t.transform.width,r,n)}function dn(t,e,r,n){gn(t,e-r/2,0,r,t.transform.height,n)}function gn(e,r,n,i,a,o){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,a*t.browser.devicePixelRatio),s.clear({color:o}),l.disable(l.SCISSOR_TEST)}function mn(e,r,n){var i=e.context,a=i.gl,o=n.posMatrix,s=e.useProgram("debug"),l=Mt.disabled,c=At.disabled,u=e.colorModeForRenderPass();i.activeTexture.set(a.TEXTURE0),e.emptyTexture.bind(a.LINEAR,a.CLAMP_TO_EDGE),s.draw(i,a.LINE_STRIP,l,c,u,Et.disabled,Ir(o,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var f=r.getTileByID(n.key).latestRawTileData,h=Math.floor((f&&f.byteLength||0)/1024),p=r.getTile(n).tileSize,d=512/Math.min(p,512)*(n.overscaledZ/e.transform.zoom)*.5,g=n.canonical.toString();n.overscaledZ!==n.canonical.z&&(g+=" => "+n.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,n=t.context.gl,i=t.debugOverlayCanvas.getContext("2d");i.clearRect(0,0,r.width,r.height),i.shadowColor="white",i.shadowBlur=2,i.lineWidth=1.5,i.strokeStyle="white",i.textBaseline="top",i.font="bold 36px Open Sans, sans-serif",i.fillText(e,5,5),i.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(n.LINEAR,n.CLAMP_TO_EDGE)}(e,g+" "+h+"kb"),s.draw(i,a.TRIANGLES,l,c,St.alphaBlended,Et.disabled,Ir(o,t.Color.transparent,d),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var vn={symbol:function(e,r,n,i,a){if("translucent"===e.renderPass){var o=At.disabled,s=e.colorModeForRenderPass();n.layout.get("text-variable-anchor")&&function(e,r,n,i,a,o,s){for(var l=r.transform,c="map"===a,u="map"===o,f=0,h=e;f256&&this.clearStencil(),r.setColorMode(St.disabled),r.setDepthMode(Mt.disabled);var i=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var a=0,o=e;a256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new At({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},yn.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new At({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},yn.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,n=t.sort((function(t,e){return e.overscaledZ-t.overscaledZ})),i=n[n.length-1].overscaledZ,a=n[0].overscaledZ-i+1;if(a>1){this.currentStencilSource=void 0,this.nextStencilID+a>256&&this.clearStencil();for(var o={},s=0;s=0;this.currentLayer--){var b=this.style._layers[i[this.currentLayer]],_=a[b.source],w=u[b.source];this._renderTileClippingMasks(b,w),this.renderLayer(this,_,b,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?e.pop():null},yn.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},yn.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new br(this.context,yr[t],e,Xr[t],this._showOverdrawInspector)),this.cache[r]},yn.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},yn.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},yn.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},yn.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var xn=function(t,e){this.points=t,this.planes=e};xn.fromInvProjectionMatrix=function(e,r,n){var i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((function(r){return t.transformMat4([],r,e)})).map((function(e){return t.scale$1([],e,1/e[3]/r*i)})),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((function(e){var r=t.sub([],a[e[0]],a[e[1]]),n=t.sub([],a[e[2]],a[e[1]]),i=t.normalize([],t.cross([],r,n)),o=-t.dot(i,a[e[1]]);return i.concat(o)}));return new xn(a,o)};var bn=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};bn.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],n=t.clone$2(this.min),i=t.clone$2(this.max),a=0;a=0;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(var l=0;l<3;l++){for(var c=Number.MAX_VALUE,u=-Number.MAX_VALUE,f=0;fthis.max[l]-this.min[l])return 0}return 1};var _n=function(t,e,r,n){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===n&&(n=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(n)||n<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=r,this.right=n};_n.prototype.interpolate=function(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,n)),this},_n.prototype.getCenter=function(e,r){var n=t.clamp((this.left+e-this.right)/2,0,e),i=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(n,i)},_n.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},_n.prototype.clone=function(){return new _n(this.top,this.bottom,this.left,this.right)},_n.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var wn=function(e,r,n,i,a){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===a||a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==n?0:n,this._maxPitch=null==i?60:i,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new _n,this._posMatrixCache={},this._alignedPosMatrixCache={}},Tn={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};wn.prototype.clone=function(){var t=new wn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},Tn.minZoom.get=function(){return this._minZoom},Tn.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},Tn.maxZoom.get=function(){return this._maxZoom},Tn.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},Tn.minPitch.get=function(){return this._minPitch},Tn.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},Tn.maxPitch.get=function(){return this._maxPitch},Tn.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},Tn.renderWorldCopies.get=function(){return this._renderWorldCopies},Tn.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},Tn.worldSize.get=function(){return this.tileSize*this.scale},Tn.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Tn.size.get=function(){return new t.Point(this.width,this.height)},Tn.bearing.get=function(){return-this.angle/Math.PI*180},Tn.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Tn.pitch.get=function(){return this._pitch/Math.PI*180},Tn.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},Tn.fov.get=function(){return this._fov/Math.PI*180},Tn.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},Tn.zoom.get=function(){return this._zoom},Tn.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},Tn.center.get=function(){return this._center},Tn.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},Tn.padding.get=function(){return this._edgeInsets.toJSON()},Tn.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},Tn.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},wn.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},wn.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},wn.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},wn.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var n=this.pointCoordinate(new t.Point(0,0)),i=this.pointCoordinate(new t.Point(this.width,0)),a=this.pointCoordinate(new t.Point(this.width,this.height)),o=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(n.x,i.x,a.x,o.x)),l=Math.floor(Math.max(n.x,i.x,a.x,o.x)),c=s-1;c<=l+1;c++)0!==c&&r.push(new t.UnwrappedTileID(c,e));return r},wn.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),n=r;if(void 0!==e.minzoom&&re.maxzoom&&(r=e.maxzoom);var i=t.MercatorCoordinate.fromLngLat(this.center),a=Math.pow(2,r),o=[a*i.x,a*i.y,0],s=xn.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var c=function(t){return{aabb:new bn([t*a,0,0],[(t+1)*a,a,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},u=[],f=[],h=r,p=e.reparseOverscaled?n:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)u.push(c(-d)),u.push(c(d));for(u.push(c(0));u.length>0;){var g=u.pop(),m=g.x,v=g.y,y=g.fullyVisible;if(!y){var x=g.aabb.intersects(s);if(0===x)continue;y=2===x}var b=g.aabb.distanceX(o),_=g.aabb.distanceY(o),w=Math.max(Math.abs(b),Math.abs(_));if(g.zoom===h||w>3+(1<=l)f.push({tileID:new t.OverscaledTileID(g.zoom===h?p:g.zoom,g.wrap,g.zoom,m,v),distanceSq:t.sqrLen([o[0]-.5-m,o[1]-.5-v])});else for(var T=0;T<4;T++){var k=(m<<1)+T%2,M=(v<<1)+(T>>1);u.push({aabb:g.aabb.quadrant(T),zoom:g.zoom+1,x:k,y:M,wrap:g.wrap,fullyVisible:y})}}return f.sort((function(t,e){return t.distanceSq-e.distanceSq})).map((function(t){return t.tileID}))},wn.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},Tn.unmodified.get=function(){return this._unmodified},wn.prototype.zoomScale=function(t){return Math.pow(2,t)},wn.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},wn.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},wn.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},Tn.point.get=function(){return this.project(this.center)},wn.prototype.setLocationAtPoint=function(e,r){var n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.MercatorCoordinate(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())},wn.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},wn.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},wn.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},wn.prototype.coordinateLocation=function(t){return t.toLngLat()},wn.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],n=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(n,n,this.pixelMatrixInverse);var i=r[3],a=n[3],o=r[1]/i,s=n[1]/a,l=r[2]/i,c=n[2]/a,u=l===c?0:(0-l)/(c-l);return new t.MercatorCoordinate(t.number(r[0]/i,n[0]/a,u)/this.worldSize,t.number(o,s,u)/this.worldSize)},wn.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},wn.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},wn.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},wn.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},wn.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];var a=e.canonical,o=this.worldSize/this.zoomScale(a.z),s=a.x+Math.pow(2,a.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*o,a.y*o,0]),t.scale(l,l,[o/t.EXTENT,o/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),i[n]=new Float32Array(l),i[n]},wn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},wn.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,n,i,a=-90,o=90,s=-180,l=180,c=this.size,u=this._unmodified;if(this.latRange){var f=this.latRange;a=t.mercatorYfromLat(f[1])*this.worldSize,e=(o=t.mercatorYfromLat(f[0])*this.worldSize)-ao&&(i=o-m)}if(this.lngRange){var v=p.x,y=c.x/2;v-yl&&(n=l-y)}void 0===n&&void 0===i||(this.center=this.unproject(new t.Point(void 0!==n?n:p.x,void 0!==i?i:p.y))),this._unmodified=u,this._constraining=!1}},wn.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var r=Math.PI/2+this._pitch,n=this._fov*(.5+e.y/this.height),i=Math.sin(n)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-r-n,.01,Math.PI-.01)),a=this.point,o=a.x,s=a.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*i+this.cameraToCenterDistance),c=this.height/50,u=new Float64Array(16);t.perspective(u,this._fov,this.width/this.height,c,l),u[8]=2*-e.x/this.width,u[9]=2*e.y/this.height,t.scale(u,u,[1,-1,1]),t.translate(u,u,[0,0,-this.cameraToCenterDistance]),t.rotateX(u,u,this._pitch),t.rotateZ(u,u,this.angle),t.translate(u,u,[-o,-s,0]),this.mercatorMatrix=t.scale([],u,[this.worldSize,this.worldSize,this.worldSize]),t.scale(u,u,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=u,this.invProjMatrix=t.invert([],this.projMatrix);var f=this.width%2/2,h=this.height%2/2,p=Math.cos(this.angle),d=Math.sin(this.angle),g=o-Math.round(o)+p*f+d*h,m=s-Math.round(s)+p*h+d*f,v=new Float64Array(u);if(t.translate(v,v,[g>.5?g-1:g,m>.5?m-1:m,0]),this.alignedProjMatrix=v,u=t.create(),t.scale(u,u,[this.width/2,-this.height/2,1]),t.translate(u,u,[1,-1,0]),this.labelPlaneMatrix=u,u=t.create(),t.scale(u,u,[1,-1,1]),t.translate(u,u,[-1,-1,0]),t.scale(u,u,[2/this.width,2/this.height,1]),this.glCoordMatrix=u,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(u=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=u,this._posMatrixCache={},this._alignedPosMatrixCache={}}},wn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},wn.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},wn.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var n=r.x,i=r.y,a=r.x,o=r.y,s=0,l=e;s=3&&!t.some((function(t){return isNaN(t)}))){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},kn.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var Mn={linearity:.3,easing:t.bezier(0,0,.3,1)},An=t.extend({deceleration:2500,maxSpeed:1400},Mn),Sn=t.extend({deceleration:20,maxSpeed:1400},Mn),En=t.extend({deceleration:1e3,maxSpeed:360},Mn),Cn=t.extend({deceleration:1e3,maxSpeed:90},Mn),Ln=function(t){this._map=t,this.clear()};function In(t,e){(!t.duration||t.duration0&&r-e[0].time>160;)e.shift()},Ln.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},n=0,i=this._inertiaBuffer;n=this._clickTolerance||this._map.fire(new zn(t.type,this._map,t))},Rn.prototype.dblclick=function(t){return this._firePreventable(new zn(t.type,this._map,t))},Rn.prototype.mouseover=function(t){this._map.fire(new zn(t.type,this._map,t))},Rn.prototype.mouseout=function(t){this._map.fire(new zn(t.type,this._map,t))},Rn.prototype.touchstart=function(t){return this._firePreventable(new On(t.type,this._map,t))},Rn.prototype.touchmove=function(t){this._map.fire(new On(t.type,this._map,t))},Rn.prototype.touchend=function(t){this._map.fire(new On(t.type,this._map,t))},Rn.prototype.touchcancel=function(t){this._map.fire(new On(t.type,this._map,t))},Rn.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Rn.prototype.isEnabled=function(){return!0},Rn.prototype.isActive=function(){return!1},Rn.prototype.enable=function(){},Rn.prototype.disable=function(){};var Fn=function(t){this._map=t};Fn.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Fn.prototype.mousemove=function(t){this._map.fire(new zn(t.type,this._map,t))},Fn.prototype.mousedown=function(){this._delayContextMenu=!0},Fn.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new zn("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Fn.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new zn(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Fn.prototype.isEnabled=function(){return!0},Fn.prototype.isActive=function(){return!1},Fn.prototype.enable=function(){},Fn.prototype.disable=function(){};var Bn=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Nn(t,e){for(var r={},n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),n=0,i=e;n30)&&(this.aborted=!0)}}},jn.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var n=!this.aborted&&this.centroid;if(this.reset(),n)return n}};var Un=function(t){this.singleTap=new jn(t),this.numTaps=t.numTaps,this.reset()};Un.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Un.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},Un.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},Un.prototype.touchend=function(t,e,r){var n=this.singleTap.touchend(t,e,r);if(n){var i=t.timeStamp-this.lastTime<500,a=!this.lastTap||this.lastTap.dist(n)<30;if(i&&a||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}};var Vn=function(){this._zoomIn=new Un({numTouches:1,numTaps:2}),this._zoomOut=new Un({numTouches:2,numTaps:1}),this.reset()};Vn.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Vn.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Vn.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Vn.prototype.touchend=function(t,e,r){var n=this,i=this._zoomIn.touchend(t,e,r),a=this._zoomOut.touchend(t,e,r);return i?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(i)},{originalEvent:t})}}):a?(this._active=!0,t.preventDefault(),setTimeout((function(){return n.reset()}),0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(a)},{originalEvent:t})}}):void 0},Vn.prototype.touchcancel=function(){this.reset()},Vn.prototype.enable=function(){this._enabled=!0},Vn.prototype.disable=function(){this._enabled=!1,this.reset()},Vn.prototype.isEnabled=function(){return this._enabled},Vn.prototype.isActive=function(){return this._active};var qn=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};qn.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},qn.prototype._correctButton=function(t,e){return!1},qn.prototype._move=function(t,e){return{}},qn.prototype.mousedown=function(t,e){if(!this._lastPoint){var n=r.mouseButton(t);this._correctButton(t,n)&&(this._lastPoint=e,this._eventButton=n)}},qn.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)0&&(this._active=!0);var i=Nn(n,r),a=new t.Point(0,0),o=new t.Point(0,0),s=0;for(var l in i){var c=i[l],u=this._touches[l];u&&(a._add(c),o._add(c.sub(u)),s++,i[l]=c)}if(this._touches=i,!(sMath.abs(t.x)}var ei=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,ti(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var n=t[0].sub(this._lastPoints[0]),i=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(n.y+i.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var n=t.mag()>=2,i=e.mag()>=2;if(n||i){if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var a=t.y>0==e.y>0;return ti(t)&&ti(e)&&a}},e}(Xn),ri={panStep:100,bearingStep:15,pitchStep:10},ni=function(){var t=ri;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function ii(t){return t*(2-t)}ni.prototype.reset=function(){this._active=!1},ni.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,n=0,i=0,a=0,o=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?n=-1:(t.preventDefault(),a=-1);break;case 39:t.shiftKey?n=1:(t.preventDefault(),a=1);break;case 38:t.shiftKey?i=1:(t.preventDefault(),o=-1);break;case 40:t.shiftKey?i=-1:(t.preventDefault(),o=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:ii,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+n*e._bearingStep,pitch:s.getPitch()+i*e._pitchStep,offset:[-a*e._panStep,-o*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},ni.prototype.enable=function(){this._enabled=!0},ni.prototype.disable=function(){this._enabled=!1,this.reset()},ni.prototype.isEnabled=function(){return this._enabled},ni.prototype.isActive=function(){return this._active};var ai=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};ai.prototype.setZoomRate=function(t){this._defaultZoomRate=t},ai.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},ai.prototype.isEnabled=function(){return!!this._enabled},ai.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},ai.prototype.isZooming=function(){return!!this._zooming},ai.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},ai.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},ai.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,n=t.browser.now(),i=n-(this._lastWheelEventTime||0);this._lastWheelEventTime=n,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":i>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(i*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}},ai.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},ai.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var n=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(n)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},ai.prototype.renderFrame=function(){return this._onScrollFrame()},ai.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var n="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*n)));this._delta<0&&0!==i&&(i=1/i);var a="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(a*i))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var o,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,c=this._easing,u=!1;if("wheel"===this._type&&l&&c){var f=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=c(f);o=t.number(l,s,h),f<1?this._frameId||(this._frameId=!0):u=!0}else o=s,u=!0;return this._active=!0,u&&(this._active=!1,this._finishTimeout=setTimeout((function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!u,zoomDelta:o-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},ai.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var n=this._prevEase,i=(t.browser.now()-n.start)/n.duration,a=n.easing(i+.01)-n.easing(i),o=.27/Math.sqrt(a*a+1e-4)*.01,s=Math.sqrt(.0729-o*o);r=t.bezier(o,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},ai.prototype.reset=function(){this._active=!1};var oi=function(t,e){this._clickZoom=t,this._tapZoom=e};oi.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},oi.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},oi.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},oi.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var si=function(){this.reset()};si.prototype.reset=function(){this._active=!1},si.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},si.prototype.enable=function(){this._enabled=!0},si.prototype.disable=function(){this._enabled=!1,this.reset()},si.prototype.isEnabled=function(){return this._enabled},si.prototype.isActive=function(){return this._active};var li=function(){this._tap=new Un({numTouches:1,numTaps:1}),this.reset()};li.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},li.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},li.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var n=e[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e,r)},li.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},li.prototype.touchcancel=function(){this.reset()},li.prototype.enable=function(){this._enabled=!0},li.prototype.disable=function(){this._enabled=!1,this.reset()},li.prototype.isEnabled=function(){return this._enabled},li.prototype.isActive=function(){return this._active};var ci=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};ci.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ci.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ci.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ci.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ui=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};ui.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ui.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ui.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ui.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var fi=function(t,e,r,n){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0};fi.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},fi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},fi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},fi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},fi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},fi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var hi=function(t){return t.zoom||t.drag||t.pitch||t.rotate},pi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(t.Event);function di(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var gi=function(e,n){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ln(e),this._bearingSnap=n.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(n),t.bindAll(["handleEvent","handleWindowEvent"],this);var i=this._el;this._listeners=[[i,"touchstart",{passive:!1}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[t.window,"blur",void 0]];for(var a=0,o=this._listeners;aa?Math.min(2,_):Math.max(.5,_),w=Math.pow(m,1-e),T=i.unproject(x.add(b.mult(e*w)).mult(g));i.setLocationAtPoint(i.renderWorldCopies?T.wrap():T,d)}n._fireMoveEvents(r)}),(function(t){n._afterEase(r,t)}),e),this},r.prototype._prepareEase=function(e,r,n){void 0===n&&(n={}),this._moving=!0,r||n.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.Event("zoomend",e)),i&&this.fire(new t.Event("rotateend",e)),a&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},r.prototype.flyTo=function(e,r){var n=this;if(!e.essential&&t.browser.prefersReducedMotion){var i=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(i,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var a=this.transform,o=this.getZoom(),s=this.getBearing(),l=this.getPitch(),c=this.getPadding(),u="zoom"in e?t.clamp(+e.zoom,a.minZoom,a.maxZoom):o,f="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,p="padding"in e?e.padding:a.padding,d=a.zoomScale(u-o),g=t.Point.convert(e.offset),m=a.centerPoint.add(g),v=a.pointLocation(m),y=t.LngLat.convert(e.center||v);this._normalizeCenter(y);var x=a.project(v),b=a.project(y).sub(x),_=e.curve,w=Math.max(a.width,a.height),T=w/d,k=b.mag();if("minZoom"in e){var M=t.clamp(Math.min(e.minZoom,o,u),a.minZoom,a.maxZoom),A=w/a.zoomScale(M-o);_=Math.sqrt(A/k*2)}var S=_*_;function E(t){var e=(T*T-w*w+(t?-1:1)*S*S*k*k)/(2*(t?T:w)*S*k);return Math.log(Math.sqrt(e*e+1)-e)}function C(t){return(Math.exp(t)-Math.exp(-t))/2}function L(t){return(Math.exp(t)+Math.exp(-t))/2}var I=E(0),P=function(t){return L(I)/L(I+_*t)},z=function(t){return w*((L(I)*(C(e=I+_*t)/L(e))-C(I))/S)/k;var e},O=(E(1)-I)/_;if(Math.abs(k)<1e-6||!isFinite(O)){if(Math.abs(w-T)<1e-6)return this.easeTo(e,r);var D=Te.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==f,this._pitching=h!==l,this._padding=!a.isPaddingEqual(p),this._prepareEase(r,!1),this._ease((function(e){var i=e*O,d=1/P(i);a.zoom=1===e?u:o+a.scaleZoom(d),n._rotating&&(a.bearing=t.number(s,f,e)),n._pitching&&(a.pitch=t.number(l,h,e)),n._padding&&(a.interpolatePadding(c,p,e),m=a.centerPoint.add(g));var v=1===e?y:a.unproject(x.add(b.mult(z(i))).mult(d));a.setLocationAtPoint(a.renderWorldCopies?v.wrap():v,m),n._fireMoveEvents(r)}),(function(){return n._afterEase(r)}),e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var n=this.handlers;n&&n.stop()}return this},r.prototype._ease=function(e,r,n){!1===n.animate||0===n.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=n,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var n=Math.abs(e-r);return Math.abs(e-360-r)180?-360:r<-180?360:0}},r}(t.Evented),vi=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};vi.prototype.getDefaultPosition=function(){return"bottom-right"},vi.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},vi.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},vi.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var n=r.reduce((function(t,e,n){return e.value&&(t+=e.key+"="+e.value+(n=0)return!1;return!0}))).join(" | ");o!==this._attribHTML&&(this._attribHTML=o,t.length?(this._innerContainer.innerHTML=o,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},vi.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var yi=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};yi.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},yi.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},yi.prototype.getDefaultPosition=function(){return"bottom-left"},yi.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},yi.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},yi.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var xi=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};xi.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},xi.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,n=e?this._queue.concat(e):this._queue;re.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var i=new wn(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(n.call(this,i,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new xi,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},bi,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof wi))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",(function(){return r._update(!1)})),this.on("moveend",(function(){return r._update(!1)})),this.on("zoom",(function(){return r._update(!0)})),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new gi(this,e),this._hash=e.hash&&new kn("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new vi({customAttribution:e.customAttribution})),this.addControl(new yi,e.logoPosition),this.on("style.load",(function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)})),this.on("data",(function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))})),this.on("dataloading",(function(e){r.fire(new t.Event(e.dataType+"dataloading",e))}))}n&&(i.__proto__=n),(i.prototype=Object.create(n&&n.prototype)).constructor=i;var a={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return i.prototype._getMapId=function(){return this._mapId},i.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var n=e.onAdd(this);this._controls.push(e);var i=this._controlPositions[r];return-1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this},i.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},i.prototype.resize=function(e){var r=this._containerDimensions(),n=r[0],i=r[1];this._resizeCanvas(n,i),this.transform.resize(n,i),this.painter.resize(n,i);var a=!this._moving;return a&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),a&&this.fire(new t.Event("moveend",e)),this},i.prototype.getBounds=function(){return this.transform.getBounds()},i.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},i.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},i.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},i.prototype.getMaxZoom=function(){return this.transform.maxZoom},i.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()60)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},i.prototype.getMaxPitch=function(){return this.transform.maxPitch},i.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},i.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},i.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},i.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},i.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},i.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},i.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},i.prototype._createDelegatedListener=function(t,e,r){var n,i=this;if("mouseenter"===t||"mouseover"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){var o=i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[];o.length?a||(a=!0,r.call(i,new zn(t,i,n.originalEvent,{features:o}))):a=!1},mouseout:function(){a=!1}}}}if("mouseleave"===t||"mouseout"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(n){(i.getLayer(e)?i.queryRenderedFeatures(n.point,{layers:[e]}):[]).length?o=!0:o&&(o=!1,r.call(i,new zn(t,i,n.originalEvent)))},mouseout:function(e){o&&(o=!1,r.call(i,new zn(t,i,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(n={},n[t]=function(t){var n=i.getLayer(e)?i.queryRenderedFeatures(t.point,{layers:[e]}):[];n.length&&(t.features=n,r.call(i,t),delete t.features)},n)}},i.prototype.on=function(t,e,r){if(void 0===r)return n.prototype.on.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(i),i.delegates)this.on(a,i.delegates[a]);return this},i.prototype.once=function(t,e,r){if(void 0===r)return n.prototype.once.call(this,t,e);var i=this._createDelegatedListener(t,e,r);for(var a in i.delegates)this.once(a,i.delegates[a]);return this},i.prototype.off=function(t,e,r){var i=this;return void 0===r?n.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(n){for(var a=n[t],o=0;o180;){var s=n.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=n.width&&s.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e}Ci.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Ci.prototype.move=function(t,e){var r=this.map,n=this.mouseRotate.mousemoveWindow(t,e);if(n&&n.bearingDelta&&r.setBearing(r.getBearing()+n.bearingDelta),this.mousePitch){var i=this.mousePitch.mousemoveWindow(t,e);i&&i.pitchDelta&&r.setPitch(r.getPitch()+i.pitchDelta)}},Ci.prototype.off=function(){var t=this.element;r.removeEventListener(t,"mousedown",this.mousedown),r.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(t,"touchmove",this.touchmove),r.removeEventListener(t,"touchend",this.touchend),r.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Ci.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,"mousemove",this.mousemove),r.removeEventListener(t.window,"mouseup",this.mouseup)},Ci.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,"mousemove",this.mousemove),r.addEventListener(t.window,"mouseup",this.mouseup)},Ci.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Ci.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Ci.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Ci.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Ci.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)e.getEast()||r.latitudee.getNorth())},n.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},n.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},n.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.extend({bearing:i},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(n),a,{geolocateSource:!0})},n.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},n.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),n=e.distanceTo(r),i=Math.ceil(2*this._accuracy/n);this._circleElement.style.width=i+"px",this._circleElement.style.height=i+"px"},n.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},n.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Fi)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},n.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},n.prototype._setupUI=function(e){var n=this;if(this._container.addEventListener("contextmenu",(function(t){return t.preventDefault()})),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var i=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=i,this._geolocateButton.setAttribute("aria-label",i)}else{var a=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=a,this._geolocateButton.setAttribute("aria-label",a)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Oi(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Oi({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(function(e){e.geolocateSource||"ACTIVE_LOCK"!==n._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(n._watchState="BACKGROUND",n._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),n._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),n.fire(new t.Event("trackuserlocationend")))}))},n.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ri--,Fi=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Ri>1?(e={maximumAge:6e5,timeout:0},Fi=!0):(e=this.options.positionOptions,Fi=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},n.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},n}(t.Evented),Ni={maxWidth:100,unit:"metric"},ji=function(e){this.options=t.extend({},Ni,e),t.bindAll(["_onMove","setUnit"],this)};function Ui(t,e,r){var n=r&&r.maxWidth||100,i=t._container.clientHeight/2,a=t.unproject([0,i]),o=t.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?Vi(e,n,l/5280,t._getUIString("ScaleControl.Miles")):Vi(e,n,l,t._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?Vi(e,n,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?Vi(e,n,s/1e3,t._getUIString("ScaleControl.Kilometers")):Vi(e,n,s,t._getUIString("ScaleControl.Meters"))}function Vi(t,e,r,n){var i,a,o,s=(i=r,(a=Math.pow(10,(""+Math.floor(i)).length-1))*(o=(o=i/a)>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(o)));t.style.width=e*(s/r)+"px",t.innerHTML=s+" "+n}ji.prototype.getDefaultPosition=function(){return"bottom-left"},ji.prototype._onMove=function(){Ui(this._map,this._container,this.options)},ji.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},ji.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},ji.prototype.setUnit=function(t){this.options.unit=t,Ui(this._map,this._container,this.options)};var qi=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};qi.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},qi.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},qi.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},qi.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},qi.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},qi.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},qi.prototype._isFullscreen=function(){return this._fullscreen},qi.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},qi.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Hi={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Gi=function(e){function n(r){e.call(this),this.options=t.extend(Object.create(Hi),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(n.__proto__=e),(n.prototype=Object.create(e&&e.prototype)).constructor=n,n.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},n.prototype.isOpen=function(){return!!this._map},n.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},n.prototype.getLngLat=function(){return this._lngLat},n.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},n.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},n.prototype.getElement=function(){return this._container},n.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},n.prototype.setHTML=function(e){var r,n=t.window.document.createDocumentFragment(),i=t.window.document.createElement("body");for(i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return this.setDOMContent(n)},n.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},n.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},n.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},n.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},n.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},n.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},n.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},n.prototype._onMouseUp=function(t){this._update(t.point)},n.prototype._onMouseMove=function(t){this._update(t.point)},n.prototype._onDrag=function(t){this._update(t.point)},n.prototype._update=function(e){var n=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach((function(t){return n._container.classList.add(t)})),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Li(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var i=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),a=this.options.anchor,o=function e(r){if(r){if("number"==typeof r){var n=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(n,n),"top-right":new t.Point(-n,n),bottom:new t.Point(0,-r),"bottom-left":new t.Point(n,-n),"bottom-right":new t.Point(-n,-n),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var i=t.Point.convert(r);return{center:i,top:i,"top-left":i,"top-right":i,bottom:i,"bottom-left":i,"bottom-right":i,left:i,right:i}}return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!a){var s,l=this._container.offsetWidth,c=this._container.offsetHeight;s=i.y+o.bottom.ythis._map.transform.height-c?["bottom"]:[],i.xthis._map.transform.width-l/2&&s.push("right"),a=0===s.length?"bottom":s.join("-")}var u=i.add(o[a]).round();r.setTransform(this._container,Ii[a]+" translate("+u.x+"px,"+u.y+"px)"),Pi(this._container,a,"popup")}},n.prototype._onClose=function(){this.remove()},n}(t.Evented),Yi={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:Mi,NavigationControl:Ei,GeolocateControl:Bi,AttributionControl:vi,ScaleControl:ji,FullscreenControl:qi,Popup:Gi,Marker:Oi,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Bt().acquire(Ot)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Ot),Rt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Dt.workerCount},set workerCount(t){Dt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return Yi})),r}))},{}],474:[function(t,e,r){"use strict";e.exports=function(t){for(var e=1<p[1][2]&&(v[0]=-v[0]),p[0][2]>p[2][0]&&(v[1]=-v[1]),p[1][0]>p[0][1]&&(v[2]=-v[2]),!0}},{"./normalize":476,"gl-mat4/clone":278,"gl-mat4/create":280,"gl-mat4/determinant":281,"gl-mat4/invert":293,"gl-mat4/transpose":306,"gl-vec3/cross":365,"gl-vec3/dot":370,"gl-vec3/length":380,"gl-vec3/normalize":387}],476:[function(t,e,r){e.exports=function(t,e){var r=e[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=e[i]*n;return!0}},{}],477:[function(t,e,r){var n=t("gl-vec3/lerp"),i=t("mat4-recompose"),a=t("mat4-decompose"),o=t("gl-mat4/determinant"),s=t("quat-slerp"),l=f(),c=f(),u=f();function f(){return{translate:h(),scale:h(1),skew:h(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function h(t){return[t||0,t||0,t||0]}e.exports=function(t,e,r,f){if(0===o(e)||0===o(r))return!1;var h=a(e,l.translate,l.scale,l.skew,l.perspective,l.quaternion),p=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!(!h||!p)&&(n(u.translate,l.translate,c.translate,f),n(u.skew,l.skew,c.skew,f),n(u.scale,l.scale,c.scale,f),n(u.perspective,l.perspective,c.perspective,f),s(u.quaternion,l.quaternion,c.quaternion,f),i(t,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},{"gl-mat4/determinant":281,"gl-vec3/lerp":381,"mat4-decompose":475,"mat4-recompose":478,"quat-slerp":527}],478:[function(t,e,r){var n={identity:t("gl-mat4/identity"),translate:t("gl-mat4/translate"),multiply:t("gl-mat4/multiply"),create:t("gl-mat4/create"),scale:t("gl-mat4/scale"),fromRotationTranslation:t("gl-mat4/fromRotationTranslation")},i=(n.create(),n.create());e.exports=function(t,e,r,a,o,s){return n.identity(t),n.fromRotationTranslation(t,s,e),t[3]=o[0],t[7]=o[1],t[11]=o[2],t[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(t,t,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(t,t,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(t,t,i)),n.scale(t,t,r),t}},{"gl-mat4/create":280,"gl-mat4/fromRotationTranslation":284,"gl-mat4/identity":291,"gl-mat4/multiply":295,"gl-mat4/scale":303,"gl-mat4/translate":305}],479:[function(t,e,r){"use strict";e.exports=Math.log2||function(t){return Math.log(t)*Math.LOG2E}},{}],480:[function(t,e,r){"use strict";var n=t("binary-search-bounds"),i=t("mat4-interpolate"),a=t("gl-mat4/invert"),o=t("gl-mat4/rotateX"),s=t("gl-mat4/rotateY"),l=t("gl-mat4/rotateZ"),c=t("gl-mat4/lookAt"),u=t("gl-mat4/translate"),f=(t("gl-mat4/scale"),t("gl-vec3/normalize")),h=[0,0,0];function p(t){this._components=t.slice(),this._time=[0],this.prevMatrix=t.slice(),this.nextMatrix=t.slice(),this.computedMatrix=t.slice(),this.computedInverse=t.slice(),this.computedEye=[0,0,0],this.computedUp=[0,0,0],this.computedCenter=[0,0,0],this.computedRadius=[0],this._limits=[-1/0,1/0]}e.exports=function(t){return new p((t=t||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var d=p.prototype;d.recalcMatrix=function(t){var e=this._time,r=n.le(e,t),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===e.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{var u=e[r+1]-e[r],h=(l=16*r,this.prevMatrix),p=!0;for(c=0;c<16;++c)h[c]=s[l++];var d=this.nextMatrix;for(c=0;c<16;++c)d[c]=s[l++],p=p&&h[c]===d[c];if(u<1e-6||p)for(c=0;c<16;++c)o[c]=h[c];else i(o,h,d,(t-e[r])/u)}var g=this.computedUp;g[0]=o[1],g[1]=o[5],g[2]=o[9],f(g,g);var m=this.computedInverse;a(m,o);var v=this.computedEye,y=m[15];v[0]=m[12]/y,v[1]=m[13]/y,v[2]=m[14]/y;var x=this.computedCenter,b=Math.exp(this.computedRadius[0]);for(c=0;c<3;++c)x[c]=v[c]-o[2+4*c]*b}},d.idle=function(t){if(!(t1&&n(t[o[u-2]],t[o[u-1]],c)<=0;)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(t[s[u-2]],t[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}r=new Array(s.length+o.length-2);for(var f=0,h=(i=0,o.length);i0;--p)r[f++]=s[p];return r};var n=t("robust-orientation")[3]},{"robust-orientation":548}],483:[function(t,e,r){"use strict";e.exports=function(t,e){e||(e=t,t=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(t){var e=!1;return"altKey"in t&&(e=e||t.altKey!==o.alt,o.alt=!!t.altKey),"shiftKey"in t&&(e=e||t.shiftKey!==o.shift,o.shift=!!t.shiftKey),"ctrlKey"in t&&(e=e||t.ctrlKey!==o.control,o.control=!!t.ctrlKey),"metaKey"in t&&(e=e||t.metaKey!==o.meta,o.meta=!!t.metaKey),e}function c(t,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(t=0|s.buttons),(t!==r||c!==i||u!==a||l(s))&&(r=0|t,i=c||0,a=u||0,e&&e(r,i,a,o))}function u(t){c(0,t)}function f(){(r||i||a||o.shift||o.alt||o.meta||o.control)&&(i=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,e&&e(0,0,0,o))}function h(t){l(t)&&e&&e(r,i,a,o)}function p(t){0===n.buttons(t)?c(0,t):c(r,t)}function d(t){c(r|n.buttons(t),t)}function g(t){c(r&~n.buttons(t),t)}function m(){s||(s=!0,t.addEventListener("mousemove",p),t.addEventListener("mousedown",d),t.addEventListener("mouseup",g),t.addEventListener("mouseleave",u),t.addEventListener("mouseenter",u),t.addEventListener("mouseout",u),t.addEventListener("mouseover",u),t.addEventListener("blur",f),t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),t!==window&&(window.addEventListener("blur",f),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}m();var v={element:t};return Object.defineProperties(v,{enabled:{get:function(){return s},set:function(e){e?m():function(){if(!s)return;s=!1,t.removeEventListener("mousemove",p),t.removeEventListener("mousedown",d),t.removeEventListener("mouseup",g),t.removeEventListener("mouseleave",u),t.removeEventListener("mouseenter",u),t.removeEventListener("mouseout",u),t.removeEventListener("mouseover",u),t.removeEventListener("blur",f),t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),t!==window&&(window.removeEventListener("blur",f),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h))}()},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return i},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),v};var n=t("mouse-event")},{"mouse-event":485}],484:[function(t,e,r){var n={left:0,top:0};e.exports=function(t,e,r){e=e||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var i=t.clientX||0,a=t.clientY||0,o=(s=e,s===window||s===document||s===document.body?n:s.getBoundingClientRect());var s;return r[0]=i-o.left,r[1]=a-o.top,r}},{}],485:[function(t,e,r){"use strict";function n(t){return t.target||t.srcElement||window}r.buttons=function(t){if("object"==typeof t){if("buttons"in t)return t.buttons;if("which"in t){if(2===(e=t.which))return 4;if(3===e)return 2;if(e>0)return 1<=0)return 1< 0");"function"!=typeof t.vertex&&e("Must specify vertex creation function");"function"!=typeof t.cell&&e("Must specify cell creation function");"function"!=typeof t.phase&&e("Must specify phase function");for(var w=t.getters||[],T=new Array(b),k=0;k=0?T[k]=!0:T[k]=!1;return function(t,e,r,b,_,w){var T=w.length,k=_.length;if(k<2)throw new Error("ndarray-extract-contour: Dimension must be at least 2");for(var M="extractContour"+_.join("_"),A=[],S=[],E=[],C=0;C0&&z.push(l(C,_[L-1])+"*"+s(_[L-1])),S.push(d(C,_[L])+"=("+z.join("-")+")|0")}for(C=0;C=0;--C)O.push(s(_[C]));S.push("Q=("+O.join("*")+")|0","P=mallocUint32(Q)","V=mallocUint32(Q)","X=0"),S.push(g(0)+"=0");for(L=1;L<1<0;_=_-1&d)x.push("V[X+"+v(_)+"]");x.push(y(0));for(_=0;_=0;--e)N(e,0);var r=[];for(e=0;e0){",p(_[e]),"=1;"),t(e-1,r|1<<_[e]);for(var n=0;n=0?s.push("0"):e.indexOf(-(l+1))>=0?s.push("s["+l+"]-1"):(s.push("-1"),a.push("1"),o.push("s["+l+"]-2"));var c=".lo("+a.join()+").hi("+o.join()+")";if(0===a.length&&(c=""),i>0){n.push("if(1");for(l=0;l=0||e.indexOf(-(l+1))>=0||n.push("&&s[",l,"]>2");n.push("){grad",i,"(src.pick(",s.join(),")",c);for(l=0;l=0||e.indexOf(-(l+1))>=0||n.push(",dst.pick(",s.join(),",",l,")",c);n.push(");")}for(l=0;l1){dst.set(",s.join(),",",u,",0.5*(src.get(",h.join(),")-src.get(",p.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>1){diff(",f,",src.pick(",h.join(),")",c,",src.pick(",p.join(),")",c,");}else{zero(",f,");};");break;case"mirror":0===i?n.push("dst.set(",s.join(),",",u,",0);"):n.push("zero(",f,");");break;case"wrap":var d=s.slice(),g=s.slice();e[l]<0?(d[u]="s["+u+"]-2",g[u]="0"):(d[u]="s["+u+"]-1",g[u]="1"),0===i?n.push("if(s[",u,"]>2){dst.set(",s.join(),",",u,",0.5*(src.get(",d.join(),")-src.get(",g.join(),")))}else{dst.set(",s.join(),",",u,",0)};"):n.push("if(s[",u,"]>2){diff(",f,",src.pick(",d.join(),")",c,",src.pick(",g.join(),")",c,");}else{zero(",f,");};");break;default:throw new Error("ndarray-gradient: Invalid boundary condition")}}i>0&&n.push("};")}for(var s=0;s<1<>",rrshift:">>>"};!function(){for(var t in s){var e=s[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var l={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in l){var e=l[t];r[t]=o({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),r[t+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var c={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in c){var e=c[t];r[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),r[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),r[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),r[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var u=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;tthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),r.norm1=n({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),r.sup=n({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),r.inf=n({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),r.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),r.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),r.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),r.equals=n({args:["array","array"],pre:i,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":151}],491:[function(t,e,r){"use strict";var n=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var r=[],a=t,o=1;Array.isArray(a);)r.push(a.length),o*=a.length,a=a[0];return 0===r.length?n():(e||(e=n(new Float64Array(o),r)),i(e,t),e)}},{"./doConvert.js":492,ndarray:495}],492:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":151}],493:[function(t,e,r){"use strict";var n=t("typedarray-pool"),i=32;function a(t){switch(t){case"uint8":return[n.mallocUint8,n.freeUint8];case"uint16":return[n.mallocUint16,n.freeUint16];case"uint32":return[n.mallocUint32,n.freeUint32];case"int8":return[n.mallocInt8,n.freeInt8];case"int16":return[n.mallocInt16,n.freeInt16];case"int32":return[n.mallocInt32,n.freeInt32];case"float32":return[n.mallocFloat,n.freeFloat];case"float64":return[n.mallocDouble,n.freeDouble];default:return null}}function o(t){for(var e=[],r=0;r0?s.push(["d",d,"=s",d,"-d",f,"*n",f].join("")):s.push(["d",d,"=s",d].join("")),f=d),0!==(p=t.length-1-l)&&(h>0?s.push(["e",p,"=s",p,"-e",h,"*n",h,",f",p,"=",c[p],"-f",h,"*n",h].join("")):s.push(["e",p,"=s",p,",f",p,"=",c[p]].join("")),h=p)}r.push("var "+s.join(","));var g=["0","n0-1","data","offset"].concat(o(t.length));r.push(["if(n0<=",i,"){","insertionSort(",g.join(","),")}else{","quickSort(",g.join(","),")}"].join("")),r.push("}return "+n);var m=new Function("insertionSort","quickSort",r.join("\n")),v=function(t,e){var r=["'use strict'"],n=["ndarrayInsertionSort",t.join("d"),e].join(""),i=["left","right","data","offset"].concat(o(t.length)),s=a(e),l=["i,j,cptr,ptr=left*s0+offset"];if(t.length>1){for(var c=[],u=1;u1){r.push("dptr=0;sptr=ptr");for(u=t.length-1;u>=0;--u){0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"b){break __l}"].join(""));for(u=t.length-1;u>=1;--u)r.push("sptr+=e"+u,"dptr+=f"+u,"}");r.push("dptr=cptr;sptr=cptr-s0");for(u=t.length-1;u>=0;--u){0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"=0;--u){0!==(p=t[u])&&r.push(["for(i",p,"=0;i",p,"scratch)){",h("cptr",f("cptr-s0")),"cptr-=s0","}",h("cptr","scratch"));return r.push("}"),t.length>1&&s&&r.push("free(scratch)"),r.push("} return "+n),s?new Function("malloc","free",r.join("\n"))(s[0],s[1]):new Function(r.join("\n"))()}(t,e),y=function(t,e,r){var n=["'use strict'"],s=["ndarrayQuickSort",t.join("d"),e].join(""),l=["left","right","data","offset"].concat(o(t.length)),c=a(e),u=0;n.push(["function ",s,"(",l.join(","),"){"].join(""));var f=["sixth=((right-left+1)/6)|0","index1=left+sixth","index5=right-sixth","index3=(left+right)>>1","index2=index3-sixth","index4=index3+sixth","el1=index1","el2=index2","el3=index3","el4=index4","el5=index5","less=left+1","great=right-1","pivots_are_equal=true","tmp","tmp0","x","y","z","k","ptr0","ptr1","ptr2","comp_pivot1=0","comp_pivot2=0","comp=0"];if(t.length>1){for(var h=[],p=1;p=0;--a){0!==(o=t[a])&&n.push(["for(i",o,"=0;i",o,"1)for(a=0;a1?n.push("ptr_shift+=d"+o):n.push("ptr0+=d"+o),n.push("}"))}}function y(e,r,i,a){if(1===r.length)n.push("ptr0="+d(r[0]));else{for(var o=0;o1)for(o=0;o=1;--o)i&&n.push("pivot_ptr+=f"+o),r.length>1?n.push("ptr_shift+=e"+o):n.push("ptr0+=e"+o),n.push("}")}function x(){t.length>1&&c&&n.push("free(pivot1)","free(pivot2)")}function b(e,r){var i="el"+e,a="el"+r;if(t.length>1){var o="__l"+ ++u;y(o,[i,a],!1,["comp=",g("ptr0"),"-",g("ptr1"),"\n","if(comp>0){tmp0=",i,";",i,"=",a,";",a,"=tmp0;break ",o,"}\n","if(comp<0){break ",o,"}"].join(""))}else n.push(["if(",g(d(i)),">",g(d(a)),"){tmp0=",i,";",i,"=",a,";",a,"=tmp0}"].join(""))}function _(e,r){t.length>1?v([e,r],!1,m("ptr0",g("ptr1"))):n.push(m(d(e),g(d(r))))}function w(e,r,i){if(t.length>1){var a="__l"+ ++u;y(a,[r],!0,[e,"=",g("ptr0"),"-pivot",i,"[pivot_ptr]\n","if(",e,"!==0){break ",a,"}"].join(""))}else n.push([e,"=",g(d(r)),"-pivot",i].join(""))}function T(e,r){t.length>1?v([e,r],!1,["tmp=",g("ptr0"),"\n",m("ptr0",g("ptr1")),"\n",m("ptr1","tmp")].join("")):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","tmp=",g("ptr0"),"\n",m("ptr0",g("ptr1")),"\n",m("ptr1","tmp")].join(""))}function k(e,r,i){t.length>1?(v([e,r,i],!1,["tmp=",g("ptr0"),"\n",m("ptr0",g("ptr1")),"\n",m("ptr1",g("ptr2")),"\n",m("ptr2","tmp")].join("")),n.push("++"+r,"--"+i)):n.push(["ptr0=",d(e),"\n","ptr1=",d(r),"\n","ptr2=",d(i),"\n","++",r,"\n","--",i,"\n","tmp=",g("ptr0"),"\n",m("ptr0",g("ptr1")),"\n",m("ptr1",g("ptr2")),"\n",m("ptr2","tmp")].join(""))}function M(t,e){T(t,e),n.push("--"+e)}function A(e,r,i){t.length>1?v([e,r],!0,[m("ptr0",g("ptr1")),"\n",m("ptr1",["pivot",i,"[pivot_ptr]"].join(""))].join("")):n.push(m(d(e),g(d(r))),m(d(r),"pivot"+i))}function S(e,r){n.push(["if((",r,"-",e,")<=",i,"){\n","insertionSort(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}else{\n",s,"(",e,",",r,",data,offset,",o(t.length).join(","),")\n","}"].join(""))}function E(e,r,i){t.length>1?(n.push(["__l",++u,":while(true){"].join("")),v([e],!0,["if(",g("ptr0"),"!==pivot",r,"[pivot_ptr]){break __l",u,"}"].join("")),n.push(i,"}")):n.push(["while(",g(d(e)),"===pivot",r,"){",i,"}"].join(""))}return n.push("var "+f.join(",")),b(1,2),b(4,5),b(1,3),b(2,3),b(1,4),b(3,4),b(2,5),b(2,3),b(4,5),t.length>1?v(["el1","el2","el3","el4","el5","index1","index3","index5"],!0,["pivot1[pivot_ptr]=",g("ptr1"),"\n","pivot2[pivot_ptr]=",g("ptr3"),"\n","pivots_are_equal=pivots_are_equal&&(pivot1[pivot_ptr]===pivot2[pivot_ptr])\n","x=",g("ptr0"),"\n","y=",g("ptr2"),"\n","z=",g("ptr4"),"\n",m("ptr5","x"),"\n",m("ptr6","y"),"\n",m("ptr7","z")].join("")):n.push(["pivot1=",g(d("el2")),"\n","pivot2=",g(d("el4")),"\n","pivots_are_equal=pivot1===pivot2\n","x=",g(d("el1")),"\n","y=",g(d("el3")),"\n","z=",g(d("el5")),"\n",m(d("index1"),"x"),"\n",m(d("index3"),"y"),"\n",m(d("index5"),"z")].join("")),_("index2","left"),_("index4","right"),n.push("if(pivots_are_equal){"),n.push("for(k=less;k<=great;++k){"),w("comp","k",1),n.push("if(comp===0){continue}"),n.push("if(comp<0){"),n.push("if(k!==less){"),T("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),n.push("while(true){"),w("comp","great",1),n.push("if(comp>0){"),n.push("great--"),n.push("}else if(comp<0){"),k("k","less","great"),n.push("break"),n.push("}else{"),M("k","great"),n.push("break"),n.push("}"),n.push("}"),n.push("}"),n.push("}"),n.push("}else{"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1<0){"),n.push("if(k!==less){"),T("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2>0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp>0){"),n.push("if(--greatindex5){"),E("less",1,"++less"),E("great",2,"--great"),n.push("for(k=less;k<=great;++k){"),w("comp_pivot1","k",1),n.push("if(comp_pivot1===0){"),n.push("if(k!==less){"),T("k","less"),n.push("}"),n.push("++less"),n.push("}else{"),w("comp_pivot2","k",2),n.push("if(comp_pivot2===0){"),n.push("while(true){"),w("comp","great",2),n.push("if(comp===0){"),n.push("if(--great1&&c?new Function("insertionSort","malloc","free",n.join("\n"))(r,c[0],c[1]):new Function("insertionSort",n.join("\n"))(r)}(t,e,v);return m(v,y)}},{"typedarray-pool":595}],494:[function(t,e,r){"use strict";var n=t("./lib/compile_sort.js"),i={};e.exports=function(t){var e=t.order,r=t.dtype,a=[e,r].join(":"),o=i[a];return o||(i[a]=o=n(e,r)),o(t),t}},{"./lib/compile_sort.js":493}],495:[function(t,e,r){var n=t("iota-array"),i=t("is-buffer"),a="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,r=new Array(e.length);for(t=0;tMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+r+"_set("+l.join(",")+",v){"),i?a.push("return this.data.set("+u+",v)}"):a.push("return this.data["+u+"]=v}"),a.push("proto.get=function "+r+"_get("+l.join(",")+"){"),i?a.push("return this.data.get("+u+")}"):a.push("return this.data["+u+"]}"),a.push("proto.index=function "+r+"_index(",l.join(),"){return "+u+"}"),a.push("proto.hi=function "+r+"_hi("+l.join(",")+"){return new "+r+"(this.data,"+o.map((function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")})).join(",")+","+o.map((function(t){return"this.stride["+t+"]"})).join(",")+",this.offset)}");var p=o.map((function(t){return"a"+t+"=this.shape["+t+"]"})),d=o.map((function(t){return"c"+t+"=this.stride["+t+"]"}));a.push("proto.lo=function "+r+"_lo("+l.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+d.join(","));for(var g=0;g=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+r+"(this.data,"+o.map((function(t){return"a"+t})).join(",")+","+o.map((function(t){return"c"+t})).join(",")+",b)}"),a.push("proto.step=function "+r+"_step("+l.join(",")+"){var "+o.map((function(t){return"a"+t+"=this.shape["+t+"]"})).join(",")+","+o.map((function(t){return"b"+t+"=this.stride["+t+"]"})).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(g=0;g=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");return a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+r+"(data,shape,stride,offset){return new "+r+"(data,"+o.map((function(t){return"shape["+t+"]"})).join(",")+","+o.map((function(t){return"stride["+t+"]"})).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",a.join("\n"))(c[t],s)}var c={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};e.exports=function(t,e,r,n){if(void 0===t)return(0,c.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===r){r=new Array(o);for(var s=o-1,u=1;s>=0;--s)r[s]=u,u*=e[s]}if(void 0===n){n=0;for(s=0;st==t>0?a===-1>>>0?(r+=1,a=0):a+=1:0===a?(a=-1>>>0,r-=1):a-=1;return n.pack(a,r)}},{"double-bits":173}],497:[function(t,e,r){var n=Math.PI,i=c(120);function a(t,e,r,n){return["C",t,e,r,n,r,n]}function o(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function s(t,e,r,a,o,c,u,f,h,p){if(p)T=p[0],k=p[1],_=p[2],w=p[3];else{var d=l(t,e,-o);t=d.x,e=d.y;var g=(t-(f=(d=l(f,h,-o)).x))/2,m=(e-(h=d.y))/2,v=g*g/(r*r)+m*m/(a*a);v>1&&(r*=v=Math.sqrt(v),a*=v);var y=r*r,x=a*a,b=(c==u?-1:1)*Math.sqrt(Math.abs((y*x-y*m*m-x*g*g)/(y*m*m+x*g*g)));b==1/0&&(b=1);var _=b*r*m/a+(t+f)/2,w=b*-a*g/r+(e+h)/2,T=Math.asin(((e-w)/a).toFixed(9)),k=Math.asin(((h-w)/a).toFixed(9));(T=t<_?n-T:T)<0&&(T=2*n+T),(k=f<_?n-k:k)<0&&(k=2*n+k),u&&T>k&&(T-=2*n),!u&&k>T&&(k-=2*n)}if(Math.abs(k-T)>i){var M=k,A=f,S=h;k=T+i*(u&&k>T?1:-1);var E=s(f=_+r*Math.cos(k),h=w+a*Math.sin(k),r,a,o,0,u,A,S,[k,M,_,w])}var C=Math.tan((k-T)/4),L=4/3*r*C,I=4/3*a*C,P=[2*t-(t+L*Math.sin(T)),2*e-(e-I*Math.cos(T)),f+L*Math.sin(k),h-I*Math.cos(k),f,h];if(p)return P;E&&(P=P.concat(E));for(var z=0;z7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var x=p,b=d;"C"!=e&&"S"!=e||(x+=x-n,b+=b-i),v=["C",x,b,v[1],v[2],v[3],v[4]];break;case"T":"Q"==e||"T"==e?(f=2*p-f,h=2*d-h):(f=p,h=d),v=o(p,d,f,h,v[1],v[2]);break;case"Q":f=v[1],h=v[2],v=o(p,d,v[1],v[2],v[3],v[4]);break;case"L":v=a(p,d,v[1],v[2]);break;case"H":v=a(p,d,v[1],d);break;case"V":v=a(p,d,p,v[1]);break;case"Z":v=a(p,d,l,u)}e=y,p=v[v.length-2],d=v[v.length-1],v.length>4?(n=v[v.length-4],i=v[v.length-3]):(n=p,i=d),r.push(v)}return r}},{}],498:[function(t,e,r){r.vertexNormals=function(t,e,r){for(var n=e.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa){var b=i[c],_=1/Math.sqrt(m*y);for(x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;b[x]+=_*(v[w]*g[T]-v[T]*g[w])}}}for(o=0;oa)for(_=1/Math.sqrt(k),x=0;x<3;++x)b[x]*=_;else for(x=0;x<3;++x)b[x]=0}return i},r.faceNormals=function(t,e,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(p):0;for(c=0;c<3;++c)h[c]*=p;i[o]=h}return i}},{}],499:[function(t,e,r){ -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ -"use strict";var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,l=o(t),c=1;c0){var f=Math.sqrt(u+1);t[0]=.5*(o-l)/f,t[1]=.5*(s-n)/f,t[2]=.5*(r-a)/f,t[3]=.5*f}else{var h=Math.max(e,a,c);f=Math.sqrt(2*h-u+1);e>=h?(t[0]=.5*f,t[1]=.5*(i+r)/f,t[2]=.5*(s+n)/f,t[3]=.5*(o-l)/f):a>=h?(t[0]=.5*(r+i)/f,t[1]=.5*f,t[2]=.5*(l+o)/f,t[3]=.5*(s-n)/f):(t[0]=.5*(n+s)/f,t[1]=.5*(o+l)/f,t[2]=.5*f,t[3]=.5*(r-i)/f)}return t}},{}],501:[function(t,e,r){"use strict";e.exports=function(t){var e=(t=t||{}).center||[0,0,0],r=t.rotation||[0,0,0,1],n=t.radius||1;e=[].slice.call(e,0,3),u(r=[].slice.call(r,0,4),r);var i=new f(r,e,Math.log(n));i.setDistanceLimits(t.zoomMin,t.zoomMax),("eye"in t||"up"in t)&&i.lookAt(0,t.eye,t.center,t.up);return i};var n=t("filtered-vector"),i=t("gl-mat4/lookAt"),a=t("gl-mat4/fromQuat"),o=t("gl-mat4/invert"),s=t("./lib/quatFromFrame");function l(t,e,r){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2))}function c(t,e,r,n){return Math.sqrt(Math.pow(t,2)+Math.pow(e,2)+Math.pow(r,2)+Math.pow(n,2))}function u(t,e){var r=e[0],n=e[1],i=e[2],a=e[3],o=c(r,n,i,a);o>1e-6?(t[0]=r/o,t[1]=n/o,t[2]=i/o,t[3]=a/o):(t[0]=t[1]=t[2]=0,t[3]=1)}function f(t,e,r){this.radius=n([r]),this.center=n(e),this.rotation=n(t),this.computedRadius=this.radius.curve(0),this.computedCenter=this.center.curve(0),this.computedRotation=this.rotation.curve(0),this.computedUp=[.1,0,0],this.computedEye=[.1,0,0],this.computedMatrix=[.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.recalcMatrix(0)}var h=f.prototype;h.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},h.recalcMatrix=function(t){this.radius.curve(t),this.center.curve(t),this.rotation.curve(t);var e=this.computedRotation;u(e,e);var r=this.computedMatrix;a(r,e);var n=this.computedCenter,i=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);i[0]=n[0]+s*r[2],i[1]=n[1]+s*r[6],i[2]=n[2]+s*r[10],o[0]=r[1],o[1]=r[5],o[2]=r[9];for(var l=0;l<3;++l){for(var c=0,f=0;f<3;++f)c+=r[l+4*f]*i[f];r[12+l]=-c}},h.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r},h.idle=function(t){this.center.idle(t),this.radius.idle(t),this.rotation.idle(t)},h.flush=function(t){this.center.flush(t),this.radius.flush(t),this.rotation.flush(t)},h.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=i[1],o=i[5],s=i[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=l(u-=a*p,f-=o*p,h-=s*p);u/=d,f/=d,h/=d;var g=i[2],m=i[6],v=i[10],y=g*a+m*o+v*s,x=g*u+m*f+v*h,b=l(g-=y*a+x*u,m-=y*o+x*f,v-=y*s+x*h);g/=b,m/=b,v/=b;var _=u*e+a*r,w=f*e+o*r,T=h*e+s*r;this.center.move(t,_,w,T);var k=Math.exp(this.computedRadius[0]);k=Math.max(1e-4,k+n),this.radius.set(t,Math.log(k))},h.rotate=function(t,e,r,n){this.recalcMatrix(t),e=e||0,r=r||0;var i=this.computedMatrix,a=i[0],o=i[4],s=i[8],u=i[1],f=i[5],h=i[9],p=i[2],d=i[6],g=i[10],m=e*a+r*u,v=e*o+r*f,y=e*s+r*h,x=-(d*y-g*v),b=-(g*m-p*y),_=-(p*v-d*m),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),T=c(x,b,_,w);T>1e-6?(x/=T,b/=T,_/=T,w/=T):(x=b=_=0,w=1);var k=this.computedRotation,M=k[0],A=k[1],S=k[2],E=k[3],C=M*w+E*x+A*_-S*b,L=A*w+E*b+S*x-M*_,I=S*w+E*_+M*b-A*x,P=E*w-M*x-A*b-S*_;if(n){x=p,b=d,_=g;var z=Math.sin(n)/l(x,b,_);x*=z,b*=z,_*=z,P=P*(w=Math.cos(e))-(C=C*w+P*x+L*_-I*b)*x-(L=L*w+P*b+I*x-C*_)*b-(I=I*w+P*_+C*b-L*x)*_}var O=c(C,L,I,P);O>1e-6?(C/=O,L/=O,I/=O,P/=O):(C=L=I=0,P=1),this.rotation.set(t,C,L,I,P)},h.lookAt=function(t,e,r,n){this.recalcMatrix(t),r=r||this.computedCenter,e=e||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,e,r,n);var o=this.computedRotation;s(o,a[0],a[1],a[2],a[4],a[5],a[6],a[8],a[9],a[10]),u(o,o),this.rotation.set(t,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-e[c],2);this.radius.set(t,.5*Math.log(Math.max(l,1e-6))),this.center.set(t,r[0],r[1],r[2])},h.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},h.setMatrix=function(t,e){var r=this.computedRotation;s(r,e[0],e[1],e[2],e[4],e[5],e[6],e[8],e[9],e[10]),u(r,r),this.rotation.set(t,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,e);var i=n[15];if(Math.abs(i)>1e-6){var a=n[12]/i,l=n[13]/i,c=n[14]/i;this.recalcMatrix(t);var f=Math.exp(this.computedRadius[0]);this.center.set(t,a-n[2]*f,l-n[6]*f,c-n[10]*f),this.radius.idle(t)}else this.center.idle(t),this.radius.idle(t)},h.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},h.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},h.getDistanceLimits=function(t){var e=this.radius.bounds;return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},h.toJSON=function(){return this.recalcMatrix(this.lastT()),{center:this.computedCenter.slice(),rotation:this.computedRotation.slice(),distance:Math.log(this.computedRadius[0]),zoomMin:this.radius.bounds[0][0],zoomMax:this.radius.bounds[1][0]}},h.fromJSON=function(t){var e=this.lastT(),r=t.center;r&&this.center.set(e,r[0],r[1],r[2]);var n=t.rotation;n&&this.rotation.set(e,n[0],n[1],n[2],n[3]);var i=t.distance;i&&i>0&&this.radius.set(e,Math.log(i)),this.setDistanceLimits(t.zoomMin,t.zoomMax)}},{"./lib/quatFromFrame":500,"filtered-vector":242,"gl-mat4/fromQuat":282,"gl-mat4/invert":293,"gl-mat4/lookAt":294}],502:[function(t,e,r){ -/*! - * pad-left - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT license. - */ -"use strict";var n=t("repeat-string");e.exports=function(t,e,r){return n(r="undefined"!=typeof r?r+"":" ",e)+t}},{"repeat-string":541}],503:[function(t,e,r){"use strict";function n(t,e){if("string"!=typeof t)return[t];var r=[t];"string"==typeof e||Array.isArray(e)?e={brackets:e}:e||(e={});var n=e.brackets?Array.isArray(e.brackets)?e.brackets:[e.brackets]:["{}","[]","()"],i=e.escape||"___",a=!!e.flat;n.forEach((function(t){var e=new RegExp(["\\",t[0],"[^\\",t[0],"\\",t[1],"]*\\",t[1]].join("")),n=[];function a(e,a,o){var s=r.push(e.slice(t[0].length,-t[1].length))-1;return n.push(s),i+s+i}r.forEach((function(t,n){for(var i,o=0;t!=i;)if(i=t,t=t.replace(e,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=t})),n=n.reverse(),r=r.map((function(e){return n.forEach((function(r){e=e.replace(new RegExp("(\\"+i+r+"\\"+i+")","g"),t[0]+"$1"+t[1])})),e}))}));var o=new RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function t(e,r,n){for(var i,a=[],s=0;i=o.exec(e);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(e.slice(0,i.index)),a.push(t(r[i[1]],r)),e=e.slice(i.index+i[0].length)}return a.push(e),a}(r[0],r)}function i(t,e){if(e&&e.flat){var r,n=e&&e.escape||"___",i=t[0];if(!i)return"";for(var a=new RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+t);r=i,i=i.replace(a,s)}return i}return t.reduce((function t(e,r){return Array.isArray(r)&&(r=r.reduce(t,"")),e+r}),"");function s(e,r){if(null==t[r])throw Error("Reference "+r+"is undefined");return t[r]}}function a(t,e){return Array.isArray(t)?i(t,e):n(t,e)}a.parse=n,a.stringify=i,e.exports=a},{}],504:[function(t,e,r){"use strict";var n=t("pick-by-alias");e.exports=function(t){var e;arguments.length>1&&(t=arguments);"string"==typeof t?t=t.split(/\s/).map(parseFloat):"number"==typeof t&&(t=[t]);t.length&&"number"==typeof t[0]?e=1===t.length?{width:t[0],height:t[0],x:0,y:0}:2===t.length?{width:t[0],height:t[1],x:0,y:0}:{x:t[0],y:t[1],width:t[2]-t[0]||0,height:t[3]-t[1]||0}:t&&(t=n(t,{left:"x l left Left",top:"y t top Top",width:"w width W Width",height:"h height W Width",bottom:"b bottom Bottom",right:"r right Right"}),e={x:t.left||0,y:t.top||0},null==t.width?t.right?e.width=t.right-e.x:e.width=0:e.width=t.width,null==t.height?t.bottom?e.height=t.bottom-e.y:e.height=0:e.height=t.height);return e}},{"pick-by-alias":511}],505:[function(t,e,r){e.exports=function(t){var e=[];return t.replace(i,(function(t,r,i){var o=r.toLowerCase();for(i=function(t){var e=t.match(a);return e?e.map(Number):[]}(i),"m"==o&&i.length>2&&(e.push([r].concat(i.splice(0,2))),o="l",r="m"==r?"l":"L");;){if(i.length==n[o])return i.unshift(r),e.push(i);if(i.length2){var l=n.lastIndexOf("/");if(l!==n.length-1){-1===l?(n="",i=0):i=(n=n.slice(0,l)).length-1-n.lastIndexOf("/"),a=s,o=0;continue}}else if(2===n.length||1===n.length){n="",i=0,a=s,o=0;continue}e&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+t.slice(a+1,s):n=t.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===r&&-1!==o?++o:o=-1}return n}var i={resolve:function(){for(var e,i="",a=!1,o=arguments.length-1;o>=-1&&!a;o--){var s;o>=0?s=arguments[o]:(void 0===e&&(e=t.cwd()),s=e),r(s),0!==s.length&&(i=s+"/"+i,a=47===s.charCodeAt(0))}return i=n(i,!a),a?i.length>0?"/"+i:"/":i.length>0?i:"."},normalize:function(t){if(r(t),0===t.length)return".";var e=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!e)).length||e||(t="."),t.length>0&&i&&(t+="/"),e?"/"+t:t},isAbsolute:function(t){return r(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,e=0;e0&&(void 0===t?t=n:t+="/"+n)}return void 0===t?".":i.normalize(t)},relative:function(t,e){if(r(t),r(e),t===e)return"";if((t=i.resolve(t))===(e=i.resolve(e)))return"";for(var n=1;nc){if(47===e.charCodeAt(s+f))return e.slice(s+f+1);if(0===f)return e.slice(s+f)}else o>c&&(47===t.charCodeAt(n+f)?u=f:0===f&&(u=0));break}var h=t.charCodeAt(n+f);if(h!==e.charCodeAt(s+f))break;47===h&&(u=f)}var p="";for(f=n+u+1;f<=a;++f)f!==a&&47!==t.charCodeAt(f)||(0===p.length?p+="..":p+="/..");return p.length>0?p+e.slice(s+u):(s+=u,47===e.charCodeAt(s)&&++s,e.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(r(t),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,i=-1,a=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?n?"/":".":n&&1===i?"//":t.slice(0,i)},basename:function(t,e){if(void 0!==e&&"string"!=typeof e)throw new TypeError('"ext" argument must be a string');r(t);var n,i=0,a=-1,o=!0;if(void 0!==e&&e.length>0&&e.length<=t.length){if(e.length===t.length&&e===t)return"";var s=e.length-1,l=-1;for(n=t.length-1;n>=0;--n){var c=t.charCodeAt(n);if(47===c){if(!o){i=n+1;break}}else-1===l&&(o=!1,l=n+1),s>=0&&(c===e.charCodeAt(s)?-1==--s&&(a=n):(s=-1,a=l))}return i===a?a=l:-1===a&&(a=t.length),t.slice(i,a)}for(n=t.length-1;n>=0;--n)if(47===t.charCodeAt(n)){if(!o){i=n+1;break}}else-1===a&&(o=!1,a=n+1);return-1===a?"":t.slice(i,a)},extname:function(t){r(t);for(var e=-1,n=0,i=-1,a=!0,o=0,s=t.length-1;s>=0;--s){var l=t.charCodeAt(s);if(47!==l)-1===i&&(a=!1,i=s+1),46===l?-1===e?e=s:1!==o&&(o=1):-1!==e&&(o=-1);else if(!a){n=s+1;break}}return-1===e||-1===i||0===o||1===o&&e===i-1&&e===n+1?"":t.slice(e,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var r=e.dir||e.root,n=e.base||(e.name||"")+(e.ext||"");return r?r===e.root?r+n:r+t+n:n}("/",t)},parse:function(t){r(t);var e={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return e;var n,i=t.charCodeAt(0),a=47===i;a?(e.root="/",n=1):n=0;for(var o=-1,s=0,l=-1,c=!0,u=t.length-1,f=0;u>=n;--u)if(47!==(i=t.charCodeAt(u)))-1===l&&(c=!1,l=u+1),46===i?-1===o?o=u:1!==f&&(f=1):-1!==o&&(f=-1);else if(!c){s=u+1;break}return-1===o||-1===l||0===f||1===f&&o===l-1&&o===s+1?-1!==l&&(e.base=e.name=0===s&&a?t.slice(1,l):t.slice(s,l)):(0===s&&a?(e.name=t.slice(1,o),e.base=t.slice(1,l)):(e.name=t.slice(s,o),e.base=t.slice(s,l)),e.ext=t.slice(o,l)),s>0?e.dir=t.slice(0,s-1):a&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,e.exports=i}).call(this)}).call(this,t("_process"))},{_process:526}],508:[function(t,e,r){(function(t){(function(){(function(){var r,n,i,a,o,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof t&&null!==t&&t.hrtime?(e.exports=function(){return(r()-o)/1e6},n=t.hrtime,a=(r=function(){var t;return 1e9*(t=n())[0]+t[1]})(),s=1e9*t.uptime(),o=a-s):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this)}).call(this,t("_process"))},{_process:526}],509:[function(t,e,r){"use strict";e.exports=function(t){var e=t.length;if(e<32){for(var r=1,i=0;i0;--o)a=l[o],r=s[o],s[o]=s[a],s[a]=r,l[o]=l[r],l[r]=a,c=(c+r)*o;return n.freeUint32(l),n.freeUint32(s),c},r.unrank=function(t,e,r){switch(t){case 0:return r||[];case 1:return r?(r[0]=0,r):[0];case 2:return r?(e?(r[0]=0,r[1]=1):(r[0]=1,r[1]=0),r):e?[0,1]:[1,0]}var n,i,a,o=1;for((r=r||new Array(t))[0]=0,a=1;a0;--a)e=e-(n=e/o|0)*o|0,o=o/a|0,i=0|r[a],r[a]=0|r[n],r[n]=0|i;return r}},{"invert-permutation":462,"typedarray-pool":595}],511:[function(t,e,r){"use strict";e.exports=function(t,e,r){var n,a,o={};if("string"==typeof e&&(e=i(e)),Array.isArray(e)){var s={};for(a=0;a0){o=a[u][r][0],l=u;break}s=o[1^l];for(var f=0;f<2;++f)for(var h=a[f][r],p=0;p0&&(o=d,s=g,l=f)}return i||o&&c(o,l),s}function f(t,r){var i=a[r][t][0],o=[t];c(i,r);for(var s=i[1^r];;){for(;s!==t;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][t].length+a[1][t].length===0)break;var l=o[o.length-1],f=t,h=o[1],p=u(l,f,!0);if(n(e[l],e[f],e[h],e[p])<0)break;o.push(t),s=u(l,f)}return o}function h(t,e){return e[1]===e[e.length-1]}for(o=0;o0;){a[0][o].length;var g=f(o,p);h(0,g)?d.push.apply(d,g):(d.length>0&&l.push(d),d=g)}d.length>0&&l.push(d)}return l};var n=t("compare-angle")},{"compare-angle":132}],513:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=n(t,e.length),i=new Array(e.length),a=new Array(e.length),o=[],s=0;s0;){var c=o.pop();i[c]=!1;var u=r[c];for(s=0;s0}))).length,m=new Array(g),v=new Array(g);for(p=0;p0;){var B=R.pop(),N=E[B];l(N,(function(t,e){return t-e}));var j,U=N.length,V=F[B];if(0===V){var q=d[B];j=[q]}for(p=0;p=0))if(F[H]=1^V,R.push(H),0===V)D(q=d[H])||(q.reverse(),j.push(q))}0===V&&r.push(j)}return r};var n=t("edges-to-adjacency-list"),i=t("planar-dual"),a=t("point-in-big-polygon"),o=t("two-product"),s=t("robust-sum"),l=t("uniq"),c=t("./lib/trim-leaves");function u(t,e){for(var r=new Array(t),n=0;n0&&e[i]===r[0]))return 1;a=t[i-1]}for(var s=1;a;){var l=a.key,c=n(r,l[0],l[1]);if(l[0][0]0))return 0;s=-1,a=a.right}else if(c>0)a=a.left;else{if(!(c<0))return 0;s=1,a=a.right}}return s}}(v.slabs,v.coordinates);return 0===a.length?y:function(t,e){return function(r){return t(r[0],r[1])?0:e(r)}}(l(a),y)};var n=t("robust-orientation")[3],i=t("slab-decomposition"),a=t("interval-tree-1d"),o=t("binary-search-bounds");function s(){return!0}function l(t){for(var e={},r=0;r=-t},pointBetween:function(e,r,n){var i=e[1]-r[1],a=n[0]-r[0],o=e[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-t)},pointsSameX:function(e,r){return Math.abs(e[0]-r[0])t!=o-i>t&&(a-c)*(i-u)/(o-u)+c-n>t&&(s=!s),a=c,o=u}return s}};return e}},{}],520:[function(t,e,r){var n={toPolygon:function(t,e){function r(e){if(e.length<=0)return t.segments({inverted:!1,regions:[]});function r(e){var r=e.slice(0,e.length-1);return t.segments({inverted:!1,regions:[r]})}for(var n=r(e[0]),i=1;i0}))}function u(t,n){var i=t.seg,a=n.seg,o=i.start,s=i.end,c=a.start,u=a.end;r&&r.checkIntersection(i,a);var f=e.linesIntersect(o,s,c,u);if(!1===f){if(!e.pointsCollinear(o,s,c))return!1;if(e.pointsSame(o,u)||e.pointsSame(s,c))return!1;var h=e.pointsSame(o,c),p=e.pointsSame(s,u);if(h&&p)return n;var d=!h&&e.pointBetween(o,c,u),g=!p&&e.pointBetween(s,c,u);if(h)return g?l(n,s):l(t,u),n;d&&(p||(g?l(n,s):l(t,u)),l(n,o))}else 0===f.alongA&&(-1===f.alongB?l(t,c):0===f.alongB?l(t,f.pt):1===f.alongB&&l(t,u)),0===f.alongB&&(-1===f.alongA?l(n,o):0===f.alongA?l(n,f.pt):1===f.alongA&&l(n,s));return!1}for(var f=[];!a.isEmpty();){var h=a.getHead();if(r&&r.vert(h.pt[0]),h.isStart){r&&r.segmentNew(h.seg,h.primary);var p=c(h),d=p.before?p.before.ev:null,g=p.after?p.after.ev:null;function m(){if(d){var t=u(h,d);if(t)return t}return!!g&&u(h,g)}r&&r.tempStatus(h.seg,!!d&&d.seg,!!g&&g.seg);var v,y=m();if(y){var x;if(t)(x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above);else y.seg.otherFill=h.seg.myFill;r&&r.segmentUpdate(y.seg),h.other.remove(),h.remove()}if(a.getHead()!==h){r&&r.rewind(h.seg);continue}if(t)x=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,h.seg.myFill.below=g?g.seg.myFill.above:i,h.seg.myFill.above=x?!h.seg.myFill.below:h.seg.myFill.below;else if(null===h.seg.otherFill)v=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:v,below:v};r&&r.status(h.seg,!!d&&d.seg,!!g&&g.seg),h.other.status=p.insert(n.node({ev:h}))}else{var b=h.status;if(null===b)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(b.prev)&&s.exists(b.next)&&u(b.prev.ev,b.next.ev),r&&r.statusRemove(b.ev.seg),b.remove(),!h.primary){var _=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=_}f.push(h.seg)}a.getHead().remove()}return r&&r.done(),f}return t?{addRegion:function(t){for(var n,i,a,o=t[t.length-1],l=0;l=c?(k=1,y=c+2*h+d):y=h*(k=-h/c)+d):(k=0,p>=0?(M=0,y=d):-p>=f?(M=1,y=f+2*p+d):y=p*(M=-p/f)+d);else if(M<0)M=0,h>=0?(k=0,y=d):-h>=c?(k=1,y=c+2*h+d):y=h*(k=-h/c)+d;else{var A=1/T;y=(k*=A)*(c*k+u*(M*=A)+2*h)+M*(u*k+f*M+2*p)+d}else k<0?(b=f+p)>(x=u+h)?(_=b-x)>=(w=c-2*u+f)?(k=1,M=0,y=c+2*h+d):y=(k=_/w)*(c*k+u*(M=1-k)+2*h)+M*(u*k+f*M+2*p)+d:(k=0,b<=0?(M=1,y=f+2*p+d):p>=0?(M=0,y=d):y=p*(M=-p/f)+d):M<0?(b=c+h)>(x=u+p)?(_=b-x)>=(w=c-2*u+f)?(M=1,k=0,y=f+2*p+d):y=(k=1-(M=_/w))*(c*k+u*M+2*h)+M*(u*k+f*M+2*p)+d:(M=0,b<=0?(k=1,y=c+2*h+d):h>=0?(k=0,y=d):y=h*(k=-h/c)+d):(_=f+p-u-h)<=0?(k=0,M=1,y=f+2*p+d):_>=(w=c-2*u+f)?(k=1,M=0,y=c+2*h+d):y=(k=_/w)*(c*k+u*(M=1-k)+2*h)+M*(u*k+f*M+2*p)+d;var S=1-k-M;for(l=0;l1)for(var r=1;r0){var c=t[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}t[r++]=s}}return t.length=r,t}},{"cell-orientation":117,"compare-cell":133,"compare-oriented-cell":134}],534:[function(t,e,r){"use strict";var n=t("array-bounds"),i=t("color-normalize"),a=t("update-diff"),o=t("pick-by-alias"),s=t("object-assign"),l=t("flatten-vertex-data"),c=t("to-float32"),u=c.float32,f=c.fract32;e.exports=function(t,e){"function"==typeof t?(e||(e={}),e.regl=t):e=t;e.length&&(e.positions=e);if(!(t=e.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var r,c,p,d,g,m,v=t._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return d=t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=t.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),m=t.buffer({usage:"static",type:"float",data:h}),T(e),r=t({vert:"\n\t\tprecision highp float;\n\n\t\tattribute vec2 position, positionFract;\n\t\tattribute vec4 error;\n\t\tattribute vec4 color;\n\n\t\tattribute vec2 direction, lineOffset, capOffset;\n\n\t\tuniform vec4 viewport;\n\t\tuniform float lineWidth, capSize;\n\t\tuniform vec2 scale, scaleFract, translate, translateFract;\n\n\t\tvarying vec4 fragColor;\n\n\t\tvoid main() {\n\t\t\tfragColor = color / 255.;\n\n\t\t\tvec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset;\n\n\t\t\tvec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw;\n\n\t\t\tvec2 position = position + dxy;\n\n\t\t\tvec2 pos = (position + translate) * scale\n\t\t\t\t+ (positionFract + translateFract) * scale\n\t\t\t\t+ (position + translate) * scaleFract\n\t\t\t\t+ (positionFract + translateFract) * scaleFract;\n\n\t\t\tpos += pixelOffset / viewport.zw;\n\n\t\t\tgl_Position = vec4(pos * 2. - 1., 0, 1);\n\t\t}\n\t\t",frag:"\n\t\tprecision highp float;\n\n\t\tvarying vec4 fragColor;\n\n\t\tuniform float opacity;\n\n\t\tvoid main() {\n\t\t\tgl_FragColor = fragColor;\n\t\t\tgl_FragColor.a *= opacity;\n\t\t}\n\t\t",uniforms:{range:t.prop("range"),lineWidth:t.prop("lineWidth"),capSize:t.prop("capSize"),opacity:t.prop("opacity"),scale:t.prop("scale"),translate:t.prop("translate"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{color:{buffer:d,offset:function(t,e){return 4*e.offset},divisor:1},position:{buffer:c,offset:function(t,e){return 8*e.offset},divisor:1},positionFract:{buffer:p,offset:function(t,e){return 8*e.offset},divisor:1},error:{buffer:g,offset:function(t,e){return 16*e.offset},divisor:1},direction:{buffer:m,stride:24,offset:0},lineOffset:{buffer:m,stride:24,offset:8},capOffset:{buffer:m,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:t.prop("viewport")},viewport:t.prop("viewport"),stencil:!1,instances:t.prop("count"),count:h.length}),s(b,{update:T,draw:_,destroy:k,regl:t,gl:v,canvas:v.canvas,groups:x}),b;function b(t){t?T(t):null===t&&k(),_()}function _(e){if("number"==typeof e)return w(e);e&&!Array.isArray(e)&&(e=[e]),t._refresh(),x.forEach((function(t,r){t&&(e&&(e[r]?t.draw=!0:t.draw=!1),t.draw?w(r):t.draw=!0)}))}function w(t){"number"==typeof t&&(t=x[t]),null!=t&&t&&t.count&&t.color&&t.opacity&&t.positions&&t.positions.length>1&&(t.scaleRatio=[t.scale[0]*t.viewport.width,t.scale[1]*t.viewport.height],r(t),t.after&&t.after(t))}function T(t){if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var e=0,r=0;if(b.groups=x=t.map((function(t,c){var u=x[c];return t?("function"==typeof t?t={after:t}:"number"==typeof t[0]&&(t={positions:t}),t=o(t,{color:"color colors fill",capSize:"capSize cap capsize cap-size",lineWidth:"lineWidth line-width width line thickness",opacity:"opacity alpha",range:"range dataBox",viewport:"viewport viewBox",errors:"errors error",positions:"positions position data points"}),u||(x[c]=u={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},t=s({},y,t)),a(u,t,[{lineWidth:function(t){return.5*+t},capSize:function(t){return.5*+t},opacity:parseFloat,errors:function(t){return t=l(t),r+=t.length,t},positions:function(t,r){return t=l(t,"float64"),r.count=Math.floor(t.length/2),r.bounds=n(t,2),r.offset=e,e+=r.count,t}},{color:function(t,e){var r=e.count;if(t||(t="transparent"),!Array.isArray(t)||"number"==typeof t[0]){var n=t;t=Array(r);for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) {\n\t\t//handle miter clipping\n\t\tbTopCoord -= normalWidth * endTopJoin;\n\t\tbTopCoord += normalize(endTopJoin * normalWidth) * baClipping;\n\t}\n\n\tif (nextReverse) {\n\t\t//make join rectangular\n\t\tvec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5;\n\t\tfloat normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.);\n\t\tbBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5;\n\t\tbTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5;\n\t}\n\telse if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) {\n\t\t//handle miter clipping\n\t\taBotCoord -= normalWidth * startBotJoin;\n\t\taBotCoord += normalize(startBotJoin * normalWidth) * abClipping;\n\t}\n\n\tvec2 aTopPosition = (aTopCoord) * adjustedScale + translate;\n\tvec2 aBotPosition = (aBotCoord) * adjustedScale + translate;\n\n\tvec2 bTopPosition = (bTopCoord) * adjustedScale + translate;\n\tvec2 bBotPosition = (bBotCoord) * adjustedScale + translate;\n\n\t//position is normalized 0..1 coord on the screen\n\tvec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd;\n\n\tstartCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\tendCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tenableStartMiter = step(dot(currTangent, prevTangent), .5);\n\tenableEndMiter = step(dot(currTangent, nextTangent), .5);\n\n\t//bevel miter cutoffs\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n\n\t//round miter cutoffs\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tvec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5;\n\t\t\tstartCutoff = vec4(aCoord, aCoord);\n\t\t\tstartCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio;\n\t\t\tstartCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tstartCutoff += viewport.xyxy;\n\t\t\tstartCutoff += startMiterWidth.xyxy;\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tvec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5;\n\t\t\tendCutoff = vec4(bCoord, bCoord);\n\t\t\tendCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio;\n\t\t\tendCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw;\n\t\t\tendCutoff += viewport.xyxy;\n\t\t\tendCutoff += endMiterWidth.xyxy;\n\t\t}\n\t}\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nuniform sampler2D dashPattern;\nuniform float dashSize, pixelRatio, thickness, opacity, id, miterMode;\n\nvarying vec4 fragColor;\nvarying vec2 tangent;\nvarying vec4 startCutoff, endCutoff;\nvarying vec2 startCoord, endCoord;\nvarying float enableStartMiter, enableEndMiter;\n\nfloat distToLine(vec2 p, vec2 a, vec2 b) {\n\tvec2 diff = b - a;\n\tvec2 perp = normalize(vec2(-diff.y, diff.x));\n\treturn dot(p - a, perp);\n}\n\nvoid main() {\n\tfloat alpha = 1., distToStart, distToEnd;\n\tfloat cutoff = thickness * .5;\n\n\t//bevel miter\n\tif (miterMode == 1.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToStart + 1., 0.), 1.);\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < -1.) {\n\t\t\t\tdiscard;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\talpha *= min(max(distToEnd + 1., 0.), 1.);\n\t\t}\n\t}\n\n\t// round miter\n\telse if (miterMode == 2.) {\n\t\tif (enableStartMiter == 1.) {\n\t\t\tdistToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw);\n\t\t\tif (distToStart < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - startCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\n\t\tif (enableEndMiter == 1.) {\n\t\t\tdistToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw);\n\t\t\tif (distToEnd < 0.) {\n\t\t\t\tfloat radius = length(gl_FragCoord.xy - endCoord);\n\n\t\t\t\tif(radius > cutoff + .5) {\n\t\t\t\t\tdiscard;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\talpha -= smoothstep(cutoff - .5, cutoff + .5, radius);\n\t\t\t}\n\t\t}\n\t}\n\n\tfloat t = fract(dot(tangent, gl_FragCoord.xy) / dashSize) * .5 + .25;\n\tfloat dash = texture2D(dashPattern, vec2(t, .5)).r;\n\n\tgl_FragColor = fragColor;\n\tgl_FragColor.a *= alpha * opacity * dash;\n}\n"]),attributes:{lineEnd:{buffer:r,divisor:0,stride:8,offset:0},lineTop:{buffer:r,divisor:0,stride:8,offset:4},aColor:{buffer:t.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:t.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:t.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},n))}catch(t){e=i}return{fill:t({primitive:"triangle",elements:function(t,e){return e.triangles},offset:0,vert:o(["precision highp float;\n#define GLSLIFY 1\n\nattribute vec2 position, positionFract;\n\nuniform vec4 color;\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio, id;\nuniform vec4 viewport;\nuniform float opacity;\n\nvarying vec4 fragColor;\n\nconst float MAX_LINES = 256.;\n\nvoid main() {\n\tfloat depth = (MAX_LINES - 4. - id) / (MAX_LINES);\n\n\tvec2 position = position * scale + translate\n + positionFract * scale + translateFract\n + position * scaleFract\n + positionFract * scaleFract;\n\n\tgl_Position = vec4(position * 2.0 - 1.0, depth, 1);\n\n\tfragColor = color / 255.;\n\tfragColor.a *= opacity;\n}\n"]),frag:o(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:t.prop("scale"),color:t.prop("fill"),scaleFract:t.prop("scaleFract"),translateFract:t.prop("translateFract"),translate:t.prop("translate"),opacity:t.prop("opacity"),pixelRatio:t.context("pixelRatio"),id:t.prop("id"),viewport:function(t,e){return[e.viewport.x,e.viewport.y,t.viewportWidth,t.viewportHeight]}},attributes:{position:{buffer:t.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:t.prop("positionFractBuffer"),stride:8,offset:8}},blend:n.blend,depth:{enable:!1},scissor:n.scissor,stencil:n.stencil,viewport:n.viewport}),rect:i,miter:e}},m.defaults={dashes:null,join:"miter",miterLimit:1,thickness:10,cap:"square",color:"black",opacity:1,overlay:!1,viewport:null,range:null,close:!1,fill:null},m.prototype.render=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];e.length&&(t=this).update.apply(t,e),this.draw()},m.prototype.draw=function(){for(var t=this,e=[],r=arguments.length;r--;)e[r]=arguments[r];return(e.length?e:this.passes).forEach((function(e,r){var n;if(e&&Array.isArray(e))return(n=t).draw.apply(n,e);"number"==typeof e&&(e=t.passes[e]),e&&e.count>1&&e.opacity&&(t.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&t.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>m.precisionThreshold||e.scale[1]*e.viewport.height>m.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=m.maxPoints)?t.shaders.rect(e):t.shaders.miter(e)))})),this},m.prototype.update=function(t){var e=this;if(t){null!=t.length?"number"==typeof t[0]&&(t=[{positions:t}]):Array.isArray(t)||(t=[t]);var r=this.regl,o=this.gl;if(t.forEach((function(t,f){var d=e.passes[f];if(void 0!==t)if(null!==t){if("number"==typeof t[0]&&(t={positions:t}),t=s(t,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow"}),d||(e.passes[f]=d={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:r.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:r.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:r.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},t=a({},m.defaults,t)),null!=t.thickness&&(d.thickness=parseFloat(t.thickness)),null!=t.opacity&&(d.opacity=parseFloat(t.opacity)),null!=t.miterLimit&&(d.miterLimit=parseFloat(t.miterLimit)),null!=t.overlay&&(d.overlay=!!t.overlay,ft.length)&&(e=t.length);for(var r=0,n=new Array(e);r 1.0 + delta) {\n\t\tdiscard;\n\t}\n\n\talpha -= smoothstep(1.0 - delta, 1.0 + delta, radius);\n\n\tfloat borderRadius = fragBorderRadius;\n\tfloat ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius);\n\tvec4 color = mix(fragColor, fragBorderColor, ratio);\n\tcolor.a *= alpha * opacity;\n\tgl_FragColor = color;\n}\n"]),l.vert=h(["precision highp float;\n#define GLSLIFY 1\n\nattribute float x, y, xFract, yFract;\nattribute float size, borderSize;\nattribute vec4 colorId, borderColorId;\nattribute float isActive;\n\nuniform vec2 scale, scaleFract, translate, translateFract;\nuniform float pixelRatio;\nuniform bool constPointSize;\nuniform sampler2D palette;\nuniform vec2 paletteSize;\n\nconst float maxSize = 100.;\n\nvarying vec4 fragColor, fragBorderColor;\nvarying float fragBorderRadius, fragWidth;\n\nfloat pointSizeScale = (constPointSize) ? 2. : pixelRatio;\n\nbool isDirect = (paletteSize.x < 1.);\n\nvec4 getColor(vec4 id) {\n return isDirect ? id / 255. : texture2D(palette,\n vec2(\n (id.x + .5) / paletteSize.x,\n (id.y + .5) / paletteSize.y\n )\n );\n}\n\nvoid main() {\n // ignore inactive points\n if (isActive == 0.) return;\n\n vec2 position = vec2(x, y);\n vec2 positionFract = vec2(xFract, yFract);\n\n vec4 color = getColor(colorId);\n vec4 borderColor = getColor(borderColorId);\n\n float size = size * maxSize / 255.;\n float borderSize = borderSize * maxSize / 255.;\n\n gl_PointSize = (size + borderSize) * pointSizeScale;\n\n vec2 pos = (position + translate) * scale\n + (positionFract + translateFract) * scale\n + (position + translate) * scaleFract\n + (positionFract + translateFract) * scaleFract;\n\n gl_Position = vec4(pos * 2. - 1., 0., 1.);\n\n fragBorderRadius = 1. - 2. * borderSize / (size + borderSize);\n fragColor = color;\n fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor;\n fragWidth = 1. / gl_PointSize;\n}\n"]),m&&(l.frag=l.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=t(l)}b.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},b.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},b.prototype.draw=function(){for(var t=this,e=arguments.length,r=new Array(e),n=0;nn)?e.tree=u(t,{bounds:f}):n&&n.length&&(e.tree=n),e.tree){var h={primitive:"points",usage:"static",data:e.tree,type:"uint32"};e.elements?e.elements(h):e.elements=o.elements(h)}return i({data:v.float(t),usage:"dynamic"}),a({data:v.fract(t),usage:"dynamic"}),s({data:new Uint8Array(c),type:"uint8",usage:"stream"}),t}},{marker:function(e,r,n){var i=r.activation;if(i.forEach((function(t){return t&&t.destroy&&t.destroy()})),i.length=0,e&&"number"!=typeof e[0]){for(var a=[],s=0,l=Math.min(e.length,r.count);s=0)return a;if(t instanceof Uint8Array||t instanceof Uint8ClampedArray)e=t;else{e=new Uint8Array(t.length);for(var o=0,s=t.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===i.length?i[0]:i},b.prototype.updatePalette=function(t){if(!this.tooManyColors){var e=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*t.length/e);if(n>1)for(var i=.25*(t=t.slice()).length%e;i2?(s[0],s[2],n=s[1],i=s[3]):s.length?(n=s[0],i=s[1]):(s.x,n=s.y,s.x+s.width,i=s.y+s.height),l.length>2?(a=l[0],o=l[2],l[1],l[3]):l.length?(a=l[0],o=l[1]):(a=l.x,l.y,o=l.x+l.width,l.y+l.height),[a,n,o,i]}function p(t){if("number"==typeof t)return[t,t,t,t];if(2===t.length)return[t[0],t[1],t[0],t[1]];var e=l(t);return[e.x,e.y,e.x+e.width,e.y+e.height]}e.exports=u,u.prototype.render=function(){for(var t,e=this,r=[],n=arguments.length;n--;)r[n]=arguments[n];return r.length&&(t=this).update.apply(t,r),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=o((function(){e.draw(),e.dirty=!0,e.planned=null}))):(this.draw(),this.dirty=!0,o((function(){e.dirty=!1}))),this)},u.prototype.update=function(){for(var t,e=[],r=arguments.length;r--;)e[r]=arguments[r];if(e.length){for(var n=0;nk))&&(s.lower||!(T>>=e))<<3,(e|=r=(15<(t>>>=r))<<2)|(r=(3<(t>>>=r))<<1)|t>>>r>>1}function s(){function t(t){t:{for(var e=16;268435456>=e;e*=16)if(t<=e){t=e;break t}t=0}return 0<(e=r[o(t)>>2]).length?e.pop():new ArrayBuffer(t)}function e(t){r[o(t.byteLength)>>2].push(t)}var r=a(8,(function(){return[]}));return{alloc:t,free:e,allocType:function(e,r){var n=null;switch(e){case 5120:n=new Int8Array(t(r),0,r);break;case 5121:n=new Uint8Array(t(r),0,r);break;case 5122:n=new Int16Array(t(2*r),0,r);break;case 5123:n=new Uint16Array(t(2*r),0,r);break;case 5124:n=new Int32Array(t(4*r),0,r);break;case 5125:n=new Uint32Array(t(4*r),0,r);break;case 5126:n=new Float32Array(t(4*r),0,r);break;default:return null}return n.length!==r?n.subarray(0,r):n},freeType:function(t){e(t.buffer)}}}function l(t){return!!t&&"object"==typeof t&&Array.isArray(t.shape)&&Array.isArray(t.stride)&&"number"==typeof t.offset&&t.shape.length===t.stride.length&&(Array.isArray(t.data)||X(t.data))}function c(t,e,r,n,i,a){for(var o=0;o(i=s)&&(i=n.buffer.byteLength,5123===f?i>>=1:5125===f&&(i>>=2)),n.vertCount=i,i=o,0>o&&(i=4,1===(o=n.buffer.dimension)&&(i=0),2===o&&(i=1),3===o&&(i=4)),n.primType=i}function o(t){n.elementsCount--,delete s[t.id],t.buffer.destroy(),t.buffer=null}var s={},c=0,u={uint8:5121,uint16:5123};e.oes_element_index_uint&&(u.uint32=5125),i.prototype.bind=function(){this.buffer.bind()};var f=[];return{create:function(t,e){function s(t){if(t)if("number"==typeof t)c(t),f.primType=4,f.vertCount=0|t,f.type=5121;else{var e=null,r=35044,n=-1,i=-1,o=0,h=0;Array.isArray(t)||X(t)||l(t)?e=t:("data"in t&&(e=t.data),"usage"in t&&(r=$[t.usage]),"primitive"in t&&(n=nt[t.primitive]),"count"in t&&(i=0|t.count),"type"in t&&(h=u[t.type]),"length"in t?o=0|t.length:(o=i,5123===h||5122===h?o*=2:5125!==h&&5124!==h||(o*=4))),a(f,e,r,n,i,o,h)}else c(),f.primType=4,f.vertCount=0,f.type=5121;return s}var c=r.create(null,34963,!0),f=new i(c._buffer);return n.elementsCount++,s(t),s._reglType="elements",s._elements=f,s.subdata=function(t,e){return c.subdata(t,e),s},s.destroy=function(){o(f)},s},createStream:function(t){var e=f.pop();return e||(e=new i(r.create(null,34963,!0,!1)._buffer)),a(e,t,35040,-1,-1,0,0),e},destroyStream:function(t){f.push(t)},getElements:function(t){return"function"==typeof t&&t._elements instanceof i?t._elements:null},clear:function(){Z(s).forEach(o)}}}function g(t){for(var e=Y.allocType(5123,t.length),r=0;r>>31<<15,i=(a<<1>>>24)-127,a=a>>13&1023;e[r]=-24>i?n:-14>i?n+(a+1024>>-14-i):15>=i,r.height>>=i,p(r,n[i]),t.mipmask|=1<e;++e)t.images[e]=null;return t}function L(t){for(var e=t.images,r=0;re){for(var r=0;r=--this.refCount&&F(this)}}),o.profile&&(a.getTotalTextureSize=function(){var t=0;return Object.keys(yt).forEach((function(e){t+=yt[e].stats.size})),t}),{create2D:function(e,r){function n(t,e){var r=i.texInfo;I.call(r);var a=C();return"number"==typeof t?A(a,0|t,"number"==typeof e?0|e:0|t):t?(P(r,t),S(a,t)):A(a,1,1),r.genMipmaps&&(a.mipmask=(a.width<<1)-1),i.mipmask=a.mipmask,c(i,a),i.internalformat=a.internalformat,n.width=a.width,n.height=a.height,D(i),E(a,3553),z(r,3553),R(),L(a),o.profile&&(i.stats.size=T(i.internalformat,i.type,a.width,a.height,r.genMipmaps,!1)),n.format=tt[i.internalformat],n.type=et[i.type],n.mag=rt[r.magFilter],n.min=nt[r.minFilter],n.wrapS=it[r.wrapS],n.wrapT=it[r.wrapT],n}var i=new O(3553);return yt[i.id]=i,a.textureCount++,n(e,r),n.subimage=function(t,e,r,a){e|=0,r|=0,a|=0;var o=v();return c(o,i),o.width=0,o.height=0,p(o,t),o.width=o.width||(i.width>>a)-e,o.height=o.height||(i.height>>a)-r,D(i),d(o,3553,e,r,a),R(),k(o),n},n.resize=function(e,r){var a=0|e,s=0|r||a;if(a===i.width&&s===i.height)return n;n.width=i.width=a,n.height=i.height=s,D(i);for(var l=0;i.mipmask>>l;++l){var c=a>>l,u=s>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return R(),o.profile&&(i.stats.size=T(i.internalformat,i.type,a,s,!1,!1)),n},n._reglType="texture2d",n._texture=i,o.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,n,i,s,l){function f(t,e,r,n,i,a){var s,l=h.texInfo;for(I.call(l),s=0;6>s;++s)g[s]=C();if("number"!=typeof t&&t){if("object"==typeof t)if(e)S(g[0],t),S(g[1],e),S(g[2],r),S(g[3],n),S(g[4],i),S(g[5],a);else if(P(l,t),u(h,t),"faces"in t)for(t=t.faces,s=0;6>s;++s)c(g[s],h),S(g[s],t[s]);else for(s=0;6>s;++s)S(g[s],t)}else for(t=0|t||1,s=0;6>s;++s)A(g[s],t,t);for(c(h,g[0]),h.mipmask=l.genMipmaps?(g[0].width<<1)-1:g[0].mipmask,h.internalformat=g[0].internalformat,f.width=g[0].width,f.height=g[0].height,D(h),s=0;6>s;++s)E(g[s],34069+s);for(z(l,34067),R(),o.profile&&(h.stats.size=T(h.internalformat,h.type,f.width,f.height,l.genMipmaps,!0)),f.format=tt[h.internalformat],f.type=et[h.type],f.mag=rt[l.magFilter],f.min=nt[l.minFilter],f.wrapS=it[l.wrapS],f.wrapT=it[l.wrapT],s=0;6>s;++s)L(g[s]);return f}var h=new O(34067);yt[h.id]=h,a.cubeCount++;var g=Array(6);return f(e,r,n,i,s,l),f.subimage=function(t,e,r,n,i){r|=0,n|=0,i|=0;var a=v();return c(a,h),a.width=0,a.height=0,p(a,e),a.width=a.width||(h.width>>i)-r,a.height=a.height||(h.height>>i)-n,D(h),d(a,34069+t,r,n,i),R(),k(a),f},f.resize=function(e){if((e|=0)!==h.width){f.width=h.width=e,f.height=h.height=e,D(h);for(var r=0;6>r;++r)for(var n=0;h.mipmask>>n;++n)t.texImage2D(34069+r,n,h.format,e>>n,e>>n,0,h.format,h.type,null);return R(),o.profile&&(h.stats.size=T(h.internalformat,h.type,f.width,f.height,!1,!0)),f}},f._reglType="textureCube",f._texture=h,o.profile&&(f.stats=h.stats),f.destroy=function(){h.decRef()},f},clear:function(){for(var e=0;er;++r)if(0!=(e.mipmask&1<>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;6>n;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);z(e.texInfo,e.target)}))}}}function M(t,e,r,n,i,a){function o(t,e,r){this.target=t,this.texture=e,this.renderbuffer=r;var n=t=0;e?(t=e.width,n=e.height):r&&(t=r.width,n=r.height),this.width=t,this.height=n}function s(t){t&&(t.texture&&t.texture._texture.decRef(),t.renderbuffer&&t.renderbuffer._renderbuffer.decRef())}function l(t,e,r){t&&(t.texture?t.texture._texture.refCount+=1:t.renderbuffer._renderbuffer.refCount+=1)}function c(e,r){r&&(r.texture?t.framebufferTexture2D(36160,e,r.target,r.texture._texture.texture,0):t.framebufferRenderbuffer(36160,e,36161,r.renderbuffer._renderbuffer.renderbuffer))}function u(t){var e=3553,r=null,n=null,i=t;return"object"==typeof t&&(i=t.data,"target"in t&&(e=0|t.target)),"texture2d"===(t=i._reglType)||"textureCube"===t?r=i:"renderbuffer"===t&&(n=i,e=36161),new o(e,r,n)}function f(t,e,r,a,s){return r?((t=n.create2D({width:t,height:e,format:a,type:s}))._texture.refCount=0,new o(3553,t,null)):((t=i.create({width:t,height:e,format:a}))._renderbuffer.refCount=0,new o(36161,null,t))}function h(t){return t&&(t.texture||t.renderbuffer)}function p(t,e,r){t&&(t.texture?t.texture.resize(e,r):t.renderbuffer&&t.renderbuffer.resize(e,r),t.width=e,t.height=r)}function d(){this.id=T++,k[this.id]=this,this.framebuffer=t.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function g(t){t.colorAttachments.forEach(s),s(t.depthAttachment),s(t.stencilAttachment),s(t.depthStencilAttachment)}function m(e){t.deleteFramebuffer(e.framebuffer),e.framebuffer=null,a.framebufferCount--,delete k[e.id]}function v(e){var n;t.bindFramebuffer(36160,e.framebuffer);var i=e.colorAttachments;for(n=0;ni;++i){for(c=0;ct;++t)r[t].resize(n);return e.width=e.height=n,e},_reglType:"framebufferCube",destroy:function(){r.forEach((function(t){t.destroy()}))}})},clear:function(){Z(k).forEach(m)},restore:function(){x.cur=null,x.next=null,x.dirty=!0,Z(k).forEach((function(e){e.framebuffer=t.createFramebuffer(),v(e)}))}})}function A(){this.w=this.z=this.y=this.x=this.state=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.divisor=this.stride=this.offset=0}function S(t,e,r,n,i){function a(){this.id=++c,this.attributes=[];var t=e.oes_vertex_array_object;this.vao=t?t.createVertexArrayOES():null,u[this.id]=this,this.buffers=[]}var o=r.maxAttributes,s=Array(o);for(r=0;rt&&(t=e.stats.uniformsCount)})),t},r.getMaxAttributesCount=function(){var t=0;return h.forEach((function(e){e.stats.attributesCount>t&&(t=e.stats.attributesCount)})),t}),{clear:function(){var e=t.deleteShader.bind(t);Z(c).forEach(e),c={},Z(u).forEach(e),u={},h.forEach((function(e){t.deleteProgram(e.program)})),h.length=0,f={},r.shaderCount=0},program:function(t,e,n,i){var a=f[e];a||(a=f[e]={});var o=a[t];return o&&!i?o:(e=new s(e,t),r.shaderCount++,l(e,n,i),o||(a[t]=e),h.push(e),e)},restore:function(){c={},u={};for(var t=0;t"+e+"?"+i+".constant["+e+"]:0;"})).join(""),"}}else{","if(",s,"(",i,".buffer)){",u,"=",a,".createStream(",34962,",",i,".buffer);","}else{",u,"=",a,".getBuffer(",i,".buffer);","}",f,'="type" in ',i,"?",o.glTypes,"[",i,".type]:",u,".dtype;",l.normalized,"=!!",i,".normalized;"),n("size"),n("offset"),n("stride"),n("divisor"),r("}}"),r.exit("if(",l.isStream,"){",a,".destroyStream(",u,");","}"),l}))})),o}function M(t,e,n,i,o){function s(t){var e=c[t];e&&(h[t]=e)}var l=function(t,e){if("string"==typeof(r=t.static).frag&&"string"==typeof r.vert){if(0>1)",s],");")}function e(){r(l,".drawArraysInstancedANGLE(",[d,g,m,s],");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}function o(){function t(){r(u+".drawElements("+[d,m,v,g+"<<(("+v+"-5121)>>1)"]+");")}function e(){r(u+".drawArrays("+[d,g,m]+");")}p?y?t():(r("if(",p,"){"),t(),r("}else{"),e(),r("}")):e()}var s,l,c=t.shared,u=c.gl,f=c.draw,h=n.draw,p=function(){var i=h.elements,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,".","elements"),i&&a("if("+i+")"+u+".bindBuffer(34963,"+i+".buffer.buffer);"),i}(),d=i("primitive"),g=i("offset"),m=function(){var i=h.count,a=e;return i?((i.contextDep&&n.contextDynamic||i.propDep)&&(a=r),i=i.append(t,a)):i=a.def(f,".","count"),i}();if("number"==typeof m){if(0===m)return}else r("if(",m,"){"),r.exit("}");K&&(s=i("instances"),l=t.instancing);var v=p+".type",y=h.elements&&R(h.elements);K&&("number"!=typeof s||0<=s)?"string"==typeof s?(r("if(",s,">0){"),a(),r("}else if(",s,"<0){"),o(),r("}")):a():o()}function V(t,e,r,n,i){return i=(e=b()).proc("body",i),K&&(e.instancing=i.def(e.shared.extensions,".angle_instanced_arrays")),t(e,i,r,n),e.compile().body}function H(t,e,r,n){L(t,e),r.useVAO?r.drawVAO?e(t.shared.vao,".setVAO(",r.drawVAO.append(t,e),");"):e(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(e(t.shared.vao,".setVAO(null);"),N(t,e,r,n.attributes,(function(){return!0}))),j(t,e,r,n.uniforms,(function(){return!0})),U(t,e,e,r)}function G(t,e,r,n){function i(){return!0}t.batchId="a1",L(t,e),N(t,e,r,n.attributes,i),j(t,e,r,n.uniforms,i),U(t,e,e,r)}function Y(t,e,r,n){function i(t){return t.contextDep&&o||t.propDep}function a(t){return!i(t)}L(t,e);var o=r.contextDep,s=e.def(),l=e.def();t.shared.props=l,t.batchId=s;var c=t.scope(),u=t.scope();e(c.entry,"for(",s,"=0;",s,"<","a1",";++",s,"){",l,"=","a0","[",s,"];",u,"}",c.exit),r.needsContext&&A(t,u,r.context),r.needsFramebuffer&&S(t,u,r.framebuffer),C(t,u,r.state,i),r.profile&&i(r.profile)&&I(t,u,r,!1,!0),n?(r.useVAO?r.drawVAO?i(r.drawVAO)?u(t.shared.vao,".setVAO(",r.drawVAO.append(t,u),");"):c(t.shared.vao,".setVAO(",r.drawVAO.append(t,c),");"):c(t.shared.vao,".setVAO(",t.shared.vao,".targetVAO);"):(c(t.shared.vao,".setVAO(null);"),N(t,c,r,n.attributes,a),N(t,u,r,n.attributes,i)),j(t,c,r,n.uniforms,a),j(t,u,r,n.uniforms,i),U(t,c,u,r)):(e=t.global.def("{}"),n=r.shader.progVar.append(t,u),l=u.def(n,".id"),c=u.def(e,"[",l,"]"),u(t.shared.gl,".useProgram(",n,".program);","if(!",c,"){",c,"=",e,"[",l,"]=",t.link((function(e){return V(G,t,r,e,2)})),"(",n,");}",c,".call(this,a0[",s,"],",s,");"))}function W(t,r){function n(e){var n=r.shader[e];n&&i.set(a.shader,"."+e,n.append(t,i))}var i=t.proc("scope",3);t.batchId="a2";var a=t.shared,o=a.current;A(t,i,r.context),r.framebuffer&&r.framebuffer.append(t,i),O(Object.keys(r.state)).forEach((function(e){var n=r.state[e].append(t,i);m(n)?n.forEach((function(r,n){i.set(t.next[e],"["+n+"]",r)})):i.set(a.next,"."+e,n)})),I(t,i,r,!0,!0),["elements","offset","count","instances","primitive"].forEach((function(e){var n=r.draw[e];n&&i.set(a.draw,"."+e,""+n.append(t,i))})),Object.keys(r.uniforms).forEach((function(n){i.set(a.uniforms,"["+e.id(n)+"]",r.uniforms[n].append(t,i))})),Object.keys(r.attributes).forEach((function(e){var n=r.attributes[e].append(t,i),a=t.scopeAttrib(e);Object.keys(new Z).forEach((function(t){i.set(a,"."+t,n[t])}))})),r.scopeVAO&&i.set(a.vao,".targetVAO",r.scopeVAO.append(t,i)),n("vert"),n("frag"),0=--this.refCount&&o(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var t=0;return Object.keys(u).forEach((function(e){t+=u[e].stats.size})),t}),{create:function(e,r){function o(e,r){var n=0,a=0,u=32854;if("object"==typeof e&&e?("shape"in e?(n=0|(a=e.shape)[0],a=0|a[1]):("radius"in e&&(n=a=0|e.radius),"width"in e&&(n=0|e.width),"height"in e&&(a=0|e.height)),"format"in e&&(u=s[e.format])):"number"==typeof e?(n=0|e,a="number"==typeof r?0|r:n):e||(n=a=1),n!==c.width||a!==c.height||u!==c.format)return o.width=c.width=n,o.height=c.height=a,c.format=u,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,u,n,a),i.profile&&(c.stats.size=yt[c.format]*c.width*c.height),o.format=l[c.format],o}var c=new a(t.createRenderbuffer());return u[c.id]=c,n.renderbufferCount++,o(e,r),o.resize=function(e,r){var n=0|e,a=0|r||n;return n===c.width&&a===c.height||(o.width=c.width=n,o.height=c.height=a,t.bindRenderbuffer(36161,c.renderbuffer),t.renderbufferStorage(36161,c.format,n,a),i.profile&&(c.stats.size=yt[c.format]*c.width*c.height)),o},o._reglType="renderbuffer",o._renderbuffer=c,i.profile&&(o.stats=c.stats),o.destroy=function(){c.decRef()},o},clear:function(){Z(u).forEach(o)},restore:function(){Z(u).forEach((function(e){e.renderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(36161,e.renderbuffer),t.renderbufferStorage(36161,e.format,e.width,e.height)})),t.bindRenderbuffer(36161,null)}}},bt=[];bt[6408]=4,bt[6407]=3;var _t=[];_t[5121]=1,_t[5126]=4,_t[36193]=2;var wt=["x","y","z","w"],Tt="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),kt={0:0,1:1,zero:0,one:1,"src color":768,"one minus src color":769,"src alpha":770,"one minus src alpha":771,"dst color":774,"one minus dst color":775,"dst alpha":772,"one minus dst alpha":773,"constant color":32769,"one minus constant color":32770,"constant alpha":32771,"one minus constant alpha":32772,"src alpha saturate":776},Mt={never:512,less:513,"<":513,equal:514,"=":514,"==":514,"===":514,lequal:515,"<=":515,greater:516,">":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},At={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},St={cw:2304,ccw:2305},Et=new D(!1,!1,!1,(function(){}));return function(t){function e(){if(0===J.length)w&&w.update(),tt=null;else{tt=H.next(e),f();for(var t=J.length-1;0<=t;--t){var r=J[t];r&&r(I,null,0)}m.flush(),w&&w.update()}}function r(){!tt&&0=J.length&&n()}}}}function u(){var t=X.viewport,e=X.scissor_box;t[0]=t[1]=e[0]=e[1]=0,I.viewportWidth=I.framebufferWidth=I.drawingBufferWidth=t[2]=e[2]=m.drawingBufferWidth,I.viewportHeight=I.framebufferHeight=I.drawingBufferHeight=t[3]=e[3]=m.drawingBufferHeight}function f(){I.tick+=1,I.time=g(),u(),Y.procs.poll()}function h(){u(),Y.procs.refresh(),w&&w.update()}function g(){return(G()-T)/1e3}if(!(t=i(t)))return null;var m=t.gl,v=m.getContextAttributes();m.isContextLost();var y=function(t,e){function r(e){var r;e=e.toLowerCase();try{r=n[e]=t.getExtension(e)}catch(t){}return!!r}for(var n={},i=0;ie;++e)et(U({framebuffer:t.framebuffer.faces[e]},t),l);else et(t,l);else l(0,t)},prop:q.define.bind(null,1),context:q.define.bind(null,2),this:q.define.bind(null,3),draw:s({}),buffer:function(t){return z.create(t,34962,!1,!1)},elements:function(t){return D.create(t,!1)},texture:F.create2D,cube:F.createCube,renderbuffer:B.create,framebuffer:V.create,framebufferCube:V.createCube,vao:O.createVAO,attributes:v,frame:c,on:function(t,e){var r;switch(t){case"frame":return c(e);case"lost":r=K;break;case"restore":r=Q;break;case"destroy":r=$}return r.push(e),{cancel:function(){for(var t=0;t - * - * Copyright (c) 2014-2015, Jon Schlinkert. - * Licensed under the MIT License. - */ -"use strict";var n,i="";e.exports=function(t,e){if("string"!=typeof t)throw new TypeError("expected a string");if(1===e)return t;if(2===e)return t+t;var r=t.length*e;if(n!==t||"undefined"==typeof n)n=t,i="";else if(i.length>=r)return i.substr(0,r);for(;r>i.length&&e>1;)1&e&&(i+=t),e>>=1,t+=t;return i=(i+=t).substr(0,r)}},{}],542:[function(t,e,r){(function(t){(function(){e.exports=t.performance&&t.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],543:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.length,r=t[t.length-1],n=e,i=e-2;i>=0;--i){var a=r,o=t[i];(l=o-((r=a+o)-a))&&(t[--n]=r,r=l)}var s=0;for(i=n;i>1;return["sum(",t(e.slice(0,r)),",",t(e.slice(r)),")"].join("")}(e);var n}function u(t){return new Function("sum","scale","prod","compress",["function robustDeterminant",t,"(m){return compress(",c(l(t)),")};return robustDeterminant",t].join(""))(i,a,n,o)}var f=[function(){return[0]},function(t){return[t[0][0]]}];!function(){for(;f.length<6;)f.push(u(f.length));for(var t=[],r=["function robustDeterminant(m){switch(m.length){"],n=0;n<6;++n)t.push("det"+n),r.push("case ",n,":return det",n,"(m);");r.push("}var det=CACHE[m.length];if(!det)det=CACHE[m.length]=gen(m.length);return det(m);}return robustDeterminant"),t.push("CACHE","gen",r.join(""));var i=Function.apply(void 0,t);for(e.exports=i.apply(void 0,f.concat([f,u])),n=0;n>1;return["sum(",l(t.slice(0,e)),",",l(t.slice(e)),")"].join("")}function c(t,e){if("m"===t.charAt(0)){if("w"===e.charAt(0)){var r=t.split("[");return["w",e.substr(1),"m",r[0].substr(1)].join("")}return["prod(",t,",",e,")"].join("")}return c(e,t)}function u(t){if(2===t.length)return[["diff(",c(t[0][0],t[1][1]),",",c(t[1][0],t[0][1]),")"].join("")];for(var e=[],r=0;r0&&r.push(","),r.push("[");for(var o=0;o0&&r.push(","),o===i?r.push("+b[",a,"]"):r.push("+A[",a,"][",o,"]");r.push("]")}r.push("]),")}r.push("det(A)]}return ",e);var s=new Function("det",r.join(""));return s(t<6?n[t]:n)}var a=[function(){return[0]},function(t,e){return[[e[0]],[t[0][0]]]}];!function(){for(;a.length<6;)a.push(i(a.length));for(var t=[],r=["function dispatchLinearSolve(A,b){switch(A.length){"],n=0;n<6;++n)t.push("s"+n),r.push("case ",n,":return s",n,"(A,b);");r.push("}var s=CACHE[A.length];if(!s)s=CACHE[A.length]=g(A.length);return s(A,b)}return dispatchLinearSolve"),t.push("CACHE","g",r.join(""));var o=Function.apply(void 0,t);for(e.exports=o.apply(void 0,a.concat([a,i])),n=0;n<6;++n)e.exports[n]=a[n]}()},{"robust-determinant":544}],548:[function(t,e,r){"use strict";var n=t("two-product"),i=t("robust-sum"),a=t("robust-scale"),o=t("robust-subtract");function s(t,e){for(var r=new Array(t.length-1),n=1;n>1;return["sum(",l(t.slice(0,e)),",",l(t.slice(e)),")"].join("")}function c(t){if(2===t.length)return[["sum(prod(",t[0][0],",",t[1][1],"),prod(-",t[0][1],",",t[1][0],"))"].join("")];for(var e=[],r=0;r0){if(a<=0)return o;n=i+a}else{if(!(i<0))return o;if(a>=0)return o;n=-(i+a)}var s=33306690738754716e-32*n;return o>=s||o<=-s?o:f(t,e,r)},function(t,e,r,n){var i=t[0]-n[0],a=e[0]-n[0],o=r[0]-n[0],s=t[1]-n[1],l=e[1]-n[1],c=r[1]-n[1],u=t[2]-n[2],f=e[2]-n[2],p=r[2]-n[2],d=a*c,g=o*l,m=o*s,v=i*c,y=i*l,x=a*s,b=u*(d-g)+f*(m-v)+p*(y-x),_=7771561172376103e-31*((Math.abs(d)+Math.abs(g))*Math.abs(u)+(Math.abs(m)+Math.abs(v))*Math.abs(f)+(Math.abs(y)+Math.abs(x))*Math.abs(p));return b>_||-b>_?b:h(t,e,r,n)}];function d(t){var e=p[t.length];return e||(e=p[t.length]=u(t.length)),e.apply(void 0,t)}!function(){for(;p.length<=5;)p.push(u(p.length));for(var t=[],r=["slow"],n=0;n<=5;++n)t.push("a"+n),r.push("o"+n);var i=["function getOrientation(",t.join(),"){switch(arguments.length){case 0:case 1:return 0;"];for(n=2;n<=5;++n)i.push("case ",n,":return o",n,"(",t.slice(0,n).join(),");");i.push("}var s=new Array(arguments.length);for(var i=0;i0&&o>0||a<0&&o<0)return!1;var s=n(r,t,e),l=n(i,t,e);if(s>0&&l>0||s<0&&l<0)return!1;if(0===a&&0===o&&0===s&&0===l)return function(t,e,r,n){for(var i=0;i<2;++i){var a=t[i],o=e[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],f=Math.min(c,u);if(Math.max(c,u)=n?(i=f,(l+=1)=n?(i=f,(l+=1)0?1:0}},{}],555:[function(t,e,r){"use strict";e.exports=function(t){return i(n(t))};var n=t("boundary-cells"),i=t("reduce-simplicial-complex")},{"boundary-cells":100,"reduce-simplicial-complex":533}],556:[function(t,e,r){"use strict";e.exports=function(t,e,r,s){r=r||0,"undefined"==typeof s&&(s=function(t){for(var e=t.length,r=0,n=0;n>1,v=E[2*m+1];","if(v===b){return m}","if(b0&&l.push(","),l.push("[");for(var n=0;n0&&l.push(","),l.push("B(C,E,c[",i[0],"],c[",i[1],"])")}l.push("]")}l.push(");")}}for(a=t+1;a>1;--a){a>1,s=a(t[o],e);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function u(t,e){for(var r=new Array(t.length),i=0,o=r.length;i=t.length||0!==a(t[m],s)););}return r}function f(t,e){if(e<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);e.push(c)}return s(e)},r.skeleton=f,r.boundary=function(t){for(var e=[],r=0,n=t.length;r>1:(t>>1)-1}function x(t){for(var e=v(t);;){var r=e,n=2*t+1,i=2*(t+1),a=t;if(n0;){var r=y(t);if(r>=0)if(e0){var t=k[0];return m(0,A-1),A-=1,x(0),t}return-1}function w(t,e){var r=k[t];return c[r]===e?t:(c[r]=-1/0,b(t),_(),c[r]=e,b((A+=1)-1))}function T(t){if(!u[t]){u[t]=!0;var e=s[t],r=l[t];s[r]>=0&&(s[r]=e),l[e]>=0&&(l[e]=r),M[e]>=0&&w(M[e],g(e)),M[r]>=0&&w(M[r],g(r))}}var k=[],M=new Array(a);for(f=0;f>1;f>=0;--f)x(f);for(;;){var S=_();if(S<0||c[S]>r)break;T(S)}var E=[];for(f=0;f=0&&r>=0&&e!==r){var n=M[e],i=M[r];n!==i&&L.push([n,i])}})),i.unique(i.normalize(L)),{positions:E,edges:L}};var n=t("robust-orientation"),i=t("simplicial-complex")},{"robust-orientation":548,"simplicial-complex":560}],563:[function(t,e,r){"use strict";e.exports=function(t,e){var r,a,o,s;if(e[0][0]e[1][0]))return i(e,t);r=e[1],a=e[0]}if(t[0][0]t[1][0]))return-i(t,e);o=t[1],s=t[0]}var l=n(r,a,s),c=n(r,a,o);if(l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;if(l=n(s,o,a),c=n(s,o,r),l<0){if(c<=0)return l}else if(l>0){if(c>=0)return l}else if(c)return c;return a[0]-s[0]};var n=t("robust-orientation");function i(t,e){var r,i,a,o;if(e[0][0]e[1][0])){var s=Math.min(t[0][1],t[1][1]),l=Math.max(t[0][1],t[1][1]),c=Math.min(e[0][1],e[1][1]),u=Math.max(e[0][1],e[1][1]);return lu?s-u:l-u}r=e[1],i=e[0]}t[0][1]0)if(e[0]!==o[1][0])r=t,t=t.right;else{if(l=c(t.right,e))return l;t=t.left}else{if(e[0]!==o[1][0])return t;var l;if(l=c(t.right,e))return l;t=t.left}}return r}function u(t,e,r,n){this.y=t,this.index=e,this.start=r,this.closed=n}function f(t,e,r,n){this.x=t,this.segment=e,this.create=r,this.index=n}s.prototype.castUp=function(t){var e=n.le(this.coordinates,t[0]);if(e<0)return-1;this.slabs[e];var r=c(this.slabs[e],t),i=-1;if(r&&(i=r.value),this.coordinates[e]===t[0]){var s=null;if(r&&(s=r.key),e>0){var u=c(this.slabs[e-1],t);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var f=this.horizontal[e];if(f.length>0){var h=n.ge(f,t[1],l);if(h=f.length)return i;p=f[h]}}if(p.start)if(s){var d=a(s[0],s[1],[t[0],p.y]);s[0][0]>s[1][0]&&(d=-d),d>0&&(i=p.index)}else i=p.index;else p.y!==t[1]&&(i=p.index)}}}return i}},{"./lib/order-segments":563,"binary-search-bounds":564,"functional-red-black-tree":247,"robust-orientation":548}],566:[function(t,e,r){"use strict";var n=t("robust-dot-product"),i=t("robust-sum");function a(t,e){var r=i(n(t,e),[e[e.length-1]]);return r[r.length-1]}function o(t,e,r,n){var i=-e/(n-e);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=t.length,s=new Array(o),l=0;l0||i>0&&u<0){var f=o(s,u,l,i);r.push(f),n.push(f.slice())}u<0?n.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),n.push(l.slice())),i=u}return{positive:r,negative:n}},e.exports.positive=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c>=0&&r.push(s.slice()),n=c}return r},e.exports.negative=function(t,e){for(var r=[],n=a(t[t.length-1],e),i=t[t.length-1],s=t[0],l=0;l0||n>0&&c<0)&&r.push(o(i,c,s,n)),c<=0&&r.push(s.slice()),n=c}return r}},{"robust-dot-product":545,"robust-sum":553}],567:[function(t,e,r){!function(){"use strict";var t={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function e(t){return i(o(t),arguments)}function n(t,r){return e.apply(null,[t].concat(r||[]))}function i(r,n){var i,a,o,s,l,c,u,f,h,p=1,d=r.length,g="";for(a=0;a=0),s.type){case"b":i=parseInt(i,10).toString(2);break;case"c":i=String.fromCharCode(parseInt(i,10));break;case"d":case"i":i=parseInt(i,10);break;case"j":i=JSON.stringify(i,null,s.width?parseInt(s.width):0);break;case"e":i=s.precision?parseFloat(i).toExponential(s.precision):parseFloat(i).toExponential();break;case"f":i=s.precision?parseFloat(i).toFixed(s.precision):parseFloat(i);break;case"g":i=s.precision?String(Number(i.toPrecision(s.precision))):parseFloat(i);break;case"o":i=(parseInt(i,10)>>>0).toString(8);break;case"s":i=String(i),i=s.precision?i.substring(0,s.precision):i;break;case"t":i=String(!!i),i=s.precision?i.substring(0,s.precision):i;break;case"T":i=Object.prototype.toString.call(i).slice(8,-1).toLowerCase(),i=s.precision?i.substring(0,s.precision):i;break;case"u":i=parseInt(i,10)>>>0;break;case"v":i=i.valueOf(),i=s.precision?i.substring(0,s.precision):i;break;case"x":i=(parseInt(i,10)>>>0).toString(16);break;case"X":i=(parseInt(i,10)>>>0).toString(16).toUpperCase()}t.json.test(s.type)?g+=i:(!t.number.test(s.type)||f&&!s.sign?h="":(h=f?"+":"-",i=i.toString().replace(t.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",u=s.width-(h+i).length,l=s.width&&u>0?c.repeat(u):"",g+=s.align?h+i+l:"0"===c?h+l+i:l+h+i)}return g}var a=Object.create(null);function o(e){if(a[e])return a[e];for(var r,n=e,i=[],o=0;n;){if(null!==(r=t.text.exec(n)))i.push(r[0]);else if(null!==(r=t.modulo.exec(n)))i.push("%");else{if(null===(r=t.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(r[2]){o|=1;var s=[],l=r[2],c=[];if(null===(c=t.key.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(c[1]);""!==(l=l.substring(c[0].length));)if(null!==(c=t.key_access.exec(l)))s.push(c[1]);else{if(null===(c=t.index_access.exec(l)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}r[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:r[0],param_no:r[1],keys:r[2],sign:r[3],pad_char:r[4],align:r[5],width:r[6],precision:r[7],type:r[8]})}n=n.substring(r[0].length)}return a[e]=i}"undefined"!=typeof r&&(r.sprintf=e,r.vsprintf=n),"undefined"!=typeof window&&(window.sprintf=e,window.vsprintf=n)}()},{}],568:[function(t,e,r){"use strict";var n=t("parenthesis");e.exports=function(t,e,r){if(null==t)throw Error("First argument should be a string");if(null==e)throw Error("Separator should be a string or a RegExp");r?("string"==typeof r||Array.isArray(r))&&(r={ignore:r}):r={},null==r.escape&&(r.escape=!0),null==r.ignore?r.ignore=["[]","()","{}","<>",'""',"''","``","\u201c\u201d","\xab\xbb"]:("string"==typeof r.ignore&&(r.ignore=[r.ignore]),r.ignore=r.ignore.map((function(t){return 1===t.length&&(t+=t),t})));var i=n.parse(t,{flat:!0,brackets:r.ignore}),a=i[0].split(e);if(r.escape){for(var o=[],s=0;s0;){e=c[c.length-1];var p=t[e];if(a[e]=0&&s[e].push(o[g])}a[e]=d}else{if(n[e]===r[e]){var m=[],v=[],y=0;for(d=l.length-1;d>=0;--d){var x=l[d];if(i[x]=!1,m.push(x),v.push(s[x]),y+=s[x].length,o[x]=f.length,x===e){l.length=d;break}}f.push(m);var b=new Array(y);for(d=0;d c)|0 },"),"generic"===e&&a.push("getters:[0],");for(var s=[],l=[],c=0;c>>7){");for(c=0;c<1<<(1<128&&c%128==0){f.length>0&&h.push("}}");var p="vExtra"+f.length;a.push("case ",c>>>7,":",p,"(m&0x7f,",l.join(),");break;"),h=["function ",p,"(m,",l.join(),"){switch(m){"],f.push(h)}h.push("case ",127&c,":");for(var d=new Array(r),g=new Array(r),m=new Array(r),v=new Array(r),y=0,x=0;xx)&&!(c&1<<_)!=!(c&1<0&&(M="+"+m[b]+"*c");var A=d[b].length/y*.5,S=.5+v[b]/y*.5;k.push("d"+b+"-"+S+"-"+A+"*("+d[b].join("+")+M+")/("+g[b].join("+")+")")}h.push("a.push([",k.join(),"]);","break;")}a.push("}},"),f.length>0&&h.push("}}");var E=[];for(c=0;c<1<1&&(i=1),i<-1&&(i=-1),(t*n-e*r<0?-1:1)*Math.acos(i)};r.default=function(t){var e=t.px,r=t.py,l=t.cx,c=t.cy,u=t.rx,f=t.ry,h=t.xAxisRotation,p=void 0===h?0:h,d=t.largeArcFlag,g=void 0===d?0:d,m=t.sweepFlag,v=void 0===m?0:m,y=[];if(0===u||0===f)return[];var x=Math.sin(p*i/360),b=Math.cos(p*i/360),_=b*(e-l)/2+x*(r-c)/2,w=-x*(e-l)/2+b*(r-c)/2;if(0===_&&0===w)return[];u=Math.abs(u),f=Math.abs(f);var T=Math.pow(_,2)/Math.pow(u,2)+Math.pow(w,2)/Math.pow(f,2);T>1&&(u*=Math.sqrt(T),f*=Math.sqrt(T));var k=function(t,e,r,n,a,o,l,c,u,f,h,p){var d=Math.pow(a,2),g=Math.pow(o,2),m=Math.pow(h,2),v=Math.pow(p,2),y=d*g-d*v-g*m;y<0&&(y=0),y/=d*v+g*m;var x=(y=Math.sqrt(y)*(l===c?-1:1))*a/o*p,b=y*-o/a*h,_=f*x-u*b+(t+r)/2,w=u*x+f*b+(e+n)/2,T=(h-x)/a,k=(p-b)/o,M=(-h-x)/a,A=(-p-b)/o,S=s(1,0,T,k),E=s(T,k,M,A);return 0===c&&E>0&&(E-=i),1===c&&E<0&&(E+=i),[_,w,S,E]}(e,r,l,c,u,f,g,v,x,b,_,w),M=n(k,4),A=M[0],S=M[1],E=M[2],C=M[3],L=Math.abs(C)/(i/4);Math.abs(1-L)<1e-7&&(L=1);var I=Math.max(Math.ceil(L),1);C/=I;for(var P=0;Pe[2]&&(e[2]=c[u+0]),c[u+1]>e[3]&&(e[3]=c[u+1]);return e}},{"abs-svg-path":65,assert:73,"is-svg-path":471,"normalize-svg-path":573,"parse-svg-path":505}],573:[function(t,e,r){"use strict";e.exports=function(t){for(var e,r=[],o=0,s=0,l=0,c=0,u=null,f=null,h=0,p=0,d=0,g=t.length;d4?(o=m[m.length-4],s=m[m.length-3]):(o=h,s=p),r.push(m)}return r};var n=t("svg-arc-to-cubic-bezier");function i(t,e,r,n){return["C",t,e,r,n,r,n]}function a(t,e,r,n,i,a){return["C",t/3+2/3*r,e/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}},{"svg-arc-to-cubic-bezier":571}],574:[function(t,e,r){"use strict";var n,i=t("svg-path-bounds"),a=t("parse-svg-path"),o=t("draw-svg-path"),s=t("is-svg-path"),l=t("bitmap-sdf"),c=document.createElement("canvas"),u=c.getContext("2d");e.exports=function(t,e){if(!s(t))throw Error("Argument should be valid svg path string");e||(e={});var r,f;e.shape?(r=e.shape[0],f=e.shape[1]):(r=c.width=e.w||e.width||200,f=c.height=e.h||e.height||200);var h=Math.min(r,f),p=e.stroke||0,d=e.viewbox||e.viewBox||i(t),g=[r/(d[2]-d[0]),f/(d[3]-d[1])],m=Math.min(g[0]||0,g[1]||0)/2;u.fillStyle="black",u.fillRect(0,0,r,f),u.fillStyle="white",p&&("number"!=typeof p&&(p=1),u.strokeStyle=p>0?"white":"black",u.lineWidth=Math.abs(p));if(u.translate(.5*r,.5*f),u.scale(m,m),function(){if(null!=n)return n;var t=document.createElement("canvas").getContext("2d");if(t.canvas.width=t.canvas.height=1,!window.Path2D)return n=!1;var e=new Path2D("M0,0h1v1h-1v-1Z");t.fillStyle="black",t.fill(e);var r=t.getImageData(0,0,1,1);return n=r&&r.data&&255===r.data[3]}()){var v=new Path2D(t);u.fill(v),p&&u.stroke(v)}else{var y=a(t);o(u,y),u.fill(),p&&u.stroke()}return u.setTransform(1,0,0,1,0,0),l(u,{cutoff:null!=e.cutoff?e.cutoff:.5,radius:null!=e.radius?e.radius:.5*h})}},{"bitmap-sdf":98,"draw-svg-path":174,"is-svg-path":471,"parse-svg-path":505,"svg-path-bounds":572}],575:[function(t,e,r){(function(r){(function(){"use strict";e.exports=function t(e,r,i){i=i||{};var o=a[e];o||(o=a[e]={" ":{data:new Float32Array(0),shape:.2}});var s=o[r];if(!s)if(r.length<=1||!/\d/.test(r))s=o[r]=function(t){for(var e=t.cells,r=t.positions,n=new Float32Array(6*e.length),i=0,a=0,o=0;o0&&(f+=.02);var p=new Float32Array(u),d=0,g=-.5*f;for(h=0;h1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=L(t,360),e=L(e,100),r=L(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,l=2*r-s;n=o(l,s,t+1/3),i=o(l,s,t),a=o(l,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(e.h,l,u),f=!0,h="hsl"),e.hasOwnProperty("a")&&(a=e.a));var p,d,g;return a=C(a),{ok:f,format:e.format||h,r:o(255,s(i.r,0)),g:o(255,s(i.g,0)),b:o(255,s(i.b,0)),a:a}}(e);this._originalInput=e,this._r=u.r,this._g=u.g,this._b=u.b,this._a=u.a,this._roundA=a(100*this._a)/100,this._format=l.format||u.format,this._gradientType=l.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=u.ok,this._tc_id=i++}function u(t,e,r){t=L(t,255),e=L(e,255),r=L(r,255);var n,i,a=s(t,e,r),l=o(t,e,r),c=(a+l)/2;if(a==l)n=i=0;else{var u=a-l;switch(i=c>.5?u/(2-a-l):u/(a+l),a){case t:n=(e-r)/u+(e>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function A(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var e,r,n,i=this.toRgb();return e=i.r/255,r=i.g/255,n=i.b/255,.2126*(e<=.03928?e/12.92:t.pow((e+.055)/1.055,2.4))+.7152*(r<=.03928?r/12.92:t.pow((r+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:t.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=C(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=u(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=u(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),n=a(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var o=[z(a(t).toString(16)),z(a(e).toString(16)),z(a(r).toString(16)),z(D(n))];if(i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*L(this._r,255))+"%",g:a(100*L(this._g,255))+"%",b:a(100*L(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*L(this._r,255))+"%, "+a(100*L(this._g,255))+"%, "+a(100*L(this._b,255))+"%)":"rgba("+a(100*L(this._r,255))+"%, "+a(100*L(this._g,255))+"%, "+a(100*L(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+p(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);r="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(x,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(M,arguments)},complement:function(){return this._applyCombination(_,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(T,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:O(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),i=c(e).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(e,r){var n=c(e),i=c(r);return(t.max(n.getLuminance(),i.getLuminance())+.05)/(t.min(n.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,i,a=c.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},c.mostReadable=function(t,e,r){var n,i,a,o,s=null,l=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;ul&&(l=n,s=c(e[u]));return c.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],r))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(S);function C(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function L(e,r){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(e)&&(e="100%");var n=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(e);return e=o(r,s(0,parseFloat(e))),n&&(e=parseInt(e*r,10)/100),t.abs(e-r)<1e-6?1:e%r/parseFloat(r)}function I(t){return o(1,s(0,t))}function P(t){return parseInt(t,16)}function z(t){return 1==t.length?"0"+t:""+t}function O(t){return t<=1&&(t=100*t+"%"),t}function D(e){return t.round(255*parseFloat(e)).toString(16)}function R(t){return P(t)/255}var F,B,N,j=(B="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",N="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+B),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+B),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+B),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function U(t){return!!j.CSS_UNIT.exec(t)}"undefined"!=typeof e&&e.exports?e.exports=c:window.tinycolor=c}(Math)},{}],577:[function(t,e,r){"use strict";e.exports=i,e.exports.float32=e.exports.float=i,e.exports.fract32=e.exports.fract=function(t){if(t.length){for(var e=i(t),r=0,n=e.length;ro&&(o=t[0]),t[1]s&&(s=t[1])}function c(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(c);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}for(e in t.arcs.forEach((function(t){for(var e,r=-1,l=t.length;++ro&&(o=e[0]),e[1]s&&(s=e[1])})),t.objects)c(t.objects[e]);return[i,a,o,s]}function i(t,e){var r=e.id,n=e.bbox,i=null==e.properties?{}:e.properties,o=a(t,e);return null==r&&null==n?{type:"Feature",properties:i,geometry:o}:null==n?{type:"Feature",id:r,properties:i,geometry:o}:{type:"Feature",id:r,bbox:n,properties:i,geometry:o}}function a(t,e){var n=r(t.transform),i=t.arcs;function a(t,e){e.length&&e.pop();for(var r=i[t<0?~t:t],a=0,o=r.length;a1)n=l(t,e,r);else for(i=0,n=new Array(a=t.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i})).filter((function(t){return t.length>0}))}}function u(t,e){for(var r=0,n=t.length;r>>1;t[i]=2))throw new Error("n must be \u22652");var r,i=(l=t.bbox||n(t))[0],a=l[1],o=l[2],s=l[3];e={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,u=f(e),h=t.objects,p={};function d(t){return u(t)}function g(t){var e;switch(t.type){case"GeometryCollection":e={type:"GeometryCollection",geometries:t.geometries.map(g)};break;case"Point":e={type:"Point",coordinates:d(t.coordinates)};break;case"MultiPoint":e={type:"MultiPoint",coordinates:t.coordinates.map(d)};break;default:return t}return null!=t.id&&(e.id=t.id),null!=t.bbox&&(e.bbox=t.bbox),null!=t.properties&&(e.properties=t.properties),e}for(c in h)p[c]=g(h[c]);return{type:"Topology",bbox:l,transform:e,objects:p,arcs:t.arcs.map((function(t){var e,r=0,n=1,i=t.length,a=new Array(i);for(a[0]=u(t[0],0);++rMath.max(r,n)?i[2]=1:r>Math.max(e,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=t[l]*t[l],o+=i[l]*t[l];for(l=0;l<3;++l)i[l]-=o/a*t[l];return s(i,i),i}function h(t,e,r,i,a,o,s,l){this.center=n(r),this.up=n(i),this.right=n(a),this.radius=n([o]),this.angle=n([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(t,e),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var p=h.prototype;p.setDistanceLimits=function(t,e){t=t>0?Math.log(t):-1/0,e=e>0?Math.log(e):1/0,e=Math.max(e,t),this.radius.bounds[0][0]=t,this.radius.bounds[1][0]=e},p.getDistanceLimits=function(t){var e=this.radius.bounds[0];return t?(t[0]=Math.exp(e[0][0]),t[1]=Math.exp(e[1][0]),t):[Math.exp(e[0][0]),Math.exp(e[1][0])]},p.recalcMatrix=function(t){this.center.curve(t),this.up.curve(t),this.right.curve(t),this.radius.curve(t),this.angle.curve(t);for(var e=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=e[a]*r[a],n+=e[a]*e[a];var l=Math.sqrt(n),u=0;for(a=0;a<3;++a)r[a]-=e[a]*i/n,u+=r[a]*r[a],e[a]/=l;var f=Math.sqrt(u);for(a=0;a<3;++a)r[a]/=f;var h=this.computedToward;o(h,e,r),s(h,h);var p=Math.exp(this.computedRadius[0]),d=this.computedAngle[0],g=this.computedAngle[1],m=Math.cos(d),v=Math.sin(d),y=Math.cos(g),x=Math.sin(g),b=this.computedCenter,_=m*y,w=v*y,T=x,k=-m*x,M=-v*x,A=y,S=this.computedEye,E=this.computedMatrix;for(a=0;a<3;++a){var C=_*r[a]+w*h[a]+T*e[a];E[4*a+1]=k*r[a]+M*h[a]+A*e[a],E[4*a+2]=C,E[4*a+3]=0}var L=E[1],I=E[5],P=E[9],z=E[2],O=E[6],D=E[10],R=I*D-P*O,F=P*z-L*D,B=L*O-I*z,N=c(R,F,B);R/=N,F/=N,B/=N,E[0]=R,E[4]=F,E[8]=B;for(a=0;a<3;++a)S[a]=b[a]+E[2+4*a]*p;for(a=0;a<3;++a){u=0;for(var j=0;j<3;++j)u+=E[a+4*j]*S[j];E[12+a]=-u}E[15]=1},p.getMatrix=function(t,e){this.recalcMatrix(t);var r=this.computedMatrix;if(e){for(var n=0;n<16;++n)e[n]=r[n];return e}return r};var d=[0,0,0];p.rotate=function(t,e,r,n){if(this.angle.move(t,e,r),n){this.recalcMatrix(t);var i=this.computedMatrix;d[0]=i[2],d[1]=i[6],d[2]=i[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)i[4*c]=o[c],i[4*c+1]=s[c],i[4*c+2]=l[c];a(i,i,n,d);for(c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(t,o[0],o[1],o[2]),this.right.set(t,s[0],s[1],s[2])}},p.pan=function(t,e,r,n){e=e||0,r=r||0,n=n||0,this.recalcMatrix(t);var i=this.computedMatrix,a=(Math.exp(this.computedRadius[0]),i[1]),o=i[5],s=i[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=i[0],f=i[4],h=i[8],p=u*a+f*o+h*s,d=c(u-=a*p,f-=o*p,h-=s*p),g=(u/=d)*e+a*r,m=(f/=d)*e+o*r,v=(h/=d)*e+s*r;this.center.move(t,g,m,v);var y=Math.exp(this.computedRadius[0]);y=Math.max(1e-4,y+n),this.radius.set(t,Math.log(y))},p.translate=function(t,e,r,n){this.center.move(t,e||0,r||0,n||0)},p.setMatrix=function(t,e,r,n){var a=1;"number"==typeof r&&(a=0|r),(a<0||a>3)&&(a=1);var o=(a+2)%3;e||(this.recalcMatrix(t),e=this.computedMatrix);var s=e[a],l=e[a+4],f=e[a+8];if(n){var h=Math.abs(s),p=Math.abs(l),d=Math.abs(f),g=Math.max(h,p,d);h===g?(s=s<0?-1:1,l=f=0):d===g?(f=f<0?-1:1,s=l=0):(l=l<0?-1:1,s=f=0)}else{var m=c(s,l,f);s/=m,l/=m,f/=m}var v,y,x=e[o],b=e[o+4],_=e[o+8],w=x*s+b*l+_*f,T=c(x-=s*w,b-=l*w,_-=f*w),k=l*(_/=T)-f*(b/=T),M=f*(x/=T)-s*_,A=s*b-l*x,S=c(k,M,A);if(k/=S,M/=S,A/=S,this.center.jump(t,H,G,Y),this.radius.idle(t),this.up.jump(t,s,l,f),this.right.jump(t,x,b,_),2===a){var E=e[1],C=e[5],L=e[9],I=E*x+C*b+L*_,P=E*k+C*M+L*A;v=R<0?-Math.PI/2:Math.PI/2,y=Math.atan2(P,I)}else{var z=e[2],O=e[6],D=e[10],R=z*s+O*l+D*f,F=z*x+O*b+D*_,B=z*k+O*M+D*A;v=Math.asin(u(R)),y=Math.atan2(B,F)}this.angle.jump(t,y,v),this.recalcMatrix(t);var N=e[2],j=e[6],U=e[10],V=this.computedMatrix;i(V,e);var q=V[15],H=V[12]/q,G=V[13]/q,Y=V[14]/q,W=Math.exp(this.computedRadius[0]);this.center.jump(t,H-N*W,G-j*W,Y-U*W)},p.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},p.idle=function(t){this.center.idle(t),this.up.idle(t),this.right.idle(t),this.radius.idle(t),this.angle.idle(t)},p.flush=function(t){this.center.flush(t),this.up.flush(t),this.right.flush(t),this.radius.flush(t),this.angle.flush(t)},p.setDistance=function(t,e){e>0&&this.radius.set(t,Math.log(e))},p.lookAt=function(t,e,r,n){this.recalcMatrix(t),e=e||this.computedEye,r=r||this.computedCenter;var i=(n=n||this.computedUp)[0],a=n[1],o=n[2],s=c(i,a,o);if(!(s<1e-6)){i/=s,a/=s,o/=s;var l=e[0]-r[0],f=e[1]-r[1],h=e[2]-r[2],p=c(l,f,h);if(!(p<1e-6)){l/=p,f/=p,h/=p;var d=this.computedRight,g=d[0],m=d[1],v=d[2],y=i*g+a*m+o*v,x=c(g-=y*i,m-=y*a,v-=y*o);if(!(x<.01&&(x=c(g=a*h-o*f,m=o*l-i*h,v=i*f-a*l))<1e-6)){g/=x,m/=x,v/=x,this.up.set(t,i,a,o),this.right.set(t,g,m,v),this.center.set(t,r[0],r[1],r[2]),this.radius.set(t,Math.log(p));var b=a*v-o*m,_=o*g-i*v,w=i*m-a*g,T=c(b,_,w),k=i*l+a*f+o*h,M=g*l+m*f+v*h,A=(b/=T)*l+(_/=T)*f+(w/=T)*h,S=Math.asin(u(k)),E=Math.atan2(A,M),C=this.angle._state,L=C[C.length-1],I=C[C.length-2];L%=2*Math.PI;var P=Math.abs(L+2*Math.PI-E),z=Math.abs(L-E),O=Math.abs(L-2*Math.PI-E);P":(e.length>100&&(e=e.slice(0,99)+"\u2026"),e=e.replace(i,(function(t){switch(t){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}})))}},{"./safe-to-string":586}],588:[function(t,e,r){"use strict";var n=t("../value/is"),i={object:!0,function:!0,undefined:!0};e.exports=function(t){return!!n(t)&&hasOwnProperty.call(i,typeof t)}},{"../value/is":594}],589:[function(t,e,r){"use strict";var n=t("../lib/resolve-exception"),i=t("./is");e.exports=function(t){return i(t)?t:n(t,"%v is not a plain function",arguments[1])}},{"../lib/resolve-exception":585,"./is":590}],590:[function(t,e,r){"use strict";var n=t("../function/is"),i=/^\s*class[\s{/}]/,a=Function.prototype.toString;e.exports=function(t){return!!n(t)&&!i.test(a.call(t))}},{"../function/is":584}],591:[function(t,e,r){"use strict";var n=t("../object/is");e.exports=function(t){if(!n(t))return!1;try{return!!t.constructor&&t.constructor.prototype===t}catch(t){return!1}}},{"../object/is":588}],592:[function(t,e,r){"use strict";var n=t("../value/is"),i=t("../object/is"),a=Object.prototype.toString;e.exports=function(t){if(!n(t))return null;if(i(t)){var e=t.toString;if("function"!=typeof e)return null;if(e===a)return null}try{return""+t}catch(t){return null}}},{"../object/is":588,"../value/is":594}],593:[function(t,e,r){"use strict";var n=t("../lib/resolve-exception"),i=t("./is");e.exports=function(t){return i(t)?t:n(t,"Cannot use %v",arguments[1])}},{"../lib/resolve-exception":585,"./is":594}],594:[function(t,e,r){"use strict";e.exports=function(t){return null!=t}},{}],595:[function(t,e,r){(function(e){(function(){"use strict";var n=t("bit-twiddle"),i=t("dup"),a=t("buffer").Buffer;e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:i([32,0]),UINT16:i([32,0]),UINT32:i([32,0]),BIGUINT64:i([32,0]),INT8:i([32,0]),INT16:i([32,0]),INT32:i([32,0]),BIGINT64:i([32,0]),FLOAT:i([32,0]),DOUBLE:i([32,0]),DATA:i([32,0]),UINT8C:i([32,0]),BUFFER:i([32,0])});var o="undefined"!=typeof Uint8ClampedArray,s="undefined"!=typeof BigUint64Array,l="undefined"!=typeof BigInt64Array,c=e.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,f=c.BUFFER;function h(t){if(t){var e=t.length||t.byteLength,r=n.log2(e);u[r].push(t)}}function p(t){t=n.nextPow2(t);var e=n.log2(t),r=u[e];return r.length>0?r.pop():new ArrayBuffer(t)}function d(t){return new Uint8Array(p(t),0,t)}function g(t){return new Uint16Array(p(2*t),0,t)}function m(t){return new Uint32Array(p(4*t),0,t)}function v(t){return new Int8Array(p(t),0,t)}function y(t){return new Int16Array(p(2*t),0,t)}function x(t){return new Int32Array(p(4*t),0,t)}function b(t){return new Float32Array(p(4*t),0,t)}function _(t){return new Float64Array(p(8*t),0,t)}function w(t){return o?new Uint8ClampedArray(p(t),0,t):d(t)}function T(t){return s?new BigUint64Array(p(8*t),0,t):null}function k(t){return l?new BigInt64Array(p(8*t),0,t):null}function M(t){return new DataView(p(t),0,t)}function A(t){t=n.nextPow2(t);var e=n.log2(t),r=f[e];return r.length>0?r.pop():new a(t)}r.free=function(t){if(a.isBuffer(t))f[n.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,r=0|n.log2(e);u[r].push(t)}},r.freeUint8=r.freeUint16=r.freeUint32=r.freeBigUint64=r.freeInt8=r.freeInt16=r.freeInt32=r.freeBigInt64=r.freeFloat32=r.freeFloat=r.freeFloat64=r.freeDouble=r.freeUint8Clamped=r.freeDataView=function(t){h(t.buffer)},r.freeArrayBuffer=h,r.freeBuffer=function(t){f[n.log2(t.length)].push(t)},r.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return p(t);switch(e){case"uint8":return d(t);case"uint16":return g(t);case"uint32":return m(t);case"int8":return v(t);case"int16":return y(t);case"int32":return x(t);case"float":case"float32":return b(t);case"double":case"float64":return _(t);case"uint8_clamped":return w(t);case"bigint64":return k(t);case"biguint64":return T(t);case"buffer":return A(t);case"data":case"dataview":return M(t);default:return null}return null},r.mallocArrayBuffer=p,r.mallocUint8=d,r.mallocUint16=g,r.mallocUint32=m,r.mallocInt8=v,r.mallocInt16=y,r.mallocInt32=x,r.mallocFloat32=r.mallocFloat=b,r.mallocFloat64=r.mallocDouble=_,r.mallocUint8Clamped=w,r.mallocBigUint64=T,r.mallocBigInt64=k,r.mallocDataView=M,r.mallocBuffer=A,r.clearCache=function(){for(var t=0;t<32;++t)c.UINT8[t].length=0,c.UINT16[t].length=0,c.UINT32[t].length=0,c.INT8[t].length=0,c.INT16[t].length=0,c.INT32[t].length=0,c.FLOAT[t].length=0,c.DOUBLE[t].length=0,c.BIGUINT64[t].length=0,c.BIGINT64[t].length=0,c.UINT8C[t].length=0,u[t].length=0,f[t].length=0}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"bit-twiddle":97,buffer:111,dup:176}],596:[function(t,e,r){"use strict";function n(t){this.roots=new Array(t),this.ranks=new Array(t);for(var e=0;e0&&(a=n.size),n.lineSpacing&&n.lineSpacing>0&&(o=n.lineSpacing),n.styletags&&n.styletags.breaklines&&(s.breaklines=!!n.styletags.breaklines),n.styletags&&n.styletags.bolds&&(s.bolds=!!n.styletags.bolds),n.styletags&&n.styletags.italics&&(s.italics=!!n.styletags.italics),n.styletags&&n.styletags.subscripts&&(s.subscripts=!!n.styletags.subscripts),n.styletags&&n.styletags.superscripts&&(s.superscripts=!!n.styletags.superscripts));return r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter((function(t){return t})).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",h(function(t,e,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,"\n"):r.replace(/\/g," ");var s="",l=[];for(p=0;p-1?parseInt(t[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(S(),"?px "),m*=Math.pow(.75,l-s),n=n.replace("?px ",S())),g+=.25*x*(l-s)}if(!0===o.superscripts){var c=t.indexOf("+"),u=r.indexOf("+"),f=c>-1?parseInt(t[1+c]):0,h=u>-1?parseInt(r[1+u]):0;f!==h&&(n=n.replace(S(),"?px "),m*=Math.pow(.75,h-f),n=n.replace("?px ",S())),g-=.25*x*(h-f)}if(!0===o.bolds){var p=t.indexOf("b|")>-1,d=r.indexOf("b|")>-1;!p&&d&&(n=v?n.replace("italic ","italic bold "):"bold "+n),p&&!d&&(n=n.replace("bold ",""))}if(!0===o.italics){var v=t.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!v&&y&&(n="italic "+n),v&&!y&&(n=n.replace("italic ",""))}e.font=n}for(h=0;h",a="",o=i.length,s=a.length,l="+"===e[0]||"-"===e[0],c=0,u=-s;c>-1&&-1!==(c=r.indexOf(i,c))&&-1!==(u=r.indexOf(a,c+o))&&!(u<=c);){for(var f=c;f=u)n[f]=null,r=r.substr(0,f)+" "+r.substr(f+1);else if(null!==n[f]){var h=n[f].indexOf(e[0]);-1===h?n[f]+=e:l&&(n[f]=n[f].substr(0,h+1)+(1+parseInt(n[f][h+1]))+n[f].substr(h+2))}var p=c+o,d=r.substr(p,u-p).indexOf(i);c=-1!==d?d:u+s}return n}function u(t,e){var r=n(t,128);return e?a(r.cells,r.positions,.25):{edges:r.cells,positions:r.positions}}function f(t,e,r,n){var i=u(t,n),a=function(t,e,r){for(var n=e.textAlign||"start",i=e.textBaseline||"alphabetic",a=[1<<30,1<<30],o=[0,0],s=t.length,l=0;l=0?e[a]:i}))},has___:{value:y((function(e){var n=v(e);return n?r in n:t.indexOf(e)>=0}))},set___:{value:y((function(n,i){var a,o=v(n);return o?o[r]=i:(a=t.indexOf(n))>=0?e[a]=i:(a=t.length,e[a]=i,t[a]=n),this}))},delete___:{value:y((function(n){var i,a,o=v(n);return o?r in o&&delete o[r]:!((i=t.indexOf(n))<0)&&(a=t.length-1,t[i]=void 0,e[i]=e[a],t[i]=t[a],t.length=a,e.length=a,!0)}))}})};d.prototype=Object.create(Object.prototype,{get:{value:function(t,e){return this.get___(t,e)},writable:!0,configurable:!0},has:{value:function(t){return this.has___(t)},writable:!0,configurable:!0},set:{value:function(t,e){return this.set___(t,e)},writable:!0,configurable:!0},delete:{value:function(t){return this.delete___(t)},writable:!0,configurable:!0}}),"function"==typeof r?function(){function n(){this instanceof d||x();var e,n=new r,i=void 0,a=!1;return e=t?function(t,e){return n.set(t,e),n.has(t)||(i||(i=new d),i.set(t,e)),this}:function(t,e){if(a)try{n.set(t,e)}catch(r){i||(i=new d),i.set___(t,e)}else n.set(t,e);return this},Object.create(d.prototype,{get___:{value:y((function(t,e){return i?n.has(t)?n.get(t):i.get___(t,e):n.get(t,e)}))},has___:{value:y((function(t){return n.has(t)||!!i&&i.has___(t)}))},set___:{value:y(e)},delete___:{value:y((function(t){var e=!!n.delete(t);return i&&i.delete___(t)||e}))},permitHostObjects___:{value:y((function(t){if(t!==g)throw new Error("bogus call to permitHostObjects___");a=!0}))}})}t&&"undefined"!=typeof Proxy&&(Proxy=void 0),n.prototype=d.prototype,e.exports=n,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("undefined"!=typeof Proxy&&(Proxy=void 0),e.exports=d)}function g(t){t.permitHostObjects___&&t.permitHostObjects___(g)}function m(t){return!("weakmap:"==t.substr(0,"weakmap:".length)&&"___"===t.substr(t.length-3))}function v(t){if(t!==Object(t))throw new TypeError("Not an object: "+t);var e=t[l];if(e&&e.key===t)return e;if(s(t)){e={key:t};try{return o(t,l,{value:e,writable:!1,enumerable:!1,configurable:!1}),e}catch(t){return}}}function y(t){return t.prototype=null,Object.freeze(t)}function x(){h||"undefined"==typeof console||(h=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},{}],603:[function(t,e,r){var n=t("./hidden-store.js");e.exports=function(){var t={};return function(e){if(("object"!=typeof e||null===e)&&"function"!=typeof e)throw new Error("Weakmap-shim: Key must be object");var r=e.valueOf(t);return r&&r.identity===t?r:n(e,t)}}},{"./hidden-store.js":604}],604:[function(t,e,r){e.exports=function(t,e){var r={identity:e},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(t){return t!==e?n.apply(this,arguments):r},writable:!0}),r}},{}],605:[function(t,e,r){var n=t("./create-store.js");e.exports=function(){var t=n();return{get:function(e,r){var n=t(e);return n.hasOwnProperty("value")?n.value:r},set:function(e,r){return t(e).value=r,this},has:function(e){return"value"in t(e)},delete:function(e){return delete t(e).value}}}},{"./create-store.js":603}],606:[function(t,e,r){var n=t("get-canvas-context");e.exports=function(t){return n("webgl",t)}},{"get-canvas-context":249}],607:[function(t,e,r){var n=t("../main"),i=t("object-assign"),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(t,e){if("string"==typeof t){var r=t.match(l);return r?r[0]:""}var n=this._validateYear(t),i=t.month(),a=""+this.toChineseMonth(n,i);return e&&a.length<2&&(a="0"+a),this.isIntercalaryMonth(n,i)&&(a+="i"),a},monthNames:function(t){if("string"==typeof t){var e=t.match(c);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="\u95f0"+i),i},monthNamesShort:function(t){if("string"==typeof t){var e=t.match(u);return e?e[0]:""}var r=this._validateYear(t),n=t.month(),i=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="\u95f0"+i),i},parseMonth:function(t,e){t=this._validateYear(t);var r,n=parseInt(e);if(isNaN(n))"\u95f0"===e[0]&&(r=!0,e=e.substring(1)),"\u6708"===e[e.length-1]&&(e=e.substring(0,e.length-1)),n=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(e);else{var i=e[e.length-1];r="i"===i||"I"===i}return this.toMonthIndex(t,n,r)},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},_validateYear:function(t,e){if(t.year&&(t=t.year()),"number"!=typeof t||t<1888||t>2111)throw e.replace(/\{0\}/,this.local.name);return t},toMonthIndex:function(t,e,r){var i=this.intercalaryMonth(t);if(r&&e!==i||e<1||e>12)throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!r&&e<=i?e-1:e:e-1},toChineseMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);if(e<0||e>(r?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r?e>13},isIntercalaryMonth:function(t,e){t.year&&(e=(t=t.year()).month());var r=this.intercalaryMonth(t);return!!r&&r===e},leapYear:function(t){return 0!==this.intercalaryMonth(t)},weekOfYear:function(t,e,r){var i,o=this._validateYear(t,n.local.invalidyear),s=h[o-h[0]],l=s>>9&4095,c=s>>5&15,u=31&s;(i=a.newDate(l,c,u)).add(4-(i.dayOfWeek()||7),"d");var f=this.toJD(t,e,r)-i.toJD();return 1+Math.floor(f/7)},monthsInYear:function(t){return this.leapYear(t)?13:12},daysInMonth:function(t,e){t.year&&(e=t.month(),t=t.year()),t=this._validateYear(t);var r=f[t-f[0]];if(e>(r>>13?12:11))throw n.local.invalidMonth.replace(/\{0\}/,this.local.name);return r&1<<12-e?30:29},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,s,r,n.local.invalidDate);t=this._validateYear(i.year()),e=i.month(),r=i.day();var o=this.isIntercalaryMonth(t,e),s=this.toChineseMonth(t,e),l=function(t,e,r,n,i){var a,o,s;if("object"==typeof t)o=t,a=e||{};else{var l;if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof n?(l=!1,a=n):(l=!!n,a=i||{}),o={year:t,month:e,day:r,isIntercalary:l}}s=o.day-1;var c,u=f[o.year-f[0]],p=u>>13;c=p&&(o.month>p||o.isIntercalary)?o.month:o.month-1;for(var d=0;d>9&4095,(g>>5&15)-1,(31&g)+s);return a.year=m.getFullYear(),a.month=1+m.getMonth(),a.day=m.getDate(),a}(t,s,r,o);return a.toJD(l.year,l.month,l.day)},fromJD:function(t){var e=a.fromJD(t),r=function(t,e,r,n){var i,a;if("object"==typeof t)i=t,a=e||{};else{if(!("number"==typeof t&&t>=1888&&t<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof e&&e>=1&&e<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw new Error("Solar day outside range 1 - 31");i={year:t,month:e,day:r},a=n||{}}var o=h[i.year-h[0]],s=i.year<<9|i.month<<5|i.day;a.year=s>=o?i.year:i.year-1,o=h[a.year-h[0]];var l,c=new Date(o>>9&4095,(o>>5&15)-1,31&o),u=new Date(i.year,i.month-1,i.day);l=Math.round((u-c)/864e5);var p,d=f[a.year-f[0]];for(p=0;p<13;p++){var g=d&1<<12-p?30:29;if(l>13;!m||p=2&&n<=6},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{century:o[Math.floor((i.year()-1)/100)+1]||""}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year()+(i.year()<0?1:0),e=i.month(),(r=i.day())+(e>1?16:0)+(e>2?32*(e-2):0)+400*(t-1)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t+.5)-Math.floor(this.jdEpoch)-1;var e=Math.floor(t/400)+1;t-=400*(e-1),t+=t>15?16:0;var r=Math.floor(t/32)+1,n=t-32*(r-1)+1;return this.newDate(e<=0?e-1:e,r,n)}});var o={20:"Fruitbat",21:"Anchovy"};n.calendars.discworld=a},{"../main":621,"object-assign":499}],610:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Ethiopian",jdEpoch:1724220.5,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Ethiopian",epochs:["BEE","EE"],monthNames:["Meskerem","Tikemet","Hidar","Tahesas","Tir","Yekatit","Megabit","Miazia","Genbot","Sene","Hamle","Nehase","Pagume"],monthNamesShort:["Mes","Tik","Hid","Tah","Tir","Yek","Meg","Mia","Gen","Sen","Ham","Neh","Pag"],dayNames:["Ehud","Segno","Maksegno","Irob","Hamus","Arb","Kidame"],dayNamesShort:["Ehu","Seg","Mak","Iro","Ham","Arb","Kid"],dayNamesMin:["Eh","Se","Ma","Ir","Ha","Ar","Ki"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()+(e.year()<0?1:0))%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear),13},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(13===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return(t=i.year())<0&&t++,i.day()+30*(i.month()-1)+365*(t-1)+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(t){var e=Math.floor(t)+.5-this.jdEpoch,r=Math.floor((e-Math.floor((e+366)/1461))/365)+1;r<=0&&r--,e=Math.floor(t)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(e/30)+1,i=e-30*(n-1)+1;return this.newDate(r,n,i)}}),n.calendars.ethiopian=a},{"../main":621,"object-assign":499}],611:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return this._leapYear(e.year())},_leapYear:function(t){return o(7*(t=t<0?t+1:t)+1,19)<7},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),12===e&&this.leapYear(t)||8===e&&5===o(this.daysInYear(t),10)?30:9===e&&3===o(this.daysInYear(t),10)?29:this.daysPerMonth[e-1]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(e<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(s=1;s=this.toJD(-1===e?1:e+1,7,1);)e++;for(var r=tthis.toJD(e,r,this.daysInMonth(e,r));)r++;var n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.hebrew=a},{"../main":621,"object-assign":499}],612:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Islamic",jdEpoch:1948439.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-kham\u012bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return(11*this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year()+14)%30<11},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){return this.leapYear(t)?355:354},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),t=t<=0?t+1:t,(r=i.day())+Math.ceil(29.5*(e-1))+354*(t-1)+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(t){t=Math.floor(t)+.5;var e=Math.floor((30*(t-this.jdEpoch)+10646)/10631);e=e<=0?e-1:e;var r=Math.min(12,Math.ceil((t-29-this.toJD(e,1,1))/29.5)+1),n=t-this.toJD(e,r,1)+1;return this.newDate(e,r,n)}}),n.calendars.islamic=a},{"../main":621,"object-assign":499}],613:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Julian",jdEpoch:1721423.5,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Julian",epochs:["BC","AD"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"mm/dd/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return(t=e.year()<0?e.year()+1:e.year())%4==0},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return t=i.year(),e=i.month(),r=i.day(),t<0&&t++,e<=2&&(t--,e+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(e+1))+r-1524.5},fromJD:function(t){var e=Math.floor(t+.5)+1524,r=Math.floor((e-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((e-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=e-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),n.calendars.julian=a},{"../main":621,"object-assign":499}],614:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}function o(t,e){return t-e*Math.floor(t/e)}function s(t,e){return o(t-1,e)+1}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),!1},formatYear:function(t){t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year();var e=Math.floor(t/400);return t%=400,t+=t<0?400:0,e+"."+Math.floor(t/20)+"."+t%20},forYear:function(t){if((t=t.split(".")).length<3)throw"Invalid Mayan year";for(var e=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";e=20*e+n}return e},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),18},weekOfYear:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,n.local.invalidYear),360},daysInMonth:function(t,e){return this._validate(t,e,this.minDay,n.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate).day()},weekDay:function(t,e,r){return this._validate(t,e,r,n.local.invalidDate),!0},extraInfo:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate).toJD(),a=this._toHaab(i),o=this._toTzolkin(i);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(t){var e=o((t-=this.jdEpoch)+8+340,365);return[Math.floor(e/20)+1,o(e,20)]},_toTzolkin:function(t){return[s((t-=this.jdEpoch)+20,20),s(t+4,13)]},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(t){t=Math.floor(t)+.5-this.jdEpoch;var e=Math.floor(t/360);t%=360,t+=t<0?360:0;var r=Math.floor(t/20),n=t%20;return this.newDate(e,r,n)}}),n.calendars.mayan=a},{"../main":621,"object-assign":499}],615:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar;var o=n.instance("gregorian");i(a.prototype,{name:"Nanakshahi",jdEpoch:2257673.5,daysPerMonth:[31,31,31,31,31,30,30,30,30,30,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Nanakshahi",epochs:["BN","AN"],monthNames:["Chet","Vaisakh","Jeth","Harh","Sawan","Bhadon","Assu","Katak","Maghar","Poh","Magh","Phagun"],monthNamesShort:["Che","Vai","Jet","Har","Saw","Bha","Ass","Kat","Mgr","Poh","Mgh","Pha"],dayNames:["Somvaar","Mangalvar","Budhvaar","Veervaar","Shukarvaar","Sanicharvaar","Etvaar"],dayNamesShort:["Som","Mangal","Budh","Veer","Shukar","Sanichar","Et"],dayNamesMin:["So","Ma","Bu","Ve","Sh","Sa","Et"],digits:null,dateFormat:"dd-mm-yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear||n.regionalOptions[""].invalidYear);return o.leapYear(e.year()+(e.year()<1?1:0)+1469)},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidMonth);(t=i.year())<0&&t++;for(var a=i.day(),s=1;s=this.toJD(e+1,1,1);)e++;for(var r=t-Math.floor(this.toJD(e,1,1)+.5)+1,n=1;r>this.daysInMonth(e,n);)r-=this.daysInMonth(e,n),n++;return this.newDate(e,n,r)}}),n.calendars.nanakshahi=a},{"../main":621,"object-assign":499}],616:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"Nepali",jdEpoch:1700709.5,daysPerMonth:[31,31,32,32,31,30,30,29,30,29,30,30],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,daysPerYear:365,regionalOptions:{"":{name:"Nepali",epochs:["BBS","ABS"],monthNames:["Baisakh","Jestha","Ashadh","Shrawan","Bhadra","Ashwin","Kartik","Mangsir","Paush","Mangh","Falgun","Chaitra"],monthNamesShort:["Bai","Je","As","Shra","Bha","Ash","Kar","Mang","Pau","Ma","Fal","Chai"],dayNames:["Aaitabaar","Sombaar","Manglbaar","Budhabaar","Bihibaar","Shukrabaar","Shanibaar"],dayNamesShort:["Aaita","Som","Mangl","Budha","Bihi","Shukra","Shani"],dayNamesMin:["Aai","So","Man","Bu","Bi","Shu","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:1,isRTL:!1}},leapYear:function(t){return this.daysInYear(t)!==this.daysPerYear},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear).year(),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t])return this.daysPerYear;for(var e=0,r=this.minMonth;r<=12;r++)e+=this.NEPALI_CALENDAR_DATA[t][r];return e},daysInMonth:function(t,e){return t.year&&(e=t.month(),t=t.year()),this._validate(t,e,this.minDay,n.local.invalidMonth),"undefined"==typeof this.NEPALI_CALENDAR_DATA[t]?this.daysPerMonth[e-1]:this.NEPALI_CALENDAR_DATA[t][e]},weekDay:function(t,e,r){return 6!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=n.instance(),o=0,s=e,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&r>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==e&&(o=r,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===e?(o+=r-this.NEPALI_CALENDAR_DATA[l][0])<0&&(o+=a.daysInYear(c)):o+=this.NEPALI_CALENDAR_DATA[l][9]-this.NEPALI_CALENDAR_DATA[l][0],a.newDate(c,1,1).add(o,"d").toJD()},fromJD:function(t){var e=n.instance().fromJD(t),r=e.year(),i=e.dayOfYear(),a=r+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;i>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-i);return this.newDate(a,o,c)},_createMissingCalendarData:function(t){var e=this.daysPerMonth.slice(0);e.unshift(17);for(var r=t-1;r0?474:473))%2820+474+38)%2816<682},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-(n.dayOfWeek()+1)%7,"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(12===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=i.year(),e=i.month(),r=i.day();var a=t-(t>=0?474:473),s=474+o(a,2820);return r+(e<=7?31*(e-1):30*(e-1)+6)+Math.floor((682*s-110)/2816)+365*(s-1)+1029983*Math.floor(a/2820)+this.jdEpoch-1},fromJD:function(t){var e=(t=Math.floor(t)+.5)-this.toJD(475,1,1),r=Math.floor(e/1029983),n=o(e,1029983),i=2820;if(1029982!==n){var a=Math.floor(n/366),s=o(n,366);i=Math.floor((2134*a+2816*s+2815)/1028522)+a+1}var l=i+2820*r+474;l=l<=0?l-1:l;var c=t-this.toJD(l,1,1)+1,u=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),f=t-this.toJD(l,u,1)+1;return this.newDate(l,u,f)}}),n.calendars.persian=a,n.calendars.jalali=a},{"../main":621,"object-assign":499}],618:[function(t,e,r){var n=t("../main"),i=t("object-assign"),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Taiwan",jdEpoch:2419402.5,yearsOffset:1911,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Taiwan",epochs:["BROC","ROC"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:1,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)},_g2tYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)}}),n.calendars.taiwan=o},{"../main":621,"object-assign":499}],619:[function(t,e,r){var n=t("../main"),i=t("object-assign"),a=n.instance();function o(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}o.prototype=new n.baseCalendar,i(o.prototype,{name:"Thai",jdEpoch:1523098.5,yearsOffset:543,daysPerMonth:[31,28,31,30,31,30,31,31,30,31,30,31],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Thai",epochs:["BBE","BE"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(e.year());return a.leapYear(t)},weekOfYear:function(t,e,r){var i=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);t=this._t2gYear(i.year());return a.weekOfYear(t,i.month(),i.day())},daysInMonth:function(t,e){var r=this._validate(t,e,this.minDay,n.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,e,r){return(this.dayOfWeek(t,e,r)||7)<6},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate);t=this._t2gYear(i.year());return a.toJD(t,i.month(),i.day())},fromJD:function(t){var e=a.fromJD(t),r=this._g2tYear(e.year());return this.newDate(r,e.month(),e.day())},_t2gYear:function(t){return t-this.yearsOffset-(t>=1&&t<=this.yearsOffset?1:0)},_g2tYear:function(t){return t+this.yearsOffset+(t>=-this.yearsOffset&&t<=-1?1:0)}}),n.calendars.thai=o},{"../main":621,"object-assign":499}],620:[function(t,e,r){var n=t("../main"),i=t("object-assign");function a(t){this.local=this.regionalOptions[t||""]||this.regionalOptions[""]}a.prototype=new n.baseCalendar,i(a.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thal\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,n.local.invalidYear);return 355===this.daysInYear(e.year())},weekOfYear:function(t,e,r){var n=this.newDate(t,e,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(t){for(var e=0,r=1;r<=12;r++)e+=this.daysInMonth(t,r);return e},daysInMonth:function(t,e){for(var r=this._validate(t,e,this.minDay,n.local.invalidMonth).toJD()-24e5+.5,i=0,a=0;ar)return o[i]-o[i-1];i++}return 30},weekDay:function(t,e,r){return 5!==this.dayOfWeek(t,e,r)},toJD:function(t,e,r){var i=this._validate(t,e,r,n.local.invalidDate),a=12*(i.year()-1)+i.month()-15292;return i.day()+o[a-1]-1+24e5-.5},fromJD:function(t){for(var e=t-24e5+.5,r=0,n=0;ne);n++)r++;var i=r+15292,a=Math.floor((i-1)/12),s=a+1,l=i-12*a,c=e-o[r-1]+1;return this.newDate(s,l,c)},isValid:function(t,e,r){var i=n.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,e,r,i){var a=n.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),n.calendars.ummalqura=a;var o=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},{"../main":621,"object-assign":499}],621:[function(t,e,r){var n=t("object-assign");function i(){this.regionalOptions=[],this.regionalOptions[""]={invalidCalendar:"Calendar {0} not found",invalidDate:"Invalid {0} date",invalidMonth:"Invalid {0} month",invalidYear:"Invalid {0} year",differentCalendars:"Cannot mix {0} and {1} dates"},this.local=this.regionalOptions[""],this.calendars={},this._localCals={}}function a(t,e,r,n){if(this._calendar=t,this._year=e,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function o(t,e){return"000000".substring(0,e-(t=""+t).length)+t}function s(){this.shortYearCutoff="+10"}function l(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}n(i.prototype,{instance:function(t,e){t=(t||"gregorian").toLowerCase(),e=e||"";var r=this._localCals[t+"-"+e];if(!r&&this.calendars[t]&&(r=new this.calendars[t](e),this._localCals[t+"-"+e]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,e,r,n,i){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,e,r)},substituteDigits:function(t){return function(e){return(e+"").replace(/[0-9]/g,(function(e){return t[e]}))}},substituteChineseDigits:function(t,e){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+e[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+e[1])&&(n=n.substr(1)),n||t[0]}}}),n(a.prototype,{newDate:function(t,e,r){return this._calendar.newDate(null==t?this:t,e,r)},year:function(t){return 0===arguments.length?this._year:this.set(t,"y")},month:function(t){return 0===arguments.length?this._month:this.set(t,"m")},day:function(t){return 0===arguments.length?this._day:this.set(t,"d")},date:function(t,e,r){if(!this._calendar.isValid(t,e,r))throw(c.local.invalidDate||c.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=e,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(t,e){return this._calendar.add(this,t,e)},set:function(t,e){return this._calendar.set(this,t,e)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(c.local.differentCalendars||c.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var e=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===e?0:e<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(t){return this._calendar.fromJD(t)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(t){return this._calendar.fromJSDate(t)},toString:function(){return(this.year()<0?"-":"")+o(Math.abs(this.year()),4)+"-"+o(this.month(),2)+"-"+o(this.day(),2)}}),n(s.prototype,{_validateLevel:0,newDate:function(t,e,r){return null==t?this.today():(t.year&&(this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),r=t.day(),e=t.month(),t=t.year()),new a(this,t,e,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return(e.year()<0?"-":"")+o(Math.abs(e.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear),12},monthOfYear:function(t,e){var r=this._validate(t,e,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,e){var r=(e+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,c.local.invalidMonth||c.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var e=this._validate(t,this.minMonth,this.minDay,c.local.invalidYear||c.regionalOptions[""].invalidYear);return this.leapYear(e)?366:365},dayOfYear:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,e,r){return this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),{}},add:function(t,e,r){return this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,e,r),e,r)},_add:function(t,e,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+e*("w"===r?this.daysInWeek():1),i=t.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=t.year()+("y"===r?e:0),o=t.monthOfYear()+("m"===r?e:0);i=t.day();"y"===r?(t.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,t.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(!function(t){for(;oe-1+t.minMonth;)a++,o-=e,e=t.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),i];return this._validateLevel--,s}catch(t){throw this._validateLevel--,t}},_correctAdd:function(t,e,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==e[0]&&t.year()>0==e[0]>0)){var i={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],a=r<0?-1:1;e=this._add(t,r*i[0]+a*i[1],i[2])}return t.date(e[0],e[1],e[2])},set:function(t,e,r){this._validate(t,this.minMonth,this.minDay,c.local.invalidDate||c.regionalOptions[""].invalidDate);var n="y"===r?e:t.year(),i="m"===r?e:t.month(),a="d"===r?e:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,e,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,e,this.minDay);n=e>=this.minMonth&&e-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(t,e,r){var n=this._validate(t,e,r,c.local.invalidDate||c.regionalOptions[""].invalidDate),i=new Date(n.year(),n.month()-1,n.day());return i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0),i.setHours(i.getHours()>12?i.getHours()+2:0),i},fromJSDate:function(t){return this.newDate(t.getFullYear(),t.getMonth()+1,t.getDate())}});var c=e.exports=new i;c.cdate=a,c.baseCalendar=s,c.calendars.gregorian=l},{"object-assign":499}],622:[function(t,e,r){var n=t("object-assign"),i=t("./main");n(i.regionalOptions[""],{invalidArguments:"Invalid arguments",invalidFormat:"Cannot format a date from another calendar",missingNumberAt:"Missing number at position {0}",unknownNameAt:"Unknown name at position {0}",unexpectedLiteralAt:"Unexpected literal at position {0}",unexpectedText:"Additional text found at end"}),i.local=i.regionalOptions[""],n(i.cdate.prototype,{formatDate:function(t,e){return"string"!=typeof t&&(e=t,t=""),this._calendar.formatDate(t||"",this,e)}}),n(i.baseCalendar.prototype,{UNIX_EPOCH:i.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:i.instance().jdEpoch,TICKS_PER_DAY:864e9,ATOM:"yyyy-mm-dd",COOKIE:"D, dd M yyyy",FULL:"DD, MM d, yyyy",ISO_8601:"yyyy-mm-dd",JULIAN:"J",RFC_822:"D, d M yy",RFC_850:"DD, dd-M-yy",RFC_1036:"D, d M yy",RFC_1123:"D, d M yyyy",RFC_2822:"D, d M yyyy",RSS:"D, d M yy",TICKS:"!",TIMESTAMP:"@",W3C:"yyyy-mm-dd",formatDate:function(t,e,r){if("string"!=typeof t&&(r=e,e=t,t=""),!e)return"";if(e.calendar()!==this)throw i.local.invalidFormat||i.regionalOptions[""].invalidFormat;t=t||this.local.dateFormat;for(var n,a,o,s,l=(r=r||{}).dayNamesShort||this.local.dayNamesShort,c=r.dayNames||this.local.dayNames,u=r.monthNumbers||this.local.monthNumbers,f=r.monthNamesShort||this.local.monthNamesShort,h=r.monthNames||this.local.monthNames,p=(r.calculateWeek||this.local.calculateWeek,function(e,r){for(var n=1;w+n1}),d=function(t,e,r,n){var i=""+e;if(p(t,n))for(;i.length1},x=function(t,r){var n=y(t,r),a=[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(t)+1],o=new RegExp("^-?\\d{1,"+a+"}"),s=e.substring(M).match(o);if(!s)throw(i.local.missingNumberAt||i.regionalOptions[""].missingNumberAt).replace(/\{0\}/,M);return M+=s[0].length,parseInt(s[0],10)},b=this,_=function(){if("function"==typeof l){y("m");var t=l.call(b,e.substring(M));return M+=t.length,t}return x("m")},w=function(t,r,n,a){for(var o=y(t,a)?n:r,s=0;s-1){p=1,d=g;for(var E=this.daysInMonth(h,p);d>E;E=this.daysInMonth(h,p))p++,d-=E}return f>-1?this.fromJD(f):this.newDate(h,p,d)},determineDate:function(t,e,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return e=e?e.newDate():null,t=null==t?e:"string"==typeof t?function(t){try{return a.parseDate(n,t,i)}catch(t){}for(var e=((t=t.toLowerCase()).match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(t);s;)e.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(t);return e}(t):"number"==typeof t?isNaN(t)||t===1/0||t===-1/0?e:a.today().add(t,"d"):a.newDate(t)}})},{"./main":621,"object-assign":499}],623:[function(t,e,r){e.exports=t("cwise-compiler")({args:["array",{offset:[1],array:0},"scalar","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\n var _inline_1_da = _inline_1_arg0_ - _inline_1_arg3_\n var _inline_1_db = _inline_1_arg1_ - _inline_1_arg3_\n if((_inline_1_da >= 0) !== (_inline_1_db >= 0)) {\n _inline_1_arg2_.push(_inline_1_arg4_[0] + 0.5 + 0.5 * (_inline_1_da + _inline_1_db) / (_inline_1_da - _inline_1_db))\n }\n }",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:["_inline_1_da","_inline_1_db"]},funcName:"zeroCrossings"})},{"cwise-compiler":151}],624:[function(t,e,r){"use strict";e.exports=function(t,e){var r=[];return e=+e||0,n(t.hi(t.shape[0]-1),r,e),r};var n=t("./lib/zc-core")},{"./lib/zc-core":623}],625:[function(t,e,r){"use strict";e.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},{}],626:[function(t,e,r){"use strict";var n=t("./arrow_paths"),i=t("../../plots/font_attributes"),a=t("../../plots/cartesian/constants"),o=t("../../plot_api/plot_template").templatedArray;t("../../constants/axis_placeable_objects");e.exports=o("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:i({editType:"calc+arraydraw",colorEditType:"arraydraw"}),width:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},height:{valType:"number",min:1,dflt:null,editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},align:{valType:"enumerated",values:["left","center","right"],dflt:"center",editType:"arraydraw"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"arraydraw"},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},bordercolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},borderpad:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},borderwidth:{valType:"number",min:0,dflt:1,editType:"calc+arraydraw"},showarrow:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},arrowcolor:{valType:"color",editType:"arraydraw"},arrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:n.length,dflt:1,editType:"arraydraw"},arrowside:{valType:"flaglist",flags:["end","start"],extras:["none"],dflt:"end",editType:"arraydraw"},arrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},startarrowsize:{valType:"number",min:.3,dflt:1,editType:"calc+arraydraw"},arrowwidth:{valType:"number",min:.1,editType:"calc+arraydraw"},standoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},startstandoff:{valType:"number",min:0,dflt:0,editType:"calc+arraydraw"},ax:{valType:"any",editType:"calc+arraydraw"},ay:{valType:"any",editType:"calc+arraydraw"},axref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",a.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",a.idRegex.x.toString()],editType:"calc"},x:{valType:"any",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},xshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},yref:{valType:"enumerated",values:["paper",a.idRegex.y.toString()],editType:"calc"},y:{valType:"any",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"auto",editType:"calc+arraydraw"},yshift:{valType:"number",dflt:0,editType:"calc+arraydraw"},clicktoshow:{valType:"enumerated",values:[!1,"onoff","onout"],dflt:!1,editType:"arraydraw"},xclick:{valType:"any",editType:"arraydraw"},yclick:{valType:"any",editType:"arraydraw"},hovertext:{valType:"string",editType:"arraydraw"},hoverlabel:{bgcolor:{valType:"color",editType:"arraydraw"},bordercolor:{valType:"color",editType:"arraydraw"},font:i({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},{"../../constants/axis_placeable_objects":746,"../../plot_api/plot_template":817,"../../plots/cartesian/constants":834,"../../plots/font_attributes":856,"./arrow_paths":625}],627:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("./draw").draw;function o(t){var e=t._fullLayout;n.filterVisible(e.annotations).forEach((function(e){var r=i.getFromId(t,e.xref),n=i.getFromId(t,e.yref),a=i.getRefType(e.xref),o=i.getRefType(e.yref);e._extremes={},"range"===a&&s(e,r),"range"===o&&s(e,n)}))}function s(t,e){var r,n=e._id,a=n.charAt(0),o=t[a],s=t["a"+a],l=t[a+"ref"],c=t["a"+a+"ref"],u=t["_"+a+"padplus"],f=t["_"+a+"padminus"],h={x:1,y:-1}[a]*t[a+"shift"],p=3*t.arrowsize*t.arrowwidth||0,d=p+h,g=p-h,m=3*t.startarrowsize*t.arrowwidth||0,v=m+h,y=m-h;if(c===l){var x=i.findExtremes(e,[e.r2c(o)],{ppadplus:d,ppadminus:g}),b=i.findExtremes(e,[e.r2c(s)],{ppadplus:Math.max(u,v),ppadminus:Math.max(f,y)});r={min:[x.min[0],b.min[0]],max:[x.max[0],b.max[0]]}}else v=s?v+s:v,y=s?y-s:y,r=i.findExtremes(e,[e.r2c(o)],{ppadplus:Math.max(u,d,v),ppadminus:Math.max(f,g,y)});t._extremes[n]=r}e.exports=function(t){var e=t._fullLayout;if(n.filterVisible(e.annotations).length&&t._fullData.length)return n.syncOrAsync([a,o],t)}},{"../../lib":778,"../../plots/cartesian/axes":828,"./draw":632}],628:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("../../plot_api/plot_template").arrayEditor;function o(t,e){var r,n,i,a,o,l,c,u=t._fullLayout.annotations,f=[],h=[],p=[],d=(e||[]).length;for(r=0;r0||r.explicitOff.length>0},onClick:function(t,e){var r,s,l=o(t,e),c=l.on,u=l.off.concat(l.explicitOff),f={},h=t._fullLayout.annotations;if(!c.length&&!u.length)return;for(r=0;r2/3?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[e]}for(var W=!1,X=["x","y"],Z=0;Z1)&&(nt===rt?((pt=it.r2fraction(e["a"+et]))<0||pt>1)&&(W=!0):W=!0),J=it._offset+it.r2p(e[et]),$=.5}else{var dt="domain"===ht;"x"===et?(Q=e[et],J=dt?it._offset+it._length*Q:J=T.l+T.w*Q):(Q=1-e[et],J=dt?it._offset+it._length*Q:J=T.t+T.h*Q),$=e.showarrow?.5:Q}if(e.showarrow){ft.head=J;var gt=e["a"+et];if(tt=ot*H(.5,e.xanchor)-st*H(.5,e.yanchor),nt===rt){var mt=l.getRefType(nt);"domain"===mt?("y"===et&&(gt=1-gt),ft.tail=it._offset+it._length*gt):"paper"===mt?"y"===et?(gt=1-gt,ft.tail=T.t+T.h*gt):ft.tail=T.l+T.w*gt:ft.tail=it._offset+it.r2p(gt),K=tt}else ft.tail=J+gt,K=tt+gt;ft.text=ft.tail+tt;var vt=w["x"===et?"width":"height"];if("paper"===rt&&(ft.head=o.constrain(ft.head,1,vt-1)),"pixel"===nt){var yt=-Math.max(ft.tail-3,ft.text),xt=Math.min(ft.tail+3,ft.text)-vt;yt>0?(ft.tail+=yt,ft.text+=yt):xt>0&&(ft.tail-=xt,ft.text-=xt)}ft.tail+=ut,ft.head+=ut}else K=tt=lt*H($,ct),ft.text=J+tt;ft.text+=ut,tt+=ut,K+=ut,e["_"+et+"padplus"]=lt/2+K,e["_"+et+"padminus"]=lt/2-K,e["_"+et+"size"]=lt,e["_"+et+"shift"]=tt}if(W)R.remove();else{var bt=0,_t=0;if("left"!==e.align&&(bt=(M-b)*("center"===e.align?.5:1)),"top"!==e.valign&&(_t=(D-_)*("middle"===e.valign?.5:1)),f)n.select("svg").attr({x:N+bt-1,y:N+_t}).call(u.setClipUrl,U?C:null,t);else{var wt=N+_t-g.top,Tt=N+bt-g.left;G.call(h.positionText,Tt,wt).call(u.setClipUrl,U?C:null,t)}V.select("rect").call(u.setRect,N,N,M,D),j.call(u.setRect,F/2,F/2,B-F,q-F),R.call(u.setTranslate,Math.round(L.x.text-B/2),Math.round(L.y.text-q/2)),z.attr({transform:"rotate("+I+","+L.x.text+","+L.y.text+")"});var kt,Mt=function(r,n){P.selectAll(".annotation-arrow-g").remove();var l=L.x.head,f=L.y.head,h=L.x.tail+r,p=L.y.tail+n,g=L.x.text+r,b=L.y.text+n,_=o.rotationXYMatrix(I,g,b),w=o.apply2DTransform(_),M=o.apply2DTransform2(_),C=+j.attr("width"),O=+j.attr("height"),D=g-.5*C,F=D+C,B=b-.5*O,N=B+O,U=[[D,B,D,N],[D,N,F,N],[F,N,F,B],[F,B,D,B]].map(M);if(!U.reduce((function(t,e){return t^!!o.segmentsIntersect(l,f,l+1e6,f+1e6,e[0],e[1],e[2],e[3])}),!1)){U.forEach((function(t){var e=o.segmentsIntersect(h,p,l,f,t[0],t[1],t[2],t[3]);e&&(h=e.x,p=e.y)}));var V=e.arrowwidth,q=e.arrowcolor,H=e.arrowside,G=P.append("g").style({opacity:c.opacity(q)}).classed("annotation-arrow-g",!0),Y=G.append("path").attr("d","M"+h+","+p+"L"+l+","+f).style("stroke-width",V+"px").call(c.stroke,c.rgb(q));if(m(Y,H,e),k.annotationPosition&&Y.node().parentNode&&!a){var W=l,X=f;if(e.standoff){var Z=Math.sqrt(Math.pow(l-h,2)+Math.pow(f-p,2));W+=e.standoff*(h-l)/Z,X+=e.standoff*(p-f)/Z}var J,K,Q=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-W)+","+(p-X),transform:s(W,X)}).style("stroke-width",V+6+"px").call(c.stroke,"rgba(0,0,0,0)").call(c.fill,"rgba(0,0,0,0)");d.init({element:Q.node(),gd:t,prepFn:function(){var t=u.getTranslate(R);J=t.x,K=t.y,v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(t,r){var n=w(J,K),i=n[0]+t,a=n[1]+r;R.call(u.setTranslate,i,a),S("x",y(v,t,"x",T,e)),S("y",y(x,r,"y",T,e)),e.axref===e.xref&&S("ax",y(v,t,"ax",T,e)),e.ayref===e.yref&&S("ay",y(x,r,"ay",T,e)),G.attr("transform",s(t,r)),z.attr({transform:"rotate("+I+","+i+","+a+")"})},doneFn:function(){i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}};if(e.showarrow&&Mt(0,0),O)d.init({element:R.node(),gd:t,prepFn:function(){kt=z.attr("transform")},moveFn:function(t,r){var n="pointer";if(e.showarrow)e.axref===e.xref?S("ax",y(v,t,"ax",T,e)):S("ax",e.ax+t),e.ayref===e.yref?S("ay",y(x,r,"ay",T.w,e)):S("ay",e.ay+r),Mt(t,r);else{if(a)return;var i,o;if(v)i=y(v,t,"x",T,e);else{var l=e._xsize/T.w,c=e.x+(e._xshift-e.xshift)/T.w-l/2;i=d.align(c+t/T.w,l,0,1,e.xanchor)}if(x)o=y(x,r,"y",T,e);else{var u=e._ysize/T.h,f=e.y-(e._yshift+e.yshift)/T.h-u/2;o=d.align(f-r/T.h,u,0,1,e.yanchor)}S("x",i),S("y",o),v&&x||(n=d.getCursor(v?.5:i,x?.5:o,e.xanchor,e.yanchor))}z.attr({transform:s(t,r)+kt}),p(R,n)},clickFn:function(r,n){e.captureevents&&t.emit("plotly_clickannotation",Y(n))},doneFn:function(){p(R),i.call("_guiRelayout",t,E());var e=document.querySelector(".js-notes-box-panel");e&&e.redraw(e.selectedObj)}})}}}e.exports={draw:function(t){var e=t._fullLayout;e._infolayer.selectAll(".annotation").remove();for(var r=0;r=0,x=e.indexOf("end")>=0,b=d.backoff*m+r.standoff,_=g.backoff*v+r.startstandoff;if("line"===p.nodeName){o={x:+t.attr("x1"),y:+t.attr("y1")},u={x:+t.attr("x2"),y:+t.attr("y2")};var w=o.x-u.x,T=o.y-u.y;if(h=(f=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void O();if(b){if(b*b>w*w+T*T)return void O();var k=b*Math.cos(f),M=b*Math.sin(f);u.x+=k,u.y+=M,t.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void O();var A=_*Math.cos(f),S=_*Math.sin(f);o.x-=A,o.y-=S,t.attr({x1:o.x,y1:o.y})}}else if("path"===p.nodeName){var E=p.getTotalLength(),C="";if(E1){c=!0;break}}c?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+s+'"]').remove():(l._pdata=i(t.glplot.cameraParams,[e.xaxis.r2l(l.x)*r[0],e.yaxis.r2l(l.y)*r[1],e.zaxis.r2l(l.z)*r[2]]),n(t.graphDiv,l,s,t.id,l._xa,l._ya))}}},{"../../plots/gl3d/project":879,"../annotations/draw":632}],639:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib");e.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:t("./attributes")}}},layoutAttributes:t("./attributes"),handleDefaults:t("./defaults"),includeBasePlot:function(t,e){var r=n.subplotsRegistry.gl3d;if(!r)return;for(var a=r.attrRegex,o=Object.keys(t),s=0;s=0))return t;if(3===o)n[o]>1&&(n[o]=1);else if(n[o]>=1)return t}var s=Math.round(255*n[0])+", "+Math.round(255*n[1])+", "+Math.round(255*n[2]);return a?"rgba("+s+", "+n[3]+")":"rgb("+s+")"}a.tinyRGB=function(t){var e=t.toRgb();return"rgb("+Math.round(e.r)+", "+Math.round(e.g)+", "+Math.round(e.b)+")"},a.rgb=function(t){return a.tinyRGB(n(t))},a.opacity=function(t){return t?n(t).getAlpha():0},a.addOpacity=function(t,e){var r=n(t).toRgb();return"rgba("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+", "+e+")"},a.combine=function(t,e){var r=n(t).toRgb();if(1===r.a)return n(t).toRgbString();var i=n(e||l).toRgb(),a=1===i.a?i:{r:255*(1-i.a)+i.r*i.a,g:255*(1-i.a)+i.g*i.a,b:255*(1-i.a)+i.b*i.a},o={r:a.r*(1-r.a)+r.r*r.a,g:a.g*(1-r.a)+r.g*r.a,b:a.b*(1-r.a)+r.b*r.a};return n(o).toRgbString()},a.contrast=function(t,e,r){var i=n(t);return 1!==i.getAlpha()&&(i=n(a.combine(t,l))),(i.isDark()?e?i.lighten(e):l:r?i.darken(r):s).toString()},a.stroke=function(t,e){var r=n(e);t.style({stroke:a.tinyRGB(r),"stroke-opacity":r.getAlpha()})},a.fill=function(t,e){var r=n(e);t.style({fill:a.tinyRGB(r),"fill-opacity":r.getAlpha()})},a.clean=function(t){if(t&&"object"==typeof t){var e,r,n,i,o=Object.keys(t);for(e=0;e0?n>=l:n<=l));i++)n>u&&n0?n>=l:n<=l));i++)n>r[0]&&n1){var J=Math.pow(10,Math.floor(Math.log(Z)/Math.LN10));W*=J*c.roundUp(Z/J,[2,5,10]),(Math.abs(L.start)/L.size+1e-6)%1<2e-6&&(Y.tick0=0)}Y.dtick=W}Y.domain=[q+j,q+F-j],Y.setScale(),t.attr("transform",u(Math.round(l.l),Math.round(l.t)));var K,Q=t.select("."+M.cbtitleunshift).attr("transform",u(-Math.round(l.l),-Math.round(l.t))),$=t.select("."+M.cbaxis),tt=0;function et(n,i){var a={propContainer:Y,propName:e._propPrefix+"title",traceIndex:e._traceIndex,_meta:e._meta,placeholder:o._dfltTitle.colorbar,containerGroup:t.select("."+M.cbtitle)},s="h"===n.charAt(0)?n.substr(1):"h"+n;t.selectAll("."+s+",."+s+"-math-group").remove(),g.draw(r,n,f(a,i||{}))}return c.syncOrAsync([a.previousPromises,function(){if(-1!==["top","bottom"].indexOf(A)){var t,r=l.l+(e.x+B)*l.w,n=Y.title.font.size;t="top"===A?(1-(q+F-j))*l.h+l.t+3+.75*n:(1-(q+j))*l.h+l.t-3-.25*n,et(Y._id+"title",{attributes:{x:r,y:t,"text-anchor":"start"}})}},function(){if(-1!==["top","bottom"].indexOf(A)){var a=t.select("."+M.cbtitle),o=a.select("text"),f=[-e.outlinewidth/2,e.outlinewidth/2],h=a.select(".h"+Y._id+"title-math-group").node(),d=15.6;if(o.node()&&(d=parseInt(o.node().style.fontSize,10)*w),h?(tt=p.bBox(h).height)>d&&(f[1]-=(tt-d)/2):o.node()&&!o.classed(M.jsPlaceholder)&&(tt=p.bBox(o.node()).height),tt){if(tt+=5,"top"===A)Y.domain[1]-=tt/l.h,f[1]*=-1;else{Y.domain[0]+=tt/l.h;var g=m.lineCount(o);f[1]+=(1-g)*d}a.attr("transform",u(f[0],f[1])),Y.setScale()}}t.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",u(0,Math.round(l.h*(1-Y.domain[1])))),$.attr("transform",u(0,Math.round(-l.t)));var y=t.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data(P);y.enter().append("rect").classed(M.cbfill,!0).style("stroke","none"),y.exit().remove();var x=S.map(Y.c2p).map(Math.round).sort((function(t,e){return t-e}));y.each((function(t,a){var o=[0===a?S[0]:(P[a]+P[a-1])/2,a===P.length-1?S[1]:(P[a]+P[a+1])/2].map(Y.c2p).map(Math.round);o[1]=c.constrain(o[1]+(o[1]>o[0])?1:-1,x[0],x[1]);var s=n.select(this).attr({x:U,width:Math.max(O,2),y:n.min(o),height:Math.max(n.max(o)-n.min(o),2)});if(e._fillgradient)p.gradient(s,r,e._id,"vertical",e._fillgradient,"fill");else{var l=C(t).replace("e-","");s.attr("fill",i(l).toHexString())}}));var b=t.select("."+M.cblines).selectAll("path."+M.cbline).data(v.color&&v.width?z:[]);b.enter().append("path").classed(M.cbline,!0),b.exit().remove(),b.each((function(t){n.select(this).attr("d","M"+U+","+(Math.round(Y.c2p(t))+v.width/2%1)+"h"+O).call(p.lineGroupStyle,v.width,E(t),v.dash)})),$.selectAll("g."+Y._id+"tick,path").remove();var _=U+O+(e.outlinewidth||0)/2-("outside"===e.ticks?1:0),T=s.calcTicks(Y),k=s.getTickSigns(Y)[2];return s.drawTicks(r,Y,{vals:"inside"===Y.ticks?s.clipEnds(Y,T):T,layer:$,path:s.makeTickPath(Y,_,k),transFn:s.makeTransTickFn(Y)}),s.drawLabels(r,Y,{vals:T,layer:$,transFn:s.makeTransTickLabelFn(Y),labelFns:s.makeLabelFns(Y,_)})},function(){if(-1===["top","bottom"].indexOf(A)){var t=Y.title.font.size,e=Y._offset+Y._length/2,i=l.l+(Y.position||0)*l.w+("right"===Y.side?10+t*(Y.showticklabels?1:.5):-10-t*(Y.showticklabels?.5:0));et("h"+Y._id+"title",{avoid:{selection:n.select(r).selectAll("g."+Y._id+"tick"),side:A,offsetLeft:l.l,offsetTop:0,maxShift:o.width},attributes:{x:i,y:e,"text-anchor":"middle"},transform:{rotate:"-90",offset:0}})}},a.previousPromises,function(){var n=O+e.outlinewidth/2;if(-1===Y.ticklabelposition.indexOf("inside")&&(n+=p.bBox($.node()).width),(K=Q.select("text")).node()&&!K.classed(M.jsPlaceholder)){var i,o=Q.select(".h"+Y._id+"title-math-group").node();i=o&&-1!==["top","bottom"].indexOf(A)?p.bBox(o).width:p.bBox(Q.node()).right-U-l.l,n=Math.max(n,i)}var s=2*e.xpad+n+e.borderwidth+e.outlinewidth/2,c=H-G;t.select("."+M.cbbg).attr({x:U-e.xpad-(e.borderwidth+e.outlinewidth)/2,y:G-N,width:Math.max(s,2),height:Math.max(c+2*N,2)}).call(d.fill,e.bgcolor).call(d.stroke,e.bordercolor).style("stroke-width",e.borderwidth),t.selectAll("."+M.cboutline).attr({x:U,y:G+e.ypad+("top"===A?tt:0),width:Math.max(O,2),height:Math.max(c-2*e.ypad-tt,2)}).call(d.stroke,e.outlinecolor).style({fill:"none","stroke-width":e.outlinewidth});var f=({center:.5,right:1}[e.xanchor]||0)*s;t.attr("transform",u(l.l-f,l.t));var h={},g=T[e.yanchor],m=k[e.yanchor];"pixels"===e.lenmode?(h.y=e.y,h.t=c*g,h.b=c*m):(h.t=h.b=0,h.yt=e.y+e.len*g,h.yb=e.y-e.len*m);var v=T[e.xanchor],y=k[e.xanchor];if("pixels"===e.thicknessmode)h.x=e.x,h.l=s*v,h.r=s*y;else{var x=s-O;h.l=x*v,h.r=x*y,h.xl=e.x-e.thickness*v,h.xr=e.x+e.thickness*y}a.autoMargin(r,e._id,h)}],r)}(r,e,t);v&&v.then&&(t._promises||[]).push(v),t._context.edits.colorbarPosition&&function(t,e,r){var n,i,a,s=r._fullLayout._size;l.init({element:t.node(),gd:r,prepFn:function(){n=t.attr("transform"),h(t)},moveFn:function(r,o){t.attr("transform",n+u(r,o)),i=l.align(e._xLeftFrac+r/s.w,e._thickFrac,0,1,e.xanchor),a=l.align(e._yBottomFrac-o/s.h,e._lenFrac,0,1,e.yanchor);var c=l.getCursor(i,a,e.xanchor,e.yanchor);h(t,c)},doneFn:function(){if(h(t),void 0!==i&&void 0!==a){var n={};n[e._propPrefix+"x"]=i,n[e._propPrefix+"y"]=a,void 0!==e._traceIndex?o.call("_guiRestyle",r,n,e._traceIndex):o.call("_guiRelayout",r,n)}}})}(r,e,t)})),e.exit().each((function(e){a.autoMargin(t,e._id)})).remove(),e.order()}}},{"../../constants/alignment":745,"../../lib":778,"../../lib/extend":768,"../../lib/setcursor":799,"../../lib/svg_text_utils":803,"../../plots/cartesian/axes":828,"../../plots/cartesian/axis_defaults":830,"../../plots/cartesian/layout_attributes":842,"../../plots/cartesian/position_defaults":845,"../../plots/plots":891,"../../registry":911,"../color":643,"../colorscale/helpers":654,"../dragelement":662,"../drawing":665,"../titles":738,"./constants":645,d3:169,tinycolor2:576}],648:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t){return n.isPlainObject(t.colorbar)}},{"../../lib":778}],649:[function(t,e,r){"use strict";e.exports={moduleType:"component",name:"colorbar",attributes:t("./attributes"),supplyDefaults:t("./defaults"),draw:t("./draw").draw,hasColorbar:t("./has_colorbar")}},{"./attributes":644,"./defaults":646,"./draw":647,"./has_colorbar":648}],650:[function(t,e,r){"use strict";var n=t("../colorbar/attributes"),i=t("../../lib/regex").counter,a=t("./scales.js").scales;Object.keys(a);function o(t){return"`"+t+"`"}e.exports=function(t,e){t=t||"";var r,s=(e=e||{}).cLetter||"c",l=("onlyIfNumerical"in e?e.onlyIfNumerical:Boolean(t),"noScale"in e?e.noScale:"marker.line"===t),c="showScaleDflt"in e?e.showScaleDflt:"z"===s,u="string"==typeof e.colorscaleDflt?a[e.colorscaleDflt]:null,f=e.editTypeOverride||"",h=t?t+".":"";"colorAttr"in e?(r=e.colorAttr,e.colorAttr):o(h+(r={z:"z",c:"color"}[s]));var p=s+"auto",d=s+"min",g=s+"max",m=s+"mid",v=(o(h+p),o(h+d),o(h+g),{});v[d]=v[g]=void 0;var y={};y[p]=!1;var x={};return"color"===r&&(x.color={valType:"color",arrayOk:!0,editType:f||"style"},e.anim&&(x.color.anim=!0)),x[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:v},x[d]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[g]={valType:"number",dflt:null,editType:f||"plot",impliedEdits:y},x[m]={valType:"number",dflt:null,editType:"calc",impliedEdits:v},x.colorscale={valType:"colorscale",editType:"calc",dflt:u,impliedEdits:{autocolorscale:!1}},x.autocolorscale={valType:"boolean",dflt:!1!==e.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},x.reversescale={valType:"boolean",dflt:!1,editType:"plot"},l||(x.showscale={valType:"boolean",dflt:c,editType:"calc"},x.colorbar=n),e.noColorAxis||(x.coloraxis={valType:"subplotid",regex:i("coloraxis"),dflt:null,editType:"calc"}),x}},{"../../lib/regex":795,"../colorbar/attributes":644,"./scales.js":658}],651:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("./helpers").extractOpts;e.exports=function(t,e,r){var o,s=t._fullLayout,l=r.vals,c=r.containerStr,u=c?i.nestedProperty(e,c).get():e,f=a(u),h=!1!==f.auto,p=f.min,d=f.max,g=f.mid,m=function(){return i.aggNums(Math.min,null,l)},v=function(){return i.aggNums(Math.max,null,l)};(void 0===p?p=m():h&&(p=u._colorAx&&n(p)?Math.min(p,m()):m()),void 0===d?d=v():h&&(d=u._colorAx&&n(d)?Math.max(d,v()):v()),h&&void 0!==g&&(d-g>g-p?p=g-(d-g):d-g=0?s.colorscale.sequential:s.colorscale.sequentialminus,f._sync("colorscale",o))}},{"../../lib":778,"./helpers":654,"fast-isnumeric":241}],652:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./helpers").hasColorscale,a=t("./helpers").extractOpts;e.exports=function(t,e){function r(t,e){var r=t["_"+e];void 0!==r&&(t[e]=r)}function o(t,i){var o=i.container?n.nestedProperty(t,i.container).get():t;if(o)if(o.coloraxis)o._colorAx=e[o.coloraxis];else{var s=a(o),l=s.auto;(l||void 0===s.min)&&r(o,i.min),(l||void 0===s.max)&&r(o,i.max),s.autocolorscale&&r(o,"colorscale")}}for(var s=0;s=0;n--,i++){var a=t[n];r[i]=[1-a[0],a[1]]}return r}function d(t,e){e=e||{};for(var r=t.domain,o=t.range,l=o.length,c=new Array(l),u=0;u4/3-s?o:s}},{}],660:[function(t,e,r){"use strict";var n=t("../../lib"),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];e.exports=function(t,e,r,a){return t="left"===r?0:"center"===r?1:"right"===r?2:n.constrain(Math.floor(3*t),0,2),e="bottom"===a?0:"middle"===a?1:"top"===a?2:n.constrain(Math.floor(3*e),0,2),i[e][t]}},{"../../lib":778}],661:[function(t,e,r){"use strict";r.selectMode=function(t){return"lasso"===t||"select"===t},r.drawMode=function(t){return"drawclosedpath"===t||"drawopenpath"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},r.openMode=function(t){return"drawline"===t||"drawopenpath"===t},r.rectMode=function(t){return"select"===t||"drawline"===t||"drawrect"===t||"drawcircle"===t},r.freeMode=function(t){return"lasso"===t||"drawclosedpath"===t||"drawopenpath"===t},r.selectingOrDrawing=function(t){return r.freeMode(t)||r.rectMode(t)}},{}],662:[function(t,e,r){"use strict";var n=t("mouse-event-offset"),i=t("has-hover"),a=t("has-passive-events"),o=t("../../lib").removeElement,s=t("../../plots/cartesian/constants"),l=e.exports={};l.align=t("./align"),l.getCursor=t("./cursor");var c=t("./unhover");function u(){var t=document.createElement("div");t.className="dragcover";var e=t.style;return e.position="fixed",e.left=0,e.right=0,e.top=0,e.bottom=0,e.zIndex=999999999,e.background="none",document.body.appendChild(t),t}function f(t){return n(t.changedTouches?t.changedTouches[0]:t,document.body)}l.unhover=c.wrapped,l.unhoverRaw=c.raw,l.init=function(t){var e,r,n,c,h,p,d,g,m=t.gd,v=1,y=m._context.doubleClickDelay,x=t.element;m._mouseDownTime||(m._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,a?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=t.clampFn||function(t,e,r){return Math.abs(t)y&&(v=Math.max(v-1,1)),m._dragged)t.doneFn&&t.doneFn();else if(t.clickFn&&t.clickFn(v,p),!g){var r;try{r=new MouseEvent("click",e)}catch(t){var n=f(e);(r=document.createEvent("MouseEvents")).initMouseEvent("click",e.bubbles,e.cancelable,e.view,e.detail,e.screenX,e.screenY,n[0],n[1],e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}d.dispatchEvent(r)}m._dragging=!1,m._dragged=!1}else m._dragged=!1}},l.coverSlip=u},{"../../lib":778,"../../plots/cartesian/constants":834,"./align":659,"./cursor":660,"./unhover":663,"has-hover":440,"has-passive-events":441,"mouse-event-offset":484}],663:[function(t,e,r){"use strict";var n=t("../../lib/events"),i=t("../../lib/throttle"),a=t("../../lib/dom").getGraphDiv,o=t("../fx/constants"),s=e.exports={};s.wrapped=function(t,e,r){(t=a(t))._fullLayout&&i.clear(t._fullLayout._uid+o.HOVERID),s.raw(t,e,r)},s.raw=function(t,e){var r=t._fullLayout,i=t._hoverdata;e||(e={}),e.target&&!1===n.triggerHandler(t,"plotly_beforehover",e)||(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,e.target&&i&&t.emit("plotly_unhover",{event:e,points:i}))}},{"../../lib/dom":766,"../../lib/events":767,"../../lib/throttle":804,"../fx/constants":677}],664:[function(t,e,r){"use strict";r.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"}},{}],665:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("tinycolor2"),o=t("../../registry"),s=t("../color"),l=t("../colorscale"),c=t("../../lib"),u=c.strTranslate,f=t("../../lib/svg_text_utils"),h=t("../../constants/xmlns_namespaces"),p=t("../../constants/alignment").LINE_SPACING,d=t("../../constants/interactions").DESELECTDIM,g=t("../../traces/scatter/subtypes"),m=t("../../traces/scatter/make_bubble_size_func"),v=t("../../components/fx/helpers").appendArrayPointValue,y=e.exports={};y.font=function(t,e,r,n){c.isPlainObject(e)&&(n=e.color,r=e.size,e=e.family),e&&t.style("font-family",e),r+1&&t.style("font-size",r+"px"),n&&t.call(s.fill,n)},y.setPosition=function(t,e,r){t.attr("x",e).attr("y",r)},y.setSize=function(t,e,r){t.attr("width",e).attr("height",r)},y.setRect=function(t,e,r,n,i){t.call(y.setPosition,e,r).call(y.setSize,n,i)},y.translatePoint=function(t,e,r,n){var a=r.c2p(t.x),o=n.c2p(t.y);return!!(i(a)&&i(o)&&e.node())&&("text"===e.node().nodeName?e.attr("x",a).attr("y",o):e.attr("transform",u(a,o)),!0)},y.translatePoints=function(t,e,r){t.each((function(t){var i=n.select(this);y.translatePoint(t,i,e,r)}))},y.hideOutsideRangePoint=function(t,e,r,n,i,a){e.attr("display",r.isPtWithinRange(t,i)&&n.isPtWithinRange(t,a)?null:"none")},y.hideOutsideRangePoints=function(t,e){if(e._hasClipOnAxisFalse){var r=e.xaxis,i=e.yaxis;t.each((function(e){var a=e[0].trace,s=a.xcalendar,l=a.ycalendar,c=o.traceIs(a,"bar-like")?".bartext":".point,.textpoint";t.selectAll(c).each((function(t){y.hideOutsideRangePoint(t,n.select(this),r,i,s,l)}))}))}},y.crispRound=function(t,e,r){return e&&i(e)?t._context.staticPlot?e:e<1?1:Math.round(e):r||0},y.singleLineStyle=function(t,e,r,n,i){e.style("fill","none");var a=(((t||[])[0]||{}).trace||{}).line||{},o=r||a.width||0,l=i||a.dash||"";s.stroke(e,n||a.color),y.dashLine(e,l,o)},y.lineGroupStyle=function(t,e,r,i){t.style("fill","none").each((function(t){var a=(((t||[])[0]||{}).trace||{}).line||{},o=e||a.width||0,l=i||a.dash||"";n.select(this).call(s.stroke,r||a.color).call(y.dashLine,l,o)}))},y.dashLine=function(t,e,r){r=+r||0,e=y.dashStyle(e,r),t.style({"stroke-dasharray":e,"stroke-width":r+"px"})},y.dashStyle=function(t,e){e=+e||1;var r=Math.max(e,3);return"solid"===t?t="":"dot"===t?t=r+"px,"+r+"px":"dash"===t?t=3*r+"px,"+3*r+"px":"longdash"===t?t=5*r+"px,"+5*r+"px":"dashdot"===t?t=3*r+"px,"+r+"px,"+r+"px,"+r+"px":"longdashdot"===t&&(t=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),t},y.singleFillStyle=function(t){var e=(((n.select(t.node()).data()[0]||[])[0]||{}).trace||{}).fillcolor;e&&t.call(s.fill,e)},y.fillGroupStyle=function(t){t.style("stroke-width",0).each((function(t){var e=n.select(this);t[0].trace&&e.call(s.fill,t[0].trace.fillcolor)}))};var x=t("./symbol_defs");y.symbolNames=[],y.symbolFuncs=[],y.symbolNeedLines={},y.symbolNoDot={},y.symbolNoFill={},y.symbolList=[],Object.keys(x).forEach((function(t){var e=x[t],r=e.n;y.symbolList.push(r,String(r),t,r+100,String(r+100),t+"-open"),y.symbolNames[r]=t,y.symbolFuncs[r]=e.f,e.needLine&&(y.symbolNeedLines[r]=!0),e.noDot?y.symbolNoDot[r]=!0:y.symbolList.push(r+200,String(r+200),t+"-dot",r+300,String(r+300),t+"-open-dot"),e.noFill&&(y.symbolNoFill[r]=!0)}));var b=y.symbolNames.length;function _(t,e){var r=t%100;return y.symbolFuncs[r](e)+(t>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}y.symbolNumber=function(t){if(i(t))t=+t;else if("string"==typeof t){var e=0;t.indexOf("-open")>0&&(e=100,t=t.replace("-open","")),t.indexOf("-dot")>0&&(e+=200,t=t.replace("-dot","")),(t=y.symbolNames.indexOf(t))>=0&&(t+=e)}return t%100>=b||t>=400?0:Math.floor(Math.max(t,0))};var w={x1:1,x2:0,y1:0,y2:0},T={x1:0,x2:0,y1:1,y2:0},k=n.format("~.1f"),M={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:w},horizontalreversed:{node:"linearGradient",attrs:w,reversed:!0},vertical:{node:"linearGradient",attrs:T},verticalreversed:{node:"linearGradient",attrs:T,reversed:!0}};y.gradient=function(t,e,r,i,o,l){for(var u=o.length,f=M[i],h=new Array(u),p=0;p"+v(t);d._gradientUrlQueryParts[y]=1},y.initGradients=function(t){var e=t._fullLayout;c.ensureSingle(e._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),e._gradientUrlQueryParts={}},y.pointStyle=function(t,e,r){if(t.size()){var i=y.makePointStyleFns(e);t.each((function(t){y.singlePointStyle(t,n.select(this),e,i,r)}))}},y.singlePointStyle=function(t,e,r,n,i){var a=r.marker,o=a.line;if(e.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(t):void 0===t.mo?a.opacity:t.mo),n.ms2mrc){var l;l="various"===t.ms||"various"===a.size?3:n.ms2mrc(t.ms),t.mrc=l,n.selectedSizeFn&&(l=t.mrc=n.selectedSizeFn(t));var u=y.symbolNumber(t.mx||a.symbol)||0;t.om=u%200>=100,e.attr("d",_(u,l))}var f,h,p,d=!1;if(t.so)p=o.outlierwidth,h=o.outliercolor,f=a.outliercolor;else{var g=(o||{}).width;p=(t.mlw+1||g+1||(t.trace?(t.trace.marker.line||{}).width:0)+1)-1||0,h="mlc"in t?t.mlcc=n.lineScale(t.mlc):c.isArrayOrTypedArray(o.color)?s.defaultLine:o.color,c.isArrayOrTypedArray(a.color)&&(f=s.defaultLine,d=!0),f="mc"in t?t.mcc=n.markerScale(t.mc):a.color||"rgba(0,0,0,0)",n.selectedColorFn&&(f=n.selectedColorFn(t))}if(t.om)e.call(s.stroke,f).style({"stroke-width":(p||1)+"px",fill:"none"});else{e.style("stroke-width",(t.isBlank?0:p)+"px");var m=a.gradient,v=t.mgt;if(v?d=!0:v=m&&m.type,Array.isArray(v)&&(v=v[0],M[v]||(v=0)),v&&"none"!==v){var x=t.mgc;x?d=!0:x=m.color;var b=r.uid;d&&(b+="-"+t.i),y.gradient(e,i,b,v,[[0,x],[1,f]],"fill")}else s.fill(e,f);p&&s.stroke(e,h)}},y.makePointStyleFns=function(t){var e={},r=t.marker;return e.markerScale=y.tryColorscale(r,""),e.lineScale=y.tryColorscale(r,"line"),o.traceIs(t,"symbols")&&(e.ms2mrc=g.isBubble(t)?m(t):function(){return(r.size||6)/2}),t.selectedpoints&&c.extendFlat(e,y.makeSelectedPointStyleFns(t)),e},y.makeSelectedPointStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.marker||{},a=r.marker||{},s=n.marker||{},l=i.opacity,u=a.opacity,f=s.opacity,h=void 0!==u,p=void 0!==f;(c.isArrayOrTypedArray(l)||h||p)&&(e.selectedOpacityFn=function(t){var e=void 0===t.mo?i.opacity:t.mo;return t.selected?h?u:e:p?f:d*e});var g=i.color,m=a.color,v=s.color;(m||v)&&(e.selectedColorFn=function(t){var e=t.mcc||g;return t.selected?m||e:v||e});var y=i.size,x=a.size,b=s.size,_=void 0!==x,w=void 0!==b;return o.traceIs(t,"symbols")&&(_||w)&&(e.selectedSizeFn=function(t){var e=t.mrc||y/2;return t.selected?_?x/2:e:w?b/2:e}),e},y.makeSelectedTextStyleFns=function(t){var e={},r=t.selected||{},n=t.unselected||{},i=t.textfont||{},a=r.textfont||{},o=n.textfont||{},l=i.color,c=a.color,u=o.color;return e.selectedTextColorFn=function(t){var e=t.tc||l;return t.selected?c||e:u||(c?e:s.addOpacity(e,d))},e},y.selectedPointStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedPointStyleFns(e),i=e.marker||{},a=[];r.selectedOpacityFn&&a.push((function(t,e){t.style("opacity",r.selectedOpacityFn(e))})),r.selectedColorFn&&a.push((function(t,e){s.fill(t,r.selectedColorFn(e))})),r.selectedSizeFn&&a.push((function(t,e){var n=e.mx||i.symbol||0,a=r.selectedSizeFn(e);t.attr("d",_(y.symbolNumber(n),a)),e.mrc2=a})),a.length&&t.each((function(t){for(var e=n.select(this),r=0;r0?r:0}y.textPointStyle=function(t,e,r){if(t.size()){var i;if(e.selectedpoints){var a=y.makeSelectedTextStyleFns(e);i=a.selectedTextColorFn}var o=e.texttemplate,s=r._fullLayout;t.each((function(t){var a=n.select(this),l=o?c.extractOption(t,e,"txt","texttemplate"):c.extractOption(t,e,"tx","text");if(l||0===l){if(o){var u=e._module.formatLabels?e._module.formatLabels(t,e,s):{},h={};v(h,e,t.i);var p=e._meta||{};l=c.texttemplateString(l,u,s._d3locale,h,t,p)}var d=t.tp||e.textposition,g=E(t,e),m=i?i(t):t.tc||e.textfont.color;a.call(y.font,t.tf||e.textfont.family,g,m).text(l).call(f.convertToTspans,r).call(S,d,g,t.mrc)}else a.remove()}))}},y.selectedTextStyle=function(t,e){if(t.size()&&e.selectedpoints){var r=y.makeSelectedTextStyleFns(e);t.each((function(t){var i=n.select(this),a=r.selectedTextColorFn(t),o=t.tp||e.textposition,l=E(t,e);s.fill(i,a),S(i,o,l,t.mrc2||t.mrc)}))}};function C(t,e,r,i){var a=t[0]-e[0],o=t[1]-e[1],s=r[0]-e[0],l=r[1]-e[1],c=Math.pow(a*a+o*o,.25),u=Math.pow(s*s+l*l,.25),f=(u*u*a-c*c*s)*i,h=(u*u*o-c*c*l)*i,p=3*u*(c+u),d=3*c*(c+u);return[[n.round(e[0]+(p&&f/p),2),n.round(e[1]+(p&&h/p),2)],[n.round(e[0]-(d&&f/d),2),n.round(e[1]-(d&&h/d),2)]]}y.smoothopen=function(t,e){if(t.length<3)return"M"+t.join("L");var r,n="M"+t[0],i=[];for(r=1;r=1e4&&(y.savedBBoxes={},P=0),r&&(y.savedBBoxes[r]=m),P++,c.extendFlat({},m)},y.setClipUrl=function(t,e,r){t.attr("clip-path",O(e,r))},y.getTranslate=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||0,y:+e[1]||0}},y.setTranslate=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||0,r=r||0,a=a.replace(/(\btranslate\(.*?\);?)/,"").trim(),a=(a+=u(e,r)).trim(),t[i]("transform",a),a},y.getScale=function(t){var e=(t[t.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,(function(t,e,r){return[e,r].join(" ")})).split(" ");return{x:+e[0]||1,y:+e[1]||1}},y.setScale=function(t,e,r){var n=t.attr?"attr":"getAttribute",i=t.attr?"attr":"setAttribute",a=t[n]("transform")||"";return e=e||1,r=r||1,a=a.replace(/(\bscale\(.*?\);?)/,"").trim(),a=(a+="scale("+e+","+r+")").trim(),t[i]("transform",a),a};var D=/\s*sc.*/;y.setPointGroupScale=function(t,e,r){if(e=e||1,r=r||1,t){var n=1===e&&1===r?"":"scale("+e+","+r+")";t.each((function(){var t=(this.getAttribute("transform")||"").replace(D,"");t=(t+=n).trim(),this.setAttribute("transform",t)}))}};var R=/translate\([^)]*\)\s*$/;y.setTextPointsScale=function(t,e,r){t&&t.each((function(){var t,i=n.select(this),a=i.select("text");if(a.node()){var o=parseFloat(a.attr("x")||0),s=parseFloat(a.attr("y")||0),l=(i.attr("transform")||"").match(R);t=1===e&&1===r?[]:[u(o,s),"scale("+e+","+r+")",u(-o,-s)],l&&t.push(l),i.attr("transform",t.join(""))}}))}},{"../../components/fx/helpers":679,"../../constants/alignment":745,"../../constants/interactions":752,"../../constants/xmlns_namespaces":754,"../../lib":778,"../../lib/svg_text_utils":803,"../../registry":911,"../../traces/scatter/make_bubble_size_func":1204,"../../traces/scatter/subtypes":1212,"../color":643,"../colorscale":655,"./symbol_defs":666,d3:169,"fast-isnumeric":241,tinycolor2:576}],666:[function(t,e,r){"use strict";var n=t("d3");e.exports={circle:{n:0,f:function(t){var e=n.round(t,2);return"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"}},square:{n:1,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"}},diamond:{n:2,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"Z"}},cross:{n:3,f:function(t){var e=n.round(.4*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H"+e+"V"+r+"H-"+e+"V"+e+"H-"+r+"V-"+e+"H-"+e+"V-"+r+"H"+e+"V-"+e+"H"+r+"Z"}},x:{n:4,f:function(t){var e=n.round(.8*t/Math.sqrt(2),2),r="l"+e+","+e,i="l"+e+",-"+e,a="l-"+e+",-"+e,o="l-"+e+","+e;return"M0,"+e+r+i+a+i+a+o+a+o+r+o+r+"Z"}},"triangle-up":{n:5,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+","+n.round(t/2,2)+"H"+e+"L0,-"+n.round(t,2)+"Z"}},"triangle-down":{n:6,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+e+",-"+n.round(t/2,2)+"H"+e+"L0,"+n.round(t,2)+"Z"}},"triangle-left":{n:7,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M"+n.round(t/2,2)+",-"+e+"V"+e+"L-"+n.round(t,2)+",0Z"}},"triangle-right":{n:8,f:function(t){var e=n.round(2*t/Math.sqrt(3),2);return"M-"+n.round(t/2,2)+",-"+e+"V"+e+"L"+n.round(t,2)+",0Z"}},"triangle-ne":{n:9,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+r+",-"+e+"H"+e+"V"+r+"Z"}},"triangle-se":{n:10,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+e+",-"+r+"V"+e+"H-"+r+"Z"}},"triangle-sw":{n:11,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M"+r+","+e+"H-"+e+"V-"+r+"Z"}},"triangle-nw":{n:12,f:function(t){var e=n.round(.6*t,2),r=n.round(1.2*t,2);return"M-"+e+","+r+"V-"+e+"H"+r+"Z"}},pentagon:{n:13,f:function(t){var e=n.round(.951*t,2),r=n.round(.588*t,2),i=n.round(-t,2),a=n.round(-.309*t,2);return"M"+e+","+a+"L"+r+","+n.round(.809*t,2)+"H-"+r+"L-"+e+","+a+"L0,"+i+"Z"}},hexagon:{n:14,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M"+i+",-"+r+"V"+r+"L0,"+e+"L-"+i+","+r+"V-"+r+"L0,-"+e+"Z"}},hexagon2:{n:15,f:function(t){var e=n.round(t,2),r=n.round(t/2,2),i=n.round(t*Math.sqrt(3)/2,2);return"M-"+r+","+i+"H"+r+"L"+e+",0L"+r+",-"+i+"H-"+r+"L-"+e+",0Z"}},octagon:{n:16,f:function(t){var e=n.round(.924*t,2),r=n.round(.383*t,2);return"M-"+r+",-"+e+"H"+r+"L"+e+",-"+r+"V"+r+"L"+r+","+e+"H-"+r+"L-"+e+","+r+"V-"+r+"Z"}},star:{n:17,f:function(t){var e=1.4*t,r=n.round(.225*e,2),i=n.round(.951*e,2),a=n.round(.363*e,2),o=n.round(.588*e,2),s=n.round(-e,2),l=n.round(-.309*e,2),c=n.round(.118*e,2),u=n.round(.809*e,2);return"M"+r+","+l+"H"+i+"L"+a+","+c+"L"+o+","+u+"L0,"+n.round(.382*e,2)+"L-"+o+","+u+"L-"+a+","+c+"L-"+i+","+l+"H-"+r+"L0,"+s+"Z"}},hexagram:{n:18,f:function(t){var e=n.round(.66*t,2),r=n.round(.38*t,2),i=n.round(.76*t,2);return"M-"+i+",0l-"+r+",-"+e+"h"+i+"l"+r+",-"+e+"l"+r+","+e+"h"+i+"l-"+r+","+e+"l"+r+","+e+"h-"+i+"l-"+r+","+e+"l-"+r+",-"+e+"h-"+i+"Z"}},"star-triangle-up":{n:19,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M-"+e+","+r+o+e+","+r+o+"0,-"+i+o+"-"+e+","+r+"Z"}},"star-triangle-down":{n:20,f:function(t){var e=n.round(t*Math.sqrt(3)*.8,2),r=n.round(.8*t,2),i=n.round(1.6*t,2),a=n.round(4*t,2),o="A "+a+","+a+" 0 0 1 ";return"M"+e+",-"+r+o+"-"+e+",-"+r+o+"0,"+i+o+e+",-"+r+"Z"}},"star-square":{n:21,f:function(t){var e=n.round(1.1*t,2),r=n.round(2*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",-"+e+i+"-"+e+","+e+i+e+","+e+i+e+",-"+e+i+"-"+e+",-"+e+"Z"}},"star-diamond":{n:22,f:function(t){var e=n.round(1.4*t,2),r=n.round(1.9*t,2),i="A "+r+","+r+" 0 0 1 ";return"M-"+e+",0"+i+"0,"+e+i+e+",0"+i+"0,-"+e+i+"-"+e+",0Z"}},"diamond-tall":{n:23,f:function(t){var e=n.round(.7*t,2),r=n.round(1.4*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},"diamond-wide":{n:24,f:function(t){var e=n.round(1.4*t,2),r=n.round(.7*t,2);return"M0,"+r+"L"+e+",0L0,-"+r+"L-"+e+",0Z"}},hourglass:{n:25,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"H-"+e+"L"+e+",-"+e+"H-"+e+"Z"},noDot:!0},bowtie:{n:26,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"V-"+e+"L-"+e+","+e+"V-"+e+"Z"},noDot:!0},"circle-cross":{n:27,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(t){var e=n.round(t,2),r=n.round(t/Math.sqrt(2),2);return"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r+"M"+e+",0A"+e+","+e+" 0 1,1 0,-"+e+"A"+e+","+e+" 0 0,1 "+e+",0Z"},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(t){var e=n.round(t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"square-x":{n:30,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e+"M"+e+","+e+"H-"+e+"V-"+e+"H"+e+"Z"},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(t){var e=n.round(1.3*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM0,-"+e+"V"+e+"M-"+e+",0H"+e},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(t){var e=n.round(1.3*t,2),r=n.round(.65*t,2);return"M"+e+",0L0,"+e+"L-"+e+",0L0,-"+e+"ZM-"+r+",-"+r+"L"+r+","+r+"M-"+r+","+r+"L"+r+",-"+r},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e+"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(t){var e=n.round(1.2*t,2),r=n.round(.85*t,2);return"M0,"+e+"V-"+e+"M"+e+",0H-"+e+"M"+r+","+r+"L-"+r+",-"+r+"M"+r+",-"+r+"L-"+r+","+r},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(t){var e=n.round(t/2,2),r=n.round(t,2);return"M"+e+","+r+"V-"+r+"m-"+r+",0V"+r+"M"+r+","+e+"H-"+r+"m0,-"+r+"H"+r},needLine:!0,noFill:!0},"y-up":{n:37,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+","+i+"L0,0M"+e+","+i+"L0,0M0,-"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+e+",-"+i+"L0,0M"+e+",-"+i+"L0,0M0,"+r+"L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M"+i+","+e+"L0,0M"+i+",-"+e+"L0,0M-"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(t){var e=n.round(1.2*t,2),r=n.round(1.6*t,2),i=n.round(.8*t,2);return"M-"+i+","+e+"L0,0M-"+i+",-"+e+"L0,0M"+r+",0L0,0"},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(t){var e=n.round(1.4*t,2);return"M"+e+",0H-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(t){var e=n.round(1.4*t,2);return"M0,"+e+"V-"+e},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(t){var e=n.round(t,2);return"M"+e+",-"+e+"L-"+e+","+e},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(t){var e=n.round(t,2);return"M"+e+","+e+"L-"+e+",-"+e},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(t){var e=n.round(t,2);return"M0,0L-"+e+","+n.round(2*t,2)+"H"+e+"Z"},noDot:!0},"arrow-down":{n:46,f:function(t){var e=n.round(t,2);return"M0,0L-"+e+",-"+n.round(2*t,2)+"H"+e+"Z"},noDot:!0},"arrow-left":{n:47,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return"M0,0L"+e+",-"+r+"V"+r+"Z"},noDot:!0},"arrow-right":{n:48,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return"M0,0L-"+e+",-"+r+"V"+r+"Z"},noDot:!0},"arrow-bar-up":{n:49,f:function(t){var e=n.round(t,2);return"M-"+e+",0H"+e+"M0,0L-"+e+","+n.round(2*t,2)+"H"+e+"Z"},needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(t){var e=n.round(t,2);return"M-"+e+",0H"+e+"M0,0L-"+e+",-"+n.round(2*t,2)+"H"+e+"Z"},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return"M0,-"+r+"V"+r+"M0,0L"+e+",-"+r+"V"+r+"Z"},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(t){var e=n.round(2*t,2),r=n.round(t,2);return"M0,-"+r+"V"+r+"M0,0L-"+e+",-"+r+"V"+r+"Z"},needLine:!0,noDot:!0}}},{d3:169}],667:[function(t,e,r){"use strict";e.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},{}],668:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../registry"),a=t("../../plots/cartesian/axes"),o=t("../../lib"),s=t("./compute_error");function l(t,e,r,i){var l=e["error_"+i]||{},c=[];if(l.visible&&-1!==["linear","log"].indexOf(r.type)){for(var u=s(l),f=0;f0;e.each((function(e){var f,h=e[0].trace,p=h.error_x||{},d=h.error_y||{};h.ids&&(f=function(t){return t.id});var g=o.hasMarkers(h)&&h.marker.maxdisplayed>0;d.visible||p.visible||(e=[]);var m=n.select(this).selectAll("g.errorbar").data(e,f);if(m.exit().remove(),e.length){p.visible||m.selectAll("path.xerror").remove(),d.visible||m.selectAll("path.yerror").remove(),m.style("opacity",1);var v=m.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),a.setClipUrl(m,r.layerClipId,t),m.each((function(t){var e=n.select(this),r=function(t,e,r){var n={x:e.c2p(t.x),y:r.c2p(t.y)};void 0!==t.yh&&(n.yh=r.c2p(t.yh),n.ys=r.c2p(t.ys),i(n.ys)||(n.noYS=!0,n.ys=r.c2p(t.ys,!0)));void 0!==t.xh&&(n.xh=e.c2p(t.xh),n.xs=e.c2p(t.xs),i(n.xs)||(n.noXS=!0,n.xs=e.c2p(t.xs,!0)));return n}(t,l,c);if(!g||t.vis){var a,o=e.select("path.yerror");if(d.visible&&i(r.x)&&i(r.yh)&&i(r.ys)){var f=d.width;a="M"+(r.x-f)+","+r.yh+"h"+2*f+"m-"+f+",0V"+r.ys,r.noYS||(a+="m-"+f+",0h"+2*f),!o.size()?o=e.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0):u&&(o=o.transition().duration(s.duration).ease(s.easing)),o.attr("d",a)}else o.remove();var h=e.select("path.xerror");if(p.visible&&i(r.y)&&i(r.xh)&&i(r.xs)){var m=(p.copy_ystyle?d:p).width;a="M"+r.xh+","+(r.y-m)+"v"+2*m+"m0,-"+m+"H"+r.xs,r.noXS||(a+="m0,-"+m+"v"+2*m),!h.size()?h=e.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0):u&&(h=h.transition().duration(s.duration).ease(s.easing)),h.attr("d",a)}else h.remove()}}))}}))}},{"../../traces/scatter/subtypes":1212,"../drawing":665,d3:169,"fast-isnumeric":241}],673:[function(t,e,r){"use strict";var n=t("d3"),i=t("../color");e.exports=function(t){t.each((function(t){var e=t[0].trace,r=e.error_y||{},a=e.error_x||{},o=n.select(this);o.selectAll("path.yerror").style("stroke-width",r.thickness+"px").call(i.stroke,r.color),a.copy_ystyle&&(a=r),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)}))}},{"../color":643,d3:169}],674:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("./layout_attributes").hoverlabel,a=t("../../lib/extend").extendFlat;e.exports={hoverlabel:{bgcolor:a({},i.bgcolor,{arrayOk:!0}),bordercolor:a({},i.bordercolor,{arrayOk:!0}),font:n({arrayOk:!0,editType:"none"}),align:a({},i.align,{arrayOk:!0}),namelength:a({},i.namelength,{arrayOk:!0}),editType:"none"}}},{"../../lib/extend":768,"../../plots/font_attributes":856,"./layout_attributes":684}],675:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry");function a(t,e,r,i){i=i||n.identity,Array.isArray(t)&&(e[0][r]=i(t))}e.exports=function(t){var e=t.calcdata,r=t._fullLayout;function o(t){return function(e){return n.coerceHoverinfo({hoverinfo:e},{_module:t._module},r)}}for(var s=0;s=0&&r.indexb[0]._length||tt<0||tt>_[0]._length)return d.unhoverRaw(t,e)}if(e.pointerX=$+b[0]._offset,e.pointerY=tt+_[0]._offset,C="xval"in e?v.flat(s,e.xval):v.p2c(b,$),I="yval"in e?v.flat(s,e.yval):v.p2c(_,tt),!i(C[0])||!i(I[0]))return o.warn("Fx.hover failed",e,t),d.unhoverRaw(t,e)}var nt=1/0;function it(t,r){for(F=0;FY&&(Z.splice(0,Y),nt=Z[0].distance),g&&0!==X&&0===Z.length){G.distance=X,G.index=!1;var f=N._module.hoverPoints(G,q,H,"closest",l._hoverlayer);if(f&&(f=f.filter((function(t){return t.spikeDistance<=X}))),f&&f.length){var h,d=f.filter((function(t){return t.xa.showspikes&&"hovered data"!==t.xa.spikesnap}));if(d.length){var m=d[0];i(m.x0)&&i(m.y0)&&(h=ot(m),(!K.vLinePoint||K.vLinePoint.spikeDistance>h.spikeDistance)&&(K.vLinePoint=h))}var y=f.filter((function(t){return t.ya.showspikes&&"hovered data"!==t.ya.spikesnap}));if(y.length){var x=y[0];i(x.x0)&&i(x.y0)&&(h=ot(x),(!K.hLinePoint||K.hLinePoint.spikeDistance>h.spikeDistance)&&(K.hLinePoint=h))}}}}}function at(t,e){for(var r,n=null,i=1/0,a=0;a1||Z.length>1)||"closest"===S&&Q&&Z.length>1,At=p.combine(l.plot_bgcolor||p.background,l.paper_bgcolor),St={hovermode:S,rotateLabels:Mt,bgColor:At,container:l._hoverlayer,outerContainer:l._paperdiv,commonLabelOpts:l.hoverlabel,hoverdistance:l.hoverdistance},Et=L(Z,St,t);v.isUnifiedHover(S)||(!function(t,e,r){var n,i,a,o,s,l,c,u=0,f=1,h=t.size(),p=new Array(h),d=0;function g(t){var e=t[0],r=t[t.length-1];if(i=e.pmin-e.pos-e.dp+e.size,a=r.pos+r.dp+r.size-e.pmax,i>.01){for(s=t.length-1;s>=0;s--)t[s].dp+=i;n=!1}if(!(a<.01)){if(i<-.01){for(s=t.length-1;s>=0;s--)t[s].dp-=a;n=!1}if(n){var c=0;for(o=0;oe.pmax&&c++;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos>e.pmax-1&&(l.del=!0,c--);for(o=0;o=0;s--)t[s].dp-=a;for(o=t.length-1;o>=0&&!(c<=0);o--)(l=t[o]).pos+l.dp+l.size>e.pmax&&(l.del=!0,c--)}}}t.each((function(t){var n=t[e],i="x"===n._id.charAt(0),a=n.range;0===d&&a&&a[0]>a[1]!==i&&(f=-1),p[d++]=[{datum:t,traceIndex:t.trace.index,dp:0,pos:t.pos,posref:t.posref,size:t.by*(i?T:1)/2,pmin:0,pmax:i?r.width:r.height}]})),p.sort((function(t,e){return t[0].posref-e[0].posref||f*(e[0].traceIndex-t[0].traceIndex)}));for(;!n&&u<=h;){for(u++,n=!0,o=0;o.01&&y.pmin===x.pmin&&y.pmax===x.pmax){for(s=v.length-1;s>=0;s--)v[s].dp+=i;for(m.push.apply(m,v),p.splice(o+1,1),c=0,s=m.length-1;s>=0;s--)c+=m[s].dp;for(a=c/m.length,s=m.length-1;s>=0;s--)m[s].dp-=a;n=!1}else o++}p.forEach(g)}for(o=p.length-1;o>=0;o--){var b=p[o];for(s=b.length-1;s>=0;s--){var _=b[s],w=_.datum;w.offset=_.dp,w.del=_.del}}}(Et,Mt?"xa":"ya",l),P(Et,Mt,l._invScaleX,l._invScaleY));if(e.target&&e.target.tagName){var Ct=m.getComponentMethod("annotations","hasClickToShow")(t,_t);f(n.select(e.target),Ct?"pointer":"")}if(!e.target||a||!function(t,e,r){if(!r||r.length!==t._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var i=r[n],a=t._hoverdata[n];if(i.curveNumber!==a.curveNumber||String(i.pointNumber)!==String(a.pointNumber)||String(i.pointNumbers)!==String(a.pointNumbers))return!0}return!1}(t,0,bt))return;bt&&t.emit("plotly_unhover",{event:e,points:bt});t.emit("plotly_hover",{event:e,points:t._hoverdata,xaxes:b,yaxes:_,xvals:C,yvals:I})}(t,e,r,a)}))},r.loneHover=function(t,e){var r=!0;Array.isArray(t)||(r=!1,t=[t]);var i=t.map((function(t){return{color:t.color||p.defaultLine,x0:t.x0||t.x||0,x1:t.x1||t.x||0,y0:t.y0||t.y||0,y1:t.y1||t.y||0,xLabel:t.xLabel,yLabel:t.yLabel,zLabel:t.zLabel,text:t.text,name:t.name,idealAlign:t.idealAlign,borderColor:t.borderColor,fontFamily:t.fontFamily,fontSize:t.fontSize,fontColor:t.fontColor,nameLength:t.nameLength,textAlign:t.textAlign,trace:t.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:t.hovertemplate||!1,eventData:t.eventData||!1,hovertemplateLabels:t.hovertemplateLabels||!1}})),a=n.select(e.container),o=e.outerContainer?n.select(e.outerContainer):a,s={hovermode:"closest",rotateLabels:!1,bgColor:e.bgColor||p.background,container:a,outerContainer:o},l=L(i,s,e.gd),c=0,u=0;l.sort((function(t,e){return t.y0-e.y0})).each((function(t,r){var n=t.y0-t.by/2;t.offset=n-5([\s\S]*)<\/extra>/;function L(t,e,r){var i=r._fullLayout,a=e.hovermode,c=e.rotateLabels,f=e.bgColor,d=e.container,g=e.outerContainer,m=e.commonLabelOpts||{},w=e.fontFamily||y.HOVERFONT,T=e.fontSize||y.HOVERFONTSIZE,k=t[0],M=k.xa,C=k.ya,L="y"===a.charAt(0)?"yLabel":"xLabel",P=k[L],z=(String(P)||"").split(" ")[0],O=g.node().getBoundingClientRect(),D=O.top,R=O.width,F=O.height,B=void 0!==P&&k.distance<=e.hoverdistance&&("x"===a||"y"===a);if(B){var N,j,U=!0;for(N=0;Ni.width-E?(y=i.width-E,l.attr("d","M"+(E-A)+",0L"+E+","+_+A+"v"+_+(2*S+b.height)+"H-"+E+"V"+_+A+"H"+(E-2*A)+"Z")):l.attr("d","M0,0L"+A+","+_+A+"H"+(S+b.width/2)+"v"+_+(2*S+b.height)+"H-"+(S+b.width/2)+"V"+_+A+"H-"+A+"Z")}else{var L,I,z;"right"===C.side?(L="start",I=1,z="",y=M._offset+M._length):(L="end",I=-1,z="-",y=M._offset),x=C._offset+(k.y0+k.y1)/2,c.attr("text-anchor",L),l.attr("d","M0,0L"+z+A+","+A+"V"+(S+b.height/2)+"h"+z+(2*S+b.width)+"V-"+(S+b.height/2)+"H"+z+A+"V-"+A+"Z");var O,R=b.height/2,F=D-b.top-R,B="clip"+i._uid+"commonlabel"+C._id;if(y=0?et-=it:et+=2*S;var at=nt.height+2*S,ot=tt+at>=F;return at<=F&&(tt<=D?tt=C._offset+2*S:ot&&(tt=F-at)),rt.attr("transform",s(et,tt)),rt}var st=d.selectAll("g.hovertext").data(t,(function(t){return E(t)}));return st.enter().append("g").classed("hovertext",!0).each((function(){var t=n.select(this);t.append("rect").call(p.fill,p.addOpacity(f,.8)),t.append("text").classed("name",!0),t.append("path").style("stroke-width","1px"),t.append("text").classed("nums",!0).call(h.font,w,T)})),st.exit().remove(),st.each((function(t){var e=n.select(this).attr("transform",""),o=t.color;Array.isArray(o)&&(o=o[t.eventData[0].pointNumber]);var d=t.bgcolor||o,g=p.combine(p.opacity(d)?d:p.defaultLine,f),m=p.combine(p.opacity(o)?o:p.defaultLine,f),v=t.borderColor||p.contrast(g),y=I(t,B,a,i,P,e),x=y[0],b=y[1],k=e.select("text.nums").call(h.font,t.fontFamily||w,t.fontSize||T,t.fontColor||v).text(x).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,r),M=e.select("text.name"),E=0,C=0;if(b&&b!==x){M.call(h.font,t.fontFamily||w,t.fontSize||T,m).text(b).attr("data-notex",1).call(u.positionText,0,0).call(u.convertToTspans,r);var L=M.node().getBoundingClientRect();E=L.width+2*S,C=L.height+2*S}else M.remove(),e.select("rect").remove();e.select("path").style({fill:g,stroke:v});var z,O,N=k.node().getBoundingClientRect(),j=t.xa._offset+(t.x0+t.x1)/2,U=t.ya._offset+(t.y0+t.y1)/2,V=Math.abs(t.x1-t.x0),q=Math.abs(t.y1-t.y0),H=N.width+A+S+E;if(t.ty0=D-N.top,t.bx=N.width+2*S,t.by=Math.max(N.height+2*S,C),t.anchor="start",t.txwidth=N.width,t.tx2width=E,t.offset=0,c)t.pos=j,z=U+q/2+H<=F,O=U-q/2-H>=0,"top"!==t.idealAlign&&z||!O?z?(U+=q/2,t.anchor="start"):t.anchor="middle":(U-=q/2,t.anchor="end");else if(t.pos=U,z=j+V/2+H<=R,O=j-V/2-H>=0,"left"!==t.idealAlign&&z||!O)if(z)j+=V/2,t.anchor="start";else{t.anchor="middle";var G=H/2,Y=j+G-R,W=j-G;Y>0&&(j-=Y),W<0&&(j+=-W)}else j-=V/2,t.anchor="end";k.attr("text-anchor",t.anchor),E&&M.attr("text-anchor",t.anchor),e.attr("transform",s(j,U)+(c?l(_):""))})),st}function I(t,e,r,n,i,a){var s="",l="";void 0!==t.nameOverride&&(t.name=t.nameOverride),t.name&&(t.trace._meta&&(t.name=o.templateString(t.name,t.trace._meta)),s=R(t.name,t.nameLength)),void 0!==t.zLabel?(void 0!==t.xLabel&&(l+="x: "+t.xLabel+"
    "),void 0!==t.yLabel&&(l+="y: "+t.yLabel+"
    "),"choropleth"!==t.trace.type&&"choroplethmapbox"!==t.trace.type&&(l+=(l?"z: ":"")+t.zLabel)):e&&t[r.charAt(0)+"Label"]===i?l=t[("x"===r.charAt(0)?"y":"x")+"Label"]||"":void 0===t.xLabel?void 0!==t.yLabel&&"scattercarpet"!==t.trace.type&&(l=t.yLabel):l=void 0===t.yLabel?t.xLabel:"("+t.xLabel+", "+t.yLabel+")",!t.text&&0!==t.text||Array.isArray(t.text)||(l+=(l?"
    ":"")+t.text),void 0!==t.extraText&&(l+=(l?"
    ":"")+t.extraText),a&&""===l&&!t.hovertemplate&&(""===s&&a.remove(),l=s);var c=n._d3locale,u=t.hovertemplate||!1,f=t.hovertemplateLabels||t,h=t.eventData[0]||{};return u&&(l=(l=o.hovertemplateString(u,f,c,h,t.trace._meta)).replace(C,(function(e,r){return s=R(r,t.nameLength),""}))),[l,s]}function P(t,e,r,i){var a=function(t){return t*r},o=function(t){return t*i};t.each((function(t){var r=n.select(this);if(t.del)return r.remove();var i=r.select("text.nums"),s=t.anchor,l="end"===s?-1:1,c={start:1,end:-1,middle:0}[s],f=c*(A+S),p=f+c*(t.txwidth+S),d=0,g=t.offset,m="middle"===s;m&&(f-=t.tx2width/2,p+=t.txwidth/2+S),e&&(g*=-M,d=t.offset*k),r.select("path").attr("d",m?"M-"+a(t.bx/2+t.tx2width/2)+","+o(g-t.by/2)+"h"+a(t.bx)+"v"+o(t.by)+"h-"+a(t.bx)+"Z":"M0,0L"+a(l*A+d)+","+o(A+g)+"v"+o(t.by/2-A)+"h"+a(l*t.bx)+"v-"+o(t.by)+"H"+a(l*A+d)+"V"+o(g-A)+"Z");var v=d+f,y=g+t.ty0-t.by/2+S,x=t.textAlign||"auto";"auto"!==x&&("left"===x&&"start"!==s?(i.attr("text-anchor","start"),v=m?-t.bx/2-t.tx2width/2+S:-t.bx-S):"right"===x&&"end"!==s&&(i.attr("text-anchor","end"),v=m?t.bx/2-t.tx2width/2-S:t.bx+S)),i.call(u.positionText,a(v),o(y)),t.tx2width&&(r.select("text.name").call(u.positionText,a(p+c*S+d),o(g+t.ty0-t.by/2+S)),r.select("rect").call(h.setRect,a(p+(c-1)*t.tx2width/2+d),o(g-t.by/2-1),a(t.tx2width),o(t.by+2)))}))}function z(t,e){var r=t.index,n=t.trace||{},a=t.cd[0],s=t.cd[r]||{};function l(t){return t||i(t)&&0===t}var c=Array.isArray(r)?function(t,e){var i=o.castOption(a,r,t);return l(i)?i:o.extractOption({},n,"",e)}:function(t,e){return o.extractOption(s,n,t,e)};function u(e,r,n){var i=c(r,n);l(i)&&(t[e]=i)}if(u("hoverinfo","hi","hoverinfo"),u("bgcolor","hbg","hoverlabel.bgcolor"),u("borderColor","hbc","hoverlabel.bordercolor"),u("fontFamily","htf","hoverlabel.font.family"),u("fontSize","hts","hoverlabel.font.size"),u("fontColor","htc","hoverlabel.font.color"),u("nameLength","hnl","hoverlabel.namelength"),u("textAlign","hta","hoverlabel.align"),t.posref="y"===e||"closest"===e&&"h"===n.orientation?t.xa._offset+(t.x0+t.x1)/2:t.ya._offset+(t.y0+t.y1)/2,t.x0=o.constrain(t.x0,0,t.xa._length),t.x1=o.constrain(t.x1,0,t.xa._length),t.y0=o.constrain(t.y0,0,t.ya._length),t.y1=o.constrain(t.y1,0,t.ya._length),void 0!==t.xLabelVal&&(t.xLabel="xLabel"in t?t.xLabel:g.hoverLabelText(t.xa,t.xLabelVal),t.xVal=t.xa.c2d(t.xLabelVal)),void 0!==t.yLabelVal&&(t.yLabel="yLabel"in t?t.yLabel:g.hoverLabelText(t.ya,t.yLabelVal),t.yVal=t.ya.c2d(t.yLabelVal)),void 0!==t.zLabelVal&&void 0===t.zLabel&&(t.zLabel=String(t.zLabelVal)),!(isNaN(t.xerr)||"log"===t.xa.type&&t.xerr<=0)){var f=g.tickText(t.xa,t.xa.c2l(t.xerr),"hover").text;void 0!==t.xerrneg?t.xLabel+=" +"+f+" / -"+g.tickText(t.xa,t.xa.c2l(t.xerrneg),"hover").text:t.xLabel+=" \xb1 "+f,"x"===e&&(t.distance+=1)}if(!(isNaN(t.yerr)||"log"===t.ya.type&&t.yerr<=0)){var h=g.tickText(t.ya,t.ya.c2l(t.yerr),"hover").text;void 0!==t.yerrneg?t.yLabel+=" +"+h+" / -"+g.tickText(t.ya,t.ya.c2l(t.yerrneg),"hover").text:t.yLabel+=" \xb1 "+h,"y"===e&&(t.distance+=1)}var p=t.hoverinfo||t.trace.hoverinfo;return p&&"all"!==p&&(-1===(p=Array.isArray(p)?p:p.split("+")).indexOf("x")&&(t.xLabel=void 0),-1===p.indexOf("y")&&(t.yLabel=void 0),-1===p.indexOf("z")&&(t.zLabel=void 0),-1===p.indexOf("text")&&(t.text=void 0),-1===p.indexOf("name")&&(t.name=void 0)),t}function O(t,e,r){var n,i,o=r.container,s=r.fullLayout,l=s._size,c=r.event,u=!!e.hLinePoint,f=!!e.vLinePoint;if(o.selectAll(".spikeline").remove(),f||u){var d=p.combine(s.plot_bgcolor,s.paper_bgcolor);if(u){var m,v,y=e.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(m=c.pointerX,v=c.pointerY):(m=n._offset+y.x,v=i._offset+y.y);var x,b,_=a.readability(y.color,d)<1.5?p.contrast(d):y.color,w=i.spikemode,T=i.spikethickness,k=i.spikecolor||_,M=g.getPxPosition(t,i);if(-1!==w.indexOf("toaxis")||-1!==w.indexOf("across")){if(-1!==w.indexOf("toaxis")&&(x=M,b=m),-1!==w.indexOf("across")){var A=i._counterDomainMin,S=i._counterDomainMax;"free"===i.anchor&&(A=Math.min(A,i.position),S=Math.max(S,i.position)),x=l.l+A*l.w,b=l.l+S*l.w}o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T,stroke:k,"stroke-dasharray":h.dashStyle(i.spikedash,T)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:x,x2:b,y1:v,y2:v,"stroke-width":T+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==w.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:M+("right"!==i.side?T:-T),cy:v,r:T,fill:k}).classed("spikeline",!0)}if(f){var E,C,L=e.vLinePoint;n=L&&L.xa,i=L&&L.ya,"cursor"===n.spikesnap?(E=c.pointerX,C=c.pointerY):(E=n._offset+L.x,C=i._offset+L.y);var I,P,z=a.readability(L.color,d)<1.5?p.contrast(d):L.color,O=n.spikemode,D=n.spikethickness,R=n.spikecolor||z,F=g.getPxPosition(t,n);if(-1!==O.indexOf("toaxis")||-1!==O.indexOf("across")){if(-1!==O.indexOf("toaxis")&&(I=F,P=C),-1!==O.indexOf("across")){var B=n._counterDomainMin,N=n._counterDomainMax;"free"===n.anchor&&(B=Math.min(B,n.position),N=Math.max(N,n.position)),I=l.t+(1-N)*l.h,P=l.t+(1-B)*l.h}o.insert("line",":first-child").attr({x1:E,x2:E,y1:I,y2:P,"stroke-width":D,stroke:R,"stroke-dasharray":h.dashStyle(n.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),o.insert("line",":first-child").attr({x1:E,x2:E,y1:I,y2:P,"stroke-width":D+2,stroke:d}).classed("spikeline",!0).classed("crisp",!0)}-1!==O.indexOf("marker")&&o.insert("circle",":first-child").attr({cx:E,cy:F-("top"!==n.side?D:-D),r:D,fill:R}).classed("spikeline",!0)}}}function D(t,e){return!e||(e.vLinePoint!==t._spikepoints.vLinePoint||e.hLinePoint!==t._spikepoints.hLinePoint)}function R(t,e){return u.plainText(t||"",{len:e,allowedTags:["br","sub","sup","b","i","em"]})}},{"../../lib":778,"../../lib/events":767,"../../lib/override_cursor":789,"../../lib/svg_text_utils":803,"../../plots/cartesian/axes":828,"../../registry":911,"../color":643,"../dragelement":662,"../drawing":665,"../legend/defaults":695,"../legend/draw":696,"./constants":677,"./helpers":679,d3:169,"fast-isnumeric":241,tinycolor2:576}],681:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../color"),a=t("./helpers").isUnifiedHover;e.exports=function(t,e,r,o){function s(t){o.font[t]||(o.font[t]=e.legend?e.legend.font[t]:e.font[t])}o=o||{},e&&a(e.hovermode)&&(o.font||(o.font={}),s("size"),s("family"),s("color"),e.legend?(o.bgcolor||(o.bgcolor=i.combine(e.legend.bgcolor,e.paper_bgcolor)),o.bordercolor||(o.bordercolor=e.legend.bordercolor)):o.bgcolor||(o.bgcolor=e.paper_bgcolor)),r("hoverlabel.bgcolor",o.bgcolor),r("hoverlabel.bordercolor",o.bordercolor),r("hoverlabel.namelength",o.namelength),n.coerceFont(r,"hoverlabel.font",o.font),r("hoverlabel.align",o.align)}},{"../../lib":778,"../color":643,"./helpers":679}],682:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e,r){function a(r,a){return void 0!==e[r]?e[r]:n.coerce(t,e,i,r,a)}var o,s=a("clickmode");return e._has("cartesian")?s.indexOf("select")>-1?o="closest":(e._isHoriz=function(t,e){for(var r=e._scatterStackOpts||{},n=0;n1){if(!h&&!p&&!d)"independent"===k("pattern")&&(h=!0);m._hasSubplotGrid=h;var x,b,_="top to bottom"===k("roworder"),w=h?.2:.1,T=h?.3:.1;g&&e._splomGridDflt&&(x=e._splomGridDflt.xside,b=e._splomGridDflt.yside),m._domains={x:u("x",k,w,x,y),y:u("y",k,T,b,v,_)}}else delete e.grid}function k(t,e){return n.coerce(r,m,l,t,e)}},contentDefaults:function(t,e){var r=e.grid;if(r&&r._domains){var n,i,a,o,s,l,u,h=t.grid||{},p=e._subplots,d=r._hasSubplotGrid,g=r.rows,m=r.columns,v="independent"===r.pattern,y=r._axisMap={};if(d){var x=h.subplots||[];l=r.subplots=new Array(g);var b=1;for(n=0;n1);if(!1!==g||c.uirevision){var m=a.newContainer(e,"legend");if(_("uirevision",e.uirevision),!1!==g){_("bgcolor",e.paper_bgcolor),_("bordercolor"),_("borderwidth"),i.coerceFont(_,"font",e.font);var v,y,x,b=_("orientation");"h"===b?(v=0,n.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(y=1.1,x="bottom"):(y=-.1,x="top")):(v=1.02,y=1,x="auto"),_("traceorder",h),l.isGrouped(e.legend)&&_("tracegroupgap"),_("itemsizing"),_("itemwidth"),_("itemclick"),_("itemdoubleclick"),_("x",v),_("xanchor"),_("y",y),_("yanchor",x),_("valign"),i.noneOrAll(c,m,["x","y"]),_("title.text")&&(_("title.side","h"===b?"left":"top"),i.coerceFont(_,"title.font",e.font))}}function _(t,e){return i.coerce(c,m,o,t,e)}}},{"../../lib":778,"../../plot_api/plot_template":817,"../../plots/layout_attributes":882,"../../registry":911,"./attributes":693,"./helpers":699}],696:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib/events"),l=t("../dragelement"),c=t("../drawing"),u=t("../color"),f=t("../../lib/svg_text_utils"),h=t("./handle_click"),p=t("./constants"),d=t("../../constants/alignment"),g=d.LINE_SPACING,m=d.FROM_TL,v=d.FROM_BR,y=t("./get_legend_data"),x=t("./style"),b=t("./helpers");function _(t,e,r,n,i){var a=r.data()[0][0].trace,l={event:i,node:r.node(),curveNumber:a.index,expandedIndex:a._expandedIndex,data:t.data,layout:t.layout,frames:t._transitionData._frames,config:t._context,fullData:t._fullData,fullLayout:t._fullLayout};if(a._group&&(l.group=a._group),o.traceIs(a,"pie-like")&&(l.label=r.datum()[0].label),!1!==s.triggerHandler(t,"plotly_legendclick",l))if(1===n)e._clickTimeout=setTimeout((function(){h(r,t,n)}),t._context.doubleClickDelay);else if(2===n){e._clickTimeout&&clearTimeout(e._clickTimeout),t._legendMouseDownTime=0,!1!==s.triggerHandler(t,"plotly_legenddoubleclick",l)&&h(r,t,n)}}function w(t,e,r){var n,a=t.data()[0][0],s=a.trace,l=o.traceIs(s,"pie-like"),u=s.index,h=r._main&&e._context.edits.legendText&&!l,d=r._maxNameLength;r.entries?n=a.text:(n=l?a.label:s.name,s._meta&&(n=i.templateString(n,s._meta)));var g=i.ensureSingle(t,"text","legendtext");g.attr("text-anchor","start").call(c.font,r.font).text(h?T(n,d):n);var m=r.itemwidth+2*p.itemGap;f.positionText(g,m,0),h?g.call(f.makeEditable,{gd:e,text:n}).call(M,t,e,r).on("edit",(function(n){this.text(T(n,d)).call(M,t,e,r);var s=a.trace._fullInput||{},l={};if(o.hasTransform(s,"groupby")){var c=o.getTransformIndices(s,"groupby"),f=c[c.length-1],h=i.keyedContainer(s,"transforms["+f+"].styles","target","value.name");h.set(a.trace._group,n),l=h.constructUpdate()}else l.name=n;return o.call("_guiRestyle",e,l,u)})):M(g,t,e,r)}function T(t,e){var r=Math.max(4,e);if(t&&t.trim().length>=r/2)return t;for(var n=r-(t=t||"").length;n>0;n--)t+=" ";return t}function k(t,e){var r,a=e._context.doubleClickDelay,o=1,s=i.ensureSingle(t,"rect","legendtoggle",(function(t){e._context.staticPlot||t.style("cursor","pointer").attr("pointer-events","all"),t.call(u.fill,"rgba(0,0,0,0)")}));e._context.staticPlot||(s.on("mousedown",(function(){(r=(new Date).getTime())-e._legendMouseDownTimea&&(o=Math.max(o-1,1)),_(e,r,t,o,n.event)}})))}function M(t,e,r,n){n._main||t.attr("data-notex",!0),f.convertToTspans(t,r,(function(){!function(t,e,r){var n=t.data()[0][0];if(r._main&&n&&!n.trace.showlegend)return void t.remove();var i=t.select("g[class*=math-group]"),a=i.node();r||(r=e._fullLayout.legend);var o,s,l=r.borderwidth,u=(n?r:r.title).font.size*g;if(a){var h=c.bBox(a);o=h.height,s=h.width,n?c.setTranslate(i,0,.25*o):c.setTranslate(i,l,.75*o+l)}else{var d=t.select(n?".legendtext":".legendtitletext"),m=f.lineCount(d),v=d.node();o=u*m,s=v?c.bBox(v).width:0;var y=u*((m-1)/2-.3);if(n){var x=r.itemwidth+2*p.itemGap;f.positionText(d,x,-y)}else f.positionText(d,p.titlePad+l,u+l)}n?(n.lineHeight=u,n.height=Math.max(o,16)+3,n.width=s):(r._titleWidth=s,r._titleHeight=o)}(e,r,n)}))}function A(t){return i.isRightAnchor(t)?"right":i.isCenterAnchor(t)?"center":"left"}function S(t){return i.isBottomAnchor(t)?"bottom":i.isMiddleAnchor(t)?"middle":"top"}e.exports=function(t,e){var r,s=t._fullLayout,f="legend"+s._uid;if(e?(r=e.layer,f+="-hover"):((e=s.legend||{})._main=!0,r=s._infolayer),r){var h;if(t._legendMouseDownTime||(t._legendMouseDownTime=0),e._main){if(!t.calcdata)return;h=s.showlegend&&y(t.calcdata,e)}else{if(!e.entries)return;h=y(e.entries,e)}var d=s.hiddenlabels||[];if(e._main&&(!s.showlegend||!h.length))return r.selectAll(".legend").remove(),s._topdefs.select("#"+f).remove(),a.autoMargin(t,"legend");var g=i.ensureSingle(r,"g","legend",(function(t){e._main&&t.attr("pointer-events","all")})),T=i.ensureSingleById(s._topdefs,"clipPath",f,(function(t){t.append("rect")})),E=i.ensureSingle(g,"rect","bg",(function(t){t.attr("shape-rendering","crispEdges")}));E.call(u.stroke,e.bordercolor).call(u.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px");var C=i.ensureSingle(g,"g","scrollbox"),L=e.title;if(e._titleWidth=0,e._titleHeight=0,L.text){var I=i.ensureSingle(C,"text","legendtitletext");I.attr("text-anchor","start").call(c.font,L.font).text(L.text),M(I,C,t,e)}else C.selectAll(".legendtitletext").remove();var P=i.ensureSingle(g,"rect","scrollbar",(function(t){t.attr(p.scrollBarEnterAttrs).call(u.fill,p.scrollBarColor)})),z=C.selectAll("g.groups").data(h);z.enter().append("g").attr("class","groups"),z.exit().remove();var O=z.selectAll("g.traces").data(i.identity);O.enter().append("g").attr("class","traces"),O.exit().remove(),O.style("opacity",(function(t){var e=t[0].trace;return o.traceIs(e,"pie-like")?-1!==d.indexOf(t[0].label)?.5:1:"legendonly"===e.visible?.5:1})).each((function(){n.select(this).call(w,t,e)})).call(x,t,e).each((function(){e._main&&n.select(this).call(k,t)})),i.syncOrAsync([a.previousPromises,function(){return function(t,e,r,i){var a=t._fullLayout;i||(i=a.legend);var o=a._size,s=b.isVertical(i),l=b.isGrouped(i),u=i.borderwidth,f=2*u,h=p.itemGap,d=i.itemwidth+2*h,g=2*(u+h),m=S(i),v=i.y<0||0===i.y&&"top"===m,y=i.y>1||1===i.y&&"bottom"===m;i._maxHeight=Math.max(v||y?a.height/2:o.h,30);var x=0;i._width=0,i._height=0;var _=function(t){var e=0,r=0,n=t.title.side;n&&(-1!==n.indexOf("left")&&(e=t._titleWidth),-1!==n.indexOf("top")&&(r=t._titleHeight));return[e,r]}(i);if(s)r.each((function(t){var e=t[0].height;c.setTranslate(this,u+_[0],u+_[1]+i._height+e/2+h),i._height+=e,i._width=Math.max(i._width,t[0].width)})),x=d+i._width,i._width+=h+d+f,i._height+=g,l&&(e.each((function(t,e){c.setTranslate(this,0,e*i.tracegroupgap)})),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var w=A(i),T=i.x<0||0===i.x&&"right"===w,k=i.x>1||1===i.x&&"left"===w,M=y||v,E=a.width/2;i._maxWidth=Math.max(T?M&&"left"===w?o.l+o.w:E:k?M&&"right"===w?o.r+o.w:E:o.w,2*d);var C=0,L=0;r.each((function(t){var e=t[0].width+d;C=Math.max(C,e),L+=e})),x=null;var I=0;if(l){var P=0,z=0,O=0;e.each((function(){var t=0,e=0;n.select(this).selectAll("g.traces").each((function(r){var n=r[0].height;c.setTranslate(this,_[0],_[1]+u+h+n/2+e),e+=n,t=Math.max(t,d+r[0].width)})),P=Math.max(P,e);var r=t+h;r+u+z>i._maxWidth&&(I=Math.max(I,z),z=0,O+=P+i.tracegroupgap,P=e),c.setTranslate(this,z,O),z+=r})),i._width=Math.max(I,z)+u,i._height=O+P+g}else{var D=r.size(),R=L+f+(D-1)*h=i._maxWidth&&(I=Math.max(I,j),B=0,N+=F,i._height+=F,F=0),c.setTranslate(this,_[0]+u+B,_[1]+u+N+e/2+h),j=B+r+h,B+=n,F=Math.max(F,e)})),R?(i._width=B+f,i._height=F+g):(i._width=Math.max(I,j)+f,i._height+=F+g)}}i._width=Math.ceil(Math.max(i._width+_[0],i._titleWidth+2*(u+p.titlePad))),i._height=Math.ceil(Math.max(i._height+_[1],i._titleHeight+2*(u+p.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var U=t._context.edits,V=U.legendText||U.legendPosition;r.each((function(t){var e=n.select(this).select(".legendtoggle"),r=t[0].height,i=V?d:x||d+t[0].width;s||(i+=h/2),c.setRect(e,0,-r/2,i,r)}))}(t,z,O,e)},function(){if(!e._main||!function(t){var e=t._fullLayout.legend,r=A(e),n=S(e);return a.autoMargin(t,"legend",{x:e.x,y:e.y,l:e._width*m[r],r:e._width*v[r],b:e._effHeight*v[n],t:e._effHeight*m[n]})}(t)){var u,h,d,y,x=s._size,b=e.borderwidth,w=x.l+x.w*e.x-m[A(e)]*e._width,k=x.t+x.h*(1-e.y)-m[S(e)]*e._effHeight;if(e._main&&s.margin.autoexpand){var M=w,L=k;w=i.constrain(w,0,s.width-e._width),k=i.constrain(k,0,s.height-e._effHeight),w!==M&&i.log("Constrain legend.x to make legend fit inside graph"),k!==L&&i.log("Constrain legend.y to make legend fit inside graph")}if(e._main&&c.setTranslate(g,w,k),P.on(".drag",null),g.on("wheel",null),!e._main||e._height<=e._maxHeight||t._context.staticPlot){var I=e._effHeight;e._main||(I=e._height),E.attr({width:e._width-b,height:I-b,x:b/2,y:b/2}),c.setTranslate(C,0,0),T.select("rect").attr({width:e._width-2*b,height:I-2*b,x:b,y:b}),c.setClipUrl(C,f,t),c.setRect(P,0,0,0,0),delete e._scrollY}else{var z,O,D,R=Math.max(p.scrollBarMinHeight,e._effHeight*e._effHeight/e._height),F=e._effHeight-R-2*p.scrollBarMargin,B=e._height-e._effHeight,N=F/B,j=Math.min(e._scrollY||0,B);E.attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-b,x:b/2,y:b/2}),T.select("rect").attr({width:e._width-2*b+p.scrollBarWidth+p.scrollBarMargin,height:e._effHeight-2*b,x:b,y:b+j}),c.setClipUrl(C,f,t),q(j,R,N),g.on("wheel",(function(){q(j=i.constrain(e._scrollY+n.event.deltaY/F*B,0,B),R,N),0!==j&&j!==B&&n.event.preventDefault()}));var U=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;z="touchstart"===t.type?t.changedTouches[0].clientY:t.clientY,D=j})).on("drag",(function(){var t=n.event.sourceEvent;2===t.buttons||t.ctrlKey||(O="touchmove"===t.type?t.changedTouches[0].clientY:t.clientY,q(j=function(t,e,r){var n=(r-e)/N+t;return i.constrain(n,0,B)}(D,z,O),R,N))}));P.call(U);var V=n.behavior.drag().on("dragstart",(function(){var t=n.event.sourceEvent;"touchstart"===t.type&&(z=t.changedTouches[0].clientY,D=j)})).on("drag",(function(){var t=n.event.sourceEvent;"touchmove"===t.type&&(O=t.changedTouches[0].clientY,q(j=function(t,e,r){var n=(e-r)/N+t;return i.constrain(n,0,B)}(D,z,O),R,N))}));C.call(V)}if(t._context.edits.legendPosition)g.classed("cursor-move",!0),l.init({element:g.node(),gd:t,prepFn:function(){var t=c.getTranslate(g);d=t.x,y=t.y},moveFn:function(t,r){var n=d+t,i=y+r;c.setTranslate(g,n,i),u=l.align(n,0,x.l,x.l+x.w,e.xanchor),h=l.align(i,0,x.t+x.h,x.t,e.yanchor)},doneFn:function(){void 0!==u&&void 0!==h&&o.call("_guiRelayout",t,{"legend.x":u,"legend.y":h})},clickFn:function(e,n){var i=r.selectAll("g.traces").filter((function(){var t=this.getBoundingClientRect();return n.clientX>=t.left&&n.clientX<=t.right&&n.clientY>=t.top&&n.clientY<=t.bottom}));i.size()>0&&_(t,g,i,e,n)}})}function q(r,n,i){e._scrollY=t._fullLayout.legend._scrollY=r,c.setTranslate(C,0,-r),c.setRect(P,e._width,p.scrollBarMargin+r*i,p.scrollBarWidth,n),T.select("rect").attr("y",b+r)}}],t)}}},{"../../constants/alignment":745,"../../lib":778,"../../lib/events":767,"../../lib/svg_text_utils":803,"../../plots/plots":891,"../../registry":911,"../color":643,"../dragelement":662,"../drawing":665,"./constants":694,"./get_legend_data":697,"./handle_click":698,"./helpers":699,"./style":701,d3:169}],697:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("./helpers");e.exports=function(t,e){var r,a,o={},s=[],l=!1,c={},u=0,f=0,h=e._main;function p(t,r){if(""!==t&&i.isGrouped(e))-1===s.indexOf(t)?(s.push(t),l=!0,o[t]=[[r]]):o[t].push([r]);else{var n="~~i"+u;s.push(n),o[n]=[[r]],u++}}for(r=0;r0))return 0;i=e.width}return m?n:Math.min(i,r)};function _(t,e,r){var a=t[0].trace,o=a.marker||{},s=o.line||{},c=r?a.visible&&a.type===r:i.traceIs(a,"bar"),u=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(c?[t]:[]);u.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),u.exit().remove(),u.each((function(t){var e=n.select(this),r=t[0],i=b(r.mlw,o.line,5,2);e.style("stroke-width",i+"px").call(l.fill,r.mc||o.color),i&&l.stroke(e,r.mlc||s.color)}))}function w(t,e,r){var o=t[0],s=o.trace,l=r?s.visible&&s.type===r:i.traceIs(s,r),c=n.select(e).select("g.legendpoints").selectAll("path.legend"+r).data(l?[t]:[]);if(c.enter().append("path").classed("legend"+r,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),c.exit().remove(),c.size()){var u=(s.marker||{}).line,p=b(h(u.width,o.pts),u,5,2),d=a.minExtend(s,{marker:{line:{width:p}}});d.marker.line.color=u.color;var g=a.minExtend(o,{trace:d});f(c,g,d)}}t.each((function(t){var e=n.select(this),i=a.ensureSingle(e,"g","layers");i.style("opacity",t[0].trace.opacity);var s=r.valign,l=t[0].lineHeight,c=t[0].height;if("middle"!==s&&l&&c){var u={top:1,bottom:-1}[s]*(.5*(l-c+3));i.attr("transform",o(0,u))}else i.attr("transform",null);i.selectAll("g.legendfill").data([t]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([t]).enter().append("g").classed("legendlines",!0);var f=i.selectAll("g.legendsymbols").data([t]);f.enter().append("g").classed("legendsymbols",!0),f.selectAll("g.legendpoints").data([t]).enter().append("g").classed("legendpoints",!0)})).each((function(t){var r,i=t[0].trace,o=[];if(i.visible)switch(i.type){case"histogram2d":case"heatmap":o=[["M-15,-2V4H15V-2Z"]],r=!0;break;case"choropleth":case"choroplethmapbox":o=[["M-6,-6V6H6V-6Z"]],r=!0;break;case"densitymapbox":o=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],r="radial";break;case"cone":o=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],r=!1;break;case"streamtube":o=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],r=!1;break;case"surface":o=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],r=!0;break;case"mesh3d":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!1;break;case"volume":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],r=!0;break;case"isosurface":o=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],r=!1}var u=n.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(o);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),u.exit().remove(),u.each((function(t,o){var u,f=n.select(this),h=c(i),p=h.colorscale,g=h.reversescale;if(p){if(!r){var m=p.length;u=0===o?p[g?m-1:0][1]:1===o?p[g?0:m-1][1]:p[Math.floor((m-1)/2)][1]}}else{var v=i.vertexcolor||i.facecolor||i.color;u=a.isArrayOrTypedArray(v)?v[o]||v[0]:v}f.attr("d",t[0]),u?f.call(l.fill,u):f.call((function(t){if(t.size()){var n="legendfill-"+i.uid;s.gradient(t,e,n,d(g,"radial"===r),p,"fill")}}))}))})).each((function(t){var e=t[0].trace,r="waterfall"===e.type;if(t[0]._distinct&&r){var i=t[0].trace[t[0].dir].marker;return t[0].mc=i.color,t[0].mlw=i.line.width,t[0].mlc=i.line.color,_(t,this,"waterfall")}var a=[];e.visible&&r&&(a=t[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=n.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),o.exit().remove(),o.each((function(t){var r=n.select(this),i=e[t[0]].marker,a=b(void 0,i.line,5,2);r.attr("d",t[1]).style("stroke-width",a+"px").call(l.fill,i.color),a&&r.call(l.stroke,i.line.color)}))})).each((function(t){_(t,this,"funnel")})).each((function(t){_(t,this)})).each((function(t){var r=t[0].trace,o=n.select(this).select("g.legendpoints").selectAll("path.legendbox").data(r.visible&&i.traceIs(r,"box-violin")?[t]:[]);o.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),o.exit().remove(),o.each((function(){var t=n.select(this);if("all"!==r.boxpoints&&"all"!==r.points||0!==l.opacity(r.fillcolor)||0!==l.opacity((r.line||{}).color)){var i=b(void 0,r.line,5,2);t.style("stroke-width",i+"px").call(l.fill,r.fillcolor),i&&l.stroke(t,r.line.color)}else{var c=a.minExtend(r,{marker:{size:m?12:a.constrain(r.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});o.call(s.pointStyle,c,e)}}))})).each((function(t){w(t,this,"funnelarea")})).each((function(t){w(t,this,"pie")})).each((function(t){var r,i,o=t[0],l=o.trace,f=l.visible&&l.fill&&"none"!==l.fill,h=u.hasLines(l),p=l.contours,g=!1,m=!1,y=c(l),x=y.colorscale,_=y.reversescale;if(p){var w=p.coloring;"lines"===w?g=!0:h="none"===w||"heatmap"===w||p.showlines,"constraint"===p.type?f="="!==p._operation:"fill"!==w&&"heatmap"!==w||(m=!0)}var T=u.hasMarkers(l)||u.hasText(l),k=f||m,M=h||g,A=T||!k?"M5,0":M?"M5,-2":"M5,-3",S=n.select(this),E=S.select(".legendfill").selectAll("path").data(f||m?[t]:[]);if(E.enter().append("path").classed("js-fill",!0),E.exit().remove(),E.attr("d",A+"h"+v+"v6h-"+v+"z").call(f?s.fillGroupStyle:function(t){if(t.size()){var r="legendfill-"+l.uid;s.gradient(t,e,r,d(_),x,"fill")}}),h||g){var C=b(void 0,l.line,10,5);i=a.minExtend(l,{line:{width:C}}),r=[a.minExtend(o,{trace:i})]}var L=S.select(".legendlines").selectAll("path").data(h||g?[r]:[]);L.enter().append("path").classed("js-line",!0),L.exit().remove(),L.attr("d",A+(g?"l"+v+",0.0001":"h"+v)).call(h?s.lineGroupStyle:function(t){if(t.size()){var r="legendline-"+l.uid;s.lineGroupStyle(t),s.gradient(t,e,r,d(_),x,"stroke")}})})).each((function(t){var r,i,o=t[0],l=o.trace,c=u.hasMarkers(l),f=u.hasText(l),h=u.hasLines(l);function p(t,e,r,n){var i=a.nestedProperty(l,t).get(),o=a.isArrayOrTypedArray(i)&&e?e(i):i;if(m&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function d(t){return o._distinct&&o.index&&t[o.index]?t[o.index]:t[0]}if(c||f||h){var g={},v={};if(c){g.mc=p("marker.color",d),g.mx=p("marker.symbol",d),g.mo=p("marker.opacity",a.mean,[.2,1]),g.mlc=p("marker.line.color",d),g.mlw=p("marker.line.width",a.mean,[0,5],2),v.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var y=p("marker.size",a.mean,[2,16],12);g.ms=y,v.marker.size=y}h&&(v.line={width:p("line.width",d,[0,10],5)}),f&&(g.tx="Aa",g.tp=p("textposition",d),g.ts=10,g.tc=p("textfont.color",d),g.tf=p("textfont.family",d)),r=[a.minExtend(o,g)],(i=a.minExtend(l,v)).selectedpoints=null,i.texttemplate=null}var b=n.select(this).select("g.legendpoints"),_=b.selectAll("path.scatterpts").data(c?r:[]);_.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),_.exit().remove(),_.call(s.pointStyle,i,e),c&&(r[0].mrc=3);var w=b.selectAll("g.pointtext").data(f?r:[]);w.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),w.exit().remove(),w.selectAll("text").call(s.textPointStyle,i,e)})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(e.visible&&"candlestick"===e.type?[t,t]:[]);r.enter().append("path").classed("legendcandle",!0).attr("d",(function(t,e){return e?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"})).attr("transform",x).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=b(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(l.fill,a.fillcolor),o&&l.stroke(i,a.line.color)}))})).each((function(t){var e=t[0].trace,r=n.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(e.visible&&"ohlc"===e.type?[t,t]:[]);r.enter().append("path").classed("legendohlc",!0).attr("d",(function(t,e){return e?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"})).attr("transform",x).style("stroke-miterlimit",1),r.exit().remove(),r.each((function(t,r){var i=n.select(this),a=e[r?"increasing":"decreasing"],o=b(void 0,a.line,5,2);i.style("fill","none").call(s.dashLine,a.line.dash,o),o&&l.stroke(i,a.line.color)}))}))}},{"../../lib":778,"../../registry":911,"../../traces/pie/helpers":1166,"../../traces/pie/style_one":1172,"../../traces/scatter/subtypes":1212,"../color":643,"../colorscale/helpers":654,"../drawing":665,"./constants":694,d3:169}],702:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/plots"),a=t("../../plots/cartesian/axis_ids"),o=t("../../fonts/ploticon"),s=t("../shapes/draw").eraseActiveShape,l=t("../../lib"),c=l._,u=e.exports={};function f(t,e){var r,i,o=e.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=t._fullLayout,u={},f=a.list(t,null,!0),h=c._cartesianSpikesEnabled;if("zoom"===s){var p,d="in"===l?.5:2,g=(1+d)/2,m=(1-d)/2;for(i=0;i1?(E=["toggleHover"],C=["resetViews"]):d?(S=["zoomInGeo","zoomOutGeo"],E=["hoverClosestGeo"],C=["resetGeo"]):p?(E=["hoverClosest3d"],C=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(S=["zoomInMapbox","zoomOutMapbox"],E=["toggleHover"],C=["resetViewMapbox"]):v?E=["hoverClosestGl2d"]:g?E=["hoverClosestPie"]:_?(E=["hoverClosestCartesian","hoverCompareCartesian"],C=["resetViewSankey"]):E=["toggleHover"];h&&(E=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]);(function(t){for(var e=0;e0)){var g=function(t,e,r){for(var n=r.filter((function(r){return e[r].anchor===t._id})),i=0,a=0;a=n.max)e=F[r+1];else if(t=n.pmax)e=F[r+1];else if(t0?h+c:c;return{ppad:c,ppadplus:u?d:g,ppadminus:u?g:d}}return{ppad:c}}function u(t,e,r,n,i){var s="category"===t.type||"multicategory"===t.type?t.r2c:t.d2c;if(void 0!==e)return[s(e),s(r)];if(n){var l,c,u,f,h=1/0,p=-1/0,d=n.match(a.segmentRE);for("date"===t.type&&(s=o.decodeDate(s)),l=0;lp&&(p=f)));return p>=h?[h,p]:void 0}}e.exports=function(t){var e=t._fullLayout,r=n.filterVisible(e.shapes);if(r.length&&t._fullData.length)for(var o=0;oy?(k=f,E="y0",M=y,C="y1"):(k=y,E="y1",M=f,C="y0");Z(n),Q(s,r),function(t,e,r){var n=e.xref,i=e.yref,o=a.getFromId(r,n),s=a.getFromId(r,i),l="";"paper"===n||o.autorange||(l+=n);"paper"===i||s.autorange||(l+=i);u.setClipUrl(t,l?"clip"+r._fullLayout._uid+l:null,r)}(e,r,t),X.moveFn="move"===z?J:K,X.altKey=n.altKey},doneFn:function(){if(v(t))return;p(e),$(s),b(e,t,r),n.call("_guiRelayout",t,l.getUpdateObj())},clickFn:function(){if(v(t))return;$(s)}};function Z(r){if(v(t))z=null;else if(R)z="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=X.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!F&&i>10&&a>10&&!r.shiftKey?h.getCursor(o/i,1-s/a):"move";p(e,l),z=l.split("-")[0]}}function J(n,i){if("path"===r.type){var a=function(t){return t},o=a,l=a;O?B("xanchor",r.xanchor=G(x+n)):(o=function(t){return G(q(t)+n)},N&&"date"===N.type&&(o=g.encodeDate(o))),D?B("yanchor",r.yanchor=Y(T+i)):(l=function(t){return Y(H(t)+i)},U&&"date"===U.type&&(l=g.encodeDate(l))),B("path",r.path=w(P,o,l))}else O?B("xanchor",r.xanchor=G(x+n)):(B("x0",r.x0=G(c+n)),B("x1",r.x1=G(m+n))),D?B("yanchor",r.yanchor=Y(T+i)):(B("y0",r.y0=Y(f+i)),B("y1",r.y1=Y(y+i)));e.attr("d",_(t,r)),Q(s,r)}function K(n,i){if(F){var a=function(t){return t},o=a,l=a;O?B("xanchor",r.xanchor=G(x+n)):(o=function(t){return G(q(t)+n)},N&&"date"===N.type&&(o=g.encodeDate(o))),D?B("yanchor",r.yanchor=Y(T+i)):(l=function(t){return Y(H(t)+i)},U&&"date"===U.type&&(l=g.encodeDate(l))),B("path",r.path=w(P,o,l))}else if(R){if("resize-over-start-point"===z){var u=c+n,h=D?f-i:f+i;B("x0",r.x0=O?u:G(u)),B("y0",r.y0=D?h:Y(h))}else if("resize-over-end-point"===z){var p=m+n,d=D?y-i:y+i;B("x1",r.x1=O?p:G(p)),B("y1",r.y1=D?d:Y(d))}}else{var v=function(t){return-1!==z.indexOf(t)},b=v("n"),j=v("s"),V=v("w"),W=v("e"),X=b?k+i:k,Z=j?M+i:M,J=V?A+n:A,K=W?S+n:S;D&&(b&&(X=k-i),j&&(Z=M-i)),(!D&&Z-X>10||D&&X-Z>10)&&(B(E,r[E]=D?X:Y(X)),B(C,r[C]=D?Z:Y(Z))),K-J>10&&(B(L,r[L]=O?J:G(J)),B(I,r[I]=O?K:G(K)))}e.attr("d",_(t,r)),Q(s,r)}function Q(t,e){(O||D)&&function(){var r="path"!==e.type,n=t.selectAll(".visual-cue").data([0]);n.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=q(O?e.xanchor:i.midRange(r?[e.x0,e.x1]:g.extractPathCoords(e.path,d.paramIsX))),o=H(D?e.yanchor:i.midRange(r?[e.y0,e.y1]:g.extractPathCoords(e.path,d.paramIsY)));if(a=g.roundPositionForSharpStrokeRendering(a,1),o=g.roundPositionForSharpStrokeRendering(o,1),O&&D){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";n.attr("d",s)}else if(O){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";n.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";n.attr("d",c)}}()}function $(t){t.selectAll(".visual-cue").remove()}h.init(X),W.node().onmousemove=Z}(t,O,l,e,r,z):!0===l.editable&&O.style("pointer-events",I||c.opacity(S)*A<=.5?"stroke":"all");O.node().addEventListener("click",(function(){return function(t,e){if(!y(t))return;var r=+e.node().getAttribute("data-index");if(r>=0){if(r===t._fullLayout._activeShapeIndex)return void T(t);t._fullLayout._activeShapeIndex=r,t._fullLayout._deactivateShape=T,m(t)}}(t,O)}))}}function b(t,e,r){var n=(r.xref+r.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");u.setClipUrl(t,n?"clip"+e._fullLayout._uid+n:null,e)}function _(t,e){var r,n,o,s,l,c,u,f,h=e.type,p=a.getRefType(e.xref),m=a.getRefType(e.yref),v=a.getFromId(t,e.xref),y=a.getFromId(t,e.yref),x=t._fullLayout._size;if(v?"domain"===p?n=function(t){return v._offset+v._length*t}:(r=g.shapePositionToRange(v),n=function(t){return v._offset+v.r2p(r(t,!0))}):n=function(t){return x.l+x.w*t},y?"domain"===m?s=function(t){return y._offset+y._length*(1-t)}:(o=g.shapePositionToRange(y),s=function(t){return y._offset+y.r2p(o(t,!0))}):s=function(t){return x.t+x.h*(1-t)},"path"===h)return v&&"date"===v.type&&(n=g.decodeDate(n)),y&&"date"===y.type&&(s=g.decodeDate(s)),function(t,e,r){var n=t.path,a=t.xsizemode,o=t.ysizemode,s=t.xanchor,l=t.yanchor;return n.replace(d.segmentRE,(function(t){var n=0,c=t.charAt(0),u=d.paramIsX[c],f=d.paramIsY[c],h=d.numParams[c],p=t.substr(1).replace(d.paramRE,(function(t){return u[n]?t="pixel"===a?e(s)+Number(t):e(t):f[n]&&(t="pixel"===o?r(l)-Number(t):r(t)),++n>h&&(t="X"),t}));return n>h&&(p=p.replace(/[\s,]*X.*/,""),i.log("Ignoring extra params in segment "+t)),c+p}))}(e,n,s);if("pixel"===e.xsizemode){var b=n(e.xanchor);l=b+e.x0,c=b+e.x1}else l=n(e.x0),c=n(e.x1);if("pixel"===e.ysizemode){var _=s(e.yanchor);u=_-e.y0,f=_-e.y1}else u=s(e.y0),f=s(e.y1);if("line"===h)return"M"+l+","+u+"L"+c+","+f;if("rect"===h)return"M"+l+","+u+"H"+c+"V"+f+"H"+l+"Z";var w=(l+c)/2,T=(u+f)/2,k=Math.abs(w-l),M=Math.abs(T-u),A="A"+k+","+M,S=w+k+","+T;return"M"+S+A+" 0 1,1 "+(w+","+(T-M))+A+" 0 0,1 "+S+"Z"}function w(t,e,r){return t.replace(d.segmentRE,(function(t){var n=0,i=t.charAt(0),a=d.paramIsX[i],o=d.paramIsY[i],s=d.numParams[i];return i+t.substr(1).replace(d.paramRE,(function(t){return n>=s||(a[n]?t=e(t):o[n]&&(t=r(t)),n++),t}))}))}function T(t){y(t)&&(t._fullLayout._activeShapeIndex>=0&&(l(t),delete t._fullLayout._activeShapeIndex,m(t)))}e.exports={draw:m,drawOne:x,eraseActiveShape:function(t){if(!y(t))return;l(t);var e=t._fullLayout._activeShapeIndex,r=(t.layout||{}).shapes||[];if(e=0&&f(v),r.attr("d",g(e)),M&&!h)&&(k=function(t,e){for(var r=0;r1&&(2!==t.length||"Z"!==t[1][0])&&(0===T&&(t[0][0]="M"),e[w]=t,y(),x())}}()}}function P(t,r){!function(t,r){if(e.length)for(var n=0;n0&&l0&&(s=s.transition().duration(e.transition.duration).ease(e.transition.easing)),s.attr("transform",l(o-.5*f.gripWidth,e._dims.currentValueTotalHeight))}}function E(t,e){var r=t._dims;return r.inputAreaStart+f.stepInset+(r.inputAreaLength-2*f.stepInset)*Math.min(1,Math.max(0,e))}function C(t,e){var r=t._dims;return Math.min(1,Math.max(0,(e-f.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*f.stepInset-2*r.inputAreaStart)))}function L(t,e,r){var n=r._dims,i=s.ensureSingle(t,"rect",f.railTouchRectClass,(function(n){n.call(M,e,t,r).style("pointer-events","all")}));i.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,f.tickOffset+r.ticklen+n.labelHeight)}).call(a.fill,r.bgcolor).attr("opacity",0),o.setTranslate(i,0,n.currentValueTotalHeight)}function I(t,e){var r=e._dims,n=r.inputAreaLength-2*f.railInset,i=s.ensureSingle(t,"rect",f.railRectClass);i.attr({width:n,height:f.railWidth,rx:f.railRadius,ry:f.railRadius,"shape-rendering":"crispEdges"}).call(a.stroke,e.bordercolor).call(a.fill,e.bgcolor).style("stroke-width",e.borderwidth+"px"),o.setTranslate(i,f.railInset,.5*(r.inputAreaWidth-f.railWidth)+r.currentValueTotalHeight)}e.exports=function(t){var e=t._fullLayout,r=function(t,e){for(var r=t[f.name],n=[],i=0;i0?[0]:[]);function s(e){e._commandObserver&&(e._commandObserver.remove(),delete e._commandObserver),i.autoMargin(t,m(e))}if(a.enter().append("g").classed(f.containerClassName,!0).style("cursor","ew-resize"),a.exit().each((function(){n.select(this).selectAll("g."+f.groupClassName).each(s)})).remove(),0!==r.length){var l=a.selectAll("g."+f.groupClassName).data(r,v);l.enter().append("g").classed(f.groupClassName,!0),l.exit().each(s).remove();for(var c=0;c0||h<0){var v={left:[-d,0],right:[d,0],top:[0,-d],bottom:[0,d]}[b.side];e.attr("transform",l(v[0],v[1]))}}}return D.call(R),z&&(E?D.on(".opacity",null):(M=0,A=!0,D.text(y).on("mouseover.opacity",(function(){n.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)})).on("mouseout.opacity",(function(){n.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)}))),D.call(f.makeEditable,{gd:t}).on("edit",(function(e){void 0!==x?o.call("_guiRestyle",t,v,e,x):o.call("_guiRelayout",t,v,e)})).on("cancel",(function(){this.text(this.attr("data-unformatted")).call(R)})).on("input",(function(t){this.text(t||" ").call(f.positionText,_.x,_.y)}))),D.classed("js-placeholder",A),T}}},{"../../constants/alignment":745,"../../constants/interactions":752,"../../lib":778,"../../lib/svg_text_utils":803,"../../plots/plots":891,"../../registry":911,"../color":643,"../drawing":665,d3:169,"fast-isnumeric":241}],739:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../color/attributes"),a=t("../../lib/extend").extendFlat,o=t("../../plot_api/edit_types").overrideAll,s=t("../../plots/pad_attributes"),l=t("../../plot_api/plot_template").templatedArray,c=l("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});e.exports=o(l("updatemenu",{_arrayAttrRegexps:[/^updatemenus\[(0|[1-9][0-9]+)\]\.buttons/],visible:{valType:"boolean"},type:{valType:"enumerated",values:["dropdown","buttons"],dflt:"dropdown"},direction:{valType:"enumerated",values:["left","right","up","down"],dflt:"down"},active:{valType:"integer",min:-1,dflt:0},showactive:{valType:"boolean",dflt:!0},buttons:c,x:{valType:"number",min:-2,max:3,dflt:-.05},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"right"},y:{valType:"number",min:-2,max:3,dflt:1},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},pad:a(s({editType:"arraydraw"}),{}),font:n({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:i.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},{"../../lib/extend":768,"../../plot_api/edit_types":810,"../../plot_api/plot_template":817,"../../plots/font_attributes":856,"../../plots/pad_attributes":890,"../color/attributes":642}],740:[function(t,e,r){"use strict";e.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},{}],741:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/array_container_defaults"),a=t("./attributes"),o=t("./constants").name,s=a.buttons;function l(t,e,r){function o(r,i){return n.coerce(t,e,a,r,i)}o("visible",i(t,e,{name:"buttons",handleItemDefaults:c}).length>0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),n.noneOrAll(t,e,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),n.coerceFont(o,"font",r.font),o("bgcolor",r.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function c(t,e){function r(r,i){return n.coerce(t,e,s,r,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}e.exports=function(t,e){i(t,e,{name:o,handleItemDefaults:l})}},{"../../lib":778,"../../plots/array_container_defaults":823,"./attributes":739,"./constants":740}],742:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/plots"),a=t("../color"),o=t("../drawing"),s=t("../../lib"),l=t("../../lib/svg_text_utils"),c=t("../../plot_api/plot_template").arrayEditor,u=t("../../constants/alignment").LINE_SPACING,f=t("./constants"),h=t("./scrollbox");function p(t){return t._index}function d(t,e){return+t.attr(f.menuIndexAttrName)===e._index}function g(t,e,r,n,i,a,o,s){e.active=o,c(t.layout,f.name,e).applyUpdate("active",o),"buttons"===e.type?v(t,n,null,null,e):"dropdown"===e.type&&(i.attr(f.menuIndexAttrName,"-1"),m(t,n,i,a,e),s||v(t,n,i,a,e))}function m(t,e,r,n,i){var a=s.ensureSingle(e,"g",f.headerClassName,(function(t){t.style("pointer-events","all")})),l=i._dims,c=i.active,u=i.buttons[c]||f.blankHeaderOpts,h={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};a.call(y,i,u,t).call(A,i,h,p),s.ensureSingle(e,"text",f.headerArrowClassName,(function(t){t.attr("text-anchor","end").call(o.font,i.font).text(f.arrowSymbol[i.direction])})).attr({x:l.headerWidth-f.arrowOffsetX+i.pad.l,y:l.headerHeight/2+f.textOffsetY+i.pad.t}),a.on("click",(function(){r.call(S,String(d(r,i)?-1:i._index)),v(t,e,r,n,i)})),a.on("mouseover",(function(){a.call(w)})),a.on("mouseout",(function(){a.call(T,i)})),o.setTranslate(e,l.lx,l.ly)}function v(t,e,r,a,o){r||(r=e).attr("pointer-events","all");var l=function(t){return-1==+t.attr(f.menuIndexAttrName)}(r)&&"buttons"!==o.type?[]:o.buttons,c="dropdown"===o.type?f.dropdownButtonClassName:f.buttonClassName,u=r.selectAll("g."+c).data(s.filterVisible(l)),h=u.enter().append("g").classed(c,!0),p=u.exit();"dropdown"===o.type?(h.attr("opacity","0").transition().attr("opacity","1"),p.transition().attr("opacity","0").remove()):p.remove();var d=0,m=0,v=o._dims,x=-1!==["up","down"].indexOf(o.direction);"dropdown"===o.type&&(x?m=v.headerHeight+f.gapButtonHeader:d=v.headerWidth+f.gapButtonHeader),"dropdown"===o.type&&"up"===o.direction&&(m=-f.gapButtonHeader+f.gapButton-v.openHeight),"dropdown"===o.type&&"left"===o.direction&&(d=-f.gapButtonHeader+f.gapButton-v.openWidth);var b={x:v.lx+d+o.pad.l,y:v.ly+m+o.pad.t,yPad:f.gapButton,xPad:f.gapButton,index:0},k={l:b.x+o.borderwidth,t:b.y+o.borderwidth};u.each((function(s,l){var c=n.select(this);c.call(y,o,s,t).call(A,o,b),c.on("click",(function(){n.event.defaultPrevented||(s.execute&&(s.args2&&o.active===l?(g(t,o,0,e,r,a,-1),i.executeAPICommand(t,s.method,s.args2)):(g(t,o,0,e,r,a,l),i.executeAPICommand(t,s.method,s.args))),t.emit("plotly_buttonclicked",{menu:o,button:s,active:o.active}))})),c.on("mouseover",(function(){c.call(w)})),c.on("mouseout",(function(){c.call(T,o),u.call(_,o)}))})),u.call(_,o),x?(k.w=Math.max(v.openWidth,v.headerWidth),k.h=b.y-k.t):(k.w=b.x-k.l,k.h=Math.max(v.openHeight,v.headerHeight)),k.direction=o.direction,a&&(u.size()?function(t,e,r,n,i,a){var o,s,l,c=i.direction,u="up"===c||"down"===c,h=i._dims,p=i.active;if(u)for(s=0,l=0;l0?[0]:[]);if(o.enter().append("g").classed(f.containerClassName,!0).style("cursor","pointer"),o.exit().each((function(){n.select(this).selectAll("g."+f.headerGroupClassName).each(a)})).remove(),0!==r.length){var l=o.selectAll("g."+f.headerGroupClassName).data(r,p);l.enter().append("g").classed(f.headerGroupClassName,!0);for(var c=s.ensureSingle(o,"g",f.dropdownButtonGroupClassName,(function(t){t.style("pointer-events","all")})),u=0;uw,M=s.barLength+2*s.barPad,A=s.barWidth+2*s.barPad,S=d,E=m+v;E+A>c&&(E=c-A);var C=this.container.selectAll("rect.scrollbar-horizontal").data(k?[0]:[]);C.exit().on(".drag",null).remove(),C.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,s.barColor),k?(this.hbar=C.attr({rx:s.barRadius,ry:s.barRadius,x:S,y:E,width:M,height:A}),this._hbarXMin=S+M/2,this._hbarTranslateMax=w-M):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var L=v>T,I=s.barWidth+2*s.barPad,P=s.barLength+2*s.barPad,z=d+g,O=m;z+I>l&&(z=l-I);var D=this.container.selectAll("rect.scrollbar-vertical").data(L?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,s.barColor),L?(this.vbar=D.attr({rx:s.barRadius,ry:s.barRadius,x:z,y:O,width:I,height:P}),this._vbarYMin=O+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var R=this.id,F=u-.5,B=L?f+I+.5:f+.5,N=h-.5,j=k?p+A+.5:p+.5,U=o._topdefs.selectAll("#"+R).data(k||L?[0]:[]);if(U.exit().remove(),U.enter().append("clipPath").attr("id",R).append("rect"),k||L?(this._clipRect=U.select("rect").attr({x:Math.floor(F),y:Math.floor(N),width:Math.ceil(B)-Math.floor(F),height:Math.ceil(j)-Math.floor(N)}),this.container.call(a.setClipUrl,R,this.gd),this.bg.attr({x:d,y:m,width:g,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),k||L){var V=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault()})).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(V);var q=n.behavior.drag().on("dragstart",(function(){n.event.sourceEvent.preventDefault(),n.event.sourceEvent.stopPropagation()})).on("drag",this._onBarDrag.bind(this));k&&this.hbar.on(".drag",null).call(q),L&&this.vbar.on(".drag",null).call(q)}this.setTranslate(e,r)},s.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(a.setClipUrl,null),delete this._clipRect),this.hbar&&(this.hbar.on(".drag",null),this.hbar.remove(),delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax),this.vbar&&(this.vbar.on(".drag",null),this.vbar.remove(),delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax)},s.prototype._onBoxDrag=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t-=n.event.dx),this.vbar&&(e-=n.event.dy),this.setTranslate(t,e)},s.prototype._onBoxWheel=function(){var t=this.translateX,e=this.translateY;this.hbar&&(t+=n.event.deltaY),this.vbar&&(e+=n.event.deltaY),this.setTranslate(t,e)},s.prototype._onBarDrag=function(){var t=this.translateX,e=this.translateY;if(this.hbar){var r=t+this._hbarXMin,i=r+this._hbarTranslateMax;t=(o.constrain(n.event.x,r,i)-r)/(i-r)*(this.position.w-this._box.w)}if(this.vbar){var a=e+this._vbarYMin,s=a+this._vbarTranslateMax;e=(o.constrain(n.event.y,a,s)-a)/(s-a)*(this.position.h-this._box.h)}this.setTranslate(t,e)},s.prototype.setTranslate=function(t,e){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=o.constrain(t||0,0,r),e=o.constrain(e||0,0,n),this.translateX=t,this.translateY=e,this.container.call(a.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-e),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+e-.5)}),this.hbar){var i=t/r;this.hbar.call(a.setTranslate,t+i*this._hbarTranslateMax,e)}if(this.vbar){var s=e/n;this.vbar.call(a.setTranslate,t,e+s*this._vbarTranslateMax)}}},{"../../lib":778,"../color":643,"../drawing":665,d3:169}],745:[function(t,e,r){"use strict";e.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},{}],746:[function(t,e,r){"use strict";e.exports={axisRefDescription:function(t,e,r){return["If set to a",t,"axis id (e.g. *"+t+"* or","*"+t+"2*), the `"+t+"` position refers to a",t,"coordinate. If set to *paper*, the `"+t+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+r+"). If set to a",t,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",e,"of the domain of that axis: e.g.,","*"+t+"2 domain* refers to the domain of the second",t," axis and a",t,"position of 0.5 refers to the","point between the",e,"and the",r,"of the domain of the","second",t,"axis."].join(" ")}}},{}],747:[function(t,e,r){"use strict";e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},{}],748:[function(t,e,r){"use strict";e.exports={FORMAT_LINK:"https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format#locale_format"}},{}],749:[function(t,e,r){"use strict";e.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},{}],750:[function(t,e,r){"use strict";e.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},{}],751:[function(t,e,r){"use strict";e.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},{}],752:[function(t,e,r){"use strict";e.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},{}],753:[function(t,e,r){"use strict";e.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE/1e4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,EPOCHJD:2440587.5,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"\u2212"}},{}],754:[function(t,e,r){"use strict";r.xmlns="http://www.w3.org/2000/xmlns/",r.svg="http://www.w3.org/2000/svg",r.xlink="http://www.w3.org/1999/xlink",r.svgAttrs={xmlns:r.svg,"xmlns:xlink":r.xlink}},{}],755:[function(t,e,r){"use strict";r.version=t("./version").version,t("es6-promise").polyfill(),t("../build/plotcss"),t("./fonts/mathjax_config")();for(var n=t("./registry"),i=r.register=n.register,a=t("./plot_api"),o=Object.keys(a),s=0;splotly-logomark"}}},{}],758:[function(t,e,r){"use strict";r.isLeftAnchor=function(t){return"left"===t.xanchor||"auto"===t.xanchor&&t.x<=1/3},r.isCenterAnchor=function(t){return"center"===t.xanchor||"auto"===t.xanchor&&t.x>1/3&&t.x<2/3},r.isRightAnchor=function(t){return"right"===t.xanchor||"auto"===t.xanchor&&t.x>=2/3},r.isTopAnchor=function(t){return"top"===t.yanchor||"auto"===t.yanchor&&t.y>=2/3},r.isMiddleAnchor=function(t){return"middle"===t.yanchor||"auto"===t.yanchor&&t.y>1/3&&t.y<2/3},r.isBottomAnchor=function(t){return"bottom"===t.yanchor||"auto"===t.yanchor&&t.y<=1/3}},{}],759:[function(t,e,r){"use strict";var n=t("./mod"),i=n.mod,a=n.modHalf,o=Math.PI,s=2*o;function l(t){return Math.abs(t[1]-t[0])>s-1e-14}function c(t,e){return a(e-t,s)}function u(t,e){if(l(e))return!0;var r,n;e[0](n=i(n,s))&&(n+=s);var a=i(t,s),o=a+s;return a>=r&&a<=n||o>=r&&o<=n}function f(t,e,r,n,i,a,c){i=i||0,a=a||0;var u,f,h,p,d,g=l([r,n]);function m(t,e){return[t*Math.cos(e)+i,a-t*Math.sin(e)]}g?(u=0,f=o,h=s):r=i&&t<=a);var i,a},pathArc:function(t,e,r,n,i){return f(null,t,e,r,n,i,0)},pathSector:function(t,e,r,n,i){return f(null,t,e,r,n,i,1)},pathAnnulus:function(t,e,r,n,i,a){return f(t,e,r,n,i,a,1)}}},{"./mod":785}],760:[function(t,e,r){"use strict";var n=Array.isArray,i="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer:{isView:function(){return!1}},a="undefined"==typeof DataView?function(){}:DataView;function o(t){return i.isView(t)&&!(t instanceof a)}function s(t){return n(t)||o(t)}function l(t,e,r){if(s(t)){if(s(t[0])){for(var n=r,i=0;ii.max?e.set(r):e.set(+t)}},integer:{coerceFunction:function(t,e,r,i){t%1||!n(t)||void 0!==i.min&&ti.max?e.set(r):e.set(+t)}},string:{coerceFunction:function(t,e,r,n){if("string"!=typeof t){var i="number"==typeof t;!0!==n.strict&&i?e.set(String(t)):e.set(r)}else n.noBlank&&!t?e.set(r):e.set(t)}},color:{coerceFunction:function(t,e,r){i(t).isValid()?e.set(t):e.set(r)}},colorlist:{coerceFunction:function(t,e,r){Array.isArray(t)&&t.length&&t.every((function(t){return i(t).isValid()}))?e.set(t):e.set(r)}},colorscale:{coerceFunction:function(t,e,r){e.set(o.get(t,r))}},angle:{coerceFunction:function(t,e,r){"auto"===t?e.set("auto"):n(t)?e.set(u(+t,360)):e.set(r)}},subplotid:{coerceFunction:function(t,e,r,n){var i=n.regex||c(r);"string"==typeof t&&i.test(t)?e.set(t):e.set(r)},validateFunction:function(t,e){var r=e.dflt;return t===r||"string"==typeof t&&!!c(r).test(t)}},flaglist:{coerceFunction:function(t,e,r,n){if("string"==typeof t)if(-1===(n.extras||[]).indexOf(t)){for(var i=t.split("+"),a=0;a=n&&t<=i?t:u}if("string"!=typeof t&&"number"!=typeof t)return u;t=String(t);var c=_(e),v=t.charAt(0);!c||"G"!==v&&"g"!==v||(t=t.substr(1),e="");var w=c&&"chinese"===e.substr(0,7),T=t.match(w?x:y);if(!T)return u;var k=T[1],M=T[3]||"1",A=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(c){if(2===k.length)return u;var L;k=Number(k);try{var I=m.getComponentMethod("calendars","getCal")(e);if(w){var P="i"===M.charAt(M.length-1);M=parseInt(M,10),L=I.newDate(k,I.toMonthIndex(k,M,P),A)}else L=I.newDate(k,Number(M),A)}catch(t){return u}return L?(L.toJD()-g)*f+S*h+E*p+C*d:u}k=2===k.length?(Number(k)+2e3-b)%100+b:Number(k),M-=1;var z=new Date(Date.UTC(2e3,M,A,S,E));return z.setUTCFullYear(k),z.getUTCMonth()!==M||z.getUTCDate()!==A?u:z.getTime()+C*d},n=r.MIN_MS=r.dateTime2ms("-9999"),i=r.MAX_MS=r.dateTime2ms("9999-12-31 23:59:59.9999"),r.isDateTime=function(t,e){return r.dateTime2ms(t,e)!==u};var T=90*f,k=3*h,M=5*p;function A(t,e,r,n,i){if((e||r||n||i)&&(t+=" "+w(e,2)+":"+w(r,2),(n||i)&&(t+=":"+w(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;t+="."+w(i,a)}return t}r.ms2DateTime=function(t,e,r){if("number"!=typeof t||!(t>=n&&t<=i))return u;e||(e=0);var a,o,s,c,y,x,b=Math.floor(10*l(t+.05,1)),w=Math.round(t-b/10);if(_(r)){var S=Math.floor(w/f)+g,E=Math.floor(l(t,f));try{a=m.getComponentMethod("calendars","getCal")(r).fromJD(S).formatDate("yyyy-mm-dd")}catch(t){a=v("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.substr(1);else for(;a.length<10;)a="0"+a;o=e=n+f&&t<=i-f))return u;var e=Math.floor(10*l(t+.05,1)),r=new Date(Math.round(t-e/10));return A(a("%Y-%m-%d")(r),r.getHours(),r.getMinutes(),r.getSeconds(),10*r.getUTCMilliseconds()+e)},r.cleanDate=function(t,e,n){if(t===u)return e;if(r.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(_(n))return s.error("JS Dates and milliseconds are incompatible with world calendars",t),e;if(!(t=r.ms2DateTimeLocal(+t))&&void 0!==e)return e}else if(!r.isDateTime(t,n))return s.error("unrecognized date",t),e;return t};var S=/%\d?f/g;function E(t,e,r,n){t=t.replace(S,(function(t){var r=Math.min(+t.charAt(1)||6,6);return(e/1e3%1+2).toFixed(r).substr(2).replace(/0+$/,"")||"0"}));var i=new Date(Math.floor(e+.05));if(_(n))try{t=m.getComponentMethod("calendars","worldCalFmt")(t,e,n)}catch(t){return"Invalid"}return r(t)(i)}var C=[59,59.9,59.99,59.999,59.9999];r.formatDate=function(t,e,r,n,i,a){if(i=_(i)&&i,!e)if("y"===r)e=a.year;else if("m"===r)e=a.month;else{if("d"!==r)return function(t,e){var r=l(t+.05,f),n=w(Math.floor(r/h),2)+":"+w(l(Math.floor(r/p),60),2);if("M"!==e){o(e)||(e=0);var i=(100+Math.min(l(t/d,60),C[e])).toFixed(e).substr(1);e>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}(t,r)+"\n"+E(a.dayMonthYear,t,n,i);e=a.dayMonth+"\n"+a.year}return E(e,t,n,i)};var L=3*f;r.incrementMonth=function(t,e,r){r=_(r)&&r;var n=l(t,f);if(t=Math.round(t-n),r)try{var i=Math.round(t/f)+g,a=m.getComponentMethod("calendars","getCal")(r),o=a.fromJD(i);return e%12?a.add(o,e,"m"):a.add(o,e/12,"y"),(o.toJD()-g)*f+n}catch(e){s.error("invalid ms "+t+" in calendar "+r)}var c=new Date(t+L);return c.setUTCMonth(c.getUTCMonth()+e)+n-L},r.findExactDates=function(t,e){for(var r,n,i=0,a=0,s=0,l=0,c=_(e)&&m.getComponentMethod("calendars","getCal")(e),u=0;u0&&t[e+1][0]<0)return e;return null}switch(e="RUS"===s||"FJI"===s?function(t){var e;if(null===c(t))e=t;else for(e=new Array(t.length),i=0;ie?r[n++]=[t[i][0]+360,t[i][1]]:i===e?(r[n++]=t[i],r[n++]=[t[i][0],-90]):r[n++]=t[i];var a=h.tester(r);a.pts.pop(),l.push(a)}:function(t){l.push(h.tester(t))},a.type){case"MultiPolygon":for(r=0;ri&&(i=c,e=l)}else e=r;return o.default(e).geometry.coordinates}(u),n.fIn=t,n.fOut=u,s.push(u)}else c.log(["Location",n.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+t)):void i++}),50)}))}for(var o=0;o0&&(r.push(i),i=[])}return i.length>0&&r.push(i),r},r.makeLine=function(t){return 1===t.length?{type:"LineString",coordinates:t[0]}:{type:"MultiLineString",coordinates:t}},r.makePolygon=function(t){if(1===t.length)return{type:"Polygon",coordinates:t};for(var e=new Array(t.length),r=0;r1||g<0||g>1?null:{x:t+l*g,y:e+f*g}}function l(t,e,r,n,i){var a=n*t+i*e;if(a<0)return n*n+i*i;if(a>r){var o=n-t,s=i-e;return o*o+s*s}var l=n*e-i*t;return l*l/r}r.segmentsIntersect=s,r.segmentDistance=function(t,e,r,n,i,a,o,c){if(s(t,e,r,n,i,a,o,c))return 0;var u=r-t,f=n-e,h=o-i,p=c-a,d=u*u+f*f,g=h*h+p*p,m=Math.min(l(u,f,d,i-t,a-e),l(u,f,d,o-t,c-e),l(h,p,g,t-i,e-a),l(h,p,g,r-i,n-a));return Math.sqrt(m)},r.getTextLocation=function(t,e,r,s){if(t===i&&s===a||(n={},i=t,a=s),n[r])return n[r];var l=t.getPointAtLength(o(r-s/2,e)),c=t.getPointAtLength(o(r+s/2,e)),u=Math.atan((c.y-l.y)/(c.x-l.x)),f=t.getPointAtLength(o(r,e)),h={x:(4*f.x+l.x+c.x)/6,y:(4*f.y+l.y+c.y)/6,theta:u};return n[r]=h,h},r.clearLocationCache=function(){i=null},r.getVisibleSegment=function(t,e,r){var n,i,a=e.left,o=e.right,s=e.top,l=e.bottom,c=0,u=t.getTotalLength(),f=u;function h(e){var r=t.getPointAtLength(e);0===e?n=r:e===u&&(i=r);var c=r.xo?r.x-o:0,f=r.yl?r.y-l:0;return Math.sqrt(c*c+f*f)}for(var p=h(c);p;){if((c+=p+r)>f)return;p=h(c)}for(p=h(f);p;){if(c>(f-=p+r))return;p=h(f)}return{min:c,max:f,len:f-c,total:u,isClosed:0===c&&f===u&&Math.abs(n.x-i.x)<.1&&Math.abs(n.y-i.y)<.1}},r.findPointOnPath=function(t,e,r,n){for(var i,a,o,s=(n=n||{}).pathLength||t.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=t.getPointAtLength(0)[r]>t.getPointAtLength(s)[r]?-1:1,f=0,h=0,p=s;f0?p=i:h=i,f++}return a}},{"./mod":785}],774:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("color-normalize"),o=t("../components/colorscale"),s=t("../components/color/attributes").defaultLine,l=t("./array").isArrayOrTypedArray,c=a(s);function u(t,e){var r=t;return r[3]*=e,r}function f(t){if(n(t))return c;var e=a(t);return e.length?e:c}function h(t){return n(t)?t:1}e.exports={formatColor:function(t,e,r){var n,i,s,p,d,g=t.color,m=l(g),v=l(e),y=o.extractOpts(t),x=[];if(n=void 0!==y.colorscale?o.makeColorScaleFuncFromTrace(t):f,i=m?function(t,e){return void 0===t[e]?c:a(n(t[e]))}:f,s=v?function(t,e){return void 0===t[e]?1:h(t[e])}:h,m||v)for(var b=0;b1?(r*t+r*e)/r:t+e,i=String(n).length;if(i>16){var a=String(e).length;if(i>=String(t).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}},{}],778:[function(t,e,r){"use strict";var n=t("d3"),i=t("d3-time-format").utcFormat,a=t("fast-isnumeric"),o=t("../constants/numerical"),s=o.FP_SAFE,l=o.BADNUM,c=e.exports={};c.nestedProperty=t("./nested_property"),c.keyedContainer=t("./keyed_container"),c.relativeAttr=t("./relative_attr"),c.isPlainObject=t("./is_plain_object"),c.toLogRange=t("./to_log_range"),c.relinkPrivateKeys=t("./relink_private");var u=t("./array");c.isTypedArray=u.isTypedArray,c.isArrayOrTypedArray=u.isArrayOrTypedArray,c.isArray1D=u.isArray1D,c.ensureArray=u.ensureArray,c.concat=u.concat,c.maxRowLength=u.maxRowLength,c.minRowLength=u.minRowLength;var f=t("./mod");c.mod=f.mod,c.modHalf=f.modHalf;var h=t("./coerce");c.valObjectMeta=h.valObjectMeta,c.coerce=h.coerce,c.coerce2=h.coerce2,c.coerceFont=h.coerceFont,c.coerceHoverinfo=h.coerceHoverinfo,c.coerceSelectionMarkerOpacity=h.coerceSelectionMarkerOpacity,c.validate=h.validate;var p=t("./dates");c.dateTime2ms=p.dateTime2ms,c.isDateTime=p.isDateTime,c.ms2DateTime=p.ms2DateTime,c.ms2DateTimeLocal=p.ms2DateTimeLocal,c.cleanDate=p.cleanDate,c.isJSDate=p.isJSDate,c.formatDate=p.formatDate,c.incrementMonth=p.incrementMonth,c.dateTick0=p.dateTick0,c.dfltRange=p.dfltRange,c.findExactDates=p.findExactDates,c.MIN_MS=p.MIN_MS,c.MAX_MS=p.MAX_MS;var d=t("./search");c.findBin=d.findBin,c.sorterAsc=d.sorterAsc,c.sorterDes=d.sorterDes,c.distinctVals=d.distinctVals,c.roundUp=d.roundUp,c.sort=d.sort,c.findIndexOfMin=d.findIndexOfMin;var g=t("./stats");c.aggNums=g.aggNums,c.len=g.len,c.mean=g.mean,c.median=g.median,c.midRange=g.midRange,c.variance=g.variance,c.stdev=g.stdev,c.interp=g.interp;var m=t("./matrix");c.init2dArray=m.init2dArray,c.transposeRagged=m.transposeRagged,c.dot=m.dot,c.translationMatrix=m.translationMatrix,c.rotationMatrix=m.rotationMatrix,c.rotationXYMatrix=m.rotationXYMatrix,c.apply3DTransform=m.apply3DTransform,c.apply2DTransform=m.apply2DTransform,c.apply2DTransform2=m.apply2DTransform2,c.convertCssMatrix=m.convertCssMatrix,c.inverseTransformMatrix=m.inverseTransformMatrix;var v=t("./angles");c.deg2rad=v.deg2rad,c.rad2deg=v.rad2deg,c.angleDelta=v.angleDelta,c.angleDist=v.angleDist,c.isFullCircle=v.isFullCircle,c.isAngleInsideSector=v.isAngleInsideSector,c.isPtInsideSector=v.isPtInsideSector,c.pathArc=v.pathArc,c.pathSector=v.pathSector,c.pathAnnulus=v.pathAnnulus;var y=t("./anchor_utils");c.isLeftAnchor=y.isLeftAnchor,c.isCenterAnchor=y.isCenterAnchor,c.isRightAnchor=y.isRightAnchor,c.isTopAnchor=y.isTopAnchor,c.isMiddleAnchor=y.isMiddleAnchor,c.isBottomAnchor=y.isBottomAnchor;var x=t("./geometry2d");c.segmentsIntersect=x.segmentsIntersect,c.segmentDistance=x.segmentDistance,c.getTextLocation=x.getTextLocation,c.clearLocationCache=x.clearLocationCache,c.getVisibleSegment=x.getVisibleSegment,c.findPointOnPath=x.findPointOnPath;var b=t("./extend");c.extendFlat=b.extendFlat,c.extendDeep=b.extendDeep,c.extendDeepAll=b.extendDeepAll,c.extendDeepNoArrays=b.extendDeepNoArrays;var _=t("./loggers");c.log=_.log,c.warn=_.warn,c.error=_.error;var w=t("./regex");c.counterRegex=w.counter;var T=t("./throttle");c.throttle=T.throttle,c.throttleDone=T.done,c.clearThrottle=T.clear;var k=t("./dom");function M(t){var e={};for(var r in t)for(var n=t[r],i=0;is?l:a(t)?Number(t):l:l},c.isIndex=function(t,e){return!(void 0!==e&&t>=e)&&(a(t)&&t>=0&&t%1==0)},c.noop=t("./noop"),c.identity=t("./identity"),c.repeat=function(t,e){for(var r=new Array(e),n=0;nr?Math.max(r,Math.min(e,t)):Math.max(e,Math.min(r,t))},c.bBoxIntersect=function(t,e,r){return r=r||0,t.left<=e.right+r&&e.left<=t.right+r&&t.top<=e.bottom+r&&e.top<=t.bottom+r},c.simpleMap=function(t,e,r,n,i){for(var a=t.length,o=new Array(a),s=0;s=Math.pow(2,r)?i>10?(c.warn("randstr failed uniqueness"),l):t(e,r,n,(i||0)+1):l},c.OptionControl=function(t,e){t||(t={}),e||(e="opt");var r={optionList:[],_newoption:function(n){n[e]=t,r[n.name]=n,r.optionList.push(n)}};return r["_"+e]=t,r},c.smooth=function(t,e){if((e=Math.round(e)||0)<2)return t;var r,n,i,a,o=t.length,s=2*o,l=2*e-1,c=new Array(l),u=new Array(o);for(r=0;r=s&&(i-=s*Math.floor(i/s)),i<0?i=-1-i:i>=o&&(i=s-1-i),a+=t[i]*c[n];u[r]=a}return u},c.syncOrAsync=function(t,e,r){var n;function i(){return c.syncOrAsync(t,e,r)}for(;t.length;)if((n=(0,t.splice(0,1)[0])(e))&&n.then)return n.then(i).then(void 0,c.promiseError);return r&&r(e)},c.stripTrailingSlash=function(t){return"/"===t.substr(-1)?t.substr(0,t.length-1):t},c.noneOrAll=function(t,e,r){if(t){var n,i=!1,a=!0;for(n=0;n0?e:0}))},c.fillArray=function(t,e,r,n){if(n=n||c.identity,c.isArrayOrTypedArray(t))for(var i=0;i1?i+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+a+"$2");return s+l},c.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var I=/^\w*$/;c.templateString=function(t,e){var r={};return t.replace(c.TEMPLATE_STRING_REGEX,(function(t,n){var i;return I.test(n)?i=e[n]:(r[n]=r[n]||c.nestedProperty(e,n).get,i=r[n]()),c.isValidTextValue(i)?i:""}))};var P={max:10,count:0,name:"hovertemplate"};c.hovertemplateString=function(){return D.apply(P,arguments)};var z={max:10,count:0,name:"texttemplate"};c.texttemplateString=function(){return D.apply(z,arguments)};var O=/^[:|\|]/;function D(t,e,r){var a=this,o=arguments;e||(e={});var s={};return t.replace(c.TEMPLATE_STRING_REGEX,(function(t,l,u){var f,h,p,d;for(p=3;p=48&&o<=57,c=s>=48&&s<=57;if(l&&(n=10*n+o-48),c&&(i=10*i+s-48),!l||!c){if(n!==i)return n-i;if(o!==s)return o-s}}return i-n};var R=2e9;c.seedPseudoRandom=function(){R=2e9},c.pseudoRandom=function(){var t=R;return R=(69069*R+1)%4294967296,Math.abs(R-t)<429496729?c.pseudoRandom():R/4294967296},c.fillText=function(t,e,r){var n=Array.isArray(r)?function(t){r.push(t)}:function(t){r.text=t},i=c.extractOption(t,e,"htx","hovertext");if(c.isValidTextValue(i))return n(i);var a=c.extractOption(t,e,"tx","text");return c.isValidTextValue(a)?n(a):void 0},c.isValidTextValue=function(t){return t||0===t},c.formatPercent=function(t,e){e=e||0;for(var r=(Math.round(100*t*Math.pow(10,e))*Math.pow(.1,e)).toFixed(e)+"%",n=0;n1&&(u=1):u=0,c.strTranslate(i-u*(r+o),a-u*(n+s))+c.strScale(u)+(l?"rotate("+l+(e?"":" "+r+" "+n)+")":"")},c.ensureUniformFontSize=function(t,e){var r=c.extendFlat({},e);return r.size=Math.max(e.size,t._fullLayout.uniformtext.minsize||0),r},c.join2=function(t,e,r){var n=t.length;return n>1?t.slice(0,-1).join(e)+r+t[n-1]:t.join(e)}},{"../constants/numerical":753,"./anchor_utils":758,"./angles":759,"./array":760,"./clean_number":761,"./clear_responsive":763,"./coerce":764,"./dates":765,"./dom":766,"./extend":768,"./filter_unique":769,"./filter_visible":770,"./geometry2d":773,"./identity":776,"./increment":777,"./is_plain_object":779,"./keyed_container":780,"./localize":781,"./loggers":782,"./make_trace_groups":783,"./matrix":784,"./mod":785,"./nested_property":786,"./noop":787,"./notifier":788,"./preserve_drawing_buffer":792,"./push_unique":793,"./regex":795,"./relative_attr":796,"./relink_private":797,"./search":798,"./stats":801,"./throttle":804,"./to_log_range":805,d3:169,"d3-time-format":166,"fast-isnumeric":241}],779:[function(t,e,r){"use strict";e.exports=function(t){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(t):"[object Object]"===Object.prototype.toString.call(t)&&Object.getPrototypeOf(t)===Object.prototype}},{}],780:[function(t,e,r){"use strict";var n=t("./nested_property"),i=/^\w*$/;e.exports=function(t,e,r,a){var o,s,l;r=r||"name",a=a||"value";var c={};e&&e.length?(l=n(t,e),s=l.get()):s=t,e=e||"";var u={};if(s)for(o=0;o2)return c[e]=2|c[e],h.set(t,null);if(f){for(o=e;o1){var e=["LOG:"];for(t=0;t1){var r=[];for(t=0;t"),"long")}},a.warn=function(){var t;if(n.logging>0){var e=["WARN:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}},a.error=function(){var t;if(n.logging>0){var e=["ERROR:"];for(t=0;t0){var r=[];for(t=0;t"),"stick")}}},{"../plot_api/plot_config":815,"./notifier":788}],783:[function(t,e,r){"use strict";var n=t("d3");e.exports=function(t,e,r){var i=t.selectAll("g."+r.replace(/\s/g,".")).data(e,(function(t){return t[0].trace.uid}));i.exit().remove(),i.enter().append("g").attr("class",r),i.order();var a=t.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each((function(t){t[0][a]=n.select(this)})),i}},{d3:169}],784:[function(t,e,r){"use strict";var n=t("gl-mat4");r.init2dArray=function(t,e){for(var r=new Array(t),n=0;ne/2?t-Math.round(t/e)*e:t}}},{}],786:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./array").isArrayOrTypedArray;function a(t,e){return function(){var r,n,o,s,l,c=t;for(s=0;s/g),l=0;la||c===i||cs)&&(!e||!l(t))}:function(t,e){var l=t[0],c=t[1];if(l===i||la||c===i||cs)return!1;var u,f,h,p,d,g=r.length,m=r[0][0],v=r[0][1],y=0;for(u=1;uMath.max(f,m)||c>Math.max(h,v)))if(cu||Math.abs(n(o,h))>i)return!0;return!1},a.filter=function(t,e){var r=[t[0]],n=0,i=0;function o(o){t.push(o);var s=r.length,l=n;r.splice(i+1);for(var c=l+1;c1&&o(t.pop());return{addPt:o,raw:t,filtered:r}}},{"../constants/numerical":753,"./matrix":784}],791:[function(t,e,r){(function(r){(function(){"use strict";var n=t("./show_no_webgl_msg"),i=t("regl");e.exports=function(t,e){var a=t._fullLayout,o=!0;return a._glcanvas.each((function(n){if(!n.regl&&(!n.pick||a._has("parcoords"))){try{n.regl=i({canvas:this,attributes:{antialias:!n.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||r.devicePixelRatio,extensions:e||[]})}catch(t){o=!1}n.regl||(o=!1),o&&this.addEventListener("webglcontextlost",(function(e){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:e,layer:n.key})}),!1)}})),o||n({container:a._glcontainer.node()}),o}}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./show_no_webgl_msg":800,regl:540}],792:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("is-mobile");e.exports=function(t){var e;if("string"!=typeof(e=t&&t.hasOwnProperty("userAgent")?t.userAgent:function(){var t;"undefined"!=typeof navigator&&(t=navigator.userAgent);t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]);return t}()))return!0;var r=i({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!r)for(var a=e.split(" "),o=1;o-1;s--){var l=a[s];if("Version/"===l.substr(0,8)){var c=l.substr(8).split(".")[0];if(n(c)&&(c=+c),c>=13)return!0}}}return r}},{"fast-isnumeric":241,"is-mobile":467}],793:[function(t,e,r){"use strict";e.exports=function(t,e){if(e instanceof RegExp){for(var r=e.toString(),n=0;ni.queueLength&&(t.undoQueue.queue.shift(),t.undoQueue.index--))},startSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!0,t.undoQueue.beginSequence=!0},stopSequence:function(t){t.undoQueue=t.undoQueue||{index:0,queue:[],sequence:!1},t.undoQueue.sequence=!1,t.undoQueue.beginSequence=!1},undo:function(t){var e,r;if(t.framework&&t.framework.isPolar)t.framework.undo();else if(!(void 0===t.undoQueue||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;r=t.undoQueue.queue.length)){for(e=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,r=0;re}function u(t,e){return t>=e}r.findBin=function(t,e,r){if(n(e.start))return r?Math.ceil((t-e.start)/e.size-1e-9)-1:Math.floor((t-e.start)/e.size+1e-9);var a,o,f=0,h=e.length,p=0,d=h>1?(e[h-1]-e[0])/(h-1):1;for(o=d>=0?r?s:l:r?u:c,t+=1e-9*d*(r?-1:1)*(d>=0?1:-1);f90&&i.log("Long binary search..."),f-1},r.sorterAsc=function(t,e){return t-e},r.sorterDes=function(t,e){return e-t},r.distinctVals=function(t,e){var n,i=(e||{}).unitMinDiff,a=t.slice();for(a.sort(r.sorterAsc),n=a.length-1;n>-1&&a[n]===o;n--);var s=1;i||(s=a[n]-a[0]||1);for(var l,c=s/(n||1)/1e4,u=[],f=0;f<=n;f++){var h=a[f],p=h-l;void 0===l?(u.push(h),l=h):p>c&&(s=Math.min(s,p),u.push(h),l=h)}return{vals:u,minDiff:s}},r.roundUp=function(t,e,r){for(var n,i=0,a=e.length-1,o=0,s=r?0:1,l=r?1:0,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return t.sort(e)}return n?t:t.reverse()},r.findIndexOfMin=function(t,e){e=e||a;for(var r,n=1/0,i=0;ia.length)&&(o=a.length),n(e)||(e=!1),i(a[0])){for(l=new Array(o),s=0;st.length-1)return t[t.length-1];var r=e%1;return r*t[Math.ceil(e)]+(1-r)*t[Math.floor(e)]}},{"./array":760,"fast-isnumeric":241}],802:[function(t,e,r){"use strict";var n=t("color-normalize");e.exports=function(t){return t?n(t):[0,0,0,1]}},{"color-normalize":125}],803:[function(t,e,r){"use strict";var n=t("d3"),i=t("../lib"),a=i.strTranslate,o=t("../constants/xmlns_namespaces"),s=t("../constants/alignment").LINE_SPACING;function l(t,e){return t.node().getBoundingClientRect()[e]}var c=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;r.convertToTspans=function(t,e,g){var A=t.text(),S=!t.attr("data-notex")&&"undefined"!=typeof MathJax&&A.match(c),L=n.select(t.node().parentNode);if(!L.empty()){var I=t.attr("class")?t.attr("class").split(" ")[0]:"text";return I+="-math",L.selectAll("svg."+I).remove(),L.selectAll("g."+I+"-group").remove(),t.style("display",null).attr({"data-unformatted":A,"data-math":"N"}),S?(e&&e._promises||[]).push(new Promise((function(e){t.style("display","none");var r=parseInt(t.node().style.fontSize,10),o={fontSize:r};!function(t,e,r){var a,o,s,l;MathJax.Hub.Queue((function(){return o=i.extendDeepAll({},MathJax.Hub.config),s=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]},displayAlign:"left"})}),(function(){if("SVG"!==(a=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")}),(function(){var r="math-output-"+i.randstr({},64);return l=n.select("body").append("div").attr({id:r}).style({visibility:"hidden",position:"absolute"}).style({"font-size":e.fontSize+"px"}).text(t.replace(u,"\\lt ").replace(f,"\\gt ")),MathJax.Hub.Typeset(l.node())}),(function(){var e=n.select("body").select("#MathJax_SVG_glyphs");if(l.select(".MathJax_SVG").empty()||!l.select("svg").node())i.log("There was an error in the tex syntax.",t),r();else{var o=l.select("svg").node().getBoundingClientRect();r(l.select(".MathJax_SVG"),e,o)}if(l.remove(),"SVG"!==a)return MathJax.Hub.setRenderer(a)}),(function(){return void 0!==s&&(MathJax.Hub.processSectionDelay=s),MathJax.Hub.Config(o)}))}(S[2],o,(function(n,i,o){L.selectAll("svg."+I).remove(),L.selectAll("g."+I+"-group").remove();var s=n&&n.select("svg");if(!s||!s.node())return P(),void e();var c=L.append("g").classed(I+"-group",!0).attr({"pointer-events":"none","data-unformatted":A,"data-math":"Y"});c.node().appendChild(s.node()),i&&i.node()&&s.node().insertBefore(i.node().cloneNode(!0),s.node().firstChild),s.attr({class:I,height:o.height,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var u=t.node().style.fill||"black",f=s.select("g");f.attr({fill:u,stroke:u});var h=l(f,"width"),p=l(f,"height"),d=+t.attr("x")-h*{start:0,middle:.5,end:1}[t.attr("text-anchor")||"start"],m=-(r||l(t,"height"))/4;"y"===I[0]?(c.attr({transform:"rotate("+[-90,+t.attr("x"),+t.attr("y")]+")"+a(-h/2,m-p/2)}),s.attr({x:+t.attr("x"),y:+t.attr("y")})):"l"===I[0]?s.attr({x:t.attr("x"),y:m-p/2}):"a"===I[0]&&0!==I.indexOf("atitle")?s.attr({x:0,y:m}):s.attr({x:d,y:+t.attr("y")+m-p/2}),g&&g.call(t,c),e(c)}))}))):P(),t}function P(){L.empty()||(I=t.attr("class")+"-math",L.select("svg."+I).remove()),t.text("").style("white-space","pre"),function(t,e){e=e.replace(m," ");var r,a=!1,l=[],c=-1;function u(){c++;var e=document.createElementNS(o.svg,"tspan");n.select(e).attr({class:"line",dy:c*s+"em"}),t.appendChild(e),r=e;var i=l;if(l=[{node:e}],i.length>1)for(var a=1;a doesnt match end tag <"+t+">. Pretending it did match.",e),r=l[l.length-1].node}else i.log("Ignoring unexpected end tag .",e)}x.test(e)?u():(r=t,l=[{node:t}]);for(var S=e.split(v),L=0;L|>|>)/g;var h={sup:"font-size:70%",sub:"font-size:70%",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},p={sub:"0.3em",sup:"-0.6em"},d={sub:"-0.21em",sup:"0.42em"},g=["http:","https:","mailto:","",void 0,":"],m=r.NEWLINES=/(\r\n?|\n)/g,v=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,x=//i;r.BR_TAG_ALL=//gi;var b=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,_=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,w=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function k(t,e){if(!t)return null;var r=t.match(e),n=r&&(r[3]||r[4]);return n&&E(n)}var M=/(^|;)\s*color:/;r.plainText=function(t,e){for(var r=void 0!==(e=e||{}).len&&-1!==e.len?e.len:1/0,n=void 0!==e.allowedTags?e.allowedTags:["br"],i="...".length,a=t.split(v),o=[],s="",l=0,c=0;ci?o.push(u.substr(0,d-i)+"..."):o.push(u.substr(0,d));break}s=""}}return o.join("")};var A={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(t){return t.replace(S,(function(t,e){return("#"===e.charAt(0)?function(t){if(t>1114111)return;var e=String.fromCodePoint;if(e)return e(t);var r=String.fromCharCode;return t<=65535?r(t):r(55232+(t>>10),t%1024+56320)}("x"===e.charAt(1)?parseInt(e.substr(2),16):parseInt(e.substr(1),10)):A[e])||t}))}function C(t){var e=encodeURI(decodeURI(t)),r=document.createElement("a"),n=document.createElement("a");r.href=t,n.href=e;var i=r.protocol,a=n.protocol;return-1!==g.indexOf(i)&&-1!==g.indexOf(a)?e:""}function L(t,e,r){var n,a,o,s=r.horizontalAlign,l=r.verticalAlign||"top",c=t.node().getBoundingClientRect(),u=e.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var t=o()-u.left,e=a()-u.top,s=r.gd||{};if(r.gd){s._fullLayout._calcInverseTransform(s);var l=i.apply3DTransform(s._fullLayout._invTransform)(t,e);t=l[0],e=l[1]}return this.style({top:e+"px",left:t+"px","z-index":1e3}),this}}r.convertEntities=E,r.sanitizeHTML=function(t){t=t.replace(m," ");for(var e=document.createElement("p"),r=e,i=[],a=t.split(v),o=0;oa.ts+e?l():a.timer=setTimeout((function(){l(),a.timer=null}),e)},r.done=function(t){var e=n[t];return e&&e.timer?new Promise((function(t){var r=e.onDone;e.onDone=function(){r&&r(),t(),e.onDone=null}})):Promise.resolve()},r.clear=function(t){if(t)i(n[t]),delete n[t];else for(var e in n)r.clear(e)}},{}],805:[function(t,e,r){"use strict";var n=t("fast-isnumeric");e.exports=function(t,e){if(t>0)return Math.log(t)/Math.LN10;var r=Math.log(Math.min(e[0],e[1]))/Math.LN10;return n(r)||(r=Math.log(Math.max(e[0],e[1]))/Math.LN10-6),r}},{"fast-isnumeric":241}],806:[function(t,e,r){"use strict";var n=e.exports={},i=t("../plots/geo/constants").locationmodeToLayer,a=t("topojson-client").feature;n.getTopojsonName=function(t){return[t.scope.replace(/ /g,"-"),"_",t.resolution.toString(),"m"].join("")},n.getTopojsonPath=function(t,e){return t+e+".json"},n.getTopojsonFeatures=function(t,e){var r=i[t.locationmode],n=e.objects[r];return a(e,n).features}},{"../plots/geo/constants":858,"topojson-client":579}],807:[function(t,e,r){"use strict";e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},{}],808:[function(t,e,r){"use strict";e.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},{}],809:[function(t,e,r){"use strict";var n=t("../registry");e.exports=function(t){for(var e,r,i=n.layoutArrayContainers,a=n.layoutArrayRegexes,o=t.split("[")[0],s=0;s0&&o.log("Clearing previous rejected promises from queue."),t._promises=[]},r.cleanLayout=function(t){var e,n;t||(t={}),t.xaxis1&&(t.xaxis||(t.xaxis=t.xaxis1),delete t.xaxis1),t.yaxis1&&(t.yaxis||(t.yaxis=t.yaxis1),delete t.yaxis1),t.scene1&&(t.scene||(t.scene=t.scene1),delete t.scene1);var a=(s.subplotsRegistry.cartesian||{}).attrRegex,l=(s.subplotsRegistry.polar||{}).attrRegex,f=(s.subplotsRegistry.ternary||{}).attrRegex,h=(s.subplotsRegistry.gl3d||{}).attrRegex,g=Object.keys(t);for(e=0;e3?(z.x=1.02,z.xanchor="left"):z.x<-2&&(z.x=-.02,z.xanchor="right"),z.y>3?(z.y=1.02,z.yanchor="bottom"):z.y<-2&&(z.y=-.02,z.yanchor="top")),d(t),"rotate"===t.dragmode&&(t.dragmode="orbit"),c.clean(t),t.template&&t.template.layout&&r.cleanLayout(t.template.layout),t},r.cleanData=function(t){for(var e=0;e0)return t.substr(0,e)}r.hasParent=function(t,e){for(var r=b(e);r;){if(r in t)return!0;r=b(r)}return!1};var _=["x","y","z"];r.clearAxisTypes=function(t,e,r){for(var n=0;n1&&a.warn("Full array edits are incompatible with other edits",f);var y=r[""][""];if(c(y))e.set(null);else{if(!Array.isArray(y))return a.warn("Unrecognized full array edit value",f,y),!0;e.set(y)}return!g&&(h(m,v),p(t),!0)}var x,b,_,w,T,k,M,A,S=Object.keys(r).map(Number).sort(o),E=e.get(),C=E||[],L=u(v,f).get(),I=[],P=-1,z=C.length;for(x=0;xC.length-(M?0:1))a.warn("index out of range",f,_);else if(void 0!==k)T.length>1&&a.warn("Insertion & removal are incompatible with edits to the same index.",f,_),c(k)?I.push(_):M?("add"===k&&(k={}),C.splice(_,0,k),L&&L.splice(_,0,{})):a.warn("Unrecognized full object edit value",f,_,k),-1===P&&(P=_);else for(b=0;b=0;x--)C.splice(I[x],1),L&&L.splice(I[x],1);if(C.length?E||e.set(C):e.set(null),g)return!1;if(h(m,v),d!==i){var O;if(-1===P)O=S;else{for(z=Math.max(C.length,z),O=[],x=0;x=P);x++)O.push(_);for(x=P;x=t.data.length||i<-t.data.length)throw new Error(r+" must be valid indices for gd.data.");if(e.indexOf(i,n+1)>-1||i>=0&&e.indexOf(-t.data.length+i)>-1||i<0&&e.indexOf(t.data.length+i)>-1)throw new Error("each index in "+r+" must be unique.")}}function O(t,e,r){if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("currentIndices is a required argument.");if(Array.isArray(e)||(e=[e]),z(t,e,"currentIndices"),"undefined"==typeof r||Array.isArray(r)||(r=[r]),"undefined"!=typeof r&&z(t,r,"newIndices"),"undefined"!=typeof r&&e.length!==r.length)throw new Error("current and new indices must be of equal length.")}function D(t,e,r,n,a){!function(t,e,r,n){var i=o.isPlainObject(n);if(!Array.isArray(t.data))throw new Error("gd.data must be an array");if(!o.isPlainObject(e))throw new Error("update must be a key:value object");if("undefined"==typeof r)throw new Error("indices must be an integer or array of integers");for(var a in z(t,r,"indices"),e){if(!Array.isArray(e[a])||e[a].length!==r.length)throw new Error("attribute "+a+" must be an array of length equal to indices array length");if(i&&(!(a in n)||!Array.isArray(n[a])||n[a].length!==e[a].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 corrispondence with the keys and number of traces in the update object")}}(t,e,r,n);for(var l=function(t,e,r,n){var a,l,c,u,f,h=o.isPlainObject(n),p=[];for(var d in Array.isArray(r)||(r=[r]),r=P(r,t.data.length-1),e)for(var g=0;g-1?l(r,r.replace("titlefont","title.font")):r.indexOf("titleposition")>-1?l(r,r.replace("titleposition","title.position")):r.indexOf("titleside")>-1?l(r,r.replace("titleside","title.side")):r.indexOf("titleoffset")>-1&&l(r,r.replace("titleoffset","title.offset")):l(r,r.replace("title","title.text"));function l(e,r){t[r]=t[e],delete t[e]}}function q(t,e,r){if(t=o.getGraphDiv(t),T.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);var n={};if("string"==typeof e)n[e]=r;else{if(!o.isPlainObject(e))return o.warn("Relayout fail.",e,r),Promise.reject();n=o.extendFlat({},e)}Object.keys(n).length&&(t.changed=!0);var i=Z(t,n),a=i.flags;a.calc&&(t.calcdata=void 0);var s=[h.previousPromises];a.layoutReplot?s.push(k.layoutReplot):Object.keys(n).length&&(H(t,a,i)||h.supplyDefaults(t),a.legend&&s.push(k.doLegend),a.layoutstyle&&s.push(k.layoutStyles),a.axrange&&G(s,i.rangesAltered),a.ticks&&s.push(k.doTicksRelayout),a.modebar&&s.push(k.doModeBar),a.camera&&s.push(k.doCamera),a.colorbars&&s.push(k.doColorBars),s.push(E)),s.push(h.rehover,h.redrag),c.add(t,q,[t,i.undoit],q,[t,i.redoit]);var l=o.syncOrAsync(s,t);return l&&l.then||(l=Promise.resolve(t)),l.then((function(){return t.emit("plotly_relayout",i.eventData),t}))}function H(t,e,r){var n=t._fullLayout;if(!e.axrange)return!1;for(var i in e)if("axrange"!==i&&e[i])return!1;for(var a in r.rangesAltered){var o=d.id2name(a),s=t.layout[o],l=n[o];if(l.autorange=s.autorange,s.range&&(l.range=s.range.slice()),l.cleanRange(),l._matchGroup)for(var c in l._matchGroup)if(c!==a){var u=n[d.id2name(c)];u.autorange=l.autorange,u.range=l.range.slice(),u._input.range=l.range.slice()}}return!0}function G(t,e){var r=e?function(t){var r=[],n=!0;for(var i in e){var a=d.getFromId(t,i);if(r.push(i),-1!==(a.ticklabelposition||"").indexOf("inside")&&a._anchorAxis&&r.push(a._anchorAxis._id),a._matchGroup)for(var o in a._matchGroup)e[o]||r.push(o);a.automargin&&(n=!1)}return d.draw(t,r,{skipTitle:n})}:function(t){return d.draw(t,"redraw")};t.push(b,k.doAutoRangeAndConstraints,r,k.drawData,k.finalDraw)}var Y=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,W=/^[xyz]axis[0-9]*\.autorange$/,X=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Z(t,e){var r,n,i,a=t.layout,l=t._fullLayout,c=l._guiEditing,h=N(l._preGUI,c),p=Object.keys(e),g=d.list(t),m=o.extendDeepAll({},e),v={};for(V(e),p=Object.keys(e),n=0;n0&&"string"!=typeof z.parts[D];)D--;var R=z.parts[D],F=z.parts[D-1]+"."+R,j=z.parts.slice(0,D).join("."),U=s(t.layout,j).get(),q=s(l,j).get(),H=z.get();if(void 0!==O){k[P]=O,S[P]="reverse"===R?O:B(H);var G=f.getLayoutValObject(l,z.parts);if(G&&G.impliedEdits&&null!==O)for(var Z in G.impliedEdits)E(o.relativeAttr(P,Z),G.impliedEdits[Z]);if(-1!==["width","height"].indexOf(P))if(O){E("autosize",null);var K="height"===P?"width":"height";E(K,l[K])}else l[P]=t._initialAutoSize[P];else if("autosize"===P)E("width",O?null:l.width),E("height",O?null:l.height);else if(F.match(Y))I(F),s(l,j+"._inputRange").set(null);else if(F.match(W)){I(F),s(l,j+"._inputRange").set(null);var Q=s(l,j).get();Q._inputDomain&&(Q._input.domain=Q._inputDomain.slice())}else F.match(X)&&s(l,j+"._inputDomain").set(null);if("type"===R){C=U;var $="linear"===q.type&&"log"===O,tt="log"===q.type&&"linear"===O;if($||tt){if(C&&C.range)if(q.autorange)$&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],rt=C.range[1];$?(et<=0&&rt<=0&&E(j+".autorange",!0),et<=0?et=rt/1e6:rt<=0&&(rt=et/1e6),E(j+".range[0]",Math.log(et)/Math.LN10),E(j+".range[1]",Math.log(rt)/Math.LN10)):(E(j+".range[0]",Math.pow(10,et)),E(j+".range[1]",Math.pow(10,rt)))}else E(j+".autorange",!0);Array.isArray(l._subplots.polar)&&l._subplots.polar.length&&l[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete l[z.parts[0]]._subplot.viewInitial["radialaxis.range"],u.getComponentMethod("annotations","convertCoords")(t,q,O,E),u.getComponentMethod("images","convertCoords")(t,q,O,E)}else E(j+".autorange",!0),E(j+".range",null);s(l,j+"._inputRange").set(null)}else if(R.match(A)){var nt=s(l,P).get(),it=(O||{}).type;it&&"-"!==it||(it="linear"),u.getComponentMethod("annotations","convertCoords")(t,nt,it,E),u.getComponentMethod("images","convertCoords")(t,nt,it,E)}var at=w.containerArrayMatch(P);if(at){r=at.array,n=at.index;var ot=at.property,st=G||{editType:"calc"};""!==n&&""===ot&&(w.isAddVal(O)?S[P]=null:w.isRemoveVal(O)?S[P]=(s(a,r).get()||[])[n]:o.warn("unrecognized full object value",e)),M.update(_,st),v[r]||(v[r]={});var lt=v[r][n];lt||(lt=v[r][n]={}),lt[ot]=O,delete e[P]}else"reverse"===R?(U.range?U.range.reverse():(E(j+".autorange",!0),U.range=[1,0]),q.autorange?_.calc=!0:_.plot=!0):(l._has("scatter-like")&&l._has("regl")&&"dragmode"===P&&("lasso"===O||"select"===O)&&"lasso"!==H&&"select"!==H||l._has("gl2d")?_.plot=!0:G?M.update(_,G):_.calc=!0,z.set(O))}}for(r in v){w.applyContainerArrayChanges(t,h(a,r),v[r],_,h)||(_.plot=!0)}for(var ct in L){var ut=(C=d.getFromId(t,ct))&&C._constraintGroup;if(ut)for(var ft in _.calc=!0,ut)L[ft]||(d.getFromId(t,ft)._constraintShrinkable=!0)}return(J(t)||e.height||e.width)&&(_.plot=!0),(_.plot||_.calc)&&(_.layoutReplot=!0),{flags:_,rangesAltered:L,undoit:S,redoit:k,eventData:m}}function J(t){var e=t._fullLayout,r=e.width,n=e.height;return t.layout.autosize&&h.plotAutoSize(t,t.layout,e),e.width!==r||e.height!==n}function K(t,e,n,i){if(t=o.getGraphDiv(t),T.clearPromiseQueue(t),t.framework&&t.framework.isPolar)return Promise.resolve(t);o.isPlainObject(e)||(e={}),o.isPlainObject(n)||(n={}),Object.keys(e).length&&(t.changed=!0),Object.keys(n).length&&(t.changed=!0);var a=T.coerceTraceIndices(t,i),s=U(t,o.extendFlat({},e),a),l=s.flags,u=Z(t,o.extendFlat({},n)),f=u.flags;(l.calc||f.calc)&&(t.calcdata=void 0),l.clearAxisTypes&&T.clearAxisTypes(t,a,n);var p=[];f.layoutReplot?p.push(k.layoutReplot):l.fullReplot?p.push(r.plot):(p.push(h.previousPromises),H(t,f,u)||h.supplyDefaults(t),l.style&&p.push(k.doTraceStyle),(l.colorbars||f.colorbars)&&p.push(k.doColorBars),f.legend&&p.push(k.doLegend),f.layoutstyle&&p.push(k.layoutStyles),f.axrange&&G(p,u.rangesAltered),f.ticks&&p.push(k.doTicksRelayout),f.modebar&&p.push(k.doModeBar),f.camera&&p.push(k.doCamera),p.push(E)),p.push(h.rehover,h.redrag),c.add(t,K,[t,s.undoit,u.undoit,s.traces],K,[t,s.redoit,u.redoit,s.traces]);var d=o.syncOrAsync(p,t);return d&&d.then||(d=Promise.resolve(t)),d.then((function(){return t.emit("plotly_update",{data:s.eventData,layout:u.eventData}),t}))}function Q(t){return function(e){e._fullLayout._guiEditing=!0;var r=t.apply(null,arguments);return e._fullLayout._guiEditing=!1,r}}var $=[{pattern:/^hiddenlabels/,attr:"legend.uirevision"},{pattern:/^((x|y)axis\d*)\.((auto)?range|title\.text)/},{pattern:/axis\d*\.showspikes$/,attr:"modebar.uirevision"},{pattern:/(hover|drag)mode$/,attr:"modebar.uirevision"},{pattern:/^(scene\d*)\.camera/},{pattern:/^(geo\d*)\.(projection|center|fitbounds)/},{pattern:/^(ternary\d*\.[abc]axis)\.(min|title\.text)$/},{pattern:/^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},{pattern:/^(polar\d*\.angularaxis)\.rotation/},{pattern:/^(mapbox\d*)\.(center|zoom|bearing|pitch)/},{pattern:/^legend\.(x|y)$/,attr:"editrevision"},{pattern:/^(shapes|annotations)/,attr:"editrevision"},{pattern:/^title\.text$/,attr:"editrevision"}],tt=[{pattern:/^selectedpoints$/,attr:"selectionrevision"},{pattern:/(^|value\.)visible$/,attr:"legend.uirevision"},{pattern:/^dimensions\[\d+\]\.constraintrange/},{pattern:/^node\.(x|y|groups)/},{pattern:/^level$/},{pattern:/(^|value\.)name$/},{pattern:/colorbar\.title\.text$/},{pattern:/colorbar\.(x|y)$/,attr:"editrevision"}];function et(t,e){for(var r=0;r1;)if(n.pop(),void 0!==(r=s(e,n.join(".")+".uirevision").get()))return r;return e.uirevision}function nt(t,e){for(var r=0;r=i.length?i[0]:i[t]:i}function l(t){return Array.isArray(a)?t>=a.length?a[0]:a[t]:a}function c(t,e){var r=0;return function(){if(t&&++r===e)return t()}}return void 0===n._frameWaitingCnt&&(n._frameWaitingCnt=0),new Promise((function(a,u){function f(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var e=n._currentFrame=n._frameQueue.shift();if(e){var r=e.name?e.name.toString():null;t._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=e.frameOpts.duration,h.transition(t,e.frame.data,e.frame.layout,T.coerceTraceIndices(t,e.frame.traces),e.frameOpts,e.transitionOpts).then((function(){e.onComplete&&e.onComplete()})),t.emit("plotly_animatingframe",{name:r,frame:e.frame,animation:{frame:e.frameOpts,transition:e.transitionOpts}})}else t.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}function p(){t.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null;var e=function(){n._animationRaf=window.requestAnimationFrame(e),Date.now()-n._lastFrameAt>n._timeToNext&&f()};e()}var d,g,m=0;function v(t){return Array.isArray(i)?m>=i.length?t.transitionOpts=i[m]:t.transitionOpts=i[0]:t.transitionOpts=i,m++,t}var y=[],x=null==e,b=Array.isArray(e);if(!x&&!b&&o.isPlainObject(e))y.push({type:"object",data:v(o.extendFlat({},e))});else if(x||-1!==["string","number"].indexOf(typeof e))for(d=0;d0&&kk)&&M.push(g);y=M}}y.length>0?function(e){if(0!==e.length){for(var i=0;i=0;n--)if(o.isPlainObject(e[n])){var g=e[n].name,m=(u[g]||d[g]||{}).name,v=e[n].name,y=u[m]||d[m];m&&v&&"number"==typeof v&&y&&S<5&&(S++,o.warn('addFrames: overwriting frame "'+(u[m]||d[m]).name+'" with a frame whose name of type "number" also equates to "'+m+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&o.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),d[g]={name:g},p.push({frame:h.supplyFrameDefaults(e[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}p.sort((function(t,e){return t.index>e.index?-1:t.index=0;n--){if("number"==typeof(i=p[n].frame).name&&o.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!i.name)for(;u[i.name="frame "+t._transitionData._counter++];);if(u[i.name]){for(a=0;a=0;r--)n=e[r],a.push({type:"delete",index:n}),s.unshift({type:"insert",index:n,value:i[n]});var l=h.modifyFrames,u=h.modifyFrames,f=[t,s],p=[t,a];return c&&c.add(t,l,f,u,p),h.modifyFrames(t,a)},r.addTraces=function t(e,n,i){e=o.getGraphDiv(e);var a,s,l=[],u=r.deleteTraces,f=t,h=[e,l],p=[e,n];for(function(t,e,r){var n,i;if(!Array.isArray(t.data))throw new Error("gd.data must be an array.");if("undefined"==typeof e)throw new Error("traces must be defined.");for(Array.isArray(e)||(e=[e]),n=0;n=0&&r=0&&r=a.length)return!1;if(2===t.dimensions){if(r++,e.length===r)return t;var o=e[r];if(!_(o))return!1;t=a[i][o]}else t=a[i]}else t=a}}return t}function _(t){return t===Math.round(t)&&t>=0}function w(){var t,e,r={};for(t in d(r,o),n.subplotsRegistry){if((e=n.subplotsRegistry[t]).layoutAttributes)if(Array.isArray(e.attr))for(var i=0;i=l.length)return!1;i=(r=(n.transformsRegistry[l[c].type]||{}).attributes)&&r[e[2]],s=3}else if("area"===t.type)i=u[o];else{var f=t._module;if(f||(f=(n.modules[t.type||a.type.dflt]||{})._module),!f)return!1;if(!(i=(r=f.attributes)&&r[o])){var h=f.basePlotModule;h&&h.attributes&&(i=h.attributes[o])}i||(i=a[o])}return b(i,e,s)},r.getLayoutValObject=function(t,e){return b(function(t,e){var r,i,a,s,l=t._basePlotModules;if(l){var c;for(r=0;r=i&&(r._input||{})._templateitemname;o&&(a=i);var s,l=e+"["+a+"]";function c(){s={},o&&(s[l]={},s[l].templateitemname=o)}function u(t,e){o?n.nestedProperty(s[l],t).set(e):s[l+"."+t]=e}function f(){var t=s;return c(),t}return c(),{modifyBase:function(t,e){s[t]=e},modifyItem:u,getUpdateObj:f,applyUpdate:function(e,r){e&&u(e,r);var i=f();for(var a in i)n.nestedProperty(t,a).set(i[a])}}}},{"../lib":778,"../plots/attributes":824}],818:[function(t,e,r){"use strict";var n=t("d3"),i=t("../registry"),a=t("../plots/plots"),o=t("../lib"),s=t("../lib/clear_gl_canvases"),l=t("../components/color"),c=t("../components/drawing"),u=t("../components/titles"),f=t("../components/modebar"),h=t("../plots/cartesian/axes"),p=t("../constants/alignment"),d=t("../plots/cartesian/constraints"),g=d.enforce,m=d.clean,v=t("../plots/cartesian/autorange").doAutoRange;function y(t,e,r){for(var n=0;n=t[1]||i[1]<=t[0])&&(a[0]e[0]))return!0}return!1}function x(t){var e,i,s,u,d,g,m=t._fullLayout,v=m._size,x=v.p,_=h.list(t,"",!0);if(m._paperdiv.style({width:t._context.responsive&&m.autosize&&!t._context._hasZeroWidth&&!t.layout.width?"100%":m.width+"px",height:t._context.responsive&&m.autosize&&!t._context._hasZeroHeight&&!t.layout.height?"100%":m.height+"px"}).selectAll(".main-svg").call(c.setSize,m.width,m.height),t._context.setBackground(t,m.paper_bgcolor),r.drawMainTitle(t),f.manage(t),!m._has("cartesian"))return a.previousPromises(t);function T(t,e,r){var n=t._lw/2;return"x"===t._id.charAt(0)?e?"top"===r?e._offset-x-n:e._offset+e._length+x+n:v.t+v.h*(1-(t.position||0))+n%1:e?"right"===r?e._offset+e._length+x+n:e._offset-x-n:v.l+v.w*(t.position||0)+n%1}for(e=0;e<_.length;e++){var k=(u=_[e])._anchorAxis;u._linepositions={},u._lw=c.crispRound(t,u.linewidth,1),u._mainLinePosition=T(u,k,u.side),u._mainMirrorPosition=u.mirror&&k?T(u,k,p.OPPOSITE_SIDE[u.side]):null}var M=[],A=[],S=[],E=1===l.opacity(m.paper_bgcolor)&&1===l.opacity(m.plot_bgcolor)&&m.paper_bgcolor===m.plot_bgcolor;for(i in m._plots)if((s=m._plots[i]).mainplot)s.bg&&s.bg.remove(),s.bg=void 0;else{var C=s.xaxis.domain,L=s.yaxis.domain,I=s.plotgroup;if(y(C,L,S)){var P=I.node(),z=s.bg=o.ensureSingle(I,"rect","bg");P.insertBefore(z.node(),P.childNodes[0]),A.push(i)}else I.select("rect.bg").remove(),S.push([C,L]),E||(M.push(i),A.push(i))}var O,D,R,F,B,N,j,U,V,q,H,G,Y,W=m._bgLayer.selectAll(".bg").data(M);for(W.enter().append("rect").classed("bg",!0),W.exit().remove(),W.each((function(t){m._plots[t].bg=n.select(this)})),e=0;eT?u.push({code:"unused",traceType:y,templateCount:w,dataCount:T}):T>w&&u.push({code:"reused",traceType:y,templateCount:w,dataCount:T})}}else u.push({code:"data"});if(function t(e,r){for(var n in e)if("_"!==n.charAt(0)){var a=e[n],o=g(e,n,r);i(a)?(Array.isArray(e)&&!1===a._template&&a.templateitemname&&u.push({code:"missing",path:o,templateitemname:a.templateitemname}),t(a,o)):Array.isArray(a)&&m(a)&&t(a,o)}}({data:p,layout:h},""),u.length)return u.map(v)}},{"../lib":778,"../plots/attributes":824,"../plots/plots":891,"./plot_config":815,"./plot_schema":816,"./plot_template":817}],820:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./plot_api"),a=t("../plots/plots"),o=t("../lib"),s=t("../snapshot/helpers"),l=t("../snapshot/tosvg"),c=t("../snapshot/svgtoimg"),u=t("../version").version,f={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};e.exports=function(t,e){var r,h,p,d;function g(t){return!(t in e)||o.validate(e[t],f[t])}if(e=e||{},o.isPlainObject(t)?(r=t.data||[],h=t.layout||{},p=t.config||{},d={}):(t=o.getGraphDiv(t),r=o.extendDeep([],t.data),h=o.extendDeep({},t.layout),p=t._context,d=t._fullLayout||{}),!g("width")&&null!==e.width||!g("height")&&null!==e.height)throw new Error("Height and width should be pixel values.");if(!g("format"))throw new Error("Export format is not "+o.join2(f.format.values,", "," or ")+".");var m={};function v(t,r){return o.coerce(e,m,f,t,r)}var y=v("format"),x=v("width"),b=v("height"),_=v("scale"),w=v("setBackground"),T=v("imageDataOnly"),k=document.createElement("div");k.style.position="absolute",k.style.left="-5000px",document.body.appendChild(k);var M=o.extendFlat({},h);x?M.width=x:null===e.width&&n(d.width)&&(M.width=d.width),b?M.height=b:null===e.height&&n(d.height)&&(M.height=d.height);var A=o.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=s.getRedrawFunc(k);function E(){return new Promise((function(t){setTimeout(t,s.getDelay(k._fullLayout))}))}function C(){return new Promise((function(t,e){var r=l(k,y,_),n=k._fullLayout.width,f=k._fullLayout.height;function h(){i.purge(k),document.body.removeChild(k)}if("full-json"===y){var p=a.graphJson(k,!1,"keepdata","object",!0,!0);return p.version=u,p=JSON.stringify(p),h(),t(T?p:s.encodeJSON(p))}if(h(),"svg"===y)return t(T?r:s.encodeSVG(r));var d=document.createElement("canvas");d.id=o.randstr(),c({format:y,width:n,height:f,scale:_,canvas:d,svg:r,promise:!0}).then(t).catch(e)}))}return new Promise((function(t,e){i.plot(k,r,M,A).then(S).then(E).then(C).then((function(e){t(function(t){return T?t.replace(s.IMAGE_URL_PREFIX,""):t}(e))})).catch((function(t){e(t)}))}))}},{"../lib":778,"../plots/plots":891,"../snapshot/helpers":915,"../snapshot/svgtoimg":917,"../snapshot/tosvg":919,"../version":1370,"./plot_api":814,"fast-isnumeric":241}],821:[function(t,e,r){"use strict";var n=t("../lib"),i=t("../plots/plots"),a=t("./plot_schema"),o=t("./plot_config").dfltConfig,s=n.isPlainObject,l=Array.isArray,c=n.isArrayOrTypedArray;function u(t,e,r,i,a,o){o=o||[];for(var f=Object.keys(t),h=0;hx.length&&i.push(d("unused",a,v.concat(x.length)));var M,A,S,E,C,L=x.length,I=Array.isArray(k);if(I&&(L=Math.min(L,k.length)),2===b.dimensions)for(A=0;Ax[A].length&&i.push(d("unused",a,v.concat(A,x[A].length)));var P=x[A].length;for(M=0;M<(I?Math.min(P,k[A].length):P);M++)S=I?k[A][M]:k,E=y[A][M],C=x[A][M],n.validate(E,S)?C!==E&&C!==+E&&i.push(d("dynamic",a,v.concat(A,M),E,C)):i.push(d("value",a,v.concat(A,M),E))}else i.push(d("array",a,v.concat(A),y[A]));else for(A=0;A1&&p.push(d("object","layout"))),i.supplyDefaults(g);for(var m=g._fullData,v=r.length,y=0;y0&&Math.round(f)===f))return i;c=f}for(var h=e.calendar,p="start"===l,d="end"===l,g=t[r+"period0"],m=a(g,h)||0,v=[],y=i.length,x=0;xT;)w=o(w,-c,h);for(;w<=T;)w=o(w,c,h);_=o(w,-c,h)}else{for(w=m+(b=Math.round((T-m)/u))*u;w>T;)w-=u;for(;w<=T;)w+=u;_=w-u}v[x]=p?_:d?w:(_+w)/2}return v}},{"../../constants/numerical":753,"../../lib":778,"fast-isnumeric":241}],826:[function(t,e,r){"use strict";e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},{}],827:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../constants/numerical").FP_SAFE,o=t("../../registry"),s=t("./axis_ids"),l=s.getFromId,c=s.isLinked;function u(t,e){var r,n,a=[],o=t._fullLayout,s=h(o,e,0),l=h(o,e,1),c=p(t,e),u=c.min,d=c.max;if(0===u.length||0===d.length)return i.simpleMap(e.range,e.r2l);var g=u[0].val,m=d[0].val;for(r=1;r0&&((T=E-s(x)-l(b))>C?k/T>L&&(_=x,w=b,L=k/T):k/E>L&&(_={val:x.val,nopad:1},w={val:b.val,nopad:1},L=k/E));if(g===m){var I=g-1,P=g+1;if(A)if(0===g)a=[0,1];else{var z=(g>0?d:u).reduce((function(t,e){return Math.max(t,l(e))}),0),O=g/(1-Math.min(.5,z/E));a=g>0?[0,O]:[O,0]}else a=S?[Math.max(0,I),Math.max(1,P)]:[I,P]}else A?(_.val>=0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:0,nopad:1})):S&&(_.val-L*s(_)<0&&(_={val:0,nopad:1}),w.val<=0&&(w={val:1,nopad:1})),L=(w.val-_.val-f(e,x.val,b.val))/(E-s(_)-l(w)),a=[_.val-L*s(_),w.val+L*l(w)];return v&&a.reverse(),i.simpleMap(a,e.l2r||Number)}function f(t,e,r){var n=0;if(t.rangebreaks)for(var i=t.locateBreaks(e,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),S=M((t._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),E=M(r.vpadplus||r.vpad),C=M(r.vpadminus||r.vpad);if(!T){if(h=1/0,p=-1/0,w)for(i=0;i0&&(h=o),o>p&&o-a&&(h=o),o>p&&o=P;i--)I(i);return{min:m,max:y,opts:r}},concatExtremes:p};function p(t,e,r){var n,i,a,o=e._id,s=t._fullData,c=t._fullLayout,u=[],f=[];function h(t,e){for(n=0;n=r&&(c.extrapad||!o)){s=!1;break}i(e,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(t.splice(l,1),l--)}if(s){var u=a&&0===e;t.push({val:e,pad:u?0:r,extrapad:!u&&o})}}function v(t){return n(t)&&Math.abs(t)=e}},{"../../constants/numerical":753,"../../lib":778,"../../registry":911,"./axis_ids":831,"fast-isnumeric":241}],828:[function(t,e,r){"use strict";var n=t("d3"),i=t("fast-isnumeric"),a=t("../../plots/plots"),o=t("../../registry"),s=t("../../lib"),l=s.strTranslate,c=t("../../lib/svg_text_utils"),u=t("../../components/titles"),f=t("../../components/color"),h=t("../../components/drawing"),p=t("./layout_attributes"),d=t("./clean_ticks"),g=t("../../constants/numerical"),m=g.ONEMAXYEAR,v=g.ONEAVGYEAR,y=g.ONEMINYEAR,x=g.ONEMAXQUARTER,b=g.ONEAVGQUARTER,_=g.ONEMINQUARTER,w=g.ONEMAXMONTH,T=g.ONEAVGMONTH,k=g.ONEMINMONTH,M=g.ONEWEEK,A=g.ONEDAY,S=A/2,E=g.ONEHOUR,C=g.ONEMIN,L=g.ONESEC,I=g.MINUS_SIGN,P=g.BADNUM,z=t("../../constants/alignment"),O=z.MID_SHIFT,D=z.CAP_SHIFT,R=z.LINE_SPACING,F=z.OPPOSITE_SIDE,B=e.exports={};B.setConvert=t("./set_convert");var N=t("./axis_autotype"),j=t("./axis_ids"),U=j.idSort,V=j.isLinked;B.id2name=j.id2name,B.name2id=j.name2id,B.cleanId=j.cleanId,B.list=j.list,B.listIds=j.listIds,B.getFromId=j.getFromId,B.getFromTrace=j.getFromTrace;var q=t("./autorange");B.getAutoRange=q.getAutoRange,B.findExtremes=q.findExtremes;function H(t){var e=1e-4*(t[1]-t[0]);return[t[0]-e,t[1]+e]}B.coerceRef=function(t,e,r,n,i,a){var o=n.charAt(n.length-1),l=r._fullLayout._subplots[o+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map((function(t){return t+" domain"}))),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},s.coerce(t,e,u,c)},B.getRefType=function(t){return void 0===t?t:"paper"===t?"paper":"pixel"===t?"pixel":/( domain)$/.test(t)?"domain":"range"},B.coercePosition=function(t,e,r,n,i,a){var o,l;if("range"!==B.getRefType(n))o=s.ensureNumber,l=r(i,a);else{var c=B.getFromId(e,n);l=r(i,a=c.fraction2r(a)),o=c.cleanPos}t[i]=o(l)},B.cleanPosition=function(t,e,r){return("paper"===r||"pixel"===r?s.ensureNumber:B.getFromId(e,r).cleanPos)(t)},B.redrawComponents=function(t,e){e=e||B.listIds(t);var r=t._fullLayout;function n(n,i,a,s){for(var l=o.getComponentMethod(n,i),c={},u=0;u2e-6||((r-t._forceTick0)/t._minDtick%1+1.000001)%1>2e-6)&&(t._minDtick=0)):t._minDtick=0},B.saveRangeInitial=function(t,e){for(var r=B.list(t,"",!0),n=!1,i=0;i.3*h||u(n)||u(a))){var p=r.dtick/2;t+=t+p.8){var o=Number(r.substr(1));a.exactYears>.8&&o%12==0?t=B.tickIncrement(t,"M6","reverse")+1.5*A:a.exactMonths>.8?t=B.tickIncrement(t,"M1","reverse")+15.5*A:t-=S;var l=B.tickIncrement(t,r);if(l<=n)return l}return t}(y,t,v,c,a)),m=y,0;m<=u;)m=B.tickIncrement(m,v,!1,a);return{start:e.c2r(y,0,a),end:e.c2r(m,0,a),size:v,_dataSpan:u-c}},B.prepTicks=function(t,e){var r=s.simpleMap(t.range,t.r2l,void 0,void 0,e);if(t._dtickInit=t.dtick,t._tick0Init=t.tick0,"auto"===t.tickmode||!t.dtick){var n,a=t.nticks;a||("category"===t.type||"multicategory"===t.type?(n=t.tickfont?1.2*(t.tickfont.size||12):15,a=t._length/n):(n="y"===t._id.charAt(0)?40:80,a=s.constrain(t._length/n,4,9)+1),"radialaxis"===t._name&&(a*=2)),"array"===t.tickmode&&(a*=100),t._roughDTick=Math.abs(r[1]-r[0])/a,B.autoTicks(t,t._roughDTick),t._minDtick>0&&t.dtick<2*t._minDtick&&(t.dtick=t._minDtick,t.tick0=t.l2r(t._forceTick0))}"period"===t.ticklabelmode&&function(t){var e;function r(){return!(i(t.dtick)||"M"!==t.dtick.charAt(0))}var n=r(),a=B.getTickFormat(t);if(a){var o=t._dtickInit!==t.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(e=E,o&&!n&&t.dticka&&f=o:p<=o;p=B.tickIncrement(p,t.dtick,l,t.calendar)){if(t.rangebreaks&&!l){if(p=u)break}if(C.length>g||p===L)break;L=p;var I=!1;f&&p!==(0|p)&&(I=!0),C.push({minor:I,value:p})}if(h&&function(t,e,r){for(var n=0;n0?(a=n-1,o=n):(a=n,o=n);var s,l=t[a].value,c=t[o].value,u=Math.abs(c-l),f=r||u,h=0;f>=y?h=u>=y&&u<=m?u:v:r===b&&f>=_?h=u>=_&&u<=x?u:b:f>=k?h=u>=k&&u<=w?u:T:r===M&&f>=M?h=M:f>=A?h=A:r===S&&f>=S?h=S:r===E&&f>=E&&(h=E),h>=u&&(h=u,s=!0);var p=i+h;if(e.rangebreaks&&h>0){for(var d=0,g=0;g<84;g++){var C=(g+.5)/84;e.maskBreaks(i*(1-C)+C*p)!==P&&d++}(h*=d/84)||(t[n].drop=!0),s&&u>M&&(h=u)}(h>0||0===n)&&(t[n].periodX=i+h/2)}}(C,t,t._definedDelta),t.rangebreaks){var z="y"===t._id.charAt(0),O=1;"auto"===t.tickmode&&(O=t.tickfont?t.tickfont.size:12);var D=NaN;for(d=C.length-1;d>-1;d--)if(C[d].drop)C.splice(d,1);else{C[d].value=wt(C[d].value,t);var R=t.c2p(C[d].value);(z?D>R-O:Du||Nu&&(F.periodX=u),N10||"01-01"!==n.substr(5)?t._tickround="d":t._tickround=+e.substr(1)%12==0?"y":"m";else if(e>=A&&a<=10||e>=15*A)t._tickround="d";else if(e>=C&&a<=16||e>=E)t._tickround="M";else if(e>=L&&a<=19||e>=C)t._tickround="S";else{var o=t.l2r(r+e).replace(/^-/,"").length;t._tickround=Math.max(a,o)-20,t._tickround<0&&(t._tickround=4)}}else if(i(e)||"L"===e.charAt(0)){var s=t.range.map(t.r2d||Number);i(e)||(e=Number(e.substr(1))),t._tickround=2-Math.floor(Math.log(e)/Math.LN10+.01);var l=Math.max(Math.abs(s[0]),Math.abs(s[1])),c=Math.floor(Math.log(l)/Math.LN10+.01),u=void 0===t.minexponent?3:t.minexponent;Math.abs(c)>u&&(ot(t.exponentformat)&&!st(c)?t._tickexponent=3*Math.round((c-1)/3):t._tickexponent=c)}else t._tickround=null}function it(t,e,r){var n=t.tickfont||{};return{x:e,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontColor:n.color}}B.autoTicks=function(t,e){var r;function n(t){return Math.pow(t,Math.floor(Math.log(e)/Math.LN10))}if("date"===t.type){t.tick0=s.dateTick0(t.calendar,0);var a=2*e;if(a>v)e/=v,r=n(10),t.dtick="M"+12*rt(e,r,Z);else if(a>T)e/=T,t.dtick="M"+rt(e,1,J);else if(a>A){t.dtick=rt(e,A,t._hasDayOfWeekBreaks?[1,2,7,14]:Q);var o=B.getTickFormat(t),l="period"===t.ticklabelmode;l&&(t._rawTick0=t.tick0),/%[uVW]/.test(o)?t.tick0=s.dateTick0(t.calendar,2):t.tick0=s.dateTick0(t.calendar,1),l&&(t._dowTick0=t.tick0)}else a>E?t.dtick=rt(e,E,J):a>C?t.dtick=rt(e,C,K):a>L?t.dtick=rt(e,L,K):(r=n(10),t.dtick=rt(e,r,Z))}else if("log"===t.type){t.tick0=0;var c=s.simpleMap(t.range,t.r2l);if(e>.7)t.dtick=Math.ceil(e);else if(Math.abs(c[1]-c[0])<1){var u=1.5*Math.abs((c[1]-c[0])/e);e=Math.abs(Math.pow(10,c[1])-Math.pow(10,c[0]))/u,r=n(10),t.dtick="L"+rt(e,r,Z)}else t.dtick=e>.3?"D2":"D1"}else"category"===t.type||"multicategory"===t.type?(t.tick0=0,t.dtick=Math.ceil(Math.max(e,1))):_t(t)?(t.tick0=0,r=1,t.dtick=rt(e,r,et)):(t.tick0=0,r=n(10),t.dtick=rt(e,r,Z));if(0===t.dtick&&(t.dtick=1),!i(t.dtick)&&"string"!=typeof t.dtick){var f=t.dtick;throw t.dtick=1,"ax.dtick error: "+String(f)}},B.tickIncrement=function(t,e,r,a){var o=r?-1:1;if(i(e))return s.increment(t,o*e);var l=e.charAt(0),c=o*Number(e.substr(1));if("M"===l)return s.incrementMonth(t,c,a);if("L"===l)return Math.log(Math.pow(10,t)+c)/Math.LN10;if("D"===l){var u="D2"===e?tt:$,f=t+.01*o,h=s.roundUp(s.mod(f,1),u,r);return Math.floor(f)+Math.log(n.round(Math.pow(10,h),1))/Math.LN10}throw"unrecognized dtick "+String(e)},B.tickFirst=function(t,e){var r=t.r2l||Number,a=s.simpleMap(t.range,r,void 0,void 0,e),o=a[1] ")}else t._prevDateHead=l,c+="
    "+l;e.text=c}(t,o,r,c):"log"===u?function(t,e,r,n,a){var o=t.dtick,l=e.x,c=t.tickformat,u="string"==typeof o&&o.charAt(0);"never"===a&&(a="");n&&"L"!==u&&(o="L3",u="L");if(c||"L"===u)e.text=lt(Math.pow(10,l),t,a,n);else if(i(o)||"D"===u&&s.mod(l+.01,1)<.1){var f=Math.round(l),h=Math.abs(f),p=t.exponentformat;"power"===p||ot(p)&&st(f)?(e.text=0===f?1:1===f?"10":"10"+(f>1?"":I)+h+"",e.fontSize*=1.25):("e"===p||"E"===p)&&h>2?e.text="1"+p+(f>0?"+":I)+h:(e.text=lt(Math.pow(10,l),t,"","fakehover"),"D1"===o&&"y"===t._id.charAt(0)&&(e.dy-=e.fontSize/6))}else{if("D"!==u)throw"unrecognized dtick "+String(o);e.text=String(Math.round(Math.pow(10,s.mod(l,1)))),e.fontSize*=.75}if("D1"===t.dtick){var d=String(e.text).charAt(0);"0"!==d&&"1"!==d||("y"===t._id.charAt(0)?e.dx-=e.fontSize/4:(e.dy+=e.fontSize/2,e.dx+=(t.range[1]>t.range[0]?1:-1)*e.fontSize*(l<0?.5:.25)))}}(t,o,0,c,g):"category"===u?function(t,e){var r=t._categories[Math.round(e.x)];void 0===r&&(r="");e.text=String(r)}(t,o):"multicategory"===u?function(t,e,r){var n=Math.round(e.x),i=t._categories[n]||[],a=void 0===i[1]?"":String(i[1]),o=void 0===i[0]?"":String(i[0]);r?e.text=o+" - "+a:(e.text=a,e.text2=o)}(t,o,r):_t(t)?function(t,e,r,n,i){if("radians"!==t.thetaunit||r)e.text=lt(e.x,t,i,n);else{var a=e.x/180;if(0===a)e.text="0";else{var o=function(t){function e(t,e){return Math.abs(t-e)<=1e-6}var r=function(t){for(var r=1;!e(Math.round(t*r)/r,t);)r*=10;return r}(t),n=t*r,i=Math.abs(function t(r,n){return e(n,0)?r:t(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(o[1]>=100)e.text=lt(s.deg2rad(e.x),t,i,n);else{var l=e.x<0;1===o[1]?1===o[0]?e.text="\u03c0":e.text=o[0]+"\u03c0":e.text=["",o[0],"","\u2044","",o[1],"","\u03c0"].join(""),l&&(e.text=I+e.text)}}}}(t,o,r,c,g):function(t,e,r,n,i){"never"===i?i="":"all"===t.showexponent&&Math.abs(e.x/t.dtick)<1e-6&&(i="hide");e.text=lt(e.x,t,i,n)}(t,o,0,c,g),n||(t.tickprefix&&!d(t.showtickprefix)&&(o.text=t.tickprefix+o.text),t.ticksuffix&&!d(t.showticksuffix)&&(o.text+=t.ticksuffix)),"boundaries"===t.tickson||t.showdividers){var m=function(e){var r=t.l2p(e);return r>=0&&r<=t._length?e:null};o.xbnd=[m(o.x-.5),m(o.x+t.dtick-.5)]}return o},B.hoverLabelText=function(t,e,r){if(r!==P&&r!==e)return B.hoverLabelText(t,e)+" - "+B.hoverLabelText(t,r);var n="log"===t.type&&e<=0,i=B.tickText(t,t.c2l(n?-e:e),"hover").text;return n?0===e?"0":I+i:i};var at=["f","p","n","\u03bc","m","","k","M","G","T"];function ot(t){return"SI"===t||"B"===t}function st(t){return t>14||t<-15}function lt(t,e,r,n){var a=t<0,o=e._tickround,l=r||e.exponentformat||"B",c=e._tickexponent,u=B.getTickFormat(e),f=e.separatethousands;if(n){var h={exponentformat:l,minexponent:e.minexponent,dtick:"none"===e.showexponent?e.dtick:i(t)&&Math.abs(t)||1,range:"none"===e.showexponent?e.range.map(e.r2d):[0,t||1]};nt(h),o=(Number(h._tickround)||0)+4,c=h._tickexponent,e.hoverformat&&(u=e.hoverformat)}if(u)return e._numFormat(u)(t).replace(/-/g,I);var p,d=Math.pow(10,-o)/2;if("none"===l&&(c=0),(t=Math.abs(t))"+p+"":"B"===l&&9===c?t+="B":ot(l)&&(t+=at[c/3+5]));return a?I+t:t}function ct(t,e){for(var r=[],n={},i=0;i1&&r=i.min&&t=0,a=u(t,e[1])<=0;return(r||i)&&(n||a)}if(t.tickformatstops&&t.tickformatstops.length>0)switch(t.type){case"date":case"linear":for(e=0;e=o(i)))){r=n;break}break;case"log":for(e=0;e0?r.bottom-f:0,h)))),e.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1];if("x"===d){if("b"===l?n[l]=e._depth:(n[l]=e._depth=Math.max(r.width>0?f-r.top:0,h),p.reverse()),r.width>0){var m=r.right-(e._offset+e._length);m>0&&(n.xr=1,n.r=m);var v=e._offset-r.left;v>0&&(n.xl=0,n.l=v)}}else if("l"===l?n[l]=e._depth=Math.max(r.height>0?f-r.left:0,h):(n[l]=e._depth=Math.max(r.height>0?r.right-f:0,h),p.reverse()),r.height>0){var y=r.bottom-(e._offset+e._length);y>0&&(n.yb=0,n.b=y);var x=e._offset-r.top;x>0&&(n.yt=1,n.t=x)}n[g]="free"===e.anchor?e.position:e._anchorAxis.domain[p[0]],e.title.text!==c._dfltTitle[d]&&(n[l]+=ht(e)+(e.title.standoff||0)),e.mirror&&"free"!==e.anchor&&((i={x:0,y:0,r:0,l:0,t:0,b:0})[u]=e.linewidth,e.mirror&&!0!==e.mirror&&(i[u]+=h),!0===e.mirror||"ticks"===e.mirror?i[g]=e._anchorAxis.domain[p[1]]:"all"!==e.mirror&&"allticks"!==e.mirror||(i[g]=[e._counterDomainMin,e._counterDomainMax][p[1]]))}K&&(s=o.getComponentMethod("rangeslider","autoMarginOpts")(t,e)),a.autoMargin(t,gt(e),n),a.autoMargin(t,mt(e),i),a.autoMargin(t,vt(e),s)})),r.skipTitle||K&&"bottom"===e.side||Z.push((function(){return function(t,e){var r,n=t._fullLayout,i=e._id,a=i.charAt(0),o=e.title.font.size;if(e.title.hasOwnProperty("standoff"))r=e._depth+e.title.standoff+ht(e);else{var s=-1!==(e.ticklabelposition||"").indexOf("inside");if("multicategory"===e.type)r=e._depth;else{var l=1.5*o;s&&(l=.5*o,"outside"===e.ticks&&(l+=e.ticklen)),r=10+l+(e.linewidth?e.linewidth-1:0)}s||(r+="x"===a?"top"===e.side?o*(e.showticklabels?1:0):o*(e.showticklabels?1.5:.5):"right"===e.side?o*(e.showticklabels?1:.5):o*(e.showticklabels?.5:0))}var c,f,p,d,g=B.getPxPosition(t,e);"x"===a?(f=e._offset+e._length/2,p="top"===e.side?g-r:g+r):(p=e._offset+e._length/2,f="right"===e.side?g+r:g-r,c={rotate:"-90",offset:0});if("multicategory"!==e.type){var m=e._selections[e._id+"tick"];if(d={selection:m,side:e.side},m&&m.node()&&m.node().parentNode){var v=h.getTranslate(m.node().parentNode);d.offsetLeft=v.x,d.offsetTop=v.y}e.title.hasOwnProperty("standoff")&&(d.pad=0)}return u.draw(t,i+"title",{propContainer:e,propName:e._name+".title.text",placeholder:n._dfltTitle[a],avoid:d,transform:c,attributes:{x:f,y:p,"text-anchor":"middle"}})}(t,e)})),s.syncOrAsync(Z)}}function Q(t){var r=p+(t||"tick");return w[r]||(w[r]=function(t,e){var r,n,i,a;t._selections[e].size()?(r=1/0,n=-1/0,i=1/0,a=-1/0,t._selections[e].each((function(){var t=dt(this),e=h.bBox(t.node().parentNode);r=Math.min(r,e.top),n=Math.max(n,e.bottom),i=Math.min(i,e.left),a=Math.max(a,e.right)}))):(r=0,n=0,i=0,a=0);return{top:r,bottom:n,left:i,right:a,height:n-r,width:a-i}}(e,r)),w[r]}},B.getTickSigns=function(t){var e=t._id.charAt(0),r={x:"top",y:"right"}[e],n=t.side===r?1:-1,i=[-1,1,n,-n];return"inside"!==t.ticks==("x"===e)&&(i=i.map((function(t){return-t}))),t.side&&i.push({l:-1,t:-1,r:1,b:1}[t.side.charAt(0)]),i},B.makeTransTickFn=function(t){return"x"===t._id.charAt(0)?function(e){return l(t._offset+t.l2p(e.x),0)}:function(e){return l(0,t._offset+t.l2p(e.x))}},B.makeTransTickLabelFn=function(t){var e=function(t){var e=t.ticklabelposition||"",r=function(t){return-1!==e.indexOf(t)},n=r("top"),i=r("left"),a=r("right"),o=r("bottom"),s=r("inside"),l=o||i||n||a;if(!l&&!s)return[0,0];var c=t.side,u=l?(t.tickwidth||0)/2:0,f=3,h=t.tickfont?t.tickfont.size:12;(o||n)&&(u+=h*D,f+=(t.linewidth||0)/2);(i||a)&&(u+=(t.linewidth||0)/2,f+=3);s&&"top"===c&&(f-=h*(1-D));(i||n)&&(u=-u);"bottom"!==c&&"right"!==c||(f=-f);return[l?u:0,s?f:0]}(t),r=e[0],n=e[1];return"x"===t._id.charAt(0)?function(e){return l(r+t._offset+t.l2p(ut(e)),n)}:function(e){return l(n,r+t._offset+t.l2p(ut(e)))}},B.makeTickPath=function(t,e,r,n){n=void 0!==n?n:t.ticklen;var i=t._id.charAt(0),a=(t.linewidth||1)/2;return"x"===i?"M0,"+(e+a*r)+"v"+n*r:"M"+(e+a*r)+",0h"+n*r},B.makeLabelFns=function(t,e,r){var n=t.ticklabelposition||"",a=function(t){return-1!==n.indexOf(t)},o=a("top"),l=a("left"),c=a("right"),u=a("bottom")||l||o||c,f=a("inside"),h="inside"===n&&"inside"===t.ticks||!f&&"outside"===t.ticks&&"boundaries"!==t.tickson,p=0,d=0,g=h?t.ticklen:0;if(f?g*=-1:u&&(g=0),h&&(p+=g,r)){var m=s.deg2rad(r);p=g*Math.cos(m)+1,d=g*Math.sin(m)}t.showticklabels&&(h||t.showline)&&(p+=.2*t.tickfont.size);var v,y,x,b,_,w={labelStandoff:p+=(t.linewidth||1)/2*(f?-1:1),labelShift:d},T=0,k=t.side,M=t._id.charAt(0),A=t.tickangle;if("x"===M)b=(_=!f&&"bottom"===k||f&&"top"===k)?1:-1,f&&(b*=-1),v=d*b,y=e+p*b,x=_?1:-.2,90===Math.abs(A)&&(f?x+=O:x=-90===A&&"bottom"===k?D:90===A&&"top"===k?O:.5,T=O/2*(A/90)),w.xFn=function(t){return t.dx+v+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*x},w.anchorFn=function(t,e){if(u){if(l)return"end";if(c)return"start"}return i(e)&&0!==e&&180!==e?e*b<0!==f?"end":"start":"middle"},w.heightFn=function(e,r,n){return r<-60||r>60?-.5*n:"top"===t.side!==f?-n:0};else if("y"===M){if(b=(_=!f&&"left"===k||f&&"right"===k)?1:-1,f&&(b*=-1),v=p,y=d*b,x=0,f||90!==Math.abs(A)||(x=-90===A&&"left"===k||90===A&&"right"===k?D:.5),f){var S=i(A)?+A:0;if(0!==S){var E=s.deg2rad(S);T=Math.abs(Math.sin(E))*D*b,x=0}}w.xFn=function(t){return t.dx+e-(v+t.fontSize*x)*b+T*t.fontSize},w.yFn=function(t){return t.dy+y+t.fontSize*O},w.anchorFn=function(t,e){return i(e)&&90===Math.abs(e)?"middle":_?"end":"start"},w.heightFn=function(e,r,n){return"right"===t.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return w},B.drawTicks=function(t,e,r){r=r||{};var n=e._id+"tick",i=r.vals;"period"===e.ticklabelmode&&(i=i.slice()).shift();var a=r.layer.selectAll("path."+n).data(e.ticks?i:[],ft);a.exit().remove(),a.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==r.crisp).call(f.stroke,e.tickcolor).style("stroke-width",h.crispRound(t,e.tickwidth,1)+"px").attr("d",r.path),a.attr("transform",r.transFn)},B.drawGrid=function(t,e,r){r=r||{};var n=e._id+"grid",i=r.vals,a=r.counterAxis;if(!1===e.showgrid)i=[];else if(a&&B.shouldShowZeroLine(t,e,a))for(var o="array"===e.tickmode,s=0;so||i.lefto||i.top+(e.tickangle?0:t.fontSize/4)1)for(n=1;n2*o}(i,e))return"date";var m="strict"!==r.autotypenumbers;return function(t,e){for(var r=t.length,n=f(r),i=0,o=0,s={},u=0;u2*i}(i,m)?"category":function(t,e){for(var r=t.length,n=0;n=2){var l,c,u="";if(2===o.length)for(l=0;l<2;l++)if(c=y(o[l])){u=d;break}var f=i("pattern",u);if(f===d)for(l=0;l<2;l++)(c=y(o[l]))&&(e.bounds[l]=o[l]=c-1);if(f)for(l=0;l<2;l++)switch(c=o[l],f){case d:if(!n(c))return void(e.enabled=!1);if((c=+c)!==Math.floor(c)||c<0||c>=7)return void(e.enabled=!1);e.bounds[l]=o[l]=c;break;case g:if(!n(c))return void(e.enabled=!1);if((c=+c)<0||c>24)return void(e.enabled=!1);e.bounds[l]=o[l]=c}if(!1===r.autorange){var h=r.range;if(h[0]h[1])return void(e.enabled=!1)}else if(o[0]>h[0]&&o[1]n?1:-1:+(t.substr(1)||1)-+(e.substr(1)||1)},r.ref2id=function(t){return!!/^[xyz]/.test(t)&&t.split(" ")[0]},r.isLinked=function(t,e){return a(e,t._axisMatchGroups)||a(e,t._axisConstraintGroups)}},{"../../registry":911,"./constants":834}],832:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){if("category"===e.type){var i,a=t.categoryarray,o=Array.isArray(a)&&a.length>0;o&&(i="array");var s,l=r("categoryorder",i);"array"===l&&(s=r("categoryarray")),o||"array"!==l||(l=e.categoryorder="trace"),"trace"===l?e._initialCategories=[]:"array"===l?e._initialCategories=s.slice():(s=function(t,e){var r,n,i,a=e.dataAttr||t._id.charAt(0),o={};if(e.axData)r=e.axData;else for(r=[],n=0;nn?i.substr(n):a.substr(r))+o:i+a+t*e:o}function m(t,e){for(var r=e._size,n=r.h/r.w,i={},a=Object.keys(t),o=0;oc*x)||T)for(r=0;rz&&FI&&(I=F);h/=(I-L)/(2*P),L=l.l2r(L),I=l.l2r(I),l.range=l._input.range=S=0?Math.min(t,.9):1/(1/Math.max(t,-.3)+3.222))}function B(t,e,r,n,i){return t.append("path").attr("class","zoombox").style({fill:e>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",l(r,n)).attr("d",i+"Z")}function N(t,e,r){return t.append("path").attr("class","zoombox-corners").style({fill:u.background,stroke:u.defaultLine,"stroke-width":1,opacity:0}).attr("transform",l(e,r)).attr("d","M0,0Z")}function j(t,e,r,n,i,a){t.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),U(t,e,i,a)}function U(t,e,r,n){r||(t.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),e.transition().style("opacity",1).duration(200))}function V(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function q(t){I&&t.data&&t._context.showTips&&(s.notifier(s._(t,"Double-click to zoom back out"),"long"),I=!1)}function H(t){var e=Math.floor(Math.min(t.b-t.t,t.r-t.l,L)/2);return"M"+(t.l-3.5)+","+(t.t-.5+e)+"h3v"+-e+"h"+e+"v-3h-"+(e+3)+"ZM"+(t.r+3.5)+","+(t.t-.5+e)+"h-3v"+-e+"h"+-e+"v-3h"+(e+3)+"ZM"+(t.r+3.5)+","+(t.b+.5-e)+"h-3v"+e+"h"+-e+"v3h"+(e+3)+"ZM"+(t.l-3.5)+","+(t.b+.5-e)+"h3v"+e+"h"+e+"v3h-"+(e+3)+"Z"}function G(t,e,r,n,i){for(var a,o,l,c,u=!1,f={},h={},p=(i||{}).xaHash,d=(i||{}).yaHash,g=0;g=0)i._fullLayout._deactivateShape(i);else{var a=i._fullLayout.clickmode;if(V(i),2!==t||mt||qt(),gt)a.indexOf("select")>-1&&A(r,i,Z,J,e.id,Lt),a.indexOf("event")>-1&&h.click(i,r,e.id);else if(1===t&&mt){var s=d?P:I,l="s"===d||"w"===m?0:1,u=s._name+".range["+l+"]",f=function(t,e){var r,i=t.range[e],a=Math.abs(i-t.range[1-e]);return"date"===t.type?i:"log"===t.type?(r=Math.ceil(Math.max(0,-Math.log(a)/Math.LN10))+3,n.format("."+r+"g")(Math.pow(10,i))):(r=Math.floor(Math.log(Math.abs(i))/Math.LN10)-Math.floor(Math.log(a)/Math.LN10)+4,n.format("."+String(r)+"g")(i))}(s,l),p="left",g="middle";if(s.fixedrange)return;d?(g="n"===d?"top":"bottom","right"===s.side&&(p="right")):"e"===m&&(p="right"),i._context.showAxisRangeEntryBoxes&&n.select(xt).call(c.makeEditable,{gd:i,immediate:!0,background:i._fullLayout.paper_bgcolor,text:String(f),fill:s.tickfont?s.tickfont.color:"#444",horizontalAlign:p,verticalAlign:g}).on("edit",(function(t){var e=s.d2r(t);void 0!==e&&o.call("_guiRelayout",i,u,e)}))}}}function zt(e,r){if(t._transitioningWithDuration)return!1;var n=Math.max(0,Math.min($,ht*e+bt)),i=Math.max(0,Math.min(tt,pt*r+_t)),a=Math.abs(n-bt),o=Math.abs(i-_t);function s(){At="",wt.r=wt.l,wt.t=wt.b,Et.attr("d","M0,0Z")}if(wt.l=Math.min(bt,n),wt.r=Math.max(bt,n),wt.t=Math.min(_t,i),wt.b=Math.max(_t,i),et.isSubplotConstrained)a>L||o>L?(At="xy",a/$>o/tt?(o=a*tt/$,_t>i?wt.t=_t-o:wt.b=_t+o):(a=o*$/tt,bt>n?wt.l=bt-a:wt.r=bt+a),Et.attr("d",H(wt))):s();else if(rt.isSubplotConstrained)if(a>L||o>L){At="xy";var l=Math.min(wt.l/$,(tt-wt.b)/tt),c=Math.max(wt.r/$,(tt-wt.t)/tt);wt.l=l*$,wt.r=c*$,wt.b=(1-l)*tt,wt.t=(1-c)*tt,Et.attr("d",H(wt))}else s();else!it||o0){var u;if(rt.isSubplotConstrained||!nt&&1===it.length){for(u=0;ug[1]-1/4096&&(e.domain=s),i.noneOrAll(t.domain,e.domain,s)}return r("layer"),e}},{"../../lib":778,"fast-isnumeric":241}],846:[function(t,e,r){"use strict";var n=t("../../constants/alignment").FROM_BL;e.exports=function(t,e,r){void 0===r&&(r=n[t.constraintoward||"center"]);var i=[t.r2l(t.range[0]),t.r2l(t.range[1])],a=i[0]+(i[1]-i[0])*r;t.range=t._input.range=[t.l2r(a+(i[0]-a)*e),t.l2r(a+(i[1]-a)*e)],t.setScale()}},{"../../constants/alignment":745}],847:[function(t,e,r){"use strict";var n=t("polybooljs"),i=t("../../registry"),a=t("../../components/drawing").dashStyle,o=t("../../components/color"),s=t("../../components/fx"),l=t("../../components/fx/helpers").makeEventData,c=t("../../components/dragelement/helpers"),u=c.freeMode,f=c.rectMode,h=c.drawMode,p=c.openMode,d=c.selectMode,g=t("../../components/shapes/draw_newshape/display_outlines"),m=t("../../components/shapes/draw_newshape/helpers").handleEllipse,v=t("../../components/shapes/draw_newshape/newshapes"),y=t("../../lib"),x=t("../../lib/polygon"),b=t("../../lib/throttle"),_=t("./axis_ids").getFromId,w=t("../../lib/clear_gl_canvases"),T=t("../../plot_api/subroutines").redrawReglTraces,k=t("./constants"),M=k.MINSELECT,A=x.filter,S=x.tester,E=t("./handle_outline").clearSelect,C=t("./helpers"),L=C.p2r,I=C.axValue,P=C.getTransform;function z(t,e,r,n,i,a,o){var s,l,c,u,f,h,d,m,v,y=e._hoverdata,x=e._fullLayout.clickmode.indexOf("event")>-1,b=[];if(function(t){return t&&Array.isArray(t)&&!0!==t[0].hoverOnBox}(y)){F(t,e,a);var _=function(t,e){var r,n,i=t[0],a=-1,o=[];for(n=0;n0?function(t,e){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===e.searchInfo&&(n=e.searchInfo.cd[0].trace).selectedpoints.length===e.pointNumbers.length){for(i=0;i1)return!1;if((i+=r.selectedpoints.length)>1)return!1}return 1===i}(s)&&(h=j(_))){for(o&&o.remove(),v=0;v=0&&n._fullLayout._deactivateShape(n),h(e)){var a=n._fullLayout._zoomlayer.selectAll(".select-outline-"+r.id);if(a&&n._fullLayout._drawing){var o=v(a,t);o&&i.call("_guiRelayout",n,{shapes:o}),n._fullLayout._drawing=!1}}r.selection={},r.selection.selectionDefs=t.selectionDefs=[],r.selection.mergedPolygons=t.mergedPolygons=[]}function N(t,e,r,n){var i,a,o,s=[],l=e.map((function(t){return t._id})),c=r.map((function(t){return t._id}));for(o=0;o0?n[0]:r;return!!e.selectedpoints&&e.selectedpoints.indexOf(i)>-1}function U(t,e,r){var n,a,o,s;for(n=0;n=0)C._fullLayout._deactivateShape(C);else if(!_){var r=O.clickmode;b.done(gt).then((function(){if(b.clear(gt),2===t){for(ft.remove(),$=0;$-1&&z(e,C,i.xaxes,i.yaxes,i.subplot,i,ft),"event"===r&&C.emit("plotly_selected",void 0);s.click(C,e)})).catch(y.error)}},i.doneFn=function(){dt.remove(),b.done(gt).then((function(){b.clear(gt),i.gd.emit("plotly_selected",et),Q&&i.selectionDefs&&(Q.subtract=ut,i.selectionDefs.push(Q),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,K)),i.doneFnCompleted&&i.doneFnCompleted(mt)})).catch(y.error),_&&B(i)}},clearSelect:E,clearSelectionsCache:B,selectOnClick:z}},{"../../components/color":643,"../../components/dragelement/helpers":661,"../../components/drawing":665,"../../components/fx":683,"../../components/fx/helpers":679,"../../components/shapes/draw_newshape/display_outlines":728,"../../components/shapes/draw_newshape/helpers":729,"../../components/shapes/draw_newshape/newshapes":730,"../../lib":778,"../../lib/clear_gl_canvases":762,"../../lib/polygon":790,"../../lib/throttle":804,"../../plot_api/subroutines":818,"../../registry":911,"./axis_ids":831,"./constants":834,"./handle_outline":838,"./helpers":839,polybooljs:517}],848:[function(t,e,r){"use strict";var n=t("d3"),i=t("d3-time-format").utcFormat,a=t("fast-isnumeric"),o=t("../../lib"),s=o.cleanNumber,l=o.ms2DateTime,c=o.dateTime2ms,u=o.ensureNumber,f=o.isArrayOrTypedArray,h=t("../../constants/numerical"),p=h.FP_SAFE,d=h.BADNUM,g=h.LOG_CLIP,m=h.ONEWEEK,v=h.ONEDAY,y=h.ONEHOUR,x=h.ONEMIN,b=h.ONESEC,_=t("./axis_ids"),w=t("./constants"),T=w.HOUR_PATTERN,k=w.WEEKDAY_PATTERN;function M(t){return Math.pow(10,t)}function A(t){return null!=t}e.exports=function(t,e){e=e||{};var r=t._id||"x",h=r.charAt(0);function S(e,r){if(e>0)return Math.log(e)/Math.LN10;if(e<=0&&r&&t.range&&2===t.range.length){var n=t.range[0],i=t.range[1];return.5*(n+i-2*g*Math.abs(n-i))}return d}function E(e,r,n,i){if((i||{}).msUTC&&a(e))return+e;var s=c(e,n||t.calendar);if(s===d){if(!a(e))return d;e=+e;var l=Math.floor(10*o.mod(e+.05,1)),u=Math.round(e-l/10);s=c(new Date(u))+l/10}return s}function C(e,r,n){return l(e,r,n||t.calendar)}function L(e){return t._categories[Math.round(e)]}function I(e){if(A(e)){if(void 0===t._categoriesMap&&(t._categoriesMap={}),void 0!==t._categoriesMap[e])return t._categoriesMap[e];t._categories.push("number"==typeof e?String(e):e);var r=t._categories.length-1;return t._categoriesMap[e]=r,r}return d}function P(e){if(t._categoriesMap)return t._categoriesMap[e]}function z(t){var e=P(t);return void 0!==e?e:a(t)?+t:void 0}function O(t){return a(t)?+t:P(t)}function D(t,e,r){return n.round(r+e*t,2)}function R(t,e,r){return(t-r)/e}var F=function(e){return a(e)?D(e,t._m,t._b):d},B=function(e){return R(e,t._m,t._b)};if(t.rangebreaks){var N="y"===h;F=function(e){if(!a(e))return d;var r=t._rangebreaks.length;if(!r)return D(e,t._m,t._b);var n=N;t.range[0]>t.range[1]&&(n=!n);for(var i=n?-1:1,o=i*e,s=0,l=0;lu)){s=o<(c+u)/2?l:l+1;break}s=l+1}var f=t._B[s]||0;return isFinite(f)?D(e,t._m2,f):0},B=function(e){var r=t._rangebreaks.length;if(!r)return R(e,t._m,t._b);for(var n=0,i=0;it._rangebreaks[i].pmax&&(n=i+1);return R(e,t._m2,t._B[n])}}t.c2l="log"===t.type?S:u,t.l2c="log"===t.type?M:u,t.l2p=F,t.p2l=B,t.c2p="log"===t.type?function(t,e){return F(S(t,e))}:F,t.p2c="log"===t.type?function(t){return M(B(t))}:B,-1!==["linear","-"].indexOf(t.type)?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=s,t.c2d=t.c2r=t.l2d=t.l2r=u,t.d2p=t.r2p=function(e){return t.l2p(s(e))},t.p2d=t.p2r=B,t.cleanPos=u):"log"===t.type?(t.d2r=t.d2l=function(t,e){return S(s(t),e)},t.r2d=t.r2c=function(t){return M(s(t))},t.d2c=t.r2l=s,t.c2d=t.l2r=u,t.c2r=S,t.l2d=M,t.d2p=function(e,r){return t.l2p(t.d2r(e,r))},t.p2d=function(t){return M(B(t))},t.r2p=function(e){return t.l2p(s(e))},t.p2r=B,t.cleanPos=u):"date"===t.type?(t.d2r=t.r2d=o.identity,t.d2c=t.r2c=t.d2l=t.r2l=E,t.c2d=t.c2r=t.l2d=t.l2r=C,t.d2p=t.r2p=function(e,r,n){return t.l2p(E(e,0,n))},t.p2d=t.p2r=function(t,e,r){return C(B(t),e,r)},t.cleanPos=function(e){return o.cleanDate(e,d,t.calendar)}):"category"===t.type?(t.d2c=t.d2l=I,t.r2d=t.c2d=t.l2d=L,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=O(e);return void 0!==r?r:t.fraction2r(.5)},t.l2r=t.c2r=u,t.r2l=O,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return L(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return"string"==typeof t&&""!==t?t:u(t)}):"multicategory"===t.type&&(t.r2d=t.c2d=t.l2d=L,t.d2r=t.d2l_noadd=z,t.r2c=function(e){var r=z(e);return void 0!==r?r:t.fraction2r(.5)},t.r2c_just_indices=P,t.l2r=t.c2r=u,t.r2l=z,t.d2p=function(e){return t.l2p(t.r2c(e))},t.p2d=function(t){return L(B(t))},t.r2p=t.d2p,t.p2r=B,t.cleanPos=function(t){return Array.isArray(t)||"string"==typeof t&&""!==t?t:u(t)},t.setupMultiCategory=function(n){var i,a,s=t._traceIndices,l=t._matchGroup;if(l&&0===t._categories.length)for(var c in l)if(c!==r){var u=e[_.id2name(c)];s=s.concat(u._traceIndices)}var p=[[0,{}],[0,{}]],d=[];for(i=0;ip&&(s[n]=p),s[0]===s[1]){var c=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=c,s[1]+=c}}else o.nestedProperty(t,e).set(i)},t.setScale=function(r){var n=e._size;if(t.overlaying){var i=_.getFromId({_fullLayout:e},t.overlaying);t.domain=i.domain}var a=r&&t._r?"_r":"range",o=t.calendar;t.cleanRange(a);var s,l,c=t.r2l(t[a][0],o),u=t.r2l(t[a][1],o),f="y"===h;if((f?(t._offset=n.t+(1-t.domain[1])*n.h,t._length=n.h*(t.domain[1]-t.domain[0]),t._m=t._length/(c-u),t._b=-t._m*u):(t._offset=n.l+t.domain[0]*n.w,t._length=n.w*(t.domain[1]-t.domain[0]),t._m=t._length/(u-c),t._b=-t._m*c),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks)&&(t._rangebreaks=t.locateBreaks(Math.min(c,u),Math.max(c,u)),t._rangebreaks.length)){for(s=0;su&&(p=!p),p&&t._rangebreaks.reverse();var d=p?-1:1;for(t._m2=d*t._length/(Math.abs(u-c)-t._lBreaks),t._B.push(-t._m2*(f?u:c)),s=0;si&&(i+=7,ai&&(i+=24,a=n&&a=n&&e=s.min&&(ts.max&&(s.max=n),i=!1)}i&&c.push({min:t,max:n})}};for(n=0;nr.duration?(!function(){for(var r={},n=0;n rect").call(o.setTranslate,0,0).call(o.setScale,1,1),t.plot.call(o.setTranslate,e._offset,r._offset).call(o.setScale,1,1);var n=t.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(o.setPointGroupScale,1,1),n.selectAll(".textpoint").call(o.setTextPointsScale,1,1),n.call(o.hideOutsideRangePoints,t)}function m(e,r){var n=e.plotinfo,i=n.xaxis,l=n.yaxis,c=i._length,u=l._length,f=!!e.xr1,h=!!e.yr1,p=[];if(f){var d=a.simpleMap(e.xr0,i.r2l),g=a.simpleMap(e.xr1,i.r2l),m=d[1]-d[0],v=g[1]-g[0];p[0]=(d[0]*(1-r)+r*g[0]-d[0])/(d[1]-d[0])*c,p[2]=c*(1-r+r*v/m),i.range[0]=i.l2r(d[0]*(1-r)+r*g[0]),i.range[1]=i.l2r(d[1]*(1-r)+r*g[1])}else p[0]=0,p[2]=c;if(h){var y=a.simpleMap(e.yr0,l.r2l),x=a.simpleMap(e.yr1,l.r2l),b=y[1]-y[0],_=x[1]-x[0];p[1]=(y[1]*(1-r)+r*x[1]-y[1])/(y[0]-y[1])*u,p[3]=u*(1-r+r*_/b),l.range[0]=i.l2r(y[0]*(1-r)+r*x[0]),l.range[1]=l.l2r(y[1]*(1-r)+r*x[1])}else p[1]=0,p[3]=u;s.drawOne(t,i,{skipTitle:!0}),s.drawOne(t,l,{skipTitle:!0}),s.redrawComponents(t,[i._id,l._id]);var w=f?c/p[2]:1,T=h?u/p[3]:1,k=f?p[0]:0,M=h?p[1]:0,A=f?p[0]/p[2]*c:0,S=h?p[1]/p[3]*u:0,E=i._offset-A,C=l._offset-S;n.clipRect.call(o.setTranslate,k,M).call(o.setScale,1/w,1/T),n.plot.call(o.setTranslate,E,C).call(o.setScale,w,T),o.setPointGroupScale(n.zoomScalePts,1/w,1/T),o.setTextPointsScale(n.zoomScaleTxt,1/w,1/T)}s.redrawComponents(t)}},{"../../components/drawing":665,"../../lib":778,"../../registry":911,"./axes":828,d3:169}],853:[function(t,e,r){"use strict";var n=t("../../registry").traceIs,i=t("./axis_autotype");function a(t){return{v:"x",h:"y"}[t.orientation||"v"]}function o(t,e){var r=a(t),i=n(t,"box-violin"),o=n(t._fullInput||{},"candlestick");return i&&!o&&e===r&&void 0===t[r]&&void 0===t[r+"0"]}e.exports=function(t,e,r,s){r("autotypenumbers",s.autotypenumbersDflt),"-"===r("type",(s.splomStash||{}).type)&&(!function(t,e){if("-"!==t.type)return;var r,s=t._id,l=s.charAt(0);-1!==s.indexOf("scene")&&(s=l);var c=function(t,e,r){for(var n=0;n0&&(i["_"+r+"axes"]||{})[e])return i;if((i[r+"axis"]||r)===e){if(o(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}(e,s,l);if(!c)return;if("histogram"===c.type&&l==={v:"y",h:"x"}[c.orientation||"v"])return void(t.type="linear");var u=l+"calendar",f=c[u],h={noMultiCategory:!n(c,"cartesian")||n(c,"noMultiCategory")};"box"===c.type&&c._hasPreCompStats&&l==={h:"x",v:"y"}[c.orientation||"v"]&&(h.noMultiCategory=!0);if(h.autotypenumbers=t.autotypenumbers,o(c,l)){var p=a(c),d=[];for(r=0;r0?".":"")+a;i.isPlainObject(o)?l(o,e,s,n+1):e(s,a,o)}}))}r.manageCommandObserver=function(t,e,n,o){var s={},l=!0;e&&e._commandObserver&&(s=e._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=r.hasSimpleAPICommandBindings(t,n,s.lookupTable);if(e&&e._commandObserver){if(c)return s;if(e._commandObserver.remove)return e._commandObserver.remove(),e._commandObserver=null,s}if(c){a(t,c,s.cache),s.check=function(){if(l){var e=a(t,c,s.cache);return e.changed&&o&&void 0!==s.lookupTable[e.value]&&(s.disable(),Promise.resolve(o({value:e.value,type:c.type,prop:c.prop,traces:c.traces,index:s.lookupTable[e.value]})).then(s.enable,s.enable)),e.changed}};for(var u=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],f=0;f0&&i<0&&(i+=360);var s=(i-n)/4;return{type:"Polygon",coordinates:[[[n,a],[n,o],[n+s,o],[n+2*s,o],[n+3*s,o],[i,o],[i,a],[i-s,a],[i-2*s,a],[i-3*s,a],[n,a]]]}}e.exports=function(t){return new w(t)},T.plot=function(t,e,r){var n=this,i=e[this.id],a=[],o=!1;for(var s in y.layerNameToAdjective)if("frame"!==s&&i["show"+s]){o=!0;break}for(var l=0;l0&&a._module.calcGeoJSON(i,e)}if(!this.updateProjection(t,e)){this.viewInitial&&this.scope===r.scope||this.saveViewInitial(r),this.scope=r.scope,this.updateBaseLayers(e,r),this.updateDims(e,r),this.updateFx(e,r),u.generalUpdatePerTraceModule(this.graphDiv,this,t,r);var o=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=o.selectAll(".point"),this.dataPoints.text=o.selectAll("text"),this.dataPaths.line=o.selectAll(".js-line");var s=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=s.selectAll("path"),this.render()}},T.updateProjection=function(t,e){var r=this.graphDiv,o=e[this.id],s=e._size,l=o.domain,c=o.projection,u=o.lonaxis,f=o.lataxis,p=u._ax,d=f._ax,g=this.projection=function(t){for(var e=t.projection.type,r=n.geo[y.projNames[e]](),i=t._isClipped?y.lonaxisSpan[e]/2:null,a=["center","rotate","parallels","clipExtent"],o=function(t){return t?r:[]},s=0;si*Math.PI/180}return!1},r.getPath=function(){return n.geo.path().projection(r)},r.getBounds=function(t){return r.getPath().bounds(t)},r.fitExtent=function(t,e){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=r.clipExtent&&r.clipExtent();r.scale(150).translate([0,0]),a&&r.clipExtent(null);var o=r.getBounds(e),s=Math.min(n/(o[1][0]-o[0][0]),i/(o[1][1]-o[0][1])),l=+t[0][0]+(n-s*(o[1][0]+o[0][0]))/2,c=+t[0][1]+(i-s*(o[1][1]+o[0][1]))/2;return a&&r.clipExtent(a),r.scale(150*s).translate([l,c])},r.precision(y.precision),i&&r.clipAngle(i-y.clipPad);return r}(o),m=[[s.l+s.w*l.x[0],s.t+s.h*(1-l.y[1])],[s.l+s.w*l.x[1],s.t+s.h*(1-l.y[0])]],v=o.center||{},x=c.rotation||{},b=u.range||[],_=f.range||[];if(o.fitbounds){p._length=m[1][0]-m[0][0],d._length=m[1][1]-m[0][1],p.range=h(r,p),d.range=h(r,d);var w=(p.range[0]+p.range[1])/2,T=(d.range[0]+d.range[1])/2;if(o._isScoped)v={lon:w,lat:T};else if(o._isClipped){v={lon:w,lat:T},x={lon:w,lat:T,roll:x.roll};var M=c.type,A=y.lonaxisSpan[M]/2||180,S=y.lataxisSpan[M]/2||90;b=[w-A,w+A],_=[T-S,T+S]}else v={lon:w,lat:T},x={lon:w,lat:x.lat,roll:x.roll}}g.center([v.lon-x.lon,v.lat-x.lat]).rotate([-x.lon,-x.lat,x.roll]).parallels(c.parallels);var E=k(b,_);g.fitExtent(m,E);var C=this.bounds=g.getBounds(E),L=this.fitScale=g.scale(),I=g.translate();if(!isFinite(C[0][0])||!isFinite(C[0][1])||!isFinite(C[1][0])||!isFinite(C[1][1])||isNaN(I[0])||isNaN(I[0])){for(var P=["fitbounds","projection.rotation","center","lonaxis.range","lataxis.range"],z="Invalid geo settings, relayout'ing to default view.",O={},D=0;D-1&&m(n.event,a,[r.xaxis],[r.yaxis],r.id,f),l.indexOf("event")>-1&&c.click(a,n.event))}))}function h(t){return r.projection.invert([t[0]+r.xaxis._offset,t[1]+r.yaxis._offset])}},T.makeFramework=function(){var t=this,e=t.graphDiv,r=e._fullLayout,i="clip"+r._uid+t.id;t.clipDef=r._clips.append("clipPath").attr("id",i),t.clipRect=t.clipDef.append("rect"),t.framework=n.select(t.container).append("g").attr("class","geo "+t.id).call(l.setClipUrl,i,e),t.project=function(e){var r=t.projection(e);return r?[r[0]-t.xaxis._offset,r[1]-t.yaxis._offset]:[null,null]},t.xaxis={_id:"x",c2p:function(e){return t.project(e)[0]}},t.yaxis={_id:"y",c2p:function(e){return t.project(e)[1]}},t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(t.mockAxis,r)},T.saveViewInitial=function(t){var e,r=t.center||{},n=t.projection,i=n.rotation||{};this.viewInitial={fitbounds:t.fitbounds,"projection.scale":n.scale},e=t._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:t._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},a.extendFlat(this.viewInitial,e)},T.render=function(){var t,e=this.projection,r=e.getPath();function n(t){var r=e(t.lonlat);return r?o(r[0],r[1]):null}function i(t){return e.isLonLatOverEdges(t.lonlat)?"none":null}for(t in this.basePaths)this.basePaths[t].attr("d",r);for(t in this.dataPaths)this.dataPaths[t].attr("d",(function(t){return r(t.geojson)}));for(t in this.dataPoints)this.dataPoints[t].attr("display",i).attr("transform",n)}},{"../../components/color":643,"../../components/dragelement":662,"../../components/drawing":665,"../../components/fx":683,"../../lib":778,"../../lib/geo_location_utils":771,"../../lib/topojson_utils":806,"../../registry":911,"../cartesian/autorange":827,"../cartesian/axes":828,"../cartesian/select":847,"../plots":891,"./constants":858,"./projections":863,"./zoom":864,d3:169,"topojson-client":579}],860:[function(t,e,r){"use strict";var n=t("../../plots/get_data").getSubplotCalcData,i=t("../../lib").counterRegex,a=t("./geo"),o="geo",s=i(o),l={};l.geo={valType:"subplotid",dflt:o,editType:"calc"},e.exports={attr:o,name:o,idRoot:o,idRegex:s,attrRegex:s,attributes:l,layoutAttributes:t("./layout_attributes"),supplyLayoutDefaults:t("./layout_defaults"),plot:function(t){for(var e=t._fullLayout,r=t.calcdata,i=e._subplots.geo,s=0;s0&&L<0&&(L+=360);var I,P,z,O=(C+L)/2;if(!p){var D=d?f.projRotate:[O,0,0];I=r("projection.rotation.lon",D[0]),r("projection.rotation.lat",D[1]),r("projection.rotation.roll",D[2]),r("showcoastlines",!d&&y)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!y&&void 0)&&r("oceancolor")}(p?(P=-96.6,z=38.7):(P=d?O:I,z=(E[0]+E[1])/2),r("center.lon",P),r("center.lat",z),g)&&r("projection.parallels",f.projParallels||[0,60]);r("projection.scale"),r("showland",!!y&&void 0)&&r("landcolor"),r("showlakes",!!y&&void 0)&&r("lakecolor"),r("showrivers",!!y&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",d&&"usa"!==u&&y)&&(r("countrycolor"),r("countrywidth")),("usa"===u||"north america"===u&&50===c)&&(r("showsubunits",y),r("subunitcolor"),r("subunitwidth")),d||r("showframe",y)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete e.projection.scale,d?(delete e.center.lon,delete e.center.lat):m?(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon,delete e.projection.rotation.lat,delete e.lonaxis.range,delete e.lataxis.range):(delete e.center.lon,delete e.center.lat,delete e.projection.rotation.lon))}e.exports=function(t,e,r){i(t,e,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}},{"../../lib":778,"../get_data":865,"../subplot_defaults":905,"./constants":858,"./layout_attributes":861}],863:[function(t,e,r){"use strict";e.exports=function(t){function e(t,e){return{type:"Feature",id:t.id,properties:t.properties,geometry:r(t.geometry,e)}}function r(e,n){if(!e)return null;if("GeometryCollection"===e.type)return{type:"GeometryCollection",geometries:object.geometries.map((function(t){return r(t,n)}))};if(!c.hasOwnProperty(e.type))return null;var i=c[e.type];return t.geo.stream(e,n(i)),i.result()}t.geo.project=function(t,e){var i=e.stream;if(!i)throw new Error("not yet supported");return(t&&n.hasOwnProperty(t.type)?n[t.type]:r)(t,i)};var n={Feature:e,FeatureCollection:function(t,r){return{type:"FeatureCollection",features:t.features.map((function(t){return e(t,r)}))}}},i=[],a=[],o={point:function(t,e){i.push([t,e])},result:function(){var t=i.length?i.length<2?{type:"Point",coordinates:i[0]}:{type:"MultiPoint",coordinates:i}:null;return i=[],t}},s={lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){i.length&&(a.push(i),i=[])},result:function(){var t=a.length?a.length<2?{type:"LineString",coordinates:a[0]}:{type:"MultiLineString",coordinates:a}:null;return a=[],t}},l={polygonStart:u,lineStart:u,point:function(t,e){i.push([t,e])},lineEnd:function(){var t=i.length;if(t){do{i.push(i[0].slice())}while(++t<4);a.push(i),i=[]}},polygonEnd:u,result:function(){if(!a.length)return null;var t=[],e=[];return a.forEach((function(r){!function(t){if((e=t.length)<4)return!1;var e,r=0,n=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];for(;++rn^p>n&&r<(h-c)*(n-u)/(p-u)+c&&(i=!i)}return i}(t[0],r))return t.push(e),!0}))||t.push([e])})),a=[],t.length?t.length>1?{type:"MultiPolygon",coordinates:t}:{type:"Polygon",coordinates:t[0]}:null}},c={Point:o,MultiPoint:o,LineString:s,MultiLineString:s,Polygon:l,MultiPolygon:l,Sphere:l};function u(){}var f=1e-6,h=Math.PI,p=h/2,d=(Math.sqrt(h),h/180),g=180/h;function m(t){return t>1?p:t<-1?-p:Math.asin(t)}function v(t){return t>1?0:t<-1?h:Math.acos(t)}var y=t.geo.projection,x=t.geo.projectionMutator;function b(t,e){var r=(2+p)*Math.sin(e);e/=2;for(var n=0,i=1/0;n<10&&Math.abs(i)>f;n++){var a=Math.cos(e);e-=i=(e+Math.sin(e)*(a+2)-r)/(2*a*(1+a))}return[2/Math.sqrt(h*(4+h))*t*(1+Math.cos(e)),2*Math.sqrt(h/(4+h))*Math.sin(e)]}t.geo.interrupt=function(e){var r,n=[[[[-h,0],[0,p],[h,0]]],[[[-h,0],[0,-p],[h,0]]]];function i(t,r){for(var i=r<0?-1:1,a=n[+(r<0)],o=0,s=a.length-1;oa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],i*r>i*a[o][0][1]?a[o][0][1]:r)[0],l}function a(){r=n.map((function(t){return t.map((function(t){var r,n=e(t[0][0],t[0][1])[0],i=e(t[2][0],t[2][1])[0],a=e(t[1][0],t[0][1])[1],o=e(t[1][0],t[1][1])[1];return a>o&&(r=a,a=o,o=r),[[n,a],[i,o]]}))}))}e.invert&&(i.invert=function(t,a){for(var o=r[+(a<0)],s=n[+(a<0)],l=0,u=o.length;l=0;--i){var p;o=180*(p=n[1][i])[0][0]/h,s=180*p[0][1]/h,c=180*p[1][1]/h,u=180*p[2][0]/h,f=180*p[2][1]/h;r.push(l([[u-e,f-e],[u-e,c+e],[o+e,c+e],[o+e,s-e]],30))}return{type:"Polygon",coordinates:[t.merge(r)]}}(),a)},i},o.lobes=function(t){return arguments.length?(n=t.map((function(t){return t.map((function(t){return[[t[0][0]*h/180,t[0][1]*h/180],[t[1][0]*h/180,t[1][1]*h/180],[t[2][0]*h/180,t[2][1]*h/180]]}))})),a(),o):n.map((function(t){return t.map((function(t){return[[180*t[0][0]/h,180*t[0][1]/h],[180*t[1][0]/h,180*t[1][1]/h],[180*t[2][0]/h,180*t[2][1]/h]]}))}))},o},b.invert=function(t,e){var r=.5*e*Math.sqrt((4+h)/h),n=m(r),i=Math.cos(n);return[t/(2/Math.sqrt(h*(4+h))*(1+i)),m((n+r*(i+2))/(2+p))]},(t.geo.eckert4=function(){return y(b)}).raw=b;var _=t.geo.azimuthalEqualArea.raw;function w(t,e){if(arguments.length<2&&(e=t),1===e)return _;if(e===1/0)return T;function r(r,n){var i=_(r/e,n);return i[0]*=t,i}return r.invert=function(r,n){var i=_.invert(r/t,n);return i[0]*=e,i},r}function T(t,e){return[t*Math.cos(e)/Math.cos(e/=2),2*Math.sin(e)]}function k(t,e){return[3*t/(2*h)*Math.sqrt(h*h/3-e*e),e]}function M(t,e){return[t,1.25*Math.log(Math.tan(h/4+.4*e))]}function A(t){return function(e){var r,n=t*Math.sin(e),i=30;do{e-=r=(e+Math.sin(e)-n)/(1+Math.cos(e))}while(Math.abs(r)>f&&--i>0);return e/2}}T.invert=function(t,e){var r=2*m(e/2);return[t*Math.cos(r/2)/Math.cos(r),r]},(t.geo.hammer=function(){var t=2,e=x(w),r=e(t);return r.coefficient=function(r){return arguments.length?e(t=+r):t},r}).raw=w,k.invert=function(t,e){return[2/3*h*t/Math.sqrt(h*h/3-e*e),e]},(t.geo.kavrayskiy7=function(){return y(k)}).raw=k,M.invert=function(t,e){return[t,2.5*Math.atan(Math.exp(.8*e))-.625*h]},(t.geo.miller=function(){return y(M)}).raw=M,A(h);var S=function(t,e,r){var n=A(r);function i(r,i){return[t*r*Math.cos(i=n(i)),e*Math.sin(i)]}return i.invert=function(n,i){var a=m(i/e);return[n/(t*Math.cos(a)),m((2*a+Math.sin(2*a))/r)]},i}(Math.SQRT2/p,Math.SQRT2,h);function E(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(n*(.003971*r-.001529*n)-.013791)),e*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))]}(t.geo.mollweide=function(){return y(S)}).raw=S,E.invert=function(t,e){var r,n=e,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Math.abs(r)>f&&--i>0);return[t/(.8707+(a=n*n)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),n]},(t.geo.naturalEarth=function(){return y(E)}).raw=E;var C=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function L(t,e){var r,n=Math.min(18,36*Math.abs(e)/h),i=Math.floor(n),a=n-i,o=(r=C[i])[0],s=r[1],l=(r=C[++i])[0],c=r[1],u=(r=C[Math.min(19,++i)])[0],f=r[1];return[t*(l+a*(u-o)/2+a*a*(u-2*l+o)/2),(e>0?p:-p)*(c+a*(f-s)/2+a*a*(f-2*c+s)/2)]}function I(t,e){return[t*Math.cos(e),e]}function P(t,e){var r,n=Math.cos(e),i=(r=v(n*Math.cos(t/=2)))?r/Math.sin(r):1;return[2*n*Math.sin(t)*i,Math.sin(e)*i]}function z(t,e){var r=P(t,e);return[(r[0]+t/p)/2,(r[1]+e)/2]}C.forEach((function(t){t[1]*=1.0144})),L.invert=function(t,e){var r=e/p,n=90*r,i=Math.min(18,Math.abs(n/5)),a=Math.max(0,Math.floor(i));do{var o=C[a][1],s=C[a+1][1],l=C[Math.min(19,a+2)][1],c=l-o,u=l-2*s+o,f=2*(Math.abs(r)-s)/c,h=u/c,m=f*(1-h*f*(1-2*h*f));if(m>=0||1===a){n=(e>=0?5:-5)*(m+i);var v,y=50;do{m=(i=Math.min(18,Math.abs(n)/5))-(a=Math.floor(i)),o=C[a][1],s=C[a+1][1],l=C[Math.min(19,a+2)][1],n-=(v=(e>=0?p:-p)*(s+m*(l-o)/2+m*m*(l-2*s+o)/2)-e)*g}while(Math.abs(v)>1e-12&&--y>0);break}}while(--a>=0);var x=C[a][0],b=C[a+1][0],_=C[Math.min(19,a+2)][0];return[t/(b+m*(_-x)/2+m*m*(_-2*b+x)/2),n*d]},(t.geo.robinson=function(){return y(L)}).raw=L,I.invert=function(t,e){return[t/Math.cos(e),e]},(t.geo.sinusoidal=function(){return y(I)}).raw=I,P.invert=function(t,e){if(!(t*t+4*e*e>h*h+f)){var r=t,n=e,i=25;do{var a,o=Math.sin(r),s=Math.sin(r/2),l=Math.cos(r/2),c=Math.sin(n),u=Math.cos(n),p=Math.sin(2*n),d=c*c,g=u*u,m=s*s,y=1-g*l*l,x=y?v(u*l)*Math.sqrt(a=1/y):a=0,b=2*x*u*s-t,_=x*c-e,w=a*(g*m+x*u*l*d),T=a*(.5*o*p-2*x*c*s),k=.25*a*(p*s-x*c*g*o),M=a*(d*l+x*m*u),A=T*k-M*w;if(!A)break;var S=(_*T-b*M)/A,E=(b*k-_*w)/A;r-=S,n-=E}while((Math.abs(S)>f||Math.abs(E)>f)&&--i>0);return[r,n]}},(t.geo.aitoff=function(){return y(P)}).raw=P,z.invert=function(t,e){var r=t,n=e,i=25;do{var a,o=Math.cos(n),s=Math.sin(n),l=Math.sin(2*n),c=s*s,u=o*o,h=Math.sin(r),d=Math.cos(r/2),g=Math.sin(r/2),m=g*g,y=1-u*d*d,x=y?v(o*d)*Math.sqrt(a=1/y):a=0,b=.5*(2*x*o*g+r/p)-t,_=.5*(x*s+n)-e,w=.5*a*(u*m+x*o*d*c)+.5/p,T=a*(h*l/4-x*s*g),k=.125*a*(l*g-x*s*u*h),M=.5*a*(c*d+x*m*o)+.5,A=T*k-M*w,S=(_*T-b*M)/A,E=(b*k-_*w)/A;r-=S,n-=E}while((Math.abs(S)>f||Math.abs(E)>f)&&--i>0);return[r,n]},(t.geo.winkel3=function(){return y(z)}).raw=z}},{}],864:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../registry"),o=Math.PI/180,s=180/Math.PI,l={cursor:"pointer"},c={cursor:"auto"};function u(t,e){return n.behavior.zoom().translate(e.translate()).scale(e.scale())}function f(t,e,r){var n=t.id,o=t.graphDiv,s=o.layout,l=s[n],c=o._fullLayout,u=c[n],f={},h={};function p(t,e){f[n+"."+t]=i.nestedProperty(l,t).get(),a.call("_storeDirectGUIEdit",s,c._preGUI,f);var r=i.nestedProperty(u,t);r.get()!==e&&(r.set(e),i.nestedProperty(l,t).set(e),h[n+"."+t]=e)}r(p),p("projection.scale",e.scale()/t.fitScale),p("fitbounds",!1),o.emit("plotly_relayout",h)}function h(t,e){var r=u(0,e);function i(r){var n=e.invert(t.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return r.on("zoomstart",(function(){n.select(this).style(l)})).on("zoom",(function(){e.scale(n.event.scale).translate(n.event.translate),t.render();var r=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":r[0],"geo.center.lat":r[1]})})).on("zoomend",(function(){n.select(this).style(c),f(t,e,i)})),r}function p(t,e){var r,i,a,o,s,h,p,d,g,m=u(0,e);function v(t){return e.invert(t)}function y(r){var n=e.rotate(),i=e.invert(t.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return m.on("zoomstart",(function(){n.select(this).style(l),r=n.mouse(this),i=e.rotate(),a=e.translate(),o=i,s=v(r)})).on("zoom",(function(){if(h=n.mouse(this),function(t){var r=v(t);if(!r)return!0;var n=e(r);return Math.abs(n[0]-t[0])>2||Math.abs(n[1]-t[1])>2}(r))return m.scale(e.scale()),void m.translate(e.translate());e.scale(n.event.scale),e.translate([a[0],n.event.translate[1]]),s?v(h)&&(d=v(h),p=[o[0]+(d[0]-s[0]),i[1],i[2]],e.rotate(p),o=p):s=v(r=h),g=!0,t.render();var l=e.rotate(),c=e.invert(t.midPt);t.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":e.scale()/t.fitScale,"geo.center.lon":c[0],"geo.center.lat":c[1],"geo.projection.rotation.lon":-l[0]})})).on("zoomend",(function(){n.select(this).style(c),g&&f(t,e,y)})),m}function d(t,e){var r,i={r:e.rotate(),k:e.scale()},a=u(0,e),o=function(t){var e=0,r=arguments.length,i=[];for(;++ed?(a=(f>0?90:-90)-p,i=0):(a=Math.asin(f/d)*s-p,i=Math.sqrt(d*d-f*f));var g=180-a-2*p,m=(Math.atan2(h,u)-Math.atan2(c,i))*s,v=(Math.atan2(h,u)-Math.atan2(c,-i))*s;return b(r[0],r[1],a,m)<=b(r[0],r[1],g,v)?[a,m,r[2]]:[g,v,r[2]]}function b(t,e,r,n){var i=_(r-t),a=_(n-e);return Math.sqrt(i*i+a*a)}function _(t){return(t%360+540)%360-180}function w(t,e,r){var n=r*o,i=t.slice(),a=0===e?1:0,s=2===e?1:2,l=Math.cos(n),c=Math.sin(n);return i[a]=t[a]*l-t[s]*c,i[s]=t[s]*l+t[a]*c,i}function T(t){return[Math.atan2(2*(t[0]*t[1]+t[2]*t[3]),1-2*(t[1]*t[1]+t[2]*t[2]))*s,Math.asin(Math.max(-1,Math.min(1,2*(t[0]*t[2]-t[3]*t[1]))))*s,Math.atan2(2*(t[0]*t[3]+t[1]*t[2]),1-2*(t[2]*t[2]+t[3]*t[3]))*s]}function k(t,e){for(var r=0,n=0,i=t.length;nMath.abs(s)?(c.boxEnd[1]=c.boxStart[1]+Math.abs(a)*_*(s>=0?1:-1),c.boxEnd[1]l[3]&&(c.boxEnd[1]=l[3],c.boxEnd[0]=c.boxStart[0]+(l[3]-c.boxStart[1])/Math.abs(_))):(c.boxEnd[0]=c.boxStart[0]+Math.abs(s)/_*(a>=0?1:-1),c.boxEnd[0]l[2]&&(c.boxEnd[0]=l[2],c.boxEnd[1]=c.boxStart[1]+(l[2]-c.boxStart[0])*Math.abs(_)))}}else c.boxEnabled?(a=c.boxStart[0]!==c.boxEnd[0],s=c.boxStart[1]!==c.boxEnd[1],a||s?(a&&(m(0,c.boxStart[0],c.boxEnd[0]),t.xaxis.autorange=!1),s&&(m(1,c.boxStart[1],c.boxEnd[1]),t.yaxis.autorange=!1),t.relayoutCallback()):t.glplot.setDirty(),c.boxEnabled=!1,c.boxInited=!1):c.boxInited&&(c.boxInited=!1);break;case"pan":c.boxEnabled=!1,c.boxInited=!1,e?(c.panning||(c.dragStart[0]=n,c.dragStart[1]=i),Math.abs(c.dragStart[0]-n).999&&(g="turntable"):g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",n.getDfltFromLayout("hovermode"))}e.exports=function(t,e,r){var i=e._basePlotModules.length>1;o(t,e,r,{type:"gl3d",attributes:l,handleDefaults:u,fullLayout:e,font:e.font,fullData:r,getDfltFromLayout:function(e){if(!i)return n.validate(t[e],l[e])?t[e]:void 0},autotypenumbersDflt:e.autotypenumbers,paper_bgcolor:e.paper_bgcolor,calendar:e.calendar})}},{"../../../components/color":643,"../../../lib":778,"../../../registry":911,"../../get_data":865,"../../subplot_defaults":905,"./axis_defaults":873,"./layout_attributes":876}],876:[function(t,e,r){"use strict";var n=t("./axis_attributes"),i=t("../../domain").attributes,a=t("../../../lib/extend").extendFlat,o=t("../../../lib").counterRegex;function s(t,e,r){return{x:{valType:"number",dflt:t,editType:"camera"},y:{valType:"number",dflt:e,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}e.exports={_arrayAttrRegexps:[o("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:a(s(0,0,1),{}),center:a(s(0,0,0),{}),eye:a(s(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:i({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:n,yaxis:n,zaxis:n,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},{"../../../lib":778,"../../../lib/extend":768,"../../domain":855,"./axis_attributes":872}],877:[function(t,e,r){"use strict";var n=t("../../../lib/str2rgbarray"),i=["xaxis","yaxis","zaxis"];function a(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}a.prototype.merge=function(t){for(var e=0;e<3;++e){var r=t[i[e]];r.visible?(this.enabled[e]=r.showspikes,this.colors[e]=n(r.spikecolor),this.drawSides[e]=r.spikesides,this.lineWidth[e]=r.spikethickness):(this.enabled[e]=!1,this.drawSides[e]=!1)}},e.exports=function(t){var e=new a;return e.merge(t),e}},{"../../../lib/str2rgbarray":802}],878:[function(t,e,r){"use strict";e.exports=function(t){for(var e=t.axesOptions,r=t.glplot.axesPixels,s=t.fullSceneLayout,l=[[],[],[]],c=0;c<3;++c){var u=s[a[c]];if(u._length=(r[c].hi-r[c].lo)*r[c].pixelsPerDataUnit/t.dataScale[c],Math.abs(u._length)===1/0||isNaN(u._length))l[c]=[];else{u._input_range=u.range.slice(),u.range[0]=r[c].lo/t.dataScale[c],u.range[1]=r[c].hi/t.dataScale[c],u._m=1/(t.dataScale[c]*r[c].pixelsPerDataUnit),u.range[0]===u.range[1]&&(u.range[0]-=1,u.range[1]+=1);var f=u.tickmode;if("auto"===u.tickmode){u.tickmode="linear";var h=u.nticks||i.constrain(u._length/40,4,9);n.autoTicks(u,Math.abs(u.range[1]-u.range[0])/h)}for(var p=n.calcTicks(u,{msUTC:!0}),d=0;d/g," "));l[c]=p,u.tickmode=f}}e.ticks=l;for(c=0;c<3;++c){o[c]=.5*(t.glplot.bounds[0][c]+t.glplot.bounds[1][c]);for(d=0;d<2;++d)e.bounds[d][c]=t.glplot.bounds[d][c]}t.contourLevels=function(t){for(var e=new Array(3),r=0;r<3;++r){for(var n=t[r],i=new Array(n.length),a=0;ar.deltaY?1.1:1/1.1,a=t.glplot.getAspectratio();t.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(t)}}),!!c&&{passive:!1}),t.glplot.canvas.addEventListener("mousemove",(function(){if(!1!==t.fullSceneLayout.dragmode&&0!==t.camera.mouseListener.buttons){var e=n();t.graphDiv.emit("plotly_relayouting",e)}})),t.staticMode||t.glplot.canvas.addEventListener("webglcontextlost",(function(r){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:r,layer:t.id})}),!1)),t.glplot.oncontextloss=function(){t.recoverContext()},t.glplot.onrender=function(){t.render()},!0},w.render=function(){var t,e=this,r=e.graphDiv,n=e.svgContainer,i=e.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),b(e),e.glplot.axes.update(e.axesOptions);for(var c,u=Object.keys(e.traces),h=null,g=e.glplot.selection,m=0;m")):"isosurface"===t.type||"volume"===t.type?(k.valueLabel=p.tickText(e._mockAxis,e._mockAxis.d2l(g.traceCoordinate[3]),"hover").text,E.push("value: "+k.valueLabel),g.textLabel&&E.push(g.textLabel),_=E.join("
    ")):_=g.textLabel;var C={x:g.traceCoordinate[0],y:g.traceCoordinate[1],z:g.traceCoordinate[2],data:w._input,fullData:w,curveNumber:w.index,pointNumber:T};d.appendArrayPointValue(C,w,T),t._module.eventData&&(C=w._module.eventData(C,g,w,{},T));var L={points:[C]};e.fullSceneLayout.hovermode&&d.loneHover({trace:w,x:(.5+.5*x[0]/x[3])*s,y:(.5-.5*x[1]/x[3])*l,xLabel:k.xLabel,yLabel:k.yLabel,zLabel:k.zLabel,text:_,name:h.name,color:d.castHoverOption(w,T,"bgcolor")||h.color,borderColor:d.castHoverOption(w,T,"bordercolor"),fontFamily:d.castHoverOption(w,T,"font.family"),fontSize:d.castHoverOption(w,T,"font.size"),fontColor:d.castHoverOption(w,T,"font.color"),nameLength:d.castHoverOption(w,T,"namelength"),textAlign:d.castHoverOption(w,T,"align"),hovertemplate:f.castOption(w,T,"hovertemplate"),hovertemplateLabels:f.extendFlat({},C,k),eventData:[C]},{container:n,gd:r}),g.buttons&&g.distance<5?r.emit("plotly_click",L):r.emit("plotly_hover",L),c=L}else d.loneUnhover(n),r.emit("plotly_unhover",c);e.drawAnnotations(e)},w.recoverContext=function(){var t=this;t.glplot.dispose();var e=function(){t.glplot.gl.isContextLost()?requestAnimationFrame(e):t.initializeGLPlot()?t.plot.apply(t,t.plotArgs):f.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(e)};var k=["xaxis","yaxis","zaxis"];function M(t,e,r){for(var n=t.fullSceneLayout,i=0;i<3;i++){var a=k[i],o=a.charAt(0),s=n[a],l=e[o],c=e[o+"calendar"],u=e["_"+o+"length"];if(f.isArrayOrTypedArray(l))for(var h,p=0;p<(u||l.length);p++)if(f.isArrayOrTypedArray(l[p]))for(var d=0;dm[1][a])m[0][a]=-1,m[1][a]=1;else{var C=m[1][a]-m[0][a];m[0][a]-=C/32,m[1][a]+=C/32}if("reversed"===s.autorange){var L=m[0][a];m[0][a]=m[1][a],m[1][a]=L}}else{var I=s.range;m[0][a]=s.r2l(I[0]),m[1][a]=s.r2l(I[1])}m[0][a]===m[1][a]&&(m[0][a]-=1,m[1][a]+=1),v[a]=m[1][a]-m[0][a],this.glplot.setBounds(a,{min:m[0][a]*h[a],max:m[1][a]*h[a]})}var P=c.aspectmode;if("cube"===P)d=[1,1,1];else if("manual"===P){var z=c.aspectratio;d=[z.x,z.y,z.z]}else{if("auto"!==P&&"data"!==P)throw new Error("scene.js aspectRatio was not one of the enumerated types");var O=[1,1,1];for(a=0;a<3;++a){var D=y[l=(s=c[k[a]]).type];O[a]=Math.pow(D.acc,1/D.count)/h[a]}d="data"===P||Math.max.apply(null,O)/Math.min.apply(null,O)<=4?O:[1,1,1]}c.aspectratio.x=u.aspectratio.x=d[0],c.aspectratio.y=u.aspectratio.y=d[1],c.aspectratio.z=u.aspectratio.z=d[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,F=e._size||null;if(R&&F){var B=this.container.style;B.position="absolute",B.left=F.l+R.x[0]*F.w+"px",B.top=F.t+(1-R.y[1])*F.h+"px",B.width=F.w*(R.x[1]-R.x[0])+"px",B.height=F.h*(R.y[1]-R.y[0])+"px"}this.glplot.redraw()}},w.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},w.getCamera=function(){var t;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(t=this.camera).up[0],y:t.up[1],z:t.up[2]},center:{x:t.center[0],y:t.center[1],z:t.center[2]},eye:{x:t.eye[0],y:t.eye[1],z:t.eye[2]},projection:{type:!0===t._ortho?"orthographic":"perspective"}}},w.setViewport=function(t){var e,r=t.camera;this.camera.lookAt.apply(this,[[(e=r).eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]),this.glplot.setAspectratio(t.aspectratio),"orthographic"===r.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},w.isCameraChanged=function(t){var e=this.getCamera(),r=f.nestedProperty(t,this.id+".camera").get();function n(t,e,r,n){var i=["up","center","eye"],a=["x","y","z"];return e[i[r]]&&t[i[r]][a[n]]===e[i[r]][a[n]]}var i=!1;if(void 0===r)i=!0;else{for(var a=0;a<3;a++)for(var o=0;o<3;o++)if(!n(e,r,a,o)){i=!0;break}(!r.projection||e.projection&&e.projection.type!==r.projection.type)&&(i=!0)}return i},w.isAspectChanged=function(t){var e=this.glplot.getAspectratio(),r=f.nestedProperty(t,this.id+".aspectratio").get();return void 0===r||r.x!==e.x||r.y!==e.y||r.z!==e.z},w.saveLayout=function(t){var e,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(t),c=this.isAspectChanged(t),h=l||c;if(h){var p={};if(l&&(e=this.getCamera(),n=(r=f.nestedProperty(t,this.id+".camera")).get(),p[this.id+".camera"]=n),c&&(i=this.glplot.getAspectratio(),o=(a=f.nestedProperty(t,this.id+".aspectratio")).get(),p[this.id+".aspectratio"]=o),u.call("_storeDirectGUIEdit",t,s._preGUI,p),l)r.set(e),f.nestedProperty(s,this.id+".camera").set(e);if(c)a.set(i),f.nestedProperty(s,this.id+".aspectratio").set(i),this.glplot.redraw()}return h},w.updateFx=function(t,e){var r=this.camera;if(r)if("orbit"===t)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===t){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var n=this.graphDiv,i=n._fullLayout,a=this.fullSceneLayout.camera,o=a.up.x,s=a.up.y,l=a.up.z;if(l/Math.sqrt(o*o+s*s+l*l)<.999){var c=this.id+".camera.up",h={x:0,y:0,z:1},p={};p[c]=h;var d=n.layout;u.call("_storeDirectGUIEdit",d,i._preGUI,p),a.up=h,f.nestedProperty(d,c).set(h)}}else r.keyBindingMode=t;this.fullSceneLayout.hovermode=e},w.toImage=function(t){t||(t="png"),this.staticMode&&this.container.appendChild(n),this.glplot.redraw();var e=this.glplot.gl,r=e.drawingBufferWidth,i=e.drawingBufferHeight;e.bindFramebuffer(e.FRAMEBUFFER,null);var a=new Uint8Array(r*i*4);e.readPixels(0,0,r,i,e.RGBA,e.UNSIGNED_BYTE,a),function(t,e,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)t[a+l]=Math.min(s*t[a+l],255)}}(a,r,i);var o=document.createElement("canvas");o.width=r,o.height=i;var s,l=o.getContext("2d"),c=l.createImageData(r,i);switch(c.data.set(a),l.putImageData(c,0,0),t){case"jpeg":s=o.toDataURL("image/jpeg");break;case"webp":s=o.toDataURL("image/webp");break;default:s=o.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(n),s},w.setConvert=function(){for(var t=0;t<3;t++){var e=this.fullSceneLayout[k[t]];p.setConvert(e,this.fullLayout),e.setScale=f.noop}},w.make4thDimension=function(){var t=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(this._mockAxis,t)},e.exports=_},{"../../components/fx":683,"../../lib":778,"../../lib/show_no_webgl_msg":800,"../../lib/str2rgbarray":802,"../../plots/cartesian/axes":828,"../../registry":911,"./layout/convert":874,"./layout/spikes":877,"./layout/tick_marks":878,"./project":879,"gl-plot3d":321,"has-passive-events":441,"webgl-context":606}],881:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){n=n||t.length;for(var i=new Array(n),a=0;a\xa9 OpenStreetMap',tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:'\xa9 CARTO',tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:'\xa9 CARTO',tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under ODbL.',tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:'Map tiles by Stamen Design, under CC BY 3.0 | Data by OpenStreetMap, under CC BY SA.',tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},i=Object.keys(n);e.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:n,styleValuesNonMapbox:i,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:"," Plotly.plot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",i.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},{}],884:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){var r=t.split(" "),i=r[0],a=r[1],o=n.isArrayOrTypedArray(e)?n.mean(e):e,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(i){case"top":c[0]="top",u[1]=-l;break;case"bottom":c[0]="bottom",u[1]=l}switch(a){case"left":c[1]="right",u[0]=-s;break;case"right":c[1]="left",u[0]=s}return{anchor:c[0]&&c[1]?c.join("-"):c[0]?c[0]:c[1]?c[1]:"center",offset:u}}},{"../../lib":778}],885:[function(t,e,r){"use strict";var n=t("mapbox-gl"),i=t("../../lib"),a=i.strTranslate,o=i.strScale,s=t("../../plots/get_data").getSubplotCalcData,l=t("../../constants/xmlns_namespaces"),c=t("d3"),u=t("../../components/drawing"),f=t("../../lib/svg_text_utils"),h=t("./mapbox"),p=r.constants=t("./constants");function d(t){return"string"==typeof t&&(-1!==p.styleValuesMapbox.indexOf(t)||0===t.indexOf("mapbox://"))}r.name="mapbox",r.attr="subplot",r.idRoot="mapbox",r.idRegex=r.attrRegex=i.counterRegex("mapbox"),r.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},r.layoutAttributes=t("./layout_attributes"),r.supplyLayoutDefaults=t("./layout_defaults"),r.plot=function(t){var e=t._fullLayout,r=t.calcdata,a=e._subplots.mapbox;if(n.version!==p.requiredVersion)throw new Error(p.wrongVersionErrorMsg);var o=function(t,e){var r=t._fullLayout;if(""===t._context.mapboxAccessToken)return"";for(var n=[],a=[],o=!1,s=!1,l=0;l1&&i.warn(p.multipleTokensErrorMsg),n[0]):(a.length&&i.log(["Listed mapbox access token(s)",a.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(t,a);n.accessToken=o;for(var l=0;l_/2){var w=v.split("|").join("
    ");x.text(w).attr("data-unformatted",w).call(f.convertToTspans,t),b=u.bBox(x.node())}x.attr("transform",a(-3,8-b.height)),y.insert("rect",".static-attribution").attr({x:-b.width-6,y:-b.height-3,width:b.width+6,height:b.height+3,fill:"rgba(255, 255, 255, 0.75)"});var T=1;b.width+6>_&&(T=_/(b.width+6));var k=[n.l+n.w*h.x[1],n.t+n.h*(1-h.y[0])];y.attr("transform",a(k[0],k[1])+o(T))}},r.updateFx=function(t){for(var e=t._fullLayout,r=e._subplots.mapbox,n=0;n0){for(var r=0;r0}function u(t){var e={},r={};switch(t.type){case"circle":n.extendFlat(r,{"circle-radius":t.circle.radius,"circle-color":t.color,"circle-opacity":t.opacity});break;case"line":n.extendFlat(r,{"line-width":t.line.width,"line-color":t.color,"line-opacity":t.opacity,"line-dasharray":t.line.dash});break;case"fill":n.extendFlat(r,{"fill-color":t.color,"fill-outline-color":t.fill.outlinecolor,"fill-opacity":t.opacity});break;case"symbol":var i=t.symbol,o=a(i.textposition,i.iconsize);n.extendFlat(e,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":o.anchor,"text-offset":o.offset,"symbol-placement":i.placement}),n.extendFlat(r,{"icon-color":t.color,"text-color":i.textfont.color,"text-opacity":t.opacity});break;case"raster":n.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":t.opacity})}return{layout:e,paint:r}}l.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=c(t)},l.needsNewImage=function(t){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===t.sourcetype&&(this.source!==t.source||JSON.stringify(this.coordinates)!==JSON.stringify(t.coordinates))},l.needsNewSource=function(t){return this.sourceType!==t.sourcetype||JSON.stringify(this.source)!==JSON.stringify(t.source)||this.layerType!==t.type},l.needsNewLayer=function(t){return this.layerType!==t.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},l.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},l.updateImage=function(t){this.subplot.map.getSource(this.idSource).updateImage({url:t.source,coordinates:t.coordinates});var e=this.findFollowingMapboxLayerId(this.lookupBelow());null!==e&&this.subplot.map.moveLayer(this.idLayer,e)},l.updateSource=function(t){var e=this.subplot.map;if(e.getSource(this.idSource)&&e.removeSource(this.idSource),this.sourceType=t.sourcetype,this.source=t.source,c(t)){var r=function(t){var e,r=t.sourcetype,n=t.source,a={type:r};"geojson"===r?e="data":"vector"===r?e="string"==typeof n?"url":"tiles":"raster"===r?(e="tiles",a.tileSize=256):"image"===r&&(e="url",a.coordinates=t.coordinates);a[e]=n,t.sourceattribution&&(a.attribution=i(t.sourceattribution));return a}(t);e.addSource(this.idSource,r)}},l.findFollowingMapboxLayerId=function(t){if("traces"===t)for(var e=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&v(e.originalEvent,n,[r.xaxis],[r.yaxis],r.id,t),i.indexOf("event")>-1&&c.click(n,e.originalEvent)}}},_.updateFx=function(t){var e=this,r=e.map,n=e.gd;if(!e.isStatic){var a,o=t.dragmode;a=f(o)?function(t,r){(t.range={})[e.id]=[c([r.xmin,r.ymin]),c([r.xmax,r.ymax])]}:function(t,r,n){(t.lassoPoints={})[e.id]=n.filtered.map(c)};var s=e.dragOptions;e.dragOptions=i.extendDeep(s||{},{dragmode:t.dragmode,element:e.div,gd:n,plotinfo:{id:e.id,domain:t[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis,fillRangeItems:a},xaxes:[e.xaxis],yaxes:[e.yaxis],subplot:e.id}),r.off("click",e.onClickInPanHandler),p(o)||h(o)?(r.dragPan.disable(),r.on("zoomstart",e.clearSelect),e.dragOptions.prepFn=function(t,r,n){d(t,r,n,e.dragOptions,o)},l.init(e.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",e.clearSelect),e.div.onmousedown=null,e.onClickInPanHandler=e.onClickInPanFn(e.dragOptions),r.on("click",e.onClickInPanHandler))}function c(t){var r=e.map.unproject(t);return[r.lng,r.lat]}},_.updateFramework=function(t){var e=t[this.id].domain,r=t._size,n=this.div.style;n.width=r.w*(e.x[1]-e.x[0])+"px",n.height=r.h*(e.y[1]-e.y[0])+"px",n.left=r.l+e.x[0]*r.w+"px",n.top=r.t+(1-e.y[1])*r.h+"px",this.xaxis._offset=r.l+e.x[0]*r.w,this.xaxis._length=r.w*(e.x[1]-e.x[0]),this.yaxis._offset=r.t+(1-e.y[1])*r.h,this.yaxis._length=r.h*(e.y[1]-e.y[0])},_.updateLayers=function(t){var e,r=t[this.id].layers,n=this.layerList;if(r.length!==n.length){for(e=0;e=e.width-20?(a["text-anchor"]="start",a.x=5):(a["text-anchor"]="end",a.x=e._paper.attr("width")-7),r.attr(a);var o=r.select(".js-link-to-tool"),s=r.select(".js-link-spacer"),l=r.select(".js-sourcelinks");t._context.showSources&&t._context.showSources(t),t._context.showLink&&function(t,e){e.text("");var r=e.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(t._context.linkText+" "+String.fromCharCode(187));if(t._context.sendData)r.on("click",(function(){x.sendDataToCloud(t)}));else{var n=window.location.pathname.split("/"),i=window.location.search;r.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+n[2].split(".")[0]+"/"+n[1]+i})}}(t,o),s.text(o.text()&&l.text()?" - ":"")}},x.sendDataToCloud=function(t){var e=(window.PLOTLYENV||{}).BASE_URL||t._context.plotlyServerURL;if(e){t.emit("plotly_beforeexport");var r=n.select(t).append("div").attr("id","hiddenform").style("display","none"),i=r.append("form").attr({action:e+"/external",method:"post",target:"_blank"});return i.append("input").attr({type:"text",name:"data"}).node().value=x.graphJson(t,!1,"keepdata"),i.node().submit(),r.remove(),t.emit("plotly_afterexport"),!1}};var w=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];function k(t,e){var r=t._context.locale;r||(r="en-US");var n=!1,i={};function a(t){for(var r=!0,a=0;a1&&O.length>1){for(o.getComponentMethod("grid","sizeDefaults")(u,l),s=0;s15&&O.length>15&&0===l.shapes.length&&0===l.images.length,l._hasCartesian=l._has("cartesian"),l._hasGeo=l._has("geo"),l._hasGL3D=l._has("gl3d"),l._hasGL2D=l._has("gl2d"),l._hasTernary=l._has("ternary"),l._hasPie=l._has("pie"),x.linkSubplots(h,l,f,a),x.cleanPlot(h,l,f,a);var N=!(!a._has||!a._has("gl2d")),j=!(!l._has||!l._has("gl2d")),U=!(!a._has||!a._has("cartesian"))||N,V=!(!l._has||!l._has("cartesian"))||j;U&&!V?a._bgLayer.remove():V&&!U&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!t._dragging&&p({_fullLayout:a}),function(t,e){var r,n=[];e.meta&&(r=e._meta={meta:e.meta,layout:{meta:e.meta}});for(var i=0;i0){var f=1-2*s;n=Math.round(f*n),i=Math.round(f*i)}}var h=x.layoutAttributes.width.min,p=x.layoutAttributes.height.min;n1,g=!e.height&&Math.abs(r.height-i)>1;(g||d)&&(d&&(r.width=n),g&&(r.height=i)),t._initialAutoSize||(t._initialAutoSize={width:n,height:i}),x.sanitizeMargins(r)},x.supplyLayoutModuleDefaults=function(t,e,r,n){var i,a,s,l=o.componentsRegistry,u=e._basePlotModules,f=o.subplotsRegistry.cartesian;for(i in l)(s=l[i]).includeBasePlot&&s.includeBasePlot(t,e);for(var h in u.length||u.push(f),e._has("cartesian")&&(o.getComponentMethod("grid","contentDefaults")(t,e),f.finalizeSubplots(t,e)),e._subplots)e._subplots[h].sort(c.subplotSort);for(a=0;a1&&(r.l/=g,r.r/=g)}if(f){var m=(r.t+r.b)/f;m>1&&(r.t/=m,r.b/=m)}var v=void 0!==r.xl?r.xl:r.x,y=void 0!==r.xr?r.xr:r.x,b=void 0!==r.yt?r.yt:r.y,_=void 0!==r.yb?r.yb:r.y;h[e]={l:{val:v,size:r.l+d},r:{val:y,size:r.r+d},b:{val:_,size:r.b+d},t:{val:b,size:r.t+d}},p[e]=1}else delete h[e],delete p[e];if(!n._replotting)return x.doAutoMargin(t)}},x.doAutoMargin=function(t){var e=t._fullLayout,r=e.width,n=e.height;e._size||(e._size={}),C(e);var i=e._size,s=e.margin,l=c.extendFlat({},i),u=s.l,f=s.r,p=s.t,d=s.b,g=e._pushmargin,m=e._pushmarginIds;if(!1!==e.margin.autoexpand){for(var v in g)m[v]||delete g[v];for(var y in g.base={l:{val:0,size:u},r:{val:1,size:f},t:{val:1,size:p},b:{val:0,size:d}},g){var b=g[y].l||{},_=g[y].b||{},w=b.val,T=b.size,k=_.val,M=_.size;for(var A in g){if(a(T)&&g[A].r){var S=g[A].r.val,E=g[A].r.size;if(S>w){var L=(T*S+(E-r)*w)/(S-w),I=(E*(1-w)+(T-r)*(1-S))/(S-w);L+I>u+f&&(u=L,f=I)}}if(a(M)&&g[A].t){var P=g[A].t.val,z=g[A].t.size;if(P>k){var O=(M*P+(z-n)*k)/(P-k),D=(z*(1-k)+(M-n)*(1-P))/(P-k);O+D>d+p&&(d=O,p=D)}}}}}var R=c.constrain(r-s.l-s.r,2,64),F=c.constrain(n-s.t-s.b,2,64),B=Math.max(0,r-R),N=Math.max(0,n-F);if(B){var j=(u+f)/B;j>1&&(u/=j,f/=j)}if(N){var U=(d+p)/N;U>1&&(d/=U,p/=U)}if(i.l=Math.round(u),i.r=Math.round(f),i.t=Math.round(p),i.b=Math.round(d),i.p=Math.round(s.pad),i.w=Math.round(r)-i.l-i.r,i.h=Math.round(n)-i.t-i.b,!e._replotting&&x.didMarginChange(l,i)){"_redrawFromAutoMarginCount"in e?e._redrawFromAutoMarginCount++:e._redrawFromAutoMarginCount=1;var V=3*(1+Object.keys(m).length);if(e._redrawFromAutoMarginCount0&&(t._transitioningWithDuration=!0),t._transitionData._interruptCallbacks.push((function(){n=!0})),r.redraw&&t._transitionData._interruptCallbacks.push((function(){return o.call("redraw",t)})),t._transitionData._interruptCallbacks.push((function(){t.emit("plotly_transitioninterrupted",[])}));var a=0,s=0;function l(){return a++,function(){s++,n||s!==a||function(e){if(!t._transitionData)return;(function(t){if(t)for(;t.length;)t.shift()})(t._transitionData._interruptCallbacks),Promise.resolve().then((function(){if(r.redraw)return o.call("redraw",t)})).then((function(){t._transitioning=!1,t._transitioningWithDuration=!1,t.emit("plotly_transitioned",[])})).then(e)}(i)}}r.runFn(l),setTimeout(l())}))}],a=c.syncOrAsync(i,t);return a&&a.then||(a=Promise.resolve()),a.then((function(){return t}))}x.didMarginChange=function(t,e){for(var r=0;r1)return!0}return!1},x.graphJson=function(t,e,r,n,i,a){(i&&e&&!t._fullData||i&&!e&&!t._fullLayout)&&x.supplyDefaults(t);var o=i?t._fullData:t.data,s=i?t._fullLayout:t.layout,l=(t._transitionData||{})._frames;function u(t,e){if("function"==typeof t)return e?"_function_":null;if(c.isPlainObject(t)){var n,i={};return Object.keys(t).sort().forEach((function(a){if(-1===["_","["].indexOf(a.charAt(0)))if("function"!=typeof t[a]){if("keepdata"===r){if("src"===a.substr(a.length-3))return}else if("keepstream"===r){if("string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0&&!c.isPlainObject(t.stream))return}else if("keepall"!==r&&"string"==typeof(n=t[a+"src"])&&n.indexOf(":")>0)return;i[a]=u(t[a],e)}else e&&(i[a]="_function")})),i}return Array.isArray(t)?t.map((function(t){return u(t,e)})):c.isTypedArray(t)?c.simpleMap(t,c.identity):c.isJSDate(t)?c.ms2DateTimeLocal(+t):t}var f={data:(o||[]).map((function(t){var r=u(t);return e&&delete r.fit,r}))};if(!e&&(f.layout=u(s),i)){var h=s._size;f.layout.computed={margin:{b:h.b,l:h.l,r:h.r,t:h.t}}}return t.framework&&t.framework.isPolar&&(f=t.framework.getConfig()),l&&(f.frames=u(l)),a&&(f.config=u(t._context,!0)),"object"===n?f:JSON.stringify(f)},x.modifyFrames=function(t,e){var r,n,i,a=t._transitionData._frames,o=t._transitionData._frameHash;for(r=0;r=0;a--)if(s[a].enabled){r._indexToPoints=s[a]._indexToPoints;break}n&&n.calc&&(o=n.calc(t,r))}Array.isArray(o)&&o[0]||(o=[{x:f,y:f}]),o[0].t||(o[0].t={}),o[0].trace=r,d[e]=o}}for(z(l,u,p),i=0;i1e-10?t:0}function h(t,e,r){e=e||0,r=r||0;for(var n=t.length,i=new Array(n),a=0;a0?r:1/0})),i=n.mod(r+1,e.length);return[e[r],e[i]]},findIntersectionXY:c,findXYatLength:function(t,e,r,n){var i=-e*r,a=e*e+1,o=2*(e*i-r),s=i*i+r*r-t*t,l=Math.sqrt(o*o-4*a*s),c=(-o+l)/(2*a),u=(-o-l)/(2*a);return[[c,e*c+i+n],[u,e*u+i+n]]},clampTiny:f,pathPolygon:function(t,e,r,n,i,a){return"M"+h(u(t,e,r,n),i,a).join("L")},pathPolygonAnnulus:function(t,e,r,n,i,a,o){var s,l;t=0?h.angularAxis.domain:n.extent(T),E=Math.abs(T[1]-T[0]);M&&!k&&(E=0);var C=S.slice();A&&k&&(C[1]+=E);var L=h.angularAxis.ticksCount||4;L>8&&(L=L/(L/8)+L%8),h.angularAxis.ticksStep&&(L=(C[1]-C[0])/L);var I=h.angularAxis.ticksStep||(C[1]-C[0])/(L*(h.minorTicks+1));w&&(I=Math.max(Math.round(I),1)),C[2]||(C[2]=I);var P=n.range.apply(this,C);if(P=P.map((function(t,e){return parseFloat(t.toPrecision(12))})),s=n.scale.linear().domain(C.slice(0,2)).range("clockwise"===h.direction?[0,360]:[360,0]),u.layout.angularAxis.domain=s.domain(),u.layout.angularAxis.endPadding=A?E:0,"undefined"==typeof(t=n.select(this).select("svg.chart-root"))||t.empty()){var z=(new DOMParser).parseFromString("' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '","application/xml"),O=this.appendChild(this.ownerDocument.importNode(z.documentElement,!0));t=n.select(O)}t.select(".guides-group").style({"pointer-events":"none"}),t.select(".angular.axis-group").style({"pointer-events":"none"}),t.select(".radial.axis-group").style({"pointer-events":"none"});var D,R=t.select(".chart-group"),F={fill:"none",stroke:h.tickColor},B={"font-size":h.font.size,"font-family":h.font.family,fill:h.font.color,"text-shadow":["-1px 0px","1px -1px","-1px 1px","1px 1px"].map((function(t,e){return" "+t+" 0 "+h.font.outlineColor})).join(",")};if(h.showLegend){D=t.select(".legend-group").attr({transform:"translate("+[x,h.margin.top]+")"}).style({display:"block"});var N=p.map((function(t,e){var r=o.util.cloneJson(t);return r.symbol="DotPlot"===t.geometry?t.dotType||"circle":"LinePlot"!=t.geometry?"square":"line",r.visibleInLegend="undefined"==typeof t.visibleInLegend||t.visibleInLegend,r.color="LinePlot"===t.geometry?t.strokeColor:t.color,r}));o.Legend().config({data:p.map((function(t,e){return t.name||"Element"+e})),legendConfig:i({},o.Legend.defaultConfig().legendConfig,{container:D,elements:N,reverseOrder:h.legend.reverseOrder})})();var j=D.node().getBBox();x=Math.min(h.width-j.width-h.margin.left-h.margin.right,h.height-h.margin.top-h.margin.bottom)/2,x=Math.max(10,x),_=[h.margin.left+x,h.margin.top+x],r.range([0,x]),u.layout.radialAxis.domain=r.domain(),D.attr("transform","translate("+[_[0]+x,_[1]-x]+")")}else D=t.select(".legend-group").style({display:"none"});t.attr({width:h.width,height:h.height}).style({opacity:h.opacity}),R.attr("transform","translate("+_+")").style({cursor:"crosshair"});var U=[(h.width-(h.margin.left+h.margin.right+2*x+(j?j.width:0)))/2,(h.height-(h.margin.top+h.margin.bottom+2*x))/2];if(U[0]=Math.max(0,U[0]),U[1]=Math.max(0,U[1]),t.select(".outer-group").attr("transform","translate("+U+")"),h.title&&h.title.text){var V=t.select("g.title-group text").style(B).text(h.title.text),q=V.node().getBBox();V.attr({x:_[0]-q.width/2,y:_[1]-x-20})}var H=t.select(".radial.axis-group");if(h.radialAxis.gridLinesVisible){var G=H.selectAll("circle.grid-circle").data(r.ticks(5));G.enter().append("circle").attr({class:"grid-circle"}).style(F),G.attr("r",r),G.exit().remove()}H.select("circle.outside-circle").attr({r:x}).style(F);var Y=t.select("circle.background-circle").attr({r:x}).style({fill:h.backgroundColor,stroke:h.stroke});function W(t,e){return s(t)%360+h.orientation}if(h.radialAxis.visible){var X=n.svg.axis().scale(r).ticks(5).tickSize(5);H.call(X).attr({transform:"rotate("+h.radialAxis.orientation+")"}),H.selectAll(".domain").style(F),H.selectAll("g>text").text((function(t,e){return this.textContent+h.radialAxis.ticksSuffix})).style(B).style({"text-anchor":"start"}).attr({x:0,y:0,dx:0,dy:0,transform:function(t,e){return"horizontal"===h.radialAxis.tickOrientation?"rotate("+-h.radialAxis.orientation+") translate("+[0,B["font-size"]]+")":"translate("+[0,B["font-size"]]+")"}}),H.selectAll("g>line").style({stroke:"black"})}var Z=t.select(".angular.axis-group").selectAll("g.angular-tick").data(P),J=Z.enter().append("g").classed("angular-tick",!0);Z.attr({transform:function(t,e){return"rotate("+W(t)+")"}}).style({display:h.angularAxis.visible?"block":"none"}),Z.exit().remove(),J.append("line").classed("grid-line",!0).classed("major",(function(t,e){return e%(h.minorTicks+1)==0})).classed("minor",(function(t,e){return!(e%(h.minorTicks+1)==0)})).style(F),J.selectAll(".minor").style({stroke:h.minorTickColor}),Z.select("line.grid-line").attr({x1:h.tickLength?x-h.tickLength:0,x2:x}).style({display:h.angularAxis.gridLinesVisible?"block":"none"}),J.append("text").classed("axis-text",!0).style(B);var K=Z.select("text.axis-text").attr({x:x+h.labelOffset,dy:a+"em",transform:function(t,e){var r=W(t),n=x+h.labelOffset,i=h.angularAxis.tickOrientation;return"horizontal"==i?"rotate("+-r+" "+n+" 0)":"radial"==i?r<270&&r>90?"rotate(180 "+n+" 0)":null:"rotate("+(r<=180&&r>0?-90:90)+" "+n+" 0)"}}).style({"text-anchor":"middle",display:h.angularAxis.labelsVisible?"block":"none"}).text((function(t,e){return e%(h.minorTicks+1)!=0?"":w?w[t]+h.angularAxis.ticksSuffix:t+h.angularAxis.ticksSuffix})).style(B);h.angularAxis.rewriteTicks&&K.text((function(t,e){return e%(h.minorTicks+1)!=0?"":h.angularAxis.rewriteTicks(this.textContent,e)}));var Q=n.max(R.selectAll(".angular-tick text")[0].map((function(t,e){return t.getCTM().e+t.getBBox().width})));D.attr({transform:"translate("+[x+Q,h.margin.top]+")"});var $=t.select("g.geometry-group").selectAll("g").size()>0,tt=t.select("g.geometry-group").selectAll("g.geometry").data(p);if(tt.enter().append("g").attr({class:function(t,e){return"geometry geometry"+e}}),tt.exit().remove(),p[0]||$){var et=[];p.forEach((function(t,e){var n={};n.radialScale=r,n.angularScale=s,n.container=tt.filter((function(t,r){return r==e})),n.geometry=t.geometry,n.orientation=h.orientation,n.direction=h.direction,n.index=e,et.push({data:t,geometryConfig:n})}));var rt=n.nest().key((function(t,e){return"undefined"!=typeof t.data.groupId||"unstacked"})).entries(et),nt=[];rt.forEach((function(t,e){"unstacked"===t.key?nt=nt.concat(t.values.map((function(t,e){return[t]}))):nt.push(t.values)})),nt.forEach((function(t,e){var r;r=Array.isArray(t)?t[0].geometryConfig.geometry:t.geometryConfig.geometry;var n=t.map((function(t,e){return i(o[r].defaultConfig(),t)}));o[r]().config(n)()}))}var it,at,ot=t.select(".guides-group"),st=t.select(".tooltips-group"),lt=o.tooltipPanel().config({container:st,fontSize:8})(),ct=o.tooltipPanel().config({container:st,fontSize:8})(),ut=o.tooltipPanel().config({container:st,hasTick:!0})();if(!k){var ft=ot.select("line").attr({x1:0,y1:0,y2:0}).style({stroke:"grey","pointer-events":"none"});R.on("mousemove.angular-guide",(function(t,e){var r=o.util.getMousePos(Y).angle;ft.attr({x2:-x,transform:"rotate("+r+")"}).style({opacity:.5});var n=(r+180+360-h.orientation)%360;it=s.invert(n);var i=o.util.convertToCartesian(x+12,r+180);lt.text(o.util.round(it)).move([i[0]+_[0],i[1]+_[1]])})).on("mouseout.angular-guide",(function(t,e){ot.select("line").style({opacity:0})}))}var ht=ot.select("circle").style({stroke:"grey",fill:"none"});R.on("mousemove.radial-guide",(function(t,e){var n=o.util.getMousePos(Y).radius;ht.attr({r:n}).style({opacity:.5}),at=r.invert(o.util.getMousePos(Y).radius);var i=o.util.convertToCartesian(n,h.radialAxis.orientation);ct.text(o.util.round(at)).move([i[0]+_[0],i[1]+_[1]])})).on("mouseout.radial-guide",(function(t,e){ht.style({opacity:0}),ut.hide(),lt.hide(),ct.hide()})),t.selectAll(".geometry-group .mark").on("mouseover.tooltip",(function(e,r){var i=n.select(this),a=this.style.fill,s="black",l=this.style.opacity||1;if(i.attr({"data-opacity":l}),a&&"none"!==a){i.attr({"data-fill":a}),s=n.hsl(a).darker().toString(),i.style({fill:s,opacity:1});var c={t:o.util.round(e[0]),r:o.util.round(e[1])};k&&(c.t=w[e[0]]);var u="t: "+c.t+", r: "+c.r,f=this.getBoundingClientRect(),h=t.node().getBoundingClientRect(),p=[f.left+f.width/2-U[0]-h.left,f.top+f.height/2-U[1]-h.top];ut.config({color:s}).text(u),ut.move(p)}else a=this.style.stroke||"black",i.attr({"data-stroke":a}),s=n.hsl(a).darker().toString(),i.style({stroke:s,opacity:1})})).on("mousemove.tooltip",(function(t,e){if(0!=n.event.which)return!1;n.select(this).attr("data-fill")&&ut.show()})).on("mouseout.tooltip",(function(t,e){ut.hide();var r=n.select(this),i=r.attr("data-fill");i?r.style({fill:i,opacity:r.attr("data-opacity")}):r.style({stroke:r.attr("data-stroke"),opacity:r.attr("data-opacity")})}))}))}(c),this},h.config=function(t){if(!arguments.length)return l;var e=o.util.cloneJson(t);return e.data.forEach((function(t,e){l.data[e]||(l.data[e]={}),i(l.data[e],o.Axis.defaultConfig().data[0]),i(l.data[e],t)})),i(l.layout,o.Axis.defaultConfig().layout),i(l.layout,e.layout),this},h.getLiveConfig=function(){return u},h.getinputConfig=function(){return c},h.radialScale=function(t){return r},h.angularScale=function(t){return s},h.svg=function(){return t},n.rebind(h,f,"on"),h},o.Axis.defaultConfig=function(t,e){return{data:[{t:[1,2,3,4],r:[10,11,12,13],name:"Line1",geometry:"LinePlot",color:null,strokeDash:"solid",strokeColor:null,strokeSize:"1",visibleInLegend:!0,opacity:1}],layout:{defaultColorRange:n.scale.category10().range(),title:null,height:450,width:500,margin:{top:40,right:40,bottom:40,left:40},font:{size:12,color:"gray",outlineColor:"white",family:"Tahoma, sans-serif"},direction:"clockwise",orientation:0,labelOffset:10,radialAxis:{domain:null,orientation:-45,ticksSuffix:"",visible:!0,gridLinesVisible:!0,tickOrientation:"horizontal",rewriteTicks:null},angularAxis:{domain:[0,360],ticksSuffix:"",visible:!0,gridLinesVisible:!0,labelsVisible:!0,tickOrientation:"horizontal",rewriteTicks:null,ticksCount:null,ticksStep:null},minorTicks:0,tickLength:null,tickColor:"silver",minorTickColor:"#eee",backgroundColor:"none",needsEndSpacing:null,showLegend:!0,legend:{reverseOrder:!1},opacity:1}}},o.util={},o.DATAEXTENT="dataExtent",o.AREA="AreaChart",o.LINE="LinePlot",o.DOT="DotPlot",o.BAR="BarChart",o.util._override=function(t,e){for(var r in t)r in e&&(e[r]=t[r])},o.util._extend=function(t,e){for(var r in t)e[r]=t[r]},o.util._rndSnd=function(){return 2*Math.random()-1+(2*Math.random()-1)+(2*Math.random()-1)},o.util.dataFromEquation2=function(t,e){var r=e||6;return n.range(0,360+r,r).map((function(e,r){var n=e*Math.PI/180;return[e,t(n)]}))},o.util.dataFromEquation=function(t,e,r){var i=e||6,a=[],o=[];n.range(0,360+i,i).forEach((function(e,r){var n=e*Math.PI/180,i=t(n);a.push(e),o.push(i)}));var s={t:a,r:o};return r&&(s.name=r),s},o.util.ensureArray=function(t,e){if("undefined"==typeof t)return null;var r=[].concat(t);return n.range(e).map((function(t,e){return r[e]||r[0]}))},o.util.fillArrays=function(t,e,r){return e.forEach((function(e,n){t[e]=o.util.ensureArray(t[e],r)})),t},o.util.cloneJson=function(t){return JSON.parse(JSON.stringify(t))},o.util.validateKeys=function(t,e){"string"==typeof e&&(e=e.split("."));var r=e.shift();return t[r]&&(!e.length||objHasKeys(t[r],e))},o.util.sumArrays=function(t,e){return n.zip(t,e).map((function(t,e){return n.sum(t)}))},o.util.arrayLast=function(t){return t[t.length-1]},o.util.arrayEqual=function(t,e){for(var r=Math.max(t.length,e.length,1);r-- >=0&&t[r]===e[r];);return-2===r},o.util.flattenArray=function(t){for(var e=[];!o.util.arrayEqual(e,t);)e=t,t=[].concat.apply([],t);return t},o.util.deduplicate=function(t){return t.filter((function(t,e,r){return r.indexOf(t)==e}))},o.util.convertToCartesian=function(t,e){var r=e*Math.PI/180;return[t*Math.cos(r),t*Math.sin(r)]},o.util.round=function(t,e){var r=e||2,n=Math.pow(10,r);return Math.round(t*n)/n},o.util.getMousePos=function(t){var e=n.mouse(t.node()),r=e[0],i=e[1],a={};return a.x=r,a.y=i,a.pos=e,a.angle=180*(Math.atan2(i,r)+Math.PI)/Math.PI,a.radius=Math.sqrt(r*r+i*i),a},o.util.duplicatesCount=function(t){for(var e,r={},n={},i=0,a=t.length;i0)){var l=n.select(this.parentNode).selectAll("path.line").data([0]);l.enter().insert("path"),l.attr({class:"line",d:u(s),transform:function(t,r){return"rotate("+(e.orientation+90)+")"},"pointer-events":"none"}).style({fill:function(t,e){return d.fill(r,i,a)},"fill-opacity":0,stroke:function(t,e){return d.stroke(r,i,a)},"stroke-width":function(t,e){return d["stroke-width"](r,i,a)},"stroke-dasharray":function(t,e){return d["stroke-dasharray"](r,i,a)},opacity:function(t,e){return d.opacity(r,i,a)},display:function(t,e){return d.display(r,i,a)}})}};var f=e.angularScale.range(),h=Math.abs(f[1]-f[0])/o[0].length*Math.PI/180,p=n.svg.arc().startAngle((function(t){return-h/2})).endAngle((function(t){return h/2})).innerRadius((function(t){return e.radialScale(l+(t[2]||0))})).outerRadius((function(t){return e.radialScale(l+(t[2]||0))+e.radialScale(t[1])}));c.arc=function(t,r,i){n.select(this).attr({class:"mark arc",d:p,transform:function(t,r){return"rotate("+(e.orientation+s(t[0])+90)+")"}})};var d={fill:function(e,r,n){return t[n].data.color},stroke:function(e,r,n){return t[n].data.strokeColor},"stroke-width":function(e,r,n){return t[n].data.strokeSize+"px"},"stroke-dasharray":function(e,n,i){return r[t[i].data.strokeDash]},opacity:function(e,r,n){return t[n].data.opacity},display:function(e,r,n){return"undefined"==typeof t[n].data.visible||t[n].data.visible?"block":"none"}},g=n.select(this).selectAll("g.layer").data(o);g.enter().append("g").attr({class:"layer"});var m=g.selectAll("path.mark").data((function(t,e){return t}));m.enter().append("path").attr({class:"mark"}),m.style(d).each(c[e.geometryType]),m.exit().remove(),g.exit().remove()}))}return a.config=function(e){return arguments.length?(e.forEach((function(e,r){t[r]||(t[r]={}),i(t[r],o.PolyChart.defaultConfig()),i(t[r],e)})),this):t},a.getColorScale=function(){},n.rebind(a,e,"on"),a},o.PolyChart.defaultConfig=function(){return{data:{name:"geom1",t:[[1,2,3,4]],r:[[1,2,3,4]],dotType:"circle",dotSize:64,dotVisible:!1,barWidth:20,color:"#ffa500",strokeSize:1,strokeColor:"silver",strokeDash:"solid",opacity:1,index:0,visible:!0,visibleInLegend:!0},geometryConfig:{geometry:"LinePlot",geometryType:"arc",direction:"clockwise",orientation:0,container:"body",radialScale:null,angularScale:null,colorScale:n.scale.category20()}}},o.BarChart=function(){return o.PolyChart()},o.BarChart.defaultConfig=function(){return{geometryConfig:{geometryType:"bar"}}},o.AreaChart=function(){return o.PolyChart()},o.AreaChart.defaultConfig=function(){return{geometryConfig:{geometryType:"arc"}}},o.DotPlot=function(){return o.PolyChart()},o.DotPlot.defaultConfig=function(){return{geometryConfig:{geometryType:"dot",dotType:"circle"}}},o.LinePlot=function(){return o.PolyChart()},o.LinePlot.defaultConfig=function(){return{geometryConfig:{geometryType:"line"}}},o.Legend=function(){var t=o.Legend.defaultConfig(),e=n.dispatch("hover");function r(){var e=t.legendConfig,a=t.data.map((function(t,r){return[].concat(t).map((function(t,n){var a=i({},e.elements[r]);return a.name=t,a.color=[].concat(e.elements[r].color)[n],a}))})),o=n.merge(a);o=o.filter((function(t,r){return e.elements[r]&&(e.elements[r].visibleInLegend||"undefined"==typeof e.elements[r].visibleInLegend)})),e.reverseOrder&&(o=o.reverse());var s=e.container;("string"==typeof s||s.nodeName)&&(s=n.select(s));var l=o.map((function(t,e){return t.color})),c=e.fontSize,u=null==e.isContinuous?"number"==typeof o[0]:e.isContinuous,f=u?e.height:c*o.length,h=s.classed("legend-group",!0).selectAll("svg").data([0]),p=h.enter().append("svg").attr({width:300,height:f+c,xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",version:"1.1"});p.append("g").classed("legend-axis",!0),p.append("g").classed("legend-marks",!0);var d=n.range(o.length),g=n.scale[u?"linear":"ordinal"]().domain(d).range(l),m=n.scale[u?"linear":"ordinal"]().domain(d)[u?"range":"rangePoints"]([0,f]);if(u){var v=h.select(".legend-marks").append("defs").append("linearGradient").attr({id:"grad1",x1:"0%",y1:"0%",x2:"0%",y2:"100%"}).selectAll("stop").data(l);v.enter().append("stop"),v.attr({offset:function(t,e){return e/(l.length-1)*100+"%"}}).style({"stop-color":function(t,e){return t}}),h.append("rect").classed("legend-mark",!0).attr({height:e.height,width:e.colorBandWidth,fill:"url(#grad1)"})}else{var y=h.select(".legend-marks").selectAll("path.legend-mark").data(o);y.enter().append("path").classed("legend-mark",!0),y.attr({transform:function(t,e){return"translate("+[c/2,m(e)+c/2]+")"},d:function(t,e){var r,i,a,o=t.symbol;return a=3*(i=c),"line"===(r=o)?"M"+[[-i/2,-i/12],[i/2,-i/12],[i/2,i/12],[-i/2,i/12]]+"Z":-1!=n.svg.symbolTypes.indexOf(r)?n.svg.symbol().type(r).size(a)():n.svg.symbol().type("square").size(a)()},fill:function(t,e){return g(e)}}),y.exit().remove()}var x=n.svg.axis().scale(m).orient("right"),b=h.select("g.legend-axis").attr({transform:"translate("+[u?e.colorBandWidth:c,c/2]+")"}).call(x);return b.selectAll(".domain").style({fill:"none",stroke:"none"}),b.selectAll("line").style({fill:"none",stroke:u?e.textColor:"none"}),b.selectAll("text").style({fill:e.textColor,"font-size":e.fontSize}).text((function(t,e){return o[e].name})),r}return r.config=function(e){return arguments.length?(i(t,e),this):t},n.rebind(r,e,"on"),r},o.Legend.defaultConfig=function(t,e){return{data:["a","b","c"],legendConfig:{elements:[{symbol:"line",color:"red"},{symbol:"square",color:"yellow"},{symbol:"diamond",color:"limegreen"}],height:150,colorBandWidth:30,fontSize:12,container:"body",isContinuous:null,textColor:"grey",reverseOrder:!1}}},o.tooltipPanel=function(){var t,e,r,a={container:null,hasTick:!1,fontSize:12,color:"white",padding:5},s="tooltip-"+o.tooltipPanel.uid++,l=10,c=function(){var n=(t=a.container.selectAll("g."+s).data([0])).enter().append("g").classed(s,!0).style({"pointer-events":"none",display:"none"});return r=n.append("path").style({fill:"white","fill-opacity":.9}).attr({d:"M0 0"}),e=n.append("text").attr({dx:a.padding+l,dy:.3*+a.fontSize}),c};return c.text=function(i){var o=n.hsl(a.color).l,s=o>=.5?"#aaa":"white",u=o>=.5?"black":"white",f=i||"";e.style({fill:u,"font-size":a.fontSize+"px"}).text(f);var h=a.padding,p=e.node().getBBox(),d={fill:a.color,stroke:s,"stroke-width":"2px"},g=p.width+2*h+l,m=p.height+2*h;return r.attr({d:"M"+[[l,-m/2],[l,-m/4],[a.hasTick?0:l,0],[l,m/4],[l,m/2],[g,m/2],[g,-m/2]].join("L")+"Z"}).style(d),t.attr({transform:"translate("+[l,-m/2+2*h]+")"}),t.style({display:"block"}),c},c.move=function(e){if(t)return t.attr({transform:"translate("+[e[0],e[1]]+")"}).style({display:"block"}),c},c.hide=function(){if(t)return t.style({display:"none"}),c},c.show=function(){if(t)return t.style({display:"block"}),c},c.config=function(t){return i(a,t),c},c},o.tooltipPanel.uid=1,o.adapter={},o.adapter.plotly=function(){var t={convert:function(t,e){var r={};if(t.data&&(r.data=t.data.map((function(t,r){var n=i({},t);return[[n,["marker","color"],["color"]],[n,["marker","opacity"],["opacity"]],[n,["marker","line","color"],["strokeColor"]],[n,["marker","line","dash"],["strokeDash"]],[n,["marker","line","width"],["strokeSize"]],[n,["marker","symbol"],["dotType"]],[n,["marker","size"],["dotSize"]],[n,["marker","barWidth"],["barWidth"]],[n,["line","interpolation"],["lineInterpolation"]],[n,["showlegend"],["visibleInLegend"]]].forEach((function(t,r){o.util.translator.apply(null,t.concat(e))})),e||delete n.marker,e&&delete n.groupId,e?("LinePlot"===n.geometry?(n.type="scatter",!0===n.dotVisible?(delete n.dotVisible,n.mode="lines+markers"):n.mode="lines"):"DotPlot"===n.geometry?(n.type="scatter",n.mode="markers"):"AreaChart"===n.geometry?n.type="area":"BarChart"===n.geometry&&(n.type="bar"),delete n.geometry):("scatter"===n.type?"lines"===n.mode?n.geometry="LinePlot":"markers"===n.mode?n.geometry="DotPlot":"lines+markers"===n.mode&&(n.geometry="LinePlot",n.dotVisible=!0):"area"===n.type?n.geometry="AreaChart":"bar"===n.type&&(n.geometry="BarChart"),delete n.mode,delete n.type),n})),!e&&t.layout&&"stack"===t.layout.barmode)){var a=o.util.duplicates(r.data.map((function(t,e){return t.geometry})));r.data.forEach((function(t,e){var n=a.indexOf(t.geometry);-1!=n&&(r.data[e].groupId=n)}))}if(t.layout){var s=i({},t.layout);if([[s,["plot_bgcolor"],["backgroundColor"]],[s,["showlegend"],["showLegend"]],[s,["radialaxis"],["radialAxis"]],[s,["angularaxis"],["angularAxis"]],[s.angularaxis,["showline"],["gridLinesVisible"]],[s.angularaxis,["showticklabels"],["labelsVisible"]],[s.angularaxis,["nticks"],["ticksCount"]],[s.angularaxis,["tickorientation"],["tickOrientation"]],[s.angularaxis,["ticksuffix"],["ticksSuffix"]],[s.angularaxis,["range"],["domain"]],[s.angularaxis,["endpadding"],["endPadding"]],[s.radialaxis,["showline"],["gridLinesVisible"]],[s.radialaxis,["tickorientation"],["tickOrientation"]],[s.radialaxis,["ticksuffix"],["ticksSuffix"]],[s.radialaxis,["range"],["domain"]],[s.angularAxis,["showline"],["gridLinesVisible"]],[s.angularAxis,["showticklabels"],["labelsVisible"]],[s.angularAxis,["nticks"],["ticksCount"]],[s.angularAxis,["tickorientation"],["tickOrientation"]],[s.angularAxis,["ticksuffix"],["ticksSuffix"]],[s.angularAxis,["range"],["domain"]],[s.angularAxis,["endpadding"],["endPadding"]],[s.radialAxis,["showline"],["gridLinesVisible"]],[s.radialAxis,["tickorientation"],["tickOrientation"]],[s.radialAxis,["ticksuffix"],["ticksSuffix"]],[s.radialAxis,["range"],["domain"]],[s.font,["outlinecolor"],["outlineColor"]],[s.legend,["traceorder"],["reverseOrder"]],[s,["labeloffset"],["labelOffset"]],[s,["defaultcolorrange"],["defaultColorRange"]]].forEach((function(t,r){o.util.translator.apply(null,t.concat(e))})),e?("undefined"!=typeof s.tickLength&&(s.angularaxis.ticklen=s.tickLength,delete s.tickLength),s.tickColor&&(s.angularaxis.tickcolor=s.tickColor,delete s.tickColor)):(s.angularAxis&&"undefined"!=typeof s.angularAxis.ticklen&&(s.tickLength=s.angularAxis.ticklen),s.angularAxis&&"undefined"!=typeof s.angularAxis.tickcolor&&(s.tickColor=s.angularAxis.tickcolor)),s.legend&&"boolean"!=typeof s.legend.reverseOrder&&(s.legend.reverseOrder="normal"!=s.legend.reverseOrder),s.legend&&"boolean"==typeof s.legend.traceorder&&(s.legend.traceorder=s.legend.traceorder?"reversed":"normal",delete s.legend.reverseOrder),s.margin&&"undefined"!=typeof s.margin.t){var l=["t","r","b","l","pad"],c=["top","right","bottom","left","pad"],u={};n.entries(s.margin).forEach((function(t,e){u[c[l.indexOf(t.key)]]=t.value})),s.margin=u}e&&(delete s.needsEndSpacing,delete s.minorTickColor,delete s.minorTicks,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksCount,delete s.angularaxis.ticksStep,delete s.angularaxis.rewriteTicks,delete s.angularaxis.nticks,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksCount,delete s.radialaxis.ticksStep,delete s.radialaxis.rewriteTicks,delete s.radialaxis.nticks),r.layout=s}return r}};return t}},{"../../../constants/alignment":745,"../../../lib":778,d3:169}],901:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../../lib"),a=t("../../../components/color"),o=t("./micropolar"),s=t("./undo_manager"),l=i.extendDeepAll,c=e.exports={};c.framework=function(t){var e,r,i,a,u,f=new s;function h(r,s){return s&&(u=s),n.select(n.select(u).node().parentNode).selectAll(".svg-container>*:not(.chart-root)").remove(),e=e?l(e,r):r,i||(i=o.Axis()),a=o.adapter.plotly().convert(e),i.config(a).render(u),t.data=e.data,t.layout=e.layout,c.fillLayout(t),e}return h.isPolar=!0,h.svg=function(){return i.svg()},h.getConfig=function(){return e},h.getLiveConfig=function(){return o.adapter.plotly().convert(i.getLiveConfig(),!0)},h.getLiveScales=function(){return{t:i.angularScale(),r:i.radialScale()}},h.setUndoPoint=function(){var t,n,i=this,a=o.util.cloneJson(e);t=a,n=r,f.add({undo:function(){n&&i(n)},redo:function(){i(t)}}),r=o.util.cloneJson(a)},h.undo=function(){f.undo()},h.redo=function(){f.redo()},h},c.fillLayout=function(t){var e=n.select(t).selectAll(".plot-container"),r=e.selectAll(".svg-container"),i=t.framework&&t.framework.svg&&t.framework.svg(),o={width:800,height:600,paper_bgcolor:a.background,_container:e,_paperdiv:r,_paper:i};t._fullLayout=l(o,t.layout)}},{"../../../components/color":643,"../../../lib":778,"./micropolar":900,"./undo_manager":902,d3:169}],902:[function(t,e,r){"use strict";e.exports=function(){var t,e=[],r=-1,n=!1;function i(t,e){return t?(n=!0,t[e](),n=!1,this):this}return{add:function(t){return n||(e.splice(r+1,e.length-r),e.push(t),r=e.length-1),this},setCallback:function(e){t=e},undo:function(){var n=e[r];return n?(i(n,"undo"),r-=1,t&&t(n.undo),this):this},redo:function(){var n=e[r+1];return n?(i(n,"redo"),r+=1,t&&t(n.redo),this):this},clear:function(){e=[],r=-1},hasUndo:function(){return-1!==r},hasRedo:function(){return r=90||s>90&&l>=450?1:u<=0&&h<=0?0:Math.max(u,h);e=s<=180&&l>=180||s>180&&l>=540?-1:c>=0&&f>=0?0:Math.min(c,f);r=s<=270&&l>=270||s>270&&l>=630?-1:u>=0&&h>=0?0:Math.min(u,h);n=l>=360?1:c<=0&&f<=0?0:Math.max(c,f);return[e,r,n,i]}(p),b=x[2]-x[0],_=x[3]-x[1],w=h/f,T=Math.abs(_/b);w>T?(d=f,y=(h-(g=f*T))/n.h/2,m=[o[0],o[1]],v=[s[0]+y,s[1]-y]):(g=h,y=(f-(d=h/T))/n.w/2,m=[o[0]+y,o[1]-y],v=[s[0],s[1]]),this.xLength2=d,this.yLength2=g,this.xDomain2=m,this.yDomain2=v;var k=this.xOffset2=n.l+n.w*m[0],M=this.yOffset2=n.t+n.h*(1-v[1]),A=this.radius=d/b,S=this.innerRadius=e.hole*A,E=this.cx=k-A*x[0],C=this.cy=M+A*x[3],P=this.cxx=E-k,z=this.cyy=C-M;this.radialAxis=this.mockAxis(t,e,i,{_id:"x",side:{counterclockwise:"top",clockwise:"bottom"}[i.side],_realSide:i.side,domain:[S/n.w,A/n.w]}),this.angularAxis=this.mockAxis(t,e,a,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(t,e),this.updateAngularAxis(t,e),this.updateRadialAxis(t,e),this.updateRadialAxisTitle(t,e),this.xaxis=this.mockCartesianAxis(t,e,{_id:"x",domain:m}),this.yaxis=this.mockCartesianAxis(t,e,{_id:"y",domain:v});var O=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",O).attr("transform",l(P,z)),r.frontplot.attr("transform",l(k,M)).call(u.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",O).attr("transform",l(E,C)).call(c.fill,e.bgcolor)},O.mockAxis=function(t,e,r,n){var i=o.extendFlat({},r,n);return d(i,e,t),i},O.mockCartesianAxis=function(t,e,r){var n=this,i=r._id,a=o.extendFlat({type:"linear"},r);p(a,t);var s={x:[0,2],y:[1,3]};return a.setRange=function(){var t=n.sectorBBox,r=s[i],o=n.radialAxis._rl,l=(o[1]-o[0])/(1-e.hole);a.range=[t[r[0]]*l,t[r[1]]*l]},a.isPtWithinRange="x"===i?function(t){return n.isPtInside(t)}:function(){return!0},a.setRange(),a.setScale(),a},O.doAutoRange=function(t,e){var r=this.gd,n=this.radialAxis,i=e.radialaxis;n.setScale(),g(r,n);var a=n.range;i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,"gregorian"),n.r2l(a[1],null,"gregorian")]},O.updateRadialAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=e.radialaxis,g=L(e.sector[0],360),m=r.radialAxis,v=u90&&g<=270&&(m.tickangle=180);var y=function(t){return l(m.l2p(t.x)+u,0)},x=D(d);if(r.radialTickLayout!==x&&(i["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=x),v){m.setScale();var b=h.calcTicks(m),_=h.clipEnds(m,b),w=h.getTickSigns(m)[2];h.drawTicks(n,m,{vals:b,layer:i["radial-axis"],path:h.makeTickPath(m,0,w),transFn:y,crisp:!1}),h.drawGrid(n,m,{vals:_,layer:i["radial-grid"],path:function(t){return r.pathArc(m.r2p(t.x)+u)},transFn:o.noop,crisp:!1}),h.drawLabels(n,m,{vals:b,layer:i["radial-axis"],transFn:y,labelFns:h.makeLabelFns(m,0)})}var T=r.radialAxisAngle=r.vangles?P(R(I(d.angle),r.vangles)):d.angle,k=l(f,p),M=k+s(-T);F(i["radial-axis"],v&&(d.showticklabels||d.ticks),{transform:M}),F(i["radial-grid"],v&&d.showgrid,{transform:k}),F(i["radial-line"].select("line"),v&&d.showline,{x1:u,y1:0,x2:a,y2:0,transform:M}).attr("stroke-width",d.linewidth).call(c.stroke,d.linecolor)},O.updateRadialAxisTitle=function(t,e,r){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=e.radialaxis,l=this.id+"title",c=void 0!==r?r:this.radialAxisAngle,f=I(c),h=Math.cos(f),p=Math.sin(f),d=0;if(s.title){var g=u.bBox(this.layers["radial-axis"].node()).height,m=s.title.font.size;d="counterclockwise"===s.side?-g-.4*m:g+.8*m}this.layers["radial-axis-title"]=x.draw(n,l,{propContainer:s,propName:this.id+".radialaxis.title",placeholder:C(n,"Click to enter radial axis title"),attributes:{x:a+i/2*h+d*p,y:o-i/2*p+d*h,"text-anchor":"middle"},transform:{rotate:-c}})},O.updateAngularAxis=function(t,e){var r=this,n=r.gd,i=r.layers,a=r.radius,u=r.innerRadius,f=r.cx,p=r.cy,d=e.angularaxis,g=r.angularAxis;r.fillViewInitialKey("angularaxis.rotation",d.rotation),g.setGeometry(),g.setScale();var m=function(t){return g.t2g(t.x)};"linear"===g.type&&"radians"===g.thetaunit&&(g.tick0=P(g.tick0),g.dtick=P(g.dtick));var v=function(t){return l(f+a*Math.cos(t),p-a*Math.sin(t))},y=h.makeLabelFns(g,0).labelStandoff,x={xFn:function(t){var e=m(t);return Math.cos(e)*y},yFn:function(t){var e=m(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(y+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*A)},anchorFn:function(t){var e=m(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},heightFn:function(t,e,r){var n=m(t);return-.5*(1+Math.sin(n))*r}},b=D(d);r.angularTickLayout!==b&&(i["angular-axis"].selectAll("."+g._id+"tick").remove(),r.angularTickLayout=b);var _,w=h.calcTicks(g);if("linear"===e.gridshape?(_=w.map(m),o.angleDelta(_[0],_[1])<0&&(_=_.slice().reverse())):_=null,r.vangles=_,"category"===g.type&&(w=w.filter((function(t){return o.isAngleInsideSector(m(t),r.sectorInRad)}))),g.visible){var T="inside"===g.ticks?-1:1,k=(g.linewidth||1)/2;h.drawTicks(n,g,{vals:w,layer:i["angular-axis"],path:"M"+T*k+",0h"+T*g.ticklen,transFn:function(t){var e=m(t);return v(e)+s(-P(e))},crisp:!1}),h.drawGrid(n,g,{vals:w,layer:i["angular-grid"],path:function(t){var e=m(t),r=Math.cos(e),n=Math.sin(e);return"M"+[f+u*r,p-u*n]+"L"+[f+a*r,p-a*n]},transFn:o.noop,crisp:!1}),h.drawLabels(n,g,{vals:w,layer:i["angular-axis"],repositionOnUpdate:!0,transFn:function(t){return v(m(t))},labelFns:x})}F(i["angular-line"].select("path"),d.showline,{d:r.pathSubplot(),transform:l(f,p)}).attr("stroke-width",d.linewidth).call(c.stroke,d.linecolor)},O.updateFx=function(t,e){this.gd._context.staticPlot||(this.updateAngularDrag(t),this.updateRadialDrag(t,e,0),this.updateRadialDrag(t,e,1),this.updateMainDrag(t))},O.updateMainDrag=function(t){var e,r,s=this,c=s.gd,u=s.layers,f=t._zoomlayer,h=S.MINZOOM,p=S.OFFEDGE,d=s.radius,g=s.innerRadius,x=s.cx,T=s.cy,k=s.cxx,M=s.cyy,A=s.sectorInRad,C=s.vangles,L=s.radialAxis,I=E.clampTiny,P=E.findXYatLength,z=E.findEnclosingVertexAngles,O=S.cornerHalfWidth,D=S.cornerLen/2,R=m.makeDragger(u,"path","maindrag","crosshair");n.select(R).attr("d",s.pathSubplot()).attr("transform",l(x,T));var F,B,N,j,U,V,q,H,G,Y={element:R,gd:c,subplot:s.id,plotinfo:{id:s.id,xaxis:s.xaxis,yaxis:s.yaxis},xaxes:[s.xaxis],yaxes:[s.yaxis]};function W(t,e){return Math.sqrt(t*t+e*e)}function X(t,e){return W(t-k,e-M)}function Z(t,e){return Math.atan2(M-e,t-k)}function J(t,e){return[t*Math.cos(e),t*Math.sin(-e)]}function K(t,e){if(0===t)return s.pathSector(2*O);var r=D/t,n=e-r,i=e+r,a=Math.max(0,Math.min(t,d)),o=a-O,l=a+O;return"M"+J(o,n)+"A"+[o,o]+" 0,0,0 "+J(o,i)+"L"+J(l,i)+"A"+[l,l]+" 0,0,1 "+J(l,n)+"Z"}function Q(t,e,r){if(0===t)return s.pathSector(2*O);var n,i,a=J(t,e),o=J(t,r),l=I((a[0]+o[0])/2),c=I((a[1]+o[1])/2);if(l&&c){var u=c/l,f=-1/u,h=P(O,u,l,c);n=P(D,f,h[0][0],h[0][1]),i=P(D,f,h[1][0],h[1][1])}else{var p,d;c?(p=D,d=O):(p=O,d=D),n=[[l-p,c-d],[l+p,c-d]],i=[[l-p,c+d],[l+p,c+d]]}return"M"+n.join("L")+"L"+i.reverse().join("L")+"Z"}function $(t,e){return e=Math.max(Math.min(e,d),g),th?(t-1&&1===t&&_(e,c,[s.xaxis],[s.yaxis],s.id,Y),r.indexOf("event")>-1&&y.click(c,e,s.id)}Y.prepFn=function(t,n,a){var l=c._fullLayout.dragmode,u=R.getBoundingClientRect();c._fullLayout._calcInverseTransform(c);var h=c._fullLayout._invTransform;e=c._fullLayout._invScaleX,r=c._fullLayout._invScaleY;var p=o.apply3DTransform(h)(n-u.left,a-u.top);if(F=p[0],B=p[1],C){var g=E.findPolygonOffset(d,A[0],A[1],C);F+=k+g[0],B+=M+g[1]}switch(l){case"zoom":Y.moveFn=C?nt:et,Y.clickFn=ot,Y.doneFn=it,function(){N=null,j=null,U=s.pathSubplot(),V=!1;var t=c._fullLayout[s.id];q=i(t.bgcolor).getLuminance(),(H=m.makeZoombox(f,q,x,T,U)).attr("fill-rule","evenodd"),G=m.makeCorners(f,x,T),w(c)}();break;case"select":case"lasso":b(t,n,a,Y,l)}},R.onmousemove=function(t){y.hover(c,t,s.id),c._fullLayout._lasthover=R,c._fullLayout._hoversubplot=s.id},R.onmouseout=function(t){c._dragging||v.unhover(c,t)},v.init(Y)},O.updateRadialDrag=function(t,e,r){var i=this,c=i.gd,u=i.layers,f=i.radius,h=i.innerRadius,p=i.cx,d=i.cy,g=i.radialAxis,y=S.radialDragBoxSize,x=y/2;if(g.visible){var b,_,T,A=I(i.radialAxisAngle),E=g._rl,C=E[0],L=E[1],z=E[r],O=.75*(E[1]-E[0])/(1-e.hole)/f;r?(b=p+(f+x)*Math.cos(A),_=d-(f+x)*Math.sin(A),T="radialdrag"):(b=p+(h-x)*Math.cos(A),_=d-(h-x)*Math.sin(A),T="radialdrag-inner");var D,B,N,j=m.makeRectDragger(u,T,"crosshair",-x,-x,y,y),U={element:j,gd:c};F(n.select(j),g.visible&&h0==(r?N>C:Nn?function(t){return t<=0}:function(t){return t>=0};t.c2g=function(r){var n=t.c2l(r)-e;return(s(n)?n:0)+o},t.g2c=function(r){return t.l2c(r+e-o)},t.g2p=function(t){return t*a},t.c2p=function(e){return t.g2p(t.c2g(e))}}}(t,e);break;case"angularaxis":!function(t,e){var r=t.type;if("linear"===r){var i=t.d2c,s=t.c2d;t.d2c=function(t,e){return function(t,e){return"degrees"===e?a(t):t}(i(t),e)},t.c2d=function(t,e){return s(function(t,e){return"degrees"===e?o(t):t}(t,e))}}t.makeCalcdata=function(e,i){var a,o,s=e[i],l=e._length,c=function(r){return t.d2c(r,e.thetaunit)};if(s){if(n.isTypedArray(s)&&"linear"===r){if(l===s.length)return s;if(s.subarray)return s.subarray(0,l)}for(a=new Array(l),o=0;o0){for(var n=[],i=0;i=u&&(p.min=0,g.min=0,m.min=0,t.aaxis&&delete t.aaxis.min,t.baxis&&delete t.baxis.min,t.caxis&&delete t.caxis.min)}function d(t,e,r,n){var i=f[e._name];function o(r,n){return a.coerce(t,e,i,r,n)}o("uirevision",n.uirevision),e.type="linear";var h=o("color"),p=h!==i.color.dflt?h:r.font.color,d=e._name.charAt(0).toUpperCase(),g="Component "+d,m=o("title.text",g);e._hovertitle=m===g?m:d,a.coerceFont(o,"title.font",{family:r.font.family,size:Math.round(1.2*r.font.size),color:p}),o("min"),c(t,e,o,"linear"),s(t,e,o,"linear",{}),l(t,e,o,{outerTicks:!0}),o("showticklabels")&&(a.coerceFont(o,"tickfont",{family:r.font.family,size:r.font.size,color:p}),o("tickangle"),o("tickformat")),u(t,e,o,{dfltColor:h,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),o("hoverformat"),o("layer")}e.exports=function(t,e,r){o(t,e,r,{type:"ternary",attributes:f,handleDefaults:p,font:e.font,paper_bgcolor:e.paper_bgcolor})}},{"../../components/color":643,"../../lib":778,"../../plot_api/plot_template":817,"../cartesian/line_grid_defaults":844,"../cartesian/tick_label_defaults":849,"../cartesian/tick_mark_defaults":850,"../cartesian/tick_value_defaults":851,"../subplot_defaults":905,"./layout_attributes":908}],910:[function(t,e,r){"use strict";var n=t("d3"),i=t("tinycolor2"),a=t("../../registry"),o=t("../../lib"),s=o.strTranslate,l=o._,c=t("../../components/color"),u=t("../../components/drawing"),f=t("../cartesian/set_convert"),h=t("../../lib/extend").extendFlat,p=t("../plots"),d=t("../cartesian/axes"),g=t("../../components/dragelement"),m=t("../../components/fx"),v=t("../../components/dragelement/helpers"),y=v.freeMode,x=v.rectMode,b=t("../../components/titles"),_=t("../cartesian/select").prepSelect,w=t("../cartesian/select").selectOnClick,T=t("../cartesian/select").clearSelect,k=t("../cartesian/select").clearSelectionsCache,M=t("../cartesian/constants");function A(t,e){this.id=t.id,this.graphDiv=t.graphDiv,this.init(e),this.makeFramework(e),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}e.exports=A;var S=A.prototype;S.init=function(t){this.container=t._ternarylayer,this.defs=t._defs,this.layoutId=t._uid,this.traceHash={},this.layers={}},S.plot=function(t,e){var r=e[this.id],n=e._size;this._hasClipOnAxisFalse=!1;for(var i=0;iE*b?i=(a=b)*E:a=(i=x)/E,o=v*i/x,l=y*a/b,r=e.l+e.w*g-i/2,n=e.t+e.h*(1-m)-a/2,p.x0=r,p.y0=n,p.w=i,p.h=a,p.sum=_,p.xaxis={type:"linear",range:[w+2*k-_,_-w-2*T],domain:[g-o/2,g+o/2],_id:"x"},f(p.xaxis,p.graphDiv._fullLayout),p.xaxis.setScale(),p.xaxis.isPtWithinRange=function(t){return t.a>=p.aaxis.range[0]&&t.a<=p.aaxis.range[1]&&t.b>=p.baxis.range[1]&&t.b<=p.baxis.range[0]&&t.c>=p.caxis.range[1]&&t.c<=p.caxis.range[0]},p.yaxis={type:"linear",range:[w,_-T-k],domain:[m-l/2,m+l/2],_id:"y"},f(p.yaxis,p.graphDiv._fullLayout),p.yaxis.setScale(),p.yaxis.isPtWithinRange=function(){return!0};var M=p.yaxis.domain[0],A=p.aaxis=h({},t.aaxis,{range:[w,_-T-k],side:"left",tickangle:(+t.aaxis.tickangle||0)-30,domain:[M,M+l*E],anchor:"free",position:0,_id:"y",_length:i});f(A,p.graphDiv._fullLayout),A.setScale();var S=p.baxis=h({},t.baxis,{range:[_-w-k,T],side:"bottom",domain:p.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});f(S,p.graphDiv._fullLayout),S.setScale();var C=p.caxis=h({},t.caxis,{range:[_-w-T,k],side:"right",tickangle:(+t.caxis.tickangle||0)+30,domain:[M,M+l*E],anchor:"free",position:0,_id:"y",_length:i});f(C,p.graphDiv._fullLayout),C.setScale();var L="M"+r+","+(n+a)+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDef.select("path").attr("d",L),p.layers.plotbg.select("path").attr("d",L);var I="M0,"+a+"h"+i+"l-"+i/2+",-"+a+"Z";p.clipDefRelative.select("path").attr("d",I);var P=s(r,n);p.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),p.clipDefRelative.select("path").attr("transform",null);var z=s(r-S._offset,n+a);p.layers.baxis.attr("transform",z),p.layers.bgrid.attr("transform",z);var O=s(r+i/2,n)+"rotate(30)"+s(0,-A._offset);p.layers.aaxis.attr("transform",O),p.layers.agrid.attr("transform",O);var D=s(r+i/2,n)+"rotate(-30)"+s(0,-C._offset);p.layers.caxis.attr("transform",D),p.layers.cgrid.attr("transform",D),p.drawAxes(!0),p.layers.aline.select("path").attr("d",A.showline?"M"+r+","+(n+a)+"l"+i/2+",-"+a:"M0,0").call(c.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),p.layers.bline.select("path").attr("d",S.showline?"M"+r+","+(n+a)+"h"+i:"M0,0").call(c.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),p.layers.cline.select("path").attr("d",C.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+a:"M0,0").call(c.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),p.graphDiv._context.staticPlot||p.initInteractions(),u.setClipUrl(p.layers.frontplot,p._hasClipOnAxisFalse?null:p.clipId,p.graphDiv)},S.drawAxes=function(t){var e=this.graphDiv,r=this.id.substr(7)+"title",n=this.layers,i=this.aaxis,a=this.baxis,o=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(o),t){var s=Math.max(i.showticklabels?i.tickfont.size/2:0,(o.showticklabels?.75*o.tickfont.size:0)+("outside"===o.ticks?.87*o.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;n["a-title"]=b.draw(e,"a"+r,{propContainer:i,propName:this.id+".aaxis.title",placeholder:l(e,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-i.title.font.size/3-s,"text-anchor":"middle"}}),n["b-title"]=b.draw(e,"b"+r,{propContainer:a,propName:this.id+".baxis.title",placeholder:l(e,"Click to enter Component B title"),attributes:{x:this.x0-c,y:this.y0+this.h+.83*a.title.font.size+c,"text-anchor":"middle"}}),n["c-title"]=b.draw(e,"c"+r,{propContainer:o,propName:this.id+".caxis.title",placeholder:l(e,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*o.title.font.size+c,"text-anchor":"middle"}})}},S.drawAx=function(t){var e,r=this.graphDiv,n=t._name,i=n.charAt(0),a=t._id,s=this.layers[n],l=i+"tickLayout",c=(e=t).ticks+String(e.ticklen)+String(e.showticklabels);this[l]!==c&&(s.selectAll("."+a+"tick").remove(),this[l]=c),t.setScale();var u=d.calcTicks(t),f=d.clipEnds(t,u),h=d.makeTransTickFn(t),p=d.getTickSigns(t)[2],g=o.deg2rad(30),m=p*(t.linewidth||1)/2,v=p*t.ticklen,y=this.w,x=this.h,b="b"===i?"M0,"+m+"l"+Math.sin(g)*v+","+Math.cos(g)*v:"M"+m+",0l"+Math.cos(g)*v+","+-Math.sin(g)*v,_={a:"M0,0l"+x+",-"+y/2,b:"M0,0l-"+y/2+",-"+x,c:"M0,0l-"+x+","+y/2}[i];d.drawTicks(r,t,{vals:"inside"===t.ticks?f:u,layer:s,path:b,transFn:h,crisp:!1}),d.drawGrid(r,t,{vals:f,layer:this.layers[i+"grid"],path:_,transFn:h,crisp:!1}),d.drawLabels(r,t,{vals:u,layer:s,transFn:h,labelFns:d.makeLabelFns(t,0,30)})};var C=M.MINZOOM/2+.87,L="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(.87*C+4.5)+"l2.6,1.5l-"+C/2+","+.87*C+"Z",I="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-2.6,1.5l"+C/2+","+.87*C+"Z",P="m0,1l"+C/2+","+.87*C+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(.87*C+4.5)+"l-"+(C/2+2.6)+","+(.87*C+4.5)+"l2.6,1.5l"+C/2+",-"+.87*C+"Z",z=!0;function O(t){n.select(t).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearSelect=function(){k(this.dragOptions),T(this.dragOptions.gd)},S.initInteractions=function(){var t,e,r,n,f,h,p,d,v,b,T,k,A=this,S=A.layers.plotbg.select("path").node(),C=A.graphDiv,D=C._fullLayout._zoomlayer;function R(t){var e={};return e[A.id+".aaxis.min"]=t.a,e[A.id+".baxis.min"]=t.b,e[A.id+".caxis.min"]=t.c,e}function F(t,e){var r=C._fullLayout.clickmode;O(C),2===t&&(C.emit("plotly_doubleclick",null),a.call("_guiRelayout",C,R({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===t&&w(e,C,[A.xaxis],[A.yaxis],A.id,A.dragOptions),r.indexOf("event")>-1&&m.click(C,e,A.id)}function B(t,e){return 1-e/A.h}function N(t,e){return 1-(t+(A.h-e)/Math.sqrt(3))/A.w}function j(t,e){return(t-(A.h-e)/Math.sqrt(3))/A.w}function U(i,a){var o=r+i*t,s=n+a*e,l=Math.max(0,Math.min(1,B(0,n),B(0,s))),c=Math.max(0,Math.min(1,N(r,n),N(o,s))),u=Math.max(0,Math.min(1,j(r,n),j(o,s))),g=(l/2+u)*A.w,m=(1-l/2-c)*A.w,y=(g+m)/2,x=m-g,_=(1-l)*A.h,w=_-x/E;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),k.transition().style("opacity",1).duration(200),b=!0),C.emit("plotly_relayouting",R(p))}function V(){O(C),p!==f&&(a.call("_guiRelayout",C,R(p)),z&&C.data&&C._context.showTips&&(o.notifier(l(C,"Double-click to zoom back out"),"long"),z=!1))}function q(t,e){var r=t/A.xaxis._m,n=e/A.yaxis._m,i=[(p={a:f.a-n,b:f.b+(r+n)/2,c:f.c-(r-n)/2}).a,p.b,p.c].sort(o.sorterAsc),a=i.indexOf(p.a),l=i.indexOf(p.b),c=i.indexOf(p.c);i[0]<0&&(i[1]+i[0]/2<0?(i[2]+=i[0]+i[1],i[0]=i[1]=0):(i[2]+=i[0]/2,i[1]+=i[0]/2,i[0]=0),p={a:i[a],b:i[l],c:i[c]},e=(f.a-p.a)*A.yaxis._m,t=(f.c-p.c-f.b+p.b)*A.xaxis._m);var h=s(A.x0+t,A.y0+e);A.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var d=s(-t,-e);A.clipDefRelative.select("path").attr("transform",d),A.aaxis.range=[p.a,A.sum-p.b-p.c],A.baxis.range=[A.sum-p.a-p.c,p.b],A.caxis.range=[A.sum-p.a-p.b,p.c],A.drawAxes(!1),A._hasClipOnAxisFalse&&A.plotContainer.select(".scatterlayer").selectAll(".trace").call(u.hideOutsideRangePoints,A),C.emit("plotly_relayouting",R(p))}function H(){a.call("_guiRelayout",C,R(p))}this.dragOptions={element:S,gd:C,plotinfo:{id:A.id,domain:C._fullLayout[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis},subplot:A.id,prepFn:function(a,l,u){A.dragOptions.xaxes=[A.xaxis],A.dragOptions.yaxes=[A.yaxis],t=C._fullLayout._invScaleX,e=C._fullLayout._invScaleY;var g=A.dragOptions.dragmode=C._fullLayout.dragmode;y(g)?A.dragOptions.minDrag=1:A.dragOptions.minDrag=void 0,"zoom"===g?(A.dragOptions.moveFn=U,A.dragOptions.clickFn=F,A.dragOptions.doneFn=V,function(t,e,a){var l=S.getBoundingClientRect();r=e-l.left,n=a-l.top,C._fullLayout._calcInverseTransform(C);var u=C._fullLayout._invTransform,g=o.apply3DTransform(u)(r,n);r=g[0],n=g[1],f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,h=A.aaxis.range[1]-f.a,d=i(A.graphDiv._fullLayout[A.id].bgcolor).getLuminance(),v="M0,"+A.h+"L"+A.w/2+", 0L"+A.w+","+A.h+"Z",b=!1,T=D.append("path").attr("class","zoombox").attr("transform",s(A.x0,A.y0)).style({fill:d>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),k=D.append("path").attr("class","zoombox-corners").attr("transform",s(A.x0,A.y0)).style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),A.clearSelect(C)}(0,l,u)):"pan"===g?(A.dragOptions.moveFn=q,A.dragOptions.clickFn=F,A.dragOptions.doneFn=H,f={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},p=f,A.clearSelect(C)):(x(g)||y(g))&&_(a,l,u,A.dragOptions,g)}},S.onmousemove=function(t){m.hover(C,t,A.id),C._fullLayout._lasthover=S,C._fullLayout._hoversubplot=A.id},S.onmouseout=function(t){C._dragging||g.unhover(C,t)},g.init(this.dragOptions)}},{"../../components/color":643,"../../components/dragelement":662,"../../components/dragelement/helpers":661,"../../components/drawing":665,"../../components/fx":683,"../../components/titles":738,"../../lib":778,"../../lib/extend":768,"../../registry":911,"../cartesian/axes":828,"../cartesian/constants":834,"../cartesian/select":847,"../cartesian/set_convert":848,"../plots":891,d3:169,tinycolor2:576}],911:[function(t,e,r){"use strict";var n=t("./lib/loggers"),i=t("./lib/noop"),a=t("./lib/push_unique"),o=t("./lib/is_plain_object"),s=t("./lib/dom").addStyleRule,l=t("./lib/extend"),c=t("./plots/attributes"),u=t("./plots/layout_attributes"),f=l.extendFlat,h=l.extendDeepAll;function p(t){var e=t.name,i=t.categories,a=t.meta;if(r.modules[e])n.log("Type "+e+" already registered");else{r.subplotsRegistry[t.basePlotModule.name]||function(t){var e=t.name;if(r.subplotsRegistry[e])return void n.log("Plot type "+e+" already registered.");for(var i in v(t),r.subplotsRegistry[e]=t,r.componentsRegistry)b(i,t.name)}(t.basePlotModule);for(var o={},l=0;l-1&&(f[p[r]].title={text:""});for(r=0;r")?"":e.html(t).text()}));return e.remove(),r}(T),T=(T=T.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(c,"'"),i.isIE()&&(T=(T=(T=T.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),T}},{"../components/color":643,"../components/drawing":665,"../constants/xmlns_namespaces":754,"../lib":778,d3:169}],920:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;rf+c||!n(u))}for(var p=0;pa))return e}return void 0!==r?r:t.dflt},r.coerceColor=function(t,e,r){return i(e).isValid()?e:void 0!==r?r:t.dflt},r.coerceEnumerated=function(t,e,r){return t.coerceNumber&&(e=+e),-1!==t.values.indexOf(e)?e:void 0!==r?r:t.dflt},r.getValue=function(t,e){var r;return Array.isArray(t)?e0?i+=a:e<0&&(i-=a)}return n.inbox(r-e,i-e,b+(i-e)/(i-r)-1)}"h"===m.orientation?(a=r,s=e,u="y",f="x",h=S,p=A):(a=e,s=r,u="x",f="y",p=S,h=A);var E=t[u+"a"],C=t[f+"a"];d=Math.abs(E.r2c(E.range[1])-E.r2c(E.range[0]));var L=n.getDistanceFunction(i,h,p,(function(t){return(h(t)+p(t))/2}));if(n.getClosest(g,L,t),!1!==t.index&&g[t.index].p!==c){y||(T=function(t){return Math.min(_(t),t.p-v.bargroupwidth/2)},k=function(t){return Math.max(w(t),t.p+v.bargroupwidth/2)});var I=g[t.index],P=m.base?I.b+I.s:I.s;t[f+"0"]=t[f+"1"]=C.c2p(I[f],!0),t[f+"LabelVal"]=P;var z=v.extents[v.extents.round(I.p)];t[u+"0"]=E.c2p(y?T(I):z[0],!0),t[u+"1"]=E.c2p(y?k(I):z[1],!0);var O=void 0!==I.orig_p;return t[u+"LabelVal"]=O?I.orig_p:I.p,t.labelLabel=l(E,t[u+"LabelVal"]),t.valueLabel=l(C,t[f+"LabelVal"]),t.baseLabel=l(C,I.b),t.spikeDistance=(S(I)+function(t){return M(_(t),w(t))}(I))/2-b,t[u+"Spike"]=E.c2p(I.p,!0),o(I,m,t),t.hovertemplate=m.hovertemplate,t}}function f(t,e){var r=e.mcc||t.marker.color,n=e.mlcc||t.marker.line.color,i=s(t,e);return a.opacity(r)?r:a.opacity(n)&&i?n:void 0}e.exports={hoverPoints:function(t,e,r,n){var a=u(t,e,r,n);if(a){var o=a.cd,s=o[0].trace,l=o[a.index];return a.color=f(s,l),i.getComponentMethod("errorbars","hoverInfo")(l,s,a),[a]}},hoverOnBars:u,getTraceColor:f}},{"../../components/color":643,"../../components/fx":683,"../../constants/numerical":753,"../../lib":778,"../../plots/cartesian/axes":828,"../../registry":911,"./helpers":927}],929:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc").crossTraceCalc,colorbar:t("../scatter/marker_colorbar"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"bar",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},{"../../plots/cartesian":841,"../scatter/marker_colorbar":1205,"./arrays_to_calcdata":920,"./attributes":921,"./calc":922,"./cross_trace_calc":924,"./defaults":925,"./event_data":926,"./hover":928,"./layout_attributes":930,"./layout_defaults":931,"./plot":932,"./select":933,"./style":935}],930:[function(t,e,r){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],931:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../plots/cartesian/axes"),a=t("../../lib"),o=t("./layout_attributes");e.exports=function(t,e,r){function s(r,n){return a.coerce(t,e,o,r,n)}for(var l=!1,c=!1,u=!1,f={},h=s("barmode"),p=0;p0}function S(t){return"auto"===t?0:t}function E(t,e){var r=Math.PI/180*e,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:t.width*i+t.height*n,y:t.width*n+t.height*i}}function C(t,e,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor||"end",u="end"===c,f="start"===c,h=((a.leftToRight||0)+1)/2,p=1-h,d=i.width,g=i.height,m=Math.abs(e-t),v=Math.abs(n-r),y=m>2*_&&v>2*_?_:0;m-=2*y,v-=2*y;var x=S(l);"auto"!==l||d<=m&&g<=v||!(d>m||g>v)||(d>v||g>m)&&d.01?H:function(t,e,r){return r&&t===e?t:Math.abs(t-e)>=2?H(t):t>e?Math.ceil(t):Math.floor(t)};B=G(B,N,D),N=G(N,B,D),j=G(j,U,!D),U=G(U,j,!D)}var Y=M(a.ensureSingle(P,"path"),I,m,v);if(Y.style("vector-effect","non-scaling-stroke").attr("d",isNaN((N-B)*(U-j))||V&&t._context.staticPlot?"M0,0Z":"M"+B+","+j+"V"+U+"H"+N+"V"+j+"Z").call(l.setClipUrl,e.layerClipId,t),!I.uniformtext.mode&&R){var W=l.makePointStyleFns(f);l.singlePointStyle(c,Y,f,W,t)}!function(t,e,r,n,i,s,c,f,p,m,v){var w,T=e.xaxis,A=e.yaxis,L=t._fullLayout;function I(e,r,n){return a.ensureSingle(e,"text").text(r).attr({class:"bartext bartext-"+w,"text-anchor":"middle","data-notex":1}).call(l.font,n).call(o.convertToTspans,t)}var P=n[0].trace,z="h"===P.orientation,O=function(t,e,r,n,i){var o,s=e[0].trace;o=s.texttemplate?function(t,e,r,n,i){var o=e[0].trace,s=a.castOption(o,r,"texttemplate");if(!s)return"";var l,c,f,h,p="waterfall"===o.type,d="funnel"===o.type;"h"===o.orientation?(l="y",c=i,f="x",h=n):(l="x",c=n,f="y",h=i);function g(t){return u(h,+t,!0).text}var m=e[r],v={};v.label=m.p,v.labelLabel=v[l+"Label"]=(y=m.p,u(c,y,!0).text);var y;var x=a.castOption(o,m.i,"text");(0===x||x)&&(v.text=x);v.value=m.s,v.valueLabel=v[f+"Label"]=g(m.s);var _={};b(_,o,m.i),p&&(v.delta=+m.rawS||m.s,v.deltaLabel=g(v.delta),v.final=m.v,v.finalLabel=g(v.final),v.initial=v.final-v.delta,v.initialLabel=g(v.initial));d&&(v.value=m.s,v.valueLabel=g(v.value),v.percentInitial=m.begR,v.percentInitialLabel=a.formatPercent(m.begR),v.percentPrevious=m.difR,v.percentPreviousLabel=a.formatPercent(m.difR),v.percentTotal=m.sumR,v.percenTotalLabel=a.formatPercent(m.sumR));var w=a.castOption(o,m.i,"customdata");w&&(v.customdata=w);return a.texttemplateString(s,v,t._d3locale,_,v,o._meta||{})}(t,e,r,n,i):s.textinfo?function(t,e,r,n){var i=t[0].trace,o="h"===i.orientation,s="waterfall"===i.type,l="funnel"===i.type;function c(t){return u(o?r:n,+t,!0).text}var f,h=i.textinfo,p=t[e],d=h.split("+"),g=[],m=function(t){return-1!==d.indexOf(t)};m("label")&&g.push((v=t[e].p,u(o?n:r,v,!0).text));var v;m("text")&&(0===(f=a.castOption(i,p.i,"text"))||f)&&g.push(f);if(s){var y=+p.rawS||p.s,x=p.v,b=x-y;m("initial")&&g.push(c(b)),m("delta")&&g.push(c(y)),m("final")&&g.push(c(x))}if(l){m("value")&&g.push(c(p.s));var _=0;m("percent initial")&&_++,m("percent previous")&&_++,m("percent total")&&_++;var w=_>1;m("percent initial")&&(f=a.formatPercent(p.begR),w&&(f+=" of initial"),g.push(f)),m("percent previous")&&(f=a.formatPercent(p.difR),w&&(f+=" of previous"),g.push(f)),m("percent total")&&(f=a.formatPercent(p.sumR),w&&(f+=" of total"),g.push(f))}return g.join("
    ")}(e,r,n,i):g.getValue(s.text,r);return g.coerceString(y,o)}(L,n,i,T,A);w=function(t,e){var r=g.getValue(t.textposition,e);return g.coerceEnumerated(x,r)}(P,i);var D="stack"===m.mode||"relative"===m.mode,R=n[i],F=!D||R._outmost;if(!O||"none"===w||(R.isBlank||s===c||f===p)&&("auto"===w||"inside"===w))return void r.select("text").remove();var B=L.font,N=d.getBarColor(n[i],P),j=d.getInsideTextFont(P,i,B,N),U=d.getOutsideTextFont(P,i,B),V=r.datum();z?"log"===T.type&&V.s0<=0&&(s=T.range[0]=G*(Z/Y):Z>=Y*(X/G);G>0&&Y>0&&(J||K||Q)?w="inside":(w="outside",q.remove(),q=null)}else w="inside";if(!q){W=a.ensureUniformFontSize(t,"outside"===w?U:j);var $=(q=I(r,O,W)).attr("transform");if(q.attr("transform",""),H=l.bBox(q.node()),G=H.width,Y=H.height,q.attr("transform",$),G<=0||Y<=0)return void q.remove()}var tt,et,rt=P.textangle;"outside"===w?(et="both"===P.constraintext||"outside"===P.constraintext,tt=function(t,e,r,n,i,a){var o,s=!!a.isHorizontal,l=!!a.constrained,c=a.angle||0,u=i.width,f=i.height,h=Math.abs(e-t),p=Math.abs(n-r);o=s?p>2*_?_:0:h>2*_?_:0;var d=1;l&&(d=s?Math.min(1,p/f):Math.min(1,h/u));var g=S(c),m=E(i,g),v=(s?m.x:m.y)/2,y=(i.left+i.right)/2,x=(i.top+i.bottom)/2,b=(t+e)/2,w=(r+n)/2,T=0,M=0,A=s?k(e,t):k(r,n);s?(b=e-A*o,T=A*v):(w=n+A*o,M=-A*v);return{textX:y,textY:x,targetX:b,targetY:w,anchorX:T,anchorY:M,scale:d,rotate:g}}(s,c,f,p,H,{isHorizontal:z,constrained:et,angle:rt})):(et="both"===P.constraintext||"inside"===P.constraintext,tt=C(s,c,f,p,H,{isHorizontal:z,constrained:et,angle:rt,anchor:P.insidetextanchor}));tt.fontSize=W.size,h(P.type,tt,L),R.transform=tt,M(q,L,m,v).attr("transform",a.getTextTransform(tt))}(t,e,P,r,p,B,N,j,U,m,v),e.layerClipId&&l.hideOutsideRangePoint(c,P.select("text"),w,L,f.xcalendar,f.ycalendar)}));var j=!1===f.cliponaxis;l.setClipUrl(c,j?null:e.layerClipId,t)}));c.getComponentMethod("errorbars","plot")(t,P,e,m)},toMoveInsideBar:C}},{"../../components/color":643,"../../components/drawing":665,"../../components/fx/helpers":679,"../../lib":778,"../../lib/svg_text_utils":803,"../../plots/cartesian/axes":828,"../../registry":911,"./attributes":921,"./constants":923,"./helpers":927,"./style":935,"./uniform_text":937,d3:169,"fast-isnumeric":241}],933:[function(t,e,r){"use strict";function n(t,e,r,n,i){var a=e.c2p(n?t.s0:t.p0,!0),o=e.c2p(n?t.s1:t.p1,!0),s=r.c2p(n?t.p0:t.s0,!0),l=r.c2p(n?t.p1:t.s1,!0);return i?[(a+o)/2,(s+l)/2]:n?[o,(s+l)/2]:[(a+o)/2,l]}e.exports=function(t,e){var r,i=t.cd,a=t.xaxis,o=t.yaxis,s=i[0].trace,l="funnel"===s.type,c="h"===s.orientation,u=[];if(!1===e)for(r=0;r1||0===i.bargap&&0===i.bargroupgap&&!t[0].trace.marker.line.width)&&n.select(this).attr("shape-rendering","crispEdges")})),e.selectAll("g.points").each((function(e){d(n.select(this),e[0].trace,t)})),s.getComponentMethod("errorbars","style")(e)},styleTextPoints:g,styleOnSelect:function(t,e,r){var i=e[0].trace;i.selectedpoints?function(t,e,r){a.selectedPointStyle(t.selectAll("path"),e),function(t,e,r){t.each((function(t){var i,s=n.select(this);if(t.selected){i=o.ensureUniformFontSize(r,m(s,t,e,r));var l=e.selected.textfont&&e.selected.textfont.color;l&&(i.color=l),a.font(s,i)}else a.selectedTextStyle(s,e)}))}(t.selectAll("text"),e,r)}(r,i,t):(d(r,i,t),s.getComponentMethod("errorbars","style")(r))},getInsideTextFont:y,getOutsideTextFont:x,getBarColor:_,resizeText:l}},{"../../components/color":643,"../../components/drawing":665,"../../lib":778,"../../registry":911,"./attributes":921,"./helpers":927,"./uniform_text":937,d3:169}],936:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s){r("marker.color",o),i(t,"marker")&&a(t,e,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",n.defaultLine),i(t,"marker.line")&&a(t,e,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),r("selected.marker.color"),r("unselected.marker.color")}},{"../../components/color":643,"../../components/colorscale/defaults":653,"../../components/colorscale/helpers":654}],937:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib");function a(t){return"_"+t+"Text_minsize"}e.exports={recordMinTextSize:function(t,e,r){if(r.uniformtext.mode){var n=a(t),i=r.uniformtext.minsize,o=e.scale*e.fontSize;e.hide=oh.range[1]&&(x+=Math.PI);if(n.getClosest(c,(function(t){return g(y,x,[t.rp0,t.rp1],[t.thetag0,t.thetag1],d)?m+Math.min(1,Math.abs(t.thetag1-t.thetag0)/v)-1+(t.rp1-y)/(t.rp1-t.rp0)-1:1/0}),t),!1!==t.index){var b=c[t.index];t.x0=t.x1=b.ct[0],t.y0=t.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return o(b,u,t),s(_,u,f,t),t.hovertemplate=u.hovertemplate,t.color=a(u,b),t.xLabelVal=t.yLabelVal=void 0,b.s<0&&(t.idealAlign="left"),[t]}}},{"../../components/fx":683,"../../lib":778,"../../plots/polar/helpers":893,"../bar/hover":928,"../scatterpolar/hover":1265}],942:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"barpolar",basePlotModule:t("../../plots/polar"),categories:["polar","bar","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("../scatterpolar/format_labels"),style:t("../bar/style").style,styleOnSelect:t("../bar/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../bar/select"),meta:{}}},{"../../plots/polar":894,"../bar/select":933,"../bar/style":935,"../scatter/marker_colorbar":1205,"../scatterpolar/format_labels":1264,"./attributes":938,"./calc":939,"./defaults":940,"./hover":941,"./layout_attributes":943,"./layout_defaults":944,"./plot":945}],943:[function(t,e,r){"use strict";e.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},{}],944:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e,r){var a,o={};function s(r,o){return n.coerce(t[a]||{},e[a],i,r,o)}for(var l=0;l0?(c=o,u=l):(c=l,u=o);var f=[s.findEnclosingVertexAngles(c,t.vangles)[0],(c+u)/2,s.findEnclosingVertexAngles(u,t.vangles)[1]];return s.pathPolygonAnnulus(n,i,c,u,f,e,r)};return function(t,n,i,o){return a.pathAnnulus(t,n,i,o,e,r)}}(e),p=e.layers.frontplot.select("g.barlayer");a.makeTraceGroups(p,r,"trace bars").each((function(){var r=n.select(this),s=a.ensureSingle(r,"g","points").selectAll("g.point").data(a.identity);s.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each((function(t){var e,r=n.select(this),o=t.rp0=u.c2p(t.s0),s=t.rp1=u.c2p(t.s1),p=t.thetag0=f.c2g(t.p0),d=t.thetag1=f.c2g(t.p1);if(i(o)&&i(s)&&i(p)&&i(d)&&o!==s&&p!==d){var g=u.c2g(t.s1),m=(p+d)/2;t.ct=[l.c2p(g*Math.cos(m)),c.c2p(g*Math.sin(m))],e=h(o,s,p,d)}else e="M0,0Z";a.ensureSingle(r,"path").attr("d",e)})),o.setClipUrl(r,e._hasClipOnAxisFalse?e.clipIds.forTraces:null,t)}))}},{"../../components/drawing":665,"../../lib":778,"../../plots/polar/helpers":893,d3:169,"fast-isnumeric":241}],946:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../bar/attributes"),a=t("../../components/color/attributes"),o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../lib/extend").extendFlat,l=n.marker,c=l.line;e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:n.xperiod,yperiod:n.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:n.xperiodalignment,yperiodalignment:n.yperiodalignment,name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:s({},l.symbol,{arrayOk:!1,editType:"plot"}),opacity:s({},l.opacity,{arrayOk:!1,dflt:1,editType:"style"}),size:s({},l.size,{arrayOk:!1,editType:"calc"}),color:s({},l.color,{arrayOk:!1,editType:"style"}),line:{color:s({},c.color,{arrayOk:!1,dflt:a.defaultLine,editType:"style"}),width:s({},c.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:n.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:i.offsetgroup,alignmentgroup:i.alignmentgroup,selected:{marker:n.selected.marker,editType:"style"},unselected:{marker:n.unselected.marker,editType:"style"},text:s({},n.text,{}),hovertext:s({},n.hovertext,{}),hovertemplate:o({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},{"../../components/color/attributes":642,"../../lib/extend":768,"../../plots/template_attributes":906,"../bar/attributes":921,"../scatter/attributes":1187}],947:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../plots/cartesian/axes"),a=t("../../plots/cartesian/align_period"),o=t("../../lib"),s=t("../../constants/numerical").BADNUM,l=o._;e.exports=function(t,e){var r,c,y,x,b,_,w,T=t._fullLayout,k=i.getFromId(t,e.xaxis||"x"),M=i.getFromId(t,e.yaxis||"y"),A=[],S="violin"===e.type?"_numViolins":"_numBoxes";"h"===e.orientation?(y=k,x="x",b=M,_="y",w=!!e.yperiodalignment):(y=M,x="y",b=k,_="x",w=!!e.xperiodalignment);var E,C,L,I,P,z,O=function(t,e,r,i){var s,l=e+"0"in t,c="d"+e in t;if(e in t||l&&c){var u=r.makeCalcdata(t,e);return[a(t,r,e,u),u]}s=l?t[e+"0"]:"name"in t&&("category"===r.type||n(t.name)&&-1!==["linear","log"].indexOf(r.type)||o.isDateTime(t.name)&&"date"===r.type)?t.name:i;for(var f="multicategory"===r.type?r.r2c_just_indices(s):r.d2c(s,0,t[e+"calendar"]),h=t._length,p=new Array(h),d=0;dE.uf};if(e._hasPreCompStats){var U=e[x],V=function(t){return y.d2c((e[t]||[])[r])},q=1/0,H=-1/0;for(r=0;r=E.q1&&E.q3>=E.med){var Y=V("lowerfence");E.lf=Y!==s&&Y<=E.q1?Y:p(E,L,I);var W=V("upperfence");E.uf=W!==s&&W>=E.q3?W:d(E,L,I);var X=V("mean");E.mean=X!==s?X:I?o.mean(L,I):(E.q1+E.q3)/2;var Z=V("sd");E.sd=X!==s&&Z>=0?Z:I?o.stdev(L,I,E.mean):E.q3-E.q1,E.lo=g(E),E.uo=m(E);var J=V("notchspan");J=J!==s&&J>0?J:v(E,I),E.ln=E.med-J,E.un=E.med+J;var K=E.lf,Q=E.uf;e.boxpoints&&L.length&&(K=Math.min(K,L[0]),Q=Math.max(Q,L[I-1])),e.notched&&(K=Math.min(K,E.ln),Q=Math.max(Q,E.un)),E.min=K,E.max=Q}else{var $;o.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join("\n")),$=E.med!==s?E.med:E.q1!==s?E.q3!==s?(E.q1+E.q3)/2:E.q1:E.q3!==s?E.q3:0,E.med=$,E.q1=E.q3=$,E.lf=E.uf=$,E.mean=E.sd=$,E.ln=E.un=$,E.min=E.max=$}q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(j),A.push(E)}}e._extremes[y._id]=i.findExtremes(y,[q,H],{padded:!0})}else{var tt=y.makeCalcdata(e,x),et=function(t,e){for(var r=t.length,n=new Array(r+1),i=0;i=0&&it0){var ut,ft;if((E={}).pos=E[_]=B[r],C=E.pts=nt[r].sort(f),I=(L=E[x]=C.map(h)).length,E.min=L[0],E.max=L[I-1],E.mean=o.mean(L,I),E.sd=o.stdev(L,I,E.mean),E.med=o.interp(L,.5),I%2&&(lt||ct))lt?(ut=L.slice(0,I/2),ft=L.slice(I/2+1)):ct&&(ut=L.slice(0,I/2+1),ft=L.slice(I/2)),E.q1=o.interp(ut,.5),E.q3=o.interp(ft,.5);else E.q1=o.interp(L,.25),E.q3=o.interp(L,.75);E.lf=p(E,L,I),E.uf=d(E,L,I),E.lo=g(E),E.uo=m(E);var ht=v(E,I);E.ln=E.med-ht,E.un=E.med+ht,at=Math.min(at,E.ln),ot=Math.max(ot,E.un),E.pts2=C.filter(j),A.push(E)}e._extremes[y._id]=i.findExtremes(y,e.notched?tt.concat([at,ot]):tt,{padded:!0})}return function(t,e){if(o.isArrayOrTypedArray(e.selectedpoints))for(var r=0;r0?(A[0].t={num:T[S],dPos:N,posLetter:_,valLetter:x,labels:{med:l(t,"median:"),min:l(t,"min:"),q1:l(t,"q1:"),q3:l(t,"q3:"),max:l(t,"max:"),mean:"sd"===e.boxmean?l(t,"mean \xb1 \u03c3:"):l(t,"mean:"),lf:l(t,"lower fence:"),uf:l(t,"upper fence:")}},T[S]++,A):[{t:{empty:!0}}]};var c={text:"tx",hovertext:"htx"};function u(t,e,r){for(var n in c)o.isArrayOrTypedArray(e[n])&&(Array.isArray(r)?o.isArrayOrTypedArray(e[n][r[0]])&&(t[c[n]]=e[n][r[0]][r[1]]):t[c[n]]=e[n][r])}function f(t,e){return t.v-e.v}function h(t){return t.v}function p(t,e,r){return 0===r?t.q1:Math.min(t.q1,e[Math.min(o.findBin(2.5*t.q1-1.5*t.q3,e,!0)+1,r-1)])}function d(t,e,r){return 0===r?t.q3:Math.max(t.q3,e[Math.max(o.findBin(2.5*t.q3-1.5*t.q1,e),0)])}function g(t){return 4*t.q1-3*t.q3}function m(t){return 4*t.q3-3*t.q1}function v(t,e){return 0===e?0:1.57*(t.q3-t.q1)/Math.sqrt(e)}},{"../../constants/numerical":753,"../../lib":778,"../../plots/cartesian/align_period":825,"../../plots/cartesian/axes":828,"fast-isnumeric":241}],948:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib"),a=t("../../plots/cartesian/constraints").getAxisGroup,o=["v","h"];function s(t,e,r,o){var s,l,c,u=e.calcdata,f=e._fullLayout,h=o._id,p=h.charAt(0),d=[],g=0;for(s=0;s1,b=1-f[t+"gap"],_=1-f[t+"groupgap"];for(s=0;s0){var H=E.pointpos,G=E.jitter,Y=E.marker.size/2,W=0;H+G>=0&&((W=V*(H+G))>A?(q=!0,j=Y,B=W):W>R&&(j=Y,B=A)),W<=A&&(B=A);var X=0;H-G<=0&&((X=-V*(H-G))>S?(q=!0,U=Y,N=X):X>F&&(U=Y,N=S)),X<=S&&(N=S)}else B=A,N=S;var Z=new Array(c.length);for(l=0;l0?(m="v",v=x>0?Math.min(_,b):Math.min(b)):x>0?(m="h",v=Math.min(_)):v=0;if(v){e._length=v;var S=r("orientation",m);e._hasPreCompStats?"v"===S&&0===x?(r("x0",0),r("dx",1)):"h"===S&&0===y&&(r("y0",0),r("dy",1)):"v"===S&&0===x?r("x0"):"h"===S&&0===y&&r("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y"],a)}else e.visible=!1}function f(t,e,r,i){var a=i.prefix,o=n.coerce2(t,e,c,"marker.outliercolor"),s=r("marker.line.outliercolor"),l="outliers";e._hasPreCompStats?l="all":(o||s)&&(l="suspectedoutliers");var u=r(a+"points",l);u?(r("jitter","all"===u?.3:0),r("pointpos","all"===u?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.color",e.line.color),r("marker.line.color"),r("marker.line.width"),"suspectedoutliers"===u&&(r("marker.line.outliercolor",e.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete e.marker;var f=r("hoveron");"all"!==f&&-1===f.indexOf("points")||r("hovertemplate"),n.coerceSelectionMarkerOpacity(e,r)}e.exports={supplyDefaults:function(t,e,r,i){function s(r,i){return n.coerce(t,e,c,r,i)}if(u(t,e,s,i),!1!==e.visible){o(t,e,i,s);var l=e._hasPreCompStats;l&&(s("lowerfence"),s("upperfence")),s("line.color",(t.marker||{}).color||r),s("line.width"),s("fillcolor",a.addOpacity(e.line.color,.5));var h=!1;if(l){var p=s("mean"),d=s("sd");p&&p.length&&(h=!0,d&&d.length&&(h="sd"))}s("boxmean",h),s("whiskerwidth"),s("width"),s("quartilemethod");var g=!1;if(l){var m=s("notchspan");m&&m.length&&(g=!0)}else n.validate(t.notchwidth,c.notchwidth)&&(g=!0);s("notched",g)&&s("notchwidth"),f(t,e,s,{prefix:"box"})}},crossTraceDefaults:function(t,e){var r,i;function a(t){return n.coerce(i._input,i,c,t)}for(var o=0;ot.lo&&(x.so=!0)}return a}));h.enter().append("path").classed("point",!0),h.exit().remove(),h.call(a.translatePoints,o,s)}function l(t,e,r,a){var o,s,l=e.val,c=e.pos,u=!!c.rangebreaks,f=a.bPos,h=a.bPosPxOffset||0,p=r.boxmean||(r.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var d=t.selectAll("path.mean").data("box"===r.type&&r.boxmean||"violin"===r.type&&r.box.visible&&r.meanline.visible?i.identity:[]);d.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),d.exit().remove(),d.each((function(t){var e=c.c2l(t.pos+f,!0),i=c.l2p(e-o)+h,a=c.l2p(e+s)+h,d=u?(i+a)/2:c.l2p(e)+h,g=l.c2p(t.mean,!0),m=l.c2p(t.mean-t.sd,!0),v=l.c2p(t.mean+t.sd,!0);"h"===r.orientation?n.select(this).attr("d","M"+g+","+i+"V"+a+("sd"===p?"m0,0L"+m+","+d+"L"+g+","+i+"L"+v+","+d+"Z":"")):n.select(this).attr("d","M"+i+","+g+"H"+a+("sd"===p?"m0,0L"+d+","+m+"L"+i+","+g+"L"+d+","+v+"Z":""))}))}e.exports={plot:function(t,e,r,a){var c=e.xaxis,u=e.yaxis;i.makeTraceGroups(a,r,"trace boxes").each((function(t){var e,r,i=n.select(this),a=t[0],f=a.t,h=a.trace;(f.wdPos=f.bdPos*h.whiskerwidth,!0!==h.visible||f.empty)?i.remove():("h"===h.orientation?(e=u,r=c):(e=c,r=u),o(i,{pos:e,val:r},h,f),s(i,{x:c,y:u},h,f),l(i,{pos:e,val:r},h,f))}))},plotBoxAndWhiskers:o,plotPoints:s,plotBoxMean:l}},{"../../components/drawing":665,"../../lib":778,d3:169}],956:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,i=t.cd,a=t.xaxis,o=t.yaxis,s=[];if(!1===e)for(r=0;r=10)return null;for(var i=1/0,a=-1/0,o=e.length,s=0;s0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,O=C>0?Math.max:Math.min,D=I(S+L),R=P(E-L),F=[[f=A(S)]];for(a=D;a*C=0;i--)a[u-i]=t[f][i],o[u-i]=e[f][i];for(s.push({x:a,y:o,bicubic:l}),i=f,a=[],o=[];i>=0;i--)a[f-i]=t[i][0],o[f-i]=e[i][0];return s.push({x:a,y:o,bicubic:c}),s}},{}],970:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e,r){var a,o,s,l,c,u,f,h,p,d,g,m,v,y,x=t["_"+e],b=t[e+"axis"],_=b._gridlines=[],w=b._minorgridlines=[],T=b._boundarylines=[],k=t["_"+r],M=t[r+"axis"];"array"===b.tickmode&&(b.tickvals=x.slice());var A=t._xctrl,S=t._yctrl,E=A[0].length,C=A.length,L=t._a.length,I=t._b.length;n.prepTicks(b),"array"===b.tickmode&&delete b.tickvals;var P=b.smoothing?3:1;function z(n){var i,a,o,s,l,c,u,f,p,d,g,m,v=[],y=[],x={};if("b"===e)for(a=t.b2j(n),o=Math.floor(Math.max(0,Math.min(I-2,a))),s=a-o,x.length=I,x.crossLength=L,x.xy=function(e){return t.evalxy([],e,a)},x.dxy=function(e,r){return t.dxydi([],e,o,r,s)},i=0;i0&&(p=t.dxydi([],i-1,o,0,s),v.push(l[0]+p[0]/3),y.push(l[1]+p[1]/3),d=t.dxydi([],i-1,o,1,s),v.push(f[0]-d[0]/3),y.push(f[1]-d[1]/3)),v.push(f[0]),y.push(f[1]),l=f;else for(i=t.a2i(n),c=Math.floor(Math.max(0,Math.min(L-2,i))),u=i-c,x.length=L,x.crossLength=I,x.xy=function(e){return t.evalxy([],i,e)},x.dxy=function(e,r){return t.dxydj([],c,e,u,r)},a=0;a0&&(g=t.dxydj([],c,a-1,u,0),v.push(l[0]+g[0]/3),y.push(l[1]+g[1]/3),m=t.dxydj([],c,a-1,u,1),v.push(f[0]-m[0]/3),y.push(f[1]-m[1]/3)),v.push(f[0]),y.push(f[1]),l=f;return x.axisLetter=e,x.axis=b,x.crossAxis=M,x.value=n,x.constvar=r,x.index=h,x.x=v,x.y=y,x.smoothing=M.smoothing,x}function O(n){var i,a,o,s,l,c=[],u=[],f={};if(f.length=x.length,f.crossLength=k.length,"b"===e)for(o=Math.max(0,Math.min(I-2,n)),l=Math.min(1,Math.max(0,n-o)),f.xy=function(e){return t.evalxy([],e,n)},f.dxy=function(e,r){return t.dxydi([],e,o,r,l)},i=0;ix.length-1||_.push(i(O(o),{color:b.gridcolor,width:b.gridwidth}));for(h=u;hx.length-1||g<0||g>x.length-1))for(m=x[s],v=x[g],a=0;ax[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(O(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(O(x.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(l=5e-15,u=(c=[Math.floor((x[x.length-1]-b.tick0)/b.dtick*(1+l)),Math.ceil((x[0]-b.tick0)/b.dtick/(1+l))].sort((function(t,e){return t-e})))[0],f=c[1],h=u;h<=f;h++)p=b.tick0+b.dtick*h,_.push(i(z(p),{color:b.gridcolor,width:b.gridwidth}));for(h=u-1;hx[x.length-1]||w.push(i(z(d),{color:b.minorgridcolor,width:b.minorgridwidth}));b.startline&&T.push(i(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},{"../../lib/extend":768,"../../plots/cartesian/axes":828}],971:[function(t,e,r){"use strict";var n=t("../../plots/cartesian/axes"),i=t("../../lib/extend").extendFlat;e.exports=function(t,e){var r,a,o,s=e._labels=[],l=e._gridlines;for(r=0;re.length&&(t=t.slice(0,e.length)):t=[],i=0;i90&&(p-=180,l=-l),{angle:p,flip:l,p:t.c2p(n,e,r),offsetMultplier:c}}},{}],985:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("./map_1d_array"),o=t("./makepath"),s=t("./orient_text"),l=t("../../lib/svg_text_utils"),c=t("../../lib"),u=c.strRotate,f=c.strTranslate,h=t("../../constants/alignment");function p(t,e,r,i,s,l){var c="const-"+s+"-lines",u=r.selectAll("."+c).data(l);u.enter().append("path").classed(c,!0).style("vector-effect","non-scaling-stroke"),u.each((function(r){var i=r,s=i.x,l=i.y,c=a([],s,t.c2p),u=a([],l,e.c2p),f="M"+o(c,u,i.smoothing);n.select(this).attr("d",f).style("stroke-width",i.width).style("stroke",i.color).style("fill","none")})),u.exit().remove()}function d(t,e,r,a,o,c,h,p){var d=c.selectAll("text."+p).data(h);d.enter().append("text").classed(p,!0);var g=0,m={};return d.each((function(o,c){var h;if("auto"===o.axis.tickangle)h=s(a,e,r,o.xy,o.dxy);else{var p=(o.axis.tickangle+180)*Math.PI/180;h=s(a,e,r,o.xy,[Math.cos(p),Math.sin(p)])}c||(m={angle:h.angle,flip:h.flip});var d=(o.endAnchor?-1:1)*h.flip,v=n.select(this).attr({"text-anchor":d>0?"start":"end","data-notex":1}).call(i.font,o.font).text(o.text).call(l.convertToTspans,t),y=i.bBox(this);v.attr("transform",f(h.p[0],h.p[1])+u(h.angle)+f(o.axis.labelpadding*d,.3*y.height)),g=Math.max(g,y.width+o.axis.labelpadding)})),d.exit().remove(),m.maxExtent=g,m}e.exports=function(t,e,r,i){var l=e.xaxis,u=e.yaxis,f=t._fullLayout._clips;c.makeTraceGroups(i,r,"trace").each((function(e){var r=n.select(this),i=e[0],h=i.trace,g=h.aaxis,m=h.baxis,y=c.ensureSingle(r,"g","minorlayer"),x=c.ensureSingle(r,"g","majorlayer"),b=c.ensureSingle(r,"g","boundarylayer"),_=c.ensureSingle(r,"g","labellayer");r.style("opacity",h.opacity),p(l,u,x,g,"a",g._gridlines),p(l,u,x,m,"b",m._gridlines),p(l,u,y,g,"a",g._minorgridlines),p(l,u,y,m,"b",m._minorgridlines),p(l,u,b,g,"a-boundary",g._boundarylines),p(l,u,b,m,"b-boundary",m._boundarylines);var w=d(t,l,u,h,i,_,g._labels,"a-label"),T=d(t,l,u,h,i,_,m._labels,"b-label");!function(t,e,r,n,i,a,o,l){var u,f,h,p,d=c.aggNums(Math.min,null,r.a),g=c.aggNums(Math.max,null,r.a),m=c.aggNums(Math.min,null,r.b),y=c.aggNums(Math.max,null,r.b);u=.5*(d+g),f=m,h=r.ab2xy(u,f,!0),p=r.dxyda_rough(u,f),void 0===o.angle&&c.extendFlat(o,s(r,i,a,h,r.dxydb_rough(u,f)));v(t,e,r,n,h,p,r.aaxis,i,a,o,"a-title"),u=d,f=.5*(m+y),h=r.ab2xy(u,f,!0),p=r.dxydb_rough(u,f),void 0===l.angle&&c.extendFlat(l,s(r,i,a,h,r.dxyda_rough(u,f)));v(t,e,r,n,h,p,r.baxis,i,a,l,"b-title")}(t,_,h,i,l,u,w,T),function(t,e,r,n,i){var s,l,u,f,h=r.select("#"+t._clipPathId);h.size()||(h=r.append("clipPath").classed("carpetclip",!0));var p=c.ensureSingle(h,"path","carpetboundary"),d=e.clipsegments,g=[];for(f=0;f90&&y<270,b=n.select(this);b.text(h.title.text).call(l.convertToTspans,t),x&&(_=(-l.lineCount(b)+m)*g*a-_),b.attr("transform",f(e.p[0],e.p[1])+u(e.angle)+f(0,_)).attr("text-anchor","middle").call(i.font,h.title.font)})),b.exit().remove()}},{"../../components/drawing":665,"../../constants/alignment":745,"../../lib":778,"../../lib/svg_text_utils":803,"./makepath":982,"./map_1d_array":983,"./orient_text":984,d3:169}],986:[function(t,e,r){"use strict";var n=t("./constants"),i=t("../../lib/search").findBin,a=t("./compute_control_points"),o=t("./create_spline_evaluator"),s=t("./create_i_derivative_evaluator"),l=t("./create_j_derivative_evaluator");e.exports=function(t){var e=t._a,r=t._b,c=e.length,u=r.length,f=t.aaxis,h=t.baxis,p=e[0],d=e[c-1],g=r[0],m=r[u-1],v=e[e.length-1]-e[0],y=r[r.length-1]-r[0],x=v*n.RELATIVE_CULL_TOLERANCE,b=y*n.RELATIVE_CULL_TOLERANCE;p-=x,d+=x,g-=b,m+=b,t.isVisible=function(t,e){return t>p&&tg&&ed||em},t.setScale=function(){var e=t._x,r=t._y,n=a(t._xctrl,t._yctrl,e,r,f.smoothing,h.smoothing);t._xctrl=n[0],t._yctrl=n[1],t.evalxy=o([t._xctrl,t._yctrl],c,u,f.smoothing,h.smoothing),t.dxydi=s([t._xctrl,t._yctrl],f.smoothing,h.smoothing),t.dxydj=l([t._xctrl,t._yctrl],f.smoothing,h.smoothing)},t.i2a=function(t){var r=Math.max(0,Math.floor(t[0]),c-2),n=t[0]-r;return(1-n)*e[r]+n*e[r+1]},t.j2b=function(t){var e=Math.max(0,Math.floor(t[1]),c-2),n=t[1]-e;return(1-n)*r[e]+n*r[e+1]},t.ij2ab=function(e){return[t.i2a(e[0]),t.j2b(e[1])]},t.a2i=function(t){var r=Math.max(0,Math.min(i(t,e),c-2)),n=e[r],a=e[r+1];return Math.max(0,Math.min(c-1,r+(t-n)/(a-n)))},t.b2j=function(t){var e=Math.max(0,Math.min(i(t,r),u-2)),n=r[e],a=r[e+1];return Math.max(0,Math.min(u-1,e+(t-n)/(a-n)))},t.ab2ij=function(e){return[t.a2i(e[0]),t.b2j(e[1])]},t.i2c=function(e,r){return t.evalxy([],e,r)},t.ab2xy=function(n,i,a){if(!a&&(ne[c-1]|ir[u-1]))return[!1,!1];var o=t.a2i(n),s=t.b2j(i),l=t.evalxy([],o,s);if(a){var f,h,p,d,g=0,m=0,v=[];ne[c-1]?(f=c-2,h=1,g=(n-e[c-1])/(e[c-1]-e[c-2])):h=o-(f=Math.max(0,Math.min(c-2,Math.floor(o)))),ir[u-1]?(p=u-2,d=1,m=(i-r[u-1])/(r[u-1]-r[u-2])):d=s-(p=Math.max(0,Math.min(u-2,Math.floor(s)))),g&&(t.dxydi(v,f,p,h,d),l[0]+=v[0]*g,l[1]+=v[1]*g),m&&(t.dxydj(v,f,p,h,d),l[0]+=v[0]*m,l[1]+=v[1]*m)}return l},t.c2p=function(t,e,r){return[e.c2p(t[0]),r.c2p(t[1])]},t.p2x=function(t,e,r){return[e.p2c(t[0]),r.p2c(t[1])]},t.dadi=function(t){var r=Math.max(0,Math.min(e.length-2,t));return e[r+1]-e[r]},t.dbdj=function(t){var e=Math.max(0,Math.min(r.length-2,t));return r[e+1]-r[e]},t.dxyda=function(e,r,n,i){var a=t.dxydi(null,e,r,n,i),o=t.dadi(e,n);return[a[0]/o,a[1]/o]},t.dxydb=function(e,r,n,i){var a=t.dxydj(null,e,r,n,i),o=t.dbdj(r,i);return[a[0]/o,a[1]/o]},t.dxyda_rough=function(e,r,n){var i=v*(n||.1),a=t.ab2xy(e+i,r,!0),o=t.ab2xy(e-i,r,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dxydb_rough=function(e,r,n){var i=y*(n||.1),a=t.ab2xy(e,r+i,!0),o=t.ab2xy(e,r-i,!0);return[.5*(a[0]-o[0])/i,.5*(a[1]-o[1])/i]},t.dpdx=function(t){return t._m},t.dpdy=function(t){return t._m}}},{"../../lib/search":798,"./compute_control_points":974,"./constants":975,"./create_i_derivative_evaluator":976,"./create_j_derivative_evaluator":977,"./create_spline_evaluator":978}],987:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e,r){var i,a,o,s=[],l=[],c=t[0].length,u=t.length;function f(e,r){var n,i=0,a=0;return e>0&&void 0!==(n=t[r][e-1])&&(a++,i+=n),e0&&void 0!==(n=t[r-1][e])&&(a++,i+=n),r0&&a0&&i1e-5);return n.log("Smoother converged to",k,"after",M,"iterations"),t}},{"../../lib":778}],988:[function(t,e,r){"use strict";var n=t("../../lib").isArray1D;e.exports=function(t,e,r){var i=r("x"),a=i&&i.length,o=r("y"),s=o&&o.length;if(!a&&!s)return!1;if(e._cheater=!i,a&&!n(i)||s&&!n(o))e._length=null;else{var l=a?i.length:1/0;s&&(l=Math.min(l,o.length)),e.a&&e.a.length&&(l=Math.min(l,e.a.length)),e.b&&e.b.length&&(l=Math.min(l,e.b.length)),e._length=l}return!0}},{"../../lib":778}],989:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../scattergeo/attributes"),a=t("../../components/colorscale/attributes"),o=t("../../plots/attributes"),s=t("../../components/color/attributes").defaultLine,l=t("../../lib/extend").extendFlat,c=i.marker.line;e.exports=l({locations:{valType:"data_array",editType:"calc"},locationmode:i.locationmode,z:{valType:"data_array",editType:"calc"},geojson:l({},i.geojson,{}),featureidkey:i.featureidkey,text:l({},i.text,{}),hovertext:l({},i.hovertext,{}),marker:{line:{color:l({},c.color,{dflt:s}),width:l({},c.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:i.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:i.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:l({},o.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:n(),showlegend:l({},o.showlegend,{dflt:!1})},a("",{cLetter:"z",editTypeOverride:"calc"}))},{"../../components/color/attributes":642,"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plots/attributes":824,"../../plots/template_attributes":906,"../scattergeo/attributes":1229}],990:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../constants/numerical").BADNUM,a=t("../../components/colorscale/calc"),o=t("../scatter/arrays_to_calcdata"),s=t("../scatter/calc_selection");function l(t){return t&&"string"==typeof t}e.exports=function(t,e){var r,c=e._length,u=new Array(c);r=e.geojson?function(t){return l(t)||n(t)}:l;for(var f=0;f")}(t,f,o),[t]}},{"../../lib":778,"../../plots/cartesian/axes":828,"./attributes":989}],994:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"choropleth",basePlotModule:t("../../plots/geo"),categories:["geo","noOpacity","showLegend"],meta:{}}},{"../../plots/geo":860,"../heatmap/colorbar":1068,"./attributes":989,"./calc":990,"./defaults":991,"./event_data":992,"./hover":993,"./plot":995,"./select":996,"./style":997}],995:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../lib/geo_location_utils"),o=t("../../lib/topojson_utils").getTopojsonFeatures,s=t("../../plots/cartesian/autorange").findExtremes,l=t("./style").style;e.exports={calcGeoJSON:function(t,e){for(var r=t[0].trace,n=e[r.geo],i=n._subplot,l=r.locationmode,c=r._length,u="geojson-id"===l?a.extractTraceFeature(t):o(r,i.topojson),f=[],h=[],p=0;p=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water"))for(var a=n+1;a=0;r--)t.removeLayer(e[r][1])},s.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new o(t,r.uid),a=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(a,{type:"geojson",data:s.geojson}),i._addLayers(s,l),e[0].trace._glTrace=i,i}},{"../../plots/mapbox/constants":883,"./convert":999}],1003:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"},{keys:["norm"]}),showlegend:s({},o.showlegend,{dflt:!1})};s(l,n("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));["opacity","lightposition","lighting"].forEach((function(t){l[t]=a[t]})),l.hoverinfo=s({},o.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),l.transforms=void 0,e.exports=l},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plots/attributes":824,"../../plots/template_attributes":906,"../mesh3d/attributes":1128}],1004:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){for(var r=e.u,i=e.v,a=e.w,o=Math.min(e.x.length,e.y.length,e.z.length,r.length,i.length,a.length),s=-1/0,l=1/0,c=0;co.level||o.starts.length&&a===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r":p>c&&(n.prefixBoundary=!0);break;case"<":(pc||n.starts.length&&h===u)&&(n.prefixBoundary=!0);break;case"][":f=Math.min(p[0],p[1]),h=Math.max(p[0],p[1]),fc&&(n.prefixBoundary=!0)}}}},{}],1011:[function(t,e,r){"use strict";var n=t("../../components/colorscale"),i=t("./make_color_map"),a=t("./end_plus");e.exports={min:"zmin",max:"zmax",calc:function(t,e,r){var o=e.contours,s=e.line,l=o.size||1,c=o.coloring,u=i(e,{isColorbar:!0});if("heatmap"===c){var f=n.extractOpts(e);r._fillgradient=f.reversescale?n.flipScale(f.colorscale):f.colorscale,r._zrange=[f.min,f.max]}else"fill"===c&&(r._fillcolor=u);r._line={color:"lines"===c?u:s.color,width:!1!==o.showlines?s.width:0,dash:s.dash},r._levels={start:o.start,end:a(o),size:l}}}},{"../../components/colorscale":655,"./end_plus":1019,"./make_color_map":1024}],1012:[function(t,e,r){"use strict";e.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},{}],1013:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("./label_defaults"),a=t("../../components/color"),o=a.addOpacity,s=a.opacity,l=t("../../constants/filter_ops"),c=l.CONSTRAINT_REDUCTION,u=l.COMPARISON_OPS2;e.exports=function(t,e,r,a,l,f){var h,p,d,g=e.contours,m=r("contours.operation");(g._operation=c[m],function(t,e){var r;-1===u.indexOf(e.operation)?(t("contours.value",[0,1]),Array.isArray(e.value)?e.value.length>2?e.value=e.value.slice(2):0===e.length?e.value=[0,1]:e.length<2?(r=parseFloat(e.value[0]),e.value=[r,r+1]):e.value=[parseFloat(e.value[0]),parseFloat(e.value[1])]:n(e.value)&&(r=parseFloat(e.value),e.value=[r,r+1])):(t("contours.value",0),n(e.value)||(Array.isArray(e.value)?e.value=parseFloat(e.value[0]):e.value=0))}(r,g),"="===m?h=g.showlines=!0:(h=r("contours.showlines"),d=r("fillcolor",o((t.line||{}).color||l,.5))),h)&&(p=r("line.color",d&&s(d)?o(e.fillcolor,1):l),r("line.width",2),r("line.dash"));r("line.smoothing"),i(r,a,p,f)}},{"../../components/color":643,"../../constants/filter_ops":749,"./label_defaults":1023,"fast-isnumeric":241}],1014:[function(t,e,r){"use strict";var n=t("../../constants/filter_ops"),i=t("fast-isnumeric");function a(t,e){var r,a=Array.isArray(e);function o(t){return i(t)?+t:null}return-1!==n.COMPARISON_OPS2.indexOf(t)?r=o(a?e[0]:e):-1!==n.INTERVAL_OPS.indexOf(t)?r=a?[o(e[0]),o(e[1])]:[o(e),o(e)]:-1!==n.SET_OPS.indexOf(t)&&(r=a?e.map(o):[o(e)]),r}function o(t){return function(e){e=a(t,e);var r=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return{start:r,end:n,size:n-r}}}function s(t){return function(e){return{start:e=a(t,e),end:1/0,size:1/0}}}e.exports={"[]":o("[]"),"][":o("]["),">":s(">"),"<":s("<"),"=":s("=")}},{"../../constants/filter_ops":749,"fast-isnumeric":241}],1015:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){var i=n("contours.start"),a=n("contours.end"),o=!1===i||!1===a,s=r("contours.size");!(o?e.autocontour=!0:r("autocontour",!1))&&s||r("ncontours")}},{}],1016:[function(t,e,r){"use strict";var n=t("../../lib");function i(t){return n.extendFlat({},t,{edgepaths:n.extendDeep([],t.edgepaths),paths:n.extendDeep([],t.paths),starts:n.extendDeep([],t.starts)})}e.exports=function(t,e){var r,a,o,s=function(t){return t.reverse()},l=function(t){return t};switch(e){case"=":case"<":return t;case">":for(1!==t.length&&n.warn("Contour data invalid for the specified inequality operation."),a=t[0],r=0;r1e3){n.warn("Too many contours, clipping at 1000",t);break}return l}},{"../../lib":778,"./constraint_mapping":1014,"./end_plus":1019}],1019:[function(t,e,r){"use strict";e.exports=function(t){return t.end+t.size/1e6}},{}],1020:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./constants");function a(t,e,r,n){return Math.abs(t[0]-e[0])20&&e?208===t||1114===t?n=0===r[0]?1:-1:a=0===r[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(t)?a=1:-1!==i.LEFTSTART.indexOf(t)?n=1:-1!==i.TOPSTART.indexOf(t)?a=-1:n=-1;return[n,a]}(f,r,e),p=[s(t,e,[-h[0],-h[1]])],d=t.z.length,g=t.z[0].length,m=e.slice(),v=h.slice();for(c=0;c<1e4;c++){if(f>20?(f=i.CHOOSESADDLE[f][(h[0]||h[1])<0?0:1],t.crossings[u]=i.SADDLEREMAINDER[f]):delete t.crossings[u],!(h=i.NEWDELTA[f])){n.log("Found bad marching index:",f,e,t.level);break}p.push(s(t,e,h)),e[0]+=h[0],e[1]+=h[1],u=e.join(","),a(p[p.length-1],p[p.length-2],o,l)&&p.pop();var y=h[0]&&(e[0]<0||e[0]>g-2)||h[1]&&(e[1]<0||e[1]>d-2);if(e[0]===m[0]&&e[1]===m[1]&&h[0]===v[0]&&h[1]===v[1]||r&&y)break;f=t.crossings[u]}1e4===c&&n.log("Infinite loop in contour?");var x,b,_,w,T,k,M,A,S,E,C,L,I,P,z,O=a(p[0],p[p.length-1],o,l),D=0,R=.2*t.smoothing,F=[],B=0;for(c=1;c=B;c--)if((x=F[c])=B&&x+F[b]A&&S--,t.edgepaths[S]=C.concat(p,E));break}V||(t.edgepaths[A]=p.concat(E))}for(A=0;At?0:1)+(e[0][1]>t?0:2)+(e[1][1]>t?0:4)+(e[1][0]>t?0:8);return 5===r||10===r?t>(e[0][0]+e[0][1]+e[1][0]+e[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}e.exports=function(t){var e,r,a,o,s,l,c,u,f,h=t[0].z,p=h.length,d=h[0].length,g=2===p||2===d;for(r=0;r=0&&(n=y,s=l):Math.abs(r[1]-n[1])<.01?Math.abs(r[1]-y[1])<.01&&(y[0]-r[0])*(n[0]-y[0])>=0&&(n=y,s=l):i.log("endpt to newendpt is not vert. or horz.",r,n,y)}if(r=n,s>=0)break;f+="L"+n}if(s===t.edgepaths.length){i.log("unclosed perimeter path");break}h=s,(d=-1===p.indexOf(h))&&(h=p[0],f+="Z")}for(h=0;hn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),p=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(f)+Math.cos(c)*o);if(h<1||p<1)return 1/0;var d=v.EDGECOST*(1/(h-1)+1/(p-1));d+=v.ANGLECOST*c*c;for(var g=s-u,m=l-f,y=s+u,x=l+f,b=0;b2*v.MAXCOST)break;p&&(s/=2),l=(o=c-s/2)+1.5*s}if(h<=v.MAXCOST)return u},r.addLabelData=function(t,e,r,n){var i=e.fontSize,a=e.width+i/3,o=Math.max(0,e.height-i/3),s=t.x,l=t.y,c=t.theta,u=Math.sin(c),f=Math.cos(c),h=function(t,e){return[s+t*f-e*u,l+t*u+e*f]},p=[h(-a/2,-o/2),h(-a/2,o/2),h(a/2,o/2),h(a/2,-o/2)];r.push({text:e.text,x:s,y:l,dy:e.dy,theta:c,level:e.level,width:a,height:o}),n.push(p)},r.drawLabels=function(t,e,r,a,o){var l=t.selectAll("text").data(e,(function(t){return t.text+","+t.x+","+t.y+","+t.theta}));if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each((function(t){var e=t.x+Math.sin(t.theta)*t.dy,i=t.y-Math.cos(t.theta)*t.dy;n.select(this).text(t.text).attr({x:e,y:i,transform:"rotate("+180*t.theta/Math.PI+" "+e+" "+i+")"}).call(s.convertToTspans,r)})),o){for(var c="",u=0;ur.end&&(r.start=r.end=(r.start+r.end)/2),t._input.contours||(t._input.contours={}),i.extendFlat(t._input.contours,{start:r.start,end:r.end,size:r.size}),t._input.autocontour=!0}else if("constraint"!==r.type){var c,u=r.start,f=r.end,h=t._input.contours;if(u>f&&(r.start=h.start=f,f=r.end=h.end=u,u=r.start),!(r.size>0))c=u===f?1:a(u,f,t.ncontours).dtick,h.size=r.size=c}}},{"../../lib":778,"../../plots/cartesian/axes":828}],1028:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("../heatmap/style"),o=t("./make_color_map");e.exports=function(t){var e=n.select(t).selectAll("g.contour");e.style("opacity",(function(t){return t[0].trace.opacity})),e.each((function(t){var e=n.select(this),r=t[0].trace,a=r.contours,s=r.line,l=a.size||1,c=a.start,u="constraint"===a.type,f=!u&&"lines"===a.coloring,h=!u&&"fill"===a.coloring,p=f||h?o(r):null;e.selectAll("g.contourlevel").each((function(t){n.select(this).selectAll("path").call(i.lineGroupStyle,s.width,f?p(t.level):s.color,s.dash)}));var d=a.labelfont;if(e.selectAll("g.contourlabels text").each((function(t){i.font(n.select(this),{family:d.family,size:d.size,color:d.color||(f?p(t.level):s.color)})})),u)e.selectAll("g.contourfill path").style("fill",r.fillcolor);else if(h){var g;e.selectAll("g.contourfill path").style("fill",(function(t){return void 0===g&&(g=t.level),p(t.level+.5*l)})),void 0===g&&(g=c),e.selectAll("g.contourbg path").style("fill",p(g-.5*l))}})),a(t)}},{"../../components/drawing":665,"../heatmap/style":1077,"./make_color_map":1024,d3:169}],1029:[function(t,e,r){"use strict";var n=t("../../components/colorscale/defaults"),i=t("./label_defaults");e.exports=function(t,e,r,a,o){var s,l=r("contours.coloring"),c="";"fill"===l&&(s=r("contours.showlines")),!1!==s&&("lines"!==l&&(c=r("line.color","#000")),r("line.width",.5),r("line.dash")),"none"!==l&&(!0!==t.showlegend&&(e.showlegend=!1),e._dfltShowLegend=!1,n(t,e,a,r,{prefix:"",cLetter:"z"})),r("line.smoothing"),i(r,a,c,o)}},{"../../components/colorscale/defaults":653,"./label_defaults":1023}],1030:[function(t,e,r){"use strict";var n=t("../heatmap/attributes"),i=t("../contour/attributes"),a=t("../../components/colorscale/attributes"),o=t("../../lib/extend").extendFlat,s=i.contours;e.exports=o({carpet:{valType:"string",editType:"calc"},z:n.z,a:n.x,a0:n.x0,da:n.dx,b:n.y,b0:n.y0,db:n.dy,text:n.text,hovertext:n.hovertext,transpose:n.transpose,atype:n.xtype,btype:n.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:s.type,start:s.start,end:s.end,size:s.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:s.showlines,showlabels:s.showlabels,labelfont:s.labelfont,labelformat:s.labelformat,operation:s.operation,value:s.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},transforms:void 0},a("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../contour/attributes":1008,"../heatmap/attributes":1065}],1031:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),i=t("../../lib"),a=t("../heatmap/convert_column_xyz"),o=t("../heatmap/clean_2d_array"),s=t("../heatmap/interp2d"),l=t("../heatmap/find_empties"),c=t("../heatmap/make_bound_array"),u=t("./defaults"),f=t("../carpet/lookup_carpetid"),h=t("../contour/set_contours");e.exports=function(t,e){var r=e._carpetTrace=f(t,e);if(r&&r.visible&&"legendonly"!==r.visible){if(!e.a||!e.b){var p=t.data[r.index],d=t.data[e.index];d.a||(d.a=p.a),d.b||(d.b=p.b),u(d,e,e._defaultColor,t._fullLayout)}var g=function(t,e){var r,u,f,h,p,d,g,m=e._carpetTrace,v=m.aaxis,y=m.baxis;v._minDtick=0,y._minDtick=0,i.isArray1D(e.z)&&a(e,v,y,"a","b",["z"]);r=e._a=e._a||e.a,h=e._b=e._b||e.b,r=r?v.makeCalcdata(e,"_a"):[],h=h?y.makeCalcdata(e,"_b"):[],u=e.a0||0,f=e.da||1,p=e.b0||0,d=e.db||1,g=e._z=o(e._z||e.z,e.transpose),e._emptypoints=l(g),s(g,e._emptypoints);var x=i.maxRowLength(g),b="scaled"===e.xtype?"":r,_=c(e,b,u,f,x,v),w="scaled"===e.ytype?"":h,T=c(e,w,p,d,g.length,y),k={a:_,b:T,z:g};"levels"===e.contours.type&&"none"!==e.contours.coloring&&n(t,e,{vals:g,containerStr:"",cLetter:"z"});return[k]}(t,e);return h(e,e._z),g}}},{"../../components/colorscale/calc":651,"../../lib":778,"../carpet/lookup_carpetid":981,"../contour/set_contours":1027,"../heatmap/clean_2d_array":1067,"../heatmap/convert_column_xyz":1069,"../heatmap/find_empties":1071,"../heatmap/interp2d":1074,"../heatmap/make_bound_array":1075,"./defaults":1032}],1032:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../heatmap/xyz_defaults"),a=t("./attributes"),o=t("../contour/constraint_defaults"),s=t("../contour/contours_defaults"),l=t("../contour/style_defaults");e.exports=function(t,e,r,c){function u(r,i){return n.coerce(t,e,a,r,i)}if(u("carpet"),t.a&&t.b){if(!i(t,e,u,c,"a","b"))return void(e.visible=!1);u("text"),"constraint"===u("contours.type")?o(t,e,u,c,r,{hasHover:!1}):(s(t,e,u,(function(r){return n.coerce2(t,e,a,r)})),l(t,e,u,c,{hasHover:!1}))}else e._defaultColor=r,e._length=null}},{"../../lib":778,"../contour/constraint_defaults":1013,"../contour/contours_defaults":1015,"../contour/style_defaults":1029,"../heatmap/xyz_defaults":1079,"./attributes":1030}],1033:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../contour/colorbar"),calc:t("./calc"),plot:t("./plot"),style:t("../contour/style"),moduleType:"trace",name:"contourcarpet",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},{"../../plots/cartesian":841,"../contour/colorbar":1011,"../contour/style":1028,"./attributes":1030,"./calc":1031,"./defaults":1032,"./plot":1034}],1034:[function(t,e,r){"use strict";var n=t("d3"),i=t("../carpet/map_1d_array"),a=t("../carpet/makepath"),o=t("../../components/drawing"),s=t("../../lib"),l=t("../contour/make_crossings"),c=t("../contour/find_all_paths"),u=t("../contour/plot"),f=t("../contour/constants"),h=t("../contour/convert_to_constraints"),p=t("../contour/empty_pathinfo"),d=t("../contour/close_boundaries"),g=t("../carpet/lookup_carpetid"),m=t("../carpet/axis_aligned_line");function v(t,e,r){var n=t.getPointAtLength(e),i=t.getPointAtLength(r),a=i.x-n.x,o=i.y-n.y,s=Math.sqrt(a*a+o*o);return[a/s,o/s]}function y(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]);return[t[0]/e,t[1]/e]}function x(t,e){var r=Math.abs(t[0]*e[0]+t[1]*e[1]);return Math.sqrt(1-r*r)/r}e.exports=function(t,e,r,b){var _=e.xaxis,w=e.yaxis;s.makeTraceGroups(b,r,"contour").each((function(r){var b=n.select(this),T=r[0],k=T.trace,M=k._carpetTrace=g(t,k),A=t.calcdata[M.index][0];if(M.visible&&"legendonly"!==M.visible){var S=T.a,E=T.b,C=k.contours,L=p(C,e,T),I="constraint"===C.type,P=C._operation,z=I?"="===P?"lines":"fill":C.coloring,O=[[S[0],E[E.length-1]],[S[S.length-1],E[E.length-1]],[S[S.length-1],E[0]],[S[0],E[0]]];l(L);var D=1e-8*(S[S.length-1]-S[0]),R=1e-8*(E[E.length-1]-E[0]);c(L,D,R);var F,B,N,j,U=L;"constraint"===C.type&&(U=h(L,P)),function(t,e){var r,n,i,a,o,s,l,c,u;for(r=0;r=0;j--)F=A.clipsegments[j],B=i([],F.x,_.c2p),N=i([],F.y,w.c2p),B.reverse(),N.reverse(),V.push(a(B,N,F.bicubic));var q="M"+V.join("L")+"Z";!function(t,e,r,n,o,l){var c,u,f,h,p=s.ensureSingle(t,"g","contourbg").selectAll("path").data("fill"!==l||o?[]:[0]);p.enter().append("path"),p.exit().remove();var d=[];for(h=0;h=0&&(h=C,d=g):Math.abs(f[1]-h[1])=0&&(h=C,d=g):s.log("endpt to newendpt is not vert. or horz.",f,h,C)}if(d>=0)break;y+=S(f,h),f=h}if(d===e.edgepaths.length){s.log("unclosed perimeter path");break}u=d,(b=-1===x.indexOf(u))&&(u=x[0],y+=S(f,h)+"Z",f=null)}for(u=0;um&&(n.max=m);n.len=n.max-n.min}(this,r,t,n,c,e.height),!(n.len<(e.width+e.height)*f.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/P),f.LABELMAX),a=0;a0?+p[u]:0),f.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:y})}}var b=o.extractOpts(e),_=b.reversescale?o.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=["interpolate",["linear"],["heatmap-density"],0,a.opacity(w)<1?w:a.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var k=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":d?k:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":g?{type:"identity",property:"r"}:e.radius,"heatmap-opacity":e.opacity}),c.geojson={type:"FeatureCollection",features:f},c.heatmap.layout.visibility="visible",c}},{"../../components/color":643,"../../components/colorscale":655,"../../constants/numerical":753,"../../lib":778,"../../lib/geojson_utils":772,"fast-isnumeric":241}],1038:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/colorscale/defaults"),a=t("./attributes");e.exports=function(t,e,r,o){function s(r,i){return n.coerce(t,e,a,r,i)}var l=s("lon")||[],c=s("lat")||[],u=Math.min(l.length,c.length);u?(e._length=u,s("z"),s("radius"),s("below"),s("text"),s("hovertext"),s("hovertemplate"),i(t,e,o,s,{prefix:"",cLetter:"z"})):e.visible=!1}},{"../../components/colorscale/defaults":653,"../../lib":778,"./attributes":1035}],1039:[function(t,e,r){"use strict";e.exports=function(t,e){return t.lon=e.lon,t.lat=e.lat,t.z=e.z,t}},{}],1040:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axes"),a=t("../scattermapbox/hover");e.exports=function(t,e,r){var o=a(t,e,r);if(o){var s=o[0],l=s.cd,c=l[0].trace,u=l[s.index];if(delete s.color,"z"in u){var f=s.subplot.mockAxis;s.z=u.z,s.zLabel=i.tickText(f,f.c2l(u.z),"hover").text}return s.extraText=function(t,e,r){if(t.hovertemplate)return;var i=(e.hi||t.hoverinfo).split("+"),a=-1!==i.indexOf("all"),o=-1!==i.indexOf("lon"),s=-1!==i.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}a||o&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):o?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(a||-1!==i.indexOf("text"))&&n.fillText(e,t,c);return c.join("
    ")}(c,u,l[0].t.labels),[s]}}},{"../../lib":778,"../../plots/cartesian/axes":828,"../scattermapbox/hover":1257}],1041:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../heatmap/colorbar"),formatLabels:t("../scattermapbox/format_labels"),calc:t("./calc"),plot:t("./plot"),hoverPoints:t("./hover"),eventData:t("./event_data"),getBelow:function(t,e){for(var r=e.getMapLayers(),n=0;n=0;r--)t.removeLayer(e[r][1])},o.dispose=function(){var t=this.subplot.map;this._removeLayers(),t.removeSource(this.sourceId)},e.exports=function(t,e){var r=e[0].trace,i=new a(t,r.uid),o=i.sourceId,s=n(e),l=i.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),i}},{"../../plots/mapbox/constants":883,"./convert":1037}],1043:[function(t,e,r){"use strict";var n=t("../../lib");e.exports=function(t,e){for(var r=0;r"),s.color=function(t,e){var r=t.marker,i=e.mc||r.color,a=e.mlc||r.line.color,o=e.mlw||r.line.width;if(n(i))return i;if(n(a)&&o)return a}(c,f),[s]}}},{"../../components/color":643,"../../lib":778,"../bar/hover":928}],1051:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"funnel",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":841,"../bar/select":933,"./attributes":1044,"./calc":1045,"./cross_trace_calc":1047,"./defaults":1048,"./event_data":1049,"./hover":1050,"./layout_attributes":1052,"./layout_defaults":1053,"./plot":1054,"./style":1055}],1052:[function(t,e,r){"use strict";e.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],1053:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s path").each((function(t){if(!t.isBlank){var e=s.marker;n.select(this).call(a.fill,t.mc||e.color).call(a.stroke,t.mlc||e.line.color).call(i.dashLine,e.line.dash,t.mlw||e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".regions").each((function(){n.select(this).selectAll("path").style("stroke-width",0).call(a.fill,s.connector.fillcolor)})),r.selectAll(".lines").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":643,"../../components/drawing":665,"../../constants/interactions":752,"../bar/style":935,"../bar/uniform_text":937,d3:169}],1056:[function(t,e,r){"use strict";var n=t("../pie/attributes"),i=t("../../plots/attributes"),a=t("../../plots/domain").attributes,o=t("../../plots/template_attributes").hovertemplateAttrs,s=t("../../plots/template_attributes").texttemplateAttrs,l=t("../../lib/extend").extendFlat;e.exports={labels:n.labels,label0:n.label0,dlabel:n.dlabel,values:n.values,marker:{colors:n.marker.colors,line:{color:l({},n.marker.line.color,{dflt:null}),width:l({},n.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:n.text,hovertext:n.hovertext,scalegroup:l({},n.scalegroup,{}),textinfo:l({},n.textinfo,{flags:["label","text","value","percent"]}),texttemplate:s({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","text","percent"]}),textposition:l({},n.textposition,{values:["inside","none"],dflt:"inside"}),textfont:n.textfont,insidetextfont:n.insidetextfont,title:{text:n.title.text,font:n.title.font,position:l({},n.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:a({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},{"../../lib/extend":768,"../../plots/attributes":824,"../../plots/domain":855,"../../plots/template_attributes":906,"../pie/attributes":1161}],1057:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="funnelarea",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{"../../plots/plots":891}],1058:[function(t,e,r){"use strict";var n=t("../pie/calc");e.exports={calc:function(t,e){return n.calc(t,e)},crossTraceCalc:function(t){n.crossTraceCalc(t,{type:"funnelarea"})}}},{"../pie/calc":1163}],1059:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../plots/domain").defaults,o=t("../bar/defaults").handleText,s=t("../pie/defaults").handleLabelsAndValues;e.exports=function(t,e,r,l){function c(r,a){return n.coerce(t,e,i,r,a)}var u=c("labels"),f=c("values"),h=s(u,f),p=h.len;if(e._hasLabels=h.hasLabels,e._hasValues=h.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),p){e._length=p,c("marker.line.width")&&c("marker.line.color",l.paper_bgcolor),c("marker.colors"),c("scalegroup");var d,g=c("text"),m=c("texttemplate");if(m||(d=c("textinfo",Array.isArray(g)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),m||d&&"none"!==d){var v=c("textposition");o(t,e,l,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}a(e,l,c),c("title.text")&&(c("title.position"),n.coerceFont(c,"title.font",l.font)),c("aspectratio"),c("baseratio")}else e.visible=!1}},{"../../lib":778,"../../plots/domain":855,"../bar/defaults":925,"../pie/defaults":1164,"./attributes":1056}],1060:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"funnelarea",basePlotModule:t("./base_plot"),categories:["pie-like","funnelarea","showLegend"],attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style"),styleOne:t("../pie/style_one"),meta:{}}},{"../pie/style_one":1172,"./attributes":1056,"./base_plot":1057,"./calc":1058,"./defaults":1059,"./layout_attributes":1061,"./layout_defaults":1062,"./plot":1063,"./style":1064}],1061:[function(t,e,r){"use strict";var n=t("../pie/layout_attributes").hiddenlabels;e.exports={hiddenlabels:n,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{"../pie/layout_attributes":1168}],1062:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("hiddenlabels"),r("funnelareacolorway",e.colorway),r("extendfunnelareacolors")}},{"../../lib":778,"./layout_attributes":1061}],1063:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/drawing"),a=t("../../lib"),o=a.strScale,s=a.strTranslate,l=t("../../lib/svg_text_utils"),c=t("../bar/plot").toMoveInsideBar,u=t("../bar/uniform_text"),f=u.recordMinTextSize,h=u.clearMinTextSize,p=t("../pie/helpers"),d=t("../pie/plot"),g=d.attachFxHandlers,m=d.determineInsideTextFont,v=d.layoutAreas,y=d.prerenderTitles,x=d.positionTitleOutside,b=d.formatSliceLabel;function _(t,e){return"l"+(e[0]-t[0])+","+(e[1]-t[1])}e.exports=function(t,e){var r=t._fullLayout;h("funnelarea",r),y(e,t),v(e,r._size),a.makeTraceGroups(r._funnelarealayer,e,"trace").each((function(e){var u=n.select(this),h=e[0],d=h.trace;!function(t){if(!t.length)return;var e=t[0],r=e.trace,n=r.aspectratio,i=r.baseratio;i>.999&&(i=.999);var a,o=Math.pow(i,2),s=e.vTotal,l=s,c=s*o/(1-o)/s;function u(){var t,e={x:t=Math.sqrt(c),y:-t};return[e.x,e.y]}var f,h,p=[];for(p.push(u()),f=t.length-1;f>-1;f--)if(!(h=t[f]).hidden){var d=h.v/l;c+=d,p.push(u())}var g=1/0,m=-1/0;for(f=0;f-1;f--)if(!(h=t[f]).hidden){var M=p[k+=1][0],A=p[k][1];h.TL=[-M,A],h.TR=[M,A],h.BL=w,h.BR=T,h.pxmid=(S=h.TR,E=h.BR,[.5*(S[0]+E[0]),.5*(S[1]+E[1])]),w=h.TL,T=h.TR}var S,E}(e),u.each((function(){var u=n.select(this).selectAll("g.slice").data(e);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each((function(o,s){if(o.hidden)n.select(this).selectAll("path,g").remove();else{o.pointNumber=o.i,o.curveNumber=d.index;var u=h.cx,v=h.cy,y=n.select(this),x=y.selectAll("path.surface").data([o]);x.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),y.call(g,t,e);var w="M"+(u+o.TR[0])+","+(v+o.TR[1])+_(o.TR,o.BR)+_(o.BR,o.BL)+_(o.BL,o.TL)+"Z";x.attr("d",w),b(t,o,h);var T=p.castOption(d.textposition,o.pts),k=y.selectAll("g.slicetext").data(o.text&&"none"!==T?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each((function(){var h=a.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),p=a.ensureUniformFontSize(t,m(d,o,r.font));h.text(o.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,p).call(l.convertToTspans,t);var g,y,x,b=i.bBox(h.node()),_=Math.min(o.BL[1],o.BR[1])+v,w=Math.max(o.TL[1],o.TR[1])+v;y=Math.max(o.TL[0],o.BL[0])+u,x=Math.min(o.TR[0],o.BR[0])+u,(g=c(y,x,_,w,b,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=p.size,f(d.type,g,r),e[s].transform=g,h.attr("transform",a.getTextTransform(g))}))}}));var v=n.select(this).selectAll("g.titletext").data(d.title.text?[0]:[]);v.enter().append("g").classed("titletext",!0),v.exit().remove(),v.each((function(){var e=a.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),c=d.title.text;d._meta&&(c=a.templateString(c,d._meta)),e.text(c).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,d.title.font).call(l.convertToTspans,t);var u=x(h,r._size);e.attr("transform",s(u.x,u.y)+o(Math.min(1,u.scale))+s(u.tx,u.ty))}))}))}))}},{"../../components/drawing":665,"../../lib":778,"../../lib/svg_text_utils":803,"../bar/plot":932,"../bar/uniform_text":937,"../pie/helpers":1166,"../pie/plot":1170,d3:169}],1064:[function(t,e,r){"use strict";var n=t("d3"),i=t("../pie/style_one"),a=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._funnelarealayer.selectAll(".trace");a(t,e,"funnelarea"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(i,t,e)}))}))}},{"../bar/uniform_text":937,"../pie/style_one":1172,d3:169}],1065:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../components/colorscale/attributes"),s=(t("../../constants/docs").FORMAT_LINK,t("../../lib/extend").extendFlat);e.exports=s({z:{valType:"data_array",editType:"calc"},x:s({},n.x,{impliedEdits:{xtype:"array"}}),x0:s({},n.x0,{impliedEdits:{xtype:"scaled"}}),dx:s({},n.dx,{impliedEdits:{xtype:"scaled"}}),y:s({},n.y,{impliedEdits:{ytype:"array"}}),y0:s({},n.y0,{impliedEdits:{ytype:"scaled"}}),dy:s({},n.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:s({},n.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:s({},n.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:s({},n.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:s({},n.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:s({},n.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:s({},n.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},zhoverformat:{valType:"string",dflt:"",editType:"none"},hovertemplate:a(),showlegend:s({},i.showlegend,{dflt:!1})},{transforms:void 0},o("",{cLetter:"z",autoColorDflt:!1}))},{"../../components/colorscale/attributes":650,"../../constants/docs":748,"../../lib/extend":768,"../../plots/attributes":824,"../../plots/template_attributes":906,"../scatter/attributes":1187}],1066:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("../../plots/cartesian/align_period"),s=t("../histogram2d/calc"),l=t("../../components/colorscale/calc"),c=t("./convert_column_xyz"),u=t("./clean_2d_array"),f=t("./interp2d"),h=t("./find_empties"),p=t("./make_bound_array"),d=t("../../constants/numerical").BADNUM;function g(t){for(var e=[],r=t.length,n=0;nD){z("x scale is not linear");break}}if(x.length&&"fast"===I){var R=(x[x.length-1]-x[0])/(x.length-1),F=Math.abs(R/100);for(k=0;kF){z("y scale is not linear");break}}}var B=i.maxRowLength(T),N="scaled"===e.xtype?"":r,j=p(e,N,m,v,B,A),U="scaled"===e.ytype?"":x,V=p(e,U,b,_,T.length,S);L||(e._extremes[A._id]=a.findExtremes(A,j),e._extremes[S._id]=a.findExtremes(S,V));var q={x:j,y:V,z:T,text:e._text||e.text,hovertext:e._hovertext||e.hovertext};if(e.xperiodalignment&&y&&(q.orig_x=y),e.yperiodalignment&&w&&(q.orig_y=w),N&&N.length===j.length-1&&(q.xCenter=N),U&&U.length===V.length-1&&(q.yCenter=U),C&&(q.xRanges=M.xRanges,q.yRanges=M.yRanges,q.pts=M.pts),E||l(t,e,{vals:T,cLetter:"z"}),E&&e.contours&&"heatmap"===e.contours.coloring){var H={type:"contour"===e.type?"heatmap":"histogram2d",xcalendar:e.xcalendar,ycalendar:e.ycalendar};q.xfill=p(H,N,m,v,B,A),q.yfill=p(H,U,b,_,T.length,S)}return[q]}},{"../../components/colorscale/calc":651,"../../constants/numerical":753,"../../lib":778,"../../plots/cartesian/align_period":825,"../../plots/cartesian/axes":828,"../../registry":911,"../histogram2d/calc":1098,"./clean_2d_array":1067,"./convert_column_xyz":1069,"./find_empties":1071,"./interp2d":1074,"./make_bound_array":1075}],1067:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../../lib"),a=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r,o){var s,l,c,u,f,h;function p(t){if(n(t))return+t}if(e&&e.transpose){for(s=0,f=0;f=0;o--)(s=((f[[(r=(a=h[o])[0])-1,i=a[1]]]||g)[2]+(f[[r+1,i]]||g)[2]+(f[[r,i-1]]||g)[2]+(f[[r,i+1]]||g)[2])/20)&&(l[a]=[r,i,s],h.splice(o,1),c=!0);if(!c)throw"findEmpties iterated with no new neighbors";for(a in l)f[a]=l[a],u.push(l[a])}return u.sort((function(t,e){return e[2]-t[2]}))}},{"../../lib":778}],1072:[function(t,e,r){"use strict";var n=t("../../components/fx"),i=t("../../lib"),a=t("../../plots/cartesian/axes"),o=t("../../components/colorscale").extractOpts;e.exports=function(t,e,r,s,l,c){var u,f,h,p,d=t.cd[0],g=d.trace,m=t.xa,v=t.ya,y=d.x,x=d.y,b=d.z,_=d.xCenter,w=d.yCenter,T=d.zmask,k=g.zhoverformat,M=y,A=x;if(!1!==t.index){try{h=Math.round(t.index[1]),p=Math.round(t.index[0])}catch(e){return void i.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index)}if(h<0||h>=b[0].length||p<0||p>b.length)return}else{if(n.inbox(e-y[0],e-y[y.length-1],0)>0||n.inbox(r-x[0],r-x[x.length-1],0)>0)return;if(c){var S;for(M=[2*y[0]-y[1]],S=1;Sg&&(v=Math.max(v,Math.abs(t[a][o]-d)/(m-g))))}return v}e.exports=function(t,e){var r,i=1;for(o(t,e),r=0;r.01;r++)i=o(t,e,a(i));return i>.01&&n.log("interp2d didn't converge quickly",i),t}},{"../../lib":778}],1075:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib").isArrayOrTypedArray;e.exports=function(t,e,r,a,o,s){var l,c,u,f=[],h=n.traceIs(t,"contour"),p=n.traceIs(t,"histogram"),d=n.traceIs(t,"gl2d");if(i(e)&&e.length>1&&!p&&"category"!==s.type){var g=e.length;if(!(g<=o))return h?e.slice(0,o):e.slice(0,o+1);if(h||d)f=e.slice(0,o);else if(1===o)f=[e[0]-.5,e[0]+.5];else{for(f=[1.5*e[0]-.5*e[1]],u=1;u0;)h=p.c2p(T[y]),y--;for(h0;)v=d.c2p(k[y]),y--;if(v0&&(a=!0);for(var l=0;la){var o=a-r[t];return r[t]=a,o}}return 0},max:function(t,e,r,i){var a=i[e];if(n(a)){if(a=Number(a),!n(r[t]))return r[t]=a,a;if(r[t]c?t>o?t>1.1*i?i:t>1.1*a?a:o:t>s?s:t>l?l:c:Math.pow(10,Math.floor(Math.log(t)/Math.LN10))}function p(t,e,r,n,a,s){if(n&&t>o){var l=d(e,a,s),c=d(r,a,s),u=t===i?0:1;return l[u]!==c[u]}return Math.floor(r/t)-Math.floor(e/t)>.1}function d(t,e,r){var n=e.c2d(t,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}e.exports=function(t,e,r,n,a){var s,l,c=-1.1*e,h=-.1*e,p=t-h,d=r[0],g=r[1],m=Math.min(f(d+h,d+p,n,a),f(g+h,g+p,n,a)),v=Math.min(f(d+c,d+h,n,a),f(g+c,g+h,n,a));if(m>v&&vo){var y=s===i?1:6,x=s===i?"M12":"M1";return function(e,r){var o=n.c2d(e,i,a),s=o.indexOf("-",y);s>0&&(o=o.substr(0,s));var c=n.d2c(o,0,a);if(cr.r2l(B)&&(j=o.tickIncrement(j,b.size,!0,p)),O.start=r.l2r(j),F||i.nestedProperty(e,v+".start").set(O.start)}var U=b.end,V=r.r2l(z.end),q=void 0!==V;if((b.endFound||q)&&V!==r.r2l(U)){var H=q?V:i.aggNums(Math.max,null,d);O.end=r.l2r(H),q||i.nestedProperty(e,v+".start").set(O.end)}var G="autobin"+s;return!1===e._input[G]&&(e._input[v]=i.extendFlat({},e[v]||{}),delete e._input[G],delete e[G]),[O,d]}e.exports={calc:function(t,e){var r,a,p,d,g=[],m=[],v=o.getFromId(t,"h"===e.orientation?e.yaxis:e.xaxis),y="h"===e.orientation?"y":"x",x={x:"y",y:"x"}[y],b=e[y+"calendar"],_=e.cumulative,w=h(t,e,v,y),T=w[0],k=w[1],M="string"==typeof T.size,A=[],S=M?A:T,E=[],C=[],L=[],I=0,P=e.histnorm,z=e.histfunc,O=-1!==P.indexOf("density");_.enabled&&O&&(P=P.replace(/ ?density$/,""),O=!1);var D,R="max"===z||"min"===z?null:0,F=l.count,B=c[P],N=!1,j=function(t){return v.r2c(t,0,b)};for(i.isArrayOrTypedArray(e[x])&&"count"!==z&&(D=e[x],N="avg"===z,F=l[z]),r=j(T.start),p=j(T.end)+(r-o.tickIncrement(r,T.size,!1,b))/1e6;r=0&&d=0;n--)s(n);else if("increasing"===e){for(n=1;n=0;n--)t[n]+=t[n+1];"exclude"===r&&(t.push(0),t.shift())}}(m,_.direction,_.currentbin);var J=Math.min(g.length,m.length),K=[],Q=0,$=J-1;for(r=0;r=Q;r--)if(m[r]){$=r;break}for(r=Q;r<=$;r++)if(n(g[r])&&n(m[r])){var tt={p:g[r],s:m[r],b:0};_.enabled||(tt.pts=L[r],G?tt.ph0=tt.ph1=L[r].length?k[L[r][0]]:g[r]:(e._computePh=!0,tt.ph0=q(A[r]),tt.ph1=q(A[r+1],!0))),K.push(tt)}return 1===K.length&&(K[0].width1=o.tickIncrement(K[0].p,T.size,!1,b)-K[0].p),s(K,e),i.isArrayOrTypedArray(e.selectedpoints)&&i.tagSelected(K,e,X),K},calcAllAutoBins:h}},{"../../lib":778,"../../plots/cartesian/axes":828,"../../registry":911,"../bar/arrays_to_calcdata":920,"./average":1085,"./bin_functions":1087,"./bin_label_vals":1088,"./norm_functions":1096,"fast-isnumeric":241}],1090:[function(t,e,r){"use strict";e.exports={eventDataKeys:["binNumber"]}},{}],1091:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../plots/cartesian/axis_ids"),a=t("../../registry").traceIs,o=t("../bar/defaults").handleGroupingDefaults,s=n.nestedProperty,l=t("../../plots/cartesian/constraints").getAxisGroup,c=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],u=["x","y"];e.exports=function(t,e){var r,f,h,p,d,g,m,v=e._histogramBinOpts={},y=[],x={},b=[];function _(t,e){return n.coerce(r._input,r,r._module.attributes,t,e)}function w(t){return"v"===t.orientation?"x":"y"}function T(t,r,a){var o=t.uid+"__"+a;r||(r=o);var s=function(t,r){return i.getFromTrace({_fullLayout:e},t,r).type}(t,a),l=t[a+"calendar"]||"",c=v[r],u=!0;c&&(s===c.axType&&l===c.calendar?(u=!1,c.traces.push(t),c.dirs.push(a)):(r=o,s!==c.axType&&n.warn(["Attempted to group the bins of trace",t.index,"set on a","type:"+s,"axis","with bins on","type:"+c.axType,"axis."].join(" ")),l!==c.calendar&&n.warn(["Attempted to group the bins of trace",t.index,"set with a",l,"calendar","with bins",c.calendar?"on a "+c.calendar+" calendar":"w/o a set calendar"].join(" ")))),u&&(v[r]={traces:[t],dirs:[a],axType:s,calendar:t[a+"calendar"]||""}),t["_"+a+"bingroup"]=r}for(d=0;dS&&T.splice(S,T.length-S),A.length>S&&A.splice(S,A.length-S);var E=[],C=[],L=[],I="string"==typeof w.size,P="string"==typeof M.size,z=[],O=[],D=I?z:w,R=P?O:M,F=0,B=[],N=[],j=e.histnorm,U=e.histfunc,V=-1!==j.indexOf("density"),q="max"===U||"min"===U?null:0,H=a.count,G=o[j],Y=!1,W=[],X=[],Z="z"in e?e.z:"marker"in e&&Array.isArray(e.marker.color)?e.marker.color:"";Z&&"count"!==U&&(Y="avg"===U,H=a[U]);var J=w.size,K=x(w.start),Q=x(w.end)+(K-i.tickIncrement(K,J,!1,v))/1e6;for(r=K;r=0&&p=0&&d0||n.inbox(r-o.y0,r-(o.y0+o.h*s.dy),0)>0)){var u,f=Math.floor((e-o.x0)/s.dx),h=Math.floor(Math.abs(r-o.y0)/s.dy);if(s._hasZ?u=o.z[h][f]:s._hasSource&&(u=s._canvas.el.getContext("2d").getImageData(f,h,1,1).data),u){var p,d=o.hi||s.hoverinfo;if(d){var g=d.split("+");-1!==g.indexOf("all")&&(g=["color"]),-1!==g.indexOf("color")&&(p=!0)}var m,v=a.colormodel[s.colormodel],y=v.colormodel||s.colormodel,x=y.length,b=s._scaler(u),_=v.suffix,w=[];(s.hovertemplate||p)&&(w.push("["+[b[0]+_[0],b[1]+_[1],b[2]+_[2]].join(", ")),4===x&&w.push(", "+b[3]+_[3]),w.push("]"),w=w.join(""),t.extraText=y.toUpperCase()+": "+w),Array.isArray(s.hovertext)&&Array.isArray(s.hovertext[h])?m=s.hovertext[h][f]:Array.isArray(s.text)&&Array.isArray(s.text[h])&&(m=s.text[h][f]);var T=c.c2p(o.y0+(h+.5)*s.dy),k=o.x0+(f+.5)*s.dx,M=o.y0+(h+.5)*s.dy,A="["+u.slice(0,s.colormodel.length).join(", ")+"]";return[i.extendFlat(t,{index:[h,f],x0:l.c2p(o.x0+f*s.dx),x1:l.c2p(o.x0+(f+1)*s.dx),y0:T,y1:T,color:b,xVal:k,xLabelVal:k,yVal:M,yLabelVal:M,zLabelVal:A,text:m,hovertemplateLabels:{zLabel:A,colorLabel:w,"color[0]Label":b[0]+_[0],"color[1]Label":b[1]+_[1],"color[2]Label":b[2]+_[2],"color[3]Label":b[3]+_[3]}})]}}}},{"../../components/fx":683,"../../lib":778,"./constants":1108}],1113:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover"),eventData:t("./event_data"),moduleType:"trace",name:"image",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},{"../../plots/cartesian":841,"./attributes":1106,"./calc":1107,"./defaults":1109,"./event_data":1110,"./hover":1112,"./plot":1114,"./style":1115}],1114:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=i.strTranslate,o=t("../../constants/xmlns_namespaces"),s=t("./constants"),l=i.isIOS()||i.isSafari()||i.isIE();e.exports=function(t,e,r,c){var u=e.xaxis,f=e.yaxis,h=!(l||t._context._exportedPlot);i.makeTraceGroups(c,r,"im").each((function(e){var r=n.select(this),l=e[0],c=l.trace,p=h&&!c._hasZ&&c._hasSource&&"linear"===u.type&&"linear"===f.type;c._fastImage=p;var d,g,m,v,y,x,b=l.z,_=l.x0,w=l.y0,T=l.w,k=l.h,M=c.dx,A=c.dy;for(x=0;void 0===d&&x0;)g=u.c2p(_+x*M),x--;for(x=0;void 0===v&&x0;)y=f.c2p(w+x*A),x--;if(gP[0];if(z||O){var D=d+S/2,R=v+E/2;L+="transform:"+a(D+"px",R+"px")+"scale("+(z?-1:1)+","+(O?-1:1)+")"+a(-D+"px",-R+"px")+";"}}C.attr("style",L);var F=new Promise((function(t){if(c._hasZ)t();else if(c._hasSource)if(c._canvas&&c._canvas.el.width===T&&c._canvas.el.height===k&&c._canvas.source===c.source)t();else{var e=document.createElement("canvas");e.width=T,e.height=k;var r=e.getContext("2d");c._image=c._image||new Image;var n=c._image;n.onload=function(){r.drawImage(n,0,0),c._canvas={el:e,source:c.source},t()},n.setAttribute("src",c.source)}})).then((function(){var t;if(c._hasZ)t=B((function(t,e){return b[e][t]})).toDataURL("image/png");else if(c._hasSource)if(p)t=c.source;else{var e=c._canvas.el.getContext("2d").getImageData(0,0,T,k).data;t=B((function(t,r){var n=4*(r*T+t);return[e[n],e[n+1],e[n+2],e[n+3]]})).toDataURL("image/png")}C.attr({"xlink:href":t,height:E,width:S,x:d,y:v})}));t._promises.push(F)}function B(t){var e=document.createElement("canvas");e.width=S,e.height=E;var r,n=e.getContext("2d"),a=function(t){return i.constrain(Math.round(u.c2p(_+t*M)-d),0,S)},o=function(t){return i.constrain(Math.round(f.c2p(w+t*A)-v),0,E)},h=s.colormodel[c.colormodel],p=h.colormodel||c.colormodel,g=h.fmt;for(x=0;x0}function _(t){t.each((function(t){m.stroke(n.select(this),t.line.color)})).each((function(t){m.fill(n.select(this),t.color)})).style("stroke-width",(function(t){return t.line.width}))}function w(t,e,r){var n=t._fullLayout,a=i.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},e),o={type:"linear",_id:"x"+e._id},s={letter:"x",font:n.font,noHover:!0,noTickson:!0};function l(t,e){return i.coerce(a,o,g,t,e)}return p(a,o,l,s,n),d(a,o,l,s),o}function T(t,e,r){return[Math.min(e/t.width,r/t.height),t,e+"x"+r]}function k(t,e,r,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=n.select(a);return o.text(t).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",t).call(f.convertToTspans,i).call(c.font,e),c.bBox(o.node())}function M(t,e,r,n,a,o){var s="_cache"+e;t[s]&&t[s].key===a||(t[s]={key:a,value:r});var l=i.aggNums(o,null,[t[s].value,n],2);return t[s].value=l,l}e.exports=function(t,e,r,p){var d,g=t._fullLayout;b(r)&&p&&(d=p()),i.makeTraceGroups(g._indicatorlayer,e,"trace").each((function(e){var p,A,S,E,C,L=e[0].trace,I=n.select(this),P=L._hasGauge,z=L._isAngular,O=L._isBullet,D=L.domain,R={w:g._size.w*(D.x[1]-D.x[0]),h:g._size.h*(D.y[1]-D.y[0]),l:g._size.l+g._size.w*D.x[0],r:g._size.r+g._size.w*(1-D.x[1]),t:g._size.t+g._size.h*(1-D.y[1]),b:g._size.b+g._size.h*D.y[0]},F=R.l+R.w/2,B=R.t+R.h/2,N=Math.min(R.w/2,R.h),j=u.innerRadius*N,U=L.align||"center";if(A=B,P){if(z&&(p=F,A=B+N/2,S=function(t){return function(t,e){var r=Math.sqrt(t.width/2*(t.width/2)+t.height*t.height);return[e/r,t,e]}(t,.9*j)}),O){var V=u.bulletPadding,q=1-u.bulletNumberDomainSize+V;p=R.l+(q+(1-q)*y[U])*R.w,S=function(t){return T(t,(u.bulletNumberDomainSize-V)*R.w,R.h)}}}else p=R.l+y[U]*R.w,S=function(t){return T(t,R.w,R.h)};!function(t,e,r,s){var l,u,p,d=r[0].trace,g=s.numbersX,_=s.numbersY,T=d.align||"center",A=v[T],S=s.transitionOpts,E=s.onComplete,C=i.ensureSingle(e,"g","numbers"),L=[];d._hasNumber&&L.push("number");d._hasDelta&&(L.push("delta"),"left"===d.delta.position&&L.reverse());var I=C.selectAll("text").data(L);function P(e,r,n,i){if(!e.match("s")||n>=0==i>=0||r(n).slice(-1).match(x)||r(i).slice(-1).match(x))return r;var a=e.slice().replace("s","f").replace(/\d+/,(function(t){return parseInt(t)-1})),o=w(t,{tickformat:a});return function(t){return Math.abs(t)<1?h.tickText(o,t).text:r(t)}}I.enter().append("text"),I.attr("text-anchor",(function(){return A})).attr("class",(function(t){return t})).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),I.exit().remove();var z,O=d.mode+d.align;d._hasDelta&&(z=function(){var e=w(t,{tickformat:d.delta.valueformat},d._range);e.setScale(),h.prepTicks(e);var i=function(t){return h.tickText(e,t).text},a=function(t){return d.delta.relative?t.relativeDelta:t.delta},o=function(t,e){return 0===t||"number"!=typeof t||isNaN(t)?"-":(t>0?d.delta.increasing.symbol:d.delta.decreasing.symbol)+e(t)},s=function(t){return t.delta>=0?d.delta.increasing.color:d.delta.decreasing.color};void 0===d._deltaLastValue&&(d._deltaLastValue=a(r[0]));var l=C.select("text.delta");function p(){l.text(o(a(r[0]),i)).call(m.fill,s(r[0])).call(f.convertToTspans,t)}return l.call(c.font,d.delta.font).call(m.fill,s({delta:d._deltaLastValue})),b(S)?l.transition().duration(S.duration).ease(S.easing).tween("text",(function(){var t=n.select(this),e=a(r[0]),l=d._deltaLastValue,c=P(d.delta.valueformat,i,l,e),u=n.interpolateNumber(l,e);return d._deltaLastValue=e,function(e){t.text(o(u(e),c)),t.call(m.fill,s({delta:u(e)}))}})).each("end",(function(){p(),E&&E()})).each("interrupt",(function(){p(),E&&E()})):p(),u=k(o(a(r[0]),i),d.delta.font,A,t),l}(),O+=d.delta.position+d.delta.font.size+d.delta.font.family+d.delta.valueformat,O+=d.delta.increasing.symbol+d.delta.decreasing.symbol,p=u);d._hasNumber&&(!function(){var e=w(t,{tickformat:d.number.valueformat},d._range);e.setScale(),h.prepTicks(e);var i=function(t){return h.tickText(e,t).text},a=d.number.suffix,o=d.number.prefix,s=C.select("text.number");function u(){var e="number"==typeof r[0].y?o+i(r[0].y)+a:"-";s.text(e).call(c.font,d.number.font).call(f.convertToTspans,t)}b(S)?s.transition().duration(S.duration).ease(S.easing).each("end",(function(){u(),E&&E()})).each("interrupt",(function(){u(),E&&E()})).attrTween("text",(function(){var t=n.select(this),e=n.interpolateNumber(r[0].lastY,r[0].y);d._lastValue=r[0].y;var s=P(d.number.valueformat,i,r[0].lastY,r[0].y);return function(r){t.text(o+s(e(r))+a)}})):u(),l=k(o+i(r[0].y)+a,d.number.font,A,t)}(),O+=d.number.font.size+d.number.font.family+d.number.valueformat+d.number.suffix+d.number.prefix,p=l);if(d._hasDelta&&d._hasNumber){var D,R,F=[(l.left+l.right)/2,(l.top+l.bottom)/2],B=[(u.left+u.right)/2,(u.top+u.bottom)/2],N=.75*d.delta.font.size;"left"===d.delta.position&&(D=M(d,"deltaPos",0,-1*(l.width*y[d.align]+u.width*(1-y[d.align])+N),O,Math.min),R=F[1]-B[1],p={width:l.width+u.width+N,height:Math.max(l.height,u.height),left:u.left+D,right:l.right,top:Math.min(l.top,u.top+R),bottom:Math.max(l.bottom,u.bottom+R)}),"right"===d.delta.position&&(D=M(d,"deltaPos",0,l.width*(1-y[d.align])+u.width*y[d.align]+N,O,Math.max),R=F[1]-B[1],p={width:l.width+u.width+N,height:Math.max(l.height,u.height),left:l.left,right:u.right+D,top:Math.min(l.top,u.top+R),bottom:Math.max(l.bottom,u.bottom+R)}),"bottom"===d.delta.position&&(D=null,R=u.height,p={width:Math.max(l.width,u.width),height:l.height+u.height,left:Math.min(l.left,u.left),right:Math.max(l.right,u.right),top:l.bottom-l.height,bottom:l.bottom+u.height}),"top"===d.delta.position&&(D=null,R=l.top,p={width:Math.max(l.width,u.width),height:l.height+u.height,left:Math.min(l.left,u.left),right:Math.max(l.right,u.right),top:l.bottom-l.height-u.height,bottom:l.bottom}),z.attr({dx:D,dy:R})}(d._hasNumber||d._hasDelta)&&C.attr("transform",(function(){var t=s.numbersScaler(p);O+=t[2];var e,r=M(d,"numbersScale",1,t[0],O,Math.min);d._scaleNumbers||(r=1),e=d._isAngular?_-r*p.bottom:_-r*(p.top+p.bottom)/2,d._numbersTop=r*p.top+e;var n=p[T];"center"===T&&(n=(p.left+p.right)/2);var i=g-r*n;return i=M(d,"numbersTranslate",0,i,O,Math.max),o(i,e)+a(r)}))}(t,I,e,{numbersX:p,numbersY:A,numbersScaler:S,transitionOpts:r,onComplete:d}),P&&(E={range:L.gauge.axis.range,color:L.gauge.bgcolor,line:{color:L.gauge.bordercolor,width:0},thickness:1},C={range:L.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:L.gauge.bordercolor,width:L.gauge.borderwidth},thickness:1});var H=I.selectAll("g.angular").data(z?e:[]);H.exit().remove();var G=I.selectAll("g.angularaxis").data(z?e:[]);G.exit().remove(),z&&function(t,e,r,i){var a,c,u,f,p=r[0].trace,d=i.size,g=i.radius,m=i.innerRadius,v=i.gaugeBg,y=i.gaugeOutline,x=[d.l+d.w/2,d.t+d.h/2+g/2],T=i.gauge,k=i.layer,M=i.transitionOpts,A=i.onComplete,S=Math.PI/2;function E(t){var e=p.gauge.axis.range[0],r=(t-e)/(p.gauge.axis.range[1]-e)*Math.PI-S;return r<-S?-S:r>S?S:r}function C(t){return n.svg.arc().innerRadius((m+g)/2-t/2*(g-m)).outerRadius((m+g)/2+t/2*(g-m)).startAngle(-S)}function L(t){t.attr("d",(function(t){return C(t.thickness).startAngle(E(t.range[0])).endAngle(E(t.range[1]))()}))}T.enter().append("g").classed("angular",!0),T.attr("transform",o(x[0],x[1])),k.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),k.selectAll("g.xangularaxistick,path,text").remove(),(a=w(t,p.gauge.axis)).type="linear",a.range=p.gauge.axis.range,a._id="xangularaxis",a.setScale();var I=function(t){return(a.range[0]-t.x)/(a.range[1]-a.range[0])*Math.PI+Math.PI},P={},z=h.makeLabelFns(a,0).labelStandoff;P.xFn=function(t){var e=I(t);return Math.cos(e)*z},P.yFn=function(t){var e=I(t),r=Math.sin(e)>0?.2:1;return-Math.sin(e)*(z+t.fontSize*r)+Math.abs(Math.cos(e))*(t.fontSize*l)},P.anchorFn=function(t){var e=I(t),r=Math.cos(e);return Math.abs(r)<.1?"middle":r>0?"start":"end"},P.heightFn=function(t,e,r){var n=I(t);return-.5*(1+Math.sin(n))*r};var O=function(t){return o(x[0]+g*Math.cos(t),x[1]-g*Math.sin(t))};u=function(t){return O(I(t))};if(c=h.calcTicks(a),f=h.getTickSigns(a)[2],a.visible){f="inside"===a.ticks?-1:1;var D=(a.linewidth||1)/2;h.drawTicks(t,a,{vals:c,layer:k,path:"M"+f*D+",0h"+f*a.ticklen,transFn:function(t){var e=I(t);return O(e)+"rotate("+-s(e)+")"}}),h.drawLabels(t,a,{vals:c,layer:k,transFn:u,labelFns:P})}var R=[v].concat(p.gauge.steps),F=T.selectAll("g.bg-arc").data(R);F.enter().append("g").classed("bg-arc",!0).append("path"),F.select("path").call(L).call(_),F.exit().remove();var B=C(p.gauge.bar.thickness),N=T.selectAll("g.value-arc").data([p.gauge.bar]);N.enter().append("g").classed("value-arc",!0).append("path");var j=N.select("path");b(M)?(j.transition().duration(M.duration).ease(M.easing).each("end",(function(){A&&A()})).each("interrupt",(function(){A&&A()})).attrTween("d",(U=B,V=E(r[0].lastY),q=E(r[0].y),function(){var t=n.interpolate(V,q);return function(e){return U.endAngle(t(e))()}})),p._lastValue=r[0].y):j.attr("d","number"==typeof r[0].y?B.endAngle(E(r[0].y)):"M0,0Z");var U,V,q;j.call(_),N.exit().remove(),R=[];var H=p.gauge.threshold.value;H&&R.push({range:[H,H],color:p.gauge.threshold.color,line:{color:p.gauge.threshold.line.color,width:p.gauge.threshold.line.width},thickness:p.gauge.threshold.thickness});var G=T.selectAll("g.threshold-arc").data(R);G.enter().append("g").classed("threshold-arc",!0).append("path"),G.select("path").call(L).call(_),G.exit().remove();var Y=T.selectAll("g.gauge-outline").data([y]);Y.enter().append("g").classed("gauge-outline",!0).append("path"),Y.select("path").call(L).call(_),Y.exit().remove()}(t,0,e,{radius:N,innerRadius:j,gauge:H,layer:G,size:R,gaugeBg:E,gaugeOutline:C,transitionOpts:r,onComplete:d});var Y=I.selectAll("g.bullet").data(O?e:[]);Y.exit().remove();var W=I.selectAll("g.bulletaxis").data(O?e:[]);W.exit().remove(),O&&function(t,e,r,n){var i,a,s,l,c,f=r[0].trace,p=n.gauge,d=n.layer,g=n.gaugeBg,v=n.gaugeOutline,y=n.size,x=f.domain,T=n.transitionOpts,k=n.onComplete;p.enter().append("g").classed("bullet",!0),p.attr("transform",o(y.l,y.t)),d.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),d.selectAll("g.xbulletaxistick,path,text").remove();var M=y.h,A=f.gauge.bar.thickness*M,S=x.x[0],E=x.x[0]+(x.x[1]-x.x[0])*(f._hasNumber||f._hasDelta?1-u.bulletNumberDomainSize:1);(i=w(t,f.gauge.axis))._id="xbulletaxis",i.domain=[S,E],i.setScale(),a=h.calcTicks(i),s=h.makeTransTickFn(i),l=h.getTickSigns(i)[2],c=y.t+y.h,i.visible&&(h.drawTicks(t,i,{vals:"inside"===i.ticks?h.clipEnds(i,a):a,layer:d,path:h.makeTickPath(i,c,l),transFn:s}),h.drawLabels(t,i,{vals:a,layer:d,transFn:s,labelFns:h.makeLabelFns(i,c)}));function C(t){t.attr("width",(function(t){return Math.max(0,i.c2p(t.range[1])-i.c2p(t.range[0]))})).attr("x",(function(t){return i.c2p(t.range[0])})).attr("y",(function(t){return.5*(1-t.thickness)*M})).attr("height",(function(t){return t.thickness*M}))}var L=[g].concat(f.gauge.steps),I=p.selectAll("g.bg-bullet").data(L);I.enter().append("g").classed("bg-bullet",!0).append("rect"),I.select("rect").call(C).call(_),I.exit().remove();var P=p.selectAll("g.value-bullet").data([f.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",A).attr("y",(M-A)/2).call(_),b(T)?P.select("rect").transition().duration(T.duration).ease(T.easing).each("end",(function(){k&&k()})).each("interrupt",(function(){k&&k()})).attr("width",Math.max(0,i.c2p(Math.min(f.gauge.axis.range[1],r[0].y)))):P.select("rect").attr("width","number"==typeof r[0].y?Math.max(0,i.c2p(Math.min(f.gauge.axis.range[1],r[0].y))):0);P.exit().remove();var z=r.filter((function(){return f.gauge.threshold.value})),O=p.selectAll("g.threshold-bullet").data(z);O.enter().append("g").classed("threshold-bullet",!0).append("line"),O.select("line").attr("x1",i.c2p(f.gauge.threshold.value)).attr("x2",i.c2p(f.gauge.threshold.value)).attr("y1",(1-f.gauge.threshold.thickness)/2*M).attr("y2",(1-(1-f.gauge.threshold.thickness)/2)*M).call(m.stroke,f.gauge.threshold.line.color).style("stroke-width",f.gauge.threshold.line.width),O.exit().remove();var D=p.selectAll("g.gauge-outline").data([v]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(C).call(_),D.exit().remove()}(t,0,e,{gauge:Y,layer:W,size:R,gaugeBg:E,gaugeOutline:C,transitionOpts:r,onComplete:d});var X=I.selectAll("text.title").data(e);X.exit().remove(),X.enter().append("text").classed("title",!0),X.attr("text-anchor",(function(){return O?v.right:v[L.title.align]})).text(L.title.text).call(c.font,L.title.font).call(f.convertToTspans,t),X.attr("transform",(function(){var t,e=R.l+R.w*y[L.title.align],r=u.titlePadding,n=c.bBox(X.node());if(P){if(z)if(L.gauge.axis.visible)t=c.bBox(G.node()).top-r-n.bottom;else t=R.t+R.h/2-N/2-n.bottom-r;O&&(t=A-(n.top+n.bottom)/2,e=R.l-u.bulletPadding*R.w)}else t=L._numbersTop-r-n.bottom;return o(e,t)}))}))}},{"../../components/color":643,"../../components/drawing":665,"../../constants/alignment":745,"../../lib":778,"../../lib/svg_text_utils":803,"../../plots/cartesian/axes":828,"../../plots/cartesian/axis_defaults":830,"../../plots/cartesian/layout_attributes":842,"../../plots/cartesian/position_defaults":845,"./constants":1119,d3:169}],1123:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../mesh3d/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;var c=e.exports=l(s({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:i(),showlegend:s({},o.showlegend,{dflt:!1})},n("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,lightposition:a.lightposition,lighting:a.lighting,flatshading:a.flatshading,contour:a.contour,hoverinfo:s({},o.hoverinfo)}),"calc","nested");c.flatshading.dflt=!0,c.lighting.facenormalsepsilon.dflt=0,c.x.editType=c.y.editType=c.z.editType=c.value.editType="calc+clearAxisTypes",c.transforms=void 0},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plot_api/edit_types":810,"../../plots/attributes":824,"../../plots/template_attributes":906,"../mesh3d/attributes":1128}],1124:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc"),i=t("../streamtube/calc").processGrid,a=t("../streamtube/calc").filter;e.exports=function(t,e){e._len=Math.min(e.x.length,e.y.length,e.z.length,e.value.length),e._x=a(e.x,e._len),e._y=a(e.y,e._len),e._z=a(e.z,e._len),e._value=a(e.value,e._len);var r=i(e);e._gridFill=r.fill,e._Xs=r.Xs,e._Ys=r.Ys,e._Zs=r.Zs,e._len=r.len;for(var o=1/0,s=-1/0,l=0;l0;r--){var n=Math.min(e[r],e[r-1]),i=Math.max(e[r],e[r-1]);if(i>n&&n-1}function R(t,e){return null===t?e:t}function F(e,r,n){L();var i,a,o,l=[r],c=[n];if(s>=1)l=[r],c=[n];else if(s>0){var u=function(t,e){var r=t[0],n=t[1],i=t[2],a=function(t,e,r){for(var n=[],i=0;i-1?n[p]:C(d,g,v);h[p]=x>-1?x:P(d,g,v,R(e,y))}i=h[0],a=h[1],o=h[2],t._meshI.push(i),t._meshJ.push(a),t._meshK.push(o),++m}}function B(t,e,r,n){var i=t[3];in&&(i=n);for(var a=(t[3]-i)/(t[3]-e[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*t[s]+a*e[s];return o}function N(t,e,r){return t>=e&&t<=r}function j(t){var e=.001*(E-S);return t>=S-e&&t<=E+e}function U(e){for(var r=[],n=0;n<4;n++){var i=e[n];r.push([t._x[i],t._y[i],t._z[i],t._value[i]])}return r}function V(t,e,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o=!1,s=[N(e[0][3],n,i),N(e[1][3],n,i),N(e[2][3],n,i)];if(!s[0]&&!s[1]&&!s[2])return!1;var l=function(t,e,r){return j(e[0][3])&&j(e[1][3])&&j(e[2][3])?(F(t,e,r),!0):a<3&&V(t,e,r,S,E,++a)};if(s[0]&&s[1]&&s[2])return l(t,e,r)||o;var c=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach((function(a){if(s[a[0]]&&s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(h,u,n,i),d=B(h,f,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,o=l(t,[u,f,d],[r[a[0]],r[a[1]],-1])||o,c=!0}})),c||[[0,1,2],[1,2,0],[2,0,1]].forEach((function(a){if(s[a[0]]&&!s[a[1]]&&!s[a[2]]){var u=e[a[0]],f=e[a[1]],h=e[a[2]],p=B(f,u,n,i),d=B(h,u,n,i);o=l(t,[d,p,u],[-1,-1,r[a[0]]])||o,c=!0}})),o}function q(t,e,r,n){var i=!1,a=U(e),o=[N(a[0][3],r,n),N(a[1][3],r,n),N(a[2][3],r,n),N(a[3][3],r,n)];if(!(o[0]||o[1]||o[2]||o[3]))return i;if(o[0]&&o[1]&&o[2]&&o[3])return g&&(i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(3,0,1),n(2,3,0),n(1,2,3)}(t,a,e)||i),i;var s=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]];if(g)i=F(t,[c,u,f],[e[l[0]],e[l[1]],e[l[2]]])||i;else{var p=B(h,c,r,n),d=B(h,u,r,n),m=B(h,f,r,n);i=F(null,[p,d,m],[-1,-1,-1])||i}s=!0}})),s?i:([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach((function(l){if(o[l[0]]&&o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(f,c,r,n),d=B(f,u,r,n),m=B(h,u,r,n),v=B(h,c,r,n);g?(i=F(t,[c,v,p],[e[l[0]],-1,-1])||i,i=F(t,[u,d,m],[e[l[1]],-1,-1])||i):i=function(t,e,r){var n=function(n,i,a){F(t,[e[n],e[i],e[a]],[r[n],r[i],r[a]])};n(0,1,2),n(2,3,0)}(null,[p,d,m,v],[-1,-1,-1,-1])||i,s=!0}})),s||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach((function(l){if(o[l[0]]&&!o[l[1]]&&!o[l[2]]&&!o[l[3]]){var c=a[l[0]],u=a[l[1]],f=a[l[2]],h=a[l[3]],p=B(u,c,r,n),d=B(f,c,r,n),m=B(h,c,r,n);g?(i=F(t,[c,p,d],[e[l[0]],-1,-1])||i,i=F(t,[c,d,m],[e[l[0]],-1,-1])||i,i=F(t,[c,m,p],[e[l[0]],-1,-1])||i):i=F(null,[p,d,m],[-1,-1,-1])||i,s=!0}})),i)}function H(t,e,r,n,i,a,o,s,l,c,u){var f=!1;return d&&(D(t,"A")&&(f=q(null,[e,r,n,a],c,u)||f),D(t,"B")&&(f=q(null,[r,n,i,l],c,u)||f),D(t,"C")&&(f=q(null,[r,a,o,l],c,u)||f),D(t,"D")&&(f=q(null,[n,a,s,l],c,u)||f),D(t,"E")&&(f=q(null,[r,n,a,l],c,u)||f)),g&&(f=q(t,[r,n,a,l],c,u)||f),f}function G(t,e,r,n,i,a,o,s){return[!0===s[0]||V(t,U([e,r,n]),[e,r,n],a,o),!0===s[1]||V(t,U([n,i,e]),[n,i,e],a,o)]}function Y(t,e,r,n,i,a,o,s,l){return s?G(t,e,r,i,n,a,o,l):G(t,r,i,n,e,a,o,l)}function W(t,e,r,n,i,a,o){var s,l,c,u,f=!1,h=function(){f=V(t,[s,l,c],[-1,-1,-1],i,a)||f,f=V(t,[c,u,s],[-1,-1,-1],i,a)||f},p=o[0],d=o[1],g=o[2];return p&&(s=z(U([k(e,r-0,n-0)])[0],U([k(e-1,r-0,n-0)])[0],p),l=z(U([k(e,r-0,n-1)])[0],U([k(e-1,r-0,n-1)])[0],p),c=z(U([k(e,r-1,n-1)])[0],U([k(e-1,r-1,n-1)])[0],p),u=z(U([k(e,r-1,n-0)])[0],U([k(e-1,r-1,n-0)])[0],p),h()),d&&(s=z(U([k(e-0,r,n-0)])[0],U([k(e-0,r-1,n-0)])[0],d),l=z(U([k(e-0,r,n-1)])[0],U([k(e-0,r-1,n-1)])[0],d),c=z(U([k(e-1,r,n-1)])[0],U([k(e-1,r-1,n-1)])[0],d),u=z(U([k(e-1,r,n-0)])[0],U([k(e-1,r-1,n-0)])[0],d),h()),g&&(s=z(U([k(e-0,r-0,n)])[0],U([k(e-0,r-0,n-1)])[0],g),l=z(U([k(e-0,r-1,n)])[0],U([k(e-0,r-1,n-1)])[0],g),c=z(U([k(e-1,r-1,n)])[0],U([k(e-1,r-1,n-1)])[0],g),u=z(U([k(e-1,r-0,n)])[0],U([k(e-1,r-0,n-1)])[0],g),h()),f}function X(t,e,r,n,i,a,o,s,l,c,u,f){var h=t;return f?(d&&"even"===t&&(h=null),H(h,e,r,n,i,a,o,s,l,c,u)):(d&&"odd"===t&&(h=null),H(h,l,s,o,a,i,n,r,e,c,u))}function Z(t,e,r,n,i){for(var a=[],o=0,s=0;sMath.abs(d-A)?[M,d]:[d,A];$(e,T[0],T[1])}}var C=[[Math.min(S,A),Math.max(S,A)],[Math.min(M,E),Math.max(M,E)]];["x","y","z"].forEach((function(e){for(var r=[],n=0;n0&&(u.push(p.id),"x"===e?f.push([p.distRatio,0,0]):"y"===e?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else c=nt(1,"x"===e?b-1:"y"===e?_-1:w-1);u.length>0&&(r[i]="x"===e?tt(null,u,a,o,f,r[i]):"y"===e?et(null,u,a,o,f,r[i]):rt(null,u,a,o,f,r[i]),i++),c.length>0&&(r[i]="x"===e?Z(null,c,a,o,r[i]):"y"===e?J(null,c,a,o,r[i]):K(null,c,a,o,r[i]),i++)}var d=t.caps[e];d.show&&d.fill&&(O(d.fill),r[i]="x"===e?Z(null,[0,b-1],a,o,r[i]):"y"===e?J(null,[0,_-1],a,o,r[i]):K(null,[0,w-1],a,o,r[i]),i++)}})),0===m&&I(),t._meshX=n,t._meshY=i,t._meshZ=a,t._meshIntensity=o,t._Xs=v,t._Ys=y,t._Zs=x}(),t}e.exports={findNearestOnAxis:l,generateIsoMeshes:h,createIsosurfaceTrace:function(t,e){var r=t.glplot.gl,i=n({gl:r}),a=new c(t,i,e.uid);return i._trace=a,a.update(e),t.glplot.add(i),a}}},{"../../components/colorscale":655,"../../lib/gl_format_color":774,"../../lib/str2rgbarray":802,"../../plots/gl3d/zip3":881,"gl-mesh3d":309}],1126:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("../../components/colorscale/defaults");function s(t,e,r,n,a){var s=a("isomin"),l=a("isomax");null!=l&&null!=s&&s>l&&(e.isomin=null,e.isomax=null);var c=a("x"),u=a("y"),f=a("z"),h=a("value");c&&c.length&&u&&u.length&&f&&f.length&&h&&h.length?(i.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x","y","z"],n),["x","y","z"].forEach((function(t){var e="caps."+t;a(e+".show")&&a(e+".fill");var r="slices."+t;a(r+".show")&&(a(r+".fill"),a(r+".locations"))})),a("spaceframe.show")&&a("spaceframe.fill"),a("surface.show")&&(a("surface.count"),a("surface.fill"),a("surface.pattern")),a("contour.show")&&(a("contour.color"),a("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach((function(t){a(t)})),o(t,e,n,a,{prefix:"",cLetter:"c"}),e._length=null):e.visible=!1}e.exports={supplyDefaults:function(t,e,r,i){s(t,e,r,i,(function(r,i){return n.coerce(t,e,a,r,i)}))},supplyIsoDefaults:s}},{"../../components/colorscale/defaults":653,"../../lib":778,"../../registry":911,"./attributes":1123}],1127:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,calc:t("./calc"),colorbar:{min:"cmin",max:"cmax"},plot:t("./convert").createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","showLegend"],meta:{}}},{"../../plots/gl3d":870,"./attributes":1123,"./calc":1124,"./convert":1125,"./defaults":1126}],1128:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/template_attributes").hovertemplateAttrs,a=t("../surface/attributes"),o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat;e.exports=s({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:i({editType:"calc"}),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},n("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:a.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:s({},a.contours.x.show,{}),color:a.contours.x.color,width:a.contours.x.width,editType:"calc"},lightposition:{x:s({},a.lightposition.x,{dflt:1e5}),y:s({},a.lightposition.y,{dflt:1e5}),z:s({},a.lightposition.z,{dflt:0}),editType:"calc"},lighting:s({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},a.lighting),hoverinfo:s({},o.hoverinfo,{editType:"calc"}),showlegend:s({},o.showlegend,{dflt:!1})})},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plots/attributes":824,"../../plots/template_attributes":906,"../surface/attributes":1311}],1129:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.intensity&&n(t,e,{vals:e.intensity,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":651}],1130:[function(t,e,r){"use strict";var n=t("gl-mesh3d"),i=t("delaunay-triangulate"),a=t("alpha-shape"),o=t("convex-hull"),s=t("../../lib/gl_format_color").parseColorScale,l=t("../../lib/str2rgbarray"),c=t("../../components/colorscale").extractOpts,u=t("../../plots/gl3d/zip3");function f(t,e,r){this.scene=t,this.uid=r,this.mesh=e,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var h=f.prototype;function p(t){for(var e=[],r=t.length,n=0;n=e-.5)return!1;return!0}h.handlePick=function(t){if(t.object===this.mesh){var e=t.index=t.data.index;t.data._cellCenter?t.traceCoordinate=t.data.dataCoordinate:t.traceCoordinate=[this.data.x[e],this.data.y[e],this.data.z[e]];var r=this.data.hovertext||this.data.text;return Array.isArray(r)&&void 0!==r[e]?t.textLabel=r[e]:r&&(t.textLabel=r),!0}},h.update=function(t){var e=this.scene,r=e.fullSceneLayout;this.data=t;var n,f=t.x.length,h=u(d(r.xaxis,t.x,e.dataScale[0],t.xcalendar),d(r.yaxis,t.y,e.dataScale[1],t.ycalendar),d(r.zaxis,t.z,e.dataScale[2],t.zcalendar));if(t.i&&t.j&&t.k){if(t.i.length!==t.j.length||t.j.length!==t.k.length||!m(t.i,f)||!m(t.j,f)||!m(t.k,f))return;n=u(g(t.i),g(t.j),g(t.k))}else n=0===t.alphahull?o(h):t.alphahull>0?a(t.alphahull,h):function(t,e){for(var r=["x","y","z"].indexOf(t),n=[],a=e.length,o=0;ov):m=M>w,v=M;var A=c(w,T,k,M);A.pos=_,A.yc=(w+M)/2,A.i=b,A.dir=m?"increasing":"decreasing",A.x=A.pos,A.y=[k,T],y&&(A.orig_p=r[b]),d&&(A.tx=e.text[b]),g&&(A.htx=e.hovertext[b]),x.push(A)}else x.push({pos:_,empty:!0})}return e._extremes[l._id]=a.findExtremes(l,n.concat(h,f),{padded:!0}),x.length&&(x[0].t={labels:{open:i(t,"open:")+" ",high:i(t,"high:")+" ",low:i(t,"low:")+" ",close:i(t,"close:")+" "}}),x}e.exports={calc:function(t,e){var r=a.getFromId(t,e.xaxis),i=a.getFromId(t,e.yaxis),s=function(t,e,r){var i=r._minDiff;if(!i){var a,s=t._fullData,l=[];for(i=1/0,a=0;a"+c.labels[x]+n.hoverLabelText(s,b):((y=i.extendFlat({},h)).y0=y.y1=_,y.yLabelVal=b,y.yLabel=c.labels[x]+n.hoverLabelText(s,b),y.name="",f.push(y),m[b]=y)}return f}function h(t,e,r,i){var a=t.cd,o=t.ya,l=a[0].trace,f=a[0].t,h=u(t,e,r,i);if(!h)return[];var p=a[h.index],d=h.index=p.i,g=p.dir;function m(t){return f.labels[t]+n.hoverLabelText(o,l[t][d])}var v=p.hi||l.hoverinfo,y=v.split("+"),x="all"===v,b=x||-1!==y.indexOf("y"),_=x||-1!==y.indexOf("text"),w=b?[m("open"),m("high"),m("low"),m("close")+" "+c[g]]:[];return _&&s(p,l,w),h.extraText=w.join("
    "),h.y0=h.y1=o.c2p(p.yc,!0),[h]}e.exports={hoverPoints:function(t,e,r,n){return t.cd[0].trace.hoverlabel.split?f(t,e,r,n):h(t,e,r,n)},hoverSplit:f,hoverOnPoints:h}},{"../../components/color":643,"../../components/fx":683,"../../constants/delta.js":747,"../../lib":778,"../../plots/cartesian/axes":828}],1137:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"ohlc",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","showLegend"],meta:{},attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc").calc,plot:t("./plot"),style:t("./style"),hoverPoints:t("./hover").hoverPoints,selectPoints:t("./select")}},{"../../plots/cartesian":841,"./attributes":1133,"./calc":1134,"./defaults":1135,"./hover":1136,"./plot":1139,"./select":1140,"./style":1141}],1138:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib");e.exports=function(t,e,r,a){var o=r("x"),s=r("open"),l=r("high"),c=r("low"),u=r("close");if(r("hoverlabel.split"),n.getComponentMethod("calendars","handleTraceDefaults")(t,e,["x"],a),s&&l&&c&&u){var f=Math.min(s.length,l.length,c.length,u.length);return o&&(f=Math.min(f,i.minRowLength(o))),e._length=f,f}}},{"../../lib":778,"../../registry":911}],1139:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib");e.exports=function(t,e,r,a){var o=e.yaxis,s=e.xaxis,l=!!s.rangebreaks;i.makeTraceGroups(a,r,"trace ohlc").each((function(t){var e=n.select(this),r=t[0],a=r.t;if(!0!==r.trace.visible||a.empty)e.remove();else{var c=a.tickLen,u=e.selectAll("path").data(i.identity);u.enter().append("path"),u.exit().remove(),u.attr("d",(function(t){if(t.empty)return"M0,0Z";var e=s.c2p(t.pos-c,!0),r=s.c2p(t.pos+c,!0),n=l?(e+r)/2:s.c2p(t.pos,!0);return"M"+e+","+o.c2p(t.o,!0)+"H"+n+"M"+n+","+o.c2p(t.h,!0)+"V"+o.c2p(t.l,!0)+"M"+r+","+o.c2p(t.c,!0)+"H"+n}))}}))}},{"../../lib":778,d3:169}],1140:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n=t.cd,i=t.xaxis,a=t.yaxis,o=[],s=n[0].t.bPos||0;if(!1===e)for(r=0;r=t.length)return!1;if(void 0!==e[t[r]])return!1;e[t[r]]=!0}return!0}(t.map((function(t){return t.displayindex}))))for(e=0;e0;c&&(o="array");var u=r("categoryorder",o);"array"===u?(r("categoryarray"),r("ticktext")):(delete t.categoryarray,delete t.ticktext),c||"array"!==u||(e.categoryorder="trace")}}e.exports=function(t,e,r,f){function h(r,i){return n.coerce(t,e,l,r,i)}var p=s(t,e,{name:"dimensions",handleItemDefaults:u}),d=function(t,e,r,o,s){s("line.shape"),s("line.hovertemplate");var l=s("line.color",o.colorway[0]);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,f,h);o(e,f,h),Array.isArray(p)&&p.length||(e.visible=!1),c(e,p,"values",d),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var g={family:f.font.family,size:Math.round(f.font.size),color:f.font.color};n.coerceFont(h,"labelfont",g);var m={family:f.font.family,size:Math.round(f.font.size/1.2),color:f.font.color};n.coerceFont(h,"tickfont",m)}},{"../../components/colorscale/defaults":653,"../../components/colorscale/helpers":654,"../../lib":778,"../../plots/array_container_defaults":823,"../../plots/domain":855,"../parcoords/merge_length":1158,"./attributes":1142}],1146:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:t("./base_plot"),categories:["noOpacity"],meta:{}}},{"./attributes":1142,"./base_plot":1143,"./calc":1144,"./defaults":1145,"./plot":1148}],1147:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plot_api/plot_api"),a=t("../../components/fx"),o=t("../../lib"),s=o.strTranslate,l=t("../../components/drawing"),c=t("tinycolor2"),u=t("../../lib/svg_text_utils");function f(t,e,r,i){var a=t.map(R.bind(0,e,r)),c=i.selectAll("g.parcatslayer").data([null]);c.enter().append("g").attr("class","parcatslayer").style("pointer-events","all");var f=c.selectAll("g.trace.parcats").data(a,h),v=f.enter().append("g").attr("class","trace parcats");f.attr("transform",(function(t){return s(t.x,t.y)})),v.append("g").attr("class","paths");var y=f.select("g.paths").selectAll("path.path").data((function(t){return t.paths}),h);y.attr("fill",(function(t){return t.model.color}));var _=y.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",(function(t){return t.model.color})).attr("fill-opacity",0);b(_),y.attr("d",(function(t){return t.svgD})),_.empty()||y.sort(d),y.exit().remove(),y.on("mouseover",g).on("mouseout",m).on("click",x),v.append("g").attr("class","dimensions");var k=f.select("g.dimensions").selectAll("g.dimension").data((function(t){return t.dimensions}),h);k.enter().append("g").attr("class","dimension"),k.attr("transform",(function(t){return s(t.x,0)})),k.exit().remove();var M=k.selectAll("g.category").data((function(t){return t.categories}),h),A=M.enter().append("g").attr("class","category");M.attr("transform",(function(t){return s(0,t.y)})),A.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})),w(A);var S=M.selectAll("rect.bandrect").data((function(t){return t.bands}),h);S.each((function(){o.raiseToTop(this)})),S.attr("fill",(function(t){return t.color}));var z=S.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",(function(t){return t.color})).attr("fill-opacity",0);S.attr("fill",(function(t){return t.color})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return t.y})).attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"perpendicular"===t.parcatsViewModel.arrangement?"ns-resize":"move"})),T(z),S.exit().remove(),A.append("text").attr("class","catlabel").attr("pointer-events","none");var O=e._fullLayout.paper_bgcolor;M.select("text.catlabel").attr("text-anchor",(function(t){return p(t)?"start":"end"})).attr("alignment-baseline","middle").style("text-shadow",O+" -1px 1px 2px, "+O+" 1px 1px 2px, "+O+" 1px -1px 2px, "+O+" -1px -1px 2px").style("fill","rgb(0, 0, 0)").attr("x",(function(t){return p(t)?t.width+5:-5})).attr("y",(function(t){return t.height/2})).text((function(t){return t.model.categoryLabel})).each((function(t){l.font(n.select(this),t.parcatsViewModel.categorylabelfont),u.convertToTspans(n.select(this),e)})),A.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",(function(t){return"fixed"===t.parcatsViewModel.arrangement?"default":"ew-resize"})).attr("x",(function(t){return t.width/2})).attr("y",-5).text((function(t,e){return 0===e?t.parcatsViewModel.model.dimensions[t.model.dimensionInd].dimensionLabel:null})).each((function(t){l.font(n.select(this),t.parcatsViewModel.labelfont)})),M.selectAll("rect.bandrect").on("mouseover",E).on("mouseout",C),M.exit().remove(),k.call(n.behavior.drag().origin((function(t){return{x:t.x,y:0}})).on("dragstart",L).on("drag",I).on("dragend",P)),f.each((function(t){t.traceSelection=n.select(this),t.pathSelection=n.select(this).selectAll("g.paths").selectAll("path.path"),t.dimensionSelection=n.select(this).selectAll("g.dimensions").selectAll("g.dimension")})),f.exit().remove()}function h(t){return t.key}function p(t){var e=t.parcatsViewModel.dimensions.length,r=t.parcatsViewModel.dimensions[e-1].model.dimensionInd;return t.model.dimensionInd===r}function d(t,e){return t.model.rawColor>e.model.rawColor?1:t.model.rawColor"),C=n.mouse(f)[0];a.loneHover({trace:h,x:b-d.left+g.left,y:w-d.top+g.top,text:E,color:t.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:T,idealAlign:C1&&h.displayInd===f.dimensions.length-1?(i=c.left,a="left"):(i=c.left+c.width,a="right");var g=u.model.count,m=u.model.categoryLabel,v=g/u.parcatsViewModel.model.count,y={countLabel:g,categoryLabel:m,probabilityLabel:v.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",y.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var b=x.join("
    ");return{trace:p,x:o*(i-e.left),y:s*(d-e.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:p.hovertemplate,hovertemplateLabels:y,eventData:[{data:p._input,fullData:p,count:g,category:m,probability:v}]}}function E(t){if(!t.parcatsViewModel.dragDimension&&-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(n.mouse(this)[1]<-1)return;var e,r=t.parcatsViewModel.graphDiv,i=r._fullLayout,s=i._paperdiv.node().getBoundingClientRect(),l=t.parcatsViewModel.hoveron;if("color"===l?(!function(t){var e=n.select(t).datum(),r=k(e);_(r),r.each((function(){o.raiseToTop(this)})),n.select(t.parentNode).selectAll("rect.bandrect").filter((function(t){return t.color===e.color})).each((function(){o.raiseToTop(this),n.select(this).attr("stroke","black").attr("stroke-width",1.5)}))}(this),A(this,"plotly_hover",n.event)):(!function(t){n.select(t.parentNode).selectAll("rect.bandrect").each((function(t){var e=k(t);_(e),e.each((function(){o.raiseToTop(this)}))})),n.select(t.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(this),M(this,"plotly_hover",n.event)),-1===t.parcatsViewModel.hoverinfoItems.indexOf("none"))"category"===l?e=S(r,s,this):"color"===l?e=function(t,e,r){t._fullLayout._calcInverseTransform(t);var i,a,o=t._fullLayout._invScaleX,s=t._fullLayout._invScaleY,l=r.getBoundingClientRect(),u=n.select(r).datum(),f=u.categoryViewModel,h=f.parcatsViewModel,p=h.model.dimensions[f.model.dimensionInd],d=h.trace,g=l.y+l.height/2;h.dimensions.length>1&&p.displayInd===h.dimensions.length-1?(i=l.left,a="left"):(i=l.left+l.width,a="right");var m=f.model.categoryLabel,v=u.parcatsViewModel.model.count,y=0;u.categoryViewModel.bands.forEach((function(t){t.color===u.color&&(y+=t.count)}));var x=f.model.count,b=0;h.pathSelection.each((function(t){t.model.color===u.color&&(b+=t.model.count)}));var _=y/v,w=y/b,T=y/x,k={countLabel:v,categoryLabel:m,probabilityLabel:_.toFixed(3)},M=[];-1!==f.parcatsViewModel.hoverinfoItems.indexOf("count")&&M.push(["Count:",k.countLabel].join(" ")),-1!==f.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(M.push("P(color \u2229 "+m+"): "+k.probabilityLabel),M.push("P("+m+" | color): "+w.toFixed(3)),M.push("P(color | "+m+"): "+T.toFixed(3)));var A=M.join("
    "),S=c.mostReadable(u.color,["black","white"]);return{trace:d,x:o*(i-e.left),y:s*(g-e.top),text:A,color:u.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:S,fontSize:10,idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:k,eventData:[{data:d._input,fullData:d,category:m,count:v,probability:_,categorycount:x,colorcount:b,bandcolorcount:y}]}}(r,s,this):"dimension"===l&&(e=function(t,e,r){var i=[];return n.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each((function(){i.push(S(t,e,this))})),i}(r,s,this)),e&&a.loneHover(e,{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:r})}}function C(t){var e=t.parcatsViewModel;if(!e.dragDimension&&(b(e.pathSelection),w(e.dimensionSelection.selectAll("g.category")),T(e.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),a.loneUnhover(e.graphDiv._fullLayout._hoverlayer.node()),e.pathSelection.sort(d),-1===e.hoverinfoItems.indexOf("skip"))){"color"===t.parcatsViewModel.hoveron?A(this,"plotly_unhover",n.event):M(this,"plotly_unhover",n.event)}}function L(t){"fixed"!==t.parcatsViewModel.arrangement&&(t.dragDimensionDisplayInd=t.model.displayInd,t.initialDragDimensionDisplayInds=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),t.dragHasMoved=!1,t.dragCategoryDisplayInd=null,n.select(this).selectAll("g.category").select("rect.catrect").each((function(e){var r=n.mouse(this)[0],i=n.mouse(this)[1];-2<=r&&r<=e.width+2&&-2<=i&&i<=e.height+2&&(t.dragCategoryDisplayInd=e.model.displayInd,t.initialDragCategoryDisplayInds=t.model.categories.map((function(t){return t.displayInd})),e.model.dragY=e.y,o.raiseToTop(this.parentNode),n.select(this.parentNode).selectAll("rect.bandrect").each((function(e){e.yf.y+f.height/2&&(o.model.displayInd=f.model.displayInd,f.model.displayInd=l),t.dragCategoryDisplayInd=o.model.displayInd}if(null===t.dragCategoryDisplayInd||"freeform"===t.parcatsViewModel.arrangement){a.model.dragX=n.event.x;var h=t.parcatsViewModel.dimensions[r],p=t.parcatsViewModel.dimensions[i];void 0!==h&&a.model.dragXp.x&&(a.model.displayInd=p.model.displayInd,p.model.displayInd=t.dragDimensionDisplayInd),t.dragDimensionDisplayInd=a.model.displayInd}N(t.parcatsViewModel),B(t.parcatsViewModel),D(t.parcatsViewModel),O(t.parcatsViewModel)}}function P(t){if("fixed"!==t.parcatsViewModel.arrangement&&null!==t.dragDimensionDisplayInd){n.select(this).selectAll("text").attr("font-weight","normal");var e={},r=z(t.parcatsViewModel),a=t.parcatsViewModel.model.dimensions.map((function(t){return t.displayInd})),o=t.initialDragDimensionDisplayInds.some((function(t,e){return t!==a[e]}));o&&a.forEach((function(r,n){var i=t.parcatsViewModel.model.dimensions[n].containerInd;e["dimensions["+i+"].displayindex"]=r}));var s=!1;if(null!==t.dragCategoryDisplayInd){var l=t.model.categories.map((function(t){return t.displayInd}));if(s=t.initialDragCategoryDisplayInds.some((function(t,e){return t!==l[e]}))){var c=t.model.categories.slice().sort((function(t,e){return t.displayInd-e.displayInd})),u=c.map((function(t){return t.categoryValue})),f=c.map((function(t){return t.categoryLabel}));e["dimensions["+t.model.containerInd+"].categoryarray"]=[u],e["dimensions["+t.model.containerInd+"].ticktext"]=[f],e["dimensions["+t.model.containerInd+"].categoryorder"]="array"}}if(-1===t.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!t.dragHasMoved&&t.potentialClickBand&&("color"===t.parcatsViewModel.hoveron?A(t.potentialClickBand,"plotly_click",n.event.sourceEvent):M(t.potentialClickBand,"plotly_click",n.event.sourceEvent)),t.model.dragX=null,null!==t.dragCategoryDisplayInd)t.parcatsViewModel.dimensions[t.dragDimensionDisplayInd].categories[t.dragCategoryDisplayInd].model.dragY=null,t.dragCategoryDisplayInd=null;t.dragDimensionDisplayInd=null,t.parcatsViewModel.dragDimension=null,t.dragHasMoved=null,t.potentialClickBand=null,N(t.parcatsViewModel),B(t.parcatsViewModel),n.transition().duration(300).ease("cubic-in-out").each((function(){D(t.parcatsViewModel,!0),O(t.parcatsViewModel,!0)})).each("end",(function(){(o||s)&&i.restyle(t.parcatsViewModel.graphDiv,e,[r])}))}}function z(t){for(var e,r=t.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(e[s+1]+i)+" "+l[s]+","+(e[s]+i)+" "+(t[s]+r[s])+","+(e[s]+i),u+="l-"+r[s]+",0 ";return u+="Z"}function B(t){var e=t.dimensions,r=t.model,n=e.map((function(t){return t.categories.map((function(t){return t.y}))})),i=t.model.dimensions.map((function(t){return t.categories.map((function(t){return t.displayInd}))})),a=t.model.dimensions.map((function(t){return t.displayInd})),o=t.dimensions.map((function(t){return t.model.dimensionInd})),s=e.map((function(t){return t.x})),l=e.map((function(t){return t.width})),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function f(t){var e=t.categoryInds.map((function(t,e){return i[e][t]}));return o.map((function(t){return e[t]}))}c.sort((function(e,r){var n=f(e),i=f(r);return"backward"===t.sortpaths&&(n.reverse(),i.reverse()),n.push(e.valueInds[0]),i.push(r.valueInds[0]),t.bundlecolors&&(n.unshift(e.rawColor),i.unshift(r.rawColor)),ni?1:0}));for(var h=new Array(c.length),p=e[0].model.count,d=e[0].categories.map((function(t){return t.height})).reduce((function(t,e){return t+e})),g=0;g0?d*(v.count/p):0;for(var y,x=new Array(n.length),b=0;b1?(t.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],f=t.model.maxCats,h=e.categories.length,p=e.count,d=t.height-8*(f-1),g=8*(f-h)/2,m=e.categories.map((function(t){return{displayInd:t.displayInd,categoryInd:t.categoryInd}}));for(m.sort((function(t,e){return t.displayInd-e.displayInd})),c=0;c0?o.count/p*d:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:g,bands:[],parcatsViewModel:t},g=g+a+8,u.push(s);return{key:e.dimensionInd,x:null!==e.dragX?e.dragX:r,y:0,width:16,model:e,categories:u,parcatsViewModel:t,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}e.exports=function(t,e,r,n){f(r,t,n,e)}},{"../../components/drawing":665,"../../components/fx":683,"../../lib":778,"../../lib/svg_text_utils":803,"../../plot_api/plot_api":814,d3:169,tinycolor2:576}],1148:[function(t,e,r){"use strict";var n=t("./parcats");e.exports=function(t,e,r,i){var a=t._fullLayout,o=a._paper,s=a._size;n(t,o,e,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},r,i)}},{"./parcats":1147}],1149:[function(t,e,r){"use strict";var n=t("../../components/colorscale/attributes"),i=t("../../plots/cartesian/layout_attributes"),a=t("../../plots/font_attributes"),o=t("../../plots/domain").attributes,s=t("../../lib/extend").extendFlat,l=t("../../plot_api/plot_template").templatedArray;e.exports={domain:o({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:a({editType:"plot"}),tickfont:a({editType:"plot"}),rangefont:a({editType:"plot"}),dimensions:l("dimension",{label:{valType:"string",editType:"plot"},tickvals:s({},i.tickvals,{editType:"plot"}),ticktext:s({},i.ticktext,{editType:"plot"}),tickformat:s({},i.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:s({editType:"calc"},n("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"}))}},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plot_api/plot_template":817,"../../plots/cartesian/layout_attributes":842,"../../plots/domain":855,"../../plots/font_attributes":856}],1150:[function(t,e,r){"use strict";var n=t("./constants"),i=t("d3"),a=t("../../lib/gup").keyFun,o=t("../../lib/gup").repeat,s=t("../../lib").sorterAsc,l=t("../../lib").strTranslate,c=n.bar.snapRatio;function u(t,e){return t*(1-c)+e*c}var f=n.bar.snapClose;function h(t,e){return t*(1-f)+e*f}function p(t,e,r,n){if(function(t,e){for(var r=0;r=e[r][0]&&t<=e[r][1])return!0;return!1}(r,n))return r;var i=t?-1:1,a=0,o=e.length-1;if(i<0){var s=a;a=o,o=s}for(var l=e[a],c=l,f=a;i*fe){h=r;break}}if(a=u,isNaN(a)&&(a=isNaN(f)||isNaN(h)?isNaN(f)?h:f:e-c[f][1]t[1]+r||e=.9*t[1]+.1*t[0]?"n":e<=.9*t[0]+.1*t[1]?"s":"ns"}(d,e);g&&(o.interval=l[a],o.intervalPix=d,o.region=g)}}if(t.ordinal&&!o.region){var m=t.unitTickvals,y=t.unitToPaddedPx.invert(e);for(r=0;r=x[0]&&y<=x[1]){o.clickableOrdinalRange=x;break}}}return o}function w(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[r-a.grabPoint,r+a.barLength-a.grabPoint].map(e.unitToPaddedPx.invert):a.newExtent=[a.startExtent,e.unitToPaddedPx.invert(r)].sort(s),e.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(e),b(t.parentNode)}function T(t,e){var r=_(e,e.height-i.mouse(t)[1]-2*n.verticalPadding),a="crosshair";r.clickableOrdinalRange?a="pointer":r.region&&(a=r.region+"-resize"),i.select(document.body).style("cursor",a)}function k(t){t.on("mousemove",(function(t){i.event.preventDefault(),t.parent.inBrushDrag||T(this,t)})).on("mouseleave",(function(t){t.parent.inBrushDrag||y()})).call(i.behavior.drag().on("dragstart",(function(t){!function(t,e){i.event.sourceEvent.stopPropagation();var r=e.height-i.mouse(t)[1]-2*n.verticalPadding,a=e.unitToPaddedPx.invert(r),o=e.brush,s=_(e,r),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(e.unitToPaddedPx);c.grabPoint=r-u[0]-n.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=e.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter((function(t){return t[0]!==l[0]&&t[1]!==l[1]}))),c.startExtent=s.region?l["s"===s.region?1:0]:a,e.parent.inBrushDrag=!0,c.brushStartCallback()}(this,t)})).on("drag",(function(t){w(this,t)})).on("dragend",(function(t){!function(t,e){var r=e.brush,n=r.filter,a=r.svgBrush;a._dragging||(T(t,e),w(t,e),e.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,e.parent.inBrushDrag=!1,y(),!a.wasDragged)return a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&e.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&A(r)):A(r),a.brushCallback(e),b(t.parentNode),void a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);var s=function(){n.set(n.getConsolidated())};if(e.ordinal){var l=e.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||A(r),a.brushCallback(e),c?b(t.parentNode,s):(s(),b(t.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,t)})))}function M(t,e){return t[0]-e[0]}function A(t){t.filterSpecified=!1,t.svgBrush.extent=[[-1/0,1/0]]}function S(t){for(var e,r=t.slice(),n=[],i=r.shift();i;){for(e=i.slice();(i=r.shift())&&i[0]<=e[1];)e[1]=Math.max(e[1],i[1]);n.push(e)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}e.exports={makeBrush:function(t,e,r,n,i,a){var o,l=function(){var t,e,r=[];return{set:function(n){1===(r=n.map((function(t){return t.slice().sort(s)})).sort(M)).length&&r[0][0]===-1/0&&r[0][1]===1/0&&(r=[[0,-1]]),t=S(r),e=r.reduce((function(t,e){return[Math.min(t[0],e[0]),Math.max(t[1],e[1])]}),[1/0,-1/0])},get:function(){return r.slice()},getConsolidated:function(){return t},getBounds:function(){return e}}}();return l.set(r),{filter:l,filterSpecified:e,svgBrush:{extent:[],brushStartCallback:n,brushCallback:(o=i,function(t){var e=t.brush,r=function(t){return t.svgBrush.extent.map((function(t){return t.slice()}))}(e).slice();e.filter.set(r),o()}),brushEndCallback:a}}},ensureAxisBrush:function(t){var e=t.selectAll("."+n.cn.axisBrush).data(o,a);e.enter().append("g").classed(n.cn.axisBrush,!0),function(t){var e=t.selectAll(".background").data(o);e.enter().append("rect").classed("background",!0).call(d).call(g).style("pointer-events","auto").attr("transform",l(0,n.verticalPadding)),e.call(k).attr("height",(function(t){return t.height-n.verticalPadding}));var r=t.selectAll(".highlight-shadow").data(o);r.enter().append("line").classed("highlight-shadow",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width+n.bar.strokeWidth).attr("stroke",n.bar.strokeColor).attr("opacity",n.bar.strokeOpacity).attr("stroke-linecap","butt"),r.attr("y1",(function(t){return t.height})).call(x);var i=t.selectAll(".highlight").data(o);i.enter().append("line").classed("highlight",!0).attr("x",-n.bar.width/2).attr("stroke-width",n.bar.width-n.bar.strokeWidth).attr("stroke",n.bar.fillColor).attr("opacity",n.bar.fillOpacity).attr("stroke-linecap","butt"),i.attr("y1",(function(t){return t.height})).call(x)}(e)},cleanRanges:function(t,e){if(Array.isArray(t[0])?(t=t.map((function(t){return t.sort(s)})),t=e.multiselect?S(t.sort(M)):[t[0]]):t=[t.sort(s)],e.tickvals){var r=e.tickvals.slice().sort(s);if(!(t=t.map((function(t){var e=[p(0,r,t[0],[]),p(1,r,t[1],[])];if(e[1]>e[0])return e})).filter((function(t){return t}))).length)return}return t.length>1?t:t[0]}}},{"../../lib":778,"../../lib/gup":775,"./constants":1153,d3:169}],1151:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../plots/get_data").getModuleCalcData,a=t("./plot"),o=t("../../constants/xmlns_namespaces");r.name="parcoords",r.plot=function(t){var e=i(t.calcdata,"parcoords")[0];e.length&&a(t,e)},r.clean=function(t,e,r,n){var i=n._has&&n._has("parcoords"),a=e._has&&e._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},r.toSVG=function(t){var e=t._fullLayout._glimages,r=n.select(t).selectAll(".svg-container");r.filter((function(t,e){return e===r.size()-1})).selectAll(".gl-canvas-context, .gl-canvas-focus").each((function(){var t=this.toDataURL("image/png");e.append("svg:image").attr({xmlns:o.svg,"xlink:href":t,preserveAspectRatio:"none",x:0,y:0,width:this.width,height:this.height})})),window.setTimeout((function(){n.selectAll("#filterBarPattern").attr("id","filterBarPattern")}),60)}},{"../../constants/xmlns_namespaces":754,"../../plots/get_data":865,"./plot":1160,d3:169}],1152:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,i=t("../../components/colorscale"),a=t("../../lib/gup").wrap;e.exports=function(t,e){var r,o;return i.hasColorscale(e,"line")&&n(e.line.color)?(r=e.line.color,o=i.extractOpts(e.line).colorscale,i.calc(t,e,{vals:r,containerStr:"line",cLetter:"c"})):(r=function(t){for(var e=new Array(t),r=0;rf&&(n.log("parcoords traces support up to "+f+" dimensions at the moment"),d.splice(f));var g=s(t,e,{name:"dimensions",layout:l,handleItemDefaults:p}),m=function(t,e,r,o,s){var l=s("line.color",r);if(i(t,"line")&&n.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),a(t,e,o,s,{prefix:"line.",cLetter:"c"}),l.length;e.line.color=r}return 1/0}(t,e,r,l,u);o(e,l,u),Array.isArray(g)&&g.length||(e.visible=!1),h(e,g,"values",m);var v={family:l.font.family,size:Math.round(l.font.size/1.2),color:l.font.color};n.coerceFont(u,"labelfont",v),n.coerceFont(u,"tickfont",v),n.coerceFont(u,"rangefont",v),u("labelangle"),u("labelside")}},{"../../components/colorscale/defaults":653,"../../components/colorscale/helpers":654,"../../lib":778,"../../plots/array_container_defaults":823,"../../plots/cartesian/axes":828,"../../plots/domain":855,"./attributes":1149,"./axisbrush":1150,"./constants":1153,"./merge_length":1158}],1155:[function(t,e,r){"use strict";var n=t("../../lib").isTypedArray;r.convertTypedArray=function(t){return n(t)?Array.prototype.slice.call(t):t},r.isOrdinal=function(t){return!!t.tickvals},r.isVisible=function(t){return t.visible||!("visible"in t)}},{"../../lib":778}],1156:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:t("./base_plot"),categories:["gl","regl","noOpacity","noHover"],meta:{}}},{"./attributes":1149,"./base_plot":1151,"./calc":1152,"./defaults":1154,"./plot":1160}],1157:[function(t,e,r){"use strict";var n=t("glslify"),i=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n p17_20, p21_24, p25_28, p29_32,\n p33_36, p37_40, p41_44, p45_48,\n p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform sampler2D mask, palette;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\n\nbool isPick = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n return (\n fOutside(p[0], lo[0], hi[0]) ||\n fOutside(p[1], lo[1], hi[1]) ||\n fOutside(p[2], lo[2], hi[2]) ||\n fOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n return (\n vOutside(p[0], lo[0], hi[0]) ||\n vOutside(p[1], lo[1], hi[1]) ||\n vOutside(p[2], lo[2], hi[2]) ||\n vOutside(p[3], lo[3], hi[3])\n );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n return mOutside(A, loA, hiA) ||\n mOutside(B, loB, hiB) ||\n mOutside(C, loC, hiC) ||\n mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n mat4 pnts[4];\n pnts[0] = A;\n pnts[1] = B;\n pnts[2] = C;\n pnts[3] = D;\n\n for(int i = 0; i < 4; ++i) {\n for(int j = 0; j < 4; ++j) {\n for(int k = 0; k < 4; ++k) {\n if(0 == iMod(\n int(255.0 * texture2D(mask,\n vec2(\n (float(i * 2 + j / 2) + 0.5) / 8.0,\n (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n ))[3]\n ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n 2\n )) return true;\n }\n }\n }\n return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n float x = 0.5 * sign(v) + 0.5;\n float y = axisY(x, A, B, C, D);\n float z = 1.0 - abs(v);\n\n z += isContext ? 0.0 : 2.0 * float(\n outsideBoundingBox(A, B, C, D) ||\n outsideRasterMask(A, B, C, D)\n );\n\n return vec4(\n 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n z,\n 1.0\n );\n}\n\nvoid main() {\n mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n float v = colors[3];\n\n gl_Position = position(isContext, v, A, B, C, D);\n\n fragColor =\n isContext ? vec4(contextColor) :\n isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),a=n(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n gl_FragColor = fragColor;\n}\n"]),o=t("./constants").maxDimensionCount,s=t("../../lib"),l=new Uint8Array(4),c=new Uint8Array(4),u={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function f(t,e,r,n,i){var a=t._gl;a.enable(a.SCISSOR_TEST),a.scissor(e,r,n,i),t.clear({color:[0,0,0,0],depth:1})}function h(t,e,r,n,i,a){var o=a.key;r.drawCompleted||(!function(t){t.read({x:0,y:0,width:1,height:1,data:l})}(t),r.drawCompleted=!0),function s(l){var c=Math.min(n,i-l*n);0===l&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],f(t,a.scissorX,a.scissorY,a.scissorWidth,a.viewBoxSize[1])),r.clearOnly||(a.count=2*c,a.offset=2*l*n,e(a),l*n+c>>8*e)%256/255}function g(t,e,r){for(var n=new Array(8*e),i=0,a=0;au&&(u=t[i].dim1.canvasX,o=i);0===s&&f(T,0,0,r.canvasWidth,r.canvasHeight);var p=function(t){var e,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!t&&ni._length&&(A=A.slice(0,i._length));var E,C=i.tickvals;function L(t,e){return{val:t,text:E[e]}}function I(t,e){return t.val-e.val}if(Array.isArray(C)&&C.length){E=i.ticktext,Array.isArray(E)&&E.length?E.length>C.length?E=E.slice(0,C.length):C.length>E.length&&(C=C.slice(0,E.length)):E=C.map(n.format(i.tickformat));for(var P=1;P=r||l>=a)return;var c=t.lineLayer.readPixel(s,a-1-l),u=0!==c[3],f=u?c[2]+256*(c[1]+256*c[0]):null,h={x:s,y:l,clientX:e.clientX,clientY:e.clientY,dataIndex:t.model.key,curveNumber:f};f!==R&&(u?i.hover(h):i.unhover&&i.unhover(h),R=f)}})),D.style("opacity",(function(t){return t.pick?0:1})),h.style("background","rgba(255, 255, 255, 0)");var F=h.selectAll("."+v.cn.parcoords).data(A,p);F.exit().remove(),F.enter().append("g").classed(v.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),F.attr("transform",(function(t){return l(t.model.translateX,t.model.translateY)}));var B=F.selectAll("."+v.cn.parcoordsControlView).data(d,p);B.enter().append("g").classed(v.cn.parcoordsControlView,!0),B.attr("transform",(function(t){return l(t.model.pad.l,t.model.pad.t)}));var N=B.selectAll("."+v.cn.yAxis).data((function(t){return t.dimensions}),p);N.enter().append("g").classed(v.cn.yAxis,!0),B.each((function(t){P(N,t)})),D.each((function(t){if(t.viewModel){!t.lineLayer||i?t.lineLayer=x(this,t):t.lineLayer.update(t),(t.key||0===t.key)&&(t.viewModel[t.key]=t.lineLayer);var e=!t.context||i;t.lineLayer.render(t.viewModel.panels,e)}})),N.attr("transform",(function(t){return l(t.xScale(t.xIndex),0)})),N.call(n.behavior.drag().origin((function(t){return t})).on("drag",(function(t){var e=t.parent;M.linePickActive(!1),t.x=Math.max(-v.overdrag,Math.min(t.model.width+v.overdrag,n.event.x)),t.canvasX=t.x*t.model.canvasPixelRatio,N.sort((function(t,e){return t.x-e.x})).each((function(e,r){e.xIndex=r,e.x=t===e?e.x:e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio})),P(N,e),N.filter((function(e){return 0!==Math.abs(t.xIndex-e.xIndex)})).attr("transform",(function(t){return l(t.xScale(t.xIndex),0)})),n.select(this).attr("transform",l(t.x,0)),N.each((function(r,n,i){i===t.parent.key&&(e.dimensions[n]=r)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!S(e)),e.focusLayer.render&&e.focusLayer.render(e.panels)})).on("dragend",(function(t){var e=t.parent;t.x=t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio,P(N,e),n.select(this).attr("transform",(function(t){return l(t.x,0)})),e.contextLayer&&e.contextLayer.render(e.panels,!1,!S(e)),e.focusLayer&&e.focusLayer.render(e.panels),e.pickLayer&&e.pickLayer.render(e.panels,!0),M.linePickActive(!0),i&&i.axesMoved&&i.axesMoved(e.key,e.dimensions.map((function(t){return t.crossfilterDimensionIndex})))}))),N.exit().remove();var j=N.selectAll("."+v.cn.axisOverlays).data(d,p);j.enter().append("g").classed(v.cn.axisOverlays,!0),j.selectAll("."+v.cn.axis).remove();var U=j.selectAll("."+v.cn.axis).data(d,p);U.enter().append("g").classed(v.cn.axis,!0),U.each((function(t){var e=t.model.height/t.model.tickDistance,r=t.domainScale,i=r.domain();n.select(this).call(n.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(e,t.tickFormat).tickValues(t.ordinal?i:null).tickFormat((function(e){return m.isOrdinal(t)?e:z(t.model.dimensions[t.visibleIndex],e)})).scale(r)),u.font(U.selectAll("text"),t.model.tickFont)})),U.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),U.selectAll("text").style("text-shadow","1px 1px 1px #fff, -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff").style("cursor","default");var V=j.selectAll("."+v.cn.axisHeading).data(d,p);V.enter().append("g").classed(v.cn.axisHeading,!0);var q=V.selectAll("."+v.cn.axisTitle).data(d,p);q.enter().append("text").classed(v.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events","auto"),q.text((function(t){return t.label})).each((function(e){var r=n.select(this);u.font(r,e.model.labelFont),c.convertToTspans(r,t)})).attr("transform",(function(t){var e=I(t.model.labelAngle,t.model.labelSide),r=v.axisTitleOffset;return(e.dir>0?"":l(0,2*r+t.model.height))+s(e.degrees)+l(-r*e.dx,-r*e.dy)})).attr("text-anchor",(function(t){var e=I(t.model.labelAngle,t.model.labelSide);return 2*Math.abs(e.dx)>Math.abs(e.dy)?e.dir*e.dx<0?"start":"end":"middle"}));var H=j.selectAll("."+v.cn.axisExtent).data(d,p);H.enter().append("g").classed(v.cn.axisExtent,!0);var G=H.selectAll("."+v.cn.axisExtentTop).data(d,p);G.enter().append("g").classed(v.cn.axisExtentTop,!0),G.attr("transform",l(0,-v.axisExtentOffset));var Y=G.selectAll("."+v.cn.axisExtentTopText).data(d,p);Y.enter().append("text").classed(v.cn.axisExtentTopText,!0).call(L),Y.text((function(t){return O(t,!0)})).each((function(t){u.font(n.select(this),t.model.rangeFont)}));var W=H.selectAll("."+v.cn.axisExtentBottom).data(d,p);W.enter().append("g").classed(v.cn.axisExtentBottom,!0),W.attr("transform",(function(t){return l(0,t.model.height+v.axisExtentOffset)}));var X=W.selectAll("."+v.cn.axisExtentBottomText).data(d,p);X.enter().append("text").classed(v.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),X.text((function(t){return O(t,!1)})).each((function(t){u.font(n.select(this),t.model.rangeFont)})),y.ensureAxisBrush(j)}},{"../../components/colorscale":655,"../../components/drawing":665,"../../lib":778,"../../lib/gup":775,"../../lib/svg_text_utils":803,"../../plots/cartesian/axes":828,"./axisbrush":1150,"./constants":1153,"./helpers":1155,"./lines":1157,"color-rgba":127,d3:169}],1160:[function(t,e,r){"use strict";var n=t("./parcoords"),i=t("../../lib/prepare_regl"),a=t("./helpers").isVisible;function o(t,e,r){var n=e.indexOf(r),i=t.indexOf(n);return-1===i&&(i+=e.length),i}e.exports=function(t,e){var r=t._fullLayout;if(i(t)){var s={},l={},c={},u={},f=r._size;e.forEach((function(e,r){var n=e[0].trace;c[r]=n.index;var i=u[r]=n._fullInput.index;s[r]=t.data[i].dimensions,l[r]=t.data[i].dimensions.slice()}));n(t,e,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{filterChanged:function(e,n,i){var a=l[e][n],o=i.map((function(t){return t.slice()})),s="dimensions["+n+"].constraintrange",f=r._tracePreGUI[t._fullData[c[e]]._fullInput.uid];if(void 0===f[s]){var h=a.constraintrange;f[s]=h||null}var p=t._fullData[c[e]].dimensions[n];o.length?(1===o.length&&(o=o[0]),a.constraintrange=o,p.constraintrange=o.slice(),o=[o]):(delete a.constraintrange,delete p.constraintrange,o=null);var d={};d[s]=o,t.emit("plotly_restyle",[d,[u[e]]])},hover:function(e){t.emit("plotly_hover",e)},unhover:function(e){t.emit("plotly_unhover",e)},axesMoved:function(e,r){var n=function(t,e){return function(r,n){return o(t,e,r)-o(t,e,n)}}(r,l[e].filter(a));s[e].sort(n),l[e].filter((function(t){return!a(t)})).sort((function(t){return l[e].indexOf(t)})).forEach((function(t){s[e].splice(s[e].indexOf(t),1),s[e].splice(l[e].indexOf(t),0,t)})),t.emit("plotly_restyle",[{dimensions:[s[e]]},[u[e]]])}})}}},{"../../lib/prepare_regl":791,"./helpers":1155,"./parcoords":1159}],1161:[function(t,e,r){"use strict";var n=t("../../plots/attributes"),i=t("../../plots/domain").attributes,a=t("../../plots/font_attributes"),o=t("../../components/color/attributes"),s=t("../../plots/template_attributes").hovertemplateAttrs,l=t("../../plots/template_attributes").texttemplateAttrs,c=t("../../lib/extend").extendFlat,u=a({editType:"plot",arrayOk:!0,colorEditType:"plot"});e.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:o.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:c({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:s({},{keys:["label","color","value","percent","text"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},u,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},u,{}),outsidetextfont:c({},u,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},u,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:i({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"number",min:-360,max:360,dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:c({},u,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},{"../../components/color/attributes":642,"../../lib/extend":768,"../../plots/attributes":824,"../../plots/domain":855,"../../plots/font_attributes":856,"../../plots/template_attributes":906}],1162:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="pie",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{"../../plots/plots":891}],1163:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("tinycolor2"),a=t("../../components/color"),o={};function s(t){return function(e,r){return!!e&&(!!(e=i(e)).isValid()&&(e=a.addOpacity(e,e.getAlpha()),t[r]||(t[r]=e),e))}}function l(t,e){var r,n=JSON.stringify(t),a=e[n];if(!a){for(a=t.slice(),r=0;r0){s=!0;break}}s||(o=0)}return{hasLabels:r,hasValues:a,len:o}}e.exports={handleLabelsAndValues:l,supplyDefaults:function(t,e,r,n){function c(r,n){return i.coerce(t,e,a,r,n)}var u=l(c("labels"),c("values")),f=u.len;if(e._hasLabels=u.hasLabels,e._hasValues=u.hasValues,!e._hasLabels&&e._hasValues&&(c("label0"),c("dlabel")),f){e._length=f,c("marker.line.width")&&c("marker.line.color"),c("marker.colors"),c("scalegroup");var h,p=c("text"),d=c("texttemplate");if(d||(h=c("textinfo",Array.isArray(p)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),d||h&&"none"!==h){var g=c("textposition");s(t,e,n,c,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&c("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&c("insidetextorientation")}o(e,n,c);var m=c("hole");if(c("title.text")){var v=c("title.position",m?"middle center":"top center");m||"middle center"!==v||(e.title.position="top center"),i.coerceFont(c,"title.font",n.font)}c("sort"),c("direction"),c("rotation"),c("pull")}else e.visible=!1}}},{"../../lib":778,"../../plots/domain":855,"../bar/defaults":925,"./attributes":1161,"fast-isnumeric":241}],1165:[function(t,e,r){"use strict";var n=t("../../components/fx/helpers").appendArrayMultiPointValues;e.exports=function(t,e){var r={curveNumber:e.index,pointNumbers:t.pts,data:e._input,fullData:e,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,v:t.v};return 1===t.pts.length&&(r.pointNumber=r.i=t.pts[0]),n(r,e,t.pts),"funnelarea"===e.type&&(delete r.v,delete r.i),r}},{"../../components/fx/helpers":679}],1166:[function(t,e,r){"use strict";var n=t("../../lib");function i(t){return-1!==t.indexOf("e")?t.replace(/[.]?0+e/,"e"):-1!==t.indexOf(".")?t.replace(/[.]?0+$/,""):t}r.formatPiePercent=function(t,e){var r=i((100*t).toPrecision(3));return n.numSeparate(r,e)+"%"},r.formatPieValue=function(t,e){var r=i(t.toPrecision(10));return n.numSeparate(r,e)},r.getFirstFilled=function(t,e){if(Array.isArray(t))for(var r=0;r"),name:u.hovertemplate||-1!==f.indexOf("name")?u.name:void 0,idealAlign:t.pxmid[0]<0?"left":"right",color:m.castOption(b.bgcolor,t.pts)||t.color,borderColor:m.castOption(b.bordercolor,t.pts),fontFamily:m.castOption(_.family,t.pts),fontSize:m.castOption(_.size,t.pts),fontColor:m.castOption(_.color,t.pts),nameLength:m.castOption(b.namelength,t.pts),textAlign:m.castOption(b.align,t.pts),hovertemplate:m.castOption(u.hovertemplate,t.pts),hovertemplateLabels:t,eventData:[v(t,u)]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:e}),o._hasHoverLabel=!0}o._hasHoverEvent=!0,e.emit("plotly_hover",{points:[v(t,u)],event:n.event})}})),t.on("mouseout",(function(t){var r=e._fullLayout,i=e._fullData[o.index],s=n.select(this).datum();o._hasHoverEvent&&(t.originalEvent=n.event,e.emit("plotly_unhover",{points:[v(s,i)],event:n.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(a.loneUnhover(r._hoverlayer.node()),o._hasHoverLabel=!1)})),t.on("click",(function(t){var r=e._fullLayout,i=e._fullData[o.index];e._dragging||!1===r.hovermode||(e._hoverdata=[v(t,i)],a.click(e,n.event))}))}function b(t,e,r){var n=m.castOption(t.insidetextfont.color,e.pts);!n&&t._input.textfont&&(n=m.castOption(t._input.textfont.color,e.pts));var i=m.castOption(t.insidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.insidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n||o.contrast(e.color),family:i,size:a}}function _(t,e){for(var r,n,i=0;ie&&e>n||r=-4;m-=2)v(Math.PI*m,"tan");for(m=4;m>=-4;m-=2)v(Math.PI*(m+1),"tan")}if(f||p){for(m=4;m>=-4;m-=2)v(Math.PI*(m+1.5),"rad");for(m=4;m>=-4;m-=2)v(Math.PI*(m+.5),"rad")}}if(s||d||f){var y=Math.sqrt(t.width*t.width+t.height*t.height);if((a={scale:i*n*2/y,rCenter:1-i,rotate:0}).textPosAngle=(e.startangle+e.stopangle)/2,a.scale>=1)return a;g.push(a)}(d||p)&&((a=T(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a)),(d||h)&&((a=k(t,n,o,l,c)).textPosAngle=(e.startangle+e.stopangle)/2,g.push(a));for(var x=0,b=0,_=0;_=1)break}return g[x]}function T(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.width/t.height,o=S(a,n,e,r);return{scale:2*o/t.height,rCenter:M(a,o/e),rotate:A(i)}}function k(t,e,r,n,i){e=Math.max(0,e-2*g);var a=t.height/t.width,o=S(a,n,e,r);return{scale:2*o/t.width,rCenter:M(a,o/e),rotate:A(i+Math.PI/2)}}function M(t,e){return Math.cos(e)-t*e}function A(t){return(180/Math.PI*t+720)%180-90}function S(t,e,r,n){var i=t+1/(2*Math.tan(e));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(t*t+n/2)+t))}function E(t,e){return t.v!==e.vTotal||e.trace.hole?Math.min(1/(1+1/Math.sin(t.halfangle)),t.ring/2):1}function C(t,e){var r=e.pxmid[0],n=e.pxmid[1],i=t.width/2,a=t.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function L(t,e){var r,n,i,a=t.trace,o={x:t.cx,y:t.cy},s={tx:0,ty:0};s.ty+=a.title.font.size,i=P(a),-1!==a.title.position.indexOf("top")?(o.y-=(1+i)*t.r,s.ty-=t.titleBox.height):-1!==a.title.position.indexOf("bottom")&&(o.y+=(1+i)*t.r);var l,c,u=(l=t.r,c=t.trace.aspectratio,l/(void 0===c?1:c)),f=e.w*(a.domain.x[1]-a.domain.x[0])/2;return-1!==a.title.position.indexOf("left")?(f+=u,o.x-=(1+i)*u,s.tx+=t.titleBox.width/2):-1!==a.title.position.indexOf("center")?f*=2:-1!==a.title.position.indexOf("right")&&(f+=u,o.x+=(1+i)*u,s.tx-=t.titleBox.width/2),r=f/t.titleBox.width,n=I(t,e)/t.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function I(t,e){var r=t.trace,n=e.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(t.titleBox.height,n/2)}function P(t){var e,r=t.pull;if(!r)return 0;if(Array.isArray(r))for(r=0,e=0;er&&(r=t.pull[e]);return r}function z(t,e){for(var r=[],n=0;n1?(c=r.r,u=c/i.aspectratio):(u=r.r,c=u*i.aspectratio),c*=(1+i.baseratio)/2,l=c*u}o=Math.min(o,l/r.vTotal)}for(n=0;n")}if(a){var x=l.castOption(i,e.i,"texttemplate");if(x){var b=function(t){return{label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:l.castOption(i,t.i,"customdata")}}(e),_=m.getFirstFilled(i.text,e.pts);(y(_)||""===_)&&(b.text=_),e.text=l.texttemplateString(x,b,t._fullLayout._d3locale,b,i._meta||{})}else e.text=""}}function R(t,e){var r=t.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(e.left+e.right)/2,o=(e.top+e.bottom)/2;t.textX=a*n-o*i,t.textY=a*i+o*n,t.noCenter=!0}e.exports={plot:function(t,e){var r=t._fullLayout,a=r._size;d("pie",r),_(e,t),z(e,a);var h=l.makeTraceGroups(r._pielayer,e,"trace").each((function(e){var h=n.select(this),d=e[0],g=d.trace;!function(t){var e,r,n,i=t[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(e=0;ei.vTotal/2?1:0,r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=E(r,i))}(e),h.attr("stroke-linejoin","round"),h.each((function(){var v=n.select(this).selectAll("g.slice").data(e);v.enter().append("g").classed("slice",!0),v.exit().remove();var y=[[[],[]],[[],[]]],_=!1;v.each((function(i,a){if(i.hidden)n.select(this).selectAll("path,g").remove();else{i.pointNumber=i.i,i.curveNumber=g.index,y[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var o=d.cx,c=d.cy,u=n.select(this),h=u.selectAll("path.surface").data([i]);if(h.enter().append("path").classed("surface",!0).style({"pointer-events":"all"}),u.call(x,t,e),g.pull){var v=+m.castOption(g.pull,i.pts)||0;v>0&&(o+=v*i.pxmid[0],c+=v*i.pxmid[1])}i.cxFinal=o,i.cyFinal=c;var T=g.hole;if(i.v===d.vTotal){var k="M"+(o+i.px0[0])+","+(c+i.px0[1])+L(i.px0,i.pxmid,!0,1)+L(i.pxmid,i.px0,!0,1)+"Z";T?h.attr("d","M"+(o+T*i.px0[0])+","+(c+T*i.px0[1])+L(i.px0,i.pxmid,!1,T)+L(i.pxmid,i.px0,!1,T)+"Z"+k):h.attr("d",k)}else{var M=L(i.px0,i.px1,!0,1);if(T){var A=1-T;h.attr("d","M"+(o+T*i.px1[0])+","+(c+T*i.px1[1])+L(i.px1,i.px0,!1,T)+"l"+A*i.px0[0]+","+A*i.px0[1]+M+"Z")}else h.attr("d","M"+o+","+c+"l"+i.px0[0]+","+i.px0[1]+M+"Z")}D(t,i,d);var S=m.castOption(g.textposition,i.pts),E=u.selectAll("g.slicetext").data(i.text&&"none"!==S?[0]:[]);E.enter().append("g").classed("slicetext",!0),E.exit().remove(),E.each((function(){var u=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),h=l.ensureUniformFontSize(t,"outside"===S?function(t,e,r){var n=m.castOption(t.outsidetextfont.color,e.pts)||m.castOption(t.textfont.color,e.pts)||r.color,i=m.castOption(t.outsidetextfont.family,e.pts)||m.castOption(t.textfont.family,e.pts)||r.family,a=m.castOption(t.outsidetextfont.size,e.pts)||m.castOption(t.textfont.size,e.pts)||r.size;return{color:n,family:i,size:a}}(g,i,r.font):b(g,i,r.font));u.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(s.font,h).call(f.convertToTspans,t);var v,y=s.bBox(u.node());if("outside"===S)v=C(y,i);else if(v=w(y,i,d),"auto"===S&&v.scale<1){var x=l.ensureUniformFontSize(t,g.outsidetextfont);u.call(s.font,x),v=C(y=s.bBox(u.node()),i)}var T=v.textPosAngle,k=void 0===T?i.pxmid:O(d.r,T);if(v.targetX=o+k[0]*v.rCenter+(v.x||0),v.targetY=c+k[1]*v.rCenter+(v.y||0),R(v,y),v.outside){var M=v.targetY;i.yLabelMin=M-y.height/2,i.yLabelMid=M,i.yLabelMax=M+y.height/2,i.labelExtraX=0,i.labelExtraY=0,_=!0}v.fontSize=h.size,p(g.type,v,r),e[a].transform=v,u.attr("transform",l.getTextTransform(v))}))}function L(t,e,r,n){var a=n*(e[0]-t[0]),o=n*(e[1]-t[1]);return"a"+n*d.r+","+n*d.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}}));var T=n.select(this).selectAll("g.titletext").data(g.title.text?[0]:[]);if(T.enter().append("g").classed("titletext",!0),T.exit().remove(),T.each((function(){var e,r=l.ensureSingle(n.select(this),"text","",(function(t){t.attr("data-notex",1)})),i=g.title.text;g._meta&&(i=l.templateString(i,g._meta)),r.text(i).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(s.font,g.title.font).call(f.convertToTspans,t),e="middle center"===g.title.position?function(t){var e=Math.sqrt(t.titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height);return{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/e,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}}(d):L(d,a),r.attr("transform",u(e.x,e.y)+c(Math.min(1,e.scale))+u(e.tx,e.ty))})),_&&function(t,e){var r,n,i,a,o,s,l,c,u,f,h,p,d;function g(t,e){return t.pxmid[1]-e.pxmid[1]}function v(t,e){return e.pxmid[1]-t.pxmid[1]}function y(t,r){r||(r={});var i,c,u,h,p=r.labelExtraY+(n?r.yLabelMax:r.yLabelMin),d=n?t.yLabelMin:t.yLabelMax,g=n?t.yLabelMax:t.yLabelMin,v=t.cyFinal+o(t.px0[1],t.px1[1]),y=p-d;if(y*l>0&&(t.labelExtraY=y),Array.isArray(e.pull))for(c=0;c=(m.castOption(e.pull,u.pts)||0)||((t.pxmid[1]-u.pxmid[1])*l>0?(y=u.cyFinal+o(u.px0[1],u.px1[1])-d-t.labelExtraY)*l>0&&(t.labelExtraY+=y):(g+t.labelExtraY-v)*l>0&&(i=3*s*Math.abs(c-f.indexOf(t)),(h=u.cxFinal+a(u.px0[0],u.px1[0])+i-(t.cxFinal+t.pxmid[0])-t.labelExtraX)*s>0&&(t.labelExtraX+=h)))}for(n=0;n<2;n++)for(i=n?g:v,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,s=r?1:-1,(c=t[n][r]).sort(i),u=t[1-n][r],f=u.concat(c),p=[],h=0;hMath.abs(f)?s+="l"+f*t.pxmid[0]/t.pxmid[1]+","+f+"H"+(a+t.labelExtraX+c):s+="l"+t.labelExtraX+","+u+"v"+(f-u)+"h"+c}else s+="V"+(t.yLabelMid+t.labelExtraY)+"h"+c;l.ensureSingle(r,"path","textline").call(o.stroke,e.outsidetextfont.color).attr({"stroke-width":Math.min(2,e.outsidetextfont.size/8),d:s,fill:"none"})}else r.select("path.textline").remove()}))}(v,g),_&&g.automargin){var k=s.bBox(h.node()),M=g.domain,A=a.w*(M.x[1]-M.x[0]),S=a.h*(M.y[1]-M.y[0]),E=(.5*A-d.r)/a.w,I=(.5*S-d.r)/a.h;i.autoMargin(t,"pie."+g.uid+".automargin",{xl:M.x[0]-E,xr:M.x[1]+E,yb:M.y[0]-I,yt:M.y[1]+I,l:Math.max(d.cx-d.r-k.left,0),r:Math.max(k.right-(d.cx+d.r),0),b:Math.max(k.bottom-(d.cy+d.r),0),t:Math.max(d.cy-d.r-k.top,0),pad:5})}}))}));setTimeout((function(){h.selectAll("tspan").each((function(){var t=n.select(this);t.attr("dy")&&t.attr("dy",t.attr("dy"))}))}),0)},formatSliceLabel:D,transformInsideText:w,determineInsideTextFont:b,positionTitleOutside:L,prerenderTitles:_,layoutAreas:z,attachFxHandlers:x,computeTransform:R}},{"../../components/color":643,"../../components/drawing":665,"../../components/fx":683,"../../lib":778,"../../lib/svg_text_utils":803,"../../plots/plots":891,"../bar/constants":923,"../bar/uniform_text":937,"./event_data":1165,"./helpers":1166,d3:169}],1171:[function(t,e,r){"use strict";var n=t("d3"),i=t("./style_one"),a=t("../bar/uniform_text").resizeText;e.exports=function(t){var e=t._fullLayout._pielayer.selectAll(".trace");a(t,e,"pie"),e.each((function(t){var e=t[0].trace,r=n.select(this);r.style({opacity:e.opacity}),r.selectAll("path.surface").each((function(t){n.select(this).call(i,t,e)}))}))}},{"../bar/uniform_text":937,"./style_one":1172,d3:169}],1172:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("./helpers").castOption;e.exports=function(t,e,r){var a=r.marker.line,o=i(a.color,e.pts)||n.defaultLine,s=i(a.width,e.pts)||0;t.style("stroke-width",s).call(n.fill,e.color).call(n.stroke,o)}},{"../../components/color":643,"./helpers":1166}],1173:[function(t,e,r){"use strict";var n=t("../scatter/attributes");e.exports={x:n.x,y:n.y,xy:{valType:"data_array",editType:"calc"},indices:{valType:"data_array",editType:"calc"},xbounds:{valType:"data_array",editType:"calc"},ybounds:{valType:"data_array",editType:"calc"},text:n.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},{"../scatter/attributes":1187}],1174:[function(t,e,r){"use strict";var n=t("gl-pointcloud2d"),i=t("../../lib/str2rgbarray"),a=t("../../plots/cartesian/autorange").findExtremes,o=t("../scatter/get_trace_color");function s(t,e){this.scene=t,this.uid=e,this.type="pointcloud",this.pickXData=[],this.pickYData=[],this.xData=[],this.yData=[],this.textLabels=[],this.color="rgb(0, 0, 0)",this.name="",this.hoverinfo="all",this.idToIndex=new Int32Array(0),this.bounds=[0,0,0,0],this.pointcloudOptions={positions:new Float32Array(0),idToIndex:this.idToIndex,sizemin:.5,sizemax:12,color:[0,0,0,1],areaRatio:1,borderColor:[0,0,0,1]},this.pointcloud=n(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var l=s.prototype;l.handlePick=function(t){var e=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*e],this.pickXYData[2*e+1]]:[this.pickXData[e],this.pickYData[e]],textLabel:Array.isArray(this.textLabels)?this.textLabels[e]:this.textLabels,color:this.color,name:this.name,pointIndex:e,hoverinfo:this.hoverinfo}},l.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=o(t,{})},l.updateFast=function(t){var e,r,n,o,s,l,c=this.xData=this.pickXData=t.x,u=this.yData=this.pickYData=t.y,f=this.pickXYData=t.xy,h=t.xbounds&&t.ybounds,p=t.indices,d=this.bounds;if(f){if(n=f,e=f.length>>>1,h)d[0]=t.xbounds[0],d[2]=t.xbounds[1],d[1]=t.ybounds[0],d[3]=t.ybounds[1];else for(l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);if(p)r=p;else for(r=new Int32Array(e),l=0;ld[2]&&(d[2]=o),sd[3]&&(d[3]=s);this.idToIndex=r,this.pointcloudOptions.idToIndex=r,this.pointcloudOptions.positions=n;var g=i(t.marker.color),m=i(t.marker.border.color),v=t.opacity*t.marker.opacity;g[3]*=v,this.pointcloudOptions.color=g;var y=t.marker.blend;if(null===y){y=c.length<100||u.length<100}this.pointcloudOptions.blend=y,m[3]*=v,this.pointcloudOptions.borderColor=m;var x=t.marker.sizemin,b=Math.max(t.marker.sizemax,t.marker.sizemin);this.pointcloudOptions.sizeMin=x,this.pointcloudOptions.sizeMax=b,this.pointcloudOptions.areaRatio=t.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,w=this.scene.yaxis,T=b/2||.5;t._extremes[_._id]=a(_,[d[0],d[2]],{ppad:T}),t._extremes[w._id]=a(w,[d[1],d[3]],{ppad:T})},l.dispose=function(){this.pointcloud.dispose()},e.exports=function(t,e){var r=new s(t,e.uid);return r.update(e),r}},{"../../lib/str2rgbarray":802,"../../plots/cartesian/autorange":827,"../scatter/get_trace_color":1197,"gl-pointcloud2d":324}],1175:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes");e.exports=function(t,e,r){function a(r,a){return n.coerce(t,e,i,r,a)}a("x"),a("y"),a("xbounds"),a("ybounds"),t.xy&&t.xy instanceof Float32Array&&(e.xy=t.xy),t.indices&&t.indices instanceof Int32Array&&(e.indices=t.indices),a("text"),a("marker.color",r),a("marker.opacity"),a("marker.blend"),a("marker.sizemin"),a("marker.sizemax"),a("marker.border.color",r),a("marker.border.arearatio"),e._length=null}},{"../../lib":778,"./attributes":1173}],1176:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("../scatter3d/calc"),plot:t("./convert"),moduleType:"trace",name:"pointcloud",basePlotModule:t("../../plots/gl2d"),categories:["gl","gl2d","showLegend"],meta:{}}},{"../../plots/gl2d":868,"../scatter3d/calc":1216,"./attributes":1173,"./convert":1174,"./defaults":1175}],1177:[function(t,e,r){"use strict";var n=t("../../plots/font_attributes"),i=t("../../plots/attributes"),a=t("../../components/color/attributes"),o=t("../../components/fx/attributes"),s=t("../../plots/domain").attributes,l=t("../../plots/template_attributes").hovertemplateAttrs,c=t("../../components/colorscale/attributes"),u=t("../../plot_api/plot_template").templatedArray,f=t("../../lib/extend").extendFlat,h=t("../../plot_api/edit_types").overrideAll;t("../../constants/docs").FORMAT_LINK;(e.exports=h({hoverinfo:f({},i.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:o.hoverlabel,domain:s({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s"},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:n({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]})},link:{label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:a.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:o.hoverlabel,hovertemplate:l({},{keys:["value","label"]}),colorscales:u("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:f(c().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},{"../../components/color/attributes":642,"../../components/colorscale/attributes":650,"../../components/fx/attributes":674,"../../constants/docs":748,"../../lib/extend":768,"../../plot_api/edit_types":810,"../../plot_api/plot_template":817,"../../plots/attributes":824,"../../plots/domain":855,"../../plots/font_attributes":856,"../../plots/template_attributes":906}],1178:[function(t,e,r){"use strict";var n=t("../../plot_api/edit_types").overrideAll,i=t("../../plots/get_data").getModuleCalcData,a=t("./plot"),o=t("../../components/fx/layout_attributes"),s=t("../../lib/setcursor"),l=t("../../components/dragelement"),c=t("../../plots/cartesian/select").prepSelect,u=t("../../lib"),f=t("../../registry");function h(t,e){var r=t._fullData[e],n=t._fullLayout,i=n.dragmode,a="pan"===n.dragmode?"move":"crosshair",o=r._bgRect;if("pan"!==i&&"zoom"!==i){s(o,a);var h={_id:"x",c2p:u.identity,_offset:r._sankey.translateX,_length:r._sankey.width},p={_id:"y",c2p:u.identity,_offset:r._sankey.translateY,_length:r._sankey.height},d={gd:t,element:o.node(),plotinfo:{id:e,xaxis:h,yaxis:p,fillRangeItems:u.noop},subplot:e,xaxes:[h],yaxes:[p],doneFnCompleted:function(r){var n,i=t._fullData[e],a=i.node.groups.slice(),o=[];function s(t){for(var e=i._sankey.graph.nodes,r=0;ry&&(y=a.source[e]),a.target[e]>y&&(y=a.target[e]);var x,b=y+1;t.node._count=b;var _=t.node.groups,w={};for(e=0;e<_.length;e++){var T=_[e];for(x=0;x0&&s(E,b)&&s(C,b)&&(!w.hasOwnProperty(E)||!w.hasOwnProperty(C)||w[E]!==w[C])){w.hasOwnProperty(C)&&(C=w[C]),w.hasOwnProperty(E)&&(E=w[E]),C=+C,h[E=+E]=h[C]=!0;var L="";a.label&&a.label[e]&&(L=a.label[e]);var I=null;L&&p.hasOwnProperty(L)&&(I=p[L]),c.push({pointNumber:e,label:L,color:u?a.color[e]:a.color,customdata:f?a.customdata[e]:a.customdata,concentrationscale:I,source:E,target:C,value:+S}),A.source.push(E),A.target.push(C)}}var P=b+_.length,z=o(r.color),O=o(r.customdata),D=[];for(e=0;eb-1,childrenNodes:[],pointNumber:e,label:R,color:z?r.color[e]:r.color,customdata:O?r.customdata[e]:r.customdata})}var F=!1;return function(t,e,r){for(var a=i.init2dArray(t,0),o=0;o1}))}(P,A.source,A.target)&&(F=!0),{circular:F,links:c,nodes:D,groups:_,groupLookup:w}}e.exports=function(t,e){var r=c(e);return a({circular:r.circular,_nodes:r.nodes,_links:r.links,_groups:r.groups,_groupLookup:r.groupLookup})}},{"../../components/colorscale":655,"../../lib":778,"../../lib/gup":775,"strongly-connected-components":569}],1180:[function(t,e,r){"use strict";e.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeCapture:"node-capture",nodeCentered:"node-entered",nodeLabelGuide:"node-label-guide",nodeLabel:"node-label",nodeLabelTextPath:"node-label-text-path"}}},{}],1181:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../components/color"),o=t("tinycolor2"),s=t("../../plots/domain").defaults,l=t("../../components/fx/hoverlabel_defaults"),c=t("../../plot_api/plot_template"),u=t("../../plots/array_container_defaults");function f(t,e){function r(r,a){return n.coerce(t,e,i.link.colorscales,r,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}e.exports=function(t,e,r,h){function p(r,a){return n.coerce(t,e,i,r,a)}var d=n.extendDeep(h.hoverlabel,t.hoverlabel),g=t.node,m=c.newContainer(e,"node");function v(t,e){return n.coerce(g,m,i.node,t,e)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",t.hoverinfo),l(g,m,v,d),v("hovertemplate");var y=h.colorway;v("color",m.label.map((function(t,e){return a.addOpacity(function(t){return y[t%y.length]}(e),.8)}))),v("customdata");var x=t.link||{},b=c.newContainer(e,"link");function _(t,e){return n.coerce(x,b,i.link,t,e)}_("label"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",t.hoverinfo),l(x,b,_,d),_("hovertemplate");var w,T=o(h.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";_("color",n.repeat(T,b.value.length)),_("customdata"),u(x,b,{name:"colorscales",handleItemDefaults:f}),s(e,h,p),p("orientation"),p("valueformat"),p("valuesuffix"),m.x.length&&m.y.length&&(w="freeform"),p("arrangement",w),n.coerceFont(p,"textfont",n.extendFlat({},h.font)),e._length=null}},{"../../components/color":643,"../../components/fx/hoverlabel_defaults":681,"../../lib":778,"../../plot_api/plot_template":817,"../../plots/array_container_defaults":823,"../../plots/domain":855,"./attributes":1177,tinycolor2:576}],1182:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),calc:t("./calc"),plot:t("./plot"),moduleType:"trace",name:"sankey",basePlotModule:t("./base_plot"),selectPoints:t("./select.js"),categories:["noOpacity"],meta:{}}},{"./attributes":1177,"./base_plot":1178,"./calc":1179,"./defaults":1181,"./plot":1183,"./select.js":1185}],1183:[function(t,e,r){"use strict";var n=t("d3"),i=t("./render"),a=t("../../components/fx"),o=t("../../components/color"),s=t("../../lib"),l=t("./constants").cn,c=s._;function u(t){return""!==t}function f(t,e){return t.filter((function(t){return t.key===e.traceId}))}function h(t,e){n.select(t).select("path").style("fill-opacity",e),n.select(t).select("rect").style("fill-opacity",e)}function p(t){n.select(t).select("text.name").style("fill","black")}function d(t){return function(e){return-1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(t){return function(e){return-1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(t,e,r){e&&r&&f(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(y.bind(0,e,r,!1))}function v(t,e,r){e&&r&&f(r,e).selectAll("."+l.sankeyLink).filter(d(e)).call(x.bind(0,e,r,!1))}function y(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),i&&f(e,t).selectAll("."+l.sankeyLink).filter((function(t){return t.link.label===i})).style("fill-opacity",(function(t){if(!t.link.concentrationscale)return.4})),r&&f(e,t).selectAll("."+l.sankeyNode).filter(g(t)).call(m)}function x(t,e,r,n){var i=n.datum().link.label;n.style("fill-opacity",(function(t){return t.tinyColorAlpha})),i&&f(e,t).selectAll("."+l.sankeyLink).filter((function(t){return t.link.label===i})).style("fill-opacity",(function(t){return t.tinyColorAlpha})),r&&f(e,t).selectAll(l.sankeyNode).filter(g(t)).call(v)}function b(t,e){var r=t.hoverlabel||{},n=s.nestedProperty(r,e).get();return!Array.isArray(n)&&n}e.exports=function(t,e){for(var r=t._fullLayout,s=r._paper,f=r._size,d=0;d"),color:b(s,"bgcolor")||o.addOpacity(d.color,1),borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:n.event.x"),color:b(o,"bgcolor")||i.tinyColorHue,borderColor:b(o,"bordercolor"),fontFamily:b(o,"font.family"),fontSize:b(o,"font.size"),fontColor:b(o,"font.color"),nameLength:b(o,"namelength"),textAlign:b(o,"align"),idealAlign:"left",hovertemplate:o.hovertemplate,hovertemplateLabels:v,eventData:[i.node]},{container:r._hoverlayer.node(),outerContainer:r._paper.node(),gd:t});h(_,.85),p(_)}}},unhover:function(e,i,o){!1!==t._fullLayout.hovermode&&(n.select(e).call(v,i,o),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,t.emit("plotly_unhover",{event:n.event,points:[i.node]})),a.loneUnhover(r._hoverlayer.node()))},select:function(e,r,i){var o=r.node;o.originalEvent=n.event,t._hoverdata=[o],n.select(e).call(v,r,i),a.click(t,{target:!0})}}})}},{"../../components/color":643,"../../components/fx":683,"../../lib":778,"./constants":1180,"./render":1184,d3:169}],1184:[function(t,e,r){"use strict";var n=t("./constants"),i=t("d3"),a=t("tinycolor2"),o=t("../../components/color"),s=t("../../components/drawing"),l=t("@plotly/d3-sankey"),c=t("@plotly/d3-sankey-circular"),u=t("d3-force"),f=t("../../lib"),h=f.strTranslate,p=t("../../lib/gup"),d=p.keyFun,g=p.repeat,m=p.unwrap,v=t("d3-interpolate").interpolateNumber,y=t("../../registry");function x(t,e,r){var i,o=m(e),s=o.trace,u=s.domain,h="h"===s.orientation,p=s.node.pad,d=s.node.thickness,g=t.width*(u.x[1]-u.x[0]),v=t.height*(u.y[1]-u.y[0]),y=o._nodes,x=o._links,b=o.circular;(i=b?c.sankeyCircular().circularLinkGap(0):l.sankey()).iterations(n.sankeyIterations).size(h?[g,v]:[v,g]).nodeWidth(d).nodePadding(p).nodeId((function(t){return t.pointNumber})).nodes(y).links(x);var _,w,T,k=i();for(var M in i.nodePadding()=i||(r=i-e.y0)>1e-6&&(e.y0+=r,e.y1+=r),i=e.y1+p}))}(function(t){var e,r,n=t.map((function(t,e){return{x0:t.x0,index:e}})).sort((function(t,e){return t.x0-e.x0})),i=[],a=-1,o=-1/0;for(_=0;_o+d&&(a+=1,e=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=e-s.x0,s.x0+=r,s.x1+=r}return i}(y=k.nodes));i.update(k)}return{circular:b,key:r,trace:s,guid:f.randstr(),horizontal:h,width:g,height:v,nodePad:s.node.pad,nodeLineColor:s.node.line.color,nodeLineWidth:s.node.line.width,linkLineColor:s.link.line.color,linkLineWidth:s.link.line.width,valueFormat:s.valueformat,valueSuffix:s.valuesuffix,textFont:s.textfont,translateX:u.x[0]*t.width+t.margin.l,translateY:t.height-u.y[1]*t.height+t.margin.t,dragParallel:h?v:g,dragPerpendicular:h?g:v,arrangement:s.arrangement,sankey:i,graph:k,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function b(t,e,r){var n=a(e.color),i=e.source.label+"|"+e.target.label+"__"+r;return e.trace=t.trace,e.curveNumber=t.trace.index,{circular:t.circular,key:i,traceId:t.key,pointNumber:e.pointNumber,link:e,tinyColorHue:o.tinyRGB(n),tinyColorAlpha:n.getAlpha(),linkPath:_,linkLineColor:t.linkLineColor,linkLineWidth:t.linkLineWidth,valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,parent:t,interactionState:t.interactionState,flow:e.flow}}function _(){return function(t){if(t.link.circular)return e=t.link,r=e.width/2,n=e.circularPathData,"top"===e.circularLinkType?"M "+n.targetX+" "+(n.targetY+r)+" L"+n.rightInnerExtent+" "+(n.targetY+r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 1 "+(n.rightFullExtent-r)+" "+(n.targetY-n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 1 "+n.rightInnerExtent+" "+(n.verticalFullExtent-r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 1 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY-n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.leftInnerExtent+" "+(n.sourceY-r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 0 "+(n.leftFullExtent-r)+" "+(n.sourceY-n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"L"+n.rightInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 0 "+(n.rightFullExtent+r)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r)+" "+(n.targetY-n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 0 "+n.rightInnerExtent+" "+(n.targetY-r)+"L"+n.targetX+" "+(n.targetY-r)+"Z":"M "+n.targetX+" "+(n.targetY-r)+" L"+n.rightInnerExtent+" "+(n.targetY-r)+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightSmallArcRadius+r)+" 0 0 0 "+(n.rightFullExtent-r)+" "+(n.targetY+n.rightSmallArcRadius)+"L"+(n.rightFullExtent-r)+" "+n.verticalRightInnerExtent+"A"+(n.rightLargeArcRadius+r)+" "+(n.rightLargeArcRadius+r)+" 0 0 0 "+n.rightInnerExtent+" "+(n.verticalFullExtent+r)+"L"+n.leftInnerExtent+" "+(n.verticalFullExtent+r)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftLargeArcRadius+r)+" 0 0 0 "+(n.leftFullExtent+r)+" "+n.verticalLeftInnerExtent+"L"+(n.leftFullExtent+r)+" "+(n.sourceY+n.leftSmallArcRadius)+"A"+(n.leftLargeArcRadius+r)+" "+(n.leftSmallArcRadius+r)+" 0 0 0 "+n.leftInnerExtent+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY-r)+"L"+n.sourceX+" "+(n.sourceY+r)+"L"+n.leftInnerExtent+" "+(n.sourceY+r)+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftSmallArcRadius-r)+" 0 0 1 "+(n.leftFullExtent-r)+" "+(n.sourceY+n.leftSmallArcRadius)+"L"+(n.leftFullExtent-r)+" "+n.verticalLeftInnerExtent+"A"+(n.leftLargeArcRadius-r)+" "+(n.leftLargeArcRadius-r)+" 0 0 1 "+n.leftInnerExtent+" "+(n.verticalFullExtent-r)+"L"+n.rightInnerExtent+" "+(n.verticalFullExtent-r)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightLargeArcRadius-r)+" 0 0 1 "+(n.rightFullExtent+r)+" "+n.verticalRightInnerExtent+"L"+(n.rightFullExtent+r)+" "+(n.targetY+n.rightSmallArcRadius)+"A"+(n.rightLargeArcRadius-r)+" "+(n.rightSmallArcRadius-r)+" 0 0 1 "+n.rightInnerExtent+" "+(n.targetY+r)+"L"+n.targetX+" "+(n.targetY+r)+"Z";var e,r,n,i=t.link.source.x1,a=t.link.target.x0,o=v(i,a),s=o(.5),l=o(.5),c=t.link.y0-t.link.width/2,u=t.link.y0+t.link.width/2,f=t.link.y1-t.link.width/2,h=t.link.y1+t.link.width/2;return"M"+i+","+c+"C"+s+","+c+" "+l+","+f+" "+a+","+f+"L"+a+","+h+"C"+l+","+h+" "+s+","+u+" "+i+","+u+"Z"}}function w(t,e){var r=a(e.color),i=n.nodePadAcross,s=t.nodePad/2;e.dx=e.x1-e.x0,e.dy=e.y1-e.y0;var l=e.dx,c=Math.max(.5,e.dy),u="node_"+e.pointNumber;return e.group&&(u=f.randstr()),e.trace=t.trace,e.curveNumber=t.trace.index,{index:e.pointNumber,key:u,partOfGroup:e.partOfGroup||!1,group:e.group,traceId:t.key,trace:t.trace,node:e,nodePad:t.nodePad,nodeLineColor:t.nodeLineColor,nodeLineWidth:t.nodeLineWidth,textFont:t.textFont,size:t.horizontal?t.height:t.width,visibleWidth:Math.ceil(l),visibleHeight:c,zoneX:-i,zoneY:-s,zoneWidth:l+2*i,zoneHeight:c+2*s,labelY:t.horizontal?e.dy/2+1:e.dx/2+1,left:1===e.originalLayer,sizeAcross:t.width,forceLayouts:t.forceLayouts,horizontal:t.horizontal,darkBackground:r.getBrightness()<=128,tinyColorHue:o.tinyRGB(r),tinyColorAlpha:r.getAlpha(),valueFormat:t.valueFormat,valueSuffix:t.valueSuffix,sankey:t.sankey,graph:t.graph,arrangement:t.arrangement,uniqueNodeLabelPathId:[t.guid,t.key,u].join("_"),interactionState:t.interactionState,figure:t}}function T(t){t.attr("transform",(function(t){return h(t.node.x0.toFixed(3),t.node.y0.toFixed(3))}))}function k(t){t.call(T)}function M(t,e){t.call(k),e.attr("d",_())}function A(t){t.attr("width",(function(t){return t.node.x1-t.node.x0})).attr("height",(function(t){return t.visibleHeight}))}function S(t){return t.link.width>1||t.linkLineWidth>0}function E(t){return h(t.translateX,t.translateY)+(t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function C(t){return h(t.horizontal?0:t.labelY,t.horizontal?t.labelY:0)}function L(t){return i.svg.line()([[t.horizontal?t.left?-t.sizeAcross:t.visibleWidth+n.nodeTextOffsetHorizontal:n.nodeTextOffsetHorizontal,0],[t.horizontal?t.left?-n.nodeTextOffsetHorizontal:t.sizeAcross:t.visibleHeight-n.nodeTextOffsetHorizontal,0]])}function I(t){return t.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)"}function P(t){return t.horizontal?"scale(1 1)":"scale(-1 1)"}function z(t){return t.darkBackground&&!t.horizontal?"rgb(255,255,255)":"rgb(0,0,0)"}function O(t){return t.horizontal&&t.left?"100%":"0%"}function D(t,e,r){t.on(".basic",null).on("mouseover.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.hover(this,t,e),t.interactionState.hovered=[this,t])})).on("mousemove.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.follow(this,t),t.interactionState.hovered=[this,t])})).on("mouseout.basic",(function(t){t.interactionState.dragInProgress||t.partOfGroup||(r.unhover(this,t,e),t.interactionState.hovered=!1)})).on("click.basic",(function(t){t.interactionState.hovered&&(r.unhover(this,t,e),t.interactionState.hovered=!1),t.interactionState.dragInProgress||t.partOfGroup||r.select(this,t,e)}))}function R(t,e,r,a){var o=i.behavior.drag().origin((function(t){return{x:t.node.x0+t.visibleWidth/2,y:t.node.y0+t.visibleHeight/2}})).on("dragstart",(function(i){if("fixed"!==i.arrangement&&(f.ensureSingle(a._fullLayout._infolayer,"g","dragcover",(function(t){a._fullLayout._dragCover=t})),f.raiseToTop(this),i.interactionState.dragInProgress=i.node,B(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),"snap"===i.arrangement)){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):function(t,e,r,i){!function(t){for(var e=0;e0&&i.forceLayouts[e].alpha(0)}}(0,e,a,r)).stop()}(0,o,i),function(t,e,r,i,a){window.requestAnimationFrame((function o(){var s;for(s=0;s0)window.requestAnimationFrame(o);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,F(r,a)}}))}(t,e,i,o,a)}})).on("drag",(function(r){if("fixed"!==r.arrangement){var n=i.event.x,a=i.event.y;"snap"===r.arrangement?(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2,r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2):("freeform"===r.arrangement&&(r.node.x0=n-r.visibleWidth/2,r.node.x1=n+r.visibleWidth/2),a=Math.max(0,Math.min(r.size-r.visibleHeight/2,a)),r.node.y0=a-r.visibleHeight/2,r.node.y1=a+r.visibleHeight/2),B(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),M(t.filter(N(r)),e))}})).on("dragend",(function(t){if("fixed"!==t.arrangement){t.interactionState.dragInProgress=!1;for(var e=0;e5?t.node.label:""})).attr("text-anchor",(function(t){return t.horizontal&&t.left?"end":"start"})),q.transition().ease(n.ease).duration(n.duration).attr("startOffset",O).style("fill",z)}},{"../../components/color":643,"../../components/drawing":665,"../../lib":778,"../../lib/gup":775,"../../registry":911,"./constants":1180,"@plotly/d3-sankey":56,"@plotly/d3-sankey-circular":55,d3:169,"d3-force":160,"d3-interpolate":162,tinycolor2:576}],1185:[function(t,e,r){"use strict";e.exports=function(t,e){for(var r=[],n=t.cd[0].trace,i=n._sankey.graph.nodes,a=0;al&&E[v].gap;)v--;for(x=E[v].s,g=E.length-1;g>v;g--)E[g].s=x;for(;lA[u]&&u=0;i--){var a=t[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},{}],1194:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./attributes"),o=t("./constants"),s=t("./subtypes"),l=t("./xy_defaults"),c=t("./period_defaults"),u=t("./stack_defaults"),f=t("./marker_defaults"),h=t("./line_defaults"),p=t("./line_shape_defaults"),d=t("./text_defaults"),g=t("./fillcolor_defaults");e.exports=function(t,e,r,m){function v(r,i){return n.coerce(t,e,a,r,i)}var y=l(t,e,m,v);if(y||(e.visible=!1),e.visible){c(t,e,m,v);var x=u(t,e,m,v),b=!x&&yG!=(F=P[L][1])>=G&&(O=P[L-1][0],D=P[L][0],F-R&&(z=O+(D-O)*(G-R)/(F-R),U=Math.min(U,z),V=Math.max(V,z)));U=Math.max(U,0),V=Math.min(V,h._length);var Y=s.defaultLine;return s.opacity(f.fillcolor)?Y=f.fillcolor:s.opacity((f.line||{}).color)&&(Y=f.line.color),n.extendFlat(t,{distance:t.maxHoverDistance,x0:U,x1:V,y0:G,y1:G,color:Y,hovertemplate:!1}),delete t.index,f.text&&!Array.isArray(f.text)?t.text=String(f.text):t.text=f.name,[t]}}}},{"../../components/color":643,"../../components/fx":683,"../../lib":778,"../../registry":911,"./get_trace_color":1197}],1199:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports={hasLines:n.hasLines,hasMarkers:n.hasMarkers,hasText:n.hasText,isBubble:n.isBubble,attributes:t("./attributes"),supplyDefaults:t("./defaults"),crossTraceDefaults:t("./cross_trace_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./cross_trace_calc"),arraysToCalcdata:t("./arrays_to_calcdata"),plot:t("./plot"),colorbar:t("./marker_colorbar"),formatLabels:t("./format_labels"),style:t("./style").style,styleOnSelect:t("./style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("./select"),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},{"../../plots/cartesian":841,"./arrays_to_calcdata":1186,"./attributes":1187,"./calc":1188,"./cross_trace_calc":1192,"./cross_trace_defaults":1193,"./defaults":1194,"./format_labels":1196,"./hover":1198,"./marker_colorbar":1205,"./plot":1208,"./select":1209,"./style":1211,"./subtypes":1212}],1200:[function(t,e,r){"use strict";var n=t("../../lib").isArrayOrTypedArray,i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults");e.exports=function(t,e,r,o,s,l){var c=(t.marker||{}).color;(s("line.color",r),i(t,"line"))?a(t,e,o,s,{prefix:"line.",cLetter:"c"}):s("line.color",!n(c)&&c||r);s("line.width"),(l||{}).noDash||s("line.dash")}},{"../../components/colorscale/defaults":653,"../../components/colorscale/helpers":654,"../../lib":778}],1201:[function(t,e,r){"use strict";var n=t("../../constants/numerical"),i=n.BADNUM,a=n.LOG_CLIP,o=a+.5,s=a-.5,l=t("../../lib"),c=l.segmentsIntersect,u=l.constrain,f=t("./constants");e.exports=function(t,e){var r,n,a,h,p,d,g,m,v,y,x,b,_,w,T,k,M,A,S=e.xaxis,E=e.yaxis,C="log"===S.type,L="log"===E.type,I=S._length,P=E._length,z=e.connectGaps,O=e.baseTolerance,D=e.shape,R="linear"===D,F=e.fill&&"none"!==e.fill,B=[],N=f.minTolerance,j=t.length,U=new Array(j),V=0;function q(r){var n=t[r];if(!n)return!1;var a=e.linearized?S.l2p(n.x):S.c2p(n.x),l=e.linearized?E.l2p(n.y):E.c2p(n.y);if(a===i){if(C&&(a=S.c2p(n.x,!0)),a===i)return!1;L&&l===i&&(a*=Math.abs(S._m*P*(S._m>0?o:s)/(E._m*I*(E._m>0?o:s)))),a*=1e3}if(l===i){if(L&&(l=E.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function H(t,e,r,n){var i=r-t,a=n-e,o=.5-t,s=.5-e,l=i*i+a*a,c=i*o+a*s;if(c>0&&crt||t[1]it)return[u(t[0],et,rt),u(t[1],nt,it)]}function st(t,e){return t[0]===e[0]&&(t[0]===et||t[0]===rt)||(t[1]===e[1]&&(t[1]===nt||t[1]===it)||void 0)}function lt(t,e,r){return function(n,i){var a=ot(n),o=ot(i),s=[];if(a&&o&&st(a,o))return s;a&&s.push(a),o&&s.push(o);var c=2*l.constrain((n[t]+i[t])/2,e,r)-((a||n)[t]+(o||i)[t]);c&&((a&&o?c>0==a[t]>o[t]?a:o:a||o)[t]+=c);return s}}function ct(t){var e=t[0],r=t[1],n=e===U[V-1][0],i=r===U[V-1][1];if(!n||!i)if(V>1){var a=e===U[V-2][0],o=r===U[V-2][1];n&&(e===et||e===rt)&&a?o?V--:U[V-1]=t:i&&(r===nt||r===it)&&o?a?V--:U[V-1]=t:U[V++]=t}else U[V++]=t}function ut(t){U[V-1][0]!==t[0]&&U[V-1][1]!==t[1]&&ct([Z,J]),ct(t),K=null,Z=J=0}function ft(t){if(M=t[0]/I,A=t[1]/P,W=t[0]rt?rt:0,X=t[1]it?it:0,W||X){if(V)if(K){var e=$(K,t);e.length>1&&(ut(e[0]),U[V++]=e[1])}else Q=$(U[V-1],t)[0],U[V++]=Q;else U[V++]=[W||t[0],X||t[1]];var r=U[V-1];W&&X&&(r[0]!==W||r[1]!==X)?(K&&(Z!==W&&J!==X?ct(Z&&J?(n=K,a=(i=t)[0]-n[0],o=(i[1]-n[1])/a,(n[1]*i[0]-i[1]*n[0])/a>0?[o>0?et:rt,it]:[o>0?rt:et,nt]):[Z||W,J||X]):Z&&J&&ct([Z,J])),ct([W,X])):Z-W&&J-X&&ct([W||Z,X||J]),K=t,Z=W,J=X}else K&&ut($(K,t)[0]),U[V++]=t;var n,i,a,o}for("linear"===D||"spline"===D?$=function(t,e){for(var r=[],n=0,i=0;i<4;i++){var a=at[i],o=c(t[0],t[1],e[0],e[1],a[0],a[1],a[2],a[3]);o&&(!n||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],n&&Y(o,t)G(d,ht))break;a=d,(_=v[0]*m[0]+v[1]*m[1])>x?(x=_,h=d,g=!1):_=t.length||!d)break;ft(d),n=d}}else ft(h)}K&&ct([Z||K[0],J||K[1]]),B.push(U.slice(0,V))}return B}},{"../../constants/numerical":753,"../../lib":778,"./constants":1191}],1202:[function(t,e,r){"use strict";e.exports=function(t,e,r){"spline"===r("line.shape")&&r("line.smoothing")}},{}],1203:[function(t,e,r){"use strict";var n={tonextx:1,tonexty:1,tonext:1};e.exports=function(t,e,r){var i,a,o,s,l,c={},u=!1,f=-1,h=0,p=-1;for(a=0;a=0?l=p:(l=p=h,h++),l0?Math.max(e,i):0}}},{"fast-isnumeric":241}],1205:[function(t,e,r){"use strict";e.exports={container:"marker",min:"cmin",max:"cmax"}},{}],1206:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/helpers").hasColorscale,a=t("../../components/colorscale/defaults"),o=t("./subtypes");e.exports=function(t,e,r,s,l,c){var u=o.isBubble(t),f=(t.line||{}).color;(c=c||{},f&&(r=f),l("marker.symbol"),l("marker.opacity",u?.7:1),l("marker.size"),l("marker.color",r),i(t,"marker")&&a(t,e,s,l,{prefix:"marker.",cLetter:"c"}),c.noSelect||(l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size")),c.noLine||(l("marker.line.color",f&&!Array.isArray(f)&&e.marker.color!==f?f:u?n.background:n.defaultLine),i(t,"marker.line")&&a(t,e,s,l,{prefix:"marker.line.",cLetter:"c"}),l("marker.line.width",u?1:0)),u&&(l("marker.sizeref"),l("marker.sizemin"),l("marker.sizemode")),c.gradient)&&("none"!==l("marker.gradient.type")&&l("marker.gradient.color"))}},{"../../components/color":643,"../../components/colorscale/defaults":653,"../../components/colorscale/helpers":654,"./subtypes":1212}],1207:[function(t,e,r){"use strict";var n=t("../../lib").dateTick0,i=t("../../constants/numerical").ONEWEEK;function a(t,e){return n(e,t%i==0?1:0)}e.exports=function(t,e,r,n,i){if(i||(i={x:!0,y:!0}),i.x){var o=n("xperiod");o&&(n("xperiod0",a(o,e.xcalendar)),n("xperiodalignment"))}if(i.y){var s=n("yperiod");s&&(n("yperiod0",a(s,e.ycalendar)),n("yperiodalignment"))}}},{"../../constants/numerical":753,"../../lib":778}],1208:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../registry"),a=t("../../lib"),o=a.ensureSingle,s=a.identity,l=t("../../components/drawing"),c=t("./subtypes"),u=t("./line_points"),f=t("./link_traces"),h=t("../../lib/polygon").tester;function p(t,e,r,f,p,d,g){var m;!function(t,e,r,i,o){var s=r.xaxis,l=r.yaxis,u=n.extent(a.simpleMap(s.range,s.r2c)),f=n.extent(a.simpleMap(l.range,l.r2c)),h=i[0].trace;if(!c.hasMarkers(h))return;var p=h.marker.maxdisplayed;if(0===p)return;var d=i.filter((function(t){return t.x>=u[0]&&t.x<=u[1]&&t.y>=f[0]&&t.y<=f[1]})),g=Math.ceil(d.length/p),m=0;o.forEach((function(t,r){var n=t[0].trace;c.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function y(t){return v?t.transition():t}var x=r.xaxis,b=r.yaxis,_=f[0].trace,w=_.line,T=n.select(d),k=o(T,"g","errorbars"),M=o(T,"g","lines"),A=o(T,"g","points"),S=o(T,"g","text");if(i.getComponentMethod("errorbars","plot")(t,k,r,g),!0===_.visible){var E,C;y(T).style("opacity",_.opacity);var L=_.fill.charAt(_.fill.length-1);"x"!==L&&"y"!==L&&(L=""),f[0][r.isRangePlot?"nodeRangePlot3":"node3"]=T;var I,P,z="",O=[],D=_._prevtrace;D&&(z=D._prevRevpath||"",C=D._nextFill,O=D._polygons);var R,F,B,N,j,U,V,q="",H="",G=[],Y=a.noop;if(E=_._ownFill,c.hasLines(_)||"none"!==_.fill){for(C&&C.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(w.shape)?(R=l.steps(w.shape),F=l.steps(w.shape.split("").reverse().join(""))):R=F="spline"===w.shape?function(t){var e=t[t.length-1];return t.length>1&&t[0][0]===e[0]&&t[0][1]===e[1]?l.smoothclosed(t.slice(1),w.smoothing):l.smoothopen(t,w.smoothing)}:function(t){return"M"+t.join("L")},B=function(t){return F(t.reverse())},G=u(f,{xaxis:x,yaxis:b,connectGaps:_.connectgaps,baseTolerance:Math.max(w.width||1,3)/4,shape:w.shape,simplify:w.simplify,fill:_.fill}),V=_._polygons=new Array(G.length),m=0;m1){var r=n.select(this);if(r.datum(f),t)y(r.style("opacity",0).attr("d",I).call(l.lineGroupStyle)).style("opacity",1);else{var i=y(r);i.attr("d",I),l.singleLineStyle(f,i)}}}}}var W=M.selectAll(".js-line").data(G);y(W.exit()).style("opacity",0).remove(),W.each(Y(!1)),W.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(l.lineGroupStyle).each(Y(!0)),l.setClipUrl(W,r.layerClipId,t),G.length?(E?(E.datum(f),N&&U&&(L?("y"===L?N[1]=U[1]=b.c2p(0,!0):"x"===L&&(N[0]=U[0]=x.c2p(0,!0)),y(E).attr("d","M"+U+"L"+N+"L"+q.substr(1)).call(l.singleFillStyle)):y(E).attr("d",q+"Z").call(l.singleFillStyle))):C&&("tonext"===_.fill.substr(0,6)&&q&&z?("tonext"===_.fill?y(C).attr("d",q+"Z"+z+"Z").call(l.singleFillStyle):y(C).attr("d",q+"L"+z.substr(1)+"Z").call(l.singleFillStyle),_._polygons=_._polygons.concat(O)):(Z(C),_._polygons=null)),_._prevRevpath=H,_._prevPolygons=V):(E?Z(E):C&&Z(C),_._polygons=_._prevRevpath=_._prevPolygons=null),A.datum(f),S.datum(f),function(e,i,a){var o,u=a[0].trace,f=c.hasMarkers(u),h=c.hasText(u),p=tt(u),d=et,g=et;if(f||h){var m=s,_=u.stackgroup,w=_&&"infer zero"===t._fullLayout._scatterStackOpts[x._id+b._id][_].stackgaps;u.marker.maxdisplayed||u._needsCull?m=w?K:J:_&&!w&&(m=Q),f&&(d=m),h&&(g=m)}var T,k=(o=e.selectAll("path.point").data(d,p)).enter().append("path").classed("point",!0);v&&k.call(l.pointStyle,u,t).call(l.translatePoints,x,b).style("opacity",0).transition().style("opacity",1),o.order(),f&&(T=l.makePointStyleFns(u)),o.each((function(e){var i=n.select(this),a=y(i);l.translatePoint(e,a,x,b)?(l.singlePointStyle(e,a,u,T,t),r.layerClipId&&l.hideOutsideRangePoint(e,a,x,b,u.xcalendar,u.ycalendar),u.customdata&&i.classed("plotly-customdata",null!==e.data&&void 0!==e.data)):a.remove()})),v?o.exit().transition().style("opacity",0).remove():o.exit().remove(),(o=i.selectAll("g").data(g,p)).enter().append("g").classed("textpoint",!0).append("text"),o.order(),o.each((function(t){var e=n.select(this),i=y(e.select("text"));l.translatePoint(t,i,x,b)?r.layerClipId&&l.hideOutsideRangePoint(t,e,x,b,u.xcalendar,u.ycalendar):e.remove()})),o.selectAll("text").call(l.textPointStyle,u,t).each((function(t){var e=x.c2p(t.x),r=b.c2p(t.y);n.select(this).selectAll("tspan.line").each((function(){y(n.select(this)).attr({x:e,y:r})}))})),o.exit().remove()}(A,S,f);var X=!1===_.cliponaxis?null:r.layerClipId;l.setClipUrl(A,X,t),l.setClipUrl(S,X,t)}function Z(t){y(t).attr("d","M0,0Z")}function J(t){return t.filter((function(t){return!t.gap&&t.vis}))}function K(t){return t.filter((function(t){return t.vis}))}function Q(t){return t.filter((function(t){return!t.gap}))}function $(t){return t.id}function tt(t){if(t.ids)return $}function et(){return!1}}e.exports=function(t,e,r,i,a,c){var u,h,d=!a,g=!!a&&a.duration>0,m=f(t,e,r);((u=i.selectAll("g.trace").data(m,(function(t){return t[0].trace.uid}))).enter().append("g").attr("class",(function(t){return"trace scatter trace"+t[0].trace.uid})).style("stroke-miterlimit",2),u.order(),function(t,e,r){e.each((function(e){var i=o(n.select(this),"g","fills");l.setClipUrl(i,r.layerClipId,t);var a=e[0].trace,c=[];a._ownfill&&c.push("_ownFill"),a._nexttrace&&c.push("_nextFill");var u=i.selectAll("g").data(c,s);u.enter().append("g"),u.exit().each((function(t){a[t]=null})).remove(),u.order().each((function(t){a[t]=o(n.select(this),"path","js-fill")}))}))}(t,u,e),g)?(c&&(h=c()),n.transition().duration(a.duration).ease(a.easing).each("end",(function(){h&&h()})).each("interrupt",(function(){h&&h()})).each((function(){i.selectAll("g.trace").each((function(r,n){p(t,n,e,r,m,this,a)}))}))):u.each((function(r,n){p(t,n,e,r,m,this,a)}));d&&u.exit().remove(),i.selectAll("path:not([d])").remove()}},{"../../components/drawing":665,"../../lib":778,"../../lib/polygon":790,"../../registry":911,"./line_points":1201,"./link_traces":1203,"./subtypes":1212,d3:169}],1209:[function(t,e,r){"use strict";var n=t("./subtypes");e.exports=function(t,e){var r,i,a,o,s=t.cd,l=t.xaxis,c=t.yaxis,u=[],f=s[0].trace;if(!n.hasMarkers(f)&&!n.hasText(f))return[];if(!1===e)for(r=0;r0){var h=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=h),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,h)}}else o[s]=[-l[0]*r,l[1]*r]}return o}e.exports=function(t,e,r){var n=[i(t.x,t.error_x,e[0],r.xaxis),i(t.y,t.error_y,e[1],r.yaxis),i(t.z,t.error_z,e[2],r.zaxis)],a=function(t){for(var e=0;e-1?-1:t.indexOf("right")>-1?1:0}function b(t){return null==t?0:t.indexOf("top")>-1?-1:t.indexOf("bottom")>-1?1:0}function _(t,e){return e(4*t)}function w(t){return p[t]}function T(t,e,r,n,i){var a=null;if(l.isArrayOrTypedArray(t)){a=[];for(var o=0;o=0){var g=function(t,e,r){var n,i=(r+1)%3,a=(r+2)%3,o=[],l=[];for(n=0;n=0&&f("surfacecolor",h||p);for(var d=["x","y","z"],g=0;g<3;++g){var m="projection."+d[g];f(m+".show")&&(f(m+".opacity"),f(m+".scale"))}var v=n.getComponentMethod("errorbars","supplyDefaults");v(t,e,h||p||r,{axis:"z"}),v(t,e,h||p||r,{axis:"y",inherit:"z"}),v(t,e,h||p||r,{axis:"x",inherit:"z"})}else e.visible=!1}},{"../../lib":778,"../../registry":911,"../scatter/line_defaults":1200,"../scatter/marker_defaults":1206,"../scatter/subtypes":1212,"../scatter/text_defaults":1213,"./attributes":1215}],1220:[function(t,e,r){"use strict";e.exports={plot:t("./convert"),attributes:t("./attributes"),markerSymbols:t("../../constants/gl3d_markers"),supplyDefaults:t("./defaults"),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:t("./calc"),moduleType:"trace",name:"scatter3d",basePlotModule:t("../../plots/gl3d"),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},{"../../constants/gl3d_markers":751,"../../plots/gl3d":870,"./attributes":1215,"./calc":1216,"./convert":1218,"./defaults":1219}],1221:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../plots/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/template_attributes").texttemplateAttrs,s=t("../../components/colorscale/attributes"),l=t("../../lib/extend").extendFlat,c=n.marker,u=n.line,f=c.line;e.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:l({},n.mode,{dflt:"markers"}),text:l({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),hovertext:l({},n.hovertext,{}),line:{color:u.color,width:u.width,dash:u.dash,shape:l({},u.shape,{values:["linear","spline"]}),smoothing:u.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:l({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:n.fillcolor,marker:l({symbol:c.symbol,opacity:c.opacity,maxdisplayed:c.maxdisplayed,size:c.size,sizeref:c.sizeref,sizemin:c.sizemin,sizemode:c.sizemode,line:l({width:f.width,editType:"calc"},s("marker.line")),gradient:c.gradient,editType:"calc"},s("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:l({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a()}},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plots/attributes":824,"../../plots/template_attributes":906,"../scatter/attributes":1187}],1222:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../scatter/colorscale_calc"),a=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=t("../carpet/lookup_carpetid");e.exports=function(t,e){var r=e._carpetTrace=l(t,e);if(r&&r.visible&&"legendonly"!==r.visible){var c;e.xaxis=r.xaxis,e.yaxis=r.yaxis;var u,f,h=e._length,p=new Array(h),d=!1;for(c=0;c")}return o}function y(t,e){var r;r=t.labelprefix&&t.labelprefix.length>0?t.labelprefix.replace(/ = $/,""):t._hovertitle,m.push(r+": "+e.toFixed(3)+t.labelsuffix)}}},{"../../lib":778,"../scatter/hover":1198}],1227:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scattercarpet",basePlotModule:t("../../plots/cartesian"),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},{"../../plots/cartesian":841,"../scatter/marker_colorbar":1205,"../scatter/select":1209,"../scatter/style":1211,"./attributes":1221,"./calc":1222,"./defaults":1223,"./event_data":1224,"./format_labels":1225,"./hover":1226,"./plot":1228}],1228:[function(t,e,r){"use strict";var n=t("../scatter/plot"),i=t("../../plots/cartesian/axes"),a=t("../../components/drawing");e.exports=function(t,e,r,o){var s,l,c,u=r[0][0].carpet,f={xaxis:i.getFromId(t,u.xaxis||"x"),yaxis:i.getFromId(t,u.yaxis||"y"),plot:e.plot};for(n(t,f,r,o),s=0;s")}(c,g,t,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":683,"../../constants/numerical":753,"../../lib":778,"../scatter/get_trace_color":1197,"./attributes":1229}],1235:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),calcGeoJSON:t("./plot").calcGeoJSON,plot:t("./plot").plot,style:t("./style"),styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),moduleType:"trace",name:"scattergeo",basePlotModule:t("../../plots/geo"),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/geo":860,"../scatter/marker_colorbar":1205,"../scatter/style":1211,"./attributes":1229,"./calc":1230,"./defaults":1231,"./event_data":1232,"./format_labels":1233,"./hover":1234,"./plot":1236,"./select":1237,"./style":1238}],1236:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../lib/topojson_utils").getTopojsonFeatures,o=t("../../lib/geojson_utils"),s=t("../../lib/geo_location_utils"),l=t("../../plots/cartesian/autorange").findExtremes,c=t("../../constants/numerical").BADNUM,u=t("../scatter/calc").calcMarkerSize,f=t("../scatter/subtypes"),h=t("./style");e.exports={calcGeoJSON:function(t,e){var r,n,i=t[0].trace,o=e[i.geo],f=o._subplot,h=i._length;if(Array.isArray(i.locations)){var p=i.locationmode,d="geojson-id"===p?s.extractTraceFeature(t):a(i,f.topojson);for(r=0;r=m,k=2*w,M={},A=x.makeCalcdata(e,"x"),S=b.makeCalcdata(e,"y"),E=s(e,x,"x",A),C=s(e,b,"y",S);e._x=E,e._y=C,e.xperiodalignment&&(e._origX=A),e.yperiodalignment&&(e._origY=S);var L=new Array(k);for(r=0;r1&&i.extendFlat(s.line,p.linePositions(t,r,n));if(s.errorX||s.errorY){var l=p.errorBarPositions(t,r,n,a,o);s.errorX&&i.extendFlat(s.errorX,l.x),s.errorY&&i.extendFlat(s.errorY,l.y)}s.text&&(i.extendFlat(s.text,{positions:n},p.textPosition(t,r,s.text,s.marker)),i.extendFlat(s.textSel,{positions:n},p.textPosition(t,r,s.text,s.markerSel)),i.extendFlat(s.textUnsel,{positions:n},p.textPosition(t,r,s.text,s.markerUnsel)));return s}(t,0,e,L,E,C),O=d(t,_);return f(y,e),T?z.marker&&(P=2*(z.marker.sizeAvg||Math.max(z.marker.size,3))):P=c(e,w),u(t,e,x,b,E,C,P),z.errorX&&v(e,x,z.errorX),z.errorY&&v(e,b,z.errorY),z.fill&&!O.fill2d&&(O.fill2d=!0),z.marker&&!O.scatter2d&&(O.scatter2d=!0),z.line&&!O.line2d&&(O.line2d=!0),!z.errorX&&!z.errorY||O.error2d||(O.error2d=!0),z.text&&!O.glText&&(O.glText=!0),z.marker&&(z.marker.snap=w),O.lineOptions.push(z.line),O.errorXOptions.push(z.errorX),O.errorYOptions.push(z.errorY),O.fillOptions.push(z.fill),O.markerOptions.push(z.marker),O.markerSelectedOptions.push(z.markerSel),O.markerUnselectedOptions.push(z.markerUnsel),O.textOptions.push(z.text),O.textSelectedOptions.push(z.textSel),O.textUnselectedOptions.push(z.textUnsel),O.selectBatch.push([]),O.unselectBatch.push([]),M._scene=O,M.index=O.count,M.x=E,M.y=C,M.positions=L,O.count++,[{x:!1,y:!1,t:M,trace:e}]}},{"../../constants/numerical":753,"../../lib":778,"../../plots/cartesian/align_period":825,"../../plots/cartesian/autorange":827,"../../plots/cartesian/axis_ids":831,"../scatter/calc":1188,"../scatter/colorscale_calc":1190,"./constants":1241,"./convert":1242,"./scene_update":1250,"@plotly/point-cluster":57}],1241:[function(t,e,r){"use strict";e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:20,SYMBOL_STROKE:1,DOT_RE:/-dot/,OPEN_RE:/-open/,DASHES:{solid:[1],dot:[1,1],dash:[4,1],longdash:[8,1],dashdot:[4,1,1,1],longdashdot:[8,1,1,1]}}},{}],1242:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("svg-path-sdf"),a=t("color-normalize"),o=t("../../registry"),s=t("../../lib"),l=t("../../components/drawing"),c=t("../../plots/cartesian/axis_ids"),u=t("../../lib/gl_format_color").formatColor,f=t("../scatter/subtypes"),h=t("../scatter/make_bubble_size_func"),p=t("./helpers"),d=t("./constants"),g=t("../../constants/interactions").DESELECTDIM,m={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=t("../../components/fx/helpers").appendArrayPointValue;function y(t,e){var r,i=t._fullLayout,a=e._length,o=e.textfont,l=e.textposition,c=Array.isArray(l)?l:[l],u=o.color,f=o.size,h=o.family,p={},d=e.texttemplate;if(d){p.text=[];var g=i._d3locale,m=Array.isArray(d),y=m?Math.min(d.length,a):a,x=m?function(t){return d[t]}:function(){return d};for(r=0;rd.TOO_MANY_POINTS||f.hasMarkers(e)?"rect":"round";if(c&&e.connectgaps){var h=n[0],p=n[1];for(i=0;i1?l[i]:l[0]:l,d=Array.isArray(c)?c.length>1?c[i]:c[0]:c,g=m[p],v=m[d],y=u?u/.8+1:0,x=-v*y-.5*v;o.offset[i]=[g*y/h,x/h]}}return o}}},{"../../components/drawing":665,"../../components/fx/helpers":679,"../../constants/interactions":752,"../../lib":778,"../../lib/gl_format_color":774,"../../plots/cartesian/axis_ids":831,"../../registry":911,"../scatter/make_bubble_size_func":1204,"../scatter/subtypes":1212,"./constants":1241,"./helpers":1246,"color-normalize":125,"fast-isnumeric":241,"svg-path-sdf":574}],1243:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../registry"),a=t("./helpers"),o=t("./attributes"),s=t("../scatter/constants"),l=t("../scatter/subtypes"),c=t("../scatter/xy_defaults"),u=t("../scatter/period_defaults"),f=t("../scatter/marker_defaults"),h=t("../scatter/line_defaults"),p=t("../scatter/fillcolor_defaults"),d=t("../scatter/text_defaults");e.exports=function(t,e,r,g){function m(r,i){return n.coerce(t,e,o,r,i)}var v=!!t.marker&&a.isOpenSymbol(t.marker.symbol),y=l.isBubble(t),x=c(t,e,g,m);if(x){u(t,e,g,m);var b=x100},r.isDotSymbol=function(t){return"string"==typeof t?n.DOT_RE.test(t):t>200}},{"./constants":1241}],1247:[function(t,e,r){"use strict";var n=t("../../registry"),i=t("../../lib"),a=t("../scatter/get_trace_color");function o(t,e,r,o){var s=t.xa,l=t.ya,c=t.distance,u=t.dxy,f=t.index,h={pointNumber:f,x:e[f],y:r[f]};h.tx=Array.isArray(o.text)?o.text[f]:o.text,h.htx=Array.isArray(o.hovertext)?o.hovertext[f]:o.hovertext,h.data=Array.isArray(o.customdata)?o.customdata[f]:o.customdata,h.tp=Array.isArray(o.textposition)?o.textposition[f]:o.textposition;var p=o.textfont;p&&(h.ts=i.isArrayOrTypedArray(p.size)?p.size[f]:p.size,h.tc=Array.isArray(p.color)?p.color[f]:p.color,h.tf=Array.isArray(p.family)?p.family[f]:p.family);var d=o.marker;d&&(h.ms=i.isArrayOrTypedArray(d.size)?d.size[f]:d.size,h.mo=i.isArrayOrTypedArray(d.opacity)?d.opacity[f]:d.opacity,h.mx=i.isArrayOrTypedArray(d.symbol)?d.symbol[f]:d.symbol,h.mc=i.isArrayOrTypedArray(d.color)?d.color[f]:d.color);var g=d&&d.line;g&&(h.mlc=Array.isArray(g.color)?g.color[f]:g.color,h.mlw=i.isArrayOrTypedArray(g.width)?g.width[f]:g.width);var m=d&&d.gradient;m&&"none"!==m.type&&(h.mgt=Array.isArray(m.type)?m.type[f]:m.type,h.mgc=Array.isArray(m.color)?m.color[f]:m.color);var v=s.c2p(h.x,!0),y=l.c2p(h.y,!0),x=h.mrc||1,b=o.hoverlabel;b&&(h.hbg=Array.isArray(b.bgcolor)?b.bgcolor[f]:b.bgcolor,h.hbc=Array.isArray(b.bordercolor)?b.bordercolor[f]:b.bordercolor,h.hts=i.isArrayOrTypedArray(b.font.size)?b.font.size[f]:b.font.size,h.htc=Array.isArray(b.font.color)?b.font.color[f]:b.font.color,h.htf=Array.isArray(b.font.family)?b.font.family[f]:b.font.family,h.hnl=i.isArrayOrTypedArray(b.namelength)?b.namelength[f]:b.namelength);var _=o.hoverinfo;_&&(h.hi=Array.isArray(_)?_[f]:_);var w=o.hovertemplate;w&&(h.ht=Array.isArray(w)?w[f]:w);var T={};T[t.index]=h;var k=o._origX,M=o._origY,A=i.extendFlat({},t,{color:a(o,h),x0:v-x,x1:v+x,xLabelVal:k?k[f]:h.x,y0:y-x,y1:y+x,yLabelVal:M?M[f]:h.y,cd:T,distance:c,spikeDistance:u,hovertemplate:h.ht});return h.htx?A.text=h.htx:h.tx?A.text=h.tx:o.text&&(A.text=o.text),i.fillText(h,o,A),n.getComponentMethod("errorbars","hoverInfo")(h,o,A),A}e.exports={hoverPoints:function(t,e,r,n){var i,a,s,l,c,u,f,h,p,d=t.cd,g=d[0].t,m=d[0].trace,v=t.xa,y=t.ya,x=g.x,b=g.y,_=v.c2p(e),w=y.c2p(r),T=t.distance;if(g.tree){var k=v.p2c(_-T),M=v.p2c(_+T),A=y.p2c(w-T),S=y.p2c(w+T);i="x"===n?g.tree.range(Math.min(k,M),Math.min(y._rl[0],y._rl[1]),Math.max(k,M),Math.max(y._rl[0],y._rl[1])):g.tree.range(Math.min(k,M),Math.min(A,S),Math.max(k,M),Math.max(A,S))}else i=g.ids;var E=T;if("x"===n)for(c=0;c-1;c--)s=x[i[c]],l=b[i[c]],u=v.c2p(s)-_,f=y.c2p(l)-w,(h=Math.sqrt(u*u+f*f))v.glText.length){var w=b-v.glText.length;for(d=0;dr&&(isNaN(e[n])||isNaN(e[n+1]));)n-=2;t.positions=e.slice(r,n+2)}return t})),v.line2d.update(v.lineOptions)),v.error2d){var k=(v.errorXOptions||[]).concat(v.errorYOptions||[]);v.error2d.update(k)}v.scatter2d&&v.scatter2d.update(v.markerOptions),v.fillOrder=s.repeat(null,b),v.fill2d&&(v.fillOptions=v.fillOptions.map((function(t,e){var n=r[e];if(t&&n&&n[0]&&n[0].trace){var i,a,o=n[0],s=o.trace,l=o.t,c=v.lineOptions[e],u=[];s._ownfill&&u.push(e),s._nexttrace&&u.push(e+1),u.length&&(v.fillOrder[e]=u);var f,h,p=[],d=c&&c.positions||l.positions;if("tozeroy"===s.fill){for(f=0;ff&&isNaN(d[h+1]);)h-=2;0!==d[f+1]&&(p=[d[f],0]),p=p.concat(d.slice(f,h+2)),0!==d[h+1]&&(p=p.concat([d[h],0]))}else if("tozerox"===s.fill){for(f=0;ff&&isNaN(d[h]);)h-=2;0!==d[f]&&(p=[0,d[f+1]]),p=p.concat(d.slice(f,h+2)),0!==d[h]&&(p=p.concat([0,d[h+1]]))}else if("toself"===s.fill||"tonext"===s.fill){for(p=[],i=0,a=0;a-1;for(d=0;d=0?Math.floor((e+180)/360):Math.ceil((e-180)/360)),d=e-p;if(n.getClosest(l,(function(t){var e=t.lonlat;if(e[0]===s)return 1/0;var n=i.modHalf(e[0],360),a=e[1],o=h.project([n,a]),l=o.x-u.c2p([d,a]),c=o.y-f.c2p([n,r]),p=Math.max(3,t.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-p,1-3/p)}),t),!1!==t.index){var g=l[t.index],m=g.lonlat,v=[i.modHalf(m[0],360)+p,m[1]],y=u.c2p(v),x=f.c2p(v),b=g.mrc||1;t.x0=y-b,t.x1=y+b,t.y0=x-b,t.y1=x+b;var _={};_[c.subplot]={_subplot:h};var w=c._module.formatLabels(g,c,_);return t.lonLabel=w.lonLabel,t.latLabel=w.latLabel,t.color=a(c,g),t.extraText=function(t,e,r){if(t.hovertemplate)return;var n=(e.hi||t.hoverinfo).split("+"),i=-1!==n.indexOf("all"),a=-1!==n.indexOf("lon"),s=-1!==n.indexOf("lat"),l=e.lonlat,c=[];function u(t){return t+"\xb0"}i||a&&s?c.push("("+u(l[0])+", "+u(l[1])+")"):a?c.push(r.lon+u(l[0])):s&&c.push(r.lat+u(l[1]));(i||-1!==n.indexOf("text"))&&o(e,t,c);return c.join("
    ")}(c,g,l[0].t.labels),t.hovertemplate=c.hovertemplate,[t]}}},{"../../components/fx":683,"../../constants/numerical":753,"../../lib":778,"../scatter/get_trace_color":1197}],1258:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("../scattergeo/calc"),plot:t("./plot"),hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("./select"),styleOnSelect:function(t,e){e&&e[0].trace._glTrace.update(e)},moduleType:"trace",name:"scattermapbox",basePlotModule:t("../../plots/mapbox"),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/mapbox":885,"../scatter/marker_colorbar":1205,"../scattergeo/calc":1230,"./attributes":1252,"./defaults":1254,"./event_data":1255,"./format_labels":1256,"./hover":1257,"./plot":1259,"./select":1260}],1259:[function(t,e,r){"use strict";var n=t("./convert"),i=t("../../plots/mapbox/constants").traceLayerPrefix,a=["fill","line","circle","symbol"];function o(t,e){this.type="scattermapbox",this.subplot=t,this.uid=e,this.sourceIds={fill:"source-"+e+"-fill",line:"source-"+e+"-line",circle:"source-"+e+"-circle",symbol:"source-"+e+"-symbol"},this.layerIds={fill:i+e+"-fill",line:i+e+"-line",circle:i+e+"-circle",symbol:i+e+"-symbol"},this.below=null}var s=o.prototype;s.addSource=function(t,e){this.subplot.map.addSource(this.sourceIds[t],{type:"geojson",data:e.geojson})},s.setSourceData=function(t,e){this.subplot.map.getSource(this.sourceIds[t]).setData(e.geojson)},s.addLayer=function(t,e,r){this.subplot.addLayer({type:t,id:this.layerIds[t],source:this.sourceIds[t],layout:e.layout,paint:e.paint},r)},s.update=function(t){var e,r,i,o=this.subplot,s=o.map,l=n(o.gd,t),c=o.belowLookup["trace-"+this.uid];if(c!==this.below){for(e=a.length-1;e>=0;e--)r=a[e],s.removeLayer(this.layerIds[r]);for(e=0;e=0;e--){var r=a[e];t.removeLayer(this.layerIds[r]),t.removeSource(this.sourceIds[r])}},e.exports=function(t,e){for(var r=e[0].trace,i=new o(t,r.uid),s=n(t.gd,e),l=i.below=t.belowLookup["trace-"+r.uid],c=0;c")}}e.exports={hoverPoints:function(t,e,r,a){var o=n(t,e,r,a);if(o&&!1!==o[0].index){var s=o[0];if(void 0===s.index)return o;var l=t.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}},{"../scatter/hover":1198}],1266:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:t("../../plots/polar"),categories:["polar","symbols","showLegend","scatter-like"],attributes:t("./attributes"),supplyDefaults:t("./defaults").supplyDefaults,colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover").hoverPoints,selectPoints:t("../scatter/select"),meta:{}}},{"../../plots/polar":894,"../scatter/marker_colorbar":1205,"../scatter/select":1209,"../scatter/style":1211,"./attributes":1261,"./calc":1262,"./defaults":1263,"./format_labels":1264,"./hover":1265,"./plot":1267}],1267:[function(t,e,r){"use strict";var n=t("../scatter/plot"),i=t("../../constants/numerical").BADNUM;e.exports=function(t,e,r){for(var a=e.layers.frontplot.select("g.scatterlayer"),o={xaxis:e.xaxis,yaxis:e.yaxis,plot:e.framework,layerClipId:e._hasClipOnAxisFalse?e.clipIds.forTraces:null},s=e.radialAxis,l=e.angularAxis,c=0;c=c&&(y.marker.cluster=d.tree),y.marker&&(y.markerSel.positions=y.markerUnsel.positions=y.marker.positions=_),y.line&&_.length>1&&l.extendFlat(y.line,s.linePositions(t,p,_)),y.text&&(l.extendFlat(y.text,{positions:_},s.textPosition(t,p,y.text,y.marker)),l.extendFlat(y.textSel,{positions:_},s.textPosition(t,p,y.text,y.markerSel)),l.extendFlat(y.textUnsel,{positions:_},s.textPosition(t,p,y.text,y.markerUnsel))),y.fill&&!h.fill2d&&(h.fill2d=!0),y.marker&&!h.scatter2d&&(h.scatter2d=!0),y.line&&!h.line2d&&(h.line2d=!0),y.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(y.line),h.fillOptions.push(y.fill),h.markerOptions.push(y.marker),h.markerSelectedOptions.push(y.markerSel),h.markerUnselectedOptions.push(y.markerUnsel),h.textOptions.push(y.text),h.textSelectedOptions.push(y.textSel),h.textUnselectedOptions.push(y.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),d.x=w,d.y=T,d.rawx=w,d.rawy=T,d.r=m,d.theta=v,d.positions=_,d._scene=h,d.index=h.count,h.count++}})),a(t,e,r)}}},{"../../lib":778,"../scattergl/constants":1241,"../scattergl/convert":1242,"../scattergl/plot":1249,"../scattergl/scene_update":1250,"@plotly/point-cluster":57,"fast-isnumeric":241}],1275:[function(t,e,r){"use strict";var n=t("../../plots/template_attributes").hovertemplateAttrs,i=t("../../plots/template_attributes").texttemplateAttrs,a=t("../scatter/attributes"),o=t("../../plots/attributes"),s=t("../../components/colorscale/attributes"),l=t("../../components/drawing/attributes").dash,c=t("../../lib/extend").extendFlat,u=a.marker,f=a.line,h=u.line;e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:c({},a.mode,{dflt:"markers"}),text:c({},a.text,{}),texttemplate:i({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:c({},a.hovertext,{}),line:{color:f.color,width:f.width,dash:l,shape:c({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:a.connectgaps,cliponaxis:a.cliponaxis,fill:c({},a.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a.fillcolor,marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:h.width,editType:"calc"},s("marker.line")),gradient:u.gradient,editType:"calc"},s("marker")),textfont:a.textfont,textposition:a.textposition,selected:a.selected,unselected:a.unselected,hoverinfo:c({},o.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:a.hoveron,hovertemplate:n()}},{"../../components/colorscale/attributes":650,"../../components/drawing/attributes":664,"../../lib/extend":768,"../../plots/attributes":824,"../../plots/template_attributes":906,"../scatter/attributes":1187}],1276:[function(t,e,r){"use strict";var n=t("fast-isnumeric"),i=t("../scatter/colorscale_calc"),a=t("../scatter/arrays_to_calcdata"),o=t("../scatter/calc_selection"),s=t("../scatter/calc").calcMarkerSize,l=["a","b","c"],c={a:["b","c"],b:["a","c"],c:["a","b"]};e.exports=function(t,e){var r,u,f,h,p,d,g=t._fullLayout[e.subplot].sum,m=e.sum||g,v={a:e.a,b:e.b,c:e.c};for(r=0;r"),o.hovertemplate=h.hovertemplate,a}function x(t,e){v.push(t._hovertitle+": "+e)}}},{"../scatter/hover":1198}],1281:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),supplyDefaults:t("./defaults"),colorbar:t("../scatter/marker_colorbar"),formatLabels:t("./format_labels"),calc:t("./calc"),plot:t("./plot"),style:t("../scatter/style").style,styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../scatter/select"),eventData:t("./event_data"),moduleType:"trace",name:"scatterternary",basePlotModule:t("../../plots/ternary"),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},{"../../plots/ternary":907,"../scatter/marker_colorbar":1205,"../scatter/select":1209,"../scatter/style":1211,"./attributes":1275,"./calc":1276,"./defaults":1277,"./event_data":1278,"./format_labels":1279,"./hover":1280,"./plot":1282}],1282:[function(t,e,r){"use strict";var n=t("../scatter/plot");e.exports=function(t,e,r){var i=e.plotContainer;i.select(".scatterlayer").selectAll("*").remove();var a={xaxis:e.xaxis,yaxis:e.yaxis,plot:i,layerClipId:e._hasClipOnAxisFalse?e.clipIdRelative:null},o=e.layers.frontplot.select("g.scatterlayer");n(t,a,r,o)}},{"../scatter/plot":1208}],1283:[function(t,e,r){"use strict";var n=t("../scatter/attributes"),i=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../scattergl/attributes"),s=t("../../plots/cartesian/constants").idRegex,l=t("../../plot_api/plot_template").templatedArray,c=t("../../lib/extend").extendFlat,u=n.marker,f=u.line,h=c(i("marker.line",{editTypeOverride:"calc"}),{width:c({},f.width,{editType:"calc"}),editType:"calc"}),p=c(i("marker"),{symbol:u.symbol,size:c({},u.size,{editType:"markerSize"}),sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,opacity:u.opacity,colorbar:u.colorbar,line:h,editType:"calc"});function d(t){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:s[t],editType:"plot"}}}p.color.editType=p.cmin.editType=p.cmax.editType="style",e.exports={dimensions:l("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:c({},o.text,{}),hovertext:c({},o.hovertext,{}),hovertemplate:a(),marker:p,xaxes:d("x"),yaxes:d("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:o.selected.marker,editType:"calc"},unselected:{marker:o.unselected.marker,editType:"calc"},opacity:o.opacity}},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plot_api/plot_template":817,"../../plots/cartesian/constants":834,"../../plots/template_attributes":906,"../scatter/attributes":1187,"../scattergl/attributes":1239}],1284:[function(t,e,r){"use strict";var n=t("regl-line2d"),i=t("../../registry"),a=t("../../lib/prepare_regl"),o=t("../../plots/get_data").getModuleCalcData,s=t("../../plots/cartesian"),l=t("../../plots/cartesian/axis_ids").getFromId,c=t("../../plots/cartesian/axes").shouldShowZeroLine;function u(t,e,r){for(var n=r.matrixOptions.data.length,i=e._visibleDims,a=r.viewOpts.ranges=new Array(n),o=0;oh?2*(b.sizeAvg||Math.max(b.size,3)):a(e,x),p=0;pa&&l||i-1,A=!0;if(o(x)||!!p.selectedpoints||M){var S=p._length;if(p.selectedpoints){g.selectBatch=p.selectedpoints;var E=p.selectedpoints,C={};for(l=0;l1&&(u=g[y-1],h=m[y-1],d=v[y-1]),e=0;eu?"-":"+")+"x")).replace("y",(f>h?"-":"+")+"y")).replace("z",(p>d?"-":"+")+"z");var C=function(){y=0,A=[],S=[],E=[]};(!y||y2?t.slice(1,e-1):2===e?[(t[0]+t[1])/2]:t}function p(t){var e=t.length;return 1===e?[.5,.5]:[t[1]-t[0],t[e-1]-t[e-2]]}function d(t,e){var r=t.fullSceneLayout,i=t.dataScale,u=e._len,f={};function d(t,e){var n=r[e],o=i[c[e]];return a.simpleMap(t,(function(t){return n.d2l(t)*o}))}if(f.vectors=l(d(e._u,"xaxis"),d(e._v,"yaxis"),d(e._w,"zaxis"),u),!u)return{positions:[],cells:[]};var g=d(e._Xs,"xaxis"),m=d(e._Ys,"yaxis"),v=d(e._Zs,"zaxis");if(f.meshgrid=[g,m,v],f.gridFill=e._gridFill,e._slen)f.startingPositions=l(d(e._startsX,"xaxis"),d(e._startsY,"yaxis"),d(e._startsZ,"zaxis"));else{for(var y=m[0],x=h(g),b=h(v),_=new Array(x.length*b.length),w=0,T=0;T=0};v?(r=Math.min(m.length,x.length),l=function(t){return M(m[t])&&A(t)},f=function(t){return String(m[t])}):(r=Math.min(y.length,x.length),l=function(t){return M(y[t])&&A(t)},f=function(t){return String(y[t])}),_&&(r=Math.min(r,b.length));for(var S=0;S1){for(var I=a.randstr(),P=0;P"),name:k||z("name")?l.name:void 0,color:T("hoverlabel.bgcolor")||y.color,borderColor:T("hoverlabel.bordercolor"),fontFamily:T("hoverlabel.font.family"),fontSize:T("hoverlabel.font.size"),fontColor:T("hoverlabel.font.color"),nameLength:T("hoverlabel.namelength"),textAlign:T("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:L,eventData:[f(i,l,h.eventDataKeys)]};m&&(R.x0=S-i.rInscribed*i.rpx1,R.x1=S+i.rInscribed*i.rpx1,R.idealAlign=i.pxmid[0]<0?"left":"right"),v&&(R.x=S,R.idealAlign=S<0?"left":"right"),o.loneHover(R,{container:a._hoverlayer.node(),outerContainer:a._paper.node(),gd:r}),d._hasHoverLabel=!0}if(v){var F=t.select("path.surface");h.styleOne(F,i,l,{hovered:!0})}d._hasHoverEvent=!0,r.emit("plotly_hover",{points:[f(i,l,h.eventDataKeys)],event:n.event})}})),t.on("mouseout",(function(e){var i=r._fullLayout,a=r._fullData[d.index],s=n.select(this).datum();if(d._hasHoverEvent&&(e.originalEvent=n.event,r.emit("plotly_unhover",{points:[f(s,a,h.eventDataKeys)],event:n.event}),d._hasHoverEvent=!1),d._hasHoverLabel&&(o.loneUnhover(i._hoverlayer.node()),d._hasHoverLabel=!1),v){var l=t.select("path.surface");h.styleOne(l,s,a,{hovered:!1})}})),t.on("click",(function(t){var e=r._fullLayout,a=r._fullData[d.index],s=m&&(c.isHierarchyRoot(t)||c.isLeaf(t)),u=c.getPtId(t),p=c.isEntry(t)?c.findEntryWithChild(g,u):c.findEntryWithLevel(g,u),v=c.getPtId(p),y={points:[f(t,a,h.eventDataKeys)],event:n.event};s||(y.nextLevel=v);var x=l.triggerHandler(r,"plotly_"+d.type+"click",y);if(!1!==x&&e.hovermode&&(r._hoverdata=[f(t,a,h.eventDataKeys)],o.click(r,n.event)),!s&&!1!==x&&!r._dragging&&!r._transitioning){i.call("_storeDirectGUIEdit",a,e._tracePreGUI[a.uid],{level:a.level});var b={data:[{level:v}],traces:[d.index]},_={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};o.loneUnhover(e._hoverlayer.node()),i.call("animate",r,b,_)}}))}},{"../../components/fx":683,"../../components/fx/helpers":679,"../../lib":778,"../../lib/events":767,"../../registry":911,"../pie/helpers":1166,"./helpers":1305,d3:169}],1305:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("../../components/color"),a=t("../../lib/setcursor"),o=t("../pie/helpers");function s(t){return t.data.data.pid}r.findEntryWithLevel=function(t,e){var n;return e&&t.eachAfter((function(t){if(r.getPtId(t)===e)return n=t.copy()})),n||t},r.findEntryWithChild=function(t,e){var n;return t.eachAfter((function(t){for(var i=t.children||[],a=0;a0)},r.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},r.isHeader=function(t,e){return!(r.isLeaf(t)||t.depth===e._maxDepth-1)},r.getParent=function(t,e){return r.findEntryWithLevel(t,s(e))},r.listPath=function(t,e){var n=t.parent;if(!n)return[];var i=e?[n.data[e]]:[n];return r.listPath(n,e).concat(i)},r.getPath=function(t){return r.listPath(t,"label").join("/")+"/"},r.formatValue=o.formatPieValue,r.formatPercent=function(t,e){var r=n.formatPercent(t,0);return"0%"===r&&(r=o.formatPiePercent(t,e)),r}},{"../../components/color":643,"../../lib":778,"../../lib/setcursor":799,"../pie/helpers":1166}],1306:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"sunburst",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot").plot,style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1205,"./attributes":1299,"./base_plot":1300,"./calc":1301,"./defaults":1303,"./layout_attributes":1307,"./layout_defaults":1308,"./plot":1309,"./style":1310}],1307:[function(t,e,r){"use strict";e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1308:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("sunburstcolorway",e.colorway),r("extendsunburstcolors")}},{"../../lib":778,"./layout_attributes":1307}],1309:[function(t,e,r){"use strict";var n=t("d3"),i=t("d3-hierarchy"),a=t("../../components/drawing"),o=t("../../lib"),s=t("../../lib/svg_text_utils"),l=t("../bar/uniform_text"),c=l.recordMinTextSize,u=l.clearMinTextSize,f=t("../pie/plot"),h=t("../pie/helpers").getRotationAngle,p=f.computeTransform,d=f.transformInsideText,g=t("./style").styleOne,m=t("../bar/style").resizeText,v=t("./fx"),y=t("./constants"),x=t("./helpers");function b(t,e,l,u){var f=t._fullLayout,m=!f.uniformtext.mode&&x.hasTransition(u),b=n.select(l).selectAll("g.slice"),w=e[0],T=w.trace,k=w.hierarchy,M=x.findEntryWithLevel(k,T.level),A=x.getMaxDepth(T),S=f._size,E=T.domain,C=S.w*(E.x[1]-E.x[0]),L=S.h*(E.y[1]-E.y[0]),I=.5*Math.min(C,L),P=w.cx=S.l+S.w*(E.x[1]+E.x[0])/2,z=w.cy=S.t+S.h*(1-E.y[0])-L/2;if(!M)return b.remove();var O=null,D={};m&&b.each((function(t){D[x.getPtId(t)]={rpx0:t.rpx0,rpx1:t.rpx1,x0:t.x0,x1:t.x1,transform:t.transform},!O&&x.isEntry(t)&&(O=t)}));var R=function(t){return i.partition().size([2*Math.PI,t.height+1])(t)}(M).descendants(),F=M.height+1,B=0,N=A;w.hasMultipleRoots&&x.isHierarchyRoot(M)&&(R=R.slice(1),F-=1,B=1,N+=1),R=R.filter((function(t){return t.y1<=N}));var j=h(T.rotation);j&&R.forEach((function(t){t.x0+=j,t.x1+=j}));var U=Math.min(F,A),V=function(t){return(t-B)/U*I},q=function(t,e){return[t*Math.cos(e),-t*Math.sin(e)]},H=function(t){return o.pathAnnulus(t.rpx0,t.rpx1,t.x0,t.x1,P,z)},G=function(t){return P+_(t)[0]*(t.transform.rCenter||0)+(t.transform.x||0)},Y=function(t){return z+_(t)[1]*(t.transform.rCenter||0)+(t.transform.y||0)};(b=b.data(R,x.getPtId)).enter().append("g").classed("slice",!0),m?b.exit().transition().each((function(){var t=n.select(this);t.select("path.surface").transition().attrTween("d",(function(t){var e=function(t){var e,r=x.getPtId(t),i=D[r],a=D[x.getPtId(M)];if(a){var o=(t.x1>a.x1?2*Math.PI:0)+j;e=t.rpx1W?2*Math.PI:0)+j;e={x0:a,x1:a}}else e={rpx0:I,rpx1:I},o.extendFlat(e,J(t));else e={rpx0:0,rpx1:0};else e={x0:j,x1:j};return n.interpolate(e,i)}(t);return function(t){return H(e(t))}})):u.attr("d",H),l.call(v,M,t,e,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,t,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:t._transitioning}),u.call(g,i,T);var h=o.ensureSingle(l,"g","slicetext"),b=o.ensureSingle(h,"text","",(function(t){t.attr("data-notex",1)})),_=o.ensureUniformFontSize(t,x.determineTextFont(T,i,f.font));b.text(r.formatSliceLabel(i,M,T,e,f)).classed("slicetext",!0).attr("text-anchor","middle").call(a.font,_).call(s.convertToTspans,t);var k=a.bBox(b.node());i.transform=d(k,i,w),i.transform.targetX=G(i),i.transform.targetY=Y(i);var A=function(t,e){var r=t.transform;return p(r,e),r.fontSize=_.size,c(T.type,r,f),o.getTextTransform(r)};m?b.transition().attrTween("transform",(function(t){var e=function(t){var e,r=D[x.getPtId(t)],i=t.transform;if(r)e=r;else if(e={rpx1:t.rpx1,transform:{textPosAngle:i.textPosAngle,scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},O)if(t.parent)if(W){var a=t.x1>W?2*Math.PI:0;e.x0=e.x1=a}else o.extendFlat(e,J(t));else e.x0=e.x1=j;else e.x0=e.x1=j;var s=n.interpolate(e.transform.textPosAngle,t.transform.textPosAngle),l=n.interpolate(e.rpx1,t.rpx1),u=n.interpolate(e.x0,t.x0),h=n.interpolate(e.x1,t.x1),p=n.interpolate(e.transform.scale,i.scale),d=n.interpolate(e.transform.rotate,i.rotate),g=0===i.rCenter?3:0===e.transform.rCenter?1/3:1,m=n.interpolate(e.transform.rCenter,i.rCenter);return function(t){var e=l(t),r=u(t),n=h(t),a=function(t){return m(Math.pow(t,g))}(t),o={pxmid:q(e,(r+n)/2),rpx1:e,transform:{textPosAngle:s(t),rCenter:a,x:i.x,y:i.y}};return c(T.type,i,f),{transform:{targetX:G(o),targetY:Y(o),scale:p(t),rotate:d(t),rCenter:a}}}}(t);return function(t){return A(e(t),k)}})):b.attr("transform",A(i,k))}))}function _(t){return e=t.rpx1,r=t.transform.textPosAngle,[e*Math.sin(r),-e*Math.cos(r)];var e,r}r.plot=function(t,e,r,i){var a,o,s=t._fullLayout,l=s._sunburstlayer,c=!r,f=!s.uniformtext.mode&&x.hasTransition(r);(u("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),f)?(i&&(o=i()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){o&&o()})).each("interrupt",(function(){o&&o()})).each((function(){l.selectAll("g.trace").each((function(e){b(t,e,this,r)}))}))):(a.each((function(e){b(t,e,this,r)})),s.uniformtext.mode&&m(t,s._sunburstlayer.selectAll(".trace"),"sunburst"));c&&a.exit().remove()},r.formatSliceLabel=function(t,e,r,n,i){var a=r.texttemplate,s=r.textinfo;if(!(a||s&&"none"!==s))return"";var l=i.separators,c=n[0],u=t.data.data,f=c.hierarchy,h=x.isHierarchyRoot(t),p=x.getParent(f,t),d=x.getValue(t);if(!a){var g,m=s.split("+"),v=function(t){return-1!==m.indexOf(t)},y=[];if(v("label")&&u.label&&y.push(u.label),u.hasOwnProperty("v")&&v("value")&&y.push(x.formatValue(u.v,l)),!h){v("current path")&&y.push(x.getPath(t.data));var b=0;v("percent parent")&&b++,v("percent entry")&&b++,v("percent root")&&b++;var _=b>1;if(b){var w,T=function(t){g=x.formatPercent(w,l),_&&(g+=" of "+t),y.push(g)};v("percent parent")&&!h&&(w=d/x.getValue(p),T("parent")),v("percent entry")&&(w=d/x.getValue(e),T("entry")),v("percent root")&&(w=d/x.getValue(f),T("root"))}}return v("text")&&(g=o.castOption(r,u.i,"text"),o.isValidTextValue(g)&&y.push(g)),y.join("
    ")}var k=o.castOption(r,u.i,"texttemplate");if(!k)return"";var M={};u.label&&(M.label=u.label),u.hasOwnProperty("v")&&(M.value=u.v,M.valueLabel=x.formatValue(u.v,l)),M.currentPath=x.getPath(t.data),h||(M.percentParent=d/x.getValue(p),M.percentParentLabel=x.formatPercent(M.percentParent,l),M.parent=x.getPtLabel(p)),M.percentEntry=d/x.getValue(e),M.percentEntryLabel=x.formatPercent(M.percentEntry,l),M.entry=x.getPtLabel(e),M.percentRoot=d/x.getValue(f),M.percentRootLabel=x.formatPercent(M.percentRoot,l),M.root=x.getPtLabel(f),u.hasOwnProperty("color")&&(M.color=u.color);var A=o.castOption(r,u.i,"text");return(o.isValidTextValue(A)||""===A)&&(M.text=A),M.customdata=o.castOption(r,u.i,"customdata"),o.texttemplateString(k,M,i._d3locale,M,r._meta||{})}},{"../../components/drawing":665,"../../lib":778,"../../lib/svg_text_utils":803,"../bar/style":935,"../bar/uniform_text":937,"../pie/helpers":1166,"../pie/plot":1170,"./constants":1302,"./fx":1304,"./helpers":1305,"./style":1310,d3:169,"d3-hierarchy":161}],1310:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/color"),a=t("../../lib"),o=t("../bar/uniform_text").resizeText;function s(t,e,r){var n=e.data.data,o=!e.children,s=n.i,l=a.castOption(r,s,"marker.line.color")||i.defaultLine,c=a.castOption(r,s,"marker.line.width")||0;t.style("stroke-width",c).call(i.fill,n.color).call(i.stroke,l).style("opacity",o?r.leaf.opacity:null)}e.exports={style:function(t){var e=t._fullLayout._sunburstlayer.selectAll(".trace");o(t,e,"sunburst"),e.each((function(t){var e=n.select(this),r=t[0].trace;e.style("opacity",r.opacity),e.selectAll("path.surface").each((function(t){n.select(this).call(s,t,r)}))}))},styleOne:s}},{"../../components/color":643,"../../lib":778,"../bar/uniform_text":937,d3:169}],1311:[function(t,e,r){"use strict";var n=t("../../components/color"),i=t("../../components/colorscale/attributes"),a=t("../../plots/template_attributes").hovertemplateAttrs,o=t("../../plots/attributes"),s=t("../../lib/extend").extendFlat,l=t("../../plot_api/edit_types").overrideAll;function c(t){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:n.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:n.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var u=e.exports=l(s({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:a(),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},i("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:c(),y:c(),z:c()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:s({},i.zauto,{}),zmin:s({},i.zmin,{}),zmax:s({},i.zmax,{})},hoverinfo:s({},o.hoverinfo),showlegend:s({},o.showlegend,{dflt:!1})}),"calc","nested");u.x.editType=u.y.editType=u.z.editType="calc+clearAxisTypes",u.transforms=void 0},{"../../components/color":643,"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plot_api/edit_types":810,"../../plots/attributes":824,"../../plots/template_attributes":906}],1312:[function(t,e,r){"use strict";var n=t("../../components/colorscale/calc");e.exports=function(t,e){e.surfacecolor?n(t,e,{vals:e.surfacecolor,containerStr:"",cLetter:"c"}):n(t,e,{vals:e.z,containerStr:"",cLetter:"c"})}},{"../../components/colorscale/calc":651}],1313:[function(t,e,r){"use strict";var n=t("gl-surface3d"),i=t("ndarray"),a=t("ndarray-linear-interpolate").d2,o=t("../heatmap/interp2d"),s=t("../heatmap/find_empties"),l=t("../../lib").isArrayOrTypedArray,c=t("../../lib/gl_format_color").parseColorScale,u=t("../../lib/str2rgbarray"),f=t("../../components/colorscale").extractOpts;function h(t,e,r){this.scene=t,this.uid=r,this.surface=e,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var p=h.prototype;p.getXat=function(t,e,r,n){var i=l(this.data.x)?l(this.data.x[0])?this.data.x[e][t]:this.data.x[t]:t;return void 0===r?i:n.d2l(i,0,r)},p.getYat=function(t,e,r,n){var i=l(this.data.y)?l(this.data.y[0])?this.data.y[e][t]:this.data.y[e]:e;return void 0===r?i:n.d2l(i,0,r)},p.getZat=function(t,e,r,n){var i=this.data.z[e][t];return null===i&&this.data.connectgaps&&this.data._interpolatedZ&&(i=this.data._interpolatedZ[e][t]),void 0===r?i:n.d2l(i,0,r)},p.handlePick=function(t){if(t.object===this.surface){var e=(t.data.index[0]-1)/this.dataScaleX-1,r=(t.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(e),this.data.z[0].length-1),0),i=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);t.index=[n,i],t.traceCoordinate=[this.getXat(n,i),this.getYat(n,i),this.getZat(n,i)],t.dataCoordinate=[this.getXat(n,i,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,i,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,i,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var a=0;a<3;a++){var o=t.dataCoordinate[a];null!=o&&(t.dataCoordinate[a]*=this.scene.dataScale[a])}var s=this.data.hovertext||this.data.text;return Array.isArray(s)&&s[i]&&void 0!==s[i][n]?t.textLabel=s[i][n]:t.textLabel=s||"",t.data.dataCoordinate=t.dataCoordinate.slice(),this.surface.highlight(t.data),this.scene.glplot.spikes.position=t.dataCoordinate,!0}};var d=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function g(t,e){if(t0){r=d[n];break}return r}function y(t,e){if(!(t<1||e<1)){for(var r=m(t),n=m(e),i=1,a=0;a_;)r--,r/=v(r),++r1?n:1},p.refineCoords=function(t){for(var e=this.dataScaleX,r=this.dataScaleY,n=t[0].shape[0],a=t[0].shape[1],o=0|Math.floor(t[0].shape[0]*e+1),s=0|Math.floor(t[0].shape[1]*r+1),l=1+n+1,c=1+a+1,u=i(new Float32Array(l*c),[l,c]),f=[1/e,0,0,0,1/r,0,0,0,1],h=0;h0&&null!==this.contourStart[t]&&null!==this.contourEnd[t]&&this.contourEnd[t]>this.contourStart[t]))for(i[t]=!0,e=this.contourStart[t];ea&&(this.minValues[e]=a),this.maxValues[e]",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},{}],1320:[function(t,e,r){"use strict";var n=t("./constants"),i=t("../../lib/extend").extendFlat,a=t("fast-isnumeric");function o(t){if(Array.isArray(t)){for(var e=0,r=0;r=e||c===t.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o={firstRowIndex:null,lastRowIndex:null,rows:[]},i+=a,s=c+1,a=0);return n}e.exports=function(t,e){var r=l(e.cells.values),p=function(t){return t.slice(e.header.values.length,t.length)},d=l(e.header.values);d.length&&!d[0].length&&(d[0]=[""],d=l(d));var g=d.concat(p(r).map((function(){return c((d[0]||[""]).length)}))),m=e.domain,v=Math.floor(t._fullLayout._size.w*(m.x[1]-m.x[0])),y=Math.floor(t._fullLayout._size.h*(m.y[1]-m.y[0])),x=e.header.values.length?g[0].map((function(){return e.header.height})):[n.emptyHeaderHeight],b=r.length?r[0].map((function(){return e.cells.height})):[],_=x.reduce(s,0),w=h(b,y-_+n.uplift),T=f(h(x,_),[]),k=f(w,T),M={},A=e._fullInput.columnorder.concat(p(r.map((function(t,e){return e})))),S=g.map((function(t,r){var n=Array.isArray(e.columnwidth)?e.columnwidth[Math.min(r,e.columnwidth.length-1)]:e.columnwidth;return a(n)?Number(n):1})),E=S.reduce(s,0);S=S.map((function(t){return t/E*v}));var C=Math.max(o(e.header.line.width),o(e.cells.line.width)),L={key:e.uid+t._context.staticPlot,translateX:m.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-m.y[1]),size:t._fullLayout._size,width:v,maxLineWidth:C,height:y,columnOrder:A,groupHeight:y,rowBlocks:k,headerRowBlocks:T,scrollY:0,cells:i({},e.cells,{values:r}),headerCells:i({},e.header,{values:g}),gdColumns:g.map((function(t){return t[0]})),gdColumnsOriginalOrder:g.map((function(t){return t[0]})),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map((function(t,e){var r=M[t];return M[t]=(r||0)+1,{key:t+"__"+M[t],label:t,specIndex:e,xIndex:A[e],xScale:u,x:void 0,calcdata:void 0,columnWidth:S[e]}}))};return L.columns.forEach((function(t){t.calcdata=L,t.x=u(t)})),L}},{"../../lib/extend":768,"./constants":1319,"fast-isnumeric":241}],1321:[function(t,e,r){"use strict";var n=t("../../lib/extend").extendFlat;r.splitToPanels=function(t){var e=[0,0],r=n({},t,{key:"header",type:"header",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!0,values:t.calcdata.headerCells.values[t.specIndex],rowBlocks:t.calcdata.headerRowBlocks,calcdata:n({},t.calcdata,{cells:t.calcdata.headerCells})});return[n({},t,{key:"cells1",type:"cells",page:0,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),n({},t,{key:"cells2",type:"cells",page:1,prevPages:e,currentRepaint:[null,null],dragHandle:!1,values:t.calcdata.cells.values[t.specIndex],rowBlocks:t.calcdata.rowBlocks}),r]},r.splitToCells=function(t){var e=function(t){var e=t.rowBlocks[t.page],r=e?e.rows[0].rowIndex:0,n=e?r+e.rows.length:0;return[r,n]}(t);return(t.values||[]).slice(e[0],e[1]).map((function(r,n){return{keyWithinBlock:n+("string"==typeof r&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:e[0]+n,column:t,calcdata:t.calcdata,page:t.page,rowBlocks:t.rowBlocks,value:r}}))}},{"../../lib/extend":768}],1322:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../plots/domain").defaults;e.exports=function(t,e,r,o){function s(r,a){return n.coerce(t,e,i,r,a)}a(e,o,s),s("columnwidth"),s("header.values"),s("header.format"),s("header.align"),s("header.prefix"),s("header.suffix"),s("header.height"),s("header.line.width"),s("header.line.color"),s("header.fill.color"),n.coerceFont(s,"header.font",n.extendFlat({},o.font)),function(t,e){for(var r=t.columnorder||[],n=t.header.values.length,i=r.slice(0,n),a=i.slice().sort((function(t,e){return t-e})),o=i.map((function(t){return a.indexOf(t)})),s=o.length;s/i),l=!o||s;t.mayHaveMarkup=o&&a.match(/[<&>]/);var c,u="string"==typeof(c=a)&&c.match(n.latexCheck);t.latex=u;var f,h,p=u?"":w(t.calcdata.cells.prefix,e,r)||"",d=u?"":w(t.calcdata.cells.suffix,e,r)||"",g=u?null:w(t.calcdata.cells.format,e,r)||null,m=p+(g?i.format(g)(t.value):t.value)+d;if(t.wrappingNeeded=!t.wrapped&&!l&&!u&&(f=_(m)),t.cellHeightMayIncrease=s||u||t.mayHaveMarkup||(void 0===f?_(m):f),t.needsConvertToTspans=t.mayHaveMarkup||t.wrappingNeeded||t.latex,t.wrappingNeeded){var v=(" "===n.wrapSplitCharacter?m.replace(/i&&n.push(a),i+=l}return n}(i,l,s);1===u.length&&(u[0]===i.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),e.each((function(t,e){t.page=u[e],t.scrollY=l})),e.attr("transform",(function(t){var e=O(t.rowBlocks,t.page)-t.scrollY;return c(0,e)})),t&&(C(t,r,e,u,n.prevPages,n,0),C(t,r,e,u,n.prevPages,n,1),y(r,t))}}function E(t,e,r,a){return function(o){var s=o.calcdata?o.calcdata:o,l=e.filter((function(t){return s.key===t.key})),c=r||s.scrollbarState.dragMultiplier,u=s.scrollY;s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a;var f=l.selectAll("."+n.cn.yColumn).selectAll("."+n.cn.columnBlock).filter(k);return S(t,f,l),s.scrollY===u}}function C(t,e,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout((function(){var a=r.filter((function(t,e){return e===o&&n[e]!==i[e]}));x(t,e,a,r),i[o]=n[o]})))}function L(t,e,r,a){return function(){var o=i.select(e.parentNode);o.each((function(t){var e=t.fragments;o.selectAll("tspan.line").each((function(t,r){e[r].width=this.getComputedTextLength()}));var r,i,a=e[e.length-1].width,s=e.slice(0,-1),l=[],c=0,u=t.column.columnWidth-2*n.cellPad;for(t.value="";s.length;)c+(i=(r=s.shift()).width+a)>u&&(t.value+=l.join(n.wrapSpacer)+n.lineBreaker,l=[],c=0),l.push(r.text),c+=i;c&&(t.value+=l.join(n.wrapSpacer)),t.wrapped=!0})),o.selectAll("tspan.line").remove(),b(o.select("."+n.cn.cellText),r,t,a),i.select(e.parentNode.parentNode).call(z)}}function I(t,e,r,a,o){return function(){if(!o.settledY){var s=i.select(e.parentNode),l=F(o),u=o.key-l.firstRowIndex,f=l.rows[u].rowHeight,h=o.cellHeightMayIncrease?e.parentNode.getBoundingClientRect().height+2*n.cellPad:f,p=Math.max(h,f);p-l.rows[u].rowHeight&&(l.rows[u].rowHeight=p,t.selectAll("."+n.cn.columnCell).call(z),S(null,t.filter(k),0),y(r,a,!0)),s.attr("transform",(function(){var t=this.parentNode.getBoundingClientRect(),e=i.select(this.parentNode).select("."+n.cn.cellRect).node().getBoundingClientRect(),r=this.transform.baseVal.consolidate(),a=e.top-t.top+(r?r.matrix.f:n.cellPad);return c(P(o,i.select(this.parentNode).select("."+n.cn.cellTextHolder).node().getBoundingClientRect().width),a)})),o.settledY=!0}}}function P(t,e){switch(t.align){case"left":return n.cellPad;case"right":return t.column.columnWidth-(e||0)-n.cellPad;case"center":return(t.column.columnWidth-(e||0))/2;default:return n.cellPad}}function z(t){t.attr("transform",(function(t){var e=t.rowBlocks[0].auxiliaryBlocks.reduce((function(t,e){return t+D(e,1/0)}),0),r=D(F(t),t.key);return c(0,r+e)})).selectAll("."+n.cn.cellRect).attr("height",(function(t){return(e=F(t),r=t.key,e.rows[r-e.firstRowIndex]).rowHeight;var e,r}))}function O(t,e){for(var r=0,n=e-1;n>=0;n--)r+=R(t[n]);return r}function D(t,e){for(var r=0,n=0;n","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:n({},{keys:c.eventDataKeys}),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}},{"../../components/colorscale/attributes":650,"../../lib/extend":768,"../../plots/domain":855,"../../plots/template_attributes":906,"../pie/attributes":1161,"../sunburst/attributes":1299,"./constants":1328}],1326:[function(t,e,r){"use strict";var n=t("../../plots/plots");r.name="treemap",r.plot=function(t,e,i,a){n.plotBasePlot(r.name,t,e,i,a)},r.clean=function(t,e,i,a){n.cleanBasePlot(r.name,t,e,i,a)}},{"../../plots/plots":891}],1327:[function(t,e,r){"use strict";var n=t("../sunburst/calc");r.calc=function(t,e){return n.calc(t,e)},r.crossTraceCalc=function(t){return n._runCrossTraceCalc("treemap",t)}},{"../sunburst/calc":1301}],1328:[function(t,e,r){"use strict";e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},{}],1329:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./attributes"),a=t("../../components/color"),o=t("../../plots/domain").defaults,s=t("../bar/defaults").handleText,l=t("../bar/constants").TEXTPAD,c=t("../../components/colorscale"),u=c.hasColorscale,f=c.handleDefaults;e.exports=function(t,e,r,c){function h(r,a){return n.coerce(t,e,i,r,a)}var p=h("labels"),d=h("parents");if(p&&p.length&&d&&d.length){var g=h("values");g&&g.length?h("branchvalues"):h("count"),h("level"),h("maxdepth"),"squarify"===h("tiling.packing")&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var m=h("text");h("texttemplate"),e.texttemplate||h("textinfo",Array.isArray(m)?"text+label":"label"),h("hovertext"),h("hovertemplate");var v=h("pathbar.visible");s(t,e,c,h,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var y=-1!==e.textposition.indexOf("bottom");h("marker.line.width")&&h("marker.line.color",c.paper_bgcolor);var x=h("marker.colors"),b=e._hasColorscale=u(t,"marker","colors")||(t.marker||{}).coloraxis;b?f(t,e,c,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(x||[]).length);var _=2*e.textfont.size;h("marker.pad.t",y?_/4:_),h("marker.pad.l",_/4),h("marker.pad.r",_/4),h("marker.pad.b",y?_:_/4),b&&f(t,e,c,h,{prefix:"marker.",cLetter:"c"}),e._hovered={marker:{line:{width:2,color:a.contrast(c.paper_bgcolor)}}},v&&(h("pathbar.thickness",e.pathbar.textfont.size+2*l),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),o(e,c,h),e._length=null}else e.visible=!1}},{"../../components/color":643,"../../components/colorscale":655,"../../lib":778,"../../plots/domain":855,"../bar/constants":923,"../bar/defaults":925,"./attributes":1325}],1330:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx");e.exports=function(t,e,r,h,p){var d=p.barDifY,g=p.width,m=p.height,v=p.viewX,y=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,k=p.makeUpdateSliceInterpolator,M=p.makeUpdateTextInterpolator,A={},S=t._fullLayout,E=e[0],C=E.trace,L=E.hierarchy,I=g/C._entryDepth,P=u.listPath(r.data,"id"),z=s(L.copy(),[g,m],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(z=z.filter((function(t){var e=P.indexOf(t.data.id);return-1!==e&&(t.x0=I*e,t.x1=I*(e+1),t.y0=d,t.y1=d+m,t.onPathbar=!0,!0)}))).reverse(),(h=h.data(z,u.getPtId)).enter().append("g").classed("pathbar",!0),T(h,!0,A,[g,m],x),h.order();var O=h;w&&(O=O.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})}))),O.each((function(s){s._hoverX=v(s.x1-Math.min(g,m)/2),s._hoverY=y(s.y1-m/2);var h=n.select(this),p=i.ensureSingle(h,"path","surface",(function(t){t.style("pointer-events","all")}));w?p.transition().attrTween("d",(function(t){var e=k(t,!0,A,[g,m]);return function(t){return x(e(t))}})):p.attr("d",x),h.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),p.call(l,s,C,{hovered:!1}),s._text=(u.getPtLabel(s)||"").split("
    ").join(" ")||"";var d=i.ensureSingle(h,"g","slicetext"),T=i.ensureSingle(d,"text","",(function(t){t.attr("data-notex",1)})),E=i.ensureUniformFontSize(t,u.determineTextFont(C,s,S.font,{onPathbar:!0}));T.text(s._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(a.font,E).call(o.convertToTspans,t),s.textBB=a.bBox(T.node()),s.transform=b(s,{fontSize:E.size,onPathbar:!0}),s.transform.fontSize=E.size,w?T.transition().attrTween("transform",(function(t){var e=M(t,!0,A,[g,m]);return function(t){return _(e(t))}})):T.attr("transform",_(s))}))}},{"../../components/drawing":665,"../../lib":778,"../../lib/svg_text_utils":803,"../sunburst/fx":1304,"../sunburst/helpers":1305,"./constants":1328,"./partition":1335,"./style":1337,d3:169}],1331:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/drawing"),o=t("../../lib/svg_text_utils"),s=t("./partition"),l=t("./style").styleOne,c=t("./constants"),u=t("../sunburst/helpers"),f=t("../sunburst/fx"),h=t("../sunburst/plot").formatSliceLabel;e.exports=function(t,e,r,p,d){var g=d.width,m=d.height,v=d.viewX,y=d.viewY,x=d.pathSlice,b=d.toMoveInsideSlice,_=d.strTransform,w=d.hasTransition,T=d.handleSlicesExit,k=d.makeUpdateSliceInterpolator,M=d.makeUpdateTextInterpolator,A=d.prevEntry,S=t._fullLayout,E=e[0].trace,C=-1!==E.textposition.indexOf("left"),L=-1!==E.textposition.indexOf("right"),I=-1!==E.textposition.indexOf("bottom"),P=!I&&!E.marker.pad.t||I&&!E.marker.pad.b,z=s(r,[g,m],{packing:E.tiling.packing,squarifyratio:E.tiling.squarifyratio,flipX:E.tiling.flip.indexOf("x")>-1,flipY:E.tiling.flip.indexOf("y")>-1,pad:{inner:E.tiling.pad,top:E.marker.pad.t,left:E.marker.pad.l,right:E.marker.pad.r,bottom:E.marker.pad.b}}).descendants(),O=1/0,D=-1/0;z.forEach((function(t){var e=t.depth;e>=E._maxDepth?(t.x0=t.x1=(t.x0+t.x1)/2,t.y0=t.y1=(t.y0+t.y1)/2):(O=Math.min(O,e),D=Math.max(D,e))})),p=p.data(z,u.getPtId),E._maxVisibleLayers=isFinite(D)?D-O+1:0,p.enter().append("g").classed("slice",!0),T(p,!1,{},[g,m],x),p.order();var R=null;if(w&&A){var F=u.getPtId(A);p.each((function(t){null===R&&u.getPtId(t)===F&&(R={x0:t.x0,x1:t.x1,y0:t.y0,y1:t.y1})}))}var B=function(){return R||{x0:0,x1:g,y0:0,y1:m}},N=p;return w&&(N=N.transition().each("end",(function(){var e=n.select(this);u.setSliceCursor(e,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})}))),N.each((function(s){var p=u.isHeader(s,E);s._hoverX=v(s.x1-E.marker.pad.r),s._hoverY=y(I?s.y1-E.marker.pad.b/2:s.y0+E.marker.pad.t/2);var d=n.select(this),T=i.ensureSingle(d,"path","surface",(function(t){t.style("pointer-events","all")}));w?T.transition().attrTween("d",(function(t){var e=k(t,!1,B(),[g,m]);return function(t){return x(e(t))}})):T.attr("d",x),d.call(f,r,t,e,{styleOne:l,eventDataKeys:c.eventDataKeys,transitionTime:c.CLICK_TRANSITION_TIME,transitionEasing:c.CLICK_TRANSITION_EASING}).call(u.setSliceCursor,t,{isTransitioning:t._transitioning}),T.call(l,s,E,{hovered:!1}),s.x0===s.x1||s.y0===s.y1?s._text="":s._text=p?P?"":u.getPtLabel(s)||"":h(s,r,E,e,S)||"";var A=i.ensureSingle(d,"g","slicetext"),z=i.ensureSingle(A,"text","",(function(t){t.attr("data-notex",1)})),O=i.ensureUniformFontSize(t,u.determineTextFont(E,s,S.font));z.text(s._text||" ").classed("slicetext",!0).attr("text-anchor",L?"end":C||p?"start":"middle").call(a.font,O).call(o.convertToTspans,t),s.textBB=a.bBox(z.node()),s.transform=b(s,{fontSize:O.size,isHeader:p}),s.transform.fontSize=O.size,w?z.transition().attrTween("transform",(function(t){var e=M(t,!1,B(),[g,m]);return function(t){return _(e(t))}})):z.attr("transform",_(s))})),R}},{"../../components/drawing":665,"../../lib":778,"../../lib/svg_text_utils":803,"../sunburst/fx":1304,"../sunburst/helpers":1305,"../sunburst/plot":1309,"./constants":1328,"./partition":1335,"./style":1337,d3:169}],1332:[function(t,e,r){"use strict";e.exports={moduleType:"trace",name:"treemap",basePlotModule:t("./base_plot"),categories:[],animatable:!0,attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc").calc,crossTraceCalc:t("./calc").crossTraceCalc,plot:t("./plot"),style:t("./style").style,colorbar:t("../scatter/marker_colorbar"),meta:{}}},{"../scatter/marker_colorbar":1205,"./attributes":1325,"./base_plot":1326,"./calc":1327,"./defaults":1329,"./layout_attributes":1333,"./layout_defaults":1334,"./plot":1336,"./style":1337}],1333:[function(t,e,r){"use strict";e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},{}],1334:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e){function r(r,a){return n.coerce(t,e,i,r,a)}r("treemapcolorway",e.colorway),r("extendtreemapcolors")}},{"../../lib":778,"./layout_attributes":1333}],1335:[function(t,e,r){"use strict";var n=t("d3-hierarchy");e.exports=function(t,e,r){var i,a=r.flipX,o=r.flipY,s="dice-slice"===r.packing,l=r.pad[o?"bottom":"top"],c=r.pad[a?"right":"left"],u=r.pad[a?"left":"right"],f=r.pad[o?"top":"bottom"];s&&(i=c,c=l,l=i,i=u,u=f,f=i);var h=n.treemap().tile(function(t,e){switch(t){case"squarify":return n.treemapSquarify.ratio(e);case"binary":return n.treemapBinary;case"dice":return n.treemapDice;case"slice":return n.treemapSlice;default:return n.treemapSliceDice}}(r.packing,r.squarifyratio)).paddingInner(r.pad.inner).paddingLeft(c).paddingRight(u).paddingTop(l).paddingBottom(f).size(s?[e[1],e[0]]:e)(t);return(s||a||o)&&function t(e,r,n){var i;n.swapXY&&(i=e.x0,e.x0=e.y0,e.y0=i,i=e.x1,e.x1=e.y1,e.y1=i);n.flipX&&(i=e.x0,e.x0=r[0]-e.x1,e.x1=r[0]-i);n.flipY&&(i=e.y0,e.y0=r[1]-e.y1,e.y1=r[1]-i);var a=e.children;if(a)for(var o=0;o-1?E+I:-(L+I):0,z={x0:C,x1:C,y0:P,y1:P+L},O=function(t,e,r){var n=m.tiling.pad,i=function(t){return t-n<=e.x0},a=function(t){return t+n>=e.x1},o=function(t){return t-n<=e.y0},s=function(t){return t+n>=e.y1};return{x0:i(t.x0-n)?0:a(t.x0-n)?r[0]:t.x0,x1:i(t.x1+n)?0:a(t.x1+n)?r[0]:t.x1,y0:o(t.y0-n)?0:s(t.y0-n)?r[1]:t.y0,y1:o(t.y1+n)?0:s(t.y1+n)?r[1]:t.y1}},D=null,R={},F={},B=null,N=function(t,e){return e?R[g(t)]:F[g(t)]},j=function(t,e,r,n){if(e)return R[g(v)]||z;var i=F[m.level]||r;return function(t){return t.data.depth-y.data.depth=(n-=v.r-o)){var y=(r+n)/2;r=y,n=y}var x;h?i<(x=a-v.b)&&x"===Q?(l.x-=a,c.x-=a,u.x-=a,f.x-=a):"/"===Q?(u.x-=a,f.x-=a,o.x-=a/2,s.x-=a/2):"\\"===Q?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===Q&&(o.x-=a,s.x-=a),K(l),K(f),K(o),K(c),K(u),K(s),"M"+Z(l.x,l.y)+"L"+Z(c.x,c.y)+"L"+Z(s.x,s.y)+"L"+Z(u.x,u.y)+"L"+Z(f.x,f.y)+"L"+Z(o.x,o.y)+"Z"},toMoveInsideSlice:$,makeUpdateSliceInterpolator:et,makeUpdateTextInterpolator:rt,handleSlicesExit:nt,hasTransition:T,strTransform:it}):b.remove()}e.exports=function(t,e,r,a){var o,s,l=t._fullLayout,c=l._treemaplayer,h=!r;(u("treemap",l),(o=c.selectAll("g.trace.treemap").data(e,(function(t){return t[0].trace.uid}))).enter().append("g").classed("trace",!0).classed("treemap",!0),o.order(),!l.uniformtext.mode&&i.hasTransition(r))?(a&&(s=a()),n.transition().duration(r.duration).ease(r.easing).each("end",(function(){s&&s()})).each("interrupt",(function(){s&&s()})).each((function(){c.selectAll("g.trace").each((function(e){m(t,e,this,r)}))}))):(o.each((function(e){m(t,e,this,r)})),l.uniformtext.mode&&f(t,l._treemaplayer.selectAll(".trace"),"treemap"));h&&o.exit().remove()}},{"../../lib":778,"../bar/constants":923,"../bar/plot":932,"../bar/style":935,"../bar/uniform_text":937,"../sunburst/helpers":1305,"./constants":1328,"./draw_ancestors":1330,"./draw_descendants":1331,d3:169}],1337:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../components/color"),a=t("../../lib"),o=t("../sunburst/helpers"),s=t("../bar/uniform_text").resizeText;function l(t,e,r,n){var s,l,c=(n||{}).hovered,u=e.data.data,f=u.i,h=u.color,p=o.isHierarchyRoot(e),d=1;if(c)s=r._hovered.marker.line.color,l=r._hovered.marker.line.width;else if(p&&h===r.root.color)d=100,s="rgba(0,0,0,0)",l=0;else if(s=a.castOption(r,f,"marker.line.color")||i.defaultLine,l=a.castOption(r,f,"marker.line.width")||0,!r._hasColorscale&&!e.onPathbar){var g=r.marker.depthfade;if(g){var m,v=i.combine(i.addOpacity(r._backgroundColor,.75),h);if(!0===g){var y=o.getMaxDepth(r);m=isFinite(y)?o.isLeaf(e)?0:r._maxVisibleLayers-(e.data.depth-r._entryDepth):e.data.height+1}else m=e.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var x=0;x0){var y,x,b,_,w,T=t.xa,k=t.ya;"h"===h.orientation?(w=e,y="y",b=k,x="x",_=T):(w=r,y="x",b=T,x="y",_=k);var M=f[t.index];if(w>=M.span[0]&&w<=M.span[1]){var A=n.extendFlat({},t),S=_.c2p(w,!0),E=o.getKdeValue(M,h,w),C=o.getPositionOnKdePath(M,h,S),L=b._offset,I=b._length;A[y+"0"]=C[0],A[y+"1"]=C[1],A[x+"0"]=A[x+"1"]=S,A[x+"Label"]=x+": "+i.hoverLabelText(_,w)+", "+f[0].t.labels.kde+" "+E.toFixed(3),A.spikeDistance=v[0].spikeDistance;var P=y+"Spike";A[P]=v[0][P],v[0].spikeDistance=void 0,v[0][P]=void 0,A.hovertemplate=!1,m.push(A),(u={stroke:t.color})[y+"1"]=n.constrain(L+C[0],L,L+I),u[y+"2"]=n.constrain(L+C[1],L,L+I),u[x+"1"]=u[x+"2"]=_._offset+S}}d&&(m=m.concat(v))}-1!==p.indexOf("points")&&(c=a.hoverOnPoints(t,e,r));var z=l.selectAll(".violinline-"+h.uid).data(u?[0]:[]);return z.enter().append("line").classed("violinline-"+h.uid,!0).attr("stroke-width",1.5),z.exit().remove(),z.attr(u),"closest"===s?c?[c]:m:c?(m.push(c),m):m}},{"../../lib":778,"../../plots/cartesian/axes":828,"../box/hover":951,"./helpers":1342}],1344:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults"),crossTraceDefaults:t("../box/defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style"),styleOnSelect:t("../scatter/style").styleOnSelect,hoverPoints:t("./hover"),selectPoints:t("../box/select"),moduleType:"trace",name:"violin",basePlotModule:t("../../plots/cartesian"),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},{"../../plots/cartesian":841,"../box/defaults":949,"../box/select":956,"../scatter/style":1211,"./attributes":1338,"./calc":1339,"./cross_trace_calc":1340,"./defaults":1341,"./hover":1343,"./layout_attributes":1345,"./layout_defaults":1346,"./plot":1347,"./style":1348}],1345:[function(t,e,r){"use strict";var n=t("../box/layout_attributes"),i=t("../../lib").extendFlat;e.exports={violinmode:i({},n.boxmode,{}),violingap:i({},n.boxgap,{}),violingroupgap:i({},n.boxgroupgap,{})}},{"../../lib":778,"../box/layout_attributes":953}],1346:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes"),a=t("../box/layout_defaults");e.exports=function(t,e,r){a._supply(t,e,r,(function(r,a){return n.coerce(t,e,i,r,a)}),"violin")}},{"../../lib":778,"../box/layout_defaults":954,"./layout_attributes":1345}],1347:[function(t,e,r){"use strict";var n=t("d3"),i=t("../../lib"),a=t("../../components/drawing"),o=t("../box/plot"),s=t("../scatter/line_points"),l=t("./helpers");e.exports=function(t,e,r,c){var u=t._fullLayout,f=e.xaxis,h=e.yaxis;function p(t){var e=s(t,{xaxis:f,yaxis:h,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return a.smoothopen(e[0],1)}i.makeTraceGroups(c,r,"trace violins").each((function(t){var r=n.select(this),a=t[0],s=a.t,c=a.trace;if(!0!==c.visible||s.empty)r.remove();else{var d=s.bPos,g=s.bdPos,m=e[s.valLetter+"axis"],v=e[s.posLetter+"axis"],y="both"===c.side,x=y||"positive"===c.side,b=y||"negative"===c.side,_=r.selectAll("path.violin").data(i.identity);_.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),_.exit().remove(),_.each((function(t){var e,r,i,a,o,l,f,h,_=n.select(this),w=t.density,T=w.length,k=v.c2l(t.pos+d,!0),M=v.l2p(k);if(c.width)e=s.maxKDE/g;else{var A=u._violinScaleGroupStats[c.scalegroup];e="count"===c.scalemode?A.maxKDE/g*(A.maxCount/t.pts.length):A.maxKDE/g}if(x){for(f=new Array(T),o=0;o")),c.color=function(t,e){var r=t[e.dir].marker,n=r.color,a=r.line.color,o=r.line.width;if(i(n))return n;if(i(a)&&o)return a}(f,d),[c]}function w(t){return n(p,t)}}},{"../../components/color":643,"../../constants/delta.js":747,"../../plots/cartesian/axes":828,"../bar/hover":928}],1360:[function(t,e,r){"use strict";e.exports={attributes:t("./attributes"),layoutAttributes:t("./layout_attributes"),supplyDefaults:t("./defaults").supplyDefaults,crossTraceDefaults:t("./defaults").crossTraceDefaults,supplyLayoutDefaults:t("./layout_defaults"),calc:t("./calc"),crossTraceCalc:t("./cross_trace_calc"),plot:t("./plot"),style:t("./style").style,hoverPoints:t("./hover"),eventData:t("./event_data"),selectPoints:t("../bar/select"),moduleType:"trace",name:"waterfall",basePlotModule:t("../../plots/cartesian"),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},{"../../plots/cartesian":841,"../bar/select":933,"./attributes":1353,"./calc":1354,"./cross_trace_calc":1356,"./defaults":1357,"./event_data":1358,"./hover":1359,"./layout_attributes":1361,"./layout_defaults":1362,"./plot":1363,"./style":1364}],1361:[function(t,e,r){"use strict";e.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},{}],1362:[function(t,e,r){"use strict";var n=t("../../lib"),i=t("./layout_attributes");e.exports=function(t,e,r){var a=!1;function o(r,a){return n.coerce(t,e,i,r,a)}for(var s=0;s0&&(m+=h?"M"+f[0]+","+d[1]+"V"+d[0]:"M"+f[1]+","+d[0]+"H"+f[0]),"between"!==p&&(r.isSum||s path").each((function(t){if(!t.isBlank){var e=s[t.dir].marker;n.select(this).call(a.fill,e.color).call(a.stroke,e.line.color).call(i.dashLine,e.line.dash,e.line.width).style("opacity",s.selectedpoints&&!t.selected?o:1)}})),c(r,s,t),r.selectAll(".lines").each((function(){var t=s.connector.line;i.lineGroupStyle(n.select(this).selectAll("path"),t.width,t.color,t.dash)}))}))}}},{"../../components/color":643,"../../components/drawing":665,"../../constants/interactions":752,"../bar/style":935,"../bar/uniform_text":937,d3:169}],1365:[function(t,e,r){"use strict";var n=t("../plots/cartesian/axes"),i=t("../lib"),a=t("../plot_api/plot_schema"),o=t("./helpers").pointsAccessorFunction,s=t("../constants/numerical").BADNUM;r.moduleType="transform",r.name="aggregate";var l=r.attributes={enabled:{valType:"boolean",dflt:!0,editType:"calc"},groups:{valType:"string",strict:!0,noBlank:!0,arrayOk:!0,dflt:"x",editType:"calc"},aggregations:{_isLinkedToArray:"aggregation",target:{valType:"string",editType:"calc"},func:{valType:"enumerated",values:["count","sum","avg","median","mode","rms","stddev","min","max","first","last","change","range"],dflt:"first",editType:"calc"},funcmode:{valType:"enumerated",values:["sample","population"],dflt:"sample",editType:"calc"},enabled:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},editType:"calc"},c=l.aggregations;function u(t,e,r,a){if(a.enabled){for(var o=a.target,l=i.nestedProperty(e,o),c=l.get(),u=function(t,e){var r=t.func,n=e.d2c,a=e.c2d;switch(r){case"count":return f;case"first":return h;case"last":return p;case"sum":return function(t,e){for(var r=0,i=0;ii&&(i=u,o=c)}}return i?a(o):s};case"rms":return function(t,e){for(var r=0,i=0,o=0;o":return function(t){return h(t)>s};case">=":return function(t){return h(t)>=s};case"[]":return function(t){var e=h(t);return e>=s[0]&&e<=s[1]};case"()":return function(t){var e=h(t);return e>s[0]&&e=s[0]&&es[0]&&e<=s[1]};case"][":return function(t){var e=h(t);return e<=s[0]||e>=s[1]};case")(":return function(t){var e=h(t);return es[1]};case"](":return function(t){var e=h(t);return e<=s[0]||e>s[1]};case")[":return function(t){var e=h(t);return e=s[1]};case"{}":return function(t){return-1!==s.indexOf(h(t))};case"}{":return function(t){return-1===s.indexOf(h(t))}}}(r,a.getDataToCoordFunc(t,e,s,i),h),x={},b={},_=0;d?(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set(new Array(f))},v=function(t,e){var r=x[t.astr][e];t.get()[e]=r}):(m=function(t){x[t.astr]=n.extendDeep([],t.get()),t.set([])},v=function(t,e){var r=x[t.astr][e];t.get().push(r)}),k(m);for(var w=o(e.transforms,r),T=0;T1?"%{group} (%{trace})":"%{group}");var l=t.styles,c=o.styles=[];if(l)for(a=0;a=0?!0:typeof process<"u"?process.platform==="win32":!1}}T.Environment=n})(ae||(ae={}));var ae;(function(T){class n{constructor(d,m,L){this.type=d,this.detail=m,this.timestamp=L}}T.LoaderEvent=n;class M{constructor(d){this._events=[new n(1,"",d)]}record(d,m){this._events.push(new n(d,m,T.Utilities.getHighPerformanceTimestamp()))}getEvents(){return this._events}}T.LoaderEventRecorder=M;class A{record(d,m){}getEvents(){return[]}}A.INSTANCE=new A,T.NullLoaderEventRecorder=A})(ae||(ae={}));var ae;(function(T){class n{static fileUriToFilePath(A,i){if(i=decodeURI(i).replace(/%23/g,"#"),A){if(/^file:\/\/\//.test(i))return i.substr(8);if(/^file:\/\//.test(i))return i.substr(5)}else if(/^file:\/\//.test(i))return i.substr(7);return i}static startsWith(A,i){return A.length>=i.length&&A.substr(0,i.length)===i}static endsWith(A,i){return A.length>=i.length&&A.substr(A.length-i.length)===i}static containsQueryString(A){return/^[^\#]*\?/gi.test(A)}static isAbsolutePath(A){return/^((http:\/\/)|(https:\/\/)|(file:\/\/)|(\/))/.test(A)}static forEachProperty(A,i){if(A){let d;for(d in A)A.hasOwnProperty(d)&&i(d,A[d])}}static isEmpty(A){let i=!0;return n.forEachProperty(A,()=>{i=!1}),i}static recursiveClone(A){if(!A||typeof A!="object"||A instanceof RegExp||!Array.isArray(A)&&Object.getPrototypeOf(A)!==Object.prototype)return A;let i=Array.isArray(A)?[]:{};return n.forEachProperty(A,(d,m)=>{m&&typeof m=="object"?i[d]=n.recursiveClone(m):i[d]=m}),i}static generateAnonymousModule(){return"===anonymous"+n.NEXT_ANONYMOUS_ID+++"==="}static isAnonymousModule(A){return n.startsWith(A,"===anonymous")}static getHighPerformanceTimestamp(){return this.PERFORMANCE_NOW_PROBED||(this.PERFORMANCE_NOW_PROBED=!0,this.HAS_PERFORMANCE_NOW=T.global.performance&&typeof T.global.performance.now=="function"),this.HAS_PERFORMANCE_NOW?T.global.performance.now():Date.now()}}n.NEXT_ANONYMOUS_ID=1,n.PERFORMANCE_NOW_PROBED=!1,n.HAS_PERFORMANCE_NOW=!1,T.Utilities=n})(ae||(ae={}));var ae;(function(T){function n(i){if(i instanceof Error)return i;const d=new Error(i.message||String(i)||"Unknown Error");return i.stack&&(d.stack=i.stack),d}T.ensureError=n;class M{static validateConfigurationOptions(d){function m(L){if(L.phase==="loading"){console.error('Loading "'+L.moduleId+'" failed'),console.error(L),console.error("Here are the modules that depend on it:"),console.error(L.neededBy);return}if(L.phase==="factory"){console.error('The factory function of "'+L.moduleId+'" has thrown an exception'),console.error(L),console.error("Here are the modules that depend on it:"),console.error(L.neededBy);return}}if(d=d||{},typeof d.baseUrl!="string"&&(d.baseUrl=""),typeof d.isBuild!="boolean"&&(d.isBuild=!1),typeof d.paths!="object"&&(d.paths={}),typeof d.config!="object"&&(d.config={}),typeof d.catchError>"u"&&(d.catchError=!1),typeof d.recordStats>"u"&&(d.recordStats=!1),typeof d.urlArgs!="string"&&(d.urlArgs=""),typeof d.onError!="function"&&(d.onError=m),Array.isArray(d.ignoreDuplicateModules)||(d.ignoreDuplicateModules=[]),d.baseUrl.length>0&&(T.Utilities.endsWith(d.baseUrl,"/")||(d.baseUrl+="/")),typeof d.cspNonce!="string"&&(d.cspNonce=""),typeof d.preferScriptTags>"u"&&(d.preferScriptTags=!1),d.nodeCachedData&&typeof d.nodeCachedData=="object"&&(typeof d.nodeCachedData.seed!="string"&&(d.nodeCachedData.seed="seed"),(typeof d.nodeCachedData.writeDelay!="number"||d.nodeCachedData.writeDelay<0)&&(d.nodeCachedData.writeDelay=1e3*7),!d.nodeCachedData.path||typeof d.nodeCachedData.path!="string")){const L=n(new Error("INVALID cached data configuration, 'path' MUST be set"));L.phase="configuration",d.onError(L),d.nodeCachedData=void 0}return d}static mergeConfigurationOptions(d=null,m=null){let L=T.Utilities.recursiveClone(m||{});return T.Utilities.forEachProperty(d,(h,o)=>{h==="ignoreDuplicateModules"&&typeof L.ignoreDuplicateModules<"u"?L.ignoreDuplicateModules=L.ignoreDuplicateModules.concat(o):h==="paths"&&typeof L.paths<"u"?T.Utilities.forEachProperty(o,(w,e)=>L.paths[w]=e):h==="config"&&typeof L.config<"u"?T.Utilities.forEachProperty(o,(w,e)=>L.config[w]=e):L[h]=T.Utilities.recursiveClone(o)}),M.validateConfigurationOptions(L)}}T.ConfigurationOptionsUtil=M;class A{constructor(d,m){if(this._env=d,this.options=M.mergeConfigurationOptions(m),this._createIgnoreDuplicateModulesMap(),this._createSortedPathsRules(),this.options.baseUrl===""&&this.options.nodeRequire&&this.options.nodeRequire.main&&this.options.nodeRequire.main.filename&&this._env.isNode){let L=this.options.nodeRequire.main.filename,h=Math.max(L.lastIndexOf("/"),L.lastIndexOf("\\"));this.options.baseUrl=L.substring(0,h+1)}}_createIgnoreDuplicateModulesMap(){this.ignoreDuplicateModulesMap={};for(let d=0;d{Array.isArray(m)?this.sortedPathsRules.push({from:d,to:m}):this.sortedPathsRules.push({from:d,to:[m]})}),this.sortedPathsRules.sort((d,m)=>m.from.length-d.from.length)}cloneAndMerge(d){return new A(this._env,M.mergeConfigurationOptions(d,this.options))}getOptionsLiteral(){return this.options}_applyPaths(d){let m;for(let L=0,h=this.sortedPathsRules.length;Lthis.triggerCallback(w),l=>this.triggerErrorback(w,l))}triggerCallback(o){let w=this._callbackMap[o];delete this._callbackMap[o];for(let e=0;e{o.removeEventListener("load",c),o.removeEventListener("error",l)},c=f=>{a(),w()},l=f=>{a(),e(f)};o.addEventListener("load",c),o.addEventListener("error",l)}load(o,w,e,a){if(/^node\|/.test(w)){let c=o.getConfig().getOptionsLiteral(),l=m(o.getRecorder(),c.nodeRequire||T.global.nodeRequire),f=w.split("|"),g=null;try{g=l(f[1])}catch(S){a(S);return}o.enqueueDefineAnonymousModule([],()=>g),e()}else{let c=document.createElement("script");c.setAttribute("async","async"),c.setAttribute("type","text/javascript"),this.attachListeners(c,e,a);const{trustedTypesPolicy:l}=o.getConfig().getOptionsLiteral();l&&(w=l.createScriptURL(w)),c.setAttribute("src",w);const{cspNonce:f}=o.getConfig().getOptionsLiteral();f&&c.setAttribute("nonce",f),document.getElementsByTagName("head")[0].appendChild(c)}}}function A(h){const{trustedTypesPolicy:o}=h.getConfig().getOptionsLiteral();try{return(o?self.eval(o.createScript("","true")):new Function("true")).call(self),!0}catch{return!1}}class i{constructor(){this._cachedCanUseEval=null}_canUseEval(o){return this._cachedCanUseEval===null&&(this._cachedCanUseEval=A(o)),this._cachedCanUseEval}load(o,w,e,a){if(/^node\|/.test(w)){const c=o.getConfig().getOptionsLiteral(),l=m(o.getRecorder(),c.nodeRequire||T.global.nodeRequire),f=w.split("|");let g=null;try{g=l(f[1])}catch(S){a(S);return}o.enqueueDefineAnonymousModule([],function(){return g}),e()}else{const{trustedTypesPolicy:c}=o.getConfig().getOptionsLiteral();if(!(/^((http:)|(https:)|(file:))/.test(w)&&w.substring(0,self.origin.length)!==self.origin)&&this._canUseEval(o)){fetch(w).then(f=>{if(f.status!==200)throw new Error(f.statusText);return f.text()}).then(f=>{f=`${f} -//# sourceURL=${w}`,(c?self.eval(c.createScript("",f)):new Function(f)).call(self),e()}).then(void 0,a);return}try{c&&(w=c.createScriptURL(w)),importScripts(w),e()}catch(f){a(f)}}}}class d{constructor(o){this._env=o,this._didInitialize=!1,this._didPatchNodeRequire=!1}_init(o){this._didInitialize||(this._didInitialize=!0,this._fs=o("fs"),this._vm=o("vm"),this._path=o("path"),this._crypto=o("crypto"))}_initNodeRequire(o,w){const{nodeCachedData:e}=w.getConfig().getOptionsLiteral();if(!e||this._didPatchNodeRequire)return;this._didPatchNodeRequire=!0;const a=this,c=o("module");function l(f){const g=f.constructor;let S=function(E){try{return f.require(E)}finally{}};return S.resolve=function(E,y){return g._resolveFilename(E,f,!1,y)},S.resolve.paths=function(E){return g._resolveLookupPaths(E,f)},S.main=process.mainModule,S.extensions=g._extensions,S.cache=g._cache,S}c.prototype._compile=function(f,g){const S=c.wrap(f.replace(/^#!.*/,"")),_=w.getRecorder(),E=a._getCachedDataPath(e,g),y={filename:g};let v;try{const N=a._fs.readFileSync(E);v=N.slice(0,16),y.cachedData=N.slice(16),_.record(60,E)}catch{_.record(61,E)}const r=new a._vm.Script(S,y),s=r.runInThisContext(y),u=a._path.dirname(g),p=l(this),b=[this.exports,p,this,g,u,process,Re,Buffer],C=s.apply(this.exports,b);return a._handleCachedData(r,S,E,!y.cachedData,w),a._verifyCachedData(r,S,E,v,w),C}}load(o,w,e,a){const c=o.getConfig().getOptionsLiteral(),l=m(o.getRecorder(),c.nodeRequire||T.global.nodeRequire),f=c.nodeInstrumenter||function(S){return S};this._init(l),this._initNodeRequire(l,o);let g=o.getRecorder();if(/^node\|/.test(w)){let S=w.split("|"),_=null;try{_=l(S[1])}catch(E){a(E);return}o.enqueueDefineAnonymousModule([],()=>_),e()}else{w=T.Utilities.fileUriToFilePath(this._env.isWindows,w);const S=this._path.normalize(w),_=this._getElectronRendererScriptPathOrUri(S),E=!!c.nodeCachedData,y=E?this._getCachedDataPath(c.nodeCachedData,w):void 0;this._readSourceAndCachedData(S,y,g,(v,r,s,u)=>{if(v){a(v);return}let p;r.charCodeAt(0)===d._BOM?p=d._PREFIX+r.substring(1)+d._SUFFIX:p=d._PREFIX+r+d._SUFFIX,p=f(p,S);const b={filename:_,cachedData:s},C=this._createAndEvalScript(o,p,b,e,a);this._handleCachedData(C,p,y,E&&!s,o),this._verifyCachedData(C,p,y,u,o)})}}_createAndEvalScript(o,w,e,a,c){const l=o.getRecorder();l.record(31,e.filename);const f=new this._vm.Script(w,e),g=f.runInThisContext(e),S=o.getGlobalAMDDefineFunc();let _=!1;const E=function(){return _=!0,S.apply(null,arguments)};return E.amd=S.amd,g.call(T.global,o.getGlobalAMDRequireFunc(),E,e.filename,this._path.dirname(e.filename)),l.record(32,e.filename),_?a():c(new Error(`Didn't receive define call in ${e.filename}!`)),f}_getElectronRendererScriptPathOrUri(o){if(!this._env.isElectronRenderer)return o;let w=o.match(/^([a-z])\:(.*)/i);return w?`file:///${(w[1].toUpperCase()+":"+w[2]).replace(/\\/g,"/")}`:`file://${o}`}_getCachedDataPath(o,w){const e=this._crypto.createHash("md5").update(w,"utf8").update(o.seed,"utf8").update(process.arch,"").digest("hex"),a=this._path.basename(w).replace(/\.js$/,"");return this._path.join(o.path,`${a}-${e}.code`)}_handleCachedData(o,w,e,a,c){o.cachedDataRejected?this._fs.unlink(e,l=>{c.getRecorder().record(62,e),this._createAndWriteCachedData(o,w,e,c),l&&c.getConfig().onError(l)}):a&&this._createAndWriteCachedData(o,w,e,c)}_createAndWriteCachedData(o,w,e,a){let c=Math.ceil(a.getConfig().getOptionsLiteral().nodeCachedData.writeDelay*(1+Math.random())),l=-1,f=0,g;const S=()=>{setTimeout(()=>{g||(g=this._crypto.createHash("md5").update(w,"utf8").digest());const _=o.createCachedData();if(!(_.length===0||_.length===l||f>=5)){if(_.length{E&&a.getConfig().onError(E),a.getRecorder().record(63,e),S()})}},c*Math.pow(4,f++))};S()}_readSourceAndCachedData(o,w,e,a){if(!w)this._fs.readFile(o,{encoding:"utf8"},a);else{let c,l,f,g=2;const S=_=>{_?a(_):--g===0&&a(void 0,c,l,f)};this._fs.readFile(o,{encoding:"utf8"},(_,E)=>{c=E,S(_)}),this._fs.readFile(w,(_,E)=>{!_&&E&&E.length>0?(f=E.slice(0,16),l=E.slice(16),e.record(60,w)):e.record(61,w),S()})}}_verifyCachedData(o,w,e,a,c){a&&(o.cachedDataRejected||setTimeout(()=>{const l=this._crypto.createHash("md5").update(w,"utf8").digest();a.equals(l)||(c.getConfig().onError(new Error(`FAILED TO VERIFY CACHED DATA, deleting stale '${e}' now, but a RESTART IS REQUIRED`)),this._fs.unlink(e,f=>{f&&c.getConfig().onError(f)}))},Math.ceil(5e3*(1+Math.random()))))}}d._BOM=65279,d._PREFIX="(function (require, define, __filename, __dirname) { ",d._SUFFIX=` -});`;function m(h,o){if(o.__$__isRecorded)return o;const w=function(a){h.record(33,a);try{return o(a)}finally{h.record(34,a)}};return w.__$__isRecorded=!0,w}T.ensureRecordedNodeRequire=m;function L(h){return new n(h)}T.createScriptLoader=L})(ae||(ae={}));var ae;(function(T){class n{constructor(h){let o=h.lastIndexOf("/");o!==-1?this.fromModulePath=h.substr(0,o+1):this.fromModulePath=""}static _normalizeModuleId(h){let o=h,w;for(w=/\/\.\//;w.test(o);)o=o.replace(w,"/");for(o=o.replace(/^\.\//g,""),w=/\/(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//;w.test(o);)o=o.replace(w,"/");return o=o.replace(/^(([^\/])|([^\/][^\/\.])|([^\/\.][^\/])|([^\/][^\/][^\/]+))\/\.\.\//,""),o}resolveModule(h){let o=h;return T.Utilities.isAbsolutePath(o)||(T.Utilities.startsWith(o,"./")||T.Utilities.startsWith(o,"../"))&&(o=n._normalizeModuleId(this.fromModulePath+o)),o}}n.ROOT=new n(""),T.ModuleIdResolver=n;class M{constructor(h,o,w,e,a,c){this.id=h,this.strId=o,this.dependencies=w,this._callback=e,this._errorback=a,this.moduleIdResolver=c,this.exports={},this.error=null,this.exportsPassedIn=!1,this.unresolvedDependenciesCount=this.dependencies.length,this._isComplete=!1}static _safeInvokeFunction(h,o){try{return{returnedValue:h.apply(T.global,o),producedError:null}}catch(w){return{returnedValue:null,producedError:w}}}static _invokeFactory(h,o,w,e){return h.shouldInvokeFactory(o)?h.shouldCatchError()?this._safeInvokeFunction(w,e):{returnedValue:w.apply(T.global,e),producedError:null}:{returnedValue:null,producedError:null}}complete(h,o,w,e){this._isComplete=!0;let a=null;if(this._callback)if(typeof this._callback=="function"){h.record(21,this.strId);let c=M._invokeFactory(o,this.strId,this._callback,w);a=c.producedError,h.record(22,this.strId),!a&&typeof c.returnedValue<"u"&&(!this.exportsPassedIn||T.Utilities.isEmpty(this.exports))&&(this.exports=c.returnedValue)}else this.exports=this._callback;if(a){let c=T.ensureError(a);c.phase="factory",c.moduleId=this.strId,c.neededBy=e(this.id),this.error=c,o.onError(c)}this.dependencies=null,this._callback=null,this._errorback=null,this.moduleIdResolver=null}onDependencyError(h){return this._isComplete=!0,this.error=h,this._errorback?(this._errorback(h),!0):!1}isComplete(){return this._isComplete}}T.Module=M;class A{constructor(){this._nextId=0,this._strModuleIdToIntModuleId=new Map,this._intModuleIdToStrModuleId=[],this.getModuleId("exports"),this.getModuleId("module"),this.getModuleId("require")}getMaxModuleId(){return this._nextId}getModuleId(h){let o=this._strModuleIdToIntModuleId.get(h);return typeof o>"u"&&(o=this._nextId++,this._strModuleIdToIntModuleId.set(h,o),this._intModuleIdToStrModuleId[o]=h),o}getStrModuleId(h){return this._intModuleIdToStrModuleId[h]}}class i{constructor(h){this.id=h}}i.EXPORTS=new i(0),i.MODULE=new i(1),i.REQUIRE=new i(2),T.RegularDependency=i;class d{constructor(h,o,w){this.id=h,this.pluginId=o,this.pluginParam=w}}T.PluginDependency=d;class m{constructor(h,o,w,e,a=0){this._env=h,this._scriptLoader=o,this._loaderAvailableTimestamp=a,this._defineFunc=w,this._requireFunc=e,this._moduleIdProvider=new A,this._config=new T.Configuration(this._env),this._hasDependencyCycle=!1,this._modules2=[],this._knownModules2=[],this._inverseDependencies2=[],this._inversePluginDependencies2=new Map,this._currentAnonymousDefineCall=null,this._recorder=null,this._buildInfoPath=[],this._buildInfoDefineStack=[],this._buildInfoDependencies=[],this._requireFunc.moduleManager=this}reset(){return new m(this._env,this._scriptLoader,this._defineFunc,this._requireFunc,this._loaderAvailableTimestamp)}getGlobalAMDDefineFunc(){return this._defineFunc}getGlobalAMDRequireFunc(){return this._requireFunc}static _findRelevantLocationInStack(h,o){let w=c=>c.replace(/\\/g,"/"),e=w(h),a=o.split(/\n/);for(let c=0;cthis._moduleIdProvider.getStrModuleId(g.id))),this._resolve(f)}_normalizeDependency(h,o){if(h==="exports")return i.EXPORTS;if(h==="module")return i.MODULE;if(h==="require")return i.REQUIRE;let w=h.indexOf("!");if(w>=0){let e=o.resolveModule(h.substr(0,w)),a=o.resolveModule(h.substr(w+1)),c=this._moduleIdProvider.getModuleId(e+"!"+a),l=this._moduleIdProvider.getModuleId(e);return new d(c,l,a)}return new i(this._moduleIdProvider.getModuleId(o.resolveModule(h)))}_normalizeDependencies(h,o){let w=[],e=0;for(let a=0,c=h.length;athis._moduleIdProvider.getStrModuleId(c));const a=T.ensureError(o);return a.phase="loading",a.moduleId=w,a.neededBy=e,a}_onLoadError(h,o){const w=this._createLoadError(h,o);this._modules2[h]||(this._modules2[h]=new M(h,this._moduleIdProvider.getStrModuleId(h),[],()=>{},null,null));let e=[];for(let l=0,f=this._moduleIdProvider.getMaxModuleId();l0;){let l=c.shift(),f=this._modules2[l];f&&(a=f.onDependencyError(w)||a);let g=this._inverseDependencies2[l];if(g)for(let S=0,_=g.length;S<_;S++){let E=g[S];e[E]||(c.push(E),e[E]=!0)}}a||this._config.onError(w)}_hasDependencyPath(h,o){let w=this._modules2[h];if(!w)return!1;let e=[];for(let c=0,l=this._moduleIdProvider.getMaxModuleId();c0;){let l=a.shift().dependencies;if(l)for(let f=0,g=l.length;fthis._relativeRequire(h,w,e,a);return o.toUrl=w=>this._config.requireToUrl(h.resolveModule(w)),o.getStats=()=>this.getLoaderEvents(),o.hasDependencyCycle=()=>this._hasDependencyCycle,o.config=(w,e=!1)=>{this.configure(w,e)},o.__$__nodeRequire=T.global.nodeRequire,o}_loadModule(h){if(this._modules2[h]||this._knownModules2[h])return;this._knownModules2[h]=!0;let o=this._moduleIdProvider.getStrModuleId(h),w=this._config.moduleIdToPaths(o),e=/^@[^\/]+\/[^\/]+$/;this._env.isNode&&(o.indexOf("/")===-1||e.test(o))&&w.push("node|"+o);let a=-1,c=l=>{if(a++,a>=w.length)this._onLoadError(h,l);else{let f=w[a],g=this.getRecorder();if(this._config.isBuild()&&f==="empty:"){this._buildInfoPath[h]=f,this.defineModule(this._moduleIdProvider.getStrModuleId(h),[],null,null,null),this._onLoad(h);return}g.record(10,f),this._scriptLoader.load(this,f,()=>{this._config.isBuild()&&(this._buildInfoPath[h]=f),g.record(11,f),this._onLoad(h)},S=>{g.record(12,f),c(S)})}};c(null)}_loadPluginDependency(h,o){if(this._modules2[o.id]||this._knownModules2[o.id])return;this._knownModules2[o.id]=!0;let w=e=>{this.defineModule(this._moduleIdProvider.getStrModuleId(o.id),[],e,null,null)};w.error=e=>{this._config.onError(this._createLoadError(o.id,e))},h.load(o.pluginParam,this._createRequire(n.ROOT),w,this._config.getOptionsLiteral())}_resolve(h){let o=h.dependencies;if(o)for(let w=0,e=o.length;wthis._moduleIdProvider.getStrModuleId(f)).join(` => -`)),h.unresolvedDependenciesCount--;continue}if(this._inverseDependencies2[a.id]=this._inverseDependencies2[a.id]||[],this._inverseDependencies2[a.id].push(h.id),a instanceof d){let l=this._modules2[a.pluginId];if(l&&l.isComplete()){this._loadPluginDependency(l.exports,a);continue}let f=this._inversePluginDependencies2.get(a.pluginId);f||(f=[],this._inversePluginDependencies2.set(a.pluginId,f)),f.push(a),this._loadModule(a.pluginId);continue}this._loadModule(a.id)}h.unresolvedDependenciesCount===0&&this._onModuleComplete(h)}_onModuleComplete(h){let o=this.getRecorder();if(h.isComplete())return;let w=h.dependencies,e=[];if(w)for(let f=0,g=w.length;fthis._config.getConfigForModule(h.strId)};continue}if(S===i.REQUIRE){e[f]=this._createRequire(h.moduleIdResolver);continue}let _=this._modules2[S.id];if(_){e[f]=_.exports;continue}e[f]=null}const a=f=>(this._inverseDependencies2[f]||[]).map(g=>this._moduleIdProvider.getStrModuleId(g));h.complete(o,this._config,e,a);let c=this._inverseDependencies2[h.id];if(this._inverseDependencies2[h.id]=null,c)for(let f=0,g=c.length;f"u"&&m())})(ae||(ae={}));var ue=this&&this.__awaiter||function(T,n,M,A){function i(d){return d instanceof M?d:new M(function(m){m(d)})}return new(M||(M=Promise))(function(d,m){function L(w){try{o(A.next(w))}catch(e){m(e)}}function h(w){try{o(A.throw(w))}catch(e){m(e)}}function o(w){w.done?d(w.value):i(w.value).then(L,h)}o((A=A.apply(T,n||[])).next())})};Y(X[19],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.load=n.create=n.setPseudoTranslation=n.getConfiguredDefaultLocale=n.localize=void 0;let M=typeof document<"u"&&document.location&&document.location.hash.indexOf("pseudo=true")>=0;const A="i-default";function i(l,f){let g;return f.length===0?g=l:g=l.replace(/\{(\d+)\}/g,(S,_)=>{const E=_[0],y=f[E];let v=S;return typeof y=="string"?v=y:(typeof y=="number"||typeof y=="boolean"||y===void 0||y===null)&&(v=String(y)),v}),M&&(g="\uFF3B"+g.replace(/[aouei]/g,"$&$&")+"\uFF3D"),g}function d(l,f){let g=l[f];return g||(g=l["*"],g)?g:null}function m(l){return l.charAt(l.length-1)==="/"?l:l+"/"}function L(l,f,g){return ue(this,void 0,void 0,function*(){const S=m(l)+m(f)+"vscode/"+m(g),_=yield fetch(S);if(_.ok)return yield _.json();throw new Error(`${_.status} - ${_.statusText}`)})}function h(l){return function(f,g){const S=Array.prototype.slice.call(arguments,2);return i(l[f],S)}}function o(l,f,...g){return i(f,g)}n.localize=o;function w(l){}n.getConfiguredDefaultLocale=w;function e(l){M=l}n.setPseudoTranslation=e;function a(l,f){var g;return{localize:h(f[l]),getConfiguredDefaultLocale:(g=f.getConfiguredDefaultLocale)!==null&&g!==void 0?g:S=>{}}}n.create=a;function c(l,f,g,S){var _;const E=(_=S["vs/nls"])!==null&&_!==void 0?_:{};if(!l||l.length===0)return g({localize:o,getConfiguredDefaultLocale:()=>{var u;return(u=E.availableLanguages)===null||u===void 0?void 0:u["*"]}});const y=E.availableLanguages?d(E.availableLanguages,l):null,v=y===null||y===A;let r=".nls";v||(r=r+"."+y);const s=u=>{Array.isArray(u)?u.localize=h(u):u.localize=h(u[l]),u.getConfiguredDefaultLocale=()=>{var p;return(p=E.availableLanguages)===null||p===void 0?void 0:p["*"]},g(u)};typeof E.loadBundle=="function"?E.loadBundle(l,y,(u,p)=>{u?f([l+".nls"],s):s(p)}):E.translationServiceUrl&&!v?ue(this,void 0,void 0,function*(){var u;try{const p=yield L(E.translationServiceUrl,y,l);return s(p)}catch(p){if(!y.includes("-"))return console.error(p),f([l+".nls"],s);try{const b=y.split("-")[0],C=yield L(E.translationServiceUrl,b,l);return(u=E.availableLanguages)!==null&&u!==void 0||(E.availableLanguages={}),E.availableLanguages["*"]=b,s(C)}catch(b){return console.error(b),f([l+".nls"],s)}}}):f([l+r],s,u=>{if(r===".nls"){console.error("Failed trying to load default language strings",u);return}console.error(`Failed to load message bundle for language ${y}. Falling back to the default language:`,u),f([l+".nls"],s)})}n.load=c}),function(){const T=globalThis.MonacoEnvironment,n=T&&T.baseUrl?T.baseUrl:"../../../";function M(w,e){var a;if(T?.createTrustedTypesPolicy)try{return T.createTrustedTypesPolicy(w,e)}catch(c){console.warn(c);return}try{return(a=self.trustedTypes)===null||a===void 0?void 0:a.createPolicy(w,e)}catch(c){console.warn(c);return}}const A=M("amdLoader",{createScriptURL:w=>w,createScript:(w,...e)=>{const a=e.slice(0,-1).join(","),c=e.pop().toString();return`(function anonymous(${a}) { ${c} -})`}});function i(){try{return(A?globalThis.eval(A.createScript("","true")):new Function("true")).call(globalThis),!0}catch{return!1}}function d(){return new Promise((w,e)=>{if(typeof globalThis.define=="function"&&globalThis.define.amd)return w();const a=n+"vs/loader.js";if(!(/^((http:)|(https:)|(file:))/.test(a)&&a.substring(0,globalThis.origin.length)!==globalThis.origin)&&i()){fetch(a).then(l=>{if(l.status!==200)throw new Error(l.statusText);return l.text()}).then(l=>{l=`${l} -//# sourceURL=${a}`,(A?globalThis.eval(A.createScript("",l)):new Function(l)).call(globalThis),w()}).then(void 0,e);return}A?importScripts(A.createScriptURL(a)):importScripts(a),w()})}function m(){require.config({baseUrl:n,catchError:!0,trustedTypesPolicy:A,amdModulesPattern:/^vs\//})}function L(w){d().then(()=>{m(),require([w],function(e){setTimeout(function(){const a=e.create((c,l)=>{globalThis.postMessage(c,l)},null);for(globalThis.onmessage=c=>a.onmessage(c.data,c.ports);o.length>0;){const c=o.shift();a.onmessage(c.data,c.ports)}},0)})})}typeof globalThis.define=="function"&&globalThis.define.amd&&m();let h=!0;const o=[];globalThis.onmessage=w=>{if(!h){o.push(w);return}h=!1,L(w.data)}}(),Y(X[7],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CallbackIterable=n.ArrayQueue=n.reverseOrder=n.booleanComparator=n.numberComparator=n.tieBreakComparators=n.compareBy=n.CompareResult=n.splice=n.insertInto=n.asArray=n.pushMany=n.pushToEnd=n.pushToStart=n.arrayInsert=n.range=n.firstOrDefault=n.distinct=n.isNonEmptyArray=n.isFalsyOrEmpty=n.coalesceInPlace=n.coalesce=n.forEachWithNeighbors=n.forEachAdjacent=n.groupAdjacentBy=n.groupBy=n.quickSelect=n.binarySearch2=n.binarySearch=n.removeFastWithoutKeepingOrder=n.equals=n.tail2=n.tail=void 0;function M(x,O=0){return x[x.length-(1+O)]}n.tail=M;function A(x){if(x.length===0)throw new Error("Invalid tail call");return[x.slice(0,x.length-1),x[x.length-1]]}n.tail2=A;function i(x,O,F=(H,V)=>H===V){if(x===O)return!0;if(!x||!O||x.length!==O.length)return!1;for(let H=0,V=x.length;HF(x[H],O))}n.binarySearch=m;function L(x,O){let F=0,H=x-1;for(;F<=H;){const V=(F+H)/2|0,t=O(V);if(t<0)F=V+1;else if(t>0)H=V-1;else return V}return-(F+1)}n.binarySearch2=L;function h(x,O,F){if(x=x|0,x>=O.length)throw new TypeError("invalid index");const H=O[Math.floor(O.length*Math.random())],V=[],t=[],ne=[];for(const re of O){const le=F(re,H);le<0?V.push(re):le>0?t.push(re):ne.push(re)}return x!!O)}n.coalesce=c;function l(x){let O=0;for(let F=0;F0}n.isNonEmptyArray=g;function S(x,O=F=>F){const F=new Set;return x.filter(H=>{const V=O(H);return F.has(V)?!1:(F.add(V),!0)})}n.distinct=S;function _(x,O){return x.length>0?x[0]:O}n.firstOrDefault=_;function E(x,O){let F=typeof O=="number"?x:0;typeof O=="number"?F=x:(F=0,O=x);const H=[];if(F<=O)for(let V=F;VO;V--)H.push(V);return H}n.range=E;function y(x,O,F){const H=x.slice(0,O),V=x.slice(O);return H.concat(F,V)}n.arrayInsert=y;function v(x,O){const F=x.indexOf(O);F>-1&&(x.splice(F,1),x.unshift(O))}n.pushToStart=v;function r(x,O){const F=x.indexOf(O);F>-1&&(x.splice(F,1),x.push(O))}n.pushToEnd=r;function s(x,O){for(const F of O)x.push(F)}n.pushMany=s;function u(x){return Array.isArray(x)?x:[x]}n.asArray=u;function p(x,O,F){const H=C(x,O),V=x.length,t=F.length;x.length=V+t;for(let ne=V-1;ne>=H;ne--)x[ne+t]=x[ne];for(let ne=0;ne0}x.isGreaterThan=H;function V(t){return t===0}x.isNeitherLessOrGreaterThan=V,x.greaterThan=1,x.lessThan=-1,x.neitherLessOrGreaterThan=0})(N||(n.CompareResult=N={}));function R(x,O){return(F,H)=>O(x(F),x(H))}n.compareBy=R;function D(...x){return(O,F)=>{for(const H of x){const V=H(O,F);if(!N.isNeitherLessOrGreaterThan(V))return V}return N.neitherLessOrGreaterThan}}n.tieBreakComparators=D;const k=(x,O)=>x-O;n.numberComparator=k;const U=(x,O)=>(0,n.numberComparator)(x?1:0,O?1:0);n.booleanComparator=U;function I(x){return(O,F)=>-x(O,F)}n.reverseOrder=I;class B{constructor(O){this.items=O,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(O){let F=this.firstIdx;for(;F=0&&O(this.items[F]);)F--;const H=F===this.lastIdx?null:this.items.slice(F+1,this.lastIdx+1);return this.lastIdx=F,H}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const O=this.items[this.firstIdx];return this.firstIdx++,O}takeCount(O){const F=this.items.slice(this.firstIdx,this.firstIdx+O);return this.firstIdx+=O,F}}n.ArrayQueue=B;class z{constructor(O){this.iterate=O}toArray(){const O=[];return this.iterate(F=>(O.push(F),!0)),O}filter(O){return new z(F=>this.iterate(H=>O(H)?F(H):!0))}map(O){return new z(F=>this.iterate(H=>F(O(H))))}findLast(O){let F;return this.iterate(H=>(O(H)&&(F=H),!0)),F}findLastMaxBy(O){let F,H=!0;return this.iterate(V=>((H||N.isGreaterThan(O(V,F)))&&(H=!1,F=V),!0)),F}}n.CallbackIterable=z,z.empty=new z(x=>{})}),Y(X[11],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.mapFindFirst=n.findMaxIdxBy=n.findFirstMinBy=n.findLastMaxBy=n.findFirstMaxBy=n.MonotonousArray=n.findFirstIdxMonotonousOrArrLen=n.findFirstMonotonous=n.findLastIdxMonotonous=n.findLastMonotonous=n.findLastIdx=n.findLast=void 0;function M(l,f,g){const S=A(l,f);if(S!==-1)return l[S]}n.findLast=M;function A(l,f,g=l.length-1){for(let S=g;S>=0;S--){const _=l[S];if(f(_))return S}return-1}n.findLastIdx=A;function i(l,f){const g=d(l,f);return g===-1?void 0:l[g]}n.findLastMonotonous=i;function d(l,f,g=0,S=l.length){let _=g,E=S;for(;_0&&(g=_)}return g}n.findFirstMaxBy=o;function w(l,f){if(l.length===0)return;let g=l[0];for(let S=1;S=0&&(g=_)}return g}n.findLastMaxBy=w;function e(l,f){return o(l,(g,S)=>-f(g,S))}n.findFirstMinBy=e;function a(l,f){if(l.length===0)return-1;let g=0;for(let S=1;S0&&(g=S)}return g}n.findMaxIdxBy=a;function c(l,f){for(const g of l){const S=f(g);if(S!==void 0)return S}}n.mapFindFirst=c}),Y(X[32],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CachedFunction=n.LRUCachedFunction=void 0;class M{constructor(d){this.fn=d,this.lastCache=void 0,this.lastArgKey=void 0}get(d){const m=JSON.stringify(d);return this.lastArgKey!==m&&(this.lastArgKey=m,this.lastCache=this.fn(d)),this.lastCache}}n.LRUCachedFunction=M;class A{get cachedValues(){return this._map}constructor(d){this.fn=d,this._map=new Map}get(d){if(this._map.has(d))return this._map.get(d);const m=this.fn(d);return this._map.set(d,m),m}}n.CachedFunction=A}),Y(X[33],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Color=n.HSVA=n.HSLA=n.RGBA=void 0;function M(L,h){const o=Math.pow(10,h);return Math.round(L*o)/o}class A{constructor(h,o,w,e=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,h))|0,this.g=Math.min(255,Math.max(0,o))|0,this.b=Math.min(255,Math.max(0,w))|0,this.a=M(Math.max(Math.min(1,e),0),3)}static equals(h,o){return h.r===o.r&&h.g===o.g&&h.b===o.b&&h.a===o.a}}n.RGBA=A;class i{constructor(h,o,w,e){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,h),0)|0,this.s=M(Math.max(Math.min(1,o),0),3),this.l=M(Math.max(Math.min(1,w),0),3),this.a=M(Math.max(Math.min(1,e),0),3)}static equals(h,o){return h.h===o.h&&h.s===o.s&&h.l===o.l&&h.a===o.a}static fromRGBA(h){const o=h.r/255,w=h.g/255,e=h.b/255,a=h.a,c=Math.max(o,w,e),l=Math.min(o,w,e);let f=0,g=0;const S=(l+c)/2,_=c-l;if(_>0){switch(g=Math.min(S<=.5?_/(2*S):_/(2-2*S),1),c){case o:f=(w-e)/_+(w1&&(w-=1),w<1/6?h+(o-h)*6*w:w<1/2?o:w<2/3?h+(o-h)*(2/3-w)*6:h}static toRGBA(h){const o=h.h/360,{s:w,l:e,a}=h;let c,l,f;if(w===0)c=l=f=e;else{const g=e<.5?e*(1+w):e+w-e*w,S=2*e-g;c=i._hue2rgb(S,g,o+1/3),l=i._hue2rgb(S,g,o),f=i._hue2rgb(S,g,o-1/3)}return new A(Math.round(c*255),Math.round(l*255),Math.round(f*255),a)}}n.HSLA=i;class d{constructor(h,o,w,e){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,h),0)|0,this.s=M(Math.max(Math.min(1,o),0),3),this.v=M(Math.max(Math.min(1,w),0),3),this.a=M(Math.max(Math.min(1,e),0),3)}static equals(h,o){return h.h===o.h&&h.s===o.s&&h.v===o.v&&h.a===o.a}static fromRGBA(h){const o=h.r/255,w=h.g/255,e=h.b/255,a=Math.max(o,w,e),c=Math.min(o,w,e),l=a-c,f=a===0?0:l/a;let g;return l===0?g=0:a===o?g=((w-e)/l%6+6)%6:a===w?g=(e-o)/l+2:g=(o-w)/l+4,new d(Math.round(g*60),f,a,h.a)}static toRGBA(h){const{h:o,s:w,v:e,a}=h,c=e*w,l=c*(1-Math.abs(o/60%2-1)),f=e-c;let[g,S,_]=[0,0,0];return o<60?(g=c,S=l):o<120?(g=l,S=c):o<180?(S=c,_=l):o<240?(S=l,_=c):o<300?(g=l,_=c):o<=360&&(g=c,_=l),g=Math.round((g+f)*255),S=Math.round((S+f)*255),_=Math.round((_+f)*255),new A(g,S,_,a)}}n.HSVA=d;class m{static fromHex(h){return m.Format.CSS.parseHex(h)||m.red}static equals(h,o){return!h&&!o?!0:!h||!o?!1:h.equals(o)}get hsla(){return this._hsla?this._hsla:i.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:d.fromRGBA(this.rgba)}constructor(h){if(h)if(h instanceof A)this.rgba=h;else if(h instanceof i)this._hsla=h,this.rgba=i.toRGBA(h);else if(h instanceof d)this._hsva=h,this.rgba=d.toRGBA(h);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(h){return!!h&&A.equals(this.rgba,h.rgba)&&i.equals(this.hsla,h.hsla)&&d.equals(this.hsva,h.hsva)}getRelativeLuminance(){const h=m._relativeLuminanceForComponent(this.rgba.r),o=m._relativeLuminanceForComponent(this.rgba.g),w=m._relativeLuminanceForComponent(this.rgba.b),e=.2126*h+.7152*o+.0722*w;return M(e,4)}static _relativeLuminanceForComponent(h){const o=h/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(h){const o=this.getRelativeLuminance(),w=h.getRelativeLuminance();return o>w}isDarkerThan(h){const o=this.getRelativeLuminance(),w=h.getRelativeLuminance();return o{throw g.stack?c.isErrorNoTelemetry(g)?new c(g.message+` - -`+g.stack):new Error(g.message+` - -`+g.stack):g},0)}}emit(g){this.listeners.forEach(S=>{S(g)})}onUnexpectedError(g){this.unexpectedErrorHandler(g),this.emit(g)}onUnexpectedExternalError(g){this.unexpectedErrorHandler(g)}}n.ErrorHandler=M,n.errorHandler=new M;function A(f){L(f)||n.errorHandler.onUnexpectedError(f)}n.onUnexpectedError=A;function i(f){L(f)||n.errorHandler.onUnexpectedExternalError(f)}n.onUnexpectedExternalError=i;function d(f){if(f instanceof Error){const{name:g,message:S}=f,_=f.stacktrace||f.stack;return{$isError:!0,name:g,message:S,stack:_,noTelemetry:c.isErrorNoTelemetry(f)}}return f}n.transformErrorForSerialization=d;const m="Canceled";function L(f){return f instanceof h?!0:f instanceof Error&&f.name===m&&f.message===m}n.isCancellationError=L;class h extends Error{constructor(){super(m),this.name=this.message}}n.CancellationError=h;function o(){const f=new Error(m);return f.name=f.message,f}n.canceled=o;function w(f){return f?new Error(`Illegal argument: ${f}`):new Error("Illegal argument")}n.illegalArgument=w;function e(f){return f?new Error(`Illegal state: ${f}`):new Error("Illegal state")}n.illegalState=e;class a extends Error{constructor(g){super("NotSupported"),g&&(this.message=g)}}n.NotSupportedError=a;class c extends Error{constructor(g){super(g),this.name="CodeExpectedError"}static fromError(g){if(g instanceof c)return g;const S=new c;return S.message=g.message,S.stack=g.stack,S}static isErrorNoTelemetry(g){return g.name==="CodeExpectedError"}}n.ErrorNoTelemetry=c;class l extends Error{constructor(g){super(g||"An unexpected bug occurred."),Object.setPrototypeOf(this,l.prototype)}}n.BugIndicatingError=l}),Y(X[12],J([0,1,5]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.checkAdjacentItems=n.assertFn=n.assertNever=n.ok=void 0;function A(L,h){if(!L)throw new Error(h?`Assertion failed (${h})`:"Assertion Failed")}n.ok=A;function i(L,h="Unreachable"){throw new Error(h)}n.assertNever=i;function d(L){if(!L()){debugger;L(),(0,M.onUnexpectedError)(new M.BugIndicatingError("Assertion Failed"))}}n.assertFn=d;function m(L,h){let o=0;for(;o=0;r--)yield v[r]}A.reverse=w;function e(v){return!v||v[Symbol.iterator]().next().done===!0}A.isEmpty=e;function a(v){return v[Symbol.iterator]().next().value}A.first=a;function c(v,r){for(const s of v)if(r(s))return!0;return!1}A.some=c;function l(v,r){for(const s of v)if(r(s))return s}A.find=l;function*f(v,r){for(const s of v)r(s)&&(yield s)}A.filter=f;function*g(v,r){let s=0;for(const u of v)yield r(u,s++)}A.map=g;function*S(...v){for(const r of v)for(const s of r)yield s}A.concat=S;function _(v,r,s){let u=s;for(const p of v)u=r(u,p);return u}A.reduce=_;function*E(v,r,s=v.length){for(r<0&&(r+=v.length),s<0?s+=v.length:s>v.length&&(s=v.length);r=98&&_<=113)return null;switch(_){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return A.keyCodeToStr(_)}e.toElectronAccelerator=S})(o||(n.KeyCodeUtils=o={}));function w(e,a){const c=(a&65535)<<16>>>0;return(e|c)>>>0}n.KeyChord=w}),Y(X[36],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Lazy=void 0;class M{constructor(i){this.executor=i,this._didRun=!1}get value(){if(!this._didRun)try{this._value=this.executor()}catch(i){this._error=i}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}n.Lazy=M}),Y(X[13],J([0,1,20,21]),function(T,n,M,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DisposableMap=n.ImmortalReference=n.RefCountedDisposable=n.MutableDisposable=n.Disposable=n.DisposableStore=n.toDisposable=n.combinedDisposable=n.dispose=n.isDisposable=n.markAsSingleton=n.markAsDisposed=n.trackDisposable=n.setDisposableTracker=void 0;const i=!1;let d=null;function m(r){d=r}if(n.setDisposableTracker=m,i){const r="__is_disposable_tracked__";m(new class{trackDisposable(s){const u=new Error("Potentially leaked disposable").stack;setTimeout(()=>{s[r]||console.log(u)},3e3)}setParent(s,u){if(s&&s!==S.None)try{s[r]=!0}catch{}}markAsDisposed(s){if(s&&s!==S.None)try{s[r]=!0}catch{}}markAsSingleton(s){}})}function L(r){return d?.trackDisposable(r),r}n.trackDisposable=L;function h(r){d?.markAsDisposed(r)}n.markAsDisposed=h;function o(r,s){d?.setParent(r,s)}function w(r,s){if(d)for(const u of r)d.setParent(u,s)}function e(r){return d?.markAsSingleton(r),r}n.markAsSingleton=e;function a(r){return typeof r.dispose=="function"&&r.dispose.length===0}n.isDisposable=a;function c(r){if(A.Iterable.is(r)){const s=[];for(const u of r)if(u)try{u.dispose()}catch(p){s.push(p)}if(s.length===1)throw s[0];if(s.length>1)throw new AggregateError(s,"Encountered errors while disposing of store");return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}n.dispose=c;function l(...r){const s=f(()=>c(r));return w(r,s),s}n.combinedDisposable=l;function f(r){const s=L({dispose:(0,M.createSingleCallFunction)(()=>{h(s),r()})});return s}n.toDisposable=f;class g{constructor(){this._toDispose=new Set,this._isDisposed=!1,L(this)}dispose(){this._isDisposed||(h(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{c(this._toDispose)}finally{this._toDispose.clear()}}add(s){if(!s)return s;if(s===this)throw new Error("Cannot register a disposable on itself!");return o(s,this),this._isDisposed?g.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(s),s}deleteAndLeak(s){s&&this._toDispose.has(s)&&(this._toDispose.delete(s),o(s,null))}}n.DisposableStore=g,g.DISABLE_DISPOSED_WARNING=!1;class S{constructor(){this._store=new g,L(this),o(this._store,this)}dispose(){h(this),this._store.dispose()}_register(s){if(s===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(s)}}n.Disposable=S,S.None=Object.freeze({dispose(){}});class _{constructor(){this._isDisposed=!1,L(this)}get value(){return this._isDisposed?void 0:this._value}set value(s){var u;this._isDisposed||s===this._value||((u=this._value)===null||u===void 0||u.dispose(),s&&o(s,this),this._value=s)}clear(){this.value=void 0}dispose(){var s;this._isDisposed=!0,h(this),(s=this._value)===null||s===void 0||s.dispose(),this._value=void 0}}n.MutableDisposable=_;class E{constructor(s){this._disposable=s,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}n.RefCountedDisposable=E;class y{constructor(s){this.object=s}dispose(){}}n.ImmortalReference=y;class v{constructor(){this._store=new Map,this._isDisposed=!1,L(this)}dispose(){h(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{c(this._store.values())}finally{this._store.clear()}}get(s){return this._store.get(s)}set(s,u,p=!1){var b;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),p||(b=this._store.get(s))===null||b===void 0||b.dispose(),this._store.set(s,u)}deleteAndDispose(s){var u;(u=this._store.get(s))===null||u===void 0||u.dispose(),this._store.delete(s)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}n.DisposableMap=v}),Y(X[22],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LinkedList=void 0;class M{constructor(d){this.element=d,this.next=M.Undefined,this.prev=M.Undefined}}M.Undefined=new M(void 0);class A{constructor(){this._first=M.Undefined,this._last=M.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===M.Undefined}clear(){let d=this._first;for(;d!==M.Undefined;){const m=d.next;d.prev=M.Undefined,d.next=M.Undefined,d=m}this._first=M.Undefined,this._last=M.Undefined,this._size=0}unshift(d){return this._insert(d,!1)}push(d){return this._insert(d,!0)}_insert(d,m){const L=new M(d);if(this._first===M.Undefined)this._first=L,this._last=L;else if(m){const o=this._last;this._last=L,L.prev=o,o.next=L}else{const o=this._first;this._first=L,L.next=o,o.prev=L}this._size+=1;let h=!1;return()=>{h||(h=!0,this._remove(L))}}shift(){if(this._first!==M.Undefined){const d=this._first.element;return this._remove(this._first),d}}pop(){if(this._last!==M.Undefined){const d=this._last.element;return this._remove(this._last),d}}_remove(d){if(d.prev!==M.Undefined&&d.next!==M.Undefined){const m=d.prev;m.next=d.next,d.next.prev=m}else d.prev===M.Undefined&&d.next===M.Undefined?(this._first=M.Undefined,this._last=M.Undefined):d.next===M.Undefined?(this._last=this._last.prev,this._last.next=M.Undefined):d.prev===M.Undefined&&(this._first=this._first.next,this._first.prev=M.Undefined);this._size-=1}*[Symbol.iterator](){let d=this._first;for(;d!==M.Undefined;)yield d.element,d=d.next}}n.LinkedList=A}),Y(X[37],J([0,1]),function(T,n){"use strict";var M,A;Object.defineProperty(n,"__esModule",{value:!0}),n.SetMap=n.BidirectionalMap=n.LRUCache=n.LinkedMap=n.ResourceMap=void 0;class i{constructor(a,c){this.uri=a,this.value=c}}function d(e){return Array.isArray(e)}class m{constructor(a,c){if(this[M]="ResourceMap",a instanceof m)this.map=new Map(a.map),this.toKey=c??m.defaultToKey;else if(d(a)){this.map=new Map,this.toKey=c??m.defaultToKey;for(const[l,f]of a)this.set(l,f)}else this.map=new Map,this.toKey=a??m.defaultToKey}set(a,c){return this.map.set(this.toKey(a),new i(a,c)),this}get(a){var c;return(c=this.map.get(this.toKey(a)))===null||c===void 0?void 0:c.value}has(a){return this.map.has(this.toKey(a))}get size(){return this.map.size}clear(){this.map.clear()}delete(a){return this.map.delete(this.toKey(a))}forEach(a,c){typeof c<"u"&&(a=a.bind(c));for(const[l,f]of this.map)a(f.value,f.uri,this)}*values(){for(const a of this.map.values())yield a.value}*keys(){for(const a of this.map.values())yield a.uri}*entries(){for(const a of this.map.values())yield[a.uri,a.value]}*[(M=Symbol.toStringTag,Symbol.iterator)](){for(const[,a]of this.map)yield[a.uri,a.value]}}n.ResourceMap=m,m.defaultToKey=e=>e.toString();class L{constructor(){this[A]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var a;return(a=this._head)===null||a===void 0?void 0:a.value}get last(){var a;return(a=this._tail)===null||a===void 0?void 0:a.value}has(a){return this._map.has(a)}get(a,c=0){const l=this._map.get(a);if(l)return c!==0&&this.touch(l,c),l.value}set(a,c,l=0){let f=this._map.get(a);if(f)f.value=c,l!==0&&this.touch(f,l);else{switch(f={key:a,value:c,next:void 0,previous:void 0},l){case 0:this.addItemLast(f);break;case 1:this.addItemFirst(f);break;case 2:this.addItemLast(f);break;default:this.addItemLast(f);break}this._map.set(a,f),this._size++}return this}delete(a){return!!this.remove(a)}remove(a){const c=this._map.get(a);if(c)return this._map.delete(a),this.removeItem(c),this._size--,c.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const a=this._head;return this._map.delete(a.key),this.removeItem(a),this._size--,a.value}forEach(a,c){const l=this._state;let f=this._head;for(;f;){if(c?a.bind(c)(f.value,f.key,this):a(f.value,f.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");f=f.next}}keys(){const a=this,c=this._state;let l=this._head;const f={[Symbol.iterator](){return f},next(){if(a._state!==c)throw new Error("LinkedMap got modified during iteration.");if(l){const g={value:l.key,done:!1};return l=l.next,g}else return{value:void 0,done:!0}}};return f}values(){const a=this,c=this._state;let l=this._head;const f={[Symbol.iterator](){return f},next(){if(a._state!==c)throw new Error("LinkedMap got modified during iteration.");if(l){const g={value:l.value,done:!1};return l=l.next,g}else return{value:void 0,done:!0}}};return f}entries(){const a=this,c=this._state;let l=this._head;const f={[Symbol.iterator](){return f},next(){if(a._state!==c)throw new Error("LinkedMap got modified during iteration.");if(l){const g={value:[l.key,l.value],done:!1};return l=l.next,g}else return{value:void 0,done:!0}}};return f}[(A=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(a){if(a>=this.size)return;if(a===0){this.clear();return}let c=this._head,l=this.size;for(;c&&l>a;)this._map.delete(c.key),c=c.next,l--;this._head=c,this._size=l,c&&(c.previous=void 0),this._state++}addItemFirst(a){if(!this._head&&!this._tail)this._tail=a;else if(this._head)a.next=this._head,this._head.previous=a;else throw new Error("Invalid list");this._head=a,this._state++}addItemLast(a){if(!this._head&&!this._tail)this._head=a;else if(this._tail)a.previous=this._tail,this._tail.next=a;else throw new Error("Invalid list");this._tail=a,this._state++}removeItem(a){if(a===this._head&&a===this._tail)this._head=void 0,this._tail=void 0;else if(a===this._head){if(!a.next)throw new Error("Invalid list");a.next.previous=void 0,this._head=a.next}else if(a===this._tail){if(!a.previous)throw new Error("Invalid list");a.previous.next=void 0,this._tail=a.previous}else{const c=a.next,l=a.previous;if(!c||!l)throw new Error("Invalid list");c.previous=l,l.next=c}a.next=void 0,a.previous=void 0,this._state++}touch(a,c){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(c!==1&&c!==2)){if(c===1){if(a===this._head)return;const l=a.next,f=a.previous;a===this._tail?(f.next=void 0,this._tail=f):(l.previous=f,f.next=l),a.previous=void 0,a.next=this._head,this._head.previous=a,this._head=a,this._state++}else if(c===2){if(a===this._tail)return;const l=a.next,f=a.previous;a===this._head?(l.previous=void 0,this._head=l):(l.previous=f,f.next=l),a.next=void 0,a.previous=this._tail,this._tail.next=a,this._tail=a,this._state++}}}toJSON(){const a=[];return this.forEach((c,l)=>{a.push([l,c])}),a}fromJSON(a){this.clear();for(const[c,l]of a)this.set(c,l)}}n.LinkedMap=L;class h extends L{constructor(a,c=1){super(),this._limit=a,this._ratio=Math.min(Math.max(0,c),1)}get limit(){return this._limit}set limit(a){this._limit=a,this.checkTrim()}get(a,c=2){return super.get(a,c)}peek(a){return super.get(a,0)}set(a,c){return super.set(a,c,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}n.LRUCache=h;class o{constructor(a){if(this._m1=new Map,this._m2=new Map,a)for(const[c,l]of a)this.set(c,l)}clear(){this._m1.clear(),this._m2.clear()}set(a,c){this._m1.set(a,c),this._m2.set(c,a)}get(a){return this._m1.get(a)}getKey(a){return this._m2.get(a)}delete(a){const c=this._m1.get(a);return c===void 0?!1:(this._m1.delete(a),this._m2.delete(c),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}n.BidirectionalMap=o;class w{constructor(){this.map=new Map}add(a,c){let l=this.map.get(a);l||(l=new Set,this.map.set(a,l)),l.add(c)}delete(a,c){const l=this.map.get(a);l&&(l.delete(c),l.size===0&&this.map.delete(a))}forEach(a,c){const l=this.map.get(a);l&&l.forEach(c)}get(a){const c=this.map.get(a);return c||new Set}}n.SetMap=w}),Y(X[23],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StopWatch=void 0;const M=globalThis.performance&&typeof globalThis.performance.now=="function";class A{static create(d){return new A(d)}constructor(d){this._now=M&&d===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}n.StopWatch=A}),Y(X[9],J([0,1,5,20,13,22,23]),function(T,n,M,A,i,d,m){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Relay=n.EventBufferer=n.EventMultiplexer=n.MicrotaskEmitter=n.DebounceEmitter=n.PauseableEmitter=n.createEventDeliveryQueue=n.Emitter=n.EventProfiling=n.Event=void 0;const L=!1,h=!1;var o;(function(b){b.None=()=>i.Disposable.None;function C(Z){if(h){const{onDidAddListener:j}=Z,G=c.create();let Q=0;Z.onDidAddListener=()=>{++Q===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),G.print()),j?.()}}}function N(Z,j){return F(Z,()=>{},0,void 0,!0,void 0,j)}b.defer=N;function R(Z){return(j,G=null,Q)=>{let K=!1,te;return te=Z(P=>{if(!K)return te?te.dispose():K=!0,j.call(G,P)},null,Q),K&&te.dispose(),te}}b.once=R;function D(Z,j,G){return x((Q,K=null,te)=>Z(P=>Q.call(K,j(P)),null,te),G)}b.map=D;function k(Z,j,G){return x((Q,K=null,te)=>Z(P=>{j(P),Q.call(K,P)},null,te),G)}b.forEach=k;function U(Z,j,G){return x((Q,K=null,te)=>Z(P=>j(P)&&Q.call(K,P),null,te),G)}b.filter=U;function I(Z){return Z}b.signal=I;function B(...Z){return(j,G=null,Q)=>{const K=(0,i.combinedDisposable)(...Z.map(te=>te(P=>j.call(G,P))));return O(K,Q)}}b.any=B;function z(Z,j,G,Q){let K=G;return D(Z,te=>(K=j(K,te),K),Q)}b.reduce=z;function x(Z,j){let G;const Q={onWillAddFirstListener(){G=Z(K.fire,K)},onDidRemoveLastListener(){G?.dispose()}};j||C(Q);const K=new S(Q);return j?.add(K),K.event}function O(Z,j){return j instanceof Array?j.push(Z):j&&j.add(Z),Z}function F(Z,j,G=100,Q=!1,K=!1,te,P){let q,W,$,ee=0,ie;const oe={leakWarningThreshold:te,onWillAddFirstListener(){q=Z(he=>{ee++,W=j(W,he),Q&&!$&&(ce.fire(W),W=void 0),ie=()=>{const se=W;W=void 0,$=void 0,(!Q||ee>1)&&ce.fire(se),ee=0},typeof G=="number"?(clearTimeout($),$=setTimeout(ie,G)):$===void 0&&($=0,queueMicrotask(ie))})},onWillRemoveListener(){K&&ee>0&&ie?.()},onDidRemoveLastListener(){ie=void 0,q.dispose()}};P||C(oe);const ce=new S(oe);return P?.add(ce),ce.event}b.debounce=F;function H(Z,j=0,G){return b.debounce(Z,(Q,K)=>Q?(Q.push(K),Q):[K],j,void 0,!0,void 0,G)}b.accumulate=H;function V(Z,j=(Q,K)=>Q===K,G){let Q=!0,K;return U(Z,te=>{const P=Q||!j(te,K);return Q=!1,K=te,P},G)}b.latch=V;function t(Z,j,G){return[b.filter(Z,j,G),b.filter(Z,Q=>!j(Q),G)]}b.split=t;function ne(Z,j=!1,G=[],Q){let K=G.slice(),te=Z(W=>{K?K.push(W):q.fire(W)});Q&&Q.add(te);const P=()=>{K?.forEach(W=>q.fire(W)),K=null},q=new S({onWillAddFirstListener(){te||(te=Z(W=>q.fire(W)),Q&&Q.add(te))},onDidAddFirstListener(){K&&(j?setTimeout(P):P())},onDidRemoveLastListener(){te&&te.dispose(),te=null}});return Q&&Q.add(q),q.event}b.buffer=ne;function re(Z,j){return(Q,K,te)=>{const P=j(new me);return Z(function(q){const W=P.evaluate(q);W!==le&&Q.call(K,W)},void 0,te)}}b.chain=re;const le=Symbol("HaltChainable");class me{constructor(){this.steps=[]}map(j){return this.steps.push(j),this}forEach(j){return this.steps.push(G=>(j(G),G)),this}filter(j){return this.steps.push(G=>j(G)?G:le),this}reduce(j,G){let Q=G;return this.steps.push(K=>(Q=j(Q,K),Q)),this}latch(j=(G,Q)=>G===Q){let G=!0,Q;return this.steps.push(K=>{const te=G||!j(K,Q);return G=!1,Q=K,te?K:le}),this}evaluate(j){for(const G of this.steps)if(j=G(j),j===le)break;return j}}function pe(Z,j,G=Q=>Q){const Q=(...q)=>P.fire(G(...q)),K=()=>Z.on(j,Q),te=()=>Z.removeListener(j,Q),P=new S({onWillAddFirstListener:K,onDidRemoveLastListener:te});return P.event}b.fromNodeEventEmitter=pe;function Le(Z,j,G=Q=>Q){const Q=(...q)=>P.fire(G(...q)),K=()=>Z.addEventListener(j,Q),te=()=>Z.removeEventListener(j,Q),P=new S({onWillAddFirstListener:K,onDidRemoveLastListener:te});return P.event}b.fromDOMEventEmitter=Le;function we(Z){return new Promise(j=>R(Z)(j))}b.toPromise=we;function be(Z){const j=new S;return Z.then(G=>{j.fire(G)},()=>{j.fire(void 0)}).finally(()=>{j.dispose()}),j.event}b.fromPromise=be;function Ce(Z,j){return j(void 0),Z(G=>j(G))}b.runAndSubscribe=Ce;function Se(Z,j){let G=null;function Q(te){G?.dispose(),G=new i.DisposableStore,j(te,G)}Q(void 0);const K=Z(te=>Q(te));return(0,i.toDisposable)(()=>{K.dispose(),G?.dispose()})}b.runAndSubscribeWithStore=Se;class ye{constructor(j,G){this._observable=j,this._counter=0,this._hasChanged=!1;const Q={onWillAddFirstListener:()=>{j.addObserver(this)},onDidRemoveLastListener:()=>{j.removeObserver(this)}};G||C(Q),this.emitter=new S(Q),G&&G.add(this.emitter)}beginUpdate(j){this._counter++}handlePossibleChange(j){}handleChange(j,G){this._hasChanged=!0}endUpdate(j){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function _e(Z,j){return new ye(Z,j).emitter.event}b.fromObservable=_e;function de(Z){return j=>{let G=0,Q=!1;const K={beginUpdate(){G++},endUpdate(){G--,G===0&&(Z.reportChanges(),Q&&(Q=!1,j()))},handlePossibleChange(){},handleChange(){Q=!0}};return Z.addObserver(K),Z.reportChanges(),{dispose(){Z.removeObserver(K)}}}}b.fromObservableLight=de})(o||(n.Event=o={}));class w{constructor(C){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${C}_${w._idPool++}`,w.all.add(this)}start(C){this._stopWatch=new m.StopWatch,this.listenerCount=C}stop(){if(this._stopWatch){const C=this._stopWatch.elapsed();this.durations.push(C),this.elapsedOverall+=C,this.invocationCount+=1,this._stopWatch=void 0}}}n.EventProfiling=w,w.all=new Set,w._idPool=0;let e=-1;class a{constructor(C,N=Math.random().toString(18).slice(2,5)){this.threshold=C,this.name=N,this._warnCountdown=0}dispose(){var C;(C=this._stacks)===null||C===void 0||C.clear()}check(C,N){const R=this.threshold;if(R<=0||N{const k=this._stacks.get(C.value)||0;this._stacks.set(C.value,k-1)}}}class c{static create(){var C;return new c((C=new Error().stack)!==null&&C!==void 0?C:"")}constructor(C){this.value=C}print(){console.warn(this.value.split(` -`).slice(2).join(` -`))}}class l{constructor(C){this.value=C}}const f=2,g=(b,C)=>{if(b instanceof l)C(b);else for(let N=0;N0||!((N=this._options)===null||N===void 0)&&N.leakWarningThreshold?new a((D=(R=this._options)===null||R===void 0?void 0:R.leakWarningThreshold)!==null&&D!==void 0?D:e):void 0,this._perfMon=!((k=this._options)===null||k===void 0)&&k._profName?new w(this._options._profName):void 0,this._deliveryQueue=(U=this._options)===null||U===void 0?void 0:U.deliveryQueue}dispose(){var C,N,R,D;if(!this._disposed){if(this._disposed=!0,((C=this._deliveryQueue)===null||C===void 0?void 0:C.current)===this&&this._deliveryQueue.reset(),this._listeners){if(L){const k=this._listeners;queueMicrotask(()=>{g(k,U=>{var I;return(I=U.stack)===null||I===void 0?void 0:I.print()})})}this._listeners=void 0,this._size=0}(R=(N=this._options)===null||N===void 0?void 0:N.onDidRemoveLastListener)===null||R===void 0||R.call(N),(D=this._leakageMon)===null||D===void 0||D.dispose()}}get event(){var C;return(C=this._event)!==null&&C!==void 0||(this._event=(N,R,D)=>{var k,U,I,B,z;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),i.Disposable.None;if(this._disposed)return i.Disposable.None;R&&(N=N.bind(R));const x=new l(N);let O,F;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(x.stack=c.create(),O=this._leakageMon.check(x.stack,this._size+1)),L&&(x.stack=F??c.create()),this._listeners?this._listeners instanceof l?((z=this._deliveryQueue)!==null&&z!==void 0||(this._deliveryQueue=new E),this._listeners=[this._listeners,x]):this._listeners.push(x):((U=(k=this._options)===null||k===void 0?void 0:k.onWillAddFirstListener)===null||U===void 0||U.call(k,this),this._listeners=x,(B=(I=this._options)===null||I===void 0?void 0:I.onDidAddFirstListener)===null||B===void 0||B.call(I,this)),this._size++;const H=(0,i.toDisposable)(()=>{O?.(),this._removeListener(x)});return D instanceof i.DisposableStore?D.add(H):Array.isArray(D)&&D.push(H),H}),this._event}_removeListener(C){var N,R,D,k;if((R=(N=this._options)===null||N===void 0?void 0:N.onWillRemoveListener)===null||R===void 0||R.call(N,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(k=(D=this._options)===null||D===void 0?void 0:D.onDidRemoveLastListener)===null||k===void 0||k.call(D,this),this._size=0;return}const U=this._listeners,I=U.indexOf(C);if(I===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,U[I]=void 0;const B=this._deliveryQueue.current===this;if(this._size*f<=U.length){let z=0;for(let x=0;x0}}n.Emitter=S;const _=()=>new E;n.createEventDeliveryQueue=_;class E{constructor(){this.i=-1,this.end=0}enqueue(C,N,R){this.i=0,this.end=R,this.current=C,this.value=N}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class y extends S{constructor(C){super(C),this._isPaused=0,this._eventQueue=new d.LinkedList,this._mergeFn=C?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const C=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(C))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(C){this._size&&(this._isPaused!==0?this._eventQueue.push(C):super.fire(C))}}n.PauseableEmitter=y;class v extends y{constructor(C){var N;super(C),this._delay=(N=C.delay)!==null&&N!==void 0?N:100}fire(C){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(C)}}n.DebounceEmitter=v;class r extends S{constructor(C){super(C),this._queuedEvents=[],this._mergeFn=C?.merge}fire(C){this.hasListeners()&&(this._queuedEvents.push(C),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(N=>super.fire(N)),this._queuedEvents=[]}))}}n.MicrotaskEmitter=r;class s{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new S({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(C){const N={event:C,listener:null};this.events.push(N),this.hasListeners&&this.hook(N);const R=()=>{this.hasListeners&&this.unhook(N);const D=this.events.indexOf(N);this.events.splice(D,1)};return(0,i.toDisposable)((0,A.createSingleCallFunction)(R))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(C=>this.hook(C))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(C=>this.unhook(C))}hook(C){C.listener=C.event(N=>this.emitter.fire(N))}unhook(C){C.listener&&C.listener.dispose(),C.listener=null}dispose(){this.emitter.dispose()}}n.EventMultiplexer=s;class u{constructor(){this.buffers=[]}wrapEvent(C){return(N,R,D)=>C(k=>{const U=this.buffers[this.buffers.length-1];U?U.push(()=>N.call(R,k)):N.call(R,k)},void 0,D)}bufferEvents(C){const N=[];this.buffers.push(N);const R=C();return this.buffers.pop(),N.forEach(D=>D()),R}}n.EventBufferer=u;class p{constructor(){this.listening=!1,this.inputEvent=o.None,this.inputEventListener=i.Disposable.None,this.emitter=new S({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(C){this.inputEvent=C,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=C(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}n.Relay=p}),Y(X[38],J([0,1,9]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CancellationTokenSource=n.CancellationToken=void 0;const A=Object.freeze(function(L,h){const o=setTimeout(L.bind(h),0);return{dispose(){clearTimeout(o)}}});var i;(function(L){function h(o){return o===L.None||o===L.Cancelled||o instanceof d?!0:!o||typeof o!="object"?!1:typeof o.isCancellationRequested=="boolean"&&typeof o.onCancellationRequested=="function"}L.isCancellationToken=h,L.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:M.Event.None}),L.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:A})})(i||(n.CancellationToken=i={}));class d{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?A:(this._emitter||(this._emitter=new M.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class m{constructor(h){this._token=void 0,this._parentListener=void 0,this._parentListener=h&&h.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new d),this._token}cancel(){this._token?this._token instanceof d&&this._token.cancel():this._token=i.Cancelled}dispose(h=!1){var o;h&&this.cancel(),(o=this._parentListener)===null||o===void 0||o.dispose(),this._token?this._token instanceof d&&this._token.dispose():this._token=i.None}}n.CancellationTokenSource=m}),Y(X[6],J([0,1,32,36]),function(T,n,M,A){"use strict";var i;Object.defineProperty(n,"__esModule",{value:!0}),n.InvisibleCharacters=n.AmbiguousCharacters=n.noBreakWhitespace=n.getLeftDeleteOffset=n.singleLetterHash=n.containsUppercaseCharacter=n.startsWithUTF8BOM=n.UTF8_BOM_CHARACTER=n.isEmojiImprecise=n.isFullWidthCharacter=n.containsUnusualLineTerminators=n.UNUSUAL_LINE_TERMINATORS=n.isBasicASCII=n.containsRTL=n.getCharContainingOffset=n.prevCharLength=n.nextCharLength=n.GraphemeIterator=n.CodePointIterator=n.getNextCodePoint=n.computeCodePoint=n.isLowSurrogate=n.isHighSurrogate=n.commonSuffixLength=n.commonPrefixLength=n.startsWithIgnoreCase=n.equalsIgnoreCase=n.isUpperAsciiLetter=n.isLowerAsciiLetter=n.isAsciiDigit=n.compareSubstringIgnoreCase=n.compareIgnoreCase=n.compareSubstring=n.compare=n.lastNonWhitespaceIndex=n.getLeadingWhitespace=n.firstNonWhitespaceIndex=n.splitLines=n.regExpLeadsToEndlessLoop=n.createRegExp=n.stripWildcards=n.convertSimple2RegExpPattern=n.rtrim=n.ltrim=n.trim=n.escapeRegExpCharacters=n.escape=n.format=n.isFalsyOrWhitespace=void 0;function d(P){return!P||typeof P!="string"?!0:P.trim().length===0}n.isFalsyOrWhitespace=d;const m=/{(\d+)}/g;function L(P,...q){return q.length===0?P:P.replace(m,function(W,$){const ee=parseInt($,10);return isNaN(ee)||ee<0||ee>=q.length?W:q[ee]})}n.format=L;function h(P){return P.replace(/[<>&]/g,function(q){switch(q){case"<":return"<";case">":return">";case"&":return"&";default:return q}})}n.escape=h;function o(P){return P.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}n.escapeRegExpCharacters=o;function w(P,q=" "){const W=e(P,q);return a(W,q)}n.trim=w;function e(P,q){if(!P||!q)return P;const W=q.length;if(W===0||P.length===0)return P;let $=0;for(;P.indexOf(q,$)===$;)$=$+W;return P.substring($)}n.ltrim=e;function a(P,q){if(!P||!q)return P;const W=q.length,$=P.length;if(W===0||$===0)return P;let ee=$,ie=-1;for(;ie=P.lastIndexOf(q,ee-1),!(ie===-1||ie+W!==ee);){if(ie===0)return"";ee=ie}return P.substring(0,ee)}n.rtrim=a;function c(P){return P.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}n.convertSimple2RegExpPattern=c;function l(P){return P.replace(/\*/g,"")}n.stripWildcards=l;function f(P,q,W={}){if(!P)throw new Error("Cannot create regex from empty string");q||(P=o(P)),W.wholeWord&&(/\B/.test(P.charAt(0))||(P="\\b"+P),/\B/.test(P.charAt(P.length-1))||(P=P+"\\b"));let $="";return W.global&&($+="g"),W.matchCase||($+="i"),W.multiline&&($+="m"),W.unicode&&($+="u"),new RegExp(P,$)}n.createRegExp=f;function g(P){return P.source==="^"||P.source==="^$"||P.source==="$"||P.source==="^\\s*$"?!1:!!(P.exec("")&&P.lastIndex===0)}n.regExpLeadsToEndlessLoop=g;function S(P){return P.split(/\r\n|\r|\n/)}n.splitLines=S;function _(P){for(let q=0,W=P.length;q=0;W--){const $=P.charCodeAt(W);if($!==32&&$!==9)return W}return-1}n.lastNonWhitespaceIndex=y;function v(P,q){return Pq?1:0}n.compare=v;function r(P,q,W=0,$=P.length,ee=0,ie=q.length){for(;W<$&&eese)return 1}const oe=$-W,ce=ie-ee;return oece?1:0}n.compareSubstring=r;function s(P,q){return u(P,q,0,P.length,0,q.length)}n.compareIgnoreCase=s;function u(P,q,W=0,$=P.length,ee=0,ie=q.length){for(;W<$&&ee=128||se>=128)return r(P.toLowerCase(),q.toLowerCase(),W,$,ee,ie);b(he)&&(he-=32),b(se)&&(se-=32);const fe=he-se;if(fe!==0)return fe}const oe=$-W,ce=ie-ee;return oece?1:0}n.compareSubstringIgnoreCase=u;function p(P){return P>=48&&P<=57}n.isAsciiDigit=p;function b(P){return P>=97&&P<=122}n.isLowerAsciiLetter=b;function C(P){return P>=65&&P<=90}n.isUpperAsciiLetter=C;function N(P,q){return P.length===q.length&&u(P,q)===0}n.equalsIgnoreCase=N;function R(P,q){const W=q.length;return q.length>P.length?!1:u(P,q,0,W)===0}n.startsWithIgnoreCase=R;function D(P,q){const W=Math.min(P.length,q.length);let $;for($=0;$1){const $=P.charCodeAt(q-2);if(U($))return B($,W)}return W}class O{get offset(){return this._offset}constructor(q,W=0){this._str=q,this._len=q.length,this._offset=W}setOffset(q){this._offset=q}prevCodePoint(){const q=x(this._str,this._offset);return this._offset-=q>=65536?2:1,q}nextCodePoint(){const q=z(this._str,this._len,this._offset);return this._offset+=q>=65536?2:1,q}eol(){return this._offset>=this._len}}n.CodePointIterator=O;class F{get offset(){return this._iterator.offset}constructor(q,W=0){this._iterator=new O(q,W)}nextGraphemeLength(){const q=de.getInstance(),W=this._iterator,$=W.offset;let ee=q.getGraphemeBreakType(W.nextCodePoint());for(;!W.eol();){const ie=W.offset,oe=q.getGraphemeBreakType(W.nextCodePoint());if(_e(ee,oe)){W.setOffset(ie);break}ee=oe}return W.offset-$}prevGraphemeLength(){const q=de.getInstance(),W=this._iterator,$=W.offset;let ee=q.getGraphemeBreakType(W.prevCodePoint());for(;W.offset>0;){const ie=W.offset,oe=q.getGraphemeBreakType(W.prevCodePoint());if(_e(oe,ee)){W.setOffset(ie);break}ee=oe}return $-W.offset}eol(){return this._iterator.eol()}}n.GraphemeIterator=F;function H(P,q){return new F(P,q).nextGraphemeLength()}n.nextCharLength=H;function V(P,q){return new F(P,q).prevGraphemeLength()}n.prevCharLength=V;function t(P,q){q>0&&I(P.charCodeAt(q))&&q--;const W=q+H(P,q);return[W-V(P,W),W]}n.getCharContainingOffset=t;let ne;function re(){return/(?:[\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\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function le(P){return ne||(ne=re()),ne.test(P)}n.containsRTL=le;const me=/^[\t\n\r\x20-\x7E]*$/;function pe(P){return me.test(P)}n.isBasicASCII=pe,n.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function Le(P){return n.UNUSUAL_LINE_TERMINATORS.test(P)}n.containsUnusualLineTerminators=Le;function we(P){return P>=11904&&P<=55215||P>=63744&&P<=64255||P>=65281&&P<=65374}n.isFullWidthCharacter=we;function be(P){return P>=127462&&P<=127487||P===8986||P===8987||P===9200||P===9203||P>=9728&&P<=10175||P===11088||P===11093||P>=127744&&P<=128591||P>=128640&&P<=128764||P>=128992&&P<=129008||P>=129280&&P<=129535||P>=129648&&P<=129782}n.isEmojiImprecise=be,n.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function Ce(P){return!!(P&&P.length>0&&P.charCodeAt(0)===65279)}n.startsWithUTF8BOM=Ce;function Se(P,q=!1){return P?(q&&(P=P.replace(/\\./g,"")),P.toLowerCase()!==P):!1}n.containsUppercaseCharacter=Se;function ye(P){return P=P%(2*26),P<26?String.fromCharCode(97+P):String.fromCharCode(65+P-26)}n.singleLetterHash=ye;function _e(P,q){return P===0?q!==5&&q!==7:P===2&&q===3?!1:P===4||P===2||P===3||q===4||q===2||q===3?!0:!(P===8&&(q===8||q===9||q===11||q===12)||(P===11||P===9)&&(q===9||q===10)||(P===12||P===10)&&q===10||q===5||q===13||q===7||P===1||P===13&&q===14||P===6&&q===6)}class de{static getInstance(){return de._INSTANCE||(de._INSTANCE=new de),de._INSTANCE}constructor(){this._data=Z()}getGraphemeBreakType(q){if(q<32)return q===10?3:q===13?2:4;if(q<127)return 0;const W=this._data,$=W.length/3;let ee=1;for(;ee<=$;)if(qW[3*ee+1])ee=2*ee+1;else return W[3*ee+2];return 0}}de._INSTANCE=null;function Z(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,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,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,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,129008,129008,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,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,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,2192,2193,1,2250,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,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,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,6862,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,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,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,9775,9775,14,9784,9785,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,9874,14,9876,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,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,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,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,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,118528,118573,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,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function j(P,q){if(P===0)return 0;const W=G(P,q);if(W!==void 0)return W;const $=new O(q,P);return $.prevCodePoint(),$.offset}n.getLeftDeleteOffset=j;function G(P,q){const W=new O(q,P);let $=W.prevCodePoint();for(;Q($)||$===65039||$===8419;){if(W.offset===0)return;$=W.prevCodePoint()}if(!be($))return;let ee=W.offset;return ee>0&&W.prevCodePoint()===8205&&(ee=W.offset),ee}function Q(P){return 127995<=P&&P<=127999}n.noBreakWhitespace="\xA0";class K{static getInstance(q){return i.cache.get(Array.from(q))}static getLocales(){return i._locales.value}constructor(q){this.confusableDictionary=q}isAmbiguous(q){return this.confusableDictionary.has(q)}getPrimaryConfusable(q){return this.confusableDictionary.get(q)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}n.AmbiguousCharacters=K,i=K,K.ambiguousCharacterData=new A.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),K.cache=new M.LRUCachedFunction(P=>{function q(se){const fe=new Map;for(let ge=0;ge!se.startsWith("_")&&se in ee);ie.length===0&&(ie=["_default"]);let oe;for(const se of ie){const fe=q(ee[se]);oe=$(oe,fe)}const ce=q(ee._common),he=W(ce,oe);return new i(he)}),K._locales=new A.Lazy(()=>Object.keys(i.ambiguousCharacterData.value).filter(P=>!P.startsWith("_")));class te{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(te.getRawData())),this._data}static isInvisibleCharacter(q){return te.getData().has(q)}static get codePoints(){return te.getData()}}n.InvisibleCharacters=te,te._data=void 0}),Y(X[39],J([0,1,6]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StringSHA1=n.toHexString=n.stringHash=n.numberHash=n.doHash=n.hash=void 0;function A(f){return i(f,0)}n.hash=A;function i(f,g){switch(typeof f){case"object":return f===null?d(349,g):Array.isArray(f)?h(f,g):o(f,g);case"string":return L(f,g);case"boolean":return m(f,g);case"number":return d(f,g);case"undefined":return d(937,g);default:return d(617,g)}}n.doHash=i;function d(f,g){return(g<<5)-g+f|0}n.numberHash=d;function m(f,g){return d(f?433:863,g)}function L(f,g){g=d(149417,g);for(let S=0,_=f.length;S<_;S++)g=d(f.charCodeAt(S),g);return g}n.stringHash=L;function h(f,g){return g=d(104579,g),f.reduce((S,_)=>i(_,S),g)}function o(f,g){return g=d(181387,g),Object.keys(f).sort().reduce((S,_)=>(S=L(_,S),i(f[_],S)),g)}function w(f,g,S=32){const _=S-g,E=~((1<<_)-1);return(f<>>_)>>>0}function e(f,g=0,S=f.byteLength,_=0){for(let E=0;ES.toString(16).padStart(2,"0")).join(""):a((f>>>0).toString(16),g/4)}n.toHexString=c;class l{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(g){const S=g.length;if(S===0)return;const _=this._buff;let E=this._buffLen,y=this._leftoverHighSurrogate,v,r;for(y!==0?(v=y,r=-1,y=0):(v=g.charCodeAt(0),r=0);;){let s=v;if(M.isHighSurrogate(v))if(r+1>>6,g[S++]=128|(_&63)>>>0):_<65536?(g[S++]=224|(_&61440)>>>12,g[S++]=128|(_&4032)>>>6,g[S++]=128|(_&63)>>>0):(g[S++]=240|(_&1835008)>>>18,g[S++]=128|(_&258048)>>>12,g[S++]=128|(_&4032)>>>6,g[S++]=128|(_&63)>>>0),S>=64&&(this._step(),S-=64,this._totalLen+=64,g[0]=g[64+0],g[1]=g[64+1],g[2]=g[64+2]),S}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),c(this._h0)+c(this._h1)+c(this._h2)+c(this._h3)+c(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,e(this._buff,this._buffLen),this._buffLen>56&&(this._step(),e(this._buff));const g=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(g/4294967296),!1),this._buffDV.setUint32(60,g%4294967296,!1),this._step()}_step(){const g=l._bigBlock32,S=this._buffDV;for(let b=0;b<64;b+=4)g.setUint32(b,S.getUint32(b,!1),!1);for(let b=64;b<320;b+=4)g.setUint32(b,w(g.getUint32(b-12,!1)^g.getUint32(b-32,!1)^g.getUint32(b-56,!1)^g.getUint32(b-64,!1),1),!1);let _=this._h0,E=this._h1,y=this._h2,v=this._h3,r=this._h4,s,u,p;for(let b=0;b<80;b++)b<20?(s=E&y|~E&v,u=1518500249):b<40?(s=E^y^v,u=1859775393):b<60?(s=E&y|E&v|y&v,u=2400959708):(s=E^y^v,u=3395469782),p=w(_,5)+s+r+u+g.getUint32(b*4,!1)&4294967295,r=v,v=y,y=w(E,30),E=_,_=p;this._h0=this._h0+_&4294967295,this._h1=this._h1+E&4294967295,this._h2=this._h2+y&4294967295,this._h3=this._h3+v&4294967295,this._h4=this._h4+r&4294967295}}n.StringSHA1=l,l._bigBlock32=new DataView(new ArrayBuffer(320))}),Y(X[24],J([0,1,34,39]),function(T,n,M,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LcsDiff=n.stringDiff=n.StringDiffSequence=void 0;class i{constructor(e){this.source=e}getElements(){const e=this.source,a=new Int32Array(e.length);for(let c=0,l=e.length;c0||this.m_modifiedCount>0)&&this.m_changes.push(new M.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,a){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,a),this.m_originalCount++}AddModifiedElement(e,a){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,a),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class o{constructor(e,a,c=null){this.ContinueProcessingPredicate=c,this._originalSequence=e,this._modifiedSequence=a;const[l,f,g]=o._getElements(e),[S,_,E]=o._getElements(a);this._hasStrings=g&&E,this._originalStringElements=l,this._originalElementsOrHash=f,this._modifiedStringElements=S,this._modifiedElementsOrHash=_,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const a=e.getElements();if(o._isStringArray(a)){const c=new Int32Array(a.length);for(let l=0,f=a.length;l=e&&l>=c&&this.ElementsAreEqual(a,l);)a--,l--;if(e>a||c>l){let v;return c<=l?(m.Assert(e===a+1,"originalStart should only be one more than originalEnd"),v=[new M.DiffChange(e,0,c,l-c+1)]):e<=a?(m.Assert(c===l+1,"modifiedStart should only be one more than modifiedEnd"),v=[new M.DiffChange(e,a-e+1,c,0)]):(m.Assert(e===a+1,"originalStart should only be one more than originalEnd"),m.Assert(c===l+1,"modifiedStart should only be one more than modifiedEnd"),v=[]),v}const g=[0],S=[0],_=this.ComputeRecursionPoint(e,a,c,l,g,S,f),E=g[0],y=S[0];if(_!==null)return _;if(!f[0]){const v=this.ComputeDiffRecursive(e,E,c,y,f);let r=[];return f[0]?r=[new M.DiffChange(E+1,a-(E+1)+1,y+1,l-(y+1)+1)]:r=this.ComputeDiffRecursive(E+1,a,y+1,l,f),this.ConcatenateChanges(v,r)}return[new M.DiffChange(e,a-e+1,c,l-c+1)]}WALKTRACE(e,a,c,l,f,g,S,_,E,y,v,r,s,u,p,b,C,N){let R=null,D=null,k=new h,U=a,I=c,B=s[0]-b[0]-l,z=-1073741824,x=this.m_forwardHistory.length-1;do{const O=B+e;O===U||O=0&&(E=this.m_forwardHistory[x],e=E[0],U=1,I=E.length-1)}while(--x>=-1);if(R=k.getReverseChanges(),N[0]){let O=s[0]+1,F=b[0]+1;if(R!==null&&R.length>0){const H=R[R.length-1];O=Math.max(O,H.getOriginalEnd()),F=Math.max(F,H.getModifiedEnd())}D=[new M.DiffChange(O,r-O+1,F,p-F+1)]}else{k=new h,U=g,I=S,B=s[0]-b[0]-_,z=1073741824,x=C?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const O=B+f;O===U||O=y[O+1]?(v=y[O+1]-1,u=v-B-_,v>z&&k.MarkNextChange(),z=v+1,k.AddOriginalElement(v+1,u+1),B=O+1-f):(v=y[O-1],u=v-B-_,v>z&&k.MarkNextChange(),z=v,k.AddModifiedElement(v+1,u+1),B=O-1-f),x>=0&&(y=this.m_reverseHistory[x],f=y[0],U=1,I=y.length-1)}while(--x>=-1);D=k.getChanges()}return this.ConcatenateChanges(R,D)}ComputeRecursionPoint(e,a,c,l,f,g,S){let _=0,E=0,y=0,v=0,r=0,s=0;e--,c--,f[0]=0,g[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const u=a-e+(l-c),p=u+1,b=new Int32Array(p),C=new Int32Array(p),N=l-c,R=a-e,D=e-c,k=a-l,I=(R-N)%2===0;b[N]=e,C[R]=a,S[0]=!1;for(let B=1;B<=u/2+1;B++){let z=0,x=0;y=this.ClipDiagonalBound(N-B,B,N,p),v=this.ClipDiagonalBound(N+B,B,N,p);for(let F=y;F<=v;F+=2){F===y||Fz+x&&(z=_,x=E),!I&&Math.abs(F-R)<=B-1&&_>=C[F])return f[0]=_,g[0]=E,H<=C[F]&&1447>0&&B<=1447+1?this.WALKTRACE(N,y,v,D,R,r,s,k,b,C,_,a,f,E,l,g,I,S):null}const O=(z-e+(x-c)-B)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(z,O))return S[0]=!0,f[0]=z,g[0]=x,O>0&&1447>0&&B<=1447+1?this.WALKTRACE(N,y,v,D,R,r,s,k,b,C,_,a,f,E,l,g,I,S):(e++,c++,[new M.DiffChange(e,a-e+1,c,l-c+1)]);r=this.ClipDiagonalBound(R-B,B,R,p),s=this.ClipDiagonalBound(R+B,B,R,p);for(let F=r;F<=s;F+=2){F===r||F=C[F+1]?_=C[F+1]-1:_=C[F-1],E=_-(F-R)-k;const H=_;for(;_>e&&E>c&&this.ElementsAreEqual(_,E);)_--,E--;if(C[F]=_,I&&Math.abs(F-N)<=B&&_<=b[F])return f[0]=_,g[0]=E,H>=b[F]&&1447>0&&B<=1447+1?this.WALKTRACE(N,y,v,D,R,r,s,k,b,C,_,a,f,E,l,g,I,S):null}if(B<=1447){let F=new Int32Array(v-y+2);F[0]=N-y+1,L.Copy2(b,y,F,1,v-y+1),this.m_forwardHistory.push(F),F=new Int32Array(s-r+2),F[0]=R-r+1,L.Copy2(C,r,F,1,s-r+1),this.m_reverseHistory.push(F)}}return this.WALKTRACE(N,y,v,D,R,r,s,k,b,C,_,a,f,E,l,g,I,S)}PrettifyChanges(e){for(let a=0;a0,S=c.modifiedLength>0;for(;c.originalStart+c.originalLength=0;a--){const c=e[a];let l=0,f=0;if(a>0){const v=e[a-1];l=v.originalStart+v.originalLength,f=v.modifiedStart+v.modifiedLength}const g=c.originalLength>0,S=c.modifiedLength>0;let _=0,E=this._boundaryScore(c.originalStart,c.originalLength,c.modifiedStart,c.modifiedLength);for(let v=1;;v++){const r=c.originalStart-v,s=c.modifiedStart-v;if(rE&&(E=p,_=v)}c.originalStart-=_,c.modifiedStart-=_;const y=[null];if(a>0&&this.ChangesOverlap(e[a-1],e[a],y)){e[a-1]=y[0],e.splice(a,1),a++;continue}}if(this._hasStrings)for(let a=1,c=e.length;a0&&s>_&&(_=s,E=v,y=r)}return _>0?[E,y]:null}_contiguousSequenceScore(e,a,c){let l=0;for(let f=0;f=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,a){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(a>0){const c=e+a;if(this._OriginalIsBoundary(c-1)||this._OriginalIsBoundary(c))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,a){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(a>0){const c=e+a;if(this._ModifiedIsBoundary(c-1)||this._ModifiedIsBoundary(c))return!0}return!1}_boundaryScore(e,a,c,l){const f=this._OriginalRegionIsBoundary(e,a)?1:0,g=this._ModifiedRegionIsBoundary(c,l)?1:0;return f+g}ConcatenateChanges(e,a){const c=[];if(e.length===0||a.length===0)return a.length>0?a:e;if(this.ChangesOverlap(e[e.length-1],a[0],c)){const l=new Array(e.length+a.length-1);return L.Copy(e,0,l,0,e.length-1),l[e.length-1]=c[0],L.Copy(a,1,l,e.length,a.length-1),l}else{const l=new Array(e.length+a.length);return L.Copy(e,0,l,0,e.length),L.Copy(a,0,l,e.length,a.length),l}}ChangesOverlap(e,a,c){if(m.Assert(e.originalStart<=a.originalStart,"Left change is not less than or equal to right change"),m.Assert(e.modifiedStart<=a.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=a.originalStart||e.modifiedStart+e.modifiedLength>=a.modifiedStart){const l=e.originalStart;let f=e.originalLength;const g=e.modifiedStart;let S=e.modifiedLength;return e.originalStart+e.originalLength>=a.originalStart&&(f=a.originalStart+a.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=a.modifiedStart&&(S=a.modifiedStart+a.modifiedLength-e.modifiedStart),c[0]=new M.DiffChange(l,f,g,S),!0}else return c[0]=null,!1}ClipDiagonalBound(e,a,c,l){if(e>=0&&e"u"}n.isUndefined=h;function o(g){return!w(g)}n.isDefined=o;function w(g){return h(g)||g===null}n.isUndefinedOrNull=w;function e(g,S){if(!g)throw new Error(S?`Unexpected type, expected '${S}'`:"Unexpected type")}n.assertType=e;function a(g){if(w(g))throw new Error("Assertion Failed: argument is undefined or null");return g}n.assertIsDefined=a;function c(g){return typeof g=="function"}n.isFunction=c;function l(g,S){const _=Math.min(g.length,S.length);for(let E=0;E<_;E++)f(g[E],S[E])}n.validateConstraints=l;function f(g,S){if(M(S)){if(typeof g!==S)throw new Error(`argument does not match constraint: typeof ${S}`)}else if(c(S)){try{if(g instanceof S)return}catch{}if(!w(g)&&g.constructor===S||S.length===1&&S.call(void 0,g)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}n.validateConstraint=f}),Y(X[40],J([0,1,25]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Codicon=n.getCodiconFontCharacters=void 0;const A=Object.create(null);function i(m,L){if((0,M.isString)(L)){const h=A[L];if(h===void 0)throw new Error(`${m} references an unknown codicon: ${L}`);L=h}return A[m]=L,{id:m}}function d(){return A}n.getCodiconFontCharacters=d,n.Codicon={add:i("add",6e4),plus:i("plus",6e4),gistNew:i("gist-new",6e4),repoCreate:i("repo-create",6e4),lightbulb:i("lightbulb",60001),lightBulb:i("light-bulb",60001),repo:i("repo",60002),repoDelete:i("repo-delete",60002),gistFork:i("gist-fork",60003),repoForked:i("repo-forked",60003),gitPullRequest:i("git-pull-request",60004),gitPullRequestAbandoned:i("git-pull-request-abandoned",60004),recordKeys:i("record-keys",60005),keyboard:i("keyboard",60005),tag:i("tag",60006),tagAdd:i("tag-add",60006),tagRemove:i("tag-remove",60006),gitPullRequestLabel:i("git-pull-request-label",60006),person:i("person",60007),personFollow:i("person-follow",60007),personOutline:i("person-outline",60007),personFilled:i("person-filled",60007),gitBranch:i("git-branch",60008),gitBranchCreate:i("git-branch-create",60008),gitBranchDelete:i("git-branch-delete",60008),sourceControl:i("source-control",60008),mirror:i("mirror",60009),mirrorPublic:i("mirror-public",60009),star:i("star",60010),starAdd:i("star-add",60010),starDelete:i("star-delete",60010),starEmpty:i("star-empty",60010),comment:i("comment",60011),commentAdd:i("comment-add",60011),alert:i("alert",60012),warning:i("warning",60012),search:i("search",60013),searchSave:i("search-save",60013),logOut:i("log-out",60014),signOut:i("sign-out",60014),logIn:i("log-in",60015),signIn:i("sign-in",60015),eye:i("eye",60016),eyeUnwatch:i("eye-unwatch",60016),eyeWatch:i("eye-watch",60016),circleFilled:i("circle-filled",60017),primitiveDot:i("primitive-dot",60017),closeDirty:i("close-dirty",60017),debugBreakpoint:i("debug-breakpoint",60017),debugBreakpointDisabled:i("debug-breakpoint-disabled",60017),debugHint:i("debug-hint",60017),primitiveSquare:i("primitive-square",60018),edit:i("edit",60019),pencil:i("pencil",60019),info:i("info",60020),issueOpened:i("issue-opened",60020),gistPrivate:i("gist-private",60021),gitForkPrivate:i("git-fork-private",60021),lock:i("lock",60021),mirrorPrivate:i("mirror-private",60021),close:i("close",60022),removeClose:i("remove-close",60022),x:i("x",60022),repoSync:i("repo-sync",60023),sync:i("sync",60023),clone:i("clone",60024),desktopDownload:i("desktop-download",60024),beaker:i("beaker",60025),microscope:i("microscope",60025),vm:i("vm",60026),deviceDesktop:i("device-desktop",60026),file:i("file",60027),fileText:i("file-text",60027),more:i("more",60028),ellipsis:i("ellipsis",60028),kebabHorizontal:i("kebab-horizontal",60028),mailReply:i("mail-reply",60029),reply:i("reply",60029),organization:i("organization",60030),organizationFilled:i("organization-filled",60030),organizationOutline:i("organization-outline",60030),newFile:i("new-file",60031),fileAdd:i("file-add",60031),newFolder:i("new-folder",60032),fileDirectoryCreate:i("file-directory-create",60032),trash:i("trash",60033),trashcan:i("trashcan",60033),history:i("history",60034),clock:i("clock",60034),folder:i("folder",60035),fileDirectory:i("file-directory",60035),symbolFolder:i("symbol-folder",60035),logoGithub:i("logo-github",60036),markGithub:i("mark-github",60036),github:i("github",60036),terminal:i("terminal",60037),console:i("console",60037),repl:i("repl",60037),zap:i("zap",60038),symbolEvent:i("symbol-event",60038),error:i("error",60039),stop:i("stop",60039),variable:i("variable",60040),symbolVariable:i("symbol-variable",60040),array:i("array",60042),symbolArray:i("symbol-array",60042),symbolModule:i("symbol-module",60043),symbolPackage:i("symbol-package",60043),symbolNamespace:i("symbol-namespace",60043),symbolObject:i("symbol-object",60043),symbolMethod:i("symbol-method",60044),symbolFunction:i("symbol-function",60044),symbolConstructor:i("symbol-constructor",60044),symbolBoolean:i("symbol-boolean",60047),symbolNull:i("symbol-null",60047),symbolNumeric:i("symbol-numeric",60048),symbolNumber:i("symbol-number",60048),symbolStructure:i("symbol-structure",60049),symbolStruct:i("symbol-struct",60049),symbolParameter:i("symbol-parameter",60050),symbolTypeParameter:i("symbol-type-parameter",60050),symbolKey:i("symbol-key",60051),symbolText:i("symbol-text",60051),symbolReference:i("symbol-reference",60052),goToFile:i("go-to-file",60052),symbolEnum:i("symbol-enum",60053),symbolValue:i("symbol-value",60053),symbolRuler:i("symbol-ruler",60054),symbolUnit:i("symbol-unit",60054),activateBreakpoints:i("activate-breakpoints",60055),archive:i("archive",60056),arrowBoth:i("arrow-both",60057),arrowDown:i("arrow-down",60058),arrowLeft:i("arrow-left",60059),arrowRight:i("arrow-right",60060),arrowSmallDown:i("arrow-small-down",60061),arrowSmallLeft:i("arrow-small-left",60062),arrowSmallRight:i("arrow-small-right",60063),arrowSmallUp:i("arrow-small-up",60064),arrowUp:i("arrow-up",60065),bell:i("bell",60066),bold:i("bold",60067),book:i("book",60068),bookmark:i("bookmark",60069),debugBreakpointConditionalUnverified:i("debug-breakpoint-conditional-unverified",60070),debugBreakpointConditional:i("debug-breakpoint-conditional",60071),debugBreakpointConditionalDisabled:i("debug-breakpoint-conditional-disabled",60071),debugBreakpointDataUnverified:i("debug-breakpoint-data-unverified",60072),debugBreakpointData:i("debug-breakpoint-data",60073),debugBreakpointDataDisabled:i("debug-breakpoint-data-disabled",60073),debugBreakpointLogUnverified:i("debug-breakpoint-log-unverified",60074),debugBreakpointLog:i("debug-breakpoint-log",60075),debugBreakpointLogDisabled:i("debug-breakpoint-log-disabled",60075),briefcase:i("briefcase",60076),broadcast:i("broadcast",60077),browser:i("browser",60078),bug:i("bug",60079),calendar:i("calendar",60080),caseSensitive:i("case-sensitive",60081),check:i("check",60082),checklist:i("checklist",60083),chevronDown:i("chevron-down",60084),dropDownButton:i("drop-down-button",60084),chevronLeft:i("chevron-left",60085),chevronRight:i("chevron-right",60086),chevronUp:i("chevron-up",60087),chromeClose:i("chrome-close",60088),chromeMaximize:i("chrome-maximize",60089),chromeMinimize:i("chrome-minimize",60090),chromeRestore:i("chrome-restore",60091),circle:i("circle",60092),circleOutline:i("circle-outline",60092),debugBreakpointUnverified:i("debug-breakpoint-unverified",60092),circleSlash:i("circle-slash",60093),circuitBoard:i("circuit-board",60094),clearAll:i("clear-all",60095),clippy:i("clippy",60096),closeAll:i("close-all",60097),cloudDownload:i("cloud-download",60098),cloudUpload:i("cloud-upload",60099),code:i("code",60100),collapseAll:i("collapse-all",60101),colorMode:i("color-mode",60102),commentDiscussion:i("comment-discussion",60103),compareChanges:i("compare-changes",60157),creditCard:i("credit-card",60105),dash:i("dash",60108),dashboard:i("dashboard",60109),database:i("database",60110),debugContinue:i("debug-continue",60111),debugDisconnect:i("debug-disconnect",60112),debugPause:i("debug-pause",60113),debugRestart:i("debug-restart",60114),debugStart:i("debug-start",60115),debugStepInto:i("debug-step-into",60116),debugStepOut:i("debug-step-out",60117),debugStepOver:i("debug-step-over",60118),debugStop:i("debug-stop",60119),debug:i("debug",60120),deviceCameraVideo:i("device-camera-video",60121),deviceCamera:i("device-camera",60122),deviceMobile:i("device-mobile",60123),diffAdded:i("diff-added",60124),diffIgnored:i("diff-ignored",60125),diffModified:i("diff-modified",60126),diffRemoved:i("diff-removed",60127),diffRenamed:i("diff-renamed",60128),diff:i("diff",60129),discard:i("discard",60130),editorLayout:i("editor-layout",60131),emptyWindow:i("empty-window",60132),exclude:i("exclude",60133),extensions:i("extensions",60134),eyeClosed:i("eye-closed",60135),fileBinary:i("file-binary",60136),fileCode:i("file-code",60137),fileMedia:i("file-media",60138),filePdf:i("file-pdf",60139),fileSubmodule:i("file-submodule",60140),fileSymlinkDirectory:i("file-symlink-directory",60141),fileSymlinkFile:i("file-symlink-file",60142),fileZip:i("file-zip",60143),files:i("files",60144),filter:i("filter",60145),flame:i("flame",60146),foldDown:i("fold-down",60147),foldUp:i("fold-up",60148),fold:i("fold",60149),folderActive:i("folder-active",60150),folderOpened:i("folder-opened",60151),gear:i("gear",60152),gift:i("gift",60153),gistSecret:i("gist-secret",60154),gist:i("gist",60155),gitCommit:i("git-commit",60156),gitCompare:i("git-compare",60157),gitMerge:i("git-merge",60158),githubAction:i("github-action",60159),githubAlt:i("github-alt",60160),globe:i("globe",60161),grabber:i("grabber",60162),graph:i("graph",60163),gripper:i("gripper",60164),heart:i("heart",60165),home:i("home",60166),horizontalRule:i("horizontal-rule",60167),hubot:i("hubot",60168),inbox:i("inbox",60169),issueClosed:i("issue-closed",60324),issueReopened:i("issue-reopened",60171),issues:i("issues",60172),italic:i("italic",60173),jersey:i("jersey",60174),json:i("json",60175),bracket:i("bracket",60175),kebabVertical:i("kebab-vertical",60176),key:i("key",60177),law:i("law",60178),lightbulbAutofix:i("lightbulb-autofix",60179),linkExternal:i("link-external",60180),link:i("link",60181),listOrdered:i("list-ordered",60182),listUnordered:i("list-unordered",60183),liveShare:i("live-share",60184),loading:i("loading",60185),location:i("location",60186),mailRead:i("mail-read",60187),mail:i("mail",60188),markdown:i("markdown",60189),megaphone:i("megaphone",60190),mention:i("mention",60191),milestone:i("milestone",60192),gitPullRequestMilestone:i("git-pull-request-milestone",60192),mortarBoard:i("mortar-board",60193),move:i("move",60194),multipleWindows:i("multiple-windows",60195),mute:i("mute",60196),noNewline:i("no-newline",60197),note:i("note",60198),octoface:i("octoface",60199),openPreview:i("open-preview",60200),package:i("package",60201),paintcan:i("paintcan",60202),pin:i("pin",60203),play:i("play",60204),run:i("run",60204),plug:i("plug",60205),preserveCase:i("preserve-case",60206),preview:i("preview",60207),project:i("project",60208),pulse:i("pulse",60209),question:i("question",60210),quote:i("quote",60211),radioTower:i("radio-tower",60212),reactions:i("reactions",60213),references:i("references",60214),refresh:i("refresh",60215),regex:i("regex",60216),remoteExplorer:i("remote-explorer",60217),remote:i("remote",60218),remove:i("remove",60219),replaceAll:i("replace-all",60220),replace:i("replace",60221),repoClone:i("repo-clone",60222),repoForcePush:i("repo-force-push",60223),repoPull:i("repo-pull",60224),repoPush:i("repo-push",60225),report:i("report",60226),requestChanges:i("request-changes",60227),rocket:i("rocket",60228),rootFolderOpened:i("root-folder-opened",60229),rootFolder:i("root-folder",60230),rss:i("rss",60231),ruby:i("ruby",60232),saveAll:i("save-all",60233),saveAs:i("save-as",60234),save:i("save",60235),screenFull:i("screen-full",60236),screenNormal:i("screen-normal",60237),searchStop:i("search-stop",60238),server:i("server",60240),settingsGear:i("settings-gear",60241),settings:i("settings",60242),shield:i("shield",60243),smiley:i("smiley",60244),sortPrecedence:i("sort-precedence",60245),splitHorizontal:i("split-horizontal",60246),splitVertical:i("split-vertical",60247),squirrel:i("squirrel",60248),starFull:i("star-full",60249),starHalf:i("star-half",60250),symbolClass:i("symbol-class",60251),symbolColor:i("symbol-color",60252),symbolCustomColor:i("symbol-customcolor",60252),symbolConstant:i("symbol-constant",60253),symbolEnumMember:i("symbol-enum-member",60254),symbolField:i("symbol-field",60255),symbolFile:i("symbol-file",60256),symbolInterface:i("symbol-interface",60257),symbolKeyword:i("symbol-keyword",60258),symbolMisc:i("symbol-misc",60259),symbolOperator:i("symbol-operator",60260),symbolProperty:i("symbol-property",60261),wrench:i("wrench",60261),wrenchSubaction:i("wrench-subaction",60261),symbolSnippet:i("symbol-snippet",60262),tasklist:i("tasklist",60263),telescope:i("telescope",60264),textSize:i("text-size",60265),threeBars:i("three-bars",60266),thumbsdown:i("thumbsdown",60267),thumbsup:i("thumbsup",60268),tools:i("tools",60269),triangleDown:i("triangle-down",60270),triangleLeft:i("triangle-left",60271),triangleRight:i("triangle-right",60272),triangleUp:i("triangle-up",60273),twitter:i("twitter",60274),unfold:i("unfold",60275),unlock:i("unlock",60276),unmute:i("unmute",60277),unverified:i("unverified",60278),verified:i("verified",60279),versions:i("versions",60280),vmActive:i("vm-active",60281),vmOutline:i("vm-outline",60282),vmRunning:i("vm-running",60283),watch:i("watch",60284),whitespace:i("whitespace",60285),wholeWord:i("whole-word",60286),window:i("window",60287),wordWrap:i("word-wrap",60288),zoomIn:i("zoom-in",60289),zoomOut:i("zoom-out",60290),listFilter:i("list-filter",60291),listFlat:i("list-flat",60292),listSelection:i("list-selection",60293),selection:i("selection",60293),listTree:i("list-tree",60294),debugBreakpointFunctionUnverified:i("debug-breakpoint-function-unverified",60295),debugBreakpointFunction:i("debug-breakpoint-function",60296),debugBreakpointFunctionDisabled:i("debug-breakpoint-function-disabled",60296),debugStackframeActive:i("debug-stackframe-active",60297),circleSmallFilled:i("circle-small-filled",60298),debugStackframeDot:i("debug-stackframe-dot",60298),debugStackframe:i("debug-stackframe",60299),debugStackframeFocused:i("debug-stackframe-focused",60299),debugBreakpointUnsupported:i("debug-breakpoint-unsupported",60300),symbolString:i("symbol-string",60301),debugReverseContinue:i("debug-reverse-continue",60302),debugStepBack:i("debug-step-back",60303),debugRestartFrame:i("debug-restart-frame",60304),callIncoming:i("call-incoming",60306),callOutgoing:i("call-outgoing",60307),menu:i("menu",60308),expandAll:i("expand-all",60309),feedback:i("feedback",60310),gitPullRequestReviewer:i("git-pull-request-reviewer",60310),groupByRefType:i("group-by-ref-type",60311),ungroupByRefType:i("ungroup-by-ref-type",60312),account:i("account",60313),gitPullRequestAssignee:i("git-pull-request-assignee",60313),bellDot:i("bell-dot",60314),debugConsole:i("debug-console",60315),library:i("library",60316),output:i("output",60317),runAll:i("run-all",60318),syncIgnored:i("sync-ignored",60319),pinned:i("pinned",60320),githubInverted:i("github-inverted",60321),debugAlt:i("debug-alt",60305),serverProcess:i("server-process",60322),serverEnvironment:i("server-environment",60323),pass:i("pass",60324),stopCircle:i("stop-circle",60325),playCircle:i("play-circle",60326),record:i("record",60327),debugAltSmall:i("debug-alt-small",60328),vmConnect:i("vm-connect",60329),cloud:i("cloud",60330),merge:i("merge",60331),exportIcon:i("export",60332),graphLeft:i("graph-left",60333),magnet:i("magnet",60334),notebook:i("notebook",60335),redo:i("redo",60336),checkAll:i("check-all",60337),pinnedDirty:i("pinned-dirty",60338),passFilled:i("pass-filled",60339),circleLargeFilled:i("circle-large-filled",60340),circleLarge:i("circle-large",60341),circleLargeOutline:i("circle-large-outline",60341),combine:i("combine",60342),gather:i("gather",60342),table:i("table",60343),variableGroup:i("variable-group",60344),typeHierarchy:i("type-hierarchy",60345),typeHierarchySub:i("type-hierarchy-sub",60346),typeHierarchySuper:i("type-hierarchy-super",60347),gitPullRequestCreate:i("git-pull-request-create",60348),runAbove:i("run-above",60349),runBelow:i("run-below",60350),notebookTemplate:i("notebook-template",60351),debugRerun:i("debug-rerun",60352),workspaceTrusted:i("workspace-trusted",60353),workspaceUntrusted:i("workspace-untrusted",60354),workspaceUnspecified:i("workspace-unspecified",60355),terminalCmd:i("terminal-cmd",60356),terminalDebian:i("terminal-debian",60357),terminalLinux:i("terminal-linux",60358),terminalPowershell:i("terminal-powershell",60359),terminalTmux:i("terminal-tmux",60360),terminalUbuntu:i("terminal-ubuntu",60361),terminalBash:i("terminal-bash",60362),arrowSwap:i("arrow-swap",60363),copy:i("copy",60364),personAdd:i("person-add",60365),filterFilled:i("filter-filled",60366),wand:i("wand",60367),debugLineByLine:i("debug-line-by-line",60368),inspect:i("inspect",60369),layers:i("layers",60370),layersDot:i("layers-dot",60371),layersActive:i("layers-active",60372),compass:i("compass",60373),compassDot:i("compass-dot",60374),compassActive:i("compass-active",60375),azure:i("azure",60376),issueDraft:i("issue-draft",60377),gitPullRequestClosed:i("git-pull-request-closed",60378),gitPullRequestDraft:i("git-pull-request-draft",60379),debugAll:i("debug-all",60380),debugCoverage:i("debug-coverage",60381),runErrors:i("run-errors",60382),folderLibrary:i("folder-library",60383),debugContinueSmall:i("debug-continue-small",60384),beakerStop:i("beaker-stop",60385),graphLine:i("graph-line",60386),graphScatter:i("graph-scatter",60387),pieChart:i("pie-chart",60388),bracketDot:i("bracket-dot",60389),bracketError:i("bracket-error",60390),lockSmall:i("lock-small",60391),azureDevops:i("azure-devops",60392),verifiedFilled:i("verified-filled",60393),newLine:i("newline",60394),layout:i("layout",60395),layoutActivitybarLeft:i("layout-activitybar-left",60396),layoutActivitybarRight:i("layout-activitybar-right",60397),layoutPanelLeft:i("layout-panel-left",60398),layoutPanelCenter:i("layout-panel-center",60399),layoutPanelJustify:i("layout-panel-justify",60400),layoutPanelRight:i("layout-panel-right",60401),layoutPanel:i("layout-panel",60402),layoutSidebarLeft:i("layout-sidebar-left",60403),layoutSidebarRight:i("layout-sidebar-right",60404),layoutStatusbar:i("layout-statusbar",60405),layoutMenubar:i("layout-menubar",60406),layoutCentered:i("layout-centered",60407),layoutSidebarRightOff:i("layout-sidebar-right-off",60416),layoutPanelOff:i("layout-panel-off",60417),layoutSidebarLeftOff:i("layout-sidebar-left-off",60418),target:i("target",60408),indent:i("indent",60409),recordSmall:i("record-small",60410),errorSmall:i("error-small",60411),arrowCircleDown:i("arrow-circle-down",60412),arrowCircleLeft:i("arrow-circle-left",60413),arrowCircleRight:i("arrow-circle-right",60414),arrowCircleUp:i("arrow-circle-up",60415),heartFilled:i("heart-filled",60420),map:i("map",60421),mapFilled:i("map-filled",60422),circleSmall:i("circle-small",60423),bellSlash:i("bell-slash",60424),bellSlashDot:i("bell-slash-dot",60425),commentUnresolved:i("comment-unresolved",60426),gitPullRequestGoToChanges:i("git-pull-request-go-to-changes",60427),gitPullRequestNewChanges:i("git-pull-request-new-changes",60428),searchFuzzy:i("search-fuzzy",60429),commentDraft:i("comment-draft",60430),send:i("send",60431),sparkle:i("sparkle",60432),insert:i("insert",60433),mic:i("mic",60434),dialogError:i("dialog-error","error"),dialogWarning:i("dialog-warning","warning"),dialogInfo:i("dialog-info","info"),dialogClose:i("dialog-close","close"),treeItemExpanded:i("tree-item-expanded","chevron-down"),treeFilterOnTypeOn:i("tree-filter-on-type-on","list-filter"),treeFilterOnTypeOff:i("tree-filter-on-type-off","list-selection"),treeFilterClear:i("tree-filter-clear","close"),treeItemLoading:i("tree-item-loading","loading"),menuSelection:i("menu-selection","check"),menuSubmenu:i("menu-submenu","chevron-right"),menuBarMore:i("menubar-more","more"),scrollbarButtonLeft:i("scrollbar-button-left","triangle-left"),scrollbarButtonRight:i("scrollbar-button-right","triangle-right"),scrollbarButtonUp:i("scrollbar-button-up","triangle-up"),scrollbarButtonDown:i("scrollbar-button-down","triangle-down"),toolBarMore:i("toolbar-more","more"),quickInputBack:i("quick-input-back","arrow-left")}}),Y(X[14],J([0,1,25]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createProxyObject=n.getAllMethodNames=n.getAllPropertyNames=n.equals=n.mixin=n.cloneAndChange=n.deepFreeze=n.deepClone=void 0;function A(c){if(!c||typeof c!="object"||c instanceof RegExp)return c;const l=Array.isArray(c)?[]:{};return Object.entries(c).forEach(([f,g])=>{l[f]=g&&typeof g=="object"?A(g):g}),l}n.deepClone=A;function i(c){if(!c||typeof c!="object")return c;const l=[c];for(;l.length>0;){const f=l.shift();Object.freeze(f);for(const g in f)if(d.call(f,g)){const S=f[g];typeof S=="object"&&!Object.isFrozen(S)&&!(0,M.isTypedArray)(S)&&l.push(S)}}return c}n.deepFreeze=i;const d=Object.prototype.hasOwnProperty;function m(c,l){return L(c,l,new Set)}n.cloneAndChange=m;function L(c,l,f){if((0,M.isUndefinedOrNull)(c))return c;const g=l(c);if(typeof g<"u")return g;if(Array.isArray(c)){const S=[];for(const _ of c)S.push(L(_,l,f));return S}if((0,M.isObject)(c)){if(f.has(c))throw new Error("Cannot clone recursive data-structure");f.add(c);const S={};for(const _ in c)d.call(c,_)&&(S[_]=L(c[_],l,f));return f.delete(c),S}return c}function h(c,l,f=!0){return(0,M.isObject)(c)?((0,M.isObject)(l)&&Object.keys(l).forEach(g=>{g in c?f&&((0,M.isObject)(c[g])&&(0,M.isObject)(l[g])?h(c[g],l[g],f):c[g]=l[g]):c[g]=l[g]}),c):l}n.mixin=h;function o(c,l){if(c===l)return!0;if(c==null||l===null||l===void 0||typeof c!=typeof l||typeof c!="object"||Array.isArray(c)!==Array.isArray(l))return!1;let f,g;if(Array.isArray(c)){if(c.length!==l.length)return!1;for(f=0;ffunction(){const _=Array.prototype.slice.call(arguments,0);return l(S,_)},g={};for(const S of c)g[S]=f(S);return g}n.createProxyObject=a}),Y(X[26],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.toUint32=n.toUint8=void 0;function M(i){return i<0?0:i>255?255:i|0}n.toUint8=M;function A(i){return i<0?0:i>4294967295?4294967295:i|0}n.toUint32=A}),Y(X[27],J([0,1,26]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterSet=n.CharacterClassifier=void 0;class A{constructor(m){const L=(0,M.toUint8)(m);this._defaultValue=L,this._asciiMap=A._createAsciiMap(L),this._map=new Map}static _createAsciiMap(m){const L=new Uint8Array(256);return L.fill(m),L}set(m,L){const h=(0,M.toUint8)(L);m>=0&&m<256?this._asciiMap[m]=h:this._map.set(m,h)}get(m){return m>=0&&m<256?this._asciiMap[m]:this._map.get(m)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}n.CharacterClassifier=A;class i{constructor(){this._actual=new A(0)}add(m){this._actual.set(m,1)}has(m){return this._actual.get(m)===1}clear(){return this._actual.clear()}}n.CharacterSet=i}),Y(X[3],J([0,1,5]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OffsetRangeSet=n.OffsetRange=void 0;class A{static addRange(m,L){let h=0;for(;hL))return new A(m,L)}static ofLength(m){return new A(0,m)}constructor(m,L){if(this.start=m,this.endExclusive=L,m>L)throw new M.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(m){return new A(this.start+m,this.endExclusive+m)}deltaStart(m){return new A(this.start+m,this.endExclusive)}deltaEnd(m){return new A(this.start,this.endExclusive+m)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(m){return this.start===m.start&&this.endExclusive===m.endExclusive}containsRange(m){return this.start<=m.start&&m.endExclusive<=this.endExclusive}contains(m){return this.start<=m&&m=this.endExclusive?this.start+(m-this.start)%this.length:m}forEach(m){for(let L=this.start;Lm.toString()).join(", ")}intersectsStrict(m){let L=0;for(;Lm+L.length,0)}}n.OffsetRangeSet=i}),Y(X[4],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Position=void 0;class M{constructor(i,d){this.lineNumber=i,this.column=d}with(i=this.lineNumber,d=this.column){return i===this.lineNumber&&d===this.column?this:new M(i,d)}delta(i=0,d=0){return this.with(this.lineNumber+i,this.column+d)}equals(i){return M.equals(this,i)}static equals(i,d){return!i&&!d?!0:!!i&&!!d&&i.lineNumber===d.lineNumber&&i.column===d.column}isBefore(i){return M.isBefore(this,i)}static isBefore(i,d){return i.lineNumberL||d===L&&m>h?(this.startLineNumber=L,this.startColumn=h,this.endLineNumber=d,this.endColumn=m):(this.startLineNumber=d,this.startColumn=m,this.endLineNumber=L,this.endColumn=h)}isEmpty(){return A.isEmpty(this)}static isEmpty(d){return d.startLineNumber===d.endLineNumber&&d.startColumn===d.endColumn}containsPosition(d){return A.containsPosition(this,d)}static containsPosition(d,m){return!(m.lineNumberd.endLineNumber||m.lineNumber===d.startLineNumber&&m.columnd.endColumn)}static strictContainsPosition(d,m){return!(m.lineNumberd.endLineNumber||m.lineNumber===d.startLineNumber&&m.column<=d.startColumn||m.lineNumber===d.endLineNumber&&m.column>=d.endColumn)}containsRange(d){return A.containsRange(this,d)}static containsRange(d,m){return!(m.startLineNumberd.endLineNumber||m.endLineNumber>d.endLineNumber||m.startLineNumber===d.startLineNumber&&m.startColumnd.endColumn)}strictContainsRange(d){return A.strictContainsRange(this,d)}static strictContainsRange(d,m){return!(m.startLineNumberd.endLineNumber||m.endLineNumber>d.endLineNumber||m.startLineNumber===d.startLineNumber&&m.startColumn<=d.startColumn||m.endLineNumber===d.endLineNumber&&m.endColumn>=d.endColumn)}plusRange(d){return A.plusRange(this,d)}static plusRange(d,m){let L,h,o,w;return m.startLineNumberd.endLineNumber?(o=m.endLineNumber,w=m.endColumn):m.endLineNumber===d.endLineNumber?(o=m.endLineNumber,w=Math.max(m.endColumn,d.endColumn)):(o=d.endLineNumber,w=d.endColumn),new A(L,h,o,w)}intersectRanges(d){return A.intersectRanges(this,d)}static intersectRanges(d,m){let L=d.startLineNumber,h=d.startColumn,o=d.endLineNumber,w=d.endColumn;const e=m.startLineNumber,a=m.startColumn,c=m.endLineNumber,l=m.endColumn;return Lc?(o=c,w=l):o===c&&(w=Math.min(w,l)),L>o||L===o&&h>w?null:new A(L,h,o,w)}equalsRange(d){return A.equalsRange(this,d)}static equalsRange(d,m){return!d&&!m?!0:!!d&&!!m&&d.startLineNumber===m.startLineNumber&&d.startColumn===m.startColumn&&d.endLineNumber===m.endLineNumber&&d.endColumn===m.endColumn}getEndPosition(){return A.getEndPosition(this)}static getEndPosition(d){return new M.Position(d.endLineNumber,d.endColumn)}getStartPosition(){return A.getStartPosition(this)}static getStartPosition(d){return new M.Position(d.startLineNumber,d.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(d,m){return new A(this.startLineNumber,this.startColumn,d,m)}setStartPosition(d,m){return new A(d,m,this.endLineNumber,this.endColumn)}collapseToStart(){return A.collapseToStart(this)}static collapseToStart(d){return new A(d.startLineNumber,d.startColumn,d.startLineNumber,d.startColumn)}collapseToEnd(){return A.collapseToEnd(this)}static collapseToEnd(d){return new A(d.endLineNumber,d.endColumn,d.endLineNumber,d.endColumn)}delta(d){return new A(this.startLineNumber+d,this.startColumn,this.endLineNumber+d,this.endColumn)}static fromPositions(d,m=d){return new A(d.lineNumber,d.column,m.lineNumber,m.column)}static lift(d){return d?new A(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn):null}static isIRange(d){return d&&typeof d.startLineNumber=="number"&&typeof d.startColumn=="number"&&typeof d.endLineNumber=="number"&&typeof d.endColumn=="number"}static areIntersectingOrTouching(d,m){return!(d.endLineNumberd.startLineNumber}toJSON(){return this}}n.Range=A}),Y(X[10],J([0,1,5,3,2,11]),function(T,n,M,A,i,d){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LineRangeSet=n.LineRange=void 0;class m{static fromRange(o){return new m(o.startLineNumber,o.endLineNumber)}static joinMany(o){if(o.length===0)return[];let w=new L(o[0].slice());for(let e=1;ew)throw new M.BugIndicatingError(`startLineNumber ${o} cannot be after endLineNumberExclusive ${w}`);this.startLineNumber=o,this.endLineNumberExclusive=w}contains(o){return this.startLineNumber<=o&&oa.endLineNumberExclusive>=o.startLineNumber),e=(0,d.findLastIdxMonotonous)(this._normalizedRanges,a=>a.startLineNumber<=o.endLineNumberExclusive)+1;if(w===e)this._normalizedRanges.splice(w,0,o);else if(w===e-1){const a=this._normalizedRanges[w];this._normalizedRanges[w]=a.join(o)}else{const a=this._normalizedRanges[w].join(this._normalizedRanges[e-1]).join(o);this._normalizedRanges.splice(w,e-w,a)}}contains(o){const w=(0,d.findLastMonotonous)(this._normalizedRanges,e=>e.startLineNumber<=o);return!!w&&w.endLineNumberExclusive>o}getUnion(o){if(this._normalizedRanges.length===0)return o;if(o._normalizedRanges.length===0)return this;const w=[];let e=0,a=0,c=null;for(;e=l.startLineNumber?c=new m(c.startLineNumber,Math.max(c.endLineNumberExclusive,l.endLineNumberExclusive)):(w.push(c),c=l)}return c!==null&&w.push(c),new L(w)}subtractFrom(o){const w=(0,d.findFirstIdxMonotonousOrArrLen)(this._normalizedRanges,l=>l.endLineNumberExclusive>=o.startLineNumber),e=(0,d.findLastIdxMonotonous)(this._normalizedRanges,l=>l.startLineNumber<=o.endLineNumberExclusive)+1;if(w===e)return new L([o]);const a=[];let c=o.startLineNumber;for(let l=w;lc&&a.push(new m(c,f.startLineNumber)),c=f.endLineNumberExclusive}return co.toString()).join(", ")}getIntersection(o){const w=[];let e=0,a=0;for(;ew.delta(o)))}}n.LineRangeSet=L}),Y(X[41],J([0,1,4,2]),function(T,n,M,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Selection=void 0;class i extends A.Range{constructor(m,L,h,o){super(m,L,h,o),this.selectionStartLineNumber=m,this.selectionStartColumn=L,this.positionLineNumber=h,this.positionColumn=o}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(m){return i.selectionsEqual(this,m)}static selectionsEqual(m,L){return m.selectionStartLineNumber===L.selectionStartLineNumber&&m.selectionStartColumn===L.selectionStartColumn&&m.positionLineNumber===L.positionLineNumber&&m.positionColumn===L.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(m,L){return this.getDirection()===0?new i(this.startLineNumber,this.startColumn,m,L):new i(m,L,this.startLineNumber,this.startColumn)}getPosition(){return new M.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new M.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(m,L){return this.getDirection()===0?new i(m,L,this.endLineNumber,this.endColumn):new i(this.endLineNumber,this.endColumn,m,L)}static fromPositions(m,L=m){return new i(m.lineNumber,m.column,L.lineNumber,L.column)}static fromRange(m,L){return L===0?new i(m.startLineNumber,m.startColumn,m.endLineNumber,m.endColumn):new i(m.endLineNumber,m.endColumn,m.startLineNumber,m.startColumn)}static liftSelection(m){return new i(m.selectionStartLineNumber,m.selectionStartColumn,m.positionLineNumber,m.positionColumn)}static selectionsArrEqual(m,L){if(m&&!L||!m&&L)return!1;if(!m&&!L)return!0;if(m.length!==L.length)return!1;for(let h=0,o=m.length;h(m.hasOwnProperty(L)||(m[L]=d(L)),m[L])}n.getMapForWordSeparators=i(d=>new A(d))}),Y(X[28],J([0,1,21,22]),function(T,n,M,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getWordAtText=n.ensureValidWordDefinition=n.DEFAULT_WORD_REGEXP=n.USUAL_WORD_SEPARATORS=void 0,n.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function i(o=""){let w="(-?\\d*\\.\\d\\w*)|([^";for(const e of n.USUAL_WORD_SEPARATORS)o.indexOf(e)>=0||(w+="\\"+e);return w+="\\s]+)",new RegExp(w,"g")}n.DEFAULT_WORD_REGEXP=i();function d(o){let w=n.DEFAULT_WORD_REGEXP;if(o&&o instanceof RegExp)if(o.global)w=o;else{let e="g";o.ignoreCase&&(e+="i"),o.multiline&&(e+="m"),o.unicode&&(e+="u"),w=new RegExp(o.source,e)}return w.lastIndex=0,w}n.ensureValidWordDefinition=d;const m=new A.LinkedList;m.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function L(o,w,e,a,c){if(c||(c=M.Iterable.first(m)),e.length>c.maxLen){let _=o-c.maxLen/2;return _<0?_=0:a+=_,e=e.substring(_,o+c.maxLen/2),L(o,w,e,a,c)}const l=Date.now(),f=o-1-a;let g=-1,S=null;for(let _=1;!(Date.now()-l>=c.timeBudget);_++){const E=f-c.windowSize*_;w.lastIndex=Math.max(0,E);const y=h(w,e,f,g);if(!y&&S||(S=y,E<=0))break;g=E}if(S){const _={word:S[0],startColumn:a+1+S.index,endColumn:a+1+S.index+S[0].length};return w.lastIndex=0,_}return null}n.getWordAtText=L;function h(o,w,e,a){let c;for(;c=o.exec(w);){const l=c.index||0;if(l<=e&&o.lastIndex>=e)return c;if(a>0&&l>a)return null}return null}}),Y(X[8],J([0,1,7,5,3]),function(T,n,M,A,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DateTimeout=n.InfiniteTimeout=n.OffsetPair=n.SequenceDiff=n.DiffAlgorithmResult=void 0;class d{static trivial(e,a){return new d([new m(i.OffsetRange.ofLength(e.length),i.OffsetRange.ofLength(a.length))],!1)}static trivialTimedOut(e,a){return new d([new m(i.OffsetRange.ofLength(e.length),i.OffsetRange.ofLength(a.length))],!0)}constructor(e,a){this.diffs=e,this.hitTimeout=a}}n.DiffAlgorithmResult=d;class m{static invert(e,a){const c=[];return(0,M.forEachAdjacent)(e,(l,f)=>{c.push(m.fromOffsetPairs(l?l.getEndExclusives():L.zero,f?f.getStarts():new L(a,(l?l.seq2Range.endExclusive-l.seq1Range.endExclusive:0)+a)))}),c}static fromOffsetPairs(e,a){return new m(new i.OffsetRange(e.offset1,a.offset1),new i.OffsetRange(e.offset2,a.offset2))}constructor(e,a){this.seq1Range=e,this.seq2Range=a}swap(){return new m(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new m(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new m(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new m(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new m(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const a=this.seq1Range.intersect(e.seq1Range),c=this.seq2Range.intersect(e.seq2Range);if(!(!a||!c))return new m(a,c)}getStarts(){return new L(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new L(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}n.SequenceDiff=m;class L{constructor(e,a){this.offset1=e,this.offset2=a}toString(){return`${this.offset1} <-> ${this.offset2}`}}n.OffsetPair=L,L.zero=new L(0,0),L.max=new L(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class h{isValid(){return!0}}n.InfiniteTimeout=h,h.instance=new h;class o{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new A.BugIndicatingError("timeout must be positive")}isValid(){if(!(Date.now()-this.startTimea.length||R>c.length)continue;const D=l(N,R);g.set(_,D);const k=N===b?S.get(_+1):S.get(_-1);if(S.set(_,D!==N?new d(k,N,R,D-N):k),g.get(_)===a.length&&g.get(_)-_===c.length)break e}}let E=S.get(_);const y=[];let v=a.length,r=c.length;for(;;){const s=E?E.x+E.length:0,u=E?E.y+E.length:0;if((s!==v||u!==r)&&y.push(new A.SequenceDiff(new M.OffsetRange(s,v),new M.OffsetRange(u,r))),!E)break;v=E.x,r=E.y,E=E.prev}return y.reverse(),new A.DiffAlgorithmResult(y,!1)}}n.MyersDiffAlgorithm=i;class d{constructor(o,w,e,a){this.prev=o,this.x=w,this.y=e,this.length=a}}class m{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(o){return o<0?(o=-o-1,this.negativeArr[o]):this.positiveArr[o]}set(o,w){if(o<0){if(o=-o-1,o>=this.negativeArr.length){const e=this.negativeArr;this.negativeArr=new Int32Array(e.length*2),this.negativeArr.set(e)}this.negativeArr[o]=w}else{if(o>=this.positiveArr.length){const e=this.positiveArr;this.positiveArr=new Int32Array(e.length*2),this.positiveArr.set(e)}this.positiveArr[o]=w}}}class L{constructor(){this.positiveArr=[],this.negativeArr=[]}get(o){return o<0?(o=-o-1,this.negativeArr[o]):this.positiveArr[o]}set(o,w){o<0?(o=-o-1,this.negativeArr[o]=w):this.positiveArr[o]=w}}}),Y(X[43],J([0,1,7,3,8]),function(T,n,M,A,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.removeVeryShortMatchingTextBetweenLongDiffs=n.removeVeryShortMatchingLinesBetweenDiffs=n.extendDiffsToEntireWordIfAppropriate=n.removeShortMatches=n.optimizeSequenceDiffs=void 0;function d(l,f,g){let S=g;return S=m(l,f,S),S=L(l,f,S),S}n.optimizeSequenceDiffs=d;function m(l,f,g){if(g.length===0)return g;const S=[];S.push(g[0]);for(let E=1;E0&&(v=v.delta(s))}_.push(v)}return S.length>0&&_.push(S[S.length-1]),_}function L(l,f,g){if(!l.getBoundaryScore||!f.getBoundaryScore)return g;for(let S=0;S0?g[S-1]:void 0,E=g[S],y=S+1=S.start&&l.seq2Range.start-y>=_.start&&g.isStronglyEqual(l.seq2Range.start-y,l.seq2Range.endExclusive-y)&&y<100;)y++;y--;let v=0;for(;l.seq1Range.start+vs&&(s=N,r=u)}return l.delta(r)}function o(l,f,g){const S=[];for(const _ of g){const E=S[S.length-1];if(!E){S.push(_);continue}_.seq1Range.start-E.seq1Range.endExclusive<=2||_.seq2Range.start-E.seq2Range.endExclusive<=2?S[S.length-1]=new i.SequenceDiff(E.seq1Range.join(_.seq1Range),E.seq2Range.join(_.seq2Range)):S.push(_)}return S}n.removeShortMatches=o;function w(l,f,g){const S=[];let _;function E(){if(!_)return;const v=_.s1Range.length-_.deleted,r=_.s2Range.length-_.added;Math.max(_.deleted,_.added)+(_.count-1)>v&&S.push(new i.SequenceDiff(_.s1Range,_.s2Range)),_=void 0}for(const v of g){let r=function(C,N){var R,D,k,U;if(!_||!_.s1Range.containsRange(C)||!_.s2Range.containsRange(N))if(_&&!(_.s1Range.endExclusive0||f.length>0;){const S=l[0],_=f[0];let E;S&&(!_||S.seq1Range.start<_.seq1Range.start)?E=l.shift():E=f.shift(),g.length>0&&g[g.length-1].seq1Range.endExclusive>=E.seq1Range.start?g[g.length-1]=g[g.length-1].join(E):g.push(E)}return g}function a(l,f,g){let S=g;if(S.length===0)return S;let _=0,E;do{E=!1;const y=[S[0]];for(let v=1;v5||C.seq1Range.length+C.seq2Range.length>5)};const r=S[v],s=y[y.length-1];u(s,r)?(E=!0,y[y.length-1]=y[y.length-1].join(r)):y.push(r)}S=y}while(_++<10&&E);return S}n.removeVeryShortMatchingLinesBetweenDiffs=a;function c(l,f,g){let S=g;if(S.length===0)return S;let _=0,E;do{E=!1;const v=[S[0]];for(let r=1;r5||R.length>500)return!1;const k=l.getText(R).trim();if(k.length>20||k.split(/\r\n|\r|\n/).length>1)return!1;const U=l.countLinesIn(C.seq1Range),I=C.seq1Range.length,B=f.countLinesIn(C.seq2Range),z=C.seq2Range.length,x=l.countLinesIn(N.seq1Range),O=N.seq1Range.length,F=f.countLinesIn(N.seq2Range),H=N.seq2Range.length,V=2*40+50;function t(ne){return Math.min(ne,V)}return Math.pow(Math.pow(t(U*40+I),1.5)+Math.pow(t(B*40+z),1.5),1.5)+Math.pow(Math.pow(t(x*40+O),1.5)+Math.pow(t(F*40+H),1.5),1.5)>Math.pow(Math.pow(V,1.5),1.5)*1.3};const s=S[r],u=v[v.length-1];p(u,s)?(E=!0,v[v.length-1]=v[v.length-1].join(s)):v.push(s)}S=v}while(_++<10&&E);const y=[];return(0,M.forEachWithNeighbors)(S,(v,r,s)=>{let u=r;function p(k){return k.length>0&&k.trim().length<=3&&r.seq1Range.length+r.seq2Range.length>100}const b=l.extendToFullLines(r.seq1Range),C=l.getText(new A.OffsetRange(b.start,r.seq1Range.start));p(C)&&(u=u.deltaStart(-C.length));const N=l.getText(new A.OffsetRange(r.seq1Range.endExclusive,b.endExclusive));p(N)&&(u=u.deltaEnd(N.length));const R=i.SequenceDiff.fromOffsetPairs(v?v.getEndExclusives():i.OffsetPair.zero,s?s.getStarts():i.OffsetPair.max),D=u.intersect(R);y.push(D)}),y}n.removeVeryShortMatchingTextBetweenLongDiffs=c}),Y(X[44],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LineSequence=void 0;class M{constructor(d,m){this.trimmedHash=d,this.lines=m}getElement(d){return this.trimmedHash[d]}get length(){return this.trimmedHash.length}getBoundaryScore(d){const m=d===0?0:A(this.lines[d-1]),L=d===this.lines.length?0:A(this.lines[d]);return 1e3-(m+L)}getText(d){return this.lines.slice(d.start,d.endExclusive).join(` -`)}isStronglyEqual(d,m){return this.lines[d]===this.lines[m]}}n.LineSequence=M;function A(i){let d=0;for(;d0&&v>0&&a.get(y-1,v-1)===3&&(u+=c.get(y-1,v-1)),u+=w?w(y,v):1):u=-1;const p=Math.max(r,s,u);if(p===u){const b=y>0&&v>0?c.get(y-1,v-1):0;c.set(y,v,b+1),a.set(y,v,3)}else p===r?(c.set(y,v,0),a.set(y,v,1)):p===s&&(c.set(y,v,0),a.set(y,v,2));e.set(y,v,p)}const l=[];let f=L.length,g=h.length;function S(y,v){(y+1!==f||v+1!==g)&&l.push(new A.SequenceDiff(new M.OffsetRange(y+1,f),new M.OffsetRange(v+1,g))),f=y,g=v}let _=L.length-1,E=h.length-1;for(;_>=0&&E>=0;)a.get(_,E)===3?(S(_,E),_--,E--):a.get(_,E)===1?_--:E--;return S(-1,-1),l.reverse(),new A.DiffAlgorithmResult(l,!1)}}n.DynamicProgrammingDiffing=d}),Y(X[30],J([0,1,11,3,4,2,15]),function(T,n,M,A,i,d,m){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.LinesSliceCharSequence=void 0;class L{constructor(c,l,f){this.lines=c,this.considerWhitespaceChanges=f,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let g=!1;l.start>0&&l.endExclusive>=c.length&&(l=new A.OffsetRange(l.start-1,l.endExclusive),g=!0),this.lineRange=l,this.firstCharOffsetByLine[0]=0;for(let S=this.lineRange.start;SString.fromCharCode(l)).join("")}getElement(c){return this.elements[c]}get length(){return this.elements.length}getBoundaryScore(c){const l=e(c>0?this.elements[c-1]:-1),f=e(cf<=c);return new i.Position(this.lineRange.start+l+1,c-this.firstCharOffsetByLine[l]+this.additionalOffsetByLine[l]+1)}translateRange(c){return d.Range.fromPositions(this.translateOffset(c.start),this.translateOffset(c.endExclusive))}findWordContaining(c){if(c<0||c>=this.elements.length||!h(this.elements[c]))return;let l=c;for(;l>0&&h(this.elements[l-1]);)l--;let f=c;for(;f_<=c.start))!==null&&l!==void 0?l:0,S=(f=(0,M.findFirstMonotonous)(this.firstCharOffsetByLine,_=>c.endExclusive<=_))!==null&&f!==void 0?f:this.elements.length;return new A.OffsetRange(g,S)}}n.LinesSliceCharSequence=L;function h(a){return a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57}const o={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:10,[7]:10};function w(a){return o[a]}function e(a){return a===10?7:a===13?6:(0,m.isSpace)(a)?5:a>=97&&a<=122?0:a>=65&&a<=90?1:a>=48&&a<=57?2:a===-1?3:4}}),Y(X[31],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MovedText=n.LinesDiff=void 0;class M{constructor(d,m,L){this.changes=d,this.moves=m,this.hitTimeout=L}}n.LinesDiff=M;class A{constructor(d,m){this.lineRangeMapping=d,this.changes=m}}n.MovedText=A}),Y(X[16],J([0,1,10]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RangeMapping=n.DetailedLineRangeMapping=n.LineRangeMapping=void 0;class A{static inverse(L,h,o){const w=[];let e=1,a=1;for(const l of L){const f=new i(new M.LineRange(e,l.original.startLineNumber),new M.LineRange(a,l.modified.startLineNumber),void 0);f.modified.isEmpty||w.push(f),e=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const c=new i(new M.LineRange(e,h+1),new M.LineRange(a,o+1),void 0);return c.modified.isEmpty||w.push(c),w}constructor(L,h){this.original=L,this.modified=h}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new A(this.modified,this.original)}join(L){return new A(this.original.join(L.original),this.modified.join(L.modified))}}n.LineRangeMapping=A;class i extends A{constructor(L,h,o){super(L,h),this.innerChanges=o}flip(){var L;return new i(this.modified,this.original,(L=this.innerChanges)===null||L===void 0?void 0:L.map(h=>h.flip()))}}n.DetailedLineRangeMapping=i;class d{constructor(L,h){this.originalRange=L,this.modifiedRange=h}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new d(this.modifiedRange,this.originalRange)}}n.RangeMapping=d}),Y(X[46],J([0,1,8,16,7,11,37,10,3,30,15,29]),function(T,n,M,A,i,d,m,L,h,o,w,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.computeMovedLines=void 0;function a(_,E,y,v,r,s){let{moves:u,excludedChanges:p}=c(_,E,y,s);if(!s.isValid())return[];const b=_.filter(N=>!p.has(N)),C=l(b,v,r,E,y,s);return(0,i.pushMany)(u,C),u=g(u),u=u.filter(N=>N.original.toOffsetRange().slice(E).map(D=>D.trim()).join(` -`).length>=10),u=S(_,u),u}n.computeMovedLines=a;function c(_,E,y,v){const r=[],s=_.filter(b=>b.modified.isEmpty&&b.original.length>=3).map(b=>new w.LineRangeFragment(b.original,E,b)),u=new Set(_.filter(b=>b.original.isEmpty&&b.modified.length>=3).map(b=>new w.LineRangeFragment(b.modified,y,b))),p=new Set;for(const b of s){let C=-1,N;for(const R of u){const D=b.computeSimilarity(R);D>C&&(C=D,N=R)}if(C>.9&&N&&(u.delete(N),r.push(new A.LineRangeMapping(b.range,N.range)),p.add(b.source),p.add(N.source)),!v.isValid())return{moves:r,excludedChanges:p}}return{moves:r,excludedChanges:p}}function l(_,E,y,v,r,s){const u=[],p=new m.SetMap;for(const D of _)for(let k=D.original.startLineNumber;kD.modified.startLineNumber,i.numberComparator));for(const D of _){let k=[];for(let U=D.modified.startLineNumber;U{for(const F of k)if(F.originalLineRange.endLineNumberExclusive+1===x.endLineNumberExclusive&&F.modifiedLineRange.endLineNumberExclusive+1===B.endLineNumberExclusive){F.originalLineRange=new L.LineRange(F.originalLineRange.startLineNumber,x.endLineNumberExclusive),F.modifiedLineRange=new L.LineRange(F.modifiedLineRange.startLineNumber,B.endLineNumberExclusive),z.push(F);return}const O={modifiedLineRange:B,originalLineRange:x};b.push(O),z.push(O)}),k=z}if(!s.isValid())return[]}b.sort((0,i.reverseOrder)((0,i.compareBy)(D=>D.modifiedLineRange.length,i.numberComparator)));const C=new L.LineRangeSet,N=new L.LineRangeSet;for(const D of b){const k=D.modifiedLineRange.startLineNumber-D.originalLineRange.startLineNumber,U=C.subtractFrom(D.modifiedLineRange),I=N.subtractFrom(D.originalLineRange).getWithDelta(k),B=U.getIntersection(I);for(const z of B.ranges){if(z.length<3)continue;const x=z,O=z.delta(-k);u.push(new A.LineRangeMapping(O,x)),C.addRange(x),N.addRange(O)}}u.sort((0,i.compareBy)(D=>D.original.startLineNumber,i.numberComparator));const R=new d.MonotonousArray(_);for(let D=0;DV.original.startLineNumber<=k.original.startLineNumber),I=(0,d.findLastMonotonous)(_,V=>V.modified.startLineNumber<=k.modified.startLineNumber),B=Math.max(k.original.startLineNumber-U.original.startLineNumber,k.modified.startLineNumber-I.modified.startLineNumber),z=R.findLastMonotonous(V=>V.original.startLineNumberV.modified.startLineNumberv.length||t>r.length||C.contains(t)||N.contains(V)||!f(v[V-1],r[t-1],s))break}F>0&&(N.addRange(new L.LineRange(k.original.startLineNumber-F,k.original.startLineNumber)),C.addRange(new L.LineRange(k.modified.startLineNumber-F,k.modified.startLineNumber)));let H;for(H=0;Hv.length||t>r.length||C.contains(t)||N.contains(V)||!f(v[V-1],r[t-1],s))break}H>0&&(N.addRange(new L.LineRange(k.original.endLineNumberExclusive,k.original.endLineNumberExclusive+H)),C.addRange(new L.LineRange(k.modified.endLineNumberExclusive,k.modified.endLineNumberExclusive+H))),(F>0||H>0)&&(u[D]=new A.LineRangeMapping(new L.LineRange(k.original.startLineNumber-F,k.original.endLineNumberExclusive+H),new L.LineRange(k.modified.startLineNumber-F,k.modified.endLineNumberExclusive+H)))}return u}function f(_,E,y){if(_.trim()===E.trim())return!0;if(_.length>300&&E.length>300)return!1;const r=new e.MyersDiffAlgorithm().compute(new o.LinesSliceCharSequence([_],new h.OffsetRange(0,1),!1),new o.LinesSliceCharSequence([E],new h.OffsetRange(0,1),!1),y);let s=0;const u=M.SequenceDiff.invert(r.diffs,_.length);for(const N of u)N.seq1Range.forEach(R=>{(0,w.isSpace)(_.charCodeAt(R))||s++});function p(N){let R=0;for(let D=0;D<_.length;D++)(0,w.isSpace)(N.charCodeAt(D))||R++;return R}const b=p(_.length>E.length?_:E);return s/b>.6&&b>10}function g(_){if(_.length===0)return _;_.sort((0,i.compareBy)(y=>y.original.startLineNumber,i.numberComparator));const E=[_[0]];for(let y=1;y<_.length;y++){const v=E[E.length-1],r=_[y],s=r.original.startLineNumber-v.original.endLineNumberExclusive,u=r.modified.startLineNumber-v.modified.endLineNumberExclusive;if(s>=0&&u>=0&&s+u<=2){E[E.length-1]=v.join(r);continue}E.push(r)}return E}function S(_,E){const y=new d.MonotonousArray(_);return E=E.filter(v=>{const r=y.findLastMonotonous(p=>p.original.endLineNumberExclusivep.modified.endLineNumberExclusiveV===t))return new a.LinesDiff([],[],!1);if(y.length===1&&y[0].length===0||v.length===1&&v[0].length===0)return new a.LinesDiff([new c.DetailedLineRangeMapping(new i.LineRange(1,y.length+1),new i.LineRange(1,v.length+1),[new c.RangeMapping(new m.Range(1,1,y.length,y[0].length+1),new m.Range(1,1,v.length,v[0].length+1))])],[],!1);const s=r.maxComputationTimeMs===0?L.InfiniteTimeout.instance:new L.DateTimeout(r.maxComputationTimeMs),u=!r.ignoreTrimWhitespace,p=new Map;function b(V){let t=p.get(V);return t===void 0&&(t=p.size,p.set(V,t)),t}const C=y.map(V=>b(V.trim())),N=v.map(V=>b(V.trim())),R=new f.LineSequence(C,y),D=new f.LineSequence(N,v),k=(()=>R.length+D.length<1700?this.dynamicProgrammingDiffing.compute(R,D,s,(V,t)=>y[V]===v[t]?v[t].length===0?.1:1+Math.log(1+v[t].length):.99):this.myersDiffingAlgorithm.compute(R,D))();let U=k.diffs,I=k.hitTimeout;U=(0,e.optimizeSequenceDiffs)(R,D,U),U=(0,e.removeVeryShortMatchingLinesBetweenDiffs)(R,D,U);const B=[],z=V=>{if(u)for(let t=0;tV.seq1Range.start-x===V.seq2Range.start-O);const t=V.seq1Range.start-x;z(t),x=V.seq1Range.endExclusive,O=V.seq2Range.endExclusive;const ne=this.refineDiff(y,v,V,s,u);ne.hitTimeout&&(I=!0);for(const re of ne.mappings)B.push(re)}z(y.length-x);const F=S(B,y,v);let H=[];return r.computeMoves&&(H=this.computeMoves(F,y,v,C,N,s,u)),(0,A.assertFn)(()=>{function V(ne,re){if(ne.lineNumber<1||ne.lineNumber>re.length)return!1;const le=re[ne.lineNumber-1];return!(ne.column<1||ne.column>le.length+1)}function t(ne,re){return!(ne.startLineNumber<1||ne.startLineNumber>re.length+1||ne.endLineNumberExclusive<1||ne.endLineNumberExclusive>re.length+1)}for(const ne of F){if(!ne.innerChanges)return!1;for(const re of ne.innerChanges)if(!(V(re.modifiedRange.getStartPosition(),v)&&V(re.modifiedRange.getEndPosition(),v)&&V(re.originalRange.getStartPosition(),y)&&V(re.originalRange.getEndPosition(),y)))return!1;if(!t(ne.modified,v)||!t(ne.original,y))return!1}return!0}),new a.LinesDiff(F,H,I)}computeMoves(y,v,r,s,u,p,b){return(0,w.computeMovedLines)(y,v,r,s,u,p).map(R=>{const D=this.refineDiff(v,r,new L.SequenceDiff(R.original.toOffsetRange(),R.modified.toOffsetRange()),p,b),k=S(D.mappings,v,r,!0);return new a.MovedText(R,k)})}refineDiff(y,v,r,s,u){const p=new l.LinesSliceCharSequence(y,r.seq1Range,u),b=new l.LinesSliceCharSequence(v,r.seq2Range,u),C=p.length+b.length<500?this.dynamicProgrammingDiffing.compute(p,b,s):this.myersDiffingAlgorithm.compute(p,b,s);let N=C.diffs;return N=(0,e.optimizeSequenceDiffs)(p,b,N),N=(0,e.extendDiffsToEntireWordIfAppropriate)(p,b,N),N=(0,e.removeShortMatches)(p,b,N),N=(0,e.removeVeryShortMatchingTextBetweenLongDiffs)(p,b,N),{mappings:N.map(D=>new c.RangeMapping(p.translateRange(D.seq1Range),b.translateRange(D.seq2Range))),hitTimeout:C.hitTimeout}}}n.DefaultLinesDiffComputer=g;function S(E,y,v,r=!1){const s=[];for(const u of(0,M.groupAdjacentBy)(E.map(p=>_(p,y,v)),(p,b)=>p.original.overlapOrTouch(b.original)||p.modified.overlapOrTouch(b.modified))){const p=u[0],b=u[u.length-1];s.push(new c.DetailedLineRangeMapping(p.original.join(b.original),p.modified.join(b.modified),u.map(C=>C.innerChanges[0])))}return(0,A.assertFn)(()=>!r&&s.length>0&&s[0].original.startLineNumber!==s[0].modified.startLineNumber?!1:(0,A.checkAdjacentItems)(s,(u,p)=>p.original.startLineNumber-u.original.endLineNumberExclusive===p.modified.startLineNumber-u.modified.endLineNumberExclusive&&u.original.endLineNumberExclusive=v[E.modifiedRange.startLineNumber-1].length&&E.originalRange.startColumn-1>=y[E.originalRange.startLineNumber-1].length&&E.originalRange.startLineNumber<=E.originalRange.endLineNumber+s&&E.modifiedRange.startLineNumber<=E.modifiedRange.endLineNumber+s&&(r=1);const u=new i.LineRange(E.originalRange.startLineNumber+r,E.originalRange.endLineNumber+1+s),p=new i.LineRange(E.modifiedRange.startLineNumber+r,E.modifiedRange.endLineNumber+1+s);return new c.DetailedLineRangeMapping(u,p,[E])}n.getLineRangeMapping=_}),Y(X[48],J([0,1,24,31,16,6,2,12,10]),function(T,n,M,A,i,d,m,L,h){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DiffComputer=n.LegacyLinesDiffComputer=void 0;const o=3;class w{computeDiff(r,s,u){var p;const C=new S(r,s,{maxComputationTime:u.maxComputationTimeMs,shouldIgnoreTrimWhitespace:u.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),N=[];let R=null;for(const D of C.changes){let k;D.originalEndLineNumber===0?k=new h.LineRange(D.originalStartLineNumber+1,D.originalStartLineNumber+1):k=new h.LineRange(D.originalStartLineNumber,D.originalEndLineNumber+1);let U;D.modifiedEndLineNumber===0?U=new h.LineRange(D.modifiedStartLineNumber+1,D.modifiedStartLineNumber+1):U=new h.LineRange(D.modifiedStartLineNumber,D.modifiedEndLineNumber+1);let I=new i.DetailedLineRangeMapping(k,U,(p=D.charChanges)===null||p===void 0?void 0:p.map(B=>new i.RangeMapping(new m.Range(B.originalStartLineNumber,B.originalStartColumn,B.originalEndLineNumber,B.originalEndColumn),new m.Range(B.modifiedStartLineNumber,B.modifiedStartColumn,B.modifiedEndLineNumber,B.modifiedEndColumn))));R&&(R.modified.endLineNumberExclusive===I.modified.startLineNumber||R.original.endLineNumberExclusive===I.original.startLineNumber)&&(I=new i.DetailedLineRangeMapping(R.original.join(I.original),R.modified.join(I.modified),R.innerChanges&&I.innerChanges?R.innerChanges.concat(I.innerChanges):void 0),N.pop()),N.push(I),R=I}return(0,L.assertFn)(()=>(0,L.checkAdjacentItems)(N,(D,k)=>k.original.startLineNumber-D.original.endLineNumberExclusive===k.modified.startLineNumber-D.modified.endLineNumberExclusive&&D.original.endLineNumberExclusive(r===10?"\\n":String.fromCharCode(r))+`-(${this._lineNumbers[s]},${this._columns[s]})`).join(", ")+"]"}_assertIndex(r,s){if(r<0||r>=s.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(r){return r>0&&r===this._lineNumbers.length?this.getEndLineNumber(r-1):(this._assertIndex(r,this._lineNumbers),this._lineNumbers[r])}getEndLineNumber(r){return r===-1?this.getStartLineNumber(r+1):(this._assertIndex(r,this._lineNumbers),this._charCodes[r]===10?this._lineNumbers[r]+1:this._lineNumbers[r])}getStartColumn(r){return r>0&&r===this._columns.length?this.getEndColumn(r-1):(this._assertIndex(r,this._columns),this._columns[r])}getEndColumn(r){return r===-1?this.getStartColumn(r+1):(this._assertIndex(r,this._columns),this._charCodes[r]===10?1:this._columns[r]+1)}}class l{constructor(r,s,u,p,b,C,N,R){this.originalStartLineNumber=r,this.originalStartColumn=s,this.originalEndLineNumber=u,this.originalEndColumn=p,this.modifiedStartLineNumber=b,this.modifiedStartColumn=C,this.modifiedEndLineNumber=N,this.modifiedEndColumn=R}static createFromDiffChange(r,s,u){const p=s.getStartLineNumber(r.originalStart),b=s.getStartColumn(r.originalStart),C=s.getEndLineNumber(r.originalStart+r.originalLength-1),N=s.getEndColumn(r.originalStart+r.originalLength-1),R=u.getStartLineNumber(r.modifiedStart),D=u.getStartColumn(r.modifiedStart),k=u.getEndLineNumber(r.modifiedStart+r.modifiedLength-1),U=u.getEndColumn(r.modifiedStart+r.modifiedLength-1);return new l(p,b,C,N,R,D,k,U)}}function f(v){if(v.length<=1)return v;const r=[v[0]];let s=r[0];for(let u=1,p=v.length;u0&&s.originalLength<20&&s.modifiedLength>0&&s.modifiedLength<20&&b()){const B=u.createCharSequence(r,s.originalStart,s.originalStart+s.originalLength-1),z=p.createCharSequence(r,s.modifiedStart,s.modifiedStart+s.modifiedLength-1);if(B.getElements().length>0&&z.getElements().length>0){let x=e(B,z,b,!0).changes;N&&(x=f(x)),I=[];for(let O=0,F=x.length;O1&&x>1;){const O=I.charCodeAt(z-2),F=B.charCodeAt(x-2);if(O!==F)break;z--,x--}(z>1||x>1)&&this._pushTrimWhitespaceCharChange(p,b+1,1,z,C+1,1,x)}{let z=E(I,1),x=E(B,1);const O=I.length+1,F=B.length+1;for(;z!0;const r=Date.now();return()=>Date.now()-rnew M.LegacyLinesDiffComputer,getDefault:()=>new A.DefaultLinesDiffComputer}}),Y(X[50],J([0,1,33]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.computeDefaultDocumentColors=void 0;function A(a){const c=[];for(const l of a){const f=Number(l);(f||f===0&&l.replace(/\s/g,"")!=="")&&c.push(f)}return c}function i(a,c,l,f){return{red:a/255,blue:l/255,green:c/255,alpha:f}}function d(a,c){const l=c.index,f=c[0].length;if(!l)return;const g=a.positionAt(l);return{startLineNumber:g.lineNumber,startColumn:g.column,endLineNumber:g.lineNumber,endColumn:g.column+f}}function m(a,c){if(!a)return;const l=M.Color.Format.CSS.parseHex(c);if(l)return{range:a,color:i(l.rgba.r,l.rgba.g,l.rgba.b,l.rgba.a)}}function L(a,c,l){if(!a||c.length!==1)return;const g=c[0].values(),S=A(g);return{range:a,color:i(S[0],S[1],S[2],l?S[3]:1)}}function h(a,c,l){if(!a||c.length!==1)return;const g=c[0].values(),S=A(g),_=new M.Color(new M.HSLA(S[0],S[1]/100,S[2]/100,l?S[3]:1));return{range:a,color:i(_.rgba.r,_.rgba.g,_.rgba.b,_.rgba.a)}}function o(a,c){return typeof a=="string"?[...a.matchAll(c)]:a.findMatches(c)}function w(a){const c=[],f=o(a,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(f.length>0)for(const g of f){const S=g.filter(v=>v!==void 0),_=S[1],E=S[2];if(!E)continue;let y;if(_==="rgb"){const v=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;y=L(d(a,g),o(E,v),!1)}else if(_==="rgba"){const v=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;y=L(d(a,g),o(E,v),!0)}else if(_==="hsl"){const v=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;y=h(d(a,g),o(E,v),!1)}else if(_==="hsla"){const v=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;y=h(d(a,g),o(E,v),!0)}else _==="#"&&(y=m(d(a,g),_+E));y&&c.push(y)}return c}function e(a){return!a||typeof a.getValue!="function"||typeof a.positionAt!="function"?[]:w(a)}n.computeDefaultDocumentColors=e}),Y(X[51],J([0,1,27]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.computeLinks=n.LinkComputer=n.StateMachine=void 0;class A{constructor(a,c,l){const f=new Uint8Array(a*c);for(let g=0,S=a*c;gc&&(c=E),_>l&&(l=_),y>l&&(l=y)}c++,l++;const f=new A(l,c,0);for(let g=0,S=a.length;g=this._maxCharCode?0:this._states.get(a,c)}}n.StateMachine=i;let d=null;function m(){return d===null&&(d=new i([[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]])),d}let L=null;function h(){if(L===null){L=new M.CharacterClassifier(0);const e=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let c=0;cf);if(f>0){const _=c.charCodeAt(f-1),E=c.charCodeAt(S);(_===40&&E===41||_===91&&E===93||_===123&&E===125)&&S--}return{range:{startLineNumber:l,startColumn:f+1,endLineNumber:l,endColumn:S+2},url:c.substring(f,S+1)}}static computeLinks(a,c=m()){const l=h(),f=[];for(let g=1,S=a.getLineCount();g<=S;g++){const _=a.getLineContent(g),E=_.length;let y=0,v=0,r=0,s=1,u=!1,p=!1,b=!1,C=!1;for(;y=0?(L+=m?1:-1,L<0?L=i.length-1:L%=i.length,i[L]):null}}n.BasicInplaceReplace=M,M.INSTANCE=new M}),Y(X[53],J([0,1,14]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.shouldSynchronizeModel=n.ApplyEditsResult=n.SearchData=n.ValidAnnotatedEditOperation=n.isITextSnapshot=n.FindMatch=n.TextModelResolvedOptions=n.InjectedTextCursorStops=n.MinimapPosition=n.GlyphMarginLane=n.OverviewRulerLane=void 0;var A;(function(l){l[l.Left=1]="Left",l[l.Center=2]="Center",l[l.Right=4]="Right",l[l.Full=7]="Full"})(A||(n.OverviewRulerLane=A={}));var i;(function(l){l[l.Left=1]="Left",l[l.Right=2]="Right"})(i||(n.GlyphMarginLane=i={}));var d;(function(l){l[l.Inline=1]="Inline",l[l.Gutter=2]="Gutter"})(d||(n.MinimapPosition=d={}));var m;(function(l){l[l.Both=0]="Both",l[l.Right=1]="Right",l[l.Left=2]="Left",l[l.None=3]="None"})(m||(n.InjectedTextCursorStops=m={}));class L{get originalIndentSize(){return this._indentSizeIsTabSize?"tabSize":this.indentSize}constructor(f){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,f.tabSize|0),f.indentSize==="tabSize"?(this.indentSize=this.tabSize,this._indentSizeIsTabSize=!0):(this.indentSize=Math.max(1,f.indentSize|0),this._indentSizeIsTabSize=!1),this.insertSpaces=!!f.insertSpaces,this.defaultEOL=f.defaultEOL|0,this.trimAutoWhitespace=!!f.trimAutoWhitespace,this.bracketPairColorizationOptions=f.bracketPairColorizationOptions}equals(f){return this.tabSize===f.tabSize&&this._indentSizeIsTabSize===f._indentSizeIsTabSize&&this.indentSize===f.indentSize&&this.insertSpaces===f.insertSpaces&&this.defaultEOL===f.defaultEOL&&this.trimAutoWhitespace===f.trimAutoWhitespace&&(0,M.equals)(this.bracketPairColorizationOptions,f.bracketPairColorizationOptions)}createChangeEvent(f){return{tabSize:this.tabSize!==f.tabSize,indentSize:this.indentSize!==f.indentSize,insertSpaces:this.insertSpaces!==f.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==f.trimAutoWhitespace}}}n.TextModelResolvedOptions=L;class h{constructor(f,g){this._findMatchBrand=void 0,this.range=f,this.matches=g}}n.FindMatch=h;function o(l){return l&&typeof l.read=="function"}n.isITextSnapshot=o;class w{constructor(f,g,S,_,E,y){this.identifier=f,this.range=g,this.text=S,this.forceMoveMarkers=_,this.isAutoWhitespaceEdit=E,this._isTracked=y}}n.ValidAnnotatedEditOperation=w;class e{constructor(f,g,S){this.regex=f,this.wordSeparators=g,this.simpleSearch=S}}n.SearchData=e;class a{constructor(f,g,S){this.reverseEdits=f,this.changes=g,this.trimAutoWhitespaceLineNumbers=S}}n.ApplyEditsResult=a;function c(l){return!l.isTooLargeForSyncing()&&!l.isForSimpleWidget}n.shouldSynchronizeModel=c}),Y(X[54],J([0,1,7,26]),function(T,n,M,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.PrefixSumIndexOfResult=n.ConstantTimePrefixSumComputer=n.PrefixSumComputer=void 0;class i{constructor(h){this.values=h,this.prefixSum=new Uint32Array(h.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(h,o){h=(0,A.toUint32)(h);const w=this.values,e=this.prefixSum,a=o.length;return a===0?!1:(this.values=new Uint32Array(w.length+a),this.values.set(w.subarray(0,h),0),this.values.set(w.subarray(h),h+a),this.values.set(o,h),h-1=0&&this.prefixSum.set(e.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(h,o){return h=(0,A.toUint32)(h),o=(0,A.toUint32)(o),this.values[h]===o?!1:(this.values[h]=o,h-1=w.length)return!1;const a=w.length-h;return o>=a&&(o=a),o===0?!1:(this.values=new Uint32Array(w.length-o),this.values.set(w.subarray(0,h),0),this.values.set(w.subarray(h+o),h),this.prefixSum=new Uint32Array(this.values.length),h-1=0&&this.prefixSum.set(e.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(h){return h<0?0:(h=(0,A.toUint32)(h),this._getPrefixSum(h))}_getPrefixSum(h){if(h<=this.prefixSumValidIndex[0])return this.prefixSum[h];let o=this.prefixSumValidIndex[0]+1;o===0&&(this.prefixSum[0]=this.values[0],o++),h>=this.values.length&&(h=this.values.length-1);for(let w=o;w<=h;w++)this.prefixSum[w]=this.prefixSum[w-1]+this.values[w];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],h),this.prefixSum[h]}getIndexOf(h){h=Math.floor(h),this.getTotalSum();let o=0,w=this.values.length-1,e=0,a=0,c=0;for(;o<=w;)if(e=o+(w-o)/2|0,a=this.prefixSum[e],c=a-this.values[e],h=a)o=e+1;else break;return new m(e,h-c)}}n.PrefixSumComputer=i;class d{constructor(h){this._values=h,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(h){return this._ensureValid(),h===0?0:this._prefixSum[h-1]}getIndexOf(h){this._ensureValid();const o=this._indexBySum[h],w=o>0?this._prefixSum[o-1]:0;return new m(o,h-w)}removeValues(h,o){this._values.splice(h,o),this._invalidate(h)}insertValues(h,o){this._values=(0,M.arrayInsert)(this._values,h,o),this._invalidate(h)}_invalidate(h){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,h-1)}_ensureValid(){if(!this._isValid){for(let h=this._validEndIndex+1,o=this._values.length;h0?this._prefixSum[h-1]:0;this._prefixSum[h]=e+w;for(let a=0;a=0;let E=null;try{E=M.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:_,global:!0,unicode:!0})}catch{return null}if(!E)return null;let y=!this.isRegex&&!_;return y&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(y=this.matchCase),new m.SearchData(E,this.wordSeparators?(0,A.getMapForWordSeparators)(this.wordSeparators):null,y?this.searchString:null)}}n.SearchParams=h;function o(S){if(!S||S.length===0)return!1;for(let _=0,E=S.length;_=E)break;const v=S.charCodeAt(_);if(v===110||v===114||v===87)return!0}}return!1}n.isMultilineRegexSource=o;function w(S,_,E){if(!E)return new m.FindMatch(S,null);const y=[];for(let v=0,r=_.length;v>0);E[r]>=_?v=r-1:E[r+1]>=_?(y=r,v=r):y=r+1}return y+1}}class a{static findMatches(_,E,y,v,r){const s=E.parseSearchRequest();return s?s.regex.multiline?this._doFindMatchesMultiline(_,y,new g(s.wordSeparators,s.regex),v,r):this._doFindMatchesLineByLine(_,y,s,v,r):[]}static _getMultilineMatchRange(_,E,y,v,r,s){let u,p=0;v?(p=v.findLineFeedCountBeforeOffset(r),u=E+r+p):u=E+r;let b;if(v){const D=v.findLineFeedCountBeforeOffset(r+s.length)-p;b=u+s.length+D}else b=u+s.length;const C=_.getPositionAt(u),N=_.getPositionAt(b);return new d.Range(C.lineNumber,C.column,N.lineNumber,N.column)}static _doFindMatchesMultiline(_,E,y,v,r){const s=_.getOffsetAt(E.getStartPosition()),u=_.getValueInRange(E,1),p=_.getEOL()===`\r -`?new e(u):null,b=[];let C=0,N;for(y.reset(0);N=y.next(u);)if(b[C++]=w(this._getMultilineMatchRange(_,s,u,p,N.index,N[0]),N,v),C>=r)return b;return b}static _doFindMatchesLineByLine(_,E,y,v,r){const s=[];let u=0;if(E.startLineNumber===E.endLineNumber){const b=_.getLineContent(E.startLineNumber).substring(E.startColumn-1,E.endColumn-1);return u=this._findMatchesInLine(y,b,E.startLineNumber,E.startColumn-1,u,s,v,r),s}const p=_.getLineContent(E.startLineNumber).substring(E.startColumn-1);u=this._findMatchesInLine(y,p,E.startLineNumber,E.startColumn-1,u,s,v,r);for(let b=E.startLineNumber+1;b=p))return r;return r}const C=new g(_.wordSeparators,_.regex);let N;C.reset(0);do if(N=C.next(E),N&&(s[r++]=w(new d.Range(y,N.index+1+v,y,N.index+1+N[0].length+v),N,u),r>=p))return r;while(N);return r}static findNextMatch(_,E,y,v){const r=E.parseSearchRequest();if(!r)return null;const s=new g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(_,y,s,v):this._doFindNextMatchLineByLine(_,y,s,v)}static _doFindNextMatchMultiline(_,E,y,v){const r=new i.Position(E.lineNumber,1),s=_.getOffsetAt(r),u=_.getLineCount(),p=_.getValueInRange(new d.Range(r.lineNumber,r.column,u,_.getLineMaxColumn(u)),1),b=_.getEOL()===`\r -`?new e(p):null;y.reset(E.column-1);const C=y.next(p);return C?w(this._getMultilineMatchRange(_,s,p,b,C.index,C[0]),C,v):E.lineNumber!==1||E.column!==1?this._doFindNextMatchMultiline(_,new i.Position(1,1),y,v):null}static _doFindNextMatchLineByLine(_,E,y,v){const r=_.getLineCount(),s=E.lineNumber,u=_.getLineContent(s),p=this._findFirstMatchInLine(y,u,s,E.column,v);if(p)return p;for(let b=1;b<=r;b++){const C=(s+b-1)%r,N=_.getLineContent(C+1),R=this._findFirstMatchInLine(y,N,C+1,1,v);if(R)return R}return null}static _findFirstMatchInLine(_,E,y,v,r){_.reset(v-1);const s=_.next(E);return s?w(new d.Range(y,s.index+1,y,s.index+1+s[0].length),s,r):null}static findPreviousMatch(_,E,y,v){const r=E.parseSearchRequest();if(!r)return null;const s=new g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(_,y,s,v):this._doFindPreviousMatchLineByLine(_,y,s,v)}static _doFindPreviousMatchMultiline(_,E,y,v){const r=this._doFindMatchesMultiline(_,new d.Range(1,1,E.lineNumber,E.column),y,v,10*L);if(r.length>0)return r[r.length-1];const s=_.getLineCount();return E.lineNumber!==s||E.column!==_.getLineMaxColumn(s)?this._doFindPreviousMatchMultiline(_,new i.Position(s,_.getLineMaxColumn(s)),y,v):null}static _doFindPreviousMatchLineByLine(_,E,y,v){const r=_.getLineCount(),s=E.lineNumber,u=_.getLineContent(s).substring(0,E.column-1),p=this._findLastMatchInLine(y,u,s,v);if(p)return p;for(let b=1;b<=r;b++){const C=(r+s-b-1)%r,N=_.getLineContent(C+1),R=this._findLastMatchInLine(y,N,C+1,v);if(R)return R}return null}static _findLastMatchInLine(_,E,y,v){let r=null,s;for(_.reset(0);s=_.next(E);)r=w(new d.Range(y,s.index+1,y,s.index+1+s[0].length),s,v);return r}}n.TextModelSearch=a;function c(S,_,E,y,v){if(y===0)return!0;const r=_.charCodeAt(y-1);if(S.get(r)!==0||r===13||r===10)return!0;if(v>0){const s=_.charCodeAt(y);if(S.get(s)!==0)return!0}return!1}function l(S,_,E,y,v){if(y+v===E)return!0;const r=_.charCodeAt(y+v);if(S.get(r)!==0||r===13||r===10)return!0;if(v>0){const s=_.charCodeAt(y+v-1);if(S.get(s)!==0)return!0}return!1}function f(S,_,E,y,v){return c(S,_,E,y,v)&&l(S,_,E,y,v)}n.isValidMatch=f;class g{constructor(_,E){this._wordSeparators=_,this._searchRegex=E,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(_){this._searchRegex.lastIndex=_,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(_){const E=_.length;let y;do{if(this._prevMatchStartIndex+this._prevMatchLength===E||(y=this._searchRegex.exec(_),!y))return null;const v=y.index,r=y[0].length;if(v===this._prevMatchStartIndex&&r===this._prevMatchLength){if(r===0){M.getNextCodePoint(_,E,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=v,this._prevMatchLength=r,!this._wordSeparators||f(this._wordSeparators,_,E,v,r))return y}while(y);return null}}n.Searcher=g}),Y(X[57],J([0,1,2,56,6,12,28]),function(T,n,M,A,i,d,m){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeTextModelHighlighter=void 0;class L{static computeUnicodeHighlights(a,c,l){const f=l?l.startLineNumber:1,g=l?l.endLineNumber:a.getLineCount(),S=new o(c),_=S.getCandidateCodePoints();let E;_==="allNonBasicAscii"?E=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):E=new RegExp(`${h(Array.from(_))}`,"g");const y=new A.Searcher(null,E),v=[];let r=!1,s,u=0,p=0,b=0;e:for(let C=f,N=g;C<=N;C++){const R=a.getLineContent(C),D=R.length;y.reset(0);do if(s=y.next(R),s){let k=s.index,U=s.index+s[0].length;if(k>0){const x=R.charCodeAt(k-1);i.isHighSurrogate(x)&&k--}if(U+1=x){r=!0;break e}v.push(new M.Range(C,k+1,C,U+1))}}while(s)}return{ranges:v,hasMore:r,ambiguousCharacterCount:u,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(a,c){const l=new o(c);switch(l.shouldHighlightNonBasicASCII(a,null)){case 0:return null;case 2:return{kind:1};case 3:{const g=a.codePointAt(0),S=l.ambiguousCharacters.getPrimaryConfusable(g),_=i.AmbiguousCharacters.getLocales().filter(E=>!i.AmbiguousCharacters.getInstance(new Set([...c.allowedLocales,E])).isAmbiguous(g));return{kind:0,confusableWith:String.fromCodePoint(S),notAmbiguousInLocales:_}}case 1:return{kind:2}}}}n.UnicodeTextModelHighlighter=L;function h(e,a){return`[${i.escapeRegExpCharacters(e.map(l=>String.fromCodePoint(l)).join(""))}]`}class o{constructor(a){this.options=a,this.allowedCodePoints=new Set(a.allowedCodePoints),this.ambiguousCharacters=i.AmbiguousCharacters.getInstance(new Set(a.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const a=new Set;if(this.options.invisibleCharacters)for(const c of i.InvisibleCharacters.codePoints)w(String.fromCodePoint(c))||a.add(c);if(this.options.ambiguousCharacters)for(const c of this.ambiguousCharacters.getConfusableCodePoints())a.add(c);for(const c of this.allowedCodePoints)a.delete(c);return a}shouldHighlightNonBasicASCII(a,c){const l=a.codePointAt(0);if(this.allowedCodePoints.has(l))return 0;if(this.options.nonBasicASCII)return 1;let f=!1,g=!1;if(c)for(const S of c){const _=S.codePointAt(0),E=i.isBasicASCII(S);f=f||E,!E&&!this.ambiguousCharacters.isAmbiguous(_)&&!i.InvisibleCharacters.isInvisibleCharacter(_)&&(g=!0)}return!f&&g?0:this.options.invisibleCharacters&&!w(a)&&i.InvisibleCharacters.isInvisibleCharacter(l)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(l)?3:0}}function w(e){return e===" "||e===` -`||e===" "}}),Y(X[58],J([0,1]),function(T,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.WrappingIndent=n.TrackedRangeStickiness=n.TextEditorCursorStyle=n.TextEditorCursorBlinkingStyle=n.SymbolTag=n.SymbolKind=n.SignatureHelpTriggerKind=n.SelectionDirection=n.ScrollbarVisibility=n.ScrollType=n.RenderMinimap=n.RenderLineNumbersType=n.PositionAffinity=n.OverviewRulerLane=n.OverlayWidgetPositionPreference=n.MouseTargetType=n.MinimapPosition=n.MarkerTag=n.MarkerSeverity=n.KeyCode=n.InlineCompletionTriggerKind=n.InlayHintKind=n.InjectedTextCursorStops=n.IndentAction=n.GlyphMarginLane=n.EndOfLineSequence=n.EndOfLinePreference=n.EditorOption=n.EditorAutoIndentStrategy=n.DocumentHighlightKind=n.DefaultEndOfLine=n.CursorChangeReason=n.ContentWidgetPositionPreference=n.CompletionTriggerKind=n.CompletionItemTag=n.CompletionItemKind=n.CompletionItemInsertTextRule=n.CodeActionTriggerType=n.AccessibilitySupport=void 0;var M;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(M||(n.AccessibilitySupport=M={}));var A;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(A||(n.CodeActionTriggerType=A={}));var i;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(i||(n.CompletionItemInsertTextRule=i={}));var d;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Snippet=27]="Snippet"})(d||(n.CompletionItemKind=d={}));var m;(function(t){t[t.Deprecated=1]="Deprecated"})(m||(n.CompletionItemTag=m={}));var L;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(L||(n.CompletionTriggerKind=L={}));var h;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(h||(n.ContentWidgetPositionPreference=h={}));var o;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(o||(n.CursorChangeReason=o={}));var w;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(w||(n.DefaultEndOfLine=w={}));var e;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(e||(n.DocumentHighlightKind=e={}));var a;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(a||(n.EditorAutoIndentStrategy=a={}));var c;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.ariaLabel=4]="ariaLabel",t[t.ariaRequired=5]="ariaRequired",t[t.autoClosingBrackets=6]="autoClosingBrackets",t[t.autoClosingComments=7]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=9]="autoClosingDelete",t[t.autoClosingOvertype=10]="autoClosingOvertype",t[t.autoClosingQuotes=11]="autoClosingQuotes",t[t.autoIndent=12]="autoIndent",t[t.automaticLayout=13]="automaticLayout",t[t.autoSurround=14]="autoSurround",t[t.bracketPairColorization=15]="bracketPairColorization",t[t.guides=16]="guides",t[t.codeLens=17]="codeLens",t[t.codeLensFontFamily=18]="codeLensFontFamily",t[t.codeLensFontSize=19]="codeLensFontSize",t[t.colorDecorators=20]="colorDecorators",t[t.colorDecoratorsLimit=21]="colorDecoratorsLimit",t[t.columnSelection=22]="columnSelection",t[t.comments=23]="comments",t[t.contextmenu=24]="contextmenu",t[t.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",t[t.cursorBlinking=26]="cursorBlinking",t[t.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",t[t.cursorStyle=28]="cursorStyle",t[t.cursorSurroundingLines=29]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",t[t.cursorWidth=31]="cursorWidth",t[t.disableLayerHinting=32]="disableLayerHinting",t[t.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",t[t.domReadOnly=34]="domReadOnly",t[t.dragAndDrop=35]="dragAndDrop",t[t.dropIntoEditor=36]="dropIntoEditor",t[t.emptySelectionClipboard=37]="emptySelectionClipboard",t[t.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",t[t.extraEditorClassName=39]="extraEditorClassName",t[t.fastScrollSensitivity=40]="fastScrollSensitivity",t[t.find=41]="find",t[t.fixedOverflowWidgets=42]="fixedOverflowWidgets",t[t.folding=43]="folding",t[t.foldingStrategy=44]="foldingStrategy",t[t.foldingHighlight=45]="foldingHighlight",t[t.foldingImportsByDefault=46]="foldingImportsByDefault",t[t.foldingMaximumRegions=47]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=49]="fontFamily",t[t.fontInfo=50]="fontInfo",t[t.fontLigatures=51]="fontLigatures",t[t.fontSize=52]="fontSize",t[t.fontWeight=53]="fontWeight",t[t.fontVariations=54]="fontVariations",t[t.formatOnPaste=55]="formatOnPaste",t[t.formatOnType=56]="formatOnType",t[t.glyphMargin=57]="glyphMargin",t[t.gotoLocation=58]="gotoLocation",t[t.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",t[t.hover=60]="hover",t[t.inDiffEditor=61]="inDiffEditor",t[t.inlineSuggest=62]="inlineSuggest",t[t.letterSpacing=63]="letterSpacing",t[t.lightbulb=64]="lightbulb",t[t.lineDecorationsWidth=65]="lineDecorationsWidth",t[t.lineHeight=66]="lineHeight",t[t.lineNumbers=67]="lineNumbers",t[t.lineNumbersMinChars=68]="lineNumbersMinChars",t[t.linkedEditing=69]="linkedEditing",t[t.links=70]="links",t[t.matchBrackets=71]="matchBrackets",t[t.minimap=72]="minimap",t[t.mouseStyle=73]="mouseStyle",t[t.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=75]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",t[t.multiCursorModifier=77]="multiCursorModifier",t[t.multiCursorPaste=78]="multiCursorPaste",t[t.multiCursorLimit=79]="multiCursorLimit",t[t.occurrencesHighlight=80]="occurrencesHighlight",t[t.overviewRulerBorder=81]="overviewRulerBorder",t[t.overviewRulerLanes=82]="overviewRulerLanes",t[t.padding=83]="padding",t[t.pasteAs=84]="pasteAs",t[t.parameterHints=85]="parameterHints",t[t.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",t[t.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",t[t.quickSuggestions=88]="quickSuggestions",t[t.quickSuggestionsDelay=89]="quickSuggestionsDelay",t[t.readOnly=90]="readOnly",t[t.readOnlyMessage=91]="readOnlyMessage",t[t.renameOnType=92]="renameOnType",t[t.renderControlCharacters=93]="renderControlCharacters",t[t.renderFinalNewline=94]="renderFinalNewline",t[t.renderLineHighlight=95]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=97]="renderValidationDecorations",t[t.renderWhitespace=98]="renderWhitespace",t[t.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",t[t.roundedSelection=100]="roundedSelection",t[t.rulers=101]="rulers",t[t.scrollbar=102]="scrollbar",t[t.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=104]="scrollBeyondLastLine",t[t.scrollPredominantAxis=105]="scrollPredominantAxis",t[t.selectionClipboard=106]="selectionClipboard",t[t.selectionHighlight=107]="selectionHighlight",t[t.selectOnLineNumbers=108]="selectOnLineNumbers",t[t.showFoldingControls=109]="showFoldingControls",t[t.showUnused=110]="showUnused",t[t.snippetSuggestions=111]="snippetSuggestions",t[t.smartSelect=112]="smartSelect",t[t.smoothScrolling=113]="smoothScrolling",t[t.stickyScroll=114]="stickyScroll",t[t.stickyTabStops=115]="stickyTabStops",t[t.stopRenderingLineAfter=116]="stopRenderingLineAfter",t[t.suggest=117]="suggest",t[t.suggestFontSize=118]="suggestFontSize",t[t.suggestLineHeight=119]="suggestLineHeight",t[t.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",t[t.suggestSelection=121]="suggestSelection",t[t.tabCompletion=122]="tabCompletion",t[t.tabIndex=123]="tabIndex",t[t.unicodeHighlighting=124]="unicodeHighlighting",t[t.unusualLineTerminators=125]="unusualLineTerminators",t[t.useShadowDOM=126]="useShadowDOM",t[t.useTabStops=127]="useTabStops",t[t.wordBreak=128]="wordBreak",t[t.wordSeparators=129]="wordSeparators",t[t.wordWrap=130]="wordWrap",t[t.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=133]="wordWrapColumn",t[t.wordWrapOverride1=134]="wordWrapOverride1",t[t.wordWrapOverride2=135]="wordWrapOverride2",t[t.wrappingIndent=136]="wrappingIndent",t[t.wrappingStrategy=137]="wrappingStrategy",t[t.showDeprecated=138]="showDeprecated",t[t.inlayHints=139]="inlayHints",t[t.editorClassName=140]="editorClassName",t[t.pixelRatio=141]="pixelRatio",t[t.tabFocusMode=142]="tabFocusMode",t[t.layoutInfo=143]="layoutInfo",t[t.wrappingInfo=144]="wrappingInfo",t[t.defaultColorDecorators=145]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(c||(n.EditorOption=c={}));var l;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(l||(n.EndOfLinePreference=l={}));var f;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(f||(n.EndOfLineSequence=f={}));var g;(function(t){t[t.Left=1]="Left",t[t.Right=2]="Right"})(g||(n.GlyphMarginLane=g={}));var S;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(S||(n.IndentAction=S={}));var _;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(_||(n.InjectedTextCursorStops=_={}));var E;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(E||(n.InlayHintKind=E={}));var y;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(y||(n.InlineCompletionTriggerKind=y={}));var v;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(v||(n.KeyCode=v={}));var r;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(r||(n.MarkerSeverity=r={}));var s;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(s||(n.MarkerTag=s={}));var u;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(u||(n.MinimapPosition=u={}));var p;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(p||(n.MouseTargetType=p={}));var b;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(b||(n.OverlayWidgetPositionPreference=b={}));var C;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(C||(n.OverviewRulerLane=C={}));var N;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(N||(n.PositionAffinity=N={}));var R;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(R||(n.RenderLineNumbersType=R={}));var D;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(D||(n.RenderMinimap=D={}));var k;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(k||(n.ScrollType=k={}));var U;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(U||(n.ScrollbarVisibility=U={}));var I;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(I||(n.SelectionDirection=I={}));var B;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(B||(n.SignatureHelpTriggerKind=B={}));var z;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(z||(n.SymbolKind=z={}));var x;(function(t){t[t.Deprecated=1]="Deprecated"})(x||(n.SymbolTag=x={}));var O;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(O||(n.TextEditorCursorBlinkingStyle=O={}));var F;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(F||(n.TextEditorCursorStyle=F={}));var H;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(H||(n.TrackedRangeStickiness=H={}));var V;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(V||(n.WrappingIndent=V={}))}),Y(X[59],J([0,1,9,13]),function(T,n,M,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TokenizationRegistry=void 0;class i{constructor(){this._tokenizationSupports=new Map,this._factories=new Map,this._onDidChange=new M.Emitter,this.onDidChange=this._onDidChange.event,this._colorMap=null}handleChange(L){this._onDidChange.fire({changedLanguages:L,changedColorMap:!1})}register(L,h){return this._tokenizationSupports.set(L,h),this.handleChange([L]),(0,A.toDisposable)(()=>{this._tokenizationSupports.get(L)===h&&(this._tokenizationSupports.delete(L),this.handleChange([L]))})}get(L){return this._tokenizationSupports.get(L)||null}registerFactory(L,h){var o;(o=this._factories.get(L))===null||o===void 0||o.dispose();const w=new d(this,L,h);return this._factories.set(L,w),(0,A.toDisposable)(()=>{const e=this._factories.get(L);!e||e!==w||(this._factories.delete(L),e.dispose())})}getOrCreate(L){return ue(this,void 0,void 0,function*(){const h=this.get(L);if(h)return h;const o=this._factories.get(L);return!o||o.isResolved?null:(yield o.resolve(),this.get(L))})}isResolved(L){if(this.get(L))return!0;const o=this._factories.get(L);return!!(!o||o.isResolved)}setColorMap(L){this._colorMap=L,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}n.TokenizationRegistry=i;class d extends A.Disposable{get isResolved(){return this._isResolved}constructor(L,h,o){super(),this._registry=L,this._languageId=h,this._factory=o,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return ue(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return ue(this,void 0,void 0,function*(){const L=yield this._factory.tokenizationSupport;this._isResolved=!0,L&&!this._isDisposed&&this._register(this._registry.register(this._languageId,L))})}}}),Y(X[60],J([19,61]),function(T,n){return T.create("vs/base/common/platform",n)}),Y(X[17],J([0,1,60]),function(T,n,M){"use strict";var A;Object.defineProperty(n,"__esModule",{value:!0}),n.isAndroid=n.isEdge=n.isSafari=n.isFirefox=n.isChrome=n.isLittleEndian=n.OS=n.setTimeout0=n.setTimeout0IsFaster=n.language=n.userAgent=n.isMobile=n.isIOS=n.isWebWorker=n.isWeb=n.isNative=n.isLinux=n.isMacintosh=n.isWindows=n.globals=n.LANGUAGE_DEFAULT=void 0,n.LANGUAGE_DEFAULT="en";let i=!1,d=!1,m=!1,L=!1,h=!1,o=!1,w=!1,e=!1,a=!1,c=!1,l,f=n.LANGUAGE_DEFAULT,g=n.LANGUAGE_DEFAULT,S,_;n.globals=typeof self=="object"?self:typeof global=="object"?global:{};let E;typeof n.globals.vscode<"u"&&typeof n.globals.vscode.process<"u"?E=n.globals.vscode.process:typeof process<"u"&&(E=process);const y=typeof((A=E?.versions)===null||A===void 0?void 0:A.electron)=="string",v=y&&E?.type==="renderer";if(typeof navigator=="object"&&!v)_=navigator.userAgent,i=_.indexOf("Windows")>=0,d=_.indexOf("Macintosh")>=0,e=(_.indexOf("Macintosh")>=0||_.indexOf("iPad")>=0||_.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,m=_.indexOf("Linux")>=0,c=_?.indexOf("Mobi")>=0,o=!0,l=M.getConfiguredDefaultLocale(M.localize(0,null))||n.LANGUAGE_DEFAULT,f=l,g=navigator.language;else if(typeof E=="object"){i=E.platform==="win32",d=E.platform==="darwin",m=E.platform==="linux",L=m&&!!E.env.SNAP&&!!E.env.SNAP_REVISION,w=y,a=!!E.env.CI||!!E.env.BUILD_ARTIFACTSTAGINGDIRECTORY,l=n.LANGUAGE_DEFAULT,f=n.LANGUAGE_DEFAULT;const b=E.env.VSCODE_NLS_CONFIG;if(b)try{const C=JSON.parse(b),N=C.availableLanguages["*"];l=C.locale,g=C.osLocale,f=N||n.LANGUAGE_DEFAULT,S=C._translationsConfigFile}catch{}h=!0}else console.error("Unable to resolve platform.");let r=0;d?r=1:i?r=3:m&&(r=2),n.isWindows=i,n.isMacintosh=d,n.isLinux=m,n.isNative=h,n.isWeb=o,n.isWebWorker=o&&typeof n.globals.importScripts=="function",n.isIOS=e,n.isMobile=c,n.userAgent=_,n.language=f,n.setTimeout0IsFaster=typeof n.globals.postMessage=="function"&&!n.globals.importScripts,n.setTimeout0=(()=>{if(n.setTimeout0IsFaster){const b=[];n.globals.addEventListener("message",N=>{if(N.data&&N.data.vscodeScheduleAsyncWork)for(let R=0,D=b.length;R{const R=++C;b.push({id:R,callback:N}),n.globals.postMessage({vscodeScheduleAsyncWork:R},"*")}}return b=>setTimeout(b)})(),n.OS=d||e?2:i?1:3;let s=!0,u=!1;function p(){if(!u){u=!0;const b=new Uint8Array(2);b[0]=1,b[1]=2,s=new Uint16Array(b.buffer)[0]===(2<<8)+1}return s}n.isLittleEndian=p,n.isChrome=!!(n.userAgent&&n.userAgent.indexOf("Chrome")>=0),n.isFirefox=!!(n.userAgent&&n.userAgent.indexOf("Firefox")>=0),n.isSafari=!!(!n.isChrome&&n.userAgent&&n.userAgent.indexOf("Safari")>=0),n.isEdge=!!(n.userAgent&&n.userAgent.indexOf("Edg/")>=0),n.isAndroid=!!(n.userAgent&&n.userAgent.indexOf("Android")>=0)}),Y(X[62],J([0,1,17]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.platform=n.env=n.cwd=void 0;let A;if(typeof M.globals.vscode<"u"&&typeof M.globals.vscode.process<"u"){const i=M.globals.vscode.process;A={get platform(){return i.platform},get arch(){return i.arch},get env(){return i.env},cwd(){return i.cwd()}}}else typeof process<"u"?A={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:A={get platform(){return M.isWindows?"win32":M.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};n.cwd=A.cwd,n.env=A.env,n.platform=A.platform}),Y(X[63],J([0,1,62]),function(T,n,M){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.sep=n.extname=n.basename=n.dirname=n.relative=n.resolve=n.normalize=n.posix=n.win32=void 0;const A=65,i=97,d=90,m=122,L=46,h=47,o=92,w=58,e=63;class a extends Error{constructor(s,u,p){let b;typeof u=="string"&&u.indexOf("not ")===0?(b="must not be",u=u.replace(/^not /,"")):b="must be";const C=s.indexOf(".")!==-1?"property":"argument";let N=`The "${s}" ${C} ${b} of type ${u}`;N+=`. Received type ${typeof p}`,super(N),this.code="ERR_INVALID_ARG_TYPE"}}function c(r,s){if(r===null||typeof r!="object")throw new a(s,"Object",r)}function l(r,s){if(typeof r!="string")throw new a(s,"string",r)}const f=M.platform==="win32";function g(r){return r===h||r===o}function S(r){return r===h}function _(r){return r>=A&&r<=d||r>=i&&r<=m}function E(r,s,u,p){let b="",C=0,N=-1,R=0,D=0;for(let k=0;k<=r.length;++k){if(k2){const U=b.lastIndexOf(u);U===-1?(b="",C=0):(b=b.slice(0,U),C=b.length-1-b.lastIndexOf(u)),N=k,R=0;continue}else if(b.length!==0){b="",C=0,N=k,R=0;continue}}s&&(b+=b.length>0?`${u}..`:"..",C=2)}else b.length>0?b+=`${u}${r.slice(N+1,k)}`:b=r.slice(N+1,k),C=k-N-1;N=k,R=0}else D===L&&R!==-1?++R:R=-1}return b}function y(r,s){c(s,"pathObject");const u=s.dir||s.root,p=s.base||`${s.name||""}${s.ext||""}`;return u?u===s.root?`${u}${p}`:`${u}${r}${p}`:p}n.win32={resolve(...r){let s="",u="",p=!1;for(let b=r.length-1;b>=-1;b--){let C;if(b>=0){if(C=r[b],l(C,"path"),C.length===0)continue}else s.length===0?C=M.cwd():(C=M.env[`=${s}`]||M.cwd(),(C===void 0||C.slice(0,2).toLowerCase()!==s.toLowerCase()&&C.charCodeAt(2)===o)&&(C=`${s}\\`));const N=C.length;let R=0,D="",k=!1;const U=C.charCodeAt(0);if(N===1)g(U)&&(R=1,k=!0);else if(g(U))if(k=!0,g(C.charCodeAt(1))){let I=2,B=I;for(;I2&&g(C.charCodeAt(2))&&(k=!0,R=3));if(D.length>0)if(s.length>0){if(D.toLowerCase()!==s.toLowerCase())continue}else s=D;if(p){if(s.length>0)break}else if(u=`${C.slice(R)}\\${u}`,p=k,k&&s.length>0)break}return u=E(u,!p,"\\",g),p?`${s}\\${u}`:`${s}${u}`||"."},normalize(r){l(r,"path");const s=r.length;if(s===0)return".";let u=0,p,b=!1;const C=r.charCodeAt(0);if(s===1)return S(C)?"\\":r;if(g(C))if(b=!0,g(r.charCodeAt(1))){let R=2,D=R;for(;R2&&g(r.charCodeAt(2))&&(b=!0,u=3));let N=u0&&g(r.charCodeAt(s-1))&&(N+="\\"),p===void 0?b?`\\${N}`:N:b?`${p}\\${N}`:`${p}${N}`},isAbsolute(r){l(r,"path");const s=r.length;if(s===0)return!1;const u=r.charCodeAt(0);return g(u)||s>2&&_(u)&&r.charCodeAt(1)===w&&g(r.charCodeAt(2))},join(...r){if(r.length===0)return".";let s,u;for(let C=0;C0&&(s===void 0?s=u=N:s+=`\\${N}`)}if(s===void 0)return".";let p=!0,b=0;if(typeof u=="string"&&g(u.charCodeAt(0))){++b;const C=u.length;C>1&&g(u.charCodeAt(1))&&(++b,C>2&&(g(u.charCodeAt(2))?++b:p=!1))}if(p){for(;b=2&&(s=`\\${s.slice(b)}`)}return n.win32.normalize(s)},relative(r,s){if(l(r,"from"),l(s,"to"),r===s)return"";const u=n.win32.resolve(r),p=n.win32.resolve(s);if(u===p||(r=u.toLowerCase(),s=p.toLowerCase(),r===s))return"";let b=0;for(;bb&&r.charCodeAt(C-1)===o;)C--;const N=C-b;let R=0;for(;RR&&s.charCodeAt(D-1)===o;)D--;const k=D-R,U=NU){if(s.charCodeAt(R+B)===o)return p.slice(R+B+1);if(B===2)return p.slice(R+B)}N>U&&(r.charCodeAt(b+B)===o?I=B:B===2&&(I=3)),I===-1&&(I=0)}let z="";for(B=b+I+1;B<=C;++B)(B===C||r.charCodeAt(B)===o)&&(z+=z.length===0?"..":"\\..");return R+=I,z.length>0?`${z}${p.slice(R,D)}`:(p.charCodeAt(R)===o&&++R,p.slice(R,D))},toNamespacedPath(r){if(typeof r!="string"||r.length===0)return r;const s=n.win32.resolve(r);if(s.length<=2)return r;if(s.charCodeAt(0)===o){if(s.charCodeAt(1)===o){const u=s.charCodeAt(2);if(u!==e&&u!==L)return`\\\\?\\UNC\\${s.slice(2)}`}}else if(_(s.charCodeAt(0))&&s.charCodeAt(1)===w&&s.charCodeAt(2)===o)return`\\\\?\\${s}`;return r},dirname(r){l(r,"path");const s=r.length;if(s===0)return".";let u=-1,p=0;const b=r.charCodeAt(0);if(s===1)return g(b)?r:".";if(g(b)){if(u=p=1,g(r.charCodeAt(1))){let R=2,D=R;for(;R2&&g(r.charCodeAt(2))?3:2,p=u);let C=-1,N=!0;for(let R=s-1;R>=p;--R)if(g(r.charCodeAt(R))){if(!N){C=R;break}}else N=!1;if(C===-1){if(u===-1)return".";C=u}return r.slice(0,C)},basename(r,s){s!==void 0&&l(s,"ext"),l(r,"path");let u=0,p=-1,b=!0,C;if(r.length>=2&&_(r.charCodeAt(0))&&r.charCodeAt(1)===w&&(u=2),s!==void 0&&s.length>0&&s.length<=r.length){if(s===r)return"";let N=s.length-1,R=-1;for(C=r.length-1;C>=u;--C){const D=r.charCodeAt(C);if(g(D)){if(!b){u=C+1;break}}else R===-1&&(b=!1,R=C+1),N>=0&&(D===s.charCodeAt(N)?--N===-1&&(p=C):(N=-1,p=R))}return u===p?p=R:p===-1&&(p=r.length),r.slice(u,p)}for(C=r.length-1;C>=u;--C)if(g(r.charCodeAt(C))){if(!b){u=C+1;break}}else p===-1&&(b=!1,p=C+1);return p===-1?"":r.slice(u,p)},extname(r){l(r,"path");let s=0,u=-1,p=0,b=-1,C=!0,N=0;r.length>=2&&r.charCodeAt(1)===w&&_(r.charCodeAt(0))&&(s=p=2);for(let R=r.length-1;R>=s;--R){const D=r.charCodeAt(R);if(g(D)){if(!C){p=R+1;break}continue}b===-1&&(C=!1,b=R+1),D===L?u===-1?u=R:N!==1&&(N=1):u!==-1&&(N=-1)}return u===-1||b===-1||N===0||N===1&&u===b-1&&u===p+1?"":r.slice(u,b)},format:y.bind(null,"\\"),parse(r){l(r,"path");const s={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return s;const u=r.length;let p=0,b=r.charCodeAt(0);if(u===1)return g(b)?(s.root=s.dir=r,s):(s.base=s.name=r,s);if(g(b)){if(p=1,g(r.charCodeAt(1))){let I=2,B=I;for(;I0&&(s.root=r.slice(0,p));let C=-1,N=p,R=-1,D=!0,k=r.length-1,U=0;for(;k>=p;--k){if(b=r.charCodeAt(k),g(b)){if(!D){N=k+1;break}continue}R===-1&&(D=!1,R=k+1),b===L?C===-1?C=k:U!==1&&(U=1):C!==-1&&(U=-1)}return R!==-1&&(C===-1||U===0||U===1&&C===R-1&&C===N+1?s.base=s.name=r.slice(N,R):(s.name=r.slice(N,C),s.base=r.slice(N,R),s.ext=r.slice(C,R))),N>0&&N!==p?s.dir=r.slice(0,N-1):s.dir=s.root,s},sep:"\\",delimiter:";",win32:null,posix:null};const v=(()=>{if(f){const r=/\\/g;return()=>{const s=M.cwd().replace(r,"/");return s.slice(s.indexOf("/"))}}return()=>M.cwd()})();n.posix={resolve(...r){let s="",u=!1;for(let p=r.length-1;p>=-1&&!u;p--){const b=p>=0?r[p]:v();l(b,"path"),b.length!==0&&(s=`${b}/${s}`,u=b.charCodeAt(0)===h)}return s=E(s,!u,"/",S),u?`/${s}`:s.length>0?s:"."},normalize(r){if(l(r,"path"),r.length===0)return".";const s=r.charCodeAt(0)===h,u=r.charCodeAt(r.length-1)===h;return r=E(r,!s,"/",S),r.length===0?s?"/":u?"./":".":(u&&(r+="/"),s?`/${r}`:r)},isAbsolute(r){return l(r,"path"),r.length>0&&r.charCodeAt(0)===h},join(...r){if(r.length===0)return".";let s;for(let u=0;u0&&(s===void 0?s=p:s+=`/${p}`)}return s===void 0?".":n.posix.normalize(s)},relative(r,s){if(l(r,"from"),l(s,"to"),r===s||(r=n.posix.resolve(r),s=n.posix.resolve(s),r===s))return"";const u=1,p=r.length,b=p-u,C=1,N=s.length-C,R=bR){if(s.charCodeAt(C+k)===h)return s.slice(C+k+1);if(k===0)return s.slice(C+k)}else b>R&&(r.charCodeAt(u+k)===h?D=k:k===0&&(D=0));let U="";for(k=u+D+1;k<=p;++k)(k===p||r.charCodeAt(k)===h)&&(U+=U.length===0?"..":"/..");return`${U}${s.slice(C+D)}`},toNamespacedPath(r){return r},dirname(r){if(l(r,"path"),r.length===0)return".";const s=r.charCodeAt(0)===h;let u=-1,p=!0;for(let b=r.length-1;b>=1;--b)if(r.charCodeAt(b)===h){if(!p){u=b;break}}else p=!1;return u===-1?s?"/":".":s&&u===1?"//":r.slice(0,u)},basename(r,s){s!==void 0&&l(s,"ext"),l(r,"path");let u=0,p=-1,b=!0,C;if(s!==void 0&&s.length>0&&s.length<=r.length){if(s===r)return"";let N=s.length-1,R=-1;for(C=r.length-1;C>=0;--C){const D=r.charCodeAt(C);if(D===h){if(!b){u=C+1;break}}else R===-1&&(b=!1,R=C+1),N>=0&&(D===s.charCodeAt(N)?--N===-1&&(p=C):(N=-1,p=R))}return u===p?p=R:p===-1&&(p=r.length),r.slice(u,p)}for(C=r.length-1;C>=0;--C)if(r.charCodeAt(C)===h){if(!b){u=C+1;break}}else p===-1&&(b=!1,p=C+1);return p===-1?"":r.slice(u,p)},extname(r){l(r,"path");let s=-1,u=0,p=-1,b=!0,C=0;for(let N=r.length-1;N>=0;--N){const R=r.charCodeAt(N);if(R===h){if(!b){u=N+1;break}continue}p===-1&&(b=!1,p=N+1),R===L?s===-1?s=N:C!==1&&(C=1):s!==-1&&(C=-1)}return s===-1||p===-1||C===0||C===1&&s===p-1&&s===u+1?"":r.slice(s,p)},format:y.bind(null,"/"),parse(r){l(r,"path");const s={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return s;const u=r.charCodeAt(0)===h;let p;u?(s.root="/",p=1):p=0;let b=-1,C=0,N=-1,R=!0,D=r.length-1,k=0;for(;D>=p;--D){const U=r.charCodeAt(D);if(U===h){if(!R){C=D+1;break}continue}N===-1&&(R=!1,N=D+1),U===L?b===-1?b=D:k!==1&&(k=1):b!==-1&&(k=-1)}if(N!==-1){const U=C===0&&u?1:C;b===-1||k===0||k===1&&b===N-1&&b===C+1?s.base=s.name=r.slice(U,N):(s.name=r.slice(U,b),s.base=r.slice(U,N),s.ext=r.slice(b,N))}return C>0?s.dir=r.slice(0,C-1):u&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null},n.posix.win32=n.win32.win32=n.win32,n.posix.posix=n.win32.posix=n.posix,n.normalize=f?n.win32.normalize:n.posix.normalize,n.resolve=f?n.win32.resolve:n.posix.resolve,n.relative=f?n.win32.relative:n.posix.relative,n.dirname=f?n.win32.dirname:n.posix.dirname,n.basename=f?n.win32.basename:n.posix.basename,n.extname=f?n.win32.extname:n.posix.extname,n.sep=f?n.win32.sep:n.posix.sep}),Y(X[18],J([0,1,63,17]),function(T,n,M,A){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.uriToFsPath=n.URI=void 0;const i=/^\w[\w\d+.-]*$/,d=/^\//,m=/^\/\//;function L(u,p){if(!u.scheme&&p)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${u.authority}", path: "${u.path}", query: "${u.query}", fragment: "${u.fragment}"}`);if(u.scheme&&!i.test(u.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(u.path){if(u.authority){if(!d.test(u.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(m.test(u.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function h(u,p){return!u&&!p?"file":u}function o(u,p){switch(u){case"https":case"http":case"file":p?p[0]!==e&&(p=e+p):p=e;break}return p}const w="",e="/",a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class c{static isUri(p){return p instanceof c?!0:p?typeof p.authority=="string"&&typeof p.fragment=="string"&&typeof p.path=="string"&&typeof p.query=="string"&&typeof p.scheme=="string"&&typeof p.fsPath=="string"&&typeof p.with=="function"&&typeof p.toString=="function":!1}constructor(p,b,C,N,R,D=!1){typeof p=="object"?(this.scheme=p.scheme||w,this.authority=p.authority||w,this.path=p.path||w,this.query=p.query||w,this.fragment=p.fragment||w):(this.scheme=h(p,D),this.authority=b||w,this.path=o(this.scheme,C||w),this.query=N||w,this.fragment=R||w,L(this,D))}get fsPath(){return E(this,!1)}with(p){if(!p)return this;let{scheme:b,authority:C,path:N,query:R,fragment:D}=p;return b===void 0?b=this.scheme:b===null&&(b=w),C===void 0?C=this.authority:C===null&&(C=w),N===void 0?N=this.path:N===null&&(N=w),R===void 0?R=this.query:R===null&&(R=w),D===void 0?D=this.fragment:D===null&&(D=w),b===this.scheme&&C===this.authority&&N===this.path&&R===this.query&&D===this.fragment?this:new f(b,C,N,R,D)}static parse(p,b=!1){const C=a.exec(p);return C?new f(C[2]||w,s(C[4]||w),s(C[5]||w),s(C[7]||w),s(C[9]||w),b):new f(w,w,w,w,w)}static file(p){let b=w;if(A.isWindows&&(p=p.replace(/\\/g,e)),p[0]===e&&p[1]===e){const C=p.indexOf(e,2);C===-1?(b=p.substring(2),p=e):(b=p.substring(2,C),p=p.substring(C)||e)}return new f("file",b,p,w,w)}static from(p,b){return new f(p.scheme,p.authority,p.path,p.query,p.fragment,b)}static joinPath(p,...b){if(!p.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let C;return A.isWindows&&p.scheme==="file"?C=c.file(M.win32.join(E(p,!0),...b)).path:C=M.posix.join(p.path,...b),p.with({path:C})}toString(p=!1){return y(this,p)}toJSON(){return this}static revive(p){var b,C;if(p){if(p instanceof c)return p;{const N=new f(p);return N._formatted=(b=p.external)!==null&&b!==void 0?b:null,N._fsPath=p._sep===l&&(C=p.fsPath)!==null&&C!==void 0?C:null,N}}else return p}}n.URI=c;const l=A.isWindows?1:void 0;class f extends c{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=E(this,!1)),this._fsPath}toString(p=!1){return p?y(this,!0):(this._formatted||(this._formatted=y(this,!1)),this._formatted)}toJSON(){const p={$mid:1};return this._fsPath&&(p.fsPath=this._fsPath,p._sep=l),this._formatted&&(p.external=this._formatted),this.path&&(p.path=this.path),this.scheme&&(p.scheme=this.scheme),this.authority&&(p.authority=this.authority),this.query&&(p.query=this.query),this.fragment&&(p.fragment=this.fragment),p}}const g={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function S(u,p,b){let C,N=-1;for(let R=0;R=97&&D<=122||D>=65&&D<=90||D>=48&&D<=57||D===45||D===46||D===95||D===126||p&&D===47||b&&D===91||b&&D===93||b&&D===58)N!==-1&&(C+=encodeURIComponent(u.substring(N,R)),N=-1),C!==void 0&&(C+=u.charAt(R));else{C===void 0&&(C=u.substr(0,R));const k=g[D];k!==void 0?(N!==-1&&(C+=encodeURIComponent(u.substring(N,R)),N=-1),C+=k):N===-1&&(N=R)}}return N!==-1&&(C+=encodeURIComponent(u.substring(N))),C!==void 0?C:u}function _(u){let p;for(let b=0;b1&&u.scheme==="file"?b=`//${u.authority}${u.path}`:u.path.charCodeAt(0)===47&&(u.path.charCodeAt(1)>=65&&u.path.charCodeAt(1)<=90||u.path.charCodeAt(1)>=97&&u.path.charCodeAt(1)<=122)&&u.path.charCodeAt(2)===58?p?b=u.path.substr(1):b=u.path[1].toLowerCase()+u.path.substr(2):b=u.path,A.isWindows&&(b=b.replace(/\//g,"\\")),b}n.uriToFsPath=E;function y(u,p){const b=p?_:S;let C="",{scheme:N,authority:R,path:D,query:k,fragment:U}=u;if(N&&(C+=N,C+=":"),(R||N==="file")&&(C+=e,C+=e),R){let I=R.indexOf("@");if(I!==-1){const B=R.substr(0,I);R=R.substr(I+1),I=B.lastIndexOf(":"),I===-1?C+=b(B,!1,!1):(C+=b(B.substr(0,I),!1,!1),C+=":",C+=b(B.substr(I+1),!1,!0)),C+="@"}R=R.toLowerCase(),I=R.lastIndexOf(":"),I===-1?C+=b(R,!1,!0):(C+=b(R.substr(0,I),!1,!0),C+=R.substr(I))}if(D){if(D.length>=3&&D.charCodeAt(0)===47&&D.charCodeAt(2)===58){const I=D.charCodeAt(1);I>=65&&I<=90&&(D=`/${String.fromCharCode(I+32)}:${D.substr(3)}`)}else if(D.length>=2&&D.charCodeAt(1)===58){const I=D.charCodeAt(0);I>=65&&I<=90&&(D=`${String.fromCharCode(I+32)}:${D.substr(2)}`)}C+=b(D,!0,!1)}return k&&(C+="?",C+=b(k,!1,!1)),U&&(C+="#",C+=p?U:S(U,!1,!1)),C}function v(u){try{return decodeURIComponent(u)}catch{return u.length>3?u.substr(0,3)+v(u.substr(3)):u}}const r=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function s(u){return u.match(r)?u.replace(r,p=>v(p)):u}}),Y(X[67],J([0,1,5,9,13,14,17,6]),function(T,n,M,A,i,d,m,L){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.create=n.SimpleWorkerServer=n.SimpleWorkerClient=n.logOnceWebWorkerWarning=void 0;const h="$initialize";let o=!1;function w(s){m.isWeb&&(o||(o=!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(s.message))}n.logOnceWebWorkerWarning=w;class e{constructor(u,p,b,C){this.vsWorker=u,this.req=p,this.method=b,this.args=C,this.type=0}}class a{constructor(u,p,b,C){this.vsWorker=u,this.seq=p,this.res=b,this.err=C,this.type=1}}class c{constructor(u,p,b,C){this.vsWorker=u,this.req=p,this.eventName=b,this.arg=C,this.type=2}}class l{constructor(u,p,b){this.vsWorker=u,this.req=p,this.event=b,this.type=3}}class f{constructor(u,p){this.vsWorker=u,this.req=p,this.type=4}}class g{constructor(u){this._workerId=-1,this._handler=u,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(u){this._workerId=u}sendMessage(u,p){const b=String(++this._lastSentReq);return new Promise((C,N)=>{this._pendingReplies[b]={resolve:C,reject:N},this._send(new e(this._workerId,b,u,p))})}listen(u,p){let b=null;const C=new A.Emitter({onWillAddFirstListener:()=>{b=String(++this._lastSentReq),this._pendingEmitters.set(b,C),this._send(new c(this._workerId,b,u,p))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(b),this._send(new f(this._workerId,b)),b=null}});return C.event}handleMessage(u){!u||!u.vsWorker||this._workerId!==-1&&u.vsWorker!==this._workerId||this._handleMessage(u)}_handleMessage(u){switch(u.type){case 1:return this._handleReplyMessage(u);case 0:return this._handleRequestMessage(u);case 2:return this._handleSubscribeEventMessage(u);case 3:return this._handleEventMessage(u);case 4:return this._handleUnsubscribeEventMessage(u)}}_handleReplyMessage(u){if(!this._pendingReplies[u.seq]){console.warn("Got reply to unknown seq");return}const p=this._pendingReplies[u.seq];if(delete this._pendingReplies[u.seq],u.err){let b=u.err;u.err.$isError&&(b=new Error,b.name=u.err.name,b.message=u.err.message,b.stack=u.err.stack),p.reject(b);return}p.resolve(u.res)}_handleRequestMessage(u){const p=u.req;this._handler.handleMessage(u.method,u.args).then(C=>{this._send(new a(this._workerId,p,C,void 0))},C=>{C.detail instanceof Error&&(C.detail=(0,M.transformErrorForSerialization)(C.detail)),this._send(new a(this._workerId,p,void 0,(0,M.transformErrorForSerialization)(C)))})}_handleSubscribeEventMessage(u){const p=u.req,b=this._handler.handleEvent(u.eventName,u.arg)(C=>{this._send(new l(this._workerId,p,C))});this._pendingEvents.set(p,b)}_handleEventMessage(u){if(!this._pendingEmitters.has(u.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(u.req).fire(u.event)}_handleUnsubscribeEventMessage(u){if(!this._pendingEvents.has(u.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(u.req).dispose(),this._pendingEvents.delete(u.req)}_send(u){const p=[];if(u.type===0)for(let b=0;b{this._protocol.handleMessage(I)},I=>{C?.(I)})),this._protocol=new g({sendMessage:(I,B)=>{this._worker.postMessage(I,B)},handleMessage:(I,B)=>{if(typeof b[I]!="function")return Promise.reject(new Error("Missing method "+I+" on main thread host."));try{return Promise.resolve(b[I].apply(b,B))}catch(z){return Promise.reject(z)}},handleEvent:(I,B)=>{if(E(I)){const z=b[I].call(b,B);if(typeof z!="function")throw new Error(`Missing dynamic event ${I} on main thread host.`);return z}if(_(I)){const z=b[I];if(typeof z!="function")throw new Error(`Missing event ${I} on main thread host.`);return z}throw new Error(`Malformed event name ${I}`)}}),this._protocol.setWorkerId(this._worker.getId());let N=null;const R=globalThis.require;typeof R<"u"&&typeof R.getConfig=="function"?N=R.getConfig():typeof globalThis.requirejs<"u"&&(N=globalThis.requirejs.s.contexts._.config);const D=(0,d.getAllMethodNames)(b);this._onModuleLoaded=this._protocol.sendMessage(h,[this._worker.getId(),JSON.parse(JSON.stringify(N)),p,D]);const k=(I,B)=>this._request(I,B),U=(I,B)=>this._protocol.listen(I,B);this._lazyProxy=new Promise((I,B)=>{C=B,this._onModuleLoaded.then(z=>{I(y(z,k,U))},z=>{B(z),this._onError("Worker failed to load "+p,z)})})}getProxyObject(){return this._lazyProxy}_request(u,p){return new Promise((b,C)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(u,p).then(b,C)},C)})}_onError(u,p){console.error(u),console.info(p)}}n.SimpleWorkerClient=S;function _(s){return s[0]==="o"&&s[1]==="n"&&L.isUpperAsciiLetter(s.charCodeAt(2))}function E(s){return/^onDynamic/.test(s)&&L.isUpperAsciiLetter(s.charCodeAt(9))}function y(s,u,p){const b=R=>function(){const D=Array.prototype.slice.call(arguments,0);return u(R,D)},C=R=>function(D){return p(R,D)},N={};for(const R of s){if(E(R)){N[R]=C(R);continue}if(_(R)){N[R]=p(R,void 0);continue}N[R]=b(R)}return N}class v{constructor(u,p){this._requestHandlerFactory=p,this._requestHandler=null,this._protocol=new g({sendMessage:(b,C)=>{u(b,C)},handleMessage:(b,C)=>this._handleMessage(b,C),handleEvent:(b,C)=>this._handleEvent(b,C)})}onmessage(u){this._protocol.handleMessage(u)}_handleMessage(u,p){if(u===h)return this.initialize(p[0],p[1],p[2],p[3]);if(!this._requestHandler||typeof this._requestHandler[u]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+u));try{return Promise.resolve(this._requestHandler[u].apply(this._requestHandler,p))}catch(b){return Promise.reject(b)}}_handleEvent(u,p){if(!this._requestHandler)throw new Error("Missing requestHandler");if(E(u)){const b=this._requestHandler[u].call(this._requestHandler,p);if(typeof b!="function")throw new Error(`Missing dynamic event ${u} on request handler.`);return b}if(_(u)){const b=this._requestHandler[u];if(typeof b!="function")throw new Error(`Missing event ${u} on request handler.`);return b}throw new Error(`Malformed event name ${u}`)}initialize(u,p,b,C){this._protocol.setWorkerId(u);const D=y(C,(k,U)=>this._protocol.sendMessage(k,U),(k,U)=>this._protocol.listen(k,U));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(D),Promise.resolve((0,d.getAllMethodNames)(this._requestHandler))):(p&&(typeof p.baseUrl<"u"&&delete p.baseUrl,typeof p.paths<"u"&&typeof p.paths.vs<"u"&&delete p.paths.vs,typeof p.trustedTypesPolicy!==void 0&&delete p.trustedTypesPolicy,p.catchError=!0,globalThis.require.config(p)),new Promise((k,U)=>{(globalThis.require||T)([b],B=>{if(this._requestHandler=B.create(D),!this._requestHandler){U(new Error("No RequestHandler!"));return}k((0,d.getAllMethodNames)(this._requestHandler))},U)}))}}n.SimpleWorkerServer=v;function r(s){return new v(s,null)}n.create=r}),Y(X[64],J([19,61]),function(T,n){return T.create("vs/editor/common/languages",n)}),Y(X[65],J([0,1,40,18,2,59,64]),function(T,n,M,A,i,d,m){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.TokenizationRegistry=n.LazyTokenizationSupport=n.InlayHintKind=n.Command=n.FoldingRangeKind=n.TextEdit=n.SymbolKinds=n.getAriaLabelForSymbol=n.symbolKindNames=n.isLocationLink=n.DocumentHighlightKind=n.SignatureHelpTriggerKind=n.SelectedSuggestionInfo=n.InlineCompletionTriggerKind=n.CompletionItemKinds=n.EncodedTokenizationResult=n.TokenizationResult=n.Token=void 0;class L{constructor(u,p,b){this.offset=u,this.type=p,this.language=b,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}n.Token=L;class h{constructor(u,p){this.tokens=u,this.endState=p,this._tokenizationResultBrand=void 0}}n.TokenizationResult=h;class o{constructor(u,p){this.tokens=u,this.endState=p,this._encodedTokenizationResultBrand=void 0}}n.EncodedTokenizationResult=o;var w;(function(s){const u=new Map;u.set(0,M.Codicon.symbolMethod),u.set(1,M.Codicon.symbolFunction),u.set(2,M.Codicon.symbolConstructor),u.set(3,M.Codicon.symbolField),u.set(4,M.Codicon.symbolVariable),u.set(5,M.Codicon.symbolClass),u.set(6,M.Codicon.symbolStruct),u.set(7,M.Codicon.symbolInterface),u.set(8,M.Codicon.symbolModule),u.set(9,M.Codicon.symbolProperty),u.set(10,M.Codicon.symbolEvent),u.set(11,M.Codicon.symbolOperator),u.set(12,M.Codicon.symbolUnit),u.set(13,M.Codicon.symbolValue),u.set(15,M.Codicon.symbolEnum),u.set(14,M.Codicon.symbolConstant),u.set(15,M.Codicon.symbolEnum),u.set(16,M.Codicon.symbolEnumMember),u.set(17,M.Codicon.symbolKeyword),u.set(27,M.Codicon.symbolSnippet),u.set(18,M.Codicon.symbolText),u.set(19,M.Codicon.symbolColor),u.set(20,M.Codicon.symbolFile),u.set(21,M.Codicon.symbolReference),u.set(22,M.Codicon.symbolCustomColor),u.set(23,M.Codicon.symbolFolder),u.set(24,M.Codicon.symbolTypeParameter),u.set(25,M.Codicon.account),u.set(26,M.Codicon.issues);function p(N){let R=u.get(N);return R||(console.info("No codicon found for CompletionItemKind "+N),R=M.Codicon.symbolProperty),R}s.toIcon=p;const b=new Map;b.set("method",0),b.set("function",1),b.set("constructor",2),b.set("field",3),b.set("variable",4),b.set("class",5),b.set("struct",6),b.set("interface",7),b.set("module",8),b.set("property",9),b.set("event",10),b.set("operator",11),b.set("unit",12),b.set("value",13),b.set("constant",14),b.set("enum",15),b.set("enum-member",16),b.set("enumMember",16),b.set("keyword",17),b.set("snippet",27),b.set("text",18),b.set("color",19),b.set("file",20),b.set("reference",21),b.set("customcolor",22),b.set("folder",23),b.set("type-parameter",24),b.set("typeParameter",24),b.set("account",25),b.set("issue",26);function C(N,R){let D=b.get(N);return typeof D>"u"&&!R&&(D=9),D}s.fromString=C})(w||(n.CompletionItemKinds=w={}));var e;(function(s){s[s.Automatic=0]="Automatic",s[s.Explicit=1]="Explicit"})(e||(n.InlineCompletionTriggerKind=e={}));class a{constructor(u,p,b,C){this.range=u,this.text=p,this.completionKind=b,this.isSnippetText=C}equals(u){return i.Range.lift(this.range).equalsRange(u.range)&&this.text===u.text&&this.completionKind===u.completionKind&&this.isSnippetText===u.isSnippetText}}n.SelectedSuggestionInfo=a;var c;(function(s){s[s.Invoke=1]="Invoke",s[s.TriggerCharacter=2]="TriggerCharacter",s[s.ContentChange=3]="ContentChange"})(c||(n.SignatureHelpTriggerKind=c={}));var l;(function(s){s[s.Text=0]="Text",s[s.Read=1]="Read",s[s.Write=2]="Write"})(l||(n.DocumentHighlightKind=l={}));function f(s){return s&&A.URI.isUri(s.uri)&&i.Range.isIRange(s.range)&&(i.Range.isIRange(s.originSelectionRange)||i.Range.isIRange(s.targetSelectionRange))}n.isLocationLink=f,n.symbolKindNames={[17]:(0,m.localize)(0,null),[16]:(0,m.localize)(1,null),[4]:(0,m.localize)(2,null),[13]:(0,m.localize)(3,null),[8]:(0,m.localize)(4,null),[9]:(0,m.localize)(5,null),[21]:(0,m.localize)(6,null),[23]:(0,m.localize)(7,null),[7]:(0,m.localize)(8,null),[0]:(0,m.localize)(9,null),[11]:(0,m.localize)(10,null),[10]:(0,m.localize)(11,null),[19]:(0,m.localize)(12,null),[5]:(0,m.localize)(13,null),[1]:(0,m.localize)(14,null),[2]:(0,m.localize)(15,null),[20]:(0,m.localize)(16,null),[15]:(0,m.localize)(17,null),[18]:(0,m.localize)(18,null),[24]:(0,m.localize)(19,null),[3]:(0,m.localize)(20,null),[6]:(0,m.localize)(21,null),[14]:(0,m.localize)(22,null),[22]:(0,m.localize)(23,null),[25]:(0,m.localize)(24,null),[12]:(0,m.localize)(25,null)};function g(s,u){return(0,m.localize)(26,null,s,n.symbolKindNames[u])}n.getAriaLabelForSymbol=g;var S;(function(s){const u=new Map;u.set(0,M.Codicon.symbolFile),u.set(1,M.Codicon.symbolModule),u.set(2,M.Codicon.symbolNamespace),u.set(3,M.Codicon.symbolPackage),u.set(4,M.Codicon.symbolClass),u.set(5,M.Codicon.symbolMethod),u.set(6,M.Codicon.symbolProperty),u.set(7,M.Codicon.symbolField),u.set(8,M.Codicon.symbolConstructor),u.set(9,M.Codicon.symbolEnum),u.set(10,M.Codicon.symbolInterface),u.set(11,M.Codicon.symbolFunction),u.set(12,M.Codicon.symbolVariable),u.set(13,M.Codicon.symbolConstant),u.set(14,M.Codicon.symbolString),u.set(15,M.Codicon.symbolNumber),u.set(16,M.Codicon.symbolBoolean),u.set(17,M.Codicon.symbolArray),u.set(18,M.Codicon.symbolObject),u.set(19,M.Codicon.symbolKey),u.set(20,M.Codicon.symbolNull),u.set(21,M.Codicon.symbolEnumMember),u.set(22,M.Codicon.symbolStruct),u.set(23,M.Codicon.symbolEvent),u.set(24,M.Codicon.symbolOperator),u.set(25,M.Codicon.symbolTypeParameter);function p(b){let C=u.get(b);return C||(console.info("No codicon found for SymbolKind "+b),C=M.Codicon.symbolProperty),C}s.toIcon=p})(S||(n.SymbolKinds=S={}));class _{}n.TextEdit=_;class E{static fromValue(u){switch(u){case"comment":return E.Comment;case"imports":return E.Imports;case"region":return E.Region}return new E(u)}constructor(u){this.value=u}}n.FoldingRangeKind=E,E.Comment=new E("comment"),E.Imports=new E("imports"),E.Region=new E("region");var y;(function(s){function u(p){return!p||typeof p!="object"?!1:typeof p.id=="string"&&typeof p.title=="string"}s.is=u})(y||(n.Command=y={}));var v;(function(s){s[s.Type=1]="Type",s[s.Parameter=2]="Parameter"})(v||(n.InlayHintKind=v={}));class r{constructor(u){this.createSupport=u,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(u=>{u&&u.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}n.LazyTokenizationSupport=r,n.TokenizationRegistry=new d.TokenizationRegistry}),Y(X[66],J([0,1,38,9,35,18,4,2,41,65,58]),function(T,n,M,A,i,d,m,L,h,o,w){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createMonacoBaseAPI=n.KeyMod=void 0;class e{static chord(l,f){return(0,i.KeyChord)(l,f)}}n.KeyMod=e,e.CtrlCmd=2048,e.Shift=1024,e.Alt=512,e.WinCtrl=256;function a(){return{editor:void 0,languages:void 0,CancellationTokenSource:M.CancellationTokenSource,Emitter:A.Emitter,KeyCode:w.KeyCode,KeyMod:e,Position:m.Position,Range:L.Range,Selection:h.Selection,SelectionDirection:w.SelectionDirection,MarkerSeverity:w.MarkerSeverity,MarkerTag:w.MarkerTag,Uri:d.URI,Token:o.Token}}n.createMonacoBaseAPI=a}),Y(X[68],J([0,1,24,18,4,2,55,28,51,52,66,23,57,49,14,50]),function(T,n,M,A,i,d,m,L,h,o,w,e,a,c,l,f){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.create=n.EditorSimpleWorker=void 0;class g extends m.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(y){const v=[];for(let r=0;rthis._lines.length)v=this._lines.length,r=this._lines[v-1].length+1,s=!0;else{const u=this._lines[v-1].length+1;r<1?(r=1,s=!0):r>u&&(r=u,s=!0)}return s?{lineNumber:v,column:r}:y}}class S{constructor(y,v){this._host=y,this._models=Object.create(null),this._foreignModuleFactory=v,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(y){return this._models[y]}_getModels(){const y=[];return Object.keys(this._models).forEach(v=>y.push(this._models[v])),y}acceptNewModel(y){this._models[y.url]=new g(A.URI.parse(y.url),y.lines,y.EOL,y.versionId)}acceptModelChanged(y,v){if(!this._models[y])return;this._models[y].onEvents(v)}acceptRemovedModel(y){this._models[y]&&delete this._models[y]}computeUnicodeHighlights(y,v,r){return ue(this,void 0,void 0,function*(){const s=this._getModel(y);return s?a.UnicodeTextModelHighlighter.computeUnicodeHighlights(s,v,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(y,v,r,s){return ue(this,void 0,void 0,function*(){const u=this._getModel(y),p=this._getModel(v);return!u||!p?null:S.computeDiff(u,p,r,s)})}static computeDiff(y,v,r,s){const u=s==="advanced"?c.linesDiffComputers.getDefault():c.linesDiffComputers.getLegacy(),p=y.getLinesContent(),b=v.getLinesContent(),C=u.computeDiff(p,b,r),N=C.changes.length>0?!1:this._modelsAreIdentical(y,v);function R(D){return D.map(k=>{var U;return[k.original.startLineNumber,k.original.endLineNumberExclusive,k.modified.startLineNumber,k.modified.endLineNumberExclusive,(U=k.innerChanges)===null||U===void 0?void 0:U.map(I=>[I.originalRange.startLineNumber,I.originalRange.startColumn,I.originalRange.endLineNumber,I.originalRange.endColumn,I.modifiedRange.startLineNumber,I.modifiedRange.startColumn,I.modifiedRange.endLineNumber,I.modifiedRange.endColumn])]})}return{identical:N,quitEarly:C.hitTimeout,changes:R(C.changes),moves:C.moves.map(D=>[D.lineRangeMapping.original.startLineNumber,D.lineRangeMapping.original.endLineNumberExclusive,D.lineRangeMapping.modified.startLineNumber,D.lineRangeMapping.modified.endLineNumberExclusive,R(D.changes)])}}static _modelsAreIdentical(y,v){const r=y.getLineCount(),s=v.getLineCount();if(r!==s)return!1;for(let u=1;u<=r;u++){const p=y.getLineContent(u),b=v.getLineContent(u);if(p!==b)return!1}return!0}computeMoreMinimalEdits(y,v,r){return ue(this,void 0,void 0,function*(){const s=this._getModel(y);if(!s)return v;const u=[];let p;v=v.slice(0).sort((C,N)=>{if(C.range&&N.range)return d.Range.compareRangesUsingStarts(C.range,N.range);const R=C.range?0:1,D=N.range?0:1;return R-D});let b=0;for(let C=1;CS._diffLimit){u.push({range:C,text:N});continue}const k=(0,M.stringDiff)(D,N,r),U=s.offsetAt(d.Range.lift(C).getStartPosition());for(const I of k){const B=s.positionAt(U+I.originalStart),z=s.positionAt(U+I.originalStart+I.originalLength),x={text:N.substr(I.modifiedStart,I.modifiedLength),range:{startLineNumber:B.lineNumber,startColumn:B.column,endLineNumber:z.lineNumber,endColumn:z.column}};s.getValueInRange(x.range)!==x.text&&u.push(x)}}return typeof p=="number"&&u.push({eol:p,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),u})}computeLinks(y){return ue(this,void 0,void 0,function*(){const v=this._getModel(y);return v?(0,h.computeLinks)(v):null})}computeDefaultDocumentColors(y){return ue(this,void 0,void 0,function*(){const v=this._getModel(y);return v?(0,f.computeDefaultDocumentColors)(v):null})}textualSuggest(y,v,r,s){return ue(this,void 0,void 0,function*(){const u=new e.StopWatch,p=new RegExp(r,s),b=new Set;e:for(const C of y){const N=this._getModel(C);if(N){for(const R of N.words(p))if(!(R===v||!isNaN(Number(R)))&&(b.add(R),b.size>S._suggestionsLimit))break e}}return{words:Array.from(b),duration:u.elapsed()}})}computeWordRanges(y,v,r,s){return ue(this,void 0,void 0,function*(){const u=this._getModel(y);if(!u)return Object.create(null);const p=new RegExp(r,s),b=Object.create(null);for(let C=v.startLineNumber;Cthis._host.fhr(b,C),p={host:(0,l.createProxyObject)(r,s),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(p,v),Promise.resolve((0,l.getAllMethodNames)(this._foreignModule))):new Promise((b,C)=>{T([y],N=>{this._foreignModule=N.create(p,v),b((0,l.getAllMethodNames)(this._foreignModule))},C)})}fmr(y,v){if(!this._foreignModule||typeof this._foreignModule[y]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+y));try{return Promise.resolve(this._foreignModule[y].apply(this._foreignModule,v))}catch(r){return Promise.reject(r)}}}n.EditorSimpleWorker=S,S._diffLimit=1e5,S._suggestionsLimit=1e4;function _(E){return new S(E,null)}n.create=_,typeof importScripts=="function"&&(globalThis.monaco=(0,w.createMonacoBaseAPI)())})}).call(this); - -//# sourceMappingURL=../../../../min-maps/vs/base/worker/workerMain.js.map \ No newline at end of file diff --git a/lib/vs/basic-languages/abap/abap.js b/lib/vs/basic-languages/abap/abap.js deleted file mode 100644 index eb4a1f1..0000000 --- a/lib/vs/basic-languages/abap/abap.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/abap/abap", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var i in e)s(t,i,{get:e[i],enumerable:!0})},d=(t,e,i,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r(e))!c.call(t,n)&&n!==i&&s(t,n,{get:()=>e[n],enumerable:!(a=o(e,n))||a.enumerable});return t};var p=t=>d(s({},"__esModule",{value:!0}),t);var g={};l(g,{conf:()=>m,language:()=>u});var m={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},u={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}};return p(g);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/apex/apex.js b/lib/vs/basic-languages/apex/apex.js deleted file mode 100644 index 221e470..0000000 --- a/lib/vs/basic-languages/apex/apex.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/apex/apex", ["require","require"],(require)=>{ -var moduleExports=(()=>{var i=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(e,t)=>{for(var s in t)i(e,s,{get:t[s],enumerable:!0})},g=(e,t,s,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of c(t))!l.call(e,o)&&o!==s&&i(e,o,{get:()=>t[o],enumerable:!(a=r(t,o))||a.enumerable});return e};var p=e=>g(i({},"__esModule",{value:!0}),e);var h={};d(h,{conf:()=>m,language:()=>b});var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},u=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],f=e=>e.charAt(0).toUpperCase()+e.substr(1),n=[];u.forEach(e=>{n.push(e),n.push(e.toUpperCase()),n.push(f(e))});var b={defaultToken:"",tokenPostfix:".apex",keywords:n,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}};return p(h);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/azcli/azcli.js b/lib/vs/basic-languages/azcli/azcli.js deleted file mode 100644 index 401a9f3..0000000 --- a/lib/vs/basic-languages/azcli/azcli.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/azcli/azcli", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},k=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r(e))!l.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(a=i(e,n))||a.enumerable});return t};var p=t=>k(s({},"__esModule",{value:!0}),t);var d={};c(d,{conf:()=>f,language:()=>g});var f={comments:{lineComment:"#"}},g={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}};return p(d);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/bat/bat.js b/lib/vs/basic-languages/bat/bat.js deleted file mode 100644 index f8e14b4..0000000 --- a/lib/vs/basic-languages/bat/bat.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/bat/bat", ["require","require"],(require)=>{ -var moduleExports=(()=>{var n=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var t in e)n(o,t,{get:e[t],enumerable:!0})},c=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of l(e))!i.call(o,s)&&s!==t&&n(o,s,{get:()=>e[s],enumerable:!(a=r(e,s))||a.enumerable});return o};var p=o=>c(n({},"__esModule",{value:!0}),o);var k={};g(k,{conf:()=>d,language:()=>m});var d={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},m={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var g=(e,n)=>{for(var o in n)r(e,o,{get:n[o],enumerable:!0})},l=(e,n,o,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of c(n))!a.call(e,t)&&t!==o&&r(e,t,{get:()=>n[t],enumerable:!(i=s(n,t))||i.enumerable});return e};var m=e=>l(r({},"__esModule",{value:!0}),e);var y={};g(y,{conf:()=>$,language:()=>w});var p=e=>`\\b${e}\\b`,k="[_a-zA-Z]",x="[_a-zA-Z0-9]",u=p(`${k}${x}*`),d=["targetScope","resource","module","param","var","output","for","in","if","existing"],b=["true","false","null"],f="[ \\t\\r\\n]",C="[0-9]+",$={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])' - `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},w={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var n in e)s(o,n,{get:e[n],enumerable:!0})},m=(o,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!l.call(o,t)&&t!==n&&s(o,t,{get:()=>e[t],enumerable:!(r=i(e,t))||r.enumerable});return o};var p=o=>m(s({},"__esModule",{value:!0}),o);var u={};c(u,{conf:()=>d,language:()=>g});var d={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},g={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};return p(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/clojure/clojure.js b/lib/vs/basic-languages/clojure/clojure.js deleted file mode 100644 index 102463a..0000000 --- a/lib/vs/basic-languages/clojure/clojure.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/clojure/clojure", ["require","require"],(require)=>{ -var moduleExports=(()=>{var a=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},l=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i(e))!c.call(t,n)&&n!==r&&a(t,n,{get:()=>e[n],enumerable:!(s=o(e,n))||s.enumerable});return t};var p=t=>l(a({},"__esModule",{value:!0}),t);var h={};d(h,{conf:()=>u,language:()=>m});var u={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]},m={defaultToken:"",ignoreCase:!0,tokenPostfix:".clj",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],constants:["true","false","nil"],numbers:/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,characters:/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,escapes:/^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,qualifiedSymbols:/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,specialForms:[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],coreSymbols:["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}};return p(h);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/coffee/coffee.js b/lib/vs/basic-languages/coffee/coffee.js deleted file mode 100644 index a9f1015..0000000 --- a/lib/vs/basic-languages/coffee/coffee.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/coffee/coffee", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},p=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of g(e))!a.call(n,r)&&r!==t&&s(n,r,{get:()=>e[r],enumerable:!(o=i(e,r))||o.enumerable});return n};var c=n=>p(s({},"__esModule",{value:!0}),n);var m={};l(m,{conf:()=>d,language:()=>x});var d={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},x={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var _=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var i in e)r(n,i,{get:e[i],enumerable:!0})},l=(n,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!_.call(n,t)&&t!==i&&r(n,t,{get:()=>e[t],enumerable:!(o=a(e,t))||o.enumerable});return n};var d=n=>l(r({},"__esModule",{value:!0}),n);var g={};c(g,{conf:()=>p,language:()=>m});var p={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},m={defaultToken:"",tokenPostfix:".cpp",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m512","__m512d","__m512i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*\\$/,"comment","@linecomment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],linecomment:[[/.*[^\\]$/,"comment","@pop"],[/[^]+/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/(.*)(\))(?:([^ ()\\\t"]*))(\")/,{cases:{"$3==$S2":["string.raw","string.raw.end","string.raw.end",{token:"string.raw.end",next:"@pop"}],"@default":["string.raw","string.raw","string.raw","string.raw"]}}],[/.*/,"string.raw"]],annotation:[{include:"@whitespace"},[/using|alignas/,"keyword"],[/[a-zA-Z0-9_]+/,"annotation"],[/[,:]/,"delimiter"],[/[()]/,"@brackets"],[/\]\s*\]/,{token:"annotation",next:"@pop"}]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}};return d(g);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/csharp/csharp.js b/lib/vs/basic-languages/csharp/csharp.js deleted file mode 100644 index 721511e..0000000 --- a/lib/vs/basic-languages/csharp/csharp.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/csharp/csharp", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!c.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(i=r(e,n))||i.enumerable});return t};var g=t=>p(s({},"__esModule",{value:!0}),t);var u={};l(u,{conf:()=>d,language:()=>m});var d={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},m={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};return g(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/csp/csp.js b/lib/vs/basic-languages/csp/csp.js deleted file mode 100644 index 9462439..0000000 --- a/lib/vs/basic-languages/csp/csp.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/csp/csp", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var a=(r,t)=>{for(var s in t)o(r,s,{get:t[s],enumerable:!0})},c=(r,t,s,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of u(t))!g.call(r,e)&&e!==s&&o(r,e,{get:()=>t[e],enumerable:!(n=i(t,e))||n.enumerable});return r};var q=r=>c(o({},"__esModule",{value:!0}),r);var p={};a(p,{conf:()=>f,language:()=>l});var f={brackets:[],autoClosingPairs:[],surroundingPairs:[]},l={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var o in e)r(t,o,{get:e[o],enumerable:!0})},c=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!l.call(t,n)&&n!==o&&r(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t};var d=t=>c(r({},"__esModule",{value:!0}),t);var k={};m(k,{conf:()=>u,language:()=>p});var u={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},p={defaultToken:"",tokenPostfix:".css",ws:`[ -\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r -]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}};return d(k);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/cypher/cypher.js b/lib/vs/basic-languages/cypher/cypher.js deleted file mode 100644 index 0f8d0ab..0000000 --- a/lib/vs/basic-languages/cypher/cypher.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/cypher/cypher", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(i,e)=>{for(var n in e)s(i,n,{get:e[n],enumerable:!0})},g=(i,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!l.call(i,t)&&t!==n&&s(i,t,{get:()=>e[t],enumerable:!(o=r(e,t))||o.enumerable});return i};var p=i=>g(s({},"__esModule",{value:!0}),i);var u={};c(u,{conf:()=>d,language:()=>m});var d={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},m={defaultToken:"",tokenPostfix:".cypher",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ALL","AND","AS","ASC","ASCENDING","BY","CALL","CASE","CONTAINS","CREATE","DELETE","DESC","DESCENDING","DETACH","DISTINCT","ELSE","END","ENDS","EXISTS","IN","IS","LIMIT","MANDATORY","MATCH","MERGE","NOT","ON","ON","OPTIONAL","OR","ORDER","REMOVE","RETURN","SET","SKIP","STARTS","THEN","UNION","UNWIND","WHEN","WHERE","WITH","XOR","YIELD"],builtinLiterals:["true","TRUE","false","FALSE","null","NULL"],builtinFunctions:["abs","acos","asin","atan","atan2","avg","ceil","coalesce","collect","cos","cot","count","degrees","e","endNode","exists","exp","floor","head","id","keys","labels","last","left","length","log","log10","lTrim","max","min","nodes","percentileCont","percentileDisc","pi","properties","radians","rand","range","relationships","replace","reverse","right","round","rTrim","sign","sin","size","split","sqrt","startNode","stDev","stDevP","substring","sum","tail","tan","timestamp","toBoolean","toFloat","toInteger","toLower","toString","toUpper","trim","type"],operators:["+","-","*","/","%","^","=","<>","<",">","<=",">=","->","<-","-->","<--"],escapes:/\\(?:[tbnrf\\"'`]|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+/,octaldigits:/[0-7]+/,hexdigits:/[0-9a-fA-F]+/,tokenizer:{root:[[/[{}[\]()]/,"@brackets"],{include:"common"}],common:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/:[a-zA-Z_][\w]*/,"type.identifier"],[/[a-zA-Z_][\w]*(?=\()/,{cases:{"@builtinFunctions":"predefined.function"}}],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":"keyword","@builtinLiterals":"predefined.literal","@default":"identifier"}}],[/`/,"identifier.escape","@identifierBacktick"],[/[;,.:|]/,"delimiter"],[/[<>=%+\-*/^]+/,{cases:{"@operators":"delimiter","@default":""}}]],numbers:[[/-?(@digits)[eE](-?(@digits))?/,"number.float"],[/-?(@digits)?\.(@digits)([eE]-?(@digits))?/,"number.float"],[/-?0x(@hexdigits)/,"number.hex"],[/-?0(@octaldigits)/,"number.octal"],[/-?(@digits)/,"number"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@stringDouble"],[/'/,"string","@stringSingle"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/\/\/.*/,"comment"],[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],stringDouble:[[/[^\\"]+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/"/,"string","@pop"]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string"],[/\\./,"string.invalid"],[/'/,"string","@pop"]],identifierBacktick:[[/[^\\`]+/,"identifier.escape"],[/@escapes/,"identifier.escape"],[/\\./,"identifier.escape.invalid"],[/`/,"identifier.escape","@pop"]]}};return p(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/dart/dart.js b/lib/vs/basic-languages/dart/dart.js deleted file mode 100644 index 8d8da4b..0000000 --- a/lib/vs/basic-languages/dart/dart.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/dart/dart", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var p=(n,e)=>{for(var t in e)r(n,t,{get:e[t],enumerable:!0})},g=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of c(e))!a.call(n,o)&&o!==t&&r(n,o,{get:()=>e[o],enumerable:!(s=i(e,o))||s.enumerable});return n};var l=n=>g(r({},"__esModule",{value:!0}),n);var x={};p(x,{conf:()=>d,language:()=>m});var d={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},m={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}};return l(x);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/dockerfile/dockerfile.js b/lib/vs/basic-languages/dockerfile/dockerfile.js deleted file mode 100644 index 5531363..0000000 --- a/lib/vs/basic-languages/dockerfile/dockerfile.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/dockerfile/dockerfile", ["require","require"],(require)=>{ -var moduleExports=(()=>{var a=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var p=(o,e)=>{for(var s in e)a(o,s,{get:e[s],enumerable:!0})},g=(o,e,s,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r(e))!i.call(o,n)&&n!==s&&a(o,n,{get:()=>e[n],enumerable:!(t=l(e,n))||t.enumerable});return o};var c=o=>g(a({},"__esModule",{value:!0}),o);var k={};p(k,{conf:()=>u,language:()=>d});var u={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},d={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}};return c(k);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/ecl/ecl.js b/lib/vs/basic-languages/ecl/ecl.js deleted file mode 100644 index 38ee39d..0000000 --- a/lib/vs/basic-languages/ecl/ecl.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/ecl/ecl", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var t in e)r(o,t,{get:e[t],enumerable:!0})},d=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!l.call(o,n)&&n!==t&&r(o,n,{get:()=>e[n],enumerable:!(a=i(e,n))||a.enumerable});return o};var p=o=>d(r({},"__esModule",{value:!0}),o);var g={};c(g,{conf:()=>m,language:()=>u});var m={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},u={defaultToken:"",tokenPostfix:".ecl",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],pounds:["append","break","declare","demangle","end","for","getdatatype","if","inmodule","loop","mangle","onwarning","option","set","stored","uniquename"].join("|"),keywords:["__compressed__","after","all","and","any","as","atmost","before","beginc","best","between","case","cluster","compressed","compression","const","counter","csv","default","descend","embed","encoding","encrypt","end","endc","endembed","endmacro","enum","escape","except","exclusive","expire","export","extend","fail","few","fileposition","first","flat","forward","from","full","function","functionmacro","group","grouped","heading","hole","ifblock","import","in","inner","interface","internal","joined","keep","keyed","last","left","limit","linkcounted","literal","little_endian","load","local","locale","lookup","lzw","macro","many","maxcount","maxlength","min skew","module","mofn","multiple","named","namespace","nocase","noroot","noscan","nosort","not","noxpath","of","onfail","only","opt","or","outer","overwrite","packed","partition","penalty","physicallength","pipe","prefetch","quote","record","repeat","retry","return","right","right1","right2","rows","rowset","scan","scope","self","separator","service","shared","skew","skip","smart","soapaction","sql","stable","store","terminator","thor","threshold","timelimit","timeout","token","transform","trim","type","unicodeorder","unordered","unsorted","unstable","update","use","validate","virtual","whole","width","wild","within","wnotrim","xml","xpath"],functions:["abs","acos","aggregate","allnodes","apply","ascii","asin","assert","asstring","atan","atan2","ave","build","buildindex","case","catch","choose","choosen","choosesets","clustersize","combine","correlation","cos","cosh","count","covariance","cron","dataset","dedup","define","denormalize","dictionary","distribute","distributed","distribution","ebcdic","enth","error","evaluate","event","eventextra","eventname","exists","exp","fail","failcode","failmessage","fetch","fromunicode","fromxml","getenv","getisvalid","global","graph","group","hash","hash32","hash64","hashcrc","hashmd5","having","httpcall","httpheader","if","iff","index","intformat","isvalid","iterate","join","keydiff","keypatch","keyunicode","length","library","limit","ln","loadxml","local","log","loop","map","matched","matchlength","matchposition","matchtext","matchunicode","max","merge","mergejoin","min","nofold","nolocal","nonempty","normalize","nothor","notify","output","parallel","parse","pipe","power","preload","process","project","pull","random","range","rank","ranked","realformat","recordof","regexfind","regexreplace","regroup","rejected","rollup","round","roundup","row","rowdiff","sample","sequential","set","sin","sinh","sizeof","soapcall","sort","sorted","sqrt","stepped","stored","sum","table","tan","tanh","thisnode","topn","tounicode","toxml","transfer","transform","trim","truncate","typeof","ungroup","unicodeorder","variance","wait","which","workunit","xmldecode","xmlencode","xmltext","xmlunicode"],typesint:["integer","unsigned"].join("|"),typesnum:["data","qstring","string","unicode","utf8","varstring","varunicode"],typesone:["ascii","big_endian","boolean","data","decimal","ebcdic","grouped","integer","linkcounted","pattern","qstring","real","record","rule","set of","streamed","string","token","udecimal","unicode","unsigned","utf8","varstring","varunicode"].join("|"),operators:["+","-","/",":=","<","<>","=",">","\\","and","in","not","or"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]]}};return p(g);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/elixir/elixir.js b/lib/vs/basic-languages/elixir/elixir.js deleted file mode 100644 index 7cc3f87..0000000 --- a/lib/vs/basic-languages/elixir/elixir.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/elixir/elixir", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var i in e)o(t,i,{get:e[i],enumerable:!0})},c=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!a.call(t,n)&&n!==i&&o(t,n,{get:()=>e[n],enumerable:!(r=l(e,n))||r.enumerable});return t};var m=t=>c(o({},"__esModule",{value:!0}),t);var p={};d(p,{conf:()=>u,language:()=>g});var u={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}],autoClosingPairs:[{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["comment"]},{open:'"""',close:'"""'},{open:"`",close:"`",notIn:["string","comment"]},{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"<<",close:">>"}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}},g={defaultToken:"source",tokenPostfix:".elixir",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"<<",close:">>",token:"delimiter.angle.special"}],declarationKeywords:["def","defp","defn","defnp","defguard","defguardp","defmacro","defmacrop","defdelegate","defcallback","defmacrocallback","defmodule","defprotocol","defexception","defimpl","defstruct"],operatorKeywords:["and","in","not","or","when"],namespaceKeywords:["alias","import","require","use"],otherKeywords:["after","case","catch","cond","do","else","end","fn","for","if","quote","raise","receive","rescue","super","throw","try","unless","unquote_splicing","unquote","with"],constants:["true","false","nil"],nameBuiltin:["__MODULE__","__DIR__","__ENV__","__CALLER__","__STACKTRACE__"],operator:/-[->]?|!={0,2}|\*{1,2}|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,sigilModifiers:/[a-zA-Z0-9]*/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:"@whitespace"},{include:"@comments"},{include:"@keywordsShorthand"},{include:"@numbers"},{include:"@identifiers"},{include:"@strings"},{include:"@atoms"},{include:"@sigils"},{include:"@attributes"},{include:"@symbols"}],whitespace:[[/\s+/,"white"]],comments:[[/(#)(.*)/,["comment.punctuation","comment"]]],keywordsShorthand:[[/(@atomName)(:)(\s+)/,["constant","constant.punctuation","white"]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:"constant.delimiter",next:"@doubleQuotedStringKeyword"}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:"constant.delimiter",next:"@singleQuotedStringKeyword"}]],doubleQuotedStringKeyword:[[/":/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringKeyword:[[/':/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],numbers:[[/0b@binary/,"number.binary"],[/0o@octal/,"number.octal"],[/0x@hex/,"number.hex"],[/@decimal\.@decimal([eE]-?@decimal)?/,"number.float"],[/@decimal/,"number"]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,["keyword.declaration","white",{cases:{unquote:"keyword","@default":"function"}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":"keyword.declaration","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@default":"function.call"}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,["type.identifier","white","operator","white","function.call"]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,["constant.punctuation","constant","white","operator","white","function.call"]],[/(\|>)(\s*)(@variableName)/,["operator","white",{cases:{"@otherKeywords":"keyword","@default":"function.call"}}]],[/(&)(\s*)(@variableName)/,["operator","white","function.call"]],[/@variableName/,{cases:{"@declarationKeywords":"keyword.declaration","@operatorKeywords":"keyword.operator","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@constants":"constant.language","@nameBuiltin":"variable.language","_.*":"comment.unused","@default":"identifier"}}],[/@moduleName/,"type.identifier"]],strings:[[/"""/,{token:"string.delimiter",next:"@doubleQuotedHeredoc"}],[/'''/,{token:"string.delimiter",next:"@singleQuotedHeredoc"}],[/"/,{token:"string.delimiter",next:"@doubleQuotedString"}],[/'/,{token:"string.delimiter",next:"@singleQuotedString"}]],doubleQuotedHeredoc:[[/"""/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedHeredoc:[[/'''/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],doubleQuotedString:[[/"/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedString:[[/'/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],atoms:[[/(:)(@atomName)/,["constant.punctuation","constant"]],[/:"/,{token:"constant.delimiter",next:"@doubleQuotedStringAtom"}],[/:'/,{token:"constant.delimiter",next:"@singleQuotedStringAtom"}]],doubleQuotedStringAtom:[[/"/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringAtom:[[/'/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.interpol"}],[/~([A-Z]+)@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.noInterpol"}]],sigil:[[/~([a-z]|[A-Z]+)\{/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.{.}"}],[/~([a-z]|[A-Z]+)\[/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.[.]"}],[/~([a-z]|[A-Z]+)\(/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.(.)"}],[/~([a-z]|[A-Z]+)\"}],[/~([a-z]|[A-Z]+)(@sigilSymmetricDelimiter)/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.$2.$2"}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContentInterpol"}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,"string"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContent"}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContentInterpol"}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,"regexp"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContent"}],"sigilStart.interpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContentInterpol"}],"sigilStart.noInterpol":[[/~([a-z]|[A-Z]+)@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,"sigil"],[/(@sigilEndDelimiter)@sigilModifiers/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContent"}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:"comment.block.documentation",next:"@doubleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?'''/,{token:"comment.block.documentation",next:"@singleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?"/,{token:"comment.block.documentation",next:"@doubleQuotedStringDocstring"}],[/\@(module|type)?doc (~[sS])?'/,{token:"comment.block.documentation",next:"@singleQuotedStringDocstring"}],[/\@(module|type)?doc false/,"comment.block.documentation"],[/\@(@variableName)/,"variable"]],doubleQuotedHeredocDocstring:[[/"""/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedHeredocDocstring:[[/'''/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],doubleQuotedStringDocstring:[[/"/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],singleQuotedStringDocstring:[[/'/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],symbols:[[/\?(\\.|[^\\\s])/,"number.constant"],[/&\d+/,"operator"],[/<<<|>>>/,"operator"],[/[()\[\]\{\}]|<<|>>/,"@brackets"],[/\.\.\./,"identifier"],[/=>/,"punctuation"],[/@operator/,"operator"],[/[:;,.%]/,"punctuation"]],stringContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringContent"}],stringContent:[[/./,"string"]],stringConstantContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringConstantContent"}],stringConstantContent:[[/./,"constant"]],regexpContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@regexpContent"}],regexpContent:[[/(\s)(#)(\s.*)$/,["white","comment.punctuation","comment"]],[/./,"regexp"]],sigilContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@sigilContent"}],sigilContent:[[/./,"sigil"]],docstringContent:[[/./,"comment.block.documentation"]],escapeChar:[[/@escape/,"constant.character.escape"]],interpolation:[[/#{/,{token:"delimiter.bracket.embed",next:"@interpolationContinue"}]],interpolationContinue:[[/}/,{token:"delimiter.bracket.embed",next:"@pop"}],{include:"@root"}]}};return m(p);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/flow9/flow9.js b/lib/vs/basic-languages/flow9/flow9.js deleted file mode 100644 index 05018b2..0000000 --- a/lib/vs/basic-languages/flow9/flow9.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/flow9/flow9", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},m=(o,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!l.call(o,n)&&n!==t&&s(o,n,{get:()=>e[n],enumerable:!(i=r(e,n))||i.enumerable});return o};var p=o=>m(s({},"__esModule",{value:!0}),o);var u={};c(u,{conf:()=>g,language:()=>f});var g={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},f={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}};return p(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/freemarker2/freemarker2.js b/lib/vs/basic-languages/freemarker2/freemarker2.js deleted file mode 100644 index 9ca3f08..0000000 --- a/lib/vs/basic-languages/freemarker2/freemarker2.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/freemarker2/freemarker2", ["require","require"],(require)=>{ -var moduleExports=(()=>{var B=Object.create;var d=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,v=Object.prototype.hasOwnProperty;var w=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(n,i)=>(typeof require!="undefined"?require:n)[i]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var h=(t,n)=>()=>(n||t((n={exports:{}}).exports,n),n.exports),S=(t,n)=>{for(var i in n)d(t,i,{get:n[i],enumerable:!0})},s=(t,n,i,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of D(n))!v.call(t,o)&&o!==i&&d(t,o,{get:()=>n[o],enumerable:!(e=C(n,o))||e.enumerable});return t},m=(t,n,i)=>(s(t,n,"default"),i&&s(i,n,"default")),x=(t,n,i)=>(i=t!=null?B(T(t)):{},s(n||!t||!t.__esModule?d(i,"default",{value:t,enumerable:!0}):i,t)),I=t=>s(d({},"__esModule",{value:!0}),t);var F=h((q,f)=>{var y=x(w("vs/editor/editor.api"));f.exports=y});var M={};S(M,{TagAngleInterpolationBracket:()=>L,TagAngleInterpolationDollar:()=>R,TagAutoInterpolationBracket:()=>j,TagAutoInterpolationDollar:()=>Z,TagBracketInterpolationBracket:()=>O,TagBracketInterpolationDollar:()=>z});var _={};m(_,x(F()));var l=["assign","flush","ftl","return","global","import","include","break","continue","local","nested","nt","setting","stop","t","lt","rt","fallback"],k=["attempt","autoesc","autoEsc","compress","comment","escape","noescape","function","if","list","items","sep","macro","noparse","noParse","noautoesc","noAutoEsc","outputformat","switch","visit","recurse"],r={close:">",id:"angle",open:"<"},u={close:"\\]",id:"bracket",open:"\\["},P={close:"[>\\]]",id:"auto",open:"[<\\[]"},g={close:"\\}",id:"dollar",open1:"\\$",open2:"\\{"},A={close:"\\]",id:"bracket",open1:"\\[",open2:"="};function p(t){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],comments:{blockComment:[`${t.open}--`,`--${t.close}`]},autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`${t.open}#(?:${k.join("|")})([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),end:new RegExp(`${t.open}/#(?:${k.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`${t.open}#(?!(?:${l.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),afterText:new RegExp(`^${t.open}/#([a-zA-Z_]+)[\\r\\n\\t ]*${t.close}$`),action:{indentAction:_.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`${t.open}#(?!(?:${l.join("|")}))([a-zA-Z_]+)([^/${t.close}]*(?!/)${t.close})[^${t.open}]*$`),action:{indentAction:_.languages.IndentAction.Indent}}]}}function b(){return{brackets:[["<",">"],["[","]"],["(",")"],["{","}"]],autoCloseBefore:` -\r }]),.:;=`,autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],folding:{markers:{start:new RegExp(`[<\\[]#(?:${k.join("|")})([^/>\\]]*(?!/)[>\\]])[^<\\[]*$`),end:new RegExp(`[<\\[]/#(?:${k.join("|")})[\\r\\n\\t ]*>`)}},onEnterRules:[{beforeText:new RegExp(`[<\\[]#(?!(?:${l.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),afterText:new RegExp("^[<\\[]/#([a-zA-Z_]+)[\\r\\n\\t ]*[>\\]]$"),action:{indentAction:_.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`[<\\[]#(?!(?:${l.join("|")}))([a-zA-Z_]+)([^/>\\]]*(?!/)[>\\]])[^[<\\[]]*$`),action:{indentAction:_.languages.IndentAction.Indent}}]}}function a(t,n){let i=`_${t.id}_${n.id}`,e=c=>c.replace(/__id__/g,i),o=c=>{let E=c.source.replace(/__id__/g,i);return new RegExp(E,c.flags)};return{unicode:!0,includeLF:!1,start:e("default__id__"),ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],[e("open__id__")]:new RegExp(t.open),[e("close__id__")]:new RegExp(t.close),[e("iOpen1__id__")]:new RegExp(n.open1),[e("iOpen2__id__")]:new RegExp(n.open2),[e("iClose__id__")]:new RegExp(n.close),[e("startTag__id__")]:o(/(@open__id__)(#)/),[e("endTag__id__")]:o(/(@open__id__)(\/#)/),[e("startOrEndTag__id__")]:o(/(@open__id__)(\/?#)/),[e("closeTag1__id__")]:o(/((?:@blank)*)(@close__id__)/),[e("closeTag2__id__")]:o(/((?:@blank)*\/?)(@close__id__)/),blank:/[ \t\n\r]/,keywords:["false","true","in","as","using"],directiveStartCloseTag1:/attempt|recover|sep|auto[eE]sc|no(?:autoe|AutoE)sc|compress|default|no[eE]scape|comment|no[pP]arse/,directiveStartCloseTag2:/else|break|continue|return|stop|flush|t|lt|rt|nt|nested|recurse|fallback|ftl/,directiveStartBlank:/if|else[iI]f|list|for[eE]ach|switch|case|assign|global|local|include|import|function|macro|transform|visit|stop|return|call|setting|output[fF]ormat|nested|recurse|escape|ftl|items/,directiveEndCloseTag1:/if|list|items|sep|recover|attempt|for[eE]ach|local|global|assign|function|macro|output[fF]ormat|auto[eE]sc|no(?:autoe|AutoE)sc|compress|transform|switch|escape|no[eE]scape/,escapedChar:/\\(?:[ntrfbgla\\'"\{=]|(?:x[0-9A-Fa-f]{1,4}))/,asciiDigit:/[0-9]/,integer:/[0-9]+/,nonEscapedIdStartChar:/[\$@-Z_a-z\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u1FFF\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183-\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3006\u3031-\u3035\u303B-\u303C\u3040-\u318F\u31A0-\u31BA\u31F0-\u31FF\u3300-\u337F\u3400-\u4DB5\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,escapedIdChar:/\\[\-\.:#]/,idStartChar:/(?:@nonEscapedIdStartChar)|(?:@escapedIdChar)/,id:/(?:@idStartChar)(?:(?:@idStartChar)|(?:@asciiDigit))*/,specialHashKeys:/\*\*|\*|false|true|in|as|using/,namedSymbols:/<=|>=|\\lte|\\lt|<|\\gte|\\gt|>|&&|\\and|->|->|==|!=|\+=|-=|\*=|\/=|%=|\+\+|--|<=|&&|\|\||:|\.\.\.|\.\.\*|\.\.<|\.\.!|\?\?|=|<|\+|-|\*|\/|%|\||\.\.|\?|!|&|\.|,|;/,arrows:["->","->"],delimiters:[";",":",",","."],stringOperators:["lte","lt","gte","gt"],noParseTags:["noparse","noParse","comment"],tokenizer:{[e("default__id__")]:[{include:e("@directive_token__id__")},{include:e("@interpolation_and_text_token__id__")}],[e("fmExpression__id__.directive")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("fmExpression__id__.interpolation")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("inParen__id__.plain")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("inParen__id__.gt")]:[{include:e("@blank_and_expression_comment_token__id__")},{include:e("@expression_token__id__")},{include:e("@greater_operators_token__id__")}],[e("noSpaceExpression__id__")]:[{include:e("@no_space_expression_end_token__id__")},{include:e("@directive_end_token__id__")},{include:e("@expression_token__id__")}],[e("unifiedCall__id__")]:[{include:e("@unified_call_token__id__")}],[e("singleString__id__")]:[{include:e("@string_single_token__id__")}],[e("doubleString__id__")]:[{include:e("@string_double_token__id__")}],[e("rawSingleString__id__")]:[{include:e("@string_single_raw_token__id__")}],[e("rawDoubleString__id__")]:[{include:e("@string_double_raw_token__id__")}],[e("expressionComment__id__")]:[{include:e("@expression_comment_token__id__")}],[e("noParse__id__")]:[{include:e("@no_parse_token__id__")}],[e("terseComment__id__")]:[{include:e("@terse_comment_token__id__")}],[e("directive_token__id__")]:[[o(/(?:@startTag__id__)(@directiveStartCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{cases:{"@noParseTags":{token:"tag",next:e("@noParse__id__.$3")},"@default":{token:"tag"}}},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartCloseTag2)(?:@closeTag2__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(?:@startTag__id__)(@directiveStartBlank)(@blank)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(?:@endTag__id__)(@directiveEndCloseTag1)(?:@closeTag1__id__)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)(@)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive",next:e("@unifiedCall__id__")}]],[o(/(@open__id__)(\/@)((?:(?:@id)(?:\.(?:@id))*)?)(?:@closeTag1__id__)/),[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive"}]],[o(/(@open__id__)#--/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:{token:"comment",next:e("@terseComment__id__")}],[o(/(?:@startOrEndTag__id__)([a-zA-Z_]+)/),t.id==="auto"?{cases:{"$1==<":{token:"@rematch",switchTo:`@default_angle_${n.id}`},"$1==[":{token:"@rematch",switchTo:`@default_bracket_${n.id}`}}}:[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag.invalid",next:e("@fmExpression__id__.directive")}]]],[e("interpolation_and_text_token__id__")]:[[o(/(@iOpen1__id__)(@iOpen2__id__)/),[{token:n.id==="bracket"?"@brackets.interpolation":"delimiter.interpolation"},{token:n.id==="bracket"?"delimiter.interpolation":"@brackets.interpolation",next:e("@fmExpression__id__.interpolation")}]],[/[\$#<\[\{]|(?:@blank)+|[^\$<#\[\{\n\r\t ]+/,{token:"source"}]],[e("string_single_token__id__")]:[[/[^'\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/'/,{token:"string",next:"@pop"}]],[e("string_double_token__id__")]:[[/[^"\\]/,{token:"string"}],[/@escapedChar/,{token:"string.escape"}],[/"/,{token:"string",next:"@pop"}]],[e("string_single_raw_token__id__")]:[[/[^']+/,{token:"string.raw"}],[/'/,{token:"string.raw",next:"@pop"}]],[e("string_double_raw_token__id__")]:[[/[^"]+/,{token:"string.raw"}],[/"/,{token:"string.raw",next:"@pop"}]],[e("expression_token__id__")]:[[/(r?)(['"])/,{cases:{"r'":[{token:"keyword"},{token:"string.raw",next:e("@rawSingleString__id__")}],'r"':[{token:"keyword"},{token:"string.raw",next:e("@rawDoubleString__id__")}],"'":[{token:"source"},{token:"string",next:e("@singleString__id__")}],'"':[{token:"source"},{token:"string",next:e("@doubleString__id__")}]}}],[/(?:@integer)(?:\.(?:@integer))?/,{cases:{"(?:@integer)":{token:"number"},"@default":{token:"number.float"}}}],[/(\.)(@blank*)(@specialHashKeys)/,[{token:"delimiter"},{token:""},{token:"identifier"}]],[/(?:@namedSymbols)/,{cases:{"@arrows":{token:"meta.arrow"},"@delimiters":{token:"delimiter"},"@default":{token:"operators"}}}],[/@id/,{cases:{"@keywords":{token:"keyword.$0"},"@stringOperators":{token:"operators"},"@default":{token:"identifier"}}}],[/[\[\]\(\)\{\}]/,{cases:{"\\[":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\]":{cases:{...n.id==="bracket"?{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}}:{},...t.id==="bracket"?{"$S2==directive":{token:"@brackets.directive",next:"@popall"}}:{},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\(":{token:"@brackets",next:e("@inParen__id__.gt")},"\\)":{cases:{[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}},"\\{":{cases:{"$S2==gt":{token:"@brackets",next:e("@inParen__id__.gt")},"@default":{token:"@brackets",next:e("@inParen__id__.plain")}}},"\\}":{cases:{...n.id==="bracket"?{}:{"$S2==interpolation":{token:"@brackets.interpolation",next:"@popall"}},[e("$S1==inParen__id__")]:{token:"@brackets",next:"@pop"},"@default":{token:"@brackets"}}}}}],[/\$\{/,{token:"delimiter.invalid"}]],[e("blank_and_expression_comment_token__id__")]:[[/(?:@blank)+/,{token:""}],[/[<\[][#!]--/,{token:"comment",next:e("@expressionComment__id__")}]],[e("directive_end_token__id__")]:[[/>/,t.id==="bracket"?{token:"operators"}:{token:"@brackets.directive",next:"@popall"}],[o(/(\/)(@close__id__)/),[{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]]],[e("greater_operators_token__id__")]:[[/>/,{token:"operators"}],[/>=/,{token:"operators"}]],[e("no_space_expression_end_token__id__")]:[[/(?:@blank)+/,{token:"",switchTo:e("@fmExpression__id__.directive")}]],[e("unified_call_token__id__")]:[[/(@id)((?:@blank)+)/,[{token:"tag"},{token:"",next:e("@fmExpression__id__.directive")}]],[o(/(@id)(\/?)(@close__id__)/),[{token:"tag"},{token:"delimiter.directive"},{token:"@brackets.directive",next:"@popall"}]],[/./,{token:"@rematch",next:e("@noSpaceExpression__id__")}]],[e("no_parse_token__id__")]:[[o(/(@open__id__)(\/#?)([a-zA-Z]+)((?:@blank)*)(@close__id__)/),{cases:{"$S2==$3":[{token:"@brackets.directive"},{token:"delimiter.directive"},{token:"tag"},{token:""},{token:"@brackets.directive",next:"@popall"}],"$S2==comment":[{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"},{token:"comment"}],"@default":[{token:"source"},{token:"source"},{token:"source"},{token:"source"},{token:"source"}]}}],[/[^<\[\-]+|[<\[\-]/,{cases:{"$S2==comment":{token:"comment"},"@default":{token:"source"}}}]],[e("expression_comment_token__id__")]:[[/--[>\]]/,{token:"comment",next:"@pop"}],[/[^\->\]]+|[>\]\-]/,{token:"comment"}]],[e("terse_comment_token__id__")]:[[o(/--(?:@close__id__)/),{token:"comment",next:"@popall"}],[/[^<\[\-]+|[<\[\-]/,{token:"comment"}]]}}}function $(t){let n=a(r,t),i=a(u,t),e=a(P,t);return{...n,...i,...e,unicode:!0,includeLF:!1,start:`default_auto_${t.id}`,ignoreCase:!1,defaultToken:"invalid",tokenPostfix:".freemarker2",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{...n.tokenizer,...i.tokenizer,...e.tokenizer}}}var R={conf:p(r),language:a(r,g)},z={conf:p(u),language:a(u,g)},L={conf:p(r),language:a(r,A)},O={conf:p(u),language:a(u,A)},Z={conf:b(),language:$(g)},j={conf:b(),language:$(A)};return I(M);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/fsharp/fsharp.js b/lib/vs/basic-languages/fsharp/fsharp.js deleted file mode 100644 index d343b56..0000000 --- a/lib/vs/basic-languages/fsharp/fsharp.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/fsharp/fsharp", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var o in e)s(n,o,{get:e[o],enumerable:!0})},g=(n,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!l.call(n,t)&&t!==o&&s(n,t,{get:()=>e[t],enumerable:!(i=r(e,t))||i.enumerable});return n};var f=n=>g(s({},"__esModule",{value:!0}),n);var d={};c(d,{conf:()=>m,language:()=>u});var m={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},u={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}};return f(d);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/go/go.js b/lib/vs/basic-languages/go/go.js deleted file mode 100644 index 9b72a2f..0000000 --- a/lib/vs/basic-languages/go/go.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/go/go", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var m=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},l=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of a(e))!c.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=i(e,o))||r.enumerable});return n};var g=n=>l(s({},"__esModule",{value:!0}),n);var d={};m(d,{conf:()=>p,language:()=>u});var p={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},u={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}};return g(d);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/graphql/graphql.js b/lib/vs/basic-languages/graphql/graphql.js deleted file mode 100644 index 0bcba1b..0000000 --- a/lib/vs/basic-languages/graphql/graphql.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/graphql/graphql", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)s(n,t,{get:e[t],enumerable:!0})},d=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!l.call(n,o)&&o!==t&&s(n,o,{get:()=>e[o],enumerable:!(r=a(e,o))||r.enumerable});return n};var p=n=>d(s({},"__esModule",{value:!0}),n);var u={};c(u,{conf:()=>g,language:()=>I});var g={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},I={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}};return p(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/handlebars/handlebars.js b/lib/vs/basic-languages/handlebars/handlebars.js deleted file mode 100644 index 377ea0a..0000000 --- a/lib/vs/basic-languages/handlebars/handlebars.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/handlebars/handlebars", ["require","require"],(require)=>{ -var moduleExports=(()=>{var h=Object.create;var i=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var y=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var T=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),S=(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},m=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of u(t))!k.call(e,r)&&r!==n&&i(e,r,{get:()=>t[r],enumerable:!(o=b(t,r))||o.enumerable});return e},l=(e,t,n)=>(m(e,t,"default"),n&&m(n,t,"default")),s=(e,t,n)=>(n=e!=null?h(x(e)):{},m(t||!e||!e.__esModule?i(n,"default",{value:e,enumerable:!0}):n,e)),E=e=>m(i({},"__esModule",{value:!0}),e);var c=T((I,d)=>{var w=s(y("vs/editor/editor.api"));d.exports=w});var f={};S(f,{conf:()=>g,language:()=>$});var a={};l(a,s(c()));var p=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],g={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[[""],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${p.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${p.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:a.languages.IndentAction.Indent}}]},$={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}};return E(f);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/hcl/hcl.js b/lib/vs/basic-languages/hcl/hcl.js deleted file mode 100644 index db9caeb..0000000 --- a/lib/vs/basic-languages/hcl/hcl.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/hcl/hcl", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var o in e)r(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of i(e))!c.call(t,s)&&s!==o&&r(t,s,{get:()=>e[s],enumerable:!(n=a(e,s))||n.enumerable});return t};var m=t=>d(r({},"__esModule",{value:!0}),t);var f={};l(f,{conf:()=>p,language:()=>g});var p={comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},g={defaultToken:"",tokenPostfix:".hcl",keywords:["var","local","path","for_each","any","string","number","bool","true","false","null","if ","else ","endif ","for ","in","endfor"],operators:["=",">=","<=","==","!=","+","-","*","/","%","&&","||","!","<",">","?","...",":"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"/,"string","@string"],[/'/,"invalid"]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/\$\{/,{token:"delimiter",next:"@stringExpression"}],[/[^\\"\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@popall"]],stringInsideExpression:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],stringExpression:[[/\}/,{token:"delimiter",next:"@pop"}],[/"/,"string","@stringInsideExpression"],{include:"@terraform"}]}};return m(f);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/html/html.js b/lib/vs/basic-languages/html/html.js deleted file mode 100644 index 695e62f..0000000 --- a/lib/vs/basic-languages/html/html.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/html/html", ["require","require"],(require)=>{ -var moduleExports=(()=>{var u=Object.create;var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,g=Object.prototype.hasOwnProperty;var k=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var E=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),T=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},o=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of x(t))!g.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(s=b(t,r))||s.enumerable});return e},d=(e,t,n)=>(o(e,t,"default"),n&&o(n,t,"default")),m=(e,t,n)=>(n=e!=null?u(y(e)):{},o(t||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e)),w=e=>o(a({},"__esModule",{value:!0}),e);var l=E((A,p)=>{var h=m(k("vs/editor/editor.api"));p.exports=h});var $={};T($,{conf:()=>v,language:()=>f});var i={};d(i,m(l()));var c=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],v={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:[""]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${c.join("|")}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:i.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${c.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:i.languages.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},f={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"module"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/'module'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.text/javascript"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};return w($);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/ini/ini.js b/lib/vs/basic-languages/ini/ini.js deleted file mode 100644 index 97bbcc1..0000000 --- a/lib/vs/basic-languages/ini/ini.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/ini/ini", ["require","require"],(require)=>{ -var moduleExports=(()=>{var t=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var s in e)t(n,s,{get:e[s],enumerable:!0})},l=(n,e,s,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of r(e))!g.call(n,o)&&o!==s&&t(n,o,{get:()=>e[o],enumerable:!(a=i(e,o))||a.enumerable});return n};var p=n=>l(t({},"__esModule",{value:!0}),n);var f={};c(f,{conf:()=>u,language:()=>m});var u={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},m={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}};return p(f);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/java/java.js b/lib/vs/basic-languages/java/java.js deleted file mode 100644 index 79d85eb..0000000 --- a/lib/vs/basic-languages/java/java.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/java/java", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},d=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of r(e))!c.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(i=a(e,n))||i.enumerable});return t};var g=t=>d(s({},"__esModule",{value:!0}),t);var f={};l(f,{conf:()=>m,language:()=>p});var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},p={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false","yield","record","sealed","non-sealed","permits"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}};return g(f);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/javascript/javascript.js b/lib/vs/basic-languages/javascript/javascript.js deleted file mode 100644 index ea5d9e2..0000000 --- a/lib/vs/basic-languages/javascript/javascript.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/javascript/javascript", ["require","require"],(require)=>{ -var moduleExports=(()=>{var x=Object.create;var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var y=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),h=(e,t)=>{for(var n in t)a(e,n,{get:t[n],enumerable:!0})},s=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!k.call(e,r)&&r!==n&&a(e,r,{get:()=>t[r],enumerable:!(c=u(t,r))||c.enumerable});return e},g=(e,t,n)=>(s(e,t,"default"),n&&s(n,t,"default")),p=(e,t,n)=>(n=e!=null?x(b(e)):{},s(t||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e)),v=e=>s(a({},"__esModule",{value:!0}),e);var d=w((C,l)=>{var A=p(y("vs/editor/editor.api"));l.exports=A});var _={};h(_,{conf:()=>$,language:()=>T});var i={};g(i,p(d()));var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:i.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:i.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:i.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:i.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},o={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};var $=m,T={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","static","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:o.operators,symbols:o.symbols,escapes:o.escapes,digits:o.digits,octaldigits:o.octaldigits,binarydigits:o.binarydigits,hexdigits:o.hexdigits,regexpctl:o.regexpctl,regexpesc:o.regexpesc,tokenizer:o.tokenizer};return v(_);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/julia/julia.js b/lib/vs/basic-languages/julia/julia.js deleted file mode 100644 index 1551ab9..0000000 --- a/lib/vs/basic-languages/julia/julia.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/julia/julia", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var n in e)o(t,n,{get:e[n],enumerable:!0})},l=(t,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of s(e))!p.call(t,r)&&r!==n&&o(t,r,{get:()=>e[r],enumerable:!(a=i(e,r))||a.enumerable});return t};var d=t=>l(o({},"__esModule",{value:!0}),t);var u={};c(u,{conf:()=>g,language:()=>m});var g={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},m={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","\u03C0","\u212F","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","\xF7","\u2208","\u2209","\u220B","\u220C","\u2218","\u221A","\u221B","\u2229","\u222A","\u2248","\u2249","\u2260","\u2261","\u2262","\u2264","\u2265","\u2286","\u2287","\u2288","\u2289","\u228A","\u228B","\u22BB"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/π|ℯ|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}};return d(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/kotlin/kotlin.js b/lib/vs/basic-languages/kotlin/kotlin.js deleted file mode 100644 index 8e85cf8..0000000 --- a/lib/vs/basic-languages/kotlin/kotlin.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/kotlin/kotlin", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(n,e)=>{for(var i in e)o(n,i,{get:e[i],enumerable:!0})},d=(n,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of r(e))!c.call(n,t)&&t!==i&&o(n,t,{get:()=>e[t],enumerable:!(s=a(e,t))||s.enumerable});return n};var g=n=>d(o({},"__esModule",{value:!0}),n);var f={};l(f,{conf:()=>m,language:()=>p});var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},p={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}};return g(f);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/less/less.js b/lib/vs/basic-languages/less/less.js deleted file mode 100644 index 4e69a16..0000000 --- a/lib/vs/basic-languages/less/less.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/less/less", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var i in e)r(t,i,{get:e[i],enumerable:!0})},u=(t,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!l.call(t,n)&&n!==i&&r(t,n,{get:()=>e[n],enumerable:!(o=s(e,n))||o.enumerable});return t};var c=t=>u(r({},"__esModule",{value:!0}),t);var p={};d(p,{conf:()=>m,language:()=>g});var m={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},g={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},[`[^)\r -]+`,"string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}};return c(p);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/lexon/lexon.js b/lib/vs/basic-languages/lexon/lexon.js deleted file mode 100644 index 18909f6..0000000 --- a/lib/vs/basic-languages/lexon/lexon.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/lexon/lexon", ["require","require"],(require)=>{ -var moduleExports=(()=>{var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var i in e)n(t,i,{get:e[i],enumerable:!0})},p=(t,e,i,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of d(e))!a.call(t,o)&&o!==i&&n(t,o,{get:()=>e[o],enumerable:!(r=s(e,o))||r.enumerable});return t};var c=t=>p(n({},"__esModule",{value:!0}),t);var k={};l(k,{conf:()=>m,language:()=>u});var m={comments:{lineComment:"COMMENT"},brackets:[["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:":",close:"."}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}},u={tokenPostfix:".lexon",ignoreCase:!0,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}};return c(k);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/liquid/liquid.js b/lib/vs/basic-languages/liquid/liquid.js deleted file mode 100644 index 39bb9ef..0000000 --- a/lib/vs/basic-languages/liquid/liquid.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/liquid/liquid", ["require","require"],(require)=>{ -var moduleExports=(()=>{var p=Object.create;var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var h=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,i)=>(typeof require!="undefined"?require:t)[i]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),T=(e,t)=>{for(var i in t)a(e,i,{get:t[i],enumerable:!0})},r=(e,t,i,l)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of w(t))!q.call(e,o)&&o!==i&&a(e,o,{get:()=>t[o],enumerable:!(l=g(t,o))||l.enumerable});return e},d=(e,t,i)=>(r(e,t,"default"),i&&r(i,t,"default")),s=(e,t,i)=>(i=e!=null?p(h(e)):{},r(t||!e||!e.__esModule?a(i,"default",{value:e,enumerable:!0}):i,e)),k=e=>r(a({},"__esModule",{value:!0}),e);var c=b((y,u)=>{var _=s(f("vs/editor/editor.api"));u.exports=_});var $={};T($,{conf:()=>x,language:()=>S});var n={};d(n,s(c()));var m=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],x={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[[""],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:n.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${m.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:n.languages.IndentAction.Indent}}]},S={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[//,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}};return k($);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/lua/lua.js b/lib/vs/basic-languages/lua/lua.js deleted file mode 100644 index 4da773c..0000000 --- a/lib/vs/basic-languages/lua/lua.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/lua/lua", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},m=(o,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i(e))!l.call(o,n)&&n!==t&&s(o,n,{get:()=>e[n],enumerable:!(r=a(e,n))||r.enumerable});return o};var p=o=>m(s({},"__esModule",{value:!0}),o);var u={};c(u,{conf:()=>d,language:()=>g});var d={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},g={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var R=(o,e)=>{for(var s in e)r(o,s,{get:e[s],enumerable:!0})},c=(o,e,s,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!i.call(o,t)&&t!==s&&r(o,t,{get:()=>e[t],enumerable:!(n=E(e,t))||n.enumerable});return o};var m=o=>c(r({},"__esModule",{value:!0}),o);var N={};R(N,{conf:()=>A,language:()=>p});var A={comments:{blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"(*",close:"*)"},{open:"<*",close:"*>"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}]},p={defaultToken:"",tokenPostfix:".m3",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["AND","ANY","ARRAY","AS","BEGIN","BITS","BRANDED","BY","CASE","CONST","DIV","DO","ELSE","ELSIF","END","EVAL","EXCEPT","EXCEPTION","EXIT","EXPORTS","FINALLY","FOR","FROM","GENERIC","IF","IMPORT","IN","INTERFACE","LOCK","LOOP","METHODS","MOD","MODULE","NOT","OBJECT","OF","OR","OVERRIDES","PROCEDURE","RAISE","RAISES","READONLY","RECORD","REF","REPEAT","RETURN","REVEAL","SET","THEN","TO","TRY","TYPE","TYPECASE","UNSAFE","UNTIL","UNTRACED","VALUE","VAR","WHILE","WITH"],reservedConstNames:["ABS","ADR","ADRSIZE","BITSIZE","BYTESIZE","CEILING","DEC","DISPOSE","FALSE","FIRST","FLOAT","FLOOR","INC","ISTYPE","LAST","LOOPHOLE","MAX","MIN","NARROW","NEW","NIL","NUMBER","ORD","ROUND","SUBARRAY","TRUE","TRUNC","TYPECODE","VAL"],reservedTypeNames:["ADDRESS","ANY","BOOLEAN","CARDINAL","CHAR","EXTENDED","INTEGER","LONGCARD","LONGINT","LONGREAL","MUTEX","NULL","REAL","REFANY","ROOT","TEXT"],operators:["+","-","*","/","&","^","."],relations:["=","#","<","<=",">",">=","<:",":"],delimiters:["|","..","=>",",",";",":="],symbols:/[>=<#.,:;+\-*/&^]+/,escapes:/\\(?:[\\fnrt"']|[0-7]{3})/,tokenizer:{root:[[/_\w*/,"invalid"],[/[a-zA-Z][a-zA-Z0-9_]*/,{cases:{"@keywords":{token:"keyword.$0"},"@reservedConstNames":{token:"constant.reserved.$0"},"@reservedTypeNames":{token:"type.reserved.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/,"number.float"],[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/,"number"],[/@symbols/,{cases:{"@operators":"operators","@relations":"operators","@delimiters":"delimiter","@default":"invalid"}}],[/'[^\\']'/,"string.char"],[/(')(@escapes)(')/,["string.char","string.escape","string.char"]],[/'/,"invalid"],[/"([^"\\]|\\.)*$/,"invalid"],[/"/,"string.text","@text"]],text:[[/[^\\"]+/,"string.text"],[/@escapes/,"string.escape"],[/\\./,"invalid"],[/"/,"string.text","@pop"]],comment:[[/\(\*/,"comment","@push"],[/\*\)/,"comment","@pop"],[/./,"comment"]],pragma:[[/<\*/,"keyword.pragma","@push"],[/\*>/,"keyword.pragma","@pop"],[/./,"keyword.pragma"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/<\*/,"keyword.pragma","@pragma"]]}};return m(N);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/markdown/markdown.js b/lib/vs/basic-languages/markdown/markdown.js deleted file mode 100644 index e5f0236..0000000 --- a/lib/vs/basic-languages/markdown/markdown.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/markdown/markdown", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},m=(t,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of c(e))!i.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(a=r(e,n))||a.enumerable});return t};var d=t=>m(s({},"__esModule",{value:!0}),t);var b={};l(b,{conf:()=>p,language:()=>g});var p={comments:{blockComment:[""]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},g={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)(\-|\w)*/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)(\-|\w)*\s*>/,{token:"tag"}],[//,"comment","@pop"],[//,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};return l(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/pla/pla.js b/lib/vs/basic-languages/pla/pla.js deleted file mode 100644 index f668b46..0000000 --- a/lib/vs/basic-languages/pla/pla.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/pla/pla", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var r=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var l=(o,e)=>{for(var n in e)s(o,n,{get:e[n],enumerable:!0})},c=(o,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of r(e))!p.call(o,t)&&t!==n&&s(o,t,{get:()=>e[t],enumerable:!(i=a(e,t))||i.enumerable});return o};var d=o=>c(s({},"__esModule",{value:!0}),o);var u={};l(u,{conf:()=>k,language:()=>m});var k={comments:{lineComment:"#"},brackets:[["[","]"],["<",">"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}]},m={defaultToken:"",tokenPostfix:".pla",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"<",close:">",token:"delimiter.angle"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:[".i",".o",".mv",".ilb",".ob",".label",".type",".phase",".pair",".symbolic",".symbolic-output",".kiss",".p",".e",".end"],comment:/#.*$/,identifier:/[a-zA-Z]+[a-zA-Z0-9_\-]*/,plaContent:/[01\-~\|]+/,tokenizer:{root:[{include:"@whitespace"},[/@comment/,"comment"],[/\.([a-zA-Z_\-]+)/,{cases:{"@eos":{token:"keyword.$1"},"@keywords":{cases:{".type":{token:"keyword.$1",next:"@type"},"@default":{token:"keyword.$1",next:"@keywordArg"}}},"@default":{token:"keyword.$1"}}}],[/@identifier/,"identifier"],[/@plaContent/,"string"]],whitespace:[[/[ \t\r\n]+/,""]],type:[{include:"@whitespace"},[/\w+/,{token:"type",next:"@pop"}]],keywordArg:[[/[ \t\r\n]+/,{cases:{"@eos":{token:"",next:"@pop"},"@default":""}}],[/@comment/,"comment","@pop"],[/[<>()\[\]]/,{cases:{"@eos":{token:"@brackets",next:"@pop"},"@default":"@brackets"}}],[/\-?\d+/,{cases:{"@eos":{token:"number",next:"@pop"},"@default":"number"}}],[/@identifier/,{cases:{"@eos":{token:"identifier",next:"@pop"},"@default":"identifier"}}],[/[;=]/,{cases:{"@eos":{token:"delimiter",next:"@pop"},"@default":"delimiter"}}]]}};return d(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/postiats/postiats.js b/lib/vs/basic-languages/postiats/postiats.js deleted file mode 100644 index 839e36a..0000000 --- a/lib/vs/basic-languages/postiats/postiats.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/postiats/postiats", ["require","require"],(require)=>{ -var moduleExports=(()=>{var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of s(e))!c.call(t,n)&&n!==o&&i(t,n,{get:()=>e[n],enumerable:!(r=a(e,n))||r.enumerable});return t};var d=t=>l(i({},"__esModule",{value:!0}),t);var g={};p(g,{conf:()=>m,language:()=>x});var m={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},x={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}};return d(g);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/powerquery/powerquery.js b/lib/vs/basic-languages/powerquery/powerquery.js deleted file mode 100644 index dd44f0b..0000000 --- a/lib/vs/basic-languages/powerquery/powerquery.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/powerquery/powerquery", ["require","require"],(require)=>{ -var moduleExports=(()=>{var i=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var n in e)i(t,n,{get:e[n],enumerable:!0})},m=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of s(e))!l.call(t,a)&&a!==n&&i(t,a,{get:()=>e[a],enumerable:!(o=r(e,a))||o.enumerable});return t};var u=t=>m(i({},"__esModule",{value:!0}),t);var b={};T(b,{conf:()=>d,language:()=>c});var d={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment","identifier"]},{open:"[",close:"]",notIn:["string","comment","identifier"]},{open:"(",close:")",notIn:["string","comment","identifier"]},{open:"{",close:"}",notIn:["string","comment","identifier"]}]},c={defaultToken:"",tokenPostfix:".pq",ignoreCase:!1,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],operatorKeywords:["and","not","or"],keywords:["as","each","else","error","false","if","in","is","let","meta","otherwise","section","shared","then","true","try","type"],constructors:["#binary","#date","#datetime","#datetimezone","#duration","#table","#time"],constants:["#infinity","#nan","#sections","#shared"],typeKeywords:["action","any","anynonnull","none","null","logical","number","time","date","datetime","datetimezone","duration","text","binary","list","record","table","function"],builtinFunctions:["Access.Database","Action.Return","Action.Sequence","Action.Try","ActiveDirectory.Domains","AdoDotNet.DataSource","AdoDotNet.Query","AdobeAnalytics.Cubes","AnalysisServices.Database","AnalysisServices.Databases","AzureStorage.BlobContents","AzureStorage.Blobs","AzureStorage.Tables","Binary.Buffer","Binary.Combine","Binary.Compress","Binary.Decompress","Binary.End","Binary.From","Binary.FromList","Binary.FromText","Binary.InferContentType","Binary.Length","Binary.ToList","Binary.ToText","BinaryFormat.7BitEncodedSignedInteger","BinaryFormat.7BitEncodedUnsignedInteger","BinaryFormat.Binary","BinaryFormat.Byte","BinaryFormat.ByteOrder","BinaryFormat.Choice","BinaryFormat.Decimal","BinaryFormat.Double","BinaryFormat.Group","BinaryFormat.Length","BinaryFormat.List","BinaryFormat.Null","BinaryFormat.Record","BinaryFormat.SignedInteger16","BinaryFormat.SignedInteger32","BinaryFormat.SignedInteger64","BinaryFormat.Single","BinaryFormat.Text","BinaryFormat.Transform","BinaryFormat.UnsignedInteger16","BinaryFormat.UnsignedInteger32","BinaryFormat.UnsignedInteger64","Byte.From","Character.FromNumber","Character.ToNumber","Combiner.CombineTextByDelimiter","Combiner.CombineTextByEachDelimiter","Combiner.CombineTextByLengths","Combiner.CombineTextByPositions","Combiner.CombineTextByRanges","Comparer.Equals","Comparer.FromCulture","Comparer.Ordinal","Comparer.OrdinalIgnoreCase","Csv.Document","Cube.AddAndExpandDimensionColumn","Cube.AddMeasureColumn","Cube.ApplyParameter","Cube.AttributeMemberId","Cube.AttributeMemberProperty","Cube.CollapseAndRemoveColumns","Cube.Dimensions","Cube.DisplayFolders","Cube.Measures","Cube.Parameters","Cube.Properties","Cube.PropertyKey","Cube.ReplaceDimensions","Cube.Transform","Currency.From","DB2.Database","Date.AddDays","Date.AddMonths","Date.AddQuarters","Date.AddWeeks","Date.AddYears","Date.Day","Date.DayOfWeek","Date.DayOfWeekName","Date.DayOfYear","Date.DaysInMonth","Date.EndOfDay","Date.EndOfMonth","Date.EndOfQuarter","Date.EndOfWeek","Date.EndOfYear","Date.From","Date.FromText","Date.IsInCurrentDay","Date.IsInCurrentMonth","Date.IsInCurrentQuarter","Date.IsInCurrentWeek","Date.IsInCurrentYear","Date.IsInNextDay","Date.IsInNextMonth","Date.IsInNextNDays","Date.IsInNextNMonths","Date.IsInNextNQuarters","Date.IsInNextNWeeks","Date.IsInNextNYears","Date.IsInNextQuarter","Date.IsInNextWeek","Date.IsInNextYear","Date.IsInPreviousDay","Date.IsInPreviousMonth","Date.IsInPreviousNDays","Date.IsInPreviousNMonths","Date.IsInPreviousNQuarters","Date.IsInPreviousNWeeks","Date.IsInPreviousNYears","Date.IsInPreviousQuarter","Date.IsInPreviousWeek","Date.IsInPreviousYear","Date.IsInYearToDate","Date.IsLeapYear","Date.Month","Date.MonthName","Date.QuarterOfYear","Date.StartOfDay","Date.StartOfMonth","Date.StartOfQuarter","Date.StartOfWeek","Date.StartOfYear","Date.ToRecord","Date.ToText","Date.WeekOfMonth","Date.WeekOfYear","Date.Year","DateTime.AddZone","DateTime.Date","DateTime.FixedLocalNow","DateTime.From","DateTime.FromFileTime","DateTime.FromText","DateTime.IsInCurrentHour","DateTime.IsInCurrentMinute","DateTime.IsInCurrentSecond","DateTime.IsInNextHour","DateTime.IsInNextMinute","DateTime.IsInNextNHours","DateTime.IsInNextNMinutes","DateTime.IsInNextNSeconds","DateTime.IsInNextSecond","DateTime.IsInPreviousHour","DateTime.IsInPreviousMinute","DateTime.IsInPreviousNHours","DateTime.IsInPreviousNMinutes","DateTime.IsInPreviousNSeconds","DateTime.IsInPreviousSecond","DateTime.LocalNow","DateTime.Time","DateTime.ToRecord","DateTime.ToText","DateTimeZone.FixedLocalNow","DateTimeZone.FixedUtcNow","DateTimeZone.From","DateTimeZone.FromFileTime","DateTimeZone.FromText","DateTimeZone.LocalNow","DateTimeZone.RemoveZone","DateTimeZone.SwitchZone","DateTimeZone.ToLocal","DateTimeZone.ToRecord","DateTimeZone.ToText","DateTimeZone.ToUtc","DateTimeZone.UtcNow","DateTimeZone.ZoneHours","DateTimeZone.ZoneMinutes","Decimal.From","Diagnostics.ActivityId","Diagnostics.Trace","DirectQueryCapabilities.From","Double.From","Duration.Days","Duration.From","Duration.FromText","Duration.Hours","Duration.Minutes","Duration.Seconds","Duration.ToRecord","Duration.ToText","Duration.TotalDays","Duration.TotalHours","Duration.TotalMinutes","Duration.TotalSeconds","Embedded.Value","Error.Record","Excel.CurrentWorkbook","Excel.Workbook","Exchange.Contents","Expression.Constant","Expression.Evaluate","Expression.Identifier","Facebook.Graph","File.Contents","Folder.Contents","Folder.Files","Function.From","Function.Invoke","Function.InvokeAfter","Function.IsDataSource","GoogleAnalytics.Accounts","Guid.From","HdInsight.Containers","HdInsight.Contents","HdInsight.Files","Hdfs.Contents","Hdfs.Files","Informix.Database","Int16.From","Int32.From","Int64.From","Int8.From","ItemExpression.From","Json.Document","Json.FromValue","Lines.FromBinary","Lines.FromText","Lines.ToBinary","Lines.ToText","List.Accumulate","List.AllTrue","List.Alternate","List.AnyTrue","List.Average","List.Buffer","List.Combine","List.Contains","List.ContainsAll","List.ContainsAny","List.Count","List.Covariance","List.DateTimeZones","List.DateTimes","List.Dates","List.Difference","List.Distinct","List.Durations","List.FindText","List.First","List.FirstN","List.Generate","List.InsertRange","List.Intersect","List.IsDistinct","List.IsEmpty","List.Last","List.LastN","List.MatchesAll","List.MatchesAny","List.Max","List.MaxN","List.Median","List.Min","List.MinN","List.Mode","List.Modes","List.NonNullCount","List.Numbers","List.PositionOf","List.PositionOfAny","List.Positions","List.Product","List.Random","List.Range","List.RemoveFirstN","List.RemoveItems","List.RemoveLastN","List.RemoveMatchingItems","List.RemoveNulls","List.RemoveRange","List.Repeat","List.ReplaceMatchingItems","List.ReplaceRange","List.ReplaceValue","List.Reverse","List.Select","List.Single","List.SingleOrDefault","List.Skip","List.Sort","List.StandardDeviation","List.Sum","List.Times","List.Transform","List.TransformMany","List.Union","List.Zip","Logical.From","Logical.FromText","Logical.ToText","MQ.Queue","MySQL.Database","Number.Abs","Number.Acos","Number.Asin","Number.Atan","Number.Atan2","Number.BitwiseAnd","Number.BitwiseNot","Number.BitwiseOr","Number.BitwiseShiftLeft","Number.BitwiseShiftRight","Number.BitwiseXor","Number.Combinations","Number.Cos","Number.Cosh","Number.Exp","Number.Factorial","Number.From","Number.FromText","Number.IntegerDivide","Number.IsEven","Number.IsNaN","Number.IsOdd","Number.Ln","Number.Log","Number.Log10","Number.Mod","Number.Permutations","Number.Power","Number.Random","Number.RandomBetween","Number.Round","Number.RoundAwayFromZero","Number.RoundDown","Number.RoundTowardZero","Number.RoundUp","Number.Sign","Number.Sin","Number.Sinh","Number.Sqrt","Number.Tan","Number.Tanh","Number.ToText","OData.Feed","Odbc.DataSource","Odbc.Query","OleDb.DataSource","OleDb.Query","Oracle.Database","Percentage.From","PostgreSQL.Database","RData.FromBinary","Record.AddField","Record.Combine","Record.Field","Record.FieldCount","Record.FieldNames","Record.FieldOrDefault","Record.FieldValues","Record.FromList","Record.FromTable","Record.HasFields","Record.RemoveFields","Record.RenameFields","Record.ReorderFields","Record.SelectFields","Record.ToList","Record.ToTable","Record.TransformFields","Replacer.ReplaceText","Replacer.ReplaceValue","RowExpression.Column","RowExpression.From","Salesforce.Data","Salesforce.Reports","SapBusinessWarehouse.Cubes","SapHana.Database","SharePoint.Contents","SharePoint.Files","SharePoint.Tables","Single.From","Soda.Feed","Splitter.SplitByNothing","Splitter.SplitTextByAnyDelimiter","Splitter.SplitTextByDelimiter","Splitter.SplitTextByEachDelimiter","Splitter.SplitTextByLengths","Splitter.SplitTextByPositions","Splitter.SplitTextByRanges","Splitter.SplitTextByRepeatedLengths","Splitter.SplitTextByWhitespace","Sql.Database","Sql.Databases","SqlExpression.SchemaFrom","SqlExpression.ToExpression","Sybase.Database","Table.AddColumn","Table.AddIndexColumn","Table.AddJoinColumn","Table.AddKey","Table.AggregateTableColumn","Table.AlternateRows","Table.Buffer","Table.Column","Table.ColumnCount","Table.ColumnNames","Table.ColumnsOfType","Table.Combine","Table.CombineColumns","Table.Contains","Table.ContainsAll","Table.ContainsAny","Table.DemoteHeaders","Table.Distinct","Table.DuplicateColumn","Table.ExpandListColumn","Table.ExpandRecordColumn","Table.ExpandTableColumn","Table.FillDown","Table.FillUp","Table.FilterWithDataTable","Table.FindText","Table.First","Table.FirstN","Table.FirstValue","Table.FromColumns","Table.FromList","Table.FromPartitions","Table.FromRecords","Table.FromRows","Table.FromValue","Table.Group","Table.HasColumns","Table.InsertRows","Table.IsDistinct","Table.IsEmpty","Table.Join","Table.Keys","Table.Last","Table.LastN","Table.MatchesAllRows","Table.MatchesAnyRows","Table.Max","Table.MaxN","Table.Min","Table.MinN","Table.NestedJoin","Table.Partition","Table.PartitionValues","Table.Pivot","Table.PositionOf","Table.PositionOfAny","Table.PrefixColumns","Table.Profile","Table.PromoteHeaders","Table.Range","Table.RemoveColumns","Table.RemoveFirstN","Table.RemoveLastN","Table.RemoveMatchingRows","Table.RemoveRows","Table.RemoveRowsWithErrors","Table.RenameColumns","Table.ReorderColumns","Table.Repeat","Table.ReplaceErrorValues","Table.ReplaceKeys","Table.ReplaceMatchingRows","Table.ReplaceRelationshipIdentity","Table.ReplaceRows","Table.ReplaceValue","Table.ReverseRows","Table.RowCount","Table.Schema","Table.SelectColumns","Table.SelectRows","Table.SelectRowsWithErrors","Table.SingleRow","Table.Skip","Table.Sort","Table.SplitColumn","Table.ToColumns","Table.ToList","Table.ToRecords","Table.ToRows","Table.TransformColumnNames","Table.TransformColumnTypes","Table.TransformColumns","Table.TransformRows","Table.Transpose","Table.Unpivot","Table.UnpivotOtherColumns","Table.View","Table.ViewFunction","TableAction.DeleteRows","TableAction.InsertRows","TableAction.UpdateRows","Tables.GetRelationships","Teradata.Database","Text.AfterDelimiter","Text.At","Text.BeforeDelimiter","Text.BetweenDelimiters","Text.Clean","Text.Combine","Text.Contains","Text.End","Text.EndsWith","Text.Format","Text.From","Text.FromBinary","Text.Insert","Text.Length","Text.Lower","Text.Middle","Text.NewGuid","Text.PadEnd","Text.PadStart","Text.PositionOf","Text.PositionOfAny","Text.Proper","Text.Range","Text.Remove","Text.RemoveRange","Text.Repeat","Text.Replace","Text.ReplaceRange","Text.Select","Text.Split","Text.SplitAny","Text.Start","Text.StartsWith","Text.ToBinary","Text.ToList","Text.Trim","Text.TrimEnd","Text.TrimStart","Text.Upper","Time.EndOfHour","Time.From","Time.FromText","Time.Hour","Time.Minute","Time.Second","Time.StartOfHour","Time.ToRecord","Time.ToText","Type.AddTableKey","Type.ClosedRecord","Type.Facets","Type.ForFunction","Type.ForRecord","Type.FunctionParameters","Type.FunctionRequiredParameters","Type.FunctionReturn","Type.Is","Type.IsNullable","Type.IsOpenRecord","Type.ListItem","Type.NonNullable","Type.OpenRecord","Type.RecordFields","Type.ReplaceFacets","Type.ReplaceTableKeys","Type.TableColumn","Type.TableKeys","Type.TableRow","Type.TableSchema","Type.Union","Uri.BuildQueryString","Uri.Combine","Uri.EscapeDataString","Uri.Parts","Value.Add","Value.As","Value.Compare","Value.Divide","Value.Equals","Value.Firewall","Value.FromText","Value.Is","Value.Metadata","Value.Multiply","Value.NativeQuery","Value.NullableEquals","Value.RemoveMetadata","Value.ReplaceMetadata","Value.ReplaceType","Value.Subtract","Value.Type","ValueAction.NativeStatement","ValueAction.Replace","Variable.Value","Web.Contents","Web.Page","WebAction.Request","Xml.Document","Xml.Tables"],builtinConstants:["BinaryEncoding.Base64","BinaryEncoding.Hex","BinaryOccurrence.Optional","BinaryOccurrence.Repeating","BinaryOccurrence.Required","ByteOrder.BigEndian","ByteOrder.LittleEndian","Compression.Deflate","Compression.GZip","CsvStyle.QuoteAfterDelimiter","CsvStyle.QuoteAlways","Culture.Current","Day.Friday","Day.Monday","Day.Saturday","Day.Sunday","Day.Thursday","Day.Tuesday","Day.Wednesday","ExtraValues.Error","ExtraValues.Ignore","ExtraValues.List","GroupKind.Global","GroupKind.Local","JoinAlgorithm.Dynamic","JoinAlgorithm.LeftHash","JoinAlgorithm.LeftIndex","JoinAlgorithm.PairwiseHash","JoinAlgorithm.RightHash","JoinAlgorithm.RightIndex","JoinAlgorithm.SortMerge","JoinKind.FullOuter","JoinKind.Inner","JoinKind.LeftAnti","JoinKind.LeftOuter","JoinKind.RightAnti","JoinKind.RightOuter","JoinSide.Left","JoinSide.Right","MissingField.Error","MissingField.Ignore","MissingField.UseNull","Number.E","Number.Epsilon","Number.NaN","Number.NegativeInfinity","Number.PI","Number.PositiveInfinity","Occurrence.All","Occurrence.First","Occurrence.Last","Occurrence.Optional","Occurrence.Repeating","Occurrence.Required","Order.Ascending","Order.Descending","Precision.Decimal","Precision.Double","QuoteStyle.Csv","QuoteStyle.None","RelativePosition.FromEnd","RelativePosition.FromStart","RoundingMode.AwayFromZero","RoundingMode.Down","RoundingMode.ToEven","RoundingMode.TowardZero","RoundingMode.Up","SapHanaDistribution.All","SapHanaDistribution.Connection","SapHanaDistribution.Off","SapHanaDistribution.Statement","SapHanaRangeOperator.Equals","SapHanaRangeOperator.GreaterThan","SapHanaRangeOperator.GreaterThanOrEquals","SapHanaRangeOperator.LessThan","SapHanaRangeOperator.LessThanOrEquals","SapHanaRangeOperator.NotEquals","TextEncoding.Ascii","TextEncoding.BigEndianUnicode","TextEncoding.Unicode","TextEncoding.Utf16","TextEncoding.Utf8","TextEncoding.Windows","TraceLevel.Critical","TraceLevel.Error","TraceLevel.Information","TraceLevel.Verbose","TraceLevel.Warning","WebMethod.Delete","WebMethod.Get","WebMethod.Head","WebMethod.Patch","WebMethod.Post","WebMethod.Put"],builtinTypes:["Action.Type","Any.Type","Binary.Type","BinaryEncoding.Type","BinaryOccurrence.Type","Byte.Type","ByteOrder.Type","Character.Type","Compression.Type","CsvStyle.Type","Currency.Type","Date.Type","DateTime.Type","DateTimeZone.Type","Day.Type","Decimal.Type","Double.Type","Duration.Type","ExtraValues.Type","Function.Type","GroupKind.Type","Guid.Type","Int16.Type","Int32.Type","Int64.Type","Int8.Type","JoinAlgorithm.Type","JoinKind.Type","JoinSide.Type","List.Type","Logical.Type","MissingField.Type","None.Type","Null.Type","Number.Type","Occurrence.Type","Order.Type","Password.Type","Percentage.Type","Precision.Type","QuoteStyle.Type","Record.Type","RelativePosition.Type","RoundingMode.Type","SapHanaDistribution.Type","SapHanaRangeOperator.Type","Single.Type","Table.Type","Text.Type","TextEncoding.Type","Time.Type","TraceLevel.Type","Type.Type","Uri.Type","WebMethod.Type"],tokenizer:{root:[[/#"[\w \.]+"/,"identifier.quote"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+([eE][\-+]?\d+)?/,"number"],[/(#?[a-z]+)\b/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@constructors":"constructor","@operatorKeywords":"operators","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.Type)\b/,{cases:{"@builtinTypes":"type","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,{cases:{"@builtinFunctions":"keyword.function","@builtinConstants":"constant","@default":"identifier"}}],[/\b([a-zA-Z_][\w\.]*)\b/,"identifier"],{include:"@whitespace"},{include:"@comments"},{include:"@strings"},[/[{}()\[\]]/,"@brackets"],[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/,"operators"],[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],strings:[['"',"string","@string"]],string:[['""',"string.escape"],['"',"string","@pop"],[".","string"]]}};return u(b);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/powershell/powershell.js b/lib/vs/basic-languages/powershell/powershell.js deleted file mode 100644 index a38ad5d..0000000 --- a/lib/vs/basic-languages/powershell/powershell.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/powershell/powershell", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(n,e)=>{for(var t in e)o(n,t,{get:e[t],enumerable:!0})},g=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of i(e))!l.call(n,s)&&s!==t&&o(n,s,{get:()=>e[s],enumerable:!(a=r(e,s))||a.enumerable});return n};var p=n=>g(o({},"__esModule",{value:!0}),n);var u={};c(u,{conf:()=>d,language:()=>m});var d={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},m={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}};return p(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/protobuf/protobuf.js b/lib/vs/basic-languages/protobuf/protobuf.js deleted file mode 100644 index 30a2be1..0000000 --- a/lib/vs/basic-languages/protobuf/protobuf.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/protobuf/protobuf", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var i in e)o(t,i,{get:e[i],enumerable:!0})},d=(t,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of c(e))!a.call(t,n)&&n!==i&&o(t,n,{get:()=>e[n],enumerable:!(s=r(e,n))||s.enumerable});return t};var l=t=>d(o({},"__esModule",{value:!0}),t);var m={};p(m,{conf:()=>u,language:()=>f});var k=["true","false"],u={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],autoCloseBefore:`.,=}])>' - `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},f={defaultToken:"",tokenPostfix:".proto",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=>/,{token:"@brackets",bracket:"@close",switchTo:"identifier"}]],field:[{include:"@whitespace"},["group",{cases:{"$S2==proto2":{token:"keyword",switchTo:"@groupDecl.$S2"}}}],[/(@identifier)(\s*)(=)/,["identifier","white",{token:"delimiter",next:"@pop"}]],[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}]],groupDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],["=","operator"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@messageBody.$S2"}],{include:"@constant"}],type:[{include:"@whitespace"},[/@identifier/,"type.identifier","@pop"],[/./,"delimiter"]],identifier:[{include:"@whitespace"},[/@identifier/,"identifier","@pop"]],serviceDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@serviceBody.$S2"}]],serviceBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/option\b/,"keyword","@option.$S2"],[/rpc\b/,"keyword","@rpc.$S2"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],rpc:[{include:"@whitespace"},[/@identifier/,"identifier"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@request.$S2"}],[/{/,{token:"@brackets",bracket:"@open",next:"@methodOptions.$S2"}],[/;/,"delimiter","@pop"]],request:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@returns.$S2"}]],returns:[{include:"@whitespace"},[/returns\b/,"keyword"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@response.$S2"}]],response:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@rpc.$S2"}]],methodOptions:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],["option","keyword"],[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],constant:[["@boolLit","keyword.constant"],["@hexLit","number.hex"],["@octalLit","number.octal"],["@decimalLit","number"],["@floatLit","number.float"],[/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@stringSingle"}],[/{/,{token:"@brackets",bracket:"@open",next:"@prototext"}],[/identifier/,"identifier"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],prototext:[{include:"@whitespace"},{include:"@constant"},[/@identifier/,"identifier"],[/[:;]/,"delimiter"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]]}};return l(m);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/pug/pug.js b/lib/vs/basic-languages/pug/pug.js deleted file mode 100644 index 5a693dd..0000000 --- a/lib/vs/basic-languages/pug/pug.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/pug/pug", ["require","require"],(require)=>{ -var moduleExports=(()=>{var a=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},c=(t,e,o,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!r.call(t,n)&&n!==o&&a(t,n,{get:()=>e[n],enumerable:!(s=i(e,n))||s.enumerable});return t};var d=t=>c(a({},"__esModule",{value:!0}),t);var g={};p(g,{conf:()=>m,language:()=>u});var m={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},u={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"]},brackets:[[""],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp(`<(?!(?:${p.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:o.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp(`<(?!(?:${p.join("|")}))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$`,"i"),action:{indentAction:o.languages.IndentAction.Indent}}]},E={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/};return g(z);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/redis/redis.js b/lib/vs/basic-languages/redis/redis.js deleted file mode 100644 index 8f5c840..0000000 --- a/lib/vs/basic-languages/redis/redis.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/redis/redis", ["require","require"],(require)=>{ -var moduleExports=(()=>{var R=Object.defineProperty;var n=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var A=(S,E)=>{for(var T in E)R(S,T,{get:E[T],enumerable:!0})},O=(S,E,T,o)=>{if(E&&typeof E=="object"||typeof E=="function")for(let e of N(E))!s.call(S,e)&&e!==T&&R(S,e,{get:()=>E[e],enumerable:!(o=n(E,e))||o.enumerable});return S};var L=S=>O(R({},"__esModule",{value:!0}),S);var r={};A(r,{conf:()=>I,language:()=>i});var I={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},i={defaultToken:"",tokenPostfix:".redis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}};return L(r);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/redshift/redshift.js b/lib/vs/basic-languages/redshift/redshift.js deleted file mode 100644 index 2a68637..0000000 --- a/lib/vs/basic-languages/redshift/redshift.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/redshift/redshift", ["require","require"],(require)=>{ -var moduleExports=(()=>{var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var p=(_,e)=>{for(var r in e)i(_,r,{get:e[r],enumerable:!0})},l=(_,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of o(e))!n.call(_,t)&&t!==r&&i(_,t,{get:()=>e[t],enumerable:!(a=s(e,t))||a.enumerable});return _};var g=_=>l(i({},"__esModule",{value:!0}),_);var m={};p(m,{conf:()=>c,language:()=>d});var c={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},d={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","AZ64","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LANGUAGE","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY16","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}};return g(m);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/restructuredtext/restructuredtext.js b/lib/vs/basic-languages/restructuredtext/restructuredtext.js deleted file mode 100644 index 92932b3..0000000 --- a/lib/vs/basic-languages/restructuredtext/restructuredtext.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/restructuredtext/restructuredtext", ["require","require"],(require)=>{ -var moduleExports=(()=>{var t=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var r=Object.prototype.hasOwnProperty;var k=(n,e)=>{for(var i in e)t(n,i,{get:e[i],enumerable:!0})},c=(n,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of l(e))!r.call(n,s)&&s!==i&&t(n,s,{get:()=>e[s],enumerable:!(o=a(e,s))||o.enumerable});return n};var p=n=>c(t({},"__esModule",{value:!0}),n);var g={};k(g,{conf:()=>u,language:()=>m});var u={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*"),end:new RegExp("^\\s*")}}},m={defaultToken:"",tokenPostfix:".rst",control:/[\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],alphanumerics:/[A-Za-z0-9]/,simpleRefNameWithoutBq:/(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,simpleRefName:/(?:`@phrase`|@simpleRefNameWithoutBq)/,phrase:/@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,citationName:/[A-Za-z][A-Za-z0-9-_.]*/,blockLiteralStart:/(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,precedingChars:/(?:[ -:/'"<([{])/,followingChars:/(?:[ -.,:;!?/'")\]}>]|$)/,punctuation:/(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,tokenizer:{root:[[/^(@punctuation{3,}$){1,1}?/,"keyword"],[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/,"keyword"],[/([ ]::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],[/(::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],{include:"@tables"},{include:"@explicitMarkupBlocks"},{include:"@inlineMarkup"}],explicitMarkupBlocks:[{include:"@citations"},{include:"@footnotes"},[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,[{token:"",next:"subsequentLines"},"keyword","",""]],[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,[{token:"",next:"hyperlinks"},"","","string.link","","","string.link"]],[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,[{token:"",next:"subsequentLines"},"","","","string.link"]],[/^(__\s+)(.+)/,["","string.link"]],[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,[{token:"",next:"subsequentLines"},"","string.link","","keyword",""],"@rawBlocks"],[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/,["","string.link",""]],[/^(\.\.)([ ].*)$/,[{token:"",next:"@comments"},"comment"]]],inlineMarkup:[{include:"@citationsReference"},{include:"@footnotesReference"},[/(@simpleRefName)(_{1,2})/,["string.link",""]],[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/,["","string.link","","string.link","","",""]],[/\*\*([^\\*]|\*(?!\*))+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/(``)((?:[^`]|\`(?!`))+)(``)/,["","keyword",""]],[/(__\s+)(.+)/,["","keyword"]],[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/,["","keyword","","",""]],[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/,["","","","keyword",""]],[/(`)([^`]+)(`)/,""],[/(_`)(@phrase)(`)/,["","string.link",""]]],citations:[[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],citationsReference:[[/(\[)(@citationName)(\]_)/,["","string.link",""]]],footnotes:[[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,[{token:"",next:"@subsequentLines"},"string.link",""]],[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]],[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],footnotesReference:[[/(\[)([0-9]+)(\])(_)/,["","string.link","",""]],[/(\[)(#@simpleRefName?)(\])(_)/,["","string.link","",""]],[/(\[)(\*)(\])(_)/,["","string.link","",""]]],blankLineOfLiteralBlocks:[[/^$/,"","@subsequentLinesOfLiteralBlocks"],[/^.*$/,"","@pop"]],subsequentLinesOfLiteralBlocks:[[/(@blockLiteralStart+)(.*)/,["keyword",""]],[/^(?!blockLiteralStart)/,"","@popall"]],subsequentLines:[[/^[\s]+.*/,""],[/^(?!\s)/,"","@pop"]],hyperlinks:[[/^[\s]+.*/,"string.link"],[/^(?!\s)/,"","@pop"]],comments:[[/^[\s]+.*/,"comment"],[/^(?!\s)/,"","@pop"]],tables:[[/\+-[+-]+/,"keyword"],[/\+=[+=]+/,"keyword"]]}};return p(g);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/ruby/ruby.js b/lib/vs/basic-languages/ruby/ruby.js deleted file mode 100644 index 135920a..0000000 --- a/lib/vs/basic-languages/ruby/ruby.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/ruby/ruby", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var r in e)o(t,r,{get:e[r],enumerable:!0})},l=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of c(e))!d.call(t,n)&&n!==r&&o(t,n,{get:()=>e[n],enumerable:!(s=i(e,n))||s.enumerable});return t};var a=t=>l(o({},"__esModule",{value:!0}),t);var m={};p(m,{conf:()=>g,language:()=>x});var g={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},x={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}};return a(m);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/rust/rust.js b/lib/vs/basic-languages/rust/rust.js deleted file mode 100644 index e44d404..0000000 --- a/lib/vs/basic-languages/rust/rust.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/rust/rust", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var _=(t,e)=>{for(var n in e)r(t,n,{get:e[n],enumerable:!0})},u=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of a(e))!c.call(t,o)&&o!==n&&r(t,o,{get:()=>e[o],enumerable:!(s=i(e,o))||s.enumerable});return t};var l=t=>u(r({},"__esModule",{value:!0}),t);var m={};_(m,{conf:()=>f,language:()=>p});var f={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},p={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","async","await","box","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","try","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/r(#*)"/,{token:"string.quote",bracket:"@open",next:"@stringraw.$1"}],[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'(\S|@escapes)'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringraw:[[/[^"#]+/,{token:"string"}],[/"(#*)/,{cases:{"$1==$S2":{token:"string.quote",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["#]/,{token:"string"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}};return l(m);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/sb/sb.js b/lib/vs/basic-languages/sb/sb.js deleted file mode 100644 index e8311ab..0000000 --- a/lib/vs/basic-languages/sb/sb.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/sb/sb", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var t in e)r(o,t,{get:e[t],enumerable:!0})},c=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!l.call(o,n)&&n!==t&&r(o,n,{get:()=>e[n],enumerable:!(s=i(e,n))||s.enumerable});return o};var g=o=>c(r({},"__esModule",{value:!0}),o);var m={};d(m,{conf:()=>p,language:()=>f});var p={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},f={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}};return g(m);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/scala/scala.js b/lib/vs/basic-languages/scala/scala.js deleted file mode 100644 index fed8e1c..0000000 --- a/lib/vs/basic-languages/scala/scala.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/scala/scala", ["require","require"],(require)=>{ -var moduleExports=(()=>{var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var r in e)n(t,r,{get:e[r],enumerable:!0})},c=(t,e,r,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of i(e))!d.call(t,o)&&o!==r&&n(t,o,{get:()=>e[o],enumerable:!(a=s(e,o))||a.enumerable});return t};var g=t=>c(n({},"__esModule",{value:!0}),t);var m={};l(m,{conf:()=>p,language:()=>w});var p={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},w={tokenPostfix:".scala",keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},\."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,\.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,["string","string.escape",{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[\.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};return g(m);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/scheme/scheme.js b/lib/vs/basic-languages/scheme/scheme.js deleted file mode 100644 index fedfd36..0000000 --- a/lib/vs/basic-languages/scheme/scheme.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/scheme/scheme", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var t in e)s(o,t,{get:e[t],enumerable:!0})},m=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of i(e))!l.call(o,n)&&n!==t&&s(o,n,{get:()=>e[n],enumerable:!(a=r(e,n))||a.enumerable});return o};var p=o=>m(s({},"__esModule",{value:!0}),o);var u={};c(u,{conf:()=>d,language:()=>g});var d={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},g={defaultToken:"",ignoreCase:!0,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}};return p(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/scss/scss.js b/lib/vs/basic-languages/scss/scss.js deleted file mode 100644 index 236deb4..0000000 --- a/lib/vs/basic-languages/scss/scss.js +++ /dev/null @@ -1,12 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/scss/scss", ["require","require"],(require)=>{ -var moduleExports=(()=>{var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var o in e)i(t,o,{get:e[o],enumerable:!0})},m=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of l(e))!d.call(t,n)&&n!==o&&i(t,n,{get:()=>e[n],enumerable:!(r=a(e,n))||r.enumerable});return t};var s=t=>m(i({},"__esModule",{value:!0}),t);var k={};c(k,{conf:()=>u,language:()=>p});var u={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},p={defaultToken:"",tokenPostfix:".scss",ws:`[ -\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},[`[^)\r -]+`,"string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}};return s(k);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/shell/shell.js b/lib/vs/basic-languages/shell/shell.js deleted file mode 100644 index 2d59d91..0000000 --- a/lib/vs/basic-languages/shell/shell.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/shell/shell", ["require","require"],(require)=>{ -var moduleExports=(()=>{var a=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(r,e)=>{for(var i in e)a(r,i,{get:e[i],enumerable:!0})},d=(r,e,i,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of n(e))!l.call(r,t)&&t!==i&&a(r,t,{get:()=>e[t],enumerable:!(o=s(e,t))||o.enumerable});return r};var p=r=>d(a({},"__esModule",{value:!0}),r);var g={};c(g,{conf:()=>m,language:()=>u});var m={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},u={defaultToken:"",ignoreCase:!0,tokenPostfix:".shell",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],builtins:["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],startingWithDash:/\-+\w+/,identifiersWithDashes:/[a-zA-Z]\w+(?:@startingWithDash)+/,symbols:/[=>{ -var moduleExports=(()=>{var f=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var s=Object.prototype.hasOwnProperty;var o=(e,x)=>{for(var d in x)f(e,d,{get:x[d],enumerable:!0})},r=(e,x,d,u)=>{if(x&&typeof x=="object"||typeof x=="function")for(let i of n(x))!s.call(e,i)&&i!==d&&f(e,i,{get:()=>x[i],enumerable:!(u=t(x,i))||u.enumerable});return e};var a=e=>r(f({},"__esModule",{value:!0}),e);var l={};o(l,{conf:()=>c,language:()=>m});var c={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},m={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","constructor","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}};return a(l);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/sophia/sophia.js b/lib/vs/basic-languages/sophia/sophia.js deleted file mode 100644 index b324a11..0000000 --- a/lib/vs/basic-languages/sophia/sophia.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/sophia/sophia", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var l=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},m=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!c.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(r=i(e,n))||r.enumerable});return t};var d=t=>m(s({},"__esModule",{value:!0}),t);var u={};l(u,{conf:()=>f,language:()=>g});var f={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},g={defaultToken:"",tokenPostfix:".aes",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["contract","library","entrypoint","function","stateful","state","hash","signature","tuple","list","address","string","bool","int","record","datatype","type","option","oracle","oracle_query","Call","Bits","Bytes","Oracle","String","Crypto","Address","Auth","Chain","None","Some","bits","bytes","event","let","map","private","public","true","false","var","if","else","throw"],operators:["=",">","<","!","~","?","::",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}};return d(u);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/sparql/sparql.js b/lib/vs/basic-languages/sparql/sparql.js deleted file mode 100644 index 56d4782..0000000 --- a/lib/vs/basic-languages/sparql/sparql.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/sparql/sparql", ["require","require"],(require)=>{ -var moduleExports=(()=>{var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var d=(s,e)=>{for(var n in e)o(s,n,{get:e[n],enumerable:!0})},c=(s,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of a(e))!l.call(s,t)&&t!==n&&o(s,t,{get:()=>e[t],enumerable:!(r=i(e,t))||r.enumerable});return s};var g=s=>c(o({},"__esModule",{value:!0}),s);var m={};d(m,{conf:()=>u,language:()=>p});var u={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]},p={defaultToken:"",tokenPostfix:".rq",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["add","as","asc","ask","base","by","clear","construct","copy","create","data","delete","desc","describe","distinct","drop","false","filter","from","graph","group","having","in","insert","limit","load","minus","move","named","not","offset","optional","order","prefix","reduced","select","service","silent","to","true","undef","union","using","values","where","with"],builtinFunctions:["a","abs","avg","bind","bnode","bound","ceil","coalesce","concat","contains","count","datatype","day","encode_for_uri","exists","floor","group_concat","hours","if","iri","isblank","isiri","isliteral","isnumeric","isuri","lang","langmatches","lcase","max","md5","min","minutes","month","now","rand","regex","replace","round","sameterm","sample","seconds","sha1","sha256","sha384","sha512","str","strafter","strbefore","strdt","strends","strlang","strlen","strstarts","struuid","substr","sum","timezone","tz","ucase","uri","uuid","year"],ignoreCase:!0,tokenizer:{root:[[/<[^\s\u00a0>]*>?/,"tag"],{include:"@strings"},[/#.*/,"comment"],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/[_\w\d]+:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])*/,"tag"],[/:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/,"tag"],[/[$?]?[_\w\d]+/,{cases:{"@keywords":{token:"keyword"},"@builtinFunctions":{token:"predefined.sql"},"@default":"identifier"}}],[/\^\^/,"operator.sql"],[/\^[*+\-<>=&|^\/!?]*/,"operator.sql"],[/[*+\-<>=&|\/!?]/,"operator.sql"],[/@[a-z\d\-]*/,"metatag.html"],[/\s+/,"white"]],strings:[[/'([^'\\]|\\.)*$/,"string.invalid"],[/'$/,"string.sql","@pop"],[/'/,"string.sql","@stringBody"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"$/,"string.sql","@pop"],[/"/,"string.sql","@dblStringBody"]],stringBody:[[/[^\\']+/,"string.sql"],[/\\./,"string.escape"],[/'/,"string.sql","@pop"]],dblStringBody:[[/[^\\"]+/,"string.sql"],[/\\./,"string.escape"],[/"/,"string.sql","@pop"]]}};return g(m);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/sql/sql.js b/lib/vs/basic-languages/sql/sql.js deleted file mode 100644 index 049ddde..0000000 --- a/lib/vs/basic-languages/sql/sql.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/sql/sql", ["require","require"],(require)=>{ -var moduleExports=(()=>{var I=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var O=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var L=(T,E)=>{for(var A in E)I(T,A,{get:E[A],enumerable:!0})},e=(T,E,A,N)=>{if(E&&typeof E=="object"||typeof E=="function")for(let R of O(E))!C.call(T,R)&&R!==A&&I(T,R,{get:()=>E[R],enumerable:!(N=S(E,R))||N.enumerable});return T};var P=T=>e(I({},"__esModule",{value:!0}),T);var M={};L(M,{conf:()=>D,language:()=>U});var D={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},U={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT","ABSOLUTE","ACTION","ADA","ADD","AFTER","ALL","ALLOCATE","ALTER","ALWAYS","ANALYZE","AND","ANY","ARE","AS","ASC","ASSERTION","AT","ATTACH","AUTHORIZATION","AUTOINCREMENT","AVG","BACKUP","BEFORE","BEGIN","BETWEEN","BIT","BIT_LENGTH","BOTH","BREAK","BROWSE","BULK","BY","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER","CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CHECKPOINT","CLOSE","CLUSTERED","COALESCE","COLLATE","COLLATION","COLUMN","COMMIT","COMPUTE","CONFLICT","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONTAINS","CONTAINSTABLE","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","DATABASE","DATE","DAY","DBCC","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFERRABLE","DEFERRED","DELETE","DENY","DESC","DESCRIBE","DESCRIPTOR","DETACH","DIAGNOSTICS","DISCONNECT","DISK","DISTINCT","DISTRIBUTED","DO","DOMAIN","DOUBLE","DROP","DUMP","EACH","ELSE","END","END-EXEC","ERRLVL","ESCAPE","EXCEPT","EXCEPTION","EXCLUDE","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXIT","EXPLAIN","EXTERNAL","EXTRACT","FAIL","FALSE","FETCH","FILE","FILLFACTOR","FILTER","FIRST","FLOAT","FOLLOWING","FOR","FOREIGN","FORTRAN","FOUND","FREETEXT","FREETEXTTABLE","FROM","FULL","FUNCTION","GENERATED","GET","GLOB","GLOBAL","GO","GOTO","GRANT","GROUP","GROUPS","HAVING","HOLDLOCK","HOUR","IDENTITY","IDENTITYCOL","IDENTITY_INSERT","IF","IGNORE","IMMEDIATE","IN","INCLUDE","INDEX","INDEXED","INDICATOR","INITIALLY","INNER","INPUT","INSENSITIVE","INSERT","INSTEAD","INT","INTEGER","INTERSECT","INTERVAL","INTO","IS","ISNULL","ISOLATION","JOIN","KEY","KILL","LANGUAGE","LAST","LEADING","LEFT","LEVEL","LIKE","LIMIT","LINENO","LOAD","LOCAL","LOWER","MATCH","MATERIALIZED","MAX","MERGE","MIN","MINUTE","MODULE","MONTH","NAMES","NATIONAL","NATURAL","NCHAR","NEXT","NO","NOCHECK","NONCLUSTERED","NONE","NOT","NOTHING","NOTNULL","NULL","NULLIF","NULLS","NUMERIC","OCTET_LENGTH","OF","OFF","OFFSET","OFFSETS","ON","ONLY","OPEN","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","OPTION","OR","ORDER","OTHERS","OUTER","OUTPUT","OVER","OVERLAPS","PAD","PARTIAL","PARTITION","PASCAL","PERCENT","PIVOT","PLAN","POSITION","PRAGMA","PRECEDING","PRECISION","PREPARE","PRESERVE","PRIMARY","PRINT","PRIOR","PRIVILEGES","PROC","PROCEDURE","PUBLIC","QUERY","RAISE","RAISERROR","RANGE","READ","READTEXT","REAL","RECONFIGURE","RECURSIVE","REFERENCES","REGEXP","REINDEX","RELATIVE","RELEASE","RENAME","REPLACE","REPLICATION","RESTORE","RESTRICT","RETURN","RETURNING","REVERT","REVOKE","RIGHT","ROLLBACK","ROW","ROWCOUNT","ROWGUIDCOL","ROWS","RULE","SAVE","SAVEPOINT","SCHEMA","SCROLL","SECOND","SECTION","SECURITYAUDIT","SELECT","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","SESSION","SESSION_USER","SET","SETUSER","SHUTDOWN","SIZE","SMALLINT","SOME","SPACE","SQL","SQLCA","SQLCODE","SQLERROR","SQLSTATE","SQLWARNING","STATISTICS","SUBSTRING","SUM","SYSTEM_USER","TABLE","TABLESAMPLE","TEMP","TEMPORARY","TEXTSIZE","THEN","TIES","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TOP","TRAILING","TRAN","TRANSACTION","TRANSLATE","TRANSLATION","TRIGGER","TRIM","TRUE","TRUNCATE","TRY_CONVERT","TSEQUAL","UNBOUNDED","UNION","UNIQUE","UNKNOWN","UNPIVOT","UPDATE","UPDATETEXT","UPPER","USAGE","USE","USER","USING","VACUUM","VALUE","VALUES","VARCHAR","VARYING","VIEW","VIRTUAL","WAITFOR","WHEN","WHENEVER","WHERE","WHILE","WINDOW","WITH","WITHIN GROUP","WITHOUT","WORK","WRITE","WRITETEXT","YEAR","ZONE"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@keywords":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}};return P(M);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/st/st.js b/lib/vs/basic-languages/st/st.js deleted file mode 100644 index 619f843..0000000 --- a/lib/vs/basic-languages/st/st.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/st/st", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var d=(n,e)=>{for(var t in e)r(n,t,{get:e[t],enumerable:!0})},l=(n,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of c(e))!i.call(n,o)&&o!==t&&r(n,o,{get:()=>e[o],enumerable:!(a=s(e,o))||a.enumerable});return n};var _=n=>l(r({},"__esModule",{value:!0}),n);var m={};d(m,{conf:()=>p,language:()=>u});var p={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["var","end_var"],["var_input","end_var"],["var_output","end_var"],["var_in_out","end_var"],["var_temp","end_var"],["var_global","end_var"],["var_access","end_var"],["var_external","end_var"],["type","end_type"],["struct","end_struct"],["program","end_program"],["function","end_function"],["function_block","end_function_block"],["action","end_action"],["step","end_step"],["initial_step","end_step"],["transaction","end_transaction"],["configuration","end_configuration"],["tcp","end_tcp"],["recource","end_recource"],["channel","end_channel"],["library","end_library"],["folder","end_folder"],["binaries","end_binaries"],["includes","end_includes"],["sources","end_sources"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"/*",close:"*/"},{open:"'",close:"'",notIn:["string_sq"]},{open:'"',close:'"',notIn:["string_dq"]},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},u={defaultToken:"",tokenPostfix:".st",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","end_if","elsif","else","case","of","to","__try","__catch","__finally","do","with","by","while","repeat","end_while","end_repeat","end_case","for","end_for","task","retain","non_retain","constant","with","at","exit","return","interval","priority","address","port","on_channel","then","iec","file","uses","version","packagetype","displayname","copyright","summary","vendor","common_source","from","extends","implements"],constant:["false","true","null"],defineKeywords:["var","var_input","var_output","var_in_out","var_temp","var_global","var_access","var_external","end_var","type","end_type","struct","end_struct","program","end_program","function","end_function","function_block","end_function_block","interface","end_interface","method","end_method","property","end_property","namespace","end_namespace","configuration","end_configuration","tcp","end_tcp","resource","end_resource","channel","end_channel","library","end_library","folder","end_folder","binaries","end_binaries","includes","end_includes","sources","end_sources","action","end_action","step","initial_step","end_step","transaction","end_transaction"],typeKeywords:["int","sint","dint","lint","usint","uint","udint","ulint","real","lreal","time","date","time_of_day","date_and_time","string","bool","byte","word","dword","array","pointer","lword"],operators:["=",">","<",":",":=","<=",">=","<>","&","+","-","*","**","MOD","^","or","and","not","xor","abs","acos","asin","atan","cos","exp","expt","ln","log","sin","sqrt","tan","sel","max","min","limit","mux","shl","shr","rol","ror","indexof","sizeof","adr","adrinst","bitadr","is_valid","ref","ref_to"],builtinVariables:[],builtinFunctions:["sr","rs","tp","ton","tof","eq","ge","le","lt","ne","round","trunc","ctd","\u0441tu","ctud","r_trig","f_trig","move","concat","delete","find","insert","left","len","replace","right","rtc"],symbols:/[=>{ -var moduleExports=(()=>{var i=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(o,e)=>{for(var n in e)i(o,n,{get:e[n],enumerable:!0})},u=(o,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!l.call(o,t)&&t!==n&&i(o,t,{get:()=>e[t],enumerable:!(r=a(e,t))||r.enumerable});return o};var d=o=>u(i({},"__esModule",{value:!0}),o);var f={};c(f,{conf:()=>p,language:()=>m});var p={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},m={defaultToken:"",tokenPostfix:".swift",identifier:/[a-zA-Z_][\w$]*/,attributes:["@GKInspectable","@IBAction","@IBDesignable","@IBInspectable","@IBOutlet","@IBSegueAction","@NSApplicationMain","@NSCopying","@NSManaged","@Sendable","@UIApplicationMain","@autoclosure","@actorIndependent","@asyncHandler","@available","@convention","@derivative","@differentiable","@discardableResult","@dynamicCallable","@dynamicMemberLookup","@escaping","@frozen","@globalActor","@inlinable","@inline","@main","@noDerivative","@nonobjc","@noreturn","@objc","@objcMembers","@preconcurrency","@propertyWrapper","@requires_stored_property_inits","@resultBuilder","@testable","@unchecked","@unknown","@usableFromInline","@warn_unqualified_access"],accessmodifiers:["open","public","internal","fileprivate","private"],keywords:["#available","#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning","Any","Protocol","Self","Type","actor","as","assignment","associatedtype","associativity","async","await","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","dynamicType","else","enum","extension","fallthrough","false","fileprivate","final","for","func","get","guard","higherThan","if","import","in","indirect","infix","init","inout","internal","is","isolated","lazy","left","let","lowerThan","mutating","nil","none","nonisolated","nonmutating","open","operator","optional","override","postfix","precedence","precedencegroup","prefix","private","protocol","public","repeat","required","rethrows","return","right","safe","self","set","some","static","struct","subscript","super","switch","throw","throws","true","try","typealias","unowned","unsafe","var","weak","where","while","willSet","__consuming","__owned"],symbols:/[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],whitespace:[[/\s+/,"white"],[/"""/,"string.quote","@endDblDocString"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string.quote","@popall"],[/"/,"string"]],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/@@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}};return d(f);})(); -/*!--------------------------------------------------------------------------------------------- - * Copyright (C) David Owens II, owensd.io. All rights reserved. - *--------------------------------------------------------------------------------------------*/ -return moduleExports; -}); diff --git a/lib/vs/basic-languages/systemverilog/systemverilog.js b/lib/vs/basic-languages/systemverilog/systemverilog.js deleted file mode 100644 index bd91ff7..0000000 --- a/lib/vs/basic-languages/systemverilog/systemverilog.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/systemverilog/systemverilog", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var d=(n,e)=>{for(var t in e)r(n,t,{get:e[t],enumerable:!0})},l=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!c.call(n,i)&&i!==t&&r(n,i,{get:()=>e[i],enumerable:!(o=s(e,i))||o.enumerable});return n};var p=n=>l(r({},"__esModule",{value:!0}),n);var f={};d(f,{conf:()=>u,language:()=>m});var u={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["begin","end"],["case","endcase"],["casex","endcase"],["casez","endcase"],["checker","endchecker"],["class","endclass"],["clocking","endclocking"],["config","endconfig"],["function","endfunction"],["generate","endgenerate"],["group","endgroup"],["interface","endinterface"],["module","endmodule"],["package","endpackage"],["primitive","endprimitive"],["program","endprogram"],["property","endproperty"],["specify","endspecify"],["sequence","endsequence"],["table","endtable"],["task","endtask"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!1,markers:{start:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\b"),end:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\b")}}},m={defaultToken:"",tokenPostfix:".sv",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","null","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],builtin_gates:["and","nand","nor","or","xor","xnor","buf","not","bufif0","bufif1","notif1","notif0","cmos","nmos","pmos","rcmos","rnmos","rpmos","tran","tranif1","tranif0","rtran","rtranif1","rtranif0"],operators:["=","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>+","<<<=",">>>=","?",":","+","-","!","~","&","~&","|","~|","^","~^","^~","+","-","*","/","%","==","!=","===","!==","==?","!=?","&&","||","**","<","<=",">",">=","&","|","^",">>","<<",">>>","<<<","++","--","->","<->","inside","dist","::","+:","-:","*>","&&&","|->","|=>","#=#"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],{include:"@numbers"},[/[;,.]/,"delimiter"],{include:"@strings"}],identifier_or_keyword:[[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}]],numbers:[[/\d+?[\d_]*(?:\.[\d_]+)?[eE][\-+]?\d+/,"number.float"],[/\d+?[\d_]*\.[\d_]+(?:\s*@timeunits)?/,"number.float"],[/(?:\d+?[\d_]*\s*)?'[sS]?[dD]\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/,"number"],[/(?:\d+?[\d_]*\s*)?'[sS]?[bB]\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/,"number.binary"],[/(?:\d+?[\d_]*\s*)?'[sS]?[oO]\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/,"number.octal"],[/(?:\d+?[\d_]*\s*)?'[sS]?[hH]\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/,"number.hex"],[/1step/,"number"],[/[\dxXzZ]+?[\dxXzZ_]*(?:\s*@timeunits)?/,"number"],[/'[01xXzZ]+/,"number"]],module_instance:[{include:"@whitespace"},[/(#?)(\()/,["",{token:"@brackets",next:"@port_connection"}]],[/@identifier\s*[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@symbols|[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@identifier/,"type"],[/;/,"delimiter","@pop"]],port_connection:[{include:"@identifier_or_keyword"},{include:"@whitespace"},[/@systemcall/,"variable.predefined"],{include:"@numbers"},{include:"@strings"},[/[,]/,"delimiter"],[/\(/,"@brackets","@port_connection"],[/\)/,"@brackets","@pop"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],include:[[/(\s*)(")([\w*\/*]*)(.\w*)(")/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]],[/(\s*)(<)([\w*\/*]*)(.\w*)(>)/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]]],table:[{include:"@whitespace"},[/[()]/,"@brackets"],[/[:;]/,"delimiter"],[/[01\-*?xXbBrRfFpPnN]/,"variable.predefined"],["endtable","keyword.endtable","@pop"]]}};return p(f);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/tcl/tcl.js b/lib/vs/basic-languages/tcl/tcl.js deleted file mode 100644 index 527fb3e..0000000 --- a/lib/vs/basic-languages/tcl/tcl.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/tcl/tcl", ["require","require"],(require)=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},p=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of a(e))!l.call(t,n)&&n!==o&&s(t,n,{get:()=>e[n],enumerable:!(i=r(e,n))||i.enumerable});return t};var u=t=>p(s({},"__esModule",{value:!0}),t);var g={};c(g,{conf:()=>k,language:()=>d});var k={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},d={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=>{ -var moduleExports=(()=>{var m=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var s=(e,t)=>{for(var r in t)m(e,r,{get:t[r],enumerable:!0})},d=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of n(t))!a.call(e,i)&&i!==r&&m(e,i,{get:()=>t[i],enumerable:!(o=l(t,i))||o.enumerable});return e};var p=e=>d(m({},"__esModule",{value:!0}),e);var g={};s(g,{conf:()=>h,language:()=>c});var h={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["(",")"],["[","]"],[""],["<",">"]],autoClosingPairs:[{open:"{# ",close:" #}"},{open:"{% ",close:" %}"},{open:"{{ ",close:" }}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},c={defaultToken:"",tokenPostfix:"",ignoreCase:!0,keywords:["apply","autoescape","block","deprecated","do","embed","extends","flush","for","from","if","import","include","macro","sandbox","set","use","verbatim","with","endapply","endautoescape","endblock","endembed","endfor","endif","endmacro","endsandbox","endset","endwith","true","false"],tokenizer:{root:[[/\s+/],[/{#/,"comment.twig","@commentState"],[/{%[-~]?/,"delimiter.twig","@blockState"],[/{{[-~]?/,"delimiter.twig","@variableState"],[/)/,["delimiter.html","tag.html","","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/|>=|<=/,"operators.twig"],[/(starts with|ends with|matches)(\s+)/,["operators.twig",""]],[/(in)(\s+)/,["operators.twig",""]],[/(is)(\s+)/,["operators.twig",""]],[/\||~|:|\.{1,2}|\?{1,2}/,"operators.twig"],[/[^\W\d][\w]*/,{cases:{"@keywords":"keyword.twig","@default":"variable.twig"}}],[/\d+(\.\d+)?/,"number.twig"],[/\(|\)|\[|\]|{|}|,/,"delimiter.twig"],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,"string.twig"],[/"/,"string.twig","@stringState"],[/=>/,"operators.twig"],[/=/,"operators.twig"]],doctype:[[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}};return p(g);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/typescript/typescript.js b/lib/vs/basic-languages/typescript/typescript.js deleted file mode 100644 index 3836cee..0000000 --- a/lib/vs/basic-languages/typescript/typescript.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/typescript/typescript", ["require","require"],(require)=>{ -var moduleExports=(()=>{var l=Object.create;var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var b=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty;var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var k=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t)=>{for(var n in t)s(e,n,{get:t[n],enumerable:!0})},i=(e,t,n,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of x(t))!u.call(e,r)&&r!==n&&s(e,r,{get:()=>t[r],enumerable:!(c=m(t,r))||c.enumerable});return e},a=(e,t,n)=>(i(e,t,"default"),n&&i(n,t,"default")),p=(e,t,n)=>(n=e!=null?l(b(e)):{},i(t||!e||!e.__esModule?s(n,"default",{value:e,enumerable:!0}):n,e)),w=e=>i(s({},"__esModule",{value:!0}),e);var d=k((T,g)=>{var A=p(f("vs/editor/editor.api"));g.exports=A});var h={};y(h,{conf:()=>v,language:()=>$});var o={};a(o,p(d()));var v={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:o.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:o.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:o.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:o.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},$={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<",">",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};return w(h);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/vb/vb.js b/lib/vs/basic-languages/vb/vb.js deleted file mode 100644 index 0d74741..0000000 --- a/lib/vs/basic-languages/vb/vb.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/vb/vb", ["require","require"],(require)=>{ -var moduleExports=(()=>{var r=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var d=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var i=(n,e)=>{for(var t in e)r(n,t,{get:e[t],enumerable:!0})},c=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of d(e))!l.call(n,o)&&o!==t&&r(n,o,{get:()=>e[o],enumerable:!(s=a(e,o))||s.enumerable});return n};var u=n=>c(r({},"__esModule",{value:!0}),n);var k={};i(k,{conf:()=>g,language:()=>p});var g={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}},p={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=>{ -var moduleExports=(()=>{var s=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var p=(t,e)=>{for(var a in e)s(t,a,{get:e[a],enumerable:!0})},d=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of l(e))!u.call(t,i)&&i!==a&&s(t,i,{get:()=>e[i],enumerable:!(o=m(e,i))||o.enumerable});return t};var x=t=>d(s({},"__esModule",{value:!0}),t);var F={};p(F,{conf:()=>f,language:()=>L});var f={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]};function r(t){let e=[],a=t.split(/\t+|\r+|\n+| +/);for(let o=0;o0&&e.push(a[o]);return e}var g=r("true false"),_=r(` - alias - break - case - const - const_assert - continue - continuing - default - diagnostic - discard - else - enable - fn - for - if - let - loop - override - requires - return - struct - switch - var - while - `),h=r(` - NULL - Self - abstract - active - alignas - alignof - as - asm - asm_fragment - async - attribute - auto - await - become - binding_array - cast - catch - class - co_await - co_return - co_yield - coherent - column_major - common - compile - compile_fragment - concept - const_cast - consteval - constexpr - constinit - crate - debugger - decltype - delete - demote - demote_to_helper - do - dynamic_cast - enum - explicit - export - extends - extern - external - fallthrough - filter - final - finally - friend - from - fxgroup - get - goto - groupshared - highp - impl - implements - import - inline - instanceof - interface - layout - lowp - macro - macro_rules - match - mediump - meta - mod - module - move - mut - mutable - namespace - new - nil - noexcept - noinline - nointerpolation - noperspective - null - nullptr - of - operator - package - packoffset - partition - pass - patch - pixelfragment - precise - precision - premerge - priv - protected - pub - public - readonly - ref - regardless - register - reinterpret_cast - require - resource - restrict - self - set - shared - sizeof - smooth - snorm - static - static_assert - static_cast - std - subroutine - super - target - template - this - thread_local - throw - trait - try - type - typedef - typeid - typename - typeof - union - unless - unorm - unsafe - unsized - use - using - varying - virtual - volatile - wgsl - where - with - writeonly - yield - `),b=r(` - read write read_write - function private workgroup uniform storage - perspective linear flat - center centroid sample - vertex_index instance_index position front_facing frag_depth - local_invocation_id local_invocation_index - global_invocation_id workgroup_id num_workgroups - sample_index sample_mask - rgba8unorm - rgba8snorm - rgba8uint - rgba8sint - rgba16uint - rgba16sint - rgba16float - r32uint - r32sint - r32float - rg32uint - rg32sint - rg32float - rgba32uint - rgba32sint - rgba32float - bgra8unorm -`),v=r(` - bool - f16 - f32 - i32 - sampler sampler_comparison - texture_depth_2d - texture_depth_2d_array - texture_depth_cube - texture_depth_cube_array - texture_depth_multisampled_2d - texture_external - texture_external - u32 - `),y=r(` - array - atomic - mat2x2 - mat2x3 - mat2x4 - mat3x2 - mat3x3 - mat3x4 - mat4x2 - mat4x3 - mat4x4 - ptr - texture_1d - texture_2d - texture_2d_array - texture_3d - texture_cube - texture_cube_array - texture_multisampled_2d - texture_storage_1d - texture_storage_2d - texture_storage_2d_array - texture_storage_3d - vec2 - vec3 - vec4 - `),k=r(` - vec2i vec3i vec4i - vec2u vec3u vec4u - vec2f vec3f vec4f - vec2h vec3h vec4h - mat2x2f mat2x3f mat2x4f - mat3x2f mat3x3f mat3x4f - mat4x2f mat4x3f mat4x4f - mat2x2h mat2x3h mat2x4h - mat3x2h mat3x3h mat3x4h - mat4x2h mat4x3h mat4x4h - `),w=r(` - bitcast all any select arrayLength abs acos acosh asin asinh atan atanh atan2 - ceil clamp cos cosh countLeadingZeros countOneBits countTrailingZeros cross - degrees determinant distance dot exp exp2 extractBits faceForward firstLeadingBit - firstTrailingBit floor fma fract frexp inverseBits inverseSqrt ldexp length - log log2 max min mix modf normalize pow quantizeToF16 radians reflect refract - reverseBits round saturate sign sin sinh smoothstep sqrt step tan tanh transpose - trunc dpdx dpdxCoarse dpdxFine dpdy dpdyCoarse dpdyFine fwidth fwidthCoarse fwidthFine - textureDimensions textureGather textureGatherCompare textureLoad textureNumLayers - textureNumLevels textureNumSamples textureSample textureSampleBias textureSampleCompare - textureSampleCompareLevel textureSampleGrad textureSampleLevel textureSampleBaseClampToEdge - textureStore atomicLoad atomicStore atomicAdd atomicSub atomicMax atomicMin - atomicAnd atomicOr atomicXor atomicExchange atomicCompareExchangeWeak pack4x8snorm - pack4x8unorm pack2x16snorm pack2x16unorm pack2x16float unpack4x8snorm unpack4x8unorm - unpack2x16snorm unpack2x16unorm unpack2x16float storageBarrier workgroupBarrier - workgroupUniformLoad -`),S=r(` - & - && - -> - / - = - == - != - > - >= - < - <= - % - - - -- - + - ++ - | - || - * - << - >> - += - -= - *= - /= - %= - &= - |= - ^= - >>= - <<= - `),C=/enable|requires|diagnostic/,c=/[_\p{XID_Start}]\p{XID_Continue}*/u,n="variable.predefined",L={tokenPostfix:".wgsl",defaultToken:"invalid",unicode:!0,atoms:g,keywords:_,reserved:h,predeclared_enums:b,predeclared_types:v,predeclared_type_generators:y,predeclared_type_aliases:k,predeclared_intrinsics:w,operators:S,symbols:/[!%&*+\-\.\/:;<=>^|_~,]+/,tokenizer:{root:[[C,"keyword","@directive"],[c,{cases:{"@atoms":n,"@keywords":"keyword","@reserved":"invalid","@predeclared_enums":n,"@predeclared_types":n,"@predeclared_type_generators":n,"@predeclared_type_aliases":n,"@predeclared_intrinsics":n,"@default":"identifier"}}],{include:"@commentOrSpace"},{include:"@numbers"},[/[{}()\[\]]/,"@brackets"],["@","annotation","@attribute"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/./,"invalid"]],commentOrSpace:[[/\s+/,"white"],[/\/\*/,"comment","@blockComment"],[/\/\/.*$/,"comment"]],blockComment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],attribute:[{include:"@commentOrSpace"},[/\w+/,"annotation","@pop"]],directive:[{include:"@commentOrSpace"},[/[()]/,"@brackets"],[/,/,"delimiter"],[c,"meta.content"],[/;/,"delimiter","@pop"]],numbers:[[/0[fh]/,"number.float"],[/[1-9][0-9]*[fh]/,"number.float"],[/[0-9]*\.[0-9]+([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+\.[0-9]*([eE][+-]?[0-9]+)?[fh]?/,"number.float"],[/[0-9]+[eE][+-]?[0-9]+[fh]?/,"number.float"],[/0[xX][0-9a-fA-F]*\.[0-9a-fA-F]+(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*(?:[pP][+-]?[0-9]+[fh]?)?/,"number.hex"],[/0[xX][0-9a-fA-F]+[pP][+-]?[0-9]+[fh]?/,"number.hex"],[/0[xX][0-9a-fA-F]+[iu]?/,"number.hex"],[/[1-9][0-9]*[iu]?/,"number"],[/0[iu]?/,"number"]]}};return x(F);})(); -return moduleExports; -}); diff --git a/lib/vs/basic-languages/xml/xml.js b/lib/vs/basic-languages/xml/xml.js deleted file mode 100644 index aad8bcf..0000000 --- a/lib/vs/basic-languages/xml/xml.js +++ /dev/null @@ -1,10 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/xml/xml", ["require","require"],(require)=>{ -var moduleExports=(()=>{var u=Object.create;var m=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var k=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty;var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var w=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),b=(e,t)=>{for(var n in t)m(e,n,{get:t[n],enumerable:!0})},i=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of p(t))!x.call(e,o)&&o!==n&&m(e,o,{get:()=>t[o],enumerable:!(r=g(t,o))||r.enumerable});return e},l=(e,t,n)=>(i(e,t,"default"),n&&i(n,t,"default")),c=(e,t,n)=>(n=e!=null?u(k(e)):{},i(t||!e||!e.__esModule?m(n,"default",{value:e,enumerable:!0}):n,e)),q=e=>i(m({},"__esModule",{value:!0}),e);var s=w((v,d)=>{var N=c(f("vs/editor/editor.api"));d.exports=N});var I={};b(I,{conf:()=>A,language:()=>C});var a={};l(a,c(s()));var A={comments:{blockComment:[""]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:a.languages.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:a.languages.IndentAction.Indent}}]},C={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[//,{token:"comment",next:"@pop"}],[/"),typeof He!="string"&&!at(He))if(typeof He.toString=="function"){if(He=He.toString(),typeof He!="string")throw kt("dirty is not a string, aborting")}else throw kt("toString is not a function");if(!e.isSupported)return He;if(H||Pe(Te),e.removed=[],typeof He=="string"&&(X=!1),X){if(He.nodeName){const Ne=De(He.nodeName);if(!A[Ne]||U[Ne])throw kt("root node is forbidden and cannot be sanitized in-place")}}else if(He instanceof m)Fe=it(""),Ve=Fe.ownerDocument.importNode(He,!0),Ve.nodeType===1&&Ve.nodeName==="BODY"||Ve.nodeName==="HTML"?Fe=Ve:Fe.appendChild(Ve);else{if(!Z&&!J&&!q&&He.indexOf("<")===-1)return l&&le?l.createHTML(He):He;if(Fe=it(He),!Fe)return Z?null:le?o:""}Fe&&V&&Ge(Fe.firstChild);const ot=Ze(X?He:Fe);for(;Ye=ot.nextNode();)Ct(Ye)||(Ye.content instanceof D&&_t(Ye.content),ft(Ye));if(X)return He;if(Z){if(ee)for(st=g.call(Fe.ownerDocument);Fe.firstChild;)st.appendChild(Fe.firstChild);else st=Fe;return(O.shadowroot||O.shadowrootmode)&&(st=p.call(L,st,!0)),st}let Ue=q?Fe.outerHTML:Fe.innerHTML;return q&&A["!doctype"]&&Fe.ownerDocument&&Fe.ownerDocument.doctype&&Fe.ownerDocument.doctype.name&>(Gt,Fe.ownerDocument.doctype.name)&&(Ue=" -`+Ue),J&&(Ue=vt(Ue,w," "),Ue=vt(Ue,E," "),Ue=vt(Ue,k," ")),l&&le?l.createHTML(Ue):Ue},e.setConfig=function(He){Pe(He),H=!0},e.clearConfig=function(){fe=null,H=!1},e.isValidAttribute=function(He,Te,Fe){fe||Pe({});const Ve=De(He),Ye=De(Te);return ht(Ve,Ye,Fe)},e.addHook=function(He,Te){typeof Te=="function"&&(b[He]=b[He]||[],It(b[He],Te))},e.removeHook=function(He){if(b[He])return zt(b[He])},e.removeHooks=function(He){b[He]&&(b[He]=[])},e.removeAllHooks=function(){b={}},e}var pi=Zt();define("vs/base/browser/dompurify/dompurify",function(){return pi}),define(te[38],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createFastDomNode=e.FastDomNode=void 0;class L{constructor(S){this.domNode=S,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingLeft="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(S){const m=I(S);this._maxWidth!==m&&(this._maxWidth=m,this.domNode.style.maxWidth=this._maxWidth)}setWidth(S){const m=I(S);this._width!==m&&(this._width=m,this.domNode.style.width=this._width)}setHeight(S){const m=I(S);this._height!==m&&(this._height=m,this.domNode.style.height=this._height)}setTop(S){const m=I(S);this._top!==m&&(this._top=m,this.domNode.style.top=this._top)}setLeft(S){const m=I(S);this._left!==m&&(this._left=m,this.domNode.style.left=this._left)}setBottom(S){const m=I(S);this._bottom!==m&&(this._bottom=m,this.domNode.style.bottom=this._bottom)}setRight(S){const m=I(S);this._right!==m&&(this._right=m,this.domNode.style.right=this._right)}setPaddingLeft(S){const m=I(S);this._paddingLeft!==m&&(this._paddingLeft=m,this.domNode.style.paddingLeft=this._paddingLeft)}setFontFamily(S){this._fontFamily!==S&&(this._fontFamily=S,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(S){this._fontWeight!==S&&(this._fontWeight=S,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(S){const m=I(S);this._fontSize!==m&&(this._fontSize=m,this.domNode.style.fontSize=this._fontSize)}setFontStyle(S){this._fontStyle!==S&&(this._fontStyle=S,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(S){this._fontFeatureSettings!==S&&(this._fontFeatureSettings=S,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(S){this._fontVariationSettings!==S&&(this._fontVariationSettings=S,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(S){this._textDecoration!==S&&(this._textDecoration=S,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(S){const m=I(S);this._lineHeight!==m&&(this._lineHeight=m,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(S){const m=I(S);this._letterSpacing!==m&&(this._letterSpacing=m,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(S){this._className!==S&&(this._className=S,this.domNode.className=this._className)}toggleClassName(S,m){this.domNode.classList.toggle(S,m),this._className=this.domNode.className}setDisplay(S){this._display!==S&&(this._display=S,this.domNode.style.display=this._display)}setPosition(S){this._position!==S&&(this._position=S,this.domNode.style.position=this._position)}setVisibility(S){this._visibility!==S&&(this._visibility=S,this.domNode.style.visibility=this._visibility)}setColor(S){this._color!==S&&(this._color=S,this.domNode.style.color=this._color)}setBackgroundColor(S){this._backgroundColor!==S&&(this._backgroundColor=S,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(S){this._layerHint!==S&&(this._layerHint=S,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(S){this._boxShadow!==S&&(this._boxShadow=S,this.domNode.style.boxShadow=S)}setContain(S){this._contain!==S&&(this._contain=S,this.domNode.style.contain=this._contain)}setAttribute(S,m){this.domNode.setAttribute(S,m)}removeAttribute(S){this.domNode.removeAttribute(S)}appendChild(S){this.domNode.appendChild(S.domNode)}removeChild(S){this.domNode.removeChild(S.domNode)}}e.FastDomNode=L;function I(D){return typeof D=="number"?`${D}px`:D}function y(D){return new L(D)}e.createFastDomNode=y}),define(te[384],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IframeUtils=void 0;let L=!1,I=null;function y(S){if(!S.parent||S.parent===S)return null;try{const m=S.location,_=S.parent.location;if(m.origin!=="null"&&_.origin!=="null"&&m.origin!==_.origin)return L=!0,null}catch{return L=!0,null}return S.parent}class D{static getSameOriginWindowChain(){if(!I){I=[];let m=window,_;do _=y(m),_?I.push({window:m,iframeElement:m.frameElement||null}):I.push({window:m,iframeElement:null}),m=_;while(m)}return I.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(m,_){if(!_||m===_)return{top:0,left:0};let v=0,C=0;const s=this.getSameOriginWindowChain();for(const i of s){if(v+=i.window.scrollY,C+=i.window.scrollX,i.window===_||!i.iframeElement)break;const n=i.iframeElement.getBoundingClientRect();v+=n.top,C+=n.left}return{top:v,left:C}}}e.IframeUtils=D}),define(te[258],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.inputLatency=void 0;var L;(function(I){const y={total:0,min:Number.MAX_VALUE,max:0},D=Object.assign({},y),S=Object.assign({},y),m=Object.assign({},y);let _=0;const v={keydown:0,input:0,render:0};function C(){o(),performance.mark("inputlatency/start"),performance.mark("keydown/start"),v.keydown=1,queueMicrotask(s)}I.onKeyDown=C;function s(){v.keydown===1&&(performance.mark("keydown/end"),v.keydown=2)}function i(){performance.mark("input/start"),v.input=1,l()}I.onBeforeInput=i;function n(){v.input===0&&i(),queueMicrotask(t)}I.onInput=n;function t(){v.input===1&&(performance.mark("input/end"),v.input=2)}function r(){o()}I.onKeyUp=r;function u(){o()}I.onSelectionChange=u;function f(){v.keydown===2&&v.input===2&&v.render===0&&(performance.mark("render/start"),v.render=1,queueMicrotask(d),l())}I.onRenderStart=f;function d(){v.render===1&&(performance.mark("render/end"),v.render=2)}function l(){setTimeout(o)}function o(){v.keydown===2&&v.input===2&&v.render===2&&(performance.mark("inputlatency/end"),performance.measure("keydown","keydown/start","keydown/end"),performance.measure("input","input/start","input/end"),performance.measure("render","render/start","render/end"),performance.measure("inputlatency","inputlatency/start","inputlatency/end"),c("keydown",y),c("input",D),c("render",S),c("inputlatency",m),_++,a())}function c(b,w){const E=performance.getEntriesByName(b)[0].duration;w.total+=E,w.min=Math.min(w.min,E),w.max=Math.max(w.max,E)}function a(){performance.clearMarks("keydown/start"),performance.clearMarks("keydown/end"),performance.clearMarks("input/start"),performance.clearMarks("input/end"),performance.clearMarks("render/start"),performance.clearMarks("render/end"),performance.clearMarks("inputlatency/start"),performance.clearMarks("inputlatency/end"),performance.clearMeasures("keydown"),performance.clearMeasures("input"),performance.clearMeasures("render"),performance.clearMeasures("inputlatency"),v.keydown=0,v.input=0,v.render=0}function g(){if(_===0)return;const b={keydown:h(y),input:h(D),render:h(S),total:h(m),sampleCount:_};return p(y),p(D),p(S),p(m),_=0,b}I.getAndClearMeasurements=g;function h(b){return{average:b.total/_,max:b.max,min:b.min}}function p(b){b.total=0,b.min=Number.MAX_VALUE,b.max=0}})(L||(e.inputLatency=L={}))}),define(te[385],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListError=void 0;class L extends Error{constructor(y,D){super(`ListError [${y}] ${D}`)}}e.ListError=L}),define(te[386],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CombinedSpliceable=void 0;class L{constructor(y){this.spliceables=y}splice(y,D,S){this.spliceables.forEach(m=>m.splice(y,D,S))}}e.CombinedSpliceable=L}),define(te[195],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarState=void 0;const L=20;class I{constructor(D,S,m,_,v,C){this._scrollbarSize=Math.round(S),this._oppositeScrollbarSize=Math.round(m),this._arrowSize=Math.round(D),this._visibleSize=_,this._scrollSize=v,this._scrollPosition=C,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new I(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(D){const S=Math.round(D);return this._visibleSize!==S?(this._visibleSize=S,this._refreshComputedValues(),!0):!1}setScrollSize(D){const S=Math.round(D);return this._scrollSize!==S?(this._scrollSize=S,this._refreshComputedValues(),!0):!1}setScrollPosition(D){const S=Math.round(D);return this._scrollPosition!==S?(this._scrollPosition=S,this._refreshComputedValues(),!0):!1}setScrollbarSize(D){this._scrollbarSize=Math.round(D)}setOppositeScrollbarSize(D){this._oppositeScrollbarSize=Math.round(D)}static _computeValues(D,S,m,_,v){const C=Math.max(0,m-D),s=Math.max(0,C-2*S),i=_>0&&_>m;if(!i)return{computedAvailableSize:Math.round(C),computedIsNeeded:i,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const n=Math.round(Math.max(L,Math.floor(m*s/_))),t=(s-n)/(_-m),r=v*t;return{computedAvailableSize:Math.round(C),computedIsNeeded:i,computedSliderSize:Math.round(n),computedSliderRatio:t,computedSliderPosition:Math.round(r)}}_refreshComputedValues(){const D=I._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=D.computedAvailableSize,this._computedIsNeeded=D.computedIsNeeded,this._computedSliderSize=D.computedSliderSize,this._computedSliderRatio=D.computedSliderRatio,this._computedSliderPosition=D.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(D){if(!this._computedIsNeeded)return 0;const S=D-this._arrowSize-this._computedSliderSize/2;return Math.round(S/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(D){if(!this._computedIsNeeded)return 0;const S=D-this._arrowSize;let m=this._scrollPosition;return SW===U){if(P===O)return!0;if(!P||!O||P.length!==O.length)return!1;for(let W=0,U=P.length;Wx(P[W],O))}e.binarySearch=S;function m(P,O){let x=0,W=P-1;for(;x<=W;){const U=(x+W)/2|0,F=O(U);if(F<0)x=U+1;else if(F>0)W=U-1;else return U}return-(x+1)}e.binarySearch2=m;function _(P,O,x){if(P=P|0,P>=O.length)throw new TypeError("invalid index");const W=O[Math.floor(O.length*Math.random())],U=[],F=[],G=[];for(const Y of O){const ne=x(Y,W);ne<0?U.push(Y):ne>0?F.push(Y):G.push(Y)}return P!!O)}e.coalesce=n;function t(P){let O=0;for(let x=0;x0}e.isNonEmptyArray=u;function f(P,O=x=>x){const x=new Set;return P.filter(W=>{const U=O(W);return x.has(U)?!1:(x.add(U),!0)})}e.distinct=f;function d(P,O){return P.length>0?P[0]:O}e.firstOrDefault=d;function l(P,O){let x=typeof O=="number"?P:0;typeof O=="number"?x=P:(x=0,O=P);const W=[];if(x<=O)for(let U=x;UO;U--)W.push(U);return W}e.range=l;function o(P,O,x){const W=P.slice(0,O),U=P.slice(O);return W.concat(x,U)}e.arrayInsert=o;function c(P,O){const x=P.indexOf(O);x>-1&&(P.splice(x,1),P.unshift(O))}e.pushToStart=c;function a(P,O){const x=P.indexOf(O);x>-1&&(P.splice(x,1),P.push(O))}e.pushToEnd=a;function g(P,O){for(const x of O)P.push(x)}e.pushMany=g;function h(P){return Array.isArray(P)?P:[P]}e.asArray=h;function p(P,O,x){const W=w(P,O),U=P.length,F=x.length;P.length=U+F;for(let G=U-1;G>=W;G--)P[G+F]=P[G];for(let G=0;G0}P.isGreaterThan=W;function U(F){return F===0}P.isNeitherLessOrGreaterThan=U,P.greaterThan=1,P.lessThan=-1,P.neitherLessOrGreaterThan=0})(E||(e.CompareResult=E={}));function k(P,O){return(x,W)=>O(P(x),P(W))}e.compareBy=k;function M(...P){return(O,x)=>{for(const W of P){const U=W(O,x);if(!E.isNeitherLessOrGreaterThan(U))return U}return E.neitherLessOrGreaterThan}}e.tieBreakComparators=M;const R=(P,O)=>P-O;e.numberComparator=R;const B=(P,O)=>(0,e.numberComparator)(P?1:0,O?1:0);e.booleanComparator=B;function T(P){return(O,x)=>-P(O,x)}e.reverseOrder=T;class N{constructor(O){this.items=O,this.firstIdx=0,this.lastIdx=this.items.length-1}get length(){return this.lastIdx-this.firstIdx+1}takeWhile(O){let x=this.firstIdx;for(;x=0&&O(this.items[x]);)x--;const W=x===this.lastIdx?null:this.items.slice(x+1,this.lastIdx+1);return this.lastIdx=x,W}peek(){if(this.length!==0)return this.items[this.firstIdx]}dequeue(){const O=this.items[this.firstIdx];return this.firstIdx++,O}takeCount(O){const x=this.items.slice(this.firstIdx,this.firstIdx+O);return this.firstIdx+=O,x}}e.ArrayQueue=N;class A{constructor(O){this.iterate=O}toArray(){const O=[];return this.iterate(x=>(O.push(x),!0)),O}filter(O){return new A(x=>this.iterate(W=>O(W)?x(W):!0))}map(O){return new A(x=>this.iterate(W=>x(O(W))))}findLast(O){let x;return this.iterate(W=>(O(W)&&(x=W),!0)),x}findLastMaxBy(O){let x,W=!0;return this.iterate(U=>((W||E.isGreaterThan(O(U,x)))&&(W=!1,x=U),!0)),x}}e.CallbackIterable=A,A.empty=new A(P=>{})}),define(te[68],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mapFindFirst=e.findMaxIdxBy=e.findFirstMinBy=e.findLastMaxBy=e.findFirstMaxBy=e.MonotonousArray=e.findFirstIdxMonotonousOrArrLen=e.findFirstMonotonous=e.findLastIdxMonotonous=e.findLastMonotonous=e.findLastIdx=e.findLast=void 0;function L(t,r,u){const f=I(t,r);if(f!==-1)return t[f]}e.findLast=L;function I(t,r,u=t.length-1){for(let f=u;f>=0;f--){const d=t[f];if(r(d))return f}return-1}e.findLastIdx=I;function y(t,r){const u=D(t,r);return u===-1?void 0:t[u]}e.findLastMonotonous=y;function D(t,r,u=0,f=t.length){let d=u,l=f;for(;d0&&(u=d)}return u}e.findFirstMaxBy=v;function C(t,r){if(t.length===0)return;let u=t[0];for(let f=1;f=0&&(u=d)}return u}e.findLastMaxBy=C;function s(t,r){return v(t,(u,f)=>-r(u,f))}e.findFirstMinBy=s;function i(t,r){if(t.length===0)return-1;let u=0;for(let f=1;f0&&(u=f)}return u}e.findMaxIdxBy=i;function n(t,r){for(const u of t){const f=r(u);if(f!==void 0)return f}}e.mapFindFirst=n}),define(te[259],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CachedFunction=e.LRUCachedFunction=void 0;class L{constructor(D){this.fn=D,this.lastCache=void 0,this.lastArgKey=void 0}get(D){const S=JSON.stringify(D);return this.lastArgKey!==S&&(this.lastArgKey=S,this.lastCache=this.fn(D)),this.lastCache}}e.LRUCachedFunction=L;class I{get cachedValues(){return this._map}constructor(D){this.fn=D,this._map=new Map}get(D){if(this._map.has(D))return this._map.get(D);const S=this.fn(D);return this._map.set(D,S),S}}e.CachedFunction=I}),define(te[260],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intersection=e.diffSets=void 0;function L(y,D){const S=[],m=[];for(const _ of y)D.has(_)||S.push(_);for(const _ of D)y.has(_)||m.push(_);return{removed:S,added:m}}e.diffSets=L;function I(y,D){const S=new Set;for(const m of D)y.has(m)&&S.add(m);return S}e.intersection=I}),define(te[36],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Color=e.HSVA=e.HSLA=e.RGBA=void 0;function L(m,_){const v=Math.pow(10,_);return Math.round(m*v)/v}class I{constructor(_,v,C,s=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,_))|0,this.g=Math.min(255,Math.max(0,v))|0,this.b=Math.min(255,Math.max(0,C))|0,this.a=L(Math.max(Math.min(1,s),0),3)}static equals(_,v){return _.r===v.r&&_.g===v.g&&_.b===v.b&&_.a===v.a}}e.RGBA=I;class y{constructor(_,v,C,s){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,_),0)|0,this.s=L(Math.max(Math.min(1,v),0),3),this.l=L(Math.max(Math.min(1,C),0),3),this.a=L(Math.max(Math.min(1,s),0),3)}static equals(_,v){return _.h===v.h&&_.s===v.s&&_.l===v.l&&_.a===v.a}static fromRGBA(_){const v=_.r/255,C=_.g/255,s=_.b/255,i=_.a,n=Math.max(v,C,s),t=Math.min(v,C,s);let r=0,u=0;const f=(t+n)/2,d=n-t;if(d>0){switch(u=Math.min(f<=.5?d/(2*f):d/(2-2*f),1),n){case v:r=(C-s)/d+(C1&&(C-=1),C<1/6?_+(v-_)*6*C:C<1/2?v:C<2/3?_+(v-_)*(2/3-C)*6:_}static toRGBA(_){const v=_.h/360,{s:C,l:s,a:i}=_;let n,t,r;if(C===0)n=t=r=s;else{const u=s<.5?s*(1+C):s+C-s*C,f=2*s-u;n=y._hue2rgb(f,u,v+1/3),t=y._hue2rgb(f,u,v),r=y._hue2rgb(f,u,v-1/3)}return new I(Math.round(n*255),Math.round(t*255),Math.round(r*255),i)}}e.HSLA=y;class D{constructor(_,v,C,s){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,_),0)|0,this.s=L(Math.max(Math.min(1,v),0),3),this.v=L(Math.max(Math.min(1,C),0),3),this.a=L(Math.max(Math.min(1,s),0),3)}static equals(_,v){return _.h===v.h&&_.s===v.s&&_.v===v.v&&_.a===v.a}static fromRGBA(_){const v=_.r/255,C=_.g/255,s=_.b/255,i=Math.max(v,C,s),n=Math.min(v,C,s),t=i-n,r=i===0?0:t/i;let u;return t===0?u=0:i===v?u=((C-s)/t%6+6)%6:i===C?u=(s-v)/t+2:u=(v-C)/t+4,new D(Math.round(u*60),r,i,_.a)}static toRGBA(_){const{h:v,s:C,v:s,a:i}=_,n=s*C,t=n*(1-Math.abs(v/60%2-1)),r=s-n;let[u,f,d]=[0,0,0];return v<60?(u=n,f=t):v<120?(u=t,f=n):v<180?(f=n,d=t):v<240?(f=t,d=n):v<300?(u=t,d=n):v<=360&&(u=n,d=t),u=Math.round((u+r)*255),f=Math.round((f+r)*255),d=Math.round((d+r)*255),new I(u,f,d,i)}}e.HSVA=D;class S{static fromHex(_){return S.Format.CSS.parseHex(_)||S.red}static equals(_,v){return!_&&!v?!0:!_||!v?!1:_.equals(v)}get hsla(){return this._hsla?this._hsla:y.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:D.fromRGBA(this.rgba)}constructor(_){if(_)if(_ instanceof I)this.rgba=_;else if(_ instanceof y)this._hsla=_,this.rgba=y.toRGBA(_);else if(_ instanceof D)this._hsva=_,this.rgba=D.toRGBA(_);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(_){return!!_&&I.equals(this.rgba,_.rgba)&&y.equals(this.hsla,_.hsla)&&D.equals(this.hsva,_.hsva)}getRelativeLuminance(){const _=S._relativeLuminanceForComponent(this.rgba.r),v=S._relativeLuminanceForComponent(this.rgba.g),C=S._relativeLuminanceForComponent(this.rgba.b),s=.2126*_+.7152*v+.0722*C;return L(s,4)}static _relativeLuminanceForComponent(_){const v=_/255;return v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(_){const v=this.getRelativeLuminance(),C=_.getRelativeLuminance();return v>C}isDarkerThan(_){const v=this.getRelativeLuminance(),C=_.getRelativeLuminance();return v{throw u.stack?n.isErrorNoTelemetry(u)?new n(u.message+` - -`+u.stack):new Error(u.message+` - -`+u.stack):u},0)}}emit(u){this.listeners.forEach(f=>{f(u)})}onUnexpectedError(u){this.unexpectedErrorHandler(u),this.emit(u)}onUnexpectedExternalError(u){this.unexpectedErrorHandler(u)}}e.ErrorHandler=L,e.errorHandler=new L;function I(r){m(r)||e.errorHandler.onUnexpectedError(r)}e.onUnexpectedError=I;function y(r){m(r)||e.errorHandler.onUnexpectedExternalError(r)}e.onUnexpectedExternalError=y;function D(r){if(r instanceof Error){const{name:u,message:f}=r,d=r.stacktrace||r.stack;return{$isError:!0,name:u,message:f,stack:d,noTelemetry:n.isErrorNoTelemetry(r)}}return r}e.transformErrorForSerialization=D;const S="Canceled";function m(r){return r instanceof _?!0:r instanceof Error&&r.name===S&&r.message===S}e.isCancellationError=m;class _ extends Error{constructor(){super(S),this.name=this.message}}e.CancellationError=_;function v(){const r=new Error(S);return r.name=r.message,r}e.canceled=v;function C(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}e.illegalArgument=C;function s(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}e.illegalState=s;class i extends Error{constructor(u){super("NotSupported"),u&&(this.message=u)}}e.NotSupportedError=i;class n extends Error{constructor(u){super(u),this.name="CodeExpectedError"}static fromError(u){if(u instanceof n)return u;const f=new n;return f.message=u.message,f.stack=u.stack,f}static isErrorNoTelemetry(u){return u.name==="CodeExpectedError"}}e.ErrorNoTelemetry=n;class t extends Error{constructor(u){super(u||"An unexpected bug occurred."),Object.setPrototypeOf(this,t.prototype)}}e.BugIndicatingError=t}),define(te[90],ie([1,0,9]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTrustedTypesPolicy=void 0;function I(y,D){var S;const m=globalThis.MonacoEnvironment;if(m?.createTrustedTypesPolicy)try{return m.createTrustedTypesPolicy(y,D)}catch(_){(0,L.onUnexpectedError)(_);return}try{return(S=window.trustedTypes)===null||S===void 0?void 0:S.createPolicy(y,D)}catch(_){(0,L.onUnexpectedError)(_);return}}e.createTrustedTypesPolicy=I}),define(te[96],ie([1,0,9]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.checkAdjacentItems=e.assertFn=e.assertNever=e.ok=void 0;function I(m,_){if(!m)throw new Error(_?`Assertion failed (${_})`:"Assertion Failed")}e.ok=I;function y(m,_="Unreachable"){throw new Error(_)}e.assertNever=y;function D(m){if(!m()){debugger;m(),(0,L.onUnexpectedError)(new L.BugIndicatingError("Assertion Failed"))}}e.assertFn=D;function S(m,_){let v=0;for(;v=0;a--)yield c[a]}I.reverse=C;function s(c){return!c||c[Symbol.iterator]().next().done===!0}I.isEmpty=s;function i(c){return c[Symbol.iterator]().next().value}I.first=i;function n(c,a){for(const g of c)if(a(g))return!0;return!1}I.some=n;function t(c,a){for(const g of c)if(a(g))return g}I.find=t;function*r(c,a){for(const g of c)a(g)&&(yield g)}I.filter=r;function*u(c,a){let g=0;for(const h of c)yield a(h,g++)}I.map=u;function*f(...c){for(const a of c)for(const g of a)yield g}I.concat=f;function d(c,a,g){let h=g;for(const p of c)h=a(h,p);return h}I.reduce=d;function*l(c,a,g=c.length){for(a<0&&(a+=c.length),g<0?g+=c.length:g>c.length&&(g=c.length);a=98&&d<=113)return null;switch(d){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return I.keyCodeToStr(d)}s.toElectronAccelerator=f})(v||(e.KeyCodeUtils=v={}));function C(s,i){const n=(i&65535)<<16>>>0;return(s|n)>>>0}e.KeyChord=C}),define(te[118],ie([1,0,9]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResolvedKeybinding=e.ResolvedChord=e.Keybinding=e.ScanCodeChord=e.KeyCodeChord=e.createSimpleKeybinding=e.decodeKeybinding=void 0;function I(C,s){if(typeof C=="number"){if(C===0)return null;const i=(C&65535)>>>0,n=(C&4294901760)>>>16;return n!==0?new m([y(i,s),y(n,s)]):new m([y(i,s)])}else{const i=[];for(let n=0;nnew Uint8Array(256));let D;class S{static wrap(t){return I&&!Buffer.isBuffer(t)&&(t=Buffer.from(t.buffer,t.byteOffset,t.byteLength)),new S(t)}constructor(t){this.buffer=t,this.byteLength=this.buffer.byteLength}toString(){return I?this.buffer.toString():(D||(D=new TextDecoder),D.decode(this.buffer))}}e.VSBuffer=S;function m(n,t){return n[t+0]<<0>>>0|n[t+1]<<8>>>0}e.readUInt16LE=m;function _(n,t,r){n[r+0]=t&255,t=t>>>8,n[r+1]=t&255}e.writeUInt16LE=_;function v(n,t){return n[t]*Math.pow(2,24)+n[t+1]*Math.pow(2,16)+n[t+2]*Math.pow(2,8)+n[t+3]}e.readUInt32BE=v;function C(n,t,r){n[r+3]=t,t=t>>>8,n[r+2]=t,t=t>>>8,n[r+1]=t,t=t>>>8,n[r]=t}e.writeUInt32BE=C;function s(n,t){return n[t]}e.readUInt8=s;function i(n,t,r){n[r]=t}e.writeUInt8=i}),define(te[388],ie([1,0,97]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareByPrefix=e.compareAnything=e.compareFileNames=void 0;const I=new L.Lazy(()=>{const v=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:v,collatorIsNumeric:v.resolvedOptions().numeric}}),y=new L.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0})})),D=new L.Lazy(()=>({collator:new Intl.Collator(void 0,{numeric:!0,sensitivity:"accent"})}));function S(v,C,s=!1){const i=v||"",n=C||"",t=I.value.collator.compare(i,n);return I.value.collatorIsNumeric&&t===0&&i!==n?in.length)return 1}return 0}e.compareByPrefix=_}),define(te[2],ie([1,0,106,43]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableMap=e.ImmortalReference=e.RefCountedDisposable=e.MutableDisposable=e.Disposable=e.DisposableStore=e.toDisposable=e.combinedDisposable=e.dispose=e.isDisposable=e.markAsSingleton=e.markAsDisposed=e.trackDisposable=e.setDisposableTracker=void 0;const y=!1;let D=null;function S(a){D=a}if(e.setDisposableTracker=S,y){const a="__is_disposable_tracked__";S(new class{trackDisposable(g){const h=new Error("Potentially leaked disposable").stack;setTimeout(()=>{g[a]||console.log(h)},3e3)}setParent(g,h){if(g&&g!==f.None)try{g[a]=!0}catch{}}markAsDisposed(g){if(g&&g!==f.None)try{g[a]=!0}catch{}}markAsSingleton(g){}})}function m(a){return D?.trackDisposable(a),a}e.trackDisposable=m;function _(a){D?.markAsDisposed(a)}e.markAsDisposed=_;function v(a,g){D?.setParent(a,g)}function C(a,g){if(D)for(const h of a)D.setParent(h,g)}function s(a){return D?.markAsSingleton(a),a}e.markAsSingleton=s;function i(a){return typeof a.dispose=="function"&&a.dispose.length===0}e.isDisposable=i;function n(a){if(I.Iterable.is(a)){const g=[];for(const h of a)if(h)try{h.dispose()}catch(p){g.push(p)}if(g.length===1)throw g[0];if(g.length>1)throw new AggregateError(g,"Encountered errors while disposing of store");return Array.isArray(a)?[]:a}else if(a)return a.dispose(),a}e.dispose=n;function t(...a){const g=r(()=>n(a));return C(a,g),g}e.combinedDisposable=t;function r(a){const g=m({dispose:(0,L.createSingleCallFunction)(()=>{_(g),a()})});return g}e.toDisposable=r;class u{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){this._isDisposed||(_(this),this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{n(this._toDispose)}finally{this._toDispose.clear()}}add(g){if(!g)return g;if(g===this)throw new Error("Cannot register a disposable on itself!");return v(g,this),this._isDisposed?u.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(g),g}deleteAndLeak(g){g&&this._toDispose.has(g)&&(this._toDispose.delete(g),v(g,null))}}e.DisposableStore=u,u.DISABLE_DISPOSED_WARNING=!1;class f{constructor(){this._store=new u,m(this),v(this._store,this)}dispose(){_(this),this._store.dispose()}_register(g){if(g===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(g)}}e.Disposable=f,f.None=Object.freeze({dispose(){}});class d{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(g){var h;this._isDisposed||g===this._value||((h=this._value)===null||h===void 0||h.dispose(),g&&v(g,this),this._value=g)}clear(){this.value=void 0}dispose(){var g;this._isDisposed=!0,_(this),(g=this._value)===null||g===void 0||g.dispose(),this._value=void 0}}e.MutableDisposable=d;class l{constructor(g){this._disposable=g,this._counter=1}acquire(){return this._counter++,this}release(){return--this._counter===0&&this._disposable.dispose(),this}}e.RefCountedDisposable=l;class o{constructor(g){this.object=g}dispose(){}}e.ImmortalReference=o;class c{constructor(){this._store=new Map,this._isDisposed=!1,m(this)}dispose(){_(this),this._isDisposed=!0,this.clearAndDisposeAll()}clearAndDisposeAll(){if(this._store.size)try{n(this._store.values())}finally{this._store.clear()}}get(g){return this._store.get(g)}set(g,h,p=!1){var b;this._isDisposed&&console.warn(new Error("Trying to add a disposable to a DisposableMap that has already been disposed of. The added object will be leaked!").stack),p||(b=this._store.get(g))===null||b===void 0||b.dispose(),this._store.set(g,h)}deleteAndDispose(g){var h;(h=this._store.get(g))===null||h===void 0||h.dispose(),this._store.delete(g)}[Symbol.iterator](){return this._store[Symbol.iterator]()}}e.DisposableMap=c}),define(te[63],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedList=void 0;class L{constructor(D){this.element=D,this.next=L.Undefined,this.prev=L.Undefined}}L.Undefined=new L(void 0);class I{constructor(){this._first=L.Undefined,this._last=L.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===L.Undefined}clear(){let D=this._first;for(;D!==L.Undefined;){const S=D.next;D.prev=L.Undefined,D.next=L.Undefined,D=S}this._first=L.Undefined,this._last=L.Undefined,this._size=0}unshift(D){return this._insert(D,!1)}push(D){return this._insert(D,!0)}_insert(D,S){const m=new L(D);if(this._first===L.Undefined)this._first=m,this._last=m;else if(S){const v=this._last;this._last=m,m.prev=v,v.next=m}else{const v=this._first;this._first=m,m.next=v,v.prev=m}this._size+=1;let _=!1;return()=>{_||(_=!0,this._remove(m))}}shift(){if(this._first!==L.Undefined){const D=this._first.element;return this._remove(this._first),D}}pop(){if(this._last!==L.Undefined){const D=this._last.element;return this._remove(this._last),D}}_remove(D){if(D.prev!==L.Undefined&&D.next!==L.Undefined){const S=D.prev;S.next=D.next,D.next.prev=S}else D.prev===L.Undefined&&D.next===L.Undefined?(this._first=L.Undefined,this._last=L.Undefined):D.next===L.Undefined?(this._last=this._last.prev,this._last.next=L.Undefined):D.prev===L.Undefined&&(this._first=this._first.next,this._first.prev=L.Undefined);this._size-=1}*[Symbol.iterator](){let D=this._first;for(;D!==L.Undefined;)yield D.element,D=D.next}}e.LinkedList=I});var Ie=this&&this.__decorate||function($,e,L,I){var y=arguments.length,D=y<3?e:I===null?I=Object.getOwnPropertyDescriptor(e,L):I,S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate($,e,L,I);else for(var m=$.length-1;m>=0;m--)(S=$[m])&&(D=(y<3?S(D):y>3?S(e,L,D):S(e,L))||D);return y>3&&D&&Object.defineProperty(e,L,D),D};define(te[389],ie([1,0,105]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseLinkedText=e.LinkedText=void 0;class I{constructor(m){this.nodes=m}toString(){return this.nodes.map(m=>typeof m=="string"?m:m.label).join("")}}e.LinkedText=I,Ie([L.memoize],I.prototype,"toString",null);const y=/\[([^\]]+)\]\(((?:https?:\/\/|command:|file:)[^\)\s]+)(?: (["'])(.+?)(\3))?\)/gi;function D(S){const m=[];let _=0,v;for(;v=y.exec(S);){v.index-_>0&&m.push(S.substring(_,v.index));const[,C,s,,i]=v;i?m.push({label:C,href:s,title:i}):m.push({label:C,href:s}),_=v.index+v[0].length}return _s.toString();class m{constructor(){this[I]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var i;return(i=this._head)===null||i===void 0?void 0:i.value}get last(){var i;return(i=this._tail)===null||i===void 0?void 0:i.value}has(i){return this._map.has(i)}get(i,n=0){const t=this._map.get(i);if(t)return n!==0&&this.touch(t,n),t.value}set(i,n,t=0){let r=this._map.get(i);if(r)r.value=n,t!==0&&this.touch(r,t);else{switch(r={key:i,value:n,next:void 0,previous:void 0},t){case 0:this.addItemLast(r);break;case 1:this.addItemFirst(r);break;case 2:this.addItemLast(r);break;default:this.addItemLast(r);break}this._map.set(i,r),this._size++}return this}delete(i){return!!this.remove(i)}remove(i){const n=this._map.get(i);if(n)return this._map.delete(i),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const i=this._head;return this._map.delete(i.key),this.removeItem(i),this._size--,i.value}forEach(i,n){const t=this._state;let r=this._head;for(;r;){if(n?i.bind(n)(r.value,r.key,this):i(r.value,r.key,this),this._state!==t)throw new Error("LinkedMap got modified during iteration.");r=r.next}}keys(){const i=this,n=this._state;let t=this._head;const r={[Symbol.iterator](){return r},next(){if(i._state!==n)throw new Error("LinkedMap got modified during iteration.");if(t){const u={value:t.key,done:!1};return t=t.next,u}else return{value:void 0,done:!0}}};return r}values(){const i=this,n=this._state;let t=this._head;const r={[Symbol.iterator](){return r},next(){if(i._state!==n)throw new Error("LinkedMap got modified during iteration.");if(t){const u={value:t.value,done:!1};return t=t.next,u}else return{value:void 0,done:!0}}};return r}entries(){const i=this,n=this._state;let t=this._head;const r={[Symbol.iterator](){return r},next(){if(i._state!==n)throw new Error("LinkedMap got modified during iteration.");if(t){const u={value:[t.key,t.value],done:!1};return t=t.next,u}else return{value:void 0,done:!0}}};return r}[(I=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(i){if(i>=this.size)return;if(i===0){this.clear();return}let n=this._head,t=this.size;for(;n&&t>i;)this._map.delete(n.key),n=n.next,t--;this._head=n,this._size=t,n&&(n.previous=void 0),this._state++}addItemFirst(i){if(!this._head&&!this._tail)this._tail=i;else if(this._head)i.next=this._head,this._head.previous=i;else throw new Error("Invalid list");this._head=i,this._state++}addItemLast(i){if(!this._head&&!this._tail)this._head=i;else if(this._tail)i.previous=this._tail,this._tail.next=i;else throw new Error("Invalid list");this._tail=i,this._state++}removeItem(i){if(i===this._head&&i===this._tail)this._head=void 0,this._tail=void 0;else if(i===this._head){if(!i.next)throw new Error("Invalid list");i.next.previous=void 0,this._head=i.next}else if(i===this._tail){if(!i.previous)throw new Error("Invalid list");i.previous.next=void 0,this._tail=i.previous}else{const n=i.next,t=i.previous;if(!n||!t)throw new Error("Invalid list");n.previous=t,t.next=n}i.next=void 0,i.previous=void 0,this._state++}touch(i,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(i===this._head)return;const t=i.next,r=i.previous;i===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),i.previous=void 0,i.next=this._head,this._head.previous=i,this._head=i,this._state++}else if(n===2){if(i===this._tail)return;const t=i.next,r=i.previous;i===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),i.next=void 0,i.previous=this._tail,this._tail.next=i,this._tail=i,this._state++}}}toJSON(){const i=[];return this.forEach((n,t)=>{i.push([t,n])}),i}fromJSON(i){this.clear();for(const[n,t]of i)this.set(n,t)}}e.LinkedMap=m;class _ extends m{constructor(i,n=1){super(),this._limit=i,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(i){this._limit=i,this.checkTrim()}get(i,n=2){return super.get(i,n)}peek(i){return super.get(i,0)}set(i,n){return super.set(i,n,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}e.LRUCache=_;class v{constructor(i){if(this._m1=new Map,this._m2=new Map,i)for(const[n,t]of i)this.set(n,t)}clear(){this._m1.clear(),this._m2.clear()}set(i,n){this._m1.set(i,n),this._m2.set(n,i)}get(i){return this._m1.get(i)}getKey(i){return this._m2.get(i)}delete(i){const n=this._m1.get(i);return n===void 0?!1:(this._m1.delete(i),this._m2.delete(n),!0)}keys(){return this._m1.keys()}values(){return this._m1.values()}}e.BidirectionalMap=v;class C{constructor(){this.map=new Map}add(i,n){let t=this.map.get(i);t||(t=new Set,this.map.set(i,t)),t.add(n)}delete(i,n){const t=this.map.get(i);t&&(t.delete(n),t.size===0&&this.map.delete(i))}forEach(i,n){const t=this.map.get(i);t&&t.forEach(n)}get(i){const n=this.map.get(i);return n||new Set}}e.SetMap=C}),function($,e){typeof define=="function"&&define.amd?define(te[390],ie([0]),e):typeof exports=="object"&&typeof module<"u"?e(exports):($=typeof globalThis<"u"?globalThis:$||self,e($.marked={}))}(this,function($){"use strict";function e(ce,ae){for(var X=0;Xce.length)&&(ae=ce.length);for(var X=0,K=new Array(ae);X=ce.length?{done:!0}:{done:!1,value:ce[K++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S(){return{async:!1,baseUrl:null,breaks:!1,extensions:null,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}}$.defaults=S();function m(ce){$.defaults=ce}var _=/[&<>"']/,v=/[&<>"']/g,C=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,i={"&":"&","<":"<",">":">",'"':""","'":"'"},n=function(ae){return i[ae]};function t(ce,ae){if(ae){if(_.test(ce))return ce.replace(v,n)}else if(C.test(ce))return ce.replace(s,n);return ce}var r=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function u(ce){return ce.replace(r,function(ae,X){return X=X.toLowerCase(),X==="colon"?":":X.charAt(0)==="#"?X.charAt(1)==="x"?String.fromCharCode(parseInt(X.substring(2),16)):String.fromCharCode(+X.substring(1)):""})}var f=/(^|[^\[])\^/g;function d(ce,ae){ce=typeof ce=="string"?ce:ce.source,ae=ae||"";var X={replace:function(z,Q){return Q=Q.source||Q,Q=Q.replace(f,"$1"),ce=ce.replace(z,Q),X},getRegex:function(){return new RegExp(ce,ae)}};return X}var l=/[^\w:]/g,o=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function c(ce,ae,X){if(ce){var K;try{K=decodeURIComponent(u(X)).replace(l,"").toLowerCase()}catch{return null}if(K.indexOf("javascript:")===0||K.indexOf("vbscript:")===0||K.indexOf("data:")===0)return null}ae&&!o.test(X)&&(X=b(ae,X));try{X=encodeURI(X).replace(/%25/g,"%")}catch{return null}return X}var a={},g=/^[^:]+:\/*[^/]*$/,h=/^([^:]+:)[\s\S]*$/,p=/^([^:]+:\/*[^/]*)[\s\S]*$/;function b(ce,ae){a[" "+ce]||(g.test(ce)?a[" "+ce]=ce+"/":a[" "+ce]=M(ce,"/",!0)),ce=a[" "+ce];var X=ce.indexOf(":")===-1;return ae.substring(0,2)==="//"?X?ae:ce.replace(h,"$1")+ae:ae.charAt(0)==="/"?X?ae:ce.replace(p,"$1")+ae:ce+ae}var w={exec:function(){}};function E(ce){for(var ae=1,X,K;ae=0&&re[he]==="\\";)oe=!oe;return oe?"|":" |"}),K=X.split(/ \|/),z=0;if(K[0].trim()||K.shift(),K.length>0&&!K[K.length-1].trim()&&K.pop(),K.length>ae)K.splice(ae);else for(;K.length1;)ae&1&&(X+=ce),ae>>=1,ce+=ce;return X+ce}function N(ce,ae,X,K){var z=ae.href,Q=ae.title?t(ae.title):null,j=ce[1].replace(/\\([\[\]])/g,"$1");if(ce[0].charAt(0)!=="!"){K.state.inLink=!0;var re={type:"link",raw:X,href:z,title:Q,text:j,tokens:K.inlineTokens(j)};return K.state.inLink=!1,re}return{type:"image",raw:X,href:z,title:Q,text:t(j)}}function A(ce,ae){var X=ce.match(/^(\s+)(?:```)/);if(X===null)return ae;var K=X[1];return ae.split(` -`).map(function(z){var Q=z.match(/^\s+/);if(Q===null)return z;var j=Q[0];return j.length>=K.length?z.slice(K.length):z}).join(` -`)}var P=function(){function ce(X){this.options=X||$.defaults}var ae=ce.prototype;return ae.space=function(K){var z=this.rules.block.newline.exec(K);if(z&&z[0].length>0)return{type:"space",raw:z[0]}},ae.code=function(K){var z=this.rules.block.code.exec(K);if(z){var Q=z[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:z[0],codeBlockStyle:"indented",text:this.options.pedantic?Q:M(Q,` -`)}}},ae.fences=function(K){var z=this.rules.block.fences.exec(K);if(z){var Q=z[0],j=A(Q,z[3]||"");return{type:"code",raw:Q,lang:z[2]?z[2].trim():z[2],text:j}}},ae.heading=function(K){var z=this.rules.block.heading.exec(K);if(z){var Q=z[2].trim();if(/#$/.test(Q)){var j=M(Q,"#");(this.options.pedantic||!j||/ $/.test(j))&&(Q=j.trim())}return{type:"heading",raw:z[0],depth:z[1].length,text:Q,tokens:this.lexer.inline(Q)}}},ae.hr=function(K){var z=this.rules.block.hr.exec(K);if(z)return{type:"hr",raw:z[0]}},ae.blockquote=function(K){var z=this.rules.block.blockquote.exec(K);if(z){var Q=z[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:z[0],tokens:this.lexer.blockTokens(Q,[]),text:Q}}},ae.list=function(K){var z=this.rules.block.list.exec(K);if(z){var Q,j,re,oe,he,me,pe,ve,we,Le,Ee,Ae,Re=z[1].trim(),Be=Re.length>1,ye={type:"list",raw:"",ordered:Be,start:Be?+Re.slice(0,-1):"",loose:!1,items:[]};Re=Be?"\\d{1,9}\\"+Re.slice(-1):"\\"+Re,this.options.pedantic&&(Re=Be?Re:"[*+-]");for(var De=new RegExp("^( {0,3}"+Re+")((?:[ ][^\\n]*)?(?:\\n|$))");K&&(Ae=!1,!(!(z=De.exec(K))||this.rules.block.hr.test(K)));){if(Q=z[0],K=K.substring(Q.length),ve=z[2].split(` -`,1)[0],we=K.split(` -`,1)[0],this.options.pedantic?(oe=2,Ee=ve.trimLeft()):(oe=z[2].search(/[^ ]/),oe=oe>4?1:oe,Ee=ve.slice(oe),oe+=z[1].length),me=!1,!ve&&/^ *$/.test(we)&&(Q+=we+` -`,K=K.substring(we.length+1),Ae=!0),!Ae)for(var fe=new RegExp("^ {0,"+Math.min(3,oe-1)+"}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))"),Ce=new RegExp("^ {0,"+Math.min(3,oe-1)+"}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)"),Me=new RegExp("^ {0,"+Math.min(3,oe-1)+"}(?:```|~~~)"),Pe=new RegExp("^ {0,"+Math.min(3,oe-1)+"}#");K&&(Le=K.split(` -`,1)[0],ve=Le,this.options.pedantic&&(ve=ve.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!(Me.test(ve)||Pe.test(ve)||fe.test(ve)||Ce.test(K)));){if(ve.search(/[^ ]/)>=oe||!ve.trim())Ee+=` -`+ve.slice(oe);else if(!me)Ee+=` -`+ve;else break;!me&&!ve.trim()&&(me=!0),Q+=Le+` -`,K=K.substring(Le.length+1)}ye.loose||(pe?ye.loose=!0:/\n *\n *$/.test(Q)&&(pe=!0)),this.options.gfm&&(j=/^\[[ xX]\] /.exec(Ee),j&&(re=j[0]!=="[ ] ",Ee=Ee.replace(/^\[[ xX]\] +/,""))),ye.items.push({type:"list_item",raw:Q,task:!!j,checked:re,loose:!1,text:Ee}),ye.raw+=Q}ye.items[ye.items.length-1].raw=Q.trimRight(),ye.items[ye.items.length-1].text=Ee.trimRight(),ye.raw=ye.raw.trimRight();var Se=ye.items.length;for(he=0;he1)return!0}return!1});!ye.loose&&_e.length&&ke&&(ye.loose=!0,ye.items[he].loose=!0)}return ye}},ae.html=function(K){var z=this.rules.block.html.exec(K);if(z){var Q={type:"html",raw:z[0],pre:!this.options.sanitizer&&(z[1]==="pre"||z[1]==="script"||z[1]==="style"),text:z[0]};if(this.options.sanitize){var j=this.options.sanitizer?this.options.sanitizer(z[0]):t(z[0]);Q.type="paragraph",Q.text=j,Q.tokens=this.lexer.inline(j)}return Q}},ae.def=function(K){var z=this.rules.block.def.exec(K);if(z){z[3]&&(z[3]=z[3].substring(1,z[3].length-1));var Q=z[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:Q,raw:z[0],href:z[2],title:z[3]}}},ae.table=function(K){var z=this.rules.block.table.exec(K);if(z){var Q={type:"table",header:k(z[1]).map(function(pe){return{text:pe}}),align:z[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:z[3]&&z[3].trim()?z[3].replace(/\n[ \t]*$/,"").split(` -`):[]};if(Q.header.length===Q.align.length){Q.raw=z[0];var j=Q.align.length,re,oe,he,me;for(re=0;re/i.test(z[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(z[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(z[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:z[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(z[0]):t(z[0]):z[0]}},ae.link=function(K){var z=this.rules.inline.link.exec(K);if(z){var Q=z[2].trim();if(!this.options.pedantic&&/^$/.test(Q))return;var j=M(Q.slice(0,-1),"\\");if((Q.length-j.length)%2===0)return}else{var re=R(z[2],"()");if(re>-1){var oe=z[0].indexOf("!")===0?5:4,he=oe+z[1].length+re;z[2]=z[2].substring(0,re),z[0]=z[0].substring(0,he).trim(),z[3]=""}}var me=z[2],pe="";if(this.options.pedantic){var ve=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(me);ve&&(me=ve[1],pe=ve[3])}else pe=z[3]?z[3].slice(1,-1):"";return me=me.trim(),/^$/.test(Q)?me=me.slice(1):me=me.slice(1,-1)),N(z,{href:me&&me.replace(this.rules.inline._escapes,"$1"),title:pe&&pe.replace(this.rules.inline._escapes,"$1")},z[0],this.lexer)}},ae.reflink=function(K,z){var Q;if((Q=this.rules.inline.reflink.exec(K))||(Q=this.rules.inline.nolink.exec(K))){var j=(Q[2]||Q[1]).replace(/\s+/g," ");if(j=z[j.toLowerCase()],!j||!j.href){var re=Q[0].charAt(0);return{type:"text",raw:re,text:re}}return N(Q,j,Q[0],this.lexer)}},ae.emStrong=function(K,z,Q){Q===void 0&&(Q="");var j=this.rules.inline.emStrong.lDelim.exec(K);if(j&&!(j[3]&&Q.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var re=j[1]||j[2]||"";if(!re||re&&(Q===""||this.rules.inline.punctuation.exec(Q))){var oe=j[0].length-1,he,me,pe=oe,ve=0,we=j[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(we.lastIndex=0,z=z.slice(-1*K.length+oe);(j=we.exec(z))!=null;)if(he=j[1]||j[2]||j[3]||j[4]||j[5]||j[6],!!he){if(me=he.length,j[3]||j[4]){pe+=me;continue}else if((j[5]||j[6])&&oe%3&&!((oe+me)%3)){ve+=me;continue}if(pe-=me,!(pe>0)){if(me=Math.min(me,me+pe+ve),Math.min(oe,me)%2){var Le=K.slice(1,oe+j.index+me);return{type:"em",raw:K.slice(0,oe+j.index+me+1),text:Le,tokens:this.lexer.inlineTokens(Le)}}var Ee=K.slice(2,oe+j.index+me-1);return{type:"strong",raw:K.slice(0,oe+j.index+me+1),text:Ee,tokens:this.lexer.inlineTokens(Ee)}}}}}},ae.codespan=function(K){var z=this.rules.inline.code.exec(K);if(z){var Q=z[2].replace(/\n/g," "),j=/[^ ]/.test(Q),re=/^ /.test(Q)&&/ $/.test(Q);return j&&re&&(Q=Q.substring(1,Q.length-1)),Q=t(Q,!0),{type:"codespan",raw:z[0],text:Q}}},ae.br=function(K){var z=this.rules.inline.br.exec(K);if(z)return{type:"br",raw:z[0]}},ae.del=function(K){var z=this.rules.inline.del.exec(K);if(z)return{type:"del",raw:z[0],text:z[2],tokens:this.lexer.inlineTokens(z[2])}},ae.autolink=function(K,z){var Q=this.rules.inline.autolink.exec(K);if(Q){var j,re;return Q[2]==="@"?(j=t(this.options.mangle?z(Q[1]):Q[1]),re="mailto:"+j):(j=t(Q[1]),re=j),{type:"link",raw:Q[0],text:j,href:re,tokens:[{type:"text",raw:j,text:j}]}}},ae.url=function(K,z){var Q;if(Q=this.rules.inline.url.exec(K)){var j,re;if(Q[2]==="@")j=t(this.options.mangle?z(Q[0]):Q[0]),re="mailto:"+j;else{var oe;do oe=Q[0],Q[0]=this.rules.inline._backpedal.exec(Q[0])[0];while(oe!==Q[0]);j=t(Q[0]),Q[1]==="www."?re="http://"+j:re=j}return{type:"link",raw:Q[0],text:j,href:re,tokens:[{type:"text",raw:j,text:j}]}}},ae.inlineText=function(K,z){var Q=this.rules.inline.text.exec(K);if(Q){var j;return this.lexer.state.inRawBlock?j=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Q[0]):t(Q[0]):Q[0]:j=t(this.options.smartypants?z(Q[0]):Q[0]),{type:"text",raw:Q[0],text:j}}},ce}(),O={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:w,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};O._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,O._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,O.def=d(O.def).replace("label",O._label).replace("title",O._title).getRegex(),O.bullet=/(?:[*+-]|\d{1,9}[.)])/,O.listItemStart=d(/^( *)(bull) */).replace("bull",O.bullet).getRegex(),O.list=d(O.list).replace(/bull/g,O.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+O.def.source+")").getRegex(),O._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",O._comment=/|$)/,O.html=d(O.html,"i").replace("comment",O._comment).replace("tag",O._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),O.paragraph=d(O._paragraph).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",O._tag).getRegex(),O.blockquote=d(O.blockquote).replace("paragraph",O.paragraph).getRegex(),O.normal=E({},O),O.gfm=E({},O.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),O.gfm.table=d(O.gfm.table).replace("hr",O.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|textarea|!--)").replace("tag",O._tag).getRegex(),O.gfm.paragraph=d(O._paragraph).replace("hr",O.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",O.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",O._tag).getRegex(),O.pedantic=E({},O.normal,{html:d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",O._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+|$)/,fences:w,paragraph:d(O.normal._paragraph).replace("hr",O.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",O.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var x={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:w,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:w,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~",x.punctuation=d(x.punctuation).replace(/punctuation/g,x._punctuation).getRegex(),x.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,x.escapedEmSt=/\\\*|\\_/g,x._comment=d(O._comment).replace("(?:-->|$)","-->").getRegex(),x.emStrong.lDelim=d(x.emStrong.lDelim).replace(/punct/g,x._punctuation).getRegex(),x.emStrong.rDelimAst=d(x.emStrong.rDelimAst,"g").replace(/punct/g,x._punctuation).getRegex(),x.emStrong.rDelimUnd=d(x.emStrong.rDelimUnd,"g").replace(/punct/g,x._punctuation).getRegex(),x._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,x._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,x._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])?)+(?![-_])/,x.autolink=d(x.autolink).replace("scheme",x._scheme).replace("email",x._email).getRegex(),x._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,x.tag=d(x.tag).replace("comment",x._comment).replace("attribute",x._attribute).getRegex(),x._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,x._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,x._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,x.link=d(x.link).replace("label",x._label).replace("href",x._href).replace("title",x._title).getRegex(),x.reflink=d(x.reflink).replace("label",x._label).replace("ref",O._label).getRegex(),x.nolink=d(x.nolink).replace("ref",O._label).getRegex(),x.reflinkSearch=d(x.reflinkSearch,"g").replace("reflink",x.reflink).replace("nolink",x.nolink).getRegex(),x.normal=E({},x),x.pedantic=E({},x.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:d(/^!?\[(label)\]\((.*?)\)/).replace("label",x._label).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",x._label).getRegex()}),x.gfm=E({},x.normal,{escape:d(x.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~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\.5&&(K="x"+K.toString(16)),ae+="&#"+K+";";return ae}var F=function(){function ce(X){this.tokens=[],this.tokens.links=Object.create(null),this.options=X||$.defaults,this.options.tokenizer=this.options.tokenizer||new P,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var K={block:O.normal,inline:x.normal};this.options.pedantic?(K.block=O.pedantic,K.inline=x.pedantic):this.options.gfm&&(K.block=O.gfm,this.options.breaks?K.inline=x.breaks:K.inline=x.gfm),this.tokenizer.rules=K}ce.lex=function(K,z){var Q=new ce(z);return Q.lex(K)},ce.lexInline=function(K,z){var Q=new ce(z);return Q.inlineTokens(K)};var ae=ce.prototype;return ae.lex=function(K){K=K.replace(/\r\n|\r/g,` -`),this.blockTokens(K,this.tokens);for(var z;z=this.inlineQueue.shift();)this.inlineTokens(z.src,z.tokens);return this.tokens},ae.blockTokens=function(K,z){var Q=this;z===void 0&&(z=[]),this.options.pedantic?K=K.replace(/\t/g," ").replace(/^ +$/gm,""):K=K.replace(/^( *)(\t+)/gm,function(pe,ve,we){return ve+" ".repeat(we.length)});for(var j,re,oe,he;K;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(pe){return(j=pe.call({lexer:Q},K,z))?(K=K.substring(j.raw.length),z.push(j),!0):!1}))){if(j=this.tokenizer.space(K)){K=K.substring(j.raw.length),j.raw.length===1&&z.length>0?z[z.length-1].raw+=` -`:z.push(j);continue}if(j=this.tokenizer.code(K)){K=K.substring(j.raw.length),re=z[z.length-1],re&&(re.type==="paragraph"||re.type==="text")?(re.raw+=` -`+j.raw,re.text+=` -`+j.text,this.inlineQueue[this.inlineQueue.length-1].src=re.text):z.push(j);continue}if(j=this.tokenizer.fences(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.heading(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.hr(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.blockquote(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.list(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.html(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.def(K)){K=K.substring(j.raw.length),re=z[z.length-1],re&&(re.type==="paragraph"||re.type==="text")?(re.raw+=` -`+j.raw,re.text+=` -`+j.raw,this.inlineQueue[this.inlineQueue.length-1].src=re.text):this.tokens.links[j.tag]||(this.tokens.links[j.tag]={href:j.href,title:j.title});continue}if(j=this.tokenizer.table(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.lheading(K)){K=K.substring(j.raw.length),z.push(j);continue}if(oe=K,this.options.extensions&&this.options.extensions.startBlock&&function(){var pe=1/0,ve=K.slice(1),we=void 0;Q.options.extensions.startBlock.forEach(function(Le){we=Le.call({lexer:this},ve),typeof we=="number"&&we>=0&&(pe=Math.min(pe,we))}),pe<1/0&&pe>=0&&(oe=K.substring(0,pe+1))}(),this.state.top&&(j=this.tokenizer.paragraph(oe))){re=z[z.length-1],he&&re.type==="paragraph"?(re.raw+=` -`+j.raw,re.text+=` -`+j.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=re.text):z.push(j),he=oe.length!==K.length,K=K.substring(j.raw.length);continue}if(j=this.tokenizer.text(K)){K=K.substring(j.raw.length),re=z[z.length-1],re&&re.type==="text"?(re.raw+=` -`+j.raw,re.text+=` -`+j.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=re.text):z.push(j);continue}if(K){var me="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(me);break}else throw new Error(me)}}return this.state.top=!0,z},ae.inline=function(K,z){return z===void 0&&(z=[]),this.inlineQueue.push({src:K,tokens:z}),z},ae.inlineTokens=function(K,z){var Q=this;z===void 0&&(z=[]);var j,re,oe,he=K,me,pe,ve;if(this.tokens.links){var we=Object.keys(this.tokens.links);if(we.length>0)for(;(me=this.tokenizer.rules.inline.reflinkSearch.exec(he))!=null;)we.includes(me[0].slice(me[0].lastIndexOf("[")+1,-1))&&(he=he.slice(0,me.index)+"["+T("a",me[0].length-2)+"]"+he.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(me=this.tokenizer.rules.inline.blockSkip.exec(he))!=null;)he=he.slice(0,me.index)+"["+T("a",me[0].length-2)+"]"+he.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(me=this.tokenizer.rules.inline.escapedEmSt.exec(he))!=null;)he=he.slice(0,me.index)+"++"+he.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;K;)if(pe||(ve=""),pe=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Ee){return(j=Ee.call({lexer:Q},K,z))?(K=K.substring(j.raw.length),z.push(j),!0):!1}))){if(j=this.tokenizer.escape(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.tag(K)){K=K.substring(j.raw.length),re=z[z.length-1],re&&j.type==="text"&&re.type==="text"?(re.raw+=j.raw,re.text+=j.text):z.push(j);continue}if(j=this.tokenizer.link(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.reflink(K,this.tokens.links)){K=K.substring(j.raw.length),re=z[z.length-1],re&&j.type==="text"&&re.type==="text"?(re.raw+=j.raw,re.text+=j.text):z.push(j);continue}if(j=this.tokenizer.emStrong(K,he,ve)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.codespan(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.br(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.del(K)){K=K.substring(j.raw.length),z.push(j);continue}if(j=this.tokenizer.autolink(K,U)){K=K.substring(j.raw.length),z.push(j);continue}if(!this.state.inLink&&(j=this.tokenizer.url(K,U))){K=K.substring(j.raw.length),z.push(j);continue}if(oe=K,this.options.extensions&&this.options.extensions.startInline&&function(){var Ee=1/0,Ae=K.slice(1),Re=void 0;Q.options.extensions.startInline.forEach(function(Be){Re=Be.call({lexer:this},Ae),typeof Re=="number"&&Re>=0&&(Ee=Math.min(Ee,Re))}),Ee<1/0&&Ee>=0&&(oe=K.substring(0,Ee+1))}(),j=this.tokenizer.inlineText(oe,W)){K=K.substring(j.raw.length),j.raw.slice(-1)!=="_"&&(ve=j.raw.slice(-1)),pe=!0,re=z[z.length-1],re&&re.type==="text"?(re.raw+=j.raw,re.text+=j.text):z.push(j);continue}if(K){var Le="Infinite loop on byte: "+K.charCodeAt(0);if(this.options.silent){console.error(Le);break}else throw new Error(Le)}}return z},L(ce,null,[{key:"rules",get:function(){return{block:O,inline:x}}}]),ce}(),G=function(){function ce(X){this.options=X||$.defaults}var ae=ce.prototype;return ae.code=function(K,z,Q){var j=(z||"").match(/\S*/)[0];if(this.options.highlight){var re=this.options.highlight(K,j);re!=null&&re!==K&&(Q=!0,K=re)}return K=K.replace(/\n$/,"")+` -`,j?'
    '+(Q?K:t(K,!0))+`
    -`:"
    "+(Q?K:t(K,!0))+`
    -`},ae.blockquote=function(K){return`
    -`+K+`
    -`},ae.html=function(K){return K},ae.heading=function(K,z,Q,j){if(this.options.headerIds){var re=this.options.headerPrefix+j.slug(Q);return"'+K+" -`}return""+K+" -`},ae.hr=function(){return this.options.xhtml?`
    -`:`
    -`},ae.list=function(K,z,Q){var j=z?"ol":"ul",re=z&&Q!==1?' start="'+Q+'"':"";return"<"+j+re+`> -`+K+" -`},ae.listitem=function(K){return"
  • "+K+`
  • -`},ae.checkbox=function(K){return" "},ae.paragraph=function(K){return"

    "+K+`

    -`},ae.table=function(K,z){return z&&(z=""+z+""),` - -`+K+` -`+z+`
    -`},ae.tablerow=function(K){return` -`+K+` -`},ae.tablecell=function(K,z){var Q=z.header?"th":"td",j=z.align?"<"+Q+' align="'+z.align+'">':"<"+Q+">";return j+K+(" -`)},ae.strong=function(K){return""+K+""},ae.em=function(K){return""+K+""},ae.codespan=function(K){return""+K+""},ae.br=function(){return this.options.xhtml?"
    ":"
    "},ae.del=function(K){return""+K+""},ae.link=function(K,z,Q){if(K=c(this.options.sanitize,this.options.baseUrl,K),K===null)return Q;var j='
    ",j},ae.image=function(K,z,Q){if(K=c(this.options.sanitize,this.options.baseUrl,K),K===null)return Q;var j=''+Q+'":">",j},ae.text=function(K){return K},ce}(),Y=function(){function ce(){}var ae=ce.prototype;return ae.strong=function(K){return K},ae.em=function(K){return K},ae.codespan=function(K){return K},ae.del=function(K){return K},ae.html=function(K){return K},ae.text=function(K){return K},ae.link=function(K,z,Q){return""+Q},ae.image=function(K,z,Q){return""+Q},ae.br=function(){return""},ce}(),ne=function(){function ce(){this.seen={}}var ae=ce.prototype;return ae.serialize=function(K){return K.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ae.getNextSafeSlug=function(K,z){var Q=K,j=0;if(this.seen.hasOwnProperty(Q)){j=this.seen[K];do j++,Q=K+"-"+j;while(this.seen.hasOwnProperty(Q))}return z||(this.seen[K]=j,this.seen[Q]=0),Q},ae.slug=function(K,z){z===void 0&&(z={});var Q=this.serialize(K);return this.getNextSafeSlug(Q,z.dryrun)},ce}(),se=function(){function ce(X){this.options=X||$.defaults,this.options.renderer=this.options.renderer||new G,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Y,this.slugger=new ne}ce.parse=function(K,z){var Q=new ce(z);return Q.parse(K)},ce.parseInline=function(K,z){var Q=new ce(z);return Q.parseInline(K)};var ae=ce.prototype;return ae.parse=function(K,z){z===void 0&&(z=!0);var Q="",j,re,oe,he,me,pe,ve,we,Le,Ee,Ae,Re,Be,ye,De,fe,Ce,Me,Pe,Se=K.length;for(j=0;j0&&De.tokens[0].type==="paragraph"?(De.tokens[0].text=Me+" "+De.tokens[0].text,De.tokens[0].tokens&&De.tokens[0].tokens.length>0&&De.tokens[0].tokens[0].type==="text"&&(De.tokens[0].tokens[0].text=Me+" "+De.tokens[0].tokens[0].text)):De.tokens.unshift({type:"text",text:Me}):ye+=Me),ye+=this.parse(De.tokens,Be),Le+=this.renderer.listitem(ye,Ce,fe);Q+=this.renderer.list(Le,Ae,Re);continue}case"html":{Q+=this.renderer.html(Ee.text);continue}case"paragraph":{Q+=this.renderer.paragraph(this.parseInline(Ee.tokens));continue}case"text":{for(Le=Ee.tokens?this.parseInline(Ee.tokens):Ee.text;j+1"u"||ce===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ce!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ce)+", string expected");if(typeof ae=="function"&&(X=ae,ae=null),ae=E({},J.defaults,ae||{}),B(ae),X){var K=ae.highlight,z;try{z=F.lex(ce,ae)}catch(he){return X(he)}var Q=function(me){var pe;if(!me)try{ae.walkTokens&&J.walkTokens(z,ae.walkTokens),pe=se.parse(z,ae)}catch(ve){me=ve}return ae.highlight=K,me?X(me):X(null,pe)};if(!K||K.length<3||(delete ae.highlight,!z.length))return Q();var j=0;J.walkTokens(z,function(he){he.type==="code"&&(j++,setTimeout(function(){K(he.text,he.lang,function(me,pe){if(me)return Q(me);pe!=null&&pe!==he.text&&(he.text=pe,he.escaped=!0),j--,j===0&&Q()})},0))}),j===0&&Q();return}function re(he){if(he.message+=` -Please report this to https://github.com/markedjs/marked.`,ae.silent)return"

    An error occurred:

    "+t(he.message+"",!0)+"
    ";throw he}try{var oe=F.lex(ce,ae);if(ae.walkTokens){if(ae.async)return Promise.all(J.walkTokens(oe,ae.walkTokens)).then(function(){return se.parse(oe,ae)}).catch(re);J.walkTokens(oe,ae.walkTokens)}return se.parse(oe,ae)}catch(he){re(he)}}J.options=J.setOptions=function(ce){return E(J.defaults,ce),m(J.defaults),J},J.getDefaults=S,J.defaults=$.defaults,J.use=function(){for(var ce=arguments.length,ae=new Array(ce),X=0;X"u"||ce===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ce!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ce)+", string expected");ae=E({},J.defaults,ae||{}),B(ae);try{var X=F.lexInline(ce,ae);return ae.walkTokens&&J.walkTokens(X,ae.walkTokens),se.parseInline(X,ae)}catch(K){if(K.message+=` -Please report this to https://github.com/markedjs/marked.`,ae.silent)return"

    An error occurred:

    "+t(K.message+"",!0)+"
    ";throw K}},J.Parser=se,J.parser=se.parse,J.Renderer=G,J.TextRenderer=Y,J.Lexer=F,J.lexer=F.lex,J.Tokenizer=P,J.Slugger=ne,J.parse=J;var q=J.options,H=J.setOptions,V=J.use,Z=J.walkTokens,ee=J.parseInline,le=J,ue=se.parse,de=F.lex;$.Lexer=F,$.Parser=se,$.Renderer=G,$.Slugger=ne,$.TextRenderer=Y,$.Tokenizer=P,$.getDefaults=S,$.lexer=de,$.marked=J,$.options=q,$.parse=le,$.parseInline=ee,$.parser=ue,$.setOptions=H,$.use=V,$.walkTokens=Z,Object.defineProperty($,"__esModule",{value:!0})}),define(te[107],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Mimes=void 0,e.Mimes=Object.freeze({text:"text/plain",binary:"application/octet-stream",unknown:"application/unknown",markdown:"text/markdown",latex:"text/latex",uriList:"text/uri-list"})}),define(te[196],ie([1,0,107]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTransfers=void 0,e.DataTransfers={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:L.Mimes.text,INTERNAL_URI_LIST:"application/vnd.code.uri-list"}}),define(te[391],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ArrayNavigator=void 0;class L{constructor(y,D=0,S=y.length,m=D-1){this.items=y,this.start=D,this.end=S,this.index=m}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}e.ArrayNavigator=L}),define(te[392],ie([1,0,391]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryNavigator=void 0;class I{constructor(D=[],S=10){this._initialize(D),this._limit=S,this._onChange()}getHistory(){return this._elements}add(D){this._history.delete(D),this._history.add(D),this._onChange()}next(){return this._navigator.next()}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}isLast(){return this._currentPosition()>=this._elements.length-1}isNowhere(){return this._navigator.current()===null}has(D){return this._history.has(D)}_onChange(){this._reduceToLimit();const D=this._elements;this._navigator=new L.ArrayNavigator(D,0,D.length,D.length)}_reduceToLimit(){const D=this._elements;D.length>this._limit&&this._initialize(D.slice(D.length-this._limit))}_currentPosition(){const D=this._navigator.current();return D?this._elements.indexOf(D):-1}_initialize(D){this._history=new Set;for(const S of D)this._history.add(S)}get _elements(){const D=[];return this._history.forEach(S=>D.push(S)),D}}e.HistoryNavigator=I}),define(te[139],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SlidingWindowAverage=e.MovingAverage=e.clamp=void 0;function L(D,S,m){return Math.min(Math.max(D,S),m)}e.clamp=L;class I{constructor(){this._n=1,this._val=0}update(S){return this._val=this._val+(S-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}e.MovingAverage=I;class y{constructor(S){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(S),this._values.fill(0,0,S)}update(S){const m=this._values[this._index];return this._values[this._index]=S,this._index=(this._index+1)%this._values.length,this._sum-=m,this._sum+=S,this._nf.debugName).join(", ")+")",{color:"gray"})}handleDerivedCreated(u){const f=u.handleChange;this.changedObservablesSets.set(u,new Set),u.handleChange=(d,l)=>(this.changedObservablesSets.get(u).add(d),f.apply(u,[d,l]))}handleDerivedRecomputed(u,f){const d=this.changedObservablesSets.get(u);console.log(...this.textToConsoleArgs([_("derived recomputed"),v(u.debugName,{color:"BlueViolet"}),...this.formatInfo(f),this.formatChanges(d),{data:[{fn:u._computeFn}]}])),d.clear()}handleFromEventObservableTriggered(u,f){console.log(...this.textToConsoleArgs([_("observable from event triggered"),v(u.debugName,{color:"BlueViolet"}),...this.formatInfo(f),{data:[{fn:u._getValue}]}]))}handleAutorunCreated(u){const f=u.handleChange;this.changedObservablesSets.set(u,new Set),u.handleChange=(d,l)=>(this.changedObservablesSets.get(u).add(d),f.apply(u,[d,l]))}handleAutorunTriggered(u){const f=this.changedObservablesSets.get(u);console.log(...this.textToConsoleArgs([_("autorun"),v(u.debugName,{color:"BlueViolet"}),this.formatChanges(f),{data:[{fn:u._runFn}]}])),f.clear(),this.indentation++}handleAutorunFinished(u){this.indentation--}handleBeginTransaction(u){let f=u.getDebugName();f===void 0&&(f=""),console.log(...this.textToConsoleArgs([_("transaction"),v(f,{color:"BlueViolet"}),{data:[{fn:u._fn}]}])),this.indentation++}handleEndTransaction(){this.indentation--}}e.ConsoleObservableLogger=D;function S(r){const u=new Array,f=[];let d="";function l(c){if("length"in c)for(const a of c)a&&l(a);else"text"in c?(d+=`%c${c.text}`,u.push(c.style),c.data&&f.push(...c.data)):"data"in c&&f.push(...c.data)}l(r);const o=[d,...u];return o.push(...f),o}function m(r){return v(r,{color:"black"})}function _(r){return v(t(`${r}: `,10),{color:"black",bold:!0})}function v(r,u={color:"black"}){function f(l){return Object.entries(l).reduce((o,[c,a])=>`${o}${c}:${a};`,"")}const d={color:u.color};return u.strikeThrough&&(d["text-decoration"]="line-through"),u.bold&&(d["font-weight"]="bold"),{text:r,style:f(d)}}function C(r,u){switch(typeof r){case"number":return""+r;case"string":return r.length+2<=u?`"${r}"`:`"${r.substr(0,u-7)}"+...`;case"boolean":return r?"true":"false";case"undefined":return"undefined";case"object":return r===null?"null":Array.isArray(r)?s(r,u):i(r,u);case"symbol":return r.toString();case"function":return`[[Function${r.name?" "+r.name:""}]]`;default:return""+r}}function s(r,u){let f="[ ",d=!0;for(const l of r){if(d||(f+=", "),f.length-5>u){f+="...";break}d=!1,f+=`${C(l,u-f.length)}`}return f+=" ]",f}function i(r,u){let f="{ ",d=!0;for(const[l,o]of Object.entries(r)){if(d||(f+=", "),f.length-5>u){f+="...";break}d=!1,f+=`${l}: ${C(o,u-f.length)}`}return f+=" }",f}function n(r,u){let f="";for(let d=1;d<=u;d++)f+=r;return f}function t(r,u){for(;r.length{const c=s(o);if(c!==void 0)return c;const g=/^\s*\(?\s*([a-zA-Z_$][a-zA-Z_$0-9]*)\s*\)?\s*=>\s*\1\.([a-zA-Z_$][a-zA-Z_$0-9]*)\s*$/.exec(o.toString());if(g)return`${this.debugName}.${g[2]}`;if(!l)return`${this.debugName} (mapped)`}},c=>o(this.read(c),c))}}e.ConvenientObservable=D;class S extends D{constructor(){super(...arguments),this.observers=new Set}addObserver(f){const d=this.observers.size;this.observers.add(f),d===0&&this.onFirstObserverAdded()}removeObserver(f){this.observers.delete(f)&&this.observers.size===0&&this.onLastObserverRemoved()}onFirstObserverAdded(){}onLastObserverRemoved(){}}e.BaseObservable=S;function m(u,f){const d=new v(u,f);try{u(d)}finally{d.finish()}}e.transaction=m;function _(u,f,d){u?f(u):m(f,d)}e.subtransaction=_;class v{constructor(f,d){var l;this._fn=f,this._getDebugName=d,this.updatingObservers=[],(l=(0,L.getLogger)())===null||l===void 0||l.handleBeginTransaction(this)}getDebugName(){return this._getDebugName?this._getDebugName():s(this._fn)}updateObserver(f,d){this.updatingObservers.push({observer:f,observable:d}),f.beginUpdate(d)}finish(){var f;const d=this.updatingObservers;this.updatingObservers=null;for(const{observer:l,observable:o}of d)l.endUpdate(o);(f=(0,L.getLogger)())===null||f===void 0||f.handleEndTransaction()}}e.TransactionImpl=v;function C(u,f,d,l){let o;if(u!==void 0)if(typeof u=="function"){if(o=u(),o!==void 0)return o}else return u;if(f!==void 0&&(o=s(f),o!==void 0))return o;if(d!==void 0){for(const c in d)if(d[c]===l)return c}}e.getDebugName=C;function s(u){const f=u.toString(),l=/\/\*\*\s*@description\s*([^*]*)\*\//.exec(f),o=l?l[1]:void 0;return o?.trim()}e.getFunctionName=s;function i(u,f){return typeof u=="string"?new n(void 0,u,f):new n(u,void 0,f)}e.observableValue=i;class n extends S{get debugName(){var f;return(f=C(this._debugName,void 0,this._owner,this))!==null&&f!==void 0?f:"ObservableValue"}constructor(f,d,l){super(),this._owner=f,this._debugName=d,this._value=l}get(){return this._value}set(f,d,l){var o;if(this._value===f)return;let c;d||(d=c=new v(()=>{},()=>`Setting ${this.debugName}`));try{const a=this._value;this._setValue(f),(o=(0,L.getLogger)())===null||o===void 0||o.handleObservableChanged(this,{oldValue:a,newValue:f,change:l,didChange:!0,hadValue:!0});for(const g of this.observers)d.updateObserver(g,this),g.handleChange(this,l)}finally{c&&c.finish()}}toString(){return`${this.debugName}: ${this._value}`}_setValue(f){this._value=f}}e.ObservableValue=n;function t(u,f){return typeof u=="string"?new r(void 0,u,f):new r(u,void 0,f)}e.disposableObservableValue=t;class r extends n{_setValue(f){this._value!==f&&(this._value&&this._value.dispose(),this._value=f)}dispose(){var f;(f=this._value)===null||f===void 0||f.dispose()}}e.DisposableObservableValue=r}),define(te[261],ie([1,0,96,2,164,140]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutorunObserver=e.autorunWithStore=e.autorunHandleChanges=e.autorun=e.autorunOpts=void 0;function S(s,i){return new C(s.debugName,i,void 0,void 0)}e.autorunOpts=S;function m(s){return new C(void 0,s,void 0,void 0)}e.autorun=m;function _(s,i){return new C(s.debugName,i,s.createEmptyChangeSummary,s.handleChange)}e.autorunHandleChanges=_;function v(s){const i=new I.DisposableStore,n=S({debugName:()=>(0,y.getFunctionName)(s)||"(anonymous)"},t=>{i.clear(),s(t,i)});return(0,I.toDisposable)(()=>{n.dispose(),i.dispose()})}e.autorunWithStore=v;class C{get debugName(){if(typeof this._debugName=="string")return this._debugName;if(typeof this._debugName=="function"){const n=this._debugName();if(n!==void 0)return n}const i=(0,y.getFunctionName)(this._runFn);return i!==void 0?i:"(anonymous)"}constructor(i,n,t,r){var u,f;this._debugName=i,this._runFn=n,this.createChangeSummary=t,this._handleChange=r,this.state=2,this.updateCount=0,this.disposed=!1,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=(u=this.createChangeSummary)===null||u===void 0?void 0:u.call(this),(f=(0,D.getLogger)())===null||f===void 0||f.handleAutorunCreated(this),this._runIfNeeded(),(0,I.trackDisposable)(this)}dispose(){this.disposed=!0;for(const i of this.dependencies)i.removeObserver(this);this.dependencies.clear(),(0,I.markAsDisposed)(this)}_runIfNeeded(){var i,n,t;if(this.state===3)return;const r=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=r,this.state=3;try{if(!this.disposed){(i=(0,D.getLogger)())===null||i===void 0||i.handleAutorunTriggered(this);const u=this.changeSummary;this.changeSummary=(n=this.createChangeSummary)===null||n===void 0?void 0:n.call(this),this._runFn(this,u)}}finally{(t=(0,D.getLogger)())===null||t===void 0||t.handleAutorunFinished(this);for(const u of this.dependenciesToBeRemoved)u.removeObserver(this);this.dependenciesToBeRemoved.clear()}}toString(){return`Autorun<${this.debugName}>`}beginUpdate(){this.state===3&&(this.state=1),this.updateCount++}endUpdate(){if(this.updateCount===1)do{if(this.state===1){this.state=3;for(const i of this.dependencies)if(i.reportChanges(),this.state===2)break}this._runIfNeeded()}while(this.state!==3);this.updateCount--,(0,L.assertFn)(()=>this.updateCount>=0)}handlePossibleChange(i){this.state===3&&this.dependencies.has(i)&&!this.dependenciesToBeRemoved.has(i)&&(this.state=1)}handleChange(i,n){this.dependencies.has(i)&&!this.dependenciesToBeRemoved.has(i)&&(!this._handleChange||this._handleChange({changedObservable:i,change:n,didChange:r=>r===i},this.changeSummary))&&(this.state=2)}readObservable(i){if(this.disposed)return i.get();i.addObserver(this);const n=i.get();return this.dependencies.add(i),this.dependenciesToBeRemoved.delete(i),n}}e.AutorunObserver=C,function(s){s.Observer=C}(m||(e.autorun=m={}))}),define(te[393],ie([1,0,9,2,164,140]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Derived=e.derivedWithStore=e.derivedHandleChanges=e.derivedOpts=e.derived=void 0;const S=(i,n)=>i===n;function m(i,n){return n!==void 0?new s(i,void 0,n,void 0,void 0,void 0,S):new s(void 0,void 0,i,void 0,void 0,void 0,S)}e.derived=m;function _(i,n){var t;return new s(i.owner,i.debugName,n,void 0,void 0,void 0,(t=i.equalityComparer)!==null&&t!==void 0?t:S)}e.derivedOpts=_;function v(i,n){var t;return new s(i.owner,i.debugName,n,i.createEmptyChangeSummary,i.handleChange,void 0,(t=i.equalityComparer)!==null&&t!==void 0?t:S)}e.derivedHandleChanges=v;function C(i,n){let t,r;n===void 0?(t=i,r=void 0):(r=i,t=n);const u=new I.DisposableStore;return new s(r,()=>{var f;return(f=(0,y.getFunctionName)(t))!==null&&f!==void 0?f:"(anonymous)"},f=>(u.clear(),t(f,u)),void 0,void 0,()=>u.dispose(),S)}e.derivedWithStore=C,(0,y._setDerivedOpts)(m);class s extends y.BaseObservable{get debugName(){var n;return(n=(0,y.getDebugName)(this._debugName,this._computeFn,this._owner,this))!==null&&n!==void 0?n:"(anonymous)"}constructor(n,t,r,u,f,d=void 0,l){var o,c;super(),this._owner=n,this._debugName=t,this._computeFn=r,this.createChangeSummary=u,this._handleChange=f,this._handleLastObserverRemoved=d,this._equalityComparator=l,this.state=0,this.value=void 0,this.updateCount=0,this.dependencies=new Set,this.dependenciesToBeRemoved=new Set,this.changeSummary=void 0,this.changeSummary=(o=this.createChangeSummary)===null||o===void 0?void 0:o.call(this),(c=(0,D.getLogger)())===null||c===void 0||c.handleDerivedCreated(this)}onLastObserverRemoved(){var n;this.state=0,this.value=void 0;for(const t of this.dependencies)t.removeObserver(this);this.dependencies.clear(),(n=this._handleLastObserverRemoved)===null||n===void 0||n.call(this)}get(){var n;if(this.observers.size===0){const t=this._computeFn(this,(n=this.createChangeSummary)===null||n===void 0?void 0:n.call(this));return this.onLastObserverRemoved(),t}else{do{if(this.state===1){for(const t of this.dependencies)if(t.reportChanges(),this.state===2)break}this.state===1&&(this.state=3),this._recomputeIfNeeded()}while(this.state!==3);return this.value}}_recomputeIfNeeded(){var n,t;if(this.state===3)return;const r=this.dependenciesToBeRemoved;this.dependenciesToBeRemoved=this.dependencies,this.dependencies=r;const u=this.state!==0,f=this.value;this.state=3;const d=this.changeSummary;this.changeSummary=(n=this.createChangeSummary)===null||n===void 0?void 0:n.call(this);try{this.value=this._computeFn(this,d)}finally{for(const o of this.dependenciesToBeRemoved)o.removeObserver(this);this.dependenciesToBeRemoved.clear()}const l=u&&!this._equalityComparator(f,this.value);if((t=(0,D.getLogger)())===null||t===void 0||t.handleDerivedRecomputed(this,{oldValue:f,newValue:this.value,change:void 0,didChange:l,hadValue:u}),l)for(const o of this.observers)o.handleChange(this,void 0)}toString(){return`LazyDerived<${this.debugName}>`}beginUpdate(n){this.updateCount++;const t=this.updateCount===1;if(this.state===3&&(this.state=1,!t))for(const r of this.observers)r.handlePossibleChange(this);if(t)for(const r of this.observers)r.beginUpdate(this)}endUpdate(n){if(this.updateCount--,this.updateCount===0){const t=[...this.observers];for(const r of t)r.endUpdate(this)}if(this.updateCount<0)throw new L.BugIndicatingError}handlePossibleChange(n){if(this.state===3&&this.dependencies.has(n)&&!this.dependenciesToBeRemoved.has(n)){this.state=1;for(const t of this.observers)t.handlePossibleChange(this)}}handleChange(n,t){if(this.dependencies.has(n)&&!this.dependenciesToBeRemoved.has(n)){const r=this._handleChange?this._handleChange({changedObservable:n,change:t,didChange:f=>f===n},this.changeSummary):!0,u=this.state===3;if(r&&(this.state===1||u)&&(this.state=2,u))for(const f of this.observers)f.handlePossibleChange(this)}}readObservable(n){n.addObserver(this);const t=n.get();return this.dependencies.add(n),this.dependenciesToBeRemoved.delete(n),t}addObserver(n){const t=!this.observers.has(n)&&this.updateCount>0;super.addObserver(n),t&&n.beginUpdate(this)}removeObserver(n){const t=this.observers.has(n)&&this.updateCount>0;super.removeObserver(n),t&&n.endUpdate(this)}}e.Derived=s}),define(te[394],ie([1,0,2,261,164,140]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeInitiallyAndOnChange=e.observableSignal=e.observableSignalFromEvent=e.FromEventObservable=e.observableFromEvent=e.waitForState=e.constObservable=void 0;function S(f){return new m(f)}e.constObservable=S;class m extends y.ConvenientObservable{constructor(d){super(),this.value=d}get debugName(){return this.toString()}get(){return this.value}addObserver(d){}removeObserver(d){}toString(){return`Const: ${this.value}`}}function _(f,d){return new Promise(l=>{let o=!1,c=!1;const a=(0,I.autorun)(g=>{const h=f.read(g);d(h)&&(o?a.dispose():c=!0,l(h))});o=!0,c&&a.dispose()})}e.waitForState=_;function v(f,d){return new C(f,d)}e.observableFromEvent=v;class C extends y.BaseObservable{constructor(d,l){super(),this.event=d,this._getValue=l,this.hasValue=!1,this.handleEvent=o=>{var c;const a=this._getValue(o),g=!this.hasValue||this.value!==a;(c=(0,D.getLogger)())===null||c===void 0||c.handleFromEventObservableTriggered(this,{oldValue:this.value,newValue:a,change:void 0,didChange:g,hadValue:this.hasValue}),g&&(this.value=a,this.hasValue&&(0,y.transaction)(h=>{for(const p of this.observers)h.updateObserver(p,this),p.handleChange(this,void 0)},()=>{const h=this.getDebugName();return"Event fired"+(h?`: ${h}`:"")}),this.hasValue=!0)}}getDebugName(){return(0,y.getFunctionName)(this._getValue)}get debugName(){const d=this.getDebugName();return"From Event"+(d?`: ${d}`:"")}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0,this.hasValue=!1,this.value=void 0}get(){return this.subscription?(this.hasValue||this.handleEvent(void 0),this.value):this._getValue(void 0)}}e.FromEventObservable=C,function(f){f.Observer=C}(v||(e.observableFromEvent=v={}));function s(f,d){return new i(f,d)}e.observableSignalFromEvent=s;class i extends y.BaseObservable{constructor(d,l){super(),this.debugName=d,this.event=l,this.handleEvent=()=>{(0,y.transaction)(o=>{for(const c of this.observers)o.updateObserver(c,this),c.handleChange(this,void 0)},()=>this.debugName)}}onFirstObserverAdded(){this.subscription=this.event(this.handleEvent)}onLastObserverRemoved(){this.subscription.dispose(),this.subscription=void 0}get(){}}function n(f){return typeof f=="string"?new t(f):new t(void 0,f)}e.observableSignal=n;class t extends y.BaseObservable{get debugName(){var d;return(d=(0,y.getDebugName)(this._debugName,void 0,this._owner,this))!==null&&d!==void 0?d:"Observable Signal"}constructor(d,l){super(),this._debugName=d,this._owner=l}trigger(d,l){if(!d){(0,y.transaction)(o=>{this.trigger(o,l)},()=>`Trigger signal ${this.debugName}`);return}for(const o of this.observers)d.updateObserver(o,this),o.handleChange(this,l)}get(){}}function r(f){const d=new u(!0);return f.addObserver(d),f.reportChanges(),(0,L.toDisposable)(()=>{f.removeObserver(d)})}e.recomputeInitiallyAndOnChange=r;class u{constructor(d){this.forceRecompute=d,this.counter=0}beginUpdate(d){this.counter++}endUpdate(d){this.counter--,this.counter===0&&this.forceRecompute&&d.reportChanges()}handlePossibleChange(d){}handleChange(d,l){}}}),define(te[40],ie([1,0,164,393,261,394,140]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.waitForState=e.observableSignalFromEvent=e.observableSignal=e.observableFromEvent=e.recomputeInitiallyAndOnChange=e.constObservable=e.autorunOpts=e.autorunWithStore=e.autorunHandleChanges=e.autorun=e.derivedWithStore=e.derivedHandleChanges=e.derivedOpts=e.derived=e.subtransaction=e.transaction=e.disposableObservableValue=e.observableValue=void 0,Object.defineProperty(e,"observableValue",{enumerable:!0,get:function(){return L.observableValue}}),Object.defineProperty(e,"disposableObservableValue",{enumerable:!0,get:function(){return L.disposableObservableValue}}),Object.defineProperty(e,"transaction",{enumerable:!0,get:function(){return L.transaction}}),Object.defineProperty(e,"subtransaction",{enumerable:!0,get:function(){return L.subtransaction}}),Object.defineProperty(e,"derived",{enumerable:!0,get:function(){return I.derived}}),Object.defineProperty(e,"derivedOpts",{enumerable:!0,get:function(){return I.derivedOpts}}),Object.defineProperty(e,"derivedHandleChanges",{enumerable:!0,get:function(){return I.derivedHandleChanges}}),Object.defineProperty(e,"derivedWithStore",{enumerable:!0,get:function(){return I.derivedWithStore}}),Object.defineProperty(e,"autorun",{enumerable:!0,get:function(){return y.autorun}}),Object.defineProperty(e,"autorunHandleChanges",{enumerable:!0,get:function(){return y.autorunHandleChanges}}),Object.defineProperty(e,"autorunWithStore",{enumerable:!0,get:function(){return y.autorunWithStore}}),Object.defineProperty(e,"autorunOpts",{enumerable:!0,get:function(){return y.autorunOpts}}),Object.defineProperty(e,"constObservable",{enumerable:!0,get:function(){return D.constObservable}}),Object.defineProperty(e,"recomputeInitiallyAndOnChange",{enumerable:!0,get:function(){return D.recomputeInitiallyAndOnChange}}),Object.defineProperty(e,"observableFromEvent",{enumerable:!0,get:function(){return D.observableFromEvent}}),Object.defineProperty(e,"observableSignal",{enumerable:!0,get:function(){return D.observableSignal}}),Object.defineProperty(e,"observableSignalFromEvent",{enumerable:!0,get:function(){return D.observableSignalFromEvent}}),Object.defineProperty(e,"waitForState",{enumerable:!0,get:function(){return D.waitForState}}),!1&&(0,S.setLogger)(new S.ConsoleObservableLogger)}),define(te[165],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Range=void 0;var L;(function(I){function y(_,v){if(_.start>=v.end||v.start>=_.end)return{start:0,end:0};const C=Math.max(_.start,v.start),s=Math.min(_.end,v.end);return s-C<=0?{start:0,end:0}:{start:C,end:s}}I.intersect=y;function D(_){return _.end-_.start<=0}I.isEmpty=D;function S(_,v){return!D(y(_,v))}I.intersects=S;function m(_,v){const C=[],s={start:_.start,end:Math.min(v.start,_.end)},i={start:Math.max(v.end,_.start),end:_.end};return D(s)||C.push(s),D(i)||C.push(i),C}I.relativeComplement=m})(L||(e.Range=L={}))}),define(te[395],ie([1,0,165]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMap=e.consolidate=e.shift=e.groupIntersect=void 0;function I(_,v){const C=[];for(const s of v){if(_.start>=s.range.end)continue;if(_.endv.concat(C),[]))}class m{get paddingTop(){return this._paddingTop}set paddingTop(v){this._size=this._size+v-this._paddingTop,this._paddingTop=v}constructor(v){this.groups=[],this._size=0,this._paddingTop=0,this._paddingTop=v??0,this._size=this._paddingTop}splice(v,C,s=[]){const i=s.length-C,n=I({start:0,end:v},this.groups),t=I({start:v+C,end:Number.POSITIVE_INFINITY},this.groups).map(u=>({range:y(u.range,i),size:u.size})),r=s.map((u,f)=>({range:{start:v+f,end:v+f+1},size:u.size}));this.groups=S(n,r,t),this._size=this._paddingTop+this.groups.reduce((u,f)=>u+f.size*(f.range.end-f.range.start),0)}get count(){const v=this.groups.length;return v?this.groups[v-1].range.end:0}get size(){return this._size}indexAt(v){if(v<0)return-1;if(vy.Disposable.None;function w(ce){if(_){const{onDidAddListener:ae}=ce,X=n.create();let K=0;ce.onDidAddListener=()=>{++K===2&&(console.warn("snapshotted emitter LIKELY used public and SHOULD HAVE BEEN created with DisposableStore. snapshotted here"),X.print()),ae?.()}}}function E(ce,ae){return x(ce,()=>{},0,void 0,!0,void 0,ae)}b.defer=E;function k(ce){return(ae,X=null,K)=>{let z=!1,Q;return Q=ce(j=>{if(!z)return Q?Q.dispose():z=!0,ae.call(X,j)},null,K),z&&Q.dispose(),Q}}b.once=k;function M(ce,ae,X){return P((K,z=null,Q)=>ce(j=>K.call(z,ae(j)),null,Q),X)}b.map=M;function R(ce,ae,X){return P((K,z=null,Q)=>ce(j=>{ae(j),K.call(z,j)},null,Q),X)}b.forEach=R;function B(ce,ae,X){return P((K,z=null,Q)=>ce(j=>ae(j)&&K.call(z,j),null,Q),X)}b.filter=B;function T(ce){return ce}b.signal=T;function N(...ce){return(ae,X=null,K)=>{const z=(0,y.combinedDisposable)(...ce.map(Q=>Q(j=>ae.call(X,j))));return O(z,K)}}b.any=N;function A(ce,ae,X,K){let z=X;return M(ce,Q=>(z=ae(z,Q),z),K)}b.reduce=A;function P(ce,ae){let X;const K={onWillAddFirstListener(){X=ce(z.fire,z)},onDidRemoveLastListener(){X?.dispose()}};ae||w(K);const z=new f(K);return ae?.add(z),z.event}function O(ce,ae){return ae instanceof Array?ae.push(ce):ae&&ae.add(ce),ce}function x(ce,ae,X=100,K=!1,z=!1,Q,j){let re,oe,he,me=0,pe;const ve={leakWarningThreshold:Q,onWillAddFirstListener(){re=ce(Le=>{me++,oe=ae(oe,Le),K&&!he&&(we.fire(oe),oe=void 0),pe=()=>{const Ee=oe;oe=void 0,he=void 0,(!K||me>1)&&we.fire(Ee),me=0},typeof X=="number"?(clearTimeout(he),he=setTimeout(pe,X)):he===void 0&&(he=0,queueMicrotask(pe))})},onWillRemoveListener(){z&&me>0&&pe?.()},onDidRemoveLastListener(){pe=void 0,re.dispose()}};j||w(ve);const we=new f(ve);return j?.add(we),we.event}b.debounce=x;function W(ce,ae=0,X){return b.debounce(ce,(K,z)=>K?(K.push(z),K):[z],ae,void 0,!0,void 0,X)}b.accumulate=W;function U(ce,ae=(K,z)=>K===z,X){let K=!0,z;return B(ce,Q=>{const j=K||!ae(Q,z);return K=!1,z=Q,j},X)}b.latch=U;function F(ce,ae,X){return[b.filter(ce,ae,X),b.filter(ce,K=>!ae(K),X)]}b.split=F;function G(ce,ae=!1,X=[],K){let z=X.slice(),Q=ce(oe=>{z?z.push(oe):re.fire(oe)});K&&K.add(Q);const j=()=>{z?.forEach(oe=>re.fire(oe)),z=null},re=new f({onWillAddFirstListener(){Q||(Q=ce(oe=>re.fire(oe)),K&&K.add(Q))},onDidAddFirstListener(){z&&(ae?setTimeout(j):j())},onDidRemoveLastListener(){Q&&Q.dispose(),Q=null}});return K&&K.add(re),re.event}b.buffer=G;function Y(ce,ae){return(K,z,Q)=>{const j=ae(new se);return ce(function(re){const oe=j.evaluate(re);oe!==ne&&K.call(z,oe)},void 0,Q)}}b.chain=Y;const ne=Symbol("HaltChainable");class se{constructor(){this.steps=[]}map(ae){return this.steps.push(ae),this}forEach(ae){return this.steps.push(X=>(ae(X),X)),this}filter(ae){return this.steps.push(X=>ae(X)?X:ne),this}reduce(ae,X){let K=X;return this.steps.push(z=>(K=ae(K,z),K)),this}latch(ae=(X,K)=>X===K){let X=!0,K;return this.steps.push(z=>{const Q=X||!ae(z,K);return X=!1,K=z,Q?z:ne}),this}evaluate(ae){for(const X of this.steps)if(ae=X(ae),ae===ne)break;return ae}}function J(ce,ae,X=K=>K){const K=(...re)=>j.fire(X(...re)),z=()=>ce.on(ae,K),Q=()=>ce.removeListener(ae,K),j=new f({onWillAddFirstListener:z,onDidRemoveLastListener:Q});return j.event}b.fromNodeEventEmitter=J;function q(ce,ae,X=K=>K){const K=(...re)=>j.fire(X(...re)),z=()=>ce.addEventListener(ae,K),Q=()=>ce.removeEventListener(ae,K),j=new f({onWillAddFirstListener:z,onDidRemoveLastListener:Q});return j.event}b.fromDOMEventEmitter=q;function H(ce){return new Promise(ae=>k(ce)(ae))}b.toPromise=H;function V(ce){const ae=new f;return ce.then(X=>{ae.fire(X)},()=>{ae.fire(void 0)}).finally(()=>{ae.dispose()}),ae.event}b.fromPromise=V;function Z(ce,ae){return ae(void 0),ce(X=>ae(X))}b.runAndSubscribe=Z;function ee(ce,ae){let X=null;function K(Q){X?.dispose(),X=new y.DisposableStore,ae(Q,X)}K(void 0);const z=ce(Q=>K(Q));return(0,y.toDisposable)(()=>{z.dispose(),X?.dispose()})}b.runAndSubscribeWithStore=ee;class le{constructor(ae,X){this._observable=ae,this._counter=0,this._hasChanged=!1;const K={onWillAddFirstListener:()=>{ae.addObserver(this)},onDidRemoveLastListener:()=>{ae.removeObserver(this)}};X||w(K),this.emitter=new f(K),X&&X.add(this.emitter)}beginUpdate(ae){this._counter++}handlePossibleChange(ae){}handleChange(ae,X){this._hasChanged=!0}endUpdate(ae){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function ue(ce,ae){return new le(ce,ae).emitter.event}b.fromObservable=ue;function de(ce){return ae=>{let X=0,K=!1;const z={beginUpdate(){X++},endUpdate(){X--,X===0&&(ce.reportChanges(),K&&(K=!1,ae()))},handlePossibleChange(){},handleChange(){K=!0}};return ce.addObserver(z),ce.reportChanges(),{dispose(){ce.removeObserver(z)}}}}b.fromObservableLight=de})(v||(e.Event=v={}));class C{constructor(w){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${w}_${C._idPool++}`,C.all.add(this)}start(w){this._stopWatch=new S.StopWatch,this.listenerCount=w}stop(){if(this._stopWatch){const w=this._stopWatch.elapsed();this.durations.push(w),this.elapsedOverall+=w,this.invocationCount+=1,this._stopWatch=void 0}}}e.EventProfiling=C,C.all=new Set,C._idPool=0;let s=-1;class i{constructor(w,E=Math.random().toString(18).slice(2,5)){this.threshold=w,this.name=E,this._warnCountdown=0}dispose(){var w;(w=this._stacks)===null||w===void 0||w.clear()}check(w,E){const k=this.threshold;if(k<=0||E{const R=this._stacks.get(w.value)||0;this._stacks.set(w.value,R-1)}}}class n{static create(){var w;return new n((w=new Error().stack)!==null&&w!==void 0?w:"")}constructor(w){this.value=w}print(){console.warn(this.value.split(` -`).slice(2).join(` -`))}}class t{constructor(w){this.value=w}}const r=2,u=(b,w)=>{if(b instanceof t)w(b);else for(let E=0;E0||!((E=this._options)===null||E===void 0)&&E.leakWarningThreshold?new i((M=(k=this._options)===null||k===void 0?void 0:k.leakWarningThreshold)!==null&&M!==void 0?M:s):void 0,this._perfMon=!((R=this._options)===null||R===void 0)&&R._profName?new C(this._options._profName):void 0,this._deliveryQueue=(B=this._options)===null||B===void 0?void 0:B.deliveryQueue}dispose(){var w,E,k,M;if(!this._disposed){if(this._disposed=!0,((w=this._deliveryQueue)===null||w===void 0?void 0:w.current)===this&&this._deliveryQueue.reset(),this._listeners){if(m){const R=this._listeners;queueMicrotask(()=>{u(R,B=>{var T;return(T=B.stack)===null||T===void 0?void 0:T.print()})})}this._listeners=void 0,this._size=0}(k=(E=this._options)===null||E===void 0?void 0:E.onDidRemoveLastListener)===null||k===void 0||k.call(E),(M=this._leakageMon)===null||M===void 0||M.dispose()}}get event(){var w;return(w=this._event)!==null&&w!==void 0||(this._event=(E,k,M)=>{var R,B,T,N,A;if(this._leakageMon&&this._size>this._leakageMon.threshold*3)return console.warn(`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far`),y.Disposable.None;if(this._disposed)return y.Disposable.None;k&&(E=E.bind(k));const P=new t(E);let O,x;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(P.stack=n.create(),O=this._leakageMon.check(P.stack,this._size+1)),m&&(P.stack=x??n.create()),this._listeners?this._listeners instanceof t?((A=this._deliveryQueue)!==null&&A!==void 0||(this._deliveryQueue=new l),this._listeners=[this._listeners,P]):this._listeners.push(P):((B=(R=this._options)===null||R===void 0?void 0:R.onWillAddFirstListener)===null||B===void 0||B.call(R,this),this._listeners=P,(N=(T=this._options)===null||T===void 0?void 0:T.onDidAddFirstListener)===null||N===void 0||N.call(T,this)),this._size++;const W=(0,y.toDisposable)(()=>{O?.(),this._removeListener(P)});return M instanceof y.DisposableStore?M.add(W):Array.isArray(M)&&M.push(W),W}),this._event}_removeListener(w){var E,k,M,R;if((k=(E=this._options)===null||E===void 0?void 0:E.onWillRemoveListener)===null||k===void 0||k.call(E,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(R=(M=this._options)===null||M===void 0?void 0:M.onDidRemoveLastListener)===null||R===void 0||R.call(M,this),this._size=0;return}const B=this._listeners,T=B.indexOf(w);if(T===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,B[T]=void 0;const N=this._deliveryQueue.current===this;if(this._size*r<=B.length){let A=0;for(let P=0;P0}}e.Emitter=f;const d=()=>new l;e.createEventDeliveryQueue=d;class l{constructor(){this.i=-1,this.end=0}enqueue(w,E,k){this.i=0,this.end=k,this.current=w,this.value=E}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}class o extends f{constructor(w){super(w),this._isPaused=0,this._eventQueue=new D.LinkedList,this._mergeFn=w?.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){if(this._eventQueue.size>0){const w=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(w))}}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(w){this._size&&(this._isPaused!==0?this._eventQueue.push(w):super.fire(w))}}e.PauseableEmitter=o;class c extends o{constructor(w){var E;super(w),this._delay=(E=w.delay)!==null&&E!==void 0?E:100}fire(w){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(w)}}e.DebounceEmitter=c;class a extends f{constructor(w){super(w),this._queuedEvents=[],this._mergeFn=w?.merge}fire(w){this.hasListeners()&&(this._queuedEvents.push(w),this._queuedEvents.length===1&&queueMicrotask(()=>{this._mergeFn?super.fire(this._mergeFn(this._queuedEvents)):this._queuedEvents.forEach(E=>super.fire(E)),this._queuedEvents=[]}))}}e.MicrotaskEmitter=a;class g{constructor(){this.hasListeners=!1,this.events=[],this.emitter=new f({onWillAddFirstListener:()=>this.onFirstListenerAdd(),onDidRemoveLastListener:()=>this.onLastListenerRemove()})}get event(){return this.emitter.event}add(w){const E={event:w,listener:null};this.events.push(E),this.hasListeners&&this.hook(E);const k=()=>{this.hasListeners&&this.unhook(E);const M=this.events.indexOf(E);this.events.splice(M,1)};return(0,y.toDisposable)((0,I.createSingleCallFunction)(k))}onFirstListenerAdd(){this.hasListeners=!0,this.events.forEach(w=>this.hook(w))}onLastListenerRemove(){this.hasListeners=!1,this.events.forEach(w=>this.unhook(w))}hook(w){w.listener=w.event(E=>this.emitter.fire(E))}unhook(w){w.listener&&w.listener.dispose(),w.listener=null}dispose(){this.emitter.dispose()}}e.EventMultiplexer=g;class h{constructor(){this.buffers=[]}wrapEvent(w){return(E,k,M)=>w(R=>{const B=this.buffers[this.buffers.length-1];B?B.push(()=>E.call(k,R)):E.call(k,R)},void 0,M)}bufferEvents(w){const E=[];this.buffers.push(E);const k=w();return this.buffers.pop(),E.forEach(M=>M()),k}}e.EventBufferer=h;class p{constructor(){this.listening=!1,this.inputEvent=v.None,this.inputEventListener=y.Disposable.None,this.emitter=new f({onDidAddFirstListener:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onDidRemoveLastListener:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(w){this.inputEvent=w,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=w(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}e.Relay=p}),define(te[51],ie([1,0,6,2]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isStandalone=e.isAndroid=e.isElectron=e.isWebkitWebView=e.isSafari=e.isChrome=e.isWebKit=e.isFirefox=e.getZoomFactor=e.PixelRatio=e.addMatchMediaChangeListener=void 0;class y{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}y.INSTANCE=new y;class D extends I.Disposable{constructor(){super(),this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(t){var r;(r=this._mediaQueryList)===null||r===void 0||r.removeEventListener("change",this._listener),this._mediaQueryList=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),t&&this._onDidChange.fire()}}class S extends I.Disposable{get value(){return this._value}constructor(){super(),this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const t=this._register(new D);this._register(t.onDidChange(()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)}))}_getPixelRatio(){const t=document.createElement("canvas").getContext("2d"),r=window.devicePixelRatio||1,u=t.webkitBackingStorePixelRatio||t.mozBackingStorePixelRatio||t.msBackingStorePixelRatio||t.oBackingStorePixelRatio||t.backingStorePixelRatio||1;return r/u}}class m{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=(0,I.markAsSingleton)(new S)),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}}function _(n,t){typeof n=="string"&&(n=window.matchMedia(n)),n.addEventListener("change",t)}e.addMatchMediaChangeListener=_,e.PixelRatio=new m;function v(){return y.INSTANCE.getZoomFactor()}e.getZoomFactor=v;const C=navigator.userAgent;e.isFirefox=C.indexOf("Firefox")>=0,e.isWebKit=C.indexOf("AppleWebKit")>=0,e.isChrome=C.indexOf("Chrome")>=0,e.isSafari=!e.isChrome&&C.indexOf("Safari")>=0,e.isWebkitWebView=!e.isChrome&&!e.isSafari&&e.isWebKit,e.isElectron=C.indexOf("Electron/")>=0,e.isAndroid=C.indexOf("Android")>=0;let s=!1;if(window.matchMedia){const n=window.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=window.matchMedia("(display-mode: fullscreen)");s=n.matches,_(n,({matches:r})=>{s&&t.matches||(s=r)})}function i(){return s}e.isStandalone=i}),define(te[79],ie([1,0,6]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomEmitter=void 0;class I{get event(){return this.emitter.event}constructor(D,S,m){const _=v=>this.emitter.fire(v);this.emitter=new L.Emitter({onWillAddFirstListener:()=>D.addEventListener(S,_,m),onDidRemoveLastListener:()=>D.removeEventListener(S,_,m)})}dispose(){this.emitter.dispose()}}e.DomEmitter=I}),define(te[19],ie([1,0,6]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;const I=Object.freeze(function(m,_){const v=setTimeout(m.bind(_),0);return{dispose(){clearTimeout(v)}}});var y;(function(m){function _(v){return v===m.None||v===m.Cancelled||v instanceof D?!0:!v||typeof v!="object"?!1:typeof v.isCancellationRequested=="boolean"&&typeof v.onCancellationRequested=="function"}m.isCancellationToken=_,m.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:L.Event.None}),m.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:I})})(y||(e.CancellationToken=y={}));class D{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?I:(this._emitter||(this._emitter=new L.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class S{constructor(_){this._token=void 0,this._parentListener=void 0,this._parentListener=_&&_.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new D),this._token}cancel(){this._token?this._token instanceof D&&this._token.cancel():this._token=y.Cancelled}dispose(_=!1){var v;_&&this.cancel(),(v=this._parentListener)===null||v===void 0||v.dispose(),this._token?this._token instanceof D&&this._token.dispose():this._token=y.None}}e.CancellationTokenSource=S}),define(te[262],ie([1,0,6]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IME=e.IMEImpl=void 0;class I{constructor(){this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._enabled=!0}get enabled(){return this._enabled}enable(){this._enabled=!0,this._onDidChange.fire()}disable(){this._enabled=!1,this._onDidChange.fire()}}e.IMEImpl=I,e.IME=new I}),define(te[166],ie([1,0,6,2]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SmoothScrollingOperation=e.SmoothScrollingUpdate=e.Scrollable=e.ScrollState=void 0;class y{constructor(n,t,r,u,f,d,l){this._forceIntegerValues=n,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t=t|0,r=r|0,u=u|0,f=f|0,d=d|0,l=l|0),this.rawScrollLeft=u,this.rawScrollTop=l,t<0&&(t=0),u+t>r&&(u=r-t),u<0&&(u=0),f<0&&(f=0),l+f>d&&(l=d-f),l<0&&(l=0),this.width=t,this.scrollWidth=r,this.scrollLeft=u,this.height=f,this.scrollHeight=d,this.scrollTop=l}equals(n){return this.rawScrollLeft===n.rawScrollLeft&&this.rawScrollTop===n.rawScrollTop&&this.width===n.width&&this.scrollWidth===n.scrollWidth&&this.scrollLeft===n.scrollLeft&&this.height===n.height&&this.scrollHeight===n.scrollHeight&&this.scrollTop===n.scrollTop}withScrollDimensions(n,t){return new y(this._forceIntegerValues,typeof n.width<"u"?n.width:this.width,typeof n.scrollWidth<"u"?n.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof n.height<"u"?n.height:this.height,typeof n.scrollHeight<"u"?n.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(n){return new y(this._forceIntegerValues,this.width,this.scrollWidth,typeof n.scrollLeft<"u"?n.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof n.scrollTop<"u"?n.scrollTop:this.rawScrollTop)}createScrollEvent(n,t){const r=this.width!==n.width,u=this.scrollWidth!==n.scrollWidth,f=this.scrollLeft!==n.scrollLeft,d=this.height!==n.height,l=this.scrollHeight!==n.scrollHeight,o=this.scrollTop!==n.scrollTop;return{inSmoothScrolling:t,oldWidth:n.width,oldScrollWidth:n.scrollWidth,oldScrollLeft:n.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:n.height,oldScrollHeight:n.scrollHeight,oldScrollTop:n.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:r,scrollWidthChanged:u,scrollLeftChanged:f,heightChanged:d,scrollHeightChanged:l,scrollTopChanged:o}}}e.ScrollState=y;class D extends I.Disposable{constructor(n){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new L.Emitter),this.onScroll=this._onScroll.event,this._smoothScrollDuration=n.smoothScrollDuration,this._scheduleAtNextAnimationFrame=n.scheduleAtNextAnimationFrame,this._state=new y(n.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(n){this._smoothScrollDuration=n}validateScrollPosition(n){return this._state.withScrollPosition(n)}getScrollDimensions(){return this._state}setScrollDimensions(n,t){var r;const u=this._state.withScrollDimensions(n,t);this._setState(u,!!this._smoothScrolling),(r=this._smoothScrolling)===null||r===void 0||r.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(n){const t=this._state.withScrollPosition(n);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(n,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(n);if(this._smoothScrolling){n={scrollLeft:typeof n.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:n.scrollLeft,scrollTop:typeof n.scrollTop>"u"?this._smoothScrolling.to.scrollTop:n.scrollTop};const r=this._state.withScrollPosition(n);if(this._smoothScrolling.to.scrollLeft===r.scrollLeft&&this._smoothScrolling.to.scrollTop===r.scrollTop)return;let u;t?u=new v(this._smoothScrolling.from,r,this._smoothScrolling.startTime,this._smoothScrolling.duration):u=this._smoothScrolling.combine(this._state,r,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=u}else{const r=this._state.withScrollPosition(n);this._smoothScrolling=v.start(this._state,r,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;const n=this._smoothScrolling.tick(),t=this._state.withScrollPosition(n);if(this._setState(t,!0),!!this._smoothScrolling){if(n.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(n,t){const r=this._state;r.equals(n)||(this._state=n,this._onScroll.fire(this._state.createScrollEvent(r,t)))}}e.Scrollable=D;class S{constructor(n,t,r){this.scrollLeft=n,this.scrollTop=t,this.isDone=r}}e.SmoothScrollingUpdate=S;function m(i,n){const t=n-i;return function(r){return i+t*s(r)}}function _(i,n,t){return function(r){return r2.5*r){let f,d;return n=re.length?oe:re[me]})}e.format=m;function _(j){return j.replace(/[<>&]/g,function(re){switch(re){case"<":return"<";case">":return">";case"&":return"&";default:return re}})}e.escape=_;function v(j){return j.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}e.escapeRegExpCharacters=v;function C(j,re=" "){const oe=s(j,re);return i(oe,re)}e.trim=C;function s(j,re){if(!j||!re)return j;const oe=re.length;if(oe===0||j.length===0)return j;let he=0;for(;j.indexOf(re,he)===he;)he=he+oe;return j.substring(he)}e.ltrim=s;function i(j,re){if(!j||!re)return j;const oe=re.length,he=j.length;if(oe===0||he===0)return j;let me=he,pe=-1;for(;pe=j.lastIndexOf(re,me-1),!(pe===-1||pe+oe!==me);){if(pe===0)return"";me=pe}return j.substring(0,me)}e.rtrim=i;function n(j){return j.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}e.convertSimple2RegExpPattern=n;function t(j){return j.replace(/\*/g,"")}e.stripWildcards=t;function r(j,re,oe={}){if(!j)throw new Error("Cannot create regex from empty string");re||(j=v(j)),oe.wholeWord&&(/\B/.test(j.charAt(0))||(j="\\b"+j),/\B/.test(j.charAt(j.length-1))||(j=j+"\\b"));let he="";return oe.global&&(he+="g"),oe.matchCase||(he+="i"),oe.multiline&&(he+="m"),oe.unicode&&(he+="u"),new RegExp(j,he)}e.createRegExp=r;function u(j){return j.source==="^"||j.source==="^$"||j.source==="$"||j.source==="^\\s*$"?!1:!!(j.exec("")&&j.lastIndex===0)}e.regExpLeadsToEndlessLoop=u;function f(j){return j.split(/\r\n|\r|\n/)}e.splitLines=f;function d(j){for(let re=0,oe=j.length;re=0;oe--){const he=j.charCodeAt(oe);if(he!==32&&he!==9)return oe}return-1}e.lastNonWhitespaceIndex=o;function c(j,re){return jre?1:0}e.compare=c;function a(j,re,oe=0,he=j.length,me=0,pe=re.length){for(;oeEe)return 1}const ve=he-oe,we=pe-me;return vewe?1:0}e.compareSubstring=a;function g(j,re){return h(j,re,0,j.length,0,re.length)}e.compareIgnoreCase=g;function h(j,re,oe=0,he=j.length,me=0,pe=re.length){for(;oe=128||Ee>=128)return a(j.toLowerCase(),re.toLowerCase(),oe,he,me,pe);b(Le)&&(Le-=32),b(Ee)&&(Ee-=32);const Ae=Le-Ee;if(Ae!==0)return Ae}const ve=he-oe,we=pe-me;return vewe?1:0}e.compareSubstringIgnoreCase=h;function p(j){return j>=48&&j<=57}e.isAsciiDigit=p;function b(j){return j>=97&&j<=122}e.isLowerAsciiLetter=b;function w(j){return j>=65&&j<=90}e.isUpperAsciiLetter=w;function E(j,re){return j.length===re.length&&h(j,re)===0}e.equalsIgnoreCase=E;function k(j,re){const oe=re.length;return re.length>j.length?!1:h(j,re,0,oe)===0}e.startsWithIgnoreCase=k;function M(j,re){const oe=Math.min(j.length,re.length);let he;for(he=0;he1){const he=j.charCodeAt(re-2);if(B(he))return N(he,oe)}return oe}class O{get offset(){return this._offset}constructor(re,oe=0){this._str=re,this._len=re.length,this._offset=oe}setOffset(re){this._offset=re}prevCodePoint(){const re=P(this._str,this._offset);return this._offset-=re>=65536?2:1,re}nextCodePoint(){const re=A(this._str,this._len,this._offset);return this._offset+=re>=65536?2:1,re}eol(){return this._offset>=this._len}}e.CodePointIterator=O;class x{get offset(){return this._iterator.offset}constructor(re,oe=0){this._iterator=new O(re,oe)}nextGraphemeLength(){const re=de.getInstance(),oe=this._iterator,he=oe.offset;let me=re.getGraphemeBreakType(oe.nextCodePoint());for(;!oe.eol();){const pe=oe.offset,ve=re.getGraphemeBreakType(oe.nextCodePoint());if(ue(me,ve)){oe.setOffset(pe);break}me=ve}return oe.offset-he}prevGraphemeLength(){const re=de.getInstance(),oe=this._iterator,he=oe.offset;let me=re.getGraphemeBreakType(oe.prevCodePoint());for(;oe.offset>0;){const pe=oe.offset,ve=re.getGraphemeBreakType(oe.prevCodePoint());if(ue(ve,me)){oe.setOffset(pe);break}me=ve}return he-oe.offset}eol(){return this._iterator.eol()}}e.GraphemeIterator=x;function W(j,re){return new x(j,re).nextGraphemeLength()}e.nextCharLength=W;function U(j,re){return new x(j,re).prevGraphemeLength()}e.prevCharLength=U;function F(j,re){re>0&&T(j.charCodeAt(re))&&re--;const oe=re+W(j,re);return[oe-U(j,oe),oe]}e.getCharContainingOffset=F;let G;function Y(){return/(?:[\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\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/}function ne(j){return G||(G=Y()),G.test(j)}e.containsRTL=ne;const se=/^[\t\n\r\x20-\x7E]*$/;function J(j){return se.test(j)}e.isBasicASCII=J,e.UNUSUAL_LINE_TERMINATORS=/[\u2028\u2029]/;function q(j){return e.UNUSUAL_LINE_TERMINATORS.test(j)}e.containsUnusualLineTerminators=q;function H(j){return j>=11904&&j<=55215||j>=63744&&j<=64255||j>=65281&&j<=65374}e.isFullWidthCharacter=H;function V(j){return j>=127462&&j<=127487||j===8986||j===8987||j===9200||j===9203||j>=9728&&j<=10175||j===11088||j===11093||j>=127744&&j<=128591||j>=128640&&j<=128764||j>=128992&&j<=129008||j>=129280&&j<=129535||j>=129648&&j<=129782}e.isEmojiImprecise=V,e.UTF8_BOM_CHARACTER=String.fromCharCode(65279);function Z(j){return!!(j&&j.length>0&&j.charCodeAt(0)===65279)}e.startsWithUTF8BOM=Z;function ee(j,re=!1){return j?(re&&(j=j.replace(/\\./g,"")),j.toLowerCase()!==j):!1}e.containsUppercaseCharacter=ee;function le(j){return j=j%(2*26),j<26?String.fromCharCode(97+j):String.fromCharCode(65+j-26)}e.singleLetterHash=le;function ue(j,re){return j===0?re!==5&&re!==7:j===2&&re===3?!1:j===4||j===2||j===3||re===4||re===2||re===3?!0:!(j===8&&(re===8||re===9||re===11||re===12)||(j===11||j===9)&&(re===9||re===10)||(j===12||j===10)&&re===10||re===5||re===13||re===7||j===1||j===13&&re===14||j===6&&re===6)}class de{static getInstance(){return de._INSTANCE||(de._INSTANCE=new de),de._INSTANCE}constructor(){this._data=ce()}getGraphemeBreakType(re){if(re<32)return re===10?3:re===13?2:4;if(re<127)return 0;const oe=this._data,he=oe.length/3;let me=1;for(;me<=he;)if(reoe[3*me+1])me=2*me+1;else return oe[3*me+2];return 0}}de._INSTANCE=null;function ce(){return JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,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,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,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,129008,129008,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,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,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,2192,2193,1,2250,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,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,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,6862,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,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,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,9775,9775,14,9784,9785,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,9874,14,9876,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,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,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,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,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,118528,118573,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,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}function ae(j,re){if(j===0)return 0;const oe=X(j,re);if(oe!==void 0)return oe;const he=new O(re,j);return he.prevCodePoint(),he.offset}e.getLeftDeleteOffset=ae;function X(j,re){const oe=new O(re,j);let he=oe.prevCodePoint();for(;K(he)||he===65039||he===8419;){if(oe.offset===0)return;he=oe.prevCodePoint()}if(!V(he))return;let me=oe.offset;return me>0&&oe.prevCodePoint()===8205&&(me=oe.offset),me}function K(j){return 127995<=j&&j<=127999}e.noBreakWhitespace="\xA0";class z{static getInstance(re){return y.cache.get(Array.from(re))}static getLocales(){return y._locales.value}constructor(re){this.confusableDictionary=re}isAmbiguous(re){return this.confusableDictionary.has(re)}getPrimaryConfusable(re){return this.confusableDictionary.get(re)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}e.AmbiguousCharacters=z,y=z,z.ambiguousCharacterData=new I.Lazy(()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}')),z.cache=new L.LRUCachedFunction(j=>{function re(Ee){const Ae=new Map;for(let Re=0;Re!Ee.startsWith("_")&&Ee in me);pe.length===0&&(pe=["_default"]);let ve;for(const Ee of pe){const Ae=re(me[Ee]);ve=he(ve,Ae)}const we=re(me._common),Le=oe(we,ve);return new y(Le)}),z._locales=new I.Lazy(()=>Object.keys(y.ambiguousCharacterData.value).filter(j=>!j.startsWith("_")));class Q{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(Q.getRawData())),this._data}static isInvisibleCharacter(re){return Q.getData().has(re)}static get codePoints(){return Q.getData()}}e.InvisibleCharacters=Q,Q._data=void 0}),define(te[69],ie([1,0,56,10]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fuzzyScoreGracefulAggressive=e.fuzzyScore=e.FuzzyScoreOptions=e.FuzzyScore=e.isPatternInWord=e.createMatches=e.anyScore=e.matchesFuzzy2=e.matchesFuzzy=e.matchesWords=e.matchesCamelCase=e.isUpper=e.matchesSubString=e.matchesContiguousSubString=e.matchesPrefix=e.matchesStrictPrefix=e.or=void 0;function y(...K){return function(z,Q){for(let j=0,re=K.length;j0?[{start:0,end:z.length}]:[]:null}function S(K,z){const Q=z.toLowerCase().indexOf(K.toLowerCase());return Q===-1?null:[{start:Q,end:Q+K.length}]}e.matchesContiguousSubString=S;function m(K,z){return _(K.toLowerCase(),z.toLowerCase(),0,0)}e.matchesSubString=m;function _(K,z,Q,j){if(Q===K.length)return[];if(j===z.length)return null;if(K[Q]===z[j]){let re=null;return(re=_(K,z,Q+1,j+1))?f({start:j,end:j+1},re):null}return _(K,z,Q,j+1)}function v(K){return 97<=K&&K<=122}function C(K){return 65<=K&&K<=90}e.isUpper=C;function s(K){return 48<=K&&K<=57}function i(K){return K===32||K===9||K===10||K===13}const n=new Set;"()[]{}<>`'\"-/;:,.?!".split("").forEach(K=>n.add(K.charCodeAt(0)));function t(K){return i(K)||n.has(K)}function r(K,z){return K===z||t(K)&&t(z)}function u(K){return v(K)||C(K)||s(K)}function f(K,z){return z.length===0?z=[K]:K.end===z[0].start?z[0].start=K.start:z.unshift(K),z}function d(K,z){for(let Q=z;Q0&&!u(K.charCodeAt(Q-1)))return Q}return K.length}function l(K,z,Q,j){if(Q===K.length)return[];if(j===z.length)return null;if(K[Q]!==z[j].toLowerCase())return null;{let re=null,oe=j+1;for(re=l(K,z,Q+1,j+1);!re&&(oe=d(z,oe)).6}function a(K){const{upperPercent:z,lowerPercent:Q,alphaPercent:j,numericPercent:re}=K;return Q>.2&&z<.8&&j>.6&&re<.2}function g(K){let z=0,Q=0,j=0,re=0;for(let oe=0;oe60)return null;const Q=o(z);if(!a(Q)){if(!c(Q))return null;z=z.toLowerCase()}let j=null,re=0;for(K=K.toLowerCase();re0&&t(K.charCodeAt(Q-1)))return Q;return K.length}const E=y(e.matchesPrefix,h,S),k=y(e.matchesPrefix,h,m),M=new L.LRUCache(1e4);function R(K,z,Q=!1){if(typeof K!="string"||typeof z!="string")return null;let j=M.get(K);j||(j=new RegExp(I.convertSimple2RegExpPattern(K),"i"),M.set(K,j));const re=j.exec(z);return re?[{start:re.index,end:re.index+re[0].length}]:Q?k(K,z):E(K,z)}e.matchesFuzzy=R;function B(K,z){const Q=le(K,K.toLowerCase(),0,z,z.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return Q?N(Q):null}e.matchesFuzzy2=B;function T(K,z,Q,j,re,oe){const he=Math.min(13,K.length);for(;Q"u")return[];const z=[],Q=K[1];for(let j=K.length-1;j>1;j--){const re=K[j]+Q,oe=z[z.length-1];oe&&oe.end===re?oe.end=re+1:z.push({start:re,end:re+1})}return z}e.createMatches=N;const A=128;function P(){const K=[],z=[];for(let Q=0;Q<=A;Q++)z[Q]=0;for(let Q=0;Q<=A;Q++)K.push(z.slice(0));return K}function O(K){const z=[];for(let Q=0;Q<=K;Q++)z[Q]=0;return z}const x=O(2*A),W=O(2*A),U=P(),F=P(),G=P(),Y=!1;function ne(K,z,Q,j,re){function oe(me,pe,ve=" "){for(;me.lengthoe(me,3)).join("|")} -`;for(let me=0;me<=Q;me++)me===0?he+=" |":he+=`${z[me-1]}|`,he+=K[me].slice(0,re+1).map(pe=>oe(pe.toString(),3)).join("|")+` -`;return he}function se(K,z,Q,j){K=K.substr(z),Q=Q.substr(j),console.log(ne(F,K,K.length,Q,Q.length)),console.log(ne(G,K,K.length,Q,Q.length)),console.log(ne(U,K,K.length,Q,Q.length))}function J(K,z){if(z<0||z>=K.length)return!1;const Q=K.codePointAt(z);switch(Q){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 62:case 40:case 41:case 91:case 93:case 123:case 125:return!0;case void 0:return!1;default:return!!I.isEmojiImprecise(Q)}}function q(K,z){if(z<0||z>=K.length)return!1;switch(K.charCodeAt(z)){case 32:case 9:return!0;default:return!1}}function H(K,z,Q){return z[K]!==Q[K]}function V(K,z,Q,j,re,oe,he=!1){for(;zA?A:K.length,pe=j.length>A?A:j.length;if(Q>=me||oe>=pe||me-Q>pe-oe||!V(z,Q,me,re,oe,pe,!0))return;ue(me,pe,Q,oe,z,re);let ve=1,we=1,Le=Q,Ee=oe;const Ae=[!1];for(ve=1,Le=Q;Lefe,Oe=ke?F[ve][we-1]+(U[ve][we-1]>0?-5:0):0,We=Ee>fe+1&&U[ve][we-1]>0,qe=We?F[ve][we-2]+(U[ve][we-2]>0?-5:0):0;if(We&&(!ke||qe>=Oe)&&(!Se||qe>=_e))F[ve][we]=qe,G[ve][we]=3,U[ve][we]=0;else if(ke&&(!Se||Oe>=_e))F[ve][we]=Oe,G[ve][we]=2,U[ve][we]=0;else if(Se)F[ve][we]=_e,G[ve][we]=1,U[ve][we]=U[ve-1][we-1]+1;else throw new Error("not possible")}}if(Y&&se(K,Q,j,oe),!Ae[0]&&!he.firstMatchCanBeWeak)return;ve--,we--;const Re=[F[ve][we],oe];let Be=0,ye=0;for(;ve>=1;){let fe=we;do{const Ce=G[ve][fe];if(Ce===3)fe=fe-2;else if(Ce===2)fe=fe-1;else break}while(fe>=1);Be>1&&z[Q+ve-1]===re[oe+we-1]&&!H(fe+oe-1,j,re)&&Be+1>U[ve][fe]&&(fe=we),fe===we?Be++:Be=1,ye||(ye=fe),ve--,we=fe-1,Re.push(we)}pe===me&&he.boostFullMatch&&(Re[0]+=2);const De=ye-me;return Re[0]-=De,Re}e.fuzzyScore=le;function ue(K,z,Q,j,re,oe){let he=K-1,me=z-1;for(;he>=Q&&me>=j;)re[he]===oe[me]&&(W[he]=me,he--),me--}function de(K,z,Q,j,re,oe,he,me,pe,ve,we){if(z[Q]!==oe[he])return Number.MIN_SAFE_INTEGER;let Le=1,Ee=!1;return he===Q-j?Le=K[Q]===re[he]?7:5:H(he,re,oe)&&(he===0||!H(he-1,re,oe))?(Le=K[Q]===re[he]?7:5,Ee=!0):J(oe,he)&&(he===0||!J(oe,he-1))?Le=5:(J(oe,he-1)||q(oe,he-1))&&(Le=5,Ee=!0),Le>1&&Q===j&&(we[0]=!0),Ee||(Ee=H(he,re,oe)||J(oe,he-1)||q(oe,he-1)),Q===j?he>pe&&(Le-=Ee?3:5):ve?Le+=Ee?2:0:Le+=Ee?0:1,he+1===me&&(Le-=Ee?3:5),Le}function ce(K,z,Q,j,re,oe,he){return ae(K,z,Q,j,re,oe,!0,he)}e.fuzzyScoreGracefulAggressive=ce;function ae(K,z,Q,j,re,oe,he,me){let pe=le(K,z,Q,j,re,oe,me);if(pe&&!he)return pe;if(K.length>=3){const ve=Math.min(7,K.length-1);for(let we=Q+1;wepe[0])&&(pe=Ee))}}}return pe}function X(K,z){if(z+1>=K.length)return;const Q=K[z],j=K[z+1];if(Q!==j)return K.slice(0,z)+j+Q+K.slice(z+2)}}),define(te[141],ie([1,0,10]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringSHA1=e.toHexString=e.stringHash=e.numberHash=e.doHash=e.hash=void 0;function I(r){return y(r,0)}e.hash=I;function y(r,u){switch(typeof r){case"object":return r===null?D(349,u):Array.isArray(r)?_(r,u):v(r,u);case"string":return m(r,u);case"boolean":return S(r,u);case"number":return D(r,u);case"undefined":return D(937,u);default:return D(617,u)}}e.doHash=y;function D(r,u){return(u<<5)-u+r|0}e.numberHash=D;function S(r,u){return D(r?433:863,u)}function m(r,u){u=D(149417,u);for(let f=0,d=r.length;fy(d,f),u)}function v(r,u){return u=D(181387,u),Object.keys(r).sort().reduce((f,d)=>(f=m(d,f),y(r[d],f)),u)}function C(r,u,f=32){const d=f-u,l=~((1<>>d)>>>0}function s(r,u=0,f=r.byteLength,d=0){for(let l=0;lf.toString(16).padStart(2,"0")).join(""):i((r>>>0).toString(16),u/4)}e.toHexString=n;class t{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(u){const f=u.length;if(f===0)return;const d=this._buff;let l=this._buffLen,o=this._leftoverHighSurrogate,c,a;for(o!==0?(c=o,a=-1,o=0):(c=u.charCodeAt(0),a=0);;){let g=c;if(L.isHighSurrogate(c))if(a+1>>6,u[f++]=128|(d&63)>>>0):d<65536?(u[f++]=224|(d&61440)>>>12,u[f++]=128|(d&4032)>>>6,u[f++]=128|(d&63)>>>0):(u[f++]=240|(d&1835008)>>>18,u[f++]=128|(d&258048)>>>12,u[f++]=128|(d&4032)>>>6,u[f++]=128|(d&63)>>>0),f>=64&&(this._step(),f-=64,this._totalLen+=64,u[0]=u[64+0],u[1]=u[64+1],u[2]=u[64+2]),f}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),n(this._h0)+n(this._h1)+n(this._h2)+n(this._h3)+n(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,s(this._buff,this._buffLen),this._buffLen>56&&(this._step(),s(this._buff));const u=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(u/4294967296),!1),this._buffDV.setUint32(60,u%4294967296,!1),this._step()}_step(){const u=t._bigBlock32,f=this._buffDV;for(let b=0;b<64;b+=4)u.setUint32(b,f.getUint32(b,!1),!1);for(let b=64;b<320;b+=4)u.setUint32(b,C(u.getUint32(b-12,!1)^u.getUint32(b-32,!1)^u.getUint32(b-56,!1)^u.getUint32(b-64,!1),1),!1);let d=this._h0,l=this._h1,o=this._h2,c=this._h3,a=this._h4,g,h,p;for(let b=0;b<80;b++)b<20?(g=l&o|~l&c,h=1518500249):b<40?(g=l^o^c,h=1859775393):b<60?(g=l&o|l&c|o&c,h=2400959708):(g=l^o^c,h=3395469782),p=C(d,5)+g+a+h+u.getUint32(b*4,!1)&4294967295,a=c,c=o,o=C(l,30),l=d,d=p;this._h0=this._h0+d&4294967295,this._h1=this._h1+l&4294967295,this._h2=this._h2+o&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+a&4294967295}}e.StringSHA1=t,t._bigBlock32=new DataView(new ArrayBuffer(320))}),define(te[167],ie([1,0,387,141]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LcsDiff=e.stringDiff=e.StringDiffSequence=void 0;class y{constructor(s){this.source=s}getElements(){const s=this.source,i=new Int32Array(s.length);for(let n=0,t=s.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new L.DiffChange(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(s,i){this.m_originalStart=Math.min(this.m_originalStart,s),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_originalCount++}AddModifiedElement(s,i){this.m_originalStart=Math.min(this.m_originalStart,s),this.m_modifiedStart=Math.min(this.m_modifiedStart,i),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class v{constructor(s,i,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=s,this._modifiedSequence=i;const[t,r,u]=v._getElements(s),[f,d,l]=v._getElements(i);this._hasStrings=u&&l,this._originalStringElements=t,this._originalElementsOrHash=r,this._modifiedStringElements=f,this._modifiedElementsOrHash=d,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(s){return s.length>0&&typeof s[0]=="string"}static _getElements(s){const i=s.getElements();if(v._isStringArray(i)){const n=new Int32Array(i.length);for(let t=0,r=i.length;t=s&&t>=n&&this.ElementsAreEqual(i,t);)i--,t--;if(s>i||n>t){let c;return n<=t?(S.Assert(s===i+1,"originalStart should only be one more than originalEnd"),c=[new L.DiffChange(s,0,n,t-n+1)]):s<=i?(S.Assert(n===t+1,"modifiedStart should only be one more than modifiedEnd"),c=[new L.DiffChange(s,i-s+1,n,0)]):(S.Assert(s===i+1,"originalStart should only be one more than originalEnd"),S.Assert(n===t+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const u=[0],f=[0],d=this.ComputeRecursionPoint(s,i,n,t,u,f,r),l=u[0],o=f[0];if(d!==null)return d;if(!r[0]){const c=this.ComputeDiffRecursive(s,l,n,o,r);let a=[];return r[0]?a=[new L.DiffChange(l+1,i-(l+1)+1,o+1,t-(o+1)+1)]:a=this.ComputeDiffRecursive(l+1,i,o+1,t,r),this.ConcatenateChanges(c,a)}return[new L.DiffChange(s,i-s+1,n,t-n+1)]}WALKTRACE(s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E){let k=null,M=null,R=new _,B=i,T=n,N=g[0]-b[0]-t,A=-1073741824,P=this.m_forwardHistory.length-1;do{const O=N+s;O===B||O=0&&(l=this.m_forwardHistory[P],s=l[0],B=1,T=l.length-1)}while(--P>=-1);if(k=R.getReverseChanges(),E[0]){let O=g[0]+1,x=b[0]+1;if(k!==null&&k.length>0){const W=k[k.length-1];O=Math.max(O,W.getOriginalEnd()),x=Math.max(x,W.getModifiedEnd())}M=[new L.DiffChange(O,a-O+1,x,p-x+1)]}else{R=new _,B=u,T=f,N=g[0]-b[0]-d,A=1073741824,P=w?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const O=N+r;O===B||O=o[O+1]?(c=o[O+1]-1,h=c-N-d,c>A&&R.MarkNextChange(),A=c+1,R.AddOriginalElement(c+1,h+1),N=O+1-r):(c=o[O-1],h=c-N-d,c>A&&R.MarkNextChange(),A=c,R.AddModifiedElement(c+1,h+1),N=O-1-r),P>=0&&(o=this.m_reverseHistory[P],r=o[0],B=1,T=o.length-1)}while(--P>=-1);M=R.getChanges()}return this.ConcatenateChanges(k,M)}ComputeRecursionPoint(s,i,n,t,r,u,f){let d=0,l=0,o=0,c=0,a=0,g=0;s--,n--,r[0]=0,u[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const h=i-s+(t-n),p=h+1,b=new Int32Array(p),w=new Int32Array(p),E=t-n,k=i-s,M=s-n,R=i-t,T=(k-E)%2===0;b[E]=s,w[k]=i,f[0]=!1;for(let N=1;N<=h/2+1;N++){let A=0,P=0;o=this.ClipDiagonalBound(E-N,N,E,p),c=this.ClipDiagonalBound(E+N,N,E,p);for(let x=o;x<=c;x+=2){x===o||xA+P&&(A=d,P=l),!T&&Math.abs(x-k)<=N-1&&d>=w[x])return r[0]=d,u[0]=l,W<=w[x]&&1447>0&&N<=1447+1?this.WALKTRACE(E,o,c,M,k,a,g,R,b,w,d,i,r,l,t,u,T,f):null}const O=(A-s+(P-n)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(A,O))return f[0]=!0,r[0]=A,u[0]=P,O>0&&1447>0&&N<=1447+1?this.WALKTRACE(E,o,c,M,k,a,g,R,b,w,d,i,r,l,t,u,T,f):(s++,n++,[new L.DiffChange(s,i-s+1,n,t-n+1)]);a=this.ClipDiagonalBound(k-N,N,k,p),g=this.ClipDiagonalBound(k+N,N,k,p);for(let x=a;x<=g;x+=2){x===a||x=w[x+1]?d=w[x+1]-1:d=w[x-1],l=d-(x-k)-R;const W=d;for(;d>s&&l>n&&this.ElementsAreEqual(d,l);)d--,l--;if(w[x]=d,T&&Math.abs(x-E)<=N&&d<=b[x])return r[0]=d,u[0]=l,W>=b[x]&&1447>0&&N<=1447+1?this.WALKTRACE(E,o,c,M,k,a,g,R,b,w,d,i,r,l,t,u,T,f):null}if(N<=1447){let x=new Int32Array(c-o+2);x[0]=E-o+1,m.Copy2(b,o,x,1,c-o+1),this.m_forwardHistory.push(x),x=new Int32Array(g-a+2),x[0]=k-a+1,m.Copy2(w,a,x,1,g-a+1),this.m_reverseHistory.push(x)}}return this.WALKTRACE(E,o,c,M,k,a,g,R,b,w,d,i,r,l,t,u,T,f)}PrettifyChanges(s){for(let i=0;i0,f=n.modifiedLength>0;for(;n.originalStart+n.originalLength=0;i--){const n=s[i];let t=0,r=0;if(i>0){const c=s[i-1];t=c.originalStart+c.originalLength,r=c.modifiedStart+c.modifiedLength}const u=n.originalLength>0,f=n.modifiedLength>0;let d=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let c=1;;c++){const a=n.originalStart-c,g=n.modifiedStart-c;if(al&&(l=p,d=c)}n.originalStart-=d,n.modifiedStart-=d;const o=[null];if(i>0&&this.ChangesOverlap(s[i-1],s[i],o)){s[i-1]=o[0],s.splice(i,1),i++;continue}}if(this._hasStrings)for(let i=1,n=s.length;i0&&g>d&&(d=g,l=c,o=a)}return d>0?[l,o]:null}_contiguousSequenceScore(s,i,n){let t=0;for(let r=0;r=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[s])}_OriginalRegionIsBoundary(s,i){if(this._OriginalIsBoundary(s)||this._OriginalIsBoundary(s-1))return!0;if(i>0){const n=s+i;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(s){return s<=0||s>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[s])}_ModifiedRegionIsBoundary(s,i){if(this._ModifiedIsBoundary(s)||this._ModifiedIsBoundary(s-1))return!0;if(i>0){const n=s+i;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(s,i,n,t){const r=this._OriginalRegionIsBoundary(s,i)?1:0,u=this._ModifiedRegionIsBoundary(n,t)?1:0;return r+u}ConcatenateChanges(s,i){const n=[];if(s.length===0||i.length===0)return i.length>0?i:s;if(this.ChangesOverlap(s[s.length-1],i[0],n)){const t=new Array(s.length+i.length-1);return m.Copy(s,0,t,0,s.length-1),t[s.length-1]=n[0],m.Copy(i,1,t,s.length,i.length-1),t}else{const t=new Array(s.length+i.length);return m.Copy(s,0,t,0,s.length),m.Copy(i,0,t,s.length,i.length),t}}ChangesOverlap(s,i,n){if(S.Assert(s.originalStart<=i.originalStart,"Left change is not less than or equal to right change"),S.Assert(s.modifiedStart<=i.modifiedStart,"Left change is not less than or equal to right change"),s.originalStart+s.originalLength>=i.originalStart||s.modifiedStart+s.modifiedLength>=i.modifiedStart){const t=s.originalStart;let r=s.originalLength;const u=s.modifiedStart;let f=s.modifiedLength;return s.originalStart+s.originalLength>=i.originalStart&&(r=i.originalStart+i.originalLength-s.originalStart),s.modifiedStart+s.modifiedLength>=i.modifiedStart&&(f=i.modifiedStart+i.modifiedLength-s.modifiedStart),n[0]=new L.DiffChange(t,r,u,f),!0}else return n[0]=null,!1}ClipDiagonalBound(s,i,n,t){if(s>=0&&s0?m[0].toUpperCase()+m.substr(1):S[0][0].toUpperCase()!==S[0][0]&&m.length>0?m[0].toLowerCase()+m.substr(1):m}else return m}e.buildReplaceStringWithCasePreserved=I;function y(S,m,_){return S[0].indexOf(_)!==-1&&m.indexOf(_)!==-1&&S[0].split(_).length===m.split(_).length}function D(S,m,_){const v=m.split(_),C=S[0].split(_);let s="";return v.forEach((i,n)=>{s+=I([C[n]],i)+_}),s.slice(0,-1)}}),define(te[98],ie([1,0,10]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var I;(function(y){y[y.Ignore=0]="Ignore",y[y.Info=1]="Info",y[y.Warning=2]="Warning",y[y.Error=3]="Error"})(I||(I={})),function(y){const D="error",S="warning",m="warn",_="info",v="ignore";function C(i){return i?L.equalsIgnoreCase(D,i)?y.Error:L.equalsIgnoreCase(S,i)||L.equalsIgnoreCase(m,i)?y.Warning:L.equalsIgnoreCase(_,i)?y.Info:y.Ignore:y.Ignore}y.fromValue=C;function s(i){switch(i){case y.Error:return D;case y.Warning:return S;case y.Info:return _;default:return v}}y.toString=s}(I||(I={})),e.default=I}),define(te[263],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MicrotaskDelay=void 0,e.MicrotaskDelay=Symbol("MicrotaskDelay")}),define(te[197],ie([1,0,10]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TernarySearchTree=e.UriIterator=e.PathIterator=e.ConfigKeysIterator=e.StringIterator=void 0;class I{constructor(){this._value="",this._pos=0}reset(C){return this._value=C,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;s--,this._valueLen--){const i=this._value.charCodeAt(s);if(!(i===47||this._splitOnBackslash&&i===92))break}return this.next()}hasNext(){return this._to!1,s=()=>!1){return new _(new S(C,s))}static forStrings(){return new _(new I)}static forConfigKeys(){return new _(new y)}constructor(C){this._iter=C}clear(){this._root=void 0}set(C,s){const i=this._iter.reset(C);let n;this._root||(this._root=new m,this._root.segment=i.value());const t=[];for(n=this._root;;){const u=i.cmp(n.segment);if(u>0)n.left||(n.left=new m,n.left.segment=i.value()),t.push([-1,n]),n=n.left;else if(u<0)n.right||(n.right=new m,n.right.segment=i.value()),t.push([1,n]),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new m,n.mid.segment=i.value()),t.push([0,n]),n=n.mid;else break}const r=n.value;n.value=s,n.key=C;for(let u=t.length-1;u>=0;u--){const f=t[u][1];f.updateHeight();const d=f.balanceFactor();if(d<-1||d>1){const l=t[u][0],o=t[u+1][0];if(l===1&&o===1)t[u][1]=f.rotateLeft();else if(l===-1&&o===-1)t[u][1]=f.rotateRight();else if(l===1&&o===-1)f.right=t[u+1][1]=t[u+1][1].rotateRight(),t[u][1]=f.rotateLeft();else if(l===-1&&o===1)f.left=t[u+1][1]=t[u+1][1].rotateLeft(),t[u][1]=f.rotateRight();else throw new Error;if(u>0)switch(t[u-1][0]){case-1:t[u-1][1].left=t[u][1];break;case 1:t[u-1][1].right=t[u][1];break;case 0:t[u-1][1].mid=t[u][1];break}else this._root=t[0][1]}}return r}get(C){var s;return(s=this._getNode(C))===null||s===void 0?void 0:s.value}_getNode(C){const s=this._iter.reset(C);let i=this._root;for(;i;){const n=s.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(s.hasNext())s.next(),i=i.mid;else break}return i}has(C){const s=this._getNode(C);return!(s?.value===void 0&&s?.mid===void 0)}delete(C){return this._delete(C,!1)}deleteSuperstr(C){return this._delete(C,!0)}_delete(C,s){var i;const n=this._iter.reset(C),t=[];let r=this._root;for(;r;){const u=n.cmp(r.segment);if(u>0)t.push([-1,r]),r=r.left;else if(u<0)t.push([1,r]),r=r.right;else if(n.hasNext())n.next(),t.push([0,r]),r=r.mid;else break}if(r){if(s?(r.left=void 0,r.mid=void 0,r.right=void 0,r.height=1):(r.key=void 0,r.value=void 0),!r.mid&&!r.value)if(r.left&&r.right){const u=this._min(r.right);if(u.key){const{key:f,value:d,segment:l}=u;this._delete(u.key,!1),r.key=f,r.value=d,r.segment=l}}else{const u=(i=r.left)!==null&&i!==void 0?i:r.right;if(t.length>0){const[f,d]=t[t.length-1];switch(f){case-1:d.left=u;break;case 0:d.mid=u;break;case 1:d.right=u;break}}else this._root=u}for(let u=t.length-1;u>=0;u--){const f=t[u][1];f.updateHeight();const d=f.balanceFactor();if(d>1?(f.right.balanceFactor()>=0||(f.right=f.right.rotateRight()),t[u][1]=f.rotateLeft()):d<-1&&(f.left.balanceFactor()<=0||(f.left=f.left.rotateLeft()),t[u][1]=f.rotateRight()),u>0)switch(t[u-1][0]){case-1:t[u-1][1].left=t[u][1];break;case 1:t[u-1][1].right=t[u][1];break;case 0:t[u-1][1].mid=t[u][1];break}else this._root=t[0][1]}}}_min(C){for(;C.left;)C=C.left;return C}findSubstr(C){const s=this._iter.reset(C);let i=this._root,n;for(;i;){const t=s.cmp(i.segment);if(t>0)i=i.left;else if(t<0)i=i.right;else if(s.hasNext())s.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(C){return this._findSuperstrOrElement(C,!1)}_findSuperstrOrElement(C,s){const i=this._iter.reset(C);let n=this._root;for(;n;){const t=i.cmp(n.segment);if(t>0)n=n.left;else if(t<0)n=n.right;else if(i.hasNext())i.next(),n=n.mid;else return n.mid?this._entries(n.mid):s?n.value:void 0}}forEach(C){for(const[s,i]of this)C(i,s)}*[Symbol.iterator](){yield*this._entries(this._root)}_entries(C){const s=[];return this._dfsEntries(C,s),s[Symbol.iterator]()}_dfsEntries(C,s){C&&(C.left&&this._dfsEntries(C.left,s),C.value&&s.push([C.key,C.value]),C.mid&&this._dfsEntries(C.mid,s),C.right&&this._dfsEntries(C.right,s))}}e.TernarySearchTree=_}),define(te[397],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeTfIdfScores=e.TfIdfCalculator=void 0;function L(D){var S;const m=new Map;for(const _ of D)m.set(_,((S=m.get(_))!==null&&S!==void 0?S:0)+1);return m}class I{constructor(){this.chunkCount=0,this.chunkOccurrences=new Map,this.documents=new Map}calculateScores(S,m){const _=this.computeEmbedding(S),v=new Map,C=[];for(const[s,i]of this.documents){if(m.isCancellationRequested)return[];for(const n of i.chunks){const t=this.computeSimilarityScore(n,_,v);t>0&&C.push({key:s,score:t})}}return C}static termFrequencies(S){return L(I.splitTerms(S))}static*splitTerms(S){const m=_=>_.toLowerCase();for(const[_]of S.matchAll(/\b\p{Letter}[\p{Letter}\d]{2,}\b/gu)){yield m(_);const v=_.split(/(?<=[a-z])(?=[A-Z])/g);if(v.length>1)for(const C of v)C.length>2&&/\p{Letter}{3,}/gu.test(C)&&(yield m(C))}}updateDocuments(S){var m;for(const{key:_}of S)this.deleteDocument(_);for(const _ of S){const v=[];for(const C of _.textChunks){const s=I.termFrequencies(C);for(const i of s.keys())this.chunkOccurrences.set(i,((m=this.chunkOccurrences.get(i))!==null&&m!==void 0?m:0)+1);v.push({text:C,tf:s})}this.chunkCount+=v.length,this.documents.set(_.key,{chunks:v})}return this}deleteDocument(S){const m=this.documents.get(S);if(m){this.documents.delete(S),this.chunkCount-=m.chunks.length;for(const _ of m.chunks)for(const v of _.tf.keys()){const C=this.chunkOccurrences.get(v);if(typeof C=="number"){const s=C-1;s<=0?this.chunkOccurrences.delete(v):this.chunkOccurrences.set(v,s)}}}}computeSimilarityScore(S,m,_){let v=0;for(const[C,s]of Object.entries(m)){const i=S.tf.get(C);if(!i)continue;let n=_.get(C);typeof n!="number"&&(n=this.computeIdf(C),_.set(C,n));const t=i*n;v+=t*s}return v}computeEmbedding(S){const m=I.termFrequencies(S);return this.computeTfidf(m)}computeIdf(S){var m;const _=(m=this.chunkOccurrences.get(S))!==null&&m!==void 0?m:0;return _>0?Math.log((this.chunkCount+1)/_):0}computeTfidf(S){const m=Object.create(null);for(const[_,v]of S){const C=this.computeIdf(_);C>0&&(m[_]=v*C)}return m}}e.TfIdfCalculator=I;function y(D){var S,m;const _=D.slice(0);_.sort((C,s)=>s.score-C.score);const v=(m=(S=_[0])===null||S===void 0?void 0:S.score)!==null&&m!==void 0?m:0;if(v>0)for(const C of _)C.score/=v;return _}e.normalizeTfIdfScores=y}),define(te[20],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateConstraint=e.validateConstraints=e.isFunction=e.assertIsDefined=e.assertType=e.isUndefinedOrNull=e.isDefined=e.isUndefined=e.isBoolean=e.isIterable=e.isNumber=e.isTypedArray=e.isObject=e.isString=void 0;function L(u){return typeof u=="string"}e.isString=L;function I(u){return typeof u=="object"&&u!==null&&!Array.isArray(u)&&!(u instanceof RegExp)&&!(u instanceof Date)}e.isObject=I;function y(u){const f=Object.getPrototypeOf(Uint8Array);return typeof u=="object"&&u instanceof f}e.isTypedArray=y;function D(u){return typeof u=="number"&&!isNaN(u)}e.isNumber=D;function S(u){return!!u&&typeof u[Symbol.iterator]=="function"}e.isIterable=S;function m(u){return u===!0||u===!1}e.isBoolean=m;function _(u){return typeof u>"u"}e.isUndefined=_;function v(u){return!C(u)}e.isDefined=v;function C(u){return _(u)||u===null}e.isUndefinedOrNull=C;function s(u,f){if(!u)throw new Error(f?`Unexpected type, expected '${f}'`:"Unexpected type")}e.assertType=s;function i(u){if(C(u))throw new Error("Assertion Failed: argument is undefined or null");return u}e.assertIsDefined=i;function n(u){return typeof u=="function"}e.isFunction=n;function t(u,f){const d=Math.min(u.length,f.length);for(let l=0;l{t[r]=u&&typeof u=="object"?I(u):u}),t}e.deepClone=I;function y(n){if(!n||typeof n!="object")return n;const t=[n];for(;t.length>0;){const r=t.shift();Object.freeze(r);for(const u in r)if(D.call(r,u)){const f=r[u];typeof f=="object"&&!Object.isFrozen(f)&&!(0,L.isTypedArray)(f)&&t.push(f)}}return n}e.deepFreeze=y;const D=Object.prototype.hasOwnProperty;function S(n,t){return m(n,t,new Set)}e.cloneAndChange=S;function m(n,t,r){if((0,L.isUndefinedOrNull)(n))return n;const u=t(n);if(typeof u<"u")return u;if(Array.isArray(n)){const f=[];for(const d of n)f.push(m(d,t,r));return f}if((0,L.isObject)(n)){if(r.has(n))throw new Error("Cannot clone recursive data-structure");r.add(n);const f={};for(const d in n)D.call(n,d)&&(f[d]=m(n[d],t,r));return r.delete(n),f}return n}function _(n,t,r=!0){return(0,L.isObject)(n)?((0,L.isObject)(t)&&Object.keys(t).forEach(u=>{u in n?r&&((0,L.isObject)(n[u])&&(0,L.isObject)(t[u])?_(n[u],t[u],r):n[u]=t[u]):n[u]=t[u]}),n):t}e.mixin=_;function v(n,t){if(n===t)return!0;if(n==null||t===null||t===void 0||typeof n!=typeof t||typeof n!="object"||Array.isArray(n)!==Array.isArray(t))return!1;let r,u;if(Array.isArray(n)){if(n.length!==t.length)return!1;for(r=0;rfunction(){const d=Array.prototype.slice.call(arguments,0);return t(f,d)},u={};for(const f of n)u[f]=r(f);return u}e.createProxyObject=i}),define(te[27],ie([1,0,26]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ThemeIcon=e.ThemeColor=void 0;var I;(function(D){function S(m){return m&&typeof m=="object"&&typeof m.id=="string"}D.isThemeColor=S})(I||(e.ThemeColor=I={}));var y;(function(D){D.iconNameSegment="[A-Za-z0-9]+",D.iconNameExpression="[A-Za-z0-9-]+",D.iconModifierExpression="~[A-Za-z]+",D.iconNameCharacter="[A-Za-z0-9~-]";const S=new RegExp(`^(${D.iconNameExpression})(${D.iconModifierExpression})?$`);function m(f){const d=S.exec(f.id);if(!d)return m(L.Codicon.error);const[,l,o]=d,c=["codicon","codicon-"+l];return o&&c.push("codicon-modifier-"+o.substring(1)),c}D.asClassNameArray=m;function _(f){return m(f).join(" ")}D.asClassName=_;function v(f){return"."+m(f).join(".")}D.asCSSSelector=v;function C(f){return f&&typeof f=="object"&&typeof f.id=="string"&&(typeof f.color>"u"||I.isThemeColor(f.color))}D.isThemeIcon=C;const s=new RegExp(`^\\$\\((${D.iconNameExpression}(?:${D.iconModifierExpression})?)\\)$`);function i(f){const d=s.exec(f);if(!d)return;const[,l]=d;return{id:l}}D.fromString=i;function n(f){return{id:f}}D.fromId=n;function t(f,d){let l=f.id;const o=l.lastIndexOf("~");return o!==-1&&(l=l.substring(0,o)),d&&(l=`${l}~${d}`),{id:l}}D.modify=t;function r(f){const d=f.id.lastIndexOf("~");if(d!==-1)return f.id.substring(d+1)}D.getModifier=r;function u(f,d){var l,o;return f.id===d.id&&((l=f.color)===null||l===void 0?void 0:l.id)===((o=d.color)===null||o===void 0?void 0:o.id)}D.isEqual=u})(y||(e.ThemeIcon=y={}))}),define(te[119],ie([1,0,69,10,27]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.matchesFuzzyIconAware=e.parseLabelWithIcons=e.getCodiconAriaLabel=e.stripIcons=e.markdownEscapeEscapedIcons=e.escapeIcons=void 0;const D="$(",S=new RegExp(`\\$\\(${y.ThemeIcon.iconNameExpression}(?:${y.ThemeIcon.iconModifierExpression})?\\)`,"g"),m=new RegExp(`(\\\\)?${S.source}`,"g");function _(f){return f.replace(m,(d,l)=>l?d:`\\${d}`)}e.escapeIcons=_;const v=new RegExp(`\\\\${S.source}`,"g");function C(f){return f.replace(v,d=>`\\${d}`)}e.markdownEscapeEscapedIcons=C;const s=new RegExp(`(\\s)?(\\\\)?${S.source}(\\s)?`,"g");function i(f){return f.indexOf(D)===-1?f:f.replace(s,(d,l,o,c)=>o?d:l||c||"")}e.stripIcons=i;function n(f){return f?f.replace(/\$\((.*?)\)/g,(d,l)=>` ${l} `).trim():""}e.getCodiconAriaLabel=n;const t=new RegExp(`\\$\\(${y.ThemeIcon.iconNameCharacter}+\\)`,"g");function r(f){t.lastIndex=0;let d="";const l=[];let o=0;for(;;){const c=t.lastIndex,a=t.exec(f),g=f.substring(c,a?.index);if(g.length>0){d+=g;for(let h=0;h255?255:y|0}e.toUint8=L;function I(y){return y<0?0:y>4294967295?4294967295:y|0}e.toUint32=I}),define(te[169],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateUuid=void 0,e.generateUuid=function(){if(typeof crypto=="object"&&typeof crypto.randomUUID=="function")return crypto.randomUUID.bind(crypto);let L;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?L=crypto.getRandomValues.bind(crypto):L=function(D){for(let S=0;Sbe(this,void 0,void 0,function*(){return s}),asFile:()=>{},value:typeof s=="string"?s:void 0}}e.createStringDataTransferItem=D;function S(s,i,n){const t={id:(0,y.generateUuid)(),name:s,uri:i,data:n};return{asString:()=>be(this,void 0,void 0,function*(){return""}),asFile:()=>t,value:void 0}}e.createFileDataTransferItem=S;class m{constructor(){this._entries=new Map}get size(){let i=0;for(const n of this._entries)i++;return i}has(i){return this._entries.has(this.toKey(i))}matches(i){const n=[...this._entries.keys()];return I.Iterable.some(this,([t,r])=>r.asFile())&&n.push("files"),C(_(i),n)}get(i){var n;return(n=this._entries.get(this.toKey(i)))===null||n===void 0?void 0:n[0]}append(i,n){const t=this._entries.get(i);t?t.push(n):this._entries.set(this.toKey(i),[n])}replace(i,n){this._entries.set(this.toKey(i),[n])}delete(i){this._entries.delete(this.toKey(i))}*[Symbol.iterator](){for(const[i,n]of this._entries)for(const t of n)yield[i,t]}toKey(i){return _(i)}}e.VSDataTransfer=m;function _(s){return s.toLowerCase()}function v(s,i){return C(_(s),i.map(_))}e.matchesMimeType=v;function C(s,i){if(s==="*/*")return i.length>0;if(i.includes(s))return!0;const n=s.match(/^([a-z]+)\/([a-z]+|\*)$/i);if(!n)return!1;const[t,r,u]=n;return u==="*"?i.some(f=>f.startsWith(r+"/")):!1}e.UriList=Object.freeze({create:s=>(0,L.distinct)(s.map(i=>i.toString())).join(`\r -`),split:s=>s.split(`\r -`),parse:s=>e.UriList.split(s).filter(i=>!i.startsWith("#"))})}),define(te[264],ie([11]),{}),define(te[398],ie([11]),{}),define(te[399],ie([11]),{}),define(te[400],ie([11]),{}),define(te[401],ie([11]),{}),define(te[171],ie([1,0,400,401]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(te[402],ie([11]),{}),define(te[403],ie([11]),{}),define(te[265],ie([11]),{}),define(te[266],ie([11]),{}),define(te[404],ie([11]),{}),define(te[405],ie([11]),{}),define(te[406],ie([11]),{}),define(te[407],ie([11]),{}),define(te[267],ie([11]),{}),define(te[408],ie([11]),{}),define(te[198],ie([1,0,408]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME=void 0,e.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME="monaco-mouse-cursor-text"}),define(te[409],ie([11]),{}),define(te[410],ie([11]),{}),define(te[411],ie([11]),{}),define(te[412],ie([11]),{}),define(te[413],ie([11]),{}),define(te[414],ie([11]),{}),define(te[415],ie([11]),{}),define(te[416],ie([11]),{}),define(te[417],ie([11]),{}),define(te[418],ie([11]),{}),define(te[419],ie([11]),{}),define(te[420],ie([11]),{}),define(te[421],ie([11]),{}),define(te[422],ie([11]),{}),define(te[423],ie([11]),{}),define(te[424],ie([11]),{}),define(te[425],ie([11]),{}),define(te[426],ie([11]),{}),define(te[427],ie([11]),{}),define(te[428],ie([11]),{}),define(te[429],ie([11]),{}),define(te[430],ie([11]),{}),define(te[431],ie([11]),{}),define(te[432],ie([11]),{}),define(te[433],ie([11]),{}),define(te[434],ie([11]),{}),define(te[435],ie([11]),{}),define(te[436],ie([11]),{}),define(te[437],ie([11]),{}),define(te[438],ie([11]),{}),define(te[439],ie([11]),{}),define(te[440],ie([11]),{}),define(te[441],ie([11]),{}),define(te[442],ie([11]),{}),define(te[443],ie([11]),{}),define(te[199],ie([11]),{}),define(te[444],ie([11]),{}),define(te[445],ie([11]),{}),define(te[446],ie([11]),{}),define(te[447],ie([11]),{}),define(te[448],ie([11]),{}),define(te[449],ie([11]),{}),define(te[450],ie([11]),{}),define(te[451],ie([11]),{}),define(te[452],ie([11]),{}),define(te[453],ie([11]),{}),define(te[454],ie([11]),{}),define(te[455],ie([11]),{}),define(te[456],ie([11]),{}),define(te[457],ie([11]),{}),define(te[458],ie([11]),{}),define(te[459],ie([11]),{}),define(te[460],ie([11]),{}),define(te[461],ie([11]),{}),define(te[462],ie([11]),{}),define(te[463],ie([11]),{}),define(te[464],ie([11]),{}),define(te[465],ie([11]),{}),define(te[466],ie([11]),{}),define(te[467],ie([11]),{}),define(te[468],ie([11]),{}),define(te[469],ie([11]),{}),define(te[470],ie([11]),{}),define(te[471],ie([11]),{}),define(te[472],ie([11]),{}),define(te[473],ie([11]),{}),define(te[474],ie([11]),{}),define(te[475],ie([11]),{}),define(te[268],ie([11]),{}),define(te[476],ie([11]),{}),define(te[477],ie([11]),{}),define(te[172],ie([11]),{}),define(te[478],ie([11]),{}),define(te[70],ie([1,0,38]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyFontInfo=void 0;function I(y,D){y instanceof L.FastDomNode?(y.setFontFamily(D.getMassagedFontFamily()),y.setFontWeight(D.fontWeight),y.setFontSize(D.fontSize),y.setFontFeatureSettings(D.fontFeatureSettings),y.setFontVariationSettings(D.fontVariationSettings),y.setLineHeight(D.lineHeight),y.setLetterSpacing(D.letterSpacing)):(y.style.fontFamily=D.getMassagedFontFamily(),y.style.fontWeight=D.fontWeight,y.style.fontSize=D.fontSize+"px",y.style.fontFeatureSettings=D.fontFeatureSettings,y.style.fontVariationSettings=D.fontVariationSettings,y.style.lineHeight=D.lineHeight+"px",y.style.letterSpacing=D.letterSpacing+"px")}e.applyFontInfo=I}),define(te[479],ie([1,0,70]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readCharWidths=e.CharWidthRequest=void 0;class I{constructor(m,_){this.chr=m,this.type=_,this.width=0}fulfill(m){this.width=m}}e.CharWidthRequest=I;class y{constructor(m,_){this._bareFontInfo=m,this._requests=_,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const m=document.createElement("div");m.style.position="absolute",m.style.top="-50000px",m.style.width="50000px";const _=document.createElement("div");(0,L.applyFontInfo)(_,this._bareFontInfo),m.appendChild(_);const v=document.createElement("div");(0,L.applyFontInfo)(v,this._bareFontInfo),v.style.fontWeight="bold",m.appendChild(v);const C=document.createElement("div");(0,L.applyFontInfo)(C,this._bareFontInfo),C.style.fontStyle="italic",m.appendChild(C);const s=[];for(const i of this._requests){let n;i.type===0&&(n=_),i.type===2&&(n=v),i.type===1&&(n=C),n.appendChild(document.createElement("br"));const t=document.createElement("span");y._render(t,i),n.appendChild(t),s.push(t)}this._container=m,this._testElements=s}static _render(m,_){if(_.chr===" "){let v="\xA0";for(let C=0;C<8;C++)v+=v;m.innerText=v}else{let v=_.chr;for(let C=0;C<8;C++)v+=v;m.textContent=v}}_readFromDomElements(){for(let m=0,_=this._requests.length;m<_;m++){const v=this._requests[m],C=this._testElements[m];v.fulfill(C.offsetWidth/256)}}}function D(S,m){new y(S,m).read()}e.readCharWidths=D}),define(te[269],ie([1,0,2,6]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ElementSizeObserver=void 0;class y extends L.Disposable{constructor(S,m){super(),this._onDidChange=this._register(new I.Emitter),this.onDidChange=this._onDidChange.event,this._referenceDomElement=S,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,m)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){if(!this._resizeObserver&&this._referenceDomElement){let S=null;const m=()=>{S?this.observe({width:S.width,height:S.height}):this.observe()};let _=!1,v=!1;const C=()=>{if(_&&!v)try{_=!1,v=!0,m()}finally{requestAnimationFrame(()=>{v=!1,C()})}};this._resizeObserver=new ResizeObserver(s=>{S=s&&s[0]&&s[0].contentRect?s[0].contentRect:null,_=!0,C()}),this._resizeObserver.observe(this._referenceDomElement)}}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(S){this.measureReferenceDomElement(!0,S)}measureReferenceDomElement(S,m){let _=0,v=0;m?(_=m.width,v=m.height):this._referenceDomElement&&(_=this._referenceDomElement.clientWidth,v=this._referenceDomElement.clientHeight),_=Math.max(5,_),v=Math.max(5,v),(this._width!==_||this._height!==v)&&(this._width=_,this._height=v,S&&this._onDidChange.fire())}}e.ElementSizeObserver=y}),define(te[480],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.migrateOptions=e.EditorSettingMigration=void 0;class L{constructor(_,v){this.key=_,this.migrate=v}apply(_){const v=L._read(_,this.key),C=i=>L._read(_,i),s=(i,n)=>L._write(_,i,n);this.migrate(v,C,s)}static _read(_,v){if(typeof _>"u")return;const C=v.indexOf(".");if(C>=0){const s=v.substring(0,C);return this._read(_[s],v.substring(C+1))}return _[v]}static _write(_,v,C){const s=v.indexOf(".");if(s>=0){const i=v.substring(0,s);_[i]=_[i]||{},this._write(_[i],v.substring(s+1),C);return}_[v]=C}}e.EditorSettingMigration=L,L.items=[];function I(m,_){L.items.push(new L(m,_))}function y(m,_){I(m,(v,C,s)=>{if(typeof v<"u"){for(const[i,n]of _)if(v===i){s(m,n);return}}})}function D(m){L.items.forEach(_=>_.apply(m))}e.migrateOptions=D,y("wordWrap",[[!0,"on"],[!1,"off"]]),y("lineNumbers",[[!0,"on"],[!1,"off"]]),y("cursorBlinking",[["visible","solid"]]),y("renderWhitespace",[[!0,"boundary"],[!1,"none"]]),y("renderLineHighlight",[[!0,"line"],[!1,"none"]]),y("acceptSuggestionOnEnter",[[!0,"on"],[!1,"off"]]),y("tabCompletion",[[!1,"off"],[!0,"onlySnippets"]]),y("hover",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("parameterHints",[[!0,{enabled:!0}],[!1,{enabled:!1}]]),y("autoIndent",[[!1,"advanced"],[!0,"full"]]),y("matchBrackets",[[!0,"always"],[!1,"never"]]),y("renderFinalNewline",[[!0,"on"],[!1,"off"]]),y("cursorSmoothCaretAnimation",[[!0,"on"],[!1,"off"]]),I("autoClosingBrackets",(m,_,v)=>{m===!1&&(v("autoClosingBrackets","never"),typeof _("autoClosingQuotes")>"u"&&v("autoClosingQuotes","never"),typeof _("autoSurround")>"u"&&v("autoSurround","never"))}),I("renderIndentGuides",(m,_,v)=>{typeof m<"u"&&(v("renderIndentGuides",void 0),typeof _("guides.indentation")>"u"&&v("guides.indentation",!!m))}),I("highlightActiveIndentGuide",(m,_,v)=>{typeof m<"u"&&(v("highlightActiveIndentGuide",void 0),typeof _("guides.highlightActiveIndentation")>"u"&&v("guides.highlightActiveIndentation",!!m))});const S={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",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"};I("suggest.filteredTypes",(m,_,v)=>{if(m&&typeof m=="object"){for(const C of Object.entries(S))m[C[0]]===!1&&typeof _(`suggest.${C[1]}`)>"u"&&v(`suggest.${C[1]}`,!1);v("suggest.filteredTypes",void 0)}}),I("quickSuggestions",(m,_,v)=>{if(typeof m=="boolean"){const C=m?"on":"off";v("quickSuggestions",{comments:C,strings:C,other:C})}}),I("experimental.stickyScroll.enabled",(m,_,v)=>{typeof m=="boolean"&&(v("experimental.stickyScroll.enabled",void 0),typeof _("stickyScroll.enabled")>"u"&&v("stickyScroll.enabled",m))}),I("experimental.stickyScroll.maxLineCount",(m,_,v)=>{typeof m=="number"&&(v("experimental.stickyScroll.maxLineCount",void 0),typeof _("stickyScroll.maxLineCount")>"u"&&v("stickyScroll.maxLineCount",m))})}),define(te[200],ie([1,0,6]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TabFocus=void 0;class I{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new L.Emitter,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(D){this._tabFocus=D,this._onDidChangeTabFocus.fire(this._tabFocus)}}e.TabFocus=new I}),define(te[120],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StableEditorScrollState=void 0;class L{static capture(y){if(y.getScrollTop()===0||y.hasPendingScrollAnimation())return new L(y.getScrollTop(),y.getContentHeight(),null,0,null);let D=null,S=0;const m=y.getVisibleRanges();if(m.length>0){D=m[0].getStartPosition();const _=y.getTopForPosition(D.lineNumber,D.column);S=y.getScrollTop()-_}return new L(y.getScrollTop(),y.getContentHeight(),D,S,y.getPosition())}constructor(y,D,S,m,_){this._initialScrollTop=y,this._initialContentHeight=D,this._visiblePosition=S,this._visiblePositionScrollDelta=m,this._cursorPosition=_}restore(y){if(!(this._initialContentHeight===y.getContentHeight()&&this._initialScrollTop===y.getScrollTop())&&this._visiblePosition){const D=y.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);y.setScrollTop(D+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(y){if(this._initialContentHeight===y.getContentHeight()&&this._initialScrollTop===y.getScrollTop())return;const D=y.getPosition();if(!this._cursorPosition||!D)return;const S=y.getTopForLineNumber(D.lineNumber)-y.getTopForLineNumber(this._cursorPosition.lineNumber);y.setScrollTop(y.getScrollTop()+S)}}e.StableEditorScrollState=L}),define(te[142],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleRanges=e.HorizontalPosition=e.FloatHorizontalRange=e.HorizontalRange=e.LineVisibleRanges=e.RenderingContext=e.RestrictedRenderingContext=void 0;class L{constructor(C,s){this._restrictedRenderingContextBrand=void 0,this._viewLayout=C,this.viewportData=s,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(C){return C-this.scrollTop}getVerticalOffsetForLineNumber(C,s){return this._viewLayout.getVerticalOffsetForLineNumber(C,s)}getVerticalOffsetAfterLineNumber(C,s){return this._viewLayout.getVerticalOffsetAfterLineNumber(C,s)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}e.RestrictedRenderingContext=L;class I extends L{constructor(C,s,i){super(C,s),this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(C,s){return this._viewLines.linesVisibleRangesForRange(C,s)}visibleRangeForPosition(C){return this._viewLines.visibleRangeForPosition(C)}}e.RenderingContext=I;class y{constructor(C,s,i,n){this.outsideRenderedLine=C,this.lineNumber=s,this.ranges=i,this.continuesOnNextLine=n}}e.LineVisibleRanges=y;class D{static from(C){const s=new Array(C.length);for(let i=0,n=C.length;i=s.left?_.width=Math.max(_.width,s.left+s.width-_.left):(S[m++]=_,_=s)}return S[m++]=_,S}static _createHorizontalRangesFromClientRects(D,S,m){if(!D||D.length===0)return null;const _=[];for(let v=0,C=D.length;vi)return null;if(S=Math.min(i,Math.max(0,S)),_=Math.min(i,Math.max(0,_)),S===_&&m===v&&m===0&&!D.children[S].firstChild){const u=D.children[S].getClientRects();return C.markDidDomLayout(),this._createHorizontalRangesFromClientRects(u,C.clientRectDeltaLeft,C.clientRectScale)}S!==_&&_>0&&v===0&&(_--,v=1073741824);let n=D.children[S].firstChild,t=D.children[_].firstChild;if((!n||!t)&&(!n&&m===0&&S>0&&(n=D.children[S-1].firstChild,m=1073741824),!t&&v===0&&_>0&&(t=D.children[_-1].firstChild,v=1073741824)),!n||!t)return null;m=Math.min(n.textContent.length,Math.max(0,m)),v=Math.min(t.textContent.length,Math.max(0,v));const r=this._readClientRects(n,m,t,v,C.endNode);return C.markDidDomLayout(),this._createHorizontalRangesFromClientRects(r,C.clientRectDeltaLeft,C.clientRectScale)}}e.RangeUtil=I}),define(te[270],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCharIndex=e.allCharCodes=void 0,e.allCharCodes=(()=>{const I=[];for(let y=32;y<=126;y++)I.push(y);return I.push(65533),I})();const L=(I,y)=>(I-=32,I<0||I>96?y<=2?(I+96)%96:96-1:I);e.getCharIndex=L}),define(te[483],ie([1,0,270,168]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRenderer=void 0;class y{constructor(S,m){this.scale=m,this._minimapCharRendererBrand=void 0,this.charDataNormal=y.soften(S,12/15),this.charDataLight=y.soften(S,50/60)}static soften(S,m){const _=new Uint8ClampedArray(S.length);for(let v=0,C=S.length;vS.width||_+l>S.height){console.warn("bad render request outside image data");return}const o=r?this.charDataLight:this.charDataNormal,c=(0,L.getCharIndex)(v,t),a=S.width*4,g=i.r,h=i.g,p=i.b,b=C.r-g,w=C.g-h,E=C.b-p,k=Math.max(s,n),M=S.data;let R=c*f*d,B=_*a+m*4;for(let T=0;TS.width||_+u>S.height){console.warn("bad render request outside image data");return}const f=S.width*4,d=.5*(C/255),l=s.r,o=s.g,c=s.b,a=v.r-l,g=v.g-o,h=v.b-c,p=l+a*d,b=o+g*d,w=c+h*d,E=Math.max(C,i),k=S.data;let M=_*f+m*4;for(let R=0;R{const S=new Uint8ClampedArray(D.length/2);for(let m=0;m>1]=I[D[m]]<<4|I[D[m+1]]&15;return S};e.prebakedMiniMaps={1:(0,L.createSingleCallFunction)(()=>y("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:(0,L.createSingleCallFunction)(()=>y("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))}}),define(te[485],ie([1,0,483,270,484,168]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapCharRendererFactory=void 0;class S{static create(_,v){if(this.lastCreated&&_===this.lastCreated.scale&&v===this.lastFontFamily)return this.lastCreated;let C;return y.prebakedMiniMaps[_]?C=new L.MinimapCharRenderer(y.prebakedMiniMaps[_](),_):C=S.createFromSampleData(S.createSampleData(v).data,_),this.lastFontFamily=v,this.lastCreated=C,C}static createSampleData(_){const v=document.createElement("canvas"),C=v.getContext("2d");v.style.height="16px",v.height=16,v.width=96*10,v.style.width=96*10+"px",C.fillStyle="#ffffff",C.font=`bold 16px ${_}`,C.textBaseline="middle";let s=0;for(const i of I.allCharCodes)C.fillText(String.fromCharCode(i),s,16/2),s+=10;return C.getImageData(0,0,96*10,16)}static createFromSampleData(_,v){if(_.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");const s=S._downsample(_,v);return new L.MinimapCharRenderer(s,v)}static _downsampleChar(_,v,C,s,i){const n=1*i,t=2*i;let r=s,u=0;for(let f=0;f0){const u=255/r;for(let f=0;f=0&&S<256?this._asciiMap[S]=_:this._map.set(S,_)}get(S){return S>=0&&S<256?this._asciiMap[S]:this._map.get(S)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}e.CharacterClassifier=I;class y{constructor(){this._actual=new I(0)}add(S){this._actual.set(S,1)}has(S){return this._actual.get(S)===1}clear(){return this._actual.clear()}}e.CharacterSet=y}),define(te[80],ie([1,0,10]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorColumns=void 0;class I{static _nextVisibleColumn(D,S,m){return D===9?I.nextRenderTabStop(S,m):L.isFullWidthCharacter(D)||L.isEmojiImprecise(D)?S+2:S+1}static visibleColumnFromColumn(D,S,m){const _=Math.min(S-1,D.length),v=D.substring(0,_),C=new L.GraphemeIterator(v);let s=0;for(;!C.eol();){const i=L.getNextCodePoint(v,_,C.offset);C.nextGraphemeLength(),s=this._nextVisibleColumn(i,s,m)}return s}static columnFromVisibleColumn(D,S,m){if(S<=0)return 1;const _=D.length,v=new L.GraphemeIterator(D);let C=0,s=1;for(;!v.eol();){const i=L.getNextCodePoint(D,_,v.offset);v.nextGraphemeLength();const n=this._nextVisibleColumn(i,C,m),t=v.offset+1;if(n>=S){const r=S-C;return n-Sm))return new I(S,m)}static ofLength(S){return new I(0,S)}constructor(S,m){if(this.start=S,this.endExclusive=m,S>m)throw new L.BugIndicatingError(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(S){return new I(this.start+S,this.endExclusive+S)}deltaStart(S){return new I(this.start+S,this.endExclusive)}deltaEnd(S){return new I(this.start,this.endExclusive+S)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(S){return this.start===S.start&&this.endExclusive===S.endExclusive}containsRange(S){return this.start<=S.start&&S.endExclusive<=this.endExclusive}contains(S){return this.start<=S&&S=this.endExclusive?this.start+(S-this.start)%this.length:S}forEach(S){for(let m=this.start;mS.toString()).join(", ")}intersectsStrict(S){let m=0;for(;mS+m.length,0)}}e.OffsetRangeSet=y}),define(te[12],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Position=void 0;class L{constructor(y,D){this.lineNumber=y,this.column=D}with(y=this.lineNumber,D=this.column){return y===this.lineNumber&&D===this.column?this:new L(y,D)}delta(y=0,D=0){return this.with(this.lineNumber+y,this.column+D)}equals(y){return L.equals(this,y)}static equals(y,D){return!y&&!D?!0:!!y&&!!D&&y.lineNumber===D.lineNumber&&y.column===D.column}isBefore(y){return L.isBefore(this,y)}static isBefore(y,D){return y.lineNumberm||D===m&&S>_?(this.startLineNumber=m,this.startColumn=_,this.endLineNumber=D,this.endColumn=S):(this.startLineNumber=D,this.startColumn=S,this.endLineNumber=m,this.endColumn=_)}isEmpty(){return I.isEmpty(this)}static isEmpty(D){return D.startLineNumber===D.endLineNumber&&D.startColumn===D.endColumn}containsPosition(D){return I.containsPosition(this,D)}static containsPosition(D,S){return!(S.lineNumberD.endLineNumber||S.lineNumber===D.startLineNumber&&S.columnD.endColumn)}static strictContainsPosition(D,S){return!(S.lineNumberD.endLineNumber||S.lineNumber===D.startLineNumber&&S.column<=D.startColumn||S.lineNumber===D.endLineNumber&&S.column>=D.endColumn)}containsRange(D){return I.containsRange(this,D)}static containsRange(D,S){return!(S.startLineNumberD.endLineNumber||S.endLineNumber>D.endLineNumber||S.startLineNumber===D.startLineNumber&&S.startColumnD.endColumn)}strictContainsRange(D){return I.strictContainsRange(this,D)}static strictContainsRange(D,S){return!(S.startLineNumberD.endLineNumber||S.endLineNumber>D.endLineNumber||S.startLineNumber===D.startLineNumber&&S.startColumn<=D.startColumn||S.endLineNumber===D.endLineNumber&&S.endColumn>=D.endColumn)}plusRange(D){return I.plusRange(this,D)}static plusRange(D,S){let m,_,v,C;return S.startLineNumberD.endLineNumber?(v=S.endLineNumber,C=S.endColumn):S.endLineNumber===D.endLineNumber?(v=S.endLineNumber,C=Math.max(S.endColumn,D.endColumn)):(v=D.endLineNumber,C=D.endColumn),new I(m,_,v,C)}intersectRanges(D){return I.intersectRanges(this,D)}static intersectRanges(D,S){let m=D.startLineNumber,_=D.startColumn,v=D.endLineNumber,C=D.endColumn;const s=S.startLineNumber,i=S.startColumn,n=S.endLineNumber,t=S.endColumn;return mn?(v=n,C=t):v===n&&(C=Math.min(C,t)),m>v||m===v&&_>C?null:new I(m,_,v,C)}equalsRange(D){return I.equalsRange(this,D)}static equalsRange(D,S){return!D&&!S?!0:!!D&&!!S&&D.startLineNumber===S.startLineNumber&&D.startColumn===S.startColumn&&D.endLineNumber===S.endLineNumber&&D.endColumn===S.endColumn}getEndPosition(){return I.getEndPosition(this)}static getEndPosition(D){return new L.Position(D.endLineNumber,D.endColumn)}getStartPosition(){return I.getStartPosition(this)}static getStartPosition(D){return new L.Position(D.startLineNumber,D.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(D,S){return new I(this.startLineNumber,this.startColumn,D,S)}setStartPosition(D,S){return new I(D,S,this.endLineNumber,this.endColumn)}collapseToStart(){return I.collapseToStart(this)}static collapseToStart(D){return new I(D.startLineNumber,D.startColumn,D.startLineNumber,D.startColumn)}collapseToEnd(){return I.collapseToEnd(this)}static collapseToEnd(D){return new I(D.endLineNumber,D.endColumn,D.endLineNumber,D.endColumn)}delta(D){return new I(this.startLineNumber+D,this.startColumn,this.endLineNumber+D,this.endColumn)}static fromPositions(D,S=D){return new I(D.lineNumber,D.column,S.lineNumber,S.column)}static lift(D){return D?new I(D.startLineNumber,D.startColumn,D.endLineNumber,D.endColumn):null}static isIRange(D){return D&&typeof D.startLineNumber=="number"&&typeof D.startColumn=="number"&&typeof D.endLineNumber=="number"&&typeof D.endColumn=="number"}static areIntersectingOrTouching(D,S){return!(D.endLineNumberD.startLineNumber}toJSON(){return this}}e.Range=I}),define(te[273],ie([1,0,10,5]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedScreenReaderStrategy=e.TextAreaState=e._debugComposition=void 0,e._debugComposition=!1;class y{constructor(m,_,v,C,s){this.value=m,this.selectionStart=_,this.selectionEnd=v,this.selection=C,this.newlineCountBeforeSelection=s}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(m,_){const v=m.getValue(),C=m.getSelectionStart(),s=m.getSelectionEnd();let i;if(_){const n=v.substring(0,C),t=_.value.substring(0,_.selectionStart);n===t&&(i=_.newlineCountBeforeSelection)}return new y(v,C,s,null,i)}collapseSelection(){return this.selectionStart===this.value.length?this:new y(this.value,this.value.length,this.value.length,null,void 0)}writeToTextArea(m,_,v){e._debugComposition&&console.log(`writeToTextArea ${m}: ${this.toString()}`),_.setValue(m,this.value),v&&_.setSelectionRange(m,this.selectionStart,this.selectionEnd)}deduceEditorPosition(m){var _,v,C,s,i,n,t,r;if(m<=this.selectionStart){const d=this.value.substring(m,this.selectionStart);return this._finishDeduceEditorPosition((v=(_=this.selection)===null||_===void 0?void 0:_.getStartPosition())!==null&&v!==void 0?v:null,d,-1)}if(m>=this.selectionEnd){const d=this.value.substring(this.selectionEnd,m);return this._finishDeduceEditorPosition((s=(C=this.selection)===null||C===void 0?void 0:C.getEndPosition())!==null&&s!==void 0?s:null,d,1)}const u=this.value.substring(this.selectionStart,m);if(u.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition((n=(i=this.selection)===null||i===void 0?void 0:i.getStartPosition())!==null&&n!==void 0?n:null,u,1);const f=this.value.substring(m,this.selectionEnd);return this._finishDeduceEditorPosition((r=(t=this.selection)===null||t===void 0?void 0:t.getEndPosition())!==null&&r!==void 0?r:null,f,-1)}_finishDeduceEditorPosition(m,_,v){let C=0,s=-1;for(;(s=_.indexOf(` -`,s+1))!==-1;)C++;return[m,v*_.length,C]}static deduceInput(m,_,v){if(!m)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};e._debugComposition&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${m.toString()}`),console.log(`CURRENT STATE: ${_.toString()}`));const C=Math.min(L.commonPrefixLength(m.value,_.value),m.selectionStart,_.selectionStart),s=Math.min(L.commonSuffixLength(m.value,_.value),m.value.length-m.selectionEnd,_.value.length-_.selectionEnd),i=m.value.substring(C,m.value.length-s),n=_.value.substring(C,_.value.length-s),t=m.selectionStart-C,r=m.selectionEnd-C,u=_.selectionStart-C,f=_.selectionEnd-C;if(e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${i}>, selectionStart: ${t}, selectionEnd: ${r}`),console.log(`AFTER DIFFING CURRENT STATE: <${n}>, selectionStart: ${u}, selectionEnd: ${f}`)),u===f){const l=m.selectionStart-C;return e._debugComposition&&console.log(`REMOVE PREVIOUS: ${l} chars`),{text:n,replacePrevCharCnt:l,replaceNextCharCnt:0,positionDelta:0}}const d=r-t;return{text:n,replacePrevCharCnt:d,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(m,_){if(!m)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(e._debugComposition&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${m.toString()}`),console.log(`CURRENT STATE: ${_.toString()}`)),m.value===_.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:_.selectionEnd-m.selectionEnd};const v=Math.min(L.commonPrefixLength(m.value,_.value),m.selectionEnd),C=Math.min(L.commonSuffixLength(m.value,_.value),m.value.length-m.selectionEnd),s=m.value.substring(v,m.value.length-C),i=_.value.substring(v,_.value.length-C),n=m.selectionStart-v,t=m.selectionEnd-v,r=_.selectionStart-v,u=_.selectionEnd-v;return e._debugComposition&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${s}>, selectionStart: ${n}, selectionEnd: ${t}`),console.log(`AFTER DIFFING CURRENT STATE: <${i}>, selectionStart: ${r}, selectionEnd: ${u}`)),{text:i,replacePrevCharCnt:t,replaceNextCharCnt:s.length-t,positionDelta:u-i.length}}}e.TextAreaState=y,y.EMPTY=new y("",0,0,null,void 0);class D{static _getPageOfLine(m,_){return Math.floor((m-1)/_)}static _getRangeForPage(m,_){const v=m*_,C=v+1,s=v+_;return new I.Range(C,1,s+1,1)}static fromEditorSelection(m,_,v,C){const i=D._getPageOfLine(_.startLineNumber,v),n=D._getRangeForPage(i,v),t=D._getPageOfLine(_.endLineNumber,v),r=D._getRangeForPage(t,v);let u=n.intersectRanges(new I.Range(1,1,_.startLineNumber,_.startColumn));if(C&&m.getValueLengthInRange(u,1)>500){const g=m.modifyPosition(u.getEndPosition(),-500);u=I.Range.fromPositions(g,u.getEndPosition())}const f=m.getValueInRange(u,1),d=m.getLineCount(),l=m.getLineMaxColumn(d);let o=r.intersectRanges(new I.Range(_.endLineNumber,_.endColumn,d,l));if(C&&m.getValueLengthInRange(o,1)>500){const g=m.modifyPosition(o.getStartPosition(),500);o=I.Range.fromPositions(o.getStartPosition(),g)}const c=m.getValueInRange(o,1);let a;if(i===t||i+1===t)a=m.getValueInRange(_,1);else{const g=n.intersectRanges(_),h=r.intersectRanges(_);a=m.getValueInRange(g,1)+String.fromCharCode(8230)+m.getValueInRange(h,1)}return C&&a.length>2*500&&(a=a.substring(0,500)+String.fromCharCode(8230)+a.substring(a.length-500,a.length)),new y(f+a+c,f.length,f.length+a.length,_,u.endLineNumber-u.startLineNumber)}}e.PagedScreenReaderStrategy=D}),define(te[487],ie([1,0,13,19,9,43,12,5]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class _{remove(){var n;(n=this.parent)===null||n===void 0||n.children.delete(this.id)}static findId(n,t){let r;typeof n=="string"?r=`${t.id}/${n}`:(r=`${t.id}/${n.name}`,t.children.get(r)!==void 0&&(r=`${t.id}/${n.name}_${n.range.startLineNumber}_${n.range.startColumn}`));let u=r;for(let f=0;t.children.get(u)!==void 0;f++)u=`${r}_${f}`;return u}static empty(n){return n.children.size===0}}e.TreeElement=_;class v extends _{constructor(n,t,r){super(),this.id=n,this.parent=t,this.symbol=r,this.children=new Map}}e.OutlineElement=v;class C extends _{constructor(n,t,r,u){super(),this.id=n,this.parent=t,this.label=r,this.order=u,this.children=new Map}}e.OutlineGroup=C;class s extends _{static create(n,t,r){const u=new I.CancellationTokenSource(r),f=new s(t.uri),d=n.ordered(t),l=d.map((c,a)=>{var g;const h=_.findId(`provider_${a}`,f),p=new C(h,f,(g=c.displayName)!==null&&g!==void 0?g:"Unknown Outline Provider",a);return Promise.resolve(c.provideDocumentSymbols(t,u.token)).then(b=>{for(const w of b||[])s._makeOutlineElement(w,p);return p},b=>((0,y.onUnexpectedExternalError)(b),p)).then(b=>{_.empty(b)?b.remove():f._groups.set(h,b)})}),o=n.onDidChange(()=>{const c=n.ordered(t);(0,L.equals)(c,d)||u.cancel()});return Promise.all(l).then(()=>u.token.isCancellationRequested&&!r.isCancellationRequested?s.create(n,t,r):f._compact()).finally(()=>{u.dispose(),o.dispose()})}static _makeOutlineElement(n,t){const r=_.findId(n,t),u=new v(r,t,n);if(n.children)for(const f of n.children)s._makeOutlineElement(f,u);t.children.set(u.id,u)}constructor(n){super(),this.uri=n,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let n=0;for(const[t,r]of this._groups)r.children.size===0?this._groups.delete(t):n+=1;if(n!==1)this.children=this._groups;else{const t=D.Iterable.first(this._groups.values());for(const[,r]of t.children)r.parent=this,this.children.set(r.id,r)}return this}getTopLevelSymbols(){const n=[];for(const t of this.children.values())t instanceof v?n.push(t.symbol):n.push(...D.Iterable.map(t.children.values(),r=>r.symbol));return n.sort((t,r)=>m.Range.compareRangesUsingStarts(t.range,r.range))}asListOfDocumentSymbols(){const n=this.getTopLevelSymbols(),t=[];return s._flattenDocumentSymbols(t,n,""),t.sort((r,u)=>S.Position.compare(m.Range.getStartPosition(r.range),m.Range.getStartPosition(u.range))||S.Position.compare(m.Range.getEndPosition(u.range),m.Range.getEndPosition(r.range)))}static _flattenDocumentSymbols(n,t,r){for(const u of t)n.push({kind:u.kind,tags:u.tags,name:u.name,detail:u.detail,containerName:u.containerName||r,range:u.range,selectionRange:u.selectionRange,children:void 0}),u.children&&s._flattenDocumentSymbols(n,u.children,u.name)}}e.OutlineModel=s}),define(te[71],ie([1,0,5]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditOperation=void 0;class I{static insert(D,S){return{range:new L.Range(D.lineNumber,D.column,D.lineNumber,D.column),text:S,forceMoveMarkers:!0}}static delete(D){return{range:D,text:null}}static replace(D,S){return{range:D,text:S}}static replaceMove(D,S){return{range:D,text:S,forceMoveMarkers:!0}}}e.EditOperation=I}),define(te[488],ie([1,0,10,71,5]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.trimTrailingWhitespace=e.TrimTrailingWhitespaceCommand=void 0;class D{constructor(_,v){this._selection=_,this._cursors=v,this._selectionId=null}getEditOperations(_,v){const C=S(_,this._cursors);for(let s=0,i=C.length;sn.lineNumber===t.lineNumber?n.column-t.column:n.lineNumber-t.lineNumber);for(let n=_.length-2;n>=0;n--)_[n].lineNumber===_[n+1].lineNumber&&_.splice(n,1);const v=[];let C=0,s=0;const i=_.length;for(let n=1,t=m.getLineCount();n<=t;n++){const r=m.getLineContent(n),u=r.length+1;let f=0;if(sC)throw new L.BugIndicatingError(`startLineNumber ${v} cannot be after endLineNumberExclusive ${C}`);this.startLineNumber=v,this.endLineNumberExclusive=C}contains(v){return this.startLineNumber<=v&&vi.endLineNumberExclusive>=v.startLineNumber),s=(0,D.findLastIdxMonotonous)(this._normalizedRanges,i=>i.startLineNumber<=v.endLineNumberExclusive)+1;if(C===s)this._normalizedRanges.splice(C,0,v);else if(C===s-1){const i=this._normalizedRanges[C];this._normalizedRanges[C]=i.join(v)}else{const i=this._normalizedRanges[C].join(this._normalizedRanges[s-1]).join(v);this._normalizedRanges.splice(C,s-C,i)}}contains(v){const C=(0,D.findLastMonotonous)(this._normalizedRanges,s=>s.startLineNumber<=v);return!!C&&C.endLineNumberExclusive>v}getUnion(v){if(this._normalizedRanges.length===0)return v;if(v._normalizedRanges.length===0)return this;const C=[];let s=0,i=0,n=null;for(;s=t.startLineNumber?n=new S(n.startLineNumber,Math.max(n.endLineNumberExclusive,t.endLineNumberExclusive)):(C.push(n),n=t)}return n!==null&&C.push(n),new m(C)}subtractFrom(v){const C=(0,D.findFirstIdxMonotonousOrArrLen)(this._normalizedRanges,t=>t.endLineNumberExclusive>=v.startLineNumber),s=(0,D.findLastIdxMonotonous)(this._normalizedRanges,t=>t.startLineNumber<=v.endLineNumberExclusive)+1;if(C===s)return new m([v]);const i=[];let n=v.startLineNumber;for(let t=C;tn&&i.push(new S(n,r.startLineNumber)),n=r.endLineNumberExclusive}return nv.toString()).join(", ")}getIntersection(v){const C=[];let s=0,i=0;for(;sC.delta(v)))}}e.LineRangeSet=m}),define(te[274],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RGBA8=void 0;class L{constructor(y,D,S,m){this._rgba8Brand=void 0,this.r=L._clamp(y),this.g=L._clamp(D),this.b=L._clamp(S),this.a=L._clamp(m)}equals(y){return this.r===y.r&&this.g===y.g&&this.b===y.b&&this.a===y.a}static _clamp(y){return y<0?0:y>255?255:y|0}}e.RGBA8=L,L.Empty=new L(0,0,0,0)}),define(te[24],ie([1,0,12,5]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Selection=void 0;class y extends I.Range{constructor(S,m,_,v){super(S,m,_,v),this.selectionStartLineNumber=S,this.selectionStartColumn=m,this.positionLineNumber=_,this.positionColumn=v}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(S){return y.selectionsEqual(this,S)}static selectionsEqual(S,m){return S.selectionStartLineNumber===m.selectionStartLineNumber&&S.selectionStartColumn===m.selectionStartColumn&&S.positionLineNumber===m.positionLineNumber&&S.positionColumn===m.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(S,m){return this.getDirection()===0?new y(this.startLineNumber,this.startColumn,S,m):new y(S,m,this.startLineNumber,this.startColumn)}getPosition(){return new L.Position(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new L.Position(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(S,m){return this.getDirection()===0?new y(S,m,this.endLineNumber,this.endColumn):new y(this.endLineNumber,this.endColumn,S,m)}static fromPositions(S,m=S){return new y(S.lineNumber,S.column,m.lineNumber,m.column)}static fromRange(S,m){return m===0?new y(S.startLineNumber,S.startColumn,S.endLineNumber,S.endColumn):new y(S.endLineNumber,S.endColumn,S.startLineNumber,S.startColumn)}static liftSelection(S){return new y(S.selectionStartLineNumber,S.selectionStartColumn,S.positionLineNumber,S.positionColumn)}static selectionsArrEqual(S,m){if(S&&!m||!S&&m)return!1;if(!S&&!m)return!0;if(S.length!==m.length)return!1;for(let _=0,v=S.length;_(S.hasOwnProperty(m)||(S[m]=D(m)),S[m])}e.getMapForWordSeparators=y(D=>new I(D))}),define(te[145],ie([1,0,43,63]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWordAtText=e.ensureValidWordDefinition=e.DEFAULT_WORD_REGEXP=e.USUAL_WORD_SEPARATORS=void 0,e.USUAL_WORD_SEPARATORS="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function y(v=""){let C="(-?\\d*\\.\\d\\w*)|([^";for(const s of e.USUAL_WORD_SEPARATORS)v.indexOf(s)>=0||(C+="\\"+s);return C+="\\s]+)",new RegExp(C,"g")}e.DEFAULT_WORD_REGEXP=y();function D(v){let C=e.DEFAULT_WORD_REGEXP;if(v&&v instanceof RegExp)if(v.global)C=v;else{let s="g";v.ignoreCase&&(s+="i"),v.multiline&&(s+="m"),v.unicode&&(s+="u"),C=new RegExp(v.source,s)}return C.lastIndex=0,C}e.ensureValidWordDefinition=D;const S=new I.LinkedList;S.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function m(v,C,s,i,n){if(n||(n=L.Iterable.first(S)),s.length>n.maxLen){let d=v-n.maxLen/2;return d<0?d=0:i+=d,s=s.substring(d,v+n.maxLen/2),m(v,C,s,i,n)}const t=Date.now(),r=v-1-i;let u=-1,f=null;for(let d=1;!(Date.now()-t>=n.timeBudget);d++){const l=r-n.windowSize*d;C.lastIndex=Math.max(0,l);const o=_(C,s,r,u);if(!o&&f||(f=o,l<=0))break;u=l}if(f){const d={word:f[0],startColumn:i+1+f.index,endColumn:i+1+f.index+f[0].length};return C.lastIndex=0,d}return null}e.getWordAtText=m;function _(v,C,s,i){let n;for(;n=v.exec(C);){const t=n.index||0;if(t<=s&&v.lastIndex>=s)return n;if(i>0&&t>i)return null}return null}}),define(te[275],ie([1,0,80]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AtomicTabMoveOperations=void 0;class I{static whitespaceVisibleColumn(D,S,m){const _=D.length;let v=0,C=-1,s=-1;for(let i=0;i<_;i++){if(i===S)return[C,s,v];switch(v%m===0&&(C=i,s=v),D.charCodeAt(i)){case 32:v+=1;break;case 9:v=L.CursorColumns.nextRenderTabStop(v,m);break;default:return[-1,-1,-1]}}return S===_?[C,s,v]:[-1,-1,-1]}static atomicPosition(D,S,m,_){const v=D.length,[C,s,i]=I.whitespaceVisibleColumn(D,S,m);if(i===-1)return-1;let n;switch(_){case 0:n=!0;break;case 1:n=!1;break;case 2:if(i%m===0)return S;n=i%m<=m/2;break}if(n){if(C===-1)return-1;let u=s;for(let f=C;f{n.push(S.fromOffsetPairs(t?t.getEndExclusives():m.zero,r?r.getStarts():new m(i,(t?t.seq2Range.endExclusive-t.seq1Range.endExclusive:0)+i)))}),n}static fromOffsetPairs(s,i){return new S(new y.OffsetRange(s.offset1,i.offset1),new y.OffsetRange(s.offset2,i.offset2))}constructor(s,i){this.seq1Range=s,this.seq2Range=i}swap(){return new S(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(s){return new S(this.seq1Range.join(s.seq1Range),this.seq2Range.join(s.seq2Range))}delta(s){return s===0?this:new S(this.seq1Range.delta(s),this.seq2Range.delta(s))}deltaStart(s){return s===0?this:new S(this.seq1Range.deltaStart(s),this.seq2Range.deltaStart(s))}deltaEnd(s){return s===0?this:new S(this.seq1Range.deltaEnd(s),this.seq2Range.deltaEnd(s))}intersect(s){const i=this.seq1Range.intersect(s.seq1Range),n=this.seq2Range.intersect(s.seq2Range);if(!(!i||!n))return new S(i,n)}getStarts(){return new m(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new m(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}e.SequenceDiff=S;class m{constructor(s,i){this.offset1=s,this.offset2=i}toString(){return`${this.offset1} <-> ${this.offset2}`}}e.OffsetPair=m,m.zero=new m(0,0),m.max=new m(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER);class _{isValid(){return!0}}e.InfiniteTimeout=_,_.instance=new _;class v{constructor(s){if(this.timeout=s,this.startTime=Date.now(),this.valid=!0,s<=0)throw new I.BugIndicatingError("timeout must be positive")}isValid(){if(!(Date.now()-this.startTimei.length||k>n.length)continue;const M=t(E,k);u.set(d,M);const R=E===b?f.get(d+1):f.get(d-1);if(f.set(d,M!==E?new D(R,E,k,M-E):R),u.get(d)===i.length&&u.get(d)-d===n.length)break e}}let l=f.get(d);const o=[];let c=i.length,a=n.length;for(;;){const g=l?l.x+l.length:0,h=l?l.y+l.length:0;if((g!==c||h!==a)&&o.push(new I.SequenceDiff(new L.OffsetRange(g,c),new L.OffsetRange(h,a))),!l)break;c=l.x,a=l.y,l=l.prev}return o.reverse(),new I.DiffAlgorithmResult(o,!1)}}e.MyersDiffAlgorithm=y;class D{constructor(v,C,s,i){this.prev=v,this.x=C,this.y=s,this.length=i}}class S{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(v){return v<0?(v=-v-1,this.negativeArr[v]):this.positiveArr[v]}set(v,C){if(v<0){if(v=-v-1,v>=this.negativeArr.length){const s=this.negativeArr;this.negativeArr=new Int32Array(s.length*2),this.negativeArr.set(s)}this.negativeArr[v]=C}else{if(v>=this.positiveArr.length){const s=this.positiveArr;this.positiveArr=new Int32Array(s.length*2),this.positiveArr.set(s)}this.positiveArr[v]=C}}}class m{constructor(){this.positiveArr=[],this.negativeArr=[]}get(v){return v<0?(v=-v-1,this.negativeArr[v]):this.positiveArr[v]}set(v,C){v<0?(v=-v-1,this.negativeArr[v]=C):this.positiveArr[v]=C}}}),define(te[277],ie([1,0,13,81,146]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.removeVeryShortMatchingTextBetweenLongDiffs=e.removeVeryShortMatchingLinesBetweenDiffs=e.extendDiffsToEntireWordIfAppropriate=e.removeShortMatches=e.optimizeSequenceDiffs=void 0;function D(t,r,u){let f=u;return f=S(t,r,f),f=m(t,r,f),f}e.optimizeSequenceDiffs=D;function S(t,r,u){if(u.length===0)return u;const f=[];f.push(u[0]);for(let l=1;l0&&(c=c.delta(g))}d.push(c)}return f.length>0&&d.push(f[f.length-1]),d}function m(t,r,u){if(!t.getBoundaryScore||!r.getBoundaryScore)return u;for(let f=0;f0?u[f-1]:void 0,l=u[f],o=f+1=f.start&&t.seq2Range.start-o>=d.start&&u.isStronglyEqual(t.seq2Range.start-o,t.seq2Range.endExclusive-o)&&o<100;)o++;o--;let c=0;for(;t.seq1Range.start+cg&&(g=E,a=h)}return t.delta(a)}function v(t,r,u){const f=[];for(const d of u){const l=f[f.length-1];if(!l){f.push(d);continue}d.seq1Range.start-l.seq1Range.endExclusive<=2||d.seq2Range.start-l.seq2Range.endExclusive<=2?f[f.length-1]=new y.SequenceDiff(l.seq1Range.join(d.seq1Range),l.seq2Range.join(d.seq2Range)):f.push(d)}return f}e.removeShortMatches=v;function C(t,r,u){const f=[];let d;function l(){if(!d)return;const c=d.s1Range.length-d.deleted,a=d.s2Range.length-d.added;Math.max(d.deleted,d.added)+(d.count-1)>c&&f.push(new y.SequenceDiff(d.s1Range,d.s2Range)),d=void 0}for(const c of u){let a=function(w,E){var k,M,R,B;if(!d||!d.s1Range.containsRange(w)||!d.s2Range.containsRange(E))if(d&&!(d.s1Range.endExclusive0||r.length>0;){const f=t[0],d=r[0];let l;f&&(!d||f.seq1Range.start0&&u[u.length-1].seq1Range.endExclusive>=l.seq1Range.start?u[u.length-1]=u[u.length-1].join(l):u.push(l)}return u}function i(t,r,u){let f=u;if(f.length===0)return f;let d=0,l;do{l=!1;const o=[f[0]];for(let c=1;c5||w.seq1Range.length+w.seq2Range.length>5)};const a=f[c],g=o[o.length-1];h(g,a)?(l=!0,o[o.length-1]=o[o.length-1].join(a)):o.push(a)}f=o}while(d++<10&&l);return f}e.removeVeryShortMatchingLinesBetweenDiffs=i;function n(t,r,u){let f=u;if(f.length===0)return f;let d=0,l;do{l=!1;const c=[f[0]];for(let a=1;a5||k.length>500)return!1;const R=t.getText(k).trim();if(R.length>20||R.split(/\r\n|\r|\n/).length>1)return!1;const B=t.countLinesIn(w.seq1Range),T=w.seq1Range.length,N=r.countLinesIn(w.seq2Range),A=w.seq2Range.length,P=t.countLinesIn(E.seq1Range),O=E.seq1Range.length,x=r.countLinesIn(E.seq2Range),W=E.seq2Range.length,U=2*40+50;function F(G){return Math.min(G,U)}return Math.pow(Math.pow(F(B*40+T),1.5)+Math.pow(F(N*40+A),1.5),1.5)+Math.pow(Math.pow(F(P*40+O),1.5)+Math.pow(F(x*40+W),1.5),1.5)>Math.pow(Math.pow(U,1.5),1.5)*1.3};const g=f[a],h=c[c.length-1];p(h,g)?(l=!0,c[c.length-1]=c[c.length-1].join(g)):c.push(g)}f=c}while(d++<10&&l);const o=[];return(0,L.forEachWithNeighbors)(f,(c,a,g)=>{let h=a;function p(R){return R.length>0&&R.trim().length<=3&&a.seq1Range.length+a.seq2Range.length>100}const b=t.extendToFullLines(a.seq1Range),w=t.getText(new I.OffsetRange(b.start,a.seq1Range.start));p(w)&&(h=h.deltaStart(-w.length));const E=t.getText(new I.OffsetRange(a.seq1Range.endExclusive,b.endExclusive));p(E)&&(h=h.deltaEnd(E.length));const k=y.SequenceDiff.fromOffsetPairs(c?c.getEndExclusives():y.OffsetPair.zero,g?g.getStarts():y.OffsetPair.max),M=h.intersect(k);o.push(M)}),o}e.removeVeryShortMatchingTextBetweenLongDiffs=n}),define(te[491],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineSequence=void 0;class L{constructor(D,S){this.trimmedHash=D,this.lines=S}getElement(D){return this.trimmedHash[D]}get length(){return this.trimmedHash.length}getBoundaryScore(D){const S=D===0?0:I(this.lines[D-1]),m=D===this.lines.length?0:I(this.lines[D]);return 1e3-(S+m)}getText(D){return this.lines.slice(D.start,D.endExclusive).join(` -`)}isStronglyEqual(D,S){return this.lines[D]===this.lines[S]}}e.LineSequence=L;function I(y){let D=0;for(;D0&&c>0&&i.get(o-1,c-1)===3&&(h+=n.get(o-1,c-1)),h+=C?C(o,c):1):h=-1;const p=Math.max(a,g,h);if(p===h){const b=o>0&&c>0?n.get(o-1,c-1):0;n.set(o,c,b+1),i.set(o,c,3)}else p===a?(n.set(o,c,0),i.set(o,c,1)):p===g&&(n.set(o,c,0),i.set(o,c,2));s.set(o,c,p)}const t=[];let r=m.length,u=_.length;function f(o,c){(o+1!==r||c+1!==u)&&t.push(new I.SequenceDiff(new L.OffsetRange(o+1,r),new L.OffsetRange(c+1,u))),r=o,u=c}let d=m.length-1,l=_.length-1;for(;d>=0&&l>=0;)i.get(d,l)===3?(f(d,l),d--,l--):i.get(d,l)===1?d--:l--;return f(-1,-1),t.reverse(),new I.DiffAlgorithmResult(t,!1)}}e.DynamicProgrammingDiffing=D}),define(te[278],ie([1,0,68,81,12,5,202]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesSliceCharSequence=void 0;class m{constructor(n,t,r){this.lines=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstCharOffsetByLine=[],this.additionalOffsetByLine=[];let u=!1;t.start>0&&t.endExclusive>=n.length&&(t=new I.OffsetRange(t.start-1,t.endExclusive),u=!0),this.lineRange=t,this.firstCharOffsetByLine[0]=0;for(let f=this.lineRange.start;fString.fromCharCode(t)).join("")}getElement(n){return this.elements[n]}get length(){return this.elements.length}getBoundaryScore(n){const t=s(n>0?this.elements[n-1]:-1),r=s(nr<=n);return new y.Position(this.lineRange.start+t+1,n-this.firstCharOffsetByLine[t]+this.additionalOffsetByLine[t]+1)}translateRange(n){return D.Range.fromPositions(this.translateOffset(n.start),this.translateOffset(n.endExclusive))}findWordContaining(n){if(n<0||n>=this.elements.length||!_(this.elements[n]))return;let t=n;for(;t>0&&_(this.elements[t-1]);)t--;let r=n;for(;rd<=n.start))!==null&&t!==void 0?t:0,f=(r=(0,L.findFirstMonotonous)(this.firstCharOffsetByLine,d=>n.endExclusive<=d))!==null&&r!==void 0?r:this.elements.length;return new I.OffsetRange(u,f)}}e.LinesSliceCharSequence=m;function _(i){return i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57}const v={[0]:0,[1]:0,[2]:0,[3]:10,[4]:2,[5]:3,[6]:10,[7]:10};function C(i){return v[i]}function s(i){return i===10?7:i===13?6:(0,S.isSpace)(i)?5:i>=97&&i<=122?0:i>=65&&i<=90?1:i>=48&&i<=57?2:i===-1?3:4}}),define(te[203],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MovedText=e.LinesDiff=void 0;class L{constructor(D,S,m){this.changes=D,this.moves=S,this.hitTimeout=m}}e.LinesDiff=L;class I{constructor(D,S){this.lineRangeMapping=D,this.changes=S}}e.MovedText=I}),define(te[108],ie([1,0,64]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RangeMapping=e.DetailedLineRangeMapping=e.LineRangeMapping=void 0;class I{static inverse(m,_,v){const C=[];let s=1,i=1;for(const t of m){const r=new y(new L.LineRange(s,t.original.startLineNumber),new L.LineRange(i,t.modified.startLineNumber),void 0);r.modified.isEmpty||C.push(r),s=t.original.endLineNumberExclusive,i=t.modified.endLineNumberExclusive}const n=new y(new L.LineRange(s,_+1),new L.LineRange(i,v+1),void 0);return n.modified.isEmpty||C.push(n),C}constructor(m,_){this.original=m,this.modified=_}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new I(this.modified,this.original)}join(m){return new I(this.original.join(m.original),this.modified.join(m.modified))}}e.LineRangeMapping=I;class y extends I{constructor(m,_,v){super(m,_),this.innerChanges=v}flip(){var m;return new y(this.modified,this.original,(m=this.innerChanges)===null||m===void 0?void 0:m.map(_=>_.flip()))}}e.DetailedLineRangeMapping=y;class D{constructor(m,_){this.originalRange=m,this.modifiedRange=_}toString(){return`{${this.originalRange.toString()}->${this.modifiedRange.toString()}}`}flip(){return new D(this.modifiedRange,this.originalRange)}}e.RangeMapping=D}),define(te[493],ie([1,0,146,108,13,68,56,64,81,278,202,276]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeMovedLines=void 0;function i(d,l,o,c,a,g){let{moves:h,excludedChanges:p}=n(d,l,o,g);if(!g.isValid())return[];const b=d.filter(E=>!p.has(E)),w=t(b,c,a,l,o,g);return(0,y.pushMany)(h,w),h=u(h),h=h.filter(E=>E.original.toOffsetRange().slice(l).map(M=>M.trim()).join(` -`).length>=10),h=f(d,h),h}e.computeMovedLines=i;function n(d,l,o,c){const a=[],g=d.filter(b=>b.modified.isEmpty&&b.original.length>=3).map(b=>new C.LineRangeFragment(b.original,l,b)),h=new Set(d.filter(b=>b.original.isEmpty&&b.modified.length>=3).map(b=>new C.LineRangeFragment(b.modified,o,b))),p=new Set;for(const b of g){let w=-1,E;for(const k of h){const M=b.computeSimilarity(k);M>w&&(w=M,E=k)}if(w>.9&&E&&(h.delete(E),a.push(new I.LineRangeMapping(b.range,E.range)),p.add(b.source),p.add(E.source)),!c.isValid())return{moves:a,excludedChanges:p}}return{moves:a,excludedChanges:p}}function t(d,l,o,c,a,g){const h=[],p=new S.SetMap;for(const M of d)for(let R=M.original.startLineNumber;RM.modified.startLineNumber,y.numberComparator));for(const M of d){let R=[];for(let B=M.modified.startLineNumber;B{for(const x of R)if(x.originalLineRange.endLineNumberExclusive+1===P.endLineNumberExclusive&&x.modifiedLineRange.endLineNumberExclusive+1===N.endLineNumberExclusive){x.originalLineRange=new m.LineRange(x.originalLineRange.startLineNumber,P.endLineNumberExclusive),x.modifiedLineRange=new m.LineRange(x.modifiedLineRange.startLineNumber,N.endLineNumberExclusive),A.push(x);return}const O={modifiedLineRange:N,originalLineRange:P};b.push(O),A.push(O)}),R=A}if(!g.isValid())return[]}b.sort((0,y.reverseOrder)((0,y.compareBy)(M=>M.modifiedLineRange.length,y.numberComparator)));const w=new m.LineRangeSet,E=new m.LineRangeSet;for(const M of b){const R=M.modifiedLineRange.startLineNumber-M.originalLineRange.startLineNumber,B=w.subtractFrom(M.modifiedLineRange),T=E.subtractFrom(M.originalLineRange).getWithDelta(R),N=B.getIntersection(T);for(const A of N.ranges){if(A.length<3)continue;const P=A,O=A.delta(-R);h.push(new I.LineRangeMapping(O,P)),w.addRange(P),E.addRange(O)}}h.sort((0,y.compareBy)(M=>M.original.startLineNumber,y.numberComparator));const k=new D.MonotonousArray(d);for(let M=0;MU.original.startLineNumber<=R.original.startLineNumber),T=(0,D.findLastMonotonous)(d,U=>U.modified.startLineNumber<=R.modified.startLineNumber),N=Math.max(R.original.startLineNumber-B.original.startLineNumber,R.modified.startLineNumber-T.modified.startLineNumber),A=k.findLastMonotonous(U=>U.original.startLineNumberU.modified.startLineNumberc.length||F>a.length||w.contains(F)||E.contains(U)||!r(c[U-1],a[F-1],g))break}x>0&&(E.addRange(new m.LineRange(R.original.startLineNumber-x,R.original.startLineNumber)),w.addRange(new m.LineRange(R.modified.startLineNumber-x,R.modified.startLineNumber)));let W;for(W=0;Wc.length||F>a.length||w.contains(F)||E.contains(U)||!r(c[U-1],a[F-1],g))break}W>0&&(E.addRange(new m.LineRange(R.original.endLineNumberExclusive,R.original.endLineNumberExclusive+W)),w.addRange(new m.LineRange(R.modified.endLineNumberExclusive,R.modified.endLineNumberExclusive+W))),(x>0||W>0)&&(h[M]=new I.LineRangeMapping(new m.LineRange(R.original.startLineNumber-x,R.original.endLineNumberExclusive+W),new m.LineRange(R.modified.startLineNumber-x,R.modified.endLineNumberExclusive+W)))}return h}function r(d,l,o){if(d.trim()===l.trim())return!0;if(d.length>300&&l.length>300)return!1;const a=new s.MyersDiffAlgorithm().compute(new v.LinesSliceCharSequence([d],new _.OffsetRange(0,1),!1),new v.LinesSliceCharSequence([l],new _.OffsetRange(0,1),!1),o);let g=0;const h=L.SequenceDiff.invert(a.diffs,d.length);for(const E of h)E.seq1Range.forEach(k=>{(0,C.isSpace)(d.charCodeAt(k))||g++});function p(E){let k=0;for(let M=0;Ml.length?d:l);return g/b>.6&&b>10}function u(d){if(d.length===0)return d;d.sort((0,y.compareBy)(o=>o.original.startLineNumber,y.numberComparator));const l=[d[0]];for(let o=1;o=0&&h>=0&&g+h<=2){l[l.length-1]=c.join(a);continue}l.push(a)}return l}function f(d,l){const o=new D.MonotonousArray(d);return l=l.filter(c=>{const a=o.findLastMonotonous(p=>p.original.endLineNumberExclusivep.modified.endLineNumberExclusiveU===F))return new i.LinesDiff([],[],!1);if(o.length===1&&o[0].length===0||c.length===1&&c[0].length===0)return new i.LinesDiff([new n.DetailedLineRangeMapping(new y.LineRange(1,o.length+1),new y.LineRange(1,c.length+1),[new n.RangeMapping(new S.Range(1,1,o.length,o[0].length+1),new S.Range(1,1,c.length,c[0].length+1))])],[],!1);const g=a.maxComputationTimeMs===0?m.InfiniteTimeout.instance:new m.DateTimeout(a.maxComputationTimeMs),h=!a.ignoreTrimWhitespace,p=new Map;function b(U){let F=p.get(U);return F===void 0&&(F=p.size,p.set(U,F)),F}const w=o.map(U=>b(U.trim())),E=c.map(U=>b(U.trim())),k=new r.LineSequence(w,o),M=new r.LineSequence(E,c),R=(()=>k.length+M.length<1700?this.dynamicProgrammingDiffing.compute(k,M,g,(U,F)=>o[U]===c[F]?c[F].length===0?.1:1+Math.log(1+c[F].length):.99):this.myersDiffingAlgorithm.compute(k,M))();let B=R.diffs,T=R.hitTimeout;B=(0,s.optimizeSequenceDiffs)(k,M,B),B=(0,s.removeVeryShortMatchingLinesBetweenDiffs)(k,M,B);const N=[],A=U=>{if(h)for(let F=0;FU.seq1Range.start-P===U.seq2Range.start-O);const F=U.seq1Range.start-P;A(F),P=U.seq1Range.endExclusive,O=U.seq2Range.endExclusive;const G=this.refineDiff(o,c,U,g,h);G.hitTimeout&&(T=!0);for(const Y of G.mappings)N.push(Y)}A(o.length-P);const x=f(N,o,c);let W=[];return a.computeMoves&&(W=this.computeMoves(x,o,c,w,E,g,h)),(0,I.assertFn)(()=>{function U(G,Y){if(G.lineNumber<1||G.lineNumber>Y.length)return!1;const ne=Y[G.lineNumber-1];return!(G.column<1||G.column>ne.length+1)}function F(G,Y){return!(G.startLineNumber<1||G.startLineNumber>Y.length+1||G.endLineNumberExclusive<1||G.endLineNumberExclusive>Y.length+1)}for(const G of x){if(!G.innerChanges)return!1;for(const Y of G.innerChanges)if(!(U(Y.modifiedRange.getStartPosition(),c)&&U(Y.modifiedRange.getEndPosition(),c)&&U(Y.originalRange.getStartPosition(),o)&&U(Y.originalRange.getEndPosition(),o)))return!1;if(!F(G.modified,c)||!F(G.original,o))return!1}return!0}),new i.LinesDiff(x,W,T)}computeMoves(o,c,a,g,h,p,b){return(0,C.computeMovedLines)(o,c,a,g,h,p).map(k=>{const M=this.refineDiff(c,a,new m.SequenceDiff(k.original.toOffsetRange(),k.modified.toOffsetRange()),p,b),R=f(M.mappings,c,a,!0);return new i.MovedText(k,R)})}refineDiff(o,c,a,g,h){const p=new t.LinesSliceCharSequence(o,a.seq1Range,h),b=new t.LinesSliceCharSequence(c,a.seq2Range,h),w=p.length+b.length<500?this.dynamicProgrammingDiffing.compute(p,b,g):this.myersDiffingAlgorithm.compute(p,b,g);let E=w.diffs;return E=(0,s.optimizeSequenceDiffs)(p,b,E),E=(0,s.extendDiffsToEntireWordIfAppropriate)(p,b,E),E=(0,s.removeShortMatches)(p,b,E),E=(0,s.removeVeryShortMatchingTextBetweenLongDiffs)(p,b,E),{mappings:E.map(M=>new n.RangeMapping(p.translateRange(M.seq1Range),b.translateRange(M.seq2Range))),hitTimeout:w.hitTimeout}}}e.DefaultLinesDiffComputer=u;function f(l,o,c,a=!1){const g=[];for(const h of(0,L.groupAdjacentBy)(l.map(p=>d(p,o,c)),(p,b)=>p.original.overlapOrTouch(b.original)||p.modified.overlapOrTouch(b.modified))){const p=h[0],b=h[h.length-1];g.push(new n.DetailedLineRangeMapping(p.original.join(b.original),p.modified.join(b.modified),h.map(w=>w.innerChanges[0])))}return(0,I.assertFn)(()=>!a&&g.length>0&&g[0].original.startLineNumber!==g[0].modified.startLineNumber?!1:(0,I.checkAdjacentItems)(g,(h,p)=>p.original.startLineNumber-h.original.endLineNumberExclusive===p.modified.startLineNumber-h.modified.endLineNumberExclusive&&h.original.endLineNumberExclusive=c[l.modifiedRange.startLineNumber-1].length&&l.originalRange.startColumn-1>=o[l.originalRange.startLineNumber-1].length&&l.originalRange.startLineNumber<=l.originalRange.endLineNumber+g&&l.modifiedRange.startLineNumber<=l.modifiedRange.endLineNumber+g&&(a=1);const h=new y.LineRange(l.originalRange.startLineNumber+a,l.originalRange.endLineNumber+1+g),p=new y.LineRange(l.modifiedRange.startLineNumber+a,l.modifiedRange.endLineNumber+1+g);return new n.DetailedLineRangeMapping(h,p,[l])}e.getLineRangeMapping=d}),define(te[494],ie([1,0,167,203,108,10,5,96,64]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffComputer=e.LegacyLinesDiffComputer=void 0;const v=3;class C{computeDiff(a,g,h){var p;const w=new f(a,g,{maxComputationTime:h.maxComputationTimeMs,shouldIgnoreTrimWhitespace:h.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),E=[];let k=null;for(const M of w.changes){let R;M.originalEndLineNumber===0?R=new _.LineRange(M.originalStartLineNumber+1,M.originalStartLineNumber+1):R=new _.LineRange(M.originalStartLineNumber,M.originalEndLineNumber+1);let B;M.modifiedEndLineNumber===0?B=new _.LineRange(M.modifiedStartLineNumber+1,M.modifiedStartLineNumber+1):B=new _.LineRange(M.modifiedStartLineNumber,M.modifiedEndLineNumber+1);let T=new y.DetailedLineRangeMapping(R,B,(p=M.charChanges)===null||p===void 0?void 0:p.map(N=>new y.RangeMapping(new S.Range(N.originalStartLineNumber,N.originalStartColumn,N.originalEndLineNumber,N.originalEndColumn),new S.Range(N.modifiedStartLineNumber,N.modifiedStartColumn,N.modifiedEndLineNumber,N.modifiedEndColumn))));k&&(k.modified.endLineNumberExclusive===T.modified.startLineNumber||k.original.endLineNumberExclusive===T.original.startLineNumber)&&(T=new y.DetailedLineRangeMapping(k.original.join(T.original),k.modified.join(T.modified),k.innerChanges&&T.innerChanges?k.innerChanges.concat(T.innerChanges):void 0),E.pop()),E.push(T),k=T}return(0,m.assertFn)(()=>(0,m.checkAdjacentItems)(E,(M,R)=>R.original.startLineNumber-M.original.endLineNumberExclusive===R.modified.startLineNumber-M.modified.endLineNumberExclusive&&M.original.endLineNumberExclusive(a===10?"\\n":String.fromCharCode(a))+`-(${this._lineNumbers[g]},${this._columns[g]})`).join(", ")+"]"}_assertIndex(a,g){if(a<0||a>=g.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(a){return a>0&&a===this._lineNumbers.length?this.getEndLineNumber(a-1):(this._assertIndex(a,this._lineNumbers),this._lineNumbers[a])}getEndLineNumber(a){return a===-1?this.getStartLineNumber(a+1):(this._assertIndex(a,this._lineNumbers),this._charCodes[a]===10?this._lineNumbers[a]+1:this._lineNumbers[a])}getStartColumn(a){return a>0&&a===this._columns.length?this.getEndColumn(a-1):(this._assertIndex(a,this._columns),this._columns[a])}getEndColumn(a){return a===-1?this.getStartColumn(a+1):(this._assertIndex(a,this._columns),this._charCodes[a]===10?1:this._columns[a]+1)}}class t{constructor(a,g,h,p,b,w,E,k){this.originalStartLineNumber=a,this.originalStartColumn=g,this.originalEndLineNumber=h,this.originalEndColumn=p,this.modifiedStartLineNumber=b,this.modifiedStartColumn=w,this.modifiedEndLineNumber=E,this.modifiedEndColumn=k}static createFromDiffChange(a,g,h){const p=g.getStartLineNumber(a.originalStart),b=g.getStartColumn(a.originalStart),w=g.getEndLineNumber(a.originalStart+a.originalLength-1),E=g.getEndColumn(a.originalStart+a.originalLength-1),k=h.getStartLineNumber(a.modifiedStart),M=h.getStartColumn(a.modifiedStart),R=h.getEndLineNumber(a.modifiedStart+a.modifiedLength-1),B=h.getEndColumn(a.modifiedStart+a.modifiedLength-1);return new t(p,b,w,E,k,M,R,B)}}function r(c){if(c.length<=1)return c;const a=[c[0]];let g=a[0];for(let h=1,p=c.length;h0&&g.originalLength<20&&g.modifiedLength>0&&g.modifiedLength<20&&b()){const N=h.createCharSequence(a,g.originalStart,g.originalStart+g.originalLength-1),A=p.createCharSequence(a,g.modifiedStart,g.modifiedStart+g.modifiedLength-1);if(N.getElements().length>0&&A.getElements().length>0){let P=s(N,A,b,!0).changes;E&&(P=r(P)),T=[];for(let O=0,x=P.length;O1&&P>1;){const O=T.charCodeAt(A-2),x=N.charCodeAt(P-2);if(O!==x)break;A--,P--}(A>1||P>1)&&this._pushTrimWhitespaceCharChange(p,b+1,1,A,w+1,1,P)}{let A=l(T,1),P=l(N,1);const O=T.length+1,x=N.length+1;for(;A!0;const a=Date.now();return()=>Date.now()-anew L.LegacyLinesDiffComputer,getDefault:()=>new I.DefaultLinesDiffComputer}}),define(te[280],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalEditorAction=void 0;class L{constructor(y,D,S,m,_,v){this.id=y,this.label=D,this.alias=S,this._precondition=m,this._run=_,this._contextKeyService=v}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(y){return this.isSupported()?this._run(y):Promise.resolve(void 0)}}e.InternalEditorAction=L}),define(te[174],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorType=void 0,e.EditorType={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}}),define(te[175],ie([1,0,174]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeEditor=e.isCompositeEditor=e.isDiffEditor=e.isCodeEditor=void 0;function I(m){return m&&typeof m.getEditorType=="function"?m.getEditorType()===L.EditorType.ICodeEditor:!1}e.isCodeEditor=I;function y(m){return m&&typeof m.getEditorType=="function"?m.getEditorType()===L.EditorType.IDiffEditor:!1}e.isDiffEditor=y;function D(m){return!!m&&typeof m=="object"&&typeof m.onDidChangeActiveEditor=="function"}e.isCompositeEditor=D;function S(m){return I(m)?m:y(m)?m.getModifiedEditor():D(m)&&I(m.activeCodeEditor)?m.activeCodeEditor:null}e.getCodeEditor=S}),define(te[147],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEditorFeatures=e.registerEditorFeature=void 0;const L=[];function I(D){L.push(D)}e.registerEditorFeature=I;function y(){return L.slice(0)}e.getEditorFeatures=y}),define(te[496],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorTheme=void 0;class L{get type(){return this._theme.type}get value(){return this._theme}constructor(y){this._theme=y}update(y){this._theme=y}getColor(y){return this._theme.getColor(y)}}e.EditorTheme=L}),define(te[124],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMetadata=void 0;class L{static getLanguageId(y){return(y&255)>>>0}static getTokenType(y){return(y&768)>>>8}static containsBalancedBrackets(y){return(y&1024)!==0}static getFontStyle(y){return(y&30720)>>>11}static getForeground(y){return(y&16744448)>>>15}static getBackground(y){return(y&4278190080)>>>24}static getClassNameFromMetadata(y){let S="mtk"+this.getForeground(y);const m=this.getFontStyle(y);return m&1&&(S+=" mtki"),m&2&&(S+=" mtkb"),m&4&&(S+=" mtku"),m&8&&(S+=" mtks"),S}static getInlineStyleFromMetadata(y,D){const S=this.getForeground(y),m=this.getFontStyle(y);let _=`color: ${D[S]};`;m&1&&(_+="font-style: italic;"),m&2&&(_+="font-weight: bold;");let v="";return m&4&&(v+=" underline"),m&8&&(v+=" line-through"),v&&(_+=`text-decoration:${v};`),_}static getPresentationFromMetadata(y){const D=this.getForeground(y),S=this.getFontStyle(y);return{foreground:D,italic:!!(S&1),bold:!!(S&2),underline:!!(S&4),strikethrough:!!(S&8)}}}e.TokenMetadata=L}),define(te[497],ie([1,0,36]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeDefaultDocumentColors=void 0;function I(i){const n=[];for(const t of i){const r=Number(t);(r||r===0&&t.replace(/\s/g,"")!=="")&&n.push(r)}return n}function y(i,n,t,r){return{red:i/255,blue:t/255,green:n/255,alpha:r}}function D(i,n){const t=n.index,r=n[0].length;if(!t)return;const u=i.positionAt(t);return{startLineNumber:u.lineNumber,startColumn:u.column,endLineNumber:u.lineNumber,endColumn:u.column+r}}function S(i,n){if(!i)return;const t=L.Color.Format.CSS.parseHex(n);if(t)return{range:i,color:y(t.rgba.r,t.rgba.g,t.rgba.b,t.rgba.a)}}function m(i,n,t){if(!i||n.length!==1)return;const u=n[0].values(),f=I(u);return{range:i,color:y(f[0],f[1],f[2],t?f[3]:1)}}function _(i,n,t){if(!i||n.length!==1)return;const u=n[0].values(),f=I(u),d=new L.Color(new L.HSLA(f[0],f[1]/100,f[2]/100,t?f[3]:1));return{range:i,color:y(d.rgba.r,d.rgba.g,d.rgba.b,d.rgba.a)}}function v(i,n){return typeof i=="string"?[...i.matchAll(n)]:i.findMatches(n)}function C(i){const n=[],r=v(i,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|(#)([A-Fa-f0-9]{3})\b|(#)([A-Fa-f0-9]{4})\b|(#)([A-Fa-f0-9]{6})\b|(#)([A-Fa-f0-9]{8})\b/gm);if(r.length>0)for(const u of r){const f=u.filter(c=>c!==void 0),d=f[1],l=f[2];if(!l)continue;let o;if(d==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;o=m(D(i,u),v(l,c),!1)}else if(d==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=m(D(i,u),v(l,c),!0)}else if(d==="hsl"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;o=_(D(i,u),v(l,c),!1)}else if(d==="hsla"){const c=/^\(\s*(36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;o=_(D(i,u),v(l,c),!0)}else d==="#"&&(o=S(D(i,u),d+l));o&&n.push(o)}return n}function s(i){return!i||typeof i.getValue!="function"||typeof i.positionAt!="function"?[]:C(i)}e.computeDefaultDocumentColors=s}),define(te[109],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoClosingPairs=e.StandardAutoClosingPairConditional=e.IndentAction=void 0;var L;(function(S){S[S.None=0]="None",S[S.Indent=1]="Indent",S[S.IndentOutdent=2]="IndentOutdent",S[S.Outdent=3]="Outdent"})(L||(e.IndentAction=L={}));class I{constructor(m){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=m.open,this.close=m.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(m.notIn))for(let _=0,v=m.notIn.length;_n&&(n=l),d>t&&(t=d),o>t&&(t=o)}n++,t++;const r=new I(t,n,0);for(let u=0,f=i.length;u=this._maxCharCode?0:this._states.get(i,n)}}e.StateMachine=y;let D=null;function S(){return D===null&&(D=new y([[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]])),D}let m=null;function _(){if(m===null){m=new L.CharacterClassifier(0);const s=` <>'"\u3001\u3002\uFF61\uFF64\uFF0C\uFF0E\uFF1A\uFF1B\u2018\u3008\u300C\u300E\u3014\uFF08\uFF3B\uFF5B\uFF62\uFF63\uFF5D\uFF3D\uFF09\u3015\u300F\u300D\u3009\u2019\uFF40\uFF5E\u2026`;for(let n=0;nr);if(r>0){const d=n.charCodeAt(r-1),l=n.charCodeAt(f);(d===40&&l===41||d===91&&l===93||d===123&&l===125)&&f--}return{range:{startLineNumber:t,startColumn:r+1,endLineNumber:t,endColumn:f+2},url:n.substring(r,f+1)}}static computeLinks(i,n=S()){const t=_(),r=[];for(let u=1,f=i.getLineCount();u<=f;u++){const d=i.getLineContent(u),l=d.length;let o=0,c=0,a=0,g=1,h=!1,p=!1,b=!1,w=!1;for(;o0&&D.getLanguageId(s-1)===v;)s--;return new I(D,v,s,C+1,D.getStartOffset(s),D.getEndOffset(C))}e.createScopedLineTokens=L;class I{constructor(S,m,_,v,C,s){this._scopedLineTokensBrand=void 0,this._actual=S,this.languageId=m,this._firstTokenIndex=_,this._lastTokenIndex=v,this.firstCharOffset=C,this._lastCharOffset=s}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(S){return this._actual.getLineContent().substring(0,this.firstCharOffset+S)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(S){return this._actual.findTokenIndexAtOffset(S+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(S){return this._actual.getStandardTokenType(S+this._firstTokenIndex)}}e.ScopedLineTokens=I;function y(D){return(D&3)!==0}e.ignoreBracketsInToken=y}),define(te[72],ie([1,0,12,5,24,125,80,201]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isQuote=e.EditOperationResult=e.SingleCursorState=e.PartialViewCursorState=e.PartialModelCursorState=e.CursorState=e.CursorConfiguration=void 0;const _=()=>!0,v=()=>!1,C=d=>d===" "||d===" ";class s{static shouldRecreate(l){return l.hasChanged(143)||l.hasChanged(129)||l.hasChanged(37)||l.hasChanged(76)||l.hasChanged(78)||l.hasChanged(79)||l.hasChanged(6)||l.hasChanged(7)||l.hasChanged(11)||l.hasChanged(9)||l.hasChanged(10)||l.hasChanged(14)||l.hasChanged(127)||l.hasChanged(50)||l.hasChanged(90)}constructor(l,o,c,a){var g;this.languageConfigurationService=a,this._cursorMoveConfigurationBrand=void 0,this._languageId=l;const h=c.options,p=h.get(143),b=h.get(50);this.readOnly=h.get(90),this.tabSize=o.tabSize,this.indentSize=o.indentSize,this.insertSpaces=o.insertSpaces,this.stickyTabStops=h.get(115),this.lineHeight=b.lineHeight,this.typicalHalfwidthCharacterWidth=b.typicalHalfwidthCharacterWidth,this.pageSize=Math.max(1,Math.floor(p.height/this.lineHeight)-2),this.useTabStops=h.get(127),this.wordSeparators=h.get(129),this.emptySelectionClipboard=h.get(37),this.copyWithSyntaxHighlighting=h.get(25),this.multiCursorMergeOverlapping=h.get(76),this.multiCursorPaste=h.get(78),this.multiCursorLimit=h.get(79),this.autoClosingBrackets=h.get(6),this.autoClosingComments=h.get(7),this.autoClosingQuotes=h.get(11),this.autoClosingDelete=h.get(9),this.autoClosingOvertype=h.get(10),this.autoSurround=h.get(14),this.autoIndent=h.get(12),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(l,this.autoClosingQuotes,!0),comment:this._getShouldAutoClose(l,this.autoClosingComments,!1),bracket:this._getShouldAutoClose(l,this.autoClosingBrackets,!1)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(l).getAutoClosingPairs();const w=this.languageConfigurationService.getLanguageConfiguration(l).getSurroundingPairs();if(w)for(const k of w)this.surroundingPairs[k.open]=k.close;const E=this.languageConfigurationService.getLanguageConfiguration(l).comments;this.blockCommentStartToken=(g=E?.blockCommentStartToken)!==null&&g!==void 0?g:null}get electricChars(){var l;if(!this._electricChars){this._electricChars={};const o=(l=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)===null||l===void 0?void 0:l.getElectricCharacters();if(o)for(const c of o)this._electricChars[c]=!0}return this._electricChars}onElectricCharacter(l,o,c){const a=(0,D.createScopedLineTokens)(o,c-1),g=this.languageConfigurationService.getLanguageConfiguration(a.languageId).electricCharacter;return g?g.onElectricCharacter(l,a,c-a.firstCharOffset):null}normalizeIndentation(l){return(0,m.normalizeIndentation)(l,this.indentSize,this.insertSpaces)}_getShouldAutoClose(l,o,c){switch(o){case"beforeWhitespace":return C;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(l,c);case"always":return _;case"never":return v}}_getLanguageDefinedShouldAutoClose(l,o){const c=this.languageConfigurationService.getLanguageConfiguration(l).getAutoCloseBeforeSet(o);return a=>c.indexOf(a)!==-1}visibleColumnFromColumn(l,o){return S.CursorColumns.visibleColumnFromColumn(l.getLineContent(o.lineNumber),o.column,this.tabSize)}columnFromVisibleColumn(l,o,c){const a=S.CursorColumns.columnFromVisibleColumn(l.getLineContent(o),c,this.tabSize),g=l.getLineMinColumn(o);if(ah?h:a}}e.CursorConfiguration=s;class i{static fromModelState(l){return new n(l)}static fromViewState(l){return new t(l)}static fromModelSelection(l){const o=y.Selection.liftSelection(l),c=new r(I.Range.fromPositions(o.getSelectionStart()),0,0,o.getPosition(),0);return i.fromModelState(c)}static fromModelSelections(l){const o=[];for(let c=0,a=l.length;cs,r=C>i,u=Ci||gC||a0&&C--,D.columnSelect(m,_,v.fromViewLineNumber,v.fromViewVisualColumn,v.toViewLineNumber,C)}static columnSelectRight(m,_,v){let C=0;const s=Math.min(v.fromViewLineNumber,v.toViewLineNumber),i=Math.max(v.fromViewLineNumber,v.toViewLineNumber);for(let t=s;t<=i;t++){const r=_.getLineMaxColumn(t),u=m.visibleColumnFromColumn(_,new I.Position(t,r));C=Math.max(C,u)}let n=v.toViewVisualColumn;return ns.getLineMinColumn(i.lineNumber))return i.delta(void 0,-L.prevCharLength(s.getLineContent(i.lineNumber),i.column-1));if(i.lineNumber>1){const n=i.lineNumber-1;return new y.Position(n,s.getLineMaxColumn(n))}else return i}static leftPositionAtomicSoftTabs(s,i,n){if(i.column<=s.getLineIndentColumn(i.lineNumber)){const t=s.getLineMinColumn(i.lineNumber),r=s.getLineContent(i.lineNumber),u=S.AtomicTabMoveOperations.atomicPosition(r,i.column-1,n,0);if(u!==-1&&u+1>=t)return new y.Position(i.lineNumber,u+1)}return this.leftPosition(s,i)}static left(s,i,n){const t=s.stickyTabStops?v.leftPositionAtomicSoftTabs(i,n,s.tabSize):v.leftPosition(i,n);return new _(t.lineNumber,t.column,0)}static moveLeft(s,i,n,t,r){let u,f;if(n.hasSelection()&&!t)u=n.selection.startLineNumber,f=n.selection.startColumn;else{const d=n.position.delta(void 0,-(r-1)),l=i.normalizePosition(v.clipPositionColumn(d,i),0),o=v.left(s,i,l);u=o.lineNumber,f=o.column}return n.move(t,u,f,0)}static clipPositionColumn(s,i){return new y.Position(s.lineNumber,v.clipRange(s.column,i.getLineMinColumn(s.lineNumber),i.getLineMaxColumn(s.lineNumber)))}static clipRange(s,i,n){return sn?n:s}static rightPosition(s,i,n){return no?(n=o,f?t=i.getLineMaxColumn(n):t=Math.min(i.getLineMaxColumn(n),t)):t=s.columnFromVisibleColumn(i,n,l),g?r=0:r=l-I.CursorColumns.visibleColumnFromColumn(i.getLineContent(n),t,s.tabSize),d!==void 0){const h=new y.Position(n,t),p=i.normalizePosition(h,d);r=r+(t-p.column),n=p.lineNumber,t=p.column}return new _(n,t,r)}static down(s,i,n,t,r,u,f){return this.vertical(s,i,n,t,r,n+u,f,4)}static moveDown(s,i,n,t,r){let u,f;n.hasSelection()&&!t?(u=n.selection.endLineNumber,f=n.selection.endColumn):(u=n.position.lineNumber,f=n.position.column);let d=0,l;do if(l=v.down(s,i,u+d,f,n.leftoverVisibleColumns,r,!0),i.normalizePosition(new y.Position(l.lineNumber,l.column),2).lineNumber>u)break;while(d++<10&&u+d1&&this._isBlankLine(i,r);)r--;for(;r>1&&!this._isBlankLine(i,r);)r--;return n.move(t,r,i.getLineMinColumn(r),0)}static moveToNextBlankLine(s,i,n,t){const r=i.getLineCount();let u=n.position.lineNumber;for(;u=a.length+1)return!1;const g=a.charAt(c.column-2),h=t.get(g);if(!h)return!1;if((0,y.isQuote)(g)){if(n==="never")return!1}else if(i==="never")return!1;const p=a.charAt(c.column-1);let b=!1;for(const w of h)w.open===g&&w.close===p&&(b=!0);if(!b)return!1;if(s==="auto"){let w=!1;for(let E=0,k=f.length;E1){const r=i.getLineContent(t.lineNumber),u=L.firstNonWhitespaceIndex(r),f=u===-1?r.length+1:u+1;if(t.column<=f){const d=n.visibleColumnFromColumn(i,t),l=D.CursorColumns.prevIndentTabStop(d,n.indentSize),o=n.columnFromVisibleColumn(i,t.lineNumber,l);return new m.Range(t.lineNumber,o,t.lineNumber,t.column)}}return m.Range.fromPositions(v.getPositionAfterDeleteLeft(t,i),t)}static getPositionAfterDeleteLeft(s,i){if(s.column>1){const n=L.getLeftDeleteOffset(s.column-1,i.getLineContent(s.lineNumber));return s.with(void 0,n+1)}else if(s.lineNumber>1){const n=s.lineNumber-1;return new _.Position(n,i.getLineMaxColumn(n))}else return s}static cut(s,i,n){const t=[];let r=null;n.sort((u,f)=>_.Position.compare(u.getStartPosition(),f.getEndPosition()));for(let u=0,f=n.length;u1&&r?.endLineNumber!==l.lineNumber?(o=l.lineNumber-1,c=i.getLineMaxColumn(l.lineNumber-1),a=l.lineNumber,g=i.getLineMaxColumn(l.lineNumber)):(o=l.lineNumber,c=1,a=l.lineNumber,g=i.getLineMaxColumn(l.lineNumber));const h=new m.Range(o,c,a,g);r=h,h.isEmpty()?t[u]=null:t[u]=new I.ReplaceCommand(h,"")}else t[u]=null;else t[u]=new I.ReplaceCommand(d,"")}return new y.EditOperationResult(0,t,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}e.DeleteOperations=v}),define(te[176],ie([1,0,10,72,205,144,12,5]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordPartOperations=e.WordOperations=void 0;class _{static _createWord(i,n,t,r,u){return{start:r,end:u,wordType:n,nextCharClass:t}}static _findPreviousWordOnLine(i,n,t){const r=n.getLineContent(t.lineNumber);return this._doFindPreviousWordOnLine(r,i,t)}static _doFindPreviousWordOnLine(i,n,t){let r=0;for(let u=t.column-2;u>=0;u--){const f=i.charCodeAt(u),d=n.get(f);if(d===0){if(r===2)return this._createWord(i,r,d,u+1,this._findEndOfWord(i,n,r,u+1));r=1}else if(d===2){if(r===1)return this._createWord(i,r,d,u+1,this._findEndOfWord(i,n,r,u+1));r=2}else if(d===1&&r!==0)return this._createWord(i,r,d,u+1,this._findEndOfWord(i,n,r,u+1))}return r!==0?this._createWord(i,r,1,0,this._findEndOfWord(i,n,r,0)):null}static _findEndOfWord(i,n,t,r){const u=i.length;for(let f=r;f=0;u--){const f=i.charCodeAt(u),d=n.get(f);if(d===1||t===1&&d===2||t===2&&d===0)return u+1}return 0}static moveWordLeft(i,n,t,r){let u=t.lineNumber,f=t.column;f===1&&u>1&&(u=u-1,f=n.getLineMaxColumn(u));let d=_._findPreviousWordOnLine(i,n,new S.Position(u,f));if(r===0)return new S.Position(u,d?d.start+1:1);if(r===1)return d&&d.wordType===2&&d.end-d.start===1&&d.nextCharClass===0&&(d=_._findPreviousWordOnLine(i,n,new S.Position(u,d.start+1))),new S.Position(u,d?d.start+1:1);if(r===3){for(;d&&d.wordType===2;)d=_._findPreviousWordOnLine(i,n,new S.Position(u,d.start+1));return new S.Position(u,d?d.start+1:1)}return d&&f<=d.end+1&&(d=_._findPreviousWordOnLine(i,n,new S.Position(u,d.start+1))),new S.Position(u,d?d.end+1:1)}static _moveWordPartLeft(i,n){const t=n.lineNumber,r=i.getLineMaxColumn(t);if(n.column===1)return t>1?new S.Position(t-1,i.getLineMaxColumn(t-1)):n;const u=i.getLineContent(t);for(let f=n.column-1;f>1;f--){const d=u.charCodeAt(f-2),l=u.charCodeAt(f-1);if(d===95&&l!==95)return new S.Position(t,f);if(d===45&&l!==45)return new S.Position(t,f);if((L.isLowerAsciiLetter(d)||L.isAsciiDigit(d))&&L.isUpperAsciiLetter(l))return new S.Position(t,f);if(L.isUpperAsciiLetter(d)&&L.isUpperAsciiLetter(l)&&f+1=l.start+1&&(l=_._findNextWordOnLine(i,n,new S.Position(u,l.end+1))),l?f=l.start+1:f=n.getLineMaxColumn(u);return new S.Position(u,f)}static _moveWordPartRight(i,n){const t=n.lineNumber,r=i.getLineMaxColumn(t);if(n.column===r)return t1?o=1:(l--,o=r.getLineMaxColumn(l)):(c&&o<=c.end+1&&(c=_._findPreviousWordOnLine(t,r,new S.Position(l,c.start+1))),c?o=c.end+1:o>1?o=1:(l--,o=r.getLineMaxColumn(l))),new m.Range(l,o,d.lineNumber,d.column)}static deleteInsideWord(i,n,t){if(!t.isEmpty())return t;const r=new S.Position(t.positionLineNumber,t.positionColumn),u=this._deleteInsideWordWhitespace(n,r);return u||this._deleteInsideWordDetermineDeleteRange(i,n,r)}static _charAtIsWhitespace(i,n){const t=i.charCodeAt(n);return t===32||t===9}static _deleteInsideWordWhitespace(i,n){const t=i.getLineContent(n.lineNumber),r=t.length;if(r===0)return null;let u=Math.max(n.column-2,0);if(!this._charAtIsWhitespace(t,u))return null;let f=Math.min(n.column-1,r-1);if(!this._charAtIsWhitespace(t,f))return null;for(;u>0&&this._charAtIsWhitespace(t,u-1);)u--;for(;f+11?new m.Range(t.lineNumber-1,n.getLineMaxColumn(t.lineNumber-1),t.lineNumber,1):t.lineNumbera.start+1<=t.column&&t.column<=a.end+1,d=(a,g)=>(a=Math.min(a,t.column),g=Math.max(g,t.column),new m.Range(t.lineNumber,a,t.lineNumber,g)),l=a=>{let g=a.start+1,h=a.end+1,p=!1;for(;h-11&&this._charAtIsWhitespace(r,g-2);)g--;return d(g,h)},o=_._findPreviousWordOnLine(i,n,t);if(o&&f(o))return l(o);const c=_._findNextWordOnLine(i,n,t);return c&&f(c)?l(c):o&&c?d(o.end+1,c.start+1):o?d(o.start+1,o.end+1):c?d(c.start+1,c.end+1):d(1,u+1)}static _deleteWordPartLeft(i,n){if(!n.isEmpty())return n;const t=n.getPosition(),r=_._moveWordPartLeft(i,t);return new m.Range(t.lineNumber,t.column,r.lineNumber,r.column)}static _findFirstNonWhitespaceChar(i,n){const t=i.length;for(let r=n;r=g.start+1&&(g=_._findNextWordOnLine(t,r,new S.Position(l,g.end+1))),g?o=g.start+1:o!!i)}}),define(te[206],ie([1,0,20,72,204,176,12,5]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorMove=e.CursorMoveCommands=void 0;class _{static addCursorDown(s,i,n){const t=[];let r=0;for(let u=0,f=i.length;ul&&(o=l,c=s.model.getLineMaxColumn(o)),I.CursorState.fromModelState(new I.SingleCursorState(new m.Range(u.lineNumber,1,o,c),2,0,new S.Position(o,c),0))}const d=i.modelState.selectionStart.getStartPosition().lineNumber;if(u.lineNumberd){const l=s.getLineCount();let o=f.lineNumber+1,c=1;return o>l&&(o=l,c=s.getLineMaxColumn(o)),I.CursorState.fromViewState(i.viewState.move(!0,o,c,0))}else{const l=i.modelState.selectionStart.getEndPosition();return I.CursorState.fromModelState(i.modelState.move(!0,l.lineNumber,l.column,0))}}static word(s,i,n,t){const r=s.model.validatePosition(t);return I.CursorState.fromModelState(D.WordOperations.word(s.cursorConfig,s.model,i.modelState,n,r))}static cancelSelection(s,i){if(!i.modelState.hasSelection())return new I.CursorState(i.modelState,i.viewState);const n=i.viewState.position.lineNumber,t=i.viewState.position.column;return I.CursorState.fromViewState(new I.SingleCursorState(new m.Range(n,t,n,t),0,0,new S.Position(n,t),0))}static moveTo(s,i,n,t,r){if(n){if(i.modelState.selectionStartKind===1)return this.word(s,i,n,t);if(i.modelState.selectionStartKind===2)return this.line(s,i,n,t,r)}const u=s.model.validatePosition(t),f=r?s.coordinatesConverter.validateViewPosition(new S.Position(r.lineNumber,r.column),u):s.coordinatesConverter.convertModelPositionToViewPosition(u);return I.CursorState.fromViewState(i.viewState.move(n,f.lineNumber,f.column,0))}static simpleMove(s,i,n,t,r,u){switch(n){case 0:return u===4?this._moveHalfLineLeft(s,i,t):this._moveLeft(s,i,t,r);case 1:return u===4?this._moveHalfLineRight(s,i,t):this._moveRight(s,i,t,r);case 2:return u===2?this._moveUpByViewLines(s,i,t,r):this._moveUpByModelLines(s,i,t,r);case 3:return u===2?this._moveDownByViewLines(s,i,t,r):this._moveDownByModelLines(s,i,t,r);case 4:return u===2?i.map(f=>I.CursorState.fromViewState(y.MoveOperations.moveToPrevBlankLine(s.cursorConfig,s,f.viewState,t))):i.map(f=>I.CursorState.fromModelState(y.MoveOperations.moveToPrevBlankLine(s.cursorConfig,s.model,f.modelState,t)));case 5:return u===2?i.map(f=>I.CursorState.fromViewState(y.MoveOperations.moveToNextBlankLine(s.cursorConfig,s,f.viewState,t))):i.map(f=>I.CursorState.fromModelState(y.MoveOperations.moveToNextBlankLine(s.cursorConfig,s.model,f.modelState,t)));case 6:return this._moveToViewMinColumn(s,i,t);case 7:return this._moveToViewFirstNonWhitespaceColumn(s,i,t);case 8:return this._moveToViewCenterColumn(s,i,t);case 9:return this._moveToViewMaxColumn(s,i,t);case 10:return this._moveToViewLastNonWhitespaceColumn(s,i,t);default:return null}}static viewportMove(s,i,n,t,r){const u=s.getCompletelyVisibleViewRange(),f=s.coordinatesConverter.convertViewRangeToModelRange(u);switch(n){case 11:{const d=this._firstLineNumberInRange(s.model,f,r),l=s.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(s,i[0],t,d,l)]}case 13:{const d=this._lastLineNumberInRange(s.model,f,r),l=s.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(s,i[0],t,d,l)]}case 12:{const d=Math.round((f.startLineNumber+f.endLineNumber)/2),l=s.model.getLineFirstNonWhitespaceColumn(d);return[this._moveToModelPosition(s,i[0],t,d,l)]}case 14:{const d=[];for(let l=0,o=i.length;ln.endLineNumber-1?u=n.endLineNumber-1:rI.CursorState.fromViewState(y.MoveOperations.moveLeft(s.cursorConfig,s,r.viewState,n,t)))}static _moveHalfLineLeft(s,i,n){const t=[];for(let r=0,u=i.length;rI.CursorState.fromViewState(y.MoveOperations.moveRight(s.cursorConfig,s,r.viewState,n,t)))}static _moveHalfLineRight(s,i,n){const t=[];for(let r=0,u=i.length;rs.readSelectionFromMarkers(this.context))}getAll(){return this.cursors.map(s=>s.asCursorState())}getViewPositions(){return this.cursors.map(s=>s.viewState.position)}getTopMostViewPosition(){return(0,I.findFirstMinBy)(this.cursors,(0,L.compareBy)(s=>s.viewState.position,S.Position.compare)).viewState.position}getBottomMostViewPosition(){return(0,I.findLastMaxBy)(this.cursors,(0,L.compareBy)(s=>s.viewState.position,S.Position.compare)).viewState.position}getSelections(){return this.cursors.map(s=>s.modelState.selection)}getViewSelections(){return this.cursors.map(s=>s.viewState.selection)}setSelections(s){this.setStates(y.CursorState.fromModelSelections(s))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(s){s!==null&&(this.cursors[0].setState(this.context,s[0].modelState,s[0].viewState),this._setSecondaryStates(s.slice(1)))}_setSecondaryStates(s){const i=this.cursors.length-1,n=s.length;if(in){const t=i-n;for(let r=0;r=s+1&&this.lastAddedCursorIndex--,this.cursors[s+1].dispose(this.context),this.cursors.splice(s+1,1)}normalize(){if(this.cursors.length===1)return;const s=this.cursors.slice(0),i=[];for(let n=0,t=s.length;nn.selection,m.Range.compareRangesUsingStarts));for(let n=0;nc&&p.index--;s.splice(c,1),i.splice(o,1),this._removeSecondaryCursor(c-1),n--}}}}e.CursorCollection=v}),define(te[502],ie([1,0,109]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CharacterPairSupport=void 0;class I{constructor(D){if(D.autoClosingPairs?this._autoClosingPairs=D.autoClosingPairs.map(S=>new L.StandardAutoClosingPairConditional(S)):D.brackets?this._autoClosingPairs=D.brackets.map(S=>new L.StandardAutoClosingPairConditional({open:S[0],close:S[1]})):this._autoClosingPairs=[],D.__electricCharacterSupport&&D.__electricCharacterSupport.docComment){const S=D.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new L.StandardAutoClosingPairConditional({open:S.open,close:S.close||""}))}this._autoCloseBeforeForQuotes=typeof D.autoCloseBefore=="string"?D.autoCloseBefore:I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES,this._autoCloseBeforeForBrackets=typeof D.autoCloseBefore=="string"?D.autoCloseBefore:I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS,this._surroundingPairs=D.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(D){return D?this._autoCloseBeforeForQuotes:this._autoCloseBeforeForBrackets}getSurroundingPairs(){return this._surroundingPairs}}e.CharacterPairSupport=I,I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_QUOTES=`;:.,=}])> - `,I.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS=`'"\`;:.,=}])> - `}),define(te[503],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentRulesSupport=void 0;function L(y){return y.global&&(y.lastIndex=0),!0}class I{constructor(D){this._indentationRules=D}shouldIncrease(D){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&L(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(D))}shouldDecrease(D){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&L(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(D))}shouldIndentNextLine(D){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&L(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(D))}shouldIgnore(D){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&L(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(D))}getIndentMetadata(D){let S=0;return this.shouldIncrease(D)&&(S+=1),this.shouldDecrease(D)&&(S+=2),this.shouldIndentNextLine(D)&&(S+=4),this.shouldIgnore(D)&&(S+=8),S}}e.IndentRulesSupport=I}),define(te[504],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicInplaceReplace=void 0;class L{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(y,D,S,m,_){if(y&&D){const v=this.doNavigateValueSet(D,_);if(v)return{range:y,value:v}}if(S&&m){const v=this.doNavigateValueSet(m,_);if(v)return{range:S,value:v}}return null}doNavigateValueSet(y,D){const S=this.numberReplace(y,D);return S!==null?S:this.textReplace(y,D)}numberReplace(y,D){const S=Math.pow(10,y.length-(y.lastIndexOf(".")+1));let m=Number(y);const _=parseFloat(y);return!isNaN(m)&&!isNaN(_)&&m===_?m===0&&!D?null:(m=Math.floor(m*S),m+=D?S:-S,String(m/S)):null}textReplace(y,D){return this.valueSetsReplace(this._defaultValueSet,y,D)}valueSetsReplace(y,D,S){let m=null;for(let _=0,v=y.length;m===null&&_=0?(m+=S?1:-1,m<0?m=y.length-1:m%=y.length,y[m]):null}}e.BasicInplaceReplace=L,L.INSTANCE=new L}),define(te[505],ie([1,0,259]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClosingBracketKind=e.OpeningBracketKind=e.BracketKindBase=e.LanguageBracketsConfiguration=void 0;class I{constructor(v,C){this.languageId=v;const s=C.brackets?y(C.brackets):[],i=new L.CachedFunction(r=>{const u=new Set;return{info:new S(this,r,u),closing:u}}),n=new L.CachedFunction(r=>{const u=new Set,f=new Set;return{info:new m(this,r,u,f),opening:u,openingColorized:f}});for(const[r,u]of s){const f=i.get(r),d=n.get(u);f.closing.add(d.info),d.opening.add(f.info)}const t=C.colorizedBracketPairs?y(C.colorizedBracketPairs):s.filter(r=>!(r[0]==="<"&&r[1]===">"));for(const[r,u]of t){const f=i.get(r),d=n.get(u);f.closing.add(d.info),d.openingColorized.add(f.info),d.opening.add(f.info)}this._openingBrackets=new Map([...i.cachedValues].map(([r,u])=>[r,u.info])),this._closingBrackets=new Map([...n.cachedValues].map(([r,u])=>[r,u.info]))}get openingBrackets(){return[...this._openingBrackets.values()]}get closingBrackets(){return[...this._closingBrackets.values()]}getOpeningBracketInfo(v){return this._openingBrackets.get(v)}getClosingBracketInfo(v){return this._closingBrackets.get(v)}getBracketInfo(v){return this.getOpeningBracketInfo(v)||this.getClosingBracketInfo(v)}}e.LanguageBracketsConfiguration=I;function y(_){return _.filter(([v,C])=>v!==""&&C!=="")}class D{constructor(v,C){this.config=v,this.bracketText=C}get languageId(){return this.config.languageId}}e.BracketKindBase=D;class S extends D{constructor(v,C,s){super(v,C),this.openedBrackets=s,this.isOpeningBracket=!0}}e.OpeningBracketKind=S;class m extends D{constructor(v,C,s,i){super(v,C),this.openingBrackets=s,this.openingColorizedBrackets=i,this.isOpeningBracket=!1}closes(v){return v.config!==this.config?!1:this.openingBrackets.has(v)}closesColorized(v){return v.config!==this.config?!1:this.openingColorizedBrackets.has(v)}getOpeningBrackets(){return[...this.openingBrackets]}}e.ClosingBracketKind=m}),define(te[506],ie([1,0,9,10,109]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnEnterSupport=void 0;class D{constructor(m){m=m||{},m.brackets=m.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],m.brackets.forEach(_=>{const v=D._createOpenBracketRegExp(_[0]),C=D._createCloseBracketRegExp(_[1]);v&&C&&this._brackets.push({open:_[0],openRegExp:v,close:_[1],closeRegExp:C})}),this._regExpRules=m.onEnterRules||[]}onEnter(m,_,v,C){if(m>=3)for(let s=0,i=this._regExpRules.length;sr.reg?(r.reg.lastIndex=0,r.reg.test(r.text)):!0))return n.action}if(m>=2&&v.length>0&&C.length>0)for(let s=0,i=this._brackets.length;s=2&&v.length>0){for(let s=0,i=this._brackets.length;s{const w=s(p.token,b.token);return w!==0?w:p.index-b.index});let f=0,d="000000",l="ffffff";for(;r.length>=1&&r[0].token==="";){const p=r.shift();p.fontStyle!==-1&&(f=p.fontStyle),p.foreground!==null&&(d=p.foreground),p.background!==null&&(l=p.background)}const o=new m;for(const p of u)o.getId(p);const c=o.getId(d),a=o.getId(l),g=new i(f,c,a),h=new n(g);for(let p=0,b=r.length;p"u"){const l=this._match(f),o=C(f);d=(l.metadata|o<<8)>>>0,this._cache.set(f,d)}return(d|u<<0)>>>0}}e.TokenTheme=_;const v=/\b(comment|string|regex|regexp)\b/;function C(r){const u=r.match(v);if(!u)return 0;switch(u[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"regexp":return 3}throw new Error("Unexpected match for standard token type!")}e.toStandardTokenType=C;function s(r,u){return ru?1:0}e.strcmp=s;class i{constructor(u,f,d){this._themeTrieElementRuleBrand=void 0,this._fontStyle=u,this._foreground=f,this._background=d,this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}clone(){return new i(this._fontStyle,this._foreground,this._background)}acceptOverwrite(u,f,d){u!==-1&&(this._fontStyle=u),f!==0&&(this._foreground=f),d!==0&&(this._background=d),this.metadata=(this._fontStyle<<11|this._foreground<<15|this._background<<24)>>>0}}e.ThemeTrieElementRule=i;class n{constructor(u){this._themeTrieElementBrand=void 0,this._mainRule=u,this._children=new Map}match(u){if(u==="")return this._mainRule;const f=u.indexOf(".");let d,l;f===-1?(d=u,l=""):(d=u.substring(0,f),l=u.substring(f+1));const o=this._children.get(d);return typeof o<"u"?o.match(l):this._mainRule}insert(u,f,d,l){if(u===""){this._mainRule.acceptOverwrite(f,d,l);return}const o=u.indexOf(".");let c,a;o===-1?(c=u,a=""):(c=u.substring(0,o),a=u.substring(o+1));let g=this._children.get(c);typeof g>"u"&&(g=new n(this._mainRule.clone()),this._children.set(c,g)),g.insert(a,f,d,l)}}e.ThemeTrieElement=n;function t(r){const u=[];for(let f=1,d=r.length;f=m&&(h=h-a%m),h}e.lengthAdd=i;function n(a,g){return a.reduce((h,p)=>i(h,g(p)),e.lengthZero)}e.sumLengths=n;function t(a,g){return a===g}e.lengthEquals=t;function r(a,g){const h=a,p=g;if(p-h<=0)return e.lengthZero;const w=Math.floor(h/m),E=Math.floor(p/m),k=p-E*m;if(w===E){const M=h-w*m;return _(0,k-M)}else return _(E-w,k)}e.lengthDiffNonNegative=r;function u(a,g){return a=g}e.lengthGreaterThanEqual=d;function l(a){return _(a.lineNumber-1,a.column-1)}e.positionToLength=l;function o(a,g){const h=a,p=Math.floor(h/m),b=h-p*m,w=g,E=Math.floor(w/m),k=w-E*m;return new I.Range(p+1,b+1,E+1,k+1)}e.lengthsToRange=o;function c(a){const g=(0,L.splitLines)(a);return _(g.length-1,g[g.length-1].length)}e.lengthOfString=c}),define(te[177],ie([1,0,5,87]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BeforeEditPositionMapper=e.TextEditInfo=void 0;class y{static fromModelContentChanges(_){return _.map(C=>{const s=L.Range.lift(C.range);return new y((0,I.positionToLength)(s.getStartPosition()),(0,I.positionToLength)(s.getEndPosition()),(0,I.lengthOfString)(C.text))}).reverse()}constructor(_,v,C){this.startOffset=_,this.endOffset=v,this.newLength=C}toString(){return`[${(0,I.lengthToObj)(this.startOffset)}...${(0,I.lengthToObj)(this.endOffset)}) -> ${(0,I.lengthToObj)(this.newLength)}`}}e.TextEditInfo=y;class D{constructor(_){this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=_.map(v=>S.from(v))}getOffsetBeforeChange(_){return this.adjustNextEdit(_),this.translateCurToOld(_)}getDistanceToNextChange(_){this.adjustNextEdit(_);const v=this.edits[this.nextEditIdx],C=v?this.translateOldToCur(v.offsetObj):null;return C===null?null:(0,I.lengthDiffNonNegative)(_,C)}translateOldToCur(_){return _.lineCount===this.deltaLineIdxInOld?(0,I.toLength)(_.lineCount+this.deltaOldToNewLineCount,_.columnCount+this.deltaOldToNewColumnCount):(0,I.toLength)(_.lineCount+this.deltaOldToNewLineCount,_.columnCount)}translateCurToOld(_){const v=(0,I.lengthToObj)(_);return v.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,I.toLength)(v.lineCount-this.deltaOldToNewLineCount,v.columnCount-this.deltaOldToNewColumnCount):(0,I.toLength)(v.lineCount-this.deltaOldToNewLineCount,v.columnCount)}adjustNextEdit(_){for(;this.nextEditIdx!0)||[];return i&&l.unshift(i),l}const d=[];for(;i&&!(0,y.lengthIsZero)(f);){const[l,o]=i.splitAt(f);d.push(l),f=(0,y.lengthDiffNonNegative)(l.lengthAfter,f),i=o??C.dequeue()}return(0,y.lengthIsZero)(f)||d.push(new S(!1,f,f)),d}const t=[];function r(f,d,l){if(t.length>0&&(0,y.lengthEquals)(t[t.length-1].endOffset,f)){const o=t[t.length-1];t[t.length-1]=new I.TextEditInfo(o.startOffset,d,(0,y.lengthAdd)(o.newLength,l))}else t.push({startOffset:f,endOffset:d,newLength:l})}let u=y.lengthZero;for(const f of s){const d=n(f.lengthBefore);if(f.modified){const l=(0,y.sumLengths)(d,c=>c.lengthBefore),o=(0,y.lengthAdd)(u,l);r(u,o,f.lengthAfter),u=o}else for(const l of d){const o=u;u=(0,y.lengthAdd)(u,l.lengthBefore),l.modified&&r(o,u,l.lengthAfter)}}return t}e.combineTextEditInfos=D;class S{constructor(v,C,s){this.modified=v,this.lengthBefore=C,this.lengthAfter=s}splitAt(v){const C=(0,y.lengthDiffNonNegative)(v,this.lengthAfter);return(0,y.lengthEquals)(C,y.lengthZero)?[this,void 0]:this.modified?[new S(this.modified,this.lengthBefore,v),new S(this.modified,y.lengthZero,C)]:[new S(this.modified,v,v),new S(this.modified,C,C)]}toString(){return`${this.modified?"M":"U"}:${(0,y.lengthToObj)(this.lengthBefore)} -> ${(0,y.lengthToObj)(this.lengthAfter)}`}}function m(_){const v=[];let C=y.lengthZero;for(const s of _){const i=(0,y.lengthDiffNonNegative)(C,s.startOffset);(0,y.lengthIsZero)(i)||v.push(new S(!1,i,i));const n=(0,y.lengthDiffNonNegative)(s.startOffset,s.endOffset);v.push(new S(!0,n,s.newLength)),C=s.endOffset}return v}}),define(te[508],ie([1,0,87]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NodeReader=void 0;class I{constructor(m){this.lastOffset=L.lengthZero,this.nextNodes=[m],this.offsets=[L.lengthZero],this.idxs=[]}readLongestNodeAt(m,_){if((0,L.lengthLessThan)(m,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=m;;){const v=D(this.nextNodes);if(!v)return;const C=D(this.offsets);if((0,L.lengthLessThan)(m,C))return;if((0,L.lengthLessThan)(C,m))if((0,L.lengthAdd)(C,v.length)<=m)this.nextNodeAfterCurrent();else{const s=y(v);s!==-1?(this.nextNodes.push(v.getChild(s)),this.offsets.push(C),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(_(v))return this.nextNodeAfterCurrent(),v;{const s=y(v);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(v.getChild(s)),this.offsets.push(C),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const m=D(this.offsets),_=D(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const v=D(this.nextNodes),C=y(v,this.idxs[this.idxs.length-1]);if(C!==-1){this.nextNodes.push(v.getChild(C)),this.offsets.push((0,L.lengthAdd)(m,_.length)),this.idxs[this.idxs.length-1]=C;break}else this.idxs.pop()}}}e.NodeReader=I;function y(S,m=-1){for(;;){if(m++,m>=S.childrenLength)return-1;if(S.getChild(m))return m}}function D(S){return S.length>0?S[S.length-1]:void 0}}),define(te[126],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DenseKeyProvider=e.identityKeyProvider=e.SmallImmutableSet=void 0;const L=[];class I{static create(S,m){if(S<=128&&m.length===0){let _=I.cache[S];return _||(_=new I(S,m),I.cache[S]=_),_}return new I(S,m)}static getEmpty(){return this.empty}constructor(S,m){this.items=S,this.additionalItems=m}add(S,m){const _=m.getKey(S);let v=_>>5;if(v===0){const s=1<<_|this.items;return s===this.items?this:I.create(s,this.additionalItems)}v--;const C=this.additionalItems.slice(0);for(;C.length=v.length)return null;const r=C,u=v[r].listHeight;for(C++;C=2?y(r===0&&C===v.length?v:v.slice(r,C),!1):v[r]}let i=s(),n=s();if(!n)return i;for(let r=s();r;r=s())D(i,n)<=D(n,r)?(i=S(i,n),n=r):n=S(n,r);return S(i,n)}e.concat23Trees=I;function y(v,C=!1){if(v.length===0)return null;if(v.length===1)return v[0];let s=v.length;for(;s>3;){const i=s>>1;for(let n=0;n=3?v[2]:null,C)}e.concat23TreesOfSameHeight=y;function D(v,C){return Math.abs(v.listHeight-C.listHeight)}function S(v,C){return v.listHeight===C.listHeight?L.ListAstNode.create23(v,C,null,!1):v.listHeight>C.listHeight?m(v,C):_(C,v)}function m(v,C){v=v.toMutable();let s=v;const i=[];let n;for(;;){if(C.listHeight===s.listHeight){n=C;break}if(s.kind!==4)throw new Error("unexpected");i.push(s),s=s.makeLastElementMutable()}for(let t=i.length-1;t>=0;t--){const r=i[t];n?r.childrenLength>=3?n=L.ListAstNode.create23(r.unappendChild(),n,null,!1):(r.appendChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?L.ListAstNode.create23(v,n,null,!1):v}function _(v,C){v=v.toMutable();let s=v;const i=[];for(;C.listHeight!==s.listHeight;){if(s.kind!==4)throw new Error("unexpected");i.push(s),s=s.makeFirstElementMutable()}let n=C;for(let t=i.length-1;t>=0;t--){const r=i[t];n?r.childrenLength>=3?n=L.ListAstNode.create23(n,r.unprependChild(),null,!1):(r.prependChildOfSameHeight(n),n=void 0):r.handleChildrenChanged()}return n?L.ListAstNode.create23(n,v,null,!1):v}}),define(te[282],ie([1,0,178,177,126,87,509,508]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseDocument=void 0;function _(C,s,i,n){return new v(C,s,i,n).parseDocument()}e.parseDocument=_;class v{constructor(s,i,n,t){if(this.tokenizer=s,this.createImmutableLists=t,this._itemsConstructed=0,this._itemsFromCache=0,n&&t)throw new Error("Not supported");this.oldNodeReader=n?new m.NodeReader(n):void 0,this.positionMapper=new I.BeforeEditPositionMapper(i)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let s=this.parseList(y.SmallImmutableSet.getEmpty(),0);return s||(s=L.ListAstNode.getEmpty()),s}parseList(s,i){const n=[];for(;;){let r=this.tryReadChildFromCache(s);if(!r){const u=this.tokenizer.peek();if(!u||u.kind===2&&u.bracketIds.intersects(s))break;r=this.parseChild(s,i+1)}r.kind===4&&r.childrenLength===0||n.push(r)}return this.oldNodeReader?(0,S.concat23Trees)(n):(0,S.concat23TreesOfSameHeight)(n,this.createImmutableLists)}tryReadChildFromCache(s){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(i===null||!(0,D.lengthIsZero)(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),t=>i!==null&&!(0,D.lengthLessThan)(t.length,i)?!1:t.canBeReused(s));if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}}parseChild(s,i){this._itemsConstructed++;const n=this.tokenizer.read();switch(n.kind){case 2:return new L.InvalidBracketAstNode(n.bracketIds,n.length);case 0:return n.astNode;case 1:{if(i>300)return new L.TextAstNode(n.length);const t=s.merge(n.bracketIds),r=this.parseList(t,i+1),u=this.tokenizer.peek();return u&&u.kind===2&&(u.bracketId===n.bracketId||u.bracketIds.intersects(n.bracketIds))?(this.tokenizer.read(),L.PairAstNode.create(n.astNode,r,u.astNode)):L.PairAstNode.create(n.astNode,r,null)}default:throw new Error("unexpected")}}}}),define(te[207],ie([1,0,9,124,178,87,126]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FastTokenizer=e.TextBufferTokenizer=e.Token=void 0;class m{constructor(i,n,t,r,u){this.length=i,this.kind=n,this.bracketId=t,this.bracketIds=r,this.astNode=u}}e.Token=m;class _{constructor(i,n){this.textModel=i,this.bracketTokens=n,this.reader=new v(this.textModel,this.bracketTokens),this._offset=D.lengthZero,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=i.getLineCount(),this.textBufferLastLineLength=i.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,D.toLength)(this.textBufferLineCount-1,this.textBufferLastLineLength)}skip(i){this.didPeek=!1,this._offset=(0,D.lengthAdd)(this._offset,i);const n=(0,D.lengthToObj)(this._offset);this.reader.setPosition(n.lineCount,n.columnCount)}read(){let i;return this.peeked?(this.didPeek=!1,i=this.peeked):i=this.reader.read(),i&&(this._offset=(0,D.lengthAdd)(this._offset,i.length)),i}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}e.TextBufferTokenizer=_;class v{constructor(i,n){this.textModel=i,this.bracketTokens=n,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=i.getLineCount(),this.textBufferLastLineLength=i.getLineLength(this.textBufferLineCount)}setPosition(i,n){i===this.lineIdx?(this.lineCharOffset=n,this.line!==null&&(this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset))):(this.lineIdx=i,this.lineCharOffset=n,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const u=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,D.lengthGetColumnCountIfZeroLineCount)(u.length),u}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.tokenization.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const i=this.lineIdx,n=this.lineCharOffset;let t=0;for(;;){const u=this.lineTokens,f=u.getCount();let d=null;if(this.lineTokenOffset1e3))break;if(t>1500)break}const r=(0,D.lengthDiff)(i,n,this.lineIdx,this.lineCharOffset);return new m(r,0,-1,S.SmallImmutableSet.getEmpty(),new y.TextAstNode(r))}}class C{constructor(i,n){this.text=i,this._offset=D.lengthZero,this.idx=0;const t=n.getRegExpStr(),r=t?new RegExp(t+`| -`,"gi"):null,u=[];let f,d=0,l=0,o=0,c=0;const a=[];for(let p=0;p<60;p++)a.push(new m((0,D.toLength)(0,p),0,-1,S.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,D.toLength)(0,p))));const g=[];for(let p=0;p<60;p++)g.push(new m((0,D.toLength)(1,p),0,-1,S.SmallImmutableSet.getEmpty(),new y.TextAstNode((0,D.toLength)(1,p))));if(r)for(r.lastIndex=0;(f=r.exec(i))!==null;){const p=f.index,b=f[0];if(b===` -`)d++,l=p+1;else{if(o!==p){let w;if(c===d){const E=p-o;if(E_(i)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const s=this.getRegExpStr();this._regExpGlobal=s?new RegExp(s,"gi"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(s){return this.map.get(s.toLowerCase())}findClosingTokenText(s){for(const[i,n]of this.map)if(n.kind===2&&n.bracketIds.intersects(s))return i}get isEmpty(){return this.map.size===0}}e.BracketTokens=m;function _(C){let s=(0,L.escapeRegExpCharacters)(C);return/^[\w ]+/.test(C)&&(s=`\\b${s}`),/[\w ]+$/.test(C)&&(s=`${s}\\b`),s}class v{constructor(s,i){this.denseKeyProvider=s,this.getLanguageConfiguration=i,this.languageIdToBracketTokens=new Map}didLanguageChange(s){return this.languageIdToBracketTokens.has(s)}getSingleLanguageBracketTokens(s){let i=this.languageIdToBracketTokens.get(s);return i||(i=m.createFromLanguage(this.getLanguageConfiguration(s),this.denseKeyProvider),this.languageIdToBracketTokens.set(s,i)),i}}e.LanguageAgnosticBracketTokens=v}),define(te[510],ie([1,0,283,87,282,126,207]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fixBracketsInLine=void 0;function m(v,C){const s=new D.DenseKeyProvider,i=new L.LanguageAgnosticBracketTokens(s,d=>C.getLanguageConfiguration(d)),n=new S.TextBufferTokenizer(new _([v]),i),t=(0,y.parseDocument)(n,[],void 0,!0);let r="";const u=v.getLineContent();function f(d,l){if(d.kind===2)if(f(d.openingBracket,l),l=(0,I.lengthAdd)(l,d.openingBracket.length),d.child&&(f(d.child,l),l=(0,I.lengthAdd)(l,d.child.length)),d.closingBracket)f(d.closingBracket,l),l=(0,I.lengthAdd)(l,d.closingBracket.length);else{const c=i.getSingleLanguageBracketTokens(d.openingBracket.languageId).findClosingTokenText(d.openingBracket.bracketIds);r+=c}else if(d.kind!==3){if(d.kind===0||d.kind===1)r+=u.substring((0,I.lengthGetColumnCountIfZeroLineCount)(l),(0,I.lengthGetColumnCountIfZeroLineCount)((0,I.lengthAdd)(l,d.length)));else if(d.kind===4)for(const o of d.children)f(o,l),l=(0,I.lengthAdd)(l,o.length)}}return f(t,I.lengthZero),r}e.fixBracketsInLine=m;class _{constructor(C){this.lines=C,this.tokenization={getLineTokens:s=>this.lines[s-1]}}getLineCount(){return this.lines.length}getLineLength(C){return this.lines[C-1].getLineContent().length}}}),define(te[511],ie([1,0,13]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FixedArray=void 0;class I{constructor(S){this._default=S,this._store=[]}get(S){return S=this._store.length;)this._store[this._store.length]=this._default;this._store[S]=m}replace(S,m,_){if(S>=this._store.length)return;if(m===0){this.insert(S,_);return}else if(_===0){this.delete(S,m);return}const v=this._store.slice(0,S),C=this._store.slice(S+m),s=y(_,this._default);this._store=v.concat(s,C)}delete(S,m){m===0||S>=this._store.length||this._store.splice(S,m)}insert(S,m){if(m===0||S>=this._store.length)return;const _=[];for(let v=0;v0&&i>0||n>0&&t>0)return;const r=Math.abs(i-t),u=Math.abs(s-n);if(r===0){v.spacesDiff=u,u>0&&0<=n-1&&n-10?v++:p>1&&C++,I(s,i,c,h,u),u.looksLikeAlignment&&!(m&&S===u.spacesDiff)))continue;const w=u.spacesDiff;w<=t&&r[w]++,s=c,i=h}let f=m;v!==C&&(f=v{const c=r[o];c>l&&(l=c,d=o)}),d===4&&r[4]>0&&r[2]>0&&r[2]>=r[4]/2&&(d=2)}return{insertSpaces:f,tabSize:d}}e.guessIndentation=y}),define(te[513],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.intervalCompare=e.recomputeMaxEnd=e.nodeAcceptEdit=e.IntervalTree=e.SENTINEL=e.IntervalNode=e.getNodeColor=void 0;function L(P){return(P.metadata&1)>>>0}e.getNodeColor=L;function I(P,O){P.metadata=P.metadata&254|O<<0}function y(P){return(P.metadata&2)>>>1===1}function D(P,O){P.metadata=P.metadata&253|(O?1:0)<<1}function S(P){return(P.metadata&4)>>>2===1}function m(P,O){P.metadata=P.metadata&251|(O?1:0)<<2}function _(P){return(P.metadata&64)>>>6===1}function v(P,O){P.metadata=P.metadata&191|(O?1:0)<<6}function C(P){return(P.metadata&24)>>>3}function s(P,O){P.metadata=P.metadata&231|O<<3}function i(P){return(P.metadata&32)>>>5===1}function n(P,O){P.metadata=P.metadata&223|(O?1:0)<<5}class t{constructor(O,x,W){this.metadata=0,this.parent=this,this.left=this,this.right=this,I(this,1),this.start=x,this.end=W,this.delta=0,this.maxEnd=W,this.id=O,this.ownerId=0,this.options=null,m(this,!1),v(this,!1),s(this,1),n(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=x,this.cachedAbsoluteEnd=W,this.range=null,D(this,!1)}reset(O,x,W,U){this.start=x,this.end=W,this.maxEnd=W,this.cachedVersionId=O,this.cachedAbsoluteStart=x,this.cachedAbsoluteEnd=W,this.range=U}setOptions(O){this.options=O;const x=this.options.className;m(this,x==="squiggly-error"||x==="squiggly-warning"||x==="squiggly-info"),v(this,this.options.glyphMarginClassName!==null),s(this,this.options.stickiness),n(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(O,x,W){this.cachedVersionId!==W&&(this.range=null),this.cachedVersionId=W,this.cachedAbsoluteStart=O,this.cachedAbsoluteEnd=x}detach(){this.parent=null,this.left=null,this.right=null}}e.IntervalNode=t,e.SENTINEL=new t(null,0,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,I(e.SENTINEL,0);class r{constructor(){this.root=e.SENTINEL,this.requestNormalizeDelta=!1}intervalSearch(O,x,W,U,F,G){return this.root===e.SENTINEL?[]:h(this,O,x,W,U,F,G)}search(O,x,W,U){return this.root===e.SENTINEL?[]:g(this,O,x,W,U)}collectNodesFromOwner(O){return c(this,O)}collectNodesPostOrder(){return a(this)}insert(O){p(this,O),this._normalizeDeltaIfNecessary()}delete(O){w(this,O),this._normalizeDeltaIfNecessary()}resolveNode(O,x){const W=O;let U=0;for(;O!==this.root;)O===O.parent.right&&(U+=O.parent.delta),O=O.parent;const F=W.start+U,G=W.end+U;W.setCachedOffsets(F,G,x)}acceptReplace(O,x,W,U){const F=l(this,O,O+x);for(let G=0,Y=F.length;Gx||W===1?!1:W===2?!0:O}function d(P,O,x,W,U){const F=C(P),G=F===0||F===2,Y=F===1||F===2,ne=x-O,se=W,J=Math.min(ne,se),q=P.start;let H=!1;const V=P.end;let Z=!1;O<=q&&V<=x&&i(P)&&(P.start=O,H=!0,P.end=O,Z=!0);{const le=U?1:ne>0?2:0;!H&&f(q,G,O,le)&&(H=!0),!Z&&f(V,Y,O,le)&&(Z=!0)}if(J>0&&!U){const le=ne>se?2:0;!H&&f(q,G,O+J,le)&&(H=!0),!Z&&f(V,Y,O+J,le)&&(Z=!0)}{const le=U?1:0;!H&&f(q,G,x,le)&&(P.start=O+se,H=!0),!Z&&f(V,Y,x,le)&&(P.end=O+se,Z=!0)}const ee=se-ne;H||(P.start=Math.max(0,q+ee)),Z||(P.end=Math.max(0,V+ee)),P.start>P.end&&(P.end=P.start)}e.nodeAcceptEdit=d;function l(P,O,x){let W=P.root,U=0,F=0,G=0,Y=0;const ne=[];let se=0;for(;W!==e.SENTINEL;){if(y(W)){D(W.left,!1),D(W.right,!1),W===W.parent.right&&(U-=W.parent.delta),W=W.parent;continue}if(!y(W.left)){if(F=U+W.maxEnd,Fx){D(W,!0);continue}if(Y=U+W.end,Y>=O&&(W.setCachedOffsets(G,Y,0),ne[se++]=W),D(W,!0),W.right!==e.SENTINEL&&!y(W.right)){U+=W.delta,W=W.right;continue}}return D(P.root,!1),ne}function o(P,O,x,W){let U=P.root,F=0,G=0,Y=0;const ne=W-(x-O);for(;U!==e.SENTINEL;){if(y(U)){D(U.left,!1),D(U.right,!1),U===U.parent.right&&(F-=U.parent.delta),T(U),U=U.parent;continue}if(!y(U.left)){if(G=F+U.maxEnd,Gx){U.start+=ne,U.end+=ne,U.delta+=ne,(U.delta<-1073741824||U.delta>1073741824)&&(P.requestNormalizeDelta=!0),D(U,!0);continue}if(D(U,!0),U.right!==e.SENTINEL&&!y(U.right)){F+=U.delta,U=U.right;continue}}D(P.root,!1)}function c(P,O){let x=P.root;const W=[];let U=0;for(;x!==e.SENTINEL;){if(y(x)){D(x.left,!1),D(x.right,!1),x=x.parent;continue}if(x.left!==e.SENTINEL&&!y(x.left)){x=x.left;continue}if(x.ownerId===O&&(W[U++]=x),D(x,!0),x.right!==e.SENTINEL&&!y(x.right)){x=x.right;continue}}return D(P.root,!1),W}function a(P){let O=P.root;const x=[];let W=0;for(;O!==e.SENTINEL;){if(y(O)){D(O.left,!1),D(O.right,!1),O=O.parent;continue}if(O.left!==e.SENTINEL&&!y(O.left)){O=O.left;continue}if(O.right!==e.SENTINEL&&!y(O.right)){O=O.right;continue}x[W++]=O,D(O,!0)}return D(P.root,!1),x}function g(P,O,x,W,U){let F=P.root,G=0,Y=0,ne=0;const se=[];let J=0;for(;F!==e.SENTINEL;){if(y(F)){D(F.left,!1),D(F.right,!1),F===F.parent.right&&(G-=F.parent.delta),F=F.parent;continue}if(F.left!==e.SENTINEL&&!y(F.left)){F=F.left;continue}Y=G+F.start,ne=G+F.end,F.setCachedOffsets(Y,ne,W);let q=!0;if(O&&F.ownerId&&F.ownerId!==O&&(q=!1),x&&S(F)&&(q=!1),U&&!_(F)&&(q=!1),q&&(se[J++]=F),D(F,!0),F.right!==e.SENTINEL&&!y(F.right)){G+=F.delta,F=F.right;continue}}return D(P.root,!1),se}function h(P,O,x,W,U,F,G){let Y=P.root,ne=0,se=0,J=0,q=0;const H=[];let V=0;for(;Y!==e.SENTINEL;){if(y(Y)){D(Y.left,!1),D(Y.right,!1),Y===Y.parent.right&&(ne-=Y.parent.delta),Y=Y.parent;continue}if(!y(Y.left)){if(se=ne+Y.maxEnd,sex){D(Y,!0);continue}if(q=ne+Y.end,q>=O){Y.setCachedOffsets(J,q,F);let Z=!0;W&&Y.ownerId&&Y.ownerId!==W&&(Z=!1),U&&S(Y)&&(Z=!1),G&&!_(Y)&&(Z=!1),Z&&(H[V++]=Y)}if(D(Y,!0),Y.right!==e.SENTINEL&&!y(Y.right)){ne+=Y.delta,Y=Y.right;continue}}return D(P.root,!1),H}function p(P,O){if(P.root===e.SENTINEL)return O.parent=e.SENTINEL,O.left=e.SENTINEL,O.right=e.SENTINEL,I(O,0),P.root=O,P.root;b(P,O),N(O.parent);let x=O;for(;x!==P.root&&L(x.parent)===1;)if(x.parent===x.parent.parent.left){const W=x.parent.parent.right;L(W)===1?(I(x.parent,0),I(W,0),I(x.parent.parent,1),x=x.parent.parent):(x===x.parent.right&&(x=x.parent,M(P,x)),I(x.parent,0),I(x.parent.parent,1),R(P,x.parent.parent))}else{const W=x.parent.parent.left;L(W)===1?(I(x.parent,0),I(W,0),I(x.parent.parent,1),x=x.parent.parent):(x===x.parent.left&&(x=x.parent,R(P,x)),I(x.parent,0),I(x.parent.parent,1),M(P,x.parent.parent))}return I(P.root,0),O}function b(P,O){let x=0,W=P.root;const U=O.start,F=O.end;for(;;)if(A(U,F,W.start+x,W.end+x)<0)if(W.left===e.SENTINEL){O.start-=x,O.end-=x,O.maxEnd-=x,W.left=O;break}else W=W.left;else if(W.right===e.SENTINEL){O.start-=x+W.delta,O.end-=x+W.delta,O.maxEnd-=x+W.delta,W.right=O;break}else x+=W.delta,W=W.right;O.parent=W,O.left=e.SENTINEL,O.right=e.SENTINEL,I(O,1)}function w(P,O){let x,W;if(O.left===e.SENTINEL?(x=O.right,W=O,x.delta+=O.delta,(x.delta<-1073741824||x.delta>1073741824)&&(P.requestNormalizeDelta=!0),x.start+=O.delta,x.end+=O.delta):O.right===e.SENTINEL?(x=O.left,W=O):(W=E(O.right),x=W.right,x.start+=W.delta,x.end+=W.delta,x.delta+=W.delta,(x.delta<-1073741824||x.delta>1073741824)&&(P.requestNormalizeDelta=!0),W.start+=O.delta,W.end+=O.delta,W.delta=O.delta,(W.delta<-1073741824||W.delta>1073741824)&&(P.requestNormalizeDelta=!0)),W===P.root){P.root=x,I(x,0),O.detach(),k(),T(x),P.root.parent=e.SENTINEL;return}const U=L(W)===1;if(W===W.parent.left?W.parent.left=x:W.parent.right=x,W===O?x.parent=W.parent:(W.parent===O?x.parent=W:x.parent=W.parent,W.left=O.left,W.right=O.right,W.parent=O.parent,I(W,L(O)),O===P.root?P.root=W:O===O.parent.left?O.parent.left=W:O.parent.right=W,W.left!==e.SENTINEL&&(W.left.parent=W),W.right!==e.SENTINEL&&(W.right.parent=W)),O.detach(),U){N(x.parent),W!==O&&(N(W),N(W.parent)),k();return}N(x),N(x.parent),W!==O&&(N(W),N(W.parent));let F;for(;x!==P.root&&L(x)===0;)x===x.parent.left?(F=x.parent.right,L(F)===1&&(I(F,0),I(x.parent,1),M(P,x.parent),F=x.parent.right),L(F.left)===0&&L(F.right)===0?(I(F,1),x=x.parent):(L(F.right)===0&&(I(F.left,0),I(F,1),R(P,F),F=x.parent.right),I(F,L(x.parent)),I(x.parent,0),I(F.right,0),M(P,x.parent),x=P.root)):(F=x.parent.left,L(F)===1&&(I(F,0),I(x.parent,1),R(P,x.parent),F=x.parent.left),L(F.left)===0&&L(F.right)===0?(I(F,1),x=x.parent):(L(F.left)===0&&(I(F.right,0),I(F,1),M(P,F),F=x.parent.left),I(F,L(x.parent)),I(x.parent,0),I(F.left,0),R(P,x.parent),x=P.root));I(x,0),k()}function E(P){for(;P.left!==e.SENTINEL;)P=P.left;return P}function k(){e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.delta=0,e.SENTINEL.start=0,e.SENTINEL.end=0}function M(P,O){const x=O.right;x.delta+=O.delta,(x.delta<-1073741824||x.delta>1073741824)&&(P.requestNormalizeDelta=!0),x.start+=O.delta,x.end+=O.delta,O.right=x.left,x.left!==e.SENTINEL&&(x.left.parent=O),x.parent=O.parent,O.parent===e.SENTINEL?P.root=x:O===O.parent.left?O.parent.left=x:O.parent.right=x,x.left=O,O.parent=x,T(O),T(x)}function R(P,O){const x=O.left;O.delta-=x.delta,(O.delta<-1073741824||O.delta>1073741824)&&(P.requestNormalizeDelta=!0),O.start-=x.delta,O.end-=x.delta,O.left=x.right,x.right!==e.SENTINEL&&(x.right.parent=O),x.parent=O.parent,O.parent===e.SENTINEL?P.root=x:O===O.parent.right?O.parent.right=x:O.parent.left=x,x.right=O,O.parent=x,T(O),T(x)}function B(P){let O=P.end;if(P.left!==e.SENTINEL){const x=P.left.maxEnd;x>O&&(O=x)}if(P.right!==e.SENTINEL){const x=P.right.maxEnd+P.delta;x>O&&(O=x)}return O}function T(P){P.maxEnd=B(P)}e.recomputeMaxEnd=T;function N(P){for(;P!==e.SENTINEL;){const O=B(P);if(P.maxEnd===O)return;P.maxEnd=O,P=P.parent}}function A(P,O,x,W){return P===x?O-W:P-x}e.intervalCompare=A}),define(te[514],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.recomputeTreeMetadata=e.updateTreeMetadata=e.fixInsert=e.rbDelete=e.rightRotate=e.leftRotate=e.righttest=e.leftest=e.SENTINEL=e.TreeNode=void 0;class L{constructor(r,u){this.piece=r,this.color=u,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==e.SENTINEL)return I(this.right);let r=this;for(;r.parent!==e.SENTINEL&&r.parent.left!==r;)r=r.parent;return r.parent===e.SENTINEL?e.SENTINEL:r.parent}prev(){if(this.left!==e.SENTINEL)return y(this.left);let r=this;for(;r.parent!==e.SENTINEL&&r.parent.right!==r;)r=r.parent;return r.parent===e.SENTINEL?e.SENTINEL:r.parent}detach(){this.parent=null,this.left=null,this.right=null}}e.TreeNode=L,e.SENTINEL=new L(null,0),e.SENTINEL.parent=e.SENTINEL,e.SENTINEL.left=e.SENTINEL,e.SENTINEL.right=e.SENTINEL,e.SENTINEL.color=0;function I(t){for(;t.left!==e.SENTINEL;)t=t.left;return t}e.leftest=I;function y(t){for(;t.right!==e.SENTINEL;)t=t.right;return t}e.righttest=y;function D(t){return t===e.SENTINEL?0:t.size_left+t.piece.length+D(t.right)}function S(t){return t===e.SENTINEL?0:t.lf_left+t.piece.lineFeedCnt+S(t.right)}function m(){e.SENTINEL.parent=e.SENTINEL}function _(t,r){const u=r.right;u.size_left+=r.size_left+(r.piece?r.piece.length:0),u.lf_left+=r.lf_left+(r.piece?r.piece.lineFeedCnt:0),r.right=u.left,u.left!==e.SENTINEL&&(u.left.parent=r),u.parent=r.parent,r.parent===e.SENTINEL?t.root=u:r.parent.left===r?r.parent.left=u:r.parent.right=u,u.left=r,r.parent=u}e.leftRotate=_;function v(t,r){const u=r.left;r.left=u.right,u.right!==e.SENTINEL&&(u.right.parent=r),u.parent=r.parent,r.size_left-=u.size_left+(u.piece?u.piece.length:0),r.lf_left-=u.lf_left+(u.piece?u.piece.lineFeedCnt:0),r.parent===e.SENTINEL?t.root=u:r===r.parent.right?r.parent.right=u:r.parent.left=u,u.right=r,r.parent=u}e.rightRotate=v;function C(t,r){let u,f;if(r.left===e.SENTINEL?(f=r,u=f.right):r.right===e.SENTINEL?(f=r,u=f.left):(f=I(r.right),u=f.right),f===t.root){t.root=u,u.color=0,r.detach(),m(),t.root.parent=e.SENTINEL;return}const d=f.color===1;if(f===f.parent.left?f.parent.left=u:f.parent.right=u,f===r?(u.parent=f.parent,n(t,u)):(f.parent===r?u.parent=f:u.parent=f.parent,n(t,u),f.left=r.left,f.right=r.right,f.parent=r.parent,f.color=r.color,r===t.root?t.root=f:r===r.parent.left?r.parent.left=f:r.parent.right=f,f.left!==e.SENTINEL&&(f.left.parent=f),f.right!==e.SENTINEL&&(f.right.parent=f),f.size_left=r.size_left,f.lf_left=r.lf_left,n(t,f)),r.detach(),u.parent.left===u){const o=D(u),c=S(u);if(o!==u.parent.size_left||c!==u.parent.lf_left){const a=o-u.parent.size_left,g=c-u.parent.lf_left;u.parent.size_left=o,u.parent.lf_left=c,i(t,u.parent,a,g)}}if(n(t,u.parent),d){m();return}let l;for(;u!==t.root&&u.color===0;)u===u.parent.left?(l=u.parent.right,l.color===1&&(l.color=0,u.parent.color=1,_(t,u.parent),l=u.parent.right),l.left.color===0&&l.right.color===0?(l.color=1,u=u.parent):(l.right.color===0&&(l.left.color=0,l.color=1,v(t,l),l=u.parent.right),l.color=u.parent.color,u.parent.color=0,l.right.color=0,_(t,u.parent),u=t.root)):(l=u.parent.left,l.color===1&&(l.color=0,u.parent.color=1,v(t,u.parent),l=u.parent.left),l.left.color===0&&l.right.color===0?(l.color=1,u=u.parent):(l.left.color===0&&(l.right.color=0,l.color=1,_(t,l),l=u.parent.left),l.color=u.parent.color,u.parent.color=0,l.left.color=0,v(t,u.parent),u=t.root));u.color=0,m()}e.rbDelete=C;function s(t,r){for(n(t,r);r!==t.root&&r.parent.color===1;)if(r.parent===r.parent.parent.left){const u=r.parent.parent.right;u.color===1?(r.parent.color=0,u.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.right&&(r=r.parent,_(t,r)),r.parent.color=0,r.parent.parent.color=1,v(t,r.parent.parent))}else{const u=r.parent.parent.left;u.color===1?(r.parent.color=0,u.color=0,r.parent.parent.color=1,r=r.parent.parent):(r===r.parent.left&&(r=r.parent,v(t,r)),r.parent.color=0,r.parent.parent.color=1,_(t,r.parent.parent))}t.root.color=0}e.fixInsert=s;function i(t,r,u,f){for(;r!==t.root&&r!==e.SENTINEL;)r.parent.left===r&&(r.parent.size_left+=u,r.parent.lf_left+=f),r=r.parent}e.updateTreeMetadata=i;function n(t,r){let u=0,f=0;if(r!==t.root){for(;r!==t.root&&r===r.parent.right;)r=r.parent;if(r!==t.root)for(r=r.parent,u=D(r.left)-r.size_left,f=S(r.left)-r.lf_left,r.size_left+=u,r.lf_left+=f;r!==t.root&&(u!==0||f!==0);)r.parent.left===r&&(r.parent.size_left+=u,r.parent.lf_left+=f),r=r.parent}}e.recomputeTreeMetadata=n}),define(te[284],ie([1,0,13,168]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PrefixSumIndexOfResult=e.ConstantTimePrefixSumComputer=e.PrefixSumComputer=void 0;class y{constructor(_){this.values=_,this.prefixSum=new Uint32Array(_.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(_,v){_=(0,I.toUint32)(_);const C=this.values,s=this.prefixSum,i=v.length;return i===0?!1:(this.values=new Uint32Array(C.length+i),this.values.set(C.subarray(0,_),0),this.values.set(C.subarray(_),_+i),this.values.set(v,_),_-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(_,v){return _=(0,I.toUint32)(_),v=(0,I.toUint32)(v),this.values[_]===v?!1:(this.values[_]=v,_-1=C.length)return!1;const i=C.length-_;return v>=i&&(v=i),v===0?!1:(this.values=new Uint32Array(C.length-v),this.values.set(C.subarray(0,_),0),this.values.set(C.subarray(_+v),_),this.prefixSum=new Uint32Array(this.values.length),_-1=0&&this.prefixSum.set(s.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(_){return _<0?0:(_=(0,I.toUint32)(_),this._getPrefixSum(_))}_getPrefixSum(_){if(_<=this.prefixSumValidIndex[0])return this.prefixSum[_];let v=this.prefixSumValidIndex[0]+1;v===0&&(this.prefixSum[0]=this.values[0],v++),_>=this.values.length&&(_=this.values.length-1);for(let C=v;C<=_;C++)this.prefixSum[C]=this.prefixSum[C-1]+this.values[C];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],_),this.prefixSum[_]}getIndexOf(_){_=Math.floor(_),this.getTotalSum();let v=0,C=this.values.length-1,s=0,i=0,n=0;for(;v<=C;)if(s=v+(C-v)/2|0,i=this.prefixSum[s],n=i-this.values[s],_=i)v=s+1;else break;return new S(s,_-n)}}e.PrefixSumComputer=y;class D{constructor(_){this._values=_,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(_){return this._ensureValid(),_===0?0:this._prefixSum[_-1]}getIndexOf(_){this._ensureValid();const v=this._indexBySum[_],C=v>0?this._prefixSum[v-1]:0;return new S(v,_-C)}removeValues(_,v){this._values.splice(_,v),this._invalidate(_)}insertValues(_,v){this._values=(0,L.arrayInsert)(this._values,_,v),this._invalidate(_)}_invalidate(_){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,_-1)}_ensureValid(){if(!this._isValid){for(let _=this._validEndIndex+1,v=this._values.length;_0?this._prefixSum[_-1]:0;this._prefixSum[_]=s+C;for(let i=0;i=0;let l=null;try{l=L.createRegExp(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:d,global:!0,unicode:!0})}catch{return null}if(!l)return null;let o=!this.isRegex&&!d;return o&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(o=this.matchCase),new S.SearchData(l,this.wordSeparators?(0,I.getMapForWordSeparators)(this.wordSeparators):null,o?this.searchString:null)}}e.SearchParams=_;function v(f){if(!f||f.length===0)return!1;for(let d=0,l=f.length;d=l)break;const c=f.charCodeAt(d);if(c===110||c===114||c===87)return!0}}return!1}e.isMultilineRegexSource=v;function C(f,d,l){if(!l)return new S.FindMatch(f,null);const o=[];for(let c=0,a=d.length;c>0);l[a]>=d?c=a-1:l[a+1]>=d?(o=a,c=a):o=a+1}return o+1}}class i{static findMatches(d,l,o,c,a){const g=l.parseSearchRequest();return g?g.regex.multiline?this._doFindMatchesMultiline(d,o,new u(g.wordSeparators,g.regex),c,a):this._doFindMatchesLineByLine(d,o,g,c,a):[]}static _getMultilineMatchRange(d,l,o,c,a,g){let h,p=0;c?(p=c.findLineFeedCountBeforeOffset(a),h=l+a+p):h=l+a;let b;if(c){const M=c.findLineFeedCountBeforeOffset(a+g.length)-p;b=h+g.length+M}else b=h+g.length;const w=d.getPositionAt(h),E=d.getPositionAt(b);return new D.Range(w.lineNumber,w.column,E.lineNumber,E.column)}static _doFindMatchesMultiline(d,l,o,c,a){const g=d.getOffsetAt(l.getStartPosition()),h=d.getValueInRange(l,1),p=d.getEOL()===`\r -`?new s(h):null,b=[];let w=0,E;for(o.reset(0);E=o.next(h);)if(b[w++]=C(this._getMultilineMatchRange(d,g,h,p,E.index,E[0]),E,c),w>=a)return b;return b}static _doFindMatchesLineByLine(d,l,o,c,a){const g=[];let h=0;if(l.startLineNumber===l.endLineNumber){const b=d.getLineContent(l.startLineNumber).substring(l.startColumn-1,l.endColumn-1);return h=this._findMatchesInLine(o,b,l.startLineNumber,l.startColumn-1,h,g,c,a),g}const p=d.getLineContent(l.startLineNumber).substring(l.startColumn-1);h=this._findMatchesInLine(o,p,l.startLineNumber,l.startColumn-1,h,g,c,a);for(let b=l.startLineNumber+1;b=p))return a;return a}const w=new u(d.wordSeparators,d.regex);let E;w.reset(0);do if(E=w.next(l),E&&(g[a++]=C(new D.Range(o,E.index+1+c,o,E.index+1+E[0].length+c),E,h),a>=p))return a;while(E);return a}static findNextMatch(d,l,o,c){const a=l.parseSearchRequest();if(!a)return null;const g=new u(a.wordSeparators,a.regex);return a.regex.multiline?this._doFindNextMatchMultiline(d,o,g,c):this._doFindNextMatchLineByLine(d,o,g,c)}static _doFindNextMatchMultiline(d,l,o,c){const a=new y.Position(l.lineNumber,1),g=d.getOffsetAt(a),h=d.getLineCount(),p=d.getValueInRange(new D.Range(a.lineNumber,a.column,h,d.getLineMaxColumn(h)),1),b=d.getEOL()===`\r -`?new s(p):null;o.reset(l.column-1);const w=o.next(p);return w?C(this._getMultilineMatchRange(d,g,p,b,w.index,w[0]),w,c):l.lineNumber!==1||l.column!==1?this._doFindNextMatchMultiline(d,new y.Position(1,1),o,c):null}static _doFindNextMatchLineByLine(d,l,o,c){const a=d.getLineCount(),g=l.lineNumber,h=d.getLineContent(g),p=this._findFirstMatchInLine(o,h,g,l.column,c);if(p)return p;for(let b=1;b<=a;b++){const w=(g+b-1)%a,E=d.getLineContent(w+1),k=this._findFirstMatchInLine(o,E,w+1,1,c);if(k)return k}return null}static _findFirstMatchInLine(d,l,o,c,a){d.reset(c-1);const g=d.next(l);return g?C(new D.Range(o,g.index+1,o,g.index+1+g[0].length),g,a):null}static findPreviousMatch(d,l,o,c){const a=l.parseSearchRequest();if(!a)return null;const g=new u(a.wordSeparators,a.regex);return a.regex.multiline?this._doFindPreviousMatchMultiline(d,o,g,c):this._doFindPreviousMatchLineByLine(d,o,g,c)}static _doFindPreviousMatchMultiline(d,l,o,c){const a=this._doFindMatchesMultiline(d,new D.Range(1,1,l.lineNumber,l.column),o,c,10*m);if(a.length>0)return a[a.length-1];const g=d.getLineCount();return l.lineNumber!==g||l.column!==d.getLineMaxColumn(g)?this._doFindPreviousMatchMultiline(d,new y.Position(g,d.getLineMaxColumn(g)),o,c):null}static _doFindPreviousMatchLineByLine(d,l,o,c){const a=d.getLineCount(),g=l.lineNumber,h=d.getLineContent(g).substring(0,l.column-1),p=this._findLastMatchInLine(o,h,g,c);if(p)return p;for(let b=1;b<=a;b++){const w=(a+g-b-1)%a,E=d.getLineContent(w+1),k=this._findLastMatchInLine(o,E,w+1,c);if(k)return k}return null}static _findLastMatchInLine(d,l,o,c){let a=null,g;for(d.reset(0);g=d.next(l);)a=C(new D.Range(o,g.index+1,o,g.index+1+g[0].length),g,c);return a}}e.TextModelSearch=i;function n(f,d,l,o,c){if(o===0)return!0;const a=d.charCodeAt(o-1);if(f.get(a)!==0||a===13||a===10)return!0;if(c>0){const g=d.charCodeAt(o);if(f.get(g)!==0)return!0}return!1}function t(f,d,l,o,c){if(o+c===l)return!0;const a=d.charCodeAt(o+c);if(f.get(a)!==0||a===13||a===10)return!0;if(c>0){const g=d.charCodeAt(o+c-1);if(f.get(g)!==0)return!0}return!1}function r(f,d,l,o,c){return n(f,d,l,o,c)&&t(f,d,l,o,c)}e.isValidMatch=r;class u{constructor(d,l){this._wordSeparators=d,this._searchRegex=l,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(d){this._searchRegex.lastIndex=d,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(d){const l=d.length;let o;do{if(this._prevMatchStartIndex+this._prevMatchLength===l||(o=this._searchRegex.exec(d),!o))return null;const c=o.index,a=o[0].length;if(c===this._prevMatchStartIndex&&a===this._prevMatchLength){if(a===0){L.getNextCodePoint(d,l,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=c,this._prevMatchLength=a,!this._wordSeparators||r(this._wordSeparators,d,l,c,a))return o}while(o);return null}}e.Searcher=u}),define(te[286],ie([1,0,12,5,49,514,179]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeBase=e.StringBuffer=e.Piece=e.createLineStarts=e.createLineStartsFast=void 0;const m=65535;function _(f){let d;return f[f.length-1]<65536?d=new Uint16Array(f.length):d=new Uint32Array(f.length),d.set(f,0),d}class v{constructor(d,l,o,c,a){this.lineStarts=d,this.cr=l,this.lf=o,this.crlf=c,this.isBasicASCII=a}}function C(f,d=!0){const l=[0];let o=1;for(let c=0,a=f.length;c126)&&(g=!1)}const h=new v(_(f),o,c,a,g);return f.length=0,h}e.createLineStarts=s;class i{constructor(d,l,o,c,a){this.bufferIndex=d,this.start=l,this.end=o,this.lineFeedCnt=c,this.length=a}}e.Piece=i;class n{constructor(d,l){this.buffer=d,this.lineStarts=l}}e.StringBuffer=n;class t{constructor(d,l){this._pieces=[],this._tree=d,this._BOM=l,this._index=0,d.root!==D.SENTINEL&&d.iterate(d.root,o=>(o!==D.SENTINEL&&this._pieces.push(o.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class r{constructor(d){this._limit=d,this._cache=[]}get(d){for(let l=this._cache.length-1;l>=0;l--){const o=this._cache[l];if(o.nodeStartOffset<=d&&o.nodeStartOffset+o.node.piece.length>=d)return o}return null}get2(d){for(let l=this._cache.length-1;l>=0;l--){const o=this._cache[l];if(o.nodeStartLineNumber&&o.nodeStartLineNumber=d)return o}return null}set(d){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(d)}validate(d){let l=!1;const o=this._cache;for(let c=0;c=d){o[c]=null,l=!0;continue}}if(l){const c=[];for(const a of o)a!==null&&c.push(a);this._cache=c}}}class u{constructor(d,l,o){this.create(d,l,o)}create(d,l,o){this._buffers=[new n("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=D.SENTINEL,this._lineCnt=1,this._length=0,this._EOL=l,this._EOLLength=l.length,this._EOLNormalized=o;let c=null;for(let a=0,g=d.length;a0){d[a].lineStarts||(d[a].lineStarts=C(d[a].buffer));const h=new i(a+1,{line:0,column:0},{line:d[a].lineStarts.length-1,column:d[a].buffer.length-d[a].lineStarts[d[a].lineStarts.length-1]},d[a].lineStarts.length-1,d[a].buffer.length);this._buffers.push(d[a]),c=this.rbInsertRight(c,h)}this._searchCache=new r(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(d){const l=m,o=l-Math.floor(l/3),c=o*2;let a="",g=0;const h=[];if(this.iterate(this.root,p=>{const b=this.getNodeContent(p),w=b.length;if(g<=o||g+w0){const p=a.replace(/\r\n|\r|\n/g,d);h.push(new n(p,C(p)))}this.create(h,d,!0)}getEOL(){return this._EOL}setEOL(d){this._EOL=d,this._EOLLength=this._EOL.length,this.normalizeEOL(d)}createSnapshot(d){return new t(this,d)}getOffsetAt(d,l){let o=0,c=this.root;for(;c!==D.SENTINEL;)if(c.left!==D.SENTINEL&&c.lf_left+1>=d)c=c.left;else if(c.lf_left+c.piece.lineFeedCnt+1>=d){o+=c.size_left;const a=this.getAccumulatedValue(c,d-c.lf_left-2);return o+=a+l-1}else d-=c.lf_left+c.piece.lineFeedCnt,o+=c.size_left+c.piece.length,c=c.right;return o}getPositionAt(d){d=Math.floor(d),d=Math.max(0,d);let l=this.root,o=0;const c=d;for(;l!==D.SENTINEL;)if(l.size_left!==0&&l.size_left>=d)l=l.left;else if(l.size_left+l.piece.length>=d){const a=this.getIndexOf(l,d-l.size_left);if(o+=l.lf_left+a.index,a.index===0){const g=this.getOffsetAt(o+1,1),h=c-g;return new L.Position(o+1,h+1)}return new L.Position(o+1,a.remainder+1)}else if(d-=l.size_left+l.piece.length,o+=l.lf_left+l.piece.lineFeedCnt,l.right===D.SENTINEL){const a=this.getOffsetAt(o+1,1),g=c-d-a;return new L.Position(o+1,g+1)}else l=l.right;return new L.Position(1,1)}getValueInRange(d,l){if(d.startLineNumber===d.endLineNumber&&d.startColumn===d.endColumn)return"";const o=this.nodeAt2(d.startLineNumber,d.startColumn),c=this.nodeAt2(d.endLineNumber,d.endColumn),a=this.getValueInRange2(o,c);return l?l!==this._EOL||!this._EOLNormalized?a.replace(/\r\n|\r|\n/g,l):l===this.getEOL()&&this._EOLNormalized?a:a.replace(/\r\n|\r|\n/g,l):a}getValueInRange2(d,l){if(d.node===l.node){const h=d.node,p=this._buffers[h.piece.bufferIndex].buffer,b=this.offsetInBuffer(h.piece.bufferIndex,h.piece.start);return p.substring(b+d.remainder,b+l.remainder)}let o=d.node;const c=this._buffers[o.piece.bufferIndex].buffer,a=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);let g=c.substring(a+d.remainder,a+o.piece.length);for(o=o.next();o!==D.SENTINEL;){const h=this._buffers[o.piece.bufferIndex].buffer,p=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);if(o===l.node){g+=h.substring(p,p+l.remainder);break}else g+=h.substr(p,o.piece.length);o=o.next()}return g}getLinesContent(){const d=[];let l=0,o="",c=!1;return this.iterate(this.root,a=>{if(a===D.SENTINEL)return!0;const g=a.piece;let h=g.length;if(h===0)return!0;const p=this._buffers[g.bufferIndex].buffer,b=this._buffers[g.bufferIndex].lineStarts,w=g.start.line,E=g.end.line;let k=b[w]+g.start.column;if(c&&(p.charCodeAt(k)===10&&(k++,h--),d[l++]=o,o="",c=!1,h===0))return!0;if(w===E)return!this._EOLNormalized&&p.charCodeAt(k+h-1)===13?(c=!0,o+=p.substr(k,h-1)):o+=p.substr(k,h),!0;o+=this._EOLNormalized?p.substring(k,Math.max(k,b[w+1]-this._EOLLength)):p.substring(k,b[w+1]).replace(/(\r\n|\r|\n)$/,""),d[l++]=o;for(let M=w+1;MO+R,l.reset(0)):(A=k.buffer,P=O=>O,l.reset(R));do if(T=l.next(A),T){if(P(T.index)>=B)return w;this.positionInBuffer(d,P(T.index)-M,N);const O=this.getLineFeedCnt(d.piece.bufferIndex,a,N),x=N.line===a.line?N.column-a.column+c:N.column+1,W=x+T[0].length;if(E[w++]=(0,S.createFindMatch)(new I.Range(o+O,x,o+O,W),T,p),P(T.index)+T[0].length>=B||w>=b)return w}while(T);return w}findMatchesLineByLine(d,l,o,c){const a=[];let g=0;const h=new S.Searcher(l.wordSeparators,l.regex);let p=this.nodeAt2(d.startLineNumber,d.startColumn);if(p===null)return[];const b=this.nodeAt2(d.endLineNumber,d.endColumn);if(b===null)return[];let w=this.positionInBuffer(p.node,p.remainder);const E=this.positionInBuffer(b.node,b.remainder);if(p.node===b.node)return this.findMatchesInNode(p.node,h,d.startLineNumber,d.startColumn,w,E,l,o,c,g,a),a;let k=d.startLineNumber,M=p.node;for(;M!==b.node;){const B=this.getLineFeedCnt(M.piece.bufferIndex,w,M.piece.end);if(B>=1){const N=this._buffers[M.piece.bufferIndex].lineStarts,A=this.offsetInBuffer(M.piece.bufferIndex,M.piece.start),P=N[w.line+B],O=k===d.startLineNumber?d.startColumn:1;if(g=this.findMatchesInNode(M,h,k,O,w,this.positionInBuffer(M,P-A),l,o,c,g,a),g>=c)return a;k+=B}const T=k===d.startLineNumber?d.startColumn-1:0;if(k===d.endLineNumber){const N=this.getLineContent(k).substring(T,d.endColumn-1);return g=this._findMatchesInLine(l,h,N,d.endLineNumber,T,g,a,o,c),a}if(g=this._findMatchesInLine(l,h,this.getLineContent(k).substr(T),k,T,g,a,o,c),g>=c)return a;k++,p=this.nodeAt2(k,1),M=p.node,w=this.positionInBuffer(p.node,p.remainder)}if(k===d.endLineNumber){const B=k===d.startLineNumber?d.startColumn-1:0,T=this.getLineContent(k).substring(B,d.endColumn-1);return g=this._findMatchesInLine(l,h,T,d.endLineNumber,B,g,a,o,c),a}const R=k===d.startLineNumber?d.startColumn:1;return g=this.findMatchesInNode(b.node,h,k,R,w,E,l,o,c,g,a),a}_findMatchesInLine(d,l,o,c,a,g,h,p,b){const w=d.wordSeparators;if(!p&&d.simpleSearch){const k=d.simpleSearch,M=k.length,R=o.length;let B=-M;for(;(B=o.indexOf(k,B+M))!==-1;)if((!w||(0,S.isValidMatch)(w,o,R,B,M))&&(h[g++]=new y.FindMatch(new I.Range(c,B+1+a,c,B+1+M+a),null),g>=b))return g;return g}let E;l.reset(0);do if(E=l.next(o),E&&(h[g++]=(0,S.createFindMatch)(new I.Range(c,E.index+1+a,c,E.index+1+E[0].length+a),E,p),g>=b))return g;while(E);return g}insert(d,l,o=!1){if(this._EOLNormalized=this._EOLNormalized&&o,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==D.SENTINEL){const{node:c,remainder:a,nodeStartOffset:g}=this.nodeAt(d),h=c.piece,p=h.bufferIndex,b=this.positionInBuffer(c,a);if(c.piece.bufferIndex===0&&h.end.line===this._lastChangeBufferPos.line&&h.end.column===this._lastChangeBufferPos.column&&g+h.length===d&&l.lengthd){const w=[];let E=new i(h.bufferIndex,b,h.end,this.getLineFeedCnt(h.bufferIndex,b,h.end),this.offsetInBuffer(p,h.end)-this.offsetInBuffer(p,b));if(this.shouldCheckCRLF()&&this.endWithCR(l)&&this.nodeCharCodeAt(c,a)===10){const B={line:E.start.line+1,column:0};E=new i(E.bufferIndex,B,E.end,this.getLineFeedCnt(E.bufferIndex,B,E.end),E.length-1),l+=` -`}if(this.shouldCheckCRLF()&&this.startWithLF(l))if(this.nodeCharCodeAt(c,a-1)===13){const B=this.positionInBuffer(c,a-1);this.deleteNodeTail(c,B),l="\r"+l,c.piece.length===0&&w.push(c)}else this.deleteNodeTail(c,b);else this.deleteNodeTail(c,b);const k=this.createNewPieces(l);E.length>0&&this.rbInsertRight(c,E);let M=c;for(let R=0;R=0;g--)a=this.rbInsertLeft(a,c[g]);this.validateCRLFWithPrevNode(a),this.deleteNodes(o)}insertContentToNodeRight(d,l){this.adjustCarriageReturnFromNext(d,l)&&(d+=` -`);const o=this.createNewPieces(d),c=this.rbInsertRight(l,o[0]);let a=c;for(let g=1;g=k)b=E+1;else break;return o?(o.line=E,o.column=p-M,null):{line:E,column:p-M}}getLineFeedCnt(d,l,o){if(o.column===0)return o.line-l.line;const c=this._buffers[d].lineStarts;if(o.line===c.length-1)return o.line-l.line;const a=c[o.line+1],g=c[o.line]+o.column;if(a>g+1)return o.line-l.line;const h=g-1;return this._buffers[d].buffer.charCodeAt(h)===13?o.line-l.line+1:o.line-l.line}offsetInBuffer(d,l){return this._buffers[d].lineStarts[l.line]+l.column}deleteNodes(d){for(let l=0;lm){const w=[];for(;d.length>m;){const k=d.charCodeAt(m-1);let M;k===13||k>=55296&&k<=56319?(M=d.substring(0,m-1),d=d.substring(m-1)):(M=d.substring(0,m),d=d.substring(m));const R=C(M);w.push(new i(this._buffers.length,{line:0,column:0},{line:R.length-1,column:M.length-R[R.length-1]},R.length-1,M.length)),this._buffers.push(new n(M,R))}const E=C(d);return w.push(new i(this._buffers.length,{line:0,column:0},{line:E.length-1,column:d.length-E[E.length-1]},E.length-1,d.length)),this._buffers.push(new n(d,E)),w}let l=this._buffers[0].buffer.length;const o=C(d,!1);let c=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===l&&l!==0&&this.startWithLF(d)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},c=this._lastChangeBufferPos;for(let w=0;w=d-1)o=o.left;else if(o.lf_left+o.piece.lineFeedCnt>d-1){const p=this.getAccumulatedValue(o,d-o.lf_left-2),b=this.getAccumulatedValue(o,d-o.lf_left-1),w=this._buffers[o.piece.bufferIndex].buffer,E=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return g+=o.size_left,this._searchCache.set({node:o,nodeStartOffset:g,nodeStartLineNumber:h-(d-1-o.lf_left)}),w.substring(E+p,E+b-l)}else if(o.lf_left+o.piece.lineFeedCnt===d-1){const p=this.getAccumulatedValue(o,d-o.lf_left-2),b=this._buffers[o.piece.bufferIndex].buffer,w=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);c=b.substring(w+p,w+o.piece.length);break}else d-=o.lf_left+o.piece.lineFeedCnt,g+=o.size_left+o.piece.length,o=o.right}for(o=o.next();o!==D.SENTINEL;){const g=this._buffers[o.piece.bufferIndex].buffer;if(o.piece.lineFeedCnt>0){const h=this.getAccumulatedValue(o,0),p=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);return c+=g.substring(p,p+h-l),c}else{const h=this.offsetInBuffer(o.piece.bufferIndex,o.piece.start);c+=g.substr(h,o.piece.length)}o=o.next()}return c}computeBufferMetadata(){let d=this.root,l=1,o=0;for(;d!==D.SENTINEL;)l+=d.lf_left+d.piece.lineFeedCnt,o+=d.size_left+d.piece.length,d=d.right;this._lineCnt=l,this._length=o,this._searchCache.validate(this._length)}getIndexOf(d,l){const o=d.piece,c=this.positionInBuffer(d,l),a=c.line-o.start.line;if(this.offsetInBuffer(o.bufferIndex,o.end)-this.offsetInBuffer(o.bufferIndex,o.start)===l){const g=this.getLineFeedCnt(d.piece.bufferIndex,o.start,c);if(g!==a)return{index:g,remainder:0}}return{index:a,remainder:c.column}}getAccumulatedValue(d,l){if(l<0)return 0;const o=d.piece,c=this._buffers[o.bufferIndex].lineStarts,a=o.start.line+l+1;return a>o.end.line?c[o.end.line]+o.end.column-c[o.start.line]-o.start.column:c[a]-c[o.start.line]-o.start.column}deleteNodeTail(d,l){const o=d.piece,c=o.lineFeedCnt,a=this.offsetInBuffer(o.bufferIndex,o.end),g=l,h=this.offsetInBuffer(o.bufferIndex,g),p=this.getLineFeedCnt(o.bufferIndex,o.start,g),b=p-c,w=h-a,E=o.length+w;d.piece=new i(o.bufferIndex,o.start,g,p,E),(0,D.updateTreeMetadata)(this,d,w,b)}deleteNodeHead(d,l){const o=d.piece,c=o.lineFeedCnt,a=this.offsetInBuffer(o.bufferIndex,o.start),g=l,h=this.getLineFeedCnt(o.bufferIndex,g,o.end),p=this.offsetInBuffer(o.bufferIndex,g),b=h-c,w=a-p,E=o.length+w;d.piece=new i(o.bufferIndex,g,o.end,h,E),(0,D.updateTreeMetadata)(this,d,w,b)}shrinkNode(d,l,o){const c=d.piece,a=c.start,g=c.end,h=c.length,p=c.lineFeedCnt,b=l,w=this.getLineFeedCnt(c.bufferIndex,c.start,b),E=this.offsetInBuffer(c.bufferIndex,l)-this.offsetInBuffer(c.bufferIndex,a);d.piece=new i(c.bufferIndex,c.start,b,w,E),(0,D.updateTreeMetadata)(this,d,E-h,w-p);const k=new i(c.bufferIndex,o,g,this.getLineFeedCnt(c.bufferIndex,o,g),this.offsetInBuffer(c.bufferIndex,g)-this.offsetInBuffer(c.bufferIndex,o)),M=this.rbInsertRight(d,k);this.validateCRLFWithPrevNode(M)}appendToNode(d,l){this.adjustCarriageReturnFromNext(l,d)&&(l+=` -`);const o=this.shouldCheckCRLF()&&this.startWithLF(l)&&this.endWithCR(d),c=this._buffers[0].buffer.length;this._buffers[0].buffer+=l;const a=C(l,!1);for(let M=0;Md)l=l.left;else if(l.size_left+l.piece.length>=d){c+=l.size_left;const a={node:l,remainder:d-l.size_left,nodeStartOffset:c};return this._searchCache.set(a),a}else d-=l.size_left+l.piece.length,c+=l.size_left+l.piece.length,l=l.right;return null}nodeAt2(d,l){let o=this.root,c=0;for(;o!==D.SENTINEL;)if(o.left!==D.SENTINEL&&o.lf_left>=d-1)o=o.left;else if(o.lf_left+o.piece.lineFeedCnt>d-1){const a=this.getAccumulatedValue(o,d-o.lf_left-2),g=this.getAccumulatedValue(o,d-o.lf_left-1);return c+=o.size_left,{node:o,remainder:Math.min(a+l-1,g),nodeStartOffset:c}}else if(o.lf_left+o.piece.lineFeedCnt===d-1){const a=this.getAccumulatedValue(o,d-o.lf_left-2);if(a+l-1<=o.piece.length)return{node:o,remainder:a+l-1,nodeStartOffset:c};l-=o.piece.length-a;break}else d-=o.lf_left+o.piece.lineFeedCnt,c+=o.size_left+o.piece.length,o=o.right;for(o=o.next();o!==D.SENTINEL;){if(o.piece.lineFeedCnt>0){const a=this.getAccumulatedValue(o,0),g=this.offsetOfNode(o);return{node:o,remainder:Math.min(l-1,a),nodeStartOffset:g}}else if(o.piece.length>=l-1){const a=this.offsetOfNode(o);return{node:o,remainder:l-1,nodeStartOffset:a}}else l-=o.piece.length;o=o.next()}return null}nodeCharCodeAt(d,l){if(d.piece.lineFeedCnt<1)return-1;const o=this._buffers[d.piece.bufferIndex],c=this.offsetInBuffer(d.piece.bufferIndex,d.piece.start)+l;return o.buffer.charCodeAt(c)}offsetOfNode(d){if(!d)return 0;let l=d.size_left;for(;d!==this.root;)d.parent.right===d&&(l+=d.parent.size_left+d.parent.piece.length),d=d.parent;return l}shouldCheckCRLF(){return!(this._EOLNormalized&&this._EOL===` -`)}startWithLF(d){if(typeof d=="string")return d.charCodeAt(0)===10;if(d===D.SENTINEL||d.piece.lineFeedCnt===0)return!1;const l=d.piece,o=this._buffers[l.bufferIndex].lineStarts,c=l.start.line,a=o[c]+l.start.column;return c===o.length-1||o[c+1]>a+1?!1:this._buffers[l.bufferIndex].buffer.charCodeAt(a)===10}endWithCR(d){return typeof d=="string"?d.charCodeAt(d.length-1)===13:d===D.SENTINEL||d.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(d,d.piece.length-1)===13}validateCRLFWithPrevNode(d){if(this.shouldCheckCRLF()&&this.startWithLF(d)){const l=d.prev();this.endWithCR(l)&&this.fixCRLF(l,d)}}validateCRLFWithNextNode(d){if(this.shouldCheckCRLF()&&this.endWithCR(d)){const l=d.next();this.startWithLF(l)&&this.fixCRLF(d,l)}}fixCRLF(d,l){const o=[],c=this._buffers[d.piece.bufferIndex].lineStarts;let a;d.piece.end.column===0?a={line:d.piece.end.line-1,column:c[d.piece.end.line]-c[d.piece.end.line-1]-1}:a={line:d.piece.end.line,column:d.piece.end.column-1};const g=d.piece.length-1,h=d.piece.lineFeedCnt-1;d.piece=new i(d.piece.bufferIndex,d.piece.start,a,h,g),(0,D.updateTreeMetadata)(this,d,-1,-1),d.piece.length===0&&o.push(d);const p={line:l.piece.start.line+1,column:0},b=l.piece.length-1,w=this.getLineFeedCnt(l.piece.bufferIndex,p,l.piece.end);l.piece=new i(l.piece.bufferIndex,p,l.piece.end,w,b),(0,D.updateTreeMetadata)(this,l,-1,-1),l.piece.length===0&&o.push(l);const E=this.createNewPieces(`\r -`);this.rbInsertRight(d,E[0]);for(let k=0;k0?this.wrappedTextIndentLength:0}getLineLength(s){const i=s>0?this.breakOffsets[s-1]:0;let t=this.breakOffsets[s]-i;return s>0&&(t+=this.wrappedTextIndentLength),t}getMaxOutputOffset(s){return this.getLineLength(s)}translateToInputOffset(s,i){s>0&&(i=Math.max(0,i-this.wrappedTextIndentLength));let t=s===0?i:this.breakOffsets[s-1]+i;if(this.injectionOffsets!==null)for(let r=0;rthis.injectionOffsets[r];r++)t0?this.breakOffsets[r-1]:0,i===0)if(s<=u)t=r-1;else if(s>d)n=r+1;else break;else if(s=d)n=r+1;else break}let f=s-u;return r>0&&(f+=this.wrappedTextIndentLength),new v(r,f)}normalizeOutputPosition(s,i,n){if(this.injectionOffsets!==null){const t=this.outputPositionToOffsetInInputWithInjections(s,i),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(t,n);if(r!==t)return this.offsetInInputWithInjectionsToOutputPosition(r,n)}if(n===0){if(s>0&&i===this.getMinOutputOffset(s))return new v(s-1,this.getMaxOutputOffset(s-1))}else if(n===1){const t=this.getOutputLineCount()-1;if(s0&&(i=Math.max(0,i-this.wrappedTextIndentLength)),(s>0?this.breakOffsets[s-1]:0)+i}normalizeOffsetInInputWithInjectionsAroundInjections(s,i){const n=this.getInjectedTextAtOffset(s);if(!n)return s;if(i===2){if(s===n.offsetInInputWithInjections+n.length&&S(this.injectionOptions[n.injectedTextIndex].cursorStops))return n.offsetInInputWithInjections+n.length;{let t=n.offsetInInputWithInjections;if(m(this.injectionOptions[n.injectedTextIndex].cursorStops))return t;let r=n.injectedTextIndex-1;for(;r>=0&&this.injectionOffsets[r]===this.injectionOffsets[n.injectedTextIndex]&&!(S(this.injectionOptions[r].cursorStops)||(t-=this.injectionOptions[r].content.length,m(this.injectionOptions[r].cursorStops)));)r--;return t}}else if(i===1||i===4){let t=n.offsetInInputWithInjections+n.length,r=n.injectedTextIndex;for(;r+1=0&&this.injectionOffsets[r-1]===this.injectionOffsets[r];)t-=this.injectionOptions[r-1].content.length,r--;return t}(0,L.assertNever)(i)}getInjectedText(s,i){const n=this.outputPositionToOffsetInInputWithInjections(s,i),t=this.getInjectedTextAtOffset(n);return t?{options:this.injectionOptions[t.injectedTextIndex]}:null}getInjectedTextAtOffset(s){const i=this.injectionOffsets,n=this.injectionOptions;if(i!==null){let t=0;for(let r=0;rs)break;if(s<=d)return{injectedTextIndex:r,offsetInInputWithInjections:f,length:u};t+=u}}}}e.ModelLineProjectionData=D;function S(C){return C==null?!0:C===y.InjectedTextCursorStops.Right||C===y.InjectedTextCursorStops.Both}function m(C){return C==null?!0:C===y.InjectedTextCursorStops.Left||C===y.InjectedTextCursorStops.Both}class _{constructor(s){this.options=s}}e.InjectedText=_;class v{constructor(s,i){this.outputLineIndex=s,this.outputOffset=i}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(s){return new I.Position(s+this.outputLineIndex,this.outputOffset+1)}}e.OutputPosition=v}),define(te[288],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DraggedTreeItemsIdentifier=e.TreeViewsDnDService=void 0;class L{constructor(){this._dragOperations=new Map}removeDragOperationTransfer(D){if(D&&this._dragOperations.has(D)){const S=this._dragOperations.get(D);return this._dragOperations.delete(D),S}}}e.TreeViewsDnDService=L;class I{constructor(D){this.identifier=D}}e.DraggedTreeItemsIdentifier=I}),define(te[289],ie([1,0,5,179,10,96,145]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnicodeTextModelHighlighter=void 0;class m{static computeUnicodeHighlights(i,n,t){const r=t?t.startLineNumber:1,u=t?t.endLineNumber:i.getLineCount(),f=new v(n),d=f.getCandidateCodePoints();let l;d==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${_(Array.from(d))}`,"g");const o=new I.Searcher(null,l),c=[];let a=!1,g,h=0,p=0,b=0;e:for(let w=r,E=u;w<=E;w++){const k=i.getLineContent(w),M=k.length;o.reset(0);do if(g=o.next(k),g){let R=g.index,B=g.index+g[0].length;if(R>0){const P=k.charCodeAt(R-1);y.isHighSurrogate(P)&&R--}if(B+1=P){a=!0;break e}c.push(new L.Range(w,R+1,w,B+1))}}while(g)}return{ranges:c,hasMore:a,ambiguousCharacterCount:h,invisibleCharacterCount:p,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(i,n){const t=new v(n);switch(t.shouldHighlightNonBasicASCII(i,null)){case 0:return null;case 2:return{kind:1};case 3:{const u=i.codePointAt(0),f=t.ambiguousCharacters.getPrimaryConfusable(u),d=y.AmbiguousCharacters.getLocales().filter(l=>!y.AmbiguousCharacters.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(u));return{kind:0,confusableWith:String.fromCodePoint(f),notAmbiguousInLocales:d}}case 1:return{kind:2}}}}e.UnicodeTextModelHighlighter=m;function _(s,i){return`[${y.escapeRegExpCharacters(s.map(t=>String.fromCodePoint(t)).join(""))}]`}class v{constructor(i){this.options=i,this.allowedCodePoints=new Set(i.allowedCodePoints),this.ambiguousCharacters=y.AmbiguousCharacters.getInstance(new Set(i.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const i=new Set;if(this.options.invisibleCharacters)for(const n of y.InvisibleCharacters.codePoints)C(String.fromCodePoint(n))||i.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())i.add(n);for(const n of this.allowedCodePoints)i.delete(n);return i}shouldHighlightNonBasicASCII(i,n){const t=i.codePointAt(0);if(this.allowedCodePoints.has(t))return 0;if(this.options.nonBasicASCII)return 1;let r=!1,u=!1;if(n)for(const f of n){const d=f.codePointAt(0),l=y.isBasicASCII(f);r=r||l,!l&&!this.ambiguousCharacters.isAmbiguous(d)&&!y.InvisibleCharacters.isInvisibleCharacter(d)&&(u=!0)}return!r&&u?0:this.options.invisibleCharacters&&!C(i)&&y.InvisibleCharacters.isInvisibleCharacter(t)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(t)?3:0}}function C(s){return s===" "||s===` -`||s===" "}}),define(te[209],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WrappingIndent=e.TrackedRangeStickiness=e.TextEditorCursorStyle=e.TextEditorCursorBlinkingStyle=e.SymbolTag=e.SymbolKind=e.SignatureHelpTriggerKind=e.SelectionDirection=e.ScrollbarVisibility=e.ScrollType=e.RenderMinimap=e.RenderLineNumbersType=e.PositionAffinity=e.OverviewRulerLane=e.OverlayWidgetPositionPreference=e.MouseTargetType=e.MinimapPosition=e.MarkerTag=e.MarkerSeverity=e.KeyCode=e.InlineCompletionTriggerKind=e.InlayHintKind=e.InjectedTextCursorStops=e.IndentAction=e.GlyphMarginLane=e.EndOfLineSequence=e.EndOfLinePreference=e.EditorOption=e.EditorAutoIndentStrategy=e.DocumentHighlightKind=e.DefaultEndOfLine=e.CursorChangeReason=e.ContentWidgetPositionPreference=e.CompletionTriggerKind=e.CompletionItemTag=e.CompletionItemKind=e.CompletionItemInsertTextRule=e.CodeActionTriggerType=e.AccessibilitySupport=void 0;var L;(function(F){F[F.Unknown=0]="Unknown",F[F.Disabled=1]="Disabled",F[F.Enabled=2]="Enabled"})(L||(e.AccessibilitySupport=L={}));var I;(function(F){F[F.Invoke=1]="Invoke",F[F.Auto=2]="Auto"})(I||(e.CodeActionTriggerType=I={}));var y;(function(F){F[F.None=0]="None",F[F.KeepWhitespace=1]="KeepWhitespace",F[F.InsertAsSnippet=4]="InsertAsSnippet"})(y||(e.CompletionItemInsertTextRule=y={}));var D;(function(F){F[F.Method=0]="Method",F[F.Function=1]="Function",F[F.Constructor=2]="Constructor",F[F.Field=3]="Field",F[F.Variable=4]="Variable",F[F.Class=5]="Class",F[F.Struct=6]="Struct",F[F.Interface=7]="Interface",F[F.Module=8]="Module",F[F.Property=9]="Property",F[F.Event=10]="Event",F[F.Operator=11]="Operator",F[F.Unit=12]="Unit",F[F.Value=13]="Value",F[F.Constant=14]="Constant",F[F.Enum=15]="Enum",F[F.EnumMember=16]="EnumMember",F[F.Keyword=17]="Keyword",F[F.Text=18]="Text",F[F.Color=19]="Color",F[F.File=20]="File",F[F.Reference=21]="Reference",F[F.Customcolor=22]="Customcolor",F[F.Folder=23]="Folder",F[F.TypeParameter=24]="TypeParameter",F[F.User=25]="User",F[F.Issue=26]="Issue",F[F.Snippet=27]="Snippet"})(D||(e.CompletionItemKind=D={}));var S;(function(F){F[F.Deprecated=1]="Deprecated"})(S||(e.CompletionItemTag=S={}));var m;(function(F){F[F.Invoke=0]="Invoke",F[F.TriggerCharacter=1]="TriggerCharacter",F[F.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(m||(e.CompletionTriggerKind=m={}));var _;(function(F){F[F.EXACT=0]="EXACT",F[F.ABOVE=1]="ABOVE",F[F.BELOW=2]="BELOW"})(_||(e.ContentWidgetPositionPreference=_={}));var v;(function(F){F[F.NotSet=0]="NotSet",F[F.ContentFlush=1]="ContentFlush",F[F.RecoverFromMarkers=2]="RecoverFromMarkers",F[F.Explicit=3]="Explicit",F[F.Paste=4]="Paste",F[F.Undo=5]="Undo",F[F.Redo=6]="Redo"})(v||(e.CursorChangeReason=v={}));var C;(function(F){F[F.LF=1]="LF",F[F.CRLF=2]="CRLF"})(C||(e.DefaultEndOfLine=C={}));var s;(function(F){F[F.Text=0]="Text",F[F.Read=1]="Read",F[F.Write=2]="Write"})(s||(e.DocumentHighlightKind=s={}));var i;(function(F){F[F.None=0]="None",F[F.Keep=1]="Keep",F[F.Brackets=2]="Brackets",F[F.Advanced=3]="Advanced",F[F.Full=4]="Full"})(i||(e.EditorAutoIndentStrategy=i={}));var n;(function(F){F[F.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",F[F.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",F[F.accessibilitySupport=2]="accessibilitySupport",F[F.accessibilityPageSize=3]="accessibilityPageSize",F[F.ariaLabel=4]="ariaLabel",F[F.ariaRequired=5]="ariaRequired",F[F.autoClosingBrackets=6]="autoClosingBrackets",F[F.autoClosingComments=7]="autoClosingComments",F[F.screenReaderAnnounceInlineSuggestion=8]="screenReaderAnnounceInlineSuggestion",F[F.autoClosingDelete=9]="autoClosingDelete",F[F.autoClosingOvertype=10]="autoClosingOvertype",F[F.autoClosingQuotes=11]="autoClosingQuotes",F[F.autoIndent=12]="autoIndent",F[F.automaticLayout=13]="automaticLayout",F[F.autoSurround=14]="autoSurround",F[F.bracketPairColorization=15]="bracketPairColorization",F[F.guides=16]="guides",F[F.codeLens=17]="codeLens",F[F.codeLensFontFamily=18]="codeLensFontFamily",F[F.codeLensFontSize=19]="codeLensFontSize",F[F.colorDecorators=20]="colorDecorators",F[F.colorDecoratorsLimit=21]="colorDecoratorsLimit",F[F.columnSelection=22]="columnSelection",F[F.comments=23]="comments",F[F.contextmenu=24]="contextmenu",F[F.copyWithSyntaxHighlighting=25]="copyWithSyntaxHighlighting",F[F.cursorBlinking=26]="cursorBlinking",F[F.cursorSmoothCaretAnimation=27]="cursorSmoothCaretAnimation",F[F.cursorStyle=28]="cursorStyle",F[F.cursorSurroundingLines=29]="cursorSurroundingLines",F[F.cursorSurroundingLinesStyle=30]="cursorSurroundingLinesStyle",F[F.cursorWidth=31]="cursorWidth",F[F.disableLayerHinting=32]="disableLayerHinting",F[F.disableMonospaceOptimizations=33]="disableMonospaceOptimizations",F[F.domReadOnly=34]="domReadOnly",F[F.dragAndDrop=35]="dragAndDrop",F[F.dropIntoEditor=36]="dropIntoEditor",F[F.emptySelectionClipboard=37]="emptySelectionClipboard",F[F.experimentalWhitespaceRendering=38]="experimentalWhitespaceRendering",F[F.extraEditorClassName=39]="extraEditorClassName",F[F.fastScrollSensitivity=40]="fastScrollSensitivity",F[F.find=41]="find",F[F.fixedOverflowWidgets=42]="fixedOverflowWidgets",F[F.folding=43]="folding",F[F.foldingStrategy=44]="foldingStrategy",F[F.foldingHighlight=45]="foldingHighlight",F[F.foldingImportsByDefault=46]="foldingImportsByDefault",F[F.foldingMaximumRegions=47]="foldingMaximumRegions",F[F.unfoldOnClickAfterEndOfLine=48]="unfoldOnClickAfterEndOfLine",F[F.fontFamily=49]="fontFamily",F[F.fontInfo=50]="fontInfo",F[F.fontLigatures=51]="fontLigatures",F[F.fontSize=52]="fontSize",F[F.fontWeight=53]="fontWeight",F[F.fontVariations=54]="fontVariations",F[F.formatOnPaste=55]="formatOnPaste",F[F.formatOnType=56]="formatOnType",F[F.glyphMargin=57]="glyphMargin",F[F.gotoLocation=58]="gotoLocation",F[F.hideCursorInOverviewRuler=59]="hideCursorInOverviewRuler",F[F.hover=60]="hover",F[F.inDiffEditor=61]="inDiffEditor",F[F.inlineSuggest=62]="inlineSuggest",F[F.letterSpacing=63]="letterSpacing",F[F.lightbulb=64]="lightbulb",F[F.lineDecorationsWidth=65]="lineDecorationsWidth",F[F.lineHeight=66]="lineHeight",F[F.lineNumbers=67]="lineNumbers",F[F.lineNumbersMinChars=68]="lineNumbersMinChars",F[F.linkedEditing=69]="linkedEditing",F[F.links=70]="links",F[F.matchBrackets=71]="matchBrackets",F[F.minimap=72]="minimap",F[F.mouseStyle=73]="mouseStyle",F[F.mouseWheelScrollSensitivity=74]="mouseWheelScrollSensitivity",F[F.mouseWheelZoom=75]="mouseWheelZoom",F[F.multiCursorMergeOverlapping=76]="multiCursorMergeOverlapping",F[F.multiCursorModifier=77]="multiCursorModifier",F[F.multiCursorPaste=78]="multiCursorPaste",F[F.multiCursorLimit=79]="multiCursorLimit",F[F.occurrencesHighlight=80]="occurrencesHighlight",F[F.overviewRulerBorder=81]="overviewRulerBorder",F[F.overviewRulerLanes=82]="overviewRulerLanes",F[F.padding=83]="padding",F[F.pasteAs=84]="pasteAs",F[F.parameterHints=85]="parameterHints",F[F.peekWidgetDefaultFocus=86]="peekWidgetDefaultFocus",F[F.definitionLinkOpensInPeek=87]="definitionLinkOpensInPeek",F[F.quickSuggestions=88]="quickSuggestions",F[F.quickSuggestionsDelay=89]="quickSuggestionsDelay",F[F.readOnly=90]="readOnly",F[F.readOnlyMessage=91]="readOnlyMessage",F[F.renameOnType=92]="renameOnType",F[F.renderControlCharacters=93]="renderControlCharacters",F[F.renderFinalNewline=94]="renderFinalNewline",F[F.renderLineHighlight=95]="renderLineHighlight",F[F.renderLineHighlightOnlyWhenFocus=96]="renderLineHighlightOnlyWhenFocus",F[F.renderValidationDecorations=97]="renderValidationDecorations",F[F.renderWhitespace=98]="renderWhitespace",F[F.revealHorizontalRightPadding=99]="revealHorizontalRightPadding",F[F.roundedSelection=100]="roundedSelection",F[F.rulers=101]="rulers",F[F.scrollbar=102]="scrollbar",F[F.scrollBeyondLastColumn=103]="scrollBeyondLastColumn",F[F.scrollBeyondLastLine=104]="scrollBeyondLastLine",F[F.scrollPredominantAxis=105]="scrollPredominantAxis",F[F.selectionClipboard=106]="selectionClipboard",F[F.selectionHighlight=107]="selectionHighlight",F[F.selectOnLineNumbers=108]="selectOnLineNumbers",F[F.showFoldingControls=109]="showFoldingControls",F[F.showUnused=110]="showUnused",F[F.snippetSuggestions=111]="snippetSuggestions",F[F.smartSelect=112]="smartSelect",F[F.smoothScrolling=113]="smoothScrolling",F[F.stickyScroll=114]="stickyScroll",F[F.stickyTabStops=115]="stickyTabStops",F[F.stopRenderingLineAfter=116]="stopRenderingLineAfter",F[F.suggest=117]="suggest",F[F.suggestFontSize=118]="suggestFontSize",F[F.suggestLineHeight=119]="suggestLineHeight",F[F.suggestOnTriggerCharacters=120]="suggestOnTriggerCharacters",F[F.suggestSelection=121]="suggestSelection",F[F.tabCompletion=122]="tabCompletion",F[F.tabIndex=123]="tabIndex",F[F.unicodeHighlighting=124]="unicodeHighlighting",F[F.unusualLineTerminators=125]="unusualLineTerminators",F[F.useShadowDOM=126]="useShadowDOM",F[F.useTabStops=127]="useTabStops",F[F.wordBreak=128]="wordBreak",F[F.wordSeparators=129]="wordSeparators",F[F.wordWrap=130]="wordWrap",F[F.wordWrapBreakAfterCharacters=131]="wordWrapBreakAfterCharacters",F[F.wordWrapBreakBeforeCharacters=132]="wordWrapBreakBeforeCharacters",F[F.wordWrapColumn=133]="wordWrapColumn",F[F.wordWrapOverride1=134]="wordWrapOverride1",F[F.wordWrapOverride2=135]="wordWrapOverride2",F[F.wrappingIndent=136]="wrappingIndent",F[F.wrappingStrategy=137]="wrappingStrategy",F[F.showDeprecated=138]="showDeprecated",F[F.inlayHints=139]="inlayHints",F[F.editorClassName=140]="editorClassName",F[F.pixelRatio=141]="pixelRatio",F[F.tabFocusMode=142]="tabFocusMode",F[F.layoutInfo=143]="layoutInfo",F[F.wrappingInfo=144]="wrappingInfo",F[F.defaultColorDecorators=145]="defaultColorDecorators",F[F.colorDecoratorsActivatedOn=146]="colorDecoratorsActivatedOn",F[F.inlineCompletionsAccessibilityVerbose=147]="inlineCompletionsAccessibilityVerbose"})(n||(e.EditorOption=n={}));var t;(function(F){F[F.TextDefined=0]="TextDefined",F[F.LF=1]="LF",F[F.CRLF=2]="CRLF"})(t||(e.EndOfLinePreference=t={}));var r;(function(F){F[F.LF=0]="LF",F[F.CRLF=1]="CRLF"})(r||(e.EndOfLineSequence=r={}));var u;(function(F){F[F.Left=1]="Left",F[F.Right=2]="Right"})(u||(e.GlyphMarginLane=u={}));var f;(function(F){F[F.None=0]="None",F[F.Indent=1]="Indent",F[F.IndentOutdent=2]="IndentOutdent",F[F.Outdent=3]="Outdent"})(f||(e.IndentAction=f={}));var d;(function(F){F[F.Both=0]="Both",F[F.Right=1]="Right",F[F.Left=2]="Left",F[F.None=3]="None"})(d||(e.InjectedTextCursorStops=d={}));var l;(function(F){F[F.Type=1]="Type",F[F.Parameter=2]="Parameter"})(l||(e.InlayHintKind=l={}));var o;(function(F){F[F.Automatic=0]="Automatic",F[F.Explicit=1]="Explicit"})(o||(e.InlineCompletionTriggerKind=o={}));var c;(function(F){F[F.DependsOnKbLayout=-1]="DependsOnKbLayout",F[F.Unknown=0]="Unknown",F[F.Backspace=1]="Backspace",F[F.Tab=2]="Tab",F[F.Enter=3]="Enter",F[F.Shift=4]="Shift",F[F.Ctrl=5]="Ctrl",F[F.Alt=6]="Alt",F[F.PauseBreak=7]="PauseBreak",F[F.CapsLock=8]="CapsLock",F[F.Escape=9]="Escape",F[F.Space=10]="Space",F[F.PageUp=11]="PageUp",F[F.PageDown=12]="PageDown",F[F.End=13]="End",F[F.Home=14]="Home",F[F.LeftArrow=15]="LeftArrow",F[F.UpArrow=16]="UpArrow",F[F.RightArrow=17]="RightArrow",F[F.DownArrow=18]="DownArrow",F[F.Insert=19]="Insert",F[F.Delete=20]="Delete",F[F.Digit0=21]="Digit0",F[F.Digit1=22]="Digit1",F[F.Digit2=23]="Digit2",F[F.Digit3=24]="Digit3",F[F.Digit4=25]="Digit4",F[F.Digit5=26]="Digit5",F[F.Digit6=27]="Digit6",F[F.Digit7=28]="Digit7",F[F.Digit8=29]="Digit8",F[F.Digit9=30]="Digit9",F[F.KeyA=31]="KeyA",F[F.KeyB=32]="KeyB",F[F.KeyC=33]="KeyC",F[F.KeyD=34]="KeyD",F[F.KeyE=35]="KeyE",F[F.KeyF=36]="KeyF",F[F.KeyG=37]="KeyG",F[F.KeyH=38]="KeyH",F[F.KeyI=39]="KeyI",F[F.KeyJ=40]="KeyJ",F[F.KeyK=41]="KeyK",F[F.KeyL=42]="KeyL",F[F.KeyM=43]="KeyM",F[F.KeyN=44]="KeyN",F[F.KeyO=45]="KeyO",F[F.KeyP=46]="KeyP",F[F.KeyQ=47]="KeyQ",F[F.KeyR=48]="KeyR",F[F.KeyS=49]="KeyS",F[F.KeyT=50]="KeyT",F[F.KeyU=51]="KeyU",F[F.KeyV=52]="KeyV",F[F.KeyW=53]="KeyW",F[F.KeyX=54]="KeyX",F[F.KeyY=55]="KeyY",F[F.KeyZ=56]="KeyZ",F[F.Meta=57]="Meta",F[F.ContextMenu=58]="ContextMenu",F[F.F1=59]="F1",F[F.F2=60]="F2",F[F.F3=61]="F3",F[F.F4=62]="F4",F[F.F5=63]="F5",F[F.F6=64]="F6",F[F.F7=65]="F7",F[F.F8=66]="F8",F[F.F9=67]="F9",F[F.F10=68]="F10",F[F.F11=69]="F11",F[F.F12=70]="F12",F[F.F13=71]="F13",F[F.F14=72]="F14",F[F.F15=73]="F15",F[F.F16=74]="F16",F[F.F17=75]="F17",F[F.F18=76]="F18",F[F.F19=77]="F19",F[F.F20=78]="F20",F[F.F21=79]="F21",F[F.F22=80]="F22",F[F.F23=81]="F23",F[F.F24=82]="F24",F[F.NumLock=83]="NumLock",F[F.ScrollLock=84]="ScrollLock",F[F.Semicolon=85]="Semicolon",F[F.Equal=86]="Equal",F[F.Comma=87]="Comma",F[F.Minus=88]="Minus",F[F.Period=89]="Period",F[F.Slash=90]="Slash",F[F.Backquote=91]="Backquote",F[F.BracketLeft=92]="BracketLeft",F[F.Backslash=93]="Backslash",F[F.BracketRight=94]="BracketRight",F[F.Quote=95]="Quote",F[F.OEM_8=96]="OEM_8",F[F.IntlBackslash=97]="IntlBackslash",F[F.Numpad0=98]="Numpad0",F[F.Numpad1=99]="Numpad1",F[F.Numpad2=100]="Numpad2",F[F.Numpad3=101]="Numpad3",F[F.Numpad4=102]="Numpad4",F[F.Numpad5=103]="Numpad5",F[F.Numpad6=104]="Numpad6",F[F.Numpad7=105]="Numpad7",F[F.Numpad8=106]="Numpad8",F[F.Numpad9=107]="Numpad9",F[F.NumpadMultiply=108]="NumpadMultiply",F[F.NumpadAdd=109]="NumpadAdd",F[F.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",F[F.NumpadSubtract=111]="NumpadSubtract",F[F.NumpadDecimal=112]="NumpadDecimal",F[F.NumpadDivide=113]="NumpadDivide",F[F.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",F[F.ABNT_C1=115]="ABNT_C1",F[F.ABNT_C2=116]="ABNT_C2",F[F.AudioVolumeMute=117]="AudioVolumeMute",F[F.AudioVolumeUp=118]="AudioVolumeUp",F[F.AudioVolumeDown=119]="AudioVolumeDown",F[F.BrowserSearch=120]="BrowserSearch",F[F.BrowserHome=121]="BrowserHome",F[F.BrowserBack=122]="BrowserBack",F[F.BrowserForward=123]="BrowserForward",F[F.MediaTrackNext=124]="MediaTrackNext",F[F.MediaTrackPrevious=125]="MediaTrackPrevious",F[F.MediaStop=126]="MediaStop",F[F.MediaPlayPause=127]="MediaPlayPause",F[F.LaunchMediaPlayer=128]="LaunchMediaPlayer",F[F.LaunchMail=129]="LaunchMail",F[F.LaunchApp2=130]="LaunchApp2",F[F.Clear=131]="Clear",F[F.MAX_VALUE=132]="MAX_VALUE"})(c||(e.KeyCode=c={}));var a;(function(F){F[F.Hint=1]="Hint",F[F.Info=2]="Info",F[F.Warning=4]="Warning",F[F.Error=8]="Error"})(a||(e.MarkerSeverity=a={}));var g;(function(F){F[F.Unnecessary=1]="Unnecessary",F[F.Deprecated=2]="Deprecated"})(g||(e.MarkerTag=g={}));var h;(function(F){F[F.Inline=1]="Inline",F[F.Gutter=2]="Gutter"})(h||(e.MinimapPosition=h={}));var p;(function(F){F[F.UNKNOWN=0]="UNKNOWN",F[F.TEXTAREA=1]="TEXTAREA",F[F.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",F[F.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",F[F.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",F[F.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",F[F.CONTENT_TEXT=6]="CONTENT_TEXT",F[F.CONTENT_EMPTY=7]="CONTENT_EMPTY",F[F.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",F[F.CONTENT_WIDGET=9]="CONTENT_WIDGET",F[F.OVERVIEW_RULER=10]="OVERVIEW_RULER",F[F.SCROLLBAR=11]="SCROLLBAR",F[F.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",F[F.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(p||(e.MouseTargetType=p={}));var b;(function(F){F[F.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",F[F.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",F[F.TOP_CENTER=2]="TOP_CENTER"})(b||(e.OverlayWidgetPositionPreference=b={}));var w;(function(F){F[F.Left=1]="Left",F[F.Center=2]="Center",F[F.Right=4]="Right",F[F.Full=7]="Full"})(w||(e.OverviewRulerLane=w={}));var E;(function(F){F[F.Left=0]="Left",F[F.Right=1]="Right",F[F.None=2]="None",F[F.LeftOfInjectedText=3]="LeftOfInjectedText",F[F.RightOfInjectedText=4]="RightOfInjectedText"})(E||(e.PositionAffinity=E={}));var k;(function(F){F[F.Off=0]="Off",F[F.On=1]="On",F[F.Relative=2]="Relative",F[F.Interval=3]="Interval",F[F.Custom=4]="Custom"})(k||(e.RenderLineNumbersType=k={}));var M;(function(F){F[F.None=0]="None",F[F.Text=1]="Text",F[F.Blocks=2]="Blocks"})(M||(e.RenderMinimap=M={}));var R;(function(F){F[F.Smooth=0]="Smooth",F[F.Immediate=1]="Immediate"})(R||(e.ScrollType=R={}));var B;(function(F){F[F.Auto=1]="Auto",F[F.Hidden=2]="Hidden",F[F.Visible=3]="Visible"})(B||(e.ScrollbarVisibility=B={}));var T;(function(F){F[F.LTR=0]="LTR",F[F.RTL=1]="RTL"})(T||(e.SelectionDirection=T={}));var N;(function(F){F[F.Invoke=1]="Invoke",F[F.TriggerCharacter=2]="TriggerCharacter",F[F.ContentChange=3]="ContentChange"})(N||(e.SignatureHelpTriggerKind=N={}));var A;(function(F){F[F.File=0]="File",F[F.Module=1]="Module",F[F.Namespace=2]="Namespace",F[F.Package=3]="Package",F[F.Class=4]="Class",F[F.Method=5]="Method",F[F.Property=6]="Property",F[F.Field=7]="Field",F[F.Constructor=8]="Constructor",F[F.Enum=9]="Enum",F[F.Interface=10]="Interface",F[F.Function=11]="Function",F[F.Variable=12]="Variable",F[F.Constant=13]="Constant",F[F.String=14]="String",F[F.Number=15]="Number",F[F.Boolean=16]="Boolean",F[F.Array=17]="Array",F[F.Object=18]="Object",F[F.Key=19]="Key",F[F.Null=20]="Null",F[F.EnumMember=21]="EnumMember",F[F.Struct=22]="Struct",F[F.Event=23]="Event",F[F.Operator=24]="Operator",F[F.TypeParameter=25]="TypeParameter"})(A||(e.SymbolKind=A={}));var P;(function(F){F[F.Deprecated=1]="Deprecated"})(P||(e.SymbolTag=P={}));var O;(function(F){F[F.Hidden=0]="Hidden",F[F.Blink=1]="Blink",F[F.Smooth=2]="Smooth",F[F.Phase=3]="Phase",F[F.Expand=4]="Expand",F[F.Solid=5]="Solid"})(O||(e.TextEditorCursorBlinkingStyle=O={}));var x;(function(F){F[F.Line=1]="Line",F[F.Block=2]="Block",F[F.Underline=3]="Underline",F[F.LineThin=4]="LineThin",F[F.BlockOutline=5]="BlockOutline",F[F.UnderlineThin=6]="UnderlineThin"})(x||(e.TextEditorCursorStyle=x={}));var W;(function(F){F[F.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",F[F.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",F[F.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",F[F.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(W||(e.TrackedRangeStickiness=W={}));var U;(function(F){F[F.None=0]="None",F[F.Same=1]="Same",F[F.Indent=2]="Indent",F[F.DeepIndent=3]="DeepIndent"})(U||(e.WrappingIndent=U={}))}),define(te[516],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairWithMinIndentationInfo=e.BracketPairInfo=e.BracketInfo=void 0;class L{constructor(S,m,_,v){this.range=S,this.nestingLevel=m,this.nestingLevelOfEqualBracketType=_,this.isInvalid=v}}e.BracketInfo=L;class I{constructor(S,m,_,v,C,s){this.range=S,this.openingBracketRange=m,this.closingBracketRange=_,this.nestingLevel=v,this.nestingLevelOfEqualBracketType=C,this.bracketPairNode=s}get openingBracketInfo(){return this.bracketPairNode.openingBracket.bracketInfo}}e.BracketPairInfo=I;class y extends I{constructor(S,m,_,v,C,s,i){super(S,m,_,v,C,s),this.minVisibleColumnIndentation=i}}e.BracketPairWithMinIndentationInfo=y}),define(te[517],ie([1,0,6,2,516,177,283,87,282,126,207,13,281]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTree=void 0;class n extends I.Disposable{didLanguageChange(o){return this.brackets.didLanguageChange(o)}constructor(o,c){if(super(),this.textModel=o,this.getLanguageConfiguration=c,this.didChangeEmitter=new L.Emitter,this.denseKeyProvider=new v.DenseKeyProvider,this.brackets=new S.LanguageAgnosticBracketTokens(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,this.queuedTextEditsForInitialAstWithoutTokens=[],this.queuedTextEdits=[],o.tokenization.hasTokens)o.tokenization.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens);else{const a=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),g=new C.FastTokenizer(this.textModel.getValue(),a);this.initialAstWithoutTokens=(0,_.parseDocument)(g,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}}handleDidChangeBackgroundTokenizationState(){if(this.textModel.tokenization.backgroundTokenizationState===2){const o=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,o||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:o}){const c=o.map(a=>new D.TextEditInfo((0,m.toLength)(a.fromLineNumber-1,0),(0,m.toLength)(a.toLineNumber,0),(0,m.toLength)(a.toLineNumber-a.fromLineNumber+1,0)));this.handleEdits(c,!0),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(o){const c=D.TextEditInfo.fromModelContentChanges(o.changes);this.handleEdits(c,!1)}handleEdits(o,c){const a=(0,i.combineTextEditInfos)(this.queuedTextEdits,o);this.queuedTextEdits=a,this.initialAstWithoutTokens&&!c&&(this.queuedTextEditsForInitialAstWithoutTokens=(0,i.combineTextEditInfos)(this.queuedTextEditsForInitialAstWithoutTokens,o))}flushQueue(){this.queuedTextEdits.length>0&&(this.astWithTokens=this.parseDocumentFromTextBuffer(this.queuedTextEdits,this.astWithTokens,!1),this.queuedTextEdits=[]),this.queuedTextEditsForInitialAstWithoutTokens.length>0&&(this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(this.queuedTextEditsForInitialAstWithoutTokens,this.initialAstWithoutTokens,!1)),this.queuedTextEditsForInitialAstWithoutTokens=[])}parseDocumentFromTextBuffer(o,c,a){const h=c,p=new C.TextBufferTokenizer(this.textModel,this.brackets);return(0,_.parseDocument)(p,o,h,a)}getBracketsInRange(o,c){this.flushQueue();const a=(0,m.toLength)(o.startLineNumber-1,o.startColumn-1),g=(0,m.toLength)(o.endLineNumber-1,o.endColumn-1);return new s.CallbackIterable(h=>{const p=this.initialAstWithoutTokens||this.astWithTokens;u(p,m.lengthZero,p.length,a,g,h,0,0,new Map,c)})}getBracketPairsInRange(o,c){this.flushQueue();const a=(0,m.positionToLength)(o.getStartPosition()),g=(0,m.positionToLength)(o.getEndPosition());return new s.CallbackIterable(h=>{const p=this.initialAstWithoutTokens||this.astWithTokens,b=new f(h,c,this.textModel);d(p,m.lengthZero,p.length,a,g,b,0,new Map)})}getFirstBracketAfter(o){this.flushQueue();const c=this.initialAstWithoutTokens||this.astWithTokens;return r(c,m.lengthZero,c.length,(0,m.positionToLength)(o))}getFirstBracketBefore(o){this.flushQueue();const c=this.initialAstWithoutTokens||this.astWithTokens;return t(c,m.lengthZero,c.length,(0,m.positionToLength)(o))}}e.BracketPairsTree=n;function t(l,o,c,a){if(l.kind===4||l.kind===2){const g=[];for(const h of l.children)c=(0,m.lengthAdd)(o,h.length),g.push({nodeOffsetStart:o,nodeOffsetEnd:c}),o=c;for(let h=g.length-1;h>=0;h--){const{nodeOffsetStart:p,nodeOffsetEnd:b}=g[h];if((0,m.lengthLessThan)(p,a)){const w=t(l.children[h],p,b,a);if(w)return w}}return null}else{if(l.kind===3)return null;if(l.kind===1){const g=(0,m.lengthsToRange)(o,c);return{bracketInfo:l.bracketInfo,range:g}}}return null}function r(l,o,c,a){if(l.kind===4||l.kind===2){for(const g of l.children){if(c=(0,m.lengthAdd)(o,g.length),(0,m.lengthLessThan)(a,c)){const h=r(g,o,c,a);if(h)return h}o=c}return null}else{if(l.kind===3)return null;if(l.kind===1){const g=(0,m.lengthsToRange)(o,c);return{bracketInfo:l.bracketInfo,range:g}}}return null}function u(l,o,c,a,g,h,p,b,w,E,k=!1){if(p>200)return!0;e:for(;;)switch(l.kind){case 4:{const M=l.childrenLength;for(let R=0;R200)return!0;let E=!0;if(l.kind===2){let k=0;if(b){let B=b.get(l.openingBracket.text);B===void 0&&(B=0),k=B,B++,b.set(l.openingBracket.text,B)}const M=(0,m.lengthAdd)(o,l.openingBracket.length);let R=-1;if(h.includeMinIndentation&&(R=l.computeMinIndentation(o,h.textModel)),E=h.push(new y.BracketPairWithMinIndentationInfo((0,m.lengthsToRange)(o,c),(0,m.lengthsToRange)(o,M),l.closingBracket?(0,m.lengthsToRange)((0,m.lengthAdd)(M,((w=l.child)===null||w===void 0?void 0:w.length)||m.lengthZero),c):void 0,p,k,l,R)),o=M,E&&l.child){const B=l.child;if(c=(0,m.lengthAdd)(o,B.length),(0,m.lengthLessThanEqual)(o,g)&&(0,m.lengthGreaterThanEqual)(c,a)&&(E=d(B,o,c,a,g,h,p+1,b),!E))return!1}b?.set(l.openingBracket.text,k)}else{let k=o;for(const M of l.children){const R=k;if(k=(0,m.lengthAdd)(k,M.length),(0,m.lengthLessThanEqual)(R,g)&&(0,m.lengthLessThanEqual)(a,k)&&(E=d(M,R,k,a,g,h,p,b),!E))return!1}}return E}}),define(te[110],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InternalModelContentChangeEvent=e.ModelInjectedTextChangedEvent=e.ModelRawContentChangedEvent=e.ModelRawEOLChanged=e.ModelRawLinesInserted=e.ModelRawLinesDeleted=e.ModelRawLineChanged=e.LineInjectedText=e.ModelRawFlush=void 0;class L{constructor(){this.changeType=1}}e.ModelRawFlush=L;class I{static applyInjectedText(i,n){if(!n||n.length===0)return i;let t="",r=0;for(const u of n)t+=i.substring(r,u.column-1),r=u.column-1,t+=u.options.content;return t+=i.substring(r),t}static fromDecorations(i){const n=[];for(const t of i)t.options.before&&t.options.before.content.length>0&&n.push(new I(t.ownerId,t.range.startLineNumber,t.range.startColumn,t.options.before,0)),t.options.after&&t.options.after.content.length>0&&n.push(new I(t.ownerId,t.range.endLineNumber,t.range.endColumn,t.options.after,1));return n.sort((t,r)=>t.lineNumber===r.lineNumber?t.column===r.column?t.order-r.order:t.column-r.column:t.lineNumber-r.lineNumber),n}constructor(i,n,t,r,u){this.ownerId=i,this.lineNumber=n,this.column=t,this.options=r,this.order=u}}e.LineInjectedText=I;class y{constructor(i,n,t){this.changeType=2,this.lineNumber=i,this.detail=n,this.injectedText=t}}e.ModelRawLineChanged=y;class D{constructor(i,n){this.changeType=3,this.fromLineNumber=i,this.toLineNumber=n}}e.ModelRawLinesDeleted=D;class S{constructor(i,n,t,r){this.changeType=4,this.injectedTexts=r,this.fromLineNumber=i,this.toLineNumber=n,this.detail=t}}e.ModelRawLinesInserted=S;class m{constructor(){this.changeType=5}}e.ModelRawEOLChanged=m;class _{constructor(i,n,t,r){this.changes=i,this.versionId=n,this.isUndoing=t,this.isRedoing=r,this.resultingSelection=null}containsEvent(i){for(let n=0,t=this.changes.length;nu)throw new v.BugIndicatingError("Illegal value for lineNumber");const f=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(f&&f.offSide);let l=-2,o=-1,c=-2,a=-1;const g=A=>{if(l!==-1&&(l===-2||l>A-1)){l=-1,o=-1;for(let P=A-2;P>=0;P--){const O=this._computeIndentLevel(P);if(O>=0){l=P,o=O;break}}}if(c===-2){c=-1,a=-1;for(let P=A;P=0){c=P,a=O;break}}}};let h=-2,p=-1,b=-2,w=-1;const E=A=>{if(h===-2){h=-1,p=-1;for(let P=A-2;P>=0;P--){const O=this._computeIndentLevel(P);if(O>=0){h=P,p=O;break}}}if(b!==-1&&(b===-2||b=0){b=P,w=O;break}}}};let k=0,M=!0,R=0,B=!0,T=0,N=0;for(let A=0;M||B;A++){const P=n-A,O=n+A;A>1&&(P<1||P1&&(O>u||O>r)&&(B=!1),A>5e4&&(M=!1,B=!1);let x=-1;if(M&&P>=1){const U=this._computeIndentLevel(P-1);U>=0?(c=P-1,a=U,x=Math.ceil(U/this.textModel.getOptions().indentSize)):(g(P),x=this._getIndentLevelForWhitespaceLine(d,o,a))}let W=-1;if(B&&O<=u){const U=this._computeIndentLevel(O-1);U>=0?(h=O-1,p=U,W=Math.ceil(U/this.textModel.getOptions().indentSize)):(E(O),W=this._getIndentLevelForWhitespaceLine(d,p,w))}if(A===0){N=x;continue}if(A===1){if(O<=u&&W>=0&&N+1===W){M=!1,k=O,R=O,T=W;continue}if(P>=1&&x>=0&&x-1===N){B=!1,k=P,R=P,T=x;continue}if(k=n,R=n,T=N,T===0)return{startLineNumber:k,endLineNumber:R,indent:T}}M&&(x>=T?k=P:M=!1),B&&(W>=T?R=O:B=!1)}return{startLineNumber:k,endLineNumber:R,indent:T}}getLinesBracketGuides(n,t,r,u){var f;const d=[];for(let h=n;h<=t;h++)d.push([]);const l=!0,o=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new D.Range(n,1,t,this.textModel.getLineMaxColumn(t))).toArray();let c;if(r&&o.length>0){const h=(n<=r.lineNumber&&r.lineNumber<=t?o:this.textModel.bracketPairs.getBracketPairsInRange(D.Range.fromPositions(r)).toArray()).filter(p=>D.Range.strictContainsPosition(p.range,r));c=(f=(0,L.findLast)(h,p=>l||p.range.startLineNumber!==p.range.endLineNumber))===null||f===void 0?void 0:f.range}const a=this.textModel.getOptions().bracketPairColorizationOptions.independentColorPoolPerBracketType,g=new s;for(const h of o){if(!h.closingBracketRange)continue;const p=c&&h.range.equalsRange(c);if(!p&&!u.includeInactive)continue;const b=g.getInlineClassName(h.nestingLevel,h.nestingLevelOfEqualBracketType,a)+(u.highlightActive&&p?" "+g.activeClassName:""),w=h.openingBracketRange.getStartPosition(),E=h.closingBracketRange.getStartPosition(),k=u.horizontalGuides===_.HorizontalGuidesState.Enabled||u.horizontalGuides===_.HorizontalGuidesState.EnabledForActive&&p;if(h.range.startLineNumber===h.range.endLineNumber){l&&k&&d[h.range.startLineNumber-n].push(new _.IndentGuide(-1,h.openingBracketRange.getEndPosition().column,b,new _.IndentGuideHorizontalLine(!1,E.column),-1,-1));continue}const M=this.getVisibleColumnFromPosition(E),R=this.getVisibleColumnFromPosition(h.openingBracketRange.getStartPosition()),B=Math.min(R,M,h.minVisibleColumnIndentation+1);let T=!1;I.firstNonWhitespaceIndex(this.textModel.getLineContent(h.closingBracketRange.startLineNumber))=n&&R>B&&d[w.lineNumber-n].push(new _.IndentGuide(B,-1,b,new _.IndentGuideHorizontalLine(!1,w.column),-1,-1)),E.lineNumber<=t&&M>B&&d[E.lineNumber-n].push(new _.IndentGuide(B,-1,b,new _.IndentGuideHorizontalLine(!T,E.column),-1,-1)))}for(const h of d)h.sort((p,b)=>p.visibleColumn-b.visibleColumn);return d}getVisibleColumnFromPosition(n){return y.CursorColumns.visibleColumnFromColumn(this.textModel.getLineContent(n.lineNumber),n.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(n,t){this.assertNotDisposed();const r=this.textModel.getLineCount();if(n<1||n>r)throw new Error("Illegal value for startLineNumber");if(t<1||t>r)throw new Error("Illegal value for endLineNumber");const u=this.textModel.getOptions(),f=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,d=!!(f&&f.offSide),l=new Array(t-n+1);let o=-2,c=-1,a=-2,g=-1;for(let h=n;h<=t;h++){const p=h-n,b=this._computeIndentLevel(h-1);if(b>=0){o=h-1,c=b,l[p]=Math.ceil(b/u.indentSize);continue}if(o===-2){o=-1,c=-1;for(let w=h-2;w>=0;w--){const E=this._computeIndentLevel(w);if(E>=0){o=w,c=E;break}}}if(a!==-1&&(a===-2||a=0){a=w,g=E;break}}}l[p]=this._getIndentLevelForWhitespaceLine(d,c,g)}return l}_getIndentLevelForWhitespaceLine(n,t,r){const u=this.textModel.getOptions();return t===-1||r===-1?0:t{this._tokenizationSupports.get(m)===_&&(this._tokenizationSupports.delete(m),this.handleChange([m]))})}get(m){return this._tokenizationSupports.get(m)||null}registerFactory(m,_){var v;(v=this._factories.get(m))===null||v===void 0||v.dispose();const C=new D(this,m,_);return this._factories.set(m,C),(0,I.toDisposable)(()=>{const s=this._factories.get(m);!s||s!==C||(this._factories.delete(m),s.dispose())})}getOrCreate(m){return be(this,void 0,void 0,function*(){const _=this.get(m);if(_)return _;const v=this._factories.get(m);return!v||v.isResolved?null:(yield v.resolve(),this.get(m))})}isResolved(m){if(this.get(m))return!0;const v=this._factories.get(m);return!!(!v||v.isResolved)}setColorMap(m){this._colorMap=m,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}e.TokenizationRegistry=y;class D extends I.Disposable{get isResolved(){return this._isResolved}constructor(m,_,v){super(),this._registry=m,this._languageId=_,this._factory=v,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return be(this,void 0,void 0,function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise})}_create(){return be(this,void 0,void 0,function*(){const m=yield this._factory.tokenizationSupport;this._isResolved=!0,m&&!this._isDisposed&&this._register(this._registry.register(this._languageId,m))})}}}),define(te[519],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokens=void 0;class L{get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}constructor(y,D){this._startLineNumber=y,this._tokens=D}getLineTokens(y){return this._tokens[y-this._startLineNumber]}appendLineTokens(y){this._tokens.push(y)}}e.ContiguousMultilineTokens=L}),define(te[291],ie([1,0,519]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContiguousMultilineTokensBuilder=void 0;class I{constructor(){this._tokens=[]}add(D,S){if(this._tokens.length>0){const m=this._tokens[this._tokens.length-1];if(m.endLineNumber+1===D){m.appendLineTokens(S);return}}this._tokens.push(new L.ContiguousMultilineTokens(D,[S]))}finalize(){return this._tokens}}e.ContiguousMultilineTokensBuilder=I}),define(te[91],ie([1,0,124]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineTokens=void 0;class I{static createEmpty(S,m){const _=I.defaultTokenMetadata,v=new Uint32Array(2);return v[0]=S.length,v[1]=_,new I(v,S,m)}constructor(S,m,_){this._lineTokensBrand=void 0,this._tokens=S,this._tokensCount=this._tokens.length>>>1,this._text=m,this._languageIdCodec=_}equals(S){return S instanceof I?this.slicedEquals(S,0,this._tokensCount):!1}slicedEquals(S,m,_){if(this._text!==S._text||this._tokensCount!==S._tokensCount)return!1;const v=m<<1,C=v+(_<<1);for(let s=v;s0?this._tokens[S-1<<1]:0}getMetadata(S){return this._tokens[(S<<1)+1]}getLanguageId(S){const m=this._tokens[(S<<1)+1],_=L.TokenMetadata.getLanguageId(m);return this._languageIdCodec.decodeLanguageId(_)}getStandardTokenType(S){const m=this._tokens[(S<<1)+1];return L.TokenMetadata.getTokenType(m)}getForeground(S){const m=this._tokens[(S<<1)+1];return L.TokenMetadata.getForeground(m)}getClassName(S){const m=this._tokens[(S<<1)+1];return L.TokenMetadata.getClassNameFromMetadata(m)}getInlineStyle(S,m){const _=this._tokens[(S<<1)+1];return L.TokenMetadata.getInlineStyleFromMetadata(_,m)}getPresentation(S){const m=this._tokens[(S<<1)+1];return L.TokenMetadata.getPresentationFromMetadata(m)}getEndOffset(S){return this._tokens[S<<1]}findTokenIndexAtOffset(S){return I.findIndexInTokensArray(this._tokens,S)}inflate(){return this}sliceAndInflate(S,m,_){return new y(this,S,m,_)}static convertToEndOffset(S,m){const v=(S.length>>>1)-1;for(let C=0;C>>1)-1;for(;_m&&(v=C)}return _}withInserted(S){if(S.length===0)return this;let m=0,_=0,v="";const C=new Array;let s=0;for(;;){const i=ms){v+=this._text.substring(s,n.offset);const t=this._tokens[(m<<1)+1];C.push(v.length,t),s=n.offset}v+=n.text,C.push(v.length,n.tokenMetadata),_++}else break}return new I(new Uint32Array(C),v,this._languageIdCodec)}}e.LineTokens=I,I.defaultTokenMetadata=(0<<11|1<<15|2<<24)>>>0;class y{constructor(S,m,_,v){this._source=S,this._startOffset=m,this._endOffset=_,this._deltaOffset=v,this._firstTokenIndex=S.findTokenIndexAtOffset(m),this._tokensCount=0;for(let C=this._firstTokenIndex,s=S.getCount();C=_);C++)this._tokensCount++}getMetadata(S){return this._source.getMetadata(this._firstTokenIndex+S)}getLanguageId(S){return this._source.getLanguageId(this._firstTokenIndex+S)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(S){return S instanceof y?this._startOffset===S._startOffset&&this._endOffset===S._endOffset&&this._deltaOffset===S._deltaOffset&&this._source.slicedEquals(S._source,this._firstTokenIndex,this._tokensCount):!1}getCount(){return this._tokensCount}getForeground(S){return this._source.getForeground(this._firstTokenIndex+S)}getEndOffset(S){const m=this._source.getEndOffset(this._firstTokenIndex+S);return Math.min(this._endOffset,m)-this._startOffset+this._deltaOffset}getClassName(S){return this._source.getClassName(this._firstTokenIndex+S)}getInlineStyle(S,m){return this._source.getInlineStyle(this._firstTokenIndex+S,m)}getPresentation(S){return this._source.getPresentation(this._firstTokenIndex+S)}findTokenIndexAtOffset(S){return this._source.findTokenIndexAtOffset(S+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}}),define(te[520],ie([1,0,91]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toUint32Array=e.ContiguousTokensEditing=e.EMPTY_LINE_TOKENS=void 0,e.EMPTY_LINE_TOKENS=new Uint32Array(0).buffer;class I{static deleteBeginning(S,m){return S===null||S===e.EMPTY_LINE_TOKENS?S:I.delete(S,0,m)}static deleteEnding(S,m){if(S===null||S===e.EMPTY_LINE_TOKENS)return S;const _=y(S),v=_[_.length-2];return I.delete(S,m,v)}static delete(S,m,_){if(S===null||S===e.EMPTY_LINE_TOKENS||m===_)return S;const v=y(S),C=v.length>>>1;if(m===0&&v[v.length-2]===_)return e.EMPTY_LINE_TOKENS;const s=L.LineTokens.findIndexInTokensArray(v,m),i=s>0?v[s-1<<1]:0,n=v[s<<1];if(_r&&(v[t++]=l,v[t++]=v[(d<<1)+1],r=l)}if(t===v.length)return S;const f=new Uint32Array(t);return f.set(v.subarray(0,t),0),f.buffer}static append(S,m){if(m===e.EMPTY_LINE_TOKENS)return S;if(S===e.EMPTY_LINE_TOKENS)return m;if(S===null)return S;if(m===null)return null;const _=y(S),v=y(m),C=v.length>>>1,s=new Uint32Array(_.length+v.length);s.set(_,0);let i=_.length;const n=_[_.length-2];for(let t=0;t>>1;let s=L.LineTokens.findIndexInTokensArray(v,m);s>0&&v[s-1<<1]===m&&s--;for(let i=s;i0}getTokens(C,s,i){let n=null;if(s1&&(t=S.TokenMetadata.getLanguageId(n[1])!==C),!t)return y.EMPTY_LINE_TOKENS}if(!n||n.length===0){const t=new Uint32Array(2);return t[0]=s,t[1]=_(C),t.buffer}return n[n.length-2]=s,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(C){for(;C>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(C,s){s!==0&&(C+s>this._len&&(s=this._len-C),this._lineTokens.splice(C,s),this._len-=s)}_insertLines(C,s){if(s===0)return;const i=[];for(let n=0;n=this._len)return;if(C.startLineNumber===C.endLineNumber){if(C.startColumn===C.endColumn)return;this._lineTokens[s]=y.ContiguousTokensEditing.delete(this._lineTokens[s],C.startColumn-1,C.endColumn-1);return}this._lineTokens[s]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[s],C.startColumn-1);const i=C.endLineNumber-1;let n=null;i=this._len)){if(s===0){this._lineTokens[n]=y.ContiguousTokensEditing.insert(this._lineTokens[n],C.column-1,i);return}this._lineTokens[n]=y.ContiguousTokensEditing.deleteEnding(this._lineTokens[n],C.column-1),this._lineTokens[n]=y.ContiguousTokensEditing.insert(this._lineTokens[n],C.column-1,i),this._insertLines(C.lineNumber,s)}}setMultilineTokens(C,s){if(C.length===0)return{changes:[]};const i=[];for(let n=0,t=C.length;n>>0}}),define(te[522],ie([1,0,12,5,122]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SparseLineTokens=e.SparseMultilineTokens=void 0;class D{static create(v,C){return new D(v,new S(C))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}constructor(v,C){this._startLineNumber=v,this._tokens=C,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(v){return this._startLineNumber<=v&&v<=this._endLineNumber?this._tokens.getLineTokens(v-this._startLineNumber):null}getRange(){const v=this._tokens.getRange();return v&&new I.Range(this._startLineNumber+v.startLineNumber,v.startColumn,this._startLineNumber+v.endLineNumber,v.endColumn)}removeTokens(v){const C=v.startLineNumber-this._startLineNumber,s=v.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(C,v.startColumn-1,s,v.endColumn-1),this._updateEndLineNumber()}split(v){const C=v.startLineNumber-this._startLineNumber,s=v.endLineNumber-this._startLineNumber,[i,n,t]=this._tokens.split(C,v.startColumn-1,s,v.endColumn-1);return[new D(this._startLineNumber,i),new D(this._startLineNumber+t,n)]}applyEdit(v,C){const[s,i,n]=(0,y.countEOL)(C);this.acceptEdit(v,s,i,n,C.length>0?C.charCodeAt(0):0)}acceptEdit(v,C,s,i,n){this._acceptDeleteRange(v),this._acceptInsertText(new L.Position(v.startLineNumber,v.startColumn),C,s,i,n),this._updateEndLineNumber()}_acceptDeleteRange(v){if(v.startLineNumber===v.endLineNumber&&v.startColumn===v.endColumn)return;const C=v.startLineNumber-this._startLineNumber,s=v.endLineNumber-this._startLineNumber;if(s<0){const n=s-C;this._startLineNumber-=n;return}const i=this._tokens.getMaxDeltaLine();if(!(C>=i+1)){if(C<0&&s>=i+1){this._startLineNumber=0,this._tokens.clear();return}if(C<0){const n=-C;this._startLineNumber-=n,this._tokens.acceptDeleteRange(v.startColumn-1,0,0,s,v.endColumn-1)}else this._tokens.acceptDeleteRange(0,C,v.startColumn-1,s,v.endColumn-1)}}_acceptInsertText(v,C,s,i,n){if(C===0&&s===0)return;const t=v.lineNumber-this._startLineNumber;if(t<0){this._startLineNumber+=C;return}const r=this._tokens.getMaxDeltaLine();t>=r+1||this._tokens.acceptInsertText(t,v.column-1,C,s,i,n)}}e.SparseMultilineTokens=D;class S{constructor(v){this._tokens=v,this._tokenCount=v.length/4}toString(v){const C=[];for(let s=0;sv)s=i-1;else{let t=i;for(;t>C&&this._getDeltaLine(t-1)===v;)t--;let r=i;for(;rv||o===v&&a>=C)&&(ov||a===v&&h>=C){if(an?g-=n-s:g=s;else if(c===C&&a===s)if(c===i&&g>n)g-=n-s;else{d=!0;continue}else if(cn)c=C,a=s,g=a+(g-n);else{d=!0;continue}else if(c>i){if(u===0&&!d){f=r;break}c-=u}else if(c===i&&a>=n)v&&c===0&&(a+=v,g+=v),c-=u,a-=n-s,g-=n-s;else throw new Error("Not possible!");const p=4*f;t[p]=c,t[p+1]=a,t[p+2]=g,t[p+3]=h,f++}this._tokenCount=f}acceptInsertText(v,C,s,i,n,t){const r=s===0&&i===1&&(t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122),u=this._tokens,f=this._tokenCount;for(let d=0;d0){const C=m[0].getRange(),s=m[m.length-1].getRange();if(!C||!s)return S;_=S.plusRange(C).plusRange(s)}let v=null;for(let C=0,s=this._pieces.length;C_.endLineNumber){v=v||{index:C};break}if(i.removeTokens(_),i.isEmpty()){this._pieces.splice(C,1),C--,s--;continue}if(i.endLineNumber<_.startLineNumber)continue;if(i.startLineNumber>_.endLineNumber){v=v||{index:C};continue}const[n,t]=i.split(_);if(n.isEmpty()){v=v||{index:C};continue}t.isEmpty()||(this._pieces.splice(C,1,n,t),C++,s++,v=v||{index:C})}return v=v||{index:this._pieces.length},m.length>0&&(this._pieces=L.arrayInsert(this._pieces,v.index,m)),_}isComplete(){return this._isComplete}addSparseTokens(S,m){if(m.getLineContent().length===0)return m;const _=this._pieces;if(_.length===0)return m;const v=y._findFirstPieceWithLine(_,S),C=_[v].getLineTokens(S);if(!C)return m;const s=m.getCount(),i=C.getCount();let n=0;const t=[];let r=0,u=0;const f=(d,l)=>{d!==u&&(u=d,t[r++]=d,t[r++]=l)};for(let d=0;d>>0,g=~a>>>0;for(;nm)v=C-1;else{for(;C>_&&S[C-1].startLineNumber<=m&&m<=S[C-1].endLineNumber;)C--;return C}}return _}acceptEdit(S,m,_,v,C){for(const s of this._pieces)s.acceptEdit(S,m,_,v,C)}}e.SparseTokensStore=y}),define(te[148],ie([1,0,2]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewEventHandler=void 0;class I extends L.Disposable{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(D){return!1}onCompositionEnd(D){return!1}onConfigurationChanged(D){return!1}onCursorStateChanged(D){return!1}onDecorationsChanged(D){return!1}onFlushed(D){return!1}onFocusChanged(D){return!1}onLanguageConfigurationChanged(D){return!1}onLineMappingChanged(D){return!1}onLinesChanged(D){return!1}onLinesDeleted(D){return!1}onLinesInserted(D){return!1}onRevealRangeRequest(D){return!1}onScrollChanged(D){return!1}onThemeChanged(D){return!1}onTokensChanged(D){return!1}onTokensColorsChanged(D){return!1}onZonesChanged(D){return!1}handleEvents(D){let S=!1;for(let m=0,_=D.length;m<_;m++){const v=D[m];switch(v.type){case 0:this.onCompositionStart(v)&&(S=!0);break;case 1:this.onCompositionEnd(v)&&(S=!0);break;case 2:this.onConfigurationChanged(v)&&(S=!0);break;case 3:this.onCursorStateChanged(v)&&(S=!0);break;case 4:this.onDecorationsChanged(v)&&(S=!0);break;case 5:this.onFlushed(v)&&(S=!0);break;case 6:this.onFocusChanged(v)&&(S=!0);break;case 7:this.onLanguageConfigurationChanged(v)&&(S=!0);break;case 8:this.onLineMappingChanged(v)&&(S=!0);break;case 9:this.onLinesChanged(v)&&(S=!0);break;case 10:this.onLinesDeleted(v)&&(S=!0);break;case 11:this.onLinesInserted(v)&&(S=!0);break;case 12:this.onRevealRangeRequest(v)&&(S=!0);break;case 13:this.onScrollChanged(v)&&(S=!0);break;case 15:this.onTokensChanged(v)&&(S=!0);break;case 14:this.onThemeChanged(v)&&(S=!0);break;case 16:this.onTokensColorsChanged(v)&&(S=!0);break;case 17:this.onZonesChanged(v)&&(S=!0);break;default:console.info("View received unknown event: "),console.info(v)}}S&&(this._shouldRender=!0)}}e.ViewEventHandler=I}),define(te[111],ie([1,0,148]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicViewOverlay=void 0;class I extends L.ViewEventHandler{}e.DynamicViewOverlay=I}),define(te[53],ie([1,0,148]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PartFingerprints=e.ViewPart=void 0;class I extends L.ViewEventHandler{constructor(S){super(),this._context=S,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}e.ViewPart=I;class y{static write(S,m){S.setAttribute("data-mprt",String(m))}static read(S){const m=S.getAttribute("data-mprt");return m===null?0:parseInt(m,10)}static collect(S,m){const _=[];let v=0;for(;S&&S!==S.ownerDocument.body&&S!==m;)S.nodeType===S.ELEMENT_NODE&&(_[v++]=this.read(S)),S=S.parentElement;const C=new Uint8Array(v);for(let s=0;s{if(t.options.zIndexr.options.zIndex)return 1;const u=t.options.className,f=r.options.className;return uf?1:y.Range.compareRangesUsingStarts(t.range,r.range)});const s=m.visibleRange.startLineNumber,i=m.visibleRange.endLineNumber,n=[];for(let t=s;t<=i;t++){const r=t-s;n[r]=""}this._renderWholeLineDecorations(m,v,n),this._renderNormalDecorations(m,v,n),this._renderResult=n}_renderWholeLineDecorations(m,_,v){const C=String(this._lineHeight),s=m.visibleRange.startLineNumber,i=m.visibleRange.endLineNumber;for(let n=0,t=_.length;n',f=Math.max(r.range.startLineNumber,s),d=Math.min(r.range.endLineNumber,i);for(let l=f;l<=d;l++){const o=l-s;v[o]+=u}}}_renderNormalDecorations(m,_,v){var C;const s=String(this._lineHeight),i=m.visibleRange.startLineNumber;let n=null,t=!1,r=null,u=!1;for(let f=0,d=_.length;f';t[l]+=h}}}render(m,_){if(!this._renderResult)return"";const v=_-m;return v<0||v>=this._renderResult.length?"":this._renderResult[v]}}e.DecorationsOverlay=D}),define(te[211],ie([1,0,38,13,111,53,5,423]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlyphMarginWidgets=e.DedupOverlay=e.VisibleLineDecorationsToRender=e.LineDecorationToRender=e.DecorationToRender=void 0;class m{constructor(u,f,d,l){this._decorationToRenderBrand=void 0,this.startLineNumber=+u,this.endLineNumber=+f,this.className=String(d),this.zIndex=l??0}}e.DecorationToRender=m;class _{constructor(u,f){this.className=u,this.zIndex=f}}e.LineDecorationToRender=_;class v{constructor(){this.decorations=[]}add(u){this.decorations.push(u)}getDecorations(){return this.decorations}}e.VisibleLineDecorationsToRender=v;class C extends y.DynamicViewOverlay{_render(u,f,d){const l=[];for(let a=u;a<=f;a++){const g=a-u;l[g]=new v}if(d.length===0)return l;d.sort((a,g)=>a.className===g.className?a.startLineNumber===g.startLineNumber?a.endLineNumber-g.endLineNumber:a.startLineNumber-g.startLineNumber:a.classNamel)continue;const a=Math.max(c.startLineNumber,d),g=Math.min(o.preference.lane,this._glyphMarginDecorationLaneCount);f.push(new n(a,g,o.preference.zIndex,o))}}_collectSortedGlyphRenderRequests(u){const f=[];return this._collectDecorationBasedGlyphRenderRequest(u,f),this._collectWidgetBasedGlyphRenderRequest(u,f),f.sort((d,l)=>d.lineNumber===l.lineNumber?d.lane===l.lane?d.zIndex===l.zIndex?l.type===d.type?d.type===0&&l.type===0?d.className0;){const l=f.peek();if(!l)break;const o=f.takeWhile(a=>a.lineNumber===l.lineNumber&&a.lane===l.lane);if(!o||o.length===0)break;const c=o[0];if(c.type===0){const a=[];for(const g of o){if(g.zIndex!==c.zIndex||g.type!==c.type)break;(a.length===0||a[a.length-1]!==g.className)&&a.push(g.className)}d.push(c.accept(a.join(" ")))}else c.widget.renderInfo={lineNumber:c.lineNumber,lane:c.lane}}this._decorationGlyphsToRender=d}render(u){if(!this._glyphMargin){for(const d of Object.values(this._widgets))d.domNode.setDisplay("none");for(;this._managedDomNodes.length>0;){const d=this._managedDomNodes.pop();d?.domNode.remove()}return}const f=Math.round(this._glyphMarginWidth/this._glyphMarginDecorationLaneCount);for(const d of Object.values(this._widgets))if(!d.renderInfo)d.domNode.setDisplay("none");else{const l=u.viewportData.relativeVerticalOffset[d.renderInfo.lineNumber-u.viewportData.startLineNumber],o=this._glyphMarginLeft+(d.renderInfo.lane-1)*this._lineHeight;d.domNode.setDisplay("block"),d.domNode.setTop(l),d.domNode.setLeft(o),d.domNode.setWidth(f),d.domNode.setHeight(this._lineHeight)}for(let d=0;dthis._decorationGlyphsToRender.length;){const d=this._managedDomNodes.pop();d?.domNode.remove()}}}e.GlyphMarginWidgets=s;class i{constructor(u,f,d,l){this.lineNumber=u,this.lane=f,this.zIndex=d,this.className=l,this.type=0}accept(u){return new t(this.lineNumber,this.lane,u)}}class n{constructor(u,f,d,l){this.lineNumber=u,this.lane=f,this.zIndex=d,this.widget=l,this.type=1}}class t{constructor(u,f,d){this.lineNumber=u,this.lane=f,this.combinedClassName=d}}}),define(te[526],ie([1,0,211,427]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesDecorationsOverlay=void 0;class I extends L.DedupOverlay{constructor(D){super(),this._context=D;const m=this._context.configuration.options.get(143);this._decorationsLeft=m.decorationsLeft,this._decorationsWidth=m.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(D){const m=this._context.configuration.options.get(143);return this._decorationsLeft=m.decorationsLeft,this._decorationsWidth=m.decorationsWidth,!0}onDecorationsChanged(D){return!0}onFlushed(D){return!0}onLinesChanged(D){return!0}onLinesDeleted(D){return!0}onLinesInserted(D){return!0}onScrollChanged(D){return D.scrollTopChanged}onZonesChanged(D){return!0}_getDecorations(D){const S=D.getDecorationsInViewport(),m=[];let _=0;for(let v=0,C=S.length;v',i=[];for(let n=S;n<=m;n++){const t=n-S,r=_[t].getDecorations();let u="";for(const f of r)u+='
    ';v[s]=n}this._renderResult=v}render(D,S){return this._renderResult?this._renderResult[S-D]:""}}e.MarginViewLineDecorationsOverlay=I}),define(te[528],ie([1,0,38,53,431]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewOverlayWidgets=void 0;class y extends I.ViewPart{constructor(S){super(S);const _=this._context.configuration.options.get(143);this._widgets={},this._verticalScrollbarWidth=_.verticalScrollbarWidth,this._minimapWidth=_.minimap.minimapWidth,this._horizontalScrollbarHeight=_.horizontalScrollbarHeight,this._editorHeight=_.height,this._editorWidth=_.width,this._domNode=(0,L.createFastDomNode)(document.createElement("div")),I.PartFingerprints.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(S){const _=this._context.configuration.options.get(143);return this._verticalScrollbarWidth=_.verticalScrollbarWidth,this._minimapWidth=_.minimap.minimapWidth,this._horizontalScrollbarHeight=_.horizontalScrollbarHeight,this._editorHeight=_.height,this._editorWidth=_.width,!0}addWidget(S){const m=(0,L.createFastDomNode)(S.getDomNode());this._widgets[S.getId()]={widget:S,preference:null,domNode:m},m.setPosition("absolute"),m.setAttribute("widgetId",S.getId()),this._domNode.appendChild(m),this.setShouldRender(),this._updateMaxMinWidth()}setWidgetPosition(S,m){const _=this._widgets[S.getId()];return _.preference===m?(this._updateMaxMinWidth(),!1):(_.preference=m,this.setShouldRender(),this._updateMaxMinWidth(),!0)}removeWidget(S){const m=S.getId();if(this._widgets.hasOwnProperty(m)){const v=this._widgets[m].domNode.domNode;delete this._widgets[m],v.parentNode.removeChild(v),this.setShouldRender(),this._updateMaxMinWidth()}}_updateMaxMinWidth(){var S,m;let _=0;const v=Object.keys(this._widgets);for(let C=0,s=v.length;C0;){const i=(0,L.createFastDomNode)(document.createElement("div"));i.setClassName("view-ruler"),i.setWidth(C),this.domNode.appendChild(i),this._renderedRulers.push(i),s--}return}let _=S-m;for(;_>0;){const v=this._renderedRulers.pop();this.domNode.removeChild(v),_--}}render(S){this._ensureRulersCount();for(let m=0,_=this._rulers.length;m<_;m++){const v=this._renderedRulers[m],C=this._rulers[m];v.setBoxShadow(C.color?`1px 0 0 0 ${C.color} inset`:""),v.setHeight(Math.min(S.scrollHeight,1e6)),v.setLeft(C.column*this._typicalHalfwidthCharacterWidth)}}}e.Rulers=y}),define(te[530],ie([1,0,38,53,433]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDecorationViewPart=void 0;class y extends I.ViewPart{constructor(S){super(S),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const _=this._context.configuration.options.get(102);this._useShadows=_.useShadows,this._domNode=(0,L.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const S=this._useShadows&&this._scrollTop>0;return this._shouldShow!==S?(this._shouldShow=S,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const m=this._context.configuration.options.get(143);m.minimap.renderMinimap===0||m.minimap.minimapWidth>0&&m.minimap.minimapLeft===0?this._width=m.width:this._width=m.width-m.verticalScrollbarWidth}onConfigurationChanged(S){const _=this._context.configuration.options.get(102);return this._useShadows=_.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(S){return this._scrollTop=S.scrollTop,this._updateShouldShow()}prepareRender(S){}render(S){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}e.ScrollDecorationViewPart=y}),define(te[531],ie([1,0,38,9,53,12]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZones=void 0;const S=()=>{throw new Error("Invalid change accessor")};class m extends y.ViewPart{constructor(C){super(C);const s=this._context.configuration.options,i=s.get(143);this._lineHeight=s.get(66),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,L.createFastDomNode)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,L.createFastDomNode)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const C=this._context.viewLayout.getWhitespaces(),s=new Map;for(const n of C)s.set(n.id,n);let i=!1;return this._context.viewModel.changeWhitespace(n=>{const t=Object.keys(this._zones);for(let r=0,u=t.length;r{const n={addZone:t=>(s=!0,this._addZone(i,t)),removeZone:t=>{t&&(s=this._removeZone(i,t)||s)},layoutZone:t=>{t&&(s=this._layoutZone(i,t)||s)}};_(C,n),n.addZone=S,n.removeZone=S,n.layoutZone=S}),s}_addZone(C,s){const i=this._computeWhitespaceProps(s),t={whitespaceId:C.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(s),i.heightInPx,i.minWidthInPx),delegate:s,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,L.createFastDomNode)(s.domNode),marginDomNode:s.marginDomNode?(0,L.createFastDomNode)(s.marginDomNode):null};return this._safeCallOnComputedHeight(t.delegate,i.heightInPx),t.domNode.setPosition("absolute"),t.domNode.domNode.style.width="100%",t.domNode.setDisplay("none"),t.domNode.setAttribute("monaco-view-zone",t.whitespaceId),this.domNode.appendChild(t.domNode),t.marginDomNode&&(t.marginDomNode.setPosition("absolute"),t.marginDomNode.domNode.style.width="100%",t.marginDomNode.setDisplay("none"),t.marginDomNode.setAttribute("monaco-view-zone",t.whitespaceId),this.marginDomNode.appendChild(t.marginDomNode)),this._zones[t.whitespaceId]=t,this.setShouldRender(),t.whitespaceId}_removeZone(C,s){if(this._zones.hasOwnProperty(s)){const i=this._zones[s];return delete this._zones[s],C.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(C,s){if(this._zones.hasOwnProperty(s)){const i=this._zones[s],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,C.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(C){return this._zones.hasOwnProperty(C)?!!this._zones[C].delegate.suppressMouseDown:!1}_heightInPixels(C){return typeof C.heightInPx=="number"?C.heightInPx:typeof C.heightInLines=="number"?this._lineHeight*C.heightInLines:this._lineHeight}_minWidthInPixels(C){return typeof C.minWidthInPx=="number"?C.minWidthInPx:0}_safeCallOnComputedHeight(C,s){if(typeof C.onComputedHeight=="function")try{C.onComputedHeight(s)}catch(i){(0,I.onUnexpectedError)(i)}}_safeCallOnDomNodeTop(C,s){if(typeof C.onDomNodeTop=="function")try{C.onDomNodeTop(s)}catch(i){(0,I.onUnexpectedError)(i)}}prepareRender(C){}render(C){const s=C.viewportData.whitespaceViewportData,i={};let n=!1;for(const r of s)this._zones[r.id].isInHiddenArea||(i[r.id]=r,n=!0);const t=Object.keys(this._zones);for(let r=0,u=t.length;r=i||(t[r++]=new I(Math.max(1,u.startColumn-s+1),Math.min(n+1,u.endColumn-s+1),u.className,u.type));return t}static filter(_,v,C,s){if(_.length===0)return[];const i=[];let n=0;for(let t=0,r=_.length;tv||f.isEmpty()&&(u.type===0||u.type===3))continue;const d=f.startLineNumber===v?f.startColumn:C,l=f.endLineNumber===v?f.endColumn:s;i[n++]=new I(d,l,u.inlineClassName,u.type)}return i}static _typeCompare(_,v){const C=[2,0,1,3];return C[_]-C[v]}static compare(_,v){if(_.startColumn!==v.startColumn)return _.startColumn-v.startColumn;if(_.endColumn!==v.endColumn)return _.endColumn-v.endColumn;const C=I._typeCompare(_.type,v.type);return C!==0?C:_.className!==v.className?_.className0&&this.stopOffsets[0]<_;){let s=0;for(;s+10&&v<_&&(C.push(new y(v,_-1,this.classNames.join(" "),D._metadata(this.metadata))),v=_),v}insert(_,v,C){if(this.count===0||this.stopOffsets[this.count-1]<=_)this.stopOffsets.push(_),this.classNames.push(v),this.metadata.push(C);else for(let s=0;s=_){this.stopOffsets.splice(s,0,_),this.classNames.splice(s,0,v),this.metadata.splice(s,0,C);break}this.count++}}class S{static normalize(_,v){if(v.length===0)return[];const C=[],s=new D;let i=0;for(let n=0,t=v.length;n1){const a=_.charCodeAt(u-2);L.isHighSurrogate(a)&&u--}if(f>1){const a=_.charCodeAt(f-2);L.isHighSurrogate(a)&&f--}const o=u-1,c=f-2;i=s.consumeLowerThan(o,i,C),s.count===0&&(i=o),s.insert(c,d,l)}return s.consumeLowerThan(1073741824,i,C),C}}e.LineDecorationsNormalizer=S}),define(te[532],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinePart=void 0;class L{constructor(y,D,S,m){this.endIndex=y,this.type=D,this.metadata=S,this.containsRTL=m,this._linePartBrand=void 0}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}e.LinePart=L}),define(te[533],ie([1,0,10]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinesLayout=e.EditorWhitespace=void 0;class I{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(m){this._hasPending=!0,this._inserts.push(m)}change(m){this._hasPending=!0,this._changes.push(m)}remove(m){this._hasPending=!0,this._removes.push(m)}mustCommit(){return this._hasPending}commit(m){if(!this._hasPending)return;const _=this._inserts,v=this._changes,C=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],m._commitPendingChanges(_,v,C)}}class y{constructor(m,_,v,C,s){this.id=m,this.afterLineNumber=_,this.ordinal=v,this.height=C,this.minWidth=s,this.prefixSum=0}}e.EditorWhitespace=y;class D{constructor(m,_,v,C){this._instanceId=L.singleLetterHash(++D.INSTANCE_COUNT),this._pendingChanges=new I,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=m,this._lineHeight=_,this._paddingTop=v,this._paddingBottom=C}static findInsertionIndex(m,_,v){let C=0,s=m.length;for(;C>>1;_===m[i].afterLineNumber?v{_=!0,C=C|0,s=s|0,i=i|0,n=n|0;const t=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new y(t,C,s,i,n)),t},changeOneWhitespace:(C,s,i)=>{_=!0,s=s|0,i=i|0,this._pendingChanges.change({id:C,newAfterLineNumber:s,newHeight:i})},removeWhitespace:C=>{_=!0,this._pendingChanges.remove({id:C})}})}finally{this._pendingChanges.commit(this)}return _}_commitPendingChanges(m,_,v){if((m.length>0||v.length>0)&&(this._minWidth=-1),m.length+_.length+v.length<=1){for(const t of m)this._insertWhitespace(t);for(const t of _)this._changeOneWhitespace(t.id,t.newAfterLineNumber,t.newHeight);for(const t of v){const r=this._findWhitespaceIndex(t.id);r!==-1&&this._removeWhitespace(r)}return}const C=new Set;for(const t of v)C.add(t.id);const s=new Map;for(const t of _)s.set(t.id,t);const i=t=>{const r=[];for(const u of t)if(!C.has(u.id)){if(s.has(u.id)){const f=s.get(u.id);u.afterLineNumber=f.newAfterLineNumber,u.height=f.newHeight}r.push(u)}return r},n=i(this._arr).concat(i(m));n.sort((t,r)=>t.afterLineNumber===r.afterLineNumber?t.ordinal-r.ordinal:t.afterLineNumber-r.afterLineNumber),this._arr=n,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(m){const _=D.findInsertionIndex(this._arr,m.afterLineNumber,m.ordinal);this._arr.splice(_,0,m),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,_-1)}_findWhitespaceIndex(m){const _=this._arr;for(let v=0,C=_.length;v_&&(this._arr[v].afterLineNumber-=_-m+1)}}onLinesInserted(m,_){this._checkPendingChanges(),m=m|0,_=_|0,this._lineCount+=_-m+1;for(let v=0,C=this._arr.length;v=_.length||_[n+1].afterLineNumber>=m)return n;v=n+1|0}else C=n-1|0}return-1}_findFirstWhitespaceAfterLineNumber(m){m=m|0;const v=this._findLastWhitespaceBeforeLineNumber(m)+1;return v1?v=this._lineHeight*(m-1):v=0;const C=this.getWhitespaceAccumulatedHeightBeforeLineNumber(m-(_?1:0));return v+C+this._paddingTop}getVerticalOffsetAfterLineNumber(m,_=!1){this._checkPendingChanges(),m=m|0;const v=this._lineHeight*m,C=this.getWhitespaceAccumulatedHeightBeforeLineNumber(m+(_?1:0));return v+C+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let m=0;for(let _=0,v=this._arr.length;__}isInTopPadding(m){return this._paddingTop===0?!1:(this._checkPendingChanges(),m=_-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(m){if(this._checkPendingChanges(),m=m|0,m<0)return 1;const _=this._lineCount|0,v=this._lineHeight;let C=1,s=_;for(;C=n+v)C=i+1;else{if(m>=n)return i;s=i}}return C>_?_:C}getLinesViewportData(m,_){this._checkPendingChanges(),m=m|0,_=_|0;const v=this._lineHeight,C=this.getLineNumberAtOrAfterVerticalOffset(m)|0,s=this.getVerticalOffsetForLineNumber(C)|0;let i=this._lineCount|0,n=this.getFirstWhitespaceIndexAfterLineNumber(C)|0;const t=this.getWhitespacesCount()|0;let r,u;n===-1?(n=t,u=i+1,r=0):(u=this.getAfterLineNumberForWhitespaceIndex(n)|0,r=this.getHeightForWhitespaceIndex(n)|0);let f=s,d=f;const l=5e5;let o=0;s>=l&&(o=Math.floor(s/l)*l,o=Math.floor(o/v)*v,d-=o);const c=[],a=m+(_-m)/2;let g=-1;for(let w=C;w<=i;w++){if(g===-1){const E=f,k=f+v;(E<=a&&aa)&&(g=w)}for(f+=v,c[w-C]=d,d+=v;u===w;)d+=r,f+=r,n++,n>=t?u=i+1:(u=this.getAfterLineNumberForWhitespaceIndex(n)|0,r=this.getHeightForWhitespaceIndex(n)|0);if(f>=_){i=w;break}}g===-1&&(g=i);const h=this.getVerticalOffsetForLineNumber(i)|0;let p=C,b=i;return p_&&b--,{bigNumbersDelta:o,startLineNumber:C,endLineNumber:i,relativeVerticalOffset:c,centeredLineNumber:g,completelyVisibleStartLineNumber:p,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(m){this._checkPendingChanges(),m=m|0;const _=this.getAfterLineNumberForWhitespaceIndex(m);let v;_>=1?v=this._lineHeight*_:v=0;let C;return m>0?C=this.getWhitespacesAccumulatedHeight(m-1):C=0,v+C+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(m){this._checkPendingChanges(),m=m|0;let _=0,v=this.getWhitespacesCount()-1;if(v<0)return-1;const C=this.getVerticalOffsetForWhitespaceIndex(v),s=this.getHeightForWhitespaceIndex(v);if(m>=C+s)return-1;for(;_=n+t)_=i+1;else{if(m>=n)return i;v=i}}return _}getWhitespaceAtVerticalOffset(m){this._checkPendingChanges(),m=m|0;const _=this.getWhitespaceIndexAtOrAfterVerticallOffset(m);if(_<0||_>=this.getWhitespacesCount())return null;const v=this.getVerticalOffsetForWhitespaceIndex(_);if(v>m)return null;const C=this.getHeightForWhitespaceIndex(_),s=this.getIdForWhitespaceIndex(_),i=this.getAfterLineNumberForWhitespaceIndex(_);return{id:s,afterLineNumber:i,verticalOffset:v,height:C}}getWhitespaceViewportData(m,_){this._checkPendingChanges(),m=m|0,_=_|0;const v=this.getWhitespaceIndexAtOrAfterVerticallOffset(m),C=this.getWhitespacesCount()-1;if(v<0)return[];const s=[];for(let i=v;i<=C;i++){const n=this.getVerticalOffsetForWhitespaceIndex(i),t=this.getHeightForWhitespaceIndex(i);if(n>=_)break;s.push({id:this.getIdForWhitespaceIndex(i),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(i),verticalOffset:n,height:t})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(m){return this._checkPendingChanges(),m=m|0,this._arr[m].id}getAfterLineNumberForWhitespaceIndex(m){return this._checkPendingChanges(),m=m|0,this._arr[m].afterLineNumber}getHeightForWhitespaceIndex(m){return this._checkPendingChanges(),m=m|0,this._arr[m].height}}e.LinesLayout=D,D.INSTANCE_COUNT=0}),define(te[534],ie([1,0,5]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportData=void 0;class I{constructor(D,S,m,_){this.selections=D,this.startLineNumber=S.startLineNumber|0,this.endLineNumber=S.endLineNumber|0,this.relativeVerticalOffset=S.relativeVerticalOffset,this.bigNumbersDelta=S.bigNumbersDelta|0,this.whitespaceViewportData=m,this._model=_,this.visibleRange=new L.Range(S.startLineNumber,this._model.getLineMinColumn(S.startLineNumber),S.endLineNumber,this._model.getLineMaxColumn(S.endLineNumber))}getViewLineRenderingData(D){return this._model.getViewportViewLineRenderingData(this.visibleRange,D)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}e.ViewportData=I}),define(te[82],ie([1,0,13,10,5]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerDecorationsGroup=e.ViewModelDecoration=e.SingleLineInlineDecoration=e.InlineDecoration=e.ViewLineRenderingData=e.ViewLineData=e.MinimapLinesRenderingData=e.Viewport=void 0;class D{constructor(t,r,u,f){this._viewportBrand=void 0,this.top=t|0,this.left=r|0,this.width=u|0,this.height=f|0}}e.Viewport=D;class S{constructor(t,r){this.tabSize=t,this.data=r}}e.MinimapLinesRenderingData=S;class m{constructor(t,r,u,f,d,l,o){this._viewLineDataBrand=void 0,this.content=t,this.continuesWithWrappedLine=r,this.minColumn=u,this.maxColumn=f,this.startVisibleColumn=d,this.tokens=l,this.inlineDecorations=o}}e.ViewLineData=m;class _{constructor(t,r,u,f,d,l,o,c,a,g){this.minColumn=t,this.maxColumn=r,this.content=u,this.continuesWithWrappedLine=f,this.isBasicASCII=_.isBasicASCII(u,l),this.containsRTL=_.containsRTL(u,this.isBasicASCII,d),this.tokens=o,this.inlineDecorations=c,this.tabSize=a,this.startVisibleColumn=g}static isBasicASCII(t,r){return r?I.isBasicASCII(t):!0}static containsRTL(t,r,u){return!r&&u?I.containsRTL(t):!1}}e.ViewLineRenderingData=_;class v{constructor(t,r,u){this.range=t,this.inlineClassName=r,this.type=u}}e.InlineDecoration=v;class C{constructor(t,r,u,f){this.startOffset=t,this.endOffset=r,this.inlineClassName=u,this.inlineClassNameAffectsLetterSpacing=f}toInlineDecoration(t){return new v(new y.Range(t,this.startOffset+1,t,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}e.SingleLineInlineDecoration=C;class s{constructor(t,r){this._viewModelDecorationBrand=void 0,this.range=t,this.options=r}}e.ViewModelDecoration=s;class i{constructor(t,r,u){this.color=t,this.zIndex=r,this.data=u}static compareByRenderingProps(t,r){return t.zIndex===r.zIndex?t.colorr.color?1:0:t.zIndex-r.zIndex}static equals(t,r){return t.color===r.color&&t.zIndex===r.zIndex&&L.equals(t.data,r.data)}static equalsArr(t,r){return L.equals(t,r,i.equals)}}e.OverviewRulerDecorationsGroup=i}),define(te[535],ie([1,0,91,12,110,82]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createModelLineProjection=void 0;function S(n,t){return n===null?t?_.INSTANCE:v.INSTANCE:new m(n,t)}e.createModelLineProjection=S;class m{constructor(t,r){this._projectionData=t,this._isVisible=r}isVisible(){return this._isVisible}setVisible(t){return this._isVisible=t,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(t,r,u){this._assertVisible();const f=u>0?this._projectionData.breakOffsets[u-1]:0,d=this._projectionData.breakOffsets[u];let l;if(this._projectionData.injectionOffsets!==null){const o=this._projectionData.injectionOffsets.map((a,g)=>new y.LineInjectedText(0,0,a+1,this._projectionData.injectionOptions[g],0));l=y.LineInjectedText.applyInjectedText(t.getLineContent(r),o).substring(f,d)}else l=t.getValueInRange({startLineNumber:r,startColumn:f+1,endLineNumber:r,endColumn:d+1});return u>0&&(l=s(this._projectionData.wrappedTextIndentLength)+l),l}getViewLineLength(t,r,u){return this._assertVisible(),this._projectionData.getLineLength(u)}getViewLineMinColumn(t,r,u){return this._assertVisible(),this._projectionData.getMinOutputOffset(u)+1}getViewLineMaxColumn(t,r,u){return this._assertVisible(),this._projectionData.getMaxOutputOffset(u)+1}getViewLineData(t,r,u){const f=new Array;return this.getViewLinesData(t,r,u,1,0,[!0],f),f[0]}getViewLinesData(t,r,u,f,d,l,o){this._assertVisible();const c=this._projectionData,a=c.injectionOffsets,g=c.injectionOptions;let h=null;if(a){h=[];let b=0,w=0;for(let E=0;E0?c.breakOffsets[E-1]:0,R=c.breakOffsets[E];for(;wR)break;if(M0?c.wrappedTextIndentLength:0,O=P+Math.max(T-M,0),x=P+Math.min(N-M,R-M);O!==x&&k.push(new D.SingleLineInlineDecoration(O,x,A.inlineClassName,A.inlineClassNameAffectsLetterSpacing))}}if(N<=R)b+=B,w++;else break}}}let p;a?p=t.tokenization.getLineTokens(r).withInserted(a.map((b,w)=>({offset:b,text:g[w].content,tokenMetadata:L.LineTokens.defaultTokenMetadata}))):p=t.tokenization.getLineTokens(r);for(let b=u;b0?f.wrappedTextIndentLength:0,l=u>0?f.breakOffsets[u-1]:0,o=f.breakOffsets[u],c=t.sliceAndInflate(l,o,d);let a=c.getLineContent();u>0&&(a=s(f.wrappedTextIndentLength)+a);const g=this._projectionData.getMinOutputOffset(u)+1,h=a.length+1,p=u+1=C.length)for(let t=1;t<=n;t++)C[t]=i(t);return C[n]}function i(n){return new Array(n+1).join(" ")}}),define(te[536],ie([1,0,10,121,110,287]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonospaceLineBreaksComputerFactory=void 0;class S{static create(f){return new S(f.get(132),f.get(131))}constructor(f,d){this.classifier=new m(f,d)}createLineBreaksComputer(f,d,l,o,c){const a=[],g=[],h=[];return{addRequest:(p,b,w)=>{a.push(p),g.push(b),h.push(w)},finalize:()=>{const p=f.typicalFullwidthCharacterWidth/f.typicalHalfwidthCharacterWidth,b=[];for(let w=0,E=a.length;w=0&&f<256?this._asciiMap[f]:f>=12352&&f<=12543||f>=13312&&f<=19903||f>=19968&&f<=40959?3:this._map.get(f)||this._defaultValue}}let _=[],v=[];function C(u,f,d,l,o,c,a,g){if(o===-1)return null;const h=d.length;if(h<=1)return null;const p=g==="keepAll",b=f.breakOffsets,w=f.breakOffsetsVisibleColumn,E=r(d,l,o,c,a),k=o-E,M=_,R=v;let B=0,T=0,N=0,A=o;const P=b.length;let O=0;if(O>=0){let x=Math.abs(w[O]-A);for(;O+1=x)break;x=W,O++}}for(;Ox&&(x=T,W=N);let U=0,F=0,G=0,Y=0;if(W<=A){let se=W,J=x===0?0:d.charCodeAt(x-1),q=x===0?0:u.get(J),H=!0;for(let V=x;VT&&t(J,q,ee,le,p)&&(U=Z,F=se),se+=ue,se>A){Z>T?(G=Z,Y=se-ue):(G=V+1,Y=se),se-F>k&&(U=0),H=!1;break}J=ee,q=le}if(H){B>0&&(M[B]=b[b.length-1],R[B]=w[b.length-1],B++);break}}if(U===0){let se=W,J=d.charCodeAt(x),q=u.get(J),H=!1;for(let V=x-1;V>=T;V--){const Z=V+1,ee=d.charCodeAt(V);if(ee===9){H=!0;break}let le,ue;if(L.isLowSurrogate(ee)?(V--,le=0,ue=2):(le=u.get(ee),ue=L.isFullWidthCharacter(ee)?c:1),se<=A){if(G===0&&(G=Z,Y=se),se<=A-k)break;if(t(ee,le,J,q,p)){U=Z,F=se;break}}se-=ue,J=ee,q=le}if(U!==0){const V=k-(Y-F);if(V<=l){const Z=d.charCodeAt(G);let ee;L.isHighSurrogate(Z)?ee=2:ee=i(Z,Y,l,c),V-ee<0&&(U=0)}}if(H){O--;continue}}if(U===0&&(U=G,F=Y),U<=T){const se=d.charCodeAt(T);L.isHighSurrogate(se)?(U=T+2,F=N+2):(U=T+1,F=N+i(se,N,l,c))}for(T=U,M[B]=U,N=F,R[B]=F,B++,A=F+k;O<0||O=ne)break;ne=se,O++}}return B===0?null:(M.length=B,R.length=B,_=f.breakOffsets,v=f.breakOffsetsVisibleColumn,f.breakOffsets=M,f.breakOffsetsVisibleColumn=R,f.wrappedTextIndentLength=E,f)}function s(u,f,d,l,o,c,a,g){const h=y.LineInjectedText.applyInjectedText(f,d);let p,b;if(d&&d.length>0?(p=d.map(F=>F.options),b=d.map(F=>F.column-1)):(p=null,b=null),o===-1)return p?new D.ModelLineProjectionData(b,p,[h.length],[],0):null;const w=h.length;if(w<=1)return p?new D.ModelLineProjectionData(b,p,[h.length],[],0):null;const E=g==="keepAll",k=r(h,l,o,c,a),M=o-k,R=[],B=[];let T=0,N=0,A=0,P=o,O=h.charCodeAt(0),x=u.get(O),W=i(O,0,l,c),U=1;L.isHighSurrogate(O)&&(W+=1,O=h.charCodeAt(1),x=u.get(O),U++);for(let F=U;FP&&((N===0||W-A>M)&&(N=G,A=W-se),R[T]=N,B[T]=A,T++,P=A+M,N=0),O=Y,x=ne}return T===0&&(!d||d.length===0)?null:(R[T]=w,B[T]=W,new D.ModelLineProjectionData(b,p,R,B,k))}function i(u,f,d,l){return u===9?d-f%d:L.isFullWidthCharacter(u)||u<32?l:1}function n(u,f){return f-u%f}function t(u,f,d,l,o){return d!==32&&(f===2&&l!==2||f!==1&&l===1||!o&&f===3&&l!==2||!o&&l===3&&f!==1)}function r(u,f,d,l,o){let c=0;if(o!==0){const a=L.firstNonWhitespaceIndex(u);if(a!==-1){for(let h=0;hd&&(c=0)}}return c}}),define(te[293],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewZoneManager=e.OverviewRulerZone=e.ColorZone=void 0;class L{constructor(S,m,_){this._colorZoneBrand=void 0,this.from=S|0,this.to=m|0,this.colorId=_|0}static compare(S,m){return S.colorId===m.colorId?S.from===m.from?S.to-m.to:S.from-m.from:S.colorId-m.colorId}}e.ColorZone=L;class I{constructor(S,m,_,v){this._overviewRulerZoneBrand=void 0,this.startLineNumber=S,this.endLineNumber=m,this.heightInLines=_,this.color=v,this._colorZone=null}static compare(S,m){return S.color===m.color?S.startLineNumber===m.startLineNumber?S.heightInLines===m.heightInLines?S.endLineNumber-m.endLineNumber:S.heightInLines-m.heightInLines:S.startLineNumber-m.startLineNumber:S.color_&&(o=_-c);const a=r.color;let g=this._color2Id[a];g||(g=++this._lastAssignedId,this._color2Id[a]=g,this._id2Color[g]=a);const h=new L(o-c,o+c,g);r.setColorZone(h),i.push(h)}return this._colorZonesInvalid=!1,i.sort(L.compare),i}}e.OverviewZoneManager=y}),define(te[537],ie([1,0,38,293,148]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRuler=void 0;class D extends y.ViewEventHandler{constructor(m,_){super(),this._context=m;const v=this._context.configuration.options;this._domNode=(0,L.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName(_),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new I.OverviewZoneManager(C=>this._context.viewLayout.getVerticalOffsetForLineNumber(C)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(v.get(66)),this._zoneManager.setPixelRatio(v.get(141)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(m){const _=this._context.configuration.options;return m.hasChanged(66)&&(this._zoneManager.setLineHeight(_.get(66)),this._render()),m.hasChanged(141)&&(this._zoneManager.setPixelRatio(_.get(141)),this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render()),!0}onFlushed(m){return this._render(),!0}onScrollChanged(m){return m.scrollHeightChanged&&(this._zoneManager.setOuterHeight(m.scrollHeight),this._render()),!0}onZonesChanged(m){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(m){this._domNode.setTop(m.top),this._domNode.setRight(m.right);let _=!1;_=this._zoneManager.setDOMWidth(m.width)||_,_=this._zoneManager.setDOMHeight(m.height)||_,_&&(this._domNode.setWidth(this._zoneManager.getDOMWidth()),this._domNode.setHeight(this._zoneManager.getDOMHeight()),this._domNode.domNode.width=this._zoneManager.getCanvasWidth(),this._domNode.domNode.height=this._zoneManager.getCanvasHeight(),this._render())}setZones(m){this._zoneManager.setZones(m),this._render()}_render(){if(this._zoneManager.getOuterHeight()===0)return!1;const m=this._zoneManager.getCanvasWidth(),_=this._zoneManager.getCanvasHeight(),v=this._zoneManager.resolveColorZones(),C=this._zoneManager.getId2Color(),s=this._domNode.domNode.getContext("2d");return s.clearRect(0,0,m,_),v.length>0&&this._renderOneLane(s,v,C,m),!0}_renderOneLane(m,_,v,C){let s=0,i=0,n=0;for(const t of _){const r=t.colorId,u=t.from,f=t.to;r!==s?(m.fillRect(0,i,C,n-i),s=r,m.fillStyle=v[s],i=u,n=f):n>=u?n=Math.max(n,f):(m.fillRect(0,i,C,n-i),i=u,n=f)}m.fillRect(0,i,C,n-i)}}e.OverviewRuler=D}),define(te[538],ie([1,0,496]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContext=void 0;class I{constructor(D,S,m){this.configuration=D,this.theme=new L.EditorTheme(S),this.viewModel=m,this.viewLayout=m.viewLayout}addEventHandler(D){this.viewModel.addViewEventHandler(D)}removeEventHandler(D){this.viewModel.removeViewEventHandler(D)}}e.ViewContext=I}),define(te[213],ie([1,0,6,2]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ModelTokensChangedEvent=e.ModelOptionsChangedEvent=e.ModelContentChangedEvent=e.ModelLanguageConfigurationChangedEvent=e.ModelLanguageChangedEvent=e.ModelDecorationsChangedEvent=e.ReadOnlyEditAttemptEvent=e.CursorStateChangedEvent=e.HiddenAreasChangedEvent=e.ViewZonesChangedEvent=e.ScrollChangedEvent=e.FocusChangedEvent=e.ContentSizeChangedEvent=e.ViewModelEventsCollector=e.ViewModelEventDispatcher=void 0;class y extends I.Disposable{constructor(){super(),this._onEvent=this._register(new L.Emitter),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(o){this._addOutgoingEvent(o),this._emitOutgoingEvents()}_addOutgoingEvent(o){for(let c=0,a=this._outgoingEvents.length;c0;){if(this._collector||this._isConsumingViewEventQueue)return;const o=this._outgoingEvents.shift();o.isNoOp()||this._onEvent.fire(o)}}addViewEventHandler(o){for(let c=0,a=this._eventHandlers.length;c0&&this._emitMany(c)}this._emitOutgoingEvents()}emitSingleViewEvent(o){try{this.beginEmitViewEvents().emitViewEvent(o)}finally{this.endEmitViewEvents()}}_emitMany(o){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(o):this._viewEventQueue=o,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const o=this._viewEventQueue;this._viewEventQueue=null;const c=this._eventHandlers.slice(0);for(const a of c)a.handleEvents(o)}}}e.ViewModelEventDispatcher=y;class D{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(o){this.viewEvents.push(o)}emitOutgoingEvent(o){this.outgoingEvents.push(o)}}e.ViewModelEventsCollector=D;class S{constructor(o,c,a,g){this.kind=0,this._oldContentWidth=o,this._oldContentHeight=c,this.contentWidth=a,this.contentHeight=g,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}attemptToMerge(o){return o.kind!==this.kind?null:new S(this._oldContentWidth,this._oldContentHeight,o.contentWidth,o.contentHeight)}}e.ContentSizeChangedEvent=S;class m{constructor(o,c){this.kind=1,this.oldHasFocus=o,this.hasFocus=c}isNoOp(){return this.oldHasFocus===this.hasFocus}attemptToMerge(o){return o.kind!==this.kind?null:new m(this.oldHasFocus,o.hasFocus)}}e.FocusChangedEvent=m;class _{constructor(o,c,a,g,h,p,b,w){this.kind=2,this._oldScrollWidth=o,this._oldScrollLeft=c,this._oldScrollHeight=a,this._oldScrollTop=g,this.scrollWidth=h,this.scrollLeft=p,this.scrollHeight=b,this.scrollTop=w,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!this.scrollWidthChanged&&!this.scrollLeftChanged&&!this.scrollHeightChanged&&!this.scrollTopChanged}attemptToMerge(o){return o.kind!==this.kind?null:new _(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,o.scrollWidth,o.scrollLeft,o.scrollHeight,o.scrollTop)}}e.ScrollChangedEvent=_;class v{constructor(){this.kind=3}isNoOp(){return!1}attemptToMerge(o){return o.kind!==this.kind?null:this}}e.ViewZonesChangedEvent=v;class C{constructor(){this.kind=4}isNoOp(){return!1}attemptToMerge(o){return o.kind!==this.kind?null:this}}e.HiddenAreasChangedEvent=C;class s{constructor(o,c,a,g,h,p,b){this.kind=6,this.oldSelections=o,this.selections=c,this.oldModelVersionId=a,this.modelVersionId=g,this.source=h,this.reason=p,this.reachedMaxCursorCount=b}static _selectionsAreEqual(o,c){if(!o&&!c)return!0;if(!o||!c)return!1;const a=o.length,g=c.length;if(a!==g)return!1;for(let h=0;h=t?0:u.horizontalScrollbarSize}_getContentHeight(n,t,r){const u=this._configuration.options;let f=this._linesLayout.getLinesTotalHeight();return u.get(104)?f+=Math.max(0,t-u.get(66)-u.get(83).bottom):f+=this._getHorizontalScrollbarHeight(n,r),f}_updateHeight(){const n=this._scrollable.getScrollDimensions(),t=n.width,r=n.height,u=n.contentWidth;this._scrollable.setScrollDimensions(new v(t,n.contentWidth,r,this._getContentHeight(t,r,u)))}getCurrentViewport(){const n=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new S.Viewport(t.scrollTop,t.scrollLeft,n.width,n.height)}getFutureViewport(){const n=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new S.Viewport(t.scrollTop,t.scrollLeft,n.width,n.height)}_computeContentWidth(){const n=this._configuration.options,t=this._maxLineWidth,r=n.get(144),u=n.get(50),f=n.get(143);if(r.isViewportWrapping){const d=n.get(72);return t>f.contentWidth+u.typicalHalfwidthCharacterWidth&&d.enabled&&d.side==="right"?t+f.verticalScrollbarWidth:t}else{const d=n.get(103)*u.typicalHalfwidthCharacterWidth,l=this._linesLayout.getWhitespaceMinWidth();return Math.max(t+d+f.verticalScrollbarWidth,l,this._overlayWidgetsMinWidth)}}setMaxLineWidth(n){this._maxLineWidth=n,this._updateContentWidth()}setOverlayWidgetsMinWidth(n){this._overlayWidgetsMinWidth=n,this._updateContentWidth()}_updateContentWidth(){const n=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new v(n.width,this._computeContentWidth(),n.height,n.contentHeight)),this._updateHeight()}saveState(){const n=this._scrollable.getFutureScrollPosition(),t=n.scrollTop,r=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),u=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(r);return{scrollTop:t,scrollTopWithoutViewZones:t-u,scrollLeft:n.scrollLeft}}changeWhitespace(n){const t=this._linesLayout.changeWhitespace(n);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(n,t=!1){return this._linesLayout.getVerticalOffsetForLineNumber(n,t)}getVerticalOffsetAfterLineNumber(n,t=!1){return this._linesLayout.getVerticalOffsetAfterLineNumber(n,t)}isAfterLines(n){return this._linesLayout.isAfterLines(n)}isInTopPadding(n){return this._linesLayout.isInTopPadding(n)}isInBottomPadding(n){return this._linesLayout.isInBottomPadding(n)}getLineNumberAtVerticalOffset(n){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(n)}getWhitespaceAtVerticalOffset(n){return this._linesLayout.getWhitespaceAtVerticalOffset(n)}getLinesViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(n.top,n.top+n.height)}getLinesViewportDataAtScrollTop(n){const t=this._scrollable.getScrollDimensions();return n+t.height>t.scrollHeight&&(n=t.scrollHeight-t.height),n<0&&(n=0),this._linesLayout.getLinesViewportData(n,n+t.height)}getWhitespaceViewportData(){const n=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(n.top,n.top+n.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(n){return this._scrollable.validateScrollPosition(n)}setScrollPosition(n,t){t===1?this._scrollable.setScrollPositionNow(n):this._scrollable.setScrollPositionSmooth(n)}hasPendingScrollAnimation(){return this._scrollable.hasPendingScrollAnimation()}deltaScrollNow(n,t){const r=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:r.scrollLeft+n,scrollTop:r.scrollTop+t})}}e.ViewLayout=s}),define(te[540],ie([1,0,5,24]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveCaretCommand=void 0;class y{constructor(S,m){this._selection=S,this._isMovingLeft=m}getEditOperations(S,m){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const _=this._selection.startLineNumber,v=this._selection.startColumn,C=this._selection.endColumn;if(!(this._isMovingLeft&&v===1)&&!(!this._isMovingLeft&&C===S.getLineMaxColumn(_)))if(this._isMovingLeft){const s=new L.Range(_,v-1,_,v),i=S.getValueInRange(s);m.addEditOperation(s,null),m.addEditOperation(new L.Range(_,C,_,C),i)}else{const s=new L.Range(_,C,_,C+1),i=S.getValueInRange(s);m.addEditOperation(s,null),m.addEditOperation(new L.Range(_,v,_,v),i)}}computeCursorState(S,m){return this._isMovingLeft?new I.Selection(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new I.Selection(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}e.MoveCaretCommand=y}),define(te[112],ie([1,0,9]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionItem=e.CodeActionCommandArgs=e.filtersAction=e.mayIncludeActionsOfKind=e.CodeActionTriggerSource=e.CodeActionKind=void 0;class I{constructor(s){this.value=s}equals(s){return this.value===s.value}contains(s){return this.equals(s)||this.value===""||s.value.startsWith(this.value+I.sep)}intersects(s){return this.contains(s)||s.contains(this)}append(s){return new I(this.value+I.sep+s)}}e.CodeActionKind=I,I.sep=".",I.None=new I("@@none@@"),I.Empty=new I(""),I.QuickFix=new I("quickfix"),I.Refactor=new I("refactor"),I.RefactorExtract=I.Refactor.append("extract"),I.RefactorInline=I.Refactor.append("inline"),I.RefactorMove=I.Refactor.append("move"),I.RefactorRewrite=I.Refactor.append("rewrite"),I.Notebook=new I("notebook"),I.Source=new I("source"),I.SourceOrganizeImports=I.Source.append("organizeImports"),I.SourceFixAll=I.Source.append("fixAll"),I.SurroundWith=I.Refactor.append("surround");var y;(function(C){C.Refactor="refactor",C.RefactorPreview="refactor preview",C.Lightbulb="lightbulb",C.Default="other (default)",C.SourceAction="source action",C.QuickFix="quick fix action",C.FixAll="fix all",C.OrganizeImports="organize imports",C.AutoFix="auto fix",C.QuickFixHover="quick fix hover window",C.OnSave="save participants",C.ProblemsView="problems view"})(y||(e.CodeActionTriggerSource=y={}));function D(C,s){return!(C.include&&!C.include.intersects(s)||C.excludes&&C.excludes.some(i=>m(s,i,C.include))||!C.includeSourceActions&&I.Source.contains(s))}e.mayIncludeActionsOfKind=D;function S(C,s){const i=s.kind?new I(s.kind):void 0;return!(C.include&&(!i||!C.include.contains(i))||C.excludes&&i&&C.excludes.some(n=>m(i,n,C.include))||!C.includeSourceActions&&i&&I.Source.contains(i)||C.onlyIncludePreferredActions&&!s.isPreferred)}e.filtersAction=S;function m(C,s,i){return!(!s.contains(C)||i&&s.contains(i))}class _{static fromUser(s,i){return!s||typeof s!="object"?new _(i.kind,i.apply,!1):new _(_.getKindFromUser(s,i.kind),_.getApplyFromUser(s,i.apply),_.getPreferredUser(s))}static getApplyFromUser(s,i){switch(typeof s.apply=="string"?s.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return i}}static getKindFromUser(s,i){return typeof s.kind=="string"?new I(s.kind):i}static getPreferredUser(s){return typeof s.preferred=="boolean"?s.preferred:!1}constructor(s,i,n){this.kind=s,this.apply=i,this.preferred=n}}e.CodeActionCommandArgs=_;class v{constructor(s,i,n){this.action=s,this.provider=i,this.highlightRange=n}resolve(s){var i;return be(this,void 0,void 0,function*(){if(!((i=this.provider)===null||i===void 0)&&i.resolveCodeAction&&!this.action.edit){let n;try{n=yield this.provider.resolveCodeAction(this.action,s)}catch(t){(0,L.onUnexpectedExternalError)(t)}n&&(this.action.edit=n.edit)}return this})}}e.CodeActionItem=v}),define(te[541],ie([1,0,6]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerModel=void 0;class I{get color(){return this._color}set color(D){this._color.equals(D)||(this._color=D,this._onDidChangeColor.fire(D))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(D){this._colorPresentations=D,this.presentationIndex>D.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}constructor(D,S,m){this.presentationIndex=m,this._onColorFlushed=new L.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new L.Emitter,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new L.Emitter,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=D,this._color=D,this._colorPresentations=S}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(D,S){let m=-1;for(let _=0;_i)return!1;for(let n=0;n=65&&t<=90&&t+32===r)&&!(r>=65&&r<=90&&r+32===t))return!1}return!0}_createOperationsForBlockComment(_,v,C,s,i,n){const t=_.startLineNumber,r=_.startColumn,u=_.endLineNumber,f=_.endColumn,d=i.getLineContent(t),l=i.getLineContent(u);let o=d.lastIndexOf(v,r-1+v.length),c=l.indexOf(C,f-1-C.length);if(o!==-1&&c!==-1)if(t===u)d.substring(o+v.length,c).indexOf(C)>=0&&(o=-1,c=-1);else{const g=d.substring(o+v.length),h=l.substring(0,c);(g.indexOf(C)>=0||h.indexOf(C)>=0)&&(o=-1,c=-1)}let a;o!==-1&&c!==-1?(s&&o+v.length0&&l.charCodeAt(c-1)===32&&(C=" "+C,c-=1),a=S._createRemoveBlockCommentOperations(new y.Range(t,o+v.length+1,u,c+1),v,C)):(a=S._createAddBlockCommentOperations(_,v,C,this._insertSpace),this._usedEndToken=a.length===1?C:null);for(const g of a)n.addTrackedEditOperation(g.range,g.text)}static _createRemoveBlockCommentOperations(_,v,C){const s=[];return y.Range.isEmpty(_)?s.push(L.EditOperation.delete(new y.Range(_.startLineNumber,_.startColumn-v.length,_.endLineNumber,_.endColumn+C.length))):(s.push(L.EditOperation.delete(new y.Range(_.startLineNumber,_.startColumn-v.length,_.startLineNumber,_.startColumn))),s.push(L.EditOperation.delete(new y.Range(_.endLineNumber,_.endColumn,_.endLineNumber,_.endColumn+C.length)))),s}static _createAddBlockCommentOperations(_,v,C,s){const i=[];return y.Range.isEmpty(_)?i.push(L.EditOperation.replace(new y.Range(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn),v+" "+C)):(i.push(L.EditOperation.insert(new I.Position(_.startLineNumber,_.startColumn),v+(s?" ":""))),i.push(L.EditOperation.insert(new I.Position(_.endLineNumber,_.endColumn),(s?" ":"")+C))),i}getEditOperations(_,v){const C=this._selection.startLineNumber,s=this._selection.startColumn;_.tokenization.tokenizeIfCheap(C);const i=_.getLanguageIdAtPosition(C,s),n=this.languageConfigurationService.getLanguageConfiguration(i).comments;!n||!n.blockCommentStartToken||!n.blockCommentEndToken||this._createOperationsForBlockComment(this._selection,n.blockCommentStartToken,n.blockCommentEndToken,this._insertSpace,_,v)}computeCursorState(_,v){const C=v.getInverseEditOperations();if(C.length===2){const s=C[0],i=C[1];return new D.Selection(s.range.endLineNumber,s.range.endColumn,i.range.startLineNumber,i.range.startColumn)}else{const s=C[0].range,i=this._usedEndToken?-this._usedEndToken.length-1:0;return new D.Selection(s.endLineNumber,s.endColumn+i,s.endLineNumber,s.endColumn+i)}}}e.BlockCommentCommand=S}),define(te[542],ie([1,0,10,71,12,5,24,294]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineCommentCommand=void 0;class _{constructor(C,s,i,n,t,r,u){this.languageConfigurationService=C,this._selection=s,this._tabSize=i,this._type=n,this._insertSpace=t,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=r,this._ignoreFirstLine=u||!1}static _gatherPreflightCommentStrings(C,s,i,n){C.tokenization.tokenizeIfCheap(s);const t=C.getLanguageIdAtPosition(s,1),r=n.getLanguageConfiguration(t).comments,u=r?r.lineCommentToken:null;if(!u)return null;const f=[];for(let d=0,l=i-s+1;dt?s[f].commentStrOffset=r-1:s[f].commentStrOffset=r}}}e.LineCommentCommand=_}),define(te[543],ie([1,0,5,24]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropCommand=void 0;class y{constructor(S,m,_){this.selection=S,this.targetPosition=m,this.copy=_,this.targetSelection=null}getEditOperations(S,m){const _=S.getValueInRange(this.selection);if(this.copy||m.addEditOperation(this.selection,null),m.addEditOperation(new L.Range(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),_),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new I.Selection(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);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new I.Selection(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);return}if(this.targetPosition.lineNumber0){const m=[];for(let C=0;CL.Range.compareRangesUsingStarts(C.range,s.range));const _=[];let v=m[0];for(let C=1;C0){const f=[],d=r.caseOps.length;let l=0;for(let o=0,c=u.length;o=d){f.push(u.slice(o));break}switch(r.caseOps[l]){case"U":f.push(u[o].toUpperCase());break;case"u":f.push(u[o].toUpperCase()),l++;break;case"L":f.push(u[o].toLowerCase());break;case"l":f.push(u[o].toLowerCase()),l++;break;default:f.push(u[o])}}u=f.join("")}i+=u}return i}static _substitute(C,s){if(s===null)return"";if(C===0)return s[0];let i="";for(;C>0;){if(C=n)break;const r=v.charCodeAt(i);switch(r){case 92:s.emitUnchanged(i-1),s.emitStatic("\\",i+1);break;case 110:s.emitUnchanged(i-1),s.emitStatic(` -`,i+1);break;case 116:s.emitUnchanged(i-1),s.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:s.emitUnchanged(i-1),s.emitStatic("",i+1),C.push(String.fromCharCode(r));break}continue}if(t===36){if(i++,i>=n)break;const r=v.charCodeAt(i);if(r===36){s.emitUnchanged(i-1),s.emitStatic("$",i+1);continue}if(r===48||r===38){s.emitUnchanged(i-1),s.emitMatchIndex(0,i+1,C),C.length=0;continue}if(49<=r&&r<=57){let u=r-48;if(i+1e.MAX_FOLDING_REGIONS)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=m,this._endIndexes=_,this._collapseStates=new I(m.length),this._userDefinedStates=new I(m.length),this._recoveredStates=new I(m.length),this._types=v,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;const m=[],_=(v,C)=>{const s=m[m.length-1];return this.getStartLineNumber(s)<=v&&this.getEndLineNumber(s)>=C};for(let v=0,C=this._startIndexes.length;ve.MAX_LINE_NUMBER||i>e.MAX_LINE_NUMBER)throw new Error("startLineNumber or endLineNumber must not exceed "+e.MAX_LINE_NUMBER);for(;m.length>0&&!_(s,i);)m.pop();const n=m.length>0?m[m.length-1]:-1;m.push(v),this._startIndexes[v]=s+((n&255)<<24),this._endIndexes[v]=i+((n&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(m){return this._startIndexes[m]&e.MAX_LINE_NUMBER}getEndLineNumber(m){return this._endIndexes[m]&e.MAX_LINE_NUMBER}getType(m){return this._types?this._types[m]:void 0}hasTypes(){return!!this._types}isCollapsed(m){return this._collapseStates.get(m)}setCollapsed(m,_){this._collapseStates.set(m,_)}isUserDefined(m){return this._userDefinedStates.get(m)}setUserDefined(m,_){return this._userDefinedStates.set(m,_)}isRecovered(m){return this._recoveredStates.get(m)}setRecovered(m,_){return this._recoveredStates.set(m,_)}getSource(m){return this.isUserDefined(m)?1:this.isRecovered(m)?2:0}setSource(m,_){_===1?(this.setUserDefined(m,!0),this.setRecovered(m,!1)):_===2?(this.setUserDefined(m,!1),this.setRecovered(m,!0)):(this.setUserDefined(m,!1),this.setRecovered(m,!1))}setCollapsedAllOfType(m,_){let v=!1;if(this._types)for(let C=0;C>>24)+((this._endIndexes[m]&L)>>>16);return _===e.MAX_FOLDING_REGIONS?-1:_}contains(m,_){return this.getStartLineNumber(m)<=_&&this.getEndLineNumber(m)>=_}findIndex(m){let _=0,v=this._startIndexes.length;if(v===0)return-1;for(;_=0){if(this.getEndLineNumber(_)>=m)return _;for(_=this.getParentIndex(_);_!==-1;){if(this.contains(_,m))return _;_=this.getParentIndex(_)}}return-1}toString(){const m=[];for(let _=0;_Array.isArray(c)?g=>gg=u.startLineNumber))r&&r.startLineNumber===u.startLineNumber?(u.source===1?c=u:(c=r,c.isCollapsed=u.isCollapsed&&r.endLineNumber===u.endLineNumber,c.source=0),r=s(++n)):(c=u,u.isCollapsed&&u.source===0&&(c.source=2)),u=i(++t);else{let a=t,g=u;for(;;){if(!g||g.startLineNumber>r.endLineNumber){c=r;break}if(g.source===1&&g.endLineNumber>r.endLineNumber)break;g=i(++a)}r=s(++n)}if(c){for(;d&&d.endLineNumberc.startLineNumber&&c.startLineNumber>l&&c.endLineNumber<=v&&(!d||d.endLineNumber>=c.endLineNumber)&&(o.push(c),l=c.startLineNumber,d&&f.push(d),d=c)}}return o}}e.FoldingRegions=y;class D{constructor(m,_){this.ranges=m,this.index=_}get startLineNumber(){return this.ranges.getStartLineNumber(this.index)}get endLineNumber(){return this.ranges.getEndLineNumber(this.index)}get regionIndex(){return this.index}get parentIndex(){return this.ranges.getParentIndex(this.index)}get isCollapsed(){return this.ranges.isCollapsed(this.index)}containedBy(m){return m.startLineNumber<=this.startLineNumber&&m.endLineNumber>=this.endLineNumber}containsLine(m){return this.startLineNumber<=m&&m<=this.endLineNumber}}e.FoldingRegion=D}),define(te[295],ie([1,0,6,180,141]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNextFoldLine=e.getPreviousFoldLine=e.getParentFoldLine=e.setCollapseStateForType=e.setCollapseStateForMatchingLines=e.setCollapseStateForRest=e.setCollapseStateAtLevel=e.setCollapseStateUp=e.setCollapseStateLevelsUp=e.setCollapseStateLevelsDown=e.toggleCollapseState=e.FoldingModel=void 0;class D{get regions(){return this._regions}get textModel(){return this._textModel}constructor(d,l){this._updateEventEmitter=new L.Emitter,this.onDidChange=this._updateEventEmitter.event,this._textModel=d,this._decorationProvider=l,this._regions=new I.FoldingRegions(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[]}toggleCollapseState(d){if(!d.length)return;d=d.sort((o,c)=>o.regionIndex-c.regionIndex);const l={};this._decorationProvider.changeDecorations(o=>{let c=0,a=-1,g=-1;const h=p=>{for(;cg&&(g=b),c++}};for(const p of d){const b=p.regionIndex,w=this._editorDecorationIds[b];if(w&&!l[w]){l[w]=!0,h(b);const E=!this._regions.isCollapsed(b);this._regions.setCollapsed(b,E),a=Math.max(a,this._regions.getEndLineNumber(b))}}h(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:d})}removeManualRanges(d){const l=new Array,o=c=>{for(const a of d)if(!(a.startLineNumber>c.endLineNumber||c.startLineNumber>a.endLineNumber))return!0;return!1};for(let c=0;co&&(o=h)}this._decorationProvider.changeDecorations(c=>this._editorDecorationIds=c.deltaDecorations(this._editorDecorationIds,l)),this._regions=d,this._updateEventEmitter.fire({model:this})}_currentFoldedOrManualRanges(d=[]){const l=(c,a)=>{for(const g of d)if(c=g.endLineNumber||g.startLineNumber<1||g.endLineNumber>o)continue;const h=this._getLinesChecksum(g.startLineNumber+1,g.endLineNumber);l.push({startLineNumber:g.startLineNumber,endLineNumber:g.endLineNumber,isCollapsed:g.isCollapsed,source:g.source,checksum:h})}return l.length>0?l:void 0}applyMemento(d){var l,o;if(!Array.isArray(d))return;const c=[],a=this._textModel.getLineCount();for(const h of d){if(h.startLineNumber>=h.endLineNumber||h.startLineNumber<1||h.endLineNumber>a)continue;const p=this._getLinesChecksum(h.startLineNumber+1,h.endLineNumber);(!h.checksum||p===h.checksum)&&c.push({startLineNumber:h.startLineNumber,endLineNumber:h.endLineNumber,type:void 0,isCollapsed:(l=h.isCollapsed)!==null&&l!==void 0?l:!0,source:(o=h.source)!==null&&o!==void 0?o:0})}const g=I.FoldingRegions.sanitizeAndMerge(this._regions,c,a);this.updatePost(I.FoldingRegions.fromFoldRanges(g))}_getLinesChecksum(d,l){return(0,y.hash)(this._textModel.getLineContent(d)+this._textModel.getLineContent(l))%1e6}dispose(){this._decorationProvider.removeDecorations(this._editorDecorationIds)}getAllRegionsAtLine(d,l){const o=[];if(this._regions){let c=this._regions.findRange(d),a=1;for(;c>=0;){const g=this._regions.toRegion(c);(!l||l(g,a))&&o.push(g),a++,c=g.parentIndex}}return o}getRegionAtLine(d){if(this._regions){const l=this._regions.findRange(d);if(l>=0)return this._regions.toRegion(l)}return null}getRegionsInside(d,l){const o=[],c=d?d.regionIndex+1:0,a=d?d.endLineNumber:Number.MAX_VALUE;if(l&&l.length===2){const g=[];for(let h=c,p=this._regions.length;h0&&!b.containedBy(g[g.length-1]);)g.pop();g.push(b),l(b,g.length)&&o.push(b)}else break}}else for(let g=c,h=this._regions.length;g1){const h=f.getRegionsInside(a,(p,b)=>p.isCollapsed!==g&&b0)for(const a of o){const g=f.getRegionAtLine(a);if(g&&(g.isCollapsed!==d&&c.push(g),l>1)){const h=f.getRegionsInside(g,(p,b)=>p.isCollapsed!==d&&bg.isCollapsed!==d&&hh.isCollapsed!==d&&p<=l);c.push(...g)}f.toggleCollapseState(c)}e.setCollapseStateLevelsUp=_;function v(f,d,l){const o=[];for(const c of l){const a=f.getAllRegionsAtLine(c,g=>g.isCollapsed!==d);a.length>0&&o.push(a[0])}f.toggleCollapseState(o)}e.setCollapseStateUp=v;function C(f,d,l,o){const c=(g,h)=>h===d&&g.isCollapsed!==l&&!o.some(p=>g.containsLine(p)),a=f.getRegionsInside(null,c);f.toggleCollapseState(a)}e.setCollapseStateAtLevel=C;function s(f,d,l){const o=[];for(const g of l){const h=f.getAllRegionsAtLine(g,void 0);h.length>0&&o.push(h[0])}const c=g=>o.every(h=>!h.containedBy(g)&&!g.containedBy(h))&&g.isCollapsed!==d,a=f.getRegionsInside(null,c);f.toggleCollapseState(a)}e.setCollapseStateForRest=s;function i(f,d,l){const o=f.textModel,c=f.regions,a=[];for(let g=c.length-1;g>=0;g--)if(l!==c.isCollapsed(g)){const h=c.getStartLineNumber(g);d.test(o.getLineContent(h))&&a.push(c.toRegion(g))}f.toggleCollapseState(a)}e.setCollapseStateForMatchingLines=i;function n(f,d,l){const o=f.regions,c=[];for(let a=o.length-1;a>=0;a--)l!==o.isCollapsed(a)&&d===o.getType(a)&&c.push(o.toRegion(a));f.toggleCollapseState(c)}e.setCollapseStateForType=n;function t(f,d){let l=null;const o=d.getRegionAtLine(f);if(o!==null&&(l=o.startLineNumber,f===l)){const c=o.parentIndex;c!==-1?l=d.regions.getStartLineNumber(c):l=null}return l}e.getParentFoldLine=t;function r(f,d){let l=d.getRegionAtLine(f);if(l!==null&&l.startLineNumber===f){if(f!==l.startLineNumber)return l.startLineNumber;{const o=l.parentIndex;let c=0;for(o!==-1&&(c=d.regions.getStartLineNumber(l.parentIndex));l!==null;)if(l.regionIndex>0){if(l=d.regions.toRegion(l.regionIndex-1),l.startLineNumber<=c)return null;if(l.parentIndex===o)return l.startLineNumber}else return null}}else if(d.regions.length>0)for(l=d.regions.toRegion(d.regions.length-1);l!==null;){if(l.startLineNumber0?l=d.regions.toRegion(l.regionIndex-1):l=null}return null}e.getPreviousFoldLine=r;function u(f,d){let l=d.getRegionAtLine(f);if(l!==null&&l.startLineNumber===f){const o=l.parentIndex;let c=0;if(o!==-1)c=d.regions.getEndLineNumber(l.parentIndex);else{if(d.regions.length===0)return null;c=d.regions.getEndLineNumber(d.regions.length-1)}for(;l!==null;)if(l.regionIndex=c)return null;if(l.parentIndex===o)return l.startLineNumber}else return null}else if(d.regions.length>0)for(l=d.regions.toRegion(0);l!==null;){if(l.startLineNumber>f)return l.startLineNumber;l.regionIndexthis.updateHiddenRanges()),this._hiddenRanges=[],C.regions.length&&this.updateHiddenRanges()}notifyChangeModelContent(C){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=C.changes.some(s=>s.range.endLineNumber!==s.range.startLineNumber||(0,D.countEOL)(s.text)[0]!==0))}updateHiddenRanges(){let C=!1;const s=[];let i=0,n=0,t=Number.MAX_VALUE,r=-1;const u=this._foldingModel.regions;for(;i0}isHidden(C){return _(this._hiddenRanges,C)!==null}adjustSelections(C){let s=!1;const i=this._foldingModel.textModel;let n=null;const t=r=>((!n||!m(r,n))&&(n=_(this._hiddenRanges,r)),n?n.startLineNumber-1:null);for(let r=0,u=C.length;r0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}e.HiddenRangeModel=S;function m(v,C){return v>=C.startLineNumber&&v<=C.endLineNumber}function _(v,C){const s=(0,L.findFirstIdxMonotonousOrArrLen)(v,i=>C=0&&v[s].endLineNumber>=C?v[s]:null}}),define(te[296],ie([1,0,208,180]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.computeRanges=e.RangesCollector=e.IndentRangeProvider=void 0;const y=5e3,D="indent";class S{constructor(s,i,n){this.editorModel=s,this.languageConfigurationService=i,this.foldingRangesLimit=n,this.id=D}dispose(){}compute(s){const i=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=i&&!!i.offSide,t=i&&i.markers;return Promise.resolve(v(this.editorModel,n,t,this.foldingRangesLimit))}}e.IndentRangeProvider=S;class m{constructor(s){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=s}insertFirst(s,i,n){if(s>I.MAX_LINE_NUMBER||i>I.MAX_LINE_NUMBER)return;const t=this._length;this._startIndexes[t]=s,this._endIndexes[t]=i,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}toIndentRanges(s){const i=this._foldingRangesLimit.limit;if(this._length<=i){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let r=this._length-1,u=0;r>=0;r--,u++)n[u]=this._startIndexes[r],t[u]=this._endIndexes[r];return new I.FoldingRegions(n,t)}else{this._foldingRangesLimit.update(this._length,i);let n=0,t=this._indentOccurrences.length;for(let d=0;di){t=d;break}n+=l}}const r=s.getOptions().tabSize,u=new Uint32Array(i),f=new Uint32Array(i);for(let d=this._length-1,l=0;d>=0;d--){const o=this._startIndexes[d],c=s.getLineContent(o),a=(0,L.computeIndentLevel)(c,r);(a{}};function v(C,s,i,n=_){const t=C.getOptions().tabSize,r=new m(n);let u;i&&(u=new RegExp(`(${i.start.source})|(?:${i.end.source})`));const f=[],d=C.getLineCount()+1;f.push({indent:-1,endAbove:d,line:d});for(let l=C.getLineCount();l>0;l--){const o=C.getLineContent(l),c=(0,L.computeIndentLevel)(o,t);let a=f[f.length-1];if(c===-1){s&&(a.endAbove=l);continue}let g;if(u&&(g=o.match(u)))if(g[1]){let h=f.length-1;for(;h>0&&f[h].indent!==-2;)h--;if(h>0){f.length=h+1,a=f[h],r.insertFirst(l,a.line,c),a.line=l,a.indent=c,a.endAbove=l;continue}}else{f.push({indent:-2,endAbove:l,line:l});continue}if(a.indent>c){do f.pop(),a=f[f.length-1];while(a.indent>c);const h=a.endAbove-1;h-l>=1&&r.insertFirst(l,h,c)}a.indent===c?a.endAbove=l:f.push({indent:c,endAbove:l,line:l})}return r.toIndentRanges(C)}e.computeRanges=v}),define(te[297],ie([1,0,9,2,180]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeRanges=e.SyntaxRangeProvider=void 0;const D={},S="syntax";class m{constructor(i,n,t,r,u){this.editorModel=i,this.providers=n,this.handleFoldingRangesChange=t,this.foldingRangesLimit=r,this.fallbackRangeProvider=u,this.id=S,this.disposables=new I.DisposableStore,u&&this.disposables.add(u);for(const f of n)typeof f.onDidChange=="function"&&this.disposables.add(f.onDidChange(t))}compute(i){return _(this.providers,this.editorModel,i).then(n=>{var t,r;return n?C(n,this.foldingRangesLimit):(r=(t=this.fallbackRangeProvider)===null||t===void 0?void 0:t.compute(i))!==null&&r!==void 0?r:null})}dispose(){this.disposables.dispose()}}e.SyntaxRangeProvider=m;function _(s,i,n){let t=null;const r=s.map((u,f)=>Promise.resolve(u.provideFoldingRanges(i,D,n)).then(d=>{if(!n.isCancellationRequested&&Array.isArray(d)){Array.isArray(t)||(t=[]);const l=i.getLineCount();for(const o of d)o.start>0&&o.end>o.start&&o.end<=l&&t.push({start:o.start,end:o.end,rank:f,kind:o.kind})}},L.onUnexpectedExternalError));return Promise.all(r).then(u=>t)}class v{constructor(i){this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=i}add(i,n,t,r){if(i>y.MAX_LINE_NUMBER||n>y.MAX_LINE_NUMBER)return;const u=this._length;this._startIndexes[u]=i,this._endIndexes[u]=n,this._nestingLevels[u]=r,this._types[u]=t,this._length++,r<30&&(this._nestingLevelCounts[r]=(this._nestingLevelCounts[r]||0)+1)}toIndentRanges(){const i=this._foldingRangesLimit.limit;if(this._length<=i){this._foldingRangesLimit.update(this._length,!1);const n=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let r=0;ri){t=d;break}n+=l}}const r=new Uint32Array(i),u=new Uint32Array(i),f=[];for(let d=0,l=0;d{let l=f.start-d.start;return l===0&&(l=f.rank-d.rank),l}),t=new v(i);let r;const u=[];for(const f of n)if(!r)r=f,t.add(f.start,f.end,f.kind&&f.kind.value,u.length);else if(f.start>r.start)if(f.end<=r.end)u.push(r),r=f,t.add(f.start,f.end,f.kind&&f.kind.value,u.length);else{if(f.start>r.end){do r=u.pop();while(r&&f.start>r.end);r&&u.push(r),r=f}t.add(f.start,f.end,f.kind&&f.kind.value,u.length)}return t.toIndentRanges()}e.sanitizeRanges=C}),define(te[298],ie([1,0,71,5,120]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingEdit=void 0;class D{static _handleEolEdits(m,_){let v;const C=[];for(const s of _)typeof s.eol=="number"&&(v=s.eol),s.range&&typeof s.text=="string"&&C.push(s);return typeof v=="number"&&m.hasModel()&&m.getModel().pushEOL(v),C}static _isFullModelReplaceEdit(m,_){if(!m.hasModel())return!1;const v=m.getModel(),C=v.validateRange(_.range);return v.getFullModelRange().equalsRange(C)}static execute(m,_,v){v&&m.pushUndoStop();const C=y.StableEditorScrollState.capture(m),s=D._handleEolEdits(m,_);s.length===1&&D._isFullModelReplaceEdit(m,s[0])?m.executeEdits("formatEditsCommand",s.map(i=>L.EditOperation.replace(I.Range.lift(i.range),i.text))):m.executeEdits("formatEditsCommand",s.map(i=>L.EditOperation.replaceMove(I.Range.lift(i.range),i.text))),v&&m.pushUndoStop(),C.restoreRelativeVerticalPositionOfCursor(m)}}e.FormattingEdit=D}),define(te[99],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverParticipantRegistry=e.HoverForeignElementAnchor=e.HoverRangeAnchor=void 0;class L{constructor(D,S,m,_){this.priority=D,this.range=S,this.initialMousePosX=m,this.initialMousePosY=_,this.type=1}equals(D){return D.type===1&&this.range.equalsRange(D.range)}canAdoptVisibleHover(D,S){return D.type===1&&S.lineNumber===this.range.startLineNumber}}e.HoverRangeAnchor=L;class I{constructor(D,S,m,_,v,C){this.priority=D,this.owner=S,this.range=m,this.initialMousePosX=_,this.initialMousePosY=v,this.supportsMarkerHover=C,this.type=2}equals(D){return D.type===2&&this.owner===D.owner}canAdoptVisibleHover(D,S){return D.type===2&&this.owner===D.owner}}e.HoverForeignElementAnchor=I,e.HoverParticipantRegistry=new class{constructor(){this._participants=[]}register(D){this._participants.push(D)}getAll(){return this._participants}}}),define(te[547],ie([1,0,24]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InPlaceReplaceCommand=void 0;class I{constructor(D,S,m){this._editRange=D,this._originalSelection=S,this._text=m}getEditOperations(D,S){S.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(D,S){const _=S.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new L.Selection(_.endLineNumber,Math.min(this._originalSelection.positionColumn,_.endColumn),_.endLineNumber,Math.min(this._originalSelection.positionColumn,_.endColumn)):new L.Selection(_.endLineNumber,_.endColumn-this._text.length,_.endLineNumber,_.endColumn)}}e.InPlaceReplaceCommand=I}),define(te[299],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.generateIndent=e.getSpaceCnt=void 0;function L(y,D){let S=0;for(let m=0;m{const o=S.Range.lift(l.range);return{startOffset:f.getOffset(o.getStartPosition()),endOffset:f.getOffset(o.getEndPosition()),text:l.text}});d.sort((l,o)=>o.startOffset-l.startOffset);for(const l of d)r=r.substring(0,l.startOffset)+l.text+r.substring(l.endOffset);return r}e.applyEdits=m;class _{constructor(u){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let f=0;ff)throw new L.BugIndicatingError(`startColumn ${u} cannot be after endColumnExclusive ${f}`)}toRange(u){return new S.Range(u,this.startColumn,u,this.endColumnExclusive)}equals(u){return this.startColumn===u.startColumn&&this.endColumnExclusive===u.endColumnExclusive}}e.ColumnRange=s;function i(r,u){const f=new I.DisposableStore,d=r.createDecorationsCollection();return f.add((0,y.autorunOpts)({debugName:()=>`Apply decorations from ${u.debugName}`},l=>{const o=u.read(l);d.set(o)})),f.add({dispose:()=>{d.clear()}}),f}e.applyObservableDecorations=i;function n(r,u){return new D.Position(r.lineNumber+u.lineNumber-1,u.lineNumber===1?r.column+u.column-1:u.column)}e.addPositions=n;function t(r){let u=1,f=1;for(const d of r)d===` -`?(u++,f=1):f++;return new D.Position(u,f)}e.lengthOfText=t}),define(te[215],ie([1,0,150]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ghostTextOrReplacementEquals=e.GhostTextReplacement=e.GhostTextPart=e.GhostText=void 0;class I{constructor(_,v){this.lineNumber=_,this.parts=v}equals(_){return this.lineNumber===_.lineNumber&&this.parts.length===_.parts.length&&this.parts.every((v,C)=>v.equals(_.parts[C]))}renderForScreenReader(_){if(this.parts.length===0)return"";const v=this.parts[this.parts.length-1],C=_.substr(0,v.column-1);return(0,L.applyEdits)(C,this.parts.map(i=>({range:{startLineNumber:1,endLineNumber:1,startColumn:i.column,endColumn:i.column},text:i.lines.join(` -`)}))).substring(this.parts[0].column-1)}isEmpty(){return this.parts.every(_=>_.lines.length===0)}get lineCount(){return 1+this.parts.reduce((_,v)=>_+v.lines.length-1,0)}}e.GhostText=I;class y{constructor(_,v,C){this.column=_,this.lines=v,this.preview=C}equals(_){return this.column===_.column&&this.lines.length===_.lines.length&&this.lines.every((v,C)=>v===_.lines[C])}}e.GhostTextPart=y;class D{constructor(_,v,C,s=0){this.lineNumber=_,this.columnRange=v,this.newLines=C,this.additionalReservedLineCount=s,this.parts=[new y(this.columnRange.endColumnExclusive,this.newLines,!1)]}renderForScreenReader(_){return this.newLines.join(` -`)}get lineCount(){return this.newLines.length}isEmpty(){return this.parts.every(_=>_.lines.length===0)}equals(_){return this.lineNumber===_.lineNumber&&this.columnRange.equals(_.columnRange)&&this.newLines.length===_.newLines.length&&this.newLines.every((v,C)=>v===_.newLines[C])&&this.additionalReservedLineCount===_.additionalReservedLineCount}}e.GhostTextReplacement=D;function S(m,_){return m===_?!0:!m||!_?!1:m instanceof I&&_ instanceof I||m instanceof D&&_ instanceof D?m.equals(_):!1}e.ghostTextOrReplacementEquals=S}),define(te[300],ie([1,0,167,10,5,215,150]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SingleTextEdit=void 0;class m{constructor(t,r){this.range=t,this.text=r}removeCommonPrefix(t,r){const u=r?this.range.intersectRanges(r):this.range;if(!u)return this;const f=t.getValueInRange(u,1),d=(0,I.commonPrefixLength)(f,this.text),l=(0,S.addPositions)(this.range.getStartPosition(),(0,S.lengthOfText)(f.substring(0,d))),o=this.text.substring(d),c=y.Range.fromPositions(l,this.range.getEndPosition());return new m(c,o)}augments(t){return this.text.startsWith(t.text)&&_(this.range,t.range)}computeGhostText(t,r,u,f=0){let d=this.removeCommonPrefix(t);if(d.range.endLineNumber!==d.range.startLineNumber)return;const l=t.getLineContent(d.range.startLineNumber),o=(0,I.getLeadingWhitespace)(l).length;if(d.range.startColumn-1<=o){const w=(0,I.getLeadingWhitespace)(d.text).length,E=l.substring(d.range.startColumn-1,o),[k,M]=[d.range.getStartPosition(),d.range.getEndPosition()],R=k.column+E.length<=M.column?k.delta(0,E.length):M,B=y.Range.fromPositions(R,M),T=d.text.startsWith(E)?d.text.substring(E.length):d.text.substring(w);d=new m(B,T)}const a=t.getValueInRange(d.range),g=C(a,d.text);if(!g)return;const h=d.range.startLineNumber,p=new Array;if(r==="prefix"){const w=g.filter(E=>E.originalLength===0);if(w.length>1||w.length===1&&w[0].originalStart!==a.length)return}const b=d.text.length-f;for(const w of g){const E=d.range.startColumn+w.originalStart+w.originalLength;if(r==="subwordSmart"&&u&&u.lineNumber===d.range.startLineNumber&&E0)return;if(w.modifiedLength===0)continue;const k=w.modifiedStart+w.modifiedLength,M=Math.max(w.modifiedStart,Math.min(k,b)),R=d.text.substring(w.modifiedStart,M),B=d.text.substring(M,Math.max(w.modifiedStart,k));if(R.length>0){const T=(0,I.splitLines)(R);p.push(new D.GhostTextPart(E,T,!1))}if(B.length>0){const T=(0,I.splitLines)(B);p.push(new D.GhostTextPart(E,T,!0))}}return new D.GhostText(h,p)}}e.SingleTextEdit=m;function _(n,t){return t.getStartPosition().equals(n.getStartPosition())&&t.getEndPosition().isBeforeOrEqual(n.getEndPosition())}let v;function C(n,t){if(v?.originalValue===n&&v?.newValue===t)return v?.changes;{let r=i(n,t,!0);if(r){const u=s(r);if(u>0){const f=i(n,t,!1);f&&s(f)5e3||t.length>5e3)return;function u(a){let g=0;for(let h=0,p=a.length;hg&&(g=b)}return g}const f=Math.max(u(n),u(t));function d(a){if(a<0)throw new Error("unexpected");return f+a+1}function l(a){let g=0,h=0;const p=new Int32Array(a.length);for(let b=0,w=a.length;bo},{getElements:()=>c}).ComputeDiff(!1).changes}}),define(te[548],ie([1,0,5,24]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CopyLinesCommand=void 0;class y{constructor(S,m,_){this._selection=S,this._isCopyingDown=m,this._noop=_||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(S,m){let _=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,_.startLineNumber<_.endLineNumber&&_.endColumn===1&&(this._endLineNumberDelta=1,_=_.setEndPosition(_.endLineNumber-1,S.getLineMaxColumn(_.endLineNumber-1)));const v=[];for(let s=_.startLineNumber;s<=_.endLineNumber;s++)v.push(S.getLineContent(s));const C=v.join(` -`);C===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?m.addEditOperation(new L.Range(_.endLineNumber,S.getLineMaxColumn(_.endLineNumber),_.endLineNumber+1,1),_.endLineNumber===S.getLineCount()?"":` -`):this._isCopyingDown?m.addEditOperation(new L.Range(_.startLineNumber,1,_.startLineNumber,1),C+` -`):m.addEditOperation(new L.Range(_.endLineNumber,S.getLineMaxColumn(_.endLineNumber),_.endLineNumber,S.getLineMaxColumn(_.endLineNumber)),` -`+C),this._selectionId=m.trackSelection(_),this._selectionDirection=this._selection.getDirection()}computeCursorState(S,m){let _=m.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let v=_.startLineNumber,C=_.startColumn,s=_.endLineNumber,i=_.endColumn;this._startLineNumberDelta!==0&&(v=v+this._startLineNumberDelta,C=1),this._endLineNumberDelta!==0&&(s=s+this._endLineNumberDelta,i=1),_=I.Selection.createWithDirection(v,C,s,i,this._selectionDirection)}return _}}e.CopyLinesCommand=y}),define(te[549],ie([1,0,71,5]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SortLinesCommand=void 0;class y{static getCollator(){return y._COLLATOR||(y._COLLATOR=new Intl.Collator),y._COLLATOR}constructor(_,v){this.selection=_,this.descending=v,this.selectionId=null}getEditOperations(_,v){const C=S(_,this.selection,this.descending);C&&v.addEditOperation(C.range,C.text),this.selectionId=v.trackSelection(this.selection)}computeCursorState(_,v){return v.getTrackedSelection(this.selectionId)}static canRun(_,v,C){if(_===null)return!1;const s=D(_,v,C);if(!s)return!1;for(let i=0,n=s.before.length;i=s)return null;const i=[];for(let t=C;t<=s;t++)i.push(m.getLineContent(t));let n=i.slice(0);return n.sort(y.getCollator().compare),v===!0&&(n=n.reverse()),{startLineNumber:C,endLineNumber:s,before:i,after:n}}function S(m,_,v){const C=D(m,_,v);return C?L.EditOperation.replace(new I.Range(C.startLineNumber,1,C.endLineNumber,m.getLineMaxColumn(C.endLineNumber)),C.after.join(` -`)):null}}),define(te[301],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSemanticColoringEnabled=e.SEMANTIC_HIGHLIGHTING_SETTING_ID=void 0,e.SEMANTIC_HIGHLIGHTING_SETTING_ID="editor.semanticHighlighting";function L(I,y,D){var S;const m=(S=D.getValue(e.SEMANTIC_HIGHLIGHTING_SETTING_ID,{overrideIdentifier:I.getLanguageId(),resource:I.uri}))===null||S===void 0?void 0:S.enabled;return typeof m=="boolean"?m:y.getColorTheme().semanticHighlighting}e.isSemanticColoringEnabled=L}),define(te[302],ie([1,0,63,12,5]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketSelectionRangeProvider=void 0;class D{provideSelectionRanges(m,_){return be(this,void 0,void 0,function*(){const v=[];for(const C of _){const s=[];v.push(s);const i=new Map;yield new Promise(n=>D._bracketsRightYield(n,0,m,C,i)),yield new Promise(n=>D._bracketsLeftYield(n,0,m,C,i,s))}return v})}static _bracketsRightYield(m,_,v,C,s){const i=new Map,n=Date.now();for(;;){if(_>=D._maxRounds){m();break}if(!C){m();break}const t=v.bracketPairs.findNextBracket(C);if(!t){m();break}if(Date.now()-n>D._maxDuration){setTimeout(()=>D._bracketsRightYield(m,_+1,v,C,s));break}if(t.bracketInfo.isOpeningBracket){const u=t.bracketInfo.bracketText,f=i.has(u)?i.get(u):0;i.set(u,f+1)}else{const u=t.bracketInfo.getOpeningBrackets()[0].bracketText;let f=i.has(u)?i.get(u):0;if(f-=1,i.set(u,Math.max(0,f)),f<0){let d=s.get(u);d||(d=new L.LinkedList,s.set(u,d)),d.push(t.range)}}C=t.range.getEndPosition()}}static _bracketsLeftYield(m,_,v,C,s,i){const n=new Map,t=Date.now();for(;;){if(_>=D._maxRounds&&s.size===0){m();break}if(!C){m();break}const r=v.bracketPairs.findPrevBracket(C);if(!r){m();break}if(Date.now()-t>D._maxDuration){setTimeout(()=>D._bracketsLeftYield(m,_+1,v,C,s,i));break}if(r.bracketInfo.isOpeningBracket){const f=r.bracketInfo.bracketText;let d=n.has(f)?n.get(f):0;if(d-=1,n.set(f,Math.max(0,d)),d<0){const l=s.get(f);if(l){const o=l.shift();l.size===0&&s.delete(f);const c=y.Range.fromPositions(r.range.getEndPosition(),o.getStartPosition()),a=y.Range.fromPositions(r.range.getStartPosition(),o.getEndPosition());i.push({range:c}),i.push({range:a}),D._addBracketLeading(v,a,i)}}}else{const f=r.bracketInfo.getOpeningBrackets()[0].bracketText,d=n.has(f)?n.get(f):0;n.set(f,d+1)}C=r.range.getStartPosition()}}static _addBracketLeading(m,_,v){if(_.startLineNumber===_.endLineNumber)return;const C=_.startLineNumber,s=m.getLineFirstNonWhitespaceColumn(C);s!==0&&s!==_.startColumn&&(v.push({range:y.Range.fromPositions(new I.Position(C,s),_.getEndPosition())}),v.push({range:y.Range.fromPositions(new I.Position(C,1),_.getEndPosition())}));const i=C-1;if(i>0){const n=m.getLineFirstNonWhitespaceColumn(i);n===_.startColumn&&n!==m.getLineLastNonWhitespaceColumn(i)&&(v.push({range:y.Range.fromPositions(new I.Position(i,n),_.getEndPosition())}),v.push({range:y.Range.fromPositions(new I.Position(i,1),_.getEndPosition())}))}}}e.BracketSelectionRangeProvider=D,D._maxDuration=30,D._maxRounds=2}),define(te[550],ie([1,0,10,5]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WordSelectionRangeProvider=void 0;class y{constructor(S=!0){this.selectSubwords=S}provideSelectionRanges(S,m){const _=[];for(const v of m){const C=[];_.push(C),this.selectSubwords&&this._addInWordRanges(C,S,v),this._addWordRanges(C,S,v),this._addWhitespaceLine(C,S,v),C.push({range:S.getFullModelRange()})}return _}_addInWordRanges(S,m,_){const v=m.getWordAtPosition(_);if(!v)return;const{word:C,startColumn:s}=v,i=_.column-s;let n=i,t=i,r=0;for(;n>=0;n--){const u=C.charCodeAt(n);if(n!==i&&(u===95||u===45))break;if((0,L.isLowerAsciiLetter)(u)&&(0,L.isUpperAsciiLetter)(r))break;r=u}for(n+=1;t0&&m.getLineFirstNonWhitespaceColumn(_.lineNumber)===0&&m.getLineLastNonWhitespaceColumn(_.lineNumber)===0&&S.push({range:new I.Range(_.lineNumber,1,_.lineNumber,m.getLineMaxColumn(_.lineNumber))})}}e.WordSelectionRangeProvider=y}),define(te[127],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetParser=e.TextmateSnippet=e.Variable=e.FormatString=e.Transform=e.Choice=e.Placeholder=e.TransformableMarker=e.Text=e.Marker=e.Scanner=void 0;class L{constructor(){this.value="",this.pos=0}static isDigitCharacter(r){return r>=48&&r<=57}static isVariableCharacter(r){return r===95||r>=97&&r<=122||r>=65&&r<=90}text(r){this.value=r,this.pos=0}tokenText(r){return this.value.substr(r.pos,r.len)}next(){if(this.pos>=this.value.length)return{type:14,pos:this.pos,len:0};const r=this.pos;let u=0,f=this.value.charCodeAt(r),d;if(d=L._table[f],typeof d=="number")return this.pos+=1,{type:d,pos:r,len:1};if(L.isDigitCharacter(f)){d=8;do u+=1,f=this.value.charCodeAt(r+u);while(L.isDigitCharacter(f));return this.pos+=u,{type:d,pos:r,len:u}}if(L.isVariableCharacter(f)){d=9;do f=this.value.charCodeAt(r+ ++u);while(L.isVariableCharacter(f)||L.isDigitCharacter(f));return this.pos+=u,{type:d,pos:r,len:u}}d=10;do u+=1,f=this.value.charCodeAt(r+u);while(!isNaN(f)&&typeof L._table[f]>"u"&&!L.isDigitCharacter(f)&&!L.isVariableCharacter(f));return this.pos+=u,{type:d,pos:r,len:u}}}e.Scanner=L,L._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class I{constructor(){this._children=[]}appendChild(r){return r instanceof y&&this._children[this._children.length-1]instanceof y?this._children[this._children.length-1].value+=r.value:(r.parent=this,this._children.push(r)),this}replace(r,u){const{parent:f}=r,d=f.children.indexOf(r),l=f.children.slice(0);l.splice(d,1,...u),f._children=l,function o(c,a){for(const g of c)g.parent=a,o(g.children,g)}(u,f)}get children(){return this._children}get rightMostDescendant(){return this._children.length>0?this._children[this._children.length-1].rightMostDescendant:this}get snippet(){let r=this;for(;;){if(!r)return;if(r instanceof i)return r;r=r.parent}}toString(){return this.children.reduce((r,u)=>r+u.toString(),"")}len(){return 0}}e.Marker=I;class y extends I{constructor(r){super(),this.value=r}toString(){return this.value}len(){return this.value.length}clone(){return new y(this.value)}}e.Text=y;class D extends I{}e.TransformableMarker=D;class S extends D{static compareByIndex(r,u){return r.index===u.index?0:r.isFinalTabstop?1:u.isFinalTabstop||r.indexu.index?1:0}constructor(r){super(),this.index=r}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof m?this._children[0]:void 0}clone(){const r=new S(this.index);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(u=>u.clone()),r}}e.Placeholder=S;class m extends I{constructor(){super(...arguments),this.options=[]}appendChild(r){return r instanceof y&&(r.parent=this,this.options.push(r)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){const r=new m;return this.options.forEach(r.appendChild,r),r}}e.Choice=m;class _ extends I{constructor(){super(...arguments),this.regexp=new RegExp("")}resolve(r){const u=this;let f=!1,d=r.replace(this.regexp,function(){return f=!0,u._replace(Array.prototype.slice.call(arguments,0,-2))});return!f&&this._children.some(l=>l instanceof v&&!!l.elseValue)&&(d=this._replace([])),d}_replace(r){let u="";for(const f of this._children)if(f instanceof v){let d=r[f.index]||"";d=f.resolve(d),u+=d}else u+=f.toString();return u}toString(){return""}clone(){const r=new _;return r.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),r._children=this.children.map(u=>u.clone()),r}}e.Transform=_;class v extends I{constructor(r,u,f,d){super(),this.index=r,this.shorthandName=u,this.ifValue=f,this.elseValue=d}resolve(r){return this.shorthandName==="upcase"?r?r.toLocaleUpperCase():"":this.shorthandName==="downcase"?r?r.toLocaleLowerCase():"":this.shorthandName==="capitalize"?r?r[0].toLocaleUpperCase()+r.substr(1):"":this.shorthandName==="pascalcase"?r?this._toPascalCase(r):"":this.shorthandName==="camelcase"?r?this._toCamelCase(r):"":r&&typeof this.ifValue=="string"?this.ifValue:!r&&typeof this.elseValue=="string"?this.elseValue:r||""}_toPascalCase(r){const u=r.match(/[a-z0-9]+/gi);return u?u.map(f=>f.charAt(0).toUpperCase()+f.substr(1)).join(""):r}_toCamelCase(r){const u=r.match(/[a-z0-9]+/gi);return u?u.map((f,d)=>d===0?f.charAt(0).toLowerCase()+f.substr(1):f.charAt(0).toUpperCase()+f.substr(1)).join(""):r}clone(){return new v(this.index,this.shorthandName,this.ifValue,this.elseValue)}}e.FormatString=v;class C extends D{constructor(r){super(),this.name=r}resolve(r){let u=r.resolve(this);return this.transform&&(u=this.transform.resolve(u||"")),u!==void 0?(this._children=[new y(u)],!0):!1}clone(){const r=new C(this.name);return this.transform&&(r.transform=this.transform.clone()),r._children=this.children.map(u=>u.clone()),r}}e.Variable=C;function s(t,r){const u=[...t];for(;u.length>0;){const f=u.shift();if(!r(f))break;u.unshift(...f.children)}}class i extends I{get placeholderInfo(){if(!this._placeholders){const r=[];let u;this.walk(function(f){return f instanceof S&&(r.push(f),u=!u||u.indexd===r?(f=!0,!1):(u+=d.len(),!0)),f?u:-1}fullLen(r){let u=0;return s([r],f=>(u+=f.len(),!0)),u}enclosingPlaceholders(r){const u=[];let{parent:f}=r;for(;f;)f instanceof S&&u.push(f),f=f.parent;return u}resolveVariables(r){return this.walk(u=>(u instanceof C&&u.resolve(r)&&(this._placeholders=void 0),!0)),this}appendChild(r){return this._placeholders=void 0,super.appendChild(r)}replace(r,u){return this._placeholders=void 0,super.replace(r,u)}clone(){const r=new i;return this._children=this.children.map(u=>u.clone()),r}walk(r){s(this.children,r)}}e.TextmateSnippet=i;class n{constructor(){this._scanner=new L,this._token={type:14,pos:0,len:0}}static escape(r){return r.replace(/\$|}|\\/g,"\\$&")}static guessNeedsClipboard(r){return/\${?CLIPBOARD/.test(r)}parse(r,u,f){const d=new i;return this.parseFragment(r,d),this.ensureFinalTabstop(d,f??!1,u??!1),d}parseFragment(r,u){const f=u.children.length;for(this._scanner.text(r),this._token=this._scanner.next();this._parse(u););const d=new Map,l=[];u.walk(a=>(a instanceof S&&(a.isFinalTabstop?d.set(0,void 0):!d.has(a.index)&&a.children.length>0?d.set(a.index,a.children):l.push(a)),!0));const o=(a,g)=>{const h=d.get(a.index);if(!h)return;const p=new S(a.index);p.transform=a.transform;for(const b of h){const w=b.clone();p.appendChild(w),w instanceof S&&d.has(w.index)&&!g.has(w.index)&&(g.add(w.index),o(w,g),g.delete(w.index))}u.replace(a,[p])},c=new Set;for(const a of l)o(a,c);return u.children.slice(f)}ensureFinalTabstop(r,u,f){(u||f&&r.placeholders.length>0)&&(r.placeholders.find(l=>l.index===0)||r.appendChild(new S(0)))}_accept(r,u){if(r===void 0||this._token.type===r){const f=u?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),f}return!1}_backTo(r){return this._scanner.pos=r.pos+r.len,this._token=r,!1}_until(r){const u=this._token;for(;this._token.type!==r;){if(this._token.type===14)return!1;if(this._token.type===5){const d=this._scanner.next();if(d.type!==0&&d.type!==4&&d.type!==5)return!1}this._token=this._scanner.next()}const f=this._scanner.value.substring(u.pos,this._token.pos).replace(/\\(\$|}|\\)/g,"$1");return this._token=this._scanner.next(),f}_parse(r){return this._parseEscaped(r)||this._parseTabstopOrVariableName(r)||this._parseComplexPlaceholder(r)||this._parseComplexVariable(r)||this._parseAnything(r)}_parseEscaped(r){let u;return(u=this._accept(5,!0))?(u=this._accept(0,!0)||this._accept(4,!0)||this._accept(5,!0)||u,r.appendChild(new y(u)),!0):!1}_parseTabstopOrVariableName(r){let u;const f=this._token;return this._accept(0)&&(u=this._accept(9,!0)||this._accept(8,!0))?(r.appendChild(/^\d+$/.test(u)?new S(Number(u)):new C(u)),!0):this._backTo(f)}_parseComplexPlaceholder(r){let u;const f=this._token;if(!(this._accept(0)&&this._accept(3)&&(u=this._accept(8,!0))))return this._backTo(f);const l=new S(Number(u));if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(l),!0;if(!this._parse(l))return r.appendChild(new y("${"+u+":")),l.children.forEach(r.appendChild,r),!0}else if(l.index>0&&this._accept(7)){const o=new m;for(;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(l.appendChild(o),this._accept(4)))return r.appendChild(l),!0}return this._backTo(f),!1}}else return this._accept(6)?this._parseTransform(l)?(r.appendChild(l),!0):(this._backTo(f),!1):this._accept(4)?(r.appendChild(l),!0):this._backTo(f)}_parseChoiceElement(r){const u=this._token,f=[];for(;!(this._token.type===2||this._token.type===7);){let d;if((d=this._accept(5,!0))?d=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||d:d=this._accept(void 0,!0),!d)return this._backTo(u),!1;f.push(d)}return f.length===0?(this._backTo(u),!1):(r.appendChild(new y(f.join(""))),!0)}_parseComplexVariable(r){let u;const f=this._token;if(!(this._accept(0)&&this._accept(3)&&(u=this._accept(9,!0))))return this._backTo(f);const l=new C(u);if(this._accept(1))for(;;){if(this._accept(4))return r.appendChild(l),!0;if(!this._parse(l))return r.appendChild(new y("${"+u+":")),l.children.forEach(r.appendChild,r),!0}else return this._accept(6)?this._parseTransform(l)?(r.appendChild(l),!0):(this._backTo(f),!1):this._accept(4)?(r.appendChild(l),!0):this._backTo(f)}_parseTransform(r){const u=new _;let f="",d="";for(;!this._accept(6);){let l;if(l=this._accept(5,!0)){l=this._accept(6,!0)||l,f+=l;continue}if(this._token.type!==14){f+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let l;if(l=this._accept(5,!0)){l=this._accept(5,!0)||this._accept(6,!0)||l,u.appendChild(new y(l));continue}if(!(this._parseFormatString(u)||this._parseAnything(u)))return!1}for(;!this._accept(4);){if(this._token.type!==14){d+=this._accept(void 0,!0);continue}return!1}try{u.regexp=new RegExp(f,d)}catch{return!1}return r.transform=u,!0}_parseFormatString(r){const u=this._token;if(!this._accept(0))return!1;let f=!1;this._accept(3)&&(f=!0);const d=this._accept(8,!0);if(d)if(f){if(this._accept(4))return r.appendChild(new v(Number(d))),!0;if(!this._accept(1))return this._backTo(u),!1}else return r.appendChild(new v(Number(d))),!0;else return this._backTo(u),!1;if(this._accept(6)){const l=this._accept(9,!0);return!l||!this._accept(4)?(this._backTo(u),!1):(r.appendChild(new v(Number(d),l)),!0)}else if(this._accept(11)){const l=this._until(4);if(l)return r.appendChild(new v(Number(d),void 0,l,void 0)),!0}else if(this._accept(12)){const l=this._until(4);if(l)return r.appendChild(new v(Number(d),void 0,void 0,l)),!0}else if(this._accept(13)){const l=this._until(1);if(l){const o=this._until(4);if(o)return r.appendChild(new v(Number(d),void 0,l,o)),!0}}else{const l=this._until(4);if(l)return r.appendChild(new v(Number(d),void 0,void 0,l)),!0}return this._backTo(u),!1}_parseAnything(r){return this._token.type!==14?(r.appendChild(new y(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}e.SnippetParser=n}),define(te[303],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModel=e.StickyElement=e.StickyRange=void 0;class L{constructor(S,m){this.startLineNumber=S,this.endLineNumber=m}}e.StickyRange=L;class I{constructor(S,m,_){this.range=S,this.children=m,this.parent=_}}e.StickyElement=I;class y{constructor(S,m,_,v){this.uri=S,this.version=m,this.element=_,this.outlineProviderId=v}}e.StickyModel=y}),define(te[304],ie([1,0,13,69,10]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompletionModel=e.LineContext=void 0;class D{constructor(_,v){this.leadingLineContent=_,this.characterCountDelta=v}}e.LineContext=D;class S{constructor(_,v,C,s,i,n,t=I.FuzzyScoreOptions.default,r=void 0){this.clipboardText=r,this._snippetCompareFn=S._compareCompletionItems,this._items=_,this._column=v,this._wordDistance=s,this._options=i,this._refilterKind=1,this._lineContext=C,this._fuzzyScoreOptions=t,n==="top"?this._snippetCompareFn=S._compareCompletionItemsSnippetsUp:n==="bottom"&&(this._snippetCompareFn=S._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(_){(this._lineContext.leadingLineContent!==_.leadingLineContent||this._lineContext.characterCountDelta!==_.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<_.characterCountDelta&&this._filteredItems?2:1,this._lineContext=_)}get items(){return this._ensureCachedState(),this._filteredItems}getItemsByProvider(){return this._ensureCachedState(),this._itemsByProvider}getIncompleteProvider(){this._ensureCachedState();const _=new Set;for(const[v,C]of this.getItemsByProvider())C.length>0&&C[0].container.incomplete&&_.add(v);return _}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._itemsByProvider=new Map;const _=[],{leadingLineContent:v,characterCountDelta:C}=this._lineContext;let s="",i="";const n=this._refilterKind===1?this._items:this._filteredItems,t=[],r=!this._options.filterGraceful||n.length>2e3?I.fuzzyScore:I.fuzzyScoreGracefulAggressive;for(let u=0;u=o)f.score=I.FuzzyScore.Default;else if(typeof f.completion.filterText=="string"){const a=r(s,i,c,f.completion.filterText,f.filterTextLow,0,this._fuzzyScoreOptions);if(!a)continue;(0,y.compareIgnoreCase)(f.completion.filterText,f.textLabel)===0?f.score=a:(f.score=(0,I.anyScore)(s,i,c,f.textLabel,f.labelLow,0),f.score[0]=a[0])}else{const a=r(s,i,c,f.textLabel,f.labelLow,0,this._fuzzyScoreOptions);if(!a)continue;f.score=a}}f.idx=u,f.distance=this._wordDistance.distance(f.position,f.completion),t.push(f),_.push(f.textLabel.length)}this._filteredItems=t.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:_.length?(0,L.quickSelect)(_.length-.85,_,(u,f)=>u-f):0}}static _compareCompletionItems(_,v){return _.score[0]>v.score[0]?-1:_.score[0]v.distance?1:_.idxv.idx?1:0}static _compareCompletionItemsSnippetsDown(_,v){if(_.completion.kind!==v.completion.kind){if(_.completion.kind===27)return 1;if(v.completion.kind===27)return-1}return S._compareCompletionItems(_,v)}static _compareCompletionItemsSnippetsUp(_,v){if(_.completion.kind!==v.completion.kind){if(_.completion.kind===27)return-1;if(v.completion.kind===27)return 1}return S._compareCompletionItems(_,v)}}e.CompletionModel=S}),define(te[551],ie([1,0,13,2,121]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommitCharacterController=void 0;class D{constructor(m,_,v,C){this._disposables=new I.DisposableStore,this._disposables.add(v.onDidSuggest(s=>{s.completionModel.items.length===0&&this.reset()})),this._disposables.add(v.onDidCancel(s=>{this.reset()})),this._disposables.add(_.onDidShow(()=>this._onItem(_.getFocusedItem()))),this._disposables.add(_.onDidFocus(this._onItem,this)),this._disposables.add(_.onDidHide(this.reset,this)),this._disposables.add(m.onWillType(s=>{if(this._active&&!_.isFrozen()&&v.state!==0){const i=s.charCodeAt(s.length-1);this._active.acceptCharacters.has(i)&&m.getOption(0)&&C(this._active.item)}}))}_onItem(m){if(!m||!(0,L.isNonEmptyArray)(m.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===m.item)return;const _=new y.CharacterSet;for(const v of m.item.completion.commitCharacters)v.length>0&&_.add(v.charCodeAt(0));this._active={acceptCharacters:_,item:m}}reset(){this._active=void 0}dispose(){this._disposables.dispose()}}e.CommitCharacterController=D}),define(te[552],ie([1,0,2]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OvertypingCapturer=void 0;class I{constructor(D,S){this._disposables=new L.DisposableStore,this._lastOvertyped=[],this._locked=!1,this._disposables.add(D.onWillType(()=>{if(this._locked||!D.hasModel())return;const m=D.getSelections(),_=m.length;let v=!1;for(let s=0;s<_;s++)if(!m[s].isEmpty()){v=!0;break}if(!v){this._lastOvertyped.length!==0&&(this._lastOvertyped.length=0);return}this._lastOvertyped=[];const C=D.getModel();for(let s=0;s<_;s++){const i=m[s];if(C.getValueLengthInRange(i)>I._maxSelectionLength)return;this._lastOvertyped[s]={value:C.getValueInRange(i),multiline:i.startLineNumber!==i.endLineNumber}}})),this._disposables.add(S.onDidTrigger(m=>{this._locked=!0})),this._disposables.add(S.onDidCancel(m=>{this._locked=!1}))}getLastOvertypedInfo(D){if(D>=0&&D=0?f[d]:f[Math.max(0,~d-1)];let o=s.length;for(const c of s){if(!I.Range.containsRange(c.range,l))break;o-=1}return o}}})}}e.WordDistance=D,D.None=new class extends D{distance(){return 0}}}),define(te[306],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stateExists=e.findRules=e.substituteMatches=e.createError=e.log=e.sanitize=e.fixCase=e.empty=e.isIAction=e.isString=e.isFuzzyAction=e.isFuzzyActionArr=void 0;function L(t){return Array.isArray(t)}e.isFuzzyActionArr=L;function I(t){return!L(t)}e.isFuzzyAction=I;function y(t){return typeof t=="string"}e.isString=y;function D(t){return!y(t)}e.isIAction=D;function S(t){return!t}e.empty=S;function m(t,r){return t.ignoreCase&&r?r.toLowerCase():r}e.fixCase=m;function _(t){return t.replace(/[&<>'"_]/g,"-")}e.sanitize=_;function v(t,r){console.log(`${t.languageId}: ${r}`)}e.log=v;function C(t,r){return new Error(`${t.languageId}: ${r}`)}e.createError=C;function s(t,r,u,f,d){const l=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let o=null;return r.replace(l,function(c,a,g,h,p,b,w,E,k){return S(g)?S(h)?!S(p)&&p0;){const f=t.tokenizer[u];if(f)return f;const d=u.lastIndexOf(".");d<0?u=null:u=u.substr(0,d)}return null}e.findRules=i;function n(t,r){let u=r;for(;u&&u.length>0;){if(t.stateNames[u])return!0;const d=u.lastIndexOf(".");d<0?u=null:u=u.substr(0,d)}return!1}e.stateExists=n}),define(te[553],ie([1,0,306]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compile=void 0;function I(t,r){if(!r||!Array.isArray(r))return!1;for(const u of r)if(!t(u))return!1;return!0}function y(t,r){return typeof t=="boolean"?t:r}function D(t,r){return typeof t=="string"?t:r}function S(t){const r={};for(const u of t)r[u]=!0;return r}function m(t,r=!1){r&&(t=t.map(function(f){return f.toLowerCase()}));const u=S(t);return r?function(f){return u[f.toLowerCase()]!==void 0&&u.hasOwnProperty(f.toLowerCase())}:function(f){return u[f]!==void 0&&u.hasOwnProperty(f)}}function _(t,r){r=r.replace(/@@/g,"");let u=0,f;do f=!1,r=r.replace(/@(\w+)/g,function(l,o){f=!0;let c="";if(typeof t[o]=="string")c=t[o];else if(t[o]&&t[o]instanceof RegExp)c=t[o].source;else throw t[o]===void 0?L.createError(t,"language definition does not contain attribute '"+o+"', used at: "+r):L.createError(t,"attribute reference '"+o+"' must be a string, used at: "+r);return L.empty(c)?"":"(?:"+c+")"}),u++;while(f&&u<5);r=r.replace(/\x01/g,"@");const d=(t.ignoreCase?"i":"")+(t.unicode?"u":"");return new RegExp(r,d)}function v(t,r,u,f){if(f<0)return t;if(f=100){f=f-100;const d=u.split(".");if(d.unshift(u),f=0&&(f.tokenSubst=!0),typeof u.bracket=="string")if(u.bracket==="@open")f.bracket=1;else if(u.bracket==="@close")f.bracket=-1;else throw L.createError(t,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+r);if(u.next){if(typeof u.next!="string")throw L.createError(t,"the next state must be a string value in rule: "+r);{let d=u.next;if(!/^(@pop|@push|@popall)$/.test(d)&&(d[0]==="@"&&(d=d.substr(1)),d.indexOf("$")<0&&!L.stateExists(t,L.substituteMatches(t,d,"",[],""))))throw L.createError(t,"the next state '"+u.next+"' is not defined in rule: "+r);f.next=d}}return typeof u.goBack=="number"&&(f.goBack=u.goBack),typeof u.switchTo=="string"&&(f.switchTo=u.switchTo),typeof u.log=="string"&&(f.log=u.log),typeof u.nextEmbedded=="string"&&(f.nextEmbedded=u.nextEmbedded,t.usesEmbedded=!0),f}}else if(Array.isArray(u)){const f=[];for(let d=0,l=u.length;d0&&f[0]==="^",this.name=this.name+": "+f,this.regex=_(r,"^(?:"+(this.matchOnlyAtLineStart?f.substr(1):f)+")")}setAction(r,u){this.action=s(r,this.name,u)}}function n(t,r){if(!r||typeof r!="object")throw new Error("Monarch: expecting a language definition object");const u={};u.languageId=t,u.includeLF=y(r.includeLF,!1),u.noThrow=!1,u.maxStack=100,u.start=typeof r.start=="string"?r.start:null,u.ignoreCase=y(r.ignoreCase,!1),u.unicode=y(r.unicode,!1),u.tokenPostfix=D(r.tokenPostfix,"."+u.languageId),u.defaultToken=D(r.defaultToken,"source"),u.usesEmbedded=!1;const f=r;f.languageId=t,f.includeLF=u.includeLF,f.ignoreCase=u.ignoreCase,f.unicode=u.unicode,f.noThrow=u.noThrow,f.usesEmbedded=u.usesEmbedded,f.stateNames=r.tokenizer,f.defaultToken=u.defaultToken;function d(o,c,a){for(const g of a){let h=g.include;if(h){if(typeof h!="string")throw L.createError(u,"an 'include' attribute must be a string at: "+o);if(h[0]==="@"&&(h=h.substr(1)),!r.tokenizer[h])throw L.createError(u,"include target '"+h+"' is not defined at: "+o);d(o+"."+h,c,r.tokenizer[h])}else{const p=new i(o);if(Array.isArray(g)&&g.length>=1&&g.length<=3)if(p.setRegex(f,g[0]),g.length>=3)if(typeof g[1]=="string")p.setAction(f,{token:g[1],next:g[2]});else if(typeof g[1]=="object"){const b=g[1];b.next=g[2],p.setAction(f,b)}else throw L.createError(u,"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: "+o);else p.setAction(f,g[1]);else{if(!g.regex)throw L.createError(u,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+o);g.name&&typeof g.name=="string"&&(p.name=g.name),g.matchOnlyAtStart&&(p.matchOnlyAtLineStart=y(g.matchOnlyAtLineStart,!1)),p.setRegex(f,g.regex),p.setAction(f,g.action)}c.push(p)}}}if(!r.tokenizer||typeof r.tokenizer!="object")throw L.createError(u,"a language definition must define the 'tokenizer' attribute as an object");u.tokenizer=[];for(const o in r.tokenizer)if(r.tokenizer.hasOwnProperty(o)){u.start||(u.start=o);const c=r.tokenizer[o];u.tokenizer[o]=new Array,d("tokenizer."+o,u.tokenizer[o],c)}if(u.usesEmbedded=f.usesEmbedded,r.brackets){if(!Array.isArray(r.brackets))throw L.createError(u,"the 'brackets' attribute must be defined as an array")}else r.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];const l=[];for(const o of r.brackets){let c=o;if(c&&Array.isArray(c)&&c.length===3&&(c={token:c[2],open:c[0],close:c[1]}),c.open===c.close)throw L.createError(u,"open and close brackets in a 'brackets' attribute must be different: "+c.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof c.open=="string"&&typeof c.token=="string"&&typeof c.close=="string")l.push({token:c.token+u.tokenPostfix,open:L.fixCase(u,c.open),close:L.fixCase(u,c.close)});else throw L.createError(u,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return u.brackets=l,u.noThrow=!0,u}e.compile=n}),define(te[554],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/actionbar/actionViewItems",e)}),define(te[555],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/findinput/findInput",e)}),define(te[556],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/findinput/findInputToggles",e)}),define(te[557],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/findinput/replaceInput",e)}),define(te[558],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/hover/hoverWidget",e)}),define(te[559],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/iconLabel/iconLabelHover",e)}),define(te[560],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/inputbox/inputBox",e)}),define(te[561],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/keybindingLabel/keybindingLabel",e)}),define(te[562],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/selectBox/selectBoxCustom",e)}),define(te[563],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/toolbar/toolbar",e)}),define(te[564],ie([3,4]),function($,e){return $.create("vs/base/browser/ui/tree/abstractTree",e)}),define(te[565],ie([3,4]),function($,e){return $.create("vs/base/common/actions",e)}),define(te[41],ie([1,0,6,2,565]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toAction=e.EmptySubmenuAction=e.SubmenuAction=e.Separator=e.ActionRunner=e.Action=void 0;class D extends I.Disposable{constructor(i,n="",t="",r=!0,u){super(),this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=i,this._label=n,this._cssClass=t,this._enabled=r,this._actionCallback=u}get id(){return this._id}get label(){return this._label}set label(i){this._setLabel(i)}_setLabel(i){this._label!==i&&(this._label=i,this._onDidChange.fire({label:i}))}get tooltip(){return this._tooltip||""}set tooltip(i){this._setTooltip(i)}_setTooltip(i){this._tooltip!==i&&(this._tooltip=i,this._onDidChange.fire({tooltip:i}))}get class(){return this._cssClass}set class(i){this._setClass(i)}_setClass(i){this._cssClass!==i&&(this._cssClass=i,this._onDidChange.fire({class:i}))}get enabled(){return this._enabled}set enabled(i){this._setEnabled(i)}_setEnabled(i){this._enabled!==i&&(this._enabled=i,this._onDidChange.fire({enabled:i}))}get checked(){return this._checked}set checked(i){this._setChecked(i)}_setChecked(i){this._checked!==i&&(this._checked=i,this._onDidChange.fire({checked:i}))}run(i,n){return be(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(i))})}}e.Action=D;class S extends I.Disposable{constructor(){super(...arguments),this._onWillRun=this._register(new L.Emitter),this.onWillRun=this._onWillRun.event,this._onDidRun=this._register(new L.Emitter),this.onDidRun=this._onDidRun.event}run(i,n){return be(this,void 0,void 0,function*(){if(!i.enabled)return;this._onWillRun.fire({action:i});let t;try{yield this.runAction(i,n)}catch(r){t=r}this._onDidRun.fire({action:i,error:t})})}runAction(i,n){return be(this,void 0,void 0,function*(){yield i.run(n)})}}e.ActionRunner=S;class m{constructor(){this.id=m.ID,this.label="",this.tooltip="",this.class="separator",this.enabled=!1,this.checked=!1}static join(...i){let n=[];for(const t of i)t.length&&(n.length?n=[...n,new m,...t]:n=t);return n}run(){return be(this,void 0,void 0,function*(){})}}e.Separator=m,m.ID="vs.actions.separator";class _{get actions(){return this._actions}constructor(i,n,t,r){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=i,this.label=n,this.class=r,this._actions=t}run(){return be(this,void 0,void 0,function*(){})}}e.SubmenuAction=_;class v extends D{constructor(){super(v.ID,y.localize(0,null),void 0,!1)}}e.EmptySubmenuAction=v,v.ID="vs.actions.empty";function C(s){var i,n;return{id:s.id,label:s.label,class:void 0,enabled:(i=s.enabled)!==null&&i!==void 0?i:!0,checked:(n=s.checked)!==null&&n!==void 0?n:!1,run:(...t)=>be(this,void 0,void 0,function*(){return s.run(...t)}),tooltip:s.label}}e.toAction=C}),define(te[566],ie([3,4]),function($,e){return $.create("vs/base/common/errorMessage",e)}),define(te[567],ie([1,0,13,20,566]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toErrorMessage=void 0;function D(v,C){return C&&(v.stack||v.stacktrace)?y.localize(0,null,m(v),S(v.stack)||S(v.stacktrace)):m(v)}function S(v){return Array.isArray(v)?v.join(` -`):v}function m(v){return v.code==="ERR_UNC_HOST_NOT_ALLOWED"?`${v.message}. Please update the 'security.allowedUNCHosts' setting if you want to allow this host.`:typeof v.code=="string"&&typeof v.errno=="number"&&typeof v.syscall=="string"?y.localize(1,null,v.message):v.message||y.localize(2,null)}function _(v=null,C=!1){if(!v)return y.localize(3,null);if(Array.isArray(v)){const s=L.coalesce(v),i=_(s[0],C);return s.length>1?y.localize(4,null,i,s.length):i}if(I.isString(v))return v;if(v.detail){const s=v.detail;if(s.error)return D(s.error,C);if(s.exception)return D(s.exception,C)}return v.stack?D(v,C):v.message?v.message:y.localize(5,null)}e.toErrorMessage=_}),define(te[568],ie([3,4]),function($,e){return $.create("vs/base/common/keybindingLabels",e)}),define(te[216],ie([1,0,568]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UserSettingsLabelProvider=e.ElectronAcceleratorLabelProvider=e.AriaLabelProvider=e.UILabelProvider=e.ModifierLabelProvider=void 0;class I{constructor(S,m,_=m){this.modifierLabels=[null],this.modifierLabels[2]=S,this.modifierLabels[1]=m,this.modifierLabels[3]=_}toLabel(S,m,_){if(m.length===0)return null;const v=[];for(let C=0,s=m.length;C=0,D=d.indexOf("Macintosh")>=0,s=(d.indexOf("Macintosh")>=0||d.indexOf("iPad")>=0||d.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,S=d.indexOf("Linux")>=0,n=d?.indexOf("Mobi")>=0,v=!0,t=L.getConfiguredDefaultLocale(L.localize(0,null))||e.LANGUAGE_DEFAULT,r=t,u=navigator.language;else if(typeof l=="object"){y=l.platform==="win32",D=l.platform==="darwin",S=l.platform==="linux",m=S&&!!l.env.SNAP&&!!l.env.SNAP_REVISION,C=o,i=!!l.env.CI||!!l.env.BUILD_ARTIFACTSTAGINGDIRECTORY,t=e.LANGUAGE_DEFAULT,r=e.LANGUAGE_DEFAULT;const b=l.env.VSCODE_NLS_CONFIG;if(b)try{const w=JSON.parse(b),E=w.availableLanguages["*"];t=w.locale,u=w.osLocale,r=E||e.LANGUAGE_DEFAULT,f=w._translationsConfigFile}catch{}_=!0}else console.error("Unable to resolve platform.");let a=0;D?a=1:y?a=3:S&&(a=2),e.isWindows=y,e.isMacintosh=D,e.isLinux=S,e.isNative=_,e.isWeb=v,e.isWebWorker=v&&typeof e.globals.importScripts=="function",e.isIOS=s,e.isMobile=n,e.userAgent=d,e.language=r,e.setTimeout0IsFaster=typeof e.globals.postMessage=="function"&&!e.globals.importScripts,e.setTimeout0=(()=>{if(e.setTimeout0IsFaster){const b=[];e.globals.addEventListener("message",E=>{if(E.data&&E.data.vscodeScheduleAsyncWork)for(let k=0,M=b.length;k{const k=++w;b.push({id:k,callback:E}),e.globals.postMessage({vscodeScheduleAsyncWork:k},"*")}}return b=>setTimeout(b)})(),e.OS=D||s?2:y?1:3;let g=!0,h=!1;function p(){if(!h){h=!0;const b=new Uint8Array(2);b[0]=1,b[1]=2,g=new Uint16Array(b.buffer)[0]===(2<<8)+1}return g}e.isLittleEndian=p,e.isChrome=!!(e.userAgent&&e.userAgent.indexOf("Chrome")>=0),e.isFirefox=!!(e.userAgent&&e.userAgent.indexOf("Firefox")>=0),e.isSafari=!!(!e.isChrome&&e.userAgent&&e.userAgent.indexOf("Safari")>=0),e.isEdge=!!(e.userAgent&&e.userAgent.indexOf("Edg/")>=0),e.isAndroid=!!(e.userAgent&&e.userAgent.indexOf("Android")>=0)}),define(te[217],ie([1,0,51,17]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserFeatures=void 0,e.BrowserFeatures={clipboard:{writeText:I.isNative||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:I.isNative||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>I.isNative||L.isStandalone()?0:navigator.keyboard||L.isSafari?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}}),define(te[44],ie([1,0,51,62,118,17]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardKeyboardEvent=void 0;function S(i){if(i.charCode){const t=String.fromCharCode(i.charCode).toUpperCase();return I.KeyCodeUtils.fromString(t)}const n=i.keyCode;if(n===3)return 7;if(L.isFirefox)switch(n){case 59:return 85;case 60:if(D.isLinux)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(D.isMacintosh)return 57;break}else if(L.isWebKit){if(D.isMacintosh&&n===93)return 57;if(!D.isMacintosh&&n===92)return 57}return I.EVENT_KEY_CODE_MAP[n]||0}const m=D.isMacintosh?256:2048,_=512,v=1024,C=D.isMacintosh?2048:256;class s{constructor(n){this._standardKeyboardEventBrand=!0;const t=n;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=t.getModifierState("AltGraph"),this.keyCode=S(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(n){return this._asKeybinding===n}_computeKeybinding(){let n=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(n=this.keyCode);let t=0;return this.ctrlKey&&(t|=m),this.altKey&&(t|=_),this.shiftKey&&(t|=v),this.metaKey&&(t|=C),t|=n,t}_computeKeyCodeChord(){let n=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(n=this.keyCode),new y.KeyCodeChord(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,n)}}e.StandardKeyboardEvent=s}),define(te[60],ie([1,0,51,384,17]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandardWheelEvent=e.StandardMouseEvent=void 0;class D{constructor(_){this.timestamp=Date.now(),this.browserEvent=_,this.leftButton=_.button===0,this.middleButton=_.button===1,this.rightButton=_.button===2,this.buttons=_.buttons,this.target=_.target,this.detail=_.detail||1,_.type==="dblclick"&&(this.detail=2),this.ctrlKey=_.ctrlKey,this.shiftKey=_.shiftKey,this.altKey=_.altKey,this.metaKey=_.metaKey,typeof _.pageX=="number"?(this.posx=_.pageX,this.posy=_.pageY):(this.posx=_.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=_.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);const v=I.IframeUtils.getPositionOfChildWindowRelativeToAncestorWindow(window,_.view);this.posx-=v.left,this.posy-=v.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}e.StandardMouseEvent=D;class S{constructor(_,v=0,C=0){if(this.browserEvent=_||null,this.target=_?_.target||_.targetNode||_.srcElement:null,this.deltaY=C,this.deltaX=v,_){const s=_,i=_;if(typeof s.wheelDeltaY<"u")this.deltaY=s.wheelDeltaY/120;else if(typeof i.VERTICAL_AXIS<"u"&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if(_.type==="wheel"){const n=_;n.deltaMode===n.DOM_DELTA_LINE?L.isFirefox&&!y.isMacintosh?this.deltaY=-_.deltaY/3:this.deltaY=-_.deltaY:this.deltaY=-_.deltaY/40}if(typeof s.wheelDeltaX<"u")L.isSafari&&y.isWindows?this.deltaX=-(s.wheelDeltaX/120):this.deltaX=s.wheelDeltaX/120;else if(typeof i.HORIZONTAL_AXIS<"u"&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-_.detail/3;else if(_.type==="wheel"){const n=_;n.deltaMode===n.DOM_DELTA_LINE?L.isFirefox&&!y.isMacintosh?this.deltaX=-_.deltaX/3:this.deltaX=-_.deltaX:this.deltaX=-_.deltaX/40}this.deltaY===0&&this.deltaX===0&&_.wheelDelta&&(this.deltaY=_.wheelDelta/120)}}preventDefault(){var _;(_=this.browserEvent)===null||_===void 0||_.preventDefault()}stopPropagation(){var _;(_=this.browserEvent)===null||_===void 0||_.stopPropagation()}}e.StandardWheelEvent=S});var yt=this&&this.__asyncValues||function($){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=$[Symbol.asyncIterator],L;return e?e.call($):($=typeof __values=="function"?__values($):$[Symbol.iterator](),L={},I("next"),I("throw"),I("return"),L[Symbol.asyncIterator]=function(){return this},L);function I(D){L[D]=$[D]&&function(S){return new Promise(function(m,_){S=$[D](S),y(m,_,S.done,S.value)})}}function y(D,S,m,_){Promise.resolve(_).then(function(v){D({value:v,done:m})},S)}};define(te[14],ie([1,0,19,9,6,2,17,263]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createCancelableAsyncIterable=e.CancelableAsyncIterableObject=e.AsyncIterableObject=e.Promises=e.DeferredPromise=e.IdleValue=e.runWhenIdle=e.RunOnceScheduler=e.IntervalTimer=e.TimeoutTimer=e.first=e.disposableTimeout=e.timeout=e.ThrottledDelayer=e.Delayer=e.Throttler=e.raceCancellation=e.createCancelablePromise=e.isThenable=void 0;function _(E){return!!E&&typeof E.then=="function"}e.isThenable=_;function v(E){const k=new L.CancellationTokenSource,M=E(k.token),R=new Promise((B,T)=>{const N=k.token.onCancellationRequested(()=>{N.dispose(),k.dispose(),T(new I.CancellationError)});Promise.resolve(M).then(A=>{N.dispose(),k.dispose(),B(A)},A=>{N.dispose(),k.dispose(),T(A)})});return new class{cancel(){k.cancel()}then(B,T){return R.then(B,T)}catch(B){return this.then(void 0,B)}finally(B){return R.finally(B)}}}e.createCancelablePromise=v;function C(E,k,M){return new Promise((R,B)=>{const T=k.onCancellationRequested(()=>{T.dispose(),R(M)});E.then(R,B).finally(()=>T.dispose())})}e.raceCancellation=C;class s{constructor(){this.isDisposed=!1,this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(k){if(this.isDisposed)return Promise.reject(new Error("Throttler is disposed"));if(this.activePromise){if(this.queuedPromiseFactory=k,!this.queuedPromise){const M=()=>{if(this.queuedPromise=null,this.isDisposed)return;const R=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,R};this.queuedPromise=new Promise(R=>{this.activePromise.then(M,M).then(R)})}return new Promise((M,R)=>{this.queuedPromise.then(M,R)})}return this.activePromise=k(),new Promise((M,R)=>{this.activePromise.then(B=>{this.activePromise=null,M(B)},B=>{this.activePromise=null,R(B)})})}dispose(){this.isDisposed=!0}}e.Throttler=s;const i=(E,k)=>{let M=!0;const R=setTimeout(()=>{M=!1,k()},E);return{isTriggered:()=>M,dispose:()=>{clearTimeout(R),M=!1}}},n=E=>{let k=!0;return queueMicrotask(()=>{k&&(k=!1,E())}),{isTriggered:()=>k,dispose:()=>{k=!1}}};class t{constructor(k){this.defaultDelay=k,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(k,M=this.defaultDelay){this.task=k,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((B,T)=>{this.doResolve=B,this.doReject=T}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const B=this.task;return this.task=null,B()}}));const R=()=>{var B;this.deferred=null,(B=this.doResolve)===null||B===void 0||B.call(this,null)};return this.deferred=M===m.MicrotaskDelay?n(R):i(M,R),this.completionPromise}isTriggered(){var k;return!!(!((k=this.deferred)===null||k===void 0)&&k.isTriggered())}cancel(){var k;this.cancelTimeout(),this.completionPromise&&((k=this.doReject)===null||k===void 0||k.call(this,new I.CancellationError),this.completionPromise=null)}cancelTimeout(){var k;(k=this.deferred)===null||k===void 0||k.dispose(),this.deferred=null}dispose(){this.cancel()}}e.Delayer=t;class r{constructor(k){this.delayer=new t(k),this.throttler=new s}trigger(k,M){return this.delayer.trigger(()=>this.throttler.queue(k),M)}cancel(){this.delayer.cancel()}dispose(){this.delayer.dispose(),this.throttler.dispose()}}e.ThrottledDelayer=r;function u(E,k){return k?new Promise((M,R)=>{const B=setTimeout(()=>{T.dispose(),M()},E),T=k.onCancellationRequested(()=>{clearTimeout(B),T.dispose(),R(new I.CancellationError)})}):v(M=>u(E,M))}e.timeout=u;function f(E,k=0,M){const R=setTimeout(()=>{E(),M&&B.dispose()},k),B=(0,D.toDisposable)(()=>{clearTimeout(R),M?.deleteAndLeak(B)});return M?.add(B),B}e.disposableTimeout=f;function d(E,k=R=>!!R,M=null){let R=0;const B=E.length,T=()=>{if(R>=B)return Promise.resolve(M);const N=E[R++];return Promise.resolve(N()).then(P=>k(P)?Promise.resolve(P):T())};return T()}e.first=d;class l{constructor(k,M){this._token=-1,typeof k=="function"&&typeof M=="number"&&this.setIfNotSet(k,M)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(k,M){this.cancel(),this._token=setTimeout(()=>{this._token=-1,k()},M)}setIfNotSet(k,M){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,k()},M))}}e.TimeoutTimer=l;class o{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(k,M){this.cancel(),this._token=setInterval(()=>{k()},M)}}e.IntervalTimer=o;class c{constructor(k,M){this.timeoutToken=-1,this.runner=k,this.timeout=M,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(k=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,k)}get delay(){return this.timeout}set delay(k){this.timeout=k}isScheduled(){return this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){var k;(k=this.runner)===null||k===void 0||k.call(this)}}e.RunOnceScheduler=c,function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?e.runWhenIdle=E=>{(0,S.setTimeout0)(()=>{if(k)return;const M=Date.now()+15;E(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,M-Date.now())}}))});let k=!1;return{dispose(){k||(k=!0)}}}:e.runWhenIdle=(E,k)=>{const M=requestIdleCallback(E,typeof k=="number"?{timeout:k}:void 0);let R=!1;return{dispose(){R||(R=!0,cancelIdleCallback(M))}}}}();class a{constructor(k){this._didRun=!1,this._executor=()=>{try{this._value=k()}catch(M){this._error=M}finally{this._didRun=!0}},this._handle=(0,e.runWhenIdle)(()=>this._executor())}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}e.IdleValue=a;class g{get isRejected(){var k;return((k=this.outcome)===null||k===void 0?void 0:k.outcome)===1}get isSettled(){return!!this.outcome}constructor(){this.p=new Promise((k,M)=>{this.completeCallback=k,this.errorCallback=M})}complete(k){return new Promise(M=>{this.completeCallback(k),this.outcome={outcome:0,value:k},M()})}error(k){return new Promise(M=>{this.errorCallback(k),this.outcome={outcome:1,value:k},M()})}cancel(){return this.error(new I.CancellationError)}}e.DeferredPromise=g;var h;(function(E){function k(R){return be(this,void 0,void 0,function*(){let B;const T=yield Promise.all(R.map(N=>N.then(A=>A,A=>{B||(B=A)})));if(typeof B<"u")throw B;return T})}E.settled=k;function M(R){return new Promise((B,T)=>be(this,void 0,void 0,function*(){try{yield R(B,T)}catch(N){T(N)}}))}E.withAsyncBody=M})(h||(e.Promises=h={}));class p{static fromArray(k){return new p(M=>{M.emitMany(k)})}static fromPromise(k){return new p(M=>be(this,void 0,void 0,function*(){M.emitMany(yield k)}))}static fromPromises(k){return new p(M=>be(this,void 0,void 0,function*(){yield Promise.all(k.map(R=>be(this,void 0,void 0,function*(){return M.emitOne(yield R)})))}))}static merge(k){return new p(M=>be(this,void 0,void 0,function*(){yield Promise.all(k.map(R=>{var B,T,N;return be(this,void 0,void 0,function*(){var A,P,O,x;try{for(B=!0,T=yt(R);N=yield T.next(),A=N.done,!A;B=!0){x=N.value,B=!1;const W=x;M.emitOne(W)}}catch(W){P={error:W}}finally{try{!B&&!A&&(O=T.return)&&(yield O.call(T))}finally{if(P)throw P.error}}})}))}))}constructor(k){this._state=0,this._results=[],this._error=null,this._onStateChanged=new y.Emitter,queueMicrotask(()=>be(this,void 0,void 0,function*(){const M={emitOne:R=>this.emitOne(R),emitMany:R=>this.emitMany(R),reject:R=>this.reject(R)};try{yield Promise.resolve(k(M)),this.resolve()}catch(R){this.reject(R)}finally{M.emitOne=void 0,M.emitMany=void 0,M.reject=void 0}}))}[Symbol.asyncIterator](){let k=0;return{next:()=>be(this,void 0,void 0,function*(){do{if(this._state===2)throw this._error;if(kbe(this,void 0,void 0,function*(){var B,T,N,A;try{for(var P=!0,O=yt(k),x;x=yield O.next(),B=x.done,!B;P=!0){A=x.value,P=!1;const W=A;R.emitOne(M(W))}}catch(W){T={error:W}}finally{try{!P&&!B&&(N=O.return)&&(yield N.call(O))}finally{if(T)throw T.error}}}))}map(k){return p.map(this,k)}static filter(k,M){return new p(R=>be(this,void 0,void 0,function*(){var B,T,N,A;try{for(var P=!0,O=yt(k),x;x=yield O.next(),B=x.done,!B;P=!0){A=x.value,P=!1;const W=A;M(W)&&R.emitOne(W)}}catch(W){T={error:W}}finally{try{!P&&!B&&(N=O.return)&&(yield N.call(O))}finally{if(T)throw T.error}}}))}filter(k){return p.filter(this,k)}static coalesce(k){return p.filter(k,M=>!!M)}coalesce(){return p.coalesce(this)}static toPromise(k){var M,R,B,T,N,A,P;return be(this,void 0,void 0,function*(){const O=[];try{for(M=!0,R=yt(k);B=yield R.next(),T=B.done,!T;M=!0){P=B.value,M=!1;const x=P;O.push(x)}}catch(x){N={error:x}}finally{try{!M&&!T&&(A=R.return)&&(yield A.call(R))}finally{if(N)throw N.error}}return O})}toPromise(){return p.toPromise(this)}emitOne(k){this._state===0&&(this._results.push(k),this._onStateChanged.fire())}emitMany(k){this._state===0&&(this._results=this._results.concat(k),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(k){this._state===0&&(this._state=2,this._error=k,this._onStateChanged.fire())}}e.AsyncIterableObject=p,p.EMPTY=p.fromArray([]);class b extends p{constructor(k,M){super(M),this._source=k}cancel(){this._source.cancel()}}e.CancelableAsyncIterableObject=b;function w(E){const k=new L.CancellationTokenSource,M=E(k.token);return new b(k,R=>be(this,void 0,void 0,function*(){var B,T,N,A;const P=k.token.onCancellationRequested(()=>{P.dispose(),k.dispose(),R.reject(new I.CancellationError)});try{try{for(var O=!0,x=yt(M),W;W=yield x.next(),B=W.done,!B;O=!0){A=W.value,O=!1;const U=A;if(k.token.isCancellationRequested)return;R.emitOne(U)}}catch(U){T={error:U}}finally{try{!O&&!B&&(N=x.return)&&(yield N.call(x))}finally{if(T)throw T.error}}P.dispose(),k.dispose()}catch(U){P.dispose(),k.dispose(),R.reject(U)}}))}e.createCancelableAsyncIterable=w}),define(te[570],ie([1,0,14,2]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarVisibilityController=void 0;class y extends I.Disposable{constructor(S,m,_){super(),this._visibility=S,this._visibleClassName=m,this._invisibleClassName=_,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new L.TimeoutTimer)}setVisibility(S){this._visibility!==S&&(this._visibility=S,this._updateShouldBeVisible())}setShouldBeVisible(S){this._rawShouldBeVisible=S,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){const S=this._applyVisibilitySetting();this._shouldBeVisible!==S&&(this._shouldBeVisible=S,this.ensureVisibility())}setIsNeeded(S){this._isNeeded!==S&&(this._isNeeded=S,this.ensureVisibility())}setDomNode(S){this._domNode=S,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var S;(S=this._domNode)===null||S===void 0||S.setClassName(this._visibleClassName)},0))}_hide(S){var m;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(m=this._domNode)===null||m===void 0||m.setClassName(this._invisibleClassName+(S?" fade":"")))}}e.ScrollbarVisibilityController=y}),define(te[218],ie([1,0,137,13,14,263,167,6,43]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndexTreeModel=e.getVisibleState=e.isFilterResult=void 0;function v(n){return typeof n=="object"&&"visibility"in n&&"data"in n}e.isFilterResult=v;function C(n){switch(n){case!0:return 1;case!1:return 0;default:return n}}e.getVisibleState=C;function s(n){return typeof n.collapsible=="boolean"}class i{constructor(t,r,u,f={}){this.user=t,this.list=r,this.rootRef=[],this.eventBufferer=new m.EventBufferer,this._onDidChangeCollapseState=new m.Emitter,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new m.Emitter,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new m.Emitter,this.onDidSplice=this._onDidSplice.event,this.refilterDelayer=new y.Delayer(D.MicrotaskDelay),this.collapseByDefault=typeof f.collapseByDefault>"u"?!1:f.collapseByDefault,this.filter=f.filter,this.autoExpandSingleChildren=typeof f.autoExpandSingleChildren>"u"?!1:f.autoExpandSingleChildren,this.root={parent:void 0,element:u,children:[],depth:0,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:!1,collapsed:!1,renderNodeCount:0,visibility:1,visible:!0,filterData:void 0}}splice(t,r,u=_.Iterable.empty(),f={}){if(t.length===0)throw new L.TreeError(this.user,"Invalid tree location");f.diffIdentityProvider?this.spliceSmart(f.diffIdentityProvider,t,r,u,f):this.spliceSimple(t,r,u,f)}spliceSmart(t,r,u,f,d,l){var o;f===void 0&&(f=_.Iterable.empty()),l===void 0&&(l=(o=d.diffDepth)!==null&&o!==void 0?o:0);const{parentNode:c}=this.getParentNodeWithListIndex(r);if(!c.lastDiffIds)return this.spliceSimple(r,u,f,d);const a=[...f],g=r[r.length-1],h=new S.LcsDiff({getElements:()=>c.lastDiffIds},{getElements:()=>[...c.children.slice(0,g),...a,...c.children.slice(g+u)].map(k=>t.getId(k.element).toString())}).ComputeDiff(!1);if(h.quitEarly)return c.lastDiffIds=void 0,this.spliceSimple(r,u,a,d);const p=r.slice(0,-1),b=(k,M,R)=>{if(l>0)for(let B=0;BR.originalStart-M.originalStart))b(w,E,w-(k.originalStart+k.originalLength)),w=k.originalStart,E=k.modifiedStart-g,this.spliceSimple([...p,w],k.originalLength,_.Iterable.slice(a,E,E+k.modifiedLength),d);b(w,E,w)}spliceSimple(t,r,u=_.Iterable.empty(),{onDidCreateNode:f,onDidDeleteNode:d,diffIdentityProvider:l}){const{parentNode:o,listIndex:c,revealed:a,visible:g}=this.getParentNodeWithListIndex(t),h=[],p=_.Iterable.map(u,P=>this.createTreeNode(P,o,o.visible?1:0,a,h,f)),b=t[t.length-1],w=o.children.length>0;let E=0;for(let P=b;P>=0&&Pl.getId(P.element).toString())):o.lastDiffIds=o.children.map(P=>l.getId(P.element).toString()):o.lastDiffIds=void 0;let T=0;for(const P of B)P.visible&&T++;if(T!==0)for(let P=b+k.length;PO+(x.visible?x.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,R-P),this.list.splice(c,P,h)}if(B.length>0&&d){const P=O=>{d(O),O.children.forEach(P)};B.forEach(P)}this._onDidSplice.fire({insertedNodes:k,deletedNodes:B});const N=o.children.length>0;w!==N&&this.setCollapsible(t.slice(0,-1),N);let A=o;for(;A;){if(A.visibility===2){this.refilterDelayer.trigger(()=>this.refilter());break}A=A.parent}}rerender(t){if(t.length===0)throw new L.TreeError(this.user,"Invalid tree location");const{node:r,listIndex:u,revealed:f}=this.getTreeNodeWithListIndex(t);r.visible&&f&&this.list.splice(u,1,[r])}has(t){return this.hasTreeNode(t)}getListIndex(t){const{listIndex:r,visible:u,revealed:f}=this.getTreeNodeWithListIndex(t);return u&&f?r:-1}getListRenderCount(t){return this.getTreeNode(t).renderNodeCount}isCollapsible(t){return this.getTreeNode(t).collapsible}setCollapsible(t,r){const u=this.getTreeNode(t);typeof r>"u"&&(r=!u.collapsible);const f={collapsible:r};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,f))}isCollapsed(t){return this.getTreeNode(t).collapsed}setCollapsed(t,r,u){const f=this.getTreeNode(t);typeof r>"u"&&(r=!f.collapsed);const d={collapsed:r,recursive:u||!1};return this.eventBufferer.bufferEvents(()=>this._setCollapseState(t,d))}_setCollapseState(t,r){const{node:u,listIndex:f,revealed:d}=this.getTreeNodeWithListIndex(t),l=this._setListNodeCollapseState(u,f,d,r);if(u!==this.root&&this.autoExpandSingleChildren&&l&&!s(r)&&u.collapsible&&!u.collapsed&&!r.recursive){let o=-1;for(let c=0;c-1){o=-1;break}else o=c;o>-1&&this._setCollapseState([...t,o],r)}return l}_setListNodeCollapseState(t,r,u,f){const d=this._setNodeCollapseState(t,f,!1);if(!u||!t.visible||!d)return d;const l=t.renderNodeCount,o=this.updateNodeAfterCollapseChange(t),c=l-(r===-1?0:1);return this.list.splice(r+1,c,o.slice(1)),d}_setNodeCollapseState(t,r,u){let f;if(t===this.root?f=!1:(s(r)?(f=t.collapsible!==r.collapsible,t.collapsible=r.collapsible):t.collapsible?(f=t.collapsed!==r.collapsed,t.collapsed=r.collapsed):f=!1,f&&this._onDidChangeCollapseState.fire({node:t,deep:u})),!s(r)&&r.recursive)for(const d of t.children)f=this._setNodeCollapseState(d,r,!0)||f;return f}expandTo(t){this.eventBufferer.bufferEvents(()=>{let r=this.getTreeNode(t);for(;r.parent;)r=r.parent,t=t.slice(0,t.length-1),r.collapsed&&this._setCollapseState(t,{collapsed:!1,recursive:!1})})}refilter(){const t=this.root.renderNodeCount,r=this.updateNodeAfterFilterChange(this.root);this.list.splice(0,t,r),this.refilterDelayer.cancel()}createTreeNode(t,r,u,f,d,l){const o={parent:r,element:t.element,children:[],depth:r.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof t.collapsible=="boolean"?t.collapsible:typeof t.collapsed<"u",collapsed:typeof t.collapsed>"u"?this.collapseByDefault:t.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},c=this._filterNode(o,u);o.visibility=c,f&&d.push(o);const a=t.children||_.Iterable.empty(),g=f&&c!==0&&!o.collapsed;let h=0,p=1;for(const b of a){const w=this.createTreeNode(b,o,c,g,d,l);o.children.push(w),p+=w.renderNodeCount,w.visible&&(w.visibleChildIndex=h++)}return o.collapsible=o.collapsible||o.children.length>0,o.visibleChildrenCount=h,o.visible=c===2?h>0:c===1,o.visible?o.collapsed||(o.renderNodeCount=p):(o.renderNodeCount=0,f&&d.pop()),l?.(o),o}updateNodeAfterCollapseChange(t){const r=t.renderNodeCount,u=[];return this._updateNodeAfterCollapseChange(t,u),this._updateAncestorsRenderNodeCount(t.parent,u.length-r),u}_updateNodeAfterCollapseChange(t,r){if(t.visible===!1)return 0;if(r.push(t),t.renderNodeCount=1,!t.collapsed)for(const u of t.children)t.renderNodeCount+=this._updateNodeAfterCollapseChange(u,r);return this._onDidChangeRenderNodeCount.fire(t),t.renderNodeCount}updateNodeAfterFilterChange(t){const r=t.renderNodeCount,u=[];return this._updateNodeAfterFilterChange(t,t.visible?1:0,u),this._updateAncestorsRenderNodeCount(t.parent,u.length-r),u}_updateNodeAfterFilterChange(t,r,u,f=!0){let d;if(t!==this.root){if(d=this._filterNode(t,r),d===0)return t.visible=!1,t.renderNodeCount=0,!1;f&&u.push(t)}const l=u.length;t.renderNodeCount=t===this.root?0:1;let o=!1;if(!t.collapsed||d!==0){let c=0;for(const a of t.children)o=this._updateNodeAfterFilterChange(a,d,u,f&&!t.collapsed)||o,a.visible&&(a.visibleChildIndex=c++);t.visibleChildrenCount=c}else t.visibleChildrenCount=0;return t!==this.root&&(t.visible=d===2?o:d===1,t.visibility=d),t.visible?t.collapsed||(t.renderNodeCount+=u.length-l):(t.renderNodeCount=0,f&&u.pop()),this._onDidChangeRenderNodeCount.fire(t),t.visible}_updateAncestorsRenderNodeCount(t,r){if(r!==0)for(;t;)t.renderNodeCount+=r,this._onDidChangeRenderNodeCount.fire(t),t=t.parent}_filterNode(t,r){const u=this.filter?this.filter.filter(t.element,r):1;return typeof u=="boolean"?(t.filterData=void 0,u?1:0):v(u)?(t.filterData=u.data,C(u.visibility)):(t.filterData=void 0,C(u))}hasTreeNode(t,r=this.root){if(!t||t.length===0)return!0;const[u,...f]=t;return u<0||u>r.children.length?!1:this.hasTreeNode(f,r.children[u])}getTreeNode(t,r=this.root){if(!t||t.length===0)return r;const[u,...f]=t;if(u<0||u>r.children.length)throw new L.TreeError(this.user,"Invalid tree location");return this.getTreeNode(f,r.children[u])}getTreeNodeWithListIndex(t){if(t.length===0)return{node:this.root,listIndex:-1,revealed:!0,visible:!1};const{parentNode:r,listIndex:u,revealed:f,visible:d}=this.getParentNodeWithListIndex(t),l=t[t.length-1];if(l<0||l>r.children.length)throw new L.TreeError(this.user,"Invalid tree location");const o=r.children[l];return{node:o,listIndex:u,revealed:f,visible:d&&o.visible}}getParentNodeWithListIndex(t,r=this.root,u=0,f=!0,d=!0){const[l,...o]=t;if(l<0||l>r.children.length)throw new L.TreeError(this.user,"Invalid tree location");for(let c=0;c{var r;if(t.element===null)return;const u=t;if(C.add(u.element),this.nodes.set(u.element,u),this.identityProvider){const f=this.identityProvider.getId(u.element).toString();s.add(f),this.nodesByIdentity.set(f,u)}(r=v.onDidCreateNode)===null||r===void 0||r.call(v,u)},n=t=>{var r;if(t.element===null)return;const u=t;if(C.has(u.element)||this.nodes.delete(u.element),this.identityProvider){const f=this.identityProvider.getId(u.element).toString();s.has(f)||this.nodesByIdentity.delete(f)}(r=v.onDidDeleteNode)===null||r===void 0||r.call(v,u)};this.model.splice([...m,0],Number.MAX_VALUE,_,Object.assign(Object.assign({},v),{onDidCreateNode:i,onDidDeleteNode:n}))}preserveCollapseState(m=y.Iterable.empty()){return this.sorter&&(m=[...m].sort(this.sorter.compare.bind(this.sorter))),y.Iterable.map(m,_=>{let v=this.nodes.get(_.element);if(!v&&this.identityProvider){const i=this.identityProvider.getId(_.element).toString();v=this.nodesByIdentity.get(i)}if(!v){let i;return typeof _.collapsed>"u"?i=void 0:_.collapsed===I.ObjectTreeElementCollapseState.Collapsed||_.collapsed===I.ObjectTreeElementCollapseState.PreserveOrCollapsed?i=!0:_.collapsed===I.ObjectTreeElementCollapseState.Expanded||_.collapsed===I.ObjectTreeElementCollapseState.PreserveOrExpanded?i=!1:i=!!_.collapsed,Object.assign(Object.assign({},_),{children:this.preserveCollapseState(_.children),collapsed:i})}const C=typeof _.collapsible=="boolean"?_.collapsible:v.collapsible;let s;return typeof _.collapsed>"u"||_.collapsed===I.ObjectTreeElementCollapseState.PreserveOrCollapsed||_.collapsed===I.ObjectTreeElementCollapseState.PreserveOrExpanded?s=v.collapsed:_.collapsed===I.ObjectTreeElementCollapseState.Collapsed?s=!0:_.collapsed===I.ObjectTreeElementCollapseState.Expanded?s=!1:s=!!_.collapsed,Object.assign(Object.assign({},_),{collapsible:C,collapsed:s,children:this.preserveCollapseState(_.children)})})}rerender(m){const _=this.getElementLocation(m);this.model.rerender(_)}getFirstElementChild(m=null){const _=this.getElementLocation(m);return this.model.getFirstElementChild(_)}has(m){return this.nodes.has(m)}getListIndex(m){const _=this.getElementLocation(m);return this.model.getListIndex(_)}getListRenderCount(m){const _=this.getElementLocation(m);return this.model.getListRenderCount(_)}isCollapsible(m){const _=this.getElementLocation(m);return this.model.isCollapsible(_)}setCollapsible(m,_){const v=this.getElementLocation(m);return this.model.setCollapsible(v,_)}isCollapsed(m){const _=this.getElementLocation(m);return this.model.isCollapsed(_)}setCollapsed(m,_,v){const C=this.getElementLocation(m);return this.model.setCollapsed(C,_,v)}expandTo(m){const _=this.getElementLocation(m);this.model.expandTo(_)}refilter(){this.model.refilter()}getNode(m=null){if(m===null)return this.model.getNode(this.model.rootRef);const _=this.nodes.get(m);if(!_)throw new I.TreeError(this.user,`Tree element not found: ${m}`);return _}getNodeLocation(m){return m.element}getParentNodeLocation(m){if(m===null)throw new I.TreeError(this.user,"Invalid getParentNodeLocation call");const _=this.nodes.get(m);if(!_)throw new I.TreeError(this.user,`Tree element not found: ${m}`);const v=this.model.getNodeLocation(_),C=this.model.getParentNodeLocation(v);return this.model.getNode(C).element}getElementLocation(m){if(m===null)return[];const _=this.nodes.get(m);if(!_)throw new I.TreeError(this.user,`Tree element not found: ${m}`);return this.model.getNodeLocation(_)}}e.ObjectTreeModel=D}),define(te[571],ie([1,0,219,137,13,6,43]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTreeModel=e.DefaultElementMapper=e.CompressedObjectTreeModel=e.decompress=e.compress=void 0;function m(l){const o=[l.element],c=l.incompressible||!1;return{element:{elements:o,incompressible:c},children:S.Iterable.map(S.Iterable.from(l.children),m),collapsible:l.collapsible,collapsed:l.collapsed}}function _(l){const o=[l.element],c=l.incompressible||!1;let a,g;for(;[g,a]=S.Iterable.consume(S.Iterable.from(l.children),2),!(g.length!==1||g[0].incompressible);)l=g[0],o.push(l.element);return{element:{elements:o,incompressible:c},children:S.Iterable.map(S.Iterable.concat(g,a),_),collapsible:l.collapsible,collapsed:l.collapsed}}e.compress=_;function v(l,o=0){let c;return ov(a,0)),o===0&&l.element.incompressible?{element:l.element.elements[o],children:c,incompressible:!0,collapsible:l.collapsible,collapsed:l.collapsed}:{element:l.element.elements[o],children:c,collapsible:l.collapsible,collapsed:l.collapsed}}function C(l){return v(l,0)}e.decompress=C;function s(l,o,c){return l.element===o?Object.assign(Object.assign({},l),{children:c}):Object.assign(Object.assign({},l),{children:S.Iterable.map(S.Iterable.from(l.children),a=>s(a,o,c))})}const i=l=>({getId(o){return o.elements.map(c=>l.getId(c).toString()).join("\0")}});class n{get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}constructor(o,c,a={}){this.user=o,this.rootRef=null,this.nodes=new Map,this.model=new L.ObjectTreeModel(o,c,a),this.enabled=typeof a.compressionEnabled>"u"?!0:a.compressionEnabled,this.identityProvider=a.identityProvider}setChildren(o,c=S.Iterable.empty(),a){const g=a.diffIdentityProvider&&i(a.diffIdentityProvider);if(o===null){const T=S.Iterable.map(c,this.enabled?_:m);this._setChildren(null,T,{diffIdentityProvider:g,diffDepth:1/0});return}const h=this.nodes.get(o);if(!h)throw new I.TreeError(this.user,"Unknown compressed tree node");const p=this.model.getNode(h),b=this.model.getParentNodeLocation(h),w=this.model.getNode(b),E=C(p),k=s(E,o,c),M=(this.enabled?_:m)(k),R=a.diffIdentityProvider?(T,N)=>a.diffIdentityProvider.getId(T)===a.diffIdentityProvider.getId(N):void 0;if((0,y.equals)(M.element.elements,p.element.elements,R)){this._setChildren(h,M.children||S.Iterable.empty(),{diffIdentityProvider:g,diffDepth:1});return}const B=w.children.map(T=>T===p?M:T);this._setChildren(w.element,B,{diffIdentityProvider:g,diffDepth:p.depth-w.depth})}setCompressionEnabled(o){if(o===this.enabled)return;this.enabled=o;const a=this.model.getNode().children,g=S.Iterable.map(a,C),h=S.Iterable.map(g,o?_:m);this._setChildren(null,h,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(o,c,a){const g=new Set,h=b=>{for(const w of b.element.elements)g.add(w),this.nodes.set(w,b.element)},p=b=>{for(const w of b.element.elements)g.has(w)||this.nodes.delete(w)};this.model.setChildren(o,c,Object.assign(Object.assign({},a),{onDidCreateNode:h,onDidDeleteNode:p}))}has(o){return this.nodes.has(o)}getListIndex(o){const c=this.getCompressedNode(o);return this.model.getListIndex(c)}getListRenderCount(o){const c=this.getCompressedNode(o);return this.model.getListRenderCount(c)}getNode(o){if(typeof o>"u")return this.model.getNode();const c=this.getCompressedNode(o);return this.model.getNode(c)}getNodeLocation(o){const c=this.model.getNodeLocation(o);return c===null?null:c.elements[c.elements.length-1]}getParentNodeLocation(o){const c=this.getCompressedNode(o),a=this.model.getParentNodeLocation(c);return a===null?null:a.elements[a.elements.length-1]}getFirstElementChild(o){const c=this.getCompressedNode(o);return this.model.getFirstElementChild(c)}isCollapsible(o){const c=this.getCompressedNode(o);return this.model.isCollapsible(c)}setCollapsible(o,c){const a=this.getCompressedNode(o);return this.model.setCollapsible(a,c)}isCollapsed(o){const c=this.getCompressedNode(o);return this.model.isCollapsed(c)}setCollapsed(o,c,a){const g=this.getCompressedNode(o);return this.model.setCollapsed(g,c,a)}expandTo(o){const c=this.getCompressedNode(o);this.model.expandTo(c)}rerender(o){const c=this.getCompressedNode(o);this.model.rerender(c)}refilter(){this.model.refilter()}getCompressedNode(o){if(o===null)return null;const c=this.nodes.get(o);if(!c)throw new I.TreeError(this.user,`Tree element not found: ${o}`);return c}}e.CompressedObjectTreeModel=n;const t=l=>l[l.length-1];e.DefaultElementMapper=t;class r{get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(o=>new r(this.unwrapper,o))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(o,c){this.unwrapper=o,this.node=c}}function u(l,o){return{splice(c,a,g){o.splice(c,a,g.map(h=>l.map(h)))},updateElementHeight(c,a){o.updateElementHeight(c,a)}}}function f(l,o){return Object.assign(Object.assign({},o),{identityProvider:o.identityProvider&&{getId(c){return o.identityProvider.getId(l(c))}},sorter:o.sorter&&{compare(c,a){return o.sorter.compare(c.elements[0],a.elements[0])}},filter:o.filter&&{filter(c,a){return o.filter.filter(l(c),a)}}})}class d{get onDidSplice(){return D.Event.map(this.model.onDidSplice,({insertedNodes:o,deletedNodes:c})=>({insertedNodes:o.map(a=>this.nodeMapper.map(a)),deletedNodes:c.map(a=>this.nodeMapper.map(a))}))}get onDidChangeCollapseState(){return D.Event.map(this.model.onDidChangeCollapseState,({node:o,deep:c})=>({node:this.nodeMapper.map(o),deep:c}))}get onDidChangeRenderNodeCount(){return D.Event.map(this.model.onDidChangeRenderNodeCount,o=>this.nodeMapper.map(o))}constructor(o,c,a={}){this.rootRef=null,this.elementMapper=a.elementMapper||e.DefaultElementMapper;const g=h=>this.elementMapper(h.elements);this.nodeMapper=new I.WeakMapper(h=>new r(g,h)),this.model=new n(o,u(this.nodeMapper,c),f(g,a))}setChildren(o,c=S.Iterable.empty(),a={}){this.model.setChildren(o,c,a)}setCompressionEnabled(o){this.model.setCompressionEnabled(o)}has(o){return this.model.has(o)}getListIndex(o){return this.model.getListIndex(o)}getListRenderCount(o){return this.model.getListRenderCount(o)}getNode(o){return this.nodeMapper.map(this.model.getNode(o))}getNodeLocation(o){return o.element}getParentNodeLocation(o){return this.model.getParentNodeLocation(o)}getFirstElementChild(o){const c=this.model.getFirstElementChild(o);return c===null||typeof c>"u"?c:this.elementMapper(c.elements)}isCollapsible(o){return this.model.isCollapsible(o)}setCollapsible(o,c){return this.model.setCollapsible(o,c)}isCollapsed(o){return this.model.isCollapsed(o)}setCollapsed(o,c,a){return this.model.setCollapsed(o,c,a)}expandTo(o){return this.model.expandTo(o)}rerender(o){return this.model.rerender(o)}refilter(){return this.model.refilter()}getCompressedTreeNode(o=null){return this.model.getNode(o)}}e.CompressibleObjectTreeModel=d}),define(te[307],ie([1,0,17]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.platform=e.env=e.cwd=void 0;let I;if(typeof L.globals.vscode<"u"&&typeof L.globals.vscode.process<"u"){const y=L.globals.vscode.process;I={get platform(){return y.platform},get arch(){return y.arch},get env(){return y.env},cwd(){return y.cwd()}}}else typeof process<"u"?I={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()}}:I={get platform(){return L.isWindows?"win32":L.isMacintosh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};e.cwd=I.cwd,e.env=I.env,e.platform=I.platform}),define(te[572],ie([1,0,307]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerHotReloadHandler=e.isHotReloadEnabled=void 0;function I(){return!!L.env.VSCODE_DEV}e.isHotReloadEnabled=I;function y(m){if(I()){const _=D();return _.add(m),{dispose(){_.delete(m)}}}else return{dispose(){}}}e.registerHotReloadHandler=y;function D(){S||(S=new Set);const m=globalThis;return m.$hotReload_applyNewExports||(m.$hotReload_applyNewExports=_=>{for(const v of S){const C=v(_);if(C)return C}}),S}let S}),define(te[92],ie([1,0,307]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sep=e.extname=e.basename=e.dirname=e.relative=e.resolve=e.normalize=e.posix=e.win32=void 0;const I=65,y=97,D=90,S=122,m=46,_=47,v=92,C=58,s=63;class i extends Error{constructor(g,h,p){let b;typeof h=="string"&&h.indexOf("not ")===0?(b="must not be",h=h.replace(/^not /,"")):b="must be";const w=g.indexOf(".")!==-1?"property":"argument";let E=`The "${g}" ${w} ${b} of type ${h}`;E+=`. Received type ${typeof p}`,super(E),this.code="ERR_INVALID_ARG_TYPE"}}function n(a,g){if(a===null||typeof a!="object")throw new i(g,"Object",a)}function t(a,g){if(typeof a!="string")throw new i(g,"string",a)}const r=L.platform==="win32";function u(a){return a===_||a===v}function f(a){return a===_}function d(a){return a>=I&&a<=D||a>=y&&a<=S}function l(a,g,h,p){let b="",w=0,E=-1,k=0,M=0;for(let R=0;R<=a.length;++R){if(R2){const B=b.lastIndexOf(h);B===-1?(b="",w=0):(b=b.slice(0,B),w=b.length-1-b.lastIndexOf(h)),E=R,k=0;continue}else if(b.length!==0){b="",w=0,E=R,k=0;continue}}g&&(b+=b.length>0?`${h}..`:"..",w=2)}else b.length>0?b+=`${h}${a.slice(E+1,R)}`:b=a.slice(E+1,R),w=R-E-1;E=R,k=0}else M===m&&k!==-1?++k:k=-1}return b}function o(a,g){n(g,"pathObject");const h=g.dir||g.root,p=g.base||`${g.name||""}${g.ext||""}`;return h?h===g.root?`${h}${p}`:`${h}${a}${p}`:p}e.win32={resolve(...a){let g="",h="",p=!1;for(let b=a.length-1;b>=-1;b--){let w;if(b>=0){if(w=a[b],t(w,"path"),w.length===0)continue}else g.length===0?w=L.cwd():(w=L.env[`=${g}`]||L.cwd(),(w===void 0||w.slice(0,2).toLowerCase()!==g.toLowerCase()&&w.charCodeAt(2)===v)&&(w=`${g}\\`));const E=w.length;let k=0,M="",R=!1;const B=w.charCodeAt(0);if(E===1)u(B)&&(k=1,R=!0);else if(u(B))if(R=!0,u(w.charCodeAt(1))){let T=2,N=T;for(;T2&&u(w.charCodeAt(2))&&(R=!0,k=3));if(M.length>0)if(g.length>0){if(M.toLowerCase()!==g.toLowerCase())continue}else g=M;if(p){if(g.length>0)break}else if(h=`${w.slice(k)}\\${h}`,p=R,R&&g.length>0)break}return h=l(h,!p,"\\",u),p?`${g}\\${h}`:`${g}${h}`||"."},normalize(a){t(a,"path");const g=a.length;if(g===0)return".";let h=0,p,b=!1;const w=a.charCodeAt(0);if(g===1)return f(w)?"\\":a;if(u(w))if(b=!0,u(a.charCodeAt(1))){let k=2,M=k;for(;k2&&u(a.charCodeAt(2))&&(b=!0,h=3));let E=h0&&u(a.charCodeAt(g-1))&&(E+="\\"),p===void 0?b?`\\${E}`:E:b?`${p}\\${E}`:`${p}${E}`},isAbsolute(a){t(a,"path");const g=a.length;if(g===0)return!1;const h=a.charCodeAt(0);return u(h)||g>2&&d(h)&&a.charCodeAt(1)===C&&u(a.charCodeAt(2))},join(...a){if(a.length===0)return".";let g,h;for(let w=0;w0&&(g===void 0?g=h=E:g+=`\\${E}`)}if(g===void 0)return".";let p=!0,b=0;if(typeof h=="string"&&u(h.charCodeAt(0))){++b;const w=h.length;w>1&&u(h.charCodeAt(1))&&(++b,w>2&&(u(h.charCodeAt(2))?++b:p=!1))}if(p){for(;b=2&&(g=`\\${g.slice(b)}`)}return e.win32.normalize(g)},relative(a,g){if(t(a,"from"),t(g,"to"),a===g)return"";const h=e.win32.resolve(a),p=e.win32.resolve(g);if(h===p||(a=h.toLowerCase(),g=p.toLowerCase(),a===g))return"";let b=0;for(;bb&&a.charCodeAt(w-1)===v;)w--;const E=w-b;let k=0;for(;kk&&g.charCodeAt(M-1)===v;)M--;const R=M-k,B=EB){if(g.charCodeAt(k+N)===v)return p.slice(k+N+1);if(N===2)return p.slice(k+N)}E>B&&(a.charCodeAt(b+N)===v?T=N:N===2&&(T=3)),T===-1&&(T=0)}let A="";for(N=b+T+1;N<=w;++N)(N===w||a.charCodeAt(N)===v)&&(A+=A.length===0?"..":"\\..");return k+=T,A.length>0?`${A}${p.slice(k,M)}`:(p.charCodeAt(k)===v&&++k,p.slice(k,M))},toNamespacedPath(a){if(typeof a!="string"||a.length===0)return a;const g=e.win32.resolve(a);if(g.length<=2)return a;if(g.charCodeAt(0)===v){if(g.charCodeAt(1)===v){const h=g.charCodeAt(2);if(h!==s&&h!==m)return`\\\\?\\UNC\\${g.slice(2)}`}}else if(d(g.charCodeAt(0))&&g.charCodeAt(1)===C&&g.charCodeAt(2)===v)return`\\\\?\\${g}`;return a},dirname(a){t(a,"path");const g=a.length;if(g===0)return".";let h=-1,p=0;const b=a.charCodeAt(0);if(g===1)return u(b)?a:".";if(u(b)){if(h=p=1,u(a.charCodeAt(1))){let k=2,M=k;for(;k2&&u(a.charCodeAt(2))?3:2,p=h);let w=-1,E=!0;for(let k=g-1;k>=p;--k)if(u(a.charCodeAt(k))){if(!E){w=k;break}}else E=!1;if(w===-1){if(h===-1)return".";w=h}return a.slice(0,w)},basename(a,g){g!==void 0&&t(g,"ext"),t(a,"path");let h=0,p=-1,b=!0,w;if(a.length>=2&&d(a.charCodeAt(0))&&a.charCodeAt(1)===C&&(h=2),g!==void 0&&g.length>0&&g.length<=a.length){if(g===a)return"";let E=g.length-1,k=-1;for(w=a.length-1;w>=h;--w){const M=a.charCodeAt(w);if(u(M)){if(!b){h=w+1;break}}else k===-1&&(b=!1,k=w+1),E>=0&&(M===g.charCodeAt(E)?--E===-1&&(p=w):(E=-1,p=k))}return h===p?p=k:p===-1&&(p=a.length),a.slice(h,p)}for(w=a.length-1;w>=h;--w)if(u(a.charCodeAt(w))){if(!b){h=w+1;break}}else p===-1&&(b=!1,p=w+1);return p===-1?"":a.slice(h,p)},extname(a){t(a,"path");let g=0,h=-1,p=0,b=-1,w=!0,E=0;a.length>=2&&a.charCodeAt(1)===C&&d(a.charCodeAt(0))&&(g=p=2);for(let k=a.length-1;k>=g;--k){const M=a.charCodeAt(k);if(u(M)){if(!w){p=k+1;break}continue}b===-1&&(w=!1,b=k+1),M===m?h===-1?h=k:E!==1&&(E=1):h!==-1&&(E=-1)}return h===-1||b===-1||E===0||E===1&&h===b-1&&h===p+1?"":a.slice(h,b)},format:o.bind(null,"\\"),parse(a){t(a,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return g;const h=a.length;let p=0,b=a.charCodeAt(0);if(h===1)return u(b)?(g.root=g.dir=a,g):(g.base=g.name=a,g);if(u(b)){if(p=1,u(a.charCodeAt(1))){let T=2,N=T;for(;T0&&(g.root=a.slice(0,p));let w=-1,E=p,k=-1,M=!0,R=a.length-1,B=0;for(;R>=p;--R){if(b=a.charCodeAt(R),u(b)){if(!M){E=R+1;break}continue}k===-1&&(M=!1,k=R+1),b===m?w===-1?w=R:B!==1&&(B=1):w!==-1&&(B=-1)}return k!==-1&&(w===-1||B===0||B===1&&w===k-1&&w===E+1?g.base=g.name=a.slice(E,k):(g.name=a.slice(E,w),g.base=a.slice(E,k),g.ext=a.slice(w,k))),E>0&&E!==p?g.dir=a.slice(0,E-1):g.dir=g.root,g},sep:"\\",delimiter:";",win32:null,posix:null};const c=(()=>{if(r){const a=/\\/g;return()=>{const g=L.cwd().replace(a,"/");return g.slice(g.indexOf("/"))}}return()=>L.cwd()})();e.posix={resolve(...a){let g="",h=!1;for(let p=a.length-1;p>=-1&&!h;p--){const b=p>=0?a[p]:c();t(b,"path"),b.length!==0&&(g=`${b}/${g}`,h=b.charCodeAt(0)===_)}return g=l(g,!h,"/",f),h?`/${g}`:g.length>0?g:"."},normalize(a){if(t(a,"path"),a.length===0)return".";const g=a.charCodeAt(0)===_,h=a.charCodeAt(a.length-1)===_;return a=l(a,!g,"/",f),a.length===0?g?"/":h?"./":".":(h&&(a+="/"),g?`/${a}`:a)},isAbsolute(a){return t(a,"path"),a.length>0&&a.charCodeAt(0)===_},join(...a){if(a.length===0)return".";let g;for(let h=0;h0&&(g===void 0?g=p:g+=`/${p}`)}return g===void 0?".":e.posix.normalize(g)},relative(a,g){if(t(a,"from"),t(g,"to"),a===g||(a=e.posix.resolve(a),g=e.posix.resolve(g),a===g))return"";const h=1,p=a.length,b=p-h,w=1,E=g.length-w,k=bk){if(g.charCodeAt(w+R)===_)return g.slice(w+R+1);if(R===0)return g.slice(w+R)}else b>k&&(a.charCodeAt(h+R)===_?M=R:R===0&&(M=0));let B="";for(R=h+M+1;R<=p;++R)(R===p||a.charCodeAt(R)===_)&&(B+=B.length===0?"..":"/..");return`${B}${g.slice(w+M)}`},toNamespacedPath(a){return a},dirname(a){if(t(a,"path"),a.length===0)return".";const g=a.charCodeAt(0)===_;let h=-1,p=!0;for(let b=a.length-1;b>=1;--b)if(a.charCodeAt(b)===_){if(!p){h=b;break}}else p=!1;return h===-1?g?"/":".":g&&h===1?"//":a.slice(0,h)},basename(a,g){g!==void 0&&t(g,"ext"),t(a,"path");let h=0,p=-1,b=!0,w;if(g!==void 0&&g.length>0&&g.length<=a.length){if(g===a)return"";let E=g.length-1,k=-1;for(w=a.length-1;w>=0;--w){const M=a.charCodeAt(w);if(M===_){if(!b){h=w+1;break}}else k===-1&&(b=!1,k=w+1),E>=0&&(M===g.charCodeAt(E)?--E===-1&&(p=w):(E=-1,p=k))}return h===p?p=k:p===-1&&(p=a.length),a.slice(h,p)}for(w=a.length-1;w>=0;--w)if(a.charCodeAt(w)===_){if(!b){h=w+1;break}}else p===-1&&(b=!1,p=w+1);return p===-1?"":a.slice(h,p)},extname(a){t(a,"path");let g=-1,h=0,p=-1,b=!0,w=0;for(let E=a.length-1;E>=0;--E){const k=a.charCodeAt(E);if(k===_){if(!b){h=E+1;break}continue}p===-1&&(b=!1,p=E+1),k===m?g===-1?g=E:w!==1&&(w=1):g!==-1&&(w=-1)}return g===-1||p===-1||w===0||w===1&&g===p-1&&g===h+1?"":a.slice(g,p)},format:o.bind(null,"/"),parse(a){t(a,"path");const g={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return g;const h=a.charCodeAt(0)===_;let p;h?(g.root="/",p=1):p=0;let b=-1,w=0,E=-1,k=!0,M=a.length-1,R=0;for(;M>=p;--M){const B=a.charCodeAt(M);if(B===_){if(!k){w=M+1;break}continue}E===-1&&(k=!1,E=M+1),B===m?b===-1?b=M:R!==1&&(R=1):b!==-1&&(R=-1)}if(E!==-1){const B=w===0&&h?1:w;b===-1||R===0||R===1&&b===E-1&&b===w+1?g.base=g.name=a.slice(B,E):(g.name=a.slice(B,b),g.base=a.slice(B,E),g.ext=a.slice(b,E))}return w>0?g.dir=a.slice(0,w-1):h&&(g.dir="/"),g},sep:"/",delimiter:":",win32:null,posix:null},e.posix.win32=e.win32.win32=e.win32,e.posix.posix=e.win32.posix=e.posix,e.normalize=r?e.win32.normalize:e.posix.normalize,e.resolve=r?e.win32.resolve:e.posix.resolve,e.relative=r?e.win32.relative:e.posix.relative,e.dirname=r?e.win32.dirname:e.posix.dirname,e.basename=r?e.win32.basename:e.posix.basename,e.extname=r?e.win32.extname:e.posix.extname,e.sep=r?e.win32.sep:e.posix.sep}),define(te[220],ie([1,0,92,17,10]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hasDriveLetter=e.isWindowsDriveLetter=e.isEqualOrParent=e.getRoot=e.toPosixPath=e.toSlashes=e.isPathSeparator=void 0;function D(i){return i===47||i===92}e.isPathSeparator=D;function S(i){return i.replace(/[\\/]/g,L.posix.sep)}e.toSlashes=S;function m(i){return i.indexOf("/")===-1&&(i=S(i)),/^[a-zA-Z]:(\/|$)/.test(i)&&(i="/"+i),i}e.toPosixPath=m;function _(i,n=L.posix.sep){if(!i)return"";const t=i.length,r=i.charCodeAt(0);if(D(r)){if(D(i.charCodeAt(1))&&!D(i.charCodeAt(2))){let f=3;const d=f;for(;fi.length)return!1;if(t){if(!(0,y.startsWithIgnoreCase)(i,n))return!1;if(n.length===i.length)return!0;let f=n.length;return n.charAt(n.length-1)===r&&f--,i.charAt(f)===r}return n.charAt(n.length-1)!==r&&(n+=r),i.indexOf(n)===0}e.isEqualOrParent=v;function C(i){return i>=65&&i<=90||i>=97&&i<=122}e.isWindowsDriveLetter=C;function s(i,n=I.isWindows){return n?C(i.charCodeAt(0))&&i.charCodeAt(1)===58:!1}e.hasDriveLetter=s}),define(te[573],ie([1,0,69,92,17,10]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.pieceToQuery=e.prepareQuery=e.scoreFuzzy2=void 0;const S=[void 0,[]];function m(d,l,o=0,c=0){const a=l;return a.values&&a.values.length>1?_(d,a.values,o,c):v(d,l,o,c)}e.scoreFuzzy2=m;function _(d,l,o,c){let a=0;const g=[];for(const h of l){const[p,b]=v(d,h,o,c);if(typeof p!="number")return S;a+=p,g.push(...b)}return[a,s(g)]}function v(d,l,o,c){const a=(0,L.fuzzyScore)(l.original,l.originalLowercase,o,d,d.toLowerCase(),c,{firstMatchCanBeWeak:!0,boostFullMatch:!0});return a?[a[0],(0,L.createMatches)(a)]:S}const C=Object.freeze({score:0});function s(d){const l=d.sort((a,g)=>a.start-g.start),o=[];let c;for(const a of l)!c||!i(c,a)?(c=a,o.push(a)):(c.start=Math.min(c.start,a.start),c.end=Math.max(c.end,a.end));return o}function i(d,l){return!(d.end=0,h=n(d);let p;const b=d.split(t);if(b.length>1)for(const w of b){const E=n(w),{pathNormalized:k,normalized:M,normalizedLowercase:R}=u(w);M&&(p||(p=[]),p.push({original:w,originalLowercase:w.toLowerCase(),pathNormalized:k,normalized:M,normalizedLowercase:R,expectContiguousMatch:E}))}return{original:d,originalLowercase:l,pathNormalized:o,normalized:c,normalizedLowercase:a,values:p,containsPathSeparator:g,expectContiguousMatch:h}}e.prepareQuery=r;function u(d){let l;y.isWindows?l=d.replace(/\//g,I.sep):l=d.replace(/\\/g,I.sep);const o=(0,D.stripWildcards)(l).replace(/\s|"/g,"");return{pathNormalized:l,normalized:o,normalizedLowercase:o.toLowerCase()}}function f(d){return Array.isArray(d)?r(d.map(l=>l.original).join(t)):r(d.original)}e.pieceToQuery=f}),define(te[308],ie([1,0,14,220,56,92,17,10]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isRelativePattern=e.parse=e.match=e.splitGlobAware=e.GLOB_SPLIT=e.GLOBSTAR=void 0,e.GLOBSTAR="**",e.GLOB_SPLIT="/";const _="[/\\\\]",v="[^/\\\\]",C=/\//g;function s(O,x){switch(O){case 0:return"";case 1:return`${v}*?`;default:return`(?:${_}|${v}+${_}${x?`|${_}${v}+`:""})*?`}}function i(O,x){if(!O)return[];const W=[];let U=!1,F=!1,G="";for(const Y of O){switch(Y){case x:if(!U&&!F){W.push(G),G="";continue}break;case"{":U=!0;break;case"}":U=!1;break;case"[":F=!0;break;case"]":F=!1;break}G+=Y}return G&&W.push(G),W}e.splitGlobAware=i;function n(O){if(!O)return"";let x="";const W=i(O,e.GLOB_SPLIT);if(W.every(U=>U===e.GLOBSTAR))x=".*";else{let U=!1;W.forEach((F,G)=>{if(F===e.GLOBSTAR){if(U)return;x+=s(2,G===W.length-1)}else{let Y=!1,ne="",se=!1,J="";for(const q of F){if(q!=="}"&&Y){ne+=q;continue}if(se&&(q!=="]"||!J)){let H;q==="-"?H=q:(q==="^"||q==="!")&&!J?H="^":q===e.GLOB_SPLIT?H="":H=(0,m.escapeRegExpCharacters)(q),J+=H;continue}switch(q){case"{":Y=!0;continue;case"[":se=!0;continue;case"}":{const V=`(?:${i(ne,",").map(Z=>n(Z)).join("|")})`;x+=V,Y=!1,ne="";break}case"]":{x+="["+J+"]",se=!1,J="";break}case"?":x+=v;continue;case"*":x+=s(1);continue;default:x+=(0,m.escapeRegExpCharacters)(q)}}Gg(ne,x)).filter(ne=>ne!==a),O),U=W.length;if(!U)return a;if(U===1)return W[0];const F=function(ne,se){for(let J=0,q=W.length;J!!ne.allBasenames);G&&(F.allBasenames=G.allBasenames);const Y=W.reduce((ne,se)=>se.allPaths?ne.concat(se.allPaths):ne,[]);return Y.length&&(F.allPaths=Y),F}function k(O,x,W){const U=D.sep===D.posix.sep,F=U?O:O.replace(C,D.sep),G=D.sep+F,Y=D.posix.sep+O;let ne;return W?ne=function(se,J){return typeof se=="string"&&(se===F||se.endsWith(G)||!U&&(se===O||se.endsWith(Y)))?x:null}:ne=function(se,J){return typeof se=="string"&&(se===F||!U&&se===O)?x:null},ne.allPaths=[(W?"*/":"./")+O],ne}function M(O){try{const x=new RegExp(`^${n(O)}$`);return function(W){return x.lastIndex=0,typeof W=="string"&&x.test(W)?O:null}}catch{return a}}function R(O,x,W){return!O||typeof x!="string"?!1:B(O)(x,void 0,W)}e.match=R;function B(O,x={}){if(!O)return c;if(typeof O=="string"||T(O)){const W=g(O,x);if(W===a)return c;const U=function(F,G){return!!W(F,G)};return W.allBasenames&&(U.allBasenames=W.allBasenames),W.allPaths&&(U.allPaths=W.allPaths),U}return N(O,x)}e.parse=B;function T(O){const x=O;return x?typeof x.base=="string"&&typeof x.pattern=="string":!1}e.isRelativePattern=T;function N(O,x){const W=P(Object.getOwnPropertyNames(O).map(ne=>A(ne,O[ne],x)).filter(ne=>ne!==a)),U=W.length;if(!U)return a;if(!W.some(ne=>!!ne.requiresSiblings)){if(U===1)return W[0];const ne=function(q,H){let V;for(let Z=0,ee=W.length;Zbe(this,void 0,void 0,function*(){for(const Z of V){const ee=yield Z;if(typeof ee=="string")return ee}return null}))():null},se=W.find(q=>!!q.allBasenames);se&&(ne.allBasenames=se.allBasenames);const J=W.reduce((q,H)=>H.allPaths?q.concat(H.allPaths):q,[]);return J.length&&(ne.allPaths=J),ne}const F=function(ne,se,J){let q,H;for(let V=0,Z=W.length;Vbe(this,void 0,void 0,function*(){for(const V of H){const Z=yield V;if(typeof Z=="string")return Z}return null}))():null},G=W.find(ne=>!!ne.allBasenames);G&&(F.allBasenames=G.allBasenames);const Y=W.reduce((ne,se)=>se.allPaths?ne.concat(se.allPaths):ne,[]);return Y.length&&(F.allPaths=Y),F}function A(O,x,W){if(x===!1)return a;const U=g(O,W);if(U===a)return a;if(typeof x=="boolean")return U;if(x){const F=x.when;if(typeof F=="string"){const G=(Y,ne,se,J)=>{if(!J||!U(Y,ne))return null;const q=F.replace("$(basename)",()=>se),H=J(q);return(0,L.isThenable)(H)?H.then(V=>V?O:null):H?O:null};return G.requiresSiblings=!0,G}}return U}function P(O,x){const W=O.filter(ne=>!!ne.basenames);if(W.length<2)return O;const U=W.reduce((ne,se)=>{const J=se.basenames;return J?ne.concat(J):ne},[]);let F;if(x){F=[];for(let ne=0,se=U.length;ne{const J=se.patterns;return J?ne.concat(J):ne},[]);const G=function(ne,se){if(typeof ne!="string")return null;if(!se){let q;for(q=ne.length;q>0;q--){const H=ne.charCodeAt(q-1);if(H===47||H===92)break}se=ne.substr(q)}const J=U.indexOf(se);return J!==-1?F[J]:null};G.basenames=U,G.patterns=F,G.allBasenames=U;const Y=O.filter(ne=>!ne.basenames);return Y.push(G),Y}}),define(te[574],ie([1,0,220,17]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.normalizeDriveLetter=void 0;function y(S,m=I.isWindows){return(0,L.hasDriveLetter)(S,m)?S.charAt(0).toUpperCase()+S.slice(1):S}e.normalizeDriveLetter=y;let D=Object.create(null)}),define(te[21],ie([1,0,92,17]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.uriToFsPath=e.URI=void 0;const y=/^\w[\w\d+.-]*$/,D=/^\//,S=/^\/\//;function m(h,p){if(!h.scheme&&p)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${h.authority}", path: "${h.path}", query: "${h.query}", fragment: "${h.fragment}"}`);if(h.scheme&&!y.test(h.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(h.path){if(h.authority){if(!D.test(h.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(S.test(h.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function _(h,p){return!h&&!p?"file":h}function v(h,p){switch(h){case"https":case"http":case"file":p?p[0]!==s&&(p=s+p):p=s;break}return p}const C="",s="/",i=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class n{static isUri(p){return p instanceof n?!0:p?typeof p.authority=="string"&&typeof p.fragment=="string"&&typeof p.path=="string"&&typeof p.query=="string"&&typeof p.scheme=="string"&&typeof p.fsPath=="string"&&typeof p.with=="function"&&typeof p.toString=="function":!1}constructor(p,b,w,E,k,M=!1){typeof p=="object"?(this.scheme=p.scheme||C,this.authority=p.authority||C,this.path=p.path||C,this.query=p.query||C,this.fragment=p.fragment||C):(this.scheme=_(p,M),this.authority=b||C,this.path=v(this.scheme,w||C),this.query=E||C,this.fragment=k||C,m(this,M))}get fsPath(){return l(this,!1)}with(p){if(!p)return this;let{scheme:b,authority:w,path:E,query:k,fragment:M}=p;return b===void 0?b=this.scheme:b===null&&(b=C),w===void 0?w=this.authority:w===null&&(w=C),E===void 0?E=this.path:E===null&&(E=C),k===void 0?k=this.query:k===null&&(k=C),M===void 0?M=this.fragment:M===null&&(M=C),b===this.scheme&&w===this.authority&&E===this.path&&k===this.query&&M===this.fragment?this:new r(b,w,E,k,M)}static parse(p,b=!1){const w=i.exec(p);return w?new r(w[2]||C,g(w[4]||C),g(w[5]||C),g(w[7]||C),g(w[9]||C),b):new r(C,C,C,C,C)}static file(p){let b=C;if(I.isWindows&&(p=p.replace(/\\/g,s)),p[0]===s&&p[1]===s){const w=p.indexOf(s,2);w===-1?(b=p.substring(2),p=s):(b=p.substring(2,w),p=p.substring(w)||s)}return new r("file",b,p,C,C)}static from(p,b){return new r(p.scheme,p.authority,p.path,p.query,p.fragment,b)}static joinPath(p,...b){if(!p.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let w;return I.isWindows&&p.scheme==="file"?w=n.file(L.win32.join(l(p,!0),...b)).path:w=L.posix.join(p.path,...b),p.with({path:w})}toString(p=!1){return o(this,p)}toJSON(){return this}static revive(p){var b,w;if(p){if(p instanceof n)return p;{const E=new r(p);return E._formatted=(b=p.external)!==null&&b!==void 0?b:null,E._fsPath=p._sep===t&&(w=p.fsPath)!==null&&w!==void 0?w:null,E}}else return p}}e.URI=n;const t=I.isWindows?1:void 0;class r extends n{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=l(this,!1)),this._fsPath}toString(p=!1){return p?o(this,!0):(this._formatted||(this._formatted=o(this,!1)),this._formatted)}toJSON(){const p={$mid:1};return this._fsPath&&(p.fsPath=this._fsPath,p._sep=t),this._formatted&&(p.external=this._formatted),this.path&&(p.path=this.path),this.scheme&&(p.scheme=this.scheme),this.authority&&(p.authority=this.authority),this.query&&(p.query=this.query),this.fragment&&(p.fragment=this.fragment),p}}const u={[58]:"%3A",[47]:"%2F",[63]:"%3F",[35]:"%23",[91]:"%5B",[93]:"%5D",[64]:"%40",[33]:"%21",[36]:"%24",[38]:"%26",[39]:"%27",[40]:"%28",[41]:"%29",[42]:"%2A",[43]:"%2B",[44]:"%2C",[59]:"%3B",[61]:"%3D",[32]:"%20"};function f(h,p,b){let w,E=-1;for(let k=0;k=97&&M<=122||M>=65&&M<=90||M>=48&&M<=57||M===45||M===46||M===95||M===126||p&&M===47||b&&M===91||b&&M===93||b&&M===58)E!==-1&&(w+=encodeURIComponent(h.substring(E,k)),E=-1),w!==void 0&&(w+=h.charAt(k));else{w===void 0&&(w=h.substr(0,k));const R=u[M];R!==void 0?(E!==-1&&(w+=encodeURIComponent(h.substring(E,k)),E=-1),w+=R):E===-1&&(E=k)}}return E!==-1&&(w+=encodeURIComponent(h.substring(E))),w!==void 0?w:h}function d(h){let p;for(let b=0;b1&&h.scheme==="file"?b=`//${h.authority}${h.path}`:h.path.charCodeAt(0)===47&&(h.path.charCodeAt(1)>=65&&h.path.charCodeAt(1)<=90||h.path.charCodeAt(1)>=97&&h.path.charCodeAt(1)<=122)&&h.path.charCodeAt(2)===58?p?b=h.path.substr(1):b=h.path[1].toLowerCase()+h.path.substr(2):b=h.path,I.isWindows&&(b=b.replace(/\//g,"\\")),b}e.uriToFsPath=l;function o(h,p){const b=p?d:f;let w="",{scheme:E,authority:k,path:M,query:R,fragment:B}=h;if(E&&(w+=E,w+=":"),(k||E==="file")&&(w+=s,w+=s),k){let T=k.indexOf("@");if(T!==-1){const N=k.substr(0,T);k=k.substr(T+1),T=N.lastIndexOf(":"),T===-1?w+=b(N,!1,!1):(w+=b(N.substr(0,T),!1,!1),w+=":",w+=b(N.substr(T+1),!1,!0)),w+="@"}k=k.toLowerCase(),T=k.lastIndexOf(":"),T===-1?w+=b(k,!1,!0):(w+=b(k.substr(0,T),!1,!0),w+=k.substr(T))}if(M){if(M.length>=3&&M.charCodeAt(0)===47&&M.charCodeAt(2)===58){const T=M.charCodeAt(1);T>=65&&T<=90&&(M=`/${String.fromCharCode(T+32)}:${M.substr(3)}`)}else if(M.length>=2&&M.charCodeAt(1)===58){const T=M.charCodeAt(0);T>=65&&T<=90&&(M=`${String.fromCharCode(T+32)}:${M.substr(2)}`)}w+=b(M,!0,!1)}return R&&(w+="?",w+=b(R,!1,!1)),B&&(w+="#",w+=p?B:f(B,!1,!1)),w}function c(h){try{return decodeURIComponent(h)}catch{return h.length>3?h.substr(0,3)+c(h.substr(3)):h}}const a=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function g(h){return h.match(a)?h.replace(a,p=>c(p)):h}}),define(te[221],ie([1,0,138,21]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.revive=e.parse=e.stringify=void 0;function y(_){return JSON.stringify(_,S)}e.stringify=y;function D(_){let v=JSON.parse(_);return v=m(v),v}e.parse=D;function S(_,v){return v instanceof RegExp?{$mid:2,source:v.source,flags:v.flags}:v}function m(_,v=0){if(!_||v>200)return _;if(typeof _=="object"){switch(_.$mid){case 1:return I.URI.revive(_);case 2:return new RegExp(_.source,_.flags);case 17:return new Date(_.source)}if(_ instanceof L.VSBuffer||_ instanceof Uint8Array)return _;if(Array.isArray(_))for(let C=0;C<_.length;++C)_[C]=m(_[C],v+1);else for(const C in _)Object.hasOwnProperty.call(_,C)&&(_[C]=m(_[C],v+1))}return _}e.revive=m}),define(te[54],ie([1,0,9,17,21]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COI=e.FileAccess=e.RemoteAuthorities=e.connectionTokenQueryName=e.Schemas=void 0;var D;(function(v){v.inMemory="inmemory",v.vscode="vscode",v.internal="private",v.walkThrough="walkThrough",v.walkThroughSnippet="walkThroughSnippet",v.http="http",v.https="https",v.file="file",v.mailto="mailto",v.untitled="untitled",v.data="data",v.command="command",v.vscodeRemote="vscode-remote",v.vscodeRemoteResource="vscode-remote-resource",v.vscodeManagedRemoteResource="vscode-managed-remote-resource",v.vscodeUserData="vscode-userdata",v.vscodeCustomEditor="vscode-custom-editor",v.vscodeNotebookCell="vscode-notebook-cell",v.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",v.vscodeNotebookCellOutput="vscode-notebook-cell-output",v.vscodeInteractiveInput="vscode-interactive-input",v.vscodeSettings="vscode-settings",v.vscodeWorkspaceTrust="vscode-workspace-trust",v.vscodeTerminal="vscode-terminal",v.vscodeChatSesssion="vscode-chat-editor",v.webviewPanel="webview-panel",v.vscodeWebview="vscode-webview",v.extension="extension",v.vscodeFileResource="vscode-file",v.tmp="tmp",v.vsls="vsls",v.vscodeSourceControl="vscode-scm"})(D||(e.Schemas=D={})),e.connectionTokenQueryName="tkn";class S{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null,this._remoteResourcesPath=`/${D.vscodeRemoteResource}`}setPreferredWebSchema(C){this._preferredWebSchema=C}rewrite(C){if(this._delegate)try{return this._delegate(C)}catch(u){return L.onUnexpectedError(u),C}const s=C.authority;let i=this._hosts[s];i&&i.indexOf(":")!==-1&&i.indexOf("[")===-1&&(i=`[${i}]`);const n=this._ports[s],t=this._connectionTokens[s];let r=`path=${encodeURIComponent(C.path)}`;return typeof t=="string"&&(r+=`&${e.connectionTokenQueryName}=${encodeURIComponent(t)}`),y.URI.from({scheme:I.isWeb?this._preferredWebSchema:D.vscodeRemoteResource,authority:`${i}:${n}`,path:this._remoteResourcesPath,query:r})}}e.RemoteAuthorities=new S;class m{uriToBrowserUri(C){return C.scheme===D.vscodeRemote?e.RemoteAuthorities.rewrite(C):C.scheme===D.file&&(I.isNative||I.isWebWorker&&I.globals.origin===`${D.vscodeFileResource}://${m.FALLBACK_AUTHORITY}`)?C.with({scheme:D.vscodeFileResource,authority:C.authority||m.FALLBACK_AUTHORITY,query:null,fragment:null}):C}}m.FALLBACK_AUTHORITY="vscode-app",e.FileAccess=new m;var _;(function(v){const C=new Map([["1",{"Cross-Origin-Opener-Policy":"same-origin"}],["2",{"Cross-Origin-Embedder-Policy":"require-corp"}],["3",{"Cross-Origin-Opener-Policy":"same-origin","Cross-Origin-Embedder-Policy":"require-corp"}]]);v.CoopAndCoep=Object.freeze(C.get("3"));const s="vscode-coi";function i(t){let r;typeof t=="string"?r=new URL(t).searchParams:t instanceof URL?r=t.searchParams:y.URI.isUri(t)&&(r=new URL(t.toString(!0)).searchParams);const u=r?.get(s);if(u)return C.get(u)}v.getHeadersFromQuery=i;function n(t,r,u){if(!globalThis.crossOriginIsolated)return;const f=r&&u?"3":u?"2":"1";t instanceof URLSearchParams?t.set(s,f):t[s]=f}v.addSearchParam=n})(_||(e.COI=_={}))}),define(te[7],ie([1,0,51,217,44,60,9,6,309,2,54,17]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.h=e.DragAndDropObserver=e.ModifierKeyEmitter=e.basicMarkupHtmlTags=e.hookDomPurifyHrefAndSrcSanitizer=e.asCssValueWithDefault=e.asCSSPropertyValue=e.asCSSUrl=e.animate=e.windowOpenNoOpener=e.computeScreenAwareSize=e.hide=e.show=e.setVisibility=e.$=e.Namespace=e.reset=e.prepend=e.append=e.trackFocus=e.restoreParentsScrollTop=e.saveParentsScrollTop=e.EventHelper=e.isEventLike=e.EventType=e.isHTMLElement=e.removeCSSRulesContainingSelector=e.createCSSRule=e.createStyleSheet=e.getActiveDocument=e.getActiveElement=e.getShadowRoot=e.isInShadowDOM=e.isShadowRoot=e.hasParentWithClass=e.findParentWithClass=e.isAncestor=e.getTotalHeight=e.getContentHeight=e.getContentWidth=e.getTotalWidth=e.getDomNodeZoomLevel=e.getDomNodePagePosition=e.size=e.getTopLeftOffset=e.Dimension=e.getClientArea=e.getComputedStyle=e.scheduleAtNextAnimationFrame=e.runAtThisOrScheduleAtNextAnimationFrame=e.addDisposableGenericMouseUpListener=e.addDisposableGenericMouseDownListener=e.addStandardDisposableGenericMouseUpListener=e.addStandardDisposableGenericMouseDownListener=e.addStandardDisposableListener=e.addDisposableListener=e.isInDOM=e.clearNode=e.onDidCreateWindow=e.getWindows=e.registerWindow=void 0,i=function(){const Se=[],_e=new m.Emitter;return{onDidCreateWindow:_e.event,registerWindow(ke){Se.push(ke);const Oe=new v.DisposableStore;return Oe.add((0,v.toDisposable)(()=>{const We=Se.indexOf(ke);We!==-1&&Se.splice(We,1)})),_e.fire({window:ke,disposableStore:Oe}),Oe},getWindows(){return Se}}}(),e.registerWindow=i.registerWindow,e.getWindows=i.getWindows,e.onDidCreateWindow=i.onDidCreateWindow;function n(Se){for(;Se.firstChild;)Se.firstChild.remove()}e.clearNode=n;function t(Se){var _e;return(_e=Se?.isConnected)!==null&&_e!==void 0?_e:!1}e.isInDOM=t;class r{constructor(_e,ke,Oe,We){this._node=_e,this._type=ke,this._handler=Oe,this._options=We||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function u(Se,_e,ke,Oe){return new r(Se,_e,ke,Oe)}e.addDisposableListener=u;function f(Se){return function(_e){return Se(new D.StandardMouseEvent(_e))}}function d(Se){return function(_e){return Se(new y.StandardKeyboardEvent(_e))}}const l=function(_e,ke,Oe,We){let qe=Oe;return ke==="click"||ke==="mousedown"?qe=f(Oe):(ke==="keydown"||ke==="keypress"||ke==="keyup")&&(qe=d(Oe)),u(_e,ke,qe,We)};e.addStandardDisposableListener=l;const o=function(_e,ke,Oe){const We=f(ke);return a(_e,We,Oe)};e.addStandardDisposableGenericMouseDownListener=o;const c=function(_e,ke,Oe){const We=f(ke);return g(_e,We,Oe)};e.addStandardDisposableGenericMouseUpListener=c;function a(Se,_e,ke){return u(Se,s.isIOS&&I.BrowserFeatures.pointerEvents?e.EventType.POINTER_DOWN:e.EventType.MOUSE_DOWN,_e,ke)}e.addDisposableGenericMouseDownListener=a;function g(Se,_e,ke){return u(Se,s.isIOS&&I.BrowserFeatures.pointerEvents?e.EventType.POINTER_UP:e.EventType.MOUSE_UP,_e,ke)}e.addDisposableGenericMouseUpListener=g;class h{constructor(_e,ke=0){this._runner=_e,this.priority=ke,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(_e){(0,S.onUnexpectedError)(_e)}}static sort(_e,ke){return ke.priority-_e.priority}}(function(){let Se=[],_e=null,ke=!1,Oe=!1;const We=()=>{for(ke=!1,_e=Se,Se=[],Oe=!0;_e.length>0;)_e.sort(h.sort),_e.shift().execute();Oe=!1};e.scheduleAtNextAnimationFrame=(qe,Ge=0)=>{const je=new h(qe,Ge);return Se.push(je),ke||(ke=!0,requestAnimationFrame(We)),je},e.runAtThisOrScheduleAtNextAnimationFrame=(qe,Ge)=>{if(Oe){const je=new h(qe,Ge);return _e.push(je),je}else return(0,e.scheduleAtNextAnimationFrame)(qe,Ge)}})();function p(Se){return Se.ownerDocument.defaultView.getComputedStyle(Se,null)}e.getComputedStyle=p;function b(Se){var _e;const ke=Se.ownerDocument,Oe=(_e=ke.defaultView)===null||_e===void 0?void 0:_e.window;if(Se!==ke.body)return new E(Se.clientWidth,Se.clientHeight);if(s.isIOS&&Oe?.visualViewport)return new E(Oe.visualViewport.width,Oe.visualViewport.height);if(Oe?.innerWidth&&Oe.innerHeight)return new E(Oe.innerWidth,Oe.innerHeight);if(ke.body&&ke.body.clientWidth&&ke.body.clientHeight)return new E(ke.body.clientWidth,ke.body.clientHeight);if(ke.documentElement&&ke.documentElement.clientWidth&&ke.documentElement.clientHeight)return new E(ke.documentElement.clientWidth,ke.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}e.getClientArea=b;class w{static convertToPixels(_e,ke){return parseFloat(ke)||0}static getDimension(_e,ke,Oe){const We=p(_e),qe=We?We.getPropertyValue(ke):"0";return w.convertToPixels(_e,qe)}static getBorderLeftWidth(_e){return w.getDimension(_e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(_e){return w.getDimension(_e,"border-right-width","borderRightWidth")}static getBorderTopWidth(_e){return w.getDimension(_e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(_e){return w.getDimension(_e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(_e){return w.getDimension(_e,"padding-left","paddingLeft")}static getPaddingRight(_e){return w.getDimension(_e,"padding-right","paddingRight")}static getPaddingTop(_e){return w.getDimension(_e,"padding-top","paddingTop")}static getPaddingBottom(_e){return w.getDimension(_e,"padding-bottom","paddingBottom")}static getMarginLeft(_e){return w.getDimension(_e,"margin-left","marginLeft")}static getMarginTop(_e){return w.getDimension(_e,"margin-top","marginTop")}static getMarginRight(_e){return w.getDimension(_e,"margin-right","marginRight")}static getMarginBottom(_e){return w.getDimension(_e,"margin-bottom","marginBottom")}}class E{constructor(_e,ke){this.width=_e,this.height=ke}with(_e=this.width,ke=this.height){return _e!==this.width||ke!==this.height?new E(_e,ke):this}static is(_e){return typeof _e=="object"&&typeof _e.height=="number"&&typeof _e.width=="number"}static lift(_e){return _e instanceof E?_e:new E(_e.width,_e.height)}static equals(_e,ke){return _e===ke?!0:!_e||!ke?!1:_e.width===ke.width&&_e.height===ke.height}}e.Dimension=E,E.None=new E(0,0);function k(Se){let _e=Se.offsetParent,ke=Se.offsetTop,Oe=Se.offsetLeft;for(;(Se=Se.parentNode)!==null&&Se!==Se.ownerDocument.body&&Se!==Se.ownerDocument.documentElement;){ke-=Se.scrollTop;const We=U(Se)?null:p(Se);We&&(Oe-=We.direction!=="rtl"?Se.scrollLeft:-Se.scrollLeft),Se===_e&&(Oe+=w.getBorderLeftWidth(Se),ke+=w.getBorderTopWidth(Se),ke+=Se.offsetTop,Oe+=Se.offsetLeft,_e=Se.offsetParent)}return{left:Oe,top:ke}}e.getTopLeftOffset=k;function M(Se,_e,ke){typeof _e=="number"&&(Se.style.width=`${_e}px`),typeof ke=="number"&&(Se.style.height=`${ke}px`)}e.size=M;function R(Se){var _e,ke,Oe,We;const qe=Se.getBoundingClientRect();return{left:qe.left+((ke=(_e=Se.ownerDocument.defaultView)===null||_e===void 0?void 0:_e.scrollX)!==null&&ke!==void 0?ke:0),top:qe.top+((We=(Oe=Se.ownerDocument.defaultView)===null||Oe===void 0?void 0:Oe.scrollY)!==null&&We!==void 0?We:0),width:qe.width,height:qe.height}}e.getDomNodePagePosition=R;function B(Se){let _e=Se,ke=1;do{const Oe=p(_e).zoom;Oe!=null&&Oe!=="1"&&(ke*=Oe),_e=_e.parentElement}while(_e!==null&&_e!==_e.ownerDocument.documentElement);return ke}e.getDomNodeZoomLevel=B;function T(Se){const _e=w.getMarginLeft(Se)+w.getMarginRight(Se);return Se.offsetWidth+_e}e.getTotalWidth=T;function N(Se){const _e=w.getBorderLeftWidth(Se)+w.getBorderRightWidth(Se),ke=w.getPaddingLeft(Se)+w.getPaddingRight(Se);return Se.offsetWidth-_e-ke}e.getContentWidth=N;function A(Se){const _e=w.getBorderTopWidth(Se)+w.getBorderBottomWidth(Se),ke=w.getPaddingTop(Se)+w.getPaddingBottom(Se);return Se.offsetHeight-_e-ke}e.getContentHeight=A;function P(Se){const _e=w.getMarginTop(Se)+w.getMarginBottom(Se);return Se.offsetHeight+_e}e.getTotalHeight=P;function O(Se,_e){for(;Se;){if(Se===_e)return!0;Se=Se.parentNode}return!1}e.isAncestor=O;function x(Se,_e,ke){for(;Se&&Se.nodeType===Se.ELEMENT_NODE;){if(Se.classList.contains(_e))return Se;if(ke){if(typeof ke=="string"){if(Se.classList.contains(ke))return null}else if(Se===ke)return null}Se=Se.parentNode}return null}e.findParentWithClass=x;function W(Se,_e,ke){return!!x(Se,_e,ke)}e.hasParentWithClass=W;function U(Se){return Se&&!!Se.host&&!!Se.mode}e.isShadowRoot=U;function F(Se){return!!G(Se)}e.isInShadowDOM=F;function G(Se){for(var _e;Se.parentNode;){if(Se===((_e=Se.ownerDocument)===null||_e===void 0?void 0:_e.body))return null;Se=Se.parentNode}return U(Se)?Se:null}e.getShadowRoot=G;function Y(){let Se=ne().activeElement;for(;Se?.shadowRoot;)Se=Se.shadowRoot.activeElement;return Se}e.getActiveElement=Y;function ne(){var Se;return(Se=[document,...(0,e.getWindows)().map(ke=>ke.document)].find(ke=>ke.hasFocus()))!==null&&Se!==void 0?Se:document}e.getActiveDocument=ne;function se(Se=document.getElementsByTagName("head")[0],_e){const ke=document.createElement("style");return ke.type="text/css",ke.media="screen",_e?.(ke),Se.appendChild(ke),ke}e.createStyleSheet=se;let J=null;function q(){return J||(J=se()),J}function H(Se){var _e,ke;return!((_e=Se?.sheet)===null||_e===void 0)&&_e.rules?Se.sheet.rules:!((ke=Se?.sheet)===null||ke===void 0)&&ke.cssRules?Se.sheet.cssRules:[]}function V(Se,_e,ke=q()){!ke||!_e||ke.sheet.insertRule(Se+"{"+_e+"}",0)}e.createCSSRule=V;function Z(Se,_e=q()){if(!_e)return;const ke=H(_e),Oe=[];for(let We=0;We=0;We--)_e.sheet.deleteRule(Oe[We])}e.removeCSSRulesContainingSelector=Z;function ee(Se){return typeof HTMLElement=="object"?Se instanceof HTMLElement:Se&&typeof Se=="object"&&Se.nodeType===1&&typeof Se.nodeName=="string"}e.isHTMLElement=ee,e.EventType={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:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",POINTER_LEAVE:"pointerleave",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",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:L.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:L.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:L.isWebKit?"webkitAnimationIteration":"animationiteration"};function le(Se){const _e=Se;return!!(_e&&typeof _e.preventDefault=="function"&&typeof _e.stopPropagation=="function")}e.isEventLike=le,e.EventHelper={stop:(Se,_e)=>(Se.preventDefault(),_e&&Se.stopPropagation(),Se)};function ue(Se){const _e=[];for(let ke=0;Se&&Se.nodeType===Se.ELEMENT_NODE;ke++)_e[ke]=Se.scrollTop,Se=Se.parentNode;return _e}e.saveParentsScrollTop=ue;function de(Se,_e){for(let ke=0;Se&&Se.nodeType===Se.ELEMENT_NODE;ke++)Se.scrollTop!==_e[ke]&&(Se.scrollTop=_e[ke]),Se=Se.parentNode}e.restoreParentsScrollTop=de;class ce extends v.Disposable{static hasFocusWithin(_e){if(ee(_e)){const ke=G(_e),Oe=ke?ke.activeElement:_e.ownerDocument.activeElement;return O(Oe,_e)}else return O(window.document.activeElement,window.document)}constructor(_e){super(),this._onDidFocus=this._register(new m.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new m.Emitter),this.onDidBlur=this._onDidBlur.event;let ke=ce.hasFocusWithin(_e),Oe=!1;const We=()=>{Oe=!1,ke||(ke=!0,this._onDidFocus.fire())},qe=()=>{ke&&(Oe=!0,window.setTimeout(()=>{Oe&&(Oe=!1,ke=!1,this._onDidBlur.fire())},0))};this._refreshStateHandler=()=>{ce.hasFocusWithin(_e)!==ke&&(ke?qe():We())},this._register(u(_e,e.EventType.FOCUS,We,!0)),this._register(u(_e,e.EventType.BLUR,qe,!0)),_e instanceof HTMLElement&&(this._register(u(_e,e.EventType.FOCUS_IN,()=>this._refreshStateHandler())),this._register(u(_e,e.EventType.FOCUS_OUT,()=>this._refreshStateHandler())))}}function ae(Se){return new ce(Se)}e.trackFocus=ae;function X(Se,..._e){if(Se.append(..._e),_e.length===1&&typeof _e[0]!="string")return _e[0]}e.append=X;function K(Se,_e){return Se.insertBefore(_e,Se.firstChild),_e}e.prepend=K;function z(Se,..._e){Se.innerText="",X(Se,..._e)}e.reset=z;const Q=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var j;(function(Se){Se.HTML="http://www.w3.org/1999/xhtml",Se.SVG="http://www.w3.org/2000/svg"})(j||(e.Namespace=j={}));function re(Se,_e,ke,...Oe){const We=Q.exec(_e);if(!We)throw new Error("Bad use of emmet");const qe=We[1]||"div";let Ge;return Se!==j.HTML?Ge=document.createElementNS(Se,qe):Ge=document.createElement(qe),We[3]&&(Ge.id=We[3]),We[4]&&(Ge.className=We[4].replace(/\./g," ").trim()),ke&&Object.entries(ke).forEach(([je,it])=>{typeof it>"u"||(/^on\w+$/.test(je)?Ge[je]=it:je==="selected"?it&&Ge.setAttribute(je,"true"):Ge.setAttribute(je,it))}),Ge.append(...Oe),Ge}function oe(Se,_e,...ke){return re(j.HTML,Se,_e,...ke)}e.$=oe,oe.SVG=function(Se,_e,...ke){return re(j.SVG,Se,_e,...ke)};function he(Se,..._e){Se?me(..._e):pe(..._e)}e.setVisibility=he;function me(...Se){for(const _e of Se)_e.style.display="",_e.removeAttribute("aria-hidden")}e.show=me;function pe(...Se){for(const _e of Se)_e.style.display="none",_e.setAttribute("aria-hidden","true")}e.hide=pe;function ve(Se){const _e=window.devicePixelRatio*Se;return Math.max(1,Math.floor(_e))/window.devicePixelRatio}e.computeScreenAwareSize=ve;function we(Se){window.open(Se,"_blank","noopener")}e.windowOpenNoOpener=we;function Le(Se){const _e=()=>{Se(),ke=(0,e.scheduleAtNextAnimationFrame)(_e)};let ke=(0,e.scheduleAtNextAnimationFrame)(_e);return(0,v.toDisposable)(()=>ke.dispose())}e.animate=Le,C.RemoteAuthorities.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Ee(Se){return Se?`url('${C.FileAccess.uriToBrowserUri(Se).toString(!0).replace(/'/g,"%27")}')`:"url('')"}e.asCSSUrl=Ee;function Ae(Se){return`'${Se.replace(/'/g,"%27")}'`}e.asCSSPropertyValue=Ae;function Re(Se,_e){if(Se!==void 0){const ke=Se.match(/^\s*var\((.+)\)$/);if(ke){const Oe=ke[1].split(",",2);return Oe.length===2&&(_e=Re(Oe[1].trim(),_e)),`var(${Oe[0]}, ${_e})`}return Se}return _e}e.asCssValueWithDefault=Re;function Be(Se,_e=!1){const ke=document.createElement("a");return _.addHook("afterSanitizeAttributes",Oe=>{for(const We of["href","src"])if(Oe.hasAttribute(We)){const qe=Oe.getAttribute(We);if(We==="href"&&qe.startsWith("#"))continue;if(ke.href=qe,!Se.includes(ke.protocol.replace(/:$/,""))){if(_e&&We==="src"&&ke.href.startsWith("data:"))continue;Oe.removeAttribute(We)}}}),(0,v.toDisposable)(()=>{_.removeHook("afterSanitizeAttributes")})}e.hookDomPurifyHrefAndSrcSanitizer=Be,e.basicMarkupHtmlTags=Object.freeze(["a","abbr","b","bdo","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","label","li","mark","ol","p","pre","q","rp","rt","ruby","samp","small","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"]);const ye=Object.freeze({ALLOWED_TAGS:["a","button","blockquote","code","div","h1","h2","h3","h4","h5","h6","hr","input","label","li","p","pre","select","small","span","strong","textarea","ul","ol"],ALLOWED_ATTR:["href","data-href","data-command","target","title","name","src","alt","class","id","role","tabindex","style","data-code","width","height","align","x-dispatch","required","checked","placeholder","type","start"],RETURN_DOM:!1,RETURN_DOM_FRAGMENT:!1,RETURN_TRUSTED_TYPE:!0});class De extends m.Emitter{constructor(){super(),this._subscriptions=new v.DisposableStore,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(u(window,"keydown",_e=>{if(_e.defaultPrevented)return;const ke=new y.StandardKeyboardEvent(_e);if(!(ke.keyCode===6&&_e.repeat)){if(_e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(_e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(_e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(_e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else if(ke.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;this._keyStatus.altKey=_e.altKey,this._keyStatus.ctrlKey=_e.ctrlKey,this._keyStatus.metaKey=_e.metaKey,this._keyStatus.shiftKey=_e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=_e,this.fire(this._keyStatus))}},!0)),this._subscriptions.add(u(window,"keyup",_e=>{_e.defaultPrevented||(!_e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!_e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!_e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!_e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=_e.altKey,this._keyStatus.ctrlKey=_e.ctrlKey,this._keyStatus.metaKey=_e.metaKey,this._keyStatus.shiftKey=_e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=_e,this.fire(this._keyStatus)))},!0)),this._subscriptions.add(u(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(u(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(u(document.body,"mousemove",_e=>{_e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(u(window,"blur",()=>{this.resetKeyStatus()}))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return De.instance||(De.instance=new De),De.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}e.ModifierKeyEmitter=De;class fe extends v.Disposable{constructor(_e,ke){super(),this.element=_e,this.callbacks=ke,this.counter=0,this.dragStartTime=0,this.registerListeners()}registerListeners(){this._register(u(this.element,e.EventType.DRAG_ENTER,_e=>{this.counter++,this.dragStartTime=_e.timeStamp,this.callbacks.onDragEnter(_e)})),this._register(u(this.element,e.EventType.DRAG_OVER,_e=>{var ke,Oe;_e.preventDefault(),(Oe=(ke=this.callbacks).onDragOver)===null||Oe===void 0||Oe.call(ke,_e,_e.timeStamp-this.dragStartTime)})),this._register(u(this.element,e.EventType.DRAG_LEAVE,_e=>{this.counter--,this.counter===0&&(this.dragStartTime=0,this.callbacks.onDragLeave(_e))})),this._register(u(this.element,e.EventType.DRAG_END,_e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDragEnd(_e)})),this._register(u(this.element,e.EventType.DROP,_e=>{this.counter=0,this.dragStartTime=0,this.callbacks.onDrop(_e)}))}}e.DragAndDropObserver=fe;const Ce=/(?[\w\-]+)?(?:#(?[\w\-]+))?(?(?:\.(?:[\w\-]+))*)(?:@(?(?:[\w\_])+))?/;function Me(Se,..._e){let ke,Oe;Array.isArray(_e[0])?(ke={},Oe=_e[0]):(ke=_e[0]||{},Oe=_e[1]);const We=Ce.exec(Se);if(!We||!We.groups)throw new Error("Bad use of h");const qe=We.groups.tag||"div",Ge=document.createElement(qe);We.groups.id&&(Ge.id=We.groups.id);const je=[];if(We.groups.class)for(const Ze of We.groups.class.split("."))Ze!==""&&je.push(Ze);if(ke.className!==void 0)for(const Ze of ke.className.split("."))Ze!==""&&je.push(Ze);je.length>0&&(Ge.className=je.join(" "));const it={};if(We.groups.name&&(it[We.groups.name]=Ge),Oe)for(const Ze of Oe)Ze instanceof HTMLElement?Ge.appendChild(Ze):typeof Ze=="string"?Ge.append(Ze):"root"in Ze&&(Object.assign(it,Ze),Ge.appendChild(Ze.root));for(const[Ze,dt]of Object.entries(ke))if(Ze!=="className")if(Ze==="style")for(const[at,nt]of Object.entries(dt))Ge.style.setProperty(Pe(at),typeof nt=="number"?nt+"px":""+nt);else Ze==="tabIndex"?Ge.tabIndex=dt:Ge.setAttribute(Pe(Ze),dt.toString());return it.root=Ge,it}e.h=Me;function Pe(Se){return Se.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}}),define(te[310],ie([1,0,7]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.renderFormattedText=e.renderText=void 0;function I(s,i={}){const n=D(i);return n.textContent=s,n}e.renderText=I;function y(s,i={}){const n=D(i);return m(n,_(s,!!i.renderCodeSegments),i.actionHandler,i.renderCodeSegments),n}e.renderFormattedText=y;function D(s){const i=s.inline?"span":"div",n=document.createElement(i);return s.className&&(n.className=s.className),n}e.createElement=D;class S{constructor(i){this.source=i,this.index=0}eos(){return this.index>=this.source.length}next(){const i=this.peek();return this.advance(),i}peek(){return this.source[this.index]}advance(){this.index++}}function m(s,i,n,t){let r;if(i.type===2)r=document.createTextNode(i.content||"");else if(i.type===3)r=document.createElement("b");else if(i.type===4)r=document.createElement("i");else if(i.type===7&&t)r=document.createElement("code");else if(i.type===5&&n){const u=document.createElement("a");n.disposables.add(L.addStandardDisposableListener(u,"click",f=>{n.callback(String(i.index),f)})),r=u}else i.type===8?r=document.createElement("br"):i.type===1&&(r=s);r&&s!==r&&s.appendChild(r),r&&Array.isArray(i.children)&&i.children.forEach(u=>{m(r,u,n,t)})}function _(s,i){const n={type:1,children:[]};let t=0,r=n;const u=[],f=new S(s);for(;!f.eos();){let d=f.next();const l=d==="\\"&&C(f.peek(),i)!==0;if(l&&(d=f.next()),!l&&v(d,i)&&d===f.peek()){f.advance(),r.type===2&&(r=u.pop());const o=C(d,i);if(r.type===o||r.type===5&&o===6)r=u.pop();else{const c={type:o,children:[]};o===5&&(c.index=t,t++),r.children.push(c),u.push(r),r=c}}else if(d===` -`)r.type===2&&(r=u.pop()),r.children.push({type:8});else if(r.type!==2){const o={type:2,content:d};r.children.push(o),u.push(r),r=o}else r.content+=d}return r.type===2&&(r=u.pop()),u.length,n}function v(s,i){return C(s,i)!==0}function C(s,i){switch(s){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return i?7:0;default:return 0}}}),define(te[151],ie([1,0,7,2]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalPointerMoveMonitor=void 0;class y{constructor(){this._hooks=new I.DisposableStore,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(S,m){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;const _=this._onStopCallback;this._onStopCallback=null,S&&_&&_(m)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(S,m,_,v,C){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=v,this._onStopCallback=C;let s=S;try{S.setPointerCapture(m),this._hooks.add((0,I.toDisposable)(()=>{try{S.releasePointerCapture(m)}catch{}}))}catch{s=window}this._hooks.add(L.addDisposableListener(s,L.EventType.POINTER_MOVE,i=>{if(i.buttons!==_){this.stopMonitoring(!0);return}i.preventDefault(),this._pointerMoveCallback(i)})),this._hooks.add(L.addDisposableListener(s,L.EventType.POINTER_UP,i=>this.stopMonitoring(!0)))}}e.GlobalPointerMoveMonitor=y}),define(te[61],ie([1,0,7,13,105,2,63]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Gesture=e.EventType=void 0;var m;(function(v){v.Tap="-monaco-gesturetap",v.Change="-monaco-gesturechange",v.Start="-monaco-gesturestart",v.End="-monaco-gesturesend",v.Contextmenu="-monaco-gesturecontextmenu"})(m||(e.EventType=m={}));class _ extends D.Disposable{constructor(){super(),this.dispatched=!1,this.targets=new S.LinkedList,this.ignoreTargets=new S.LinkedList,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(L.addDisposableListener(document,"touchstart",C=>this.onTouchStart(C),{passive:!1})),this._register(L.addDisposableListener(document,"touchend",C=>this.onTouchEnd(C))),this._register(L.addDisposableListener(document,"touchmove",C=>this.onTouchMove(C),{passive:!1}))}static addTarget(C){if(!_.isTouchDevice())return D.Disposable.None;_.INSTANCE||(_.INSTANCE=(0,D.markAsSingleton)(new _));const s=_.INSTANCE.targets.push(C);return(0,D.toDisposable)(s)}static ignoreTarget(C){if(!_.isTouchDevice())return D.Disposable.None;_.INSTANCE||(_.INSTANCE=(0,D.markAsSingleton)(new _));const s=_.INSTANCE.ignoreTargets.push(C);return(0,D.toDisposable)(s)}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(C){const s=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=C.targetTouches.length;i=_.HOLD_DELAY&&Math.abs(u.initialPageX-I.tail(u.rollingPageX))<30&&Math.abs(u.initialPageY-I.tail(u.rollingPageY))<30){const d=this.newGestureEvent(m.Contextmenu,u.initialTarget);d.pageX=I.tail(u.rollingPageX),d.pageY=I.tail(u.rollingPageY),this.dispatchEvent(d)}else if(i===1){const d=I.tail(u.rollingPageX),l=I.tail(u.rollingPageY),o=I.tail(u.rollingTimestamps)-u.rollingTimestamps[0],c=d-u.rollingPageX[0],a=l-u.rollingPageY[0],g=[...this.targets].filter(h=>u.initialTarget instanceof Node&&h.contains(u.initialTarget));this.inertia(g,s,Math.abs(c)/o,c>0?1:-1,d,Math.abs(a)/o,a>0?1:-1,l)}this.dispatchEvent(this.newGestureEvent(m.End,u.initialTarget)),delete this.activeTouches[r.identifier]}this.dispatched&&(C.preventDefault(),C.stopPropagation(),this.dispatched=!1)}newGestureEvent(C,s){const i=document.createEvent("CustomEvent");return i.initEvent(C,!1,!0),i.initialTarget=s,i.tapCount=0,i}dispatchEvent(C){if(C.type===m.Tap){const s=new Date().getTime();let i=0;s-this._lastSetTapCountTime>_.CLEAR_TAP_COUNT_TIME?i=1:i=2,this._lastSetTapCountTime=s,C.tapCount=i}else(C.type===m.Change||C.type===m.Contextmenu)&&(this._lastSetTapCountTime=0);if(C.initialTarget instanceof Node){for(const s of this.ignoreTargets)if(s.contains(C.initialTarget))return;for(const s of this.targets)s.contains(C.initialTarget)&&(s.dispatchEvent(C),this.dispatched=!0)}}inertia(C,s,i,n,t,r,u,f){this.handle=L.scheduleAtNextAnimationFrame(()=>{const d=Date.now(),l=d-s;let o=0,c=0,a=!0;i+=_.SCROLL_FRICTION*l,r+=_.SCROLL_FRICTION*l,i>0&&(a=!1,o=n*i*l),r>0&&(a=!1,c=u*r*l);const g=this.newGestureEvent(m.Change);g.translationX=o,g.translationY=c,C.forEach(h=>h.dispatchEvent(g)),a||this.inertia(C,d,i,n,t+o,r,u,f+c)})}onTouchMove(C){const s=Date.now();for(let i=0,n=C.changedTouches.length;i3&&(r.rollingPageX.shift(),r.rollingPageY.shift(),r.rollingTimestamps.shift()),r.rollingPageX.push(t.pageX),r.rollingPageY.push(t.pageY),r.rollingTimestamps.push(s)}this.dispatched&&(C.preventDefault(),C.stopPropagation(),this.dispatched=!1)}}e.Gesture=_,_.SCROLL_FRICTION=-.005,_.HOLD_DELAY=700,_.CLEAR_TAP_COUNT_TIME=400,Ie([y.memoize],_,"isTouchDevice",null)}),define(te[45],ie([1,0,7,398]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.status=e.alert=e.setARIAContainer=void 0;const I=2e4;let y,D,S,m,_;function v(n){y=document.createElement("div"),y.className="monaco-aria-container";const t=()=>{const u=document.createElement("div");return u.className="monaco-alert",u.setAttribute("role","alert"),u.setAttribute("aria-atomic","true"),y.appendChild(u),u};D=t(),S=t();const r=()=>{const u=document.createElement("div");return u.className="monaco-status",u.setAttribute("aria-live","polite"),u.setAttribute("aria-atomic","true"),y.appendChild(u),u};m=r(),_=r(),n.appendChild(y)}e.setARIAContainer=v;function C(n){y&&(D.textContent!==n?(L.clearNode(S),i(D,n)):(L.clearNode(D),i(S,n)))}e.alert=C;function s(n){y&&(m.textContent!==n?(L.clearNode(_),i(m,n)):(L.clearNode(m),i(_,n)))}e.status=s;function i(n,t){L.clearNode(n),t.length>I&&(t=t.substr(0,I)),n.textContent=t,n.style.visibility="hidden",n.style.visibility="visible"}}),define(te[311],ie([1,0,217,7,2,17,165,402]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextView=e.layout=e.LayoutAnchorMode=e.isAnchor=void 0;function m(i){const n=i;return!!n&&typeof n.x=="number"&&typeof n.y=="number"}e.isAnchor=m;var _;(function(i){i[i.AVOID=0]="AVOID",i[i.ALIGN=1]="ALIGN"})(_||(e.LayoutAnchorMode=_={}));function v(i,n,t){const r=t.mode===_.ALIGN?t.offset:t.offset+t.size,u=t.mode===_.ALIGN?t.offset+t.size:t.offset;return t.position===0?n<=i-r?r:n<=u?u-n:Math.max(i-n,0):n<=u?u-n:n<=i-r?r:0}e.layout=v;class C extends y.Disposable{constructor(n,t){super(),this.container=null,this.delegate=null,this.toDisposeOnClean=y.Disposable.None,this.toDisposeOnSetContainer=y.Disposable.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=I.$(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,I.hide(this.view),this.setContainer(n,t),this._register((0,y.toDisposable)(()=>this.setContainer(null,1)))}setContainer(n,t){var r;if(this.container&&(this.toDisposeOnSetContainer.dispose(),this.shadowRoot?(this.shadowRoot.removeChild(this.view),this.shadowRoot=null,(r=this.shadowRootHostElement)===null||r===void 0||r.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),n){if(this.container=n,this.useFixedPosition=t!==1,this.useShadowDOM=t===3,this.useShadowDOM){this.shadowRootHostElement=I.$(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const f=document.createElement("style");f.textContent=s,this.shadowRoot.appendChild(f),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(I.$("slot"))}else this.container.appendChild(this.view);const u=new y.DisposableStore;C.BUBBLE_UP_EVENTS.forEach(f=>{u.add(I.addStandardDisposableListener(this.container,f,d=>{this.onDOMEvent(d,!1)}))}),C.BUBBLE_DOWN_EVENTS.forEach(f=>{u.add(I.addStandardDisposableListener(this.container,f,d=>{this.onDOMEvent(d,!0)},!0))}),this.toDisposeOnSetContainer=u}}show(n){var t,r;this.isVisible()&&this.hide(),I.clearNode(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2575",this.view.style.position=this.useFixedPosition?"fixed":"absolute",I.show(this.view),this.toDisposeOnClean=n.render(this.view)||y.Disposable.None,this.delegate=n,this.doLayout(),(r=(t=this.delegate).focus)===null||r===void 0||r.call(t)}getViewElement(){return this.view}layout(){if(this.isVisible()){if(this.delegate.canRelayout===!1&&!(D.isIOS&&L.BrowserFeatures.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;const n=this.delegate.getAnchor();let t;if(I.isHTMLElement(n)){const g=I.getDomNodePagePosition(n),h=I.getDomNodeZoomLevel(n);t={top:g.top*h,left:g.left*h,width:g.width*h,height:g.height*h}}else m(n)?t={top:n.y,left:n.x,width:n.width||1,height:n.height||2}:t={top:n.posy,left:n.posx,width:2,height:2};const r=I.getTotalWidth(this.view),u=I.getTotalHeight(this.view),f=this.delegate.anchorPosition||0,d=this.delegate.anchorAlignment||0,l=this.delegate.anchorAxisAlignment||0;let o,c;if(l===0){const g={offset:t.top-window.pageYOffset,size:t.height,position:f===0?0:1},h={offset:t.left,size:t.width,position:d===0?0:1,mode:_.ALIGN};o=v(window.innerHeight,u,g)+window.pageYOffset,S.Range.intersects({start:o,end:o+u},{start:g.offset,end:g.offset+g.size})&&(h.mode=_.AVOID),c=v(window.innerWidth,r,h)}else{const g={offset:t.left,size:t.width,position:d===0?0:1},h={offset:t.top,size:t.height,position:f===0?0:1,mode:_.ALIGN};c=v(window.innerWidth,r,g),S.Range.intersects({start:c,end:c+r},{start:g.offset,end:g.offset+g.size})&&(h.mode=_.AVOID),o=v(window.innerHeight,u,h)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(f===0?"bottom":"top"),this.view.classList.add(d===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const a=I.getDomNodePagePosition(this.container);this.view.style.top=`${o-(this.useFixedPosition?I.getDomNodePagePosition(this.view).top:a.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?I.getDomNodePagePosition(this.view).left:a.left)}px`,this.view.style.width="initial"}hide(n){const t=this.delegate;this.delegate=null,t?.onHide&&t.onHide(n),this.toDisposeOnClean.dispose(),I.hide(this.view)}isVisible(){return!!this.delegate}onDOMEvent(n,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(n,document.activeElement):t&&!I.isAncestor(n.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}e.ContextView=C,C.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"],C.BUBBLE_DOWN_EVENTS=["click"];const s=` - :host { - all: initial; /* 1st rule so subsequent properties are reset. */ - } - - .codicon[class*='codicon-'] { - font: normal normal normal 16px/1 codicon; - display: inline-block; - text-decoration: none; - text-rendering: auto; - text-align: center; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - } - - :host { - font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; - } - - :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } - :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } - :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } - :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } - :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } - - :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } - :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } - :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } - :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } - :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } - - :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } - :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; } - :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; } - :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; } - :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; } -`}),define(te[312],ie([1,0,7,10,403]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountBadge=void 0;class y{constructor(S,m,_){this.options=m,this.styles=_,this.count=0,this.element=(0,L.append)(S,(0,L.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(S){this.count=S,this.render()}setTitleFormat(S){this.titleFormat=S,this.render()}render(){var S,m;this.element.textContent=(0,I.format)(this.countFormat,this.count),this.element.title=(0,I.format)(this.titleFormat,this.count),this.element.style.backgroundColor=(S=this.styles.badgeBackground)!==null&&S!==void 0?S:"",this.element.style.color=(m=this.styles.badgeForeground)!==null&&m!==void 0?m:"",this.styles.badgeBorder&&(this.element.style.border=`1px solid ${this.styles.badgeBorder}`)}}e.CountBadge=y}),define(te[575],ie([1,0,7,44,61,41,6,265]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenu=void 0;class m extends D.ActionRunner{constructor(C,s){super(),this._onDidChangeVisibility=this._register(new S.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=(0,L.append)(C,(0,L.$)(".monaco-dropdown")),this._label=(0,L.append)(this._element,(0,L.$)(".dropdown-label"));let i=s.labelRenderer;i||(i=t=>(t.textContent=s.label||"",null));for(const t of[L.EventType.CLICK,L.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,L.addDisposableListener)(this.element,t,r=>L.EventHelper.stop(r,!0)));for(const t of[L.EventType.MOUSE_DOWN,y.EventType.Tap])this._register((0,L.addDisposableListener)(this._label,t,r=>{r instanceof MouseEvent&&(r.detail>1||r.button!==0)||(this.visible?this.hide():this.show())}));this._register((0,L.addDisposableListener)(this._label,L.EventType.KEY_UP,t=>{const r=new I.StandardKeyboardEvent(t);(r.equals(3)||r.equals(10))&&(L.EventHelper.stop(t,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(y.Gesture.addTarget(this._label))}get element(){return this._element}show(){this.visible||(this.visible=!0,this._onDidChangeVisibility.fire(!0))}hide(){this.visible&&(this.visible=!1,this._onDidChangeVisibility.fire(!1))}dispose(){super.dispose(),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)}}class _ extends m{constructor(C,s){super(C,s),this._options=s,this._actions=[],this.actions=s.actions||[]}set menuOptions(C){this._menuOptions=C}get menuOptions(){return this._menuOptions}get actions(){return this._options.actionProvider?this._options.actionProvider.getActions():this._actions}set actions(C){this._actions=C}show(){super.show(),this.element.classList.add("active"),this._options.contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:(C,s)=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(C,s):void 0,getKeyBinding:C=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(C):void 0,getMenuClassName:()=>this._options.menuClassName||"",onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this._options.menuAsChild?this.element:void 0,skipTelemetry:this._options.skipTelemetry})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}e.DropdownMenu=_}),define(te[128],ie([1,0,7,27]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderIcon=e.renderLabelWithIcons=void 0;const y=new RegExp(`(\\\\)?\\$\\((${I.ThemeIcon.iconNameExpression}(?:${I.ThemeIcon.iconModifierExpression})?)\\)`,"g");function D(m){const _=new Array;let v,C=0,s=0;for(;(v=y.exec(m))!==null;){s=v.index||0,C{C=s===`\r -`?-1:0,i+=v;for(const n of _)n.end<=i||(n.start>=i&&(n.start+=C),n.end>=i&&(n.end+=C));return v+=C,"\u23CE"})}}e.HighlightedLabel=D}),define(te[222],ie([1,0,7,216,52,561,407]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingLabel=e.unthemedKeybindingLabelOptions=void 0;const S=L.$;e.unthemedKeybindingLabelOptions={keybindingLabelBackground:void 0,keybindingLabelForeground:void 0,keybindingLabelBorder:void 0,keybindingLabelBottomBorder:void 0,keybindingLabelShadow:void 0};class m{constructor(v,C,s){this.os=C,this.keyElements=new Set,this.options=s||Object.create(null);const i=this.options.keybindingLabelForeground;this.domNode=L.append(v,S(".monaco-keybinding")),i&&(this.domNode.style.color=i),this.didEverRender=!1,v.appendChild(this.domNode)}get element(){return this.domNode}set(v,C){this.didEverRender&&this.keybinding===v&&m.areSame(this.matches,C)||(this.keybinding=v,this.matches=C,this.render())}render(){var v;if(this.clear(),this.keybinding){const C=this.keybinding.getChords();C[0]&&this.renderChord(this.domNode,C[0],this.matches?this.matches.firstPart:null);for(let i=1;i{for(const _ of S)this.getRenderer(m).disposeTemplate(_.templateData),_.templateData=null}),this.cache.clear(),this.transactionNodesPendingRemoval.clear()}getRenderer(S){const m=this.renderers.get(S);if(!m)throw new Error(`No renderer found for ${S}`);return m}}e.RowCache=y}),define(te[577],ie([1,0,7,14,2,409]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressBar=void 0;const D="done",S="active",m="infinite",_="infinite-long-running",v="discrete";class C extends y.Disposable{constructor(i,n){super(),this.workedVal=0,this.showDelayedScheduler=this._register(new I.RunOnceScheduler(()=>(0,L.show)(this.element),0)),this.longRunningScheduler=this._register(new I.RunOnceScheduler(()=>this.infiniteLongRunning(),C.LONG_RUNNING_INFINITE_THRESHOLD)),this.create(i,n)}create(i,n){this.element=document.createElement("div"),this.element.classList.add("monaco-progress-container"),this.element.setAttribute("role","progressbar"),this.element.setAttribute("aria-valuemin","0"),i.appendChild(this.element),this.bit=document.createElement("div"),this.bit.classList.add("progress-bit"),this.bit.style.backgroundColor=n?.progressBarBackground||"#0E70C0",this.element.appendChild(this.bit)}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(S,m,_,v),this.workedVal=0,this.totalWork=void 0,this.longRunningScheduler.cancel()}stop(){return this.doDone(!1)}doDone(i){return this.element.classList.add(D),this.element.classList.contains(m)?(this.bit.style.opacity="0",i?setTimeout(()=>this.off(),200):this.off()):(this.bit.style.width="inherit",i?setTimeout(()=>this.off(),200):this.off()),this}infinite(){return this.bit.style.width="2%",this.bit.style.opacity="1",this.element.classList.remove(v,D,_),this.element.classList.add(S,m),this.longRunningScheduler.schedule(),this}infiniteLongRunning(){this.element.classList.add(_)}getContainer(){return this.element}}e.ProgressBar=C,C.LONG_RUNNING_INFINITE_THRESHOLD=1e4}),define(te[152],ie([1,0,7,79,61,14,105,6,2,17,410]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Sash=e.OrthogonalEdge=void 0;const C=!1;var s;(function(c){c.North="north",c.South="south",c.East="east",c.West="west"})(s||(e.OrthogonalEdge=s={}));let i=4;const n=new m.Emitter;let t=300;const r=new m.Emitter;class u{constructor(){this.disposables=new _.DisposableStore}get onPointerMove(){return this.disposables.add(new I.DomEmitter(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new I.DomEmitter(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Ie([S.memoize],u.prototype,"onPointerMove",null),Ie([S.memoize],u.prototype,"onPointerUp",null);class f{get onPointerMove(){return this.disposables.add(new I.DomEmitter(this.el,y.EventType.Change)).event}get onPointerUp(){return this.disposables.add(new I.DomEmitter(this.el,y.EventType.End)).event}constructor(a){this.el=a,this.disposables=new _.DisposableStore}dispose(){this.disposables.dispose()}}Ie([S.memoize],f.prototype,"onPointerMove",null),Ie([S.memoize],f.prototype,"onPointerUp",null);class d{get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}constructor(a){this.factory=a}dispose(){}}Ie([S.memoize],d.prototype,"onPointerMove",null),Ie([S.memoize],d.prototype,"onPointerUp",null);const l="pointer-events-disabled";class o extends _.Disposable{get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(a){this._state!==a&&(this.el.classList.toggle("disabled",a===0),this.el.classList.toggle("minimum",a===1),this.el.classList.toggle("maximum",a===2),this._state=a,this.onDidEnablementChange.fire(a))}set orthogonalStartSash(a){if(this._orthogonalStartSash!==a){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),a){const g=h=>{this.orthogonalStartDragHandleDisposables.clear(),h!==0&&(this._orthogonalStartDragHandle=(0,L.append)(this.el,(0,L.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,_.toDisposable)(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new I.DomEmitter(this._orthogonalStartDragHandle,"mouseenter")).event(()=>o.onMouseEnter(a),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new I.DomEmitter(this._orthogonalStartDragHandle,"mouseleave")).event(()=>o.onMouseLeave(a),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(a.onDidEnablementChange.event(g,this)),g(a.state)}this._orthogonalStartSash=a}}set orthogonalEndSash(a){if(this._orthogonalEndSash!==a){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),a){const g=h=>{this.orthogonalEndDragHandleDisposables.clear(),h!==0&&(this._orthogonalEndDragHandle=(0,L.append)(this.el,(0,L.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,_.toDisposable)(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new I.DomEmitter(this._orthogonalEndDragHandle,"mouseenter")).event(()=>o.onMouseEnter(a),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new I.DomEmitter(this._orthogonalEndDragHandle,"mouseleave")).event(()=>o.onMouseLeave(a),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(a.onDidEnablementChange.event(g,this)),g(a.state)}this._orthogonalEndSash=a}}constructor(a,g,h){super(),this.hoverDelay=t,this.hoverDelayer=this._register(new D.Delayer(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new m.Emitter),this._onDidStart=this._register(new m.Emitter),this._onDidChange=this._register(new m.Emitter),this._onDidReset=this._register(new m.Emitter),this._onDidEnd=this._register(new m.Emitter),this.orthogonalStartSashDisposables=this._register(new _.DisposableStore),this.orthogonalStartDragHandleDisposables=this._register(new _.DisposableStore),this.orthogonalEndSashDisposables=this._register(new _.DisposableStore),this.orthogonalEndDragHandleDisposables=this._register(new _.DisposableStore),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,L.append)(a,(0,L.$)(".monaco-sash")),h.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${h.orthogonalEdge}`),v.isMacintosh&&this.el.classList.add("mac");const p=this._register(new I.DomEmitter(this.el,"mousedown")).event;this._register(p(B=>this.onPointerStart(B,new u),this));const b=this._register(new I.DomEmitter(this.el,"dblclick")).event;this._register(b(this.onPointerDoublePress,this));const w=this._register(new I.DomEmitter(this.el,"mouseenter")).event;this._register(w(()=>o.onMouseEnter(this)));const E=this._register(new I.DomEmitter(this.el,"mouseleave")).event;this._register(E(()=>o.onMouseLeave(this))),this._register(y.Gesture.addTarget(this.el));const k=this._register(new I.DomEmitter(this.el,y.EventType.Start)).event;this._register(k(B=>this.onPointerStart(B,new f(this.el)),this));const M=this._register(new I.DomEmitter(this.el,y.EventType.Tap)).event;let R;this._register(M(B=>{if(R){clearTimeout(R),R=void 0,this.onPointerDoublePress(B);return}clearTimeout(R),R=setTimeout(()=>R=void 0,250)},this)),typeof h.size=="number"?(this.size=h.size,h.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=i,this._register(n.event(B=>{this.size=B,this.layout()}))),this._register(r.event(B=>this.hoverDelay=B)),this.layoutProvider=g,this.orthogonalStartSash=h.orthogonalStartSash,this.orthogonalEndSash=h.orthogonalEndSash,this.orientation=h.orientation||0,this.orientation===1?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",C),this.layout()}onPointerStart(a,g){L.EventHelper.stop(a);let h=!1;if(!a.__orthogonalSashEvent){const A=this.getOrthogonalSash(a);A&&(h=!0,a.__orthogonalSashEvent=!0,A.onPointerStart(a,new d(g)))}if(this.linkedSash&&!a.__linkedSashEvent&&(a.__linkedSashEvent=!0,this.linkedSash.onPointerStart(a,new d(g))),!this.state)return;const p=document.getElementsByTagName("iframe");for(const A of p)A.classList.add(l);const b=a.pageX,w=a.pageY,E=a.altKey,k={startX:b,currentX:b,startY:w,currentY:w,altKey:E};this.el.classList.add("active"),this._onDidStart.fire(k);const M=(0,L.createStyleSheet)(this.el),R=()=>{let A="";h?A="all-scroll":this.orientation===1?this.state===1?A="s-resize":this.state===2?A="n-resize":A=v.isMacintosh?"row-resize":"ns-resize":this.state===1?A="e-resize":this.state===2?A="w-resize":A=v.isMacintosh?"col-resize":"ew-resize",M.textContent=`* { cursor: ${A} !important; }`},B=new _.DisposableStore;R(),h||this.onDidEnablementChange.event(R,null,B);const T=A=>{L.EventHelper.stop(A,!1);const P={startX:b,currentX:A.pageX,startY:w,currentY:A.pageY,altKey:E};this._onDidChange.fire(P)},N=A=>{L.EventHelper.stop(A,!1),this.el.removeChild(M),this.el.classList.remove("active"),this._onDidEnd.fire(),B.dispose();for(const P of p)P.classList.remove(l)};g.onPointerMove(T,null,B),g.onPointerUp(N,null,B),B.add(g)}onPointerDoublePress(a){const g=this.getOrthogonalSash(a);g&&g._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(a,g=!1){a.el.classList.contains("active")?(a.hoverDelayer.cancel(),a.el.classList.add("hover")):a.hoverDelayer.trigger(()=>a.el.classList.add("hover"),a.hoverDelay).then(void 0,()=>{}),!g&&a.linkedSash&&o.onMouseEnter(a.linkedSash,!0)}static onMouseLeave(a,g=!1){a.hoverDelayer.cancel(),a.el.classList.remove("hover"),!g&&a.linkedSash&&o.onMouseLeave(a.linkedSash,!0)}clearSashHoverState(){o.onMouseLeave(this)}layout(){if(this.orientation===0){const a=this.layoutProvider;this.el.style.left=a.getVerticalSashLeft(this)-this.size/2+"px",a.getVerticalSashTop&&(this.el.style.top=a.getVerticalSashTop(this)+"px"),a.getVerticalSashHeight&&(this.el.style.height=a.getVerticalSashHeight(this)+"px")}else{const a=this.layoutProvider;this.el.style.top=a.getHorizontalSashTop(this)-this.size/2+"px",a.getHorizontalSashLeft&&(this.el.style.left=a.getHorizontalSashLeft(this)+"px"),a.getHorizontalSashWidth&&(this.el.style.width=a.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(a){var g;const h=(g=a.initialTarget)!==null&&g!==void 0?g:a.target;if(!(!h||!(h instanceof HTMLElement))&&h.classList.contains("orthogonal-drag-handle"))return h.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}e.Sash=o}),define(te[223],ie([1,0,7,152,6,2]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableHTMLElement=void 0;class S{constructor(){this._onDidWillResize=new y.Emitter,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new y.Emitter,this.onDidResize=this._onDidResize.event,this._sashListener=new D.DisposableStore,this._size=new L.Dimension(0,0),this._minSize=new L.Dimension(0,0),this._maxSize=new L.Dimension(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new I.Sash(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new I.Sash(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new I.Sash(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:I.OrthogonalEdge.North}),this._southSash=new I.Sash(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:I.OrthogonalEdge.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let _,v=0,C=0;this._sashListener.add(y.Event.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{_===void 0&&(this._onDidWillResize.fire(),_=this._size,v=0,C=0)})),this._sashListener.add(y.Event.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{_!==void 0&&(_=void 0,v=0,C=0,this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(this._eastSash.onDidChange(s=>{_&&(C=s.currentX-s.startX,this.layout(_.height+v,_.width+C),this._onDidResize.fire({dimension:this._size,done:!1,east:!0}))})),this._sashListener.add(this._westSash.onDidChange(s=>{_&&(C=-(s.currentX-s.startX),this.layout(_.height+v,_.width+C),this._onDidResize.fire({dimension:this._size,done:!1,west:!0}))})),this._sashListener.add(this._northSash.onDidChange(s=>{_&&(v=-(s.currentY-s.startY),this.layout(_.height+v,_.width+C),this._onDidResize.fire({dimension:this._size,done:!1,north:!0}))})),this._sashListener.add(this._southSash.onDidChange(s=>{_&&(v=s.currentY-s.startY,this.layout(_.height+v,_.width+C),this._onDidResize.fire({dimension:this._size,done:!1,south:!0}))})),this._sashListener.add(y.Event.any(this._eastSash.onDidReset,this._westSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(y.Event.any(this._northSash.onDidReset,this._southSash.onDidReset)(s=>{this._preferredSize&&(this.layout(this._preferredSize.height,this._size.width),this._onDidResize.fire({dimension:this._size,done:!0}))}))}dispose(){this._northSash.dispose(),this._southSash.dispose(),this._eastSash.dispose(),this._westSash.dispose(),this._sashListener.dispose(),this._onDidResize.dispose(),this._onDidWillResize.dispose(),this.domNode.remove()}enableSashes(_,v,C,s){this._northSash.state=_?3:0,this._eastSash.state=v?3:0,this._southSash.state=C?3:0,this._westSash.state=s?3:0}layout(_=this.size.height,v=this.size.width){const{height:C,width:s}=this._minSize,{height:i,width:n}=this._maxSize;_=Math.max(C,Math.min(i,_)),v=Math.max(s,Math.min(n,v));const t=new L.Dimension(v,_);L.Dimension.equals(t,this._size)||(this.domNode.style.height=_+"px",this.domNode.style.width=v+"px",this._size=t,this._northSash.layout(),this._eastSash.layout(),this._southSash.layout(),this._westSash.layout())}clearSashHoverState(){this._eastSash.clearSashHoverState(),this._westSash.clearSashHoverState(),this._northSash.clearSashHoverState(),this._southSash.clearSashHoverState()}get size(){return this._size}set maxSize(_){this._maxSize=_}get maxSize(){return this._maxSize}set minSize(_){this._minSize=_}get minSize(){return this._minSize}set preferredSize(_){this._preferredSize=_}get preferredSize(){return this._preferredSize}}e.ResizableHTMLElement=S}),define(te[578],ie([1,0,7,61,13,6,2,17]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectBoxNative=void 0;class _ extends S.Disposable{constructor(C,s,i,n){super(),this.selected=0,this.selectBoxOptions=n||Object.create(null),this.options=[],this.selectElement=document.createElement("select"),this.selectElement.className="monaco-select-box",typeof this.selectBoxOptions.ariaLabel=="string"&&this.selectElement.setAttribute("aria-label",this.selectBoxOptions.ariaLabel),typeof this.selectBoxOptions.ariaDescription=="string"&&this.selectElement.setAttribute("aria-description",this.selectBoxOptions.ariaDescription),this._onDidSelect=this._register(new D.Emitter),this.styles=i,this.registerListeners(),this.setOptions(C,s)}registerListeners(){this._register(I.Gesture.addTarget(this.selectElement)),[I.EventType.Tap].forEach(C=>{this._register(L.addDisposableListener(this.selectElement,C,s=>{this.selectElement.focus()}))}),this._register(L.addStandardDisposableListener(this.selectElement,"click",C=>{L.EventHelper.stop(C,!0)})),this._register(L.addStandardDisposableListener(this.selectElement,"change",C=>{this.selectElement.title=C.target.value,this._onDidSelect.fire({index:C.target.selectedIndex,selected:C.target.value})})),this._register(L.addStandardDisposableListener(this.selectElement,"keydown",C=>{let s=!1;m.isMacintosh?(C.keyCode===18||C.keyCode===16||C.keyCode===10)&&(s=!0):(C.keyCode===18&&C.altKey||C.keyCode===10||C.keyCode===3)&&(s=!0),s&&C.stopPropagation()}))}get onDidSelect(){return this._onDidSelect.event}setOptions(C,s){(!this.options||!y.equals(this.options,C))&&(this.options=C,this.selectElement.options.length=0,this.options.forEach((i,n)=>{this.selectElement.add(this.createOption(i.text,n,i.isDisabled))})),s!==void 0&&this.select(s)}select(C){this.options.length===0?this.selected=0:C>=0&&Cthis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.selectedC(new y.StandardMouseEvent(s))))}onmousedown(v,C){this._register(L.addDisposableListener(v,L.EventType.MOUSE_DOWN,s=>C(new y.StandardMouseEvent(s))))}onmouseover(v,C){this._register(L.addDisposableListener(v,L.EventType.MOUSE_OVER,s=>C(new y.StandardMouseEvent(s))))}onmouseleave(v,C){this._register(L.addDisposableListener(v,L.EventType.MOUSE_LEAVE,s=>C(new y.StandardMouseEvent(s))))}onkeydown(v,C){this._register(L.addDisposableListener(v,L.EventType.KEY_DOWN,s=>C(new I.StandardKeyboardEvent(s))))}onkeyup(v,C){this._register(L.addDisposableListener(v,L.EventType.KEY_UP,s=>C(new I.StandardKeyboardEvent(s))))}oninput(v,C){this._register(L.addDisposableListener(v,L.EventType.INPUT,C))}onblur(v,C){this._register(L.addDisposableListener(v,L.EventType.BLUR,C))}onfocus(v,C){this._register(L.addDisposableListener(v,L.EventType.FOCUS,C))}ignoreGesture(v){return D.Gesture.ignoreTarget(v)}}e.Widget=m}),define(te[224],ie([1,0,151,83,14,27,7]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollbarArrow=e.ARROW_IMG_SIZE=void 0,e.ARROW_IMG_SIZE=11;class m extends I.Widget{constructor(v){super(),this._onActivate=v.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=v.bgWidth+"px",this.bgDomNode.style.height=v.bgHeight+"px",typeof v.top<"u"&&(this.bgDomNode.style.top="0px"),typeof v.left<"u"&&(this.bgDomNode.style.left="0px"),typeof v.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof v.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=v.className,this.domNode.classList.add(...D.ThemeIcon.asClassNameArray(v.icon)),this.domNode.style.position="absolute",this.domNode.style.width=e.ARROW_IMG_SIZE+"px",this.domNode.style.height=e.ARROW_IMG_SIZE+"px",typeof v.top<"u"&&(this.domNode.style.top=v.top+"px"),typeof v.left<"u"&&(this.domNode.style.left=v.left+"px"),typeof v.bottom<"u"&&(this.domNode.style.bottom=v.bottom+"px"),typeof v.right<"u"&&(this.domNode.style.right=v.right+"px"),this._pointerMoveMonitor=this._register(new L.GlobalPointerMoveMonitor),this._register(S.addStandardDisposableListener(this.bgDomNode,S.EventType.POINTER_DOWN,C=>this._arrowPointerDown(C))),this._register(S.addStandardDisposableListener(this.domNode,S.EventType.POINTER_DOWN,C=>this._arrowPointerDown(C))),this._pointerdownRepeatTimer=this._register(new y.IntervalTimer),this._pointerdownScheduleRepeatTimer=this._register(new y.TimeoutTimer)}_arrowPointerDown(v){if(!v.target||!(v.target instanceof Element))return;const C=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(C,200),this._pointerMoveMonitor.startMonitoring(v.target,v.pointerId,v.buttons,s=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),v.preventDefault()}}e.ScrollbarArrow=m}),define(te[314],ie([1,0,7,38,151,224,570,83,17]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractScrollbar=void 0;const v=140;class C extends m.Widget{constructor(i){super(),this._lazyRender=i.lazyRender,this._host=i.host,this._scrollable=i.scrollable,this._scrollByPage=i.scrollByPage,this._scrollbarState=i.scrollbarState,this._visibilityController=this._register(new S.ScrollbarVisibilityController(i.visibility,"visible scrollbar "+i.extraScrollbarClassName,"invisible scrollbar "+i.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new y.GlobalPointerMoveMonitor),this._shouldRender=!0,this.domNode=(0,I.createFastDomNode)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(L.addDisposableListener(this.domNode.domNode,L.EventType.POINTER_DOWN,n=>this._domNodePointerDown(n)))}_createArrow(i){const n=this._register(new D.ScrollbarArrow(i));this.domNode.domNode.appendChild(n.bgDomNode),this.domNode.domNode.appendChild(n.domNode)}_createSlider(i,n,t,r){this.slider=(0,I.createFastDomNode)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(i),this.slider.setLeft(n),typeof t=="number"&&this.slider.setWidth(t),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(L.addDisposableListener(this.slider.domNode,L.EventType.POINTER_DOWN,u=>{u.button===0&&(u.preventDefault(),this._sliderPointerDown(u))})),this.onclick(this.slider.domNode,u=>{u.leftButton&&u.stopPropagation()})}_onElementSize(i){return this._scrollbarState.setVisibleSize(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(i){return this._scrollbarState.setScrollSize(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(i){return this._scrollbarState.setScrollPosition(i)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(i){i.target===this.domNode.domNode&&this._onPointerDown(i)}delegatePointerDown(i){const n=this.domNode.domNode.getClientRects()[0].top,t=n+this._scrollbarState.getSliderPosition(),r=n+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),u=this._sliderPointerPosition(i);t<=u&&u<=r?i.button===0&&(i.preventDefault(),this._sliderPointerDown(i)):this._onPointerDown(i)}_onPointerDown(i){let n,t;if(i.target===this.domNode.domNode&&typeof i.offsetX=="number"&&typeof i.offsetY=="number")n=i.offsetX,t=i.offsetY;else{const u=L.getDomNodePagePosition(this.domNode.domNode);n=i.pageX-u.left,t=i.pageY-u.top}const r=this._pointerDownRelativePosition(n,t);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),i.button===0&&(i.preventDefault(),this._sliderPointerDown(i))}_sliderPointerDown(i){if(!i.target||!(i.target instanceof Element))return;const n=this._sliderPointerPosition(i),t=this._sliderOrthogonalPointerPosition(i),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(i.target,i.pointerId,i.buttons,u=>{const f=this._sliderOrthogonalPointerPosition(u),d=Math.abs(f-t);if(_.isWindows&&d>v){this._setDesiredScrollPositionNow(r.getScrollPosition());return}const o=this._sliderPointerPosition(u)-n;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(o))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(i){const n={};this.writeScrollPosition(n,i),this._scrollable.setScrollPositionNow(n)}updateScrollbarSize(i){this._updateScrollbarSize(i),this._scrollbarState.setScrollbarSize(i),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}e.AbstractScrollbar=C}),define(te[579],ie([1,0,60,314,224,195,26]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HorizontalScrollbar=void 0;class m extends I.AbstractScrollbar{constructor(v,C,s){const i=v.getScrollDimensions(),n=v.getCurrentScrollPosition();if(super({lazyRender:C.lazyRender,host:s,scrollbarState:new D.ScrollbarState(C.horizontalHasArrows?C.arrowSize:0,C.horizontal===2?0:C.horizontalScrollbarSize,C.vertical===2?0:C.verticalScrollbarSize,i.width,i.scrollWidth,n.scrollLeft),visibility:C.horizontal,extraScrollbarClassName:"horizontal",scrollable:v,scrollByPage:C.scrollByPage}),C.horizontalHasArrows){const t=(C.arrowSize-y.ARROW_IMG_SIZE)/2,r=(C.horizontalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:S.Codicon.scrollbarButtonLeft,top:r,left:t,bottom:void 0,right:void 0,bgWidth:C.arrowSize,bgHeight:C.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,1,0))}),this._createArrow({className:"scra",icon:S.Codicon.scrollbarButtonRight,top:r,left:void 0,bottom:void 0,right:t,bgWidth:C.arrowSize,bgHeight:C.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,-1,0))})}this._createSlider(Math.floor((C.horizontalScrollbarSize-C.horizontalSliderSize)/2),0,void 0,C.horizontalSliderSize)}_updateSlider(v,C){this.slider.setWidth(v),this.slider.setLeft(C)}_renderDomNode(v,C){this.domNode.setWidth(v),this.domNode.setHeight(C),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(v){return this._shouldRender=this._onElementScrollSize(v.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(v.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(v.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(v,C){return v}_sliderPointerPosition(v){return v.pageX}_sliderOrthogonalPointerPosition(v){return v.pageY}_updateScrollbarSize(v){this.slider.setHeight(v)}writeScrollPosition(v,C){v.scrollLeft=C}updateOptions(v){this.updateScrollbarSize(v.horizontal===2?0:v.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(v.vertical===2?0:v.verticalScrollbarSize),this._visibilityController.setVisibility(v.horizontal),this._scrollByPage=v.scrollByPage}}e.HorizontalScrollbar=m}),define(te[580],ie([1,0,60,314,224,195,26]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VerticalScrollbar=void 0;class m extends I.AbstractScrollbar{constructor(v,C,s){const i=v.getScrollDimensions(),n=v.getCurrentScrollPosition();if(super({lazyRender:C.lazyRender,host:s,scrollbarState:new D.ScrollbarState(C.verticalHasArrows?C.arrowSize:0,C.vertical===2?0:C.verticalScrollbarSize,0,i.height,i.scrollHeight,n.scrollTop),visibility:C.vertical,extraScrollbarClassName:"vertical",scrollable:v,scrollByPage:C.scrollByPage}),C.verticalHasArrows){const t=(C.arrowSize-y.ARROW_IMG_SIZE)/2,r=(C.verticalScrollbarSize-y.ARROW_IMG_SIZE)/2;this._createArrow({className:"scra",icon:S.Codicon.scrollbarButtonUp,top:t,left:r,bottom:void 0,right:void 0,bgWidth:C.verticalScrollbarSize,bgHeight:C.arrowSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,0,1))}),this._createArrow({className:"scra",icon:S.Codicon.scrollbarButtonDown,top:void 0,left:r,bottom:t,right:void 0,bgWidth:C.verticalScrollbarSize,bgHeight:C.arrowSize,onActivate:()=>this._host.onMouseWheel(new L.StandardWheelEvent(null,0,-1))})}this._createSlider(0,Math.floor((C.verticalScrollbarSize-C.verticalSliderSize)/2),C.verticalSliderSize,void 0)}_updateSlider(v,C){this.slider.setHeight(v),this.slider.setTop(C)}_renderDomNode(v,C){this.domNode.setWidth(C),this.domNode.setHeight(v),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(v){return this._shouldRender=this._onElementScrollSize(v.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(v.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(v.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(v,C){return C}_sliderPointerPosition(v){return v.pageY}_sliderOrthogonalPointerPosition(v){return v.pageX}_updateScrollbarSize(v){this.slider.setWidth(v)}writeScrollPosition(v,C){v.scrollTop=C}updateOptions(v){this.updateScrollbarSize(v.vertical===2?0:v.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(v.vertical),this._scrollByPage=v.scrollByPage}}e.VerticalScrollbar=m}),define(te[84],ie([1,0,51,7,38,60,579,580,83,14,6,2,17,166,411]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DomScrollableElement=e.SmoothScrollableElement=e.ScrollableElement=e.AbstractScrollableElement=e.MouseWheelClassifier=void 0;const t=500,r=50,u=!0;class f{constructor(p,b,w){this.timestamp=p,this.deltaX=b,this.deltaY=w,this.score=0}}class d{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let p=1,b=0,w=1,E=this._rear;do{const k=E===this._front?p:Math.pow(2,-w);if(p-=k,b+=this._memory[E].score*k,E===this._front)break;E=(this._capacity+E-1)%this._capacity,w++}while(!0);return b<=.5}acceptStandardWheelEvent(p){const b=window.devicePixelRatio/(0,L.getZoomFactor)();i.isWindows||i.isLinux?this.accept(Date.now(),p.deltaX/b,p.deltaY/b):this.accept(Date.now(),p.deltaX,p.deltaY)}accept(p,b,w){const E=new f(p,b,w);E.score=this._computeScore(E),this._front===-1&&this._rear===-1?(this._memory[0]=E,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]=E)}_computeScore(p){if(Math.abs(p.deltaX)>0&&Math.abs(p.deltaY)>0)return 1;let b=.5;const w=this._front===-1&&this._rear===-1?null:this._memory[this._rear];return(!this._isAlmostInt(p.deltaX)||!this._isAlmostInt(p.deltaY))&&(b+=.25),Math.min(Math.max(b,0),1)}_isAlmostInt(p){return Math.abs(Math.round(p)-p)<.01}}e.MouseWheelClassifier=d,d.INSTANCE=new d;class l extends _.Widget{get options(){return this._options}constructor(p,b,w){super(),this._onScroll=this._register(new C.Emitter),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new C.Emitter),p.style.overflow="hidden",this._options=g(b),this._scrollable=w,this._register(this._scrollable.onScroll(k=>{this._onWillScroll.fire(k),this._onDidScroll(k),this._onScroll.fire(k)}));const E={onMouseWheel:k=>this._onMouseWheel(k),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new m.VerticalScrollbar(this._scrollable,this._options,E)),this._horizontalScrollbar=this._register(new S.HorizontalScrollbar(this._scrollable,this._options,E)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(p),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,y.createFastDomNode)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,k=>this._onMouseOver(k)),this.onmouseleave(this._listenOnDomNode,k=>this._onMouseLeave(k)),this._hideTimeout=this._register(new v.TimeoutTimer),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=(0,s.dispose)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(p){this._verticalScrollbar.delegatePointerDown(p)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(p){this._scrollable.setScrollDimensions(p,!1)}updateClassName(p){this._options.className=p,i.isMacintosh&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(p){typeof p.handleMouseWheel<"u"&&(this._options.handleMouseWheel=p.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof p.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=p.mouseWheelScrollSensitivity),typeof p.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=p.fastScrollSensitivity),typeof p.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=p.scrollPredominantAxis),typeof p.horizontal<"u"&&(this._options.horizontal=p.horizontal),typeof p.vertical<"u"&&(this._options.vertical=p.vertical),typeof p.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=p.horizontalScrollbarSize),typeof p.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=p.verticalScrollbarSize),typeof p.scrollByPage<"u"&&(this._options.scrollByPage=p.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}delegateScrollFromMouseWheelEvent(p){this._onMouseWheel(new D.StandardWheelEvent(p))}_setListeningToMouseWheel(p){if(this._mouseWheelToDispose.length>0!==p&&(this._mouseWheelToDispose=(0,s.dispose)(this._mouseWheelToDispose),p)){const w=E=>{this._onMouseWheel(new D.StandardWheelEvent(E))};this._mouseWheelToDispose.push(I.addDisposableListener(this._listenOnDomNode,I.EventType.MOUSE_WHEEL,w,{passive:!1}))}}_onMouseWheel(p){var b;if(!((b=p.browserEvent)===null||b===void 0)&&b.defaultPrevented)return;const w=d.INSTANCE;u&&w.acceptStandardWheelEvent(p);let E=!1;if(p.deltaY||p.deltaX){let M=p.deltaY*this._options.mouseWheelScrollSensitivity,R=p.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&R+M===0?R=M=0:Math.abs(M)>=Math.abs(R)?R=0:M=0),this._options.flipAxes&&([M,R]=[R,M]);const B=!i.isMacintosh&&p.browserEvent&&p.browserEvent.shiftKey;(this._options.scrollYToX||B)&&!R&&(R=M,M=0),p.browserEvent&&p.browserEvent.altKey&&(R=R*this._options.fastScrollSensitivity,M=M*this._options.fastScrollSensitivity);const T=this._scrollable.getFutureScrollPosition();let N={};if(M){const A=r*M,P=T.scrollTop-(A<0?Math.floor(A):Math.ceil(A));this._verticalScrollbar.writeScrollPosition(N,P)}if(R){const A=r*R,P=T.scrollLeft-(A<0?Math.floor(A):Math.ceil(A));this._horizontalScrollbar.writeScrollPosition(N,P)}N=this._scrollable.validateScrollPosition(N),(T.scrollLeft!==N.scrollLeft||T.scrollTop!==N.scrollTop)&&(u&&this._options.mouseWheelSmoothScroll&&w.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(N):this._scrollable.setScrollPositionNow(N),E=!0)}let k=E;!k&&this._options.alwaysConsumeMouseWheel&&(k=!0),!k&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(k=!0),k&&(p.preventDefault(),p.stopPropagation())}_onDidScroll(p){this._shouldRender=this._horizontalScrollbar.onDidScroll(p)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(p)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const p=this._scrollable.getCurrentScrollPosition(),b=p.scrollTop>0,w=p.scrollLeft>0,E=w?" left":"",k=b?" top":"",M=w||b?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${E}`),this._topShadowDomNode.setClassName(`shadow${k}`),this._topLeftShadowDomNode.setClassName(`shadow${M}${k}${E}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(p){this._mouseIsOver=!1,this._hide()}_onMouseOver(p){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),t)}}e.AbstractScrollableElement=l;class o extends l{constructor(p,b){b=b||{},b.mouseWheelSmoothScroll=!1;const w=new n.Scrollable({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>I.scheduleAtNextAnimationFrame(E)});super(p,b,w),this._register(w)}setScrollPosition(p){this._scrollable.setScrollPositionNow(p)}}e.ScrollableElement=o;class c extends l{constructor(p,b,w){super(p,b,w)}setScrollPosition(p){p.reuseAnimation?this._scrollable.setScrollPositionSmooth(p,p.reuseAnimation):this._scrollable.setScrollPositionNow(p)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}e.SmoothScrollableElement=c;class a extends l{constructor(p,b){b=b||{},b.mouseWheelSmoothScroll=!1;const w=new n.Scrollable({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:E=>I.scheduleAtNextAnimationFrame(E)});super(p,b,w),this._register(w),this._element=p,this._register(this.onScroll(E=>{E.scrollTopChanged&&(this._element.scrollTop=E.scrollTop),E.scrollLeftChanged&&(this._element.scrollLeft=E.scrollLeft)})),this.scanDomNode()}setScrollPosition(p){this._scrollable.setScrollPositionNow(p)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){this.setScrollDimensions({width:this._element.clientWidth,scrollWidth:this._element.scrollWidth,height:this._element.clientHeight,scrollHeight:this._element.scrollHeight}),this.setScrollPosition({scrollLeft:this._element.scrollLeft,scrollTop:this._element.scrollTop})}}e.DomScrollableElement=a;function g(h){const p={lazyRender:typeof h.lazyRender<"u"?h.lazyRender:!1,className:typeof h.className<"u"?h.className:"",useShadows:typeof h.useShadows<"u"?h.useShadows:!0,handleMouseWheel:typeof h.handleMouseWheel<"u"?h.handleMouseWheel:!0,flipAxes:typeof h.flipAxes<"u"?h.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof h.consumeMouseWheelIfScrollbarIsNeeded<"u"?h.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof h.alwaysConsumeMouseWheel<"u"?h.alwaysConsumeMouseWheel:!1,scrollYToX:typeof h.scrollYToX<"u"?h.scrollYToX:!1,mouseWheelScrollSensitivity:typeof h.mouseWheelScrollSensitivity<"u"?h.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof h.fastScrollSensitivity<"u"?h.fastScrollSensitivity:5,scrollPredominantAxis:typeof h.scrollPredominantAxis<"u"?h.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof h.mouseWheelSmoothScroll<"u"?h.mouseWheelSmoothScroll:!0,arrowSize:typeof h.arrowSize<"u"?h.arrowSize:11,listenOnDomNode:typeof h.listenOnDomNode<"u"?h.listenOnDomNode:null,horizontal:typeof h.horizontal<"u"?h.horizontal:1,horizontalScrollbarSize:typeof h.horizontalScrollbarSize<"u"?h.horizontalScrollbarSize:10,horizontalSliderSize:typeof h.horizontalSliderSize<"u"?h.horizontalSliderSize:0,horizontalHasArrows:typeof h.horizontalHasArrows<"u"?h.horizontalHasArrows:!1,vertical:typeof h.vertical<"u"?h.vertical:1,verticalScrollbarSize:typeof h.verticalScrollbarSize<"u"?h.verticalScrollbarSize:10,verticalHasArrows:typeof h.verticalHasArrows<"u"?h.verticalHasArrows:!1,verticalSliderSize:typeof h.verticalSliderSize<"u"?h.verticalSliderSize:0,scrollByPage:typeof h.scrollByPage<"u"?h.scrollByPage:!1};return p.horizontalSliderSize=typeof h.horizontalSliderSize<"u"?h.horizontalSliderSize:p.horizontalScrollbarSize,p.verticalSliderSize=typeof h.verticalSliderSize<"u"?h.verticalSliderSize:p.verticalScrollbarSize,i.isMacintosh&&(p.className+=" mac"),p}}),define(te[315],ie([1,0,7,44,84,2,558,404]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverAccessibleViewHint=e.HoverAction=e.HoverWidget=void 0;const m=L.$;class _ extends D.Disposable{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new y.DomScrollableElement(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}e.HoverWidget=_;class v extends D.Disposable{static render(i,n,t){return new v(i,n,t)}constructor(i,n,t){super(),this.actionContainer=L.append(i,m("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=L.append(this.actionContainer,m("a.action")),this.action.setAttribute("role","button"),n.iconClass&&L.append(this.action,m(`span.icon.${n.iconClass}`));const r=L.append(this.action,m("span"));r.textContent=t?`${n.label} (${t})`:n.label,this._register(L.addDisposableListener(this.actionContainer,L.EventType.CLICK,u=>{u.stopPropagation(),u.preventDefault(),n.run(this.actionContainer)})),this._register(L.addDisposableListener(this.actionContainer,L.EventType.KEY_DOWN,u=>{const f=new I.StandardKeyboardEvent(u);(f.equals(3)||f.equals(10))&&(u.stopPropagation(),u.preventDefault(),n.run(this.actionContainer))})),this.setEnabled(!0)}setEnabled(i){i?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}e.HoverAction=v;function C(s,i){return s&&i?(0,S.localize)(0,null,i):s?(0,S.localize)(1,null):""}e.getHoverAccessibleViewHint=C}),define(te[225],ie([1,0,196,7,79,61,84,13,14,105,6,2,165,166,395,576,9]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListView=e.NativeDragAndDropData=e.ExternalElementsDragAndDropData=e.ElementsDragAndDropData=void 0;const f={CurrentDragAndDropData:void 0},d={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(p){return[p]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class l{constructor(b){this.elements=b}update(){}getData(){return this.elements}}e.ElementsDragAndDropData=l;class o{constructor(b){this.elements=b}update(){}getData(){return this.elements}}e.ExternalElementsDragAndDropData=o;class c{constructor(){this.types=[],this.files=[]}update(b){if(b.types&&this.types.splice(0,this.types.length,...b.types),b.files){this.files.splice(0,this.files.length);for(let w=0;wk,b?.getPosInSet?this.getPosInSet=b.getPosInSet.bind(b):this.getPosInSet=(w,E)=>E+1,b?.getRole?this.getRole=b.getRole.bind(b):this.getRole=w=>"listitem",b?.isChecked?this.isChecked=b.isChecked.bind(b):this.isChecked=w=>{}}}class h{get contentHeight(){return this.rangeMap.size}get onDidScroll(){return this.scrollableElement.onScroll}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(b){if(b!==this._horizontalScrolling){if(b&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=b,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const w of this.items)this.measureItemWidth(w);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,I.getContentWidth)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}constructor(b,w,E,k=d){var M,R,B,T,N,A,P,O,x,W,U,F,G;if(this.virtualDelegate=w,this.domId=`list_id_${++h.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new _.Delayer(50),this.splicing=!1,this.dragOverAnimationStopDisposable=s.Disposable.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=s.Disposable.None,this.onDragLeaveTimeout=s.Disposable.None,this.disposables=new s.DisposableStore,this._onDidChangeContentHeight=new C.Emitter,this._onDidChangeContentWidth=new C.Emitter,this._horizontalScrolling=!1,k.horizontalScrolling&&k.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new t.RangeMap((M=k.paddingTop)!==null&&M!==void 0?M:0);for(const ne of E)this.renderers.set(ne.templateId,ne);this.cache=this.disposables.add(new r.RowCache(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support",typeof k.mouseSupport=="boolean"?k.mouseSupport:!0),this._horizontalScrolling=(R=k.horizontalScrolling)!==null&&R!==void 0?R:d.horizontalScrolling,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.paddingBottom=typeof k.paddingBottom>"u"?0:k.paddingBottom,this.accessibilityProvider=new g(k.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",((B=k.transformOptimization)!==null&&B!==void 0?B:d.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)",this.rowsContainer.style.overflow="hidden",this.rowsContainer.style.contain="strict"),this.disposables.add(D.Gesture.addTarget(this.rowsContainer)),this.scrollable=this.disposables.add(new n.Scrollable({forceIntegerValues:!0,smoothScrollDuration:(T=k.smoothScrolling)!==null&&T!==void 0&&T?125:0,scheduleAtNextAnimationFrame:ne=>(0,I.scheduleAtNextAnimationFrame)(ne)})),this.scrollableElement=this.disposables.add(new S.SmoothScrollableElement(this.rowsContainer,{alwaysConsumeMouseWheel:(N=k.alwaysConsumeMouseWheel)!==null&&N!==void 0?N:d.alwaysConsumeMouseWheel,horizontal:1,vertical:(A=k.verticalScrollMode)!==null&&A!==void 0?A:d.verticalScrollMode,useShadows:(P=k.useShadows)!==null&&P!==void 0?P:d.useShadows,mouseWheelScrollSensitivity:k.mouseWheelScrollSensitivity,fastScrollSensitivity:k.fastScrollSensitivity,scrollByPage:k.scrollByPage},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),b.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,I.addDisposableListener)(this.rowsContainer,D.EventType.Change,ne=>this.onTouchChange(ne))),this.disposables.add((0,I.addDisposableListener)(this.scrollableElement.getDomNode(),"scroll",ne=>ne.target.scrollTop=0)),this.disposables.add((0,I.addDisposableListener)(this.domNode,"dragover",ne=>this.onDragOver(this.toDragEvent(ne)))),this.disposables.add((0,I.addDisposableListener)(this.domNode,"drop",ne=>this.onDrop(this.toDragEvent(ne)))),this.disposables.add((0,I.addDisposableListener)(this.domNode,"dragleave",ne=>this.onDragLeave(this.toDragEvent(ne)))),this.disposables.add((0,I.addDisposableListener)(this.domNode,"dragend",ne=>this.onDragEnd(ne))),this.setRowLineHeight=(O=k.setRowLineHeight)!==null&&O!==void 0?O:d.setRowLineHeight,this.setRowHeight=(x=k.setRowHeight)!==null&&x!==void 0?x:d.setRowHeight,this.supportDynamicHeights=(W=k.supportDynamicHeights)!==null&&W!==void 0?W:d.supportDynamicHeights,this.dnd=(U=k.dnd)!==null&&U!==void 0?U:this.disposables.add(d.dnd),this.layout((F=k.initialSize)===null||F===void 0?void 0:F.height,(G=k.initialSize)===null||G===void 0?void 0:G.width)}updateOptions(b){b.paddingBottom!==void 0&&(this.paddingBottom=b.paddingBottom,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),b.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(b.smoothScrolling?125:0),b.horizontalScrolling!==void 0&&(this.horizontalScrolling=b.horizontalScrolling);let w;if(b.scrollByPage!==void 0&&(w=Object.assign(Object.assign({},w??{}),{scrollByPage:b.scrollByPage})),b.mouseWheelScrollSensitivity!==void 0&&(w=Object.assign(Object.assign({},w??{}),{mouseWheelScrollSensitivity:b.mouseWheelScrollSensitivity})),b.fastScrollSensitivity!==void 0&&(w=Object.assign(Object.assign({},w??{}),{fastScrollSensitivity:b.fastScrollSensitivity})),w&&this.scrollableElement.updateOptions(w),b.paddingTop!==void 0&&b.paddingTop!==this.rangeMap.paddingTop){const E=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),k=b.paddingTop-this.rangeMap.paddingTop;this.rangeMap.paddingTop=b.paddingTop,this.render(E,Math.max(0,this.lastRenderTop+k),this.lastRenderHeight,void 0,void 0,!0),this.setScrollTop(this.lastRenderTop),this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.lastRenderTop,this.lastRenderHeight)}}splice(b,w,E=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(b,w,E)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(b,w,E=[]){const k=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),M={start:b,end:b+w},R=i.Range.intersect(k,M),B=new Map;for(let q=R.end-1;q>=R.start;q--){const H=this.items[q];if(H.dragStartDisposable.dispose(),H.checkedDisposable.dispose(),H.row){let V=B.get(H.templateId);V||(V=[],B.set(H.templateId,V));const Z=this.renderers.get(H.templateId);Z&&Z.disposeElement&&Z.disposeElement(H.element,q,H.row.templateData,H.size),V.push(H.row)}H.row=null}const T={start:b+w,end:this.items.length},N=i.Range.intersect(T,k),A=i.Range.relativeComplement(T,k),P=E.map(q=>({id:String(this.itemId++),element:q,templateId:this.virtualDelegate.getTemplateId(q),size:this.virtualDelegate.getHeight(q),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(q),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:s.Disposable.None,checkedDisposable:s.Disposable.None}));let O;b===0&&w>=this.items.length?(this.rangeMap=new t.RangeMap(this.rangeMap.paddingTop),this.rangeMap.splice(0,0,P),O=this.items,this.items=P):(this.rangeMap.splice(b,w,P),O=this.items.splice(b,w,...P));const x=E.length-w,W=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),U=(0,t.shift)(N,x),F=i.Range.intersect(W,U);for(let q=F.start;q(0,t.shift)(q,x)),se=[{start:b,end:b+E.length},...Y].map(q=>i.Range.intersect(W,q)),J=this.getNextToLastElement(se);for(const q of se)for(let H=q.start;Hq.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,I.scheduleAtNextAnimationFrame)(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let b=0;for(const w of this.items)typeof w.width<"u"&&(b=Math.max(b,w.width));this.scrollWidth=b,this.scrollableElement.setScrollDimensions({scrollWidth:b===0?0:b+10}),this._onDidChangeContentWidth.fire(this.scrollWidth)}rerender(){if(this.supportDynamicHeights){for(const b of this.items)b.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}get firstVisibleIndex(){const b=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),w=this.rangeMap.positionAt(b.start),E=this.rangeMap.positionAt(b.start+1);return E!==-1&&(E-w)/2+w{for(const P of N)for(let O=P.start;Ok.row.domNode.setAttribute("aria-checked",String(!!P));A(B.value),k.checkedDisposable=B.onDidChange(A)}(M||!k.row.domNode.parentElement)&&(w?this.rowsContainer.insertBefore(k.row.domNode,w):this.rowsContainer.appendChild(k.row.domNode)),this.updateItemInDOM(k,b);const T=this.renderers.get(k.templateId);if(!T)throw new Error(`No renderer found for template id ${k.templateId}`);T?.renderElement(k.element,b,k.row.templateData,k.size);const N=this.dnd.getDragURI(k.element);k.dragStartDisposable.dispose(),k.row.domNode.draggable=!!N,N&&(k.dragStartDisposable=(0,I.addDisposableListener)(k.row.domNode,"dragstart",A=>this.onDragStart(k.element,N,A))),this.horizontalScrolling&&(this.measureItemWidth(k),this.eventuallyUpdateScrollWidth())}measureItemWidth(b){if(!b.row||!b.row.domNode)return;b.row.domNode.style.width="fit-content",b.width=(0,I.getContentWidth)(b.row.domNode);const w=window.getComputedStyle(b.row.domNode);w.paddingLeft&&(b.width+=parseFloat(w.paddingLeft)),w.paddingRight&&(b.width+=parseFloat(w.paddingRight)),b.row.domNode.style.width=""}updateItemInDOM(b,w){b.row.domNode.style.top=`${this.elementTop(w)}px`,this.setRowHeight&&(b.row.domNode.style.height=`${b.size}px`),this.setRowLineHeight&&(b.row.domNode.style.lineHeight=`${b.size}px`),b.row.domNode.setAttribute("data-index",`${w}`),b.row.domNode.setAttribute("data-last-element",w===this.length-1?"true":"false"),b.row.domNode.setAttribute("data-parity",w%2===0?"even":"odd"),b.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(b.element,w,this.length))),b.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(b.element,w))),b.row.domNode.setAttribute("id",this.getElementDomId(w)),b.row.domNode.classList.toggle("drop-target",b.dropTarget)}removeItemFromDOM(b){const w=this.items[b];if(w.dragStartDisposable.dispose(),w.checkedDisposable.dispose(),w.row){const E=this.renderers.get(w.templateId);E&&E.disposeElement&&E.disposeElement(w.element,b,w.row.templateData,w.size),this.cache.release(w.row),w.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(b,w){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:b,reuseAnimation:w})}get scrollTop(){return this.getScrollTop()}set scrollTop(b){this.setScrollTop(b)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.paddingBottom}get onMouseClick(){return C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"click")).event,b=>this.toMouseEvent(b),this.disposables)}get onMouseDblClick(){return C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"dblclick")).event,b=>this.toMouseEvent(b),this.disposables)}get onMouseMiddleClick(){return C.Event.filter(C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"auxclick")).event,b=>this.toMouseEvent(b),this.disposables),b=>b.browserEvent.button===1,this.disposables)}get onMouseDown(){return C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mousedown")).event,b=>this.toMouseEvent(b),this.disposables)}get onMouseOver(){return C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseover")).event,b=>this.toMouseEvent(b),this.disposables)}get onMouseOut(){return C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"mouseout")).event,b=>this.toMouseEvent(b),this.disposables)}get onContextMenu(){return C.Event.any(C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"contextmenu")).event,b=>this.toMouseEvent(b),this.disposables),C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,D.EventType.Contextmenu)).event,b=>this.toGestureEvent(b),this.disposables))}get onTouchStart(){return C.Event.map(this.disposables.add(new y.DomEmitter(this.domNode,"touchstart")).event,b=>this.toTouchEvent(b),this.disposables)}get onTap(){return C.Event.map(this.disposables.add(new y.DomEmitter(this.rowsContainer,D.EventType.Tap)).event,b=>this.toGestureEvent(b),this.disposables)}toMouseEvent(b){const w=this.getItemIndexFromEventTarget(b.target||null),E=typeof w>"u"?void 0:this.items[w],k=E&&E.element;return{browserEvent:b,index:w,element:k}}toTouchEvent(b){const w=this.getItemIndexFromEventTarget(b.target||null),E=typeof w>"u"?void 0:this.items[w],k=E&&E.element;return{browserEvent:b,index:w,element:k}}toGestureEvent(b){const w=this.getItemIndexFromEventTarget(b.initialTarget||null),E=typeof w>"u"?void 0:this.items[w],k=E&&E.element;return{browserEvent:b,index:w,element:k}}toDragEvent(b){const w=this.getItemIndexFromEventTarget(b.target||null),E=typeof w>"u"?void 0:this.items[w],k=E&&E.element;return{browserEvent:b,index:w,element:k}}onScroll(b){try{const w=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(w,b.scrollTop,b.height,b.scrollLeft,b.scrollWidth),this.supportDynamicHeights&&this._rerender(b.scrollTop,b.height,b.inSmoothScrolling)}catch(w){throw console.error("Got bad scroll event:",b),w}}onTouchChange(b){b.preventDefault(),b.stopPropagation(),this.scrollTop-=b.translationY}onDragStart(b,w,E){var k,M;if(!E.dataTransfer)return;const R=this.dnd.getDragElements(b);if(E.dataTransfer.effectAllowed="copyMove",E.dataTransfer.setData(L.DataTransfers.TEXT,w),E.dataTransfer.setDragImage){let B;this.dnd.getDragLabel&&(B=this.dnd.getDragLabel(R,E)),typeof B>"u"&&(B=String(R.length));const T=(0,I.$)(".monaco-drag-image");T.textContent=B;const A=(P=>{for(;P&&!P.classList.contains("monaco-workbench");)P=P.parentElement;return P||document.body})(this.domNode);A.appendChild(T),E.dataTransfer.setDragImage(T,-10,-10),setTimeout(()=>A.removeChild(T),0)}this.domNode.classList.add("dragging"),this.currentDragData=new l(R),f.CurrentDragAndDropData=new o(R),(M=(k=this.dnd).onDragStart)===null||M===void 0||M.call(k,this.currentDragData,E)}onDragOver(b){var w;if(b.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),f.CurrentDragAndDropData&&f.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(b.browserEvent),!b.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(f.CurrentDragAndDropData)this.currentDragData=f.CurrentDragAndDropData;else{if(!b.browserEvent.dataTransfer.types)return!1;this.currentDragData=new c}const E=this.dnd.onDragOver(this.currentDragData,b.element,b.index,b.browserEvent);if(this.canDrop=typeof E=="boolean"?E:E.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;b.browserEvent.dataTransfer.dropEffect=typeof E!="boolean"&&E.effect===0?"copy":"move";let k;if(typeof E!="boolean"&&E.feedback?k=E.feedback:typeof b.index>"u"?k=[-1]:k=[b.index],k=(0,m.distinct)(k).filter(M=>M>=-1&&MM-R),k=k[0]===-1?[-1]:k,a(this.currentDragFeedback,k))return!0;if(this.currentDragFeedback=k,this.currentDragFeedbackDisposable.dispose(),k[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,s.toDisposable)(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const M of k){const R=this.items[M];R.dropTarget=!0,(w=R.row)===null||w===void 0||w.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,s.toDisposable)(()=>{var M;for(const R of k){const B=this.items[R];B.dropTarget=!1,(M=B.row)===null||M===void 0||M.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(b){var w,E;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,_.disposableTimeout)(()=>this.clearDragOverFeedback(),100,this.disposables),this.currentDragData&&((E=(w=this.dnd).onDragLeave)===null||E===void 0||E.call(w,this.currentDragData,b.element,b.index,b.browserEvent))}onDrop(b){if(!this.canDrop)return;const w=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,f.CurrentDragAndDropData=void 0,!(!w||!b.browserEvent.dataTransfer)&&(b.browserEvent.preventDefault(),w.update(b.browserEvent.dataTransfer),this.dnd.drop(w,b.element,b.index,b.browserEvent))}onDragEnd(b){var w,E;this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.domNode.classList.remove("dragging"),this.currentDragData=void 0,f.CurrentDragAndDropData=void 0,(E=(w=this.dnd).onDragEnd)===null||E===void 0||E.call(w,b)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=s.Disposable.None}setupDragAndDropScrollTopAnimation(b){if(!this.dragOverAnimationDisposable){const w=(0,I.getTopLeftOffset)(this.domNode).top;this.dragOverAnimationDisposable=(0,I.animate)(this.animateDragAndDropScrollTop.bind(this,w))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,_.disposableTimeout)(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3,this.disposables),this.dragOverMouseY=b.pageY}animateDragAndDropScrollTop(b){if(this.dragOverMouseY===void 0)return;const w=this.dragOverMouseY-b,E=this.renderHeight-35;w<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(w-35))):w>E&&(this.scrollTop+=Math.min(14,Math.floor(.3*(w-E))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(b){const w=this.scrollableElement.getDomNode();let E=b;for(;E instanceof HTMLElement&&E!==this.rowsContainer&&w.contains(E);){const k=E.getAttribute("data-index");if(k){const M=Number(k);if(!isNaN(M))return M}E=E.parentElement}}getRenderRange(b,w){return{start:this.rangeMap.indexAt(b),end:this.rangeMap.indexAfter(b+w-1)}}_rerender(b,w,E){const k=this.getRenderRange(b,w);let M,R;b===this.elementTop(k.start)?(M=k.start,R=0):k.end-k.start>1&&(M=k.start+1,R=this.elementTop(M)-b);let B=0;for(;;){const T=this.getRenderRange(b,w);let N=!1;for(let A=T.start;Aue.templateData===ee);if(le>=0){const ue=this.renderedElements[le];this.trait.unrender(ee),ue.index=Z}else{const ue={index:Z,templateData:ee};this.renderedElements.push(ue)}this.trait.renderIndex(Z,ee)}splice(V,Z,ee){const le=[];for(const ue of this.renderedElements)ue.index=V+Z&&le.push({index:ue.index+ee-Z,templateData:ue.templateData});this.renderedElements=le}renderIndexes(V){for(const{index:Z,templateData:ee}of this.renderedElements)V.indexOf(Z)>-1&&this.trait.renderIndex(Z,ee)}disposeTemplate(V){const Z=this.renderedElements.findIndex(ee=>ee.templateData===V);Z<0||this.renderedElements.splice(Z,1)}}class a{get name(){return this._trait}get renderer(){return new c(this)}constructor(V){this._trait=V,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new i.Emitter,this.onChange=this._onChange.event}splice(V,Z,ee){var le;Z=Math.max(0,Math.min(Z,this.length-V));const ue=ee.length-Z,de=V+Z,ce=[];let ae=0;for(;ae=de;)ce.push(this.sortedIndexes[ae++]+ue);const X=this.length+ue;if(this.sortedIndexes.length>0&&ce.length===0&&X>0){const K=(le=this.sortedIndexes.find(z=>z>=V))!==null&&le!==void 0?le:X-1;ce.push(Math.min(K,X-1))}this.renderer.splice(V,Z,ee.length),this._set(ce,ce),this.length=X}renderIndex(V,Z){Z.classList.toggle(this._trait,this.contains(V))}unrender(V){V.classList.remove(this._trait)}set(V,Z){return this._set(V,[...V].sort(Y),Z)}_set(V,Z,ee){const le=this.indexes,ue=this.sortedIndexes;this.indexes=V,this.sortedIndexes=Z;const de=F(ue,V);return this.renderer.renderIndexes(de),this._onChange.fire({indexes:V,browserEvent:ee}),le}get(){return this.indexes}contains(V){return(0,_.binarySearch)(this.sortedIndexes,V,Y)>=0}dispose(){(0,t.dispose)(this._onChange)}}Ie([s.memoize],a.prototype,"renderer",null);class g extends a{constructor(V){super("selected"),this.setAriaSelected=V}renderIndex(V,Z){super.renderIndex(V,Z),this.setAriaSelected&&(this.contains(V)?Z.setAttribute("aria-selected","true"):Z.setAttribute("aria-selected","false"))}}class h{constructor(V,Z,ee){this.trait=V,this.view=Z,this.identityProvider=ee}splice(V,Z,ee){if(!this.identityProvider)return this.trait.splice(V,Z,new Array(ee.length).fill(!1));const le=this.trait.get().map(ce=>this.identityProvider.getId(this.view.element(ce)).toString());if(le.length===0)return this.trait.splice(V,Z,new Array(ee.length).fill(!1));const ue=new Set(le),de=ee.map(ce=>ue.has(this.identityProvider.getId(ce).toString()));this.trait.splice(V,Z,de)}}function p(H){return H.tagName==="INPUT"||H.tagName==="TEXTAREA"}e.isInputElement=p;function b(H){return H.classList.contains("monaco-editor")?!0:H.classList.contains("monaco-list")||!H.parentElement?!1:b(H.parentElement)}e.isMonacoEditor=b;function w(H){return H.tagName==="A"&&H.classList.contains("monaco-button")||H.tagName==="DIV"&&H.classList.contains("monaco-button-dropdown")?!0:H.classList.contains("monaco-list")||!H.parentElement?!1:w(H.parentElement)}e.isButton=w;class E{get onKeyDown(){return i.Event.chain(this.disposables.add(new I.DomEmitter(this.view.domNode,"keydown")).event,V=>V.filter(Z=>!p(Z.target)).map(Z=>new y.StandardKeyboardEvent(Z)))}constructor(V,Z,ee){this.list=V,this.view=Z,this.disposables=new t.DisposableStore,this.multipleSelectionDisposables=new t.DisposableStore,this.multipleSelectionSupport=ee.multipleSelectionSupport,this.disposables.add(this.onKeyDown(le=>{switch(le.keyCode){case 3:return this.onEnter(le);case 16:return this.onUpArrow(le);case 18:return this.onDownArrow(le);case 11:return this.onPageUpArrow(le);case 12:return this.onPageDownArrow(le);case 9:return this.onEscape(le);case 31:this.multipleSelectionSupport&&(u.isMacintosh?le.metaKey:le.ctrlKey)&&this.onCtrlA(le)}}))}updateOptions(V){V.multipleSelectionSupport!==void 0&&(this.multipleSelectionSupport=V.multipleSelectionSupport)}onEnter(V){V.preventDefault(),V.stopPropagation(),this.list.setSelection(this.list.getFocus(),V.browserEvent)}onUpArrow(V){V.preventDefault(),V.stopPropagation(),this.list.focusPrevious(1,!1,V.browserEvent);const Z=this.list.getFocus()[0];this.list.setAnchor(Z),this.list.reveal(Z),this.view.domNode.focus()}onDownArrow(V){V.preventDefault(),V.stopPropagation(),this.list.focusNext(1,!1,V.browserEvent);const Z=this.list.getFocus()[0];this.list.setAnchor(Z),this.list.reveal(Z),this.view.domNode.focus()}onPageUpArrow(V){V.preventDefault(),V.stopPropagation(),this.list.focusPreviousPage(V.browserEvent);const Z=this.list.getFocus()[0];this.list.setAnchor(Z),this.list.reveal(Z),this.view.domNode.focus()}onPageDownArrow(V){V.preventDefault(),V.stopPropagation(),this.list.focusNextPage(V.browserEvent);const Z=this.list.getFocus()[0];this.list.setAnchor(Z),this.list.reveal(Z),this.view.domNode.focus()}onCtrlA(V){V.preventDefault(),V.stopPropagation(),this.list.setSelection((0,_.range)(this.list.length),V.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(V){this.list.getSelection().length&&(V.preventDefault(),V.stopPropagation(),this.list.setSelection([],V.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}Ie([s.memoize],E.prototype,"onKeyDown",null);var k;(function(H){H[H.Automatic=0]="Automatic",H[H.Trigger=1]="Trigger"})(k||(e.TypeNavigationMode=k={}));var M;(function(H){H[H.Idle=0]="Idle",H[H.Typing=1]="Typing"})(M||(M={})),e.DefaultKeyboardNavigationDelegate=new class{mightProducePrintableCharacter(H){return H.ctrlKey||H.metaKey||H.altKey?!1:H.keyCode>=31&&H.keyCode<=56||H.keyCode>=21&&H.keyCode<=30||H.keyCode>=98&&H.keyCode<=107||H.keyCode>=85&&H.keyCode<=95}};class R{constructor(V,Z,ee,le,ue){this.list=V,this.view=Z,this.keyboardNavigationLabelProvider=ee,this.keyboardNavigationEventFilter=le,this.delegate=ue,this.enabled=!1,this.state=M.Idle,this.mode=k.Automatic,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new t.DisposableStore,this.disposables=new t.DisposableStore,this.updateOptions(V.options)}updateOptions(V){var Z,ee;!((Z=V.typeNavigationEnabled)!==null&&Z!==void 0)||Z?this.enable():this.disable(),this.mode=(ee=V.typeNavigationMode)!==null&&ee!==void 0?ee:k.Automatic}enable(){if(this.enabled)return;let V=!1;const Z=i.Event.chain(this.enabledDisposables.add(new I.DomEmitter(this.view.domNode,"keydown")).event,ue=>ue.filter(de=>!p(de.target)).filter(()=>this.mode===k.Automatic||this.triggered).map(de=>new y.StandardKeyboardEvent(de)).filter(de=>V||this.keyboardNavigationEventFilter(de)).filter(de=>this.delegate.mightProducePrintableCharacter(de)).forEach(de=>L.EventHelper.stop(de,!0)).map(de=>de.browserEvent.key)),ee=i.Event.debounce(Z,()=>null,800,void 0,void 0,void 0,this.enabledDisposables);i.Event.reduce(i.Event.any(Z,ee),(ue,de)=>de===null?null:(ue||"")+de,void 0,this.enabledDisposables)(this.onInput,this,this.enabledDisposables),ee(this.onClear,this,this.enabledDisposables),Z(()=>V=!0,void 0,this.enabledDisposables),ee(()=>V=!1,void 0,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var V;const Z=this.list.getFocus();if(Z.length>0&&Z[0]===this.previouslyFocused){const ee=(V=this.list.options.accessibilityProvider)===null||V===void 0?void 0:V.getAriaLabel(this.list.element(Z[0]));ee&&(0,S.alert)(ee)}this.previouslyFocused=-1}onInput(V){if(!V){this.state=M.Idle,this.triggered=!1;return}const Z=this.list.getFocus(),ee=Z.length>0?Z[0]:0,le=this.state===M.Idle?1:0;this.state=M.Typing;for(let ue=0;ue1&&X.length===1){this.previouslyFocused=ee,this.list.setFocus([de]),this.list.reveal(de);return}}}else if(typeof ae>"u"||(0,n.matchesPrefix)(V,ae)){this.previouslyFocused=ee,this.list.setFocus([de]),this.list.reveal(de);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class B{constructor(V,Z){this.list=V,this.view=Z,this.disposables=new t.DisposableStore;const ee=i.Event.chain(this.disposables.add(new I.DomEmitter(Z.domNode,"keydown")).event,ue=>ue.filter(de=>!p(de.target)).map(de=>new y.StandardKeyboardEvent(de)));i.Event.chain(ee,ue=>ue.filter(de=>de.keyCode===2&&!de.ctrlKey&&!de.metaKey&&!de.shiftKey&&!de.altKey))(this.onTab,this,this.disposables)}onTab(V){if(V.target!==this.view.domNode)return;const Z=this.list.getFocus();if(Z.length===0)return;const ee=this.view.domElement(Z[0]);if(!ee)return;const le=ee.querySelector("[tabIndex]");if(!le||!(le instanceof HTMLElement)||le.tabIndex===-1)return;const ue=window.getComputedStyle(le);ue.visibility==="hidden"||ue.display==="none"||(V.preventDefault(),V.stopPropagation(),le.focus())}dispose(){this.disposables.dispose()}}function T(H){return u.isMacintosh?H.browserEvent.metaKey:H.browserEvent.ctrlKey}e.isSelectionSingleChangeEvent=T;function N(H){return H.browserEvent.shiftKey}e.isSelectionRangeChangeEvent=N;function A(H){return H instanceof MouseEvent&&H.button===2}const P={isSelectionSingleChangeEvent:T,isSelectionRangeChangeEvent:N};class O{constructor(V){this.list=V,this.disposables=new t.DisposableStore,this._onPointer=new i.Emitter,this.onPointer=this._onPointer.event,V.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P),this.mouseSupport=typeof V.options.mouseSupport>"u"||!!V.options.mouseSupport,this.mouseSupport&&(V.onMouseDown(this.onMouseDown,this,this.disposables),V.onContextMenu(this.onContextMenu,this,this.disposables),V.onMouseDblClick(this.onDoubleClick,this,this.disposables),V.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(D.Gesture.addTarget(V.getHTMLElement()))),i.Event.any(V.onMouseClick,V.onMouseMiddleClick,V.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(V){V.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,V.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||P))}isSelectionSingleChangeEvent(V){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(V):!1}isSelectionRangeChangeEvent(V){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(V):!1}isSelectionChangeEvent(V){return this.isSelectionSingleChangeEvent(V)||this.isSelectionRangeChangeEvent(V)}onMouseDown(V){b(V.browserEvent.target)||document.activeElement!==V.browserEvent.target&&this.list.domFocus()}onContextMenu(V){if(p(V.browserEvent.target)||b(V.browserEvent.target))return;const Z=typeof V.index>"u"?[]:[V.index];this.list.setFocus(Z,V.browserEvent)}onViewPointer(V){if(!this.mouseSupport||p(V.browserEvent.target)||b(V.browserEvent.target)||V.browserEvent.isHandledByList)return;V.browserEvent.isHandledByList=!0;const Z=V.index;if(typeof Z>"u"){this.list.setFocus([],V.browserEvent),this.list.setSelection([],V.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionChangeEvent(V))return this.changeSelection(V);this.list.setFocus([Z],V.browserEvent),this.list.setAnchor(Z),A(V.browserEvent)||this.list.setSelection([Z],V.browserEvent),this._onPointer.fire(V)}onDoubleClick(V){if(p(V.browserEvent.target)||b(V.browserEvent.target)||this.isSelectionChangeEvent(V)||V.browserEvent.isHandledByList)return;V.browserEvent.isHandledByList=!0;const Z=this.list.getFocus();this.list.setSelection(Z,V.browserEvent)}changeSelection(V){const Z=V.index;let ee=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(V)){if(typeof ee>"u"){const K=this.list.getFocus()[0];ee=K??Z,this.list.setAnchor(ee)}const le=Math.min(ee,Z),ue=Math.max(ee,Z),de=(0,_.range)(le,ue+1),ce=this.list.getSelection(),ae=U(F(ce,[ee]),ee);if(ae.length===0)return;const X=F(de,G(ce,ae));this.list.setSelection(X,V.browserEvent),this.list.setFocus([Z],V.browserEvent)}else if(this.isSelectionSingleChangeEvent(V)){const le=this.list.getSelection(),ue=le.filter(de=>de!==Z);this.list.setFocus([Z]),this.list.setAnchor(Z),le.length===ue.length?this.list.setSelection([...ue,Z],V.browserEvent):this.list.setSelection(ue,V.browserEvent)}}dispose(){this.disposables.dispose()}}e.MouseController=O;class x{constructor(V,Z){this.styleElement=V,this.selectorSuffix=Z}style(V){var Z,ee;const le=this.selectorSuffix&&`.${this.selectorSuffix}`,ue=[];V.listBackground&&ue.push(`.monaco-list${le} .monaco-list-rows { background: ${V.listBackground}; }`),V.listFocusBackground&&(ue.push(`.monaco-list${le}:focus .monaco-list-row.focused { background-color: ${V.listFocusBackground}; }`),ue.push(`.monaco-list${le}:focus .monaco-list-row.focused:hover { background-color: ${V.listFocusBackground}; }`)),V.listFocusForeground&&ue.push(`.monaco-list${le}:focus .monaco-list-row.focused { color: ${V.listFocusForeground}; }`),V.listActiveSelectionBackground&&(ue.push(`.monaco-list${le}:focus .monaco-list-row.selected { background-color: ${V.listActiveSelectionBackground}; }`),ue.push(`.monaco-list${le}:focus .monaco-list-row.selected:hover { background-color: ${V.listActiveSelectionBackground}; }`)),V.listActiveSelectionForeground&&ue.push(`.monaco-list${le}:focus .monaco-list-row.selected { color: ${V.listActiveSelectionForeground}; }`),V.listActiveSelectionIconForeground&&ue.push(`.monaco-list${le}:focus .monaco-list-row.selected .codicon { color: ${V.listActiveSelectionIconForeground}; }`),V.listFocusAndSelectionBackground&&ue.push(` - .monaco-drag-image, - .monaco-list${le}:focus .monaco-list-row.selected.focused { background-color: ${V.listFocusAndSelectionBackground}; } - `),V.listFocusAndSelectionForeground&&ue.push(` - .monaco-drag-image, - .monaco-list${le}:focus .monaco-list-row.selected.focused { color: ${V.listFocusAndSelectionForeground}; } - `),V.listInactiveFocusForeground&&(ue.push(`.monaco-list${le} .monaco-list-row.focused { color: ${V.listInactiveFocusForeground}; }`),ue.push(`.monaco-list${le} .monaco-list-row.focused:hover { color: ${V.listInactiveFocusForeground}; }`)),V.listInactiveSelectionIconForeground&&ue.push(`.monaco-list${le} .monaco-list-row.focused .codicon { color: ${V.listInactiveSelectionIconForeground}; }`),V.listInactiveFocusBackground&&(ue.push(`.monaco-list${le} .monaco-list-row.focused { background-color: ${V.listInactiveFocusBackground}; }`),ue.push(`.monaco-list${le} .monaco-list-row.focused:hover { background-color: ${V.listInactiveFocusBackground}; }`)),V.listInactiveSelectionBackground&&(ue.push(`.monaco-list${le} .monaco-list-row.selected { background-color: ${V.listInactiveSelectionBackground}; }`),ue.push(`.monaco-list${le} .monaco-list-row.selected:hover { background-color: ${V.listInactiveSelectionBackground}; }`)),V.listInactiveSelectionForeground&&ue.push(`.monaco-list${le} .monaco-list-row.selected { color: ${V.listInactiveSelectionForeground}; }`),V.listHoverBackground&&ue.push(`.monaco-list${le}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${V.listHoverBackground}; }`),V.listHoverForeground&&ue.push(`.monaco-list${le}:not(.drop-target):not(.dragging) .monaco-list-row:hover:not(.selected):not(.focused) { color: ${V.listHoverForeground}; }`);const de=(0,L.asCssValueWithDefault)(V.listFocusAndSelectionOutline,(0,L.asCssValueWithDefault)(V.listSelectionOutline,(Z=V.listFocusOutline)!==null&&Z!==void 0?Z:""));de&&ue.push(`.monaco-list${le}:focus .monaco-list-row.focused.selected { outline: 1px solid ${de}; outline-offset: -1px;}`),V.listFocusOutline&&ue.push(` - .monaco-drag-image, - .monaco-list${le}:focus .monaco-list-row.focused { outline: 1px solid ${V.listFocusOutline}; outline-offset: -1px; } - .monaco-workbench.context-menu-visible .monaco-list${le}.last-focused .monaco-list-row.focused { outline: 1px solid ${V.listFocusOutline}; outline-offset: -1px; } - `);const ce=(0,L.asCssValueWithDefault)(V.listSelectionOutline,(ee=V.listInactiveFocusOutline)!==null&&ee!==void 0?ee:"");ce&&ue.push(`.monaco-list${le} .monaco-list-row.focused.selected { outline: 1px dotted ${ce}; outline-offset: -1px; }`),V.listSelectionOutline&&ue.push(`.monaco-list${le} .monaco-list-row.selected { outline: 1px dotted ${V.listSelectionOutline}; outline-offset: -1px; }`),V.listInactiveFocusOutline&&ue.push(`.monaco-list${le} .monaco-list-row.focused { outline: 1px dotted ${V.listInactiveFocusOutline}; outline-offset: -1px; }`),V.listHoverOutline&&ue.push(`.monaco-list${le} .monaco-list-row:hover { outline: 1px dashed ${V.listHoverOutline}; outline-offset: -1px; }`),V.listDropBackground&&ue.push(` - .monaco-list${le}.drop-target, - .monaco-list${le} .monaco-list-rows.drop-target, - .monaco-list${le} .monaco-list-row.drop-target { background-color: ${V.listDropBackground} !important; color: inherit !important; } - `),V.tableColumnsBorder&&ue.push(` - .monaco-table > .monaco-split-view2, - .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before, - .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2, - .monaco-workbench:not(.reduce-motion) .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { - border-color: ${V.tableColumnsBorder}; - } - - .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2, - .monaco-workbench:not(.reduce-motion) .monaco-table > .monaco-split-view2 .monaco-sash.vertical::before { - border-color: transparent; - } - `),V.tableOddRowsBackgroundColor&&ue.push(` - .monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr, - .monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr, - .monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr { - background-color: ${V.tableOddRowsBackgroundColor}; - } - `),this.styleElement.textContent=ue.join(` -`)}}e.DefaultStyleController=x,e.unthemedListStyles={listFocusBackground:"#7FB0D0",listActiveSelectionBackground:"#0E639C",listActiveSelectionForeground:"#FFFFFF",listActiveSelectionIconForeground:"#FFFFFF",listFocusAndSelectionOutline:"#90C2F9",listFocusAndSelectionBackground:"#094771",listFocusAndSelectionForeground:"#FFFFFF",listInactiveSelectionBackground:"#3F3F46",listInactiveSelectionIconForeground:"#FFFFFF",listHoverBackground:"#2A2D2E",listDropBackground:"#383B3D",treeIndentGuidesStroke:"#a9a9a9",treeInactiveIndentGuidesStroke:C.Color.fromHex("#a9a9a9").transparent(.4).toString(),tableColumnsBorder:C.Color.fromHex("#cccccc").transparent(.2).toString(),tableOddRowsBackgroundColor:C.Color.fromHex("#cccccc").transparent(.04).toString(),listBackground:void 0,listFocusForeground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusForeground:void 0,listInactiveFocusBackground:void 0,listHoverForeground:void 0,listFocusOutline:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listHoverOutline:void 0};const W={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){},dispose(){}}};function U(H,V){const Z=H.indexOf(V);if(Z===-1)return[];const ee=[];let le=Z-1;for(;le>=0&&H[le]===V-(Z-le);)ee.push(H[le--]);for(ee.reverse(),le=Z;le=H.length)Z.push(V[le++]);else if(le>=V.length)Z.push(H[ee++]);else if(H[ee]===V[le]){Z.push(H[ee]),ee++,le++;continue}else H[ee]=H.length)Z.push(V[le++]);else if(le>=V.length)Z.push(H[ee++]);else if(H[ee]===V[le]){ee++,le++;continue}else H[ee]H-V;class ne{constructor(V,Z){this._templateId=V,this.renderers=Z}get templateId(){return this._templateId}renderTemplate(V){return this.renderers.map(Z=>Z.renderTemplate(V))}renderElement(V,Z,ee,le){let ue=0;for(const de of this.renderers)de.renderElement(V,Z,ee[ue++],le)}disposeElement(V,Z,ee,le){var ue;let de=0;for(const ce of this.renderers)(ue=ce.disposeElement)===null||ue===void 0||ue.call(ce,V,Z,ee[de],le),de+=1}disposeTemplate(V){let Z=0;for(const ee of this.renderers)ee.disposeTemplate(V[Z++])}}class se{constructor(V){this.accessibilityProvider=V,this.templateId="a18n"}renderTemplate(V){return V}renderElement(V,Z,ee){const le=this.accessibilityProvider.getAriaLabel(V);le?ee.setAttribute("aria-label",le):ee.removeAttribute("aria-label");const ue=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(V);typeof ue=="number"?ee.setAttribute("aria-level",`${ue}`):ee.removeAttribute("aria-level")}disposeTemplate(V){}}class J{constructor(V,Z){this.list=V,this.dnd=Z}getDragElements(V){const Z=this.list.getSelectedElements();return Z.indexOf(V)>-1?Z:[V]}getDragURI(V){return this.dnd.getDragURI(V)}getDragLabel(V,Z){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(V,Z)}onDragStart(V,Z){var ee,le;(le=(ee=this.dnd).onDragStart)===null||le===void 0||le.call(ee,V,Z)}onDragOver(V,Z,ee,le){return this.dnd.onDragOver(V,Z,ee,le)}onDragLeave(V,Z,ee,le){var ue,de;(de=(ue=this.dnd).onDragLeave)===null||de===void 0||de.call(ue,V,Z,ee,le)}onDragEnd(V){var Z,ee;(ee=(Z=this.dnd).onDragEnd)===null||ee===void 0||ee.call(Z,V)}drop(V,Z,ee,le){this.dnd.drop(V,Z,ee,le)}dispose(){this.dnd.dispose()}}class q{get onDidChangeFocus(){return i.Event.map(this.eventBufferer.wrapEvent(this.focus.onChange),V=>this.toListEvent(V),this.disposables)}get onDidChangeSelection(){return i.Event.map(this.eventBufferer.wrapEvent(this.selection.onChange),V=>this.toListEvent(V),this.disposables)}get domId(){return this.view.domId}get onDidScroll(){return this.view.onDidScroll}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onMouseOver(){return this.view.onMouseOver}get onMouseOut(){return this.view.onMouseOut}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let V=!1;const Z=i.Event.chain(this.disposables.add(new I.DomEmitter(this.view.domNode,"keydown")).event,ue=>ue.map(de=>new y.StandardKeyboardEvent(de)).filter(de=>V=de.keyCode===58||de.shiftKey&&de.keyCode===68).map(de=>L.EventHelper.stop(de,!0)).filter(()=>!1)),ee=i.Event.chain(this.disposables.add(new I.DomEmitter(this.view.domNode,"keyup")).event,ue=>ue.forEach(()=>V=!1).map(de=>new y.StandardKeyboardEvent(de)).filter(de=>de.keyCode===58||de.shiftKey&&de.keyCode===68).map(de=>L.EventHelper.stop(de,!0)).map(({browserEvent:de})=>{const ce=this.getFocus(),ae=ce.length?ce[0]:void 0,X=typeof ae<"u"?this.view.element(ae):void 0,K=typeof ae<"u"?this.view.domElement(ae):this.view.domNode;return{index:ae,element:X,anchor:K,browserEvent:de}})),le=i.Event.chain(this.view.onContextMenu,ue=>ue.filter(de=>!V).map(({element:de,index:ce,browserEvent:ae})=>({element:de,index:ce,anchor:new o.StandardMouseEvent(ae),browserEvent:ae})));return i.Event.any(Z,ee,le)}get onKeyDown(){return this.disposables.add(new I.DomEmitter(this.view.domNode,"keydown")).event}get onDidFocus(){return i.Event.signal(this.disposables.add(new I.DomEmitter(this.view.domNode,"focus",!0)).event)}constructor(V,Z,ee,le,ue=W){var de,ce,ae,X;this.user=V,this._options=ue,this.focus=new a("focused"),this.anchor=new a("anchor"),this.eventBufferer=new i.EventBufferer,this._ariaLabel="",this.disposables=new t.DisposableStore,this._onDidDispose=new i.Emitter,this.onDidDispose=this._onDidDispose.event;const K=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(de=this._options.accessibilityProvider)===null||de===void 0?void 0:de.getWidgetRole():"list";this.selection=new g(K!=="listbox");const z=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=ue.accessibilityProvider,this.accessibilityProvider&&(z.push(new se(this.accessibilityProvider)),(ae=(ce=this.accessibilityProvider).onDidChangeActiveDescendant)===null||ae===void 0||ae.call(ce,this.onDidChangeActiveDescendant,this,this.disposables)),le=le.map(j=>new ne(j.templateId,[...z,j]));const Q=Object.assign(Object.assign({},ue),{dnd:ue.dnd&&new J(this,ue.dnd)});if(this.view=this.createListView(Z,ee,le,Q),this.view.domNode.setAttribute("role",K),ue.styleController)this.styleController=ue.styleController(this.view.domId);else{const j=(0,L.createStyleSheet)(this.view.domNode);this.styleController=new x(j,this.view.domId)}if(this.spliceable=new m.CombinedSpliceable([new h(this.focus,this.view,ue.identityProvider),new h(this.selection,this.view,ue.identityProvider),new h(this.anchor,this.view,ue.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new B(this,this.view)),(typeof ue.keyboardSupport!="boolean"||ue.keyboardSupport)&&(this.keyboardController=new E(this,this.view,ue),this.disposables.add(this.keyboardController)),ue.keyboardNavigationLabelProvider){const j=ue.keyboardNavigationDelegate||e.DefaultKeyboardNavigationDelegate;this.typeNavigationController=new R(this,this.view,ue.keyboardNavigationLabelProvider,(X=ue.keyboardNavigationEventFilter)!==null&&X!==void 0?X:()=>!0,j),this.disposables.add(this.typeNavigationController)}this.mouseController=this.createMouseController(ue),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()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}createListView(V,Z,ee,le){return new l.ListView(V,Z,ee,le)}createMouseController(V){return new O(this)}updateOptions(V={}){var Z,ee;this._options=Object.assign(Object.assign({},this._options),V),(Z=this.typeNavigationController)===null||Z===void 0||Z.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(V),(ee=this.keyboardController)===null||ee===void 0||ee.updateOptions(V),this.view.updateOptions(V)}get options(){return this._options}splice(V,Z,ee=[]){if(V<0||V>this.view.length)throw new d.ListError(this.user,`Invalid start index: ${V}`);if(Z<0)throw new d.ListError(this.user,`Invalid delete count: ${Z}`);Z===0&&ee.length===0||this.eventBufferer.bufferEvents(()=>this.spliceable.splice(V,Z,ee))}rerender(){this.view.rerender()}element(V){return this.view.element(V)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(V){this.view.setScrollTop(V)}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}get firstVisibleIndex(){return this.view.firstVisibleIndex}get ariaLabel(){return this._ariaLabel}set ariaLabel(V){this._ariaLabel=V,this.view.domNode.setAttribute("aria-label",V)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(V,Z){this.view.layout(V,Z)}setSelection(V,Z){for(const ee of V)if(ee<0||ee>=this.length)throw new d.ListError(this.user,`Invalid index ${ee}`);this.selection.set(V,Z)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map(V=>this.view.element(V))}setAnchor(V){if(typeof V>"u"){this.anchor.set([]);return}if(V<0||V>=this.length)throw new d.ListError(this.user,`Invalid index ${V}`);this.anchor.set([V])}getAnchor(){return(0,_.firstOrDefault)(this.anchor.get(),void 0)}getAnchorElement(){const V=this.getAnchor();return typeof V>"u"?void 0:this.element(V)}setFocus(V,Z){for(const ee of V)if(ee<0||ee>=this.length)throw new d.ListError(this.user,`Invalid index ${ee}`);this.focus.set(V,Z)}focusNext(V=1,Z=!1,ee,le){if(this.length===0)return;const ue=this.focus.get(),de=this.findNextIndex(ue.length>0?ue[0]+V:0,Z,le);de>-1&&this.setFocus([de],ee)}focusPrevious(V=1,Z=!1,ee,le){if(this.length===0)return;const ue=this.focus.get(),de=this.findPreviousIndex(ue.length>0?ue[0]-V:0,Z,le);de>-1&&this.setFocus([de],ee)}focusNextPage(V,Z){return be(this,void 0,void 0,function*(){let ee=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);ee=ee===0?0:ee-1;const le=this.getFocus()[0];if(le!==ee&&(le===void 0||ee>le)){const ue=this.findPreviousIndex(ee,!1,Z);ue>-1&&le!==ue?this.setFocus([ue],V):this.setFocus([ee],V)}else{const ue=this.view.getScrollTop();let de=ue+this.view.renderHeight;ee>le&&(de-=this.view.elementHeight(ee)),this.view.setScrollTop(de),this.view.getScrollTop()!==ue&&(this.setFocus([]),yield(0,v.timeout)(0),yield this.focusNextPage(V,Z))}})}focusPreviousPage(V,Z){return be(this,void 0,void 0,function*(){let ee;const le=this.view.getScrollTop();le===0?ee=this.view.indexAt(le):ee=this.view.indexAfter(le-1);const ue=this.getFocus()[0];if(ue!==ee&&(ue===void 0||ue>=ee)){const de=this.findNextIndex(ee,!1,Z);de>-1&&ue!==de?this.setFocus([de],V):this.setFocus([ee],V)}else{const de=le;this.view.setScrollTop(le-this.view.renderHeight),this.view.getScrollTop()!==de&&(this.setFocus([]),yield(0,v.timeout)(0),yield this.focusPreviousPage(V,Z))}})}focusLast(V,Z){if(this.length===0)return;const ee=this.findPreviousIndex(this.length-1,!1,Z);ee>-1&&this.setFocus([ee],V)}focusFirst(V,Z){this.focusNth(0,V,Z)}focusNth(V,Z,ee){if(this.length===0)return;const le=this.findNextIndex(V,!1,ee);le>-1&&this.setFocus([le],Z)}findNextIndex(V,Z=!1,ee){for(let le=0;le=this.length&&!Z)return-1;if(V=V%this.length,!ee||ee(this.element(V)))return V;V++}return-1}findPreviousIndex(V,Z=!1,ee){for(let le=0;lethis.view.element(V))}reveal(V,Z){if(V<0||V>=this.length)throw new d.ListError(this.user,`Invalid index ${V}`);const ee=this.view.getScrollTop(),le=this.view.elementTop(V),ue=this.view.elementHeight(V);if((0,f.isNumber)(Z)){const de=ue-this.view.renderHeight;this.view.setScrollTop(de*(0,r.clamp)(Z,0,1)+le)}else{const de=le+ue,ce=ee+this.view.renderHeight;le=ce||(le=ce&&ue>=this.view.renderHeight?this.view.setScrollTop(le):de>=ce&&this.view.setScrollTop(de-this.view.renderHeight))}}getHTMLElement(){return this.view.domNode}getElementID(V){return this.view.getElementDomId(V)}style(V){this.styleController.style(V)}toListEvent({indexes:V,browserEvent:Z}){return{indexes:V,elements:V.map(ee=>this.view.element(ee)),browserEvent:Z}}_onFocusChange(){const V=this.focus.get();this.view.domNode.classList.toggle("element-focused",V.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var V;const Z=this.focus.get();if(Z.length>0){let ee;!((V=this.accessibilityProvider)===null||V===void 0)&&V.getActiveDescendantId&&(ee=this.accessibilityProvider.getActiveDescendantId(this.view.element(Z[0]))),this.view.domNode.setAttribute("aria-activedescendant",ee||this.view.getElementDomId(Z[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const V=this.selection.get();this.view.domNode.classList.toggle("selection-none",V.length===0),this.view.domNode.classList.toggle("selection-single",V.length===1),this.view.domNode.classList.toggle("selection-multiple",V.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}e.List=q,Ie([s.memoize],q.prototype,"onDidChangeFocus",null),Ie([s.memoize],q.prototype,"onDidChangeSelection",null),Ie([s.memoize],q.prototype,"onContextMenu",null),Ie([s.memoize],q.prototype,"onKeyDown",null),Ie([s.memoize],q.prototype,"onDidFocus",null)}),define(te[581],ie([1,0,13,19,6,2,113,267]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PagedList=void 0;class m{get templateId(){return this.renderer.templateId}constructor(i,n){this.renderer=i,this.modelProvider=n}renderTemplate(i){return{data:this.renderer.renderTemplate(i),disposable:D.Disposable.None}}renderElement(i,n,t,r){var u;if((u=t.disposable)===null||u===void 0||u.dispose(),!t.data)return;const f=this.modelProvider();if(f.isResolved(i))return this.renderer.renderElement(f.get(i),i,t.data,r);const d=new I.CancellationTokenSource,l=f.resolve(i,d.token);t.disposable={dispose:()=>d.cancel()},this.renderer.renderPlaceholder(i,t.data),l.then(o=>this.renderer.renderElement(o,i,t.data,r))}disposeTemplate(i){i.disposable&&(i.disposable.dispose(),i.disposable=void 0),i.data&&(this.renderer.disposeTemplate(i.data),i.data=void 0)}}class _{constructor(i,n){this.modelProvider=i,this.accessibilityProvider=n}getWidgetAriaLabel(){return this.accessibilityProvider.getWidgetAriaLabel()}getAriaLabel(i){const n=this.modelProvider();return n.isResolved(i)?this.accessibilityProvider.getAriaLabel(n.get(i)):null}}function v(s,i){return Object.assign(Object.assign({},i),{accessibilityProvider:i.accessibilityProvider&&new _(s,i.accessibilityProvider)})}class C{constructor(i,n,t,r,u={}){const f=()=>this.model,d=r.map(l=>new m(l,f));this.list=new S.List(i,n,t,d,v(f,u))}updateOptions(i){this.list.updateOptions(i)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get widget(){return this.list}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return y.Event.map(this.list.onMouseDblClick,({element:i,index:n,browserEvent:t})=>({element:i===void 0?void 0:this._model.get(i),index:n,browserEvent:t}))}get onPointer(){return y.Event.map(this.list.onPointer,({element:i,index:n,browserEvent:t})=>({element:i===void 0?void 0:this._model.get(i),index:n,browserEvent:t}))}get onDidChangeSelection(){return y.Event.map(this.list.onDidChangeSelection,({elements:i,indexes:n,browserEvent:t})=>({elements:i.map(r=>this._model.get(r)),indexes:n,browserEvent:t}))}get model(){return this._model}set model(i){this._model=i,this.list.splice(0,this.list.length,(0,L.range)(i.length))}getFocus(){return this.list.getFocus()}getSelection(){return this.list.getSelection()}getSelectedElements(){return this.getSelection().map(i=>this.model.get(i))}style(i){this.list.style(i)}dispose(){this.list.dispose()}}e.PagedList=C}),define(te[316],ie([1,0,7,79,152,84,13,36,6,2,139,166,20,414]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SplitView=e.Sizing=void 0;const n={separatorBorder:m.Color.transparent};class t{set size(c){this._size=c}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize>"u"}setVisible(c,a){var g,h;c!==this.visible&&(c?(this.size=(0,C.clamp)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof a=="number"?a:this.size,this.size=0),this.container.classList.toggle("visible",c),(h=(g=this.view).setVisible)===null||h===void 0||h.call(g,c))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get proportionalLayout(){var c;return(c=this.view.proportionalLayout)!==null&&c!==void 0?c:!0}get snap(){return!!this.view.snap}set enabled(c){this.container.style.pointerEvents=c?"":"none"}constructor(c,a,g,h){this.container=c,this.view=a,this.disposable=h,this._cachedVisibleSize=void 0,typeof g=="number"?(this._size=g,this._cachedVisibleSize=void 0,c.classList.add("visible")):(this._size=0,this._cachedVisibleSize=g.cachedVisibleSize)}layout(c,a){this.layoutContainer(c),this.view.layout(this.size,c,a)}dispose(){this.disposable.dispose()}}class r extends t{layoutContainer(c){this.container.style.top=`${c}px`,this.container.style.height=`${this.size}px`}}class u extends t{layoutContainer(c){this.container.style.left=`${c}px`,this.container.style.width=`${this.size}px`}}var f;(function(o){o[o.Idle=0]="Idle",o[o.Busy=1]="Busy"})(f||(f={}));var d;(function(o){o.Distribute={type:"distribute"};function c(h){return{type:"split",index:h}}o.Split=c;function a(h){return{type:"auto",index:h}}o.Auto=a;function g(h){return{type:"invisible",cachedVisibleSize:h}}o.Invisible=g})(d||(e.Sizing=d={}));class l extends v.Disposable{get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(c){for(const a of this.sashItems)a.sash.orthogonalStartSash=c;this._orthogonalStartSash=c}set orthogonalEndSash(c){for(const a of this.sashItems)a.sash.orthogonalEndSash=c;this._orthogonalEndSash=c}set startSnappingEnabled(c){this._startSnappingEnabled!==c&&(this._startSnappingEnabled=c,this.updateSashEnablement())}set endSnappingEnabled(c){this._endSnappingEnabled!==c&&(this._endSnappingEnabled=c,this.updateSashEnablement())}constructor(c,a={}){var g,h,p,b,w;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=f.Idle,this._onDidSashChange=this._register(new _.Emitter),this._onDidSashReset=this._register(new _.Emitter),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=(g=a.orientation)!==null&&g!==void 0?g:0,this.inverseAltBehavior=(h=a.inverseAltBehavior)!==null&&h!==void 0?h:!1,this.proportionalLayout=(p=a.proportionalLayout)!==null&&p!==void 0?p:!0,this.getSashOrthogonalSize=a.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),c.appendChild(this.el),this.sashContainer=(0,L.append)(this.el,(0,L.$)(".sash-container")),this.viewContainer=(0,L.$)(".split-view-container"),this.scrollable=this._register(new s.Scrollable({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:L.scheduleAtNextAnimationFrame})),this.scrollableElement=this._register(new D.SmoothScrollableElement(this.viewContainer,{vertical:this.orientation===0?(b=a.scrollbarVisibility)!==null&&b!==void 0?b:1:2,horizontal:this.orientation===1?(w=a.scrollbarVisibility)!==null&&w!==void 0?w:1:2},this.scrollable));const E=this._register(new I.DomEmitter(this.viewContainer,"scroll")).event;this._register(E(k=>{const M=this.scrollableElement.getScrollPosition(),R=Math.abs(this.viewContainer.scrollLeft-M.scrollLeft)<=1?void 0:this.viewContainer.scrollLeft,B=Math.abs(this.viewContainer.scrollTop-M.scrollTop)<=1?void 0:this.viewContainer.scrollTop;(R!==void 0||B!==void 0)&&this.scrollableElement.setScrollPosition({scrollLeft:R,scrollTop:B})})),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(k=>{k.scrollTopChanged&&(this.viewContainer.scrollTop=k.scrollTop),k.scrollLeftChanged&&(this.viewContainer.scrollLeft=k.scrollLeft)})),(0,L.append)(this.el,this.scrollableElement.getDomNode()),this.style(a.styles||n),a.descriptor&&(this.size=a.descriptor.size,a.descriptor.views.forEach((k,M)=>{const R=i.isUndefined(k.visible)||k.visible?k.size:{type:"invisible",cachedVisibleSize:k.size},B=k.view;this.doAddView(B,R,M,!0)}),this.contentSize=this.viewItems.reduce((k,M)=>k+M.size,0),this.saveProportions())}style(c){c.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",c.separatorBorder.toString()))}addView(c,a,g=this.viewItems.length,h){this.doAddView(c,a,g,h)}layout(c,a){const g=Math.max(this.size,this.contentSize);if(this.size=c,this.layoutContext=a,this.proportions){let h=0;for(let p=0;pthis.viewItems[w].priority===1),b=h.filter(w=>this.viewItems[w].priority===2);this.resize(this.viewItems.length-1,c-g,void 0,p,b)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(c=>c.proportionalLayout?c.size/this.contentSize:void 0))}onSashStart({sash:c,start:a,alt:g}){for(const w of this.viewItems)w.enabled=!1;const h=this.sashItems.findIndex(w=>w.sash===c),p=(0,v.combinedDisposable)((0,L.addDisposableListener)(document.body,"keydown",w=>b(this.sashDragState.current,w.altKey)),(0,L.addDisposableListener)(document.body,"keyup",()=>b(this.sashDragState.current,!1))),b=(w,E)=>{const k=this.viewItems.map(N=>N.size);let M=Number.NEGATIVE_INFINITY,R=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(E=!E),E)if(h===this.sashItems.length-1){const A=this.viewItems[h];M=(A.minimumSize-A.size)/2,R=(A.maximumSize-A.size)/2}else{const A=this.viewItems[h+1];M=(A.size-A.maximumSize)/2,R=(A.size-A.minimumSize)/2}let B,T;if(!E){const N=(0,S.range)(h,-1),A=(0,S.range)(h+1,this.viewItems.length),P=N.reduce((ne,se)=>ne+(this.viewItems[se].minimumSize-k[se]),0),O=N.reduce((ne,se)=>ne+(this.viewItems[se].viewMaximumSize-k[se]),0),x=A.length===0?Number.POSITIVE_INFINITY:A.reduce((ne,se)=>ne+(k[se]-this.viewItems[se].minimumSize),0),W=A.length===0?Number.NEGATIVE_INFINITY:A.reduce((ne,se)=>ne+(k[se]-this.viewItems[se].viewMaximumSize),0),U=Math.max(P,W),F=Math.min(x,O),G=this.findFirstSnapIndex(N),Y=this.findFirstSnapIndex(A);if(typeof G=="number"){const ne=this.viewItems[G],se=Math.floor(ne.viewMinimumSize/2);B={index:G,limitDelta:ne.visible?U-se:U+se,size:ne.size}}if(typeof Y=="number"){const ne=this.viewItems[Y],se=Math.floor(ne.viewMinimumSize/2);T={index:Y,limitDelta:ne.visible?F+se:F-se,size:ne.size}}}this.sashDragState={start:w,current:w,index:h,sizes:k,minDelta:M,maxDelta:R,alt:E,snapBefore:B,snapAfter:T,disposable:p}};b(a,g)}onSashChange({current:c}){const{index:a,start:g,sizes:h,alt:p,minDelta:b,maxDelta:w,snapBefore:E,snapAfter:k}=this.sashDragState;this.sashDragState.current=c;const M=c-g,R=this.resize(a,M,h,void 0,void 0,b,w,E,k);if(p){const B=a===this.sashItems.length-1,T=this.viewItems.map(W=>W.size),N=B?a:a+1,A=this.viewItems[N],P=A.size-A.maximumSize,O=A.size-A.minimumSize,x=B?a-1:a+1;this.resize(x,-R,T,void 0,void 0,P,O)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(c){this._onDidSashChange.fire(c),this.sashDragState.disposable.dispose(),this.saveProportions();for(const a of this.viewItems)a.enabled=!0}onViewChange(c,a){const g=this.viewItems.indexOf(c);g<0||g>=this.viewItems.length||(a=typeof a=="number"?a:c.size,a=(0,C.clamp)(a,c.minimumSize,c.maximumSize),this.inverseAltBehavior&&g>0?(this.resize(g-1,Math.floor((c.size-a)/2)),this.distributeEmptySpace(),this.layoutViews()):(c.size=a,this.relayout([g],void 0)))}resizeView(c,a){if(this.state!==f.Idle)throw new Error("Cant modify splitview");if(this.state=f.Busy,c<0||c>=this.viewItems.length)return;const g=(0,S.range)(this.viewItems.length).filter(w=>w!==c),h=[...g.filter(w=>this.viewItems[w].priority===1),c],p=g.filter(w=>this.viewItems[w].priority===2),b=this.viewItems[c];a=Math.round(a),a=(0,C.clamp)(a,b.minimumSize,Math.min(b.maximumSize,this.size)),b.size=a,this.relayout(h,p),this.state=f.Idle}distributeViewSizes(){const c=[];let a=0;for(const w of this.viewItems)w.maximumSize-w.minimumSize>0&&(c.push(w),a+=w.size);const g=Math.floor(a/c.length);for(const w of c)w.size=(0,C.clamp)(g,w.minimumSize,w.maximumSize);const h=(0,S.range)(this.viewItems.length),p=h.filter(w=>this.viewItems[w].priority===1),b=h.filter(w=>this.viewItems[w].priority===2);this.relayout(p,b)}getViewSize(c){return c<0||c>=this.viewItems.length?-1:this.viewItems[c].size}doAddView(c,a,g=this.viewItems.length,h){if(this.state!==f.Idle)throw new Error("Cant modify splitview");this.state=f.Busy;const p=(0,L.$)(".split-view-view");g===this.viewItems.length?this.viewContainer.appendChild(p):this.viewContainer.insertBefore(p,this.viewContainer.children.item(g));const b=c.onDidChange(B=>this.onViewChange(M,B)),w=(0,v.toDisposable)(()=>this.viewContainer.removeChild(p)),E=(0,v.combinedDisposable)(b,w);let k;typeof a=="number"?k=a:(a.type==="auto"&&(this.areViewsDistributed()?a={type:"distribute"}:a={type:"split",index:a.index}),a.type==="split"?k=this.getViewSize(a.index)/2:a.type==="invisible"?k={cachedVisibleSize:a.cachedVisibleSize}:k=c.minimumSize);const M=this.orientation===0?new r(p,c,k,E):new u(p,c,k,E);if(this.viewItems.splice(g,0,M),this.viewItems.length>1){const B={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash},T=this.orientation===0?new y.Sash(this.sashContainer,{getHorizontalSashTop:ne=>this.getSashPosition(ne),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},B),{orientation:1})):new y.Sash(this.sashContainer,{getVerticalSashLeft:ne=>this.getSashPosition(ne),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},B),{orientation:0})),N=this.orientation===0?ne=>({sash:T,start:ne.startY,current:ne.currentY,alt:ne.altKey}):ne=>({sash:T,start:ne.startX,current:ne.currentX,alt:ne.altKey}),P=_.Event.map(T.onDidStart,N)(this.onSashStart,this),x=_.Event.map(T.onDidChange,N)(this.onSashChange,this),U=_.Event.map(T.onDidEnd,()=>this.sashItems.findIndex(ne=>ne.sash===T))(this.onSashEnd,this),F=T.onDidReset(()=>{const ne=this.sashItems.findIndex(V=>V.sash===T),se=(0,S.range)(ne,-1),J=(0,S.range)(ne+1,this.viewItems.length),q=this.findFirstSnapIndex(se),H=this.findFirstSnapIndex(J);typeof q=="number"&&!this.viewItems[q].visible||typeof H=="number"&&!this.viewItems[H].visible||this._onDidSashReset.fire(ne)}),G=(0,v.combinedDisposable)(P,x,U,F,T),Y={sash:T,disposable:G};this.sashItems.splice(g-1,0,Y)}p.appendChild(c.element);let R;typeof a!="number"&&a.type==="split"&&(R=[a.index]),h||this.relayout([g],R),this.state=f.Idle,!h&&typeof a!="number"&&a.type==="distribute"&&this.distributeViewSizes()}relayout(c,a){const g=this.viewItems.reduce((h,p)=>h+p.size,0);this.resize(this.viewItems.length-1,this.size-g,void 0,c,a),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(c,a,g=this.viewItems.map(M=>M.size),h,p,b=Number.NEGATIVE_INFINITY,w=Number.POSITIVE_INFINITY,E,k){if(c<0||c>=this.viewItems.length)return 0;const M=(0,S.range)(c,-1),R=(0,S.range)(c+1,this.viewItems.length);if(p)for(const Y of p)(0,S.pushToStart)(M,Y),(0,S.pushToStart)(R,Y);if(h)for(const Y of h)(0,S.pushToEnd)(M,Y),(0,S.pushToEnd)(R,Y);const B=M.map(Y=>this.viewItems[Y]),T=M.map(Y=>g[Y]),N=R.map(Y=>this.viewItems[Y]),A=R.map(Y=>g[Y]),P=M.reduce((Y,ne)=>Y+(this.viewItems[ne].minimumSize-g[ne]),0),O=M.reduce((Y,ne)=>Y+(this.viewItems[ne].maximumSize-g[ne]),0),x=R.length===0?Number.POSITIVE_INFINITY:R.reduce((Y,ne)=>Y+(g[ne]-this.viewItems[ne].minimumSize),0),W=R.length===0?Number.NEGATIVE_INFINITY:R.reduce((Y,ne)=>Y+(g[ne]-this.viewItems[ne].maximumSize),0),U=Math.max(P,W,b),F=Math.min(x,O,w);let G=!1;if(E){const Y=this.viewItems[E.index],ne=a>=E.limitDelta;G=ne!==Y.visible,Y.setVisible(ne,E.size)}if(!G&&k){const Y=this.viewItems[k.index],ne=aw+E.size,0);let g=this.size-a;const h=(0,S.range)(this.viewItems.length-1,-1),p=h.filter(w=>this.viewItems[w].priority===1),b=h.filter(w=>this.viewItems[w].priority===2);for(const w of b)(0,S.pushToStart)(h,w);for(const w of p)(0,S.pushToEnd)(h,w);typeof c=="number"&&(0,S.pushToEnd)(h,c);for(let w=0;g!==0&&wa+g.size,0);let c=0;for(const a of this.viewItems)a.layout(c,this.layoutContext),c+=a.size;this.sashItems.forEach(a=>a.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let c=!1;const a=this.viewItems.map(E=>c=E.size-E.minimumSize>0||c);c=!1;const g=this.viewItems.map(E=>c=E.maximumSize-E.size>0||c),h=[...this.viewItems].reverse();c=!1;const p=h.map(E=>c=E.size-E.minimumSize>0||c).reverse();c=!1;const b=h.map(E=>c=E.maximumSize-E.size>0||c).reverse();let w=0;for(let E=0;E0||this.startSnappingEnabled)?k.state=1:x&&a[E]&&(w0)return;if(!g.visible&&g.snap)return a}}areViewsDistributed(){let c,a;for(const g of this.viewItems)if(c=c===void 0?g.size:Math.min(c,g.size),a=a===void 0?g.size:Math.max(a,g.size),a-c>2)return!1;return!0}dispose(){var c;(c=this.sashDragState)===null||c===void 0||c.disposable.dispose(),(0,v.dispose)(this.viewItems),this.viewItems=[],this.sashItems.forEach(a=>a.disposable.dispose()),this.sashItems=[],super.dispose()}}e.SplitView=l}),define(te[582],ie([1,0,7,113,316,6,2,415]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Table=void 0;class m{constructor(i,n,t){this.columns=i,this.getColumnSize=t,this.templateId=m.TemplateId,this.renderedTemplates=new Set;const r=new Map(n.map(u=>[u.templateId,u]));this.renderers=[];for(const u of i){const f=r.get(u.templateId);if(!f)throw new Error(`Table cell renderer for template id ${u.templateId} not found.`);this.renderers.push(f)}}renderTemplate(i){const n=(0,L.append)(i,(0,L.$)(".monaco-table-tr")),t=[],r=[];for(let f=0;fnew v(c,a)),l={size:d.reduce((c,a)=>c+a.column.weight,0),views:d.map(c=>({size:c.column.weight,view:c}))};this.splitview=this.disposables.add(new y.SplitView(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l})),this.splitview.el.style.height=`${t.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${t.headerRowHeight}px`;const o=new m(r,u,c=>this.splitview.getViewSize(c));this.list=this.disposables.add(new I.List(i,this.domNode,_(t),[o],f)),D.Event.any(...d.map(c=>c.onDidLayout))(([c,a])=>o.layoutColumn(c,a),null,this.disposables),this.splitview.onDidSashReset(c=>{const a=r.reduce((h,p)=>h+p.weight,0),g=r[c].weight/a*this.cachedWidth;this.splitview.resizeView(c,g)},null,this.disposables),this.styleElement=(0,L.createStyleSheet)(this.domNode),this.style(I.unthemedListStyles)}updateOptions(i){this.list.updateOptions(i)}splice(i,n,t=[]){this.list.splice(i,n,t)}getHTMLElement(){return this.domNode}style(i){const n=[];n.push(`.monaco-table.${this.domId} > .monaco-split-view2 .monaco-sash.vertical::before { - top: ${this.virtualDelegate.headerRowHeight+1}px; - height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); - }`),this.styleElement.textContent=n.join(` -`),this.list.style(i)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.disposables.dispose()}}e.Table=C,C.InstanceCount=0}),define(te[153],ie([1,0,83,27,6,416]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Toggle=e.unthemedToggleStyles=void 0,e.unthemedToggleStyles={inputActiveOptionBorder:"#007ACC00",inputActiveOptionForeground:"#FFFFFF",inputActiveOptionBackground:"#0E639C50"};class D extends L.Widget{constructor(m){super(),this._onChange=this._register(new y.Emitter),this.onChange=this._onChange.event,this._onKeyDown=this._register(new y.Emitter),this.onKeyDown=this._onKeyDown.event,this._opts=m,this._checked=this._opts.isChecked;const _=["monaco-custom-toggle"];this._opts.icon&&(this._icon=this._opts.icon,_.push(...I.ThemeIcon.asClassNameArray(this._icon))),this._opts.actionClassName&&_.push(...this._opts.actionClassName.split(" ")),this._checked&&_.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(..._),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,v=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),v.preventDefault())}),this._register(this.ignoreGesture(this.domNode)),this.onkeydown(this.domNode,v=>{if(v.keyCode===10||v.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),v.preventDefault(),v.stopPropagation();return}this._onKeyDown.fire(v)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(m){this._checked=m,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 2+2+2+16}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder||"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground||"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground||"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}e.Toggle=D}),define(te[317],ie([1,0,153,26,556]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RegexToggle=e.WholeWordsToggle=e.CaseSensitiveToggle=void 0;const D=y.localize(0,null),S=y.localize(1,null),m=y.localize(2,null);class _ extends L.Toggle{constructor(i){super({icon:I.Codicon.caseSensitive,title:D+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.CaseSensitiveToggle=_;class v extends L.Toggle{constructor(i){super({icon:I.Codicon.wholeWord,title:S+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.WholeWordsToggle=v;class C extends L.Toggle{constructor(i){super({icon:I.Codicon.regex,title:m+i.appendTitle,isChecked:i.isChecked,inputActiveOptionBorder:i.inputActiveOptionBorder,inputActiveOptionForeground:i.inputActiveOptionForeground,inputActiveOptionBackground:i.inputActiveOptionBackground})}}e.RegexToggle=C}),define(te[46],ie([1,0,220,54,92,17,10,21]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataUri=e.addTrailingPathSeparator=e.removeTrailingPathSeparator=e.hasTrailingPathSeparator=e.isEqualAuthority=e.isAbsolutePath=e.resolvePath=e.relativePath=e.normalizePath=e.joinPath=e.dirname=e.extname=e.basename=e.basenameOrAuthority=e.getComparisonKey=e.isEqualOrParent=e.isEqual=e.extUriIgnorePathCase=e.extUriBiasedIgnorePathCase=e.extUri=e.ExtUri=e.originalFSPath=void 0;function _(s){return(0,m.uriToFsPath)(s,!0)}e.originalFSPath=_;class v{constructor(i){this._ignorePathCasing=i}compare(i,n,t=!1){return i===n?0:(0,S.compare)(this.getComparisonKey(i,t),this.getComparisonKey(n,t))}isEqual(i,n,t=!1){return i===n?!0:!i||!n?!1:this.getComparisonKey(i,t)===this.getComparisonKey(n,t)}getComparisonKey(i,n=!1){return i.with({path:this._ignorePathCasing(i)?i.path.toLowerCase():void 0,fragment:n?null:void 0}).toString()}isEqualOrParent(i,n,t=!1){if(i.scheme===n.scheme){if(i.scheme===I.Schemas.file)return L.isEqualOrParent(_(i),_(n),this._ignorePathCasing(i))&&i.query===n.query&&(t||i.fragment===n.fragment);if((0,e.isEqualAuthority)(i.authority,n.authority))return L.isEqualOrParent(i.path,n.path,this._ignorePathCasing(i),"/")&&i.query===n.query&&(t||i.fragment===n.fragment)}return!1}joinPath(i,...n){return m.URI.joinPath(i,...n)}basenameOrAuthority(i){return(0,e.basename)(i)||i.authority}basename(i){return y.posix.basename(i.path)}extname(i){return y.posix.extname(i.path)}dirname(i){if(i.path.length===0)return i;let n;return i.scheme===I.Schemas.file?n=m.URI.file(y.dirname(_(i))).path:(n=y.posix.dirname(i.path),i.authority&&n.length&&n.charCodeAt(0)!==47&&(console.error(`dirname("${i.toString})) resulted in a relative path`),n="/")),i.with({path:n})}normalizePath(i){if(!i.path.length)return i;let n;return i.scheme===I.Schemas.file?n=m.URI.file(y.normalize(_(i))).path:n=y.posix.normalize(i.path),i.with({path:n})}relativePath(i,n){if(i.scheme!==n.scheme||!(0,e.isEqualAuthority)(i.authority,n.authority))return;if(i.scheme===I.Schemas.file){const u=y.relative(_(i),_(n));return D.isWindows?L.toSlashes(u):u}let t=i.path||"/";const r=n.path||"/";if(this._ignorePathCasing(i)){let u=0;for(const f=Math.min(t.length,r.length);uL.getRoot(t).length&&t[t.length-1]===n}else{const t=i.path;return t.length>1&&t.charCodeAt(t.length-1)===47&&!/^[a-zA-Z]:(\/$|\\$)/.test(i.fsPath)}}removeTrailingPathSeparator(i,n=y.sep){return(0,e.hasTrailingPathSeparator)(i,n)?i.with({path:i.path.substr(0,i.path.length-1)}):i}addTrailingPathSeparator(i,n=y.sep){let t=!1;if(i.scheme===I.Schemas.file){const r=_(i);t=r!==void 0&&r.length===L.getRoot(r).length&&r[r.length-1]===n}else{n="/";const r=i.path;t=r.length===1&&r.charCodeAt(r.length-1)===47}return!t&&!(0,e.hasTrailingPathSeparator)(i,n)?i.with({path:i.path+"/"}):i}}e.ExtUri=v,e.extUri=new v(()=>!1),e.extUriBiasedIgnorePathCase=new v(s=>s.scheme===I.Schemas.file?!D.isLinux:!0),e.extUriIgnorePathCase=new v(s=>!0),e.isEqual=e.extUri.isEqual.bind(e.extUri),e.isEqualOrParent=e.extUri.isEqualOrParent.bind(e.extUri),e.getComparisonKey=e.extUri.getComparisonKey.bind(e.extUri),e.basenameOrAuthority=e.extUri.basenameOrAuthority.bind(e.extUri),e.basename=e.extUri.basename.bind(e.extUri),e.extname=e.extUri.extname.bind(e.extUri),e.dirname=e.extUri.dirname.bind(e.extUri),e.joinPath=e.extUri.joinPath.bind(e.extUri),e.normalizePath=e.extUri.normalizePath.bind(e.extUri),e.relativePath=e.extUri.relativePath.bind(e.extUri),e.resolvePath=e.extUri.resolvePath.bind(e.extUri),e.isAbsolutePath=e.extUri.isAbsolutePath.bind(e.extUri),e.isEqualAuthority=e.extUri.isEqualAuthority.bind(e.extUri),e.hasTrailingPathSeparator=e.extUri.hasTrailingPathSeparator.bind(e.extUri),e.removeTrailingPathSeparator=e.extUri.removeTrailingPathSeparator.bind(e.extUri),e.addTrailingPathSeparator=e.extUri.addTrailingPathSeparator.bind(e.extUri);var C;(function(s){s.META_DATA_LABEL="label",s.META_DATA_DESCRIPTION="description",s.META_DATA_SIZE="size",s.META_DATA_MIME="mime";function i(n){const t=new Map;n.path.substring(n.path.indexOf(";")+1,n.path.lastIndexOf(";")).split(";").forEach(f=>{const[d,l]=f.split(":");d&&l&&t.set(d,l)});const u=n.path.substring(0,n.path.indexOf(";"));return u&&t.set(s.META_DATA_MIME,u),t}s.parseMetaData=i})(C||(e.DataUri=C={}))}),define(te[57],ie([1,0,9,119,46,10,21]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseHrefAndDimensions=e.removeMarkdownEscapes=e.escapeDoubleQuotes=e.escapeMarkdownSyntaxTokens=e.markdownStringEqual=e.isMarkdownString=e.isEmptyMarkdownString=e.MarkdownString=void 0;class m{constructor(u="",f=!1){var d,l,o;if(this.value=u,typeof this.value!="string")throw(0,L.illegalArgument)("value");typeof f=="boolean"?(this.isTrusted=f,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(d=f.isTrusted)!==null&&d!==void 0?d:void 0,this.supportThemeIcons=(l=f.supportThemeIcons)!==null&&l!==void 0?l:!1,this.supportHtml=(o=f.supportHtml)!==null&&o!==void 0?o:!1)}appendText(u,f=0){return this.value+=s(this.supportThemeIcons?(0,I.escapeIcons)(u):u).replace(/([ \t]+)/g,(d,l)=>" ".repeat(l.length)).replace(/\>/gm,"\\>").replace(/\n/g,f===1?`\\ -`:` - -`),this}appendMarkdown(u){return this.value+=u,this}appendCodeblock(u,f){return this.value+="\n```",this.value+=u,this.value+=` -`,this.value+=f,this.value+="\n```\n",this}appendLink(u,f,d){return this.value+="[",this.value+=this._escape(f,"]"),this.value+="](",this.value+=this._escape(String(u),")"),d&&(this.value+=` "${this._escape(this._escape(d,'"'),")")}"`),this.value+=")",this}_escape(u,f){const d=new RegExp((0,D.escapeRegExpCharacters)(f),"g");return u.replace(d,(l,o)=>u.charAt(o-1)!=="\\"?`\\${l}`:l)}}e.MarkdownString=m;function _(r){return v(r)?!r.value:Array.isArray(r)?r.every(_):!0}e.isEmptyMarkdownString=_;function v(r){return r instanceof m?!0:r&&typeof r=="object"?typeof r.value=="string"&&(typeof r.isTrusted=="boolean"||typeof r.isTrusted=="object"||r.isTrusted===void 0)&&(typeof r.supportThemeIcons=="boolean"||r.supportThemeIcons===void 0):!1}e.isMarkdownString=v;function C(r,u){return r===u?!0:!r||!u?!1:r.value===u.value&&r.isTrusted===u.isTrusted&&r.supportThemeIcons===u.supportThemeIcons&&r.supportHtml===u.supportHtml&&(r.baseUri===u.baseUri||!!r.baseUri&&!!u.baseUri&&(0,y.isEqual)(S.URI.from(r.baseUri),S.URI.from(u.baseUri)))}e.markdownStringEqual=C;function s(r){return r.replace(/[\\`*_{}[\]()#+\-!~]/g,"\\$&")}e.escapeMarkdownSyntaxTokens=s;function i(r){return r.replace(/"/g,""")}e.escapeDoubleQuotes=i;function n(r){return r&&r.replace(/\\([\\`*_{}[\]()#+\-.!~])/g,"$1")}e.removeMarkdownEscapes=n;function t(r){const u=[],f=r.split("|").map(l=>l.trim());r=f[0];const d=f[1];if(d){const l=/height=(\d+)/.exec(d),o=/width=(\d+)/.exec(d),c=l?l[1]:"",a=o?o[1]:"",g=isFinite(parseInt(a)),h=isFinite(parseInt(c));g&&u.push(`width="${a}"`),h&&u.push(`height="${c}"`)}return{href:r,dimensions:u}}e.parseHrefAndDimensions=t}),define(te[181],ie([1,0,7,309,79,310,44,60,128,9,6,57,119,163,97,2,390,221,54,52,46,10,21]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.fillInIncompleteTokens=e.renderMarkdownAsPlaintext=e.renderStringAsPlaintext=e.allowedMarkdownAttr=e.renderMarkdown=void 0;const g=Object.freeze({image:(J,q,H)=>{let V=[],Z=[];return J&&({href:J,dimensions:V}=(0,s.parseHrefAndDimensions)(J),Z.push(`src="${(0,s.escapeDoubleQuotes)(J)}"`)),H&&Z.push(`alt="${(0,s.escapeDoubleQuotes)(H)}"`),q&&Z.push(`title="${(0,s.escapeDoubleQuotes)(q)}"`),V.length&&(Z=Z.concat(V)),""},paragraph:J=>`

    ${J}

    `,link:(J,q,H)=>typeof J!="string"?"":(J===H&&(H=(0,s.removeMarkdownEscapes)(H)),q=typeof q=="string"?(0,s.escapeDoubleQuotes)((0,s.removeMarkdownEscapes)(q)):"",J=(0,s.removeMarkdownEscapes)(J),J=J.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"),`
    ${H}`)});function h(J,q={},H={}){var V,Z;const ee=new r.DisposableStore;let le=!1;const ue=(0,D.createElement)(q),de=function(oe){let he;try{he=(0,f.parse)(decodeURIComponent(oe))}catch{}return he?(he=(0,l.cloneAndChange)(he,me=>{if(J.uris&&J.uris[me])return a.URI.revive(J.uris[me])}),encodeURIComponent(JSON.stringify(he))):oe},ce=function(oe,he){const me=J.uris&&J.uris[oe];let pe=a.URI.revive(me);return he?oe.startsWith(d.Schemas.data+":")?oe:(pe||(pe=a.URI.parse(oe)),d.FileAccess.uriToBrowserUri(pe).toString(!0)):!pe||a.URI.parse(oe).toString()===pe.toString()?oe:(pe.query&&(pe=pe.with({query:de(pe.query)})),pe.toString())},ae=new u.marked.Renderer;ae.image=g.image,ae.link=g.link,ae.paragraph=g.paragraph;const X=[],K=[];if(q.codeBlockRendererSync?ae.code=(oe,he)=>{const me=n.defaultGenerator.nextId(),pe=q.codeBlockRendererSync(p(he),oe);return K.push([me,pe]),`
    ${(0,c.escape)(oe)}
    `}:q.codeBlockRenderer&&(ae.code=(oe,he)=>{const me=n.defaultGenerator.nextId(),pe=q.codeBlockRenderer(p(he),oe);return X.push(pe.then(ve=>[me,ve])),`
    ${(0,c.escape)(oe)}
    `}),q.actionHandler){const oe=function(pe){let ve=pe.target;if(!(ve.tagName!=="A"&&(ve=ve.parentElement,!ve||ve.tagName!=="A")))try{let we=ve.dataset.href;we&&(J.baseUri&&(we=b(a.URI.from(J.baseUri),we)),q.actionHandler.callback(we,pe))}catch(we){(0,v.onUnexpectedError)(we)}finally{pe.preventDefault()}},he=q.actionHandler.disposables.add(new y.DomEmitter(ue,"click")),me=q.actionHandler.disposables.add(new y.DomEmitter(ue,"auxclick"));q.actionHandler.disposables.add(C.Event.any(he.event,me.event)(pe=>{const ve=new m.StandardMouseEvent(pe);!ve.leftButton&&!ve.middleButton||oe(ve)})),q.actionHandler.disposables.add(L.addDisposableListener(ue,"keydown",pe=>{const ve=new S.StandardKeyboardEvent(pe);!ve.equals(10)&&!ve.equals(3)||oe(ve)}))}J.supportHtml||(H.sanitizer=oe=>(J.isTrusted?oe.match(/^(]+>)|(<\/\s*span>)$/):void 0)?oe:"",H.sanitize=!0,H.silent=!0),H.renderer=ae;let z=(V=J.value)!==null&&V!==void 0?V:"";z.length>1e5&&(z=`${z.substr(0,1e5)}\u2026`),J.supportThemeIcons&&(z=(0,i.markdownEscapeEscapedIcons)(z));let Q;if(q.fillInIncompleteTokens){const oe=Object.assign(Object.assign({},u.marked.defaults),H),he=u.marked.lexer(z,oe),me=A(he);Q=u.marked.parser(me,oe)}else Q=u.marked.parse(z,H);J.supportThemeIcons&&(Q=(0,_.renderLabelWithIcons)(Q).map(he=>typeof he=="string"?he:he.outerHTML).join(""));const re=new DOMParser().parseFromString(w(J,Q),"text/html");if(re.body.querySelectorAll("img").forEach(oe=>{const he=oe.getAttribute("src");if(he){let me=he;try{J.baseUri&&(me=b(a.URI.from(J.baseUri),me))}catch{}oe.src=ce(me,!0)}}),re.body.querySelectorAll("a").forEach(oe=>{const he=oe.getAttribute("href");if(oe.setAttribute("href",""),!he||/^data:|javascript:/i.test(he)||/^command:/i.test(he)&&!J.isTrusted||/^command:(\/\/\/)?_workbench\.downloadResource/i.test(he))oe.replaceWith(...oe.childNodes);else{let me=ce(he,!1);J.baseUri&&(me=b(a.URI.from(J.baseUri),he)),oe.dataset.href=me}}),ue.innerHTML=w(J,re.body.innerHTML),X.length>0)Promise.all(X).then(oe=>{var he,me;if(le)return;const pe=new Map(oe),ve=ue.querySelectorAll("div[data-code]");for(const we of ve){const Le=pe.get((he=we.dataset.code)!==null&&he!==void 0?he:"");Le&&L.reset(we,Le)}(me=q.asyncRenderCallback)===null||me===void 0||me.call(q)});else if(K.length>0){const oe=new Map(K),he=ue.querySelectorAll("div[data-code]");for(const me of he){const pe=oe.get((Z=me.dataset.code)!==null&&Z!==void 0?Z:"");pe&&L.reset(me,pe)}}if(q.asyncRenderCallback)for(const oe of ue.getElementsByTagName("img")){const he=ee.add(L.addDisposableListener(oe,"load",()=>{he.dispose(),q.asyncRenderCallback()}))}return{element:ue,dispose:()=>{le=!0,ee.dispose()}}}e.renderMarkdown=h;function p(J){if(!J)return"";const q=J.split(/[\s+|:|,|\{|\?]/,1);return q.length?q[0]:J}function b(J,q){return/^\w[\w\d+.-]*:/.test(q)?q:J.path.endsWith("/")?(0,o.resolvePath)(J,q).toString():(0,o.resolvePath)((0,o.dirname)(J),q).toString()}function w(J,q){const{config:H,allowedSchemes:V}=E(J);I.addHook("uponSanitizeAttribute",(ee,le)=>{if(le.attrName==="style"||le.attrName==="class"){if(ee.tagName==="SPAN"){if(le.attrName==="style"){le.keepAttr=/^(color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?(background-color\:(#[0-9a-fA-F]+|var\(--vscode(-[a-zA-Z]+)+\));)?$/.test(le.attrValue);return}else if(le.attrName==="class"){le.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(le.attrValue);return}}le.keepAttr=!1;return}});const Z=L.hookDomPurifyHrefAndSrcSanitizer(V);try{return I.sanitize(q,Object.assign(Object.assign({},H),{RETURN_TRUSTED_TYPE:!0}))}finally{I.removeHook("uponSanitizeAttribute"),Z.dispose()}}e.allowedMarkdownAttr=["align","autoplay","alt","class","controls","data-code","data-href","height","href","loop","muted","playsinline","poster","src","style","target","title","width","start"];function E(J){const q=[d.Schemas.http,d.Schemas.https,d.Schemas.mailto,d.Schemas.data,d.Schemas.file,d.Schemas.vscodeFileResource,d.Schemas.vscodeRemote,d.Schemas.vscodeRemoteResource];return J.isTrusted&&q.push(d.Schemas.command),{config:{ALLOWED_TAGS:[...L.basicMarkupHtmlTags],ALLOWED_ATTR:e.allowedMarkdownAttr,ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:q}}function k(J){return typeof J=="string"?J:M(J)}e.renderStringAsPlaintext=k;function M(J){var q;let H=(q=J.value)!==null&&q!==void 0?q:"";H.length>1e5&&(H=`${H.substr(0,1e5)}\u2026`);const V=u.marked.parse(H,{renderer:B.value}).replace(/&(#\d+|[a-zA-Z]+);/g,Z=>{var ee;return(ee=R.get(Z))!==null&&ee!==void 0?ee:Z});return w({isTrusted:!1},V).toString()}e.renderMarkdownAsPlaintext=M;const R=new Map([[""",'"'],[" "," "],["&","&"],["'","'"],["<","<"],[">",">"]]),B=new t.Lazy(()=>{const J=new u.marked.Renderer;return J.code=q=>q,J.blockquote=q=>q,J.html=q=>"",J.heading=(q,H,V)=>q+` -`,J.hr=()=>"",J.list=(q,H)=>q,J.listitem=q=>q+` -`,J.paragraph=q=>q+` -`,J.table=(q,H)=>q+H+` -`,J.tablerow=q=>q,J.tablecell=(q,H)=>q+" ",J.strong=q=>q,J.em=q=>q,J.codespan=q=>q,J.br=()=>` -`,J.del=q=>q,J.image=(q,H,V)=>"",J.text=q=>q,J.link=(q,H,V)=>V,J});function T(J){let q="";return J.forEach(H=>{q+=H.raw}),q}function N(J){for(const q of J.tokens)if(q.type==="text"){const H=q.raw.split(` -`),V=H[H.length-1];if(V.includes("`"))return O(J);if(V.includes("**"))return G(J);if(V.match(/\*\w/))return x(J);if(V.match(/(^|\s)__\w/))return Y(J);if(V.match(/(^|\s)_\w/))return W(J);if(V.match(/(^|\s)\[.*\]\(\w*/))return U(J);if(V.match(/(^|\s)\[\w/))return F(J)}}function A(J){let q,H;for(q=0;q"u"&&le.match(/^\s*\|/)){const ue=le.match(/(\|[^\|]+)(?=\||$)/g);ue&&(V=ue.length)}else if(typeof V=="number")if(le.match(/^\s*\|/)){if(ee!==H.length-1)return;Z=!0}else return}if(typeof V=="number"&&V>0){const ee=Z?H.slice(0,-1).join(` -`):q,le=!!ee.match(/\|\s*$/),ue=ee+(le?"":"|")+` -|${" --- |".repeat(V)}`;return u.marked.lexer(ue)}}}),define(te[318],ie([1,0,7,309,44,181,61,128,36,6,57,2,399]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Button=e.unthemedButtonStyles=void 0,e.unthemedButtonStyles={buttonBackground:"#0E639C",buttonHoverBackground:"#006BB3",buttonSeparator:_.Color.white.toString(),buttonForeground:_.Color.white.toString(),buttonBorder:void 0,buttonSecondaryBackground:void 0,buttonSecondaryForeground:void 0,buttonSecondaryHoverBackground:void 0};class i extends s.Disposable{get onDidClick(){return this._onDidClick.event}constructor(t,r){super(),this._label="",this._onDidClick=this._register(new v.Emitter),this.options=r,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),this._element.classList.toggle("secondary",!!r.secondary);const u=r.secondary?r.buttonSecondaryBackground:r.buttonBackground,f=r.secondary?r.buttonSecondaryForeground:r.buttonForeground;this._element.style.color=f||"",this._element.style.backgroundColor=u||"",r.supportShortLabel&&(this._labelShortElement=document.createElement("div"),this._labelShortElement.classList.add("monaco-button-label-short"),this._element.appendChild(this._labelShortElement),this._labelElement=document.createElement("div"),this._labelElement.classList.add("monaco-button-label"),this._element.appendChild(this._labelElement),this._element.classList.add("monaco-text-button-with-short-label")),t.appendChild(this._element),this._register(S.Gesture.addTarget(this._element)),[L.EventType.CLICK,S.EventType.Tap].forEach(d=>{this._register((0,L.addDisposableListener)(this._element,d,l=>{if(!this.enabled){L.EventHelper.stop(l);return}this._onDidClick.fire(l)}))}),this._register((0,L.addDisposableListener)(this._element,L.EventType.KEY_DOWN,d=>{const l=new y.StandardKeyboardEvent(d);let o=!1;this.enabled&&(l.equals(3)||l.equals(10))?(this._onDidClick.fire(d),o=!0):l.equals(9)&&(this._element.blur(),o=!0),o&&L.EventHelper.stop(l,!0)})),this._register((0,L.addDisposableListener)(this._element,L.EventType.MOUSE_OVER,d=>{this._element.classList.contains("disabled")||this.updateBackground(!0)})),this._register((0,L.addDisposableListener)(this._element,L.EventType.MOUSE_OUT,d=>{this.updateBackground(!1)})),this.focusTracker=this._register((0,L.trackFocus)(this._element)),this._register(this.focusTracker.onDidFocus(()=>{this.enabled&&this.updateBackground(!0)})),this._register(this.focusTracker.onDidBlur(()=>{this.enabled&&this.updateBackground(!1)}))}dispose(){super.dispose(),this._element.remove()}getContentElements(t){const r=[];for(let u of(0,m.renderLabelWithIcons)(t))if(typeof u=="string"){if(u=u.trim(),u==="")continue;const f=document.createElement("span");f.textContent=u,r.push(f)}else r.push(u);return r}updateBackground(t){let r;this.options.secondary?r=t?this.options.buttonSecondaryHoverBackground:this.options.buttonSecondaryBackground:r=t?this.options.buttonHoverBackground:this.options.buttonBackground,r&&(this._element.style.backgroundColor=r)}get element(){return this._element}set label(t){var r;if(this._label===t||(0,C.isMarkdownString)(this._label)&&(0,C.isMarkdownString)(t)&&(0,C.markdownStringEqual)(this._label,t))return;this._element.classList.add("monaco-text-button");const u=this.options.supportShortLabel?this._labelElement:this._element;if((0,C.isMarkdownString)(t)){const f=(0,D.renderMarkdown)(t,{inline:!0});f.dispose();const d=(r=f.element.querySelector("p"))===null||r===void 0?void 0:r.innerHTML;if(d){const l=(0,I.sanitize)(d,{ADD_TAGS:["b","i","u","code","span"],ALLOWED_ATTR:["class"],RETURN_TRUSTED_TYPE:!0});u.innerHTML=l}else(0,L.reset)(u)}else this.options.supportIcons?(0,L.reset)(u,...this.getContentElements(t)):u.textContent=t;typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=(0,D.renderStringAsPlaintext)(t)),this._label=t}get label(){return this._label}set enabled(t){t?(this._element.classList.remove("disabled"),this._element.setAttribute("aria-disabled",String(!1)),this._element.tabIndex=0):(this._element.classList.add("disabled"),this._element.setAttribute("aria-disabled",String(!0)))}get enabled(){return!this._element.classList.contains("disabled")}}e.Button=i}),define(te[319],ie([1,0,7,14,19,57,119,2,20,559]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setupCustomHover=e.setupNativeHover=void 0;function C(n,t){(0,_.isString)(t)?n.title=(0,S.stripIcons)(t):t?.markdownNotSupportedFallback?n.title=t.markdownNotSupportedFallback:n.removeAttribute("title")}e.setupNativeHover=C;class s{constructor(t,r,u){this.hoverDelegate=t,this.target=r,this.fadeInAnimation=u}update(t,r,u){var f;return be(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let d;if(t===void 0||(0,_.isString)(t)||t instanceof HTMLElement)d=t;else if(!(0,_.isFunction)(t.markdown))d=(f=t.markdown)!==null&&f!==void 0?f:t.markdownNotSupportedFallback;else{this._hoverWidget||this.show((0,v.localize)(0,null),r),this._cancellationTokenSource=new y.CancellationTokenSource;const l=this._cancellationTokenSource.token;if(d=yield t.markdown(l),d===void 0&&(d=t.markdownNotSupportedFallback),this.isDisposed||l.isCancellationRequested)return}this.show(d,r,u)})}show(t,r,u){const f=this._hoverWidget;if(this.hasContent(t)){const d=Object.assign({content:t,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!f},u);this._hoverWidget=this.hoverDelegate.showHover(d,r)}f?.dispose()}hasContent(t){return t?(0,D.isMarkdownString)(t)?!!t.value:!0:!1}get isDisposed(){var t;return(t=this._hoverWidget)===null||t===void 0?void 0:t.isDisposed}dispose(){var t,r;(t=this._hoverWidget)===null||t===void 0||t.dispose(),(r=this._cancellationTokenSource)===null||r===void 0||r.dispose(!0),this._cancellationTokenSource=void 0}}function i(n,t,r,u){let f,d;const l=(h,p)=>{var b;const w=d!==void 0;h&&(d?.dispose(),d=void 0),p&&(f?.dispose(),f=void 0),w&&((b=n.onDidHideHover)===null||b===void 0||b.call(n))},o=(h,p,b)=>new I.TimeoutTimer(()=>be(this,void 0,void 0,function*(){(!d||d.isDisposed)&&(d=new s(n,b||t,h>0),yield d.update(r,p,u))}),h),c=()=>{if(f)return;const h=new m.DisposableStore,p=E=>l(!1,E.fromElement===t);h.add(L.addDisposableListener(t,L.EventType.MOUSE_LEAVE,p,!0));const b=()=>l(!0,!0);h.add(L.addDisposableListener(t,L.EventType.MOUSE_DOWN,b,!0));const w={targetElements:[t],dispose:()=>{}};if(n.placement===void 0||n.placement==="mouse"){const E=k=>{w.x=k.x+10,k.target instanceof HTMLElement&&k.target.classList.contains("action-label")&&l(!0,!0)};h.add(L.addDisposableListener(t,L.EventType.MOUSE_MOVE,E,!0))}h.add(o(n.delay,!1,w)),f=h},a=L.addDisposableListener(t,L.EventType.MOUSE_OVER,c,!0);return{show:h=>{l(!1,!0),o(0,h)},hide:()=>{l(!0,!0)},update:(h,p)=>be(this,void 0,void 0,function*(){r=h,yield d?.update(r,void 0,p)}),dispose:()=>{a.dispose(),l(!0,!0)}}}e.setupCustomHover=i}),define(te[226],ie([1,0,7,313,319,2,52,165,405]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IconLabel=void 0;class _{constructor(t){this._element=t}get element(){return this._element}set textContent(t){this.disposed||t===this._textContent||(this._textContent=t,this._element.textContent=t)}set className(t){this.disposed||t===this._className||(this._className=t,this._element.className=t)}set empty(t){this.disposed||t===this._empty||(this._empty=t,this._element.style.marginLeft=t?"0":"")}dispose(){this.disposed=!0}}class v extends D.Disposable{constructor(t,r){super(),this.customHovers=new Map,this.creationOptions=r,this.domNode=this._register(new _(L.append(t,L.$(".monaco-icon-label")))),this.labelContainer=L.append(this.domNode.element,L.$(".monaco-icon-label-container"));const u=L.append(this.labelContainer,L.$("span.monaco-icon-name-container"));r?.supportHighlights||r?.supportIcons?this.nameNode=new i(u,!!r.supportIcons):this.nameNode=new C(u),this.hoverDelegate=r?.hoverDelegate}get element(){return this.domNode.element}setLabel(t,r,u){const f=["monaco-icon-label"],d=["monaco-icon-label-container"];let l="";if(u&&(u.extraClasses&&f.push(...u.extraClasses),u.italic&&f.push("italic"),u.strikethrough&&f.push("strikethrough"),u.disabledCommand&&d.push("disabled"),u.title&&(l+=u.title)),this.domNode.className=f.join(" "),this.domNode.element.setAttribute("aria-label",l),this.labelContainer.className=d.join(" "),this.setupHover(u?.descriptionTitle?this.labelContainer:this.element,u?.title),this.nameNode.setLabel(t,u),r||this.descriptionNode){const o=this.getOrCreateDescriptionNode();o instanceof I.HighlightedLabel?(o.set(r||"",u?u.descriptionMatches:void 0,void 0,u?.labelEscapeNewLines),this.setupHover(o.element,u?.descriptionTitle)):(o.textContent=r&&u?.labelEscapeNewLines?I.HighlightedLabel.escapeNewLines(r,[]):r||"",this.setupHover(o.element,u?.descriptionTitle||""),o.empty=!r)}}setupHover(t,r){const u=this.customHovers.get(t);if(u&&(u.dispose(),this.customHovers.delete(t)),!r){t.removeAttribute("title");return}if(!this.hoverDelegate)(0,y.setupNativeHover)(t,r);else{const f=(0,y.setupCustomHover)(this.hoverDelegate,t,r);f&&this.customHovers.set(t,f)}}dispose(){super.dispose();for(const t of this.customHovers.values())t.dispose();this.customHovers.clear()}getOrCreateDescriptionNode(){var t;if(!this.descriptionNode){const r=this._register(new _(L.append(this.labelContainer,L.$("span.monaco-icon-description-container"))));!((t=this.creationOptions)===null||t===void 0)&&t.supportDescriptionHighlights?this.descriptionNode=new I.HighlightedLabel(L.append(r.element,L.$("span.label-description")),{supportIcons:!!this.creationOptions.supportIcons}):this.descriptionNode=this._register(new _(L.append(r.element,L.$("span.label-description"))))}return this.descriptionNode}}e.IconLabel=v;class C{constructor(t){this.container=t,this.label=void 0,this.singleLabel=void 0}setLabel(t,r){if(!(this.label===t&&(0,S.equals)(this.options,r)))if(this.label=t,this.options=r,typeof t=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=L.append(this.container,L.$("a.label-name",{id:r?.domId}))),this.singleLabel.textContent=t;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let u=0;u{const d={start:u,end:u+f.length},l=r.map(o=>m.Range.intersect(d,o)).filter(o=>!m.Range.isEmpty(o)).map(({start:o,end:c})=>({start:o-u,end:c-u}));return u=d.end+t.length,l})}class i{constructor(t,r){this.container=t,this.supportIcons=r,this.label=void 0,this.singleLabel=void 0}setLabel(t,r){if(!(this.label===t&&(0,S.equals)(this.options,r)))if(this.label=t,this.options=r,typeof t=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new I.HighlightedLabel(L.append(this.container,L.$("a.label-name",{id:r?.domId})),{supportIcons:this.supportIcons})),this.singleLabel.set(t,r?.matches,void 0,r?.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const u=r?.separator||"/",f=s(t,u,r?.matches);for(let d=0;d{L.EventHelper.stop(c,!0)}))}registerListeners(){this._register(L.addStandardDisposableListener(this.selectElement,"change",l=>{this.selected=l.target.selectedIndex,this._onDidSelect.fire({index:l.target.selectedIndex,selected:l.target.value}),this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)})),this._register(L.addDisposableListener(this.selectElement,L.EventType.CLICK,l=>{L.EventHelper.stop(l),this._isVisible?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(L.addDisposableListener(this.selectElement,L.EventType.MOUSE_DOWN,l=>{L.EventHelper.stop(l)}));let d;this._register(L.addDisposableListener(this.selectElement,"touchstart",l=>{d=this._isVisible})),this._register(L.addDisposableListener(this.selectElement,"touchend",l=>{L.EventHelper.stop(l),d?this.hideSelectDropDown(!0):this.showSelectDropDown()})),this._register(L.addDisposableListener(this.selectElement,L.EventType.KEY_DOWN,l=>{const o=new y.StandardKeyboardEvent(l);let c=!1;s.isMacintosh?(o.keyCode===18||o.keyCode===16||o.keyCode===10||o.keyCode===3)&&(c=!0):(o.keyCode===18&&o.altKey||o.keyCode===16&&o.altKey||o.keyCode===10||o.keyCode===3)&&(c=!0),c&&(this.showSelectDropDown(),L.EventHelper.stop(l,!0))}))}get onDidSelect(){return this._onDidSelect.event}setOptions(d,l){m.equals(this.options,d)||(this.options=d,this.selectElement.options.length=0,this._hasDetails=!1,this._cachedMaxDetailsHeight=void 0,this.options.forEach((o,c)=>{this.selectElement.add(this.createOption(o.text,c,o.isDisabled)),typeof o.description=="string"&&(this._hasDetails=!0)})),l!==void 0&&(this.select(l),this._currentSelection=this.selected)}setOptionsList(){var d;(d=this.selectList)===null||d===void 0||d.splice(0,this.selectList.length,this.options)}select(d){d>=0&&dthis.options.length-1?this.select(this.options.length-1):this.selected<0&&(this.selected=0),this.selectElement.selectedIndex=this.selected,this.options[this.selected]&&this.options[this.selected].text&&(this.selectElement.title=this.options[this.selected].text)}focus(){this.selectElement&&(this.selectElement.tabIndex=0,this.selectElement.focus())}blur(){this.selectElement&&(this.selectElement.tabIndex=-1,this.selectElement.blur())}setFocusable(d){this.selectElement.tabIndex=d?0:-1}render(d){this.container=d,d.classList.add("select-container"),d.appendChild(this.selectElement),this.styleSelectElement()}initStyleSheet(){const d=[];this.styles.listFocusBackground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { background-color: ${this.styles.listFocusBackground} !important; }`),this.styles.listFocusForeground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { color: ${this.styles.listFocusForeground} !important; }`),this.styles.decoratorRightForeground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.focused) .option-decorator-right { color: ${this.styles.decoratorRightForeground}; }`),this.styles.selectBackground&&this.styles.selectBorder&&this.styles.selectBorder!==this.styles.selectBackground?(d.push(`.monaco-select-box-dropdown-container { border: 1px solid ${this.styles.selectBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectBorder} } `)):this.styles.selectListBorder&&(d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-top { border-top: 1px solid ${this.styles.selectListBorder} } `),d.push(`.monaco-select-box-dropdown-container > .select-box-details-pane.border-bottom { border-bottom: 1px solid ${this.styles.selectListBorder} } `)),this.styles.listHoverForeground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { color: ${this.styles.listHoverForeground} !important; }`),this.styles.listHoverBackground&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { background-color: ${this.styles.listHoverBackground} !important; }`),this.styles.listFocusOutline&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.focused { outline: 1.6px dotted ${this.styles.listFocusOutline} !important; outline-offset: -1.6px !important; }`),this.styles.listHoverOutline&&d.push(`.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row:not(.option-disabled):not(.focused):hover { outline: 1.6px dashed ${this.styles.listHoverOutline} !important; outline-offset: -1.6px !important; }`),d.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled.focused { background-color: transparent !important; color: inherit !important; outline: none !important; }"),d.push(".monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list .monaco-list-row.option-disabled:hover { background-color: transparent !important; color: inherit !important; outline: none !important; }"),this.styleElement.textContent=d.join(` -`)}styleSelectElement(){var d,l,o;const c=(d=this.styles.selectBackground)!==null&&d!==void 0?d:"",a=(l=this.styles.selectForeground)!==null&&l!==void 0?l:"",g=(o=this.styles.selectBorder)!==null&&o!==void 0?o:"";this.selectElement.style.backgroundColor=c,this.selectElement.style.color=a,this.selectElement.style.borderColor=g}styleList(){var d,l;const o=(d=this.styles.selectBackground)!==null&&d!==void 0?d:"",c=L.asCssValueWithDefault(this.styles.selectListBackground,o);this.selectDropDownListContainer.style.backgroundColor=c,this.selectionDetailsPane.style.backgroundColor=c;const a=(l=this.styles.focusBorder)!==null&&l!==void 0?l:"";this.selectDropDownContainer.style.outlineColor=a,this.selectDropDownContainer.style.outlineOffset="-1px",this.selectList.style(this.styles)}createOption(d,l,o){const c=document.createElement("option");return c.value=d,c.text=d,c.disabled=!!o,c}showSelectDropDown(){this.selectionDetailsPane.innerText="",!(!this.contextViewProvider||this._isVisible)&&(this.createSelectList(this.selectDropDownContainer),this.setOptionsList(),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:d=>this.renderSelectDropDown(d,!0),layout:()=>{this.layoutSelectDropDown()},onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._isVisible=!0,this.hideSelectDropDown(!1),this.contextViewProvider.showContextView({getAnchor:()=>this.selectElement,render:d=>this.renderSelectDropDown(d),layout:()=>this.layoutSelectDropDown(),onHide:()=>{this.selectDropDownContainer.classList.remove("visible"),this.selectElement.classList.remove("synthetic-focus")},anchorPosition:this._dropDownPosition},this.selectBoxOptions.optionsAsChildren?this.container:void 0),this._currentSelection=this.selected,this._isVisible=!0,this.selectElement.setAttribute("aria-expanded","true"))}hideSelectDropDown(d){!this.contextViewProvider||!this._isVisible||(this._isVisible=!1,this.selectElement.setAttribute("aria-expanded","false"),d&&this.selectElement.focus(),this.contextViewProvider.hideContextView())}renderSelectDropDown(d,l){return d.appendChild(this.selectDropDownContainer),this.layoutSelectDropDown(l),{dispose:()=>{try{d.removeChild(this.selectDropDownContainer)}catch{}}}}measureMaxDetailsHeight(){let d=0;return this.options.forEach((l,o)=>{this.updateDetail(o),this.selectionDetailsPane.offsetHeight>d&&(d=this.selectionDetailsPane.offsetHeight)}),d}layoutSelectDropDown(d){if(this._skipLayout)return!1;if(this.selectList){this.selectDropDownContainer.classList.add("visible");const l=L.getDomNodePagePosition(this.selectElement),o=getComputedStyle(this.selectElement),c=parseFloat(o.getPropertyValue("--dropdown-padding-top"))+parseFloat(o.getPropertyValue("--dropdown-padding-bottom")),a=window.innerHeight-l.top-l.height-(this.selectBoxOptions.minBottomMargin||0),g=l.top-u.DEFAULT_DROPDOWN_MINIMUM_TOP_MARGIN,h=this.selectElement.offsetWidth,p=this.setWidthControlElement(this.widthControlElement),b=Math.max(p,Math.round(h)).toString()+"px";this.selectDropDownContainer.style.width=b,this.selectList.getHTMLElement().style.height="",this.selectList.layout();let w=this.selectList.contentHeight;this._hasDetails&&this._cachedMaxDetailsHeight===void 0&&(this._cachedMaxDetailsHeight=this.measureMaxDetailsHeight());const E=this._hasDetails?this._cachedMaxDetailsHeight:0,k=w+c+E,M=Math.floor((a-c-E)/this.getHeight()),R=Math.floor((g-c-E)/this.getHeight());if(d)return l.top+l.height>window.innerHeight-22||l.topM&&this.options.length>M?(this._dropDownPosition=1,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectionDetailsPane.classList.remove("border-top"),this.selectionDetailsPane.classList.add("border-bottom")):(this._dropDownPosition=0,this.selectDropDownContainer.removeChild(this.selectDropDownListContainer),this.selectDropDownContainer.removeChild(this.selectionDetailsPane),this.selectDropDownContainer.appendChild(this.selectDropDownListContainer),this.selectDropDownContainer.appendChild(this.selectionDetailsPane),this.selectionDetailsPane.classList.remove("border-bottom"),this.selectionDetailsPane.classList.add("border-top")),!0);if(l.top+l.height>window.innerHeight-22||l.topa&&(w=M*this.getHeight())}else k>g&&(w=R*this.getHeight());return this.selectList.layout(w),this.selectList.domFocus(),this.selectList.length>0&&(this.selectList.setFocus([this.selected||0]),this.selectList.reveal(this.selectList.getFocus()[0]||0)),this._hasDetails?(this.selectList.getHTMLElement().style.height=w+c+"px",this.selectDropDownContainer.style.height=""):this.selectDropDownContainer.style.height=w+c+"px",this.updateDetail(this.selected),this.selectDropDownContainer.style.width=b,this.selectDropDownListContainer.setAttribute("tabindex","0"),this.selectElement.classList.add("synthetic-focus"),this.selectDropDownContainer.classList.add("synthetic-focus"),!0}else return!1}setWidthControlElement(d){let l=0;if(d){let o=0,c=0;this.options.forEach((a,g)=>{const h=a.detail?a.detail.length:0,p=a.decoratorRight?a.decoratorRight.length:0,b=a.text.length+h+p;b>c&&(o=g,c=b)}),d.textContent=this.options[o].text+(this.options[o].decoratorRight?this.options[o].decoratorRight+" ":""),l=L.getTotalWidth(d)}return l}createSelectList(d){if(this.selectList)return;this.selectDropDownListContainer=L.append(d,n(".select-box-dropdown-list-container")),this.listRenderer=new r,this.selectList=new S.List("SelectBoxCustom",this.selectDropDownListContainer,this,[this.listRenderer],{useShadows:!1,verticalScrollMode:3,keyboardSupport:!1,mouseSupport:!1,accessibilityProvider:{getAriaLabel:c=>{let a=c.text;return c.detail&&(a+=`. ${c.detail}`),c.decoratorRight&&(a+=`. ${c.decoratorRight}`),c.description&&(a+=`. ${c.description}`),a},getWidgetAriaLabel:()=>(0,i.localize)(0,null),getRole:()=>s.isMacintosh?"":"option",getWidgetRole:()=>"listbox"}}),this.selectBoxOptions.ariaLabel&&(this.selectList.ariaLabel=this.selectBoxOptions.ariaLabel);const l=this._register(new I.DomEmitter(this.selectDropDownListContainer,"keydown")),o=_.Event.chain(l.event,c=>c.filter(()=>this.selectList.length>0).map(a=>new y.StandardKeyboardEvent(a)));this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===3))(this.onEnter,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===2))(this.onEnter,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===9))(this.onEscape,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===16))(this.onUpArrow,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===18))(this.onDownArrow,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===12))(this.onPageDown,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===11))(this.onPageUp,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===14))(this.onHome,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode===13))(this.onEnd,this)),this._register(_.Event.chain(o,c=>c.filter(a=>a.keyCode>=21&&a.keyCode<=56||a.keyCode>=85&&a.keyCode<=113))(this.onCharacter,this)),this._register(L.addDisposableListener(this.selectList.getHTMLElement(),L.EventType.POINTER_UP,c=>this.onPointerUp(c))),this._register(this.selectList.onMouseOver(c=>typeof c.index<"u"&&this.selectList.setFocus([c.index]))),this._register(this.selectList.onDidChangeFocus(c=>this.onListFocus(c))),this._register(L.addDisposableListener(this.selectDropDownContainer,L.EventType.FOCUS_OUT,c=>{!this._isVisible||L.isAncestor(c.relatedTarget,this.selectDropDownContainer)||this.onListBlur()})),this.selectList.getHTMLElement().setAttribute("aria-label",this.selectBoxOptions.ariaLabel||""),this.selectList.getHTMLElement().setAttribute("aria-expanded","true"),this.styleList()}onPointerUp(d){if(!this.selectList.length)return;L.EventHelper.stop(d);const l=d.target;if(!l||l.classList.contains("slider"))return;const o=l.closest(".monaco-list-row");if(!o)return;const c=Number(o.getAttribute("data-index")),a=o.classList.contains("option-disabled");c>=0&&c{for(let g=0;gthis.selected+2)this.selected+=2;else{if(l)return;this.selected++}this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0])}}onUpArrow(d){this.selected>0&&(L.EventHelper.stop(d,!0),this.options[this.selected-1].isDisabled&&this.selected>1?this.selected-=2:this.selected--,this.select(this.selected),this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selectList.getFocus()[0]))}onPageUp(d){L.EventHelper.stop(d),this.selectList.focusPreviousPage(),setTimeout(()=>{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected{this.selected=this.selectList.getFocus()[0],this.options[this.selected].isDisabled&&this.selected>0&&(this.selected--,this.selectList.setFocus([this.selected])),this.selectList.reveal(this.selected),this.select(this.selected)},1)}onHome(d){L.EventHelper.stop(d),!(this.options.length<2)&&(this.selected=0,this.options[this.selected].isDisabled&&this.selected>1&&this.selected++,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onEnd(d){L.EventHelper.stop(d),!(this.options.length<2)&&(this.selected=this.options.length-1,this.options[this.selected].isDisabled&&this.selected>1&&this.selected--,this.selectList.setFocus([this.selected]),this.selectList.reveal(this.selected),this.select(this.selected))}onCharacter(d){const l=v.KeyCodeUtils.toString(d.keyCode);let o=-1;for(let c=0;c{this.element&&this.handleActionChangeEvent(o)}))}handleActionChangeEvent(f){f.enabled!==void 0&&this.updateEnabled(),f.checked!==void 0&&this.updateChecked(),f.class!==void 0&&this.updateClass(),f.label!==void 0&&(this.updateLabel(),this.updateTooltip()),f.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new _.ActionRunner)),this._actionRunner}set actionRunner(f){this._actionRunner=f}isEnabled(){return this._action.enabled}setActionContext(f){this._context=f}render(f){const d=this.element=f;this._register(D.Gesture.addTarget(f));const l=this.options&&this.options.draggable;l&&(f.draggable=!0,L.isFirefox&&this._register((0,y.addDisposableListener)(f,y.EventType.DRAG_START,o=>{var c;return(c=o.dataTransfer)===null||c===void 0?void 0:c.setData(I.DataTransfers.TEXT,this._action.label)}))),this._register((0,y.addDisposableListener)(d,D.EventType.Tap,o=>this.onClick(o,!0))),this._register((0,y.addDisposableListener)(d,y.EventType.MOUSE_DOWN,o=>{l||y.EventHelper.stop(o,!0),this._action.enabled&&o.button===0&&d.classList.add("active")})),C.isMacintosh&&this._register((0,y.addDisposableListener)(d,y.EventType.CONTEXT_MENU,o=>{o.button===0&&o.ctrlKey===!0&&this.onClick(o)})),this._register((0,y.addDisposableListener)(d,y.EventType.CLICK,o=>{y.EventHelper.stop(o,!0),this.options&&this.options.isMenu||this.onClick(o)})),this._register((0,y.addDisposableListener)(d,y.EventType.DBLCLICK,o=>{y.EventHelper.stop(o,!0)})),[y.EventType.MOUSE_UP,y.EventType.MOUSE_OUT].forEach(o=>{this._register((0,y.addDisposableListener)(d,o,c=>{y.EventHelper.stop(c),d.classList.remove("active")}))})}onClick(f,d=!1){var l;y.EventHelper.stop(f,!0);const o=s.isUndefinedOrNull(this._context)?!((l=this.options)===null||l===void 0)&&l.useEventAsContext?f:{preserveFocus:d}:this._context;this.actionRunner.run(this._action,o)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(f){this.element&&(this.element.tabIndex=f?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}getTooltip(){return this.action.tooltip}updateTooltip(){var f;if(!this.element)return;const d=(f=this.getTooltip())!==null&&f!==void 0?f:"";this.updateAriaLabel(),this.options.hoverDelegate?(this.element.title="",this.customHover?this.customHover.update(d):(this.customHover=(0,S.setupCustomHover)(this.options.hoverDelegate,this.element,d),this._store.add(this.customHover))):this.element.title=d}updateAriaLabel(){var f;if(this.element){const d=(f=this.getTooltip())!==null&&f!==void 0?f:"";this.element.setAttribute("aria-label",d)}}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),this._context=void 0,super.dispose()}}e.BaseActionViewItem=n;class t extends n{constructor(f,d,l){super(f,d,l),this.options=l,this.options.icon=l.icon!==void 0?l.icon:!1,this.options.label=l.label!==void 0?l.label:!0,this.cssClass=""}render(f){super.render(f),this.element&&(this.label=(0,y.append)(this.element,(0,y.$)("a.action-label"))),this.label&&this.label.setAttribute("role",this.getDefaultAriaRole()),this.options.label&&this.options.keybinding&&this.element&&((0,y.append)(this.element,(0,y.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}getDefaultAriaRole(){return this._action.id===_.Separator.ID?"presentation":this.options.isMenu?"menuitem":"button"}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(f){this.label&&(this.label.tabIndex=f?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.action.label)}getTooltip(){let f=null;return this.action.tooltip?f=this.action.tooltip:!this.options.label&&this.action.label&&this.options.icon&&(f=this.action.label,this.options.keybinding&&(f=i.localize(0,null,f,this.options.keybinding))),f??void 0}updateClass(){var f;this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.action.class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):(f=this.label)===null||f===void 0||f.classList.remove("codicon")}updateEnabled(){var f,d;this.action.enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),(f=this.element)===null||f===void 0||f.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),(d=this.element)===null||d===void 0||d.classList.add("disabled"))}updateAriaLabel(){var f;if(this.label){const d=(f=this.getTooltip())!==null&&f!==void 0?f:"";this.label.setAttribute("aria-label",d)}}updateChecked(){this.label&&(this.action.checked!==void 0?(this.label.classList.toggle("checked",this.action.checked),this.label.setAttribute("aria-checked",this.action.checked?"true":"false"),this.label.setAttribute("role","checkbox")):(this.label.classList.remove("checked"),this.label.setAttribute("aria-checked",""),this.label.setAttribute("role",this.getDefaultAriaRole())))}}e.ActionViewItem=t;class r extends n{constructor(f,d,l,o,c,a,g){super(f,d),this.selectBox=new m.SelectBox(l,o,c,a,g),this.selectBox.setFocusable(!1),this._register(this.selectBox),this.registerListeners()}select(f){this.selectBox.select(f)}registerListeners(){this._register(this.selectBox.onDidSelect(f=>this.runAction(f.selected,f.index)))}runAction(f,d){this.actionRunner.run(this._action,this.getActionContext(f,d))}getActionContext(f,d){return f}setFocusable(f){this.selectBox.setFocusable(f)}focus(){var f;(f=this.selectBox)===null||f===void 0||f.focus()}blur(){var f;(f=this.selectBox)===null||f===void 0||f.blur()}render(f){this.selectBox.render(f)}}e.SelectActionViewItem=r}),define(te[73],ie([1,0,7,44,129,41,6,2,20,264]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionBar=void 0;class v extends m.Disposable{constructor(s,i={}){var n,t,r,u,f,d;super(),this._actionRunnerDisposables=this._register(new m.DisposableStore),this.viewItemDisposables=this._register(new m.DisposableMap),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new S.Emitter),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new S.Emitter({onWillAddFirstListener:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new S.Emitter),this.onDidRun=this._onDidRun.event,this._onWillRun=this._register(new S.Emitter),this.onWillRun=this._onWillRun.event,this.options=i,this._context=(n=i.context)!==null&&n!==void 0?n:null,this._orientation=(t=this.options.orientation)!==null&&t!==void 0?t:0,this._triggerKeys={keyDown:(u=(r=this.options.triggerKeys)===null||r===void 0?void 0:r.keyDown)!==null&&u!==void 0?u:!1,keys:(d=(f=this.options.triggerKeys)===null||f===void 0?void 0:f.keys)!==null&&d!==void 0?d:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new D.ActionRunner,this._actionRunnerDisposables.add(this._actionRunner)),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(c=>this._onDidRun.fire(c))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(c=>this._onWillRun.fire(c))),this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",i.animated!==!1&&this.domNode.classList.add("animated");let l,o;switch(this._orientation){case 0:l=[15],o=[17];break;case 1:l=[16],o=[18],this.domNode.className+=" vertical";break}this._register(L.addDisposableListener(this.domNode,L.EventType.KEY_DOWN,c=>{const a=new I.StandardKeyboardEvent(c);let g=!0;const h=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;l&&(a.equals(l[0])||a.equals(l[1]))?g=this.focusPrevious():o&&(a.equals(o[0])||a.equals(o[1]))?g=this.focusNext():a.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():a.equals(14)?g=this.focusFirst():a.equals(13)?g=this.focusLast():a.equals(2)&&h instanceof y.BaseActionViewItem&&h.trapsArrowNavigation?g=this.focusNext():this.isTriggerKeyEvent(a)?this._triggerKeys.keyDown?this.doTrigger(a):this.triggerKeyDown=!0:g=!1,g&&(a.preventDefault(),a.stopPropagation())})),this._register(L.addDisposableListener(this.domNode,L.EventType.KEY_UP,c=>{const a=new I.StandardKeyboardEvent(c);this.isTriggerKeyEvent(a)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(a)),a.preventDefault(),a.stopPropagation()):(a.equals(2)||a.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(L.trackFocus(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(L.getActiveElement()===this.domNode||!L.isAncestor(L.getActiveElement(),this.domNode))&&(this._onDidBlur.fire(),this.previouslyFocusedItem=this.focusedItem,this.focusedItem=void 0,this.triggerKeyDown=!1)})),this._register(this.focusTracker.onDidFocus(()=>this.updateFocusedItem())),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.options.highlightToggledItems&&this.actionsList.classList.add("highlight-toggled"),this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),s.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role",this.options.ariaRole||"toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(s){if(this.focusable=s,this.focusable){const i=this.viewItems.find(n=>n instanceof y.BaseActionViewItem&&n.isEnabled());i instanceof y.BaseActionViewItem&&i.setFocusable(!0)}else this.viewItems.forEach(i=>{i instanceof y.BaseActionViewItem&&i.setFocusable(!1)})}isTriggerKeyEvent(s){let i=!1;return this._triggerKeys.keys.forEach(n=>{i=i||s.equals(n)}),i}updateFocusedItem(){for(let s=0;si.setActionContext(s))}get actionRunner(){return this._actionRunner}set actionRunner(s){this._actionRunner=s,this._actionRunnerDisposables.clear(),this._actionRunnerDisposables.add(this._actionRunner.onDidRun(i=>this._onDidRun.fire(i))),this._actionRunnerDisposables.add(this._actionRunner.onWillRun(i=>this._onWillRun.fire(i))),this.viewItems.forEach(i=>i.actionRunner=s)}getContainer(){return this.domNode}getAction(s){var i;if(typeof s=="number")return(i=this.viewItems[s])===null||i===void 0?void 0:i.action;if(s instanceof HTMLElement){for(;s.parentElement!==this.actionsList;){if(!s.parentElement)return;s=s.parentElement}for(let n=0;n{const u=document.createElement("li");u.className="action-item",u.setAttribute("role","presentation");let f;const d=Object.assign({hoverDelegate:this.options.hoverDelegate},i);this.options.actionViewItemProvider&&(f=this.options.actionViewItemProvider(r,d)),f||(f=new y.ActionViewItem(this.context,r,d)),this.options.allowContextMenu||this.viewItemDisposables.set(f,L.addDisposableListener(u,L.EventType.CONTEXT_MENU,l=>{L.EventHelper.stop(l,!0)})),f.actionRunner=this._actionRunner,f.setActionContext(this.context),f.render(u),this.focusable&&f instanceof y.BaseActionViewItem&&this.viewItems.length===0&&f.setFocusable(!0),t===null||t<0||t>=this.actionsList.children.length?(this.actionsList.appendChild(u),this.viewItems.push(f)):(this.actionsList.insertBefore(u,this.actionsList.children[t]),this.viewItems.splice(t,0,f),t++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem),this.refreshRole()}clear(){this.isEmpty()||(this.viewItems=(0,m.dispose)(this.viewItems),this.viewItemDisposables.clearAndDisposeAll(),L.clearNode(this.actionsList),this.refreshRole())}length(){return this.viewItems.length}isEmpty(){return this.viewItems.length===0}focus(s){let i=!1,n;if(s===void 0?i=!0:typeof s=="number"?n=s:typeof s=="boolean"&&(i=s),i&&typeof this.focusedItem>"u"){const t=this.viewItems.findIndex(r=>r.isEnabled());this.focusedItem=t===-1?void 0:t,this.updateFocus(void 0,void 0,!0)}else n!==void 0&&(this.focusedItem=n),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(s){if(typeof this.focusedItem>"u")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(!s&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=i,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===D.Separator.ID));return this.updateFocus(),!0}focusPrevious(s){if(typeof this.focusedItem>"u")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const i=this.focusedItem;let n;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!s&&this.options.preventLoopNavigation)return this.focusedItem=i,!1;this.focusedItem=this.viewItems.length-1}n=this.viewItems[this.focusedItem]}while(this.focusedItem!==i&&(this.options.focusOnlyEnabledItems&&!n.isEnabled()||n.action.id===D.Separator.ID));return this.updateFocus(!0),!0}updateFocus(s,i,n=!1){var t;typeof this.focusedItem>"u"&&this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem!==void 0&&this.previouslyFocusedItem!==this.focusedItem&&((t=this.viewItems[this.previouslyFocusedItem])===null||t===void 0||t.blur());const r=this.focusedItem!==void 0&&this.viewItems[this.focusedItem];if(r){let u=!0;_.isFunction(r.focus)||(u=!1),this.options.focusOnlyEnabledItems&&_.isFunction(r.isEnabled)&&!r.isEnabled()&&(u=!1),r.action.id===D.Separator.ID&&(u=!1),u?(n||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(s),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:i}),this.previouslyFocusedItem=void 0)}}doTrigger(s){if(typeof this.focusedItem>"u")return;const i=this.viewItems[this.focusedItem];if(i instanceof y.BaseActionViewItem){const n=i._context===null||i._context===void 0?s:i._context;this.run(i._action,n)}}run(s,i){return be(this,void 0,void 0,function*(){yield this._actionRunner.run(s,i)})}dispose(){this._context=void 0,this.viewItems=(0,m.dispose)(this.viewItems),this.getContainer().remove(),super.dispose()}}e.ActionBar=v}),define(te[320],ie([1,0,7,129,575,6,265]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropdownMenuActionViewItem=void 0;class S extends I.BaseActionViewItem{constructor(_,v,C,s=Object.create(null)){super(null,_,s),this.actionItem=null,this._onDidChangeVisibility=this._register(new D.Emitter),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this.menuActionsOrProvider=v,this.contextMenuProvider=C,this.options=s,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(_){this.actionItem=_;const v=i=>{this.element=(0,L.append)(i,(0,L.$)("a.action-label"));let n=[];return typeof this.options.classNames=="string"?n=this.options.classNames.split(/\s+/g).filter(t=>!!t):this.options.classNames&&(n=this.options.classNames),n.find(t=>t==="icon")||n.push("codicon"),this.element.classList.add(...n),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",this.element.ariaLabel=this._action.label||"",null},C=Array.isArray(this.menuActionsOrProvider),s={contextMenuProvider:this.contextMenuProvider,labelRenderer:v,menuAsChild:this.options.menuAsChild,actions:C?this.menuActionsOrProvider:void 0,actionProvider:C?void 0:this.menuActionsOrProvider,skipTelemetry:this.options.skipTelemetry};if(this.dropdownMenu=this._register(new y.DropdownMenu(_,s)),this._register(this.dropdownMenu.onDidChangeVisibility(i=>{var n;(n=this.element)===null||n===void 0||n.setAttribute("aria-expanded",`${i}`),this._onDidChangeVisibility.fire(i)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const i=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return i.options.anchorAlignmentProvider()}})}this.updateTooltip(),this.updateEnabled()}getTooltip(){let _=null;return this.action.tooltip?_=this.action.tooltip:this.action.label&&(_=this.action.label),_??void 0}setActionContext(_){super.setActionContext(_),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=_:this.dropdownMenu.menuOptions={context:_})}show(){var _;(_=this.dropdownMenu)===null||_===void 0||_.show()}updateEnabled(){var _,v;const C=!this.action.enabled;(_=this.actionItem)===null||_===void 0||_.classList.toggle("disabled",C),(v=this.element)===null||v===void 0||v.classList.toggle("disabled",C)}}e.DropdownMenuActionViewItem=S}),define(te[227],ie([1,0,7,79,310,73,45,84,83,6,392,52,560,406]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HistoryInputBox=e.InputBox=e.unthemedInboxStyles=void 0;const n=L.$;e.unthemedInboxStyles={inputBackground:"#3C3C3C",inputForeground:"#CCCCCC",inputValidationInfoBorder:"#55AAFF",inputValidationInfoBackground:"#063B49",inputValidationWarningBorder:"#B89500",inputValidationWarningBackground:"#352A05",inputValidationErrorBorder:"#BE1100",inputValidationErrorBackground:"#5A1D1D",inputBorder:void 0,inputValidationErrorForeground:void 0,inputValidationInfoForeground:void 0,inputValidationWarningForeground:void 0};class t extends _.Widget{constructor(f,d,l){var o;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new v.Emitter),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new v.Emitter),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=d,this.options=l,this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(o=this.options.tooltip)!==null&&o!==void 0?o:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=L.append(f,n(".monaco-inputbox.idle"));const c=this.options.flexibleHeight?"textarea":"input",a=L.append(this.element,n(".ibwrapper"));if(this.input=L.append(a,n(c+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,()=>this.element.classList.add("synthetic-focus")),this.onblur(this.input,()=>this.element.classList.remove("synthetic-focus")),this.options.flexibleHeight){this.maxHeight=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=L.append(a,n("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new m.ScrollableElement(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),L.append(f,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(p=>this.input.scrollTop=p.scrollTop));const g=this._register(new I.DomEmitter(document,"selectionchange")),h=v.Event.filter(g.event,()=>{const p=document.getSelection();return p?.anchorNode===a});this._register(h(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,()=>this.onValueChange()),this.onblur(this.input,()=>this.onBlur()),this.onfocus(this.input,()=>this.onFocus()),this._register(this.ignoreGesture(this.input)),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new D.ActionBar(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(f){this.placeholder=f,this.input.setAttribute("placeholder",f)}setTooltip(f){this.tooltip=f,this.input.title=f}get inputElement(){return this.input}get value(){return this.input.value}set value(f){this.input.value!==f&&(this.input.value=f,this.onValueChange())}get height(){return typeof this.cachedHeight=="number"?this.cachedHeight:L.getTotalHeight(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(f=null){this.input.select(),f&&(this.input.setSelectionRange(f.start,f.end),f.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}set paddingRight(f){this.input.style.width=`calc(100% - ${f}px)`,this.mirror&&(this.mirror.style.paddingRight=f+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!this.scrollableElement)return;const f=this.cachedContentHeight,d=this.cachedHeight,l=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:f,height:d}),this.scrollableElement.setScrollPosition({scrollTop:l})}showMessage(f,d){if(this.state==="open"&&(0,s.equals)(this.message,f))return;this.message=f,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(f.type));const l=this.stylesForType(this.message.type);this.element.style.border=`1px solid ${L.asCssValueWithDefault(l.border,"transparent")}`,this.message.content&&(this.hasFocus()||d)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let f=null;return this.validation&&(f=this.validation(this.value),f?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(f)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),f?.type}stylesForType(f){const d=this.options.inputBoxStyles;switch(f){case 1:return{border:d.inputValidationInfoBorder,background:d.inputValidationInfoBackground,foreground:d.inputValidationInfoForeground};case 2:return{border:d.inputValidationWarningBorder,background:d.inputValidationWarningBackground,foreground:d.inputValidationWarningForeground};default:return{border:d.inputValidationErrorBorder,background:d.inputValidationErrorBackground,foreground:d.inputValidationErrorForeground}}}classForType(f){switch(f){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let f;const d=()=>f.style.width=L.getTotalWidth(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:o=>{var c,a;if(!this.message)return null;f=L.append(o,n(".monaco-inputbox-container")),d();const g={inline:!0,className:"monaco-inputbox-message"},h=this.message.formatContent?(0,y.renderFormattedText)(this.message.content,g):(0,y.renderText)(this.message.content,g);h.classList.add(this.classForType(this.message.type));const p=this.stylesForType(this.message.type);return h.style.backgroundColor=(c=p.background)!==null&&c!==void 0?c:"",h.style.color=(a=p.foreground)!==null&&a!==void 0?a:"",h.style.border=p.border?`1px solid ${p.border}`:"",L.append(f,h),null},onHide:()=>{this.state="closed"},layout:d});let l;this.message.type===3?l=i.localize(0,null,this.message.content):this.message.type===2?l=i.localize(1,null,this.message.content):l=i.localize(2,null,this.message.content),S.alert(l),this.state="open"}_hideMessage(){this.contextViewProvider&&(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const f=this.value,l=f.charCodeAt(f.length-1)===10?" ":"";(f+l).replace(/\u000c/g,"")?this.mirror.textContent=f+l:this.mirror.innerText="\xA0",this.layout()}applyStyles(){var f,d,l;const o=this.options.inputBoxStyles,c=(f=o.inputBackground)!==null&&f!==void 0?f:"",a=(d=o.inputForeground)!==null&&d!==void 0?d:"",g=(l=o.inputBorder)!==null&&l!==void 0?l:"";this.element.style.backgroundColor=c,this.element.style.color=a,this.input.style.backgroundColor="inherit",this.input.style.color=a,this.element.style.border=`1px solid ${L.asCssValueWithDefault(g,"transparent")}`}layout(){if(!this.mirror)return;const f=this.cachedContentHeight;this.cachedContentHeight=L.getTotalHeight(this.mirror),f!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(f){const d=this.inputElement,l=d.selectionStart,o=d.selectionEnd,c=d.value;l!==null&&o!==null&&(this.value=c.substr(0,l)+f+c.substr(o),d.setSelectionRange(l+1,l+1),this.layout())}dispose(){var f;this._hideMessage(),this.message=null,(f=this.actionbar)===null||f===void 0||f.dispose(),super.dispose()}}e.InputBox=t;class r extends t{constructor(f,d,l){const o=i.localize(3,null),c=` or \u21C5 ${o}`,a=` (\u21C5 ${o})`;super(f,d,l),this._onDidFocus=this._register(new v.Emitter),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new v.Emitter),this.onDidBlur=this._onDidBlur.event,this.history=new C.HistoryNavigator(l.history,100);const g=()=>{if(l.showHistoryHint&&l.showHistoryHint()&&!this.placeholder.endsWith(c)&&!this.placeholder.endsWith(a)&&this.history.getHistory().length){const h=this.placeholder.endsWith(")")?c:a,p=this.placeholder+h;l.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=p:this.setPlaceHolder(p)}};this.observer=new MutationObserver((h,p)=>{h.forEach(b=>{b.target.textContent||g()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>g()),this.onblur(this.input,()=>{const h=p=>{if(this.placeholder.endsWith(p)){const b=this.placeholder.slice(0,this.placeholder.length-p.length);return l.showPlaceholderOnFocus?this.placeholder=b:this.setPlaceHolder(b),!0}else return!1};h(a)||h(c)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(f){this.value&&(f||this.value!==this.getCurrentValue())&&this.history.add(this.value)}isAtLastInHistory(){return this.history.isLast()}isNowhereInHistory(){return this.history.isNowhere()}showNextValue(){this.history.has(this.value)||this.addToHistory();let f=this.getNextValue();f&&(f=f===this.value?this.getNextValue():f),this.value=f??"",S.status(this.value?this.value:i.localize(4,null))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let f=this.getPreviousValue();f&&(f=f===this.value?this.getPreviousValue():f),f&&(this.value=f,S.status(this.value))}onBlur(){super.onBlur(),this._onDidBlur.fire()}onFocus(){super.onFocus(),this._onDidFocus.fire()}getCurrentValue(){let f=this.history.current();return f||(f=this.history.last(),this.history.next()),f}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()}}e.HistoryInputBox=r}),define(te[228],ie([1,0,7,317,227,83,6,555,2,266]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindInput=void 0;const v=m.localize(0,null);class C extends D.Widget{constructor(i,n,t){super(),this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this.additionalTogglesDisposables=this._register(new _.MutableDisposable),this.additionalToggles=[],this._onDidOptionChange=this._register(new S.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new S.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new S.Emitter),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new S.Emitter),this._onKeyUp=this._register(new S.Emitter),this._onCaseSensitiveKeyDown=this._register(new S.Emitter),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new S.Emitter),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.placeholder=t.placeholder||"",this.validation=t.validation,this.label=t.label||v,this.showCommonFindToggles=!!t.showCommonFindToggles;const r=t.appendCaseSensitiveLabel||"",u=t.appendWholeWordsLabel||"",f=t.appendRegexLabel||"",d=t.history||[],l=!!t.flexibleHeight,o=!!t.flexibleWidth,c=t.flexibleMaxHeight;if(this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,n,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},history:d,showHistoryHint:t.showHistoryHint,flexibleHeight:l,flexibleWidth:o,flexibleMaxHeight:c,inputBoxStyles:t.inputBoxStyles})),this.showCommonFindToggles){this.regex=this._register(new I.RegexToggle(Object.assign({appendTitle:f,isChecked:!1},t.toggleStyles))),this._register(this.regex.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(g=>{this._onRegexKeyDown.fire(g)})),this.wholeWords=this._register(new I.WholeWordsToggle(Object.assign({appendTitle:u,isChecked:!1},t.toggleStyles))),this._register(this.wholeWords.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new I.CaseSensitiveToggle(Object.assign({appendTitle:r,isChecked:!1},t.toggleStyles))),this._register(this.caseSensitive.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(g=>{this._onCaseSensitiveKeyDown.fire(g)}));const a=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){const h=a.indexOf(document.activeElement);if(h>=0){let p=-1;g.equals(17)?p=(h+1)%a.length:g.equals(15)&&(h===0?p=a.length-1:p=h-1),g.equals(9)?(a[h].blur(),this.inputBox.focus()):p>=0&&a[p].focus(),L.EventHelper.stop(g,!0)}}})}this.controls=document.createElement("div"),this.controls.className="controls",this.controls.style.display=this.showCommonFindToggles?"":"none",this.caseSensitive&&this.controls.append(this.caseSensitive.domNode),this.wholeWords&&this.controls.appendChild(this.wholeWords.domNode),this.regex&&this.controls.appendChild(this.regex.domNode),this.setAdditionalToggles(t?.additionalToggles),this.controls&&this.domNode.appendChild(this.controls),i?.appendChild(this.domNode),this._register(L.addDisposableListener(this.inputBox.inputElement,"compositionstart",a=>{this.imeSessionInProgress=!0})),this._register(L.addDisposableListener(this.inputBox.inputElement,"compositionend",a=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,a=>this._onKeyDown.fire(a)),this.onkeyup(this.inputBox.inputElement,a=>this._onKeyUp.fire(a)),this.oninput(this.inputBox.inputElement,a=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,a=>this._onMouseDown.fire(a))}get onDidChange(){return this.inputBox.onDidChange}layout(i){this.inputBox.layout(),this.updateInputBoxPadding(i.collapsedFindWidget)}enable(){var i,n,t;this.domNode.classList.remove("disabled"),this.inputBox.enable(),(i=this.regex)===null||i===void 0||i.enable(),(n=this.wholeWords)===null||n===void 0||n.enable(),(t=this.caseSensitive)===null||t===void 0||t.enable();for(const r of this.additionalToggles)r.enable()}disable(){var i,n,t;this.domNode.classList.add("disabled"),this.inputBox.disable(),(i=this.regex)===null||i===void 0||i.disable(),(n=this.wholeWords)===null||n===void 0||n.disable(),(t=this.caseSensitive)===null||t===void 0||t.disable();for(const r of this.additionalToggles)r.disable()}setFocusInputOnOptionClick(i){this.fixFocusOnOptionClickEnabled=i}setEnabled(i){i?this.enable():this.disable()}setAdditionalToggles(i){for(const n of this.additionalToggles)n.domNode.remove();this.additionalToggles=[],this.additionalTogglesDisposables.value=new _.DisposableStore;for(const n of i??[])this.additionalTogglesDisposables.value.add(n),this.controls.appendChild(n.domNode),this.additionalTogglesDisposables.value.add(n.onChange(t=>{this._onDidOptionChange.fire(t),!t&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus()})),this.additionalToggles.push(n);this.additionalToggles.length>0&&(this.controls.style.display=""),this.updateInputBoxPadding()}updateInputBoxPadding(i=!1){var n,t,r,u,f,d;i?this.inputBox.paddingRight=0:this.inputBox.paddingRight=((t=(n=this.caseSensitive)===null||n===void 0?void 0:n.width())!==null&&t!==void 0?t:0)+((u=(r=this.wholeWords)===null||r===void 0?void 0:r.width())!==null&&u!==void 0?u:0)+((d=(f=this.regex)===null||f===void 0?void 0:f.width())!==null&&d!==void 0?d:0)+this.additionalToggles.reduce((l,o)=>l+o.width(),0)}getValue(){return this.inputBox.value}setValue(i){this.inputBox.value!==i&&(this.inputBox.value=i)}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){var i,n;return(n=(i=this.caseSensitive)===null||i===void 0?void 0:i.checked)!==null&&n!==void 0?n:!1}setCaseSensitive(i){this.caseSensitive&&(this.caseSensitive.checked=i)}getWholeWords(){var i,n;return(n=(i=this.wholeWords)===null||i===void 0?void 0:i.checked)!==null&&n!==void 0?n:!1}setWholeWords(i){this.wholeWords&&(this.wholeWords.checked=i)}getRegex(){var i,n;return(n=(i=this.regex)===null||i===void 0?void 0:i.checked)!==null&&n!==void 0?n:!1}setRegex(i){this.regex&&(this.regex.checked=i,this.validate())}focusOnCaseSensitive(){var i;(i=this.caseSensitive)===null||i===void 0||i.focus()}highlightFindOptions(){this.domNode.classList.remove("highlight-"+this._lastHighlightFindOptions),this._lastHighlightFindOptions=1-this._lastHighlightFindOptions,this.domNode.classList.add("highlight-"+this._lastHighlightFindOptions)}validate(){this.inputBox.validate()}showMessage(i){this.inputBox.showMessage(i)}clearMessage(){this.inputBox.hideMessage()}}e.FindInput=C}),define(te[585],ie([1,0,7,153,227,83,26,6,557,266]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReplaceInput=void 0;const v=_.localize(0,null),C=_.localize(1,null);class s extends I.Toggle{constructor(t){super({icon:S.Codicon.preserveCase,title:C+t.appendTitle,isChecked:t.isChecked,inputActiveOptionBorder:t.inputActiveOptionBorder,inputActiveOptionForeground:t.inputActiveOptionForeground,inputActiveOptionBackground:t.inputActiveOptionBackground})}}class i extends D.Widget{constructor(t,r,u,f){super(),this._showOptionButtons=u,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new m.Emitter),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new m.Emitter),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new m.Emitter),this._onInput=this._register(new m.Emitter),this._onKeyUp=this._register(new m.Emitter),this._onPreserveCaseKeyDown=this._register(new m.Emitter),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=r,this.placeholder=f.placeholder||"",this.validation=f.validation,this.label=f.label||v;const d=f.appendPreserveCaseLabel||"",l=f.history||[],o=!!f.flexibleHeight,c=!!f.flexibleWidth,a=f.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new y.HistoryInputBox(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},history:l,showHistoryHint:f.showHistoryHint,flexibleHeight:o,flexibleWidth:c,flexibleMaxHeight:a,inputBoxStyles:f.inputBoxStyles})),this.preserveCase=this._register(new s(Object.assign({appendTitle:d,isChecked:!1},f.toggleStyles))),this._register(this.preserveCase.onChange(p=>{this._onDidOptionChange.fire(p),!p&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(p=>{this._onPreserveCaseKeyDown.fire(p)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;const g=[this.preserveCase.domNode];this.onkeydown(this.domNode,p=>{if(p.equals(15)||p.equals(17)||p.equals(9)){const b=g.indexOf(document.activeElement);if(b>=0){let w=-1;p.equals(17)?w=(b+1)%g.length:p.equals(15)&&(b===0?w=g.length-1:w=b-1),p.equals(9)?(g[b].blur(),this.inputBox.focus()):w>=0&&g[w].focus(),L.EventHelper.stop(p,!0)}}});const h=document.createElement("div");h.className="controls",h.style.display=this._showOptionButtons?"block":"none",h.appendChild(this.preserveCase.domNode),this.domNode.appendChild(h),t?.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,p=>this._onKeyDown.fire(p)),this.onkeyup(this.inputBox.inputElement,p=>this._onKeyUp.fire(p)),this.oninput(this.inputBox.inputElement,p=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,p=>this._onMouseDown.fire(p))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.preserveCase.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.preserveCase.disable()}setEnabled(t){t?this.enable():this.disable()}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(t){this.preserveCase.checked=t}focusOnPreserve(){this.preserveCase.focus()}validate(){var t;(t=this.inputBox)===null||t===void 0||t.validate()}set width(t){this.inputBox.paddingRight=this.cachedOptionsWidth,this.domNode.style.width=t+"px"}dispose(){super.dispose()}}e.ReplaceInput=i}),define(te[586],ie([1,0,51,61,7,44,60,73,129,311,84,41,14,26,27,119,2,17,10]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatRule=e.cleanMnemonic=e.Menu=e.Direction=e.MENU_ESCAPED_MNEMONIC_REGEX=e.MENU_MNEMONIC_REGEX=void 0,e.MENU_MNEMONIC_REGEX=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,e.MENU_ESCAPED_MNEMONIC_REGEX=/(&)?(&)([^\s&])/g;var l;(function(w){w[w.Right=0]="Right",w[w.Left=1]="Left"})(l||(e.Direction=l={}));class o extends m.ActionBar{constructor(E,k,M,R){E.classList.add("monaco-menu-container"),E.setAttribute("role","presentation");const B=document.createElement("div");B.classList.add("monaco-menu"),B.setAttribute("role","presentation"),super(B,{orientation:1,actionViewItemProvider:A=>this.doGetActionViewItem(A,M,T),context:M.context,actionRunner:M.actionRunner,ariaLabel:M.ariaLabel,ariaRole:"menu",focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...f.isMacintosh||f.isLinux?[10]:[]],keyDown:!0}}),this.menuStyles=R,this.menuElement=B,this.actionsList.tabIndex=0,this.menuDisposables=this._register(new u.DisposableStore),this.initializeOrUpdateStyleSheet(E,R),this._register(I.Gesture.addTarget(B)),(0,y.addDisposableListener)(B,y.EventType.KEY_DOWN,A=>{new D.StandardKeyboardEvent(A).equals(2)&&A.preventDefault()}),M.enableMnemonics&&this.menuDisposables.add((0,y.addDisposableListener)(B,y.EventType.KEY_DOWN,A=>{const P=A.key.toLocaleLowerCase();if(this.mnemonics.has(P)){y.EventHelper.stop(A,!0);const O=this.mnemonics.get(P);if(O.length===1&&(O[0]instanceof a&&O[0].container&&this.focusItemByElement(O[0].container),O[0].onClick(A)),O.length>1){const x=O.shift();x&&x.container&&(this.focusItemByElement(x.container),O.push(x)),this.mnemonics.set(P,O)}}})),f.isLinux&&this._register((0,y.addDisposableListener)(B,y.EventType.KEY_DOWN,A=>{const P=new D.StandardKeyboardEvent(A);P.equals(14)||P.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),y.EventHelper.stop(A,!0)):(P.equals(13)||P.equals(12))&&(this.focusedItem=0,this.focusPrevious(),y.EventHelper.stop(A,!0))})),this._register((0,y.addDisposableListener)(this.domNode,y.EventType.MOUSE_OUT,A=>{const P=A.relatedTarget;(0,y.isAncestor)(P,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),A.stopPropagation())})),this._register((0,y.addDisposableListener)(this.actionsList,y.EventType.MOUSE_OVER,A=>{let P=A.target;if(!(!P||!(0,y.isAncestor)(P,this.actionsList)||P===this.actionsList)){for(;P.parentElement!==this.actionsList&&P.parentElement!==null;)P=P.parentElement;if(P.classList.contains("action-item")){const O=this.focusedItem;this.setFocusedItem(P),O!==this.focusedItem&&this.updateFocus()}}})),this._register(I.Gesture.addTarget(this.actionsList)),this._register((0,y.addDisposableListener)(this.actionsList,I.EventType.Tap,A=>{let P=A.initialTarget;if(!(!P||!(0,y.isAncestor)(P,this.actionsList)||P===this.actionsList)){for(;P.parentElement!==this.actionsList&&P.parentElement!==null;)P=P.parentElement;if(P.classList.contains("action-item")){const O=this.focusedItem;this.setFocusedItem(P),O!==this.focusedItem&&this.updateFocus()}}}));const T={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new C.DomScrollableElement(B,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const N=this.scrollableElement.getDomNode();N.style.position="",this.styleScrollElement(N,R),this._register((0,y.addDisposableListener)(B,I.EventType.Change,A=>{y.EventHelper.stop(A,!0);const P=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:P-A.translationY})})),this._register((0,y.addDisposableListener)(N,y.EventType.MOUSE_UP,A=>{A.preventDefault()})),B.style.maxHeight=`${Math.max(10,window.innerHeight-E.getBoundingClientRect().top-35)}px`,k=k.filter(A=>{var P;return!((P=M.submenuIds)===null||P===void 0)&&P.has(A.id)?(console.warn(`Found submenu cycle: ${A.id}`),!1):!0}),this.push(k,{icon:!0,label:!0,isMenu:!0}),E.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(A=>!(A instanceof g)).forEach((A,P,O)=>{A.updatePositionInSet(P+1,O.length)})}initializeOrUpdateStyleSheet(E,k){this.styleSheet||((0,y.isInShadowDOM)(E)?this.styleSheet=(0,y.createStyleSheet)(E):(o.globalStyleSheet||(o.globalStyleSheet=(0,y.createStyleSheet)()),this.styleSheet=o.globalStyleSheet)),this.styleSheet.textContent=b(k,(0,y.isInShadowDOM)(E))}styleScrollElement(E,k){var M,R;const B=(M=k.foregroundColor)!==null&&M!==void 0?M:"",T=(R=k.backgroundColor)!==null&&R!==void 0?R:"",N=k.borderColor?`1px solid ${k.borderColor}`:"",A="5px",P=k.shadowColor?`0 2px 8px ${k.shadowColor}`:"";E.style.outline=N,E.style.borderRadius=A,E.style.color=B,E.style.backgroundColor=T,E.style.boxShadow=P}getContainer(){return this.scrollableElement.getDomNode()}get onScroll(){return this.scrollableElement.onScroll}focusItemByElement(E){const k=this.focusedItem;this.setFocusedItem(E),k!==this.focusedItem&&this.updateFocus()}setFocusedItem(E){for(let k=0;k{this.element&&(this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_UP,B=>{if(y.EventHelper.stop(B,!0),L.isFirefox){if(new S.StandardMouseEvent(B).rightButton)return;this.onClick(B)}else setTimeout(()=>{this.onClick(B)},0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.CONTEXT_MENU,B=>{y.EventHelper.stop(B,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(E){super.render(E),this.element&&(this.container=E,this.item=(0,y.append)(this.element,(0,y.$)("a.action-menu-item")),this._action.id===s.Separator.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=(0,y.append)(this.item,(0,y.$)("span.menu-item-check"+t.ThemeIcon.asCSSSelector(n.Codicon.menuSelection))),this.check.setAttribute("role","none"),this.label=(0,y.append)(this.item,(0,y.$)("span.action-label")),this.options.label&&this.options.keybinding&&((0,y.append)(this.item,(0,y.$)("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked(),this.applyStyle())}blur(){super.blur(),this.applyStyle()}focus(){var E;super.focus(),(E=this.item)===null||E===void 0||E.focus(),this.applyStyle()}updatePositionInSet(E,k){this.item&&(this.item.setAttribute("aria-posinset",`${E}`),this.item.setAttribute("aria-setsize",`${k}`))}updateLabel(){var E;if(this.label&&this.options.label){(0,y.clearNode)(this.label);let k=(0,r.stripIcons)(this.action.label);if(k){const M=h(k);this.options.enableMnemonics||(k=M),this.label.setAttribute("aria-label",M.replace(/&&/g,"&"));const R=e.MENU_MNEMONIC_REGEX.exec(k);if(R){k=d.escape(k),e.MENU_ESCAPED_MNEMONIC_REGEX.lastIndex=0;let B=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(k);for(;B&&B[1];)B=e.MENU_ESCAPED_MNEMONIC_REGEX.exec(k);const T=N=>N.replace(/&&/g,"&");B?this.label.append(d.ltrim(T(k.substr(0,B.index))," "),(0,y.$)("u",{"aria-hidden":"true"},B[3]),d.rtrim(T(k.substr(B.index+B[0].length))," ")):this.label.innerText=T(k).trim(),(E=this.item)===null||E===void 0||E.setAttribute("aria-keyshortcuts",(R[1]?R[1]:R[3]).toLocaleLowerCase())}else this.label.innerText=k.replace(/&&/g,"&").trim()}}}updateTooltip(){}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.action.class||"",this.label.classList.add("icon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" ")),this.updateEnabled()):this.label&&this.label.classList.remove("icon")}updateEnabled(){this.action.enabled?(this.element&&(this.element.classList.remove("disabled"),this.element.removeAttribute("aria-disabled")),this.item&&(this.item.classList.remove("disabled"),this.item.removeAttribute("aria-disabled"),this.item.tabIndex=0)):(this.element&&(this.element.classList.add("disabled"),this.element.setAttribute("aria-disabled","true")),this.item&&(this.item.classList.add("disabled"),this.item.setAttribute("aria-disabled","true")))}updateChecked(){if(!this.item)return;const E=this.action.checked;this.item.classList.toggle("checked",!!E),E!==void 0?(this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked",E?"true":"false")):(this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked",""))}getMnemonic(){return this.mnemonic}applyStyle(){const E=this.element&&this.element.classList.contains("focused"),k=E&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor,M=E&&this.menuStyle.selectionBackgroundColor?this.menuStyle.selectionBackgroundColor:void 0,R=E&&this.menuStyle.selectionBorderColor?`1px solid ${this.menuStyle.selectionBorderColor}`:"",B=E&&this.menuStyle.selectionBorderColor?"-1px":"";this.item&&(this.item.style.color=k??"",this.item.style.backgroundColor=M??"",this.item.style.outline=R,this.item.style.outlineOffset=B),this.check&&(this.check.style.color=k??"")}}class a extends c{constructor(E,k,M,R,B){super(E,E,R,B),this.submenuActions=k,this.parentData=M,this.submenuOptions=R,this.mysubmenu=null,this.submenuDisposables=this._register(new u.DisposableStore),this.mouseOver=!1,this.expandDirection=R&&R.expandDirection!==void 0?R.expandDirection:l.Right,this.showScheduler=new i.RunOnceScheduler(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new i.RunOnceScheduler(()=>{this.element&&!(0,y.isAncestor)((0,y.getActiveElement)(),this.element)&&this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))},750)}render(E){super.render(E),this.element&&(this.item&&(this.item.classList.add("monaco-submenu-item"),this.item.tabIndex=0,this.item.setAttribute("aria-haspopup","true"),this.updateAriaExpanded("false"),this.submenuIndicator=(0,y.append)(this.item,(0,y.$)("span.submenu-indicator"+t.ThemeIcon.asCSSSelector(n.Codicon.menuSubmenu))),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_UP,k=>{const M=new D.StandardKeyboardEvent(k);(M.equals(17)||M.equals(3))&&(y.EventHelper.stop(k,!0),this.createSubmenu(!0))})),this._register((0,y.addDisposableListener)(this.element,y.EventType.KEY_DOWN,k=>{const M=new D.StandardKeyboardEvent(k);(0,y.getActiveElement)()===this.item&&(M.equals(17)||M.equals(3))&&y.EventHelper.stop(k,!0)})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_OVER,k=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register((0,y.addDisposableListener)(this.element,y.EventType.MOUSE_LEAVE,k=>{this.mouseOver=!1})),this._register((0,y.addDisposableListener)(this.element,y.EventType.FOCUS_OUT,k=>{this.element&&!(0,y.isAncestor)((0,y.getActiveElement)(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.submenu===this.mysubmenu&&(this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!0))})))}updateEnabled(){}onClick(E){y.EventHelper.stop(E,!0),this.cleanupExistingSubmenu(!1),this.createSubmenu(!0)}cleanupExistingSubmenu(E){if(this.parentData.submenu&&(E||this.parentData.submenu!==this.mysubmenu)){try{this.parentData.submenu.dispose()}catch{}this.parentData.submenu=void 0,this.updateAriaExpanded("false"),this.submenuContainer&&(this.submenuDisposables.clear(),this.submenuContainer=void 0)}}calculateSubmenuMenuLayout(E,k,M,R){const B={top:0,left:0};return B.left=(0,v.layout)(E.width,k.width,{position:R===l.Right?0:1,offset:M.left,size:M.width}),B.left>=M.left&&B.left{new D.StandardKeyboardEvent(P).equals(15)&&(y.EventHelper.stop(P,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add((0,y.addDisposableListener)(this.submenuContainer,y.EventType.KEY_DOWN,P=>{new D.StandardKeyboardEvent(P).equals(15)&&y.EventHelper.stop(P,!0)})),this.submenuDisposables.add(this.parentData.submenu.onDidCancel(()=>{this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0)})),this.parentData.submenu.focus(E),this.mysubmenu=this.parentData.submenu}}updateAriaExpanded(E){var k;this.item&&((k=this.item)===null||k===void 0||k.setAttribute("aria-expanded",E))}applyStyle(){super.applyStyle();const k=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=k??"")}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class g extends _.ActionViewItem{constructor(E,k,M,R){super(E,k,M),this.menuStyles=R}render(E){super.render(E),this.label&&(this.label.style.borderBottomColor=this.menuStyles.separatorColor?`${this.menuStyles.separatorColor}`:"")}}function h(w){const E=e.MENU_MNEMONIC_REGEX,k=E.exec(w);if(!k)return w;const M=!k[1];return w.replace(E,M?"$2$3":"").trim()}e.cleanMnemonic=h;function p(w){const E=(0,n.getCodiconFontCharacters)()[w.id];return`.codicon-${w.id}:before { content: '\\${E.toString(16)}'; }`}e.formatRule=p;function b(w,E){let k=` -.monaco-menu { - font-size: 13px; - border-radius: 5px; - min-width: 160px; -} - -${p(n.Codicon.menuSelection)} -${p(n.Codicon.menuSubmenu)} - -.monaco-menu .monaco-action-bar { - text-align: right; - overflow: hidden; - white-space: nowrap; -} - -.monaco-menu .monaco-action-bar .actions-container { - display: flex; - margin: 0 auto; - padding: 0; - width: 100%; - justify-content: flex-end; -} - -.monaco-menu .monaco-action-bar.vertical .actions-container { - display: inline-block; -} - -.monaco-menu .monaco-action-bar.reverse .actions-container { - flex-direction: row-reverse; -} - -.monaco-menu .monaco-action-bar .action-item { - cursor: pointer; - display: inline-block; - transition: transform 50ms ease; - position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ -} - -.monaco-menu .monaco-action-bar .action-item.disabled { - cursor: default; -} - -.monaco-menu .monaco-action-bar.animated .action-item.active { - transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */ -} - -.monaco-menu .monaco-action-bar .action-item .icon, -.monaco-menu .monaco-action-bar .action-item .codicon { - display: inline-block; -} - -.monaco-menu .monaco-action-bar .action-item .codicon { - display: flex; - align-items: center; -} - -.monaco-menu .monaco-action-bar .action-label { - font-size: 11px; - margin-right: 4px; -} - -.monaco-menu .monaco-action-bar .action-item.disabled .action-label, -.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { - color: var(--vscode-disabledForeground); -} - -/* Vertical actions */ - -.monaco-menu .monaco-action-bar.vertical { - text-align: left; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - display: block; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - display: block; - border-bottom: 1px solid var(--vscode-menu-separatorBackground); - padding-top: 1px; - padding: 30px; -} - -.monaco-menu .secondary-actions .monaco-action-bar .action-label { - margin-left: 6px; -} - -/* Action Items */ -.monaco-menu .monaco-action-bar .action-item.select-container { - overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ - flex: 1; - max-width: 170px; - min-width: 60px; - display: flex; - align-items: center; - justify-content: center; - margin-right: 10px; -} - -.monaco-menu .monaco-action-bar.vertical { - margin-left: 0; - overflow: visible; -} - -.monaco-menu .monaco-action-bar.vertical .actions-container { - display: block; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - padding: 0; - transform: none; - display: flex; -} - -.monaco-menu .monaco-action-bar.vertical .action-item.active { - transform: none; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item { - flex: 1 1 auto; - display: flex; - height: 2em; - align-items: center; - position: relative; - margin: 0 4px; - border-radius: 4px; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .keybinding, -.monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .keybinding { - opacity: unset; -} - -.monaco-menu .monaco-action-bar.vertical .action-label { - flex: 1 1 auto; - text-decoration: none; - padding: 0 1em; - background: none; - font-size: 12px; - line-height: 1; -} - -.monaco-menu .monaco-action-bar.vertical .keybinding, -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - display: inline-block; - flex: 2 1 auto; - padding: 0 1em; - text-align: right; - font-size: 12px; - line-height: 1; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - height: 100%; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { - font-size: 16px !important; - display: flex; - align-items: center; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { - margin-left: auto; - margin-right: -20px; -} - -.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, -.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { - opacity: 0.4; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { - display: inline-block; - box-sizing: border-box; - margin: 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - position: static; - overflow: visible; -} - -.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { - position: absolute; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - width: 100%; - height: 0px !important; - opacity: 1; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { - padding: 0.7em 1em 0.1em 1em; - font-weight: bold; - opacity: 1; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:hover { - color: inherit; -} - -.monaco-menu .monaco-action-bar.vertical .menu-item-check { - position: absolute; - visibility: hidden; - width: 1em; - height: 100%; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { - visibility: visible; - display: flex; - align-items: center; - justify-content: center; -} - -/* Context Menu */ - -.context-view.monaco-menu-container { - outline: 0; - border: none; - animation: fadeIn 0.083s linear; - -webkit-app-region: no-drag; -} - -.context-view.monaco-menu-container :focus, -.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, -.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { - outline: 0; -} - -.hc-black .context-view.monaco-menu-container, -.hc-light .context-view.monaco-menu-container, -:host-context(.hc-black) .context-view.monaco-menu-container, -:host-context(.hc-light) .context-view.monaco-menu-container { - box-shadow: none; -} - -.hc-black .monaco-menu .monaco-action-bar.vertical .action-item.focused, -.hc-light .monaco-menu .monaco-action-bar.vertical .action-item.focused, -:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused, -:host-context(.hc-light) .monaco-menu .monaco-action-bar.vertical .action-item.focused { - background: none; -} - -/* Vertical Action Bar Styles */ - -.monaco-menu .monaco-action-bar.vertical { - padding: 4px 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item { - height: 2em; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), -.monaco-menu .monaco-action-bar.vertical .keybinding { - font-size: inherit; - padding: 0 2em; -} - -.monaco-menu .monaco-action-bar.vertical .menu-item-check { - font-size: inherit; - width: 2em; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - font-size: inherit; - margin: 5px 0 !important; - padding: 0; - border-radius: 0; -} - -.linux .monaco-menu .monaco-action-bar.vertical .action-label.separator, -:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { - margin-left: 0; - margin-right: 0; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - font-size: 60%; - padding: 0 1.8em; -} - -.linux .monaco-menu .monaco-action-bar.vertical .submenu-indicator, -:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { - height: 100%; - mask-size: 10px 10px; - -webkit-mask-size: 10px 10px; -} - -.monaco-menu .action-item { - cursor: default; -}`;if(E){k+=` - /* Arrows */ - .monaco-scrollable-element > .scrollbar > .scra { - cursor: pointer; - font-size: 11px !important; - } - - .monaco-scrollable-element > .visible { - opacity: 1; - - /* Background rule added for IE9 - to allow clicks on dom node */ - background:rgba(0,0,0,0); - - transition: opacity 100ms linear; - } - .monaco-scrollable-element > .invisible { - opacity: 0; - pointer-events: none; - } - .monaco-scrollable-element > .invisible.fade { - transition: opacity 800ms linear; - } - - /* Scrollable Content Inset Shadow */ - .monaco-scrollable-element > .shadow { - position: absolute; - display: none; - } - .monaco-scrollable-element > .shadow.top { - display: block; - top: 0; - left: 3px; - height: 3px; - width: 100%; - } - .monaco-scrollable-element > .shadow.left { - display: block; - top: 3px; - left: 0; - height: 100%; - width: 3px; - } - .monaco-scrollable-element > .shadow.top-left-corner { - display: block; - top: 0; - left: 0; - height: 3px; - width: 3px; - } - `;const M=w.scrollbarShadow;M&&(k+=` - .monaco-scrollable-element > .shadow.top { - box-shadow: ${M} 0 6px 6px -6px inset; - } - - .monaco-scrollable-element > .shadow.left { - box-shadow: ${M} 6px 0 6px -6px inset; - } - - .monaco-scrollable-element > .shadow.top.left { - box-shadow: ${M} 6px 6px 6px -6px inset; - } - `);const R=w.scrollbarSliderBackground;R&&(k+=` - .monaco-scrollable-element > .scrollbar > .slider { - background: ${R}; - } - `);const B=w.scrollbarSliderHoverBackground;B&&(k+=` - .monaco-scrollable-element > .scrollbar > .slider:hover { - background: ${B}; - } - `);const T=w.scrollbarSliderActiveBackground;T&&(k+=` - .monaco-scrollable-element > .scrollbar > .slider.active { - background: ${T}; - } - `)}return k}}),define(te[587],ie([1,0,73,320,41,26,27,6,2,563,417]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleMenuAction=e.ToolBar=void 0;class C extends _.Disposable{constructor(n,t,r={orientation:0}){super(),this.submenuActionViewItems=[],this.hasSecondaryActions=!1,this._onDidChangeDropdownVisibility=this._register(new m.EventMultiplexer),this.onDidChangeDropdownVisibility=this._onDidChangeDropdownVisibility.event,this.disposables=this._register(new _.DisposableStore),this.options=r,this.lookupKeybindings=typeof this.options.getKeyBinding=="function",this.toggleMenuAction=this._register(new s(()=>{var u;return(u=this.toggleMenuActionViewItem)===null||u===void 0?void 0:u.show()},r.toggleMenuTitle)),this.element=document.createElement("div"),this.element.className="monaco-toolbar",n.appendChild(this.element),this.actionBar=this._register(new L.ActionBar(this.element,{orientation:r.orientation,ariaLabel:r.ariaLabel,actionRunner:r.actionRunner,allowContextMenu:r.allowContextMenu,highlightToggledItems:r.highlightToggledItems,actionViewItemProvider:(u,f)=>{var d;if(u.id===s.ID)return this.toggleMenuActionViewItem=new I.DropdownMenuActionViewItem(u,u.menuActions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:S.ThemeIcon.asClassNameArray((d=r.moreIcon)!==null&&d!==void 0?d:D.Codicon.toolBarMore),anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry}),this.toggleMenuActionViewItem.setActionContext(this.actionBar.context),this.disposables.add(this._onDidChangeDropdownVisibility.add(this.toggleMenuActionViewItem.onDidChangeVisibility)),this.toggleMenuActionViewItem;if(r.actionViewItemProvider){const l=r.actionViewItemProvider(u,f);if(l)return l}if(u instanceof y.SubmenuAction){const l=new I.DropdownMenuActionViewItem(u,u.actions,t,{actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,keybindingProvider:this.options.getKeyBinding,classNames:u.class,anchorAlignmentProvider:this.options.anchorAlignmentProvider,menuAsChild:!!this.options.renderDropdownAsChildElement,skipTelemetry:this.options.skipTelemetry});return l.setActionContext(this.actionBar.context),this.submenuActionViewItems.push(l),this.disposables.add(this._onDidChangeDropdownVisibility.add(l.onDidChangeVisibility)),l}}}))}set actionRunner(n){this.actionBar.actionRunner=n}get actionRunner(){return this.actionBar.actionRunner}getElement(){return this.element}getItemAction(n){return this.actionBar.getAction(n)}setActions(n,t){this.clear();const r=n?n.slice(0):[];this.hasSecondaryActions=!!(t&&t.length>0),this.hasSecondaryActions&&t&&(this.toggleMenuAction.menuActions=t.slice(0),r.push(this.toggleMenuAction)),r.forEach(u=>{this.actionBar.push(u,{icon:!0,label:!1,keybinding:this.getKeybindingLabel(u)})})}getKeybindingLabel(n){var t,r,u;const f=this.lookupKeybindings?(r=(t=this.options).getKeyBinding)===null||r===void 0?void 0:r.call(t,n):void 0;return(u=f?.getLabel())!==null&&u!==void 0?u:void 0}clear(){this.submenuActionViewItems=[],this.disposables.clear(),this.actionBar.clear()}dispose(){this.clear(),this.disposables.dispose(),super.dispose()}}e.ToolBar=C;class s extends y.Action{constructor(n,t){t=t||v.localize(0,null),super(s.ID,t,void 0,!0),this._menuActions=[],this.toggleDropdownMenu=n}run(){return be(this,void 0,void 0,function*(){this.toggleDropdownMenu()})}get menuActions(){return this._menuActions}set menuActions(n){this._menuActions=n}}e.ToggleMenuAction=s,s.ID="toolbar.toggle.more"}),define(te[182],ie([1,0,7,79,44,73,228,227,225,113,153,218,137,41,13,14,26,27,56,6,69,2,139,20,564,418]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractTree=e.TreeFindMatchType=e.TreeFindMode=e.FuzzyToggle=e.ModeToggle=e.RenderIndentGuides=e.ComposedTreeDelegate=void 0;class p extends _.ElementsDragAndDropData{constructor(H){super(H.elements.map(V=>V.element)),this.data=H}}function b(q){return q instanceof _.ElementsDragAndDropData?new p(q):q}class w{constructor(H,V){this.modelProvider=H,this.dnd=V,this.autoExpandDisposable=c.Disposable.None,this.disposables=new c.DisposableStore}getDragURI(H){return this.dnd.getDragURI(H.element)}getDragLabel(H,V){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(H.map(Z=>Z.element),V)}onDragStart(H,V){var Z,ee;(ee=(Z=this.dnd).onDragStart)===null||ee===void 0||ee.call(Z,b(H),V)}onDragOver(H,V,Z,ee,le=!0){const ue=this.dnd.onDragOver(b(H),V&&V.element,Z,ee),de=this.autoExpandNode!==V;if(de&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=V),typeof V>"u")return ue;if(de&&typeof ue!="boolean"&&ue.autoExpand&&(this.autoExpandDisposable=(0,r.disposableTimeout)(()=>{const z=this.modelProvider(),Q=z.getNodeLocation(V);z.isCollapsed(Q)&&z.setCollapsed(Q,!1),this.autoExpandNode=void 0},500,this.disposables)),typeof ue=="boolean"||!ue.accept||typeof ue.bubble>"u"||ue.feedback){if(!le){const z=typeof ue=="boolean"?ue:ue.accept,Q=typeof ue=="boolean"?void 0:ue.effect;return{accept:z,effect:Q,feedback:[Z]}}return ue}if(ue.bubble===1){const z=this.modelProvider(),Q=z.getNodeLocation(V),j=z.getParentNodeLocation(Q),re=z.getNode(j),oe=j&&z.getListIndex(j);return this.onDragOver(H,re,oe,ee,!1)}const ce=this.modelProvider(),ae=ce.getNodeLocation(V),X=ce.getListIndex(ae),K=ce.getListRenderCount(ae);return Object.assign(Object.assign({},ue),{feedback:(0,t.range)(X,X+K)})}drop(H,V,Z,ee){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(b(H),V&&V.element,Z,ee)}onDragEnd(H){var V,Z;(Z=(V=this.dnd).onDragEnd)===null||Z===void 0||Z.call(V,H)}dispose(){this.disposables.dispose(),this.dnd.dispose()}}function E(q,H){return H&&Object.assign(Object.assign({},H),{identityProvider:H.identityProvider&&{getId(V){return H.identityProvider.getId(V.element)}},dnd:H.dnd&&new w(q,H.dnd),multipleSelectionController:H.multipleSelectionController&&{isSelectionSingleChangeEvent(V){return H.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},V),{element:V.element}))},isSelectionRangeChangeEvent(V){return H.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},V),{element:V.element}))}},accessibilityProvider:H.accessibilityProvider&&Object.assign(Object.assign({},H.accessibilityProvider),{getSetSize(V){const Z=q(),ee=Z.getNodeLocation(V),le=Z.getParentNodeLocation(ee);return Z.getNode(le).visibleChildrenCount},getPosInSet(V){return V.visibleChildIndex+1},isChecked:H.accessibilityProvider&&H.accessibilityProvider.isChecked?V=>H.accessibilityProvider.isChecked(V.element):void 0,getRole:H.accessibilityProvider&&H.accessibilityProvider.getRole?V=>H.accessibilityProvider.getRole(V.element):()=>"treeitem",getAriaLabel(V){return H.accessibilityProvider.getAriaLabel(V.element)},getWidgetAriaLabel(){return H.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:H.accessibilityProvider&&H.accessibilityProvider.getWidgetRole?()=>H.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:H.accessibilityProvider&&H.accessibilityProvider.getAriaLevel?V=>H.accessibilityProvider.getAriaLevel(V.element):V=>V.depth,getActiveDescendantId:H.accessibilityProvider.getActiveDescendantId&&(V=>H.accessibilityProvider.getActiveDescendantId(V.element))}),keyboardNavigationLabelProvider:H.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},H.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(V){return H.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(V.element)}})})}class k{constructor(H){this.delegate=H}getHeight(H){return this.delegate.getHeight(H.element)}getTemplateId(H){return this.delegate.getTemplateId(H.element)}hasDynamicHeight(H){return!!this.delegate.hasDynamicHeight&&this.delegate.hasDynamicHeight(H.element)}setDynamicHeight(H,V){var Z,ee;(ee=(Z=this.delegate).setDynamicHeight)===null||ee===void 0||ee.call(Z,H.element,V)}}e.ComposedTreeDelegate=k;var M;(function(q){q.None="none",q.OnHover="onHover",q.Always="always"})(M||(e.RenderIndentGuides=M={}));class R{get elements(){return this._elements}constructor(H,V=[]){this._elements=V,this.disposables=new c.DisposableStore,this.onDidChange=l.Event.forEach(H,Z=>this._elements=Z,this.disposables)}dispose(){this.disposables.dispose()}}class B{constructor(H,V,Z,ee,le,ue={}){var de;this.renderer=H,this.modelProvider=V,this.activeNodes=ee,this.renderedIndentGuides=le,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=B.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.activeIndentNodes=new Set,this.indentGuidesDisposable=c.Disposable.None,this.disposables=new c.DisposableStore,this.templateId=H.templateId,this.updateOptions(ue),l.Event.map(Z,ce=>ce.node)(this.onDidChangeNodeTwistieState,this,this.disposables),(de=H.onDidChangeTwistieState)===null||de===void 0||de.call(H,this.onDidChangeTwistieState,this,this.disposables)}updateOptions(H={}){if(typeof H.indent<"u"){const V=(0,a.clamp)(H.indent,0,40);if(V!==this.indent){this.indent=V;for(const[Z,ee]of this.renderedNodes)this.renderTreeElement(Z,ee)}}if(typeof H.renderIndentGuides<"u"){const V=H.renderIndentGuides!==M.None;if(V!==this.shouldRenderIndentGuides){this.shouldRenderIndentGuides=V;for(const[Z,ee]of this.renderedNodes)this._renderIndentGuides(Z,ee);if(this.indentGuidesDisposable.dispose(),V){const Z=new c.DisposableStore;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,Z),this.indentGuidesDisposable=Z,this._onDidChangeActiveNodes(this.activeNodes.elements)}}}typeof H.hideTwistiesOfChildlessElements<"u"&&(this.hideTwistiesOfChildlessElements=H.hideTwistiesOfChildlessElements)}renderTemplate(H){const V=(0,L.append)(H,(0,L.$)(".monaco-tl-row")),Z=(0,L.append)(V,(0,L.$)(".monaco-tl-indent")),ee=(0,L.append)(V,(0,L.$)(".monaco-tl-twistie")),le=(0,L.append)(V,(0,L.$)(".monaco-tl-contents")),ue=this.renderer.renderTemplate(le);return{container:H,indent:Z,twistie:ee,indentGuidesDisposable:c.Disposable.None,templateData:ue}}renderElement(H,V,Z,ee){this.renderedNodes.set(H,Z),this.renderedElements.set(H.element,H),this.renderTreeElement(H,Z),this.renderer.renderElement(H,V,Z.templateData,ee)}disposeElement(H,V,Z,ee){var le,ue;Z.indentGuidesDisposable.dispose(),(ue=(le=this.renderer).disposeElement)===null||ue===void 0||ue.call(le,H,V,Z.templateData,ee),typeof ee=="number"&&(this.renderedNodes.delete(H),this.renderedElements.delete(H.element))}disposeTemplate(H){this.renderer.disposeTemplate(H.templateData)}onDidChangeTwistieState(H){const V=this.renderedElements.get(H);V&&this.onDidChangeNodeTwistieState(V)}onDidChangeNodeTwistieState(H){const V=this.renderedNodes.get(H);V&&(this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderTreeElement(H,V))}renderTreeElement(H,V){const Z=B.DefaultIndent+(H.depth-1)*this.indent;V.twistie.style.paddingLeft=`${Z}px`,V.indent.style.width=`${Z+this.indent-16}px`,H.collapsible?V.container.setAttribute("aria-expanded",String(!H.collapsed)):V.container.removeAttribute("aria-expanded"),V.twistie.classList.remove(...f.ThemeIcon.asClassNameArray(u.Codicon.treeItemExpanded));let ee=!1;this.renderer.renderTwistie&&(ee=this.renderer.renderTwistie(H.element,V.twistie)),H.collapsible&&(!this.hideTwistiesOfChildlessElements||H.visibleChildrenCount>0)?(ee||V.twistie.classList.add(...f.ThemeIcon.asClassNameArray(u.Codicon.treeItemExpanded)),V.twistie.classList.add("collapsible"),V.twistie.classList.toggle("collapsed",H.collapsed)):V.twistie.classList.remove("collapsible","collapsed"),this._renderIndentGuides(H,V)}_renderIndentGuides(H,V){if((0,L.clearNode)(V.indent),V.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const Z=new c.DisposableStore,ee=this.modelProvider();for(;;){const le=ee.getNodeLocation(H),ue=ee.getParentNodeLocation(le);if(!ue)break;const de=ee.getNode(ue),ce=(0,L.$)(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(de)&&ce.classList.add("active"),V.indent.childElementCount===0?V.indent.appendChild(ce):V.indent.insertBefore(ce,V.indent.firstElementChild),this.renderedIndentGuides.add(de,ce),Z.add((0,c.toDisposable)(()=>this.renderedIndentGuides.delete(de,ce))),H=de}V.indentGuidesDisposable=Z}_onDidChangeActiveNodes(H){if(!this.shouldRenderIndentGuides)return;const V=new Set,Z=this.modelProvider();H.forEach(ee=>{const le=Z.getNodeLocation(ee);try{const ue=Z.getParentNodeLocation(le);ee.collapsible&&ee.children.length>0&&!ee.collapsed?V.add(ee):ue&&V.add(Z.getNode(ue))}catch{}}),this.activeIndentNodes.forEach(ee=>{V.has(ee)||this.renderedIndentGuides.forEach(ee,le=>le.classList.remove("active"))}),V.forEach(ee=>{this.activeIndentNodes.has(ee)||this.renderedIndentGuides.forEach(ee,le=>le.classList.add("active"))}),this.activeIndentNodes=V}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),(0,c.dispose)(this.disposables)}}B.DefaultIndent=8;class T{get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}constructor(H,V,Z){this.tree=H,this.keyboardNavigationLabelProvider=V,this._filter=Z,this._totalCount=0,this._matchCount=0,this._pattern="",this._lowercasePattern="",this.disposables=new c.DisposableStore,H.onWillRefilter(this.reset,this,this.disposables)}filter(H,V){let Z=1;if(this._filter){const ue=this._filter.filter(H,V);if(typeof ue=="boolean"?Z=ue?1:0:(0,s.isFilterResult)(ue)?Z=(0,s.getVisibleState)(ue.visibility):Z=ue,Z===0)return!1}if(this._totalCount++,!this._pattern)return this._matchCount++,{data:o.FuzzyScore.Default,visibility:Z};const ee=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(H),le=Array.isArray(ee)?ee:[ee];for(const ue of le){const de=ue&&ue.toString();if(typeof de>"u")return{data:o.FuzzyScore.Default,visibility:Z};let ce;if(this.tree.findMatchType===x.Contiguous){const ae=de.toLowerCase().indexOf(this._lowercasePattern);if(ae>-1){ce=[Number.MAX_SAFE_INTEGER,0];for(let X=this._lowercasePattern.length;X>0;X--)ce.push(ae+X-1)}}else ce=(0,o.fuzzyScore)(this._pattern,this._lowercasePattern,0,de,de.toLowerCase(),0,{firstMatchCanBeWeak:!0,boostFullMatch:!0});if(ce)return this._matchCount++,le.length===1?{data:ce,visibility:Z}:{data:{label:de,score:ce},visibility:Z}}return this.tree.findMode===O.Filter?typeof this.tree.options.defaultFindVisibility=="number"?this.tree.options.defaultFindVisibility:this.tree.options.defaultFindVisibility?this.tree.options.defaultFindVisibility(H):2:{data:o.FuzzyScore.Default,visibility:Z}}reset(){this._totalCount=0,this._matchCount=0}dispose(){(0,c.dispose)(this.disposables)}}class N extends C.Toggle{constructor(H){var V;super({icon:u.Codicon.listFilter,title:(0,h.localize)(0,null),isChecked:(V=H.isChecked)!==null&&V!==void 0?V:!1,inputActiveOptionBorder:H.inputActiveOptionBorder,inputActiveOptionForeground:H.inputActiveOptionForeground,inputActiveOptionBackground:H.inputActiveOptionBackground})}}e.ModeToggle=N;class A extends C.Toggle{constructor(H){var V;super({icon:u.Codicon.searchFuzzy,title:(0,h.localize)(1,null),isChecked:(V=H.isChecked)!==null&&V!==void 0?V:!1,inputActiveOptionBorder:H.inputActiveOptionBorder,inputActiveOptionForeground:H.inputActiveOptionForeground,inputActiveOptionBackground:H.inputActiveOptionBackground})}}e.FuzzyToggle=A;const P={inputBoxStyles:m.unthemedInboxStyles,toggleStyles:C.unthemedToggleStyles,listFilterWidgetBackground:void 0,listFilterWidgetNoMatchesOutline:void 0,listFilterWidgetOutline:void 0,listFilterWidgetShadow:void 0};var O;(function(q){q[q.Highlight=0]="Highlight",q[q.Filter=1]="Filter"})(O||(e.TreeFindMode=O={}));var x;(function(q){q[q.Fuzzy=0]="Fuzzy",q[q.Contiguous=1]="Contiguous"})(x||(e.TreeFindMatchType=x={}));class W extends c.Disposable{set mode(H){this.modeToggle.checked=H===O.Filter,this.findInput.inputBox.setPlaceHolder(H===O.Filter?(0,h.localize)(2,null):(0,h.localize)(3,null))}set matchType(H){this.matchTypeToggle.checked=H===x.Fuzzy}constructor(H,V,Z,ee,le,ue){var de;super(),this.tree=V,this.elements=(0,L.h)(".monaco-tree-type-filter",[(0,L.h)(".monaco-tree-type-filter-grab.codicon.codicon-debug-gripper@grab",{tabIndex:0}),(0,L.h)(".monaco-tree-type-filter-input@findInput"),(0,L.h)(".monaco-tree-type-filter-actionbar@actionbar")]),this.width=0,this.right=0,this.top=0,this._onDidDisable=new l.Emitter,H.appendChild(this.elements.root),this._register((0,c.toDisposable)(()=>H.removeChild(this.elements.root)));const ce=(de=ue?.styles)!==null&&de!==void 0?de:P;ce.listFilterWidgetBackground&&(this.elements.root.style.backgroundColor=ce.listFilterWidgetBackground),ce.listFilterWidgetShadow&&(this.elements.root.style.boxShadow=`0 0 8px 2px ${ce.listFilterWidgetShadow}`),this.modeToggle=this._register(new N(Object.assign(Object.assign({},ce.toggleStyles),{isChecked:ee===O.Filter}))),this.matchTypeToggle=this._register(new A(Object.assign(Object.assign({},ce.toggleStyles),{isChecked:le===x.Fuzzy}))),this.onDidChangeMode=l.Event.map(this.modeToggle.onChange,()=>this.modeToggle.checked?O.Filter:O.Highlight,this._store),this.onDidChangeMatchType=l.Event.map(this.matchTypeToggle.onChange,()=>this.matchTypeToggle.checked?x.Fuzzy:x.Contiguous,this._store),this.findInput=this._register(new S.FindInput(this.elements.findInput,Z,{label:(0,h.localize)(4,null),additionalToggles:[this.modeToggle,this.matchTypeToggle],showCommonFindToggles:!1,inputBoxStyles:ce.inputBoxStyles,toggleStyles:ce.toggleStyles,history:ue?.history})),this.actionbar=this._register(new D.ActionBar(this.elements.actionbar)),this.mode=ee;const ae=this._register(new I.DomEmitter(this.findInput.inputBox.inputElement,"keydown")),X=l.Event.chain(ae.event,j=>j.map(re=>new y.StandardKeyboardEvent(re)));this._register(X(j=>{if(j.equals(3)){j.preventDefault(),j.stopPropagation(),this.findInput.inputBox.addToHistory(),this.tree.domFocus();return}if(j.equals(18)){j.preventDefault(),j.stopPropagation(),this.findInput.inputBox.isAtLastInHistory()||this.findInput.inputBox.isNowhereInHistory()?(this.findInput.inputBox.addToHistory(),this.tree.domFocus()):this.findInput.inputBox.showNextValue();return}if(j.equals(16)){j.preventDefault(),j.stopPropagation(),this.findInput.inputBox.showPreviousValue();return}}));const K=this._register(new n.Action("close",(0,h.localize)(5,null),"codicon codicon-close",!0,()=>this.dispose()));this.actionbar.push(K,{icon:!0,label:!1});const z=this._register(new I.DomEmitter(this.elements.grab,"mousedown"));this._register(z.event(j=>{const re=new c.DisposableStore,oe=re.add(new I.DomEmitter(window,"mousemove")),he=re.add(new I.DomEmitter(window,"mouseup")),me=this.right,pe=j.pageX,ve=this.top,we=j.pageY;this.elements.grab.classList.add("grabbing");const Le=this.elements.root.style.transition;this.elements.root.style.transition="unset";const Ee=Ae=>{const Re=Ae.pageX-pe;this.right=me-Re;const Be=Ae.pageY-we;this.top=ve+Be,this.layout()};re.add(oe.event(Ee)),re.add(he.event(Ae=>{Ee(Ae),this.elements.grab.classList.remove("grabbing"),this.elements.root.style.transition=Le,re.dispose()}))}));const Q=l.Event.chain(this._register(new I.DomEmitter(this.elements.grab,"keydown")).event,j=>j.map(re=>new y.StandardKeyboardEvent(re)));this._register(Q(j=>{let re,oe;if(j.keyCode===15?re=Number.POSITIVE_INFINITY:j.keyCode===17?re=0:j.keyCode===10&&(re=this.right===0?Number.POSITIVE_INFINITY:0),j.keyCode===16?oe=0:j.keyCode===18&&(oe=Number.POSITIVE_INFINITY),re!==void 0&&(j.preventDefault(),j.stopPropagation(),this.right=re,this.layout()),oe!==void 0){j.preventDefault(),j.stopPropagation(),this.top=oe;const he=this.elements.root.style.transition;this.elements.root.style.transition="unset",this.layout(),setTimeout(()=>{this.elements.root.style.transition=he},0)}})),this.onDidChangeValue=this.findInput.onDidChange}layout(H=this.width){this.width=H,this.right=(0,a.clamp)(this.right,0,Math.max(0,H-212)),this.elements.root.style.right=`${this.right}px`,this.top=(0,a.clamp)(this.top,0,24),this.elements.root.style.top=`${this.top}px`}showMessage(H){this.findInput.showMessage(H)}clearMessage(){this.findInput.clearMessage()}dispose(){const H=Object.create(null,{dispose:{get:()=>super.dispose}});return be(this,void 0,void 0,function*(){this._onDidDisable.fire(),this.elements.root.classList.add("disabled"),yield(0,r.timeout)(300),H.dispose.call(this)})}}class U{get pattern(){return this._pattern}get mode(){return this._mode}set mode(H){H!==this._mode&&(this._mode=H,this.widget&&(this.widget.mode=this._mode),this.tree.refilter(),this.render(),this._onDidChangeMode.fire(H))}get matchType(){return this._matchType}set matchType(H){H!==this._matchType&&(this._matchType=H,this.widget&&(this.widget.matchType=this._matchType),this.tree.refilter(),this.render(),this._onDidChangeMatchType.fire(H))}constructor(H,V,Z,ee,le,ue={}){var de,ce;this.tree=H,this.view=Z,this.filter=ee,this.contextViewProvider=le,this.options=ue,this._pattern="",this.width=0,this._onDidChangeMode=new l.Emitter,this.onDidChangeMode=this._onDidChangeMode.event,this._onDidChangeMatchType=new l.Emitter,this.onDidChangeMatchType=this._onDidChangeMatchType.event,this._onDidChangePattern=new l.Emitter,this._onDidChangeOpenState=new l.Emitter,this.onDidChangeOpenState=this._onDidChangeOpenState.event,this.enabledDisposables=new c.DisposableStore,this.disposables=new c.DisposableStore,this._mode=(de=H.options.defaultFindMode)!==null&&de!==void 0?de:O.Highlight,this._matchType=(ce=H.options.defaultFindMatchType)!==null&&ce!==void 0?ce:x.Fuzzy,V.onDidSplice(this.onDidSpliceModel,this,this.disposables)}updateOptions(H={}){H.defaultFindMode!==void 0&&(this.mode=H.defaultFindMode),H.defaultFindMatchType!==void 0&&(this.matchType=H.defaultFindMatchType)}onDidSpliceModel(){!this.widget||this.pattern.length===0||(this.tree.refilter(),this.render())}render(){var H,V,Z,ee;const le=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&le?!((H=this.tree.options.showNotFoundMessage)!==null&&H!==void 0)||H?(V=this.widget)===null||V===void 0||V.showMessage({type:2,content:(0,h.localize)(6,null)}):(Z=this.widget)===null||Z===void 0||Z.showMessage({type:2}):(ee=this.widget)===null||ee===void 0||ee.clearMessage()}shouldAllowFocus(H){return!this.widget||!this.pattern||this._mode===O.Filter||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!o.FuzzyScore.isDefault(H.filterData)}layout(H){var V;this.width=H,(V=this.widget)===null||V===void 0||V.layout(H)}dispose(){this._history=void 0,this._onDidChangePattern.dispose(),this.enabledDisposables.dispose(),this.disposables.dispose()}}function F(q){let H=i.TreeMouseEventTarget.Unknown;return(0,L.hasParentWithClass)(q.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?H=i.TreeMouseEventTarget.Twistie:(0,L.hasParentWithClass)(q.browserEvent.target,"monaco-tl-contents","monaco-tl-row")?H=i.TreeMouseEventTarget.Element:(0,L.hasParentWithClass)(q.browserEvent.target,"monaco-tree-type-filter","monaco-list")&&(H=i.TreeMouseEventTarget.Filter),{browserEvent:q.browserEvent,element:q.element?q.element.element:null,target:H}}function G(q,H){H(q),q.children.forEach(V=>G(V,H))}class Y{get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}constructor(H,V){this.getFirstViewElementWithTrait=H,this.identityProvider=V,this.nodes=[],this._onDidChange=new l.Emitter,this.onDidChange=this._onDidChange.event}set(H,V){!V?.__forceEvent&&(0,t.equals)(this.nodes,H)||this._set(H,!1,V)}_set(H,V,Z){if(this.nodes=[...H],this.elements=void 0,this._nodeSet=void 0,!V){const ee=this;this._onDidChange.fire({get elements(){return ee.get()},browserEvent:Z})}}get(){return this.elements||(this.elements=this.nodes.map(H=>H.element)),[...this.elements]}getNodes(){return this.nodes}has(H){return this.nodeSet.has(H)}onDidModelSplice({insertedNodes:H,deletedNodes:V}){if(!this.identityProvider){const ce=this.createNodeSet(),ae=X=>ce.delete(X);V.forEach(X=>G(X,ae)),this.set([...ce.values()]);return}const Z=new Set,ee=ce=>Z.add(this.identityProvider.getId(ce.element).toString());V.forEach(ce=>G(ce,ee));const le=new Map,ue=ce=>le.set(this.identityProvider.getId(ce.element).toString(),ce);H.forEach(ce=>G(ce,ue));const de=[];for(const ce of this.nodes){const ae=this.identityProvider.getId(ce.element).toString();if(!Z.has(ae))de.push(ce);else{const K=le.get(ae);K&&K.visible&&de.push(K)}}if(this.nodes.length>0&&de.length===0){const ce=this.getFirstViewElementWithTrait();ce&&de.push(ce)}this._set(de,!0)}createNodeSet(){const H=new Set;for(const V of this.nodes)H.add(V);return H}}class ne extends v.MouseController{constructor(H,V){super(H),this.tree=V}onViewPointer(H){if((0,v.isButton)(H.browserEvent.target)||(0,v.isInputElement)(H.browserEvent.target)||(0,v.isMonacoEditor)(H.browserEvent.target)||H.browserEvent.isHandledByList)return;const V=H.element;if(!V)return super.onViewPointer(H);if(this.isSelectionRangeChangeEvent(H)||this.isSelectionSingleChangeEvent(H))return super.onViewPointer(H);const Z=H.browserEvent.target,ee=Z.classList.contains("monaco-tl-twistie")||Z.classList.contains("monaco-icon-label")&&Z.classList.contains("folder-icon")&&H.browserEvent.offsetX<16;let le=!1;if(typeof this.tree.expandOnlyOnTwistieClick=="function"?le=this.tree.expandOnlyOnTwistieClick(V.element):le=!!this.tree.expandOnlyOnTwistieClick,le&&!ee&&H.browserEvent.detail!==2)return super.onViewPointer(H);if(!this.tree.expandOnDoubleClick&&H.browserEvent.detail===2)return super.onViewPointer(H);if(V.collapsible){const ue=this.tree.getNodeLocation(V),de=H.browserEvent.altKey;if(this.tree.setFocus([ue]),this.tree.toggleCollapsed(ue,de),le&&ee){H.browserEvent.isHandledByList=!0;return}}super.onViewPointer(H)}onDoubleClick(H){H.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||H.browserEvent.isHandledByList||super.onDoubleClick(H)}}class se extends v.List{constructor(H,V,Z,ee,le,ue,de,ce){super(H,V,Z,ee,ce),this.focusTrait=le,this.selectionTrait=ue,this.anchorTrait=de}createMouseController(H){return new ne(this,H.tree)}splice(H,V,Z=[]){if(super.splice(H,V,Z),Z.length===0)return;const ee=[],le=[];let ue;Z.forEach((de,ce)=>{this.focusTrait.has(de)&&ee.push(H+ce),this.selectionTrait.has(de)&&le.push(H+ce),this.anchorTrait.has(de)&&(ue=H+ce)}),ee.length>0&&super.setFocus((0,t.distinct)([...super.getFocus(),...ee])),le.length>0&&super.setSelection((0,t.distinct)([...super.getSelection(),...le])),typeof ue=="number"&&super.setAnchor(ue)}setFocus(H,V,Z=!1){super.setFocus(H,V),Z||this.focusTrait.set(H.map(ee=>this.element(ee)),V)}setSelection(H,V,Z=!1){super.setSelection(H,V),Z||this.selectionTrait.set(H.map(ee=>this.element(ee)),V)}setAnchor(H,V=!1){super.setAnchor(H),V||(typeof H>"u"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(H)]))}}class J{get onDidScroll(){return this.view.onDidScroll}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return l.Event.filter(l.Event.map(this.view.onMouseDblClick,F),H=>H.target!==i.TreeMouseEventTarget.Filter)}get onPointer(){return l.Event.map(this.view.onPointer,F)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeModel(){return l.Event.signal(this.model.onDidSplice)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get findMode(){var H,V;return(V=(H=this.findController)===null||H===void 0?void 0:H.mode)!==null&&V!==void 0?V:O.Highlight}set findMode(H){this.findController&&(this.findController.mode=H)}get findMatchType(){var H,V;return(V=(H=this.findController)===null||H===void 0?void 0:H.matchType)!==null&&V!==void 0?V:x.Fuzzy}set findMatchType(H){this.findController&&(this.findController.matchType=H)}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick>"u"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick>"u"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}constructor(H,V,Z,ee,le={}){var ue;this._user=H,this._options=le,this.eventBufferer=new l.EventBufferer,this.onDidChangeFindOpenState=l.Event.None,this.disposables=new c.DisposableStore,this._onWillRefilter=new l.Emitter,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new l.Emitter;const de=new k(Z),ce=new l.Relay,ae=new l.Relay,X=this.disposables.add(new R(ae.event)),K=new d.SetMap;this.renderers=ee.map(oe=>new B(oe,()=>this.model,ce.event,X,K,le));for(const oe of this.renderers)this.disposables.add(oe);let z;le.keyboardNavigationLabelProvider&&(z=new T(this,le.keyboardNavigationLabelProvider,le.filter),le=Object.assign(Object.assign({},le),{filter:z}),this.disposables.add(z)),this.focus=new Y(()=>this.view.getFocusedElements()[0],le.identityProvider),this.selection=new Y(()=>this.view.getSelectedElements()[0],le.identityProvider),this.anchor=new Y(()=>this.view.getAnchorElement(),le.identityProvider),this.view=new se(H,V,de,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},E(()=>this.model,le)),{tree:this})),this.model=this.createModel(H,this.view,le),ce.input=this.model.onDidChangeCollapseState;const Q=l.Event.forEach(this.model.onDidSplice,oe=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(oe),this.selection.onDidModelSplice(oe)})},this.disposables);Q(()=>null,null,this.disposables);const j=this.disposables.add(new l.Emitter),re=this.disposables.add(new r.Delayer(0));if(this.disposables.add(l.Event.any(Q,this.focus.onDidChange,this.selection.onDidChange)(()=>{re.trigger(()=>{const oe=new Set;for(const he of this.focus.getNodes())oe.add(he);for(const he of this.selection.getNodes())oe.add(he);j.fire([...oe.values()])})})),ae.input=j.event,le.keyboardSupport!==!1){const oe=l.Event.chain(this.view.onKeyDown,he=>he.filter(me=>!(0,v.isInputElement)(me.target)).map(me=>new y.StandardKeyboardEvent(me)));l.Event.chain(oe,he=>he.filter(me=>me.keyCode===15))(this.onLeftArrow,this,this.disposables),l.Event.chain(oe,he=>he.filter(me=>me.keyCode===17))(this.onRightArrow,this,this.disposables),l.Event.chain(oe,he=>he.filter(me=>me.keyCode===10))(this.onSpace,this,this.disposables)}if((!((ue=le.findWidgetEnabled)!==null&&ue!==void 0)||ue)&&le.keyboardNavigationLabelProvider&&le.contextViewProvider){const oe=this.options.findWidgetStyles?{styles:this.options.findWidgetStyles}:void 0;this.findController=new U(this,this.model,this.view,z,le.contextViewProvider,oe),this.focusNavigationFilter=he=>this.findController.shouldAllowFocus(he),this.onDidChangeFindOpenState=this.findController.onDidChangeOpenState,this.disposables.add(this.findController),this.onDidChangeFindMode=this.findController.onDidChangeMode,this.onDidChangeFindMatchType=this.findController.onDidChangeMatchType}else this.onDidChangeFindMode=l.Event.None,this.onDidChangeFindMatchType=l.Event.None;this.styleElement=(0,L.createStyleSheet)(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===M.Always)}updateOptions(H={}){var V;this._options=Object.assign(Object.assign({},this._options),H);for(const Z of this.renderers)Z.updateOptions(H);this.view.updateOptions(this._options),(V=this.findController)===null||V===void 0||V.updateOptions(H),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===M.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(H){this.view.scrollTop=H}get scrollHeight(){return this.view.scrollHeight}get renderHeight(){return this.view.renderHeight}domFocus(){this.view.domFocus()}layout(H,V){var Z;this.view.layout(H,V),(0,g.isNumber)(V)&&((Z=this.findController)===null||Z===void 0||Z.layout(V))}style(H){const V=`.${this.view.domId}`,Z=[];H.treeIndentGuidesStroke&&(Z.push(`.monaco-list${V}:hover .monaco-tl-indent > .indent-guide, .monaco-list${V}.always .monaco-tl-indent > .indent-guide { border-color: ${H.treeInactiveIndentGuidesStroke}; }`),Z.push(`.monaco-list${V} .monaco-tl-indent > .indent-guide.active { border-color: ${H.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=Z.join(` -`),this.view.style(H)}getParentElement(H){const V=this.model.getParentNodeLocation(H);return this.model.getNode(V).element}getFirstElementChild(H){return this.model.getFirstElementChild(H)}getNode(H){return this.model.getNode(H)}getNodeLocation(H){return this.model.getNodeLocation(H)}collapse(H,V=!1){return this.model.setCollapsed(H,!0,V)}expand(H,V=!1){return this.model.setCollapsed(H,!1,V)}toggleCollapsed(H,V=!1){return this.model.setCollapsed(H,void 0,V)}isCollapsible(H){return this.model.isCollapsible(H)}setCollapsible(H,V){return this.model.setCollapsible(H,V)}isCollapsed(H){return this.model.isCollapsed(H)}refilter(){this._onWillRefilter.fire(void 0),this.model.refilter()}setSelection(H,V){const Z=H.map(le=>this.model.getNode(le));this.selection.set(Z,V);const ee=H.map(le=>this.model.getListIndex(le)).filter(le=>le>-1);this.view.setSelection(ee,V,!0)}getSelection(){return this.selection.get()}setFocus(H,V){const Z=H.map(le=>this.model.getNode(le));this.focus.set(Z,V);const ee=H.map(le=>this.model.getListIndex(le)).filter(le=>le>-1);this.view.setFocus(ee,V,!0)}getFocus(){return this.focus.get()}reveal(H,V){this.model.expandTo(H);const Z=this.model.getListIndex(H);Z!==-1&&this.view.reveal(Z,V)}onLeftArrow(H){H.preventDefault(),H.stopPropagation();const V=this.view.getFocusedElements();if(V.length===0)return;const Z=V[0],ee=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(ee,!0)){const ue=this.model.getParentNodeLocation(ee);if(!ue)return;const de=this.model.getListIndex(ue);this.view.reveal(de),this.view.setFocus([de])}}onRightArrow(H){H.preventDefault(),H.stopPropagation();const V=this.view.getFocusedElements();if(V.length===0)return;const Z=V[0],ee=this.model.getNodeLocation(Z);if(!this.model.setCollapsed(ee,!1)){if(!Z.children.some(ce=>ce.visible))return;const[ue]=this.view.getFocus(),de=ue+1;this.view.reveal(de),this.view.setFocus([de])}}onSpace(H){H.preventDefault(),H.stopPropagation();const V=this.view.getFocusedElements();if(V.length===0)return;const Z=V[0],ee=this.model.getNodeLocation(Z),le=H.browserEvent.altKey;this.model.setCollapsed(ee,void 0,le)}dispose(){(0,c.dispose)(this.disposables),this.view.dispose()}}e.AbstractTree=J}),define(te[588],ie([1,0,182,219]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataTree=void 0;class y extends L.AbstractTree{constructor(S,m,_,v,C,s={}){super(S,m,_,v,s),this.user=S,this.dataSource=C,this.identityProvider=s.identityProvider}createModel(S,m,_){return new I.ObjectTreeModel(S,m,_)}}e.DataTree=y}),define(te[321],ie([1,0,182,571,219,105,43]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleObjectTree=e.ObjectTree=void 0;class m extends L.AbstractTree{get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}constructor(i,n,t,r,u={}){super(i,n,t,r,u),this.user=i}setChildren(i,n=S.Iterable.empty(),t){this.model.setChildren(i,n,t)}rerender(i){if(i===void 0){this.view.rerender();return}this.model.rerender(i)}hasElement(i){return this.model.has(i)}createModel(i,n,t){return new y.ObjectTreeModel(i,n,t)}}e.ObjectTree=m;class _{get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}constructor(i,n){this._compressedTreeNodeProvider=i,this.renderer=n,this.templateId=n.templateId,n.onDidChangeTwistieState&&(this.onDidChangeTwistieState=n.onDidChangeTwistieState)}renderTemplate(i){return{compressedTreeNode:void 0,data:this.renderer.renderTemplate(i)}}renderElement(i,n,t,r){const u=this.compressedTreeNodeProvider.getCompressedTreeNode(i.element);u.element.elements.length===1?(t.compressedTreeNode=void 0,this.renderer.renderElement(i,n,t.data,r)):(t.compressedTreeNode=u,this.renderer.renderCompressedElements(u,n,t.data,r))}disposeElement(i,n,t,r){var u,f,d,l;t.compressedTreeNode?(f=(u=this.renderer).disposeCompressedElements)===null||f===void 0||f.call(u,t.compressedTreeNode,n,t.data,r):(l=(d=this.renderer).disposeElement)===null||l===void 0||l.call(d,i,n,t.data,r)}disposeTemplate(i){this.renderer.disposeTemplate(i.data)}renderTwistie(i,n){return this.renderer.renderTwistie?this.renderer.renderTwistie(i,n):!1}}Ie([D.memoize],_.prototype,"compressedTreeNodeProvider",null);function v(s,i){return i&&Object.assign(Object.assign({},i),{keyboardNavigationLabelProvider:i.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(n){let t;try{t=s().getCompressedTreeNode(n)}catch{return i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n)}return t.element.elements.length===1?i.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(n):i.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.element.elements)}}})}class C extends m{constructor(i,n,t,r,u={}){const f=()=>this,d=r.map(l=>new _(f,l));super(i,n,t,d,v(f,u))}setChildren(i,n=S.Iterable.empty(),t){this.model.setChildren(i,n,t)}createModel(i,n,t){return new I.CompressibleObjectTreeModel(i,n,t)}updateOptions(i={}){super.updateOptions(i),typeof i.compressionEnabled<"u"&&this.model.setCompressionEnabled(i.compressionEnabled)}getCompressedTreeNode(i=null){return this.model.getCompressedTreeNode(i)}}e.CompressibleObjectTree=C}),define(te[589],ie([1,0,225,182,218,321,137,14,26,27,9,6,43,2,20]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompressibleAsyncDataTree=e.AsyncDataTree=void 0;function r(T){return Object.assign(Object.assign({},T),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function u(T,N){return N.parent?N.parent===T?!0:u(T,N.parent):!1}function f(T,N){return T===N||u(T,N)||u(N,T)}class d{get element(){return this.node.element.element}get children(){return this.node.children.map(N=>new d(N))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(N){this.node=N}}class l{constructor(N,A,P){this.renderer=N,this.nodeMapper=A,this.onDidChangeTwistieState=P,this.renderedNodes=new Map,this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,A,P,O){this.renderer.renderElement(this.nodeMapper.map(N),A,P.templateData,O)}renderTwistie(N,A){return N.slow?(A.classList.add(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(A.classList.remove(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,A,P,O){var x,W;(W=(x=this.renderer).disposeElement)===null||W===void 0||W.call(x,this.nodeMapper.map(N),A,P.templateData,O)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear()}}function o(T){return{browserEvent:T.browserEvent,elements:T.elements.map(N=>N.element)}}function c(T){return{browserEvent:T.browserEvent,element:T.element&&T.element.element,target:T.target}}class a extends L.ElementsDragAndDropData{constructor(N){super(N.elements.map(A=>A.element)),this.data=N}}function g(T){return T instanceof L.ElementsDragAndDropData?new a(T):T}class h{constructor(N){this.dnd=N}getDragURI(N){return this.dnd.getDragURI(N.element)}getDragLabel(N,A){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(N.map(P=>P.element),A)}onDragStart(N,A){var P,O;(O=(P=this.dnd).onDragStart)===null||O===void 0||O.call(P,g(N),A)}onDragOver(N,A,P,O,x=!0){return this.dnd.onDragOver(g(N),A&&A.element,P,O)}drop(N,A,P,O){this.dnd.drop(g(N),A&&A.element,P,O)}onDragEnd(N){var A,P;(P=(A=this.dnd).onDragEnd)===null||P===void 0||P.call(A,N)}dispose(){this.dnd.dispose()}}function p(T){return T&&Object.assign(Object.assign({},T),{collapseByDefault:!0,identityProvider:T.identityProvider&&{getId(N){return T.identityProvider.getId(N.element)}},dnd:T.dnd&&new h(T.dnd),multipleSelectionController:T.multipleSelectionController&&{isSelectionSingleChangeEvent(N){return T.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},N),{element:N.element}))},isSelectionRangeChangeEvent(N){return T.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},N),{element:N.element}))}},accessibilityProvider:T.accessibilityProvider&&Object.assign(Object.assign({},T.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:T.accessibilityProvider.getRole?N=>T.accessibilityProvider.getRole(N.element):()=>"treeitem",isChecked:T.accessibilityProvider.isChecked?N=>{var A;return!!(!((A=T.accessibilityProvider)===null||A===void 0)&&A.isChecked(N.element))}:void 0,getAriaLabel(N){return T.accessibilityProvider.getAriaLabel(N.element)},getWidgetAriaLabel(){return T.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:T.accessibilityProvider.getWidgetRole?()=>T.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:T.accessibilityProvider.getAriaLevel&&(N=>T.accessibilityProvider.getAriaLevel(N.element)),getActiveDescendantId:T.accessibilityProvider.getActiveDescendantId&&(N=>T.accessibilityProvider.getActiveDescendantId(N.element))}),filter:T.filter&&{filter(N,A){return T.filter.filter(N.element,A)}},keyboardNavigationLabelProvider:T.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},T.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(N){return T.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(N.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof T.expandOnlyOnTwistieClick>"u"?void 0:typeof T.expandOnlyOnTwistieClick!="function"?T.expandOnlyOnTwistieClick:N=>T.expandOnlyOnTwistieClick(N.element),defaultFindVisibility:N=>N.hasChildren&&N.stale?1:typeof T.defaultFindVisibility=="number"?T.defaultFindVisibility:typeof T.defaultFindVisibility>"u"?2:T.defaultFindVisibility(N.element)})}function b(T,N){N(T),T.children.forEach(A=>b(A,N))}class w{get onDidScroll(){return this.tree.onDidScroll}get onDidChangeFocus(){return s.Event.map(this.tree.onDidChangeFocus,o)}get onDidChangeSelection(){return s.Event.map(this.tree.onDidChangeSelection,o)}get onMouseDblClick(){return s.Event.map(this.tree.onMouseDblClick,c)}get onPointer(){return s.Event.map(this.tree.onPointer,c)}get onDidFocus(){return this.tree.onDidFocus}get onDidChangeModel(){return this.tree.onDidChangeModel}get onDidChangeCollapseState(){return this.tree.onDidChangeCollapseState}get onDidChangeFindOpenState(){return this.tree.onDidChangeFindOpenState}get onDidDispose(){return this.tree.onDidDispose}constructor(N,A,P,O,x,W={}){this.user=N,this.dataSource=x,this.nodes=new Map,this.subTreeRefreshPromises=new Map,this.refreshPromises=new Map,this._onDidRender=new s.Emitter,this._onDidChangeNodeSlowState=new s.Emitter,this.nodeMapper=new S.WeakMapper(U=>new d(U)),this.disposables=new n.DisposableStore,this.identityProvider=W.identityProvider,this.autoExpandSingleChildren=typeof W.autoExpandSingleChildren>"u"?!1:W.autoExpandSingleChildren,this.sorter=W.sorter,this.collapseByDefault=W.collapseByDefault,this.tree=this.createTree(N,A,P,O,W),this.onDidChangeFindMode=this.tree.onDidChangeFindMode,this.root=r({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)}createTree(N,A,P,O,x){const W=new I.ComposedTreeDelegate(P),U=O.map(G=>new l(G,this.nodeMapper,this._onDidChangeNodeSlowState.event)),F=p(x)||{};return new D.ObjectTree(N,A,W,U,F)}updateOptions(N={}){this.tree.updateOptions(N)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(N){this.tree.scrollTop=N}get scrollHeight(){return this.tree.scrollHeight}get renderHeight(){return this.tree.renderHeight}domFocus(){this.tree.domFocus()}layout(N,A){this.tree.layout(N,A)}style(N){this.tree.style(N)}getInput(){return this.root.element}setInput(N,A){return be(this,void 0,void 0,function*(){this.refreshPromises.forEach(O=>O.cancel()),this.refreshPromises.clear(),this.root.element=N;const P=A&&{viewState:A,focus:[],selection:[]};yield this._updateChildren(N,!0,!1,P),P&&(this.tree.setFocus(P.focus),this.tree.setSelection(P.selection)),A&&typeof A.scrollTop=="number"&&(this.scrollTop=A.scrollTop)})}_updateChildren(N=this.root.element,A=!0,P=!1,O,x){return be(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new S.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield s.Event.toPromise(this._onDidRender.event));const W=this.getDataNode(N);if(yield this.refreshAndRenderNode(W,A,O,x),P)try{this.tree.rerender(W)}catch{}})}rerender(N){if(N===void 0||N===this.root.element){this.tree.rerender();return}const A=this.getDataNode(N);this.tree.rerender(A)}getNode(N=this.root.element){const A=this.getDataNode(N),P=this.tree.getNode(A===this.root?null:A);return this.nodeMapper.map(P)}collapse(N,A=!1){const P=this.getDataNode(N);return this.tree.collapse(P===this.root?null:P,A)}expand(N,A=!1){return be(this,void 0,void 0,function*(){if(typeof this.root.element>"u")throw new S.TreeError(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield s.Event.toPromise(this._onDidRender.event));const P=this.getDataNode(N);if(this.tree.hasElement(P)&&!this.tree.isCollapsible(P)||(P.refreshPromise&&(yield this.root.refreshPromise,yield s.Event.toPromise(this._onDidRender.event)),P!==this.root&&!P.refreshPromise&&!this.tree.isCollapsed(P)))return!1;const O=this.tree.expand(P===this.root?null:P,A);return P.refreshPromise&&(yield this.root.refreshPromise,yield s.Event.toPromise(this._onDidRender.event)),O})}setSelection(N,A){const P=N.map(O=>this.getDataNode(O));this.tree.setSelection(P,A)}getSelection(){return this.tree.getSelection().map(A=>A.element)}setFocus(N,A){const P=N.map(O=>this.getDataNode(O));this.tree.setFocus(P,A)}getFocus(){return this.tree.getFocus().map(A=>A.element)}reveal(N,A){this.tree.reveal(this.getDataNode(N),A)}getParentElement(N){const A=this.tree.getParentElement(this.getDataNode(N));return A&&A.element}getFirstElementChild(N=this.root.element){const A=this.getDataNode(N),P=this.tree.getFirstElementChild(A===this.root?null:A);return P&&P.element}getDataNode(N){const A=this.nodes.get(N===this.root.element?null:N);if(!A)throw new S.TreeError(this.user,`Data tree node not found: ${N}`);return A}refreshAndRenderNode(N,A,P,O){return be(this,void 0,void 0,function*(){yield this.refreshNode(N,A,P),this.render(N,P,O)})}refreshNode(N,A,P){return be(this,void 0,void 0,function*(){let O;if(this.subTreeRefreshPromises.forEach((x,W)=>{!O&&f(W,N)&&(O=x.then(()=>this.refreshNode(N,A,P)))}),O)return O;if(N!==this.root&&this.tree.getNode(N).collapsed){N.hasChildren=!!this.dataSource.hasChildren(N.element),N.stale=!0;return}return this.doRefreshSubTree(N,A,P)})}doRefreshSubTree(N,A,P){return be(this,void 0,void 0,function*(){let O;N.refreshPromise=new Promise(x=>O=x),this.subTreeRefreshPromises.set(N,N.refreshPromise),N.refreshPromise.finally(()=>{N.refreshPromise=void 0,this.subTreeRefreshPromises.delete(N)});try{const x=yield this.doRefreshNode(N,A,P);N.stale=!1,yield m.Promises.settled(x.map(W=>this.doRefreshSubTree(W,A,P)))}finally{O()}})}doRefreshNode(N,A,P){return be(this,void 0,void 0,function*(){N.hasChildren=!!this.dataSource.hasChildren(N.element);let O;if(!N.hasChildren)O=Promise.resolve(i.Iterable.empty());else{const x=this.doGetChildren(N);if((0,t.isIterable)(x))O=Promise.resolve(x);else{const W=(0,m.timeout)(800);W.then(()=>{N.slow=!0,this._onDidChangeNodeSlowState.fire(N)},U=>null),O=x.finally(()=>W.cancel())}}try{const x=yield O;return this.setChildren(N,x,A,P)}catch(x){if(N!==this.root&&this.tree.hasElement(N)&&this.tree.collapse(N),(0,C.isCancellationError)(x))return[];throw x}finally{N.slow&&(N.slow=!1,this._onDidChangeNodeSlowState.fire(N))}})}doGetChildren(N){let A=this.refreshPromises.get(N);if(A)return A;const P=this.dataSource.getChildren(N.element);return(0,t.isIterable)(P)?this.processChildren(P):(A=(0,m.createCancelablePromise)(()=>be(this,void 0,void 0,function*(){return this.processChildren(yield P)})),this.refreshPromises.set(N,A),A.finally(()=>{this.refreshPromises.delete(N)}))}_onDidChangeCollapseState({node:N,deep:A}){N.element!==null&&!N.collapsed&&N.element.stale&&(A?this.collapse(N.element.element):this.refreshAndRenderNode(N.element,!1).catch(C.onUnexpectedError))}setChildren(N,A,P,O){const x=[...A];if(N.children.length===0&&x.length===0)return[];const W=new Map,U=new Map;for(const Y of N.children)if(W.set(Y.element,Y),this.identityProvider){const ne=this.tree.isCollapsed(Y);U.set(Y.id,{node:Y,collapsed:ne})}const F=[],G=x.map(Y=>{const ne=!!this.dataSource.hasChildren(Y);if(!this.identityProvider){const H=r({element:Y,parent:N,hasChildren:ne});return ne&&this.collapseByDefault&&!this.collapseByDefault(Y)&&(H.collapsedByDefault=!1,F.push(H)),H}const se=this.identityProvider.getId(Y).toString(),J=U.get(se);if(J){const H=J.node;return W.delete(H.element),this.nodes.delete(H.element),this.nodes.set(Y,H),H.element=Y,H.hasChildren=ne,P?J.collapsed?(H.children.forEach(V=>b(V,Z=>this.nodes.delete(Z.element))),H.children.splice(0,H.children.length),H.stale=!0):F.push(H):ne&&this.collapseByDefault&&!this.collapseByDefault(Y)&&(H.collapsedByDefault=!1,F.push(H)),H}const q=r({element:Y,parent:N,id:se,hasChildren:ne});return O&&O.viewState.focus&&O.viewState.focus.indexOf(se)>-1&&O.focus.push(q),O&&O.viewState.selection&&O.viewState.selection.indexOf(se)>-1&&O.selection.push(q),O&&O.viewState.expanded&&O.viewState.expanded.indexOf(se)>-1?F.push(q):ne&&this.collapseByDefault&&!this.collapseByDefault(Y)&&(q.collapsedByDefault=!1,F.push(q)),q});for(const Y of W.values())b(Y,ne=>this.nodes.delete(ne.element));for(const Y of G)this.nodes.set(Y.element,Y);return N.children.splice(0,N.children.length,...G),N!==this.root&&this.autoExpandSingleChildren&&G.length===1&&F.length===0&&(G[0].collapsedByDefault=!1,F.push(G[0])),F}render(N,A,P){const O=N.children.map(W=>this.asTreeElement(W,A)),x=P&&Object.assign(Object.assign({},P),{diffIdentityProvider:P.diffIdentityProvider&&{getId(W){return P.diffIdentityProvider.getId(W.element)}}});this.tree.setChildren(N===this.root?null:N,O,x),N!==this.root&&this.tree.setCollapsible(N,N.hasChildren),this._onDidRender.fire()}asTreeElement(N,A){if(N.stale)return{element:N,collapsible:N.hasChildren,collapsed:!0};let P;return A&&A.viewState.expanded&&N.id&&A.viewState.expanded.indexOf(N.id)>-1?P=!1:P=N.collapsedByDefault,N.collapsedByDefault=void 0,{element:N,children:N.hasChildren?i.Iterable.map(N.children,O=>this.asTreeElement(O,A)):[],collapsible:N.hasChildren,collapsed:P}}processChildren(N){return this.sorter&&(N=[...N].sort(this.sorter.compare.bind(this.sorter))),N}dispose(){this.disposables.dispose(),this.tree.dispose()}}e.AsyncDataTree=w;class E{get element(){return{elements:this.node.element.elements.map(N=>N.element),incompressible:this.node.element.incompressible}}get children(){return this.node.children.map(N=>new E(N))}get depth(){return this.node.depth}get visibleChildrenCount(){return this.node.visibleChildrenCount}get visibleChildIndex(){return this.node.visibleChildIndex}get collapsible(){return this.node.collapsible}get collapsed(){return this.node.collapsed}get visible(){return this.node.visible}get filterData(){return this.node.filterData}constructor(N){this.node=N}}class k{constructor(N,A,P,O){this.renderer=N,this.nodeMapper=A,this.compressibleNodeMapperProvider=P,this.onDidChangeTwistieState=O,this.renderedNodes=new Map,this.disposables=[],this.templateId=N.templateId}renderTemplate(N){return{templateData:this.renderer.renderTemplate(N)}}renderElement(N,A,P,O){this.renderer.renderElement(this.nodeMapper.map(N),A,P.templateData,O)}renderCompressedElements(N,A,P,O){this.renderer.renderCompressedElements(this.compressibleNodeMapperProvider().map(N),A,P.templateData,O)}renderTwistie(N,A){return N.slow?(A.classList.add(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!0):(A.classList.remove(...v.ThemeIcon.asClassNameArray(_.Codicon.treeItemLoading)),!1)}disposeElement(N,A,P,O){var x,W;(W=(x=this.renderer).disposeElement)===null||W===void 0||W.call(x,this.nodeMapper.map(N),A,P.templateData,O)}disposeCompressedElements(N,A,P,O){var x,W;(W=(x=this.renderer).disposeCompressedElements)===null||W===void 0||W.call(x,this.compressibleNodeMapperProvider().map(N),A,P.templateData,O)}disposeTemplate(N){this.renderer.disposeTemplate(N.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=(0,n.dispose)(this.disposables)}}function M(T){const N=T&&p(T);return N&&Object.assign(Object.assign({},N),{keyboardNavigationLabelProvider:N.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},N.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(A){return T.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(A.map(P=>P.element))}})})}class R extends w{constructor(N,A,P,O,x,W,U={}){super(N,A,P,x,W,U),this.compressionDelegate=O,this.compressibleNodeMapper=new S.WeakMapper(F=>new E(F)),this.filter=U.filter}createTree(N,A,P,O,x){const W=new I.ComposedTreeDelegate(P),U=O.map(G=>new k(G,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),F=M(x)||{};return new D.CompressibleObjectTree(N,A,W,U,F)}asTreeElement(N,A){return Object.assign({incompressible:this.compressionDelegate.isIncompressible(N.element)},super.asTreeElement(N,A))}updateOptions(N={}){this.tree.updateOptions(N)}render(N,A){if(!this.identityProvider)return super.render(N,A);const P=se=>this.identityProvider.getId(se).toString(),O=se=>{const J=new Set;for(const q of se){const H=this.tree.getCompressedTreeNode(q===this.root?null:q);if(H.element)for(const V of H.element.elements)J.add(P(V.element))}return J},x=O(this.tree.getSelection()),W=O(this.tree.getFocus());super.render(N,A);const U=this.getSelection();let F=!1;const G=this.getFocus();let Y=!1;const ne=se=>{const J=se.element;if(J)for(let q=0;q{const P=this.filter.filter(A,1),O=B(P);if(O===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return O===1})),super.processChildren(N)}}e.CompressibleAsyncDataTree=R;function B(T){return typeof T=="boolean"?T?1:0:(0,y.isFilterResult)(T)?(0,y.getVisibleState)(T.visibility):(0,y.getVisibleState)(T)}}),define(te[322],ie([1,0,9,6,2,52,17,10]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.SimpleWorkerServer=e.SimpleWorkerClient=e.logOnceWebWorkerWarning=void 0;const _="$initialize";let v=!1;function C(g){S.isWeb&&(v||(v=!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(g.message))}e.logOnceWebWorkerWarning=C;class s{constructor(h,p,b,w){this.vsWorker=h,this.req=p,this.method=b,this.args=w,this.type=0}}class i{constructor(h,p,b,w){this.vsWorker=h,this.seq=p,this.res=b,this.err=w,this.type=1}}class n{constructor(h,p,b,w){this.vsWorker=h,this.req=p,this.eventName=b,this.arg=w,this.type=2}}class t{constructor(h,p,b){this.vsWorker=h,this.req=p,this.event=b,this.type=3}}class r{constructor(h,p){this.vsWorker=h,this.req=p,this.type=4}}class u{constructor(h){this._workerId=-1,this._handler=h,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(h){this._workerId=h}sendMessage(h,p){const b=String(++this._lastSentReq);return new Promise((w,E)=>{this._pendingReplies[b]={resolve:w,reject:E},this._send(new s(this._workerId,b,h,p))})}listen(h,p){let b=null;const w=new I.Emitter({onWillAddFirstListener:()=>{b=String(++this._lastSentReq),this._pendingEmitters.set(b,w),this._send(new n(this._workerId,b,h,p))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(b),this._send(new r(this._workerId,b)),b=null}});return w.event}handleMessage(h){!h||!h.vsWorker||this._workerId!==-1&&h.vsWorker!==this._workerId||this._handleMessage(h)}_handleMessage(h){switch(h.type){case 1:return this._handleReplyMessage(h);case 0:return this._handleRequestMessage(h);case 2:return this._handleSubscribeEventMessage(h);case 3:return this._handleEventMessage(h);case 4:return this._handleUnsubscribeEventMessage(h)}}_handleReplyMessage(h){if(!this._pendingReplies[h.seq]){console.warn("Got reply to unknown seq");return}const p=this._pendingReplies[h.seq];if(delete this._pendingReplies[h.seq],h.err){let b=h.err;h.err.$isError&&(b=new Error,b.name=h.err.name,b.message=h.err.message,b.stack=h.err.stack),p.reject(b);return}p.resolve(h.res)}_handleRequestMessage(h){const p=h.req;this._handler.handleMessage(h.method,h.args).then(w=>{this._send(new i(this._workerId,p,w,void 0))},w=>{w.detail instanceof Error&&(w.detail=(0,L.transformErrorForSerialization)(w.detail)),this._send(new i(this._workerId,p,void 0,(0,L.transformErrorForSerialization)(w)))})}_handleSubscribeEventMessage(h){const p=h.req,b=this._handler.handleEvent(h.eventName,h.arg)(w=>{this._send(new t(this._workerId,p,w))});this._pendingEvents.set(p,b)}_handleEventMessage(h){if(!this._pendingEmitters.has(h.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(h.req).fire(h.event)}_handleUnsubscribeEventMessage(h){if(!this._pendingEvents.has(h.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(h.req).dispose(),this._pendingEvents.delete(h.req)}_send(h){const p=[];if(h.type===0)for(let b=0;b{this._protocol.handleMessage(T)},T=>{w?.(T)})),this._protocol=new u({sendMessage:(T,N)=>{this._worker.postMessage(T,N)},handleMessage:(T,N)=>{if(typeof b[T]!="function")return Promise.reject(new Error("Missing method "+T+" on main thread host."));try{return Promise.resolve(b[T].apply(b,N))}catch(A){return Promise.reject(A)}},handleEvent:(T,N)=>{if(l(T)){const A=b[T].call(b,N);if(typeof A!="function")throw new Error(`Missing dynamic event ${T} on main thread host.`);return A}if(d(T)){const A=b[T];if(typeof A!="function")throw new Error(`Missing event ${T} on main thread host.`);return A}throw new Error(`Malformed event name ${T}`)}}),this._protocol.setWorkerId(this._worker.getId());let E=null;const k=globalThis.require;typeof k<"u"&&typeof k.getConfig=="function"?E=k.getConfig():typeof globalThis.requirejs<"u"&&(E=globalThis.requirejs.s.contexts._.config);const M=(0,D.getAllMethodNames)(b);this._onModuleLoaded=this._protocol.sendMessage(_,[this._worker.getId(),JSON.parse(JSON.stringify(E)),p,M]);const R=(T,N)=>this._request(T,N),B=(T,N)=>this._protocol.listen(T,N);this._lazyProxy=new Promise((T,N)=>{w=N,this._onModuleLoaded.then(A=>{T(o(A,R,B))},A=>{N(A),this._onError("Worker failed to load "+p,A)})})}getProxyObject(){return this._lazyProxy}_request(h,p){return new Promise((b,w)=>{this._onModuleLoaded.then(()=>{this._protocol.sendMessage(h,p).then(b,w)},w)})}_onError(h,p){console.error(h),console.info(p)}}e.SimpleWorkerClient=f;function d(g){return g[0]==="o"&&g[1]==="n"&&m.isUpperAsciiLetter(g.charCodeAt(2))}function l(g){return/^onDynamic/.test(g)&&m.isUpperAsciiLetter(g.charCodeAt(9))}function o(g,h,p){const b=k=>function(){const M=Array.prototype.slice.call(arguments,0);return h(k,M)},w=k=>function(M){return p(k,M)},E={};for(const k of g){if(l(k)){E[k]=w(k);continue}if(d(k)){E[k]=p(k,void 0);continue}E[k]=b(k)}return E}class c{constructor(h,p){this._requestHandlerFactory=p,this._requestHandler=null,this._protocol=new u({sendMessage:(b,w)=>{h(b,w)},handleMessage:(b,w)=>this._handleMessage(b,w),handleEvent:(b,w)=>this._handleEvent(b,w)})}onmessage(h){this._protocol.handleMessage(h)}_handleMessage(h,p){if(h===_)return this.initialize(p[0],p[1],p[2],p[3]);if(!this._requestHandler||typeof this._requestHandler[h]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+h));try{return Promise.resolve(this._requestHandler[h].apply(this._requestHandler,p))}catch(b){return Promise.reject(b)}}_handleEvent(h,p){if(!this._requestHandler)throw new Error("Missing requestHandler");if(l(h)){const b=this._requestHandler[h].call(this._requestHandler,p);if(typeof b!="function")throw new Error(`Missing dynamic event ${h} on request handler.`);return b}if(d(h)){const b=this._requestHandler[h];if(typeof b!="function")throw new Error(`Missing event ${h} on request handler.`);return b}throw new Error(`Malformed event name ${h}`)}initialize(h,p,b,w){this._protocol.setWorkerId(h);const M=o(w,(R,B)=>this._protocol.sendMessage(R,B),(R,B)=>this._protocol.listen(R,B));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(M),Promise.resolve((0,D.getAllMethodNames)(this._requestHandler))):(p&&(typeof p.baseUrl<"u"&&delete p.baseUrl,typeof p.paths<"u"&&typeof p.paths.vs<"u"&&delete p.paths.vs,typeof p.trustedTypesPolicy!==void 0&&delete p.trustedTypesPolicy,p.catchError=!0,globalThis.require.config(p)),new Promise((R,B)=>{(globalThis.require||$)([b],N=>{if(this._requestHandler=N.create(M),!this._requestHandler){B(new Error("No RequestHandler!"));return}R((0,D.getAllMethodNames)(this._requestHandler))},B)}))}}e.SimpleWorkerServer=c;function a(g){return new c(g,null)}e.create=a}),define(te[590],ie([1,0,90,9,54,322]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultWorkerFactory=e.getWorkerBootstrapUrl=void 0;const S=(0,L.createTrustedTypesPolicy)("defaultWorkerFactory",{createScriptURL:i=>i});function m(i){const n=globalThis.MonacoEnvironment;if(n){if(typeof n.getWorker=="function")return n.getWorker("workerMain.js",i);if(typeof n.getWorkerUrl=="function"){const t=n.getWorkerUrl("workerMain.js",i);return new Worker(S?S.createScriptURL(t):t,{name:i})}}if(typeof $=="function"){const t=$.toUrl("vs/base/worker/workerMain.js"),r=_(t,i);return new Worker(S?S.createScriptURL(r):r,{name:i})}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function _(i,n){if(/^((http:)|(https:)|(file:))/.test(i)&&i.substring(0,globalThis.origin.length)!==globalThis.origin){const d="vs/base/worker/defaultWorkerFactory.js",l=$.toUrl(d).slice(0,-d.length),o=`/*${n}*/globalThis.MonacoEnvironment={baseUrl: '${l}'};const ttPolicy = globalThis.trustedTypes?.createPolicy('defaultWorkerFactory', { createScriptURL: value => value });importScripts(ttPolicy?.createScriptURL('${i}') ?? '${i}');/*${n}*/`,c=new Blob([o],{type:"application/javascript"});return URL.createObjectURL(c)}const t=i.lastIndexOf("?"),r=i.lastIndexOf("#",t),u=t>0?new URLSearchParams(i.substring(t+1,~r?r:void 0)):new URLSearchParams;return y.COI.addSearchParam(u,!0,!0),u.toString()?`${i}?${u.toString()}#${n}`:`${i}#${n}`}e.getWorkerBootstrapUrl=_;function v(i){return typeof i.then=="function"}class C{constructor(n,t,r,u,f){this.id=t,this.label=r;const d=m(r);v(d)?this.worker=d:this.worker=Promise.resolve(d),this.postMessage(n,[]),this.worker.then(l=>{l.onmessage=function(o){u(o.data)},l.onmessageerror=f,typeof l.addEventListener=="function"&&l.addEventListener("error",f)})}getId(){return this.id}postMessage(n,t){var r;(r=this.worker)===null||r===void 0||r.then(u=>{try{u.postMessage(n,t)}catch(f){(0,I.onUnexpectedError)(f),(0,I.onUnexpectedError)(new Error(`FAILED to post message to '${this.label}'-worker`,{cause:f}))}})}dispose(){var n;(n=this.worker)===null||n===void 0||n.then(t=>t.terminate()),this.worker=null}}class s{constructor(n){this._label=n,this._webWorkerFailedBeforeError=!1}create(n,t,r){const u=++s.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new C(n,u,this._label||"anonymous"+u,t,f=>{(0,D.logOnceWebWorkerWarning)(f),this._webWorkerFailedBeforeError=f,r(f)})}}e.DefaultWorkerFactory=s,s.LAST_WORKER_ID=0}),define(te[591],ie([1,0,14,6,2,221,20]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageDatabase=e.Storage=e.StorageState=e.StorageHint=void 0;var m;(function(s){s[s.STORAGE_DOES_NOT_EXIST=0]="STORAGE_DOES_NOT_EXIST",s[s.STORAGE_IN_MEMORY=1]="STORAGE_IN_MEMORY"})(m||(e.StorageHint=m={}));var _;(function(s){s[s.None=0]="None",s[s.Initialized=1]="Initialized",s[s.Closed=2]="Closed"})(_||(e.StorageState=_={}));class v extends y.Disposable{constructor(i,n=Object.create(null)){super(),this.database=i,this.options=n,this._onDidChangeStorage=this._register(new I.PauseableEmitter),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=_.None,this.cache=new Map,this.flushDelayer=this._register(new L.ThrottledDelayer(v.DEFAULT_FLUSH_DELAY)),this.pendingDeletes=new Set,this.pendingInserts=new Map,this.whenFlushedCallbacks=[],this.registerListeners()}registerListeners(){this._register(this.database.onDidChangeItemsExternal(i=>this.onDidChangeItemsExternal(i)))}onDidChangeItemsExternal(i){var n,t;this._onDidChangeStorage.pause();try{(n=i.changed)===null||n===void 0||n.forEach((r,u)=>this.acceptExternal(u,r)),(t=i.deleted)===null||t===void 0||t.forEach(r=>this.acceptExternal(r,void 0))}finally{this._onDidChangeStorage.resume()}}acceptExternal(i,n){if(this.state===_.Closed)return;let t=!1;(0,S.isUndefinedOrNull)(n)?t=this.cache.delete(i):this.cache.get(i)!==n&&(this.cache.set(i,n),t=!0),t&&this._onDidChangeStorage.fire({key:i,external:!0})}get(i,n){const t=this.cache.get(i);return(0,S.isUndefinedOrNull)(t)?n:t}getBoolean(i,n){const t=this.get(i);return(0,S.isUndefinedOrNull)(t)?n:t==="true"}getNumber(i,n){const t=this.get(i);return(0,S.isUndefinedOrNull)(t)?n:parseInt(t,10)}set(i,n,t=!1){return be(this,void 0,void 0,function*(){if(this.state===_.Closed)return;if((0,S.isUndefinedOrNull)(n))return this.delete(i,t);const r=(0,S.isObject)(n)||Array.isArray(n)?(0,D.stringify)(n):String(n);if(this.cache.get(i)!==r)return this.cache.set(i,r),this.pendingInserts.set(i,r),this.pendingDeletes.delete(i),this._onDidChangeStorage.fire({key:i,external:t}),this.doFlush()})}delete(i,n=!1){return be(this,void 0,void 0,function*(){if(!(this.state===_.Closed||!this.cache.delete(i)))return this.pendingDeletes.has(i)||this.pendingDeletes.add(i),this.pendingInserts.delete(i),this._onDidChangeStorage.fire({key:i,external:n}),this.doFlush()})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return be(this,void 0,void 0,function*(){if(!this.hasPending)return;const i={insert:this.pendingInserts,delete:this.pendingDeletes};return this.pendingDeletes=new Set,this.pendingInserts=new Map,this.database.updateItems(i).finally(()=>{var n;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(n=this.whenFlushedCallbacks.pop())===null||n===void 0||n()})})}doFlush(i){return be(this,void 0,void 0,function*(){return this.options.hint===m.STORAGE_IN_MEMORY?this.flushPending():this.flushDelayer.trigger(()=>this.flushPending(),i)})}}e.Storage=v,v.DEFAULT_FLUSH_DELAY=100;class C{constructor(){this.onDidChangeItemsExternal=I.Event.None,this.items=new Map}updateItems(i){var n,t;return be(this,void 0,void 0,function*(){(n=i.insert)===null||n===void 0||n.forEach((r,u)=>this.items.set(u,r)),(t=i.delete)===null||t===void 0||t.forEach(r=>this.items.delete(r))})}}e.InMemoryStorageDatabase=C}),define(te[183],ie([1,0,51,7,79,44,258,14,6,2,107,10,273,24]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaWrapper=e.ClipboardEventUtils=e.TextAreaInput=e.InMemoryClipboardMetadataManager=e.CopyOptions=e.TextAreaSyntethicEvents=void 0;var t;(function(l){l.Tap="-monaco-textarea-synthetic-tap"})(t||(e.TextAreaSyntethicEvents=t={})),e.CopyOptions={forceCopyWithSyntaxHighlighting:!1};class r{constructor(){this._lastState=null}set(o,c){this._lastState={lastCopiedValue:o,data:c}}get(o){return this._lastState&&this._lastState.lastCopiedValue===o?this._lastState.data:(this._lastState=null,null)}}e.InMemoryClipboardMetadataManager=r,r.INSTANCE=new r;class u{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(o){o=o||"";const c={text:o,replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=o.length,c}}class f extends v.Disposable{get textAreaState(){return this._textAreaState}constructor(o,c,a,g){super(),this._host=o,this._textArea=c,this._OS=a,this._browser=g,this._onFocus=this._register(new _.Emitter),this.onFocus=this._onFocus.event,this._onBlur=this._register(new _.Emitter),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new _.Emitter),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new _.Emitter),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new _.Emitter),this.onCut=this._onCut.event,this._onPaste=this._register(new _.Emitter),this.onPaste=this._onPaste.event,this._onType=this._register(new _.Emitter),this.onType=this._onType.event,this._onCompositionStart=this._register(new _.Emitter),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new _.Emitter),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new _.Emitter),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new _.Emitter),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new m.RunOnceScheduler(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new m.RunOnceScheduler(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=i.TextAreaState.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let h=null;this._register(this._textArea.onKeyDown(p=>{const b=new D.StandardKeyboardEvent(p);(b.keyCode===114||this._currentComposition&&b.keyCode===1)&&b.stopPropagation(),b.equals(9)&&b.preventDefault(),h=b,this._onKeyDown.fire(b)})),this._register(this._textArea.onKeyUp(p=>{const b=new D.StandardKeyboardEvent(p);this._onKeyUp.fire(b)})),this._register(this._textArea.onCompositionStart(p=>{i._debugComposition&&console.log("[compositionstart]",p);const b=new u;if(this._currentComposition){this._currentComposition=b;return}if(this._currentComposition=b,this._OS===2&&h&&h.equals(114)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===p.data&&(h.code==="ArrowRight"||h.code==="ArrowLeft")){i._debugComposition&&console.log("[compositionstart] Handling long press case on macOS + arrow key",p),b.handleCompositionUpdate("x"),this._onCompositionStart.fire({data:p.data});return}if(this._browser.isAndroid){this._onCompositionStart.fire({data:p.data});return}this._onCompositionStart.fire({data:p.data})})),this._register(this._textArea.onCompositionUpdate(p=>{i._debugComposition&&console.log("[compositionupdate]",p);const b=this._currentComposition;if(!b)return;if(this._browser.isAndroid){const E=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),k=i.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,E);this._textAreaState=E,this._onType.fire(k),this._onCompositionUpdate.fire(p);return}const w=b.handleCompositionUpdate(p.data);this._textAreaState=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(w),this._onCompositionUpdate.fire(p)})),this._register(this._textArea.onCompositionEnd(p=>{i._debugComposition&&console.log("[compositionend]",p);const b=this._currentComposition;if(!b)return;if(this._currentComposition=null,this._browser.isAndroid){const E=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),k=i.TextAreaState.deduceAndroidCompositionInput(this._textAreaState,E);this._textAreaState=E,this._onType.fire(k),this._onCompositionEnd.fire();return}const w=b.handleCompositionUpdate(p.data);this._textAreaState=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),this._onType.fire(w),this._onCompositionEnd.fire()})),this._register(this._textArea.onInput(p=>{if(i._debugComposition&&console.log("[input]",p),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const b=i.TextAreaState.readFromTextArea(this._textArea,this._textAreaState),w=i.TextAreaState.deduceInput(this._textAreaState,b,this._OS===2);w.replacePrevCharCnt===0&&w.text.length===1&&(s.isHighSurrogate(w.text.charCodeAt(0))||w.text.charCodeAt(0)===127)||(this._textAreaState=b,(w.text!==""||w.replacePrevCharCnt!==0||w.replaceNextCharCnt!==0||w.positionDelta!==0)&&this._onType.fire(w))})),this._register(this._textArea.onCut(p=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(p),this._asyncTriggerCut.schedule()})),this._register(this._textArea.onCopy(p=>{this._ensureClipboardGetsEditorSelection(p)})),this._register(this._textArea.onPaste(p=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),p.preventDefault(),!p.clipboardData)return;let[b,w]=e.ClipboardEventUtils.getTextData(p.clipboardData);b&&(w=w||r.INSTANCE.get(b),this._onPaste.fire({text:b,metadata:w}))})),this._register(this._textArea.onFocus(()=>{const p=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!p&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(this._textArea.onBlur(()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(this._textArea.onSyntheticTap(()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let o=0;return I.addDisposableListener(this._textArea.ownerDocument,"selectionchange",c=>{if(S.inputLatency.onSelectionChange(),!this._hasFocus||this._currentComposition||!this._browser.isChrome)return;const a=Date.now(),g=a-o;if(o=a,g<5)return;const h=a-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),h<100||!this._textAreaState.selection)return;const p=this._textArea.getValue();if(this._textAreaState.value!==p)return;const b=this._textArea.getSelectionStart(),w=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===b&&this._textAreaState.selectionEnd===w)return;const E=this._textAreaState.deduceEditorPosition(b),k=this._host.deduceModelPosition(E[0],E[1],E[2]),M=this._textAreaState.deduceEditorPosition(w),R=this._host.deduceModelPosition(M[0],M[1],M[2]),B=new n.Selection(k.lineNumber,k.column,R.lineNumber,R.column);this._onSelectionChangeRequest.fire(B)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(o){this._hasFocus!==o&&(this._hasFocus=o,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(o,c){this._hasFocus||(c=c.collapseSelection()),c.writeToTextArea(o,this._textArea,this._hasFocus),this._textAreaState=c}writeScreenReaderContent(o){this._currentComposition||this._setAndWriteTextAreaState(o,this._host.getScreenReaderContent())}_ensureClipboardGetsEditorSelection(o){const c=this._host.getDataToCopy(),a={version:1,isFromEmptySelection:c.isFromEmptySelection,multicursorText:c.multicursorText,mode:c.mode};r.INSTANCE.set(this._browser.isFirefox?c.text.replace(/\r\n/g,` -`):c.text,a),o.preventDefault(),o.clipboardData&&e.ClipboardEventUtils.setTextData(o.clipboardData,c.text,c.html,a)}}e.TextAreaInput=f,e.ClipboardEventUtils={getTextData(l){const o=l.getData(C.Mimes.text);let c=null;const a=l.getData("vscode-editor-data");if(typeof a=="string")try{c=JSON.parse(a),c.version!==1&&(c=null)}catch{}return o.length===0&&c===null&&l.files.length>0?[Array.prototype.slice.call(l.files,0).map(h=>h.name).join(` -`),null]:[o,c]},setTextData(l,o,c,a){l.setData(C.Mimes.text,o),typeof c=="string"&&l.setData("text/html",c),l.setData("vscode-editor-data",JSON.stringify(a))}};class d extends v.Disposable{get ownerDocument(){return this._actual.ownerDocument}constructor(o){super(),this._actual=o,this.onKeyDown=this._register(new y.DomEmitter(this._actual,"keydown")).event,this.onKeyUp=this._register(new y.DomEmitter(this._actual,"keyup")).event,this.onCompositionStart=this._register(new y.DomEmitter(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(new y.DomEmitter(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(new y.DomEmitter(this._actual,"compositionend")).event,this.onBeforeInput=this._register(new y.DomEmitter(this._actual,"beforeinput")).event,this.onInput=this._register(new y.DomEmitter(this._actual,"input")).event,this.onCut=this._register(new y.DomEmitter(this._actual,"cut")).event,this.onCopy=this._register(new y.DomEmitter(this._actual,"copy")).event,this.onPaste=this._register(new y.DomEmitter(this._actual,"paste")).event,this.onFocus=this._register(new y.DomEmitter(this._actual,"focus")).event,this.onBlur=this._register(new y.DomEmitter(this._actual,"blur")).event,this._onSyntheticTap=this._register(new _.Emitter),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(this.onKeyDown(()=>S.inputLatency.onKeyDown())),this._register(this.onBeforeInput(()=>S.inputLatency.onBeforeInput())),this._register(this.onInput(()=>S.inputLatency.onInput())),this._register(this.onKeyUp(()=>S.inputLatency.onKeyUp())),this._register(I.addDisposableListener(this._actual,t.Tap,()=>this._onSyntheticTap.fire()))}hasFocus(){const o=I.getShadowRoot(this._actual);return o?o.activeElement===this._actual:I.isInDOM(this._actual)?this._actual.ownerDocument.activeElement===this._actual:!1}setIgnoreSelectionChangeTime(o){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(o,c){const a=this._actual;a.value!==c&&(this.setIgnoreSelectionChangeTime("setValue"),a.value=c)}getSelectionStart(){return this._actual.selectionDirection==="backward"?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return this._actual.selectionDirection==="backward"?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(o,c,a){const g=this._actual;let h=null;const p=I.getShadowRoot(g);p?h=p.activeElement:h=g.ownerDocument.activeElement;const b=h===g,w=g.selectionStart,E=g.selectionEnd;if(b&&w===c&&E===a){L.isFirefox&&window.parent!==window&&g.focus();return}if(b){this.setIgnoreSelectionChangeTime("setSelectionRange"),g.setSelectionRange(c,a),L.isFirefox&&window.parent!==window&&g.focus();return}try{const k=I.saveParentsScrollTop(g);this.setIgnoreSelectionChangeTime("setSelectionRange"),g.focus(),g.setSelectionRange(c,a),I.restoreParentsScrollTop(g,k)}catch{}}}e.TextAreaWrapper=d}),define(te[592],ie([1,0,7,38,53]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewContentWidgets=void 0;class D extends y.ViewPart{constructor(i,n){super(i),this._viewDomNode=n,this._widgets={},this.domNode=(0,I.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,I.createFastDomNode)(document.createElement("div")),y.PartFingerprints.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].onConfigurationChanged(i);return!0}onDecorationsChanged(i){return!0}onFlushed(i){return!0}onLineMappingChanged(i){return this._updateAnchorsViewPositions(),!0}onLinesChanged(i){return this._updateAnchorsViewPositions(),!0}onLinesDeleted(i){return this._updateAnchorsViewPositions(),!0}onLinesInserted(i){return this._updateAnchorsViewPositions(),!0}onScrollChanged(i){return!0}onZonesChanged(i){return!0}_updateAnchorsViewPositions(){const i=Object.keys(this._widgets);for(const n of i)this._widgets[n].updateAnchorViewPosition()}addWidget(i){const n=new S(this._context,this._viewDomNode,i);this._widgets[n.id]=n,n.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(n.domNode):this.domNode.appendChild(n.domNode),this.setShouldRender()}setWidgetPosition(i,n,t,r,u){this._widgets[i.getId()].setPosition(n,t,r,u),this.setShouldRender()}removeWidget(i){const n=i.getId();if(this._widgets.hasOwnProperty(n)){const t=this._widgets[n];delete this._widgets[n];const r=t.domNode.domNode;r.parentNode.removeChild(r),r.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(i){return this._widgets.hasOwnProperty(i)?this._widgets[i].suppressMouseDown:!1}onBeforeRender(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].onBeforeRender(i)}prepareRender(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].prepareRender(i)}render(i){const n=Object.keys(this._widgets);for(const t of n)this._widgets[t].render(i)}}e.ViewContentWidgets=D;class S{constructor(i,n,t){this._primaryAnchor=new m(null,null),this._secondaryAnchor=new m(null,null),this._context=i,this._viewDomNode=n,this._actual=t,this.domNode=(0,I.createFastDomNode)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const r=this._context.configuration.options,u=r.get(143);this._fixedOverflowWidgets=r.get(42),this._contentWidth=u.contentWidth,this._contentLeft=u.contentLeft,this._lineHeight=r.get(66),this._affinity=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(i){const n=this._context.configuration.options;if(this._lineHeight=n.get(66),i.hasChanged(143)){const t=n.get(143);this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._maxWidth=this._getMaxWidth()}}updateAnchorViewPosition(){this._setPosition(this._affinity,this._primaryAnchor.modelPosition,this._secondaryAnchor.modelPosition)}_setPosition(i,n,t){this._affinity=i,this._primaryAnchor=r(n,this._context.viewModel,this._affinity),this._secondaryAnchor=r(t,this._context.viewModel,this._affinity);function r(u,f,d){if(!u)return new m(null,null);const l=f.model.validatePosition(u);if(f.coordinatesConverter.modelPositionIsVisible(l)){const o=f.coordinatesConverter.convertModelPositionToViewPosition(l,d??void 0);return new m(u,o)}return new m(u,null)}}_getMaxWidth(){const i=this.domNode.domNode.ownerDocument,n=i.defaultView;return this.allowEditorOverflow?n?.innerWidth||i.documentElement.offsetWidth||i.body.offsetWidth:this._contentWidth}setPosition(i,n,t,r){this._setPosition(r,i,n),this._preference=t,this._primaryAnchor.viewPosition&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(i,n,t,r){const u=i.top,f=u,d=i.top+i.height,l=r.viewportHeight-d,o=u-t,c=f>=t,a=d,g=l>=t;let h=i.left;return h+n>r.scrollLeft+r.viewportWidth&&(h=r.scrollLeft+r.viewportWidth-n),ho){const h=g-(o-r);g-=h,t-=h}if(g=E,R=h+t<=p.height-k;return this._fixedOverflowWidgets?{fitsAbove:M,aboveTop:Math.max(g,E),fitsBelow:R,belowTop:h,left:w}:{fitsAbove:M,aboveTop:d,fitsBelow:R,belowTop:l,left:b}}_prepareRenderWidgetAtExactPositionOverflowing(i){return new _(i.top,i.left+this._contentLeft)}_getAnchorsCoordinates(i){var n,t;const r=d(this._primaryAnchor.viewPosition,this._affinity,this._lineHeight),u=((n=this._secondaryAnchor.viewPosition)===null||n===void 0?void 0:n.lineNumber)===((t=this._primaryAnchor.viewPosition)===null||t===void 0?void 0:t.lineNumber)?this._secondaryAnchor.viewPosition:null,f=d(u,this._affinity,this._lineHeight);return{primary:r,secondary:f};function d(l,o,c){if(!l)return null;const a=i.visibleRangeForPosition(l);if(!a)return null;const g=l.column===1&&o===3?0:a.left,h=i.getVerticalOffsetForLineNumber(l.lineNumber)-i.scrollTop;return new v(h,g,c)}}_reduceAnchorCoordinates(i,n,t){if(!n)return i;const r=this._context.configuration.options.get(50);let u=n.left;return ui.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(i){this._renderData=this._prepareRenderWidget(i)}render(i){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&C(this._actual.afterRender,this._actual,null);return}this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+i.scrollTop-i.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),typeof this._actual.afterRender=="function"&&C(this._actual.afterRender,this._actual,this._renderData.position)}}class m{constructor(i,n){this.modelPosition=i,this.viewPosition=n}}class _{constructor(i,n){this.top=i,this.left=n,this._coordinateBrand=void 0}}class v{constructor(i,n,t){this.top=i,this.left=n,this.height=t,this._anchorCoordinateBrand=void 0}}function C(s,i,...n){try{return s.call(i,...n)}catch{return null}}}),define(te[593],ie([1,0,14,9,2]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeEditorContributions=void 0;class D extends y.Disposable{constructor(){super(),this._editor=null,this._instantiationService=null,this._instances=this._register(new y.DisposableMap),this._pending=new Map,this._finishedInstantiation=[],this._finishedInstantiation[0]=!1,this._finishedInstantiation[1]=!1,this._finishedInstantiation[2]=!1,this._finishedInstantiation[3]=!1}initialize(m,_,v){this._editor=m,this._instantiationService=v;for(const C of _){if(this._pending.has(C.id)){(0,I.onUnexpectedError)(new Error(`Cannot have two contributions with the same id ${C.id}`));continue}this._pending.set(C.id,C)}this._instantiateSome(0),this._register((0,L.runWhenIdle)(()=>{this._instantiateSome(1)})),this._register((0,L.runWhenIdle)(()=>{this._instantiateSome(2)})),this._register((0,L.runWhenIdle)(()=>{this._instantiateSome(3)},5e3))}saveViewState(){const m={};for(const[_,v]of this._instances)typeof v.saveViewState=="function"&&(m[_]=v.saveViewState());return m}restoreViewState(m){for(const[_,v]of this._instances)typeof v.restoreViewState=="function"&&v.restoreViewState(m[_])}get(m){return this._instantiateById(m),this._instances.get(m)||null}onBeforeInteractionEvent(){this._instantiateSome(2)}onAfterModelAttached(){this._register((0,L.runWhenIdle)(()=>{this._instantiateSome(1)},50))}_instantiateSome(m){if(this._finishedInstantiation[m])return;this._finishedInstantiation[m]=!0;const _=this._findPendingContributionsByInstantiation(m);for(const v of _)this._instantiateById(v.id)}_findPendingContributionsByInstantiation(m){const _=[];for(const[,v]of this._pending)v.instantiation===m&&_.push(v);return _}_instantiateById(m){const _=this._pending.get(m);if(_){if(this._pending.delete(m),!this._instantiationService||!this._editor)throw new Error("Cannot instantiate contributions before being initialized!");try{const v=this._instantiationService.createInstance(_.ctor,this._editor);this._instances.set(_.id,v),typeof v.restoreViewState=="function"&&_.instantiation!==0&&console.warn(`Editor contribution '${_.id}' should be eager instantiated because it uses saveViewState / restoreViewState.`)}catch(v){(0,I.onUnexpectedError)(v)}}}}e.CodeEditorContributions=D}),define(te[594],ie([1,0,152,2,40]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorSash=void 0;class D extends I.Disposable{constructor(m,_,v){super(),this._options=m,this._domNode=_,this._dimensions=v,this._sashRatio=(0,y.observableValue)(this,void 0),this.sashLeft=(0,y.derived)(this,C=>{var s;const i=(s=this._sashRatio.read(C))!==null&&s!==void 0?s:this._options.splitViewDefaultRatio.read(C);return this._computeSashLeft(i,C)}),this._sash=this._register(new L.Sash(this._domNode,{getVerticalSashTop:C=>0,getVerticalSashLeft:C=>this.sashLeft.get(),getVerticalSashHeight:C=>this._dimensions.height.get()},{orientation:0})),this._startSashPosition=void 0,this._register(this._sash.onDidStart(()=>{this._startSashPosition=this.sashLeft.get()})),this._register(this._sash.onDidChange(C=>{const s=this._dimensions.width.get(),i=this._computeSashLeft((this._startSashPosition+(C.currentX-C.startX))/s,void 0);this._sashRatio.set(i/s,void 0)})),this._register(this._sash.onDidEnd(()=>this._sash.layout())),this._register(this._sash.onDidReset(()=>this._sashRatio.set(void 0,void 0))),this._register((0,y.autorun)(C=>{const s=this._options.enableSplitViewResizing.read(C);this._sash.state=s?3:0,this.sashLeft.read(C),this._dimensions.height.read(C),this._sash.layout()}))}setBoundarySashes(m){this._sash.orthogonalEndSash=m.bottom}_computeSashLeft(m,_){const v=this._dimensions.width.read(_),C=Math.floor(this._options.splitViewDefaultRatio.read(_)*v),s=this._options.enableSplitViewResizing.read(_)?Math.floor(m*v):C,i=100;return v<=i*2?C:sv-i?v-i:s}}e.DiffEditorSash=D}),define(te[100],ie([1,0,19,572,2,40,269]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DisposableCancellationTokenSource=e.applyViewZones=e.observeHotReloadableExports=e.readHotReloadableExport=e.applyStyle=e.ManagedOverlayWidget=e.PlaceholderViewZone=e.ViewZoneOverlayWidget=e.animatedObservable=e.ObservableElementSizeObserver=e.appendRemoveOnDispose=e.applyObservableDecorations=e.joinCombine=void 0;function m(c,a,g,h){if(c.length===0)return a;if(a.length===0)return c;const p=[];let b=0,w=0;for(;bR?(p.push(k),w++):(p.push(h(E,k)),b++,w++)}for(;b`Apply decorations from ${a.debugName}`},p=>{const b=a.read(p);h.set(b)})),g.add({dispose:()=>{h.clear()}}),g}e.applyObservableDecorations=_;function v(c,a){return c.appendChild(a),(0,y.toDisposable)(()=>{c.removeChild(a)})}e.appendRemoveOnDispose=v;class C extends y.Disposable{get width(){return this._width}get height(){return this._height}constructor(a,g){super(),this.elementSizeObserver=this._register(new S.ElementSizeObserver(a,g)),this._width=(0,D.observableValue)(this,this.elementSizeObserver.getWidth()),this._height=(0,D.observableValue)(this,this.elementSizeObserver.getHeight()),this._register(this.elementSizeObserver.onDidChange(h=>(0,D.transaction)(p=>{this._width.set(this.elementSizeObserver.getWidth(),p),this._height.set(this.elementSizeObserver.getHeight(),p)})))}observe(a){this.elementSizeObserver.observe(a)}setAutomaticLayout(a){a?this.elementSizeObserver.startObserving():this.elementSizeObserver.stopObserving()}}e.ObservableElementSizeObserver=C;function s(c,a){let g=c.get(),h=g,p=g;const b=(0,D.observableValue)("animatedValue",g);let w=-1;const E=300;let k;a.add((0,D.autorunHandleChanges)({createEmptyChangeSummary:()=>({animate:!1}),handleChange:(R,B)=>(R.didChange(c)&&(B.animate=B.animate||R.change),!0)},(R,B)=>{k!==void 0&&(cancelAnimationFrame(k),k=void 0),h=p,g=c.read(R),w=Date.now()-(B.animate?0:E),M()}));function M(){const R=Date.now()-w;p=Math.floor(i(R,h,g-h,E)),R{this._actualTop.set(h,void 0)},this.onComputedHeight=h=>{this._actualHeight.set(h,void 0)}}}e.PlaceholderViewZone=t;class r{constructor(a,g){this._editor=a,this._domElement=g,this._overlayWidgetId=`managedOverlayWidget-${r._counter++}`,this._overlayWidget={getId:()=>this._overlayWidgetId,getDomNode:()=>this._domElement,getPosition:()=>null},this._editor.addOverlayWidget(this._overlayWidget)}dispose(){this._editor.removeOverlayWidget(this._overlayWidget)}}e.ManagedOverlayWidget=r,r._counter=0;function u(c,a){return(0,D.autorun)(g=>{for(let[h,p]of Object.entries(a))p&&typeof p=="object"&&"read"in p&&(p=p.read(g)),typeof p=="number"&&(p=`${p}px`),h=h.replace(/[A-Z]/g,b=>"-"+b.toLowerCase()),c.style[h]=p})}e.applyStyle=u;function f(c,a){return d([c],a),c}e.readHotReloadableExport=f;function d(c,a){(0,I.isHotReloadEnabled)()&&(0,D.observableSignalFromEvent)("reload",h=>(0,I.registerHotReloadHandler)(p=>{if([...Object.values(p)].some(b=>c.includes(b)))return b=>(h(void 0),!0)})).read(a)}e.observeHotReloadableExports=d;function l(c,a,g){const h=new y.DisposableStore,p=[];return h.add((0,D.autorun)(b=>{const w=a.read(b),E=new Map,k=new Map;g&&g(!0),c.changeViewZones(M=>{for(const R of p)M.removeZone(R);p.length=0;for(const R of w){const B=M.addZone(R);p.push(B),E.set(R,B)}}),g&&g(!1),h.add((0,D.autorunHandleChanges)({createEmptyChangeSummary(){return[]},handleChange(M,R){const B=k.get(M.changedObservable);return B!==void 0&&R.push(B),!0}},(M,R)=>{for(const B of w)B.onChange&&(k.set(B.onChange,E.get(B)),B.onChange.read(M));g&&g(!0),c.changeViewZones(B=>{for(const T of R)B.layoutZone(T)}),g&&g(!1)}))})),h.add({dispose(){g&&g(!0),c.changeViewZones(b=>{for(const w of p)b.removeZone(w)}),g&&g(!1)}}),h}e.applyViewZones=l;class o extends L.CancellationTokenSource{dispose(){super.dispose(!0)}}e.DisposableCancellationTokenSource=o}),define(te[101],ie([1,0,10,17,138]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StringBuilder=e.decodeUTF16LE=e.getPlatformTextDecoder=void 0;let D;function S(){return D||(D=new TextDecoder("UTF-16LE")),D}let m;function _(){return m||(m=new TextDecoder("UTF-16BE")),m}let v;function C(){return v||(v=I.isLittleEndian()?S():_()),v}e.getPlatformTextDecoder=C;function s(t,r,u){const f=new Uint16Array(t.buffer,r,u);return u>0&&(f[0]===65279||f[0]===65534)?i(t,r,u):S().decode(f)}e.decodeUTF16LE=s;function i(t,r,u){const f=[];let d=0;for(let l=0;l=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=r;return}for(let f=0;fr});class v{static create(){return new v}constructor(){}createLineBreaksComputer(u,f,d,l,o){const c=[],a=[];return{addRequest:(g,h,p)=>{c.push(g),a.push(h)},finalize:()=>C(c,u,f,d,l,o,a)}}}e.DOMLineBreaksComputerFactory=v;function C(r,u,f,d,l,o,c){var a;function g(U){const F=c[U];if(F){const G=m.LineInjectedText.applyInjectedText(r[U],F),Y=F.map(se=>se.options),ne=F.map(se=>se.column-1);return new S.ModelLineProjectionData(ne,Y,[G.length],[],0)}else return null}if(d===-1){const U=[];for(let F=0,G=r.length;Fh?(G=0,Y=0):ne=h-q}const se=F.substr(G),J=s(se,Y,f,ne,k,w);M[U]=G,R[U]=Y,B[U]=se,T[U]=J[0],N[U]=J[1]}const A=k.build(),P=(a=_?.createHTML(A))!==null&&a!==void 0?a:A;E.innerHTML=P,E.style.position="absolute",E.style.top="10000",o==="keepAll"?(E.style.wordBreak="keep-all",E.style.overflowWrap="anywhere"):(E.style.wordBreak="inherit",E.style.overflowWrap="break-word"),document.body.appendChild(E);const O=document.createRange(),x=Array.prototype.slice.call(E.children,0),W=[];for(let U=0;UZ.options),H=V.map(Z=>Z.column-1)):(q=null,H=null),W[U]=new S.ModelLineProjectionData(H,q,G,J,ne)}return document.body.removeChild(E),W}function s(r,u,f,d,l,o){if(o!==0){const w=String(o);l.appendString('
    ');const c=r.length;let a=u,g=0;const h=[],p=[];let b=0");for(let w=0;w"),h[w]=g,p[w]=a;const E=b;b=w+1"),h[r.length]=g,p[r.length]=a,l.appendString("
    "),[h,p]}function i(r,u,f,d){if(f.length<=1)return null;const l=Array.prototype.slice.call(u.children,0),o=[];try{n(r,l,d,0,null,f.length-1,null,o)}catch(c){return console.log(c),null}return o.length===0?null:(o.push(f.length),o)}function n(r,u,f,d,l,o,c,a){if(d===o||(l=l||t(r,u,f[d],f[d+1]),c=c||t(r,u,f[o],f[o+1]),Math.abs(l[0].top-c[0].top)<=.1))return;if(d+1===o){a.push(o);return}const g=d+(o-d)/2|0,h=t(r,u,f[g],f[g+1]);n(r,u,f,d,l,g,h,a),n(r,u,f,g,h,o,c,a)}function t(r,u,f,d){return r.setStart(u[f/16384|0].firstChild,f%16384),r.setEnd(u[d/16384|0].firstChild,d%16384),r.getClientRects()}}),define(te[229],ie([1,0,38,90,9,101]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VisibleLinesCollection=e.RenderedLinesCollection=void 0;class S{constructor(C){this._createLine=C,this._set(1,[])}flush(){this._set(1,[])}_set(C,s){this._lines=s,this._rendLineNumberStart=C}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(C){const s=C-this._rendLineNumberStart;if(s<0||s>=this._lines.length)throw new y.BugIndicatingError("Illegal value for lineNumber");return this._lines[s]}onLinesDeleted(C,s){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(sn)return null;let t=0,r=0;for(let f=i;f<=n;f++){const d=f-this._rendLineNumberStart;C<=f&&f<=s&&(r===0?(t=d,r=1):r++)}if(C=n&&u<=t&&(this._lines[u-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(C,s){if(this.getCount()===0)return null;const i=s-C+1,n=this.getStartLineNumber(),t=this.getEndLineNumber();if(C<=n)return this._rendLineNumberStart+=i,null;if(C>t)return null;if(i+C>t)return this._lines.splice(C-this._rendLineNumberStart,t-C+1);const r=[];for(let o=0;oi)continue;const f=Math.max(s,u.fromLineNumber),d=Math.min(i,u.toLineNumber);for(let l=f;l<=d;l++){const o=l-this._rendLineNumberStart;this._lines[o].onTokensChanged(),n=!0}}return n}}e.RenderedLinesCollection=S;class m{constructor(C){this._host=C,this.domNode=this._createDomNode(),this._linesCollection=new S(()=>this._host.createVisibleLine())}_createDomNode(){const C=(0,L.createFastDomNode)(document.createElement("div"));return C.setClassName("view-layer"),C.setPosition("absolute"),C.domNode.setAttribute("role","presentation"),C.domNode.setAttribute("aria-hidden","true"),C}onConfigurationChanged(C){return!!C.hasChanged(143)}onFlushed(C){return this._linesCollection.flush(),!0}onLinesChanged(C){return this._linesCollection.onLinesChanged(C.fromLineNumber,C.count)}onLinesDeleted(C){const s=this._linesCollection.onLinesDeleted(C.fromLineNumber,C.toLineNumber);if(s)for(let i=0,n=s.length;is){const r=s,u=Math.min(i,t.rendLineNumberStart-1);r<=u&&(this._insertLinesBefore(t,r,u,n,s),t.linesLength+=u-r+1)}else if(t.rendLineNumberStart0&&(this._removeLinesBefore(t,r),t.linesLength-=r)}if(t.rendLineNumberStart=s,t.rendLineNumberStart+t.linesLength-1i){const r=Math.max(0,i-t.rendLineNumberStart+1),f=t.linesLength-1-r+1;f>0&&(this._removeLinesAfter(t,f),t.linesLength-=f)}return this._finishRendering(t,!1,n),t}_renderUntouchedLines(C,s,i,n,t){const r=C.rendLineNumberStart,u=C.lines;for(let f=s;f<=i;f++){const d=r+f;u[f].layoutLine(d,n[d-t])}}_insertLinesBefore(C,s,i,n,t){const r=[];let u=0;for(let f=s;f<=i;f++)r[u++]=this.host.createVisibleLine();C.lines=r.concat(C.lines)}_removeLinesBefore(C,s){for(let i=0;i=0;u--){const f=C.lines[u];n[u]&&(f.setDomNode(r),r=r.previousSibling)}}_finishRenderingInvalidLines(C,s,i){const n=document.createElement("div");_._ttPolicy&&(s=_._ttPolicy.createHTML(s)),n.innerHTML=s;for(let t=0;tv}),_._sb=new D.StringBuilder(1e5)}),define(te[596],ie([1,0,38,70,229,53]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginViewOverlays=e.ContentViewOverlays=e.ViewOverlayLine=e.ViewOverlays=void 0;class S extends D.ViewPart{constructor(s){super(s),this._visibleLines=new y.VisibleLinesCollection(this),this.domNode=this._visibleLines.domNode;const n=this._context.configuration.options.get(50);(0,I.applyFontInfo)(this.domNode,n),this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let s=0,i=this._dynamicOverlays.length;sn.shouldRender());for(let n=0,t=i.length;n'),t.appendString(r),t.appendString(""),!0)}layoutLine(s,i){this._domNode&&(this._domNode.setTop(i),this._domNode.setHeight(this._lineHeight))}}e.ViewOverlayLine=m;class _ extends S{constructor(s){super(s);const n=this._context.configuration.options.get(143);this._contentWidth=n.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(s){const n=this._context.configuration.options.get(143);return this._contentWidth=n.contentWidth,super.onConfigurationChanged(s)||!0}onScrollChanged(s){return super.onScrollChanged(s)||s.scrollWidthChanged}_viewOverlaysRender(s){super._viewOverlaysRender(s),this.domNode.setWidth(Math.max(s.scrollWidth,this._contentWidth))}}e.ContentViewOverlays=_;class v extends S{constructor(s){super(s);const i=this._context.configuration.options,n=i.get(143);this._contentLeft=n.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,I.applyFontInfo)(this.domNode,i.get(50))}onConfigurationChanged(s){const i=this._context.configuration.options;(0,I.applyFontInfo)(this.domNode,i.get(50));const n=i.get(143);return this._contentLeft=n.contentLeft,super.onConfigurationChanged(s)||!0}onScrollChanged(s){return super.onScrollChanged(s)||s.scrollHeightChanged}_viewOverlaysRender(s){super._viewOverlaysRender(s);const i=Math.min(s.scrollHeight,1e6);this.domNode.setHeight(i),this.domNode.setWidth(this._contentLeft)}}e.MarginViewOverlays=v}),define(te[323],ie([1,0,138,101]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compressConsecutiveTextChanges=e.TextChange=void 0;function y(_){return _.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class D{get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}constructor(v,C,s,i){this.oldPosition=v,this.oldText=C,this.newPosition=s,this.newText=i}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${y(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${y(this.oldText)}")`:`(replace@${this.oldPosition} "${y(this.oldText)}" with "${y(this.newText)}")`}static _writeStringSize(v){return 4+2*v.length}static _writeString(v,C,s){const i=C.length;L.writeUInt32BE(v,i,s),s+=4;for(let n=0;ns&&(s=n)}return s}else{if(typeof D=="string")return _?D==="*"?5:D===m?10:0:0;if(D){const{language:s,pattern:i,scheme:n,hasAccessToAllModels:t,notebookType:r}=D;if(!_&&!t)return 0;r&&v&&(S=v);let u=0;if(n)if(n===S.scheme)u=10;else if(n==="*")u=5;else return 0;if(s)if(s===m)u=10;else if(s==="*")u=Math.max(u,5);else return 0;if(r)if(r===C)u=10;else if(r==="*"&&C!==void 0)u=Math.max(u,5);else return 0;if(i){let f;if(typeof i=="string"?f=i:f=Object.assign(Object.assign({},i),{base:(0,I.normalize)(i.base)}),f===S.fsPath||(0,L.match)(f,S.fsPath))u=10;else return 0}return u}else return 0}}e.score=y}),define(te[598],ie([1,0,6,2,49,597]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureRegistry=void 0;function S(C){return typeof C=="string"?!1:Array.isArray(C)?C.every(S):!!C.exclusive}class m{constructor(s,i,n,t){this.uri=s,this.languageId=i,this.notebookUri=n,this.notebookType=t}equals(s){var i,n;return this.notebookType===s.notebookType&&this.languageId===s.languageId&&this.uri.toString()===s.uri.toString()&&((i=this.notebookUri)===null||i===void 0?void 0:i.toString())===((n=s.notebookUri)===null||n===void 0?void 0:n.toString())}}class _{constructor(s){this._notebookInfoResolver=s,this._clock=0,this._entries=[],this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event}register(s,i){let n={selector:s,provider:i,_score:-1,_time:this._clock++};return this._entries.push(n),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),(0,I.toDisposable)(()=>{if(n){const t=this._entries.indexOf(n);t>=0&&(this._entries.splice(t,1),this._lastCandidate=void 0,this._onDidChange.fire(this._entries.length),n=void 0)}})}has(s){return this.all(s).length>0}all(s){if(!s)return[];this._updateScores(s);const i=[];for(const n of this._entries)n._score>0&&i.push(n.provider);return i}ordered(s){const i=[];return this._orderedForEach(s,n=>i.push(n.provider)),i}orderedGroups(s){const i=[];let n,t;return this._orderedForEach(s,r=>{n&&t===r._score?n.push(r.provider):(t=r._score,n=[r.provider],i.push(n))}),i}_orderedForEach(s,i){this._updateScores(s);for(const n of this._entries)n._score>0&&i(n)}_updateScores(s){var i,n;const t=(i=this._notebookInfoResolver)===null||i===void 0?void 0:i.call(this,s.uri),r=t?new m(s.uri,s.getLanguageId(),t.uri,t.type):new m(s.uri,s.getLanguageId(),void 0,void 0);if(!(!((n=this._lastCandidate)===null||n===void 0)&&n.equals(r))){this._lastCandidate=r;for(const u of this._entries)if(u._score=(0,D.score)(u.selector,r.uri,r.languageId,(0,y.shouldSynchronizeModel)(s),r.notebookUri,r.notebookType),S(u.selector)&&u._score>0){for(const f of this._entries)f._score=0;u._score=1e3;break}this._entries.sort(_._compareByScoreAndTime)}}static _compareByScoreAndTime(s,i){return s._scorei._score?-1:v(s.selector)&&!v(i.selector)?1:!v(s.selector)&&v(i.selector)?-1:s._timei._time?-1:0}}e.LanguageFeatureRegistry=_;function v(C){return typeof C=="string"?!1:Array.isArray(C)?C.some(v):!!C.isBuiltin}}),define(te[230],ie([1,0,10,101,5]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketsUtils=e.RichEditBrackets=e.RichEditBracket=void 0;class D{constructor(o,c,a,g,h,p){this._richEditBracketBrand=void 0,this.languageId=o,this.index=c,this.open=a,this.close=g,this.forwardRegex=h,this.reversedRegex=p,this._openSet=D._toSet(this.open),this._closeSet=D._toSet(this.close)}isOpen(o){return this._openSet.has(o)}isClose(o){return this._closeSet.has(o)}static _toSet(o){const c=new Set;for(const a of o)c.add(a);return c}}e.RichEditBracket=D;function S(l){const o=l.length;l=l.map(p=>[p[0].toLowerCase(),p[1].toLowerCase()]);const c=[];for(let p=0;p{const[w,E]=p,[k,M]=b;return w===k||w===M||E===k||E===M},g=(p,b)=>{const w=Math.min(p,b),E=Math.max(p,b);for(let k=0;k0&&h.push({open:b,close:w})}return h}class m{constructor(o,c){this._richEditBracketsBrand=void 0;const a=S(c);this.brackets=a.map((g,h)=>new D(o,h,g.open,g.close,s(g.open,g.close,a,h),i(g.open,g.close,a,h))),this.forwardRegex=n(this.brackets),this.reversedRegex=t(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const g of this.brackets){for(const h of g.open)this.textIsBracket[h]=g,this.textIsOpenBracket[h]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,h.length);for(const h of g.close)this.textIsBracket[h]=g,this.textIsOpenBracket[h]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,h.length)}}}e.RichEditBrackets=m;function _(l,o,c,a){for(let g=0,h=o.length;g=0&&a.push(b);for(const b of p.close)b.indexOf(l)>=0&&a.push(b)}}function v(l,o){return l.length-o.length}function C(l){if(l.length<=1)return l;const o=[],c=new Set;for(const a of l)c.has(a)||(o.push(a),c.add(a));return o}function s(l,o,c,a){let g=[];g=g.concat(l),g=g.concat(o);for(let h=0,p=g.length;h=0;p--)g[h++]=a.charCodeAt(p);return I.getPlatformTextDecoder().decode(g)}let o=null,c=null;return function(g){return o!==g&&(o=g,c=l(o)),c}}();class d{static _findPrevBracketInText(o,c,a,g){const h=a.match(o);if(!h)return null;const p=a.length-(h.index||0),b=h[0].length,w=g+p;return new y.Range(c,w-b+1,c,w+1)}static findPrevBracketInRange(o,c,a,g,h){const b=f(a).substring(a.length-h,a.length-g);return this._findPrevBracketInText(o,c,b,g)}static findNextBracketInText(o,c,a,g){const h=a.match(o);if(!h)return null;const p=h.index||0,b=h[0].length;if(b===0)return null;const w=g+p;return new y.Range(c,w+1,c,w+1+b)}static findNextBracketInRange(o,c,a,g,h){const p=a.substring(g,h);return this.findNextBracketInText(o,c,p,g)}}e.BracketsUtils=d}),define(te[599],ie([1,0,13,125,230]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketElectricCharacterSupport=void 0;class D{constructor(m){this._richEditBrackets=m}getElectricCharacters(){const m=[];if(this._richEditBrackets)for(const _ of this._richEditBrackets.brackets)for(const v of _.close){const C=v.charAt(v.length-1);m.push(C)}return(0,L.distinct)(m)}onElectricCharacter(m,_,v){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const C=_.findTokenIndexAtOffset(v-1);if((0,I.ignoreBracketsInToken)(_.getStandardTokenType(C)))return null;const s=this._richEditBrackets.reversedRegex,i=_.getLineContent().substring(0,v-1)+m,n=y.BracketsUtils.findPrevBracketInRange(s,1,i,0,i.length);if(!n)return null;const t=i.substring(n.startColumn-1,n.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[t])return null;const u=_.getActualLineContentBefore(n.startColumn-1);return/^\s*$/.test(u)?{matchOpenBracket:t}:null}}e.BracketElectricCharacterSupport=D}),define(te[600],ie([1,0,13,6,2,5,125,230,517]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketPairsTextModelPart=void 0;class v extends y.Disposable{get canBuildAST(){return this.textModel.getValueLength()<=5e6}constructor(r,u){super(),this.textModel=r,this.languageConfigurationService=u,this.bracketPairsTree=this._register(new y.MutableDisposable),this.onDidChangeEmitter=new I.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange(f=>{var d;(!f.languageId||!((d=this.bracketPairsTree.value)===null||d===void 0)&&d.object.didLanguageChange(f.languageId))&&(this.bracketPairsTree.clear(),this.updateBracketPairsTree())}))}handleDidChangeOptions(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(r){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(r){var u;(u=this.bracketPairsTree.value)===null||u===void 0||u.object.handleContentChanged(r)}handleDidChangeBackgroundTokenizationState(){var r;(r=this.bracketPairsTree.value)===null||r===void 0||r.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(r){var u;(u=this.bracketPairsTree.value)===null||u===void 0||u.object.handleDidChangeTokens(r)}updateBracketPairsTree(){if(this.bracketsRequested&&this.canBuildAST){if(!this.bracketPairsTree.value){const r=new y.DisposableStore;this.bracketPairsTree.value=C(r.add(new _.BracketPairsTree(this.textModel,u=>this.languageConfigurationService.getLanguageConfiguration(u))),r),r.add(this.bracketPairsTree.value.object.onDidChange(u=>this.onDidChangeEmitter.fire(u))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire())}getBracketPairsInRange(r){var u;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(r,!1))||L.CallbackIterable.empty}getBracketPairsInRangeWithMinIndentation(r){var u;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getBracketPairsInRange(r,!0))||L.CallbackIterable.empty}getBracketsInRange(r,u=!1){var f;return this.bracketsRequested=!0,this.updateBracketPairsTree(),((f=this.bracketPairsTree.value)===null||f===void 0?void 0:f.object.getBracketsInRange(r,u))||L.CallbackIterable.empty}findMatchingBracketUp(r,u,f){const d=this.textModel.validatePosition(u),l=this.textModel.getLanguageIdAtPosition(d.lineNumber,d.column);if(this.canBuildAST){const o=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew.getClosingBracketInfo(r);if(!o)return null;const c=this.getBracketPairsInRange(D.Range.fromPositions(u,u)).findLast(a=>o.closes(a.openingBracketInfo));return c?c.openingBracketRange:null}else{const o=r.toLowerCase(),c=this.languageConfigurationService.getLanguageConfiguration(l).brackets;if(!c)return null;const a=c.textIsBracket[o];return a?n(this._findMatchingBracketUp(a,d,s(f))):null}}matchBracket(r,u){if(this.canBuildAST){const f=this.getBracketPairsInRange(D.Range.fromPositions(r,r)).filter(d=>d.closingBracketRange!==void 0&&(d.openingBracketRange.containsPosition(r)||d.closingBracketRange.containsPosition(r))).findLastMaxBy((0,L.compareBy)(d=>d.openingBracketRange.containsPosition(r)?d.openingBracketRange:d.closingBracketRange,D.Range.compareRangesUsingStarts));return f?[f.openingBracketRange,f.closingBracketRange]:null}else{const f=s(u);return this._matchBracket(this.textModel.validatePosition(r),f)}}_establishBracketSearchOffsets(r,u,f,d){const l=u.getCount(),o=u.getLanguageId(d);let c=Math.max(0,r.column-1-f.maxBracketLength);for(let g=d-1;g>=0;g--){const h=u.getEndOffset(g);if(h<=c)break;if((0,S.ignoreBracketsInToken)(u.getStandardTokenType(g))||u.getLanguageId(g)!==o){c=h;break}}let a=Math.min(u.getLineContent().length,r.column-1+f.maxBracketLength);for(let g=d+1;g=a)break;if((0,S.ignoreBracketsInToken)(u.getStandardTokenType(g))||u.getLanguageId(g)!==o){a=h;break}}return{searchStartOffset:c,searchEndOffset:a}}_matchBracket(r,u){const f=r.lineNumber,d=this.textModel.tokenization.getLineTokens(f),l=this.textModel.getLineContent(f),o=d.findTokenIndexAtOffset(r.column-1);if(o<0)return null;const c=this.languageConfigurationService.getLanguageConfiguration(d.getLanguageId(o)).brackets;if(c&&!(0,S.ignoreBracketsInToken)(d.getStandardTokenType(o))){let{searchStartOffset:a,searchEndOffset:g}=this._establishBracketSearchOffsets(r,d,c,o),h=null;for(;;){const p=m.BracketsUtils.findNextBracketInRange(c.forwardRegex,f,l,a,g);if(!p)break;if(p.startColumn<=r.column&&r.column<=p.endColumn){const b=l.substring(p.startColumn-1,p.endColumn-1).toLowerCase(),w=this._matchFoundBracket(p,c.textIsBracket[b],c.textIsOpenBracket[b],u);if(w){if(w instanceof i)return null;h=w}}a=p.endColumn-1}if(h)return h}if(o>0&&d.getStartOffset(o)===r.column-1){const a=o-1,g=this.languageConfigurationService.getLanguageConfiguration(d.getLanguageId(a)).brackets;if(g&&!(0,S.ignoreBracketsInToken)(d.getStandardTokenType(a))){const{searchStartOffset:h,searchEndOffset:p}=this._establishBracketSearchOffsets(r,d,g,a),b=m.BracketsUtils.findPrevBracketInRange(g.reversedRegex,f,l,h,p);if(b&&b.startColumn<=r.column&&r.column<=b.endColumn){const w=l.substring(b.startColumn-1,b.endColumn-1).toLowerCase(),E=this._matchFoundBracket(b,g.textIsBracket[w],g.textIsOpenBracket[w],u);if(E)return E instanceof i?null:E}}}return null}_matchFoundBracket(r,u,f,d){if(!u)return null;const l=f?this._findMatchingBracketDown(u,r.getEndPosition(),d):this._findMatchingBracketUp(u,r.getStartPosition(),d);return l?l instanceof i?l:[r,l]:null}_findMatchingBracketUp(r,u,f){const d=r.languageId,l=r.reversedRegex;let o=-1,c=0;const a=(g,h,p,b)=>{for(;;){if(f&&++c%100===0&&!f())return i.INSTANCE;const w=m.BracketsUtils.findPrevBracketInRange(l,g,h,p,b);if(!w)break;const E=h.substring(w.startColumn-1,w.endColumn-1).toLowerCase();if(r.isOpen(E)?o++:r.isClose(E)&&o--,o===0)return w;b=w.startColumn-1}return null};for(let g=u.lineNumber;g>=1;g--){const h=this.textModel.tokenization.getLineTokens(g),p=h.getCount(),b=this.textModel.getLineContent(g);let w=p-1,E=b.length,k=b.length;g===u.lineNumber&&(w=h.findTokenIndexAtOffset(u.column-1),E=u.column-1,k=u.column-1);let M=!0;for(;w>=0;w--){const R=h.getLanguageId(w)===d&&!(0,S.ignoreBracketsInToken)(h.getStandardTokenType(w));if(R)M?E=h.getStartOffset(w):(E=h.getStartOffset(w),k=h.getEndOffset(w));else if(M&&E!==k){const B=a(g,b,E,k);if(B)return B}M=R}if(M&&E!==k){const R=a(g,b,E,k);if(R)return R}}return null}_findMatchingBracketDown(r,u,f){const d=r.languageId,l=r.forwardRegex;let o=1,c=0;const a=(h,p,b,w)=>{for(;;){if(f&&++c%100===0&&!f())return i.INSTANCE;const E=m.BracketsUtils.findNextBracketInRange(l,h,p,b,w);if(!E)break;const k=p.substring(E.startColumn-1,E.endColumn-1).toLowerCase();if(r.isOpen(k)?o++:r.isClose(k)&&o--,o===0)return E;b=E.endColumn-1}return null},g=this.textModel.getLineCount();for(let h=u.lineNumber;h<=g;h++){const p=this.textModel.tokenization.getLineTokens(h),b=p.getCount(),w=this.textModel.getLineContent(h);let E=0,k=0,M=0;h===u.lineNumber&&(E=p.findTokenIndexAtOffset(u.column-1),k=u.column-1,M=u.column-1);let R=!0;for(;E=1;c--){const a=this.textModel.tokenization.getLineTokens(c),g=a.getCount(),h=this.textModel.getLineContent(c);let p=g-1,b=h.length,w=h.length;if(c===f.lineNumber){p=a.findTokenIndexAtOffset(f.column-1),b=f.column-1,w=f.column-1;const k=a.getLanguageId(p);d!==k&&(d=k,l=this.languageConfigurationService.getLanguageConfiguration(d).brackets,o=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew)}let E=!0;for(;p>=0;p--){const k=a.getLanguageId(p);if(d!==k){if(l&&o&&E&&b!==w){const R=m.BracketsUtils.findPrevBracketInRange(l.reversedRegex,c,h,b,w);if(R)return this._toFoundBracket(o,R);E=!1}d=k,l=this.languageConfigurationService.getLanguageConfiguration(d).brackets,o=this.languageConfigurationService.getLanguageConfiguration(d).bracketsNew}const M=!!l&&!(0,S.ignoreBracketsInToken)(a.getStandardTokenType(p));if(M)E?b=a.getStartOffset(p):(b=a.getStartOffset(p),w=a.getEndOffset(p));else if(o&&l&&E&&b!==w){const R=m.BracketsUtils.findPrevBracketInRange(l.reversedRegex,c,h,b,w);if(R)return this._toFoundBracket(o,R)}E=M}if(o&&l&&E&&b!==w){const k=m.BracketsUtils.findPrevBracketInRange(l.reversedRegex,c,h,b,w);if(k)return this._toFoundBracket(o,k)}}return null}findNextBracket(r){var u;const f=this.textModel.validatePosition(r);if(this.canBuildAST)return this.bracketsRequested=!0,this.updateBracketPairsTree(),((u=this.bracketPairsTree.value)===null||u===void 0?void 0:u.object.getFirstBracketAfter(f))||null;const d=this.textModel.getLineCount();let l=null,o=null,c=null;for(let a=f.lineNumber;a<=d;a++){const g=this.textModel.tokenization.getLineTokens(a),h=g.getCount(),p=this.textModel.getLineContent(a);let b=0,w=0,E=0;if(a===f.lineNumber){b=g.findTokenIndexAtOffset(f.column-1),w=f.column-1,E=f.column-1;const M=g.getLanguageId(b);l!==M&&(l=M,o=this.languageConfigurationService.getLanguageConfiguration(l).brackets,c=this.languageConfigurationService.getLanguageConfiguration(l).bracketsNew)}let k=!0;for(;bk.closingBracketRange!==void 0&&k.range.strictContainsRange(w));return E?[E.openingBracketRange,E.closingBracketRange]:null}const d=s(u),l=this.textModel.getLineCount(),o=new Map;let c=[];const a=(w,E)=>{if(!o.has(w)){const k=[];for(let M=0,R=E?E.brackets.length:0;M{for(;;){if(d&&++g%100===0&&!d())return i.INSTANCE;const B=m.BracketsUtils.findNextBracketInRange(w.forwardRegex,E,k,M,R);if(!B)break;const T=k.substring(B.startColumn-1,B.endColumn-1).toLowerCase(),N=w.textIsBracket[T];if(N&&(N.isOpen(T)?c[N.index]++:N.isClose(T)&&c[N.index]--,c[N.index]===-1))return this._matchFoundBracket(B,N,!1,d);M=B.endColumn-1}return null};let p=null,b=null;for(let w=f.lineNumber;w<=l;w++){const E=this.textModel.tokenization.getLineTokens(w),k=E.getCount(),M=this.textModel.getLineContent(w);let R=0,B=0,T=0;if(w===f.lineNumber){R=E.findTokenIndexAtOffset(f.column-1),B=f.column-1,T=f.column-1;const A=E.getLanguageId(R);p!==A&&(p=A,b=this.languageConfigurationService.getLanguageConfiguration(p).brackets,a(p,b))}let N=!0;for(;Rr?.dispose()}}function s(t){if(typeof t>"u")return()=>!0;{const r=Date.now();return()=>Date.now()-r<=t}}class i{constructor(){this._searchCanceledBrand=void 0}}i.INSTANCE=new i;function n(t){return t instanceof i?null:t}}),define(te[324],ie([1,0,6,10,5,49,286,122,323,2]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBuffer=void 0;class C extends v.Disposable{constructor(i,n,t,r,u,f,d){super(),this._onDidChangeContent=this._register(new L.Emitter),this._BOM=n,this._mightContainNonBasicASCII=!f,this._mightContainRTL=r,this._mightContainUnusualLineTerminators=u,this._pieceTree=new S.PieceTreeBase(i,t,d)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(i){return this._pieceTree.createSnapshot(i?this._BOM:"")}getOffsetAt(i,n){return this._pieceTree.getOffsetAt(i,n)}getPositionAt(i){return this._pieceTree.getPositionAt(i)}getRangeAt(i,n){const t=i+n,r=this.getPositionAt(i),u=this.getPositionAt(t);return new y.Range(r.lineNumber,r.column,u.lineNumber,u.column)}getValueInRange(i,n=0){if(i.isEmpty())return"";const t=this._getEndOfLine(n);return this._pieceTree.getValueInRange(i,t)}getValueLengthInRange(i,n=0){if(i.isEmpty())return 0;if(i.startLineNumber===i.endLineNumber)return i.endColumn-i.startColumn;const t=this.getOffsetAt(i.startLineNumber,i.startColumn),r=this.getOffsetAt(i.endLineNumber,i.endColumn);let u=0;const f=this._getEndOfLine(n),d=this.getEOL();if(f.length!==d.length){const l=f.length-d.length,o=i.endLineNumber-i.startLineNumber;u=l*o}return r-t+u}getCharacterCountInRange(i,n=0){if(this._mightContainNonBasicASCII){let t=0;const r=i.startLineNumber,u=i.endLineNumber;for(let f=r;f<=u;f++){const d=this.getLineContent(f),l=f===r?i.startColumn-1:0,o=f===u?i.endColumn-1:d.length;for(let c=l;cw.sortIndex-E.sortIndex)}this._mightContainRTL=r,this._mightContainUnusualLineTerminators=u,this._mightContainNonBasicASCII=f;const h=this._doApplyEdits(l);let p=null;if(n&&a.length>0){a.sort((b,w)=>w.lineNumber-b.lineNumber),p=[];for(let b=0,w=a.length;b0&&a[b-1].lineNumber===E)continue;const k=a[b].oldContent,M=this.getLineContent(E);M.length===0||M===k||I.firstNonWhitespaceIndex(M)!==-1||p.push(E)}}return this._onDidChangeContent.fire(),new D.ApplyEditsResult(g,h,p)}_reduceOperations(i){return i.length<1e3?i:[this._toSingleEditOperation(i)]}_toSingleEditOperation(i){let n=!1;const t=i[0].range,r=i[i.length-1].range,u=new y.Range(t.startLineNumber,t.startColumn,r.endLineNumber,r.endColumn);let f=t.startLineNumber,d=t.startColumn;const l=[];for(let h=0,p=i.length;h0&&l.push(b.text),f=w.endLineNumber,d=w.endColumn}const o=l.join(""),[c,a,g]=(0,m.countEOL)(o);return{sortIndex:0,identifier:i[0].identifier,range:u,rangeOffset:this.getOffsetAt(u.startLineNumber,u.startColumn),rangeLength:this.getValueLengthInRange(u,0),text:o,eolCount:c,firstLineLength:a,lastLineLength:g,forceMoveMarkers:n,isAutoWhitespaceEdit:!1}}_doApplyEdits(i){i.sort(C._sortOpsDescending);const n=[];for(let t=0;t0){const g=l.eolCount+1;g===1?a=new y.Range(o,c,o,c+l.firstLineLength):a=new y.Range(o,c,o+g-1,l.lastLineLength+1)}else a=new y.Range(o,c,o,c);t=a.endLineNumber,r=a.endColumn,n.push(a),u=l}return n}static _sortOpsAscending(i,n){const t=y.Range.compareRangesUsingEnds(i.range,n.range);return t===0?i.sortIndex-n.sortIndex:t}static _sortOpsDescending(i,n){const t=y.Range.compareRangesUsingEnds(i.range,n.range);return t===0?n.sortIndex-i.sortIndex:-t}}e.PieceTreeTextBuffer=C}),define(te[601],ie([1,0,10,286,324]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PieceTreeTextBufferBuilder=void 0;class D{constructor(_,v,C,s,i,n,t,r,u){this._chunks=_,this._bom=v,this._cr=C,this._lf=s,this._crlf=i,this._containsRTL=n,this._containsUnusualLineTerminators=t,this._isBasicASCII=r,this._normalizeEOL=u}_getEOL(_){const v=this._cr+this._lf+this._crlf,C=this._cr+this._crlf;return v===0?_===1?` -`:`\r -`:C>v/2?`\r -`:` -`}create(_){const v=this._getEOL(_),C=this._chunks;if(this._normalizeEOL&&(v===`\r -`&&(this._cr>0||this._lf>0)||v===` -`&&(this._cr>0||this._crlf>0)))for(let i=0,n=C.length;i=55296&&v<=56319?(this._acceptChunk1(_.substr(0,_.length-1),!1),this._hasPreviousChar=!0,this._previousChar=v):(this._acceptChunk1(_,!1),this._hasPreviousChar=!1,this._previousChar=v)}_acceptChunk1(_,v){!v&&_.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+_):this._acceptChunk2(_))}_acceptChunk2(_){const v=(0,I.createLineStarts)(this._tmpLineStarts,_);this.chunks.push(new I.StringBuffer(_,v.lineStarts)),this.cr+=v.cr,this.lf+=v.lf,this.crlf+=v.crlf,v.isBasicASCII||(this.isBasicASCII=!1,this.containsRTL||(this.containsRTL=L.containsRTL(_)),this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=L.containsUnusualLineTerminators(_)))}finish(_=!0){return this._finish(),new D(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,_)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const _=this.chunks[this.chunks.length-1];_.buffer+=String.fromCharCode(this._previousChar);const v=(0,I.createLineStartsFast)(_.buffer);_.lineStarts=v,this._previousChar===13&&this.cr++}}}e.PieceTreeTextBufferBuilder=S}),define(te[602],ie([1,0,138,17]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.encodeSemanticTokensDto=void 0;function y(_){for(let v=0,C=_.length;vr.target.position?r.target.position.lineNumber:0,this._opts=v(this._editor.getOption(77)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(r=>{if(r.hasChanged(77)){const u=v(this._editor.getOption(77));if(this._opts.equals(u))return;this._opts=u,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(r=>this._onEditorMouseMove(new S(r,this._opts)))),this._register(this._editor.onMouseDown(r=>this._onEditorMouseDown(new S(r,this._opts)))),this._register(this._editor.onMouseUp(r=>this._onEditorMouseUp(new S(r,this._opts)))),this._register(this._editor.onKeyDown(r=>this._onEditorKeyDown(new m(r,this._opts)))),this._register(this._editor.onKeyUp(r=>this._onEditorKeyUp(new m(r,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(r=>this._onDidChangeCursorSelection(r))),this._register(this._editor.onDidChangeModel(r=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(r=>{(r.scrollTopChanged||r.scrollLeftChanged)&&this._resetHandler()}))}_onDidChangeCursorSelection(i){i.selection&&i.selection.startColumn!==i.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(i){this._lastMouseMoveEvent=i,this._onMouseMoveOrRelevantKeyDown.fire([i,null])}_onEditorMouseDown(i){this._hasTriggerKeyOnMouseDown=i.hasTriggerModifier,this._lineNumberOnMouseDown=this._extractLineNumberFromMouseEvent(i)}_onEditorMouseUp(i){const n=this._extractLineNumberFromMouseEvent(i);this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===n&&this._onExecute.fire(i)}_onEditorKeyDown(i){this._lastMouseMoveEvent&&(i.keyCodeIsTriggerKey||i.keyCodeIsSideBySideKey&&i.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,i]):i.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(i){i.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}e.ClickLinkGesture=C});var yt=this&&this.__asyncValues||function($){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=$[Symbol.asyncIterator],L;return e?e.call($):($=typeof __values=="function"?__values($):$[Symbol.iterator](),L={},I("next"),I("throw"),I("return"),L[Symbol.asyncIterator]=function(){return this},L);function I(D){L[D]=$[D]&&function(S){return new Promise(function(m,_){S=$[D](S),y(m,_,S.done,S.value)})}}function y(D,S,m,_){Promise.resolve(_).then(function(v){D({value:v,done:m})},S)}};define(te[325],ie([1,0,14,9,6,2]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HoverOperation=e.HoverResult=void 0;class S{constructor(v,C,s){this.value=v,this.isComplete=C,this.hasLoadingMessage=s}}e.HoverResult=S;class m extends D.Disposable{constructor(v,C){super(),this._editor=v,this._computer=C,this._onResult=this._register(new y.Emitter),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new L.RunOnceScheduler(()=>this._triggerAsyncComputation(),0)),this._secondWaitScheduler=this._register(new L.RunOnceScheduler(()=>this._triggerSyncComputation(),0)),this._loadingMessageScheduler=this._register(new L.RunOnceScheduler(()=>this._triggerLoadingMessage(),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(60).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(v,C=!0){this._state=v,C&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,L.createCancelableAsyncIterable)(v=>this._computer.computeAsync(v)),be(this,void 0,void 0,function*(){var v,C,s,i;try{try{for(var n=!0,t=yt(this._asyncIterable),r;r=yield t.next(),v=r.done,!v;n=!0){i=r.value,n=!1;const u=i;u&&(this._result.push(u),this._fireResult())}}catch(u){C={error:u}}finally{try{!n&&!v&&(s=t.return)&&(yield s.call(t))}finally{if(C)throw C.error}}this._asyncIterableDone=!0,(this._state===3||this._state===4)&&this._setState(0)}catch(u){(0,I.onUnexpectedError)(u)}})):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){this._state===3&&this._setState(4)}_fireResult(){if(this._state===1||this._state===2)return;const v=this._state===0,C=this._state===4;this._onResult.fire(new S(this._result.slice(0),v,C))}start(v){if(v===0)this._state===0&&(this._setState(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();break}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}e.HoverOperation=m}),define(te[603],ie([1,0,223,2,12,7]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResizableContentWidget=void 0;const S=30,m=24;class _ extends I.Disposable{constructor(C,s=new D.Dimension(10,10)){super(),this._editor=C,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._resizableNode=this._register(new L.ResizableHTMLElement),this._contentPosition=null,this._isResizing=!1,this._resizableNode.domNode.style.position="absolute",this._resizableNode.minSize=D.Dimension.lift(s),this._resizableNode.layout(s.height,s.width),this._resizableNode.enableSashes(!0,!0,!0,!0),this._register(this._resizableNode.onDidResize(i=>{this._resize(new D.Dimension(i.dimension.width,i.dimension.height)),i.done&&(this._isResizing=!1)})),this._register(this._resizableNode.onDidWillResize(()=>{this._isResizing=!0}))}get isResizing(){return this._isResizing}getDomNode(){return this._resizableNode.domNode}getPosition(){return this._contentPosition}get position(){var C;return!((C=this._contentPosition)===null||C===void 0)&&C.position?y.Position.lift(this._contentPosition.position):void 0}_availableVerticalSpaceAbove(C){const s=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(C);return!s||!i?void 0:D.getDomNodePagePosition(s).top+i.top-S}_availableVerticalSpaceBelow(C){const s=this._editor.getDomNode(),i=this._editor.getScrolledVisiblePosition(C);if(!s||!i)return;const n=D.getDomNodePagePosition(s),t=D.getClientArea(s.ownerDocument.body),r=n.top+i.top+i.height;return t.height-r-m}_findPositionPreference(C,s){var i,n;const t=Math.min((i=this._availableVerticalSpaceBelow(s))!==null&&i!==void 0?i:1/0,C),r=Math.min((n=this._availableVerticalSpaceAbove(s))!==null&&n!==void 0?n:1/0,C),u=Math.min(Math.max(r,t),C),f=Math.min(C,u);let d;return this._editor.getOption(60).above?d=f<=r?1:2:d=f<=t?2:1,d===1?this._resizableNode.enableSashes(!0,!0,!1,!1):this._resizableNode.enableSashes(!1,!0,!0,!1),d}_resize(C){this._resizableNode.layout(C.height,C.width)}}e.ResizableContentWidget=_}),define(te[326],ie([1,0,9,2,12,5,54,21]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.asCommandLink=e.InlayHintsFragments=e.InlayHintItem=e.InlayHintAnchor=void 0;class _{constructor(n,t){this.range=n,this.direction=t}}e.InlayHintAnchor=_;class v{constructor(n,t,r){this.hint=n,this.anchor=t,this.provider=r,this._isResolved=!1}with(n){const t=new v(this.hint,n.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(n){return be(this,void 0,void 0,function*(){if(typeof this.provider.resolveInlayHint=="function"){if(this._currentResolve)return yield this._currentResolve,n.isCancellationRequested?void 0:this.resolve(n);this._isResolved||(this._currentResolve=this._doResolve(n).finally(()=>this._currentResolve=void 0)),yield this._currentResolve}})}_doResolve(n){var t,r;return be(this,void 0,void 0,function*(){try{const u=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,n));this.hint.tooltip=(t=u?.tooltip)!==null&&t!==void 0?t:this.hint.tooltip,this.hint.label=(r=u?.label)!==null&&r!==void 0?r:this.hint.label,this._isResolved=!0}catch(u){(0,L.onUnexpectedExternalError)(u),this._isResolved=!1}})}}e.InlayHintItem=v;class C{static create(n,t,r,u){return be(this,void 0,void 0,function*(){const f=[],d=n.ordered(t).reverse().map(l=>r.map(o=>be(this,void 0,void 0,function*(){try{const c=yield l.provideInlayHints(t,o,u);c?.hints.length&&f.push([c,l])}catch(c){(0,L.onUnexpectedExternalError)(c)}})));if(yield Promise.all(d.flat()),u.isCancellationRequested||t.isDisposed())throw new L.CancellationError;return new C(r,f,t)})}constructor(n,t,r){this._disposables=new I.DisposableStore,this.ranges=n,this.provider=new Set;const u=[];for(const[f,d]of t){this._disposables.add(f),this.provider.add(d);for(const l of f.hints){const o=r.validatePosition(l.position);let c="before";const a=C._getRangeAtPosition(r,o);let g;a.getStartPosition().isBefore(o)?(g=D.Range.fromPositions(a.getStartPosition(),o),c="after"):(g=D.Range.fromPositions(o,a.getEndPosition()),c="before"),u.push(new v(l,new _(g,c),d))}}this.items=u.sort((f,d)=>y.Position.compare(f.hint.position,d.hint.position))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(n,t){const r=t.lineNumber,u=n.getWordAtPosition(t);if(u)return new D.Range(r,u.startColumn,r,u.endColumn);n.tokenization.tokenizeIfCheap(r);const f=n.tokenization.getLineTokens(r),d=t.column-1,l=f.findTokenIndexAtOffset(d);let o=f.getStartOffset(l),c=f.getEndOffset(l);return c-o===1&&(o===d&&l>1?(o=f.getStartOffset(l-1),c=f.getEndOffset(l-1)):c===d&&lx.toString?x.toString():""+x).join(" -> ")}`));const O=new I.DeferredPromise;return w.set(N,O.p),(()=>be(this,void 0,void 0,function*(){if(!P){const x=b(N);for(const W of x){const U=yield M(W);if(U&&U.items.length>0)return}}try{return yield N.provideInlineCompletions(l,d,o,c)}catch(x){(0,S.onUnexpectedExternalError)(x);return}}))().then(x=>O.complete(x),x=>O.error(x)),O.p}const R=yield Promise.all(h.map(N=>be(this,void 0,void 0,function*(){return{provider:N,completions:yield M(N)}}))),B=new Map,T=[];for(const N of R){const A=N.completions;if(!A)continue;const P=new n(A,N.provider);T.push(P);for(const O of A.items){const x=t.from(O,P,g,l,a);B.set(x.hash(),x)}}return new i(Array.from(B.values()),new Set(B.keys()),T)})}e.provideInlineCompletions=s;class i{constructor(d,l,o){this.completions=d,this.hashs=l,this.providerResults=o}has(d){return this.hashs.has(d.hash())}dispose(){for(const d of this.providerResults)d.removeRef()}}e.InlineCompletionProviderResult=i;class n{constructor(d,l){this.inlineCompletions=d,this.provider=l,this.refCount=1}addRef(){this.refCount++}removeRef(){this.refCount--,this.refCount===0&&this.provider.freeInlineCompletions(this.inlineCompletions)}}e.InlineCompletionList=n;class t{static from(d,l,o,c,a){let g,h,p=d.range?m.Range.lift(d.range):o;if(typeof d.insertText=="string"){if(g=d.insertText,a&&d.completeBracketPairs){g=u(g,p.getStartPosition(),c,a);const b=g.length-d.insertText.length;b!==0&&(p=new m.Range(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn+b))}h=void 0}else if("snippet"in d.insertText){const b=d.insertText.snippet.length;if(a&&d.completeBracketPairs){d.insertText.snippet=u(d.insertText.snippet,p.getStartPosition(),c,a);const E=d.insertText.snippet.length-b;E!==0&&(p=new m.Range(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn+E))}const w=new C.SnippetParser().parse(d.insertText.snippet);w.children.length===1&&w.children[0]instanceof C.Text?(g=w.children[0].value,h=void 0):(g=w.toString(),h={snippet:d.insertText.snippet,range:p})}else(0,L.assertNever)(d.insertText);return new t(g,d.command,p,g,h,d.additionalTextEdits||(0,v.getReadonlyEmptyArray)(),d,l)}constructor(d,l,o,c,a,g,h,p){this.filterText=d,this.command=l,this.range=o,this.insertText=c,this.snippetInfo=a,this.additionalTextEdits=g,this.sourceInlineCompletion=h,this.source=p,d=d.replace(/\r\n|\r/g,` -`),c=d.replace(/\r\n|\r/g,` -`)}withRange(d){return new t(this.filterText,this.command,d,this.insertText,this.snippetInfo,this.additionalTextEdits,this.sourceInlineCompletion,this.source)}hash(){return JSON.stringify({insertText:this.insertText,range:this.range.toString()})}}e.InlineCompletionItem=t;function r(f,d){const l=d.getWordAtPosition(f),o=d.getLineMaxColumn(f.lineNumber);return l?new m.Range(f.lineNumber,l.startColumn,f.lineNumber,o):m.Range.fromPositions(f,f.with(void 0,o))}function u(f,d,l,o){const a=l.getLineContent(d.lineNumber).substring(0,d.column-1)+f,g=l.tokenization.tokenizeLineWithEdit(d,a.length-(d.column-1),f),h=g?.sliceAndInflate(d.column-1,a.length,0);return h?(0,_.fixBracketsInLine)(h,o):f}}),define(te[605],ie([3,4]),function($,e){return $.create("vs/editor/browser/controller/textAreaHandler",e)}),define(te[606],ie([3,4]),function($,e){return $.create("vs/editor/browser/coreCommands",e)}),define(te[607],ie([3,4]),function($,e){return $.create("vs/editor/browser/editorExtensions",e)}),define(te[608],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/codeEditorWidget",e)}),define(te[609],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/diffEditor/accessibleDiffViewer",e)}),define(te[610],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/diffEditor/colors",e)}),define(te[611],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/diffEditor/decorations",e)}),define(te[612],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/diffEditor/diffEditor.contribution",e)}),define(te[613],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/diffEditor/diffEditorEditors",e)}),define(te[614],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature",e)}),define(te[615],ie([3,4]),function($,e){return $.create("vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin",e)}),define(te[616],ie([1,0,7,41,26,2,17,27,615]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineDiffDeletedCodeMargin=void 0;class v extends D.Disposable{get visibility(){return this._visibility}set visibility(s){this._visibility!==s&&(this._visibility=s,this._diffActions.style.visibility=s?"visible":"hidden")}constructor(s,i,n,t,r,u,f,d,l){super(),this._getViewZoneId=s,this._marginDomNode=i,this._modifiedEditor=n,this._diff=t,this._editor=r,this._viewLineCounts=u,this._originalTextModel=f,this._contextMenuService=d,this._clipboardService=l,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=m.ThemeIcon.asClassName(y.Codicon.lightBulb)+" lightbulb-glyph",this._diffActions.style.position="absolute";const o=this._modifiedEditor.getOption(66);this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${o}px`,this._diffActions.style.lineHeight=`${o}px`,this._marginDomNode.appendChild(this._diffActions);let c=0;const a=n.getOption(126)&&!S.isIOS,g=(h,p)=>{var b;this._contextMenuService.showContextMenu({domForShadowRoot:a&&(b=n.getDomNode())!==null&&b!==void 0?b:void 0,getAnchor:()=>({x:h,y:p}),getActions:()=>{const w=[],E=t.modified.isEmpty;return w.push(new I.Action("diff.clipboard.copyDeletedContent",E?t.original.length>1?(0,_.localize)(0,null):(0,_.localize)(1,null):t.original.length>1?(0,_.localize)(2,null):(0,_.localize)(3,null),void 0,!0,()=>be(this,void 0,void 0,function*(){const M=this._originalTextModel.getValueInRange(t.original.toExclusiveRange());yield this._clipboardService.writeText(M)}))),t.original.length>1&&w.push(new I.Action("diff.clipboard.copyDeletedLineContent",E?(0,_.localize)(4,null,t.original.startLineNumber+c):(0,_.localize)(5,null,t.original.startLineNumber+c),void 0,!0,()=>be(this,void 0,void 0,function*(){let M=this._originalTextModel.getLineContent(t.original.startLineNumber+c);M===""&&(M=this._originalTextModel.getEndOfLineSequence()===0?` -`:`\r -`),yield this._clipboardService.writeText(M)}))),n.getOption(90)||w.push(new I.Action("diff.inline.revertChange",(0,_.localize)(6,null),void 0,!0,()=>be(this,void 0,void 0,function*(){this._editor.revert(this._diff)}))),w},autoSelectFirstItem:!0})};this._register((0,L.addStandardDisposableListener)(this._diffActions,"mousedown",h=>{const{top:p,height:b}=(0,L.getDomNodePagePosition)(this._diffActions),w=Math.floor(o/3);h.preventDefault(),g(h.posx,p+b+w)})),this._register(n.onMouseMove(h=>{(h.target.type===8||h.target.type===5)&&h.target.detail.viewZoneId===this._getViewZoneId()?(c=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,o),this.visibility=!0):this.visibility=!1})),this._register(n.onMouseDown(h=>{h.event.rightButton&&(h.target.type===8||h.target.type===5)&&h.target.detail.viewZoneId===this._getViewZoneId()&&(h.event.preventDefault(),c=this._updateLightBulbPosition(this._marginDomNode,h.event.browserEvent.y,o),g(h.event.posx,h.event.posy+o))}))}_updateLightBulbPosition(s,i,n){const{top:t}=(0,L.getDomNodePagePosition)(s),r=i-t,u=Math.floor(r/n),f=u*n;if(this._diffActions.style.top=`${f}px`,this._viewLineCounts){let d=0;for(let l=0;lthis._editors.original.getScrollTop()),this._modifiedScrollTop=(0,v.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._viewZonesChanged=(0,v.observableSignalFromEvent)("onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this.width=(0,v.observableValue)(this,0),this._modifiedViewZonesChangedSignal=(0,v.observableSignalFromEvent)("modified.onDidChangeViewZones",this._editors.modified.onDidChangeViewZones),this._originalViewZonesChangedSignal=(0,v.observableSignalFromEvent)("original.onDidChangeViewZones",this._editors.original.onDidChangeViewZones),this._state=(0,v.derivedWithStore)((k,M)=>{var R;this._element.replaceChildren();const B=this._diffModel.read(k),T=(R=B?.diff.read(k))===null||R===void 0?void 0:R.movedTexts;if(!T||T.length===0){this.width.set(0,void 0);return}this._viewZonesChanged.read(k);const N=this._originalEditorLayoutInfo.read(k),A=this._modifiedEditorLayoutInfo.read(k);if(!N||!A){this.width.set(0,void 0);return}this._modifiedViewZonesChangedSignal.read(k),this._originalViewZonesChangedSignal.read(k);const P=T.map(Y=>{function ne(ue,de){const ce=de.getTopForLineNumber(ue.startLineNumber,!0),ae=de.getTopForLineNumber(ue.endLineNumberExclusive,!0);return(ce+ae)/2}const se=ne(Y.lineRangeMapping.original,this._editors.original),J=this._originalScrollTop.read(k),q=ne(Y.lineRangeMapping.modified,this._editors.modified),H=this._modifiedScrollTop.read(k),V=se-J,Z=q-H,ee=Math.min(se,q),le=Math.max(se,q);return{range:new i.OffsetRange(ee,le),from:V,to:Z,fromWithoutScroll:se,toWithoutScroll:q,move:Y}});P.sort((0,D.tieBreakComparators)((0,D.compareBy)(Y=>Y.fromWithoutScroll>Y.toWithoutScroll,D.booleanComparator),(0,D.compareBy)(Y=>Y.fromWithoutScroll>Y.toWithoutScroll?Y.fromWithoutScroll:-Y.toWithoutScroll,D.numberComparator)));const O=r.compute(P.map(Y=>Y.range)),x=10,W=N.verticalScrollbarWidth,U=(O.getTrackCount()-1)*10+x*2,F=W+U+(A.contentLeft-t.movedCodeBlockPadding);let G=0;for(const Y of P){const ne=O.getTrack(G),se=W+x+ne*10,J=15,q=15,H=F,V=A.glyphMarginWidth+A.lineNumbersWidth,Z=18,ee=document.createElementNS("http://www.w3.org/2000/svg","rect");ee.classList.add("arrow-rectangle"),ee.setAttribute("x",`${H-V}`),ee.setAttribute("y",`${Y.to-Z/2}`),ee.setAttribute("width",`${V}`),ee.setAttribute("height",`${Z}`),this._element.appendChild(ee);const le=document.createElementNS("http://www.w3.org/2000/svg","g"),ue=document.createElementNS("http://www.w3.org/2000/svg","path");ue.setAttribute("d",`M 0 ${Y.from} L ${se} ${Y.from} L ${se} ${Y.to} L ${H-q} ${Y.to}`),ue.setAttribute("fill","none"),le.appendChild(ue);const de=document.createElementNS("http://www.w3.org/2000/svg","polygon");de.classList.add("arrow"),M.add((0,v.autorun)(ce=>{ue.classList.toggle("currentMove",Y.move===B.activeMovedText.read(ce)),de.classList.toggle("currentMove",Y.move===B.activeMovedText.read(ce))})),de.setAttribute("points",`${H-q},${Y.to-J/2} ${H},${Y.to} ${H-q},${Y.to+J/2}`),le.appendChild(de),this._element.appendChild(le),G++}this.width.set(U,void 0)}),this._element=document.createElementNS("http://www.w3.org/2000/svg","svg"),this._element.setAttribute("class","moved-blocks-lines"),this._rootElement.appendChild(this._element),this._register((0,_.toDisposable)(()=>this._element.remove())),this._register((0,v.autorun)(k=>{const M=this._originalEditorLayoutInfo.read(k),R=this._modifiedEditorLayoutInfo.read(k);!M||!R||(this._element.style.left=`${M.width-M.verticalScrollbarWidth}px`,this._element.style.height=`${M.height}px`,this._element.style.width=`${M.verticalScrollbarWidth+M.contentLeft-t.movedCodeBlockPadding+this.width.read(k)}px`)})),this._register((0,v.recomputeInitiallyAndOnChange)(this._state));const g=(0,v.derived)(k=>{const M=this._diffModel.read(k),R=M?.diff.read(k);return R?R.movedTexts.map(B=>({move:B,original:new s.PlaceholderViewZone((0,v.constObservable)(B.lineRangeMapping.original.startLineNumber-1),18),modified:new s.PlaceholderViewZone((0,v.constObservable)(B.lineRangeMapping.modified.startLineNumber-1),18)})):[]});this._register((0,s.applyViewZones)(this._editors.original,g.map(k=>k.map(M=>M.original)))),this._register((0,s.applyViewZones)(this._editors.modified,g.map(k=>k.map(M=>M.modified)))),this._register((0,v.autorunWithStore)((k,M)=>{const R=g.read(k);for(const B of R)M.add(new u(this._editors.original,B.original,B.move,"original",this._diffModel.get())),M.add(new u(this._editors.modified,B.modified,B.move,"modified",this._diffModel.get()))}));const h=(0,v.observableFromEvent)(this._editors.original.onDidChangeCursorPosition,()=>this._editors.original.getPosition()),p=(0,v.observableFromEvent)(this._editors.modified.onDidChangeCursorPosition,()=>this._editors.modified.getPosition()),b=(0,v.observableSignalFromEvent)("original.onDidFocusEditorWidget",k=>this._editors.original.onDidFocusEditorWidget(()=>setTimeout(()=>k(void 0),0))),w=(0,v.observableSignalFromEvent)("modified.onDidFocusEditorWidget",k=>this._editors.modified.onDidFocusEditorWidget(()=>setTimeout(()=>k(void 0),0)));let E="modified";this._register((0,v.autorunHandleChanges)({createEmptyChangeSummary:()=>{},handleChange:(k,M)=>(k.didChange(b)&&(E="original"),k.didChange(w)&&(E="modified"),!0)},k=>{b.read(k),w.read(k);const M=this._diffModel.read(k);if(!M)return;const R=M.diff.read(k);let B;if(R&&E==="original"){const T=h.read(k);T&&(B=R.movedTexts.find(N=>N.lineRangeMapping.original.contains(T.lineNumber)))}if(R&&E==="modified"){const T=p.read(k);T&&(B=R.movedTexts.find(N=>N.lineRangeMapping.modified.contains(T.lineNumber)))}B!==M.movedTextToCompare.get()&&M.movedTextToCompare.set(void 0,void 0),M.setActiveMovedText(B)}))}}e.MovedBlocksLinesPart=t,t.movedCodeBlockPadding=4;class r{static compute(d){const l=[],o=[];for(const c of d){let a=l.findIndex(g=>!g.intersectsStrict(c));a===-1&&(l.length>=6?a=(0,S.findMaxIdxBy)(l,(0,D.compareBy)(h=>h.intersectWithRangeLength(c),D.numberComparator)):(a=l.length,l.push(new i.OffsetRangeSet))),l[a].addRange(c),o.push(a)}return new r(l.length,o)}constructor(d,l){this._trackCount=d,this.trackPerLineIdx=l}getTrack(d){return this.trackPerLineIdx[d]}getTrackCount(){return this._trackCount}}class u extends s.ViewZoneOverlayWidget{constructor(d,l,o,c,a){const g=(0,L.h)("div.diff-hidden-lines-widget");super(d,l,g.root),this._editor=d,this._move=o,this._kind=c,this._diffModel=a,this._nodes=(0,L.h)("div.diff-moved-code-block",{style:{marginRight:"4px"}},[(0,L.h)("div.text-content@textContent"),(0,L.h)("div.action-bar@actionBar")]),g.root.appendChild(this._nodes.root);const h=(0,v.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this._register((0,s.applyStyle)(this._nodes.root,{paddingRight:h.map(k=>k.verticalScrollbarWidth)}));let p;o.changes.length>0?p=this._kind==="original"?(0,n.localize)(0,null,this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,n.localize)(1,null,this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1):p=this._kind==="original"?(0,n.localize)(2,null,this._move.lineRangeMapping.modified.startLineNumber,this._move.lineRangeMapping.modified.endLineNumberExclusive-1):(0,n.localize)(3,null,this._move.lineRangeMapping.original.startLineNumber,this._move.lineRangeMapping.original.endLineNumberExclusive-1);const b=this._register(new I.ActionBar(this._nodes.actionBar,{highlightToggledItems:!0})),w=new y.Action("",p,"",!1);b.push(w,{icon:!1,label:!0});const E=new y.Action("","Compare",C.ThemeIcon.asClassName(m.Codicon.compareChanges),!0,()=>{this._editor.focus(),this._diffModel.movedTextToCompare.set(this._diffModel.movedTextToCompare.get()===o?void 0:this._move,void 0)});this._register((0,v.autorun)(k=>{const M=this._diffModel.movedTextToCompare.read(k)===o;E.checked=M})),b.push(E,{icon:!1,label:!0})}}}),define(te[618],ie([3,4]),function($,e){return $.create("vs/editor/common/config/editorConfigurationSchema",e)}),define(te[619],ie([3,4]),function($,e){return $.create("vs/editor/common/config/editorOptions",e)}),define(te[39],ie([1,0,13,52,17,173,145,619]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOptions=e.editorOptionsRegistry=e.EDITOR_FONT_DEFAULTS=e.unicodeHighlightConfigKeys=e.inUntrustedWorkspace=e.filterValidationDecorations=e.EditorLayoutInfoComputer=e.EditorFontVariations=e.EditorFontLigatures=e.TextEditorCursorStyle=e.stringSet=e.clampedFloat=e.clampedInt=e.boolean=e.ApplyUpdateResult=e.ComputeOptionsMemory=e.ConfigurationChangedEvent=e.MINIMAP_GUTTER_WIDTH=void 0,e.MINIMAP_GUTTER_WIDTH=8;class _{constructor(fe){this._values=fe}hasChanged(fe){return this._values[fe]}}e.ConfigurationChangedEvent=_;class v{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}e.ComputeOptionsMemory=v;class C{constructor(fe,Ce,Me,Pe){this.id=fe,this.name=Ce,this.defaultValue=Me,this.schema=Pe}applyUpdate(fe,Ce){return i(fe,Ce)}compute(fe,Ce,Me){return Me}}class s{constructor(fe,Ce){this.newValue=fe,this.didChange=Ce}}e.ApplyUpdateResult=s;function i(De,fe){if(typeof De!="object"||typeof fe!="object"||!De||!fe)return new s(fe,De!==fe);if(Array.isArray(De)||Array.isArray(fe)){const Me=Array.isArray(De)&&Array.isArray(fe)&&L.equals(De,fe);return new s(fe,!Me)}let Ce=!1;for(const Me in fe)if(fe.hasOwnProperty(Me)){const Pe=i(De[Me],fe[Me]);Pe.didChange&&(De[Me]=Pe.newValue,Ce=!0)}return new s(De,Ce)}class n{constructor(fe){this.schema=void 0,this.id=fe,this.name="_never_",this.defaultValue=void 0}applyUpdate(fe,Ce){return i(fe,Ce)}validate(fe){return this.defaultValue}}class t{constructor(fe,Ce,Me,Pe){this.id=fe,this.name=Ce,this.defaultValue=Me,this.schema=Pe}applyUpdate(fe,Ce){return i(fe,Ce)}validate(fe){return typeof fe>"u"?this.defaultValue:fe}compute(fe,Ce,Me){return Me}}function r(De,fe){return typeof De>"u"?fe:De==="false"?!1:!!De}e.boolean=r;class u extends t{constructor(fe,Ce,Me,Pe=void 0){typeof Pe<"u"&&(Pe.type="boolean",Pe.default=Me),super(fe,Ce,Me,Pe)}validate(fe){return r(fe,this.defaultValue)}}function f(De,fe,Ce,Me){if(typeof De>"u")return fe;let Pe=parseInt(De,10);return isNaN(Pe)?fe:(Pe=Math.max(Ce,Pe),Pe=Math.min(Me,Pe),Pe|0)}e.clampedInt=f;class d extends t{static clampedInt(fe,Ce,Me,Pe){return f(fe,Ce,Me,Pe)}constructor(fe,Ce,Me,Pe,Se,_e=void 0){typeof _e<"u"&&(_e.type="integer",_e.default=Me,_e.minimum=Pe,_e.maximum=Se),super(fe,Ce,Me,_e),this.minimum=Pe,this.maximum=Se}validate(fe){return d.clampedInt(fe,this.defaultValue,this.minimum,this.maximum)}}function l(De,fe,Ce,Me){if(typeof De>"u")return fe;const Pe=o.float(De,fe);return o.clamp(Pe,Ce,Me)}e.clampedFloat=l;class o extends t{static clamp(fe,Ce,Me){return feMe?Me:fe}static float(fe,Ce){if(typeof fe=="number")return fe;if(typeof fe>"u")return Ce;const Me=parseFloat(fe);return isNaN(Me)?Ce:Me}constructor(fe,Ce,Me,Pe,Se){typeof Se<"u"&&(Se.type="number",Se.default=Me),super(fe,Ce,Me,Se),this.validationFn=Pe}validate(fe){return this.validationFn(o.float(fe,this.defaultValue))}}class c extends t{static string(fe,Ce){return typeof fe!="string"?Ce:fe}constructor(fe,Ce,Me,Pe=void 0){typeof Pe<"u"&&(Pe.type="string",Pe.default=Me),super(fe,Ce,Me,Pe)}validate(fe){return c.string(fe,this.defaultValue)}}function a(De,fe,Ce,Me){return typeof De!="string"?fe:Me&&De in Me?Me[De]:Ce.indexOf(De)===-1?fe:De}e.stringSet=a;class g extends t{constructor(fe,Ce,Me,Pe,Se=void 0){typeof Se<"u"&&(Se.type="string",Se.enum=Pe,Se.default=Me),super(fe,Ce,Me,Se),this._allowedValues=Pe}validate(fe){return a(fe,this.defaultValue,this._allowedValues)}}class h extends C{constructor(fe,Ce,Me,Pe,Se,_e,ke=void 0){typeof ke<"u"&&(ke.type="string",ke.enum=Se,ke.default=Pe),super(fe,Ce,Me,ke),this._allowedValues=Se,this._convert=_e}validate(fe){return typeof fe!="string"?this.defaultValue:this._allowedValues.indexOf(fe)===-1?this.defaultValue:this._convert(fe)}}function p(De){switch(De){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class b extends C{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m.localize(0,null),m.localize(1,null),m.localize(2,null)],default:"auto",tags:["accessibility"],description:m.localize(3,null)})}validate(fe){switch(fe){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(fe,Ce,Me){return Me===0?fe.accessibilitySupport:Me}}class w extends C{constructor(){const fe={insertSpace:!0,ignoreEmptyLines:!0};super(23,"comments",fe,{"editor.comments.insertSpace":{type:"boolean",default:fe.insertSpace,description:m.localize(4,null)},"editor.comments.ignoreEmptyLines":{type:"boolean",default:fe.ignoreEmptyLines,description:m.localize(5,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{insertSpace:r(Ce.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:r(Ce.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function E(De){switch(De){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var k;(function(De){De[De.Line=1]="Line",De[De.Block=2]="Block",De[De.Underline=3]="Underline",De[De.LineThin=4]="LineThin",De[De.BlockOutline=5]="BlockOutline",De[De.UnderlineThin=6]="UnderlineThin"})(k||(e.TextEditorCursorStyle=k={}));function M(De){switch(De){case"line":return k.Line;case"block":return k.Block;case"underline":return k.Underline;case"line-thin":return k.LineThin;case"block-outline":return k.BlockOutline;case"underline-thin":return k.UnderlineThin}}class R extends n{constructor(){super(140)}compute(fe,Ce,Me){const Pe=["monaco-editor"];return Ce.get(39)&&Pe.push(Ce.get(39)),fe.extraEditorClassName&&Pe.push(fe.extraEditorClassName),Ce.get(73)==="default"?Pe.push("mouse-default"):Ce.get(73)==="copy"&&Pe.push("mouse-copy"),Ce.get(110)&&Pe.push("showUnused"),Ce.get(138)&&Pe.push("showDeprecated"),Pe.join(" ")}}class B extends u{constructor(){super(37,"emptySelectionClipboard",!0,{description:m.localize(6,null)})}compute(fe,Ce,Me){return Me&&fe.emptySelectionClipboard}}class T extends C{constructor(){const fe={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(41,"find",fe,{"editor.find.cursorMoveOnType":{type:"boolean",default:fe.cursorMoveOnType,description:m.localize(7,null)},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:fe.seedSearchStringFromSelection,enumDescriptions:[m.localize(8,null),m.localize(9,null),m.localize(10,null)],description:m.localize(11,null)},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:fe.autoFindInSelection,enumDescriptions:[m.localize(12,null),m.localize(13,null),m.localize(14,null)],description:m.localize(15,null)},"editor.find.globalFindClipboard":{type:"boolean",default:fe.globalFindClipboard,description:m.localize(16,null),included:y.isMacintosh},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:fe.addExtraSpaceOnTop,description:m.localize(17,null)},"editor.find.loop":{type:"boolean",default:fe.loop,description:m.localize(18,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{cursorMoveOnType:r(Ce.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof fe.seedSearchStringFromSelection=="boolean"?fe.seedSearchStringFromSelection?"always":"never":a(Ce.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof fe.autoFindInSelection=="boolean"?fe.autoFindInSelection?"always":"never":a(Ce.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:r(Ce.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:r(Ce.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:r(Ce.loop,this.defaultValue.loop)}}}class N extends C{constructor(){super(51,"fontLigatures",N.OFF,{anyOf:[{type:"boolean",description:m.localize(19,null)},{type:"string",description:m.localize(20,null)}],description:m.localize(21,null),default:!1})}validate(fe){return typeof fe>"u"?this.defaultValue:typeof fe=="string"?fe==="false"?N.OFF:fe==="true"?N.ON:fe:fe?N.ON:N.OFF}}e.EditorFontLigatures=N,N.OFF='"liga" off, "calt" off',N.ON='"liga" on, "calt" on';class A extends C{constructor(){super(54,"fontVariations",A.OFF,{anyOf:[{type:"boolean",description:m.localize(22,null)},{type:"string",description:m.localize(23,null)}],description:m.localize(24,null),default:!1})}validate(fe){return typeof fe>"u"?this.defaultValue:typeof fe=="string"?fe==="false"?A.OFF:fe==="true"?A.TRANSLATE:fe:fe?A.TRANSLATE:A.OFF}compute(fe,Ce,Me){return fe.fontInfo.fontVariationSettings}}e.EditorFontVariations=A,A.OFF="normal",A.TRANSLATE="translate";class P extends n{constructor(){super(50)}compute(fe,Ce,Me){return fe.fontInfo}}class O extends t{constructor(){super(52,"fontSize",e.EDITOR_FONT_DEFAULTS.fontSize,{type:"number",minimum:6,maximum:100,default:e.EDITOR_FONT_DEFAULTS.fontSize,description:m.localize(25,null)})}validate(fe){const Ce=o.float(fe,this.defaultValue);return Ce===0?e.EDITOR_FONT_DEFAULTS.fontSize:o.clamp(Ce,6,100)}compute(fe,Ce,Me){return fe.fontInfo.fontSize}}class x extends C{constructor(){super(53,"fontWeight",e.EDITOR_FONT_DEFAULTS.fontWeight,{anyOf:[{type:"number",minimum:x.MINIMUM_VALUE,maximum:x.MAXIMUM_VALUE,errorMessage:m.localize(26,null)},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:x.SUGGESTION_VALUES}],default:e.EDITOR_FONT_DEFAULTS.fontWeight,description:m.localize(27,null)})}validate(fe){return fe==="normal"||fe==="bold"?fe:String(d.clampedInt(fe,e.EDITOR_FONT_DEFAULTS.fontWeight,x.MINIMUM_VALUE,x.MAXIMUM_VALUE))}}x.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],x.MINIMUM_VALUE=1,x.MAXIMUM_VALUE=1e3;class W extends C{constructor(){const fe={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:""},Ce={type:"string",enum:["peek","gotoAndPeek","goto"],default:fe.multiple,enumDescriptions:[m.localize(28,null),m.localize(29,null),m.localize(30,null)]},Me=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(58,"gotoLocation",fe,{"editor.gotoLocation.multiple":{deprecationMessage:m.localize(31,null)},"editor.gotoLocation.multipleDefinitions":Object.assign({description:m.localize(32,null)},Ce),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:m.localize(33,null)},Ce),"editor.gotoLocation.multipleDeclarations":Object.assign({description:m.localize(34,null)},Ce),"editor.gotoLocation.multipleImplementations":Object.assign({description:m.localize(35,null)},Ce),"editor.gotoLocation.multipleReferences":Object.assign({description:m.localize(36,null)},Ce),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:fe.alternativeDefinitionCommand,enum:Me,description:m.localize(37,null)},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:fe.alternativeTypeDefinitionCommand,enum:Me,description:m.localize(38,null)},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:fe.alternativeDeclarationCommand,enum:Me,description:m.localize(39,null)},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:fe.alternativeImplementationCommand,enum:Me,description:m.localize(40,null)},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:fe.alternativeReferenceCommand,enum:Me,description:m.localize(41,null)}})}validate(fe){var Ce,Me,Pe,Se,_e;if(!fe||typeof fe!="object")return this.defaultValue;const ke=fe;return{multiple:a(ke.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(Ce=ke.multipleDefinitions)!==null&&Ce!==void 0?Ce:a(ke.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(Me=ke.multipleTypeDefinitions)!==null&&Me!==void 0?Me:a(ke.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(Pe=ke.multipleDeclarations)!==null&&Pe!==void 0?Pe:a(ke.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(Se=ke.multipleImplementations)!==null&&Se!==void 0?Se:a(ke.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(_e=ke.multipleReferences)!==null&&_e!==void 0?_e:a(ke.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:c.string(ke.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:c.string(ke.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:c.string(ke.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:c.string(ke.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:c.string(ke.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class U extends C{constructor(){const fe={enabled:!0,delay:300,hidingDelay:300,sticky:!0,above:!0};super(60,"hover",fe,{"editor.hover.enabled":{type:"boolean",default:fe.enabled,description:m.localize(42,null)},"editor.hover.delay":{type:"number",default:fe.delay,minimum:0,maximum:1e4,description:m.localize(43,null)},"editor.hover.sticky":{type:"boolean",default:fe.sticky,description:m.localize(44,null)},"editor.hover.hidingDelay":{type:"integer",minimum:0,default:fe.hidingDelay,description:m.localize(45,null)},"editor.hover.above":{type:"boolean",default:fe.above,description:m.localize(46,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),delay:d.clampedInt(Ce.delay,this.defaultValue.delay,0,1e4),sticky:r(Ce.sticky,this.defaultValue.sticky),hidingDelay:d.clampedInt(Ce.hidingDelay,this.defaultValue.hidingDelay,0,6e5),above:r(Ce.above,this.defaultValue.above)}}}class F extends n{constructor(){super(143)}compute(fe,Ce,Me){return F.computeLayout(Ce,{memory:fe.memory,outerWidth:fe.outerWidth,outerHeight:fe.outerHeight,isDominatedByLongLines:fe.isDominatedByLongLines,lineHeight:fe.fontInfo.lineHeight,viewLineCount:fe.viewLineCount,lineNumbersDigitCount:fe.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:fe.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:fe.fontInfo.maxDigitWidth,pixelRatio:fe.pixelRatio,glyphMarginDecorationLaneCount:fe.glyphMarginDecorationLaneCount})}static computeContainedMinimapLineCount(fe){const Ce=fe.height/fe.lineHeight,Me=Math.floor(fe.paddingTop/fe.lineHeight);let Pe=Math.floor(fe.paddingBottom/fe.lineHeight);fe.scrollBeyondLastLine&&(Pe=Math.max(Pe,Ce-1));const Se=(Me+fe.viewLineCount+Pe)/(fe.pixelRatio*fe.height),_e=Math.floor(fe.viewLineCount/Se);return{typicalViewportLineCount:Ce,extraLinesBeforeFirstLine:Me,extraLinesBeyondLastLine:Pe,desiredRatio:Se,minimapLineCount:_e}}static _computeMinimapLayout(fe,Ce){const Me=fe.outerWidth,Pe=fe.outerHeight,Se=fe.pixelRatio;if(!fe.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(Se*Pe),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:Pe};const _e=Ce.stableMinimapLayoutInput,ke=_e&&fe.outerHeight===_e.outerHeight&&fe.lineHeight===_e.lineHeight&&fe.typicalHalfwidthCharacterWidth===_e.typicalHalfwidthCharacterWidth&&fe.pixelRatio===_e.pixelRatio&&fe.scrollBeyondLastLine===_e.scrollBeyondLastLine&&fe.paddingTop===_e.paddingTop&&fe.paddingBottom===_e.paddingBottom&&fe.minimap.enabled===_e.minimap.enabled&&fe.minimap.side===_e.minimap.side&&fe.minimap.size===_e.minimap.size&&fe.minimap.showSlider===_e.minimap.showSlider&&fe.minimap.renderCharacters===_e.minimap.renderCharacters&&fe.minimap.maxColumn===_e.minimap.maxColumn&&fe.minimap.scale===_e.minimap.scale&&fe.verticalScrollbarWidth===_e.verticalScrollbarWidth&&fe.isViewportWrapping===_e.isViewportWrapping,Oe=fe.lineHeight,We=fe.typicalHalfwidthCharacterWidth,qe=fe.scrollBeyondLastLine,Ge=fe.minimap.renderCharacters;let je=Se>=2?Math.round(fe.minimap.scale*2):fe.minimap.scale;const it=fe.minimap.maxColumn,Ze=fe.minimap.size,dt=fe.minimap.side,at=fe.verticalScrollbarWidth,nt=fe.viewLineCount,Ct=fe.remainingWidth,ht=fe.isViewportWrapping,bt=Ge?2:3;let ft=Math.floor(Se*Pe);const _t=ft/Se;let He=!1,Te=!1,Fe=bt*je,Ve=je/Se,Ye=1;if(Ze==="fill"||Ze==="fit"){const{typicalViewportLineCount:Ke,extraLinesBeforeFirstLine:Xe,extraLinesBeyondLastLine:Qe,desiredRatio:rt,minimapLineCount:Je}=F.computeContainedMinimapLineCount({viewLineCount:nt,scrollBeyondLastLine:qe,paddingTop:fe.paddingTop,paddingBottom:fe.paddingBottom,height:Pe,lineHeight:Oe,pixelRatio:Se});if(nt/Je>1)He=!0,Te=!0,je=1,Fe=1,Ve=je/Se;else{let tt=!1,ct=je+1;if(Ze==="fit"){const St=Math.ceil((Xe+nt+Qe)*Fe);ht&&ke&&Ct<=Ce.stableFitRemainingWidth?(tt=!0,ct=Ce.stableFitMaxMinimapScale):tt=St>ft}if(Ze==="fill"||tt){He=!0;const St=je;Fe=Math.min(Oe*Se,Math.max(1,Math.floor(1/rt))),ht&&ke&&Ct<=Ce.stableFitRemainingWidth&&(ct=Ce.stableFitMaxMinimapScale),je=Math.min(ct,Math.max(1,Math.floor(Fe/bt))),je>St&&(Ye=Math.min(2,je/St)),Ve=je/Se/Ye,ft=Math.ceil(Math.max(Ke,Xe+nt+Qe)*Fe),ht?(Ce.stableMinimapLayoutInput=fe,Ce.stableFitRemainingWidth=Ct,Ce.stableFitMaxMinimapScale=je):(Ce.stableMinimapLayoutInput=null,Ce.stableFitRemainingWidth=0)}}}const st=Math.floor(it*Ve),ot=Math.min(st,Math.max(0,Math.floor((Ct-at-2)*Ve/(We+Ve)))+e.MINIMAP_GUTTER_WIDTH);let Ue=Math.floor(Se*ot);const Ne=Ue/Se;Ue=Math.floor(Ue*Ye);const xe=Ge?1:2,ze=dt==="left"?0:Me-ot-at;return{renderMinimap:xe,minimapLeft:ze,minimapWidth:ot,minimapHeightIsEditorHeight:He,minimapIsSampling:Te,minimapScale:je,minimapLineHeight:Fe,minimapCanvasInnerWidth:Ue,minimapCanvasInnerHeight:ft,minimapCanvasOuterWidth:Ne,minimapCanvasOuterHeight:_t}}static computeLayout(fe,Ce){const Me=Ce.outerWidth|0,Pe=Ce.outerHeight|0,Se=Ce.lineHeight|0,_e=Ce.lineNumbersDigitCount|0,ke=Ce.typicalHalfwidthCharacterWidth,Oe=Ce.maxDigitWidth,We=Ce.pixelRatio,qe=Ce.viewLineCount,Ge=fe.get(135),je=Ge==="inherit"?fe.get(134):Ge,it=je==="inherit"?fe.get(130):je,Ze=fe.get(133),dt=Ce.isDominatedByLongLines,at=fe.get(57),nt=fe.get(67).renderType!==0,Ct=fe.get(68),ht=fe.get(104),bt=fe.get(83),ft=fe.get(72),_t=fe.get(102),He=_t.verticalScrollbarSize,Te=_t.verticalHasArrows,Fe=_t.arrowSize,Ve=_t.horizontalScrollbarSize,Ye=fe.get(43),st=fe.get(109)!=="never";let ot=fe.get(65);Ye&&st&&(ot+=16);let Ue=0;if(nt){const wt=Math.max(_e,Ct);Ue=Math.round(wt*Oe)}let Ne=0;at&&(Ne=Se*Ce.glyphMarginDecorationLaneCount);let xe=0,ze=xe+Ne,Ke=ze+Ue,Xe=Ke+ot;const Qe=Me-Ne-Ue-ot;let rt=!1,Je=!1,et=-1;je==="inherit"&&dt?(rt=!0,Je=!0):it==="on"||it==="bounded"?Je=!0:it==="wordWrapColumn"&&(et=Ze);const tt=F._computeMinimapLayout({outerWidth:Me,outerHeight:Pe,lineHeight:Se,typicalHalfwidthCharacterWidth:ke,pixelRatio:We,scrollBeyondLastLine:ht,paddingTop:bt.top,paddingBottom:bt.bottom,minimap:ft,verticalScrollbarWidth:He,viewLineCount:qe,remainingWidth:Qe,isViewportWrapping:Je},Ce.memory||new v);tt.renderMinimap!==0&&tt.minimapLeft===0&&(xe+=tt.minimapWidth,ze+=tt.minimapWidth,Ke+=tt.minimapWidth,Xe+=tt.minimapWidth);const ct=Qe-tt.minimapWidth,St=Math.max(1,Math.floor((ct-He-2)/ke)),lt=Te?Fe:0;return Je&&(et=Math.max(1,St),it==="bounded"&&(et=Math.min(et,Ze))),{width:Me,height:Pe,glyphMarginLeft:xe,glyphMarginWidth:Ne,glyphMarginDecorationLaneCount:Ce.glyphMarginDecorationLaneCount,lineNumbersLeft:ze,lineNumbersWidth:Ue,decorationsLeft:Ke,decorationsWidth:ot,contentLeft:Xe,contentWidth:ct,minimap:tt,viewportColumn:St,isWordWrapMinified:rt,isViewportWrapping:Je,wrappingColumn:et,verticalScrollbarWidth:He,horizontalScrollbarHeight:Ve,overviewRuler:{top:lt,width:He,height:Pe-2*lt,right:0}}}}e.EditorLayoutInfoComputer=F;class G extends C{constructor(){super(137,"wrappingStrategy","simple",{"editor.wrappingStrategy":{enumDescriptions:[m.localize(47,null),m.localize(48,null)],type:"string",enum:["simple","advanced"],default:"simple",description:m.localize(49,null)}})}validate(fe){return a(fe,"simple",["simple","advanced"])}compute(fe,Ce,Me){return Ce.get(2)===2?"advanced":Me}}class Y extends C{constructor(){const fe={enabled:!0};super(64,"lightbulb",fe,{"editor.lightbulb.enabled":{type:"boolean",default:fe.enabled,description:m.localize(50,null)}})}validate(fe){return!fe||typeof fe!="object"?this.defaultValue:{enabled:r(fe.enabled,this.defaultValue.enabled)}}}class ne extends C{constructor(){const fe={enabled:!1,maxLineCount:5,defaultModel:"outlineModel",scrollWithEditor:!0};super(114,"stickyScroll",fe,{"editor.stickyScroll.enabled":{type:"boolean",default:fe.enabled,description:m.localize(51,null)},"editor.stickyScroll.maxLineCount":{type:"number",default:fe.maxLineCount,minimum:1,maximum:10,description:m.localize(52,null)},"editor.stickyScroll.defaultModel":{type:"string",enum:["outlineModel","foldingProviderModel","indentationModel"],default:fe.defaultModel,description:m.localize(53,null)},"editor.stickyScroll.scrollWithEditor":{type:"boolean",default:fe.scrollWithEditor,description:m.localize(54,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),maxLineCount:d.clampedInt(Ce.maxLineCount,this.defaultValue.maxLineCount,1,10),defaultModel:a(Ce.defaultModel,this.defaultValue.defaultModel,["outlineModel","foldingProviderModel","indentationModel"]),scrollWithEditor:r(Ce.scrollWithEditor,this.defaultValue.scrollWithEditor)}}}class se extends C{constructor(){const fe={enabled:"on",fontSize:0,fontFamily:"",padding:!1};super(139,"inlayHints",fe,{"editor.inlayHints.enabled":{type:"string",default:fe.enabled,description:m.localize(55,null),enum:["on","onUnlessPressed","offUnlessPressed","off"],markdownEnumDescriptions:[m.localize(56,null),m.localize(57,null,y.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),m.localize(58,null,y.isMacintosh?"Ctrl+Option":"Ctrl+Alt"),m.localize(59,null)]},"editor.inlayHints.fontSize":{type:"number",default:fe.fontSize,markdownDescription:m.localize(60,null,"`#editor.fontSize#`","`5`")},"editor.inlayHints.fontFamily":{type:"string",default:fe.fontFamily,markdownDescription:m.localize(61,null,"`#editor.fontFamily#`")},"editor.inlayHints.padding":{type:"boolean",default:fe.padding,description:m.localize(62,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return typeof Ce.enabled=="boolean"&&(Ce.enabled=Ce.enabled?"on":"off"),{enabled:a(Ce.enabled,this.defaultValue.enabled,["on","off","offUnlessPressed","onUnlessPressed"]),fontSize:d.clampedInt(Ce.fontSize,this.defaultValue.fontSize,0,100),fontFamily:c.string(Ce.fontFamily,this.defaultValue.fontFamily),padding:r(Ce.padding,this.defaultValue.padding)}}}class J extends C{constructor(){super(65,"lineDecorationsWidth",10)}validate(fe){return typeof fe=="string"&&/^\d+(\.\d+)?ch$/.test(fe)?-parseFloat(fe.substring(0,fe.length-2)):d.clampedInt(fe,this.defaultValue,0,1e3)}compute(fe,Ce,Me){return Me<0?d.clampedInt(-Me*fe.fontInfo.typicalHalfwidthCharacterWidth,this.defaultValue,0,1e3):Me}}class q extends o{constructor(){super(66,"lineHeight",e.EDITOR_FONT_DEFAULTS.lineHeight,fe=>o.clamp(fe,0,150),{markdownDescription:m.localize(63,null)})}compute(fe,Ce,Me){return fe.fontInfo.lineHeight}}class H extends C{constructor(){const fe={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",autohide:!1,renderCharacters:!0,maxColumn:120,scale:1};super(72,"minimap",fe,{"editor.minimap.enabled":{type:"boolean",default:fe.enabled,description:m.localize(64,null)},"editor.minimap.autohide":{type:"boolean",default:fe.autohide,description:m.localize(65,null)},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[m.localize(66,null),m.localize(67,null),m.localize(68,null)],default:fe.size,description:m.localize(69,null)},"editor.minimap.side":{type:"string",enum:["left","right"],default:fe.side,description:m.localize(70,null)},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:fe.showSlider,description:m.localize(71,null)},"editor.minimap.scale":{type:"number",default:fe.scale,minimum:1,maximum:3,enum:[1,2,3],description:m.localize(72,null)},"editor.minimap.renderCharacters":{type:"boolean",default:fe.renderCharacters,description:m.localize(73,null)},"editor.minimap.maxColumn":{type:"number",default:fe.maxColumn,description:m.localize(74,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),autohide:r(Ce.autohide,this.defaultValue.autohide),size:a(Ce.size,this.defaultValue.size,["proportional","fill","fit"]),side:a(Ce.side,this.defaultValue.side,["right","left"]),showSlider:a(Ce.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:r(Ce.renderCharacters,this.defaultValue.renderCharacters),scale:d.clampedInt(Ce.scale,1,1,3),maxColumn:d.clampedInt(Ce.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function V(De){return De==="ctrlCmd"?y.isMacintosh?"metaKey":"ctrlKey":"altKey"}class Z extends C{constructor(){super(83,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:m.localize(75,null)},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:m.localize(76,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{top:d.clampedInt(Ce.top,0,0,1e3),bottom:d.clampedInt(Ce.bottom,0,0,1e3)}}}class ee extends C{constructor(){const fe={enabled:!0,cycle:!0};super(85,"parameterHints",fe,{"editor.parameterHints.enabled":{type:"boolean",default:fe.enabled,description:m.localize(77,null)},"editor.parameterHints.cycle":{type:"boolean",default:fe.cycle,description:m.localize(78,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),cycle:r(Ce.cycle,this.defaultValue.cycle)}}}class le extends n{constructor(){super(141)}compute(fe,Ce,Me){return fe.pixelRatio}}class ue extends C{constructor(){const fe={other:"on",comments:"off",strings:"off"},Ce=[{type:"boolean"},{type:"string",enum:["on","inline","off"],enumDescriptions:[m.localize(79,null),m.localize(80,null),m.localize(81,null)]}];super(88,"quickSuggestions",fe,{type:"object",additionalProperties:!1,properties:{strings:{anyOf:Ce,default:fe.strings,description:m.localize(82,null)},comments:{anyOf:Ce,default:fe.comments,description:m.localize(83,null)},other:{anyOf:Ce,default:fe.other,description:m.localize(84,null)}},default:fe,markdownDescription:m.localize(85,null,"#editor.suggestOnTriggerCharacters#")}),this.defaultValue=fe}validate(fe){if(typeof fe=="boolean"){const We=fe?"on":"off";return{comments:We,strings:We,other:We}}if(!fe||typeof fe!="object")return this.defaultValue;const{other:Ce,comments:Me,strings:Pe}=fe,Se=["on","inline","off"];let _e,ke,Oe;return typeof Ce=="boolean"?_e=Ce?"on":"off":_e=a(Ce,this.defaultValue.other,Se),typeof Me=="boolean"?ke=Me?"on":"off":ke=a(Me,this.defaultValue.comments,Se),typeof Pe=="boolean"?Oe=Pe?"on":"off":Oe=a(Pe,this.defaultValue.strings,Se),{other:_e,comments:ke,strings:Oe}}}class de extends C{constructor(){super(67,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[m.localize(86,null),m.localize(87,null),m.localize(88,null),m.localize(89,null)],default:"on",description:m.localize(90,null)})}validate(fe){let Ce=this.defaultValue.renderType,Me=this.defaultValue.renderFn;return typeof fe<"u"&&(typeof fe=="function"?(Ce=4,Me=fe):fe==="interval"?Ce=3:fe==="relative"?Ce=2:fe==="on"?Ce=1:Ce=0),{renderType:Ce,renderFn:Me}}}function ce(De){const fe=De.get(97);return fe==="editable"?De.get(90):fe!=="on"}e.filterValidationDecorations=ce;class ae extends C{constructor(){const fe=[],Ce={type:"number",description:m.localize(91,null)};super(101,"rulers",fe,{type:"array",items:{anyOf:[Ce,{type:["object"],properties:{column:Ce,color:{type:"string",description:m.localize(92,null),format:"color-hex"}}}]},default:fe,description:m.localize(93,null)})}validate(fe){if(Array.isArray(fe)){const Ce=[];for(const Me of fe)if(typeof Me=="number")Ce.push({column:d.clampedInt(Me,0,0,1e4),color:null});else if(Me&&typeof Me=="object"){const Pe=Me;Ce.push({column:d.clampedInt(Pe.column,0,0,1e4),color:Pe.color})}return Ce.sort((Me,Pe)=>Me.column-Pe.column),Ce}return this.defaultValue}}class X extends C{constructor(){super(91,"readOnlyMessage",void 0)}validate(fe){return!fe||typeof fe!="object"?this.defaultValue:fe}}function K(De,fe){if(typeof De!="string")return fe;switch(De){case"hidden":return 2;case"visible":return 3;default:return 1}}class z extends C{constructor(){const fe={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(102,"scrollbar",fe,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m.localize(94,null),m.localize(95,null),m.localize(96,null)],default:"auto",description:m.localize(97,null)},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m.localize(98,null),m.localize(99,null),m.localize(100,null)],default:"auto",description:m.localize(101,null)},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:fe.verticalScrollbarSize,description:m.localize(102,null)},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:fe.horizontalScrollbarSize,description:m.localize(103,null)},"editor.scrollbar.scrollByPage":{type:"boolean",default:fe.scrollByPage,description:m.localize(104,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe,Me=d.clampedInt(Ce.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),Pe=d.clampedInt(Ce.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:d.clampedInt(Ce.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:K(Ce.vertical,this.defaultValue.vertical),horizontal:K(Ce.horizontal,this.defaultValue.horizontal),useShadows:r(Ce.useShadows,this.defaultValue.useShadows),verticalHasArrows:r(Ce.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:r(Ce.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:r(Ce.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:r(Ce.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:Me,horizontalSliderSize:d.clampedInt(Ce.horizontalSliderSize,Me,0,1e3),verticalScrollbarSize:Pe,verticalSliderSize:d.clampedInt(Ce.verticalSliderSize,Pe,0,1e3),scrollByPage:r(Ce.scrollByPage,this.defaultValue.scrollByPage)}}}e.inUntrustedWorkspace="inUntrustedWorkspace",e.unicodeHighlightConfigKeys={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};class Q extends C{constructor(){const fe={nonBasicASCII:e.inUntrustedWorkspace,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:e.inUntrustedWorkspace,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(124,"unicodeHighlight",fe,{[e.unicodeHighlightConfigKeys.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.nonBasicASCII,description:m.localize(105,null)},[e.unicodeHighlightConfigKeys.invisibleCharacters]:{restricted:!0,type:"boolean",default:fe.invisibleCharacters,description:m.localize(106,null)},[e.unicodeHighlightConfigKeys.ambiguousCharacters]:{restricted:!0,type:"boolean",default:fe.ambiguousCharacters,description:m.localize(107,null)},[e.unicodeHighlightConfigKeys.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.includeComments,description:m.localize(108,null)},[e.unicodeHighlightConfigKeys.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,e.inUntrustedWorkspace],default:fe.includeStrings,description:m.localize(109,null)},[e.unicodeHighlightConfigKeys.allowedCharacters]:{restricted:!0,type:"object",default:fe.allowedCharacters,description:m.localize(110,null),additionalProperties:{type:"boolean"}},[e.unicodeHighlightConfigKeys.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:fe.allowedLocales,description:m.localize(111,null)}})}applyUpdate(fe,Ce){let Me=!1;Ce.allowedCharacters&&fe&&(I.equals(fe.allowedCharacters,Ce.allowedCharacters)||(fe=Object.assign(Object.assign({},fe),{allowedCharacters:Ce.allowedCharacters}),Me=!0)),Ce.allowedLocales&&fe&&(I.equals(fe.allowedLocales,Ce.allowedLocales)||(fe=Object.assign(Object.assign({},fe),{allowedLocales:Ce.allowedLocales}),Me=!0));const Pe=super.applyUpdate(fe,Ce);return Me?new s(Pe.newValue,!0):Pe}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{nonBasicASCII:he(Ce.nonBasicASCII,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),invisibleCharacters:r(Ce.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:r(Ce.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:he(Ce.includeComments,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),includeStrings:he(Ce.includeStrings,e.inUntrustedWorkspace,[!0,!1,e.inUntrustedWorkspace]),allowedCharacters:this.validateBooleanMap(fe.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(fe.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(fe,Ce){if(typeof fe!="object"||!fe)return Ce;const Me={};for(const[Pe,Se]of Object.entries(fe))Se===!0&&(Me[Pe]=!0);return Me}}class j extends C{constructor(){const fe={enabled:!0,mode:"subwordSmart",showToolbar:"onHover",suppressSuggestions:!1,keepOnBlur:!1};super(62,"inlineSuggest",fe,{"editor.inlineSuggest.enabled":{type:"boolean",default:fe.enabled,description:m.localize(112,null)},"editor.inlineSuggest.showToolbar":{type:"string",default:fe.showToolbar,enum:["always","onHover"],enumDescriptions:[m.localize(113,null),m.localize(114,null)],description:m.localize(115,null)},"editor.inlineSuggest.suppressSuggestions":{type:"boolean",default:fe.suppressSuggestions,description:m.localize(116,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),mode:a(Ce.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"]),showToolbar:a(Ce.showToolbar,this.defaultValue.showToolbar,["always","onHover"]),suppressSuggestions:r(Ce.suppressSuggestions,this.defaultValue.suppressSuggestions),keepOnBlur:r(Ce.keepOnBlur,this.defaultValue.keepOnBlur)}}}class re extends C{constructor(){const fe={enabled:D.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.enabled,independentColorPoolPerBracketType:D.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions.independentColorPoolPerBracketType};super(15,"bracketPairColorization",fe,{"editor.bracketPairColorization.enabled":{type:"boolean",default:fe.enabled,markdownDescription:m.localize(117,null,"`#workbench.colorCustomizations#`")},"editor.bracketPairColorization.independentColorPoolPerBracketType":{type:"boolean",default:fe.independentColorPoolPerBracketType,description:m.localize(118,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),independentColorPoolPerBracketType:r(Ce.independentColorPoolPerBracketType,this.defaultValue.independentColorPoolPerBracketType)}}}class oe extends C{constructor(){const fe={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(16,"guides",fe,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[m.localize(119,null),m.localize(120,null),m.localize(121,null)],default:fe.bracketPairs,description:m.localize(122,null)},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[m.localize(123,null),m.localize(124,null),m.localize(125,null)],default:fe.bracketPairsHorizontal,description:m.localize(126,null)},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:fe.highlightActiveBracketPair,description:m.localize(127,null)},"editor.guides.indentation":{type:"boolean",default:fe.indentation,description:m.localize(128,null)},"editor.guides.highlightActiveIndentation":{type:["boolean","string"],enum:[!0,"always",!1],enumDescriptions:[m.localize(129,null),m.localize(130,null),m.localize(131,null)],default:fe.highlightActiveIndentation,description:m.localize(132,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{bracketPairs:he(Ce.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:he(Ce.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:r(Ce.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:r(Ce.indentation,this.defaultValue.indentation),highlightActiveIndentation:he(Ce.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation,[!0,!1,"always"])}}}function he(De,fe,Ce){const Me=Ce.indexOf(De);return Me===-1?fe:Ce[Me]}class me extends C{constructor(){const fe={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!1,localityBonus:!1,shareSuggestSelections:!1,selectionMode:"always",showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,matchOnWordStartOnly:!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};super(117,"suggest",fe,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[m.localize(133,null),m.localize(134,null)],default:fe.insertMode,description:m.localize(135,null)},"editor.suggest.filterGraceful":{type:"boolean",default:fe.filterGraceful,description:m.localize(136,null)},"editor.suggest.localityBonus":{type:"boolean",default:fe.localityBonus,description:m.localize(137,null)},"editor.suggest.shareSuggestSelections":{type:"boolean",default:fe.shareSuggestSelections,markdownDescription:m.localize(138,null)},"editor.suggest.selectionMode":{type:"string",enum:["always","never","whenTriggerCharacter","whenQuickSuggestion"],enumDescriptions:[m.localize(139,null),m.localize(140,null),m.localize(141,null),m.localize(142,null)],default:fe.selectionMode,markdownDescription:m.localize(143,null)},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:fe.snippetsPreventQuickSuggestions,description:m.localize(144,null)},"editor.suggest.showIcons":{type:"boolean",default:fe.showIcons,description:m.localize(145,null)},"editor.suggest.showStatusBar":{type:"boolean",default:fe.showStatusBar,description:m.localize(146,null)},"editor.suggest.preview":{type:"boolean",default:fe.preview,description:m.localize(147,null)},"editor.suggest.showInlineDetails":{type:"boolean",default:fe.showInlineDetails,description:m.localize(148,null)},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:m.localize(149,null)},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:m.localize(150,null)},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:m.localize(151,null)},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:m.localize(152,null)},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:m.localize(153,null)},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:m.localize(154,null)},"editor.suggest.matchOnWordStartOnly":{type:"boolean",default:!0,markdownDescription:m.localize(155,null)},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:m.localize(156,null)},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:m.localize(157,null)},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:m.localize(158,null)},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:m.localize(159,null)},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:m.localize(160,null)},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:m.localize(161,null)},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:m.localize(162,null)},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:m.localize(163,null)},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:m.localize(164,null)},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:m.localize(165,null)},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:m.localize(166,null)},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:m.localize(167,null)},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:m.localize(168,null)},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:m.localize(169,null)},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:m.localize(170,null)},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:m.localize(171,null)},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:m.localize(172,null)},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:m.localize(173,null)},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:m.localize(174,null)},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:m.localize(175,null)},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:m.localize(176,null)},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:m.localize(177,null)},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:m.localize(178,null)},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:m.localize(179,null)},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:m.localize(180,null)}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{insertMode:a(Ce.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:r(Ce.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:r(Ce.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:r(Ce.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:r(Ce.shareSuggestSelections,this.defaultValue.shareSuggestSelections),selectionMode:a(Ce.selectionMode,this.defaultValue.selectionMode,["always","never","whenQuickSuggestion","whenTriggerCharacter"]),showIcons:r(Ce.showIcons,this.defaultValue.showIcons),showStatusBar:r(Ce.showStatusBar,this.defaultValue.showStatusBar),preview:r(Ce.preview,this.defaultValue.preview),previewMode:a(Ce.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:r(Ce.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:r(Ce.showMethods,this.defaultValue.showMethods),showFunctions:r(Ce.showFunctions,this.defaultValue.showFunctions),showConstructors:r(Ce.showConstructors,this.defaultValue.showConstructors),showDeprecated:r(Ce.showDeprecated,this.defaultValue.showDeprecated),matchOnWordStartOnly:r(Ce.matchOnWordStartOnly,this.defaultValue.matchOnWordStartOnly),showFields:r(Ce.showFields,this.defaultValue.showFields),showVariables:r(Ce.showVariables,this.defaultValue.showVariables),showClasses:r(Ce.showClasses,this.defaultValue.showClasses),showStructs:r(Ce.showStructs,this.defaultValue.showStructs),showInterfaces:r(Ce.showInterfaces,this.defaultValue.showInterfaces),showModules:r(Ce.showModules,this.defaultValue.showModules),showProperties:r(Ce.showProperties,this.defaultValue.showProperties),showEvents:r(Ce.showEvents,this.defaultValue.showEvents),showOperators:r(Ce.showOperators,this.defaultValue.showOperators),showUnits:r(Ce.showUnits,this.defaultValue.showUnits),showValues:r(Ce.showValues,this.defaultValue.showValues),showConstants:r(Ce.showConstants,this.defaultValue.showConstants),showEnums:r(Ce.showEnums,this.defaultValue.showEnums),showEnumMembers:r(Ce.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:r(Ce.showKeywords,this.defaultValue.showKeywords),showWords:r(Ce.showWords,this.defaultValue.showWords),showColors:r(Ce.showColors,this.defaultValue.showColors),showFiles:r(Ce.showFiles,this.defaultValue.showFiles),showReferences:r(Ce.showReferences,this.defaultValue.showReferences),showFolders:r(Ce.showFolders,this.defaultValue.showFolders),showTypeParameters:r(Ce.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:r(Ce.showSnippets,this.defaultValue.showSnippets),showUsers:r(Ce.showUsers,this.defaultValue.showUsers),showIssues:r(Ce.showIssues,this.defaultValue.showIssues)}}}class pe extends C{constructor(){super(112,"smartSelect",{selectLeadingAndTrailingWhitespace:!0,selectSubwords:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:m.localize(181,null),default:!0,type:"boolean"},"editor.smartSelect.selectSubwords":{description:m.localize(182,null),default:!0,type:"boolean"}})}validate(fe){return!fe||typeof fe!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:r(fe.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace),selectSubwords:r(fe.selectSubwords,this.defaultValue.selectSubwords)}}}class ve extends C{constructor(){super(136,"wrappingIndent",1,{"editor.wrappingIndent":{type:"string",enum:["none","same","indent","deepIndent"],enumDescriptions:[m.localize(183,null),m.localize(184,null),m.localize(185,null),m.localize(186,null)],description:m.localize(187,null),default:"same"}})}validate(fe){switch(fe){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}return 1}compute(fe,Ce,Me){return Ce.get(2)===2?0:Me}}class we extends n{constructor(){super(144)}compute(fe,Ce,Me){const Pe=Ce.get(143);return{isDominatedByLongLines:fe.isDominatedByLongLines,isWordWrapMinified:Pe.isWordWrapMinified,isViewportWrapping:Pe.isViewportWrapping,wrappingColumn:Pe.wrappingColumn}}}class Le extends C{constructor(){const fe={enabled:!0,showDropSelector:"afterDrop"};super(36,"dropIntoEditor",fe,{"editor.dropIntoEditor.enabled":{type:"boolean",default:fe.enabled,markdownDescription:m.localize(188,null)},"editor.dropIntoEditor.showDropSelector":{type:"string",markdownDescription:m.localize(189,null),enum:["afterDrop","never"],enumDescriptions:[m.localize(190,null),m.localize(191,null)],default:"afterDrop"}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),showDropSelector:a(Ce.showDropSelector,this.defaultValue.showDropSelector,["afterDrop","never"])}}}class Ee extends C{constructor(){const fe={enabled:!0,showPasteSelector:"afterPaste"};super(84,"pasteAs",fe,{"editor.pasteAs.enabled":{type:"boolean",default:fe.enabled,markdownDescription:m.localize(192,null)},"editor.pasteAs.showPasteSelector":{type:"string",markdownDescription:m.localize(193,null),enum:["afterPaste","never"],enumDescriptions:[m.localize(194,null),m.localize(195,null)],default:"afterPaste"}})}validate(fe){if(!fe||typeof fe!="object")return this.defaultValue;const Ce=fe;return{enabled:r(Ce.enabled,this.defaultValue.enabled),showPasteSelector:a(Ce.showPasteSelector,this.defaultValue.showPasteSelector,["afterPaste","never"])}}}const Ae="Consolas, 'Courier New', monospace",Re="Menlo, Monaco, 'Courier New', monospace",Be="'Droid Sans Mono', 'monospace', monospace";e.EDITOR_FONT_DEFAULTS={fontFamily:y.isMacintosh?Re:y.isLinux?Be:Ae,fontWeight:"normal",fontSize:y.isMacintosh?12:14,lineHeight:0,letterSpacing:0},e.editorOptionsRegistry=[];function ye(De){return e.editorOptionsRegistry[De.id]=De,De}e.EditorOptions={acceptSuggestionOnCommitCharacter:ye(new u(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:m.localize(196,null)})),acceptSuggestionOnEnter:ye(new g(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",m.localize(197,null),""],markdownDescription:m.localize(198,null)})),accessibilitySupport:ye(new b),accessibilityPageSize:ye(new d(3,"accessibilityPageSize",10,1,1073741824,{description:m.localize(199,null),tags:["accessibility"]})),ariaLabel:ye(new c(4,"ariaLabel",m.localize(200,null))),ariaRequired:ye(new u(5,"ariaRequired",!1,void 0)),screenReaderAnnounceInlineSuggestion:ye(new u(8,"screenReaderAnnounceInlineSuggestion",!0,{description:m.localize(201,null),tags:["accessibility"]})),autoClosingBrackets:ye(new g(6,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m.localize(202,null),m.localize(203,null),""],description:m.localize(204,null)})),autoClosingComments:ye(new g(7,"autoClosingComments","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m.localize(205,null),m.localize(206,null),""],description:m.localize(207,null)})),autoClosingDelete:ye(new g(9,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",m.localize(208,null),""],description:m.localize(209,null)})),autoClosingOvertype:ye(new g(10,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",m.localize(210,null),""],description:m.localize(211,null)})),autoClosingQuotes:ye(new g(11,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m.localize(212,null),m.localize(213,null),""],description:m.localize(214,null)})),autoIndent:ye(new h(12,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],p,{enumDescriptions:[m.localize(215,null),m.localize(216,null),m.localize(217,null),m.localize(218,null),m.localize(219,null)],description:m.localize(220,null)})),automaticLayout:ye(new u(13,"automaticLayout",!1)),autoSurround:ye(new g(14,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[m.localize(221,null),m.localize(222,null),m.localize(223,null),""],description:m.localize(224,null)})),bracketPairColorization:ye(new re),bracketPairGuides:ye(new oe),stickyTabStops:ye(new u(115,"stickyTabStops",!1,{description:m.localize(225,null)})),codeLens:ye(new u(17,"codeLens",!0,{description:m.localize(226,null)})),codeLensFontFamily:ye(new c(18,"codeLensFontFamily","",{description:m.localize(227,null)})),codeLensFontSize:ye(new d(19,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:m.localize(228,null)})),colorDecorators:ye(new u(20,"colorDecorators",!0,{description:m.localize(229,null)})),colorDecoratorActivatedOn:ye(new g(146,"colorDecoratorsActivatedOn","clickAndHover",["clickAndHover","hover","click"],{enumDescriptions:[m.localize(230,null),m.localize(231,null),m.localize(232,null)],description:m.localize(233,null)})),colorDecoratorsLimit:ye(new d(21,"colorDecoratorsLimit",500,1,1e6,{markdownDescription:m.localize(234,null)})),columnSelection:ye(new u(22,"columnSelection",!1,{description:m.localize(235,null)})),comments:ye(new w),contextmenu:ye(new u(24,"contextmenu",!0)),copyWithSyntaxHighlighting:ye(new u(25,"copyWithSyntaxHighlighting",!0,{description:m.localize(236,null)})),cursorBlinking:ye(new h(26,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],E,{description:m.localize(237,null)})),cursorSmoothCaretAnimation:ye(new g(27,"cursorSmoothCaretAnimation","off",["off","explicit","on"],{enumDescriptions:[m.localize(238,null),m.localize(239,null),m.localize(240,null)],description:m.localize(241,null)})),cursorStyle:ye(new h(28,"cursorStyle",k.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],M,{description:m.localize(242,null)})),cursorSurroundingLines:ye(new d(29,"cursorSurroundingLines",0,0,1073741824,{description:m.localize(243,null)})),cursorSurroundingLinesStyle:ye(new g(30,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[m.localize(244,null),m.localize(245,null)],markdownDescription:m.localize(246,null)})),cursorWidth:ye(new d(31,"cursorWidth",0,0,1073741824,{markdownDescription:m.localize(247,null)})),disableLayerHinting:ye(new u(32,"disableLayerHinting",!1)),disableMonospaceOptimizations:ye(new u(33,"disableMonospaceOptimizations",!1)),domReadOnly:ye(new u(34,"domReadOnly",!1)),dragAndDrop:ye(new u(35,"dragAndDrop",!0,{description:m.localize(248,null)})),emptySelectionClipboard:ye(new B),dropIntoEditor:ye(new Le),stickyScroll:ye(new ne),experimentalWhitespaceRendering:ye(new g(38,"experimentalWhitespaceRendering","svg",["svg","font","off"],{enumDescriptions:[m.localize(249,null),m.localize(250,null),m.localize(251,null)],description:m.localize(252,null)})),extraEditorClassName:ye(new c(39,"extraEditorClassName","")),fastScrollSensitivity:ye(new o(40,"fastScrollSensitivity",5,De=>De<=0?5:De,{markdownDescription:m.localize(253,null)})),find:ye(new T),fixedOverflowWidgets:ye(new u(42,"fixedOverflowWidgets",!1)),folding:ye(new u(43,"folding",!0,{description:m.localize(254,null)})),foldingStrategy:ye(new g(44,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[m.localize(255,null),m.localize(256,null)],description:m.localize(257,null)})),foldingHighlight:ye(new u(45,"foldingHighlight",!0,{description:m.localize(258,null)})),foldingImportsByDefault:ye(new u(46,"foldingImportsByDefault",!1,{description:m.localize(259,null)})),foldingMaximumRegions:ye(new d(47,"foldingMaximumRegions",5e3,10,65e3,{description:m.localize(260,null)})),unfoldOnClickAfterEndOfLine:ye(new u(48,"unfoldOnClickAfterEndOfLine",!1,{description:m.localize(261,null)})),fontFamily:ye(new c(49,"fontFamily",e.EDITOR_FONT_DEFAULTS.fontFamily,{description:m.localize(262,null)})),fontInfo:ye(new P),fontLigatures2:ye(new N),fontSize:ye(new O),fontWeight:ye(new x),fontVariations:ye(new A),formatOnPaste:ye(new u(55,"formatOnPaste",!1,{description:m.localize(263,null)})),formatOnType:ye(new u(56,"formatOnType",!1,{description:m.localize(264,null)})),glyphMargin:ye(new u(57,"glyphMargin",!0,{description:m.localize(265,null)})),gotoLocation:ye(new W),hideCursorInOverviewRuler:ye(new u(59,"hideCursorInOverviewRuler",!1,{description:m.localize(266,null)})),hover:ye(new U),inDiffEditor:ye(new u(61,"inDiffEditor",!1)),letterSpacing:ye(new o(63,"letterSpacing",e.EDITOR_FONT_DEFAULTS.letterSpacing,De=>o.clamp(De,-5,20),{description:m.localize(267,null)})),lightbulb:ye(new Y),lineDecorationsWidth:ye(new J),lineHeight:ye(new q),lineNumbers:ye(new de),lineNumbersMinChars:ye(new d(68,"lineNumbersMinChars",5,1,300)),linkedEditing:ye(new u(69,"linkedEditing",!1,{description:m.localize(268,null)})),links:ye(new u(70,"links",!0,{description:m.localize(269,null)})),matchBrackets:ye(new g(71,"matchBrackets","always",["always","near","never"],{description:m.localize(270,null)})),minimap:ye(new H),mouseStyle:ye(new g(73,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:ye(new o(74,"mouseWheelScrollSensitivity",1,De=>De===0?1:De,{markdownDescription:m.localize(271,null)})),mouseWheelZoom:ye(new u(75,"mouseWheelZoom",!1,{markdownDescription:m.localize(272,null)})),multiCursorMergeOverlapping:ye(new u(76,"multiCursorMergeOverlapping",!0,{description:m.localize(273,null)})),multiCursorModifier:ye(new h(77,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],V,{markdownEnumDescriptions:[m.localize(274,null),m.localize(275,null)],markdownDescription:m.localize(276,null)})),multiCursorPaste:ye(new g(78,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[m.localize(277,null),m.localize(278,null)],markdownDescription:m.localize(279,null)})),multiCursorLimit:ye(new d(79,"multiCursorLimit",1e4,1,1e5,{markdownDescription:m.localize(280,null)})),occurrencesHighlight:ye(new u(80,"occurrencesHighlight",!0,{description:m.localize(281,null)})),overviewRulerBorder:ye(new u(81,"overviewRulerBorder",!0,{description:m.localize(282,null)})),overviewRulerLanes:ye(new d(82,"overviewRulerLanes",3,0,3)),padding:ye(new Z),pasteAs:ye(new Ee),parameterHints:ye(new ee),peekWidgetDefaultFocus:ye(new g(86,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[m.localize(283,null),m.localize(284,null)],description:m.localize(285,null)})),definitionLinkOpensInPeek:ye(new u(87,"definitionLinkOpensInPeek",!1,{description:m.localize(286,null)})),quickSuggestions:ye(new ue),quickSuggestionsDelay:ye(new d(89,"quickSuggestionsDelay",10,0,1073741824,{description:m.localize(287,null)})),readOnly:ye(new u(90,"readOnly",!1)),readOnlyMessage:ye(new X),renameOnType:ye(new u(92,"renameOnType",!1,{description:m.localize(288,null),markdownDeprecationMessage:m.localize(289,null)})),renderControlCharacters:ye(new u(93,"renderControlCharacters",!0,{description:m.localize(290,null),restricted:!0})),renderFinalNewline:ye(new g(94,"renderFinalNewline",y.isLinux?"dimmed":"on",["off","on","dimmed"],{description:m.localize(291,null)})),renderLineHighlight:ye(new g(95,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",m.localize(292,null)],description:m.localize(293,null)})),renderLineHighlightOnlyWhenFocus:ye(new u(96,"renderLineHighlightOnlyWhenFocus",!1,{description:m.localize(294,null)})),renderValidationDecorations:ye(new g(97,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:ye(new g(98,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",m.localize(295,null),m.localize(296,null),m.localize(297,null),""],description:m.localize(298,null)})),revealHorizontalRightPadding:ye(new d(99,"revealHorizontalRightPadding",15,0,1e3)),roundedSelection:ye(new u(100,"roundedSelection",!0,{description:m.localize(299,null)})),rulers:ye(new ae),scrollbar:ye(new z),scrollBeyondLastColumn:ye(new d(103,"scrollBeyondLastColumn",4,0,1073741824,{description:m.localize(300,null)})),scrollBeyondLastLine:ye(new u(104,"scrollBeyondLastLine",!0,{description:m.localize(301,null)})),scrollPredominantAxis:ye(new u(105,"scrollPredominantAxis",!0,{description:m.localize(302,null)})),selectionClipboard:ye(new u(106,"selectionClipboard",!0,{description:m.localize(303,null),included:y.isLinux})),selectionHighlight:ye(new u(107,"selectionHighlight",!0,{description:m.localize(304,null)})),selectOnLineNumbers:ye(new u(108,"selectOnLineNumbers",!0)),showFoldingControls:ye(new g(109,"showFoldingControls","mouseover",["always","never","mouseover"],{enumDescriptions:[m.localize(305,null),m.localize(306,null),m.localize(307,null)],description:m.localize(308,null)})),showUnused:ye(new u(110,"showUnused",!0,{description:m.localize(309,null)})),showDeprecated:ye(new u(138,"showDeprecated",!0,{description:m.localize(310,null)})),inlayHints:ye(new se),snippetSuggestions:ye(new g(111,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[m.localize(311,null),m.localize(312,null),m.localize(313,null),m.localize(314,null)],description:m.localize(315,null)})),smartSelect:ye(new pe),smoothScrolling:ye(new u(113,"smoothScrolling",!1,{description:m.localize(316,null)})),stopRenderingLineAfter:ye(new d(116,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:ye(new me),inlineSuggest:ye(new j),inlineCompletionsAccessibilityVerbose:ye(new u(147,"inlineCompletionsAccessibilityVerbose",!1,{description:m.localize(317,null)})),suggestFontSize:ye(new d(118,"suggestFontSize",0,0,1e3,{markdownDescription:m.localize(318,null,"`0`","`#editor.fontSize#`")})),suggestLineHeight:ye(new d(119,"suggestLineHeight",0,0,1e3,{markdownDescription:m.localize(319,null,"`0`","`#editor.lineHeight#`")})),suggestOnTriggerCharacters:ye(new u(120,"suggestOnTriggerCharacters",!0,{description:m.localize(320,null)})),suggestSelection:ye(new g(121,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[m.localize(321,null),m.localize(322,null),m.localize(323,null)],description:m.localize(324,null)})),tabCompletion:ye(new g(122,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[m.localize(325,null),m.localize(326,null),m.localize(327,null)],description:m.localize(328,null)})),tabIndex:ye(new d(123,"tabIndex",0,-1,1073741824)),unicodeHighlight:ye(new Q),unusualLineTerminators:ye(new g(125,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m.localize(329,null),m.localize(330,null),m.localize(331,null)],description:m.localize(332,null)})),useShadowDOM:ye(new u(126,"useShadowDOM",!0)),useTabStops:ye(new u(127,"useTabStops",!0,{description:m.localize(333,null)})),wordBreak:ye(new g(128,"wordBreak","normal",["normal","keepAll"],{markdownEnumDescriptions:[m.localize(334,null),m.localize(335,null)],description:m.localize(336,null)})),wordSeparators:ye(new c(129,"wordSeparators",S.USUAL_WORD_SEPARATORS,{description:m.localize(337,null)})),wordWrap:ye(new g(130,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m.localize(338,null),m.localize(339,null),m.localize(340,null),m.localize(341,null)],description:m.localize(342,null)})),wordWrapBreakAfterCharacters:ye(new c(131,"wordWrapBreakAfterCharacters"," })]?|/&.,;\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:ye(new c(132,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:ye(new d(133,"wordWrapColumn",80,1,1073741824,{markdownDescription:m.localize(343,null)})),wordWrapOverride1:ye(new g(134,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:ye(new g(135,"wordWrapOverride2","inherit",["off","on","inherit"])),editorClassName:ye(new R),defaultColorDecorators:ye(new u(145,"defaultColorDecorators",!1,{markdownDescription:m.localize(344,null)})),pixelRatio:ye(new le),tabFocusMode:ye(new u(142,"tabFocusMode",!1,{markdownDescription:m.localize(345,null)})),layoutInfo:ye(new F),wrappingInfo:ye(new we),wrappingIndent:ye(new ve),wrappingStrategy:ye(new G)}}),define(te[620],ie([1,0,7,38,10,70,39,12,5,198]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursor=void 0;class C{constructor(n,t,r,u,f,d,l){this.top=n,this.left=t,this.paddingLeft=r,this.width=u,this.height=f,this.textContent=d,this.textContentClassName=l}}class s{constructor(n){this._context=n;const t=this._context.configuration.options,r=t.get(50);this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,I.createFastDomNode)(document.createElement("div")),this._domNode.setClassName(`cursor ${v.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,D.applyFontInfo)(this._domNode,r),this._domNode.setDisplay("none"),this._position=new m.Position(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(n){const t=this._context.configuration.options,r=t.get(50);return this._cursorStyle=t.get(28),this._lineHeight=t.get(66),this._typicalHalfwidthCharacterWidth=r.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(31),this._typicalHalfwidthCharacterWidth),(0,D.applyFontInfo)(this._domNode,r),!0}onCursorPositionChanged(n,t){return t?this._domNode.domNode.style.transitionProperty="none":this._domNode.domNode.style.transitionProperty="",this._position=n,!0}_getGraphemeAwarePosition(){const{lineNumber:n,column:t}=this._position,r=this._context.viewModel.getLineContent(n),[u,f]=y.getCharContainingOffset(r,t-1);return[new m.Position(n,u+1),r.substring(u,f)]}_prepareRender(n){let t="",r="";const[u,f]=this._getGraphemeAwarePosition();if(this._cursorStyle===S.TextEditorCursorStyle.Line||this._cursorStyle===S.TextEditorCursorStyle.LineThin){const h=n.visibleRangeForPosition(u);if(!h||h.outsideRenderedLine)return null;let p;this._cursorStyle===S.TextEditorCursorStyle.Line?(p=L.computeScreenAwareSize(this._lineCursorWidth>0?this._lineCursorWidth:2),p>2&&(t=f,r=this._getTokenClassName(u))):p=L.computeScreenAwareSize(1);let b=h.left,w=0;p>=2&&b>=1&&(w=1,b-=w);const E=n.getVerticalOffsetForLineNumber(u.lineNumber)-n.bigNumbersDelta;return new C(E,b,w,p,this._lineHeight,t,r)}const d=n.linesVisibleRangesForRange(new _.Range(u.lineNumber,u.column,u.lineNumber,u.column+f.length),!1);if(!d||d.length===0)return null;const l=d[0];if(l.outsideRenderedLine||l.ranges.length===0)return null;const o=l.ranges[0],c=f===" "?this._typicalHalfwidthCharacterWidth:o.width<1?this._typicalHalfwidthCharacterWidth:o.width;this._cursorStyle===S.TextEditorCursorStyle.Block&&(t=f,r=this._getTokenClassName(u));let a=n.getVerticalOffsetForLineNumber(u.lineNumber)-n.bigNumbersDelta,g=this._lineHeight;return(this._cursorStyle===S.TextEditorCursorStyle.Underline||this._cursorStyle===S.TextEditorCursorStyle.UnderlineThin)&&(a+=this._lineHeight-2,g=2),new C(a,o.left,0,c,g,t,r)}_getTokenClassName(n){const t=this._context.viewModel.getViewLineData(n.lineNumber),r=t.tokens.findTokenIndexAtOffset(n.column-1);return t.tokens.getClassName(r)}prepareRender(n){this._renderData=this._prepareRender(n)}render(n){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${v.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),this._domNode.setPaddingLeft(this._renderData.paddingLeft),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.ViewCursor=s}),define(te[621],ie([1,0,40,271,39]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorOptions=void 0;class D{get editorOptions(){return this._options}constructor(_,v){this.diffEditorWidth=v,this.couldShowInlineViewBecauseOfSize=(0,L.derived)(this,s=>this._options.read(s).renderSideBySide&&this.diffEditorWidth.read(s)<=this._options.read(s).renderSideBySideInlineBreakpoint),this.renderOverviewRuler=(0,L.derived)(this,s=>this._options.read(s).renderOverviewRuler),this.renderSideBySide=(0,L.derived)(this,s=>this._options.read(s).renderSideBySide&&!(this._options.read(s).useInlineViewWhenSpaceIsLimited&&this.couldShowInlineViewBecauseOfSize.read(s))),this.readOnly=(0,L.derived)(this,s=>this._options.read(s).readOnly),this.shouldRenderRevertArrows=(0,L.derived)(this,s=>!(!this._options.read(s).renderMarginRevertIcon||!this.renderSideBySide.read(s)||this.readOnly.read(s))),this.renderIndicators=(0,L.derived)(this,s=>this._options.read(s).renderIndicators),this.enableSplitViewResizing=(0,L.derived)(this,s=>this._options.read(s).enableSplitViewResizing),this.splitViewDefaultRatio=(0,L.derived)(this,s=>this._options.read(s).splitViewDefaultRatio),this.ignoreTrimWhitespace=(0,L.derived)(this,s=>this._options.read(s).ignoreTrimWhitespace),this.maxComputationTimeMs=(0,L.derived)(this,s=>this._options.read(s).maxComputationTime),this.showMoves=(0,L.derived)(this,s=>this._options.read(s).experimental.showMoves&&this.renderSideBySide.read(s)),this.isInEmbeddedEditor=(0,L.derived)(this,s=>this._options.read(s).isInEmbeddedEditor),this.diffWordWrap=(0,L.derived)(this,s=>this._options.read(s).diffWordWrap),this.originalEditable=(0,L.derived)(this,s=>this._options.read(s).originalEditable),this.diffCodeLens=(0,L.derived)(this,s=>this._options.read(s).diffCodeLens),this.accessibilityVerbose=(0,L.derived)(this,s=>this._options.read(s).accessibilityVerbose),this.diffAlgorithm=(0,L.derived)(this,s=>this._options.read(s).diffAlgorithm),this.showEmptyDecorations=(0,L.derived)(this,s=>this._options.read(s).experimental.showEmptyDecorations),this.onlyShowAccessibleDiffViewer=(0,L.derived)(this,s=>this._options.read(s).onlyShowAccessibleDiffViewer),this.hideUnchangedRegions=(0,L.derived)(this,s=>this._options.read(s).hideUnchangedRegions.enabled),this.hideUnchangedRegionsRevealLineCount=(0,L.derived)(this,s=>this._options.read(s).hideUnchangedRegions.revealLineCount),this.hideUnchangedRegionsContextLineCount=(0,L.derived)(this,s=>this._options.read(s).hideUnchangedRegions.contextLineCount),this.hideUnchangedRegionsMinimumLineCount=(0,L.derived)(this,s=>this._options.read(s).hideUnchangedRegions.minimumLineCount);const C=Object.assign(Object.assign({},_),S(_,I.diffEditorDefaultOptions));this._options=(0,L.observableValue)(this,C)}updateOptions(_){const v=S(_,this._options.get()),C=Object.assign(Object.assign(Object.assign({},this._options.get()),_),v);this._options.set(C,void 0,{changedOptions:_})}}e.DiffEditorOptions=D;function S(m,_){var v,C,s,i,n,t,r,u;return{enableSplitViewResizing:(0,y.boolean)(m.enableSplitViewResizing,_.enableSplitViewResizing),splitViewDefaultRatio:(0,y.clampedFloat)(m.splitViewDefaultRatio,.5,.1,.9),renderSideBySide:(0,y.boolean)(m.renderSideBySide,_.renderSideBySide),renderMarginRevertIcon:(0,y.boolean)(m.renderMarginRevertIcon,_.renderMarginRevertIcon),maxComputationTime:(0,y.clampedInt)(m.maxComputationTime,_.maxComputationTime,0,1073741824),maxFileSize:(0,y.clampedInt)(m.maxFileSize,_.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,y.boolean)(m.ignoreTrimWhitespace,_.ignoreTrimWhitespace),renderIndicators:(0,y.boolean)(m.renderIndicators,_.renderIndicators),originalEditable:(0,y.boolean)(m.originalEditable,_.originalEditable),diffCodeLens:(0,y.boolean)(m.diffCodeLens,_.diffCodeLens),renderOverviewRuler:(0,y.boolean)(m.renderOverviewRuler,_.renderOverviewRuler),diffWordWrap:(0,y.stringSet)(m.diffWordWrap,_.diffWordWrap,["off","on","inherit"]),diffAlgorithm:(0,y.stringSet)(m.diffAlgorithm,_.diffAlgorithm,["legacy","advanced"],{smart:"legacy",experimental:"advanced"}),accessibilityVerbose:(0,y.boolean)(m.accessibilityVerbose,_.accessibilityVerbose),experimental:{showMoves:(0,y.boolean)((v=m.experimental)===null||v===void 0?void 0:v.showMoves,_.experimental.showMoves),showEmptyDecorations:(0,y.boolean)((C=m.experimental)===null||C===void 0?void 0:C.showEmptyDecorations,_.experimental.showEmptyDecorations)},hideUnchangedRegions:{enabled:(0,y.boolean)((i=(s=m.hideUnchangedRegions)===null||s===void 0?void 0:s.enabled)!==null&&i!==void 0?i:(n=m.experimental)===null||n===void 0?void 0:n.collapseUnchangedRegions,_.hideUnchangedRegions.enabled),contextLineCount:(0,y.clampedInt)((t=m.hideUnchangedRegions)===null||t===void 0?void 0:t.contextLineCount,_.hideUnchangedRegions.contextLineCount,0,1073741824),minimumLineCount:(0,y.clampedInt)((r=m.hideUnchangedRegions)===null||r===void 0?void 0:r.minimumLineCount,_.hideUnchangedRegions.minimumLineCount,0,1073741824),revealLineCount:(0,y.clampedInt)((u=m.hideUnchangedRegions)===null||u===void 0?void 0:u.revealLineCount,_.hideUnchangedRegions.revealLineCount,0,1073741824)},isInEmbeddedEditor:(0,y.boolean)(m.isInEmbeddedEditor,_.isInEmbeddedEditor),onlyShowAccessibleDiffViewer:(0,y.boolean)(m.onlyShowAccessibleDiffViewer,_.onlyShowAccessibleDiffViewer),renderSideBySideInlineBreakpoint:(0,y.clampedInt)(m.renderSideBySideInlineBreakpoint,_.renderSideBySideInlineBreakpoint,0,1073741824),useInlineViewWhenSpaceIsLimited:(0,y.boolean)(m.useInlineViewWhenSpaceIsLimited,_.useInlineViewWhenSpaceIsLimited)}}}),define(te[231],ie([1,0,17,39,143]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FontInfo=e.SERIALIZED_FONT_INFO_VERSION=e.BareFontInfo=void 0;const D=L.isMacintosh?1.5:1.35,S=8;class m{static createFromValidatedSettings(C,s,i){const n=C.get(49),t=C.get(53),r=C.get(52),u=C.get(51),f=C.get(54),d=C.get(66),l=C.get(63);return m._create(n,t,r,u,f,d,l,s,i)}static _create(C,s,i,n,t,r,u,f,d){r===0?r=D*i:r{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()},5e3))}_evictUntrustedReadings(){const s=this._cache.getValues();let i=!1;for(const n of s)n.isTrusted||(i=!0,this._cache.remove(n));i&&this._onDidChange.fire()}readFontInfo(s){if(!this._cache.has(s)){let i=this._actualReadFontInfo(s);(i.typicalHalfwidthCharacterWidth<=2||i.typicalFullwidthCharacterWidth<=2||i.spaceWidth<=2||i.maxDigitWidth<=2)&&(i=new m.FontInfo({pixelRatio:L.PixelRatio.value,fontFamily:i.fontFamily,fontWeight:i.fontWeight,fontSize:i.fontSize,fontFeatureSettings:i.fontFeatureSettings,fontVariationSettings:i.fontVariationSettings,lineHeight:i.lineHeight,letterSpacing:i.letterSpacing,isMonospace:i.isMonospace,typicalHalfwidthCharacterWidth:Math.max(i.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(i.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:i.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(i.spaceWidth,5),middotWidth:Math.max(i.middotWidth,5),wsmiddotWidth:Math.max(i.wsmiddotWidth,5),maxDigitWidth:Math.max(i.maxDigitWidth,5)},!1)),this._writeToCache(s,i)}return this._cache.get(s)}_createRequest(s,i,n,t){const r=new D.CharWidthRequest(s,i);return n.push(r),t?.push(r),r}_actualReadFontInfo(s){const i=[],n=[],t=this._createRequest("n",0,i,n),r=this._createRequest("\uFF4D",0,i,null),u=this._createRequest(" ",0,i,n),f=this._createRequest("0",0,i,n),d=this._createRequest("1",0,i,n),l=this._createRequest("2",0,i,n),o=this._createRequest("3",0,i,n),c=this._createRequest("4",0,i,n),a=this._createRequest("5",0,i,n),g=this._createRequest("6",0,i,n),h=this._createRequest("7",0,i,n),p=this._createRequest("8",0,i,n),b=this._createRequest("9",0,i,n),w=this._createRequest("\u2192",0,i,n),E=this._createRequest("\uFFEB",0,i,null),k=this._createRequest("\xB7",0,i,n),M=this._createRequest(String.fromCharCode(11825),0,i,null),R="|/-_ilm%";for(let P=0,O=R.length;P.001){T=!1;break}}let A=!0;return T&&E.width!==N&&(A=!1),E.width>w.width&&(A=!1),new m.FontInfo({pixelRatio:L.PixelRatio.value,fontFamily:s.fontFamily,fontWeight:s.fontWeight,fontSize:s.fontSize,fontFeatureSettings:s.fontFeatureSettings,fontVariationSettings:s.fontVariationSettings,lineHeight:s.lineHeight,letterSpacing:s.letterSpacing,isMonospace:T,typicalHalfwidthCharacterWidth:t.width,typicalFullwidthCharacterWidth:r.width,canUseHalfwidthRightwardsArrow:A,spaceWidth:u.width,middotWidth:k.width,wsmiddotWidth:M.width,maxDigitWidth:B},!0)}}e.FontMeasurementsImpl=_;class v{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(s){const i=s.getId();return!!this._values[i]}get(s){const i=s.getId();return this._values[i]}put(s,i){const n=s.getId();this._keys[n]=s,this._values[n]=i}remove(s){const i=s.getId();delete this._keys[i],delete this._values[i]}getValues(){return Object.keys(this._keys).map(s=>this._values[s])}}e.FontMeasurements=new _}),define(te[329],ie([1,0,12,5,82,39]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isModelDecorationInString=e.isModelDecorationInComment=e.isModelDecorationVisible=e.ViewModelDecorations=void 0;class S{constructor(i,n,t,r,u){this.editorId=i,this.model=n,this.configuration=t,this._linesCollection=r,this._coordinatesConverter=u,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(i){const n=i.id;let t=this._decorationsCache[n];if(!t){const r=i.range,u=i.options;let f;if(u.isWholeLine){const d=this._coordinatesConverter.convertModelPositionToViewPosition(new L.Position(r.startLineNumber,1),0,!1,!0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new L.Position(r.endLineNumber,this.model.getLineMaxColumn(r.endLineNumber)),1);f=new I.Range(d.lineNumber,d.column,l.lineNumber,l.column)}else f=this._coordinatesConverter.convertModelRangeToViewRange(r,1);t=new y.ViewModelDecoration(f,u),this._decorationsCache[n]=t}return t}getMinimapDecorationsInRange(i){return this._getDecorationsInRange(i,!0,!1).decorations}getDecorationsViewportData(i){let n=this._cachedModelDecorationsResolver!==null;return n=n&&i.equalsRange(this._cachedModelDecorationsResolverViewRange),n||(this._cachedModelDecorationsResolver=this._getDecorationsInRange(i,!1,!1),this._cachedModelDecorationsResolverViewRange=i),this._cachedModelDecorationsResolver}getInlineDecorationsOnLine(i,n=!1,t=!1){const r=new I.Range(i,this._linesCollection.getViewLineMinColumn(i),i,this._linesCollection.getViewLineMaxColumn(i));return this._getDecorationsInRange(r,n,t).inlineDecorations[0]}_getDecorationsInRange(i,n,t){const r=this._linesCollection.getDecorationsInRange(i,this.editorId,(0,D.filterValidationDecorations)(this.configuration.options),n,t),u=i.startLineNumber,f=i.endLineNumber,d=[];let l=0;const o=[];for(let c=u;c<=f;c++)o[c-u]=[];for(let c=0,a=r.length;cn===1)}e.isModelDecorationInComment=_;function v(s,i){return C(s,i.range,n=>n===2)}e.isModelDecorationInString=v;function C(s,i,n){for(let t=i.startLineNumber;t<=i.endLineNumber;t++){const r=s.tokenization.getLineTokens(t),u=t===i.startLineNumber,f=t===i.endLineNumber;let d=u?r.findTokenIndexAtOffset(i.startColumn-1):0;for(;di.endColumn-1);){if(!n(r.getStandardTokenType(d)))return!1;d++}}return!0}}),define(te[622],ie([3,4]),function($,e){return $.create("vs/editor/common/core/editorColorRegistry",e)}),define(te[623],ie([3,4]),function($,e){return $.create("vs/editor/common/editorContextKeys",e)}),define(te[624],ie([3,4]),function($,e){return $.create("vs/editor/common/languages",e)}),define(te[29],ie([1,0,26,21,5,518,624]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationRegistry=e.LazyTokenizationSupport=e.InlayHintKind=e.Command=e.FoldingRangeKind=e.TextEdit=e.SymbolKinds=e.getAriaLabelForSymbol=e.symbolKindNames=e.isLocationLink=e.DocumentHighlightKind=e.SignatureHelpTriggerKind=e.SelectedSuggestionInfo=e.InlineCompletionTriggerKind=e.CompletionItemKinds=e.EncodedTokenizationResult=e.TokenizationResult=e.Token=void 0;class m{constructor(h,p,b){this.offset=h,this.type=p,this.language=b,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}e.Token=m;class _{constructor(h,p){this.tokens=h,this.endState=p,this._tokenizationResultBrand=void 0}}e.TokenizationResult=_;class v{constructor(h,p){this.tokens=h,this.endState=p,this._encodedTokenizationResultBrand=void 0}}e.EncodedTokenizationResult=v;var C;(function(g){const h=new Map;h.set(0,L.Codicon.symbolMethod),h.set(1,L.Codicon.symbolFunction),h.set(2,L.Codicon.symbolConstructor),h.set(3,L.Codicon.symbolField),h.set(4,L.Codicon.symbolVariable),h.set(5,L.Codicon.symbolClass),h.set(6,L.Codicon.symbolStruct),h.set(7,L.Codicon.symbolInterface),h.set(8,L.Codicon.symbolModule),h.set(9,L.Codicon.symbolProperty),h.set(10,L.Codicon.symbolEvent),h.set(11,L.Codicon.symbolOperator),h.set(12,L.Codicon.symbolUnit),h.set(13,L.Codicon.symbolValue),h.set(15,L.Codicon.symbolEnum),h.set(14,L.Codicon.symbolConstant),h.set(15,L.Codicon.symbolEnum),h.set(16,L.Codicon.symbolEnumMember),h.set(17,L.Codicon.symbolKeyword),h.set(27,L.Codicon.symbolSnippet),h.set(18,L.Codicon.symbolText),h.set(19,L.Codicon.symbolColor),h.set(20,L.Codicon.symbolFile),h.set(21,L.Codicon.symbolReference),h.set(22,L.Codicon.symbolCustomColor),h.set(23,L.Codicon.symbolFolder),h.set(24,L.Codicon.symbolTypeParameter),h.set(25,L.Codicon.account),h.set(26,L.Codicon.issues);function p(E){let k=h.get(E);return k||(console.info("No codicon found for CompletionItemKind "+E),k=L.Codicon.symbolProperty),k}g.toIcon=p;const b=new Map;b.set("method",0),b.set("function",1),b.set("constructor",2),b.set("field",3),b.set("variable",4),b.set("class",5),b.set("struct",6),b.set("interface",7),b.set("module",8),b.set("property",9),b.set("event",10),b.set("operator",11),b.set("unit",12),b.set("value",13),b.set("constant",14),b.set("enum",15),b.set("enum-member",16),b.set("enumMember",16),b.set("keyword",17),b.set("snippet",27),b.set("text",18),b.set("color",19),b.set("file",20),b.set("reference",21),b.set("customcolor",22),b.set("folder",23),b.set("type-parameter",24),b.set("typeParameter",24),b.set("account",25),b.set("issue",26);function w(E,k){let M=b.get(E);return typeof M>"u"&&!k&&(M=9),M}g.fromString=w})(C||(e.CompletionItemKinds=C={}));var s;(function(g){g[g.Automatic=0]="Automatic",g[g.Explicit=1]="Explicit"})(s||(e.InlineCompletionTriggerKind=s={}));class i{constructor(h,p,b,w){this.range=h,this.text=p,this.completionKind=b,this.isSnippetText=w}equals(h){return y.Range.lift(this.range).equalsRange(h.range)&&this.text===h.text&&this.completionKind===h.completionKind&&this.isSnippetText===h.isSnippetText}}e.SelectedSuggestionInfo=i;var n;(function(g){g[g.Invoke=1]="Invoke",g[g.TriggerCharacter=2]="TriggerCharacter",g[g.ContentChange=3]="ContentChange"})(n||(e.SignatureHelpTriggerKind=n={}));var t;(function(g){g[g.Text=0]="Text",g[g.Read=1]="Read",g[g.Write=2]="Write"})(t||(e.DocumentHighlightKind=t={}));function r(g){return g&&I.URI.isUri(g.uri)&&y.Range.isIRange(g.range)&&(y.Range.isIRange(g.originSelectionRange)||y.Range.isIRange(g.targetSelectionRange))}e.isLocationLink=r,e.symbolKindNames={[17]:(0,S.localize)(0,null),[16]:(0,S.localize)(1,null),[4]:(0,S.localize)(2,null),[13]:(0,S.localize)(3,null),[8]:(0,S.localize)(4,null),[9]:(0,S.localize)(5,null),[21]:(0,S.localize)(6,null),[23]:(0,S.localize)(7,null),[7]:(0,S.localize)(8,null),[0]:(0,S.localize)(9,null),[11]:(0,S.localize)(10,null),[10]:(0,S.localize)(11,null),[19]:(0,S.localize)(12,null),[5]:(0,S.localize)(13,null),[1]:(0,S.localize)(14,null),[2]:(0,S.localize)(15,null),[20]:(0,S.localize)(16,null),[15]:(0,S.localize)(17,null),[18]:(0,S.localize)(18,null),[24]:(0,S.localize)(19,null),[3]:(0,S.localize)(20,null),[6]:(0,S.localize)(21,null),[14]:(0,S.localize)(22,null),[22]:(0,S.localize)(23,null),[25]:(0,S.localize)(24,null),[12]:(0,S.localize)(25,null)};function u(g,h){return(0,S.localize)(26,null,g,e.symbolKindNames[h])}e.getAriaLabelForSymbol=u;var f;(function(g){const h=new Map;h.set(0,L.Codicon.symbolFile),h.set(1,L.Codicon.symbolModule),h.set(2,L.Codicon.symbolNamespace),h.set(3,L.Codicon.symbolPackage),h.set(4,L.Codicon.symbolClass),h.set(5,L.Codicon.symbolMethod),h.set(6,L.Codicon.symbolProperty),h.set(7,L.Codicon.symbolField),h.set(8,L.Codicon.symbolConstructor),h.set(9,L.Codicon.symbolEnum),h.set(10,L.Codicon.symbolInterface),h.set(11,L.Codicon.symbolFunction),h.set(12,L.Codicon.symbolVariable),h.set(13,L.Codicon.symbolConstant),h.set(14,L.Codicon.symbolString),h.set(15,L.Codicon.symbolNumber),h.set(16,L.Codicon.symbolBoolean),h.set(17,L.Codicon.symbolArray),h.set(18,L.Codicon.symbolObject),h.set(19,L.Codicon.symbolKey),h.set(20,L.Codicon.symbolNull),h.set(21,L.Codicon.symbolEnumMember),h.set(22,L.Codicon.symbolStruct),h.set(23,L.Codicon.symbolEvent),h.set(24,L.Codicon.symbolOperator),h.set(25,L.Codicon.symbolTypeParameter);function p(b){let w=h.get(b);return w||(console.info("No codicon found for SymbolKind "+b),w=L.Codicon.symbolProperty),w}g.toIcon=p})(f||(e.SymbolKinds=f={}));class d{}e.TextEdit=d;class l{static fromValue(h){switch(h){case"comment":return l.Comment;case"imports":return l.Imports;case"region":return l.Region}return new l(h)}constructor(h){this.value=h}}e.FoldingRangeKind=l,l.Comment=new l("comment"),l.Imports=new l("imports"),l.Region=new l("region");var o;(function(g){function h(p){return!p||typeof p!="object"?!1:typeof p.id=="string"&&typeof p.title=="string"}g.is=h})(o||(e.Command=o={}));var c;(function(g){g[g.Type=1]="Type",g[g.Parameter=2]="Parameter"})(c||(e.InlayHintKind=c={}));class a{constructor(h){this.createSupport=h,this._tokenizationSupport=null}dispose(){this._tokenizationSupport&&this._tokenizationSupport.then(h=>{h&&h.dispose()})}get tokenizationSupport(){return this._tokenizationSupport||(this._tokenizationSupport=this.createSupport()),this._tokenizationSupport}}e.LazyTokenizationSupport=a,e.TokenizationRegistry=new D.TokenizationRegistry}),define(te[154],ie([1,0,29]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.nullTokenizeEncoded=e.nullTokenize=e.NullState=void 0,e.NullState=new class{clone(){return this}equals(D){return this===D}};function I(D,S){return new L.TokenizationResult([new L.Token(0,"",D)],S)}e.nullTokenize=I;function y(D,S){const m=new Uint32Array(2);return m[0]=0,m[1]=(D<<0|0<<8|0<<11|1<<15|2<<24)>>>0,new L.EncodedTokenizationResult(m,S===null?e.NullState:S)}e.nullTokenizeEncoded=y}),define(te[330],ie([1,0,10,91,29,154]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._tokenizeToString=e.tokenizeLineToHTML=e.tokenizeToString=void 0;const S={getInitialState:()=>D.NullState,tokenizeEncoded:(C,s,i)=>(0,D.nullTokenizeEncoded)(0,i)};function m(C,s,i){return be(this,void 0,void 0,function*(){if(!i)return v(s,C.languageIdCodec,S);const n=yield y.TokenizationRegistry.getOrCreate(i);return v(s,C.languageIdCodec,n||S)})}e.tokenizeToString=m;function _(C,s,i,n,t,r,u){let f="
    ",d=n,l=0,o=!0;for(let c=0,a=s.getCount();c0;)u&&o?(h+=" ",o=!1):(h+=" ",o=!0),b--;break}case 60:h+="<",o=!1;break;case 62:h+=">",o=!1;break;case 38:h+="&",o=!1;break;case 0:h+="�",o=!1;break;case 65279:case 8232:case 8233:case 133:h+="\uFFFD",o=!1;break;case 13:h+="​",o=!1;break;case 32:u&&o?(h+=" ",o=!1):(h+=" ",o=!0);break;default:h+=String.fromCharCode(p),o=!1}}if(f+=`${h}`,g>t||d>=t)break}return f+="
    ",f}e.tokenizeLineToHTML=_;function v(C,s,i){let n='
    ';const t=L.splitLines(C);let r=i.getInitialState();for(let u=0,f=t.length;u0&&(n+="
    ");const l=i.tokenizeEncoded(d,!0,r);I.LineTokens.convertToEndOffset(l.tokens,d.length);const c=new I.LineTokens(l.tokens,d,s).inflate();let a=0;for(let g=0,h=c.getCount();g${L.escape(d.substring(a,b))}`,a=b}r=l.endState}return n+="
    ",n}e._tokenizeToString=v}),define(te[625],ie([1,0,14,9,17,59,122,64,81,154,511,291,91]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultBackgroundTokenizer=e.RangePriorityQueueImpl=e.TokenizationStateStore=e.TrackingTokenizationStateStore=e.TokenizerWithStateStoreAndTextModel=e.TokenizerWithStateStore=void 0;class n{constructor(c,a){this.tokenizationSupport=a,this.initialState=this.tokenizationSupport.getInitialState(),this.store=new r(c)}getStartState(c){return this.store.getStartState(c,this.initialState)}getFirstInvalidLine(){return this.store.getFirstInvalidLine(this.initialState)}}e.TokenizerWithStateStore=n;class t extends n{constructor(c,a,g,h){super(c,a),this._textModel=g,this._languageIdCodec=h}updateTokensUntilLine(c,a){const g=this._textModel.getLanguageId();for(;;){const h=this.getFirstInvalidLine();if(!h||h.lineNumber>a)break;const p=this._textModel.getLineContent(h.lineNumber),b=d(this._languageIdCodec,g,this.tokenizationSupport,p,!0,h.startState);c.add(h.lineNumber,b.tokens),this.store.setEndState(h.lineNumber,b.endState)}}getTokenTypeIfInsertingCharacter(c,a){const g=this.getStartState(c.lineNumber);if(!g)return 0;const h=this._textModel.getLanguageId(),p=this._textModel.getLineContent(c.lineNumber),b=p.substring(0,c.column-1)+a+p.substring(c.column-1),w=d(this._languageIdCodec,h,this.tokenizationSupport,b,!0,g),E=new i.LineTokens(w.tokens,b,this._languageIdCodec);if(E.getCount()===0)return 0;const k=E.findTokenIndexAtOffset(c.column-1);return E.getStandardTokenType(k)}tokenizeLineWithEdit(c,a,g){const h=c.lineNumber,p=c.column,b=this.getStartState(h);if(!b)return null;const w=this._textModel.getLineContent(h),E=w.substring(0,p-1)+g+w.substring(p-1+a),k=this._textModel.getLanguageIdAtPosition(h,0),M=d(this._languageIdCodec,k,this.tokenizationSupport,E,!0,b);return new i.LineTokens(M.tokens,E,this._languageIdCodec)}isCheapToTokenize(c){const a=this.store.getFirstInvalidEndStateLineNumberOrMax();return c1&&w>=1;w--){const E=this._textModel.getLineFirstNonWhitespaceColumn(w);if(E!==0&&E0&&g>0&&(g--,a--),this._lineEndStates.replace(c.startLineNumber,g,a)}}e.TokenizationStateStore=u;class f{constructor(){this._ranges=[]}get min(){return this._ranges.length===0?null:this._ranges[0].start}delete(c){const a=this._ranges.findIndex(g=>g.contains(c));if(a!==-1){const g=this._ranges[a];g.start===c?g.endExclusive===c+1?this._ranges.splice(a,1):this._ranges[a]=new _.OffsetRange(c+1,g.endExclusive):g.endExclusive===c+1?this._ranges[a]=new _.OffsetRange(g.start,c):this._ranges.splice(a,1,new _.OffsetRange(g.start,c),new _.OffsetRange(c+1,g.endExclusive))}}addRange(c){_.OffsetRange.addRange(c,this._ranges)}addRangeAndResize(c,a){let g=0;for(;!(g>=this._ranges.length||c.start<=this._ranges[g].endExclusive);)g++;let h=g;for(;!(h>=this._ranges.length||c.endExclusivec.toString()).join(" + ")}}e.RangePriorityQueueImpl=f;function d(o,c,a,g,h,p){let b=null;if(a)try{b=a.tokenizeEncoded(g,h,p.clone())}catch(w){(0,I.onUnexpectedError)(w)}return b||(b=(0,v.nullTokenizeEncoded)(o.encodeLanguageId(c),p)),i.LineTokens.convertToEndOffset(b.tokens,g.length),b}class l{constructor(c,a){this._tokenizerWithStateStore=c,this._backgroundTokenStore=a,this._isDisposed=!1,this._isScheduled=!1}dispose(){this._isDisposed=!0}handleChanges(){this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._isScheduled||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._isScheduled=!0,(0,L.runWhenIdle)(c=>{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(c)}))}_backgroundTokenizeWithDeadline(c){const a=Date.now()+c.timeRemaining(),g=()=>{this._isDisposed||!this._tokenizerWithStateStore._textModel.isAttachedToEditor()||!this._hasLinesToTokenize()||(this._backgroundTokenizeForAtLeast1ms(),Date.now()1||this._tokenizeOneInvalidLine(a)>=c)break;while(this._hasLinesToTokenize());this._backgroundTokenStore.setTokens(a.finalize()),this.checkFinished()}_hasLinesToTokenize(){return this._tokenizerWithStateStore?!this._tokenizerWithStateStore.store.allStatesValid():!1}_tokenizeOneInvalidLine(c){var a;const g=(a=this._tokenizerWithStateStore)===null||a===void 0?void 0:a.getFirstInvalidLine();return g?(this._tokenizerWithStateStore.updateTokensUntilLine(c,g.lineNumber),g.lineNumber):this._tokenizerWithStateStore._textModel.getLineCount()+1}checkFinished(){this._isDisposed||this._tokenizerWithStateStore.store.allStatesValid()&&this._backgroundTokenStore.backgroundTokenizationFinished()}requestTokens(c,a){this._tokenizerWithStateStore.store.invalidateEndStateRange(new m.LineRange(c,a))}}e.DefaultBackgroundTokenizer=l}),define(te[626],ie([1,0,13,14,9,6,2,122,64,12,145,29,285,625,291,521,523]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenizationTextModelPart=void 0;class f extends i.TextModelPart{constructor(c,a,g,h,p,b){super(),this._languageService=c,this._languageConfigurationService=a,this._textModel=g,this._bracketPairsTextModelPart=h,this._languageId=p,this._attachedViews=b,this._semanticTokens=new u.SparseTokensStore(this._languageService.languageIdCodec),this._onDidChangeLanguage=this._register(new D.Emitter),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new D.Emitter),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new D.Emitter),this.onDidChangeTokens=this._onDidChangeTokens.event,this.grammarTokens=this._register(new d(this._languageService.languageIdCodec,this._textModel,()=>this._languageId,this._attachedViews)),this._register(this._languageConfigurationService.onDidChange(w=>{w.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._register(this.grammarTokens.onDidChangeTokens(w=>{this._emitModelTokensChangedEvent(w)})),this._register(this.grammarTokens.onDidChangeBackgroundTokenizationState(w=>{this._bracketPairsTextModelPart.handleDidChangeBackgroundTokenizationState()}))}handleDidChangeContent(c){if(c.isFlush)this._semanticTokens.flush();else if(!c.isEolChange)for(const a of c.changes){const[g,h,p]=(0,m.countEOL)(a.text);this._semanticTokens.acceptEdit(a.range,g,h,p,a.text.length>0?a.text.charCodeAt(0):0)}this.grammarTokens.handleDidChangeContent(c)}handleDidChangeAttached(){this.grammarTokens.handleDidChangeAttached()}getLineTokens(c){this.validateLineNumber(c);const a=this.grammarTokens.getLineTokens(c);return this._semanticTokens.addSparseTokens(c,a)}_emitModelTokensChangedEvent(c){this._textModel._isDisposing()||(this._bracketPairsTextModelPart.handleDidChangeTokens(c),this._onDidChangeTokens.fire(c))}validateLineNumber(c){if(c<1||c>this._textModel.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber")}get hasTokens(){return this.grammarTokens.hasTokens}resetTokenization(){this.grammarTokens.resetTokenization()}get backgroundTokenizationState(){return this.grammarTokens.backgroundTokenizationState}forceTokenization(c){this.validateLineNumber(c),this.grammarTokens.forceTokenization(c)}isCheapToTokenize(c){return this.validateLineNumber(c),this.grammarTokens.isCheapToTokenize(c)}tokenizeIfCheap(c){this.validateLineNumber(c),this.grammarTokens.tokenizeIfCheap(c)}getTokenTypeIfInsertingCharacter(c,a,g){return this.grammarTokens.getTokenTypeIfInsertingCharacter(c,a,g)}tokenizeLineWithEdit(c,a,g){return this.grammarTokens.tokenizeLineWithEdit(c,a,g)}setSemanticTokens(c,a){this._semanticTokens.set(c,a),this._emitModelTokensChangedEvent({semanticTokensApplied:c!==null,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(c,a){if(this.hasCompleteSemanticTokens())return;const g=this._textModel.validateRange(this._semanticTokens.setPartial(c,a));this._emitModelTokensChangedEvent({semanticTokensApplied:!0,ranges:[{fromLineNumber:g.startLineNumber,toLineNumber:g.endLineNumber}]})}getWordAtPosition(c){this.assertNotDisposed();const a=this._textModel.validatePosition(c),g=this._textModel.getLineContent(a.lineNumber),h=this.getLineTokens(a.lineNumber),p=h.findTokenIndexAtOffset(a.column-1),[b,w]=f._findLanguageBoundaries(h,p),E=(0,C.getWordAtText)(a.column,this.getLanguageConfiguration(h.getLanguageId(p)).getWordDefinition(),g.substring(b,w),b);if(E&&E.startColumn<=c.column&&c.column<=E.endColumn)return E;if(p>0&&b===a.column-1){const[k,M]=f._findLanguageBoundaries(h,p-1),R=(0,C.getWordAtText)(a.column,this.getLanguageConfiguration(h.getLanguageId(p-1)).getWordDefinition(),g.substring(k,M),k);if(R&&R.startColumn<=c.column&&c.column<=R.endColumn)return R}return null}getLanguageConfiguration(c){return this._languageConfigurationService.getLanguageConfiguration(c)}static _findLanguageBoundaries(c,a){const g=c.getLanguageId(a);let h=0;for(let b=a;b>=0&&c.getLanguageId(b)===g;b--)h=c.getStartOffset(b);let p=c.getLineContent().length;for(let b=a,w=c.getCount();b{const b=this.getLanguageId();p.changedLanguages.indexOf(b)!==-1&&this.resetTokenization()})),this.resetTokenization(),this._register(h.onDidChangeVisibleRanges(({view:p,state:b})=>{if(b){let w=this._attachedViewStates.get(p);w||(w=new l(()=>this.refreshRanges(w.lineRanges)),this._attachedViewStates.set(p,w)),w.handleStateChange(b)}else this._attachedViewStates.deleteAndDispose(p)}))}resetTokenization(c=!0){var a;this._tokens.flush(),(a=this._debugBackgroundTokens)===null||a===void 0||a.flush(),this._debugBackgroundStates&&(this._debugBackgroundStates=new n.TrackingTokenizationStateStore(this._textModel.getLineCount())),c&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._textModel.getLineCount()}]});const g=()=>{if(this._textModel.isTooLargeForTokenization())return[null,null];const b=s.TokenizationRegistry.get(this.getLanguageId());if(!b)return[null,null];let w;try{w=b.getInitialState()}catch(E){return(0,y.onUnexpectedError)(E),[null,null]}return[b,w]},[h,p]=g();if(h&&p?this._tokenizer=new n.TokenizerWithStateStoreAndTextModel(this._textModel.getLineCount(),h,this._textModel,this._languageIdCodec):this._tokenizer=null,this._backgroundTokenizer.clear(),this._defaultBackgroundTokenizer=null,this._tokenizer){const b={setTokens:w=>{this.setTokens(w)},backgroundTokenizationFinished:()=>{if(this._backgroundTokenizationState===2)return;const w=2;this._backgroundTokenizationState=w,this._onDidChangeBackgroundTokenizationState.fire()},setEndState:(w,E)=>{var k;if(!this._tokenizer)return;const M=this._tokenizer.store.getFirstInvalidEndStateLineNumber();M!==null&&w>=M&&((k=this._tokenizer)===null||k===void 0||k.store.setEndState(w,E))}};h&&h.createBackgroundTokenizer&&!h.backgroundTokenizerShouldOnlyVerifyTokens&&(this._backgroundTokenizer.value=h.createBackgroundTokenizer(this._textModel,b)),this._backgroundTokenizer.value||(this._backgroundTokenizer.value=this._defaultBackgroundTokenizer=new n.DefaultBackgroundTokenizer(this._tokenizer,b),this._defaultBackgroundTokenizer.handleChanges()),h?.backgroundTokenizerShouldOnlyVerifyTokens&&h.createBackgroundTokenizer?(this._debugBackgroundTokens=new r.ContiguousTokensStore(this._languageIdCodec),this._debugBackgroundStates=new n.TrackingTokenizationStateStore(this._textModel.getLineCount()),this._debugBackgroundTokenizer.clear(),this._debugBackgroundTokenizer.value=h.createBackgroundTokenizer(this._textModel,{setTokens:w=>{var E;(E=this._debugBackgroundTokens)===null||E===void 0||E.setMultilineTokens(w,this._textModel)},backgroundTokenizationFinished(){},setEndState:(w,E)=>{var k;(k=this._debugBackgroundStates)===null||k===void 0||k.setEndState(w,E)}})):(this._debugBackgroundTokens=void 0,this._debugBackgroundStates=void 0,this._debugBackgroundTokenizer.value=void 0)}this.refreshAllVisibleLineTokens()}handleDidChangeAttached(){var c;(c=this._defaultBackgroundTokenizer)===null||c===void 0||c.handleChanges()}handleDidChangeContent(c){var a,g,h;if(c.isFlush)this.resetTokenization(!1);else if(!c.isEolChange){for(const p of c.changes){const[b,w]=(0,m.countEOL)(p.text);this._tokens.acceptEdit(p.range,b,w),(a=this._debugBackgroundTokens)===null||a===void 0||a.acceptEdit(p.range,b,w)}(g=this._debugBackgroundStates)===null||g===void 0||g.acceptChanges(c.changes),this._tokenizer&&this._tokenizer.store.acceptChanges(c.changes),(h=this._defaultBackgroundTokenizer)===null||h===void 0||h.handleChanges()}}setTokens(c){const{changes:a}=this._tokens.setMultilineTokens(c,this._textModel);return a.length>0&&this._onDidChangeTokens.fire({semanticTokensApplied:!1,ranges:a}),{changes:a}}refreshAllVisibleLineTokens(){const c=_.LineRange.joinMany([...this._attachedViewStates].map(([a,g])=>g.lineRanges));this.refreshRanges(c)}refreshRanges(c){for(const a of c)this.refreshRange(a.startLineNumber,a.endLineNumberExclusive-1)}refreshRange(c,a){var g,h;if(!this._tokenizer)return;c=Math.max(1,Math.min(this._textModel.getLineCount(),c)),a=Math.min(this._textModel.getLineCount(),a);const p=new t.ContiguousMultilineTokensBuilder,{heuristicTokens:b}=this._tokenizer.tokenizeHeuristically(p,c,a),w=this.setTokens(p.finalize());if(b)for(const E of w.changes)(g=this._backgroundTokenizer.value)===null||g===void 0||g.requestTokens(E.fromLineNumber,E.toLineNumber+1);(h=this._defaultBackgroundTokenizer)===null||h===void 0||h.checkFinished()}forceTokenization(c){var a,g;const h=new t.ContiguousMultilineTokensBuilder;(a=this._tokenizer)===null||a===void 0||a.updateTokensUntilLine(h,c),this.setTokens(h.finalize()),(g=this._defaultBackgroundTokenizer)===null||g===void 0||g.checkFinished()}isCheapToTokenize(c){return this._tokenizer?this._tokenizer.isCheapToTokenize(c):!0}tokenizeIfCheap(c){this.isCheapToTokenize(c)&&this.forceTokenization(c)}getLineTokens(c){var a;const g=this._textModel.getLineContent(c),h=this._tokens.getTokens(this._textModel.getLanguageId(),c-1,g);if(this._debugBackgroundTokens&&this._debugBackgroundStates&&this._tokenizer&&this._debugBackgroundStates.getFirstInvalidEndStateLineNumberOrMax()>c&&this._tokenizer.store.getFirstInvalidEndStateLineNumberOrMax()>c){const p=this._debugBackgroundTokens.getTokens(this._textModel.getLanguageId(),c-1,g);!h.equals(p)&&(!((a=this._debugBackgroundTokenizer.value)===null||a===void 0)&&a.reportMismatchingTokens)&&this._debugBackgroundTokenizer.value.reportMismatchingTokens(c)}return h}getTokenTypeIfInsertingCharacter(c,a,g){if(!this._tokenizer)return 0;const h=this._textModel.validatePosition(new v.Position(c,a));return this.forceTokenization(h.lineNumber),this._tokenizer.getTokenTypeIfInsertingCharacter(h,g)}tokenizeLineWithEdit(c,a,g){if(!this._tokenizer)return null;const h=this._textModel.validatePosition(c);return this.forceTokenization(h.lineNumber),this._tokenizer.tokenizeLineWithEdit(h,a,g)}get hasTokens(){return this._tokens.hasTokens}}class l extends S.Disposable{get lineRanges(){return this._lineRanges}constructor(c){super(),this._refreshTokens=c,this.runner=this._register(new I.RunOnceScheduler(()=>this.update(),50)),this._computedLineRanges=[],this._lineRanges=[]}update(){(0,L.equals)(this._computedLineRanges,this._lineRanges,(c,a)=>c.equals(a))||(this._computedLineRanges=this._lineRanges,this._refreshTokens())}handleStateChange(c){this._lineRanges=c.visibleLineRanges,c.stabilized?(this.runner.cancel(),this.update()):this.runner.schedule()}}}),define(te[331],ie([1,0,19,6,62,21,12,5,24,29,209]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoBaseAPI=e.KeyMod=void 0;class s{static chord(t,r){return(0,y.KeyChord)(t,r)}}e.KeyMod=s,s.CtrlCmd=2048,s.Shift=1024,s.Alt=512,s.WinCtrl=256;function i(){return{editor:void 0,languages:void 0,CancellationTokenSource:L.CancellationTokenSource,Emitter:I.Emitter,KeyCode:C.KeyCode,KeyMod:s,Position:S.Position,Range:m.Range,Selection:_.Selection,SelectionDirection:C.SelectionDirection,MarkerSeverity:C.MarkerSeverity,MarkerTag:C.MarkerTag,Uri:D.URI,Token:v.Token}}e.createMonacoBaseAPI=i}),define(te[627],ie([1,0,167,21,12,5,515,145,498,504,331,59,289,495,52,497]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.create=e.EditorSimpleWorker=void 0;class u extends S.MirrorTextModel{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(o){const c=[];for(let a=0;athis._lines.length)c=this._lines.length,a=this._lines[c-1].length+1,g=!0;else{const h=this._lines[c-1].length+1;a<1?(a=1,g=!0):a>h&&(a=h,g=!0)}return g?{lineNumber:c,column:a}:o}}class f{constructor(o,c){this._host=o,this._models=Object.create(null),this._foreignModuleFactory=c,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(o){return this._models[o]}_getModels(){const o=[];return Object.keys(this._models).forEach(c=>o.push(this._models[c])),o}acceptNewModel(o){this._models[o.url]=new u(I.URI.parse(o.url),o.lines,o.EOL,o.versionId)}acceptModelChanged(o,c){if(!this._models[o])return;this._models[o].onEvents(c)}acceptRemovedModel(o){this._models[o]&&delete this._models[o]}computeUnicodeHighlights(o,c,a){return be(this,void 0,void 0,function*(){const g=this._getModel(o);return g?i.UnicodeTextModelHighlighter.computeUnicodeHighlights(g,c,a):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}})}computeDiff(o,c,a,g){return be(this,void 0,void 0,function*(){const h=this._getModel(o),p=this._getModel(c);return!h||!p?null:f.computeDiff(h,p,a,g)})}static computeDiff(o,c,a,g){const h=g==="advanced"?n.linesDiffComputers.getDefault():n.linesDiffComputers.getLegacy(),p=o.getLinesContent(),b=c.getLinesContent(),w=h.computeDiff(p,b,a),E=w.changes.length>0?!1:this._modelsAreIdentical(o,c);function k(M){return M.map(R=>{var B;return[R.original.startLineNumber,R.original.endLineNumberExclusive,R.modified.startLineNumber,R.modified.endLineNumberExclusive,(B=R.innerChanges)===null||B===void 0?void 0:B.map(T=>[T.originalRange.startLineNumber,T.originalRange.startColumn,T.originalRange.endLineNumber,T.originalRange.endColumn,T.modifiedRange.startLineNumber,T.modifiedRange.startColumn,T.modifiedRange.endLineNumber,T.modifiedRange.endColumn])]})}return{identical:E,quitEarly:w.hitTimeout,changes:k(w.changes),moves:w.moves.map(M=>[M.lineRangeMapping.original.startLineNumber,M.lineRangeMapping.original.endLineNumberExclusive,M.lineRangeMapping.modified.startLineNumber,M.lineRangeMapping.modified.endLineNumberExclusive,k(M.changes)])}}static _modelsAreIdentical(o,c){const a=o.getLineCount(),g=c.getLineCount();if(a!==g)return!1;for(let h=1;h<=a;h++){const p=o.getLineContent(h),b=c.getLineContent(h);if(p!==b)return!1}return!0}computeMoreMinimalEdits(o,c,a){return be(this,void 0,void 0,function*(){const g=this._getModel(o);if(!g)return c;const h=[];let p;c=c.slice(0).sort((w,E)=>{if(w.range&&E.range)return D.Range.compareRangesUsingStarts(w.range,E.range);const k=w.range?0:1,M=E.range?0:1;return k-M});let b=0;for(let w=1;wf._diffLimit){h.push({range:w,text:E});continue}const R=(0,L.stringDiff)(M,E,a),B=g.offsetAt(D.Range.lift(w).getStartPosition());for(const T of R){const N=g.positionAt(B+T.originalStart),A=g.positionAt(B+T.originalStart+T.originalLength),P={text:E.substr(T.modifiedStart,T.modifiedLength),range:{startLineNumber:N.lineNumber,startColumn:N.column,endLineNumber:A.lineNumber,endColumn:A.column}};g.getValueInRange(P.range)!==P.text&&h.push(P)}}return typeof p=="number"&&h.push({eol:p,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),h})}computeLinks(o){return be(this,void 0,void 0,function*(){const c=this._getModel(o);return c?(0,_.computeLinks)(c):null})}computeDefaultDocumentColors(o){return be(this,void 0,void 0,function*(){const c=this._getModel(o);return c?(0,r.computeDefaultDocumentColors)(c):null})}textualSuggest(o,c,a,g){return be(this,void 0,void 0,function*(){const h=new s.StopWatch,p=new RegExp(a,g),b=new Set;e:for(const w of o){const E=this._getModel(w);if(E){for(const k of E.words(p))if(!(k===c||!isNaN(Number(k)))&&(b.add(k),b.size>f._suggestionsLimit))break e}}return{words:Array.from(b),duration:h.elapsed()}})}computeWordRanges(o,c,a,g){return be(this,void 0,void 0,function*(){const h=this._getModel(o);if(!h)return Object.create(null);const p=new RegExp(a,g),b=Object.create(null);for(let w=c.startLineNumber;wthis._host.fhr(b,w),p={host:(0,t.createProxyObject)(a,g),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(p,c),Promise.resolve((0,t.getAllMethodNames)(this._foreignModule))):new Promise((b,w)=>{$([o],E=>{this._foreignModule=E.create(p,c),b((0,t.getAllMethodNames)(this._foreignModule))},w)})}fmr(o,c){if(!this._foreignModule||typeof this._foreignModule[o]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+o));try{return Promise.resolve(this._foreignModule[o].apply(this._foreignModule,c))}catch(a){return Promise.reject(a)}}}e.EditorSimpleWorker=f,f._diffLimit=1e5,f._suggestionsLimit=1e4;function d(l){return new f(l,null)}e.create=d,typeof importScripts=="function"&&(globalThis.monaco=(0,C.createMonacoBaseAPI)())}),define(te[332],ie([1,0,6,2,274,29]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MinimapTokensColorTracker=void 0;class S extends I.Disposable{static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,I.markAsSingleton)(new S)),this._INSTANCE}constructor(){super(),this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(D.TokenizationRegistry.onDidChange(_=>{_.changedColorMap&&this._updateColorMap()}))}_updateColorMap(){const _=D.TokenizationRegistry.getColorMap();if(!_){this._colors=[y.RGBA8.Empty],this._backgroundIsLight=!0;return}this._colors=[y.RGBA8.Empty];for(let C=1;C<_.length;C++){const s=_[C].rgba;this._colors[C]=new y.RGBA8(s.r,s.g,s.b,Math.round(s.a*255))}const v=_[2].getRelativeLuminance();this._backgroundIsLight=v>=.5,this._onDidChange.fire(void 0)}getColor(_){return(_<1||_>=this._colors.length)&&(_=2),this._colors[_]}backgroundIsLight(){return this._backgroundIsLight}}e.MinimapTokensColorTracker=S,S._INSTANCE=null}),define(te[628],ie([3,4]),function($,e){return $.create("vs/editor/common/languages/modesRegistry",e)}),define(te[629],ie([3,4]),function($,e){return $.create("vs/editor/common/model/editStack",e)}),define(te[333],ie([1,0,629,9,24,21,323,138,46]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditStack=e.isEditStackElement=e.MultiModelEditStackElement=e.SingleModelEditStackElement=e.SingleModelEditStackData=void 0;function v(u){return u.toString()}class C{static create(f,d){const l=f.getAlternativeVersionId(),o=n(f);return new C(l,l,o,o,d,d,[])}constructor(f,d,l,o,c,a,g){this.beforeVersionId=f,this.afterVersionId=d,this.beforeEOL=l,this.afterEOL=o,this.beforeCursorState=c,this.afterCursorState=a,this.changes=g}append(f,d,l,o,c){d.length>0&&(this.changes=(0,S.compressConsecutiveTextChanges)(this.changes,d)),this.afterEOL=l,this.afterVersionId=o,this.afterCursorState=c}static _writeSelectionsSize(f){return 4+4*4*(f?f.length:0)}static _writeSelections(f,d,l){if(m.writeUInt32BE(f,d?d.length:0,l),l+=4,d)for(const o of d)m.writeUInt32BE(f,o.selectionStartLineNumber,l),l+=4,m.writeUInt32BE(f,o.selectionStartColumn,l),l+=4,m.writeUInt32BE(f,o.positionLineNumber,l),l+=4,m.writeUInt32BE(f,o.positionColumn,l),l+=4;return l}static _readSelections(f,d,l){const o=m.readUInt32BE(f,d);d+=4;for(let c=0;cd.toString()).join(", ")}matchesResource(f){return(D.URI.isUri(this.model)?this.model:this.model.uri).toString()===f.toString()}setModel(f){this.model=f}canAppend(f){return this.model===f&&this._data instanceof C}append(f,d,l,o,c){this._data instanceof C&&this._data.append(f,d,l,o,c)}close(){this._data instanceof C&&(this._data=this._data.serialize())}open(){this._data instanceof C||(this._data=C.deserialize(this._data))}undo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof C&&(this._data=this._data.serialize());const f=C.deserialize(this._data);this.model._applyUndo(f.changes,f.beforeEOL,f.beforeVersionId,f.beforeCursorState)}redo(){if(D.URI.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof C&&(this._data=this._data.serialize());const f=C.deserialize(this._data);this.model._applyRedo(f.changes,f.afterEOL,f.afterVersionId,f.afterCursorState)}heapSize(){return this._data instanceof C&&(this._data=this._data.serialize()),this._data.byteLength+168}}e.SingleModelEditStackElement=s;class i{get resources(){return this._editStackElementsArr.map(f=>f.resource)}constructor(f,d,l){this.label=f,this.code=d,this.type=1,this._isOpen=!0,this._editStackElementsArr=l.slice(0),this._editStackElementsMap=new Map;for(const o of this._editStackElementsArr){const c=v(o.resource);this._editStackElementsMap.set(c,o)}this._delegate=null}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(f){const d=v(f);return this._editStackElementsMap.has(d)}setModel(f){const d=v(D.URI.isUri(f)?f:f.uri);this._editStackElementsMap.has(d)&&this._editStackElementsMap.get(d).setModel(f)}canAppend(f){if(!this._isOpen)return!1;const d=v(f.uri);return this._editStackElementsMap.has(d)?this._editStackElementsMap.get(d).canAppend(f):!1}append(f,d,l,o,c){const a=v(f.uri);this._editStackElementsMap.get(a).append(f,d,l,o,c)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const f of this._editStackElementsArr)f.undo()}redo(){for(const f of this._editStackElementsArr)f.redo()}heapSize(f){const d=v(f);return this._editStackElementsMap.has(d)?this._editStackElementsMap.get(d).heapSize():0}split(){return this._editStackElementsArr}toString(){const f=[];for(const d of this._editStackElementsArr)f.push(`${(0,_.basename)(d.resource)}: ${d}`);return`{${f.join(", ")}}`}}e.MultiModelEditStackElement=i;function n(u){return u.getEOL()===` -`?0:1}function t(u){return u?u instanceof s||u instanceof i:!1}e.isEditStackElement=t;class r{constructor(f,d){this._model=f,this._undoRedoService=d}pushStackElement(){const f=this._undoRedoService.getLastElement(this._model.uri);t(f)&&f.close()}popStackElement(){const f=this._undoRedoService.getLastElement(this._model.uri);t(f)&&f.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(f,d){const l=this._undoRedoService.getLastElement(this._model.uri);if(t(l)&&l.canAppend(this._model))return l;const o=new s(L.localize(0,null),"undoredo.textBufferEdit",this._model,f);return this._undoRedoService.pushElement(o,d),o}pushEOL(f){const d=this._getOrCreateEditStackElement(null,void 0);this._model.setEOL(f),d.append(this._model,[],n(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(f,d,l,o){const c=this._getOrCreateEditStackElement(f,o),a=this._model.applyEdits(d,!0),g=r._computeCursorState(l,a),h=a.map((p,b)=>({index:b,textChange:p.textChange}));return h.sort((p,b)=>p.textChange.oldPosition===b.textChange.oldPosition?p.index-b.index:p.textChange.oldPosition-b.textChange.oldPosition),c.append(this._model,h.map(p=>p.textChange),n(this._model),this._model.getAlternativeVersionId(),g),g}static _computeCursorState(f,d){try{return f?f(d):null}catch(l){return(0,I.onUnexpectedError)(l),null}}}e.EditStack=r}),define(te[630],ie([3,4]),function($,e){return $.create("vs/editor/common/standaloneStrings",e)}),define(te[93],ie([1,0,630]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServicesNLS=e.ToggleHighContrastNLS=e.StandaloneCodeEditorNLS=e.QuickOutlineNLS=e.QuickCommandNLS=e.QuickHelpNLS=e.GoToLineNLS=e.InspectTokensNLS=void 0;var I;(function(s){s.inspectTokensAction=L.localize(0,null)})(I||(e.InspectTokensNLS=I={}));var y;(function(s){s.gotoLineActionLabel=L.localize(1,null)})(y||(e.GoToLineNLS=y={}));var D;(function(s){s.helpQuickAccessActionLabel=L.localize(2,null)})(D||(e.QuickHelpNLS=D={}));var S;(function(s){s.quickCommandActionLabel=L.localize(3,null),s.quickCommandHelp=L.localize(4,null)})(S||(e.QuickCommandNLS=S={}));var m;(function(s){s.quickOutlineActionLabel=L.localize(5,null),s.quickOutlineByCategoryActionLabel=L.localize(6,null)})(m||(e.QuickOutlineNLS=m={}));var _;(function(s){s.editorViewAccessibleLabel=L.localize(7,null),s.accessibilityHelpMessage=L.localize(8,null)})(_||(e.StandaloneCodeEditorNLS=_={}));var v;(function(s){s.toggleHighContrast=L.localize(9,null)})(v||(e.ToggleHighContrastNLS=v={}));var C;(function(s){s.bulkEditServiceSummary=L.localize(10,null)})(C||(e.StandaloneServicesNLS=C={}))}),define(te[631],ie([3,4]),function($,e){return $.create("vs/editor/common/viewLayout/viewLineRenderer",e)}),define(te[114],ie([1,0,631,10,101,149,532]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderViewLine2=e.RenderLineOutput2=e.renderViewLine=e.RenderLineOutput=e.CharacterMapping=e.DomPosition=e.RenderLineInput=e.LineRange=void 0;class m{constructor(w,E){this.startOffset=w,this.endOffset=E}equals(w){return this.startOffset===w.startOffset&&this.endOffset===w.endOffset}}e.LineRange=m;class _{constructor(w,E,k,M,R,B,T,N,A,P,O,x,W,U,F,G,Y,ne,se){this.useMonospaceOptimizations=w,this.canUseHalfwidthRightwardsArrow=E,this.lineContent=k,this.continuesWithWrappedLine=M,this.isBasicASCII=R,this.containsRTL=B,this.fauxIndentLength=T,this.lineTokens=N,this.lineDecorations=A.sort(D.LineDecoration.compare),this.tabSize=P,this.startVisibleColumn=O,this.spaceWidth=x,this.stopRenderingLineAfter=F,this.renderWhitespace=G==="all"?4:G==="boundary"?1:G==="selection"?2:G==="trailing"?3:0,this.renderControlCharacters=Y,this.fontLigatures=ne,this.selectionsOnLine=se&&se.sort((H,V)=>H.startOffset>>16}static getCharIndex(w){return(w&65535)>>>0}constructor(w,E){this.length=w,this._data=new Uint32Array(this.length),this._horizontalOffset=new Uint32Array(this.length)}setColumnInfo(w,E,k,M){const R=(E<<16|k<<0)>>>0;this._data[w-1]=R,this._horizontalOffset[w-1]=M}getHorizontalOffset(w){return this._horizontalOffset.length===0?0:this._horizontalOffset[w-1]}charOffsetToPartData(w){return this.length===0?0:w<0?this._data[0]:w>=this.length?this._data[this.length-1]:this._data[w]}getDomPosition(w){const E=this.charOffsetToPartData(w-1),k=C.getPartIndex(E),M=C.getCharIndex(E);return new v(k,M)}getColumn(w,E){return this.partDataToCharOffset(w.partIndex,E,w.charIndex)+1}partDataToCharOffset(w,E,k){if(this.length===0)return 0;const M=(w<<16|k<<0)>>>0;let R=0,B=this.length-1;for(;R+1>>1,G=this._data[F];if(G===M)return F;G>M?B=F:R=F}if(R===B)return R;const T=this._data[R],N=this._data[B];if(T===M)return R;if(N===M)return B;const A=C.getPartIndex(T),P=C.getCharIndex(T),O=C.getPartIndex(N);let x;A!==O?x=E:x=C.getCharIndex(N);const W=k-P,U=x-k;return W<=U?R:B}}e.CharacterMapping=C;class s{constructor(w,E,k){this._renderLineOutputBrand=void 0,this.characterMapping=w,this.containsRTL=E,this.containsForeignElements=k}}e.RenderLineOutput=s;function i(b,w){if(b.lineContent.length===0){if(b.lineDecorations.length>0){w.appendString("");let E=0,k=0,M=0;for(const B of b.lineDecorations)(B.type===1||B.type===2)&&(w.appendString(''),B.type===1&&(M|=1,E++),B.type===2&&(M|=2,k++));w.appendString("");const R=new C(1,E+k);return R.setColumnInfo(1,E,0,0),new s(R,!1,M)}return w.appendString(""),new s(new C(0,0),!1,0)}return g(u(b),w)}e.renderViewLine=i;class n{constructor(w,E,k,M){this.characterMapping=w,this.html=E,this.containsRTL=k,this.containsForeignElements=M}}e.RenderLineOutput2=n;function t(b){const w=new y.StringBuilder(1e4),E=i(b,w);return new n(E.characterMapping,w.build(),E.containsRTL,E.containsForeignElements)}e.renderViewLine2=t;class r{constructor(w,E,k,M,R,B,T,N,A,P,O,x,W,U,F,G){this.fontIsMonospace=w,this.canUseHalfwidthRightwardsArrow=E,this.lineContent=k,this.len=M,this.isOverflowing=R,this.overflowingCharCount=B,this.parts=T,this.containsForeignElements=N,this.fauxIndentLength=A,this.tabSize=P,this.startVisibleColumn=O,this.containsRTL=x,this.spaceWidth=W,this.renderSpaceCharCode=U,this.renderWhitespace=F,this.renderControlCharacters=G}}function u(b){const w=b.lineContent;let E,k,M;b.stopRenderingLineAfter!==-1&&b.stopRenderingLineAfter0){for(let T=0,N=b.lineDecorations.length;T0&&(R[B++]=new S.LinePart(k,"",0,!1));let T=k;for(let N=0,A=E.getCount();N=M){const W=w?I.containsRTL(b.substring(T,M)):!1;R[B++]=new S.LinePart(M,O,0,W);break}const x=w?I.containsRTL(b.substring(T,P)):!1;R[B++]=new S.LinePart(P,O,0,x),T=P}return R}function d(b,w,E){let k=0;const M=[];let R=0;if(E)for(let B=0,T=w.length;B=50&&(M[R++]=new S.LinePart(W+1,P,O,x),U=W+1,W=-1);U!==A&&(M[R++]=new S.LinePart(A,P,O,x))}else M[R++]=N;k=A}else for(let B=0,T=w.length;B50){const O=N.type,x=N.metadata,W=N.containsRTL,U=Math.ceil(P/50);for(let F=1;F=8234&&b<=8238||b>=8294&&b<=8297||b>=8206&&b<=8207||b===1564}function o(b,w){const E=[];let k=new S.LinePart(0,"",0,!1),M=0;for(const R of w){const B=R.endIndex;for(;Mk.endIndex&&(k=new S.LinePart(M,R.type,R.metadata,R.containsRTL),E.push(k)),k=new S.LinePart(M+1,"mtkcontrol",R.metadata,!1),E.push(k))}M>k.endIndex&&(k=new S.LinePart(B,R.type,R.metadata,R.containsRTL),E.push(k))}return E}function c(b,w,E,k){const M=b.continuesWithWrappedLine,R=b.fauxIndentLength,B=b.tabSize,T=b.startVisibleColumn,N=b.useMonospaceOptimizations,A=b.selectionsOnLine,P=b.renderWhitespace===1,O=b.renderWhitespace===3,x=b.renderSpaceWidth!==b.spaceWidth,W=[];let U=0,F=0,G=k[F].type,Y=k[F].containsRTL,ne=k[F].endIndex;const se=k.length;let J=!1,q=I.firstNonWhitespaceIndex(w),H;q===-1?(J=!0,q=E,H=E):H=I.lastNonWhitespaceIndex(w);let V=!1,Z=0,ee=A&&A[Z],le=T%B;for(let de=R;de=ee.endOffset&&(Z++,ee=A&&A[Z]);let ae;if(deH)ae=!0;else if(ce===9)ae=!0;else if(ce===32)if(P)if(V)ae=!0;else{const X=de+1de),ae&&O&&(ae=J||de>H),ae&&Y&&de>=q&&de<=H&&(ae=!1),V){if(!ae||!N&&le>=B){if(x){const X=U>0?W[U-1].endIndex:R;for(let K=X+1;K<=de;K++)W[U++]=new S.LinePart(K,"mtkw",1,!1)}else W[U++]=new S.LinePart(de,"mtkw",1,!1);le=le%B}}else(de===ne||ae&&de>R)&&(W[U++]=new S.LinePart(de,G,0,Y),le=le%B);for(ce===9?le=B:I.isFullWidthCharacter(ce)?le+=2:le++,V=ae;de===ne&&(F++,F0?w.charCodeAt(E-1):0,ce=E>1?w.charCodeAt(E-2):0;de===32&&ce!==32&&ce!==9||(ue=!0)}else ue=!0;if(ue)if(x){const de=U>0?W[U-1].endIndex:R;for(let ce=de+1;ce<=E;ce++)W[U++]=new S.LinePart(ce,"mtkw",1,!1)}else W[U++]=new S.LinePart(E,"mtkw",1,!1);else W[U++]=new S.LinePart(E,G,0,Y);return W}function a(b,w,E,k){k.sort(D.LineDecoration.compare);const M=D.LineDecorationsNormalizer.normalize(b,k),R=M.length;let B=0;const T=[];let N=0,A=0;for(let O=0,x=E.length;OA&&(A=ne.startOffset,T[N++]=new S.LinePart(A,F,G,Y)),ne.endOffset+1<=U)A=ne.endOffset+1,T[N++]=new S.LinePart(A,F+" "+ne.className,G|ne.metadata,Y),B++;else{A=U,T[N++]=new S.LinePart(A,F+" "+ne.className,G|ne.metadata,Y);break}}U>A&&(A=U,T[N++]=new S.LinePart(A,F,G,Y))}const P=E[E.length-1].endIndex;if(B'):w.appendString("");for(let ee=0,le=A.length;ee=P&&(re+=he)}}for(K&&(w.appendString(' style="width:'),w.appendString(String(U*Q)),w.appendString('px"')),w.appendASCIICharCode(62);J1?w.appendCharCode(8594):w.appendCharCode(65515);for(let he=2;he<=oe;he++)w.appendCharCode(160)}else re=2,oe=1,w.appendCharCode(F),w.appendCharCode(8204);H+=re,V+=oe,J>=P&&(q+=oe)}}else for(w.appendASCIICharCode(62);J=P&&(q+=re)}z?Z++:Z=0,J>=B&&!se&&ue.isPseudoAfter()&&(se=!0,ne.setColumnInfo(J+1,ee,H,V)),w.appendString("")}return se||ne.setColumnInfo(B+1,A.length-1,H,V),T&&(w.appendString(''),w.appendString(L.localize(0,null,p(N))),w.appendString("")),w.appendString("
    "),new s(ne,W,M)}function h(b){return b.toString(16).toUpperCase().padStart(4,"0")}function p(b){return b<1024?L.localize(1,null,b):b<1024*1024?`${(b/1024).toFixed(1)} KB`:`${(b/1024/1024).toFixed(1)} MB`}}),define(te[632],ie([1,0,90,70,39,101,149,114,82]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenderOptions=e.LineSource=e.renderLines=void 0;const v=(0,L.createTrustedTypesPolicy)("diffEditorWidget",{createHTML:t=>t});function C(t,r,u,f){(0,I.applyFontInfo)(f,r.fontInfo);const d=u.length>0,l=new D.StringBuilder(1e4);let o=0,c=0;const a=[];for(let b=0;b');const a=r.getLineContent(),g=_.ViewLineRenderingData.isBasicASCII(a,d),h=_.ViewLineRenderingData.containsRTL(a,g,l),p=(0,m.renderViewLine)(new m.RenderLineInput(o.fontInfo.isMonospace&&!o.disableMonospaceOptimizations,o.fontInfo.canUseHalfwidthRightwardsArrow,a,!1,g,h,0,r,u,o.tabSize,0,o.fontInfo.spaceWidth,o.fontInfo.middotWidth,o.fontInfo.wsmiddotWidth,o.stopRenderingLineAfter,o.renderWhitespace,o.renderControlCharacters,o.fontLigatures!==y.EditorFontLigatures.OFF,null),c);return c.appendString(""),p.characterMapping.getHorizontalOffset(p.characterMapping.length)}}),define(te[633],ie([3,4]),function($,e){return $.create("vs/editor/contrib/anchorSelect/browser/anchorSelect",e)}),define(te[634],ie([3,4]),function($,e){return $.create("vs/editor/contrib/bracketMatching/browser/bracketMatching",e)}),define(te[635],ie([3,4]),function($,e){return $.create("vs/editor/contrib/caretOperations/browser/caretOperations",e)}),define(te[636],ie([3,4]),function($,e){return $.create("vs/editor/contrib/caretOperations/browser/transpose",e)}),define(te[637],ie([3,4]),function($,e){return $.create("vs/editor/contrib/clipboard/browser/clipboard",e)}),define(te[638],ie([3,4]),function($,e){return $.create("vs/editor/contrib/codeAction/browser/codeAction",e)}),define(te[639],ie([3,4]),function($,e){return $.create("vs/editor/contrib/codeAction/browser/codeActionCommands",e)}),define(te[640],ie([3,4]),function($,e){return $.create("vs/editor/contrib/codeAction/browser/codeActionContributions",e)}),define(te[641],ie([3,4]),function($,e){return $.create("vs/editor/contrib/codeAction/browser/codeActionController",e)}),define(te[642],ie([3,4]),function($,e){return $.create("vs/editor/contrib/codeAction/browser/codeActionMenu",e)}),define(te[643],ie([3,4]),function($,e){return $.create("vs/editor/contrib/codeAction/browser/lightBulbWidget",e)}),define(te[644],ie([3,4]),function($,e){return $.create("vs/editor/contrib/codelens/browser/codelensController",e)}),define(te[645],ie([3,4]),function($,e){return $.create("vs/editor/contrib/colorPicker/browser/colorPickerWidget",e)}),define(te[646],ie([3,4]),function($,e){return $.create("vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions",e)}),define(te[647],ie([3,4]),function($,e){return $.create("vs/editor/contrib/comment/browser/comment",e)}),define(te[648],ie([3,4]),function($,e){return $.create("vs/editor/contrib/contextmenu/browser/contextmenu",e)}),define(te[649],ie([3,4]),function($,e){return $.create("vs/editor/contrib/cursorUndo/browser/cursorUndo",e)}),define(te[650],ie([3,4]),function($,e){return $.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution",e)}),define(te[651],ie([3,4]),function($,e){return $.create("vs/editor/contrib/dropOrPasteInto/browser/copyPasteController",e)}),define(te[652],ie([3,4]),function($,e){return $.create("vs/editor/contrib/dropOrPasteInto/browser/defaultProviders",e)}),define(te[653],ie([3,4]),function($,e){return $.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution",e)}),define(te[654],ie([3,4]),function($,e){return $.create("vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController",e)}),define(te[655],ie([3,4]),function($,e){return $.create("vs/editor/contrib/editorState/browser/keybindingCancellation",e)}),define(te[656],ie([3,4]),function($,e){return $.create("vs/editor/contrib/find/browser/findController",e)}),define(te[657],ie([3,4]),function($,e){return $.create("vs/editor/contrib/find/browser/findWidget",e)}),define(te[658],ie([3,4]),function($,e){return $.create("vs/editor/contrib/folding/browser/folding",e)}),define(te[659],ie([3,4]),function($,e){return $.create("vs/editor/contrib/folding/browser/foldingDecorations",e)}),define(te[660],ie([3,4]),function($,e){return $.create("vs/editor/contrib/fontZoom/browser/fontZoom",e)}),define(te[661],ie([3,4]),function($,e){return $.create("vs/editor/contrib/format/browser/format",e)}),define(te[662],ie([3,4]),function($,e){return $.create("vs/editor/contrib/format/browser/formatActions",e)}),define(te[663],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoError/browser/gotoError",e)}),define(te[664],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoError/browser/gotoErrorWidget",e)}),define(te[665],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoSymbol/browser/goToCommands",e)}),define(te[666],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition",e)}),define(te[667],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesController",e)}),define(te[668],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesTree",e)}),define(te[669],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget",e)}),define(te[670],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoSymbol/browser/referencesModel",e)}),define(te[155],ie([1,0,9,6,163,2,56,46,10,5,670]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesModel=e.FileReferences=e.FilePreview=e.OneReference=void 0;class s{constructor(u,f,d,l){this.isProviderFirst=u,this.parent=f,this.link=d,this._rangeCallback=l,this.id=y.defaultGenerator.nextId()}get uri(){return this.link.uri}get range(){var u,f;return(f=(u=this._range)!==null&&u!==void 0?u:this.link.targetSelectionRange)!==null&&f!==void 0?f:this.link.range}set range(u){this._range=u,this._rangeCallback(this)}get ariaMessage(){var u;const f=(u=this.parent.getPreview(this))===null||u===void 0?void 0:u.preview(this.range);return f?(0,C.localize)(1,null,f.value,(0,m.basename)(this.uri),this.range.startLineNumber,this.range.startColumn):(0,C.localize)(0,null,(0,m.basename)(this.uri),this.range.startLineNumber,this.range.startColumn)}}e.OneReference=s;class i{constructor(u){this._modelReference=u}dispose(){this._modelReference.dispose()}preview(u,f=8){const d=this._modelReference.object.textEditorModel;if(!d)return;const{startLineNumber:l,startColumn:o,endLineNumber:c,endColumn:a}=u,g=d.getWordUntilPosition({lineNumber:l,column:o-f}),h=new v.Range(l,g.startColumn,l,o),p=new v.Range(c,a,c,1073741824),b=d.getValueInRange(h).replace(/^\s+/,""),w=d.getValueInRange(u),E=d.getValueInRange(p).replace(/\s+$/,"");return{value:b+w+E,highlight:{start:b.length,end:b.length+w.length}}}}e.FilePreview=i;class n{constructor(u,f){this.parent=u,this.uri=f,this.children=[],this._previews=new S.ResourceMap}dispose(){(0,D.dispose)(this._previews.values()),this._previews.clear()}getPreview(u){return this._previews.get(u.uri)}get ariaMessage(){const u=this.children.length;return u===1?(0,C.localize)(2,null,(0,m.basename)(this.uri),this.uri.fsPath):(0,C.localize)(3,null,u,(0,m.basename)(this.uri),this.uri.fsPath)}resolve(u){return be(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(const f of this.children)if(!this._previews.has(f.uri))try{const d=yield u.createModelReference(f.uri);this._previews.set(f.uri,new i(d))}catch(d){(0,L.onUnexpectedError)(d)}return this})}}e.FileReferences=n;class t{constructor(u,f){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new I.Emitter,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=u,this._title=f;const[d]=u;u.sort(t._compareReferences);let l;for(const o of u)if((!l||!m.extUri.isEqual(l.uri,o.uri,!0))&&(l=new n(this,o.uri),this.groups.push(l)),l.children.length===0||t._compareReferences(o,l.children[l.children.length-1])!==0){const c=new s(d===o,l,o,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(c),l.children.push(c)}}dispose(){(0,D.dispose)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new t(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?(0,C.localize)(4,null):this.references.length===1?(0,C.localize)(5,null,this.references[0].uri.fsPath):this.groups.length===1?(0,C.localize)(6,null,this.references.length,this.groups[0].uri.fsPath):(0,C.localize)(7,null,this.references.length,this.groups.length)}nextOrPreviousReference(u,f){const{parent:d}=u;let l=d.children.indexOf(u);const o=d.children.length,c=d.parent.groups.length;return c===1||f&&l+10?(f?l=(l+1)%o:l=(l+o-1)%o,d.children[l]):(l=d.parent.groups.indexOf(d),f?(l=(l+1)%c,d.parent.groups[l].children[0]):(l=(l+c-1)%c,d.parent.groups[l].children[d.parent.groups[l].children.length-1]))}nearestReference(u,f){const d=this.references.map((l,o)=>({idx:o,prefixLen:_.commonPrefixLength(l.uri.toString(),u.toString()),offsetDist:Math.abs(l.range.startLineNumber-f.lineNumber)*100+Math.abs(l.range.startColumn-f.column)})).sort((l,o)=>l.prefixLen>o.prefixLen?-1:l.prefixLeno.offsetDist?1:0)[0];if(d)return this.references[d.idx]}referenceAt(u,f){for(const d of this.references)if(d.uri.toString()===u.toString()&&v.Range.containsPosition(d.range,f))return d}firstReference(){for(const u of this.references)if(u.isProviderFirst)return u;return this.references[0]}static _compareReferences(u,f){return m.extUri.compare(u.uri,f.uri)||v.Range.compareRangesUsingStarts(u.range,f.range)}}e.ReferencesModel=t}),define(te[671],ie([3,4]),function($,e){return $.create("vs/editor/contrib/gotoSymbol/browser/symbolNavigation",e)}),define(te[672],ie([3,4]),function($,e){return $.create("vs/editor/contrib/hover/browser/hover",e)}),define(te[673],ie([3,4]),function($,e){return $.create("vs/editor/contrib/hover/browser/markdownHoverParticipant",e)}),define(te[674],ie([3,4]),function($,e){return $.create("vs/editor/contrib/hover/browser/markerHoverParticipant",e)}),define(te[675],ie([3,4]),function($,e){return $.create("vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace",e)}),define(te[676],ie([3,4]),function($,e){return $.create("vs/editor/contrib/indentation/browser/indentation",e)}),define(te[677],ie([3,4]),function($,e){return $.create("vs/editor/contrib/inlayHints/browser/inlayHintsHover",e)}),define(te[678],ie([3,4]),function($,e){return $.create("vs/editor/contrib/inlineCompletions/browser/commands",e)}),define(te[679],ie([3,4]),function($,e){return $.create("vs/editor/contrib/inlineCompletions/browser/hoverParticipant",e)}),define(te[680],ie([3,4]),function($,e){return $.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys",e)}),define(te[681],ie([3,4]),function($,e){return $.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController",e)}),define(te[682],ie([3,4]),function($,e){return $.create("vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget",e)}),define(te[683],ie([3,4]),function($,e){return $.create("vs/editor/contrib/lineSelection/browser/lineSelection",e)}),define(te[684],ie([3,4]),function($,e){return $.create("vs/editor/contrib/linesOperations/browser/linesOperations",e)}),define(te[685],ie([3,4]),function($,e){return $.create("vs/editor/contrib/linkedEditing/browser/linkedEditing",e)}),define(te[686],ie([3,4]),function($,e){return $.create("vs/editor/contrib/links/browser/links",e)}),define(te[687],ie([3,4]),function($,e){return $.create("vs/editor/contrib/message/browser/messageController",e)}),define(te[688],ie([3,4]),function($,e){return $.create("vs/editor/contrib/multicursor/browser/multicursor",e)}),define(te[689],ie([3,4]),function($,e){return $.create("vs/editor/contrib/parameterHints/browser/parameterHints",e)}),define(te[690],ie([3,4]),function($,e){return $.create("vs/editor/contrib/parameterHints/browser/parameterHintsWidget",e)}),define(te[691],ie([3,4]),function($,e){return $.create("vs/editor/contrib/peekView/browser/peekView",e)}),define(te[692],ie([3,4]),function($,e){return $.create("vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess",e)}),define(te[693],ie([3,4]),function($,e){return $.create("vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess",e)}),define(te[694],ie([3,4]),function($,e){return $.create("vs/editor/contrib/readOnlyMessage/browser/contribution",e)}),define(te[695],ie([3,4]),function($,e){return $.create("vs/editor/contrib/rename/browser/rename",e)}),define(te[696],ie([3,4]),function($,e){return $.create("vs/editor/contrib/rename/browser/renameInputField",e)}),define(te[697],ie([3,4]),function($,e){return $.create("vs/editor/contrib/smartSelect/browser/smartSelect",e)}),define(te[698],ie([3,4]),function($,e){return $.create("vs/editor/contrib/snippet/browser/snippetController2",e)}),define(te[699],ie([3,4]),function($,e){return $.create("vs/editor/contrib/snippet/browser/snippetVariables",e)}),define(te[700],ie([3,4]),function($,e){return $.create("vs/editor/contrib/stickyScroll/browser/stickyScrollActions",e)}),define(te[701],ie([3,4]),function($,e){return $.create("vs/editor/contrib/suggest/browser/suggest",e)}),define(te[702],ie([3,4]),function($,e){return $.create("vs/editor/contrib/suggest/browser/suggestController",e)}),define(te[703],ie([3,4]),function($,e){return $.create("vs/editor/contrib/suggest/browser/suggestWidget",e)}),define(te[704],ie([3,4]),function($,e){return $.create("vs/editor/contrib/suggest/browser/suggestWidgetDetails",e)}),define(te[705],ie([3,4]),function($,e){return $.create("vs/editor/contrib/suggest/browser/suggestWidgetRenderer",e)}),define(te[706],ie([3,4]),function($,e){return $.create("vs/editor/contrib/suggest/browser/suggestWidgetStatus",e)}),define(te[707],ie([3,4]),function($,e){return $.create("vs/editor/contrib/symbolIcons/browser/symbolIcons",e)}),define(te[708],ie([3,4]),function($,e){return $.create("vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode",e)}),define(te[709],ie([3,4]),function($,e){return $.create("vs/editor/contrib/tokenization/browser/tokenization",e)}),define(te[710],ie([3,4]),function($,e){return $.create("vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter",e)}),define(te[711],ie([3,4]),function($,e){return $.create("vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators",e)}),define(te[712],ie([3,4]),function($,e){return $.create("vs/editor/contrib/wordHighlighter/browser/highlightDecorations",e)}),define(te[713],ie([3,4]),function($,e){return $.create("vs/editor/contrib/wordHighlighter/browser/wordHighlighter",e)}),define(te[714],ie([3,4]),function($,e){return $.create("vs/editor/contrib/wordOperations/browser/wordOperations",e)}),define(te[715],ie([3,4]),function($,e){return $.create("vs/platform/action/common/actionCommonCategories",e)}),define(te[716],ie([3,4]),function($,e){return $.create("vs/platform/actionWidget/browser/actionList",e)}),define(te[717],ie([3,4]),function($,e){return $.create("vs/platform/actionWidget/browser/actionWidget",e)}),define(te[718],ie([3,4]),function($,e){return $.create("vs/platform/actions/browser/menuEntryActionViewItem",e)}),define(te[719],ie([3,4]),function($,e){return $.create("vs/platform/actions/browser/toolbar",e)}),define(te[720],ie([3,4]),function($,e){return $.create("vs/platform/actions/common/menuService",e)}),define(te[721],ie([3,4]),function($,e){return $.create("vs/platform/audioCues/browser/audioCueService",e)}),define(te[722],ie([3,4]),function($,e){return $.create("vs/platform/configuration/common/configurationRegistry",e)}),define(te[723],ie([3,4]),function($,e){return $.create("vs/platform/contextkey/browser/contextKeyService",e)}),define(te[724],ie([3,4]),function($,e){return $.create("vs/platform/contextkey/common/contextkey",e)}),define(te[725],ie([3,4]),function($,e){return $.create("vs/platform/contextkey/common/contextkeys",e)}),define(te[726],ie([3,4]),function($,e){return $.create("vs/platform/contextkey/common/scanner",e)}),define(te[727],ie([3,4]),function($,e){return $.create("vs/platform/history/browser/contextScopedHistoryWidget",e)}),define(te[728],ie([3,4]),function($,e){return $.create("vs/platform/keybinding/common/abstractKeybindingService",e)}),define(te[729],ie([3,4]),function($,e){return $.create("vs/platform/list/browser/listService",e)}),define(te[730],ie([3,4]),function($,e){return $.create("vs/platform/markers/common/markers",e)}),define(te[731],ie([3,4]),function($,e){return $.create("vs/platform/quickinput/browser/commandsQuickAccess",e)}),define(te[732],ie([3,4]),function($,e){return $.create("vs/platform/quickinput/browser/helpQuickAccess",e)}),define(te[733],ie([3,4]),function($,e){return $.create("vs/platform/quickinput/browser/quickInput",e)}),define(te[734],ie([3,4]),function($,e){return $.create("vs/platform/quickinput/browser/quickInputController",e)}),define(te[735],ie([3,4]),function($,e){return $.create("vs/platform/quickinput/browser/quickInputList",e)}),define(te[736],ie([3,4]),function($,e){return $.create("vs/platform/quickinput/browser/quickInputUtils",e)}),define(te[737],ie([3,4]),function($,e){return $.create("vs/platform/theme/common/colorRegistry",e)}),define(te[738],ie([3,4]),function($,e){return $.create("vs/platform/theme/common/iconRegistry",e)}),define(te[739],ie([3,4]),function($,e){return $.create("vs/platform/undoRedo/common/undoRedoService",e)}),define(te[740],ie([3,4]),function($,e){return $.create("vs/platform/workspace/common/workspace",e)}),define(te[741],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isICommandActionToggleInfo=void 0;function L(I){return I?I.condition!==void 0:!1}e.isICommandActionToggleInfo=L}),define(te[742],ie([1,0,715]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Categories=void 0,e.Categories=Object.freeze({View:{value:(0,L.localize)(0,null),original:"View"},Help:{value:(0,L.localize)(1,null),original:"Help"},Test:{value:(0,L.localize)(2,null),original:"Test"},File:{value:(0,L.localize)(3,null),original:"File"},Preferences:{value:(0,L.localize)(4,null),original:"Preferences"},Developer:{value:(0,L.localize)(5,null),original:"Developer"}})}),define(te[743],ie([1,0,9,726]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Scanner=void 0;function y(..._){switch(_.length){case 1:return(0,I.localize)(0,null,_[0]);case 2:return(0,I.localize)(1,null,_[0],_[1]);case 3:return(0,I.localize)(2,null,_[0],_[1],_[2]);default:return}}const D=(0,I.localize)(3,null),S=(0,I.localize)(4,null);class m{constructor(){this._input="",this._start=0,this._current=0,this._tokens=[],this._errors=[],this.stringRe=/[a-zA-Z0-9_<>\-\./\\:\*\?\+\[\]\^,#@;"%\$\p{L}-]+/uy}static getLexeme(v){switch(v.type){case 0:return"(";case 1:return")";case 2:return"!";case 3:return v.isTripleEq?"===":"==";case 4:return v.isTripleEq?"!==":"!=";case 5:return"<";case 6:return"<=";case 7:return">=";case 8:return">=";case 9:return"=~";case 10:return v.lexeme;case 11:return"true";case 12:return"false";case 13:return"in";case 14:return"not";case 15:return"&&";case 16:return"||";case 17:return v.lexeme;case 18:return v.lexeme;case 19:return v.lexeme;case 20:return"EOF";default:throw(0,L.illegalState)(`unhandled token type: ${JSON.stringify(v)}; have you forgotten to add a case?`)}}reset(v){return this._input=v,this._start=0,this._current=0,this._tokens=[],this._errors=[],this}scan(){for(;!this._isAtEnd();)switch(this._start=this._current,this._advance()){case 40:this._addToken(0);break;case 41:this._addToken(1);break;case 33:if(this._match(61)){const C=this._match(61);this._tokens.push({type:4,offset:this._start,isTripleEq:C})}else this._addToken(2);break;case 39:this._quotedString();break;case 47:this._regex();break;case 61:if(this._match(61)){const C=this._match(61);this._tokens.push({type:3,offset:this._start,isTripleEq:C})}else this._match(126)?this._addToken(9):this._error(y("==","=~"));break;case 60:this._addToken(this._match(61)?6:5);break;case 62:this._addToken(this._match(61)?8:7);break;case 38:this._match(38)?this._addToken(15):this._error(y("&&"));break;case 124:this._match(124)?this._addToken(16):this._error(y("||"));break;case 32:case 13:case 9:case 10:case 160:break;default:this._string()}return this._start=this._current,this._addToken(20),Array.from(this._tokens)}_match(v){return this._isAtEnd()||this._input.charCodeAt(this._current)!==v?!1:(this._current++,!0)}_advance(){return this._input.charCodeAt(this._current++)}_peek(){return this._isAtEnd()?0:this._input.charCodeAt(this._current)}_addToken(v){this._tokens.push({type:v,offset:this._start})}_error(v){const C=this._start,s=this._input.substring(this._start,this._current),i={type:19,offset:this._start,lexeme:s};this._errors.push({offset:C,lexeme:s,additionalInfo:v}),this._tokens.push(i)}_string(){this.stringRe.lastIndex=this._start;const v=this.stringRe.exec(this._input);if(v){this._current=this._start+v[0].length;const C=this._input.substring(this._start,this._current),s=m._keywords.get(C);s?this._addToken(s):this._tokens.push({type:17,lexeme:C,offset:this._start})}}_quotedString(){for(;this._peek()!==39&&!this._isAtEnd();)this._advance();if(this._isAtEnd()){this._error(D);return}this._advance(),this._tokens.push({type:18,lexeme:this._input.substring(this._start+1,this._current-1),offset:this._start+1})}_regex(){let v=this._current,C=!1,s=!1;for(;;){if(v>=this._input.length){this._current=v,this._error(S);return}const n=this._input.charCodeAt(v);if(C)C=!1;else if(n===47&&!s){v++;break}else n===91?s=!0:n===92?C=!0:n===93&&(s=!1);v++}for(;v=this._input.length}}e.Scanner=m,m._regexFlags=new Set(["i","g","s","m","y","u"].map(_=>_.charCodeAt(0))),m._keywords=new Map([["not",14],["in",13],["false",12],["true",11]])}),define(te[744],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorOpenSource=void 0;var L;(function(I){I[I.API=0]="API",I[I.USER=1]="USER"})(L||(e.EditorOpenSource=L={}))}),define(te[745],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExtensionIdentifierSet=e.ExtensionIdentifier=void 0;class L{constructor(D){this.value=D,this._lower=D.toLowerCase()}static toKey(D){return typeof D=="string"?D.toLowerCase():D._lower}}e.ExtensionIdentifier=L;class I{constructor(D){if(this._set=new Set,D)for(const S of D)this.add(S)}add(D){this._set.add(L.toKey(D))}has(D){return this._set.has(L.toKey(D))}}e.ExtensionIdentifierSet=I}),define(te[334],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FileKind=void 0;var L;(function(I){I[I.FILE=0]="FILE",I[I.FOLDER=1]="FOLDER",I[I.ROOT_FOLDER=2]="ROOT_FOLDER"})(L||(e.FileKind=L={}))}),define(te[746],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.showHistoryKeybindingHint=void 0;function L(I){var y,D;return((y=I.lookupKeybinding("history.showPrevious"))===null||y===void 0?void 0:y.getElectronAccelerator())==="Up"&&((D=I.lookupKeybinding("history.showNext"))===null||D===void 0?void 0:D.getElectronAccelerator())==="Down"}e.showHistoryKeybindingHint=L}),define(te[232],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SyncDescriptor=void 0;class L{constructor(y,D=[],S=!1){this.ctor=y,this.staticArguments=D,this.supportsDelayedInstantiation=S}}e.SyncDescriptor=L}),define(te[47],ie([1,0,232]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSingletonServiceDescriptors=e.registerSingleton=void 0;const I=[];function y(S,m,_){m instanceof L.SyncDescriptor||(m=new L.SyncDescriptor(m,[],!!_)),I.push([S,m])}e.registerSingleton=y;function D(){return I}e.getSingletonServiceDescriptors=D}),define(te[747],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Graph=e.Node=void 0;class L{constructor(D,S){this.key=D,this.data=S,this.incoming=new Map,this.outgoing=new Map}}e.Node=L;class I{constructor(D){this._hashFn=D,this._nodes=new Map}roots(){const D=[];for(const S of this._nodes.values())S.outgoing.size===0&&D.push(S);return D}insertEdge(D,S){const m=this.lookupOrInsertNode(D),_=this.lookupOrInsertNode(S);m.outgoing.set(_.key,_),_.incoming.set(m.key,m)}removeNode(D){const S=this._hashFn(D);this._nodes.delete(S);for(const m of this._nodes.values())m.outgoing.delete(S),m.incoming.delete(S)}lookupOrInsertNode(D){const S=this._hashFn(D);let m=this._nodes.get(S);return m||(m=new L(S,D),this._nodes.set(S,m)),m}isEmpty(){return this._nodes.size===0}toString(){const D=[];for(const[S,m]of this._nodes)D.push(`${S} - (-> incoming)[${[...m.incoming.keys()].join(", ")}] - (outgoing ->)[${[...m.outgoing.keys()].join(",")}] -`);return D.join(` -`)}findCycleSlow(){for(const[D,S]of this._nodes){const m=new Set([D]),_=this._findCycle(S,m);if(_)return _}}_findCycle(D,S){for(const[m,_]of D.outgoing){if(S.has(m))return[...S,m].join(" -> ");S.add(m);const v=this._findCycle(_,S);if(v)return v;S.delete(m)}}}e.Graph=I}),define(te[8],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createDecorator=e.IInstantiationService=e._util=void 0;var L;(function(D){D.serviceIds=new Map,D.DI_TARGET="$di$target",D.DI_DEPENDENCIES="$di$dependencies";function S(m){return m[D.DI_DEPENDENCIES]||[]}D.getServiceDependencies=S})(L||(e._util=L={})),e.IInstantiationService=y("instantiationService");function I(D,S,m){S[L.DI_TARGET]===S?S[L.DI_DEPENDENCIES].push({id:D,index:m}):(S[L.DI_DEPENDENCIES]=[{id:D,index:m}],S[L.DI_TARGET]=S)}function y(D){if(L.serviceIds.has(D))return L.serviceIds.get(D);const S=function(m,_,v){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");I(S,m,v)};return S.toString=()=>D,L.serviceIds.set(D,S),S}e.createDecorator=y}),define(te[130],ie([1,0,8,21,20]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ResourceFileEdit=e.ResourceTextEdit=e.ResourceEdit=e.IBulkEditService=void 0,e.IBulkEditService=(0,L.createDecorator)("IWorkspaceEditService");class D{constructor(v){this.metadata=v}static convert(v){return v.edits.map(C=>{if(S.is(C))return S.lift(C);if(m.is(C))return m.lift(C);throw new Error("Unsupported edit")})}}e.ResourceEdit=D;class S extends D{static is(v){return v instanceof S?!0:(0,y.isObject)(v)&&I.URI.isUri(v.resource)&&(0,y.isObject)(v.textEdit)}static lift(v){return v instanceof S?v:new S(v.resource,v.textEdit,v.versionId,v.metadata)}constructor(v,C,s=void 0,i){super(i),this.resource=v,this.textEdit=C,this.versionId=s}}e.ResourceTextEdit=S;class m extends D{static is(v){return v instanceof m?!0:(0,y.isObject)(v)&&(!!v.newResource||!!v.oldResource)}static lift(v){return v instanceof m?v:new m(v.oldResource,v.newResource,v.options,v.metadata)}constructor(v,C,s={},i){super(i),this.oldResource=v,this.newResource=C,this.options=s}}e.ResourceFileEdit=m}),define(te[33],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ICodeEditorService=void 0,e.ICodeEditorService=(0,L.createDecorator)("codeEditorService")}),define(te[42],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageService=void 0,e.ILanguageService=(0,L.createDecorator)("languageService")}),define(te[115],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorWorkerService=void 0,e.IEditorWorkerService=(0,L.createDecorator)("editorWorkerService")}),define(te[18],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILanguageFeaturesService=void 0,e.ILanguageFeaturesService=(0,L.createDecorator)("ILanguageFeaturesService")});var ge=this&&this.__param||function($,e){return function(L,I){e(L,I,$)}};define(te[748],ie([1,0,7,128,13,26,6,57,2,40,27,20,487,100,64,12,5,29,18,614]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HideUnchangedRegionsFeature=void 0;let o=class extends _.Disposable{get isUpdatingViewZones(){return this._isUpdatingViewZones}constructor(h,p,b,w){super(),this._editors=h,this._diffModel=p,this._options=b,this._languageFeaturesService=w,this._isUpdatingViewZones=!1,this._modifiedOutlineSource=(0,v.derivedWithStore)(this,(B,T)=>{const N=this._editors.modifiedModel.read(B);if(N)return T.add(new c(this._languageFeaturesService,N))}),this._register(this._editors.original.onDidChangeCursorPosition(B=>{if(B.reason===3){const T=this._diffModel.get();(0,v.transaction)(N=>{for(const A of this._editors.original.getSelections()||[])T?.ensureOriginalLineIsVisible(A.getStartPosition().lineNumber,N),T?.ensureOriginalLineIsVisible(A.getEndPosition().lineNumber,N)})}})),this._register(this._editors.modified.onDidChangeCursorPosition(B=>{if(B.reason===3){const T=this._diffModel.get();(0,v.transaction)(N=>{for(const A of this._editors.modified.getSelections()||[])T?.ensureModifiedLineIsVisible(A.getStartPosition().lineNumber,N),T?.ensureModifiedLineIsVisible(A.getEndPosition().lineNumber,N)})}}));const E=this._diffModel.map((B,T)=>{var N,A;return((N=B?.diff.read(T))===null||N===void 0?void 0:N.mappings.length)===0?[]:(A=B?.unchangedRegions.read(T))!==null&&A!==void 0?A:[]}),k=(0,v.derivedWithStore)(this,(B,T)=>{const N=this._modifiedOutlineSource.read(B);if(!N)return{origViewZones:[],modViewZones:[]};const A=[],P=[],O=this._options.renderSideBySide.read(B),x=E.read(B);for(const W of x)if(!W.shouldHideControls(B)){{const U=(0,v.derived)(G=>W.getHiddenOriginalRange(G).startLineNumber-1),F=new n.PlaceholderViewZone(U,24);A.push(F),T.add(new a(this._editors.original,F,W,W.originalUnchangedRange,!O,N,G=>this._diffModel.get().ensureModifiedLineIsVisible(G,void 0),this._options))}{const U=(0,v.derived)(G=>W.getHiddenModifiedRange(G).startLineNumber-1),F=new n.PlaceholderViewZone(U,24);P.push(F),T.add(new a(this._editors.modified,F,W,W.modifiedUnchangedRange,!1,N,G=>this._diffModel.get().ensureModifiedLineIsVisible(G,void 0),this._options))}}return{origViewZones:A,modViewZones:P}}),M={description:"unchanged lines",className:"diff-unchanged-lines",isWholeLine:!0},R={description:"Fold Unchanged",glyphMarginHoverMessage:new m.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,l.localize)(0,null)),glyphMarginClassName:"fold-unchanged "+C.ThemeIcon.asClassName(D.Codicon.fold),zIndex:10001};this._register((0,n.applyObservableDecorations)(this._editors.original,(0,v.derived)(B=>{const T=E.read(B),N=T.map(A=>({range:A.originalUnchangedRange.toInclusiveRange(),options:M}));for(const A of T)A.shouldHideControls(B)&&N.push({range:u.Range.fromPositions(new r.Position(A.originalLineNumber,1)),options:R});return N}))),this._register((0,n.applyObservableDecorations)(this._editors.modified,(0,v.derived)(B=>{const T=E.read(B),N=T.map(A=>({range:A.modifiedUnchangedRange.toInclusiveRange(),options:M}));for(const A of T)A.shouldHideControls(B)&&N.push({range:t.LineRange.ofLength(A.modifiedLineNumber,1).toInclusiveRange(),options:R});return N}))),this._register((0,n.applyViewZones)(this._editors.original,k.map(B=>B.origViewZones),B=>this._isUpdatingViewZones=B)),this._register((0,n.applyViewZones)(this._editors.modified,k.map(B=>B.modViewZones),B=>this._isUpdatingViewZones=B)),this._register((0,v.autorun)(B=>{const T=E.read(B);this._editors.original.setHiddenAreas(T.map(N=>N.getHiddenOriginalRange(B).toInclusiveRange()).filter(s.isDefined)),this._editors.modified.setHiddenAreas(T.map(N=>N.getHiddenModifiedRange(B).toInclusiveRange()).filter(s.isDefined))})),this._register(this._editors.modified.onMouseUp(B=>{var T;if(!B.event.rightButton&&B.target.position&&(!((T=B.target.element)===null||T===void 0)&&T.className.includes("fold-unchanged"))){const N=B.target.position.lineNumber,A=this._diffModel.get();if(!A)return;const P=A.unchangedRegions.get().find(O=>O.modifiedUnchangedRange.includes(N));if(!P)return;P.collapseAll(void 0),B.event.stopPropagation(),B.event.preventDefault()}})),this._register(this._editors.original.onMouseUp(B=>{var T;if(!B.event.rightButton&&B.target.position&&(!((T=B.target.element)===null||T===void 0)&&T.className.includes("fold-unchanged"))){const N=B.target.position.lineNumber,A=this._diffModel.get();if(!A)return;const P=A.unchangedRegions.get().find(O=>O.originalUnchangedRange.includes(N));if(!P)return;P.collapseAll(void 0),B.event.stopPropagation(),B.event.preventDefault()}}))}};e.HideUnchangedRegionsFeature=o,e.HideUnchangedRegionsFeature=o=Ie([ge(3,d.ILanguageFeaturesService)],o);let c=class extends _.Disposable{constructor(h,p){super(),this._languageFeaturesService=h,this._textModel=p,this._currentModel=(0,v.observableValue)(this,void 0);const b=(0,v.observableSignalFromEvent)("documentSymbolProvider.onDidChange",this._languageFeaturesService.documentSymbolProvider.onDidChange),w=(0,v.observableSignalFromEvent)("_textModel.onDidChangeContent",S.Event.debounce(E=>this._textModel.onDidChangeContent(E),()=>{},100));this._register((0,v.autorunWithStore)((E,k)=>be(this,void 0,void 0,function*(){b.read(E),w.read(E);const M=k.add(new n.DisposableCancellationTokenSource),R=yield i.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,this._textModel,M.token);k.isDisposed||this._currentModel.set(R,void 0)})))}getBreadcrumbItems(h,p){const b=this._currentModel.read(p);if(!b)return[];const w=b.asListOfDocumentSymbols().filter(E=>h.contains(E.range.startLineNumber)&&!h.contains(E.range.endLineNumber));return w.sort((0,y.reverseOrder)((0,y.compareBy)(E=>E.range.endLineNumber-E.range.startLineNumber,y.numberComparator))),w.map(E=>({name:E.name,kind:E.kind,startLineNumber:E.range.startLineNumber}))}};c=Ie([ge(0,d.ILanguageFeaturesService)],c);class a extends n.ViewZoneOverlayWidget{constructor(h,p,b,w,E,k,M,R){const B=(0,L.h)("div.diff-hidden-lines-widget");super(h,p,B.root),this._editor=h,this._unchangedRegion=b,this._unchangedRegionRange=w,this.hide=E,this._modifiedOutlineSource=k,this._revealModifiedHiddenLine=M,this._options=R,this._nodes=(0,L.h)("div.diff-hidden-lines",[(0,L.h)("div.top@top",{title:(0,l.localize)(1,null)}),(0,L.h)("div.center@content",{style:{display:"flex"}},[(0,L.h)("div@first",{style:{display:"flex",justifyContent:"center",alignItems:"center",flexShrink:"0"}},[(0,L.$)("a",{title:(0,l.localize)(2,null),role:"button",onclick:()=>{this._unchangedRegion.showAll(void 0)}},...(0,I.renderLabelWithIcons)("$(unfold)"))]),(0,L.h)("div@others",{style:{display:"flex",justifyContent:"center",alignItems:"center"}})]),(0,L.h)("div.bottom@bottom",{title:(0,l.localize)(3,null),role:"button"})]),B.root.appendChild(this._nodes.root);const T=(0,v.observableFromEvent)(this._editor.onDidLayoutChange,()=>this._editor.getLayoutInfo());this.hide?(0,L.reset)(this._nodes.first):this._register((0,n.applyStyle)(this._nodes.first,{width:T.map(A=>A.contentLeft)}));const N=this._editor;this._register((0,L.addDisposableListener)(this._nodes.top,"mousedown",A=>{if(A.button!==0)return;this._nodes.top.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),A.preventDefault();const P=A.clientY;let O=!1;const x=this._unchangedRegion.visibleLineCountTop.get();this._unchangedRegion.isDragged.set(!0,void 0);const W=(0,L.addDisposableListener)(window,"mousemove",F=>{const Y=F.clientY-P;O=O||Math.abs(Y)>2;const ne=Math.round(Y/N.getOption(66)),se=Math.max(0,Math.min(x+ne,this._unchangedRegion.getMaxVisibleLineCountTop()));this._unchangedRegion.visibleLineCountTop.set(se,void 0)}),U=(0,L.addDisposableListener)(window,"mouseup",F=>{O||this._unchangedRegion.showMoreAbove(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0),this._nodes.top.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),this._unchangedRegion.isDragged.set(!1,void 0),W.dispose(),U.dispose()})})),this._register((0,L.addDisposableListener)(this._nodes.bottom,"mousedown",A=>{if(A.button!==0)return;this._nodes.bottom.classList.toggle("dragging",!0),this._nodes.root.classList.toggle("dragging",!0),A.preventDefault();const P=A.clientY;let O=!1;const x=this._unchangedRegion.visibleLineCountBottom.get();this._unchangedRegion.isDragged.set(!0,void 0);const W=(0,L.addDisposableListener)(window,"mousemove",F=>{const Y=F.clientY-P;O=O||Math.abs(Y)>2;const ne=Math.round(Y/N.getOption(66)),se=Math.max(0,Math.min(x-ne,this._unchangedRegion.getMaxVisibleLineCountBottom())),J=N.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.visibleLineCountBottom.set(se,void 0);const q=N.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);N.setScrollTop(N.getScrollTop()+(q-J))}),U=(0,L.addDisposableListener)(window,"mouseup",F=>{if(this._unchangedRegion.isDragged.set(!1,void 0),!O){const G=N.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);this._unchangedRegion.showMoreBelow(this._options.hideUnchangedRegionsRevealLineCount.get(),void 0);const Y=N.getTopForLineNumber(this._unchangedRegionRange.endLineNumberExclusive);N.setScrollTop(N.getScrollTop()+(Y-G))}this._nodes.bottom.classList.toggle("dragging",!1),this._nodes.root.classList.toggle("dragging",!1),W.dispose(),U.dispose()})})),this._register((0,v.autorun)(A=>{const P=[];if(!this.hide){const O=b.getHiddenModifiedRange(A).length,x=(0,l.localize)(4,null,O),W=(0,L.$)("span",{title:(0,l.localize)(5,null)},x);W.addEventListener("dblclick",G=>{G.button===0&&(G.preventDefault(),this._unchangedRegion.showAll(void 0))}),P.push(W);const U=this._unchangedRegion.getHiddenModifiedRange(A),F=this._modifiedOutlineSource.getBreadcrumbItems(U,A);if(F.length>0){P.push((0,L.$)("span",void 0,"\xA0\xA0|\xA0\xA0"));for(let G=0;G{this._revealModifiedHiddenLine(Y.startLineNumber)}}}}(0,L.reset)(this._nodes.others,...P)}))}}}),define(te[749],ie([1,0,598,18,47]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeaturesService=void 0;class D{constructor(){this.referenceProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.renameProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.codeActionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.definitionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.typeDefinitionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.declarationProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.implementationProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentSymbolProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.inlayHintsProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.colorProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.codeLensProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentFormattingEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeFormattingEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.onTypeFormattingEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.signatureHelpProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.hoverProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentHighlightProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.selectionRangeProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.foldingRangeProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.linkProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.inlineCompletionsProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.completionProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.linkedEditingRangeProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentRangeSemanticTokensProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentSemanticTokensProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentOnDropEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this)),this.documentPasteEditProvider=new L.LanguageFeatureRegistry(this._score.bind(this))}_score(m){var _;return(_=this._notebookTypeResolver)===null||_===void 0?void 0:_.call(this,m)}}e.LanguageFeaturesService=D,(0,y.registerSingleton)(I.ILanguageFeaturesService,D,1)}),define(te[233],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerDecorationsService=void 0,e.IMarkerDecorationsService=(0,L.createDecorator)("markerDecorationsService")}),define(te[50],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IModelService=void 0,e.IModelService=(0,L.createDecorator)("modelService")}),define(te[65],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextModelService=void 0,e.ITextModelService=(0,L.createDecorator)("textModelService")}),define(te[234],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISemanticTokensStylingService=void 0,e.ISemanticTokensStylingService=(0,L.createDecorator)("semanticTokensStylingService")}),define(te[185],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITextResourcePropertiesService=e.ITextResourceConfigurationService=void 0,e.ITextResourceConfigurationService=(0,L.createDecorator)("textResourceConfigurationService"),e.ITextResourcePropertiesService=(0,L.createDecorator)("textResourcePropertiesService")}),define(te[750],ie([1,0,47,8,288]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITreeViewsDnDService=void 0,e.ITreeViewsDnDService=(0,I.createDecorator)("treeViewsDndService"),(0,L.registerSingleton)(e.ITreeViewsDnDService,y.TreeViewsDnDService,1)}),define(te[335],ie([1,0,130]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sortEditsByYieldTo=e.createCombinedWorkspaceEdit=void 0;function I(D,S,m){var _,v;return{edits:[...S.map(C=>new L.ResourceTextEdit(D,typeof m.insertText=="string"?{range:C,text:m.insertText,insertAsSnippet:!1}:{range:C,text:m.insertText.snippet,insertAsSnippet:!0})),...(v=(_=m.additionalEdit)===null||_===void 0?void 0:_.edits)!==null&&v!==void 0?v:[]]}}e.createCombinedWorkspaceEdit=I;function y(D){var S;function m(i,n){return"providerId"in i&&i.providerId===n.providerId||"mimeType"in i&&i.mimeType===n.handledMimeType}const _=new Map;for(const i of D)for(const n of(S=i.yieldTo)!==null&&S!==void 0?S:[])for(const t of D)if(t!==i&&m(n,t)){let r=_.get(i);r||(r=[],_.set(i,r)),r.push(t)}if(!_.size)return Array.from(D);const v=new Set,C=[];function s(i){if(!i.length)return[];const n=i[0];if(C.includes(n))return console.warn(`Yield to cycle detected for ${n.providerId}`),i;if(v.has(n))return s(i.slice(1));let t=[];const r=_.get(n);return r&&(C.push(n),t=s(r),C.pop()),v.add(n),[...t,n,...s(i.slice(1))]}return s(Array.from(D))}e.sortEditsByYieldTo=y}),define(te[751],ie([1,0,90,6,2,40,10,70,39,12,5,101,42,49,91,149,114,215,150,454]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GhostTextWidget=e.GHOST_TEXT_DESCRIPTION=void 0,e.GHOST_TEXT_DESCRIPTION="ghost-text";let l=class extends y.Disposable{constructor(h,p,b){super(),this.editor=h,this.model=p,this.languageService=b,this.isDisposed=(0,D.observableValue)(this,!1),this.currentTextModel=(0,D.observableFromEvent)(this.editor.onDidChangeModel,()=>this.editor.getModel()),this.uiState=(0,D.derived)(this,w=>{if(this.isDisposed.read(w))return;const E=this.currentTextModel.read(w);if(E!==this.model.targetTextModel.read(w))return;const k=this.model.ghostText.read(w);if(!k)return;const M=k instanceof f.GhostTextReplacement?k.columnRange:void 0,R=[],B=[];function T(x,W){if(B.length>0){const U=B[B.length-1];W&&U.decorations.push(new r.LineDecoration(U.content.length+1,U.content.length+1+x[0].length,W,0)),U.content+=x[0],x=x.slice(1)}for(const U of x)B.push({content:U,decorations:W?[new r.LineDecoration(1,U.length+1,W,0)]:[]})}const N=E.getLineContent(k.lineNumber);let A,P=0;for(const x of k.parts){let W=x.lines;A===void 0?(R.push({column:x.column,text:W[0],preview:x.preview}),W=W.slice(1)):T([N.substring(P,x.column-1)],void 0),W.length>0&&(T(W,e.GHOST_TEXT_DESCRIPTION),A===void 0&&x.column<=N.length&&(A=x.column)),P=x.column-1}A!==void 0&&T([N.substring(P)],void 0);const O=A!==void 0?new d.ColumnRange(A,N.length+1):void 0;return{replacedRange:M,inlineTexts:R,additionalLines:B,hiddenRange:O,lineNumber:k.lineNumber,additionalReservedLineCount:this.model.minReservedLineCount.read(w),targetTextModel:E}}),this.decorations=(0,D.derived)(this,w=>{const E=this.uiState.read(w);if(!E)return[];const k=[];E.replacedRange&&k.push({range:E.replacedRange.toRange(E.lineNumber),options:{inlineClassName:"inline-completion-text-to-replace",description:"GhostTextReplacement"}}),E.hiddenRange&&k.push({range:E.hiddenRange.toRange(E.lineNumber),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});for(const M of E.inlineTexts)k.push({range:C.Range.fromPositions(new v.Position(E.lineNumber,M.column)),options:{description:e.GHOST_TEXT_DESCRIPTION,after:{content:M.text,inlineClassName:M.preview?"ghost-text-decoration-preview":"ghost-text-decoration",cursorStops:n.InjectedTextCursorStops.Left},showIfCollapsed:!0}});return k}),this.additionalLinesWidget=this._register(new o(this.editor,this.languageService.languageIdCodec,(0,D.derived)(w=>{const E=this.uiState.read(w);return E?{lineNumber:E.lineNumber,additionalLines:E.additionalLines,minReservedLineCount:E.additionalReservedLineCount,targetTextModel:E.targetTextModel}:void 0}))),this._register((0,y.toDisposable)(()=>{this.isDisposed.set(!0,void 0)})),this._register((0,d.applyObservableDecorations)(this.editor,this.decorations))}ownsViewZone(h){return this.additionalLinesWidget.viewZoneId===h}};e.GhostTextWidget=l,e.GhostTextWidget=l=Ie([ge(2,i.ILanguageService)],l);class o extends y.Disposable{get viewZoneId(){return this._viewZoneId}constructor(h,p,b){super(),this.editor=h,this.languageIdCodec=p,this.lines=b,this._viewZoneId=void 0,this.editorOptionsChanged=(0,D.observableSignalFromEvent)("editorOptionChanged",I.Event.filter(this.editor.onDidChangeConfiguration,w=>w.hasChanged(33)||w.hasChanged(116)||w.hasChanged(98)||w.hasChanged(93)||w.hasChanged(51)||w.hasChanged(50)||w.hasChanged(66))),this._register((0,D.autorun)(w=>{const E=this.lines.read(w);this.editorOptionsChanged.read(w),E?this.updateLines(E.lineNumber,E.additionalLines,E.minReservedLineCount):this.clear()}))}dispose(){super.dispose(),this.clear()}clear(){this.editor.changeViewZones(h=>{this._viewZoneId&&(h.removeZone(this._viewZoneId),this._viewZoneId=void 0)})}updateLines(h,p,b){const w=this.editor.getModel();if(!w)return;const{tabSize:E}=w.getOptions();this.editor.changeViewZones(k=>{this._viewZoneId&&(k.removeZone(this._viewZoneId),this._viewZoneId=void 0);const M=Math.max(p.length,b);if(M>0){const R=document.createElement("div");c(R,E,p,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=k.addZone({afterLineNumber:h,heightInLines:M,domNode:R,afterColumnAffinity:1})}})}}function c(g,h,p,b,w){const E=b.get(33),k=b.get(116),M="none",R=b.get(93),B=b.get(51),T=b.get(50),N=b.get(66),A=new s.StringBuilder(1e4);A.appendString('
    ');for(let x=0,W=p.length;x');const G=S.isBasicASCII(F),Y=S.containsRTL(F),ne=t.LineTokens.createEmpty(F,w);(0,u.renderViewLine)(new u.RenderLineInput(T.isMonospace&&!E,T.canUseHalfwidthRightwardsArrow,F,!1,G,Y,0,ne,U.decorations,h,0,T.spaceWidth,T.middotWidth,T.wsmiddotWidth,k,M,R,B!==_.EditorFontLigatures.OFF,null),A),A.appendString("
    ")}A.appendString(""),(0,m.applyFontInfo)(g,T);const P=A.build(),O=a?a.createHTML(P):P;g.innerHTML=O}const a=(0,L.createTrustedTypesPolicy)("editorGhostText",{createHTML:g=>g})}),define(te[131],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IStandaloneThemeService=void 0,e.IStandaloneThemeService=(0,L.createDecorator)("themeService")}),define(te[156],ie([1,0,8,721]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AudioCue=e.SoundSource=e.Sound=e.IAudioCueService=void 0,e.IAudioCueService=(0,L.createDecorator)("audioCue");class y{static register(_){return new y(_.fileName)}constructor(_){this.fileName=_}}e.Sound=y,y.error=y.register({fileName:"error.mp3"}),y.warning=y.register({fileName:"warning.mp3"}),y.foldedArea=y.register({fileName:"foldedAreas.mp3"}),y.break=y.register({fileName:"break.mp3"}),y.quickFixes=y.register({fileName:"quickFixes.mp3"}),y.taskCompleted=y.register({fileName:"taskCompleted.mp3"}),y.taskFailed=y.register({fileName:"taskFailed.mp3"}),y.terminalBell=y.register({fileName:"terminalBell.mp3"}),y.diffLineInserted=y.register({fileName:"diffLineInserted.mp3"}),y.diffLineDeleted=y.register({fileName:"diffLineDeleted.mp3"}),y.diffLineModified=y.register({fileName:"diffLineModified.mp3"}),y.chatRequestSent=y.register({fileName:"chatRequestSent.mp3"}),y.chatResponsePending=y.register({fileName:"chatResponsePending.mp3"}),y.chatResponseReceived1=y.register({fileName:"chatResponseReceived1.mp3"}),y.chatResponseReceived2=y.register({fileName:"chatResponseReceived2.mp3"}),y.chatResponseReceived3=y.register({fileName:"chatResponseReceived3.mp3"}),y.chatResponseReceived4=y.register({fileName:"chatResponseReceived4.mp3"});class D{constructor(_){this.randomOneOf=_}}e.SoundSource=D;class S{static register(_){const v=new D("randomOneOf"in _.sound?_.sound.randomOneOf:[_.sound]),C=new S(v,_.name,_.settingsKey);return S._audioCues.add(C),C}constructor(_,v,C){this.sound=_,this.name=v,this.settingsKey=C}}e.AudioCue=S,S._audioCues=new Set,S.error=S.register({name:(0,I.localize)(0,null),sound:y.error,settingsKey:"audioCues.lineHasError"}),S.warning=S.register({name:(0,I.localize)(1,null),sound:y.warning,settingsKey:"audioCues.lineHasWarning"}),S.foldedArea=S.register({name:(0,I.localize)(2,null),sound:y.foldedArea,settingsKey:"audioCues.lineHasFoldedArea"}),S.break=S.register({name:(0,I.localize)(3,null),sound:y.break,settingsKey:"audioCues.lineHasBreakpoint"}),S.inlineSuggestion=S.register({name:(0,I.localize)(4,null),sound:y.quickFixes,settingsKey:"audioCues.lineHasInlineSuggestion"}),S.terminalQuickFix=S.register({name:(0,I.localize)(5,null),sound:y.quickFixes,settingsKey:"audioCues.terminalQuickFix"}),S.onDebugBreak=S.register({name:(0,I.localize)(6,null),sound:y.break,settingsKey:"audioCues.onDebugBreak"}),S.noInlayHints=S.register({name:(0,I.localize)(7,null),sound:y.error,settingsKey:"audioCues.noInlayHints"}),S.taskCompleted=S.register({name:(0,I.localize)(8,null),sound:y.taskCompleted,settingsKey:"audioCues.taskCompleted"}),S.taskFailed=S.register({name:(0,I.localize)(9,null),sound:y.taskFailed,settingsKey:"audioCues.taskFailed"}),S.terminalCommandFailed=S.register({name:(0,I.localize)(10,null),sound:y.error,settingsKey:"audioCues.terminalCommandFailed"}),S.terminalBell=S.register({name:(0,I.localize)(11,null),sound:y.terminalBell,settingsKey:"audioCues.terminalBell"}),S.notebookCellCompleted=S.register({name:(0,I.localize)(12,null),sound:y.taskCompleted,settingsKey:"audioCues.notebookCellCompleted"}),S.notebookCellFailed=S.register({name:(0,I.localize)(13,null),sound:y.taskFailed,settingsKey:"audioCues.notebookCellFailed"}),S.diffLineInserted=S.register({name:(0,I.localize)(14,null),sound:y.diffLineInserted,settingsKey:"audioCues.diffLineInserted"}),S.diffLineDeleted=S.register({name:(0,I.localize)(15,null),sound:y.diffLineDeleted,settingsKey:"audioCues.diffLineDeleted"}),S.diffLineModified=S.register({name:(0,I.localize)(16,null),sound:y.diffLineModified,settingsKey:"audioCues.diffLineModified"}),S.chatRequestSent=S.register({name:(0,I.localize)(17,null),sound:y.chatRequestSent,settingsKey:"audioCues.chatRequestSent"}),S.chatResponseReceived=S.register({name:(0,I.localize)(18,null),settingsKey:"audioCues.chatResponseReceived",sound:{randomOneOf:[y.chatResponseReceived1,y.chatResponseReceived2,y.chatResponseReceived3,y.chatResponseReceived4]}}),S.chatResponsePending=S.register({name:(0,I.localize)(19,null),sound:y.chatResponsePending,settingsKey:"audioCues.chatResponsePending"})}),define(te[102],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IClipboardService=void 0,e.IClipboardService=(0,L.createDecorator)("clipboardService")}),define(te[25],ie([1,0,6,43,2,63,20,8]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsRegistry=e.ICommandService=void 0,e.ICommandService=(0,m.createDecorator)("commandService"),e.CommandsRegistry=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new L.Emitter,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(_,v){if(!_)throw new Error("invalid command");if(typeof _=="string"){if(!v)throw new Error("invalid command");return this.registerCommand({id:_,handler:v})}if(_.description){const t=[];for(const u of _.description.args)t.push(u.constraint);const r=_.handler;_.handler=function(u,...f){return(0,S.validateConstraints)(f,t),r(u,...f)}}const{id:C}=_;let s=this._commands.get(C);s||(s=new D.LinkedList,this._commands.set(C,s));const i=s.unshift(_),n=(0,y.toDisposable)(()=>{i();const t=this._commands.get(C);t?.isEmpty()&&this._commands.delete(C)});return this._onDidRegisterCommand.fire(C),n}registerCommandAlias(_,v){return e.CommandsRegistry.registerCommand(_,(C,...s)=>C.get(e.ICommandService).executeCommand(v,...s))}getCommand(_){const v=this._commands.get(_);if(!(!v||v.isEmpty()))return I.Iterable.first(v)}getCommands(){const _=new Map;for(const v of this._commands.keys()){const C=this.getCommand(v);C&&_.set(v,C)}return _}},e.CommandsRegistry.registerCommand("noop",()=>{})}),define(te[336],ie([1,0,19,9,2,20,21,50,25,18]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getCodeLensModel=e.CodeLensModel=void 0;class C{constructor(){this.lenses=[],this._disposables=new y.DisposableStore}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(n,t){this._disposables.add(n);for(const r of n.lenses)this.lenses.push({symbol:r,provider:t})}}e.CodeLensModel=C;function s(i,n,t){return be(this,void 0,void 0,function*(){const r=i.ordered(n),u=new Map,f=new C,d=r.map((l,o)=>be(this,void 0,void 0,function*(){u.set(l,o);try{const c=yield Promise.resolve(l.provideCodeLenses(n,t));c&&f.add(c,l)}catch(c){(0,I.onUnexpectedExternalError)(c)}}));return yield Promise.all(d),f.lenses=f.lenses.sort((l,o)=>l.symbol.range.startLineNumbero.symbol.range.startLineNumber?1:u.get(l.provider)u.get(o.provider)?1:l.symbol.range.startColumno.symbol.range.startColumn?1:0),f})}e.getCodeLensModel=s,_.CommandsRegistry.registerCommand("_executeCodeLensProvider",function(i,...n){let[t,r]=n;(0,D.assertType)(S.URI.isUri(t)),(0,D.assertType)(typeof r=="number"||!r);const{codeLensProvider:u}=i.get(v.ILanguageFeaturesService),f=i.get(m.IModelService).getModel(t);if(!f)throw(0,I.illegalArgument)();const d=[],l=new y.DisposableStore;return s(u,f,L.CancellationToken.None).then(o=>{l.add(o);const c=[];for(const a of o.lenses)r==null||a.symbol.command?d.push(a.symbol):r-- >0&&a.provider.resolveCodeLens&&c.push(Promise.resolve(a.provider.resolveCodeLens(f,a.symbol,L.CancellationToken.None)).then(g=>d.push(g||a.symbol)));return Promise.all(c)}).then(()=>d).finally(()=>{setTimeout(()=>l.dispose(),100)})})}),define(te[752],ie([1,0,13,19,9,2,20,21,5,50,25,18]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLinks=e.LinksList=e.Link=void 0;class i{constructor(u,f){this._link=u,this._provider=f}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(u){return be(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?Promise.resolve(this._provider.resolveLink(this._link,u)).then(f=>(this._link=f||this._link,this._link.url?this.resolve(u):Promise.reject(new Error("missing")))):Promise.reject(new Error("missing"))})}}e.Link=i;class n{constructor(u){this._disposables=new D.DisposableStore;let f=[];for(const[d,l]of u){const o=d.links.map(c=>new i(c,l));f=n._union(f,o),(0,D.isDisposable)(d)&&this._disposables.add(d)}this.links=f}dispose(){this._disposables.dispose(),this.links.length=0}static _union(u,f){const d=[];let l,o,c,a;for(l=0,c=0,o=u.length,a=f.length;lPromise.resolve(o.provideLinks(u,f)).then(a=>{a&&(d[c]=[a,o])},y.onUnexpectedExternalError));return Promise.all(l).then(()=>{const o=new n((0,L.coalesce)(d));return f.isCancellationRequested?(o.dispose(),new n([])):o})}e.getLinks=t,C.CommandsRegistry.registerCommand("_executeLinkProvider",(r,...u)=>be(void 0,void 0,void 0,function*(){let[f,d]=u;(0,S.assertType)(f instanceof m.URI),typeof d!="number"&&(d=0);const{linkProvider:l}=r.get(s.ILanguageFeaturesService),o=r.get(v.IModelService).getModel(f);if(!o)return[];const c=yield t(l,o,I.CancellationToken.None);if(!c)return[];for(let g=0;g0?h[0]:[]}function u(a,g,h,p,b){return be(this,void 0,void 0,function*(){const w=r(a,g),E=yield Promise.all(w.map(k=>be(this,void 0,void 0,function*(){let M,R=null;try{M=yield k.provideDocumentSemanticTokens(g,k===h?p:null,b)}catch(B){R=B,M=null}return(!M||!s(M)&&!i(M))&&(M=null),new n(k,M,R)})));for(const k of E){if(k.error)throw k.error;if(k.tokens)return k}return E.length>0?E[0]:null})}e.getDocumentSemanticTokens=u;function f(a,g){const h=a.orderedGroups(g);return h.length>0?h[0]:null}class d{constructor(g,h){this.provider=g,this.tokens=h}}function l(a,g){return a.has(g)}e.hasDocumentRangeSemanticTokensProvider=l;function o(a,g){const h=a.orderedGroups(g);return h.length>0?h[0]:[]}function c(a,g,h,p){return be(this,void 0,void 0,function*(){const b=o(a,g),w=yield Promise.all(b.map(E=>be(this,void 0,void 0,function*(){let k;try{k=yield E.provideDocumentRangeSemanticTokens(g,h,p)}catch(M){(0,I.onUnexpectedExternalError)(M),k=null}return(!k||!s(k))&&(k=null),new d(E,k)})));for(const E of w)if(E.tokens)return E;return w.length>0?w[0]:null})}e.getDocumentRangeSemanticTokens=c,S.CommandsRegistry.registerCommand("_provideDocumentSemanticTokensLegend",(a,...g)=>be(void 0,void 0,void 0,function*(){const[h]=g;(0,m.assertType)(h instanceof y.URI);const p=a.get(D.IModelService).getModel(h);if(!p)return;const{documentSemanticTokensProvider:b}=a.get(C.ILanguageFeaturesService),w=f(b,p);return w?w[0].getLegend():a.get(S.ICommandService).executeCommand("_provideDocumentRangeSemanticTokensLegend",h)})),S.CommandsRegistry.registerCommand("_provideDocumentSemanticTokens",(a,...g)=>be(void 0,void 0,void 0,function*(){const[h]=g;(0,m.assertType)(h instanceof y.URI);const p=a.get(D.IModelService).getModel(h);if(!p)return;const{documentSemanticTokensProvider:b}=a.get(C.ILanguageFeaturesService);if(!t(b,p))return a.get(S.ICommandService).executeCommand("_provideDocumentRangeSemanticTokens",h,p.getFullModelRange());const w=yield u(b,p,null,null,L.CancellationToken.None);if(!w)return;const{provider:E,tokens:k}=w;if(!k||!s(k))return;const M=(0,_.encodeSemanticTokensDto)({id:0,type:"full",data:k.data});return k.resultId&&E.releaseDocumentSemanticTokens(k.resultId),M})),S.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokensLegend",(a,...g)=>be(void 0,void 0,void 0,function*(){const[h,p]=g;(0,m.assertType)(h instanceof y.URI);const b=a.get(D.IModelService).getModel(h);if(!b)return;const{documentRangeSemanticTokensProvider:w}=a.get(C.ILanguageFeaturesService),E=o(w,b);if(E.length===0)return;if(E.length===1)return E[0].getLegend();if(!p||!v.Range.isIRange(p))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),E[0].getLegend();const k=yield c(w,b,v.Range.lift(p),L.CancellationToken.None);if(k)return k.provider.getLegend()})),S.CommandsRegistry.registerCommand("_provideDocumentRangeSemanticTokens",(a,...g)=>be(void 0,void 0,void 0,function*(){const[h,p]=g;(0,m.assertType)(h instanceof y.URI),(0,m.assertType)(v.Range.isIRange(p));const b=a.get(D.IModelService).getModel(h);if(!b)return;const{documentRangeSemanticTokensProvider:w}=a.get(C.ILanguageFeaturesService),E=yield c(w,b,v.Range.lift(p),L.CancellationToken.None);if(!(!E||!E.tokens))return(0,_.encodeSemanticTokensDto)({id:0,type:"full",data:E.tokens.data})}))}),define(te[28],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getLanguageTagSettingPlainKey=e.getConfigurationValue=e.removeFromValueTree=e.addToValueTree=e.toValuesTree=e.IConfigurationService=void 0,e.IConfigurationService=(0,L.createDecorator)("configurationService");function I(v,C){const s=Object.create(null);for(const i in v)y(s,i,v[i],C);return s}e.toValuesTree=I;function y(v,C,s,i){const n=C.split("."),t=n.pop();let r=v;for(let u=0;u"u"?s:t}e.getConfigurationValue=m;function _(v){return v.replace(/[\[\]]/g,"")}e.getLanguageTagSettingPlainKey=_}),define(te[338],ie([1,0,2,29,154,306,28]),function($,e,L,I,y,D,S){"use strict";var m;Object.defineProperty(e,"__esModule",{value:!0}),e.MonarchTokenizer=void 0;const _=5;class v{static create(l,o){return this._INSTANCE.create(l,o)}constructor(l){this._maxCacheDepth=l,this._entries=Object.create(null)}create(l,o){if(l!==null&&l.depth>=this._maxCacheDepth)return new C(l,o);let c=C.getStackElementId(l);c.length>0&&(c+="|"),c+=o;let a=this._entries[c];return a||(a=new C(l,o),this._entries[c]=a,a)}}v._INSTANCE=new v(_);class C{constructor(l,o){this.parent=l,this.state=o,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(l){let o="";for(;l!==null;)o.length>0&&(o+="|"),o+=l.state,l=l.parent;return o}static _equals(l,o){for(;l!==null&&o!==null;){if(l===o)return!0;if(l.state!==o.state)return!1;l=l.parent,o=o.parent}return l===null&&o===null}equals(l){return C._equals(this,l)}push(l){return v.create(this,l)}pop(){return this.parent}popall(){let l=this;for(;l.parent;)l=l.parent;return l}switchTo(l){return v.create(this.parent,l)}}class s{constructor(l,o){this.languageId=l,this.state=o}equals(l){return this.languageId===l.languageId&&this.state.equals(l.state)}clone(){return this.state.clone()===this.state?this:new s(this.languageId,this.state)}}class i{static create(l,o){return this._INSTANCE.create(l,o)}constructor(l){this._maxCacheDepth=l,this._entries=Object.create(null)}create(l,o){if(o!==null)return new n(l,o);if(l!==null&&l.depth>=this._maxCacheDepth)return new n(l,o);const c=C.getStackElementId(l);let a=this._entries[c];return a||(a=new n(l,null),this._entries[c]=a,a)}}i._INSTANCE=new i(_);class n{constructor(l,o){this.stack=l,this.embeddedLanguageData=o}clone(){return(this.embeddedLanguageData?this.embeddedLanguageData.clone():null)===this.embeddedLanguageData?this:i.create(this.stack,this.embeddedLanguageData)}equals(l){return!(l instanceof n)||!this.stack.equals(l.stack)?!1:this.embeddedLanguageData===null&&l.embeddedLanguageData===null?!0:this.embeddedLanguageData===null||l.embeddedLanguageData===null?!1:this.embeddedLanguageData.equals(l.embeddedLanguageData)}}class t{constructor(){this._tokens=[],this._languageId=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterLanguage(l){this._languageId=l}emit(l,o){this._lastTokenType===o&&this._lastTokenLanguage===this._languageId||(this._lastTokenType=o,this._lastTokenLanguage=this._languageId,this._tokens.push(new I.Token(l,o,this._languageId)))}nestedLanguageTokenize(l,o,c,a){const g=c.languageId,h=c.state,p=I.TokenizationRegistry.get(g);if(!p)return this.enterLanguage(g),this.emit(a,""),h;const b=p.tokenize(l,o,h);if(a!==0)for(const w of b.tokens)this._tokens.push(new I.Token(w.offset+a,w.type,w.language));else this._tokens=this._tokens.concat(b.tokens);return this._lastTokenType=null,this._lastTokenLanguage=null,this._languageId=null,b.endState}finalize(l){return new I.TokenizationResult(this._tokens,l)}}class r{constructor(l,o){this._languageService=l,this._theme=o,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterLanguage(l){this._currentLanguageId=this._languageService.languageIdCodec.encodeLanguageId(l)}emit(l,o){const c=this._theme.match(this._currentLanguageId,o)|1024;this._lastTokenMetadata!==c&&(this._lastTokenMetadata=c,this._tokens.push(l),this._tokens.push(c))}static _merge(l,o,c){const a=l!==null?l.length:0,g=o.length,h=c!==null?c.length:0;if(a===0&&g===0&&h===0)return new Uint32Array(0);if(a===0&&g===0)return c;if(g===0&&h===0)return l;const p=new Uint32Array(a+g+h);l!==null&&p.set(l);for(let b=0;b{if(h)return;let b=!1;for(let w=0,E=p.changedLanguages.length;w{p.affectsConfiguration("editor.maxTokenizationLineLength")&&(this._maxTokenizationLineLength=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:this._languageId}))}))}getLoadStatus(){const l=[];for(const o in this._embeddedLanguages){const c=I.TokenizationRegistry.get(o);if(c){if(c instanceof m){const a=c.getLoadStatus();a.loaded===!1&&l.push(a.promise)}continue}I.TokenizationRegistry.isResolved(o)||l.push(I.TokenizationRegistry.getOrCreate(o))}return l.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(l).then(o=>{})}}getInitialState(){const l=v.create(null,this._lexer.start);return i.create(l,null)}tokenize(l,o,c){if(l.length>=this._maxTokenizationLineLength)return(0,y.nullTokenize)(this._languageId,c);const a=new t,g=this._tokenize(l,o,c,a);return a.finalize(g)}tokenizeEncoded(l,o,c){if(l.length>=this._maxTokenizationLineLength)return(0,y.nullTokenizeEncoded)(this._languageService.languageIdCodec.encodeLanguageId(this._languageId),c);const a=new r(this._languageService,this._standaloneThemeService.getColorTheme().tokenTheme),g=this._tokenize(l,o,c,a);return a.finalize(g)}_tokenize(l,o,c,a){return c.embeddedLanguageData?this._nestedTokenize(l,o,c,0,a):this._myTokenize(l,o,c,0,a)}_findLeavingNestedLanguageOffset(l,o){let c=this._lexer.tokenizer[o.stack.state];if(!c&&(c=D.findRules(this._lexer,o.stack.state),!c))throw D.createError(this._lexer,"tokenizer state is not defined: "+o.stack.state);let a=-1,g=!1;for(const h of c){if(!D.isIAction(h.action)||h.action.nextEmbedded!=="@pop")continue;g=!0;let p=h.regex;const b=h.regex.source;if(b.substr(0,4)==="^(?:"&&b.substr(b.length-1,1)===")"){const E=(p.ignoreCase?"i":"")+(p.unicode?"u":"");p=new RegExp(b.substr(4,b.length-5),E)}const w=l.search(p);w===-1||w!==0&&h.matchOnlyAtLineStart||(a===-1||w0&&g.nestedLanguageTokenize(p,!1,c.embeddedLanguageData,a);const b=l.substring(h);return this._myTokenize(b,o,c,a+h,g)}_safeRuleName(l){return l?l.name:"(unknown)"}_myTokenize(l,o,c,a,g){g.enterLanguage(this._languageId);const h=l.length,p=o&&this._lexer.includeLF?l+` -`:l,b=p.length;let w=c.embeddedLanguageData,E=c.stack,k=0,M=null,R=!0;for(;R||k=b)break;R=!1;let Y=this._lexer.tokenizer[A];if(!Y&&(Y=D.findRules(this._lexer,A),!Y))throw D.createError(this._lexer,"tokenizer state is not defined: "+A);const ne=p.substr(k);for(const se of Y)if((k===0||!se.matchOnlyAtLineStart)&&(P=ne.match(se.regex),P)){O=P[0],x=se.action;break}}if(P||(P=[""],O=""),x||(k=this._lexer.maxStack)throw D.createError(this._lexer,"maximum tokenizer stack size reached: ["+E.state+","+E.parent.state+",...]");E=E.push(A)}else if(x.next==="@pop"){if(E.depth<=1)throw D.createError(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(W));E=E.pop()}else if(x.next==="@popall")E=E.popall();else{let Y=D.substituteMatches(this._lexer,x.next,O,P,A);if(Y[0]==="@"&&(Y=Y.substr(1)),D.findRules(this._lexer,Y))E=E.push(Y);else throw D.createError(this._lexer,"trying to set a next state '"+Y+"' that is undefined in rule: "+this._safeRuleName(W))}}x.log&&typeof x.log=="string"&&D.log(this._lexer,this._lexer.languageId+": "+D.substituteMatches(this._lexer,x.log,O,P,A))}if(F===null)throw D.createError(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(W));const G=Y=>{const ne=this._languageService.getLanguageIdByLanguageName(Y)||this._languageService.getLanguageIdByMimeType(Y)||Y,se=this._getNestedEmbeddedLanguageData(ne);if(k0)throw D.createError(this._lexer,"groups cannot be nested: "+this._safeRuleName(W));if(P.length!==F.length+1)throw D.createError(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(W));let Y=0;for(let ne=1;net});class C{static colorizeElement(r,u,f,d){d=d||{};const l=d.theme||"vs",o=d.mimeType||f.getAttribute("lang")||f.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();const c=u.getLanguageIdByMimeType(o)||o;r.setTheme(l);const a=f.firstChild?f.firstChild.nodeValue:"";f.className+=" "+l;const g=h=>{var p;const b=(p=v?.createHTML(h))!==null&&p!==void 0?p:h;f.innerHTML=b};return this.colorize(u,a||"",c,d).then(g,h=>console.error(h))}static colorize(r,u,f,d){return be(this,void 0,void 0,function*(){const l=r.languageIdCodec;let o=4;d&&typeof d.tabSize=="number"&&(o=d.tabSize),I.startsWithUTF8BOM(u)&&(u=u.substr(1));const c=I.splitLines(u);if(!r.isRegisteredLanguageId(f))return i(c,o,l);const a=yield y.TokenizationRegistry.getOrCreate(f);return a?s(c,o,a,l):i(c,o,l)})}static colorizeLine(r,u,f,d,l=4){const o=m.ViewLineRenderingData.isBasicASCII(r,u),c=m.ViewLineRenderingData.containsRTL(r,o,f);return(0,S.renderViewLine2)(new S.RenderLineInput(!1,!0,r,!1,o,c,0,d,[],l,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(r,u,f=4){const d=r.getLineContent(u);r.tokenization.forceTokenization(u);const o=r.tokenization.getLineTokens(u).inflate();return this.colorizeLine(d,r.mightContainNonBasicASCII(),r.mightContainRTL(),o,f)}}e.Colorizer=C;function s(t,r,u,f){return new Promise((d,l)=>{const o=()=>{const c=n(t,r,u,f);if(u instanceof _.MonarchTokenizer){const a=u.getLoadStatus();if(a.loaded===!1){a.promise.then(o,l);return}}d(c)};o()})}function i(t,r,u){let f=[];const l=new Uint32Array(2);l[0]=0,l[1]=33587200;for(let o=0,c=t.length;o")}return f.join("")}function n(t,r,u,f){let d=[],l=u.getInitialState();for(let o=0,c=t.length;o"),l=g.endState}return d.join("")}}),define(te[15],ie([1,0,17,10,743,8,724]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.implies=e.IContextKeyService=e.RawContextKey=e.ContextKeyOrExpr=e.ContextKeyAndExpr=e.ContextKeyNotRegexExpr=e.ContextKeyRegexExpr=e.ContextKeySmallerEqualsExpr=e.ContextKeySmallerExpr=e.ContextKeyGreaterEqualsExpr=e.ContextKeyGreaterExpr=e.ContextKeyNotExpr=e.ContextKeyNotEqualsExpr=e.ContextKeyNotInExpr=e.ContextKeyInExpr=e.ContextKeyEqualsExpr=e.ContextKeyDefinedExpr=e.ContextKeyTrueExpr=e.ContextKeyFalseExpr=e.expressionsAreEqualWithConstantSubstitution=e.ContextKeyExpr=e.Parser=void 0;const m=new Map;m.set("false",!1),m.set("true",!0),m.set("isMac",L.isMacintosh),m.set("isLinux",L.isLinux),m.set("isWindows",L.isWindows),m.set("isWeb",L.isWeb),m.set("isMacNative",L.isMacintosh&&!L.isWeb),m.set("isEdge",L.isEdge),m.set("isFirefox",L.isFirefox),m.set("isChrome",L.isChrome),m.set("isSafari",L.isSafari);const _=Object.prototype.hasOwnProperty,v={regexParsingWithErrorRecovery:!0},C=(0,S.localize)(0,null),s=(0,S.localize)(1,null),i=(0,S.localize)(2,null),n=(0,S.localize)(3,null),t=(0,S.localize)(4,null),r=(0,S.localize)(5,null),u=(0,S.localize)(6,null),f=(0,S.localize)(7,null);class d{constructor(q=v){this._config=q,this._scanner=new y.Scanner,this._tokens=[],this._current=0,this._parsingErrors=[],this._flagsGYRe=/g|y/g}parse(q){if(q===""){this._parsingErrors.push({message:C,offset:0,lexeme:"",additionalInfo:s});return}this._tokens=this._scanner.reset(q).scan(),this._current=0,this._parsingErrors=[];try{const H=this._expr();if(!this._isAtEnd()){const V=this._peek(),Z=V.type===17?r:void 0;throw this._parsingErrors.push({message:t,offset:V.offset,lexeme:y.Scanner.getLexeme(V),additionalInfo:Z}),d._parseError}return H}catch(H){if(H!==d._parseError)throw H;return}}_expr(){return this._or()}_or(){const q=[this._and()];for(;this._matchOne(16);){const H=this._and();q.push(H)}return q.length===1?q[0]:l.or(...q)}_and(){const q=[this._term()];for(;this._matchOne(15);){const H=this._term();q.push(H)}return q.length===1?q[0]:l.and(...q)}_term(){if(this._matchOne(2)){const q=this._peek();switch(q.type){case 11:return this._advance(),a.INSTANCE;case 12:return this._advance(),g.INSTANCE;case 0:{this._advance();const H=this._expr();return this._consume(1,n),H?.negate()}case 17:return this._advance(),k.create(q.lexeme);default:throw this._errExpectedButGot("KEY | true | false | '(' expression ')'",q)}}return this._primary()}_primary(){const q=this._peek();switch(q.type){case 11:return this._advance(),l.true();case 12:return this._advance(),l.false();case 0:{this._advance();const H=this._expr();return this._consume(1,n),H}case 17:{const H=q.lexeme;if(this._advance(),this._matchOne(9)){const Z=this._peek();if(!this._config.regexParsingWithErrorRecovery){if(this._advance(),Z.type!==10)throw this._errExpectedButGot("REGEX",Z);const ee=Z.lexeme,le=ee.lastIndexOf("/"),ue=le===ee.length-1?void 0:this._removeFlagsGY(ee.substring(le+1));let de;try{de=new RegExp(ee.substring(1,le),ue)}catch{throw this._errExpectedButGot("REGEX",Z)}return A.create(H,de)}switch(Z.type){case 10:case 19:{const ee=[Z.lexeme];this._advance();let le=this._peek(),ue=0;for(let K=0;K=0){const ce=ee.slice(ue+1,de),ae=ee[de+1]==="i"?"i":"";try{le=new RegExp(ce,ae)}catch{throw this._errExpectedButGot("REGEX",Z)}}}if(le===null)throw this._errExpectedButGot("REGEX",Z);return A.create(H,le)}default:throw this._errExpectedButGot("REGEX",this._peek())}}if(this._matchOne(14)){this._consume(13,i);const Z=this._value();return l.notIn(H,Z)}switch(this._peek().type){case 3:{this._advance();const Z=this._value();if(this._previous().type===18)return l.equals(H,Z);switch(Z){case"true":return l.has(H);case"false":return l.not(H);default:return l.equals(H,Z)}}case 4:{this._advance();const Z=this._value();if(this._previous().type===18)return l.notEquals(H,Z);switch(Z){case"true":return l.not(H);case"false":return l.has(H);default:return l.notEquals(H,Z)}}case 5:return this._advance(),T.create(H,this._value());case 6:return this._advance(),N.create(H,this._value());case 7:return this._advance(),R.create(H,this._value());case 8:return this._advance(),B.create(H,this._value());case 13:return this._advance(),l.in(H,this._value());default:return l.has(H)}}case 20:throw this._parsingErrors.push({message:u,offset:q.offset,lexeme:"",additionalInfo:f}),d._parseError;default:throw this._errExpectedButGot(`true | false | KEY - | KEY '=~' REGEX - | KEY ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value`,this._peek())}}_value(){const q=this._peek();switch(q.type){case 17:case 18:return this._advance(),q.lexeme;case 11:return this._advance(),"true";case 12:return this._advance(),"false";case 13:return this._advance(),"in";default:return""}}_removeFlagsGY(q){return q.replaceAll(this._flagsGYRe,"")}_previous(){return this._tokens[this._current-1]}_matchOne(q){return this._check(q)?(this._advance(),!0):!1}_advance(){return this._isAtEnd()||this._current++,this._previous()}_consume(q,H){if(this._check(q))return this._advance();throw this._errExpectedButGot(H,this._peek())}_errExpectedButGot(q,H,V){const Z=(0,S.localize)(8,null,q,y.Scanner.getLexeme(H)),ee=H.offset,le=y.Scanner.getLexeme(H);return this._parsingErrors.push({message:Z,offset:ee,lexeme:le,additionalInfo:V}),d._parseError}_check(q){return this._peek().type===q}_peek(){return this._tokens[this._current]}_isAtEnd(){return this._peek().type===20}}e.Parser=d,d._parseError=new Error;class l{static false(){return a.INSTANCE}static true(){return g.INSTANCE}static has(q){return h.create(q)}static equals(q,H){return p.create(q,H)}static notEquals(q,H){return E.create(q,H)}static regex(q,H){return A.create(q,H)}static in(q,H){return b.create(q,H)}static notIn(q,H){return w.create(q,H)}static not(q){return k.create(q)}static and(...q){return x.create(q,null,!0)}static or(...q){return W.create(q,null,!0)}static deserialize(q){return q==null?void 0:this._parser.parse(q)}}e.ContextKeyExpr=l,l._parser=new d({regexParsingWithErrorRecovery:!1});function o(J,q){const H=J?J.substituteConstants():void 0,V=q?q.substituteConstants():void 0;return!H&&!V?!0:!H||!V?!1:H.equals(V)}e.expressionsAreEqualWithConstantSubstitution=o;function c(J,q){return J.cmp(q)}class a{constructor(){this.type=0}cmp(q){return this.type-q.type}equals(q){return q.type===this.type}substituteConstants(){return this}evaluate(q){return!1}serialize(){return"false"}keys(){return[]}negate(){return g.INSTANCE}}e.ContextKeyFalseExpr=a,a.INSTANCE=new a;class g{constructor(){this.type=1}cmp(q){return this.type-q.type}equals(q){return q.type===this.type}substituteConstants(){return this}evaluate(q){return!0}serialize(){return"true"}keys(){return[]}negate(){return a.INSTANCE}}e.ContextKeyTrueExpr=g,g.INSTANCE=new g;class h{static create(q,H=null){const V=m.get(q);return typeof V=="boolean"?V?g.INSTANCE:a.INSTANCE:new h(q,H)}constructor(q,H){this.key=q,this.negated=H,this.type=2}cmp(q){return q.type!==this.type?this.type-q.type:F(this.key,q.key)}equals(q){return q.type===this.type?this.key===q.key:!1}substituteConstants(){const q=m.get(this.key);return typeof q=="boolean"?q?g.INSTANCE:a.INSTANCE:this}evaluate(q){return!!q.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this.key,this)),this.negated}}e.ContextKeyDefinedExpr=h;class p{static create(q,H,V=null){if(typeof H=="boolean")return H?h.create(q,V):k.create(q,V);const Z=m.get(q);return typeof Z=="boolean"?H===(Z?"true":"false")?g.INSTANCE:a.INSTANCE:new p(q,H,V)}constructor(q,H,V){this.key=q,this.value=H,this.negated=V,this.type=4}cmp(q){return q.type!==this.type?this.type-q.type:G(this.key,this.value,q.key,q.value)}equals(q){return q.type===this.type?this.key===q.key&&this.value===q.value:!1}substituteConstants(){const q=m.get(this.key);if(typeof q=="boolean"){const H=q?"true":"false";return this.value===H?g.INSTANCE:a.INSTANCE}return this}evaluate(q){return q.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this.value,this)),this.negated}}e.ContextKeyEqualsExpr=p;class b{static create(q,H){return new b(q,H)}constructor(q,H){this.key=q,this.valueKey=H,this.type=10,this.negated=null}cmp(q){return q.type!==this.type?this.type-q.type:G(this.key,this.valueKey,q.key,q.valueKey)}equals(q){return q.type===this.type?this.key===q.key&&this.valueKey===q.valueKey:!1}substituteConstants(){return this}evaluate(q){const H=q.getValue(this.valueKey),V=q.getValue(this.key);return Array.isArray(H)?H.includes(V):typeof V=="string"&&typeof H=="object"&&H!==null?_.call(H,V):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=w.create(this.key,this.valueKey)),this.negated}}e.ContextKeyInExpr=b;class w{static create(q,H){return new w(q,H)}constructor(q,H){this.key=q,this.valueKey=H,this.type=11,this._negated=b.create(q,H)}cmp(q){return q.type!==this.type?this.type-q.type:this._negated.cmp(q._negated)}equals(q){return q.type===this.type?this._negated.equals(q._negated):!1}substituteConstants(){return this}evaluate(q){return!this._negated.evaluate(q)}serialize(){return`${this.key} not in '${this.valueKey}'`}keys(){return this._negated.keys()}negate(){return this._negated}}e.ContextKeyNotInExpr=w;class E{static create(q,H,V=null){if(typeof H=="boolean")return H?k.create(q,V):h.create(q,V);const Z=m.get(q);return typeof Z=="boolean"?H===(Z?"true":"false")?a.INSTANCE:g.INSTANCE:new E(q,H,V)}constructor(q,H,V){this.key=q,this.value=H,this.negated=V,this.type=5}cmp(q){return q.type!==this.type?this.type-q.type:G(this.key,this.value,q.key,q.value)}equals(q){return q.type===this.type?this.key===q.key&&this.value===q.value:!1}substituteConstants(){const q=m.get(this.key);if(typeof q=="boolean"){const H=q?"true":"false";return this.value===H?a.INSTANCE:g.INSTANCE}return this}evaluate(q){return q.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=p.create(this.key,this.value,this)),this.negated}}e.ContextKeyNotEqualsExpr=E;class k{static create(q,H=null){const V=m.get(q);return typeof V=="boolean"?V?a.INSTANCE:g.INSTANCE:new k(q,H)}constructor(q,H){this.key=q,this.negated=H,this.type=3}cmp(q){return q.type!==this.type?this.type-q.type:F(this.key,q.key)}equals(q){return q.type===this.type?this.key===q.key:!1}substituteConstants(){const q=m.get(this.key);return typeof q=="boolean"?q?a.INSTANCE:g.INSTANCE:this}evaluate(q){return!q.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}e.ContextKeyNotExpr=k;function M(J,q){if(typeof J=="string"){const H=parseFloat(J);isNaN(H)||(J=H)}return typeof J=="string"||typeof J=="number"?q(J):a.INSTANCE}class R{static create(q,H,V=null){return M(H,Z=>new R(q,Z,V))}constructor(q,H,V){this.key=q,this.value=H,this.negated=V,this.type=12}cmp(q){return q.type!==this.type?this.type-q.type:G(this.key,this.value,q.key,q.value)}equals(q){return q.type===this.type?this.key===q.key&&this.value===q.value:!1}substituteConstants(){return this}evaluate(q){return typeof this.value=="string"?!1:parseFloat(q.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterExpr=R;class B{static create(q,H,V=null){return M(H,Z=>new B(q,Z,V))}constructor(q,H,V){this.key=q,this.value=H,this.negated=V,this.type=13}cmp(q){return q.type!==this.type?this.type-q.type:G(this.key,this.value,q.key,q.value)}equals(q){return q.type===this.type?this.key===q.key&&this.value===q.value:!1}substituteConstants(){return this}evaluate(q){return typeof this.value=="string"?!1:parseFloat(q.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}e.ContextKeyGreaterEqualsExpr=B;class T{static create(q,H,V=null){return M(H,Z=>new T(q,Z,V))}constructor(q,H,V){this.key=q,this.value=H,this.negated=V,this.type=14}cmp(q){return q.type!==this.type?this.type-q.type:G(this.key,this.value,q.key,q.value)}equals(q){return q.type===this.type?this.key===q.key&&this.value===q.value:!1}substituteConstants(){return this}evaluate(q){return typeof this.value=="string"?!1:parseFloat(q.getValue(this.key))new N(q,Z,V))}constructor(q,H,V){this.key=q,this.value=H,this.negated=V,this.type=15}cmp(q){return q.type!==this.type?this.type-q.type:G(this.key,this.value,q.key,q.value)}equals(q){return q.type===this.type?this.key===q.key&&this.value===q.value:!1}substituteConstants(){return this}evaluate(q){return typeof this.value=="string"?!1:parseFloat(q.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}e.ContextKeySmallerEqualsExpr=N;class A{static create(q,H){return new A(q,H)}constructor(q,H){this.key=q,this.regexp=H,this.type=7,this.negated=null}cmp(q){if(q.type!==this.type)return this.type-q.type;if(this.keyq.key)return 1;const H=this.regexp?this.regexp.source:"",V=q.regexp?q.regexp.source:"";return HV?1:0}equals(q){if(q.type===this.type){const H=this.regexp?this.regexp.source:"",V=q.regexp?q.regexp.source:"";return this.key===q.key&&H===V}return!1}substituteConstants(){return this}evaluate(q){const H=q.getValue(this.key);return this.regexp?this.regexp.test(H):!1}serialize(){const q=this.regexp?`/${this.regexp.source}/${this.regexp.flags}`:"/invalid/";return`${this.key} =~ ${q}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=P.create(this)),this.negated}}e.ContextKeyRegexExpr=A;class P{static create(q){return new P(q)}constructor(q){this._actual=q,this.type=8}cmp(q){return q.type!==this.type?this.type-q.type:this._actual.cmp(q._actual)}equals(q){return q.type===this.type?this._actual.equals(q._actual):!1}substituteConstants(){return this}evaluate(q){return!this._actual.evaluate(q)}serialize(){return`!(${this._actual.serialize()})`}keys(){return this._actual.keys()}negate(){return this._actual}}e.ContextKeyNotRegexExpr=P;function O(J){let q=null;for(let H=0,V=J.length;Hq.expr.length)return 1;for(let H=0,V=this.expr.length;H1;){const le=Z[Z.length-1];if(le.type!==9)break;Z.pop();const ue=Z.pop(),de=Z.length===0,ce=W.create(le.expr.map(ae=>x.create([ae,ue],null,V)),null,de);ce&&(Z.push(ce),Z.sort(c))}if(Z.length===1)return Z[0];if(V){for(let le=0;leq.serialize()).join(" && ")}keys(){const q=[];for(const H of this.expr)q.push(...H.keys());return q}negate(){if(!this.negated){const q=[];for(const H of this.expr)q.push(H.negate());this.negated=W.create(q,this,!0)}return this.negated}}e.ContextKeyAndExpr=x;class W{static create(q,H,V){return W._normalizeArr(q,H,V)}constructor(q,H){this.expr=q,this.negated=H,this.type=9}cmp(q){if(q.type!==this.type)return this.type-q.type;if(this.expr.lengthq.expr.length)return 1;for(let H=0,V=this.expr.length;Hq.serialize()).join(" || ")}keys(){const q=[];for(const H of this.expr)q.push(...H.keys());return q}negate(){if(!this.negated){const q=[];for(const H of this.expr)q.push(H.negate());for(;q.length>1;){const H=q.shift(),V=q.shift(),Z=[];for(const ee of se(H))for(const le of se(V))Z.push(x.create([ee,le],null,!1));q.unshift(W.create(Z,null,!1))}this.negated=W.create(q,this,!0)}return this.negated}}e.ContextKeyOrExpr=W;class U extends h{static all(){return U._info.values()}constructor(q,H,V){super(q,null),this._defaultValue=H,typeof V=="object"?U._info.push(Object.assign(Object.assign({},V),{key:q})):V!==!0&&U._info.push({key:q,description:V,type:H!=null?typeof H:void 0})}bindTo(q){return q.createKey(this.key,this._defaultValue)}getValue(q){return q.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(q){return p.create(this.key,q)}}e.RawContextKey=U,U._info=[],e.IContextKeyService=(0,D.createDecorator)("contextKeyService");function F(J,q){return Jq?1:0}function G(J,q,H,V){return JH?1:qV?1:0}function Y(J,q){if(J.type===0||q.type===1)return!0;if(J.type===9)return q.type===9?ne(J.expr,q.expr):!1;if(q.type===9){for(const H of q.expr)if(Y(J,H))return!0;return!1}if(J.type===6){if(q.type===6)return ne(q.expr,J.expr);for(const H of J.expr)if(Y(H,q))return!0;return!1}return J.equals(q)}e.implies=Y;function ne(J,q){let H=0,V=0;for(;H{const n=this.model.read(i),t=n?.state.read(i),r=!!t?.inlineCompletion&&t?.ghostText!==void 0&&!t?.ghostText.isEmpty();this.inlineCompletionVisible.set(r),t?.ghostText&&t?.inlineCompletion&&this.suppressSuggestions.set(t.inlineCompletion.inlineCompletion.source.inlineCompletions.suppressSuggestions)})),this._register((0,L.autorun)(i=>{const n=this.model.read(i);let t=!1,r=!0;const u=n?.ghostText.read(i);if(n?.selectedSuggestItem&&u&&u.parts.length>0){const{column:f,lines:d}=u.parts[0],l=d[0],o=n.textModel.getLineIndentColumn(u.lineNumber);if(f<=o){let a=(0,I.firstNonWhitespaceIndex)(l);a===-1&&(a=l.length-1),t=a>0;const g=n.textModel.getOptions().tabSize;r=y.CursorColumns.visibleColumnFromColumn(l,a+1,g)be(void 0,void 0,void 0,function*(){const[r,u,f]=t;(0,y.assertType)(D.URI.isUri(r)),(0,y.assertType)(S.Position.isIPosition(u)),(0,y.assertType)(typeof f=="string"||!f);const d=n.get(_.ILanguageFeaturesService),l=yield n.get(v.ITextModelService).createModelReference(r);try{const o=yield i(d.signatureHelpProvider,l.object.textEditorModel,S.Position.lift(u),{triggerKind:m.SignatureHelpTriggerKind.Invoke,isRetrigger:!1,triggerCharacter:f},L.CancellationToken.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{l.dispose()}}))}),define(te[754],ie([1,0,14,9,6,2,121,29,236]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsModel=void 0;var v;(function(i){i.Default={type:0};class n{constructor(u,f){this.request=u,this.previouslyActiveHints=f,this.type=2}}i.Pending=n;class t{constructor(u){this.hints=u,this.type=1}}i.Active=t})(v||(v={}));class C extends D.Disposable{constructor(n,t,r=C.DEFAULT_DELAY){super(),this._onChangedHints=this._register(new y.Emitter),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=v.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new D.MutableDisposable),this.triggerChars=new S.CharacterSet,this.retriggerChars=new S.CharacterSet,this.triggerId=0,this.editor=n,this.providers=t,this.throttledDelayer=new L.Delayer(r),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(u=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(u=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(u=>this.onCursorChange(u))),this._register(this.editor.onDidChangeModelContent(u=>this.onModelContentChange())),this._register(this.providers.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(u=>this.onDidType(u))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(n){this._state.type===2&&this._state.request.cancel(),this._state=n}cancel(n=!1){this.state=v.Default,this.throttledDelayer.cancel(),n||this._onChangedHints.fire(void 0)}trigger(n,t){const r=this.editor.getModel();if(!r||!this.providers.has(r))return;const u=++this.triggerId;this._pendingTriggers.push(n),this.throttledDelayer.trigger(()=>this.doTrigger(u),t).catch(I.onUnexpectedError)}next(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,t=this.state.hints.activeSignature,r=t%n===n-1,u=this.editor.getOption(85).cycle;if((n<2||r)&&!u){this.cancel();return}this.updateActiveSignature(r&&u?0:t+1)}previous(){if(this.state.type!==1)return;const n=this.state.hints.signatures.length,t=this.state.hints.activeSignature,r=t===0,u=this.editor.getOption(85).cycle;if((n<2||r)&&!u){this.cancel();return}this.updateActiveSignature(r&&u?n-1:t-1)}updateActiveSignature(n){this.state.type===1&&(this.state=new v.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:n})),this._onChangedHints.fire(this.state.hints))}doTrigger(n){return be(this,void 0,void 0,function*(){const t=this.state.type===1||this.state.type===2,r=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const u=this._pendingTriggers.reduce(s);this._pendingTriggers=[];const f={triggerKind:u.triggerKind,triggerCharacter:u.triggerCharacter,isRetrigger:t,activeSignatureHelp:r};if(!this.editor.hasModel())return!1;const d=this.editor.getModel(),l=this.editor.getPosition();this.state=new v.Pending((0,L.createCancelablePromise)(o=>(0,_.provideSignatureHelp)(this.providers,d,l,f,o)),r);try{const o=yield this.state.request;return n!==this.triggerId?(o?.dispose(),!1):!o||!o.value.signatures||o.value.signatures.length===0?(o?.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new v.Active(o.value),this._lastSignatureHelpResult.value=o,this._onChangedHints.fire(this.state.hints),!0)}catch(o){return n===this.triggerId&&(this.state=v.Default),(0,I.onUnexpectedError)(o),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars.clear(),this.retriggerChars.clear();const n=this.editor.getModel();if(n)for(const t of this.providers.ordered(n)){for(const r of t.signatureHelpTriggerCharacters||[])if(r.length){const u=r.charCodeAt(0);this.triggerChars.add(u),this.retriggerChars.add(u)}for(const r of t.signatureHelpRetriggerCharacters||[])r.length&&this.retriggerChars.add(r.charCodeAt(0))}}onDidType(n){if(!this.triggerOnType)return;const t=n.length-1,r=n.charCodeAt(t);(this.triggerChars.has(r)||this.isTriggered&&this.retriggerChars.has(r))&&this.trigger({triggerKind:m.SignatureHelpTriggerKind.TriggerCharacter,triggerCharacter:n.charAt(t)})}onCursorChange(n){n.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:m.SignatureHelpTriggerKind.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:m.SignatureHelpTriggerKind.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(85).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}e.ParameterHintsModel=C,C.DEFAULT_DELAY=120;function s(i,n){switch(n.triggerKind){case m.SignatureHelpTriggerKind.Invoke:return n;case m.SignatureHelpTriggerKind.ContentChange:return i;case m.SignatureHelpTriggerKind.TriggerCharacter:default:return n}}}),define(te[755],ie([1,0,15]),function($,e,L){"use strict";var I;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestAlternatives=void 0;let y=I=class{constructor(S,m){this._editor=S,this._index=0,this._ckOtherSuggestions=I.OtherSuggestions.bindTo(m)}dispose(){this.reset()}reset(){var S;this._ckOtherSuggestions.reset(),(S=this._listener)===null||S===void 0||S.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:S,index:m},_){if(S.items.length===0){this.reset();return}if(I._moveIndex(!0,S,m)===m){this.reset();return}this._acceptNext=_,this._model=S,this._index=m,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(S,m,_){let v=_;for(let C=m.items.length;C>0&&(v=(v+m.items.length+(S?1:-1))%m.items.length,!(v===_||!m.items[v].completion.additionalTextEdits));C--);return v}next(){this._move(!0)}prev(){this._move(!1)}_move(S){if(this._model)try{this._ignore=!0,this._index=I._moveIndex(S,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};e.SuggestAlternatives=y,y.OtherSuggestions=new L.RawContextKey("hasOtherSuggestions",!1),e.SuggestAlternatives=y=I=Ie([ge(1,L.IContextKeyService)],y)}),define(te[756],ie([1,0,15]),function($,e,L){"use strict";var I;Object.defineProperty(e,"__esModule",{value:!0}),e.WordContextKey=void 0;let y=I=class{constructor(S,m){this._editor=S,this._enabled=!1,this._ckAtEnd=I.AtEnd.bindTo(m),this._configListener=this._editor.onDidChangeConfiguration(_=>_.hasChanged(122)&&this._update()),this._update()}dispose(){var S;this._configListener.dispose(),(S=this._selectionListener)===null||S===void 0||S.dispose(),this._ckAtEnd.reset()}_update(){const S=this._editor.getOption(122)==="on";if(this._enabled!==S)if(this._enabled=S,this._enabled){const m=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const _=this._editor.getModel(),v=this._editor.getSelection(),C=_.getWordAtPosition(v.getStartPosition());if(!C){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(C.endColumn===v.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(m),m()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};e.WordContextKey=y,y.AtEnd=new L.RawContextKey("atEndOfWord",!1),e.WordContextKey=y=I=Ie([ge(1,L.IContextKeyService)],y)}),define(te[88],ie([1,0,15,8]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=e.IAccessibilityService=void 0,e.IAccessibilityService=(0,I.createDecorator)("accessibilityService"),e.CONTEXT_ACCESSIBILITY_MODE_ENABLED=new L.RawContextKey("accessibilityModeEnabled",!1)}),define(te[757],ie([1,0,51,13,6,2,52,17,269,328,480,200,39,143,231,88]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ComputedEditorOptions=e.EditorConfiguration=void 0;let u=class extends D.Disposable{constructor(h,p,b,w){super(),this._accessibilityService=w,this._onDidChange=this._register(new y.Emitter),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new y.Emitter),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._glyphMarginDecorationLaneCount=1,this._computeOptionsMemory=new i.ComputeOptionsMemory,this.isSimpleWidget=h,this._containerObserver=this._register(new _.ElementSizeObserver(b,p.dimension)),this._rawOptions=a(p),this._validatedOptions=c.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(13)&&this._containerObserver.startObserving(),this._register(n.EditorZoom.onDidChangeZoomLevel(()=>this._recomputeOptions())),this._register(s.TabFocus.onDidChangeTabFocus(()=>this._recomputeOptions())),this._register(this._containerObserver.onDidChange(()=>this._recomputeOptions())),this._register(v.FontMeasurements.onDidChange(()=>this._recomputeOptions())),this._register(L.PixelRatio.onDidChange(()=>this._recomputeOptions())),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions()))}_recomputeOptions(){const h=this._computeOptions(),p=c.checkEquals(this.options,h);p!==null&&(this.options=h,this._onDidChangeFast.fire(p),this._onDidChange.fire(p))}_computeOptions(){const h=this._readEnvConfiguration(),p=t.BareFontInfo.createFromValidatedSettings(this._validatedOptions,h.pixelRatio,this.isSimpleWidget),b=this._readFontInfo(p),w={memory:this._computeOptionsMemory,outerWidth:h.outerWidth,outerHeight:h.outerHeight-this._reservedHeight,fontInfo:b,extraEditorClassName:h.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:h.emptySelectionClipboard,pixelRatio:h.pixelRatio,tabFocusMode:s.TabFocus.getTabFocusMode(),accessibilitySupport:h.accessibilitySupport,glyphMarginDecorationLaneCount:this._glyphMarginDecorationLaneCount};return c.computeOptions(this._validatedOptions,w)}_readEnvConfiguration(){return{extraEditorClassName:d(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:L.isWebKit||L.isFirefox,pixelRatio:L.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(h){return v.FontMeasurements.readFontInfo(h)}getRawOptions(){return this._rawOptions}updateOptions(h){const p=a(h);c.applyUpdate(this._rawOptions,p)&&(this._validatedOptions=c.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(h){this._containerObserver.observe(h)}setIsDominatedByLongLines(h){this._isDominatedByLongLines!==h&&(this._isDominatedByLongLines=h,this._recomputeOptions())}setModelLineCount(h){const p=f(h);this._lineNumbersDigitCount!==p&&(this._lineNumbersDigitCount=p,this._recomputeOptions())}setViewLineCount(h){this._viewLineCount!==h&&(this._viewLineCount=h,this._recomputeOptions())}setReservedHeight(h){this._reservedHeight!==h&&(this._reservedHeight=h,this._recomputeOptions())}setGlyphMarginDecorationLaneCount(h){this._glyphMarginDecorationLaneCount!==h&&(this._glyphMarginDecorationLaneCount=h,this._recomputeOptions())}};e.EditorConfiguration=u,e.EditorConfiguration=u=Ie([ge(3,r.IAccessibilityService)],u);function f(g){let h=0;for(;g;)g=Math.floor(g/10),h++;return h||1}function d(){let g="";return!L.isSafari&&!L.isWebkitWebView&&(g+="no-user-select "),L.isSafari&&(g+="no-minimap-shadow ",g+="enable-user-select "),m.isMacintosh&&(g+="mac "),g}class l{constructor(){this._values=[]}_read(h){return this._values[h]}get(h){return this._values[h]}_write(h,p){this._values[h]=p}}class o{constructor(){this._values=[]}_read(h){if(h>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[h]}get(h){return this._read(h)}_write(h,p){this._values[h]=p}}e.ComputedEditorOptions=o;class c{static validateOptions(h){const p=new l;for(const b of i.editorOptionsRegistry){const w=b.name==="_never_"?void 0:h[b.name];p._write(b.id,b.validate(w))}return p}static computeOptions(h,p){const b=new o;for(const w of i.editorOptionsRegistry)b._write(w.id,w.compute(p,b,h._read(w.id)));return b}static _deepEquals(h,p){if(typeof h!="object"||typeof p!="object"||!h||!p)return h===p;if(Array.isArray(h)||Array.isArray(p))return Array.isArray(h)&&Array.isArray(p)?I.equals(h,p):!1;if(Object.keys(h).length!==Object.keys(p).length)return!1;for(const b in h)if(!c._deepEquals(h[b],p[b]))return!1;return!0}static checkEquals(h,p){const b=[];let w=!1;for(const E of i.editorOptionsRegistry){const k=!c._deepEquals(h._read(E.id),p._read(E.id));b[E.id]=k,k&&(w=!0)}return w?new i.ConfigurationChangedEvent(b):null}static applyUpdate(h,p){let b=!1;for(const w of i.editorOptionsRegistry)if(p.hasOwnProperty(w.name)){const E=w.applyUpdate(h[w.name],p[w.name]);h[w.name]=E.newValue,b=b||E.didChange}return b}}function a(g){const h=S.deepClone(g);return(0,C.migrateOptions)(h),h}}),define(te[758],ie([1,0,6,43,2,52,197,21,723,25,28,15]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setContext=e.ContextKeyService=e.AbstractContextKeyService=e.Context=void 0;const i="data-keybinding-context";class n{constructor(E,k){this._id=E,this._parent=k,this._value=Object.create(null),this._value._contextId=E}get value(){return Object.assign({},this._value)}setValue(E,k){return this._value[E]!==k?(this._value[E]=k,!0):!1}removeValue(E){return E in this._value?(delete this._value[E],!0):!1}getValue(E){const k=this._value[E];return typeof k>"u"&&this._parent?this._parent.getValue(E):k}}e.Context=n;class t extends n{constructor(){super(-1,null)}setValue(E,k){return!1}removeValue(E){return!1}getValue(E){}}t.INSTANCE=new t;class r extends n{constructor(E,k,M){super(E,null),this._configurationService=k,this._values=S.TernarySearchTree.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(R=>{if(R.source===7){const B=Array.from(this._values,([T])=>T);this._values.clear(),M.fire(new d(B))}else{const B=[];for(const T of R.affectedKeys){const N=`config.${T}`,A=this._values.findSuperstr(N);A!==void 0&&(B.push(...I.Iterable.map(A,([P])=>P)),this._values.deleteSuperstr(N)),this._values.has(N)&&(B.push(N),this._values.delete(N))}M.fire(new d(B))}})}dispose(){this._listener.dispose()}getValue(E){if(E.indexOf(r._keyPrefix)!==0)return super.getValue(E);if(this._values.has(E))return this._values.get(E);const k=E.substr(r._keyPrefix.length),M=this._configurationService.getValue(k);let R;switch(typeof M){case"number":case"boolean":case"string":R=M;break;default:Array.isArray(M)?R=JSON.stringify(M):R=M}return this._values.set(E,R),R}setValue(E,k){return super.setValue(E,k)}removeValue(E){return super.removeValue(E)}}r._keyPrefix="config.";class u{constructor(E,k,M){this._service=E,this._key=k,this._defaultValue=M,this.reset()}set(E){this._service.setContext(this._key,E)}reset(){typeof this._defaultValue>"u"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class f{constructor(E){this.key=E}affectsSome(E){return E.has(this.key)}allKeysContainedIn(E){return this.affectsSome(E)}}class d{constructor(E){this.keys=E}affectsSome(E){for(const k of this.keys)if(E.has(k))return!0;return!1}allKeysContainedIn(E){return this.keys.every(k=>E.has(k))}}class l{constructor(E){this.events=E}affectsSome(E){for(const k of this.events)if(k.affectsSome(E))return!0;return!1}allKeysContainedIn(E){return this.events.every(k=>k.allKeysContainedIn(E))}}function o(w,E){return w.allKeysContainedIn(new Set(Object.keys(E)))}class c extends y.Disposable{constructor(E){super(),this._onDidChangeContext=this._register(new L.PauseableEmitter({merge:k=>new l(k)})),this.onDidChangeContext=this._onDidChangeContext.event,this._isDisposed=!1,this._myContextId=E}createKey(E,k){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new u(this,E,k)}bufferChangeEvents(E){this._onDidChangeContext.pause();try{E()}finally{this._onDidChangeContext.resume()}}createScoped(E){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");return new g(this,E)}contextMatchesRules(E){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const k=this.getContextValuesContainer(this._myContextId);return E?E.evaluate(k):!0}getContextKeyValue(E){if(!this._isDisposed)return this.getContextValuesContainer(this._myContextId).getValue(E)}setContext(E,k){if(this._isDisposed)return;const M=this.getContextValuesContainer(this._myContextId);M&&M.setValue(E,k)&&this._onDidChangeContext.fire(new f(E))}removeContext(E){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(E)&&this._onDidChangeContext.fire(new f(E))}getContext(E){return this._isDisposed?t.INSTANCE:this.getContextValuesContainer(h(E))}dispose(){super.dispose(),this._isDisposed=!0}}e.AbstractContextKeyService=c;let a=class extends c{constructor(E){super(0),this._contexts=new Map,this._lastContextId=0;const k=this._register(new r(this._myContextId,E,this._onDidChangeContext));this._contexts.set(this._myContextId,k)}getContextValuesContainer(E){return this._isDisposed?t.INSTANCE:this._contexts.get(E)||t.INSTANCE}createChildContext(E=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");const k=++this._lastContextId;return this._contexts.set(k,new n(k,this.getContextValuesContainer(E))),k}disposeContext(E){this._isDisposed||this._contexts.delete(E)}};e.ContextKeyService=a,e.ContextKeyService=a=Ie([ge(0,C.IConfigurationService)],a);class g extends c{constructor(E,k){if(super(E.createChildContext()),this._parentChangeListener=this._register(new y.MutableDisposable),this._parent=E,this._updateParentChangeListener(),this._domNode=k,this._domNode.hasAttribute(i)){let M="";this._domNode.classList&&(M=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${M?": "+M:""}`)}this._domNode.setAttribute(i,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(E=>{const M=this._parent.getContextValuesContainer(this._myContextId).value;o(E,M)||this._onDidChangeContext.fire(E)})}dispose(){this._isDisposed||(this._parent.disposeContext(this._myContextId),this._domNode.removeAttribute(i),super.dispose())}getContextValuesContainer(E){return this._isDisposed?t.INSTANCE:this._parent.getContextValuesContainer(E)}createChildContext(E=this._myContextId){if(this._isDisposed)throw new Error("ScopedContextKeyService has been disposed");return this._parent.createChildContext(E)}disposeContext(E){this._isDisposed||this._parent.disposeContext(E)}}function h(w){for(;w;){if(w.hasAttribute(i)){const E=w.getAttribute(i);return E?parseInt(E,10):NaN}w=w.parentElement}return 0}function p(w,E,k){w.get(s.IContextKeyService).createKey(String(E),b(k))}e.setContext=p;function b(w){return(0,D.cloneAndChange)(w,E=>{if(typeof E=="object"&&E.$mid===1)return m.URI.revive(E).toString();if(E instanceof m.URI)return E.toString()})}v.CommandsRegistry.registerCommand("_setContext",p),v.CommandsRegistry.registerCommand({id:"getContextKeyInfo",handler(){return[...s.RawContextKey.all()].sort((w,E)=>w.key.localeCompare(E.key))},description:{description:(0,_.localize)(0,null),args:[]}}),v.CommandsRegistry.registerCommand("_generateContextKeyInfo",function(){const w=[],E=new Set;for(const k of s.RawContextKey.all())E.has(k.key)||(E.add(k.key),w.push(k));w.sort((k,M)=>k.key.localeCompare(M.key)),console.log(JSON.stringify(w,void 0,2))})}),define(te[237],ie([1,0,17,725,15]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputFocusedContext=e.InputFocusedContextKey=e.ProductQualityContext=e.IsDevelopmentContext=e.IsMobileContext=e.IsIOSContext=e.IsMacNativeContext=e.IsWebContext=e.IsWindowsContext=e.IsLinuxContext=e.IsMacContext=void 0,e.IsMacContext=new y.RawContextKey("isMac",L.isMacintosh,(0,I.localize)(0,null)),e.IsLinuxContext=new y.RawContextKey("isLinux",L.isLinux,(0,I.localize)(1,null)),e.IsWindowsContext=new y.RawContextKey("isWindows",L.isWindows,(0,I.localize)(2,null)),e.IsWebContext=new y.RawContextKey("isWeb",L.isWeb,(0,I.localize)(3,null)),e.IsMacNativeContext=new y.RawContextKey("isMacNative",L.isMacintosh&&!L.isWeb,(0,I.localize)(4,null)),e.IsIOSContext=new y.RawContextKey("isIOS",L.isIOS,(0,I.localize)(5,null)),e.IsMobileContext=new y.RawContextKey("isMobile",L.isMobile,(0,I.localize)(6,null)),e.IsDevelopmentContext=new y.RawContextKey("isDevelopment",!1,!0),e.ProductQualityContext=new y.RawContextKey("productQualityType","",(0,I.localize)(7,null)),e.InputFocusedContextKey="inputFocus",e.InputFocusedContext=new y.RawContextKey(e.InputFocusedContextKey,!1,(0,I.localize)(8,null))}),define(te[58],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IContextMenuService=e.IContextViewService=void 0,e.IContextViewService=(0,L.createDecorator)("contextViewService"),e.IContextMenuService=(0,L.createDecorator)("contextMenuService")}),define(te[157],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IDialogService=void 0,e.IDialogService=(0,L.createDecorator)("dialogService")}),define(te[238],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEnvironmentService=void 0,e.IEnvironmentService=(0,L.createDecorator)("environmentService")}),define(te[186],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServiceCollection=void 0;class L{constructor(...y){this._entries=new Map;for(const[D,S]of y)this.set(D,S)}set(y,D){const S=this._entries.get(y);return this._entries.set(y,D),S}get(y){return this._entries.get(y)}}e.ServiceCollection=L}),define(te[759],ie([1,0,14,9,2,232,747,8,186,63]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Trace=e.InstantiationService=void 0;const C=!1;class s extends Error{constructor(r){var u;super("cyclic dependency between services"),this.message=(u=r.findCycleSlow())!==null&&u!==void 0?u:`UNABLE to detect cycle, dumping graph: -${r.toString()}`}}class i{constructor(r=new _.ServiceCollection,u=!1,f,d=C){var l;this._services=r,this._strict=u,this._parent=f,this._enableTracing=d,this._activeInstantiations=new Set,this._services.set(m.IInstantiationService,this),this._globalGraph=d?(l=f?._globalGraph)!==null&&l!==void 0?l:new S.Graph(o=>o):void 0}createChild(r){return new i(r,this._strict,this,this._enableTracing)}invokeFunction(r,...u){const f=n.traceInvocation(this._enableTracing,r);let d=!1;try{return r({get:o=>{if(d)throw(0,I.illegalState)("service accessor is only valid during the invocation of its target method");const c=this._getOrCreateServiceInstance(o,f);if(!c)throw new Error(`[invokeFunction] unknown service '${o}'`);return c}},...u)}finally{d=!0,f.stop()}}createInstance(r,...u){let f,d;return r instanceof D.SyncDescriptor?(f=n.traceCreation(this._enableTracing,r.ctor),d=this._createInstance(r.ctor,r.staticArguments.concat(u),f)):(f=n.traceCreation(this._enableTracing,r),d=this._createInstance(r,u,f)),f.stop(),d}_createInstance(r,u=[],f){const d=m._util.getServiceDependencies(r).sort((c,a)=>c.index-a.index),l=[];for(const c of d){const a=this._getOrCreateServiceInstance(c.id,f);a||this._throwIfStrict(`[createInstance] ${r.name} depends on UNKNOWN service ${c.id}.`,!1),l.push(a)}const o=d.length>0?d[0].index:u.length;if(u.length!==o){console.trace(`[createInstance] First service dependency of ${r.name} at position ${o+1} conflicts with ${u.length} static arguments`);const c=o-u.length;c>0?u=u.concat(new Array(c)):u=u.slice(0,o)}return Reflect.construct(r,u.concat(l))}_setServiceInstance(r,u){if(this._services.get(r)instanceof D.SyncDescriptor)this._services.set(r,u);else if(this._parent)this._parent._setServiceInstance(r,u);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(r){const u=this._services.get(r);return!u&&this._parent?this._parent._getServiceInstanceOrDescriptor(r):u}_getOrCreateServiceInstance(r,u){this._globalGraph&&this._globalGraphImplicitDependency&&this._globalGraph.insertEdge(this._globalGraphImplicitDependency,String(r));const f=this._getServiceInstanceOrDescriptor(r);return f instanceof D.SyncDescriptor?this._safeCreateAndCacheServiceInstance(r,f,u.branch(r,!0)):(u.branch(r,!1),f)}_safeCreateAndCacheServiceInstance(r,u,f){if(this._activeInstantiations.has(r))throw new Error(`illegal state - RECURSIVELY instantiating service '${r}'`);this._activeInstantiations.add(r);try{return this._createAndCacheServiceInstance(r,u,f)}finally{this._activeInstantiations.delete(r)}}_createAndCacheServiceInstance(r,u,f){var d;const l=new S.Graph(a=>a.id.toString());let o=0;const c=[{id:r,desc:u,_trace:f}];for(;c.length;){const a=c.pop();if(l.lookupOrInsertNode(a),o++>1e3)throw new s(l);for(const g of m._util.getServiceDependencies(a.desc.ctor)){const h=this._getServiceInstanceOrDescriptor(g.id);if(h||this._throwIfStrict(`[createInstance] ${r} depends on ${g.id} which is NOT registered.`,!0),(d=this._globalGraph)===null||d===void 0||d.insertEdge(String(a.id),String(g.id)),h instanceof D.SyncDescriptor){const p={id:g.id,desc:h,_trace:a._trace.branch(g.id,!0)};l.insertEdge(a,p),c.push(p)}}}for(;;){const a=l.roots();if(a.length===0){if(!l.isEmpty())throw new s(l);break}for(const{data:g}of a){if(this._getServiceInstanceOrDescriptor(g.id)instanceof D.SyncDescriptor){const p=this._createServiceInstanceWithOwner(g.id,g.desc.ctor,g.desc.staticArguments,g.desc.supportsDelayedInstantiation,g._trace);this._setServiceInstance(g.id,p)}l.removeNode(g)}}return this._getServiceInstanceOrDescriptor(r)}_createServiceInstanceWithOwner(r,u,f=[],d,l){if(this._services.get(r)instanceof D.SyncDescriptor)return this._createServiceInstance(r,u,f,d,l);if(this._parent)return this._parent._createServiceInstanceWithOwner(r,u,f,d,l);throw new Error(`illegalState - creating UNKNOWN service instance ${u.name}`)}_createServiceInstance(r,u,f=[],d,l){if(d){const o=new i(void 0,this._strict,this,this._enableTracing);o._globalGraphImplicitDependency=String(r);const c=new Map,a=new L.IdleValue(()=>{const g=o._createInstance(u,f,l);for(const[h,p]of c){const b=g[h];if(typeof b=="function")for(const w of p)b.apply(g,w)}return c.clear(),g});return new Proxy(Object.create(null),{get(g,h){if(!a.isInitialized&&typeof h=="string"&&(h.startsWith("onDid")||h.startsWith("onWill"))){let w=c.get(h);return w||(w=new v.LinkedList,c.set(h,w)),(k,M,R)=>{const B=w.push([k,M,R]);return(0,y.toDisposable)(B)}}if(h in g)return g[h];const p=a.value;let b=p[h];return typeof b!="function"||(b=b.bind(p),g[h]=b),b},set(g,h,p){return a.value[h]=p,!0},getPrototypeOf(g){return u.prototype}})}else return this._createInstance(u,f,l)}_throwIfStrict(r,u){if(u&&console.warn(r),this._strict)throw new Error(r)}}e.InstantiationService=i;class n{static traceInvocation(r,u){return r?new n(2,u.name||new Error().stack.split(` -`).slice(3,4).join(` -`)):n._None}static traceCreation(r,u){return r?new n(1,u.name):n._None}constructor(r,u){this.type=r,this.name=u,this._start=Date.now(),this._dep=[]}branch(r,u){const f=new n(3,r.toString());return this._dep.push([r,u,f]),f}stop(){const r=Date.now()-this._start;n._totals+=r;let u=!1;function f(l,o){const c=[],a=new Array(l+1).join(" ");for(const[g,h,p]of o._dep)if(h&&p){u=!0,c.push(`${a}CREATES -> ${g}`);const b=f(l+1,p);b&&c.push(b)}else c.push(`${a}uses -> ${g}`);return c.join(` -`)}const d=[`${this.type===1?"CREATE":"CALL"} ${this.name}`,`${f(1,this)}`,`DONE, took ${r.toFixed(2)}ms (grand total ${n._totals.toFixed(2)}ms)`];(r>2||u)&&n.all.add(d.join(` -`))}}e.Trace=n,n.all=new Set,n._None=new class extends n{constructor(){super(0,null)}stop(){}branch(){return this}},n._totals=0}),define(te[760],ie([1,0,9,216,118]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseResolvedKeybinding=void 0;class D extends y.ResolvedKeybinding{constructor(m,_){if(super(),_.length===0)throw(0,L.illegalArgument)("chords");this._os=m,this._chords=_}getLabel(){return I.UILabelProvider.toLabel(this._os,this._chords,m=>this._getLabel(m))}getAriaLabel(){return I.AriaLabelProvider.toLabel(this._os,this._chords,m=>this._getAriaLabel(m))}getElectronAccelerator(){return this._chords.length>1||this._chords[0].isDuplicateModifierCase()?null:I.ElectronAcceleratorLabelProvider.toLabel(this._os,this._chords,m=>this._getElectronAccelerator(m))}getUserSettingsLabel(){return I.UserSettingsLabelProvider.toLabel(this._os,this._chords,m=>this._getUserSettingsLabel(m))}hasMultipleChords(){return this._chords.length>1}getChords(){return this._chords.map(m=>this._getChord(m))}_getChord(m){return new y.ResolvedChord(m.ctrlKey,m.shiftKey,m.altKey,m.metaKey,this._getLabel(m),this._getAriaLabel(m))}getDispatchChords(){return this._chords.map(m=>this._getChordDispatch(m))}getSingleModifierDispatchChords(){return this._chords.map(m=>this._getSingleModifierChordDispatch(m))}}e.BaseResolvedKeybinding=D}),define(te[34],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IKeybindingService=void 0,e.IKeybindingService=(0,L.createDecorator)("keybindingService")}),define(te[339],ie([1,0,7,318,41,6,2,130,15,58,8,34,445]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.PostEditWidgetManager=void 0;let n=i=class extends S.Disposable{constructor(u,f,d,l,o,c,a,g,h,p){super(),this.typeId=u,this.editor=f,this.showCommand=l,this.range=o,this.edits=c,this.onSelectNewEdit=a,this._contextMenuService=g,this._keybindingService=p,this.allowEditorOverflow=!0,this.suppressMouseDown=!0,this.create(),this.visibleContext=d.bindTo(h),this.visibleContext.set(!0),this._register((0,S.toDisposable)(()=>this.visibleContext.reset())),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this),this._register((0,S.toDisposable)(()=>this.editor.removeContentWidget(this))),this._register(this.editor.onDidChangeCursorPosition(b=>{o.containsPosition(b.position)||this.dispose()})),this._register(D.Event.runAndSubscribe(p.onDidUpdateKeybindings,()=>{this._updateButtonTitle()}))}_updateButtonTitle(){var u;const f=(u=this._keybindingService.lookupKeybinding(this.showCommand.id))===null||u===void 0?void 0:u.getLabel();this.button.element.title=this.showCommand.label+(f?` (${f})`:"")}create(){this.domNode=L.$(".post-edit-widget"),this.button=this._register(new I.Button(this.domNode,{supportIcons:!0})),this.button.label="$(insert)",this._register(L.addDisposableListener(this.domNode,L.EventType.CLICK,()=>this.showSelector()))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:this.range.getEndPosition(),preference:[2]}}showSelector(){this._contextMenuService.showContextMenu({getAnchor:()=>{const u=L.getDomNodePagePosition(this.button.element);return{x:u.left+u.width,y:u.top+u.height}},getActions:()=>this.edits.allEdits.map((u,f)=>(0,y.toAction)({id:"",label:u.label,checked:f===this.edits.activeEditIndex,run:()=>{if(f!==this.edits.activeEditIndex)return this.onSelectNewEdit(f)}}))})}};n.baseId="editor.widget.postEditWidget",n=i=Ie([ge(7,v.IContextMenuService),ge(8,_.IContextKeyService),ge(9,s.IKeybindingService)],n);let t=class extends S.Disposable{constructor(u,f,d,l,o,c){super(),this._id=u,this._editor=f,this._visibleContext=d,this._showCommand=l,this._instantiationService=o,this._bulkEditService=c,this._currentWidget=this._register(new S.MutableDisposable),this._register(D.Event.any(f.onDidChangeModel,f.onDidChangeModelContent)(()=>this.clear()))}applyEditAndShowIfNeeded(u,f,d,l){var o,c;return be(this,void 0,void 0,function*(){const a=this._editor.getModel();if(!a||!u.length)return;const g=f.allEdits[f.activeEditIndex];if(!g)return;let h=[];(typeof g.insertText=="string"?g.insertText==="":g.insertText.snippet==="")?h=[]:h=u.map(R=>new m.ResourceTextEdit(a.uri,typeof g.insertText=="string"?{range:R,text:g.insertText,insertAsSnippet:!1}:{range:R,text:g.insertText.snippet,insertAsSnippet:!0}));const b={edits:[...h,...(c=(o=g.additionalEdit)===null||o===void 0?void 0:o.edits)!==null&&c!==void 0?c:[]]},w=u[0],E=a.deltaDecorations([],[{range:w,options:{description:"paste-line-suffix",stickiness:0}}]);let k,M;try{k=yield this._bulkEditService.apply(b,{editor:this._editor,token:l}),M=a.getDecorationRange(E[0])}finally{a.deltaDecorations(E,[])}d&&k.isApplied&&f.allEdits.length>1&&this.show(M??w,f,R=>be(this,void 0,void 0,function*(){const B=this._editor.getModel();B&&(yield B.undo(),this.applyEditAndShowIfNeeded(u,{activeEditIndex:R,allEdits:f.allEdits},d,l))}))})}show(u,f,d){this.clear(),this._editor.hasModel()&&(this._currentWidget.value=this._instantiationService.createInstance(n,this._id,this._editor,this._visibleContext,this._showCommand,u,f,d))}clear(){this._currentWidget.clear()}tryShowSelector(){var u;(u=this._currentWidget.value)===null||u===void 0||u.showSelector()}};e.PostEditWidgetManager=t,e.PostEditWidgetManager=t=Ie([ge(4,C.IInstantiationService),ge(5,m.IBulkEditService)],t)}),define(te[340],ie([1,0,15]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KeybindingResolver=e.NoMatchingKb=void 0,e.NoMatchingKb={kind:0};const I={kind:1};function y(_,v,C){return{kind:2,commandId:_,commandArgs:v,isBubble:C}}class D{constructor(v,C,s){var i;this._log=s,this._defaultKeybindings=v,this._defaultBoundCommands=new Map;for(const n of v){const t=n.command;t&&t.charAt(0)!=="-"&&this._defaultBoundCommands.set(t,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=D.handleRemovals([].concat(v).concat(C));for(let n=0,t=this._keybindings.length;n"u"){this._map.set(v,[C]),this._addToLookupMap(C);return}for(let i=s.length-1;i>=0;i--){const n=s[i];if(n.command===C.command)continue;let t=!0;for(let r=1;r"u"?(C=[v],this._lookupMap.set(v.command,C)):C.push(v)}_removeFromLookupMap(v){if(!v.command)return;const C=this._lookupMap.get(v.command);if(!(typeof C>"u")){for(let s=0,i=C.length;s"u"||s.length===0)return null;if(s.length===1)return s[0];for(let i=s.length-1;i>=0;i--){const n=s[i];if(C.contextMatchesRules(n.when))return n}return s[s.length-1]}resolve(v,C,s){const i=[...C,s];this._log(`| Resolving ${i}`);const n=this._map.get(i[0]);if(n===void 0)return this._log("\\ No keybinding entries."),e.NoMatchingKb;let t=null;if(i.length<2)t=n;else{t=[];for(let u=0,f=n.length;ud.chords.length)continue;let l=!0;for(let o=1;o=0;s--){const i=C[s];if(D._contextMatchesRules(v,i.when))return i}return null}static _contextMatchesRules(v,C){return C?C.evaluate(v):!0}}e.KeybindingResolver=D;function S(_){return _?`${_.serialize()}`:"no when condition"}function m(_){return _.extensionId?_.isBuiltinExtension?`built-in extension ${_.extensionId}`:`user extension ${_.extensionId}`:_.isDefault?"built-in":"user"}}),define(te[761],ie([1,0,14,9,6,262,2,728,340]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractKeybindingService=void 0;const v=/^(cursor|delete|undo|redo|tab|editor\.action\.clipboard)/;class C extends S.Disposable{get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:y.Event.None}get inChordMode(){return this._currentChords.length>0}constructor(n,t,r,u,f){super(),this._contextKeyService=n,this._commandService=t,this._telemetryService=r,this._notificationService=u,this._logService=f,this._onDidUpdateKeybindings=this._register(new y.Emitter),this._currentChords=[],this._currentChordChecker=new L.IntervalTimer,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=s.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new L.TimeoutTimer,this._logging=!1}dispose(){super.dispose()}_log(n){this._logging&&this._logService.info(`[KeybindingService]: ${n}`)}getKeybindings(){return this._getResolver().getKeybindings()}lookupKeybinding(n,t){const r=this._getResolver().lookupPrimaryKeybinding(n,t||this._contextKeyService);if(r)return r.resolvedKeybinding}dispatchEvent(n,t){return this._dispatch(n,t)}softDispatch(n,t){this._log("/ Soft dispatching keyboard event");const r=this.resolveKeyboardEvent(n);if(r.hasMultipleChords())return console.warn("keyboard event should not be mapped to multiple chords"),_.NoMatchingKb;const[u]=r.getDispatchChords();if(u===null)return this._log("\\ Keyboard event cannot be dispatched"),_.NoMatchingKb;const f=this._contextKeyService.getContext(t),d=this._currentChords.map(({keypress:l})=>l);return this._getResolver().resolve(f,d,u)}_scheduleLeaveChordMode(){const n=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-n>5e3&&this._leaveChordMode()},500)}_expectAnotherChord(n,t){switch(this._currentChords.push({keypress:n,label:t}),this._currentChords.length){case 0:throw(0,I.illegalState)("impossible");case 1:this._currentChordStatusMessage=this._notificationService.status(m.localize(0,null,t));break;default:{const r=this._currentChords.map(({label:u})=>u).join(", ");this._currentChordStatusMessage=this._notificationService.status(m.localize(1,null,r))}}this._scheduleLeaveChordMode(),D.IME.enabled&&D.IME.disable()}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChords=[],D.IME.enable()}_dispatch(n,t){return this._doDispatch(this.resolveKeyboardEvent(n),t,!1)}_singleModifierDispatch(n,t){const r=this.resolveKeyboardEvent(n),[u]=r.getSingleModifierDispatchChords();if(u)return this._ignoreSingleModifiers.has(u)?(this._log(`+ Ignoring single modifier ${u} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=s.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=s.EMPTY,this._currentSingleModifier===null?(this._log(`+ Storing single modifier for possible chord ${u}.`),this._currentSingleModifier=u,this._currentSingleModifierClearTimeout.cancelAndSet(()=>{this._log("+ Clearing single modifier due to 300ms elapsed."),this._currentSingleModifier=null},300),!1):u===this._currentSingleModifier?(this._log(`/ Dispatching single modifier chord ${u} ${u}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,this._doDispatch(r,t,!0)):(this._log(`+ Clearing single modifier due to modifier mismatch: ${this._currentSingleModifier} ${u}`),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1));const[f]=r.getChords();return this._ignoreSingleModifiers=new s(f),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(n,t,r=!1){var u;let f=!1;if(n.hasMultipleChords())return console.warn("Unexpected keyboard event mapped to multiple chords"),!1;let d=null,l=null;if(r){const[g]=n.getSingleModifierDispatchChords();d=g,l=g?[g]:[]}else[d]=n.getDispatchChords(),l=this._currentChords.map(({keypress:g})=>g);if(d===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),f;const o=this._contextKeyService.getContext(t),c=n.getLabel(),a=this._getResolver().resolve(o,l,d);switch(a.kind){case 0:{if(this._logService.trace("KeybindingService#dispatch",c,"[ No matching keybinding ]"),this.inChordMode){const g=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving multi-chord mode: Nothing bound to "${g}, ${c}".`),this._notificationService.status(m.localize(2,null,g,c),{hideAfter:10*1e3}),this._leaveChordMode(),f=!0}return f}case 1:return this._logService.trace("KeybindingService#dispatch",c,"[ Several keybindings match - more chords needed ]"),f=!0,this._expectAnotherChord(d,c),this._log(this._currentChords.length===1?"+ Entering multi-chord mode...":"+ Continuing multi-chord mode..."),f;case 2:{if(this._logService.trace("KeybindingService#dispatch",c,`[ Will dispatch command ${a.commandId} ]`),a.commandId===null||a.commandId===""){if(this.inChordMode){const g=this._currentChords.map(({label:h})=>h).join(", ");this._log(`+ Leaving chord mode: Nothing bound to "${g}, ${c}".`),this._notificationService.status(m.localize(3,null,g,c),{hideAfter:10*1e3}),this._leaveChordMode(),f=!0}}else this.inChordMode&&this._leaveChordMode(),a.isBubble||(f=!0),this._log(`+ Invoking command ${a.commandId}.`),typeof a.commandArgs>"u"?this._commandService.executeCommand(a.commandId).then(void 0,g=>this._notificationService.warn(g)):this._commandService.executeCommand(a.commandId,a.commandArgs).then(void 0,g=>this._notificationService.warn(g)),v.test(a.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:a.commandId,from:"keybinding",detail:(u=n.getUserSettingsLabel())!==null&&u!==void 0?u:void 0});return f}}}mightProducePrintableCharacter(n){return n.ctrlKey||n.metaKey?!1:n.keyCode>=31&&n.keyCode<=56||n.keyCode>=21&&n.keyCode<=30}}e.AbstractKeybindingService=C;class s{constructor(n){this._ctrlKey=n?n.ctrlKey:!1,this._shiftKey=n?n.shiftKey:!1,this._altKey=n?n.altKey:!1,this._metaKey=n?n.metaKey:!1}has(n){switch(n){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}s.EMPTY=new s(null)}),define(te[341],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toEmptyArrayIfContainsNull=e.ResolvedKeybindingItem=void 0;class L{constructor(D,S,m,_,v,C,s){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=D,this.chords=D?I(D.getDispatchChords()):[],D&&this.chords.length===0&&(this.chords=I(D.getSingleModifierDispatchChords())),this.bubble=S?S.charCodeAt(0)===94:!1,this.command=this.bubble?S.substr(1):S,this.commandArgs=m,this.when=_,this.isDefault=v,this.extensionId=C,this.isBuiltinExtension=s}}e.ResolvedKeybindingItem=L;function I(y){const D=[];for(let S=0,m=y.length;Sthis._toKeyCodeChord(s)));return C.length>0?[new S(C,v)]:[]}}e.USLayoutResolvedKeybinding=S}),define(te[158],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILabelService=void 0,e.ILabelService=(0,L.createDecorator)("labelService")}),define(te[132],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ILayoutService=void 0,e.ILayoutService=(0,L.createDecorator)("layoutService")}),define(te[342],ie([1,0,7,6,132,33,47]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScopedLayoutService=void 0;let m=class{get dimension(){return this._dimension||(this._dimension=L.getClientArea(window.document.body)),this._dimension}get hasContainer(){return!1}get container(){throw new Error("ILayoutService.container is not available in the standalone editor!")}focus(){var C;(C=this._codeEditorService.getFocusedCodeEditor())===null||C===void 0||C.focus()}constructor(C){this._codeEditorService=C,this.onDidLayout=I.Event.None,this.offset={top:0,quickPickTop:0}}};m=Ie([ge(0,D.ICodeEditorService)],m);let _=class extends m{get hasContainer(){return!1}get container(){return this._container}constructor(C,s){super(s),this._container=C}};e.EditorScopedLayoutService=_,e.EditorScopedLayoutService=_=Ie([ge(1,D.ICodeEditorService)],_),(0,S.registerSingleton)(y.ILayoutService,m,1)}),define(te[763],ie([1,0,7,6,2,88,28,15,132]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityService=void 0;let v=class extends y.Disposable{constructor(s,i,n){super(),this._contextKeyService=s,this._layoutService=i,this._configurationService=n,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new I.Emitter,this._onDidChangeReducedMotion=new I.Emitter,this._accessibilityModeEnabledContext=D.CONTEXT_ACCESSIBILITY_MODE_ENABLED.bindTo(this._contextKeyService);const t=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(u=>{u.affectsConfiguration("editor.accessibilitySupport")&&(t(),this._onDidChangeScreenReaderOptimized.fire()),u.affectsConfiguration("workbench.reduceMotion")&&(this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this._onDidChangeReducedMotion.fire())})),t(),this._register(this.onDidChangeScreenReaderOptimized(()=>t()));const r=window.matchMedia("(prefers-reduced-motion: reduce)");this._systemMotionReduced=r.matches,this._configMotionReduced=this._configurationService.getValue("workbench.reduceMotion"),this.initReducedMotionListeners(r)}initReducedMotionListeners(s){if(!this._layoutService.hasContainer)return;this._register((0,L.addDisposableListener)(s,"change",()=>{this._systemMotionReduced=s.matches,this._configMotionReduced==="auto"&&this._onDidChangeReducedMotion.fire()}));const i=()=>{const n=this.isMotionReduced();this._layoutService.container.classList.toggle("reduce-motion",n),this._layoutService.container.classList.toggle("enable-motion",!n)};i(),this._register(this.onDidChangeReducedMotion(()=>i()))}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const s=this._configurationService.getValue("editor.accessibilitySupport");return s==="on"||s==="auto"&&this._accessibilitySupport===2}get onDidChangeReducedMotion(){return this._onDidChangeReducedMotion.event}isMotionReduced(){const s=this._configMotionReduced;return s==="on"||s==="auto"&&this._systemMotionReduced}getAccessibilitySupport(){return this._accessibilitySupport}};e.AccessibilityService=v,e.AccessibilityService=v=Ie([ge(0,m.IContextKeyService),ge(1,_.ILayoutService),ge(2,S.IConfigurationService)],v)}),define(te[764],ie([1,0,311,2,132]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextViewService=void 0;let D=class extends I.Disposable{constructor(m){super(),this.layoutService=m,this.currentViewDisposable=I.Disposable.None,this.container=m.hasContainer?m.container:null,this.contextView=this._register(new L.ContextView(this.container,1)),this.layout(),this._register(m.onDidLayout(()=>this.layout()))}setContainer(m,_){this.contextView.setContainer(m,_||1)}showContextView(m,_,v){_?(_!==this.container||this.shadowRoot!==v)&&(this.container=_,this.setContainer(_,v?3:2)):this.layoutService.hasContainer&&this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.shadowRoot=v,this.contextView.show(m);const C=(0,I.toDisposable)(()=>{this.currentViewDisposable===C&&this.hideContextView()});return this.currentViewDisposable=C,C}getContextViewElement(){return this.contextView.getViewElement()}layout(){this.contextView.layout()}hideContextView(m){this.contextView.hide(m)}};e.ContextViewService=D,e.ContextViewService=D=Ie([ge(0,y.ILayoutService)],D)}),define(te[66],ie([1,0,6,2,15,8]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CONTEXT_LOG_LEVEL=e.LogLevelToString=e.MultiplexLogger=e.ConsoleLogger=e.AbstractLogger=e.DEFAULT_LOG_LEVEL=e.LogLevel=e.ILogService=void 0,e.ILogService=(0,D.createDecorator)("logService");var S;(function(s){s[s.Off=0]="Off",s[s.Trace=1]="Trace",s[s.Debug=2]="Debug",s[s.Info=3]="Info",s[s.Warning=4]="Warning",s[s.Error=5]="Error"})(S||(e.LogLevel=S={})),e.DEFAULT_LOG_LEVEL=S.Info;class m extends I.Disposable{constructor(){super(...arguments),this.level=e.DEFAULT_LOG_LEVEL,this._onDidChangeLogLevel=this._register(new L.Emitter),this.onDidChangeLogLevel=this._onDidChangeLogLevel.event}setLevel(i){this.level!==i&&(this.level=i,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}checkLogLevel(i){return this.level!==S.Off&&this.level<=i}}e.AbstractLogger=m;class _ extends m{constructor(i=e.DEFAULT_LOG_LEVEL,n=!0){super(),this.useColors=n,this.setLevel(i)}trace(i,...n){this.checkLogLevel(S.Trace)&&(this.useColors?console.log("%cTRACE","color: #888",i,...n):console.log(i,...n))}debug(i,...n){this.checkLogLevel(S.Debug)&&(this.useColors?console.log("%cDEBUG","background: #eee; color: #888",i,...n):console.log(i,...n))}info(i,...n){this.checkLogLevel(S.Info)&&(this.useColors?console.log("%c INFO","color: #33f",i,...n):console.log(i,...n))}warn(i,...n){this.checkLogLevel(S.Warning)&&(this.useColors?console.log("%c WARN","color: #993",i,...n):console.log(i,...n))}error(i,...n){this.checkLogLevel(S.Error)&&(this.useColors?console.log("%c ERR","color: #f33",i,...n):console.error(i,...n))}dispose(){}}e.ConsoleLogger=_;class v extends m{constructor(i){super(),this.loggers=i,i.length&&this.setLevel(i[0].getLevel())}setLevel(i){for(const n of this.loggers)n.setLevel(i);super.setLevel(i)}trace(i,...n){for(const t of this.loggers)t.trace(i,...n)}debug(i,...n){for(const t of this.loggers)t.debug(i,...n)}info(i,...n){for(const t of this.loggers)t.info(i,...n)}warn(i,...n){for(const t of this.loggers)t.warn(i,...n)}error(i,...n){for(const t of this.loggers)t.error(i,...n)}dispose(){for(const i of this.loggers)i.dispose()}}e.MultiplexLogger=v;function C(s){switch(s){case S.Trace:return"trace";case S.Debug:return"debug";case S.Info:return"info";case S.Warning:return"warn";case S.Error:return"error";case S.Off:return"off"}}e.LogLevelToString=C,e.CONTEXT_LOG_LEVEL=new y.RawContextKey("logLevel",C(S.Info))}),define(te[765],ie([1,0,51,7,14,2,132,66]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BrowserClipboardService=void 0;let _=class extends D.Disposable{constructor(C,s){super(),this.layoutService=C,this.logService=s,this.mapTextToType=new Map,this.findText="",this.resources=[],(L.isSafari||L.isWebkitWebView)&&this.installWebKitWriteTextWorkaround()}installWebKitWriteTextWorkaround(){const C=()=>{const s=new y.DeferredPromise;this.webKitPendingClipboardWritePromise&&!this.webKitPendingClipboardWritePromise.isSettled&&this.webKitPendingClipboardWritePromise.cancel(),this.webKitPendingClipboardWritePromise=s,navigator.clipboard.write([new ClipboardItem({"text/plain":s.p})]).catch(i=>be(this,void 0,void 0,function*(){(!(i instanceof Error)||i.name!=="NotAllowedError"||!s.isRejected)&&this.logService.error(i)}))};this.layoutService.hasContainer&&(this._register((0,I.addDisposableListener)(this.layoutService.container,"click",C)),this._register((0,I.addDisposableListener)(this.layoutService.container,"keydown",C)))}writeText(C,s){return be(this,void 0,void 0,function*(){if(s){this.mapTextToType.set(s,C);return}if(this.webKitPendingClipboardWritePromise)return this.webKitPendingClipboardWritePromise.complete(C);try{return yield navigator.clipboard.writeText(C)}catch(t){console.error(t)}const i=document.activeElement,n=document.body.appendChild((0,I.$)("textarea",{"aria-hidden":!0}));n.style.height="1px",n.style.width="1px",n.style.position="absolute",n.value=C,n.focus(),n.select(),document.execCommand("copy"),i instanceof HTMLElement&&i.focus(),document.body.removeChild(n)})}readText(C){return be(this,void 0,void 0,function*(){if(C)return this.mapTextToType.get(C)||"";try{return yield navigator.clipboard.readText()}catch(s){return console.error(s),""}})}readFindText(){return be(this,void 0,void 0,function*(){return this.findText})}writeFindText(C){return be(this,void 0,void 0,function*(){this.findText=C})}writeResources(C){return be(this,void 0,void 0,function*(){this.resources=C})}readResources(){return be(this,void 0,void 0,function*(){return this.resources})}};e.BrowserClipboardService=_,e.BrowserClipboardService=_=Ie([ge(0,S.ILayoutService),ge(1,m.ILogService)],_)}),define(te[766],ie([1,0,2,66]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LogService=void 0;class y extends L.Disposable{constructor(S,m=[]){super(),this.logger=new I.MultiplexLogger([S,...m]),this._register(S.onDidChangeLogLevel(_=>this.setLevel(_)))}get onDidChangeLogLevel(){return this.logger.onDidChangeLogLevel}setLevel(S){this.logger.setLevel(S)}getLevel(){return this.logger.getLevel()}trace(S,...m){this.logger.trace(S,...m)}debug(S,...m){this.logger.debug(S,...m)}info(S,...m){this.logger.info(S,...m)}warn(S,...m){this.logger.warn(S,...m)}error(S,...m){this.logger.error(S,...m)}}e.LogService=y}),define(te[94],ie([1,0,98,730,8]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerService=e.IMarkerData=e.MarkerSeverity=void 0;var D;(function(m){m[m.Hint=1]="Hint",m[m.Info=2]="Info",m[m.Warning=4]="Warning",m[m.Error=8]="Error"})(D||(e.MarkerSeverity=D={})),function(m){function _(n,t){return t-n}m.compare=_;const v=Object.create(null);v[m.Error]=(0,I.localize)(0,null),v[m.Warning]=(0,I.localize)(1,null),v[m.Info]=(0,I.localize)(2,null);function C(n){return v[n]||""}m.toString=C;function s(n){switch(n){case L.default.Error:return m.Error;case L.default.Warning:return m.Warning;case L.default.Info:return m.Info;case L.default.Ignore:return m.Hint}}m.fromSeverity=s;function i(n){switch(n){case m.Error:return L.default.Error;case m.Warning:return L.default.Warning;case m.Info:return L.default.Info;case m.Hint:return L.default.Ignore}}m.toSeverity=i}(D||(e.MarkerSeverity=D={}));var S;(function(m){const _="";function v(s){return C(s,!0)}m.makeKey=v;function C(s,i){const n=[_];return s.source?n.push(s.source.replace("\xA6","\\\xA6")):n.push(_),s.code?typeof s.code=="string"?n.push(s.code.replace("\xA6","\\\xA6")):n.push(s.code.value.replace("\xA6","\\\xA6")):n.push(_),s.severity!==void 0&&s.severity!==null?n.push(D.toString(s.severity)):n.push(_),s.message&&i?n.push(s.message.replace("\xA6","\\\xA6")):n.push(_),s.startLineNumber!==void 0&&s.startLineNumber!==null?n.push(s.startLineNumber.toString()):n.push(_),s.startColumn!==void 0&&s.startColumn!==null?n.push(s.startColumn.toString()):n.push(_),s.endLineNumber!==void 0&&s.endLineNumber!==null?n.push(s.endLineNumber.toString()):n.push(_),s.endColumn!==void 0&&s.endColumn!==null?n.push(s.endColumn.toString()):n.push(_),n.push(_),n.join("\xA6")}m.makeKeyOptionalMessage=C})(S||(e.IMarkerData=S={})),e.IMarkerService=(0,y.createDecorator)("markerService")}),define(te[767],ie([1,0,13,6,2,63,10,21,5,47,8,94,28]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IMarkerNavigationService=e.MarkerList=e.MarkerCoordinate=void 0;class n{constructor(f,d,l){this.marker=f,this.index=d,this.total=l}}e.MarkerCoordinate=n;let t=class{constructor(f,d,l){this._markerService=d,this._configService=l,this._onDidChange=new I.Emitter,this.onDidChange=this._onDidChange.event,this._dispoables=new y.DisposableStore,this._markers=[],this._nextIdx=-1,m.URI.isUri(f)?this._resourceFilter=g=>g.toString()===f.toString():f&&(this._resourceFilter=f);const o=this._configService.getValue("problems.sortOrder"),c=(g,h)=>{let p=(0,S.compare)(g.resource.toString(),h.resource.toString());return p===0&&(o==="position"?p=_.Range.compareRangesUsingStarts(g,h)||s.MarkerSeverity.compare(g.severity,h.severity):p=s.MarkerSeverity.compare(g.severity,h.severity)||_.Range.compareRangesUsingStarts(g,h)),p},a=()=>{this._markers=this._markerService.read({resource:m.URI.isUri(f)?f:void 0,severities:s.MarkerSeverity.Error|s.MarkerSeverity.Warning|s.MarkerSeverity.Info}),typeof f=="function"&&(this._markers=this._markers.filter(g=>this._resourceFilter(g.resource))),this._markers.sort(c)};a(),this._dispoables.add(d.onMarkerChanged(g=>{(!this._resourceFilter||g.some(h=>this._resourceFilter(h)))&&(a(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(f){return!this._resourceFilter&&!f?!0:!this._resourceFilter||!f?!1:this._resourceFilter(f)}get selected(){const f=this._markers[this._nextIdx];return f&&new n(f,this._nextIdx+1,this._markers.length)}_initIdx(f,d,l){let o=!1,c=this._markers.findIndex(a=>a.resource.toString()===f.uri.toString());c<0&&(c=(0,L.binarySearch)(this._markers,{resource:f.uri},(a,g)=>(0,S.compare)(a.resource.toString(),g.resource.toString())),c<0&&(c=~c));for(let a=c;ao.resource.toString()===f.toString());if(!(l<0)){for(;ld[1])}}class C{constructor(n){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new D.ResourceMap,this._service=n,this._subscription=n.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(n){for(const t of n){const r=this._data.get(t);r&&this._substract(r);const u=this._resourceStats(t);this._add(u),this._data.set(t,u)}}_resourceStats(n){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.unsupportedSchemas.has(n.scheme))return t;for(const{severity:r}of this._service.read({resource:n}))r===_.MarkerSeverity.Error?t.errors+=1:r===_.MarkerSeverity.Warning?t.warnings+=1:r===_.MarkerSeverity.Info?t.infos+=1:t.unknowns+=1;return t}_substract(n){this.errors-=n.errors,this.warnings-=n.warnings,this.infos-=n.infos,this.unknowns-=n.unknowns}_add(n){this.errors+=n.errors,this.warnings+=n.warnings,this.infos+=n.infos,this.unknowns+=n.unknowns}}class s{constructor(){this._onMarkerChanged=new I.DebounceEmitter({delay:0,merge:s._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new v,this._stats=new C(this)}dispose(){this._stats.dispose(),this._onMarkerChanged.dispose()}remove(n,t){for(const r of t||[])this.changeOne(n,r,[])}changeOne(n,t,r){if((0,L.isFalsyOrEmpty)(r))this._data.delete(t,n)&&this._onMarkerChanged.fire([t]);else{const u=[];for(const f of r){const d=s._toMarker(n,t,f);d&&u.push(d)}this._data.set(t,n,u),this._onMarkerChanged.fire([t])}}static _toMarker(n,t,r){let{code:u,severity:f,message:d,source:l,startLineNumber:o,startColumn:c,endLineNumber:a,endColumn:g,relatedInformation:h,tags:p}=r;if(d)return o=o>0?o:1,c=c>0?c:1,a=a>=o?a:o,g=g>0?g:c,{resource:t,owner:n,code:u,severity:f,message:d,source:l,startLineNumber:o,startColumn:c,endLineNumber:a,endColumn:g,relatedInformation:h,tags:p}}changeAll(n,t){const r=[],u=this._data.values(n);if(u)for(const f of u){const d=y.Iterable.first(f);d&&(r.push(d.resource),this._data.delete(d.resource,n))}if((0,L.isNonEmptyArray)(t)){const f=new D.ResourceMap;for(const{resource:d,marker:l}of t){const o=s._toMarker(n,d,l);if(!o)continue;const c=f.get(d);c?c.push(o):(f.set(d,[o]),r.push(d))}for(const[d,l]of f)this._data.set(d,n,l)}r.length>0&&this._onMarkerChanged.fire(r)}read(n=Object.create(null)){let{owner:t,resource:r,severities:u,take:f}=n;if((!f||f<0)&&(f=-1),t&&r){const d=this._data.get(r,t);if(d){const l=[];for(const o of d)if(s._accept(o,u)){const c=l.push(o);if(f>0&&c===f)break}return l}else return[]}else if(!t&&!r){const d=[];for(const l of this._data.values())for(const o of l)if(s._accept(o,u)){const c=d.push(o);if(f>0&&c===f)return d}return d}else{const d=this._data.values(r??t),l=[];for(const o of d)for(const c of o)if(s._accept(c,u)){const a=l.push(c);if(f>0&&a===f)return l}return l}}static _accept(n,t){return t===void 0||(t&n.severity)===n.severity}static _merge(n){const t=new D.ResourceMap;for(const r of n)for(const u of r)t.set(u,!0);return Array.from(t.keys())}}e.MarkerService=s}),define(te[48],ie([1,0,98,8]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoOpNotification=e.INotificationService=e.Severity=void 0,e.Severity=L.default,e.INotificationService=(0,I.createDecorator)("notificationService");class y{}e.NoOpNotification=y}),define(te[55],ie([1,0,10,21,8]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.extractSelection=e.matchesSomeScheme=e.matchesScheme=e.IOpenerService=void 0,e.IOpenerService=(0,y.createDecorator)("openerService");function D(_,v){return I.URI.isUri(_)?(0,L.equalsIgnoreCase)(_.scheme,v):(0,L.startsWithIgnoreCase)(_,v+":")}e.matchesScheme=D;function S(_,...v){return v.some(C=>D(_,C))}e.matchesSomeScheme=S;function m(_){let v;const C=/^L?(\d+)(?:,(\d+))?(-L?(\d+)(?:,(\d+))?)?/.exec(_.fragment);return C&&(v={startLineNumber:parseInt(C[1]),startColumn:C[2]?parseInt(C[2]):1,endLineNumber:C[4]?parseInt(C[4]):void 0,endColumn:C[4]?C[5]?parseInt(C[5]):1:void 0},_=_.with({fragment:""})),{selection:v,uri:_}}e.extractSelection=m}),define(te[769],ie([1,0,7,19,63,56,221,54,46,21,33,25,744,55]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpenerService=void 0;let t=class{constructor(d){this._commandService=d}open(d,l){return be(this,void 0,void 0,function*(){if(!(0,n.matchesScheme)(d,m.Schemas.command))return!1;if(!l?.allowCommands||(typeof d=="string"&&(d=v.URI.parse(d)),Array.isArray(l.allowCommands)&&!l.allowCommands.includes(d.path)))return!0;let o=[];try{o=(0,S.parse)(decodeURIComponent(d.query))}catch{try{o=(0,S.parse)(d.query)}catch{}}return Array.isArray(o)||(o=[o]),yield this._commandService.executeCommand(d.path,...o),!0})}};t=Ie([ge(0,s.ICommandService)],t);let r=class{constructor(d){this._editorService=d}open(d,l){return be(this,void 0,void 0,function*(){typeof d=="string"&&(d=v.URI.parse(d));const{selection:o,uri:c}=(0,n.extractSelection)(d);return d=c,d.scheme===m.Schemas.file&&(d=(0,_.normalizePath)(d)),yield this._editorService.openCodeEditor({resource:d,options:Object.assign({selection:o,source:l?.fromUserGesture?i.EditorOpenSource.USER:i.EditorOpenSource.API},l?.editorOptions)},this._editorService.getFocusedCodeEditor(),l?.openToSide),!0})}};r=Ie([ge(0,C.ICodeEditorService)],r);let u=class{constructor(d,l){this._openers=new y.LinkedList,this._validators=new y.LinkedList,this._resolvers=new y.LinkedList,this._resolvedUriTargets=new D.ResourceMap(o=>o.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new y.LinkedList,this._defaultExternalOpener={openExternal:o=>be(this,void 0,void 0,function*(){return(0,n.matchesSomeScheme)(o,m.Schemas.http,m.Schemas.https)?L.windowOpenNoOpener(o):window.location.href=o,!0})},this._openers.push({open:(o,c)=>be(this,void 0,void 0,function*(){return c?.openExternal||(0,n.matchesSomeScheme)(o,m.Schemas.mailto,m.Schemas.http,m.Schemas.https,m.Schemas.vsls)?(yield this._doOpenExternal(o,c),!0):!1})}),this._openers.push(new t(l)),this._openers.push(new r(d))}registerOpener(d){return{dispose:this._openers.unshift(d)}}open(d,l){var o;return be(this,void 0,void 0,function*(){const c=typeof d=="string"?v.URI.parse(d):d,a=(o=this._resolvedUriTargets.get(c))!==null&&o!==void 0?o:d;for(const g of this._validators)if(!(yield g.shouldOpen(a,l)))return!1;for(const g of this._openers)if(yield g.open(d,l))return!0;return!1})}resolveExternalUri(d,l){return be(this,void 0,void 0,function*(){for(const o of this._resolvers)try{const c=yield o.resolveExternalUri(d,l);if(c)return this._resolvedUriTargets.has(c.resolved)||this._resolvedUriTargets.set(c.resolved,d),c}catch{}throw new Error("Could not resolve external URI: "+d.toString())})}_doOpenExternal(d,l){return be(this,void 0,void 0,function*(){const o=typeof d=="string"?v.URI.parse(d):d;let c;try{c=(yield this.resolveExternalUri(o,l)).resolved}catch{c=o}let a;if(typeof d=="string"&&o.toString()===c.toString()?a=d:a=encodeURI(c.toString(!0)),l?.allowContributedOpeners){const g=typeof l?.allowContributedOpeners=="string"?l?.allowContributedOpeners:void 0;for(const h of this._externalOpeners)if(yield h.openExternal(a,{sourceUri:o,preferredOpenerId:g},I.CancellationToken.None))return!0}return this._defaultExternalOpener.openExternal(a,{sourceUri:o},I.CancellationToken.None)})}dispose(){this._validators.clear()}};e.OpenerService=u,e.OpenerService=u=Ie([ge(0,C.ICodeEditorService),ge(1,s.ICommandService)],u)}),define(te[74],ie([1,0,141,56,139,238,47,8,66,55]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageFeatureDebounceService=e.ILanguageFeatureDebounceService=void 0,e.ILanguageFeatureDebounceService=(0,m.createDecorator)("ILanguageFeatureDebounceService");var C;(function(t){const r=new WeakMap;let u=0;function f(d){let l=r.get(d);return l===void 0&&(l=++u,r.set(d,l)),l}t.of=f})(C||(C={}));class s{constructor(r){this._default=r}get(r){return this._default}update(r,u){return this._default}default(){return this._default}}class i{constructor(r,u,f,d,l,o){this._logService=r,this._name=u,this._registry=f,this._default=d,this._min=l,this._max=o,this._cache=new I.LRUCache(50,.7)}_key(r){return r.id+this._registry.all(r).reduce((u,f)=>(0,L.doHash)(C.of(f),u),0)}get(r){const u=this._key(r),f=this._cache.get(u);return f?(0,y.clamp)(f.value,this._min,this._max):this.default()}update(r,u){const f=this._key(r);let d=this._cache.get(f);d||(d=new y.SlidingWindowAverage(6),this._cache.set(f,d));const l=(0,y.clamp)(d.update(u),this._min,this._max);return(0,v.matchesScheme)(r.uri,"output")||this._logService.trace(`[DEBOUNCE: ${this._name}] for ${r.uri.toString()} is ${l}ms`),l}_overall(){const r=new y.MovingAverage;for(const[,u]of this._cache)r.update(u.value);return r.value}default(){const r=this._overall()|0||this._default;return(0,y.clamp)(r,this._min,this._max)}}let n=class{constructor(r,u){this._logService=r,this._data=new Map,this._isDev=u.isExtensionDevelopment||!u.isBuilt}for(r,u,f){var d,l,o;const c=(d=f?.min)!==null&&d!==void 0?d:50,a=(l=f?.max)!==null&&l!==void 0?l:Math.pow(c,2),g=(o=f?.key)!==null&&o!==void 0?o:void 0,h=`${C.of(r)},${c}${g?","+g:""}`;let p=this._data.get(h);return p||(this._isDev?p=new i(this._logService,u,r,this._overallAverage()|0||c*1.5,c,a):(this._logService.debug(`[DEBOUNCE: ${u}] is disabled in developed mode`),p=new s(c*1.5)),this._data.set(h,p)),p}_overallAverage(){const r=new y.MovingAverage;for(const u of this._data.values())r.update(u.default());return r.value}};e.LanguageFeatureDebounceService=n,e.LanguageFeatureDebounceService=n=Ie([ge(0,_.ILogService),ge(1,D.IEnvironmentService)],n),(0,S.registerSingleton)(e.ILanguageFeatureDebounceService,n,1)}),define(te[187],ie([1,0,13,19,9,43,56,12,5,74,8,47,50,2,18]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OutlineModelService=e.IOutlineModelService=e.OutlineModel=e.OutlineGroup=e.OutlineElement=e.TreeElement=void 0;class r{remove(){var c;(c=this.parent)===null||c===void 0||c.children.delete(this.id)}static findId(c,a){let g;typeof c=="string"?g=`${a.id}/${c}`:(g=`${a.id}/${c.name}`,a.children.get(g)!==void 0&&(g=`${a.id}/${c.name}_${c.range.startLineNumber}_${c.range.startColumn}`));let h=g;for(let p=0;a.children.get(h)!==void 0;p++)h=`${g}_${p}`;return h}static empty(c){return c.children.size===0}}e.TreeElement=r;class u extends r{constructor(c,a,g){super(),this.id=c,this.parent=a,this.symbol=g,this.children=new Map}}e.OutlineElement=u;class f extends r{constructor(c,a,g,h){super(),this.id=c,this.parent=a,this.label=g,this.order=h,this.children=new Map}}e.OutlineGroup=f;class d extends r{static create(c,a,g){const h=new I.CancellationTokenSource(g),p=new d(a.uri),b=c.ordered(a),w=b.map((k,M)=>{var R;const B=r.findId(`provider_${M}`,p),T=new f(B,p,(R=k.displayName)!==null&&R!==void 0?R:"Unknown Outline Provider",M);return Promise.resolve(k.provideDocumentSymbols(a,h.token)).then(N=>{for(const A of N||[])d._makeOutlineElement(A,T);return T},N=>((0,y.onUnexpectedExternalError)(N),T)).then(N=>{r.empty(N)?N.remove():p._groups.set(B,N)})}),E=c.onDidChange(()=>{const k=c.ordered(a);(0,L.equals)(k,b)||h.cancel()});return Promise.all(w).then(()=>h.token.isCancellationRequested&&!g.isCancellationRequested?d.create(c,a,g):p._compact()).finally(()=>{h.dispose(),E.dispose(),h.dispose()})}static _makeOutlineElement(c,a){const g=r.findId(c,a),h=new u(g,a,c);if(c.children)for(const p of c.children)d._makeOutlineElement(p,h);a.children.set(h.id,h)}constructor(c){super(),this.uri=c,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}_compact(){let c=0;for(const[a,g]of this._groups)g.children.size===0?this._groups.delete(a):c+=1;if(c!==1)this.children=this._groups;else{const a=D.Iterable.first(this._groups.values());for(const[,g]of a.children)g.parent=this,this.children.set(g.id,g)}return this}getTopLevelSymbols(){const c=[];for(const a of this.children.values())a instanceof u?c.push(a.symbol):c.push(...D.Iterable.map(a.children.values(),g=>g.symbol));return c.sort((a,g)=>_.Range.compareRangesUsingStarts(a.range,g.range))}asListOfDocumentSymbols(){const c=this.getTopLevelSymbols(),a=[];return d._flattenDocumentSymbols(a,c,""),a.sort((g,h)=>m.Position.compare(_.Range.getStartPosition(g.range),_.Range.getStartPosition(h.range))||m.Position.compare(_.Range.getEndPosition(h.range),_.Range.getEndPosition(g.range)))}static _flattenDocumentSymbols(c,a,g){for(const h of a)c.push({kind:h.kind,tags:h.tags,name:h.name,detail:h.detail,containerName:h.containerName||g,range:h.range,selectionRange:h.selectionRange,children:void 0}),h.children&&d._flattenDocumentSymbols(c,h.children,h.name)}}e.OutlineModel=d,e.IOutlineModelService=(0,C.createDecorator)("IOutlineModelService");let l=class{constructor(c,a,g){this._languageFeaturesService=c,this._disposables=new n.DisposableStore,this._cache=new S.LRUCache(10,.7),this._debounceInformation=a.for(c.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(g.onModelRemoved(h=>{this._cache.delete(h.id)}))}dispose(){this._disposables.dispose()}getOrCreate(c,a){return be(this,void 0,void 0,function*(){const g=this._languageFeaturesService.documentSymbolProvider,h=g.ordered(c);let p=this._cache.get(c.id);if(!p||p.versionId!==c.getVersionId()||!(0,L.equals)(p.provider,h)){const w=new I.CancellationTokenSource;p={versionId:c.getVersionId(),provider:h,promiseCnt:0,source:w,promise:d.create(g,c,w.token),model:void 0},this._cache.set(c.id,p);const E=Date.now();p.promise.then(k=>{p.model=k,this._debounceInformation.update(c,Date.now()-E)}).catch(k=>{this._cache.delete(c.id)})}if(p.model)return p.model;p.promiseCnt+=1;const b=a.onCancellationRequested(()=>{--p.promiseCnt===0&&(p.source.cancel(),this._cache.delete(c.id))});try{return yield p.promise}finally{b.dispose()}})}};e.OutlineModelService=l,e.OutlineModelService=l=Ie([ge(0,t.ILanguageFeaturesService),ge(1,v.ILanguageFeatureDebounceService),ge(2,i.IModelService)],l),(0,s.registerSingleton)(e.IOutlineModelService,l,1)}),define(te[770],ie([1,0,19,20,21,65,187,25]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),m.CommandsRegistry.registerCommand("_executeDocumentSymbolProvider",function(_,...v){return be(this,void 0,void 0,function*(){const[C]=v;(0,I.assertType)(y.URI.isUri(C));const s=_.get(S.IOutlineModelService),n=yield _.get(D.ITextModelService).createModelReference(C);try{return(yield s.getOrCreate(n.object.textEditorModel,L.CancellationToken.None)).getTopLevelSymbols()}finally{n.dispose()}})})}),define(te[771],ie([1,0,7,79,44,61,6,2,55,477]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Link=void 0;let v=class extends m.Disposable{get enabled(){return this._enabled}set enabled(s){s?(this.el.setAttribute("aria-disabled","false"),this.el.tabIndex=0,this.el.style.pointerEvents="auto",this.el.style.opacity="1",this.el.style.cursor="pointer",this._enabled=!1):(this.el.setAttribute("aria-disabled","true"),this.el.tabIndex=-1,this.el.style.pointerEvents="none",this.el.style.opacity="0.4",this.el.style.cursor="default",this._enabled=!0),this._enabled=s}constructor(s,i,n={},t){var r;super(),this._link=i,this._enabled=!0,this.el=(0,L.append)(s,(0,L.$)("a.monaco-link",{tabIndex:(r=i.tabIndex)!==null&&r!==void 0?r:0,href:i.href,title:i.title},i.label)),this.el.setAttribute("role","button");const u=this._register(new I.DomEmitter(this.el,"click")),f=this._register(new I.DomEmitter(this.el,"keypress")),d=S.Event.chain(f.event,c=>c.map(a=>new y.StandardKeyboardEvent(a)).filter(a=>a.keyCode===3)),l=this._register(new I.DomEmitter(this.el,D.EventType.Tap)).event;this._register(D.Gesture.addTarget(this.el));const o=S.Event.any(u.event,d,l);this._register(o(c=>{this.enabled&&(L.EventHelper.stop(c,!0),n?.opener?n.opener(this._link.href):t.open(this._link.href,{allowCommands:!0}))})),this.enabled=!0}};e.Link=v,e.Link=v=Ie([ge(3,_.IOpenerService)],v)}),define(te[85],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IEditorProgressService=e.Progress=e.emptyProgressRunner=e.IProgressService=void 0,e.IProgressService=(0,L.createDecorator)("progressService"),e.emptyProgressRunner=Object.freeze({total(){},worked(){},done(){}});class I{constructor(D,S){this.callback=D,this.report=S?.async?this._reportAsync.bind(this):this._reportSync.bind(this)}_reportSync(D){this._value=D,this.callback(this._value)}_reportAsync(D){Promise.resolve(this._lastTask).finally(()=>{this._value=D;const S=this.callback(this._value);this._lastTask=Promise.resolve(S).finally(()=>this._lastTask=void 0)})}}e.Progress=I,I.None=Object.freeze({report(){}}),e.IEditorProgressService=(0,L.createDecorator)("editorProgressService")}),define(te[772],ie([1,0,14,19,2,20]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PickerQuickAccessProvider=e.TriggerAction=void 0;var S;(function(C){C[C.NO_ACTION=0]="NO_ACTION",C[C.CLOSE_PICKER=1]="CLOSE_PICKER",C[C.REFRESH_PICKER=2]="REFRESH_PICKER",C[C.REMOVE_ITEM=3]="REMOVE_ITEM"})(S||(e.TriggerAction=S={}));function m(C){const s=C;return Array.isArray(s.items)}function _(C){const s=C;return!!s.picks&&s.additionalPicks instanceof Promise}class v extends y.Disposable{constructor(s,i){super(),this.prefix=s,this.options=i}provide(s,i,n){var t;const r=new y.DisposableStore;s.canAcceptInBackground=!!(!((t=this.options)===null||t===void 0)&&t.canAcceptInBackground),s.matchOnLabel=s.matchOnDescription=s.matchOnDetail=s.sortByLabel=!1;let u;const f=r.add(new y.MutableDisposable),d=()=>be(this,void 0,void 0,function*(){const l=f.value=new y.DisposableStore;u?.dispose(!0),s.busy=!1,u=new I.CancellationTokenSource(i);const o=u.token,c=s.value.substr(this.prefix.length).trim(),a=this._getPicks(c,l,o,n),g=(p,b)=>{var w;let E,k;if(m(p)?(E=p.items,k=p.active):E=p,E.length===0){if(b)return!1;(c.length>0||s.hideInput)&&(!((w=this.options)===null||w===void 0)&&w.noResultsPick)&&((0,D.isFunction)(this.options.noResultsPick)?E=[this.options.noResultsPick(c)]:E=[this.options.noResultsPick])}return s.items=E,k&&(s.activeItems=[k]),!0},h=p=>be(this,void 0,void 0,function*(){let b=!1,w=!1;yield Promise.all([(()=>be(this,void 0,void 0,function*(){typeof p.mergeDelay=="number"&&(yield(0,L.timeout)(p.mergeDelay),o.isCancellationRequested)||w||(b=g(p.picks,!0))}))(),(()=>be(this,void 0,void 0,function*(){s.busy=!0;try{const E=yield p.additionalPicks;if(o.isCancellationRequested)return;let k,M;m(p.picks)?(k=p.picks.items,M=p.picks.active):k=p.picks;let R,B;if(m(E)?(R=E.items,B=E.active):R=E,R.length>0||!b){let T;if(!M&&!B){const N=s.activeItems[0];N&&k.indexOf(N)!==-1&&(T=N)}g({items:[...k,...R],active:M||B||T})}}finally{o.isCancellationRequested||(s.busy=!1),w=!0}}))()])});if(a!==null)if(_(a))yield h(a);else if(!(a instanceof Promise))g(a);else{s.busy=!0;try{const p=yield a;if(o.isCancellationRequested)return;_(p)?yield h(p):g(p)}finally{o.isCancellationRequested||(s.busy=!1)}}});return r.add(s.onDidChangeValue(()=>d())),d(),r.add(s.onDidAccept(l=>{const[o]=s.selectedItems;typeof o?.accept=="function"&&(l.inBackground||s.hide(),o.accept(s.keyMods,l))})),r.add(s.onDidTriggerItemButton(({button:l,item:o})=>be(this,void 0,void 0,function*(){var c,a;if(typeof o.trigger=="function"){const g=(a=(c=o.buttons)===null||c===void 0?void 0:c.indexOf(l))!==null&&a!==void 0?a:-1;if(g>=0){const h=o.trigger(g,s.keyMods),p=typeof h=="number"?h:yield h;if(i.isCancellationRequested)return;switch(p){case S.NO_ACTION:break;case S.CLOSE_PICKER:s.hide();break;case S.REFRESH_PICKER:d();break;case S.REMOVE_ITEM:{const b=s.items.indexOf(o);if(b!==-1){const w=s.items.slice(),E=w.splice(b,1),k=s.activeItems.filter(R=>R!==E[0]),M=s.keepScrollPosition;s.keepScrollPosition=!0,s.items=w,k&&(s.activeItems=k),s.keepScrollPosition=M}break}}}}}))),r}}e.PickerQuickAccessProvider=v}),define(te[773],ie([1,0,7,44,60,228,2,98,172]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputBox=void 0;const _=L.$;class v extends S.Disposable{constructor(s,i,n){super(),this.parent=s,this.onKeyDown=r=>L.addDisposableListener(this.findInput.inputBox.inputElement,L.EventType.KEY_DOWN,u=>{r(new I.StandardKeyboardEvent(u))}),this.onMouseDown=r=>L.addDisposableListener(this.findInput.inputBox.inputElement,L.EventType.MOUSE_DOWN,u=>{r(new y.StandardMouseEvent(u))}),this.onDidChange=r=>this.findInput.onDidChange(r),this.container=L.append(this.parent,_(".quick-input-box")),this.findInput=this._register(new D.FindInput(this.container,void 0,{label:"",inputBoxStyles:i,toggleStyles:n}));const t=this.findInput.inputBox.inputElement;t.role="combobox",t.ariaHasPopup="menu",t.ariaAutoComplete="list",t.ariaExpanded="true"}get value(){return this.findInput.getValue()}set value(s){this.findInput.setValue(s)}select(s=null){this.findInput.inputBox.select(s)}isSelectionAtEnd(){return this.findInput.inputBox.isSelectionAtEnd()}get placeholder(){return this.findInput.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(s){this.findInput.inputBox.setPlaceHolder(s)}get password(){return this.findInput.inputBox.inputElement.type==="password"}set password(s){this.findInput.inputBox.inputElement.type=s?"password":"text"}set enabled(s){this.findInput.inputBox.inputElement.toggleAttribute("readonly",!s)}set toggles(s){this.findInput.setAdditionalToggles(s)}setAttribute(s,i){this.findInput.inputBox.inputElement.setAttribute(s,i)}showDecoration(s){s===m.default.Ignore?this.findInput.clearMessage():this.findInput.showMessage({type:s===m.default.Info?1:s===m.default.Warning?2:3,content:""})}stylesForType(s){return this.findInput.inputBox.stylesForType(s===m.default.Info?1:s===m.default.Warning?2:3)}setFocus(){this.findInput.focus()}layout(){this.findInput.inputBox.layout()}}e.QuickInputBox=v}),define(te[343],ie([1,0,7,79,6,44,61,128,163,389,736,172]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderQuickInputDescription=e.getIconClass=void 0;const s={},i=new _.IdGenerator("quick-input-button-icon-");function n(r){if(!r)return;let u;const f=r.dark.toString();return s[f]?u=s[f]:(u=i.nextId(),L.createCSSRule(`.${u}, .hc-light .${u}`,`background-image: ${L.asCSSUrl(r.light||r.dark)}`),L.createCSSRule(`.vs-dark .${u}, .hc-black .${u}`,`background-image: ${L.asCSSUrl(r.dark)}`),s[f]=u),u}e.getIconClass=n;function t(r,u,f){L.reset(u);const d=(0,v.parseLinkedText)(r);let l=0;for(const o of d.nodes)if(typeof o=="string")u.append(...(0,m.renderLabelWithIcons)(o));else{let c=o.title;!c&&o.href.startsWith("command:")?c=(0,C.localize)(0,null,o.href.substring(8)):c||(c=o.href);const a=L.$("a",{href:o.href,title:c,tabIndex:l++},o.label);a.style.textDecoration="underline";const g=E=>{L.isEventLike(E)&&L.EventHelper.stop(E,!0),f.callback(o.href)},h=f.disposables.add(new I.DomEmitter(a,L.EventType.CLICK)).event,p=f.disposables.add(new I.DomEmitter(a,L.EventType.KEY_DOWN)).event,b=y.Event.chain(p,E=>E.filter(k=>{const M=new D.StandardKeyboardEvent(k);return M.equals(10)||M.equals(3)}));f.disposables.add(S.Gesture.addTarget(a));const w=f.disposables.add(new I.DomEmitter(a,S.EventType.Tap)).event;y.Event.any(h,w,b)(g,null,f.disposables),u.appendChild(a)}}e.renderQuickInputDescription=t}),define(te[67],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IQuickInputService=e.quickPickItemScorerAccessor=e.QuickPickItemScorerAccessor=e.ItemActivation=e.QuickInputHideReason=e.NO_KEY_MODS=void 0,e.NO_KEY_MODS={ctrlCmd:!1,alt:!1};var I;(function(S){S[S.Blur=1]="Blur",S[S.Gesture=2]="Gesture",S[S.Other=3]="Other"})(I||(e.QuickInputHideReason=I={}));var y;(function(S){S[S.NONE=0]="NONE",S[S.FIRST=1]="FIRST",S[S.SECOND=2]="SECOND",S[S.LAST=3]="LAST"})(y||(e.ItemActivation=y={}));class D{constructor(m){this.options=m}}e.QuickPickItemScorerAccessor=D,e.quickPickItemScorerAccessor=new D,e.IQuickInputService=(0,L.createDecorator)("quickInputService")}),define(te[35],ie([1,0,96,20]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Registry=void 0;class y{constructor(){this.data=new Map}add(S,m){L.ok(I.isString(S)),L.ok(I.isObject(m)),L.ok(!this.data.has(S),"There is already an extension with this id"),this.data.set(S,m)}as(S){return this.data.get(S)||null}}e.Registry=new y}),define(te[344],ie([1,0,35]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LocalSelectionTransfer=e.Extensions=e.CodeDataTransfers=void 0,e.CodeDataTransfers={EDITORS:"CodeEditors",FILES:"CodeFiles"};class I{}e.Extensions={DragAndDropContribution:"workbench.contributions.dragAndDrop"},L.Registry.add(e.Extensions.DragAndDropContribution,new I);class y{constructor(){}static getInstance(){return y.INSTANCE}hasData(S){return S&&S===this.proto}getData(S){if(this.hasData(S))return this.data}}e.LocalSelectionTransfer=y,y.INSTANCE=new y}),define(te[345],ie([1,0,196,170,107,21,344]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toExternalVSDataTransfer=e.toVSDataTransfer=void 0;function m(s){const i=new I.VSDataTransfer;for(const n of s.items){const t=n.type;if(n.kind==="string"){const r=new Promise(u=>n.getAsString(u));i.append(t,(0,I.createStringDataTransferItem)(r))}else if(n.kind==="file"){const r=n.getAsFile();r&&i.append(t,_(r))}}return i}e.toVSDataTransfer=m;function _(s){const i=s.path?D.URI.parse(s.path):void 0;return(0,I.createFileDataTransferItem)(s.name,i,()=>be(this,void 0,void 0,function*(){return new Uint8Array(yield s.arrayBuffer())}))}const v=Object.freeze([S.CodeDataTransfers.EDITORS,S.CodeDataTransfers.FILES,L.DataTransfers.RESOURCES,L.DataTransfers.INTERNAL_URI_LIST]);function C(s,i=!1){const n=m(s),t=n.get(L.DataTransfers.INTERNAL_URI_LIST);if(t)n.replace(y.Mimes.uriList,t);else if(i||!n.has(y.Mimes.uriList)){const r=[];for(const u of s.items){const f=u.getAsFile();if(f){const d=f.path;try{d?r.push(D.URI.file(d).toString()):r.push(D.URI.parse(f.name,!0).toString())}catch{}}}r.length&&n.replace(y.Mimes.uriList,(0,I.createStringDataTransferItem)(I.UriList.create(r)))}for(const r of v)n.delete(r);return n}e.toExternalVSDataTransfer=C}),define(te[239],ie([1,0,6,35]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=void 0,e.Extensions={JSONContribution:"base.contributions.json"};function y(m){return m.length>0&&m.charAt(m.length-1)==="#"?m.substring(0,m.length-1):m}class D{constructor(){this._onDidChangeSchema=new L.Emitter,this.schemasById={}}registerSchema(_,v){this.schemasById[y(_)]=v,this._onDidChangeSchema.fire(_)}notifySchemaChanged(_){this._onDidChangeSchema.fire(_)}}const S=new D;I.Registry.add(e.Extensions.JSONContribution,S)}),define(te[95],ie([1,0,13,6,20,722,28,239,35]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateProperty=e.getDefaultValue=e.overrideIdentifiersFromKey=e.OVERRIDE_PROPERTY_REGEX=e.OVERRIDE_PROPERTY_PATTERN=e.resourceLanguageSettingsSchemaId=e.resourceSettings=e.windowSettings=e.machineOverridableSettings=e.machineSettings=e.applicationSettings=e.allSettings=e.Extensions=void 0,e.Extensions={Configuration:"base.contributions.configuration"},e.allSettings={properties:{},patternProperties:{}},e.applicationSettings={properties:{},patternProperties:{}},e.machineSettings={properties:{},patternProperties:{}},e.machineOverridableSettings={properties:{},patternProperties:{}},e.windowSettings={properties:{},patternProperties:{}},e.resourceSettings={properties:{},patternProperties:{}},e.resourceLanguageSettingsSchemaId="vscode://schemas/settings/resourceLanguage";const v=_.Registry.as(m.Extensions.JSONContribution);class C{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new I.Emitter,this._onDidUpdateConfiguration=new I.Emitter,this.configurationDefaultsOverrides=new Map,this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:D.localize(0,null),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!0,allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.policyConfigurations=new Map,this.excludedConfigurationProperties={},v.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this.registerOverridePropertyPatternKey()}registerConfiguration(d,l=!0){this.registerConfigurations([d],l)}registerConfigurations(d,l=!0){const o=new Set;this.doRegisterConfigurations(d,l,o),v.registerSchema(e.resourceLanguageSettingsSchemaId,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:o})}registerDefaultConfigurations(d){const l=new Set;this.doRegisterDefaultConfigurations(d,l),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire({properties:l,defaultsOverrides:!0})}doRegisterDefaultConfigurations(d,l){var o;const c=[];for(const{overrides:a,source:g}of d)for(const h in a)if(l.add(h),e.OVERRIDE_PROPERTY_REGEX.test(h)){const p=this.configurationDefaultsOverrides.get(h),b=(o=p?.valuesSources)!==null&&o!==void 0?o:new Map;if(g)for(const M of Object.keys(a[h]))b.set(M,g);const w=Object.assign(Object.assign({},p?.value||{}),a[h]);this.configurationDefaultsOverrides.set(h,{source:g,value:w,valuesSources:b});const E=(0,S.getLanguageTagSettingPlainKey)(h),k={type:"object",default:w,description:D.localize(1,null,E),$ref:e.resourceLanguageSettingsSchemaId,defaultDefaultValue:w,source:y.isString(g)?void 0:g,defaultValueSource:g};c.push(...n(h)),this.configurationProperties[h]=k,this.defaultLanguageConfigurationOverridesNode.properties[h]=k}else{this.configurationDefaultsOverrides.set(h,{value:a[h],source:g});const p=this.configurationProperties[h];p&&(this.updatePropertyDefaultValue(h,p),this.updateSchema(h,p))}this.doRegisterOverrideIdentifiers(c)}registerOverrideIdentifiers(d){this.doRegisterOverrideIdentifiers(d),this._onDidSchemaChange.fire()}doRegisterOverrideIdentifiers(d){for(const l of d)this.overrideIdentifiers.add(l);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(d,l,o){d.forEach(c=>{this.validateAndRegisterProperties(c,l,c.extensionInfo,c.restrictedProperties,void 0,o),this.configurationContributors.push(c),this.registerJSONConfiguration(c)})}validateAndRegisterProperties(d,l=!0,o,c,a=3,g){var h;a=y.isUndefinedOrNull(d.scope)?a:d.scope;const p=d.properties;if(p)for(const w in p){const E=p[w];if(l&&u(w,E)){delete p[w];continue}if(E.source=o,E.defaultDefaultValue=p[w].default,this.updatePropertyDefaultValue(w,E),e.OVERRIDE_PROPERTY_REGEX.test(w)?E.scope=void 0:(E.scope=y.isUndefinedOrNull(E.scope)?a:E.scope,E.restricted=y.isUndefinedOrNull(E.restricted)?!!c?.includes(w):E.restricted),p[w].hasOwnProperty("included")&&!p[w].included){this.excludedConfigurationProperties[w]=p[w],delete p[w];continue}else this.configurationProperties[w]=p[w],!((h=p[w].policy)===null||h===void 0)&&h.name&&this.policyConfigurations.set(p[w].policy.name,w);!p[w].deprecationMessage&&p[w].markdownDeprecationMessage&&(p[w].deprecationMessage=p[w].markdownDeprecationMessage),g.add(w)}const b=d.allOf;if(b)for(const w of b)this.validateAndRegisterProperties(w,l,o,c,a,g)}getConfigurationProperties(){return this.configurationProperties}getPolicyConfigurations(){return this.policyConfigurations}registerJSONConfiguration(d){const l=o=>{const c=o.properties;if(c)for(const g in c)this.updateSchema(g,c[g]);const a=o.allOf;a?.forEach(l)};l(d)}updateSchema(d,l){switch(e.allSettings.properties[d]=l,l.scope){case 1:e.applicationSettings.properties[d]=l;break;case 2:e.machineSettings.properties[d]=l;break;case 6:e.machineOverridableSettings.properties[d]=l;break;case 3:e.windowSettings.properties[d]=l;break;case 4:e.resourceSettings.properties[d]=l;break;case 5:e.resourceSettings.properties[d]=l,this.resourceLanguageSettingsSchema.properties[d]=l;break}}updateOverridePropertyPatternKey(){for(const d of this.overrideIdentifiers.values()){const l=`[${d}]`,o={type:"object",description:D.localize(2,null),errorMessage:D.localize(3,null),$ref:e.resourceLanguageSettingsSchemaId};this.updatePropertyDefaultValue(l,o),e.allSettings.properties[l]=o,e.applicationSettings.properties[l]=o,e.machineSettings.properties[l]=o,e.machineOverridableSettings.properties[l]=o,e.windowSettings.properties[l]=o,e.resourceSettings.properties[l]=o}}registerOverridePropertyPatternKey(){const d={type:"object",description:D.localize(4,null),errorMessage:D.localize(5,null),$ref:e.resourceLanguageSettingsSchemaId};e.allSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=d,e.applicationSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=d,e.machineSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=d,e.machineOverridableSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=d,e.windowSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=d,e.resourceSettings.patternProperties[e.OVERRIDE_PROPERTY_PATTERN]=d,this._onDidSchemaChange.fire()}updatePropertyDefaultValue(d,l){const o=this.configurationDefaultsOverrides.get(d);let c=o?.value,a=o?.source;y.isUndefined(c)&&(c=l.defaultDefaultValue,a=void 0),y.isUndefined(c)&&(c=t(l.type)),l.default=c,l.defaultValueSource=a}}const s="\\[([^\\]]+)\\]",i=new RegExp(s,"g");e.OVERRIDE_PROPERTY_PATTERN=`^(${s})+$`,e.OVERRIDE_PROPERTY_REGEX=new RegExp(e.OVERRIDE_PROPERTY_PATTERN);function n(f){const d=[];if(e.OVERRIDE_PROPERTY_REGEX.test(f)){let l=i.exec(f);for(;l?.length;){const o=l[1].trim();o&&d.push(o),l=i.exec(f)}}return(0,L.distinct)(d)}e.overrideIdentifiersFromKey=n;function t(f){switch(Array.isArray(f)?f[0]:f){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}e.getDefaultValue=t;const r=new C;_.Registry.add(e.Extensions.Configuration,r);function u(f,d){var l,o,c,a;return f.trim()?e.OVERRIDE_PROPERTY_REGEX.test(f)?D.localize(7,null,f):r.getConfigurationProperties()[f]!==void 0?D.localize(8,null,f):!((l=d.policy)===null||l===void 0)&&l.name&&r.getPolicyConfigurations().get((o=d.policy)===null||o===void 0?void 0:o.name)!==void 0?D.localize(9,null,f,(c=d.policy)===null||c===void 0?void 0:c.name,r.getPolicyConfigurations().get((a=d.policy)===null||a===void 0?void 0:a.name)):null:D.localize(6,null)}e.validateProperty=u}),define(te[240],ie([1,0,271,39,173,618,95,35]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDiffEditorConfigurationKey=e.isEditorConfigurationKey=e.editorConfigurationBaseNode=void 0,e.editorConfigurationBaseNode=Object.freeze({id:"editor",order:5,type:"object",title:D.localize(0,null),scope:5});const _=Object.assign(Object.assign({},e.editorConfigurationBaseNode),{properties:{"editor.tabSize":{type:"number",default:y.EDITOR_MODEL_DEFAULTS.tabSize,minimum:1,markdownDescription:D.localize(1,null,"`#editor.detectIndentation#`")},"editor.indentSize":{anyOf:[{type:"string",enum:["tabSize"]},{type:"number",minimum:1}],default:"tabSize",markdownDescription:D.localize(2,null)},"editor.insertSpaces":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.insertSpaces,markdownDescription:D.localize(3,null,"`#editor.detectIndentation#`")},"editor.detectIndentation":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.detectIndentation,markdownDescription:D.localize(4,null,"`#editor.tabSize#`","`#editor.insertSpaces#`")},"editor.trimAutoWhitespace":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,description:D.localize(5,null)},"editor.largeFileOptimizations":{type:"boolean",default:y.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,description:D.localize(6,null)},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:D.localize(7,null)},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[D.localize(8,null),D.localize(9,null),D.localize(10,null)],description:D.localize(11,null)},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[D.localize(12,null),D.localize(13,null),D.localize(14,null)],default:"configuredByTheme",description:D.localize(15,null)},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:D.localize(16,null)},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:D.localize(17,null)},"editor.experimental.asyncTokenization":{type:"boolean",default:!1,description:D.localize(18,null),tags:["experimental"]},"editor.experimental.asyncTokenizationLogging":{type:"boolean",default:!1,description:D.localize(19,null)},"editor.experimental.asyncTokenizationVerification":{type:"boolean",default:!1,description:D.localize(20,null),tags:["experimental"]},"editor.language.brackets":{type:["array","null"],default:null,description:D.localize(21,null),items:{type:"array",items:[{type:"string",description:D.localize(22,null)},{type:"string",description:D.localize(23,null)}]}},"editor.language.colorizedBracketPairs":{type:["array","null"],default:null,description:D.localize(24,null),items:{type:"array",items:[{type:"string",description:D.localize(25,null)},{type:"string",description:D.localize(26,null)}]}},"diffEditor.maxComputationTime":{type:"number",default:L.diffEditorDefaultOptions.maxComputationTime,description:D.localize(27,null)},"diffEditor.maxFileSize":{type:"number",default:L.diffEditorDefaultOptions.maxFileSize,description:D.localize(28,null)},"diffEditor.renderSideBySide":{type:"boolean",default:L.diffEditorDefaultOptions.renderSideBySide,description:D.localize(29,null)},"diffEditor.renderSideBySideInlineBreakpoint":{type:"number",default:L.diffEditorDefaultOptions.renderSideBySideInlineBreakpoint,description:D.localize(30,null)},"diffEditor.useInlineViewWhenSpaceIsLimited":{type:"boolean",default:L.diffEditorDefaultOptions.useInlineViewWhenSpaceIsLimited,description:D.localize(31,null)},"diffEditor.renderMarginRevertIcon":{type:"boolean",default:L.diffEditorDefaultOptions.renderMarginRevertIcon,description:D.localize(32,null)},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:L.diffEditorDefaultOptions.ignoreTrimWhitespace,description:D.localize(33,null)},"diffEditor.renderIndicators":{type:"boolean",default:L.diffEditorDefaultOptions.renderIndicators,description:D.localize(34,null)},"diffEditor.codeLens":{type:"boolean",default:L.diffEditorDefaultOptions.diffCodeLens,description:D.localize(35,null)},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:L.diffEditorDefaultOptions.diffWordWrap,markdownEnumDescriptions:[D.localize(36,null),D.localize(37,null),D.localize(38,null,"`#editor.wordWrap#`")]},"diffEditor.diffAlgorithm":{type:"string",enum:["legacy","advanced"],default:L.diffEditorDefaultOptions.diffAlgorithm,markdownEnumDescriptions:[D.localize(39,null),D.localize(40,null)],tags:["experimental"]},"diffEditor.hideUnchangedRegions.enabled":{type:"boolean",default:L.diffEditorDefaultOptions.hideUnchangedRegions.enabled,markdownDescription:D.localize(41,null)},"diffEditor.hideUnchangedRegions.revealLineCount":{type:"integer",default:L.diffEditorDefaultOptions.hideUnchangedRegions.revealLineCount,markdownDescription:D.localize(42,null),minimum:1},"diffEditor.hideUnchangedRegions.minimumLineCount":{type:"integer",default:L.diffEditorDefaultOptions.hideUnchangedRegions.minimumLineCount,markdownDescription:D.localize(43,null),minimum:1},"diffEditor.hideUnchangedRegions.contextLineCount":{type:"integer",default:L.diffEditorDefaultOptions.hideUnchangedRegions.contextLineCount,markdownDescription:D.localize(44,null),minimum:1},"diffEditor.experimental.showMoves":{type:"boolean",default:L.diffEditorDefaultOptions.experimental.showMoves,markdownDescription:D.localize(45,null)},"diffEditor.experimental.showEmptyDecorations":{type:"boolean",default:L.diffEditorDefaultOptions.experimental.showEmptyDecorations,description:D.localize(46,null)}}});function v(r){return typeof r.type<"u"||typeof r.anyOf<"u"}for(const r of I.editorOptionsRegistry){const u=r.schema;if(typeof u<"u")if(v(u))_.properties[`editor.${r.name}`]=u;else for(const f in u)Object.hasOwnProperty.call(u,f)&&(_.properties[f]=u[f])}let C=null;function s(){return C===null&&(C=Object.create(null),Object.keys(_.properties).forEach(r=>{C[r]=!0})),C}function i(r){return s()[`editor.${r}`]||!1}e.isEditorConfigurationKey=i;function n(r){return s()[`diffEditor.${r}`]||!1}e.isDiffEditorConfigurationKey=n,m.Registry.as(S.Extensions.Configuration).registerConfiguration(_)}),define(te[75],ie([1,0,628,6,35,107,95]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PLAINTEXT_EXTENSION=e.PLAINTEXT_LANGUAGE_ID=e.ModesRegistry=e.EditorModesRegistry=e.Extensions=void 0,e.Extensions={ModesRegistry:"editor.modesRegistry"};class m{constructor(){this._onDidChangeLanguages=new I.Emitter,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(v){return this._languages.push(v),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let C=0,s=this._languages.length;C{const x=O.change.keys.some(U=>P.has(U)),W=O.change.overrides.filter(([U,F])=>F.some(G=>P.has(G))).map(([U])=>U);if(x)this.configurations.clear(),this.onDidChangeEmitter.fire(new l(void 0));else for(const U of W)this.languageService.isRegisteredLanguageId(U)&&(this.configurations.delete(U),this.onDidChangeEmitter.fire(new l(U)))})),this._register(this._registry.onDidChange(O=>{this.configurations.delete(O.languageId),this.onDidChangeEmitter.fire(new l(O.languageId))}))}register(N,A,P){return this._registry.register(N,A,P)}getLanguageConfiguration(N){let A=this.configurations.get(N);return A||(A=c(N,this._registry,this.configurationService,this.languageService),this.configurations.set(N,A)),A}};e.LanguageConfigurationService=o,e.LanguageConfigurationService=o=Ie([ge(0,t.IConfigurationService),ge(1,r.ILanguageService)],o);function c(T,N,A,P){let O=N.getLanguageConfiguration(T);if(!O){if(!P.isRegisteredLanguageId(T))return new B(T,{});O=new B(T,{})}const x=g(O.languageId,A),W=E([O.underlyingConfig,x]);return new B(O.languageId,W)}const a={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function g(T,N){const A=N.getValue(a.brackets,{overrideIdentifier:T}),P=N.getValue(a.colorizedBracketPairs,{overrideIdentifier:T});return{brackets:h(A),colorizedBracketPairs:h(P)}}function h(T){if(Array.isArray(T))return T.map(N=>{if(!(!Array.isArray(N)||N.length!==2))return[N[0],N[1]]}).filter(N=>!!N)}function p(T,N,A){const P=T.getLineContent(N);let O=y.getLeadingWhitespace(P);return O.length>A-1&&(O=O.substring(0,A-1)),O}e.getIndentationAtPosition=p;function b(T,N,A){T.tokenization.forceTokenization(N);const P=T.tokenization.getLineTokens(N),O=typeof A>"u"?T.getLineMaxColumn(N)-1:A-1;return(0,m.createScopedLineTokens)(P,O)}e.getScopedLineTokens=b;class w{constructor(N){this.languageId=N,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(N,A){const P=new k(N,A,++this._order);return this._entries.push(P),this._resolved=null,(0,I.toDisposable)(()=>{for(let O=0;ON.configuration)))}}function E(T){let N={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const A of T)N={comments:A.comments||N.comments,brackets:A.brackets||N.brackets,wordPattern:A.wordPattern||N.wordPattern,indentationRules:A.indentationRules||N.indentationRules,onEnterRules:A.onEnterRules||N.onEnterRules,autoClosingPairs:A.autoClosingPairs||N.autoClosingPairs,surroundingPairs:A.surroundingPairs||N.surroundingPairs,autoCloseBefore:A.autoCloseBefore||N.autoCloseBefore,folding:A.folding||N.folding,colorizedBracketPairs:A.colorizedBracketPairs||N.colorizedBracketPairs,__electricCharacterSupport:A.__electricCharacterSupport||N.__electricCharacterSupport};return N}class k{constructor(N,A,P){this.configuration=N,this.priority=A,this.order=P}static cmp(N,A){return N.priority===A.priority?N.order-A.order:N.priority-A.priority}}class M{constructor(N){this.languageId=N}}e.LanguageConfigurationChangeEvent=M;class R extends I.Disposable{constructor(){super(),this._entries=new Map,this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,this._register(this.register(f.PLAINTEXT_LANGUAGE_ID,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0))}register(N,A,P=0){let O=this._entries.get(N);O||(O=new w(N),this._entries.set(N,O));const x=O.register(A,P);return this._onDidChange.fire(new M(N)),(0,I.toDisposable)(()=>{x.dispose(),this._onDidChange.fire(new M(N))})}getLanguageConfiguration(N){const A=this._entries.get(N);return A?.getResolvedConfiguration()||null}}e.LanguageConfigurationRegistry=R;class B{constructor(N,A){this.languageId=N,this.underlyingConfig=A,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new s.OnEnterSupport(this.underlyingConfig):null,this.comments=B._handleComments(this.underlyingConfig),this.characterPair=new _.CharacterPairSupport(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||D.DEFAULT_WORD_REGEXP,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new C.IndentRulesSupport(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{},this.bracketsNew=new d.LanguageBracketsConfiguration(N,this.underlyingConfig)}getWordDefinition(){return(0,D.ensureValidWordDefinition)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new i.RichEditBrackets(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new v.BracketElectricCharacterSupport(this.brackets)),this._electricCharacter}onEnter(N,A,P,O){return this._onEnterSupport?this._onEnterSupport.onEnter(N,A,P,O):null}getAutoClosingPairs(){return new S.AutoClosingPairs(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(N){return this.characterPair.getAutoCloseBeforeSet(N)}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(N){const A=N.comments;if(!A)return null;const P={};if(A.lineComment&&(P.lineCommentToken=A.lineComment),A.blockComment){const[O,x]=A.blockComment;P.blockCommentStartToken=O,P.blockCommentEndToken=x}return P}}e.ResolvedLanguageConfiguration=B,(0,u.registerSingleton)(e.ILanguageConfigurationService,o,1)}),define(te[241],ie([1,0,14,2,322,590,5,32,627,50,185,13,66,59,9,18,203,108,64]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorWorkerClient=e.EditorWorkerHost=e.EditorWorkerService=void 0;const l=60*1e3,o=5*60*1e3;function c(k,M){const R=k.getModel(M);return!(!R||R.isTooLargeForSyncing())}let a=class extends I.Disposable{constructor(M,R,B,T,N){super(),this._modelService=M,this._workerManager=this._register(new h(this._modelService,T)),this._logService=B,this._register(N.linkProvider.register({language:"*",hasAccessToAllModels:!0},{provideLinks:(A,P)=>c(this._modelService,A.uri)?this._workerManager.withWorker().then(O=>O.computeLinks(A.uri)).then(O=>O&&{links:O}):Promise.resolve({links:[]})})),this._register(N.completionProvider.register("*",new g(this._workerManager,R,this._modelService,T)))}dispose(){super.dispose()}canComputeUnicodeHighlights(M){return c(this._modelService,M)}computedUnicodeHighlights(M,R,B){return this._workerManager.withWorker().then(T=>T.computedUnicodeHighlights(M,R,B))}computeDiff(M,R,B,T){return be(this,void 0,void 0,function*(){const N=yield this._workerManager.withWorker().then(O=>O.computeDiff(M,R,B,T));if(!N)return null;return{identical:N.identical,quitEarly:N.quitEarly,changes:P(N.changes),moves:N.moves.map(O=>new u.MovedText(new f.LineRangeMapping(new d.LineRange(O[0],O[1]),new d.LineRange(O[2],O[3])),P(O[4])))};function P(O){return O.map(x=>{var W;return new f.DetailedLineRangeMapping(new d.LineRange(x[0],x[1]),new d.LineRange(x[2],x[3]),(W=x[4])===null||W===void 0?void 0:W.map(U=>new f.RangeMapping(new S.Range(U[0],U[1],U[2],U[3]),new S.Range(U[4],U[5],U[6],U[7]))))})}})}computeMoreMinimalEdits(M,R,B=!1){if((0,s.isNonEmptyArray)(R)){if(!c(this._modelService,M))return Promise.resolve(R);const T=n.StopWatch.create(),N=this._workerManager.withWorker().then(A=>A.computeMoreMinimalEdits(M,R,B));return N.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",M.toString(!0),T.elapsed())),Promise.race([N,(0,L.timeout)(1e3).then(()=>R)])}else return Promise.resolve(void 0)}canNavigateValueSet(M){return c(this._modelService,M)}navigateValueSet(M,R,B){return this._workerManager.withWorker().then(T=>T.navigateValueSet(M,R,B))}canComputeWordRanges(M){return c(this._modelService,M)}computeWordRanges(M,R){return this._workerManager.withWorker().then(B=>B.computeWordRanges(M,R))}};e.EditorWorkerService=a,e.EditorWorkerService=a=Ie([ge(0,v.IModelService),ge(1,C.ITextResourceConfigurationService),ge(2,i.ILogService),ge(3,m.ILanguageConfigurationService),ge(4,r.ILanguageFeaturesService)],a);class g{constructor(M,R,B,T){this.languageConfigurationService=T,this._debugDisplayName="wordbasedCompletions",this._workerManager=M,this._configurationService=R,this._modelService=B}provideCompletionItems(M,R){return be(this,void 0,void 0,function*(){const B=this._configurationService.getValue(M.uri,R,"editor");if(!B.wordBasedSuggestions)return;const T=[];if(B.wordBasedSuggestionsMode==="currentDocument")c(this._modelService,M.uri)&&T.push(M.uri);else for(const U of this._modelService.getModels())c(this._modelService,U.uri)&&(U===M?T.unshift(U.uri):(B.wordBasedSuggestionsMode==="allDocuments"||U.getLanguageId()===M.getLanguageId())&&T.push(U.uri));if(T.length===0)return;const N=this.languageConfigurationService.getLanguageConfiguration(M.getLanguageId()).getWordDefinition(),A=M.getWordAtPosition(R),P=A?new S.Range(R.lineNumber,A.startColumn,R.lineNumber,A.endColumn):S.Range.fromPositions(R),O=P.setEndPosition(R.lineNumber,R.column),W=yield(yield this._workerManager.withWorker()).textualSuggest(T,A?.word,N);if(W)return{duration:W.duration,suggestions:W.words.map(U=>({kind:18,label:U,insertText:U,range:{insert:O,replace:P}}))}})}}class h extends I.Disposable{constructor(M,R){super(),this.languageConfigurationService=R,this._modelService=M,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new L.IntervalTimer).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(o/2)),this._register(this._modelService.onModelRemoved(T=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>o&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new E(this._modelService,!1,"editorWorkerService",this.languageConfigurationService)),Promise.resolve(this._editorWorkerClient)}}class p extends I.Disposable{constructor(M,R,B){if(super(),this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=M,this._modelService=R,!B){const T=new L.IntervalTimer;T.cancelAndSet(()=>this._checkStopModelSync(),Math.round(l/2)),this._register(T)}}dispose(){for(const M in this._syncedModels)(0,I.dispose)(this._syncedModels[M]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(M,R){for(const B of M){const T=B.toString();this._syncedModels[T]||this._beginModelSync(B,R),this._syncedModels[T]&&(this._syncedModelsLastUsedTime[T]=new Date().getTime())}}_checkStopModelSync(){const M=new Date().getTime(),R=[];for(const B in this._syncedModelsLastUsedTime)M-this._syncedModelsLastUsedTime[B]>l&&R.push(B);for(const B of R)this._stopModelSync(B)}_beginModelSync(M,R){const B=this._modelService.getModel(M);if(!B||!R&&B.isTooLargeForSyncing())return;const T=M.toString();this._proxy.acceptNewModel({url:B.uri.toString(),lines:B.getLinesContent(),EOL:B.getEOL(),versionId:B.getVersionId()});const N=new I.DisposableStore;N.add(B.onDidChangeContent(A=>{this._proxy.acceptModelChanged(T.toString(),A)})),N.add(B.onWillDispose(()=>{this._stopModelSync(T)})),N.add((0,I.toDisposable)(()=>{this._proxy.acceptRemovedModel(T)})),this._syncedModels[T]=N}_stopModelSync(M){const R=this._syncedModels[M];delete this._syncedModels[M],delete this._syncedModelsLastUsedTime[M],(0,I.dispose)(R)}}class b{constructor(M){this._instance=M,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class w{constructor(M){this._workerClient=M}fhr(M,R){return this._workerClient.fhr(M,R)}}e.EditorWorkerHost=w;class E extends I.Disposable{constructor(M,R,B,T){super(),this.languageConfigurationService=T,this._disposed=!1,this._modelService=M,this._keepIdleModels=R,this._workerFactory=new D.DefaultWorkerFactory(B),this._worker=null,this._modelManager=null}fhr(M,R){throw new Error("Not implemented!")}_getOrCreateWorker(){if(!this._worker)try{this._worker=this._register(new y.SimpleWorkerClient(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new w(this)))}catch(M){(0,y.logOnceWebWorkerWarning)(M),this._worker=new b(new _.EditorSimpleWorker(new w(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,M=>((0,y.logOnceWebWorkerWarning)(M),this._worker=new b(new _.EditorSimpleWorker(new w(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(M){return this._modelManager||(this._modelManager=this._register(new p(M,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(M,R=!1){return be(this,void 0,void 0,function*(){return this._disposed?Promise.reject((0,t.canceled)()):this._getProxy().then(B=>(this._getOrCreateModelManager(B).ensureSyncedResources(M,R),B))})}computedUnicodeHighlights(M,R,B){return this._withSyncedResources([M]).then(T=>T.computeUnicodeHighlights(M.toString(),R,B))}computeDiff(M,R,B,T){return this._withSyncedResources([M,R],!0).then(N=>N.computeDiff(M.toString(),R.toString(),B,T))}computeMoreMinimalEdits(M,R,B){return this._withSyncedResources([M]).then(T=>T.computeMoreMinimalEdits(M.toString(),R,B))}computeLinks(M){return this._withSyncedResources([M]).then(R=>R.computeLinks(M.toString()))}computeDefaultDocumentColors(M){return this._withSyncedResources([M]).then(R=>R.computeDefaultDocumentColors(M.toString()))}textualSuggest(M,R,B){return be(this,void 0,void 0,function*(){const T=yield this._withSyncedResources(M),N=B.source,A=B.flags;return T.textualSuggest(M.map(P=>P.toString()),R,N,A)})}computeWordRanges(M,R){return this._withSyncedResources([M]).then(B=>{const T=this._modelService.getModel(M);if(!T)return Promise.resolve(null);const N=this.languageConfigurationService.getLanguageConfiguration(T.getLanguageId()).getWordDefinition(),A=N.source,P=N.flags;return B.computeWordRanges(M.toString(),R,A,P)})}navigateValueSet(M,R,B){return this._withSyncedResources([M]).then(T=>{const N=this._modelService.getModel(M);if(!N)return null;const A=this.languageConfigurationService.getLanguageConfiguration(N.getLanguageId()).getWordDefinition(),P=A.source,O=A.flags;return T.navigateValueSet(M.toString(),R,B,P,O)})}dispose(){super.dispose(),this._disposed=!0}}e.EditorWorkerClient=E}),define(te[774],ie([1,0,52,241]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createWebWorker=void 0;function y(S,m,_){return new D(S,m,_)}e.createWebWorker=y;class D extends I.EditorWorkerClient{constructor(m,_,v){super(m,v.keepIdleModels||!1,v.label,_),this._foreignModuleId=v.moduleId,this._foreignModuleCreateData=v.createData||null,this._foreignModuleHost=v.host||null,this._foreignProxy=null}fhr(m,_){if(!this._foreignModuleHost||typeof this._foreignModuleHost[m]!="function")return Promise.reject(new Error("Missing method "+m+" or missing main thread foreign host."));try{return Promise.resolve(this._foreignModuleHost[m].apply(this._foreignModuleHost,_))}catch(v){return Promise.reject(v)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(m=>{const _=this._foreignModuleHost?(0,L.getAllMethodNames)(this._foreignModuleHost):[];return m.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,_).then(v=>{this._foreignModuleCreateData=null;const C=(n,t)=>m.fmr(n,t),s=(n,t)=>function(){const r=Array.prototype.slice.call(arguments,0);return t(n,r)},i={};for(const n of v)i[n]=s(n,C);return i})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(m){return this._withSyncedResources(m).then(_=>this.getProxy())}}}),define(te[242],ie([1,0,10,109,125,32]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getIndentMetadata=e.getIndentActionForType=e.getIndentForEnter=e.getGoodIndentForLine=e.getInheritIndentForLine=void 0;function S(i,n,t){const r=i.tokenization.getLanguageIdAtPosition(n,0);if(n>1){let u,f=-1;for(u=n-1;u>=1;u--){if(i.tokenization.getLanguageIdAtPosition(u,0)!==r)return f;const d=i.getLineContent(u);if(t.shouldIgnore(d)||/^\s+$/.test(d)||d===""){f=u;continue}return u}}return-1}function m(i,n,t,r=!0,u){if(i<4)return null;const f=u.getLanguageConfiguration(n.tokenization.getLanguageId()).indentRulesSupport;if(!f)return null;if(t<=1)return{indentation:"",action:null};for(let o=t-1;o>0&&n.getLineContent(o)==="";o--)if(o===1)return{indentation:"",action:null};const d=S(n,t,f);if(d<0)return null;if(d<1)return{indentation:"",action:null};const l=n.getLineContent(d);if(f.shouldIncrease(l)||f.shouldIndentNextLine(l))return{indentation:L.getLeadingWhitespace(l),action:I.IndentAction.Indent,line:d};if(f.shouldDecrease(l))return{indentation:L.getLeadingWhitespace(l),action:null,line:d};{if(d===1)return{indentation:L.getLeadingWhitespace(n.getLineContent(d)),action:null,line:d};const o=d-1,c=f.getIndentMetadata(n.getLineContent(o));if(!(c&3)&&c&4){let a=0;for(let g=o-1;g>0;g--)if(!f.shouldIndentNextLine(n.getLineContent(g))){a=g;break}return{indentation:L.getLeadingWhitespace(n.getLineContent(a+1)),action:null,line:a+1}}if(r)return{indentation:L.getLeadingWhitespace(n.getLineContent(d)),action:null,line:d};for(let a=d;a>0;a--){const g=n.getLineContent(a);if(f.shouldIncrease(g))return{indentation:L.getLeadingWhitespace(g),action:I.IndentAction.Indent,line:a};if(f.shouldIndentNextLine(g)){let h=0;for(let p=a-1;p>0;p--)if(!f.shouldIndentNextLine(n.getLineContent(a))){h=p;break}return{indentation:L.getLeadingWhitespace(n.getLineContent(h+1)),action:null,line:h+1}}else if(f.shouldDecrease(g))return{indentation:L.getLeadingWhitespace(g),action:null,line:a}}return{indentation:L.getLeadingWhitespace(n.getLineContent(1)),action:null,line:1}}}e.getInheritIndentForLine=m;function _(i,n,t,r,u,f){if(i<4)return null;const d=f.getLanguageConfiguration(t);if(!d)return null;const l=f.getLanguageConfiguration(t).indentRulesSupport;if(!l)return null;const o=m(i,n,r,void 0,f),c=n.getLineContent(r);if(o){const a=o.line;if(a!==void 0){let g=!0;for(let h=a;h0&&f.getLanguageId(0)!==d.languageId?(o=!0,c=l.substr(0,t.startColumn-1-d.firstCharOffset)):c=f.getLineContent().substring(0,t.startColumn-1);let a;t.isEmpty()?a=l.substr(t.startColumn-1-d.firstCharOffset):a=(0,D.getScopedLineTokens)(n,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-d.firstCharOffset);const g=u.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!g)return null;const h=c,p=L.getLeadingWhitespace(c),b={tokenization:{getLineTokens:M=>n.tokenization.getLineTokens(M),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(M,R)=>n.getLanguageIdAtPosition(M,R)},getLineContent:M=>M===t.startLineNumber?h:n.getLineContent(M)},w=L.getLeadingWhitespace(f.getLineContent()),E=m(i,b,t.startLineNumber+1,void 0,u);if(!E){const M=o?w:p;return{beforeEnter:M,afterEnter:M}}let k=o?w:E.indentation;return E.action===I.IndentAction.Indent&&(k=r.shiftIndent(k)),g.shouldDecrease(a)&&(k=r.unshiftIndent(k)),{beforeEnter:o?w:p,afterEnter:k}}e.getIndentForEnter=v;function C(i,n,t,r,u,f){if(i<4)return null;const d=(0,D.getScopedLineTokens)(n,t.startLineNumber,t.startColumn);if(d.firstCharOffset)return null;const l=f.getLanguageConfiguration(d.languageId).indentRulesSupport;if(!l)return null;const o=d.getLineContent(),c=o.substr(0,t.startColumn-1-d.firstCharOffset);let a;if(t.isEmpty()?a=o.substr(t.startColumn-1-d.firstCharOffset):a=(0,D.getScopedLineTokens)(n,t.endLineNumber,t.endColumn).getLineContent().substr(t.endColumn-1-d.firstCharOffset),!l.shouldDecrease(c+a)&&l.shouldDecrease(c+r+a)){const g=m(i,n,t.startLineNumber,!1,f);if(!g)return null;let h=g.indentation;return g.action!==I.IndentAction.Indent&&(h=u.unshiftIndent(h)),h}return null}e.getIndentActionForType=C;function s(i,n,t){const r=t.getLanguageConfiguration(i.getLanguageId()).indentRulesSupport;return!r||n<1||n>i.getLineCount()?null:r.getIndentMetadata(i.getLineContent(n))}e.getIndentMetadata=s}),define(te[243],ie([1,0,109,32]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnterAction=void 0;function y(D,S,m,_){const v=(0,I.getScopedLineTokens)(S,m.startLineNumber,m.startColumn),C=_.getLanguageConfiguration(v.languageId);if(!C)return null;const s=v.getLineContent(),i=s.substr(0,m.startColumn-1-v.firstCharOffset);let n;m.isEmpty()?n=s.substr(m.startColumn-1-v.firstCharOffset):n=(0,I.getScopedLineTokens)(S,m.endLineNumber,m.endColumn).getLineContent().substr(m.endColumn-1-v.firstCharOffset);let t="";if(m.startLineNumber>1&&v.firstCharOffset===0){const o=(0,I.getScopedLineTokens)(S,m.startLineNumber-1);o.languageId===v.languageId&&(t=o.getLineContent())}const r=C.onEnter(D,t,i,n);if(!r)return null;const u=r.indentAction;let f=r.appendText;const d=r.removeText||0;f?u===L.IndentAction.Indent&&(f=" "+f):u===L.IndentAction.Indent||u===L.IndentAction.IndentOutdent?f=" ":f="";let l=(0,I.getIndentationAtPosition)(S,m.startLineNumber,m.startColumn);return d&&(l=l.substring(0,l.length-d)),{indentAction:u,appendText:f,removeText:d,indentation:l}}e.getEnterAction=y}),define(te[244],ie([1,0,10,80,5,24,243,32]),function($,e,L,I,y,D,S,m){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.ShiftCommand=void 0;const v=Object.create(null);function C(i,n){if(n<=0)return"";v[i]||(v[i]=["",i]);const t=v[i];for(let r=t.length;r<=n;r++)t[r]=t[r-1]+i;return t[n]}let s=_=class{static unshiftIndent(n,t,r,u,f){const d=I.CursorColumns.visibleColumnFromColumn(n,t,r);if(f){const l=C(" ",u),c=I.CursorColumns.prevIndentTabStop(d,u)/u;return C(l,c)}else{const l=" ",c=I.CursorColumns.prevRenderTabStop(d,r)/r;return C(l,c)}}static shiftIndent(n,t,r,u,f){const d=I.CursorColumns.visibleColumnFromColumn(n,t,r);if(f){const l=C(" ",u),c=I.CursorColumns.nextIndentTabStop(d,u)/u;return C(l,c)}else{const l=" ",c=I.CursorColumns.nextRenderTabStop(d,r)/r;return C(l,c)}}constructor(n,t,r){this._languageConfigurationService=r,this._opts=t,this._selection=n,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}_addEditOperation(n,t,r){this._useLastEditRangeForCursorEndPosition?n.addTrackedEditOperation(t,r):n.addEditOperation(t,r)}getEditOperations(n,t){const r=this._selection.startLineNumber;let u=this._selection.endLineNumber;this._selection.endColumn===1&&r!==u&&(u=u-1);const{tabSize:f,indentSize:d,insertSpaces:l}=this._opts,o=r===u;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(n.getLineContent(r))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,a=0;for(let g=r;g<=u;g++,c=a){a=0;const h=n.getLineContent(g);let p=L.firstNonWhitespaceIndex(h);if(this._opts.isUnshift&&(h.length===0||p===0)||!o&&!this._opts.isUnshift&&h.length===0)continue;if(p===-1&&(p=h.length),g>1&&I.CursorColumns.visibleColumnFromColumn(h,p+1,f)%d!==0&&n.tokenization.isCheapToTokenize(g-1)){const E=(0,S.getEnterAction)(this._opts.autoIndent,n,new y.Range(g-1,n.getLineMaxColumn(g-1),g-1,n.getLineMaxColumn(g-1)),this._languageConfigurationService);if(E){if(a=c,E.appendText)for(let k=0,M=E.appendText.length;k1){let M;for(M=b-1;M>=1;M--){const T=p.getLineContent(M);if(I.lastNonWhitespaceIndex(T)>=0)break}if(M<1)return null;const R=p.getLineMaxColumn(M),B=(0,r.getEnterAction)(h.autoIndent,p,new v.Range(M,R,M,R),h.languageConfigurationService);B&&(E=B.indentation+B.appendText)}return w&&(w===s.IndentAction.Indent&&(E=u.shiftIndent(h,E)),w===s.IndentAction.Outdent&&(E=u.unshiftIndent(h,E)),E=h.normalizeIndentation(E)),E||null}static _replaceJumpToNextIndent(h,p,b,w){let E="";const k=b.getStartPosition();if(h.insertSpaces){const M=h.visibleColumnFromColumn(p,k),R=h.indentSize,B=R-M%R;for(let T=0;Tthis._compositionType(b,T,E,k,M,R));return new m.EditOperationResult(4,B,{shouldPushStackElementBefore:o(h,4),shouldPushStackElementAfter:!1})}static _compositionType(h,p,b,w,E,k){if(!p.isEmpty())return null;const M=p.getPosition(),R=Math.max(1,M.column-w),B=Math.min(h.getLineMaxColumn(M.lineNumber),M.column+E),T=new v.Range(M.lineNumber,R,M.lineNumber,B);return h.getValueInRange(T)===b&&k===0?null:new y.ReplaceCommandWithOffsetCursorState(T,b,0,k)}static _typeCommand(h,p,b){return b?new y.ReplaceCommandWithoutChangingPosition(h,p,!0):new y.ReplaceCommand(h,p,!0)}static _enter(h,p,b,w){if(h.autoIndent===0)return u._typeCommand(w,` -`,b);if(!p.tokenization.isCheapToTokenize(w.getStartPosition().lineNumber)||h.autoIndent===1){const R=p.getLineContent(w.startLineNumber),B=I.getLeadingWhitespace(R).substring(0,w.startColumn-1);return u._typeCommand(w,` -`+h.normalizeIndentation(B),b)}const E=(0,r.getEnterAction)(h.autoIndent,p,w,h.languageConfigurationService);if(E){if(E.indentAction===s.IndentAction.None)return u._typeCommand(w,` -`+h.normalizeIndentation(E.indentation+E.appendText),b);if(E.indentAction===s.IndentAction.Indent)return u._typeCommand(w,` -`+h.normalizeIndentation(E.indentation+E.appendText),b);if(E.indentAction===s.IndentAction.IndentOutdent){const R=h.normalizeIndentation(E.indentation),B=h.normalizeIndentation(E.indentation+E.appendText),T=` -`+B+` -`+R;return b?new y.ReplaceCommandWithoutChangingPosition(w,T,!0):new y.ReplaceCommandWithOffsetCursorState(w,T,-1,B.length-R.length,!0)}else if(E.indentAction===s.IndentAction.Outdent){const R=u.unshiftIndent(h,E.indentation);return u._typeCommand(w,` -`+h.normalizeIndentation(R+E.appendText),b)}}const k=p.getLineContent(w.startLineNumber),M=I.getLeadingWhitespace(k).substring(0,w.startColumn-1);if(h.autoIndent>=4){const R=(0,t.getIndentForEnter)(h.autoIndent,p,w,{unshiftIndent:B=>u.unshiftIndent(h,B),shiftIndent:B=>u.shiftIndent(h,B),normalizeIndentation:B=>h.normalizeIndentation(B)},h.languageConfigurationService);if(R){let B=h.visibleColumnFromColumn(p,w.getEndPosition());const T=w.endColumn,N=p.getLineContent(w.endLineNumber),A=I.firstNonWhitespaceIndex(N);if(A>=0?w=w.setEndPosition(w.endLineNumber,Math.max(w.endColumn,A+1)):w=w.setEndPosition(w.endLineNumber,p.getLineMaxColumn(w.endLineNumber)),b)return new y.ReplaceCommandWithoutChangingPosition(w,` -`+h.normalizeIndentation(R.afterEnter),!0);{let P=0;return T<=A+1&&(h.insertSpaces||(B=Math.ceil(B/h.indentSize)),P=Math.min(B+1-h.normalizeIndentation(R.afterEnter).length-1,0)),new y.ReplaceCommandWithOffsetCursorState(w,` -`+h.normalizeIndentation(R.afterEnter),0,P,!0)}}}return u._typeCommand(w,` -`+h.normalizeIndentation(M),b)}static _isAutoIndentType(h,p,b){if(h.autoIndent<4)return!1;for(let w=0,E=b.length;wu.shiftIndent(h,M),unshiftIndent:M=>u.unshiftIndent(h,M)},h.languageConfigurationService);if(k===null)return null;if(k!==h.normalizeIndentation(E)){const M=p.getLineFirstNonWhitespaceColumn(b.startLineNumber);return M===0?u._typeCommand(new v.Range(b.startLineNumber,1,b.endLineNumber,b.endColumn),h.normalizeIndentation(k)+w,!1):u._typeCommand(new v.Range(b.startLineNumber,1,b.endLineNumber,b.endColumn),h.normalizeIndentation(k)+p.getLineContent(b.startLineNumber).substring(M-1,b.startColumn-1)+w,!1)}return null}static _isAutoClosingOvertype(h,p,b,w,E){if(h.autoClosingOvertype==="never"||!h.autoClosingPairs.autoClosingPairsCloseSingleChar.has(E))return!1;for(let k=0,M=b.length;k2?T.charCodeAt(B.column-2):0)===92&&A)return!1;if(h.autoClosingOvertype==="auto"){let O=!1;for(let x=0,W=w.length;xp.startsWith(R.open)),M=E.some(R=>p.startsWith(R.close));return!k&&M}static _findAutoClosingPairOpen(h,p,b,w){const E=h.autoClosingPairs.autoClosingPairsOpenByEnd.get(w);if(!E)return null;let k=null;for(const M of E)if(k===null||M.open.length>k.open.length){let R=!0;for(const B of b)if(p.getValueInRange(new v.Range(B.lineNumber,B.column-M.open.length+1,B.lineNumber,B.column))+w!==M.open){R=!1;break}R&&(k=M)}return k}static _findContainedAutoClosingPair(h,p){if(p.open.length<=1)return null;const b=p.close.charAt(p.close.length-1),w=h.autoClosingPairs.autoClosingPairsCloseByEnd.get(b)||[];let E=null;for(const k of w)k.open!==p.open&&p.open.includes(k.open)&&p.close.endsWith(k.close)&&(!E||k.open.length>E.open.length)&&(E=k);return E}static _getAutoClosingPairClose(h,p,b,w,E){for(const O of b)if(!O.isEmpty())return null;const k=b.map(O=>{const x=O.getPosition();return E?{lineNumber:x.lineNumber,beforeColumn:x.column-w.length,afterColumn:x.column}:{lineNumber:x.lineNumber,beforeColumn:x.column,afterColumn:x.column}}),M=this._findAutoClosingPairOpen(h,p,k.map(O=>new C.Position(O.lineNumber,O.beforeColumn)),w);if(!M)return null;let R,B;if((0,m.isQuote)(w)?(R=h.autoClosingQuotes,B=h.shouldAutoCloseBefore.quote):(h.blockCommentStartToken?M.open.includes(h.blockCommentStartToken):!1)?(R=h.autoClosingComments,B=h.shouldAutoCloseBefore.comment):(R=h.autoClosingBrackets,B=h.shouldAutoCloseBefore.bracket),R==="never")return null;const N=this._findContainedAutoClosingPair(h,M),A=N?N.close:"";let P=!0;for(const O of k){const{lineNumber:x,beforeColumn:W,afterColumn:U}=O,F=p.getLineContent(x),G=F.substring(0,W-1),Y=F.substring(U-1);if(Y.startsWith(A)||(P=!1),Y.length>0){const q=Y.charAt(0);if(!u._isBeforeClosingBrace(h,Y)&&!B(q))return null}if(M.open.length===1&&(w==="'"||w==='"')&&R!=="always"){const q=(0,_.getMapForWordSeparators)(h.wordSeparators);if(G.length>0){const H=G.charCodeAt(G.length-1);if(q.get(H)===0)return null}}if(!p.tokenization.isCheapToTokenize(x))return null;p.tokenization.forceTokenization(x);const ne=p.tokenization.getLineTokens(x),se=(0,n.createScopedLineTokens)(ne,W-1);if(!M.shouldAutoClose(se,W-se.firstCharOffset))return null;const J=M.findNeutralCharacter();if(J){const q=p.tokenization.getTokenTypeIfInsertingCharacter(x,W,J);if(!M.isOK(q))return null}}return P?M.close.substring(0,M.close.length-A.length):M.close}static _runAutoClosingOpenCharType(h,p,b,w,E,k,M){const R=[];for(let B=0,T=w.length;Bnew y.ReplaceCommand(new v.Range(A.positionLineNumber,A.positionColumn,A.positionLineNumber,A.positionColumn+1),"",!1));return new m.EditOperationResult(4,N,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const T=this._getAutoClosingPairClose(p,b,E,R,!0);return T!==null?this._runAutoClosingOpenCharType(h,p,b,E,R,!0,T):null}static typeWithInterceptors(h,p,b,w,E,k,M){if(!h&&M===` -`){const T=[];for(let N=0,A=E.length;N0){const a=this._cursors.getSelections();for(let g=0;gw&&(p=p.slice(0,w),b=!0);const E=u.from(this._model,this);return this._cursors.setStates(p),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(a,g,h,E,b)}setCursorColumnSelectData(a){this._columnSelectData=a}revealPrimary(a,g,h,p,b,w){const E=this._cursors.getViewPositions();let k=null,M=null;E.length>1?M=this._cursors.getViewSelections():k=v.Range.fromPositions(E[0],E[0]),a.emitViewEvent(new i.ViewRevealRangeRequestEvent(g,h,k,M,p,b,w))}saveState(){const a=[],g=this._cursors.getSelections();for(let h=0,p=g.length;h0){const b=D.CursorState.fromModelSelections(h.resultingSelection);this.setStates(a,"modelChange",h.isUndoing?5:h.isRedoing?6:2,b)&&this.revealPrimary(a,"modelChange",!1,0,!0,0)}else{const b=this._cursors.readSelectionFromMarkers();this.setStates(a,"modelChange",2,D.CursorState.fromModelSelections(b))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const a=this._cursors.getPrimaryCursor(),g=a.viewState.selectionStart.getStartPosition(),h=a.viewState.position;return{isReal:!1,fromViewLineNumber:g.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,g),toViewLineNumber:h.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,h)}}getSelections(){return this._cursors.getSelections()}setSelections(a,g,h,p){this.setStates(a,g,p,D.CursorState.fromModelSelections(h))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(a){this._prevEditOperationType=a}_pushAutoClosedAction(a,g){const h=[],p=[];for(let E=0,k=a.length;E0&&this._pushAutoClosedAction(h,p),this._prevEditOperationType=a.type}a.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(a){(!a||a.length===0)&&(a=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(a),this._cursors.normalize()}_emitStateChangedIfNecessary(a,g,h,p,b){const w=u.from(this._model,this);if(w.equals(p))return!1;const E=this._cursors.getSelections(),k=this._cursors.getViewSelections();if(a.emitViewEvent(new i.ViewCursorStateChangedEvent(k,E,h)),!p||p.cursorState.length!==w.cursorState.length||w.cursorState.some((M,R)=>!M.modelState.equals(p.cursorState[R].modelState))){const M=p?p.cursorState.map(B=>B.modelState.selection):null,R=p?p.modelVersionId:0;a.emitOutgoingEvent(new t.CursorStateChangedEvent(M,E,R,w.modelVersionId,g||"keyboard",h,b))}return!0}_findAutoClosingPairs(a){if(!a.length)return null;const g=[];for(let h=0,p=a.length;h=0)return null;const w=b.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!w)return null;const E=w[1],k=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(E);if(!k||k.length!==1)return null;const M=k[0].open,R=b.text.length-w[2].length-1,B=b.text.lastIndexOf(M,R-1);if(B===-1)return null;g.push([B,R])}return g}executeEdits(a,g,h,p){let b=null;g==="snippet"&&(b=this._findAutoClosingPairs(h)),b&&(h[0]._isTracked=!0);const w=[],E=[],k=this._model.pushEditOperations(this.getSelections(),h,M=>{if(b)for(let B=0,T=b.length;B0&&this._pushAutoClosedAction(w,E)}_executeEdit(a,g,h,p=0){if(this.context.cursorConfig.readOnly)return;const b=u.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),a()}catch(w){(0,L.onUnexpectedError)(w)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(g,h,p,b,!1)&&this.revealPrimary(g,h,!1,0,!0,0)}getAutoClosedCharacters(){return f.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(a){this._compositionState=new o(this._model,this.getSelections())}endComposition(a,g){const h=this._compositionState?this._compositionState.deduceOutcome(this._model,this.getSelections()):null;this._compositionState=null,this._executeEdit(()=>{g==="keyboard"&&this._executeEditOperation(_.TypeOperations.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,h,this.getSelections(),this.getAutoClosedCharacters()))},a,g)}type(a,g,h){this._executeEdit(()=>{if(h==="keyboard"){const p=g.length;let b=0;for(;b{const M=k.getPosition();return new C.Selection(M.lineNumber,M.column+b,M.lineNumber,M.column+b)});this.setSelections(a,w,E,0)}return}this._executeEdit(()=>{this._executeEditOperation(_.TypeOperations.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),g,h,p,b))},a,w)}paste(a,g,h,p,b){this._executeEdit(()=>{this._executeEditOperation(_.TypeOperations.paste(this.context.cursorConfig,this._model,this.getSelections(),g,h,p||[]))},a,b,4)}cut(a,g){this._executeEdit(()=>{this._executeEditOperation(m.DeleteOperations.cut(this.context.cursorConfig,this._model,this.getSelections()))},a,g)}executeCommand(a,g,h){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new D.EditOperationResult(0,[g],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},a,h)}executeCommands(a,g,h){this._executeEdit(()=>{this._executeEditOperation(new D.EditOperationResult(0,g,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},a,h)}}e.CursorsController=r;class u{static from(a,g){return new u(a.getVersionId(),g.getCursorStates())}constructor(a,g){this.modelVersionId=a,this.cursorState=g}equals(a){if(!a||this.modelVersionId!==a.modelVersionId||this.cursorState.length!==a.cursorState.length)return!1;for(let g=0,h=this.cursorState.length;g=g.length||!g[h].strictContainsRange(a[h]))return!1;return!0}}class d{static executeCommands(a,g,h){const p={model:a,selectionsBefore:g,trackedRanges:[],trackedRangesDirection:[]},b=this._innerExecuteCommands(p,h);for(let w=0,E=p.trackedRanges.length;w0&&(w[0]._isTracked=!0);let E=a.model.pushEditOperations(a.selectionsBefore,w,M=>{const R=[];for(let N=0;NN.identifier.minor-A.identifier.minor,T=[];for(let N=0;N0?(R[N].sort(B),T[N]=g[N].computeCursorState(a.model,{getInverseEditOperations:()=>R[N],getTrackedSelection:A=>{const P=parseInt(A,10),O=a.model._getTrackedRange(a.trackedRanges[P]);return a.trackedRangesDirection[P]===0?new C.Selection(O.startLineNumber,O.startColumn,O.endLineNumber,O.endColumn):new C.Selection(O.endLineNumber,O.endColumn,O.startLineNumber,O.startColumn)}})):T[N]=a.selectionsBefore[N];return T});E||(E=a.selectionsBefore);const k=[];for(const M in b)b.hasOwnProperty(M)&&k.push(parseInt(M,10));k.sort((M,R)=>R-M);for(const M of k)E.splice(M,1);return E}static _arrayIsEmpty(a){for(let g=0,h=a.length;g{v.Range.isEmpty(B)&&T===""||p.push({identifier:{major:g,minor:b++},range:B,text:T,forceMoveMarkers:N,isAutoWhitespaceEdit:h.insertsAutoWhitespace})};let E=!1;const R={addEditOperation:w,addTrackedEditOperation:(B,T,N)=>{E=!0,w(B,T,N)},trackSelection:(B,T)=>{const N=C.Selection.liftSelection(B);let A;if(N.isEmpty())if(typeof T=="boolean")T?A=2:A=3;else{const x=a.model.getLineMaxColumn(N.startLineNumber);N.startColumn===x?A=2:A=3}else A=1;const P=a.trackedRanges.length,O=a.model._setTrackedRange(null,N,A);return a.trackedRanges[P]=O,a.trackedRangesDirection[P]=N.getDirection(),P.toString()}};try{h.getEditOperations(a.model,R)}catch(B){return(0,L.onUnexpectedError)(B),{operations:[],hadTrackedEditOperation:!1}}return{operations:p,hadTrackedEditOperation:E}}static _getLoserCursorMap(a){a=a.slice(0),a.sort((h,p)=>-v.Range.compareRangesUsingEnds(h.range,p.range));const g={};for(let h=1;hb.identifier.major?w=p.identifier.major:w=b.identifier.major,g[w.toString()]=!0;for(let E=0;E0&&h--}}return g}}class l{constructor(a,g,h){this.text=a,this.startSelection=g,this.endSelection=h}}class o{static _capture(a,g){const h=[];for(const p of g){if(p.startLineNumber!==p.endLineNumber)return null;h.push(new l(a.getLineContent(p.startLineNumber),p.startColumn-1,p.endColumn-1))}return h}constructor(a,g){this._original=o._capture(a,g)}deduceOutcome(a,g){if(!this._original)return null;const h=o._capture(a,g);if(!h||this._original.length!==h.length)return null;const p=[];for(let b=0,w=this._original.length;b{h.mime===g.mime||h.userConfigured||(g.extension&&h.extension===g.extension&&console.warn(`Overwriting extension <<${g.extension}>> to now point to mime <<${g.mime}>>`),g.filename&&h.filename===g.filename&&console.warn(`Overwriting filename <<${g.filename}>> to now point to mime <<${g.mime}>>`),g.filepattern&&h.filepattern===g.filepattern&&console.warn(`Overwriting filepattern <<${g.filepattern}>> to now point to mime <<${g.mime}>>`),g.firstline&&h.firstline===g.firstline&&console.warn(`Overwriting firstline <<${g.firstline}>> to now point to mime <<${g.mime}>>`))})}function t(o,c){return{id:o.id,mime:o.mime,filename:o.filename,extension:o.extension,filepattern:o.filepattern,firstline:o.firstline,userConfigured:c,filenameLowercase:o.filename?o.filename.toLowerCase():void 0,extensionLowercase:o.extension?o.extension.toLowerCase():void 0,filepatternLowercase:o.filepattern?(0,L.parse)(o.filepattern.toLowerCase()):void 0,filepatternOnPath:o.filepattern?o.filepattern.indexOf(D.posix.sep)>=0:!1}}function r(){v=v.filter(o=>o.userConfigured),C=[]}e.clearPlatformLanguageAssociations=r;function u(o,c){return f(o,c).map(a=>a.id)}e.getLanguageIds=u;function f(o,c){let a;if(o)switch(o.scheme){case y.Schemas.file:a=o.fsPath;break;case y.Schemas.data:{a=S.DataUri.parseMetaData(o).get(S.DataUri.META_DATA_LABEL);break}case y.Schemas.vscodeNotebookCell:a=void 0;break;default:a=o.path}if(!a)return[{id:"unknown",mime:I.Mimes.unknown}];a=a.toLowerCase();const g=(0,D.basename)(a),h=d(a,g,s);if(h)return[h,{id:_.PLAINTEXT_LANGUAGE_ID,mime:I.Mimes.text}];const p=d(a,g,C);if(p)return[p,{id:_.PLAINTEXT_LANGUAGE_ID,mime:I.Mimes.text}];if(c){const b=l(c);if(b)return[b,{id:_.PLAINTEXT_LANGUAGE_ID,mime:I.Mimes.text}]}return[{id:"unknown",mime:I.Mimes.unknown}]}function d(o,c,a){var g;let h,p,b;for(let w=a.length-1;w>=0;w--){const E=a[w];if(c===E.filenameLowercase){h=E;break}if(E.filepattern&&(!p||E.filepattern.length>p.filepattern.length)){const k=E.filepatternOnPath?o:c;!((g=E.filepatternLowercase)===null||g===void 0)&&g.call(E,k)&&(p=E)}E.extension&&(!b||E.extension.length>b.extension.length)&&c.endsWith(E.extensionLowercase)&&(b=E)}if(h)return h;if(p)return p;if(b)return b}function l(o){if((0,m.startsWithUTF8BOM)(o)&&(o=o.substr(1)),o.length>0)for(let c=v.length-1;c>=0;c--){const a=v[c];if(!a.firstline)continue;const g=o.match(a.firstline);if(g&&g.length>0)return a}}}),define(te[778],ie([1,0,6,2,10,777,75,95,35]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguagesRegistry=e.LanguageIdCodec=void 0;const v=Object.prototype.hasOwnProperty,C="vs.editor.nullLanguage";class s{constructor(){this._languageIdToLanguage=[],this._languageToLanguageId=new Map,this._register(C,0),this._register(S.PLAINTEXT_LANGUAGE_ID,1),this._nextLanguageId=2}_register(t,r){this._languageIdToLanguage[r]=t,this._languageToLanguageId.set(t,r)}register(t){if(this._languageToLanguageId.has(t))return;const r=this._nextLanguageId++;this._register(t,r)}encodeLanguageId(t){return this._languageToLanguageId.get(t)||0}decodeLanguageId(t){return this._languageIdToLanguage[t]||C}}e.LanguageIdCodec=s;class i extends I.Disposable{constructor(t=!0,r=!1){super(),this._onDidChange=this._register(new L.Emitter),this.onDidChange=this._onDidChange.event,i.instanceCount++,this._warnOnOverwrite=r,this.languageIdCodec=new s,this._dynamicLanguages=[],this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},t&&(this._initializeFromRegistry(),this._register(S.ModesRegistry.onDidChangeLanguages(u=>{this._initializeFromRegistry()})))}dispose(){i.instanceCount--,super.dispose()}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},(0,D.clearPlatformLanguageAssociations)();const t=[].concat(S.ModesRegistry.getLanguages()).concat(this._dynamicLanguages);this._registerLanguages(t)}_registerLanguages(t){for(const r of t)this._registerLanguage(r);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(r=>{const u=this._languages[r];u.name&&(this._nameMap[u.name]=u.identifier),u.aliases.forEach(f=>{this._lowercaseNameMap[f.toLowerCase()]=u.identifier}),u.mimetypes.forEach(f=>{this._mimeTypesMap[f]=u.identifier})}),_.Registry.as(m.Extensions.Configuration).registerOverrideIdentifiers(this.getRegisteredLanguageIds()),this._onDidChange.fire()}_registerLanguage(t){const r=t.id;let u;v.call(this._languages,r)?u=this._languages[r]:(this.languageIdCodec.register(r),u={identifier:r,name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[],icons:[]},this._languages[r]=u),this._mergeLanguage(u,t)}_mergeLanguage(t,r){const u=r.id;let f=null;if(Array.isArray(r.mimetypes)&&r.mimetypes.length>0&&(t.mimetypes.push(...r.mimetypes),f=r.mimetypes[0]),f||(f=`text/x-${u}`,t.mimetypes.push(f)),Array.isArray(r.extensions)){r.configuration?t.extensions=r.extensions.concat(t.extensions):t.extensions=t.extensions.concat(r.extensions);for(const o of r.extensions)(0,D.registerPlatformLanguageAssociation)({id:u,mime:f,extension:o},this._warnOnOverwrite)}if(Array.isArray(r.filenames))for(const o of r.filenames)(0,D.registerPlatformLanguageAssociation)({id:u,mime:f,filename:o},this._warnOnOverwrite),t.filenames.push(o);if(Array.isArray(r.filenamePatterns))for(const o of r.filenamePatterns)(0,D.registerPlatformLanguageAssociation)({id:u,mime:f,filepattern:o},this._warnOnOverwrite);if(typeof r.firstLine=="string"&&r.firstLine.length>0){let o=r.firstLine;o.charAt(0)!=="^"&&(o="^"+o);try{const c=new RegExp(o);(0,y.regExpLeadsToEndlessLoop)(c)||(0,D.registerPlatformLanguageAssociation)({id:u,mime:f,firstline:c},this._warnOnOverwrite)}catch(c){console.warn(`[${r.id}]: Invalid regular expression \`${o}\`: `,c)}}t.aliases.push(u);let d=null;if(typeof r.aliases<"u"&&Array.isArray(r.aliases)&&(r.aliases.length===0?d=[null]:d=r.aliases),d!==null)for(const o of d)!o||o.length===0||t.aliases.push(o);const l=d!==null&&d.length>0;if(!(l&&d[0]===null)){const o=(l?d[0]:null)||u;(l||!t.name)&&(t.name=o)}r.configuration&&t.configurationFiles.push(r.configuration),r.icon&&t.icons.push(r.icon)}isRegisteredLanguageId(t){return t?v.call(this._languages,t):!1}getRegisteredLanguageIds(){return Object.keys(this._languages)}getLanguageIdByLanguageName(t){const r=t.toLowerCase();return v.call(this._lowercaseNameMap,r)?this._lowercaseNameMap[r]:null}getLanguageIdByMimeType(t){return t&&v.call(this._mimeTypesMap,t)?this._mimeTypesMap[t]:null}guessLanguageIdByFilepathOrFirstLine(t,r){return!t&&!r?[]:(0,D.getLanguageIds)(t,r)}}e.LanguagesRegistry=i,i.instanceCount=0}),define(te[779],ie([1,0,6,2,778,13,29,75]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LanguageService=void 0;class _ extends I.Disposable{constructor(s=!1){super(),this._onDidRequestBasicLanguageFeatures=this._register(new L.Emitter),this.onDidRequestBasicLanguageFeatures=this._onDidRequestBasicLanguageFeatures.event,this._onDidRequestRichLanguageFeatures=this._register(new L.Emitter),this.onDidRequestRichLanguageFeatures=this._onDidRequestRichLanguageFeatures.event,this._onDidChange=this._register(new L.Emitter({leakWarningThreshold:200})),this.onDidChange=this._onDidChange.event,this._requestedBasicLanguages=new Set,this._requestedRichLanguages=new Set,_.instanceCount++,this._registry=this._register(new y.LanguagesRegistry(!0,s)),this.languageIdCodec=this._registry.languageIdCodec,this._register(this._registry.onDidChange(()=>this._onDidChange.fire()))}dispose(){_.instanceCount--,super.dispose()}isRegisteredLanguageId(s){return this._registry.isRegisteredLanguageId(s)}getLanguageIdByLanguageName(s){return this._registry.getLanguageIdByLanguageName(s)}getLanguageIdByMimeType(s){return this._registry.getLanguageIdByMimeType(s)}guessLanguageIdByFilepathOrFirstLine(s,i){const n=this._registry.guessLanguageIdByFilepathOrFirstLine(s,i);return(0,D.firstOrDefault)(n,null)}createById(s){return new v(this.onDidChange,()=>this._createAndGetLanguageIdentifier(s))}createByFilepathOrFirstLine(s,i){return new v(this.onDidChange,()=>{const n=this.guessLanguageIdByFilepathOrFirstLine(s,i);return this._createAndGetLanguageIdentifier(n)})}_createAndGetLanguageIdentifier(s){return(!s||!this.isRegisteredLanguageId(s))&&(s=m.PLAINTEXT_LANGUAGE_ID),s}requestBasicLanguageFeatures(s){this._requestedBasicLanguages.has(s)||(this._requestedBasicLanguages.add(s),this._onDidRequestBasicLanguageFeatures.fire(s))}requestRichLanguageFeatures(s){this._requestedRichLanguages.has(s)||(this._requestedRichLanguages.add(s),this.requestBasicLanguageFeatures(s),S.TokenizationRegistry.getOrCreate(s),this._onDidRequestRichLanguageFeatures.fire(s))}}e.LanguageService=_,_.instanceCount=0;class v{constructor(s,i){this._onDidChangeLanguages=s,this._selector=i,this._listener=null,this._emitter=null,this.languageId=this._selector()}_dispose(){this._listener&&(this._listener.dispose(),this._listener=null),this._emitter&&(this._emitter.dispose(),this._emitter=null)}get onDidChange(){return this._listener||(this._listener=this._onDidChangeLanguages(()=>this._evaluate())),this._emitter||(this._emitter=new L.Emitter({onDidRemoveLastListener:()=>{this._dispose()}})),this._emitter.event}_evaluate(){var s;const i=this._selector();i!==this.languageId&&(this.languageId=i,(s=this._emitter)===null||s===void 0||s.fire(this.languageId))}}}),define(te[346],ie([1,0,36,241,50,32,2,18,147]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultDocumentColorProvider=void 0;class v{constructor(i,n){this._editorWorkerClient=new I.EditorWorkerClient(i,!1,"editorWorkerService",n)}provideDocumentColors(i,n){return be(this,void 0,void 0,function*(){return this._editorWorkerClient.computeDefaultDocumentColors(i.uri)})}provideColorPresentations(i,n,t){const r=n.range,u=n.color,f=u.alpha,d=new L.Color(new L.RGBA(Math.round(255*u.red),Math.round(255*u.green),Math.round(255*u.blue),f)),l=f?L.Color.Format.CSS.formatRGB(d):L.Color.Format.CSS.formatRGBA(d),o=f?L.Color.Format.CSS.formatHSL(d):L.Color.Format.CSS.formatHSLA(d),c=f?L.Color.Format.CSS.formatHex(d):L.Color.Format.CSS.formatHexA(d),a=[];return a.push({label:l,textEdit:{range:r,text:l}}),a.push({label:o,textEdit:{range:r,text:o}}),a.push({label:c,textEdit:{range:r,text:c}}),a}}e.DefaultDocumentColorProvider=v;let C=class extends S.Disposable{constructor(i,n,t){super(),this._register(t.colorProvider.register("*",new v(i,n)))}};C=Ie([ge(0,y.IModelService),ge(1,D.ILanguageConfigurationService),ge(2,m.ILanguageFeaturesService)],C),(0,_.registerEditorFeature)(C)}),define(te[347],ie([1,0,19,9,21,5,50,25,18,346,28]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColorPresentations=e.getColors=void 0;function s(d,l,o,c=!0){return be(this,void 0,void 0,function*(){return u(new n,d,l,o,c)})}e.getColors=s;function i(d,l,o,c){return Promise.resolve(o.provideColorPresentations(d,l,c))}e.getColorPresentations=i;class n{constructor(){}compute(l,o,c,a){return be(this,void 0,void 0,function*(){const g=yield l.provideDocumentColors(o,c);if(Array.isArray(g))for(const h of g)a.push({colorInfo:h,provider:l});return Array.isArray(g)})}}class t{constructor(){}compute(l,o,c,a){return be(this,void 0,void 0,function*(){const g=yield l.provideDocumentColors(o,c);if(Array.isArray(g))for(const h of g)a.push({range:h.range,color:[h.color.red,h.color.green,h.color.blue,h.color.alpha]});return Array.isArray(g)})}}class r{constructor(l){this.colorInfo=l}compute(l,o,c,a){return be(this,void 0,void 0,function*(){const g=yield l.provideColorPresentations(o,this.colorInfo,L.CancellationToken.None);return Array.isArray(g)&&a.push(...g),Array.isArray(g)})}}function u(d,l,o,c,a){return be(this,void 0,void 0,function*(){let g=!1,h;const p=[],b=l.ordered(o);for(let w=b.length-1;w>=0;w--){const E=b[w];if(E instanceof v.DefaultDocumentColorProvider)h=E;else try{(yield d.compute(E,o,c,p))&&(g=!0)}catch(k){(0,I.onUnexpectedExternalError)(k)}}return g?p:h&&a?(yield d.compute(h,o,c,p),p):[]})}function f(d,l){const{colorProvider:o}=d.get(_.ILanguageFeaturesService),c=d.get(S.IModelService).getModel(l);if(!c)throw(0,I.illegalArgument)();const a=d.get(C.IConfigurationService).getValue("editor.defaultColorDecorators",{resource:l});return{model:c,colorProviderRegistry:o,isDefaultColorDecoratorsEnabled:a}}m.CommandsRegistry.registerCommand("_executeDocumentColorProvider",function(d,...l){const[o]=l;if(!(o instanceof y.URI))throw(0,I.illegalArgument)();const{model:c,colorProviderRegistry:a,isDefaultColorDecoratorsEnabled:g}=f(d,o);return u(new t,a,c,L.CancellationToken.None,g)}),m.CommandsRegistry.registerCommand("_executeColorPresentationProvider",function(d,...l){const[o,c]=l,{uri:a,range:g}=c;if(!(a instanceof y.URI)||!Array.isArray(o)||o.length!==4||!D.Range.isIRange(g))throw(0,I.illegalArgument)();const{model:h,colorProviderRegistry:p,isDefaultColorDecoratorsEnabled:b}=f(d,a),[w,E,k,M]=o;return u(new r({range:g,color:{red:w,green:E,blue:k,alpha:M}}),p,h,L.CancellationToken.None,b)})}),define(te[780],ie([1,0,19,69,2,40,12,29,32,18,604,300]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionWithUpdatedRange=e.UpToDateInlineCompletions=e.InlineCompletionsSource=void 0;let i=class extends y.Disposable{constructor(c,a,g,h,p){super(),this.textModel=c,this.versionId=a,this._debounceValue=g,this.languageFeaturesService=h,this.languageConfigurationService=p,this._updateOperation=this._register(new y.MutableDisposable),this.inlineCompletions=(0,D.disposableObservableValue)("inlineCompletions",void 0),this.suggestWidgetInlineCompletions=(0,D.disposableObservableValue)("suggestWidgetInlineCompletions",void 0),this._register(this.textModel.onDidChangeContent(()=>{this._updateOperation.clear()}))}fetch(c,a,g){var h,p;const b=new t(c,a,this.textModel.getVersionId()),w=a.selectedSuggestionInfo?this.suggestWidgetInlineCompletions:this.inlineCompletions;if(!((h=this._updateOperation.value)===null||h===void 0)&&h.request.satisfies(b))return this._updateOperation.value.promise;if(!((p=w.get())===null||p===void 0)&&p.request.satisfies(b))return Promise.resolve(!0);const E=!!this._updateOperation.value;this._updateOperation.clear();const k=new L.CancellationTokenSource,M=(()=>be(this,void 0,void 0,function*(){if((E||a.triggerKind===m.InlineCompletionTriggerKind.Automatic)&&(yield n(this._debounceValue.get(this.textModel))),k.token.isCancellationRequested||this.textModel.getVersionId()!==b.versionId)return!1;const T=new Date,N=yield(0,C.provideInlineCompletions)(this.languageFeaturesService.inlineCompletionsProvider,c,this.textModel,a,k.token,this.languageConfigurationService);if(k.token.isCancellationRequested||this.textModel.getVersionId()!==b.versionId)return!1;const A=new Date;this._debounceValue.update(this.textModel,A.getTime()-T.getTime());const P=new f(N,b,this.textModel,this.versionId);if(g){const O=g.toInlineCompletion(void 0);g.canBeReused(this.textModel,c)&&!N.has(O)&&P.prepend(g.inlineCompletion,O.range,!0)}return this._updateOperation.clear(),(0,D.transaction)(O=>{w.set(P,O)}),!0}))(),R=new u(b,k,M);return this._updateOperation.value=R,M}clear(c){this._updateOperation.clear(),this.inlineCompletions.set(void 0,c),this.suggestWidgetInlineCompletions.set(void 0,c)}clearSuggestWidgetInlineCompletions(c){var a;!((a=this._updateOperation.value)===null||a===void 0)&&a.request.context.selectedSuggestionInfo&&this._updateOperation.clear(),this.suggestWidgetInlineCompletions.set(void 0,c)}cancelUpdate(){this._updateOperation.clear()}};e.InlineCompletionsSource=i,e.InlineCompletionsSource=i=Ie([ge(3,v.ILanguageFeaturesService),ge(4,_.ILanguageConfigurationService)],i);function n(o,c){return new Promise(a=>{let g;const h=setTimeout(()=>{g&&g.dispose(),a()},o);c&&(g=c.onCancellationRequested(()=>{clearTimeout(h),g&&g.dispose(),a()}))})}class t{constructor(c,a,g){this.position=c,this.context=a,this.versionId=g}satisfies(c){return this.position.equals(c.position)&&r(this.context.selectedSuggestionInfo,c.context.selectedSuggestionInfo,(a,g)=>a.equals(g))&&(c.context.triggerKind===m.InlineCompletionTriggerKind.Automatic||this.context.triggerKind===m.InlineCompletionTriggerKind.Explicit)&&this.versionId===c.versionId}}function r(o,c,a){return!o||!c?o===c:a(o,c)}class u{constructor(c,a,g){this.request=c,this.cancellationTokenSource=a,this.promise=g}dispose(){this.cancellationTokenSource.cancel()}}class f{get inlineCompletions(){return this._inlineCompletions}constructor(c,a,g,h){this.inlineCompletionProviderResult=c,this.request=a,this.textModel=g,this.versionId=h,this._refCount=1,this._prependedInlineCompletionItems=[],this._rangeVersionIdValue=0,this._rangeVersionId=(0,D.derived)(this,b=>{this.versionId.read(b);let w=!1;for(const E of this._inlineCompletions)w=w||E._updateRange(this.textModel);return w&&this._rangeVersionIdValue++,this._rangeVersionIdValue});const p=g.deltaDecorations([],c.completions.map(b=>({range:b.range,options:{description:"inline-completion-tracking-range"}})));this._inlineCompletions=c.completions.map((b,w)=>new d(b,p[w],this._rangeVersionId))}clone(){return this._refCount++,this}dispose(){if(this._refCount--,this._refCount===0){setTimeout(()=>{this.textModel.isDisposed()||this.textModel.deltaDecorations(this._inlineCompletions.map(c=>c.decorationId),[])},0),this.inlineCompletionProviderResult.dispose();for(const c of this._prependedInlineCompletionItems)c.source.removeRef()}}prepend(c,a,g){g&&c.source.addRef();const h=this.textModel.deltaDecorations([],[{range:a,options:{description:"inline-completion-tracking-range"}}])[0];this._inlineCompletions.unshift(new d(c,h,this._rangeVersionId,a)),this._prependedInlineCompletionItems.push(c)}}e.UpToDateInlineCompletions=f;class d{get forwardStable(){var c;return(c=this.inlineCompletion.source.inlineCompletions.enableForwardStability)!==null&&c!==void 0?c:!1}constructor(c,a,g,h){this.inlineCompletion=c,this.decorationId=a,this.rangeVersion=g,this.semanticId=JSON.stringify([this.inlineCompletion.filterText,this.inlineCompletion.insertText,this.inlineCompletion.range.getStartPosition().toString()]),this._isValid=!0,this._updatedRange=h??c.range}toInlineCompletion(c){return this.inlineCompletion.withRange(this._getUpdatedRange(c))}toSingleTextEdit(c){return new s.SingleTextEdit(this._getUpdatedRange(c),this.inlineCompletion.insertText)}isVisible(c,a,g){const h=this._toFilterTextReplacement(g).removeCommonPrefix(c);if(!this._isValid||!this.inlineCompletion.range.getStartPosition().equals(this._getUpdatedRange(g).getStartPosition())||a.lineNumber!==h.range.startLineNumber)return!1;const p=c.getValueInRange(h.range,1).toLowerCase(),b=h.text.toLowerCase(),w=Math.max(0,a.column-h.range.startColumn);let E=b.substring(0,w),k=b.substring(w),M=p.substring(0,w),R=p.substring(w);const B=c.getLineIndentColumn(h.range.startLineNumber);return h.range.startColumn<=B&&(M=M.trimStart(),M.length===0&&(R=R.trimStart()),E=E.trimStart(),E.length===0&&(k=k.trimStart())),E.startsWith(M)&&!!(0,I.matchesSubString)(R,k)}canBeReused(c,a){return this._isValid&&this._getUpdatedRange(void 0).containsPosition(a)&&this.isVisible(c,a,void 0)&&!this._isSmallerThanOriginal(void 0)}_toFilterTextReplacement(c){return new s.SingleTextEdit(this._getUpdatedRange(c),this.inlineCompletion.filterText)}_isSmallerThanOriginal(c){return l(this._getUpdatedRange(c)).isBefore(l(this.inlineCompletion.range))}_getUpdatedRange(c){return this.rangeVersion.read(c),this._updatedRange}_updateRange(c){const a=c.getDecorationRange(this.decorationId);return a?this._updatedRange.equalsRange(a)?!1:(this._updatedRange=a,!0):(this._isValid=!1,!0)}}e.InlineCompletionWithUpdatedRange=d;function l(o){return o.startLineNumber===o.endLineNumber?new S.Position(1,1+o.endColumn-o.startColumn):new S.Position(1+o.endLineNumber-o.startLineNumber,o.endColumn)}}),define(te[781],ie([1,0,10,244,5,24,109,32,299,242,243]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MoveLinesCommand=void 0;let s=class{constructor(n,t,r,u){this._languageConfigurationService=u,this._selection=n,this._isMovingDown=t,this._autoIndent=r,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(n,t){const r=n.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===r){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let u=this._selection;u.startLineNumbern.tokenization.getLineTokens(a),getLanguageId:()=>n.getLanguageId(),getLanguageIdAtPosition:(a,g)=>n.getLanguageIdAtPosition(a,g)},getLineContent:null};if(u.startLineNumber===u.endLineNumber&&n.getLineMaxColumn(u.startLineNumber)===1){const a=u.startLineNumber,g=this._isMovingDown?a+1:a-1;n.getLineMaxColumn(g)===1?t.addEditOperation(new y.Range(1,1,1,1),null):(t.addEditOperation(new y.Range(a,1,a,1),n.getLineContent(g)),t.addEditOperation(new y.Range(g,1,g,n.getLineMaxColumn(g)),null)),u=new D.Selection(g,1,g,1)}else{let a,g;if(this._isMovingDown){a=u.endLineNumber+1,g=n.getLineContent(a),t.addEditOperation(new y.Range(a-1,n.getLineMaxColumn(a-1),a,n.getLineMaxColumn(a)),null);let h=g;if(this.shouldAutoIndent(n,u)){const p=this.matchEnterRule(n,o,f,a,u.startLineNumber-1);if(p!==null){const w=L.getLeadingWhitespace(n.getLineContent(a)),E=p+_.getSpaceCnt(w,f);h=_.generateIndent(E,f,l)+this.trimStart(g)}else{c.getLineContent=E=>E===u.startLineNumber?n.getLineContent(a):n.getLineContent(E);const w=(0,v.getGoodIndentForLine)(this._autoIndent,c,n.getLanguageIdAtPosition(a,1),u.startLineNumber,o,this._languageConfigurationService);if(w!==null){const E=L.getLeadingWhitespace(n.getLineContent(a)),k=_.getSpaceCnt(w,f),M=_.getSpaceCnt(E,f);k!==M&&(h=_.generateIndent(k,f,l)+this.trimStart(g))}}t.addEditOperation(new y.Range(u.startLineNumber,1,u.startLineNumber,1),h+` -`);const b=this.matchEnterRuleMovingDown(n,o,f,u.startLineNumber,a,h);if(b!==null)b!==0&&this.getIndentEditsOfMovingBlock(n,t,u,f,l,b);else{c.getLineContent=E=>E===u.startLineNumber?h:E>=u.startLineNumber+1&&E<=u.endLineNumber+1?n.getLineContent(E-1):n.getLineContent(E);const w=(0,v.getGoodIndentForLine)(this._autoIndent,c,n.getLanguageIdAtPosition(a,1),u.startLineNumber+1,o,this._languageConfigurationService);if(w!==null){const E=L.getLeadingWhitespace(n.getLineContent(u.startLineNumber)),k=_.getSpaceCnt(w,f),M=_.getSpaceCnt(E,f);if(k!==M){const R=k-M;this.getIndentEditsOfMovingBlock(n,t,u,f,l,R)}}}}else t.addEditOperation(new y.Range(u.startLineNumber,1,u.startLineNumber,1),h+` -`)}else if(a=u.startLineNumber-1,g=n.getLineContent(a),t.addEditOperation(new y.Range(a,1,a+1,1),null),t.addEditOperation(new y.Range(u.endLineNumber,n.getLineMaxColumn(u.endLineNumber),u.endLineNumber,n.getLineMaxColumn(u.endLineNumber)),` -`+g),this.shouldAutoIndent(n,u)){c.getLineContent=p=>p===a?n.getLineContent(u.startLineNumber):n.getLineContent(p);const h=this.matchEnterRule(n,o,f,u.startLineNumber,u.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(n,t,u,f,l,h);else{const p=(0,v.getGoodIndentForLine)(this._autoIndent,c,n.getLanguageIdAtPosition(u.startLineNumber,1),a,o,this._languageConfigurationService);if(p!==null){const b=L.getLeadingWhitespace(n.getLineContent(u.startLineNumber)),w=_.getSpaceCnt(p,f),E=_.getSpaceCnt(b,f);if(w!==E){const k=w-E;this.getIndentEditsOfMovingBlock(n,t,u,f,l,k)}}}}}this._selectionId=t.trackSelection(u)}buildIndentConverter(n,t,r){return{shiftIndent:u=>I.ShiftCommand.shiftIndent(u,u.length+1,n,t,r),unshiftIndent:u=>I.ShiftCommand.unshiftIndent(u,u.length+1,n,t,r)}}parseEnterResult(n,t,r,u,f){if(f){let d=f.indentation;f.indentAction===S.IndentAction.None||f.indentAction===S.IndentAction.Indent?d=f.indentation+f.appendText:f.indentAction===S.IndentAction.IndentOutdent?d=f.indentation:f.indentAction===S.IndentAction.Outdent&&(d=t.unshiftIndent(f.indentation)+f.appendText);const l=n.getLineContent(u);if(this.trimStart(l).indexOf(this.trimStart(d))>=0){const o=L.getLeadingWhitespace(n.getLineContent(u));let c=L.getLeadingWhitespace(d);const a=(0,v.getIndentMetadata)(n,u,this._languageConfigurationService);a!==null&&a&2&&(c=t.unshiftIndent(c));const g=_.getSpaceCnt(c,r),h=_.getSpaceCnt(o,r);return g-h}}return null}matchEnterRuleMovingDown(n,t,r,u,f,d){if(L.lastNonWhitespaceIndex(d)>=0){const l=n.getLineMaxColumn(f),o=(0,C.getEnterAction)(this._autoIndent,n,new y.Range(f,l,f,l),this._languageConfigurationService);return this.parseEnterResult(n,t,r,u,o)}else{let l=u-1;for(;l>=1;){const a=n.getLineContent(l);if(L.lastNonWhitespaceIndex(a)>=0)break;l--}if(l<1||u>n.getLineCount())return null;const o=n.getLineMaxColumn(l),c=(0,C.getEnterAction)(this._autoIndent,n,new y.Range(l,o,l,o),this._languageConfigurationService);return this.parseEnterResult(n,t,r,u,c)}}matchEnterRule(n,t,r,u,f,d){let l=f;for(;l>=1;){let a;if(l===f&&d!==void 0?a=d:a=n.getLineContent(l),L.lastNonWhitespaceIndex(a)>=0)break;l--}if(l<1||u>n.getLineCount())return null;const o=n.getLineMaxColumn(l),c=(0,C.getEnterAction)(this._autoIndent,n,new y.Range(l,o,l,o),this._languageConfigurationService);return this.parseEnterResult(n,t,r,u,c)}trimStart(n){return n.replace(/^\s+/,"")}shouldAutoIndent(n,t){if(this._autoIndent<4||!n.tokenization.isCheapToTokenize(t.startLineNumber))return!1;const r=n.getLanguageIdAtPosition(t.startLineNumber,1),u=n.getLanguageIdAtPosition(t.endLineNumber,1);return!(r!==u||this._languageConfigurationService.getLanguageConfiguration(r).indentRulesSupport===null)}getIndentEditsOfMovingBlock(n,t,r,u,f,d){for(let l=r.startLineNumber;l<=r.endLineNumber;l++){const o=n.getLineContent(l),c=L.getLeadingWhitespace(o),g=_.getSpaceCnt(c,u)+d,h=_.generateIndent(g,u,f);h!==c&&(t.addEditOperation(new y.Range(l,1,l,c.length+1),h),l===r.endLineNumber&&r.endColumn<=c.length+1&&h===""&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(n,t){let r=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(r=r.setEndPosition(r.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&r.startLineNumber{}};const o=new S.DisposableStore,c=o.add((0,L.renderMarkdown)(f,Object.assign(Object.assign({},this._getRenderOptions(f,o)),d),l));return c.element.classList.add("rendered-markdown"),{element:c.element,dispose:()=>o.dispose()}}_getRenderOptions(f,d){return{codeBlockRenderer:(l,o)=>be(this,void 0,void 0,function*(){var c,a,g;let h;l?h=this._languageService.getLanguageIdByLanguageName(l):this._options.editor&&(h=(c=this._options.editor.getModel())===null||c===void 0?void 0:c.getLanguageId()),h||(h=v.PLAINTEXT_LANGUAGE_ID);const p=yield(0,C.tokenizeToString)(this._languageService,o,h),b=document.createElement("span");if(b.innerHTML=(g=(a=i._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(p))!==null&&g!==void 0?g:p,this._options.editor){const w=this._options.editor.getOption(50);(0,m.applyFontInfo)(b,w)}else this._options.codeBlockFontFamily&&(b.style.fontFamily=this._options.codeBlockFontFamily);return this._options.codeBlockFontSize!==void 0&&(b.style.fontSize=this._options.codeBlockFontSize),b}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:l=>t(this._openerService,l,f.isTrusted),disposables:d}}}};e.MarkdownRenderer=n,n._ttpTokenizer=(0,I.createTrustedTypesPolicy)("tokenizeToString",{createHTML(u){return u}}),e.MarkdownRenderer=n=i=Ie([ge(1,_.ILanguageService),ge(2,s.IOpenerService)],n);function t(u,f,d){return be(this,void 0,void 0,function*(){try{return yield u.open(f,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:r(d)})}catch(l){return(0,y.onUnexpectedError)(l),!1}})}e.openLinkFromMarkdown=t;function r(u){return u===!0?!0:u&&Array.isArray(u.enabledCommands)?u.enabledCommands:!1}}),define(te[782],ie([1,0,7,13,57,2,116,325,315]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarginHoverWidget=void 0;const v=L.$;class C extends D.Disposable{constructor(n,t,r){super(),this._renderDisposeables=this._register(new D.DisposableStore),this._editor=n,this._isVisible=!1,this._messages=[],this._hover=this._register(new _.HoverWidget),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new S.MarkdownRenderer({editor:this._editor},t,r)),this._computer=new s(this._editor),this._hoverOperation=this._register(new m.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(u=>{this._withResult(u.value)})),this._register(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged())),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(50)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return C.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(n){this._computer.lineNumber!==n&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=n,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(n){this._messages=n,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(n,t){this._renderDisposeables.clear();const r=document.createDocumentFragment();for(const u of t){const f=v("div.hover-row.markdown-hover"),d=L.append(f,v("div.hover-contents")),l=this._renderDisposeables.add(this._markdownRenderer.render(u.value));d.appendChild(l.element),r.appendChild(f)}this._updateContents(r),this._showAt(n)}_updateContents(n){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(n),this._updateFont()}_showAt(n){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),r=this._editor.getTopForLineNumber(n),u=this._editor.getScrollTop(),f=this._editor.getOption(66),d=this._hover.containerDomNode.clientHeight,l=r-u-(d-f)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(l),0)}px`}}e.MarginHoverWidget=C,C.ID="editor.contrib.modesGlyphHoverWidget";class s{get lineNumber(){return this._lineNumber}set lineNumber(n){this._lineNumber=n}constructor(n){this._editor=n,this._lineNumber=-1}computeSync(){const n=u=>({value:u}),t=this._editor.getLineDecorations(this._lineNumber),r=[];if(!t)return r;for(const u of t){if(!u.options.glyphMarginClassName)continue;const f=u.options.glyphMarginHoverMessage;!f||(0,y.isEmptyMarkdownString)(f)||r.push(...(0,I.asArray)(f).map(n))}return r}}}),define(te[348],ie([1,0,7,84,26,27,6,57,2,116,223,704,8]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestDetailsOverlay=e.SuggestDetailsWidget=e.canExpandCompletionItem=void 0;function n(u){return!!u&&!!(u.completion.documentation||u.completion.detail&&u.completion.detail!==u.completion.label)}e.canExpandCompletionItem=n;let t=class{constructor(f,d){this._editor=f,this._onDidClose=new S.Emitter,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new S.Emitter,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new _.DisposableStore,this._renderDisposeable=new _.DisposableStore,this._borderWidth=1,this._size=new L.Dimension(330,0),this.domNode=L.$(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=d.createInstance(v.MarkdownRenderer,{editor:f}),this._body=L.$(".body"),this._scrollbar=new I.DomScrollableElement(this._body,{alwaysConsumeMouseWheel:!0}),L.append(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=L.append(this._body,L.$(".header")),this._close=L.append(this._header,L.$("span"+D.ThemeIcon.asCSSSelector(y.Codicon.close))),this._close.title=s.localize(0,null),this._type=L.append(this._header,L.$("p.type")),this._docs=L.append(this._body,L.$("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(l=>{l.hasChanged(50)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const f=this._editor.getOptions(),d=f.get(50),l=d.getMassagedFontFamily(),o=f.get(118)||d.fontSize,c=f.get(119)||d.lineHeight,a=d.fontWeight,g=`${o}px`,h=`${c}px`;this.domNode.style.fontSize=g,this.domNode.style.lineHeight=`${c/o}`,this.domNode.style.fontWeight=a,this.domNode.style.fontFeatureSettings=d.fontFeatureSettings,this._type.style.fontFamily=l,this._close.style.height=h,this._close.style.width=h}getLayoutInfo(){const f=this._editor.getOption(119)||this._editor.getOption(50).lineHeight,d=this._borderWidth,l=d*2;return{lineHeight:f,borderWidth:d,borderHeight:l,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=s.localize(1,null),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(f,d){var l,o;this._renderDisposeable.clear();let{detail:c,documentation:a}=f.completion;if(d){let g="";g+=`score: ${f.score[0]} -`,g+=`prefix: ${(l=f.word)!==null&&l!==void 0?l:"(no prefix)"} -`,g+=`word: ${f.completion.filterText?f.completion.filterText+" (filterText)":f.textLabel} -`,g+=`distance: ${f.distance} (localityBonus-setting) -`,g+=`index: ${f.idx}, based on ${f.completion.sortText&&`sortText: "${f.completion.sortText}"`||"label"} -`,g+=`commit_chars: ${(o=f.completion.commitCharacters)===null||o===void 0?void 0:o.join("")} -`,a=new m.MarkdownString().appendCodeblock("empty",g),c=`Provider: ${f.provider._debugDisplayName}`}if(!d&&!n(f)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),c){const g=c.length>1e5?`${c.substr(0,1e5)}\u2026`:c;this._type.textContent=g,this._type.title=g,L.show(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(g))}else L.clearNode(this._type),this._type.title="",L.hide(this._type),this.domNode.classList.add("no-type");if(L.clearNode(this._docs),typeof a=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=a;else if(a){this._docs.classList.add("markdown-docs"),L.clearNode(this._docs);const g=this._markdownRenderer.render(a);this._docs.appendChild(g.element),this._renderDisposeable.add(g),this._renderDisposeable.add(this._markdownRenderer.onDidRenderAsync(()=>{this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}))}this.domNode.style.userSelect="text",this.domNode.tabIndex=-1,this._close.onmousedown=g=>{g.preventDefault(),g.stopPropagation()},this._close.onclick=g=>{g.preventDefault(),g.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(f,d){const l=new L.Dimension(f,d);L.Dimension.equals(l,this._size)||(this._size=l,L.size(this.domNode,f,d)),this._scrollbar.scanDomNode()}scrollDown(f=8){this._body.scrollTop+=f}scrollUp(f=8){this._body.scrollTop-=f}scrollTop(){this._body.scrollTop=0}scrollBottom(){this._body.scrollTop=this._body.scrollHeight}pageDown(){this.scrollDown(80)}pageUp(){this.scrollUp(80)}set borderWidth(f){this._borderWidth=f}get borderWidth(){return this._borderWidth}};e.SuggestDetailsWidget=t,e.SuggestDetailsWidget=t=Ie([ge(1,i.IInstantiationService)],t);class r{constructor(f,d){this.widget=f,this._editor=d,this._disposables=new _.DisposableStore,this._added=!1,this._preferAlignAtTop=!0,this._resizable=new C.ResizableHTMLElement,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(f.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let l,o,c=0,a=0;this._disposables.add(this._resizable.onDidWillResize(()=>{l=this._topLeft,o=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(g=>{if(l&&o){this.widget.layout(g.dimension.width,g.dimension.height);let h=!1;g.west&&(a=o.width-g.dimension.width,h=!0),g.north&&(c=o.height-g.dimension.height,h=!0),h&&this._applyTopLeft({top:l.top+c,left:l.left+a})}g.done&&(l=void 0,o=void 0,c=0,a=0,this._userSize=g.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var g;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(g=this._userSize)!==null&&g!==void 0?g:this.widget.size,this._preferAlignAtTop)}))}dispose(){this._resizable.dispose(),this._disposables.dispose(),this.hide()}getId(){return"suggest.details"}getDomNode(){return this._resizable.domNode}getPosition(){return null}show(){this._added||(this._editor.addOverlayWidget(this),this.getDomNode().style.position="fixed",this._added=!0)}hide(f=!1){this._resizable.clearSashHoverState(),this._added&&(this._editor.removeOverlayWidget(this),this._added=!1,this._anchorBox=void 0,this._topLeft=void 0),f&&(this._userSize=void 0,this.widget.clearContents())}placeAtAnchor(f,d){var l;const o=f.getBoundingClientRect();this._anchorBox=o,this._preferAlignAtTop=d,this._placeAtAnchor(this._anchorBox,(l=this._userSize)!==null&&l!==void 0?l:this.widget.size,d)}_placeAtAnchor(f,d,l){var o;const c=L.getClientArea(this.getDomNode().ownerDocument.body),a=this.widget.getLayoutInfo(),g=new L.Dimension(220,2*a.lineHeight),h=f.top,p=function(){const A=c.width-(f.left+f.width+a.borderWidth+a.horizontalPadding),P=-a.borderWidth+f.left+f.width,O=new L.Dimension(A,c.height-f.top-a.borderHeight-a.verticalPadding),x=O.with(void 0,f.top+f.height-a.borderHeight-a.verticalPadding);return{top:h,left:P,fit:A-d.width,maxSizeTop:O,maxSizeBottom:x,minSize:g.with(Math.min(A,g.width))}}(),b=function(){const A=f.left-a.borderWidth-a.horizontalPadding,P=Math.max(a.horizontalPadding,f.left-d.width-a.borderWidth),O=new L.Dimension(A,c.height-f.top-a.borderHeight-a.verticalPadding),x=O.with(void 0,f.top+f.height-a.borderHeight-a.verticalPadding);return{top:h,left:P,fit:A-d.width,maxSizeTop:O,maxSizeBottom:x,minSize:g.with(Math.min(A,g.width))}}(),w=function(){const A=f.left,P=-a.borderWidth+f.top+f.height,O=new L.Dimension(f.width-a.borderHeight,c.height-f.top-f.height-a.verticalPadding);return{top:P,left:A,fit:O.height-d.height,maxSizeBottom:O,maxSizeTop:O,minSize:g.with(O.width)}}(),E=[p,b,w],k=(o=E.find(A=>A.fit>=0))!==null&&o!==void 0?o:E.sort((A,P)=>P.fit-A.fit)[0],M=f.top+f.height-a.borderHeight;let R,B=d.height;const T=Math.max(k.maxSizeTop.height,k.maxSizeBottom.height);B>T&&(B=T);let N;l?B<=k.maxSizeTop.height?(R=!0,N=k.maxSizeTop):(R=!1,N=k.maxSizeBottom):B<=k.maxSizeBottom.height?(R=!1,N=k.maxSizeBottom):(R=!0,N=k.maxSizeTop),this._applyTopLeft({left:k.left,top:R?k.top:M-B}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!R,k===p,R,k!==p),this._resizable.minSize=k.minSize,this._resizable.maxSize=N,this._resizable.layout(B,Math.min(N.width,d.width)),this.widget.layout(this._resizable.size.width,this._resizable.size.height)}_applyTopLeft(f){this._topLeft=f,this.getDomNode().style.left=`${this._topLeft.left}px`,this.getDomNode().style.top=`${this._topLeft.top}px`}}e.SuggestDetailsOverlay=r}),define(te[349],ie([1,0,13,56,52,20,21,28,95,35]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationChangeEvent=e.Configuration=e.ConfigurationModelParser=e.ConfigurationModel=void 0;function C(u){return Object.isFrozen(u)?u:y.deepFreeze(u)}class s{constructor(f={},d=[],l=[],o){this._contents=f,this._keys=d,this._overrides=l,this.raw=o,this.overrideConfigurations=new Map}get rawConfiguration(){var f;if(!this._rawConfiguration)if(!((f=this.raw)===null||f===void 0)&&f.length){const d=this.raw.map(l=>{if(l instanceof s)return l;const o=new i("");return o.parseRaw(l),o.configurationModel});this._rawConfiguration=d.reduce((l,o)=>o===l?o:l.merge(o),d[0])}else this._rawConfiguration=this;return this._rawConfiguration}get contents(){return this._contents}get overrides(){return this._overrides}get keys(){return this._keys}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(f){return f?(0,m.getConfigurationValue)(this.contents,f):this.contents}inspect(f,d){const l=this.rawConfiguration.getValue(f),o=d?this.rawConfiguration.getOverrideValue(f,d):void 0,c=d?this.rawConfiguration.override(d).getValue(f):l;return{value:l,override:o,merged:c}}getOverrideValue(f,d){const l=this.getContentsForOverrideIdentifer(d);return l?f?(0,m.getConfigurationValue)(l,f):l:void 0}override(f){let d=this.overrideConfigurations.get(f);return d||(d=this.createOverrideConfigurationModel(f),this.overrideConfigurations.set(f,d)),d}merge(...f){var d,l;const o=y.deepClone(this.contents),c=y.deepClone(this.overrides),a=[...this.keys],g=!((d=this.raw)===null||d===void 0)&&d.length?[...this.raw]:[this];for(const h of f)if(g.push(...!((l=h.raw)===null||l===void 0)&&l.length?h.raw:[h]),!h.isEmpty()){this.mergeContents(o,h.contents);for(const p of h.overrides){const[b]=c.filter(w=>L.equals(w.identifiers,p.identifiers));b?(this.mergeContents(b.contents,p.contents),b.keys.push(...p.keys),b.keys=L.distinct(b.keys)):c.push(y.deepClone(p))}for(const p of h.keys)a.indexOf(p)===-1&&a.push(p)}return new s(o,a,c,g.every(h=>h instanceof s)?void 0:g)}createOverrideConfigurationModel(f){const d=this.getContentsForOverrideIdentifer(f);if(!d||typeof d!="object"||!Object.keys(d).length)return this;const l={};for(const o of L.distinct([...Object.keys(this.contents),...Object.keys(d)])){let c=this.contents[o];const a=d[o];a&&(typeof c=="object"&&typeof a=="object"?(c=y.deepClone(c),this.mergeContents(c,a)):c=a),l[o]=c}return new s(l,this.keys,this.overrides)}mergeContents(f,d){for(const l of Object.keys(d)){if(l in f&&D.isObject(f[l])&&D.isObject(d[l])){this.mergeContents(f[l],d[l]);continue}f[l]=y.deepClone(d[l])}}getContentsForOverrideIdentifer(f){let d=null,l=null;const o=c=>{c&&(l?this.mergeContents(l,c):l=y.deepClone(c))};for(const c of this.overrides)c.identifiers.length===1&&c.identifiers[0]===f?d=c.contents:c.identifiers.includes(f)&&o(c.contents);return o(d),l}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}addValue(f,d){this.updateValue(f,d,!0)}setValue(f,d){this.updateValue(f,d,!1)}removeValue(f){const d=this.keys.indexOf(f);d!==-1&&(this.keys.splice(d,1),(0,m.removeFromValueTree)(this.contents,f),_.OVERRIDE_PROPERTY_REGEX.test(f)&&this.overrides.splice(this.overrides.findIndex(l=>L.equals(l.identifiers,(0,_.overrideIdentifiersFromKey)(f))),1))}updateValue(f,d,l){(0,m.addToValueTree)(this.contents,f,d,o=>console.error(o)),l=l||this.keys.indexOf(f)===-1,l&&this.keys.push(f),_.OVERRIDE_PROPERTY_REGEX.test(f)&&this.overrides.push({identifiers:(0,_.overrideIdentifiersFromKey)(f),keys:Object.keys(this.contents[f]),contents:(0,m.toValuesTree)(this.contents[f],o=>console.error(o))})}}e.ConfigurationModel=s;class i{constructor(f){this._name=f,this._raw=null,this._configurationModel=null,this._restrictedConfigurations=[]}get configurationModel(){return this._configurationModel||new s}parseRaw(f,d){this._raw=f;const{contents:l,keys:o,overrides:c,restricted:a,hasExcludedProperties:g}=this.doParseRaw(f,d);this._configurationModel=new s(l,o,c,g?[f]:void 0),this._restrictedConfigurations=a||[]}doParseRaw(f,d){const l=v.Registry.as(_.Extensions.Configuration).getConfigurationProperties(),o=this.filter(f,l,!0,d);f=o.raw;const c=(0,m.toValuesTree)(f,h=>console.error(`Conflict in settings file ${this._name}: ${h}`)),a=Object.keys(f),g=this.toOverrides(f,h=>console.error(`Conflict in settings file ${this._name}: ${h}`));return{contents:c,keys:a,overrides:g,restricted:o.restricted,hasExcludedProperties:o.hasExcludedProperties}}filter(f,d,l,o){var c,a,g;let h=!1;if(!o?.scopes&&!o?.skipRestricted&&!(!((c=o?.exclude)===null||c===void 0)&&c.length))return{raw:f,restricted:[],hasExcludedProperties:h};const p={},b=[];for(const w in f)if(_.OVERRIDE_PROPERTY_REGEX.test(w)&&l){const E=this.filter(f[w],d,!1,o);p[w]=E.raw,h=h||E.hasExcludedProperties,b.push(...E.restricted)}else{const E=d[w],k=E?typeof E.scope<"u"?E.scope:3:void 0;E?.restricted&&b.push(w),!(!((a=o.exclude)===null||a===void 0)&&a.includes(w))&&(!((g=o.include)===null||g===void 0)&&g.includes(w)||(k===void 0||o.scopes===void 0||o.scopes.includes(k))&&!(o.skipRestricted&&E?.restricted))?p[w]=f[w]:h=!0}return{raw:p,restricted:b,hasExcludedProperties:h}}toOverrides(f,d){const l=[];for(const o of Object.keys(f))if(_.OVERRIDE_PROPERTY_REGEX.test(o)){const c={};for(const a in f[o])c[a]=f[o][a];l.push({identifiers:(0,_.overrideIdentifiersFromKey)(o),keys:Object.keys(c),contents:(0,m.toValuesTree)(c,d)})}return l}}e.ConfigurationModelParser=i;class n{constructor(f,d,l,o,c,a,g,h,p,b,w,E,k){this.key=f,this.overrides=d,this._value=l,this.overrideIdentifiers=o,this.defaultConfiguration=c,this.policyConfiguration=a,this.applicationConfiguration=g,this.userConfiguration=h,this.localUserConfiguration=p,this.remoteUserConfiguration=b,this.workspaceConfiguration=w,this.folderConfigurationModel=E,this.memoryConfigurationModel=k}inspect(f,d,l){const o=f.inspect(d,l);return{get value(){return C(o.value)},get override(){return C(o.override)},get merged(){return C(o.merged)}}}get userInspectValue(){return this._userInspectValue||(this._userInspectValue=this.inspect(this.userConfiguration,this.key,this.overrides.overrideIdentifier)),this._userInspectValue}get user(){return this.userInspectValue.value!==void 0||this.userInspectValue.override!==void 0?{value:this.userInspectValue.value,override:this.userInspectValue.override}:void 0}}class t{constructor(f,d,l,o,c=new s,a=new s,g=new I.ResourceMap,h=new s,p=new I.ResourceMap){this._defaultConfiguration=f,this._policyConfiguration=d,this._applicationConfiguration=l,this._localUserConfiguration=o,this._remoteUserConfiguration=c,this._workspaceConfiguration=a,this._folderConfigurations=g,this._memoryConfiguration=h,this._memoryConfigurationByResource=p,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new I.ResourceMap,this._userConfiguration=null}getValue(f,d,l){return this.getConsolidatedConfigurationModel(f,d,l).getValue(f)}updateValue(f,d,l={}){let o;l.resource?(o=this._memoryConfigurationByResource.get(l.resource),o||(o=new s,this._memoryConfigurationByResource.set(l.resource,o))):o=this._memoryConfiguration,d===void 0?o.removeValue(f):o.setValue(f,d),l.resource||(this._workspaceConsolidatedConfiguration=null)}inspect(f,d,l){const o=this.getConsolidatedConfigurationModel(f,d,l),c=this.getFolderConfigurationModelForResource(d.resource,l),a=d.resource?this._memoryConfigurationByResource.get(d.resource)||this._memoryConfiguration:this._memoryConfiguration,g=new Set;for(const h of o.overrides)for(const p of h.identifiers)o.getOverrideValue(f,p)!==void 0&&g.add(p);return new n(f,d,o.getValue(f),g.size?[...g]:void 0,this._defaultConfiguration,this._policyConfiguration.isEmpty()?void 0:this._policyConfiguration,this.applicationConfiguration.isEmpty()?void 0:this.applicationConfiguration,this.userConfiguration,this.localUserConfiguration,this.remoteUserConfiguration,l?this._workspaceConfiguration:void 0,c||void 0,a)}get applicationConfiguration(){return this._applicationConfiguration}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration)),this._userConfiguration}get localUserConfiguration(){return this._localUserConfiguration}get remoteUserConfiguration(){return this._remoteUserConfiguration}getConsolidatedConfigurationModel(f,d,l){let o=this.getConsolidatedConfigurationModelForResource(d,l);return d.overrideIdentifier&&(o=o.override(d.overrideIdentifier)),!this._policyConfiguration.isEmpty()&&this._policyConfiguration.getValue(f)!==void 0&&(o=o.merge(this._policyConfiguration)),o}getConsolidatedConfigurationModelForResource({resource:f},d){let l=this.getWorkspaceConsolidatedConfiguration();if(d&&f){const o=d.getFolder(f);o&&(l=this.getFolderConsolidatedConfiguration(o.uri)||l);const c=this._memoryConfigurationByResource.get(f);c&&(l=l.merge(c))}return l}getWorkspaceConsolidatedConfiguration(){return this._workspaceConsolidatedConfiguration||(this._workspaceConsolidatedConfiguration=this._defaultConfiguration.merge(this.applicationConfiguration,this.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration)),this._workspaceConsolidatedConfiguration}getFolderConsolidatedConfiguration(f){let d=this._foldersConsolidatedConfigurations.get(f);if(!d){const l=this.getWorkspaceConsolidatedConfiguration(),o=this._folderConfigurations.get(f);o?(d=l.merge(o),this._foldersConsolidatedConfigurations.set(f,d)):d=l}return d}getFolderConfigurationModelForResource(f,d){if(d&&f){const l=d.getFolder(f);if(l)return this._folderConfigurations.get(l.uri)}}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.keys},policy:{contents:this._policyConfiguration.contents,overrides:this._policyConfiguration.overrides,keys:this._policyConfiguration.keys},application:{contents:this.applicationConfiguration.contents,overrides:this.applicationConfiguration.overrides,keys:this.applicationConfiguration.keys},user:{contents:this.userConfiguration.contents,overrides:this.userConfiguration.overrides,keys:this.userConfiguration.keys},workspace:{contents:this._workspaceConfiguration.contents,overrides:this._workspaceConfiguration.overrides,keys:this._workspaceConfiguration.keys},folders:[...this._folderConfigurations.keys()].reduce((f,d)=>{const{contents:l,overrides:o,keys:c}=this._folderConfigurations.get(d);return f.push([d,{contents:l,overrides:o,keys:c}]),f},[])}}static parse(f){const d=this.parseConfigurationModel(f.defaults),l=this.parseConfigurationModel(f.policy),o=this.parseConfigurationModel(f.application),c=this.parseConfigurationModel(f.user),a=this.parseConfigurationModel(f.workspace),g=f.folders.reduce((h,p)=>(h.set(S.URI.revive(p[0]),this.parseConfigurationModel(p[1])),h),new I.ResourceMap);return new t(d,l,o,c,new s,a,g,new s,new I.ResourceMap)}static parseConfigurationModel(f){return new s(f.contents,f.keys,f.overrides)}}e.Configuration=t;class r{constructor(f,d,l,o){this.change=f,this.previous=d,this.currentConfiguraiton=l,this.currentWorkspace=o,this._marker=` -`,this._markerCode1=this._marker.charCodeAt(0),this._markerCode2=".".charCodeAt(0),this.affectedKeys=new Set,this._previousConfiguration=void 0;for(const c of f.keys)this.affectedKeys.add(c);for(const[,c]of f.overrides)for(const a of c)this.affectedKeys.add(a);this._affectsConfigStr=this._marker;for(const c of this.affectedKeys)this._affectsConfigStr+=c+this._marker}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=t.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(f,d){var l;const o=this._marker+f,c=this._affectsConfigStr.indexOf(o);if(c<0)return!1;const a=c+o.length;if(a>=this._affectsConfigStr.length)return!1;const g=this._affectsConfigStr.charCodeAt(a);if(g!==this._markerCode1&&g!==this._markerCode2)return!1;if(d){const h=this.previousConfiguration?this.previousConfiguration.getValue(f,d,(l=this.previous)===null||l===void 0?void 0:l.workspace):void 0,p=this.currentConfiguraiton.getValue(f,d,this.currentWorkspace);return!y.equals(h,p)}return!0}}e.ConfigurationChangeEvent=r}),define(te[783],ie([1,0,2,349,95,35]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultConfiguration=void 0;class S extends L.Disposable{constructor(){super(...arguments),this._configurationModel=new I.ConfigurationModel}get configurationModel(){return this._configurationModel}reload(){return this.resetConfigurationModel(),this.configurationModel}getConfigurationDefaultOverrides(){return{}}resetConfigurationModel(){this._configurationModel=new I.ConfigurationModel;const _=D.Registry.as(y.Extensions.Configuration).getConfigurationProperties();this.updateConfigurationModel(Object.keys(_),_)}updateConfigurationModel(_,v){const C=this.getConfigurationDefaultOverrides();for(const s of _){const i=C[s],n=v[s];i!==void 0?this._configurationModel.addValue(s,i):n?this._configurationModel.addValue(s,n.default):this._configurationModel.removeValue(s)}}}e.DefaultConfiguration=S}),define(te[117],ie([1,0,118,17,25,35,2,63]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Extensions=e.KeybindingsRegistry=void 0;class _{constructor(){this._coreKeybindings=new m.LinkedList,this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(s){if(I.OS===1){if(s&&s.win)return s.win}else if(I.OS===2){if(s&&s.mac)return s.mac}else if(s&&s.linux)return s.linux;return s}registerKeybindingRule(s){const i=_.bindToCurrentPlatform(s),n=new S.DisposableStore;if(i&&i.primary){const t=(0,L.decodeKeybinding)(i.primary,I.OS);t&&n.add(this._registerDefaultKeybinding(t,s.id,s.args,s.weight,0,s.when))}if(i&&Array.isArray(i.secondary))for(let t=0,r=i.secondary.length;t{f(),this._cachedMergedKeybindings=null})}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=Array.from(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(v)),this._cachedMergedKeybindings.slice(0)}}e.KeybindingsRegistry=new _,e.Extensions={EditorModes:"platform.keybindingsRegistry"},D.Registry.add(e.Extensions.EditorModes,e.KeybindingsRegistry);function v(C,s){if(C.weight1!==s.weight1)return C.weight1-s.weight1;if(C.command&&s.command){if(C.commands.command)return 1}return C.weight2-s.weight2}});var vi=this&&this.__rest||function($,e){var L={};for(var I in $)Object.prototype.hasOwnProperty.call($,I)&&e.indexOf(I)<0&&(L[I]=$[I]);if($!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,I=Object.getOwnPropertySymbols($);ya===c}}r._all=new Map,e.MenuRegistry=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new y.MicrotaskEmitter({merge:r.merge}),this.onDidChangeMenu=this._onDidChangeMenu.event}addCommand(o){return this._commands.set(o.id,o),this._onDidChangeMenu.fire(r.for(t.CommandPalette)),(0,D.toDisposable)(()=>{this._commands.delete(o.id)&&this._onDidChangeMenu.fire(r.for(t.CommandPalette))})}getCommand(o){return this._commands.get(o)}getCommands(){const o=new Map;return this._commands.forEach((c,a)=>o.set(a,c)),o}appendMenuItem(o,c){let a=this._menuItems.get(o);a||(a=new S.LinkedList,this._menuItems.set(o,a));const g=a.push(c);return this._onDidChangeMenu.fire(r.for(o)),(0,D.toDisposable)(()=>{g(),this._onDidChangeMenu.fire(r.for(o))})}appendMenuItems(o){const c=new D.DisposableStore;for(const{id:a,item:g}of o)c.add(this.appendMenuItem(a,g));return c}getMenuItems(o){let c;return this._menuItems.has(o)?c=[...this._menuItems.get(o)]:c=[],o===t.CommandPalette&&this._appendImplicitItems(c),c}_appendImplicitItems(o){const c=new Set;for(const a of o)i(a)&&(c.add(a.command.id),a.alt&&c.add(a.alt.id));this._commands.forEach((a,g)=>{c.has(g)||o.push({command:a})})}};class u extends L.SubmenuAction{constructor(c,a,g){super(`submenuitem.${c.submenu.id}`,typeof c.title=="string"?c.title:c.title.value,g,"submenu"),this.item=c,this.hideActions=a}}e.SubmenuItemAction=u;let f=s=class{static label(c,a){return a?.renderShortTitle&&c.shortTitle?typeof c.shortTitle=="string"?c.shortTitle:c.shortTitle.value:typeof c.title=="string"?c.title:c.title.value}constructor(c,a,g,h,p,b){var w,E;this.hideActions=h,this._commandService=b,this.id=c.id,this.label=s.label(c,g),this.tooltip=(E=typeof c.tooltip=="string"?c.tooltip:(w=c.tooltip)===null||w===void 0?void 0:w.value)!==null&&E!==void 0?E:"",this.enabled=!c.precondition||p.contextMatchesRules(c.precondition),this.checked=void 0;let k;if(c.toggled){const M=c.toggled.condition?c.toggled:{condition:c.toggled};this.checked=p.contextMatchesRules(M.condition),this.checked&&M.tooltip&&(this.tooltip=typeof M.tooltip=="string"?M.tooltip:M.tooltip.value),this.checked&&I.ThemeIcon.isThemeIcon(M.icon)&&(k=M.icon),this.checked&&M.title&&(this.label=typeof M.title=="string"?M.title:M.title.value)}k||(k=I.ThemeIcon.isThemeIcon(c.icon)?c.icon:void 0),this.item=c,this.alt=a?new s(a,void 0,g,h,p,b):void 0,this._options=g,this.class=k&&I.ThemeIcon.asClassName(k)}run(...c){var a,g;let h=[];return!((a=this._options)===null||a===void 0)&&a.arg&&(h=[...h,this._options.arg]),!((g=this._options)===null||g===void 0)&&g.shouldForwardArgs&&(h=[...h,...c]),this._commandService.executeCommand(this.id,...h)}};e.MenuItemAction=f,e.MenuItemAction=f=s=Ie([ge(4,_.IContextKeyService),ge(5,m.ICommandService)],f);class d{constructor(c){this.desc=c}}e.Action2=d;function l(o){const c=new D.DisposableStore,a=new o,g=a.desc,{f1:h,menu:p,keybinding:b,description:w}=g,E=vi(g,["f1","menu","keybinding","description"]);if(c.add(m.CommandsRegistry.registerCommand({id:E.id,handler:(k,...M)=>a.run(k,...M),description:w})),Array.isArray(p))for(const k of p)c.add(e.MenuRegistry.appendMenuItem(k.id,Object.assign({command:Object.assign(Object.assign({},E),{precondition:k.precondition===null?void 0:E.precondition})},k)));else p&&c.add(e.MenuRegistry.appendMenuItem(p.id,Object.assign({command:Object.assign(Object.assign({},E),{precondition:p.precondition===null?void 0:E.precondition})},p)));if(h&&(c.add(e.MenuRegistry.appendMenuItem(t.CommandPalette,{command:E,when:E.precondition})),c.add(e.MenuRegistry.addCommand(E))),Array.isArray(b))for(const k of b)c.add(C.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},k),{id:E.id,when:E.precondition?_.ContextKeyExpr.and(E.precondition,k.when):k.when})));else b&&c.add(C.KeybindingsRegistry.registerKeybindingRule(Object.assign(Object.assign({},b),{id:E.id,when:E.precondition?_.ContextKeyExpr.and(E.precondition,b.when):b.when})));return c}e.registerAction2=l}),define(te[784],ie([1,0,45,200,708,30]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleTabFocusModeAction=void 0;class S extends D.Action2{constructor(){super({id:S.ID,title:{value:y.localize(0,null),original:"Toggle Tab Key Moves Focus"},precondition:void 0,keybinding:{primary:2091,mac:{primary:1323},weight:100},f1:!0})}run(){const v=!I.TabFocus.getTabFocusMode();I.TabFocus.setTabFocusMode(v),v?(0,L.alert)(y.localize(1,null)):(0,L.alert)(y.localize(2,null))}}e.ToggleTabFocusModeAction=S,S.ID="editor.action.toggleTabFocusMode",(0,D.registerAction2)(S)}),define(te[350],ie([1,0,228,585,15,117,727,2]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextScopedReplaceInput=e.ContextScopedFindInput=e.registerAndCreateHistoryNavigationContext=e.historyNavigationVisible=void 0,e.historyNavigationVisible=new y.RawContextKey("suggestWidgetVisible",!1,(0,S.localize)(0,null));const _="historyNavigationWidgetFocus",v="historyNavigationForwardsEnabled",C="historyNavigationBackwardsEnabled";let s;const i=[];function n(u,f){if(i.includes(f))throw new Error("Cannot register the same widget multiple times");i.push(f);const d=new m.DisposableStore,l=new y.RawContextKey(_,!1).bindTo(u),o=new y.RawContextKey(v,!0).bindTo(u),c=new y.RawContextKey(C,!0).bindTo(u),a=()=>{l.set(!0),s=f},g=()=>{l.set(!1),s===f&&(s=void 0)};return f.element===document.activeElement&&a(),d.add(f.onDidFocus(()=>a())),d.add(f.onDidBlur(()=>g())),d.add((0,m.toDisposable)(()=>{i.splice(i.indexOf(f),1),g()})),{historyNavigationForwardsEnablement:o,historyNavigationBackwardsEnablement:c,dispose(){d.dispose()}}}e.registerAndCreateHistoryNavigationContext=n;let t=class extends L.FindInput{constructor(f,d,l,o){super(f,d,l);const c=this._register(o.createScoped(this.inputBox.element));this._register(n(c,this.inputBox))}};e.ContextScopedFindInput=t,e.ContextScopedFindInput=t=Ie([ge(3,y.IContextKeyService)],t);let r=class extends I.ReplaceInput{constructor(f,d,l,o,c=!1){super(f,d,c,l);const a=this._register(o.createScoped(this.inputBox.element));this._register(n(a,this.inputBox))}};e.ContextScopedReplaceInput=r,e.ContextScopedReplaceInput=r=Ie([ge(3,y.IContextKeyService)],r),D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(_),y.ContextKeyExpr.equals(C,!0),y.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:16,secondary:[528],handler:u=>{s?.showPreviousValue()}}),D.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:y.ContextKeyExpr.and(y.ContextKeyExpr.has(_),y.ContextKeyExpr.equals(v,!0),y.ContextKeyExpr.not("isComposing"),e.historyNavigationVisible.isEqualTo(!1)),primary:18,secondary:[530],handler:u=>{s?.showNextValue()}})}),define(te[133],ie([1,0,19,9,69,2,59,20,21,12,5,65,127,701,30,25,15,18,350]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickSuggestionsOptions=e.showSimpleSuggestions=e.getSuggestionComparator=e.provideSuggestionItems=e.CompletionItemModel=e.getSnippetSuggestSupport=e.CompletionOptions=e.CompletionItem=e.suggestWidgetStatusbarMenu=e.Context=void 0,e.Context={Visible:d.historyNavigationVisible,HasFocusedSuggestion:new u.RawContextKey("suggestWidgetHasFocusedSuggestion",!1,(0,n.localize)(0,null)),DetailsVisible:new u.RawContextKey("suggestWidgetDetailsVisible",!1,(0,n.localize)(1,null)),MultipleSuggestions:new u.RawContextKey("suggestWidgetMultipleSuggestions",!1,(0,n.localize)(2,null)),MakesTextEdit:new u.RawContextKey("suggestionMakesTextEdit",!0,(0,n.localize)(3,null)),AcceptSuggestionsOnEnter:new u.RawContextKey("acceptSuggestionOnEnter",!0,(0,n.localize)(4,null)),HasInsertAndReplaceRange:new u.RawContextKey("suggestionHasInsertAndReplaceRange",!1,(0,n.localize)(5,null)),InsertMode:new u.RawContextKey("suggestionInsertMode",void 0,{type:"string",description:(0,n.localize)(6,null)}),CanResolve:new u.RawContextKey("suggestionCanResolve",!1,(0,n.localize)(7,null))},e.suggestWidgetStatusbarMenu=new t.MenuId("suggestWidgetStatusBar");class l{constructor(T,N,A,P){var O;this.position=T,this.completion=N,this.container=A,this.provider=P,this.isInvalid=!1,this.score=y.FuzzyScore.Default,this.distance=0,this.textLabel=typeof N.label=="string"?N.label:(O=N.label)===null||O===void 0?void 0:O.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=N.sortText&&N.sortText.toLowerCase(),this.filterTextLow=N.filterText&&N.filterText.toLowerCase(),this.extensionId=N.extensionId,C.Range.isIRange(N.range)?(this.editStart=new v.Position(N.range.startLineNumber,N.range.startColumn),this.editInsertEnd=new v.Position(N.range.endLineNumber,N.range.endColumn),this.editReplaceEnd=new v.Position(N.range.endLineNumber,N.range.endColumn),this.isInvalid=this.isInvalid||C.Range.spansMultipleLines(N.range)||N.range.startLineNumber!==T.lineNumber):(this.editStart=new v.Position(N.range.insert.startLineNumber,N.range.insert.startColumn),this.editInsertEnd=new v.Position(N.range.insert.endLineNumber,N.range.insert.endColumn),this.editReplaceEnd=new v.Position(N.range.replace.endLineNumber,N.range.replace.endColumn),this.isInvalid=this.isInvalid||C.Range.spansMultipleLines(N.range.insert)||C.Range.spansMultipleLines(N.range.replace)||N.range.insert.startLineNumber!==T.lineNumber||N.range.replace.startLineNumber!==T.lineNumber||N.range.insert.startColumn!==N.range.replace.startColumn),typeof P.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._resolveDuration=0)}get isResolved(){return this._resolveDuration!==void 0}get resolveDuration(){return this._resolveDuration!==void 0?this._resolveDuration:-1}resolve(T){return be(this,void 0,void 0,function*(){if(!this._resolveCache){const N=T.onCancellationRequested(()=>{this._resolveCache=void 0,this._resolveDuration=void 0}),A=new S.StopWatch(!0);this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,T)).then(P=>{Object.assign(this.completion,P),this._resolveDuration=A.elapsed()},P=>{(0,I.isCancellationError)(P)&&(this._resolveCache=void 0,this._resolveDuration=void 0)}).finally(()=>{N.dispose()})}return this._resolveCache})}}e.CompletionItem=l;class o{constructor(T=2,N=new Set,A=new Set,P=new Map,O=!0){this.snippetSortOrder=T,this.kindFilter=N,this.providerFilter=A,this.providerItemsToReuse=P,this.showDeprecated=O}}e.CompletionOptions=o,o.default=new o;let c;function a(){return c}e.getSnippetSuggestSupport=a;class g{constructor(T,N,A,P){this.items=T,this.needsClipboard=N,this.durations=A,this.disposable=P}}e.CompletionItemModel=g;function h(B,T,N,A=o.default,P={triggerKind:0},O=L.CancellationToken.None){return be(this,void 0,void 0,function*(){const x=new S.StopWatch;N=N.clone();const W=T.getWordAtPosition(N),U=W?new C.Range(N.lineNumber,W.startColumn,N.lineNumber,W.endColumn):C.Range.fromPositions(N),F={replace:U,insert:U.setEndPosition(N.lineNumber,N.column)},G=[],Y=new D.DisposableStore,ne=[];let se=!1;const J=(H,V,Z)=>{var ee,le,ue;let de=!1;if(!V)return de;for(const ce of V.suggestions)if(!A.kindFilter.has(ce.kind)){if(!A.showDeprecated&&(!((ee=ce?.tags)===null||ee===void 0)&&ee.includes(1)))continue;ce.range||(ce.range=F),ce.sortText||(ce.sortText=typeof ce.label=="string"?ce.label:ce.label.label),!se&&ce.insertTextRules&&ce.insertTextRules&4&&(se=i.SnippetParser.guessNeedsClipboard(ce.insertText)),G.push(new l(N,ce,V,H)),de=!0}return(0,D.isDisposable)(V)&&Y.add(V),ne.push({providerName:(le=H._debugDisplayName)!==null&&le!==void 0?le:"unknown_provider",elapsedProvider:(ue=V.duration)!==null&&ue!==void 0?ue:-1,elapsedOverall:Z.elapsed()}),de},q=(()=>be(this,void 0,void 0,function*(){if(!c||A.kindFilter.has(27))return;const H=A.providerItemsToReuse.get(c);if(H){H.forEach(ee=>G.push(ee));return}if(A.providerFilter.size>0&&!A.providerFilter.has(c))return;const V=new S.StopWatch,Z=yield c.provideCompletionItems(T,N,P,O);J(c,Z,V)}))();for(const H of B.orderedGroups(T)){let V=!1;if(yield Promise.all(H.map(Z=>be(this,void 0,void 0,function*(){if(A.providerItemsToReuse.has(Z)){const ee=A.providerItemsToReuse.get(Z);ee.forEach(le=>G.push(le)),V=V||ee.length>0;return}if(!(A.providerFilter.size>0&&!A.providerFilter.has(Z)))try{const ee=new S.StopWatch,le=yield Z.provideCompletionItems(T,N,P,O);V=J(Z,le,ee)||V}catch(ee){(0,I.onUnexpectedExternalError)(ee)}}))),V||O.isCancellationRequested)break}return yield q,O.isCancellationRequested?(Y.dispose(),Promise.reject(new I.CancellationError)):new g(G.sort(k(A.snippetSortOrder)),se,{entries:ne,elapsed:x.elapsed()},Y)})}e.provideSuggestionItems=h;function p(B,T){if(B.sortTextLow&&T.sortTextLow){if(B.sortTextLowT.sortTextLow)return 1}return B.textLabelT.textLabel?1:B.completion.kind-T.completion.kind}function b(B,T){if(B.completion.kind!==T.completion.kind){if(B.completion.kind===27)return-1;if(T.completion.kind===27)return 1}return p(B,T)}function w(B,T){if(B.completion.kind!==T.completion.kind){if(B.completion.kind===27)return 1;if(T.completion.kind===27)return-1}return p(B,T)}const E=new Map;E.set(0,b),E.set(2,w),E.set(1,p);function k(B){return E.get(B)}e.getSuggestionComparator=k,r.CommandsRegistry.registerCommand("_executeCompletionItemProvider",(B,...T)=>be(void 0,void 0,void 0,function*(){const[N,A,P,O]=T;(0,m.assertType)(_.URI.isUri(N)),(0,m.assertType)(v.Position.isIPosition(A)),(0,m.assertType)(typeof P=="string"||!P),(0,m.assertType)(typeof O=="number"||!O);const{completionProvider:x}=B.get(f.ILanguageFeaturesService),W=yield B.get(s.ITextModelService).createModelReference(N);try{const U={incomplete:!1,suggestions:[]},F=[],G=W.object.textEditorModel.validatePosition(A),Y=yield h(x,W.object.textEditorModel,G,void 0,{triggerCharacter:P??void 0,triggerKind:P?1:0});for(const ne of Y.items)F.length<(O??0)&&F.push(ne.resolve(L.CancellationToken.None)),U.incomplete=U.incomplete||ne.container.incomplete,U.suggestions.push(ne.completion);try{return yield Promise.all(F),U}finally{setTimeout(()=>Y.disposable.dispose(),100)}}finally{W.dispose()}}));function M(B,T){var N;(N=B.getContribution("editor.contrib.suggestController"))===null||N===void 0||N.triggerSuggest(new Set().add(T),void 0,!0)}e.showSimpleSuggestions=M;class R{static isAllOff(T){return T.other==="off"&&T.comments==="off"&&T.strings==="off"}static isAllOn(T){return T.other==="on"&&T.comments==="on"&&T.strings==="on"}static valueFor(T,N){switch(N){case 1:return T.comments;case 2:return T.strings;default:return T.other}}}e.QuickSuggestionsOptions=R}),define(te[134],ie([1,0,13,2,35]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessRegistry=e.Extensions=e.DefaultQuickAccessFilterValue=void 0;var D;(function(m){m[m.PRESERVE=0]="PRESERVE",m[m.LAST=1]="LAST"})(D||(e.DefaultQuickAccessFilterValue=D={})),e.Extensions={Quickaccess:"workbench.contributions.quickaccess"};class S{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(_){return _.prefix.length===0?this.defaultProvider=_:this.providers.push(_),this.providers.sort((v,C)=>C.prefix.length-v.prefix.length),(0,I.toDisposable)(()=>{this.providers.splice(this.providers.indexOf(_),1),this.defaultProvider===_&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return(0,L.coalesce)([this.defaultProvider,...this.providers])}getQuickAccessProvider(_){return _&&this.providers.find(C=>_.startsWith(C.prefix))||void 0||this.defaultProvider}}e.QuickAccessRegistry=S,y.Registry.add(e.Extensions.Quickaccess,new S)}),define(te[785],ie([1,0,732,35,2,34,134,67]),function($,e,L,I,y,D,S,m){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.HelpQuickAccessProvider=void 0;let v=_=class{constructor(s,i){this.quickInputService=s,this.keybindingService=i,this.registry=I.Registry.as(S.Extensions.Quickaccess)}provide(s){const i=new y.DisposableStore;return i.add(s.onDidAccept(()=>{const[n]=s.selectedItems;n&&this.quickInputService.quickAccess.show(n.prefix,{preserveValue:!0})})),i.add(s.onDidChangeValue(n=>{const t=this.registry.getQuickAccessProvider(n.substr(_.PREFIX.length));t&&t.prefix&&t.prefix!==_.PREFIX&&this.quickInputService.quickAccess.show(t.prefix,{preserveValue:!0})})),s.items=this.getQuickAccessProviders().filter(n=>n.prefix!==_.PREFIX),i}getQuickAccessProviders(){return this.registry.getQuickAccessProviders().sort((i,n)=>i.prefix.localeCompare(n.prefix)).flatMap(i=>this.createPicks(i))}createPicks(s){return s.helpEntries.map(i=>{const n=i.prefix||s.prefix,t=n||"\u2026";return{prefix:n,label:t,keybinding:i.commandId?this.keybindingService.lookupKeybinding(i.commandId):void 0,ariaLabel:(0,L.localize)(0,null,t,i.description),description:i.description}})}};e.HelpQuickAccessProvider=v,v.PREFIX="?",e.HelpQuickAccessProvider=v=_=Ie([ge(0,m.IQuickInputService),ge(1,D.IKeybindingService)],v)}),define(te[786],ie([1,0,35,134,93,785]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),L.Registry.as(I.Extensions.Quickaccess).registerQuickAccessProvider({ctor:D.HelpQuickAccessProvider,prefix:"",helpEntries:[{description:y.QuickHelpNLS.helpQuickAccessActionLabel}]})}),define(te[787],ie([1,0,14,19,6,2,8,134,67,35]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickAccessController=void 0;let C=class extends D.Disposable{constructor(i,n){super(),this.quickInputService=i,this.instantiationService=n,this.registry=v.Registry.as(m.Extensions.Quickaccess),this.mapProviderToDescriptor=new Map,this.lastAcceptedPickerValues=new Map,this.visibleQuickAccess=void 0}show(i="",n){this.doShowOrPick(i,!1,n)}doShowOrPick(i,n,t){var r;const[u,f]=this.getOrInstantiateProvider(i),d=this.visibleQuickAccess,l=d?.descriptor;if(d&&f&&l===f){i!==f.prefix&&!t?.preserveValue&&(d.picker.value=i),this.adjustValueSelection(d.picker,f,t);return}if(f&&!t?.preserveValue){let h;if(d&&l&&l!==f){const p=d.value.substr(l.prefix.length);p&&(h=`${f.prefix}${p}`)}if(!h){const p=u?.defaultFilterValue;p===m.DefaultQuickAccessFilterValue.LAST?h=this.lastAcceptedPickerValues.get(f):typeof p=="string"&&(h=`${f.prefix}${p}`)}typeof h=="string"&&(i=h)}const o=new D.DisposableStore,c=o.add(this.quickInputService.createQuickPick());c.value=i,this.adjustValueSelection(c,f,t),c.placeholder=f?.placeholder,c.quickNavigate=t?.quickNavigateConfiguration,c.hideInput=!!c.quickNavigate&&!d,(typeof t?.itemActivation=="number"||t?.quickNavigateConfiguration)&&(c.itemActivation=(r=t?.itemActivation)!==null&&r!==void 0?r:_.ItemActivation.SECOND),c.contextKey=f?.contextKey,c.filterValue=h=>h.substring(f?f.prefix.length:0);let a;n&&(a=new L.DeferredPromise,o.add(y.Event.once(c.onWillAccept)(h=>{h.veto(),c.hide()}))),o.add(this.registerPickerListeners(c,u,f,i,t?.providerOptions));const g=o.add(new I.CancellationTokenSource);if(u&&o.add(u.provide(c,g.token,t?.providerOptions)),y.Event.once(c.onDidHide)(()=>{c.selectedItems.length===0&&g.cancel(),o.dispose(),a?.complete(c.selectedItems.slice(0))}),c.show(),n)return a?.p}adjustValueSelection(i,n,t){var r;let u;t?.preserveValue?u=[i.value.length,i.value.length]:u=[(r=n?.prefix.length)!==null&&r!==void 0?r:0,i.value.length],i.valueSelection=u}registerPickerListeners(i,n,t,r,u){const f=new D.DisposableStore,d=this.visibleQuickAccess={picker:i,descriptor:t,value:r};return f.add((0,D.toDisposable)(()=>{d===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),f.add(i.onDidChangeValue(l=>{const[o]=this.getOrInstantiateProvider(l);o!==n?this.show(l,{preserveValue:!0,providerOptions:u}):d.value=l})),t&&f.add(i.onDidAccept(()=>{this.lastAcceptedPickerValues.set(t,i.value)})),f}getOrInstantiateProvider(i){const n=this.registry.getQuickAccessProvider(i);if(!n)return[void 0,void 0];let t=this.mapProviderToDescriptor.get(n);return t||(t=this.instantiationService.createInstance(n.ctor),this.mapProviderToDescriptor.set(n,t)),[t,n]}};e.QuickAccessController=C,e.QuickAccessController=C=Ie([ge(0,_.IQuickInputService),ge(1,S.IInstantiationService)],C)}),define(te[788],ie([1,0,26,27,98,478]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SeverityIcon=void 0;var D;(function(S){function m(_){switch(_){case y.default.Ignore:return"severity-ignore "+I.ThemeIcon.asClassName(L.Codicon.info);case y.default.Info:return I.ThemeIcon.asClassName(L.Codicon.info);case y.default.Warning:return I.ThemeIcon.asClassName(L.Codicon.warning);case y.default.Error:return I.ThemeIcon.asClassName(L.Codicon.error);default:return""}}S.className=m})(D||(e.SeverityIcon=D={}))}),define(te[89],ie([1,0,6,2,20,591,8]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemoryStorageService=e.AbstractStorageService=e.loadKeyTargets=e.WillSaveStateReason=e.IStorageService=e.TARGET_KEY=void 0,e.TARGET_KEY="__$__targetStorageMarker",e.IStorageService=(0,S.createDecorator)("storageService");var m;(function(s){s[s.NONE=0]="NONE",s[s.SHUTDOWN=1]="SHUTDOWN"})(m||(e.WillSaveStateReason=m={}));function _(s){const i=s.get(e.TARGET_KEY);if(i)try{return JSON.parse(i)}catch{}return Object.create(null)}e.loadKeyTargets=_;class v extends I.Disposable{constructor(i={flushInterval:v.DEFAULT_FLUSH_INTERVAL}){super(),this.options=i,this._onDidChangeValue=this._register(new L.PauseableEmitter),this._onDidChangeTarget=this._register(new L.PauseableEmitter),this._onWillSaveState=this._register(new L.Emitter),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._profileKeyTargets=void 0,this._applicationKeyTargets=void 0}onDidChangeValue(i,n,t){return L.Event.filter(this._onDidChangeValue.event,r=>r.scope===i&&(n===void 0||r.key===n),t)}emitDidChangeValue(i,n){const{key:t,external:r}=n;if(t===e.TARGET_KEY){switch(i){case-1:this._applicationKeyTargets=void 0;break;case 0:this._profileKeyTargets=void 0;break;case 1:this._workspaceKeyTargets=void 0;break}this._onDidChangeTarget.fire({scope:i})}else this._onDidChangeValue.fire({scope:i,key:t,target:this.getKeyTargets(i)[t],external:r})}get(i,n,t){var r;return(r=this.getStorage(n))===null||r===void 0?void 0:r.get(i,t)}getBoolean(i,n,t){var r;return(r=this.getStorage(n))===null||r===void 0?void 0:r.getBoolean(i,t)}getNumber(i,n,t){var r;return(r=this.getStorage(n))===null||r===void 0?void 0:r.getNumber(i,t)}store(i,n,t,r,u=!1){if((0,y.isUndefinedOrNull)(n)){this.remove(i,t,u);return}this.withPausedEmitters(()=>{var f;this.updateKeyTarget(i,t,r),(f=this.getStorage(t))===null||f===void 0||f.set(i,n,u)})}remove(i,n,t=!1){this.withPausedEmitters(()=>{var r;this.updateKeyTarget(i,n,void 0),(r=this.getStorage(n))===null||r===void 0||r.delete(i,t)})}withPausedEmitters(i){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{i()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(i,n,t,r=!1){var u,f;const d=this.getKeyTargets(n);typeof t=="number"?d[i]!==t&&(d[i]=t,(u=this.getStorage(n))===null||u===void 0||u.set(e.TARGET_KEY,JSON.stringify(d),r)):typeof d[i]=="number"&&(delete d[i],(f=this.getStorage(n))===null||f===void 0||f.set(e.TARGET_KEY,JSON.stringify(d),r))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get profileKeyTargets(){return this._profileKeyTargets||(this._profileKeyTargets=this.loadKeyTargets(0)),this._profileKeyTargets}get applicationKeyTargets(){return this._applicationKeyTargets||(this._applicationKeyTargets=this.loadKeyTargets(-1)),this._applicationKeyTargets}getKeyTargets(i){switch(i){case-1:return this.applicationKeyTargets;case 0:return this.profileKeyTargets;default:return this.workspaceKeyTargets}}loadKeyTargets(i){const n=this.getStorage(i);return n?_(n):Object.create(null)}}e.AbstractStorageService=v,v.DEFAULT_FLUSH_INTERVAL=60*1e3;class C extends v{constructor(){super(),this.applicationStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase,{hint:D.StorageHint.STORAGE_IN_MEMORY})),this.profileStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase,{hint:D.StorageHint.STORAGE_IN_MEMORY})),this.workspaceStorage=this._register(new D.Storage(new D.InMemoryStorageDatabase,{hint:D.StorageHint.STORAGE_IN_MEMORY})),this._register(this.workspaceStorage.onDidChangeStorage(i=>this.emitDidChangeValue(1,i))),this._register(this.profileStorage.onDidChangeStorage(i=>this.emitDidChangeValue(0,i))),this._register(this.applicationStorage.onDidChangeStorage(i=>this.emitDidChangeValue(-1,i)))}getStorage(i){switch(i){case-1:return this.applicationStorage;case 0:return this.profileStorage;default:return this.workspaceStorage}}}e.InMemoryStorageService=C}),define(te[789],ie([1,0,14,6,56,5,336,47,8,89]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensCache=e.ICodeLensCache=void 0,e.ICodeLensCache=(0,_.createDecorator)("ICodeLensCache");class C{constructor(n,t){this.lineCount=n,this.data=t}}let s=class{constructor(n){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new y.LRUCache(20,.75);const t="codelens/cache";(0,L.runWhenIdle)(()=>n.remove(t,1));const r="codelens/cache2",u=n.get(r,1,"{}");this._deserialize(u),I.Event.once(n.onWillSaveState)(f=>{f.reason===v.WillSaveStateReason.SHUTDOWN&&n.store(r,this._serialize(),1,1)})}put(n,t){const r=t.lenses.map(d=>{var l;return{range:d.symbol.range,command:d.symbol.command&&{id:"",title:(l=d.symbol.command)===null||l===void 0?void 0:l.title}}}),u=new S.CodeLensModel;u.add({lenses:r,dispose:()=>{}},this._fakeProvider);const f=new C(n.getLineCount(),u);this._cache.set(n.uri.toString(),f)}get(n){const t=this._cache.get(n.uri.toString());return t&&t.lineCount===n.getLineCount()?t.data:void 0}delete(n){this._cache.delete(n.uri.toString())}_serialize(){const n=Object.create(null);for(const[t,r]of this._cache){const u=new Set;for(const f of r.data.lenses)u.add(f.symbol.range.startLineNumber);n[t]={lineCount:r.lineCount,lines:[...u.values()]}}return JSON.stringify(n)}_deserialize(n){try{const t=JSON.parse(n);for(const r in t){const u=t[r],f=[];for(const l of u.lines)f.push({range:new D.Range(l,1,l,11)});const d=new S.CodeLensModel;d.add({lenses:f,dispose(){}},this._fakeProvider),this._cache.set(r,new C(u.lineCount,d))}}catch{}}};e.CodeLensCache=s,e.CodeLensCache=s=Ie([ge(0,v.IStorageService)],s),(0,m.registerSingleton)(e.ICodeLensCache,s,1)}),define(te[351],ie([1,0,14,2,56,197,29,28,47,8,89]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";var s;Object.defineProperty(e,"__esModule",{value:!0}),e.ISuggestMemoryService=e.SuggestMemoryService=e.PrefixMemory=e.LRUMemory=e.NoMemory=e.Memory=void 0;class i{constructor(d){this.name=d}select(d,l,o){if(o.length===0)return 0;const c=o[0].score[0];for(let a=0;ap&&E.type===o[b].completion.kind&&E.insertText===o[b].completion.insertText&&(p=E.touch,h=b),o[b].completion.preselect&&g===-1)return g=b}return h!==-1?h:g!==-1?g:0}toJSON(){return this._cache.toJSON()}fromJSON(d){this._cache.clear();const l=0;for(const[o,c]of d)c.touch=l,c.type=typeof c.type=="number"?c.type:S.CompletionItemKinds.fromString(c.type),this._cache.set(o,c);this._seq=this._cache.size}}e.LRUMemory=t;class r extends i{constructor(){super("recentlyUsedByPrefix"),this._trie=D.TernarySearchTree.forStrings(),this._seq=0}memorize(d,l,o){const{word:c}=d.getWordUntilPosition(l),a=`${d.getLanguageId()}/${c}`;this._trie.set(a,{type:o.completion.kind,insertText:o.completion.insertText,touch:this._seq++})}select(d,l,o){const{word:c}=d.getWordUntilPosition(l);if(!c)return super.select(d,l,o);const a=`${d.getLanguageId()}/${c}`;let g=this._trie.get(a);if(g||(g=this._trie.findSubstr(a)),g)for(let h=0;hd.push([o,l])),d.sort((l,o)=>-(l[1].touch-o[1].touch)).forEach((l,o)=>l[1].touch=o),d.slice(0,200)}fromJSON(d){if(this._trie.clear(),d.length>0){this._seq=d[0][1].touch+1;for(const[l,o]of d)o.type=typeof o.type=="number"?o.type:S.CompletionItemKinds.fromString(o.type),this._trie.set(l,o)}}}e.PrefixMemory=r;let u=s=class{constructor(d,l){this._storageService=d,this._configService=l,this._disposables=new I.DisposableStore,this._persistSoon=new L.RunOnceScheduler(()=>this._saveState(),500),this._disposables.add(d.onWillSaveState(o=>{o.reason===C.WillSaveStateReason.SHUTDOWN&&this._saveState()}))}dispose(){this._disposables.dispose(),this._persistSoon.dispose()}memorize(d,l,o){this._withStrategy(d,l).memorize(d,l,o),this._persistSoon.schedule()}select(d,l,o){return this._withStrategy(d,l).select(d,l,o)}_withStrategy(d,l){var o;const c=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:d.getLanguageIdAtPosition(l.lineNumber,l.column),resource:d.uri});if(((o=this._strategy)===null||o===void 0?void 0:o.name)!==c){this._saveState();const a=s._strategyCtors.get(c)||n;this._strategy=new a;try{const h=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,p=this._storageService.get(`${s._storagePrefix}/${c}`,h);p&&this._strategy.fromJSON(JSON.parse(p))}catch{}}return this._strategy}_saveState(){if(this._strategy){const l=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,o=JSON.stringify(this._strategy);this._storageService.store(`${s._storagePrefix}/${this._strategy.name}`,o,l,1)}}};e.SuggestMemoryService=u,u._strategyCtors=new Map([["recentlyUsedByPrefix",r],["recentlyUsed",t],["first",n]]),u._storagePrefix="suggest/memories",e.SuggestMemoryService=u=s=Ie([ge(0,C.IStorageService),ge(1,m.IConfigurationService)],u),e.ISuggestMemoryService=(0,v.createDecorator)("ISuggestMemories"),(0,_.registerSingleton)(e.ISuggestMemoryService,u,1)}),define(te[790],ie([1,0,14,6,2,30,25,15,41,89,13,720]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";var i,n;Object.defineProperty(e,"__esModule",{value:!0}),e.MenuService=void 0;let t=class{constructor(o,c){this._commandService=o,this._hiddenStates=new r(c)}createMenu(o,c,a){return new f(o,this._hiddenStates,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},a),this._commandService,c)}resetHiddenStates(o){this._hiddenStates.reset(o)}};e.MenuService=t,e.MenuService=t=Ie([ge(0,S.ICommandService),ge(1,v.IStorageService)],t);let r=i=class{constructor(o){this._storageService=o,this._disposables=new y.DisposableStore,this._onDidChange=new I.Emitter,this.onDidChange=this._onDidChange.event,this._ignoreChangeEvent=!1,this._hiddenByDefaultCache=new Map;try{const c=o.get(i._key,0,"{}");this._data=JSON.parse(c)}catch{this._data=Object.create(null)}this._disposables.add(o.onDidChangeValue(0,i._key,this._disposables)(()=>{if(!this._ignoreChangeEvent)try{const c=o.get(i._key,0,"{}");this._data=JSON.parse(c)}catch(c){console.log("FAILED to read storage after UPDATE",c)}this._onDidChange.fire()}))}dispose(){this._onDidChange.dispose(),this._disposables.dispose()}_isHiddenByDefault(o,c){var a;return(a=this._hiddenByDefaultCache.get(`${o.id}/${c}`))!==null&&a!==void 0?a:!1}setDefaultState(o,c,a){this._hiddenByDefaultCache.set(`${o.id}/${c}`,a)}isHidden(o,c){var a,g;const h=this._isHiddenByDefault(o,c),p=(g=(a=this._data[o.id])===null||a===void 0?void 0:a.includes(c))!==null&&g!==void 0?g:!1;return h?!p:p}updateHidden(o,c,a){this._isHiddenByDefault(o,c)&&(a=!a);const h=this._data[o.id];if(a)h?h.indexOf(c)<0&&h.push(c):this._data[o.id]=[c];else if(h){const p=h.indexOf(c);p>=0&&(0,C.removeFastWithoutKeepingOrder)(h,p),h.length===0&&delete this._data[o.id]}this._persist()}reset(o){if(o===void 0)this._data=Object.create(null),this._persist();else{for(const{id:c}of o)this._data[c]&&delete this._data[c];this._persist()}}_persist(){try{this._ignoreChangeEvent=!0;const o=JSON.stringify(this._data);this._storageService.store(i._key,o,0,0)}finally{this._ignoreChangeEvent=!1}}};r._key="menu.hiddenCommands",r=i=Ie([ge(0,v.IStorageService)],r);let u=n=class{constructor(o,c,a,g,h){this._id=o,this._hiddenStates=c,this._collectContextKeysForSubmenus=a,this._commandService=g,this._contextKeyService=h,this._menuGroups=[],this._structureContextKeys=new Set,this._preconditionContextKeys=new Set,this._toggledContextKeys=new Set,this.refresh()}get structureContextKeys(){return this._structureContextKeys}get preconditionContextKeys(){return this._preconditionContextKeys}get toggledContextKeys(){return this._toggledContextKeys}refresh(){this._menuGroups.length=0,this._structureContextKeys.clear(),this._preconditionContextKeys.clear(),this._toggledContextKeys.clear();const o=D.MenuRegistry.getMenuItems(this._id);let c;o.sort(n._compareMenuItems);for(const a of o){const g=a.group||"";(!c||c[0]!==g)&&(c=[g,[]],this._menuGroups.push(c)),c[1].push(a),this._collectContextKeys(a)}}_collectContextKeys(o){if(n._fillInKbExprKeys(o.when,this._structureContextKeys),(0,D.isIMenuItem)(o)){if(o.command.precondition&&n._fillInKbExprKeys(o.command.precondition,this._preconditionContextKeys),o.command.toggled){const c=o.command.toggled.condition||o.command.toggled;n._fillInKbExprKeys(c,this._toggledContextKeys)}}else this._collectContextKeysForSubmenus&&D.MenuRegistry.getMenuItems(o.submenu).forEach(this._collectContextKeys,this)}createActionGroups(o){const c=[];for(const a of this._menuGroups){const[g,h]=a,p=[];for(const b of h)if(this._contextKeyService.contextMatchesRules(b.when)){const w=(0,D.isIMenuItem)(b);w&&this._hiddenStates.setDefaultState(this._id,b.command.id,!!b.isHiddenByDefault);const E=d(this._id,w?b.command:b,this._hiddenStates);if(w)p.push(new D.MenuItemAction(b.command,b.alt,o,E,this._contextKeyService,this._commandService));else{const k=new n(b.submenu,this._hiddenStates,this._collectContextKeysForSubmenus,this._commandService,this._contextKeyService).createActionGroups(o),M=_.Separator.join(...k.map(R=>R[1]));M.length>0&&p.push(new D.SubmenuItemAction(b,E,M))}}p.length>0&&c.push([g,p])}return c}static _fillInKbExprKeys(o,c){if(o)for(const a of o.keys())c.add(a)}static _compareMenuItems(o,c){const a=o.group,g=c.group;if(a!==g){if(a){if(!g)return-1}else return 1;if(a==="navigation")return-1;if(g==="navigation")return 1;const b=a.localeCompare(g);if(b!==0)return b}const h=o.order||0,p=c.order||0;return hp?1:n._compareTitles((0,D.isIMenuItem)(o)?o.command.title:o.title,(0,D.isIMenuItem)(c)?c.command.title:c.title)}static _compareTitles(o,c){const a=typeof o=="string"?o:o.original,g=typeof c=="string"?c:c.original;return a.localeCompare(g)}};u=n=Ie([ge(3,S.ICommandService),ge(4,m.IContextKeyService)],u);let f=class{constructor(o,c,a,g,h){this._disposables=new y.DisposableStore,this._menuInfo=new u(o,c,a.emitEventsForSubmenuChanges,g,h);const p=new L.RunOnceScheduler(()=>{this._menuInfo.refresh(),this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!0,isToggleChange:!0})},a.eventDebounceDelay);this._disposables.add(p),this._disposables.add(D.MenuRegistry.onDidChangeMenu(k=>{k.has(o)&&p.schedule()}));const b=this._disposables.add(new y.DisposableStore),w=k=>{let M=!1,R=!1,B=!1;for(const T of k)if(M=M||T.isStructuralChange,R=R||T.isEnablementChange,B=B||T.isToggleChange,M&&R&&B)break;return{menu:this,isStructuralChange:M,isEnablementChange:R,isToggleChange:B}},E=()=>{b.add(h.onDidChangeContext(k=>{const M=k.affectsSome(this._menuInfo.structureContextKeys),R=k.affectsSome(this._menuInfo.preconditionContextKeys),B=k.affectsSome(this._menuInfo.toggledContextKeys);(M||R||B)&&this._onDidChange.fire({menu:this,isStructuralChange:M,isEnablementChange:R,isToggleChange:B})})),b.add(c.onDidChange(k=>{this._onDidChange.fire({menu:this,isStructuralChange:!0,isEnablementChange:!1,isToggleChange:!1})}))};this._onDidChange=new I.DebounceEmitter({onWillAddFirstListener:E,onDidRemoveLastListener:b.clear.bind(b),delay:a.eventDebounceDelay,merge:w}),this.onDidChange=this._onDidChange.event}getActions(o){return this._menuInfo.createActionGroups(o)}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}};f=Ie([ge(3,S.ICommandService),ge(4,m.IContextKeyService)],f);function d(l,o,c){const a=(0,D.isISubmenuItem)(o)?o.submenu.id:o.id,g=typeof o.title=="string"?o.title:o.title.value,h=(0,_.toAction)({id:`hide/${l.id}/${a}`,label:(0,s.localize)(0,null,g),run(){c.updateHidden(l,a,!0)}}),p=(0,_.toAction)({id:`toggle/${l.id}/${a}`,label:g,get checked(){return!c.isHidden(l,a)},run(){c.updateHidden(l,a,!!this.checked)}});return{hide:h,toggle:p,get isHidden(){return!p.checked}}}}),define(te[76],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ITelemetryService=void 0,e.ITelemetryService=(0,L.createDecorator)("telemetryService")}),define(te[16],ie([1,0,607,21,33,12,50,65,30,25,15,8,117,35,76,20,66,7]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectAllCommand=e.RedoCommand=e.UndoCommand=e.EditorExtensionsRegistry=e.registerEditorContribution=e.registerInstantiatedEditorAction=e.registerMultiEditorAction=e.registerEditorAction=e.registerEditorCommand=e.registerModelAndPositionCommand=e.EditorAction2=e.MultiEditorAction=e.EditorAction=e.EditorCommand=e.ProxyCommand=e.MultiCommand=e.Command=void 0;class d{constructor(P){this.id=P.id,this.precondition=P.precondition,this._kbOpts=P.kbOpts,this._menuOpts=P.menuOpts,this._description=P.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const P=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const O of P){let x=O.kbExpr;this.precondition&&(x?x=C.ContextKeyExpr.and(x,this.precondition):x=this.precondition);const W={id:this.id,weight:O.weight,args:O.args,when:x,primary:O.primary,secondary:O.secondary,win:O.win,linux:O.linux,mac:O.mac};i.KeybindingsRegistry.registerKeybindingRule(W)}}v.CommandsRegistry.registerCommand({id:this.id,handler:(P,O)=>this.runCommand(P,O),description:this._description})}_registerMenuItem(P){_.MenuRegistry.appendMenuItem(P.menuId,{group:P.group,command:{id:this.id,title:P.title,icon:P.icon,precondition:this.precondition},when:P.when,order:P.order})}}e.Command=d;class l extends d{constructor(){super(...arguments),this._implementations=[]}addImplementation(P,O,x,W){return this._implementations.push({priority:P,name:O,implementation:x,when:W}),this._implementations.sort((U,F)=>F.priority-U.priority),{dispose:()=>{for(let U=0;U{if(G.get(C.IContextKeyService).contextMatchesRules(x??void 0))return W(G,F,O)})}runCommand(P,O){return c.runEditorCommand(P,O,this.precondition,(x,W,U)=>this.runEditorCommand(x,W,U))}}e.EditorCommand=c;class a extends c{static convertOptions(P){let O;Array.isArray(P.menuOpts)?O=P.menuOpts:P.menuOpts?O=[P.menuOpts]:O=[];function x(W){return W.menuId||(W.menuId=_.MenuId.EditorContext),W.title||(W.title=P.label),W.when=C.ContextKeyExpr.and(P.precondition,W.when),W}return Array.isArray(P.contextMenuOpts)?O.push(...P.contextMenuOpts.map(x)):P.contextMenuOpts&&O.push(x(P.contextMenuOpts)),P.menuOpts=O,P}constructor(P){super(a.convertOptions(P)),this.label=P.label,this.alias=P.alias}runEditorCommand(P,O,x){return this.reportTelemetry(P,O),this.run(P,O,x||{})}reportTelemetry(P,O){P.get(t.ITelemetryService).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}e.EditorAction=a;class g extends a{constructor(){super(...arguments),this._implementations=[]}addImplementation(P,O){return this._implementations.push([P,O]),this._implementations.sort((x,W)=>W[0]-x[0]),{dispose:()=>{for(let x=0;x{var F,G;const Y=U.get(C.IContextKeyService),ne=U.get(u.ILogService);if(!Y.contextMatchesRules((F=this.desc.precondition)!==null&&F!==void 0?F:void 0)){ne.debug("[EditorAction2] NOT running command because its precondition is FALSE",this.desc.id,(G=this.desc.precondition)===null||G===void 0?void 0:G.serialize());return}return this.runEditorCommand(U,W,...O)})}}e.EditorAction2=h;function p(A,P){v.CommandsRegistry.registerCommand(A,function(O,...x){const W=O.get(s.IInstantiationService),[U,F]=x;(0,r.assertType)(I.URI.isUri(U)),(0,r.assertType)(D.Position.isIPosition(F));const G=O.get(S.IModelService).getModel(U);if(G){const Y=D.Position.lift(F);return W.invokeFunction(P,G,Y,...x.slice(2))}return O.get(m.ITextModelService).createModelReference(U).then(Y=>new Promise((ne,se)=>{try{const J=W.invokeFunction(P,Y.object.textEditorModel,D.Position.lift(F),x.slice(2));ne(J)}catch(J){se(J)}}).finally(()=>{Y.dispose()}))})}e.registerModelAndPositionCommand=p;function b(A){return T.INSTANCE.registerEditorCommand(A),A}e.registerEditorCommand=b;function w(A){const P=new A;return T.INSTANCE.registerEditorAction(P),P}e.registerEditorAction=w;function E(A){return T.INSTANCE.registerEditorAction(A),A}e.registerMultiEditorAction=E;function k(A){T.INSTANCE.registerEditorAction(A)}e.registerInstantiatedEditorAction=k;function M(A,P,O){T.INSTANCE.registerEditorContribution(A,P,O)}e.registerEditorContribution=M;var R;(function(A){function P(F){return T.INSTANCE.getEditorCommand(F)}A.getEditorCommand=P;function O(){return T.INSTANCE.getEditorActions()}A.getEditorActions=O;function x(){return T.INSTANCE.getEditorContributions()}A.getEditorContributions=x;function W(F){return T.INSTANCE.getEditorContributions().filter(G=>F.indexOf(G.id)>=0)}A.getSomeEditorContributions=W;function U(){return T.INSTANCE.getDiffEditorContributions()}A.getDiffEditorContributions=U})(R||(e.EditorExtensionsRegistry=R={}));const B={EditorCommonContributions:"editor.contributions"};class T{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(P,O,x){this.editorContributions.push({id:P,ctor:O,instantiation:x})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(P){P.register(),this.editorActions.push(P)}getEditorActions(){return this.editorActions}registerEditorCommand(P){P.register(),this.editorCommands[P.id]=P}getEditorCommand(P){return this.editorCommands[P]||null}}T.INSTANCE=new T,n.Registry.add(B.EditorCommonContributions,T.INSTANCE);function N(A){return A.register(),A}e.UndoCommand=N(new l({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:L.localize(0,null),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:L.localize(1,null),order:1}]})),N(new o(e.UndoCommand,{id:"default:undo",precondition:void 0})),e.RedoCommand=N(new l({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:_.MenuId.MenubarEditMenu,group:"1_do",title:L.localize(2,null),order:2},{menuId:_.MenuId.CommandPalette,group:"",title:L.localize(3,null),order:1}]})),N(new o(e.RedoCommand,{id:"default:redo",precondition:void 0})),e.SelectAllCommand=N(new l({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:_.MenuId.MenubarSelectionMenu,group:"1_basic",title:L.localize(4,null),order:1},{menuId:_.MenuId.CommandPalette,group:"",title:L.localize(5,null),order:1}]}))}),define(te[188],ie([1,0,606,51,20,45,16,33,499,72,205,206,245,12,5,22,15,117,7]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CoreEditingCommands=e.CoreNavigationCommands=e.RevealLine_=e.EditorScroll_=e.CoreEditorCommand=void 0;const l=0;class o extends S.EditorCommand{runEditorCommand(B,T,N){const A=T._getViewModel();A&&this.runCoreEditorCommand(A,N||{})}}e.CoreEditorCommand=o;var c;(function(R){const B=function(N){if(!y.isObject(N))return!1;const A=N;return!(!y.isString(A.to)||!y.isUndefined(A.by)&&!y.isString(A.by)||!y.isUndefined(A.value)&&!y.isNumber(A.value)||!y.isUndefined(A.revealCursor)&&!y.isBoolean(A.revealCursor))};R.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage', 'editor'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:B,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage","editor"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},R.RawDirection={Up:"up",Right:"right",Down:"down",Left:"left"},R.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage",Editor:"editor",Column:"column"};function T(N){let A;switch(N.to){case R.RawDirection.Up:A=1;break;case R.RawDirection.Right:A=2;break;case R.RawDirection.Down:A=3;break;case R.RawDirection.Left:A=4;break;default:return null}let P;switch(N.by){case R.RawUnit.Line:P=1;break;case R.RawUnit.WrappedLine:P=2;break;case R.RawUnit.Page:P=3;break;case R.RawUnit.HalfPage:P=4;break;case R.RawUnit.Editor:P=5;break;case R.RawUnit.Column:P=6;break;default:P=2}const O=Math.floor(N.value||1),x=!!N.revealCursor;return{direction:A,unit:P,value:O,revealCursor:x,select:!!N.select}}R.parse=T})(c||(e.EditorScroll_=c={}));var a;(function(R){const B=function(T){if(!y.isObject(T))return!1;const N=T;return!(!y.isNumber(N.lineNumber)&&!y.isString(N.lineNumber)||!y.isUndefined(N.at)&&!y.isString(N.at))};R.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:B,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},R.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(a||(e.RevealLine_=a={}));class g{constructor(B){B.addImplementation(1e4,"code-editor",(T,N)=>{const A=T.get(m.ICodeEditorService).getFocusedCodeEditor();return A&&A.hasTextFocus()?this._runEditorCommand(T,A,N):!1}),B.addImplementation(1e3,"generic-dom-input-textarea",(T,N)=>{const A=(0,d.getActiveElement)();return A&&["input","textarea"].indexOf(A.tagName.toLowerCase())>=0?(this.runDOMCommand(A),!0):!1}),B.addImplementation(0,"generic-dom",(T,N)=>{const A=T.get(m.ICodeEditorService).getActiveCodeEditor();return A?(A.focus(),this._runEditorCommand(T,A,N)):!1})}_runEditorCommand(B,T,N){const A=this.runEditorCommand(B,T,N);return A||!0}}var h;(function(R){class B extends o{constructor(V){super(V),this._inSelectionMode=V.inSelectionMode}runCoreEditorCommand(V,Z){if(!Z.position)return;V.model.pushStackElement(),V.setCursorStates(Z.source,3,[s.CursorMoveCommands.moveTo(V,V.getPrimaryCursorState(),this._inSelectionMode,Z.position,Z.viewPosition)])&&Z.revealType!==2&&V.revealPrimaryCursor(Z.source,!0,!0)}}R.MoveTo=(0,S.registerEditorCommand)(new B({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),R.MoveToSelect=(0,S.registerEditorCommand)(new B({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class T extends o{runCoreEditorCommand(V,Z){V.model.pushStackElement();const ee=this._getColumnSelectResult(V,V.getPrimaryCursorState(),V.getCursorColumnSelectData(),Z);ee!==null&&(V.setCursorStates(Z.source,3,ee.viewStates.map(le=>v.CursorState.fromViewState(le))),V.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:ee.fromLineNumber,fromViewVisualColumn:ee.fromVisualColumn,toViewLineNumber:ee.toLineNumber,toViewVisualColumn:ee.toVisualColumn}),ee.reversed?V.revealTopMostCursor(Z.source):V.revealBottomMostCursor(Z.source))}}R.ColumnSelect=(0,S.registerEditorCommand)(new class extends T{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(H,V,Z,ee){if(typeof ee.position>"u"||typeof ee.viewPosition>"u"||typeof ee.mouseColumn>"u")return null;const le=H.model.validatePosition(ee.position),ue=H.coordinatesConverter.validateViewPosition(new n.Position(ee.viewPosition.lineNumber,ee.viewPosition.column),le),de=ee.doColumnSelect?Z.fromViewLineNumber:ue.lineNumber,ce=ee.doColumnSelect?Z.fromViewVisualColumn:ee.mouseColumn-1;return _.ColumnSelection.columnSelect(H.cursorConfig,H,de,ce,ue.lineNumber,ee.mouseColumn-1)}}),R.CursorColumnSelectLeft=(0,S.registerEditorCommand)(new class extends T{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(H,V,Z,ee){return _.ColumnSelection.columnSelectLeft(H.cursorConfig,H,Z)}}),R.CursorColumnSelectRight=(0,S.registerEditorCommand)(new class extends T{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(H,V,Z,ee){return _.ColumnSelection.columnSelectRight(H.cursorConfig,H,Z)}});class N extends T{constructor(V){super(V),this._isPaged=V.isPaged}_getColumnSelectResult(V,Z,ee,le){return _.ColumnSelection.columnSelectUp(V.cursorConfig,V,ee,this._isPaged)}}R.CursorColumnSelectUp=(0,S.registerEditorCommand)(new N({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:3600,linux:{primary:0}}})),R.CursorColumnSelectPageUp=(0,S.registerEditorCommand)(new N({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:3595,linux:{primary:0}}}));class A extends T{constructor(V){super(V),this._isPaged=V.isPaged}_getColumnSelectResult(V,Z,ee,le){return _.ColumnSelection.columnSelectDown(V.cursorConfig,V,ee,this._isPaged)}}R.CursorColumnSelectDown=(0,S.registerEditorCommand)(new A({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:3602,linux:{primary:0}}})),R.CursorColumnSelectPageDown=(0,S.registerEditorCommand)(new A({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:3596,linux:{primary:0}}}));class P extends o{constructor(){super({id:"cursorMove",precondition:void 0,description:s.CursorMove.description})}runCoreEditorCommand(V,Z){const ee=s.CursorMove.parse(Z);ee&&this._runCursorMove(V,Z.source,ee)}_runCursorMove(V,Z,ee){V.model.pushStackElement(),V.setCursorStates(Z,3,P._move(V,V.getCursorStates(),ee)),V.revealPrimaryCursor(Z,!0)}static _move(V,Z,ee){const le=ee.select,ue=ee.value;switch(ee.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return s.CursorMoveCommands.simpleMove(V,Z,ee.direction,le,ue,ee.unit);case 11:case 13:case 12:case 14:return s.CursorMoveCommands.viewportMove(V,Z,ee.direction,le,ue);default:return null}}}R.CursorMoveImpl=P,R.CursorMove=(0,S.registerEditorCommand)(new P);class O extends o{constructor(V){super(V),this._staticArgs=V.args}runCoreEditorCommand(V,Z){let ee=this._staticArgs;this._staticArgs.value===-1&&(ee={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:Z.pageSize||V.cursorConfig.pageSize}),V.model.pushStackElement(),V.setCursorStates(Z.source,3,s.CursorMoveCommands.simpleMove(V,V.getCursorStates(),ee.direction,ee.select,ee.value,ee.unit)),V.revealPrimaryCursor(Z.source,!0)}}R.CursorLeft=(0,S.registerEditorCommand)(new O({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),R.CursorLeftSelect=(0,S.registerEditorCommand)(new O({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:1039}})),R.CursorRight=(0,S.registerEditorCommand)(new O({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),R.CursorRightSelect=(0,S.registerEditorCommand)(new O({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:1041}})),R.CursorUp=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),R.CursorUpSelect=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),R.CursorPageUp=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:11}})),R.CursorPageUpSelect=(0,S.registerEditorCommand)(new O({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:1035}})),R.CursorDown=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),R.CursorDownSelect=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),R.CursorPageDown=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:12}})),R.CursorPageDownSelect=(0,S.registerEditorCommand)(new O({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:1036}})),R.CreateCursor=(0,S.registerEditorCommand)(new class extends o{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(H,V){if(!V.position)return;let Z;V.wholeLine?Z=s.CursorMoveCommands.line(H,H.getPrimaryCursorState(),!1,V.position,V.viewPosition):Z=s.CursorMoveCommands.moveTo(H,H.getPrimaryCursorState(),!1,V.position,V.viewPosition);const ee=H.getCursorStates();if(ee.length>1){const le=Z.modelState?Z.modelState.position:null,ue=Z.viewState?Z.viewState.position:null;for(let de=0,ce=ee.length;deue&&(le=ue);const de=new t.Range(le,1,le,H.model.getLineMaxColumn(le));let ce=0;if(Z.at)switch(Z.at){case a.RawAtArgument.Top:ce=3;break;case a.RawAtArgument.Center:ce=1;break;case a.RawAtArgument.Bottom:ce=4;break;default:break}const ae=H.coordinatesConverter.convertModelRangeToViewRange(de);H.revealRange(V.source,!1,ae,ce,0)}}),R.SelectAll=new class extends g{constructor(){super(S.SelectAllCommand)}runDOMCommand(H){I.isFirefox&&(H.focus(),H.select()),H.ownerDocument.execCommand("selectAll")}runEditorCommand(H,V,Z){const ee=V._getViewModel();ee&&this.runCoreEditorCommand(ee,Z)}runCoreEditorCommand(H,V){H.model.pushStackElement(),H.setCursorStates("keyboard",3,[s.CursorMoveCommands.selectAll(H,H.getPrimaryCursorState())])}},R.SetSelection=(0,S.registerEditorCommand)(new class extends o{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(H,V){V.selection&&(H.model.pushStackElement(),H.setCursorStates(V.source,3,[v.CursorState.fromModelSelection(V.selection)]))}})})(h||(e.CoreNavigationCommands=h={}));const p=u.ContextKeyExpr.and(r.EditorContextKeys.textInputFocus,r.EditorContextKeys.columnSelection);function b(R,B){f.KeybindingsRegistry.registerKeybindingRule({id:R,primary:B,when:p,weight:l+1})}b(h.CursorColumnSelectLeft.id,1039),b(h.CursorColumnSelectRight.id,1041),b(h.CursorColumnSelectUp.id,1040),b(h.CursorColumnSelectPageUp.id,1035),b(h.CursorColumnSelectDown.id,1042),b(h.CursorColumnSelectPageDown.id,1036);function w(R){return R.register(),R}var E;(function(R){class B extends S.EditorCommand{runEditorCommand(N,A,P){const O=A._getViewModel();O&&this.runCoreEditingCommand(A,O,P||{})}}R.CoreEditingCommand=B,R.LineBreakInsert=(0,S.registerEditorCommand)(new class extends B{constructor(){super({id:"lineBreakInsert",precondition:r.EditorContextKeys.writable,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(T,N,A){T.pushUndoStop(),T.executeCommands(this.id,i.TypeOperations.lineBreakInsert(N.cursorConfig,N.model,N.getCursorStates().map(P=>P.modelState.selection)))}}),R.Outdent=(0,S.registerEditorCommand)(new class extends B{constructor(){super({id:"outdent",precondition:r.EditorContextKeys.writable,kbOpts:{weight:l,kbExpr:u.ContextKeyExpr.and(r.EditorContextKeys.editorTextFocus,r.EditorContextKeys.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(T,N,A){T.pushUndoStop(),T.executeCommands(this.id,i.TypeOperations.outdent(N.cursorConfig,N.model,N.getCursorStates().map(P=>P.modelState.selection))),T.pushUndoStop()}}),R.Tab=(0,S.registerEditorCommand)(new class extends B{constructor(){super({id:"tab",precondition:r.EditorContextKeys.writable,kbOpts:{weight:l,kbExpr:u.ContextKeyExpr.and(r.EditorContextKeys.editorTextFocus,r.EditorContextKeys.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(T,N,A){T.pushUndoStop(),T.executeCommands(this.id,i.TypeOperations.tab(N.cursorConfig,N.model,N.getCursorStates().map(P=>P.modelState.selection))),T.pushUndoStop()}}),R.DeleteLeft=(0,S.registerEditorCommand)(new class extends B{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(T,N,A){const[P,O]=C.DeleteOperations.deleteLeft(N.getPrevEditOperationType(),N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection),N.getCursorAutoClosedCharacters());P&&T.pushUndoStop(),T.executeCommands(this.id,O),N.setPrevEditOperationType(2)}}),R.DeleteRight=(0,S.registerEditorCommand)(new class extends B{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:l,kbExpr:r.EditorContextKeys.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(T,N,A){const[P,O]=C.DeleteOperations.deleteRight(N.getPrevEditOperationType(),N.cursorConfig,N.model,N.getCursorStates().map(x=>x.modelState.selection));P&&T.pushUndoStop(),T.executeCommands(this.id,O),N.setPrevEditOperationType(3)}}),R.Undo=new class extends g{constructor(){super(S.UndoCommand)}runDOMCommand(T){T.ownerDocument.execCommand("undo")}runEditorCommand(T,N,A){if(!(!N.hasModel()||N.getOption(90)===!0))return N.getModel().undo()}},R.Redo=new class extends g{constructor(){super(S.RedoCommand)}runDOMCommand(T){T.ownerDocument.execCommand("redo")}runEditorCommand(T,N,A){if(!(!N.hasModel()||N.getOption(90)===!0))return N.getModel().redo()}}})(E||(e.CoreEditingCommands=E={}));class k extends S.Command{constructor(B,T,N){super({id:B,precondition:void 0,description:N}),this._handlerId=T}runCommand(B,T){const N=B.get(m.ICodeEditorService).getFocusedCodeEditor();N&&N.trigger("keyboard",this._handlerId,T)}}function M(R,B){w(new k("default:"+R,R)),w(new k(R,R,B))}M("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),M("replacePreviousChar"),M("compositionType"),M("compositionStart"),M("compositionEnd"),M("paste"),M("cut")}),define(te[791],ie([1,0,233,16]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsContribution=void 0;let y=class{constructor(S,m){}dispose(){}};e.MarkerDecorationsContribution=y,y.ID="editor.contrib.markerDecorations",e.MarkerDecorationsContribution=y=Ie([ge(1,L.IMarkerDecorationsService)],y),(0,I.registerEditorContribution)(y.ID,y,0)}),define(te[792],ie([1,0,188,12,17]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewController=void 0;class D{constructor(m,_,v,C){this.configuration=m,this.viewModel=_,this.userInputEvents=v,this.commandDelegate=C}paste(m,_,v,C){this.commandDelegate.paste(m,_,v,C)}type(m){this.commandDelegate.type(m)}compositionType(m,_,v,C){this.commandDelegate.compositionType(m,_,v,C)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(m){L.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:m})}_validateViewColumn(m){const _=this.viewModel.getLineMinColumn(m.lineNumber);return m.column<_?new I.Position(m.lineNumber,_):m}_hasMulticursorModifier(m){switch(this.configuration.options.get(77)){case"altKey":return m.altKey;case"ctrlKey":return m.ctrlKey;case"metaKey":return m.metaKey;default:return!1}}_hasNonMulticursorModifier(m){switch(this.configuration.options.get(77)){case"altKey":return m.ctrlKey||m.metaKey;case"ctrlKey":return m.altKey||m.metaKey;case"metaKey":return m.ctrlKey||m.altKey;default:return!1}}dispatchMouse(m){const _=this.configuration.options,v=y.isLinux&&_.get(106),C=_.get(22);m.middleButton&&!v?this._columnSelect(m.position,m.mouseColumn,m.inSelectionMode):m.startedOnLineNumbers?this._hasMulticursorModifier(m)?m.inSelectionMode?this._lastCursorLineSelect(m.position,m.revealType):this._createCursor(m.position,!0):m.inSelectionMode?this._lineSelectDrag(m.position,m.revealType):this._lineSelect(m.position,m.revealType):m.mouseDownCount>=4?this._selectAll():m.mouseDownCount===3?this._hasMulticursorModifier(m)?m.inSelectionMode?this._lastCursorLineSelectDrag(m.position,m.revealType):this._lastCursorLineSelect(m.position,m.revealType):m.inSelectionMode?this._lineSelectDrag(m.position,m.revealType):this._lineSelect(m.position,m.revealType):m.mouseDownCount===2?m.onInjectedText||(this._hasMulticursorModifier(m)?this._lastCursorWordSelect(m.position,m.revealType):m.inSelectionMode?this._wordSelectDrag(m.position,m.revealType):this._wordSelect(m.position,m.revealType)):this._hasMulticursorModifier(m)?this._hasNonMulticursorModifier(m)||(m.shiftKey?this._columnSelect(m.position,m.mouseColumn,!0):m.inSelectionMode?this._lastCursorMoveToSelect(m.position,m.revealType):this._createCursor(m.position,!1)):m.inSelectionMode?m.altKey?this._columnSelect(m.position,m.mouseColumn,!0):C?this._columnSelect(m.position,m.mouseColumn,!0):this._moveToSelect(m.position,m.revealType):this.moveTo(m.position,m.revealType)}_usualArgs(m,_){return m=this._validateViewColumn(m),{source:"mouse",position:this._convertViewToModelPosition(m),viewPosition:m,revealType:_}}moveTo(m,_){L.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_moveToSelect(m,_){L.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_columnSelect(m,_,v){m=this._validateViewColumn(m),L.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(m),viewPosition:m,mouseColumn:_,doColumnSelect:v})}_createCursor(m,_){m=this._validateViewColumn(m),L.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(m),viewPosition:m,wholeLine:_})}_lastCursorMoveToSelect(m,_){L.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_wordSelect(m,_){L.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_wordSelectDrag(m,_){L.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_lastCursorWordSelect(m,_){L.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_lineSelect(m,_){L.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_lineSelectDrag(m,_){L.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_lastCursorLineSelect(m,_){L.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_lastCursorLineSelectDrag(m,_){L.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(m,_))}_selectAll(){L.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(m){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(m)}emitKeyDown(m){this.userInputEvents.emitKeyDown(m)}emitKeyUp(m){this.userInputEvents.emitKeyUp(m)}emitContextMenu(m){this.userInputEvents.emitContextMenu(m)}emitMouseMove(m){this.userInputEvents.emitMouseMove(m)}emitMouseLeave(m){this.userInputEvents.emitMouseLeave(m)}emitMouseUp(m){this.userInputEvents.emitMouseUp(m)}emitMouseDown(m){this.userInputEvents.emitMouseDown(m)}emitMouseDrag(m){this.userInputEvents.emitMouseDrag(m)}emitMouseDrop(m){this.userInputEvents.emitMouseDrop(m)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(m){this.userInputEvents.emitMouseWheel(m)}}e.ViewController=D}),define(te[793],ie([1,0,6,59,64,108,115,76]),function($,e,L,I,y,D,S,m){"use strict";var _;Object.defineProperty(e,"__esModule",{value:!0}),e.WorkerBasedDocumentDiffProvider=void 0;let v=_=class{constructor(s,i,n){this.editorWorkerService=i,this.telemetryService=n,this.onDidChangeEventEmitter=new L.Emitter,this.onDidChange=this.onDidChangeEventEmitter.event,this.diffAlgorithm="advanced",this.diffAlgorithmOnDidChangeSubscription=void 0,this.setOptions(s)}dispose(){var s;(s=this.diffAlgorithmOnDidChangeSubscription)===null||s===void 0||s.dispose()}computeDiff(s,i,n,t){var r,u;return be(this,void 0,void 0,function*(){if(typeof this.diffAlgorithm!="string")return this.diffAlgorithm.computeDiff(s,i,n,t);if(s.getLineCount()===1&&s.getLineMaxColumn(1)===1)return i.getLineCount()===1&&i.getLineMaxColumn(1)===1?{changes:[],identical:!0,quitEarly:!1,moves:[]}:{changes:[new D.DetailedLineRangeMapping(new y.LineRange(1,2),new y.LineRange(1,i.getLineCount()+1),[new D.RangeMapping(s.getFullModelRange(),i.getFullModelRange())])],identical:!1,quitEarly:!1,moves:[]};const f=JSON.stringify([s.uri.toString(),i.uri.toString()]),d=JSON.stringify([s.id,i.id,s.getAlternativeVersionId(),i.getAlternativeVersionId(),JSON.stringify(n)]),l=_.diffCache.get(f);if(l&&l.context===d)return l.result;const o=I.StopWatch.create(),c=yield this.editorWorkerService.computeDiff(s.uri,i.uri,n,this.diffAlgorithm),a=o.elapsed();if(this.telemetryService.publicLog2("diffEditor.computeDiff",{timeMs:a,timedOut:(r=c?.quitEarly)!==null&&r!==void 0?r:!0,detectedMoves:n.computeMoves?(u=c?.moves.length)!==null&&u!==void 0?u:0:-1}),t.isCancellationRequested)return{changes:[],identical:!1,quitEarly:!0,moves:[]};if(!c)throw new Error("no diff result available");return _.diffCache.size>10&&_.diffCache.delete(_.diffCache.keys().next().value),_.diffCache.set(f,{result:c,context:d}),c})}setOptions(s){var i;let n=!1;s.diffAlgorithm&&this.diffAlgorithm!==s.diffAlgorithm&&((i=this.diffAlgorithmOnDidChangeSubscription)===null||i===void 0||i.dispose(),this.diffAlgorithmOnDidChangeSubscription=void 0,this.diffAlgorithm=s.diffAlgorithm,typeof s.diffAlgorithm!="string"&&(this.diffAlgorithmOnDidChangeSubscription=s.diffAlgorithm.onDidChange(()=>this.onDidChangeEventEmitter.fire())),n=!0),n&&this.onDidChangeEventEmitter.fire()}};e.WorkerBasedDocumentDiffProvider=v,v.diffCache=new Map,e.WorkerBasedDocumentDiffProvider=v=_=Ie([ge(1,S.IEditorWorkerService),ge(2,m.ITelemetryService)],v)}),define(te[794],ie([1,0,793,47,8]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffProviderFactoryService=e.IDiffProviderFactoryService=void 0,e.IDiffProviderFactoryService=(0,y.createDecorator)("diffProviderFactoryService");let D=class{constructor(m){this.instantiationService=m}createDiffProvider(m,_){return this.instantiationService.createInstance(L.WorkerBasedDocumentDiffProvider,_)}};e.DiffProviderFactoryService=D,e.DiffProviderFactoryService=D=Ie([ge(0,y.IInstantiationService)],D),(0,I.registerSingleton)(e.IDiffProviderFactoryService,D,1)}),define(te[352],ie([1,0,14,19,2,40,794,100,64,279,108,177,281,277]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnchangedRegion=e.DiffMapping=e.DiffState=e.DiffEditorViewModel=void 0;let t=class extends y.Disposable{setActiveMovedText(g){this._activeMovedText.set(g,void 0)}constructor(g,h,p,b){super(),this.model=g,this._options=h,this._editor=p,this._diffProviderFactoryService=b,this._isDiffUpToDate=(0,D.observableValue)(this,!1),this.isDiffUpToDate=this._isDiffUpToDate,this._diff=(0,D.observableValue)(this,void 0),this.diff=this._diff,this._unchangedRegions=(0,D.observableValue)(this,{regions:[],originalDecorationIds:[],modifiedDecorationIds:[]}),this.unchangedRegions=(0,D.derived)(this,M=>this._options.hideUnchangedRegions.read(M)?this._unchangedRegions.read(M).regions:((0,D.transaction)(R=>{for(const B of this._unchangedRegions.get().regions)B.collapseAll(R)}),[])),this.movedTextToCompare=(0,D.observableValue)(this,void 0),this._activeMovedText=(0,D.observableValue)(this,void 0),this._hoveredMovedText=(0,D.observableValue)(this,void 0),this.activeMovedText=(0,D.derived)(this,M=>{var R,B;return(B=(R=this.movedTextToCompare.read(M))!==null&&R!==void 0?R:this._hoveredMovedText.read(M))!==null&&B!==void 0?B:this._activeMovedText.read(M)}),this._cancellationTokenSource=new I.CancellationTokenSource,this._diffProvider=(0,D.derived)(this,M=>{const R=this._diffProviderFactoryService.createDiffProvider(this._editor,{diffAlgorithm:this._options.diffAlgorithm.read(M)}),B=(0,D.observableSignalFromEvent)("onDidChange",R.onDidChange);return{diffProvider:R,onChangeSignal:B}}),this._register((0,y.toDisposable)(()=>this._cancellationTokenSource.cancel()));const w=(0,D.observableSignal)("contentChangedSignal"),E=this._register(new L.RunOnceScheduler(()=>w.trigger(void 0),200)),k=(M,R,B)=>{const T=l.fromDiffs(M.changes,g.original.getLineCount(),g.modified.getLineCount(),this._options.hideUnchangedRegionsMinimumLineCount.read(B),this._options.hideUnchangedRegionsContextLineCount.read(B)),N=this._unchangedRegions.get(),A=N.originalDecorationIds.map(W=>g.original.getDecorationRange(W)).filter(W=>!!W).map(W=>_.LineRange.fromRange(W)),P=N.modifiedDecorationIds.map(W=>g.modified.getDecorationRange(W)).filter(W=>!!W).map(W=>_.LineRange.fromRange(W)),O=g.original.deltaDecorations(N.originalDecorationIds,T.map(W=>({range:W.originalUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}}))),x=g.modified.deltaDecorations(N.modifiedDecorationIds,T.map(W=>({range:W.modifiedUnchangedRange.toInclusiveRange(),options:{description:"unchanged"}})));for(const W of T)for(let U=0;U{if(this._diff.get()){const B=s.TextEditInfo.fromModelContentChanges(M.changes),T=(this._lastDiff,g.original,g.modified,void 0);T&&(this._lastDiff=T,(0,D.transaction)(N=>{this._diff.set(f.fromDiffResult(this._lastDiff),N),k(T,N);const A=this.movedTextToCompare.get();this.movedTextToCompare.set(A?this._lastDiff.moves.find(P=>P.lineRangeMapping.modified.intersect(A.lineRangeMapping.modified)):void 0,N)}))}E.schedule()})),this._register(g.original.onDidChangeContent(M=>{if(this._diff.get()){const B=s.TextEditInfo.fromModelContentChanges(M.changes),T=(this._lastDiff,g.original,g.modified,void 0);T&&(this._lastDiff=T,(0,D.transaction)(N=>{this._diff.set(f.fromDiffResult(this._lastDiff),N),k(T,N);const A=this.movedTextToCompare.get();this.movedTextToCompare.set(A?this._lastDiff.moves.find(P=>P.lineRangeMapping.modified.intersect(A.lineRangeMapping.modified)):void 0,N)}))}E.schedule()})),this._register((0,D.autorunWithStore)((M,R)=>be(this,void 0,void 0,function*(){var B,T;this._options.hideUnchangedRegionsMinimumLineCount.read(M),this._options.hideUnchangedRegionsContextLineCount.read(M),E.cancel(),w.read(M);const N=this._diffProvider.read(M);N.onChangeSignal.read(M),(0,m.readHotReloadableExport)(v.DefaultLinesDiffComputer,M),(0,m.readHotReloadableExport)(n.optimizeSequenceDiffs,M),this._isDiffUpToDate.set(!1,void 0);let A=[];R.add(g.original.onDidChangeContent(x=>{const W=s.TextEditInfo.fromModelContentChanges(x.changes);A=(0,i.combineTextEditInfos)(A,W)}));let P=[];R.add(g.modified.onDidChangeContent(x=>{const W=s.TextEditInfo.fromModelContentChanges(x.changes);P=(0,i.combineTextEditInfos)(P,W)}));let O=yield N.diffProvider.computeDiff(g.original,g.modified,{ignoreTrimWhitespace:this._options.ignoreTrimWhitespace.read(M),maxComputationTimeMs:this._options.maxComputationTimeMs.read(M),computeMoves:this._options.showMoves.read(M)},this._cancellationTokenSource.token);this._cancellationTokenSource.token.isCancellationRequested||(O=r(O,g.original,g.modified),O=(B=(g.original,g.modified,void 0))!==null&&B!==void 0?B:O,O=(T=(g.original,g.modified,void 0))!==null&&T!==void 0?T:O,(0,D.transaction)(x=>{k(O,x),this._lastDiff=O;const W=f.fromDiffResult(O);this._diff.set(W,x),this._isDiffUpToDate.set(!0,x);const U=this.movedTextToCompare.get();this.movedTextToCompare.set(U?this._lastDiff.moves.find(F=>F.lineRangeMapping.modified.intersect(U.lineRangeMapping.modified)):void 0,x)}))})))}ensureModifiedLineIsVisible(g,h){var p;if(((p=this.diff.get())===null||p===void 0?void 0:p.mappings.length)===0)return;const b=this._unchangedRegions.get().regions;for(const w of b)if(w.getHiddenModifiedRange(void 0).contains(g)){w.showModifiedLine(g,h);return}}ensureOriginalLineIsVisible(g,h){var p;if(((p=this.diff.get())===null||p===void 0?void 0:p.mappings.length)===0)return;const b=this._unchangedRegions.get().regions;for(const w of b)if(w.getHiddenOriginalRange(void 0).contains(g)){w.showOriginalLine(g,h);return}}waitForDiff(){return be(this,void 0,void 0,function*(){yield(0,D.waitForState)(this.isDiffUpToDate,g=>g)})}serializeState(){return{collapsedRegions:this._unchangedRegions.get().regions.map(h=>({range:h.getHiddenModifiedRange(void 0).serialize()}))}}restoreSerializedState(g){const h=g.collapsedRegions.map(b=>_.LineRange.deserialize(b.range)),p=this._unchangedRegions.get();(0,D.transaction)(b=>{for(const w of p.regions)for(const E of h)if(w.modifiedUnchangedRange.intersect(E)){w.setHiddenModifiedRange(E,b);break}})}};e.DiffEditorViewModel=t,e.DiffEditorViewModel=t=Ie([ge(3,S.IDiffProviderFactoryService)],t);function r(a,g,h){return{changes:a.changes.map(p=>new C.DetailedLineRangeMapping(p.original,p.modified,p.innerChanges?p.innerChanges.map(b=>u(b,g,h)):void 0)),moves:a.moves,identical:a.identical,quitEarly:a.quitEarly}}function u(a,g,h){let p=a.originalRange,b=a.modifiedRange;return(p.endColumn!==1||b.endColumn!==1)&&p.endColumn===g.getLineMaxColumn(p.endLineNumber)&&b.endColumn===h.getLineMaxColumn(b.endLineNumber)&&p.endLineNumbernew d(h)),g.moves||[],g.identical,g.quitEarly)}constructor(g,h,p,b){this.mappings=g,this.movedTexts=h,this.identical=p,this.quitEarly=b}}e.DiffState=f;class d{constructor(g){this.lineRangeMapping=g}}e.DiffMapping=d;class l{static fromDiffs(g,h,p,b,w){const E=C.DetailedLineRangeMapping.inverse(g,h,p),k=[];for(const M of E){let R=M.original.startLineNumber,B=M.modified.startLineNumber,T=M.original.length;const N=R===1&&B===1,A=R+T===h+1&&B+T===p+1;(N||A)&&T>=w+b?(N&&!A&&(T-=w),A&&!N&&(R+=w,B+=w,T-=w),k.push(new l(R,B,T,0,0))):T>=w*2+b&&(R+=w,B+=w,T-=w*2,k.push(new l(R,B,T,0,0)))}return k}get originalUnchangedRange(){return _.LineRange.ofLength(this.originalLineNumber,this.lineCount)}get modifiedUnchangedRange(){return _.LineRange.ofLength(this.modifiedLineNumber,this.lineCount)}constructor(g,h,p,b,w){this.originalLineNumber=g,this.modifiedLineNumber=h,this.lineCount=p,this._visibleLineCountTop=(0,D.observableValue)(this,0),this.visibleLineCountTop=this._visibleLineCountTop,this._visibleLineCountBottom=(0,D.observableValue)(this,0),this.visibleLineCountBottom=this._visibleLineCountBottom,this._shouldHideControls=(0,D.derived)(this,E=>this.visibleLineCountTop.read(E)+this.visibleLineCountBottom.read(E)===this.lineCount&&!this.isDragged.read(E)),this.isDragged=(0,D.observableValue)(this,!1),this._visibleLineCountTop.set(b,void 0),this._visibleLineCountBottom.set(w,void 0)}shouldHideControls(g){return this._shouldHideControls.read(g)}getHiddenOriginalRange(g){return _.LineRange.ofLength(this.originalLineNumber+this._visibleLineCountTop.read(g),this.lineCount-this._visibleLineCountTop.read(g)-this._visibleLineCountBottom.read(g))}getHiddenModifiedRange(g){return _.LineRange.ofLength(this.modifiedLineNumber+this._visibleLineCountTop.read(g),this.lineCount-this._visibleLineCountTop.read(g)-this._visibleLineCountBottom.read(g))}setHiddenModifiedRange(g,h){const p=g.startLineNumber-this.modifiedLineNumber,b=this.modifiedLineNumber+this.lineCount-g.endLineNumberExclusive;this.setState(p,b,h)}getMaxVisibleLineCountTop(){return this.lineCount-this._visibleLineCountBottom.get()}getMaxVisibleLineCountBottom(){return this.lineCount-this._visibleLineCountTop.get()}showMoreAbove(g=10,h){const p=this.getMaxVisibleLineCountTop();this._visibleLineCountTop.set(Math.min(this._visibleLineCountTop.get()+g,p),h)}showMoreBelow(g=10,h){const p=this.lineCount-this._visibleLineCountTop.get();this._visibleLineCountBottom.set(Math.min(this._visibleLineCountBottom.get()+g,p),h)}showAll(g){this._visibleLineCountBottom.set(this.lineCount-this._visibleLineCountTop.get(),g)}showModifiedLine(g,h){const p=g+1-(this.modifiedLineNumber+this._visibleLineCountTop.get()),b=this.modifiedLineNumber-this._visibleLineCountBottom.get()+this.lineCount-g;pthis.selectionAnchorSetContextKey.reset())}setSelectionAnchor(){if(this.editor.hasModel()){const f=this.editor.getPosition();this.editor.changeDecorations(d=>{this.decorationId&&d.removeDecoration(this.decorationId),this.decorationId=d.addDecoration(S.Selection.fromPositions(f,f),{description:"selection-anchor",stickiness:1,hoverMessage:new I.MarkdownString().appendText((0,_.localize)(0,null)),className:"selection-anchor"})}),this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,L.alert)((0,_.localize)(1,null,f.lineNumber,f.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const f=this.editor.getModel().getDecorationRange(this.decorationId);f&&this.editor.setPosition(f.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const f=this.editor.getModel().getDecorationRange(this.decorationId);if(f){const d=this.editor.getPosition();this.editor.setSelection(S.Selection.fromPositions(f.getStartPosition(),d)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){if(this.decorationId){const f=this.decorationId;this.editor.changeDecorations(d=>{d.removeDecoration(f),this.decorationId=void 0}),this.selectionAnchorSetContextKey.set(!1)}}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};s.ID="editor.contrib.selectionAnchorController",s=C=Ie([ge(1,v.IContextKeyService)],s);class i extends D.EditorAction{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,_.localize)(2,null),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,2080),weight:100}})}run(f,d){var l;return be(this,void 0,void 0,function*(){(l=s.get(d))===null||l===void 0||l.setSelectionAnchor()})}}class n extends D.EditorAction{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,_.localize)(3,null),alias:"Go to Selection Anchor",precondition:e.SelectionAnchorSet})}run(f,d){var l;return be(this,void 0,void 0,function*(){(l=s.get(d))===null||l===void 0||l.goToSelectionAnchor()})}}class t extends D.EditorAction{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,_.localize)(4,null),alias:"Select from Anchor to Cursor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,2089),weight:100}})}run(f,d){var l;return be(this,void 0,void 0,function*(){(l=s.get(d))===null||l===void 0||l.selectFromAnchorToCursor()})}}class r extends D.EditorAction{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,_.localize)(5,null),alias:"Cancel Selection Anchor",precondition:e.SelectionAnchorSet,kbOpts:{kbExpr:m.EditorContextKeys.editorTextFocus,primary:9,weight:100}})}run(f,d){var l;return be(this,void 0,void 0,function*(){(l=s.get(d))===null||l===void 0||l.cancelSelectionAnchor()})}}(0,D.registerEditorContribution)(s.ID,s,4),(0,D.registerEditorAction)(i),(0,D.registerEditorAction)(n),(0,D.registerEditorAction)(t),(0,D.registerEditorAction)(r)}),define(te[796],ie([1,0,16,22,540,635]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class S extends L.EditorAction{constructor(C,s){super(s),this.left=C}run(C,s){if(!s.hasModel())return;const i=[],n=s.getSelections();for(const t of n)i.push(new y.MoveCaretCommand(t,this.left));s.pushUndoStop(),s.executeCommands(this.id,i),s.pushUndoStop()}}class m extends S{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:D.localize(0,null),alias:"Move Selected Text Left",precondition:I.EditorContextKeys.writable})}}class _ extends S{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:D.localize(1,null),alias:"Move Selected Text Right",precondition:I.EditorContextKeys.writable})}}(0,L.registerEditorAction)(m),(0,L.registerEditorAction)(_)}),define(te[797],ie([1,0,16,123,204,5,22,636]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class _ extends L.EditorAction{constructor(){super({id:"editor.action.transposeLetters",label:m.localize(0,null),alias:"Transpose Letters",precondition:S.EditorContextKeys.writable,kbOpts:{kbExpr:S.EditorContextKeys.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(C,s){if(!s.hasModel())return;const i=s.getModel(),n=[],t=s.getSelections();for(const r of t){if(!r.isEmpty())continue;const u=r.startLineNumber,f=r.startColumn,d=i.getLineMaxColumn(u);if(u===1&&(f===1||f===2&&d===2))continue;const l=f===d?r.getPosition():y.MoveOperations.rightPosition(i,r.getPosition().lineNumber,r.getPosition().column),o=y.MoveOperations.leftPosition(i,l),c=y.MoveOperations.leftPosition(i,o),a=i.getValueInRange(D.Range.fromPositions(c,o)),g=i.getValueInRange(D.Range.fromPositions(o,l)),h=D.Range.fromPositions(c,l);n.push(new I.ReplaceCommand(h,g+a))}n.length>0&&(s.pushUndoStop(),s.executeCommands(this.id,n),s.pushUndoStop())}}(0,L.registerEditorAction)(_)}),define(te[798],ie([1,0,51,7,17,183,16,33,22,637,30,102,15]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PasteAction=e.CopyAction=e.CutAction=void 0;const n="9_cutcopypaste",t=y.isNative||document.queryCommandSupported("cut"),r=y.isNative||document.queryCommandSupported("copy"),u=typeof navigator.clipboard>"u"||L.isFirefox?document.queryCommandSupported("paste"):!0;function f(o){return o.register(),o}e.CutAction=t?f(new S.MultiCommand({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:y.isNative?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:C.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(0,null),order:1},{menuId:C.MenuId.EditorContext,group:n,title:v.localize(1,null),when:_.EditorContextKeys.writable,order:1},{menuId:C.MenuId.CommandPalette,group:"",title:v.localize(2,null),order:1},{menuId:C.MenuId.SimpleEditorContext,group:n,title:v.localize(3,null),when:_.EditorContextKeys.writable,order:1}]})):void 0,e.CopyAction=r?f(new S.MultiCommand({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:y.isNative?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:C.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(4,null),order:2},{menuId:C.MenuId.EditorContext,group:n,title:v.localize(5,null),order:2},{menuId:C.MenuId.CommandPalette,group:"",title:v.localize(6,null),order:1},{menuId:C.MenuId.SimpleEditorContext,group:n,title:v.localize(7,null),order:2}]})):void 0,C.MenuRegistry.appendMenuItem(C.MenuId.MenubarEditMenu,{submenu:C.MenuId.MenubarCopy,title:{value:v.localize(8,null),original:"Copy As"},group:"2_ccp",order:3}),C.MenuRegistry.appendMenuItem(C.MenuId.EditorContext,{submenu:C.MenuId.EditorContextCopy,title:{value:v.localize(9,null),original:"Copy As"},group:n,order:3}),C.MenuRegistry.appendMenuItem(C.MenuId.EditorContext,{submenu:C.MenuId.EditorContextShare,title:{value:v.localize(10,null),original:"Share"},group:"11_share",order:-1,when:i.ContextKeyExpr.and(i.ContextKeyExpr.notEquals("resourceScheme","output"),_.EditorContextKeys.editorTextFocus)}),C.MenuRegistry.appendMenuItem(C.MenuId.EditorTitleContext,{submenu:C.MenuId.EditorTitleContextShare,title:{value:v.localize(11,null),original:"Share"},group:"11_share",order:-1}),C.MenuRegistry.appendMenuItem(C.MenuId.ExplorerContext,{submenu:C.MenuId.ExplorerContextShare,title:{value:v.localize(12,null),original:"Share"},group:"11_share",order:-1}),e.PasteAction=u?f(new S.MultiCommand({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:y.isNative?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:C.MenuId.MenubarEditMenu,group:"2_ccp",title:v.localize(13,null),order:4},{menuId:C.MenuId.EditorContext,group:n,title:v.localize(14,null),when:_.EditorContextKeys.writable,order:4},{menuId:C.MenuId.CommandPalette,group:"",title:v.localize(15,null),order:1},{menuId:C.MenuId.SimpleEditorContext,group:n,title:v.localize(16,null),when:_.EditorContextKeys.writable,order:4}]})):void 0;class d extends S.EditorAction{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:v.localize(17,null),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.textInputFocus,primary:0,weight:100}})}run(c,a){!a.hasModel()||!a.getOption(37)&&a.getSelection().isEmpty()||(D.CopyOptions.forceCopyWithSyntaxHighlighting=!0,a.focus(),a.getContainerDomNode().ownerDocument.execCommand("copy"),D.CopyOptions.forceCopyWithSyntaxHighlighting=!1)}}function l(o,c){o&&(o.addImplementation(1e4,"code-editor",(a,g)=>{const h=a.get(m.ICodeEditorService).getFocusedCodeEditor();if(h&&h.hasTextFocus()){const p=h.getOption(37),b=h.getSelection();return b&&b.isEmpty()&&!p||h.getContainerDomNode().ownerDocument.execCommand(c),!0}return!1}),o.addImplementation(0,"generic-dom",(a,g)=>((0,I.getActiveDocument)().execCommand(c),!0)))}l(e.CutAction,"cut"),l(e.CopyAction,"copy"),e.PasteAction&&(e.PasteAction.addImplementation(1e4,"code-editor",(o,c)=>{const a=o.get(m.ICodeEditorService),g=o.get(s.IClipboardService),h=a.getFocusedCodeEditor();return h&&h.hasTextFocus()?!h.getContainerDomNode().ownerDocument.execCommand("paste")&&y.isWeb?(()=>be(void 0,void 0,void 0,function*(){const b=yield g.readText();if(b!==""){const w=D.InMemoryClipboardMetadataManager.INSTANCE.get(b);let E=!1,k=null,M=null;w&&(E=h.getOption(37)&&!!w.isFromEmptySelection,k=typeof w.multicursorText<"u"?w.multicursorText:null,M=w.mode),h.trigger("keyboard","paste",{text:b,pasteOnNewLine:E,multicursorText:k,mode:M})}}))():!0:!1}),e.PasteAction.addImplementation(0,"generic-dom",(o,c)=>((0,I.getActiveDocument)().execCommand("paste"),!0))),r&&(0,S.registerEditorAction)(d)}),define(te[799],ie([1,0,62,16,5,22,32,294,542,647,30]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class s extends I.EditorAction{constructor(f,d){super(d),this._type=f}run(f,d){const l=f.get(S.ILanguageConfigurationService);if(!d.hasModel())return;const o=d.getModel(),c=[],a=o.getOptions(),g=d.getOption(23),h=d.getSelections().map((b,w)=>({selection:b,index:w,ignoreFirstLine:!1}));h.sort((b,w)=>y.Range.compareRangesUsingStarts(b.selection,w.selection));let p=h[0];for(let b=1;b{this._undoStack=[],this._redoStack=[]})),this._register(i.onDidChangeModelContent(n=>{this._undoStack=[],this._redoStack=[]})),this._register(i.onDidChangeCursorSelection(n=>{if(this._isCursorUndoRedo||!n.oldSelections||n.oldModelVersionId!==n.modelVersionId)return;const t=new S(n.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(t)||(this._undoStack.push(new m(t,i.getScrollTop(),i.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new m(new S(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new m(new S(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(i){this._isCursorUndoRedo=!0,this._editor.setSelections(i.cursorState.selections),this._editor.setScrollPosition({scrollTop:i.scrollTop,scrollLeft:i.scrollLeft}),this._isCursorUndoRedo=!1}}e.CursorUndoRedoController=_,_.ID="editor.contrib.cursorUndoRedoController";class v extends I.EditorAction{constructor(){super({id:"cursorUndo",label:D.localize(0,null),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2099,weight:100}})}run(i,n,t){var r;(r=_.get(n))===null||r===void 0||r.cursorUndo()}}e.CursorUndo=v;class C extends I.EditorAction{constructor(){super({id:"cursorRedo",label:D.localize(1,null),alias:"Cursor Redo",precondition:void 0})}run(i,n,t){var r;(r=_.get(n))===null||r===void 0||r.cursorRedo()}}e.CursorRedo=C,(0,I.registerEditorContribution)(_.ID,_,0),(0,I.registerEditorAction)(v),(0,I.registerEditorAction)(C)}),define(te[801],ie([1,0,16,15,19,63,8,47,655]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorKeybindingCancellationTokenSource=void 0;const v=(0,S.createDecorator)("IEditorCancelService"),C=new I.RawContextKey("cancellableOperation",!1,(0,_.localize)(0,null));(0,m.registerSingleton)(v,class{constructor(){this._tokens=new WeakMap}add(i,n){let t=this._tokens.get(i);t||(t=i.invokeWithinContext(u=>{const f=C.bindTo(u.get(I.IContextKeyService)),d=new D.LinkedList;return{key:f,tokens:d}}),this._tokens.set(i,t));let r;return t.key.set(!0),r=t.tokens.push(n),()=>{r&&(r(),t.key.set(!t.tokens.isEmpty()),r=void 0)}}cancel(i){const n=this._tokens.get(i);if(!n)return;const t=n.tokens.pop();t&&(t.cancel(),n.key.set(!n.tokens.isEmpty()))}},1);class s extends y.CancellationTokenSource{constructor(n,t){super(t),this.editor=n,this._unregister=n.invokeWithinContext(r=>r.get(v).add(n,this))}dispose(){this._unregister(),super.dispose()}}e.EditorKeybindingCancellationTokenSource=s,(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:C})}runEditorCommand(i,n){i.get(v).cancel(n)}})}),define(te[103],ie([1,0,10,5,19,2,801]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextModelCancellationTokenSource=e.EditorStateCancellationTokenSource=e.EditorState=void 0;class m{constructor(s,i){if(this.flags=i,this.flags&1){const n=s.getModel();this.modelVersionId=n?L.format("{0}#{1}",n.uri.toString(),n.getVersionId()):null}else this.modelVersionId=null;this.flags&4?this.position=s.getPosition():this.position=null,this.flags&2?this.selection=s.getSelection():this.selection=null,this.flags&8?(this.scrollLeft=s.getScrollLeft(),this.scrollTop=s.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(s){if(!(s instanceof m))return!1;const i=s;return!(this.modelVersionId!==i.modelVersionId||this.scrollLeft!==i.scrollLeft||this.scrollTop!==i.scrollTop||!this.position&&i.position||this.position&&!i.position||this.position&&i.position&&!this.position.equals(i.position)||!this.selection&&i.selection||this.selection&&!i.selection||this.selection&&i.selection&&!this.selection.equalsRange(i.selection))}validate(s){return this._equals(new m(s,this.flags))}}e.EditorState=m;class _ extends S.EditorKeybindingCancellationTokenSource{constructor(s,i,n,t){super(s,t),this._listener=new D.DisposableStore,i&4&&this._listener.add(s.onDidChangeCursorPosition(r=>{(!n||!I.Range.containsPosition(n,r.position))&&this.cancel()})),i&2&&this._listener.add(s.onDidChangeCursorSelection(r=>{(!n||!I.Range.containsRange(n,r.selection))&&this.cancel()})),i&8&&this._listener.add(s.onDidScrollChange(r=>this.cancel())),i&1&&(this._listener.add(s.onDidChangeModel(r=>this.cancel())),this._listener.add(s.onDidChangeModelContent(r=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}e.EditorStateCancellationTokenSource=_;class v extends y.CancellationTokenSource{constructor(s,i){super(i),this._listener=s.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}e.TextModelCancellationTokenSource=v}),define(te[135],ie([1,0,13,19,9,2,21,130,5,24,18,50,103,638,25,48,85,76,112]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.applyCodeAction=e.ApplyCodeActionReason=e.getCodeActions=e.fixAllCommandId=e.organizeImportsCommandId=e.sourceActionCommandId=e.refactorCommandId=e.autoFixCommandId=e.quickFixCommandId=e.codeActionCommandId=void 0,e.codeActionCommandId="editor.action.codeAction",e.quickFixCommandId="editor.action.quickFix",e.autoFixCommandId="editor.action.autoFix",e.refactorCommandId="editor.action.refactor",e.sourceActionCommandId="editor.action.sourceAction",e.organizeImportsCommandId="editor.action.organizeImports",e.fixAllCommandId="editor.action.fixAll";class l extends D.Disposable{static codeActionsPreferredComparator(k,M){return k.isPreferred&&!M.isPreferred?-1:!k.isPreferred&&M.isPreferred?1:0}static codeActionsComparator({action:k},{action:M}){return(0,L.isNonEmptyArray)(k.diagnostics)?(0,L.isNonEmptyArray)(M.diagnostics)?l.codeActionsPreferredComparator(k,M):-1:(0,L.isNonEmptyArray)(M.diagnostics)?1:l.codeActionsPreferredComparator(k,M)}constructor(k,M,R){super(),this.documentation=M,this._register(R),this.allActions=[...k].sort(l.codeActionsComparator),this.validActions=this.allActions.filter(({action:B})=>!B.disabled)}get hasAutoFix(){return this.validActions.some(({action:k})=>!!k.kind&&d.CodeActionKind.QuickFix.contains(new d.CodeActionKind(k.kind))&&!!k.isPreferred)}}const o={actions:[],documentation:void 0};function c(E,k,M,R,B,T){var N;return be(this,void 0,void 0,function*(){const A=R.filter||{},P=Object.assign(Object.assign({},A),{excludes:[...A.excludes||[],d.CodeActionKind.Notebook]}),O={only:(N=A.include)===null||N===void 0?void 0:N.value,trigger:R.type},x=new i.TextModelCancellationTokenSource(k,T),W=R.type===2,U=a(E,k,W?P:A),F=new D.DisposableStore,G=U.map(ne=>be(this,void 0,void 0,function*(){try{B.report(ne);const se=yield ne.provideCodeActions(k,M,O,x.token);if(se&&F.add(se),x.token.isCancellationRequested)return o;const J=(se?.actions||[]).filter(H=>H&&(0,d.filtersAction)(A,H)),q=h(ne,J,A.include);return{actions:J.map(H=>new d.CodeActionItem(H,ne)),documentation:q}}catch(se){if((0,y.isCancellationError)(se))throw se;return(0,y.onUnexpectedExternalError)(se),o}})),Y=E.onDidChange(()=>{const ne=E.all(k);(0,L.equals)(ne,U)||x.cancel()});try{const ne=yield Promise.all(G),se=ne.map(q=>q.actions).flat(),J=[...(0,L.coalesce)(ne.map(q=>q.documentation)),...g(E,k,R,se)];return new l(se,J,F)}finally{Y.dispose(),x.dispose()}})}e.getCodeActions=c;function a(E,k,M){return E.all(k).filter(R=>R.providedCodeActionKinds?R.providedCodeActionKinds.some(B=>(0,d.mayIncludeActionsOfKind)(M,new d.CodeActionKind(B))):!0)}function*g(E,k,M,R){var B,T,N;if(k&&R.length)for(const A of E.all(k))A._getAdditionalMenuItems&&(yield*(B=A._getAdditionalMenuItems)===null||B===void 0?void 0:B.call(A,{trigger:M.type,only:(N=(T=M.filter)===null||T===void 0?void 0:T.include)===null||N===void 0?void 0:N.value},R.map(P=>P.action)))}function h(E,k,M){if(!E.documentation)return;const R=E.documentation.map(B=>({kind:new d.CodeActionKind(B.kind),command:B.command}));if(M){let B;for(const T of R)T.kind.contains(M)&&(B?B.kind.contains(T.kind)&&(B=T):B=T);if(B)return B?.command}for(const B of k)if(B.kind){for(const T of R)if(T.kind.contains(new d.CodeActionKind(B.kind)))return T.command}}var p;(function(E){E.OnSave="onSave",E.FromProblemsView="fromProblemsView",E.FromCodeActions="fromCodeActions"})(p||(e.ApplyCodeActionReason=p={}));function b(E,k,M,R,B=I.CancellationToken.None){var T;return be(this,void 0,void 0,function*(){const N=E.get(m.IBulkEditService),A=E.get(t.ICommandService),P=E.get(f.ITelemetryService),O=E.get(r.INotificationService);if(P.publicLog2("codeAction.applyCodeAction",{codeActionTitle:k.action.title,codeActionKind:k.action.kind,codeActionIsPreferred:!!k.action.isPreferred,reason:M}),yield k.resolve(B),!B.isCancellationRequested&&!(!((T=k.action.edit)===null||T===void 0)&&T.edits.length&&!(yield N.apply(k.action.edit,{editor:R?.editor,label:k.action.title,quotableLabel:k.action.title,code:"undoredo.codeAction",respectAutoSaveConfig:M!==p.OnSave,showPreview:R?.preview})).isApplied)&&k.action.command)try{yield A.executeCommand(k.action.command.id,...k.action.command.arguments||[])}catch(x){const W=w(x);O.error(typeof W=="string"?W:n.localize(0,null))}})}e.applyCodeAction=b;function w(E){return typeof E=="string"?E:E instanceof Error&&typeof E.message=="string"?E.message:void 0}t.CommandsRegistry.registerCommand("_executeCodeActionProvider",function(E,k,M,R,B){return be(this,void 0,void 0,function*(){if(!(k instanceof S.URI))throw(0,y.illegalArgument)();const{codeActionProvider:T}=E.get(C.ILanguageFeaturesService),N=E.get(s.IModelService).getModel(k);if(!N)throw(0,y.illegalArgument)();const A=v.Selection.isISelection(M)?v.Selection.liftSelection(M):_.Range.isIRange(M)?N.validateRange(M):void 0;if(!A)throw(0,y.illegalArgument)();const P=typeof R=="string"?new d.CodeActionKind(R):void 0,O=yield c(T,N,A,{type:1,triggerAction:d.CodeActionTriggerSource.Default,filter:{includeSourceActions:!0,include:P}},u.Progress.None,I.CancellationToken.None),x=[],W=Math.min(O.validActions.length,typeof B=="number"?B:0);for(let U=0;UU.action)}finally{setTimeout(()=>O.dispose(),100)}})})}),define(te[802],ie([1,0,97,135,112,34]),function($,e,L,I,y,D){"use strict";var S;Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionKeybindingResolver=void 0;let m=S=class{constructor(v){this.keybindingService=v}getResolver(){const v=new L.Lazy(()=>this.keybindingService.getKeybindings().filter(C=>S.codeActionCommands.indexOf(C.command)>=0).filter(C=>C.resolvedKeybinding).map(C=>{let s=C.commandArgs;return C.command===I.organizeImportsCommandId?s={kind:y.CodeActionKind.SourceOrganizeImports.value}:C.command===I.fixAllCommandId&&(s={kind:y.CodeActionKind.SourceFixAll.value}),Object.assign({resolvedKeybinding:C.resolvedKeybinding},y.CodeActionCommandArgs.fromUser(s,{kind:y.CodeActionKind.None,apply:"never"}))}));return C=>{if(C.kind){const s=this.bestKeybindingForCodeAction(C,v.value);return s?.resolvedKeybinding}}}bestKeybindingForCodeAction(v,C){if(!v.kind)return;const s=new y.CodeActionKind(v.kind);return C.filter(i=>i.kind.contains(s)).filter(i=>i.preferred?v.isPreferred:!0).reduceRight((i,n)=>i?i.kind.contains(n.kind)?n:i:n,void 0)}};e.CodeActionKeybindingResolver=m,m.codeActionCommands=[I.refactorCommandId,I.codeActionCommandId,I.sourceActionCommandId,I.organizeImportsCommandId,I.fixAllCommandId],e.CodeActionKeybindingResolver=m=S=Ie([ge(0,D.IKeybindingService)],m)}),define(te[353],ie([1,0,14,9,6,2,46,12,24,15,85,112,135]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeActionModel=e.CodeActionsState=e.SUPPORTED_CODE_ACTIONS=void 0,e.SUPPORTED_CODE_ACTIONS=new v.RawContextKey("supportedCodeAction","");class n extends D.Disposable{constructor(d,l,o,c=250){super(),this._editor=d,this._markerService=l,this._signalChange=o,this._delay=c,this._autoTriggerTimer=this._register(new L.TimeoutTimer),this._register(this._markerService.onMarkerChanged(a=>this._onMarkerChanges(a))),this._register(this._editor.onDidChangeCursorPosition(()=>this._tryAutoTrigger()))}trigger(d){const l=this._getRangeOfSelectionUnlessWhitespaceEnclosed(d);this._signalChange(l?{trigger:d,selection:l}:void 0)}_onMarkerChanges(d){const l=this._editor.getModel();l&&d.some(o=>(0,S.isEqual)(o,l.uri))&&this._tryAutoTrigger()}_tryAutoTrigger(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2,triggerAction:s.CodeActionTriggerSource.Default})},this._delay)}_getRangeOfSelectionUnlessWhitespaceEnclosed(d){if(!this._editor.hasModel())return;const l=this._editor.getModel(),o=this._editor.getSelection();if(o.isEmpty()&&d.type===2){const{lineNumber:c,column:a}=o.getPosition(),g=l.getLineContent(c);if(g.length===0)return;if(a===1){if(/\s/.test(g[0]))return}else if(a===l.getLineMaxColumn(c)){if(/\s/.test(g[g.length-1]))return}else if(/\s/.test(g[a-2])&&/\s/.test(g[a-1]))return}return o}}var t;(function(f){f.Empty={type:0};class d{constructor(o,c,a){this.trigger=o,this.position=c,this._cancellablePromise=a,this.type=1,this.actions=a.catch(g=>{if((0,I.isCancellationError)(g))return r;throw g})}cancel(){this._cancellablePromise.cancel()}}f.Triggered=d})(t||(e.CodeActionsState=t={}));const r=Object.freeze({allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1});class u extends D.Disposable{constructor(d,l,o,c,a,g){super(),this._editor=d,this._registry=l,this._markerService=o,this._progressService=a,this._configurationService=g,this._codeActionOracle=this._register(new D.MutableDisposable),this._state=t.Empty,this._onDidChangeState=this._register(new y.Emitter),this.onDidChangeState=this._onDidChangeState.event,this._disposed=!1,this._supportedCodeActions=e.SUPPORTED_CODE_ACTIONS.bindTo(c),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(this._registry.onDidChange(()=>this._update())),this._update()}dispose(){this._disposed||(this._disposed=!0,super.dispose(),this.setState(t.Empty,!0))}_settingEnabledNearbyQuickfixes(){var d;const l=(d=this._editor)===null||d===void 0?void 0:d.getModel();return this._configurationService?this._configurationService.getValue("editor.codeActionWidget.includeNearbyQuickfixes",{resource:l?.uri}):!1}_update(){if(this._disposed)return;this._codeActionOracle.value=void 0,this.setState(t.Empty);const d=this._editor.getModel();if(d&&this._registry.has(d)&&!this._editor.getOption(90)){const l=this._registry.all(d).flatMap(o=>{var c;return(c=o.providedCodeActionKinds)!==null&&c!==void 0?c:[]});this._supportedCodeActions.set(l.join(" ")),this._codeActionOracle.value=new n(this._editor,this._markerService,o=>{var c;if(!o){this.setState(t.Empty);return}const a=o.selection.getStartPosition(),g=(0,L.createCancelablePromise)(h=>be(this,void 0,void 0,function*(){var p,b,w,E,k,M;if(this._settingEnabledNearbyQuickfixes()&&o.trigger.type===1&&(o.trigger.triggerAction===s.CodeActionTriggerSource.QuickFix||!((b=(p=o.trigger.filter)===null||p===void 0?void 0:p.include)===null||b===void 0)&&b.contains(s.CodeActionKind.QuickFix))){const R=yield(0,i.getCodeActions)(this._registry,d,o.selection,o.trigger,C.Progress.None,h);if(h.isCancellationRequested)return r;if(!((w=R.validActions)===null||w===void 0?void 0:w.some(T=>T.action.kind?s.CodeActionKind.QuickFix.contains(new s.CodeActionKind(T.action.kind)):!1))){const T=this._markerService.read({resource:d.uri});if(T.length>0){const N=o.selection.getPosition();let A=N,P=Number.MAX_VALUE,O=!1;for(const x of T){const W=x.endColumn,U=x.endLineNumber,F=x.startLineNumber;(U===N.lineNumber||F===N.lineNumber)&&Math.abs(N.column-W){G.highlightRange=G.action.isPreferred}),F.push(...U.validActions)),{validActions:F,allActions:R.allActions,documentation:R.documentation,hasAutoFix:R.hasAutoFix,dispose:()=>{R.dispose()}}}}}}return(0,i.getCodeActions)(this._registry,d,o.selection,o.trigger,C.Progress.None,h)}));o.trigger.type===1&&((c=this._progressService)===null||c===void 0||c.showWhile(g,250)),this.setState(new t.Triggered(o.trigger,a,g))},void 0),this._codeActionOracle.value.trigger({type:2,triggerAction:s.CodeActionTriggerSource.Default})}else this._supportedCodeActions.reset()}trigger(d){var l;(l=this._codeActionOracle.value)===null||l===void 0||l.trigger(d)}setState(d,l){d!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=d,!l&&!this._disposed&&this._onDidChangeState.fire(d))}}e.CodeActionModel=u}),define(te[354],ie([1,0,7,61,26,6,2,27,208,135,643,34,442]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.LightBulbWidget=void 0;var n;(function(r){r.Hidden={type:0};class u{constructor(d,l,o,c){this.actions=d,this.trigger=l,this.editorPosition=o,this.widgetPosition=c,this.type=1}}r.Showing=u})(n||(n={}));let t=i=class extends S.Disposable{constructor(u,f){super(),this._editor=u,this._onClick=this._register(new D.Emitter),this.onClick=this._onClick.event,this._state=n.Hidden,this._domNode=L.$("div.lightBulbWidget"),this._register(I.Gesture.ignoreTarget(this._domNode)),this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(d=>{const l=this._editor.getModel();(this.state.type!==1||!l||this.state.editorPosition.lineNumber>=l.getLineCount())&&this.hide()})),this._register(L.addStandardDisposableGenericMouseDownListener(this._domNode,d=>{if(this.state.type!==1)return;this._editor.focus(),d.preventDefault();const{top:l,height:o}=L.getDomNodePagePosition(this._domNode),c=this._editor.getOption(66);let a=Math.floor(c/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber{(d.buttons&1)===1&&this.hide()})),this._register(this._editor.onDidChangeConfiguration(d=>{d.hasChanged(64)&&!this._editor.getOption(64).enabled&&this.hide()})),this._register(D.Event.runAndSubscribe(f.onDidUpdateKeybindings,()=>{var d,l,o,c;this._preferredKbLabel=(l=(d=f.lookupKeybinding(v.autoFixCommandId))===null||d===void 0?void 0:d.getLabel())!==null&&l!==void 0?l:void 0,this._quickFixKbLabel=(c=(o=f.lookupKeybinding(v.quickFixCommandId))===null||o===void 0?void 0:o.getLabel())!==null&&c!==void 0?c:void 0,this._updateLightBulbTitleAndIcon()}))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(u,f,d){if(u.validActions.length<=0)return this.hide();const l=this._editor.getOptions();if(!l.get(64).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:c,column:a}=o.validatePosition(d),g=o.getOptions().tabSize,h=l.get(50),p=o.getLineContent(c),b=(0,_.computeIndentLevel)(p,g),w=h.spaceWidth*b>22,E=M=>M>2&&this._editor.getTopForLineNumber(M)===this._editor.getTopForLineNumber(M-1);let k=c;if(!w){if(c>1&&!E(c-1))k-=1;else if(!E(c+1))k+=1;else if(a*h.spaceWidth<22)return this.hide()}this.state=new n.Showing(u,f,d,{position:{lineNumber:k,column:1},preference:i._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state!==n.Hidden&&(this.state=n.Hidden,this._editor.layoutContentWidget(this))}get state(){return this._state}set state(u){this._state=u,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix&&(this._domNode.classList.remove(...m.ThemeIcon.asClassNameArray(y.Codicon.lightBulb)),this._domNode.classList.add(...m.ThemeIcon.asClassNameArray(y.Codicon.lightbulbAutofix)),this._preferredKbLabel)){this.title=C.localize(0,null,this._preferredKbLabel);return}this._domNode.classList.remove(...m.ThemeIcon.asClassNameArray(y.Codicon.lightbulbAutofix)),this._domNode.classList.add(...m.ThemeIcon.asClassNameArray(y.Codicon.lightBulb)),this._quickFixKbLabel?this.title=C.localize(1,null,this._quickFixKbLabel):this.title=C.localize(2,null)}set title(u){this._domNode.title=u}};e.LightBulbWidget=t,t.ID="editor.contrib.lightbulbWidget",t._posPref=[0],e.LightBulbWidget=t=i=Ie([ge(1,s.IKeybindingService)],t)}),define(te[803],ie([1,0,16,143,660]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends L.EditorAction{constructor(){super({id:"editor.action.fontZoomIn",label:y.localize(0,null),alias:"Editor Font Zoom In",precondition:void 0})}run(v,C){I.EditorZoom.setZoomLevel(I.EditorZoom.getZoomLevel()+1)}}class S extends L.EditorAction{constructor(){super({id:"editor.action.fontZoomOut",label:y.localize(1,null),alias:"Editor Font Zoom Out",precondition:void 0})}run(v,C){I.EditorZoom.setZoomLevel(I.EditorZoom.getZoomLevel()-1)}}class m extends L.EditorAction{constructor(){super({id:"editor.action.fontZoomReset",label:y.localize(2,null),alias:"Editor Font Zoom Reset",precondition:void 0})}run(v,C){I.EditorZoom.setZoomLevel(0)}}(0,L.registerEditorAction)(D),(0,L.registerEditorAction)(S),(0,L.registerEditorAction)(m)}),define(te[355],ie([1,0,45,13,19,9,43,63,20,21,103,175,12,5,24,115,65,298,661,25,745,8,18,66]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getOnTypeFormattingEdits=e.getDocumentFormattingEditsUntilResult=e.getDocumentRangeFormattingEditsUntilResult=e.formatDocumentWithProvider=e.formatDocumentWithSelectedProvider=e.formatDocumentRangesWithProvider=e.formatDocumentRangesWithSelectedProvider=e.FormattingConflicts=e.getRealAndSyntheticDocumentFormattersOrdered=e.alertFormattingEdits=void 0;function h(N){if(N=N.filter(x=>x.range),!N.length)return;let{range:A}=N[0];for(let x=1;x0&&n.Range.areIntersectingOrTouching(se[J-1],ee)?se[J-1]=n.Range.fromPositions(se[J-1].getStartPosition(),ee.getEndPosition()):J=se.push(ee);const q=ee=>be(this,void 0,void 0,function*(){var le,ue;G.trace("[format][provideDocumentRangeFormattingEdits] (request)",(le=A.extensionId)===null||le===void 0?void 0:le.value,ee);const de=(yield A.provideDocumentRangeFormattingEdits(Y,ee,Y.getFormattingOptions(),ne.token))||[];return G.trace("[format][provideDocumentRangeFormattingEdits] (response)",(ue=A.extensionId)===null||ue===void 0?void 0:ue.value,de),de}),H=(ee,le)=>{if(!ee.length||!le.length)return!1;const ue=ee.reduce((de,ce)=>n.Range.plusRange(de,ce.range),ee[0].range);if(!le.some(de=>n.Range.intersectRanges(ue,de.range)))return!1;for(const de of ee)for(const ce of le)if(n.Range.intersectRanges(de.range,ce.range))return!0;return!1},V=[],Z=[];try{if(typeof A.provideDocumentRangesFormattingEdits=="function"){G.trace("[format][provideDocumentRangeFormattingEdits] (request)",(W=A.extensionId)===null||W===void 0?void 0:W.value,se);const ee=(yield A.provideDocumentRangesFormattingEdits(Y,se,Y.getFormattingOptions(),ne.token))||[];G.trace("[format][provideDocumentRangeFormattingEdits] (response)",(U=A.extensionId)===null||U===void 0?void 0:U.value,ee),Z.push(ee)}else{for(const ee of se){if(ne.token.isCancellationRequested)return!0;Z.push(yield q(ee))}for(let ee=0;ee({text:ue.text,range:n.Range.lift(ue.range),forceMoveMarkers:!0})),ue=>{for(const{range:de}of ue)if(n.Range.areIntersectingOrTouching(de,le))return[new t.Selection(de.startLineNumber,de.startColumn,de.endLineNumber,de.endColumn)];return null})}return!0})}e.formatDocumentRangesWithProvider=E;function k(N,A,P,O,x){return be(this,void 0,void 0,function*(){const W=N.get(c.IInstantiationService),U=N.get(a.ILanguageFeaturesService),F=(0,s.isCodeEditor)(A)?A.getModel():A,G=p(U.documentFormattingEditProvider,U.documentRangeFormattingEditProvider,F),Y=yield b.select(G,F,P);Y&&(O.report(Y),yield W.invokeFunction(M,Y,A,P,x))})}e.formatDocumentWithSelectedProvider=k;function M(N,A,P,O,x){return be(this,void 0,void 0,function*(){const W=N.get(r.IEditorWorkerService);let U,F;(0,s.isCodeEditor)(P)?(U=P.getModel(),F=new C.EditorStateCancellationTokenSource(P,5,void 0,x)):(U=P,F=new C.TextModelCancellationTokenSource(P,x));let G;try{const Y=yield A.provideDocumentFormattingEdits(U,U.getFormattingOptions(),F.token);if(G=yield W.computeMoreMinimalEdits(U.uri,Y),F.token.isCancellationRequested)return!0}finally{F.dispose()}if(!G||G.length===0)return!1;if((0,s.isCodeEditor)(P))f.FormattingEdit.execute(P,G,O!==2),O!==2&&(h(G),P.revealPositionInCenterIfOutsideViewport(P.getPosition(),1));else{const[{range:Y}]=G,ne=new t.Selection(Y.startLineNumber,Y.startColumn,Y.endLineNumber,Y.endColumn);U.pushEditOperations([ne],G.map(se=>({text:se.text,range:n.Range.lift(se.range),forceMoveMarkers:!0})),se=>{for(const{range:J}of se)if(n.Range.areIntersectingOrTouching(J,ne))return[new t.Selection(J.startLineNumber,J.startColumn,J.endLineNumber,J.endColumn)];return null})}return!0})}e.formatDocumentWithProvider=M;function R(N,A,P,O,x,W){return be(this,void 0,void 0,function*(){const U=A.documentRangeFormattingEditProvider.ordered(P);for(const F of U){const G=yield Promise.resolve(F.provideDocumentRangeFormattingEdits(P,O,x,W)).catch(D.onUnexpectedExternalError);if((0,I.isNonEmptyArray)(G))return yield N.computeMoreMinimalEdits(P.uri,G)}})}e.getDocumentRangeFormattingEditsUntilResult=R;function B(N,A,P,O,x){return be(this,void 0,void 0,function*(){const W=p(A.documentFormattingEditProvider,A.documentRangeFormattingEditProvider,P);for(const U of W){const F=yield Promise.resolve(U.provideDocumentFormattingEdits(P,O,x)).catch(D.onUnexpectedExternalError);if((0,I.isNonEmptyArray)(F))return yield N.computeMoreMinimalEdits(P.uri,F)}})}e.getDocumentFormattingEditsUntilResult=B;function T(N,A,P,O,x,W,U){const F=A.onTypeFormattingEditProvider.ordered(P);return F.length===0||F[0].autoFormatTriggerCharacters.indexOf(x)<0?Promise.resolve(void 0):Promise.resolve(F[0].provideOnTypeFormattingEdits(P,O,x,W,U)).catch(D.onUnexpectedExternalError).then(G=>N.computeMoreMinimalEdits(P.uri,G))}e.getOnTypeFormattingEdits=T,l.CommandsRegistry.registerCommand("_executeFormatRangeProvider",function(N,...A){return be(this,void 0,void 0,function*(){const[P,O,x]=A;(0,_.assertType)(v.URI.isUri(P)),(0,_.assertType)(n.Range.isIRange(O));const W=N.get(u.ITextModelService),U=N.get(r.IEditorWorkerService),F=N.get(a.ILanguageFeaturesService),G=yield W.createModelReference(P);try{return R(U,F,G.object.textEditorModel,n.Range.lift(O),x,y.CancellationToken.None)}finally{G.dispose()}})}),l.CommandsRegistry.registerCommand("_executeFormatDocumentProvider",function(N,...A){return be(this,void 0,void 0,function*(){const[P,O]=A;(0,_.assertType)(v.URI.isUri(P));const x=N.get(u.ITextModelService),W=N.get(r.IEditorWorkerService),U=N.get(a.ILanguageFeaturesService),F=yield x.createModelReference(P);try{return B(W,U,F.object.textEditorModel,O,y.CancellationToken.None)}finally{F.dispose()}})}),l.CommandsRegistry.registerCommand("_executeFormatOnTypeProvider",function(N,...A){return be(this,void 0,void 0,function*(){const[P,O,x,W]=A;(0,_.assertType)(v.URI.isUri(P)),(0,_.assertType)(i.Position.isIPosition(O)),(0,_.assertType)(typeof x=="string");const U=N.get(u.ITextModelService),F=N.get(r.IEditorWorkerService),G=N.get(a.ILanguageFeaturesService),Y=yield U.createModelReference(P);try{return T(F,G,Y.object.textEditorModel,i.Position.lift(O),x,W,y.CancellationToken.None)}finally{Y.dispose()}})})}),define(te[804],ie([1,0,13,19,9,62,2,16,33,121,5,22,115,18,355,298,662,25,15,8,85]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FormatOnType=void 0;let c=class{constructor(b,w,E){this._editor=b,this._languageFeaturesService=w,this._workerService=E,this._disposables=new S.DisposableStore,this._sessionDisposables=new S.DisposableStore,this._disposables.add(w.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(b.onDidChangeModel(()=>this._update())),this._disposables.add(b.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(b.onDidChangeConfiguration(k=>{k.hasChanged(56)&&this._update()})),this._update()}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(56)||!this._editor.hasModel())return;const b=this._editor.getModel(),[w]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(b);if(!w||!w.autoFormatTriggerCharacters)return;const E=new v.CharacterSet;for(const k of w.autoFormatTriggerCharacters)E.add(k.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType(k=>{const M=k.charCodeAt(k.length-1);E.has(M)&&this._trigger(String.fromCharCode(M))}))}_trigger(b){if(!this._editor.hasModel()||this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const w=this._editor.getModel(),E=this._editor.getPosition(),k=new I.CancellationTokenSource,M=this._editor.onDidChangeModelContent(R=>{if(R.isFlush){k.cancel(),M.dispose();return}for(let B=0,T=R.changes.length;B{k.token.isCancellationRequested||(0,L.isNonEmptyArray)(R)&&(r.FormattingEdit.execute(this._editor,R,!0),(0,t.alertFormattingEdits)(R))}).finally(()=>{M.dispose()})}};e.FormatOnType=c,c.ID="editor.contrib.autoFormat",e.FormatOnType=c=Ie([ge(1,n.ILanguageFeaturesService),ge(2,i.IEditorWorkerService)],c);let a=class{constructor(b,w,E){this.editor=b,this._languageFeaturesService=w,this._instantiationService=E,this._callOnDispose=new S.DisposableStore,this._callOnModel=new S.DisposableStore,this._callOnDispose.add(b.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(b.onDidChangeModel(()=>this._update())),this._callOnDispose.add(b.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(w.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(55)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste(({range:b})=>this._trigger(b)))}_trigger(b){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(t.formatDocumentRangesWithSelectedProvider,this.editor,b,2,o.Progress.None,I.CancellationToken.None).catch(y.onUnexpectedError))}};a.ID="editor.contrib.formatOnPaste",a=Ie([ge(1,n.ILanguageFeaturesService),ge(2,l.IInstantiationService)],a);class g extends m.EditorAction{constructor(){super({id:"editor.action.formatDocument",label:u.localize(0,null),alias:"Format Document",precondition:d.ContextKeyExpr.and(s.EditorContextKeys.notInCompositeEditor,s.EditorContextKeys.writable,s.EditorContextKeys.hasDocumentFormattingProvider),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(b,w){return be(this,void 0,void 0,function*(){if(w.hasModel()){const E=b.get(l.IInstantiationService);yield b.get(o.IEditorProgressService).showWhile(E.invokeFunction(t.formatDocumentWithSelectedProvider,w,1,o.Progress.None,I.CancellationToken.None),250)}})}}class h extends m.EditorAction{constructor(){super({id:"editor.action.formatSelection",label:u.localize(1,null),alias:"Format Selection",precondition:d.ContextKeyExpr.and(s.EditorContextKeys.writable,s.EditorContextKeys.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2084),weight:100},contextMenuOpts:{when:s.EditorContextKeys.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(b,w){return be(this,void 0,void 0,function*(){if(!w.hasModel())return;const E=b.get(l.IInstantiationService),k=w.getModel(),M=w.getSelections().map(B=>B.isEmpty()?new C.Range(B.startLineNumber,1,B.startLineNumber,k.getLineMaxColumn(B.startLineNumber)):B);yield b.get(o.IEditorProgressService).showWhile(E.invokeFunction(t.formatDocumentRangesWithSelectedProvider,w,M,1,o.Progress.None,I.CancellationToken.None),250)})}}(0,m.registerEditorContribution)(c.ID,c,2),(0,m.registerEditorContribution)(a.ID,a,2),(0,m.registerEditorAction)(g),(0,m.registerEditorAction)(h),f.CommandsRegistry.registerCommand("editor.action.format",p=>be(void 0,void 0,void 0,function*(){const b=p.get(_.ICodeEditorService).getFocusedCodeEditor();if(!b||!b.hasModel())return;const w=p.get(f.ICommandService);b.getSelection().isEmpty()?yield w.executeCommand("editor.action.formatDocument"):yield w.executeCommand("editor.action.formatSelection")}))}),define(te[246],ie([1,0,13,19,9,16,18,155]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getReferencesAtPosition=e.getTypeDefinitionsAtPosition=e.getImplementationsAtPosition=e.getDeclarationsAtPosition=e.getDefinitionsAtPosition=void 0;function _(r,u,f,d){return be(this,void 0,void 0,function*(){const o=f.ordered(r).map(a=>Promise.resolve(d(a,r,u)).then(void 0,g=>{(0,y.onUnexpectedExternalError)(g)})),c=yield Promise.all(o);return(0,L.coalesce)(c.flat())})}function v(r,u,f,d){return _(u,f,r,(l,o,c)=>l.provideDefinition(o,c,d))}e.getDefinitionsAtPosition=v;function C(r,u,f,d){return _(u,f,r,(l,o,c)=>l.provideDeclaration(o,c,d))}e.getDeclarationsAtPosition=C;function s(r,u,f,d){return _(u,f,r,(l,o,c)=>l.provideImplementation(o,c,d))}e.getImplementationsAtPosition=s;function i(r,u,f,d){return _(u,f,r,(l,o,c)=>l.provideTypeDefinition(o,c,d))}e.getTypeDefinitionsAtPosition=i;function n(r,u,f,d,l){return _(u,f,r,(o,c,a)=>be(this,void 0,void 0,function*(){const g=yield o.provideReferences(c,a,{includeDeclaration:!0},l);if(!d||!g||g.length!==2)return g;const h=yield o.provideReferences(c,a,{includeDeclaration:!1},l);return h&&h.length===1?h:g}))}e.getReferencesAtPosition=n;function t(r){return be(this,void 0,void 0,function*(){const u=yield r(),f=new m.ReferencesModel(u,""),d=f.references.map(l=>l.link);return f.dispose(),d})}(0,D.registerModelAndPositionCommand)("_executeDefinitionProvider",(r,u,f)=>{const d=r.get(S.ILanguageFeaturesService),l=v(d.definitionProvider,u,f,I.CancellationToken.None);return t(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeTypeDefinitionProvider",(r,u,f)=>{const d=r.get(S.ILanguageFeaturesService),l=i(d.typeDefinitionProvider,u,f,I.CancellationToken.None);return t(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeDeclarationProvider",(r,u,f)=>{const d=r.get(S.ILanguageFeaturesService),l=C(d.declarationProvider,u,f,I.CancellationToken.None);return t(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeReferenceProvider",(r,u,f)=>{const d=r.get(S.ILanguageFeaturesService),l=n(d.referenceProvider,u,f,!1,I.CancellationToken.None);return t(()=>l)}),(0,D.registerModelAndPositionCommand)("_executeImplementationProvider",(r,u,f)=>{const d=r.get(S.ILanguageFeaturesService),l=s(d.implementationProvider,u,f,I.CancellationToken.None);return t(()=>l)})}),define(te[805],ie([1,0,6,2,46,16,33,5,671,15,47,8,34,117,48]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ISymbolNavigationService=e.ctxHasSymbols=void 0,e.ctxHasSymbols=new v.RawContextKey("hasSymbols",!1,(0,_.localize)(0,null)),e.ISymbolNavigationService=(0,s.createDecorator)("ISymbolNavigationService");let r=class{constructor(d,l,o,c){this._editorService=l,this._notificationService=o,this._keybindingService=c,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=e.ctxHasSymbols.bindTo(d)}reset(){var d,l;this._ctxHasSymbols.reset(),(d=this._currentState)===null||d===void 0||d.dispose(),(l=this._currentMessage)===null||l===void 0||l.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(d){const l=d.parent.parent;if(l.references.length<=1){this.reset();return}this._currentModel=l,this._currentIdx=l.references.indexOf(d),this._ctxHasSymbols.set(!0),this._showMessage();const o=new u(this._editorService),c=o.onDidChange(a=>{if(this._ignoreEditorChange)return;const g=this._editorService.getActiveCodeEditor();if(!g)return;const h=g.getModel(),p=g.getPosition();if(!h||!p)return;let b=!1,w=!1;for(const E of l.references)if((0,y.isEqual)(E.uri,h.uri))b=!0,w=w||m.Range.containsPosition(E.range,p);else if(b)break;(!b||!w)&&this.reset()});this._currentState=(0,I.combinedDisposable)(o,c)}revealNext(d){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const l=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:l.uri,options:{selection:m.Range.collapseToStart(l.range),selectionRevealType:3}},d).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var d;(d=this._currentMessage)===null||d===void 0||d.dispose();const l=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),o=l?(0,_.localize)(1,null,this._currentIdx+1,this._currentModel.references.length,l.getLabel()):(0,_.localize)(2,null,this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(o)}};r=Ie([ge(0,v.IContextKeyService),ge(1,S.ICodeEditorService),ge(2,t.INotificationService),ge(3,i.IKeybindingService)],r),(0,C.registerSingleton)(e.ISymbolNavigationService,r,1),(0,D.registerEditorCommand)(new class extends D.EditorCommand{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:e.ctxHasSymbols,kbOpts:{weight:100,primary:70}})}runEditorCommand(f,d){return f.get(e.ISymbolNavigationService).revealNext(d)}}),n.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:e.ctxHasSymbols,primary:9,handler(f){f.get(e.ISymbolNavigationService).reset()}});let u=class{constructor(d){this._listener=new Map,this._disposables=new I.DisposableStore,this._onDidChange=new L.Emitter,this.onDidChange=this._onDidChange.event,this._disposables.add(d.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(d.onCodeEditorAdd(this._onDidAddEditor,this)),d.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,I.dispose)(this._listener.values())}_onDidAddEditor(d){this._listener.set(d,(0,I.combinedDisposable)(d.onDidChangeCursorPosition(l=>this._onDidChange.fire({editor:d})),d.onDidChangeModelContent(l=>this._onDidChange.fire({editor:d}))))}_onDidRemoveEditor(d){var l;(l=this._listener.get(d))===null||l===void 0||l.dispose(),this._listener.delete(d)}};u=Ie([ge(0,S.ICodeEditorService)],u)}),define(te[356],ie([1,0,14,19,9,16,18]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getHoverPromise=e.getHover=e.HoverProviderResult=void 0;class m{constructor(n,t,r){this.provider=n,this.hover=t,this.ordinal=r}}e.HoverProviderResult=m;function _(i,n,t,r,u){return be(this,void 0,void 0,function*(){try{const f=yield Promise.resolve(i.provideHover(t,r,u));if(f&&s(f))return new m(i,f,n)}catch(f){(0,y.onUnexpectedExternalError)(f)}})}function v(i,n,t,r){const f=i.ordered(n).map((d,l)=>_(d,l,n,t,r));return L.AsyncIterableObject.fromPromises(f).coalesce()}e.getHover=v;function C(i,n,t,r){return v(i,n,t,r).map(u=>u.hover).toPromise()}e.getHoverPromise=C,(0,D.registerModelAndPositionCommand)("_executeHoverProvider",(i,n,t)=>{const r=i.get(S.ILanguageFeaturesService);return C(r.hoverProvider,n,t,I.CancellationToken.None)});function s(i){const n=typeof i.range<"u",t=typeof i.contents<"u"&&i.contents&&i.contents.length>0;return n&&t}}),define(te[247],ie([1,0,7,13,14,57,2,116,12,5,42,356,673,28,55,18]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.renderMarkdownHovers=e.MarkdownHoverParticipant=e.MarkdownHover=void 0;const u=L.$;class f{constructor(c,a,g,h,p){this.owner=c,this.range=a,this.contents=g,this.isBeforeContent=h,this.ordinal=p}isValidForHoverAnchor(c){return c.type===1&&this.range.startColumn<=c.range.startColumn&&this.range.endColumn>=c.range.endColumn}}e.MarkdownHover=f;let d=class{constructor(c,a,g,h,p){this._editor=c,this._languageService=a,this._openerService=g,this._configurationService=h,this._languageFeaturesService=p,this.hoverOrdinal=3}createLoadingMessage(c){return new f(this,c.range,[new D.MarkdownString().appendText(i.localize(0,null))],!1,2e3)}computeSync(c,a){if(!this._editor.hasModel()||c.type!==1)return[];const g=this._editor.getModel(),h=c.range.startLineNumber,p=g.getLineMaxColumn(h),b=[];let w=1e3;const E=g.getLineLength(h),k=g.getLanguageIdAtPosition(c.range.startLineNumber,c.range.startColumn),M=this._editor.getOption(116),R=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:k});let B=!1;M>=0&&E>M&&c.range.startColumn>=M&&(B=!0,b.push(new f(this,c.range,[{value:i.localize(1,null)}],!1,w++))),!B&&typeof R=="number"&&E>=R&&b.push(new f(this,c.range,[{value:i.localize(2,null)}],!1,w++));let T=!1;for(const N of a){const A=N.range.startLineNumber===h?N.range.startColumn:1,P=N.range.endLineNumber===h?N.range.endColumn:p,O=N.options.hoverMessage;if(!O||(0,D.isEmptyMarkdownString)(O))continue;N.options.beforeContentClassName&&(T=!0);const x=new v.Range(c.range.startLineNumber,A,c.range.startLineNumber,P);b.push(new f(this,x,(0,I.asArray)(O),T,w++))}return b}computeAsync(c,a,g){if(!this._editor.hasModel()||c.type!==1)return y.AsyncIterableObject.EMPTY;const h=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(h))return y.AsyncIterableObject.EMPTY;const p=new _.Position(c.range.startLineNumber,c.range.startColumn);return(0,s.getHover)(this._languageFeaturesService.hoverProvider,h,p,g).filter(b=>!(0,D.isEmptyMarkdownString)(b.hover.contents)).map(b=>{const w=b.hover.range?v.Range.lift(b.hover.range):c.range;return new f(this,w,b.hover.contents,!1,b.ordinal)})}renderHoverParts(c,a){return l(c,a,this._editor,this._languageService,this._openerService)}};e.MarkdownHoverParticipant=d,e.MarkdownHoverParticipant=d=Ie([ge(1,C.ILanguageService),ge(2,t.IOpenerService),ge(3,n.IConfigurationService),ge(4,r.ILanguageFeaturesService)],d);function l(o,c,a,g,h){c.sort((b,w)=>b.ordinal-w.ordinal);const p=new S.DisposableStore;for(const b of c)for(const w of b.contents){if((0,D.isEmptyMarkdownString)(w))continue;const E=u("div.hover-row.markdown-hover"),k=L.append(E,u("div.hover-contents")),M=p.add(new m.MarkdownRenderer({editor:a},g,h));p.add(M.onDidRenderAsync(()=>{k.className="hover-contents code-hover-contents",o.onContentsChanged()}));const R=p.add(M.render(w));k.appendChild(R.element),o.fragment.appendChild(E)}return p}e.renderMarkdownHovers=l}),define(te[806],ie([1,0,2,10,16,244,71,5,24,22,32,50,299,676,67,201,242]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentationToTabsCommand=e.IndentationToSpacesCommand=e.AutoIndentOnPaste=e.AutoIndentOnPasteCommand=e.ReindentSelectedLinesAction=e.ReindentLinesAction=e.DetectIndentation=e.ChangeTabDisplaySize=e.IndentUsingSpaces=e.IndentUsingTabs=e.ChangeIndentationSizeAction=e.IndentationToTabsAction=e.IndentationToSpacesAction=e.getReindentEditOperations=void 0;function f(B,T,N,A,P){if(B.getLineCount()===1&&B.getLineMaxColumn(1)===1)return[];const O=T.getLanguageConfiguration(B.getLanguageId()).indentationRules;if(!O)return[];for(A=Math.min(A,B.getLineCount());N<=A&&O.unIndentedLinePattern;){const H=B.getLineContent(N);if(!O.unIndentedLinePattern.test(H))break;N++}if(N>A-1)return[];const{tabSize:x,indentSize:W,insertSpaces:U}=B.getOptions(),F=(H,V)=>(V=V||1,D.ShiftCommand.shiftIndent(H,H.length+V,x,W,U)),G=(H,V)=>(V=V||1,D.ShiftCommand.unshiftIndent(H,H.length+V,x,W,U)),Y=[];let ne;const se=B.getLineContent(N);let J=se;if(P!=null){ne=P;const H=I.getLeadingWhitespace(se);J=ne+se.substring(H.length),O.decreaseIndentPattern&&O.decreaseIndentPattern.test(J)&&(ne=G(ne),J=ne+se.substring(H.length)),se!==J&&Y.push(S.EditOperation.replaceMove(new _.Selection(N,1,N,H.length+1),(0,r.normalizeIndentation)(ne,W,U)))}else ne=I.getLeadingWhitespace(se);let q=ne;O.increaseIndentPattern&&O.increaseIndentPattern.test(J)?(q=F(q),ne=F(ne)):O.indentNextLinePattern&&O.indentNextLinePattern.test(J)&&(q=F(q)),N++;for(let H=N;H<=A;H++){const V=B.getLineContent(H),Z=I.getLeadingWhitespace(V),ee=q+V.substring(Z.length);O.decreaseIndentPattern&&O.decreaseIndentPattern.test(ee)&&(q=G(q),ne=G(ne)),Z!==q&&Y.push(S.EditOperation.replaceMove(new _.Selection(H,1,H,Z.length+1),(0,r.normalizeIndentation)(q,W,U))),!(O.unIndentedLinePattern&&O.unIndentedLinePattern.test(V))&&(O.increaseIndentPattern&&O.increaseIndentPattern.test(ee)?(ne=F(ne),q=ne):O.indentNextLinePattern&&O.indentNextLinePattern.test(ee)?q=F(q):q=ne)}return Y}e.getReindentEditOperations=f;class d extends y.EditorAction{constructor(){super({id:d.ID,label:n.localize(0,null),alias:"Convert Indentation to Spaces",precondition:v.EditorContextKeys.writable})}run(T,N){const A=N.getModel();if(!A)return;const P=A.getOptions(),O=N.getSelection();if(!O)return;const x=new M(O,P.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[x]),N.pushUndoStop(),A.updateOptions({insertSpaces:!0})}}e.IndentationToSpacesAction=d,d.ID="editor.action.indentationToSpaces";class l extends y.EditorAction{constructor(){super({id:l.ID,label:n.localize(1,null),alias:"Convert Indentation to Tabs",precondition:v.EditorContextKeys.writable})}run(T,N){const A=N.getModel();if(!A)return;const P=A.getOptions(),O=N.getSelection();if(!O)return;const x=new R(O,P.tabSize);N.pushUndoStop(),N.executeCommands(this.id,[x]),N.pushUndoStop(),A.updateOptions({insertSpaces:!1})}}e.IndentationToTabsAction=l,l.ID="editor.action.indentationToTabs";class o extends y.EditorAction{constructor(T,N,A){super(A),this.insertSpaces=T,this.displaySizeOnly=N}run(T,N){const A=T.get(t.IQuickInputService),P=T.get(s.IModelService),O=N.getModel();if(!O)return;const x=P.getCreationOptions(O.getLanguageId(),O.uri,O.isForSimpleWidget),W=O.getOptions(),U=[1,2,3,4,5,6,7,8].map(G=>({id:G.toString(),label:G.toString(),description:G===x.tabSize&&G===W.tabSize?n.localize(2,null):G===x.tabSize?n.localize(3,null):G===W.tabSize?n.localize(4,null):void 0})),F=Math.min(O.getOptions().tabSize-1,7);setTimeout(()=>{A.pick(U,{placeHolder:n.localize(5,null),activeItem:U[F]}).then(G=>{if(G&&O&&!O.isDisposed()){const Y=parseInt(G.label,10);this.displaySizeOnly?O.updateOptions({tabSize:Y}):O.updateOptions({tabSize:Y,indentSize:Y,insertSpaces:this.insertSpaces})}})},50)}}e.ChangeIndentationSizeAction=o;class c extends o{constructor(){super(!1,!1,{id:c.ID,label:n.localize(6,null),alias:"Indent Using Tabs",precondition:void 0})}}e.IndentUsingTabs=c,c.ID="editor.action.indentUsingTabs";class a extends o{constructor(){super(!0,!1,{id:a.ID,label:n.localize(7,null),alias:"Indent Using Spaces",precondition:void 0})}}e.IndentUsingSpaces=a,a.ID="editor.action.indentUsingSpaces";class g extends o{constructor(){super(!0,!0,{id:g.ID,label:n.localize(8,null),alias:"Change Tab Display Size",precondition:void 0})}}e.ChangeTabDisplaySize=g,g.ID="editor.action.changeTabDisplaySize";class h extends y.EditorAction{constructor(){super({id:h.ID,label:n.localize(9,null),alias:"Detect Indentation from Content",precondition:void 0})}run(T,N){const A=T.get(s.IModelService),P=N.getModel();if(!P)return;const O=A.getCreationOptions(P.getLanguageId(),P.uri,P.isForSimpleWidget);P.detectIndentation(O.insertSpaces,O.tabSize)}}e.DetectIndentation=h,h.ID="editor.action.detectIndentation";class p extends y.EditorAction{constructor(){super({id:"editor.action.reindentlines",label:n.localize(10,null),alias:"Reindent Lines",precondition:v.EditorContextKeys.writable})}run(T,N){const A=T.get(C.ILanguageConfigurationService),P=N.getModel();if(!P)return;const O=f(P,A,1,P.getLineCount());O.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,O),N.pushUndoStop())}}e.ReindentLinesAction=p;class b extends y.EditorAction{constructor(){super({id:"editor.action.reindentselectedlines",label:n.localize(11,null),alias:"Reindent Selected Lines",precondition:v.EditorContextKeys.writable})}run(T,N){const A=T.get(C.ILanguageConfigurationService),P=N.getModel();if(!P)return;const O=N.getSelections();if(O===null)return;const x=[];for(const W of O){let U=W.startLineNumber,F=W.endLineNumber;if(U!==F&&W.endColumn===1&&F--,U===1){if(U===F)continue}else U--;const G=f(P,A,U,F);x.push(...G)}x.length>0&&(N.pushUndoStop(),N.executeEdits(this.id,x),N.pushUndoStop())}}e.ReindentSelectedLinesAction=b;class w{constructor(T,N){this._initialSelection=N,this._edits=[],this._selectionId=null;for(const A of T)A.range&&typeof A.text=="string"&&this._edits.push(A)}getEditOperations(T,N){for(const P of this._edits)N.addEditOperation(m.Range.lift(P.range),P.text);let A=!1;Array.isArray(this._edits)&&this._edits.length===1&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(A=!0,this._selectionId=N.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(A=!0,this._selectionId=N.trackSelection(this._initialSelection,!1))),A||(this._selectionId=N.trackSelection(this._initialSelection))}computeCursorState(T,N){return N.getTrackedSelection(this._selectionId)}}e.AutoIndentOnPasteCommand=w;let E=class{constructor(T,N){this.editor=T,this._languageConfigurationService=N,this.callOnDispose=new L.DisposableStore,this.callOnModel=new L.DisposableStore,this.callOnDispose.add(T.onDidChangeConfiguration(()=>this.update())),this.callOnDispose.add(T.onDidChangeModel(()=>this.update())),this.callOnDispose.add(T.onDidChangeModelLanguage(()=>this.update()))}update(){this.callOnModel.clear(),!(this.editor.getOption(12)<4||this.editor.getOption(55))&&this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste(({range:T})=>{this.trigger(T)}))}trigger(T){const N=this.editor.getSelections();if(N===null||N.length>1)return;const A=this.editor.getModel();if(!A||!A.tokenization.isCheapToTokenize(T.getStartPosition().lineNumber))return;const P=this.editor.getOption(12),{tabSize:O,indentSize:x,insertSpaces:W}=A.getOptions(),U=[],F={shiftIndent:se=>D.ShiftCommand.shiftIndent(se,se.length+1,O,x,W),unshiftIndent:se=>D.ShiftCommand.unshiftIndent(se,se.length+1,O,x,W)};let G=T.startLineNumber;for(;G<=T.endLineNumber;){if(this.shouldIgnoreLine(A,G)){G++;continue}break}if(G>T.endLineNumber)return;let Y=A.getLineContent(G);if(!/\S/.test(Y.substring(0,T.startColumn-1))){const se=(0,u.getGoodIndentForLine)(P,A,A.getLanguageId(),G,F,this._languageConfigurationService);if(se!==null){const J=I.getLeadingWhitespace(Y),q=i.getSpaceCnt(se,O),H=i.getSpaceCnt(J,O);if(q!==H){const V=i.generateIndent(q,O,W);U.push({range:new m.Range(G,1,G,J.length+1),text:V}),Y=V+Y.substr(J.length)}else{const V=(0,u.getIndentMetadata)(A,G,this._languageConfigurationService);if(V===0||V===8)return}}}const ne=G;for(;GA.tokenization.getLineTokens(q),getLanguageId:()=>A.getLanguageId(),getLanguageIdAtPosition:(q,H)=>A.getLanguageIdAtPosition(q,H)},getLineContent:q=>q===ne?Y:A.getLineContent(q)},J=(0,u.getGoodIndentForLine)(P,se,A.getLanguageId(),G+1,F,this._languageConfigurationService);if(J!==null){const q=i.getSpaceCnt(J,O),H=i.getSpaceCnt(I.getLeadingWhitespace(A.getLineContent(G+1)),O);if(q!==H){const V=q-H;for(let Z=G+1;Z<=T.endLineNumber;Z++){const ee=A.getLineContent(Z),le=I.getLeadingWhitespace(ee),de=i.getSpaceCnt(le,O)+V,ce=i.generateIndent(de,O,W);ce!==le&&U.push({range:new m.Range(Z,1,Z,le.length+1),text:ce})}}}}if(U.length>0){this.editor.pushUndoStop();const se=new w(U,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",se),this.editor.pushUndoStop()}}shouldIgnoreLine(T,N){T.tokenization.forceTokenization(N);const A=T.getLineFirstNonWhitespaceColumn(N);if(A===0)return!0;const P=T.tokenization.getLineTokens(N);if(P.getCount()>0){const O=P.findTokenIndexAtOffset(A);if(O>=0&&P.getStandardTokenType(O)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}};e.AutoIndentOnPaste=E,E.ID="editor.contrib.autoIndentOnPaste",e.AutoIndentOnPaste=E=Ie([ge(1,C.ILanguageConfigurationService)],E);function k(B,T,N,A){if(B.getLineCount()===1&&B.getLineMaxColumn(1)===1)return;let P="";for(let x=0;x({selection:ce,index:ae,ignore:!1}));le.sort((ce,ae)=>C.Range.compareRangesUsingStarts(ce.selection,ae.selection));let ue=le[0];for(let ce=1;cenew v.Position(ae.positionLineNumber,ae.positionColumn)));const de=ee.getSelection();if(de===null)return;const ce=new S.TrimTrailingWhitespaceCommand(de,ue);ee.pushUndoStop(),ee.executeCommands(this.id,[ce]),ee.pushUndoStop()}}e.TrimTrailingWhitespaceAction=M,M.ID="editor.action.trimTrailingWhitespace";class R extends y.EditorAction{constructor(){super({id:"editor.action.deleteLines",label:u.localize(14,null),alias:"Delete Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:3113,weight:100}})}run(Z,ee){if(!ee.hasModel())return;const le=this._getLinesToRemove(ee),ue=ee.getModel();if(ue.getLineCount()===1&&ue.getLineMaxColumn(1)===1)return;let de=0;const ce=[],ae=[];for(let X=0,K=le.length;X1&&(Q-=1,re=ue.getLineMaxColumn(Q)),ce.push(_.EditOperation.replace(new s.Selection(Q,re,j,oe),"")),ae.push(new s.Selection(Q-de,z.positionColumn,Q-de,z.positionColumn)),de+=z.endLineNumber-z.startLineNumber+1}ee.pushUndoStop(),ee.executeEdits(this.id,ce,ae),ee.pushUndoStop()}_getLinesToRemove(Z){const ee=Z.getSelections().map(de=>{let ce=de.endLineNumber;return de.startLineNumberde.startLineNumber===ce.startLineNumber?de.endLineNumber-ce.endLineNumber:de.startLineNumber-ce.startLineNumber);const le=[];let ue=ee[0];for(let de=1;de=ee[de].startLineNumber?ue.endLineNumber=ee[de].endLineNumber:(le.push(ue),ue=ee[de]);return le.push(ue),le}}e.DeleteLinesAction=R;class B extends y.EditorAction{constructor(){super({id:"editor.action.indentLines",label:u.localize(15,null),alias:"Indent Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2142,weight:100}})}run(Z,ee){const le=ee._getViewModel();le&&(ee.pushUndoStop(),ee.executeCommands(this.id,m.TypeOperations.indent(le.cursorConfig,ee.getModel(),ee.getSelections())),ee.pushUndoStop())}}e.IndentLinesAction=B;class T extends y.EditorAction{constructor(){super({id:"editor.action.outdentLines",label:u.localize(16,null),alias:"Outdent Line",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2140,weight:100}})}run(Z,ee){I.CoreEditingCommands.Outdent.runEditorCommand(Z,ee,null)}}class N extends y.EditorAction{constructor(){super({id:"editor.action.insertLineBefore",label:u.localize(17,null),alias:"Insert Line Above",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:3075,weight:100}})}run(Z,ee){const le=ee._getViewModel();le&&(ee.pushUndoStop(),ee.executeCommands(this.id,m.TypeOperations.lineInsertBefore(le.cursorConfig,ee.getModel(),ee.getSelections())))}}e.InsertLineBeforeAction=N;class A extends y.EditorAction{constructor(){super({id:"editor.action.insertLineAfter",label:u.localize(18,null),alias:"Insert Line Below",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:2051,weight:100}})}run(Z,ee){const le=ee._getViewModel();le&&(ee.pushUndoStop(),ee.executeCommands(this.id,m.TypeOperations.lineInsertAfter(le.cursorConfig,ee.getModel(),ee.getSelections())))}}e.InsertLineAfterAction=A;class P extends y.EditorAction{run(Z,ee){if(!ee.hasModel())return;const le=ee.getSelection(),ue=this._getRangesToDelete(ee),de=[];for(let X=0,K=ue.length-1;X_.EditOperation.replace(X,""));ee.pushUndoStop(),ee.executeEdits(this.id,ae,ce),ee.pushUndoStop()}}e.AbstractDeleteAllToBoundaryAction=P;class O extends P{constructor(){super({id:"deleteAllLeft",label:u.localize(19,null),alias:"Delete All Left",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(Z,ee){let le=null;const ue=[];let de=0;return ee.forEach(ce=>{let ae;if(ce.endColumn===1&&de>0){const X=ce.startLineNumber-de;ae=new s.Selection(X,ce.startColumn,X,ce.startColumn)}else ae=new s.Selection(ce.startLineNumber,ce.startColumn,ce.startLineNumber,ce.startColumn);de+=ce.endLineNumber-ce.startLineNumber,ce.intersectRanges(Z)?le=ae:ue.push(ae)}),le&&ue.unshift(le),ue}_getRangesToDelete(Z){const ee=Z.getSelections();if(ee===null)return[];let le=ee;const ue=Z.getModel();return ue===null?[]:(le.sort(C.Range.compareRangesUsingStarts),le=le.map(de=>{if(de.isEmpty())if(de.startColumn===1){const ce=Math.max(1,de.startLineNumber-1),ae=de.startLineNumber===1?1:ue.getLineLength(ce)+1;return new C.Range(ce,ae,de.startLineNumber,1)}else return new C.Range(de.startLineNumber,1,de.startLineNumber,de.startColumn);else return new C.Range(de.startLineNumber,1,de.endLineNumber,de.endColumn)}),le)}}e.DeleteAllLeftAction=O;class x extends P{constructor(){super({id:"deleteAllRight",label:u.localize(20,null),alias:"Delete All Right",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(Z,ee){let le=null;const ue=[];for(let de=0,ce=ee.length,ae=0;de{if(de.isEmpty()){const ce=ee.getLineMaxColumn(de.startLineNumber);return de.startColumn===ce?new C.Range(de.startLineNumber,de.startColumn,de.startLineNumber+1,1):new C.Range(de.startLineNumber,de.startColumn,de.startLineNumber,ce)}return de});return ue.sort(C.Range.compareRangesUsingStarts),ue}}e.DeleteAllRightAction=x;class W extends y.EditorAction{constructor(){super({id:"editor.action.joinLines",label:u.localize(21,null),alias:"Join Lines",precondition:i.EditorContextKeys.writable,kbOpts:{kbExpr:i.EditorContextKeys.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(Z,ee){const le=ee.getSelections();if(le===null)return;let ue=ee.getSelection();if(ue===null)return;le.sort(C.Range.compareRangesUsingStarts);const de=[],ce=le.reduce((j,re)=>j.isEmpty()?j.endLineNumber===re.startLineNumber?(ue.equalsSelection(j)&&(ue=re),re):re.startLineNumber>j.endLineNumber+1?(de.push(j),re):new s.Selection(j.startLineNumber,j.startColumn,re.endLineNumber,re.endColumn):re.startLineNumber>j.endLineNumber?(de.push(j),re):new s.Selection(j.startLineNumber,j.startColumn,re.endLineNumber,re.endColumn));de.push(ce);const ae=ee.getModel();if(ae===null)return;const X=[],K=[];let z=ue,Q=0;for(let j=0,re=de.length;j=1){let De=!0;Ee===""&&(De=!1),De&&(Ee.charAt(Ee.length-1)===" "||Ee.charAt(Ee.length-1)===" ")&&(De=!1,Ee=Ee.replace(/[\s\uFEFF\xA0]+$/g," "));const fe=Be.substr(ye-1);Ee+=(De?" ":"")+fe,De?pe=fe.length+1:pe=fe.length}else pe=0}const Ae=new C.Range(he,me,ve,we);if(!Ae.isEmpty()){let Re;oe.isEmpty()?(X.push(_.EditOperation.replace(Ae,Ee)),Re=new s.Selection(Ae.startLineNumber-Q,Ee.length-pe+1,he-Q,Ee.length-pe+1)):oe.startLineNumber===oe.endLineNumber?(X.push(_.EditOperation.replace(Ae,Ee)),Re=new s.Selection(oe.startLineNumber-Q,oe.startColumn,oe.endLineNumber-Q,oe.endColumn)):(X.push(_.EditOperation.replace(Ae,Ee)),Re=new s.Selection(oe.startLineNumber-Q,oe.startColumn,oe.startLineNumber-Q,Ee.length-Le)),C.Range.intersectRanges(Ae,ue)!==null?z=Re:K.push(Re)}Q+=Ae.endLineNumber-Ae.startLineNumber}K.unshift(z),ee.pushUndoStop(),ee.executeEdits(this.id,X,K),ee.pushUndoStop()}}e.JoinLinesAction=W;class U extends y.EditorAction{constructor(){super({id:"editor.action.transpose",label:u.localize(22,null),alias:"Transpose Characters around the Cursor",precondition:i.EditorContextKeys.writable})}run(Z,ee){const le=ee.getSelections();if(le===null)return;const ue=ee.getModel();if(ue===null)return;const de=[];for(let ce=0,ae=le.length;ce=z){if(K.lineNumber===ue.getLineCount())continue;const Q=new C.Range(K.lineNumber,Math.max(1,K.column-1),K.lineNumber+1,1),j=ue.getValueInRange(Q).split("").reverse().join("");de.push(new D.ReplaceCommand(new s.Selection(K.lineNumber,Math.max(1,K.column-1),K.lineNumber+1,1),j))}else{const Q=new C.Range(K.lineNumber,Math.max(1,K.column-1),K.lineNumber,K.column+1),j=ue.getValueInRange(Q).split("").reverse().join("");de.push(new D.ReplaceCommandThatPreservesSelection(Q,j,new s.Selection(K.lineNumber,K.column+1,K.lineNumber,K.column+1)))}}ee.pushUndoStop(),ee.executeCommands(this.id,de),ee.pushUndoStop()}}e.TransposeAction=U;class F extends y.EditorAction{run(Z,ee){const le=ee.getSelections();if(le===null)return;const ue=ee.getModel();if(ue===null)return;const de=ee.getOption(129),ce=[];for(const ae of le)if(ae.isEmpty()){const X=ae.getStartPosition(),K=ee.getConfiguredWordAtPosition(X);if(!K)continue;const z=new C.Range(X.lineNumber,K.startColumn,X.lineNumber,K.endColumn),Q=ue.getValueInRange(z);ce.push(_.EditOperation.replace(z,this._modifyText(Q,de)))}else{const X=ue.getValueInRange(ae);ce.push(_.EditOperation.replace(ae,this._modifyText(X,de)))}ee.pushUndoStop(),ee.executeEdits(this.id,ce),ee.pushUndoStop()}}e.AbstractCaseAction=F;class G extends F{constructor(){super({id:"editor.action.transformToUppercase",label:u.localize(23,null),alias:"Transform to Uppercase",precondition:i.EditorContextKeys.writable})}_modifyText(Z,ee){return Z.toLocaleUpperCase()}}e.UpperCaseAction=G;class Y extends F{constructor(){super({id:"editor.action.transformToLowercase",label:u.localize(24,null),alias:"Transform to Lowercase",precondition:i.EditorContextKeys.writable})}_modifyText(Z,ee){return Z.toLocaleLowerCase()}}e.LowerCaseAction=Y;class ne{constructor(Z,ee){this._pattern=Z,this._flags=ee,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch{}}return this._actual}isSupported(){return this.get()!==null}}class se extends F{constructor(){super({id:"editor.action.transformToTitlecase",label:u.localize(25,null),alias:"Transform to Title Case",precondition:i.EditorContextKeys.writable})}_modifyText(Z,ee){const le=se.titleBoundary.get();return le?Z.toLocaleLowerCase().replace(le,ue=>ue.toLocaleUpperCase()):Z}}e.TitleCaseAction=se,se.titleBoundary=new ne("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class J extends F{constructor(){super({id:"editor.action.transformToSnakecase",label:u.localize(26,null),alias:"Transform to Snake Case",precondition:i.EditorContextKeys.writable})}_modifyText(Z,ee){const le=J.caseBoundary.get(),ue=J.singleLetters.get();return!le||!ue?Z:Z.replace(le,"$1_$2").replace(ue,"$1_$2$3").toLocaleLowerCase()}}e.SnakeCaseAction=J,J.caseBoundary=new ne("(\\p{Ll})(\\p{Lu})","gmu"),J.singleLetters=new ne("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");class q extends F{constructor(){super({id:"editor.action.transformToCamelcase",label:u.localize(27,null),alias:"Transform to Camel Case",precondition:i.EditorContextKeys.writable})}_modifyText(Z,ee){const le=q.wordBoundary.get();if(!le)return Z;const ue=Z.split(le);return ue.shift()+ue.map(ce=>ce.substring(0,1).toLocaleUpperCase()+ce.substring(1)).join("")}}e.CamelCaseAction=q,q.wordBoundary=new ne("[_\\s-]","gm");class H extends F{static isSupported(){return[this.caseBoundary,this.singleLetters,this.underscoreBoundary].every(ee=>ee.isSupported())}constructor(){super({id:"editor.action.transformToKebabcase",label:u.localize(28,null),alias:"Transform to Kebab Case",precondition:i.EditorContextKeys.writable})}_modifyText(Z,ee){const le=H.caseBoundary.get(),ue=H.singleLetters.get(),de=H.underscoreBoundary.get();return!le||!ue||!de?Z:Z.replace(de,"$1-$3").replace(le,"$1-$2").replace(ue,"$1-$2").toLocaleLowerCase()}}e.KebabCaseAction=H,H.caseBoundary=new ne("(\\p{Ll})(\\p{Lu})","gmu"),H.singleLetters=new ne("(\\p{Lu}|\\p{N})(\\p{Lu}\\p{Ll})","gmu"),H.underscoreBoundary=new ne("(\\S)(_)(\\S)","gm"),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(c),(0,y.registerEditorAction)(a),(0,y.registerEditorAction)(h),(0,y.registerEditorAction)(p),(0,y.registerEditorAction)(w),(0,y.registerEditorAction)(E),(0,y.registerEditorAction)(k),(0,y.registerEditorAction)(M),(0,y.registerEditorAction)(R),(0,y.registerEditorAction)(B),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(N),(0,y.registerEditorAction)(A),(0,y.registerEditorAction)(O),(0,y.registerEditorAction)(x),(0,y.registerEditorAction)(W),(0,y.registerEditorAction)(U),(0,y.registerEditorAction)(G),(0,y.registerEditorAction)(Y),J.caseBoundary.isSupported()&&J.singleLetters.isSupported()&&(0,y.registerEditorAction)(J),q.wordBoundary.isSupported()&&(0,y.registerEditorAction)(q),se.titleBoundary.isSupported()&&(0,y.registerEditorAction)(se),H.isSupported()&&(0,y.registerEditorAction)(H)}),define(te[809],ie([1,0,2,16]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class y extends L.Disposable{constructor(S){super(),this._editor=S,this._register(this._editor.onMouseDown(m=>{const _=this._editor.getOption(116);_>=0&&m.target.type===6&&m.target.position.column>=_&&this._editor.updateOptions({stopRenderingLineAfter:-1})}))}}y.ID="editor.contrib.longLinesHelper",(0,I.registerEditorContribution)(y.ID,y,2)}),define(te[189],ie([1,0,181,45,6,57,2,16,5,116,687,15,55,7,460]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.MessageController=void 0;let r=t=class{static get(l){return l.getContribution(t.ID)}constructor(l,o,c){this._openerService=c,this._messageWidget=new S.MutableDisposable,this._messageListeners=new S.DisposableStore,this._mouseOverMessage=!1,this._editor=l,this._visible=t.MESSAGE_VISIBLE.bindTo(o)}dispose(){var l;(l=this._message)===null||l===void 0||l.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(l,o){(0,I.alert)((0,D.isMarkdownString)(l)?l.value:l),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._message=(0,D.isMarkdownString)(l)?(0,L.renderMarkdown)(l,{actionHandler:{callback:a=>(0,v.openLinkFromMarkdown)(this._openerService,a,(0,D.isMarkdownString)(l)?l.isTrusted:void 0),disposables:this._messageListeners}}):void 0,this._messageWidget.value=new f(this._editor,o,typeof l=="string"?l:this._message.element),this._messageListeners.add(y.Event.debounce(this._editor.onDidBlurEditorText,(a,g)=>g,0)(()=>{this._mouseOverMessage||this._messageWidget.value&&n.isAncestor(n.getActiveElement(),this._messageWidget.value.getDomNode())||this.closeMessage()})),this._messageListeners.add(this._editor.onDidChangeCursorPosition(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidDispose(()=>this.closeMessage())),this._messageListeners.add(this._editor.onDidChangeModel(()=>this.closeMessage())),this._messageListeners.add(n.addDisposableListener(this._messageWidget.value.getDomNode(),n.EventType.MOUSE_ENTER,()=>this._mouseOverMessage=!0,!0)),this._messageListeners.add(n.addDisposableListener(this._messageWidget.value.getDomNode(),n.EventType.MOUSE_LEAVE,()=>this._mouseOverMessage=!1,!0));let c;this._messageListeners.add(this._editor.onMouseMove(a=>{a.target.position&&(c?c.containsPosition(a.target.position)||this.closeMessage():c=new _.Range(o.lineNumber-3,1,a.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(f.fadeOut(this._messageWidget.value))}};e.MessageController=r,r.ID="editor.contrib.messageController",r.MESSAGE_VISIBLE=new s.RawContextKey("messageVisible",!1,C.localize(0,null)),e.MessageController=r=t=Ie([ge(1,s.IContextKeyService),ge(2,i.IOpenerService)],r);const u=m.EditorCommand.bindToContribution(r.get);(0,m.registerEditorCommand)(new u({id:"leaveEditorMessage",precondition:r.MESSAGE_VISIBLE,handler:d=>d.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class f{static fadeOut(l){const o=()=>{l.dispose(),clearTimeout(c),l.getDomNode().removeEventListener("animationend",o)},c=setTimeout(o,110);return l.getDomNode().addEventListener("animationend",o),l.getDomNode().classList.add("fadeOut"),{dispose:o}}constructor(l,{lineNumber:o,column:c},a){this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._editor=l,this._editor.revealLinesInCenterIfOutsideViewport(o,o,0),this._position={lineNumber:o,column:c},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage"),this._domNode.style.marginLeft="-6px";const g=document.createElement("div");g.classList.add("anchor","top"),this._domNode.appendChild(g);const h=document.createElement("div");typeof a=="string"?(h.classList.add("message"),h.textContent=a):(a.classList.add("message"),h.appendChild(a)),this._domNode.appendChild(h);const p=document.createElement("div");p.classList.add("anchor","below"),this._domNode.appendChild(p),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2],positionAffinity:1}}afterRender(l){this._domNode.classList.toggle("below",l===2)}}(0,m.registerEditorContribution)(r.ID,r,4)}),define(te[810],ie([1,0,57,2,16,189,694]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadOnlyMessageController=void 0;class m extends I.Disposable{constructor(v){super(),this.editor=v,this._register(this.editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit()))}_onDidAttemptReadOnlyEdit(){const v=D.MessageController.get(this.editor);if(v&&this.editor.hasModel()){let C=this.editor.getOptions().get(91);C||(this.editor.isSimpleWidget?C=new L.MarkdownString(S.localize(0,null)):C=new L.MarkdownString(S.localize(1,null))),v.showMessage(C,this.editor.getPosition())}}}e.ReadOnlyMessageController=m,m.ID="editor.contrib.readOnlyMessageController",(0,y.registerEditorContribution)(m.ID,m,2)}),define(te[811],ie([1,0,13,19,9,16,12,5,24,22,302,550,697,30,25,18,65,20,21]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.provideSelectionRanges=e.SmartSelectController=void 0;class o{constructor(w,E){this.index=w,this.ranges=E}mov(w){const E=this.index+(w?1:-1);if(E<0||E>=this.ranges.length)return this;const k=new o(E,this.ranges);return k.ranges[E].equalsRange(this.ranges[this.index])?k.mov(w):k}}let c=l=class{static get(w){return w.getContribution(l.ID)}constructor(w,E){this._editor=w,this._languageFeaturesService=E,this._ignoreSelection=!1}dispose(){var w;(w=this._selectionListener)===null||w===void 0||w.dispose()}run(w){return be(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const E=this._editor.getSelections(),k=this._editor.getModel();if(this._state||(yield p(this._languageFeaturesService.selectionRangeProvider,k,E.map(R=>R.getPosition()),this._editor.getOption(112),I.CancellationToken.None).then(R=>{var B;if(!(!L.isNonEmptyArray(R)||R.length!==E.length)&&!(!this._editor.hasModel()||!L.equals(this._editor.getSelections(),E,(T,N)=>T.equalsSelection(N)))){for(let T=0;TN.containsPosition(E[T].getStartPosition())&&N.containsPosition(E[T].getEndPosition())),R[T].unshift(E[T]);this._state=R.map(T=>new o(0,T)),(B=this._selectionListener)===null||B===void 0||B.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var T;this._ignoreSelection||((T=this._selectionListener)===null||T===void 0||T.dispose(),this._state=void 0)})}})),!this._state)return;this._state=this._state.map(R=>R.mov(w));const M=this._state.map(R=>_.Selection.fromPositions(R.ranges[R.index].getStartPosition(),R.ranges[R.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(M)}finally{this._ignoreSelection=!1}})}};e.SmartSelectController=c,c.ID="editor.contrib.smartSelectController",e.SmartSelectController=c=l=Ie([ge(1,r.ILanguageFeaturesService)],c);class a extends D.EditorAction{constructor(w,E){super(E),this._forward=w}run(w,E){return be(this,void 0,void 0,function*(){const k=c.get(E);k&&(yield k.run(this._forward))})}}class g extends a{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:i.localize(0,null),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"1_basic",title:i.localize(1,null),order:2}})}}t.CommandsRegistry.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class h extends a{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:i.localize(2,null),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"1_basic",title:i.localize(3,null),order:3}})}}(0,D.registerEditorContribution)(c.ID,c,4),(0,D.registerEditorAction)(g),(0,D.registerEditorAction)(h);function p(b,w,E,k,M){return be(this,void 0,void 0,function*(){const R=b.all(w).concat(new s.WordSelectionRangeProvider(k.selectSubwords));R.length===1&&R.unshift(new C.BracketSelectionRangeProvider);const B=[],T=[];for(const N of R)B.push(Promise.resolve(N.provideSelectionRanges(w,E,M)).then(A=>{if(L.isNonEmptyArray(A)&&A.length===E.length)for(let P=0;P{if(N.length===0)return[];N.sort((x,W)=>S.Position.isBefore(x.getStartPosition(),W.getStartPosition())?1:S.Position.isBefore(W.getStartPosition(),x.getStartPosition())||S.Position.isBefore(x.getEndPosition(),W.getEndPosition())?-1:S.Position.isBefore(W.getEndPosition(),x.getEndPosition())?1:0);const A=[];let P;for(const x of N)(!P||m.Range.containsRange(x,P)&&!m.Range.equalsRange(x,P))&&(A.push(x),P=x);if(!k.selectLeadingAndTrailingWhitespace)return A;const O=[A[0]];for(let x=1;x0&&this.word.startColumn===h.startColumn&&this.word.endColumn=0&&k.resolve(L.CancellationToken.None)}return g}};d=Ie([ge(5,i.ISuggestMemoryService)],d);let l=class{constructor(a,g,h,p){this._getEditorOption=a,this._languageFeatureService=g,this._clipboardService=h,this._suggestMemoryService=p}provideInlineCompletions(a,g,h,p){var b;return be(this,void 0,void 0,function*(){if(h.selectedSuggestionInfo)return;const w=this._getEditorOption(88,a);if(s.QuickSuggestionsOptions.isAllOff(w))return;a.tokenization.tokenizeIfCheap(g.lineNumber);const E=a.tokenization.getLineTokens(g.lineNumber),k=E.getStandardTokenType(E.findTokenIndexAtOffset(Math.max(g.column-1-1,0)));if(s.QuickSuggestionsOptions.valueFor(w,k)!=="inline")return;let M=a.getWordAtPosition(g),R;if(M?.word||(R=this._getTriggerCharacterInfo(a,g)),!M?.word&&!R||(M||(M=a.getWordUntilPosition(g)),M.endColumn!==g.column))return;let B;const T=a.getValueInRange(new _.Range(g.lineNumber,1,g.lineNumber,g.column));if(!R&&(!((b=this._lastResult)===null||b===void 0)&&b.canBeReused(a,g.lineNumber,M))){const N=new C.LineContext(T,g.column-this._lastResult.word.endColumn);this._lastResult.completionModel.lineContext=N,this._lastResult.acquire(),B=this._lastResult}else{const N=yield(0,s.provideSuggestionItems)(this._languageFeatureService.completionProvider,a,g,new s.CompletionOptions(void 0,void 0,R?.providers),R&&{triggerKind:1,triggerCharacter:R.ch},p);let A;N.needsClipboard&&(A=yield this._clipboardService.readText());const P=new C.CompletionModel(N.items,g.column,new C.LineContext(T,0),n.WordDistance.None,this._getEditorOption(117,a),this._getEditorOption(111,a),{boostFullMatch:!1,firstMatchCanBeWeak:!1},A);B=new d(a,g.lineNumber,M,P,N,this._suggestMemoryService)}return this._lastResult=B,B})}handleItemDidShow(a,g){g.completion.resolve(L.CancellationToken.None)}freeInlineCompletions(a){a.release()}_getTriggerCharacterInfo(a,g){var h;const p=a.getValueInRange(_.Range.fromPositions({lineNumber:g.lineNumber,column:g.column-1},g)),b=new Set;for(const w of this._languageFeatureService.completionProvider.all(a))!((h=w.triggerCharacters)===null||h===void 0)&&h.includes(p)&&b.add(w);if(b.size!==0)return{providers:b,ch:p}}};e.SuggestInlineCompletions=l,e.SuggestInlineCompletions=l=Ie([ge(1,v.ILanguageFeaturesService),ge(2,t.IClipboardService),ge(3,i.ISuggestMemoryService)],l);let o=u=class{constructor(a,g,h,p){if(++u._counter===1){const b=p.createInstance(l,(w,E)=>{var k;return((k=h.listCodeEditors().find(R=>R.getModel()===E))!==null&&k!==void 0?k:a).getOption(w)});u._disposable=g.inlineCompletionsProvider.register("*",b)}}dispose(){var a;--u._counter===0&&((a=u._disposable)===null||a===void 0||a.dispose(),u._disposable=void 0)}};o._counter=0,o=u=Ie([ge(1,v.ILanguageFeaturesService),ge(2,m.ICodeEditorService),ge(3,r.IInstantiationService)],o),(0,S.registerEditorContribution)("suggest.inlineCompletionsProvider",o,0)}),define(te[813],ie([1,0,59,16,709]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class D extends I.EditorAction{constructor(){super({id:"editor.action.forceRetokenize",label:y.localize(0,null),alias:"Developer: Force Retokenize",precondition:void 0})}run(m,_){if(!_.hasModel())return;const v=_.getModel();v.tokenization.resetTokenization();const C=new L.StopWatch;v.tokenization.forceTokenization(v.getLineCount()),C.stop(),console.log(`tokenization took ${C.elapsed()}`)}}(0,I.registerEditorAction)(D)}),define(te[814],ie([1,0,2,46,16,33,711,157]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnusualLineTerminatorsDetector=void 0;const _="ignoreUnusualLineTerminators";function v(i,n,t){i.setModelProperty(n.uri,_,t)}function C(i,n){return i.getModelProperty(n.uri,_)}let s=class extends L.Disposable{constructor(n,t,r){super(),this._editor=n,this._dialogService=t,this._codeEditorService=r,this._isPresentingDialog=!1,this._config=this._editor.getOption(125),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(125)&&(this._config=this._editor.getOption(125),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(u=>{u.isUndoing||this._checkForUnusualLineTerminators()})),this._checkForUnusualLineTerminators()}_checkForUnusualLineTerminators(){return be(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const n=this._editor.getModel();if(!n.mightContainUnusualLineTerminators()||C(this._codeEditorService,n)===!0||this._editor.getOption(90))return;if(this._config==="auto"){n.removeUnusualLineTerminators(this._editor.getSelections());return}if(this._isPresentingDialog)return;let r;try{this._isPresentingDialog=!0,r=yield this._dialogService.confirm({title:S.localize(0,null),message:S.localize(1,null),detail:S.localize(2,null,(0,I.basename)(n.uri)),primaryButton:S.localize(3,null),cancelButton:S.localize(4,null)})}finally{this._isPresentingDialog=!1}if(!r.confirmed){v(this._codeEditorService,n,!0);return}n.removeUnusualLineTerminators(this._editor.getSelections())})}};e.UnusualLineTerminatorsDetector=s,s.ID="editor.contrib.unusualLineTerminatorsDetector",e.UnusualLineTerminatorsDetector=s=Ie([ge(1,m.IDialogService),ge(2,D.ICodeEditorService)],s),(0,y.registerEditorContribution)(s.ID,s,1)}),define(te[357],ie([1,0,16,123,39,72,176,144,12,5,24,22,32,714,88,15,237]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeleteInsideWord=e.DeleteWordRight=e.DeleteWordEndRight=e.DeleteWordStartRight=e.DeleteWordLeft=e.DeleteWordEndLeft=e.DeleteWordStartLeft=e.DeleteWordRightCommand=e.DeleteWordLeftCommand=e.DeleteWordCommand=e.CursorWordAccessibilityRightSelect=e.CursorWordAccessibilityRight=e.CursorWordRightSelect=e.CursorWordEndRightSelect=e.CursorWordStartRightSelect=e.CursorWordRight=e.CursorWordEndRight=e.CursorWordStartRight=e.CursorWordAccessibilityLeftSelect=e.CursorWordAccessibilityLeft=e.CursorWordLeftSelect=e.CursorWordEndLeftSelect=e.CursorWordStartLeftSelect=e.CursorWordLeft=e.CursorWordEndLeft=e.CursorWordStartLeft=e.WordRightCommand=e.WordLeftCommand=e.MoveWordCommand=void 0;class f extends L.EditorCommand{constructor(q){super(q),this._inSelectionMode=q.inSelectionMode,this._wordNavigationType=q.wordNavigationType}runEditorCommand(q,H,V){if(!H.hasModel())return;const Z=(0,m.getMapForWordSeparators)(H.getOption(129)),ee=H.getModel(),ue=H.getSelections().map(de=>{const ce=new _.Position(de.positionLineNumber,de.positionColumn),ae=this._move(Z,ee,ce,this._wordNavigationType);return this._moveTo(de,ae,this._inSelectionMode)});if(ee.pushStackElement(),H._getViewModel().setCursorStates("moveWordCommand",3,ue.map(de=>D.CursorState.fromModelSelection(de))),ue.length===1){const de=new _.Position(ue[0].positionLineNumber,ue[0].positionColumn);H.revealPosition(de,0)}}_moveTo(q,H,V){return V?new C.Selection(q.selectionStartLineNumber,q.selectionStartColumn,H.lineNumber,H.column):new C.Selection(H.lineNumber,H.column,H.lineNumber,H.column)}}e.MoveWordCommand=f;class d extends f{_move(q,H,V,Z){return S.WordOperations.moveWordLeft(q,H,V,Z)}}e.WordLeftCommand=d;class l extends f{_move(q,H,V,Z){return S.WordOperations.moveWordRight(q,H,V,Z)}}e.WordRightCommand=l;class o extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}e.CursorWordStartLeft=o;class c extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}e.CursorWordEndLeft=c;class a extends d{constructor(){var q;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(q=r.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||q===void 0?void 0:q.negate()),primary:2063,mac:{primary:527},weight:100}})}}e.CursorWordLeft=a;class g extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}e.CursorWordStartLeftSelect=g;class h extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}e.CursorWordEndLeftSelect=h;class p extends d{constructor(){var q;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(q=r.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||q===void 0?void 0:q.negate()),primary:3087,mac:{primary:1551},weight:100}})}}e.CursorWordLeftSelect=p;class b extends d{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(q,H,V,Z){return super._move((0,m.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),H,V,Z)}}e.CursorWordAccessibilityLeft=b;class w extends d{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(q,H,V,Z){return super._move((0,m.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),H,V,Z)}}e.CursorWordAccessibilityLeftSelect=w;class E extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}e.CursorWordStartRight=E;class k extends l{constructor(){var q;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(q=r.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||q===void 0?void 0:q.negate()),primary:2065,mac:{primary:529},weight:100}})}}e.CursorWordEndRight=k;class M extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}e.CursorWordRight=M;class R extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}e.CursorWordStartRightSelect=R;class B extends l{constructor(){var q;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:r.ContextKeyExpr.and(s.EditorContextKeys.textInputFocus,(q=r.ContextKeyExpr.and(t.CONTEXT_ACCESSIBILITY_MODE_ENABLED,u.IsWindowsContext))===null||q===void 0?void 0:q.negate()),primary:3089,mac:{primary:1553},weight:100}})}}e.CursorWordEndRightSelect=B;class T extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}e.CursorWordRightSelect=T;class N extends l{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(q,H,V,Z){return super._move((0,m.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),H,V,Z)}}e.CursorWordAccessibilityRight=N;class A extends l{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(q,H,V,Z){return super._move((0,m.getMapForWordSeparators)(y.EditorOptions.wordSeparators.defaultValue),H,V,Z)}}e.CursorWordAccessibilityRightSelect=A;class P extends L.EditorCommand{constructor(q){super(q),this._whitespaceHeuristics=q.whitespaceHeuristics,this._wordNavigationType=q.wordNavigationType}runEditorCommand(q,H,V){const Z=q.get(i.ILanguageConfigurationService);if(!H.hasModel())return;const ee=(0,m.getMapForWordSeparators)(H.getOption(129)),le=H.getModel(),ue=H.getSelections(),de=H.getOption(6),ce=H.getOption(11),ae=Z.getLanguageConfiguration(le.getLanguageId()).getAutoClosingPairs(),X=H._getViewModel(),K=ue.map(z=>{const Q=this._delete({wordSeparators:ee,model:le,selection:z,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:H.getOption(9),autoClosingBrackets:de,autoClosingQuotes:ce,autoClosingPairs:ae,autoClosedCharacters:X.getCursorAutoClosedCharacters()},this._wordNavigationType);return new I.ReplaceCommand(Q,"")});H.pushUndoStop(),H.executeCommands(this.id,K),H.pushUndoStop()}}e.DeleteWordCommand=P;class O extends P{_delete(q,H){const V=S.WordOperations.deleteWordLeft(q,H);return V||new v.Range(1,1,1,1)}}e.DeleteWordLeftCommand=O;class x extends P{_delete(q,H){const V=S.WordOperations.deleteWordRight(q,H);if(V)return V;const Z=q.model.getLineCount(),ee=q.model.getLineMaxColumn(Z);return new v.Range(Z,ee,Z,ee)}}e.DeleteWordRightCommand=x;class W extends O{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:s.EditorContextKeys.writable})}}e.DeleteWordStartLeft=W;class U extends O{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:s.EditorContextKeys.writable})}}e.DeleteWordEndLeft=U;class F extends O{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}e.DeleteWordLeft=F;class G extends x{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:s.EditorContextKeys.writable})}}e.DeleteWordStartRight=G;class Y extends x{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:s.EditorContextKeys.writable})}}e.DeleteWordEndRight=Y;class ne extends x{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:s.EditorContextKeys.writable,kbOpts:{kbExpr:s.EditorContextKeys.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}e.DeleteWordRight=ne;class se extends L.EditorAction{constructor(){super({id:"deleteInsideWord",precondition:s.EditorContextKeys.writable,label:n.localize(0,null),alias:"Delete Word"})}run(q,H,V){if(!H.hasModel())return;const Z=(0,m.getMapForWordSeparators)(H.getOption(129)),ee=H.getModel(),ue=H.getSelections().map(de=>{const ce=S.WordOperations.deleteInsideWord(Z,ee,de);return new I.ReplaceCommand(ce,"")});H.pushUndoStop(),H.executeCommands(this.id,ue),H.pushUndoStop()}}e.DeleteInsideWord=se,(0,L.registerEditorCommand)(new o),(0,L.registerEditorCommand)(new c),(0,L.registerEditorCommand)(new a),(0,L.registerEditorCommand)(new g),(0,L.registerEditorCommand)(new h),(0,L.registerEditorCommand)(new p),(0,L.registerEditorCommand)(new E),(0,L.registerEditorCommand)(new k),(0,L.registerEditorCommand)(new M),(0,L.registerEditorCommand)(new R),(0,L.registerEditorCommand)(new B),(0,L.registerEditorCommand)(new T),(0,L.registerEditorCommand)(new b),(0,L.registerEditorCommand)(new w),(0,L.registerEditorCommand)(new N),(0,L.registerEditorCommand)(new A),(0,L.registerEditorCommand)(new W),(0,L.registerEditorCommand)(new U),(0,L.registerEditorCommand)(new F),(0,L.registerEditorCommand)(new G),(0,L.registerEditorCommand)(new Y),(0,L.registerEditorCommand)(new ne),(0,L.registerEditorAction)(se)}),define(te[815],ie([1,0,16,176,5,22,357,25]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CursorWordPartRightSelect=e.CursorWordPartRight=e.WordPartRightCommand=e.CursorWordPartLeftSelect=e.CursorWordPartLeft=e.WordPartLeftCommand=e.DeleteWordPartRight=e.DeleteWordPartLeft=void 0;class _ extends S.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(f,d){const l=I.WordPartOperations.deleteWordPartLeft(f);return l||new y.Range(1,1,1,1)}}e.DeleteWordPartLeft=_;class v extends S.DeleteWordCommand{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:D.EditorContextKeys.writable,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(f,d){const l=I.WordPartOperations.deleteWordPartRight(f);if(l)return l;const o=f.model.getLineCount(),c=f.model.getLineMaxColumn(o);return new y.Range(o,c,o,c)}}e.DeleteWordPartRight=v;class C extends S.MoveWordCommand{_move(f,d,l,o){return I.WordPartOperations.moveWordPartLeft(f,d,l)}}e.WordPartLeftCommand=C;class s extends C{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}e.CursorWordPartLeft=s,m.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class i extends C{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}e.CursorWordPartLeftSelect=i,m.CommandsRegistry.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class n extends S.MoveWordCommand{_move(f,d,l,o){return I.WordPartOperations.moveWordPartRight(f,d,l)}}e.WordPartRightCommand=n;class t extends n{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}e.CursorWordPartRight=t;class r extends n{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:D.EditorContextKeys.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}e.CursorWordPartRightSelect=r,(0,L.registerEditorCommand)(new _),(0,L.registerEditorCommand)(new v),(0,L.registerEditorCommand)(new s),(0,L.registerEditorCommand)(new i),(0,L.registerEditorCommand)(new t),(0,L.registerEditorCommand)(new r)}),define(te[816],ie([1,0,7,2,16,17,472]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IPadShowKeyboard=void 0;class S extends I.Disposable{constructor(v){super(),this.editor=v,this.widget=null,D.isIOS&&(this._register(v.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const v=!this.editor.getOption(90);!this.widget&&v?this.widget=new m(this.editor):this.widget&&!v&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}e.IPadShowKeyboard=S,S.ID="editor.contrib.iPadShowKeyboard";class m extends I.Disposable{constructor(v){super(),this.editor=v,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(L.addDisposableListener(this._domNode,"touchstart",C=>{this.editor.focus()})),this._register(L.addDisposableListener(this._domNode,"focus",C=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return m.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}m.ID="editor.contrib.ShowKeyboardWidget",(0,y.registerEditorContribution)(S.ID,S,3)}),define(te[817],ie([1,0,7,36,2,16,29,124,154,42,131,93,473]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0});let n=i=class extends y.Disposable{static get(l){return l.getContribution(i.ID)}constructor(l,o,c){super(),this._editor=l,this._languageService=c,this._widget=null,this._register(this._editor.onDidChangeModel(a=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(a=>this.stop())),this._register(S.TokenizationRegistry.onDidChange(a=>this.stop())),this._register(this._editor.onKeyUp(a=>a.keyCode===9&&this.stop()))}dispose(){this.stop(),super.dispose()}launch(){this._widget||this._editor.hasModel()&&(this._widget=new f(this._editor,this._languageService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};n.ID="editor.contrib.inspectTokens",n=i=Ie([ge(1,C.IStandaloneThemeService),ge(2,v.ILanguageService)],n);class t extends D.EditorAction{constructor(){super({id:"editor.action.inspectTokens",label:s.InspectTokensNLS.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(l,o){const c=n.get(o);c?.launch()}}function r(d){let l="";for(let o=0,c=d.length;o_.NullState,tokenize:(a,g,h)=>(0,_.nullTokenize)(l,h),tokenizeEncoded:(a,g,h)=>(0,_.nullTokenizeEncoded)(c,h)}}class f extends y.Disposable{constructor(l,o){super(),this.allowEditorOverflow=!0,this._editor=l,this._languageService=o,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=u(this._languageService.languageIdCodec,this._model.getLanguageId()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(c=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return f._ID}_compute(l){const o=this._getTokensAtLine(l.lineNumber);let c=0;for(let b=o.tokens1.length-1;b>=0;b--){const w=o.tokens1[b];if(l.column-1>=w.offset){c=b;break}}let a=0;for(let b=o.tokens2.length>>>1;b>=0;b--)if(l.column-1>=o.tokens2[b<<1]){a=b;break}const g=this._model.getLineContent(l.lineNumber);let h="";if(c{var w;return(w=g.lookupKeybinding(b.id))!==null&&w!==void 0?w:void 0}},l),{allowContextMenu:!0,skipTelemetry:typeof l?.telemetrySource=="string"})),this._options=l,this._menuService=o,this._contextKeyService=c,this._contextMenuService=a,this._sessionDisposables=this._store.add(new v.DisposableStore);const p=l?.telemetrySource;p&&this._store.add(this.actionBar.onDidRun(b=>h.publicLog2("workbenchActionExecuted",{id:b.action.id,from:p})))}setActions(d,l=[],o){var c,a,g;this._sessionDisposables.clear();const h=d.slice(),p=l.slice(),b=[];let w=0;const E=[];let k=!1;if(((c=this._options)===null||c===void 0?void 0:c.hiddenItemStrategy)!==-1)for(let M=0;MT?.id)),R=this._options.overflowBehavior.maxItems-M.size;let B=0;for(let T=0;T=R&&(h[T]=void 0,E[T]=N))}}(0,S.coalesceInPlace)(h),(0,S.coalesceInPlace)(E),super.setActions(h,D.Separator.join(E,p)),b.length>0&&this._sessionDisposables.add((0,L.addDisposableListener)(this.getElement(),"contextmenu",M=>{var R,B,T,N,A;const P=new I.StandardMouseEvent(M),O=this.getItemAction(P.target);if(!O)return;P.preventDefault(),P.stopPropagation();let x=!1;if(w===1&&((R=this._options)===null||R===void 0?void 0:R.hiddenItemStrategy)===0){x=!0;for(let F=0;Fthis._menuService.resetHiddenStates(o)}))),this._contextMenuService.showContextMenu({getAnchor:()=>P,getActions:()=>U,menuId:(T=this._options)===null||T===void 0?void 0:T.contextMenu,menuActionOptions:Object.assign({renderShortTitle:!0},(N=this._options)===null||N===void 0?void 0:N.menuOptions),skipTelemetry:typeof((A=this._options)===null||A===void 0?void 0:A.telemetrySource)=="string",contextKeyService:this._contextKeyService})}))}};e.WorkbenchToolBar=u,e.WorkbenchToolBar=u=Ie([ge(2,s.IMenuService),ge(3,i.IContextKeyService),ge(4,n.IContextMenuService),ge(5,t.IKeybindingService),ge(6,r.ITelemetryService)],u)}),define(te[819],ie([1,0,567,9,69,106,2,56,397,731,25,28,157,8,34,772,89,76]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f){"use strict";var d,l;Object.defineProperty(e,"__esModule",{value:!0}),e.CommandsHistory=e.AbstractCommandsQuickAccessProvider=void 0;let o=d=class extends r.PickerQuickAccessProvider{constructor(g,h,p,b,w,E){super(d.PREFIX,g),this.instantiationService=h,this.keybindingService=p,this.commandService=b,this.telemetryService=w,this.dialogService=E,this.commandsHistory=this._register(this.instantiationService.createInstance(c)),this.options=g}_getPicks(g,h,p,b){var w,E,k,M;return be(this,void 0,void 0,function*(){const R=yield this.getCommandPicks(p);if(p.isCancellationRequested)return[];const B=(0,D.createSingleCallFunction)(()=>{const W=new _.TfIdfCalculator;W.updateDocuments(R.map(F=>({key:F.commandId,textChunks:[F.label+(F.commandAlias?` ${F.commandAlias}`:"")]})));const U=W.calculateScores(g,p);return(0,_.normalizeTfIdfScores)(U).filter(F=>F.score>d.TFIDF_THRESHOLD).slice(0,d.TFIDF_MAX_RESULTS)}),T=[];for(const W of R){const U=(w=d.WORD_FILTER(g,W.label))!==null&&w!==void 0?w:void 0,F=W.commandAlias&&(E=d.WORD_FILTER(g,W.commandAlias))!==null&&E!==void 0?E:void 0;if(U||F)W.highlights={label:U,detail:this.options.showAlias?F:void 0},T.push(W);else if(g===W.commandId)T.push(W);else if(g.length>=3){const G=B();if(p.isCancellationRequested)return[];const Y=G.find(ne=>ne.key===W.commandId);Y&&(W.tfIdfScore=Y.score,T.push(W))}}const N=new Map;for(const W of T){const U=N.get(W.label);U?(W.description=W.commandId,U.description=U.commandId):N.set(W.label,W)}T.sort((W,U)=>{if(W.tfIdfScore&&U.tfIdfScore)return W.tfIdfScore===U.tfIdfScore?W.label.localeCompare(U.label):U.tfIdfScore-W.tfIdfScore;if(W.tfIdfScore)return 1;if(U.tfIdfScore)return-1;const F=this.commandsHistory.peek(W.commandId),G=this.commandsHistory.peek(U.commandId);if(F&&G)return F>G?-1:1;if(F)return-1;if(G)return 1;if(this.options.suggestedCommandIds){const Y=this.options.suggestedCommandIds.has(W.commandId),ne=this.options.suggestedCommandIds.has(U.commandId);if(Y&&ne)return 0;if(Y)return-1;if(ne)return 1}return W.label.localeCompare(U.label)});const A=[];let P=!1,O=!0,x=!!this.options.suggestedCommandIds;for(let W=0;Wbe(this,void 0,void 0,function*(){var W;const U=yield this.getAdditionalCommandPicks(R,T,g,p);if(p.isCancellationRequested)return[];const F=U.map(G=>this.toCommandPick(G,b));return O&&((W=F[0])===null||W===void 0?void 0:W.type)!=="separator"&&F.unshift({type:"separator",label:(0,v.localize)(4,null)}),F}))()}:A})}toCommandPick(g,h){if(g.type==="separator")return g;const p=this.keybindingService.lookupKeybinding(g.commandId),b=p?(0,v.localize)(5,null,g.label,p.getAriaLabel()):g.label;return Object.assign(Object.assign({},g),{ariaLabel:b,detail:this.options.showAlias&&g.commandAlias!==g.label?g.commandAlias:void 0,keybinding:p,accept:()=>be(this,void 0,void 0,function*(){var w,E;this.commandsHistory.push(g.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:g.commandId,from:(w=h?.from)!==null&&w!==void 0?w:"quick open"});try{!((E=g.args)===null||E===void 0)&&E.length?yield this.commandService.executeCommand(g.commandId,...g.args):yield this.commandService.executeCommand(g.commandId)}catch(k){(0,I.isCancellationError)(k)||this.dialogService.error((0,v.localize)(6,null,g.label),(0,L.toErrorMessage)(k))}})})}};e.AbstractCommandsQuickAccessProvider=o,o.PREFIX=">",o.TFIDF_THRESHOLD=.5,o.TFIDF_MAX_RESULTS=5,o.WORD_FILTER=(0,y.or)(y.matchesPrefix,y.matchesWords,y.matchesContiguousSubString),e.AbstractCommandsQuickAccessProvider=o=d=Ie([ge(1,n.IInstantiationService),ge(2,t.IKeybindingService),ge(3,C.ICommandService),ge(4,f.ITelemetryService),ge(5,i.IDialogService)],o);let c=l=class extends S.Disposable{constructor(g,h){super(),this.storageService=g,this.configurationService=h,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(g=>this.updateConfiguration(g)))}updateConfiguration(g){g&&!g.affectsConfiguration("workbench.commandPalette.history")||(this.configuredCommandsHistoryLength=l.getConfiguredCommandHistoryLength(this.configurationService),l.cache&&l.cache.limit!==this.configuredCommandsHistoryLength&&(l.cache.limit=this.configuredCommandsHistoryLength,l.saveState(this.storageService)))}load(){const g=this.storageService.get(l.PREF_KEY_CACHE,0);let h;if(g)try{h=JSON.parse(g)}catch{}const p=l.cache=new m.LRUCache(this.configuredCommandsHistoryLength,1);if(h){let b;h.usesLRU?b=h.entries:b=h.entries.sort((w,E)=>w.value-E.value),b.forEach(w=>p.set(w.key,w.value))}l.counter=this.storageService.getNumber(l.PREF_KEY_COUNTER,0,l.counter)}push(g){l.cache&&(l.cache.set(g,l.counter++),l.saveState(this.storageService))}peek(g){var h;return(h=l.cache)===null||h===void 0?void 0:h.peek(g)}static saveState(g){if(!l.cache)return;const h={usesLRU:!0,entries:[]};l.cache.forEach((p,b)=>h.entries.push({key:b,value:p})),g.store(l.PREF_KEY_CACHE,JSON.stringify(h),0,0),g.store(l.PREF_KEY_COUNTER,l.counter,0,0)}static getConfiguredCommandHistoryLength(g){var h,p;const w=(p=(h=g.getValue().workbench)===null||h===void 0?void 0:h.commandPalette)===null||p===void 0?void 0:p.history;return typeof w=="number"?w:l.DEFAULT_COMMANDS_HISTORY_LENGTH}};e.CommandsHistory=c,c.DEFAULT_COMMANDS_HISTORY_LENGTH=50,c.PREF_KEY_CACHE="commandPalette.mru.cache",c.PREF_KEY_COUNTER="commandPalette.mru.counter",c.counter=1,e.CommandsHistory=c=l=Ie([ge(0,u.IStorageService),ge(1,s.IConfigurationService)],c)}),define(te[820],ie([1,0,119,819]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorCommandsQuickAccessProvider=void 0;class y extends I.AbstractCommandsQuickAccessProvider{constructor(S,m,_,v,C,s){super(S,m,_,v,C,s)}getCodeEditorCommandPicks(){const S=this.activeTextEditorControl;if(!S)return[];const m=[];for(const _ of S.getSupportedActions())m.push({commandId:_.id,commandAlias:_.alias,label:(0,L.stripIcons)(_.label)||_.id});return m}}e.AbstractEditorCommandsQuickAccessProvider=y}),define(te[821],ie([1,0,35,134,93,33,820,8,34,25,76,157,16,22,67]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneCommandsQuickAccessProvider=void 0;let r=class extends S.AbstractEditorCommandsQuickAccessProvider{get activeTextEditorControl(){var d;return(d=this.codeEditorService.getFocusedCodeEditor())!==null&&d!==void 0?d:void 0}constructor(d,l,o,c,a,g){super({showAlias:!1},d,o,c,a,g),this.codeEditorService=l}getCommandPicks(){return be(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}hasAdditionalCommandPicks(){return!1}getAdditionalCommandPicks(){return be(this,void 0,void 0,function*(){return[]})}};e.StandaloneCommandsQuickAccessProvider=r,e.StandaloneCommandsQuickAccessProvider=r=Ie([ge(0,m.IInstantiationService),ge(1,D.ICodeEditorService),ge(2,_.IKeybindingService),ge(3,v.ICommandService),ge(4,C.ITelemetryService),ge(5,s.IDialogService)],r);class u extends i.EditorAction{constructor(){super({id:u.ID,label:y.QuickCommandNLS.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:n.EditorContextKeys.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(d){d.get(t.IQuickInputService).quickAccess.show(r.PREFIX)}}e.GotoLineAction=u,u.ID="editor.action.quickCommand",(0,i.registerEditorAction)(u),L.Registry.as(I.Extensions.Quickaccess).registerQuickAccessProvider({ctor:r,prefix:r.PREFIX,helpEntries:[{description:y.QuickCommandNLS.quickCommandHelp,commandId:u.ID}]})}),define(te[31],ie([1,0,14,36,6,96,737,239,35]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.workbenchColorsSchemaId=e.resolveColorValue=e.ifDefinedThenElse=e.oneOf=e.transparent=e.lighten=e.darken=e.executeTransform=e.chartsPurple=e.chartsGreen=e.chartsOrange=e.chartsYellow=e.chartsBlue=e.chartsRed=e.chartsLines=e.chartsForeground=e.problemsInfoIconForeground=e.problemsWarningIconForeground=e.problemsErrorIconForeground=e.minimapSliderActiveBackground=e.minimapSliderHoverBackground=e.minimapSliderBackground=e.minimapForegroundOpacity=e.minimapBackground=e.minimapError=e.minimapWarning=e.minimapInfo=e.minimapSelection=e.minimapSelectionOccurrenceHighlight=e.minimapFindMatch=e.overviewRulerSelectionHighlightForeground=e.overviewRulerFindMatchForeground=e.overviewRulerCommonContentForeground=e.overviewRulerIncomingContentForeground=e.overviewRulerCurrentContentForeground=e.mergeBorder=e.mergeCommonContentBackground=e.mergeCommonHeaderBackground=e.mergeIncomingContentBackground=e.mergeIncomingHeaderBackground=e.mergeCurrentContentBackground=e.mergeCurrentHeaderBackground=e.breadcrumbsPickerBackground=e.breadcrumbsActiveSelectionForeground=e.breadcrumbsFocusForeground=e.breadcrumbsBackground=e.breadcrumbsForeground=e.snippetFinalTabstopHighlightBorder=e.snippetFinalTabstopHighlightBackground=e.snippetTabstopHighlightBorder=e.snippetTabstopHighlightBackground=e.toolbarActiveBackground=e.toolbarHoverOutline=e.toolbarHoverBackground=e.menuSeparatorBackground=e.menuSelectionBorder=e.menuSelectionBackground=e.menuSelectionForeground=e.menuBackground=e.menuForeground=e.menuBorder=e.quickInputListFocusBackground=e.quickInputListFocusIconForeground=e.quickInputListFocusForeground=e._deprecatedQuickInputListFocusBackground=e.checkboxSelectBorder=e.checkboxBorder=e.checkboxForeground=e.checkboxSelectBackground=e.checkboxBackground=e.listDeemphasizedForeground=e.tableOddRowsBackgroundColor=e.tableColumnsBorder=e.treeInactiveIndentGuidesStroke=e.treeIndentGuidesStroke=e.listFilterMatchHighlightBorder=e.listFilterMatchHighlight=e.listFilterWidgetShadow=e.listFilterWidgetNoMatchesOutline=e.listFilterWidgetOutline=e.listFilterWidgetBackground=e.listWarningForeground=e.listErrorForeground=e.listInvalidItemForeground=e.listFocusHighlightForeground=e.listHighlightForeground=e.listDropBackground=e.listHoverForeground=e.listHoverBackground=e.listInactiveFocusOutline=e.listInactiveFocusBackground=e.listInactiveSelectionIconForeground=e.listInactiveSelectionForeground=e.listInactiveSelectionBackground=e.listActiveSelectionIconForeground=e.listActiveSelectionForeground=e.listActiveSelectionBackground=e.listFocusAndSelectionOutline=e.listFocusOutline=e.listFocusForeground=e.listFocusBackground=e.diffUnchangedTextBackground=e.diffUnchangedRegionForeground=e.diffUnchangedRegionBackground=e.diffDiagonalFill=e.diffBorder=e.diffRemovedOutline=e.diffInsertedOutline=e.diffOverviewRulerRemoved=e.diffOverviewRulerInserted=e.diffRemovedLineGutter=e.diffInsertedLineGutter=e.diffRemovedLine=e.diffInsertedLine=e.diffRemoved=e.diffInserted=e.defaultRemoveColor=e.defaultInsertColor=e.editorLightBulbAutoFixForeground=e.editorLightBulbForeground=e.editorInlayHintParameterBackground=e.editorInlayHintParameterForeground=e.editorInlayHintTypeBackground=e.editorInlayHintTypeForeground=e.editorInlayHintBackground=e.editorInlayHintForeground=e.editorActiveLinkForeground=e.editorHoverStatusBarBackground=e.editorHoverBorder=e.editorHoverForeground=e.editorHoverBackground=e.editorHoverHighlight=e.searchResultsInfoForeground=e.searchEditorFindMatchBorder=e.searchEditorFindMatch=e.editorFindRangeHighlightBorder=e.editorFindMatchHighlightBorder=e.editorFindMatchBorder=e.editorFindRangeHighlight=e.editorFindMatchHighlight=e.editorFindMatch=e.editorSelectionHighlightBorder=e.editorSelectionHighlight=e.editorInactiveSelection=e.editorSelectionForeground=e.editorSelectionBackground=e.keybindingLabelBottomBorder=e.keybindingLabelBorder=e.keybindingLabelForeground=e.keybindingLabelBackground=e.pickerGroupBorder=e.pickerGroupForeground=e.quickInputTitleBackground=e.quickInputForeground=e.quickInputBackground=e.editorWidgetResizeBorder=e.editorWidgetBorder=e.editorWidgetForeground=e.editorWidgetBackground=e.editorStickyScrollHoverBackground=e.editorStickyScrollBackground=e.editorForeground=e.editorBackground=e.sashHoverBorder=e.editorHintBorder=e.editorHintForeground=e.editorInfoBorder=e.editorInfoForeground=e.editorInfoBackground=e.editorWarningBorder=e.editorWarningForeground=e.editorWarningBackground=e.editorErrorBorder=e.editorErrorForeground=e.editorErrorBackground=e.progressBarBackground=e.scrollbarSliderActiveBackground=e.scrollbarSliderHoverBackground=e.scrollbarSliderBackground=e.scrollbarShadow=e.badgeForeground=e.badgeBackground=e.buttonSecondaryHoverBackground=e.buttonSecondaryBackground=e.buttonSecondaryForeground=e.buttonBorder=e.buttonHoverBackground=e.buttonBackground=e.buttonSeparator=e.buttonForeground=e.selectBorder=e.selectForeground=e.selectListBackground=e.selectBackground=e.inputValidationErrorBorder=e.inputValidationErrorForeground=e.inputValidationErrorBackground=e.inputValidationWarningBorder=e.inputValidationWarningForeground=e.inputValidationWarningBackground=e.inputValidationInfoBorder=e.inputValidationInfoForeground=e.inputValidationInfoBackground=e.inputPlaceholderForeground=e.inputActiveOptionForeground=e.inputActiveOptionBackground=e.inputActiveOptionHoverBackground=e.inputActiveOptionBorder=e.inputBorder=e.inputForeground=e.inputBackground=e.widgetBorder=e.widgetShadow=e.textCodeBlockBackground=e.textBlockQuoteBorder=e.textBlockQuoteBackground=e.textPreformatForeground=e.textLinkActiveForeground=e.textLinkForeground=e.textSeparatorForeground=e.selectionBackground=e.activeContrastBorder=e.contrastBorder=e.focusBorder=e.iconForeground=e.descriptionForeground=e.errorForeground=e.disabledForeground=e.foreground=e.registerColor=e.Extensions=e.asCssVariableWithDefault=e.asCssVariable=e.asCssVariableName=void 0;function v(R){return`--vscode-${R.replace(/\./g,"-")}`}e.asCssVariableName=v;function C(R){return`var(${v(R)})`}e.asCssVariable=C;function s(R,B){return`var(${v(R)}, ${B})`}e.asCssVariableWithDefault=s,e.Extensions={ColorContribution:"base.contributions.colors"};class i{constructor(){this._onDidChangeSchema=new y.Emitter,this.onDidChangeSchema=this._onDidChangeSchema.event,this.colorSchema={type:"object",properties:{}},this.colorReferenceSchema={type:"string",enum:[],enumDescriptions:[]},this.colorsById={}}registerColor(B,T,N,A=!1,P){const O={id:B,description:N,defaults:T,needsTransparency:A,deprecationMessage:P};this.colorsById[B]=O;const x={type:"string",description:N,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return P&&(x.deprecationMessage=P),this.colorSchema.properties[B]=x,this.colorReferenceSchema.enum.push(B),this.colorReferenceSchema.enumDescriptions.push(N),this._onDidChangeSchema.fire(),B}getColors(){return Object.keys(this.colorsById).map(B=>this.colorsById[B])}resolveDefaultColor(B,T){const N=this.colorsById[B];if(N&&N.defaults){const A=N.defaults[T.type];return E(A,T)}}getColorSchema(){return this.colorSchema}toString(){const B=(T,N)=>{const A=T.indexOf(".")===-1?0:1,P=N.indexOf(".")===-1?0:1;return A!==P?A-P:T.localeCompare(N)};return Object.keys(this.colorsById).sort(B).map(T=>`- \`${T}\`: ${this.colorsById[T].description}`).join(` -`)}}const n=new i;_.Registry.add(e.Extensions.ColorContribution,n);function t(R,B,T,N,A){return n.registerColor(R,B,T,N,A)}e.registerColor=t,e.foreground=t("foreground",{dark:"#CCCCCC",light:"#616161",hcDark:"#FFFFFF",hcLight:"#292929"},S.localize(0,null)),e.disabledForeground=t("disabledForeground",{dark:"#CCCCCC80",light:"#61616180",hcDark:"#A5A5A5",hcLight:"#7F7F7F"},S.localize(1,null)),e.errorForeground=t("errorForeground",{dark:"#F48771",light:"#A1260D",hcDark:"#F48771",hcLight:"#B5200D"},S.localize(2,null)),e.descriptionForeground=t("descriptionForeground",{light:"#717171",dark:h(e.foreground,.7),hcDark:h(e.foreground,.7),hcLight:h(e.foreground,.7)},S.localize(3,null)),e.iconForeground=t("icon.foreground",{dark:"#C5C5C5",light:"#424242",hcDark:"#FFFFFF",hcLight:"#292929"},S.localize(4,null)),e.focusBorder=t("focusBorder",{dark:"#007FD4",light:"#0090F1",hcDark:"#F38518",hcLight:"#006BBD"},S.localize(5,null)),e.contrastBorder=t("contrastBorder",{light:null,dark:null,hcDark:"#6FC3DF",hcLight:"#0F4A85"},S.localize(6,null)),e.activeContrastBorder=t("contrastActiveBorder",{light:null,dark:null,hcDark:e.focusBorder,hcLight:e.focusBorder},S.localize(7,null)),e.selectionBackground=t("selection.background",{light:null,dark:null,hcDark:null,hcLight:null},S.localize(8,null)),e.textSeparatorForeground=t("textSeparator.foreground",{light:"#0000002e",dark:"#ffffff2e",hcDark:I.Color.black,hcLight:"#292929"},S.localize(9,null)),e.textLinkForeground=t("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},S.localize(10,null)),e.textLinkActiveForeground=t("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hcDark:"#3794FF",hcLight:"#0F4A85"},S.localize(11,null)),e.textPreformatForeground=t("textPreformat.foreground",{light:"#A31515",dark:"#D7BA7D",hcDark:"#D7BA7D",hcLight:"#292929"},S.localize(12,null)),e.textBlockQuoteBackground=t("textBlockQuote.background",{light:"#7f7f7f1a",dark:"#7f7f7f1a",hcDark:null,hcLight:"#F2F2F2"},S.localize(13,null)),e.textBlockQuoteBorder=t("textBlockQuote.border",{light:"#007acc80",dark:"#007acc80",hcDark:I.Color.white,hcLight:"#292929"},S.localize(14,null)),e.textCodeBlockBackground=t("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hcDark:I.Color.black,hcLight:"#F2F2F2"},S.localize(15,null)),e.widgetShadow=t("widget.shadow",{dark:h(I.Color.black,.36),light:h(I.Color.black,.16),hcDark:null,hcLight:null},S.localize(16,null)),e.widgetBorder=t("widget.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(17,null)),e.inputBackground=t("input.background",{dark:"#3C3C3C",light:I.Color.white,hcDark:I.Color.black,hcLight:I.Color.white},S.localize(18,null)),e.inputForeground=t("input.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},S.localize(19,null)),e.inputBorder=t("input.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(20,null)),e.inputActiveOptionBorder=t("inputOption.activeBorder",{dark:"#007ACC",light:"#007ACC",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(21,null)),e.inputActiveOptionHoverBackground=t("inputOption.hoverBackground",{dark:"#5a5d5e80",light:"#b8b8b850",hcDark:null,hcLight:null},S.localize(22,null)),e.inputActiveOptionBackground=t("inputOption.activeBackground",{dark:h(e.focusBorder,.4),light:h(e.focusBorder,.2),hcDark:I.Color.transparent,hcLight:I.Color.transparent},S.localize(23,null)),e.inputActiveOptionForeground=t("inputOption.activeForeground",{dark:I.Color.white,light:I.Color.black,hcDark:e.foreground,hcLight:e.foreground},S.localize(24,null)),e.inputPlaceholderForeground=t("input.placeholderForeground",{light:h(e.foreground,.5),dark:h(e.foreground,.5),hcDark:h(e.foreground,.7),hcLight:h(e.foreground,.7)},S.localize(25,null)),e.inputValidationInfoBackground=t("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hcDark:I.Color.black,hcLight:I.Color.white},S.localize(26,null)),e.inputValidationInfoForeground=t("inputValidation.infoForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},S.localize(27,null)),e.inputValidationInfoBorder=t("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(28,null)),e.inputValidationWarningBackground=t("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hcDark:I.Color.black,hcLight:I.Color.white},S.localize(29,null)),e.inputValidationWarningForeground=t("inputValidation.warningForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},S.localize(30,null)),e.inputValidationWarningBorder=t("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(31,null)),e.inputValidationErrorBackground=t("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hcDark:I.Color.black,hcLight:I.Color.white},S.localize(32,null)),e.inputValidationErrorForeground=t("inputValidation.errorForeground",{dark:null,light:null,hcDark:null,hcLight:e.foreground},S.localize(33,null)),e.inputValidationErrorBorder=t("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(34,null)),e.selectBackground=t("dropdown.background",{dark:"#3C3C3C",light:I.Color.white,hcDark:I.Color.black,hcLight:I.Color.white},S.localize(35,null)),e.selectListBackground=t("dropdown.listBackground",{dark:null,light:null,hcDark:I.Color.black,hcLight:I.Color.white},S.localize(36,null)),e.selectForeground=t("dropdown.foreground",{dark:"#F0F0F0",light:e.foreground,hcDark:I.Color.white,hcLight:e.foreground},S.localize(37,null)),e.selectBorder=t("dropdown.border",{dark:e.selectBackground,light:"#CECECE",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(38,null)),e.buttonForeground=t("button.foreground",{dark:I.Color.white,light:I.Color.white,hcDark:I.Color.white,hcLight:I.Color.white},S.localize(39,null)),e.buttonSeparator=t("button.separator",{dark:h(e.buttonForeground,.4),light:h(e.buttonForeground,.4),hcDark:h(e.buttonForeground,.4),hcLight:h(e.buttonForeground,.4)},S.localize(40,null)),e.buttonBackground=t("button.background",{dark:"#0E639C",light:"#007ACC",hcDark:null,hcLight:"#0F4A85"},S.localize(41,null)),e.buttonHoverBackground=t("button.hoverBackground",{dark:g(e.buttonBackground,.2),light:a(e.buttonBackground,.2),hcDark:e.buttonBackground,hcLight:e.buttonBackground},S.localize(42,null)),e.buttonBorder=t("button.border",{dark:e.contrastBorder,light:e.contrastBorder,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(43,null)),e.buttonSecondaryForeground=t("button.secondaryForeground",{dark:I.Color.white,light:I.Color.white,hcDark:I.Color.white,hcLight:e.foreground},S.localize(44,null)),e.buttonSecondaryBackground=t("button.secondaryBackground",{dark:"#3A3D41",light:"#5F6A79",hcDark:null,hcLight:I.Color.white},S.localize(45,null)),e.buttonSecondaryHoverBackground=t("button.secondaryHoverBackground",{dark:g(e.buttonSecondaryBackground,.2),light:a(e.buttonSecondaryBackground,.2),hcDark:null,hcLight:null},S.localize(46,null)),e.badgeBackground=t("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hcDark:I.Color.black,hcLight:"#0F4A85"},S.localize(47,null)),e.badgeForeground=t("badge.foreground",{dark:I.Color.white,light:"#333",hcDark:I.Color.white,hcLight:I.Color.white},S.localize(48,null)),e.scrollbarShadow=t("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hcDark:null,hcLight:null},S.localize(49,null)),e.scrollbarSliderBackground=t("scrollbarSlider.background",{dark:I.Color.fromHex("#797979").transparent(.4),light:I.Color.fromHex("#646464").transparent(.4),hcDark:h(e.contrastBorder,.6),hcLight:h(e.contrastBorder,.4)},S.localize(50,null)),e.scrollbarSliderHoverBackground=t("scrollbarSlider.hoverBackground",{dark:I.Color.fromHex("#646464").transparent(.7),light:I.Color.fromHex("#646464").transparent(.7),hcDark:h(e.contrastBorder,.8),hcLight:h(e.contrastBorder,.8)},S.localize(51,null)),e.scrollbarSliderActiveBackground=t("scrollbarSlider.activeBackground",{dark:I.Color.fromHex("#BFBFBF").transparent(.4),light:I.Color.fromHex("#000000").transparent(.6),hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(52,null)),e.progressBarBackground=t("progressBar.background",{dark:I.Color.fromHex("#0E70C0"),light:I.Color.fromHex("#0E70C0"),hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(53,null)),e.editorErrorBackground=t("editorError.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(54,null),!0),e.editorErrorForeground=t("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hcDark:"#F48771",hcLight:"#B5200D"},S.localize(55,null)),e.editorErrorBorder=t("editorError.border",{dark:null,light:null,hcDark:I.Color.fromHex("#E47777").transparent(.8),hcLight:"#B5200D"},S.localize(56,null)),e.editorWarningBackground=t("editorWarning.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(57,null),!0),e.editorWarningForeground=t("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hcDark:"#FFD370",hcLight:"#895503"},S.localize(58,null)),e.editorWarningBorder=t("editorWarning.border",{dark:null,light:null,hcDark:I.Color.fromHex("#FFCC00").transparent(.8),hcLight:I.Color.fromHex("#FFCC00").transparent(.8)},S.localize(59,null)),e.editorInfoBackground=t("editorInfo.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(60,null),!0),e.editorInfoForeground=t("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hcDark:"#3794FF",hcLight:"#1a85ff"},S.localize(61,null)),e.editorInfoBorder=t("editorInfo.border",{dark:null,light:null,hcDark:I.Color.fromHex("#3794FF").transparent(.8),hcLight:"#292929"},S.localize(62,null)),e.editorHintForeground=t("editorHint.foreground",{dark:I.Color.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hcDark:null,hcLight:null},S.localize(63,null)),e.editorHintBorder=t("editorHint.border",{dark:null,light:null,hcDark:I.Color.fromHex("#eeeeee").transparent(.8),hcLight:"#292929"},S.localize(64,null)),e.sashHoverBorder=t("sash.hoverBorder",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.focusBorder,hcLight:e.focusBorder},S.localize(65,null)),e.editorBackground=t("editor.background",{light:"#ffffff",dark:"#1E1E1E",hcDark:I.Color.black,hcLight:I.Color.white},S.localize(66,null)),e.editorForeground=t("editor.foreground",{light:"#333333",dark:"#BBBBBB",hcDark:I.Color.white,hcLight:e.foreground},S.localize(67,null)),e.editorStickyScrollBackground=t("editorStickyScroll.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},S.localize(68,null)),e.editorStickyScrollHoverBackground=t("editorStickyScrollHover.background",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:null,hcLight:I.Color.fromHex("#0F4A85").transparent(.1)},S.localize(69,null)),e.editorWidgetBackground=t("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hcDark:"#0C141F",hcLight:I.Color.white},S.localize(70,null)),e.editorWidgetForeground=t("editorWidget.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},S.localize(71,null)),e.editorWidgetBorder=t("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(72,null)),e.editorWidgetResizeBorder=t("editorWidget.resizeBorder",{light:null,dark:null,hcDark:null,hcLight:null},S.localize(73,null)),e.quickInputBackground=t("quickInput.background",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(74,null)),e.quickInputForeground=t("quickInput.foreground",{dark:e.editorWidgetForeground,light:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},S.localize(75,null)),e.quickInputTitleBackground=t("quickInputTitle.background",{dark:new I.Color(new I.RGBA(255,255,255,.105)),light:new I.Color(new I.RGBA(0,0,0,.06)),hcDark:"#000000",hcLight:I.Color.white},S.localize(76,null)),e.pickerGroupForeground=t("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hcDark:I.Color.white,hcLight:"#0F4A85"},S.localize(77,null)),e.pickerGroupBorder=t("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hcDark:I.Color.white,hcLight:"#0F4A85"},S.localize(78,null)),e.keybindingLabelBackground=t("keybindingLabel.background",{dark:new I.Color(new I.RGBA(128,128,128,.17)),light:new I.Color(new I.RGBA(221,221,221,.4)),hcDark:I.Color.transparent,hcLight:I.Color.transparent},S.localize(79,null)),e.keybindingLabelForeground=t("keybindingLabel.foreground",{dark:I.Color.fromHex("#CCCCCC"),light:I.Color.fromHex("#555555"),hcDark:I.Color.white,hcLight:e.foreground},S.localize(80,null)),e.keybindingLabelBorder=t("keybindingLabel.border",{dark:new I.Color(new I.RGBA(51,51,51,.6)),light:new I.Color(new I.RGBA(204,204,204,.4)),hcDark:new I.Color(new I.RGBA(111,195,223)),hcLight:e.contrastBorder},S.localize(81,null)),e.keybindingLabelBottomBorder=t("keybindingLabel.bottomBorder",{dark:new I.Color(new I.RGBA(68,68,68,.6)),light:new I.Color(new I.RGBA(187,187,187,.4)),hcDark:new I.Color(new I.RGBA(111,195,223)),hcLight:e.foreground},S.localize(82,null)),e.editorSelectionBackground=t("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hcDark:"#f3f518",hcLight:"#0F4A85"},S.localize(83,null)),e.editorSelectionForeground=t("editor.selectionForeground",{light:null,dark:null,hcDark:"#000000",hcLight:I.Color.white},S.localize(84,null)),e.editorInactiveSelection=t("editor.inactiveSelectionBackground",{light:h(e.editorSelectionBackground,.5),dark:h(e.editorSelectionBackground,.5),hcDark:h(e.editorSelectionBackground,.7),hcLight:h(e.editorSelectionBackground,.5)},S.localize(85,null),!0),e.editorSelectionHighlight=t("editor.selectionHighlightBackground",{light:w(e.editorSelectionBackground,e.editorBackground,.3,.6),dark:w(e.editorSelectionBackground,e.editorBackground,.3,.6),hcDark:null,hcLight:null},S.localize(86,null),!0),e.editorSelectionHighlightBorder=t("editor.selectionHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(87,null)),e.editorFindMatch=t("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hcDark:null,hcLight:null},S.localize(88,null)),e.editorFindMatchHighlight=t("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hcDark:null,hcLight:null},S.localize(89,null),!0),e.editorFindRangeHighlight=t("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hcDark:null,hcLight:null},S.localize(90,null),!0),e.editorFindMatchBorder=t("editor.findMatchBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(91,null)),e.editorFindMatchHighlightBorder=t("editor.findMatchHighlightBorder",{light:null,dark:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(92,null)),e.editorFindRangeHighlightBorder=t("editor.findRangeHighlightBorder",{dark:null,light:null,hcDark:h(e.activeContrastBorder,.4),hcLight:h(e.activeContrastBorder,.4)},S.localize(93,null),!0),e.searchEditorFindMatch=t("searchEditor.findMatchBackground",{light:h(e.editorFindMatchHighlight,.66),dark:h(e.editorFindMatchHighlight,.66),hcDark:e.editorFindMatchHighlight,hcLight:e.editorFindMatchHighlight},S.localize(94,null)),e.searchEditorFindMatchBorder=t("searchEditor.findMatchBorder",{light:h(e.editorFindMatchHighlightBorder,.66),dark:h(e.editorFindMatchHighlightBorder,.66),hcDark:e.editorFindMatchHighlightBorder,hcLight:e.editorFindMatchHighlightBorder},S.localize(95,null)),e.searchResultsInfoForeground=t("search.resultsInfoForeground",{light:e.foreground,dark:h(e.foreground,.65),hcDark:e.foreground,hcLight:e.foreground},S.localize(96,null)),e.editorHoverHighlight=t("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hcDark:"#ADD6FF26",hcLight:null},S.localize(97,null),!0),e.editorHoverBackground=t("editorHoverWidget.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(98,null)),e.editorHoverForeground=t("editorHoverWidget.foreground",{light:e.editorWidgetForeground,dark:e.editorWidgetForeground,hcDark:e.editorWidgetForeground,hcLight:e.editorWidgetForeground},S.localize(99,null)),e.editorHoverBorder=t("editorHoverWidget.border",{light:e.editorWidgetBorder,dark:e.editorWidgetBorder,hcDark:e.editorWidgetBorder,hcLight:e.editorWidgetBorder},S.localize(100,null)),e.editorHoverStatusBarBackground=t("editorHoverWidget.statusBarBackground",{dark:g(e.editorHoverBackground,.2),light:a(e.editorHoverBackground,.05),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(101,null)),e.editorActiveLinkForeground=t("editorLink.activeForeground",{dark:"#4E94CE",light:I.Color.blue,hcDark:I.Color.cyan,hcLight:"#292929"},S.localize(102,null)),e.editorInlayHintForeground=t("editorInlayHint.foreground",{dark:"#969696",light:"#969696",hcDark:I.Color.white,hcLight:I.Color.black},S.localize(103,null)),e.editorInlayHintBackground=t("editorInlayHint.background",{dark:h(e.badgeBackground,.1),light:h(e.badgeBackground,.1),hcDark:h(I.Color.white,.1),hcLight:h(e.badgeBackground,.1)},S.localize(104,null)),e.editorInlayHintTypeForeground=t("editorInlayHint.typeForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},S.localize(105,null)),e.editorInlayHintTypeBackground=t("editorInlayHint.typeBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},S.localize(106,null)),e.editorInlayHintParameterForeground=t("editorInlayHint.parameterForeground",{dark:e.editorInlayHintForeground,light:e.editorInlayHintForeground,hcDark:e.editorInlayHintForeground,hcLight:e.editorInlayHintForeground},S.localize(107,null)),e.editorInlayHintParameterBackground=t("editorInlayHint.parameterBackground",{dark:e.editorInlayHintBackground,light:e.editorInlayHintBackground,hcDark:e.editorInlayHintBackground,hcLight:e.editorInlayHintBackground},S.localize(108,null)),e.editorLightBulbForeground=t("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hcDark:"#FFCC00",hcLight:"#007ACC"},S.localize(109,null)),e.editorLightBulbAutoFixForeground=t("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},S.localize(110,null)),e.defaultInsertColor=new I.Color(new I.RGBA(155,185,85,.2)),e.defaultRemoveColor=new I.Color(new I.RGBA(255,0,0,.2)),e.diffInserted=t("diffEditor.insertedTextBackground",{dark:"#9ccc2c33",light:"#9ccc2c40",hcDark:null,hcLight:null},S.localize(111,null),!0),e.diffRemoved=t("diffEditor.removedTextBackground",{dark:"#ff000033",light:"#ff000033",hcDark:null,hcLight:null},S.localize(112,null),!0),e.diffInsertedLine=t("diffEditor.insertedLineBackground",{dark:e.defaultInsertColor,light:e.defaultInsertColor,hcDark:null,hcLight:null},S.localize(113,null),!0),e.diffRemovedLine=t("diffEditor.removedLineBackground",{dark:e.defaultRemoveColor,light:e.defaultRemoveColor,hcDark:null,hcLight:null},S.localize(114,null),!0),e.diffInsertedLineGutter=t("diffEditorGutter.insertedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(115,null)),e.diffRemovedLineGutter=t("diffEditorGutter.removedLineBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(116,null)),e.diffOverviewRulerInserted=t("diffEditorOverview.insertedForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(117,null)),e.diffOverviewRulerRemoved=t("diffEditorOverview.removedForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(118,null)),e.diffInsertedOutline=t("diffEditor.insertedTextBorder",{dark:null,light:null,hcDark:"#33ff2eff",hcLight:"#374E06"},S.localize(119,null)),e.diffRemovedOutline=t("diffEditor.removedTextBorder",{dark:null,light:null,hcDark:"#FF008F",hcLight:"#AD0707"},S.localize(120,null)),e.diffBorder=t("diffEditor.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(121,null)),e.diffDiagonalFill=t("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hcDark:null,hcLight:null},S.localize(122,null)),e.diffUnchangedRegionBackground=t("diffEditor.unchangedRegionBackground",{dark:"#3e3e3e",light:"#e4e4e4",hcDark:null,hcLight:null},S.localize(123,null)),e.diffUnchangedRegionForeground=t("diffEditor.unchangedRegionForeground",{dark:"#a3a2a2",light:"#4d4c4c",hcDark:null,hcLight:null},S.localize(124,null)),e.diffUnchangedTextBackground=t("diffEditor.unchangedCodeBackground",{dark:"#74747429",light:"#b8b8b829",hcDark:null,hcLight:null},S.localize(125,null)),e.listFocusBackground=t("list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(126,null)),e.listFocusForeground=t("list.focusForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(127,null)),e.listFocusOutline=t("list.focusOutline",{dark:e.focusBorder,light:e.focusBorder,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(128,null)),e.listFocusAndSelectionOutline=t("list.focusAndSelectionOutline",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(129,null)),e.listActiveSelectionBackground=t("list.activeSelectionBackground",{dark:"#04395E",light:"#0060C0",hcDark:null,hcLight:I.Color.fromHex("#0F4A85").transparent(.1)},S.localize(130,null)),e.listActiveSelectionForeground=t("list.activeSelectionForeground",{dark:I.Color.white,light:I.Color.white,hcDark:null,hcLight:null},S.localize(131,null)),e.listActiveSelectionIconForeground=t("list.activeSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(132,null)),e.listInactiveSelectionBackground=t("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hcDark:null,hcLight:I.Color.fromHex("#0F4A85").transparent(.1)},S.localize(133,null)),e.listInactiveSelectionForeground=t("list.inactiveSelectionForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(134,null)),e.listInactiveSelectionIconForeground=t("list.inactiveSelectionIconForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(135,null)),e.listInactiveFocusBackground=t("list.inactiveFocusBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(136,null)),e.listInactiveFocusOutline=t("list.inactiveFocusOutline",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(137,null)),e.listHoverBackground=t("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hcDark:I.Color.white.transparent(.1),hcLight:I.Color.fromHex("#0F4A85").transparent(.1)},S.localize(138,null)),e.listHoverForeground=t("list.hoverForeground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(139,null)),e.listDropBackground=t("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hcDark:null,hcLight:null},S.localize(140,null)),e.listHighlightForeground=t("list.highlightForeground",{dark:"#2AAAFF",light:"#0066BF",hcDark:e.focusBorder,hcLight:e.focusBorder},S.localize(141,null)),e.listFocusHighlightForeground=t("list.focusHighlightForeground",{dark:e.listHighlightForeground,light:b(e.listActiveSelectionBackground,e.listHighlightForeground,"#BBE7FF"),hcDark:e.listHighlightForeground,hcLight:e.listHighlightForeground},S.localize(142,null)),e.listInvalidItemForeground=t("list.invalidItemForeground",{dark:"#B89500",light:"#B89500",hcDark:"#B89500",hcLight:"#B5200D"},S.localize(143,null)),e.listErrorForeground=t("list.errorForeground",{dark:"#F88070",light:"#B01011",hcDark:null,hcLight:null},S.localize(144,null)),e.listWarningForeground=t("list.warningForeground",{dark:"#CCA700",light:"#855F00",hcDark:null,hcLight:null},S.localize(145,null)),e.listFilterWidgetBackground=t("listFilterWidget.background",{light:a(e.editorWidgetBackground,0),dark:g(e.editorWidgetBackground,0),hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(146,null)),e.listFilterWidgetOutline=t("listFilterWidget.outline",{dark:I.Color.transparent,light:I.Color.transparent,hcDark:"#f38518",hcLight:"#007ACC"},S.localize(147,null)),e.listFilterWidgetNoMatchesOutline=t("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(148,null)),e.listFilterWidgetShadow=t("listFilterWidget.shadow",{dark:e.widgetShadow,light:e.widgetShadow,hcDark:e.widgetShadow,hcLight:e.widgetShadow},S.localize(149,null)),e.listFilterMatchHighlight=t("list.filterMatchBackground",{dark:e.editorFindMatchHighlight,light:e.editorFindMatchHighlight,hcDark:null,hcLight:null},S.localize(150,null)),e.listFilterMatchHighlightBorder=t("list.filterMatchBorder",{dark:e.editorFindMatchHighlightBorder,light:e.editorFindMatchHighlightBorder,hcDark:e.contrastBorder,hcLight:e.activeContrastBorder},S.localize(151,null)),e.treeIndentGuidesStroke=t("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hcDark:"#a9a9a9",hcLight:"#a5a5a5"},S.localize(152,null)),e.treeInactiveIndentGuidesStroke=t("tree.inactiveIndentGuidesStroke",{dark:h(e.treeIndentGuidesStroke,.4),light:h(e.treeIndentGuidesStroke,.4),hcDark:h(e.treeIndentGuidesStroke,.4),hcLight:h(e.treeIndentGuidesStroke,.4)},S.localize(153,null)),e.tableColumnsBorder=t("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hcDark:null,hcLight:null},S.localize(154,null)),e.tableOddRowsBackgroundColor=t("tree.tableOddRowsBackground",{dark:h(e.foreground,.04),light:h(e.foreground,.04),hcDark:null,hcLight:null},S.localize(155,null)),e.listDeemphasizedForeground=t("list.deemphasizedForeground",{dark:"#8C8C8C",light:"#8E8E90",hcDark:"#A7A8A9",hcLight:"#666666"},S.localize(156,null)),e.checkboxBackground=t("checkbox.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},S.localize(157,null)),e.checkboxSelectBackground=t("checkbox.selectBackground",{dark:e.editorWidgetBackground,light:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(158,null)),e.checkboxForeground=t("checkbox.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},S.localize(159,null)),e.checkboxBorder=t("checkbox.border",{dark:e.selectBorder,light:e.selectBorder,hcDark:e.selectBorder,hcLight:e.selectBorder},S.localize(160,null)),e.checkboxSelectBorder=t("checkbox.selectBorder",{dark:e.iconForeground,light:e.iconForeground,hcDark:e.iconForeground,hcLight:e.iconForeground},S.localize(161,null)),e._deprecatedQuickInputListFocusBackground=t("quickInput.list.focusBackground",{dark:null,light:null,hcDark:null,hcLight:null},"",void 0,S.localize(162,null)),e.quickInputListFocusForeground=t("quickInputList.focusForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},S.localize(163,null)),e.quickInputListFocusIconForeground=t("quickInputList.focusIconForeground",{dark:e.listActiveSelectionIconForeground,light:e.listActiveSelectionIconForeground,hcDark:e.listActiveSelectionIconForeground,hcLight:e.listActiveSelectionIconForeground},S.localize(164,null)),e.quickInputListFocusBackground=t("quickInputList.focusBackground",{dark:p(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),light:p(e._deprecatedQuickInputListFocusBackground,e.listActiveSelectionBackground),hcDark:null,hcLight:null},S.localize(165,null)),e.menuBorder=t("menu.border",{dark:null,light:null,hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(166,null)),e.menuForeground=t("menu.foreground",{dark:e.selectForeground,light:e.selectForeground,hcDark:e.selectForeground,hcLight:e.selectForeground},S.localize(167,null)),e.menuBackground=t("menu.background",{dark:e.selectBackground,light:e.selectBackground,hcDark:e.selectBackground,hcLight:e.selectBackground},S.localize(168,null)),e.menuSelectionForeground=t("menu.selectionForeground",{dark:e.listActiveSelectionForeground,light:e.listActiveSelectionForeground,hcDark:e.listActiveSelectionForeground,hcLight:e.listActiveSelectionForeground},S.localize(169,null)),e.menuSelectionBackground=t("menu.selectionBackground",{dark:e.listActiveSelectionBackground,light:e.listActiveSelectionBackground,hcDark:e.listActiveSelectionBackground,hcLight:e.listActiveSelectionBackground},S.localize(170,null)),e.menuSelectionBorder=t("menu.selectionBorder",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(171,null)),e.menuSeparatorBackground=t("menu.separatorBackground",{dark:"#606060",light:"#D4D4D4",hcDark:e.contrastBorder,hcLight:e.contrastBorder},S.localize(172,null)),e.toolbarHoverBackground=t("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hcDark:null,hcLight:null},S.localize(173,null)),e.toolbarHoverOutline=t("toolbar.hoverOutline",{dark:null,light:null,hcDark:e.activeContrastBorder,hcLight:e.activeContrastBorder},S.localize(174,null)),e.toolbarActiveBackground=t("toolbar.activeBackground",{dark:g(e.toolbarHoverBackground,.1),light:a(e.toolbarHoverBackground,.1),hcDark:null,hcLight:null},S.localize(175,null)),e.snippetTabstopHighlightBackground=t("editor.snippetTabstopHighlightBackground",{dark:new I.Color(new I.RGBA(124,124,124,.3)),light:new I.Color(new I.RGBA(10,50,100,.2)),hcDark:new I.Color(new I.RGBA(124,124,124,.3)),hcLight:new I.Color(new I.RGBA(10,50,100,.2))},S.localize(176,null)),e.snippetTabstopHighlightBorder=t("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(177,null)),e.snippetFinalTabstopHighlightBackground=t("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(178,null)),e.snippetFinalTabstopHighlightBorder=t("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new I.Color(new I.RGBA(10,50,100,.5)),hcDark:"#525252",hcLight:"#292929"},S.localize(179,null)),e.breadcrumbsForeground=t("breadcrumb.foreground",{light:h(e.foreground,.8),dark:h(e.foreground,.8),hcDark:h(e.foreground,.8),hcLight:h(e.foreground,.8)},S.localize(180,null)),e.breadcrumbsBackground=t("breadcrumb.background",{light:e.editorBackground,dark:e.editorBackground,hcDark:e.editorBackground,hcLight:e.editorBackground},S.localize(181,null)),e.breadcrumbsFocusForeground=t("breadcrumb.focusForeground",{light:a(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},S.localize(182,null)),e.breadcrumbsActiveSelectionForeground=t("breadcrumb.activeSelectionForeground",{light:a(e.foreground,.2),dark:g(e.foreground,.1),hcDark:g(e.foreground,.1),hcLight:g(e.foreground,.1)},S.localize(183,null)),e.breadcrumbsPickerBackground=t("breadcrumbPicker.background",{light:e.editorWidgetBackground,dark:e.editorWidgetBackground,hcDark:e.editorWidgetBackground,hcLight:e.editorWidgetBackground},S.localize(184,null));const r=.5,u=I.Color.fromHex("#40C8AE").transparent(r),f=I.Color.fromHex("#40A6FF").transparent(r),d=I.Color.fromHex("#606060").transparent(.4),l=.4,o=1;e.mergeCurrentHeaderBackground=t("merge.currentHeaderBackground",{dark:u,light:u,hcDark:null,hcLight:null},S.localize(185,null),!0),e.mergeCurrentContentBackground=t("merge.currentContentBackground",{dark:h(e.mergeCurrentHeaderBackground,l),light:h(e.mergeCurrentHeaderBackground,l),hcDark:h(e.mergeCurrentHeaderBackground,l),hcLight:h(e.mergeCurrentHeaderBackground,l)},S.localize(186,null),!0),e.mergeIncomingHeaderBackground=t("merge.incomingHeaderBackground",{dark:f,light:f,hcDark:null,hcLight:null},S.localize(187,null),!0),e.mergeIncomingContentBackground=t("merge.incomingContentBackground",{dark:h(e.mergeIncomingHeaderBackground,l),light:h(e.mergeIncomingHeaderBackground,l),hcDark:h(e.mergeIncomingHeaderBackground,l),hcLight:h(e.mergeIncomingHeaderBackground,l)},S.localize(188,null),!0),e.mergeCommonHeaderBackground=t("merge.commonHeaderBackground",{dark:d,light:d,hcDark:null,hcLight:null},S.localize(189,null),!0),e.mergeCommonContentBackground=t("merge.commonContentBackground",{dark:h(e.mergeCommonHeaderBackground,l),light:h(e.mergeCommonHeaderBackground,l),hcDark:h(e.mergeCommonHeaderBackground,l),hcLight:h(e.mergeCommonHeaderBackground,l)},S.localize(190,null),!0),e.mergeBorder=t("merge.border",{dark:null,light:null,hcDark:"#C3DF6F",hcLight:"#007ACC"},S.localize(191,null)),e.overviewRulerCurrentContentForeground=t("editorOverviewRuler.currentContentForeground",{dark:h(e.mergeCurrentHeaderBackground,o),light:h(e.mergeCurrentHeaderBackground,o),hcDark:e.mergeBorder,hcLight:e.mergeBorder},S.localize(192,null)),e.overviewRulerIncomingContentForeground=t("editorOverviewRuler.incomingContentForeground",{dark:h(e.mergeIncomingHeaderBackground,o),light:h(e.mergeIncomingHeaderBackground,o),hcDark:e.mergeBorder,hcLight:e.mergeBorder},S.localize(193,null)),e.overviewRulerCommonContentForeground=t("editorOverviewRuler.commonContentForeground",{dark:h(e.mergeCommonHeaderBackground,o),light:h(e.mergeCommonHeaderBackground,o),hcDark:e.mergeBorder,hcLight:e.mergeBorder},S.localize(194,null)),e.overviewRulerFindMatchForeground=t("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hcDark:"#AB5A00",hcLight:""},S.localize(195,null),!0),e.overviewRulerSelectionHighlightForeground=t("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},S.localize(196,null),!0),e.minimapFindMatch=t("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hcDark:"#AB5A00",hcLight:"#0F4A85"},S.localize(197,null),!0),e.minimapSelectionOccurrenceHighlight=t("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hcDark:"#ffffff",hcLight:"#0F4A85"},S.localize(198,null),!0),e.minimapSelection=t("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hcDark:"#ffffff",hcLight:"#0F4A85"},S.localize(199,null),!0),e.minimapInfo=t("minimap.infoHighlight",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoBorder,hcLight:e.editorInfoBorder},S.localize(200,null)),e.minimapWarning=t("minimap.warningHighlight",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningBorder,hcLight:e.editorWarningBorder},S.localize(201,null)),e.minimapError=t("minimap.errorHighlight",{dark:new I.Color(new I.RGBA(255,18,18,.7)),light:new I.Color(new I.RGBA(255,18,18,.7)),hcDark:new I.Color(new I.RGBA(255,50,50,1)),hcLight:"#B5200D"},S.localize(202,null)),e.minimapBackground=t("minimap.background",{dark:null,light:null,hcDark:null,hcLight:null},S.localize(203,null)),e.minimapForegroundOpacity=t("minimap.foregroundOpacity",{dark:I.Color.fromHex("#000f"),light:I.Color.fromHex("#000f"),hcDark:I.Color.fromHex("#000f"),hcLight:I.Color.fromHex("#000f")},S.localize(204,null)),e.minimapSliderBackground=t("minimapSlider.background",{light:h(e.scrollbarSliderBackground,.5),dark:h(e.scrollbarSliderBackground,.5),hcDark:h(e.scrollbarSliderBackground,.5),hcLight:h(e.scrollbarSliderBackground,.5)},S.localize(205,null)),e.minimapSliderHoverBackground=t("minimapSlider.hoverBackground",{light:h(e.scrollbarSliderHoverBackground,.5),dark:h(e.scrollbarSliderHoverBackground,.5),hcDark:h(e.scrollbarSliderHoverBackground,.5),hcLight:h(e.scrollbarSliderHoverBackground,.5)},S.localize(206,null)),e.minimapSliderActiveBackground=t("minimapSlider.activeBackground",{light:h(e.scrollbarSliderActiveBackground,.5),dark:h(e.scrollbarSliderActiveBackground,.5),hcDark:h(e.scrollbarSliderActiveBackground,.5),hcLight:h(e.scrollbarSliderActiveBackground,.5)},S.localize(207,null)),e.problemsErrorIconForeground=t("problemsErrorIcon.foreground",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},S.localize(208,null)),e.problemsWarningIconForeground=t("problemsWarningIcon.foreground",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},S.localize(209,null)),e.problemsInfoIconForeground=t("problemsInfoIcon.foreground",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},S.localize(210,null)),e.chartsForeground=t("charts.foreground",{dark:e.foreground,light:e.foreground,hcDark:e.foreground,hcLight:e.foreground},S.localize(211,null)),e.chartsLines=t("charts.lines",{dark:h(e.foreground,.5),light:h(e.foreground,.5),hcDark:h(e.foreground,.5),hcLight:h(e.foreground,.5)},S.localize(212,null)),e.chartsRed=t("charts.red",{dark:e.editorErrorForeground,light:e.editorErrorForeground,hcDark:e.editorErrorForeground,hcLight:e.editorErrorForeground},S.localize(213,null)),e.chartsBlue=t("charts.blue",{dark:e.editorInfoForeground,light:e.editorInfoForeground,hcDark:e.editorInfoForeground,hcLight:e.editorInfoForeground},S.localize(214,null)),e.chartsYellow=t("charts.yellow",{dark:e.editorWarningForeground,light:e.editorWarningForeground,hcDark:e.editorWarningForeground,hcLight:e.editorWarningForeground},S.localize(215,null)),e.chartsOrange=t("charts.orange",{dark:e.minimapFindMatch,light:e.minimapFindMatch,hcDark:e.minimapFindMatch,hcLight:e.minimapFindMatch},S.localize(216,null)),e.chartsGreen=t("charts.green",{dark:"#89D185",light:"#388A34",hcDark:"#89D185",hcLight:"#374e06"},S.localize(217,null)),e.chartsPurple=t("charts.purple",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},S.localize(218,null));function c(R,B){var T,N,A,P;switch(R.op){case 0:return(T=E(R.value,B))===null||T===void 0?void 0:T.darken(R.factor);case 1:return(N=E(R.value,B))===null||N===void 0?void 0:N.lighten(R.factor);case 2:return(A=E(R.value,B))===null||A===void 0?void 0:A.transparent(R.factor);case 3:{const O=E(R.background,B);return O?(P=E(R.value,B))===null||P===void 0?void 0:P.makeOpaque(O):E(R.value,B)}case 4:for(const O of R.values){const x=E(O,B);if(x)return x}return;case 6:return E(B.defines(R.if)?R.then:R.else,B);case 5:{const O=E(R.value,B);if(!O)return;const x=E(R.background,B);return x?O.isDarkerThan(x)?I.Color.getLighterColor(O,x,R.factor).transparent(R.transparency):I.Color.getDarkerColor(O,x,R.factor).transparent(R.transparency):O.transparent(R.factor*R.transparency)}default:throw(0,D.assertNever)(R)}}e.executeTransform=c;function a(R,B){return{op:0,value:R,factor:B}}e.darken=a;function g(R,B){return{op:1,value:R,factor:B}}e.lighten=g;function h(R,B){return{op:2,value:R,factor:B}}e.transparent=h;function p(...R){return{op:4,values:R}}e.oneOf=p;function b(R,B,T){return{op:6,if:R,then:B,else:T}}e.ifDefinedThenElse=b;function w(R,B,T,N){return{op:5,value:R,background:B,factor:T,transparency:N}}function E(R,B){if(R!==null){if(typeof R=="string")return R[0]==="#"?I.Color.fromHex(R):B.getColor(R);if(R instanceof I.Color)return R;if(typeof R=="object")return c(R,B)}}e.resolveColorValue=E,e.workbenchColorsSchemaId="vscode://schemas/workbench-colors";const k=_.Registry.as(m.Extensions.JSONContribution);k.registerSchema(e.workbenchColorsSchemaId,n.getColorSchema());const M=new L.RunOnceScheduler(()=>k.notifySchemaChanged(e.workbenchColorsSchemaId),200);n.onDidChangeSchema(()=>{M.isScheduled()||M.schedule()})}),define(te[159],ie([1,0,7,151,60,14,2,31]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DynamicCssRules=e.GlobalEditorPointerMoveMonitor=e.EditorPointerEventFactory=e.EditorMouseEventFactory=e.EditorMouseEvent=e.createCoordinatesRelativeToEditor=e.createEditorPagePosition=e.CoordinatesRelativeToEditor=e.EditorPagePosition=e.ClientCoordinates=e.PageCoordinates=void 0;class _{constructor(a,g){this.x=a,this.y=g,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new v(this.x-window.scrollX,this.y-window.scrollY)}}e.PageCoordinates=_;class v{constructor(a,g){this.clientX=a,this.clientY=g,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new _(this.clientX+window.scrollX,this.clientY+window.scrollY)}}e.ClientCoordinates=v;class C{constructor(a,g,h,p){this.x=a,this.y=g,this.width=h,this.height=p,this._editorPagePositionBrand=void 0}}e.EditorPagePosition=C;class s{constructor(a,g){this.x=a,this.y=g,this._positionRelativeToEditorBrand=void 0}}e.CoordinatesRelativeToEditor=s;function i(c){const a=L.getDomNodePagePosition(c);return new C(a.left,a.top,a.width,a.height)}e.createEditorPagePosition=i;function n(c,a,g){const h=a.width/c.offsetWidth,p=a.height/c.offsetHeight,b=(g.x-a.x)/h,w=(g.y-a.y)/p;return new s(b,w)}e.createCoordinatesRelativeToEditor=n;class t extends y.StandardMouseEvent{constructor(a,g,h){super(a),this._editorMouseEventBrand=void 0,this.isFromPointerCapture=g,this.pos=new _(this.posx,this.posy),this.editorPos=i(h),this.relativePos=n(h,this.editorPos,this.pos)}}e.EditorMouseEvent=t;class r{constructor(a){this._editorViewDomNode=a}_create(a){return new t(a,!1,this._editorViewDomNode)}onContextMenu(a,g){return L.addDisposableListener(a,"contextmenu",h=>{g(this._create(h))})}onMouseUp(a,g){return L.addDisposableListener(a,"mouseup",h=>{g(this._create(h))})}onMouseDown(a,g){return L.addDisposableListener(a,L.EventType.MOUSE_DOWN,h=>{g(this._create(h))})}onPointerDown(a,g){return L.addDisposableListener(a,L.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onMouseLeave(a,g){return L.addDisposableListener(a,L.EventType.MOUSE_LEAVE,h=>{g(this._create(h))})}onMouseMove(a,g){return L.addDisposableListener(a,"mousemove",h=>g(this._create(h)))}}e.EditorMouseEventFactory=r;class u{constructor(a){this._editorViewDomNode=a}_create(a){return new t(a,!1,this._editorViewDomNode)}onPointerUp(a,g){return L.addDisposableListener(a,"pointerup",h=>{g(this._create(h))})}onPointerDown(a,g){return L.addDisposableListener(a,L.EventType.POINTER_DOWN,h=>{g(this._create(h),h.pointerId)})}onPointerLeave(a,g){return L.addDisposableListener(a,L.EventType.POINTER_LEAVE,h=>{g(this._create(h))})}onPointerMove(a,g){return L.addDisposableListener(a,"pointermove",h=>g(this._create(h)))}}e.EditorPointerEventFactory=u;class f extends S.Disposable{constructor(a){super(),this._editorViewDomNode=a,this._globalPointerMoveMonitor=this._register(new I.GlobalPointerMoveMonitor),this._keydownListener=null}startMonitoring(a,g,h,p,b){this._keydownListener=L.addStandardDisposableListener(a.ownerDocument,"keydown",w=>{w.toKeyCodeChord().isModifierKey()||this._globalPointerMoveMonitor.stopMonitoring(!0,w.browserEvent)},!0),this._globalPointerMoveMonitor.startMonitoring(a,g,h,w=>{p(new t(w,!0,this._editorViewDomNode))},w=>{this._keydownListener.dispose(),b(w)})}stopMonitoring(){this._globalPointerMoveMonitor.stopMonitoring(!0)}}e.GlobalEditorPointerMoveMonitor=f;class d{constructor(a){this._editor=a,this._instanceId=++d._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new D.RunOnceScheduler(()=>this.garbageCollect(),1e3)}createClassNameRef(a){const g=this.getOrCreateRule(a);return g.increaseRefCount(),{className:g.className,dispose:()=>{g.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(a){const g=this.computeUniqueKey(a);let h=this._rules.get(g);if(!h){const p=this._counter++;h=new l(g,`dyn-rule-${this._instanceId}-${p}`,L.isInShadowDOM(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,a),this._rules.set(g,h)}return h}computeUniqueKey(a){return JSON.stringify(a)}garbageCollect(){for(const a of this._rules.values())a.hasReferences()||(this._rules.delete(a.key),a.dispose())}}e.DynamicCssRules=d,d._idPool=0;class l{constructor(a,g,h,p){this.key=a,this.className=g,this.properties=p,this._referenceCount=0,this._styleElement=L.createStyleSheet(h),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(a,g){let h=`.${a} {`;for(const p in g){const b=g[p];let w;typeof b=="object"?w=(0,m.asCssVariable)(b.id):w=b;const E=o(p);h+=` - ${E}: ${w};`}return h+=` -}`,h}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function o(c){return c.replace(/(^[A-Z])/,([a])=>a.toLowerCase()).replace(/([A-Z])/g,([a])=>`-${a.toLowerCase()}`)}}),define(te[822],ie([1,0,7,38,151,2,17,10,229,53,39,5,274,332,82,31,24,61,485,49,106,430]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Minimap=void 0;const c=140,a=2;class g{constructor(T,N,A){const P=T.options,O=P.get(141),x=P.get(143),W=x.minimap,U=P.get(50),F=P.get(72);this.renderMinimap=W.renderMinimap,this.size=F.size,this.minimapHeightIsEditorHeight=W.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=P.get(104),this.paddingTop=P.get(83).top,this.paddingBottom=P.get(83).bottom,this.showSlider=F.showSlider,this.autohide=F.autohide,this.pixelRatio=O,this.typicalHalfwidthCharacterWidth=U.typicalHalfwidthCharacterWidth,this.lineHeight=P.get(66),this.minimapLeft=W.minimapLeft,this.minimapWidth=W.minimapWidth,this.minimapHeight=x.height,this.canvasInnerWidth=W.minimapCanvasInnerWidth,this.canvasInnerHeight=W.minimapCanvasInnerHeight,this.canvasOuterWidth=W.minimapCanvasOuterWidth,this.canvasOuterHeight=W.minimapCanvasOuterHeight,this.isSampling=W.minimapIsSampling,this.editorHeight=x.height,this.fontScale=W.minimapScale,this.minimapLineHeight=W.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=(0,o.createSingleCallFunction)(()=>d.MinimapCharRendererFactory.create(this.fontScale,U.fontFamily)),this.defaultBackgroundColor=A.getColor(2),this.backgroundColor=g._getMinimapBackground(N,this.defaultBackgroundColor),this.foregroundAlpha=g._getMinimapForegroundOpacity(N)}static _getMinimapBackground(T,N){const A=T.getColor(r.minimapBackground);return A?new i.RGBA8(A.rgba.r,A.rgba.g,A.rgba.b,Math.round(255*A.rgba.a)):N}static _getMinimapForegroundOpacity(T){const N=T.getColor(r.minimapForegroundOpacity);return N?i.RGBA8._clamp(Math.round(255*N.rgba.a)):255}equals(T){return this.renderMinimap===T.renderMinimap&&this.size===T.size&&this.minimapHeightIsEditorHeight===T.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===T.scrollBeyondLastLine&&this.paddingTop===T.paddingTop&&this.paddingBottom===T.paddingBottom&&this.showSlider===T.showSlider&&this.autohide===T.autohide&&this.pixelRatio===T.pixelRatio&&this.typicalHalfwidthCharacterWidth===T.typicalHalfwidthCharacterWidth&&this.lineHeight===T.lineHeight&&this.minimapLeft===T.minimapLeft&&this.minimapWidth===T.minimapWidth&&this.minimapHeight===T.minimapHeight&&this.canvasInnerWidth===T.canvasInnerWidth&&this.canvasInnerHeight===T.canvasInnerHeight&&this.canvasOuterWidth===T.canvasOuterWidth&&this.canvasOuterHeight===T.canvasOuterHeight&&this.isSampling===T.isSampling&&this.editorHeight===T.editorHeight&&this.fontScale===T.fontScale&&this.minimapLineHeight===T.minimapLineHeight&&this.minimapCharWidth===T.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(T.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(T.backgroundColor)&&this.foregroundAlpha===T.foregroundAlpha}}class h{constructor(T,N,A,P,O,x,W,U,F){this.scrollTop=T,this.scrollHeight=N,this.sliderNeeded=A,this._computedSliderRatio=P,this.sliderTop=O,this.sliderHeight=x,this.topPaddingLineCount=W,this.startLineNumber=U,this.endLineNumber=F}getDesiredScrollTopFromDelta(T){return Math.round(this.scrollTop+T/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(T){return Math.round((T-this.sliderHeight/2)/this._computedSliderRatio)}intersectWithViewport(T){const N=Math.max(this.startLineNumber,T.startLineNumber),A=Math.min(this.endLineNumber,T.endLineNumber);return N>A?null:[N,A]}getYForLineNumber(T,N){return+(T-this.startLineNumber+this.topPaddingLineCount)*N}static create(T,N,A,P,O,x,W,U,F,G,Y){const ne=T.pixelRatio,se=T.minimapLineHeight,J=Math.floor(T.canvasInnerHeight/se),q=T.lineHeight;if(T.minimapHeightIsEditorHeight){let de=U*T.lineHeight+T.paddingTop+T.paddingBottom;T.scrollBeyondLastLine&&(de+=Math.max(0,O-T.lineHeight-T.paddingBottom));const ce=Math.max(1,Math.floor(O*O/de)),ae=Math.max(0,T.minimapHeight-ce),X=ae/(G-O),K=F*X,z=ae>0,Q=Math.floor(T.canvasInnerHeight/T.minimapLineHeight),j=Math.floor(T.paddingTop/T.lineHeight);return new h(F,G,z,X,K,ce,j,1,Math.min(W,Q))}let H;if(x&&A!==W){const de=A-N+1;H=Math.floor(de*se/ne)}else{const de=O/q;H=Math.floor(de*se/ne)}const V=Math.floor(T.paddingTop/q);let Z=Math.floor(T.paddingBottom/q);if(T.scrollBeyondLastLine){const de=O/q;Z=Math.max(Z,de-1)}let ee;if(Z>0){const de=O/q;ee=(V+W+Z-de-1)*se/ne}else ee=Math.max(0,(V+W)*se/ne-H);ee=Math.min(T.minimapHeight-H,ee);const le=ee/(G-O),ue=F*le;if(J>=V+W+Z){const de=ee>0;return new h(F,G,de,le,ue,H,V,1,W)}else{let de;N>1?de=N+V:de=Math.max(1,F/q);let ce,ae=Math.max(1,Math.floor(de-ue*ne/se));aeF&&(ae=Math.min(ae,Y.startLineNumber),ce=Math.max(ce,Y.topPaddingLineCount)),Y.scrollTop=T.paddingTop?z=(N-ae+ce+K)*se/ne:z=F/T.paddingTop*(ce+K)*se/ne,new h(F,G,!0,le,z,H,ce,ae,X)}}}class p{constructor(T){this.dy=T}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}p.INVALID=new p(-1);class b{constructor(T,N,A){this.renderedLayout=T,this._imageData=N,this._renderedLines=new _.RenderedLinesCollection(()=>p.INVALID),this._renderedLines._set(T.startLineNumber,A)}linesEquals(T){if(!this.scrollEquals(T))return!1;const A=this._renderedLines._get().lines;for(let P=0,O=A.length;P1){for(let V=0,Z=P-1;V0&&this.minimapLines[A-1]>=T;)A--;let P=this.modelLineToMinimapLine(N)-1;for(;P+1N)return null}return[A+1,P+1]}decorationLineRangeToMinimapLineRange(T,N){let A=this.modelLineToMinimapLine(T),P=this.modelLineToMinimapLine(N);return T!==N&&P===A&&(P===this.minimapLines.length?A>1&&A--:P++),[A,P]}onLinesDeleted(T){const N=T.toLineNumber-T.fromLineNumber+1;let A=this.minimapLines.length,P=0;for(let O=this.minimapLines.length-1;O>=0&&!(this.minimapLines[O]=0&&!(this.minimapLines[A]0,scrollWidth:T.scrollWidth,scrollHeight:T.scrollHeight,viewportStartLineNumber:N,viewportEndLineNumber:A,viewportStartLineNumberVerticalOffset:T.getVerticalOffsetForLineNumber(N),scrollTop:T.scrollTop,scrollLeft:T.scrollLeft,viewportWidth:T.viewportWidth,viewportHeight:T.viewportHeight};this._actual.render(P)}_recreateLineSampling(){this._minimapSelections=null;const T=!!this._samplingState,[N,A]=E.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=N,T&&this._samplingState)for(const P of A)switch(P.type){case"deleted":this._actual.onLinesDeleted(P.deleteFromLineNumber,P.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(P.insertFromLineNumber,P.insertToLineNumber);break;case"flush":this._actual.onFlushed();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(T){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[T-1]):this._context.viewModel.getLineContent(T)}getLineMaxColumn(T){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[T-1]):this._context.viewModel.getLineMaxColumn(T)}getMinimapLinesRenderingData(T,N,A){if(this._samplingState){const P=[];for(let O=0,x=N-T+1;O{if(A.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(A.button===0&&this._lastRenderData){const F=L.getDomNodePagePosition(this._slider.domNode),G=F.top+F.height/2;this._startSliderDragging(A,G,this._lastRenderData.renderedLayout)}return}const O=this._model.options.minimapLineHeight,x=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*A.offsetY;let U=Math.floor(x/O)+this._lastRenderData.renderedLayout.startLineNumber-this._lastRenderData.renderedLayout.topPaddingLineCount;U=Math.min(U,this._model.getLineCount()),this._model.revealLineNumber(U)}),this._sliderPointerMoveMonitor=new y.GlobalPointerMoveMonitor,this._sliderPointerDownListener=L.addStandardDisposableListener(this._slider.domNode,L.EventType.POINTER_DOWN,A=>{A.preventDefault(),A.stopPropagation(),A.button===0&&this._lastRenderData&&this._startSliderDragging(A,A.pageY,this._lastRenderData.renderedLayout)}),this._gestureDisposable=f.Gesture.addTarget(this._domNode.domNode),this._sliderTouchStartListener=L.addDisposableListener(this._domNode.domNode,f.EventType.Start,A=>{A.preventDefault(),A.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(A))},{passive:!1}),this._sliderTouchMoveListener=L.addDisposableListener(this._domNode.domNode,f.EventType.Change,A=>{A.preventDefault(),A.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(A)},{passive:!1}),this._sliderTouchEndListener=L.addStandardDisposableListener(this._domNode.domNode,f.EventType.End,A=>{A.preventDefault(),A.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(T,N,A){if(!T.target||!(T.target instanceof Element))return;const P=T.pageX;this._slider.toggleClassName("active",!0);const O=(x,W)=>{const U=L.getDomNodePagePosition(this._domNode.domNode),F=Math.min(Math.abs(W-P),Math.abs(W-U.left),Math.abs(W-U.left-U.width));if(S.isWindows&&F>c){this._model.setScrollTop(A.scrollTop);return}const G=x-N;this._model.setScrollTop(A.getDesiredScrollTopFromDelta(G))};T.pageY!==N&&O(T.pageY,P),this._sliderPointerMoveMonitor.startMonitoring(T.target,T.pointerId,T.buttons,x=>O(x.pageY,x.pageX),()=>{this._slider.toggleClassName("active",!1)})}scrollDueToTouchEvent(T){const N=this._domNode.domNode.getBoundingClientRect().top,A=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(T.pageY-N);this._model.setScrollTop(A)}dispose(){this._pointerDownListener.dispose(),this._sliderPointerMoveMonitor.dispose(),this._sliderPointerDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){const T=["minimap"];return this._model.options.showSlider==="always"?T.push("slider-always"):T.push("slider-mouseover"),this._model.options.autohide&&T.push("autohide"),T.join(" ")}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new w(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(T,N){return this._lastRenderData?this._lastRenderData.onLinesChanged(T,N):!1}onLinesDeleted(T,N){var A;return(A=this._lastRenderData)===null||A===void 0||A.onLinesDeleted(T,N),!0}onLinesInserted(T,N){var A;return(A=this._lastRenderData)===null||A===void 0||A.onLinesInserted(T,N),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(r.minimapSelection),this._renderDecorations=!0,!0}onTokensChanged(T){return this._lastRenderData?this._lastRenderData.onTokensChanged(T):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(T){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}T.scrollLeft+T.viewportWidth>=T.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const A=h.create(this._model.options,T.viewportStartLineNumber,T.viewportEndLineNumber,T.viewportStartLineNumberVerticalOffset,T.viewportHeight,T.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),T.scrollTop,T.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(A.sliderNeeded?"block":"none"),this._slider.setTop(A.sliderTop),this._slider.setHeight(A.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(A.sliderHeight),this.renderDecorations(A),this._lastRenderData=this.renderLines(A)}renderDecorations(T){if(this._renderDecorations){this._renderDecorations=!1;const N=this._model.getSelections();N.sort(s.Range.compareRangesUsingStarts);const A=this._model.getMinimapDecorationsInViewport(T.startLineNumber,T.endLineNumber);A.sort((ne,se)=>(ne.options.zIndex||0)-(se.options.zIndex||0));const{canvasInnerWidth:P,canvasInnerHeight:O}=this._model.options,x=this._model.options.minimapLineHeight,W=this._model.options.minimapCharWidth,U=this._model.getOptions().tabSize,F=this._decorationsCanvas.domNode.getContext("2d");F.clearRect(0,0,P,O);const G=new R(T.startLineNumber,T.endLineNumber,!1);this._renderSelectionLineHighlights(F,N,G,T,x),this._renderDecorationsLineHighlights(F,A,G,T,x);const Y=new R(T.startLineNumber,T.endLineNumber,null);this._renderSelectionsHighlights(F,N,Y,T,x,U,W,P),this._renderDecorationsHighlights(F,A,Y,T,x,U,W,P)}}_renderSelectionLineHighlights(T,N,A,P,O){if(!this._selectionColor||this._selectionColor.isTransparent())return;T.fillStyle=this._selectionColor.transparent(.5).toString();let x=0,W=0;for(const U of N){const F=P.intersectWithViewport(U);if(!F)continue;const[G,Y]=F;for(let J=G;J<=Y;J++)A.set(J,!0);const ne=P.getYForLineNumber(G,O),se=P.getYForLineNumber(Y,O);W>=ne||(W>x&&T.fillRect(C.MINIMAP_GUTTER_WIDTH,x,T.canvas.width,W-x),x=ne),W=se}W>x&&T.fillRect(C.MINIMAP_GUTTER_WIDTH,x,T.canvas.width,W-x)}_renderDecorationsLineHighlights(T,N,A,P,O){const x=new Map;for(let W=N.length-1;W>=0;W--){const U=N[W],F=U.options.minimap;if(!F||F.position!==l.MinimapPosition.Inline)continue;const G=P.intersectWithViewport(U.range);if(!G)continue;const[Y,ne]=G,se=F.getColor(this._theme.value);if(!se||se.isTransparent())continue;let J=x.get(se.toString());J||(J=se.transparent(.5).toString(),x.set(se.toString(),J)),T.fillStyle=J;for(let q=Y;q<=ne;q++){if(A.has(q))continue;A.set(q,!0);const H=P.getYForLineNumber(Y,O);T.fillRect(C.MINIMAP_GUTTER_WIDTH,H,T.canvas.width,O)}}}_renderSelectionsHighlights(T,N,A,P,O,x,W,U){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const F of N){const G=P.intersectWithViewport(F);if(!G)continue;const[Y,ne]=G;for(let se=Y;se<=ne;se++)this.renderDecorationOnLine(T,A,F,this._selectionColor,P,se,O,O,x,W,U)}}_renderDecorationsHighlights(T,N,A,P,O,x,W,U){for(const F of N){const G=F.options.minimap;if(!G)continue;const Y=P.intersectWithViewport(F.range);if(!Y)continue;const[ne,se]=Y,J=G.getColor(this._theme.value);if(!(!J||J.isTransparent()))for(let q=ne;q<=se;q++)switch(G.position){case l.MinimapPosition.Inline:this.renderDecorationOnLine(T,A,F.range,J,P,q,O,O,x,W,U);continue;case l.MinimapPosition.Gutter:{const H=P.getYForLineNumber(q,O),V=2;this.renderDecoration(T,J,V,H,a,O);continue}}}}renderDecorationOnLine(T,N,A,P,O,x,W,U,F,G,Y){const ne=O.getYForLineNumber(x,U);if(ne+W<0||ne>this._model.options.canvasInnerHeight)return;const{startLineNumber:se,endLineNumber:J}=A,q=se===x?A.startColumn:1,H=J===x?A.endColumn:this._model.getLineMaxColumn(x),V=this.getXOffsetForPosition(N,x,q,F,G,Y),Z=this.getXOffsetForPosition(N,x,H,F,G,Y);this.renderDecoration(T,P,V,ne,Z-V,W)}getXOffsetForPosition(T,N,A,P,O,x){if(A===1)return C.MINIMAP_GUTTER_WIDTH;if((A-1)*O>=x)return x;let U=T.get(N);if(!U){const F=this._model.getLineContent(N);U=[C.MINIMAP_GUTTER_WIDTH];let G=C.MINIMAP_GUTTER_WIDTH;for(let Y=1;Y=x){U[Y]=x;break}U[Y]=J,G=J}T.set(N,U)}return A-1ue?Math.floor((P-ue)/2):0,ce=ne.a/255,ae=new i.RGBA8(Math.round((ne.r-Y.r)*ce+Y.r),Math.round((ne.g-Y.g)*ce+Y.g),Math.round((ne.b-Y.b)*ce+Y.b),255);let X=T.topPaddingLineCount*P;const K=[];for(let oe=0,he=A-N+1;oe=0&&zZ)return;const Q=H.charCodeAt(ue);if(Q===9){const j=ne-(ue+de)%ne;de+=j-1,le+=j*x}else if(Q===32)le+=x;else{const j=m.isFullWidthCharacter(Q)?2:1;for(let re=0;reZ)return}}}}}class R{constructor(T,N,A){this._startLineNumber=T,this._endLineNumber=N,this._defaultValue=A,this._values=[];for(let P=0,O=this._endLineNumber-this._startLineNumber+1;Pthis._endLineNumber||(this._values[T-this._startLineNumber]=N)}get(T){return Tthis._endLineNumber?this._defaultValue:this._values[T-this._startLineNumber]}}}),define(te[823],ie([1,0,610,31]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.diffMoveBorderActive=e.diffMoveBorder=void 0,e.diffMoveBorder=(0,I.registerColor)("diffEditor.move.border",{dark:"#8b8b8b9c",light:"#8b8b8b9c",hcDark:"#8b8b8b9c",hcLight:"#8b8b8b9c"},(0,L.localize)(0,null)),e.diffMoveBorderActive=(0,I.registerColor)("diffEditor.moveActive.border",{dark:"#FFA500",light:"#FFA500",hcDark:"#FFA500",hcLight:"#FFA500"},(0,L.localize)(1,null))}),define(te[248],ie([1,0,707,31,467]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SYMBOL_ICON_VARIABLE_FOREGROUND=e.SYMBOL_ICON_UNIT_FOREGROUND=e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=e.SYMBOL_ICON_TEXT_FOREGROUND=e.SYMBOL_ICON_STRUCT_FOREGROUND=e.SYMBOL_ICON_STRING_FOREGROUND=e.SYMBOL_ICON_SNIPPET_FOREGROUND=e.SYMBOL_ICON_REFERENCE_FOREGROUND=e.SYMBOL_ICON_PROPERTY_FOREGROUND=e.SYMBOL_ICON_PACKAGE_FOREGROUND=e.SYMBOL_ICON_OPERATOR_FOREGROUND=e.SYMBOL_ICON_OBJECT_FOREGROUND=e.SYMBOL_ICON_NUMBER_FOREGROUND=e.SYMBOL_ICON_NULL_FOREGROUND=e.SYMBOL_ICON_NAMESPACE_FOREGROUND=e.SYMBOL_ICON_MODULE_FOREGROUND=e.SYMBOL_ICON_METHOD_FOREGROUND=e.SYMBOL_ICON_KEYWORD_FOREGROUND=e.SYMBOL_ICON_KEY_FOREGROUND=e.SYMBOL_ICON_INTERFACE_FOREGROUND=e.SYMBOL_ICON_FUNCTION_FOREGROUND=e.SYMBOL_ICON_FOLDER_FOREGROUND=e.SYMBOL_ICON_FILE_FOREGROUND=e.SYMBOL_ICON_FIELD_FOREGROUND=e.SYMBOL_ICON_EVENT_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=e.SYMBOL_ICON_CONSTANT_FOREGROUND=e.SYMBOL_ICON_COLOR_FOREGROUND=e.SYMBOL_ICON_CLASS_FOREGROUND=e.SYMBOL_ICON_BOOLEAN_FOREGROUND=e.SYMBOL_ICON_ARRAY_FOREGROUND=void 0,e.SYMBOL_ICON_ARRAY_FOREGROUND=(0,I.registerColor)("symbolIcon.arrayForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(0,null)),e.SYMBOL_ICON_BOOLEAN_FOREGROUND=(0,I.registerColor)("symbolIcon.booleanForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(1,null)),e.SYMBOL_ICON_CLASS_FOREGROUND=(0,I.registerColor)("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,L.localize)(2,null)),e.SYMBOL_ICON_COLOR_FOREGROUND=(0,I.registerColor)("symbolIcon.colorForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(3,null)),e.SYMBOL_ICON_CONSTANT_FOREGROUND=(0,I.registerColor)("symbolIcon.constantForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(4,null)),e.SYMBOL_ICON_CONSTRUCTOR_FOREGROUND=(0,I.registerColor)("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,L.localize)(5,null)),e.SYMBOL_ICON_ENUMERATOR_FOREGROUND=(0,I.registerColor)("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,L.localize)(6,null)),e.SYMBOL_ICON_ENUMERATOR_MEMBER_FOREGROUND=(0,I.registerColor)("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(7,null)),e.SYMBOL_ICON_EVENT_FOREGROUND=(0,I.registerColor)("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hcDark:"#EE9D28",hcLight:"#D67E00"},(0,L.localize)(8,null)),e.SYMBOL_ICON_FIELD_FOREGROUND=(0,I.registerColor)("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(9,null)),e.SYMBOL_ICON_FILE_FOREGROUND=(0,I.registerColor)("symbolIcon.fileForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(10,null)),e.SYMBOL_ICON_FOLDER_FOREGROUND=(0,I.registerColor)("symbolIcon.folderForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(11,null)),e.SYMBOL_ICON_FUNCTION_FOREGROUND=(0,I.registerColor)("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,L.localize)(12,null)),e.SYMBOL_ICON_INTERFACE_FOREGROUND=(0,I.registerColor)("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(13,null)),e.SYMBOL_ICON_KEY_FOREGROUND=(0,I.registerColor)("symbolIcon.keyForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(14,null)),e.SYMBOL_ICON_KEYWORD_FOREGROUND=(0,I.registerColor)("symbolIcon.keywordForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(15,null)),e.SYMBOL_ICON_METHOD_FOREGROUND=(0,I.registerColor)("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hcDark:"#B180D7",hcLight:"#652D90"},(0,L.localize)(16,null)),e.SYMBOL_ICON_MODULE_FOREGROUND=(0,I.registerColor)("symbolIcon.moduleForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(17,null)),e.SYMBOL_ICON_NAMESPACE_FOREGROUND=(0,I.registerColor)("symbolIcon.namespaceForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(18,null)),e.SYMBOL_ICON_NULL_FOREGROUND=(0,I.registerColor)("symbolIcon.nullForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(19,null)),e.SYMBOL_ICON_NUMBER_FOREGROUND=(0,I.registerColor)("symbolIcon.numberForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(20,null)),e.SYMBOL_ICON_OBJECT_FOREGROUND=(0,I.registerColor)("symbolIcon.objectForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(21,null)),e.SYMBOL_ICON_OPERATOR_FOREGROUND=(0,I.registerColor)("symbolIcon.operatorForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(22,null)),e.SYMBOL_ICON_PACKAGE_FOREGROUND=(0,I.registerColor)("symbolIcon.packageForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(23,null)),e.SYMBOL_ICON_PROPERTY_FOREGROUND=(0,I.registerColor)("symbolIcon.propertyForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(24,null)),e.SYMBOL_ICON_REFERENCE_FOREGROUND=(0,I.registerColor)("symbolIcon.referenceForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(25,null)),e.SYMBOL_ICON_SNIPPET_FOREGROUND=(0,I.registerColor)("symbolIcon.snippetForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(26,null)),e.SYMBOL_ICON_STRING_FOREGROUND=(0,I.registerColor)("symbolIcon.stringForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(27,null)),e.SYMBOL_ICON_STRUCT_FOREGROUND=(0,I.registerColor)("symbolIcon.structForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(28,null)),e.SYMBOL_ICON_TEXT_FOREGROUND=(0,I.registerColor)("symbolIcon.textForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(29,null)),e.SYMBOL_ICON_TYPEPARAMETER_FOREGROUND=(0,I.registerColor)("symbolIcon.typeParameterForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(30,null)),e.SYMBOL_ICON_UNIT_FOREGROUND=(0,I.registerColor)("symbolIcon.unitForeground",{dark:I.foreground,light:I.foreground,hcDark:I.foreground,hcLight:I.foreground},(0,L.localize)(31,null)),e.SYMBOL_ICON_VARIABLE_FOREGROUND=(0,I.registerColor)("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hcDark:"#75BEFF",hcLight:"#007ACC"},(0,L.localize)(32,null))}),define(te[824],ie([1,0,26,112,642,171,248]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMenuItems=void 0;const D=Object.freeze({kind:I.CodeActionKind.Empty,title:(0,y.localize)(0,null)}),S=Object.freeze([{kind:I.CodeActionKind.QuickFix,title:(0,y.localize)(1,null)},{kind:I.CodeActionKind.RefactorExtract,title:(0,y.localize)(2,null),icon:L.Codicon.wrench},{kind:I.CodeActionKind.RefactorInline,title:(0,y.localize)(3,null),icon:L.Codicon.wrench},{kind:I.CodeActionKind.RefactorRewrite,title:(0,y.localize)(4,null),icon:L.Codicon.wrench},{kind:I.CodeActionKind.RefactorMove,title:(0,y.localize)(5,null),icon:L.Codicon.wrench},{kind:I.CodeActionKind.SurroundWith,title:(0,y.localize)(6,null),icon:L.Codicon.symbolSnippet},{kind:I.CodeActionKind.Source,title:(0,y.localize)(7,null),icon:L.Codicon.symbolFile},D]);function m(_,v,C){if(!v)return _.map(n=>{var t;return{kind:"action",item:n,group:D,disabled:!!n.action.disabled,label:n.action.disabled||n.action.title,canPreview:!!(!((t=n.action.edit)===null||t===void 0)&&t.edits.length)}});const s=S.map(n=>({group:n,actions:[]}));for(const n of _){const t=n.action.kind?new I.CodeActionKind(n.action.kind):I.CodeActionKind.None;for(const r of s)if(r.group.kind.contains(t)){r.actions.push(n);break}}const i=[];for(const n of s)if(n.actions.length){i.push({kind:"header",group:n.group});for(const t of n.actions)i.push({kind:"action",item:t,group:n.group,label:t.action.title,disabled:!!t.action.disabled,keybinding:C(t.action)})}return i}e.toMenuItems=m}),define(te[104],ie([1,0,31,36]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultMenuStyles=e.defaultSelectBoxStyles=e.getListStyles=e.defaultListStyles=e.defaultBreadcrumbsWidgetStyles=e.defaultCountBadgeStyles=e.defaultFindWidgetStyles=e.defaultInputBoxStyles=e.defaultDialogStyles=e.defaultCheckboxStyles=e.defaultToggleStyles=e.defaultProgressBarStyles=e.defaultButtonStyles=e.defaultKeybindingLabelStyles=void 0;function y(S,m){const _=Object.assign({},m);for(const v in S){const C=S[v];_[v]=C!==void 0?(0,L.asCssVariable)(C):void 0}return _}e.defaultKeybindingLabelStyles={keybindingLabelBackground:(0,L.asCssVariable)(L.keybindingLabelBackground),keybindingLabelForeground:(0,L.asCssVariable)(L.keybindingLabelForeground),keybindingLabelBorder:(0,L.asCssVariable)(L.keybindingLabelBorder),keybindingLabelBottomBorder:(0,L.asCssVariable)(L.keybindingLabelBottomBorder),keybindingLabelShadow:(0,L.asCssVariable)(L.widgetShadow)},e.defaultButtonStyles={buttonForeground:(0,L.asCssVariable)(L.buttonForeground),buttonSeparator:(0,L.asCssVariable)(L.buttonSeparator),buttonBackground:(0,L.asCssVariable)(L.buttonBackground),buttonHoverBackground:(0,L.asCssVariable)(L.buttonHoverBackground),buttonSecondaryForeground:(0,L.asCssVariable)(L.buttonSecondaryForeground),buttonSecondaryBackground:(0,L.asCssVariable)(L.buttonSecondaryBackground),buttonSecondaryHoverBackground:(0,L.asCssVariable)(L.buttonSecondaryHoverBackground),buttonBorder:(0,L.asCssVariable)(L.buttonBorder)},e.defaultProgressBarStyles={progressBarBackground:(0,L.asCssVariable)(L.progressBarBackground)},e.defaultToggleStyles={inputActiveOptionBorder:(0,L.asCssVariable)(L.inputActiveOptionBorder),inputActiveOptionForeground:(0,L.asCssVariable)(L.inputActiveOptionForeground),inputActiveOptionBackground:(0,L.asCssVariable)(L.inputActiveOptionBackground)},e.defaultCheckboxStyles={checkboxBackground:(0,L.asCssVariable)(L.checkboxBackground),checkboxBorder:(0,L.asCssVariable)(L.checkboxBorder),checkboxForeground:(0,L.asCssVariable)(L.checkboxForeground)},e.defaultDialogStyles={dialogBackground:(0,L.asCssVariable)(L.editorWidgetBackground),dialogForeground:(0,L.asCssVariable)(L.editorWidgetForeground),dialogShadow:(0,L.asCssVariable)(L.widgetShadow),dialogBorder:(0,L.asCssVariable)(L.contrastBorder),errorIconForeground:(0,L.asCssVariable)(L.problemsErrorIconForeground),warningIconForeground:(0,L.asCssVariable)(L.problemsWarningIconForeground),infoIconForeground:(0,L.asCssVariable)(L.problemsInfoIconForeground),textLinkForeground:(0,L.asCssVariable)(L.textLinkForeground)},e.defaultInputBoxStyles={inputBackground:(0,L.asCssVariable)(L.inputBackground),inputForeground:(0,L.asCssVariable)(L.inputForeground),inputBorder:(0,L.asCssVariable)(L.inputBorder),inputValidationInfoBorder:(0,L.asCssVariable)(L.inputValidationInfoBorder),inputValidationInfoBackground:(0,L.asCssVariable)(L.inputValidationInfoBackground),inputValidationInfoForeground:(0,L.asCssVariable)(L.inputValidationInfoForeground),inputValidationWarningBorder:(0,L.asCssVariable)(L.inputValidationWarningBorder),inputValidationWarningBackground:(0,L.asCssVariable)(L.inputValidationWarningBackground),inputValidationWarningForeground:(0,L.asCssVariable)(L.inputValidationWarningForeground),inputValidationErrorBorder:(0,L.asCssVariable)(L.inputValidationErrorBorder),inputValidationErrorBackground:(0,L.asCssVariable)(L.inputValidationErrorBackground),inputValidationErrorForeground:(0,L.asCssVariable)(L.inputValidationErrorForeground)},e.defaultFindWidgetStyles={listFilterWidgetBackground:(0,L.asCssVariable)(L.listFilterWidgetBackground),listFilterWidgetOutline:(0,L.asCssVariable)(L.listFilterWidgetOutline),listFilterWidgetNoMatchesOutline:(0,L.asCssVariable)(L.listFilterWidgetNoMatchesOutline),listFilterWidgetShadow:(0,L.asCssVariable)(L.listFilterWidgetShadow),inputBoxStyles:e.defaultInputBoxStyles,toggleStyles:e.defaultToggleStyles},e.defaultCountBadgeStyles={badgeBackground:(0,L.asCssVariable)(L.badgeBackground),badgeForeground:(0,L.asCssVariable)(L.badgeForeground),badgeBorder:(0,L.asCssVariable)(L.contrastBorder)},e.defaultBreadcrumbsWidgetStyles={breadcrumbsBackground:(0,L.asCssVariable)(L.breadcrumbsBackground),breadcrumbsForeground:(0,L.asCssVariable)(L.breadcrumbsForeground),breadcrumbsHoverForeground:(0,L.asCssVariable)(L.breadcrumbsFocusForeground),breadcrumbsFocusForeground:(0,L.asCssVariable)(L.breadcrumbsFocusForeground),breadcrumbsFocusAndSelectionForeground:(0,L.asCssVariable)(L.breadcrumbsActiveSelectionForeground)},e.defaultListStyles={listBackground:void 0,listInactiveFocusForeground:void 0,listFocusBackground:(0,L.asCssVariable)(L.listFocusBackground),listFocusForeground:(0,L.asCssVariable)(L.listFocusForeground),listFocusOutline:(0,L.asCssVariable)(L.listFocusOutline),listActiveSelectionBackground:(0,L.asCssVariable)(L.listActiveSelectionBackground),listActiveSelectionForeground:(0,L.asCssVariable)(L.listActiveSelectionForeground),listActiveSelectionIconForeground:(0,L.asCssVariable)(L.listActiveSelectionIconForeground),listFocusAndSelectionOutline:(0,L.asCssVariable)(L.listFocusAndSelectionOutline),listFocusAndSelectionBackground:(0,L.asCssVariable)(L.listActiveSelectionBackground),listFocusAndSelectionForeground:(0,L.asCssVariable)(L.listActiveSelectionForeground),listInactiveSelectionBackground:(0,L.asCssVariable)(L.listInactiveSelectionBackground),listInactiveSelectionIconForeground:(0,L.asCssVariable)(L.listInactiveSelectionIconForeground),listInactiveSelectionForeground:(0,L.asCssVariable)(L.listInactiveSelectionForeground),listInactiveFocusBackground:(0,L.asCssVariable)(L.listInactiveFocusBackground),listInactiveFocusOutline:(0,L.asCssVariable)(L.listInactiveFocusOutline),listHoverBackground:(0,L.asCssVariable)(L.listHoverBackground),listHoverForeground:(0,L.asCssVariable)(L.listHoverForeground),listDropBackground:(0,L.asCssVariable)(L.listDropBackground),listSelectionOutline:(0,L.asCssVariable)(L.activeContrastBorder),listHoverOutline:(0,L.asCssVariable)(L.activeContrastBorder),treeIndentGuidesStroke:(0,L.asCssVariable)(L.treeIndentGuidesStroke),treeInactiveIndentGuidesStroke:(0,L.asCssVariable)(L.treeInactiveIndentGuidesStroke),tableColumnsBorder:(0,L.asCssVariable)(L.tableColumnsBorder),tableOddRowsBackgroundColor:(0,L.asCssVariable)(L.tableOddRowsBackgroundColor)};function D(S){return y(S,e.defaultListStyles)}e.getListStyles=D,e.defaultSelectBoxStyles={selectBackground:(0,L.asCssVariable)(L.selectBackground),selectListBackground:(0,L.asCssVariable)(L.selectListBackground),selectForeground:(0,L.asCssVariable)(L.selectForeground),decoratorRightForeground:(0,L.asCssVariable)(L.pickerGroupForeground),selectBorder:(0,L.asCssVariable)(L.selectBorder),focusBorder:(0,L.asCssVariable)(L.focusBorder),listFocusBackground:(0,L.asCssVariable)(L.quickInputListFocusBackground),listInactiveSelectionIconForeground:(0,L.asCssVariable)(L.quickInputListFocusIconForeground),listFocusForeground:(0,L.asCssVariable)(L.quickInputListFocusForeground),listFocusOutline:(0,L.asCssVariableWithDefault)(L.activeContrastBorder,I.Color.transparent.toString()),listHoverBackground:(0,L.asCssVariable)(L.listHoverBackground),listHoverForeground:(0,L.asCssVariable)(L.listHoverForeground),listHoverOutline:(0,L.asCssVariable)(L.activeContrastBorder),selectListBorder:(0,L.asCssVariable)(L.editorWidgetBorder),listBackground:void 0,listActiveSelectionBackground:void 0,listActiveSelectionForeground:void 0,listActiveSelectionIconForeground:void 0,listFocusAndSelectionBackground:void 0,listDropBackground:void 0,listInactiveSelectionBackground:void 0,listInactiveSelectionForeground:void 0,listInactiveFocusBackground:void 0,listInactiveFocusOutline:void 0,listSelectionOutline:void 0,listFocusAndSelectionForeground:void 0,listFocusAndSelectionOutline:void 0,listInactiveFocusForeground:void 0,tableColumnsBorder:void 0,tableOddRowsBackgroundColor:void 0,treeIndentGuidesStroke:void 0,treeInactiveIndentGuidesStroke:void 0},e.defaultMenuStyles={shadowColor:(0,L.asCssVariable)(L.widgetShadow),borderColor:(0,L.asCssVariable)(L.menuBorder),foregroundColor:(0,L.asCssVariable)(L.menuForeground),backgroundColor:(0,L.asCssVariable)(L.menuBackground),selectionForegroundColor:(0,L.asCssVariable)(L.menuSelectionForeground),selectionBackgroundColor:(0,L.asCssVariable)(L.menuSelectionBackground),selectionBorderColor:(0,L.asCssVariable)(L.menuSelectionBorder),separatorColor:(0,L.asCssVariable)(L.menuSeparatorBackground),scrollbarShadow:(0,L.asCssVariable)(L.scrollbarShadow),scrollbarSliderBackground:(0,L.asCssVariable)(L.scrollbarSliderBackground),scrollbarSliderHoverBackground:(0,L.asCssVariable)(L.scrollbarSliderHoverBackground),scrollbarSliderActiveBackground:(0,L.asCssVariable)(L.scrollbarSliderActiveBackground)}}),define(te[825],ie([1,0,7,312,313,226,69,2,46,65,668,8,34,158,104,155]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibilityProvider=e.OneReferenceRenderer=e.FileReferencesRenderer=e.IdentityProvider=e.StringRepresentationProvider=e.Delegate=e.DataSource=void 0;let f=class{constructor(w){this._resolverService=w}hasChildren(w){return w instanceof r.ReferencesModel||w instanceof r.FileReferences}getChildren(w){if(w instanceof r.ReferencesModel)return w.groups;if(w instanceof r.FileReferences)return w.resolve(this._resolverService).then(E=>E.children);throw new Error("bad tree")}};e.DataSource=f,e.DataSource=f=Ie([ge(0,v.ITextModelService)],f);class d{getHeight(){return 23}getTemplateId(w){return w instanceof r.FileReferences?a.id:h.id}}e.Delegate=d;let l=class{constructor(w){this._keybindingService=w}getKeyboardNavigationLabel(w){var E;if(w instanceof r.OneReference){const k=(E=w.parent.getPreview(w))===null||E===void 0?void 0:E.preview(w.range);if(k)return k.value}return(0,_.basename)(w.uri)}};e.StringRepresentationProvider=l,e.StringRepresentationProvider=l=Ie([ge(0,i.IKeybindingService)],l);class o{getId(w){return w instanceof r.OneReference?w.id:w.uri}}e.IdentityProvider=o;let c=class extends m.Disposable{constructor(w,E){super(),this._labelService=E;const k=document.createElement("div");k.classList.add("reference-file"),this.file=this._register(new D.IconLabel(k,{supportHighlights:!0})),this.badge=new I.CountBadge(L.append(k,L.$(".count")),{},t.defaultCountBadgeStyles),w.appendChild(k)}set(w,E){const k=(0,_.dirname)(w.uri);this.file.setLabel(this._labelService.getUriBasenameLabel(w.uri),this._labelService.getUriLabel(k,{relative:!0}),{title:this._labelService.getUriLabel(w.uri),matches:E});const M=w.children.length;this.badge.setCount(M),M>1?this.badge.setTitleFormat((0,C.localize)(0,null,M)):this.badge.setTitleFormat((0,C.localize)(1,null,M))}};c=Ie([ge(1,n.ILabelService)],c);let a=u=class{constructor(w){this._instantiationService=w,this.templateId=u.id}renderTemplate(w){return this._instantiationService.createInstance(c,w)}renderElement(w,E,k){k.set(w.element,(0,S.createMatches)(w.filterData))}disposeTemplate(w){w.dispose()}};e.FileReferencesRenderer=a,a.id="FileReferencesRenderer",e.FileReferencesRenderer=a=u=Ie([ge(0,s.IInstantiationService)],a);class g{constructor(w){this.label=new y.HighlightedLabel(w)}set(w,E){var k;const M=(k=w.parent.getPreview(w))===null||k===void 0?void 0:k.preview(w.range);if(!M||!M.value)this.label.set(`${(0,_.basename)(w.uri)}:${w.range.startLineNumber+1}:${w.range.startColumn+1}`);else{const{value:R,highlight:B}=M;E&&!S.FuzzyScore.isDefault(E)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(R,(0,S.createMatches)(E))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(R,[B]))}}}class h{constructor(){this.templateId=h.id}renderTemplate(w){return new g(w)}renderElement(w,E,k){k.set(w.element,w.filterData)}disposeTemplate(){}}e.OneReferenceRenderer=h,h.id="OneReferenceRenderer";class p{getWidgetAriaLabel(){return(0,C.localize)(2,null)}getAriaLabel(w){return w.ariaMessage}}e.AccessibilityProvider=p}),define(te[826],ie([1,0,7,222,113,19,26,2,17,27,716,58,34,104,31,268]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ActionList=e.previewSelectedActionCommand=e.acceptSelectedActionCommand=void 0,e.acceptSelectedActionCommand="acceptSelectedCodeAction",e.previewSelectedActionCommand="previewSelectedCodeAction";class r{get templateId(){return"header"}renderTemplate(g){g.classList.add("group-header");const h=document.createElement("span");return g.append(h),{container:g,text:h}}renderElement(g,h,p){var b,w;p.text.textContent=(w=(b=g.group)===null||b===void 0?void 0:b.title)!==null&&w!==void 0?w:""}disposeTemplate(g){}}let u=class{get templateId(){return"action"}constructor(g,h){this._supportsPreview=g,this._keybindingService=h}renderTemplate(g){g.classList.add(this.templateId);const h=document.createElement("div");h.className="icon",g.append(h);const p=document.createElement("span");p.className="title",g.append(p);const b=new I.KeybindingLabel(g,_.OS);return{container:g,icon:h,text:p,keybinding:b}}renderElement(g,h,p){var b,w,E;if(!((b=g.group)===null||b===void 0)&&b.icon?(p.icon.className=v.ThemeIcon.asClassName(g.group.icon),g.group.icon.color&&(p.icon.style.color=(0,t.asCssVariable)(g.group.icon.color.id))):(p.icon.className=v.ThemeIcon.asClassName(S.Codicon.lightBulb),p.icon.style.color="var(--vscode-editorLightBulb-foreground)"),!g.item||!g.label)return;p.text.textContent=c(g.label),p.keybinding.set(g.keybinding),L.setVisibility(!!g.keybinding,p.keybinding.element);const k=(w=this._keybindingService.lookupKeybinding(e.acceptSelectedActionCommand))===null||w===void 0?void 0:w.getLabel(),M=(E=this._keybindingService.lookupKeybinding(e.previewSelectedActionCommand))===null||E===void 0?void 0:E.getLabel();p.container.classList.toggle("option-disabled",g.disabled),g.disabled?p.container.title=g.label:k&&M?this._supportsPreview&&g.canPreview?p.container.title=(0,C.localize)(0,null,k,M):p.container.title=(0,C.localize)(1,null,k):p.container.title=""}disposeTemplate(g){}};u=Ie([ge(1,i.IKeybindingService)],u);class f extends UIEvent{constructor(){super("acceptSelectedAction")}}class d extends UIEvent{constructor(){super("previewSelectedAction")}}function l(a){if(a.kind==="action")return a.label}let o=class extends m.Disposable{constructor(g,h,p,b,w,E){super(),this._delegate=b,this._contextViewService=w,this._keybindingService=E,this._actionLineHeight=24,this._headerLineHeight=26,this.cts=this._register(new D.CancellationTokenSource),this.domNode=document.createElement("div"),this.domNode.classList.add("actionList");const k={getHeight:M=>M.kind==="header"?this._headerLineHeight:this._actionLineHeight,getTemplateId:M=>M.kind};this._list=this._register(new y.List(g,this.domNode,k,[new u(h,this._keybindingService),new r],{keyboardSupport:!1,typeNavigationEnabled:!0,keyboardNavigationLabelProvider:{getKeyboardNavigationLabel:l},accessibilityProvider:{getAriaLabel:M=>{if(M.kind==="action"){let R=M.label?c(M?.label):"";return M.disabled&&(R=(0,C.localize)(2,null,R,M.disabled)),R}return null},getWidgetAriaLabel:()=>(0,C.localize)(3,null),getRole:M=>M.kind==="action"?"option":"separator",getWidgetRole:()=>"listbox"}})),this._list.style(n.defaultListStyles),this._register(this._list.onMouseClick(M=>this.onListClick(M))),this._register(this._list.onMouseOver(M=>this.onListHover(M))),this._register(this._list.onDidChangeFocus(()=>this.onFocus())),this._register(this._list.onDidChangeSelection(M=>this.onListSelection(M))),this._allMenuItems=p,this._list.splice(0,this._list.length,this._allMenuItems),this._list.length&&this.focusNext()}focusCondition(g){return!g.disabled&&g.kind==="action"}hide(g){this._delegate.onHide(g),this.cts.cancel(),this._contextViewService.hideContextView()}layout(g){const h=this._allMenuItems.filter(R=>R.kind==="header").length,b=this._allMenuItems.length*this._actionLineHeight+h*this._headerLineHeight-h*this._actionLineHeight;this._list.layout(b);const w=this._allMenuItems.map((R,B)=>{const T=document.getElementById(this._list.getElementID(B));if(T){T.style.width="auto";const N=T.getBoundingClientRect().width;return T.style.width="",N}return 0}),E=Math.max(...w,g),k=.7,M=Math.min(b,document.body.clientHeight*k);return this._list.layout(M,E),this.domNode.style.height=`${M}px`,this._list.domFocus(),E}focusPrevious(){this._list.focusPrevious(1,!0,void 0,this.focusCondition)}focusNext(){this._list.focusNext(1,!0,void 0,this.focusCondition)}acceptSelected(g){const h=this._list.getFocus();if(h.length===0)return;const p=h[0],b=this._list.element(p);if(!this.focusCondition(b))return;const w=g?new d:new f;this._list.setSelection([p],w)}onListSelection(g){if(!g.elements.length)return;const h=g.elements[0];h.item&&this.focusCondition(h)?this._delegate.onSelect(h.item,g.browserEvent instanceof d):this._list.setSelection([])}onFocus(){var g,h;this._list.domFocus();const p=this._list.getFocus();if(p.length===0)return;const b=p[0],w=this._list.element(b);(h=(g=this._delegate).onFocus)===null||h===void 0||h.call(g,w.item)}onListHover(g){return be(this,void 0,void 0,function*(){const h=g.element;if(h&&h.item&&this.focusCondition(h)){if(this._delegate.onHover&&!h.disabled&&h.kind==="action"){const p=yield this._delegate.onHover(h.item,this.cts.token);h.canPreview=p?p.canPreview:void 0}g.index&&this._list.splice(g.index,1,[h])}this._list.setFocus(typeof g.index=="number"?[g.index]:[])})}onListClick(g){g.element&&this.focusCondition(g.element)&&this._list.setFocus([])}};e.ActionList=o,e.ActionList=o=Ie([ge(4,s.IContextViewService),ge(5,i.IKeybindingService)],o);function c(a){return a.replace(/\r\n|\r|\n/g," ")}}),define(te[827],ie([1,0,7,73,2,717,826,30,15,58,47,8,31,268]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IActionWidgetService=void 0,(0,i.registerColor)("actionBar.toggledBackground",{dark:i.inputActiveOptionBackground,light:i.inputActiveOptionBackground,hcDark:i.inputActiveOptionBackground,hcLight:i.inputActiveOptionBackground},(0,D.localize)(0,null));const n={Visible:new _.RawContextKey("codeActionMenuVisible",!1,(0,D.localize)(1,null))};e.IActionWidgetService=(0,s.createDecorator)("actionWidgetService");let t=class extends y.Disposable{get isVisible(){return n.Visible.getValue(this._contextKeyService)||!1}constructor(f,d,l){super(),this._contextViewService=f,this._contextKeyService=d,this._instantiationService=l,this._list=this._register(new y.MutableDisposable)}show(f,d,l,o,c,a,g){const h=n.Visible.bindTo(this._contextKeyService),p=this._instantiationService.createInstance(S.ActionList,f,d,l,o);this._contextViewService.showContextView({getAnchor:()=>c,render:b=>(h.set(!0),this._renderWidget(b,p,g??[])),onHide:b=>{h.reset(),this._onWidgetClosed(b)}},a,!1)}acceptSelected(f){var d;(d=this._list.value)===null||d===void 0||d.acceptSelected(f)}focusPrevious(){var f,d;(d=(f=this._list)===null||f===void 0?void 0:f.value)===null||d===void 0||d.focusPrevious()}focusNext(){var f,d;(d=(f=this._list)===null||f===void 0?void 0:f.value)===null||d===void 0||d.focusNext()}hide(){var f;(f=this._list.value)===null||f===void 0||f.hide(),this._list.clear()}_renderWidget(f,d,l){var o;const c=document.createElement("div");if(c.classList.add("action-widget"),f.appendChild(c),this._list.value=d,this._list.value)c.appendChild(this._list.value.domNode);else throw new Error("List has no value");const a=new y.DisposableStore,g=document.createElement("div"),h=f.appendChild(g);h.classList.add("context-view-block"),a.add(L.addDisposableListener(h,L.EventType.MOUSE_DOWN,M=>M.stopPropagation()));const p=document.createElement("div"),b=f.appendChild(p);b.classList.add("context-view-pointerBlock"),a.add(L.addDisposableListener(b,L.EventType.POINTER_MOVE,()=>b.remove())),a.add(L.addDisposableListener(b,L.EventType.MOUSE_DOWN,()=>b.remove()));let w=0;if(l.length){const M=this._createActionBar(".action-widget-action-bar",l);M&&(c.appendChild(M.getContainer().parentElement),a.add(M),w=M.getContainer().offsetWidth)}const E=(o=this._list.value)===null||o===void 0?void 0:o.layout(w);c.style.width=`${E}px`;const k=a.add(L.trackFocus(f));return a.add(k.onDidBlur(()=>this.hide())),a}_createActionBar(f,d){if(!d.length)return;const l=L.$(f),o=new I.ActionBar(l);return o.push(d,{icon:!1,label:!0}),o}_onWidgetClosed(f){var d;(d=this._list.value)===null||d===void 0||d.hide(f)}};t=Ie([ge(0,v.IContextViewService),ge(1,_.IContextKeyService),ge(2,s.IInstantiationService)],t),(0,C.registerSingleton)(e.IActionWidgetService,t,1);const r=100+1e3;(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"hideCodeActionWidget",title:{value:(0,D.localize)(2,null),original:"Hide action widget"},precondition:n.Visible,keybinding:{weight:r,primary:9,secondary:[1033]}})}run(u){u.get(e.IActionWidgetService).hide()}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"selectPrevCodeAction",title:{value:(0,D.localize)(3,null),original:"Select previous action"},precondition:n.Visible,keybinding:{weight:r,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.focusPrevious()}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:"selectNextCodeAction",title:{value:(0,D.localize)(4,null),original:"Select next action"},precondition:n.Visible,keybinding:{weight:r,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.focusNext()}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:S.acceptSelectedActionCommand,title:{value:(0,D.localize)(5,null),original:"Accept selected action"},precondition:n.Visible,keybinding:{weight:r,primary:3,secondary:[2137]}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.acceptSelected()}}),(0,m.registerAction2)(class extends m.Action2{constructor(){super({id:S.previewSelectedActionCommand,title:{value:(0,D.localize)(6,null),original:"Preview selected action"},precondition:n.Visible,keybinding:{weight:r,primary:2051}})}run(u){const f=u.get(e.IActionWidgetService);f instanceof t&&f.acceptSelected(!0)}})}),define(te[828],ie([1,0,7,60,586,41,9,2,104]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuHandler=void 0;class v{constructor(s,i,n,t){this.contextViewService=s,this.telemetryService=i,this.notificationService=n,this.keybindingService=t,this.focusToReturn=null,this.lastContainer=null,this.block=null,this.blockDisposable=null,this.options={blockMouse:!0}}configure(s){this.options=s}showContextMenu(s){const i=s.getActions();if(!i.length)return;this.focusToReturn=document.activeElement;let n;const t=(0,L.isHTMLElement)(s.domForShadowRoot)?s.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>s.getAnchor(),canRelayout:!1,anchorAlignment:s.anchorAlignment,anchorAxisAlignment:s.anchorAxisAlignment,render:r=>{var u;this.lastContainer=r;const f=s.getMenuClassName?s.getMenuClassName():"";f&&(r.className+=" "+f),this.options.blockMouse&&(this.block=r.appendChild((0,L.$)(".context-view-block")),this.block.style.position="fixed",this.block.style.cursor="initial",this.block.style.left="0",this.block.style.top="0",this.block.style.width="100%",this.block.style.height="100%",this.block.style.zIndex="-1",(u=this.blockDisposable)===null||u===void 0||u.dispose(),this.blockDisposable=(0,L.addDisposableListener)(this.block,L.EventType.MOUSE_DOWN,o=>o.stopPropagation()));const d=new m.DisposableStore,l=s.actionRunner||new D.ActionRunner;return l.onWillRun(o=>this.onActionRun(o,!s.skipTelemetry),this,d),l.onDidRun(this.onDidActionRun,this,d),n=new y.Menu(r,i,{actionViewItemProvider:s.getActionViewItem,context:s.getActionsContext?s.getActionsContext():null,actionRunner:l,getKeyBinding:s.getKeyBinding?s.getKeyBinding:o=>this.keybindingService.lookupKeybinding(o.id)},_.defaultMenuStyles),n.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,d),n.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,d),d.add((0,L.addDisposableListener)(window,L.EventType.BLUR,()=>this.contextViewService.hideContextView(!0))),d.add((0,L.addDisposableListener)(window,L.EventType.MOUSE_DOWN,o=>{if(o.defaultPrevented)return;const c=new I.StandardMouseEvent(o);let a=c.target;if(!c.rightButton){for(;a;){if(a===r)return;a=a.parentElement}this.contextViewService.hideContextView(!0)}})),(0,m.combinedDisposable)(d,n)},focus:()=>{n?.focus(!!s.autoSelectFirstItem)},onHide:r=>{var u,f,d;(u=s.onHide)===null||u===void 0||u.call(s,!!r),this.block&&(this.block.remove(),this.block=null),(f=this.blockDisposable)===null||f===void 0||f.dispose(),this.blockDisposable=null,this.lastContainer&&((0,L.getActiveElement)()===this.lastContainer||(0,L.isAncestor)((0,L.getActiveElement)(),this.lastContainer))&&((d=this.focusToReturn)===null||d===void 0||d.focus()),this.lastContainer=null}},t,!!t)}onActionRun(s,i){i&&this.telemetryService.publicLog2("workbenchActionExecuted",{id:s.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1)}onDidActionRun(s){s.error&&!(0,S.isCancellationError)(s.error)&&this.notificationService.error(s.error)}}e.ContextMenuHandler=v}),define(te[190],ie([1,0,7,581,113,582,182,589,588,321,6,2,729,28,95,15,237,58,8,34,35,104]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkbenchCompressibleAsyncDataTree=e.WorkbenchAsyncDataTree=e.WorkbenchDataTree=e.WorkbenchCompressibleObjectTree=e.WorkbenchObjectTree=e.WorkbenchTable=e.WorkbenchPagedList=e.WorkbenchList=e.WorkbenchTreeFindOpen=e.WorkbenchTreeElementHasChild=e.WorkbenchTreeElementCanExpand=e.WorkbenchTreeElementHasParent=e.WorkbenchTreeElementCanCollapse=e.WorkbenchListSupportsFind=e.WorkbenchListSelectionNavigation=e.WorkbenchListMultiSelection=e.WorkbenchListDoubleSelection=e.WorkbenchListHasSelectionOrFocus=e.WorkbenchListFocusContextKey=e.WorkbenchListSupportsMultiSelectContextKey=e.RawWorkbenchListFocusContextKey=e.WorkbenchListScrollAtBottomContextKey=e.WorkbenchListScrollAtTopContextKey=e.RawWorkbenchListScrollAtBoundaryContextKey=e.ListService=e.IListService=void 0,e.IListService=(0,d.createDecorator)("listService");class a{get lastFocusedList(){return this._lastFocusedWidget}constructor(){this.disposables=new s.DisposableStore,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}setLastFocusedList(oe){var he,me;oe!==this._lastFocusedWidget&&((he=this._lastFocusedWidget)===null||he===void 0||he.getHTMLElement().classList.remove("last-focused"),this._lastFocusedWidget=oe,(me=this._lastFocusedWidget)===null||me===void 0||me.getHTMLElement().classList.add("last-focused"))}register(oe,he){if(this._hasCreatedStyleController||(this._hasCreatedStyleController=!0,new y.DefaultStyleController((0,L.createStyleSheet)(),"").style(c.defaultListStyles)),this.lists.some(pe=>pe.widget===oe))throw new Error("Cannot register the same widget multiple times");const me={widget:oe,extraContextKeys:he};return this.lists.push(me),oe.getHTMLElement()===document.activeElement&&this.setLastFocusedList(oe),(0,s.combinedDisposable)(oe.onDidFocus(()=>this.setLastFocusedList(oe)),(0,s.toDisposable)(()=>this.lists.splice(this.lists.indexOf(me),1)),oe.onDidDispose(()=>{this.lists=this.lists.filter(pe=>pe!==me),this._lastFocusedWidget===oe&&this.setLastFocusedList(void 0)}))}dispose(){this.disposables.dispose()}}e.ListService=a,e.RawWorkbenchListScrollAtBoundaryContextKey=new r.RawContextKey("listScrollAtBoundary","none"),e.WorkbenchListScrollAtTopContextKey=r.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("top"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.WorkbenchListScrollAtBottomContextKey=r.ContextKeyExpr.or(e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("bottom"),e.RawWorkbenchListScrollAtBoundaryContextKey.isEqualTo("both")),e.RawWorkbenchListFocusContextKey=new r.RawContextKey("listFocus",!0),e.WorkbenchListSupportsMultiSelectContextKey=new r.RawContextKey("listSupportsMultiselect",!0),e.WorkbenchListFocusContextKey=r.ContextKeyExpr.and(e.RawWorkbenchListFocusContextKey,r.ContextKeyExpr.not(u.InputFocusedContextKey)),e.WorkbenchListHasSelectionOrFocus=new r.RawContextKey("listHasSelectionOrFocus",!1),e.WorkbenchListDoubleSelection=new r.RawContextKey("listDoubleSelection",!1),e.WorkbenchListMultiSelection=new r.RawContextKey("listMultiSelection",!1),e.WorkbenchListSelectionNavigation=new r.RawContextKey("listSelectionNavigation",!1),e.WorkbenchListSupportsFind=new r.RawContextKey("listSupportsFind",!0),e.WorkbenchTreeElementCanCollapse=new r.RawContextKey("treeElementCanCollapse",!1),e.WorkbenchTreeElementHasParent=new r.RawContextKey("treeElementHasParent",!1),e.WorkbenchTreeElementCanExpand=new r.RawContextKey("treeElementCanExpand",!1),e.WorkbenchTreeElementHasChild=new r.RawContextKey("treeElementHasChild",!1),e.WorkbenchTreeFindOpen=new r.RawContextKey("treeFindOpen",!1);const g="listTypeNavigationMode",h="listAutomaticKeyboardNavigation";function p(re,oe){const he=re.createScoped(oe.getHTMLElement());return e.RawWorkbenchListFocusContextKey.bindTo(he),he}function b(re,oe){const he=e.RawWorkbenchListScrollAtBoundaryContextKey.bindTo(re),me=()=>{const pe=oe.scrollTop===0,ve=oe.scrollHeight-oe.renderHeight-oe.scrollTop<1;pe&&ve?he.set("both"):pe?he.set("top"):ve?he.set("bottom"):he.set("none")};return me(),oe.onDidScroll(me)}const w="workbench.list.multiSelectModifier",E="workbench.list.openMode",k="workbench.list.horizontalScrolling",M="workbench.list.defaultFindMode",R="workbench.list.typeNavigationMode",B="workbench.list.keyboardNavigation",T="workbench.list.scrollByPage",N="workbench.list.defaultFindMatchType",A="workbench.tree.indent",P="workbench.tree.renderIndentGuides",O="workbench.list.smoothScrolling",x="workbench.list.mouseWheelScrollSensitivity",W="workbench.list.fastScrollSensitivity",U="workbench.tree.expandMode";function F(re){return re.getValue(w)==="alt"}class G extends s.Disposable{constructor(oe){super(),this.configurationService=oe,this.useAltAsMultipleSelectionModifier=F(oe),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(oe=>{oe.affectsConfiguration(w)&&(this.useAltAsMultipleSelectionModifier=F(this.configurationService))}))}isSelectionSingleChangeEvent(oe){return this.useAltAsMultipleSelectionModifier?oe.browserEvent.altKey:(0,y.isSelectionSingleChangeEvent)(oe)}isSelectionRangeChangeEvent(oe){return(0,y.isSelectionRangeChangeEvent)(oe)}}function Y(re,oe){var he;const me=re.get(n.IConfigurationService),pe=re.get(l.IKeybindingService),ve=new s.DisposableStore;return[Object.assign(Object.assign({},oe),{keyboardNavigationDelegate:{mightProducePrintableCharacter(Le){return pe.mightProducePrintableCharacter(Le)}},smoothScrolling:!!me.getValue(O),mouseWheelScrollSensitivity:me.getValue(x),fastScrollSensitivity:me.getValue(W),multipleSelectionController:(he=oe.multipleSelectionController)!==null&&he!==void 0?he:ve.add(new G(me)),keyboardNavigationEventFilter:ee(pe),scrollByPage:!!me.getValue(T)}),ve]}let ne=class extends y.List{constructor(oe,he,me,pe,ve,we,Le,Ee,Ae){const Re=typeof ve.horizontalScrolling<"u"?ve.horizontalScrolling:!!Ee.getValue(k),[Be,ye]=Ae.invokeFunction(Y,ve);super(oe,he,me,pe,Object.assign(Object.assign({keyboardSupport:!1},Be),{horizontalScrolling:Re})),this.disposables.add(ye),this.contextKeyService=p(we,this),this.disposables.add(b(this.contextKeyService,this)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ve.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!ve.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=ve.horizontalScrolling,this._useAltAsMultipleSelectionModifier=F(Ee),this.disposables.add(this.contextKeyService),this.disposables.add(Le.register(this)),this.updateStyles(ve.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const fe=this.getSelection(),Ce=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(fe.length>0||Ce.length>0),this.listMultiSelection.set(fe.length>1),this.listDoubleSelection.set(fe.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const fe=this.getSelection(),Ce=this.getFocus();this.listHasSelectionOrFocus.set(fe.length>0||Ce.length>0)})),this.disposables.add(Ee.onDidChangeConfiguration(fe=>{fe.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=F(Ee));let Ce={};if(fe.affectsConfiguration(k)&&this.horizontalScrolling===void 0){const Me=!!Ee.getValue(k);Ce=Object.assign(Object.assign({},Ce),{horizontalScrolling:Me})}if(fe.affectsConfiguration(T)){const Me=!!Ee.getValue(T);Ce=Object.assign(Object.assign({},Ce),{scrollByPage:Me})}if(fe.affectsConfiguration(O)){const Me=!!Ee.getValue(O);Ce=Object.assign(Object.assign({},Ce),{smoothScrolling:Me})}if(fe.affectsConfiguration(x)){const Me=Ee.getValue(x);Ce=Object.assign(Object.assign({},Ce),{mouseWheelScrollSensitivity:Me})}if(fe.affectsConfiguration(W)){const Me=Ee.getValue(W);Ce=Object.assign(Object.assign({},Ce),{fastScrollSensitivity:Me})}Object.keys(Ce).length>0&&this.updateOptions(Ce)})),this.navigator=new H(this,Object.assign({configurationService:Ee},ve)),this.disposables.add(this.navigator)}updateOptions(oe){super.updateOptions(oe),oe.overrideStyles!==void 0&&this.updateStyles(oe.overrideStyles),oe.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!oe.multipleSelectionSupport)}updateStyles(oe){this.style(oe?(0,c.getListStyles)(oe):c.defaultListStyles)}};e.WorkbenchList=ne,e.WorkbenchList=ne=Ie([ge(5,r.IContextKeyService),ge(6,e.IListService),ge(7,n.IConfigurationService),ge(8,d.IInstantiationService)],ne);let se=class extends I.PagedList{constructor(oe,he,me,pe,ve,we,Le,Ee,Ae){const Re=typeof ve.horizontalScrolling<"u"?ve.horizontalScrolling:!!Ee.getValue(k),[Be,ye]=Ae.invokeFunction(Y,ve);super(oe,he,me,pe,Object.assign(Object.assign({keyboardSupport:!1},Be),{horizontalScrolling:Re})),this.disposables=new s.DisposableStore,this.disposables.add(ye),this.contextKeyService=p(we,this),this.disposables.add(b(this.contextKeyService,this.widget)),this.horizontalScrolling=ve.horizontalScrolling,this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(ve.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!ve.selectionNavigation),this._useAltAsMultipleSelectionModifier=F(Ee),this.disposables.add(this.contextKeyService),this.disposables.add(Le.register(this)),this.updateStyles(ve.overrideStyles),this.disposables.add(Ee.onDidChangeConfiguration(fe=>{fe.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=F(Ee));let Ce={};if(fe.affectsConfiguration(k)&&this.horizontalScrolling===void 0){const Me=!!Ee.getValue(k);Ce=Object.assign(Object.assign({},Ce),{horizontalScrolling:Me})}if(fe.affectsConfiguration(T)){const Me=!!Ee.getValue(T);Ce=Object.assign(Object.assign({},Ce),{scrollByPage:Me})}if(fe.affectsConfiguration(O)){const Me=!!Ee.getValue(O);Ce=Object.assign(Object.assign({},Ce),{smoothScrolling:Me})}if(fe.affectsConfiguration(x)){const Me=Ee.getValue(x);Ce=Object.assign(Object.assign({},Ce),{mouseWheelScrollSensitivity:Me})}if(fe.affectsConfiguration(W)){const Me=Ee.getValue(W);Ce=Object.assign(Object.assign({},Ce),{fastScrollSensitivity:Me})}Object.keys(Ce).length>0&&this.updateOptions(Ce)})),this.navigator=new H(this,Object.assign({configurationService:Ee},ve)),this.disposables.add(this.navigator)}updateOptions(oe){super.updateOptions(oe),oe.overrideStyles!==void 0&&this.updateStyles(oe.overrideStyles),oe.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!oe.multipleSelectionSupport)}updateStyles(oe){this.style(oe?(0,c.getListStyles)(oe):c.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchPagedList=se,e.WorkbenchPagedList=se=Ie([ge(5,r.IContextKeyService),ge(6,e.IListService),ge(7,n.IConfigurationService),ge(8,d.IInstantiationService)],se);let J=class extends D.Table{constructor(oe,he,me,pe,ve,we,Le,Ee,Ae,Re){const Be=typeof we.horizontalScrolling<"u"?we.horizontalScrolling:!!Ae.getValue(k),[ye,De]=Re.invokeFunction(Y,we);super(oe,he,me,pe,ve,Object.assign(Object.assign({keyboardSupport:!1},ye),{horizontalScrolling:Be})),this.disposables.add(De),this.contextKeyService=p(Le,this),this.disposables.add(b(this.contextKeyService,this)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(we.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!we.selectionNavigation),this.listHasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.listDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.listMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.horizontalScrolling=we.horizontalScrolling,this._useAltAsMultipleSelectionModifier=F(Ae),this.disposables.add(this.contextKeyService),this.disposables.add(Ee.register(this)),this.updateStyles(we.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const Ce=this.getSelection(),Me=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(Ce.length>0||Me.length>0),this.listMultiSelection.set(Ce.length>1),this.listDoubleSelection.set(Ce.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const Ce=this.getSelection(),Me=this.getFocus();this.listHasSelectionOrFocus.set(Ce.length>0||Me.length>0)})),this.disposables.add(Ae.onDidChangeConfiguration(Ce=>{Ce.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=F(Ae));let Me={};if(Ce.affectsConfiguration(k)&&this.horizontalScrolling===void 0){const Pe=!!Ae.getValue(k);Me=Object.assign(Object.assign({},Me),{horizontalScrolling:Pe})}if(Ce.affectsConfiguration(T)){const Pe=!!Ae.getValue(T);Me=Object.assign(Object.assign({},Me),{scrollByPage:Pe})}if(Ce.affectsConfiguration(O)){const Pe=!!Ae.getValue(O);Me=Object.assign(Object.assign({},Me),{smoothScrolling:Pe})}if(Ce.affectsConfiguration(x)){const Pe=Ae.getValue(x);Me=Object.assign(Object.assign({},Me),{mouseWheelScrollSensitivity:Pe})}if(Ce.affectsConfiguration(W)){const Pe=Ae.getValue(W);Me=Object.assign(Object.assign({},Me),{fastScrollSensitivity:Pe})}Object.keys(Me).length>0&&this.updateOptions(Me)})),this.navigator=new V(this,Object.assign({configurationService:Ae},we)),this.disposables.add(this.navigator)}updateOptions(oe){super.updateOptions(oe),oe.overrideStyles!==void 0&&this.updateStyles(oe.overrideStyles),oe.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!oe.multipleSelectionSupport)}updateStyles(oe){this.style(oe?(0,c.getListStyles)(oe):c.defaultListStyles)}dispose(){this.disposables.dispose(),super.dispose()}};e.WorkbenchTable=J,e.WorkbenchTable=J=Ie([ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,n.IConfigurationService),ge(9,d.IInstantiationService)],J);class q extends s.Disposable{constructor(oe,he){var me;super(),this.widget=oe,this._onDidOpen=this._register(new C.Emitter),this.onDidOpen=this._onDidOpen.event,this._register(C.Event.filter(this.widget.onDidChangeSelection,pe=>pe.browserEvent instanceof KeyboardEvent)(pe=>this.onSelectionFromKeyboard(pe))),this._register(this.widget.onPointer(pe=>this.onPointer(pe.element,pe.browserEvent))),this._register(this.widget.onMouseDblClick(pe=>this.onMouseDblClick(pe.element,pe.browserEvent))),typeof he?.openOnSingleClick!="boolean"&&he?.configurationService?(this.openOnSingleClick=he?.configurationService.getValue(E)!=="doubleClick",this._register(he?.configurationService.onDidChangeConfiguration(pe=>{pe.affectsConfiguration(E)&&(this.openOnSingleClick=he?.configurationService.getValue(E)!=="doubleClick")}))):this.openOnSingleClick=(me=he?.openOnSingleClick)!==null&&me!==void 0?me:!0}onSelectionFromKeyboard(oe){if(oe.elements.length!==1)return;const he=oe.browserEvent,me=typeof he.preserveFocus=="boolean"?he.preserveFocus:!0,pe=typeof he.pinned=="boolean"?he.pinned:!me,ve=!1;this._open(this.getSelectedElement(),me,pe,ve,oe.browserEvent)}onPointer(oe,he){if(!this.openOnSingleClick||he.detail===2)return;const pe=he.button===1,ve=!0,we=pe,Le=he.ctrlKey||he.metaKey||he.altKey;this._open(oe,ve,we,Le,he)}onMouseDblClick(oe,he){if(!he)return;const me=he.target;if(me.classList.contains("monaco-tl-twistie")||me.classList.contains("monaco-icon-label")&&me.classList.contains("folder-icon")&&he.offsetX<16)return;const ve=!1,we=!0,Le=he.ctrlKey||he.metaKey||he.altKey;this._open(oe,ve,we,Le,he)}_open(oe,he,me,pe,ve){oe&&this._onDidOpen.fire({editorOptions:{preserveFocus:he,pinned:me,revealIfVisible:!0},sideBySide:pe,element:oe,browserEvent:ve})}}class H extends q{constructor(oe,he){super(oe,he),this.widget=oe}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class V extends q{constructor(oe,he){super(oe,he)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Z extends q{constructor(oe,he){super(oe,he)}getSelectedElement(){var oe;return(oe=this.widget.getSelection()[0])!==null&&oe!==void 0?oe:void 0}}function ee(re){let oe=!1;return he=>{if(he.toKeyCodeChord().isModifierKey())return!1;if(oe)return oe=!1,!1;const me=re.softDispatch(he,he.target);return me.kind===1?(oe=!0,!1):(oe=!1,me.kind===0)}}let le=class extends v.ObjectTree{constructor(oe,he,me,pe,ve,we,Le,Ee,Ae){const{options:Re,getTypeNavigationMode:Be,disposable:ye}=we.invokeFunction(z,ve);super(oe,he,me,pe,Re),this.disposables.add(ye),this.internals=new Q(this,ve,Be,ve.overrideStyles,Le,Ee,Ae),this.disposables.add(this.internals)}updateOptions(oe){super.updateOptions(oe),this.internals.updateOptions(oe)}};e.WorkbenchObjectTree=le,e.WorkbenchObjectTree=le=Ie([ge(5,d.IInstantiationService),ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,n.IConfigurationService)],le);let ue=class extends v.CompressibleObjectTree{constructor(oe,he,me,pe,ve,we,Le,Ee,Ae){const{options:Re,getTypeNavigationMode:Be,disposable:ye}=we.invokeFunction(z,ve);super(oe,he,me,pe,Re),this.disposables.add(ye),this.internals=new Q(this,ve,Be,ve.overrideStyles,Le,Ee,Ae),this.disposables.add(this.internals)}updateOptions(oe={}){super.updateOptions(oe),oe.overrideStyles&&this.internals.updateStyleOverrides(oe.overrideStyles),this.internals.updateOptions(oe)}};e.WorkbenchCompressibleObjectTree=ue,e.WorkbenchCompressibleObjectTree=ue=Ie([ge(5,d.IInstantiationService),ge(6,r.IContextKeyService),ge(7,e.IListService),ge(8,n.IConfigurationService)],ue);let de=class extends _.DataTree{constructor(oe,he,me,pe,ve,we,Le,Ee,Ae,Re){const{options:Be,getTypeNavigationMode:ye,disposable:De}=Le.invokeFunction(z,we);super(oe,he,me,pe,ve,Be),this.disposables.add(De),this.internals=new Q(this,we,ye,we.overrideStyles,Ee,Ae,Re),this.disposables.add(this.internals)}updateOptions(oe={}){super.updateOptions(oe),oe.overrideStyles!==void 0&&this.internals.updateStyleOverrides(oe.overrideStyles),this.internals.updateOptions(oe)}};e.WorkbenchDataTree=de,e.WorkbenchDataTree=de=Ie([ge(6,d.IInstantiationService),ge(7,r.IContextKeyService),ge(8,e.IListService),ge(9,n.IConfigurationService)],de);let ce=class extends m.AsyncDataTree{get onDidOpen(){return this.internals.onDidOpen}constructor(oe,he,me,pe,ve,we,Le,Ee,Ae,Re){const{options:Be,getTypeNavigationMode:ye,disposable:De}=Le.invokeFunction(z,we);super(oe,he,me,pe,ve,Be),this.disposables.add(De),this.internals=new Q(this,we,ye,we.overrideStyles,Ee,Ae,Re),this.disposables.add(this.internals)}updateOptions(oe={}){super.updateOptions(oe),oe.overrideStyles&&this.internals.updateStyleOverrides(oe.overrideStyles),this.internals.updateOptions(oe)}};e.WorkbenchAsyncDataTree=ce,e.WorkbenchAsyncDataTree=ce=Ie([ge(6,d.IInstantiationService),ge(7,r.IContextKeyService),ge(8,e.IListService),ge(9,n.IConfigurationService)],ce);let ae=class extends m.CompressibleAsyncDataTree{constructor(oe,he,me,pe,ve,we,Le,Ee,Ae,Re,Be){const{options:ye,getTypeNavigationMode:De,disposable:fe}=Ee.invokeFunction(z,Le);super(oe,he,me,pe,ve,we,ye),this.disposables.add(fe),this.internals=new Q(this,Le,De,Le.overrideStyles,Ae,Re,Be),this.disposables.add(this.internals)}updateOptions(oe){super.updateOptions(oe),this.internals.updateOptions(oe)}};e.WorkbenchCompressibleAsyncDataTree=ae,e.WorkbenchCompressibleAsyncDataTree=ae=Ie([ge(7,d.IInstantiationService),ge(8,r.IContextKeyService),ge(9,e.IListService),ge(10,n.IConfigurationService)],ae);function X(re){const oe=re.getValue(M);if(oe==="highlight")return S.TreeFindMode.Highlight;if(oe==="filter")return S.TreeFindMode.Filter;const he=re.getValue(B);if(he==="simple"||he==="highlight")return S.TreeFindMode.Highlight;if(he==="filter")return S.TreeFindMode.Filter}function K(re){const oe=re.getValue(N);if(oe==="fuzzy")return S.TreeFindMatchType.Fuzzy;if(oe==="contiguous")return S.TreeFindMatchType.Contiguous}function z(re,oe){var he;const me=re.get(n.IConfigurationService),pe=re.get(f.IContextViewService),ve=re.get(r.IContextKeyService),we=re.get(d.IInstantiationService),Le=()=>{const De=ve.getContextKeyValue(g);if(De==="automatic")return y.TypeNavigationMode.Automatic;if(De==="trigger"||ve.getContextKeyValue(h)===!1)return y.TypeNavigationMode.Trigger;const Ce=me.getValue(R);if(Ce==="automatic")return y.TypeNavigationMode.Automatic;if(Ce==="trigger")return y.TypeNavigationMode.Trigger},Ee=oe.horizontalScrolling!==void 0?oe.horizontalScrolling:!!me.getValue(k),[Ae,Re]=we.invokeFunction(Y,oe),Be=oe.paddingBottom,ye=oe.renderIndentGuides!==void 0?oe.renderIndentGuides:me.getValue(P);return{getTypeNavigationMode:Le,disposable:Re,options:Object.assign(Object.assign({keyboardSupport:!1},Ae),{indent:typeof me.getValue(A)=="number"?me.getValue(A):void 0,renderIndentGuides:ye,smoothScrolling:!!me.getValue(O),defaultFindMode:X(me),defaultFindMatchType:K(me),horizontalScrolling:Ee,scrollByPage:!!me.getValue(T),paddingBottom:Be,hideTwistiesOfChildlessElements:oe.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(he=oe.expandOnlyOnTwistieClick)!==null&&he!==void 0?he:me.getValue(U)==="doubleClick",contextViewProvider:pe,findWidgetStyles:c.defaultFindWidgetStyles})}}let Q=class{get onDidOpen(){return this.navigator.onDidOpen}constructor(oe,he,me,pe,ve,we,Le){var Ee;this.tree=oe,this.disposables=[],this.contextKeyService=p(ve,oe),this.disposables.push(b(this.contextKeyService,oe)),this.listSupportsMultiSelect=e.WorkbenchListSupportsMultiSelectContextKey.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(he.multipleSelectionSupport!==!1),e.WorkbenchListSelectionNavigation.bindTo(this.contextKeyService).set(!!he.selectionNavigation),this.listSupportFindWidget=e.WorkbenchListSupportsFind.bindTo(this.contextKeyService),this.listSupportFindWidget.set((Ee=he.findWidgetEnabled)!==null&&Ee!==void 0?Ee:!0),this.hasSelectionOrFocus=e.WorkbenchListHasSelectionOrFocus.bindTo(this.contextKeyService),this.hasDoubleSelection=e.WorkbenchListDoubleSelection.bindTo(this.contextKeyService),this.hasMultiSelection=e.WorkbenchListMultiSelection.bindTo(this.contextKeyService),this.treeElementCanCollapse=e.WorkbenchTreeElementCanCollapse.bindTo(this.contextKeyService),this.treeElementHasParent=e.WorkbenchTreeElementHasParent.bindTo(this.contextKeyService),this.treeElementCanExpand=e.WorkbenchTreeElementCanExpand.bindTo(this.contextKeyService),this.treeElementHasChild=e.WorkbenchTreeElementHasChild.bindTo(this.contextKeyService),this.treeFindOpen=e.WorkbenchTreeFindOpen.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=F(Le),this.updateStyleOverrides(pe);const Re=()=>{const ye=oe.getFocus()[0];if(!ye)return;const De=oe.getNode(ye);this.treeElementCanCollapse.set(De.collapsible&&!De.collapsed),this.treeElementHasParent.set(!!oe.getParentElement(ye)),this.treeElementCanExpand.set(De.collapsible&&De.collapsed),this.treeElementHasChild.set(!!oe.getFirstElementChild(ye))},Be=new Set;Be.add(g),Be.add(h),this.disposables.push(this.contextKeyService,we.register(oe),oe.onDidChangeSelection(()=>{const ye=oe.getSelection(),De=oe.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(ye.length>0||De.length>0),this.hasMultiSelection.set(ye.length>1),this.hasDoubleSelection.set(ye.length===2)})}),oe.onDidChangeFocus(()=>{const ye=oe.getSelection(),De=oe.getFocus();this.hasSelectionOrFocus.set(ye.length>0||De.length>0),Re()}),oe.onDidChangeCollapseState(Re),oe.onDidChangeModel(Re),oe.onDidChangeFindOpenState(ye=>this.treeFindOpen.set(ye)),Le.onDidChangeConfiguration(ye=>{let De={};if(ye.affectsConfiguration(w)&&(this._useAltAsMultipleSelectionModifier=F(Le)),ye.affectsConfiguration(A)){const fe=Le.getValue(A);De=Object.assign(Object.assign({},De),{indent:fe})}if(ye.affectsConfiguration(P)&&he.renderIndentGuides===void 0){const fe=Le.getValue(P);De=Object.assign(Object.assign({},De),{renderIndentGuides:fe})}if(ye.affectsConfiguration(O)){const fe=!!Le.getValue(O);De=Object.assign(Object.assign({},De),{smoothScrolling:fe})}if(ye.affectsConfiguration(M)||ye.affectsConfiguration(B)){const fe=X(Le);De=Object.assign(Object.assign({},De),{defaultFindMode:fe})}if(ye.affectsConfiguration(R)||ye.affectsConfiguration(B)){const fe=me();De=Object.assign(Object.assign({},De),{typeNavigationMode:fe})}if(ye.affectsConfiguration(N)){const fe=K(Le);De=Object.assign(Object.assign({},De),{defaultFindMatchType:fe})}if(ye.affectsConfiguration(k)&&he.horizontalScrolling===void 0){const fe=!!Le.getValue(k);De=Object.assign(Object.assign({},De),{horizontalScrolling:fe})}if(ye.affectsConfiguration(T)){const fe=!!Le.getValue(T);De=Object.assign(Object.assign({},De),{scrollByPage:fe})}if(ye.affectsConfiguration(U)&&he.expandOnlyOnTwistieClick===void 0&&(De=Object.assign(Object.assign({},De),{expandOnlyOnTwistieClick:Le.getValue(U)==="doubleClick"})),ye.affectsConfiguration(x)){const fe=Le.getValue(x);De=Object.assign(Object.assign({},De),{mouseWheelScrollSensitivity:fe})}if(ye.affectsConfiguration(W)){const fe=Le.getValue(W);De=Object.assign(Object.assign({},De),{fastScrollSensitivity:fe})}Object.keys(De).length>0&&oe.updateOptions(De)}),this.contextKeyService.onDidChangeContext(ye=>{ye.affectsSome(Be)&&oe.updateOptions({typeNavigationMode:me()})})),this.navigator=new Z(oe,Object.assign({configurationService:Le},he)),this.disposables.push(this.navigator)}updateOptions(oe){oe.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!oe.multipleSelectionSupport)}updateStyleOverrides(oe){this.tree.style(oe?(0,c.getListStyles)(oe):c.defaultListStyles)}dispose(){this.disposables=(0,s.dispose)(this.disposables)}};Q=Ie([ge(4,r.IContextKeyService),ge(5,e.IListService),ge(6,n.IConfigurationService)],Q),o.Registry.as(t.Extensions.Configuration).registerConfiguration({id:"workbench",order:7,title:(0,i.localize)(0,null),type:"object",properties:{[w]:{type:"string",enum:["ctrlCmd","alt"],markdownEnumDescriptions:[(0,i.localize)(1,null),(0,i.localize)(2,null)],default:"ctrlCmd",description:(0,i.localize)(3,null)},[E]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,i.localize)(4,null)},[k]:{type:"boolean",default:!1,description:(0,i.localize)(5,null)},[T]:{type:"boolean",default:!1,description:(0,i.localize)(6,null)},[A]:{type:"number",default:8,minimum:4,maximum:40,description:(0,i.localize)(7,null)},[P]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:(0,i.localize)(8,null)},[O]:{type:"boolean",default:!1,description:(0,i.localize)(9,null)},[x]:{type:"number",default:1,markdownDescription:(0,i.localize)(10,null)},[W]:{type:"number",default:5,markdownDescription:(0,i.localize)(11,null)},[M]:{type:"string",enum:["highlight","filter"],enumDescriptions:[(0,i.localize)(12,null),(0,i.localize)(13,null)],default:"highlight",description:(0,i.localize)(14,null)},[B]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[(0,i.localize)(15,null),(0,i.localize)(16,null),(0,i.localize)(17,null)],default:"highlight",description:(0,i.localize)(18,null),deprecated:!0,deprecationMessage:(0,i.localize)(19,null)},[N]:{type:"string",enum:["fuzzy","contiguous"],enumDescriptions:[(0,i.localize)(20,null),(0,i.localize)(21,null)],default:"fuzzy",description:(0,i.localize)(22,null)},[U]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:(0,i.localize)(23,null)},[R]:{type:"string",enum:["automatic","trigger"],default:"automatic",markdownDescription:(0,i.localize)(24,null)}}})}),define(te[77],ie([1,0,14,26,27,6,20,21,738,239,35]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.spinningLoading=e.syncing=e.gotoNextLocation=e.gotoPreviousLocation=e.widgetClose=e.iconsSchemaId=e.getIconRegistry=e.registerIcon=e.IconFontDefinition=e.IconContribution=e.Extensions=void 0,e.Extensions={IconContribution:"base.contributions.icons"};var s;(function(o){function c(a,g){let h=a.defaults;for(;y.ThemeIcon.isThemeIcon(h);){const p=t.getIcon(h.id);if(!p)return;h=p.defaults}return h}o.getDefinition=c})(s||(e.IconContribution=s={}));var i;(function(o){function c(g){return{weight:g.weight,style:g.style,src:g.src.map(h=>({format:h.format,location:h.location.toString()}))}}o.toJSONObject=c;function a(g){const h=p=>(0,S.isString)(p)?p:void 0;if(g&&Array.isArray(g.src)&&g.src.every(p=>(0,S.isString)(p.format)&&(0,S.isString)(p.location)))return{weight:h(g.weight),style:h(g.style),src:g.src.map(p=>({format:p.format,location:m.URI.parse(p.location)}))}}o.fromJSONObject=a})(i||(e.IconFontDefinition=i={}));class n{constructor(){this._onDidChange=new D.Emitter,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:(0,_.localize)(0,null)},fontCharacter:{type:"string",description:(0,_.localize)(1,null)}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${y.ThemeIcon.iconNameExpression}$`,enum:[],enumDescriptions:[]},this.iconsById={},this.iconFontsById={}}registerIcon(c,a,g,h){const p=this.iconsById[c];if(p){if(g&&!p.description){p.description=g,this.iconSchema.properties[c].markdownDescription=`${g} $(${c})`;const E=this.iconReferenceSchema.enum.indexOf(c);E!==-1&&(this.iconReferenceSchema.enumDescriptions[E]=g),this._onDidChange.fire()}return p}const b={id:c,description:g,defaults:a,deprecationMessage:h};this.iconsById[c]=b;const w={$ref:"#/definitions/icons"};return h&&(w.deprecationMessage=h),g&&(w.markdownDescription=`${g}: $(${c})`),this.iconSchema.properties[c]=w,this.iconReferenceSchema.enum.push(c),this.iconReferenceSchema.enumDescriptions.push(g||""),this._onDidChange.fire(),{id:c}}getIcons(){return Object.keys(this.iconsById).map(c=>this.iconsById[c])}getIcon(c){return this.iconsById[c]}getIconSchema(){return this.iconSchema}toString(){const c=(p,b)=>p.id.localeCompare(b.id),a=p=>{for(;y.ThemeIcon.isThemeIcon(p.defaults);)p=this.iconsById[p.defaults.id];return`codicon codicon-${p?p.id:""}`},g=[];g.push("| preview | identifier | default codicon ID | description"),g.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const h=Object.keys(this.iconsById).map(p=>this.iconsById[p]);for(const p of h.filter(b=>!!b.description).sort(c))g.push(`||${p.id}|${y.ThemeIcon.isThemeIcon(p.defaults)?p.defaults.id:p.id}|${p.description||""}|`);g.push("| preview | identifier "),g.push("| ----------- | --------------------------------- |");for(const p of h.filter(b=>!y.ThemeIcon.isThemeIcon(b.defaults)).sort(c))g.push(`||${p.id}|`);return g.join(` -`)}}const t=new n;C.Registry.add(e.Extensions.IconContribution,t);function r(o,c,a,g){return t.registerIcon(o,c,a,g)}e.registerIcon=r;function u(){return t}e.getIconRegistry=u;function f(){const o=(0,I.getCodiconFontCharacters)();for(const c in o){const a="\\"+o[c].toString(16);t.registerIcon(c,{fontCharacter:a})}}f(),e.iconsSchemaId="vscode://schemas/icons";const d=C.Registry.as(v.Extensions.JSONContribution);d.registerSchema(e.iconsSchemaId,t.getIconSchema());const l=new L.RunOnceScheduler(()=>d.notifySchemaChanged(e.iconsSchemaId),200);t.onDidChange(()=>{l.isScheduled()||l.schedule()}),e.widgetClose=r("widget-close",I.Codicon.close,(0,_.localize)(2,null)),e.gotoPreviousLocation=r("goto-previous-location",I.Codicon.arrowUp,(0,_.localize)(3,null)),e.gotoNextLocation=r("goto-next-location",I.Codicon.arrowDown,(0,_.localize)(4,null)),e.syncing=y.ThemeIcon.modify(I.Codicon.sync,"spin"),e.spinningLoading=y.ThemeIcon.modify(I.Codicon.loading,"spin")}),define(te[829],ie([1,0,7,90,73,84,41,13,26,2,40,27,70,100,39,64,81,12,5,108,42,91,114,82,609,156,8,77,437]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AccessibleDiffViewer=void 0;const E=(0,w.registerIcon)("diff-review-insert",_.Codicon.add,(0,h.localize)(0,null)),k=(0,w.registerIcon)("diff-review-remove",_.Codicon.remove,(0,h.localize)(1,null)),M=(0,w.registerIcon)("diff-review-close",_.Codicon.close,(0,h.localize)(2,null));let R=class extends v.Disposable{constructor(Y,ne,se,J,q,H,V,Z,ee){super(),this._parentNode=Y,this._visible=ne,this._setVisible=se,this._canClose=J,this._width=q,this._height=H,this._diffs=V,this._editors=Z,this._instantiationService=ee,this.model=(0,C.derivedWithStore)(this,(le,ue)=>{const de=this._visible.read(le);if(this._parentNode.style.visibility=de?"visible":"hidden",!de)return null;const ce=ue.add(this._instantiationService.createInstance(B,this._diffs,this._editors,this._setVisible,this._canClose)),ae=ue.add(this._instantiationService.createInstance(F,this._parentNode,ce,this._width,this._height,this._editors));return{model:ce,view:ae}}),this._register((0,C.recomputeInitiallyAndOnChange)(this.model))}next(){(0,C.transaction)(Y=>{const ne=this._visible.get();this._setVisible(!0,Y),ne&&this.model.get().model.nextGroup(Y)})}prev(){(0,C.transaction)(Y=>{this._setVisible(!0,Y),this.model.get().model.previousGroup(Y)})}close(){(0,C.transaction)(Y=>{this._setVisible(!1,Y)})}};e.AccessibleDiffViewer=R,R._ttPolicy=(0,I.createTrustedTypesPolicy)("diffReview",{createHTML:G=>G}),e.AccessibleDiffViewer=R=Ie([ge(8,b.IInstantiationService)],R);let B=class extends v.Disposable{constructor(Y,ne,se,J,q){super(),this._diffs=Y,this._editors=ne,this._setVisible=se,this.canClose=J,this._audioCueService=q,this._groups=(0,C.observableValue)(this,[]),this._currentGroupIdx=(0,C.observableValue)(this,0),this._currentElementIdx=(0,C.observableValue)(this,0),this.groups=this._groups,this.currentGroup=this._currentGroupIdx.map((H,V)=>this._groups.read(V)[H]),this.currentGroupIndex=this._currentGroupIdx,this.currentElement=this._currentElementIdx.map((H,V)=>{var Z;return(Z=this.currentGroup.read(V))===null||Z===void 0?void 0:Z.lines[H]}),this._register((0,C.autorun)(H=>{const V=this._diffs.read(H);if(!V){this._groups.set([],void 0);return}const Z=N(V,this._editors.original.getModel().getLineCount(),this._editors.modified.getModel().getLineCount());(0,C.transaction)(ee=>{const le=this._editors.modified.getPosition();if(le){const ue=Z.findIndex(de=>le?.lineNumber{const V=this.currentElement.read(H);V?.type===A.Deleted?this._audioCueService.playAudioCue(p.AudioCue.diffLineDeleted,{source:"accessibleDiffViewer.currentElementChanged"}):V?.type===A.Added&&this._audioCueService.playAudioCue(p.AudioCue.diffLineInserted,{source:"accessibleDiffViewer.currentElementChanged"})})),this._register((0,C.autorun)(H=>{var V;const Z=this.currentElement.read(H);if(Z&&Z.type!==A.Header){const ee=(V=Z.modifiedLineNumber)!==null&&V!==void 0?V:Z.diff.modified.startLineNumber;this._editors.modified.setSelection(d.Range.fromPositions(new f.Position(ee,1)))}}))}_goToGroupDelta(Y,ne){const se=this.groups.get();!se||se.length<=1||(0,C.subtransaction)(ne,J=>{this._currentGroupIdx.set(u.OffsetRange.ofLength(se.length).clipCyclic(this._currentGroupIdx.get()+Y),J),this._currentElementIdx.set(0,J)})}nextGroup(Y){this._goToGroupDelta(1,Y)}previousGroup(Y){this._goToGroupDelta(-1,Y)}_goToLineDelta(Y){const ne=this.currentGroup.get();!ne||ne.lines.length<=1||(0,C.transaction)(se=>{this._currentElementIdx.set(u.OffsetRange.ofLength(ne.lines.length).clip(this._currentElementIdx.get()+Y),se)})}goToNextLine(){this._goToLineDelta(1)}goToPreviousLine(){this._goToLineDelta(-1)}goToLine(Y){const ne=this.currentGroup.get();if(!ne)return;const se=ne.lines.indexOf(Y);se!==-1&&(0,C.transaction)(J=>{this._currentElementIdx.set(se,J)})}revealCurrentElementInEditor(){this._setVisible(!1,void 0);const Y=this.currentElement.get();Y&&(Y.type===A.Deleted?(this._editors.original.setSelection(d.Range.fromPositions(new f.Position(Y.originalLineNumber,1))),this._editors.original.revealLine(Y.originalLineNumber),this._editors.original.focus()):(Y.type!==A.Header&&(this._editors.modified.setSelection(d.Range.fromPositions(new f.Position(Y.modifiedLineNumber,1))),this._editors.modified.revealLine(Y.modifiedLineNumber)),this._editors.modified.focus()))}close(){this._setVisible(!1,void 0),this._editors.modified.focus()}};B=Ie([ge(4,p.IAudioCueService)],B);const T=3;function N(G,Y,ne){const se=[];for(const J of(0,m.groupAdjacentBy)(G,(q,H)=>H.modified.startLineNumber-q.modified.endLineNumberExclusive<2*T)){const q=[];q.push(new O);const H=new r.LineRange(Math.max(1,J[0].original.startLineNumber-T),Math.min(J[J.length-1].original.endLineNumberExclusive+T,Y+1)),V=new r.LineRange(Math.max(1,J[0].modified.startLineNumber-T),Math.min(J[J.length-1].modified.endLineNumberExclusive+T,ne+1));(0,m.forEachAdjacent)(J,(le,ue)=>{const de=new r.LineRange(le?le.original.endLineNumberExclusive:H.startLineNumber,ue?ue.original.startLineNumber:H.endLineNumberExclusive),ce=new r.LineRange(le?le.modified.endLineNumberExclusive:V.startLineNumber,ue?ue.modified.startLineNumber:V.endLineNumberExclusive);de.forEach(ae=>{q.push(new U(ae,ce.startLineNumber+(ae-de.startLineNumber)))}),ue&&(ue.original.forEach(ae=>{q.push(new x(ue,ae))}),ue.modified.forEach(ae=>{q.push(new W(ue,ae))}))});const Z=J[0].modified.join(J[J.length-1].modified),ee=J[0].original.join(J[J.length-1].original);se.push(new P(new l.LineRangeMapping(Z,ee),q))}return se}var A;(function(G){G[G.Header=0]="Header",G[G.Unchanged=1]="Unchanged",G[G.Deleted=2]="Deleted",G[G.Added=3]="Added"})(A||(A={}));class P{constructor(Y,ne){this.range=Y,this.lines=ne}}class O{constructor(){this.type=A.Header}}class x{constructor(Y,ne){this.diff=Y,this.originalLineNumber=ne,this.type=A.Deleted,this.modifiedLineNumber=void 0}}class W{constructor(Y,ne){this.diff=Y,this.modifiedLineNumber=ne,this.type=A.Added,this.originalLineNumber=void 0}}class U{constructor(Y,ne){this.originalLineNumber=Y,this.modifiedLineNumber=ne,this.type=A.Unchanged}}let F=class extends v.Disposable{constructor(Y,ne,se,J,q,H){super(),this._element=Y,this._model=ne,this._width=se,this._height=J,this._editors=q,this._languageService=H,this.domNode=this._element,this.domNode.className="diff-review monaco-editor-background";const V=document.createElement("div");V.className="diff-review-actions",this._actionBar=this._register(new y.ActionBar(V)),this._register((0,C.autorun)(Z=>{this._actionBar.clear(),this._model.canClose.read(Z)&&this._actionBar.push(new S.Action("diffreview.close",(0,h.localize)(3,null),"close-diff-review "+s.ThemeIcon.asClassName(M),!0,()=>be(this,void 0,void 0,function*(){return ne.close()})),{label:!1,icon:!0})})),this._content=document.createElement("div"),this._content.className="diff-review-content",this._content.setAttribute("role","code"),this._scrollbar=this._register(new D.DomScrollableElement(this._content,{})),(0,L.reset)(this.domNode,this._scrollbar.getDomNode(),V),this._register((0,v.toDisposable)(()=>{(0,L.reset)(this.domNode)})),this._register((0,n.applyStyle)(this.domNode,{width:this._width,height:this._height})),this._register((0,n.applyStyle)(this._content,{width:this._width,height:this._height})),this._register((0,C.autorunWithStore)((Z,ee)=>{this._model.currentGroup.read(Z),this._render(ee)})),this._register((0,L.addStandardDisposableListener)(this.domNode,"keydown",Z=>{(Z.equals(18)||Z.equals(2066)||Z.equals(530))&&(Z.preventDefault(),this._model.goToNextLine()),(Z.equals(16)||Z.equals(2064)||Z.equals(528))&&(Z.preventDefault(),this._model.goToPreviousLine()),(Z.equals(9)||Z.equals(2057)||Z.equals(521)||Z.equals(1033))&&(Z.preventDefault(),this._model.close()),(Z.equals(10)||Z.equals(3))&&(Z.preventDefault(),this._model.revealCurrentElementInEditor())}))}_render(Y){const ne=this._editors.original.getOptions(),se=this._editors.modified.getOptions(),J=document.createElement("div");J.className="diff-review-table",J.setAttribute("role","list"),J.setAttribute("aria-label",(0,h.localize)(4,null)),(0,i.applyFontInfo)(J,se.get(50)),(0,L.reset)(this._content,J);const q=this._editors.original.getModel(),H=this._editors.modified.getModel();if(!q||!H)return;const V=q.getOptions(),Z=H.getOptions(),ee=se.get(66),le=this._model.currentGroup.get();for(const ue of le?.lines||[]){if(!le)break;let de;if(ue.type===A.Header){const ae=document.createElement("div");ae.className="diff-review-row",ae.setAttribute("role","listitem");const X=le.range,K=this._model.currentGroupIndex.get(),z=this._model.groups.get().length,Q=he=>he===0?(0,h.localize)(5,null):he===1?(0,h.localize)(6,null):(0,h.localize)(7,null,he),j=Q(X.original.length),re=Q(X.modified.length);ae.setAttribute("aria-label",(0,h.localize)(8,null,K+1,z,X.original.startLineNumber,j,X.modified.startLineNumber,re));const oe=document.createElement("div");oe.className="diff-review-cell diff-review-summary",oe.appendChild(document.createTextNode(`${K+1}/${z}: @@ -${X.original.startLineNumber},${X.original.length} +${X.modified.startLineNumber},${X.modified.length} @@`)),ae.appendChild(oe),de=ae}else de=this._createRow(ue,ee,this._width.get(),ne,q,V,se,H,Z);J.appendChild(de);const ce=(0,C.derived)(ae=>this._model.currentElement.read(ae)===ue);Y.add((0,C.autorun)(ae=>{const X=ce.read(ae);de.tabIndex=X?0:-1,X&&de.focus()})),Y.add((0,L.addDisposableListener)(de,"focus",()=>{this._model.goToLine(ue)}))}this._scrollbar.scanDomNode()}_createRow(Y,ne,se,J,q,H,V,Z,ee){const le=J.get(143),ue=le.glyphMarginWidth+le.lineNumbersWidth,de=V.get(143),ce=10+de.glyphMarginWidth+de.lineNumbersWidth;let ae="diff-review-row",X="";const K="diff-review-spacer";let z=null;switch(Y.type){case A.Added:ae="diff-review-row line-insert",X=" char-insert",z=E;break;case A.Deleted:ae="diff-review-row line-delete",X=" char-delete",z=k;break}const Q=document.createElement("div");Q.style.minWidth=se+"px",Q.className=ae,Q.setAttribute("role","listitem"),Q.ariaLevel="";const j=document.createElement("div");j.className="diff-review-cell",j.style.height=`${ne}px`,Q.appendChild(j);const re=document.createElement("span");re.style.width=ue+"px",re.style.minWidth=ue+"px",re.className="diff-review-line-number"+X,Y.originalLineNumber!==void 0?re.appendChild(document.createTextNode(String(Y.originalLineNumber))):re.innerText="\xA0",j.appendChild(re);const oe=document.createElement("span");oe.style.width=ce+"px",oe.style.minWidth=ce+"px",oe.style.paddingRight="10px",oe.className="diff-review-line-number"+X,Y.modifiedLineNumber!==void 0?oe.appendChild(document.createTextNode(String(Y.modifiedLineNumber))):oe.innerText="\xA0",j.appendChild(oe);const he=document.createElement("span");if(he.className=K,z){const ve=document.createElement("span");ve.className=s.ThemeIcon.asClassName(z),ve.innerText="\xA0\xA0",he.appendChild(ve)}else he.innerText="\xA0\xA0";j.appendChild(he);let me;if(Y.modifiedLineNumber!==void 0){let ve=this._getLineHtml(Z,V,ee.tabSize,Y.modifiedLineNumber,this._languageService.languageIdCodec);R._ttPolicy&&(ve=R._ttPolicy.createHTML(ve)),j.insertAdjacentHTML("beforeend",ve),me=Z.getLineContent(Y.modifiedLineNumber)}else{let ve=this._getLineHtml(q,J,H.tabSize,Y.originalLineNumber,this._languageService.languageIdCodec);R._ttPolicy&&(ve=R._ttPolicy.createHTML(ve)),j.insertAdjacentHTML("beforeend",ve),me=q.getLineContent(Y.originalLineNumber)}me.length===0&&(me=(0,h.localize)(9,null));let pe="";switch(Y.type){case A.Unchanged:Y.originalLineNumber===Y.modifiedLineNumber?pe=(0,h.localize)(10,null,me,Y.originalLineNumber):pe=(0,h.localize)(11,null,me,Y.originalLineNumber,Y.modifiedLineNumber);break;case A.Added:pe=(0,h.localize)(12,null,me,Y.modifiedLineNumber);break;case A.Deleted:pe=(0,h.localize)(13,null,me,Y.originalLineNumber);break}return Q.setAttribute("aria-label",pe),Q}_getLineHtml(Y,ne,se,J,q){const H=Y.getLineContent(J),V=ne.get(50),Z=c.LineTokens.createEmpty(H,q),ee=g.ViewLineRenderingData.isBasicASCII(H,Y.mightContainNonBasicASCII()),le=g.ViewLineRenderingData.containsRTL(H,ee,Y.mightContainRTL());return(0,a.renderViewLine2)(new a.RenderLineInput(V.isMonospace&&!ne.get(33),V.canUseHalfwidthRightwardsArrow,H,!1,ee,le,0,Z,[],se,0,V.spaceWidth,V.middotWidth,V.wsmiddotWidth,ne.get(116),ne.get(98),ne.get(93),ne.get(51)!==t.EditorFontLigatures.OFF,null)).html}};F=Ie([ge(5,o.ILanguageService)],F)}),define(te[830],ie([1,0,51,7,151,83,26,36,6,2,27,645,31,77,199]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPickerWidget=e.InsertButton=e.ColorPickerBody=e.ColorPickerHeader=void 0;const t=I.$;class r extends v.Disposable{constructor(p,b,w,E=!1){super(),this.model=b,this.showingStandaloneColorPicker=E,this._closeButton=null,this._domNode=t(".colorpicker-header"),I.append(p,this._domNode),this._pickedColorNode=I.append(this._domNode,t(".picked-color")),I.append(this._pickedColorNode,t("span.codicon.codicon-color-mode")),this._pickedColorPresentation=I.append(this._pickedColorNode,document.createElement("span")),this._pickedColorPresentation.classList.add("picked-color-presentation");const k=(0,s.localize)(0,null);this._pickedColorNode.setAttribute("title",k),this._originalColorNode=I.append(this._domNode,t(".original-color")),this._originalColorNode.style.backgroundColor=m.Color.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=w.getColorTheme().getColor(i.editorHoverBackground)||m.Color.white,this._register(w.onDidColorThemeChange(M=>{this.backgroundColor=M.getColor(i.editorHoverBackground)||m.Color.white})),this._register(I.addDisposableListener(this._pickedColorNode,I.EventType.CLICK,()=>this.model.selectNextColorPresentation())),this._register(I.addDisposableListener(this._originalColorNode,I.EventType.CLICK,()=>{this.model.color=this.model.originalColor,this.model.flushColor()})),this._register(b.onDidChangeColor(this.onDidChangeColor,this)),this._register(b.onDidChangePresentation(this.onDidChangePresentation,this)),this._pickedColorNode.style.backgroundColor=m.Color.Format.CSS.format(b.color)||"",this._pickedColorNode.classList.toggle("light",b.color.rgba.a<.5?this.backgroundColor.isLighter():b.color.isLighter()),this.onDidChangeColor(this.model.color),this.showingStandaloneColorPicker&&(this._domNode.classList.add("standalone-colorpicker"),this._closeButton=this._register(new u(this._domNode)))}get closeButton(){return this._closeButton}get pickedColorNode(){return this._pickedColorNode}get originalColorNode(){return this._originalColorNode}onDidChangeColor(p){this._pickedColorNode.style.backgroundColor=m.Color.Format.CSS.format(p)||"",this._pickedColorNode.classList.toggle("light",p.rgba.a<.5?this.backgroundColor.isLighter():p.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this._pickedColorPresentation.textContent=this.model.presentation?this.model.presentation.label:""}}e.ColorPickerHeader=r;class u extends v.Disposable{constructor(p){super(),this._onClicked=this._register(new _.Emitter),this.onClicked=this._onClicked.event,this._button=document.createElement("div"),this._button.classList.add("close-button"),I.append(p,this._button);const b=document.createElement("div");b.classList.add("close-button-inner-div"),I.append(this._button,b),I.append(b,t(".button"+C.ThemeIcon.asCSSSelector((0,n.registerIcon)("color-picker-close",S.Codicon.close,(0,s.localize)(1,null))))).classList.add("close-icon"),this._button.onclick=()=>{this._onClicked.fire()}}}class f extends v.Disposable{constructor(p,b,w,E=!1){super(),this.model=b,this.pixelRatio=w,this._insertButton=null,this._domNode=t(".colorpicker-body"),I.append(p,this._domNode),this._saturationBox=new d(this._domNode,this.model,this.pixelRatio),this._register(this._saturationBox),this._register(this._saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this._saturationBox.onColorFlushed(this.flushColor,this)),this._opacityStrip=new o(this._domNode,this.model,E),this._register(this._opacityStrip),this._register(this._opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this._opacityStrip.onColorFlushed(this.flushColor,this)),this._hueStrip=new c(this._domNode,this.model,E),this._register(this._hueStrip),this._register(this._hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this._hueStrip.onColorFlushed(this.flushColor,this)),E&&(this._insertButton=this._register(new a(this._domNode)),this._domNode.classList.add("standalone-colorpicker"))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:p,v:b}){const w=this.model.color.hsva;this.model.color=new m.Color(new m.HSVA(w.h,p,b,w.a))}onDidOpacityChange(p){const b=this.model.color.hsva;this.model.color=new m.Color(new m.HSVA(b.h,b.s,b.v,p))}onDidHueChange(p){const b=this.model.color.hsva,w=(1-p)*360;this.model.color=new m.Color(new m.HSVA(w===360?0:w,b.s,b.v,b.a))}get domNode(){return this._domNode}get saturationBox(){return this._saturationBox}get enterButton(){return this._insertButton}layout(){this._saturationBox.layout(),this._opacityStrip.layout(),this._hueStrip.layout()}}e.ColorPickerBody=f;class d extends v.Disposable{constructor(p,b,w){super(),this.model=b,this.pixelRatio=w,this._onDidChange=new _.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new _.Emitter,this.onColorFlushed=this._onColorFlushed.event,this._domNode=t(".saturation-wrap"),I.append(p,this._domNode),this._canvas=document.createElement("canvas"),this._canvas.className="saturation-box",I.append(this._domNode,this._canvas),this.selection=t(".saturation-selection"),I.append(this._domNode,this.selection),this.layout(),this._register(I.addDisposableListener(this._domNode,I.EventType.POINTER_DOWN,E=>this.onPointerDown(E))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}get domNode(){return this._domNode}onPointerDown(p){if(!p.target||!(p.target instanceof Element))return;this.monitor=this._register(new y.GlobalPointerMoveMonitor);const b=I.getDomNodePagePosition(this._domNode);p.target!==this.selection&&this.onDidChangePosition(p.offsetX,p.offsetY),this.monitor.startMonitoring(p.target,p.pointerId,p.buttons,E=>this.onDidChangePosition(E.pageX-b.left,E.pageY-b.top),()=>null);const w=I.addDisposableListener(p.target.ownerDocument,I.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),w.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)},!0)}onDidChangePosition(p,b){const w=Math.max(0,Math.min(1,p/this.width)),E=Math.max(0,Math.min(1,1-b/this.height));this.paintSelection(w,E),this._onDidChange.fire({s:w,v:E})}layout(){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();const p=this.model.color.hsva;this.paintSelection(p.s,p.v)}paint(){const p=this.model.color.hsva,b=new m.Color(new m.HSVA(p.h,1,1,1)),w=this._canvas.getContext("2d"),E=w.createLinearGradient(0,0,this._canvas.width,0);E.addColorStop(0,"rgba(255, 255, 255, 1)"),E.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),E.addColorStop(1,"rgba(255, 255, 255, 0)");const k=w.createLinearGradient(0,0,0,this._canvas.height);k.addColorStop(0,"rgba(0, 0, 0, 0)"),k.addColorStop(1,"rgba(0, 0, 0, 1)"),w.rect(0,0,this._canvas.width,this._canvas.height),w.fillStyle=m.Color.Format.CSS.format(b),w.fill(),w.fillStyle=E,w.fill(),w.fillStyle=k,w.fill()}paintSelection(p,b){this.selection.style.left=`${p*this.width}px`,this.selection.style.top=`${this.height-b*this.height}px`}onDidChangeColor(p){if(this.monitor&&this.monitor.isMonitoring())return;this.paint();const b=p.hsva;this.paintSelection(b.s,b.v)}}class l extends v.Disposable{constructor(p,b,w=!1){super(),this.model=b,this._onDidChange=new _.Emitter,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new _.Emitter,this.onColorFlushed=this._onColorFlushed.event,w?(this.domNode=I.append(p,t(".standalone-strip")),this.overlay=I.append(this.domNode,t(".standalone-overlay"))):(this.domNode=I.append(p,t(".strip")),this.overlay=I.append(this.domNode,t(".overlay"))),this.slider=I.append(this.domNode,t(".slider")),this.slider.style.top="0px",this._register(I.addDisposableListener(this.domNode,I.EventType.POINTER_DOWN,E=>this.onPointerDown(E))),this._register(b.onDidChangeColor(this.onDidChangeColor,this)),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const p=this.getValue(this.model.color);this.updateSliderPosition(p)}onDidChangeColor(p){const b=this.getValue(p);this.updateSliderPosition(b)}onPointerDown(p){if(!p.target||!(p.target instanceof Element))return;const b=this._register(new y.GlobalPointerMoveMonitor),w=I.getDomNodePagePosition(this.domNode);this.domNode.classList.add("grabbing"),p.target!==this.slider&&this.onDidChangeTop(p.offsetY),b.startMonitoring(p.target,p.pointerId,p.buttons,k=>this.onDidChangeTop(k.pageY-w.top),()=>null);const E=I.addDisposableListener(p.target.ownerDocument,I.EventType.POINTER_UP,()=>{this._onColorFlushed.fire(),E.dispose(),b.stopMonitoring(!0),this.domNode.classList.remove("grabbing")},!0)}onDidChangeTop(p){const b=Math.max(0,Math.min(1,1-p/this.height));this.updateSliderPosition(b),this._onDidChange.fire(b)}updateSliderPosition(p){this.slider.style.top=`${(1-p)*this.height}px`}}class o extends l{constructor(p,b,w=!1){super(p,b,w),this.domNode.classList.add("opacity-strip"),this.onDidChangeColor(this.model.color)}onDidChangeColor(p){super.onDidChangeColor(p);const{r:b,g:w,b:E}=p.rgba,k=new m.Color(new m.RGBA(b,w,E,1)),M=new m.Color(new m.RGBA(b,w,E,0));this.overlay.style.background=`linear-gradient(to bottom, ${k} 0%, ${M} 100%)`}getValue(p){return p.hsva.a}}class c extends l{constructor(p,b,w=!1){super(p,b,w),this.domNode.classList.add("hue-strip")}getValue(p){return 1-p.hsva.h/360}}class a extends v.Disposable{constructor(p){super(),this._onClicked=this._register(new _.Emitter),this.onClicked=this._onClicked.event,this._button=I.append(p,document.createElement("button")),this._button.classList.add("insert-button"),this._button.textContent="Insert",this._button.onclick=b=>{this._onClicked.fire()}}get button(){return this._button}}e.InsertButton=a;class g extends D.Widget{constructor(p,b,w,E,k=!1){super(),this.model=b,this.pixelRatio=w,this._register(L.PixelRatio.onDidChange(()=>this.layout()));const M=t(".colorpicker-widget");p.appendChild(M),this.header=this._register(new r(M,this.model,E,k)),this.body=this._register(new f(M,this.model,this.pixelRatio,k))}layout(){this.body.layout()}}e.ColorPickerWidget=g}),define(te[831],ie([1,0,7,45,84,26,6,2,10,20,42,116,236,690,15,55,31,77,27,461]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.ParameterHintsWidget=void 0;const o=L.$,c=(0,f.registerIcon)("parameter-hints-next",D.Codicon.chevronDown,n.localize(0,null)),a=(0,f.registerIcon)("parameter-hints-previous",D.Codicon.chevronUp,n.localize(1,null));let g=l=class extends m.Disposable{constructor(p,b,w,E,k){super(),this.editor=p,this.model=b,this.renderDisposeables=this._register(new m.DisposableStore),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new s.MarkdownRenderer({editor:p},k,E)),this.keyVisible=i.Context.Visible.bindTo(w),this.keyMultipleSignatures=i.Context.MultipleSignatures.bindTo(w)}createParameterHintDOMNodes(){const p=o(".editor-widget.parameter-hints-widget"),b=L.append(p,o(".phwrapper"));b.tabIndex=-1;const w=L.append(b,o(".controls")),E=L.append(w,o(".button"+d.ThemeIcon.asCSSSelector(a))),k=L.append(w,o(".overloads")),M=L.append(w,o(".button"+d.ThemeIcon.asCSSSelector(c)));this._register(L.addDisposableListener(E,"click",P=>{L.EventHelper.stop(P),this.previous()})),this._register(L.addDisposableListener(M,"click",P=>{L.EventHelper.stop(P),this.next()}));const R=o(".body"),B=new y.DomScrollableElement(R,{alwaysConsumeMouseWheel:!0});this._register(B),b.appendChild(B.getDomNode());const T=L.append(R,o(".signature")),N=L.append(R,o(".docs"));p.style.userSelect="text",this.domNodes={element:p,signature:T,overloads:k,docs:N,scrollbar:B},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(P=>{this.visible&&this.editor.layoutContentWidget(this)}));const A=()=>{if(!this.domNodes)return;const P=this.editor.getOption(50);this.domNodes.element.style.fontSize=`${P.fontSize}px`,this.domNodes.element.style.lineHeight=`${P.lineHeight/P.fontSize}`};A(),this._register(S.Event.chain(this.editor.onDidChangeConfiguration.bind(this.editor),P=>P.filter(O=>O.hasChanged(50)))(A)),this._register(this.editor.onDidLayoutChange(P=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{var p;(p=this.domNodes)===null||p===void 0||p.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){var p;this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,(p=this.domNodes)===null||p===void 0||p.element.classList.remove("visible"),this.editor.layoutContentWidget(this))}getPosition(){return this.visible?{position:this.editor.getPosition(),preference:[1,2]}:null}render(p){var b;if(this.renderDisposeables.clear(),!this.domNodes)return;const w=p.signatures.length>1;this.domNodes.element.classList.toggle("multiple",w),this.keyMultipleSignatures.set(w),this.domNodes.signature.innerText="",this.domNodes.docs.innerText="";const E=p.signatures[p.activeSignature];if(!E)return;const k=L.append(this.domNodes.signature,o(".code")),M=this.editor.getOption(50);k.style.fontSize=`${M.fontSize}px`,k.style.fontFamily=M.fontFamily;const R=E.parameters.length>0,B=(b=E.activeParameter)!==null&&b!==void 0?b:p.activeParameter;if(R)this.renderParameters(k,E,B);else{const A=L.append(k,o("span"));A.textContent=E.label}const T=E.parameters[B];if(T?.documentation){const A=o("span.documentation");if(typeof T.documentation=="string")A.textContent=T.documentation;else{const P=this.renderMarkdownDocs(T.documentation);A.appendChild(P.element)}L.append(this.domNodes.docs,o("p",{},A))}if(E.documentation!==void 0)if(typeof E.documentation=="string")L.append(this.domNodes.docs,o("p",{},E.documentation));else{const A=this.renderMarkdownDocs(E.documentation);L.append(this.domNodes.docs,A.element)}const N=this.hasDocs(E,T);if(this.domNodes.signature.classList.toggle("has-docs",N),this.domNodes.docs.classList.toggle("empty",!N),this.domNodes.overloads.textContent=String(p.activeSignature+1).padStart(p.signatures.length.toString().length,"0")+"/"+p.signatures.length,T){let A="";const P=E.parameters[B];Array.isArray(P.label)?A=E.label.substring(P.label[0],P.label[1]):A=P.label,P.documentation&&(A+=typeof P.documentation=="string"?`, ${P.documentation}`:`, ${P.documentation.value}`),E.documentation&&(A+=typeof E.documentation=="string"?`, ${E.documentation}`:`, ${E.documentation.value}`),this.announcedLabel!==A&&(I.alert(n.localize(2,null,A)),this.announcedLabel=A)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(p){const b=this.renderDisposeables.add(this.markdownRenderer.render(p,{asyncRenderCallback:()=>{var w;(w=this.domNodes)===null||w===void 0||w.scrollbar.scanDomNode()}}));return b.element.classList.add("markdown-docs"),b}hasDocs(p,b){return!!(b&&typeof b.documentation=="string"&&(0,v.assertIsDefined)(b.documentation).length>0||b&&typeof b.documentation=="object"&&(0,v.assertIsDefined)(b.documentation).value.length>0||p.documentation&&typeof p.documentation=="string"&&(0,v.assertIsDefined)(p.documentation).length>0||p.documentation&&typeof p.documentation=="object"&&(0,v.assertIsDefined)(p.documentation.value).length>0)}renderParameters(p,b,w){const[E,k]=this.getParameterLabelOffsets(b,w),M=document.createElement("span");M.textContent=b.label.substring(0,E);const R=document.createElement("span");R.textContent=b.label.substring(E,k),R.className="parameter active";const B=document.createElement("span");B.textContent=b.label.substring(k),L.append(p,M,R,B)}getParameterLabelOffsets(p,b){const w=p.parameters[b];if(w){if(Array.isArray(w.label))return w.label;if(w.label.length){const E=new RegExp(`(\\W|^)${(0,_.escapeRegExpCharacters)(w.label)}(?=\\W|$)`,"g");E.test(p.label);const k=E.lastIndex-w.label.length;return k>=0?[k,E.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return l.ID}updateMaxHeight(){if(!this.domNodes)return;const b=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=b;const w=this.domNodes.element.getElementsByClassName("phwrapper");w.length&&(w[0].style.maxHeight=b)}};e.ParameterHintsWidget=g,g.ID="editor.widget.parameterHintsWidget",e.ParameterHintsWidget=g=l=Ie([ge(2,t.IContextKeyService),ge(3,r.IOpenerService),ge(4,C.ILanguageService)],g),(0,u.registerColor)("editorHoverWidget.highlightForeground",{dark:u.listHighlightForeground,light:u.listHighlightForeground,hcDark:u.listHighlightForeground,hcLight:u.listHighlightForeground},n.localize(3,null))}),define(te[832],ie([1,0,97,2,16,22,29,18,754,236,689,15,8,831]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerParameterHintsAction=e.ParameterHintsController=void 0;let r=t=class extends I.Disposable{static get(o){return o.getContribution(t.ID)}constructor(o,c,a){super(),this.editor=o,this.model=this._register(new _.ParameterHintsModel(o,a.signatureHelpProvider)),this._register(this.model.onChangedHints(g=>{var h;g?(this.widget.value.show(),this.widget.value.render(g)):(h=this.widget.rawValue)===null||h===void 0||h.hide()})),this.widget=new L.Lazy(()=>this._register(c.createInstance(n.ParameterHintsWidget,this.editor,this.model)))}cancel(){this.model.cancel()}previous(){var o;(o=this.widget.rawValue)===null||o===void 0||o.previous()}next(){var o;(o=this.widget.rawValue)===null||o===void 0||o.next()}trigger(o){this.model.trigger(o,0)}};e.ParameterHintsController=r,r.ID="editor.controller.parameterHints",e.ParameterHintsController=r=t=Ie([ge(1,i.IInstantiationService),ge(2,m.ILanguageFeaturesService)],r);class u extends y.EditorAction{constructor(){super({id:"editor.action.triggerParameterHints",label:C.localize(0,null),alias:"Trigger Parameter Hints",precondition:D.EditorContextKeys.hasSignatureHelpProvider,kbOpts:{kbExpr:D.EditorContextKeys.editorTextFocus,primary:3082,weight:100}})}run(o,c){const a=r.get(c);a?.trigger({triggerKind:S.SignatureHelpTriggerKind.Invoke})}}e.TriggerParameterHintsAction=u,(0,y.registerEditorContribution)(r.ID,r,2),(0,y.registerEditorAction)(u);const f=100+75,d=y.EditorCommand.bindToContribution(r.get);(0,y.registerEditorCommand)(new d({id:"closeParameterHints",precondition:v.Context.Visible,handler:l=>l.cancel(),kbOpts:{weight:f,kbExpr:D.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new d({id:"showPrevParameterHint",precondition:s.ContextKeyExpr.and(v.Context.Visible,v.Context.MultipleSignatures),handler:l=>l.previous(),kbOpts:{weight:f,kbExpr:D.EditorContextKeys.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}})),(0,y.registerEditorCommand)(new d({id:"showNextParameterHint",precondition:s.ContextKeyExpr.and(v.Context.Visible,v.Context.MultipleSignatures),handler:l=>l.next(),kbOpts:{weight:f,kbExpr:D.EditorContextKeys.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}))}),define(te[833],ie([1,0,7,73,41,2,116,8,771,77,27,468]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BannerController=void 0;const s=26;let i=class extends D.Disposable{constructor(r,u){super(),this._editor=r,this.instantiationService=u,this.banner=this._register(this.instantiationService.createInstance(n))}hide(){this._editor.setBanner(null,0),this.banner.clear()}show(r){this.banner.show(Object.assign(Object.assign({},r),{onClose:()=>{var u;this.hide(),(u=r.onClose)===null||u===void 0||u.call(r)}})),this._editor.setBanner(this.banner.element,s)}};e.BannerController=i,e.BannerController=i=Ie([ge(1,m.IInstantiationService)],i);let n=class extends D.Disposable{constructor(r){super(),this.instantiationService=r,this.markdownRenderer=this.instantiationService.createInstance(S.MarkdownRenderer,{}),this.element=(0,L.$)("div.editor-banner"),this.element.tabIndex=0}getAriaLabel(r){if(r.ariaLabel)return r.ariaLabel;if(typeof r.message=="string")return r.message}getBannerMessage(r){if(typeof r=="string"){const u=(0,L.$)("span");return u.innerText=r,u}return this.markdownRenderer.render(r).element}clear(){(0,L.clearNode)(this.element)}show(r){(0,L.clearNode)(this.element);const u=this.getAriaLabel(r);u&&this.element.setAttribute("aria-label",u);const f=(0,L.append)(this.element,(0,L.$)("div.icon-container"));f.setAttribute("aria-hidden","true"),r.icon&&f.appendChild((0,L.$)(`div${C.ThemeIcon.asCSSSelector(r.icon)}`));const d=(0,L.append)(this.element,(0,L.$)("div.message-container"));if(d.setAttribute("aria-hidden","true"),d.appendChild(this.getBannerMessage(r.message)),this.messageActionsContainer=(0,L.append)(this.element,(0,L.$)("div.message-actions-container")),r.actions)for(const o of r.actions)this._register(this.instantiationService.createInstance(_.Link,this.messageActionsContainer,Object.assign(Object.assign({},o),{tabIndex:-1}),{}));const l=(0,L.append)(this.element,(0,L.$)("div.action-container"));this.actionBar=this._register(new I.ActionBar(l)),this.actionBar.push(this._register(new y.Action("banner.close","Close Banner",C.ThemeIcon.asClassName(v.widgetClose),!0,()=>{typeof r.onClose=="function"&&r.onClose()})),{icon:!0,label:!1}),this.actionBar.setFocusable(!1)}};n=Ie([ge(0,m.IInstantiationService)],n)}),define(te[834],ie([1,0,7,6,2,27,77]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnthemedProductIconTheme=e.getIconsStyleSheet=void 0;function m(v){const C=new y.DisposableStore,s=C.add(new I.Emitter),i=(0,S.getIconRegistry)();return C.add(i.onDidChange(()=>s.fire())),v&&C.add(v.onDidProductIconThemeChange(()=>s.fire())),{dispose:()=>C.dispose(),onDidChange:s.event,getCSS(){const n=v?v.getProductIconTheme():new _,t={},r=f=>{const d=n.getIcon(f);if(!d)return;const l=d.font;return l?(t[l.id]=l.definition,`.codicon-${f.id}:before { content: '${d.fontCharacter}'; font-family: ${(0,L.asCSSPropertyValue)(l.id)}; }`):`.codicon-${f.id}:before { content: '${d.fontCharacter}'; }`},u=[];for(const f of i.getIcons()){const d=r(f);d&&u.push(d)}for(const f in t){const d=t[f],l=d.weight?`font-weight: ${d.weight};`:"",o=d.style?`font-style: ${d.style};`:"",c=d.src.map(a=>`${(0,L.asCSSUrl)(a.location)} format('${a.format}')`).join(", ");u.push(`@font-face { src: ${c}; font-family: ${(0,L.asCSSPropertyValue)(f)};${l}${o} font-display: block; }`)}return u.join(` -`)}}}e.getIconsStyleSheet=m;class _{getIcon(C){const s=(0,S.getIconRegistry)();let i=C.defaults;for(;D.ThemeIcon.isThemeIcon(i);){const n=s.getIcon(i.id);if(!n)return;i=n.defaults}return i}}e.UnthemedProductIconTheme=_}),define(te[86],ie([1,0]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isDark=e.isHighContrast=e.ColorScheme=void 0;var L;(function(D){D.DARK="dark",D.LIGHT="light",D.HIGH_CONTRAST_DARK="hcDark",D.HIGH_CONTRAST_LIGHT="hcLight"})(L||(e.ColorScheme=L={}));function I(D){return D===L.HIGH_CONTRAST_DARK||D===L.HIGH_CONTRAST_LIGHT}e.isHighContrast=I;function y(D){return D===L.DARK||D===L.HIGH_CONTRAST_DARK}e.isDark=y}),define(te[249],ie([1,0,51,38,17,482,142,149,114,86,39]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getColumnOfNodeOffset=e.ViewLine=e.ViewLineOptions=void 0;const s=function(){return y.isNative?!0:!(y.isLinux||L.isFirefox||L.isSafari)}();let i=!0;class n{constructor(g,h){this.themeType=h;const p=g.options,b=p.get(50);p.get(38)==="off"?this.renderWhitespace=p.get(98):this.renderWhitespace="none",this.renderControlCharacters=p.get(93),this.spaceWidth=b.spaceWidth,this.middotWidth=b.middotWidth,this.wsmiddotWidth=b.wsmiddotWidth,this.useMonospaceOptimizations=b.isMonospace&&!p.get(33),this.canUseHalfwidthRightwardsArrow=b.canUseHalfwidthRightwardsArrow,this.lineHeight=p.get(66),this.stopRenderingLineAfter=p.get(116),this.fontLigatures=p.get(51)}equals(g){return this.themeType===g.themeType&&this.renderWhitespace===g.renderWhitespace&&this.renderControlCharacters===g.renderControlCharacters&&this.spaceWidth===g.spaceWidth&&this.middotWidth===g.middotWidth&&this.wsmiddotWidth===g.wsmiddotWidth&&this.useMonospaceOptimizations===g.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===g.canUseHalfwidthRightwardsArrow&&this.lineHeight===g.lineHeight&&this.stopRenderingLineAfter===g.stopRenderingLineAfter&&this.fontLigatures===g.fontLigatures}}e.ViewLineOptions=n;class t{constructor(g){this._options=g,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(g){if(this._renderedViewLine)this._renderedViewLine.domNode=(0,I.createFastDomNode)(g);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(g){this._isMaybeInvalid=!0,this._options=g}onSelectionChanged(){return(0,v.isHighContrast)(this._options.themeType)||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(g,h,p,b){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const w=p.getViewLineRenderingData(g),E=this._options,k=m.LineDecoration.filter(w.inlineDecorations,g,w.minColumn,w.maxColumn);let M=null;if((0,v.isHighContrast)(E.themeType)||this._options.renderWhitespace==="selection"){const N=p.selections;for(const A of N){if(A.endLineNumberg)continue;const P=A.startLineNumber===g?A.startColumn:w.minColumn,O=A.endLineNumber===g?A.endColumn:w.maxColumn;P');const B=(0,_.renderViewLine)(R,b);b.appendString("");let T=null;return i&&s&&w.isBasicASCII&&E.useMonospaceOptimizations&&B.containsForeignElements===0&&(T=new r(this._renderedViewLine?this._renderedViewLine.domNode:null,R,B.characterMapping)),T||(T=d(this._renderedViewLine?this._renderedViewLine.domNode:null,R,B.characterMapping,B.containsRTL,B.containsForeignElements)),this._renderedViewLine=T,!0}layoutLine(g,h){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(h),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(g){return this._renderedViewLine?this._renderedViewLine.getWidth(g):0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof r:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof r?this._renderedViewLine.monospaceAssumptionsAreValid():i}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof r&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(g,h,p,b){if(!this._renderedViewLine)return null;h=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,h)),p=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,p));const w=this._renderedViewLine.input.stopRenderingLineAfter;if(w!==-1&&h>w+1&&p>w+1)return new S.VisibleRanges(!0,[new S.FloatHorizontalRange(this.getWidth(b),0)]);w!==-1&&h>w+1&&(h=w+1),w!==-1&&p>w+1&&(p=w+1);const E=this._renderedViewLine.getVisibleRangesForRange(g,h,p,b);return E&&E.length>0?new S.VisibleRanges(!1,E):null}getColumnOfNodeOffset(g,h){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(g,h):1}}e.ViewLine=t,t.CLASS_NAME="view-line";class r{constructor(g,h,p){this._cachedWidth=-1,this.domNode=g,this.input=h;const b=Math.floor(h.lineContent.length/300);if(b>0){this._keyColumnPixelOffsetCache=new Float32Array(b);for(let w=0;w=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),i=!1)}return i}toSlowRenderedLine(){return d(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(g,h,p,b){const w=this._getColumnPixelOffset(g,h,b),E=this._getColumnPixelOffset(g,p,b);return[new S.FloatHorizontalRange(w,E-w)]}_getColumnPixelOffset(g,h,p){if(h<=300){const R=this._characterMapping.getHorizontalOffset(h);return this._charWidth*R}const b=Math.floor((h-1)/300)-1,w=(b+1)*300+1;let E=-1;if(this._keyColumnPixelOffsetCache&&(E=this._keyColumnPixelOffsetCache[b],E===-1&&(E=this._actualReadPixelOffset(g,w,p),this._keyColumnPixelOffsetCache[b]=E)),E===-1){const R=this._characterMapping.getHorizontalOffset(h);return this._charWidth*R}const k=this._characterMapping.getHorizontalOffset(w),M=this._characterMapping.getHorizontalOffset(h);return E+this._charWidth*(M-k)}_getReadingTarget(g){return g.domNode.firstChild}_actualReadPixelOffset(g,h,p){if(!this.domNode)return-1;const b=this._characterMapping.getDomPosition(h),w=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(this.domNode),b.partIndex,b.charIndex,b.partIndex,b.charIndex,p);return!w||w.length===0?-1:w[0].left}getColumnOfNodeOffset(g,h){return c(this._characterMapping,g,h)}}class u{constructor(g,h,p,b,w){if(this.domNode=g,this.input=h,this._characterMapping=p,this._isWhitespaceOnly=/^\s*$/.test(h.lineContent),this._containsForeignElements=w,this._cachedWidth=-1,this._pixelOffsetCache=null,!b||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let E=0,k=this._characterMapping.length;E<=k;E++)this._pixelOffsetCache[E]=-1}}_getReadingTarget(g){return g.domNode.firstChild}getWidth(g){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth,g?.markDidDomLayout()),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(g,h,p,b){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const w=this._readPixelOffset(this.domNode,g,h,b);if(w===-1)return null;const E=this._readPixelOffset(this.domNode,g,p,b);return E===-1?null:[new S.FloatHorizontalRange(w,E-w)]}return this._readVisibleRangesForRange(this.domNode,g,h,p,b)}_readVisibleRangesForRange(g,h,p,b,w){if(p===b){const E=this._readPixelOffset(g,h,p,w);return E===-1?null:[new S.FloatHorizontalRange(E,0)]}else return this._readRawVisibleRangesForRange(g,p,b,w)}_readPixelOffset(g,h,p,b){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth(b);const w=this._getReadingTarget(g);return w.firstChild?(b.markDidDomLayout(),w.firstChild.offsetWidth):0}if(this._pixelOffsetCache!==null){const w=this._pixelOffsetCache[p];if(w!==-1)return w;const E=this._actualReadPixelOffset(g,h,p,b);return this._pixelOffsetCache[p]=E,E}return this._actualReadPixelOffset(g,h,p,b)}_actualReadPixelOffset(g,h,p,b){if(this._characterMapping.length===0){const M=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),0,0,0,0,b);return!M||M.length===0?-1:M[0].left}if(p===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth(b);const w=this._characterMapping.getDomPosition(p),E=D.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),w.partIndex,w.charIndex,w.partIndex,w.charIndex,b);if(!E||E.length===0)return-1;const k=E[0].left;if(this.input.isBasicASCII){const M=this._characterMapping.getHorizontalOffset(p),R=Math.round(this.input.spaceWidth*M);if(Math.abs(R-k)<=1)return R}return k}_readRawVisibleRangesForRange(g,h,p,b){if(h===1&&p===this._characterMapping.length)return[new S.FloatHorizontalRange(0,this.getWidth(b))];const w=this._characterMapping.getDomPosition(h),E=this._characterMapping.getDomPosition(p);return D.RangeUtil.readHorizontalRanges(this._getReadingTarget(g),w.partIndex,w.charIndex,E.partIndex,E.charIndex,b)}getColumnOfNodeOffset(g,h){return c(this._characterMapping,g,h)}}class f extends u{_readVisibleRangesForRange(g,h,p,b,w){const E=super._readVisibleRangesForRange(g,h,p,b,w);if(!E||E.length===0||p===b||p===1&&b===this._characterMapping.length)return E;if(!this.input.containsRTL){const k=this._readPixelOffset(g,h,b,w);if(k!==-1){const M=E[E.length-1];M.left=4&&p[0]===3&&p[3]===7}static isStrictChildOfViewLines(p){return p.length>4&&p[0]===3&&p[3]===7}static isChildOfScrollableElement(p){return p.length>=2&&p[0]===3&&p[1]===5}static isChildOfMinimap(p){return p.length>=2&&p[0]===3&&p[1]===8}static isChildOfContentWidgets(p){return p.length>=4&&p[0]===3&&p[3]===1}static isChildOfOverflowGuard(p){return p.length>=1&&p[0]===3}static isChildOfOverflowingContentWidgets(p){return p.length>=1&&p[0]===2}static isChildOfOverlayWidgets(p){return p.length>=2&&p[0]===3&&p[1]===4}}class u{constructor(p,b,w){this.viewModel=p.viewModel;const E=p.configuration.options;this.layoutInfo=E.get(143),this.viewDomNode=b.viewDomNode,this.lineHeight=E.get(66),this.stickyTabStops=E.get(115),this.typicalHalfwidthCharacterWidth=E.get(50).typicalHalfwidthCharacterWidth,this.lastRenderData=w,this._context=p,this._viewHelper=b}getZoneAtCoord(p){return u.getZoneAtCoord(this._context,p)}static getZoneAtCoord(p,b){const w=p.viewLayout.getWhitespaceAtVerticalOffset(b);if(w){const E=w.verticalOffset+w.height/2,k=p.viewModel.getLineCount();let M=null,R,B=null;return w.afterLineNumber!==k&&(B=new D.Position(w.afterLineNumber+1,1)),w.afterLineNumber>0&&(M=new D.Position(w.afterLineNumber,p.viewModel.getLineMaxColumn(w.afterLineNumber))),B===null?R=M:M===null?R=B:b=p.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,c._getMouseColumn(this.mouseContentHorizontalOffset,p.typicalHalfwidthCharacterWidth))}}class d extends f{constructor(p,b,w,E,k){super(p,b,w,E),this._ctx=p,k?(this.target=k,this.targetPath=I.PartFingerprints.collect(k,p.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} - target: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(p=null){return p&&p.columnM.contentLeft+M.width)continue;const R=p.getVerticalOffsetForLineNumber(M.position.lineNumber);if(R<=k&&k<=R+M.height)return b.fulfillContentText(M.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(p,b){const w=p.getZoneAtCoord(b.mouseVerticalOffset);if(w){const E=b.isInContentArea?8:5;return b.fulfillViewZone(E,w.position,w)}return null}static _hitTestTextArea(p,b){return r.isTextArea(b.targetPath)?p.lastRenderData.lastTextareaPosition?b.fulfillContentText(p.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):b.fulfillTextarea():null}static _hitTestMargin(p,b){if(b.isInMarginArea){const w=p.getFullLineRangeAtCoord(b.mouseVerticalOffset),E=w.range.getStartPosition();let k=Math.abs(b.relativePos.x);const M={isAfterLines:w.isAfterLines,glyphMarginLeft:p.layoutInfo.glyphMarginLeft,glyphMarginWidth:p.layoutInfo.glyphMarginWidth,lineNumbersWidth:p.layoutInfo.lineNumbersWidth,offsetX:k};return k-=p.layoutInfo.glyphMarginLeft,k<=p.layoutInfo.glyphMarginWidth?b.fulfillMargin(2,E,w.range,M):(k-=p.layoutInfo.glyphMarginWidth,k<=p.layoutInfo.lineNumbersWidth?b.fulfillMargin(3,E,w.range,M):(k-=p.layoutInfo.lineNumbersWidth,b.fulfillMargin(4,E,w.range,M)))}return null}static _hitTestViewLines(p,b,w){if(!r.isChildOfViewLines(b.targetPath))return null;if(p.isInTopPadding(b.mouseVerticalOffset))return b.fulfillContentEmpty(new D.Position(1,1),l);if(p.isAfterLines(b.mouseVerticalOffset)||p.isInBottomPadding(b.mouseVerticalOffset)){const k=p.viewModel.getLineCount(),M=p.viewModel.getLineMaxColumn(k);return b.fulfillContentEmpty(new D.Position(k,M),l)}if(w){if(r.isStrictChildOfViewLines(b.targetPath)){const k=p.getLineNumberAtVerticalOffset(b.mouseVerticalOffset);if(p.viewModel.getLineLength(k)===0){const R=p.getLineWidth(k),B=o(b.mouseContentHorizontalOffset-R);return b.fulfillContentEmpty(new D.Position(k,1),B)}const M=p.getLineWidth(k);if(b.mouseContentHorizontalOffset>=M){const R=o(b.mouseContentHorizontalOffset-M),B=new D.Position(k,p.viewModel.getLineMaxColumn(k));return b.fulfillContentEmpty(B,R)}}return b.fulfillUnknown()}const E=c._doHitTest(p,b);return E.type===1?c.createMouseTargetFromHitTestPosition(p,b,E.spanNode,E.position,E.injectedText):this._createMouseTarget(p,b.withTarget(E.hitTarget),!0)}static _hitTestMinimap(p,b){if(r.isChildOfMinimap(b.targetPath)){const w=p.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),E=p.viewModel.getLineMaxColumn(w);return b.fulfillScrollbar(new D.Position(w,E))}return null}static _hitTestScrollbarSlider(p,b){if(r.isChildOfScrollableElement(b.targetPath)&&b.target&&b.target.nodeType===1){const w=b.target.className;if(w&&/\b(slider|scrollbar)\b/.test(w)){const E=p.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),k=p.viewModel.getLineMaxColumn(E);return b.fulfillScrollbar(new D.Position(E,k))}}return null}static _hitTestScrollbar(p,b){if(r.isChildOfScrollableElement(b.targetPath)){const w=p.getLineNumberAtVerticalOffset(b.mouseVerticalOffset),E=p.viewModel.getLineMaxColumn(w);return b.fulfillScrollbar(new D.Position(w,E))}return null}getMouseColumn(p){const b=this._context.configuration.options,w=b.get(143),E=this._context.viewLayout.getCurrentScrollLeft()+p.x-w.contentLeft;return c._getMouseColumn(E,b.get(50).typicalHalfwidthCharacterWidth)}static _getMouseColumn(p,b){return p<0?1:Math.round(p/b)+1}static createMouseTargetFromHitTestPosition(p,b,w,E,k){const M=E.lineNumber,R=E.column,B=p.getLineWidth(M);if(b.mouseContentHorizontalOffset>B){const F=o(b.mouseContentHorizontalOffset-B);return b.fulfillContentEmpty(E,F)}const T=p.visibleRangeForPosition(M,R);if(!T)return b.fulfillUnknown(E);const N=T.left;if(Math.abs(b.mouseContentHorizontalOffset-N)<1)return b.fulfillContentText(E,null,{mightBeForeignElement:!!k,injectedText:k});const A=[];if(A.push({offset:T.left,column:R}),R>1){const F=p.visibleRangeForPosition(M,R-1);F&&A.push({offset:F.left,column:R-1})}const P=p.viewModel.getLineMaxColumn(M);if(RF.offset-G.offset);const O=b.pos.toClientCoordinates(),x=w.getBoundingClientRect(),W=x.left<=O.clientX&&O.clientX<=x.right;let U=null;for(let F=1;Fk)){const R=Math.floor((E+k)/2);let B=b.pos.y+(R-b.mouseVerticalOffset);B<=b.editorPos.y&&(B=b.editorPos.y+1),B>=b.editorPos.y+b.editorPos.height&&(B=b.editorPos.y+b.editorPos.height-1);const T=new L.PageCoordinates(b.pos.x,B),N=this._actualDoHitTestWithCaretRangeFromPoint(p,T.toClientCoordinates());if(N.type===1)return N}return this._actualDoHitTestWithCaretRangeFromPoint(p,b.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(p,b){const w=_.getShadowRoot(p.viewDomNode);let E;if(w?typeof w.caretRangeFromPoint>"u"?E=a(w,b.clientX,b.clientY):E=w.caretRangeFromPoint(b.clientX,b.clientY):E=p.viewDomNode.ownerDocument.caretRangeFromPoint(b.clientX,b.clientY),!E||!E.startContainer)return new C;const k=E.startContainer;if(k.nodeType===k.TEXT_NODE){const M=k.parentNode,R=M?M.parentNode:null,B=R?R.parentNode:null;return(B&&B.nodeType===B.ELEMENT_NODE?B.className:null)===y.ViewLine.CLASS_NAME?i.createFromDOMInfo(p,M,E.startOffset):new C(k.parentNode)}else if(k.nodeType===k.ELEMENT_NODE){const M=k.parentNode,R=M?M.parentNode:null;return(R&&R.nodeType===R.ELEMENT_NODE?R.className:null)===y.ViewLine.CLASS_NAME?i.createFromDOMInfo(p,k,k.textContent.length):new C(k)}return new C}static _doHitTestWithCaretPositionFromPoint(p,b){const w=p.viewDomNode.ownerDocument.caretPositionFromPoint(b.clientX,b.clientY);if(w.offsetNode.nodeType===w.offsetNode.TEXT_NODE){const E=w.offsetNode.parentNode,k=E?E.parentNode:null,M=k?k.parentNode:null;return(M&&M.nodeType===M.ELEMENT_NODE?M.className:null)===y.ViewLine.CLASS_NAME?i.createFromDOMInfo(p,w.offsetNode.parentNode,w.offset):new C(w.offsetNode.parentNode)}if(w.offsetNode.nodeType===w.offsetNode.ELEMENT_NODE){const E=w.offsetNode.parentNode,k=E&&E.nodeType===E.ELEMENT_NODE?E.className:null,M=E?E.parentNode:null,R=M&&M.nodeType===M.ELEMENT_NODE?M.className:null;if(k===y.ViewLine.CLASS_NAME){const B=w.offsetNode.childNodes[Math.min(w.offset,w.offsetNode.childNodes.length-1)];if(B)return i.createFromDOMInfo(p,B,0)}else if(R===y.ViewLine.CLASS_NAME)return i.createFromDOMInfo(p,w.offsetNode,0)}return new C(w.offsetNode)}static _snapToSoftTabBoundary(p,b){const w=b.getLineContent(p.lineNumber),{tabSize:E}=b.model.getOptions(),k=v.AtomicTabMoveOperations.atomicPosition(w,p.column-1,E,2);return k!==-1?new D.Position(p.lineNumber,k+1):p}static _doHitTest(p,b){let w=new C;if(typeof p.viewDomNode.ownerDocument.caretRangeFromPoint=="function"?w=this._doHitTestWithCaretRangeFromPoint(p,b):p.viewDomNode.ownerDocument.caretPositionFromPoint&&(w=this._doHitTestWithCaretPositionFromPoint(p,b.pos.toClientCoordinates())),w.type===1){const E=p.viewModel.getInjectedTextAt(w.position),k=p.viewModel.normalizePosition(w.position,2);(E||!k.equals(w.position))&&(w=new s(k,w.spanNode,E))}return w}}e.MouseTargetFactory=c;function a(h,p,b){const w=document.createRange();let E=h.elementFromPoint(p,b);if(E!==null){for(;E&&E.firstChild&&E.firstChild.nodeType!==E.firstChild.TEXT_NODE&&E.lastChild&&E.lastChild.firstChild;)E=E.lastChild;const k=E.getBoundingClientRect(),M=window.getComputedStyle(E,null).getPropertyValue("font-style"),R=window.getComputedStyle(E,null).getPropertyValue("font-variant"),B=window.getComputedStyle(E,null).getPropertyValue("font-weight"),T=window.getComputedStyle(E,null).getPropertyValue("font-size"),N=window.getComputedStyle(E,null).getPropertyValue("line-height"),A=window.getComputedStyle(E,null).getPropertyValue("font-family"),P=`${M} ${R} ${B} ${T}/${N} ${A}`,O=E.innerText;let x=k.left,W=0,U;if(p>k.left+k.width)W=O.length;else{const F=g.getInstance();for(let G=0;Gthis._createMouseTarget(h,p),h=>this._getMouseColumn(h))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(143).height;const a=new m.EditorMouseEventFactory(this.viewHelper.viewDomNode);this._register(a.onContextMenu(this.viewHelper.viewDomNode,h=>this._onContextMenu(h,!0))),this._register(a.onMouseMove(this.viewHelper.viewDomNode,h=>{this._onMouseMove(h),this._mouseLeaveMonitor||(this._mouseLeaveMonitor=L.addDisposableListener(this.viewHelper.viewDomNode.ownerDocument,"mousemove",p=>{this.viewHelper.viewDomNode.contains(p.target)||this._onMouseLeave(new m.EditorMouseEvent(p,!1,this.viewHelper.viewDomNode))}))})),this._register(a.onMouseUp(this.viewHelper.viewDomNode,h=>this._onMouseUp(h))),this._register(a.onMouseLeave(this.viewHelper.viewDomNode,h=>this._onMouseLeave(h)));let g=0;this._register(a.onPointerDown(this.viewHelper.viewDomNode,(h,p)=>{g=p})),this._register(L.addDisposableListener(this.viewHelper.viewDomNode,L.EventType.POINTER_UP,h=>{this._mouseDownOperation.onPointerUp()})),this._register(a.onMouseDown(this.viewHelper.viewDomNode,h=>this._onMouseDown(h,g))),this._setupMouseWheelZoomListener(),this._context.addEventHandler(this)}_setupMouseWheelZoomListener(){const l=i.MouseWheelClassifier.INSTANCE;let o=0,c=_.EditorZoom.getZoomLevel(),a=!1,g=0;const h=b=>{if(this.viewController.emitMouseWheel(b),!this._context.configuration.options.get(75))return;const w=new I.StandardWheelEvent(b);if(l.acceptStandardWheelEvent(w),l.isPhysicalMouseWheel()){if(p(b)){const E=_.EditorZoom.getZoomLevel(),k=w.deltaY>0?1:-1;_.EditorZoom.setZoomLevel(E+k),w.preventDefault(),w.stopPropagation()}}else Date.now()-o>50&&(c=_.EditorZoom.getZoomLevel(),a=p(b),g=0),o=Date.now(),g+=w.deltaY,a&&(_.EditorZoom.setZoomLevel(c+g/5),w.preventDefault(),w.stopPropagation())};this._register(L.addDisposableListener(this.viewHelper.viewDomNode,L.EventType.MOUSE_WHEEL,h,{capture:!0,passive:!1}));function p(b){return D.isMacintosh?(b.metaKey||b.ctrlKey)&&!b.shiftKey&&!b.altKey:b.ctrlKey&&!b.metaKey&&!b.shiftKey&&!b.altKey}}dispose(){this._context.removeEventHandler(this),this._mouseLeaveMonitor&&(this._mouseLeaveMonitor.dispose(),this._mouseLeaveMonitor=null),super.dispose()}onConfigurationChanged(l){if(l.hasChanged(143)){const o=this._context.configuration.options.get(143).height;this._height!==o&&(this._height=o,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(l){return this._mouseDownOperation.onCursorStateChanged(l),!1}onFocusChanged(l){return!1}getTargetAtClientPoint(l,o){const a=new m.ClientCoordinates(l,o).toPageCoordinates(),g=(0,m.createEditorPagePosition)(this.viewHelper.viewDomNode);if(a.yg.y+g.height||a.xg.x+g.width)return null;const h=(0,m.createCoordinatesRelativeToEditor)(this.viewHelper.viewDomNode,g,a);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),g,a,h,null)}_createMouseTarget(l,o){let c=l.target;if(!this.viewHelper.viewDomNode.contains(c)){const a=L.getShadowRoot(this.viewHelper.viewDomNode);a&&(c=a.elementsFromPoint(l.posx,l.posy).find(g=>this.viewHelper.viewDomNode.contains(g)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),l.editorPos,l.pos,l.relativePos,o?c:null)}_getMouseColumn(l){return this.mouseTargetFactory.getMouseColumn(l.relativePos)}_onContextMenu(l,o){this.viewController.emitContextMenu({event:l,target:this._createMouseTarget(l,o)})}_onMouseMove(l){this.mouseTargetFactory.mouseTargetIsWidget(l)||l.preventDefault(),!(this._mouseDownOperation.isActive()||l.timestamp{l.preventDefault(),this.viewHelper.focusTextArea()};if(E&&(a||h&&p))k(),this._mouseDownOperation.start(c.type,l,o);else if(g)l.preventDefault();else if(b){const M=c.detail;E&&this.viewHelper.shouldSuppressMouseDownOnViewZone(M.viewZoneId)&&(k(),this._mouseDownOperation.start(c.type,l,o),l.preventDefault())}else w&&this.viewHelper.shouldSuppressMouseDownOnWidget(c.detail)&&(k(),l.preventDefault());this.viewController.emitMouseDown({event:l,target:c})}}e.MouseHandler=n;class t extends y.Disposable{constructor(l,o,c,a,g,h){super(),this._context=l,this._viewController=o,this._viewHelper=c,this._mouseTargetFactory=a,this._createMouseTarget=g,this._getMouseColumn=h,this._mouseMoveMonitor=this._register(new m.GlobalEditorPointerMoveMonitor(this._viewHelper.viewDomNode)),this._topBottomDragScrolling=this._register(new r(this._context,this._viewHelper,this._mouseTargetFactory,(p,b,w)=>this._dispatchMouse(p,b,w))),this._mouseState=new f,this._currentSelection=new C.Selection(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(l){this._lastMouseEvent=l,this._mouseState.setModifiers(l);const o=this._findMousePosition(l,!1);o&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:l,target:o}):o.type===13&&(o.outsidePosition==="above"||o.outsidePosition==="below")?this._topBottomDragScrolling.start(o,l):(this._topBottomDragScrolling.stop(),this._dispatchMouse(o,!0,1)))}start(l,o,c){this._lastMouseEvent=o,this._mouseState.setStartedOnLineNumbers(l===3),this._mouseState.setStartButtons(o),this._mouseState.setModifiers(o);const a=this._findMousePosition(o,!0);if(!a||!a.position)return;this._mouseState.trySetCount(o.detail,a.position),o.detail=this._mouseState.count;const g=this._context.configuration.options;if(!g.get(90)&&g.get(35)&&!g.get(22)&&!this._mouseState.altKey&&o.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&a.type===6&&a.position&&this._currentSelection.containsPosition(a.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,c,o.buttons,h=>this._onMouseDownThenMove(h),h=>{const p=this._findMousePosition(this._lastMouseEvent,!1);h&&h instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:p?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(a,o.shiftKey,1),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(this._viewHelper.viewLinesDomNode,c,o.buttons,h=>this._onMouseDownThenMove(h),()=>this._stop()))}_stop(){this._isActive=!1,this._topBottomDragScrolling.stop()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onPointerUp(){this._mouseMoveMonitor.stopMonitoring()}onCursorStateChanged(l){this._currentSelection=l.selections[0]}_getPositionOutsideEditor(l){const o=l.editorPos,c=this._context.viewModel,a=this._context.viewLayout,g=this._getMouseColumn(l);if(l.posyo.y+o.height){const p=l.posy-o.y-o.height,b=a.getCurrentScrollTop()+l.relativePos.y,w=S.HitTestContext.getZoneAtCoord(this._context,b);if(w){const k=this._helpPositionJumpOverViewZone(w);if(k)return S.MouseTarget.createOutsideEditor(g,k,"below",p)}const E=a.getLineNumberAtVerticalOffset(b);return S.MouseTarget.createOutsideEditor(g,new v.Position(E,c.getLineMaxColumn(E)),"below",p)}const h=a.getLineNumberAtVerticalOffset(a.getCurrentScrollTop()+l.relativePos.y);if(l.posxo.x+o.width){const p=l.posx-o.x-o.width;return S.MouseTarget.createOutsideEditor(g,new v.Position(h,c.getLineMaxColumn(h)),"right",p)}return null}_findMousePosition(l,o){const c=this._getPositionOutsideEditor(l);if(c)return c;const a=this._createMouseTarget(l,o);if(!a.position)return null;if(a.type===8||a.type===5){const h=this._helpPositionJumpOverViewZone(a.detail);if(h)return S.MouseTarget.createViewZone(a.type,a.element,a.mouseColumn,h,a.detail)}return a}_helpPositionJumpOverViewZone(l){const o=new v.Position(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),c=l.positionBefore,a=l.positionAfter;return c&&a?c.isBefore(o)?c:a:null}_dispatchMouse(l,o,c){l.position&&this._viewController.dispatchMouse({position:l.position,mouseColumn:l.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,revealType:c,inSelectionMode:o,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,onInjectedText:l.type===6&&l.detail.injectedText!==null})}}class r extends y.Disposable{constructor(l,o,c,a){super(),this._context=l,this._viewHelper=o,this._mouseTargetFactory=c,this._dispatchMouse=a,this._operation=null}dispose(){super.dispose(),this.stop()}start(l,o){this._operation?this._operation.setPosition(l,o):this._operation=new u(this._context,this._viewHelper,this._mouseTargetFactory,this._dispatchMouse,l,o)}stop(){this._operation&&(this._operation.dispose(),this._operation=null)}}class u extends y.Disposable{constructor(l,o,c,a,g,h){super(),this._context=l,this._viewHelper=o,this._mouseTargetFactory=c,this._dispatchMouse=a,this._position=g,this._mouseEvent=h,this._lastTime=Date.now(),this._animationFrameDisposable=L.scheduleAtNextAnimationFrame(()=>this._execute())}dispose(){this._animationFrameDisposable.dispose()}setPosition(l,o){this._position=l,this._mouseEvent=o}_tick(){const l=Date.now(),o=l-this._lastTime;return this._lastTime=l,o}_getScrollSpeed(){const l=this._context.configuration.options.get(66),o=this._context.configuration.options.get(143).height/l,c=this._position.outsideDistance/l;return c<=1.5?Math.max(30,o*(1+c)):c<=3?Math.max(60,o*(2+c)):Math.max(200,o*(7+c))}_execute(){const l=this._context.configuration.options.get(66),o=this._getScrollSpeed(),c=this._tick(),a=o*(c/1e3)*l,g=this._position.outsidePosition==="above"?-a:a;this._context.viewModel.viewLayout.deltaScrollNow(0,g),this._viewHelper.renderNow();const h=this._context.viewLayout.getLinesViewportData(),p=this._position.outsidePosition==="above"?h.startLineNumber:h.endLineNumber;let b;{const w=(0,m.createEditorPagePosition)(this._viewHelper.viewDomNode),E=this._context.configuration.options.get(143).horizontalScrollbarHeight,k=new m.PageCoordinates(this._mouseEvent.pos.x,w.y+w.height-E-.1),M=(0,m.createCoordinatesRelativeToEditor)(this._viewHelper.viewDomNode,w,k);b=this._mouseTargetFactory.createMouseTarget(this._viewHelper.getLastRenderData(),w,k,M,null)}(!b.position||b.position.lineNumber!==p)&&(this._position.outsidePosition==="above"?b=S.MouseTarget.createOutsideEditor(this._position.mouseColumn,new v.Position(p,1),"above",this._position.outsideDistance):b=S.MouseTarget.createOutsideEditor(this._position.mouseColumn,new v.Position(p,this._context.viewModel.getLineMaxColumn(p)),"below",this._position.outsideDistance)),this._dispatchMouse(b,!0,2),this._animationFrameDisposable=L.scheduleAtNextAnimationFrame(()=>this._execute())}}class f{get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}constructor(){this._altKey=!1,this._ctrlKey=!1,this._metaKey=!1,this._shiftKey=!1,this._leftButton=!1,this._middleButton=!1,this._startedOnLineNumbers=!1,this._lastMouseDownPosition=null,this._lastMouseDownPositionEqualCount=0,this._lastMouseDownCount=0,this._lastSetMouseDownCountTime=0,this.isDragAndDrop=!1}get count(){return this._lastMouseDownCount}setModifiers(l){this._altKey=l.altKey,this._ctrlKey=l.ctrlKey,this._metaKey=l.metaKey,this._shiftKey=l.shiftKey}setStartButtons(l){this._leftButton=l.leftButton,this._middleButton=l.middleButton}setStartedOnLineNumbers(l){this._startedOnLineNumbers=l}trySetCount(l,o){const c=new Date().getTime();c-this._lastSetMouseDownCountTime>f.CLEAR_MOUSE_DOWN_COUNT_TIME&&(l=1),this._lastSetMouseDownCountTime=c,l>this._lastMouseDownCount+1&&(l=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(o)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=o,this._lastMouseDownCount=Math.min(l,this._lastMouseDownPositionEqualCount)}}f.CLEAR_MOUSE_DOWN_COUNT_TIME=400}),define(te[836],ie([1,0,7,17,61,2,835,159,217,183]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PointerHandler=e.PointerEventHandler=void 0;class C extends S.MouseHandler{constructor(t,r,u){super(t,r,u),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,d=>this.onTap(d))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,d=>this.onChange(d))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,d=>this._onContextMenu(new m.EditorMouseEvent(d,!1,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,"pointerdown",d=>{const l=d.pointerType;if(l==="mouse"){this._lastPointerType="mouse";return}else l==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const f=new m.EditorPointerEventFactory(this.viewHelper.viewDomNode);this._register(f.onPointerMove(this.viewHelper.viewDomNode,d=>this._onMouseMove(d))),this._register(f.onPointerUp(this.viewHelper.viewDomNode,d=>this._onMouseUp(d))),this._register(f.onPointerLeave(this.viewHelper.viewDomNode,d=>this._onMouseLeave(d))),this._register(f.onPointerDown(this.viewHelper.viewDomNode,(d,l)=>this._onMouseDown(d,l)))}onTap(t){if(!t.initialTarget||!this.viewHelper.linesContentDomNode.contains(t.initialTarget))return;t.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new m.EditorMouseEvent(t,!1,this.viewHelper.viewDomNode),!1);r.position&&this.viewController.dispatchMouse({position:r.position,mouseColumn:r.position.column,startedOnLineNumbers:!1,revealType:1,mouseDownCount:t.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:r.type===6&&r.detail.injectedText!==null})}onChange(t){this._lastPointerType==="touch"&&this._context.viewModel.viewLayout.deltaScrollNow(-t.translationX,-t.translationY)}_onMouseDown(t,r){t.browserEvent.pointerType!=="touch"&&super._onMouseDown(t,r)}}e.PointerEventHandler=C;class s extends S.MouseHandler{constructor(t,r,u){super(t,r,u),this._register(y.Gesture.addTarget(this.viewHelper.linesContentDomNode)),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Tap,f=>this.onTap(f))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Change,f=>this.onChange(f))),this._register(L.addDisposableListener(this.viewHelper.linesContentDomNode,y.EventType.Contextmenu,f=>this._onContextMenu(new m.EditorMouseEvent(f,!1,this.viewHelper.viewDomNode),!1)))}onTap(t){t.preventDefault(),this.viewHelper.focusTextArea();const r=this._createMouseTarget(new m.EditorMouseEvent(t,!1,this.viewHelper.viewDomNode),!1);if(r.position){const u=document.createEvent("CustomEvent");u.initEvent(v.TextAreaSyntethicEvents.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(u),this.viewController.moveTo(r.position,1)}}onChange(t){this._context.viewModel.viewLayout.deltaScrollNow(-t.translationX,-t.translationY)}}class i extends D.Disposable{constructor(t,r,u){super(),I.isIOS&&_.BrowserFeatures.pointerEvents?this.handler=this._register(new C(t,r,u)):window.TouchEvent?this.handler=this._register(new s(t,r,u)):this.handler=this._register(new S.MouseHandler(t,r,u))}getTargetAtClientPoint(t,r){return this.handler.getTargetAtClientPoint(t,r)}}e.PointerHandler=i}),define(te[837],ie([1,0,198,14,17,70,142,229,53,481,249,12,5,426]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewLines=void 0;class n{constructor(){this._currentVisibleRange=new i.Range(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(d){this._currentVisibleRange=d}}class t{constructor(d,l,o,c,a,g,h){this.minimalReveal=d,this.lineNumber=l,this.startColumn=o,this.endColumn=c,this.startScrollTop=a,this.stopScrollTop=g,this.scrollType=h,this.type="range",this.minLineNumber=l,this.maxLineNumber=l}}class r{constructor(d,l,o,c,a){this.minimalReveal=d,this.selections=l,this.startScrollTop=o,this.stopScrollTop=c,this.scrollType=a,this.type="selections";let g=l[0].startLineNumber,h=l[0].endLineNumber;for(let p=1,b=l.length;p{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new I.RunOnceScheduler(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new n,this._horizontalRevealRequest=null,this._stickyScrollEnabled=c.get(114).enabled,this._maxNumberStickyLines=c.get(114).maxLineCount}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new C.ViewLine(this._viewLineOptions)}onConfigurationChanged(d){this._visibleLines.onConfigurationChanged(d),d.hasChanged(144)&&(this._maxLineWidth=0);const l=this._context.configuration.options,o=l.get(50),c=l.get(144);return this._lineHeight=l.get(66),this._typicalHalfwidthCharacterWidth=o.typicalHalfwidthCharacterWidth,this._isViewportWrapping=c.isViewportWrapping,this._revealHorizontalRightPadding=l.get(99),this._cursorSurroundingLines=l.get(29),this._cursorSurroundingLinesStyle=l.get(30),this._canUseLayerHinting=!l.get(32),this._stickyScrollEnabled=l.get(114).enabled,this._maxNumberStickyLines=l.get(114).maxLineCount,(0,D.applyFontInfo)(this.domNode,o),this._onOptionsMaybeChanged(),d.hasChanged(143)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const d=this._context.configuration,l=new C.ViewLineOptions(d,this._context.theme.type);if(!this._viewLineOptions.equals(l)){this._viewLineOptions=l;const o=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let a=o;a<=c;a++)this._visibleLines.getVisibleLine(a).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(d){const l=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();let c=!1;for(let a=l;a<=o;a++)c=this._visibleLines.getVisibleLine(a).onSelectionChanged()||c;return c}onDecorationsChanged(d){{const l=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();for(let c=l;c<=o;c++)this._visibleLines.getVisibleLine(c).onDecorationsChanged()}return!0}onFlushed(d){const l=this._visibleLines.onFlushed(d);return this._maxLineWidth=0,l}onLinesChanged(d){return this._visibleLines.onLinesChanged(d)}onLinesDeleted(d){return this._visibleLines.onLinesDeleted(d)}onLinesInserted(d){return this._visibleLines.onLinesInserted(d)}onRevealRangeRequest(d){const l=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),d.source,d.minimalReveal,d.range,d.selections,d.verticalType);if(l===-1)return!1;let o=this._context.viewLayout.validateScrollPosition({scrollTop:l});d.revealHorizontal?d.range&&d.range.startLineNumber!==d.range.endLineNumber?o={scrollTop:o.scrollTop,scrollLeft:0}:d.range?this._horizontalRevealRequest=new t(d.minimalReveal,d.range.startLineNumber,d.range.startColumn,d.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),o.scrollTop,d.scrollType):d.selections&&d.selections.length>0&&(this._horizontalRevealRequest=new r(d.minimalReveal,d.selections,this._context.viewLayout.getCurrentScrollTop(),o.scrollTop,d.scrollType)):this._horizontalRevealRequest=null;const a=Math.abs(this._context.viewLayout.getCurrentScrollTop()-o.scrollTop)<=this._lineHeight?1:d.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(o,a),!0}onScrollChanged(d){if(this._horizontalRevealRequest&&d.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&d.scrollTopChanged){const l=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),o=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(d.scrollTopo)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(d.scrollWidth),this._visibleLines.onScrollChanged(d)||!0}onTokensChanged(d){return this._visibleLines.onTokensChanged(d)}onZonesChanged(d){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(d)}onThemeChanged(d){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(d,l){const o=this._getViewLineDomNode(d);if(o===null)return null;const c=this._getLineNumberFor(o);if(c===-1||c<1||c>this._context.viewModel.getLineCount())return null;if(this._context.viewModel.getLineMaxColumn(c)===1)return new s.Position(c,1);const a=this._visibleLines.getStartLineNumber(),g=this._visibleLines.getEndLineNumber();if(cg)return null;let h=this._visibleLines.getVisibleLine(c).getColumnOfNodeOffset(d,l);const p=this._context.viewModel.getLineMinColumn(c);return ho)return-1;const c=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),a=this._visibleLines.getVisibleLine(d).getWidth(c);return this._updateLineWidthsSlowIfDomDidLayout(c),a}linesVisibleRangesForRange(d,l){if(this.shouldRender())return null;const o=d.endLineNumber,c=i.Range.intersectRanges(d,this._lastRenderedData.getCurrentVisibleRange());if(!c)return null;const a=[];let g=0;const h=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot);let p=0;l&&(p=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(c.startLineNumber,1)).lineNumber);const b=this._visibleLines.getStartLineNumber(),w=this._visibleLines.getEndLineNumber();for(let E=c.startLineNumber;E<=c.endLineNumber;E++){if(Ew)continue;const k=E===c.startLineNumber?c.startColumn:1,M=E!==c.endLineNumber,R=M?this._context.viewModel.getLineMaxColumn(E):c.endColumn,B=this._visibleLines.getVisibleLine(E).getVisibleRangesForRange(E,k,R,h);if(B){if(l&&Ethis._visibleLines.getEndLineNumber())return null;const c=new v.DomReadingContext(this.domNode.domNode,this._textRangeRestingSpot),a=this._visibleLines.getVisibleLine(d).getVisibleRangesForRange(d,l,o,c);return this._updateLineWidthsSlowIfDomDidLayout(c),a}visibleRangeForPosition(d){const l=this._visibleRangesForLineRange(d.lineNumber,d.column,d.column);return l?new S.HorizontalPosition(l.outsideRenderedLine,l.ranges[0].left):null}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidthsSlowIfDomDidLayout(d){d.didDomLayout&&(this._asyncUpdateLineWidths.isScheduled()||(this._asyncUpdateLineWidths.cancel(),this._updateLineWidthsSlow()))}_updateLineWidths(d){const l=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();let c=1,a=!0;for(let g=l;g<=o;g++){const h=this._visibleLines.getVisibleLine(g);if(d&&!h.getWidthIsFast()){a=!1;continue}c=Math.max(c,h.getWidth(null))}return a&&l===1&&o===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(c),a}_checkMonospaceFontAssumptions(){let d=-1,l=-1;const o=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let a=o;a<=c;a++){const g=this._visibleLines.getVisibleLine(a);if(g.needsMonospaceFontCheck()){const h=g.getWidth(null);h>l&&(l=h,d=a)}}if(d!==-1&&!this._visibleLines.getVisibleLine(d).monospaceAssumptionsAreValid())for(let a=o;a<=c;a++)this._visibleLines.getVisibleLine(a).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(d){if(this._visibleLines.renderLines(d),this._lastRenderedData.setCurrentVisibleRange(d.visibleRange),this.domNode.setWidth(this._context.viewLayout.getScrollWidth()),this.domNode.setHeight(Math.min(this._context.viewLayout.getScrollHeight(),1e6)),this._horizontalRevealRequest){const o=this._horizontalRevealRequest;if(d.startLineNumber<=o.minLineNumber&&o.maxLineNumber<=d.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const c=this._computeScrollLeftToReveal(o);c&&(this._isViewportWrapping||this._ensureMaxLineWidth(c.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:c.scrollLeft},o.scrollType))}}if(this._updateLineWidthsFast()?this._asyncUpdateLineWidths.cancel():this._asyncUpdateLineWidths.schedule(),y.isLinux&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const o=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let a=o;a<=c;a++)if(this._visibleLines.getVisibleLine(a).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const l=this._context.viewLayout.getCurrentScrollTop()-d.bigNumbersDelta;this._linesContent.setTop(-l),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(d){const l=Math.ceil(d);this._maxLineWidth0){let N=a[0].startLineNumber,A=a[0].endLineNumber;for(let P=1,O=a.length;Pp){if(!w)return-1;T=E}else if(g===5||g===6)if(g===6&&h<=E&&k<=b)T=h;else{const N=Math.max(5*this._lineHeight,p*.2),A=E-N,P=k-p;T=Math.max(P,A)}else if(g===1||g===2)if(g===2&&h<=E&&k<=b)T=h;else{const N=(E+k)/2;T=Math.max(0,N-p/2)}else T=this._computeMinimumScrolling(h,b,E,k,g===3,g===4);return T}_computeScrollLeftToReveal(d){const l=this._context.viewLayout.getCurrentViewport(),o=this._context.configuration.options.get(143),c=l.left,a=c+l.width-o.verticalScrollbarWidth;let g=1073741824,h=0;if(d.type==="range"){const b=this._visibleRangesForLineRange(d.lineNumber,d.startColumn,d.endColumn);if(!b)return null;for(const w of b.ranges)g=Math.min(g,Math.round(w.left)),h=Math.max(h,Math.round(w.left+w.width))}else for(const b of d.selections){if(b.startLineNumber!==b.endLineNumber)return null;const w=this._visibleRangesForLineRange(b.startLineNumber,b.startColumn,b.endColumn);if(!w)return null;for(const E of w.ranges)g=Math.min(g,Math.round(E.left)),h=Math.max(h,Math.round(E.left+E.width))}return d.minimalReveal||(g=Math.max(0,g-u.HORIZONTAL_EXTRA_PX),h+=this._revealHorizontalRightPadding),d.type==="selections"&&h-g>l.width?null:{scrollLeft:this._computeMinimumScrolling(c,a,g,h),maxHorizontalOffset:h}}_computeMinimumScrolling(d,l,o,c,a,g){d=d|0,l=l|0,o=o|0,c=c|0,a=!!a,g=!!g;const h=l-d;if(c-ol)return Math.max(0,c-h)}else return o;return d}}e.ViewLines=u,u.HORIZONTAL_EXTRA_PX=30}),define(te[359],ie([1,0,7,44,73,226,222,13,14,388,105,9,6,119,2,17,10,735,343,97,21,86,172]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputList=e.QuickInputListFocus=void 0;const a=L.$;class g{constructor(T,N,A,P,O,x,W){var U,F,G;this._checked=!1,this._hidden=!1,this.hasCheckbox=P,this.index=A,this.fireButtonTriggered=O,this.fireSeparatorButtonTriggered=x,this._onChecked=W,this.onChecked=P?i.Event.map(i.Event.filter(this._onChecked.event,Y=>Y.listElement===this),Y=>Y.checked):i.Event.None,T.type==="separator"?this._separator=T:(this.item=T,N&&N.type==="separator"&&!N.buttons&&(this._separator=N),this.saneDescription=this.item.description,this.saneDetail=this.item.detail,this._labelHighlights=(U=this.item.highlights)===null||U===void 0?void 0:U.label,this._descriptionHighlights=(F=this.item.highlights)===null||F===void 0?void 0:F.description,this._detailHighlights=(G=this.item.highlights)===null||G===void 0?void 0:G.detail,this.saneTooltip=this.item.tooltip),this._init=new l.Lazy(()=>{var Y;const ne=(Y=T.label)!==null&&Y!==void 0?Y:"",se=(0,n.parseLabelWithIcons)(ne).text.trim(),J=T.ariaLabel||[ne,this.saneDescription,this.saneDetail].map(q=>(0,n.getCodiconAriaLabel)(q)).filter(q=>!!q).join(", ");return{saneLabel:ne,saneSortLabel:se,saneAriaLabel:J}})}get saneLabel(){return this._init.value.saneLabel}get saneSortLabel(){return this._init.value.saneSortLabel}get saneAriaLabel(){return this._init.value.saneAriaLabel}get element(){return this._element}set element(T){this._element=T}get hidden(){return this._hidden}set hidden(T){this._hidden=T}get checked(){return this._checked}set checked(T){T!==this._checked&&(this._checked=T,this._onChecked.fire({listElement:this,checked:T}))}get separator(){return this._separator}set separator(T){this._separator=T}get labelHighlights(){return this._labelHighlights}set labelHighlights(T){this._labelHighlights=T}get descriptionHighlights(){return this._descriptionHighlights}set descriptionHighlights(T){this._descriptionHighlights=T}get detailHighlights(){return this._detailHighlights}set detailHighlights(T){this._detailHighlights=T}}class h{constructor(T){this.themeService=T}get templateId(){return h.ID}renderTemplate(T){const N=Object.create(null);N.toDisposeElement=[],N.toDisposeTemplate=[],N.entry=L.append(T,a(".quick-input-list-entry"));const A=L.append(N.entry,a("label.quick-input-list-label"));N.toDisposeTemplate.push(L.addStandardDisposableListener(A,L.EventType.CLICK,F=>{N.checkbox.offsetParent||F.preventDefault()})),N.checkbox=L.append(A,a("input.quick-input-list-checkbox")),N.checkbox.type="checkbox",N.toDisposeTemplate.push(L.addStandardDisposableListener(N.checkbox,L.EventType.CHANGE,F=>{N.element.checked=N.checkbox.checked}));const P=L.append(A,a(".quick-input-list-rows")),O=L.append(P,a(".quick-input-list-row")),x=L.append(P,a(".quick-input-list-row"));N.label=new D.IconLabel(O,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0}),N.toDisposeTemplate.push(N.label),N.icon=L.prepend(N.label.element,a(".quick-input-list-icon"));const W=L.append(O,a(".quick-input-list-entry-keybinding"));N.keybinding=new S.KeybindingLabel(W,r.OS);const U=L.append(x,a(".quick-input-list-label-meta"));return N.detail=new D.IconLabel(U,{supportHighlights:!0,supportIcons:!0}),N.toDisposeTemplate.push(N.detail),N.separator=L.append(N.entry,a(".quick-input-list-separator")),N.actionBar=new y.ActionBar(N.entry),N.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),N.toDisposeTemplate.push(N.actionBar),N}renderElement(T,N,A){var P,O,x,W;A.element=T,T.element=(P=A.entry)!==null&&P!==void 0?P:void 0;const U=T.item?T.item:T.separator;A.checkbox.checked=T.checked,A.toDisposeElement.push(T.onChecked(J=>A.checkbox.checked=J));const{labelHighlights:F,descriptionHighlights:G,detailHighlights:Y}=T;if(!((O=T.item)===null||O===void 0)&&O.iconPath){const J=(0,c.isDark)(this.themeService.getColorTheme().type)?T.item.iconPath.dark:(x=T.item.iconPath.light)!==null&&x!==void 0?x:T.item.iconPath.dark,q=o.URI.revive(J);A.icon.className="quick-input-list-icon",A.icon.style.backgroundImage=L.asCSSUrl(q)}else A.icon.style.backgroundImage="",A.icon.className=!((W=T.item)===null||W===void 0)&&W.iconClass?`quick-input-list-icon ${T.item.iconClass}`:"";const ne={matches:F||[],descriptionTitle:T.saneDescription,descriptionMatches:G||[],labelEscapeNewLines:!0};U.type!=="separator"?(ne.extraClasses=U.iconClasses,ne.italic=U.italic,ne.strikethrough=U.strikethrough,A.entry.classList.remove("quick-input-list-separator-as-item")):A.entry.classList.add("quick-input-list-separator-as-item"),A.label.setLabel(T.saneLabel,T.saneDescription,ne),A.keybinding.set(U.type==="separator"?void 0:U.keybinding),T.saneDetail?(A.detail.element.style.display="",A.detail.setLabel(T.saneDetail,void 0,{matches:Y,title:T.saneDetail,labelEscapeNewLines:!0})):A.detail.element.style.display="none",T.item&&T.separator&&T.separator.label?(A.separator.textContent=T.separator.label,A.separator.style.display=""):A.separator.style.display="none",A.entry.classList.toggle("quick-input-list-separator-border",!!T.separator);const se=U.buttons;se&&se.length?(A.actionBar.push(se.map((J,q)=>{let H=J.iconClass||(J.iconPath?(0,d.getIconClass)(J.iconPath):void 0);return J.alwaysVisible&&(H=H?`${H} always-visible`:"always-visible"),{id:`id-${q}`,class:H,enabled:!0,label:"",tooltip:J.tooltip||"",run:()=>{U.type!=="separator"?T.fireButtonTriggered({button:J,item:U}):T.fireSeparatorButtonTriggered({button:J,separator:U})}}}),{icon:!0,label:!1}),A.entry.classList.add("has-actions")):A.entry.classList.remove("has-actions")}disposeElement(T,N,A){A.toDisposeElement=(0,t.dispose)(A.toDisposeElement),A.actionBar.clear()}disposeTemplate(T){T.toDisposeElement=(0,t.dispose)(T.toDisposeElement),T.toDisposeTemplate=(0,t.dispose)(T.toDisposeTemplate)}}h.ID="listelement";class p{getHeight(T){return T.item?T.saneDetail?44:22:24}getTemplateId(T){return h.ID}}var b;(function(B){B[B.First=1]="First",B[B.Second=2]="Second",B[B.Last=3]="Last",B[B.Next=4]="Next",B[B.Previous=5]="Previous",B[B.NextPage=6]="NextPage",B[B.PreviousPage=7]="PreviousPage"})(b||(e.QuickInputListFocus=b={}));class w{constructor(T,N,A,P){this.parent=T,this.options=A,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnLabelMode="fuzzy",this.sortByLabel=!0,this._onChangedAllVisibleChecked=new i.Emitter,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new i.Emitter,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new i.Emitter,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new i.Emitter,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new i.Emitter,this.onButtonTriggered=this._onButtonTriggered.event,this._onSeparatorButtonTriggered=new i.Emitter,this.onSeparatorButtonTriggered=this._onSeparatorButtonTriggered.event,this._onKeyDown=new i.Emitter,this.onKeyDown=this._onKeyDown.event,this._onLeave=new i.Emitter,this.onLeave=this._onLeave.event,this._listElementChecked=new i.Emitter,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=N,this.container=L.append(this.parent,a(".quick-input-list"));const O=new p,x=new R;if(this.list=A.createList("QuickInput",this.container,O,[new h(P)],{identityProvider:{getId:W=>{var U,F,G,Y,ne,se,J,q;return(q=(se=(Y=(F=(U=W.item)===null||U===void 0?void 0:U.id)!==null&&F!==void 0?F:(G=W.item)===null||G===void 0?void 0:G.label)!==null&&Y!==void 0?Y:(ne=W.separator)===null||ne===void 0?void 0:ne.id)!==null&&se!==void 0?se:(J=W.separator)===null||J===void 0?void 0:J.label)!==null&&q!==void 0?q:""}},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:x}),this.list.getHTMLElement().id=N,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(W=>{const U=new I.StandardKeyboardEvent(W);switch(U.keyCode){case 10:this.toggleCheckbox();break;case 31:(r.isMacintosh?W.metaKey:W.ctrlKey)&&this.list.setFocus((0,m.range)(this.list.length));break;case 16:{const F=this.list.getFocus();F.length===1&&F[0]===0&&this._onLeave.fire();break}case 18:{const F=this.list.getFocus();F.length===1&&F[0]===this.list.length-1&&this._onLeave.fire();break}}this._onKeyDown.fire(U)})),this.disposables.push(this.list.onMouseDown(W=>{W.browserEvent.button!==2&&W.browserEvent.preventDefault()})),this.disposables.push(L.addDisposableListener(this.container,L.EventType.CLICK,W=>{(W.x||W.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(W=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(W=>{typeof W.index=="number"&&(W.browserEvent.preventDefault(),this.list.setSelection([W.index]))})),A.hoverDelegate){const W=new _.ThrottledDelayer(A.hoverDelegate.delay);this.disposables.push(this.list.onMouseOver(U=>be(this,void 0,void 0,function*(){var F;if(U.browserEvent.target instanceof HTMLAnchorElement){W.cancel();return}if(!(!(U.browserEvent.relatedTarget instanceof HTMLAnchorElement)&&L.isAncestor(U.browserEvent.relatedTarget,(F=U.element)===null||F===void 0?void 0:F.element)))try{yield W.trigger(()=>be(this,void 0,void 0,function*(){U.element&&this.showHover(U.element)}))}catch(G){if(!(0,s.isCancellationError)(G))throw G}}))),this.disposables.push(this.list.onMouseOut(U=>{var F;L.isAncestor(U.browserEvent.relatedTarget,(F=U.element)===null||F===void 0?void 0:F.element)||W.cancel()})),this.disposables.push(W)}this.disposables.push(this._listElementChecked.event(W=>this.fireCheckedEvents())),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onSeparatorButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return i.Event.map(this.list.onDidChangeFocus,T=>T.elements.map(N=>N.item))}get onDidChangeSelection(){return i.Event.map(this.list.onDidChangeSelection,T=>({items:T.elements.map(N=>N.item),event:T.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(T){this.list.scrollTop=T}get ariaLabel(){return this.list.getHTMLElement().ariaLabel}set ariaLabel(T){this.list.getHTMLElement().ariaLabel=T}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(T,N=!0){for(let A=0,P=T.length;A{N.hidden||(N.checked=T)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(T){this.elementDisposables=(0,t.dispose)(this.elementDisposables);const N=x=>this.fireButtonTriggered(x),A=x=>this.fireSeparatorButtonTriggered(x);this.inputElements=T;const P=new Map,O=this.parent.classList.contains("show-checkboxes");this.elements=T.reduce((x,W,U)=>{var F;const G=U>0?T[U-1]:void 0;if(W.type==="separator"&&!W.buttons)return x;const Y=new g(W,G,U,O,N,A,this._listElementChecked),ne=x.length;return x.push(Y),P.set((F=Y.item)!==null&&F!==void 0?F:Y.separator,ne),x},[]),this.elementsToIndexes=P,this.list.splice(0,this.list.length),this.list.splice(0,this.list.length,this.elements),this._onChangedVisibleCount.fire(this.elements.length)}getFocusedElements(){return this.list.getFocusedElements().map(T=>T.item)}setFocusedElements(T){if(this.list.setFocus(T.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N))),T.length>0){const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(T){this.list.setSelection(T.filter(N=>this.elementsToIndexes.has(N)).map(N=>this.elementsToIndexes.get(N)))}getCheckedElements(){return this.elements.filter(T=>T.checked).map(T=>T.item).filter(T=>!!T)}setCheckedElements(T){try{this._fireCheckedEvents=!1;const N=new Set;for(const A of T)N.add(A);for(const A of this.elements)A.checked=N.has(A.item)}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}set enabled(T){this.list.getHTMLElement().style.pointerEvents=T?"":"none"}focus(T){if(!this.list.length)return;switch(T===b.Second&&this.list.length<2&&(T=b.First),T){case b.First:this.list.scrollTop=0,this.list.focusFirst(void 0,A=>!!A.item);break;case b.Second:this.list.scrollTop=0,this.list.focusNth(1,void 0,A=>!!A.item);break;case b.Last:this.list.scrollTop=this.list.scrollHeight,this.list.focusLast(void 0,A=>!!A.item);break;case b.Next:{this.list.focusNext(void 0,!0,void 0,P=>!!P.item);const A=this.list.getFocus()[0];A!==0&&!this.elements[A-1].item&&this.list.firstVisibleIndex>A-1&&this.list.reveal(A-1);break}case b.Previous:{this.list.focusPrevious(void 0,!0,void 0,P=>!!P.item);const A=this.list.getFocus()[0];A!==0&&!this.elements[A-1].item&&this.list.firstVisibleIndex>A-1&&this.list.reveal(A-1);break}case b.NextPage:this.list.focusNextPage(void 0,A=>!!A.item);break;case b.PreviousPage:this.list.focusPreviousPage(void 0,A=>!!A.item);break}const N=this.list.getFocus()[0];typeof N=="number"&&this.list.reveal(N)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}showHover(T){var N,A,P;this.options.hoverDelegate!==void 0&&(this._lastHover&&!this._lastHover.isDisposed&&((A=(N=this.options.hoverDelegate).onDidHideHover)===null||A===void 0||A.call(N),(P=this._lastHover)===null||P===void 0||P.dispose()),!(!T.element||!T.saneTooltip)&&(this._lastHover=this.options.hoverDelegate.showHover({content:T.saneTooltip,target:T.element,linkHandler:O=>{this.options.linkOpenerDelegate(O)},showPointer:!0,container:this.container,hoverPosition:1},!1)))}layout(T){this.list.getHTMLElement().style.maxHeight=T?`${Math.floor(T/44)*44+6}px`:"",this.list.layout()}filter(T){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;const N=T;if(T=T.trim(),!T||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(P=>{P.labelHighlights=void 0,P.descriptionHighlights=void 0,P.detailHighlights=void 0,P.hidden=!1;const O=P.index&&this.inputElements[P.index-1];P.item&&(P.separator=O&&O.type==="separator"&&!O.buttons?O:void 0)});else{let P;this.elements.forEach(O=>{var x,W,U,F;let G;this.matchOnLabelMode==="fuzzy"?G=this.matchOnLabel&&(x=(0,n.matchesFuzzyIconAware)(T,(0,n.parseLabelWithIcons)(O.saneLabel)))!==null&&x!==void 0?x:void 0:G=this.matchOnLabel&&(W=E(N,(0,n.parseLabelWithIcons)(O.saneLabel)))!==null&&W!==void 0?W:void 0;const Y=this.matchOnDescription&&(U=(0,n.matchesFuzzyIconAware)(T,(0,n.parseLabelWithIcons)(O.saneDescription||"")))!==null&&U!==void 0?U:void 0,ne=this.matchOnDetail&&(F=(0,n.matchesFuzzyIconAware)(T,(0,n.parseLabelWithIcons)(O.saneDetail||"")))!==null&&F!==void 0?F:void 0;if(G||Y||ne?(O.labelHighlights=G,O.descriptionHighlights=Y,O.detailHighlights=ne,O.hidden=!1):(O.labelHighlights=void 0,O.descriptionHighlights=void 0,O.detailHighlights=void 0,O.hidden=O.item?!O.item.alwaysShow:!0),O.item?O.separator=void 0:O.separator&&(O.hidden=!0),!this.sortByLabel){const se=O.index&&this.inputElements[O.index-1];P=se&&se.type==="separator"?se:P,P&&!O.hidden&&(O.separator=P,P=void 0)}})}const A=this.elements.filter(P=>!P.hidden);if(this.sortByLabel&&T){const P=T.toLowerCase();A.sort((O,x)=>M(O,x,P))}return this.elementsToIndexes=A.reduce((P,O,x)=>{var W;return P.set((W=O.item)!==null&&W!==void 0?W:O.separator,x),P},new Map),this.list.splice(0,this.list.length,A),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(A.length),!0}toggleCheckbox(){try{this._fireCheckedEvents=!1;const T=this.list.getFocusedElements(),N=this.allVisibleChecked(T);for(const A of T)A.checked=!N}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}display(T){this.container.style.display=T?"":"none"}isDisplayed(){return this.container.style.display!=="none"}dispose(){this.elementDisposables=(0,t.dispose)(this.elementDisposables),this.disposables=(0,t.dispose)(this.disposables)}fireCheckedEvents(){this._fireCheckedEvents&&(this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedCheckedCount.fire(this.getCheckedCount()),this._onChangedCheckedElements.fire(this.getCheckedElements()))}fireButtonTriggered(T){this._onButtonTriggered.fire(T)}fireSeparatorButtonTriggered(T){this._onSeparatorButtonTriggered.fire(T)}style(T){this.list.style(T)}toggleHover(){const T=this.list.getFocusedElements()[0];if(!T?.saneTooltip)return;if(this._lastHover&&!this._lastHover.isDisposed){this._lastHover.dispose();return}const N=this.list.getFocusedElements()[0];if(!N)return;this.showHover(N);const A=new t.DisposableStore;A.add(this.list.onDidChangeFocus(P=>{P.indexes.length&&this.showHover(P.elements[0])})),this._lastHover&&A.add(this._lastHover),this._toggleHover=A,this.elementDisposables.push(this._toggleHover)}}e.QuickInputList=w,Ie([C.memoize],w.prototype,"onDidChangeFocus",null),Ie([C.memoize],w.prototype,"onDidChangeSelection",null);function E(B,T){const{text:N,iconOffsets:A}=T;if(!A||A.length===0)return k(B,N);const P=(0,u.ltrim)(N," "),O=N.length-P.length,x=k(B,P);if(x)for(const W of x){const U=A[W.start+O]+O;W.start+=U,W.end+=U}return x}function k(B,T){const N=T.toLowerCase().indexOf(B.toLowerCase());return N!==-1?[{start:N,end:N+B.length}]:null}function M(B,T,N){const A=B.labelHighlights||[],P=T.labelHighlights||[];return A.length&&!P.length?-1:!A.length&&P.length?1:A.length===0&&P.length===0?0:(0,v.compareAnything)(B.saneSortLabel,T.saneSortLabel,N)}class R{getWidgetAriaLabel(){return(0,f.localize)(0,null)}getAriaLabel(T){var N;return!((N=T.separator)===null||N===void 0)&&N.label?`${T.saneAriaLabel}, ${T.separator.label}`:T.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(T){return T.hasCheckbox?"checkbox":"option"}isChecked(T){if(T.hasCheckbox)return{value:T.checked,onDidChange:T.onChecked}}}}),define(te[838],ie([1,0,7,44,153,41,13,14,26,6,2,17,98,27,733,67,359,343,172]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InputBox=e.QuickPick=e.backButton=void 0,e.backButton={iconClass:n.ThemeIcon.asClassName(_.Codicon.quickInputBack),tooltip:(0,t.localize)(0,null),handle:-1};class d extends C.Disposable{constructor(a){super(),this.ui=a,this._widgetUpdated=!1,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.buttonsUpdated=!1,this._toggles=[],this.togglesUpdated=!1,this.noValidationMessage=d.noPromptMessage,this._severity=i.default.Ignore,this.onDidTriggerButtonEmitter=this._register(new v.Emitter),this.onDidHideEmitter=this._register(new v.Emitter),this.onDisposeEmitter=this._register(new v.Emitter),this.visibleDisposables=this._register(new C.DisposableStore),this.onDidHide=this.onDidHideEmitter.event}get title(){return this._title}set title(a){this._title=a,this.update()}get description(){return this._description}set description(a){this._description=a,this.update()}get step(){return this._steps}set step(a){this._steps=a,this.update()}get totalSteps(){return this._totalSteps}set totalSteps(a){this._totalSteps=a,this.update()}get enabled(){return this._enabled}set enabled(a){this._enabled=a,this.update()}get contextKey(){return this._contextKey}set contextKey(a){this._contextKey=a,this.update()}get busy(){return this._busy}set busy(a){this._busy=a,this.update()}get ignoreFocusOut(){return this._ignoreFocusOut}set ignoreFocusOut(a){const g=this._ignoreFocusOut!==a&&!s.isIOS;this._ignoreFocusOut=a&&!s.isIOS,g&&this.update()}get buttons(){return this._buttons}set buttons(a){this._buttons=a,this.buttonsUpdated=!0,this.update()}get toggles(){return this._toggles}set toggles(a){this._toggles=a??[],this.togglesUpdated=!0,this.update()}get validationMessage(){return this._validationMessage}set validationMessage(a){this._validationMessage=a,this.update()}get severity(){return this._severity}set severity(a){this._severity=a,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.onDidTriggerButton(a=>{this.buttons.indexOf(a)!==-1&&this.onDidTriggerButtonEmitter.fire(a)})),this.ui.show(this),this.visible=!0,this._lastValidationMessage=void 0,this._lastSeverity=void 0,this.buttons.length&&(this.buttonsUpdated=!0),this.toggles.length&&(this.togglesUpdated=!0),this.update())}hide(){this.visible&&this.ui.hide()}didHide(a=r.QuickInputHideReason.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:a})}update(){var a,g;if(!this.visible)return;const h=this.getTitle();h&&this.ui.title.textContent!==h?this.ui.title.textContent=h:!h&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const p=this.getDescription();if(this.ui.description1.textContent!==p&&(this.ui.description1.textContent=p),this.ui.description2.textContent!==p&&(this.ui.description2.textContent=p),this._widgetUpdated&&(this._widgetUpdated=!1,this._widget?L.reset(this.ui.widget,this._widget):L.reset(this.ui.widget)),this.busy&&!this.busyDelay&&(this.busyDelay=new m.TimeoutTimer,this.busyDelay.setIfNotSet(()=>{this.visible&&this.ui.progressBar.infinite()},800)),!this.busy&&this.busyDelay&&(this.ui.progressBar.stop(),this.busyDelay.cancel(),this.busyDelay=void 0),this.buttonsUpdated){this.buttonsUpdated=!1,this.ui.leftActionBar.clear();const w=this.buttons.filter(k=>k===e.backButton);this.ui.leftActionBar.push(w.map((k,M)=>{const R=new D.Action(`id-${M}`,"",k.iconClass||(0,f.getIconClass)(k.iconPath),!0,()=>be(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(k)}));return R.tooltip=k.tooltip||"",R}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const E=this.buttons.filter(k=>k!==e.backButton);this.ui.rightActionBar.push(E.map((k,M)=>{const R=new D.Action(`id-${M}`,"",k.iconClass||(0,f.getIconClass)(k.iconPath),!0,()=>be(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(k)}));return R.tooltip=k.tooltip||"",R}),{icon:!0,label:!1})}if(this.togglesUpdated){this.togglesUpdated=!1;const w=(g=(a=this.toggles)===null||a===void 0?void 0:a.filter(E=>E instanceof y.Toggle))!==null&&g!==void 0?g:[];this.ui.inputBox.toggles=w}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const b=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==b&&(this._lastValidationMessage=b,L.reset(this.ui.message),(0,f.renderQuickInputDescription)(b,this.ui.message,{callback:w=>{this.ui.linkOpenerDelegate(w)},disposables:this.visibleDisposables})),this._lastSeverity!==this.severity&&(this._lastSeverity=this.severity,this.showMessageDecoration(this.severity))}getTitle(){return this.title&&this.step?`${this.title} (${this.getSteps()})`:this.title?this.title:this.step?this.getSteps():""}getDescription(){return this.description||""}getSteps(){return this.step&&this.totalSteps?(0,t.localize)(2,null,this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(a){if(this.ui.inputBox.showDecoration(a),a!==i.default.Ignore){const g=this.ui.inputBox.stylesForType(a);this.ui.message.style.color=g.foreground?`${g.foreground}`:"",this.ui.message.style.backgroundColor=g.background?`${g.background}`:"",this.ui.message.style.border=g.border?`1px solid ${g.border}`:"",this.ui.message.style.marginBottom="-2px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.marginBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}d.noPromptMessage=(0,t.localize)(1,null);class l extends d{constructor(){super(...arguments),this._value="",this.onDidChangeValueEmitter=this._register(new v.Emitter),this.onWillAcceptEmitter=this._register(new v.Emitter),this.onDidAcceptEmitter=this._register(new v.Emitter),this.onDidCustomEmitter=this._register(new v.Emitter),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._matchOnLabelMode="fuzzy",this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=r.ItemActivation.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new v.Emitter),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new v.Emitter),this.onDidTriggerItemButtonEmitter=this._register(new v.Emitter),this.onDidTriggerSeparatorButtonEmitter=this._register(new v.Emitter),this.valueSelectionUpdated=!0,this._ok="default",this._customButton=!1,this.filterValue=a=>a,this.onDidChangeValue=this.onDidChangeValueEmitter.event,this.onWillAccept=this.onWillAcceptEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event,this.onDidChangeActive=this.onDidChangeActiveEmitter.event,this.onDidChangeSelection=this.onDidChangeSelectionEmitter.event,this.onDidTriggerItemButton=this.onDidTriggerItemButtonEmitter.event,this.onDidTriggerSeparatorButton=this.onDidTriggerSeparatorButtonEmitter.event}get quickNavigate(){return this._quickNavigate}set quickNavigate(a){this._quickNavigate=a,this.update()}get value(){return this._value}set value(a){this.doSetValue(a)}doSetValue(a,g){this._value!==a&&(this._value=a,g||this.update(),this.visible&&this.ui.list.filter(this.filterValue(this._value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(this._value))}set ariaLabel(a){this._ariaLabel=a,this.update()}get ariaLabel(){return this._ariaLabel}get placeholder(){return this._placeholder}set placeholder(a){this._placeholder=a,this.update()}get items(){return this._items}get scrollTop(){return this.ui.list.scrollTop}set scrollTop(a){this.ui.list.scrollTop=a}set items(a){this._items=a,this.itemsUpdated=!0,this.update()}get canSelectMany(){return this._canSelectMany}set canSelectMany(a){this._canSelectMany=a,this.update()}get canAcceptInBackground(){return this._canAcceptInBackground}set canAcceptInBackground(a){this._canAcceptInBackground=a}get matchOnDescription(){return this._matchOnDescription}set matchOnDescription(a){this._matchOnDescription=a,this.update()}get matchOnDetail(){return this._matchOnDetail}set matchOnDetail(a){this._matchOnDetail=a,this.update()}get matchOnLabel(){return this._matchOnLabel}set matchOnLabel(a){this._matchOnLabel=a,this.update()}get matchOnLabelMode(){return this._matchOnLabelMode}set matchOnLabelMode(a){this._matchOnLabelMode=a,this.update()}get sortByLabel(){return this._sortByLabel}set sortByLabel(a){this._sortByLabel=a,this.update()}get autoFocusOnList(){return this._autoFocusOnList}set autoFocusOnList(a){this._autoFocusOnList=a,this.update()}get keepScrollPosition(){return this._keepScrollPosition}set keepScrollPosition(a){this._keepScrollPosition=a}get itemActivation(){return this._itemActivation}set itemActivation(a){this._itemActivation=a}get activeItems(){return this._activeItems}set activeItems(a){this._activeItems=a,this.activeItemsUpdated=!0,this.update()}get selectedItems(){return this._selectedItems}set selectedItems(a){this._selectedItems=a,this.selectedItemsUpdated=!0,this.update()}get keyMods(){return this._quickNavigate?r.NO_KEY_MODS:this.ui.keyMods}set valueSelection(a){this._valueSelection=a,this.valueSelectionUpdated=!0,this.update()}get customButton(){return this._customButton}set customButton(a){this._customButton=a,this.update()}get customLabel(){return this._customButtonLabel}set customLabel(a){this._customButtonLabel=a,this.update()}get customHover(){return this._customButtonHover}set customHover(a){this._customButtonHover=a,this.update()}get ok(){return this._ok}set ok(a){this._ok=a,this.update()}get hideInput(){return!!this._hideInput}set hideInput(a){this._hideInput=a,this.update()}trySelectFirst(){this.autoFocusOnList&&(this.canSelectMany||this.ui.list.focus(u.QuickInputListFocus.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(a=>{this.doSetValue(a,!0)})),this.visibleDisposables.add(this.ui.inputBox.onMouseDown(a=>{this.autoFocusOnList||this.ui.list.clearFocus()})),this.visibleDisposables.add((this._hideInput?this.ui.list:this.ui.inputBox).onKeyDown(a=>{switch(a.keyCode){case 18:this.ui.list.focus(u.QuickInputListFocus.Next),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(a,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(u.QuickInputListFocus.Previous):this.ui.list.focus(u.QuickInputListFocus.Last),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(a,!0);break;case 12:this.ui.list.focus(u.QuickInputListFocus.NextPage),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(a,!0);break;case 11:this.ui.list.focus(u.QuickInputListFocus.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),L.EventHelper.stop(a,!0);break;case 17:if(!this._canAcceptInBackground||!this.ui.inputBox.isSelectionAtEnd())return;this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!0));break;case 14:(a.ctrlKey||a.metaKey)&&!a.shiftKey&&!a.altKey&&(this.ui.list.focus(u.QuickInputListFocus.First),L.EventHelper.stop(a,!0));break;case 13:(a.ctrlKey||a.metaKey)&&!a.shiftKey&&!a.altKey&&(this.ui.list.focus(u.QuickInputListFocus.Last),L.EventHelper.stop(a,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{this.canSelectMany?this.ui.list.getCheckedElements().length||(this._selectedItems=[],this.onDidChangeSelectionEmitter.fire(this.selectedItems)):this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems)),this.handleAccept(!1)})),this.visibleDisposables.add(this.ui.onDidCustom(()=>{this.onDidCustomEmitter.fire()})),this.visibleDisposables.add(this.ui.list.onDidChangeFocus(a=>{this.activeItemsUpdated||this.activeItemsToConfirm!==this._activeItems&&(0,S.equals)(a,this._activeItems,(g,h)=>g===h)||(this._activeItems=a,this.onDidChangeActiveEmitter.fire(a))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:a,event:g})=>{if(this.canSelectMany){a.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&(0,S.equals)(a,this._selectedItems,(h,p)=>h===p)||(this._selectedItems=a,this.onDidChangeSelectionEmitter.fire(a),a.length&&this.handleAccept(g instanceof MouseEvent&&g.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(a=>{this.canSelectMany&&(this.selectedItemsToConfirm!==this._selectedItems&&(0,S.equals)(a,this._selectedItems,(g,h)=>g===h)||(this._selectedItems=a,this.onDidChangeSelectionEmitter.fire(a)))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(a=>this.onDidTriggerItemButtonEmitter.fire(a))),this.visibleDisposables.add(this.ui.list.onSeparatorButtonTriggered(a=>this.onDidTriggerSeparatorButtonEmitter.fire(a))),this.visibleDisposables.add(this.registerQuickNavigation()),this.valueSelectionUpdated=!0),super.show()}handleAccept(a){let g=!1;this.onWillAcceptEmitter.fire({veto:()=>g=!0}),g||this.onDidAcceptEmitter.fire({inBackground:a})}registerQuickNavigation(){return L.addDisposableListener(this.ui.container,L.EventType.KEY_UP,a=>{if(this.canSelectMany||!this._quickNavigate)return;const g=new I.StandardKeyboardEvent(a),h=g.keyCode;this._quickNavigate.keybindings.some(w=>{const E=w.getChords();return E.length>1?!1:E[0].shiftKey&&h===4?!(g.ctrlKey||g.altKey||g.metaKey):!!(E[0].altKey&&h===6||E[0].ctrlKey&&h===5||E[0].metaKey&&h===57)})&&(this.activeItems[0]&&(this._selectedItems=[this.activeItems[0]],this.onDidChangeSelectionEmitter.fire(this.selectedItems),this.handleAccept(!1)),this._quickNavigate=void 0)})}update(){if(!this.visible)return;const a=this.keepScrollPosition?this.scrollTop:0,g=!!this.description,h={title:!!this.title||!!this.step||!!this.buttons.length,description:g,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!this._hideInput,progressBar:!this._hideInput||g,visibleCount:!0,count:this.canSelectMany&&!this._hideCountBadge,ok:this.ok==="default"?this.canSelectMany:this.ok,list:!0,message:!!this.validationMessage,customButton:this.customButton};this.ui.setVisibilities(h),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||"");let p=this.ariaLabel;if(!p&&h.inputBox&&(p=this.placeholder||l.DEFAULT_ARIA_LABEL,this.title&&(p+=` - ${this.title}`)),this.ui.list.ariaLabel!==p&&(this.ui.list.ariaLabel=p??null),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,this.ui.list.matchOnLabelMode=this.matchOnLabelMode,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 r.ItemActivation.NONE:this._itemActivation=r.ItemActivation.FIRST;break;case r.ItemActivation.SECOND:this.ui.list.focus(u.QuickInputListFocus.Second),this._itemActivation=r.ItemActivation.FIRST;break;case r.ItemActivation.LAST:this.ui.list.focus(u.QuickInputListFocus.Last),this._itemActivation=r.ItemActivation.FIRST;break;default:this.trySelectFirst();break}this.ui.container.classList.contains("show-checkboxes")!==!!this.canSelectMany&&(this.canSelectMany?this.ui.list.clearFocus():this.trySelectFirst()),this.activeItemsUpdated&&(this.activeItemsUpdated=!1,this.activeItemsToConfirm=this._activeItems,this.ui.list.setFocusedElements(this.activeItems),this.activeItemsToConfirm===this._activeItems&&(this.activeItemsToConfirm=null)),this.selectedItemsUpdated&&(this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=this._selectedItems,this.canSelectMany?this.ui.list.setCheckedElements(this.selectedItems):this.ui.list.setSelectedElements(this.selectedItems),this.selectedItemsToConfirm===this._selectedItems&&(this.selectedItemsToConfirm=null)),this.ui.customButton.label=this.customLabel||"",this.ui.customButton.element.title=this.customHover||"",h.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(u.QuickInputListFocus.First)),this.keepScrollPosition&&(this.scrollTop=a)}}e.QuickPick=l,l.DEFAULT_ARIA_LABEL=(0,t.localize)(3,null);class o extends d{constructor(){super(...arguments),this._value="",this.valueSelectionUpdated=!0,this._password=!1,this.onDidValueChangeEmitter=this._register(new v.Emitter),this.onDidAcceptEmitter=this._register(new v.Emitter),this.onDidChangeValue=this.onDidValueChangeEmitter.event,this.onDidAccept=this.onDidAcceptEmitter.event}get value(){return this._value}set value(a){this._value=a||"",this.update()}get placeholder(){return this._placeholder}set placeholder(a){this._placeholder=a,this.update()}get password(){return this._password}set password(a){this._password=a,this.update()}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(a=>{a!==this.value&&(this._value=a,this.onDidValueChangeEmitter.fire(a))})),this.visibleDisposables.add(this.ui.onDidAccept(()=>this.onDidAcceptEmitter.fire())),this.valueSelectionUpdated=!0),super.show()}update(){if(!this.visible)return;this.ui.container.classList.remove("hidden-input");const a={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description||!!this.step,inputBox:!0,message:!0,progressBar:!0};this.ui.setVisibilities(a),super.update(),this.ui.inputBox.value!==this.value&&(this.ui.inputBox.value=this.value),this.valueSelectionUpdated&&(this.valueSelectionUpdated=!1,this.ui.inputBox.select(this._valueSelection&&{start:this._valueSelection[0],end:this._valueSelection[1]})),this.ui.inputBox.placeholder!==(this.placeholder||"")&&(this.ui.inputBox.placeholder=this.placeholder||""),this.ui.inputBox.password!==this.password&&(this.ui.inputBox.password=this.password)}}e.InputBox=o}),define(te[839],ie([1,0,7,73,318,312,577,19,6,2,98,734,67,773,359,838]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputController=void 0;const u=L.$;class f extends v.Disposable{constructor(l,o){super(),this.options=l,this.themeService=o,this.enabled=!0,this.onDidAcceptEmitter=this._register(new _.Emitter),this.onDidCustomEmitter=this._register(new _.Emitter),this.onDidTriggerButtonEmitter=this._register(new _.Emitter),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new _.Emitter),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new _.Emitter),this.onHide=this.onHideEmitter.event,this.idPrefix=l.idPrefix,this.parentElement=l.container,this.styles=l.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const l=o=>{this.keyMods.ctrlCmd=o.ctrlKey||o.metaKey,this.keyMods.alt=o.altKey};this._register(L.addDisposableListener(window,L.EventType.KEY_DOWN,l,!0)),this._register(L.addDisposableListener(window,L.EventType.KEY_UP,l,!0)),this._register(L.addDisposableListener(window,L.EventType.MOUSE_DOWN,l,!0))}getUI(){if(this.ui)return this.ui;const l=L.append(this.parentElement,u(".quick-input-widget.show-file-icons"));l.tabIndex=-1,l.style.display="none";const o=L.createStyleSheet(l),c=L.append(l,u(".quick-input-titlebar")),a=this.options.hoverDelegate?{hoverDelegate:this.options.hoverDelegate}:void 0,g=this._register(new I.ActionBar(c,a));g.domNode.classList.add("quick-input-left-action-bar");const h=L.append(c,u(".quick-input-title")),p=this._register(new I.ActionBar(c,a));p.domNode.classList.add("quick-input-right-action-bar");const b=L.append(l,u(".quick-input-header")),w=L.append(b,u("input.quick-input-check-all"));w.type="checkbox",w.setAttribute("aria-label",(0,s.localize)(0,null)),this._register(L.addStandardDisposableListener(w,L.EventType.CHANGE,q=>{const H=w.checked;se.setAllVisibleChecked(H)})),this._register(L.addDisposableListener(w,L.EventType.CLICK,q=>{(q.x||q.y)&&R.setFocus()}));const E=L.append(b,u(".quick-input-description")),k=L.append(b,u(".quick-input-and-message")),M=L.append(k,u(".quick-input-filter")),R=this._register(new n.QuickInputBox(M,this.styles.inputBox,this.styles.toggle));R.setAttribute("aria-describedby",`${this.idPrefix}message`);const B=L.append(M,u(".quick-input-visible-count"));B.setAttribute("aria-live","polite"),B.setAttribute("aria-atomic","true");const T=new D.CountBadge(B,{countFormat:(0,s.localize)(1,null)},this.styles.countBadge),N=L.append(M,u(".quick-input-count"));N.setAttribute("aria-live","polite");const A=new D.CountBadge(N,{countFormat:(0,s.localize)(2,null)},this.styles.countBadge),P=L.append(b,u(".quick-input-action")),O=this._register(new y.Button(P,this.styles.button));O.label=(0,s.localize)(3,null),this._register(O.onDidClick(q=>{this.onDidAcceptEmitter.fire()}));const x=L.append(b,u(".quick-input-action")),W=this._register(new y.Button(x,this.styles.button));W.label=(0,s.localize)(4,null),this._register(W.onDidClick(q=>{this.onDidCustomEmitter.fire()}));const U=L.append(k,u(`#${this.idPrefix}message.quick-input-message`)),F=this._register(new S.ProgressBar(l,this.styles.progressBar));F.getContainer().classList.add("quick-input-progress");const G=L.append(l,u(".quick-input-html-widget"));G.tabIndex=-1;const Y=L.append(l,u(".quick-input-description")),ne=this.idPrefix+"list",se=this._register(new t.QuickInputList(l,ne,this.options,this.themeService));R.setAttribute("aria-controls",ne),this._register(se.onDidChangeFocus(()=>{var q;R.setAttribute("aria-activedescendant",(q=se.getActiveDescendant())!==null&&q!==void 0?q:"")})),this._register(se.onChangedAllVisibleChecked(q=>{w.checked=q})),this._register(se.onChangedVisibleCount(q=>{T.setCount(q)})),this._register(se.onChangedCheckedCount(q=>{A.setCount(q)})),this._register(se.onLeave(()=>{setTimeout(()=>{R.setFocus(),this.controller instanceof r.QuickPick&&this.controller.canSelectMany&&se.clearFocus()},0)}));const J=L.trackFocus(l);return this._register(J),this._register(L.addDisposableListener(l,L.EventType.FOCUS,q=>{L.isAncestor(q.relatedTarget,l)||(this.previousFocusElement=q.relatedTarget instanceof HTMLElement?q.relatedTarget:void 0)},!0)),this._register(J.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(i.QuickInputHideReason.Blur),this.previousFocusElement=void 0})),this._register(L.addDisposableListener(l,L.EventType.FOCUS,q=>{R.setFocus()})),this._register(L.addStandardDisposableListener(l,L.EventType.KEY_DOWN,q=>{if(!L.isAncestor(q.target,G))switch(q.keyCode){case 3:L.EventHelper.stop(q,!0),this.enabled&&this.onDidAcceptEmitter.fire();break;case 9:L.EventHelper.stop(q,!0),this.hide(i.QuickInputHideReason.Gesture);break;case 2:if(!q.altKey&&!q.ctrlKey&&!q.metaKey){const H=[".quick-input-list .monaco-action-bar .always-visible",".quick-input-list-entry:hover .monaco-action-bar",".monaco-list-row.focused .monaco-action-bar"];if(l.classList.contains("show-checkboxes")?H.push("input"):H.push("input[type=text]"),this.getUI().list.isDisplayed()&&H.push(".monaco-list"),this.getUI().message&&H.push(".quick-input-message a"),this.getUI().widget){if(L.isAncestor(q.target,this.getUI().widget))break;H.push(".quick-input-html-widget")}const V=l.querySelectorAll(H.join(", "));q.shiftKey&&q.target===V[0]?(L.EventHelper.stop(q,!0),se.clearFocus()):!q.shiftKey&&L.isAncestor(q.target,V[V.length-1])&&(L.EventHelper.stop(q,!0),V[0].focus())}break;case 10:q.ctrlKey&&(L.EventHelper.stop(q,!0),this.getUI().list.toggleHover());break}})),this.ui={container:l,styleSheet:o,leftActionBar:g,titleBar:c,title:h,description1:Y,description2:E,widget:G,rightActionBar:p,checkAll:w,inputContainer:k,filterContainer:M,inputBox:R,visibleCountContainer:B,visibleCount:T,countContainer:N,count:A,okContainer:P,ok:O,message:U,customButtonContainer:x,customButton:W,list:se,progressBar:F,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,show:q=>this.show(q),hide:()=>this.hide(),setVisibilities:q=>this.setVisibilities(q),setEnabled:q=>this.setEnabled(q),setContextKey:q=>this.options.setContextKey(q),linkOpenerDelegate:q=>this.options.linkOpenerDelegate(q)},this.updateStyles(),this.ui}pick(l,o={},c=m.CancellationToken.None){return new Promise((a,g)=>{let h=E=>{var k;h=a,(k=o.onKeyMods)===null||k===void 0||k.call(o,p.keyMods),a(E)};if(c.isCancellationRequested){h(void 0);return}const p=this.createQuickPick();let b;const w=[p,p.onDidAccept(()=>{if(p.canSelectMany)h(p.selectedItems.slice()),p.hide();else{const E=p.activeItems[0];E&&(h(E),p.hide())}}),p.onDidChangeActive(E=>{const k=E[0];k&&o.onDidFocus&&o.onDidFocus(k)}),p.onDidChangeSelection(E=>{if(!p.canSelectMany){const k=E[0];k&&(h(k),p.hide())}}),p.onDidTriggerItemButton(E=>o.onDidTriggerItemButton&&o.onDidTriggerItemButton(Object.assign(Object.assign({},E),{removeItem:()=>{const k=p.items.indexOf(E.item);if(k!==-1){const M=p.items.slice(),R=M.splice(k,1),B=p.activeItems.filter(N=>N!==R[0]),T=p.keepScrollPosition;p.keepScrollPosition=!0,p.items=M,B&&(p.activeItems=B),p.keepScrollPosition=T}}}))),p.onDidTriggerSeparatorButton(E=>{var k;return(k=o.onDidTriggerSeparatorButton)===null||k===void 0?void 0:k.call(o,E)}),p.onDidChangeValue(E=>{b&&!E&&(p.activeItems.length!==1||p.activeItems[0]!==b)&&(p.activeItems=[b])}),c.onCancellationRequested(()=>{p.hide()}),p.onDidHide(()=>{(0,v.dispose)(w),h(void 0)})];p.title=o.title,p.canSelectMany=!!o.canPickMany,p.placeholder=o.placeHolder,p.ignoreFocusOut=!!o.ignoreFocusLost,p.matchOnDescription=!!o.matchOnDescription,p.matchOnDetail=!!o.matchOnDetail,p.matchOnLabel=o.matchOnLabel===void 0||o.matchOnLabel,p.autoFocusOnList=o.autoFocusOnList===void 0||o.autoFocusOnList,p.quickNavigate=o.quickNavigate,p.hideInput=!!o.hideInput,p.contextKey=o.contextKey,p.busy=!0,Promise.all([l,o.activeItem]).then(([E,k])=>{b=k,p.busy=!1,p.items=E,p.canSelectMany&&(p.selectedItems=E.filter(M=>M.type!=="separator"&&M.picked)),b&&(p.activeItems=[b])}),p.show(),Promise.resolve(l).then(void 0,E=>{g(E),p.hide()})})}createQuickPick(){const l=this.getUI();return new r.QuickPick(l)}createInputBox(){const l=this.getUI();return new r.InputBox(l)}show(l){const o=this.getUI();this.onShowEmitter.fire();const c=this.controller;this.controller=l,c?.didHide(),this.setEnabled(!0),o.leftActionBar.clear(),o.title.textContent="",o.description1.textContent="",o.description2.textContent="",L.reset(o.widget),o.rightActionBar.clear(),o.checkAll.checked=!1,o.inputBox.placeholder="",o.inputBox.password=!1,o.inputBox.showDecoration(C.default.Ignore),o.visibleCount.setCount(0),o.count.setCount(0),L.reset(o.message),o.progressBar.stop(),o.list.setElements([]),o.list.matchOnDescription=!1,o.list.matchOnDetail=!1,o.list.matchOnLabel=!0,o.list.sortByLabel=!0,o.ignoreFocusOut=!1,o.inputBox.toggles=void 0;const a=this.options.backKeybindingLabel();r.backButton.tooltip=a?(0,s.localize)(5,null,a):(0,s.localize)(6,null),o.container.style.display="",this.updateLayout(),o.inputBox.setFocus()}setVisibilities(l){const o=this.getUI();o.title.style.display=l.title?"":"none",o.description1.style.display=l.description&&(l.inputBox||l.checkAll)?"":"none",o.description2.style.display=l.description&&!(l.inputBox||l.checkAll)?"":"none",o.checkAll.style.display=l.checkAll?"":"none",o.inputContainer.style.display=l.inputBox?"":"none",o.filterContainer.style.display=l.inputBox?"":"none",o.visibleCountContainer.style.display=l.visibleCount?"":"none",o.countContainer.style.display=l.count?"":"none",o.okContainer.style.display=l.ok?"":"none",o.customButtonContainer.style.display=l.customButton?"":"none",o.message.style.display=l.message?"":"none",o.progressBar.getContainer().style.display=l.progressBar?"":"none",o.list.display(!!l.list),o.container.classList.toggle("show-checkboxes",!!l.checkBox),o.container.classList.toggle("hidden-input",!l.inputBox&&!l.description),this.updateLayout()}setEnabled(l){if(l!==this.enabled){this.enabled=l;for(const o of this.getUI().leftActionBar.viewItems)o.action.enabled=l;for(const o of this.getUI().rightActionBar.viewItems)o.action.enabled=l;this.getUI().checkAll.disabled=!l,this.getUI().inputBox.enabled=l,this.getUI().ok.enabled=l,this.getUI().list.enabled=l}}hide(l){var o,c,a;const g=this.controller;if(!g)return;const h=!L.isAncestor(document.activeElement,(c=(o=this.ui)===null||o===void 0?void 0:o.container)!==null&&c!==void 0?c:null);if(this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",!h){let p=this.previousFocusElement;for(;p&&!p.offsetParent;)p=(a=p.parentElement)!==null&&a!==void 0?a:void 0;p?.offsetParent?(p.focus(),this.previousFocusElement=void 0):this.options.returnFocus()}g.didHide(l)}layout(l,o){this.dimension=l,this.titleBarOffset=o,this.updateLayout()}updateLayout(){if(this.ui&&this.isDisplayed()){this.ui.container.style.top=`${this.titleBarOffset}px`;const l=this.ui.container.style,o=Math.min(this.dimension.width*.62,f.MAX_WIDTH);l.width=o+"px",l.marginLeft="-"+o/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(l){this.styles=l,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:l,quickInputBackground:o,quickInputForeground:c,widgetBorder:a,widgetShadow:g}=this.styles.widget;this.ui.titleBar.style.backgroundColor=l??"",this.ui.container.style.backgroundColor=o??"",this.ui.container.style.color=c??"",this.ui.container.style.border=a?`1px solid ${a}`:"",this.ui.container.style.boxShadow=g?`0 0 8px 2px ${g}`:"",this.ui.list.style(this.styles.list);const h=[];this.styles.pickerGroup.pickerGroupBorder&&h.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.pickerGroup.pickerGroupBorder}; }`),this.styles.pickerGroup.pickerGroupForeground&&h.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.pickerGroup.pickerGroupForeground}; }`),this.styles.pickerGroup.pickerGroupForeground&&h.push(".quick-input-list .quick-input-list-separator-as-item { color: var(--vscode-descriptionForeground); }"),(this.styles.keybindingLabel.keybindingLabelBackground||this.styles.keybindingLabel.keybindingLabelBorder||this.styles.keybindingLabel.keybindingLabelBottomBorder||this.styles.keybindingLabel.keybindingLabelShadow||this.styles.keybindingLabel.keybindingLabelForeground)&&(h.push(".quick-input-list .monaco-keybinding > .monaco-keybinding-key {"),this.styles.keybindingLabel.keybindingLabelBackground&&h.push(`background-color: ${this.styles.keybindingLabel.keybindingLabelBackground};`),this.styles.keybindingLabel.keybindingLabelBorder&&h.push(`border-color: ${this.styles.keybindingLabel.keybindingLabelBorder};`),this.styles.keybindingLabel.keybindingLabelBottomBorder&&h.push(`border-bottom-color: ${this.styles.keybindingLabel.keybindingLabelBottomBorder};`),this.styles.keybindingLabel.keybindingLabelShadow&&h.push(`box-shadow: inset 0 -1px 0 ${this.styles.keybindingLabel.keybindingLabelShadow};`),this.styles.keybindingLabel.keybindingLabelForeground&&h.push(`color: ${this.styles.keybindingLabel.keybindingLabelForeground};`),h.push("}"));const p=h.join(` -`);p!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=p)}}isDisplayed(){return this.ui&&this.ui.container.style.display!=="none"}}e.QuickInputController=f,f.MAX_WIDTH=600}),define(te[23],ie([1,0,6,2,8,35,86]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Themable=e.registerThemingParticipant=e.Extensions=e.getThemeTypeSelector=e.themeColorFromId=e.IThemeService=void 0,e.IThemeService=(0,y.createDecorator)("themeService");function m(n){return{id:n}}e.themeColorFromId=m;function _(n){switch(n){case S.ColorScheme.DARK:return"vs-dark";case S.ColorScheme.HIGH_CONTRAST_DARK:return"hc-black";case S.ColorScheme.HIGH_CONTRAST_LIGHT:return"hc-light";default:return"vs"}}e.getThemeTypeSelector=_,e.Extensions={ThemingContribution:"base.contributions.theming"};class v{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new L.Emitter}onColorThemeChange(t){return this.themingParticipants.push(t),this.onThemingParticipantAddedEmitter.fire(t),(0,I.toDisposable)(()=>{const r=this.themingParticipants.indexOf(t);this.themingParticipants.splice(r,1)})}getThemingParticipants(){return this.themingParticipants}}const C=new v;D.Registry.add(e.Extensions.ThemingContribution,C);function s(n){return C.onColorThemeChange(n)}e.registerThemingParticipant=s;class i extends I.Disposable{constructor(t){super(),this.themeService=t,this.theme=t.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(r=>this.onThemeChange(r)))}onThemeChange(t){this.theme=t,this.updateStyles()}updateStyles(){}}e.Themable=i}),define(te[840],ie([1,0,6,2,63,23]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GlobalStyleSheet=e.AbstractCodeEditorService=void 0;let S=class extends I.Disposable{constructor(v){super(),this._themeService=v,this._onWillCreateCodeEditor=this._register(new L.Emitter),this._onCodeEditorAdd=this._register(new L.Emitter),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new L.Emitter),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onWillCreateDiffEditor=this._register(new L.Emitter),this._onDiffEditorAdd=this._register(new L.Emitter),this.onDiffEditorAdd=this._onDiffEditorAdd.event,this._onDiffEditorRemove=this._register(new L.Emitter),this.onDiffEditorRemove=this._onDiffEditorRemove.event,this._decorationOptionProviders=new Map,this._codeEditorOpenHandlers=new y.LinkedList,this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null),this._globalStyleSheet=null}willCreateCodeEditor(){this._onWillCreateCodeEditor.fire()}addCodeEditor(v){this._codeEditors[v.getId()]=v,this._onCodeEditorAdd.fire(v)}removeCodeEditor(v){delete this._codeEditors[v.getId()]&&this._onCodeEditorRemove.fire(v)}listCodeEditors(){return Object.keys(this._codeEditors).map(v=>this._codeEditors[v])}willCreateDiffEditor(){this._onWillCreateDiffEditor.fire()}addDiffEditor(v){this._diffEditors[v.getId()]=v,this._onDiffEditorAdd.fire(v)}listDiffEditors(){return Object.keys(this._diffEditors).map(v=>this._diffEditors[v])}getFocusedCodeEditor(){let v=null;const C=this.listCodeEditors();for(const s of C){if(s.hasTextFocus())return s;s.hasWidgetFocus()&&(v=s)}return v}removeDecorationType(v){const C=this._decorationOptionProviders.get(v);C&&(C.refCount--,C.refCount<=0&&(this._decorationOptionProviders.delete(v),C.dispose(),this.listCodeEditors().forEach(s=>s.removeDecorationsByType(v))))}setModelProperty(v,C,s){const i=v.toString();let n;this._modelProperties.has(i)?n=this._modelProperties.get(i):(n=new Map,this._modelProperties.set(i,n)),n.set(C,s)}getModelProperty(v,C){const s=v.toString();if(this._modelProperties.has(s))return this._modelProperties.get(s).get(C)}openCodeEditor(v,C,s){return be(this,void 0,void 0,function*(){for(const i of this._codeEditorOpenHandlers){const n=yield i(v,C,s);if(n!==null)return n}return null})}registerCodeEditorOpenHandler(v){const C=this._codeEditorOpenHandlers.unshift(v);return(0,I.toDisposable)(C)}};e.AbstractCodeEditorService=S,e.AbstractCodeEditorService=S=Ie([ge(0,D.IThemeService)],S);class m{constructor(v){this._styleSheet=v}}e.GlobalStyleSheet=m}),define(te[841],ie([1,0,7,38,84,53,23]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EditorScrollbar=void 0;class m extends D.ViewPart{constructor(v,C,s,i){super(v);const n=this._context.configuration.options,t=n.get(102),r=n.get(74),u=n.get(40),f=n.get(105),d={listenOnDomNode:s.domNode,className:"editor-scrollable "+(0,S.getThemeTypeSelector)(v.theme.type),useShadows:!1,lazyRender:!0,vertical:t.vertical,horizontal:t.horizontal,verticalHasArrows:t.verticalHasArrows,horizontalHasArrows:t.horizontalHasArrows,verticalScrollbarSize:t.verticalScrollbarSize,verticalSliderSize:t.verticalSliderSize,horizontalScrollbarSize:t.horizontalScrollbarSize,horizontalSliderSize:t.horizontalSliderSize,handleMouseWheel:t.handleMouseWheel,alwaysConsumeMouseWheel:t.alwaysConsumeMouseWheel,arrowSize:t.arrowSize,mouseWheelScrollSensitivity:r,fastScrollSensitivity:u,scrollPredominantAxis:f,scrollByPage:t.scrollByPage};this.scrollbar=this._register(new y.SmoothScrollableElement(C.domNode,d,this._context.viewLayout.getScrollable())),D.PartFingerprints.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,I.createFastDomNode)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const l=(o,c,a)=>{const g={};if(c){const h=o.scrollTop;h&&(g.scrollTop=this._context.viewLayout.getCurrentScrollTop()+h,o.scrollTop=0)}if(a){const h=o.scrollLeft;h&&(g.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+h,o.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(g,1)};this._register(L.addDisposableListener(s.domNode,"scroll",o=>l(s.domNode,!0,!0))),this._register(L.addDisposableListener(C.domNode,"scroll",o=>l(C.domNode,!0,!1))),this._register(L.addDisposableListener(i.domNode,"scroll",o=>l(i.domNode,!0,!1))),this._register(L.addDisposableListener(this.scrollbarDomNode.domNode,"scroll",o=>l(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const v=this._context.configuration.options,C=v.get(143);this.scrollbarDomNode.setLeft(C.contentLeft),v.get(72).side==="right"?this.scrollbarDomNode.setWidth(C.contentWidth+C.minimap.minimapWidth):this.scrollbarDomNode.setWidth(C.contentWidth),this.scrollbarDomNode.setHeight(C.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarPointerDown(v){this.scrollbar.delegateVerticalScrollbarPointerDown(v)}delegateScrollFromMouseWheelEvent(v){this.scrollbar.delegateScrollFromMouseWheelEvent(v)}onConfigurationChanged(v){if(v.hasChanged(102)||v.hasChanged(74)||v.hasChanged(40)){const C=this._context.configuration.options,s=C.get(102),i=C.get(74),n=C.get(40),t=C.get(105),r={vertical:s.vertical,horizontal:s.horizontal,verticalScrollbarSize:s.verticalScrollbarSize,horizontalScrollbarSize:s.horizontalScrollbarSize,scrollByPage:s.scrollByPage,handleMouseWheel:s.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:t};this.scrollbar.updateOptions(r)}return v.hasChanged(143)&&this._setLayout(),!0}onScrollChanged(v){return!0}onThemeChanged(v){return this.scrollbar.updateClassName("editor-scrollable "+(0,S.getThemeTypeSelector)(this._context.theme.type)),!0}prepareRender(v){}render(v){this.scrollbar.renderNow()}}e.EditorScrollbar=m}),define(te[842],ie([1,0,111,31,23,434]),function($,e,L,I,y){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionsOverlay=void 0;class D{constructor(i){this.left=i.left,this.width=i.width,this.startStyle=null,this.endStyle=null}}class S{constructor(i,n){this.lineNumber=i,this.ranges=n}}function m(s){return new D(s)}function _(s){return new S(s.lineNumber,s.ranges.map(m))}class v extends L.DynamicViewOverlay{constructor(i){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=i;const n=this._context.configuration.options;this._lineHeight=n.get(66),this._roundedSelection=n.get(100),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(i){const n=this._context.configuration.options;return this._lineHeight=n.get(66),this._roundedSelection=n.get(100),this._typicalHalfwidthCharacterWidth=n.get(50).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(i){return this._selections=i.selections.slice(0),!0}onDecorationsChanged(i){return!0}onFlushed(i){return!0}onLinesChanged(i){return!0}onLinesDeleted(i){return!0}onLinesInserted(i){return!0}onScrollChanged(i){return i.scrollTopChanged}onZonesChanged(i){return!0}_visibleRangesHaveGaps(i){for(let n=0,t=i.length;n1)return!0;return!1}_enrichVisibleRangesWithStyle(i,n,t){const r=this._typicalHalfwidthCharacterWidth/4;let u=null,f=null;if(t&&t.length>0&&n.length>0){const d=n[0].lineNumber;if(d===i.startLineNumber)for(let o=0;!u&&o=0;o--)t[o].lineNumber===l&&(f=t[o].ranges[0]);u&&!u.startStyle&&(u=null),f&&!f.startStyle&&(f=null)}for(let d=0,l=n.length;d0){const p=n[d-1].ranges[0].left,b=n[d-1].ranges[0].left+n[d-1].ranges[0].width;C(c-p)p&&(g.top=1),C(a-b)'}_actualRenderOneSelection(i,n,t,r){if(r.length===0)return;const u=!!r[0].ranges[0].startStyle,f=this._lineHeight.toString(),d=(this._lineHeight-1).toString(),l=r[0].lineNumber,o=r[r.length-1].lineNumber;for(let c=0,a=r.length;c1,o)}this._previousFrameVisibleRangesWithStyle=u,this._renderResult=n.map(([f,d])=>f+d)}render(i,n){if(!this._renderResult)return"";const t=n-i;return t<0||t>=this._renderResult.length?"":this._renderResult[t]}}e.SelectionsOverlay=v,v.SELECTION_CLASS_NAME="selected-text",v.SELECTION_TOP_LEFT="top-left-radius",v.SELECTION_BOTTOM_LEFT="bottom-left-radius",v.SELECTION_TOP_RIGHT="top-right-radius",v.SELECTION_BOTTOM_RIGHT="bottom-right-radius",v.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",v.ROUNDED_PIECE_WIDTH=10,(0,y.registerThemingParticipant)((s,i)=>{const n=s.getColor(I.editorSelectionForeground);n&&!n.isTransparent()&&i.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function C(s){return s<0?-s:s}}),define(te[360],ie([1,0,7,38,195,2,40,100,12,293,31,23]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.OverviewRulerPart=void 0;let n=i=class extends D.Disposable{constructor(r,u,f,d,l,o,c,a){super(),this._editors=r,this._rootElement=u,this._diffModel=f,this._rootWidth=d,this._rootHeight=l,this._modifiedEditorLayoutInfo=o,this._options=c,this._themeService=a;const g=(0,S.observableFromEvent)(this._themeService.onDidColorThemeChange,()=>this._themeService.getColorTheme()),h=(0,S.derived)(w=>{const E=g.read(w),k=E.getColor(C.diffOverviewRulerInserted)||(E.getColor(C.diffInserted)||C.defaultInsertColor).transparent(2),M=E.getColor(C.diffOverviewRulerRemoved)||(E.getColor(C.diffRemoved)||C.defaultRemoveColor).transparent(2);return{insertColor:k,removeColor:M}}),p=(0,S.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),b=(0,S.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollHeight());this._register((0,S.autorunWithStore)((w,E)=>{if(!this._options.renderOverviewRuler.read(w))return;const k=(0,I.createFastDomNode)(document.createElement("div"));k.setClassName("diffViewport"),k.setPosition("absolute");const M=(0,L.h)("div.diffOverview",{style:{position:"absolute",top:"0px",width:i.ENTIRE_DIFF_OVERVIEW_WIDTH+"px"}}).root;E.add((0,m.appendRemoveOnDispose)(M,k.domNode)),E.add((0,L.addStandardDisposableListener)(M,L.EventType.POINTER_DOWN,R=>{this._editors.modified.delegateVerticalScrollbarPointerDown(R)})),E.add((0,L.addDisposableListener)(M,L.EventType.MOUSE_WHEEL,R=>{this._editors.modified.delegateScrollFromMouseWheelEvent(R)},{passive:!1})),E.add((0,m.appendRemoveOnDispose)(this._rootElement,M)),E.add((0,S.autorunWithStore)((R,B)=>{const T=this._diffModel.read(R),N=this._editors.original.createOverviewRuler("original diffOverviewRuler");N&&(B.add(N),B.add((0,m.appendRemoveOnDispose)(M,N.getDomNode())));const A=this._editors.modified.createOverviewRuler("modified diffOverviewRuler");if(A&&(B.add(A),B.add((0,m.appendRemoveOnDispose)(M,A.getDomNode()))),!N||!A)return;const P=(0,S.observableSignalFromEvent)("viewZoneChanged",this._editors.original.onDidChangeViewZones),O=(0,S.observableSignalFromEvent)("viewZoneChanged",this._editors.modified.onDidChangeViewZones),x=(0,S.observableSignalFromEvent)("hiddenRangesChanged",this._editors.original.onDidChangeHiddenAreas),W=(0,S.observableSignalFromEvent)("hiddenRangesChanged",this._editors.modified.onDidChangeHiddenAreas);B.add((0,S.autorun)(U=>{var F;P.read(U),O.read(U),x.read(U),W.read(U);const G=h.read(U),Y=(F=T?.diff.read(U))===null||F===void 0?void 0:F.mappings;function ne(q,H,V){const Z=V._getViewModel();return Z?q.filter(ee=>ee.length>0).map(ee=>{const le=Z.coordinatesConverter.convertModelPositionToViewPosition(new _.Position(ee.startLineNumber,1)),ue=Z.coordinatesConverter.convertModelPositionToViewPosition(new _.Position(ee.endLineNumberExclusive,1)),de=ue.lineNumber-le.lineNumber;return new v.OverviewRulerZone(le.lineNumber,ue.lineNumber,de,H.toString())}):[]}const se=ne((Y||[]).map(q=>q.lineRangeMapping.original),G.removeColor,this._editors.original),J=ne((Y||[]).map(q=>q.lineRangeMapping.modified),G.insertColor,this._editors.modified);N?.setZones(se),A?.setZones(J)})),B.add((0,S.autorun)(U=>{const F=this._rootHeight.read(U),G=this._rootWidth.read(U),Y=this._modifiedEditorLayoutInfo.read(U);if(Y){const ne=i.ENTIRE_DIFF_OVERVIEW_WIDTH-2*i.ONE_OVERVIEW_WIDTH;N.setLayout({top:0,height:F,right:ne+i.ONE_OVERVIEW_WIDTH,width:i.ONE_OVERVIEW_WIDTH}),A.setLayout({top:0,height:F,right:0,width:i.ONE_OVERVIEW_WIDTH});const se=p.read(U),J=b.read(U),q=this._editors.modified.getOption(102),H=new y.ScrollbarState(q.verticalHasArrows?q.arrowSize:0,q.verticalScrollbarSize,0,Y.height,J,se);k.setTop(H.getSliderPosition()),k.setHeight(H.getSliderSize())}else k.setTop(0),k.setHeight(0);M.style.height=F+"px",M.style.left=G-i.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",k.setWidth(i.ENTIRE_DIFF_OVERVIEW_WIDTH)}))}))}))}};e.OverviewRulerPart=n,n.ONE_OVERVIEW_WIDTH=15,n.ENTIRE_DIFF_OVERVIEW_WIDTH=i.ONE_OVERVIEW_WIDTH*2,e.OverviewRulerPart=n=i=Ie([ge(7,s.IThemeService)],n)}),define(te[843],ie([1,0,6,2,40,360,39,613,8,34]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorEditors=void 0;let C=class extends I.Disposable{constructor(i,n,t,r,u,f,d){super(),this.originalEditorElement=i,this.modifiedEditorElement=n,this._options=t,this._createInnerEditor=u,this._instantiationService=f,this._keybindingService=d,this._onDidContentSizeChange=this._register(new L.Emitter),this.original=this._register(this._createLeftHandSideEditor(t.editorOptions.get(),r.originalEditor||{})),this.modified=this._register(this._createRightHandSideEditor(t.editorOptions.get(),r.modifiedEditor||{})),this.modifiedModel=(0,y.observableFromEvent)(this.modified.onDidChangeModel,()=>this.modified.getModel()),this._register((0,y.autorunHandleChanges)({createEmptyChangeSummary:()=>({}),handleChange:(l,o)=>(l.didChange(t.editorOptions)&&Object.assign(o,l.change.changedOptions),!0)},(l,o)=>{t.editorOptions.read(l),this._options.renderSideBySide.read(l),this.modified.updateOptions(this._adjustOptionsForRightHandSide(l,o)),this.original.updateOptions(this._adjustOptionsForLeftHandSide(l,o))}))}_createLeftHandSideEditor(i,n){const t=this._adjustOptionsForLeftHandSide(void 0,i),r=this._constructInnerEditor(this._instantiationService,this.originalEditorElement,t,n);return r.setContextValue("isInDiffLeftEditor",!0),r}_createRightHandSideEditor(i,n){const t=this._adjustOptionsForRightHandSide(void 0,i),r=this._constructInnerEditor(this._instantiationService,this.modifiedEditorElement,t,n);return r.setContextValue("isInDiffRightEditor",!0),r}_constructInnerEditor(i,n,t,r){const u=this._createInnerEditor(i,n,t,r);return this._register(u.onDidContentSizeChange(f=>{const d=this.original.getContentWidth()+this.modified.getContentWidth()+D.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH,l=Math.max(this.modified.getContentHeight(),this.original.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:l,contentWidth:d,contentHeightChanged:f.contentHeightChanged,contentWidthChanged:f.contentWidthChanged})})),u}_adjustOptionsForLeftHandSide(i,n){const t=this._adjustOptionsForSubEditor(n);return this._options.renderSideBySide.get()?(t.unicodeHighlight=this._options.editorOptions.get().unicodeHighlight||{},t.wordWrapOverride1=this._options.diffWordWrap.get()):(t.wordWrapOverride1="off",t.wordWrapOverride2="off",t.stickyScroll={enabled:!1},t.unicodeHighlight={nonBasicASCII:!1,ambiguousCharacters:!1,invisibleCharacters:!1}),n.originalAriaLabel&&(t.ariaLabel=n.originalAriaLabel),t.ariaLabel=this._updateAriaLabel(t.ariaLabel),t.readOnly=!this._options.originalEditable.get(),t.dropIntoEditor={enabled:!t.readOnly},t.extraEditorClassName="original-in-monaco-diff-editor",t}_adjustOptionsForRightHandSide(i,n){const t=this._adjustOptionsForSubEditor(n);return n.modifiedAriaLabel&&(t.ariaLabel=n.modifiedAriaLabel),t.ariaLabel=this._updateAriaLabel(t.ariaLabel),t.wordWrapOverride1=this._options.diffWordWrap.get(),t.revealHorizontalRightPadding=S.EditorOptions.revealHorizontalRightPadding.defaultValue+D.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",t}_adjustOptionsForSubEditor(i){const n=Object.assign(Object.assign({},i),{dimension:{height:0,width:0}});return n.inDiffEditor=!0,n.automaticLayout=!1,n.scrollbar=Object.assign({},n.scrollbar||{}),n.scrollbar.vertical="visible",n.folding=!1,n.codeLens=this._options.diffCodeLens.get(),n.fixedOverflowWidgets=!0,n.minimap=Object.assign({},n.minimap||{}),n.minimap.enabled=!1,this._options.hideUnchangedRegions.get()?n.stickyScroll={enabled:!1}:n.stickyScroll=this._options.editorOptions.get().stickyScroll,n}_updateAriaLabel(i){var n;i||(i="");const t=(0,m.localize)(0,null,(n=this._keybindingService.lookupKeybinding("editor.action.accessibilityHelp"))===null||n===void 0?void 0:n.getAriaLabel());return this._options.accessibilityVerbose.get()?i+t:i?i.replaceAll(t,""):""}};e.DiffEditorEditors=C,e.DiffEditorEditors=C=Ie([ge(5,_.IInstantiationService),ge(6,v.IKeybindingService)],C)}),define(te[78],ie([1,0,622,36,31,23]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.editorUnicodeHighlightBackground=e.editorUnicodeHighlightBorder=e.editorBracketPairGuideActiveBackground6=e.editorBracketPairGuideActiveBackground5=e.editorBracketPairGuideActiveBackground4=e.editorBracketPairGuideActiveBackground3=e.editorBracketPairGuideActiveBackground2=e.editorBracketPairGuideActiveBackground1=e.editorBracketPairGuideBackground6=e.editorBracketPairGuideBackground5=e.editorBracketPairGuideBackground4=e.editorBracketPairGuideBackground3=e.editorBracketPairGuideBackground2=e.editorBracketPairGuideBackground1=e.editorBracketHighlightingUnexpectedBracketForeground=e.editorBracketHighlightingForeground6=e.editorBracketHighlightingForeground5=e.editorBracketHighlightingForeground4=e.editorBracketHighlightingForeground3=e.editorBracketHighlightingForeground2=e.editorBracketHighlightingForeground1=e.overviewRulerInfo=e.overviewRulerWarning=e.overviewRulerError=e.overviewRulerRangeHighlight=e.ghostTextBackground=e.ghostTextForeground=e.ghostTextBorder=e.editorUnnecessaryCodeOpacity=e.editorUnnecessaryCodeBorder=e.editorGutter=e.editorOverviewRulerBackground=e.editorOverviewRulerBorder=e.editorBracketMatchBorder=e.editorBracketMatchBackground=e.editorCodeLensForeground=e.editorRuler=e.editorDimmedLineNumber=e.editorActiveLineNumber=e.editorActiveIndentGuide6=e.editorActiveIndentGuide5=e.editorActiveIndentGuide4=e.editorActiveIndentGuide3=e.editorActiveIndentGuide2=e.editorActiveIndentGuide1=e.editorIndentGuide6=e.editorIndentGuide5=e.editorIndentGuide4=e.editorIndentGuide3=e.editorIndentGuide2=e.editorIndentGuide1=e.deprecatedEditorActiveIndentGuides=e.deprecatedEditorIndentGuides=e.editorLineNumbers=e.editorWhitespaces=e.editorCursorBackground=e.editorCursorForeground=e.editorSymbolHighlightBorder=e.editorSymbolHighlight=e.editorRangeHighlightBorder=e.editorRangeHighlight=e.editorLineHighlightBorder=e.editorLineHighlight=void 0,e.editorLineHighlight=(0,y.registerColor)("editor.lineHighlightBackground",{dark:null,light:null,hcDark:null,hcLight:null},L.localize(0,null)),e.editorLineHighlightBorder=(0,y.registerColor)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hcDark:"#f38518",hcLight:y.contrastBorder},L.localize(1,null)),e.editorRangeHighlight=(0,y.registerColor)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hcDark:null,hcLight:null},L.localize(2,null),!0),e.editorRangeHighlightBorder=(0,y.registerColor)("editor.rangeHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},L.localize(3,null),!0),e.editorSymbolHighlight=(0,y.registerColor)("editor.symbolHighlightBackground",{dark:y.editorFindMatchHighlight,light:y.editorFindMatchHighlight,hcDark:null,hcLight:null},L.localize(4,null),!0),e.editorSymbolHighlightBorder=(0,y.registerColor)("editor.symbolHighlightBorder",{dark:null,light:null,hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},L.localize(5,null),!0),e.editorCursorForeground=(0,y.registerColor)("editorCursor.foreground",{dark:"#AEAFAD",light:I.Color.black,hcDark:I.Color.white,hcLight:"#0F4A85"},L.localize(6,null)),e.editorCursorBackground=(0,y.registerColor)("editorCursor.background",null,L.localize(7,null)),e.editorWhitespaces=(0,y.registerColor)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hcDark:"#e3e4e229",hcLight:"#CCCCCC"},L.localize(8,null)),e.editorLineNumbers=(0,y.registerColor)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hcDark:I.Color.white,hcLight:"#292929"},L.localize(9,null)),e.deprecatedEditorIndentGuides=(0,y.registerColor)("editorIndentGuide.background",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},L.localize(10,null),!1,L.localize(11,null)),e.deprecatedEditorActiveIndentGuides=(0,y.registerColor)("editorIndentGuide.activeBackground",{dark:e.editorWhitespaces,light:e.editorWhitespaces,hcDark:e.editorWhitespaces,hcLight:e.editorWhitespaces},L.localize(12,null),!1,L.localize(13,null)),e.editorIndentGuide1=(0,y.registerColor)("editorIndentGuide.background1",{dark:e.deprecatedEditorIndentGuides,light:e.deprecatedEditorIndentGuides,hcDark:e.deprecatedEditorIndentGuides,hcLight:e.deprecatedEditorIndentGuides},L.localize(14,null)),e.editorIndentGuide2=(0,y.registerColor)("editorIndentGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(15,null)),e.editorIndentGuide3=(0,y.registerColor)("editorIndentGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(16,null)),e.editorIndentGuide4=(0,y.registerColor)("editorIndentGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(17,null)),e.editorIndentGuide5=(0,y.registerColor)("editorIndentGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(18,null)),e.editorIndentGuide6=(0,y.registerColor)("editorIndentGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(19,null)),e.editorActiveIndentGuide1=(0,y.registerColor)("editorIndentGuide.activeBackground1",{dark:e.deprecatedEditorActiveIndentGuides,light:e.deprecatedEditorActiveIndentGuides,hcDark:e.deprecatedEditorActiveIndentGuides,hcLight:e.deprecatedEditorActiveIndentGuides},L.localize(20,null)),e.editorActiveIndentGuide2=(0,y.registerColor)("editorIndentGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(21,null)),e.editorActiveIndentGuide3=(0,y.registerColor)("editorIndentGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(22,null)),e.editorActiveIndentGuide4=(0,y.registerColor)("editorIndentGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(23,null)),e.editorActiveIndentGuide5=(0,y.registerColor)("editorIndentGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(24,null)),e.editorActiveIndentGuide6=(0,y.registerColor)("editorIndentGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(25,null));const S=(0,y.registerColor)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hcDark:y.activeContrastBorder,hcLight:y.activeContrastBorder},L.localize(26,null),!1,L.localize(27,null));e.editorActiveLineNumber=(0,y.registerColor)("editorLineNumber.activeForeground",{dark:S,light:S,hcDark:S,hcLight:S},L.localize(28,null)),e.editorDimmedLineNumber=(0,y.registerColor)("editorLineNumber.dimmedForeground",{dark:null,light:null,hcDark:null,hcLight:null},L.localize(29,null)),e.editorRuler=(0,y.registerColor)("editorRuler.foreground",{dark:"#5A5A5A",light:I.Color.lightgrey,hcDark:I.Color.white,hcLight:"#292929"},L.localize(30,null)),e.editorCodeLensForeground=(0,y.registerColor)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hcDark:"#999999",hcLight:"#292929"},L.localize(31,null)),e.editorBracketMatchBackground=(0,y.registerColor)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hcDark:"#0064001a",hcLight:"#0000"},L.localize(32,null)),e.editorBracketMatchBorder=(0,y.registerColor)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hcDark:y.contrastBorder,hcLight:y.contrastBorder},L.localize(33,null)),e.editorOverviewRulerBorder=(0,y.registerColor)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hcDark:"#7f7f7f4d",hcLight:"#666666"},L.localize(34,null)),e.editorOverviewRulerBackground=(0,y.registerColor)("editorOverviewRuler.background",null,L.localize(35,null)),e.editorGutter=(0,y.registerColor)("editorGutter.background",{dark:y.editorBackground,light:y.editorBackground,hcDark:y.editorBackground,hcLight:y.editorBackground},L.localize(36,null)),e.editorUnnecessaryCodeBorder=(0,y.registerColor)("editorUnnecessaryCode.border",{dark:null,light:null,hcDark:I.Color.fromHex("#fff").transparent(.8),hcLight:y.contrastBorder},L.localize(37,null)),e.editorUnnecessaryCodeOpacity=(0,y.registerColor)("editorUnnecessaryCode.opacity",{dark:I.Color.fromHex("#000a"),light:I.Color.fromHex("#0007"),hcDark:null,hcLight:null},L.localize(38,null)),e.ghostTextBorder=(0,y.registerColor)("editorGhostText.border",{dark:null,light:null,hcDark:I.Color.fromHex("#fff").transparent(.8),hcLight:I.Color.fromHex("#292929").transparent(.8)},L.localize(39,null)),e.ghostTextForeground=(0,y.registerColor)("editorGhostText.foreground",{dark:I.Color.fromHex("#ffffff56"),light:I.Color.fromHex("#0007"),hcDark:null,hcLight:null},L.localize(40,null)),e.ghostTextBackground=(0,y.registerColor)("editorGhostText.background",{dark:null,light:null,hcDark:null,hcLight:null},L.localize(41,null));const m=new I.Color(new I.RGBA(0,122,204,.6));e.overviewRulerRangeHighlight=(0,y.registerColor)("editorOverviewRuler.rangeHighlightForeground",{dark:m,light:m,hcDark:m,hcLight:m},L.localize(42,null),!0),e.overviewRulerError=(0,y.registerColor)("editorOverviewRuler.errorForeground",{dark:new I.Color(new I.RGBA(255,18,18,.7)),light:new I.Color(new I.RGBA(255,18,18,.7)),hcDark:new I.Color(new I.RGBA(255,50,50,1)),hcLight:"#B5200D"},L.localize(43,null)),e.overviewRulerWarning=(0,y.registerColor)("editorOverviewRuler.warningForeground",{dark:y.editorWarningForeground,light:y.editorWarningForeground,hcDark:y.editorWarningBorder,hcLight:y.editorWarningBorder},L.localize(44,null)),e.overviewRulerInfo=(0,y.registerColor)("editorOverviewRuler.infoForeground",{dark:y.editorInfoForeground,light:y.editorInfoForeground,hcDark:y.editorInfoBorder,hcLight:y.editorInfoBorder},L.localize(45,null)),e.editorBracketHighlightingForeground1=(0,y.registerColor)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hcDark:"#FFD700",hcLight:"#0431FAFF"},L.localize(46,null)),e.editorBracketHighlightingForeground2=(0,y.registerColor)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hcDark:"#DA70D6",hcLight:"#319331FF"},L.localize(47,null)),e.editorBracketHighlightingForeground3=(0,y.registerColor)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hcDark:"#87CEFA",hcLight:"#7B3814FF"},L.localize(48,null)),e.editorBracketHighlightingForeground4=(0,y.registerColor)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(49,null)),e.editorBracketHighlightingForeground5=(0,y.registerColor)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(50,null)),e.editorBracketHighlightingForeground6=(0,y.registerColor)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(51,null)),e.editorBracketHighlightingUnexpectedBracketForeground=(0,y.registerColor)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new I.Color(new I.RGBA(255,18,18,.8)),light:new I.Color(new I.RGBA(255,18,18,.8)),hcDark:new I.Color(new I.RGBA(255,50,50,1)),hcLight:""},L.localize(52,null)),e.editorBracketPairGuideBackground1=(0,y.registerColor)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(53,null)),e.editorBracketPairGuideBackground2=(0,y.registerColor)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(54,null)),e.editorBracketPairGuideBackground3=(0,y.registerColor)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(55,null)),e.editorBracketPairGuideBackground4=(0,y.registerColor)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(56,null)),e.editorBracketPairGuideBackground5=(0,y.registerColor)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(57,null)),e.editorBracketPairGuideBackground6=(0,y.registerColor)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(58,null)),e.editorBracketPairGuideActiveBackground1=(0,y.registerColor)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(59,null)),e.editorBracketPairGuideActiveBackground2=(0,y.registerColor)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(60,null)),e.editorBracketPairGuideActiveBackground3=(0,y.registerColor)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(61,null)),e.editorBracketPairGuideActiveBackground4=(0,y.registerColor)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(62,null)),e.editorBracketPairGuideActiveBackground5=(0,y.registerColor)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(63,null)),e.editorBracketPairGuideActiveBackground6=(0,y.registerColor)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hcDark:"#00000000",hcLight:"#00000000"},L.localize(64,null)),e.editorUnicodeHighlightBorder=(0,y.registerColor)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hcDark:"#ff0000",hcLight:"#CEA33D"},L.localize(65,null)),e.editorUnicodeHighlightBackground=(0,y.registerColor)("editorUnicodeHighlight.background",{dark:"#bd9b0326",light:"#cea33d14",hcDark:"#00000000",hcLight:"#cea33d14"},L.localize(66,null)),(0,D.registerThemingParticipant)((_,v)=>{const C=_.getColor(y.editorBackground),s=_.getColor(e.editorLineHighlight),i=s&&!s.isTransparent()?s:C;i&&v.addRule(`.monaco-editor .inputarea.ime-input { background-color: ${i}; }`)})}),define(te[844],ie([1,0,111,78,13,23,24,86,421]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CurrentLineMarginHighlightOverlay=e.CurrentLineHighlightOverlay=e.AbstractLineHighlightOverlay=void 0;class _ extends L.DynamicViewOverlay{constructor(i){super(),this._context=i;const n=this._context.configuration.options,t=n.get(143);this._lineHeight=n.get(66),this._renderLineHighlight=n.get(95),this._renderLineHighlightOnlyWhenFocus=n.get(96),this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new S.Selection(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let i=!1;const n=this._selections.map(r=>r.positionLineNumber);n.sort((r,u)=>r-u),y.equals(this._cursorLineNumbers,n)||(this._cursorLineNumbers=n,i=!0);const t=this._selections.every(r=>r.isEmpty());return this._selectionIsEmpty!==t&&(this._selectionIsEmpty=t,i=!0),i}onThemeChanged(i){return this._readFromSelections()}onConfigurationChanged(i){const n=this._context.configuration.options,t=n.get(143);return this._lineHeight=n.get(66),this._renderLineHighlight=n.get(95),this._renderLineHighlightOnlyWhenFocus=n.get(96),this._contentLeft=t.contentLeft,this._contentWidth=t.contentWidth,!0}onCursorStateChanged(i){return this._selections=i.selections,this._readFromSelections()}onFlushed(i){return!0}onLinesDeleted(i){return!0}onLinesInserted(i){return!0}onScrollChanged(i){return i.scrollWidthChanged||i.scrollTopChanged}onZonesChanged(i){return!0}onFocusChanged(i){return this._renderLineHighlightOnlyWhenFocus?(this._focused=i.isFocused,!0):!1}prepareRender(i){if(!this._shouldRenderThis()){this._renderData=null;return}const n=this._renderOne(i),t=i.visibleRange.startLineNumber,r=i.visibleRange.endLineNumber,u=this._cursorLineNumbers.length;let f=0;const d=[];for(let l=t;l<=r;l++){const o=l-t;for(;f=this._renderData.length?"":this._renderData[t]}_shouldRenderInMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}e.AbstractLineHighlightOverlay=_;class v extends _{_renderOne(i){return`
    `}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}e.CurrentLineHighlightOverlay=v;class C extends _{_renderOne(i){return`
    `}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}e.CurrentLineMarginHighlightOverlay=C,(0,D.registerThemingParticipant)((s,i)=>{const n=s.getColor(I.editorLineHighlight);if(n&&(i.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${n}; }`),i.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${n}; border: none; }`)),!n||n.isTransparent()||s.defines(I.editorLineHighlightBorder)){const t=s.getColor(I.editorLineHighlightBorder);t&&(i.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${t}; }`),i.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${t}; }`),(0,m.isHighContrast)(s.type)&&(i.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),i.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}})}),define(te[845],ie([1,0,111,78,23,12,13,20,290,210,424]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IndentGuidesOverlay=void 0;class C extends L.DynamicViewOverlay{constructor(n){super(),this._context=n,this._primaryPosition=null;const t=this._context.configuration.options,r=t.get(144),u=t.get(50);this._lineHeight=t.get(66),this._spaceWidth=u.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*u.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(n){const t=this._context.configuration.options,r=t.get(144),u=t.get(50);return this._lineHeight=t.get(66),this._spaceWidth=u.spaceWidth,this._maxIndentLeft=r.wrappingColumn===-1?-1:r.wrappingColumn*u.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(16),!0}onCursorStateChanged(n){var t;const u=n.selections[0].getPosition();return!((t=this._primaryPosition)===null||t===void 0)&&t.equals(u)?!1:(this._primaryPosition=u,!0)}onDecorationsChanged(n){return!0}onFlushed(n){return!0}onLinesChanged(n){return!0}onLinesDeleted(n){return!0}onLinesInserted(n){return!0}onScrollChanged(n){return n.scrollTopChanged}onZonesChanged(n){return!0}onLanguageConfigurationChanged(n){return!0}prepareRender(n){var t,r,u,f;if(!this._bracketPairGuideOptions.indentation&&this._bracketPairGuideOptions.bracketPairs===!1){this._renderResult=null;return}const d=n.visibleRange.startLineNumber,l=n.visibleRange.endLineNumber,o=n.scrollWidth,c=this._lineHeight,a=this._primaryPosition,g=this.getGuidesByLine(d,Math.min(l+1,this._context.viewModel.getLineCount()),a),h=[];for(let p=d;p<=l;p++){const b=p-d,w=g[b];let E="";const k=(r=(t=n.visibleRangeForPosition(new D.Position(p,1)))===null||t===void 0?void 0:t.left)!==null&&r!==void 0?r:0;for(const M of w){const R=M.column===-1?k+(M.visibleColumn-1)*this._spaceWidth:n.visibleRangeForPosition(new D.Position(p,M.column)).left;if(R>o||this._maxIndentLeft>0&&R>this._maxIndentLeft)break;const B=M.horizontalLine?M.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",T=M.horizontalLine?((f=(u=n.visibleRangeForPosition(new D.Position(p,M.horizontalLine.endColumn)))===null||u===void 0?void 0:u.left)!==null&&f!==void 0?f:R+this._spaceWidth)-R:this._spaceWidth;E+=`
    `}h[b]=E}this._renderResult=h}getGuidesByLine(n,t,r){const u=this._bracketPairGuideOptions.bracketPairs!==!1?this._context.viewModel.getBracketGuidesInRangeByLine(n,t,r,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:this._bracketPairGuideOptions.bracketPairsHorizontal===!0?v.HorizontalGuidesState.Enabled:this._bracketPairGuideOptions.bracketPairsHorizontal==="active"?v.HorizontalGuidesState.EnabledForActive:v.HorizontalGuidesState.Disabled,includeInactive:this._bracketPairGuideOptions.bracketPairs===!0}):null,f=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(n,t):null;let d=0,l=0,o=0;if(this._bracketPairGuideOptions.highlightActiveIndentation!==!1&&r){const g=this._context.viewModel.getActiveIndentGuide(r.lineNumber,n,t);d=g.startLineNumber,l=g.endLineNumber,o=g.indent}const{indentSize:c}=this._context.viewModel.model.getOptions(),a=[];for(let g=n;g<=t;g++){const h=new Array;a.push(h);const p=u?u[g-n]:[],b=new S.ArrayQueue(p),w=f?f[g-n]:0;for(let E=1;E<=w;E++){const k=(E-1)*c+1,M=(this._bracketPairGuideOptions.highlightActiveIndentation==="always"||p.length===0)&&d<=g&&g<=l&&E===o;h.push(...b.takeWhile(B=>B.visibleColumn!0)||[])}return a}render(n,t){if(!this._renderResult)return"";const r=t-n;return r<0||r>=this._renderResult.length?"":this._renderResult[r]}}e.IndentGuidesOverlay=C;function s(i){if(!(i&&i.isTransparent()))return i}(0,y.registerThemingParticipant)((i,n)=>{const t=[{bracketColor:I.editorBracketHighlightingForeground1,guideColor:I.editorBracketPairGuideBackground1,guideColorActive:I.editorBracketPairGuideActiveBackground1},{bracketColor:I.editorBracketHighlightingForeground2,guideColor:I.editorBracketPairGuideBackground2,guideColorActive:I.editorBracketPairGuideActiveBackground2},{bracketColor:I.editorBracketHighlightingForeground3,guideColor:I.editorBracketPairGuideBackground3,guideColorActive:I.editorBracketPairGuideActiveBackground3},{bracketColor:I.editorBracketHighlightingForeground4,guideColor:I.editorBracketPairGuideBackground4,guideColorActive:I.editorBracketPairGuideActiveBackground4},{bracketColor:I.editorBracketHighlightingForeground5,guideColor:I.editorBracketPairGuideBackground5,guideColorActive:I.editorBracketPairGuideActiveBackground5},{bracketColor:I.editorBracketHighlightingForeground6,guideColor:I.editorBracketPairGuideBackground6,guideColorActive:I.editorBracketPairGuideActiveBackground6}],r=new _.BracketPairGuidesClassNames,u=[{indentColor:I.editorIndentGuide1,indentColorActive:I.editorActiveIndentGuide1},{indentColor:I.editorIndentGuide2,indentColorActive:I.editorActiveIndentGuide2},{indentColor:I.editorIndentGuide3,indentColorActive:I.editorActiveIndentGuide3},{indentColor:I.editorIndentGuide4,indentColorActive:I.editorActiveIndentGuide4},{indentColor:I.editorIndentGuide5,indentColorActive:I.editorActiveIndentGuide5},{indentColor:I.editorIndentGuide6,indentColorActive:I.editorActiveIndentGuide6}],f=t.map(l=>{var o,c;const a=i.getColor(l.bracketColor),g=i.getColor(l.guideColor),h=i.getColor(l.guideColorActive),p=s((o=s(g))!==null&&o!==void 0?o:a?.transparent(.3)),b=s((c=s(h))!==null&&c!==void 0?c:a);if(!(!p||!b))return{guideColor:p,guideColorActive:b}}).filter(m.isDefined),d=u.map(l=>{const o=i.getColor(l.indentColor),c=i.getColor(l.indentColorActive),a=s(o),g=s(c);if(!(!a||!g))return{indentColor:a,indentColorActive:g}}).filter(m.isDefined);if(f.length>0){for(let l=0;l<30;l++){const o=f[l%f.length];n.addRule(`.monaco-editor .${r.getInlineClassNameOfLevel(l).replace(/ /g,".")} { --guide-color: ${o.guideColor}; --guide-color-active: ${o.guideColorActive}; }`)}n.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),n.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),n.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),n.addRule(`.monaco-editor .vertical.${r.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),n.addRule(`.monaco-editor .horizontal-top.${r.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),n.addRule(`.monaco-editor .horizontal-bottom.${r.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}if(d.length>0){for(let l=0;l<30;l++){const o=d[l%d.length];n.addRule(`.monaco-editor .lines-content .core-guide-indent.lvl-${l} { --indent-color: ${o.indentColor}; --indent-color-active: ${o.indentColorActive}; }`)}n.addRule(".monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 var(--indent-color) inset; }"),n.addRule(".monaco-editor .lines-content .core-guide-indent.indent-active { box-shadow: 1px 0 0 0 var(--indent-color-active) inset; }")}})}),define(te[361],ie([1,0,17,111,12,23,78,425]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LineNumbersOverlay=void 0;class m extends I.DynamicViewOverlay{constructor(v){super(),this._context=v,this._readConfig(),this._lastCursorModelPosition=new y.Position(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const v=this._context.configuration.options;this._lineHeight=v.get(66);const C=v.get(67);this._renderLineNumbers=C.renderType,this._renderCustomLineNumbers=C.renderFn,this._renderFinalNewline=v.get(94);const s=v.get(143);this._lineNumbersLeft=s.lineNumbersLeft,this._lineNumbersWidth=s.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(v){return this._readConfig(),!0}onCursorStateChanged(v){const C=v.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(C);let s=!1;return this._activeLineNumber!==C.lineNumber&&(this._activeLineNumber=C.lineNumber,s=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(s=!0),s}onFlushed(v){return!0}onLinesChanged(v){return!0}onLinesDeleted(v){return!0}onLinesInserted(v){return!0}onScrollChanged(v){return v.scrollTopChanged}onZonesChanged(v){return!0}_getLineRenderLineNumber(v){const C=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new y.Position(v,1));if(C.column!==1)return"";const s=C.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(s);if(this._renderLineNumbers===2){const i=Math.abs(this._lastCursorModelPosition.lineNumber-s);return i===0?''+s+"":String(i)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===s||s%10===0?String(s):"":String(s)}prepareRender(v){if(this._renderLineNumbers===0){this._renderResult=null;return}const C=L.isLinux?this._lineHeight%2===0?" lh-even":" lh-odd":"",s=v.visibleRange.startLineNumber,i=v.visibleRange.endLineNumber,n=this._context.viewModel.getLineCount(),t=[];for(let r=s;r<=i;r++){const u=r-s,f=this._getLineRenderLineNumber(r);if(!f){t[u]="";continue}let d="";if(r===n&&this._context.viewModel.getLineLength(r)===0){if(this._renderFinalNewline==="off"){t[u]="";continue}this._renderFinalNewline==="dimmed"&&(d=" dimmed-line-number")}r===this._activeLineNumber&&(d=" active-line-number"),t[u]=`
    ${f}
    `}this._renderResult=t}render(v,C){if(!this._renderResult)return"";const s=C-v;return s<0||s>=this._renderResult.length?"":this._renderResult[s]}}e.LineNumbersOverlay=m,m.CLASS_NAME="line-numbers",(0,D.registerThemingParticipant)((_,v)=>{const C=_.getColor(S.editorLineNumbers),s=_.getColor(S.editorDimmedLineNumber);s?v.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${s}; }`):C&&v.addRule(`.monaco-editor .line-numbers.dimmed-line-number { color: ${C.transparent(.4)}; }`)})}),define(te[846],ie([1,0,605,51,38,17,10,70,183,273,53,361,292,39,144,12,5,24,198,29,36,262,34,419]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TextAreaHandler=void 0;class g{constructor(E,k,M,R,B){this._context=E,this.modelLineNumber=k,this.distanceToModelLineStart=M,this.widthOfHiddenLineTextBefore=R,this.distanceToModelLineEnd=B,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(E){const k=new r.Position(this.modelLineNumber,this.distanceToModelLineStart+1),M=new r.Position(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(k),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(M),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=E.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=E.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(E){return this._previousPresentation||(E?this._previousPresentation=E:this._previousPresentation={foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const h=I.isFirefox;let p=class extends C.ViewPart{constructor(E,k,M,R){super(E),this._keybindingService=R,this._primaryCursorPosition=new r.Position(1,1),this._primaryCursorVisibleRange=null,this._viewController=k,this._visibleRangeProvider=M,this._scrollLeft=0,this._scrollTop=0;const B=this._context.configuration.options,T=B.get(143);this._setAccessibilityOptions(B),this._contentLeft=T.contentLeft,this._contentWidth=T.contentWidth,this._contentHeight=T.height,this._fontInfo=B.get(50),this._lineHeight=B.get(66),this._emptySelectionClipboard=B.get(37),this._copyWithSyntaxHighlighting=B.get(25),this._visibleTextArea=null,this._selections=[new f.Selection(1,1,1,1)],this._modelSelections=[new f.Selection(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,y.createFastDomNode)(document.createElement("textarea")),C.PartFingerprints.write(this.textArea,6),this.textArea.setClassName(`inputarea ${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:N}=this._context.viewModel.model.getOptions();this.textArea.domNode.style.tabSize=`${N*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(B)),this.textArea.setAttribute("aria-required",B.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(B.get(123))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",L.localize(0,null)),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-autocomplete",B.get(90)?"none":"both"),this._ensureReadOnlyAttribute(),this.textAreaCover=(0,y.createFastDomNode)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const A={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:x=>this._context.viewModel.getLineMaxColumn(x),getValueInRange:(x,W)=>this._context.viewModel.getValueInRange(x,W),getValueLengthInRange:(x,W)=>this._context.viewModel.getValueLengthInRange(x,W),modifyPosition:(x,W)=>this._context.viewModel.modifyPosition(x,W)},P={getDataToCopy:()=>{const x=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,D.isWindows),W=this._context.viewModel.model.getEOL(),U=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),F=Array.isArray(x)?x:null,G=Array.isArray(x)?x.join(W):x;let Y,ne=null;if(_.CopyOptions.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&G.length<65536){const se=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);se&&(Y=se.html,ne=se.mode)}return{isFromEmptySelection:U,multicursorText:F,text:G,html:Y,mode:ne}},getScreenReaderContent:()=>{if(this._accessibilitySupport===1){const x=this._selections[0];if(D.isMacintosh&&x.isEmpty()){const U=x.getStartPosition();let F=this._getWordBeforePosition(U);if(F.length===0&&(F=this._getCharacterBeforePosition(U)),F.length>0)return new v.TextAreaState(F,F.length,F.length,u.Range.fromPositions(U),0)}const W=500;if(D.isMacintosh&&!x.isEmpty()&&A.getValueLengthInRange(x,0)0)return new v.TextAreaState(U,F,F,u.Range.fromPositions(W),0)}return v.TextAreaState.EMPTY}return v.PagedScreenReaderStrategy.fromEditorSelection(A,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(x,W,U)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(x,W,U)},O=this._register(new _.TextAreaWrapper(this.textArea.domNode));this._textAreaInput=this._register(new _.TextAreaInput(P,O,D.OS,{isAndroid:I.isAndroid,isChrome:I.isChrome,isFirefox:I.isFirefox,isSafari:I.isSafari})),this._register(this._textAreaInput.onKeyDown(x=>{this._viewController.emitKeyDown(x)})),this._register(this._textAreaInput.onKeyUp(x=>{this._viewController.emitKeyUp(x)})),this._register(this._textAreaInput.onPaste(x=>{let W=!1,U=null,F=null;x.metadata&&(W=this._emptySelectionClipboard&&!!x.metadata.isFromEmptySelection,U=typeof x.metadata.multicursorText<"u"?x.metadata.multicursorText:null,F=x.metadata.mode),this._viewController.paste(x.text,W,U,F)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(x=>{x.replacePrevCharCnt||x.replaceNextCharCnt||x.positionDelta?(v._debugComposition&&console.log(` => compositionType: <<${x.text}>>, ${x.replacePrevCharCnt}, ${x.replaceNextCharCnt}, ${x.positionDelta}`),this._viewController.compositionType(x.text,x.replacePrevCharCnt,x.replaceNextCharCnt,x.positionDelta)):(v._debugComposition&&console.log(` => type: <<${x.text}>>`),this._viewController.type(x.text))})),this._register(this._textAreaInput.onSelectionChangeRequest(x=>{this._viewController.setSelection(x)})),this._register(this._textAreaInput.onCompositionStart(x=>{const W=this.textArea.domNode,U=this._modelSelections[0],{distanceToModelLineStart:F,widthOfHiddenTextBefore:G}=(()=>{const ne=W.value.substring(0,Math.min(W.selectionStart,W.selectionEnd)),se=ne.lastIndexOf(` -`),J=ne.substring(se+1),q=J.lastIndexOf(" "),H=J.length-q-1,V=U.getStartPosition(),Z=Math.min(V.column-1,H),ee=V.column-1-Z,le=J.substring(0,J.length-Z),{tabSize:ue}=this._context.viewModel.model.getOptions(),de=b(this.textArea.domNode.ownerDocument,le,this._fontInfo,ue);return{distanceToModelLineStart:ee,widthOfHiddenTextBefore:de}})(),{distanceToModelLineEnd:Y}=(()=>{const ne=W.value.substring(Math.max(W.selectionStart,W.selectionEnd)),se=ne.indexOf(` -`),J=se===-1?ne:ne.substring(0,se),q=J.indexOf(" "),H=q===-1?J.length:J.length-q-1,V=U.getEndPosition(),Z=Math.min(this._context.viewModel.model.getLineMaxColumn(V.lineNumber)-V.column,H);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(V.lineNumber)-V.column-Z}})();this._context.viewModel.revealRange("keyboard",!0,u.Range.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new g(this._context,U.startLineNumber,F,G,Y),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(x=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off"),this._render(),this.textArea.setClassName(`inputarea ${d.MOUSE_CURSOR_TEXT_CSS_CLASS_NAME}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.viewModel.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.viewModel.setHasFocus(!1)})),this._register(c.IME.onDidChange(()=>{this._ensureReadOnlyAttribute()}))}writeScreenReaderContent(E){this._textAreaInput.writeScreenReaderContent(E)}dispose(){super.dispose()}_getAndroidWordAtPosition(E){const k='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',M=this._context.viewModel.getLineContent(E.lineNumber),R=(0,t.getMapForWordSeparators)(k);let B=!0,T=E.column,N=!0,A=E.column,P=0;for(;P<50&&(B||N);){if(B&&T<=1&&(B=!1),B){const O=M.charCodeAt(T-2);R.get(O)!==0?B=!1:T--}if(N&&A>M.length&&(N=!1),N){const O=M.charCodeAt(A-1);R.get(O)!==0?N=!1:A++}P++}return[M.substring(T-1,A-1),E.column-T]}_getWordBeforePosition(E){const k=this._context.viewModel.getLineContent(E.lineNumber),M=(0,t.getMapForWordSeparators)(this._context.configuration.options.get(129));let R=E.column,B=0;for(;R>1;){const T=k.charCodeAt(R-2);if(M.get(T)!==0||B>50)return k.substring(R-1,E.column-1);B++,R--}return k.substring(0,E.column-1)}_getCharacterBeforePosition(E){if(E.column>1){const M=this._context.viewModel.getLineContent(E.lineNumber).charAt(E.column-2);if(!S.isHighSurrogate(M.charCodeAt(0)))return M}return""}_getAriaLabel(E){var k,M,R;if(E.get(2)===1){const T=(k=this._keybindingService.lookupKeybinding("editor.action.toggleScreenReaderAccessibilityMode"))===null||k===void 0?void 0:k.getAriaLabel(),N=(M=this._keybindingService.lookupKeybinding("workbench.action.showCommands"))===null||M===void 0?void 0:M.getAriaLabel(),A=(R=this._keybindingService.lookupKeybinding("workbench.action.openGlobalKeybindings"))===null||R===void 0?void 0:R.getAriaLabel(),P=L.localize(1,null);return T?L.localize(2,null,P,T):N?L.localize(3,null,P,N):A?L.localize(4,null,P,A):P}return E.get(4)}_setAccessibilityOptions(E){this._accessibilitySupport=E.get(2);const k=E.get(3);this._accessibilitySupport===2&&k===n.EditorOptions.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=k;const R=E.get(143).wrappingColumn;if(R!==-1&&this._accessibilitySupport!==1){const B=E.get(50);this._textAreaWrapping=!0,this._textAreaWidth=Math.round(R*B.typicalHalfwidthCharacterWidth)}else this._textAreaWrapping=!1,this._textAreaWidth=h?0:1}onConfigurationChanged(E){const k=this._context.configuration.options,M=k.get(143);this._setAccessibilityOptions(k),this._contentLeft=M.contentLeft,this._contentWidth=M.contentWidth,this._contentHeight=M.height,this._fontInfo=k.get(50),this._lineHeight=k.get(66),this._emptySelectionClipboard=k.get(37),this._copyWithSyntaxHighlighting=k.get(25),this.textArea.setAttribute("wrap",this._textAreaWrapping&&!this._visibleTextArea?"on":"off");const{tabSize:R}=this._context.viewModel.model.getOptions();return this.textArea.domNode.style.tabSize=`${R*this._fontInfo.spaceWidth}px`,this.textArea.setAttribute("aria-label",this._getAriaLabel(k)),this.textArea.setAttribute("aria-required",k.get(5)?"true":"false"),this.textArea.setAttribute("tabindex",String(k.get(123))),(E.hasChanged(34)||E.hasChanged(90))&&this._ensureReadOnlyAttribute(),E.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(E){return this._selections=E.selections.slice(0),this._modelSelections=E.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(E){return!0}onFlushed(E){return!0}onLinesChanged(E){return!0}onLinesDeleted(E){return!0}onLinesInserted(E){return!0}onScrollChanged(E){return this._scrollLeft=E.scrollLeft,this._scrollTop=E.scrollTop,!0}onZonesChanged(E){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(E){E.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",E.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),E.role&&this.textArea.setAttribute("role",E.role)}_ensureReadOnlyAttribute(){const E=this._context.configuration.options;!c.IME.enabled||E.get(34)&&E.get(90)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")}prepareRender(E){var k;this._primaryCursorPosition=new r.Position(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=E.visibleRangeForPosition(this._primaryCursorPosition),(k=this._visibleTextArea)===null||k===void 0||k.prepareRender(E)}render(E){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){var E;if(this._visibleTextArea){const R=this._visibleTextArea.visibleTextareaStart,B=this._visibleTextArea.visibleTextareaEnd,T=this._visibleTextArea.startPosition,N=this._visibleTextArea.endPosition;if(T&&N&&R&&B&&B.left>=this._scrollLeft&&R.left<=this._scrollLeft+this._contentWidth){const A=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,P=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let O=this._visibleTextArea.widthOfHiddenLineTextBefore,x=this._contentLeft+R.left-this._scrollLeft,W=B.left-R.left+1;if(xthis._contentWidth&&(W=this._contentWidth);const U=this._context.viewModel.getViewLineData(T.lineNumber),F=U.tokens.findTokenIndexAtOffset(T.column-1),G=U.tokens.findTokenIndexAtOffset(N.column-1),Y=F===G,ne=this._visibleTextArea.definePresentation(Y?U.tokens.getPresentation(F):null);this.textArea.domNode.scrollTop=P*this._lineHeight,this.textArea.domNode.scrollLeft=O,this._doRender({lastRenderPosition:null,top:A,left:x,width:W,height:this._lineHeight,useCover:!1,color:(l.TokenizationRegistry.getColorMap()||[])[ne.foreground],italic:ne.italic,bold:ne.bold,underline:ne.underline,strikethrough:ne.strikethrough})}return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const k=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(kthis._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const M=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(M<0||M>this._contentHeight){this._renderAtTopLeft();return}if(D.isMacintosh){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:M,left:this._textAreaWrapping?this._contentLeft:k,width:this._textAreaWidth,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const R=(E=this._textAreaInput.textAreaState.newlineCountBeforeSelection)!==null&&E!==void 0?E:this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=R*this._lineHeight;return}this._doRender({lastRenderPosition:this._primaryCursorPosition,top:M,left:this._textAreaWrapping?this._contentLeft:k,width:this._textAreaWidth,height:h?0:1,useCover:!1})}_newlinecount(E){let k=0,M=-1;do{if(M=E.indexOf(` -`,M+1),M===-1)break;k++}while(!0);return k}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:this._textAreaWidth,height:h?0:1,useCover:!0})}_doRender(E){this._lastRenderPosition=E.lastRenderPosition;const k=this.textArea,M=this.textAreaCover;(0,m.applyFontInfo)(k,this._fontInfo),k.setTop(E.top),k.setLeft(E.left),k.setWidth(E.width),k.setHeight(E.height),k.setColor(E.color?o.Color.Format.CSS.formatHex(E.color):""),k.setFontStyle(E.italic?"italic":""),E.bold&&k.setFontWeight("bold"),k.setTextDecoration(`${E.underline?" underline":""}${E.strikethrough?" line-through":""}`),M.setTop(E.useCover?E.top:0),M.setLeft(E.useCover?E.left:0),M.setWidth(E.useCover?E.width:0),M.setHeight(E.useCover?E.height:0);const R=this._context.configuration.options;R.get(57)?M.setClassName("monaco-editor-background textAreaCover "+i.Margin.OUTER_CLASS_NAME):R.get(67).renderType!==0?M.setClassName("monaco-editor-background textAreaCover "+s.LineNumbersOverlay.CLASS_NAME):M.setClassName("monaco-editor-background textAreaCover")}};e.TextAreaHandler=p,e.TextAreaHandler=p=Ie([ge(3,a.IKeybindingService)],p);function b(w,E,k,M){if(E.length===0)return 0;const R=w.createElement("div");R.style.position="absolute",R.style.top="-50000px",R.style.width="50000px";const B=w.createElement("span");(0,m.applyFontInfo)(B,k),B.style.whiteSpace="pre",B.style.tabSize=`${M*k.spaceWidth}px`,B.append(E),R.appendChild(B),w.body.appendChild(R);const T=B.offsetWidth;return w.body.removeChild(R),T}}),define(te[847],ie([1,0,38,36,53,12,29,78,82,13]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DecorationsOverviewRuler=void 0;class C{constructor(n,t){const r=n.options;this.lineHeight=r.get(66),this.pixelRatio=r.get(141),this.overviewRulerLanes=r.get(82),this.renderBorder=r.get(81);const u=t.getColor(m.editorOverviewRulerBorder);this.borderColor=u?u.toString():null,this.hideCursor=r.get(59);const f=t.getColor(m.editorCursorForeground);this.cursorColor=f?f.transparent(.7).toString():null,this.themeType=t.type;const d=r.get(72),l=d.enabled,o=d.side,c=t.getColor(m.editorOverviewRulerBackground),a=S.TokenizationRegistry.getDefaultBackground();c?this.backgroundColor=c:l&&o==="right"?this.backgroundColor=a:this.backgroundColor=null;const h=r.get(143).overviewRuler;this.top=h.top,this.right=h.right,this.domWidth=h.width,this.domHeight=h.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[p,b]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=p,this.w=b}_initLanes(n,t,r){const u=t-n;if(r>=3){const f=Math.floor(u/3),d=Math.floor(u/3),l=u-f-d,o=n,c=o+f,a=o+f+l;return[[0,o,c,o,a,o,c,o],[0,f,l,f+l,d,f+l+d,l+d,f+l+d]]}else if(r===2){const f=Math.floor(u/2),d=u-f,l=n,o=l+f;return[[0,l,l,l,o,l,l,l],[0,f,f,f,d,f+d,f+d,f+d]]}else{const f=n,d=u;return[[0,f,f,f,f,f,f,f],[0,d,d,d,d,d,d,d]]}}equals(n){return this.lineHeight===n.lineHeight&&this.pixelRatio===n.pixelRatio&&this.overviewRulerLanes===n.overviewRulerLanes&&this.renderBorder===n.renderBorder&&this.borderColor===n.borderColor&&this.hideCursor===n.hideCursor&&this.cursorColor===n.cursorColor&&this.themeType===n.themeType&&I.Color.equals(this.backgroundColor,n.backgroundColor)&&this.top===n.top&&this.right===n.right&&this.domWidth===n.domWidth&&this.domHeight===n.domHeight&&this.canvasWidth===n.canvasWidth&&this.canvasHeight===n.canvasHeight}}class s extends y.ViewPart{constructor(n){super(n),this._actualShouldRender=0,this._renderedDecorations=[],this._renderedCursorPositions=[],this._domNode=(0,L.createFastDomNode)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=S.TokenizationRegistry.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(n){const t=new C(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(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,n&&this._render(),!0)}_markRenderingIsNeeded(){return this._actualShouldRender=2,!0}_markRenderingIsMaybeNeeded(){return this._actualShouldRender=1,!0}onConfigurationChanged(n){return this._updateSettings(!1)?this._markRenderingIsNeeded():!1}onCursorStateChanged(n){this._cursorPositions=[];for(let t=0,r=n.selections.length;tb.lineNumber===w.lineNumber)&&(this._actualShouldRender=2),this._actualShouldRender===1)return;this._renderedDecorations=t,this._renderedCursorPositions=this._cursorPositions,this._domNode.setDisplay("block");const r=this._settings.canvasWidth,u=this._settings.canvasHeight,f=this._settings.lineHeight,d=this._context.viewLayout,l=this._context.viewLayout.getScrollHeight(),o=u/l,c=6*this._settings.pixelRatio|0,a=c/2|0,g=this._domNode.domNode.getContext("2d");n?n.isOpaque()?(g.fillStyle=I.Color.Format.CSS.formatHexA(n),g.fillRect(0,0,r,u)):(g.clearRect(0,0,r,u),g.fillStyle=I.Color.Format.CSS.formatHexA(n),g.fillRect(0,0,r,u)):g.clearRect(0,0,r,u);const h=this._settings.x,p=this._settings.w;for(const b of t){const w=b.color,E=b.data;g.fillStyle=w;let k=0,M=0,R=0;for(let B=0,T=E.length/3;Bu&&(U=u-a),O=U-a,x=U+a}O>R+1||N!==k?(B!==0&&g.fillRect(h[k],M,p[k],R-M),k=N,M=O,R=x):x>R&&(R=x)}g.fillRect(h[k],M,p[k],R-M)}if(!this._settings.hideCursor&&this._settings.cursorColor){const b=2*this._settings.pixelRatio|0,w=b/2|0,E=this._settings.x[7],k=this._settings.w[7];g.fillStyle=this._settings.cursorColor;let M=-100,R=-100;for(let B=0,T=this._cursorPositions.length;Bu&&(A=u-w);const P=A-w,O=P+b;P>R+1?(B!==0&&g.fillRect(E,M,k,R-M),M=P,R=O):O>R&&(R=O)}g.fillRect(E,M,k,R-M)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(g.beginPath(),g.lineWidth=1,g.strokeStyle=this._settings.borderColor,g.moveTo(0,0),g.lineTo(0,u),g.stroke(),g.moveTo(0,0),g.lineTo(r,0),g.stroke())}}e.DecorationsOverviewRuler=s}),define(te[848],ie([1,0,38,14,53,620,39,78,23,86,435]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewCursors=void 0;class C extends y.ViewPart{constructor(i){super(i);const n=this._context.configuration.options;this._readOnly=n.get(90),this._cursorBlinking=n.get(26),this._cursorStyle=n.get(28),this._cursorSmoothCaretAnimation=n.get(27),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new D.ViewCursor(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,L.createFastDomNode)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new I.TimeoutTimer,this._cursorFlatBlinkInterval=new I.IntervalTimer,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(i){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(i){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(i){const n=this._context.configuration.options;this._readOnly=n.get(90),this._cursorBlinking=n.get(26),this._cursorStyle=n.get(28),this._cursorSmoothCaretAnimation=n.get(27),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(i);for(let t=0,r=this._secondaryCursors.length;tn.length){const u=this._secondaryCursors.length-n.length;for(let f=0;f{for(let r=0,u=i.ranges.length;r{this._isVisible?this._hide():this._show()},C.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},C.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let i="cursors-layer";switch(this._selectionIsEmpty||(i+=" has-selection"),this._cursorStyle){case S.TextEditorCursorStyle.Line:i+=" cursor-line-style";break;case S.TextEditorCursorStyle.Block:i+=" cursor-block-style";break;case S.TextEditorCursorStyle.Underline:i+=" cursor-underline-style";break;case S.TextEditorCursorStyle.LineThin:i+=" cursor-line-thin-style";break;case S.TextEditorCursorStyle.BlockOutline:i+=" cursor-block-outline-style";break;case S.TextEditorCursorStyle.UnderlineThin:i+=" cursor-underline-thin-style";break;default:i+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:i+=" cursor-blink";break;case 2:i+=" cursor-smooth";break;case 3:i+=" cursor-phase";break;case 4:i+=" cursor-expand";break;case 5:i+=" cursor-solid";break;default:i+=" cursor-solid"}else i+=" cursor-solid";return(this._cursorSmoothCaretAnimation==="on"||this._cursorSmoothCaretAnimation==="explicit")&&(i+=" cursor-smooth-caret-animation"),i}_show(){this._primaryCursor.show();for(let i=0,n=this._secondaryCursors.length;i{const n=s.getColor(m.editorCursorForeground);if(n){let t=s.getColor(m.editorCursorBackground);t||(t=n.opposite()),i.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${n}; border-color: ${n}; color: ${t}; }`),(0,v.isHighContrast)(s.type)&&i.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${t}; border-right: 1px solid ${t}; }`)}})}),define(te[849],ie([1,0,111,10,114,12,78,436]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WhitespaceOverlay=void 0;class m extends L.DynamicViewOverlay{constructor(C){super(),this._context=C,this._options=new _(this._context.configuration),this._selection=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(C){const s=new _(this._context.configuration);return this._options.equals(s)?C.hasChanged(143):(this._options=s,!0)}onCursorStateChanged(C){return this._selection=C.selections,this._options.renderWhitespace==="selection"}onDecorationsChanged(C){return!0}onFlushed(C){return!0}onLinesChanged(C){return!0}onLinesDeleted(C){return!0}onLinesInserted(C){return!0}onScrollChanged(C){return C.scrollTopChanged}onZonesChanged(C){return!0}prepareRender(C){if(this._options.renderWhitespace==="none"){this._renderResult=null;return}const s=C.visibleRange.startLineNumber,n=C.visibleRange.endLineNumber-s+1,t=new Array(n);for(let u=0;uu)continue;const a=c.startLineNumber===u?c.startColumn:d.minColumn,g=c.endLineNumber===u?c.endColumn:d.maxColumn;a=A.endOffset&&(N++,A=i&&i[N]),x!==9&&x!==32||c&&!R&&O<=T)continue;if(o&&O>=B&&O<=T&&x===32){const U=O-1>=0?u.charCodeAt(O-1):0,F=O+1=0?u.charCodeAt(O-1):0;if(x===32&&U!==32&&U!==9)continue}if(i&&(!A||A.startOffset>O||A.endOffset<=O))continue;const W=C.visibleRangeForPosition(new D.Position(s,O+1));W&&(r?(P=Math.max(P,W.left),x===9?M+=this._renderArrow(a,p,W.left):M+=``):x===9?M+=`
    ${k?String.fromCharCode(65515):String.fromCharCode(8594)}
    `:M+=`
    ${String.fromCharCode(E)}
    `)}return r?(P=Math.round(P+p),``+M+""):M}_renderArrow(C,s,i){const n=s/7,t=s,r=C/2,u=i,f={x:0,y:n/2},d={x:100/125*t,y:f.y},l={x:d.x-.2*d.x,y:d.y+.2*d.x},o={x:l.x+.1*d.x,y:l.y+.1*d.x},c={x:o.x+.35*d.x,y:o.y-.35*d.x},a={x:c.x,y:-c.y},g={x:o.x,y:-o.y},h={x:l.x,y:-l.y},p={x:d.x,y:-d.y},b={x:f.x,y:-f.y};return``}render(C,s){if(!this._renderResult)return"";const i=s-C;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}e.WhitespaceOverlay=m;class _{constructor(C){const s=C.options,i=s.get(50),n=s.get(38);n==="off"?(this.renderWhitespace="none",this.renderWithSVG=!1):n==="svg"?(this.renderWhitespace=s.get(98),this.renderWithSVG=!0):(this.renderWhitespace=s.get(98),this.renderWithSVG=!1),this.spaceWidth=i.spaceWidth,this.middotWidth=i.middotWidth,this.wsmiddotWidth=i.wsmiddotWidth,this.canUseHalfwidthRightwardsArrow=i.canUseHalfwidthRightwardsArrow,this.lineHeight=s.get(66),this.stopRenderingLineAfter=s.get(116)}equals(C){return this.renderWhitespace===C.renderWhitespace&&this.renderWithSVG===C.renderWithSVG&&this.spaceWidth===C.spaceWidth&&this.middotWidth===C.middotWidth&&this.wsmiddotWidth===C.wsmiddotWidth&&this.canUseHalfwidthRightwardsArrow===C.canUseHalfwidthRightwardsArrow&&this.lineHeight===C.lineHeight&&this.stopRenderingLineAfter===C.stopRenderingLineAfter}}}),define(te[850],ie([1,0,7,24,5,38,9,836,846,792,272,596,53,592,844,525,841,845,361,837,526,292,527,822,528,847,537,529,530,842,848,531,12,142,538,534,148,23,358,524,258,849,211,49,8]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M,R,B,T,N,A,P,O,x,W,U,F,G,Y,ne){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.View=void 0;let se=class extends P.ViewEventHandler{constructor(H,V,Z,ee,le,ue,de){super(),this._instantiationService=de,this._shouldRecomputeGlyphMarginLanes=!1,this._selections=[new I.Selection(1,1,1,1)],this._renderAnimationFrame=null;const ce=new v.ViewController(V,ee,le,H);this._context=new N.ViewContext(V,Z,ee),this._context.addEventHandler(this),this._viewParts=[],this._textAreaHandler=this._instantiationService.createInstance(_.TextAreaHandler,this._context,ce,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=(0,D.createFastDomNode)(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=(0,D.createFastDomNode)(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=(0,D.createFastDomNode)(document.createElement("div")),i.PartFingerprints.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new u.EditorScrollbar(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new l.ViewLines(this._context,this._linesContent),this._viewZones=new R.ViewZones(this._context),this._viewParts.push(this._viewZones);const ae=new p.DecorationsOverviewRuler(this._context);this._viewParts.push(ae);const X=new E.ScrollDecorationViewPart(this._context);this._viewParts.push(X);const K=new s.ContentViewOverlays(this._context);this._viewParts.push(K),K.addDynamicOverlay(new t.CurrentLineHighlightOverlay(this._context)),K.addDynamicOverlay(new k.SelectionsOverlay(this._context)),K.addDynamicOverlay(new f.IndentGuidesOverlay(this._context)),K.addDynamicOverlay(new r.DecorationsOverlay(this._context)),K.addDynamicOverlay(new F.WhitespaceOverlay(this._context));const z=new s.MarginViewOverlays(this._context);this._viewParts.push(z),z.addDynamicOverlay(new t.CurrentLineMarginHighlightOverlay(this._context)),z.addDynamicOverlay(new a.MarginViewLineDecorationsOverlay(this._context)),z.addDynamicOverlay(new o.LinesDecorationsOverlay(this._context)),z.addDynamicOverlay(new d.LineNumbersOverlay(this._context)),this._glyphMarginWidgets=new G.GlyphMarginWidgets(this._context),this._viewParts.push(this._glyphMarginWidgets);const Q=new c.Margin(this._context);Q.getDomNode().appendChild(this._viewZones.marginDomNode),Q.getDomNode().appendChild(z.getDomNode()),Q.getDomNode().appendChild(this._glyphMarginWidgets.domNode),this._viewParts.push(Q),this._contentWidgets=new n.ViewContentWidgets(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new M.ViewCursors(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new h.ViewOverlayWidgets(this._context),this._viewParts.push(this._overlayWidgets);const j=new w.Rulers(this._context);this._viewParts.push(j);const re=new W.BlockDecorations(this._context);this._viewParts.push(re);const oe=new g.Minimap(this._context);if(this._viewParts.push(oe),ae){const he=this._scrollbar.getOverviewRulerLayoutInfo();he.parent.insertBefore(ae.getDomNode(),he.insertBefore)}this._linesContent.appendChild(K.getDomNode()),this._linesContent.appendChild(j.domNode),this._linesContent.appendChild(this._viewZones.domNode),this._linesContent.appendChild(this._viewLines.getDomNode()),this._linesContent.appendChild(this._contentWidgets.domNode),this._linesContent.appendChild(this._viewCursors.getDomNode()),this._overflowGuardContainer.appendChild(Q.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(X.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(oe.getDomNode()),this._overflowGuardContainer.appendChild(re.domNode),this.domNode.appendChild(this._overflowGuardContainer),ue?ue.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode.domNode):this.domNode.appendChild(this._contentWidgets.overflowingContentWidgetsDomNode),this._applyLayout(),this._pointerHandler=this._register(new m.PointerHandler(this._context,ce,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._shouldRecomputeGlyphMarginLanes&&(this._shouldRecomputeGlyphMarginLanes=!1,this._context.configuration.setGlyphMarginDecorationLaneCount(this._computeGlyphMarginLaneCount())),U.inputLatency.onRenderStart(),this._renderNow()}_computeGlyphMarginLaneCount(){const H=this._context.viewModel.model;let V=[];V=V.concat(H.getAllMarginDecorations().map(le=>{var ue,de;const ce=(de=(ue=le.options.glyphMargin)===null||ue===void 0?void 0:ue.position)!==null&&de!==void 0?de:Y.GlyphMarginLane.Left;return{range:le.range,lane:ce}})),V=V.concat(this._glyphMarginWidgets.getWidgets().map(le=>({range:H.validateRange(le.preference.range),lane:le.preference.lane}))),V.sort((le,ue)=>y.Range.compareRangesUsingStarts(le.range,ue.range));let Z=null,ee=null;for(const le of V)if(le.lane===Y.GlyphMarginLane.Left&&(!Z||y.Range.compareRangesUsingEnds(Z,le.range)<0)&&(Z=le.range),le.lane===Y.GlyphMarginLane.Right&&(!ee||y.Range.compareRangesUsingEnds(ee,le.range)<0)&&(ee=le.range),Z&&ee){if(Z.endLineNumber{this.focus()},dispatchTextAreaEvent:H=>{this._textAreaHandler.textArea.domNode.dispatchEvent(H)},getLastRenderData:()=>{const H=this._viewCursors.getLastRenderData()||[],V=this._textAreaHandler.getLastRenderData();return new x.PointerHandlerLastRenderData(H,V)},renderNow:()=>{this.render(!0,!1)},shouldSuppressMouseDownOnViewZone:H=>this._viewZones.shouldSuppressMouseDownOnViewZone(H),shouldSuppressMouseDownOnWidget:H=>this._contentWidgets.shouldSuppressMouseDownOnWidget(H),getPositionFromDOMInfo:(H,V)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(H,V)),visibleRangeForPosition:(H,V)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new B.Position(H,V))),getLineWidth:H=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(H))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:H=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(H))}}_applyLayout(){const V=this._context.configuration.options.get(143);this.domNode.setWidth(V.width),this.domNode.setHeight(V.height),this._overflowGuardContainer.setWidth(V.width),this._overflowGuardContainer.setHeight(V.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const H=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(140)+" "+(0,O.getThemeTypeSelector)(this._context.theme.type)+H}handleEvents(H){super.handleEvents(H),this._scheduleRender()}onConfigurationChanged(H){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(H){return this._selections=H.selections,!1}onDecorationsChanged(H){return H.affectsGlyphMargin&&(this._shouldRecomputeGlyphMarginLanes=!0),!1}onFocusChanged(H){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(H){return this._context.theme.update(H.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const H of this._viewParts)H.dispose();super.dispose()}_scheduleRender(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=L.runAtThisOrScheduleAtNextAnimationFrame(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){J(()=>this._actualRender())}_getViewPartsToRender(){const H=[];let V=0;for(const Z of this._viewParts)Z.shouldRender()&&(H[V++]=Z);return H}_actualRender(){if(!L.isInDOM(this.domNode.domNode))return;let H=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&H.length===0)return;const V=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(V.startLineNumber,V.endLineNumber,V.centeredLineNumber);const Z=new A.ViewportData(this._selections,V,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(Z),this._viewLines.shouldRender()&&(this._viewLines.renderText(Z),this._viewLines.onDidRender(),H=this._getViewPartsToRender());const ee=new T.RenderingContext(this._context.viewLayout,Z,this._viewLines);for(const le of H)le.prepareRender(ee);for(const le of H)le.render(ee),le.onDidRender()}delegateVerticalScrollbarPointerDown(H){this._scrollbar.delegateVerticalScrollbarPointerDown(H)}delegateScrollFromMouseWheelEvent(H){this._scrollbar.delegateScrollFromMouseWheelEvent(H)}restoreState(H){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:H.scrollTop,scrollLeft:H.scrollLeft},1),this._context.viewModel.visibleLinesStabilized()}getOffsetForColumn(H,V){const Z=this._context.viewModel.model.validatePosition({lineNumber:H,column:V}),ee=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(Z);this._flushAccumulatedAndRenderNow();const le=this._viewLines.visibleRangeForPosition(new B.Position(ee.lineNumber,ee.column));return le?le.left:-1}getTargetAtClientPoint(H,V){const Z=this._pointerHandler.getTargetAtClientPoint(H,V);return Z?C.ViewUserInputEvents.convertViewToModelMouseTarget(Z,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(H){return new b.OverviewRuler(this._context,H)}change(H){this._viewZones.changeViewZones(H),this._scheduleRender()}render(H,V){if(V){this._viewLines.forceShouldRender();for(const Z of this._viewParts)Z.forceShouldRender()}H?this._flushAccumulatedAndRenderNow():this._scheduleRender()}writeScreenReaderContent(H){this._textAreaHandler.writeScreenReaderContent(H)}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(H){this._textAreaHandler.setAriaOptions(H)}addContentWidget(H){this._contentWidgets.addWidget(H.widget),this.layoutContentWidget(H),this._scheduleRender()}layoutContentWidget(H){var V,Z,ee,le,ue,de,ce,ae;this._contentWidgets.setWidgetPosition(H.widget,(Z=(V=H.position)===null||V===void 0?void 0:V.position)!==null&&Z!==void 0?Z:null,(le=(ee=H.position)===null||ee===void 0?void 0:ee.secondaryPosition)!==null&&le!==void 0?le:null,(de=(ue=H.position)===null||ue===void 0?void 0:ue.preference)!==null&&de!==void 0?de:null,(ae=(ce=H.position)===null||ce===void 0?void 0:ce.positionAffinity)!==null&&ae!==void 0?ae:null),this._scheduleRender()}removeContentWidget(H){this._contentWidgets.removeWidget(H.widget),this._scheduleRender()}addOverlayWidget(H){this._overlayWidgets.addWidget(H.widget),this.layoutOverlayWidget(H),this._scheduleRender()}layoutOverlayWidget(H){const V=H.position?H.position.preference:null;this._overlayWidgets.setWidgetPosition(H.widget,V)&&this._scheduleRender()}removeOverlayWidget(H){this._overlayWidgets.removeWidget(H.widget),this._scheduleRender()}addGlyphMarginWidget(H){this._glyphMarginWidgets.addWidget(H.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}layoutGlyphMarginWidget(H){const V=H.position;this._glyphMarginWidgets.setWidgetPosition(H.widget,V)&&(this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender())}removeGlyphMarginWidget(H){this._glyphMarginWidgets.removeWidget(H.widget),this._shouldRecomputeGlyphMarginLanes=!0,this._scheduleRender()}};e.View=se,e.View=se=Ie([ge(6,ne.IInstantiationService)],se);function J(q){try{return q()}catch(H){(0,S.onUnexpectedError)(H)}}}),define(te[851],ie([1,0,6,2,5,78,23]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorizedBracketPairsDecorationProvider=void 0;class m extends I.Disposable{constructor(C){super(),this.textModel=C,this.colorProvider=new _,this.onDidChangeEmitter=new L.Emitter,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=C.getOptions().bracketPairColorizationOptions,this._register(C.bracketPairs.onDidChange(s=>{this.onDidChangeEmitter.fire()}))}handleDidChangeOptions(C){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(C,s,i,n){return n?[]:s===void 0?[]:this.colorizationOptions.enabled?this.textModel.bracketPairs.getBracketsInRange(C,!0).map(r=>({id:`bracket${r.range.toString()}-${r.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(r,this.colorizationOptions.independentColorPoolPerBracketType)},ownerId:0,range:r.range})).toArray():[]}getAllDecorations(C,s){return C===void 0?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new y.Range(1,1,this.textModel.getLineCount(),1),C,s):[]}}e.ColorizedBracketPairsDecorationProvider=m;class _{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(C,s){return C.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(s?C.nestingLevelOfEqualBracketType:C.nestingLevel)}getInlineClassNameOfLevel(C){return`bracket-highlighting-${C%30}`}}(0,S.registerThemingParticipant)((v,C)=>{const s=[D.editorBracketHighlightingForeground1,D.editorBracketHighlightingForeground2,D.editorBracketHighlightingForeground3,D.editorBracketHighlightingForeground4,D.editorBracketHighlightingForeground5,D.editorBracketHighlightingForeground6],i=new _;C.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${v.getColor(D.editorBracketHighlightingUnexpectedBracketForeground)}; }`);const n=s.map(t=>v.getColor(t)).filter(t=>!!t).filter(t=>!t.isTransparent());for(let t=0;t<30;t++){const r=n[t%n.length];C.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(t)} { color: ${r}; }`)}})}),define(te[852],ie([1,0,94,2,49,23,78,50,5,54,6,31,56,260]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerDecorationsService=void 0;let t=class extends I.Disposable{constructor(f,d){super(),this._markerService=d,this._onDidChangeMarker=this._register(new C.Emitter),this._markerDecorations=new i.ResourceMap,f.getModels().forEach(l=>this._onModelAdded(l)),this._register(f.onModelAdded(this._onModelAdded,this)),this._register(f.onModelRemoved(this._onModelRemoved,this)),this._register(this._markerService.onMarkerChanged(this._handleMarkerChange,this))}dispose(){super.dispose(),this._markerDecorations.forEach(f=>f.dispose()),this._markerDecorations.clear()}getMarker(f,d){const l=this._markerDecorations.get(f);return l&&l.getMarker(d)||null}_handleMarkerChange(f){f.forEach(d=>{const l=this._markerDecorations.get(d);l&&this._updateDecorations(l)})}_onModelAdded(f){const d=new r(f);this._markerDecorations.set(f.uri,d),this._updateDecorations(d)}_onModelRemoved(f){var d;const l=this._markerDecorations.get(f.uri);l&&(l.dispose(),this._markerDecorations.delete(f.uri)),(f.uri.scheme===v.Schemas.inMemory||f.uri.scheme===v.Schemas.internal||f.uri.scheme===v.Schemas.vscode)&&((d=this._markerService)===null||d===void 0||d.read({resource:f.uri}).map(o=>o.owner).forEach(o=>this._markerService.remove(o,[f.uri])))}_updateDecorations(f){const d=this._markerService.read({resource:f.model.uri,take:500});f.update(d)&&this._onDidChangeMarker.fire(f.model)}};e.MarkerDecorationsService=t,e.MarkerDecorationsService=t=Ie([ge(0,m.IModelService),ge(1,L.IMarkerService)],t);class r extends I.Disposable{constructor(f){super(),this.model=f,this._map=new i.BidirectionalMap,this._register((0,I.toDisposable)(()=>{this.model.deltaDecorations([...this._map.values()],[]),this._map.clear()}))}update(f){const{added:d,removed:l}=(0,n.diffSets)(new Set(this._map.keys()),new Set(f));if(d.length===0&&l.length===0)return!1;const o=l.map(g=>this._map.get(g)),c=d.map(g=>({range:this._createDecorationRange(this.model,g),options:this._createDecorationOption(g)})),a=this.model.deltaDecorations(o,c);for(const g of l)this._map.delete(g);for(let g=0;g=o)return l;const c=f.getWordAtPosition(l.getStartPosition());c&&(l=new _.Range(l.startLineNumber,c.startColumn,l.endLineNumber,c.endColumn))}else if(d.endColumn===Number.MAX_VALUE&&d.startColumn===1&&l.startLineNumber===l.endLineNumber){const o=f.getLineFirstNonWhitespaceColumn(d.startLineNumber);o=0:!1}}}),define(te[250],ie([1,0,124,23,66,522,42]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toMultilineTokens2=e.SemanticTokensProviderStyling=void 0;let m=class{constructor(i,n,t,r){this._legend=i,this._themeService=n,this._languageService=t,this._logService=r,this._hasWarnedOverlappingTokens=!1,this._hasWarnedInvalidLengthTokens=!1,this._hasWarnedInvalidEditStart=!1,this._hashTable=new C}getMetadata(i,n,t){const r=this._languageService.languageIdCodec.encodeLanguageId(t),u=this._hashTable.get(i,n,r);let f;if(u)f=u.metadata,this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${i} / ${n}: foreground ${L.TokenMetadata.getForeground(f)}, fontStyle ${L.TokenMetadata.getFontStyle(f).toString(2)}`);else{let d=this._legend.tokenTypes[i];const l=[];if(d){let o=n;for(let a=0;o>0&&a>1;o>0&&this._logService.getLevel()===y.LogLevel.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${n.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(d,l,t);if(typeof c>"u")f=2147483647;else{if(f=0,typeof c.italic<"u"){const a=(c.italic?1:0)<<11;f|=a|1}if(typeof c.bold<"u"){const a=(c.bold?2:0)<<11;f|=a|2}if(typeof c.underline<"u"){const a=(c.underline?4:0)<<11;f|=a|4}if(typeof c.strikethrough<"u"){const a=(c.strikethrough?8:0)<<11;f|=a|8}if(c.foreground){const a=c.foreground<<15;f|=a|16}f===0&&(f=2147483647)}}else this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${i} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),f=2147483647,d="not-in-legend";this._hashTable.add(i,n,r,f),this._logService.getLevel()===y.LogLevel.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${i} (${d}) / ${n} (${l.join(" ")}): foreground ${L.TokenMetadata.getForeground(f)}, fontStyle ${L.TokenMetadata.getFontStyle(f).toString(2)}`)}return f}warnOverlappingSemanticTokens(i,n){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${i}, column ${n}`))}warnInvalidLengthSemanticTokens(i,n){this._hasWarnedInvalidLengthTokens||(this._hasWarnedInvalidLengthTokens=!0,console.warn(`Semantic token with invalid length detected at lineNumber ${i}, column ${n}`))}warnInvalidEditStart(i,n,t,r,u){this._hasWarnedInvalidEditStart||(this._hasWarnedInvalidEditStart=!0,console.warn(`Invalid semantic tokens edit detected (previousResultId: ${i}, resultId: ${n}) at edit #${t}: The provided start offset ${r} is outside the previous data (length ${u}).`))}};e.SemanticTokensProviderStyling=m,e.SemanticTokensProviderStyling=m=Ie([ge(1,I.IThemeService),ge(2,S.ILanguageService),ge(3,y.ILogService)],m);function _(s,i,n){const t=s.data,r=s.data.length/5|0,u=Math.max(Math.ceil(r/1024),400),f=[];let d=0,l=1,o=0;for(;dc&&t[5*k]===0;)k--;if(k-1===c){let M=a;for(;M+1T)i.warnOverlappingSemanticTokens(B,T+1);else{const x=i.getMetadata(P,O,n);x!==2147483647&&(p===0&&(p=B),g[h]=B-p,g[h+1]=T,g[h+2]=A,g[h+3]=x,h+=4,b=B,w=A)}l=B,o=T,d++}h!==g.length&&(g=g.subarray(0,h));const E=D.SparseMultilineTokens.create(p,g);f.push(E)}return f}e.toMultilineTokens2=_;class v{constructor(i,n,t,r){this.tokenTypeIndex=i,this.tokenModifierSet=n,this.languageId=t,this.metadata=r,this.next=null}}class C{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=C._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1=this._growCount){const u=this._elements;this._currentLengthIndex++,this._currentLength=C._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1{this._caches=new WeakMap}))}getStyling(s){return this._caches.has(s)||this._caches.set(s,new S.SemanticTokensProviderStyling(s.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(s)}};e.SemanticTokensStylingService=v,e.SemanticTokensStylingService=v=Ie([ge(0,y.IThemeService),ge(1,D.ILogService),ge(2,I.ILanguageService)],v),(0,_.registerSingleton)(m.ISemanticTokensStylingService,v,1)}),define(te[362],ie([1,0,106,2,175,49,78,23,45]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractEditorNavigationQuickAccessProvider=void 0;class v{constructor(s){this.options=s,this.rangeHighlightDecorationId=void 0}provide(s,i){var n;const t=new I.DisposableStore;s.canAcceptInBackground=!!(!((n=this.options)===null||n===void 0)&&n.canAcceptInBackground),s.matchOnLabel=s.matchOnDescription=s.matchOnDetail=s.sortByLabel=!1;const r=t.add(new I.MutableDisposable);return r.value=this.doProvide(s,i),t.add(this.onDidActiveTextEditorControlChange(()=>{r.value=void 0,r.value=this.doProvide(s,i)})),t}doProvide(s,i){var n;const t=new I.DisposableStore,r=this.activeTextEditorControl;if(r&&this.canProvideWithTextEditor(r)){const u={editor:r},f=(0,y.getCodeEditor)(r);if(f){let d=(n=r.saveViewState())!==null&&n!==void 0?n:void 0;t.add(f.onDidChangeCursorPosition(()=>{var l;d=(l=r.saveViewState())!==null&&l!==void 0?l:void 0})),u.restoreViewState=()=>{d&&r===this.activeTextEditorControl&&r.restoreViewState(d)},t.add((0,L.createSingleCallFunction)(i.onCancellationRequested)(()=>{var l;return(l=u.restoreViewState)===null||l===void 0?void 0:l.call(u)}))}t.add((0,I.toDisposable)(()=>this.clearDecorations(r))),t.add(this.provideWithTextEditor(u,s,i))}else t.add(this.provideWithoutTextEditor(s,i));return t}canProvideWithTextEditor(s){return!0}gotoLocation({editor:s},i){s.setSelection(i.range),s.revealRangeInCenter(i.range,0),i.preserveFocus||s.focus();const n=s.getModel();n&&"getLineContent"in n&&(0,_.status)(`${n.getLineContent(i.range.startLineNumber)}`)}getModel(s){var i;return(0,y.isDiffEditor)(s)?(i=s.getModel())===null||i===void 0?void 0:i.modified:s.getModel()}addDecorations(s,i){s.changeDecorations(n=>{const t=[];this.rangeHighlightDecorationId&&(t.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),t.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const r=[{range:i,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:i,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:(0,m.themeColorFromId)(S.overviewRulerRangeHighlight),position:D.OverviewRulerLane.Full}}}],[u,f]=n.deltaDecorations(t,r);this.rangeHighlightDecorationId={rangeHighlightId:u,overviewRulerDecorationId:f}})}clearDecorations(s){const i=this.rangeHighlightDecorationId;i&&(s.changeDecorations(n=>{n.deltaDecorations([i.overviewRulerDecorationId,i.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}e.AbstractEditorNavigationQuickAccessProvider=v}),define(te[854],ie([1,0,2,175,362,692]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoLineQuickAccessProvider=void 0;class S extends y.AbstractEditorNavigationQuickAccessProvider{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(_){const v=(0,D.localize)(0,null);return _.items=[{label:v}],_.ariaLabel=v,L.Disposable.None}provideWithTextEditor(_,v,C){const s=_.editor,i=new L.DisposableStore;i.add(v.onDidAccept(r=>{const[u]=v.selectedItems;if(u){if(!this.isValidLineNumber(s,u.lineNumber))return;this.gotoLocation(_,{range:this.toRange(u.lineNumber,u.column),keyMods:v.keyMods,preserveFocus:r.inBackground}),r.inBackground||v.hide()}}));const n=()=>{const r=this.parsePosition(s,v.value.trim().substr(S.PREFIX.length)),u=this.getPickLabel(s,r.lineNumber,r.column);if(v.items=[{lineNumber:r.lineNumber,column:r.column,label:u}],v.ariaLabel=u,!this.isValidLineNumber(s,r.lineNumber)){this.clearDecorations(s);return}const f=this.toRange(r.lineNumber,r.column);s.revealRangeInCenter(f,0),this.addDecorations(s,f)};n(),i.add(v.onDidChangeValue(()=>n()));const t=(0,I.getCodeEditor)(s);return t&&t.getOptions().get(67).renderType===2&&(t.updateOptions({lineNumbers:"on"}),i.add((0,L.toDisposable)(()=>t.updateOptions({lineNumbers:"relative"})))),i}toRange(_=1,v=1){return{startLineNumber:_,startColumn:v,endLineNumber:_,endColumn:v}}parsePosition(_,v){const C=v.split(/,|:|#/).map(i=>parseInt(i,10)).filter(i=>!isNaN(i)),s=this.lineCount(_)+1;return{lineNumber:C[0]>0?C[0]:s+C[0],column:C[1]}}getPickLabel(_,v,C){if(this.isValidLineNumber(_,v))return this.isValidColumn(_,v,C)?(0,D.localize)(1,null,v,C):(0,D.localize)(2,null,v);const s=_.getPosition()||{lineNumber:1,column:1},i=this.lineCount(_);return i>1?(0,D.localize)(3,null,s.lineNumber,s.column,i):(0,D.localize)(4,null,s.lineNumber,s.column)}isValidLineNumber(_,v){return!v||typeof v!="number"?!1:v>0&&v<=this.lineCount(_)}isValidColumn(_,v,C){if(!C||typeof C!="number")return!1;const s=this.getModel(_);if(!s)return!1;const i={lineNumber:v,column:C};return s.validatePosition(i).equals(i)}lineCount(_){var v,C;return(C=(v=this.getModel(_))===null||v===void 0?void 0:v.getLineCount())!==null&&C!==void 0?C:0}}e.AbstractGotoLineQuickAccessProvider=S,S.PREFIX=":"}),define(te[855],ie([1,0,14,19,26,27,573,2,10,5,29,187,362,693,18,68]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractGotoSymbolQuickAccessProvider=void 0;let f=u=class extends i.AbstractEditorNavigationQuickAccessProvider{constructor(c,a,g=Object.create(null)){super(g),this._languageFeaturesService=c,this._outlineModelService=a,this.options=g,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(c){return this.provideLabelPick(c,(0,n.localize)(0,null)),m.Disposable.None}provideWithTextEditor(c,a,g){const h=c.editor,p=this.getModel(h);return p?this._languageFeaturesService.documentSymbolProvider.has(p)?this.doProvideWithEditorSymbols(c,p,a,g):this.doProvideWithoutEditorSymbols(c,p,a,g):m.Disposable.None}doProvideWithoutEditorSymbols(c,a,g,h){const p=new m.DisposableStore;return this.provideLabelPick(g,(0,n.localize)(1,null)),be(this,void 0,void 0,function*(){!(yield this.waitForLanguageSymbolRegistry(a,p))||h.isCancellationRequested||p.add(this.doProvideWithEditorSymbols(c,a,g,h))}),p}provideLabelPick(c,a){c.items=[{label:a,index:0,kind:14}],c.ariaLabel=a}waitForLanguageSymbolRegistry(c,a){return be(this,void 0,void 0,function*(){if(this._languageFeaturesService.documentSymbolProvider.has(c))return!0;const g=new L.DeferredPromise,h=a.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>{this._languageFeaturesService.documentSymbolProvider.has(c)&&(h.dispose(),g.complete(!0))}));return a.add((0,m.toDisposable)(()=>g.complete(!1))),g.p})}doProvideWithEditorSymbols(c,a,g,h){var p;const b=c.editor,w=new m.DisposableStore;w.add(g.onDidAccept(R=>{const[B]=g.selectedItems;B&&B.range&&(this.gotoLocation(c,{range:B.range.selection,keyMods:g.keyMods,preserveFocus:R.inBackground}),R.inBackground||g.hide())})),w.add(g.onDidTriggerItemButton(({item:R})=>{R&&R.range&&(this.gotoLocation(c,{range:R.range.selection,keyMods:g.keyMods,forceSideBySide:!0}),g.hide())}));const E=this.getDocumentSymbols(a,h);let k;const M=R=>be(this,void 0,void 0,function*(){k?.dispose(!0),g.busy=!1,k=new I.CancellationTokenSource(h),g.busy=!0;try{const B=(0,S.prepareQuery)(g.value.substr(u.PREFIX.length).trim()),T=yield this.doGetSymbolPicks(E,B,void 0,k.token);if(h.isCancellationRequested)return;if(T.length>0){if(g.items=T,R&&B.original.length===0){const N=(0,r.findLast)(T,A=>!!(A.type!=="separator"&&A.range&&v.Range.containsPosition(A.range.decoration,R)));N&&(g.activeItems=[N])}}else B.original.length>0?this.provideLabelPick(g,(0,n.localize)(2,null)):this.provideLabelPick(g,(0,n.localize)(3,null))}finally{h.isCancellationRequested||(g.busy=!1)}});return w.add(g.onDidChangeValue(()=>M(void 0))),M((p=b.getSelection())===null||p===void 0?void 0:p.getPosition()),w.add(g.onDidChangeActive(()=>{const[R]=g.activeItems;R&&R.range&&(b.revealRangeInCenter(R.range.selection,0),this.addDecorations(b,R.range.decoration))})),w}doGetSymbolPicks(c,a,g,h){var p,b;return be(this,void 0,void 0,function*(){const w=yield c;if(h.isCancellationRequested)return[];const E=a.original.indexOf(u.SCOPE_PREFIX)===0,k=E?1:0;let M,R;a.values&&a.values.length>1?(M=(0,S.pieceToQuery)(a.values[0]),R=(0,S.pieceToQuery)(a.values.slice(1))):M=a;let B;const T=(b=(p=this.options)===null||p===void 0?void 0:p.openSideBySideDirection)===null||b===void 0?void 0:b.call(p);T&&(B=[{iconClass:T==="right"?D.ThemeIcon.asClassName(y.Codicon.splitHorizontal):D.ThemeIcon.asClassName(y.Codicon.splitVertical),tooltip:T==="right"?(0,n.localize)(4,null):(0,n.localize)(5,null)}]);const N=[];for(let O=0;Ok){let H=!1;if(M!==a&&([Y,ne]=(0,S.scoreFuzzy2)(U,Object.assign(Object.assign({},a),{values:void 0}),k,F),typeof Y=="number"&&(H=!0)),typeof Y!="number"&&([Y,ne]=(0,S.scoreFuzzy2)(U,M,k,F),typeof Y!="number"))continue;if(!H&&R){if(G&&R.original.length>0&&([se,J]=(0,S.scoreFuzzy2)(G,R)),typeof se!="number")continue;typeof Y=="number"&&(Y+=se)}}const q=x.tags&&x.tags.indexOf(1)>=0;N.push({index:O,kind:x.kind,score:Y,label:U,ariaLabel:(0,C.getAriaLabelForSymbol)(x.name,x.kind),description:G,highlights:q?void 0:{label:ne,description:J},range:{selection:v.Range.collapseToStart(x.selectionRange),decoration:x.range},strikethrough:q,buttons:B})}const A=N.sort((O,x)=>E?this.compareByKindAndScore(O,x):this.compareByScore(O,x));let P=[];if(E){let U=function(){x&&typeof O=="number"&&W>0&&(x.label=(0,_.format)(l[O]||d,W))},O,x,W=0;for(const F of A)O!==F.kind?(U(),O=F.kind,W=1,x={type:"separator"},P.push(x)):W++,P.push(F);U()}else A.length>0&&(P=[{label:(0,n.localize)(6,null,N.length),type:"separator"},...A]);return P})}compareByScore(c,a){if(typeof c.score!="number"&&typeof a.score=="number")return 1;if(typeof c.score=="number"&&typeof a.score!="number")return-1;if(typeof c.score=="number"&&typeof a.score=="number"){if(c.score>a.score)return-1;if(c.scorea.index?1:0}compareByKindAndScore(c,a){const g=l[c.kind]||d,h=l[a.kind]||d,p=g.localeCompare(h);return p===0?this.compareByScore(c,a):p}getDocumentSymbols(c,a){return be(this,void 0,void 0,function*(){const g=yield this._outlineModelService.getOrCreate(c,a);return a.isCancellationRequested?[]:g.asListOfDocumentSymbols()})}};e.AbstractGotoSymbolQuickAccessProvider=f,f.PREFIX="@",f.SCOPE_PREFIX=":",f.PREFIX_BY_CATEGORY=`${u.PREFIX}${u.SCOPE_PREFIX}`,e.AbstractGotoSymbolQuickAccessProvider=f=u=Ie([ge(0,t.ILanguageFeaturesService),ge(1,s.IOutlineModelService)],f);const d=(0,n.localize)(7,null),l={[5]:(0,n.localize)(8,null),[11]:(0,n.localize)(9,null),[8]:(0,n.localize)(10,null),[12]:(0,n.localize)(11,null),[4]:(0,n.localize)(12,null),[22]:(0,n.localize)(13,null),[23]:(0,n.localize)(14,null),[24]:(0,n.localize)(15,null),[10]:(0,n.localize)(16,null),[2]:(0,n.localize)(17,null),[3]:(0,n.localize)(18,null),[25]:(0,n.localize)(19,null),[1]:(0,n.localize)(20,null),[6]:(0,n.localize)(21,null),[9]:(0,n.localize)(22,null),[21]:(0,n.localize)(23,null),[14]:(0,n.localize)(24,null),[0]:(0,n.localize)(25,null),[17]:(0,n.localize)(26,null),[15]:(0,n.localize)(27,null),[16]:(0,n.localize)(28,null),[18]:(0,n.localize)(29,null),[19]:(0,n.localize)(30,null),[7]:(0,n.localize)(31,null),[13]:(0,n.localize)(32,null)}}),define(te[856],ie([1,0,2,12,696,15,34,31,23,463]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameInputField=e.CONTEXT_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_RENAME_INPUT_VISIBLE=new D.RawContextKey("renameInputVisible",!1,(0,y.localize)(0,null));let v=class{constructor(s,i,n,t,r){this._editor=s,this._acceptKeybindings=i,this._themeService=n,this._keybindingService=t,this._disposables=new L.DisposableStore,this.allowEditorOverflow=!0,this._visibleContextKey=e.CONTEXT_RENAME_INPUT_VISIBLE.bindTo(r),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(50)&&this._updateFont()})),this._disposables.add(n.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){return 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",(0,y.localize)(1,null)),this._domNode.appendChild(this._input),this._label=document.createElement("div"),this._label.className="rename-label",this._domNode.appendChild(this._label),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())),this._domNode}_updateStyles(s){var i,n,t,r;if(!this._input||!this._domNode)return;const u=s.getColor(m.widgetShadow),f=s.getColor(m.widgetBorder);this._domNode.style.backgroundColor=String((i=s.getColor(m.editorWidgetBackground))!==null&&i!==void 0?i:""),this._domNode.style.boxShadow=u?` 0 0 8px 2px ${u}`:"",this._domNode.style.border=f?`1px solid ${f}`:"",this._domNode.style.color=String((n=s.getColor(m.inputForeground))!==null&&n!==void 0?n:""),this._input.style.backgroundColor=String((t=s.getColor(m.inputBackground))!==null&&t!==void 0?t:"");const d=s.getColor(m.inputBorder);this._input.style.borderWidth=d?"1px":"0px",this._input.style.borderStyle=d?"solid":"none",this._input.style.borderColor=(r=d?.toString())!==null&&r!==void 0?r:"none"}_updateFont(){if(!this._input||!this._label)return;const s=this._editor.getOption(50);this._input.style.fontFamily=s.fontFamily,this._input.style.fontWeight=s.fontWeight,this._input.style.fontSize=`${s.fontSize}px`,this._label.style.fontSize=`${s.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}beforeRender(){var s,i;const[n,t]=this._acceptKeybindings;return this._label.innerText=(0,y.localize)(2,null,(s=this._keybindingService.lookupKeybinding(n))===null||s===void 0?void 0:s.getLabel(),(i=this._keybindingService.lookupKeybinding(t))===null||i===void 0?void 0:i.getLabel()),null}afterRender(s){s||this.cancelInput(!0)}acceptInput(s){var i;(i=this._currentAcceptInput)===null||i===void 0||i.call(this,s)}cancelInput(s){var i;(i=this._currentCancelInput)===null||i===void 0||i.call(this,s)}getInput(s,i,n,t,r,u){this._domNode.classList.toggle("preview",r),this._position=new I.Position(s.startLineNumber,s.startColumn),this._input.value=i,this._input.setAttribute("selectionStart",n.toString()),this._input.setAttribute("selectionEnd",t.toString()),this._input.size=Math.max((s.endColumn-s.startColumn)*1.1,20);const f=new L.DisposableStore;return new Promise(d=>{this._currentCancelInput=l=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,d(l),!0),this._currentAcceptInput=l=>{if(this._input.value.trim().length===0||this._input.value===i){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,d({newName:this._input.value,wantsPreview:r&&l})},f.add(u.onCancellationRequested(()=>this.cancelInput(!0))),f.add(this._editor.onDidBlurEditorWidget(()=>{var l;return this.cancelInput(!(!((l=this._domNode)===null||l===void 0)&&l.ownerDocument.hasFocus()))})),this._show()}).finally(()=>{f.dispose(),this._hide()})}_show(){this._editor.revealLineInCenterIfOutsideViewport(this._position.lineNumber,0),this._visible=!0,this._visibleContextKey.set(!0),this._editor.layoutContentWidget(this),setTimeout(()=>{this._input.focus(),this._input.setSelectionRange(parseInt(this._input.getAttribute("selectionStart")),parseInt(this._input.getAttribute("selectionEnd")))},100)}_hide(){this._visible=!1,this._visibleContextKey.reset(),this._editor.layoutContentWidget(this)}};e.RenameInputField=v,e.RenameInputField=v=Ie([ge(2,_.IThemeService),ge(3,S.IKeybindingService),ge(4,D.IContextKeyService)],v)}),define(te[857],ie([1,0,45,14,19,9,2,20,21,103,16,130,33,12,5,22,185,189,695,95,15,8,66,48,85,35,856,18]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w){"use strict";var E;Object.defineProperty(e,"__esModule",{value:!0}),e.RenameAction=e.rename=void 0;class k{constructor(A,P,O){this.model=A,this.position=P,this._providerRenameIdx=0,this._providers=O.ordered(A)}hasProvider(){return this._providers.length>0}resolveRenameLocation(A){return be(this,void 0,void 0,function*(){const P=[];for(this._providerRenameIdx=0;this._providerRenameIdx0?P.join(` -`):void 0}:{range:t.Range.fromPositions(this.position),text:"",rejectReason:P.length>0?P.join(` -`):void 0}})}provideRenameEdits(A,P){return be(this,void 0,void 0,function*(){return this._provideRenameEdits(A,this._providerRenameIdx,[],P)})}_provideRenameEdits(A,P,O,x){return be(this,void 0,void 0,function*(){const W=this._providers[P];if(!W)return{edits:[],rejectReason:O.join(` -`)};const U=yield W.provideRenameEdits(this.model,this.position,A,x);if(U){if(U.rejectReason)return this._provideRenameEdits(A,P+1,O.concat(U.rejectReason),x)}else return this._provideRenameEdits(A,P+1,O.concat(d.localize(0,null)),x);return U})}}function M(N,A,P,O){return be(this,void 0,void 0,function*(){const x=new k(A,P,N),W=yield x.resolveRenameLocation(y.CancellationToken.None);return W?.rejectReason?{edits:[],rejectReason:W.rejectReason}:x.provideRenameEdits(O,y.CancellationToken.None)})}e.rename=M;let R=E=class{static get(A){return A.getContribution(E.ID)}constructor(A,P,O,x,W,U,F,G){this.editor=A,this._instaService=P,this._notificationService=O,this._bulkEditService=x,this._progressService=W,this._logService=U,this._configService=F,this._languageFeaturesService=G,this._disposableStore=new S.DisposableStore,this._cts=new y.CancellationTokenSource,this._renameInputField=this._disposableStore.add(this._instaService.createInstance(b.RenameInputField,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))}dispose(){this._disposableStore.dispose(),this._cts.dispose(!0)}run(){var A,P;return be(this,void 0,void 0,function*(){if(this._cts.dispose(!0),this._cts=new y.CancellationTokenSource,!this.editor.hasModel())return;const O=this.editor.getPosition(),x=new k(this.editor.getModel(),O,this._languageFeaturesService.renameProvider);if(!x.hasProvider())return;const W=new v.EditorStateCancellationTokenSource(this.editor,5,void 0,this._cts.token);let U;try{const H=x.resolveRenameLocation(W.token);this._progressService.showWhile(H,250),U=yield H}catch(H){(A=f.MessageController.get(this.editor))===null||A===void 0||A.showMessage(H||d.localize(1,null),O);return}finally{W.dispose()}if(!U)return;if(U.rejectReason){(P=f.MessageController.get(this.editor))===null||P===void 0||P.showMessage(U.rejectReason,O);return}if(W.token.isCancellationRequested)return;const F=new v.EditorStateCancellationTokenSource(this.editor,5,U.range,this._cts.token),G=this.editor.getSelection();let Y=0,ne=U.text.length;!t.Range.isEmpty(G)&&!t.Range.spansMultipleLines(G)&&t.Range.containsRange(U.range,G)&&(Y=Math.max(0,G.startColumn-U.range.startColumn),ne=Math.min(U.range.endColumn,G.endColumn)-U.range.startColumn);const se=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),J=yield this._renameInputField.getInput(U.range,U.text,Y,ne,se,F.token);if(typeof J=="boolean"){J&&this.editor.focus(),F.dispose();return}this.editor.focus();const q=(0,I.raceCancellation)(x.provideRenameEdits(J.newName,F.token),F.token).then(H=>be(this,void 0,void 0,function*(){if(!(!H||!this.editor.hasModel())){if(H.rejectReason){this._notificationService.info(H.rejectReason);return}this.editor.setSelection(t.Range.fromPositions(this.editor.getSelection().getPosition())),this._bulkEditService.apply(H,{editor:this.editor,showPreview:J.wantsPreview,label:d.localize(2,null,U?.text,J.newName),code:"undoredo.rename",quotableLabel:d.localize(3,null,U?.text,J.newName),respectAutoSaveConfig:!0}).then(V=>{V.ariaSummary&&(0,L.alert)(d.localize(4,null,U.text,J.newName,V.ariaSummary))}).catch(V=>{this._notificationService.error(d.localize(5,null)),this._logService.error(V)})}}),H=>{this._notificationService.error(d.localize(6,null)),this._logService.error(H)}).finally(()=>{F.dispose()});return this._progressService.showWhile(q,250),q})}acceptRenameInput(A){this._renameInputField.acceptInput(A)}cancelRenameInput(){this._renameInputField.cancelInput(!0)}};R.ID="editor.contrib.renameController",R=E=Ie([ge(1,c.IInstantiationService),ge(2,g.INotificationService),ge(3,s.IBulkEditService),ge(4,h.IEditorProgressService),ge(5,a.ILogService),ge(6,u.ITextResourceConfigurationService),ge(7,w.ILanguageFeaturesService)],R);class B extends C.EditorAction{constructor(){super({id:"editor.action.rename",label:d.localize(7,null),alias:"Rename Symbol",precondition:o.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(A,P){const O=A.get(i.ICodeEditorService),[x,W]=Array.isArray(P)&&P||[void 0,void 0];return _.URI.isUri(x)&&n.Position.isIPosition(W)?O.openCodeEditor({resource:x},O.getActiveCodeEditor()).then(U=>{U&&(U.setPosition(W),U.invokeWithinContext(F=>(this.reportTelemetry(F,U),this.run(F,U))))},D.onUnexpectedError):super.runCommand(A,P)}run(A,P){const O=R.get(P);return O?O.run():Promise.resolve()}}e.RenameAction=B,(0,C.registerEditorContribution)(R.ID,R,4),(0,C.registerEditorAction)(B);const T=C.EditorCommand.bindToContribution(R.get);(0,C.registerEditorCommand)(new T({id:"acceptRenameInput",precondition:b.CONTEXT_RENAME_INPUT_VISIBLE,handler:N=>N.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:o.ContextKeyExpr.and(r.EditorContextKeys.focus,o.ContextKeyExpr.not("isComposing")),primary:3}})),(0,C.registerEditorCommand)(new T({id:"acceptRenameInputWithPreview",precondition:o.ContextKeyExpr.and(b.CONTEXT_RENAME_INPUT_VISIBLE,o.ContextKeyExpr.has("config.editor.rename.enablePreview")),handler:N=>N.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:o.ContextKeyExpr.and(r.EditorContextKeys.focus,o.ContextKeyExpr.not("isComposing")),primary:1024+3}})),(0,C.registerEditorCommand)(new T({id:"cancelRenameInput",precondition:b.CONTEXT_RENAME_INPUT_VISIBLE,handler:N=>N.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:r.EditorContextKeys.focus,primary:9,secondary:[1033]}})),(0,C.registerModelAndPositionCommand)("_executeDocumentRenameProvider",function(N,A,P,...O){const[x]=O;(0,m.assertType)(typeof x=="string");const{renameProvider:W}=N.get(w.ILanguageFeaturesService);return M(W,A,P,x)}),(0,C.registerModelAndPositionCommand)("_executePrepareRename",function(N,A,P){return be(this,void 0,void 0,function*(){const{renameProvider:O}=N.get(w.ILanguageFeaturesService),W=yield new k(A,P,O).resolveRenameLocation(y.CancellationToken.None);if(W?.rejectReason)throw new Error(W.rejectReason);return W})}),p.Registry.as(l.Extensions.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:d.localize(8,null),default:!0,type:"boolean"}}})}),define(te[858],ie([1,0,2,9,50,28,14,19,23,250,337,74,59,18,234,147,301]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DocumentSemanticTokensFeature=void 0;let d=class extends L.Disposable{constructor(a,g,h,p,b,w){super(),this._watchers=Object.create(null);const E=R=>{this._watchers[R.uri.toString()]=new l(R,a,h,b,w)},k=(R,B)=>{B.dispose(),delete this._watchers[R.uri.toString()]},M=()=>{for(const R of g.getModels()){const B=this._watchers[R.uri.toString()];(0,u.isSemanticColoringEnabled)(R,h,p)?B||E(R):B&&k(R,B)}};this._register(g.onModelAdded(R=>{(0,u.isSemanticColoringEnabled)(R,h,p)&&E(R)})),this._register(g.onModelRemoved(R=>{const B=this._watchers[R.uri.toString()];B&&k(R,B)})),this._register(p.onDidChangeConfiguration(R=>{R.affectsConfiguration(u.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&M()})),this._register(h.onDidColorThemeChange(M))}dispose(){for(const a of Object.values(this._watchers))a.dispose();super.dispose()}};e.DocumentSemanticTokensFeature=d,e.DocumentSemanticTokensFeature=d=Ie([ge(0,t.ISemanticTokensStylingService),ge(1,y.IModelService),ge(2,_.IThemeService),ge(3,D.IConfigurationService),ge(4,s.ILanguageFeatureDebounceService),ge(5,n.ILanguageFeaturesService)],d);let l=f=class extends L.Disposable{constructor(a,g,h,p,b){super(),this._semanticTokensStylingService=g,this._isDisposed=!1,this._model=a,this._provider=b.documentSemanticTokensProvider,this._debounceInformation=p.for(this._provider,"DocumentSemanticTokens",{min:f.REQUEST_MIN_DELAY,max:f.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new S.RunOnceScheduler(()=>this._fetchDocumentSemanticTokensNow(),f.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._providersChangedDuringRequest=!1,this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeAttached(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(this._model.onDidChangeLanguage(()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)}));const w=()=>{(0,L.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const E of this._provider.all(a))typeof E.onDidChange=="function"&&this._documentProvidersChangeListeners.push(E.onDidChange(()=>{if(this._currentDocumentRequestCancellationTokenSource){this._providersChangedDuringRequest=!0;return}this._fetchDocumentSemanticTokens.schedule(0)}))};w(),this._register(this._provider.onDidChange(()=>{w(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._register(h.onDidColorThemeChange(E=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),(0,L.dispose)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[],this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,C.hasDocumentSemanticTokensProvider)(this._provider,this._model)){this._currentDocumentResponse&&this._model.tokenization.setSemanticTokens(null,!1);return}if(!this._model.isAttachedToEditor())return;const a=new m.CancellationTokenSource,g=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,h=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,p=(0,C.getDocumentSemanticTokens)(this._provider,this._model,g,h,a.token);this._currentDocumentRequestCancellationTokenSource=a,this._providersChangedDuringRequest=!1;const b=[],w=this._model.onDidChangeContent(k=>{b.push(k)}),E=new i.StopWatch(!1);p.then(k=>{if(this._debounceInformation.update(this._model,E.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,w.dispose(),!k)this._setDocumentSemanticTokens(null,null,null,b);else{const{provider:M,tokens:R}=k,B=this._semanticTokensStylingService.getStyling(M);this._setDocumentSemanticTokens(M,R||null,B,b)}},k=>{k&&(I.isCancellationError(k)||typeof k.message=="string"&&k.message.indexOf("busy")!==-1)||I.onUnexpectedError(k),this._currentDocumentRequestCancellationTokenSource=null,w.dispose(),(b.length>0||this._providersChangedDuringRequest)&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))})}static _copy(a,g,h,p,b){b=Math.min(b,h.length-p,a.length-g);for(let w=0;w{(p.length>0||this._providersChangedDuringRequest)&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){a&&g&&a.releaseDocumentSemanticTokens(g.resultId);return}if(!a||!h){this._model.tokenization.setSemanticTokens(null,!1);return}if(!g){this._model.tokenization.setSemanticTokens(null,!0),w();return}if((0,C.isSemanticTokensEdits)(g)){if(!b){this._model.tokenization.setSemanticTokens(null,!0);return}if(g.edits.length===0)g={resultId:g.resultId,data:b.data};else{let E=0;for(const T of g.edits)E+=(T.data?T.data.length:0)-T.deleteCount;const k=b.data,M=new Uint32Array(k.length+E);let R=k.length,B=M.length;for(let T=g.edits.length-1;T>=0;T--){const N=g.edits[T];if(N.start>k.length){h.warnInvalidEditStart(b.resultId,g.resultId,T,N.start,k.length),this._model.tokenization.setSemanticTokens(null,!0);return}const A=R-(N.start+N.deleteCount);A>0&&(f._copy(k,R-A,M,B-A,A),B-=A),N.data&&(f._copy(N.data,0,M,B-N.data.length,N.data.length),B-=N.data.length),R=N.start}R>0&&f._copy(k,0,M,0,R),g={resultId:g.resultId,data:M}}}if((0,C.isSemanticTokens)(g)){this._currentDocumentResponse=new o(a,g.resultId,g.data);const E=(0,v.toMultilineTokens2)(g,h,this._model.getLanguageId());if(p.length>0)for(const k of p)for(const M of E)for(const R of k.changes)M.applyEdit(R.range,R.text);this._model.tokenization.setSemanticTokens(E,!0)}else this._model.tokenization.setSemanticTokens(null,!0);w()}};l.REQUEST_MIN_DELAY=300,l.REQUEST_MAX_DELAY=2e3,l=f=Ie([ge(1,t.ISemanticTokensStylingService),ge(2,_.IThemeService),ge(3,s.ILanguageFeatureDebounceService),ge(4,n.ILanguageFeaturesService)],l);class o{constructor(a,g,h){this.provider=a,this.resultId=g,this.data=h}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}(0,r.registerEditorFeature)(d)}),define(te[859],ie([1,0,14,2,16,337,301,250,28,23,74,59,18,234]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewportSemanticTokensContribution=void 0;let t=class extends I.Disposable{constructor(u,f,d,l,o,c){super(),this._semanticTokensStylingService=f,this._themeService=d,this._configurationService=l,this._editor=u,this._provider=c.documentRangeSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentRangeSemanticTokens",{min:100,max:500}),this._tokenizeViewport=this._register(new L.RunOnceScheduler(()=>this._tokenizeViewportNow(),100)),this._outstandingRequests=[];const a=()=>{this._editor.hasModel()&&this._tokenizeViewport.schedule(this._debounceInformation.get(this._editor.getModel()))};this._register(this._editor.onDidScrollChange(()=>{a()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),a()})),this._register(this._editor.onDidChangeModelContent(g=>{this._cancelAll(),a()})),this._register(this._provider.onDidChange(()=>{this._cancelAll(),a()})),this._register(this._configurationService.onDidChangeConfiguration(g=>{g.affectsConfiguration(S.SEMANTIC_HIGHLIGHTING_SETTING_ID)&&(this._cancelAll(),a())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),a()})),a()}_cancelAll(){for(const u of this._outstandingRequests)u.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(u){for(let f=0,d=this._outstandingRequests.length;fthis._requestRange(u,d)))}_requestRange(u,f){const d=u.getVersionId(),l=(0,L.createCancelablePromise)(c=>Promise.resolve((0,D.getDocumentRangeSemanticTokens)(this._provider,u,f,c))),o=new s.StopWatch(!1);return l.then(c=>{if(this._debounceInformation.update(u,o.elapsed()),!c||!c.tokens||u.isDisposed()||u.getVersionId()!==d)return;const{provider:a,tokens:g}=c,h=this._semanticTokensStylingService.getStyling(a);u.tokenization.setPartialSemanticTokens(f,(0,m.toMultilineTokens2)(g,h,u.getLanguageId()))}).then(()=>this._removeOutstandingRequest(l),()=>this._removeOutstandingRequest(l)),l}};e.ViewportSemanticTokensContribution=t,t.ID="editor.contrib.viewportSemanticTokens",e.ViewportSemanticTokensContribution=t=Ie([ge(1,n.ISemanticTokensStylingService),ge(2,v.IThemeService),ge(3,_.IConfigurationService),ge(4,C.ILanguageFeatureDebounceService),ge(5,i.ILanguageFeaturesService)],t),(0,y.registerEditorContribution)(t.ID,t,1)}),define(te[860],ie([1,0,7,226,26,27,6,69,2,21,29,776,50,42,705,334,77,23,348]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.ItemRenderer=e.getAriaId=void 0;function o(p){return`suggest-aria-id:${p}`}e.getAriaId=o;const c=(0,u.registerIcon)("suggest-more-info",y.Codicon.chevronRight,t.localize(0,null)),a=new(l=class{extract(b,w){if(b.textLabel.match(l._regexStrict))return w[0]=b.textLabel,!0;if(b.completion.detail&&b.completion.detail.match(l._regexStrict))return w[0]=b.completion.detail,!0;if(typeof b.completion.documentation=="string"){const E=l._regexRelaxed.exec(b.completion.documentation);if(E&&(E.index===0||E.index+E[0].length===b.completion.documentation.length))return w[0]=E[0],!0}return!1}},l._regexRelaxed=/(#([\da-fA-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*\))/,l._regexStrict=new RegExp(`^${l._regexRelaxed.source}$`,"i"),l);let g=class{constructor(b,w,E,k){this._editor=b,this._modelService=w,this._languageService=E,this._themeService=k,this._onDidToggleDetails=new S.Emitter,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(b){const w=new _.DisposableStore,E=b;E.classList.add("show-file-icons");const k=(0,L.append)(b,(0,L.$)(".icon")),M=(0,L.append)(k,(0,L.$)("span.colorspan")),R=(0,L.append)(b,(0,L.$)(".contents")),B=(0,L.append)(R,(0,L.$)(".main")),T=(0,L.append)(B,(0,L.$)(".icon-label.codicon")),N=(0,L.append)(B,(0,L.$)("span.left")),A=(0,L.append)(B,(0,L.$)("span.right")),P=new I.IconLabel(N,{supportHighlights:!0,supportIcons:!0});w.add(P);const O=(0,L.append)(N,(0,L.$)("span.signature-label")),x=(0,L.append)(N,(0,L.$)("span.qualifier-label")),W=(0,L.append)(A,(0,L.$)("span.details-label")),U=(0,L.append)(A,(0,L.$)("span.readMore"+D.ThemeIcon.asCSSSelector(c)));U.title=t.localize(1,null);const F=()=>{const G=this._editor.getOptions(),Y=G.get(50),ne=Y.getMassagedFontFamily(),se=Y.fontFeatureSettings,J=G.get(118)||Y.fontSize,q=G.get(119)||Y.lineHeight,H=Y.fontWeight,V=Y.letterSpacing,Z=`${J}px`,ee=`${q}px`,le=`${V}px`;E.style.fontSize=Z,E.style.fontWeight=H,E.style.letterSpacing=le,B.style.fontFamily=ne,B.style.fontFeatureSettings=se,B.style.lineHeight=ee,k.style.height=ee,k.style.width=ee,U.style.height=ee,U.style.width=ee};return F(),w.add(this._editor.onDidChangeConfiguration(G=>{(G.hasChanged(50)||G.hasChanged(118)||G.hasChanged(119))&&F()})),{root:E,left:N,right:A,icon:k,colorspan:M,iconLabel:P,iconContainer:T,parametersLabel:O,qualifierLabel:x,detailsLabel:W,readMore:U,disposables:w}}renderElement(b,w,E){const{completion:k}=b;E.root.id=o(w),E.colorspan.style.backgroundColor="";const M={labelEscapeNewLines:!0,matches:(0,m.createMatches)(b.score)},R=[];if(k.kind===19&&a.extract(b,R))E.icon.className="icon customcolor",E.iconContainer.className="icon hide",E.colorspan.style.backgroundColor=R[0];else if(k.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){E.icon.className="icon hide",E.iconContainer.className="icon hide";const B=(0,s.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:b.textLabel}),r.FileKind.FILE),T=(0,s.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:k.detail}),r.FileKind.FILE);M.extraClasses=B.length>T.length?B:T}else k.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(E.icon.className="icon hide",E.iconContainer.className="icon hide",M.extraClasses=[(0,s.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:b.textLabel}),r.FileKind.FOLDER),(0,s.getIconClasses)(this._modelService,this._languageService,v.URI.from({scheme:"fake",path:k.detail}),r.FileKind.FOLDER)].flat()):(E.icon.className="icon hide",E.iconContainer.className="",E.iconContainer.classList.add("suggest-icon",...D.ThemeIcon.asClassNameArray(C.CompletionItemKinds.toIcon(k.kind))));k.tags&&k.tags.indexOf(1)>=0&&(M.extraClasses=(M.extraClasses||[]).concat(["deprecated"]),M.matches=[]),E.iconLabel.setLabel(b.textLabel,void 0,M),typeof k.label=="string"?(E.parametersLabel.textContent="",E.detailsLabel.textContent=h(k.detail||""),E.root.classList.add("string-label")):(E.parametersLabel.textContent=h(k.label.detail||""),E.detailsLabel.textContent=h(k.label.description||""),E.root.classList.remove("string-label")),this._editor.getOption(117).showInlineDetails?(0,L.show)(E.detailsLabel):(0,L.hide)(E.detailsLabel),(0,d.canExpandCompletionItem)(b)?(E.right.classList.add("can-expand-details"),(0,L.show)(E.readMore),E.readMore.onmousedown=B=>{B.stopPropagation(),B.preventDefault()},E.readMore.onclick=B=>{B.stopPropagation(),B.preventDefault(),this._onDidToggleDetails.fire()}):(E.right.classList.remove("can-expand-details"),(0,L.hide)(E.readMore),E.readMore.onmousedown=null,E.readMore.onclick=null)}disposeTemplate(b){b.disposables.dispose()}};e.ItemRenderer=g,e.ItemRenderer=g=Ie([ge(1,i.IModelService),ge(2,n.ILanguageService),ge(3,f.IThemeService)],g);function h(p){return p.replace(/\r\n|\r|\n/g,"")}}),define(te[861],ie([1,0,854,35,134,33,93,6,16,22,67]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoLineAction=e.StandaloneGotoLineQuickAccessProvider=void 0;let s=class extends L.AbstractGotoLineQuickAccessProvider{constructor(t){super(),this.editorService=t,this.onDidActiveTextEditorControlChange=m.Event.None}get activeTextEditorControl(){var t;return(t=this.editorService.getFocusedCodeEditor())!==null&&t!==void 0?t:void 0}};e.StandaloneGotoLineQuickAccessProvider=s,e.StandaloneGotoLineQuickAccessProvider=s=Ie([ge(0,D.ICodeEditorService)],s);class i extends _.EditorAction{constructor(){super({id:i.ID,label:S.GoToLineNLS.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:2085,mac:{primary:293},weight:100}})}run(t){t.get(C.IQuickInputService).quickAccess.show(s.PREFIX)}}e.GotoLineAction=i,i.ID="editor.action.gotoLine",(0,_.registerEditorAction)(i),I.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:s,prefix:s.PREFIX,helpEntries:[{description:S.GoToLineNLS.gotoLineActionLabel,commandId:i.ID}]})}),define(te[862],ie([1,0,855,35,134,33,93,6,16,22,67,187,18,171,248]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GotoSymbolAction=e.StandaloneGotoSymbolQuickAccessProvider=void 0;let n=class extends L.AbstractGotoSymbolQuickAccessProvider{constructor(u,f,d){super(f,d),this.editorService=u,this.onDidActiveTextEditorControlChange=m.Event.None}get activeTextEditorControl(){var u;return(u=this.editorService.getFocusedCodeEditor())!==null&&u!==void 0?u:void 0}};e.StandaloneGotoSymbolQuickAccessProvider=n,e.StandaloneGotoSymbolQuickAccessProvider=n=Ie([ge(0,D.ICodeEditorService),ge(1,i.ILanguageFeaturesService),ge(2,s.IOutlineModelService)],n);class t extends _.EditorAction{constructor(){super({id:t.ID,label:S.QuickOutlineNLS.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:v.EditorContextKeys.hasDocumentSymbolProvider,kbOpts:{kbExpr:v.EditorContextKeys.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(u){u.get(C.IQuickInputService).quickAccess.show(L.AbstractGotoSymbolQuickAccessProvider.PREFIX,{itemActivation:C.ItemActivation.NONE})}}e.GotoSymbolAction=t,t.ID="editor.action.quickOutline",(0,_.registerEditorAction)(t),I.Registry.as(y.Extensions.Quickaccess).registerQuickAccessProvider({ctor:n,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX,helpEntries:[{description:S.QuickOutlineNLS.quickOutlineActionLabel,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX,commandId:t.ID},{description:S.QuickOutlineNLS.quickOutlineByCategoryActionLabel,prefix:L.AbstractGotoSymbolQuickAccessProvider.PREFIX_BY_CATEGORY}]})}),define(te[363],ie([1,0,7,54,840,33,15,47,23]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneCodeEditorService=void 0;let v=class extends y.AbstractCodeEditorService{constructor(s,i){super(i),this._register(this.onCodeEditorAdd(()=>this._checkContextKey())),this._register(this.onCodeEditorRemove(()=>this._checkContextKey())),this._editorIsOpen=s.createKey("editorIsOpen",!1),this._activeCodeEditor=null,this._register(this.registerCodeEditorOpenHandler((n,t,r)=>be(this,void 0,void 0,function*(){return t?this.doOpenEditor(t,n):null})))}_checkContextKey(){let s=!1;for(const i of this.listCodeEditors())if(!i.isSimpleWidget){s=!0;break}this._editorIsOpen.set(s)}setActiveCodeEditor(s){this._activeCodeEditor=s}getActiveCodeEditor(){return this._activeCodeEditor}doOpenEditor(s,i){if(!this.findModel(s,i.resource)){if(i.resource){const r=i.resource.scheme;if(r===I.Schemas.http||r===I.Schemas.https)return(0,L.windowOpenNoOpener)(i.resource.toString()),s}return null}const t=i.options?i.options.selection:null;if(t)if(typeof t.endLineNumber=="number"&&typeof t.endColumn=="number")s.setSelection(t),s.revealRangeInCenter(t,1);else{const r={lineNumber:t.startLineNumber,column:t.startColumn};s.setPosition(r),s.revealPositionInCenter(r,1)}return s}findModel(s,i){const n=s.getModel();return n&&n.uri.toString()!==i.toString()?null:n}};e.StandaloneCodeEditorService=v,e.StandaloneCodeEditorService=v=Ie([ge(0,S.IContextKeyService),ge(1,_.IThemeService)],v),(0,m.registerSingleton)(D.ICodeEditorService,v,0)}),define(te[863],ie([1,0,78,31]),function($,e,L,I){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hc_light=e.hc_black=e.vs_dark=e.vs=void 0,e.vs={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:"C700C7"}],colors:{[I.editorBackground]:"#FFFFFE",[I.editorForeground]:"#000000",[I.editorInactiveSelection]:"#E5EBF1",[L.editorIndentGuide1]:"#D3D3D3",[L.editorActiveIndentGuide1]:"#939393",[I.editorSelectionHighlight]:"#ADD6FF4D"}},e.vs_dark={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:{[I.editorBackground]:"#1E1E1E",[I.editorForeground]:"#D4D4D4",[I.editorInactiveSelection]:"#3A3D41",[L.editorIndentGuide1]:"#404040",[L.editorActiveIndentGuide1]:"#707070",[I.editorSelectionHighlight]:"#ADD6FF26"}},e.hc_black={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:{[I.editorBackground]:"#000000",[I.editorForeground]:"#FFFFFF",[L.editorIndentGuide1]:"#FFFFFF",[L.editorActiveIndentGuide1]:"#FFFFFF"}},e.hc_light={base:"hc-light",inherit:!1,rules:[{token:"",foreground:"292929",background:"FFFFFF"},{token:"invalid",foreground:"B5200D"},{token:"emphasis",fontStyle:"italic"},{token:"strong",fontStyle:"bold"},{token:"variable",foreground:"264F70"},{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:"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:"B5200D"},{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:"264F78"},{token:"attribute.value",foreground:"0451A5"},{token:"string",foreground:"A31515"},{token:"string.sql",foreground:"B5200D"},{token:"keyword",foreground:"0000FF"},{token:"keyword.flow",foreground:"AF00DB"},{token:"operator.sql",foreground:"778899"},{token:"operator.swift",foreground:"666666"},{token:"predefined.sql",foreground:"C700C7"}],colors:{[I.editorBackground]:"#FFFFFF",[I.editorForeground]:"#292929",[L.editorIndentGuide1]:"#292929",[L.editorActiveIndentGuide1]:"#292929"}}}),define(te[364],ie([1,0,7,51,36,6,29,124,507,863,35,31,23,2,86,834]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneThemeService=e.HC_LIGHT_THEME_NAME=e.HC_BLACK_THEME_NAME=e.VS_DARK_THEME_NAME=e.VS_LIGHT_THEME_NAME=void 0,e.VS_LIGHT_THEME_NAME="vs",e.VS_DARK_THEME_NAME="vs-dark",e.HC_BLACK_THEME_NAME="hc-black",e.HC_LIGHT_THEME_NAME="hc-light";const u=C.Registry.as(s.Extensions.ColorContribution),f=C.Registry.as(i.Extensions.ThemingContribution);class d{constructor(h,p){this.semanticHighlighting=!1,this.themeData=p;const b=p.base;h.length>0?(l(h)?this.id=h:this.id=b+" "+h,this.themeName=h):(this.id=b,this.themeName=b),this.colors=null,this.defaultColors=Object.create(null),this._tokenTheme=null}get base(){return this.themeData.base}notifyBaseUpdated(){this.themeData.inherit&&(this.colors=null,this._tokenTheme=null)}getColors(){if(!this.colors){const h=new Map;for(const p in this.themeData.colors)h.set(p,y.Color.fromHex(this.themeData.colors[p]));if(this.themeData.inherit){const p=o(this.themeData.base);for(const b in p.colors)h.has(b)||h.set(b,y.Color.fromHex(p.colors[b]))}this.colors=h}return this.colors}getColor(h,p){const b=this.getColors().get(h);if(b)return b;if(p!==!1)return this.getDefault(h)}getDefault(h){let p=this.defaultColors[h];return p||(p=u.resolveDefaultColor(h,this),this.defaultColors[h]=p,p)}defines(h){return this.getColors().has(h)}get type(){switch(this.base){case e.VS_LIGHT_THEME_NAME:return t.ColorScheme.LIGHT;case e.HC_BLACK_THEME_NAME:return t.ColorScheme.HIGH_CONTRAST_DARK;case e.HC_LIGHT_THEME_NAME:return t.ColorScheme.HIGH_CONTRAST_LIGHT;default:return t.ColorScheme.DARK}}get tokenTheme(){if(!this._tokenTheme){let h=[],p=[];if(this.themeData.inherit){const E=o(this.themeData.base);h=E.rules,E.encodedTokensColors&&(p=E.encodedTokensColors)}const b=this.themeData.colors["editor.foreground"],w=this.themeData.colors["editor.background"];if(b||w){const E={token:""};b&&(E.foreground=b),w&&(E.background=w),h.push(E)}h=h.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(p=this.themeData.encodedTokensColors),this._tokenTheme=_.TokenTheme.createFromRawTokenTheme(h,p)}return this._tokenTheme}getTokenStyleMetadata(h,p,b){const E=this.tokenTheme._match([h].concat(p).join(".")).metadata,k=m.TokenMetadata.getForeground(E),M=m.TokenMetadata.getFontStyle(E);return{foreground:k,italic:!!(M&1),bold:!!(M&2),underline:!!(M&4),strikethrough:!!(M&8)}}}function l(g){return g===e.VS_LIGHT_THEME_NAME||g===e.VS_DARK_THEME_NAME||g===e.HC_BLACK_THEME_NAME||g===e.HC_LIGHT_THEME_NAME}function o(g){switch(g){case e.VS_LIGHT_THEME_NAME:return v.vs;case e.VS_DARK_THEME_NAME:return v.vs_dark;case e.HC_BLACK_THEME_NAME:return v.hc_black;case e.HC_LIGHT_THEME_NAME:return v.hc_light}}function c(g){const h=o(g);return new d(g,h)}class a extends n.Disposable{constructor(){super(),this._onColorThemeChange=this._register(new D.Emitter),this.onDidColorThemeChange=this._onColorThemeChange.event,this._onProductIconThemeChange=this._register(new D.Emitter),this.onDidProductIconThemeChange=this._onProductIconThemeChange.event,this._environment=Object.create(null),this._builtInProductIconTheme=new r.UnthemedProductIconTheme,this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(e.VS_LIGHT_THEME_NAME,c(e.VS_LIGHT_THEME_NAME)),this._knownThemes.set(e.VS_DARK_THEME_NAME,c(e.VS_DARK_THEME_NAME)),this._knownThemes.set(e.HC_BLACK_THEME_NAME,c(e.HC_BLACK_THEME_NAME)),this._knownThemes.set(e.HC_LIGHT_THEME_NAME,c(e.HC_LIGHT_THEME_NAME));const h=this._register((0,r.getIconsStyleSheet)(this));this._codiconCSS=h.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(e.VS_LIGHT_THEME_NAME),this._onOSSchemeChanged(),this._register(h.onDidChange(()=>{this._codiconCSS=h.getCSS(),this._updateCSS()})),(0,I.addMatchMediaChangeListener)("(forced-colors: active)",()=>{this._onOSSchemeChanged()})}registerEditorContainer(h){return L.isInShadowDOM(h)?this._registerShadowDomContainer(h):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=L.createStyleSheet(void 0,h=>{h.className="monaco-colors",h.textContent=this._allCSS}),this._styleElements.push(this._globalStyleElement)),n.Disposable.None}_registerShadowDomContainer(h){const p=L.createStyleSheet(h,b=>{b.className="monaco-colors",b.textContent=this._allCSS});return this._styleElements.push(p),{dispose:()=>{for(let b=0;b{b.base===h&&b.notifyBaseUpdated()}),this._theme.themeName===h&&this.setTheme(h)}getColorTheme(){return this._theme}setColorMapOverride(h){this._colorMapOverride=h,this._updateThemeOrColorMap()}setTheme(h){let p;this._knownThemes.has(h)?p=this._knownThemes.get(h):p=this._knownThemes.get(e.VS_LIGHT_THEME_NAME),this._updateActualTheme(p)}_updateActualTheme(h){!h||this._theme===h||(this._theme=h,this._updateThemeOrColorMap())}_onOSSchemeChanged(){if(this._autoDetectHighContrast){const h=window.matchMedia("(forced-colors: active)").matches;if(h!==(0,t.isHighContrast)(this._theme.type)){let p;(0,t.isDark)(this._theme.type)?p=h?e.HC_BLACK_THEME_NAME:e.VS_DARK_THEME_NAME:p=h?e.HC_LIGHT_THEME_NAME:e.VS_LIGHT_THEME_NAME,this._updateActualTheme(this._knownThemes.get(p))}}}setAutoDetectHighContrast(h){this._autoDetectHighContrast=h,this._onOSSchemeChanged()}_updateThemeOrColorMap(){const h=[],p={},b={addRule:k=>{p[k]||(h.push(k),p[k]=!0)}};f.getThemingParticipants().forEach(k=>k(this._theme,b,this._environment));const w=[];for(const k of u.getColors()){const M=this._theme.getColor(k.id,!0);M&&w.push(`${(0,s.asCssVariableName)(k.id)}: ${M.toString()};`)}b.addRule(`.monaco-editor, .monaco-diff-editor { ${w.join(` -`)} }`);const E=this._colorMapOverride||this._theme.tokenTheme.getColorMap();b.addRule((0,_.generateTokensCSSForColorMap)(E)),this._themeCSS=h.join(` -`),this._updateCSS(),S.TokenizationRegistry.setColorMap(E),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._styleElements.forEach(h=>h.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}getProductIconTheme(){return this._builtInProductIconTheme}}e.StandaloneThemeService=a}),define(te[864],ie([1,0,16,131,93,86,364]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0});class m extends L.EditorAction{constructor(){super({id:"editor.action.toggleHighContrast",label:y.ToggleHighContrastNLS.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0}),this._originalThemeName=null}run(v,C){const s=v.get(I.IStandaloneThemeService),i=s.getColorTheme();(0,D.isHighContrast)(i.type)?(s.setTheme(this._originalThemeName||((0,D.isDark)(i.type)?S.VS_DARK_THEME_NAME:S.VS_LIGHT_THEME_NAME)),this._originalThemeName=null):(s.setTheme((0,D.isDark)(i.type)?S.HC_BLACK_THEME_NAME:S.HC_LIGHT_THEME_NAME),this._originalThemeName=i.themeName)}}(0,L.registerEditorAction)(m)}),define(te[160],ie([1,0,7,44,129,320,41,216,2,17,718,30,741,15,58,8,34,48,89,23,27,86,20,31,104,88,476]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createActionViewItem=e.DropdownWithDefaultActionViewItem=e.SubmenuEntryActionViewItem=e.MenuEntryActionViewItem=e.createAndFillInActionBarActions=e.createAndFillInContextMenuActions=void 0;function b(N,A,P,O){const x=N.getActions(A),W=L.ModifierKeyEmitter.getInstance(),U=W.keyStatus.altKey||(v.isWindows||v.isLinux)&&W.keyStatus.shiftKey;E(x,P,U,O?F=>F===O:F=>F==="navigation")}e.createAndFillInContextMenuActions=b;function w(N,A,P,O,x,W){const U=N.getActions(A);E(U,P,!1,typeof O=="string"?G=>G===O:O,x,W)}e.createAndFillInActionBarActions=w;function E(N,A,P,O=U=>U==="navigation",x=()=>!1,W=!1){let U,F;Array.isArray(A)?(U=A,F=A):(U=A.primary,F=A.secondary);const G=new Set;for(const[Y,ne]of N){let se;O(Y)?(se=U,se.length>0&&W&&se.push(new S.Separator)):(se=F,se.length>0&&se.push(new S.Separator));for(let J of ne){P&&(J=J instanceof s.MenuItemAction&&J.alt?J.alt:J);const q=se.push(J);J instanceof S.SubmenuAction&&G.add({group:Y,action:J,index:q-1})}}for(const{group:Y,action:ne,index:se}of G){const J=O(Y)?U:F,q=ne.actions;x(ne,Y,J.length)&&J.splice(se,1,...q)}}let k=class extends y.ActionViewItem{constructor(A,P,O,x,W,U,F,G){super(void 0,A,{icon:!!(A.class||A.item.icon),label:!A.class&&!A.item.icon,draggable:P?.draggable,keybinding:P?.keybinding,hoverDelegate:P?.hoverDelegate}),this._keybindingService=O,this._notificationService=x,this._contextKeyService=W,this._themeService=U,this._contextMenuService=F,this._accessibilityService=G,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new _.MutableDisposable),this._altKey=L.ModifierKeyEmitter.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(A){return be(this,void 0,void 0,function*(){A.preventDefault(),A.stopPropagation();try{yield this.actionRunner.run(this._commandAction,this._context)}catch(P){this._notificationService.error(P)}})}render(A){if(super.render(A),A.classList.add("menu-entry"),this.options.icon&&this._updateItemClass(this._menuItemAction.item),this._menuItemAction.alt){let P=!1;const O=()=>{var x;const W=!!(!((x=this._menuItemAction.alt)===null||x===void 0)&&x.enabled)&&(!this._accessibilityService.isMotionReduced()||P)&&(this._altKey.keyStatus.altKey||this._altKey.keyStatus.shiftKey&&P);W!==this._wantsAltCommand&&(this._wantsAltCommand=W,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._register(this._altKey.event(O)),this._register((0,L.addDisposableListener)(A,"mouseleave",x=>{P=!1,O()})),this._register((0,L.addDisposableListener)(A,"mouseenter",x=>{P=!0,O()})),O()}}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}getTooltip(){var A;const P=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),O=P&&P.getLabel(),x=this._commandAction.tooltip||this._commandAction.label;let W=O?(0,C.localize)(0,null,x,O):x;if(!this._wantsAltCommand&&(!((A=this._menuItemAction.alt)===null||A===void 0)&&A.enabled)){const U=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,F=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),G=F&&F.getLabel(),Y=G?(0,C.localize)(1,null,U,G):U;W=(0,C.localize)(2,null,W,m.UILabelProvider.modifierLabels[v.OS].altKey,Y)}return W}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._updateItemClass(this._menuItemAction.item))}_updateItemClass(A){this._itemClassDispose.value=void 0;const{element:P,label:O}=this;if(!P||!O)return;const x=this._commandAction.checked&&(0,i.isICommandActionToggleInfo)(A.toggled)&&A.toggled.icon?A.toggled.icon:A.icon;if(x)if(o.ThemeIcon.isThemeIcon(x)){const W=o.ThemeIcon.asClassNameArray(x);O.classList.add(...W),this._itemClassDispose.value=(0,_.toDisposable)(()=>{O.classList.remove(...W)})}else{const W=(0,c.isDark)(this._themeService.getColorTheme().type)?(0,L.asCSSUrl)(x.dark):(0,L.asCSSUrl)(x.light),U=(0,L.$)("span");U.style.webkitMask=U.style.mask=`${W} no-repeat 50% 50%`,U.style.background="var(--vscode-icon-foreground)",U.style.display="inline-block",U.style.width="100%",U.style.height="100%",O.appendChild(U),O.classList.add("icon"),this._itemClassDispose.value=(0,_.combinedDisposable)((0,_.toDisposable)(()=>{O.classList.remove("icon"),(0,L.reset)(O)}),this._themeService.onDidColorThemeChange(()=>{this.updateClass()}))}}};e.MenuEntryActionViewItem=k,e.MenuEntryActionViewItem=k=Ie([ge(2,u.IKeybindingService),ge(3,f.INotificationService),ge(4,n.IContextKeyService),ge(5,l.IThemeService),ge(6,t.IContextMenuService),ge(7,p.IAccessibilityService)],k);let M=class extends D.DropdownMenuActionViewItem{constructor(A,P,O,x,W){var U,F,G;const Y=Object.assign(Object.assign({},P),{menuAsChild:(U=P?.menuAsChild)!==null&&U!==void 0?U:!1,classNames:(F=P?.classNames)!==null&&F!==void 0?F:o.ThemeIcon.isThemeIcon(A.item.icon)?o.ThemeIcon.asClassName(A.item.icon):void 0,keybindingProvider:(G=P?.keybindingProvider)!==null&&G!==void 0?G:ne=>O.lookupKeybinding(ne.id)});super(A,{getActions:()=>A.actions},x,Y),this._keybindingService=O,this._contextMenuService=x,this._themeService=W}render(A){super.render(A),(0,a.assertType)(this.element),A.classList.add("menu-entry");const P=this._action,{icon:O}=P.item;if(O&&!o.ThemeIcon.isThemeIcon(O)){this.element.classList.add("icon");const x=()=>{this.element&&(this.element.style.backgroundImage=(0,c.isDark)(this._themeService.getColorTheme().type)?(0,L.asCSSUrl)(O.dark):(0,L.asCSSUrl)(O.light))};x(),this._register(this._themeService.onDidColorThemeChange(()=>{x()}))}}};e.SubmenuEntryActionViewItem=M,e.SubmenuEntryActionViewItem=M=Ie([ge(2,u.IKeybindingService),ge(3,t.IContextMenuService),ge(4,l.IThemeService)],M);let R=class extends y.BaseActionViewItem{constructor(A,P,O,x,W,U,F,G){var Y,ne,se;super(null,A),this._keybindingService=O,this._notificationService=x,this._contextMenuService=W,this._menuService=U,this._instaService=F,this._storageService=G,this._container=null,this._options=P,this._storageKey=`${A.item.submenu.id}_lastActionId`;let J;const q=P?.persistLastActionId?G.get(this._storageKey,1):void 0;q&&(J=A.actions.find(V=>q===V.id)),J||(J=A.actions[0]),this._defaultAction=this._instaService.createInstance(k,J,{keybinding:this._getDefaultActionKeybindingLabel(J)});const H=Object.assign(Object.assign({keybindingProvider:V=>this._keybindingService.lookupKeybinding(V.id)},P),{menuAsChild:(Y=P?.menuAsChild)!==null&&Y!==void 0?Y:!0,classNames:(ne=P?.classNames)!==null&&ne!==void 0?ne:["codicon","codicon-chevron-down"],actionRunner:(se=P?.actionRunner)!==null&&se!==void 0?se:new S.ActionRunner});this._dropdown=new D.DropdownMenuActionViewItem(A,A.actions,this._contextMenuService,H),this._dropdown.actionRunner.onDidRun(V=>{V.action instanceof s.MenuItemAction&&this.update(V.action)})}update(A){var P;!((P=this._options)===null||P===void 0)&&P.persistLastActionId&&this._storageService.store(this._storageKey,A.id,1,1),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(k,A,{keybinding:this._getDefaultActionKeybindingLabel(A)}),this._defaultAction.actionRunner=new class extends S.ActionRunner{runAction(O,x){return be(this,void 0,void 0,function*(){yield O.run(void 0)})}},this._container&&this._defaultAction.render((0,L.prepend)(this._container,(0,L.$)(".action-container")))}_getDefaultActionKeybindingLabel(A){var P;let O;if(!((P=this._options)===null||P===void 0)&&P.renderKeybindingWithDefaultActionLabel){const x=this._keybindingService.lookupKeybinding(A.id);x&&(O=`(${x.getLabel()})`)}return O}setActionContext(A){super.setActionContext(A),this._defaultAction.setActionContext(A),this._dropdown.setActionContext(A)}render(A){this._container=A,super.render(this._container),this._container.classList.add("monaco-dropdown-with-default");const P=(0,L.$)(".action-container");this._defaultAction.render((0,L.append)(this._container,P)),this._register((0,L.addDisposableListener)(P,L.EventType.KEY_DOWN,x=>{const W=new I.StandardKeyboardEvent(x);W.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),W.stopPropagation())}));const O=(0,L.$)(".dropdown-action-container");this._dropdown.render((0,L.append)(this._container,O)),this._register((0,L.addDisposableListener)(O,L.EventType.KEY_DOWN,x=>{var W;const U=new I.StandardKeyboardEvent(x);U.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(W=this._defaultAction.element)===null||W===void 0||W.focus(),U.stopPropagation())}))}focus(A){A?this._dropdown.focus():(this._defaultAction.element.tabIndex=0,this._defaultAction.element.focus())}blur(){this._defaultAction.element.tabIndex=-1,this._dropdown.blur(),this._container.blur()}setFocusable(A){A?this._defaultAction.element.tabIndex=0:(this._defaultAction.element.tabIndex=-1,this._dropdown.setFocusable(!1))}dispose(){this._defaultAction.dispose(),this._dropdown.dispose(),super.dispose()}};e.DropdownWithDefaultActionViewItem=R,e.DropdownWithDefaultActionViewItem=R=Ie([ge(2,u.IKeybindingService),ge(3,f.INotificationService),ge(4,t.IContextMenuService),ge(5,s.IMenuService),ge(6,r.IInstantiationService),ge(7,d.IStorageService)],R);let B=class extends y.SelectActionViewItem{constructor(A,P){super(null,A,A.actions.map(O=>({text:O.id===S.Separator.ID?"\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500":O.label,isDisabled:!O.enabled})),0,P,h.defaultSelectBoxStyles,{ariaLabel:A.tooltip,optionsAsChildren:!0}),this.select(Math.max(0,A.actions.findIndex(O=>O.checked)))}render(A){super.render(A),A.style.borderColor=(0,g.asCssVariable)(g.selectBorder)}runAction(A,P){const O=this.action.actions[P];O&&this.actionRunner.run(O)}};B=Ie([ge(1,t.IContextViewService)],B);function T(N,A,P){return A instanceof s.MenuItemAction?N.createInstance(k,A,P):A instanceof s.SubmenuItemAction?A.item.isSelection?N.createInstance(B,A):A.item.rememberDefaultAction?N.createInstance(R,A,Object.assign(Object.assign({},P),{persistLastActionId:!0})):N.createInstance(M,A,P):void 0}e.createActionViewItem=T}),define(te[251],ie([1,0,7,129,222,41,13,14,26,2,40,17,27,12,29,214,682,160,818,30,25,15,58,8,34,76,77,455]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b){"use strict";var w;Object.defineProperty(e,"__esModule",{value:!0}),e.CustomizedMenuWorkbenchToolBar=e.InlineSuggestionHintsContentWidget=e.InlineCompletionsHintsWidget=void 0;let E=class extends v.Disposable{constructor(P,O,x){super(),this.editor=P,this.model=O,this.instantiationService=x,this.alwaysShowToolbar=(0,C.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).showToolbar==="always"),this.sessionPosition=void 0,this.position=(0,C.derived)(this,W=>{var U,F,G;const Y=(U=this.model.read(W))===null||U===void 0?void 0:U.ghostText.read(W);if(!this.alwaysShowToolbar.read(W)||!Y||Y.parts.length===0)return this.sessionPosition=void 0,null;const ne=Y.parts[0].column;this.sessionPosition&&this.sessionPosition.lineNumber!==Y.lineNumber&&(this.sessionPosition=void 0);const se=new n.Position(Y.lineNumber,Math.min(ne,(G=(F=this.sessionPosition)===null||F===void 0?void 0:F.column)!==null&&G!==void 0?G:Number.MAX_SAFE_INTEGER));return this.sessionPosition=se,se}),this._register((0,C.autorunWithStore)((W,U)=>{const F=this.model.read(W);if(!F||!this.alwaysShowToolbar.read(W))return;const G=U.add(this.instantiationService.createInstance(R,this.editor,!0,this.position,F.selectedInlineCompletionIndex,F.inlineCompletionsCount,F.selectedInlineCompletion.map(Y=>{var ne;return(ne=Y?.inlineCompletion.source.inlineCompletions.commands)!==null&&ne!==void 0?ne:[]})));P.addContentWidget(G),U.add((0,v.toDisposable)(()=>P.removeContentWidget(G))),U.add((0,C.autorun)(Y=>{this.position.read(Y)&&F.lastTriggerKind.read(Y)!==t.InlineCompletionTriggerKind.Explicit&&F.triggerExplicitly()}))}))}};e.InlineCompletionsHintsWidget=E,e.InlineCompletionsHintsWidget=E=Ie([ge(2,g.IInstantiationService)],E);const k=(0,b.registerIcon)("inline-suggestion-hints-next",_.Codicon.chevronRight,(0,u.localize)(0,null)),M=(0,b.registerIcon)("inline-suggestion-hints-previous",_.Codicon.chevronLeft,(0,u.localize)(1,null));let R=w=class extends v.Disposable{static get dropDownVisible(){return this._dropDownVisible}createCommandAction(P,O,x){const W=new D.Action(P,O,x,!0,()=>this._commandService.executeCommand(P)),U=this.keybindingService.lookupKeybinding(P,this._contextKeyService);let F=O;return U&&(F=(0,u.localize)(2,null,O,U.getLabel())),W.tooltip=F,W}constructor(P,O,x,W,U,F,G,Y,ne,se,J){super(),this.editor=P,this.withBorder=O,this._position=x,this._currentSuggestionIdx=W,this._suggestionCount=U,this._extraCommands=F,this._commandService=G,this.keybindingService=ne,this._contextKeyService=se,this._menuService=J,this.id=`InlineSuggestionHintsContentWidget${w.id++}`,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this.nodes=(0,L.h)("div.inlineSuggestionsHints",{className:this.withBorder?".withBorder":""},[(0,L.h)("div@toolBar")]),this.previousAction=this.createCommandAction(r.showPreviousInlineSuggestionActionId,(0,u.localize)(3,null),i.ThemeIcon.asClassName(M)),this.availableSuggestionCountAction=new D.Action("inlineSuggestionHints.availableSuggestionCount","",void 0,!1),this.nextAction=this.createCommandAction(r.showNextInlineSuggestionActionId,(0,u.localize)(4,null),i.ThemeIcon.asClassName(k)),this.inlineCompletionsActionsMenus=this._register(this._menuService.createMenu(l.MenuId.InlineCompletionsActions,this._contextKeyService)),this.clearAvailableSuggestionCountLabelDebounced=this._register(new m.RunOnceScheduler(()=>{this.availableSuggestionCountAction.label=""},100)),this.disableButtonsDebounced=this._register(new m.RunOnceScheduler(()=>{this.previousAction.enabled=this.nextAction.enabled=!1},100)),this.lastCommands=[],this.toolBar=this._register(Y.createInstance(N,this.nodes.toolBar,l.MenuId.InlineSuggestionToolbar,{menuOptions:{renderShortTitle:!0},toolbarOptions:{primaryGroup:q=>q.startsWith("primary")},actionViewItemProvider:(q,H)=>{if(q instanceof l.MenuItemAction)return Y.createInstance(T,q,void 0);if(q===this.availableSuggestionCountAction){const V=new B(void 0,q,{label:!0,icon:!1});return V.setClass("availableSuggestionCount"),V}},telemetrySource:"InlineSuggestionToolbar"})),this.toolBar.setPrependedPrimaryActions([this.previousAction,this.availableSuggestionCountAction,this.nextAction]),this._register(this.toolBar.onDidChangeDropdownVisibility(q=>{w._dropDownVisible=q})),this._register((0,C.autorun)(q=>{this._position.read(q),this.editor.layoutContentWidget(this)})),this._register((0,C.autorun)(q=>{const H=this._suggestionCount.read(q),V=this._currentSuggestionIdx.read(q);H!==void 0?(this.clearAvailableSuggestionCountLabelDebounced.cancel(),this.availableSuggestionCountAction.label=`${V+1}/${H}`):this.clearAvailableSuggestionCountLabelDebounced.schedule(),H!==void 0&&H>1?(this.disableButtonsDebounced.cancel(),this.previousAction.enabled=this.nextAction.enabled=!0):this.disableButtonsDebounced.schedule()})),this._register((0,C.autorun)(q=>{const H=this._extraCommands.read(q);if((0,S.equals)(this.lastCommands,H))return;this.lastCommands=H;const V=H.map(Z=>({class:void 0,id:Z.id,enabled:!0,tooltip:Z.tooltip||"",label:Z.title,run:ee=>this._commandService.executeCommand(Z.id)}));for(const[Z,ee]of this.inlineCompletionsActionsMenus.getActions())for(const le of ee)le instanceof l.MenuItemAction&&V.push(le);V.length>0&&V.unshift(new D.Separator),this.toolBar.setAdditionalSecondaryActions(V)}))}getId(){return this.id}getDomNode(){return this.nodes.root}getPosition(){return{position:this._position.get(),preference:[1,2],positionAffinity:3}}};e.InlineSuggestionHintsContentWidget=R,R._dropDownVisible=!1,R.id=0,e.InlineSuggestionHintsContentWidget=R=w=Ie([ge(6,o.ICommandService),ge(7,g.IInstantiationService),ge(8,h.IKeybindingService),ge(9,c.IContextKeyService),ge(10,l.IMenuService)],R);class B extends I.ActionViewItem{constructor(){super(...arguments),this._className=void 0}setClass(P){this._className=P}render(P){super.render(P),this._className&&P.classList.add(this._className)}}class T extends f.MenuEntryActionViewItem{updateLabel(){const P=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!P)return super.updateLabel();if(this.label){const O=(0,L.h)("div.keybinding").root;new y.KeybindingLabel(O,s.OS,Object.assign({disableTitle:!0},y.unthemedKeybindingLabelOptions)).set(P),this.label.textContent=this._action.label,this.label.appendChild(O),this.label.classList.add("inlineSuggestionStatusBarItemLabel")}}}let N=class extends d.WorkbenchToolBar{constructor(P,O,x,W,U,F,G,Y){super(P,Object.assign({resetMenu:O},x),W,U,F,G,Y),this.menuId=O,this.options2=x,this.menuService=W,this.contextKeyService=U,this.menu=this._store.add(this.menuService.createMenu(this.menuId,this.contextKeyService,{emitEventsForSubmenuChanges:!0})),this.additionalActions=[],this.prependedPrimaryActions=[],this._store.add(this.menu.onDidChange(()=>this.updateToolbar())),this.updateToolbar()}updateToolbar(){var P,O,x,W,U,F,G;const Y=[],ne=[];(0,f.createAndFillInActionBarActions)(this.menu,(P=this.options2)===null||P===void 0?void 0:P.menuOptions,{primary:Y,secondary:ne},(x=(O=this.options2)===null||O===void 0?void 0:O.toolbarOptions)===null||x===void 0?void 0:x.primaryGroup,(U=(W=this.options2)===null||W===void 0?void 0:W.toolbarOptions)===null||U===void 0?void 0:U.shouldInlineSubmenu,(G=(F=this.options2)===null||F===void 0?void 0:F.toolbarOptions)===null||G===void 0?void 0:G.useSeparatorsInPrimaryActions),ne.push(...this.additionalActions),Y.unshift(...this.prependedPrimaryActions),this.setActions(Y,ne)}setPrependedPrimaryActions(P){(0,S.equals)(this.prependedPrimaryActions,P,(O,x)=>O===x)||(this.prependedPrimaryActions=P,this.updateToolbar())}setAdditionalSecondaryActions(P){(0,S.equals)(this.additionalActions,P,(O,x)=>O===x)||(this.additionalActions=P,this.updateToolbar())}};e.CustomizedMenuWorkbenchToolBar=N,e.CustomizedMenuWorkbenchToolBar=N=Ie([ge(3,l.IMenuService),ge(4,c.IContextKeyService),ge(5,a.IContextMenuService),ge(6,h.IKeybindingService),ge(7,p.ITelemetryService)],N)}),define(te[865],ie([1,0,7,73,2,706,160,30,15,8]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestWidgetStatus=void 0;class C extends S.MenuEntryActionViewItem{updateLabel(){const n=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!n)return super.updateLabel();this.label&&(this.label.textContent=(0,D.localize)(0,null,this._action.label,C.symbolPrintEnter(n)))}static symbolPrintEnter(n){var t;return(t=n.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}}let s=class{constructor(n,t,r,u,f){this._menuId=t,this._menuService=u,this._contextKeyService=f,this._menuDisposables=new y.DisposableStore,this.element=L.append(n,L.$(".suggest-status-bar"));const d=l=>l instanceof m.MenuItemAction?r.createInstance(C,l,void 0):void 0;this._leftActions=new I.ActionBar(this.element,{actionViewItemProvider:d}),this._rightActions=new I.ActionBar(this.element,{actionViewItemProvider:d}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this._leftActions.dispose(),this._rightActions.dispose(),this.element.remove()}show(){const n=this._menuService.createMenu(this._menuId,this._contextKeyService),t=()=>{const r=[],u=[];for(const[f,d]of n.getActions())f==="left"?r.push(...d):u.push(...d);this._leftActions.clear(),this._leftActions.push(r),this._rightActions.clear(),this._rightActions.push(u)};this._menuDisposables.add(n.onDidChange(()=>t())),this._menuDisposables.add(n)}hide(){this._menuDisposables.clear()}};e.SuggestWidgetStatus=s,e.SuggestWidgetStatus=s=Ie([ge(2,v.IInstantiationService),ge(3,m.IMenuService),ge(4,_.IContextKeyService)],s)}),define(te[866],ie([1,0,7,41,6,2,160,30,15,34,48,76,828,58]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuMenuDelegate=e.ContextMenuService=void 0;let t=class extends D.Disposable{get contextMenuHandler(){return this._contextMenuHandler||(this._contextMenuHandler=new i.ContextMenuHandler(this.contextViewService,this.telemetryService,this.notificationService,this.keybindingService)),this._contextMenuHandler}constructor(f,d,l,o,c,a){super(),this.telemetryService=f,this.notificationService=d,this.contextViewService=l,this.keybindingService=o,this.menuService=c,this.contextKeyService=a,this._contextMenuHandler=void 0,this._onDidShowContextMenu=this._store.add(new y.Emitter),this._onDidHideContextMenu=this._store.add(new y.Emitter)}configure(f){this.contextMenuHandler.configure(f)}showContextMenu(f){f=r.transform(f,this.menuService,this.contextKeyService),this.contextMenuHandler.showContextMenu(Object.assign(Object.assign({},f),{onHide:d=>{var l;(l=f.onHide)===null||l===void 0||l.call(f,d),this._onDidHideContextMenu.fire()}})),L.ModifierKeyEmitter.getInstance().resetKeyStatus(),this._onDidShowContextMenu.fire()}};e.ContextMenuService=t,e.ContextMenuService=t=Ie([ge(0,s.ITelemetryService),ge(1,C.INotificationService),ge(2,n.IContextViewService),ge(3,v.IKeybindingService),ge(4,m.IMenuService),ge(5,_.IContextKeyService)],t);var r;(function(u){function f(l){return l&&l.menuId instanceof m.MenuId}function d(l,o,c){if(!f(l))return l;const{menuId:a,menuActionOptions:g,contextKeyService:h}=l;return Object.assign(Object.assign({},l),{getActions:()=>{const p=[];if(a){const b=o.createMenu(a,h??c);(0,S.createAndFillInContextMenuActions)(b,g,p),b.dispose()}return l.getActions?I.Separator.join(l.getActions(),p):p}})}u.transform=d})(r||(e.ContextMenuMenuDelegate=r={}))}),define(te[867],ie([1,0,19,6,15,8,132,190,55,787,104,31,23,839]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputService=void 0;let t=class extends i.Themable{get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get hasController(){return!!this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(v.QuickAccessController))),this._quickAccess}constructor(u,f,d,l){super(d),this.instantiationService=u,this.contextKeyService=f,this.layoutService=l,this._onShow=this._register(new I.Emitter),this._onHide=this._register(new I.Emitter),this.contexts=new Map}createController(u=this.layoutService,f){const d={idPrefix:"quickInput_",container:u.container,ignoreFocusOut:()=>!1,backKeybindingLabel:()=>{},setContextKey:o=>this.setContextKey(o),linkOpenerDelegate:o=>{this.instantiationService.invokeFunction(c=>{c.get(_.IOpenerService).open(o,{allowCommands:!0,fromUserGesture:!0})})},returnFocus:()=>u.focus(),createList:(o,c,a,g,h)=>this.instantiationService.createInstance(m.WorkbenchList,o,c,a,g,h),styles:this.computeStyles()},l=this._register(new n.QuickInputController(Object.assign(Object.assign({},d),f),this.themeService));return l.layout(u.dimension,u.offset.quickPickTop),this._register(u.onDidLayout(o=>l.layout(o,u.offset.quickPickTop))),this._register(l.onShow(()=>{this.resetContextKeys(),this._onShow.fire()})),this._register(l.onHide(()=>{this.resetContextKeys(),this._onHide.fire()})),l}setContextKey(u){let f;u&&(f=this.contexts.get(u),f||(f=new y.RawContextKey(u,!1).bindTo(this.contextKeyService),this.contexts.set(u,f))),!(f&&f.get())&&(this.resetContextKeys(),f?.set(!0))}resetContextKeys(){this.contexts.forEach(u=>{u.get()&&u.reset()})}pick(u,f={},d=L.CancellationToken.None){return this.controller.pick(u,f,d)}createQuickPick(){return this.controller.createQuickPick()}createInputBox(){return this.controller.createInputBox()}updateStyles(){this.hasController&&this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:{quickInputBackground:(0,s.asCssVariable)(s.quickInputBackground),quickInputForeground:(0,s.asCssVariable)(s.quickInputForeground),quickInputTitleBackground:(0,s.asCssVariable)(s.quickInputTitleBackground),widgetBorder:(0,s.asCssVariable)(s.widgetBorder),widgetShadow:(0,s.asCssVariable)(s.widgetShadow)},inputBox:C.defaultInputBoxStyles,toggle:C.defaultToggleStyles,countBadge:C.defaultCountBadgeStyles,button:C.defaultButtonStyles,progressBar:C.defaultProgressBarStyles,keybindingLabel:C.defaultKeybindingLabelStyles,list:(0,C.getListStyles)({listBackground:s.quickInputBackground,listFocusBackground:s.quickInputListFocusBackground,listFocusForeground:s.quickInputListFocusForeground,listInactiveFocusForeground:s.quickInputListFocusForeground,listInactiveSelectionIconForeground:s.quickInputListFocusIconForeground,listInactiveFocusBackground:s.quickInputListFocusBackground,listFocusOutline:s.activeContrastBorder,listInactiveFocusOutline:s.activeContrastBorder}),pickerGroup:{pickerGroupBorder:(0,s.asCssVariable)(s.pickerGroupBorder),pickerGroupForeground:(0,s.asCssVariable)(s.pickerGroupForeground)}}}};e.QuickInputService=t,e.QuickInputService=t=Ie([ge(0,D.IInstantiationService),ge(1,y.IContextKeyService),ge(2,i.IThemeService),ge(3,S.ILayoutService)],t)}),define(te[868],ie([1,0,16,23,19,8,15,342,33,867,106,474]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.QuickInputEditorWidget=e.QuickInputEditorContribution=e.StandaloneQuickInputService=void 0;let s=class extends v.QuickInputService{constructor(u,f,d,l,o){super(f,d,l,new m.EditorScopedLayoutService(u.getContainerDomNode(),o)),this.host=void 0;const c=n.get(u);if(c){const a=c.widget;this.host={_serviceBrand:void 0,get hasContainer(){return!0},get container(){return a.getDomNode()},get dimension(){return u.getLayoutInfo()},get onDidLayout(){return u.onDidLayoutChange},focus:()=>u.focus(),offset:{top:0,quickPickTop:0}}}else this.host=void 0}createController(){return super.createController(this.host)}};s=Ie([ge(1,D.IInstantiationService),ge(2,S.IContextKeyService),ge(3,I.IThemeService),ge(4,_.ICodeEditorService)],s);let i=class{get activeService(){const u=this.codeEditorService.getFocusedCodeEditor();if(!u)throw new Error("Quick input service needs a focused editor to work.");let f=this.mapEditorToService.get(u);if(!f){const d=f=this.instantiationService.createInstance(s,u);this.mapEditorToService.set(u,f),(0,C.createSingleCallFunction)(u.onDidDispose)(()=>{d.dispose(),this.mapEditorToService.delete(u)})}return f}get quickAccess(){return this.activeService.quickAccess}constructor(u,f){this.instantiationService=u,this.codeEditorService=f,this.mapEditorToService=new Map}pick(u,f={},d=y.CancellationToken.None){return this.activeService.pick(u,f,d)}createQuickPick(){return this.activeService.createQuickPick()}createInputBox(){return this.activeService.createInputBox()}};e.StandaloneQuickInputService=i,e.StandaloneQuickInputService=i=Ie([ge(0,D.IInstantiationService),ge(1,_.ICodeEditorService)],i);class n{static get(u){return u.getContribution(n.ID)}constructor(u){this.editor=u,this.widget=new t(this.editor)}dispose(){this.widget.dispose()}}e.QuickInputEditorContribution=n,n.ID="editor.controller.quickInput";class t{constructor(u){this.codeEditor=u,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return t.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}e.QuickInputEditorWidget=t,t.ID="editor.contrib.quickInputWidget",(0,L.registerEditorContribution)(n.ID,n,4)}),define(te[191],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoSource=e.UndoRedoGroup=e.ResourceEditStackSnapshot=e.IUndoRedoService=void 0,e.IUndoRedoService=(0,L.createDecorator)("undoRedoService");class I{constructor(m,_){this.resource=m,this.elements=_}}e.ResourceEditStackSnapshot=I;class y{constructor(){this.id=y._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoGroup=y,y._ID=0,y.None=new y;class D{constructor(){this.id=D._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}e.UndoRedoSource=D,D._ID=0,D.None=new D}),define(te[37],ie([1,0,13,36,9,6,2,10,21,122,201,64,12,5,24,173,42,32,49,600,851,333,290,512,513,324,601,179,626,110,191]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M){"use strict";var R;Object.defineProperty(e,"__esModule",{value:!0}),e.AttachedViews=e.ModelDecorationOptions=e.ModelDecorationInjectedTextOptions=e.ModelDecorationMinimapOptions=e.ModelDecorationGlyphMarginOptions=e.ModelDecorationOverviewRulerOptions=e.TextModel=e.createTextBuffer=e.createTextBufferFactoryFromSnapshot=e.createTextBufferFactory=void 0;function B(K){const z=new b.PieceTreeTextBufferBuilder;return z.acceptChunk(K),z.finish()}e.createTextBufferFactory=B;function T(K){const z=new b.PieceTreeTextBufferBuilder;let Q;for(;typeof(Q=K.read())=="string";)z.acceptChunk(Q);return z.finish()}e.createTextBufferFactoryFromSnapshot=T;function N(K,z){let Q;return typeof K=="string"?Q=B(K):d.isITextSnapshot(K)?Q=T(K):Q=K,Q.create(z)}e.createTextBuffer=N;let A=0;const P=999,O=1e4;class x{constructor(z){this._source=z,this._eos=!1}read(){if(this._eos)return null;const z=[];let Q=0,j=0;do{const re=this._source.read();if(re===null)return this._eos=!0,Q===0?null:z.join("");if(re.length>0&&(z[Q++]=re,j+=re.length),j>=64*1024)return z.join("")}while(!0)}}const W=()=>{throw new Error("Invalid change accessor")};let U=R=class extends S.Disposable{static resolveOptions(z,Q){if(Q.detectIndentation){const j=(0,g.guessIndentation)(z,Q.tabSize,Q.insertSpaces);return new d.TextModelResolvedOptions({tabSize:j.tabSize,indentSize:"tabSize",insertSpaces:j.insertSpaces,trimAutoWhitespace:Q.trimAutoWhitespace,defaultEOL:Q.defaultEOL,bracketPairColorizationOptions:Q.bracketPairColorizationOptions})}return new d.TextModelResolvedOptions(Q)}get onDidChangeLanguage(){return this._tokenizationTextModelPart.onDidChangeLanguage}get onDidChangeLanguageConfiguration(){return this._tokenizationTextModelPart.onDidChangeLanguageConfiguration}get onDidChangeTokens(){return this._tokenizationTextModelPart.onDidChangeTokens}onDidChangeContent(z){return this._eventEmitter.slowEvent(Q=>z(Q.contentChangedEvent))}onDidChangeContentOrInjectedText(z){return(0,S.combinedDisposable)(this._eventEmitter.fastEvent(Q=>z(Q)),this._onDidChangeInjectedText.event(Q=>z(Q)))}_isDisposing(){return this.__isDisposing}get tokenization(){return this._tokenizationTextModelPart}get bracketPairs(){return this._bracketPairs}get guides(){return this._guidesTextModelPart}constructor(z,Q,j,re=null,oe,he,me){super(),this._undoRedoService=oe,this._languageService=he,this._languageConfigurationService=me,this._onWillDispose=this._register(new D.Emitter),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new de(Ae=>this.handleBeforeFireDecorationsChangedEvent(Ae))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeOptions=this._register(new D.Emitter),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new D.Emitter),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new D.Emitter),this._eventEmitter=this._register(new ce),this._languageSelectionListener=this._register(new S.MutableDisposable),this._deltaDecorationCallCnt=0,this._attachedViews=new ae,A++,this.id="$model"+A,this.isForSimpleWidget=j.isForSimpleWidget,typeof re>"u"||re===null?this._associatedResource=_.URI.parse("inmemory://model/"+A):this._associatedResource=re,this._attachedEditorCount=0;const{textBuffer:pe,disposable:ve}=N(z,j.defaultEOL);this._buffer=pe,this._bufferDisposable=ve,this._options=R.resolveOptions(this._buffer,j);const we=typeof Q=="string"?Q:Q.languageId;typeof Q!="string"&&(this._languageSelectionListener.value=Q.onDidChange(()=>this._setLanguage(Q.languageId))),this._bracketPairs=this._register(new l.BracketPairsTextModelPart(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new a.GuidesTextModelPart(this,this._languageConfigurationService)),this._decorationProvider=this._register(new o.ColorizedBracketPairsDecorationProvider(this)),this._tokenizationTextModelPart=new E.TokenizationTextModelPart(this._languageService,this._languageConfigurationService,this,this._bracketPairs,we,this._attachedViews);const Le=this._buffer.getLineCount(),Ee=this._buffer.getValueLengthInRange(new n.Range(1,1,Le,this._buffer.getLineLength(Le)+1),0);j.largeFileOptimizations?(this._isTooLargeForTokenization=Ee>R.LARGE_FILE_SIZE_THRESHOLD||Le>R.LARGE_FILE_LINE_COUNT_THRESHOLD,this._isTooLargeForHeapOperation=Ee>R.LARGE_FILE_HEAP_OPERATION_THRESHOLD):(this._isTooLargeForTokenization=!1,this._isTooLargeForHeapOperation=!1),this._isTooLargeForSyncing=Ee>R._MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this.__isDisposing=!1,this._instanceId=m.singleLetterHash(A),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new ne,this._commandManager=new c.EditStack(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._register(this._decorationProvider.onDidChange(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})),this._languageService.requestRichLanguageFeatures(we)}dispose(){this.__isDisposing=!0,this._onWillDispose.fire(),this._tokenizationTextModelPart.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this.__isDisposing=!1;const z=new p.PieceTreeTextBuffer([],"",` -`,!1,!1,!0,!0);z.dispose(),this._buffer=z,this._bufferDisposable=S.Disposable.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(z,Q){this.__isDisposing||(this._tokenizationTextModelPart.handleDidChangeContent(Q),this._bracketPairs.handleDidChangeContent(Q),this._eventEmitter.fire(new k.InternalModelContentChangeEvent(z,Q)))}setValue(z){if(this._assertNotDisposed(),z==null)throw(0,y.illegalArgument)();const{textBuffer:Q,disposable:j}=N(z,this._options.defaultEOL);this._setValueFromTextBuffer(Q,j)}_createContentChanged2(z,Q,j,re,oe,he,me,pe){return{changes:[{range:z,rangeOffset:Q,rangeLength:j,text:re}],eol:this._buffer.getEOL(),isEolChange:pe,versionId:this.getVersionId(),isUndoing:oe,isRedoing:he,isFlush:me}}_setValueFromTextBuffer(z,Q){this._assertNotDisposed();const j=this.getFullModelRange(),re=this.getValueLengthInRange(j),oe=this.getLineCount(),he=this.getLineMaxColumn(oe);this._buffer=z,this._bufferDisposable.dispose(),this._bufferDisposable=Q,this._increaseVersionId(),this._decorations=Object.create(null),this._decorationsTree=new ne,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new k.ModelRawContentChangedEvent([new k.ModelRawFlush],this._versionId,!1,!1),this._createContentChanged2(new n.Range(1,1,oe,he),0,re,this.getValue(),!1,!1,!0,!1))}setEOL(z){this._assertNotDisposed();const Q=z===1?`\r -`:` -`;if(this._buffer.getEOL()===Q)return;const j=this.getFullModelRange(),re=this.getValueLengthInRange(j),oe=this.getLineCount(),he=this.getLineMaxColumn(oe);this._onBeforeEOLChange(),this._buffer.setEOL(Q),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new k.ModelRawContentChangedEvent([new k.ModelRawEOLChanged],this._versionId,!1,!1),this._createContentChanged2(new n.Range(1,1,oe,he),0,re,this.getValue(),!1,!1,!1,!0))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const z=this.getVersionId(),Q=this._decorationsTree.collectNodesPostOrder();for(let j=0,re=Q.length;j0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isTooLargeForHeapOperation(){return this._isTooLargeForHeapOperation}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let z=0,Q=0;const j=this._buffer.getLineCount();for(let re=1;re<=j;re++){const oe=this._buffer.getLineLength(re);oe>=O?Q+=oe:z+=oe}return Q>z}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(z){this._assertNotDisposed();const Q=typeof z.tabSize<"u"?z.tabSize:this._options.tabSize,j=typeof z.indentSize<"u"?z.indentSize:this._options.originalIndentSize,re=typeof z.insertSpaces<"u"?z.insertSpaces:this._options.insertSpaces,oe=typeof z.trimAutoWhitespace<"u"?z.trimAutoWhitespace:this._options.trimAutoWhitespace,he=typeof z.bracketColorizationOptions<"u"?z.bracketColorizationOptions:this._options.bracketPairColorizationOptions,me=new d.TextModelResolvedOptions({tabSize:Q,indentSize:j,insertSpaces:re,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:oe,bracketPairColorizationOptions:he});if(this._options.equals(me))return;const pe=this._options.createChangeEvent(me);this._options=me,this._bracketPairs.handleDidChangeOptions(pe),this._decorationProvider.handleDidChangeOptions(pe),this._onDidChangeOptions.fire(pe)}detectIndentation(z,Q){this._assertNotDisposed();const j=(0,g.guessIndentation)(this._buffer,Q,z);this.updateOptions({insertSpaces:j.insertSpaces,tabSize:j.tabSize,indentSize:j.tabSize})}normalizeIndentation(z){return this._assertNotDisposed(),(0,C.normalizeIndentation)(z,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(z=null){const Q=this.findMatches(m.UNUSUAL_LINE_TERMINATORS.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(z,Q.map(j=>({range:j.range,text:null})),()=>null)}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(z){this._assertNotDisposed();const Q=this._validatePosition(z.lineNumber,z.column,0);return this._buffer.getOffsetAt(Q.lineNumber,Q.column)}getPositionAt(z){this._assertNotDisposed();const Q=Math.min(this._buffer.getLength(),Math.max(0,z));return this._buffer.getPositionAt(Q)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(z){this._versionId=z}_overwriteAlternativeVersionId(z){this._alternativeVersionId=z}_overwriteInitialUndoRedoSnapshot(z){this._initialUndoRedoSnapshot=z}getValue(z,Q=!1){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new y.BugIndicatingError("Operation would exceed heap memory limits");const j=this.getFullModelRange(),re=this.getValueInRange(j,z);return Q?this._buffer.getBOM()+re:re}createSnapshot(z=!1){return new x(this._buffer.createSnapshot(z))}getValueLength(z,Q=!1){this._assertNotDisposed();const j=this.getFullModelRange(),re=this.getValueLengthInRange(j,z);return Q?this._buffer.getBOM().length+re:re}getValueInRange(z,Q=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(z),Q)}getValueLengthInRange(z,Q=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(z),Q)}getCharacterCountInRange(z,Q=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(z),Q)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineContent(z)}getLineLength(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(z)}getLinesContent(){if(this._assertNotDisposed(),this.isTooLargeForHeapOperation())throw new y.BugIndicatingError("Operation would exceed heap memory limits");return this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` -`?0:1}getLineMinColumn(z){return this._assertNotDisposed(),1}getLineMaxColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLength(z)+1}getLineFirstNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(z)}getLineLastNonWhitespaceColumn(z){if(this._assertNotDisposed(),z<1||z>this.getLineCount())throw new y.BugIndicatingError("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(z)}_validateRangeRelaxedNoAllocations(z){const Q=this._buffer.getLineCount(),j=z.startLineNumber,re=z.startColumn;let oe=Math.floor(typeof j=="number"&&!isNaN(j)?j:1),he=Math.floor(typeof re=="number"&&!isNaN(re)?re:1);if(oe<1)oe=1,he=1;else if(oe>Q)oe=Q,he=this.getLineMaxColumn(oe);else if(he<=1)he=1;else{const Le=this.getLineMaxColumn(oe);he>=Le&&(he=Le)}const me=z.endLineNumber,pe=z.endColumn;let ve=Math.floor(typeof me=="number"&&!isNaN(me)?me:1),we=Math.floor(typeof pe=="number"&&!isNaN(pe)?pe:1);if(ve<1)ve=1,we=1;else if(ve>Q)ve=Q,we=this.getLineMaxColumn(ve);else if(we<=1)we=1;else{const Le=this.getLineMaxColumn(ve);we>=Le&&(we=Le)}return j===oe&&re===he&&me===ve&&pe===we&&z instanceof n.Range&&!(z instanceof t.Selection)?z:new n.Range(oe,he,ve,we)}_isValidPosition(z,Q,j){if(typeof z!="number"||typeof Q!="number"||isNaN(z)||isNaN(Q)||z<1||Q<1||(z|0)!==z||(Q|0)!==Q)return!1;const re=this._buffer.getLineCount();if(z>re)return!1;if(Q===1)return!0;const oe=this.getLineMaxColumn(z);if(Q>oe)return!1;if(j===1){const he=this._buffer.getLineCharCode(z,Q-2);if(m.isHighSurrogate(he))return!1}return!0}_validatePosition(z,Q,j){const re=Math.floor(typeof z=="number"&&!isNaN(z)?z:1),oe=Math.floor(typeof Q=="number"&&!isNaN(Q)?Q:1),he=this._buffer.getLineCount();if(re<1)return new i.Position(1,1);if(re>he)return new i.Position(he,this.getLineMaxColumn(he));if(oe<=1)return new i.Position(re,1);const me=this.getLineMaxColumn(re);if(oe>=me)return new i.Position(re,me);if(j===1){const pe=this._buffer.getLineCharCode(re,oe-2);if(m.isHighSurrogate(pe))return new i.Position(re,oe-1)}return new i.Position(re,oe)}validatePosition(z){return this._assertNotDisposed(),z instanceof i.Position&&this._isValidPosition(z.lineNumber,z.column,1)?z:this._validatePosition(z.lineNumber,z.column,1)}_isValidRange(z,Q){const j=z.startLineNumber,re=z.startColumn,oe=z.endLineNumber,he=z.endColumn;if(!this._isValidPosition(j,re,0)||!this._isValidPosition(oe,he,0))return!1;if(Q===1){const me=re>1?this._buffer.getLineCharCode(j,re-2):0,pe=he>1&&he<=this._buffer.getLineLength(oe)?this._buffer.getLineCharCode(oe,he-2):0,ve=m.isHighSurrogate(me),we=m.isHighSurrogate(pe);return!ve&&!we}return!0}validateRange(z){if(this._assertNotDisposed(),z instanceof n.Range&&!(z instanceof t.Selection)&&this._isValidRange(z,1))return z;const j=this._validatePosition(z.startLineNumber,z.startColumn,0),re=this._validatePosition(z.endLineNumber,z.endColumn,0),oe=j.lineNumber,he=j.column,me=re.lineNumber,pe=re.column;{const ve=he>1?this._buffer.getLineCharCode(oe,he-2):0,we=pe>1&&pe<=this._buffer.getLineLength(me)?this._buffer.getLineCharCode(me,pe-2):0,Le=m.isHighSurrogate(ve),Ee=m.isHighSurrogate(we);return!Le&&!Ee?new n.Range(oe,he,me,pe):oe===me&&he===pe?new n.Range(oe,he-1,me,pe-1):Le&&Ee?new n.Range(oe,he-1,me,pe+1):Le?new n.Range(oe,he-1,me,pe):new n.Range(oe,he,me,pe+1)}return new n.Range(oe,he,me,pe)}modifyPosition(z,Q){this._assertNotDisposed();const j=this.getOffsetAt(z)+Q;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,j)))}getFullModelRange(){this._assertNotDisposed();const z=this.getLineCount();return new n.Range(1,1,z,this.getLineMaxColumn(z))}findMatchesLineByLine(z,Q,j,re){return this._buffer.findMatchesLineByLine(z,Q,j,re)}findMatches(z,Q,j,re,oe,he,me=P){this._assertNotDisposed();let pe=null;Q!==null&&(Array.isArray(Q)||(Q=[Q]),Q.every(Le=>n.Range.isIRange(Le))&&(pe=Q.map(Le=>this.validateRange(Le)))),pe===null&&(pe=[this.getFullModelRange()]),pe=pe.sort((Le,Ee)=>Le.startLineNumber-Ee.startLineNumber||Le.startColumn-Ee.startColumn);const ve=[];ve.push(pe.reduce((Le,Ee)=>n.Range.areIntersecting(Le,Ee)?Le.plusRange(Ee):(ve.push(Le),Ee)));let we;if(!j&&z.indexOf(` -`)<0){const Ee=new w.SearchParams(z,j,re,oe).parseSearchRequest();if(!Ee)return[];we=Ae=>this.findMatchesLineByLine(Ae,Ee,he,me)}else we=Le=>w.TextModelSearch.findMatches(this,new w.SearchParams(z,j,re,oe),Le,he,me);return ve.map(we).reduce((Le,Ee)=>Le.concat(Ee),[])}findNextMatch(z,Q,j,re,oe,he){this._assertNotDisposed();const me=this.validatePosition(Q);if(!j&&z.indexOf(` -`)<0){const ve=new w.SearchParams(z,j,re,oe).parseSearchRequest();if(!ve)return null;const we=this.getLineCount();let Le=new n.Range(me.lineNumber,me.column,we,this.getLineMaxColumn(we)),Ee=this.findMatchesLineByLine(Le,ve,he,1);return w.TextModelSearch.findNextMatch(this,new w.SearchParams(z,j,re,oe),me,he),Ee.length>0||(Le=new n.Range(1,1,me.lineNumber,this.getLineMaxColumn(me.lineNumber)),Ee=this.findMatchesLineByLine(Le,ve,he,1),Ee.length>0)?Ee[0]:null}return w.TextModelSearch.findNextMatch(this,new w.SearchParams(z,j,re,oe),me,he)}findPreviousMatch(z,Q,j,re,oe,he){this._assertNotDisposed();const me=this.validatePosition(Q);return w.TextModelSearch.findPreviousMatch(this,new w.SearchParams(z,j,re,oe),me,he)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(z){if((this.getEOL()===` -`?0:1)!==z)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(z)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(z){return z instanceof d.ValidAnnotatedEditOperation?z:new d.ValidAnnotatedEditOperation(z.identifier||null,this.validateRange(z.range),z.text,z.forceMoveMarkers||!1,z.isAutoWhitespaceEdit||!1,z._isTracked||!1)}_validateEditOperations(z){const Q=[];for(let j=0,re=z.length;j({range:this.validateRange(me.range),text:me.text}));let he=!0;if(z)for(let me=0,pe=z.length;meve.endLineNumber,Be=ve.startLineNumber>Ae.endLineNumber;if(!Re&&!Be){we=!0;break}}if(!we){he=!1;break}}if(he)for(let me=0,pe=this._trimAutoWhitespaceLines.length;meRe.endLineNumber)&&!(ve===Re.startLineNumber&&Re.startColumn===we&&Re.isEmpty()&&Be&&Be.length>0&&Be.charAt(0)===` -`)&&!(ve===Re.startLineNumber&&Re.startColumn===1&&Re.isEmpty()&&Be&&Be.length>0&&Be.charAt(Be.length-1)===` -`)){Le=!1;break}}if(Le){const Ee=new n.Range(ve,1,ve,we);Q.push(new d.ValidAnnotatedEditOperation(null,Ee,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(z,Q,j,re)}_applyUndo(z,Q,j,re){const oe=z.map(he=>{const me=this.getPositionAt(he.newPosition),pe=this.getPositionAt(he.newEnd);return{range:new n.Range(me.lineNumber,me.column,pe.lineNumber,pe.column),text:he.oldText}});this._applyUndoRedoEdits(oe,Q,!0,!1,j,re)}_applyRedo(z,Q,j,re){const oe=z.map(he=>{const me=this.getPositionAt(he.oldPosition),pe=this.getPositionAt(he.oldEnd);return{range:new n.Range(me.lineNumber,me.column,pe.lineNumber,pe.column),text:he.newText}});this._applyUndoRedoEdits(oe,Q,!1,!0,j,re)}_applyUndoRedoEdits(z,Q,j,re,oe,he){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=j,this._isRedoing=re,this.applyEdits(z,!1),this.setEOL(Q),this._overwriteAlternativeVersionId(oe)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(he),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(z,Q=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const j=this._validateEditOperations(z);return this._doApplyEdits(j,Q)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(z,Q){const j=this._buffer.getLineCount(),re=this._buffer.applyEdits(z,this._options.trimAutoWhitespace,Q),oe=this._buffer.getLineCount(),he=re.changes;if(this._trimAutoWhitespaceLines=re.trimAutoWhitespaceLineNumbers,he.length!==0){for(let ve=0,we=he.length;ve=0;Oe--){const We=Ae+Oe,qe=Ce+Oe;ke.takeFromEndWhile(je=>je.lineNumber>qe);const Ge=ke.takeFromEndWhile(je=>je.lineNumber===qe);me.push(new k.ModelRawLineChanged(We,this.getLineContent(qe),Ge))}if(Deat.lineNumberat.lineNumber===dt)}me.push(new k.ModelRawLinesInserted(We+1,Ae+ye,it,je))}pe+=fe}this._emitContentChangedEvent(new k.ModelRawContentChangedEvent(me,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:he,eol:this._buffer.getEOL(),isEolChange:!1,versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return re.reverseEdits===null?void 0:re.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(z){if(z===null||z.size===0)return;const j=Array.from(z).map(re=>new k.ModelRawLineChanged(re,this.getLineContent(re),this._getInjectedTextInLine(re)));this._onDidChangeInjectedText.fire(new k.ModelInjectedTextChangedEvent(j))}changeDecorations(z,Q=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(Q,z)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(z,Q){const j={addDecoration:(oe,he)=>this._deltaDecorationsImpl(z,[],[{range:oe,options:he}])[0],changeDecoration:(oe,he)=>{this._changeDecorationImpl(oe,he)},changeDecorationOptions:(oe,he)=>{this._changeDecorationOptionsImpl(oe,ue(he))},removeDecoration:oe=>{this._deltaDecorationsImpl(z,[oe],[])},deltaDecorations:(oe,he)=>oe.length===0&&he.length===0?[]:this._deltaDecorationsImpl(z,oe,he)};let re=null;try{re=Q(j)}catch(oe){(0,y.onUnexpectedError)(oe)}return j.addDecoration=W,j.changeDecoration=W,j.changeDecorationOptions=W,j.removeDecoration=W,j.deltaDecorations=W,re}deltaDecorations(z,Q,j=0){if(this._assertNotDisposed(),z||(z=[]),z.length===0&&Q.length===0)return[];try{return this._deltaDecorationCallCnt++,this._deltaDecorationCallCnt>1&&(console.warn("Invoking deltaDecorations recursively could lead to leaking decorations."),(0,y.onUnexpectedError)(new Error("Invoking deltaDecorations recursively could lead to leaking decorations."))),this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(j,z,Q)}finally{this._onDidChangeDecorations.endDeferredEmit(),this._deltaDecorationCallCnt--}}_getTrackedRange(z){return this.getDecorationRange(z)}_setTrackedRange(z,Q,j){const re=z?this._decorations[z]:null;if(!re)return Q?this._deltaDecorationsImpl(0,[],[{range:Q,options:le[j]}],!0)[0]:null;if(!Q)return this._decorationsTree.delete(re),delete this._decorations[re.id],null;const oe=this._validateRangeRelaxedNoAllocations(Q),he=this._buffer.getOffsetAt(oe.startLineNumber,oe.startColumn),me=this._buffer.getOffsetAt(oe.endLineNumber,oe.endColumn);return this._decorationsTree.delete(re),re.reset(this.getVersionId(),he,me,oe),re.setOptions(le[j]),this._decorationsTree.insert(re),re.id}removeAllDecorationsWithOwnerId(z){if(this._isDisposed)return;const Q=this._decorationsTree.collectNodesFromOwner(z);for(let j=0,re=Q.length;jthis.getLineCount()?[]:this.getLinesDecorations(z,z,Q,j)}getLinesDecorations(z,Q,j=0,re=!1,oe=!1){const he=this.getLineCount(),me=Math.min(he,Math.max(1,z)),pe=Math.min(he,Math.max(1,Q)),ve=this.getLineMaxColumn(pe),we=new n.Range(me,1,pe,ve),Le=this._getDecorationsInRange(we,j,re,oe);return(0,L.pushMany)(Le,this._decorationProvider.getDecorationsInRange(we,j,re)),Le}getDecorationsInRange(z,Q=0,j=!1,re=!1,oe=!1){const he=this.validateRange(z),me=this._getDecorationsInRange(he,Q,j,oe);return(0,L.pushMany)(me,this._decorationProvider.getDecorationsInRange(he,Q,j,re)),me}getOverviewRulerDecorations(z=0,Q=!1){return this._decorationsTree.getAll(this,z,Q,!0,!1)}getInjectedTextDecorations(z=0){return this._decorationsTree.getAllInjectedText(this,z)}_getInjectedTextInLine(z){const Q=this._buffer.getOffsetAt(z,1),j=Q+this._buffer.getLineLength(z),re=this._decorationsTree.getInjectedTextInInterval(this,Q,j,0);return k.LineInjectedText.fromDecorations(re).filter(oe=>oe.lineNumber===z)}getAllDecorations(z=0,Q=!1){let j=this._decorationsTree.getAll(this,z,Q,!1,!1);return j=j.concat(this._decorationProvider.getAllDecorations(z,Q)),j}getAllMarginDecorations(z=0){return this._decorationsTree.getAll(this,z,!1,!1,!0)}_getDecorationsInRange(z,Q,j,re){const oe=this._buffer.getOffsetAt(z.startLineNumber,z.startColumn),he=this._buffer.getOffsetAt(z.endLineNumber,z.endColumn);return this._decorationsTree.getAllInInterval(this,oe,he,Q,j,re)}getRangeAt(z,Q){return this._buffer.getRangeAt(z,Q-z)}_changeDecorationImpl(z,Q){const j=this._decorations[z];if(!j)return;if(j.options.after){const me=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(me.endLineNumber)}if(j.options.before){const me=this.getDecorationRange(z);this._onDidChangeDecorations.recordLineAffectedByInjectedText(me.startLineNumber)}const re=this._validateRangeRelaxedNoAllocations(Q),oe=this._buffer.getOffsetAt(re.startLineNumber,re.startColumn),he=this._buffer.getOffsetAt(re.endLineNumber,re.endColumn);this._decorationsTree.delete(j),j.reset(this.getVersionId(),oe,he,re),this._decorationsTree.insert(j),this._onDidChangeDecorations.checkAffectedAndFire(j.options),j.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(re.endLineNumber),j.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(re.startLineNumber)}_changeDecorationOptionsImpl(z,Q){const j=this._decorations[z];if(!j)return;const re=!!(j.options.overviewRuler&&j.options.overviewRuler.color),oe=!!(Q.overviewRuler&&Q.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(j.options),this._onDidChangeDecorations.checkAffectedAndFire(Q),j.options.after||Q.after){const he=this._decorationsTree.getNodeRange(this,j);this._onDidChangeDecorations.recordLineAffectedByInjectedText(he.endLineNumber)}if(j.options.before||Q.before){const he=this._decorationsTree.getNodeRange(this,j);this._onDidChangeDecorations.recordLineAffectedByInjectedText(he.startLineNumber)}re!==oe?(this._decorationsTree.delete(j),j.setOptions(Q),this._decorationsTree.insert(j)):j.setOptions(Q)}_deltaDecorationsImpl(z,Q,j,re=!1){const oe=this.getVersionId(),he=Q.length;let me=0;const pe=j.length;let ve=0;this._onDidChangeDecorations.beginDeferredEmit();try{const we=new Array(pe);for(;methis._setLanguage(z.languageId,Q)),this._setLanguage(z.languageId,Q))}_setLanguage(z,Q){this.tokenization.setLanguageId(z,Q),this._languageService.requestRichLanguageFeatures(z)}getLanguageIdAtPosition(z,Q){return this.tokenization.getLanguageIdAtPosition(z,Q)}getWordAtPosition(z){return this._tokenizationTextModelPart.getWordAtPosition(z)}getWordUntilPosition(z){return this._tokenizationTextModelPart.getWordUntilPosition(z)}normalizePosition(z,Q){return z}getLineIndentColumn(z){return F(this.getLineContent(z))+1}};e.TextModel=U,U._MODEL_SYNC_LIMIT=50*1024*1024,U.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024,U.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3,U.LARGE_FILE_HEAP_OPERATION_THRESHOLD=256*1024*1024,U.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:r.EDITOR_MODEL_DEFAULTS.tabSize,indentSize:r.EDITOR_MODEL_DEFAULTS.indentSize,insertSpaces:r.EDITOR_MODEL_DEFAULTS.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:r.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace,largeFileOptimizations:r.EDITOR_MODEL_DEFAULTS.largeFileOptimizations,bracketPairColorizationOptions:r.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions},e.TextModel=U=R=Ie([ge(4,M.IUndoRedoService),ge(5,u.ILanguageService),ge(6,f.ILanguageConfigurationService)],U);function F(K){let z=0;for(const Q of K)if(Q===" "||Q===" ")z++;else break;return z}function G(K){return!!(K.options.overviewRuler&&K.options.overviewRuler.color)}function Y(K){return!!K.options.after||!!K.options.before}class ne{constructor(){this._decorationsTree0=new h.IntervalTree,this._decorationsTree1=new h.IntervalTree,this._injectedTextDecorationsTree=new h.IntervalTree}ensureAllNodesHaveRanges(z){this.getAll(z,0,!1,!1,!1)}_ensureNodesHaveRanges(z,Q){for(const j of Q)j.range===null&&(j.range=z.getRangeAt(j.cachedAbsoluteStart,j.cachedAbsoluteEnd));return Q}getAllInInterval(z,Q,j,re,oe,he){const me=z.getVersionId(),pe=this._intervalSearch(Q,j,re,oe,me,he);return this._ensureNodesHaveRanges(z,pe)}_intervalSearch(z,Q,j,re,oe,he){const me=this._decorationsTree0.intervalSearch(z,Q,j,re,oe,he),pe=this._decorationsTree1.intervalSearch(z,Q,j,re,oe,he),ve=this._injectedTextDecorationsTree.intervalSearch(z,Q,j,re,oe,he);return me.concat(pe).concat(ve)}getInjectedTextInInterval(z,Q,j,re){const oe=z.getVersionId(),he=this._injectedTextDecorationsTree.intervalSearch(Q,j,re,!1,oe,!1);return this._ensureNodesHaveRanges(z,he).filter(me=>me.options.showIfCollapsed||!me.range.isEmpty())}getAllInjectedText(z,Q){const j=z.getVersionId(),re=this._injectedTextDecorationsTree.search(Q,!1,j,!1);return this._ensureNodesHaveRanges(z,re).filter(oe=>oe.options.showIfCollapsed||!oe.range.isEmpty())}getAll(z,Q,j,re,oe){const he=z.getVersionId(),me=this._search(Q,j,re,he,oe);return this._ensureNodesHaveRanges(z,me)}_search(z,Q,j,re,oe){if(j)return this._decorationsTree1.search(z,Q,re,oe);{const he=this._decorationsTree0.search(z,Q,re,oe),me=this._decorationsTree1.search(z,Q,re,oe),pe=this._injectedTextDecorationsTree.search(z,Q,re,oe);return he.concat(me).concat(pe)}}collectNodesFromOwner(z){const Q=this._decorationsTree0.collectNodesFromOwner(z),j=this._decorationsTree1.collectNodesFromOwner(z),re=this._injectedTextDecorationsTree.collectNodesFromOwner(z);return Q.concat(j).concat(re)}collectNodesPostOrder(){const z=this._decorationsTree0.collectNodesPostOrder(),Q=this._decorationsTree1.collectNodesPostOrder(),j=this._injectedTextDecorationsTree.collectNodesPostOrder();return z.concat(Q).concat(j)}insert(z){Y(z)?this._injectedTextDecorationsTree.insert(z):G(z)?this._decorationsTree1.insert(z):this._decorationsTree0.insert(z)}delete(z){Y(z)?this._injectedTextDecorationsTree.delete(z):G(z)?this._decorationsTree1.delete(z):this._decorationsTree0.delete(z)}getNodeRange(z,Q){const j=z.getVersionId();return Q.cachedVersionId!==j&&this._resolveNode(Q,j),Q.range===null&&(Q.range=z.getRangeAt(Q.cachedAbsoluteStart,Q.cachedAbsoluteEnd)),Q.range}_resolveNode(z,Q){Y(z)?this._injectedTextDecorationsTree.resolveNode(z,Q):G(z)?this._decorationsTree1.resolveNode(z,Q):this._decorationsTree0.resolveNode(z,Q)}acceptReplace(z,Q,j,re){this._decorationsTree0.acceptReplace(z,Q,j,re),this._decorationsTree1.acceptReplace(z,Q,j,re),this._injectedTextDecorationsTree.acceptReplace(z,Q,j,re)}}function se(K){return K.replace(/[^a-z0-9\-_]/gi," ")}class J{constructor(z){this.color=z.color||"",this.darkColor=z.darkColor||""}}class q extends J{constructor(z){super(z),this._resolvedColor=null,this.position=typeof z.position=="number"?z.position:d.OverviewRulerLane.Center}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(z,Q){if(typeof z=="string")return z;const j=z?Q.getColor(z.id):null;return j?j.toString():""}}e.ModelDecorationOverviewRulerOptions=q;class H{constructor(z){var Q;this.position=(Q=z?.position)!==null&&Q!==void 0?Q:d.GlyphMarginLane.Left}}e.ModelDecorationGlyphMarginOptions=H;class V extends J{constructor(z){super(z),this.position=z.position}getColor(z){return this._resolvedColor||(z.type!=="light"&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,z):this._resolvedColor=this._resolveColor(this.color,z)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(z,Q){return typeof z=="string"?I.Color.fromHex(z):Q.getColor(z.id)}}e.ModelDecorationMinimapOptions=V;class Z{static from(z){return z instanceof Z?z:new Z(z)}constructor(z){this.content=z.content||"",this.inlineClassName=z.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=z.attachedData||null,this.cursorStops=z.cursorStops||null}}e.ModelDecorationInjectedTextOptions=Z;class ee{static register(z){return new ee(z)}static createDynamic(z){return new ee(z)}constructor(z){var Q,j,re,oe,he,me;this.description=z.description,this.blockClassName=z.blockClassName?se(z.blockClassName):null,this.blockDoesNotCollapse=(Q=z.blockDoesNotCollapse)!==null&&Q!==void 0?Q:null,this.blockIsAfterEnd=(j=z.blockIsAfterEnd)!==null&&j!==void 0?j:null,this.blockPadding=(re=z.blockPadding)!==null&&re!==void 0?re:null,this.stickiness=z.stickiness||0,this.zIndex=z.zIndex||0,this.className=z.className?se(z.className):null,this.shouldFillLineOnLineBreak=(oe=z.shouldFillLineOnLineBreak)!==null&&oe!==void 0?oe:null,this.hoverMessage=z.hoverMessage||null,this.glyphMarginHoverMessage=z.glyphMarginHoverMessage||null,this.isWholeLine=z.isWholeLine||!1,this.showIfCollapsed=z.showIfCollapsed||!1,this.collapseOnReplaceEdit=z.collapseOnReplaceEdit||!1,this.overviewRuler=z.overviewRuler?new q(z.overviewRuler):null,this.minimap=z.minimap?new V(z.minimap):null,this.glyphMargin=z.glyphMarginClassName?new H(z.glyphMargin):null,this.glyphMarginClassName=z.glyphMarginClassName?se(z.glyphMarginClassName):null,this.linesDecorationsClassName=z.linesDecorationsClassName?se(z.linesDecorationsClassName):null,this.firstLineDecorationClassName=z.firstLineDecorationClassName?se(z.firstLineDecorationClassName):null,this.marginClassName=z.marginClassName?se(z.marginClassName):null,this.inlineClassName=z.inlineClassName?se(z.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=z.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=z.beforeContentClassName?se(z.beforeContentClassName):null,this.afterContentClassName=z.afterContentClassName?se(z.afterContentClassName):null,this.after=z.after?Z.from(z.after):null,this.before=z.before?Z.from(z.before):null,this.hideInCommentTokens=(he=z.hideInCommentTokens)!==null&&he!==void 0?he:!1,this.hideInStringTokens=(me=z.hideInStringTokens)!==null&&me!==void 0?me:!1}}e.ModelDecorationOptions=ee,ee.EMPTY=ee.register({description:"empty"});const le=[ee.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),ee.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),ee.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),ee.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function ue(K){return K instanceof ee?K:ee.createDynamic(K)}class de extends S.Disposable{constructor(z){super(),this.handleBeforeFire=z,this._actual=this._register(new D.Emitter),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var z;this._deferredCnt--,this._deferredCnt===0&&(this._shouldFireDeferred&&this.doFire(),(z=this._affectedInjectedTextLines)===null||z===void 0||z.clear(),this._affectedInjectedTextLines=null)}recordLineAffectedByInjectedText(z){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(z)}checkAffectedAndFire(z){this._affectsMinimap||(this._affectsMinimap=!!(z.minimap&&z.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!!(z.overviewRuler&&z.overviewRuler.color)),this._affectsGlyphMargin||(this._affectsGlyphMargin=!!z.glyphMarginClassName),this.tryFire()}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._affectsGlyphMargin=!0,this.tryFire()}tryFire(){this._deferredCnt===0?this.doFire():this._shouldFireDeferred=!0}doFire(){this.handleBeforeFire(this._affectedInjectedTextLines);const z={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler,affectsGlyphMargin:this._affectsGlyphMargin};this._shouldFireDeferred=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._affectsGlyphMargin=!1,this._actual.fire(z)}}class ce extends S.Disposable{constructor(){super(),this._fastEmitter=this._register(new D.Emitter),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new D.Emitter),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(z=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=z;const Q=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(Q),this._slowEmitter.fire(Q)}}fire(z){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(z):this._deferredEvent=z;return}this._fastEmitter.fire(z),this._slowEmitter.fire(z)}}class ae{constructor(){this._onDidChangeVisibleRanges=new D.Emitter,this.onDidChangeVisibleRanges=this._onDidChangeVisibleRanges.event,this._views=new Set}attachView(){const z=new X(Q=>{this._onDidChangeVisibleRanges.fire({view:z,state:Q})});return this._views.add(z),z}detachView(z){this._views.delete(z),this._onDidChangeVisibleRanges.fire({view:z,state:void 0})}}e.AttachedViews=ae;class X{constructor(z){this.handleStateChange=z}setVisibleLines(z,Q){const j=z.map(re=>new s.LineRange(re.startLineNumber,re.endLineNumber+1));this.handleStateChange({visibleLineRanges:j,stabilized:Q})}}}),define(te[365],ie([1,0,26,57,27,37,611,77]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.arrowRevertChange=e.diffDeleteDecorationEmpty=e.diffWholeLineDeleteDecoration=e.diffDeleteDecoration=e.diffAddDecorationEmpty=e.diffWholeLineAddDecoration=e.diffAddDecoration=e.diffLineDeleteDecorationBackground=e.diffLineAddDecorationBackground=e.diffLineDeleteDecorationBackgroundWithIndicator=e.diffLineAddDecorationBackgroundWithIndicator=e.diffRemoveIcon=e.diffInsertIcon=void 0,e.diffInsertIcon=(0,m.registerIcon)("diff-insert",L.Codicon.add,(0,S.localize)(0,null)),e.diffRemoveIcon=(0,m.registerIcon)("diff-remove",L.Codicon.remove,(0,S.localize)(1,null)),e.diffLineAddDecorationBackgroundWithIndicator=D.ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:!0,linesDecorationsClassName:"insert-sign "+y.ThemeIcon.asClassName(e.diffInsertIcon),marginClassName:"gutter-insert"}),e.diffLineDeleteDecorationBackgroundWithIndicator=D.ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:!0,linesDecorationsClassName:"delete-sign "+y.ThemeIcon.asClassName(e.diffRemoveIcon),marginClassName:"gutter-delete"}),e.diffLineAddDecorationBackground=D.ModelDecorationOptions.register({className:"line-insert",description:"line-insert",isWholeLine:!0,marginClassName:"gutter-insert"}),e.diffLineDeleteDecorationBackground=D.ModelDecorationOptions.register({className:"line-delete",description:"line-delete",isWholeLine:!0,marginClassName:"gutter-delete"}),e.diffAddDecoration=D.ModelDecorationOptions.register({className:"char-insert",description:"char-insert",shouldFillLineOnLineBreak:!0}),e.diffWholeLineAddDecoration=D.ModelDecorationOptions.register({className:"char-insert",description:"char-insert",isWholeLine:!0}),e.diffAddDecorationEmpty=D.ModelDecorationOptions.register({className:"char-insert diff-range-empty",description:"char-insert diff-range-empty"}),e.diffDeleteDecoration=D.ModelDecorationOptions.register({className:"char-delete",description:"char-delete",shouldFillLineOnLineBreak:!0}),e.diffWholeLineDeleteDecoration=D.ModelDecorationOptions.register({className:"char-delete",description:"char-delete",isWholeLine:!0}),e.diffDeleteDecorationEmpty=D.ModelDecorationOptions.register({className:"char-delete diff-range-empty",description:"char-delete diff-range-empty"}),e.arrowRevertChange=D.ModelDecorationOptions.register({description:"diff-editor-arrow-revert-change",glyphMarginHoverMessage:new I.MarkdownString(void 0,{isTrusted:!0,supportThemeIcons:!0}).appendMarkdown((0,S.localize)(2,null)),glyphMarginClassName:"arrow-revert-change "+y.ThemeIcon.asClassName(L.Codicon.arrowRight),zIndex:10001})}),define(te[869],ie([1,0,2,40,365,327,100,12,5]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorDecorations=void 0;class v extends L.Disposable{constructor(s,i,n){super(),this._editors=s,this._diffModel=i,this._options=n,this._decorations=(0,I.derived)(this,t=>{var r;const u=(r=this._diffModel.read(t))===null||r===void 0?void 0:r.diff.read(t);if(!u)return null;const f=this._diffModel.read(t).movedTextToCompare.read(t),d=this._options.renderIndicators.read(t),l=this._options.showEmptyDecorations.read(t),o=[],c=[];if(!f)for(const g of u.mappings){if(g.lineRangeMapping.original.isEmpty||o.push({range:g.lineRangeMapping.original.toInclusiveRange(),options:d?y.diffLineDeleteDecorationBackgroundWithIndicator:y.diffLineDeleteDecorationBackground}),g.lineRangeMapping.modified.isEmpty||c.push({range:g.lineRangeMapping.modified.toInclusiveRange(),options:d?y.diffLineAddDecorationBackgroundWithIndicator:y.diffLineAddDecorationBackground}),g.lineRangeMapping.modified.isEmpty||g.lineRangeMapping.original.isEmpty)g.lineRangeMapping.original.isEmpty||o.push({range:g.lineRangeMapping.original.toInclusiveRange(),options:y.diffWholeLineDeleteDecoration}),g.lineRangeMapping.modified.isEmpty||c.push({range:g.lineRangeMapping.modified.toInclusiveRange(),options:y.diffWholeLineAddDecoration});else for(const h of g.lineRangeMapping.innerChanges||[])g.lineRangeMapping.original.contains(h.originalRange.startLineNumber)&&o.push({range:h.originalRange,options:h.originalRange.isEmpty()&&l?y.diffDeleteDecorationEmpty:y.diffDeleteDecoration}),g.lineRangeMapping.modified.contains(h.modifiedRange.startLineNumber)&&c.push({range:h.modifiedRange,options:h.modifiedRange.isEmpty()&&l?y.diffAddDecorationEmpty:y.diffAddDecoration});!g.lineRangeMapping.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(t)&&!f&&c.push({range:_.Range.fromPositions(new m.Position(g.lineRangeMapping.modified.startLineNumber,1)),options:y.arrowRevertChange})}if(f)for(const g of f.changes){const h=g.original.toInclusiveRange();h&&o.push({range:h,options:d?y.diffLineDeleteDecorationBackgroundWithIndicator:y.diffLineDeleteDecorationBackground});const p=g.modified.toInclusiveRange();p&&c.push({range:p,options:d?y.diffLineAddDecorationBackgroundWithIndicator:y.diffLineAddDecorationBackground});for(const b of g.innerChanges||[])o.push({range:b.originalRange,options:y.diffDeleteDecoration}),c.push({range:b.modifiedRange,options:y.diffAddDecoration})}const a=this._diffModel.read(t).activeMovedText.read(t);for(const g of u.movedTexts)o.push({range:g.lineRangeMapping.original.toInclusiveRange(),options:{description:"moved",blockClassName:"movedOriginal"+(g===a?" currentMove":""),blockPadding:[D.MovedBlocksLinesPart.movedCodeBlockPadding,0,D.MovedBlocksLinesPart.movedCodeBlockPadding,D.MovedBlocksLinesPart.movedCodeBlockPadding]}}),c.push({range:g.lineRangeMapping.modified.toInclusiveRange(),options:{description:"moved",blockClassName:"movedModified"+(g===a?" currentMove":""),blockPadding:[4,0,4,4]}});return{originalDecorations:o,modifiedDecorations:c}}),this._register((0,S.applyObservableDecorations)(this._editors.original,this._decorations.map(t=>t?.originalDecorations||[]))),this._register((0,S.applyObservableDecorations)(this._editors.modified,this._decorations.map(t=>t?.modifiedDecorations||[])))}}e.DiffEditorDecorations=v}),define(te[870],ie([1,0,7,13,14,26,2,40,27,20,70,120,365,352,616,632,100,64,12,82,102,58]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewZoneManager=void 0;let a=class extends S.Disposable{constructor(b,w,E,k,M,R,B){super(),this._editors=b,this._diffModel=w,this._options=E,this._diffEditorWidget=k,this._canIgnoreViewZoneUpdateEvent=M,this._clipboardService=R,this._contextMenuService=B,this._originalTopPadding=(0,m.observableValue)(this,0),this._originalScrollOffset=(0,m.observableValue)(this,0),this._originalScrollOffsetAnimated=(0,u.animatedObservable)(this._originalScrollOffset,this._store),this._modifiedTopPadding=(0,m.observableValue)(this,0),this._modifiedScrollOffset=(0,m.observableValue)(this,0),this._modifiedScrollOffsetAnimated=(0,u.animatedObservable)(this._modifiedScrollOffset,this._store);let T=!1;const N=(0,m.observableValue)("state",0),A=this._register(new y.RunOnceScheduler(()=>{N.set(N.get()+1,void 0)},0));this._register(this._editors.original.onDidChangeViewZones(se=>{!T&&!this._canIgnoreViewZoneUpdateEvent()&&A.schedule()})),this._register(this._editors.modified.onDidChangeViewZones(se=>{!T&&!this._canIgnoreViewZoneUpdateEvent()&&A.schedule()})),this._register(this._editors.original.onDidChangeConfiguration(se=>{(se.hasChanged(144)||se.hasChanged(66))&&A.schedule()})),this._register(this._editors.modified.onDidChangeConfiguration(se=>{(se.hasChanged(144)||se.hasChanged(66))&&A.schedule()}));const P=this._diffModel.map(se=>se?(0,m.observableFromEvent)(se.model.original.onDidChangeTokens,()=>se.model.original.tokenization.backgroundTokenizationState===2):void 0).map((se,J)=>se?.read(J)),O=new Set,x=new Set,W=(0,m.derived)(se=>{const J=this._diffModel.read(se),q=J?.diff.read(se);if(!J||!q)return null;N.read(se);const V=this._options.renderSideBySide.read(se);return g(this._editors.original,this._editors.modified,q.mappings,O,x,V)}),U=(0,m.derived)(se=>{var J;const q=(J=this._diffModel.read(se))===null||J===void 0?void 0:J.movedTextToCompare.read(se);if(!q)return null;N.read(se);const H=q.changes.map(V=>new n.DiffMapping(V));return g(this._editors.original,this._editors.modified,H,O,x,!0)});function F(){const se=document.createElement("div");return se.className="diagonal-fill",se}const G=this._register(new S.DisposableStore),Y=(0,m.derived)(se=>{var J,q,H,V,Z,ee,le,ue;G.clear();const de=W.read(se)||[],ce=[],ae=[],X=this._modifiedTopPadding.read(se);X>0&&ae.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:X,showInHiddenAreas:!0,suppressMouseDown:!0});const K=this._originalTopPadding.read(se);K>0&&ce.push({afterLineNumber:0,domNode:document.createElement("div"),heightInPx:K,showInHiddenAreas:!0,suppressMouseDown:!0});const z=this._options.renderSideBySide.read(se),Q=z||(J=this._editors.modified._getViewModel())===null||J===void 0?void 0:J.createLineBreaksComputer();if(Q){for(const we of de)if(we.diff)for(let Le=we.originalRange.startLineNumber;Lethis._editors.original.getModel().tokenization.getLineTokens(fe)),we.originalRange.mapToLineArray(fe=>j[re++]),me,pe),Re=[];for(const fe of we.diff.innerChanges||[])Re.push(new l.InlineDecoration(fe.originalRange.delta(-(we.diff.original.startLineNumber-1)),i.diffDeleteDecoration.className,0));const Be=(0,r.renderLines)(Ae,ve,Re,Ee),ye=document.createElement("div");if(ye.className="inline-deleted-margin-view-zone",(0,C.applyFontInfo)(ye,ve.fontInfo),this._options.renderIndicators.read(se))for(let fe=0;fe(0,v.assertIsDefined)(De),ye,this._editors.modified,we.diff,this._diffEditorWidget,Be.viewLineCounts,this._editors.original.getModel(),this._contextMenuService,this._clipboardService));for(let fe=0;fe1&&ce.push({afterLineNumber:we.originalRange.startLineNumber+fe,domNode:F(),heightInPx:(Ce-1)*oe,showInHiddenAreas:!0,suppressMouseDown:!0})}ae.push({afterLineNumber:we.modifiedRange.startLineNumber-1,domNode:Ee,heightInPx:Be.heightInLines*oe,minWidthInPx:Be.minWidthInPx,marginDomNode:ye,setZoneId(fe){De=fe},showInHiddenAreas:!0,suppressMouseDown:!0})}const Le=document.createElement("div");Le.className="gutter-delete",ce.push({afterLineNumber:we.originalRange.endLineNumberExclusive-1,domNode:F(),heightInPx:we.modifiedHeightInPx,marginDomNode:Le,showInHiddenAreas:!0,suppressMouseDown:!0})}else{const Le=we.modifiedHeightInPx-we.originalHeightInPx;if(Le>0){if(he?.lineRangeMapping.original.delta(-1).deltaLength(2).contains(we.originalRange.endLineNumberExclusive-1))continue;ce.push({afterLineNumber:we.originalRange.endLineNumberExclusive-1,domNode:F(),heightInPx:Le,showInHiddenAreas:!0,suppressMouseDown:!0})}else{let Ee=function(){const Re=document.createElement("div");return Re.className="arrow-revert-change "+_.ThemeIcon.asClassName(D.Codicon.arrowRight),(0,L.$)("div",{},Re)};if(he?.lineRangeMapping.modified.delta(-1).deltaLength(2).contains(we.modifiedRange.endLineNumberExclusive-1))continue;let Ae;we.diff&&we.diff.modified.isEmpty&&this._options.shouldRenderRevertArrows.read(se)&&(Ae=Ee()),ae.push({afterLineNumber:we.modifiedRange.endLineNumberExclusive-1,domNode:F(),heightInPx:-Le,marginDomNode:Ae,showInHiddenAreas:!0,suppressMouseDown:!0})}}for(const we of(ue=U.read(se))!==null&&ue!==void 0?ue:[]){if(!he?.lineRangeMapping.original.intersect(we.originalRange)||!he?.lineRangeMapping.modified.intersect(we.modifiedRange))continue;const Le=we.modifiedHeightInPx-we.originalHeightInPx;Le>0?ce.push({afterLineNumber:we.originalRange.endLineNumberExclusive-1,domNode:F(),heightInPx:Le,showInHiddenAreas:!0,suppressMouseDown:!0}):ae.push({afterLineNumber:we.modifiedRange.endLineNumberExclusive-1,domNode:F(),heightInPx:-Le,showInHiddenAreas:!0,suppressMouseDown:!0})}return{orig:ce,mod:ae}});this._register((0,m.autorunWithStore)(se=>{const J=s.StableEditorScrollState.capture(this._editors.modified),q=Y.read(se);T=!0,this._editors.original.changeViewZones(H=>{for(const V of O)H.removeZone(V);O.clear();for(const V of q.orig){const Z=H.addZone(V);V.setZoneId&&V.setZoneId(Z),O.add(Z)}}),this._editors.modified.changeViewZones(H=>{for(const V of x)H.removeZone(V);x.clear();for(const V of q.mod){const Z=H.addZone(V);V.setZoneId&&V.setZoneId(Z),x.add(Z)}}),T=!1,J.restore(this._editors.modified)})),this._register((0,S.toDisposable)(()=>{this._editors.original.changeViewZones(se=>{for(const J of O)se.removeZone(J);O.clear()}),this._editors.modified.changeViewZones(se=>{for(const J of x)se.removeZone(J);x.clear()})}));let ne=!1;this._register(this._editors.original.onDidScrollChange(se=>{se.scrollLeftChanged&&!ne&&(ne=!0,this._editors.modified.setScrollLeft(se.scrollLeft),ne=!1)})),this._register(this._editors.modified.onDidScrollChange(se=>{se.scrollLeftChanged&&!ne&&(ne=!0,this._editors.original.setScrollLeft(se.scrollLeft),ne=!1)})),this._originalScrollTop=(0,m.observableFromEvent)(this._editors.original.onDidScrollChange,()=>this._editors.original.getScrollTop()),this._modifiedScrollTop=(0,m.observableFromEvent)(this._editors.modified.onDidScrollChange,()=>this._editors.modified.getScrollTop()),this._register((0,m.autorun)(se=>{const J=this._originalScrollTop.read(se)-(this._originalScrollOffsetAnimated.get()-this._modifiedScrollOffsetAnimated.read(se))-(this._originalTopPadding.get()-this._modifiedTopPadding.read(se));J!==this._editors.modified.getScrollTop()&&this._editors.modified.setScrollTop(J,1)})),this._register((0,m.autorun)(se=>{const J=this._modifiedScrollTop.read(se)-(this._modifiedScrollOffsetAnimated.get()-this._originalScrollOffsetAnimated.read(se))-(this._modifiedTopPadding.get()-this._originalTopPadding.read(se));J!==this._editors.original.getScrollTop()&&this._editors.original.setScrollTop(J,1)})),this._register((0,m.autorun)(se=>{var J;const q=(J=this._diffModel.read(se))===null||J===void 0?void 0:J.movedTextToCompare.read(se);let H=0;if(q){const V=this._editors.original.getTopForLineNumber(q.lineRangeMapping.original.startLineNumber,!0)-this._originalTopPadding.get();H=this._editors.modified.getTopForLineNumber(q.lineRangeMapping.modified.startLineNumber,!0)-this._modifiedTopPadding.get()-V}H>0?(this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(H,void 0)):H<0?(this._modifiedTopPadding.set(-H,void 0),this._originalTopPadding.set(0,void 0)):setTimeout(()=>{this._modifiedTopPadding.set(0,void 0),this._originalTopPadding.set(0,void 0)},400),this._editors.modified.hasTextFocus()?this._originalScrollOffset.set(this._modifiedScrollOffset.get()-H,void 0,!0):this._modifiedScrollOffset.set(this._originalScrollOffset.get()+H,void 0,!0)}))}};e.ViewZoneManager=a,e.ViewZoneManager=a=Ie([ge(5,o.IClipboardService),ge(6,c.IContextMenuService)],a);function g(p,b,w,E,k,M){const R=new I.ArrayQueue(h(p,E)),B=new I.ArrayQueue(h(b,k)),T=p.getOption(66),N=b.getOption(66),A=[];let P=0,O=0;function x(W,U){for(;;){let F=R.peek(),G=B.peek();if(F&&F.lineNumber>=W&&(F=void 0),G&&G.lineNumber>=U&&(G=void 0),!F&&!G)break;const Y=F?F.lineNumber-P:Number.MAX_VALUE,ne=G?G.lineNumber-O:Number.MAX_VALUE;Yne?(B.dequeue(),F={lineNumber:G.lineNumber-O+P,heightInPx:0}):(R.dequeue(),B.dequeue()),A.push({originalRange:f.LineRange.ofLength(F.lineNumber,1),modifiedRange:f.LineRange.ofLength(G.lineNumber,1),originalHeightInPx:T+F.heightInPx,modifiedHeightInPx:N+G.heightInPx,diff:void 0})}}for(const W of w){let ne=function(se,J){var q,H,V,Z;if(sece.lineNumberce+ae.heightInPx,0))!==null&&H!==void 0?H:0,de=(Z=(V=B.takeWhile(ce=>ce.lineNumberce+ae.heightInPx,0))!==null&&Z!==void 0?Z:0;A.push({originalRange:ee,modifiedRange:le,originalHeightInPx:ee.length*T+ue,modifiedHeightInPx:le.length*N+de,diff:W.lineRangeMapping}),Y=se,G=J};const U=W.lineRangeMapping;x(U.original.startLineNumber,U.modified.startLineNumber);let F=!0,G=U.modified.startLineNumber,Y=U.original.startLineNumber;if(M)for(const se of U.innerChanges||[])se.originalRange.startColumn>1&&se.modifiedRange.startColumn>1&&ne(se.originalRange.startLineNumber,se.modifiedRange.startLineNumber),se.originalRange.endColumn1&&E.push({lineNumber:T,heightInPx:R*(N-1)})}for(const T of p.getWhitespaces()){if(b.has(T.id))continue;const N=T.afterLineNumber===0?0:M.convertViewPositionToModelPosition(new d.Position(T.afterLineNumber,1)).lineNumber;w.push({lineNumber:N,heightInPx:T.height})}return(0,u.joinCombine)(w,E,T=>T.lineNumber,(T,N)=>({lineNumber:T.lineNumber,heightInPx:T.heightInPx+N.heightInPx}))}}),define(te[871],ie([1,0,6,2,17,37,173,75,42,185,28,191,141,333,54,52,32]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultModelSHA1Computer=e.ModelService=void 0;function d(h){return h.toString()}class l{constructor(p,b,w){this.model=p,this._modelEventListeners=new I.DisposableStore,this.model=p,this._modelEventListeners.add(p.onWillDispose(()=>b(p))),this._modelEventListeners.add(p.onDidChangeLanguage(E=>w(p,E)))}dispose(){this._modelEventListeners.dispose()}}const o=y.isLinux||y.isMacintosh?1:2;class c{constructor(p,b,w,E,k,M,R,B){this.uri=p,this.initialUndoRedoSnapshot=b,this.time=w,this.sharesUndoRedoStack=E,this.heapSize=k,this.sha1=M,this.versionId=R,this.alternativeVersionId=B}}let a=f=class extends I.Disposable{constructor(p,b,w,E,k){super(),this._configurationService=p,this._resourcePropertiesService=b,this._undoRedoService=w,this._languageService=E,this._languageConfigurationService=k,this._onModelAdded=this._register(new L.Emitter),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new L.Emitter),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new L.Emitter),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._register(this._configurationService.onDidChangeConfiguration(M=>this._updateModelOptions(M))),this._updateModelOptions(void 0)}static _readModelOptions(p,b){var w;let E=S.EDITOR_MODEL_DEFAULTS.tabSize;if(p.editor&&typeof p.editor.tabSize<"u"){const O=parseInt(p.editor.tabSize,10);isNaN(O)||(E=O),E<1&&(E=1)}let k="tabSize";if(p.editor&&typeof p.editor.indentSize<"u"&&p.editor.indentSize!=="tabSize"){const O=parseInt(p.editor.indentSize,10);isNaN(O)||(k=Math.max(O,1))}let M=S.EDITOR_MODEL_DEFAULTS.insertSpaces;p.editor&&typeof p.editor.insertSpaces<"u"&&(M=p.editor.insertSpaces==="false"?!1:!!p.editor.insertSpaces);let R=o;const B=p.eol;B===`\r -`?R=2:B===` -`&&(R=1);let T=S.EDITOR_MODEL_DEFAULTS.trimAutoWhitespace;p.editor&&typeof p.editor.trimAutoWhitespace<"u"&&(T=p.editor.trimAutoWhitespace==="false"?!1:!!p.editor.trimAutoWhitespace);let N=S.EDITOR_MODEL_DEFAULTS.detectIndentation;p.editor&&typeof p.editor.detectIndentation<"u"&&(N=p.editor.detectIndentation==="false"?!1:!!p.editor.detectIndentation);let A=S.EDITOR_MODEL_DEFAULTS.largeFileOptimizations;p.editor&&typeof p.editor.largeFileOptimizations<"u"&&(A=p.editor.largeFileOptimizations==="false"?!1:!!p.editor.largeFileOptimizations);let P=S.EDITOR_MODEL_DEFAULTS.bracketPairColorizationOptions;return!((w=p.editor)===null||w===void 0)&&w.bracketPairColorization&&typeof p.editor.bracketPairColorization=="object"&&(P={enabled:!!p.editor.bracketPairColorization.enabled,independentColorPoolPerBracketType:!!p.editor.bracketPairColorization.independentColorPoolPerBracketType}),{isForSimpleWidget:b,tabSize:E,indentSize:k,insertSpaces:M,detectIndentation:N,defaultEOL:R,trimAutoWhitespace:T,largeFileOptimizations:A,bracketPairColorizationOptions:P}}_getEOL(p,b){if(p)return this._resourcePropertiesService.getEOL(p,b);const w=this._configurationService.getValue("files.eol",{overrideIdentifier:b});return w&&typeof w=="string"&&w!=="auto"?w:y.OS===3||y.OS===2?` -`:`\r -`}_shouldRestoreUndoStack(){const p=this._configurationService.getValue("files.restoreUndoStack");return typeof p=="boolean"?p:!0}getCreationOptions(p,b,w){const E=typeof p=="string"?p:p.languageId;let k=this._modelCreationOptionsByLanguageAndResource[E+b];if(!k){const M=this._configurationService.getValue("editor",{overrideIdentifier:E,resource:b}),R=this._getEOL(b,E);k=f._readModelOptions({editor:M,eol:R},w),this._modelCreationOptionsByLanguageAndResource[E+b]=k}return k}_updateModelOptions(p){const b=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const w=Object.keys(this._models);for(let E=0,k=w.length;Ep){const b=[];for(this._disposedModels.forEach(w=>{w.sharesUndoRedoStack||b.push(w)}),b.sort((w,E)=>w.time-E.time);b.length>0&&this._disposedModelsHeapSize>p;){const w=b.shift();this._removeDisposedModel(w.uri),w.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(w.initialUndoRedoSnapshot)}}}_createModelData(p,b,w,E){const k=this.getCreationOptions(b,w,E),M=new D.TextModel(p,b,k,w,this._undoRedoService,this._languageService,this._languageConfigurationService);if(w&&this._disposedModels.has(d(w))){const T=this._removeDisposedModel(w),N=this._undoRedoService.getElements(w),A=this._getSHA1Computer(),P=A.canComputeSHA1(M)?A.computeSHA1(M)===T.sha1:!1;if(P||T.sharesUndoRedoStack){for(const O of N.past)(0,n.isEditStackElement)(O)&&O.matchesResource(w)&&O.setModel(M);for(const O of N.future)(0,n.isEditStackElement)(O)&&O.matchesResource(w)&&O.setModel(M);this._undoRedoService.setElementsValidFlag(w,!0,O=>(0,n.isEditStackElement)(O)&&O.matchesResource(w)),P&&(M._overwriteVersionId(T.versionId),M._overwriteAlternativeVersionId(T.alternativeVersionId),M._overwriteInitialUndoRedoSnapshot(T.initialUndoRedoSnapshot))}else T.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(T.initialUndoRedoSnapshot)}const R=d(M.uri);if(this._models[R])throw new Error("ModelService: Cannot add model because it already exists!");const B=new l(M,T=>this._onWillDispose(T),(T,N)=>this._onDidChangeLanguage(T,N));return this._models[R]=B,B}createModel(p,b,w,E=!1){let k;return b?k=this._createModelData(p,b,w,E):k=this._createModelData(p,m.PLAINTEXT_LANGUAGE_ID,w,E),this._onModelAdded.fire(k.model),k.model}getModels(){const p=[],b=Object.keys(this._models);for(let w=0,E=b.length;w0||T.future.length>0){for(const N of T.past)(0,n.isEditStackElement)(N)&&N.matchesResource(p.uri)&&(k=!0,M+=N.heapSize(p.uri),N.setModel(p.uri));for(const N of T.future)(0,n.isEditStackElement)(N)&&N.matchesResource(p.uri)&&(k=!0,M+=N.heapSize(p.uri),N.setModel(p.uri))}}const R=f.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK,B=this._getSHA1Computer();if(k)if(!E&&(M>R||!B.canComputeSHA1(p))){const T=w.model.getInitialUndoRedoSnapshot();T!==null&&this._undoRedoService.restoreSnapshot(T)}else this._ensureDisposedModelsHeapSize(R-M),this._undoRedoService.setElementsValidFlag(p.uri,!1,T=>(0,n.isEditStackElement)(T)&&T.matchesResource(p.uri)),this._insertDisposedModel(new c(p.uri,w.model.getInitialUndoRedoSnapshot(),Date.now(),E,M,B.computeSHA1(p),p.getVersionId(),p.getAlternativeVersionId()));else if(!E){const T=w.model.getInitialUndoRedoSnapshot();T!==null&&this._undoRedoService.restoreSnapshot(T)}delete this._models[b],w.dispose(),delete this._modelCreationOptionsByLanguageAndResource[p.getLanguageId()+p.uri],this._onModelRemoved.fire(p)}_onDidChangeLanguage(p,b){const w=b.oldLanguage,E=p.getLanguageId(),k=this.getCreationOptions(w,p.uri,p.isForSimpleWidget),M=this.getCreationOptions(E,p.uri,p.isForSimpleWidget);f._setModelOptionsForModel(p,M,k),this._onModelModeChanged.fire({model:p,oldLanguageId:w})}_getSHA1Computer(){return new g}};e.ModelService=a,a.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024,e.ModelService=a=f=Ie([ge(0,C.IConfigurationService),ge(1,v.ITextResourcePropertiesService),ge(2,s.IUndoRedoService),ge(3,_.ILanguageService),ge(4,u.ILanguageConfigurationService)],a);class g{canComputeSHA1(p){return p.getValueLength()<=g.MAX_MODEL_SIZE}computeSHA1(p){const b=new i.StringSHA1,w=p.createSnapshot();let E;for(;E=w.read();)b.update(E);return b.digest()}}e.DefaultModelSHA1Computer=g,g.MAX_MODEL_SIZE=10*1024*1024}),define(te[872],ie([1,0,13,12,5,210,37,110,212,535,284,82]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModelLinesFromModelAsIs=e.ViewModelLinesFromProjectedModel=void 0;class i{constructor(o,c,a,g,h,p,b,w,E,k){this._editorId=o,this.model=c,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=a,this._monospaceLineBreaksComputerFactory=g,this.fontInfo=h,this.tabSize=p,this.wrappingStrategy=b,this.wrappingColumn=w,this.wrappingIndent=E,this.wordBreak=k,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new u(this)}_constructLines(o,c){this.modelLineProjections=[],o&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const a=this.model.getLinesContent(),g=this.model.getInjectedTextDecorations(this._editorId),h=a.length,p=this.createLineBreaksComputer(),b=new L.ArrayQueue(m.LineInjectedText.fromDecorations(g));for(let N=0;NP.lineNumber===N+1);p.addRequest(a[N],A,c?c[N]:null)}const w=p.finalize(),E=[],k=this.hiddenAreasDecorationIds.map(N=>this.model.getDecorationRange(N)).sort(y.Range.compareRangesUsingStarts);let M=1,R=0,B=-1,T=B+1=M&&A<=R,O=(0,v.createModelLineProjection)(w[N],!P);E[N]=O.getViewLineCount(),this.modelLineProjections[N]=O}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new C.ConstantTimePrefixSumComputer(E)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map(o=>this.model.getDecorationRange(o))}setHiddenAreas(o){const c=o.map(R=>this.model.validateRange(R)),a=n(c),g=this.hiddenAreasDecorationIds.map(R=>this.model.getDecorationRange(R)).sort(y.Range.compareRangesUsingStarts);if(a.length===g.length){let R=!1;for(let B=0;B({range:R,options:S.ModelDecorationOptions.EMPTY}));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,h);const p=a;let b=1,w=0,E=-1,k=E+1=b&&B<=w?this.modelLineProjections[R].isVisible()&&(this.modelLineProjections[R]=this.modelLineProjections[R].setVisible(!1),T=!0):(M=!0,this.modelLineProjections[R].isVisible()||(this.modelLineProjections[R]=this.modelLineProjections[R].setVisible(!0),T=!0)),T){const N=this.modelLineProjections[R].getViewLineCount();this.projectedModelLineLineCounts.setValue(R,N)}}return M||this.setHiddenAreas([]),!0}modelPositionIsVisible(o,c){return o<1||o>this.modelLineProjections.length?!1:this.modelLineProjections[o-1].isVisible()}getModelLineViewLineCount(o){return o<1||o>this.modelLineProjections.length?1:this.modelLineProjections[o-1].getViewLineCount()}setTabSize(o){return this.tabSize===o?!1:(this.tabSize=o,this._constructLines(!1,null),!0)}setWrappingSettings(o,c,a,g,h){const p=this.fontInfo.equals(o),b=this.wrappingStrategy===c,w=this.wrappingColumn===a,E=this.wrappingIndent===g,k=this.wordBreak===h;if(p&&b&&w&&E&&k)return!1;const M=p&&b&&!w&&E&&k;this.fontInfo=o,this.wrappingStrategy=c,this.wrappingColumn=a,this.wrappingIndent=g,this.wordBreak=h;let R=null;if(M){R=[];for(let B=0,T=this.modelLineProjections.length;B2&&!this.modelLineProjections[c-2].isVisible(),p=c===1?1:this.projectedModelLineLineCounts.getPrefixSum(c-1)+1;let b=0;const w=[],E=[];for(let k=0,M=g.length;kw?(k=this.projectedModelLineLineCounts.getPrefixSum(c-1)+1,M=k+w-1,T=M+1,N=T+(h-w)-1,E=!0):hc?c:o|0}getActiveIndentGuide(o,c,a){o=this._toValidViewLineNumber(o),c=this._toValidViewLineNumber(c),a=this._toValidViewLineNumber(a);const g=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),h=this.convertViewPositionToModelPosition(c,this.getViewLineMinColumn(c)),p=this.convertViewPositionToModelPosition(a,this.getViewLineMinColumn(a)),b=this.model.guides.getActiveIndentGuide(g.lineNumber,h.lineNumber,p.lineNumber),w=this.convertModelPositionToViewPosition(b.startLineNumber,1),E=this.convertModelPositionToViewPosition(b.endLineNumber,this.model.getLineMaxColumn(b.endLineNumber));return{startLineNumber:w.lineNumber,endLineNumber:E.lineNumber,indent:b.indent}}getViewLineInfo(o){o=this._toValidViewLineNumber(o);const c=this.projectedModelLineLineCounts.getIndexOf(o-1),a=c.index,g=c.remainder;return new t(a+1,g)}getMinColumnOfViewLine(o){return this.modelLineProjections[o.modelLineNumber-1].getViewLineMinColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getMaxColumnOfViewLine(o){return this.modelLineProjections[o.modelLineNumber-1].getViewLineMaxColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(o){const c=this.modelLineProjections[o.modelLineNumber-1],a=c.getViewLineMinColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx),g=c.getModelColumnOfViewPosition(o.modelLineWrappedLineIdx,a);return new I.Position(o.modelLineNumber,g)}getModelEndPositionOfViewLine(o){const c=this.modelLineProjections[o.modelLineNumber-1],a=c.getViewLineMaxColumn(this.model,o.modelLineNumber,o.modelLineWrappedLineIdx),g=c.getModelColumnOfViewPosition(o.modelLineWrappedLineIdx,a);return new I.Position(o.modelLineNumber,g)}getViewLineInfosGroupedByModelRanges(o,c){const a=this.getViewLineInfo(o),g=this.getViewLineInfo(c),h=new Array;let p=this.getModelStartPositionOfViewLine(a),b=new Array;for(let w=a.modelLineNumber;w<=g.modelLineNumber;w++){const E=this.modelLineProjections[w-1];if(E.isVisible()){const k=w===a.modelLineNumber?a.modelLineWrappedLineIdx:0,M=w===g.modelLineNumber?g.modelLineWrappedLineIdx+1:E.getViewLineCount();for(let R=k;R{if(B.forWrappedLinesAfterColumn!==-1&&this.modelLineProjections[k.modelLineNumber-1].getViewPositionOfModelPosition(0,B.forWrappedLinesAfterColumn).lineNumber>=k.modelLineWrappedLineIdx||B.forWrappedLinesBeforeOrAtColumn!==-1&&this.modelLineProjections[k.modelLineNumber-1].getViewPositionOfModelPosition(0,B.forWrappedLinesBeforeOrAtColumn).lineNumberk.modelLineWrappedLineIdx)return}const N=this.convertModelPositionToViewPosition(k.modelLineNumber,B.horizontalLine.endColumn),A=this.modelLineProjections[k.modelLineNumber-1].getViewPositionOfModelPosition(0,B.horizontalLine.endColumn);return A.lineNumber===k.modelLineWrappedLineIdx?new D.IndentGuide(B.visibleColumn,T,B.className,new D.IndentGuideHorizontalLine(B.horizontalLine.top,N.column),-1,-1):A.lineNumber!!B))}}return p}getViewLinesIndentGuides(o,c){o=this._toValidViewLineNumber(o),c=this._toValidViewLineNumber(c);const a=this.convertViewPositionToModelPosition(o,this.getViewLineMinColumn(o)),g=this.convertViewPositionToModelPosition(c,this.getViewLineMaxColumn(c));let h=[];const p=[],b=[],w=a.lineNumber-1,E=g.lineNumber-1;let k=null;for(let T=w;T<=E;T++){const N=this.modelLineProjections[T];if(N.isVisible()){const A=N.getViewLineNumberOfModelPosition(0,T===w?a.column:1),P=N.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(T+1)),O=P-A+1;let x=0;O>1&&N.getViewLineMinColumn(this.model,T+1,P)===1&&(x=A===0?1:2),p.push(O),b.push(x),k===null&&(k=new I.Position(T+1,0))}else k!==null&&(h=h.concat(this.model.guides.getLinesIndentGuides(k.lineNumber,T)),k=null)}k!==null&&(h=h.concat(this.model.guides.getLinesIndentGuides(k.lineNumber,g.lineNumber)),k=null);const M=c-o+1,R=new Array(M);let B=0;for(let T=0,N=h.length;Tc&&(T=!0,B=c-h+1),M.getViewLinesData(this.model,E+1,R,B,h-o,a,w),h+=B,T)break}return w}validateViewPosition(o,c,a){o=this._toValidViewLineNumber(o);const g=this.projectedModelLineLineCounts.getIndexOf(o-1),h=g.index,p=g.remainder,b=this.modelLineProjections[h],w=b.getViewLineMinColumn(this.model,h+1,p),E=b.getViewLineMaxColumn(this.model,h+1,p);cE&&(c=E);const k=b.getModelColumnOfViewPosition(p,c);return this.model.validatePosition(new I.Position(h+1,k)).equals(a)?new I.Position(o,c):this.convertModelPositionToViewPosition(a.lineNumber,a.column)}validateViewRange(o,c){const a=this.validateViewPosition(o.startLineNumber,o.startColumn,c.getStartPosition()),g=this.validateViewPosition(o.endLineNumber,o.endColumn,c.getEndPosition());return new y.Range(a.lineNumber,a.column,g.lineNumber,g.column)}convertViewPositionToModelPosition(o,c){const a=this.getViewLineInfo(o),g=this.modelLineProjections[a.modelLineNumber-1].getModelColumnOfViewPosition(a.modelLineWrappedLineIdx,c);return this.model.validatePosition(new I.Position(a.modelLineNumber,g))}convertViewRangeToModelRange(o){const c=this.convertViewPositionToModelPosition(o.startLineNumber,o.startColumn),a=this.convertViewPositionToModelPosition(o.endLineNumber,o.endColumn);return new y.Range(c.lineNumber,c.column,a.lineNumber,a.column)}convertModelPositionToViewPosition(o,c,a=2,g=!1,h=!1){const p=this.model.validatePosition(new I.Position(o,c)),b=p.lineNumber,w=p.column;let E=b-1,k=!1;if(h)for(;E0&&!this.modelLineProjections[E].isVisible();)E--,k=!0;if(E===0&&!this.modelLineProjections[E].isVisible())return new I.Position(g?0:1,1);const M=1+this.projectedModelLineLineCounts.getPrefixSum(E);let R;return k?h?R=this.modelLineProjections[E].getViewPositionOfModelPosition(M,1,a):R=this.modelLineProjections[E].getViewPositionOfModelPosition(M,this.model.getLineMaxColumn(E+1),a):R=this.modelLineProjections[b-1].getViewPositionOfModelPosition(M,w,a),R}convertModelRangeToViewRange(o,c=0){if(o.isEmpty()){const a=this.convertModelPositionToViewPosition(o.startLineNumber,o.startColumn,c);return y.Range.fromPositions(a)}else{const a=this.convertModelPositionToViewPosition(o.startLineNumber,o.startColumn,1),g=this.convertModelPositionToViewPosition(o.endLineNumber,o.endColumn,0);return new y.Range(a.lineNumber,a.column,g.lineNumber,g.column)}}getViewLineNumberOfModelPosition(o,c){let a=o-1;if(this.modelLineProjections[a].isVisible()){const h=1+this.projectedModelLineLineCounts.getPrefixSum(a);return this.modelLineProjections[a].getViewLineNumberOfModelPosition(h,c)}for(;a>0&&!this.modelLineProjections[a].isVisible();)a--;if(a===0&&!this.modelLineProjections[a].isVisible())return 1;const g=1+this.projectedModelLineLineCounts.getPrefixSum(a);return this.modelLineProjections[a].getViewLineNumberOfModelPosition(g,this.model.getLineMaxColumn(a+1))}getDecorationsInRange(o,c,a,g,h){const p=this.convertViewPositionToModelPosition(o.startLineNumber,o.startColumn),b=this.convertViewPositionToModelPosition(o.endLineNumber,o.endColumn);if(b.lineNumber-p.lineNumber<=o.endLineNumber-o.startLineNumber)return this.model.getDecorationsInRange(new y.Range(p.lineNumber,1,b.lineNumber,b.column),c,a,g,h);let w=[];const E=p.lineNumber-1,k=b.lineNumber-1;let M=null;for(let N=E;N<=k;N++)if(this.modelLineProjections[N].isVisible())M===null&&(M=new I.Position(N+1,N===E?p.column:1));else if(M!==null){const P=this.model.getLineMaxColumn(N);w=w.concat(this.model.getDecorationsInRange(new y.Range(M.lineNumber,M.column,N,P),c,a,g)),M=null}M!==null&&(w=w.concat(this.model.getDecorationsInRange(new y.Range(M.lineNumber,M.column,b.lineNumber,b.column),c,a,g)),M=null),w.sort((N,A)=>{const P=y.Range.compareRangesUsingStarts(N.range,A.range);return P===0?N.idA.id?1:0:P});const R=[];let B=0,T=null;for(const N of w){const A=N.id;T!==A&&(T=A,R[B++]=N)}return R}getInjectedTextAt(o){const c=this.getViewLineInfo(o.lineNumber);return this.modelLineProjections[c.modelLineNumber-1].getInjectedTextAt(c.modelLineWrappedLineIdx,o.column)}normalizePosition(o,c){const a=this.getViewLineInfo(o.lineNumber);return this.modelLineProjections[a.modelLineNumber-1].normalizePosition(a.modelLineWrappedLineIdx,o,c)}getLineIndentColumn(o){const c=this.getViewLineInfo(o);return c.modelLineWrappedLineIdx===0?this.model.getLineIndentColumn(c.modelLineNumber):0}}e.ViewModelLinesFromProjectedModel=i;function n(l){if(l.length===0)return[];const o=l.slice();o.sort(y.Range.compareRangesUsingStarts);const c=[];let a=o[0].startLineNumber,g=o[0].endLineNumber;for(let h=1,p=o.length;hg+1?(c.push(new y.Range(a,1,g,1)),a=b.startLineNumber,g=b.endLineNumber):b.endLineNumber>g&&(g=b.endLineNumber)}return c.push(new y.Range(a,1,g,1)),c}class t{constructor(o,c){this.modelLineNumber=o,this.modelLineWrappedLineIdx=c}}class r{constructor(o,c){this.modelRange=o,this.viewLines=c}}class u{constructor(o){this._lines=o}convertViewPositionToModelPosition(o){return this._lines.convertViewPositionToModelPosition(o.lineNumber,o.column)}convertViewRangeToModelRange(o){return this._lines.convertViewRangeToModelRange(o)}validateViewPosition(o,c){return this._lines.validateViewPosition(o.lineNumber,o.column,c)}validateViewRange(o,c){return this._lines.validateViewRange(o,c)}convertModelPositionToViewPosition(o,c,a,g){return this._lines.convertModelPositionToViewPosition(o.lineNumber,o.column,c,a,g)}convertModelRangeToViewRange(o,c){return this._lines.convertModelRangeToViewRange(o,c)}modelPositionIsVisible(o){return this._lines.modelPositionIsVisible(o.lineNumber,o.column)}getModelLineViewLineCount(o){return this._lines.getModelLineViewLineCount(o)}getViewLineNumberOfModelPosition(o,c){return this._lines.getViewLineNumberOfModelPosition(o,c)}}class f{constructor(o){this.model=o}dispose(){}createCoordinatesConverter(){return new d(this)}getHiddenAreas(){return[]}setHiddenAreas(o){return!1}setTabSize(o){return!1}setWrappingSettings(o,c,a,g){return!1}createLineBreaksComputer(){const o=[];return{addRequest:(c,a,g)=>{o.push(null)},finalize:()=>o}}onModelFlushed(){}onModelLinesDeleted(o,c,a){return new _.ViewLinesDeletedEvent(c,a)}onModelLinesInserted(o,c,a,g){return new _.ViewLinesInsertedEvent(c,a)}onModelLineChanged(o,c,a){return[!1,new _.ViewLinesChangedEvent(c,1),null,null]}acceptVersionId(o){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(o,c,a){return{startLineNumber:o,endLineNumber:o,indent:0}}getViewLinesBracketGuides(o,c,a){return new Array(c-o+1).fill([])}getViewLinesIndentGuides(o,c){const a=c-o+1,g=new Array(a);for(let h=0;hc)}getModelLineViewLineCount(o){return 1}getViewLineNumberOfModelPosition(o,c){return o}}}),define(te[873],ie([1,0,13,14,36,2,17,10,39,775,72,12,5,110,29,75,330,212,539,332,82,329,213,872]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ViewModel=void 0;const h=!0;class p extends D.Disposable{constructor(T,N,A,P,O,x,W,U,F){if(super(),this.languageConfigurationService=W,this._themeService=U,this._attachedView=F,this.hiddenAreasModel=new E,this.previousHiddenAreas=[],this._editorId=T,this._configuration=N,this.model=A,this._eventDispatcher=new a.ViewModelEventDispatcher,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new C.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._updateConfigurationViewLineCount=this._register(new I.RunOnceScheduler(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStart=b.create(this.model),h&&this.model.isTooLargeForTokenization())this._lines=new g.ViewModelLinesFromModelAsIs(this.model);else{const G=this._configuration.options,Y=G.get(50),ne=G.get(137),se=G.get(144),J=G.get(136),q=G.get(128);this._lines=new g.ViewModelLinesFromProjectedModel(this._editorId,this.model,P,O,Y,this.model.getOptions().tabSize,ne,se.wrappingColumn,J,q)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new v.CursorsController(A,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new d.ViewLayout(this._configuration,this.getLineCount(),x)),this._register(this.viewLayout.onDidScroll(G=>{G.scrollTopChanged&&this._handleVisibleLinesChanged(),G.scrollTopChanged&&this._viewportStart.invalidate(),this._eventDispatcher.emitSingleViewEvent(new f.ViewScrollChangedEvent(G)),this._eventDispatcher.emitOutgoingEvent(new a.ScrollChangedEvent(G.oldScrollWidth,G.oldScrollLeft,G.oldScrollHeight,G.oldScrollTop,G.scrollWidth,G.scrollLeft,G.scrollHeight,G.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(G=>{this._eventDispatcher.emitOutgoingEvent(G)})),this._decorations=new c.ViewModelDecorations(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(G=>{try{const Y=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(Y,G)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(l.MinimapTokensColorTracker.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new f.ViewTokensColorsChangedEvent)})),this._register(this._themeService.onDidColorThemeChange(G=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new f.ViewThemeChangedEvent(G))})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStart.dispose(),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(T){this._eventDispatcher.addViewEventHandler(T)}removeViewEventHandler(T){this._eventDispatcher.removeViewEventHandler(T)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}getModelVisibleRanges(){const T=this.viewLayout.getLinesViewportData(),N=new i.Range(T.startLineNumber,this.getLineMinColumn(T.startLineNumber),T.endLineNumber,this.getLineMaxColumn(T.endLineNumber));return this._toModelVisibleRanges(N)}visibleLinesStabilized(){const T=this.getModelVisibleRanges();this._attachedView.setVisibleLines(T,!0)}_handleVisibleLinesChanged(){const T=this.getModelVisibleRanges();this._attachedView.setVisibleLines(T,!1)}setHasFocus(T){this._hasFocus=T,this._cursor.setHasFocus(T),this._eventDispatcher.emitSingleViewEvent(new f.ViewFocusChangedEvent(T)),this._eventDispatcher.emitOutgoingEvent(new a.FocusChangedEvent(!T,T))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new f.ViewCompositionStartEvent)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new f.ViewCompositionEndEvent)}_captureStableViewport(){if(this._viewportStart.isValid&&this.viewLayout.getCurrentScrollTop()>0){const T=new s.Position(this._viewportStart.viewLineNumber,this.getLineMinColumn(this._viewportStart.viewLineNumber)),N=this.coordinatesConverter.convertViewPositionToModelPosition(T);return new R(N,this._viewportStart.startLineDelta)}return new R(null,0)}_onConfigurationChanged(T,N){const A=this._captureStableViewport(),P=this._configuration.options,O=P.get(50),x=P.get(137),W=P.get(144),U=P.get(136),F=P.get(128);this._lines.setWrappingSettings(O,x,W.wrappingColumn,U,F)&&(T.emitViewEvent(new f.ViewFlushedEvent),T.emitViewEvent(new f.ViewLineMappingChangedEvent),T.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(T),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this._updateConfigurationViewLineCount.schedule()),N.hasChanged(90)&&(this._decorations.reset(),T.emitViewEvent(new f.ViewDecorationsChangedEvent(null))),T.emitViewEvent(new f.ViewConfigurationChangedEvent(N)),this.viewLayout.onConfigurationChanged(N),A.recoverViewportStart(this.coordinatesConverter,this.viewLayout),C.CursorConfiguration.shouldRecreate(N)&&(this.cursorConfig=new C.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText(T=>{try{const A=this._eventDispatcher.beginEmitViewEvents();let P=!1,O=!1;const x=T instanceof n.InternalModelContentChangeEvent?T.rawContentChangedEvent.changes:T.changes,W=T instanceof n.InternalModelContentChangeEvent?T.rawContentChangedEvent.versionId:null,U=this._lines.createLineBreaksComputer();for(const Y of x)switch(Y.changeType){case 4:{for(let ne=0;ne!q.ownerId||q.ownerId===this._editorId)),U.addRequest(se,J,null)}break}case 2:{let ne=null;Y.injectedText&&(ne=Y.injectedText.filter(se=>!se.ownerId||se.ownerId===this._editorId)),U.addRequest(Y.detail,ne,null);break}}const F=U.finalize(),G=new L.ArrayQueue(F);for(const Y of x)switch(Y.changeType){case 1:{this._lines.onModelFlushed(),A.emitViewEvent(new f.ViewFlushedEvent),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),P=!0;break}case 3:{const ne=this._lines.onModelLinesDeleted(W,Y.fromLineNumber,Y.toLineNumber);ne!==null&&(A.emitViewEvent(ne),this.viewLayout.onLinesDeleted(ne.fromLineNumber,ne.toLineNumber)),P=!0;break}case 4:{const ne=G.takeCount(Y.detail.length),se=this._lines.onModelLinesInserted(W,Y.fromLineNumber,Y.toLineNumber,ne);se!==null&&(A.emitViewEvent(se),this.viewLayout.onLinesInserted(se.fromLineNumber,se.toLineNumber)),P=!0;break}case 2:{const ne=G.dequeue(),[se,J,q,H]=this._lines.onModelLineChanged(W,Y.lineNumber,ne);O=se,J&&A.emitViewEvent(J),q&&(A.emitViewEvent(q),this.viewLayout.onLinesInserted(q.fromLineNumber,q.toLineNumber)),H&&(A.emitViewEvent(H),this.viewLayout.onLinesDeleted(H.fromLineNumber,H.toLineNumber));break}case 5:break}W!==null&&this._lines.acceptVersionId(W),this.viewLayout.onHeightMaybeChanged(),!P&&O&&(A.emitViewEvent(new f.ViewLineMappingChangedEvent),A.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(A),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}const N=this._viewportStart.isValid;if(this._viewportStart.invalidate(),this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&N){const A=this.model._getTrackedRange(this._viewportStart.modelTrackedRange);if(A){const P=this.coordinatesConverter.convertModelPositionToViewPosition(A.getStartPosition()),O=this.viewLayout.getVerticalOffsetForLineNumber(P.lineNumber);this.viewLayout.setScrollPosition({scrollTop:O+this._viewportStart.startLineDelta},1)}}try{const A=this._eventDispatcher.beginEmitViewEvents();T instanceof n.InternalModelContentChangeEvent&&A.emitOutgoingEvent(new a.ModelContentChangedEvent(T.contentChangedEvent)),this._cursor.onModelContentChanged(A,T)}finally{this._eventDispatcher.endEmitViewEvents()}this._handleVisibleLinesChanged()})),this._register(this.model.onDidChangeTokens(T=>{const N=[];for(let A=0,P=T.ranges.length;A{this._eventDispatcher.emitSingleViewEvent(new f.ViewLanguageConfigurationEvent),this.cursorConfig=new C.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new a.ModelLanguageConfigurationChangedEvent(T))})),this._register(this.model.onDidChangeLanguage(T=>{this.cursorConfig=new C.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new a.ModelLanguageChangedEvent(T))})),this._register(this.model.onDidChangeOptions(T=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const N=this._eventDispatcher.beginEmitViewEvents();N.emitViewEvent(new f.ViewFlushedEvent),N.emitViewEvent(new f.ViewLineMappingChangedEvent),N.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(N),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new C.CursorConfiguration(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig),this._eventDispatcher.emitOutgoingEvent(new a.ModelOptionsChangedEvent(T))})),this._register(this.model.onDidChangeDecorations(T=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new f.ViewDecorationsChangedEvent(T)),this._eventDispatcher.emitOutgoingEvent(new a.ModelDecorationsChangedEvent(T))}))}setHiddenAreas(T,N){this.hiddenAreasModel.setHiddenAreas(N,T);const A=this.hiddenAreasModel.getMergedRanges();if(A===this.previousHiddenAreas)return;this.previousHiddenAreas=A;const P=this._captureStableViewport();let O=!1;try{const x=this._eventDispatcher.beginEmitViewEvents();O=this._lines.setHiddenAreas(A),O&&(x.emitViewEvent(new f.ViewFlushedEvent),x.emitViewEvent(new f.ViewLineMappingChangedEvent),x.emitViewEvent(new f.ViewDecorationsChangedEvent(null)),this._cursor.onLineMappingChanged(x),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged()),P.recoverViewportStart(this.coordinatesConverter,this.viewLayout)}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),O&&this._eventDispatcher.emitOutgoingEvent(new a.HiddenAreasChangedEvent)}getVisibleRangesPlusViewportAboveBelow(){const T=this._configuration.options.get(143),N=this._configuration.options.get(66),A=Math.max(20,Math.round(T.height/N)),P=this.viewLayout.getLinesViewportData(),O=Math.max(1,P.completelyVisibleStartLineNumber-A),x=Math.min(this.getLineCount(),P.completelyVisibleEndLineNumber+A);return this._toModelVisibleRanges(new i.Range(O,this.getLineMinColumn(O),x,this.getLineMaxColumn(x)))}getVisibleRanges(){const T=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(T)}getHiddenAreas(){return this._lines.getHiddenAreas()}_toModelVisibleRanges(T){const N=this.coordinatesConverter.convertViewRangeToModelRange(T),A=this._lines.getHiddenAreas();if(A.length===0)return[N];const P=[];let O=0,x=N.startLineNumber,W=N.startColumn;const U=N.endLineNumber,F=N.endColumn;for(let G=0,Y=A.length;GU||(x"u")return this._reduceRestoreStateCompatibility(T);const N=this.model.validatePosition(T.firstPosition),A=this.coordinatesConverter.convertModelPositionToViewPosition(N),P=this.viewLayout.getVerticalOffsetForLineNumber(A.lineNumber)-T.firstPositionDeltaTop;return{scrollLeft:T.scrollLeft,scrollTop:P}}_reduceRestoreStateCompatibility(T){return{scrollLeft:T.scrollLeft,scrollTop:T.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getLineCount(){return this._lines.getViewLineCount()}setViewport(T,N,A){this._viewportStart.update(this,T)}getActiveIndentGuide(T,N,A){return this._lines.getActiveIndentGuide(T,N,A)}getLinesIndentGuides(T,N){return this._lines.getViewLinesIndentGuides(T,N)}getBracketGuidesInRangeByLine(T,N,A,P){return this._lines.getViewLinesBracketGuides(T,N,A,P)}getLineContent(T){return this._lines.getViewLineContent(T)}getLineLength(T){return this._lines.getViewLineLength(T)}getLineMinColumn(T){return this._lines.getViewLineMinColumn(T)}getLineMaxColumn(T){return this._lines.getViewLineMaxColumn(T)}getLineFirstNonWhitespaceColumn(T){const N=m.firstNonWhitespaceIndex(this.getLineContent(T));return N===-1?0:N+1}getLineLastNonWhitespaceColumn(T){const N=m.lastNonWhitespaceIndex(this.getLineContent(T));return N===-1?0:N+2}getMinimapDecorationsInRange(T){return this._decorations.getMinimapDecorationsInRange(T)}getDecorationsInViewport(T){return this._decorations.getDecorationsViewportData(T).decorations}getInjectedTextAt(T){return this._lines.getInjectedTextAt(T)}getViewportViewLineRenderingData(T,N){const P=this._decorations.getDecorationsViewportData(T).inlineDecorations[N-T.startLineNumber];return this._getViewLineRenderingData(N,P)}getViewLineRenderingData(T){const N=this._decorations.getInlineDecorationsOnLine(T);return this._getViewLineRenderingData(T,N)}_getViewLineRenderingData(T,N){const A=this.model.mightContainRTL(),P=this.model.mightContainNonBasicASCII(),O=this.getTabSize(),x=this._lines.getViewLineData(T);return x.inlineDecorations&&(N=[...N,...x.inlineDecorations.map(W=>W.toInlineDecoration(T))]),new o.ViewLineRenderingData(x.minColumn,x.maxColumn,x.content,x.continuesWithWrappedLine,A,P,x.tokens,N,O,x.startVisibleColumn)}getViewLineData(T){return this._lines.getViewLineData(T)}getMinimapLinesRenderingData(T,N,A){const P=this._lines.getViewLinesData(T,N,A);return new o.MinimapLinesRenderingData(this.getTabSize(),P)}getAllOverviewRulerDecorations(T){const N=this.model.getOverviewRulerDecorations(this._editorId,(0,_.filterValidationDecorations)(this._configuration.options)),A=new w;for(const P of N){const O=P.options,x=O.overviewRuler;if(!x)continue;const W=x.position;if(W===0)continue;const U=x.getColor(T.value),F=this.coordinatesConverter.getViewLineNumberOfModelPosition(P.range.startLineNumber,P.range.startColumn),G=this.coordinatesConverter.getViewLineNumberOfModelPosition(P.range.endLineNumber,P.range.endColumn);A.accept(U,O.zIndex,F,G,W)}return A.asArray}_invalidateDecorationsColorCache(){const T=this.model.getOverviewRulerDecorations();for(const N of T){const A=N.options.overviewRuler;A?.invalidateCachedColor();const P=N.options.minimap;P?.invalidateCachedColor()}}getValueInRange(T,N){const A=this.coordinatesConverter.convertViewRangeToModelRange(T);return this.model.getValueInRange(A,N)}getValueLengthInRange(T,N){const A=this.coordinatesConverter.convertViewRangeToModelRange(T);return this.model.getValueLengthInRange(A,N)}modifyPosition(T,N){const A=this.coordinatesConverter.convertViewPositionToModelPosition(T);return this.model.modifyPosition(A,N)}deduceModelPositionRelativeToViewPosition(T,N,A){const P=this.coordinatesConverter.convertViewPositionToModelPosition(T);this.model.getEOL().length===2&&(N<0?N-=A:N+=A);const x=this.model.getOffsetAt(P)+N;return this.model.getPositionAt(x)}getPlainTextToCopy(T,N,A){const P=A?`\r -`:this.model.getEOL();T=T.slice(0),T.sort(i.Range.compareRangesUsingStarts);let O=!1,x=!1;for(const U of T)U.isEmpty()?O=!0:x=!0;if(!x){if(!N)return"";const U=T.map(G=>G.startLineNumber);let F="";for(let G=0;G0&&U[G-1]===U[G]||(F+=this.model.getLineContent(U[G])+P);return F}if(O&&N){const U=[];let F=0;for(const G of T){const Y=G.startLineNumber;G.isEmpty()?Y!==F&&U.push(this.model.getLineContent(Y)):U.push(this.model.getValueInRange(G,A?2:0)),F=Y}return U.length===1?U[0]:U}const W=[];for(const U of T)U.isEmpty()||W.push(this.model.getValueInRange(U,A?2:0));return W.length===1?W[0]:W}getRichTextToCopy(T,N){const A=this.model.getLanguageId();if(A===r.PLAINTEXT_LANGUAGE_ID||T.length!==1)return null;let P=T[0];if(P.isEmpty()){if(!N)return null;const G=P.startLineNumber;P=new i.Range(G,this.model.getLineMinColumn(G),G,this.model.getLineMaxColumn(G))}const O=this._configuration.options.get(50),x=this._getColorMap(),U=/[:;\\\/<>]/.test(O.fontFamily)||O.fontFamily===_.EDITOR_FONT_DEFAULTS.fontFamily;let F;return U?F=_.EDITOR_FONT_DEFAULTS.fontFamily:(F=O.fontFamily,F=F.replace(/"/g,"'"),/[,']/.test(F)||/[+ ]/.test(F)&&(F=`'${F}'`),F=`${F}, ${_.EDITOR_FONT_DEFAULTS.fontFamily}`),{mode:A,html:`
    `+this._getHTMLToCopy(P,x)+"
    "}}_getHTMLToCopy(T,N){const A=T.startLineNumber,P=T.startColumn,O=T.endLineNumber,x=T.endColumn,W=this.getTabSize();let U="";for(let F=A;F<=O;F++){const G=this.model.tokenization.getLineTokens(F),Y=G.getLineContent(),ne=F===A?P-1:0,se=F===O?x-1:Y.length;Y===""?U+="
    ":U+=(0,u.tokenizeLineToHTML)(Y,G.inflate(),N,ne,se,W,S.isWindows)}return U}_getColorMap(){const T=t.TokenizationRegistry.getColorMap(),N=["#000000"];if(T)for(let A=1,P=T.length;Athis._cursor.setStates(P,T,N,A))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(T){this._cursor.setCursorColumnSelectData(T)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(T){this._cursor.setPrevEditOperationType(T)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(T,N,A=0){this._withViewEventsCollector(P=>this._cursor.setSelections(P,T,N,A))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(T){this._withViewEventsCollector(N=>this._cursor.restoreState(N,T))}_executeCursorEdit(T){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new a.ReadOnlyEditAttemptEvent);return}this._withViewEventsCollector(T)}executeEdits(T,N,A){this._executeCursorEdit(P=>this._cursor.executeEdits(P,T,N,A))}startComposition(){this._executeCursorEdit(T=>this._cursor.startComposition(T))}endComposition(T){this._executeCursorEdit(N=>this._cursor.endComposition(N,T))}type(T,N){this._executeCursorEdit(A=>this._cursor.type(A,T,N))}compositionType(T,N,A,P,O){this._executeCursorEdit(x=>this._cursor.compositionType(x,T,N,A,P,O))}paste(T,N,A,P){this._executeCursorEdit(O=>this._cursor.paste(O,T,N,A,P))}cut(T){this._executeCursorEdit(N=>this._cursor.cut(N,T))}executeCommand(T,N){this._executeCursorEdit(A=>this._cursor.executeCommand(A,T,N))}executeCommands(T,N){this._executeCursorEdit(A=>this._cursor.executeCommands(A,T,N))}revealPrimaryCursor(T,N,A=!1){this._withViewEventsCollector(P=>this._cursor.revealPrimary(P,T,A,0,N,0))}revealTopMostCursor(T){const N=this._cursor.getTopMostViewPosition(),A=new i.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(P=>P.emitViewEvent(new f.ViewRevealRangeRequestEvent(T,!1,A,null,0,!0,0)))}revealBottomMostCursor(T){const N=this._cursor.getBottomMostViewPosition(),A=new i.Range(N.lineNumber,N.column,N.lineNumber,N.column);this._withViewEventsCollector(P=>P.emitViewEvent(new f.ViewRevealRangeRequestEvent(T,!1,A,null,0,!0,0)))}revealRange(T,N,A,P,O){this._withViewEventsCollector(x=>x.emitViewEvent(new f.ViewRevealRangeRequestEvent(T,!1,A,null,P,N,O)))}changeWhitespace(T){this.viewLayout.changeWhitespace(T)&&(this._eventDispatcher.emitSingleViewEvent(new f.ViewZonesChangedEvent),this._eventDispatcher.emitOutgoingEvent(new a.ViewZonesChangedEvent))}_withViewEventsCollector(T){try{const N=this._eventDispatcher.beginEmitViewEvents();return T(N)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(T,N){return this._lines.normalizePosition(T,N)}getLineIndentColumn(T){return this._lines.getLineIndentColumn(T)}}e.ViewModel=p;class b{static create(T){const N=T._setTrackedRange(null,new i.Range(1,1,1,1),1);return new b(T,1,!1,N,0)}get viewLineNumber(){return this._viewLineNumber}get isValid(){return this._isValid}get modelTrackedRange(){return this._modelTrackedRange}get startLineDelta(){return this._startLineDelta}constructor(T,N,A,P,O){this._model=T,this._viewLineNumber=N,this._isValid=A,this._modelTrackedRange=P,this._startLineDelta=O}dispose(){this._model._setTrackedRange(this._modelTrackedRange,null,1)}update(T,N){const A=T.coordinatesConverter.convertViewPositionToModelPosition(new s.Position(N,T.getLineMinColumn(N))),P=T.model._setTrackedRange(this._modelTrackedRange,new i.Range(A.lineNumber,A.column,A.lineNumber,A.column),1),O=T.viewLayout.getVerticalOffsetForLineNumber(N),x=T.viewLayout.getCurrentScrollTop();this._viewLineNumber=N,this._isValid=!0,this._modelTrackedRange=P,this._startLineDelta=x-O}invalidate(){this._isValid=!1}}class w{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(T,N,A,P,O){const x=this._asMap[T];if(x){const W=x.data,U=W[W.length-3],F=W[W.length-1];if(U===O&&F+1>=A){P>F&&(W[W.length-1]=P);return}W.push(O,A,P)}else{const W=new o.OverviewRulerDecorationsGroup(T,N,[O,A,P]);this._asMap[T]=W,this.asArray.push(W)}}}class E{constructor(){this.hiddenAreas=new Map,this.shouldRecompute=!1,this.ranges=[]}setHiddenAreas(T,N){const A=this.hiddenAreas.get(T);A&&M(A,N)||(this.hiddenAreas.set(T,N),this.shouldRecompute=!0)}getMergedRanges(){if(!this.shouldRecompute)return this.ranges;this.shouldRecompute=!1;const T=Array.from(this.hiddenAreas.values()).reduce((N,A)=>k(N,A),[]);return M(this.ranges,T)?this.ranges:(this.ranges=T,this.ranges)}}function k(B,T){const N=[];let A=0,P=0;for(;A{this._onDidChangeConfiguration.fire(Be);const ye=this._configuration.options;if(Be.hasChanged(143)){const De=ye.get(143);this._onDidLayoutChange.fire(De)}})),this._contextKeyService=this._register(oe.createScoped(this._domElement)),this._notificationService=me,this._codeEditorService=j,this._commandService=re,this._themeService=he,this._register(new J(this,this._contextKeyService)),this._register(new q(this,this._contextKeyService,we)),this._instantiationService=Q.createChild(new E.ServiceCollection([b.IContextKeyService,this._contextKeyService])),this._modelData=null,this._focusTracker=new H(X),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={},this._glyphMarginWidgets={};let Ae;Array.isArray(z.contributions)?Ae=z.contributions:Ae=v.EditorExtensionsRegistry.getEditorContributions(),this._contributions.initialize(this,Ae,this._instantiationService);for(const Be of v.EditorExtensionsRegistry.getEditorActions()){if(this._actions.has(Be.id)){(0,y.onUnexpectedError)(new Error(`Cannot have two actions with the same id ${Be.id}`));continue}const ye=new d.InternalEditorAction(Be.id,Be.label,Be.alias,(Le=Be.precondition)!==null&&Le!==void 0?Le:void 0,()=>this._instantiationService.invokeFunction(De=>Promise.resolve(Be.runEditorCommand(De,this,null))),this._contextKeyService);this._actions.set(ye.id,ye)}const Re=()=>!this._configuration.options.get(90)&&this._configuration.options.get(36).enabled;this._register(new I.DragAndDropObserver(this._domElement,{onDragEnter:()=>{},onDragOver:Be=>{if(!Re())return;const ye=this.getTargetAtClientPoint(Be.clientX,Be.clientY);ye?.position&&this.showDropIndicatorAt(ye.position)},onDrop:Be=>be(this,void 0,void 0,function*(){if(!Re()||(this.removeDropIndicator(),!Be.dataTransfer))return;const ye=this.getTargetAtClientPoint(Be.clientX,Be.clientY);ye?.position&&this._onDropIntoEditor.fire({position:ye.position,event:Be})}),onDragLeave:()=>{this.removeDropIndicator()},onDragEnd:()=>{this.removeDropIndicator()}})),this._codeEditorService.addCodeEditor(this)}writeScreenReaderContent(X){var K;(K=this._modelData)===null||K===void 0||K.view.writeScreenReaderContent(X)}_createConfiguration(X,K,z){return new _.EditorConfiguration(X,K,this._domElement,z)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return l.EditorType.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose(),this._actions.clear(),this._contentWidgets={},this._overlayWidgets={},this._removeDecorationTypes(),this._postDetachModelCleanup(this._detachModel()),this._onDidDispose.fire(),super.dispose()}invokeWithinContext(X){return this._instantiationService.invokeFunction(X)}updateOptions(X){this._configuration.updateOptions(X||{})}getOptions(){return this._configuration.options}getOption(X){return this._configuration.options.get(X)}getRawOptions(){return this._configuration.getRawOptions()}getOverflowWidgetsDomNode(){return this._overflowWidgetsDomNode}getConfiguredWordAtPosition(X){return this._modelData?N.WordOperations.getWordAtPosition(this._modelData.model,this._configuration.options.get(129),X):null}getValue(X=null){if(!this._modelData)return"";const K=!!(X&&X.preserveBOM);let z=0;return X&&X.lineEnding&&X.lineEnding===` -`?z=1:X&&X.lineEnding&&X.lineEnding===`\r -`&&(z=2),this._modelData.model.getValue(z,K)}setValue(X){this._modelData&&this._modelData.model.setValue(X)}getModel(){return this._modelData?this._modelData.model:null}setModel(X=null){const K=X;if(this._modelData===null&&K===null||this._modelData&&this._modelData.model===K)return;const z=this.hasTextFocus(),Q=this._detachModel();this._attachModel(K),z&&this.hasModel()&&this.focus();const j={oldModelUrl:Q?Q.uri:null,newModelUrl:K?K.uri:null};this._removeDecorationTypes(),this._onDidChangeModel.fire(j),this._postDetachModelCleanup(Q),this._contributions.onAfterModelAttached()}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(const X in this._decorationTypeSubtypes){const K=this._decorationTypeSubtypes[X];for(const z in K)this._removeDecorationType(X+"-"+z)}this._decorationTypeSubtypes={}}}getVisibleRanges(){return this._modelData?this._modelData.viewModel.getVisibleRanges():[]}getVisibleRangesPlusViewportAboveBelow(){return this._modelData?this._modelData.viewModel.getVisibleRangesPlusViewportAboveBelow():[]}getWhitespaces(){return this._modelData?this._modelData.viewModel.viewLayout.getWhitespaces():[]}static _getVerticalOffsetAfterPosition(X,K,z,Q){const j=X.model.validatePosition({lineNumber:K,column:z}),re=X.viewModel.coordinatesConverter.convertModelPositionToViewPosition(j);return X.viewModel.viewLayout.getVerticalOffsetAfterLineNumber(re.lineNumber,Q)}getTopForLineNumber(X,K=!1){return this._modelData?U._getVerticalOffsetForPosition(this._modelData,X,1,K):-1}getTopForPosition(X,K){return this._modelData?U._getVerticalOffsetForPosition(this._modelData,X,K,!1):-1}static _getVerticalOffsetForPosition(X,K,z,Q=!1){const j=X.model.validatePosition({lineNumber:K,column:z}),re=X.viewModel.coordinatesConverter.convertModelPositionToViewPosition(j);return X.viewModel.viewLayout.getVerticalOffsetForLineNumber(re.lineNumber,Q)}getBottomForLineNumber(X,K=!1){return this._modelData?U._getVerticalOffsetAfterPosition(this._modelData,X,1,K):-1}setHiddenAreas(X,K){var z;(z=this._modelData)===null||z===void 0||z.viewModel.setHiddenAreas(X.map(Q=>u.Range.lift(Q)),K)}getVisibleColumnFromPosition(X){if(!this._modelData)return X.column;const K=this._modelData.model.validatePosition(X),z=this._modelData.model.getOptions().tabSize;return t.CursorColumns.visibleColumnFromColumn(this._modelData.model.getLineContent(K.lineNumber),K.column,z)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(X,K="api"){if(this._modelData){if(!r.Position.isIPosition(X))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(K,[{selectionStartLineNumber:X.lineNumber,selectionStartColumn:X.column,positionLineNumber:X.lineNumber,positionColumn:X.column}])}}_sendRevealRange(X,K,z,Q){if(!this._modelData)return;if(!u.Range.isIRange(X))throw new Error("Invalid arguments");const j=this._modelData.model.validateRange(X),re=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(j);this._modelData.viewModel.revealRange("api",z,re,K,Q)}revealLine(X,K=0){this._revealLine(X,0,K)}revealLineInCenter(X,K=0){this._revealLine(X,1,K)}revealLineInCenterIfOutsideViewport(X,K=0){this._revealLine(X,2,K)}revealLineNearTop(X,K=0){this._revealLine(X,5,K)}_revealLine(X,K,z){if(typeof X!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(X,1,X,1),K,!1,z)}revealPosition(X,K=0){this._revealPosition(X,0,!0,K)}revealPositionInCenter(X,K=0){this._revealPosition(X,1,!0,K)}revealPositionInCenterIfOutsideViewport(X,K=0){this._revealPosition(X,2,!0,K)}revealPositionNearTop(X,K=0){this._revealPosition(X,5,!0,K)}_revealPosition(X,K,z,Q){if(!r.Position.isIPosition(X))throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(X.lineNumber,X.column,X.lineNumber,X.column),K,z,Q)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(X,K="api"){const z=f.Selection.isISelection(X),Q=u.Range.isIRange(X);if(!z&&!Q)throw new Error("Invalid arguments");if(z)this._setSelectionImpl(X,K);else if(Q){const j={selectionStartLineNumber:X.startLineNumber,selectionStartColumn:X.startColumn,positionLineNumber:X.endLineNumber,positionColumn:X.endColumn};this._setSelectionImpl(j,K)}}_setSelectionImpl(X,K){if(!this._modelData)return;const z=new f.Selection(X.selectionStartLineNumber,X.selectionStartColumn,X.positionLineNumber,X.positionColumn);this._modelData.viewModel.setSelections(K,[z])}revealLines(X,K,z=0){this._revealLines(X,K,0,z)}revealLinesInCenter(X,K,z=0){this._revealLines(X,K,1,z)}revealLinesInCenterIfOutsideViewport(X,K,z=0){this._revealLines(X,K,2,z)}revealLinesNearTop(X,K,z=0){this._revealLines(X,K,5,z)}_revealLines(X,K,z,Q){if(typeof X!="number"||typeof K!="number")throw new Error("Invalid arguments");this._sendRevealRange(new u.Range(X,1,K,1),z,!1,Q)}revealRange(X,K=0,z=!1,Q=!0){this._revealRange(X,z?1:0,Q,K)}revealRangeInCenter(X,K=0){this._revealRange(X,1,!0,K)}revealRangeInCenterIfOutsideViewport(X,K=0){this._revealRange(X,2,!0,K)}revealRangeNearTop(X,K=0){this._revealRange(X,5,!0,K)}revealRangeNearTopIfOutsideViewport(X,K=0){this._revealRange(X,6,!0,K)}revealRangeAtTop(X,K=0){this._revealRange(X,3,!0,K)}_revealRange(X,K,z,Q){if(!u.Range.isIRange(X))throw new Error("Invalid arguments");this._sendRevealRange(u.Range.lift(X),K,z,Q)}setSelections(X,K="api",z=0){if(this._modelData){if(!X||X.length===0)throw new Error("Invalid arguments");for(let Q=0,j=X.length;Q0&&this._modelData.viewModel.restoreCursorState(z):this._modelData.viewModel.restoreCursorState([z]),this._contributions.restoreViewState(K.contributionsState||{});const Q=this._modelData.viewModel.reduceRestoreState(K.viewState);this._modelData.view.restoreState(Q)}}handleInitialized(){var X;(X=this._getViewModel())===null||X===void 0||X.visibleLinesStabilized()}getContribution(X){return this._contributions.get(X)}getActions(){return Array.from(this._actions.values())}getSupportedActions(){let X=this.getActions();return X=X.filter(K=>K.isSupported()),X}getAction(X){return this._actions.get(X)||null}trigger(X,K,z){switch(z=z||{},K){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(X);return;case"type":{const j=z;this._type(X,j.text||"");return}case"replacePreviousChar":{const j=z;this._compositionType(X,j.text||"",j.replaceCharCnt||0,0,0);return}case"compositionType":{const j=z;this._compositionType(X,j.text||"",j.replacePrevCharCnt||0,j.replaceNextCharCnt||0,j.positionDelta||0);return}case"paste":{const j=z;this._paste(X,j.text||"",j.pasteOnNewLine||!1,j.multicursorText||null,j.mode||null);return}case"cut":this._cut(X);return}const Q=this.getAction(K);if(Q){Promise.resolve(Q.run(z)).then(void 0,y.onUnexpectedError);return}this._modelData&&(this._triggerEditorCommand(X,K,z)||this._triggerCommand(K,z))}_triggerCommand(X,K){this._commandService.executeCommand(X,K)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(X){this._modelData&&(this._modelData.viewModel.endComposition(X),this._onDidCompositionEnd.fire())}_type(X,K){!this._modelData||K.length===0||(X==="keyboard"&&this._onWillType.fire(K),this._modelData.viewModel.type(K,X),X==="keyboard"&&this._onDidType.fire(K))}_compositionType(X,K,z,Q,j){this._modelData&&this._modelData.viewModel.compositionType(K,z,Q,j,X)}_paste(X,K,z,Q,j){if(!this._modelData||K.length===0)return;const re=this._modelData.viewModel,oe=re.getSelection().getStartPosition();re.paste(K,z,Q,X);const he=re.getSelection().getStartPosition();X==="keyboard"&&this._onDidPaste.fire({range:new u.Range(oe.lineNumber,oe.column,he.lineNumber,he.column),languageId:j})}_cut(X){this._modelData&&this._modelData.viewModel.cut(X)}_triggerEditorCommand(X,K,z){const Q=v.EditorExtensionsRegistry.getEditorCommand(K);return Q?(z=z||{},z.source=X,this._instantiationService.invokeFunction(j=>{Promise.resolve(Q.runEditorCommand(j,this,z)).then(void 0,y.onUnexpectedError)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(90)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(X,K,z){if(!this._modelData||this._configuration.options.get(90))return!1;let Q;return z?Array.isArray(z)?Q=()=>z:Q=z:Q=()=>null,this._modelData.viewModel.executeEdits(X,K,Q),!0}executeCommand(X,K){this._modelData&&this._modelData.viewModel.executeCommand(K,X)}executeCommands(X,K){this._modelData&&this._modelData.viewModel.executeCommands(K,X)}createDecorationsCollection(X){return new V(this,X)}changeDecorations(X){return this._modelData?this._modelData.model.changeDecorations(X,this._id):null}getLineDecorations(X){return this._modelData?this._modelData.model.getLineDecorations(X,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}getDecorationsInRange(X){return this._modelData?this._modelData.model.getDecorationsInRange(X,this._id,(0,n.filterValidationDecorations)(this._configuration.options)):null}deltaDecorations(X,K){return this._modelData?X.length===0&&K.length===0?X:this._modelData.model.deltaDecorations(X,K,this._id):[]}removeDecorations(X){!this._modelData||X.length===0||this._modelData.model.changeDecorations(K=>{K.deltaDecorations(X,[])})}removeDecorationsByType(X){const K=this._decorationTypeKeysToIds[X];K&&this.deltaDecorations(K,[]),this._decorationTypeKeysToIds.hasOwnProperty(X)&&delete this._decorationTypeKeysToIds[X],this._decorationTypeSubtypes.hasOwnProperty(X)&&delete this._decorationTypeSubtypes[X]}getLayoutInfo(){return this._configuration.options.get(143)}createOverviewRuler(X){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(X)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarPointerDown(X){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarPointerDown(X)}delegateScrollFromMouseWheelEvent(X){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateScrollFromMouseWheelEvent(X)}layout(X){this._configuration.observeContainer(X),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1:this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(X){const K={widget:X,position:X.getPosition()};this._contentWidgets.hasOwnProperty(X.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[X.getId()]=K,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(K)}layoutContentWidget(X){const K=X.getId();if(this._contentWidgets.hasOwnProperty(K)){const z=this._contentWidgets[K];z.position=X.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(z)}}removeContentWidget(X){const K=X.getId();if(this._contentWidgets.hasOwnProperty(K)){const z=this._contentWidgets[K];delete this._contentWidgets[K],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(z)}}addOverlayWidget(X){const K={widget:X,position:X.getPosition()};this._overlayWidgets.hasOwnProperty(X.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[X.getId()]=K,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(K)}layoutOverlayWidget(X){const K=X.getId();if(this._overlayWidgets.hasOwnProperty(K)){const z=this._overlayWidgets[K];z.position=X.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(z)}}removeOverlayWidget(X){const K=X.getId();if(this._overlayWidgets.hasOwnProperty(K)){const z=this._overlayWidgets[K];delete this._overlayWidgets[K],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(z)}}addGlyphMarginWidget(X){const K={widget:X,position:X.getPosition()};this._glyphMarginWidgets.hasOwnProperty(X.getId())&&console.warn("Overwriting a glyph margin widget with the same id."),this._glyphMarginWidgets[X.getId()]=K,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addGlyphMarginWidget(K)}layoutGlyphMarginWidget(X){const K=X.getId();if(this._glyphMarginWidgets.hasOwnProperty(K)){const z=this._glyphMarginWidgets[K];z.position=X.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutGlyphMarginWidget(z)}}removeGlyphMarginWidget(X){const K=X.getId();if(this._glyphMarginWidgets.hasOwnProperty(K)){const z=this._glyphMarginWidgets[K];delete this._glyphMarginWidgets[K],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeGlyphMarginWidget(z)}}changeViewZones(X){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(X)}getTargetAtClientPoint(X,K){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(X,K)}getScrolledVisiblePosition(X){if(!this._modelData||!this._modelData.hasRealView)return null;const K=this._modelData.model.validatePosition(X),z=this._configuration.options,Q=z.get(143),j=U._getVerticalOffsetForPosition(this._modelData,K.lineNumber,K.column)-this.getScrollTop(),re=this._modelData.view.getOffsetForColumn(K.lineNumber,K.column)+Q.glyphMarginWidth+Q.lineNumbersWidth+Q.decorationsWidth-this.getScrollLeft();return{top:j,left:re,height:z.get(66)}}getOffsetForColumn(X,K){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(X,K)}render(X=!1){!this._modelData||!this._modelData.hasRealView||this._modelData.view.render(!0,X)}setAriaOptions(X){!this._modelData||!this._modelData.hasRealView||this._modelData.view.setAriaOptions(X)}applyFontInfo(X){(0,P.applyFontInfo)(X,this._configuration.options.get(50))}setBanner(X,K){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=X,this._configuration.setReservedHeight(X?K:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(X){if(!X){this._modelData=null;return}const K=[];this._domElement.setAttribute("data-mode-id",X.getLanguageId()),this._configuration.setIsDominatedByLongLines(X.isDominatedByLongLines()),this._configuration.setModelLineCount(X.getLineCount());const z=X.onBeforeAttached(),Q=new h.ViewModel(this._id,this._configuration,X,T.DOMLineBreaksComputerFactory.create(),B.MonospaceLineBreaksComputerFactory.create(this._configuration.options),oe=>I.scheduleAtNextAnimationFrame(oe),this.languageConfigurationService,this._themeService,z);K.push(X.onWillDispose(()=>this.setModel(null))),K.push(Q.onEvent(oe=>{switch(oe.kind){case 0:this._onDidContentSizeChange.fire(oe);break;case 1:this._editorTextFocus.setValue(oe.hasFocus);break;case 2:this._onDidScrollChange.fire(oe);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{if(oe.reachedMaxCursorCount){const ve=this.getOption(79),we=L.localize(0,null,ve);this._notificationService.prompt(k.Severity.Warning,we,[{label:"Find and Replace",run:()=>{this._commandService.executeCommand("editor.action.startFindReplaceAction")}},{label:L.localize(1,null),run:()=>{this._commandService.executeCommand("workbench.action.openSettings2",{query:"editor.multiCursorLimit"})}}])}const he=[];for(let ve=0,we=oe.selections.length;ve{this._paste("keyboard",j,re,oe,he)},type:j=>{this._type("keyboard",j)},compositionType:(j,re,oe,he)=>{this._compositionType("keyboard",j,re,oe,he)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:K={paste:(j,re,oe,he)=>{const me={text:j,pasteOnNewLine:re,multicursorText:oe,mode:he};this._commandService.executeCommand("paste",me)},type:j=>{const re={text:j};this._commandService.executeCommand("type",re)},compositionType:(j,re,oe,he)=>{if(oe||he){const me={text:j,replacePrevCharCnt:re,replaceNextCharCnt:oe,positionDelta:he};this._commandService.executeCommand("compositionType",me)}else{const me={text:j,replaceCharCnt:re};this._commandService.executeCommand("replacePreviousChar",me)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const z=new i.ViewUserInputEvents(X.coordinatesConverter);return z.onKeyDown=j=>this._onKeyDown.fire(j),z.onKeyUp=j=>this._onKeyUp.fire(j),z.onContextMenu=j=>this._onContextMenu.fire(j),z.onMouseMove=j=>this._onMouseMove.fire(j),z.onMouseLeave=j=>this._onMouseLeave.fire(j),z.onMouseDown=j=>this._onMouseDown.fire(j),z.onMouseUp=j=>this._onMouseUp.fire(j),z.onMouseDrag=j=>this._onMouseDrag.fire(j),z.onMouseDrop=j=>this._onMouseDrop.fire(j),z.onMouseDropCanceled=j=>this._onMouseDropCanceled.fire(j),z.onMouseWheel=j=>this._onMouseWheel.fire(j),[new s.View(K,this._configuration,this._themeService.getColorTheme(),X,z,this._overflowWidgetsDomNode,this._instantiationService),!0]}_postDetachModelCleanup(X){X?.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const X=this._modelData.model,K=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),K&&this._domElement.contains(K)&&this._domElement.removeChild(K),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),X}_removeDecorationType(X){this._codeEditorService.removeDecorationType(X)}hasModel(){return this._modelData!==null}showDropIndicatorAt(X){const K=[{range:new u.Range(X.lineNumber,X.column,X.lineNumber,X.column),options:U.dropIntoEditorDecorationOptions}];this._dropIntoEditorDecorations.set(K),this.revealPosition(X,1)}removeDropIndicator(){this._dropIntoEditorDecorations.clear()}setContextValue(X,K){this._contextKeyService.createKey(X,K)}};e.CodeEditorWidget=Y,Y.dropIntoEditorDecorationOptions=c.ModelDecorationOptions.register({description:"workbench-dnd-target",className:"dnd-target"}),e.CodeEditorWidget=Y=U=Ie([ge(3,w.IInstantiationService),ge(4,C.ICodeEditorService),ge(5,p.ICommandService),ge(6,b.IContextKeyService),ge(7,M.IThemeService),ge(8,k.INotificationService),ge(9,R.IAccessibilityService),ge(10,A.ILanguageConfigurationService),ge(11,O.ILanguageFeaturesService)],Y);class ne extends S.Disposable{constructor(X){super(),this._emitterOptions=X,this._onDidChangeToTrue=this._register(new D.Emitter(this._emitterOptions)),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new D.Emitter(this._emitterOptions)),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(X){const K=X?2:1;this._value!==K&&(this._value=K,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}e.BooleanEventEmitter=ne;class se extends D.Emitter{constructor(X,K){super({deliveryQueue:K}),this._contributions=X}fire(X){this._contributions.onBeforeInteractionEvent(),super.fire(X)}}class J extends S.Disposable{constructor(X,K){super(),this._editor=X,K.createKey("editorId",X.getId()),this._editorSimpleInput=o.EditorContextKeys.editorSimpleInput.bindTo(K),this._editorFocus=o.EditorContextKeys.focus.bindTo(K),this._textInputFocus=o.EditorContextKeys.textInputFocus.bindTo(K),this._editorTextFocus=o.EditorContextKeys.editorTextFocus.bindTo(K),this._tabMovesFocus=o.EditorContextKeys.tabMovesFocus.bindTo(K),this._editorReadonly=o.EditorContextKeys.readOnly.bindTo(K),this._inDiffEditor=o.EditorContextKeys.inDiffEditor.bindTo(K),this._editorColumnSelection=o.EditorContextKeys.columnSelection.bindTo(K),this._hasMultipleSelections=o.EditorContextKeys.hasMultipleSelections.bindTo(K),this._hasNonEmptySelection=o.EditorContextKeys.hasNonEmptySelection.bindTo(K),this._canUndo=o.EditorContextKeys.canUndo.bindTo(K),this._canRedo=o.EditorContextKeys.canRedo.bindTo(K),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromConfig())),this._register(this._editor.onDidChangeCursorSelection(()=>this._updateFromSelection())),this._register(this._editor.onDidFocusEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorWidget(()=>this._updateFromFocus())),this._register(this._editor.onDidFocusEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidBlurEditorText(()=>this._updateFromFocus())),this._register(this._editor.onDidChangeModel(()=>this._updateFromModel())),this._register(this._editor.onDidChangeConfiguration(()=>this._updateFromModel())),this._register(W.TabFocus.onDidChangeTabFocus(z=>this._tabMovesFocus.set(z))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const X=this._editor.getOptions();this._tabMovesFocus.set(W.TabFocus.getTabFocusMode()),this._editorReadonly.set(X.get(90)),this._inDiffEditor.set(X.get(61)),this._editorColumnSelection.set(X.get(22))}_updateFromSelection(){const X=this._editor.getSelections();X?(this._hasMultipleSelections.set(X.length>1),this._hasNonEmptySelection.set(X.some(K=>!K.isEmpty()))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const X=this._editor.getModel();this._canUndo.set(!!(X&&X.canUndo())),this._canRedo.set(!!(X&&X.canRedo()))}}class q extends S.Disposable{constructor(X,K,z){super(),this._editor=X,this._contextKeyService=K,this._languageFeaturesService=z,this._langId=o.EditorContextKeys.languageId.bindTo(K),this._hasCompletionItemProvider=o.EditorContextKeys.hasCompletionItemProvider.bindTo(K),this._hasCodeActionsProvider=o.EditorContextKeys.hasCodeActionsProvider.bindTo(K),this._hasCodeLensProvider=o.EditorContextKeys.hasCodeLensProvider.bindTo(K),this._hasDefinitionProvider=o.EditorContextKeys.hasDefinitionProvider.bindTo(K),this._hasDeclarationProvider=o.EditorContextKeys.hasDeclarationProvider.bindTo(K),this._hasImplementationProvider=o.EditorContextKeys.hasImplementationProvider.bindTo(K),this._hasTypeDefinitionProvider=o.EditorContextKeys.hasTypeDefinitionProvider.bindTo(K),this._hasHoverProvider=o.EditorContextKeys.hasHoverProvider.bindTo(K),this._hasDocumentHighlightProvider=o.EditorContextKeys.hasDocumentHighlightProvider.bindTo(K),this._hasDocumentSymbolProvider=o.EditorContextKeys.hasDocumentSymbolProvider.bindTo(K),this._hasReferenceProvider=o.EditorContextKeys.hasReferenceProvider.bindTo(K),this._hasRenameProvider=o.EditorContextKeys.hasRenameProvider.bindTo(K),this._hasSignatureHelpProvider=o.EditorContextKeys.hasSignatureHelpProvider.bindTo(K),this._hasInlayHintsProvider=o.EditorContextKeys.hasInlayHintsProvider.bindTo(K),this._hasDocumentFormattingProvider=o.EditorContextKeys.hasDocumentFormattingProvider.bindTo(K),this._hasDocumentSelectionFormattingProvider=o.EditorContextKeys.hasDocumentSelectionFormattingProvider.bindTo(K),this._hasMultipleDocumentFormattingProvider=o.EditorContextKeys.hasMultipleDocumentFormattingProvider.bindTo(K),this._hasMultipleDocumentSelectionFormattingProvider=o.EditorContextKeys.hasMultipleDocumentSelectionFormattingProvider.bindTo(K),this._isInWalkThrough=o.EditorContextKeys.isInWalkThroughSnippet.bindTo(K);const Q=()=>this._update();this._register(X.onDidChangeModel(Q)),this._register(X.onDidChangeModelLanguage(Q)),this._register(z.completionProvider.onDidChange(Q)),this._register(z.codeActionProvider.onDidChange(Q)),this._register(z.codeLensProvider.onDidChange(Q)),this._register(z.definitionProvider.onDidChange(Q)),this._register(z.declarationProvider.onDidChange(Q)),this._register(z.implementationProvider.onDidChange(Q)),this._register(z.typeDefinitionProvider.onDidChange(Q)),this._register(z.hoverProvider.onDidChange(Q)),this._register(z.documentHighlightProvider.onDidChange(Q)),this._register(z.documentSymbolProvider.onDidChange(Q)),this._register(z.referenceProvider.onDidChange(Q)),this._register(z.renameProvider.onDidChange(Q)),this._register(z.documentFormattingEditProvider.onDidChange(Q)),this._register(z.documentRangeFormattingEditProvider.onDidChange(Q)),this._register(z.signatureHelpProvider.onDidChange(Q)),this._register(z.inlayHintsProvider.onDidChange(Q)),Q()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents(()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.reset(),this._hasImplementationProvider.reset(),this._hasTypeDefinitionProvider.reset(),this._hasHoverProvider.reset(),this._hasDocumentHighlightProvider.reset(),this._hasDocumentSymbolProvider.reset(),this._hasReferenceProvider.reset(),this._hasRenameProvider.reset(),this._hasDocumentFormattingProvider.reset(),this._hasDocumentSelectionFormattingProvider.reset(),this._hasSignatureHelpProvider.reset(),this._isInWalkThrough.reset()})}_update(){const X=this._editor.getModel();if(!X){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(X.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(X)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(X)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(X)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(X)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(X)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(X)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(X)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(X)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(X)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(X)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(X)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(X)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(X)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(X)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(X)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(X)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(X)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(X).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(X).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(X).length>1),this._isInWalkThrough.set(X.uri.scheme===m.Schemas.walkThroughSnippet)})}}e.EditorModeContext=q;class H extends S.Disposable{constructor(X){super(),this._onChange=this._register(new D.Emitter),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(I.trackFocus(X)),this._register(this._domFocusTracker.onDidFocus(()=>{this._hasFocus=!0,this._onChange.fire(void 0)})),this._register(this._domFocusTracker.onDidBlur(()=>{this._hasFocus=!1,this._onChange.fire(void 0)}))}hasFocus(){return this._hasFocus}}class V{get length(){return this._decorationIds.length}constructor(X,K){this._editor=X,this._decorationIds=[],this._isChangingDecorations=!1,Array.isArray(K)&&K.length>0&&this.set(K)}onDidChange(X,K,z){return this._editor.onDidChangeModelDecorations(Q=>{this._isChangingDecorations||X.call(K,Q)},z)}getRange(X){return!this._editor.hasModel()||X>=this._decorationIds.length?null:this._editor.getModel().getDecorationRange(this._decorationIds[X])}getRanges(){if(!this._editor.hasModel())return[];const X=this._editor.getModel(),K=[];for(const z of this._decorationIds){const Q=X.getDecorationRange(z);Q&&K.push(Q)}return K}has(X){return this._decorationIds.includes(X.id)}clear(){this._decorationIds.length!==0&&this.set([])}set(X){try{this._isChangingDecorations=!0,this._editor.changeDecorations(K=>{this._decorationIds=K.deltaDecorations(this._decorationIds,X)})}finally{this._isChangingDecorations=!1}return this._decorationIds}}const Z=encodeURIComponent("");function le(ae){return Z+encodeURIComponent(ae.toString())+ee}const ue=encodeURIComponent('');function ce(ae){return ue+encodeURIComponent(ae.toString())+de}(0,M.registerThemingParticipant)((ae,X)=>{const K=ae.getColor(g.editorErrorForeground);K&&X.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${le(K)}") repeat-x bottom left; }`);const z=ae.getColor(g.editorWarningForeground);z&&X.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${le(z)}") repeat-x bottom left; }`);const Q=ae.getColor(g.editorInfoForeground);Q&&X.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${le(Q)}") repeat-x bottom left; }`);const j=ae.getColor(g.editorHintForeground);j&&X.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${ce(j)}") no-repeat bottom left; }`);const re=ae.getColor(a.editorUnnecessaryCodeOpacity);re&&X.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${re.rgba.a}; }`)})}),define(te[366],ie([1,0,7,68,9,6,2,40,16,33,192,829,869,594,748,870,327,360,100,12,5,174,22,87,156,15,8,186,85,486,843,621,352,438,823]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M,R,B){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiffEditorWidget=void 0;let T=class extends k.DelegatingEditor{constructor(W,U,F,G,Y,ne,se,J){var q;super(),this._domElement=W,this._parentContextKeyService=G,this._parentInstantiationService=Y,this._audioCueService=se,this._editorProgressService=J,this.elements=(0,L.h)("div.monaco-diff-editor.side-by-side",{style:{position:"relative",height:"100%"}},[(0,L.h)("div.noModificationsOverlay@overlay",{style:{position:"absolute",height:"100%",visibility:"hidden"}},[(0,L.$)("span",{},"No Changes")]),(0,L.h)("div.editor.original@original",{style:{position:"absolute",height:"100%"}}),(0,L.h)("div.editor.modified@modified",{style:{position:"absolute",height:"100%"}}),(0,L.h)("div.accessibleDiffViewer@accessibleDiffViewer",{style:{position:"absolute",height:"100%"}})]),this._diffModel=this._register((0,m.disposableObservableValue)("diffModel",void 0)),this.onDidChangeModel=D.Event.fromObservableLight(this._diffModel),this._contextKeyService=this._register(this._parentContextKeyService.createScoped(this._domElement)),this._instantiationService=this._parentInstantiationService.createChild(new w.ServiceCollection([p.IContextKeyService,this._contextKeyService])),this._boundarySashes=(0,m.observableValue)(this,void 0),this._accessibleDiffViewerShouldBeVisible=(0,m.observableValue)(this,!1),this._accessibleDiffViewerVisible=(0,m.derived)(this,ue=>this._options.onlyShowAccessibleDiffViewer.read(ue)?!0:this._accessibleDiffViewerShouldBeVisible.read(ue)),this.movedBlocksLinesPart=(0,m.observableValue)(this,void 0),this._layoutInfo=(0,m.derived)(this,ue=>{var de,ce,ae;const X=this._rootSizeObserver.width.read(ue),K=this._rootSizeObserver.height.read(ue),z=(de=this._sash.read(ue))===null||de===void 0?void 0:de.sashLeft.read(ue),Q=z??Math.max(5,this._editors.original.getLayoutInfo().decorationsLeft),j=X-Q-(this._options.renderOverviewRuler.read(ue)?f.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH:0),re=(ae=(ce=this.movedBlocksLinesPart.read(ue))===null||ce===void 0?void 0:ce.width.read(ue))!==null&&ae!==void 0?ae:0,oe=Q-re;return this.elements.original.style.width=oe+"px",this.elements.original.style.left="0px",this.elements.modified.style.width=j+"px",this.elements.modified.style.left=Q+"px",this._editors.original.layout({width:oe,height:K}),this._editors.modified.layout({width:j,height:K}),{modifiedEditor:this._editors.modified.getLayoutInfo(),originalEditor:this._editors.original.getLayoutInfo()}}),this._diffValue=this._diffModel.map((ue,de)=>ue?.diff.read(de)),this.onDidUpdateDiff=D.Event.fromObservableLight(this._diffValue),ne.willCreateDiffEditor(),this._contextKeyService.createKey("isInDiffEditor",!0),this._domElement.appendChild(this.elements.root),this._register((0,S.toDisposable)(()=>this._domElement.removeChild(this.elements.root))),this._rootSizeObserver=this._register(new d.ObservableElementSizeObserver(this.elements.root,U.dimension)),this._rootSizeObserver.setAutomaticLayout((q=U.automaticLayout)!==null&&q!==void 0?q:!1),this._options=new R.DiffEditorOptions(U,this._rootSizeObserver.width),this._contextKeyService.createKey(a.EditorContextKeys.isEmbeddedDiffEditor.key,!1);const H=a.EditorContextKeys.isEmbeddedDiffEditor.bindTo(this._contextKeyService);this._register((0,m.autorun)(ue=>{H.set(this._options.isInEmbeddedEditor.read(ue))}));const V=a.EditorContextKeys.comparingMovedCode.bindTo(this._contextKeyService);this._register((0,m.autorun)(ue=>{var de;V.set(!!(!((de=this._diffModel.read(ue))===null||de===void 0)&&de.movedTextToCompare.read(ue)))}));const Z=a.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached.bindTo(this._contextKeyService);this._register((0,m.autorun)(ue=>{Z.set(this._options.couldShowInlineViewBecauseOfSize.read(ue))})),this._editors=this._register(this._instantiationService.createInstance(M.DiffEditorEditors,this.elements.original,this.elements.modified,this._options,F,(ue,de,ce,ae)=>this._createInnerEditor(ue,de,ce,ae))),this._sash=(0,m.derivedWithStore)(this,(ue,de)=>{const ce=this._options.renderSideBySide.read(ue);if(this.elements.root.classList.toggle("side-by-side",ce),!ce)return;const ae=de.add(new n.DiffEditorSash(this._options,this.elements.root,{height:this._rootSizeObserver.height,width:this._rootSizeObserver.width.map((X,K)=>X-(this._options.renderOverviewRuler.read(K)?f.OverviewRulerPart.ENTIRE_DIFF_OVERVIEW_WIDTH:0))}));return de.add((0,m.autorun)(X=>{const K=this._boundarySashes.read(X);K&&ae.setBoundarySashes(K)})),ae}),this._register((0,m.recomputeInitiallyAndOnChange)(this._sash)),this._register((0,m.autorunWithStore)((ue,de)=>{this.unchangedRangesFeature=de.add(this._instantiationService.createInstance((0,d.readHotReloadableExport)(t.HideUnchangedRegionsFeature,ue),this._editors,this._diffModel,this._options))})),this._register((0,m.autorunWithStore)((ue,de)=>{de.add(new((0,d.readHotReloadableExport)(i.DiffEditorDecorations,ue))(this._editors,this._diffModel,this._options))})),this._register((0,m.autorunWithStore)((ue,de)=>{de.add(this._instantiationService.createInstance((0,d.readHotReloadableExport)(r.ViewZoneManager,ue),this._editors,this._diffModel,this._options,this,()=>this.unchangedRangesFeature.isUpdatingViewZones))})),this._register((0,m.autorunWithStore)((ue,de)=>{de.add(this._instantiationService.createInstance((0,d.readHotReloadableExport)(f.OverviewRulerPart,ue),this._editors,this.elements.root,this._diffModel,this._rootSizeObserver.width,this._rootSizeObserver.height,this._layoutInfo.map(ce=>ce.modifiedEditor),this._options))})),this._register((0,m.autorunWithStore)((ue,de)=>{this._accessibleDiffViewer=de.add(this._register(this._instantiationService.createInstance((0,d.readHotReloadableExport)(s.AccessibleDiffViewer,ue),this.elements.accessibleDiffViewer,this._accessibleDiffViewerVisible,(ce,ae)=>this._accessibleDiffViewerShouldBeVisible.set(ce,ae),this._options.onlyShowAccessibleDiffViewer.map(ce=>!ce),this._rootSizeObserver.width,this._rootSizeObserver.height,this._diffModel.map((ce,ae)=>{var X;return(X=ce?.diff.read(ae))===null||X===void 0?void 0:X.mappings.map(K=>K.lineRangeMapping)}),this._editors)))}));const ee=this._accessibleDiffViewerVisible.map(ue=>ue?"hidden":"visible");this._register((0,d.applyStyle)(this.elements.modified,{visibility:ee})),this._register((0,d.applyStyle)(this.elements.original,{visibility:ee})),this._createDiffEditorContributions(),ne.addDiffEditor(this),this._register((0,m.recomputeInitiallyAndOnChange)(this._layoutInfo)),this._register((0,m.autorunWithStore)((ue,de)=>{this.movedBlocksLinesPart.set(de.add(new((0,d.readHotReloadableExport)(u.MovedBlocksLinesPart,ue))(this.elements.root,this._diffModel,this._layoutInfo.map(ce=>ce.originalEditor),this._layoutInfo.map(ce=>ce.modifiedEditor),this._editors)),void 0)})),this._register((0,d.applyStyle)(this.elements.overlay,{width:this._layoutInfo.map((ue,de)=>ue.originalEditor.width+(this._options.renderSideBySide.read(de)?0:ue.modifiedEditor.width)),visibility:(0,m.derived)(ue=>{var de,ce;return this._options.hideUnchangedRegions.read(ue)&&((ce=(de=this._diffModel.read(ue))===null||de===void 0?void 0:de.diff.read(ue))===null||ce===void 0?void 0:ce.mappings.length)===0?"visible":"hidden"})})),this._register(this._editors.modified.onMouseDown(ue=>{var de,ce;if(!ue.event.rightButton&&ue.target.position&&(!((de=ue.target.element)===null||de===void 0)&&de.className.includes("arrow-revert-change"))){const ae=ue.target.position.lineNumber,X=ue.target,K=this._diffModel.get();if(!K)return;const z=(ce=K.diff.get())===null||ce===void 0?void 0:ce.mappings;if(!z)return;const Q=z.find(j=>X?.detail.afterLineNumber===j.lineRangeMapping.modified.startLineNumber-1||j.lineRangeMapping.modified.startLineNumber===ae);if(!Q)return;this.revert(Q.lineRangeMapping),ue.event.stopPropagation()}})),this._register(D.Event.runAndSubscribe(this._editors.modified.onDidChangeCursorPosition,ue=>{var de,ce;if(ue?.reason===3){const ae=(ce=(de=this._diffModel.get())===null||de===void 0?void 0:de.diff.get())===null||ce===void 0?void 0:ce.mappings.find(X=>X.lineRangeMapping.modified.contains(ue.position.lineNumber));ae?.lineRangeMapping.modified.isEmpty?this._audioCueService.playAudioCue(h.AudioCue.diffLineDeleted,{source:"diffEditor.cursorPositionChanged"}):ae?.lineRangeMapping.original.isEmpty?this._audioCueService.playAudioCue(h.AudioCue.diffLineInserted,{source:"diffEditor.cursorPositionChanged"}):ae&&this._audioCueService.playAudioCue(h.AudioCue.diffLineModified,{source:"diffEditor.cursorPositionChanged"})}}));const le=this._diffModel.map((ue,de)=>ue?.isDiffUpToDate.read(de));this._register((0,m.autorunWithStore)((ue,de)=>{if(le.read(ue)===!1){const ce=this._editorProgressService.show(!0,1e3);de.add((0,S.toDisposable)(()=>ce.done()))}}))}_createInnerEditor(W,U,F,G){return W.createInstance(C.CodeEditorWidget,U,F,G)}_createDiffEditorContributions(){const W=_.EditorExtensionsRegistry.getDiffEditorContributions();for(const U of W)try{this._register(this._instantiationService.createInstance(U.ctor,this))}catch(F){(0,y.onUnexpectedError)(F)}}get _targetEditor(){return this._editors.modified}getEditorType(){return c.EditorType.IDiffEditor}layout(W){this._rootSizeObserver.observe(W)}hasTextFocus(){return this._editors.original.hasTextFocus()||this._editors.modified.hasTextFocus()}saveViewState(){var W;const U=this._editors.original.saveViewState(),F=this._editors.modified.saveViewState();return{original:U,modified:F,modelState:(W=this._diffModel.get())===null||W===void 0?void 0:W.serializeState()}}restoreViewState(W){var U;if(W&&W.original&&W.modified){const F=W;this._editors.original.restoreViewState(F.original),this._editors.modified.restoreViewState(F.modified),F.modelState&&((U=this._diffModel.get())===null||U===void 0||U.restoreSerializedState(F.modelState))}}createViewModel(W){return this._instantiationService.createInstance(B.DiffEditorViewModel,W,this._options,this)}getModel(){var W,U;return(U=(W=this._diffModel.get())===null||W===void 0?void 0:W.model)!==null&&U!==void 0?U:null}setModel(W){!W&&this._diffModel.get()&&this._accessibleDiffViewer.close();const U=W?"model"in W?W:this.createViewModel(W):void 0;this._editors.original.setModel(U?U.model.original:null),this._editors.modified.setModel(U?U.model.modified:null),(0,m.transaction)(F=>{this._diffModel.set(U,F)})}updateOptions(W){this._options.updateOptions(W)}getContainerDomNode(){return this._domElement}getOriginalEditor(){return this._editors.original}getModifiedEditor(){return this._editors.modified}getLineChanges(){var W;const U=(W=this._diffModel.get())===null||W===void 0?void 0:W.diff.get();return U?O(U):null}revert(W){var U;const F=(U=this._diffModel.get())===null||U===void 0?void 0:U.model;if(!F)return;const G=W.innerChanges?W.innerChanges.map(Y=>({range:Y.modifiedRange,text:F.original.getValueInRange(Y.originalRange)})):[{range:W.modified.toExclusiveRange(),text:F.original.getValueInRange(W.original.toExclusiveRange())}];this._editors.modified.executeEdits("diffEditor",G)}accessibleDiffViewerNext(){this._accessibleDiffViewer.next()}accessibleDiffViewerPrev(){this._accessibleDiffViewer.prev()}mapToOtherSide(){var W,U;const F=this._editors.modified.hasWidgetFocus(),G=F?this._editors.modified:this._editors.original,Y=F?this._editors.original:this._editors.modified;let ne;const se=G.getSelection();if(se){const J=(U=(W=this._diffModel.get())===null||W===void 0?void 0:W.diff.get())===null||U===void 0?void 0:U.mappings.map(q=>F?q.lineRangeMapping.flip():q.lineRangeMapping);if(J){const q=N(se.getStartPosition(),J),H=N(se.getEndPosition(),J);ne=o.Range.plusRange(q,H)}}return{destination:Y,destinationSelection:ne}}switchSide(){const{destination:W,destinationSelection:U}=this.mapToOtherSide();W.focus(),U&&W.setSelection(U)}exitCompareMove(){const W=this._diffModel.get();W&&W.movedTextToCompare.set(void 0,void 0)}collapseAllUnchangedRegions(){var W;const U=(W=this._diffModel.get())===null||W===void 0?void 0:W.unchangedRegions.get();U&&(0,m.transaction)(F=>{for(const G of U)G.collapseAll(F)})}showAllUnchangedRegions(){var W;const U=(W=this._diffModel.get())===null||W===void 0?void 0:W.unchangedRegions.get();U&&(0,m.transaction)(F=>{for(const G of U)G.showAll(F)})}};e.DiffEditorWidget=T,e.DiffEditorWidget=T=Ie([ge(3,p.IContextKeyService),ge(4,b.IInstantiationService),ge(5,v.ICodeEditorService),ge(6,h.IAudioCueService),ge(7,E.IEditorProgressService)],T);function N(x,W){const U=(0,I.findLast)(W,G=>G.original.startLineNumber<=x.lineNumber);if(!U)return o.Range.fromPositions(x);if(U.original.endLineNumberExclusive<=x.lineNumber){const G=x.lineNumber-U.original.endLineNumberExclusive+U.modified.endLineNumberExclusive;return o.Range.fromPositions(new l.Position(G,x.column))}if(!U.innerChanges)return o.Range.fromPositions(new l.Position(U.modified.startLineNumber,1));const F=(0,I.findLast)(U.innerChanges,G=>G.originalRange.getStartPosition().isBeforeOrEqual(x));if(!F){const G=x.lineNumber-U.original.startLineNumber+U.modified.startLineNumber;return o.Range.fromPositions(new l.Position(G,x.column))}if(F.originalRange.containsPosition(x))return F.modifiedRange;{const G=A(F.originalRange.getEndPosition(),x);return o.Range.fromPositions(P(F.modifiedRange.getEndPosition(),G))}}function A(x,W){return x.lineNumber===W.lineNumber?new g.LengthObj(0,W.column-x.column):new g.LengthObj(W.lineNumber-x.lineNumber,W.column-1)}function P(x,W){return W.lineCount===0?new l.Position(x.lineNumber,x.column+W.columnCount):new l.Position(x.lineNumber+W.lineCount,W.columnCount+1)}function O(x){return x.mappings.map(W=>{const U=W.lineRangeMapping;let F,G,Y,ne,se=U.innerChanges;return U.original.isEmpty?(F=U.original.startLineNumber-1,G=0,se=void 0):(F=U.original.startLineNumber,G=U.original.endLineNumberExclusive-1),U.modified.isEmpty?(Y=U.modified.startLineNumber-1,ne=0,se=void 0):(Y=U.modified.startLineNumber,ne=U.modified.endLineNumberExclusive-1),{originalStartLineNumber:F,originalEndLineNumber:G,modifiedStartLineNumber:Y,modifiedEndLineNumber:ne,charChanges:se?.map(J=>({originalStartLineNumber:J.originalRange.startLineNumber,originalStartColumn:J.originalRange.startColumn,originalEndLineNumber:J.originalRange.endLineNumber,originalEndColumn:J.originalRange.endColumn,modifiedStartLineNumber:J.modifiedRange.startLineNumber,modifiedStartColumn:J.modifiedRange.startColumn,modifiedEndLineNumber:J.modifiedRange.endLineNumber,modifiedEndColumn:J.modifiedRange.endColumn}))}})}}),define(te[874],ie([1,0,7,26,16,33,366,22,612,30,25,28,15]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.findFocusedDiffEditor=e.AccessibleDiffViewerPrev=e.AccessibleDiffViewerNext=e.ShowAllUnchangedRegions=e.CollapseAllUnchangedRegions=e.ExitCompareMove=e.SwitchSide=e.ToggleUseInlineViewWhenSpaceIsLimited=e.ToggleShowMovedCodeBlocks=e.ToggleCollapseUnchangedRegions=void 0;class n extends v.Action2{constructor(){super({id:"diffEditor.toggleCollapseUnchangedRegions",title:{value:(0,_.localize)(0,null),original:"Toggle Collapse Unchanged Regions"},icon:I.Codicon.map,toggled:i.ContextKeyExpr.has("config.diffEditor.hideUnchangedRegions.enabled"),precondition:i.ContextKeyExpr.has("isInDiffEditor"),menu:{when:i.ContextKeyExpr.has("isInDiffEditor"),id:v.MenuId.EditorTitle,order:22,group:"navigation"}})}run(w,...E){const k=w.get(s.IConfigurationService),M=!k.getValue("diffEditor.hideUnchangedRegions.enabled");k.updateValue("diffEditor.hideUnchangedRegions.enabled",M)}}e.ToggleCollapseUnchangedRegions=n,(0,v.registerAction2)(n);class t extends v.Action2{constructor(){super({id:"diffEditor.toggleShowMovedCodeBlocks",title:{value:(0,_.localize)(1,null),original:"Toggle Show Moved Code Blocks"},precondition:i.ContextKeyExpr.has("isInDiffEditor")})}run(w,...E){const k=w.get(s.IConfigurationService),M=!k.getValue("diffEditor.experimental.showMoves");k.updateValue("diffEditor.experimental.showMoves",M)}}e.ToggleShowMovedCodeBlocks=t,(0,v.registerAction2)(t);class r extends v.Action2{constructor(){super({id:"diffEditor.toggleUseInlineViewWhenSpaceIsLimited",title:{value:(0,_.localize)(2,null),original:"Toggle Use Inline View When Space Is Limited"},precondition:i.ContextKeyExpr.has("isInDiffEditor")})}run(w,...E){const k=w.get(s.IConfigurationService),M=!k.getValue("diffEditor.useInlineViewWhenSpaceIsLimited");k.updateValue("diffEditor.useInlineViewWhenSpaceIsLimited",M)}}e.ToggleUseInlineViewWhenSpaceIsLimited=r,(0,v.registerAction2)(r),v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:new r().desc.id,title:(0,_.localize)(3,null),toggled:i.ContextKeyExpr.has("config.diffEditor.useInlineViewWhenSpaceIsLimited"),precondition:i.ContextKeyExpr.has("isInDiffEditor")},order:11,group:"1_diff",when:i.ContextKeyExpr.and(m.EditorContextKeys.diffEditorRenderSideBySideInlineBreakpointReached,i.ContextKeyExpr.has("isInDiffEditor"))}),v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:new t().desc.id,title:(0,_.localize)(4,null),icon:I.Codicon.move,toggled:i.ContextKeyEqualsExpr.create("config.diffEditor.experimental.showMoves",!0),precondition:i.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"1_diff",when:i.ContextKeyExpr.has("isInDiffEditor")});const u={value:(0,_.localize)(5,null),original:"Diff Editor"};class f extends y.EditorAction2{constructor(){super({id:"diffEditor.switchSide",title:{value:(0,_.localize)(6,null),original:"Switch Side"},icon:I.Codicon.arrowSwap,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,E,k){const M=h(w);if(M instanceof S.DiffEditorWidget){if(k&&k.dryRun)return{destinationSelection:M.mapToOtherSide().destinationSelection};M.switchSide()}}}e.SwitchSide=f,(0,v.registerAction2)(f);class d extends y.EditorAction2{constructor(){super({id:"diffEditor.exitCompareMove",title:{value:(0,_.localize)(7,null),original:"Exit Compare Move"},icon:I.Codicon.close,precondition:m.EditorContextKeys.comparingMovedCode,f1:!1,category:u,keybinding:{weight:1e4,primary:9}})}runEditorCommand(w,E,...k){const M=h(w);M instanceof S.DiffEditorWidget&&M.exitCompareMove()}}e.ExitCompareMove=d,(0,v.registerAction2)(d);class l extends y.EditorAction2{constructor(){super({id:"diffEditor.collapseAllUnchangedRegions",title:{value:(0,_.localize)(8,null),original:"Collapse All Unchanged Regions"},icon:I.Codicon.fold,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,E,...k){const M=h(w);M instanceof S.DiffEditorWidget&&M.collapseAllUnchangedRegions()}}e.CollapseAllUnchangedRegions=l,(0,v.registerAction2)(l);class o extends y.EditorAction2{constructor(){super({id:"diffEditor.showAllUnchangedRegions",title:{value:(0,_.localize)(9,null),original:"Show All Unchanged Regions"},icon:I.Codicon.unfold,precondition:i.ContextKeyExpr.has("isInDiffEditor"),f1:!0,category:u})}runEditorCommand(w,E,...k){const M=h(w);M instanceof S.DiffEditorWidget&&M.showAllUnchangedRegions()}}e.ShowAllUnchangedRegions=o,(0,v.registerAction2)(o);const c={value:(0,_.localize)(10,null),original:"Accessible Diff Viewer"};class a extends v.Action2{constructor(){super({id:a.id,title:{value:(0,_.localize)(11,null),original:"Go to Next Difference"},category:c,precondition:i.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:65,weight:100},f1:!0})}run(w){const E=h(w);E?.accessibleDiffViewerNext()}}e.AccessibleDiffViewerNext=a,a.id="editor.action.accessibleDiffViewer.next",v.MenuRegistry.appendMenuItem(v.MenuId.EditorTitle,{command:{id:a.id,title:(0,_.localize)(12,null),precondition:i.ContextKeyExpr.has("isInDiffEditor")},order:10,group:"2_diff",when:i.ContextKeyExpr.and(m.EditorContextKeys.accessibleDiffViewerVisible.negate(),i.ContextKeyExpr.has("isInDiffEditor"))});class g extends v.Action2{constructor(){super({id:g.id,title:{value:(0,_.localize)(13,null),original:"Go to Previous Difference"},category:c,precondition:i.ContextKeyExpr.has("isInDiffEditor"),keybinding:{primary:1089,weight:100},f1:!0})}run(w){const E=h(w);E?.accessibleDiffViewerPrev()}}e.AccessibleDiffViewerPrev=g,g.id="editor.action.accessibleDiffViewer.prev";function h(b){var w;const E=b.get(D.ICodeEditorService),k=E.listDiffEditors(),M=(w=E.getFocusedCodeEditor())!==null&&w!==void 0?w:E.getActiveCodeEditor();if(!M)return null;for(let B=0,T=k.length;Bthis._onParentConfigurationChanged(E)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(r){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(r){L.mixin(this._overwriteOptions,r,!0),super.updateOptions(this._overwriteOptions)}};e.EmbeddedCodeEditorWidget=n,e.EmbeddedCodeEditorWidget=n=Ie([ge(4,C.IInstantiationService),ge(5,I.ICodeEditorService),ge(6,_.ICommandService),ge(7,v.IContextKeyService),ge(8,i.IThemeService),ge(9,s.INotificationService),ge(10,m.IAccessibilityService),ge(11,D.ILanguageConfigurationService),ge(12,S.ILanguageFeaturesService)],n)}),define(te[875],ie([1,0,14,2,16,12,5,24,22,49,37,634,30,31,23,441]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BracketMatchingController=void 0;const r=(0,n.registerColor)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hcDark:"#A0A0A0",hcLight:"#A0A0A0"},s.localize(0,null));class u extends y.EditorAction{constructor(){super({id:"editor.action.jumpToBracket",label:s.localize(1,null),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3165,weight:100}})}run(a,g){var h;(h=o.get(g))===null||h===void 0||h.jumpToBracket()}}class f extends y.EditorAction{constructor(){super({id:"editor.action.selectToBracket",label:s.localize(2,null),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(a,g,h){var p;let b=!0;h&&h.selectBrackets===!1&&(b=!1),(p=o.get(g))===null||p===void 0||p.selectToBracket(b)}}class d extends y.EditorAction{constructor(){super({id:"editor.action.removeBrackets",label:s.localize(3,null),alias:"Remove Brackets",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:2561,weight:100}})}run(a,g){var h;(h=o.get(g))===null||h===void 0||h.removeBrackets(this.id)}}class l{constructor(a,g,h){this.position=a,this.brackets=g,this.options=h}}class o extends I.Disposable{static get(a){return a.getContribution(o.ID)}constructor(a){super(),this._editor=a,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=this._editor.createDecorationsCollection(),this._updateBracketsSoon=this._register(new L.RunOnceScheduler(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(71),this._updateBracketsSoon.schedule(),this._register(a.onDidChangeCursorPosition(g=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(a.onDidChangeModelContent(g=>{this._updateBracketsSoon.schedule()})),this._register(a.onDidChangeModel(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(a.onDidChangeModelLanguageConfiguration(g=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(a.onDidChangeConfiguration(g=>{g.hasChanged(71)&&(this._matchBrackets=this._editor.getOption(71),this._decorations.clear(),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())})),this._register(a.onDidBlurEditorWidget(()=>{this._updateBracketsSoon.schedule()})),this._register(a.onDidFocusEditorWidget(()=>{this._updateBracketsSoon.schedule()}))}jumpToBracket(){if(!this._editor.hasModel())return;const a=this._editor.getModel(),g=this._editor.getSelections().map(h=>{const p=h.getStartPosition(),b=a.bracketPairs.matchBracket(p);let w=null;if(b)b[0].containsPosition(p)&&!b[1].containsPosition(p)?w=b[1].getStartPosition():b[1].containsPosition(p)&&(w=b[0].getStartPosition());else{const E=a.bracketPairs.findEnclosingBrackets(p);if(E)w=E[1].getStartPosition();else{const k=a.bracketPairs.findNextBracket(p);k&&k.range&&(w=k.range.getStartPosition())}}return w?new m.Selection(w.lineNumber,w.column,w.lineNumber,w.column):new m.Selection(p.lineNumber,p.column,p.lineNumber,p.column)});this._editor.setSelections(g),this._editor.revealRange(g[0])}selectToBracket(a){if(!this._editor.hasModel())return;const g=this._editor.getModel(),h=[];this._editor.getSelections().forEach(p=>{const b=p.getStartPosition();let w=g.bracketPairs.matchBracket(b);if(!w&&(w=g.bracketPairs.findEnclosingBrackets(b),!w)){const M=g.bracketPairs.findNextBracket(b);M&&M.range&&(w=g.bracketPairs.matchBracket(M.range.getStartPosition()))}let E=null,k=null;if(w){w.sort(S.Range.compareRangesUsingStarts);const[M,R]=w;if(E=a?M.getStartPosition():M.getEndPosition(),k=a?R.getEndPosition():R.getStartPosition(),R.containsPosition(b)){const B=E;E=k,k=B}}E&&k&&h.push(new m.Selection(E.lineNumber,E.column,k.lineNumber,k.column))}),h.length>0&&(this._editor.setSelections(h),this._editor.revealRange(h[0]))}removeBrackets(a){if(!this._editor.hasModel())return;const g=this._editor.getModel();this._editor.getSelections().forEach(h=>{const p=h.getPosition();let b=g.bracketPairs.matchBracket(p);b||(b=g.bracketPairs.findEnclosingBrackets(p)),b&&(this._editor.pushUndoStop(),this._editor.executeEdits(a,[{range:b[0],text:""},{range:b[1],text:""}]),this._editor.pushUndoStop())})}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();const a=[];let g=0;for(const h of this._lastBracketsData){const p=h.brackets;p&&(a[g++]={range:p[0],options:h.options},a[g++]={range:p[1],options:h.options})}this._decorations.set(a)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus()){this._lastBracketsData=[],this._lastVersionId=0;return}const a=this._editor.getSelections();if(a.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const g=this._editor.getModel(),h=g.getVersionId();let p=[];this._lastVersionId===h&&(p=this._lastBracketsData);const b=[];let w=0;for(let B=0,T=a.length;B1&&b.sort(D.Position.compare);const E=[];let k=0,M=0;const R=p.length;for(let B=0,T=b.length;Bthis.update(G))),this._lightBulbWidget=new D.Lazy(()=>{const G=this._editor.getContribution(n.LightBulbWidget.ID);return G&&this._register(G.onClick(Y=>this.showCodeActionList(Y.actions,Y,{includeDisabledActions:!1,fromLightbulb:!0}))),G}),this._resolver=A.createInstance(s.CodeActionKeybindingResolver),this._register(this._editor.onDidLayoutChange(()=>this._actionWidgetService.hide()))}dispose(){this._disposed=!0,super.dispose()}showCodeActions(B,T,N){return this.showCodeActionList(T,N,{includeDisabledActions:!1,fromLightbulb:!1})}manualTriggerAtCurrentPosition(B,T,N,A){var P;if(!this._editor.hasModel())return;(P=t.MessageController.get(this._editor))===null||P===void 0||P.closeMessage();const O=this._editor.getPosition();this._trigger({type:1,triggerAction:T,filter:N,autoApply:A,context:{notAvailableMessage:B,position:O}})}_trigger(B){return this._model.trigger(B)}_applyCodeAction(B,T,N){return be(this,void 0,void 0,function*(){try{yield this._instantiationService.invokeFunction(C.applyCodeAction,B,C.ApplyCodeActionReason.FromCodeActions,{preview:N,editor:this._editor})}finally{T&&this._trigger({type:2,triggerAction:b.CodeActionTriggerSource.QuickFix,filter:{}})}})}update(B){var T,N,A,P,O,x,W;return be(this,void 0,void 0,function*(){if(B.type!==1){(T=this._lightBulbWidget.rawValue)===null||T===void 0||T.hide();return}let U;try{U=yield B.actions}catch(F){(0,y.onUnexpectedError)(F);return}if(!this._disposed)if((N=this._lightBulbWidget.value)===null||N===void 0||N.update(U,B.trigger,B.position),B.trigger.type===1){if(!((A=B.trigger.filter)===null||A===void 0)&&A.include){const G=this.tryGetValidActionToApply(B.trigger,U);if(G){try{(P=this._lightBulbWidget.value)===null||P===void 0||P.hide(),yield this._applyCodeAction(G,!1,!1)}finally{U.dispose()}return}if(B.trigger.context){const Y=this.getInvalidActionThatWouldHaveBeenApplied(B.trigger,U);if(Y&&Y.action.disabled){(O=t.MessageController.get(this._editor))===null||O===void 0||O.showMessage(Y.action.disabled,B.trigger.context.position),U.dispose();return}}}const F=!!(!((x=B.trigger.filter)===null||x===void 0)&&x.include);if(B.trigger.context&&(!U.allActions.length||!F&&!U.validActions.length)){(W=t.MessageController.get(this._editor))===null||W===void 0||W.showMessage(B.trigger.context.notAvailableMessage,B.trigger.context.position),this._activeCodeActions.value=U,U.dispose();return}this._activeCodeActions.value=U,this.showCodeActionList(U,this.toCoords(B.position),{includeDisabledActions:F,fromLightbulb:!1})}else this._actionWidgetService.isVisible?U.dispose():this._activeCodeActions.value=U})}getInvalidActionThatWouldHaveBeenApplied(B,T){if(T.allActions.length&&(B.autoApply==="first"&&T.validActions.length===0||B.autoApply==="ifSingle"&&T.allActions.length===1))return T.allActions.find(({action:N})=>N.disabled)}tryGetValidActionToApply(B,T){if(T.validActions.length&&(B.autoApply==="first"&&T.validActions.length>0||B.autoApply==="ifSingle"&&T.validActions.length===1))return T.validActions[0]}showCodeActionList(B,T,N){return be(this,void 0,void 0,function*(){const A=this._editor.createDecorationsCollection(),P=this._editor.getDomNode();if(!P)return;const O=N.includeDisabledActions&&(this._showDisabled||B.validActions.length===0)?B.allActions:B.validActions;if(!O.length)return;const x=m.Position.isIPosition(T)?this.toCoords(T):T,W={onSelect:(U,F)=>be(this,void 0,void 0,function*(){this._applyCodeAction(U,!0,!!F),this._actionWidgetService.hide(),A.clear()}),onHide:()=>{var U;(U=this._editor)===null||U===void 0||U.focus(),A.clear()},onHover:(U,F)=>be(this,void 0,void 0,function*(){var G;if(yield U.resolve(F),!F.isCancellationRequested)return{canPreview:!!(!((G=U.action.edit)===null||G===void 0)&&G.edits.length)}}),onFocus:U=>{var F,G;if(U&&U.highlightRange&&U.action.diagnostics){const Y=[{range:U.action.diagnostics[0],options:E.DECORATION}];A.set(Y);const ne=U.action.diagnostics[0],se=(G=(F=this._editor.getModel())===null||F===void 0?void 0:F.getWordAtPosition({lineNumber:ne.startLineNumber,column:ne.startColumn}))===null||G===void 0?void 0:G.word;I.status((0,r.localize)(0,null,se,ne.startLineNumber,ne.startColumn))}else A.clear()}};this._actionWidgetService.show("codeActionWidget",!0,(0,i.toMenuItems)(O,this._shouldShowHeaders(),this._resolver.getResolver()),W,x,P,this._getActionBarActions(B,T,N))})}toCoords(B){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(B,1),this._editor.render();const T=this._editor.getScrolledVisiblePosition(B),N=(0,L.getDomNodePagePosition)(this._editor.getDomNode()),A=N.left+T.left,P=N.top+T.top+T.height;return{x:A,y:P}}_shouldShowHeaders(){var B;const T=(B=this._editor)===null||B===void 0?void 0:B.getModel();return this._configurationService.getValue("editor.codeActionWidget.showHeaders",{resource:T?.uri})}_getActionBarActions(B,T,N){if(N.fromLightbulb)return[];const A=B.documentation.map(P=>{var O;return{id:P.id,label:P.title,tooltip:(O=P.tooltip)!==null&&O!==void 0?O:"",class:void 0,enabled:!0,run:()=>{var x;return this._commandService.executeCommand(P.id,...(x=P.arguments)!==null&&x!==void 0?x:[])}}});return N.includeDisabledActions&&B.validActions.length>0&&B.allActions.length!==B.validActions.length&&A.push(this._showDisabled?{id:"hideMoreActions",label:(0,r.localize)(1,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!1,this.showCodeActionList(B,T,N))}:{id:"showMoreActions",label:(0,r.localize)(2,null),enabled:!0,tooltip:"",class:void 0,run:()=>(this._showDisabled=!0,this.showCodeActionList(B,T,N))}),A}};e.CodeActionController=M,M.ID="editor.contrib.codeActionController",M.DECORATION=_.ModelDecorationOptions.register({description:"quickfix-highlight",className:k}),e.CodeActionController=M=E=Ie([ge(1,c.IMarkerService),ge(2,l.IContextKeyService),ge(3,o.IInstantiationService),ge(4,v.ILanguageFeaturesService),ge(5,a.IEditorProgressService),ge(6,f.ICommandService),ge(7,d.IConfigurationService),ge(8,u.IActionWidgetService),ge(9,o.IInstantiationService)],M),(0,p.registerThemingParticipant)((R,B)=>{((A,P)=>{P&&B.addRule(`.monaco-editor ${A} { background-color: ${P}; }`)})(".quickfix-edit-highlight",R.getColor(g.editorFindMatchHighlight));const N=R.getColor(g.editorFindMatchHighlightBorder);N&&B.addRule(`.monaco-editor .quickfix-edit-highlight { border: 1px ${(0,h.isHighContrast)(R.type)?"dotted":"solid"} ${N}; box-sizing: border-box; }`)})}),define(te[876],ie([1,0,10,16,22,135,639,15,112,252,353]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutoFixAction=e.FixAllAction=e.OrganizeImportsAction=e.SourceAction=e.RefactorAction=e.CodeActionCommand=e.QuickFixAction=void 0;function s(c){return m.ContextKeyExpr.regex(C.SUPPORTED_CODE_ACTIONS.keys()[0],new RegExp("(\\s|^)"+(0,L.escapeRegExpCharacters)(c.value)+"\\b"))}const i={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:S.localize(0,null)},apply:{type:"string",description:S.localize(1,null),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[S.localize(2,null),S.localize(3,null),S.localize(4,null)]},preferred:{type:"boolean",default:!1,description:S.localize(5,null)}}};function n(c,a,g,h,p=_.CodeActionTriggerSource.Default){if(c.hasModel()){const b=v.CodeActionController.get(c);b?.manualTriggerAtCurrentPosition(a,p,g,h)}}class t extends I.EditorAction{constructor(){super({id:D.quickFixCommandId,label:S.localize(6,null),alias:"Quick Fix...",precondition:m.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:2137,weight:100}})}run(a,g){return n(g,S.localize(7,null),void 0,void 0,_.CodeActionTriggerSource.QuickFix)}}e.QuickFixAction=t;class r extends I.EditorCommand{constructor(){super({id:D.codeActionCommandId,precondition:m.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:i}]}})}runEditorCommand(a,g,h){const p=_.CodeActionCommandArgs.fromUser(h,{kind:_.CodeActionKind.Empty,apply:"ifSingle"});return n(g,typeof h?.kind=="string"?p.preferred?S.localize(8,null,h.kind):S.localize(9,null,h.kind):p.preferred?S.localize(10,null):S.localize(11,null),{include:p.kind,includeSourceActions:!0,onlyIncludePreferredActions:p.preferred},p.apply)}}e.CodeActionCommand=r;class u extends I.EditorAction{constructor(){super({id:D.refactorCommandId,label:S.localize(12,null),alias:"Refactor...",precondition:m.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:m.ContextKeyExpr.and(y.EditorContextKeys.writable,s(_.CodeActionKind.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:i}]}})}run(a,g,h){const p=_.CodeActionCommandArgs.fromUser(h,{kind:_.CodeActionKind.Refactor,apply:"never"});return n(g,typeof h?.kind=="string"?p.preferred?S.localize(13,null,h.kind):S.localize(14,null,h.kind):p.preferred?S.localize(15,null):S.localize(16,null),{include:_.CodeActionKind.Refactor.contains(p.kind)?p.kind:_.CodeActionKind.None,onlyIncludePreferredActions:p.preferred},p.apply,_.CodeActionTriggerSource.Refactor)}}e.RefactorAction=u;class f extends I.EditorAction{constructor(){super({id:D.sourceActionCommandId,label:S.localize(17,null),alias:"Source Action...",precondition:m.ContextKeyExpr.and(y.EditorContextKeys.writable,y.EditorContextKeys.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:m.ContextKeyExpr.and(y.EditorContextKeys.writable,s(_.CodeActionKind.Source))},description:{description:"Source Action...",args:[{name:"args",schema:i}]}})}run(a,g,h){const p=_.CodeActionCommandArgs.fromUser(h,{kind:_.CodeActionKind.Source,apply:"never"});return n(g,typeof h?.kind=="string"?p.preferred?S.localize(18,null,h.kind):S.localize(19,null,h.kind):p.preferred?S.localize(20,null):S.localize(21,null),{include:_.CodeActionKind.Source.contains(p.kind)?p.kind:_.CodeActionKind.None,includeSourceActions:!0,onlyIncludePreferredActions:p.preferred},p.apply,_.CodeActionTriggerSource.SourceAction)}}e.SourceAction=f;class d extends I.EditorAction{constructor(){super({id:D.organizeImportsCommandId,label:S.localize(22,null),alias:"Organize Imports",precondition:m.ContextKeyExpr.and(y.EditorContextKeys.writable,s(_.CodeActionKind.SourceOrganizeImports)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1581,weight:100}})}run(a,g){return n(g,S.localize(23,null),{include:_.CodeActionKind.SourceOrganizeImports,includeSourceActions:!0},"ifSingle",_.CodeActionTriggerSource.OrganizeImports)}}e.OrganizeImportsAction=d;class l extends I.EditorAction{constructor(){super({id:D.fixAllCommandId,label:S.localize(24,null),alias:"Fix All",precondition:m.ContextKeyExpr.and(y.EditorContextKeys.writable,s(_.CodeActionKind.SourceFixAll))})}run(a,g){return n(g,S.localize(25,null),{include:_.CodeActionKind.SourceFixAll,includeSourceActions:!0},"ifSingle",_.CodeActionTriggerSource.FixAll)}}e.FixAllAction=l;class o extends I.EditorAction{constructor(){super({id:D.autoFixCommandId,label:S.localize(26,null),alias:"Auto Fix...",precondition:m.ContextKeyExpr.and(y.EditorContextKeys.writable,s(_.CodeActionKind.QuickFix)),kbOpts:{kbExpr:y.EditorContextKeys.textInputFocus,primary:1625,mac:{primary:2649},weight:100}})}run(a,g){return n(g,S.localize(27,null),{include:_.CodeActionKind.QuickFix,onlyIncludePreferredActions:!0},"ifSingle",_.CodeActionTriggerSource.AutoFix)}}e.AutoFixAction=o}),define(te[877],ie([1,0,16,240,876,252,354,640,95,35]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(D.CodeActionController.ID,D.CodeActionController,3),(0,L.registerEditorContribution)(S.LightBulbWidget.ID,S.LightBulbWidget,4),(0,L.registerEditorAction)(y.QuickFixAction),(0,L.registerEditorAction)(y.RefactorAction),(0,L.registerEditorAction)(y.SourceAction),(0,L.registerEditorAction)(y.OrganizeImportsAction),(0,L.registerEditorAction)(y.AutoFixAction),(0,L.registerEditorAction)(y.FixAllAction),(0,L.registerEditorCommand)(new y.CodeActionCommand),v.Registry.as(_.Extensions.Configuration).registerConfiguration(Object.assign(Object.assign({},I.editorConfigurationBaseNode),{properties:{"editor.codeActionWidget.showHeaders":{type:"boolean",scope:5,description:m.localize(0,null),default:!0}}})),v.Registry.as(_.Extensions.Configuration).registerConfiguration(Object.assign(Object.assign({},I.editorConfigurationBaseNode),{properties:{"editor.codeActionWidget.includeNearbyQuickfixes":{type:"boolean",scope:5,description:m.localize(1,null),default:!1}}}))}),define(te[878],ie([1,0,7,128,5,37,443]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CodeLensWidget=e.CodeLensHelper=void 0;class S{constructor(i,n,t){this.afterColumn=1073741824,this.afterLineNumber=i,this.heightInPx=n,this._onHeight=t,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(i){this._lastHeight===void 0?this._lastHeight=i:this._lastHeight!==i&&(this._lastHeight=i,this._onHeight())}isVisible(){return this._lastHeight!==0&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class m{constructor(i,n){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=i,this._id=`codelens.widget-${m._idPool++}`,this.updatePosition(n),this._domNode=document.createElement("span"),this._domNode.className="codelens-decoration"}withCommands(i,n){this._commands.clear();const t=[];let r=!1;for(let u=0;u{o.symbol.command&&l.push(o.symbol),t.addDecoration({range:o.symbol.range,options:v},a=>this._decorationIds[c]=a),d?d=y.Range.plusRange(d,o.symbol.range):d=y.Range.lift(o.symbol.range)}),this._viewZone=new S(d.startLineNumber-1,u,f),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new m(this._editor,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(i,n){this._decorationIds.forEach(i.removeDecoration,i),this._decorationIds=[],n?.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some((i,n)=>{const t=this._editor.getModel().getDecorationRange(i),r=this._data[n].symbol;return!!(t&&y.Range.isEmpty(r.range)===t.isEmpty())})}updateCodeLensSymbols(i,n){this._decorationIds.forEach(n.removeDecoration,n),this._decorationIds=[],this._data=i,this._data.forEach((t,r)=>{n.addDecoration({range:t.symbol.range,options:v},u=>this._decorationIds[r]=u)})}updateHeight(i,n){this._viewZone.heightInPx=i,n.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(i){if(!this._viewZone.isVisible())return null;for(let n=0;nthis._resolveCodeLensesInViewport(),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(b=>{(b.hasChanged(50)||b.hasChanged(19)||b.hasChanged(18))&&this._updateLensStyle(),b.hasChanged(17)&&this._onModelChange()})),this._disposables.add(c.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._updateLensStyle()}dispose(){var o;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(o=this._currentCodeLensModel)===null||o===void 0||o.dispose()}_getLayoutInfo(){const o=Math.max(1.3,this._editor.getOption(66)/this._editor.getOption(52));let c=this._editor.getOption(19);return(!c||c<5)&&(c=this._editor.getOption(52)*.9|0),{fontSize:c,codeLensHeight:c*o|0}}_updateLensStyle(){const{codeLensHeight:o,fontSize:c}=this._getLayoutInfo(),a=this._editor.getOption(18),g=this._editor.getOption(50),{style:h}=this._editor.getContainerDomNode();h.setProperty("--vscode-editorCodeLens-lineHeight",`${o}px`),h.setProperty("--vscode-editorCodeLens-fontSize",`${c}px`),h.setProperty("--vscode-editorCodeLens-fontFeatureSettings",g.fontFeatureSettings),a&&(h.setProperty("--vscode-editorCodeLens-fontFamily",a),h.setProperty("--vscode-editorCodeLens-fontFamilyDefault",m.EDITOR_FONT_DEFAULTS.fontFamily)),this._editor.changeViewZones(p=>{for(const b of this._lenses)b.updateHeight(o,p)})}_localDispose(){var o,c,a;(o=this._getCodeLensModelPromise)===null||o===void 0||o.cancel(),this._getCodeLensModelPromise=void 0,(c=this._resolveCodeLensesPromise)===null||c===void 0||c.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(a=this._currentCodeLensModel)===null||a===void 0||a.dispose()}_onModelChange(){this._localDispose();const o=this._editor.getModel();if(!o||!this._editor.getOption(17)||o.isTooLargeForTokenization())return;const c=this._codeLensCache.get(o);if(c&&this._renderCodeLensSymbols(c),!this._languageFeaturesService.codeLensProvider.has(o)){c&&this._localToDispose.add((0,L.disposableTimeout)(()=>{const g=this._codeLensCache.get(o);c===g&&(this._codeLensCache.delete(o),this._onModelChange())},30*1e3));return}for(const g of this._languageFeaturesService.codeLensProvider.all(o))if(typeof g.onDidChange=="function"){const h=g.onDidChange(()=>a.schedule());this._localToDispose.add(h)}const a=new L.RunOnceScheduler(()=>{var g;const h=Date.now();(g=this._getCodeLensModelPromise)===null||g===void 0||g.cancel(),this._getCodeLensModelPromise=(0,L.createCancelablePromise)(p=>(0,v.getCodeLensModel)(this._languageFeaturesService.codeLensProvider,o,p)),this._getCodeLensModelPromise.then(p=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=p,this._codeLensCache.put(o,p);const b=this._provideCodeLensDebounce.update(o,Date.now()-h);a.delay=b,this._renderCodeLensSymbols(p),this._resolveCodeLensesInViewportSoon()},I.onUnexpectedError)},this._provideCodeLensDebounce.get(o));this._localToDispose.add(a),this._localToDispose.add((0,y.toDisposable)(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{var g;this._editor.changeDecorations(h=>{this._editor.changeViewZones(p=>{const b=[];let w=-1;this._lenses.forEach(k=>{!k.isValid()||w===k.getLineNumber()?b.push(k):(k.update(p),w=k.getLineNumber())});const E=new s.CodeLensHelper;b.forEach(k=>{k.dispose(E,p),this._lenses.splice(this._lenses.indexOf(k),1)}),E.commit(h)})}),a.schedule(),this._resolveCodeLensesScheduler.cancel(),(g=this._resolveCodeLensesPromise)===null||g===void 0||g.cancel(),this._resolveCodeLensesPromise=void 0})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{a.schedule()})),this._localToDispose.add(this._editor.onDidBlurEditorText(()=>{a.cancel()})),this._localToDispose.add(this._editor.onDidScrollChange(g=>{g.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add((0,y.toDisposable)(()=>{if(this._editor.getModel()){const g=D.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(h=>{this._editor.changeViewZones(p=>{this._disposeAllLenses(h,p)})}),g.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(g=>{if(g.target.type!==9)return;let h=g.target.element;if(h?.tagName==="SPAN"&&(h=h.parentElement),h?.tagName==="A")for(const p of this._lenses){const b=p.getCommand(h);if(b){this._commandService.executeCommand(b.id,...b.arguments||[]).catch(w=>this._notificationService.error(w));break}}})),a.schedule()}_disposeAllLenses(o,c){const a=new s.CodeLensHelper;for(const g of this._lenses)g.dispose(a,c);o&&a.commit(o),this._lenses.length=0}_renderCodeLensSymbols(o){if(!this._editor.hasModel())return;const c=this._editor.getModel().getLineCount(),a=[];let g;for(const b of o.lenses){const w=b.symbol.range.startLineNumber;w<1||w>c||(g&&g[g.length-1].symbol.range.startLineNumber===w?g.push(b):(g=[b],a.push(g)))}if(!a.length&&!this._lenses.length)return;const h=D.StableEditorScrollState.capture(this._editor),p=this._getLayoutInfo();this._editor.changeDecorations(b=>{this._editor.changeViewZones(w=>{const E=new s.CodeLensHelper;let k=0,M=0;for(;Mthis._resolveCodeLensesInViewportSoon())),k++,M++)}for(;kthis._resolveCodeLensesInViewportSoon())),M++;E.commit(b)})}),h.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var o;(o=this._resolveCodeLensesPromise)===null||o===void 0||o.cancel(),this._resolveCodeLensesPromise=void 0;const c=this._editor.getModel();if(!c)return;const a=[],g=[];if(this._lenses.forEach(b=>{const w=b.computeIfNecessary(c);w&&(a.push(w),g.push(b))}),a.length===0)return;const h=Date.now(),p=(0,L.createCancelablePromise)(b=>{const w=a.map((E,k)=>{const M=new Array(E.length),R=E.map((B,T)=>!B.symbol.command&&typeof B.provider.resolveCodeLens=="function"?Promise.resolve(B.provider.resolveCodeLens(c,B.symbol,b)).then(N=>{M[T]=N},I.onUnexpectedExternalError):(M[T]=B.symbol,Promise.resolve(void 0)));return Promise.all(R).then(()=>{!b.isCancellationRequested&&!g[k].isDisposed()&&g[k].updateCommands(M)})});return Promise.all(w)});this._resolveCodeLensesPromise=p,this._resolveCodeLensesPromise.then(()=>{const b=this._resolveCodeLensesDebounce.update(c,Date.now()-h);this._resolveCodeLensesScheduler.delay=b,this._currentCodeLensModel&&this._codeLensCache.put(c,this._currentCodeLensModel),this._oldCodeLensModels.clear(),p===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},b=>{(0,I.onUnexpectedError)(b),p===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getModel(){var o;return be(this,void 0,void 0,function*(){return yield this._getCodeLensModelPromise,yield this._resolveCodeLensesPromise,!((o=this._currentCodeLensModel)===null||o===void 0)&&o.isDisposed?void 0:this._currentCodeLensModel})}};e.CodeLensContribution=d,d.ID="css.editor.codeLens",e.CodeLensContribution=d=Ie([ge(1,f.ILanguageFeaturesService),ge(2,u.ILanguageFeatureDebounceService),ge(3,n.ICommandService),ge(4,t.INotificationService),ge(5,C.ICodeLensCache)],d),(0,S.registerEditorContribution)(d.ID,d,1),(0,S.registerEditorAction)(class extends S.EditorAction{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:_.EditorContextKeys.hasCodeLensProvider,label:(0,i.localize)(0,null),alias:"Show CodeLens Commands For Current Line"})}run(o,c){return be(this,void 0,void 0,function*(){if(!c.hasModel())return;const a=o.get(r.IQuickInputService),g=o.get(n.ICommandService),h=o.get(t.INotificationService),p=c.getSelection().positionLineNumber,b=c.getContribution(d.ID);if(!b)return;const w=yield b.getModel();if(!w)return;const E=[];for(const R of w.lenses)R.symbol.command&&R.symbol.range.startLineNumber===p&&E.push({label:R.symbol.command.title,command:R.symbol.command});if(E.length===0)return;const k=yield a.pick(E,{canPickMany:!1,placeHolder:(0,i.localize)(1,null)});if(!k)return;let M=k.command;if(w.isDisposed){const R=yield b.getModel(),B=R?.lenses.find(T=>{var N;return T.symbol.range.startLineNumber===p&&((N=T.symbol.command)===null||N===void 0?void 0:N.title)===M.title});if(!B||!B.symbol.command)return;M=B.symbol.command}try{yield g.executeCommand(M.id,...M.arguments||[])}catch(R){h.error(R)}})}})}),define(te[367],ie([1,0,14,36,9,6,2,59,10,159,16,5,37,74,18,347,28]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";var f;Object.defineProperty(e,"__esModule",{value:!0}),e.DecoratorLimitReporter=e.ColorDetector=e.ColorDecorationInjectedTextMarker=void 0,e.ColorDecorationInjectedTextMarker=Object.create({});let d=f=class extends S.Disposable{constructor(c,a,g,h){super(),this._editor=c,this._configurationService=a,this._languageFeaturesService=g,this._localToDispose=this._register(new S.DisposableStore),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=this._editor.createDecorationsCollection(),this._ruleFactory=new v.DynamicCssRules(this._editor),this._decoratorLimitReporter=new l,this._colorDecorationClassRefs=this._register(new S.DisposableStore),this._debounceInformation=h.for(g.colorProvider,"Document Colors",{min:f.RECOMPUTE_TIME}),this._register(c.onDidChangeModel(()=>{this._isColorDecoratorsEnabled=this.isEnabled(),this.updateColors()})),this._register(c.onDidChangeModelLanguage(()=>this.updateColors())),this._register(g.colorProvider.onDidChange(()=>this.updateColors())),this._register(c.onDidChangeConfiguration(p=>{const b=this._isColorDecoratorsEnabled;this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145);const w=b!==this._isColorDecoratorsEnabled||p.hasChanged(21),E=p.hasChanged(145);(w||E)&&(this._isColorDecoratorsEnabled?this.updateColors():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isColorDecoratorsEnabled=this.isEnabled(),this._isDefaultColorDecoratorsEnabled=this._editor.getOption(145),this.updateColors()}isEnabled(){const c=this._editor.getModel();if(!c)return!1;const a=c.getLanguageId(),g=this._configurationService.getValue(a);if(g&&typeof g=="object"){const h=g.colorDecorators;if(h&&h.enable!==void 0&&!h.enable)return h.enable}return this._editor.getOption(20)}static get(c){return c.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}updateColors(){if(this.stop(),!this._isColorDecoratorsEnabled)return;const c=this._editor.getModel();!c||!this._languageFeaturesService.colorProvider.has(c)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new L.TimeoutTimer,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},this._debounceInformation.get(c)))})),this.beginCompute())}beginCompute(){return be(this,void 0,void 0,function*(){this._computePromise=(0,L.createCancelablePromise)(c=>be(this,void 0,void 0,function*(){const a=this._editor.getModel();if(!a)return[];const g=new m.StopWatch(!1),h=yield(0,r.getColors)(this._languageFeaturesService.colorProvider,a,c,this._isDefaultColorDecoratorsEnabled);return this._debounceInformation.update(a,g.elapsed()),h}));try{const c=yield this._computePromise;this.updateDecorations(c),this.updateColorDecorators(c),this._computePromise=null}catch(c){(0,y.onUnexpectedError)(c)}})}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(c){const a=c.map(g=>({range:{startLineNumber:g.colorInfo.range.startLineNumber,startColumn:g.colorInfo.range.startColumn,endLineNumber:g.colorInfo.range.endLineNumber,endColumn:g.colorInfo.range.endColumn},options:i.ModelDecorationOptions.EMPTY}));this._editor.changeDecorations(g=>{this._decorationsIds=g.deltaDecorations(this._decorationsIds,a),this._colorDatas=new Map,this._decorationsIds.forEach((h,p)=>this._colorDatas.set(h,c[p]))})}updateColorDecorators(c){this._colorDecorationClassRefs.clear();const a=[],g=this._editor.getOption(21);for(let p=0;pthis._colorDatas.has(h.id));return g.length===0?null:this._colorDatas.get(g[0].id)}isColorDecoration(c){return this._colorDecoratorIds.has(c)}};e.ColorDetector=d,d.ID="editor.contrib.colorDetector",d.RECOMPUTE_TIME=1e3,e.ColorDetector=d=f=Ie([ge(1,u.IConfigurationService),ge(2,t.ILanguageFeaturesService),ge(3,n.ILanguageFeatureDebounceService)],d);class l{constructor(){this._onDidChange=new D.Emitter,this._computed=0,this._limited=!1}update(c,a){(c!==this._computed||a!==this._limited)&&(this._computed=c,this._limited=a,this._onDidChange.fire())}}e.DecoratorLimitReporter=l,(0,C.registerEditorContribution)(d.ID,d,1)}),define(te[368],ie([1,0,14,19,36,2,5,347,367,541,830,23,7]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerParticipant=e.StandaloneColorPickerHover=e.ColorHoverParticipant=e.ColorHover=void 0;class n{constructor(a,g,h,p){this.owner=a,this.range=g,this.model=h,this.provider=p,this.forceShowAtRange=!0}isValidForHoverAnchor(a){return a.type===1&&this.range.startColumn<=a.range.startColumn&&this.range.endColumn>=a.range.endColumn}}e.ColorHover=n;let t=class{constructor(a,g){this._editor=a,this._themeService=g,this.hoverOrdinal=2}computeSync(a,g){return[]}computeAsync(a,g,h){return L.AsyncIterableObject.fromPromise(this._computeAsync(a,g,h))}_computeAsync(a,g,h){return be(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const p=_.ColorDetector.get(this._editor);if(!p)return[];for(const b of g){if(!p.isColorDecoration(b))continue;const w=p.getColorData(b.range.getStartPosition());if(w)return[yield f(this,this._editor.getModel(),w.colorInfo,w.provider)]}return[]})}renderHoverParts(a,g){return d(this,this._editor,this._themeService,g,a)}};e.ColorHoverParticipant=t,e.ColorHoverParticipant=t=Ie([ge(1,s.IThemeService)],t);class r{constructor(a,g,h,p){this.owner=a,this.range=g,this.model=h,this.provider=p}}e.StandaloneColorPickerHover=r;let u=class{constructor(a,g){this._editor=a,this._themeService=g,this._color=null}createColorHover(a,g,h){return be(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!_.ColorDetector.get(this._editor))return null;const b=yield(0,m.getColors)(h,this._editor.getModel(),I.CancellationToken.None);let w=null,E=null;for(const B of b){const T=B.colorInfo;S.Range.containsRange(T.range,a.range)&&(w=T,E=B.provider)}const k=w??a,M=E??g,R=!!w;return{colorHover:yield f(this,this._editor.getModel(),k,M),foundInEditor:R}})}updateEditorModel(a){return be(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const g=a.model;let h=new S.Range(a.range.startLineNumber,a.range.startColumn,a.range.endLineNumber,a.range.endColumn);this._color&&(yield o(this._editor.getModel(),g,this._color,h,a),h=l(this._editor,h,g))})}renderHoverParts(a,g){return d(this,this._editor,this._themeService,g,a)}set color(a){this._color=a}get color(){return this._color}};e.StandaloneColorPickerParticipant=u,e.StandaloneColorPickerParticipant=u=Ie([ge(1,s.IThemeService)],u);function f(c,a,g,h){return be(this,void 0,void 0,function*(){const p=a.getValueInRange(g.range),{red:b,green:w,blue:E,alpha:k}=g.color,M=new y.RGBA(Math.round(b*255),Math.round(w*255),Math.round(E*255),k),R=new y.Color(M),B=yield(0,m.getColorPresentations)(a,g,h,I.CancellationToken.None),T=new v.ColorPickerModel(R,[],0);return T.colorPresentations=B||[],T.guessColorPresentation(R,p),c instanceof t?new n(c,S.Range.lift(g.range),T,h):new r(c,S.Range.lift(g.range),T,h)})}function d(c,a,g,h,p){if(h.length===0||!a.hasModel())return D.Disposable.None;if(p.setMinimumDimensions){const T=a.getOption(66)+8;p.setMinimumDimensions(new i.Dimension(302,T))}const b=new D.DisposableStore,w=h[0],E=a.getModel(),k=w.model,M=b.add(new C.ColorPickerWidget(p.fragment,k,a.getOption(141),g,c instanceof u));p.setColorPicker(M);let R=!1,B=new S.Range(w.range.startLineNumber,w.range.startColumn,w.range.endLineNumber,w.range.endColumn);if(c instanceof u){const T=h[0].model.color;c.color=T,o(E,k,T,B,w),b.add(k.onColorFlushed(N=>{c.color=N}))}else b.add(k.onColorFlushed(T=>be(this,void 0,void 0,function*(){yield o(E,k,T,B,w),R=!0,B=l(a,B,k,p)})));return b.add(k.onDidChangeColor(T=>{o(E,k,T,B,w)})),b.add(a.onDidChangeModelContent(T=>{R?R=!1:(p.hide(),a.focus())})),b}function l(c,a,g,h){let p,b;if(g.presentation.textEdit){p=[g.presentation.textEdit],b=new S.Range(g.presentation.textEdit.range.startLineNumber,g.presentation.textEdit.range.startColumn,g.presentation.textEdit.range.endLineNumber,g.presentation.textEdit.range.endColumn);const w=c.getModel()._setTrackedRange(null,b,3);c.pushUndoStop(),c.executeEdits("colorpicker",p),b=c.getModel()._getTrackedRange(w)||b}else p=[{range:a,text:g.presentation.label,forceMoveMarkers:!1}],b=a.setEndPosition(a.endLineNumber,a.startColumn+g.presentation.label.length),c.pushUndoStop(),c.executeEdits("colorpicker",p);return g.presentation.additionalTextEdits&&(p=[...g.presentation.additionalTextEdits],c.executeEdits("colorpicker",p),h&&h.hide()),c.pushUndoStop(),b}function o(c,a,g,h,p){return be(this,void 0,void 0,function*(){const b=yield(0,m.getColorPresentations)(c,{range:h,color:{red:g.rgba.r/255,green:g.rgba.g/255,blue:g.rgba.b/255,alpha:g.rgba.a}},p.provider,I.CancellationToken.None);a.colorPresentations=b||[]})}}),define(te[880],ie([1,0,2,17,16,12,5,24,37,543,444]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DragAndDropController=void 0;function C(i){return I.isMacintosh?i.altKey:i.ctrlKey}class s extends L.Disposable{constructor(n){super(),this._editor=n,this._dndDecorationIds=this._editor.createDecorationsCollection(),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(n){!this._editor.getOption(35)||this._editor.getOption(22)||(C(n)&&(this._modifierPressed=!0),this._mouseDown&&C(n)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(n){!this._editor.getOption(35)||this._editor.getOption(22)||(C(n)&&(this._modifierPressed=!1),this._mouseDown&&n.keyCode===s.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(n){this._mouseDown=!0}_onEditorMouseUp(n){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(n){const t=n.target;if(this._dragSelection===null){const u=(this._editor.getSelections()||[]).filter(f=>t.position&&f.containsPosition(t.position));if(u.length===1)this._dragSelection=u[0];else return}C(n.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(n){if(n.target&&(this._hitContent(n.target)||this._hitMargin(n.target))&&n.target.position){const t=new D.Position(n.target.position.lineNumber,n.target.position.column);if(this._dragSelection===null){let r=null;if(n.event.shiftKey){const u=this._editor.getSelection();if(u){const{selectionStartLineNumber:f,selectionStartColumn:d}=u;r=[new m.Selection(f,d,t.lineNumber,t.column)]}}else r=(this._editor.getSelections()||[]).map(u=>u.containsPosition(t)?new m.Selection(t.lineNumber,t.column,t.lineNumber,t.column):u);this._editor.setSelections(r||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(C(n.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(s.ID,new v.DragAndDropCommand(this._dragSelection,t,C(n.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(n){this._dndDecorationIds.set([{range:new S.Range(n.lineNumber,n.column,n.lineNumber,n.column),options:s._DECORATION_OPTIONS}]),this._editor.revealPosition(n,1)}_removeDecoration(){this._dndDecorationIds.clear()}_hitContent(n){return n.type===6||n.type===7}_hitMargin(n){return n.type===2||n.type===3||n.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}e.DragAndDropController=s,s.ID="editor.contrib.dragAndDrop",s.TRIGGER_KEY_VALUE=I.isMacintosh?6:5,s._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"dnd-target",className:"dnd-target"}),(0,y.registerEditorContribution)(s.ID,s,2)}),define(te[881],ie([1,0,5,49,37,31,23]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindDecorations=void 0;class m{constructor(v){this._editor=v,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.removeDecorations(this._allDecorations()),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const v=this._findScopeDecorationIds.map(C=>this._editor.getModel().getDecorationRange(C)).filter(C=>!!C);if(v.length)return v}return null}getStartPosition(){return this._startPosition}setStartPosition(v){this._startPosition=v,this.setCurrentFindMatch(null)}_getDecorationIndex(v){const C=this._decorations.indexOf(v);return C>=0?C+1:1}getDecorationRangeAt(v){const C=v{if(this._highlightedDecorationId!==null&&(i.changeDecorationOptions(this._highlightedDecorationId,m._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),C!==null&&(this._highlightedDecorationId=C,i.changeDecorationOptions(this._highlightedDecorationId,m._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),C!==null){let n=this._editor.getModel().getDecorationRange(C);if(n.startLineNumber!==n.endLineNumber&&n.endColumn===1){const t=n.endLineNumber-1,r=this._editor.getModel().getLineMaxColumn(t);n=new L.Range(n.startLineNumber,n.startColumn,t,r)}this._rangeHighlightDecorationId=i.addDecoration(n,m._RANGE_HIGHLIGHT_DECORATION)}}),s}set(v,C){this._editor.changeDecorations(s=>{let i=m._FIND_MATCH_DECORATION;const n=[];if(v.length>1e3){i=m._FIND_MATCH_NO_OVERVIEW_DECORATION;const r=this._editor.getModel().getLineCount(),f=this._editor.getLayoutInfo().height/r,d=Math.max(2,Math.ceil(3/f));let l=v[0].range.startLineNumber,o=v[0].range.endLineNumber;for(let c=1,a=v.length;c=g.startLineNumber?g.endLineNumber>o&&(o=g.endLineNumber):(n.push({range:new L.Range(l,1,o,1),options:m._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),l=g.startLineNumber,o=g.endLineNumber)}n.push({range:new L.Range(l,1,o,1),options:m._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}const t=new Array(v.length);for(let r=0,u=v.length;rs.removeDecoration(r)),this._findScopeDecorationIds=[]),C?.length&&(this._findScopeDecorationIds=C.map(r=>s.addDecoration(r,m._FIND_SCOPE_DECORATION)))})}matchBeforePosition(v){if(this._decorations.length===0)return null;for(let C=this._decorations.length-1;C>=0;C--){const s=this._decorations[C],i=this._editor.getModel().getDecorationRange(s);if(!(!i||i.endLineNumber>v.lineNumber)){if(i.endLineNumberv.column))return i}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(v){if(this._decorations.length===0)return null;for(let C=0,s=this._decorations.length;Cv.lineNumber)return n;if(!(n.startColumnthis.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(l=>{(l.reason===3||l.reason===5||l.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(l=>{this._ignoreModelContentChanged||(l.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(l=>this._onStateChanged(l))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,y.dispose)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(f){this._isDisposed||this._editor.hasModel()&&(f.searchString||f.isReplaceRevealed||f.isRegex||f.wholeWord||f.matchCase||f.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet(()=>{f.searchScope?this.research(f.moveCursor,this._state.searchScope):this.research(f.moveCursor)},t)):f.searchScope?this.research(f.moveCursor,this._state.searchScope):this.research(f.moveCursor))}static _getSearchRange(f,d){return d||f.getFullModelRange()}research(f,d){let l=null;typeof d<"u"?d!==null&&(Array.isArray(d)?l=d:l=[d]):l=this._decorations.getFindScopes(),l!==null&&(l=l.map(g=>{if(g.startLineNumber!==g.endLineNumber){let h=g.endLineNumber;return g.endColumn===1&&(h=h-1),new m.Range(g.startLineNumber,1,h,this._editor.getModel().getLineMaxColumn(h))}return g}));const o=this._findMatches(l,!1,e.MATCHES_LIMIT);this._decorations.set(o,l);const c=this._editor.getSelection();let a=this._decorations.getCurrentMatchesPosition(c);if(a===0&&o.length>0){const g=(0,L.findFirstIdxMonotonousOrArrLen)(o.map(h=>h.range),h=>m.Range.compareRangesUsingStarts(h,c)>=0);a=g>0?g-1+1:a}this._state.changeMatchInfo(a,this._decorations.getCount(),void 0),f&&this._editor.getOption(41).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){const f=this._decorations.getFindScope();return f&&this._editor.revealRangeInCenterIfOutsideViewport(f,0),!0}return!1}_setCurrentFindMatch(f){const d=this._decorations.setCurrentFindMatch(f);this._state.changeMatchInfo(d,this._decorations.getCount(),f),this._editor.setSelection(f),this._editor.revealRangeInCenterIfOutsideViewport(f,0)}_prevSearchPosition(f){const d=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:l,column:o}=f;const c=this._editor.getModel();return d||o===1?(l===1?l=c.getLineCount():l--,o=c.getLineMaxColumn(l)):o--,new S.Position(l,o)}_moveToPrevMatch(f,d=!1){if(!this._state.canNavigateBack()){const b=this._decorations.matchAfterPosition(f);b&&this._setCurrentFindMatch(b);return}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0);let{lineNumber:l,column:o}=f;const c=this._editor.getModel();return d||o===c.getLineMaxColumn(l)?(l===c.getLineCount()?l=1:l++,o=1):o++,new S.Position(l,o)}_moveToNextMatch(f){if(!this._state.canNavigateForward()){const l=this._decorations.matchBeforePosition(f);l&&this._setCurrentFindMatch(l);return}if(this._decorations.getCount()r._getSearchRange(this._editor.getModel(),c));return this._editor.getModel().findMatches(this._state.searchString,o,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null,d,l)}replaceAll(){if(!this._hasMatches())return;const f=this._decorations.getFindScopes();f===null&&this._state.matchesCount>=e.MATCHES_LIMIT?this._largeReplaceAll():this._regularReplaceAll(f),this.research(!1)}_largeReplaceAll(){const d=new v.SearchParams(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(129):null).parseSearchRequest();if(!d)return;let l=d.regex;if(!l.multiline){let w="mu";l.ignoreCase&&(w+="i"),l.global&&(w+="g"),l=new RegExp(l.source,w)}const o=this._editor.getModel(),c=o.getValue(1),a=o.getFullModelRange(),g=this._getReplacePattern();let h;const p=this._state.preserveCase;g.hasReplacementPatterns||p?h=c.replace(l,function(){return g.buildReplaceString(arguments,p)}):h=c.replace(l,g.buildReplaceString(null,p));const b=new D.ReplaceCommandThatPreservesSelection(a,h,this._editor.getSelection());this._executeEditorCommand("replaceAll",b)}_regularReplaceAll(f){const d=this._getReplacePattern(),l=this._findMatches(f,d.hasReplacementPatterns||this._state.preserveCase,1073741824),o=[];for(let a=0,g=l.length;aa.range),o);this._executeEditorCommand("replaceAll",c)}selectAllMatches(){if(!this._hasMatches())return;const f=this._decorations.getFindScopes();let l=this._findMatches(f,!1,1073741824).map(c=>new _.Selection(c.range.startLineNumber,c.range.startColumn,c.range.endLineNumber,c.range.endColumn));const o=this._editor.getSelection();for(let c=0,a=l.length;cthis._hide(),2e3)),this._isVisible=!1,this._editor=C,this._state=s,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.style.zIndex="12",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const n={inputActiveOptionBorder:(0,m.asCssVariable)(m.inputActiveOptionBorder),inputActiveOptionForeground:(0,m.asCssVariable)(m.inputActiveOptionForeground),inputActiveOptionBackground:(0,m.asCssVariable)(m.inputActiveOptionBackground)};this.caseSensitive=this._register(new I.CaseSensitiveToggle(Object.assign({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase},n))),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new I.WholeWordsToggle(Object.assign({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleWholeWordCommand),isChecked:this._state.wholeWord},n))),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new I.RegexToggle(Object.assign({appendTitle:this._keybindingLabelFor(S.FIND_IDS.ToggleRegexCommand),isChecked:this._state.isRegex},n))),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange(()=>{this._state.change({isRegex:this.regex.checked},!1)})),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange(t=>{let r=!1;t.isRegex&&(this.regex.checked=this._state.isRegex,r=!0),t.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,r=!0),t.matchCase&&(this.caseSensitive.checked=this._state.matchCase,r=!0),!this._state.isRevealed&&r&&this._revealTemporarily()})),this._register(L.addDisposableListener(this._domNode,L.EventType.MOUSE_LEAVE,t=>this._onMouseLeave())),this._register(L.addDisposableListener(this._domNode,"mouseover",t=>this._onMouseOver()))}_keybindingLabelFor(C){const s=this._keybindingService.lookupKeybinding(C);return s?` (${s.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return _.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseLeave(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}}e.FindOptionsWidget=_,_.ID="editor.contrib.findOptionsWidget"}),define(te[883],ie([1,0,6,2,5,193]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindReplaceState=void 0;function S(_,v){return _===1?!0:_===2?!1:v}class m extends I.Disposable{get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return S(this._isRegexOverride,this._isRegex)}get wholeWord(){return S(this._wholeWordOverride,this._wholeWord)}get matchCase(){return S(this._matchCaseOverride,this._matchCase)}get preserveCase(){return S(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}constructor(){super(),this._onFindReplaceStateChange=this._register(new L.Emitter),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}changeMatchInfo(v,C,s){const i={moveCursor:!1,updateHistory:!1,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,isSearching:!1,filters:!1};let n=!1;C===0&&(v=0),v>C&&(v=C),this._matchesPosition!==v&&(this._matchesPosition=v,i.matchesPosition=!0,n=!0),this._matchesCount!==C&&(this._matchesCount=C,i.matchesCount=!0,n=!0),typeof s<"u"&&(y.Range.equalsRange(this._currentMatch,s)||(this._currentMatch=s,i.currentMatch=!0,n=!0)),n&&this._onFindReplaceStateChange.fire(i)}change(v,C,s=!0){var i;const n={moveCursor:C,updateHistory:s,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,isSearching:!1,filters:!1};let t=!1;const r=this.isRegex,u=this.wholeWord,f=this.matchCase,d=this.preserveCase;typeof v.searchString<"u"&&this._searchString!==v.searchString&&(this._searchString=v.searchString,n.searchString=!0,t=!0),typeof v.replaceString<"u"&&this._replaceString!==v.replaceString&&(this._replaceString=v.replaceString,n.replaceString=!0,t=!0),typeof v.isRevealed<"u"&&this._isRevealed!==v.isRevealed&&(this._isRevealed=v.isRevealed,n.isRevealed=!0,t=!0),typeof v.isReplaceRevealed<"u"&&this._isReplaceRevealed!==v.isReplaceRevealed&&(this._isReplaceRevealed=v.isReplaceRevealed,n.isReplaceRevealed=!0,t=!0),typeof v.isRegex<"u"&&(this._isRegex=v.isRegex),typeof v.wholeWord<"u"&&(this._wholeWord=v.wholeWord),typeof v.matchCase<"u"&&(this._matchCase=v.matchCase),typeof v.preserveCase<"u"&&(this._preserveCase=v.preserveCase),typeof v.searchScope<"u"&&(!((i=v.searchScope)===null||i===void 0)&&i.every(l=>{var o;return(o=this._searchScope)===null||o===void 0?void 0:o.some(c=>!y.Range.equalsRange(c,l))})||(this._searchScope=v.searchScope,n.searchScope=!0,t=!0)),typeof v.loop<"u"&&this._loop!==v.loop&&(this._loop=v.loop,n.loop=!0,t=!0),typeof v.isSearching<"u"&&this._isSearching!==v.isSearching&&(this._isSearching=v.isSearching,n.isSearching=!0,t=!0),typeof v.filters<"u"&&(this._filters?this._filters.update(v.filters):this._filters=v.filters,n.filters=!0,t=!0),this._isRegexOverride=typeof v.isRegexOverride<"u"?v.isRegexOverride:0,this._wholeWordOverride=typeof v.wholeWordOverride<"u"?v.wholeWordOverride:0,this._matchCaseOverride=typeof v.matchCaseOverride<"u"?v.matchCaseOverride:0,this._preserveCaseOverride=typeof v.preserveCaseOverride<"u"?v.preserveCaseOverride:0,r!==this.isRegex&&(t=!0,n.isRegex=!0),u!==this.wholeWord&&(t=!0,n.wholeWord=!0),f!==this.matchCase&&(t=!0,n.matchCase=!0),d!==this.preserveCase&&(t=!0,n.preserveCase=!0),t&&this._onFindReplaceStateChange.fire(n)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=D.MATCHES_LIMIT}}e.FindReplaceState=m}),define(te[884],ie([1,0,7,45,153,152,83,14,26,9,2,17,10,5,193,657,350,746,31,77,23,27,86,20,104,447]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleButton=e.FindWidget=e.FindWidgetViewZone=e.NLS_NO_RESULTS=e.NLS_MATCHES_LOCATION=e.findNextMatchIcon=e.findPreviousMatchIcon=e.findReplaceAllIcon=e.findReplaceIcon=void 0;const p=(0,l.registerIcon)("find-selection",_.Codicon.selection,r.localize(0,null)),b=(0,l.registerIcon)("find-collapsed",_.Codicon.chevronRight,r.localize(1,null)),w=(0,l.registerIcon)("find-expanded",_.Codicon.chevronDown,r.localize(2,null));e.findReplaceIcon=(0,l.registerIcon)("find-replace",_.Codicon.replace,r.localize(3,null)),e.findReplaceAllIcon=(0,l.registerIcon)("find-replace-all",_.Codicon.replaceAll,r.localize(4,null)),e.findPreviousMatchIcon=(0,l.registerIcon)("find-previous-match",_.Codicon.arrowUp,r.localize(5,null)),e.findNextMatchIcon=(0,l.registerIcon)("find-next-match",_.Codicon.arrowDown,r.localize(6,null));const E=r.localize(7,null),k=r.localize(8,null),M=r.localize(9,null),R=r.localize(10,null),B=r.localize(11,null),T=r.localize(12,null),N=r.localize(13,null),A=r.localize(14,null),P=r.localize(15,null),O=r.localize(16,null),x=r.localize(17,null),W=r.localize(18,null),U=r.localize(19,null,t.MATCHES_LIMIT);e.NLS_MATCHES_LOCATION=r.localize(20,null),e.NLS_NO_RESULTS=r.localize(21,null);const F=419,Y=275-54;let ne=69;const se=33,J="ctrlEnterReplaceAll.windows.donotask",q=s.isMacintosh?256:2048;class H{constructor(de){this.afterLineNumber=de,this.heightInPx=se,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}e.FindWidgetViewZone=H;function V(ue,de,ce){const ae=!!de.match(/\n/);if(ce&&ae&&ce.selectionStart>0){ue.stopPropagation();return}}function Z(ue,de,ce){const ae=!!de.match(/\n/);if(ce&&ae&&ce.selectionEndthis._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(oe=>this._onStateChanged(oe))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(oe=>{if(oe.hasChanged(90)&&(this._codeEditor.getOption(90)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),oe.hasChanged(143)&&this._tryUpdateWidgetWidth(),oe.hasChanged(2)&&this.updateAccessibilitySupport(),oe.hasChanged(41)){const he=this._codeEditor.getOption(41).loop;this._state.change({loop:he},!1);const me=this._codeEditor.getOption(41).addExtraSpaceOnTop;me&&!this._viewZone&&(this._viewZone=new H(0),this._showViewZone()),!me&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>be(this,void 0,void 0,function*(){if(this._isVisible){const oe=yield this._controller.getGlobalBufferTerm();oe&&oe!==this._state.searchString&&(this._state.change({searchString:oe},!1),this._findInput.select())}}))),this._findInputFocused=t.CONTEXT_FIND_INPUT_FOCUSED.bindTo(z),this._findFocusTracker=this._register(L.trackFocus(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus(()=>{this._findInputFocused.set(!0),this._updateSearchScope()})),this._register(this._findFocusTracker.onDidBlur(()=>{this._findInputFocused.set(!1)})),this._replaceInputFocused=t.CONTEXT_REPLACE_INPUT_FOCUSED.bindTo(z),this._replaceFocusTracker=this._register(L.trackFocus(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus(()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()})),this._register(this._replaceFocusTracker.onDidBlur(()=>{this._replaceInputFocused.set(!1)})),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(41).addExtraSpaceOnTop&&(this._viewZone=new H(0)),this._register(this._codeEditor.onDidChangeModel(()=>{this._isVisible&&(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(oe=>{if(oe.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return ee.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(de){if(de.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(de.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),de.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),de.isReplaceRevealed&&(this._state.isReplaceRevealed?!this._codeEditor.getOption(90)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=L.getTotalWidth(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(de.isRevealed||de.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),de.isRegex&&this._findInput.setRegex(this._state.isRegex),de.wholeWord&&this._findInput.setWholeWords(this._state.wholeWord),de.matchCase&&this._findInput.setCaseSensitive(this._state.matchCase),de.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),de.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),de.searchString||de.matchesCount||de.matchesPosition){const ce=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",ce),this._updateMatchesCount(),this._updateButtons()}(de.searchString||de.currentMatch)&&this._layoutViewZone(),de.updateHistory&&this._delayedUpdateHistory(),de.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,v.onUnexpectedError)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=ne+"px",this._state.matchesCount>=t.MATCHES_LIMIT?this._matchesCount.title=U:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let de;if(this._state.matchesCount>0){let ce=String(this._state.matchesCount);this._state.matchesCount>=t.MATCHES_LIMIT&&(ce+="+");let ae=String(this._state.matchesPosition);ae==="0"&&(ae="?"),de=i.format(e.NLS_MATCHES_LOCATION,ae,ce)}else de=e.NLS_NO_RESULTS;this._matchesCount.appendChild(document.createTextNode(de)),(0,I.alert)(this._getAriaLabel(de,this._state.currentMatch,this._state.searchString)),ne=Math.max(ne,this._matchesCount.clientWidth)}_getAriaLabel(de,ce,ae){if(de===e.NLS_NO_RESULTS)return ae===""?r.localize(22,null,de):r.localize(23,null,de,ae);if(ce){const X=r.localize(24,null,de,ae,ce.startLineNumber+":"+ce.startColumn),K=this._codeEditor.getModel();return K&&ce.startLineNumber<=K.getLineCount()&&ce.startLineNumber>=1?`${K.getLineContent(ce.startLineNumber)}, ${X}`:X}return r.localize(25,null,de,ae)}_updateToggleSelectionFindButton(){const de=this._codeEditor.getSelection(),ce=de?de.startLineNumber!==de.endLineNumber||de.startColumn!==de.endColumn:!1,ae=this._toggleSelectionFind.checked;this._isVisible&&(ae||ce)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);const de=this._state.searchString.length>0,ce=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&de&&ce&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&de&&ce&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&de),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&de),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);const ae=!this._codeEditor.getOption(90);this._toggleReplaceBtn.setEnabled(this._isVisible&&ae)}_reveal(){if(this._revealTimeouts.forEach(de=>{clearTimeout(de)}),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const de=this._codeEditor.getSelection();switch(this._codeEditor.getOption(41).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const ae=!!de&&de.startLineNumber!==de.endLineNumber;this._toggleSelectionFind.checked=ae;break}default:break}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout(()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")},0)),this._revealTimeouts.push(setTimeout(()=>{this._findInput.validate()},200)),this._codeEditor.layoutOverlayWidget(this);let ce=!0;if(this._codeEditor.getOption(41).seedSearchStringFromSelection&&de){const ae=this._codeEditor.getDomNode();if(ae){const X=L.getDomNodePagePosition(ae),K=this._codeEditor.getScrolledVisiblePosition(de.getStartPosition()),z=X.left+(K?K.left:0),Q=K?K.top:0;if(this._viewZone&&Qde.startLineNumber&&(ce=!1);const j=L.getTopLeftOffset(this._domNode).left;z>j&&(ce=!1);const re=this._codeEditor.getScrolledVisiblePosition(de.getEndPosition());X.left+(re?re.left:0)>j&&(ce=!1)}}}this._showViewZone(ce)}}_hide(de){this._revealTimeouts.forEach(ce=>{clearTimeout(ce)}),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),de&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(de){if(!this._codeEditor.getOption(41).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const ae=this._viewZone;this._viewZoneId!==void 0||!ae||this._codeEditor.changeViewZones(X=>{ae.heightInPx=this._getHeight(),this._viewZoneId=X.addZone(ae),this._codeEditor.setScrollTop(de||this._codeEditor.getScrollTop()+ae.heightInPx)})}_showViewZone(de=!0){if(!this._isVisible||!this._codeEditor.getOption(41).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new H(0));const ae=this._viewZone;this._codeEditor.changeViewZones(X=>{if(this._viewZoneId!==void 0){const K=this._getHeight();if(K===ae.heightInPx)return;const z=K-ae.heightInPx;ae.heightInPx=K,X.layoutZone(this._viewZoneId),de&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+z);return}else{let K=this._getHeight();if(K-=this._codeEditor.getOption(83).top,K<=0)return;ae.heightInPx=K,this._viewZoneId=X.addZone(ae),de&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+K)}})}_removeViewZone(){this._codeEditor.changeViewZones(de=>{this._viewZoneId!==void 0&&(de.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_tryUpdateWidgetWidth(){if(!this._isVisible||!L.isInDOM(this._domNode))return;const de=this._codeEditor.getLayoutInfo();if(de.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const ae=de.width,X=de.minimap.minimapWidth;let K=!1,z=!1,Q=!1;if(this._resized&&L.getTotalWidth(this._domNode)>F){this._domNode.style.maxWidth=`${ae-28-X-15}px`,this._replaceInput.width=L.getTotalWidth(this._findInput.domNode);return}if(F+28+X>=ae&&(z=!0),F+28+X-ne>=ae&&(Q=!0),F+28+X-ne>=ae+50&&(K=!0),this._domNode.classList.toggle("collapsed-find-widget",K),this._domNode.classList.toggle("narrow-find-widget",Q),this._domNode.classList.toggle("reduced-find-widget",z),!Q&&!K&&(this._domNode.style.maxWidth=`${ae-28-X-15}px`),this._findInput.layout({collapsedFindWidget:K,narrowFindWidget:Q,reducedFindWidget:z}),this._resized){const j=this._findInput.inputBox.element.clientWidth;j>0&&(this._replaceInput.width=j)}else this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode))}_getHeight(){let de=0;return de+=4,de+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(de+=4,de+=this._replaceInput.inputBox.height+2),de+=4,de}_tryUpdateHeight(){const de=this._getHeight();return this._cachedHeight!==null&&this._cachedHeight===de?!1:(this._cachedHeight=de,this._domNode.style.height=`${de}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){const de=this._codeEditor.getSelections();de.map(ce=>{ce.endColumn===1&&ce.endLineNumber>ce.startLineNumber&&(ce=ce.setEndPosition(ce.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(ce.endLineNumber-1)));const ae=this._state.currentMatch;return ce.startLineNumber!==ce.endLineNumber&&!n.Range.equalsRange(ce,ae)?ce:null}).filter(ce=>!!ce),de.length&&this._state.change({searchScope:de},!0)}}_onFindInputMouseDown(de){de.middleButton&&de.stopPropagation()}_onFindInputKeyDown(de){if(de.equals(q|3))if(this._keybindingService.dispatchEvent(de,de.target)){de.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` -`),de.preventDefault();return}if(de.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),de.preventDefault();return}if(de.equals(2066)){this._codeEditor.focus(),de.preventDefault();return}if(de.equals(16))return V(de,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(de.equals(18))return Z(de,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(de){if(de.equals(q|3))if(this._keybindingService.dispatchEvent(de,de.target)){de.preventDefault();return}else{s.isWindows&&s.isNative&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(r.localize(26,null)),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(J,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` -`),de.preventDefault();return}if(de.equals(2)){this._findInput.focusOnCaseSensitive(),de.preventDefault();return}if(de.equals(1026)){this._findInput.focus(),de.preventDefault();return}if(de.equals(2066)){this._codeEditor.focus(),de.preventDefault();return}if(de.equals(16))return V(de,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(de.equals(18))return Z(de,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(de){return 0}_keybindingLabelFor(de){const ce=this._keybindingService.lookupKeybinding(de);return ce?` (${ce.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new u.ContextScopedFindInput(null,this._contextViewProvider,{width:Y,label:k,placeholder:M,appendCaseSensitiveLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(t.FIND_IDS.ToggleRegexCommand),validation:j=>{if(j.length===0||!this._findInput.getRegex())return null;try{return new RegExp(j,"gu"),null}catch(re){return{content:re.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showCommonFindToggles:!0,showHistoryHint:()=>(0,f.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:h.defaultInputBoxStyles,toggleStyles:h.defaultToggleStyles},this._contextKeyService)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(j=>this._onFindInputKeyDown(j))),this._register(this._findInput.inputBox.onDidChange(()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)})),this._register(this._findInput.onDidOptionChange(()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)})),this._register(this._findInput.onCaseSensitiveKeyDown(j=>{j.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),j.preventDefault())})),this._register(this._findInput.onRegexKeyDown(j=>{j.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),j.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(j=>{this._tryUpdateHeight()&&this._showViewZone()})),s.isLinux&&this._register(this._findInput.onMouseDown(j=>this._onFindInputMouseDown(j))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new le({label:R+this._keybindingLabelFor(t.FIND_IDS.PreviousMatchFindAction),icon:e.findPreviousMatchIcon,onTrigger:()=>{(0,g.assertIsDefined)(this._codeEditor.getAction(t.FIND_IDS.PreviousMatchFindAction)).run().then(void 0,v.onUnexpectedError)}})),this._nextBtn=this._register(new le({label:B+this._keybindingLabelFor(t.FIND_IDS.NextMatchFindAction),icon:e.findNextMatchIcon,onTrigger:()=>{(0,g.assertIsDefined)(this._codeEditor.getAction(t.FIND_IDS.NextMatchFindAction)).run().then(void 0,v.onUnexpectedError)}}));const ae=document.createElement("div");ae.className="find-part",ae.appendChild(this._findInput.domNode);const X=document.createElement("div");X.className="find-actions",ae.appendChild(X),X.appendChild(this._matchesCount),X.appendChild(this._prevBtn.domNode),X.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new y.Toggle({icon:p,title:T+this._keybindingLabelFor(t.FIND_IDS.ToggleSearchScopeCommand),isChecked:!1,inputActiveOptionBackground:(0,d.asCssVariable)(d.inputActiveOptionBackground),inputActiveOptionBorder:(0,d.asCssVariable)(d.inputActiveOptionBorder),inputActiveOptionForeground:(0,d.asCssVariable)(d.inputActiveOptionForeground)})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){const j=this._codeEditor.getSelections();j.map(re=>(re.endColumn===1&&re.endLineNumber>re.startLineNumber&&(re=re.setEndPosition(re.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(re.endLineNumber-1))),re.isEmpty()?null:re)).filter(re=>!!re),j.length&&this._state.change({searchScope:j},!0)}}else this._state.change({searchScope:null},!0)})),X.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new le({label:N+this._keybindingLabelFor(t.FIND_IDS.CloseFindWidgetCommand),icon:l.widgetClose,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:j=>{j.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),j.preventDefault())}})),this._replaceInput=this._register(new u.ContextScopedReplaceInput(null,void 0,{label:A,placeholder:P,appendPreserveCaseLabel:this._keybindingLabelFor(t.FIND_IDS.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>(0,f.showHistoryKeybindingHint)(this._keybindingService),inputBoxStyles:h.defaultInputBoxStyles,toggleStyles:h.defaultToggleStyles},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(j=>this._onReplaceInputKeyDown(j))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(j=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(j=>{j.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),j.preventDefault())})),this._replaceBtn=this._register(new le({label:O+this._keybindingLabelFor(t.FIND_IDS.ReplaceOneAction),icon:e.findReplaceIcon,onTrigger:()=>{this._controller.replace()},onKeyDown:j=>{j.equals(1026)&&(this._closeBtn.focus(),j.preventDefault())}})),this._replaceAllBtn=this._register(new le({label:x+this._keybindingLabelFor(t.FIND_IDS.ReplaceAllAction),icon:e.findReplaceAllIcon,onTrigger:()=>{this._controller.replaceAll()}}));const K=document.createElement("div");K.className="replace-part",K.appendChild(this._replaceInput.domNode);const z=document.createElement("div");z.className="replace-actions",K.appendChild(z),z.appendChild(this._replaceBtn.domNode),z.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new le({label:W,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._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.ariaLabel=E,this._domNode.role="dialog",this._domNode.style.width=`${F}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(ae),this._domNode.appendChild(this._closeBtn.domNode),this._domNode.appendChild(K),this._resizeSash=new D.Sash(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let Q=F;this._register(this._resizeSash.onDidStart(()=>{Q=L.getTotalWidth(this._domNode)})),this._register(this._resizeSash.onDidChange(j=>{this._resized=!0;const re=Q+j.startX-j.currentX;if(reoe||(this._domNode.style.width=`${re}px`,this._isReplaceVisible&&(this._replaceInput.width=L.getTotalWidth(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const j=L.getTotalWidth(this._domNode);if(j{this._opts.onTrigger(),ae.preventDefault()}),this.onkeydown(this._domNode,ae=>{var X,K;if(ae.equals(10)||ae.equals(3)){this._opts.onTrigger(),ae.preventDefault();return}(K=(X=this._opts).onKeyDown)===null||K===void 0||K.call(X,ae)})}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(de){this._domNode.classList.toggle("disabled",!de),this._domNode.setAttribute("aria-disabled",String(!de)),this._domNode.tabIndex=de?0:-1}setExpanded(de){this._domNode.setAttribute("aria-expanded",String(!!de)),de?(this._domNode.classList.remove(...c.ThemeIcon.asClassNameArray(b)),this._domNode.classList.add(...c.ThemeIcon.asClassNameArray(w))):(this._domNode.classList.remove(...c.ThemeIcon.asClassNameArray(w)),this._domNode.classList.add(...c.ThemeIcon.asClassNameArray(b)))}}e.SimpleButton=le,(0,o.registerThemingParticipant)((ue,de)=>{const ce=(we,Le)=>{Le&&de.addRule(`.monaco-editor ${we} { background-color: ${Le}; }`)};ce(".findMatch",ue.getColor(d.editorFindMatchHighlight)),ce(".currentFindMatch",ue.getColor(d.editorFindMatch)),ce(".findScope",ue.getColor(d.editorFindRangeHighlight));const ae=ue.getColor(d.editorWidgetBackground);ce(".find-widget",ae);const X=ue.getColor(d.widgetShadow);X&&de.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${X}; }`);const K=ue.getColor(d.widgetBorder);K&&de.addRule(`.monaco-editor .find-widget { border-left: 1px solid ${K}; border-right: 1px solid ${K}; border-bottom: 1px solid ${K}; }`);const z=ue.getColor(d.editorFindMatchHighlightBorder);z&&de.addRule(`.monaco-editor .findMatch { border: 1px ${(0,a.isHighContrast)(ue.type)?"dotted":"solid"} ${z}; box-sizing: border-box; }`);const Q=ue.getColor(d.editorFindMatchBorder);Q&&de.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${Q}; padding: 1px; box-sizing: border-box; }`);const j=ue.getColor(d.editorFindRangeHighlightBorder);j&&de.addRule(`.monaco-editor .findScope { border: 1px ${(0,a.isHighContrast)(ue.type)?"dashed":"solid"} ${j}; }`);const re=ue.getColor(d.contrastBorder);re&&de.addRule(`.monaco-editor .find-widget { border: 1px solid ${re}; }`);const oe=ue.getColor(d.editorWidgetForeground);oe&&de.addRule(`.monaco-editor .find-widget { color: ${oe}; }`);const he=ue.getColor(d.errorForeground);he&&de.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${he}; }`);const me=ue.getColor(d.editorWidgetResizeBorder);if(me)de.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${me}; }`);else{const we=ue.getColor(d.editorWidgetBorder);we&&de.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${we}; }`)}const pe=ue.getColor(d.toolbarHoverBackground);pe&&de.addRule(` - .monaco-editor .find-widget .button:not(.disabled):hover, - .monaco-editor .find-widget .codicon-find-selection:hover { - background-color: ${pe} !important; - } - `);const ve=ue.getColor(d.focusBorder);ve&&de.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${ve}; }`)})}),define(te[369],ie([1,0,14,2,10,16,78,22,49,193,882,883,884,656,30,102,15,58,34,48,67,89,23]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.StartFindReplaceAction=e.PreviousSelectionMatchFindAction=e.NextSelectionMatchFindAction=e.SelectionMatchFindAction=e.MoveToMatchFindAction=e.PreviousMatchFindAction=e.NextMatchFindAction=e.MatchFindAction=e.StartFindWithSelectionAction=e.StartFindWithArgsAction=e.StartFindAction=e.FindController=e.CommonFindController=e.getSelectionSearchString=void 0;const h=524288;function p(W,U="single",F=!1){if(!W.hasModel())return null;const G=W.getSelection();if(U==="single"&&G.startLineNumber===G.endLineNumber||U==="multiple"){if(G.isEmpty()){const Y=W.getConfiguredWordAtPosition(G.getStartPosition());if(Y&&F===!1)return Y.word}else if(W.getModel().getValueLengthInRange(G)this._onStateChanged(se))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{const se=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),se&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(41).loop})}))}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(U){this.saveQueryState(U),U.isRevealed&&(this._state.isRevealed?this._findWidgetVisible.set(!0):(this._findWidgetVisible.reset(),this.disposeModel())),U.searchString&&this.setGlobalBufferTerm(this._state.searchString)}saveQueryState(U){U.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,1),U.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,1),U.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,1),U.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,1)}loadQueryState(){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)}isFindInputFocused(){return!!v.CONTEXT_FIND_INPUT_FOCUSED.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){const U=this._editor.getSelections();U.map(F=>(F.endColumn===1&&F.endLineNumber>F.startLineNumber&&(F=F.setEndPosition(F.endLineNumber-1,this._editor.getModel().getLineMaxColumn(F.endLineNumber-1))),F.isEmpty()?null:F)).filter(F=>!!F),U.length&&this._state.change({searchScope:U},!0)}}setSearchString(U){this._state.isRegex&&(U=y.escapeRegExpCharacters(U)),this._state.change({searchString:U},!1)}highlightFindOptions(U=!1){}_start(U,F){return be(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;const G=Object.assign(Object.assign({},F),{isRevealed:!0});if(U.seedSearchStringFromSelection==="single"){const Y=p(this._editor,U.seedSearchStringFromSelection,U.seedSearchStringFromNonEmptySelection);Y&&(this._state.isRegex?G.searchString=y.escapeRegExpCharacters(Y):G.searchString=Y)}else if(U.seedSearchStringFromSelection==="multiple"&&!U.updateSearchScope){const Y=p(this._editor,U.seedSearchStringFromSelection);Y&&(G.searchString=Y)}if(!G.searchString&&U.seedSearchStringFromGlobalClipboard){const Y=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;Y&&(G.searchString=Y)}if(U.forceRevealReplace||G.isReplaceRevealed?G.isReplaceRevealed=!0:this._findWidgetVisible.get()||(G.isReplaceRevealed=!1),U.updateSearchScope){const Y=this._editor.getSelections();Y.some(ne=>!ne.isEmpty())&&(G.searchScope=Y)}G.loop=U.loop,this._state.change(G,!1),this._model||(this._model=new v.FindModelBoundToEditorModel(this._editor,this._state))})}start(U,F){return this._start(U,F)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}goToMatch(U){return this._model?(this._model.moveToMatch(U),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){var U;return this._model?!((U=this._editor.getModel())===null||U===void 0)&&U.isTooLargeForHeapOperation()?(this._notificationService.warn(n.localize(0,null)),!1):(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return be(this,void 0,void 0,function*(){return this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(U){this._editor.getOption(41).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(U)}};e.CommonFindController=b,b.ID="editor.contrib.findController",e.CommonFindController=b=g=Ie([ge(1,u.IContextKeyService),ge(2,c.IStorageService),ge(3,r.IClipboardService),ge(4,l.INotificationService)],b);let w=class extends b{constructor(U,F,G,Y,ne,se,J,q){super(U,G,J,q,se),this._contextViewService=F,this._keybindingService=Y,this._themeService=ne,this._widget=null,this._findOptionsWidget=null}_start(U,F){const G=Object.create(null,{_start:{get:()=>super._start}});return be(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const Y=this._editor.getSelection();let ne=!1;switch(this._editor.getOption(41).autoFindInSelection){case"always":ne=!0;break;case"never":ne=!1;break;case"multiline":{ne=!!Y&&Y.startLineNumber!==Y.endLineNumber;break}default:break}U.updateSearchScope=U.updateSearchScope||ne,yield G._start.call(this,U,F),this._widget&&(U.shouldFocus===2?this._widget.focusReplaceInput():U.shouldFocus===1&&this._widget.focusFindInput())})}highlightFindOptions(U=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!U?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new i.FindWidget(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new C.FindOptionsWidget(this._editor,this._state,this._keybindingService))}};e.FindController=w,e.FindController=w=Ie([ge(1,f.IContextViewService),ge(2,u.IContextKeyService),ge(3,d.IKeybindingService),ge(4,a.IThemeService),ge(5,l.INotificationService),ge(6,c.IStorageService),ge(7,r.IClipboardService)],w),e.StartFindAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:v.FIND_IDS.StartFindAction,label:n.localize(1,null),alias:"Find",precondition:u.ContextKeyExpr.or(m.EditorContextKeys.focus,u.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:t.MenuId.MenubarEditMenu,group:"3_find",title:n.localize(2,null),order:1}})),e.StartFindAction.addImplementation(0,(W,U,F)=>{const G=b.get(U);return G?G.start({forceRevealReplace:!1,seedSearchStringFromSelection:U.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:U.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:U.getOption(41).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:U.getOption(41).loop}):!1});const E={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:n.localize(3,null)},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:n.localize(4,null)},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:n.localize(5,null)},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:n.localize(6,null)},findInSelection:{type:"boolean"}}}}]};class k extends D.EditorAction{constructor(){super({id:v.FIND_IDS.StartFindWithArgs,label:n.localize(7,null),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:E})}run(U,F,G){return be(this,void 0,void 0,function*(){const Y=b.get(F);if(Y){const ne=G?{searchString:G.searchString,replaceString:G.replaceString,isReplaceRevealed:G.replaceString!==void 0,isRegex:G.isRegex,wholeWord:G.matchWholeWord,matchCase:G.isCaseSensitive,preserveCase:G.preserveCase}:{};yield Y.start({forceRevealReplace:!1,seedSearchStringFromSelection:Y.getState().searchString.length===0&&F.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:F.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:G?.findInSelection||!1,loop:F.getOption(41).loop},ne),Y.setGlobalBufferTerm(Y.getState().searchString)}})}}e.StartFindWithArgsAction=k;class M extends D.EditorAction{constructor(){super({id:v.FIND_IDS.StartFindWithSelection,label:n.localize(8,null),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(U,F){return be(this,void 0,void 0,function*(){const G=b.get(F);G&&(yield G.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:F.getOption(41).loop}),G.setGlobalBufferTerm(G.getState().searchString))})}}e.StartFindWithSelectionAction=M;class R extends D.EditorAction{run(U,F){return be(this,void 0,void 0,function*(){const G=b.get(F);G&&!this._run(G)&&(yield G.start({forceRevealReplace:!1,seedSearchStringFromSelection:G.getState().searchString.length===0&&F.getOption(41).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:F.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:F.getOption(41).loop}),this._run(G))})}}e.MatchFindAction=R;class B extends R{constructor(){super({id:v.FIND_IDS.NextMatchFindAction,label:n.localize(9,null),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:m.EditorContextKeys.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:u.ContextKeyExpr.and(m.EditorContextKeys.focus,v.CONTEXT_FIND_INPUT_FOCUSED),primary:3,weight:100}]})}_run(U){return U.moveToNextMatch()?(U.editor.pushUndoStop(),!0):!1}}e.NextMatchFindAction=B;class T extends R{constructor(){super({id:v.FIND_IDS.PreviousMatchFindAction,label:n.localize(10,null),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:m.EditorContextKeys.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:u.ContextKeyExpr.and(m.EditorContextKeys.focus,v.CONTEXT_FIND_INPUT_FOCUSED),primary:1027,weight:100}]})}_run(U){return U.moveToPrevMatch()}}e.PreviousMatchFindAction=T;class N extends D.EditorAction{constructor(){super({id:v.FIND_IDS.GoToMatchFindAction,label:n.localize(11,null),alias:"Go to Match...",precondition:v.CONTEXT_FIND_WIDGET_VISIBLE}),this._highlightDecorations=[]}run(U,F,G){const Y=b.get(F);if(!Y)return;const ne=Y.getState().matchesCount;if(ne<1){U.get(l.INotificationService).notify({severity:l.Severity.Warning,message:n.localize(12,null)});return}const J=U.get(o.IQuickInputService).createInputBox();J.placeholder=n.localize(13,null,ne);const q=V=>{const Z=parseInt(V);if(isNaN(Z))return;const ee=Y.getState().matchesCount;if(Z>0&&Z<=ee)return Z-1;if(Z<0&&Z>=-ee)return ee+Z},H=V=>{const Z=q(V);if(typeof Z=="number"){J.validationMessage=void 0,Y.goToMatch(Z);const ee=Y.getState().currentMatch;ee&&this.addDecorations(F,ee)}else J.validationMessage=n.localize(14,null,Y.getState().matchesCount),this.clearDecorations(F)};J.onDidChangeValue(V=>{H(V)}),J.onDidAccept(()=>{const V=q(J.value);typeof V=="number"?(Y.goToMatch(V),J.hide()):J.validationMessage=n.localize(15,null,Y.getState().matchesCount)}),J.onDidHide(()=>{this.clearDecorations(F),J.dispose()}),J.show()}clearDecorations(U){U.changeDecorations(F=>{this._highlightDecorations=F.deltaDecorations(this._highlightDecorations,[])})}addDecorations(U,F){U.changeDecorations(G=>{this._highlightDecorations=G.deltaDecorations(this._highlightDecorations,[{range:F,options:{description:"find-match-quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:F,options:{description:"find-match-quick-access-range-highlight-overview",overviewRuler:{color:(0,a.themeColorFromId)(S.overviewRulerRangeHighlight),position:_.OverviewRulerLane.Full}}}])})}}e.MoveToMatchFindAction=N;class A extends D.EditorAction{run(U,F){return be(this,void 0,void 0,function*(){const G=b.get(F);if(!G)return;const Y=p(F,"single",!1);Y&&G.setSearchString(Y),this._run(G)||(yield G.start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:F.getOption(41).loop}),this._run(G))})}}e.SelectionMatchFindAction=A;class P extends A{constructor(){super({id:v.FIND_IDS.NextSelectionMatchFindAction,label:n.localize(16,null),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:2109,weight:100}})}_run(U){return U.moveToNextMatch()}}e.NextSelectionMatchFindAction=P;class O extends A{constructor(){super({id:v.FIND_IDS.PreviousSelectionMatchFindAction,label:n.localize(17,null),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:m.EditorContextKeys.focus,primary:3133,weight:100}})}_run(U){return U.moveToPrevMatch()}}e.PreviousSelectionMatchFindAction=O,e.StartFindReplaceAction=(0,D.registerMultiEditorAction)(new D.MultiEditorAction({id:v.FIND_IDS.StartFindReplaceAction,label:n.localize(18,null),alias:"Replace",precondition:u.ContextKeyExpr.or(m.EditorContextKeys.focus,u.ContextKeyExpr.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:t.MenuId.MenubarEditMenu,group:"3_find",title:n.localize(19,null),order:2}})),e.StartFindReplaceAction.addImplementation(0,(W,U,F)=>{if(!U.hasModel()||U.getOption(90))return!1;const G=b.get(U);if(!G)return!1;const Y=U.getSelection(),ne=G.isFindInputFocused(),se=!Y.isEmpty()&&Y.startLineNumber===Y.endLineNumber&&U.getOption(41).seedSearchStringFromSelection!=="never"&&!ne,J=ne||se?2:1;return G.start({forceRevealReplace:!0,seedSearchStringFromSelection:se?"single":"none",seedSearchStringFromNonEmptySelection:U.getOption(41).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:U.getOption(41).seedSearchStringFromSelection!=="never",shouldFocus:J,shouldAnimate:!0,updateSearchScope:!1,loop:U.getOption(41).loop})}),(0,D.registerEditorContribution)(b.ID,w,0),(0,D.registerEditorAction)(k),(0,D.registerEditorAction)(M),(0,D.registerEditorAction)(B),(0,D.registerEditorAction)(T),(0,D.registerEditorAction)(N),(0,D.registerEditorAction)(P),(0,D.registerEditorAction)(O);const x=D.EditorCommand.bindToContribution(b.get);(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.CloseFindWidgetCommand,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(m.EditorContextKeys.focus,u.ContextKeyExpr.not("isComposing")),primary:9,secondary:[1033]}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ToggleCaseSensitiveCommand,precondition:void 0,handler:W=>W.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:v.ToggleCaseSensitiveKeybinding.primary,mac:v.ToggleCaseSensitiveKeybinding.mac,win:v.ToggleCaseSensitiveKeybinding.win,linux:v.ToggleCaseSensitiveKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ToggleWholeWordCommand,precondition:void 0,handler:W=>W.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:v.ToggleWholeWordKeybinding.primary,mac:v.ToggleWholeWordKeybinding.mac,win:v.ToggleWholeWordKeybinding.win,linux:v.ToggleWholeWordKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ToggleRegexCommand,precondition:void 0,handler:W=>W.toggleRegex(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:v.ToggleRegexKeybinding.primary,mac:v.ToggleRegexKeybinding.mac,win:v.ToggleRegexKeybinding.win,linux:v.ToggleRegexKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ToggleSearchScopeCommand,precondition:void 0,handler:W=>W.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:v.ToggleSearchScopeKeybinding.primary,mac:v.ToggleSearchScopeKeybinding.mac,win:v.ToggleSearchScopeKeybinding.win,linux:v.ToggleSearchScopeKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.TogglePreserveCaseCommand,precondition:void 0,handler:W=>W.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:v.TogglePreserveCaseKeybinding.primary,mac:v.TogglePreserveCaseKeybinding.mac,win:v.TogglePreserveCaseKeybinding.win,linux:v.TogglePreserveCaseKeybinding.linux}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ReplaceOneAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replace(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:3094}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ReplaceOneAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replace(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(m.EditorContextKeys.focus,v.CONTEXT_REPLACE_INPUT_FOCUSED),primary:3}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ReplaceAllAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replaceAll(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:2563}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.ReplaceAllAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.replaceAll(),kbOpts:{weight:100+5,kbExpr:u.ContextKeyExpr.and(m.EditorContextKeys.focus,v.CONTEXT_REPLACE_INPUT_FOCUSED),primary:void 0,mac:{primary:2051}}})),(0,D.registerEditorCommand)(new x({id:v.FIND_IDS.SelectAllMatchesAction,precondition:v.CONTEXT_FIND_WIDGET_VISIBLE,handler:W=>W.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:m.EditorContextKeys.focus,primary:515}}))}),define(te[370],ie([1,0,26,49,37,659,31,77,23,27]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingDecorationProvider=e.foldingManualExpandedIcon=e.foldingManualCollapsedIcon=e.foldingCollapsedIcon=e.foldingExpandedIcon=void 0;const C=(0,S.registerColor)("editor.foldBackground",{light:(0,S.transparent)(S.editorSelectionBackground,.3),dark:(0,S.transparent)(S.editorSelectionBackground,.3),hcDark:null,hcLight:null},(0,D.localize)(0,null),!0);(0,S.registerColor)("editorGutter.foldingControlForeground",{dark:S.iconForeground,light:S.iconForeground,hcDark:S.iconForeground,hcLight:S.iconForeground},(0,D.localize)(1,null)),e.foldingExpandedIcon=(0,m.registerIcon)("folding-expanded",L.Codicon.chevronDown,(0,D.localize)(2,null)),e.foldingCollapsedIcon=(0,m.registerIcon)("folding-collapsed",L.Codicon.chevronRight,(0,D.localize)(3,null)),e.foldingManualCollapsedIcon=(0,m.registerIcon)("folding-manual-collapsed",e.foldingCollapsedIcon,(0,D.localize)(4,null)),e.foldingManualExpandedIcon=(0,m.registerIcon)("folding-manual-expanded",e.foldingExpandedIcon,(0,D.localize)(5,null));const s={color:(0,_.themeColorFromId)(C),position:I.MinimapPosition.Inline};class i{constructor(t){this.editor=t,this.showFoldingControls="mouseover",this.showFoldingHighlights=!0}getDecorationOption(t,r,u){return r?i.HIDDEN_RANGE_DECORATION:this.showFoldingControls==="never"?t?this.showFoldingHighlights?i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION:i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION:i.NO_CONTROLS_EXPANDED_RANGE_DECORATION:t?u?this.showFoldingHighlights?i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.MANUALLY_COLLAPSED_VISUAL_DECORATION:this.showFoldingHighlights?i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:i.COLLAPSED_VISUAL_DECORATION:this.showFoldingControls==="mouseover"?u?i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION:i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:u?i.MANUALLY_EXPANDED_VISUAL_DECORATION:i.EXPANDED_VISUAL_DECORATION}changeDecorations(t){return this.editor.changeDecorations(t)}removeDecorations(t){this.editor.removeDecorations(t)}}e.FoldingDecorationProvider=i,i.COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),i.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:s,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingCollapsedIcon)}),i.MANUALLY_COLLAPSED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),i.MANUALLY_COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-collapsed-highlighted-visual-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:s,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualCollapsedIcon)}),i.NO_CONTROLS_COLLAPSED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",isWholeLine:!0}),i.NO_CONTROLS_COLLAPSED_HIGHLIGHTED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,afterContentClassName:"inline-folded",className:"folded-background",minimap:s,isWholeLine:!0}),i.EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+v.ThemeIcon.asClassName(e.foldingExpandedIcon)}),i.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingExpandedIcon)}),i.MANUALLY_EXPANDED_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-expanded-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+v.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),i.MANUALLY_EXPANDED_AUTO_HIDE_VISUAL_DECORATION=y.ModelDecorationOptions.register({description:"folding-manually-expanded-auto-hide-visual-decoration",stickiness:0,isWholeLine:!0,firstLineDecorationClassName:v.ThemeIcon.asClassName(e.foldingManualExpandedIcon)}),i.NO_CONTROLS_EXPANDED_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-no-controls-range-decoration",stickiness:0,isWholeLine:!0}),i.HIDDEN_RANGE_DECORATION=y.ModelDecorationOptions.register({description:"folding-hidden-range-decoration",stickiness:1})}),define(te[253],ie([1,0,14,19,9,62,2,10,20,120,16,22,29,32,295,546,296,658,15,370,180,297,48,74,59,18,6,25,21,50,28,448]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M){"use strict";var R;Object.defineProperty(e,"__esModule",{value:!0}),e.RangesLimitReporter=e.FoldingController=void 0;const B=new d.RawContextKey("foldingEnabled",!1);let T=R=class extends S.Disposable{static get(ae){return ae.getContribution(R.ID)}static getFoldingRangeProviders(ae,X){var K,z;const Q=ae.foldingRangeProvider.ordered(X);return(z=(K=R._foldingRangeSelector)===null||K===void 0?void 0:K.call(R,Q,X))!==null&&z!==void 0?z:Q}constructor(ae,X,K,z,Q,j){super(),this.contextKeyService=X,this.languageConfigurationService=K,this.languageFeaturesService=j,this.localToDispose=this._register(new S.DisposableStore),this.editor=ae,this._foldingLimitReporter=new N(ae);const re=this.editor.getOptions();this._isEnabled=re.get(43),this._useFoldingProviders=re.get(44)!=="indentation",this._unfoldOnClickAfterEndOfLine=re.get(48),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=re.get(46),this.updateDebounceInfo=Q.for(j.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new l.FoldingDecorationProvider(ae),this.foldingDecorationProvider.showFoldingControls=re.get(109),this.foldingDecorationProvider.showFoldingHighlights=re.get(45),this.foldingEnabled=B.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(oe=>{if(oe.hasChanged(43)&&(this._isEnabled=this.editor.getOptions().get(43),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),oe.hasChanged(47)&&this.onModelChanged(),oe.hasChanged(109)||oe.hasChanged(45)){const he=this.editor.getOptions();this.foldingDecorationProvider.showFoldingControls=he.get(109),this.foldingDecorationProvider.showFoldingHighlights=he.get(45),this.triggerFoldingModelChanged()}oe.hasChanged(44)&&(this._useFoldingProviders=this.editor.getOptions().get(44)!=="indentation",this.onFoldingStrategyChanged()),oe.hasChanged(48)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(48)),oe.hasChanged(46)&&(this._foldingImportsByDefault=this.editor.getOptions().get(46))})),this.onModelChanged()}saveViewState(){const ae=this.editor.getModel();if(!ae||!this._isEnabled||ae.isTooLargeForTokenization())return{};if(this.foldingModel){const X=this.foldingModel.getMemento(),K=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:X,lineCount:ae.getLineCount(),provider:K,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(ae){const X=this.editor.getModel();if(!(!X||!this._isEnabled||X.isTooLargeForTokenization()||!this.hiddenRangeModel)&&ae&&(this._currentModelHasFoldedImports=!!ae.foldedImports,ae.collapsedRegions&&ae.collapsedRegions.length>0&&this.foldingModel)){this._restoringViewState=!0;try{this.foldingModel.applyMemento(ae.collapsedRegions)}finally{this._restoringViewState=!1}}}onModelChanged(){this.localToDispose.clear();const ae=this.editor.getModel();!this._isEnabled||!ae||ae.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new t.FoldingModel(ae,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new r.HiddenRangeModel(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(X=>this.onHiddenRangesChanges(X))),this.updateScheduler=new L.Delayer(this.updateDebounceInfo.get(ae)),this.cursorChangedScheduler=new L.RunOnceScheduler(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(X=>this.onDidChangeModelContent(X))),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(X=>this.onEditorMouseDown(X))),this.localToDispose.add(this.editor.onMouseUp(X=>this.onEditorMouseUp(X))),this.localToDispose.add({dispose:()=>{var X,K;this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),(X=this.updateScheduler)===null||X===void 0||X.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,(K=this.rangeProvider)===null||K===void 0||K.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){var ae;(ae=this.rangeProvider)===null||ae===void 0||ae.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(ae){if(this.rangeProvider)return this.rangeProvider;const X=new u.IndentRangeProvider(ae,this.languageConfigurationService,this._foldingLimitReporter);if(this.rangeProvider=X,this._useFoldingProviders&&this.foldingModel){const K=R.getFoldingRangeProviders(this.languageFeaturesService,ae);K.length>0&&(this.rangeProvider=new c.SyntaxRangeProvider(ae,K,()=>this.triggerFoldingModelChanged(),this._foldingLimitReporter,X))}return this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(ae){var X;(X=this.hiddenRangeModel)===null||X===void 0||X.notifyChangeModelContent(ae),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger(()=>{const ae=this.foldingModel;if(!ae)return null;const X=new h.StopWatch,K=this.getRangeProvider(ae.textModel),z=this.foldingRegionPromise=(0,L.createCancelablePromise)(Q=>K.compute(Q));return z.then(Q=>{if(Q&&z===this.foldingRegionPromise){let j;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const me=Q.setCollapsedAllOfType(i.FoldingRangeKind.Imports.value,!0);me&&(j=v.StableEditorScrollState.capture(this.editor),this._currentModelHasFoldedImports=me)}const re=this.editor.getSelections(),oe=re?re.map(me=>me.startLineNumber):[];ae.update(Q,oe),j?.restore(this.editor);const he=this.updateDebounceInfo.update(ae.textModel,X.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=he)}return ae})}).then(void 0,ae=>((0,y.onUnexpectedError)(ae),null)))}onHiddenRangesChanges(ae){if(this.hiddenRangeModel&&ae.length&&!this._restoringViewState){const X=this.editor.getSelections();X&&this.hiddenRangeModel.adjustSelections(X)&&this.editor.setSelections(X)}this.editor.setHiddenAreas(ae,this)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const ae=this.getFoldingModel();ae&&ae.then(X=>{if(X){const K=this.editor.getSelections();if(K&&K.length>0){const z=[];for(const Q of K){const j=Q.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(j)&&z.push(...X.getAllRegionsAtLine(j,re=>re.isCollapsed&&j>re.startLineNumber))}z.length&&(X.toggleCollapseState(z),this.reveal(K[0].getPosition()))}}}).then(void 0,y.onUnexpectedError)}onEditorMouseDown(ae){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!ae.target||!ae.target.range||!ae.event.leftButton&&!ae.event.middleButton)return;const X=ae.target.range;let K=!1;switch(ae.target.type){case 4:{const z=ae.target.detail,Q=ae.target.element.offsetLeft;if(z.offsetX-Q<4)return;K=!0;break}case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!ae.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){const z=this.editor.getModel();if(z&&X.startColumn===z.getLineMaxColumn(X.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:X.startLineNumber,iconClicked:K}}onEditorMouseUp(ae){const X=this.foldingModel;if(!X||!this.mouseDownInfo||!ae.target)return;const K=this.mouseDownInfo.lineNumber,z=this.mouseDownInfo.iconClicked,Q=ae.target.range;if(!Q||Q.startLineNumber!==K)return;if(z){if(ae.target.type!==4)return}else{const re=this.editor.getModel();if(!re||Q.startColumn!==re.getLineMaxColumn(K))return}const j=X.getRegionAtLine(K);if(j&&j.startLineNumber===K){const re=j.isCollapsed;if(z||re){const oe=ae.event.altKey;let he=[];if(oe){const me=ve=>!ve.containedBy(j)&&!j.containedBy(ve),pe=X.getRegionsInside(null,me);for(const ve of pe)ve.isCollapsed&&he.push(ve);he.length===0&&(he=pe)}else{const me=ae.event.middleButton||ae.event.shiftKey;if(me)for(const pe of X.getRegionsInside(j))pe.isCollapsed===re&&he.push(pe);(re||!me||he.length===0)&&he.push(j)}X.toggleCollapseState(he),this.reveal({lineNumber:K,column:1})}}}reveal(ae){this.editor.revealPositionInCenterIfOutsideViewport(ae,0)}};e.FoldingController=T,T.ID="editor.contrib.folding",e.FoldingController=T=R=Ie([ge(1,d.IContextKeyService),ge(2,n.ILanguageConfigurationService),ge(3,a.INotificationService),ge(4,g.ILanguageFeatureDebounceService),ge(5,p.ILanguageFeaturesService)],T);class N{constructor(ae){this.editor=ae,this._onDidChange=new b.Emitter,this._computed=0,this._limited=!1}get limit(){return this.editor.getOptions().get(47)}update(ae,X){(ae!==this._computed||X!==this._limited)&&(this._computed=ae,this._limited=X,this._onDidChange.fire())}}e.RangesLimitReporter=N;class A extends C.EditorAction{runEditorCommand(ae,X,K){const z=ae.get(n.ILanguageConfigurationService),Q=T.get(X);if(!Q)return;const j=Q.getFoldingModel();if(j)return this.reportTelemetry(ae,X),j.then(re=>{if(re){this.invoke(Q,re,X,K,z);const oe=X.getSelection();oe&&Q.reveal(oe.getStartPosition())}})}getSelectedLines(ae){const X=ae.getSelections();return X?X.map(K=>K.startLineNumber):[]}getLineNumbers(ae,X){return ae&&ae.selectionLines?ae.selectionLines.map(K=>K+1):this.getSelectedLines(X)}run(ae,X){}}function P(ce){if(!_.isUndefined(ce)){if(!_.isObject(ce))return!1;const ae=ce;if(!_.isUndefined(ae.levels)&&!_.isNumber(ae.levels)||!_.isUndefined(ae.direction)&&!_.isString(ae.direction)||!_.isUndefined(ae.selectionLines)&&(!Array.isArray(ae.selectionLines)||!ae.selectionLines.every(_.isNumber)))return!1}return!0}class O extends A{constructor(){super({id:"editor.unfold",label:f.localize(0,null),alias:"Unfold",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:3166,mac:{primary:2654},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: - * 'levels': Number of levels to unfold. If not set, defaults to 1. - * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. - * 'selectionLines': Array of 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. - `,constraint:P,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(ae,X,K,z){const Q=z&&z.levels||1,j=this.getLineNumbers(z,K);z&&z.direction==="up"?(0,t.setCollapseStateLevelsUp)(X,!1,Q,j):(0,t.setCollapseStateLevelsDown)(X,!1,Q,j)}}class x extends A{constructor(){super({id:"editor.unfoldRecursively",label:f.localize(1,null),alias:"Unfold Recursively",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2142),weight:100}})}invoke(ae,X,K,z){(0,t.setCollapseStateLevelsDown)(X,!1,Number.MAX_VALUE,this.getSelectedLines(K))}}class W extends A{constructor(){super({id:"editor.fold",label:f.localize(2,null),alias:"Fold",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:3164,mac:{primary:2652},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: - * 'levels': Number of levels to fold. - * 'direction': If 'up', folds given number of levels up otherwise folds down. - * 'selectionLines': Array of 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. - If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. - `,constraint:P,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(ae,X,K,z){const Q=this.getLineNumbers(z,K),j=z&&z.levels,re=z&&z.direction;typeof j!="number"&&typeof re!="string"?(0,t.setCollapseStateUp)(X,!0,Q):re==="up"?(0,t.setCollapseStateLevelsUp)(X,!0,j||1,Q):(0,t.setCollapseStateLevelsDown)(X,!0,j||1,Q)}}class U extends A{constructor(){super({id:"editor.toggleFold",label:f.localize(3,null),alias:"Toggle Fold",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2090),weight:100}})}invoke(ae,X,K){const z=this.getSelectedLines(K);(0,t.toggleCollapseState)(X,1,z)}}class F extends A{constructor(){super({id:"editor.foldRecursively",label:f.localize(4,null),alias:"Fold Recursively",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2140),weight:100}})}invoke(ae,X,K){const z=this.getSelectedLines(K);(0,t.setCollapseStateLevelsDown)(X,!0,Number.MAX_VALUE,z)}}class G extends A{constructor(){super({id:"editor.foldAllBlockComments",label:f.localize(5,null),alias:"Fold All Block Comments",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2138),weight:100}})}invoke(ae,X,K,z,Q){if(X.regions.hasTypes())(0,t.setCollapseStateForType)(X,i.FoldingRangeKind.Comment.value,!0);else{const j=K.getModel();if(!j)return;const re=Q.getLanguageConfiguration(j.getLanguageId()).comments;if(re&&re.blockCommentStartToken){const oe=new RegExp("^\\s*"+(0,m.escapeRegExpCharacters)(re.blockCommentStartToken));(0,t.setCollapseStateForMatchingLines)(X,oe,!0)}}}}class Y extends A{constructor(){super({id:"editor.foldAllMarkerRegions",label:f.localize(6,null),alias:"Fold All Regions",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2077),weight:100}})}invoke(ae,X,K,z,Q){if(X.regions.hasTypes())(0,t.setCollapseStateForType)(X,i.FoldingRangeKind.Region.value,!0);else{const j=K.getModel();if(!j)return;const re=Q.getLanguageConfiguration(j.getLanguageId()).foldingRules;if(re&&re.markers&&re.markers.start){const oe=new RegExp(re.markers.start);(0,t.setCollapseStateForMatchingLines)(X,oe,!0)}}}}class ne extends A{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:f.localize(7,null),alias:"Unfold All Regions",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2078),weight:100}})}invoke(ae,X,K,z,Q){if(X.regions.hasTypes())(0,t.setCollapseStateForType)(X,i.FoldingRangeKind.Region.value,!1);else{const j=K.getModel();if(!j)return;const re=Q.getLanguageConfiguration(j.getLanguageId()).foldingRules;if(re&&re.markers&&re.markers.start){const oe=new RegExp(re.markers.start);(0,t.setCollapseStateForMatchingLines)(X,oe,!1)}}}}class se extends A{constructor(){super({id:"editor.foldAllExcept",label:f.localize(8,null),alias:"Fold All Except Selected",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2136),weight:100}})}invoke(ae,X,K){const z=this.getSelectedLines(K);(0,t.setCollapseStateForRest)(X,!0,z)}}class J extends A{constructor(){super({id:"editor.unfoldAllExcept",label:f.localize(9,null),alias:"Unfold All Except Selected",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2134),weight:100}})}invoke(ae,X,K){const z=this.getSelectedLines(K);(0,t.setCollapseStateForRest)(X,!1,z)}}class q extends A{constructor(){super({id:"editor.foldAll",label:f.localize(10,null),alias:"Fold All",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2069),weight:100}})}invoke(ae,X,K){(0,t.setCollapseStateLevelsDown)(X,!0)}}class H extends A{constructor(){super({id:"editor.unfoldAll",label:f.localize(11,null),alias:"Unfold All",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2088),weight:100}})}invoke(ae,X,K){(0,t.setCollapseStateLevelsDown)(X,!1)}}class V extends A{getFoldingLevel(){return parseInt(this.id.substr(V.ID_PREFIX.length))}invoke(ae,X,K){(0,t.setCollapseStateAtLevel)(X,this.getFoldingLevel(),!0,this.getSelectedLines(K))}}V.ID_PREFIX="editor.foldLevel",V.ID=ce=>V.ID_PREFIX+ce;class Z extends A{constructor(){super({id:"editor.gotoParentFold",label:f.localize(12,null),alias:"Go to Parent Fold",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100}})}invoke(ae,X,K){const z=this.getSelectedLines(K);if(z.length>0){const Q=(0,t.getParentFoldLine)(z[0],X);Q!==null&&K.setSelection({startLineNumber:Q,startColumn:1,endLineNumber:Q,endColumn:1})}}}class ee extends A{constructor(){super({id:"editor.gotoPreviousFold",label:f.localize(13,null),alias:"Go to Previous Folding Range",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100}})}invoke(ae,X,K){const z=this.getSelectedLines(K);if(z.length>0){const Q=(0,t.getPreviousFoldLine)(z[0],X);Q!==null&&K.setSelection({startLineNumber:Q,startColumn:1,endLineNumber:Q,endColumn:1})}}}class le extends A{constructor(){super({id:"editor.gotoNextFold",label:f.localize(14,null),alias:"Go to Next Folding Range",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,weight:100}})}invoke(ae,X,K){const z=this.getSelectedLines(K);if(z.length>0){const Q=(0,t.getNextFoldLine)(z[0],X);Q!==null&&K.setSelection({startLineNumber:Q,startColumn:1,endLineNumber:Q,endColumn:1})}}}class ue extends A{constructor(){super({id:"editor.createFoldingRangeFromSelection",label:f.localize(15,null),alias:"Create Folding Range from Selection",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2135),weight:100}})}invoke(ae,X,K){var z;const Q=[],j=K.getSelections();if(j){for(const re of j){let oe=re.endLineNumber;re.endColumn===1&&--oe,oe>re.startLineNumber&&(Q.push({startLineNumber:re.startLineNumber,endLineNumber:oe,type:void 0,isCollapsed:!0,source:1}),K.setSelection({startLineNumber:re.startLineNumber,startColumn:1,endLineNumber:re.startLineNumber,endColumn:1}))}if(Q.length>0){Q.sort((oe,he)=>oe.startLineNumber-he.startLineNumber);const re=o.FoldingRegions.sanitizeAndMerge(X.regions,Q,(z=K.getModel())===null||z===void 0?void 0:z.getLineCount());X.updatePost(o.FoldingRegions.fromFoldRanges(re))}}}}class de extends A{constructor(){super({id:"editor.removeManualFoldingRanges",label:f.localize(16,null),alias:"Remove Manual Folding Ranges",precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2137),weight:100}})}invoke(ae,X,K){const z=K.getSelections();if(z){const Q=[];for(const j of z){const{startLineNumber:re,endLineNumber:oe}=j;Q.push(oe>=re?{startLineNumber:re,endLineNumber:oe}:{endLineNumber:oe,startLineNumber:re})}X.removeManualRanges(Q),ae.triggerFoldingModelChanged()}}}(0,C.registerEditorContribution)(T.ID,T,0),(0,C.registerEditorAction)(O),(0,C.registerEditorAction)(x),(0,C.registerEditorAction)(W),(0,C.registerEditorAction)(F),(0,C.registerEditorAction)(q),(0,C.registerEditorAction)(H),(0,C.registerEditorAction)(G),(0,C.registerEditorAction)(Y),(0,C.registerEditorAction)(ne),(0,C.registerEditorAction)(se),(0,C.registerEditorAction)(J),(0,C.registerEditorAction)(U),(0,C.registerEditorAction)(Z),(0,C.registerEditorAction)(ee),(0,C.registerEditorAction)(le),(0,C.registerEditorAction)(ue),(0,C.registerEditorAction)(de);for(let ce=1;ce<=7;ce++)(0,C.registerInstantiatedEditorAction)(new V({id:V.ID(ce),label:f.localize(17,null,ce),alias:`Fold Level ${ce}`,precondition:B,kbOpts:{kbExpr:s.EditorContextKeys.editorTextFocus,primary:(0,D.KeyChord)(2089,2048|21+ce),weight:100}}));w.CommandsRegistry.registerCommand("_executeFoldingRangeProvider",function(ce,...ae){return be(this,void 0,void 0,function*(){const[X]=ae;if(!(X instanceof E.URI))throw(0,y.illegalArgument)();const K=ce.get(p.ILanguageFeaturesService),z=ce.get(k.IModelService).getModel(X);if(!z)throw(0,y.illegalArgument)();const Q=ce.get(M.IConfigurationService);if(!Q.getValue("editor.folding",{resource:X}))return[];const j=ce.get(n.ILanguageConfigurationService),re=Q.getValue("editor.foldingStrategy",{resource:X}),oe={get limit(){return Q.getValue("editor.foldingMaximumRegions",{resource:X})},update:(we,Le)=>{}},he=new u.IndentRangeProvider(z,j,oe);let me=he;if(re!=="indentation"){const we=T.getFoldingRangeProviders(K,z);we.length&&(me=new c.SyntaxRangeProvider(z,we,()=>{},oe,he))}const pe=yield me.compute(I.CancellationToken.None),ve=[];try{if(pe)for(let we=0;wex.hoverOrdinal-W.hoverOrdinal),this._computer=new B(this._editor,this._participants),this._hoverOperation=this._register(new C.HoverOperation(this._editor,this._computer)),this._register(this._hoverOperation.onResult(x=>{if(!this._computer.anchor)return;const W=x.hasLoadingMessage?this._addLoadingMessage(x.value):x.value;this._withResult(new h(this._computer.anchor,W,x.isComplete))})),this._register(L.addStandardDisposableListener(this._widget.getDomNode(),"keydown",x=>{x.equals(9)&&this.hide()})),this._register(v.TokenizationRegistry.onDidChange(()=>{this._widget.position&&this._currentResult&&this._setCurrentResult(this._currentResult)}))}get widget(){return this._widget}maybeShowAt(A){if(this._widget.isResizing)return!0;const P=[];for(const x of this._participants)if(x.suggestHoverAnchor){const W=x.suggestHoverAnchor(A);W&&P.push(W)}const O=A.target;if(O.type===6&&P.push(new s.HoverRangeAnchor(0,O.range,A.event.posx,A.event.posy)),O.type===7){const x=this._editor.getOption(50).typicalHalfwidthCharacterWidth/2;!O.detail.isAfterLines&&typeof O.detail.horizontalDistanceToText=="number"&&O.detail.horizontalDistanceToTextW.priority-x.priority),this._startShowingOrUpdateHover(P[0],0,0,!1,A))}startShowingAtRange(A,P,O,x){this._startShowingOrUpdateHover(new s.HoverRangeAnchor(0,A,void 0,void 0),P,O,x,null)}_startShowingOrUpdateHover(A,P,O,x,W){return!this._widget.position||!this._currentResult?A?(this._startHoverOperationIfNecessary(A,P,O,x,!1),!0):!1:this._editor.getOption(60).sticky&&W&&this._widget.isMouseGettingCloser(W.event.posx,W.event.posy)?(A&&this._startHoverOperationIfNecessary(A,P,O,x,!0),!0):A?A&&this._currentResult.anchor.equals(A)?!0:A.canAdoptVisibleHover(this._currentResult.anchor,this._widget.position)?(this._setCurrentResult(this._currentResult.filter(A)),this._startHoverOperationIfNecessary(A,P,O,x,!1),!0):(this._setCurrentResult(null),this._startHoverOperationIfNecessary(A,P,O,x,!1),!0):(this._setCurrentResult(null),!1)}_startHoverOperationIfNecessary(A,P,O,x,W){this._computer.anchor&&this._computer.anchor.equals(A)||(this._hoverOperation.cancel(),this._computer.anchor=A,this._computer.shouldFocus=x,this._computer.source=O,this._computer.insistOnKeepingHoverVisible=W,this._hoverOperation.start(P))}_setCurrentResult(A){this._currentResult!==A&&(A&&A.messages.length===0&&(A=null),this._currentResult=A,this._currentResult?this._renderMessages(this._currentResult.anchor,this._currentResult.messages):this._widget.hide())}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._setCurrentResult(null)}get isColorPickerVisible(){return this._widget.isColorPickerVisible}get isVisibleFromKeyboard(){return this._widget.isVisibleFromKeyboard}get isVisible(){return this._widget.isVisible}get isFocused(){return this._widget.isFocused}get isResizing(){return this._widget.isResizing}containsNode(A){return A?this._widget.getDomNode().contains(A):!1}_addLoadingMessage(A){if(this._computer.anchor){for(const P of this._participants)if(P.createLoadingMessage){const O=P.createLoadingMessage(this._computer.anchor);if(O)return A.slice(0).concat([O])}}return A}_withResult(A){this._widget.position&&this._currentResult&&this._currentResult.isComplete&&(!A.isComplete||this._computer.insistOnKeepingHoverVisible&&A.messages.length===0)||this._setCurrentResult(A)}_renderMessages(A,P){const{showAtPosition:O,showAtSecondaryPosition:x,highlightRange:W}=o.computeHoverRanges(this._editor,A.range,P),U=new D.DisposableStore,F=U.add(new R(this._keybindingService)),G=document.createDocumentFragment();let Y=null;const ne={fragment:G,statusBar:F,setColorPicker:J=>Y=J,onContentsChanged:()=>this._widget.onContentsChanged(),setMinimumDimensions:J=>this._widget.setMinimumDimensions(J),hide:()=>this.hide()};for(const J of this._participants){const q=P.filter(H=>H.owner===J);q.length>0&&U.add(J.renderHoverParts(ne,q))}const se=P.some(J=>J.isBeforeContent);if(F.hasContent&&G.appendChild(F.hoverElement),G.hasChildNodes()){if(W){const J=this._editor.createDecorationsCollection();J.set([{range:W,options:o._DECORATION_OPTIONS}]),U.add((0,D.toDisposable)(()=>{J.clear()}))}this._widget.showAt(G,new b(Y,O,x,this._editor.getOption(60).above,this._computer.shouldFocus,this._computer.source,se,A.initialMousePosX,A.initialMousePosY,U))}else U.dispose()}static computeHoverRanges(A,P,O){let x=1;if(A.hasModel()){const Y=A._getViewModel(),ne=Y.coordinatesConverter,se=ne.convertModelRangeToViewRange(P),J=new S.Position(se.startLineNumber,Y.getLineMinColumn(se.startLineNumber));x=ne.convertViewPositionToModelPosition(J).column}const W=P.startLineNumber;let U=P.startColumn,F=O[0].range,G=null;for(const Y of O)F=m.Range.plusRange(F,Y.range),Y.range.startLineNumber===W&&Y.range.endLineNumber===W&&(U=Math.max(Math.min(U,Y.range.startColumn),x)),Y.forceShowAtRange&&(G=Y.range);return{showAtPosition:G?G.getStartPosition():new S.Position(W,P.startColumn),showAtSecondaryPosition:G?G.getStartPosition():new S.Position(W,U),highlightRange:F}}focus(){this._widget.focus()}scrollUp(){this._widget.scrollUp()}scrollDown(){this._widget.scrollDown()}scrollLeft(){this._widget.scrollLeft()}scrollRight(){this._widget.scrollRight()}pageUp(){this._widget.pageUp()}pageDown(){this._widget.pageDown()}goToTop(){this._widget.goToTop()}goToBottom(){this._widget.goToBottom()}};e.ContentHoverController=g,g._DECORATION_OPTIONS=_.ModelDecorationOptions.register({description:"content-hover-highlight",className:"hoverHighlight"}),e.ContentHoverController=g=o=Ie([ge(1,i.IInstantiationService),ge(2,n.IKeybindingService)],g);class h{constructor(A,P,O){this.anchor=A,this.messages=P,this.isComplete=O}filter(A){const P=this.messages.filter(O=>O.isValidForHoverAnchor(A));return P.length===this.messages.length?this:new p(this,this.anchor,P,this.isComplete)}}class p extends h{constructor(A,P,O,x){super(P,O,x),this.original=A}filter(A){return this.original.filter(A)}}class b{constructor(A,P,O,x,W,U,F,G,Y,ne){this.colorPicker=A,this.showAtPosition=P,this.showAtSecondaryPosition=O,this.preferAbove=x,this.stoleFocus=W,this.source=U,this.isBeforeContent=F,this.initialMousePosX=G,this.initialMousePosY=Y,this.disposables=ne,this.closestMouseDistance=void 0}}const w=30,E=10,k=6;let M=c=class extends f.ResizableContentWidget{get isColorPickerVisible(){var A;return!!(!((A=this._visibleData)===null||A===void 0)&&A.colorPicker)}get isVisibleFromKeyboard(){var A;return((A=this._visibleData)===null||A===void 0?void 0:A.source)===1}get isVisible(){var A;return(A=this._hoverVisibleKey.get())!==null&&A!==void 0?A:!1}get isFocused(){var A;return(A=this._hoverFocusedKey.get())!==null&&A!==void 0?A:!1}constructor(A,P,O,x,W){const U=A.getOption(66)+8,F=150,G=new L.Dimension(F,U);super(A,G),this._configurationService=O,this._accessibilityService=x,this._keybindingService=W,this._hover=this._register(new I.HoverWidget),this._minimumSize=G,this._hoverVisibleKey=r.EditorContextKeys.hoverVisible.bindTo(P),this._hoverFocusedKey=r.EditorContextKeys.hoverFocused.bindTo(P),L.append(this._resizableNode.domNode,this._hover.containerDomNode),this._resizableNode.domNode.style.zIndex="50",this._register(this._editor.onDidLayoutChange(()=>this._layout())),this._register(this._editor.onDidChangeConfiguration(ne=>{ne.hasChanged(50)&&this._updateFont()}));const Y=this._register(L.trackFocus(this._resizableNode.domNode));this._register(Y.onDidFocus(()=>{this._hoverFocusedKey.set(!0)})),this._register(Y.onDidBlur(()=>{this._hoverFocusedKey.set(!1)})),this._setHoverData(void 0),this._layout(),this._editor.addContentWidget(this)}dispose(){var A;super.dispose(),(A=this._visibleData)===null||A===void 0||A.disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return c.ID}static _applyDimensions(A,P,O){const x=typeof P=="number"?`${P}px`:P,W=typeof O=="number"?`${O}px`:O;A.style.width=x,A.style.height=W}_setContentsDomNodeDimensions(A,P){const O=this._hover.contentsDomNode;return c._applyDimensions(O,A,P)}_setContainerDomNodeDimensions(A,P){const O=this._hover.containerDomNode;return c._applyDimensions(O,A,P)}_setHoverWidgetDimensions(A,P){this._setContentsDomNodeDimensions(A,P),this._setContainerDomNodeDimensions(A,P),this._layoutContentWidget()}static _applyMaxDimensions(A,P,O){const x=typeof P=="number"?`${P}px`:P,W=typeof O=="number"?`${O}px`:O;A.style.maxWidth=x,A.style.maxHeight=W}_setHoverWidgetMaxDimensions(A,P){c._applyMaxDimensions(this._hover.contentsDomNode,A,P),c._applyMaxDimensions(this._hover.containerDomNode,A,P),this._hover.containerDomNode.style.setProperty("--vscode-hover-maxWidth",typeof A=="number"?`${A}px`:A),this._layoutContentWidget()}_hasHorizontalScrollbar(){const A=this._hover.scrollbar.getScrollDimensions();return A.scrollWidth>A.width}_adjustContentsBottomPadding(){const A=this._hover.contentsDomNode,P=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;A.style.paddingBottom!==P&&(A.style.paddingBottom=P)}_setAdjustedHoverWidgetDimensions(A){this._setHoverWidgetMaxDimensions("none","none");const P=A.width,O=A.height;this._setHoverWidgetDimensions(P,O),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._setContentsDomNodeDimensions(P,O-E))}_updateResizableNodeMaxDimensions(){var A,P;const O=(A=this._findMaximumRenderingWidth())!==null&&A!==void 0?A:1/0,x=(P=this._findMaximumRenderingHeight())!==null&&P!==void 0?P:1/0;this._resizableNode.maxSize=new L.Dimension(O,x),this._setHoverWidgetMaxDimensions(O,x)}_resize(A){var P,O;c._lastDimensions=new L.Dimension(A.width,A.height),this._setAdjustedHoverWidgetDimensions(A),this._resizableNode.layout(A.height,A.width),this._updateResizableNodeMaxDimensions(),this._hover.scrollbar.scanDomNode(),this._editor.layoutContentWidget(this),(O=(P=this._visibleData)===null||P===void 0?void 0:P.colorPicker)===null||O===void 0||O.layout()}_findAvailableSpaceVertically(){var A;const P=(A=this._visibleData)===null||A===void 0?void 0:A.showAtPosition;if(P)return this._positionPreference===1?this._availableVerticalSpaceAbove(P):this._availableVerticalSpaceBelow(P)}_findMaximumRenderingHeight(){const A=this._findAvailableSpaceVertically();if(!A)return;let P=k;return Array.from(this._hover.contentsDomNode.children).forEach(O=>{P+=O.clientHeight}),this._hasHorizontalScrollbar()&&(P+=E),Math.min(A,P)}_isHoverTextOverflowing(){this._hover.containerDomNode.style.setProperty("--vscode-hover-whiteSpace","nowrap"),this._hover.containerDomNode.style.setProperty("--vscode-hover-sourceWhiteSpace","nowrap");const A=Array.from(this._hover.contentsDomNode.children).some(P=>P.scrollWidth>P.clientWidth);return this._hover.containerDomNode.style.removeProperty("--vscode-hover-whiteSpace"),this._hover.containerDomNode.style.removeProperty("--vscode-hover-sourceWhiteSpace"),A}_findMaximumRenderingWidth(){if(!this._editor||!this._editor.hasModel())return;const A=this._isHoverTextOverflowing(),P=typeof this._contentWidth>"u"?0:this._contentWidth-2;return A||this._hover.containerDomNode.clientWidth"u"||typeof this._visibleData.initialMousePosY>"u")return this._visibleData.initialMousePosX=A,this._visibleData.initialMousePosY=P,!1;const O=L.getDomNodePagePosition(this.getDomNode());typeof this._visibleData.closestMouseDistance>"u"&&(this._visibleData.closestMouseDistance=T(this._visibleData.initialMousePosX,this._visibleData.initialMousePosY,O.left,O.top,O.width,O.height));const x=T(A,P,O.left,O.top,O.width,O.height);return x>this._visibleData.closestMouseDistance+4?!1:(this._visibleData.closestMouseDistance=Math.min(this._visibleData.closestMouseDistance,x),!0)}_setHoverData(A){var P;(P=this._visibleData)===null||P===void 0||P.disposables.dispose(),this._visibleData=A,this._hoverVisibleKey.set(!!A),this._hover.containerDomNode.classList.toggle("hidden",!A)}_layout(){const{fontSize:A,lineHeight:P}=this._editor.getOption(50),O=this._hover.contentsDomNode;O.style.fontSize=`${A}px`,O.style.lineHeight=`${P/A}`,this._updateMaxDimensions()}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(P=>this._editor.applyFontInfo(P))}_updateContent(A){const P=this._hover.contentsDomNode;P.style.paddingBottom="",P.textContent="",P.appendChild(A)}_layoutContentWidget(){this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}_updateMaxDimensions(){const A=Math.max(this._editor.getLayoutInfo().height/4,250,c._lastDimensions.height),P=Math.max(this._editor.getLayoutInfo().width*.66,500,c._lastDimensions.width);this._setHoverWidgetMaxDimensions(P,A)}_render(A,P){this._setHoverData(P),this._updateFont(),this._updateContent(A),this._updateMaxDimensions(),this.onContentsChanged(),this._editor.render()}getPosition(){var A;return this._visibleData?{position:this._visibleData.showAtPosition,secondaryPosition:this._visibleData.showAtSecondaryPosition,positionAffinity:this._visibleData.isBeforeContent?3:void 0,preference:[(A=this._positionPreference)!==null&&A!==void 0?A:1]}:null}showAt(A,P){var O,x,W,U;if(!this._editor||!this._editor.hasModel())return;this._render(A,P);const F=L.getTotalHeight(this._hover.containerDomNode),G=P.showAtPosition;this._positionPreference=(O=this._findPositionPreference(F,G))!==null&&O!==void 0?O:1,this.onContentsChanged(),P.stoleFocus&&this._hover.containerDomNode.focus(),(x=P.colorPicker)===null||x===void 0||x.layout();const Y=(0,I.getHoverAccessibleViewHint)(this._configurationService.getValue("accessibility.verbosity.hover")===!0&&this._accessibilityService.isScreenReaderOptimized(),(U=(W=this._keybindingService.lookupKeybinding("editor.action.accessibleView"))===null||W===void 0?void 0:W.getAriaLabel())!==null&&U!==void 0?U:"");Y&&(this._hover.contentsDomNode.ariaLabel=this._hover.contentsDomNode.textContent+", "+Y)}hide(){if(!this._visibleData)return;const A=this._visibleData.stoleFocus||this._hoverFocusedKey.get();this._setHoverData(void 0),this._resizableNode.maxSize=new L.Dimension(1/0,1/0),this._resizableNode.clearSashHoverState(),this._hoverFocusedKey.set(!1),this._editor.layoutContentWidget(this),A&&this._editor.focus()}_removeConstraintsRenderNormally(){const A=this._editor.getLayoutInfo();this._resizableNode.layout(A.height,A.width),this._setHoverWidgetDimensions("auto","auto")}_adjustHoverHeightForScrollbar(A){var P;const O=this._hover.containerDomNode,x=this._hover.contentsDomNode,W=(P=this._findMaximumRenderingHeight())!==null&&P!==void 0?P:1/0;this._setContainerDomNodeDimensions(L.getTotalWidth(O),Math.min(W,A)),this._setContentsDomNodeDimensions(L.getTotalWidth(x),Math.min(W,A-E))}setMinimumDimensions(A){this._minimumSize=new L.Dimension(Math.max(this._minimumSize.width,A.width),Math.max(this._minimumSize.height,A.height)),this._updateMinimumWidth()}_updateMinimumWidth(){const A=typeof this._contentWidth>"u"?this._minimumSize.width:Math.min(this._contentWidth,this._minimumSize.width);this._resizableNode.minSize=new L.Dimension(A,this._minimumSize.height)}onContentsChanged(){var A;this._removeConstraintsRenderNormally();const P=this._hover.containerDomNode;let O=L.getTotalHeight(P),x=L.getTotalWidth(P);if(this._resizableNode.layout(O,x),this._setHoverWidgetDimensions(x,O),O=L.getTotalHeight(P),x=L.getTotalWidth(P),this._contentWidth=x,this._updateMinimumWidth(),this._resizableNode.layout(O,x),this._hasHorizontalScrollbar()&&(this._adjustContentsBottomPadding(),this._adjustHoverHeightForScrollbar(O)),!((A=this._visibleData)===null||A===void 0)&&A.showAtPosition){const W=L.getTotalHeight(this._hover.containerDomNode);this._positionPreference=this._findPositionPreference(W,this._visibleData.showAtPosition)}this._layoutContentWidget()}focus(){this._hover.containerDomNode.focus()}scrollUp(){const A=this._hover.scrollbar.getScrollPosition().scrollTop,P=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:A-P.lineHeight})}scrollDown(){const A=this._hover.scrollbar.getScrollPosition().scrollTop,P=this._editor.getOption(50);this._hover.scrollbar.setScrollPosition({scrollTop:A+P.lineHeight})}scrollLeft(){const A=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:A-w})}scrollRight(){const A=this._hover.scrollbar.getScrollPosition().scrollLeft;this._hover.scrollbar.setScrollPosition({scrollLeft:A+w})}pageUp(){const A=this._hover.scrollbar.getScrollPosition().scrollTop,P=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:A-P})}pageDown(){const A=this._hover.scrollbar.getScrollPosition().scrollTop,P=this._hover.scrollbar.getScrollDimensions().height;this._hover.scrollbar.setScrollPosition({scrollTop:A+P})}goToTop(){this._hover.scrollbar.setScrollPosition({scrollTop:0})}goToBottom(){this._hover.scrollbar.setScrollPosition({scrollTop:this._hover.scrollbar.getScrollDimensions().scrollHeight})}};e.ContentHoverWidget=M,M.ID="editor.contrib.resizableContentHoverWidget",M._lastDimensions=new L.Dimension(0,0),e.ContentHoverWidget=M=c=Ie([ge(1,u.IContextKeyService),ge(2,d.IConfigurationService),ge(3,l.IAccessibilityService),ge(4,n.IKeybindingService)],M);let R=class extends D.Disposable{get hasContent(){return this._hasContent}constructor(A){super(),this._keybindingService=A,this._hasContent=!1,this.hoverElement=a("div.hover-row.status-bar"),this.actionsElement=L.append(this.hoverElement,a("div.actions"))}addAction(A){const P=this._keybindingService.lookupKeybinding(A.commandId),O=P?P.getLabel():null;return this._hasContent=!0,this._register(I.HoverAction.render(this.actionsElement,A,O))}append(A){const P=L.append(this.actionsElement,A);return this._hasContent=!0,P}};e.EditorHoverStatusBar=R,e.EditorHoverStatusBar=R=Ie([ge(0,n.IKeybindingService)],R);class B{get anchor(){return this._anchor}set anchor(A){this._anchor=A}get shouldFocus(){return this._shouldFocus}set shouldFocus(A){this._shouldFocus=A}get source(){return this._source}set source(A){this._source=A}get insistOnKeepingHoverVisible(){return this._insistOnKeepingHoverVisible}set insistOnKeepingHoverVisible(A){this._insistOnKeepingHoverVisible=A}constructor(A,P){this._editor=A,this._participants=P,this._anchor=null,this._shouldFocus=!1,this._source=0,this._insistOnKeepingHoverVisible=!1}static _getLineDecorations(A,P){if(P.type!==1&&!P.supportsMarkerHover)return[];const O=A.getModel(),x=P.range.startLineNumber;if(x>O.getLineCount())return[];const W=O.getLineMaxColumn(x);return A.getLineDecorations(x).filter(U=>{if(U.options.isWholeLine)return!0;const F=U.range.startLineNumber===x?U.range.startColumn:1,G=U.range.endLineNumber===x?U.range.endColumn:W;if(U.options.showIfCollapsed){if(F>P.range.startColumn+1||P.range.endColumn-1>G)return!1}else if(F>P.range.startColumn||P.range.endColumn>G)return!1;return!0})}computeAsync(A){const P=this._anchor;if(!this._editor.hasModel()||!P)return t.AsyncIterableObject.EMPTY;const O=B._getLineDecorations(this._editor,P);return t.AsyncIterableObject.merge(this._participants.map(x=>x.computeAsync?x.computeAsync(P,O,A):t.AsyncIterableObject.EMPTY))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const A=B._getLineDecorations(this._editor,this._anchor);let P=[];for(const O of this._participants)P=P.concat(O.computeSync(this._anchor,A));return(0,y.coalesce)(P)}}function T(N,A,P,O,x,W){const U=P+x/2,F=O+W/2,G=Math.max(Math.abs(N-U)-x/2,0),Y=Math.max(Math.abs(A-F)-W/2,0);return Math.sqrt(G*G+Y*Y)}}),define(te[885],ie([1,0,2,368,8,371,34,6,18,16,22,15,50,32,346,7,199]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";var u,f;Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneColorPickerWidget=e.StandaloneColorPickerController=void 0;let d=u=class extends L.Disposable{constructor(h,p,b,w,E,k,M){super(),this._editor=h,this._modelService=b,this._keybindingService=w,this._instantiationService=E,this._languageFeatureService=k,this._languageConfigurationService=M,this._standaloneColorPickerWidget=null,this._standaloneColorPickerVisible=C.EditorContextKeys.standaloneColorPickerVisible.bindTo(p),this._standaloneColorPickerFocused=C.EditorContextKeys.standaloneColorPickerFocused.bindTo(p)}showOrFocus(){var h;this._editor.hasModel()&&(this._standaloneColorPickerVisible.get()?this._standaloneColorPickerFocused.get()||(h=this._standaloneColorPickerWidget)===null||h===void 0||h.focus():this._standaloneColorPickerWidget=new c(this._editor,this._standaloneColorPickerVisible,this._standaloneColorPickerFocused,this._instantiationService,this._modelService,this._keybindingService,this._languageFeatureService,this._languageConfigurationService))}hide(){var h;this._standaloneColorPickerFocused.set(!1),this._standaloneColorPickerVisible.set(!1),(h=this._standaloneColorPickerWidget)===null||h===void 0||h.hide(),this._editor.focus()}insertColor(){var h;(h=this._standaloneColorPickerWidget)===null||h===void 0||h.updateEditor(),this.hide()}static get(h){return h.getContribution(u.ID)}};e.StandaloneColorPickerController=d,d.ID="editor.contrib.standaloneColorPickerController",e.StandaloneColorPickerController=d=u=Ie([ge(1,s.IContextKeyService),ge(2,i.IModelService),ge(3,S.IKeybindingService),ge(4,y.IInstantiationService),ge(5,_.ILanguageFeaturesService),ge(6,n.ILanguageConfigurationService)],d),(0,v.registerEditorContribution)(d.ID,d,1);const l=8,o=22;let c=f=class extends L.Disposable{constructor(h,p,b,w,E,k,M,R){var B;super(),this._editor=h,this._standaloneColorPickerVisible=p,this._standaloneColorPickerFocused=b,this._modelService=E,this._keybindingService=k,this._languageFeaturesService=M,this._languageConfigurationService=R,this.allowEditorOverflow=!0,this._position=void 0,this._body=document.createElement("div"),this._colorHover=null,this._selectionSetInEditor=!1,this._onResult=this._register(new m.Emitter),this.onResult=this._onResult.event,this._standaloneColorPickerVisible.set(!0),this._standaloneColorPickerParticipant=w.createInstance(I.StandaloneColorPickerParticipant,this._editor),this._position=(B=this._editor._getViewModel())===null||B===void 0?void 0:B.getPrimaryCursorState().modelState.position;const T=this._editor.getSelection(),N=T?{startLineNumber:T.startLineNumber,startColumn:T.startColumn,endLineNumber:T.endLineNumber,endColumn:T.endColumn}:{startLineNumber:0,endLineNumber:0,endColumn:0,startColumn:0},A=this._register(r.trackFocus(this._body));this._register(A.onDidBlur(P=>{this.hide()})),this._register(A.onDidFocus(P=>{this.focus()})),this._register(this._editor.onDidChangeCursorPosition(()=>{this._selectionSetInEditor?this._selectionSetInEditor=!1:this.hide()})),this._register(this._editor.onMouseMove(P=>{var O;const x=(O=P.target.element)===null||O===void 0?void 0:O.classList;x&&x.contains("colorpicker-color-decoration")&&this.hide()})),this._register(this.onResult(P=>{this._render(P.value,P.foundInEditor)})),this._start(N),this._body.style.zIndex="50",this._editor.addContentWidget(this)}updateEditor(){this._colorHover&&this._standaloneColorPickerParticipant.updateEditorModel(this._colorHover)}getId(){return f.ID}getDomNode(){return this._body}getPosition(){if(!this._position)return null;const h=this._editor.getOption(60).above;return{position:this._position,secondaryPosition:this._position,preference:h?[1,2]:[2,1],positionAffinity:2}}hide(){this.dispose(),this._standaloneColorPickerVisible.set(!1),this._standaloneColorPickerFocused.set(!1),this._editor.removeContentWidget(this),this._editor.focus()}focus(){this._standaloneColorPickerFocused.set(!0),this._body.focus()}_start(h){return be(this,void 0,void 0,function*(){const p=yield this._computeAsync(h);p&&this._onResult.fire(new a(p.result,p.foundInEditor))})}_computeAsync(h){return be(this,void 0,void 0,function*(){if(!this._editor.hasModel())return null;const p={range:h,color:{red:0,green:0,blue:0,alpha:1}},b=yield this._standaloneColorPickerParticipant.createColorHover(p,new t.DefaultDocumentColorProvider(this._modelService,this._languageConfigurationService),this._languageFeaturesService.colorProvider);return b?{result:b.colorHover,foundInEditor:b.foundInEditor}:null})}_render(h,p){const b=document.createDocumentFragment(),w=this._register(new D.EditorHoverStatusBar(this._keybindingService));let E;const k={fragment:b,statusBar:w,setColorPicker:x=>E=x,onContentsChanged:()=>{},hide:()=>this.hide()};if(this._colorHover=h,this._register(this._standaloneColorPickerParticipant.renderHoverParts(k,[h])),E===void 0)return;this._body.classList.add("standalone-colorpicker-body"),this._body.style.maxHeight=Math.max(this._editor.getLayoutInfo().height/4,250)+"px",this._body.style.maxWidth=Math.max(this._editor.getLayoutInfo().width*.66,500)+"px",this._body.tabIndex=0,this._body.appendChild(b),E.layout();const M=E.body,R=M.saturationBox.domNode.clientWidth,B=M.domNode.clientWidth-R-o-l,T=E.body.enterButton;T?.onClicked(()=>{this.updateEditor(),this.hide()});const N=E.header,A=N.pickedColorNode;A.style.width=R+l+"px";const P=N.originalColorNode;P.style.width=B+"px";const O=E.header.closeButton;O?.onClicked(()=>{this.hide()}),p&&(T&&(T.button.textContent="Replace"),this._selectionSetInEditor=!0,this._editor.setSelection(h.range)),this._editor.layoutContentWidget(this)}};e.StandaloneColorPickerWidget=c,c.ID="editor.contrib.standaloneColorPickerWidget",e.StandaloneColorPickerWidget=c=f=Ie([ge(3,y.IInstantiationService),ge(4,i.IModelService),ge(5,S.IKeybindingService),ge(6,_.ILanguageFeaturesService),ge(7,n.ILanguageConfigurationService)],c);class a{constructor(h,p){this.value=h,this.foundInEditor=p}}}),define(te[886],ie([1,0,16,646,885,22,30,199]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowOrFocusStandaloneColorPicker=void 0;class m extends L.EditorAction2{constructor(){super({id:"editor.action.showOrFocusStandaloneColorPicker",title:{value:(0,I.localize)(0,null),mnemonicTitle:(0,I.localize)(1,null),original:"Show or Focus Standalone Color Picker"},precondition:void 0,menu:[{id:S.MenuId.CommandPalette}]})}runEditorCommand(s,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.showOrFocus()}}e.ShowOrFocusStandaloneColorPicker=m;class _ extends L.EditorAction{constructor(){super({id:"editor.action.hideColorPicker",label:(0,I.localize)(2,null),alias:"Hide the Color Picker",precondition:D.EditorContextKeys.standaloneColorPickerVisible.isEqualTo(!0),kbOpts:{primary:9,weight:100}})}run(s,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.hide()}}class v extends L.EditorAction{constructor(){super({id:"editor.action.insertColorWithStandaloneColorPicker",label:(0,I.localize)(3,null),alias:"Insert Color with Standalone Color Picker",precondition:D.EditorContextKeys.standaloneColorPickerFocused.isEqualTo(!0),kbOpts:{primary:3,weight:100}})}run(s,i){var n;(n=y.StandaloneColorPickerController.get(i))===null||n===void 0||n.insertColor()}}(0,L.registerEditorAction)(_),(0,L.registerEditorAction)(v),(0,S.registerAction2)(m)}),define(te[887],ie([1,0,14,9,103,16,5,24,22,37,115,675,547,453]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0});let t=n=class{static get(d){return d.getContribution(n.ID)}constructor(d,l){this.editor=d,this.editorWorkerService=l,this.decorations=this.editor.createDecorationsCollection()}dispose(){}run(d,l){var o;(o=this.currentRequest)===null||o===void 0||o.cancel();const c=this.editor.getSelection(),a=this.editor.getModel();if(!a||!c)return;let g=c;if(g.startLineNumber!==g.endLineNumber)return;const h=new y.EditorState(this.editor,5),p=a.uri;return this.editorWorkerService.canNavigateValueSet(p)?(this.currentRequest=(0,L.createCancelablePromise)(b=>this.editorWorkerService.navigateValueSet(p,g,l)),this.currentRequest.then(b=>{var w;if(!b||!b.range||!b.value||!h.validate(this.editor))return;const E=S.Range.lift(b.range);let k=b.range;const M=b.value.length-(g.endColumn-g.startColumn);k={startLineNumber:k.startLineNumber,startColumn:k.startColumn,endLineNumber:k.endLineNumber,endColumn:k.startColumn+b.value.length},M>1&&(g=new m.Selection(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn+M-1));const R=new i.InPlaceReplaceCommand(E,g,b.value);this.editor.pushUndoStop(),this.editor.executeCommand(d,R),this.editor.pushUndoStop(),this.decorations.set([{range:k,options:n.DECORATION}]),(w=this.decorationRemover)===null||w===void 0||w.cancel(),this.decorationRemover=(0,L.timeout)(350),this.decorationRemover.then(()=>this.decorations.clear()).catch(I.onUnexpectedError)}).catch(I.onUnexpectedError)):Promise.resolve(void 0)}};t.ID="editor.contrib.inPlaceReplaceController",t.DECORATION=v.ModelDecorationOptions.register({description:"in-place-replace",className:"valueSetReplacement"}),t=n=Ie([ge(1,C.IEditorWorkerService)],t);class r extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.up",label:s.localize(0,null),alias:"Replace with Previous Value",precondition:_.EditorContextKeys.writable,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3159,weight:100}})}run(d,l){const o=t.get(l);return o?o.run(this.id,!1):Promise.resolve(void 0)}}class u extends D.EditorAction{constructor(){super({id:"editor.action.inPlaceReplace.down",label:s.localize(1,null),alias:"Replace with Next Value",precondition:_.EditorContextKeys.writable,kbOpts:{kbExpr:_.EditorContextKeys.editorTextFocus,primary:3161,weight:100}})}run(d,l){const o=t.get(l);return o?o.run(this.id,!0):Promise.resolve(void 0)}}(0,D.registerEditorContribution)(t.ID,t,4),(0,D.registerEditorAction)(r),(0,D.registerEditorAction)(u)}),define(te[254],ie([1,0,7,14,26,2,10,27,5,37,8,456]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineProgressManager=void 0;const s=v.ModelDecorationOptions.register({description:"inline-progress-widget",stickiness:1,showIfCollapsed:!0,after:{content:S.noBreakWhitespace,inlineClassName:"inline-editor-progress-decoration",inlineClassNameAffectsLetterSpacing:!0}});class i extends D.Disposable{constructor(r,u,f,d,l){super(),this.typeId=r,this.editor=u,this.range=f,this.delegate=l,this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this.create(d),this.editor.addContentWidget(this),this.editor.layoutContentWidget(this)}create(r){this.domNode=L.$(".inline-progress-widget"),this.domNode.role="button",this.domNode.title=r;const u=L.$("span.icon");this.domNode.append(u),u.classList.add(...m.ThemeIcon.asClassNameArray(y.Codicon.loading),"codicon-modifier-spin");const f=()=>{const d=this.editor.getOption(66);this.domNode.style.height=`${d}px`,this.domNode.style.width=`${Math.ceil(.8*d)}px`};f(),this._register(this.editor.onDidChangeConfiguration(d=>{(d.hasChanged(52)||d.hasChanged(66))&&f()})),this._register(L.addDisposableListener(this.domNode,L.EventType.CLICK,d=>{this.delegate.cancel()}))}getId(){return i.baseId+"."+this.typeId}getDomNode(){return this.domNode}getPosition(){return{position:{lineNumber:this.range.startLineNumber,column:this.range.startColumn},preference:[0]}}dispose(){super.dispose(),this.editor.removeContentWidget(this)}}i.baseId="editor.widget.inlineProgressWidget";let n=class extends D.Disposable{constructor(r,u,f){super(),this.id=r,this._editor=u,this._instantiationService=f,this._showDelay=500,this._showPromise=this._register(new D.MutableDisposable),this._currentWidget=new D.MutableDisposable,this._operationIdPool=0,this._currentDecorations=u.createDecorationsCollection()}showWhile(r,u,f){return be(this,void 0,void 0,function*(){const d=this._operationIdPool++;this._currentOperation=d,this.clear(),this._showPromise.value=(0,I.disposableTimeout)(()=>{const l=_.Range.fromPositions(r);this._currentDecorations.set([{range:l,options:s}]).length>0&&(this._currentWidget.value=this._instantiationService.createInstance(i,this.id,this._editor,l,u,f))},this._showDelay);try{return yield f}finally{this._currentOperation===d&&(this.clear(),this._currentOperation=void 0)}})}clear(){this._showPromise.clear(),this._currentDecorations.clear(),this._currentWidget.clear()}};e.InlineProgressManager=n,e.InlineProgressManager=n=Ie([ge(2,C.IInstantiationService)],n)}),define(te[888],ie([1,0,7,13,14,170,2,107,17,169,183,345,130,5,18,335,103,254,651,102,15,8,85,67,339]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.CopyPasteController=e.pasteWidgetVisibleCtx=e.changePasteTypeCommandId=void 0,e.changePasteTypeCommandId="editor.changePasteType",e.pasteWidgetVisibleCtx=new o.RawContextKey("pasteWidgetVisible",!1,(0,d.localize)(0,null));const b="application/vnd.code.copyMetadata";let w=p=class extends S.Disposable{static get(M){return M.getContribution(p.ID)}constructor(M,R,B,T,N,A,P){super(),this._bulkEditService=B,this._clipboardService=T,this._languageFeaturesService=N,this._quickInputService=A,this._progressService=P,this._editor=M;const O=M.getContainerDomNode();this._register((0,L.addDisposableListener)(O,"copy",x=>this.handleCopy(x))),this._register((0,L.addDisposableListener)(O,"cut",x=>this.handleCopy(x))),this._register((0,L.addDisposableListener)(O,"paste",x=>this.handlePaste(x),!0)),this._pasteProgressManager=this._register(new f.InlineProgressManager("pasteIntoEditor",M,R)),this._postPasteWidgetManager=this._register(R.createInstance(h.PostEditWidgetManager,"pasteIntoEditor",M,e.pasteWidgetVisibleCtx,{id:e.changePasteTypeCommandId,label:(0,d.localize)(1,null)}))}changePasteType(){this._postPasteWidgetManager.tryShowSelector()}pasteAs(M){this._editor.focus();try{this._pasteAsActionContext={preferredId:M},(0,L.getActiveDocument)().execCommand("paste")}finally{this._pasteAsActionContext=void 0}}isPasteAsEnabled(){return this._editor.getOption(84).enabled&&!this._editor.getOption(90)}handleCopy(M){var R,B;if(!this._editor.hasTextFocus()||(_.isWeb&&this._clipboardService.writeResources([]),!M.clipboardData||!this.isPasteAsEnabled()))return;const T=this._editor.getModel(),N=this._editor.getSelections();if(!T||!N?.length)return;const A=this._editor.getOption(37);let P=N;const O=N.length===1&&N[0].isEmpty();if(O){if(!A)return;P=[new n.Range(P[0].startLineNumber,1,P[0].startLineNumber,1+T.getLineLength(P[0].startLineNumber))]}const x=(R=this._editor._getViewModel())===null||R===void 0?void 0:R.getPlainTextToCopy(N,A,_.isWindows),U={multicursorText:Array.isArray(x)?x:null,pasteOnNewLine:O,mode:null},F=this._languageFeaturesService.documentPasteEditProvider.ordered(T).filter(J=>!!J.prepareDocumentPaste);if(!F.length){this.setCopyMetadata(M.clipboardData,{defaultPastePayload:U});return}const G=(0,s.toVSDataTransfer)(M.clipboardData),Y=F.flatMap(J=>{var q;return(q=J.copyMimeTypes)!==null&&q!==void 0?q:[]}),ne=(0,v.generateUuid)();this.setCopyMetadata(M.clipboardData,{id:ne,providerCopyMimeTypes:Y,defaultPastePayload:U});const se=(0,y.createCancelablePromise)(J=>be(this,void 0,void 0,function*(){const q=(0,I.coalesce)(yield Promise.all(F.map(H=>be(this,void 0,void 0,function*(){try{return yield H.prepareDocumentPaste(T,P,G,J)}catch(V){console.error(V);return}}))));q.reverse();for(const H of q)for(const[V,Z]of H)G.replace(V,Z);return G}));(B=this._currentCopyOperation)===null||B===void 0||B.dataTransferPromise.cancel(),this._currentCopyOperation={handle:ne,dataTransferPromise:se}}handlePaste(M){var R,B;return be(this,void 0,void 0,function*(){if(!M.clipboardData||!this._editor.hasTextFocus())return;(R=this._currentPasteOperation)===null||R===void 0||R.cancel(),this._currentPasteOperation=void 0;const T=this._editor.getModel(),N=this._editor.getSelections();if(!N?.length||!T||!this.isPasteAsEnabled())return;const A=this.fetchCopyMetadata(M),P=(0,s.toExternalVSDataTransfer)(M.clipboardData);P.delete(b);const O=[...M.clipboardData.types,...(B=A?.providerCopyMimeTypes)!==null&&B!==void 0?B:[],m.Mimes.uriList],x=this._languageFeaturesService.documentPasteEditProvider.ordered(T).filter(W=>{var U;return(U=W.pasteMimeTypes)===null||U===void 0?void 0:U.some(F=>(0,D.matchesMimeType)(F,O))});x.length&&(M.preventDefault(),M.stopImmediatePropagation(),this._pasteAsActionContext?this.showPasteAsPick(this._pasteAsActionContext.preferredId,x,N,P,A):this.doPasteInline(x,N,P,A))})}doPasteInline(M,R,B,T){const N=(0,y.createCancelablePromise)(A=>be(this,void 0,void 0,function*(){const P=this._editor;if(!P.hasModel())return;const O=P.getModel(),x=new u.EditorStateCancellationTokenSource(P,3,void 0,A);try{if(yield this.mergeInDataFromCopy(B,T,x.token),x.token.isCancellationRequested)return;const W=M.filter(F=>E(F,B));if(!W.length||W.length===1&&W[0].id==="text"){yield this.applyDefaultPasteHandler(B,T,x.token);return}const U=yield this.getPasteEdits(W,B,O,R,x.token);if(x.token.isCancellationRequested)return;if(U.length===1&&U[0].providerId==="text"){yield this.applyDefaultPasteHandler(B,T,x.token);return}if(U.length){const F=P.getOption(84).showPasteSelector==="afterPaste";return this._postPasteWidgetManager.applyEditAndShowIfNeeded(R,{activeEditIndex:0,allEdits:U},F,x.token)}yield this.applyDefaultPasteHandler(B,T,x.token)}finally{x.dispose(),this._currentPasteOperation===N&&(this._currentPasteOperation=void 0)}}));this._pasteProgressManager.showWhile(R[0].getEndPosition(),(0,d.localize)(2,null),N),this._currentPasteOperation=N}showPasteAsPick(M,R,B,T,N){const A=(0,y.createCancelablePromise)(P=>be(this,void 0,void 0,function*(){const O=this._editor;if(!O.hasModel())return;const x=O.getModel(),W=new u.EditorStateCancellationTokenSource(O,3,void 0,P);try{if(yield this.mergeInDataFromCopy(T,N,W.token),W.token.isCancellationRequested)return;let U=R.filter(ne=>E(ne,T));M&&(U=U.filter(ne=>ne.id===M));const F=yield this.getPasteEdits(U,T,x,B,W.token);if(W.token.isCancellationRequested||!F.length)return;let G;if(M)G=F.at(0);else{const ne=yield this._quickInputService.pick(F.map(se=>({label:se.label,description:se.providerId,detail:se.detail,edit:se})),{placeHolder:(0,d.localize)(3,null)});G=ne?.edit}if(!G)return;const Y=(0,r.createCombinedWorkspaceEdit)(x.uri,B,G);yield this._bulkEditService.apply(Y,{editor:this._editor})}finally{W.dispose(),this._currentPasteOperation===A&&(this._currentPasteOperation=void 0)}}));this._progressService.withProgress({location:10,title:(0,d.localize)(4,null)},()=>A)}setCopyMetadata(M,R){M.setData(b,JSON.stringify(R))}fetchCopyMetadata(M){var R;if(!M.clipboardData)return;const B=M.clipboardData.getData(b);if(B)try{return JSON.parse(B)}catch{return}const[T,N]=C.ClipboardEventUtils.getTextData(M.clipboardData);if(N)return{defaultPastePayload:{mode:N.mode,multicursorText:(R=N.multicursorText)!==null&&R!==void 0?R:null,pasteOnNewLine:!!N.isFromEmptySelection}}}mergeInDataFromCopy(M,R,B){var T;return be(this,void 0,void 0,function*(){if(R?.id&&((T=this._currentCopyOperation)===null||T===void 0?void 0:T.handle)===R.id){const N=yield this._currentCopyOperation.dataTransferPromise;if(B.isCancellationRequested)return;for(const[A,P]of N)M.replace(A,P)}if(!M.has(m.Mimes.uriList)){const N=yield this._clipboardService.readResources();if(B.isCancellationRequested)return;N.length&&M.append(m.Mimes.uriList,(0,D.createStringDataTransferItem)(D.UriList.create(N)))}})}getPasteEdits(M,R,B,T,N){return be(this,void 0,void 0,function*(){const A=yield(0,y.raceCancellation)(Promise.all(M.map(O=>be(this,void 0,void 0,function*(){var x;try{const W=yield(x=O.provideDocumentPasteEdits)===null||x===void 0?void 0:x.call(O,B,T,R,N);if(W)return Object.assign(Object.assign({},W),{providerId:O.id})}catch(W){console.error(W)}}))),N),P=(0,I.coalesce)(A??[]);return(0,r.sortEditsByYieldTo)(P)})}applyDefaultPasteHandler(M,R,B){var T,N,A;return be(this,void 0,void 0,function*(){const P=(T=M.get(m.Mimes.text))!==null&&T!==void 0?T:M.get("text");if(!P)return;const O=yield P.asString();if(B.isCancellationRequested)return;const x={text:O,pasteOnNewLine:(N=R?.defaultPastePayload.pasteOnNewLine)!==null&&N!==void 0?N:!1,multicursorText:(A=R?.defaultPastePayload.multicursorText)!==null&&A!==void 0?A:null,mode:null};this._editor.trigger("keyboard","paste",x)})}};e.CopyPasteController=w,w.ID="editor.contrib.copyPasteActionController",e.CopyPasteController=w=p=Ie([ge(1,c.IInstantiationService),ge(2,i.IBulkEditService),ge(3,l.IClipboardService),ge(4,t.ILanguageFeaturesService),ge(5,g.IQuickInputService),ge(6,a.IProgressService)],w);function E(k,M){var R;return!!(!((R=k.pasteMimeTypes)===null||R===void 0)&&R.some(B=>M.matches(B)))}}),define(te[889],ie([1,0,13,14,170,2,345,5,18,288,750,103,254,654,28,15,344,8,335,339]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l){"use strict";var o;Object.defineProperty(e,"__esModule",{value:!0}),e.DropIntoEditorController=e.dropWidgetVisibleCtx=e.changeDropTypeCommandId=e.defaultProviderConfig=void 0,e.defaultProviderConfig="editor.experimental.dropIntoEditor.defaultProvider",e.changeDropTypeCommandId="editor.changeDropType",e.dropWidgetVisibleCtx=new r.RawContextKey("dropWidgetVisible",!1,(0,n.localize)(0,null));let c=o=class extends D.Disposable{static get(g){return g.getContribution(o.ID)}constructor(g,h,p,b,w){super(),this._configService=p,this._languageFeaturesService=b,this._treeViewsDragAndDropService=w,this.treeItemsTransfer=u.LocalSelectionTransfer.getInstance(),this._dropProgressManager=this._register(h.createInstance(i.InlineProgressManager,"dropIntoEditor",g)),this._postDropWidgetManager=this._register(h.createInstance(l.PostEditWidgetManager,"dropIntoEditor",g,e.dropWidgetVisibleCtx,{id:e.changeDropTypeCommandId,label:(0,n.localize)(1,null)})),this._register(g.onDropIntoEditor(E=>this.onDropIntoEditor(g,E.position,E.event)))}changeDropType(){this._postDropWidgetManager.tryShowSelector()}onDropIntoEditor(g,h,p){var b;return be(this,void 0,void 0,function*(){if(!p.dataTransfer||!g.hasModel())return;(b=this._currentOperation)===null||b===void 0||b.cancel(),g.focus(),g.setPosition(h);const w=(0,I.createCancelablePromise)(E=>be(this,void 0,void 0,function*(){const k=new s.EditorStateCancellationTokenSource(g,1,void 0,E);try{const M=yield this.extractDataTransferData(p);if(M.size===0||k.token.isCancellationRequested)return;const R=g.getModel();if(!R)return;const B=this._languageFeaturesService.documentOnDropEditProvider.ordered(R).filter(N=>N.dropMimeTypes?N.dropMimeTypes.some(A=>M.matches(A)):!0),T=yield this.getDropEdits(B,R,h,M,k);if(k.token.isCancellationRequested)return;if(T.length){const N=this.getInitialActiveEditIndex(R,T),A=g.getOption(36).showDropSelector==="afterDrop";yield this._postDropWidgetManager.applyEditAndShowIfNeeded([m.Range.fromPositions(h)],{activeEditIndex:N,allEdits:T},A,E)}}finally{k.dispose(),this._currentOperation===w&&(this._currentOperation=void 0)}}));this._dropProgressManager.showWhile(h,(0,n.localize)(2,null),w),this._currentOperation=w})}getDropEdits(g,h,p,b,w){return be(this,void 0,void 0,function*(){const E=yield(0,I.raceCancellation)(Promise.all(g.map(M=>be(this,void 0,void 0,function*(){try{const R=yield M.provideDocumentOnDropEdits(h,p,b,w.token);if(R)return Object.assign(Object.assign({},R),{providerId:M.id})}catch(R){console.error(R)}}))),w.token),k=(0,L.coalesce)(E??[]);return(0,d.sortEditsByYieldTo)(k)})}getInitialActiveEditIndex(g,h){const p=this._configService.getValue(e.defaultProviderConfig,{resource:g.uri});for(const[b,w]of Object.entries(p)){const E=h.findIndex(k=>w===k.providerId&&k.handledMimeType&&(0,y.matchesMimeType)(b,[k.handledMimeType]));if(E>=0)return E}return 0}extractDataTransferData(g){return be(this,void 0,void 0,function*(){if(!g.dataTransfer)return new y.VSDataTransfer;const h=(0,S.toExternalVSDataTransfer)(g.dataTransfer);if(this.treeItemsTransfer.hasData(v.DraggedTreeItemsIdentifier.prototype)){const p=this.treeItemsTransfer.getData(v.DraggedTreeItemsIdentifier.prototype);if(Array.isArray(p))for(const b of p){const w=yield this._treeViewsDragAndDropService.removeDragOperationTransfer(b.identifier);if(w)for(const[E,k]of w)h.replace(E,k)}}return h})}};e.DropIntoEditorController=c,c.ID="editor.contrib.dropIntoEditorController",e.DropIntoEditorController=c=o=Ie([ge(1,f.IInstantiationService),ge(2,t.IConfigurationService),ge(3,_.ILanguageFeaturesService),ge(4,C.ITreeViewsDnDService)],c)}),define(te[890],ie([1,0,13,14,19,36,9,6,2,10,21,16,33,12,5,22,37,32,685,15,18,31,74,59,457]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.editorLinkedEditingBackground=e.LinkedEditingAction=e.LinkedEditingContribution=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=void 0,e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE=new l.RawContextKey("LinkedEditingInputVisible",!1);const p="linked-editing-decoration";let b=h=class extends _.Disposable{static get(R){return R.getContribution(h.ID)}constructor(R,B,T,N,A){super(),this.languageConfigurationService=N,this._syncRangesToken=0,this._localToDispose=this._register(new _.DisposableStore),this._editor=R,this._providers=T.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE.bindTo(B),this._debounceInformation=A.for(this._providers,"Linked Editing",{max:200}),this._currentDecorations=this._editor.createDecorationsCollection(),this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new _.DisposableStore),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel(()=>this.reinitialize(!0))),this._register(this._editor.onDidChangeConfiguration(P=>{(P.hasChanged(69)||P.hasChanged(92))&&this.reinitialize(!1)})),this._register(this._providers.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}reinitialize(R){const B=this._editor.getModel(),T=B!==null&&(this._editor.getOption(69)||this._editor.getOption(92))&&this._providers.has(B);if(T===this._enabled&&!R||(this._enabled=T,this.clearRanges(),this._localToDispose.clear(),!T||B===null))return;this._localToDispose.add(m.Event.runAndSubscribe(B.onDidChangeLanguageConfiguration,()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(B.getLanguageId()).getWordDefinition()}));const N=new I.Delayer(this._debounceInformation.get(B)),A=()=>{var x;this._rangeUpdateTriggerPromise=N.trigger(()=>this.updateRanges(),(x=this._debounceDuration)!==null&&x!==void 0?x:this._debounceInformation.get(B))},P=new I.Delayer(0),O=x=>{this._rangeSyncTriggerPromise=P.trigger(()=>this._syncRanges(x))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{A()})),this._localToDispose.add(this._editor.onDidChangeModelContent(x=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const W=this._currentDecorations.getRange(0);if(W&&x.changes.every(U=>W.intersectRanges(U.range))){O(this._syncRangesToken);return}}A()})),this._localToDispose.add({dispose:()=>{N.dispose(),P.dispose()}}),this.updateRanges()}_syncRanges(R){if(!this._editor.hasModel()||R!==this._syncRangesToken||this._currentDecorations.length===0)return;const B=this._editor.getModel(),T=this._currentDecorations.getRange(0);if(!T||T.startLineNumber!==T.endLineNumber)return this.clearRanges();const N=B.getValueInRange(T);if(this._currentWordPattern){const P=N.match(this._currentWordPattern);if((P?P[0].length:0)!==N.length)return this.clearRanges()}const A=[];for(let P=1,O=this._currentDecorations.length;P1){this.clearRanges();return}const T=this._editor.getModel(),N=T.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===N){if(B.equals(this._currentRequestPosition))return;if(this._currentDecorations.length>0){const P=this._currentDecorations.getRange(0);if(P&&P.containsPosition(B))return}}this.clearRanges(),this._currentRequestPosition=B,this._currentRequestModelVersion=N;const A=(0,I.createCancelablePromise)(P=>be(this,void 0,void 0,function*(){try{const O=new g.StopWatch(!1),x=yield k(this._providers,T,B,P);if(this._debounceInformation.update(T,O.elapsed()),A!==this._currentRequest||(this._currentRequest=null,N!==T.getVersionId()))return;let W=[];x?.ranges&&(W=x.ranges),this._currentWordPattern=x?.wordPattern||this._languageWordPattern;let U=!1;for(let G=0,Y=W.length;G({range:G,options:h.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations.set(F),this._syncRangesToken++}catch(O){(0,S.isCancellationError)(O)||(0,S.onUnexpectedError)(O),(this._currentRequest===A||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=A,A})}};e.LinkedEditingContribution=b,b.ID="editor.contrib.linkedEditing",b.DECORATION=u.ModelDecorationOptions.register({description:"linked-editing",stickiness:0,className:p}),e.LinkedEditingContribution=b=h=Ie([ge(1,l.IContextKeyService),ge(2,o.ILanguageFeaturesService),ge(3,f.ILanguageConfigurationService),ge(4,a.ILanguageFeatureDebounceService)],b);class w extends s.EditorAction{constructor(){super({id:"editor.action.linkedEditing",label:d.localize(0,null),alias:"Start Linked Editing",precondition:l.ContextKeyExpr.and(r.EditorContextKeys.writable,r.EditorContextKeys.hasRenameProvider),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,primary:3132,weight:100}})}runCommand(R,B){const T=R.get(i.ICodeEditorService),[N,A]=Array.isArray(B)&&B||[void 0,void 0];return C.URI.isUri(N)&&n.Position.isIPosition(A)?T.openCodeEditor({resource:N},T.getActiveCodeEditor()).then(P=>{P&&(P.setPosition(A),P.invokeWithinContext(O=>(this.reportTelemetry(O,P),this.run(O,P))))},S.onUnexpectedError):super.runCommand(R,B)}run(R,B){const T=b.get(B);return T?Promise.resolve(T.updateRanges(!0)):Promise.resolve()}}e.LinkedEditingAction=w;const E=s.EditorCommand.bindToContribution(b.get);(0,s.registerEditorCommand)(new E({id:"cancelLinkedEditingInput",precondition:e.CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE,handler:M=>M.clearRanges(),kbOpts:{kbExpr:r.EditorContextKeys.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function k(M,R,B,T){const N=M.ordered(R);return(0,I.first)(N.map(A=>()=>be(this,void 0,void 0,function*(){try{return yield A.provideLinkedEditingRanges(R,B,T)}catch(P){(0,S.onUnexpectedExternalError)(P);return}})),A=>!!A&&L.isNonEmptyArray(A?.ranges))}e.editorLinkedEditingBackground=(0,c.registerColor)("editor.linkedEditingBackground",{dark:D.Color.fromHex("#f00").transparent(.3),light:D.Color.fromHex("#f00").transparent(.3),hcDark:D.Color.fromHex("#f00").transparent(.3),hcLight:D.Color.white},d.localize(1,null)),(0,s.registerModelAndPositionCommand)("_executeLinkedEditingProvider",(M,R,B)=>{const{linkedEditingRangeProvider:T}=M.get(o.ILanguageFeaturesService);return k(T,R,B,y.CancellationToken.None)}),(0,s.registerEditorContribution)(b.ID,b,1),(0,s.registerEditorAction)(w)}),define(te[891],ie([1,0,14,19,9,57,2,54,17,46,59,21,16,37,74,18,184,752,686,48,55,458]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.LinkDetector=void 0;let a=c=class extends S.Disposable{static get(E){return E.getContribution(c.ID)}constructor(E,k,M,R,B){super(),this.editor=E,this.openerService=k,this.notificationService=M,this.languageFeaturesService=R,this.providers=this.languageFeaturesService.linkProvider,this.debounceInformation=B.for(this.providers,"Links",{min:1e3,max:4e3}),this.computeLinks=this._register(new L.RunOnceScheduler(()=>this.computeLinksNow(),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const T=this._register(new u.ClickLinkGesture(E));this._register(T.onMouseMoveOrRelevantKeyDown(([N,A])=>{this._onEditorMouseMove(N,A)})),this._register(T.onExecute(N=>{this.onEditorMouseUp(N)})),this._register(T.onCancel(N=>{this.cleanUpActiveLinkDecoration()})),this._register(E.onDidChangeConfiguration(N=>{N.hasChanged(70)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))})),this._register(E.onDidChangeModelContent(N=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))})),this._register(E.onDidChangeModel(N=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)})),this._register(E.onDidChangeModelLanguage(N=>{this.stop(),this.computeLinks.schedule(0)})),this._register(this.providers.onDidChange(N=>{this.stop(),this.computeLinks.schedule(0)})),this.computeLinks.schedule(0)}computeLinksNow(){return be(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.editor.getOption(70))return;const E=this.editor.getModel();if(!E.isTooLargeForSyncing()&&this.providers.has(E)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,L.createCancelablePromise)(k=>(0,f.getLinks)(this.providers,E,k));try{const k=new C.StopWatch(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(E,k.elapsed()),E.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(k){(0,y.onUnexpectedError)(k)}finally{this.computePromise=null}}})}updateDecorations(E){const k=this.editor.getOption(77)==="altKey",M=[],R=Object.keys(this.currentOccurrences);for(const T of R){const N=this.currentOccurrences[T];M.push(N.decorationId)}const B=[];if(E)for(const T of E)B.push(h.decoration(T,k));this.editor.changeDecorations(T=>{const N=T.deltaDecorations(M,B);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let A=0,P=N.length;A{R.activate(B,M),this.activeLinkDecorationId=R.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const E=this.editor.getOption(77)==="altKey";if(this.activeLinkDecorationId){const k=this.currentOccurrences[this.activeLinkDecorationId];k&&this.editor.changeDecorations(M=>{k.deactivate(M,E)}),this.activeLinkDecorationId=null}}onEditorMouseUp(E){if(!this.isEnabled(E))return;const k=this.getLinkOccurrence(E.target.position);k&&this.openLinkOccurrence(k,E.hasSideBySideModifier,!0)}openLinkOccurrence(E,k,M=!1){if(!this.openerService)return;const{link:R}=E;R.resolve(I.CancellationToken.None).then(B=>{if(typeof B=="string"&&this.editor.hasModel()){const T=this.editor.getModel().uri;if(T.scheme===m.Schemas.file&&B.startsWith(`${m.Schemas.file}:`)){const N=s.URI.parse(B);if(N.scheme===m.Schemas.file){const A=v.originalFSPath(N);let P=null;A.startsWith("/./")?P=`.${A.substr(1)}`:A.startsWith("//./")&&(P=`.${A.substr(2)}`),P&&(B=v.joinPath(T,P))}}}return this.openerService.open(B,{openToSide:k,fromUserGesture:M,allowContributedOpeners:!0,allowCommands:!0,fromWorkspace:!0})},B=>{const T=B instanceof Error?B.message:B;T==="invalid"?this.notificationService.warn(d.localize(0,null,R.url.toString())):T==="missing"?this.notificationService.warn(d.localize(1,null)):(0,y.onUnexpectedError)(B)})}getLinkOccurrence(E){if(!this.editor.hasModel()||!E)return null;const k=this.editor.getModel().getDecorationsInRange({startLineNumber:E.lineNumber,startColumn:E.column,endLineNumber:E.lineNumber,endColumn:E.column},0,!0);for(const M of k){const R=this.currentOccurrences[M.id];if(R)return R}return null}isEnabled(E,k){return!!(E.target.type===6&&(E.hasTriggerModifier||k&&k.keyCodeIsTriggerKey))}stop(){var E;this.computeLinks.cancel(),this.activeLinksList&&((E=this.activeLinksList)===null||E===void 0||E.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};e.LinkDetector=a,a.ID="editor.linkDetector",e.LinkDetector=a=c=Ie([ge(1,o.IOpenerService),ge(2,l.INotificationService),ge(3,r.ILanguageFeaturesService),ge(4,t.ILanguageFeatureDebounceService)],a);const g={general:n.ModelDecorationOptions.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:n.ModelDecorationOptions.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class h{static decoration(E,k){return{range:E.range,options:h._getOptions(E,k,!1)}}static _getOptions(E,k,M){const R=Object.assign({},M?g.active:g.general);return R.hoverMessage=p(E,k),R}constructor(E,k){this.link=E,this.decorationId=k}activate(E,k){E.changeDecorationOptions(this.decorationId,h._getOptions(this.link,k,!0))}deactivate(E,k){E.changeDecorationOptions(this.decorationId,h._getOptions(this.link,k,!1))}}function p(w,E){const k=w.url&&/^command:/i.test(w.url.toString()),M=w.tooltip?w.tooltip:k?d.localize(2,null):d.localize(3,null),R=E?_.isMacintosh?d.localize(4,null):d.localize(5,null):_.isMacintosh?d.localize(6,null):d.localize(7,null);if(w.url){let B="";if(/^command:/i.test(w.url.toString())){const N=w.url.toString().match(/^command:([^?#]+)/);if(N){const A=N[1];B=d.localize(8,null,A)}}return new D.MarkdownString("",!0).appendLink(w.url.toString(!0).replace(/ /g,"%20"),M,B).appendMarkdown(` (${R})`)}else return new D.MarkdownString().appendText(`${M} (${R})`)}class b extends i.EditorAction{constructor(){super({id:"editor.action.openLink",label:d.localize(9,null),alias:"Open Link",precondition:void 0})}run(E,k){const M=a.get(k);if(!M||!k.hasModel())return;const R=k.getSelections();for(const B of R){const T=M.getLinkOccurrence(B.getEndPosition());T&&M.openLinkOccurrence(T,!1)}}}(0,i.registerEditorContribution)(a.ID,a,1),(0,i.registerEditorAction)(b)}),define(te[892],ie([1,0,2,18,187,14,253,297,296,32,9,303,43]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyModelProvider=void 0;var n;(function(c){c.OUTLINE_MODEL="outlineModel",c.FOLDING_PROVIDER_MODEL="foldingProviderModel",c.INDENTATION_MODEL="indentationModel"})(n||(n={}));var t;(function(c){c[c.VALID=0]="VALID",c[c.INVALID=1]="INVALID",c[c.CANCELED=2]="CANCELED"})(t||(t={}));let r=class extends L.Disposable{constructor(a,g,h,p){super(),this._editor=a,this._languageConfigurationService=g,this._languageFeaturesService=h,this._modelProviders=[],this._modelPromise=null,this._updateScheduler=this._register(new D.Delayer(300)),this._updateOperation=this._register(new L.DisposableStore);const b=new f(h),w=new o(this._editor,h),E=new l(this._editor,g);switch(p){case n.OUTLINE_MODEL:this._modelProviders.push(b),this._modelProviders.push(w),this._modelProviders.push(E);break;case n.FOLDING_PROVIDER_MODEL:this._modelProviders.push(w),this._modelProviders.push(E);break;case n.INDENTATION_MODEL:this._modelProviders.push(E);break}}_cancelModelPromise(){this._modelPromise&&(this._modelPromise.cancel(),this._modelPromise=null)}update(a,g,h){return be(this,void 0,void 0,function*(){return this._updateOperation.clear(),this._updateOperation.add({dispose:()=>{this._cancelModelPromise(),this._updateScheduler.cancel()}}),this._cancelModelPromise(),yield this._updateScheduler.trigger(()=>be(this,void 0,void 0,function*(){for(const p of this._modelProviders){const{statusPromise:b,modelPromise:w}=p.computeStickyModel(a,g,h);this._modelPromise=w;const E=yield b;if(this._modelPromise!==w)return null;switch(E){case t.CANCELED:return this._updateOperation.clear(),null;case t.VALID:return p.stickyModel}}return null})).catch(p=>((0,C.onUnexpectedError)(p),null))})}};e.StickyModelProvider=r,e.StickyModelProvider=r=Ie([ge(1,v.ILanguageConfigurationService),ge(2,I.ILanguageFeaturesService)],r);class u{constructor(){this._stickyModel=null}get stickyModel(){return this._stickyModel}_invalid(){return this._stickyModel=null,t.INVALID}computeStickyModel(a,g,h){if(h.isCancellationRequested||!this.isProviderValid(a))return{statusPromise:this._invalid(),modelPromise:null};const p=(0,D.createCancelablePromise)(b=>this.createModelFromProvider(a,g,b));return{statusPromise:p.then(b=>this.isModelValid(b)?h.isCancellationRequested?t.CANCELED:(this._stickyModel=this.createStickyModel(a,g,h,b),t.VALID):this._invalid()).then(void 0,b=>((0,C.onUnexpectedError)(b),t.CANCELED)),modelPromise:p}}isModelValid(a){return!0}isProviderValid(a){return!0}}let f=class extends u{constructor(a){super(),this._languageFeaturesService=a}createModelFromProvider(a,g,h){return y.OutlineModel.create(this._languageFeaturesService.documentSymbolProvider,a,h)}createStickyModel(a,g,h,p){var b;const{stickyOutlineElement:w,providerID:E}=this._stickyModelFromOutlineModel(p,(b=this._stickyModel)===null||b===void 0?void 0:b.outlineProviderId);return new s.StickyModel(a.uri,g,w,E)}isModelValid(a){return a&&a.children.size>0}_stickyModelFromOutlineModel(a,g){let h;if(i.Iterable.first(a.children.values())instanceof y.OutlineGroup){const E=i.Iterable.find(a.children.values(),k=>k.id===g);if(E)h=E.children;else{let k="",M=-1,R;for(const[B,T]of a.children.entries()){const N=this._findSumOfRangesOfGroup(T);N>M&&(R=T,M=N,k=T.id)}g=k,h=R.children}}else h=a.children;const p=[],b=Array.from(h.values()).sort((E,k)=>{const M=new s.StickyRange(E.symbol.range.startLineNumber,E.symbol.range.endLineNumber),R=new s.StickyRange(k.symbol.range.startLineNumber,k.symbol.range.endLineNumber);return this._comparator(M,R)});for(const E of b)p.push(this._stickyModelFromOutlineElement(E,E.symbol.selectionRange.startLineNumber));return{stickyOutlineElement:new s.StickyElement(void 0,p,void 0),providerID:g}}_stickyModelFromOutlineElement(a,g){const h=[];for(const b of a.children.values())if(b.symbol.selectionRange.startLineNumber!==b.symbol.range.endLineNumber)if(b.symbol.selectionRange.startLineNumber!==g)h.push(this._stickyModelFromOutlineElement(b,b.symbol.selectionRange.startLineNumber));else for(const w of b.children.values())h.push(this._stickyModelFromOutlineElement(w,b.symbol.selectionRange.startLineNumber));h.sort((b,w)=>this._comparator(b.range,w.range));const p=new s.StickyRange(a.symbol.selectionRange.startLineNumber,a.symbol.range.endLineNumber);return new s.StickyElement(p,h,void 0)}_comparator(a,g){return a.startLineNumber!==g.startLineNumber?a.startLineNumber-g.startLineNumber:g.endLineNumber-a.endLineNumber}_findSumOfRangesOfGroup(a){let g=0;for(const h of a.children.values())g+=this._findSumOfRangesOfGroup(h);return a instanceof y.OutlineElement?g+a.symbol.range.endLineNumber-a.symbol.selectionRange.startLineNumber:g}};f=Ie([ge(0,I.ILanguageFeaturesService)],f);class d extends u{constructor(a){super(),this._foldingLimitReporter=new S.RangesLimitReporter(a)}createStickyModel(a,g,h,p){const b=this._fromFoldingRegions(p);return new s.StickyModel(a.uri,g,b,void 0)}isModelValid(a){return a!==null}_fromFoldingRegions(a){const g=a.length,h=[],p=new s.StickyElement(void 0,[],void 0);for(let b=0;b0}createModelFromProvider(a,g,h){const p=S.FoldingController.getFoldingRangeProviders(this._languageFeaturesService,a);return new m.SyntaxRangeProvider(a,p,()=>this.createModelFromProvider(a,g,h),this._foldingLimitReporter,void 0).compute(h)}};o=Ie([ge(1,I.ILanguageFeaturesService)],o)}),define(te[893],ie([1,0,2,18,19,14,13,6,32,892]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyLineCandidateProvider=e.StickyLineCandidate=void 0;class C{constructor(n,t,r){this.startLineNumber=n,this.endLineNumber=t,this.nestingDepth=r}}e.StickyLineCandidate=C;let s=class extends L.Disposable{constructor(n,t,r){super(),this._languageFeaturesService=t,this._languageConfigurationService=r,this._onDidChangeStickyScroll=this._register(new m.Emitter),this.onDidChangeStickyScroll=this._onDidChangeStickyScroll.event,this._options=null,this._model=null,this._cts=null,this._stickyModelProvider=null,this._editor=n,this._sessionStore=this._register(new L.DisposableStore),this._updateSoon=this._register(new D.RunOnceScheduler(()=>this.update(),50)),this._register(this._editor.onDidChangeConfiguration(u=>{u.hasChanged(114)&&this.readConfiguration()})),this.readConfiguration()}readConfiguration(){this._stickyModelProvider=null,this._sessionStore.clear(),this._options=this._editor.getOption(114),this._options.enabled&&(this._stickyModelProvider=this._sessionStore.add(new v.StickyModelProvider(this._editor,this._languageConfigurationService,this._languageFeaturesService,this._options.defaultModel)),this._sessionStore.add(this._editor.onDidChangeModel(()=>{this._model=null,this._onDidChangeStickyScroll.fire(),this.update()})),this._sessionStore.add(this._editor.onDidChangeHiddenAreas(()=>this.update())),this._sessionStore.add(this._editor.onDidChangeModelContent(()=>this._updateSoon.schedule())),this._sessionStore.add(this._languageFeaturesService.documentSymbolProvider.onDidChange(()=>this.update())),this.update())}getVersionId(){var n;return(n=this._model)===null||n===void 0?void 0:n.version}update(){var n;return be(this,void 0,void 0,function*(){(n=this._cts)===null||n===void 0||n.dispose(!0),this._cts=new y.CancellationTokenSource,yield this.updateStickyModel(this._cts.token),this._onDidChangeStickyScroll.fire()})}updateStickyModel(n){return be(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._stickyModelProvider||this._editor.getModel().isTooLargeForTokenization()){this._model=null;return}const t=this._editor.getModel(),r=t.getVersionId(),u=yield this._stickyModelProvider.update(t,r,n);n.isCancellationRequested||(this._model=u)})}updateIndex(n){return n===-1?n=0:n<0&&(n=-n-2),n}getCandidateStickyLinesIntersectingFromStickyModel(n,t,r,u,f){if(t.children.length===0)return;let d=f;const l=[];for(let a=0;aa-g)),c=this.updateIndex((0,S.binarySearch)(l,n.startLineNumber+u,(a,g)=>a-g));for(let a=o;a<=c;a++){const g=t.children[a];if(!g)return;if(g.range){const h=g.range.startLineNumber,p=g.range.endLineNumber;n.startLineNumber<=p+1&&h-1<=n.endLineNumber&&h!==d&&(d=h,r.push(new C(h,p-1,u+1)),this.getCandidateStickyLinesIntersectingFromStickyModel(n,g,r,u+1,h))}else this.getCandidateStickyLinesIntersectingFromStickyModel(n,g,r,u,f)}}getCandidateStickyLinesIntersecting(n){var t,r;if(!(!((t=this._model)===null||t===void 0)&&t.element))return[];let u=[];this.getCandidateStickyLinesIntersectingFromStickyModel(n,this._model.element,u,0,-1);const f=(r=this._editor._getViewModel())===null||r===void 0?void 0:r.getHiddenAreas();if(f)for(const d of f)u=u.filter(l=>!(l.startLineNumber>=d.startLineNumber&&l.endLineNumber<=d.endLineNumber+1));return u}};e.StickyLineCandidateProvider=s,e.StickyLineCandidateProvider=s=Ie([ge(1,I.ILanguageFeaturesService),ge(2,_.ILanguageConfigurationService)],s)}),define(te[894],ie([1,0,7,90,13,2,27,249,161,12,101,149,114,370,465]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollWidget=e.StickyScrollWidgetState=void 0;class t{constructor(h,p,b,w=null){this.startLineNumbers=h,this.endLineNumbers=p,this.lastLineRelativePosition=b,this.showEndForLine=w}equals(h){return!!h&&this.lastLineRelativePosition===h.lastLineRelativePosition&&this.showEndForLine===h.showEndForLine&&(0,y.equals)(this.startLineNumbers,h.startLineNumbers)&&(0,y.equals)(this.endLineNumbers,h.endLineNumbers)}}e.StickyScrollWidgetState=t;const r=(0,I.createTrustedTypesPolicy)("stickyScrollViewLayer",{createHTML:g=>g}),u="data-sticky-line-index",f="data-sticky-is-line",d="data-sticky-is-line-number",l="data-sticky-is-folding-icon";class o extends D.Disposable{constructor(h){super(),this._editor=h,this._foldingIconStore=new D.DisposableStore,this._rootDomNode=document.createElement("div"),this._lineNumbersDomNode=document.createElement("div"),this._linesDomNodeScrollable=document.createElement("div"),this._linesDomNode=document.createElement("div"),this._lineHeight=this._editor.getOption(66),this._stickyLines=[],this._lineNumbers=[],this._lastLineRelativePosition=0,this._minContentWidthInPx=0,this._isOnGlyphMargin=!1,this._lineNumbersDomNode.className="sticky-widget-line-numbers",this._lineNumbersDomNode.setAttribute("role","none"),this._linesDomNode.className="sticky-widget-lines",this._linesDomNode.setAttribute("role","list"),this._linesDomNodeScrollable.className="sticky-widget-lines-scrollable",this._linesDomNodeScrollable.appendChild(this._linesDomNode),this._rootDomNode.className="sticky-widget",this._rootDomNode.classList.toggle("peek",h instanceof _.EmbeddedCodeEditorWidget),this._rootDomNode.appendChild(this._lineNumbersDomNode),this._rootDomNode.appendChild(this._linesDomNodeScrollable);const p=()=>{this._linesDomNode.style.left=this._editor.getOption(114).scrollWithEditor?`-${this._editor.getScrollLeft()}px`:"0px"};this._register(this._editor.onDidChangeConfiguration(b=>{b.hasChanged(114)&&p(),b.hasChanged(66)&&(this._lineHeight=this._editor.getOption(66))})),this._register(this._editor.onDidScrollChange(b=>{b.scrollLeftChanged&&p(),b.scrollWidthChanged&&this._updateWidgetWidth()})),this._register(this._editor.onDidChangeModel(()=>{p(),this._updateWidgetWidth()})),this._register(this._foldingIconStore),p(),this._register(this._editor.onDidLayoutChange(b=>{this._updateWidgetWidth()})),this._updateWidgetWidth()}get lineNumbers(){return this._lineNumbers}get lineNumberCount(){return this._lineNumbers.length}getStickyLineForLine(h){return this._stickyLines.find(p=>p.lineNumber===h)}getCurrentLines(){return this._lineNumbers}setState(h,p,b=1/0){if((!this._previousState&&!h||this._previousState&&this._previousState.equals(h))&&b===1/0)return;this._previousState=h;const w=this._stickyLines;if(this._clearStickyWidget(),!h||!this._editor._getViewModel())return;if(h.startLineNumbers.length*this._lineHeight+h.lastLineRelativePosition>0){this._lastLineRelativePosition=h.lastLineRelativePosition;const k=[...h.startLineNumbers];h.showEndForLine!==null&&(k[h.showEndForLine]=h.endLineNumbers[h.showEndForLine]),this._lineNumbers=k}else this._lastLineRelativePosition=0,this._lineNumbers=[];this._renderRootNode(w,p,b)}_updateWidgetWidth(){const h=this._editor.getLayoutInfo(),p=h.contentLeft;this._lineNumbersDomNode.style.width=`${p}px`,this._linesDomNodeScrollable.style.setProperty("--vscode-editorStickyScroll-scrollableWidth",`${this._editor.getScrollWidth()-h.verticalScrollbarWidth}px`),this._rootDomNode.style.width=`${h.width-h.verticalScrollbarWidth}px`}_clearStickyWidget(){this._stickyLines=[],this._foldingIconStore.clear(),L.clearNode(this._lineNumbersDomNode),L.clearNode(this._linesDomNode),this._rootDomNode.style.display="none"}_useFoldingOpacityTransition(h){this._lineNumbersDomNode.style.setProperty("--vscode-editorStickyScroll-foldingOpacityTransition",`opacity ${h?.5:0}s`)}_setFoldingIconsVisibility(h){for(const p of this._stickyLines){const b=p.foldingIcon;b&&b.setVisible(h?!0:b.isCollapsed)}}_renderRootNode(h,p,b=1/0){return be(this,void 0,void 0,function*(){const w=this._editor.getLayoutInfo();for(const[k,M]of this._lineNumbers.entries()){const R=h[k],B=M>=b||R?.lineNumber!==M?this._renderChildNode(k,M,p,w):this._updateTopAndZIndexOfStickyLine(R);B&&(this._linesDomNode.appendChild(B.lineDomNode),this._lineNumbersDomNode.appendChild(B.lineNumberDomNode),this._stickyLines.push(B))}p&&(this._setFoldingHoverListeners(),this._useFoldingOpacityTransition(!this._isOnGlyphMargin));const E=this._lineNumbers.length*this._lineHeight+this._lastLineRelativePosition;if(E===0){this._clearStickyWidget();return}this._rootDomNode.style.display="block",this._lineNumbersDomNode.style.height=`${E}px`,this._linesDomNodeScrollable.style.height=`${E}px`,this._rootDomNode.style.height=`${E}px`,this._rootDomNode.style.marginLeft="0px",this._updateMinContentWidth(),this._editor.layoutOverlayWidget(this)})}_setFoldingHoverListeners(){this._editor.getOption(109)==="mouseover"&&(this._foldingIconStore.add(L.addDisposableListener(this._lineNumbersDomNode,L.EventType.MOUSE_ENTER,p=>{this._isOnGlyphMargin=!0,this._setFoldingIconsVisibility(!0)})),this._foldingIconStore.add(L.addDisposableListener(this._lineNumbersDomNode,L.EventType.MOUSE_LEAVE,()=>{this._isOnGlyphMargin=!1,this._useFoldingOpacityTransition(!0),this._setFoldingIconsVisibility(!1)})))}_renderChildNode(h,p,b,w){const E=this._editor._getViewModel();if(!E)return;const k=E.coordinatesConverter.convertModelPositionToViewPosition(new v.Position(p,1)).lineNumber,M=E.getViewLineRenderingData(k),R=this._editor.getOption(67);let B;try{B=s.LineDecoration.filter(M.inlineDecorations,k,M.minColumn,M.maxColumn)}catch{B=[]}const T=new i.RenderLineInput(!0,!0,M.content,M.continuesWithWrappedLine,M.isBasicASCII,M.containsRTL,0,M.tokens,B,M.tabSize,M.startVisibleColumn,1,1,1,500,"none",!0,!0,null),N=new C.StringBuilder(2e3),A=(0,i.renderViewLine)(T,N);let P;r?P=r.createHTML(N.build()):P=N.build();const O=document.createElement("span");O.setAttribute(u,String(h)),O.setAttribute(f,""),O.setAttribute("role","listitem"),O.tabIndex=0,O.className="sticky-line-content",O.classList.add(`stickyLine${p}`),O.style.lineHeight=`${this._lineHeight}px`,O.innerHTML=P;const x=document.createElement("span");x.setAttribute(u,String(h)),x.setAttribute(d,""),x.className="sticky-line-number",x.style.lineHeight=`${this._lineHeight}px`;const W=w.contentLeft;x.style.width=`${W}px`;const U=document.createElement("span");R.renderType===1||R.renderType===3&&p%10===0?U.innerText=p.toString():R.renderType===2&&(U.innerText=Math.abs(p-this._editor.getPosition().lineNumber).toString()),U.className="sticky-line-number-inner",U.style.lineHeight=`${this._lineHeight}px`,U.style.width=`${w.lineNumbersWidth}px`,U.style.paddingLeft=`${w.lineNumbersLeft}px`,x.appendChild(U);const F=this._renderFoldingIconForLine(b,p);F&&x.appendChild(F.domNode),this._editor.applyFontInfo(O),this._editor.applyFontInfo(U),x.style.lineHeight=`${this._lineHeight}px`,O.style.lineHeight=`${this._lineHeight}px`,x.style.height=`${this._lineHeight}px`,O.style.height=`${this._lineHeight}px`;const G=new c(h,p,O,x,F,A.characterMapping);return this._updateTopAndZIndexOfStickyLine(G)}_updateTopAndZIndexOfStickyLine(h){var p;const b=h.index,w=h.lineDomNode,E=h.lineNumberDomNode,k=b===this._lineNumbers.length-1,M="0",R="1";w.style.zIndex=k?M:R,E.style.zIndex=k?M:R;const B=`${b*this._lineHeight+this._lastLineRelativePosition+(!((p=h.foldingIcon)===null||p===void 0)&&p.isCollapsed?1:0)}px`,T=`${b*this._lineHeight}px`;return w.style.top=k?B:T,E.style.top=k?B:T,h}_renderFoldingIconForLine(h,p){const b=this._editor.getOption(109);if(!h||b==="never")return;const w=h.regions,E=w.findRange(p),k=w.getStartLineNumber(E);if(!(p===k))return;const R=w.isCollapsed(E),B=new a(R,k,w.getEndLineNumber(E),this._lineHeight);return B.setVisible(this._isOnGlyphMargin?!0:R||b==="always"),B.domNode.setAttribute(l,""),B}_updateMinContentWidth(){this._minContentWidthInPx=0;for(const h of this._stickyLines)h.lineDomNode.scrollWidth>this._minContentWidthInPx&&(this._minContentWidthInPx=h.lineDomNode.scrollWidth);this._minContentWidthInPx+=this._editor.getLayoutInfo().verticalScrollbarWidth}getId(){return"editor.contrib.stickyScrollWidget"}getDomNode(){return this._rootDomNode}getPosition(){return{preference:null}}getMinContentWidthInPx(){return this._minContentWidthInPx}focusLineWithIndex(h){0<=h&&h0)return null;const p=this._getRenderedStickyLineFromChildDomNode(h);if(!p)return null;const b=(0,m.getColumnOfNodeOffset)(p.characterMapping,h,0);return new v.Position(p.lineNumber,b)}getLineNumberFromChildDomNode(h){var p,b;return(b=(p=this._getRenderedStickyLineFromChildDomNode(h))===null||p===void 0?void 0:p.lineNumber)!==null&&b!==void 0?b:null}_getRenderedStickyLineFromChildDomNode(h){const p=this.getLineIndexFromChildDomNode(h);return p===null||p<0||p>=this._stickyLines.length?null:this._stickyLines[p]}getLineIndexFromChildDomNode(h){const p=this._getAttributeValue(h,u);return p?parseInt(p,10):null}isInStickyLine(h){return this._getAttributeValue(h,f)!==void 0}isInFoldingIconDomNode(h){return this._getAttributeValue(h,l)!==void 0}_getAttributeValue(h,p){for(;h&&h!==this._rootDomNode;){const b=h.getAttribute(p);if(b!==null)return b;h=h.parentElement}}}e.StickyScrollWidget=o;class c{constructor(h,p,b,w,E,k){this.index=h,this.lineNumber=p,this.lineDomNode=b,this.lineNumberDomNode=w,this.foldingIcon=E,this.characterMapping=k}}class a{constructor(h,p,b,w){this.isCollapsed=h,this.foldingStartLine=p,this.foldingEndLine=b,this.dimension=w,this.domNode=document.createElement("div"),this.domNode.style.width=`${w}px`,this.domNode.style.height=`${w}px`,this.domNode.className=S.ThemeIcon.asClassName(h?n.foldingCollapsedIcon:n.foldingExpandedIcon)}setVisible(h){this.domNode.style.cursor=h?"pointer":"default",this.domNode.style.opacity=h?"1":"0"}}}),define(te[895],ie([1,0,7,113,14,9,6,2,139,10,161,865,703,15,8,89,31,86,23,223,133,348,860,104,45,171,466,248]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h){"use strict";var p;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestContentWidget=e.SuggestWidget=e.editorSuggestWidgetSelectedBackground=void 0,(0,u.registerColor)("editorSuggestWidget.background",{dark:u.editorWidgetBackground,light:u.editorWidgetBackground,hcDark:u.editorWidgetBackground,hcLight:u.editorWidgetBackground},i.localize(0,null)),(0,u.registerColor)("editorSuggestWidget.border",{dark:u.editorWidgetBorder,light:u.editorWidgetBorder,hcDark:u.editorWidgetBorder,hcLight:u.editorWidgetBorder},i.localize(1,null));const b=(0,u.registerColor)("editorSuggestWidget.foreground",{dark:u.editorForeground,light:u.editorForeground,hcDark:u.editorForeground,hcLight:u.editorForeground},i.localize(2,null));(0,u.registerColor)("editorSuggestWidget.selectedForeground",{dark:u.quickInputListFocusForeground,light:u.quickInputListFocusForeground,hcDark:u.quickInputListFocusForeground,hcLight:u.quickInputListFocusForeground},i.localize(3,null)),(0,u.registerColor)("editorSuggestWidget.selectedIconForeground",{dark:u.quickInputListFocusIconForeground,light:u.quickInputListFocusIconForeground,hcDark:u.quickInputListFocusIconForeground,hcLight:u.quickInputListFocusIconForeground},i.localize(4,null)),e.editorSuggestWidgetSelectedBackground=(0,u.registerColor)("editorSuggestWidget.selectedBackground",{dark:u.quickInputListFocusBackground,light:u.quickInputListFocusBackground,hcDark:u.quickInputListFocusBackground,hcLight:u.quickInputListFocusBackground},i.localize(5,null)),(0,u.registerColor)("editorSuggestWidget.highlightForeground",{dark:u.listHighlightForeground,light:u.listHighlightForeground,hcDark:u.listHighlightForeground,hcLight:u.listHighlightForeground},i.localize(6,null)),(0,u.registerColor)("editorSuggestWidget.focusHighlightForeground",{dark:u.listFocusHighlightForeground,light:u.listFocusHighlightForeground,hcDark:u.listFocusHighlightForeground,hcLight:u.listFocusHighlightForeground},i.localize(7,null)),(0,u.registerColor)("editorSuggestWidgetStatus.foreground",{dark:(0,u.transparent)(b,.5),light:(0,u.transparent)(b,.5),hcDark:(0,u.transparent)(b,.5),hcLight:(0,u.transparent)(b,.5)},i.localize(8,null));class w{constructor(R,B){this._service=R,this._key=`suggestWidget.size/${B.getEditorType()}/${B instanceof C.EmbeddedCodeEditorWidget}`}restore(){var R;const B=(R=this._service.get(this._key,0))!==null&&R!==void 0?R:"";try{const T=JSON.parse(B);if(L.Dimension.is(T))return L.Dimension.lift(T)}catch{}}store(R){this._service.store(this._key,JSON.stringify(R),0,1)}reset(){this._service.remove(this._key,0)}}let E=p=class{constructor(R,B,T,N,A){this.editor=R,this._storageService=B,this._state=0,this._isAuto=!1,this._pendingLayout=new m.MutableDisposable,this._pendingShowDetails=new m.MutableDisposable,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new y.TimeoutTimer,this._disposables=new m.DisposableStore,this._onDidSelect=new S.PauseableEmitter,this._onDidFocus=new S.PauseableEmitter,this._onDidHide=new S.Emitter,this._onDidShow=new S.Emitter,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new S.Emitter,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new l.ResizableHTMLElement,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new k(this,R),this._persistedSize=new w(B,R);class P{constructor(Y,ne,se=!1,J=!1){this.persistedSize=Y,this.currentSize=ne,this.persistHeight=se,this.persistWidth=J}}let O;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),O=new P(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(G=>{var Y,ne,se,J;if(this._resize(G.dimension.width,G.dimension.height),O&&(O.persistHeight=O.persistHeight||!!G.north||!!G.south,O.persistWidth=O.persistWidth||!!G.east||!!G.west),!!G.done){if(O){const{itemHeight:q,defaultSize:H}=this.getLayoutInfo(),V=Math.round(q/2);let{width:Z,height:ee}=this.element.size;(!O.persistHeight||Math.abs(O.currentSize.height-ee)<=V)&&(ee=(ne=(Y=O.persistedSize)===null||Y===void 0?void 0:Y.height)!==null&&ne!==void 0?ne:H.height),(!O.persistWidth||Math.abs(O.currentSize.width-Z)<=V)&&(Z=(J=(se=O.persistedSize)===null||se===void 0?void 0:se.width)!==null&&J!==void 0?J:H.width),this._persistedSize.store(new L.Dimension(Z,ee))}this._contentWidget.unlockPreference(),O=void 0}})),this._messageElement=L.append(this.element.domNode,L.$(".message")),this._listElement=L.append(this.element.domNode,L.$(".tree"));const x=this._disposables.add(A.createInstance(c.SuggestDetailsWidget,this.editor));x.onDidClose(this.toggleDetails,this,this._disposables),this._details=new c.SuggestDetailsOverlay(x,this.editor);const W=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(117).showIcons);W();const U=A.createInstance(a.ItemRenderer,this.editor);this._disposables.add(U),this._disposables.add(U.onDidToggleDetails(()=>this.toggleDetails())),this._list=new I.List("SuggestWidget",this._listElement,{getHeight:G=>this.getLayoutInfo().itemHeight,getTemplateId:G=>"suggestion"},[U],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,multipleSelectionSupport:!1,accessibilityProvider:{getRole:()=>"option",getWidgetAriaLabel:()=>i.localize(11,null),getWidgetRole:()=>"listbox",getAriaLabel:G=>{let Y=G.textLabel;if(typeof G.completion.label!="string"){const{detail:q,description:H}=G.completion.label;q&&H?Y=i.localize(12,null,Y,q,H):q?Y=i.localize(13,null,Y,q):H&&(Y=i.localize(14,null,Y,H))}if(!G.isResolved||!this._isDetailsVisible())return Y;const{documentation:ne,detail:se}=G.completion,J=v.format("{0}{1}",se||"",ne?typeof ne=="string"?ne:ne.value:"");return i.localize(15,null,Y,J)}}}),this._list.style((0,g.getListStyles)({listInactiveFocusBackground:e.editorSuggestWidgetSelectedBackground,listInactiveFocusOutline:u.activeContrastBorder})),this._status=A.createInstance(s.SuggestWidgetStatus,this.element.domNode,o.suggestWidgetStatusbarMenu);const F=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(117).showStatusBar);F(),this._disposables.add(N.onDidColorThemeChange(G=>this._onThemeChange(G))),this._onThemeChange(N.getColorTheme()),this._disposables.add(this._list.onMouseDown(G=>this._onListMouseDownOrTap(G))),this._disposables.add(this._list.onTap(G=>this._onListMouseDownOrTap(G))),this._disposables.add(this._list.onDidChangeSelection(G=>this._onListSelection(G))),this._disposables.add(this._list.onDidChangeFocus(G=>this._onListFocus(G))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(G=>{G.hasChanged(117)&&(F(),W())})),this._ctxSuggestWidgetVisible=o.Context.Visible.bindTo(T),this._ctxSuggestWidgetDetailsVisible=o.Context.DetailsVisible.bindTo(T),this._ctxSuggestWidgetMultipleSuggestions=o.Context.MultipleSuggestions.bindTo(T),this._ctxSuggestWidgetHasFocusedSuggestion=o.Context.HasFocusedSuggestion.bindTo(T),this._disposables.add(L.addStandardDisposableListener(this._details.widget.domNode,"keydown",G=>{this._onDetailsKeydown.fire(G)})),this._disposables.add(this.editor.onMouseDown(G=>this._onEditorMouseDown(G)))}dispose(){var R;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(R=this._loadingTimeout)===null||R===void 0||R.dispose(),this._pendingLayout.dispose(),this._pendingShowDetails.dispose(),this._showTimeout.dispose(),this._contentWidget.dispose(),this.element.dispose()}_onEditorMouseDown(R){this._details.widget.domNode.contains(R.target.element)?this._details.widget.domNode.focus():this.element.domNode.contains(R.target.element)&&this.editor.focus()}_onCursorSelectionChanged(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(R){typeof R.element>"u"||typeof R.index>"u"||(R.browserEvent.preventDefault(),R.browserEvent.stopPropagation(),this._select(R.element,R.index))}_onListSelection(R){R.elements.length&&this._select(R.elements[0],R.indexes[0])}_select(R,B){const T=this._completionModel;T&&(this._onDidSelect.fire({item:R,index:B,model:T}),this.editor.focus())}_onThemeChange(R){this._details.widget.borderWidth=(0,f.isHighContrast)(R.type)?2:1}_onListFocus(R){var B;if(this._ignoreFocusEvents)return;if(!R.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0}),this._ctxSuggestWidgetHasFocusedSuggestion.set(!1);return}if(!this._completionModel)return;this._ctxSuggestWidgetHasFocusedSuggestion.set(!0);const T=R.elements[0],N=R.indexes[0];T!==this._focusedItem&&((B=this._currentSuggestionDetails)===null||B===void 0||B.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=T,this._list.reveal(N),this._currentSuggestionDetails=(0,y.createCancelablePromise)(A=>be(this,void 0,void 0,function*(){const P=(0,y.disposableTimeout)(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250),O=A.onCancellationRequested(()=>P.dispose());try{return yield T.resolve(A)}finally{P.dispose(),O.dispose()}})),this._currentSuggestionDetails.then(()=>{N>=this._list.length||T!==this._list.element(N)||(this._ignoreFocusEvents=!0,this._list.splice(N,1,[T]),this._list.setFocus([N]),this._ignoreFocusEvents=!1,this._isDetailsVisible()?this.showDetails(!1):this.element.domNode.classList.remove("docs-side"),this.editor.setAriaOptions({activeDescendant:(0,a.getAriaId)(N)}))}).catch(D.onUnexpectedError)),this._onDidFocus.fire({item:T,index:N,model:this._completionModel})}_setState(R){if(this._state!==R)switch(this._state=R,this.element.domNode.classList.toggle("frozen",R===4),this.element.domNode.classList.remove("message"),R){case 0:L.hide(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.reset(),this._ctxSuggestWidgetHasFocusedSuggestion.reset(),this._showTimeout.cancel(),this.element.domNode.classList.remove("visible"),this._list.splice(0,this._list.length),this._focusedItem=void 0,this._cappedHeight=void 0,this._explainMode=!1;break;case 1:this.element.domNode.classList.add("message"),this._messageElement.textContent=p.LOADING_MESSAGE,L.hide(this._listElement,this._status.element),L.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,h.status)(p.LOADING_MESSAGE);break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=p.NO_SUGGESTIONS_MESSAGE,L.hide(this._listElement,this._status.element),L.show(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0,(0,h.status)(p.NO_SUGGESTIONS_MESSAGE);break;case 3:L.hide(this._messageElement),L.show(this._listElement,this._status.element),this._show();break;case 4:L.hide(this._messageElement),L.show(this._listElement,this._status.element),this._show();break;case 5:L.hide(this._messageElement),L.show(this._listElement,this._status.element),this._details.show(),this._show();break}}_show(){this._status.show(),this._contentWidget.show(),this._layout(this._persistedSize.restore()),this._ctxSuggestWidgetVisible.set(!0),this._showTimeout.cancelAndSet(()=>{this.element.domNode.classList.add("visible"),this._onDidShow.fire(this)},100)}showTriggered(R,B){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!R,this._isAuto||(this._loadingTimeout=(0,y.disposableTimeout)(()=>this._setState(1),B)))}showSuggestions(R,B,T,N,A){var P,O;if(this._contentWidget.setPosition(this.editor.getPosition()),(P=this._loadingTimeout)===null||P===void 0||P.dispose(),(O=this._currentSuggestionDetails)===null||O===void 0||O.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==R&&(this._completionModel=R),T&&this._state!==2&&this._state!==0){this._setState(4);return}const x=this._completionModel.items.length,W=x===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(x>1),W){this._setState(N?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._onDidFocus.pause(),this._onDidSelect.pause();try{this._list.splice(0,this._list.length,this._completionModel.items),this._setState(T?4:3),this._list.reveal(B,0),this._list.setFocus(A?[]:[B])}finally{this._onDidFocus.resume(),this._onDidSelect.resume()}this._pendingLayout.value=L.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingLayout.clear(),this._layout(this.element.size),this._details.widget.domNode.classList.remove("focused")})}focusSelected(){this._list.length>0&&this._list.setFocus([0])}selectNextPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageDown(),!0;case 1:return!this._isAuto;default:return this._list.focusNextPage(),!0}}selectNext(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusNext(1,!0),!0}}selectLast(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollBottom(),!0;case 1:return!this._isAuto;default:return this._list.focusLast(),!0}}selectPreviousPage(){switch(this._state){case 0:return!1;case 5:return this._details.widget.pageUp(),!0;case 1:return!this._isAuto;default:return this._list.focusPreviousPage(),!0}}selectPrevious(){switch(this._state){case 0:return!1;case 1:return!this._isAuto;default:return this._list.focusPrevious(1,!0),!1}}selectFirst(){switch(this._state){case 0:return!1;case 5:return this._details.widget.scrollTop(),!0;case 1:return!this._isAuto;default:return this._list.focusFirst(),!0}}getFocusedItem(){if(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel&&this._list.getFocus().length>0)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._details.widget.domNode.classList.remove("focused")):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._details.widget.domNode.classList.add("focused"))}toggleDetails(){this._isDetailsVisible()?(this._pendingShowDetails.clear(),this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):((0,c.canExpandCompletionItem)(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(R){this._pendingShowDetails.value=L.runAtThisOrScheduleAtNextAnimationFrame(()=>{this._pendingShowDetails.clear(),this._details.show(),R?this._details.widget.renderLoading():this._details.widget.renderItem(this._list.getFocusedElements()[0],this._explainMode),this._positionDetails(),this.editor.focus(),this.element.domNode.classList.add("shows-details")})}toggleExplainMode(){this._list.getFocusedElements()[0]&&(this._explainMode=!this._explainMode,this._isDetailsVisible()?this.showDetails(!1):this.toggleDetails())}resetPersistedSize(){this._persistedSize.reset()}hideWidget(){var R;this._pendingLayout.clear(),this._pendingShowDetails.clear(),(R=this._loadingTimeout)===null||R===void 0||R.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const B=this._persistedSize.restore(),T=Math.ceil(this.getLayoutInfo().itemHeight*4.3);B&&B.heightW&&(x=W);const U=this._completionModel?this._completionModel.stats.pLabelLen*P.typicalHalfwidthCharacterWidth:x,F=P.statusBarHeight+this._list.contentHeight+P.borderHeight,G=P.itemHeight+P.statusBarHeight,Y=L.getDomNodePagePosition(this.editor.getDomNode()),ne=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),se=Y.top+ne.top+ne.height,J=Math.min(A.height-se-P.verticalPadding,F),q=Y.top+ne.top-P.verticalPadding,H=Math.min(q,F);let V=Math.min(Math.max(H,J)+P.borderHeight,F);O===((B=this._cappedHeight)===null||B===void 0?void 0:B.capped)&&(O=this._cappedHeight.wanted),OV&&(O=V);const Z=150;O>J||this._forceRenderingAbove&&q>Z?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),V=H):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),V=J),this.element.preferredSize=new L.Dimension(U,P.defaultSize.height),this.element.maxSize=new L.Dimension(W,V),this.element.minSize=new L.Dimension(220,G),this._cappedHeight=O===F?{wanted:(N=(T=this._cappedHeight)===null||T===void 0?void 0:T.wanted)!==null&&N!==void 0?N:R.height,capped:O}:void 0}this._resize(x,O)}_resize(R,B){const{width:T,height:N}=this.element.maxSize;R=Math.min(T,R),B=Math.min(N,B);const{statusBarHeight:A}=this.getLayoutInfo();this._list.layout(B-A,R),this._listElement.style.height=`${B-A}px`,this.element.layout(B,R),this._contentWidget.layout(),this._positionDetails()}_positionDetails(){var R;this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode,((R=this._contentWidget.getPosition())===null||R===void 0?void 0:R.preference[0])===2)}getLayoutInfo(){const R=this.editor.getOption(50),B=(0,_.clamp)(this.editor.getOption(119)||R.lineHeight,8,1e3),T=!this.editor.getOption(117).showStatusBar||this._state===2||this._state===1?0:B,N=this._details.widget.borderWidth,A=2*N;return{itemHeight:B,statusBarHeight:T,borderWidth:N,borderHeight:A,typicalHalfwidthCharacterWidth:R.typicalHalfwidthCharacterWidth,verticalPadding:22,horizontalPadding:14,defaultSize:new L.Dimension(430,T+12*B+A)}}_isDetailsVisible(){return this._storageService.getBoolean("expandSuggestionDocs",0,!1)}_setDetailsVisible(R){this._storageService.store("expandSuggestionDocs",R,0,0)}forceRenderingAbove(){this._forceRenderingAbove||(this._forceRenderingAbove=!0,this._layout(this._persistedSize.restore()))}stopForceRenderingAbove(){this._forceRenderingAbove=!1}};e.SuggestWidget=E,E.LOADING_MESSAGE=i.localize(9,null),E.NO_SUGGESTIONS_MESSAGE=i.localize(10,null),e.SuggestWidget=E=p=Ie([ge(1,r.IStorageService),ge(2,n.IContextKeyService),ge(3,d.IThemeService),ge(4,t.IInstantiationService)],E);class k{constructor(R,B){this._widget=R,this._editor=B,this.allowEditorOverflow=!0,this.suppressMouseDown=!1,this._preferenceLocked=!1,this._added=!1,this._hidden=!1}dispose(){this._added&&(this._added=!1,this._editor.removeContentWidget(this))}getId(){return"editor.widget.suggestWidget"}getDomNode(){return this._widget.element.domNode}show(){this._hidden=!1,this._added||(this._added=!0,this._editor.addContentWidget(this))}hide(){this._hidden||(this._hidden=!0,this.layout())}layout(){this._editor.layoutContentWidget(this)}getPosition(){return this._hidden||!this._position||!this._preference?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:R,width:B}=this._widget.element.size,{borderWidth:T,horizontalPadding:N}=this._widget.getLayoutInfo();return new L.Dimension(B+2*T+N,R+2*T)}afterRender(R){this._widget._afterRender(R)}setPreference(R){this._preferenceLocked||(this._preference=R)}lockPreference(){this._preferenceLocked=!0}unlockPreference(){this._preferenceLocked=!1}setPosition(R){this._position=R}}e.SuggestContentWidget=k}),define(te[372],ie([1,0,49,37,29,712,31,23,470]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSelectionHighlightDecorationOptions=e.getHighlightDecorationOptions=void 0;const _=(0,S.registerColor)("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hcDark:null,hcLight:null},D.localize(0,null),!0);(0,S.registerColor)("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hcDark:null,hcLight:null},D.localize(1,null),!0),(0,S.registerColor)("editor.wordHighlightTextBackground",{light:_,dark:_,hcDark:_,hcLight:_},D.localize(2,null),!0);const v=(0,S.registerColor)("editor.wordHighlightBorder",{light:null,dark:null,hcDark:S.activeContrastBorder,hcLight:S.activeContrastBorder},D.localize(3,null));(0,S.registerColor)("editor.wordHighlightStrongBorder",{light:null,dark:null,hcDark:S.activeContrastBorder,hcLight:S.activeContrastBorder},D.localize(4,null)),(0,S.registerColor)("editor.wordHighlightTextBorder",{light:v,dark:v,hcDark:v,hcLight:v},D.localize(5,null));const C=(0,S.registerColor)("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hcDark:"#A0A0A0CC",hcLight:"#A0A0A0CC"},D.localize(6,null),!0),s=(0,S.registerColor)("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hcDark:"#C0A0C0CC",hcLight:"#C0A0C0CC"},D.localize(7,null),!0),i=(0,S.registerColor)("editorOverviewRuler.wordHighlightTextForeground",{dark:S.overviewRulerSelectionHighlightForeground,light:S.overviewRulerSelectionHighlightForeground,hcDark:S.overviewRulerSelectionHighlightForeground,hcLight:S.overviewRulerSelectionHighlightForeground},D.localize(8,null),!0),n=I.ModelDecorationOptions.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:(0,m.themeColorFromId)(s),position:L.OverviewRulerLane.Center},minimap:{color:(0,m.themeColorFromId)(S.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}}),t=I.ModelDecorationOptions.register({description:"word-highlight-text",stickiness:1,className:"wordHighlightText",overviewRuler:{color:(0,m.themeColorFromId)(i),position:L.OverviewRulerLane.Center},minimap:{color:(0,m.themeColorFromId)(S.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}}),r=I.ModelDecorationOptions.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",overviewRuler:{color:(0,m.themeColorFromId)(S.overviewRulerSelectionHighlightForeground),position:L.OverviewRulerLane.Center},minimap:{color:(0,m.themeColorFromId)(S.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}}),u=I.ModelDecorationOptions.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"}),f=I.ModelDecorationOptions.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:(0,m.themeColorFromId)(C),position:L.OverviewRulerLane.Center},minimap:{color:(0,m.themeColorFromId)(S.minimapSelectionOccurrenceHighlight),position:L.MinimapPosition.Inline}});function d(o){return o===y.DocumentHighlightKind.Write?n:o===y.DocumentHighlightKind.Text?t:f}e.getHighlightDecorationOptions=d;function l(o){return o?u:r}e.getSelectionHighlightDecorationOptions=l,(0,m.registerThemingParticipant)((o,c)=>{const a=o.getColor(S.editorSelectionHighlight);a&&c.addRule(`.monaco-editor .selectionHighlight { background-color: ${a.transparent(.5)}; }`)})}),define(te[896],ie([1,0,45,14,62,2,16,206,5,24,22,369,688,30,15,18,372,8]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f){"use strict";var d;Object.defineProperty(e,"__esModule",{value:!0}),e.FocusPreviousCursor=e.FocusNextCursor=e.SelectionHighlighter=e.CompatChangeAll=e.SelectHighlightsAction=e.MoveSelectionToPreviousFindMatchAction=e.MoveSelectionToNextFindMatchAction=e.AddSelectionToPreviousFindMatchAction=e.AddSelectionToNextFindMatchAction=e.MultiCursorSelectionControllerAction=e.MultiCursorSelectionController=e.MultiCursorSession=e.MultiCursorSessionResult=e.InsertCursorBelow=e.InsertCursorAbove=void 0;function l(F,G){const Y=G.filter(ne=>!F.find(se=>se.equals(ne)));if(Y.length>=1){const ne=Y.map(J=>`line ${J.viewState.position.lineNumber} column ${J.viewState.position.column}`).join(", "),se=Y.length===1?i.localize(0,null,ne):i.localize(1,null,ne);(0,L.status)(se)}}class o extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorAbove",label:i.localize(2,null),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(3,null),order:2}})}run(G,Y,ne){if(!Y.hasModel())return;let se=!0;ne&&ne.logicalLine===!1&&(se=!1);const J=Y._getViewModel();if(J.cursorConfig.readOnly)return;J.model.pushStackElement();const q=J.getCursorStates();J.setCursorStates(ne.source,3,m.CursorMoveCommands.addCursorUp(J,q,se)),J.revealTopMostCursor(ne.source),l(q,J.getCursorStates())}}e.InsertCursorAbove=o;class c extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorBelow",label:i.localize(4,null),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(5,null),order:3}})}run(G,Y,ne){if(!Y.hasModel())return;let se=!0;ne&&ne.logicalLine===!1&&(se=!1);const J=Y._getViewModel();if(J.cursorConfig.readOnly)return;J.model.pushStackElement();const q=J.getCursorStates();J.setCursorStates(ne.source,3,m.CursorMoveCommands.addCursorDown(J,q,se)),J.revealBottomMostCursor(ne.source),l(q,J.getCursorStates())}}e.InsertCursorBelow=c;class a extends S.EditorAction{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:i.localize(6,null),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(7,null),order:4}})}getCursorsForSelection(G,Y,ne){if(!G.isEmpty()){for(let se=G.startLineNumber;se1&&ne.push(new v.Selection(G.endLineNumber,G.endColumn,G.endLineNumber,G.endColumn))}}run(G,Y){if(!Y.hasModel())return;const ne=Y.getModel(),se=Y.getSelections(),J=Y._getViewModel(),q=J.getCursorStates(),H=[];se.forEach(V=>this.getCursorsForSelection(V,ne,H)),H.length>0&&Y.setSelections(H),l(q,J.getCursorStates())}}class g extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToBottom",label:i.localize(8,null),alias:"Add Cursors To Bottom",precondition:void 0})}run(G,Y){if(!Y.hasModel())return;const ne=Y.getSelections(),se=Y.getModel().getLineCount(),J=[];for(let V=ne[0].startLineNumber;V<=se;V++)J.push(new v.Selection(V,ne[0].startColumn,V,ne[0].endColumn));const q=Y._getViewModel(),H=q.getCursorStates();J.length>0&&Y.setSelections(J),l(H,q.getCursorStates())}}class h extends S.EditorAction{constructor(){super({id:"editor.action.addCursorsToTop",label:i.localize(9,null),alias:"Add Cursors To Top",precondition:void 0})}run(G,Y){if(!Y.hasModel())return;const ne=Y.getSelections(),se=[];for(let H=ne[0].startLineNumber;H>=1;H--)se.push(new v.Selection(H,ne[0].startColumn,H,ne[0].endColumn));const J=Y._getViewModel(),q=J.getCursorStates();se.length>0&&Y.setSelections(se),l(q,J.getCursorStates())}}class p{constructor(G,Y,ne){this.selections=G,this.revealRange=Y,this.revealScrollType=ne}}e.MultiCursorSessionResult=p;class b{static create(G,Y){if(!G.hasModel())return null;const ne=Y.getState();if(!G.hasTextFocus()&&ne.isRevealed&&ne.searchString.length>0)return new b(G,Y,!1,ne.searchString,ne.wholeWord,ne.matchCase,null);let se=!1,J,q;const H=G.getSelections();H.length===1&&H[0].isEmpty()?(se=!0,J=!0,q=!0):(J=ne.wholeWord,q=ne.matchCase);const V=G.getSelection();let Z,ee=null;if(V.isEmpty()){const le=G.getConfiguredWordAtPosition(V.getStartPosition());if(!le)return null;Z=le.word,ee=new v.Selection(V.startLineNumber,le.startColumn,V.startLineNumber,le.endColumn)}else Z=G.getModel().getValueInRange(V).replace(/\r\n/g,` -`);return new b(G,Y,se,Z,J,q,ee)}constructor(G,Y,ne,se,J,q,H){this._editor=G,this.findController=Y,this.isDisconnectedFromFindController=ne,this.searchText=se,this.wholeWord=J,this.matchCase=q,this.currentMatch=H}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const G=this._getNextMatch();if(!G)return null;const Y=this._editor.getSelections();return new p(Y.concat(G),G,0)}moveSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const G=this._getNextMatch();if(!G)return null;const Y=this._editor.getSelections();return new p(Y.slice(0,Y.length-1).concat(G),G,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const se=this.currentMatch;return this.currentMatch=null,se}this.findController.highlightFindOptions();const G=this._editor.getSelections(),Y=G[G.length-1],ne=this._editor.getModel().findNextMatch(this.searchText,Y.getEndPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return ne?new v.Selection(ne.range.startLineNumber,ne.range.startColumn,ne.range.endLineNumber,ne.range.endColumn):null}addSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const G=this._getPreviousMatch();if(!G)return null;const Y=this._editor.getSelections();return new p(Y.concat(G),G,0)}moveSelectionToPreviousFindMatch(){if(!this._editor.hasModel())return null;const G=this._getPreviousMatch();if(!G)return null;const Y=this._editor.getSelections();return new p(Y.slice(0,Y.length-1).concat(G),G,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const se=this.currentMatch;return this.currentMatch=null,se}this.findController.highlightFindOptions();const G=this._editor.getSelections(),Y=G[G.length-1],ne=this._editor.getModel().findPreviousMatch(this.searchText,Y.getStartPosition(),!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1);return ne?new v.Selection(ne.range.startLineNumber,ne.range.startColumn,ne.range.endLineNumber,ne.range.endColumn):null}selectAll(G){if(!this._editor.hasModel())return[];this.findController.highlightFindOptions();const Y=this._editor.getModel();return G?Y.findMatches(this.searchText,G,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824):Y.findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(129):null,!1,1073741824)}}e.MultiCursorSession=b;class w extends D.Disposable{static get(G){return G.getContribution(w.ID)}constructor(G){super(),this._sessionDispose=this._register(new D.DisposableStore),this._editor=G,this._ignoreSelectionChange=!1,this._session=null}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(G){if(!this._session){const Y=b.create(this._editor,G);if(!Y)return;this._session=Y;const ne={searchString:this._session.searchText};this._session.isDisconnectedFromFindController&&(ne.wholeWordOverride=1,ne.matchCaseOverride=1,ne.isRegexOverride=2),G.getState().change(ne,!1),this._sessionDispose.add(this._editor.onDidChangeCursorSelection(se=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(G.getState().onFindReplaceStateChange(se=>{(se.matchCase||se.wholeWord)&&this._endSession()}))}}_endSession(){if(this._sessionDispose.clear(),this._session&&this._session.isDisconnectedFromFindController){const G={wholeWordOverride:0,matchCaseOverride:0,isRegexOverride:0};this._session.findController.getState().change(G,!1)}this._session=null}_setSelections(G){this._ignoreSelectionChange=!0,this._editor.setSelections(G),this._ignoreSelectionChange=!1}_expandEmptyToWord(G,Y){if(!Y.isEmpty())return Y;const ne=this._editor.getConfiguredWordAtPosition(Y.getStartPosition());return ne?new v.Selection(Y.startLineNumber,ne.startColumn,Y.startLineNumber,ne.endColumn):Y}_applySessionResult(G){G&&(this._setSelections(G.selections),G.revealRange&&this._editor.revealRangeInCenterIfOutsideViewport(G.revealRange,G.revealScrollType))}getSession(G){return this._session}addSelectionToNextFindMatch(G){if(this._editor.hasModel()){if(!this._session){const Y=this._editor.getSelections();if(Y.length>1){const se=G.getState().matchCase;if(!O(this._editor.getModel(),Y,se)){const q=this._editor.getModel(),H=[];for(let V=0,Z=Y.length;V0&&ne.isRegex){const se=this._editor.getModel();ne.searchScope?Y=se.findMatches(ne.searchString,ne.searchScope,ne.isRegex,ne.matchCase,ne.wholeWord?this._editor.getOption(129):null,!1,1073741824):Y=se.findMatches(ne.searchString,!0,ne.isRegex,ne.matchCase,ne.wholeWord?this._editor.getOption(129):null,!1,1073741824)}else{if(this._beginSessionIfNeeded(G),!this._session)return;Y=this._session.selectAll(ne.searchScope)}if(Y.length>0){const se=this._editor.getSelection();for(let J=0,q=Y.length;Jnew v.Selection(J.range.startLineNumber,J.range.startColumn,J.range.endLineNumber,J.range.endColumn)))}}}e.MultiCursorSelectionController=w,w.ID="editor.contrib.multiCursorController";class E extends S.EditorAction{run(G,Y){const ne=w.get(Y);if(!ne)return;const se=Y._getViewModel();if(se){const J=se.getCursorStates(),q=s.CommonFindController.get(Y);if(q)this._run(ne,q);else{const H=G.get(f.IInstantiationService).createInstance(s.CommonFindController,Y);this._run(ne,H),H.dispose()}l(J,se.getCursorStates())}}}e.MultiCursorSelectionControllerAction=E;class k extends E{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:i.localize(10,null),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:2082,weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(11,null),order:5}})}_run(G,Y){G.addSelectionToNextFindMatch(Y)}}e.AddSelectionToNextFindMatchAction=k;class M extends E{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:i.localize(12,null),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(13,null),order:6}})}_run(G,Y){G.addSelectionToPreviousFindMatch(Y)}}e.AddSelectionToPreviousFindMatchAction=M;class R extends E{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:i.localize(14,null),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:(0,y.KeyChord)(2089,2082),weight:100}})}_run(G,Y){G.moveSelectionToNextFindMatch(Y)}}e.MoveSelectionToNextFindMatchAction=R;class B extends E{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:i.localize(15,null),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(G,Y){G.moveSelectionToPreviousFindMatch(Y)}}e.MoveSelectionToPreviousFindMatchAction=B;class T extends E{constructor(){super({id:"editor.action.selectHighlights",label:i.localize(16,null),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:C.EditorContextKeys.focus,primary:3114,weight:100},menuOpts:{menuId:n.MenuId.MenubarSelectionMenu,group:"3_multi",title:i.localize(17,null),order:7}})}_run(G,Y){G.selectAll(Y)}}e.SelectHighlightsAction=T;class N extends E{constructor(){super({id:"editor.action.changeAll",label:i.localize(18,null),alias:"Change All Occurrences",precondition:t.ContextKeyExpr.and(C.EditorContextKeys.writable,C.EditorContextKeys.editorTextFocus),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(G,Y){G.selectAll(Y)}}e.CompatChangeAll=N;class A{constructor(G,Y,ne,se,J){this._model=G,this._searchText=Y,this._matchCase=ne,this._wordSeparators=se,this._modelVersionId=this._model.getVersionId(),this._cachedFindMatches=null,J&&this._model===J._model&&this._searchText===J._searchText&&this._matchCase===J._matchCase&&this._wordSeparators===J._wordSeparators&&this._modelVersionId===J._modelVersionId&&(this._cachedFindMatches=J._cachedFindMatches)}findMatches(){return this._cachedFindMatches===null&&(this._cachedFindMatches=this._model.findMatches(this._searchText,!0,!1,this._matchCase,this._wordSeparators,!1).map(G=>G.range),this._cachedFindMatches.sort(_.Range.compareRangesUsingStarts)),this._cachedFindMatches}}let P=d=class extends D.Disposable{constructor(G,Y){super(),this._languageFeaturesService=Y,this.editor=G,this._isEnabled=G.getOption(107),this._decorations=G.createDecorationsCollection(),this.updateSoon=this._register(new I.RunOnceScheduler(()=>this._update(),300)),this.state=null,this._register(G.onDidChangeConfiguration(se=>{this._isEnabled=G.getOption(107)})),this._register(G.onDidChangeCursorSelection(se=>{this._isEnabled&&(se.selection.isEmpty()?se.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(G.onDidChangeModel(se=>{this._setState(null)})),this._register(G.onDidChangeModelContent(se=>{this._isEnabled&&this.updateSoon.schedule()}));const ne=s.CommonFindController.get(G);ne&&this._register(ne.getState().onFindReplaceStateChange(se=>{this._update()})),this.updateSoon.schedule()}_update(){this._setState(d._createState(this.state,this._isEnabled,this.editor))}static _createState(G,Y,ne){if(!Y||!ne.hasModel())return null;const se=ne.getSelection();if(se.startLineNumber!==se.endLineNumber)return null;const J=w.get(ne);if(!J)return null;const q=s.CommonFindController.get(ne);if(!q)return null;let H=J.getSession(q);if(!H){const ee=ne.getSelections();if(ee.length>1){const ue=q.getState().matchCase;if(!O(ne.getModel(),ee,ue))return null}H=b.create(ne,q)}if(!H||H.currentMatch||/^[ \t]+$/.test(H.searchText)||H.searchText.length>200)return null;const V=q.getState(),Z=V.matchCase;if(V.isRevealed){let ee=V.searchString;Z||(ee=ee.toLowerCase());let le=H.searchText;if(Z||(le=le.toLowerCase()),ee===le&&H.matchCase===V.matchCase&&H.wholeWord===V.wholeWord&&!V.isRegex)return null}return new A(ne.getModel(),H.searchText,H.matchCase,H.wholeWord?ne.getOption(129):null,G)}_setState(G){if(this.state=G,!this.state){this._decorations.clear();return}if(!this.editor.hasModel())return;const Y=this.editor.getModel();if(Y.isTooLargeForTokenization())return;const ne=this.state.findMatches(),se=this.editor.getSelections();se.sort(_.Range.compareRangesUsingStarts);const J=[];for(let V=0,Z=0,ee=ne.length,le=se.length;V=le)J.push(ue),V++;else{const de=_.Range.compareRangesUsingStarts(ue,se[Z]);de<0?((se[Z].isEmpty()||!_.Range.areIntersecting(ue,se[Z]))&&J.push(ue),V++):(de>0||V++,Z++)}}const q=this._languageFeaturesService.documentHighlightProvider.has(Y)&&this.editor.getOption(80),H=J.map(V=>({range:V,options:(0,u.getSelectionHighlightDecorationOptions)(q)}));this._decorations.set(H)}dispose(){this._setState(null),super.dispose()}};e.SelectionHighlighter=P,P.ID="editor.contrib.selectionHighlighter",e.SelectionHighlighter=P=d=Ie([ge(1,r.ILanguageFeaturesService)],P);function O(F,G,Y){const ne=x(F,G[0],!Y);for(let se=1,J=G.length;se()=>Promise.resolve(A.provideDocumentHighlights(R,B,T)).then(void 0,S.onUnexpectedExternalError)),I.isNonEmptyArray)}e.getOccurrencesAtPosition=l;class o{constructor(R,B,T){this._model=R,this._selection=B,this._wordSeparators=T,this._wordRange=this._getCurrentWordRange(R,B),this._result=null}get result(){return this._result||(this._result=(0,y.createCancelablePromise)(R=>this._compute(this._model,this._selection,this._wordSeparators,R))),this._result}_getCurrentWordRange(R,B){const T=R.getWordAtPosition(B.getPosition());return T?new v.Range(B.startLineNumber,T.startColumn,B.startLineNumber,T.endColumn):null}isValid(R,B,T){const N=B.startLineNumber,A=B.startColumn,P=B.endColumn,O=this._getCurrentWordRange(R,B);let x=!!(this._wordRange&&this._wordRange.equalsRange(O));for(let W=0,U=T.length;!x&&W=P&&(x=!0)}return x}cancel(){this.result.cancel()}}class c extends o{constructor(R,B,T,N){super(R,B,T),this._providers=N}_compute(R,B,T,N){return l(this._providers,R,B.getPosition(),N).then(A=>A||[])}}class a extends o{constructor(R,B,T){super(R,B,T),this._selectionIsEmpty=B.isEmpty()}_compute(R,B,T,N){return(0,y.timeout)(250,N).then(()=>{if(!B.isEmpty())return[];const A=R.getWordAtPosition(B.getPosition());return!A||A.word.length>1e3?[]:R.findMatches(A.word,!0,!1,!0,T,!1).map(O=>({range:O.range,kind:s.DocumentHighlightKind.Text}))})}isValid(R,B,T){const N=B.isEmpty();return this._selectionIsEmpty!==N?!1:super.isValid(R,B,T)}}function g(M,R,B,T){return M.has(R)?new c(R,B,T,M):new a(R,B,T)}(0,_.registerModelAndPositionCommand)("_executeDocumentHighlights",(M,R,B)=>{const T=M.get(t.ILanguageFeaturesService);return l(T.documentHighlightProvider,R,B,D.CancellationToken.None)});class h{constructor(R,B,T,N){this.toUnhook=new m.DisposableStore,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=R,this.providers=B,this.linkedHighlighters=T,this._hasWordHighlights=d.bindTo(N),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(80),this.model=this.editor.getModel(),this.toUnhook.add(R.onDidChangeCursorPosition(A=>{this._ignorePositionChangeEvent||this.occurrencesHighlight&&this._onPositionChanged(A)})),this.toUnhook.add(R.onDidChangeModelContent(A=>{this._stopAll()})),this.toUnhook.add(R.onDidChangeConfiguration(A=>{const P=this.editor.getOption(80);this.occurrencesHighlight!==P&&(this.occurrencesHighlight=P,this._stopAll())})),this.decorations=this.editor.createDecorationsCollection(),this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this.decorations.length>0}restore(){this.occurrencesHighlight&&this._run()}_getSortedHighlights(){return this.decorations.getRanges().sort(v.Range.compareRangesUsingStarts)}moveNext(){const R=this._getSortedHighlights(),T=(R.findIndex(A=>A.containsPosition(this.editor.getPosition()))+1)%R.length,N=R[T];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(N.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(N);const A=this._getWord();if(A){const P=this.editor.getModel().getLineContent(N.startLineNumber);(0,L.alert)(`${P}, ${T+1} of ${R.length} for '${A.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){const R=this._getSortedHighlights(),T=(R.findIndex(A=>A.containsPosition(this.editor.getPosition()))-1+R.length)%R.length,N=R[T];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(N.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(N);const A=this._getWord();if(A){const P=this.editor.getModel().getLineContent(N.startLineNumber);(0,L.alert)(`${P}, ${T+1} of ${R.length} for '${A.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this.decorations.length>0&&(this.decorations.clear(),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(R){if(!this.occurrencesHighlight){this._stopAll();return}if(R.reason!==3){this._stopAll();return}this._run()}_getWord(){const R=this.editor.getSelection(),B=R.startLineNumber,T=R.startColumn;return this.model.getWordAtPosition({lineNumber:B,column:T})}_run(){const R=this.editor.getSelection();if(R.startLineNumber!==R.endLineNumber){this._stopAll();return}const B=R.startColumn,T=R.endColumn,N=this._getWord();if(!N||N.startColumn>B||N.endColumn{P===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=O||[],this._beginRenderDecorations())},S.onUnexpectedError)}}_beginRenderDecorations(){const R=new Date().getTime(),B=this.lastCursorPositionChangeTime+250;R>=B?(this.renderDecorationsTimer=-1,this.renderDecorations()):this.renderDecorationsTimer=setTimeout(()=>{this.renderDecorations()},B-R)}renderDecorations(){this.renderDecorationsTimer=-1;const R=[];for(const B of this.workerRequestValue)B.range&&R.push({range:B.range,options:(0,r.getHighlightDecorationOptions)(B.kind)});this.decorations.set(R),this._hasWordHighlights.set(this.hasDecorations());for(const B of this.linkedHighlighters())B?.editor.getModel()===this.editor.getModel()&&(B._stopAll(),B.decorations.set(R),B._hasWordHighlights.set(B.hasDecorations()))}dispose(){this._stopAll(),this.toUnhook.dispose()}}let p=f=class extends m.Disposable{static get(R){return R.getContribution(f.ID)}constructor(R,B,T){super(),this.wordHighlighter=null,this.linkedContributions=new Set;const N=()=>{R.hasModel()&&!R.getModel().isTooLargeForTokenization()&&(this.wordHighlighter=new h(R,T.documentHighlightProvider,()=>u.Iterable.map(this.linkedContributions,A=>A.wordHighlighter),B))};this._register(R.onDidChangeModel(A=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),N()})),N()}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){var R;(R=this.wordHighlighter)===null||R===void 0||R.moveNext()}moveBack(){var R;(R=this.wordHighlighter)===null||R===void 0||R.moveBack()}restoreViewState(R){this.wordHighlighter&&R&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};e.WordHighlighterContribution=p,p.ID="editor.contrib.wordHighlighter",e.WordHighlighterContribution=p=f=Ie([ge(1,n.IContextKeyService),ge(2,t.ILanguageFeaturesService)],p);class b extends _.EditorAction{constructor(R,B){super(B),this._isNext=R}run(R,B){const T=p.get(B);T&&(this._isNext?T.moveNext():T.moveBack())}}class w extends b{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:i.localize(0,null),alias:"Go to Next Symbol Highlight",precondition:d,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:65,weight:100}})}}class E extends b{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:i.localize(1,null),alias:"Go to Previous Symbol Highlight",precondition:d,kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:1089,weight:100}})}}class k extends _.EditorAction{constructor(){super({id:"editor.action.wordHighlight.trigger",label:i.localize(2,null),alias:"Trigger Symbol Highlight",precondition:d.toNegated(),kbOpts:{kbExpr:C.EditorContextKeys.editorTextFocus,primary:0,weight:100}})}run(R,B,T){const N=p.get(B);N&&N.restoreViewState(!0)}}(0,_.registerEditorContribution)(p.ID,p,0),(0,_.registerEditorAction)(w),(0,_.registerEditorAction)(E),(0,_.registerEditorAction)(k)}),define(te[898],ie([1,0,7,152,36,163,2,52,5,37,471]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZoneWidget=e.OverlayWidgetDelegate=void 0;const C=new y.Color(new y.RGBA(0,122,204)),s={showArrow:!0,showFrame:!0,className:"",frameColor:C,arrowColor:C,keepEditorSelection:!1},i="vs.editor.contrib.zoneWidget";class n{constructor(d,l,o,c,a,g,h,p){this.id="",this.domNode=d,this.afterLineNumber=l,this.afterColumn=o,this.heightInLines=c,this.showInHiddenAreas=h,this.ordinal=p,this._onDomNodeTop=a,this._onComputedHeight=g}onDomNodeTop(d){this._onDomNodeTop(d)}onComputedHeight(d){this._onComputedHeight(d)}}class t{constructor(d,l){this._id=d,this._domNode=l}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}e.OverlayWidgetDelegate=t;class r{constructor(d){this._editor=d,this._ruleName=r._IdGenerator.nextId(),this._decorations=this._editor.createDecorationsCollection(),this._color=null,this._height=-1}dispose(){this.hide(),L.removeCSSRulesContainingSelector(this._ruleName)}set color(d){this._color!==d&&(this._color=d,this._updateStyle())}set height(d){this._height!==d&&(this._height=d,this._updateStyle())}_updateStyle(){L.removeCSSRulesContainingSelector(this._ruleName),L.createCSSRule(`.monaco-editor ${this._ruleName}`,`border-style: solid; border-color: transparent; border-bottom-color: ${this._color}; border-width: ${this._height}px; bottom: -${this._height}px; margin-left: -${this._height}px; `)}show(d){d.column===1&&(d={lineNumber:d.lineNumber,column:2}),this._decorations.set([{range:_.Range.fromPositions(d),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._decorations.clear()}}r._IdGenerator=new D.IdGenerator(".arrow-decoration-");class u{constructor(d,l={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._viewZone=null,this._disposables=new S.DisposableStore,this.container=null,this._isShowing=!1,this.editor=d,this._positionMarkerId=this.editor.createDecorationsCollection(),this.options=m.deepClone(l),m.mixin(this.options,s,!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(o=>{const c=this._getWidth(o);this.domNode.style.width=c+"px",this.domNode.style.left=this._getLeft(o)+"px",this._onWidth(c)}))}dispose(){this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this._viewZone&&this.editor.changeViewZones(d=>{this._viewZone&&d.removeZone(this._viewZone.id),this._viewZone=null}),this._positionMarkerId.clear(),this._disposables.dispose()}create(){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 r(this.editor),this._disposables.add(this._arrow)),this._fillContainer(this.container),this._initSash(),this._applyStyles()}style(d){d.frameColor&&(this.options.frameColor=d.frameColor),d.arrowColor&&(this.options.arrowColor=d.arrowColor),this._applyStyles()}_applyStyles(){if(this.container&&this.options.frameColor){const d=this.options.frameColor.toString();this.container.style.borderTopColor=d,this.container.style.borderBottomColor=d}if(this._arrow&&this.options.arrowColor){const d=this.options.arrowColor.toString();this._arrow.color=d}}_getWidth(d){return d.width-d.minimap.minimapWidth-d.verticalScrollbarWidth}_getLeft(d){return d.minimap.minimapWidth>0&&d.minimap.minimapLeft===0?d.minimap.minimapWidth:0}_onViewZoneTop(d){this.domNode.style.top=d+"px"}_onViewZoneHeight(d){var l;if(this.domNode.style.height=`${d}px`,this.container){const o=d-this._decoratingElementsHeight();this.container.style.height=`${o}px`;const c=this.editor.getLayoutInfo();this._doLayout(o,this._getWidth(c))}(l=this._resizeSash)===null||l===void 0||l.layout()}get position(){const d=this._positionMarkerId.getRange(0);if(d)return d.getStartPosition()}show(d,l){const o=_.Range.isIRange(d)?_.Range.lift(d):_.Range.fromPositions(d);this._isShowing=!0,this._showImpl(o,l),this._isShowing=!1,this._positionMarkerId.set([{range:o,options:v.ModelDecorationOptions.EMPTY}])}hide(){var d;this._viewZone&&(this.editor.changeViewZones(l=>{this._viewZone&&l.removeZone(this._viewZone.id)}),this._viewZone=null),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),(d=this._arrow)===null||d===void 0||d.hide(),this._positionMarkerId.clear()}_decoratingElementsHeight(){const d=this.editor.getOption(66);let l=0;if(this.options.showArrow){const o=Math.round(d/3);l+=2*o}if(this.options.showFrame){const o=Math.round(d/9);l+=2*o}return l}_showImpl(d,l){const o=d.getStartPosition(),c=this.editor.getLayoutInfo(),a=this._getWidth(c);this.domNode.style.width=`${a}px`,this.domNode.style.left=this._getLeft(c)+"px";const g=document.createElement("div");g.style.overflow="hidden";const h=this.editor.getOption(66);if(!this.options.allowUnlimitedHeight){const k=Math.max(12,this.editor.getLayoutInfo().height/h*.8);l=Math.min(l,k)}let p=0,b=0;if(this._arrow&&this.options.showArrow&&(p=Math.round(h/3),this._arrow.height=p,this._arrow.show(o)),this.options.showFrame&&(b=Math.round(h/9)),this.editor.changeViewZones(k=>{this._viewZone&&k.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new n(g,o.lineNumber,o.column,l,M=>this._onViewZoneTop(M),M=>this._onViewZoneHeight(M),this.options.showInHiddenAreas,this.options.ordinal),this._viewZone.id=k.addZone(this._viewZone),this._overlayWidget=new t(i+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const k=this.options.frameWidth?this.options.frameWidth:b;this.container.style.borderTopWidth=k+"px",this.container.style.borderBottomWidth=k+"px"}const w=l*h-this._decoratingElementsHeight();this.container&&(this.container.style.top=p+"px",this.container.style.height=w+"px",this.container.style.overflow="hidden"),this._doLayout(w,a),this.options.keepEditorSelection||this.editor.setSelection(d);const E=this.editor.getModel();if(E){const k=E.validateRange(new _.Range(d.startLineNumber,1,d.endLineNumber+1,1));this.revealRange(k,k.startLineNumber===E.getLineCount())}}revealRange(d,l){l?this.editor.revealLineNearTop(d.endLineNumber,0):this.editor.revealRange(d,0)}setCssClass(d,l){this.container&&(l&&this.container.classList.remove(l),this.container.classList.add(d))}_onWidth(d){}_doLayout(d,l){}_relayout(d){this._viewZone&&this._viewZone.heightInLines!==d&&this.editor.changeViewZones(l=>{this._viewZone&&(this._viewZone.heightInLines=d,l.layoutZone(this._viewZone.id))})}_initSash(){if(this._resizeSash)return;this._resizeSash=this._disposables.add(new I.Sash(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.state=0);let d;this._disposables.add(this._resizeSash.onDidStart(l=>{this._viewZone&&(d={startY:l.startY,heightInLines:this._viewZone.heightInLines})})),this._disposables.add(this._resizeSash.onDidEnd(()=>{d=void 0})),this._disposables.add(this._resizeSash.onDidChange(l=>{if(d){const o=(l.currentY-d.startY)/this.editor.getOption(66),c=o<0?Math.ceil(o):Math.floor(o),a=d.heightInLines+c;a>5&&a<35&&this._relayout(a)}}))}getHorizontalSashLeft(){return 0}getHorizontalSashTop(){return(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const d=this.editor.getLayoutInfo();return d.width-d.minimap.minimapWidth}}e.ZoneWidget=u}),define(te[136],ie([1,0,7,73,41,26,27,36,6,52,16,33,161,898,691,160,15,47,8,31,462]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.peekViewEditorMatchHighlightBorder=e.peekViewEditorMatchHighlight=e.peekViewResultsMatchHighlight=e.peekViewEditorStickyScrollBackground=e.peekViewEditorGutterBackground=e.peekViewEditorBackground=e.peekViewResultsSelectionForeground=e.peekViewResultsSelectionBackground=e.peekViewResultsFileForeground=e.peekViewResultsMatchForeground=e.peekViewResultsBackground=e.peekViewBorder=e.peekViewTitleInfoForeground=e.peekViewTitleForeground=e.peekViewTitleBackground=e.PeekViewWidget=e.getOuterEditor=e.PeekContext=e.IPeekViewService=void 0,e.IPeekViewService=(0,d.createDecorator)("IPeekViewService"),(0,f.registerSingleton)(e.IPeekViewService,class{constructor(){this._widgets=new Map}addExclusiveWidget(p,b){const w=this._widgets.get(p);w&&(w.listener.dispose(),w.widget.dispose());const E=()=>{const k=this._widgets.get(p);k&&k.widget===b&&(k.listener.dispose(),this._widgets.delete(p))};this._widgets.set(p,{widget:b,listener:b.onDidClose(E)})}},1);var o;(function(p){p.inPeekEditor=new u.RawContextKey("inReferenceSearchEditor",!0,t.localize(0,null)),p.notInPeekEditor=p.inPeekEditor.toNegated()})(o||(e.PeekContext=o={}));let c=class{constructor(b,w){b instanceof i.EmbeddedCodeEditorWidget&&o.inPeekEditor.bindTo(w)}dispose(){}};c.ID="editor.contrib.referenceController",c=Ie([ge(1,u.IContextKeyService)],c),(0,C.registerEditorContribution)(c.ID,c,0);function a(p){const b=p.get(s.ICodeEditorService).getFocusedCodeEditor();return b instanceof i.EmbeddedCodeEditorWidget?b.getParentEditor():b}e.getOuterEditor=a;const g={headerBackgroundColor:m.Color.white,primaryHeadingColor:m.Color.fromHex("#333333"),secondaryHeadingColor:m.Color.fromHex("#6c6c6cb3")};let h=class extends n.ZoneWidget{constructor(b,w,E){super(b,w),this.instantiationService=E,this._onDidClose=new _.Emitter,this.onDidClose=this._onDidClose.event,v.mixin(this.options,g,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(b){const w=this.options;b.headerBackgroundColor&&(w.headerBackgroundColor=b.headerBackgroundColor),b.primaryHeadingColor&&(w.primaryHeadingColor=b.primaryHeadingColor),b.secondaryHeadingColor&&(w.secondaryHeadingColor=b.secondaryHeadingColor),super.style(b)}_applyStyles(){super._applyStyles();const b=this.options;this._headElement&&b.headerBackgroundColor&&(this._headElement.style.backgroundColor=b.headerBackgroundColor.toString()),this._primaryHeading&&b.primaryHeadingColor&&(this._primaryHeading.style.color=b.primaryHeadingColor.toString()),this._secondaryHeading&&b.secondaryHeadingColor&&(this._secondaryHeading.style.color=b.secondaryHeadingColor.toString()),this._bodyElement&&b.frameColor&&(this._bodyElement.style.borderColor=b.frameColor.toString())}_fillContainer(b){this.setCssClass("peekview-widget"),this._headElement=L.$(".head"),this._bodyElement=L.$(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),b.appendChild(this._headElement),b.appendChild(this._bodyElement)}_fillHead(b,w){this._titleElement=L.$(".peekview-title"),this.options.supportOnTitleClick&&(this._titleElement.classList.add("clickable"),L.addStandardDisposableListener(this._titleElement,"click",M=>this._onTitleClick(M))),L.append(this._headElement,this._titleElement),this._fillTitleIcon(this._titleElement),this._primaryHeading=L.$("span.filename"),this._secondaryHeading=L.$("span.dirname"),this._metaHeading=L.$("span.meta"),L.append(this._titleElement,this._primaryHeading,this._secondaryHeading,this._metaHeading);const E=L.$(".peekview-actions");L.append(this._headElement,E);const k=this._getActionBarOptions();this._actionbarWidget=new I.ActionBar(E,k),this._disposables.add(this._actionbarWidget),w||this._actionbarWidget.push(new y.Action("peekview.close",t.localize(1,null),S.ThemeIcon.asClassName(D.Codicon.close),!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(b){}_getActionBarOptions(){return{actionViewItemProvider:r.createActionViewItem.bind(void 0,this.instantiationService),orientation:0}}_onTitleClick(b){}setTitle(b,w){this._primaryHeading&&this._secondaryHeading&&(this._primaryHeading.innerText=b,this._primaryHeading.setAttribute("title",b),w?this._secondaryHeading.innerText=w:L.clearNode(this._secondaryHeading))}setMetaTitle(b){this._metaHeading&&(b?(this._metaHeading.innerText=b,L.show(this._metaHeading)):L.hide(this._metaHeading))}_doLayout(b,w){if(!this._isShowing&&b<0){this.dispose();return}const E=Math.ceil(this.editor.getOption(66)*1.2),k=Math.round(b-(E+2));this._doLayoutHead(E,w),this._doLayoutBody(k,w)}_doLayoutHead(b,w){this._headElement&&(this._headElement.style.height=`${b}px`,this._headElement.style.lineHeight=this._headElement.style.height)}_doLayoutBody(b,w){this._bodyElement&&(this._bodyElement.style.height=`${b}px`)}};e.PeekViewWidget=h,e.PeekViewWidget=h=Ie([ge(2,d.IInstantiationService)],h),e.peekViewTitleBackground=(0,l.registerColor)("peekViewTitle.background",{dark:"#252526",light:"#F3F3F3",hcDark:m.Color.black,hcLight:m.Color.white},t.localize(2,null)),e.peekViewTitleForeground=(0,l.registerColor)("peekViewTitleLabel.foreground",{dark:m.Color.white,light:m.Color.black,hcDark:m.Color.white,hcLight:l.editorForeground},t.localize(3,null)),e.peekViewTitleInfoForeground=(0,l.registerColor)("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161",hcDark:"#FFFFFF99",hcLight:"#292929"},t.localize(4,null)),e.peekViewBorder=(0,l.registerColor)("peekView.border",{dark:l.editorInfoForeground,light:l.editorInfoForeground,hcDark:l.contrastBorder,hcLight:l.contrastBorder},t.localize(5,null)),e.peekViewResultsBackground=(0,l.registerColor)("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hcDark:m.Color.black,hcLight:m.Color.white},t.localize(6,null)),e.peekViewResultsMatchForeground=(0,l.registerColor)("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hcDark:m.Color.white,hcLight:l.editorForeground},t.localize(7,null)),e.peekViewResultsFileForeground=(0,l.registerColor)("peekViewResult.fileForeground",{dark:m.Color.white,light:"#1E1E1E",hcDark:m.Color.white,hcLight:l.editorForeground},t.localize(8,null)),e.peekViewResultsSelectionBackground=(0,l.registerColor)("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hcDark:null,hcLight:null},t.localize(9,null)),e.peekViewResultsSelectionForeground=(0,l.registerColor)("peekViewResult.selectionForeground",{dark:m.Color.white,light:"#6C6C6C",hcDark:m.Color.white,hcLight:l.editorForeground},t.localize(10,null)),e.peekViewEditorBackground=(0,l.registerColor)("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hcDark:m.Color.black,hcLight:m.Color.white},t.localize(11,null)),e.peekViewEditorGutterBackground=(0,l.registerColor)("peekViewEditorGutter.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},t.localize(12,null)),e.peekViewEditorStickyScrollBackground=(0,l.registerColor)("peekViewEditorStickyScroll.background",{dark:e.peekViewEditorBackground,light:e.peekViewEditorBackground,hcDark:e.peekViewEditorBackground,hcLight:e.peekViewEditorBackground},t.localize(13,null)),e.peekViewResultsMatchHighlight=(0,l.registerColor)("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hcDark:null,hcLight:null},t.localize(14,null)),e.peekViewEditorMatchHighlight=(0,l.registerColor)("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hcDark:null,hcLight:null},t.localize(15,null)),e.peekViewEditorMatchHighlightBorder=(0,l.registerColor)("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hcDark:l.activeContrastBorder,hcLight:l.activeContrastBorder},t.localize(16,null))}),define(te[899],ie([1,0,7,84,13,36,6,2,46,10,5,136,664,160,30,15,8,158,94,55,788,31,23,449]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerNavigationWidget=void 0;class h{constructor(O,x,W,U,F){this._openerService=U,this._labelService=F,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new m.DisposableStore,this._editor=x;const G=document.createElement("div");G.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),G.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),G.appendChild(this._relatedBlock),this._disposables.add(L.addStandardDisposableListener(this._relatedBlock,"click",Y=>{Y.preventDefault();const ne=this._relatedDiagnostics.get(Y.target);ne&&W(ne)})),this._scrollable=new I.ScrollableElement(G,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),O.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(Y=>{G.style.left=`-${Y.scrollLeft}px`,G.style.top=`-${Y.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){(0,m.dispose)(this._disposables)}update(O){const{source:x,message:W,relatedInformation:U,code:F}=O;let G=(x?.length||0)+2;F&&(typeof F=="string"?G+=F.length:G+=F.value.length);const Y=(0,v.splitLines)(W);this._lines=Y.length,this._longestLineLength=0;for(const H of Y)this._longestLineLength=Math.max(H.length+G,this._longestLineLength);L.clearNode(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(O)),this._editor.applyFontInfo(this._messageBlock);let ne=this._messageBlock;for(const H of Y)ne=document.createElement("div"),ne.innerText=H,H===""&&(ne.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(ne);if(x||F){const H=document.createElement("span");if(H.classList.add("details"),ne.appendChild(H),x){const V=document.createElement("span");V.innerText=x,V.classList.add("source"),H.appendChild(V)}if(F)if(typeof F=="string"){const V=document.createElement("span");V.innerText=`(${F})`,V.classList.add("code"),H.appendChild(V)}else{this._codeLink=L.$("a.code-link"),this._codeLink.setAttribute("href",`${F.target.toString()}`),this._codeLink.onclick=Z=>{this._openerService.open(F.target,{allowCommands:!0}),Z.preventDefault(),Z.stopPropagation()};const V=L.append(this._codeLink,L.$("span"));V.innerText=F.value,H.appendChild(this._codeLink)}}if(L.clearNode(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,y.isNonEmptyArray)(U)){const H=this._relatedBlock.appendChild(document.createElement("div"));H.style.paddingTop=`${Math.floor(this._editor.getOption(66)*.66)}px`,this._lines+=1;for(const V of U){const Z=document.createElement("div"),ee=document.createElement("a");ee.classList.add("filename"),ee.innerText=`${this._labelService.getUriBasenameLabel(V.resource)}(${V.startLineNumber}, ${V.startColumn}): `,ee.title=this._labelService.getUriLabel(V.resource),this._relatedDiagnostics.set(ee,V);const le=document.createElement("span");le.innerText=V.message,Z.appendChild(ee),Z.appendChild(le),this._lines+=1,H.appendChild(Z)}}const se=this._editor.getOption(50),J=Math.ceil(se.typicalFullwidthCharacterWidth*this._longestLineLength*.75),q=se.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:J,scrollHeight:q})}layout(O,x){this._scrollable.getDomNode().style.height=`${O}px`,this._scrollable.getDomNode().style.width=`${x}px`,this._scrollable.setScrollDimensions({width:x,height:O})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(O){let x="";switch(O.severity){case d.MarkerSeverity.Error:x=i.localize(0,null);break;case d.MarkerSeverity.Warning:x=i.localize(1,null);break;case d.MarkerSeverity.Info:x=i.localize(2,null);break;case d.MarkerSeverity.Hint:x=i.localize(3,null);break}let W=i.localize(4,null,x,O.startLineNumber+":"+O.startColumn);const U=this._editor.getModel();return U&&O.startLineNumber<=U.getLineCount()&&O.startLineNumber>=1&&(W=`${U.getLineContent(O.startLineNumber)}, ${W}`),W}}let p=g=class extends s.PeekViewWidget{constructor(O,x,W,U,F,G,Y){super(O,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},F),this._themeService=x,this._openerService=W,this._menuService=U,this._contextKeyService=G,this._labelService=Y,this._callOnDispose=new m.DisposableStore,this._onDidSelectRelatedInformation=new S.Emitter,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=d.MarkerSeverity.Warning,this._backgroundColor=D.Color.white,this._applyTheme(x.getColorTheme()),this._callOnDispose.add(x.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(O){this._backgroundColor=O.getColor(A);let x=k,W=M;this._severity===d.MarkerSeverity.Warning?(x=R,W=B):this._severity===d.MarkerSeverity.Info&&(x=T,W=N);const U=O.getColor(x),F=O.getColor(W);this.style({arrowColor:U,frameColor:U,headerBackgroundColor:F,primaryHeadingColor:O.getColor(s.peekViewTitleForeground),secondaryHeadingColor:O.getColor(s.peekViewTitleInfoForeground)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(O){super._fillHead(O),this._disposables.add(this._actionbarWidget.actionRunner.onWillRun(U=>this.editor.focus()));const x=[],W=this._menuService.createMenu(g.TitleMenu,this._contextKeyService);(0,n.createAndFillInActionBarActions)(W,void 0,x),this._actionbarWidget.push(x,{label:!1,icon:!0,index:0}),W.dispose()}_fillTitleIcon(O){this._icon=L.append(O,L.$(""))}_fillBody(O){this._parentContainer=O,O.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),O.appendChild(this._container),this._message=new h(this._container,this.editor,x=>this._onDidSelectRelatedInformation.fire(x),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(O,x,W){this._container.classList.remove("stale"),this._message.update(O),this._severity=O.severity,this._applyTheme(this._themeService.getColorTheme());const U=C.Range.lift(O),F=this.editor.getPosition(),G=F&&U.containsPosition(F)?F:U.getStartPosition();super.show(G,this.computeRequiredHeight());const Y=this.editor.getModel();if(Y){const ne=W>1?i.localize(5,null,x,W):i.localize(6,null,x,W);this.setTitle((0,_.basename)(Y.uri),ne)}this._icon.className=`codicon ${o.SeverityIcon.className(d.MarkerSeverity.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(G,0),this.editor.focus()}updateMarker(O){this._container.classList.remove("stale"),this._message.update(O)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(O,x){super._doLayoutBody(O,x),this._heightInPixel=O,this._message.layout(O,x),this._container.style.height=`${O}px`}_onWidth(O){this._message.layout(this._heightInPixel,O)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};e.MarkerNavigationWidget=p,p.TitleMenu=new t.MenuId("gotoErrorTitleMenu"),e.MarkerNavigationWidget=p=g=Ie([ge(1,a.IThemeService),ge(2,l.IOpenerService),ge(3,t.IMenuService),ge(4,u.IInstantiationService),ge(5,r.IContextKeyService),ge(6,f.ILabelService)],p);const b=(0,c.oneOf)(c.editorErrorForeground,c.editorErrorBorder),w=(0,c.oneOf)(c.editorWarningForeground,c.editorWarningBorder),E=(0,c.oneOf)(c.editorInfoForeground,c.editorInfoBorder),k=(0,c.registerColor)("editorMarkerNavigationError.background",{dark:b,light:b,hcDark:c.contrastBorder,hcLight:c.contrastBorder},i.localize(7,null)),M=(0,c.registerColor)("editorMarkerNavigationError.headerBackground",{dark:(0,c.transparent)(k,.1),light:(0,c.transparent)(k,.1),hcDark:null,hcLight:null},i.localize(8,null)),R=(0,c.registerColor)("editorMarkerNavigationWarning.background",{dark:w,light:w,hcDark:c.contrastBorder,hcLight:c.contrastBorder},i.localize(9,null)),B=(0,c.registerColor)("editorMarkerNavigationWarning.headerBackground",{dark:(0,c.transparent)(R,.1),light:(0,c.transparent)(R,.1),hcDark:"#0C141F",hcLight:(0,c.transparent)(R,.2)},i.localize(10,null)),T=(0,c.registerColor)("editorMarkerNavigationInfo.background",{dark:E,light:E,hcDark:c.contrastBorder,hcLight:c.contrastBorder},i.localize(11,null)),N=(0,c.registerColor)("editorMarkerNavigationInfo.headerBackground",{dark:(0,c.transparent)(T,.1),light:(0,c.transparent)(T,.1),hcDark:null,hcLight:null},i.localize(12,null)),A=(0,c.registerColor)("editorMarkerNavigation.background",{dark:c.editorBackground,light:c.editorBackground,hcDark:c.editorBackground,hcLight:c.editorBackground},i.localize(13,null))}),define(te[373],ie([1,0,26,2,16,33,12,5,22,767,663,30,15,8,77,899]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.NextMarkerAction=e.MarkerController=void 0;let f=u=class{static get(b){return b.getContribution(u.ID)}constructor(b,w,E,k,M){this._markerNavigationService=w,this._contextKeyService=E,this._editorService=k,this._instantiationService=M,this._sessionDispoables=new I.DisposableStore,this._editor=b,this._widgetVisible=g.bindTo(this._contextKeyService)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(b){if(this._model&&this._model.matches(b))return this._model;let w=!1;return this._model&&(w=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(b),w&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(r.MarkerNavigationWidget,this._editor),this._widget.onDidClose(()=>this.close(),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition(E=>{var k,M,R;(!(!((k=this._model)===null||k===void 0)&&k.selected)||!m.Range.containsPosition((M=this._model)===null||M===void 0?void 0:M.selected.marker,E.position))&&((R=this._model)===null||R===void 0||R.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const E=this._model.find(this._editor.getModel().uri,this._widget.position);E?this._widget.updateMarker(E.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(E=>{this._editorService.openCodeEditor({resource:E.resource,options:{pinned:!0,revealIfOpened:!0,selection:m.Range.lift(E).collapseToStart()}},this._editor),this.close(!1)})),this._sessionDispoables.add(this._editor.onDidChangeModel(()=>this._cleanUp())),this._model}close(b=!0){this._cleanUp(),b&&this._editor.focus()}showAtMarker(b){if(this._editor.hasModel()){const w=this._getOrCreateModel(this._editor.getModel().uri);w.resetIndex(),w.move(!0,this._editor.getModel(),new S.Position(b.startLineNumber,b.startColumn)),w.selected&&this._widget.showAtMarker(w.selected.marker,w.selected.index,w.selected.total)}}nagivate(b,w){var E,k;return be(this,void 0,void 0,function*(){if(this._editor.hasModel()){const M=this._getOrCreateModel(w?void 0:this._editor.getModel().uri);if(M.move(b,this._editor.getModel(),this._editor.getPosition()),!M.selected)return;if(M.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const R=yield this._editorService.openCodeEditor({resource:M.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:M.selected.marker}},this._editor);R&&((E=u.get(R))===null||E===void 0||E.close(),(k=u.get(R))===null||k===void 0||k.nagivate(b,w))}else this._widget.showAtMarker(M.selected.marker,M.selected.index,M.selected.total)}})}};e.MarkerController=f,f.ID="editor.contrib.markerController",e.MarkerController=f=u=Ie([ge(1,v.IMarkerNavigationService),ge(2,i.IContextKeyService),ge(3,D.ICodeEditorService),ge(4,n.IInstantiationService)],f);class d extends y.EditorAction{constructor(b,w,E){super(E),this._next=b,this._multiFile=w}run(b,w){var E;return be(this,void 0,void 0,function*(){w.hasModel()&&((E=f.get(w))===null||E===void 0||E.nagivate(this._next,this._multiFile))})}}class l extends d{constructor(){super(!0,!1,{id:l.ID,label:l.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:578,weight:100},menuOpts:{menuId:r.MarkerNavigationWidget.TitleMenu,title:l.LABEL,icon:(0,t.registerIcon)("marker-navigation-next",L.Codicon.arrowDown,C.localize(1,null)),group:"navigation",order:1}})}}e.NextMarkerAction=l,l.ID="editor.action.marker.next",l.LABEL=C.localize(0,null);class o extends d{constructor(){super(!1,!1,{id:o.ID,label:o.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:1602,weight:100},menuOpts:{menuId:r.MarkerNavigationWidget.TitleMenu,title:o.LABEL,icon:(0,t.registerIcon)("marker-navigation-previous",L.Codicon.arrowUp,C.localize(3,null)),group:"navigation",order:2}})}}o.ID="editor.action.marker.prev",o.LABEL=C.localize(2,null);class c extends d{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:C.localize(4,null),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:66,weight:100},menuOpts:{menuId:s.MenuId.MenubarGoMenu,title:C.localize(5,null),group:"6_problem_nav",order:1}})}}class a extends d{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:C.localize(6,null),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.focus,primary:1090,weight:100},menuOpts:{menuId:s.MenuId.MenubarGoMenu,title:C.localize(7,null),group:"6_problem_nav",order:2}})}}(0,y.registerEditorContribution)(f.ID,f,4),(0,y.registerEditorAction)(l),(0,y.registerEditorAction)(o),(0,y.registerEditorAction)(c),(0,y.registerEditorAction)(a);const g=new i.RawContextKey("markersNavigationVisible",!1),h=y.EditorCommand.bindToContribution(f.get);(0,y.registerEditorCommand)(new h({id:"closeMarkersNavigation",precondition:g,handler:p=>p.close(),kbOpts:{weight:100+50,kbExpr:_.EditorContextKeys.focus,primary:9,secondary:[1033]}}))}),define(te[900],ie([1,0,7,316,36,6,2,54,46,161,5,37,32,75,42,65,825,136,669,8,34,158,190,23,191,155,451]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReferenceWidget=e.LayoutData=void 0;class b{constructor(R,B){this._editor=R,this._model=B,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new S.DisposableStore,this._callOnModelChange=new S.DisposableStore,this._callOnDispose.add(this._editor.onDidChangeModel(()=>this._onModelChanged())),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const R=this._editor.getModel();if(R){for(const B of this._model.references)if(B.uri.toString()===R.uri.toString()){this._addDecorations(B.parent);return}}}_addDecorations(R){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const B=[],T=[];for(let N=0,A=R.children.length;N{const A=N.deltaDecorations([],B);for(let P=0;P{A.equals(9)&&(this._keybindingService.dispatchEvent(A,A.target),A.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(E,"ReferencesWidget",this._treeContainer,new u.Delegate,[this._instantiationService.createInstance(u.FileReferencesRenderer),this._instantiationService.createInstance(u.OneReferenceRenderer)],this._instantiationService.createInstance(u.DataSource),T),this._splitView.addView({onDidChange:D.Event.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:A=>{this._preview.layout({height:this._dim.height,width:A})}},I.Sizing.Distribute),this._splitView.addView({onDidChange:D.Event.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:A=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${A}px`,this._tree.layout(this._dim.height,A)}},I.Sizing.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));const N=(A,P)=>{A instanceof p.OneReference&&(P==="show"&&this._revealReference(A,!1),this._onDidSelectReference.fire({element:A,kind:P,source:"tree"}))};this._tree.onDidOpen(A=>{A.sideBySide?N(A.element,"side"):A.editorOptions.pinned?N(A.element,"goto"):N(A.element,"show")}),L.hide(this._treeContainer)}_onWidth(R){this._dim&&this._doLayoutBody(this._dim.height,R)}_doLayoutBody(R,B){super._doLayoutBody(R,B),this._dim=new L.Dimension(B,R),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(B),this._splitView.resizeView(0,B*this.layoutData.ratio)}setSelection(R){return this._revealReference(R,!0).then(()=>{this._model&&(this._tree.setSelection([R]),this._tree.setFocus([R]))})}setModel(R){return this._disposeOnNewModel.clear(),this._model=R,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=d.localize(1,null),L.show(this._messageContainer),Promise.resolve(void 0)):(L.hide(this._messageContainer),this._decorationsManager=new b(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange(R=>this._tree.rerender(R))),this._disposeOnNewModel.add(this._preview.onMouseDown(R=>{const{event:B,target:T}=R;if(B.detail!==2)return;const N=this._getFocusedReference();N&&this._onDidSelectReference.fire({element:{uri:N.uri,range:T.range},kind:B.ctrlKey||B.metaKey||B.altKey?"side":"open",source:"editor"})})),this.container.classList.add("results-loaded"),L.show(this._treeContainer),L.show(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[R]=this._tree.getFocus();if(R instanceof p.OneReference)return R;if(R instanceof p.FileReferences&&R.children.length>0)return R.children[0]}revealReference(R){return be(this,void 0,void 0,function*(){yield this._revealReference(R,!1),this._onDidSelectReference.fire({element:R,kind:"goto",source:"tree"})})}_revealReference(R,B){return be(this,void 0,void 0,function*(){if(this._revealedReference===R)return;this._revealedReference=R,R.uri.scheme!==m.Schemas.inMemory?this.setTitle((0,_.basenameOrAuthority)(R.uri),this._uriLabel.getUriLabel((0,_.dirname)(R.uri))):this.setTitle(d.localize(2,null));const T=this._textModelResolverService.createModelReference(R.uri);this._tree.getInput()===R.parent?this._tree.reveal(R):(B&&this._tree.reveal(R.parent),yield this._tree.expand(R.parent),this._tree.reveal(R));const N=yield T;if(!this._model){N.dispose();return}(0,S.dispose)(this._previewModelReference);const A=N.object;if(A){const P=this._preview.getModel()===A.textEditorModel?0:1,O=C.Range.lift(R.range).collapseToStart();this._previewModelReference=N,this._preview.setModel(A.textEditorModel),this._preview.setSelection(O),this._preview.revealRangeInCenter(O,P)}else this._preview.setModel(this._previewNotAvailableMessage),N.dispose()})}};e.ReferenceWidget=k,e.ReferenceWidget=k=Ie([ge(3,g.IThemeService),ge(4,r.ITextModelService),ge(5,l.IInstantiationService),ge(6,f.IPeekViewService),ge(7,c.ILabelService),ge(8,h.IUndoRedoService),ge(9,o.IKeybindingService),ge(10,t.ILanguageService),ge(11,i.ILanguageConfigurationService)],k)}),define(te[374],ie([1,0,14,9,62,2,33,12,5,136,667,25,28,15,8,117,190,48,89,155,900]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o){"use strict";var c;Object.defineProperty(e,"__esModule",{value:!0}),e.ReferencesController=e.ctxReferenceSearchVisible=void 0,e.ctxReferenceSearchVisible=new n.RawContextKey("referenceSearchVisible",!1,C.localize(0,null));let a=c=class{static get(p){return p.getContribution(c.ID)}constructor(p,b,w,E,k,M,R,B){this._defaultTreeKeyboardSupport=p,this._editor=b,this._editorService=E,this._notificationService=k,this._instantiationService=M,this._storageService=R,this._configurationService=B,this._disposables=new D.DisposableStore,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=e.ctxReferenceSearchVisible.bindTo(w)}dispose(){var p,b;this._referenceSearchVisible.reset(),this._disposables.dispose(),(p=this._widget)===null||p===void 0||p.dispose(),(b=this._model)===null||b===void 0||b.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(p,b,w){let E;if(this._widget&&(E=this._widget.position),this.closeWidget(),E&&p.containsPosition(E))return;this._peekMode=w,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>{this.closeWidget()})),this._disposables.add(this._editor.onDidChangeModel(()=>{this._ignoreModelChangeEvent||this.closeWidget()}));const k="peekViewLayout",M=o.LayoutData.fromJSON(this._storageService.get(k,0,"{}"));this._widget=this._instantiationService.createInstance(o.ReferenceWidget,this._editor,this._defaultTreeKeyboardSupport,M),this._widget.setTitle(C.localize(1,null)),this._widget.show(p),this._disposables.add(this._widget.onDidClose(()=>{b.cancel(),this._widget&&(this._storageService.store(k,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()})),this._disposables.add(this._widget.onDidSelectReference(B=>{const{element:T,kind:N}=B;if(T)switch(N){case"open":(B.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(T,!1,!1);break;case"side":this.openReference(T,!0,!1);break;case"goto":w?this._gotoReference(T,!0):this.openReference(T,!1,!0);break}}));const R=++this._requestIdPool;b.then(B=>{var T;if(R!==this._requestIdPool||!this._widget){B.dispose();return}return(T=this._model)===null||T===void 0||T.dispose(),this._model=B,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(C.localize(2,null,this._model.title,this._model.references.length));const N=this._editor.getModel().uri,A=new m.Position(p.startLineNumber,p.startColumn),P=this._model.nearestReference(N,A);if(P)return this._widget.setSelection(P).then(()=>{this._widget&&this._editor.getOption(86)==="editor"&&this._widget.focusOnPreviewEditor()})}})},B=>{this._notificationService.error(B)})}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(p){return be(this,void 0,void 0,function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const b=this._widget.position;if(!b)return;const w=this._model.nearestReference(this._editor.getModel().uri,b);if(!w)return;const E=this._model.nextOrPreviousReference(w,p),k=this._editor.hasTextFocus(),M=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(E),yield this._gotoReference(E,!1),k?this._editor.focus():this._widget&&M&&this._widget.focusOnPreviewEditor()})}revealReference(p){return be(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(p))})}closeWidget(p=!0){var b,w;(b=this._widget)===null||b===void 0||b.dispose(),(w=this._model)===null||w===void 0||w.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,p&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(p,b){var w;(w=this._widget)===null||w===void 0||w.hide(),this._ignoreModelChangeEvent=!0;const E=_.Range.lift(p.range).collapseToStart();return this._editorService.openCodeEditor({resource:p.uri,options:{selection:E,selectionSource:"code.jump",pinned:b}},this._editor).then(k=>{var M;if(this._ignoreModelChangeEvent=!1,!k||!this._widget){this.closeWidget();return}if(this._editor===k)this._widget.show(E),this._widget.focusOnReferenceTree();else{const R=c.get(k),B=this._model.clone();this.closeWidget(),k.focus(),R?.toggleWidget(E,(0,L.createCancelablePromise)(T=>Promise.resolve(B)),(M=this._peekMode)!==null&&M!==void 0?M:!1)}},k=>{this._ignoreModelChangeEvent=!1,(0,I.onUnexpectedError)(k)})}openReference(p,b,w){b||this.closeWidget();const{uri:E,range:k}=p;this._editorService.openCodeEditor({resource:E,options:{selection:k,selectionSource:"code.jump",pinned:w}},this._editor,b)}};e.ReferencesController=a,a.ID="editor.contrib.referencesController",e.ReferencesController=a=c=Ie([ge(2,n.IContextKeyService),ge(3,S.ICodeEditorService),ge(4,f.INotificationService),ge(5,t.IInstantiationService),ge(6,d.IStorageService),ge(7,i.IConfigurationService)],a);function g(h,p){const b=(0,v.getOuterEditor)(h);if(!b)return;const w=a.get(b);w&&p(w)}r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,y.KeyChord)(2089,60),when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,v.PeekContext.inPeekEditor),handler(h){g(h,p=>{p.changeFocusBetweenPreviewAndReferences()})}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,v.PeekContext.inPeekEditor),handler(h){g(h,p=>{p.goToNextOrPreviousReference(!0)})}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:n.ContextKeyExpr.or(e.ctxReferenceSearchVisible,v.PeekContext.inPeekEditor),handler(h){g(h,p=>{p.goToNextOrPreviousReference(!1)})}}),s.CommandsRegistry.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),s.CommandsRegistry.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),s.CommandsRegistry.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),s.CommandsRegistry.registerCommand("closeReferenceSearch",h=>g(h,p=>p.closeWidget())),r.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:n.ContextKeyExpr.and(v.PeekContext.inPeekEditor,n.ContextKeyExpr.not("config.editor.stablePeek"))}),r.KeybindingsRegistry.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,n.ContextKeyExpr.not("config.editor.stablePeek"))}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,u.WorkbenchListFocusContextKey,u.WorkbenchTreeElementCanCollapse.negate(),u.WorkbenchTreeElementCanExpand.negate()),handler(h){var p;const w=(p=h.get(u.IListService).lastFocusedList)===null||p===void 0?void 0:p.getFocus();Array.isArray(w)&&w[0]instanceof l.OneReference&&g(h,E=>E.revealReference(w[0]))}}),r.KeybindingsRegistry.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:n.ContextKeyExpr.and(e.ctxReferenceSearchVisible,u.WorkbenchListFocusContextKey,u.WorkbenchTreeElementCanCollapse.negate(),u.WorkbenchTreeElementCanExpand.negate()),handler(h){var p;const w=(p=h.get(u.IListService).lastFocusedList)===null||p===void 0?void 0:p.getFocus();Array.isArray(w)&&w[0]instanceof l.OneReference&&g(h,E=>E.openReference(w[0],!0,!0))}}),s.CommandsRegistry.registerCommand("openReference",h=>{var p;const w=(p=h.get(u.IListService).lastFocusedList)===null||p===void 0?void 0:p.getFocus();Array.isArray(w)&&w[0]instanceof l.OneReference&&g(h,E=>E.openReference(w[0],!1,!0))})}),define(te[255],ie([1,0,45,14,62,20,21,103,175,16,33,161,12,5,22,29,374,155,805,189,136,665,30,25,15,8,48,85,246,18,43,237]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M,R){"use strict";var B,T,N,A,P,O,x,W;Object.defineProperty(e,"__esModule",{value:!0}),e.DefinitionAction=e.SymbolNavigationAction=e.SymbolNavigationAnchor=void 0,a.MenuRegistry.appendMenuItem(a.MenuId.EditorContext,{submenu:a.MenuId.EditorContextPeek,title:c.localize(0,null),group:"navigation",order:100});class U{static is(V){return!V||typeof V!="object"?!1:!!(V instanceof U||i.Position.isIPosition(V.position)&&V.model)}constructor(V,Z){this.model=V,this.position=Z}}e.SymbolNavigationAnchor=U;class F extends v.EditorAction2{static all(){return F._allSymbolNavigationCommands.values()}static _patchConfig(V){const Z=Object.assign(Object.assign({},V),{f1:!0});if(Z.menu)for(const ee of M.Iterable.wrap(Z.menu))(ee.id===a.MenuId.EditorContext||ee.id===a.MenuId.EditorContextPeek)&&(ee.when=h.ContextKeyExpr.and(V.precondition,ee.when));return Z}constructor(V,Z){super(F._patchConfig(Z)),this.configuration=V,F._allSymbolNavigationCommands.set(Z.id,this)}runEditorCommand(V,Z,ee,le){if(!Z.hasModel())return Promise.resolve(void 0);const ue=V.get(b.INotificationService),de=V.get(C.ICodeEditorService),ce=V.get(w.IEditorProgressService),ae=V.get(d.ISymbolNavigationService),X=V.get(k.ILanguageFeaturesService),K=V.get(p.IInstantiationService),z=Z.getModel(),Q=Z.getPosition(),j=U.is(ee)?ee:new U(z,Q),re=new m.EditorStateCancellationTokenSource(Z,5),oe=(0,I.raceCancellation)(this._getLocationModel(X,j.model,j.position,re.token),re.token).then(he=>be(this,void 0,void 0,function*(){var me;if(!he||re.token.isCancellationRequested)return;(0,L.alert)(he.ariaMessage);let pe;if(he.referenceAt(z.uri,Q)){const we=this._getAlternativeCommand(Z);!F._activeAlternativeCommands.has(we)&&F._allSymbolNavigationCommands.has(we)&&(pe=F._allSymbolNavigationCommands.get(we))}const ve=he.references.length;if(ve===0){if(!this.configuration.muteMessage){const we=z.getWordAtPosition(Q);(me=l.MessageController.get(Z))===null||me===void 0||me.showMessage(this._getNoResultFoundMessage(we),Q)}}else if(ve===1&&pe)F._activeAlternativeCommands.add(this.desc.id),K.invokeFunction(we=>pe.runEditorCommand(we,Z,ee,le).finally(()=>{F._activeAlternativeCommands.delete(this.desc.id)}));else return this._onResult(de,ae,Z,he,le)}),he=>{ue.error(he)}).finally(()=>{re.dispose()});return ce.showWhile(oe,250),oe}_onResult(V,Z,ee,le,ue){return be(this,void 0,void 0,function*(){const de=this._getGoToPreference(ee);if(!(ee instanceof s.EmbeddedCodeEditorWidget)&&(this.configuration.openInPeek||de==="peek"&&le.references.length>1))this._openInPeek(ee,le,ue);else{const ce=le.firstReference(),ae=le.references.length>1&&de==="gotoAndPeek",X=yield this._openReference(ee,V,ce,this.configuration.openToSide,!ae);ae&&X?this._openInPeek(X,le,ue):le.dispose(),de==="goto"&&Z.put(ce)}})}_openReference(V,Z,ee,le,ue){return be(this,void 0,void 0,function*(){let de;if((0,r.isLocationLink)(ee)&&(de=ee.targetSelectionRange),de||(de=ee.range),!de)return;const ce=yield Z.openCodeEditor({resource:ee.uri,options:{selection:n.Range.collapseToStart(de),selectionRevealType:3,selectionSource:"code.jump"}},V,le);if(ce){if(ue){const ae=ce.getModel(),X=ce.createDecorationsCollection([{range:de,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{ce.getModel()===ae&&X.clear()},350)}return ce}})}_openInPeek(V,Z,ee){const le=u.ReferencesController.get(V);le&&V.hasModel()?le.toggleWidget(ee??V.getSelection(),(0,I.createCancelablePromise)(ue=>Promise.resolve(Z)),this.configuration.openInPeek):Z.dispose()}}e.SymbolNavigationAction=F,F._allSymbolNavigationCommands=new Map,F._activeAlternativeCommands=new Set;class G extends F{_getLocationModel(V,Z,ee,le){return be(this,void 0,void 0,function*(){return new f.ReferencesModel(yield(0,E.getDefinitionsAtPosition)(V.definitionProvider,Z,ee,le),c.localize(1,null))})}_getNoResultFoundMessage(V){return V&&V.word?c.localize(2,null,V.word):c.localize(3,null)}_getAlternativeCommand(V){return V.getOption(58).alternativeDefinitionCommand}_getGoToPreference(V){return V.getOption(58).multipleDefinitions}}e.DefinitionAction=G,(0,a.registerAction2)((B=class extends G{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:B.id,title:{value:c.localize(4,null),original:"Go to Definition",mnemonicTitle:c.localize(5,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDefinitionProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:[{when:t.EditorContextKeys.editorTextFocus,primary:70,weight:100},{when:h.ContextKeyExpr.and(t.EditorContextKeys.editorTextFocus,R.IsWebContext),primary:2118,weight:100}],menu:[{id:a.MenuId.EditorContext,group:"navigation",order:1.1},{id:a.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:2}]}),g.CommandsRegistry.registerCommandAlias("editor.action.goToDeclaration",B.id)}},B.id="editor.action.revealDefinition",B)),(0,a.registerAction2)((T=class extends G{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:T.id,title:{value:c.localize(6,null),original:"Open Definition to the Side"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDefinitionProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:[{when:t.EditorContextKeys.editorTextFocus,primary:(0,y.KeyChord)(2089,70),weight:100},{when:h.ContextKeyExpr.and(t.EditorContextKeys.editorTextFocus,R.IsWebContext),primary:(0,y.KeyChord)(2089,2118),weight:100}]}),g.CommandsRegistry.registerCommandAlias("editor.action.openDeclarationToTheSide",T.id)}},T.id="editor.action.revealDefinitionAside",T)),(0,a.registerAction2)((N=class extends G{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:N.id,title:{value:c.localize(7,null),original:"Peek Definition"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDefinitionProvider,o.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:582,linux:{primary:3140},weight:100},menu:{id:a.MenuId.EditorContextPeek,group:"peek",order:2}}),g.CommandsRegistry.registerCommandAlias("editor.action.previewDeclaration",N.id)}},N.id="editor.action.peekDefinition",N));class Y extends F{_getLocationModel(V,Z,ee,le){return be(this,void 0,void 0,function*(){return new f.ReferencesModel(yield(0,E.getDeclarationsAtPosition)(V.declarationProvider,Z,ee,le),c.localize(8,null))})}_getNoResultFoundMessage(V){return V&&V.word?c.localize(9,null,V.word):c.localize(10,null)}_getAlternativeCommand(V){return V.getOption(58).alternativeDeclarationCommand}_getGoToPreference(V){return V.getOption(58).multipleDeclarations}}(0,a.registerAction2)((A=class extends Y{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:A.id,title:{value:c.localize(11,null),original:"Go to Declaration",mnemonicTitle:c.localize(12,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDeclarationProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:[{id:a.MenuId.EditorContext,group:"navigation",order:1.3},{id:a.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}_getNoResultFoundMessage(V){return V&&V.word?c.localize(13,null,V.word):c.localize(14,null)}},A.id="editor.action.revealDeclaration",A)),(0,a.registerAction2)(class extends Y{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",title:{value:c.localize(15,null),original:"Peek Declaration"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasDeclarationProvider,o.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:a.MenuId.EditorContextPeek,group:"peek",order:3}})}});class ne extends F{_getLocationModel(V,Z,ee,le){return be(this,void 0,void 0,function*(){return new f.ReferencesModel(yield(0,E.getTypeDefinitionsAtPosition)(V.typeDefinitionProvider,Z,ee,le),c.localize(16,null))})}_getNoResultFoundMessage(V){return V&&V.word?c.localize(17,null,V.word):c.localize(18,null)}_getAlternativeCommand(V){return V.getOption(58).alternativeTypeDefinitionCommand}_getGoToPreference(V){return V.getOption(58).multipleTypeDefinitions}}(0,a.registerAction2)((P=class extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:P.ID,title:{value:c.localize(19,null),original:"Go to Type Definition",mnemonicTitle:c.localize(20,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasTypeDefinitionProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:0,weight:100},menu:[{id:a.MenuId.EditorContext,group:"navigation",order:1.4},{id:a.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:3}]})}},P.ID="editor.action.goToTypeDefinition",P)),(0,a.registerAction2)((O=class extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:O.ID,title:{value:c.localize(21,null),original:"Peek Type Definition"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasTypeDefinitionProvider,o.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:a.MenuId.EditorContextPeek,group:"peek",order:4}})}},O.ID="editor.action.peekTypeDefinition",O));class se extends F{_getLocationModel(V,Z,ee,le){return be(this,void 0,void 0,function*(){return new f.ReferencesModel(yield(0,E.getImplementationsAtPosition)(V.implementationProvider,Z,ee,le),c.localize(22,null))})}_getNoResultFoundMessage(V){return V&&V.word?c.localize(23,null,V.word):c.localize(24,null)}_getAlternativeCommand(V){return V.getOption(58).alternativeImplementationCommand}_getGoToPreference(V){return V.getOption(58).multipleImplementations}}(0,a.registerAction2)((x=class extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:x.ID,title:{value:c.localize(25,null),original:"Go to Implementations",mnemonicTitle:c.localize(26,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasImplementationProvider,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:2118,weight:100},menu:[{id:a.MenuId.EditorContext,group:"navigation",order:1.45},{id:a.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:4}]})}},x.ID="editor.action.goToImplementation",x)),(0,a.registerAction2)((W=class extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:W.ID,title:{value:c.localize(27,null),original:"Peek Implementations"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasImplementationProvider,o.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:3142,weight:100},menu:{id:a.MenuId.EditorContextPeek,group:"peek",order:5}})}},W.ID="editor.action.peekImplementation",W));class J extends F{_getNoResultFoundMessage(V){return V?c.localize(28,null,V.word):c.localize(29,null)}_getAlternativeCommand(V){return V.getOption(58).alternativeReferenceCommand}_getGoToPreference(V){return V.getOption(58).multipleReferences}}(0,a.registerAction2)(class extends J{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",title:{value:c.localize(30,null),original:"Go to References",mnemonicTitle:c.localize(31,null)},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasReferenceProvider,o.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),keybinding:{when:t.EditorContextKeys.editorTextFocus,primary:1094,weight:100},menu:[{id:a.MenuId.EditorContext,group:"navigation",order:1.45},{id:a.MenuId.MenubarGoMenu,precondition:null,group:"4_symbol_nav",order:5}]})}_getLocationModel(V,Z,ee,le){return be(this,void 0,void 0,function*(){return new f.ReferencesModel(yield(0,E.getReferencesAtPosition)(V.referenceProvider,Z,ee,!0,le),c.localize(32,null))})}}),(0,a.registerAction2)(class extends J{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",title:{value:c.localize(33,null),original:"Peek References"},precondition:h.ContextKeyExpr.and(t.EditorContextKeys.hasReferenceProvider,o.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated()),menu:{id:a.MenuId.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(V,Z,ee,le){return be(this,void 0,void 0,function*(){return new f.ReferencesModel(yield(0,E.getReferencesAtPosition)(V.referenceProvider,Z,ee,!1,le),c.localize(34,null))})}});class q extends F{constructor(V,Z,ee){super(V,{id:"editor.action.goToLocation",title:{value:c.localize(35,null),original:"Go to Any Symbol"},precondition:h.ContextKeyExpr.and(o.PeekContext.notInPeekEditor,t.EditorContextKeys.isInWalkThroughSnippet.toNegated())}),this._references=Z,this._gotoMultipleBehaviour=ee}_getLocationModel(V,Z,ee,le){return be(this,void 0,void 0,function*(){return new f.ReferencesModel(this._references,c.localize(36,null))})}_getNoResultFoundMessage(V){return V&&c.localize(37,null,V.word)||""}_getGoToPreference(V){var Z;return(Z=this._gotoMultipleBehaviour)!==null&&Z!==void 0?Z:V.getOption(58).multipleReferences}_getAlternativeCommand(){return""}}g.CommandsRegistry.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:S.URI},{name:"position",description:"The position at which to start",constraint:i.Position.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:(H,V,Z,ee,le,ue,de)=>be(void 0,void 0,void 0,function*(){(0,D.assertType)(S.URI.isUri(V)),(0,D.assertType)(i.Position.isIPosition(Z)),(0,D.assertType)(Array.isArray(ee)),(0,D.assertType)(typeof le>"u"||typeof le=="string"),(0,D.assertType)(typeof de>"u"||typeof de=="boolean");const ce=H.get(C.ICodeEditorService),ae=yield ce.openCodeEditor({resource:V},ce.getFocusedCodeEditor());if((0,_.isCodeEditor)(ae))return ae.setPosition(Z),ae.revealPositionInCenterIfOutsideViewport(Z,0),ae.invokeWithinContext(X=>{const K=new class extends q{_getNoResultFoundMessage(z){return ue||super._getNoResultFoundMessage(z)}}({muteMessage:!ue,openInPeek:!!de,openToSide:!1},ee,le);X.get(p.IInstantiationService).invokeFunction(K.run.bind(K),ae)})})}),g.CommandsRegistry.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:S.URI},{name:"position",description:"The position at which to start",constraint:i.Position.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:(H,V,Z,ee,le)=>be(void 0,void 0,void 0,function*(){H.get(g.ICommandService).executeCommand("editor.action.goToLocations",V,Z,ee,le,void 0,!0)})}),g.CommandsRegistry.registerCommand({id:"editor.action.findReferences",handler:(H,V,Z)=>{(0,D.assertType)(S.URI.isUri(V)),(0,D.assertType)(i.Position.isIPosition(Z));const ee=H.get(k.ILanguageFeaturesService),le=H.get(C.ICodeEditorService);return le.openCodeEditor({resource:V},le.getFocusedCodeEditor()).then(ue=>{if(!(0,_.isCodeEditor)(ue)||!ue.hasModel())return;const de=u.ReferencesController.get(ue);if(!de)return;const ce=(0,I.createCancelablePromise)(X=>(0,E.getReferencesAtPosition)(ee.referenceProvider,ue.getModel(),i.Position.lift(Z),!1,X).then(K=>new f.ReferencesModel(K,c.localize(38,null)))),ae=new n.Range(Z.lineNumber,Z.column,Z.lineNumber,Z.column);return Promise.resolve(de.toggleWidget(ae,ce,!1))})}}),g.CommandsRegistry.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations")}),define(te[375],ie([1,0,14,9,57,2,103,16,5,42,65,184,136,666,15,255,246,18,37,450]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";var l;Object.defineProperty(e,"__esModule",{value:!0}),e.GotoDefinitionAtPositionEditorContribution=void 0;let o=l=class{constructor(a,g,h,p){this.textModelResolverService=g,this.languageService=h,this.languageFeaturesService=p,this.toUnhook=new D.DisposableStore,this.toUnhookForKeyboard=new D.DisposableStore,this.currentWordAtPosition=null,this.previousPromise=null,this.editor=a,this.linkDecorations=this.editor.createDecorationsCollection();const b=new s.ClickLinkGesture(a);this.toUnhook.add(b),this.toUnhook.add(b.onMouseMoveOrRelevantKeyDown(([w,E])=>{this.startFindDefinitionFromMouse(w,E??void 0)})),this.toUnhook.add(b.onExecute(w=>{this.isEnabled(w)&&this.gotoDefinition(w.target.position,w.hasSideBySideModifier).catch(E=>{(0,I.onUnexpectedError)(E)}).finally(()=>{this.removeLinkDecorations()})})),this.toUnhook.add(b.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(a){return a.getContribution(l.ID)}startFindDefinitionFromCursor(a){return be(this,void 0,void 0,function*(){yield this.startFindDefinition(a),this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(g=>{g&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(a,g){if(a.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(a,g)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const h=a.target.position;this.startFindDefinition(h)}startFindDefinition(a){var g;return be(this,void 0,void 0,function*(){this.toUnhookForKeyboard.clear();const h=a?(g=this.editor.getModel())===null||g===void 0?void 0:g.getWordAtPosition(a):null;if(!h){this.currentWordAtPosition=null,this.removeLinkDecorations();return}if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===h.startColumn&&this.currentWordAtPosition.endColumn===h.endColumn&&this.currentWordAtPosition.word===h.word)return;this.currentWordAtPosition=h;const p=new S.EditorState(this.editor,15);this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,L.createCancelablePromise)(E=>this.findDefinition(a,E));let b;try{b=yield this.previousPromise}catch(E){(0,I.onUnexpectedError)(E);return}if(!b||!b.length||!p.validate(this.editor)){this.removeLinkDecorations();return}const w=b[0].originSelectionRange?_.Range.lift(b[0].originSelectionRange):new _.Range(a.lineNumber,h.startColumn,a.lineNumber,h.endColumn);if(b.length>1){let E=w;for(const{originSelectionRange:k}of b)k&&(E=_.Range.plusRange(E,k));this.addDecoration(E,new y.MarkdownString().appendText(n.localize(0,null,b.length)))}else{const E=b[0];if(!E.uri)return;this.textModelResolverService.createModelReference(E.uri).then(k=>{if(!k.object||!k.object.textEditorModel){k.dispose();return}const{object:{textEditorModel:M}}=k,{startLineNumber:R}=E.range;if(R<1||R>M.getLineCount()){k.dispose();return}const B=this.getPreviewValue(M,R,E),T=this.languageService.guessLanguageIdByFilepathOrFirstLine(M.uri);this.addDecoration(w,B?new y.MarkdownString().appendCodeblock(T||"",B):void 0),k.dispose()})}})}getPreviewValue(a,g,h){let p=h.range;return p.endLineNumber-p.startLineNumber>=l.MAX_SOURCE_PREVIEW_LINES&&(p=this.getPreviewRangeBasedOnIndentation(a,g)),this.stripIndentationFromPreviewRange(a,g,p)}stripIndentationFromPreviewRange(a,g,h){let b=a.getLineFirstNonWhitespaceColumn(g);for(let E=g+1;E{const p=!g&&this.editor.getOption(87)&&!this.isInPeekEditor(h);return new r.DefinitionAction({openToSide:g,openInPeek:p,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(h)})}isInPeekEditor(a){const g=a.get(t.IContextKeyService);return i.PeekContext.inPeekEditor.getValue(g)}dispose(){this.toUnhook.dispose(),this.toUnhookForKeyboard.dispose()}};e.GotoDefinitionAtPositionEditorContribution=o,o.ID="editor.contrib.gotodefinitionatposition",o.MAX_SOURCE_PREVIEW_LINES=8,e.GotoDefinitionAtPositionEditorContribution=o=l=Ie([ge(1,C.ITextModelService),ge(2,v.ILanguageService),ge(3,f.ILanguageFeaturesService)],o),(0,m.registerEditorContribution)(o.ID,o,2)}),define(te[901],ie([1,0,7,13,14,9,2,46,5,18,233,135,252,112,373,674,94,55,85]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MarkerHoverParticipant=e.MarkerHover=void 0;const l=L.$;class o{constructor(h,p,b){this.owner=h,this.range=p,this.marker=b}isValidForHoverAnchor(h){return h.type===1&&this.range.startColumn<=h.range.startColumn&&this.range.endColumn>=h.range.endColumn}}e.MarkerHover=o;const c={type:1,filter:{include:n.CodeActionKind.QuickFix},triggerAction:n.CodeActionTriggerSource.QuickFixHover};let a=class{constructor(h,p,b,w){this._editor=h,this._markerDecorationsService=p,this._openerService=b,this._languageFeaturesService=w,this.hoverOrdinal=1,this.recentMarkerCodeActionsInfo=void 0}computeSync(h,p){if(!this._editor.hasModel()||h.type!==1&&!h.supportsMarkerHover)return[];const b=this._editor.getModel(),w=h.range.startLineNumber,E=b.getLineMaxColumn(w),k=[];for(const M of p){const R=M.range.startLineNumber===w?M.range.startColumn:1,B=M.range.endLineNumber===w?M.range.endColumn:E,T=this._markerDecorationsService.getMarker(b.uri,M);if(!T)continue;const N=new _.Range(h.range.startLineNumber,R,h.range.startLineNumber,B);k.push(new o(this,N,T))}return k}renderHoverParts(h,p){if(!p.length)return S.Disposable.None;const b=new S.DisposableStore;p.forEach(E=>h.fragment.appendChild(this.renderMarkerHover(E,b)));const w=p.length===1?p[0]:p.sort((E,k)=>u.MarkerSeverity.compare(E.marker.severity,k.marker.severity))[0];return this.renderMarkerStatusbar(h,w,b),b}renderMarkerHover(h,p){const b=l("div.hover-row"),w=L.append(b,l("div.marker.hover-contents")),{source:E,message:k,code:M,relatedInformation:R}=h.marker;this._editor.applyFontInfo(w);const B=L.append(w,l("span"));if(B.style.whiteSpace="pre-wrap",B.innerText=k,E||M)if(M&&typeof M!="string"){const T=l("span");if(E){const O=L.append(T,l("span"));O.innerText=E}const N=L.append(T,l("a.code-link"));N.setAttribute("href",M.target.toString()),p.add(L.addDisposableListener(N,"click",O=>{this._openerService.open(M.target,{allowCommands:!0}),O.preventDefault(),O.stopPropagation()}));const A=L.append(N,l("span"));A.innerText=M.value;const P=L.append(w,T);P.style.opacity="0.6",P.style.paddingLeft="6px"}else{const T=L.append(w,l("span"));T.style.opacity="0.6",T.style.paddingLeft="6px",T.innerText=E&&M?`${E}(${M})`:E||`(${M})`}if((0,I.isNonEmptyArray)(R))for(const{message:T,resource:N,startLineNumber:A,startColumn:P}of R){const O=L.append(w,l("div"));O.style.marginTop="8px";const x=L.append(O,l("a"));x.innerText=`${(0,m.basename)(N)}(${A}, ${P}): `,x.style.cursor="pointer",p.add(L.addDisposableListener(x,"click",U=>{U.stopPropagation(),U.preventDefault(),this._openerService&&this._openerService.open(N,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:A,startColumn:P}}}).catch(D.onUnexpectedError)}));const W=L.append(O,l("span"));W.innerText=T,this._editor.applyFontInfo(W)}return b}renderMarkerStatusbar(h,p,b){if((p.marker.severity===u.MarkerSeverity.Error||p.marker.severity===u.MarkerSeverity.Warning||p.marker.severity===u.MarkerSeverity.Info)&&h.statusBar.addAction({label:r.localize(0,null),commandId:t.NextMarkerAction.ID,run:()=>{var w;h.hide(),(w=t.MarkerController.get(this._editor))===null||w===void 0||w.showAtMarker(p.marker),this._editor.focus()}}),!this._editor.getOption(90)){const w=h.statusBar.append(l("div"));this.recentMarkerCodeActionsInfo&&(u.IMarkerData.makeKey(this.recentMarkerCodeActionsInfo.marker)===u.IMarkerData.makeKey(p.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(w.textContent=r.localize(1,null)):this.recentMarkerCodeActionsInfo=void 0);const E=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?S.Disposable.None:b.add((0,y.disposableTimeout)(()=>w.textContent=r.localize(2,null),200));w.textContent||(w.textContent=String.fromCharCode(160));const k=this.getCodeActions(p.marker);b.add((0,S.toDisposable)(()=>k.cancel())),k.then(M=>{if(E.dispose(),this.recentMarkerCodeActionsInfo={marker:p.marker,hasCodeActions:M.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){M.dispose(),w.textContent=r.localize(3,null);return}w.style.display="none";let R=!1;b.add((0,S.toDisposable)(()=>{R||M.dispose()})),h.statusBar.addAction({label:r.localize(4,null),commandId:s.quickFixCommandId,run:B=>{R=!0;const T=i.CodeActionController.get(this._editor),N=L.getDomNodePagePosition(B);h.hide(),T?.showCodeActions(c,M,{x:N.left,y:N.top,width:N.width,height:N.height})}})},D.onUnexpectedError)}}getCodeActions(h){return(0,y.createCancelablePromise)(p=>(0,s.getCodeActions)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new _.Range(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn),c,d.Progress.None,p))}};e.MarkerHoverParticipant=a,e.MarkerHoverParticipant=a=Ie([ge(1,C.IMarkerDecorationsService),ge(2,f.IOpenerService),ge(3,v.ILanguageFeaturesService)],a)}),define(te[376],ie([1,0,62,2,16,5,22,42,375,371,782,8,55,31,23,99,247,901,251,34,672,14,452]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c){"use strict";var a;Object.defineProperty(e,"__esModule",{value:!0}),e.ModesHoverController=void 0;const g=!1;let h=a=class extends I.Disposable{static get(P){return P.getContribution(a.ID)}constructor(P,O,x,W,U){super(),this._editor=P,this._instantiationService=O,this._openerService=x,this._languageService=W,this._keybindingService=U,this._toUnhook=new I.DisposableStore,this._hoverActivatedByColorDecoratorClick=!1,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._reactToEditorMouseMoveRunner=this._register(new c.RunOnceScheduler(()=>this._reactToEditorMouseMove(this._mouseMoveEvent),0)),this._hookEvents(),this._register(this._editor.onDidChangeConfiguration(F=>{F.hasChanged(60)&&(this._unhookEvents(),this._hookEvents())})),this._register(this._editor.onMouseLeave(()=>{this._mouseMoveEvent=void 0,this._reactToEditorMouseMoveRunner.cancel()}))}_hookEvents(){const P=()=>this._hideWidgets(),O=this._editor.getOption(60);this._isHoverEnabled=O.enabled,this._isHoverSticky=O.sticky,this._hidingDelay=O.hidingDelay,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(x=>this._onEditorMouseDown(x))),this._toUnhook.add(this._editor.onMouseUp(x=>this._onEditorMouseUp(x))),this._toUnhook.add(this._editor.onMouseMove(x=>this._onEditorMouseMove(x))),this._toUnhook.add(this._editor.onKeyDown(x=>this._onKeyDown(x)))):(this._toUnhook.add(this._editor.onMouseMove(x=>this._onEditorMouseMove(x))),this._toUnhook.add(this._editor.onKeyDown(x=>this._onKeyDown(x)))),this._toUnhook.add(this._editor.onMouseLeave(x=>this._onEditorMouseLeave(x))),this._toUnhook.add(this._editor.onDidChangeModel(P)),this._toUnhook.add(this._editor.onDidScrollChange(x=>this._onEditorScrollChanged(x)))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(P){(P.scrollTopChanged||P.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(P){var O;this._isMouseDown=!0;const x=P.target;if(x.type===9&&x.detail===v.ContentHoverWidget.ID){this._hoverClicked=!0;return}x.type===12&&x.detail===C.MarginHoverWidget.ID||(x.type!==12&&(this._hoverClicked=!1),!((O=this._contentWidget)===null||O===void 0)&&O.widget.isResizing||this._hideWidgets())}_onEditorMouseUp(P){this._isMouseDown=!1}_onEditorMouseLeave(P){var O,x;const W=P.event.browserEvent.relatedTarget;!((O=this._contentWidget)===null||O===void 0)&&O.widget.isResizing||!((x=this._contentWidget)===null||x===void 0)&&x.containsNode(W)||g||this._hideWidgets()}_isMouseOverWidget(P){var O,x,W,U,F;const G=P.target;return!!(this._isHoverSticky&&G.type===9&&G.detail===v.ContentHoverWidget.ID||this._isHoverSticky&&(!((O=this._contentWidget)===null||O===void 0)&&O.containsNode((x=P.event.browserEvent.view)===null||x===void 0?void 0:x.document.activeElement))&&!(!((U=(W=P.event.browserEvent.view)===null||W===void 0?void 0:W.getSelection())===null||U===void 0)&&U.isCollapsed)||!this._isHoverSticky&&G.type===9&&G.detail===v.ContentHoverWidget.ID&&(!((F=this._contentWidget)===null||F===void 0)&&F.isColorPickerVisible)||this._isHoverSticky&&G.type===12&&G.detail===C.MarginHoverWidget.ID)}_onEditorMouseMove(P){var O,x,W,U;if(this._mouseMoveEvent=P,!((O=this._contentWidget)===null||O===void 0)&&O.isFocused||!((x=this._contentWidget)===null||x===void 0)&&x.isResizing||this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&(!((W=this._contentWidget)===null||W===void 0)&&W.isVisibleFromKeyboard))return;if(this._isMouseOverWidget(P)){this._reactToEditorMouseMoveRunner.cancel();return}if(!((U=this._contentWidget)===null||U===void 0)&&U.isVisible&&this._isHoverSticky&&this._hidingDelay>0){this._reactToEditorMouseMoveRunner.isScheduled()||this._reactToEditorMouseMoveRunner.schedule(this._hidingDelay);return}this._reactToEditorMouseMove(P)}_reactToEditorMouseMove(P){var O,x,W;if(!P)return;const U=P.target,F=(O=U.element)===null||O===void 0?void 0:O.classList.contains("colorpicker-color-decoration"),G=this._editor.getOption(146);if(F&&(G==="click"&&!this._hoverActivatedByColorDecoratorClick||G==="hover"&&!this._isHoverEnabled&&!g||G==="clickAndHover"&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick)||!F&&!this._isHoverEnabled&&!this._hoverActivatedByColorDecoratorClick){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(P)){(x=this._glyphWidget)===null||x===void 0||x.hide();return}if(U.type===2&&U.position){(W=this._contentWidget)===null||W===void 0||W.hide(),this._glyphWidget||(this._glyphWidget=new C.MarginHoverWidget(this._editor,this._languageService,this._openerService)),this._glyphWidget.startShowingAt(U.position.lineNumber);return}g||this._hideWidgets()}_onKeyDown(P){var O;if(!this._editor.hasModel())return;const x=this._keybindingService.softDispatch(P,this._editor.getDomNode()),W=x.kind===1||x.kind===2&&x.commandId==="editor.action.showHover"&&((O=this._contentWidget)===null||O===void 0?void 0:O.isVisible);P.keyCode!==5&&P.keyCode!==6&&P.keyCode!==57&&P.keyCode!==4&&!W&&this._hideWidgets()}_hideWidgets(){var P,O,x;g||this._isMouseDown&&this._hoverClicked&&(!((P=this._contentWidget)===null||P===void 0)&&P.isColorPickerVisible)||d.InlineSuggestionHintsContentWidget.dropDownVisible||(this._hoverActivatedByColorDecoratorClick=!1,this._hoverClicked=!1,(O=this._glyphWidget)===null||O===void 0||O.hide(),(x=this._contentWidget)===null||x===void 0||x.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(v.ContentHoverController,this._editor)),this._contentWidget}showContentHover(P,O,x,W,U=!1){this._hoverActivatedByColorDecoratorClick=U,this._getOrCreateContentWidget().startShowingAtRange(P,O,x,W)}focus(){var P;(P=this._contentWidget)===null||P===void 0||P.focus()}scrollUp(){var P;(P=this._contentWidget)===null||P===void 0||P.scrollUp()}scrollDown(){var P;(P=this._contentWidget)===null||P===void 0||P.scrollDown()}scrollLeft(){var P;(P=this._contentWidget)===null||P===void 0||P.scrollLeft()}scrollRight(){var P;(P=this._contentWidget)===null||P===void 0||P.scrollRight()}pageUp(){var P;(P=this._contentWidget)===null||P===void 0||P.pageUp()}pageDown(){var P;(P=this._contentWidget)===null||P===void 0||P.pageDown()}goToTop(){var P;(P=this._contentWidget)===null||P===void 0||P.goToTop()}goToBottom(){var P;(P=this._contentWidget)===null||P===void 0||P.goToBottom()}get isColorPickerVisible(){var P;return(P=this._contentWidget)===null||P===void 0?void 0:P.isColorPickerVisible}get isHoverVisible(){var P;return(P=this._contentWidget)===null||P===void 0?void 0:P.isVisible}dispose(){var P,O;super.dispose(),this._unhookEvents(),this._toUnhook.dispose(),(P=this._glyphWidget)===null||P===void 0||P.dispose(),(O=this._contentWidget)===null||O===void 0||O.dispose()}};e.ModesHoverController=h,h.ID="editor.contrib.hover",e.ModesHoverController=h=a=Ie([ge(1,s.IInstantiationService),ge(2,i.IOpenerService),ge(3,m.ILanguageService),ge(4,l.IKeybindingService)],h);class p extends y.EditorAction{constructor(){super({id:"editor.action.showHover",label:o.localize(0,null),description:{description:"Show or Focus Hover",args:[{name:"args",schema:{type:"object",properties:{focus:{description:"Controls if when triggered with the keyboard, the hover should take focus immediately.",type:"boolean",default:!1}}}}]},alias:"Show or Focus Hover",precondition:void 0,kbOpts:{kbExpr:S.EditorContextKeys.editorTextFocus,primary:(0,L.KeyChord)(2089,2087),weight:100}})}run(P,O,x){if(!O.hasModel())return;const W=h.get(O);if(!W)return;const U=O.getPosition(),F=new D.Range(U.lineNumber,U.column,U.lineNumber,U.column),G=O.getOption(2)===2||!!x?.focus;W.isHoverVisible?W.focus():W.showContentHover(F,1,1,G)}}class b extends y.EditorAction{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:o.localize(1,null),alias:"Show Definition Preview Hover",precondition:void 0})}run(P,O){const x=h.get(O);if(!x)return;const W=O.getPosition();if(!W)return;const U=new D.Range(W.lineNumber,W.column,W.lineNumber,W.column),F=_.GotoDefinitionAtPositionEditorContribution.get(O);if(!F)return;F.startFindDefinitionFromCursor(W).then(()=>{x.showContentHover(U,1,1,!0)})}}class w extends y.EditorAction{constructor(){super({id:"editor.action.scrollUpHover",label:o.localize(2,null),alias:"Scroll Up Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:16,weight:100}})}run(P,O){const x=h.get(O);x&&x.scrollUp()}}class E extends y.EditorAction{constructor(){super({id:"editor.action.scrollDownHover",label:o.localize(3,null),alias:"Scroll Down Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:18,weight:100}})}run(P,O){const x=h.get(O);x&&x.scrollDown()}}class k extends y.EditorAction{constructor(){super({id:"editor.action.scrollLeftHover",label:o.localize(4,null),alias:"Scroll Left Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:15,weight:100}})}run(P,O){const x=h.get(O);x&&x.scrollLeft()}}class M extends y.EditorAction{constructor(){super({id:"editor.action.scrollRightHover",label:o.localize(5,null),alias:"Scroll Right Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:17,weight:100}})}run(P,O){const x=h.get(O);x&&x.scrollRight()}}class R extends y.EditorAction{constructor(){super({id:"editor.action.pageUpHover",label:o.localize(6,null),alias:"Page Up Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:11,secondary:[528],weight:100}})}run(P,O){const x=h.get(O);x&&x.pageUp()}}class B extends y.EditorAction{constructor(){super({id:"editor.action.pageDownHover",label:o.localize(7,null),alias:"Page Down Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:12,secondary:[530],weight:100}})}run(P,O){const x=h.get(O);x&&x.pageDown()}}class T extends y.EditorAction{constructor(){super({id:"editor.action.goToTopHover",label:o.localize(8,null),alias:"Go To Bottom Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:14,secondary:[2064],weight:100}})}run(P,O){const x=h.get(O);x&&x.goToTop()}}class N extends y.EditorAction{constructor(){super({id:"editor.action.goToBottomHover",label:o.localize(9,null),alias:"Go To Bottom Hover",precondition:S.EditorContextKeys.hoverFocused,kbOpts:{kbExpr:S.EditorContextKeys.hoverFocused,primary:13,secondary:[2066],weight:100}})}run(P,O){const x=h.get(O);x&&x.goToBottom()}}(0,y.registerEditorContribution)(h.ID,h,2),(0,y.registerEditorAction)(p),(0,y.registerEditorAction)(b),(0,y.registerEditorAction)(w),(0,y.registerEditorAction)(E),(0,y.registerEditorAction)(k),(0,y.registerEditorAction)(M),(0,y.registerEditorAction)(R),(0,y.registerEditorAction)(B),(0,y.registerEditorAction)(T),(0,y.registerEditorAction)(N),r.HoverParticipantRegistry.register(u.MarkdownHoverParticipant),r.HoverParticipantRegistry.register(f.MarkerHoverParticipant),(0,t.registerThemingParticipant)((A,P)=>{const O=A.getColor(n.editorHoverBorder);O&&(P.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${O.transparent(.5)}; }`),P.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${O.transparent(.5)}; }`),P.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${O.transparent(.5)}; }`))})}),define(te[902],ie([1,0,2,16,5,367,368,376,99]),function($,e,L,I,y,D,S,m,_){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorContribution=void 0;class v extends L.Disposable{constructor(s){super(),this._editor=s,this._register(s.onMouseDown(i=>this.onMouseDown(i)))}dispose(){super.dispose()}onMouseDown(s){const i=this._editor.getOption(146);if(i!=="click"&&i!=="clickAndHover")return;const n=s.target;if(n.type!==6||!n.detail.injectedText||n.detail.injectedText.options.attachedData!==D.ColorDecorationInjectedTextMarker||!n.range)return;const t=this._editor.getContribution(m.ModesHoverController.ID);if(t&&!t.isColorPickerVisible){const r=new y.Range(n.range.startLineNumber,n.range.startColumn+1,n.range.endLineNumber,n.range.endColumn+1);t.showContentHover(r,1,0,!1,!0)}}}e.ColorContribution=v,v.ID="editor.contrib.colorContribution",(0,I.registerEditorContribution)(v.ID,v,2),_.HoverParticipantRegistry.register(S.ColorHoverParticipant)}),define(te[377],ie([1,0,7,41,19,169,5,65,255,136,30,25,15,58,8,48]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.goToDefinitionWithLocation=e.showGoToContextMenu=void 0;function u(d,l,o,c){var a;return be(this,void 0,void 0,function*(){const g=d.get(m.ITextModelService),h=d.get(n.IContextMenuService),p=d.get(s.ICommandService),b=d.get(t.IInstantiationService),w=d.get(r.INotificationService);if(yield c.item.resolve(y.CancellationToken.None),!c.part.location)return;const E=c.part.location,k=[],M=new Set(C.MenuRegistry.getMenuItems(C.MenuId.EditorContext).map(B=>(0,C.isIMenuItem)(B)?B.command.id:(0,D.generateUuid)()));for(const B of _.SymbolNavigationAction.all())M.has(B.desc.id)&&k.push(new I.Action(B.desc.id,C.MenuItemAction.label(B.desc,{renderShortTitle:!0}),void 0,!0,()=>be(this,void 0,void 0,function*(){const T=yield g.createModelReference(E.uri);try{const N=new _.SymbolNavigationAnchor(T.object.textEditorModel,S.Range.getStartPosition(E.range)),A=c.item.anchor.range;yield b.invokeFunction(B.runEditorCommand.bind(B),l,N,A)}finally{T.dispose()}})));if(c.part.command){const{command:B}=c.part;k.push(new I.Separator),k.push(new I.Action(B.id,B.title,void 0,!0,()=>be(this,void 0,void 0,function*(){var T;try{yield p.executeCommand(B.id,...(T=B.arguments)!==null&&T!==void 0?T:[])}catch(N){w.notify({severity:r.Severity.Error,source:c.item.provider.displayName,message:N})}})))}const R=l.getOption(126);h.showContextMenu({domForShadowRoot:R&&(a=l.getDomNode())!==null&&a!==void 0?a:void 0,getAnchor:()=>{const B=L.getDomNodePagePosition(o);return{x:B.left,y:B.top+B.height+8}},getActions:()=>k,onHide:()=>{l.focus()},autoSelectFirstItem:!0})})}e.showGoToContextMenu=u;function f(d,l,o,c){return be(this,void 0,void 0,function*(){const g=yield d.get(m.ITextModelService).createModelReference(c.uri);yield o.invokeWithinContext(h=>be(this,void 0,void 0,function*(){const p=l.hasSideBySideModifier,b=h.get(i.IContextKeyService),w=v.PeekContext.inPeekEditor.getValue(b),E=!p&&o.getOption(87)&&!w;return new _.DefinitionAction({openToSide:p,openInPeek:E,muteMessage:!0},{title:{value:"",original:""},id:"",precondition:void 0}).run(h,new _.SymbolNavigationAnchor(g.object.textEditorModel,S.Range.getStartPosition(c.range)),S.Range.lift(c.range))})),g.dispose()})}e.goToDefinitionWithLocation=f}),define(te[378],ie([1,0,7,13,14,19,9,2,56,20,21,159,120,39,71,5,29,49,37,74,18,65,184,326,377,25,47,8,48,31,23]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M){"use strict";var R;Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsController=e.RenderedInlayHintLabelPart=void 0;class B{constructor(){this._entries=new _.LRUCache(50)}get(W){const U=B._key(W);return this._entries.get(U)}set(W,U){const F=B._key(W);this._entries.set(F,U)}static _key(W){return`${W.uri.toString()}/${W.getVersionId()}`}}const T=(0,w.createDecorator)("IInlayHintsCache");(0,b.registerSingleton)(T,B,1);class N{constructor(W,U){this.item=W,this.index=U}get part(){const W=this.item.hint.label;return typeof W=="string"?{label:W}:W[this.index]}}e.RenderedInlayHintLabelPart=N;class A{constructor(W,U){this.part=W,this.hasTriggerModifier=U}}let P=R=class{static get(W){var U;return(U=W.getContribution(R.ID))!==null&&U!==void 0?U:void 0}constructor(W,U,F,G,Y,ne,se){this._editor=W,this._languageFeaturesService=U,this._inlayHintsCache=G,this._commandService=Y,this._notificationService=ne,this._instaService=se,this._disposables=new m.DisposableStore,this._sessionDisposables=new m.DisposableStore,this._decorationsMetadata=new Map,this._ruleFactory=new s.DynamicCssRules(this._editor),this._activeRenderMode=0,this._debounceInfo=F.for(U.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(U.inlayHintsProvider.onDidChange(()=>this._update())),this._disposables.add(W.onDidChangeModel(()=>this._update())),this._disposables.add(W.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(W.onDidChangeConfiguration(J=>{J.hasChanged(139)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){this._sessionDisposables.clear(),this._removeAllDecorations();const W=this._editor.getOption(139);if(W.enabled==="off")return;const U=this._editor.getModel();if(!U||!this._languageFeaturesService.inlayHintsProvider.has(U))return;const F=this._inlayHintsCache.get(U);F&&this._updateHintsDecorators([U.getFullModelRange()],F),this._sessionDisposables.add((0,m.toDisposable)(()=>{U.isDisposed()||this._cacheHintsForFastRestore(U)}));let G;const Y=new Set,ne=new y.RunOnceScheduler(()=>be(this,void 0,void 0,function*(){const se=Date.now();G?.dispose(!0),G=new D.CancellationTokenSource;const J=U.onWillDispose(()=>G?.cancel());try{const q=G.token,H=yield g.InlayHintsFragments.create(this._languageFeaturesService.inlayHintsProvider,U,this._getHintsRanges(),q);if(ne.delay=this._debounceInfo.update(U,Date.now()-se),q.isCancellationRequested){H.dispose();return}for(const V of H.provider)typeof V.onDidChangeInlayHints=="function"&&!Y.has(V)&&(Y.add(V),this._sessionDisposables.add(V.onDidChangeInlayHints(()=>{ne.isScheduled()||ne.schedule()})));this._sessionDisposables.add(H),this._updateHintsDecorators(H.ranges,H.items),this._cacheHintsForFastRestore(U)}catch(q){(0,S.onUnexpectedError)(q)}finally{G.dispose(),J.dispose()}}),this._debounceInfo.get(U));if(this._sessionDisposables.add(ne),this._sessionDisposables.add((0,m.toDisposable)(()=>G?.dispose(!0))),ne.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange(se=>{(se.scrollTopChanged||!ne.isScheduled())&&ne.schedule()})),this._sessionDisposables.add(this._editor.onDidChangeModelContent(se=>{const J=Math.max(ne.delay,1250);ne.schedule(J)})),W.enabled==="on")this._activeRenderMode=0;else{let se,J;W.enabled==="onUnlessPressed"?(se=0,J=1):(se=1,J=0),this._activeRenderMode=se,this._sessionDisposables.add(L.ModifierKeyEmitter.getInstance().event(q=>{if(!this._editor.hasModel())return;const H=q.altKey&&q.ctrlKey&&!(q.shiftKey||q.metaKey)?J:se;if(H!==this._activeRenderMode){this._activeRenderMode=H;const V=this._editor.getModel(),Z=this._copyInlayHintsWithCurrentAnchor(V);this._updateHintsDecorators([V.getFullModelRange()],Z),ne.schedule(0)}}))}this._sessionDisposables.add(this._installDblClickGesture(()=>ne.schedule(0))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const W=new m.DisposableStore,U=W.add(new a.ClickLinkGesture(this._editor)),F=new m.DisposableStore;return W.add(F),W.add(U.onMouseMoveOrRelevantKeyDown(G=>{const[Y]=G,ne=this._getInlayHintLabelPart(Y),se=this._editor.getModel();if(!ne||!se){F.clear();return}const J=new D.CancellationTokenSource;F.add((0,m.toDisposable)(()=>J.dispose(!0))),ne.item.resolve(J.token),this._activeInlayHintPart=ne.part.command||ne.part.location?new A(ne,Y.hasTriggerModifier):void 0;const q=se.validatePosition(ne.item.hint.position).lineNumber,H=new r.Range(q,1,q,se.getLineMaxColumn(q)),V=this._getInlineHintsForRange(H);this._updateHintsDecorators([H],V),F.add((0,m.toDisposable)(()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([H],V)}))})),W.add(U.onCancel(()=>F.clear())),W.add(U.onExecute(G=>be(this,void 0,void 0,function*(){const Y=this._getInlayHintLabelPart(G);if(Y){const ne=Y.part;ne.location?this._instaService.invokeFunction(h.goToDefinitionWithLocation,G,this._editor,ne.location):u.Command.is(ne.command)&&(yield this._invokeCommand(ne.command,Y.item))}}))),W}_getInlineHintsForRange(W){const U=new Set;for(const F of this._decorationsMetadata.values())W.containsRange(F.item.anchor.range)&&U.add(F.item);return Array.from(U)}_installDblClickGesture(W){return this._editor.onMouseUp(U=>be(this,void 0,void 0,function*(){if(U.event.detail!==2)return;const F=this._getInlayHintLabelPart(U);if(F&&(U.event.preventDefault(),yield F.item.resolve(D.CancellationToken.None),(0,I.isNonEmptyArray)(F.item.hint.textEdits))){const G=F.item.hint.textEdits.map(Y=>t.EditOperation.replace(r.Range.lift(Y.range),Y.text));this._editor.executeEdits("inlayHint.default",G),W()}}))}_installContextMenu(){return this._editor.onContextMenu(W=>be(this,void 0,void 0,function*(){if(!(W.event.target instanceof HTMLElement))return;const U=this._getInlayHintLabelPart(W);U&&(yield this._instaService.invokeFunction(h.showGoToContextMenu,this._editor,W.event.target,U))}))}_getInlayHintLabelPart(W){var U;if(W.target.type!==6)return;const F=(U=W.target.detail.injectedText)===null||U===void 0?void 0:U.options;if(F instanceof d.ModelDecorationInjectedTextOptions&&F?.attachedData instanceof N)return F.attachedData}_invokeCommand(W,U){var F;return be(this,void 0,void 0,function*(){try{yield this._commandService.executeCommand(W.id,...(F=W.arguments)!==null&&F!==void 0?F:[])}catch(G){this._notificationService.notify({severity:E.Severity.Error,source:U.provider.displayName,message:G})}})}_cacheHintsForFastRestore(W){const U=this._copyInlayHintsWithCurrentAnchor(W);this._inlayHintsCache.set(W,U)}_copyInlayHintsWithCurrentAnchor(W){const U=new Map;for(const[F,G]of this._decorationsMetadata){if(U.has(G.item))continue;const Y=W.getDecorationRange(F);if(Y){const ne=new g.InlayHintAnchor(Y,G.item.anchor.direction),se=G.item.with({anchor:ne});U.set(G.item,se)}}return Array.from(U.values())}_getHintsRanges(){const U=this._editor.getModel(),F=this._editor.getVisibleRangesPlusViewportAboveBelow(),G=[];for(const Y of F.sort(r.Range.compareRangesUsingStarts)){const ne=U.validateRange(new r.Range(Y.startLineNumber-30,Y.startColumn,Y.endLineNumber+30,Y.endColumn));G.length===0||!r.Range.areIntersectingOrTouching(G[G.length-1],ne)?G.push(ne):G[G.length-1]=r.Range.plusRange(G[G.length-1],ne)}return G}_updateHintsDecorators(W,U){var F,G;const Y=[],ne=(ue,de,ce,ae,X)=>{const K={content:ce,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:de.className,cursorStops:ae,attachedData:X};Y.push({item:ue,classNameRef:de,decoration:{range:ue.anchor.range,options:{description:"InlayHint",showIfCollapsed:ue.anchor.range.isEmpty(),collapseOnReplaceEdit:!ue.anchor.range.isEmpty(),stickiness:0,[ue.anchor.direction]:this._activeRenderMode===0?K:void 0}}})},se=(ue,de)=>{const ce=this._ruleFactory.createClassNameRef({width:`${J/3|0}px`,display:"inline-block"});ne(ue,ce,"\u200A",de?f.InjectedTextCursorStops.Right:f.InjectedTextCursorStops.None)},{fontSize:J,fontFamily:q,padding:H,isUniform:V}=this._getLayoutInfo(),Z="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(Z,q);for(const ue of U){ue.hint.paddingLeft&&se(ue,!1);const de=typeof ue.hint.label=="string"?[{label:ue.hint.label}]:ue.hint.label;for(let ce=0;ceR._MAX_DECORATORS)break}const ee=[];for(const ue of W)for(const{id:de}of(G=this._editor.getDecorationsInRange(ue))!==null&&G!==void 0?G:[]){const ce=this._decorationsMetadata.get(de);ce&&(ee.push(de),ce.classNameRef.dispose(),this._decorationsMetadata.delete(de))}const le=i.StableEditorScrollState.capture(this._editor);this._editor.changeDecorations(ue=>{const de=ue.deltaDecorations(ee,Y.map(ce=>ce.decoration));for(let ce=0;ceF)&&(Y=F);const ne=W.fontFamily||G;return{fontSize:Y,fontFamily:ne,padding:U,isUniform:!U&&ne===G&&Y===F}}_removeAllDecorations(){this._editor.removeDecorations(Array.from(this._decorationsMetadata.keys()));for(const W of this._decorationsMetadata.values())W.classNameRef.dispose();this._decorationsMetadata.clear()}};e.InlayHintsController=P,P.ID="editor.contrib.InlayHints",P._MAX_DECORATORS=1500,e.InlayHintsController=P=R=Ie([ge(1,o.ILanguageFeaturesService),ge(2,l.ILanguageFeatureDebounceService),ge(3,T),ge(4,p.ICommandService),ge(5,E.INotificationService),ge(6,w.IInstantiationService)],P);function O(x){const W="\xA0";return x.replace(/[ \t]/g,W)}p.CommandsRegistry.registerCommand("_executeInlayHintProvider",(x,...W)=>be(void 0,void 0,void 0,function*(){const[U,F]=W;(0,v.assertType)(C.URI.isUri(U)),(0,v.assertType)(r.Range.isIRange(F));const{inlayHintsProvider:G}=x.get(o.ILanguageFeaturesService),Y=yield x.get(c.ITextModelService).createModelReference(U);try{const ne=yield g.InlayHintsFragments.create(G,Y.object.textEditorModel,[r.Range.lift(F)],D.CancellationToken.None),se=ne.items.map(J=>J.hint);return setTimeout(()=>ne.dispose(),0),se}finally{Y.dispose()}}))});var yt=this&&this.__asyncValues||function($){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=$[Symbol.asyncIterator],L;return e?e.call($):($=typeof __values=="function"?__values($):$[Symbol.iterator](),L={},I("next"),I("throw"),I("return"),L[Symbol.asyncIterator]=function(){return this},L);function I(D){L[D]=$[D]&&function(S){return new Promise(function(m,_){S=$[D](S),y(m,_,S.done,S.value)})}}function y(D,S,m,_){Promise.resolve(_).then(function(v){D({value:v,done:m})},S)}};define(te[903],ie([1,0,14,57,12,37,99,42,65,356,247,378,28,55,18,677,17,326,13]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintsHover=void 0;class l extends S.HoverForeignElementAnchor{constructor(a,g,h,p){super(10,g,a.item.anchor.range,h,p,!0),this.part=a}}let o=class extends C.MarkdownHoverParticipant{constructor(a,g,h,p,b,w){super(a,g,h,p,w),this._resolverService=b,this.hoverOrdinal=6}suggestHoverAnchor(a){var g;if(!s.InlayHintsController.get(this._editor)||a.target.type!==6)return null;const p=(g=a.target.detail.injectedText)===null||g===void 0?void 0:g.options;return p instanceof D.ModelDecorationInjectedTextOptions&&p.attachedData instanceof s.RenderedInlayHintLabelPart?new l(p.attachedData,this,a.event.posx,a.event.posy):null}computeSync(){return[]}computeAsync(a,g,h){return a instanceof l?new L.AsyncIterableObject(p=>be(this,void 0,void 0,function*(){var b,w,E,k;const{part:M}=a;if(yield M.item.resolve(h),h.isCancellationRequested)return;let R;typeof M.item.hint.tooltip=="string"?R=new I.MarkdownString().appendText(M.item.hint.tooltip):M.item.hint.tooltip&&(R=M.item.hint.tooltip),R&&p.emitOne(new C.MarkdownHover(this,a.range,[R],!1,0)),(0,d.isNonEmptyArray)(M.item.hint.textEdits)&&p.emitOne(new C.MarkdownHover(this,a.range,[new I.MarkdownString().appendText((0,r.localize)(0,null))],!1,10001));let B;if(typeof M.part.tooltip=="string"?B=new I.MarkdownString().appendText(M.part.tooltip):M.part.tooltip&&(B=M.part.tooltip),B&&p.emitOne(new C.MarkdownHover(this,a.range,[B],!1,1)),M.part.location||M.part.command){let O;const W=this._editor.getOption(77)==="altKey"?u.isMacintosh?(0,r.localize)(1,null):(0,r.localize)(2,null):u.isMacintosh?(0,r.localize)(3,null):(0,r.localize)(4,null);M.part.location&&M.part.command?O=new I.MarkdownString().appendText((0,r.localize)(5,null,W)):M.part.location?O=new I.MarkdownString().appendText((0,r.localize)(6,null,W)):M.part.command&&(O=new I.MarkdownString(`[${(0,r.localize)(7,null)}](${(0,f.asCommandLink)(M.part.command)} "${M.part.command.title}") (${W})`,{isTrusted:!0})),O&&p.emitOne(new C.MarkdownHover(this,a.range,[O],!1,1e4))}const T=yield this._resolveInlayHintLabelPartHover(M,h);try{for(var N=!0,A=yt(T),P;P=yield A.next(),b=P.done,!b;N=!0){k=P.value,N=!1;const O=k;p.emitOne(O)}}catch(O){w={error:O}}finally{try{!N&&!b&&(E=A.return)&&(yield E.call(A))}finally{if(w)throw w.error}}})):L.AsyncIterableObject.EMPTY}_resolveInlayHintLabelPartHover(a,g){return be(this,void 0,void 0,function*(){if(!a.part.location)return L.AsyncIterableObject.EMPTY;const{uri:h,range:p}=a.part.location,b=yield this._resolverService.createModelReference(h);try{const w=b.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(w)?(0,v.getHover)(this._languageFeaturesService.hoverProvider,w,new y.Position(p.startLineNumber,p.startColumn),g).filter(E=>!(0,I.isEmptyMarkdownString)(E.hover.contents)).map(E=>new C.MarkdownHover(this,a.item.anchor.range,E.hover.contents,!1,2+E.ordinal)):L.AsyncIterableObject.EMPTY}finally{b.dispose()}})}};e.InlayHintsHover=o,e.InlayHintsHover=o=Ie([ge(1,m.ILanguageService),ge(2,n.IOpenerService),ge(3,i.IConfigurationService),ge(4,_.ITextModelService),ge(5,t.ILanguageFeaturesService)],o)}),define(te[904],ie([1,0,16,99,378,903]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(y.InlayHintsController.ID,y.InlayHintsController,1),I.HoverParticipantRegistry.register(D.InlayHintsHover)}),define(te[379],ie([1,0,2,18,894,893,8,58,30,15,22,184,5,246,377,12,19,32,74,7,303,60,253,295]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.StickyScrollController=void 0;let p=h=class extends L.Disposable{constructor(w,E,k,M,R,B,T){super(),this._editor=w,this._contextMenuService=E,this._languageFeaturesService=k,this._instaService=M,this._contextKeyService=T,this._sessionStore=new L.DisposableStore,this._foldingModel=null,this._maxStickyLines=Number.MAX_SAFE_INTEGER,this._candidateDefinitionsLength=-1,this._focusedStickyElementIndex=-1,this._enabled=!1,this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1,this._endLineNumbers=[],this._showEndForLine=null,this._stickyScrollWidget=new y.StickyScrollWidget(this._editor),this._stickyLineCandidateProvider=new D.StickyLineCandidateProvider(this._editor,k,R),this._register(this._stickyScrollWidget),this._register(this._stickyLineCandidateProvider),this._widgetState=new y.StickyScrollWidgetState([],[],0),this._readConfiguration();const N=this._stickyScrollWidget.getDomNode();this._register(this._editor.onDidChangeConfiguration(P=>{(P.hasChanged(114)||P.hasChanged(72)||P.hasChanged(66)||P.hasChanged(109))&&this._readConfiguration()})),this._register(l.addDisposableListener(N,l.EventType.CONTEXT_MENU,P=>be(this,void 0,void 0,function*(){this._onContextMenu(P)}))),this._stickyScrollFocusedContextKey=C.EditorContextKeys.stickyScrollFocused.bindTo(this._contextKeyService),this._stickyScrollVisibleContextKey=C.EditorContextKeys.stickyScrollVisible.bindTo(this._contextKeyService);const A=this._register(l.trackFocus(N));this._register(A.onDidBlur(P=>{this._positionRevealed===!1&&N.clientHeight===0?(this._focusedStickyElementIndex=-1,this.focus()):this._disposeFocusStickyScrollStore()})),this._register(A.onDidFocus(P=>{this.focus()})),this._registerMouseListeners(),this._register(l.addDisposableListener(N,l.EventType.MOUSE_DOWN,P=>{this._onMouseDown=!0}))}static get(w){return w.getContribution(h.ID)}_disposeFocusStickyScrollStore(){var w;this._stickyScrollFocusedContextKey.set(!1),(w=this._focusDisposableStore)===null||w===void 0||w.dispose(),this._focused=!1,this._positionRevealed=!1,this._onMouseDown=!1}focus(){if(this._onMouseDown){this._onMouseDown=!1,this._editor.focus();return}this._stickyScrollFocusedContextKey.get()!==!0&&(this._focused=!0,this._focusDisposableStore=new L.DisposableStore,this._stickyScrollFocusedContextKey.set(!0),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumbers.length-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}focusNext(){this._focusedStickyElementIndex0&&this._focusNav(!1)}selectEditor(){this._editor.focus()}_focusNav(w){this._focusedStickyElementIndex=w?this._focusedStickyElementIndex+1:this._focusedStickyElementIndex-1,this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex)}goToFocused(){const w=this._stickyScrollWidget.lineNumbers;this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:w[this._focusedStickyElementIndex],column:1})}_revealPosition(w){this._reveaInEditor(w,()=>this._editor.revealPosition(w))}_revealLineInCenterIfOutsideViewport(w){this._reveaInEditor(w,()=>this._editor.revealLineInCenterIfOutsideViewport(w.lineNumber,0))}_reveaInEditor(w,E){this._focused&&this._disposeFocusStickyScrollStore(),this._positionRevealed=!0,E(),this._editor.setSelection(i.Range.fromPositions(w)),this._editor.focus()}_registerMouseListeners(){const w=this._register(new L.DisposableStore),E=this._register(new s.ClickLinkGesture(this._editor,{extractLineNumberFromMouseEvent:R=>{const B=this._stickyScrollWidget.getEditorPositionFromNode(R.target.element);return B?B.lineNumber:0}})),k=R=>{if(!this._editor.hasModel()||R.target.type!==12||R.target.detail!==this._stickyScrollWidget.getId())return null;const B=R.target.element;if(!B||B.innerText!==B.innerHTML)return null;const T=this._stickyScrollWidget.getEditorPositionFromNode(B);return T?{range:new i.Range(T.lineNumber,T.column,T.lineNumber,T.column+B.innerText.length),textElement:B}:null},M=this._stickyScrollWidget.getDomNode();this._register(l.addStandardDisposableListener(M,l.EventType.CLICK,R=>{if(R.ctrlKey||R.altKey||R.metaKey||!R.leftButton)return;if(R.shiftKey){const A=this._stickyScrollWidget.getLineIndexFromChildDomNode(R.target);if(A===null)return;const P=new r.Position(this._endLineNumbers[A],1);this._revealLineInCenterIfOutsideViewport(P);return}if(this._stickyScrollWidget.isInFoldingIconDomNode(R.target)){const A=this._stickyScrollWidget.getLineNumberFromChildDomNode(R.target);this._toggleFoldingRegionForLine(A);return}if(!this._stickyScrollWidget.isInStickyLine(R.target))return;let N=this._stickyScrollWidget.getEditorPositionFromNode(R.target);if(!N){const A=this._stickyScrollWidget.getLineNumberFromChildDomNode(R.target);if(A===null)return;N=new r.Position(A,1)}this._revealPosition(N)})),this._register(l.addStandardDisposableListener(M,l.EventType.MOUSE_MOVE,R=>{if(R.shiftKey){const B=this._stickyScrollWidget.getLineIndexFromChildDomNode(R.target);if(B===null||this._showEndForLine!==null&&this._showEndForLine===B)return;this._showEndForLine=B,this._renderStickyScroll();return}this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(l.addDisposableListener(M,l.EventType.MOUSE_LEAVE,R=>{this._showEndForLine!==null&&(this._showEndForLine=null,this._renderStickyScroll())})),this._register(E.onMouseMoveOrRelevantKeyDown(([R,B])=>{const T=k(R);if(!T||!R.hasTriggerModifier||!this._editor.hasModel()){w.clear();return}const{range:N,textElement:A}=T;if(!N.equalsRange(this._stickyRangeProjectedOnEditor))this._stickyRangeProjectedOnEditor=N,w.clear();else if(A.style.textDecoration==="underline")return;const P=new u.CancellationTokenSource;w.add((0,L.toDisposable)(()=>P.dispose(!0)));let O;(0,n.getDefinitionsAtPosition)(this._languageFeaturesService.definitionProvider,this._editor.getModel(),new r.Position(N.startLineNumber,N.startColumn+1),P.token).then(x=>{if(!P.token.isCancellationRequested)if(x.length!==0){this._candidateDefinitionsLength=x.length;const W=A;O!==W?(w.clear(),O=W,O.style.textDecoration="underline",w.add((0,L.toDisposable)(()=>{O.style.textDecoration="none"}))):O||(O=W,O.style.textDecoration="underline",w.add((0,L.toDisposable)(()=>{O.style.textDecoration="none"})))}else w.clear()})})),this._register(E.onCancel(()=>{w.clear()})),this._register(E.onExecute(R=>be(this,void 0,void 0,function*(){if(R.target.type!==12||R.target.detail!==this._stickyScrollWidget.getId())return;const B=this._stickyScrollWidget.getEditorPositionFromNode(R.target.element);B&&(this._candidateDefinitionsLength>1&&(this._focused&&this._disposeFocusStickyScrollStore(),this._revealPosition({lineNumber:B.lineNumber,column:1})),this._instaService.invokeFunction(t.goToDefinitionWithLocation,R,this._editor,{uri:this._editor.getModel().uri,range:this._stickyRangeProjectedOnEditor}))})))}_onContextMenu(w){const E=new c.StandardMouseEvent(w);this._contextMenuService.showContextMenu({menuId:_.MenuId.StickyScrollContext,getAnchor:()=>E})}_toggleFoldingRegionForLine(w){if(!this._foldingModel||w===null)return;const E=this._stickyScrollWidget.getStickyLineForLine(w),k=E?.foldingIcon;if(!k)return;(0,g.toggleCollapseState)(this._foldingModel,Number.MAX_VALUE,[w]),k.isCollapsed=!k.isCollapsed;const M=(k.isCollapsed?this._editor.getTopForLineNumber(k.foldingEndLine):this._editor.getTopForLineNumber(k.foldingStartLine))-this._editor.getOption(66)*E.index+1;this._editor.setScrollTop(M),this._renderStickyScroll(w)}_readConfiguration(){const w=this._editor.getOption(114);if(w.enabled===!1){this._editor.removeOverlayWidget(this._stickyScrollWidget),this._sessionStore.clear(),this._enabled=!1;return}else w.enabled&&!this._enabled&&(this._editor.addOverlayWidget(this._stickyScrollWidget),this._sessionStore.add(this._editor.onDidScrollChange(k=>{k.scrollTopChanged&&(this._showEndForLine=null,this._renderStickyScroll())})),this._sessionStore.add(this._editor.onDidLayoutChange(()=>this._onDidResize())),this._sessionStore.add(this._editor.onDidChangeModelTokens(k=>this._onTokensChange(k))),this._sessionStore.add(this._stickyLineCandidateProvider.onDidChangeStickyScroll(()=>{this._showEndForLine=null,this._renderStickyScroll()})),this._enabled=!0);this._editor.getOption(67).renderType===2&&this._sessionStore.add(this._editor.onDidChangeCursorPosition(()=>{this._showEndForLine=null,this._renderStickyScroll()}))}_needsUpdate(w){const E=this._stickyScrollWidget.getCurrentLines();for(const k of E)for(const M of w.ranges)if(k>=M.fromLineNumber&&k<=M.toLineNumber)return!0;return!1}_onTokensChange(w){this._needsUpdate(w)&&this._renderStickyScroll(-1)}_onDidResize(){const E=this._editor.getLayoutInfo().height/this._editor.getOption(66);this._maxStickyLines=Math.round(E*.25)}_renderStickyScroll(w=1/0){var E,k;return be(this,void 0,void 0,function*(){const M=this._editor.getModel();if(!M||M.isTooLargeForTokenization()){this._foldingModel=null,this._stickyScrollWidget.setState(void 0,null,w);return}const R=this._stickyLineCandidateProvider.getVersionId();if(R===void 0||R===M.getVersionId())if(this._foldingModel=(k=yield(E=a.FoldingController.get(this._editor))===null||E===void 0?void 0:E.getFoldingModel())!==null&&k!==void 0?k:null,this._widgetState=this.findScrollWidgetState(),this._stickyScrollVisibleContextKey.set(this._widgetState.startLineNumbers.length!==0),!this._focused)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,w);else if(this._focusedStickyElementIndex===-1)this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,w),this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1,this._focusedStickyElementIndex!==-1&&this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex);else{const B=this._stickyScrollWidget.lineNumbers[this._focusedStickyElementIndex];this._stickyScrollWidget.setState(this._widgetState,this._foldingModel,w),this._stickyScrollWidget.lineNumberCount===0?this._focusedStickyElementIndex=-1:(this._stickyScrollWidget.lineNumbers.includes(B)||(this._focusedStickyElementIndex=this._stickyScrollWidget.lineNumberCount-1),this._stickyScrollWidget.focusLineWithIndex(this._focusedStickyElementIndex))}})}findScrollWidgetState(){const w=this._editor.getOption(66),E=Math.min(this._maxStickyLines,this._editor.getOption(114).maxLineCount),k=this._editor.getScrollTop();let M=0;const R=[],B=[],T=this._editor.getVisibleRanges();if(T.length!==0){const N=new o.StickyRange(T[0].startLineNumber,T[T.length-1].endLineNumber),A=this._stickyLineCandidateProvider.getCandidateStickyLinesIntersecting(N);for(const P of A){const O=P.startLineNumber,x=P.endLineNumber,W=P.nestingDepth;if(x-O>0){const U=(W-1)*w,F=W*w,G=this._editor.getBottomForLineNumber(O)-k,Y=this._editor.getTopForLineNumber(x)-k,ne=this._editor.getBottomForLineNumber(x)-k;if(U>Y&&U<=ne){R.push(O),B.push(x+1),M=ne-F;break}else F>G&&F<=ne&&(R.push(O),B.push(x+1));if(R.length===E)break}}}return this._endLineNumbers=B,new y.StickyScrollWidgetState(R,B,M,this._showEndForLine)}dispose(){super.dispose(),this._sessionStore.dispose()}};e.StickyScrollController=p,p.ID="store.contrib.stickyScrollController",e.StickyScrollController=p=h=Ie([ge(1,m.IContextMenuService),ge(2,I.ILanguageFeaturesService),ge(3,S.IInstantiationService),ge(4,f.ILanguageConfigurationService),ge(5,d.ILanguageFeatureDebounceService),ge(6,v.IContextKeyService)],p)}),define(te[905],ie([1,0,16,700,742,30,28,15,22,379]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectEditor=e.GoToStickyScrollLine=e.SelectPreviousStickyScrollLine=e.SelectNextStickyScrollLine=e.FocusStickyScroll=e.ToggleStickyScroll=void 0;class C extends D.Action2{constructor(){super({id:"editor.action.toggleStickyScroll",title:{value:(0,I.localize)(0,null),mnemonicTitle:(0,I.localize)(1,null),original:"Toggle Sticky Scroll"},category:y.Categories.View,toggled:{condition:m.ContextKeyExpr.equals("config.editor.stickyScroll.enabled",!0),title:(0,I.localize)(2,null),mnemonicTitle:(0,I.localize)(3,null)},menu:[{id:D.MenuId.CommandPalette},{id:D.MenuId.MenubarAppearanceMenu,group:"4_editor",order:3},{id:D.MenuId.StickyScrollContext}]})}run(d){return be(this,void 0,void 0,function*(){const l=d.get(S.IConfigurationService),o=!l.getValue("editor.stickyScroll.enabled");return l.updateValue("editor.stickyScroll.enabled",o)})}}e.ToggleStickyScroll=C;const s=100;class i extends L.EditorAction2{constructor(){super({id:"editor.action.focusStickyScroll",title:{value:(0,I.localize)(4,null),mnemonicTitle:(0,I.localize)(5,null),original:"Focus Sticky Scroll"},precondition:m.ContextKeyExpr.and(m.ContextKeyExpr.has("config.editor.stickyScroll.enabled"),_.EditorContextKeys.stickyScrollVisible),menu:[{id:D.MenuId.CommandPalette}]})}runEditorCommand(d,l){var o;(o=v.StickyScrollController.get(l))===null||o===void 0||o.focus()}}e.FocusStickyScroll=i;class n extends L.EditorAction2{constructor(){super({id:"editor.action.selectNextStickyScrollLine",title:{value:(0,I.localize)(6,null),original:"Select next sticky scroll line"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:18}})}runEditorCommand(d,l){var o;(o=v.StickyScrollController.get(l))===null||o===void 0||o.focusNext()}}e.SelectNextStickyScrollLine=n;class t extends L.EditorAction2{constructor(){super({id:"editor.action.selectPreviousStickyScrollLine",title:{value:(0,I.localize)(7,null),original:"Select previous sticky scroll line"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:16}})}runEditorCommand(d,l){var o;(o=v.StickyScrollController.get(l))===null||o===void 0||o.focusPrevious()}}e.SelectPreviousStickyScrollLine=t;class r extends L.EditorAction2{constructor(){super({id:"editor.action.goToFocusedStickyScrollLine",title:{value:(0,I.localize)(8,null),original:"Go to focused sticky scroll line"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:3}})}runEditorCommand(d,l){var o;(o=v.StickyScrollController.get(l))===null||o===void 0||o.goToFocused()}}e.GoToStickyScrollLine=r;class u extends L.EditorAction2{constructor(){super({id:"editor.action.selectEditor",title:{value:(0,I.localize)(9,null),original:"Select Editor"},precondition:_.EditorContextKeys.stickyScrollFocused.isEqualTo(!0),keybinding:{weight:s,primary:9}})}runEditorCommand(d,l){var o;(o=v.StickyScrollController.get(l))===null||o===void 0||o.selectEditor()}}e.SelectEditor=u}),define(te[906],ie([1,0,16,905,379,30]),function($,e,L,I,y,D){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(y.StickyScrollController.ID,y.StickyScrollController,1),(0,D.registerAction2)(I.ToggleStickyScroll),(0,D.registerAction2)(I.FocusStickyScroll),(0,D.registerAction2)(I.SelectPreviousStickyScrollLine),(0,D.registerAction2)(I.SelectNextStickyScrollLine),(0,D.registerAction2)(I.GoToStickyScrollLine),(0,D.registerAction2)(I.SelectEditor)}),define(te[907],ie([1,0,16,33,374,28,15,8,48,89]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneReferencesController=void 0;let C=class extends y.ReferencesController{constructor(i,n,t,r,u,f,d){super(!0,i,n,t,r,u,f,d)}};e.StandaloneReferencesController=C,e.StandaloneReferencesController=C=Ie([ge(1,S.IContextKeyService),ge(2,I.ICodeEditorService),ge(3,_.INotificationService),ge(4,m.IInstantiationService),ge(5,v.IStorageService),ge(6,D.IConfigurationService)],C),(0,L.registerEditorContribution)(y.ReferencesController.ID,C,4)}),define(te[908],ie([1,0,9,2,54,98,739,157,47,48,191]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UndoRedoService=void 0;const s=!1;function i(g){return g.scheme===y.Schemas.file?g.fsPath:g.path}let n=0;class t{constructor(h,p,b,w,E,k,M){this.id=++n,this.type=0,this.actual=h,this.label=h.label,this.confirmBeforeUndo=h.confirmBeforeUndo||!1,this.resourceLabel=p,this.strResource=b,this.resourceLabels=[this.resourceLabel],this.strResources=[this.strResource],this.groupId=w,this.groupOrder=E,this.sourceId=k,this.sourceOrder=M,this.isValid=!0}setValid(h){this.isValid=h}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.isValid?" VALID":"INVALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class r{constructor(h,p){this.resourceLabel=h,this.reason=p}}class u{constructor(){this.elements=new Map}createMessage(){const h=[],p=[];for(const[,w]of this.elements)(w.reason===0?h:p).push(w.resourceLabel);const b=[];return h.length>0&&b.push(S.localize(0,null,h.join(", "))),p.length>0&&b.push(S.localize(1,null,p.join(", "))),b.join(` -`)}get size(){return this.elements.size}has(h){return this.elements.has(h)}set(h,p){this.elements.set(h,p)}delete(h){return this.elements.delete(h)}}class f{constructor(h,p,b,w,E,k,M){this.id=++n,this.type=1,this.actual=h,this.label=h.label,this.confirmBeforeUndo=h.confirmBeforeUndo||!1,this.resourceLabels=p,this.strResources=b,this.groupId=w,this.groupOrder=E,this.sourceId=k,this.sourceOrder=M,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(h,p,b){this.removedResources||(this.removedResources=new u),this.removedResources.has(p)||this.removedResources.set(p,new r(h,b))}setValid(h,p,b){b?this.invalidatedResources&&(this.invalidatedResources.delete(p),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new u),this.invalidatedResources.has(p)||this.invalidatedResources.set(p,new r(h,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class d{constructor(h,p){this.resourceLabel=h,this.strResource=p,this._past=[],this._future=[],this.locked=!1,this.versionId=1}dispose(){for(const h of this._past)h.type===1&&h.removeResource(this.resourceLabel,this.strResource,0);for(const h of this._future)h.type===1&&h.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){const h=[];h.push(`* ${this.strResource}:`);for(let p=0;p=0;p--)h.push(` * [REDO] ${this._future[p]}`);return h.join(` -`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(h,p){h.type===1?h.setValid(this.resourceLabel,this.strResource,p):h.setValid(p)}setElementsValidFlag(h,p){for(const b of this._past)p(b.actual)&&this._setElementValidFlag(b,h);for(const b of this._future)p(b.actual)&&this._setElementValidFlag(b,h)}pushElement(h){for(const p of this._future)p.type===1&&p.removeResource(this.resourceLabel,this.strResource,1);this._future=[],this._past.push(h),this.versionId++}createSnapshot(h){const p=[];for(let b=0,w=this._past.length;b=0;b--)p.push(this._future[b].id);return new C.ResourceEditStackSnapshot(h,p)}restoreSnapshot(h){const p=h.elements.length;let b=!0,w=0,E=-1;for(let M=0,R=this._past.length;M=p||B.id!==h.elements[w])&&(b=!1,E=0),!b&&B.type===1&&B.removeResource(this.resourceLabel,this.strResource,0)}let k=-1;for(let M=this._future.length-1;M>=0;M--,w++){const R=this._future[M];b&&(w>=p||R.id!==h.elements[w])&&(b=!1,k=M),!b&&R.type===1&&R.removeResource(this.resourceLabel,this.strResource,0)}E!==-1&&(this._past=this._past.slice(0,E)),k!==-1&&(this._future=this._future.slice(k+1)),this.versionId++}getElements(){const h=[],p=[];for(const b of this._past)h.push(b.actual);for(const b of this._future)p.push(b.actual);return{past:h,future:p}}getClosestPastElement(){return this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?null:this._future[this._future.length-1]}hasPastElements(){return this._past.length>0}hasFutureElements(){return this._future.length>0}splitPastWorkspaceElement(h,p){for(let b=this._past.length-1;b>=0;b--)if(this._past[b]===h){p.has(this.strResource)?this._past[b]=p.get(this.strResource):this._past.splice(b,1);break}this.versionId++}splitFutureWorkspaceElement(h,p){for(let b=this._future.length-1;b>=0;b--)if(this._future[b]===h){p.has(this.strResource)?this._future[b]=p.get(this.strResource):this._future.splice(b,1);break}this.versionId++}moveBackward(h){this._past.pop(),this._future.push(h),this.versionId++}moveForward(h){this._future.pop(),this._past.push(h),this.versionId++}}class l{constructor(h){this.editStacks=h,this._versionIds=[];for(let p=0,b=this.editStacks.length;pp.sourceOrder)&&(p=k,b=w)}return[p,b]}canUndo(h){if(h instanceof C.UndoRedoSource){const[,b]=this._findClosestUndoElementWithSource(h.id);return!!b}const p=this.getUriComparisonKey(h);return this._editStacks.has(p)?this._editStacks.get(p).hasPastElements():!1}_onError(h,p){(0,L.onUnexpectedError)(h);for(const b of p.strResources)this.removeElements(b);this._notificationService.error(h)}_acquireLocks(h){for(const p of h.editStacks)if(p.locked)throw new Error("Cannot acquire edit stack lock");for(const p of h.editStacks)p.locked=!0;return()=>{for(const p of h.editStacks)p.locked=!1}}_safeInvokeWithLocks(h,p,b,w,E){const k=this._acquireLocks(b);let M;try{M=p()}catch(R){return k(),w.dispose(),this._onError(R,h)}return M?M.then(()=>(k(),w.dispose(),E()),R=>(k(),w.dispose(),this._onError(R,h))):(k(),w.dispose(),E())}_invokeWorkspacePrepare(h){return be(this,void 0,void 0,function*(){if(typeof h.actual.prepareUndoRedo>"u")return I.Disposable.None;const p=h.actual.prepareUndoRedo();return typeof p>"u"?I.Disposable.None:p})}_invokeResourcePrepare(h,p){if(h.actual.type!==1||typeof h.actual.prepareUndoRedo>"u")return p(I.Disposable.None);const b=h.actual.prepareUndoRedo();return b?(0,I.isDisposable)(b)?p(b):b.then(w=>p(w)):p(I.Disposable.None)}_getAffectedEditStacks(h){const p=[];for(const b of h.strResources)p.push(this._editStacks.get(b)||o);return new l(p)}_tryToSplitAndUndo(h,p,b,w){if(p.canSplit())return this._splitPastWorkspaceElement(p,b),this._notificationService.warn(w),new a(this._undo(h,0,!0));for(const E of p.strResources)this.removeElements(E);return this._notificationService.warn(w),new a}_checkWorkspaceUndo(h,p,b,w){if(p.removedResources)return this._tryToSplitAndUndo(h,p,p.removedResources,S.localize(2,null,p.label,p.removedResources.createMessage()));if(w&&p.invalidatedResources)return this._tryToSplitAndUndo(h,p,p.invalidatedResources,S.localize(3,null,p.label,p.invalidatedResources.createMessage()));const E=[];for(const M of b.editStacks)M.getClosestPastElement()!==p&&E.push(M.resourceLabel);if(E.length>0)return this._tryToSplitAndUndo(h,p,null,S.localize(4,null,p.label,E.join(", ")));const k=[];for(const M of b.editStacks)M.locked&&k.push(M.resourceLabel);return k.length>0?this._tryToSplitAndUndo(h,p,null,S.localize(5,null,p.label,k.join(", "))):b.isValid()?null:this._tryToSplitAndUndo(h,p,null,S.localize(6,null,p.label))}_workspaceUndo(h,p,b){const w=this._getAffectedEditStacks(p),E=this._checkWorkspaceUndo(h,p,w,!1);return E?E.returnValue:this._confirmAndExecuteWorkspaceUndo(h,p,w,b)}_isPartOfUndoGroup(h){if(!h.groupId)return!1;for(const[,p]of this._editStacks){const b=p.getClosestPastElement();if(b){if(b===h){const w=p.getSecondClosestPastElement();if(w&&w.groupId===h.groupId)return!0}if(b.groupId===h.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(h,p,b,w){return be(this,void 0,void 0,function*(){if(p.canSplit()&&!this._isPartOfUndoGroup(p)){let M;(function(T){T[T.All=0]="All",T[T.This=1]="This",T[T.Cancel=2]="Cancel"})(M||(M={}));const{result:R}=yield this._dialogService.prompt({type:D.default.Info,message:S.localize(7,null,p.label),buttons:[{label:S.localize(8,null,b.editStacks.length),run:()=>M.All},{label:S.localize(9,null),run:()=>M.This}],cancelButton:{run:()=>M.Cancel}});if(R===M.Cancel)return;if(R===M.This)return this._splitPastWorkspaceElement(p,null),this._undo(h,0,!0);const B=this._checkWorkspaceUndo(h,p,b,!1);if(B)return B.returnValue;w=!0}let E;try{E=yield this._invokeWorkspacePrepare(p)}catch(M){return this._onError(M,p)}const k=this._checkWorkspaceUndo(h,p,b,!0);if(k)return E.dispose(),k.returnValue;for(const M of b.editStacks)M.moveBackward(p);return this._safeInvokeWithLocks(p,()=>p.actual.undo(),b,E,()=>this._continueUndoInGroup(p.groupId,w))})}_resourceUndo(h,p,b){if(!p.isValid){h.flushAllElements();return}if(h.locked){const w=S.localize(10,null,p.label);this._notificationService.warn(w);return}return this._invokeResourcePrepare(p,w=>(h.moveBackward(p),this._safeInvokeWithLocks(p,()=>p.actual.undo(),new l([h]),w,()=>this._continueUndoInGroup(p.groupId,b))))}_findClosestUndoElementInGroup(h){if(!h)return[null,null];let p=null,b=null;for(const[w,E]of this._editStacks){const k=E.getClosestPastElement();k&&k.groupId===h&&(!p||k.groupOrder>p.groupOrder)&&(p=k,b=w)}return[p,b]}_continueUndoInGroup(h,p){if(!h)return;const[,b]=this._findClosestUndoElementInGroup(h);if(b)return this._undo(b,0,p)}undo(h){if(h instanceof C.UndoRedoSource){const[,p]=this._findClosestUndoElementWithSource(h.id);return p?this._undo(p,h.id,!1):void 0}return typeof h=="string"?this._undo(h,0,!1):this._undo(this.getUriComparisonKey(h),0,!1)}_undo(h,p=0,b){if(!this._editStacks.has(h))return;const w=this._editStacks.get(h),E=w.getClosestPastElement();if(!E)return;if(E.groupId){const[M,R]=this._findClosestUndoElementInGroup(E.groupId);if(E!==M&&R)return this._undo(R,p,b)}if((E.sourceId!==p||E.confirmBeforeUndo)&&!b)return this._confirmAndContinueUndo(h,p,E);try{return E.type===1?this._workspaceUndo(h,E,b):this._resourceUndo(w,E,b)}finally{s&&this._print("undo")}}_confirmAndContinueUndo(h,p,b){return be(this,void 0,void 0,function*(){if((yield this._dialogService.confirm({message:S.localize(11,null,b.label),primaryButton:S.localize(12,null),cancelButton:S.localize(13,null)})).confirmed)return this._undo(h,p,!0)})}_findClosestRedoElementWithSource(h){if(!h)return[null,null];let p=null,b=null;for(const[w,E]of this._editStacks){const k=E.getClosestFutureElement();k&&k.sourceId===h&&(!p||k.sourceOrder0)return this._tryToSplitAndRedo(h,p,null,S.localize(16,null,p.label,E.join(", ")));const k=[];for(const M of b.editStacks)M.locked&&k.push(M.resourceLabel);return k.length>0?this._tryToSplitAndRedo(h,p,null,S.localize(17,null,p.label,k.join(", "))):b.isValid()?null:this._tryToSplitAndRedo(h,p,null,S.localize(18,null,p.label))}_workspaceRedo(h,p){const b=this._getAffectedEditStacks(p),w=this._checkWorkspaceRedo(h,p,b,!1);return w?w.returnValue:this._executeWorkspaceRedo(h,p,b)}_executeWorkspaceRedo(h,p,b){return be(this,void 0,void 0,function*(){let w;try{w=yield this._invokeWorkspacePrepare(p)}catch(k){return this._onError(k,p)}const E=this._checkWorkspaceRedo(h,p,b,!0);if(E)return w.dispose(),E.returnValue;for(const k of b.editStacks)k.moveForward(p);return this._safeInvokeWithLocks(p,()=>p.actual.redo(),b,w,()=>this._continueRedoInGroup(p.groupId))})}_resourceRedo(h,p){if(!p.isValid){h.flushAllElements();return}if(h.locked){const b=S.localize(19,null,p.label);this._notificationService.warn(b);return}return this._invokeResourcePrepare(p,b=>(h.moveForward(p),this._safeInvokeWithLocks(p,()=>p.actual.redo(),new l([h]),b,()=>this._continueRedoInGroup(p.groupId))))}_findClosestRedoElementInGroup(h){if(!h)return[null,null];let p=null,b=null;for(const[w,E]of this._editStacks){const k=E.getClosestFutureElement();k&&k.groupId===h&&(!p||k.groupOrder"u")return typeof t=="string"?{id:(0,I.basename)(t)}:r?e.EXTENSION_DEVELOPMENT_EMPTY_WINDOW_WORKSPACE:e.UNKNOWN_EMPTY_WINDOW_WORKSPACE;const u=t;return u.configuration?{id:u.id,configPath:u.configuration}:u.folders.length===1?{id:u.id,uri:u.folders[0].uri}:{id:u.id}}e.toWorkspaceIdentifier=v;function C(t){const r=t;return typeof r?.id=="string"&&D.URI.isUri(r.configPath)}e.isWorkspaceIdentifier=C;class s{constructor(r,u,f,d,l){this._id=r,this._transient=f,this._configuration=d,this._ignorePathCasing=l,this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0),this.folders=u}get folders(){return this._folders}set folders(r){this._folders=r,this.updateFoldersMap()}get id(){return this._id}get transient(){return this._transient}get configuration(){return this._configuration}set configuration(r){this._configuration=r}getFolder(r){return r&&this._foldersMap.findSubstr(r)||null}updateFoldersMap(){this._foldersMap=y.TernarySearchTree.forUris(this._ignorePathCasing,()=>!0);for(const r of this.folders)this._foldersMap.set(r.uri,r)}toJSON(){return{id:this.id,folders:this.folders,transient:this.transient,configuration:this.configuration}}}e.Workspace=s;class i{constructor(r,u){this.raw=u,this.uri=r.uri,this.index=r.index,this.name=r.name}toJSON(){return{uri:this.uri,name:this.name,index:this.index}}}e.WorkspaceFolder=i,e.WORKSPACE_EXTENSION="code-workspace",e.WORKSPACE_FILTER=[{name:(0,L.localize)(0,null),extensions:[e.WORKSPACE_EXTENSION]}],e.STANDALONE_EDITOR_WORKSPACE_ID="4064f6ec-cb38-4ad0-af64-ee6467e63c82";function n(t){return t.id===e.STANDALONE_EDITOR_WORKSPACE_ID}e.isStandaloneEditorWorkspace=n}),define(te[909],ie([1,0,7,129,41,2,17,16,22,648,30,15,58,34,28,162]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.ContextMenuController=void 0;let f=u=class{static get(o){return o.getContribution(u.ID)}constructor(o,c,a,g,h,p,b,w){this._contextMenuService=c,this._contextViewService=a,this._contextKeyService=g,this._keybindingService=h,this._menuService=p,this._configurationService=b,this._workspaceContextService=w,this._toDispose=new D.DisposableStore,this._contextMenuIsBeingShownCount=0,this._editor=o,this._toDispose.add(this._editor.onContextMenu(E=>this._onContextMenu(E))),this._toDispose.add(this._editor.onMouseWheel(E=>{if(this._contextMenuIsBeingShownCount>0){const k=this._contextViewService.getContextViewElement(),M=E.srcElement;M.shadowRoot&&L.getShadowRoot(k)===M.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(E=>{this._editor.getOption(24)&&E.keyCode===58&&(E.preventDefault(),E.stopPropagation(),this.showContextMenu())}))}_onContextMenu(o){if(!this._editor.hasModel())return;if(!this._editor.getOption(24)){this._editor.focus(),o.target.position&&!this._editor.getSelection().containsPosition(o.target.position)&&this._editor.setPosition(o.target.position);return}if(o.target.type===12||o.target.type===6&&o.target.detail.injectedText)return;if(o.event.preventDefault(),o.event.stopPropagation(),o.target.type===11)return this._showScrollbarContextMenu(o.event);if(o.target.type!==6&&o.target.type!==7&&o.target.type!==1)return;if(this._editor.focus(),o.target.position){let a=!1;for(const g of this._editor.getSelections())if(g.containsPosition(o.target.position)){a=!0;break}a||this._editor.setPosition(o.target.position)}let c=null;o.target.type!==1&&(c=o.event),this.showContextMenu(c)}showContextMenu(o){if(!this._editor.getOption(24)||!this._editor.hasModel())return;const c=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?C.MenuId.SimpleEditorContext:C.MenuId.EditorContext);c.length>0&&this._doShowContextMenu(c,o)}_getMenuActions(o,c){const a=[],g=this._menuService.createMenu(c,this._contextKeyService),h=g.getActions({arg:o.uri});g.dispose();for(const p of h){const[,b]=p;let w=0;for(const E of b)if(E instanceof C.SubmenuItemAction){const k=this._getMenuActions(o,E.item.submenu);k.length>0&&(a.push(new y.SubmenuAction(E.id,E.label,k)),w++)}else a.push(E),w++;w&&a.push(new y.Separator)}return a.length&&a.pop(),a}_doShowContextMenu(o,c=null){if(!this._editor.hasModel())return;const a=this._editor.getOption(60);this._editor.updateOptions({hover:{enabled:!1}});let g=c;if(!g){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const p=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),b=L.getDomNodePagePosition(this._editor.getDomNode()),w=b.left+p.left,E=b.top+p.top+p.height;g={x:w,y:E}}const h=this._editor.getOption(126)&&!S.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:h?this._editor.getDomNode():void 0,getAnchor:()=>g,getActions:()=>o,getActionViewItem:p=>{const b=this._keybindingFor(p);if(b)return new I.ActionViewItem(p,p,{label:!0,keybinding:b.getLabel(),isMenu:!0});const w=p;return typeof w.getActionViewItem=="function"?w.getActionViewItem():new I.ActionViewItem(p,p,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:p=>this._keybindingFor(p),onHide:p=>{this._contextMenuIsBeingShownCount--,this._editor.updateOptions({hover:a})}})}_showScrollbarContextMenu(o){if(!this._editor.hasModel()||(0,r.isStandaloneEditorWorkspace)(this._workspaceContextService.getWorkspace()))return;const c=this._editor.getOption(72);let a=0;const g=E=>({id:`menu-action-${++a}`,label:E.label,tooltip:"",class:void 0,enabled:typeof E.enabled>"u"?!0:E.enabled,checked:E.checked,run:E.run}),h=(E,k)=>new y.SubmenuAction(`menu-action-${++a}`,E,k,void 0),p=(E,k,M,R,B)=>{if(!k)return g({label:E,enabled:k,run:()=>{}});const T=A=>()=>{this._configurationService.updateValue(M,A)},N=[];for(const A of B)N.push(g({label:A.label,checked:R===A.value,run:T(A.value)}));return h(E,N)},b=[];b.push(g({label:v.localize(0,null),checked:c.enabled,run:()=>{this._configurationService.updateValue("editor.minimap.enabled",!c.enabled)}})),b.push(new y.Separator),b.push(g({label:v.localize(1,null),enabled:c.enabled,checked:c.renderCharacters,run:()=>{this._configurationService.updateValue("editor.minimap.renderCharacters",!c.renderCharacters)}})),b.push(p(v.localize(2,null),c.enabled,"editor.minimap.size",c.size,[{label:v.localize(3,null),value:"proportional"},{label:v.localize(4,null),value:"fill"},{label:v.localize(5,null),value:"fit"}])),b.push(p(v.localize(6,null),c.enabled,"editor.minimap.showSlider",c.showSlider,[{label:v.localize(7,null),value:"mouseover"},{label:v.localize(8,null),value:"always"}]));const w=this._editor.getOption(126)&&!S.isIOS;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:w?this._editor.getDomNode():void 0,getAnchor:()=>o,getActions:()=>b,onHide:E=>{this._contextMenuIsBeingShownCount--,this._editor.focus()}})}_keybindingFor(o){return this._keybindingService.lookupKeybinding(o.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};e.ContextMenuController=f,f.ID="editor.contrib.contextmenu",e.ContextMenuController=f=u=Ie([ge(1,i.IContextMenuService),ge(2,i.IContextViewService),ge(3,s.IContextKeyService),ge(4,n.IKeybindingService),ge(5,C.IMenuService),ge(6,t.IConfigurationService),ge(7,r.IWorkspaceContextService)],f);class d extends m.EditorAction{constructor(){super({id:"editor.action.showContextMenu",label:v.localize(9,null),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:_.EditorContextKeys.textInputFocus,primary:1092,weight:100}})}run(o,c){var a;(a=f.get(c))===null||a===void 0||a.showContextMenu()}}(0,m.registerEditorContribution)(f.ID,f,2),(0,m.registerEditorAction)(d)}),define(te[380],ie([1,0,13,170,2,107,54,46,21,18,652,162]),function($,e,L,I,y,D,S,m,_,v,C,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DefaultPasteProvidersFeature=e.DefaultDropProvidersFeature=void 0;const i=(0,C.localize)(0,null);class n{provideDocumentPasteEdits(c,a,g,h){return be(this,void 0,void 0,function*(){const p=yield this.getEdit(g,h);return p?{insertText:p.insertText,label:p.label,detail:p.detail,handledMimeType:p.handledMimeType,yieldTo:p.yieldTo}:void 0})}provideDocumentOnDropEdits(c,a,g,h){return be(this,void 0,void 0,function*(){const p=yield this.getEdit(g,h);return p?{insertText:p.insertText,label:p.label,handledMimeType:p.handledMimeType,yieldTo:p.yieldTo}:void 0})}}class t extends n{constructor(){super(...arguments),this.id="text",this.dropMimeTypes=[D.Mimes.text],this.pasteMimeTypes=[D.Mimes.text]}getEdit(c,a){return be(this,void 0,void 0,function*(){const g=c.get(D.Mimes.text);if(!g||c.has(D.Mimes.uriList))return;const h=yield g.asString();return{handledMimeType:D.Mimes.text,label:(0,C.localize)(1,null),detail:i,insertText:h}})}}class r extends n{constructor(){super(...arguments),this.id="uri",this.dropMimeTypes=[D.Mimes.uriList],this.pasteMimeTypes=[D.Mimes.uriList]}getEdit(c,a){return be(this,void 0,void 0,function*(){const g=yield f(c);if(!g.length||a.isCancellationRequested)return;let h=0;const p=g.map(({uri:w,originalText:E})=>w.scheme===S.Schemas.file?w.fsPath:(h++,E)).join(" ");let b;return h>0?b=g.length>1?(0,C.localize)(2,null):(0,C.localize)(3,null):b=g.length>1?(0,C.localize)(4,null):(0,C.localize)(5,null),{handledMimeType:D.Mimes.uriList,insertText:p,label:b,detail:i}})}}let u=class extends n{constructor(c){super(),this._workspaceContextService=c,this.id="relativePath",this.dropMimeTypes=[D.Mimes.uriList],this.pasteMimeTypes=[D.Mimes.uriList]}getEdit(c,a){return be(this,void 0,void 0,function*(){const g=yield f(c);if(!g.length||a.isCancellationRequested)return;const h=(0,L.coalesce)(g.map(({uri:p})=>{const b=this._workspaceContextService.getWorkspaceFolder(p);return b?(0,m.relativePath)(b.uri,p):void 0}));if(h.length)return{handledMimeType:D.Mimes.uriList,insertText:h.join(" "),label:g.length>1?(0,C.localize)(6,null):(0,C.localize)(7,null),detail:i}})}};u=Ie([ge(0,s.IWorkspaceContextService)],u);function f(o){return be(this,void 0,void 0,function*(){const c=o.get(D.Mimes.uriList);if(!c)return[];const a=yield c.asString(),g=[];for(const h of I.UriList.parse(a))try{g.push({uri:_.URI.parse(h),originalText:h})}catch{}return g})}let d=class extends y.Disposable{constructor(c,a){super(),this._register(c.documentOnDropEditProvider.register("*",new t)),this._register(c.documentOnDropEditProvider.register("*",new r)),this._register(c.documentOnDropEditProvider.register("*",new u(a)))}};e.DefaultDropProvidersFeature=d,e.DefaultDropProvidersFeature=d=Ie([ge(0,v.ILanguageFeaturesService),ge(1,s.IWorkspaceContextService)],d);let l=class extends y.Disposable{constructor(c,a){super(),this._register(c.documentPasteEditProvider.register("*",new t)),this._register(c.documentPasteEditProvider.register("*",new r)),this._register(c.documentPasteEditProvider.register("*",new u(a)))}};e.DefaultPasteProvidersFeature=l,e.DefaultPasteProvidersFeature=l=Ie([ge(0,v.ILanguageFeaturesService),ge(1,s.IWorkspaceContextService)],l)}),define(te[910],ie([1,0,16,147,888,380,650]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(y.CopyPasteController.ID,y.CopyPasteController,0),(0,I.registerEditorFeature)(D.DefaultPasteProvidersFeature),(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:y.changePasteTypeCommandId,precondition:y.pasteWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(m,_,v){var C;return(C=y.CopyPasteController.get(_))===null||C===void 0?void 0:C.changePasteType()}}),(0,L.registerEditorAction)(class extends L.EditorAction{constructor(){super({id:"editor.action.pasteAs",label:S.localize(0,null),alias:"Paste As...",precondition:void 0,description:{description:"Paste as",args:[{name:"args",schema:{type:"object",properties:{id:{type:"string",description:S.localize(1,null)}}}}]}})}run(m,_,v){var C;const s=typeof v?.id=="string"?v.id:void 0;return(C=y.CopyPasteController.get(_))===null||C===void 0?void 0:C.pasteAs(s)}})}),define(te[911],ie([1,0,16,240,147,380,653,95,35,889]),function($,e,L,I,y,D,S,m,_,v){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(v.DropIntoEditorController.ID,v.DropIntoEditorController,2),(0,L.registerEditorCommand)(new class extends L.EditorCommand{constructor(){super({id:v.changeDropTypeCommandId,precondition:v.dropWidgetVisibleCtx,kbOpts:{weight:100,primary:2137}})}runEditorCommand(C,s,i){var n;(n=v.DropIntoEditorController.get(s))===null||n===void 0||n.changeDropType()}}),(0,y.registerEditorFeature)(D.DefaultDropProvidersFeature),_.Registry.as(m.Extensions.Configuration).registerConfiguration(Object.assign(Object.assign({},I.editorConfigurationBaseNode),{properties:{[v.defaultProviderConfig]:{type:"object",scope:5,description:S.localize(0,null),default:{},additionalProperties:{type:"string"}}}}))}),define(te[912],ie([1,0,574,92,46,10,169,32,127,699,162]),function($,e,L,I,y,D,S,m,_,v,C){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomBasedVariableResolver=e.WorkspaceBasedVariableResolver=e.TimeBasedVariableResolver=e.CommentBasedVariableResolver=e.ClipboardBasedVariableResolver=e.ModelBasedVariableResolver=e.SelectionBasedVariableResolver=e.CompositeSnippetVariableResolver=e.KnownSnippetVariableNames=void 0,e.KnownSnippetVariableNames=Object.freeze({CURRENT_YEAR:!0,CURRENT_YEAR_SHORT:!0,CURRENT_MONTH:!0,CURRENT_DATE:!0,CURRENT_HOUR:!0,CURRENT_MINUTE:!0,CURRENT_SECOND:!0,CURRENT_DAY_NAME:!0,CURRENT_DAY_NAME_SHORT:!0,CURRENT_MONTH_NAME:!0,CURRENT_MONTH_NAME_SHORT:!0,CURRENT_SECONDS_UNIX:!0,CURRENT_TIMEZONE_OFFSET:!0,SELECTION:!0,CLIPBOARD:!0,TM_SELECTED_TEXT:!0,TM_CURRENT_LINE:!0,TM_CURRENT_WORD:!0,TM_LINE_INDEX:!0,TM_LINE_NUMBER:!0,TM_FILENAME:!0,TM_FILENAME_BASE:!0,TM_DIRECTORY:!0,TM_FILEPATH:!0,CURSOR_INDEX:!0,CURSOR_NUMBER:!0,RELATIVE_FILEPATH:!0,BLOCK_COMMENT_START:!0,BLOCK_COMMENT_END:!0,LINE_COMMENT:!0,WORKSPACE_NAME:!0,WORKSPACE_FOLDER:!0,RANDOM:!0,RANDOM_HEX:!0,UUID:!0});class s{constructor(o){this._delegates=o}resolve(o){for(const c of this._delegates){const a=c.resolve(o);if(a!==void 0)return a}}}e.CompositeSnippetVariableResolver=s;class i{constructor(o,c,a,g){this._model=o,this._selection=c,this._selectionIdx=a,this._overtypingCapturer=g}resolve(o){const{name:c}=o;if(c==="SELECTION"||c==="TM_SELECTED_TEXT"){let a=this._model.getValueInRange(this._selection)||void 0,g=this._selection.startLineNumber!==this._selection.endLineNumber;if(!a&&this._overtypingCapturer){const h=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);h&&(a=h.value,g=h.multiline)}if(a&&g&&o.snippet){const h=this._model.getLineContent(this._selection.startLineNumber),p=(0,D.getLeadingWhitespace)(h,0,this._selection.startColumn-1);let b=p;o.snippet.walk(E=>E===o?!1:(E instanceof _.Text&&(b=(0,D.getLeadingWhitespace)((0,D.splitLines)(E.value).pop())),!0));const w=(0,D.commonPrefixLength)(b,p);a=a.replace(/(\r\n|\r|\n)(.*)/g,(E,k,M)=>`${k}${b.substr(w)}${M}`)}return a}else{if(c==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(c==="TM_CURRENT_WORD"){const a=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return a&&a.word||void 0}else{if(c==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(c==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber);if(c==="CURSOR_INDEX")return String(this._selectionIdx);if(c==="CURSOR_NUMBER")return String(this._selectionIdx+1)}}}}e.SelectionBasedVariableResolver=i;class n{constructor(o,c){this._labelService=o,this._model=c}resolve(o){const{name:c}=o;if(c==="TM_FILENAME")return I.basename(this._model.uri.fsPath);if(c==="TM_FILENAME_BASE"){const a=I.basename(this._model.uri.fsPath),g=a.lastIndexOf(".");return g<=0?a:a.slice(0,g)}else{if(c==="TM_DIRECTORY")return I.dirname(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel((0,y.dirname)(this._model.uri));if(c==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(c==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}e.ModelBasedVariableResolver=n;class t{constructor(o,c,a,g){this._readClipboardText=o,this._selectionIdx=c,this._selectionCount=a,this._spread=g}resolve(o){if(o.name!=="CLIPBOARD")return;const c=this._readClipboardText();if(c){if(this._spread){const a=c.split(/\r\n|\n|\r/).filter(g=>!(0,D.isFalsyOrWhitespace)(g));if(a.length===this._selectionCount)return a[this._selectionIdx]}return c}}}e.ClipboardBasedVariableResolver=t;let r=class{constructor(o,c,a){this._model=o,this._selection=c,this._languageConfigurationService=a}resolve(o){const{name:c}=o,a=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),g=this._languageConfigurationService.getLanguageConfiguration(a).comments;if(g){if(c==="LINE_COMMENT")return g.lineCommentToken||void 0;if(c==="BLOCK_COMMENT_START")return g.blockCommentStartToken||void 0;if(c==="BLOCK_COMMENT_END")return g.blockCommentEndToken||void 0}}};e.CommentBasedVariableResolver=r,e.CommentBasedVariableResolver=r=Ie([ge(2,m.ILanguageConfigurationService)],r);class u{constructor(){this._date=new Date}resolve(o){const{name:c}=o;if(c==="CURRENT_YEAR")return String(this._date.getFullYear());if(c==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(c==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(c==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(c==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(c==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(c==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(c==="CURRENT_DAY_NAME")return u.dayNames[this._date.getDay()];if(c==="CURRENT_DAY_NAME_SHORT")return u.dayNamesShort[this._date.getDay()];if(c==="CURRENT_MONTH_NAME")return u.monthNames[this._date.getMonth()];if(c==="CURRENT_MONTH_NAME_SHORT")return u.monthNamesShort[this._date.getMonth()];if(c==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3));if(c==="CURRENT_TIMEZONE_OFFSET"){const a=this._date.getTimezoneOffset(),g=a>0?"-":"+",h=Math.trunc(Math.abs(a/60)),p=h<10?"0"+h:h,b=Math.abs(a)-h*60,w=b<10?"0"+b:b;return g+p+":"+w}}}e.TimeBasedVariableResolver=u,u.dayNames=[v.localize(0,null),v.localize(1,null),v.localize(2,null),v.localize(3,null),v.localize(4,null),v.localize(5,null),v.localize(6,null)],u.dayNamesShort=[v.localize(7,null),v.localize(8,null),v.localize(9,null),v.localize(10,null),v.localize(11,null),v.localize(12,null),v.localize(13,null)],u.monthNames=[v.localize(14,null),v.localize(15,null),v.localize(16,null),v.localize(17,null),v.localize(18,null),v.localize(19,null),v.localize(20,null),v.localize(21,null),v.localize(22,null),v.localize(23,null),v.localize(24,null),v.localize(25,null)],u.monthNamesShort=[v.localize(26,null),v.localize(27,null),v.localize(28,null),v.localize(29,null),v.localize(30,null),v.localize(31,null),v.localize(32,null),v.localize(33,null),v.localize(34,null),v.localize(35,null),v.localize(36,null),v.localize(37,null)];class f{constructor(o){this._workspaceService=o}resolve(o){if(!this._workspaceService)return;const c=(0,C.toWorkspaceIdentifier)(this._workspaceService.getWorkspace());if(!(0,C.isEmptyWorkspaceIdentifier)(c)){if(o.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(c);if(o.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(c)}}_resolveWorkspaceName(o){if((0,C.isSingleFolderWorkspaceIdentifier)(o))return I.basename(o.uri.path);let c=I.basename(o.configPath.path);return c.endsWith(C.WORKSPACE_EXTENSION)&&(c=c.substr(0,c.length-C.WORKSPACE_EXTENSION.length-1)),c}_resoveWorkspacePath(o){if((0,C.isSingleFolderWorkspaceIdentifier)(o))return(0,L.normalizeDriveLetter)(o.uri.fsPath);const c=I.basename(o.configPath.path);let a=o.configPath.fsPath;return a.endsWith(c)&&(a=a.substr(0,a.length-c.length-1)),a?(0,L.normalizeDriveLetter)(a):"/"}}e.WorkspaceBasedVariableResolver=f;class d{resolve(o){const{name:c}=o;if(c==="RANDOM")return Math.random().toString().slice(-6);if(c==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(c==="UUID")return(0,S.generateUuid)()}}e.RandomBasedVariableResolver=d}),define(te[381],ie([1,0,13,2,10,71,5,24,32,37,158,162,127,912,464]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetSession=e.OneSnippet=void 0;class r{constructor(l,o,c){this._editor=l,this._snippet=o,this._snippetLineLeadingWhitespace=c,this._offset=-1,this._nestingLevel=1,this._placeholderGroups=(0,L.groupBy)(o.placeholders,i.Placeholder.compareByIndex),this._placeholderGroupsIdx=-1}initialize(l){this._offset=l.newPosition}dispose(){this._placeholderDecorations&&this._editor.removeDecorations([...this._placeholderDecorations.values()]),this._placeholderGroups.length=0}_initDecorations(){if(this._offset===-1)throw new Error("Snippet not initialized!");if(this._placeholderDecorations)return;this._placeholderDecorations=new Map;const l=this._editor.getModel();this._editor.changeDecorations(o=>{for(const c of this._snippet.placeholders){const a=this._snippet.offset(c),g=this._snippet.fullLen(c),h=S.Range.fromPositions(l.getPositionAt(this._offset+a),l.getPositionAt(this._offset+a+g)),p=c.isFinalTabstop?r._decor.inactiveFinal:r._decor.inactive,b=o.addDecoration(h,p);this._placeholderDecorations.set(c,b)}})}move(l){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){const a=[];for(const g of this._placeholderGroups[this._placeholderGroupsIdx])if(g.transform){const h=this._placeholderDecorations.get(g),p=this._editor.getModel().getDecorationRange(h),b=this._editor.getModel().getValueInRange(p),w=g.transform.resolve(b).split(/\r\n|\r|\n/);for(let E=1;E0&&this._editor.executeEdits("snippet.placeholderTransform",a)}let o=!1;l===!0&&this._placeholderGroupsIdx0&&(this._placeholderGroupsIdx-=1,o=!0);const c=this._editor.getModel().changeDecorations(a=>{const g=new Set,h=[];for(const p of this._placeholderGroups[this._placeholderGroupsIdx]){const b=this._placeholderDecorations.get(p),w=this._editor.getModel().getDecorationRange(b);h.push(new m.Selection(w.startLineNumber,w.startColumn,w.endLineNumber,w.endColumn)),o=o&&this._hasPlaceholderBeenCollapsed(p),a.changeDecorationOptions(b,p.isFinalTabstop?r._decor.activeFinal:r._decor.active),g.add(p);for(const E of this._snippet.enclosingPlaceholders(p)){const k=this._placeholderDecorations.get(E);a.changeDecorationOptions(k,E.isFinalTabstop?r._decor.activeFinal:r._decor.active),g.add(E)}}for(const[p,b]of this._placeholderDecorations)g.has(p)||a.changeDecorationOptions(b,p.isFinalTabstop?r._decor.inactiveFinal:r._decor.inactive);return h});return o?this.move(l):c??[]}_hasPlaceholderBeenCollapsed(l){let o=l;for(;o;){if(o instanceof i.Placeholder){const c=this._placeholderDecorations.get(o);if(this._editor.getModel().getDecorationRange(c).isEmpty()&&o.toString().length>0)return!0}o=o.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}get isTrivialSnippet(){if(this._snippet.placeholders.length===0)return!0;if(this._snippet.placeholders.length===1){const[l]=this._snippet.placeholders;if(l.isFinalTabstop&&this._snippet.rightMostDescendant===l)return!0}return!1}computePossibleSelections(){const l=new Map;for(const o of this._placeholderGroups){let c;for(const a of o){if(a.isFinalTabstop)break;c||(c=[],l.set(a.index,c));const g=this._placeholderDecorations.get(a),h=this._editor.getModel().getDecorationRange(g);if(!h){l.delete(a.index);break}c.push(h)}}return l}get activeChoice(){if(!this._placeholderDecorations)return;const l=this._placeholderGroups[this._placeholderGroupsIdx][0];if(!l?.choice)return;const o=this._placeholderDecorations.get(l);if(!o)return;const c=this._editor.getModel().getDecorationRange(o);if(c)return{range:c,choice:l.choice}}get hasChoice(){let l=!1;return this._snippet.walk(o=>(l=o instanceof i.Choice,!l)),l}merge(l){const o=this._editor.getModel();this._nestingLevel*=10,this._editor.changeDecorations(c=>{for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const g=l.shift();console.assert(g._offset!==-1),console.assert(!g._placeholderDecorations);const h=g._snippet.placeholderInfo.last.index;for(const b of g._snippet.placeholderInfo.all)b.isFinalTabstop?b.index=a.index+(h+1)/this._nestingLevel:b.index=a.index+b.index/this._nestingLevel;this._snippet.replace(a,g._snippet.children);const p=this._placeholderDecorations.get(a);c.removeDecoration(p),this._placeholderDecorations.delete(a);for(const b of g._snippet.placeholders){const w=g._snippet.offset(b),E=g._snippet.fullLen(b),k=S.Range.fromPositions(o.getPositionAt(g._offset+w),o.getPositionAt(g._offset+w+E)),M=c.addDecoration(k,r._decor.inactive);this._placeholderDecorations.set(b,M)}}this._placeholderGroups=(0,L.groupBy)(this._snippet.placeholders,i.Placeholder.compareByIndex)})}}e.OneSnippet=r,r._decor={active:v.ModelDecorationOptions.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:v.ModelDecorationOptions.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:v.ModelDecorationOptions.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:v.ModelDecorationOptions.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const u={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let f=t=class{static adjustWhitespace(l,o,c,a,g){const h=l.getLineContent(o.lineNumber),p=(0,y.getLeadingWhitespace)(h,0,o.column-1);let b;return a.walk(w=>{if(!(w instanceof i.Text)||w.parent instanceof i.Choice||g&&!g.has(w))return!0;const E=w.value.split(/\r\n|\r|\n/);if(c){const M=a.offset(w);if(M===0)E[0]=l.normalizeIndentation(E[0]);else{b=b??a.toString();const R=b.charCodeAt(M-1);(R===10||R===13)&&(E[0]=l.normalizeIndentation(p+E[0]))}for(let R=1;Rx.get(s.IWorkspaceContextService)),B=l.invokeWithinContext(x=>new n.ModelBasedVariableResolver(x.get(C.ILabelService),M)),T=()=>p,N=M.getValueInRange(t.adjustSelection(M,l.getSelection(),c,0)),A=M.getValueInRange(t.adjustSelection(M,l.getSelection(),0,a)),P=M.getLineFirstNonWhitespaceColumn(l.getSelection().positionLineNumber),O=l.getSelections().map((x,W)=>({selection:x,idx:W})).sort((x,W)=>S.Range.compareRangesUsingStarts(x.selection,W.selection));for(const{selection:x,idx:W}of O){let U=t.adjustSelection(M,x,c,0),F=t.adjustSelection(M,x,0,a);N!==M.getValueInRange(U)&&(U=x),A!==M.getValueInRange(F)&&(F=x);const G=x.setStartPosition(U.startLineNumber,U.startColumn).setEndPosition(F.endLineNumber,F.endColumn),Y=new i.SnippetParser().parse(o,!0,g),ne=G.getStartPosition(),se=t.adjustWhitespace(M,ne,h||W>0&&P!==M.getLineFirstNonWhitespaceColumn(x.positionLineNumber),Y);Y.resolveVariables(new n.CompositeSnippetVariableResolver([B,new n.ClipboardBasedVariableResolver(T,W,O.length,l.getOption(78)==="spread"),new n.SelectionBasedVariableResolver(M,x,W,b),new n.CommentBasedVariableResolver(M,x,w),new n.TimeBasedVariableResolver,new n.WorkspaceBasedVariableResolver(R),new n.RandomBasedVariableResolver])),E[W]=D.EditOperation.replace(G,Y.toString()),E[W].identifier={major:W,minor:0},E[W]._isTracked=!0,k[W]=new r(l,Y,se)}return{edits:E,snippets:k}}static createEditsAndSnippetsFromEdits(l,o,c,a,g,h,p){if(!l.hasModel()||o.length===0)return{edits:[],snippets:[]};const b=[],w=l.getModel(),E=new i.SnippetParser,k=new i.TextmateSnippet,M=new n.CompositeSnippetVariableResolver([l.invokeWithinContext(B=>new n.ModelBasedVariableResolver(B.get(C.ILabelService),w)),new n.ClipboardBasedVariableResolver(()=>g,0,l.getSelections().length,l.getOption(78)==="spread"),new n.SelectionBasedVariableResolver(w,l.getSelection(),0,h),new n.CommentBasedVariableResolver(w,l.getSelection(),p),new n.TimeBasedVariableResolver,new n.WorkspaceBasedVariableResolver(l.invokeWithinContext(B=>B.get(s.IWorkspaceContextService))),new n.RandomBasedVariableResolver]);o=o.sort((B,T)=>S.Range.compareRangesUsingStarts(B.range,T.range));let R=0;for(let B=0;B0){const W=o[B-1].range,U=S.Range.fromPositions(W.getEndPosition(),T.getStartPosition()),F=new i.Text(w.getValueInRange(U));k.appendChild(F),R+=F.value.length}const A=E.parseFragment(N,k);t.adjustWhitespace(w,T.getStartPosition(),!0,k,new Set(A)),k.resolveVariables(M);const P=k.toString(),O=P.slice(R);R=P.length;const x=D.EditOperation.replace(T,O);x.identifier={major:B,minor:0},x._isTracked=!0,b.push(x)}return E.ensureFinalTabstop(k,c,!0),{edits:b,snippets:[new r(l,k,"")]}}constructor(l,o,c=u,a){this._editor=l,this._template=o,this._options=c,this._languageConfigurationService=a,this._templateMerges=[],this._snippets=[]}dispose(){(0,I.dispose)(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:l,snippets:o}=typeof this._template=="string"?t.createEditsAndSnippetsFromSelections(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService):t.createEditsAndSnippetsFromEdits(this._editor,this._template,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer,this._languageConfigurationService);this._snippets=o,this._editor.executeEdits("snippet",l,c=>{const a=c.filter(g=>!!g.identifier);for(let g=0;gm.Selection.fromPositions(g.range.getEndPosition()))}),this._editor.revealRange(this._editor.getSelections()[0])}merge(l,o=u){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,l]);const{edits:c,snippets:a}=t.createEditsAndSnippetsFromSelections(this._editor,l,o.overwriteBefore,o.overwriteAfter,!0,o.adjustWhitespace,o.clipboardText,o.overtypingCapturer,this._languageConfigurationService);this._editor.executeEdits("snippet",c,g=>{const h=g.filter(b=>!!b.identifier);for(let b=0;bm.Selection.fromPositions(b.range.getEndPosition()))})}next(){const l=this._move(!0);this._editor.setSelections(l),this._editor.revealPositionInCenterIfOutsideViewport(l[0].getPosition())}prev(){const l=this._move(!1);this._editor.setSelections(l),this._editor.revealPositionInCenterIfOutsideViewport(l[0].getPosition())}_move(l){const o=[];for(const c of this._snippets){const a=c.move(l);o.push(...a)}return o}get isAtFirstPlaceholder(){return this._snippets[0].isAtFirstPlaceholder}get isAtLastPlaceholder(){return this._snippets[0].isAtLastPlaceholder}get hasPlaceholder(){return this._snippets[0].hasPlaceholder}get hasChoice(){return this._snippets[0].hasChoice}get activeChoice(){return this._snippets[0].activeChoice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const l=this._editor.getSelections();if(l.length{g.push(...a.get(h))})}l.sort(S.Range.compareRangesUsingStarts);for(const[c,a]of o){if(a.length!==l.length){o.delete(c);continue}a.sort(S.Range.compareRangesUsingStarts);for(let g=0;g0}};e.SnippetSession=f,e.SnippetSession=f=t=Ie([ge(3,_.ILanguageConfigurationService)],f)}),define(te[194],ie([1,0,2,20,16,12,22,32,18,133,698,15,66,381]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SnippetController2=void 0;const r={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let u=t=class{static get(l){return l.getContribution(t.ID)}constructor(l,o,c,a,g){this._editor=l,this._logService=o,this._languageFeaturesService=c,this._languageConfigurationService=g,this._snippetListener=new L.DisposableStore,this._modelVersionId=-1,this._inSnippet=t.InSnippetMode.bindTo(a),this._hasNextTabstop=t.HasNextTabstop.bindTo(a),this._hasPrevTabstop=t.HasPrevTabstop.bindTo(a)}dispose(){var l;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(l=this._session)===null||l===void 0||l.dispose(),this._snippetListener.dispose()}insert(l,o){try{this._doInsert(l,typeof o>"u"?r:Object.assign(Object.assign({},r),o))}catch(c){this.cancel(),this._logService.error(c),this._logService.error("snippet_error"),this._logService.error("insert_template=",l),this._logService.error("existing_template=",this._session?this._session._logInfo():"")}}_doInsert(l,o){var c;if(this._editor.hasModel()){if(this._snippetListener.clear(),o.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session&&typeof l!="string"&&this.cancel(),this._session?((0,I.assertType)(typeof l=="string"),this._session.merge(l,o)):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new n.SnippetSession(this._editor,l,o,this._languageConfigurationService),this._session.insert()),o.undoStopAfter&&this._editor.getModel().pushStackElement(),!((c=this._session)===null||c===void 0)&&c.hasChoice){const a={_debugDisplayName:"snippetChoiceCompletions",provideCompletionItems:(E,k)=>{if(!this._session||E!==this._editor.getModel()||!D.Position.equals(this._editor.getPosition(),k))return;const{activeChoice:M}=this._session;if(!M||M.choice.options.length===0)return;const R=E.getValueInRange(M.range),B=!!M.choice.options.find(N=>N.value===R),T=[];for(let N=0;N{h?.dispose(),p=!1},w=()=>{p||(h=this._languageFeaturesService.completionProvider.register({language:g.getLanguageId(),pattern:g.uri.fsPath,scheme:g.uri.scheme,exclusive:!0},a),this._snippetListener.add(h),p=!0)};this._choiceCompletions={provider:a,enable:w,disable:b}}this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(a=>a.isFlush&&this.cancel())),this._snippetListener.add(this._editor.onDidChangeModel(()=>this.cancel())),this._snippetListener.add(this._editor.onDidChangeCursorSelection(()=>this._updateState()))}}_updateState(){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._editor.getModel().pushStackElement(),this.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){var l;if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{activeChoice:o}=this._session;if(!o||!this._choiceCompletions){(l=this._choiceCompletions)===null||l===void 0||l.disable(),this._currentChoice=void 0;return}this._currentChoice!==o.choice&&(this._currentChoice=o.choice,this._choiceCompletions.enable(),queueMicrotask(()=>{(0,v.showSimpleSuggestions)(this._editor,this._choiceCompletions.provider)}))}finish(){for(;this._inSnippet.get();)this.next()}cancel(l=!1){var o;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),this._currentChoice=void 0,(o=this._session)===null||o===void 0||o.dispose(),this._session=void 0,this._modelVersionId=-1,l&&this._editor.setSelections([this._editor.getSelection()])}prev(){var l;(l=this._session)===null||l===void 0||l.prev(),this._updateState()}next(){var l;(l=this._session)===null||l===void 0||l.next(),this._updateState()}isInSnippet(){return!!this._inSnippet.get()}};e.SnippetController2=u,u.ID="snippetController2",u.InSnippetMode=new s.RawContextKey("inSnippetMode",!1,(0,C.localize)(0,null)),u.HasNextTabstop=new s.RawContextKey("hasNextTabstop",!1,(0,C.localize)(1,null)),u.HasPrevTabstop=new s.RawContextKey("hasPrevTabstop",!1,(0,C.localize)(2,null)),e.SnippetController2=u=t=Ie([ge(1,i.ILogService),ge(2,_.ILanguageFeaturesService),ge(3,s.IContextKeyService),ge(4,m.ILanguageConfigurationService)],u),(0,y.registerEditorContribution)(u.ID,u,4);const f=y.EditorCommand.bindToContribution(u.get);(0,y.registerEditorCommand)(new f({id:"jumpToNextSnippetPlaceholder",precondition:s.ContextKeyExpr.and(u.InSnippetMode,u.HasNextTabstop),handler:d=>d.next(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:2}})),(0,y.registerEditorCommand)(new f({id:"jumpToPrevSnippetPlaceholder",precondition:s.ContextKeyExpr.and(u.InSnippetMode,u.HasPrevTabstop),handler:d=>d.prev(),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:1026}})),(0,y.registerEditorCommand)(new f({id:"leaveSnippet",precondition:u.InSnippetMode,handler:d=>d.cancel(!0),kbOpts:{weight:100+30,kbExpr:S.EditorContextKeys.editorTextFocus,primary:9,secondary:[1033]}})),(0,y.registerEditorCommand)(new f({id:"acceptSnippet",precondition:u.InSnippetMode,handler:d=>d.finish()}))}),define(te[913],ie([1,0,68,9,2,40,20,71,12,5,29,32,215,780,150,194,25,8]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsModel=e.VersionIdChangeReason=void 0;var d;(function(o){o[o.Undo=0]="Undo",o[o.Redo=1]="Redo",o[o.AcceptWord=2]="AcceptWord",o[o.Other=3]="Other"})(d||(e.VersionIdChangeReason=d={}));let l=class extends y.Disposable{get isAcceptingPartially(){return this._isAcceptingPartially}constructor(c,a,g,h,p,b,w,E,k,M,R,B){super(),this.textModel=c,this.selectedSuggestItem=a,this.cursorPosition=g,this.textModelVersionId=h,this._debounceValue=p,this._suggestPreviewEnabled=b,this._suggestPreviewMode=w,this._inlineSuggestMode=E,this._enabled=k,this._instantiationService=M,this._commandService=R,this._languageConfigurationService=B,this._source=this._register(this._instantiationService.createInstance(n.InlineCompletionsSource,this.textModel,this.textModelVersionId,this._debounceValue)),this._isActive=(0,D.observableValue)(this,!1),this._forceUpdate=(0,D.observableSignal)("forceUpdate"),this._selectedInlineCompletionId=(0,D.observableValue)(this,void 0),this._isAcceptingPartially=!1,this._preserveCurrentCompletionReasons=new Set([d.Redo,d.Undo,d.AcceptWord]),this._fetchInlineCompletions=(0,D.derivedHandleChanges)({owner:this,createEmptyChangeSummary:()=>({preserveCurrentCompletion:!1,inlineCompletionTriggerKind:C.InlineCompletionTriggerKind.Automatic}),handleChange:(N,A)=>(N.didChange(this.textModelVersionId)&&this._preserveCurrentCompletionReasons.has(N.change)?A.preserveCurrentCompletion=!0:N.didChange(this._forceUpdate)&&(A.inlineCompletionTriggerKind=N.change),!0)},(N,A)=>{if(this._forceUpdate.read(N),!(this._enabled.read(N)&&this.selectedSuggestItem.read(N)||this._isActive.read(N))){this._source.cancelUpdate();return}this.textModelVersionId.read(N);const O=this.selectedInlineCompletion.get(),x=A.preserveCurrentCompletion||O?.forwardStable?O:void 0,W=this._source.suggestWidgetInlineCompletions.get(),U=this.selectedSuggestItem.read(N);if(W&&!U){const Y=this._source.inlineCompletions.get();(0,D.transaction)(ne=>{Y&&W.request.versionId>Y.request.versionId&&this._source.inlineCompletions.set(W.clone(),ne),this._source.clearSuggestWidgetInlineCompletions(ne)})}const F=this.cursorPosition.read(N),G={triggerKind:A.inlineCompletionTriggerKind,selectedSuggestionInfo:U?.toSelectedSuggestionInfo()};return this._source.fetch(F,G,x)}),this._filteredInlineCompletionItems=(0,D.derived)(this,N=>{const A=this._source.inlineCompletions.read(N);if(!A)return[];const P=this.cursorPosition.read(N);return A.inlineCompletions.filter(x=>x.isVisible(this.textModel,P,N))}),this.selectedInlineCompletionIndex=(0,D.derived)(this,N=>{const A=this._selectedInlineCompletionId.read(N),P=this._filteredInlineCompletionItems.read(N),O=this._selectedInlineCompletionId===void 0?-1:P.findIndex(x=>x.semanticId===A);return O===-1?(this._selectedInlineCompletionId.set(void 0,void 0),0):O}),this.selectedInlineCompletion=(0,D.derived)(this,N=>{const A=this._filteredInlineCompletionItems.read(N),P=this.selectedInlineCompletionIndex.read(N);return A[P]}),this.lastTriggerKind=this._source.inlineCompletions.map(N=>N?.request.context.triggerKind),this.inlineCompletionsCount=(0,D.derived)(this,N=>{if(this.lastTriggerKind.read(N)===C.InlineCompletionTriggerKind.Explicit)return this._filteredInlineCompletionItems.read(N).length}),this.state=(0,D.derivedOpts)({owner:this,equalityComparer:(N,A)=>!N||!A?N===A:(0,i.ghostTextOrReplacementEquals)(N.ghostText,A.ghostText)&&N.inlineCompletion===A.inlineCompletion&&N.suggestItem===A.suggestItem},N=>{var A;const P=this.textModel,O=this.selectedSuggestItem.read(N);if(O){const x=O.toSingleTextEdit().removeCommonPrefix(P),W=this._computeAugmentedCompletion(x,N);if(!this._suggestPreviewEnabled.read(N)&&!W)return;const F=(A=W?.edit)!==null&&A!==void 0?A:x,G=W?W.edit.text.length-x.text.length:0,Y=this._suggestPreviewMode.read(N),ne=this.cursorPosition.read(N),se=F.computeGhostText(P,Y,ne,G);return{ghostText:se??new i.GhostText(F.range.endLineNumber,[]),inlineCompletion:W?.completion,suggestItem:O}}else{if(!this._isActive.read(N))return;const x=this.selectedInlineCompletion.read(N);if(!x)return;const W=x.toSingleTextEdit(N),U=this._inlineSuggestMode.read(N),F=this.cursorPosition.read(N),G=W.computeGhostText(P,U,F);return G?{ghostText:G,inlineCompletion:x,suggestItem:void 0}:void 0}}),this.ghostText=(0,D.derivedOpts)({owner:this,equalityComparer:i.ghostTextOrReplacementEquals},N=>{const A=this.state.read(N);if(A)return A.ghostText}),this._register((0,D.recomputeInitiallyAndOnChange)(this._fetchInlineCompletions));let T;this._register((0,D.autorun)(N=>{var A,P;const O=this.state.read(N),x=O?.inlineCompletion;if(x?.semanticId!==T?.semanticId&&(T=x,x)){const W=x.inlineCompletion,U=W.source;(P=(A=U.provider).handleItemDidShow)===null||P===void 0||P.call(A,U.inlineCompletions,W.sourceInlineCompletion,W.insertText)}}))}trigger(c){return be(this,void 0,void 0,function*(){this._isActive.set(!0,c),yield this._fetchInlineCompletions.get()})}triggerExplicitly(c){return be(this,void 0,void 0,function*(){(0,D.subtransaction)(c,a=>{this._isActive.set(!0,a),this._forceUpdate.trigger(a,C.InlineCompletionTriggerKind.Explicit)}),yield this._fetchInlineCompletions.get()})}stop(c){(0,D.subtransaction)(c,a=>{this._isActive.set(!1,a),this._source.clear(a)})}_computeAugmentedCompletion(c,a){const g=this.textModel,h=this._source.suggestWidgetInlineCompletions.read(a),p=h?h.inlineCompletions:[this.selectedInlineCompletion.read(a)].filter(S.isDefined);return(0,L.mapFindFirst)(p,w=>{let E=w.toSingleTextEdit(a);return E=E.removeCommonPrefix(g,v.Range.fromPositions(E.range.getStartPosition(),c.range.getEndPosition())),E.augments(c)?{edit:E,completion:w}:void 0})}_deltaSelectedInlineCompletionIndex(c){return be(this,void 0,void 0,function*(){yield this.triggerExplicitly();const a=this._filteredInlineCompletionItems.get()||[];if(a.length>0){const g=(this.selectedInlineCompletionIndex.get()+c+a.length)%a.length;this._selectedInlineCompletionId.set(a[g].semanticId,void 0)}else this._selectedInlineCompletionId.set(void 0,void 0)})}next(){return be(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(1)})}previous(){return be(this,void 0,void 0,function*(){yield this._deltaSelectedInlineCompletionIndex(-1)})}accept(c){var a;return be(this,void 0,void 0,function*(){if(c.getModel()!==this.textModel)throw new I.BugIndicatingError;const g=this.state.get();if(!g||g.ghostText.isEmpty()||!g.inlineCompletion)return;const h=g.inlineCompletion.toInlineCompletion(void 0);c.pushUndoStop(),h.snippetInfo?(c.executeEdits("inlineSuggestion.accept",[m.EditOperation.replaceMove(h.range,""),...h.additionalTextEdits]),c.setPosition(h.snippetInfo.range.getStartPosition()),(a=r.SnippetController2.get(c))===null||a===void 0||a.insert(h.snippetInfo.snippet,{undoStopBefore:!1})):c.executeEdits("inlineSuggestion.accept",[m.EditOperation.replaceMove(h.range,h.insertText),...h.additionalTextEdits]),h.command&&h.source.addRef(),(0,D.transaction)(p=>{this._source.clear(p),this._isActive.set(!1,p)}),h.command&&(yield this._commandService.executeCommand(h.command.id,...h.command.arguments||[]).then(void 0,I.onUnexpectedExternalError),h.source.removeRef())})}acceptNextWord(c){return be(this,void 0,void 0,function*(){yield this._acceptNext(c,(a,g)=>{const h=this.textModel.getLanguageIdAtPosition(a.lineNumber,a.column),p=this._languageConfigurationService.getLanguageConfiguration(h),b=new RegExp(p.wordDefinition.source,p.wordDefinition.flags.replace("g","")),w=g.match(b);let E=0;w&&w.index!==void 0?w.index===0?E=w[0].length:E=w.index:E=g.length;const M=/\s+/g.exec(g);return M&&M.index!==void 0&&M.index+M[0].length{const h=g.match(/\n/);return h&&h.index!==void 0?h.index+1:g.length})})}_acceptNext(c,a){return be(this,void 0,void 0,function*(){if(c.getModel()!==this.textModel)throw new I.BugIndicatingError;const g=this.state.get();if(!g||g.ghostText.isEmpty()||!g.inlineCompletion)return;const h=g.ghostText,p=g.inlineCompletion.toInlineCompletion(void 0);if(p.snippetInfo||p.filterText!==p.insertText){yield this.accept(c);return}const b=h.parts[0],w=new _.Position(h.lineNumber,b.column),E=b.lines.join(` -`),k=a(w,E);if(k===E.length&&h.parts.length===1){this.accept(c);return}const M=E.substring(0,k);this._isAcceptingPartially=!0;try{c.pushUndoStop(),c.executeEdits("inlineSuggestion.accept",[m.EditOperation.replace(v.Range.fromPositions(w),M)]);const R=(0,t.lengthOfText)(M);c.setPosition((0,t.addPositions)(w,R))}finally{this._isAcceptingPartially=!1}if(p.source.provider.handlePartialAccept){const R=v.Range.fromPositions(p.range.getStartPosition(),(0,t.addPositions)(w,(0,t.lengthOfText)(M))),B=c.getModel().getValueInRange(R,1);p.source.provider.handlePartialAccept(p.source.inlineCompletions,p.sourceInlineCompletion,B.length)}})}handleSuggestAccepted(c){var a,g;const h=c.toSingleTextEdit().removeCommonPrefix(this.textModel),p=this._computeAugmentedCompletion(h,void 0);if(!p)return;const b=p.completion.inlineCompletion;(g=(a=b.source.provider).handlePartialAccept)===null||g===void 0||g.call(a,b.source.inlineCompletions,b.sourceInlineCompletion,h.text.length)}};e.InlineCompletionsModel=l,e.InlineCompletionsModel=l=Ie([ge(9,f.IInstantiationService),ge(10,u.ICommandService),ge(11,s.ILanguageConfigurationService)],l)}),define(te[914],ie([1,0,14,19,9,6,2,10,24,115,305,102,28,15,66,76,304,133,18,69,20,235,194,238]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g){"use strict";var h;Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestModel=e.LineContext=void 0;class p{static shouldAutoTrigger(M){if(!M.hasModel())return!1;const R=M.getModel(),B=M.getPosition();R.tokenization.tokenizeIfCheap(B.lineNumber);const T=R.getWordAtPosition(B);return!(!T||T.endColumn!==B.column&&T.startColumn+1!==B.column||!isNaN(Number(T.word)))}constructor(M,R,B){this.leadingLineContent=M.getLineContent(R.lineNumber).substr(0,R.column-1),this.leadingWord=M.getWordUntilPosition(R),this.lineNumber=R.lineNumber,this.column=R.column,this.triggerOptions=B}}e.LineContext=p;function b(k,M,R){if(!M.getContextKeyValue(c.InlineCompletionContextKeys.inlineSuggestionVisible.key))return!0;const B=M.getContextKeyValue(c.InlineCompletionContextKeys.suppressSuggestions.key);return B!==void 0?!B:!k.getOption(62).suppressSuggestions}function w(k,M,R){if(!M.getContextKeyValue("inlineSuggestionVisible"))return!0;const B=M.getContextKeyValue(c.InlineCompletionContextKeys.suppressSuggestions.key);return B!==void 0?!B:!k.getOption(62).suppressSuggestions}let E=h=class{constructor(M,R,B,T,N,A,P,O,x){this._editor=M,this._editorWorkerService=R,this._clipboardService=B,this._telemetryService=T,this._logService=N,this._contextKeyService=A,this._configurationService=P,this._languageFeaturesService=O,this._envService=x,this._toDispose=new S.DisposableStore,this._triggerCharacterListener=new S.DisposableStore,this._triggerQuickSuggest=new L.TimeoutTimer,this._triggerState=void 0,this._completionDisposables=new S.DisposableStore,this._onDidCancel=new D.Emitter,this._onDidTrigger=new D.Emitter,this._onDidSuggest=new D.Emitter,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new _.Selection(1,1,1,1),this._toDispose.add(this._editor.onDidChangeModel(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeModelLanguage(()=>{this._updateTriggerCharacters(),this.cancel()})),this._toDispose.add(this._editor.onDidChangeConfiguration(()=>{this._updateTriggerCharacters()})),this._toDispose.add(this._languageFeaturesService.completionProvider.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()}));let W=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{W=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{W=!1,this._onCompositionEnd()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(U=>{W||this._onCursorChange(U)})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{!W&&this._triggerState!==void 0&&this._refilterCompletionItems()})),this._updateTriggerCharacters()}dispose(){(0,S.dispose)(this._triggerCharacterListener),(0,S.dispose)([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(90)||!this._editor.hasModel()||!this._editor.getOption(120))return;const M=new Map;for(const B of this._languageFeaturesService.completionProvider.all(this._editor.getModel()))for(const T of B.triggerCharacters||[]){let N=M.get(T);N||(N=new Set,N.add((0,f.getSnippetSuggestSupport)()),M.set(T,N)),N.add(B)}const R=B=>{var T;if(!w(this._editor,this._contextKeyService,this._configurationService)||p.shouldAutoTrigger(this._editor))return;if(!B){const P=this._editor.getPosition();B=this._editor.getModel().getLineContent(P.lineNumber).substr(0,P.column-1)}let N="";(0,m.isLowSurrogate)(B.charCodeAt(B.length-1))?(0,m.isHighSurrogate)(B.charCodeAt(B.length-2))&&(N=B.substr(B.length-2)):N=B.charAt(B.length-1);const A=M.get(N);if(A){const P=new Map;if(this._completionModel)for(const[O,x]of this._completionModel.getItemsByProvider())A.has(O)||P.set(O,x);this.trigger({auto:!0,triggerKind:1,triggerCharacter:N,retrigger:!!this._completionModel,clipboardText:(T=this._completionModel)===null||T===void 0?void 0:T.clipboardText,completionOptions:{providerFilter:A,providerItemsToReuse:P}})}};this._triggerCharacterListener.add(this._editor.onDidType(R)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(()=>R()))}get state(){return this._triggerState?this._triggerState.auto?2:1:0}cancel(M=!1){var R;this._triggerState!==void 0&&(this._triggerQuickSuggest.cancel(),(R=this._requestToken)===null||R===void 0||R.cancel(),this._requestToken=void 0,this._triggerState=void 0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:M}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._triggerState!==void 0&&(!this._editor.hasModel()||!this._languageFeaturesService.completionProvider.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._triggerState.auto,retrigger:!0}))}_onCursorChange(M){if(!this._editor.hasModel())return;const R=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!M.selection.isEmpty()||M.reason!==0&&M.reason!==3||M.source!=="keyboard"&&M.source!=="deleteLeft"){this.cancel();return}this._triggerState===void 0&&M.reason===0?(R.containsRange(this._currentSelection)||R.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition()))&&this._doTriggerQuickSuggest():this._triggerState!==void 0&&M.reason===3&&this._refilterCompletionItems()}_onCompositionEnd(){this._triggerState===void 0?this._doTriggerQuickSuggest():this._refilterCompletionItems()}_doTriggerQuickSuggest(){var M;f.QuickSuggestionsOptions.isAllOff(this._editor.getOption(88))||this._editor.getOption(117).snippetsPreventQuickSuggestions&&(!((M=a.SnippetController2.get(this._editor))===null||M===void 0)&&M.isInSnippet())||(this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._triggerState!==void 0||!p.shouldAutoTrigger(this._editor)||!this._editor.hasModel()||!this._editor.hasWidgetFocus())return;const R=this._editor.getModel(),B=this._editor.getPosition(),T=this._editor.getOption(88);if(!f.QuickSuggestionsOptions.isAllOff(T)){if(!f.QuickSuggestionsOptions.isAllOn(T)){R.tokenization.tokenizeIfCheap(B.lineNumber);const N=R.tokenization.getLineTokens(B.lineNumber),A=N.getStandardTokenType(N.findTokenIndexAtOffset(Math.max(B.column-1-1,0)));if(f.QuickSuggestionsOptions.valueFor(T,A)!=="on")return}b(this._editor,this._contextKeyService,this._configurationService)&&this._languageFeaturesService.completionProvider.has(R)&&this.trigger({auto:!0})}},this._editor.getOption(89)))}_refilterCompletionItems(){(0,o.assertType)(this._editor.hasModel()),(0,o.assertType)(this._triggerState!==void 0);const M=this._editor.getModel(),R=this._editor.getPosition(),B=new p(M,R,Object.assign(Object.assign({},this._triggerState),{refilter:!0}));this._onNewContext(B)}trigger(M){var R,B,T,N,A,P;if(!this._editor.hasModel())return;const O=this._editor.getModel(),x=new p(O,this._editor.getPosition(),M);this.cancel(M.retrigger),this._triggerState=M,this._onDidTrigger.fire({auto:M.auto,shy:(R=M.shy)!==null&&R!==void 0?R:!1,position:this._editor.getPosition()}),this._context=x;let W={triggerKind:(B=M.triggerKind)!==null&&B!==void 0?B:0};M.triggerCharacter&&(W={triggerKind:1,triggerCharacter:M.triggerCharacter}),this._requestToken=new I.CancellationTokenSource;const U=this._editor.getOption(111);let F=1;switch(U){case"top":F=0;break;case"bottom":F=2;break}const{itemKind:G,showDeprecated:Y}=h._createSuggestFilter(this._editor),ne=new f.CompletionOptions(F,(N=(T=M.completionOptions)===null||T===void 0?void 0:T.kindFilter)!==null&&N!==void 0?N:G,(A=M.completionOptions)===null||A===void 0?void 0:A.providerFilter,(P=M.completionOptions)===null||P===void 0?void 0:P.providerItemsToReuse,Y),se=C.WordDistance.create(this._editorWorkerService,this._editor),J=(0,f.provideSuggestionItems)(this._languageFeaturesService.completionProvider,O,this._editor.getPosition(),ne,W,this._requestToken.token);Promise.all([J,se]).then(([q,H])=>be(this,void 0,void 0,function*(){var V;if((V=this._requestToken)===null||V===void 0||V.dispose(),!this._editor.hasModel())return;let Z=M?.clipboardText;if(!Z&&q.needsClipboard&&(Z=yield this._clipboardService.readText()),this._triggerState===void 0)return;const ee=this._editor.getModel(),le=new p(ee,this._editor.getPosition(),M),ue=Object.assign(Object.assign({},l.FuzzyScoreOptions.default),{firstMatchCanBeWeak:!this._editor.getOption(117).matchOnWordStartOnly});if(this._completionModel=new u.CompletionModel(q.items,this._context.column,{leadingLineContent:le.leadingLineContent,characterCountDelta:le.column-this._context.column},H,this._editor.getOption(117),this._editor.getOption(111),ue,Z),this._completionDisposables.add(q.disposable),this._onNewContext(le),this._reportDurationsTelemetry(q.durations),!this._envService.isBuilt||this._envService.isExtensionDevelopment)for(const de of q.items)de.isInvalid&&this._logService.warn(`[suggest] did IGNORE invalid completion item from ${de.provider._debugDisplayName}`,de.completion)})).catch(y.onUnexpectedError)}_reportDurationsTelemetry(M){this._telemetryGate++%230===0&&setTimeout(()=>{this._telemetryService.publicLog2("suggest.durations.json",{data:JSON.stringify(M)}),this._logService.debug("suggest.durations.json",M)})}static _createSuggestFilter(M){const R=new Set;M.getOption(111)==="none"&&R.add(27);const T=M.getOption(117);return T.showMethods||R.add(0),T.showFunctions||R.add(1),T.showConstructors||R.add(2),T.showFields||R.add(3),T.showVariables||R.add(4),T.showClasses||R.add(5),T.showStructs||R.add(6),T.showInterfaces||R.add(7),T.showModules||R.add(8),T.showProperties||R.add(9),T.showEvents||R.add(10),T.showOperators||R.add(11),T.showUnits||R.add(12),T.showValues||R.add(13),T.showConstants||R.add(14),T.showEnums||R.add(15),T.showEnumMembers||R.add(16),T.showKeywords||R.add(17),T.showWords||R.add(18),T.showColors||R.add(19),T.showFiles||R.add(20),T.showReferences||R.add(21),T.showColors||R.add(22),T.showFolders||R.add(23),T.showTypeParameters||R.add(24),T.showSnippets||R.add(27),T.showUsers||R.add(25),T.showIssues||R.add(26),{itemKind:R,showDeprecated:T.showDeprecated}}_onNewContext(M){if(this._context){if(M.lineNumber!==this._context.lineNumber){this.cancel();return}if((0,m.getLeadingWhitespace)(M.leadingLineContent)!==(0,m.getLeadingWhitespace)(this._context.leadingLineContent)){this.cancel();return}if(M.columnthis._context.leadingWord.startColumn){if(p.shouldAutoTrigger(this._editor)&&this._context){const B=this._completionModel.getItemsByProvider();this.trigger({auto:this._context.triggerOptions.auto,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerItemsToReuse:B}})}return}if(M.column>this._context.column&&this._completionModel.getIncompleteProvider().size>0&&M.leadingWord.word.length!==0){const R=new Map,B=new Set;for(const[T,N]of this._completionModel.getItemsByProvider())N.length>0&&N[0].container.incomplete?B.add(T):R.set(T,N);this.trigger({auto:this._context.triggerOptions.auto,triggerKind:2,retrigger:!0,clipboardText:this._completionModel.clipboardText,completionOptions:{providerFilter:B,providerItemsToReuse:R}})}else{const R=this._completionModel.lineContext;let B=!1;if(this._completionModel.lineContext={leadingLineContent:M.leadingLineContent,characterCountDelta:M.column-this._context.column},this._completionModel.items.length===0){const T=p.shouldAutoTrigger(this._editor);if(!this._context){this.cancel();return}if(T&&this._context.leadingWord.endColumn0,B&&M.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,triggerOptions:M.triggerOptions,isFrozen:B})}}}}};e.SuggestModel=E,e.SuggestModel=E=h=Ie([ge(1,v.IEditorWorkerService),ge(2,s.IClipboardService),ge(3,r.ITelemetryService),ge(4,t.ILogService),ge(5,n.IContextKeyService),ge(6,i.IConfigurationService),ge(7,d.ILanguageFeaturesService),ge(8,g.IEnvironmentService)],E)}),define(te[382],ie([1,0,45,13,14,19,9,6,118,2,17,59,20,120,16,71,12,5,22,194,127,351,756,702,25,15,8,66,133,755,551,914,552,895,76,46,141]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M,R,B,T,N,A,P){"use strict";var O;Object.defineProperty(e,"__esModule",{value:!0}),e.TriggerSuggestAction=e.SuggestController=void 0;const x=!1;class W{constructor(J,q){if(this._model=J,this._position=q,J.getLineMaxColumn(q.lineNumber)!==q.column){const V=J.getOffsetAt(q),Z=J.getPositionAt(V+1);this._marker=J.deltaDecorations([],[{range:f.Range.fromPositions(q,Z),options:{description:"suggest-line-suffix",stickiness:1}}])}}dispose(){this._marker&&!this._model.isDisposed()&&this._model.deltaDecorations(this._marker,[])}delta(J){if(this._model.isDisposed()||this._position.lineNumber!==J.lineNumber)return 0;if(this._marker){const q=this._model.getDecorationRange(this._marker[0]);return this._model.getOffsetAt(q.getStartPosition())-this._model.getOffsetAt(J)}else return this._model.getLineMaxColumn(J.lineNumber)-J.column}}let U=O=class{static get(J){return J.getContribution(O.ID)}constructor(J,q,H,V,Z,ee,le){this._memoryService=q,this._commandService=H,this._contextKeyService=V,this._instantiationService=Z,this._logService=ee,this._telemetryService=le,this._lineSuffix=new v.MutableDisposable,this._toDispose=new v.DisposableStore,this._selectors=new F(ae=>ae.priority),this._onWillInsertSuggestItem=new m.Emitter,this.onWillInsertSuggestItem=this._onWillInsertSuggestItem.event,this.editor=J,this.model=Z.createInstance(R.SuggestModel,this.editor),this._selectors.register({priority:0,select:(ae,X,K)=>this._memoryService.select(ae,X,K)});const ue=E.Context.InsertMode.bindTo(V);ue.set(J.getOption(117).insertMode),this._toDispose.add(this.model.onDidTrigger(()=>ue.set(J.getOption(117).insertMode))),this.widget=this._toDispose.add(new y.IdleValue(()=>{const ae=this._instantiationService.createInstance(T.SuggestWidget,this.editor);this._toDispose.add(ae),this._toDispose.add(ae.onDidSelect(j=>this._insertSuggestion(j,0),this));const X=new M.CommitCharacterController(this.editor,ae,this.model,j=>this._insertSuggestion(j,2));this._toDispose.add(X);const K=E.Context.MakesTextEdit.bindTo(this._contextKeyService),z=E.Context.HasInsertAndReplaceRange.bindTo(this._contextKeyService),Q=E.Context.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add((0,v.toDisposable)(()=>{K.reset(),z.reset(),Q.reset()})),this._toDispose.add(ae.onDidFocus(({item:j})=>{const re=this.editor.getPosition(),oe=j.editStart.column,he=re.column;let me=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!j.completion.additionalTextEdits&&!(j.completion.insertTextRules&4)&&he-oe===j.completion.insertText.length&&(me=this.editor.getModel().getValueInRange({startLineNumber:re.lineNumber,startColumn:oe,endLineNumber:re.lineNumber,endColumn:he})!==j.completion.insertText),K.set(me),z.set(!u.Position.equals(j.editInsertEnd,j.editReplaceEnd)),Q.set(!!j.provider.resolveCompletionItem||!!j.completion.documentation||j.completion.detail!==j.completion.label)})),this._toDispose.add(ae.onDetailsKeyDown(j=>{if(j.toKeyCodeChord().equals(new _.KeyCodeChord(!0,!1,!1,!1,33))||C.isMacintosh&&j.toKeyCodeChord().equals(new _.KeyCodeChord(!1,!1,!1,!0,33))){j.stopPropagation();return}j.toKeyCodeChord().isModifierKey()||this.editor.focus()})),ae})),this._overtypingCapturer=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new B.OvertypingCapturer(this.editor,this.model)))),this._alternatives=this._toDispose.add(new y.IdleValue(()=>this._toDispose.add(new k.SuggestAlternatives(this.editor,this._contextKeyService)))),this._toDispose.add(Z.createInstance(a.WordContextKey,J)),this._toDispose.add(this.model.onDidTrigger(ae=>{this.widget.value.showTriggered(ae.auto,ae.shy?250:50),this._lineSuffix.value=new W(this.editor.getModel(),ae.position)})),this._toDispose.add(this.model.onDidSuggest(ae=>{if(ae.triggerOptions.shy)return;let X=-1;for(const z of this._selectors.itemsOrderedByPriorityDesc)if(X=z.select(this.editor.getModel(),this.editor.getPosition(),ae.completionModel.items),X!==-1)break;X===-1&&(X=0);let K=!1;if(ae.triggerOptions.auto){const z=this.editor.getOption(117);z.selectionMode==="never"||z.selectionMode==="always"?K=z.selectionMode==="never":z.selectionMode==="whenTriggerCharacter"?K=ae.triggerOptions.triggerKind!==1:z.selectionMode==="whenQuickSuggestion"&&(K=ae.triggerOptions.triggerKind===1&&!ae.triggerOptions.refilter)}this.widget.value.showSuggestions(ae.completionModel,X,ae.isFrozen,ae.triggerOptions.auto,K)})),this._toDispose.add(this.model.onDidCancel(ae=>{ae.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{x||(this.model.cancel(),this.model.clear())}));const de=E.Context.AcceptSuggestionsOnEnter.bindTo(V),ce=()=>{const ae=this.editor.getOption(1);de.set(ae==="on"||ae==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>ce())),ce()}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose(),this._onWillInsertSuggestItem.dispose()}_insertSuggestion(J,q){if(!J||!J.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const H=l.SnippetController2.get(this.editor);if(!H)return;this._onWillInsertSuggestItem.fire({item:J.item});const V=this.editor.getModel(),Z=V.getAlternativeVersionId(),{item:ee}=J,le=[],ue=new D.CancellationTokenSource;q&1||this.editor.pushUndoStop();const de=this.getOverwriteInfo(ee,!!(q&8));this._memoryService.memorize(V,this.editor.getPosition(),ee);const ce=ee.isResolved;let ae=-1,X=-1;if(Array.isArray(ee.completion.additionalTextEdits)){this.model.cancel();const z=n.StableEditorScrollState.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",ee.completion.additionalTextEdits.map(Q=>r.EditOperation.replaceMove(f.Range.lift(Q.range),Q.text))),z.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!ce){const z=new s.StopWatch;let Q;const j=V.onDidChangeContent(me=>{if(me.isFlush){ue.cancel(),j.dispose();return}for(const pe of me.changes){const ve=f.Range.getEndPosition(pe.range);(!Q||u.Position.isBefore(ve,Q))&&(Q=ve)}}),re=q;q|=2;let oe=!1;const he=this.editor.onWillType(()=>{he.dispose(),oe=!0,re&2||this.editor.pushUndoStop()});le.push(ee.resolve(ue.token).then(()=>{if(!ee.completion.additionalTextEdits||ue.token.isCancellationRequested)return;if(Q&&ee.completion.additionalTextEdits.some(pe=>u.Position.isBefore(Q,f.Range.getStartPosition(pe.range))))return!1;oe&&this.editor.pushUndoStop();const me=n.StableEditorScrollState.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",ee.completion.additionalTextEdits.map(pe=>r.EditOperation.replaceMove(f.Range.lift(pe.range),pe.text))),me.restoreRelativeVerticalPositionOfCursor(this.editor),(oe||!(re&2))&&this.editor.pushUndoStop(),!0}).then(me=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",z.elapsed(),me),X=me===!0?1:me===!1?0:-2}).finally(()=>{j.dispose(),he.dispose()}))}let{insertText:K}=ee.completion;if(ee.completion.insertTextRules&4||(K=o.SnippetParser.escape(K)),this.model.cancel(),H.insert(K,{overwriteBefore:de.overwriteBefore,overwriteAfter:de.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(ee.completion.insertTextRules&1),clipboardText:J.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),q&2||this.editor.pushUndoStop(),ee.completion.command)if(ee.completion.command.id===G.id)this.model.trigger({auto:!0,retrigger:!0});else{const z=new s.StopWatch;le.push(this._commandService.executeCommand(ee.completion.command.id,...ee.completion.command.arguments?[...ee.completion.command.arguments]:[]).catch(Q=>{ee.completion.extensionId?(0,S.onUnexpectedExternalError)(Q):(0,S.onUnexpectedError)(Q)}).finally(()=>{ae=z.elapsed()}))}q&4&&this._alternatives.value.set(J,z=>{for(ue.cancel();V.canUndo();){Z!==V.getAlternativeVersionId()&&V.undo(),this._insertSuggestion(z,3|(q&8?8:0));break}}),this._alertCompletionItem(ee),Promise.all(le).finally(()=>{this._reportSuggestionAcceptedTelemetry(ee,V,ce,ae,X),this.model.clear(),ue.dispose()})}_reportSuggestionAcceptedTelemetry(J,q,H,V,Z){var ee,le,ue;Math.floor(Math.random()*100)!==0&&this._telemetryService.publicLog2("suggest.acceptedSuggestion",{extensionId:(le=(ee=J.extensionId)===null||ee===void 0?void 0:ee.value)!==null&&le!==void 0?le:"unknown",providerId:(ue=J.provider._debugDisplayName)!==null&&ue!==void 0?ue:"unknown",kind:J.completion.kind,basenameHash:(0,P.hash)((0,A.basename)(q.uri)).toString(16),languageId:q.getLanguageId(),fileExtension:(0,A.extname)(q.uri),resolveInfo:J.provider.resolveCompletionItem?H?1:0:-1,resolveDuration:J.resolveDuration,commandDuration:V,additionalEditsAsync:Z})}getOverwriteInfo(J,q){(0,i.assertType)(this.editor.hasModel());let H=this.editor.getOption(117).insertMode==="replace";q&&(H=!H);const V=J.position.column-J.editStart.column,Z=(H?J.editReplaceEnd.column:J.editInsertEnd.column)-J.position.column,ee=this.editor.getPosition().column-J.position.column,le=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:V+ee,overwriteAfter:Z+le}}_alertCompletionItem(J){if((0,I.isNonEmptyArray)(J.completion.additionalTextEdits)){const q=g.localize(0,null,J.textLabel,J.completion.additionalTextEdits.length);(0,L.alert)(q)}}triggerSuggest(J,q,H){this.editor.hasModel()&&(this.model.trigger({auto:q??!1,completionOptions:{providerFilter:J,kindFilter:H?new Set:void 0}}),this.editor.revealPosition(this.editor.getPosition(),0),this.editor.focus())}triggerSuggestAndAcceptBest(J){if(!this.editor.hasModel())return;const q=this.editor.getPosition(),H=()=>{q.equals(this.editor.getPosition())&&this._commandService.executeCommand(J.fallback)},V=Z=>{if(Z.completion.insertTextRules&4||Z.completion.additionalTextEdits)return!0;const ee=this.editor.getPosition(),le=Z.editStart.column,ue=ee.column;return ue-le!==Z.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:ee.lineNumber,startColumn:le,endLineNumber:ee.lineNumber,endColumn:ue})!==Z.completion.insertText};m.Event.once(this.model.onDidTrigger)(Z=>{const ee=[];m.Event.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{(0,v.dispose)(ee),H()},void 0,ee),this.model.onDidSuggest(({completionModel:le})=>{if((0,v.dispose)(ee),le.items.length===0){H();return}const ue=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),le.items),de=le.items[ue];if(!V(de)){H();return}this.editor.pushUndoStop(),this._insertSuggestion({index:ue,item:de,model:le},7)},void 0,ee)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealPosition(q,0),this.editor.focus()}acceptSelectedSuggestion(J,q){const H=this.widget.value.getFocusedItem();let V=0;J&&(V|=4),q&&(V|=8),this._insertSuggestion(H,V)}acceptNextSuggestion(){this._alternatives.value.next()}acceptPrevSuggestion(){this._alternatives.value.prev()}cancelSuggestWidget(){this.model.cancel(),this.model.clear(),this.widget.value.hideWidget()}focusSuggestion(){this.widget.value.focusSelected()}selectNextSuggestion(){this.widget.value.selectNext()}selectNextPageSuggestion(){this.widget.value.selectNextPage()}selectLastSuggestion(){this.widget.value.selectLast()}selectPrevSuggestion(){this.widget.value.selectPrevious()}selectPrevPageSuggestion(){this.widget.value.selectPreviousPage()}selectFirstSuggestion(){this.widget.value.selectFirst()}toggleSuggestionDetails(){this.widget.value.toggleDetails()}toggleExplainMode(){this.widget.value.toggleExplainMode()}toggleSuggestionFocus(){this.widget.value.toggleDetailsFocus()}resetWidgetSize(){this.widget.value.resetPersistedSize()}forceRenderingAbove(){this.widget.value.forceRenderingAbove()}stopForceRenderingAbove(){this.widget.isInitialized&&this.widget.value.stopForceRenderingAbove()}registerSelector(J){return this._selectors.register(J)}};e.SuggestController=U,U.ID="editor.contrib.suggestController",e.SuggestController=U=O=Ie([ge(1,c.ISuggestMemoryService),ge(2,h.ICommandService),ge(3,p.IContextKeyService),ge(4,b.IInstantiationService),ge(5,w.ILogService),ge(6,N.ITelemetryService)],U);class F{constructor(J){this.prioritySelector=J,this._items=new Array}register(J){if(this._items.indexOf(J)!==-1)throw new Error("Value is already registered");return this._items.push(J),this._items.sort((q,H)=>this.prioritySelector(H)-this.prioritySelector(q)),{dispose:()=>{const q=this._items.indexOf(J);q>=0&&this._items.splice(q,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class G extends t.EditorAction{constructor(){super({id:G.id,label:g.localize(1,null),alias:"Trigger Suggest",precondition:p.ContextKeyExpr.and(d.EditorContextKeys.writable,d.EditorContextKeys.hasCompletionItemProvider,E.Context.Visible.toNegated()),kbOpts:{kbExpr:d.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(J,q,H){const V=U.get(q);if(!V)return;let Z;H&&typeof H=="object"&&H.auto===!0&&(Z=!0),V.triggerSuggest(void 0,Z,void 0)}}e.TriggerSuggestAction=G,G.id="editor.action.triggerSuggest",(0,t.registerEditorContribution)(U.ID,U,2),(0,t.registerEditorAction)(G);const Y=100+90,ne=t.EditorCommand.bindToContribution(U.get);(0,t.registerEditorCommand)(new ne({id:"acceptSelectedSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion),handler(se){se.acceptSelectedSuggestion(!0,!1)},kbOpts:[{primary:2,kbExpr:p.ContextKeyExpr.and(E.Context.Visible,d.EditorContextKeys.textInputFocus),weight:Y},{primary:3,kbExpr:p.ContextKeyExpr.and(E.Context.Visible,d.EditorContextKeys.textInputFocus,E.Context.AcceptSuggestionsOnEnter,E.Context.MakesTextEdit),weight:Y}],menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,title:g.localize(2,null),group:"left",order:1,when:E.Context.HasInsertAndReplaceRange.toNegated()},{menuId:E.suggestWidgetStatusbarMenu,title:g.localize(3,null),group:"left",order:1,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert"))},{menuId:E.suggestWidgetStatusbarMenu,title:g.localize(4,null),group:"left",order:1,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace"))}]})),(0,t.registerEditorCommand)(new ne({id:"acceptAlternativeSelectedSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,d.EditorContextKeys.textInputFocus,E.Context.HasFocusedSuggestion),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:1027,secondary:[1026]},handler(se){se.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("insert")),title:g.localize(5,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"left",order:2,when:p.ContextKeyExpr.and(E.Context.HasInsertAndReplaceRange,E.Context.InsertMode.isEqualTo("replace")),title:g.localize(6,null)}]})),h.CommandsRegistry.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion"),(0,t.registerEditorCommand)(new ne({id:"hideSuggestWidget",precondition:E.Context.Visible,handler:se=>se.cancelSuggestWidget(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:9,secondary:[1033]}})),(0,t.registerEditorCommand)(new ne({id:"selectNextSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:se=>se.selectNextSuggestion(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}})),(0,t.registerEditorCommand)(new ne({id:"selectNextPageSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:se=>se.selectNextPageSuggestion(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:12,secondary:[2060]}})),(0,t.registerEditorCommand)(new ne({id:"selectLastSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:se=>se.selectLastSuggestion()})),(0,t.registerEditorCommand)(new ne({id:"selectPrevSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:se=>se.selectPrevSuggestion(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}})),(0,t.registerEditorCommand)(new ne({id:"selectPrevPageSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:se=>se.selectPrevPageSuggestion(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:11,secondary:[2059]}})),(0,t.registerEditorCommand)(new ne({id:"selectFirstSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,p.ContextKeyExpr.or(E.Context.MultipleSuggestions,E.Context.HasFocusedSuggestion.negate())),handler:se=>se.selectFirstSuggestion()})),(0,t.registerEditorCommand)(new ne({id:"focusSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion.negate()),handler:se=>se.focusSuggestion(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}}})),(0,t.registerEditorCommand)(new ne({id:"focusAndAcceptSuggestion",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion.negate()),handler:se=>{se.focusSuggestion(),se.acceptSelectedSuggestion(!0,!1)}})),(0,t.registerEditorCommand)(new ne({id:"toggleSuggestionDetails",precondition:p.ContextKeyExpr.and(E.Context.Visible,E.Context.HasFocusedSuggestion),handler:se=>se.toggleSuggestionDetails(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:p.ContextKeyExpr.and(E.Context.DetailsVisible,E.Context.CanResolve),title:g.localize(7,null)},{menuId:E.suggestWidgetStatusbarMenu,group:"right",order:1,when:p.ContextKeyExpr.and(E.Context.DetailsVisible.toNegated(),E.Context.CanResolve),title:g.localize(8,null)}]})),(0,t.registerEditorCommand)(new ne({id:"toggleExplainMode",precondition:E.Context.Visible,handler:se=>se.toggleExplainMode(),kbOpts:{weight:100,primary:2138}})),(0,t.registerEditorCommand)(new ne({id:"toggleSuggestionFocus",precondition:E.Context.Visible,handler:se=>se.toggleSuggestionFocus(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:2570,mac:{primary:778}}})),(0,t.registerEditorCommand)(new ne({id:"insertBestCompletion",precondition:p.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,p.ContextKeyExpr.equals("config.editor.tabCompletion","on"),a.WordContextKey.AtEnd,E.Context.Visible.toNegated(),k.SuggestAlternatives.OtherSuggestions.toNegated(),l.SnippetController2.InSnippetMode.toNegated()),handler:(se,J)=>{se.triggerSuggestAndAcceptBest((0,i.isObject)(J)?Object.assign({fallback:"tab"},J):{fallback:"tab"})},kbOpts:{weight:Y,primary:2}})),(0,t.registerEditorCommand)(new ne({id:"insertNextSuggestion",precondition:p.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,p.ContextKeyExpr.equals("config.editor.tabCompletion","on"),k.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),l.SnippetController2.InSnippetMode.toNegated()),handler:se=>se.acceptNextSuggestion(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:2}})),(0,t.registerEditorCommand)(new ne({id:"insertPrevSuggestion",precondition:p.ContextKeyExpr.and(d.EditorContextKeys.textInputFocus,p.ContextKeyExpr.equals("config.editor.tabCompletion","on"),k.SuggestAlternatives.OtherSuggestions,E.Context.Visible.toNegated(),l.SnippetController2.InSnippetMode.toNegated()),handler:se=>se.acceptPrevSuggestion(),kbOpts:{weight:Y,kbExpr:d.EditorContextKeys.textInputFocus,primary:1026}})),(0,t.registerEditorAction)(class extends t.EditorAction{constructor(){super({id:"editor.action.resetSuggestSize",label:g.localize(9,null),alias:"Reset Suggest Widget Size",precondition:void 0})}run(se,J){var q;(q=U.get(J))===null||q===void 0||q.resetWidgetSize()}})}),define(te[915],ie([1,0,6,2,12,5,29,127,381,382,40,300,13,68]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SuggestItemInfo=e.SuggestWidgetAdaptor=void 0;class t extends I.Disposable{get selectedItem(){return this._selectedItem}constructor(d,l,o,c){super(),this.editor=d,this.suggestControllerPreselector=l,this.checkModelVersion=o,this.onWillAccept=c,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this._selectedItem=(0,C.observableValue)(this,void 0),this._register(d.onKeyDown(g=>{g.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(d.onKeyUp(g=>{g.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const a=v.SuggestController.get(this.editor);if(a){this._register(a.registerSelector({priority:100,select:(p,b,w)=>{var E;(0,C.transaction)(N=>this.checkModelVersion(N));const k=this.editor.getModel();if(!k)return-1;const M=(E=this.suggestControllerPreselector())===null||E===void 0?void 0:E.removeCommonPrefix(k);if(!M)return-1;const R=y.Position.lift(b),B=w.map((N,A)=>{const O=r.fromSuggestion(a,k,R,N,this.isShiftKeyPressed).toSingleTextEdit().removeCommonPrefix(k),x=M.augments(O);return{index:A,valid:x,prefixLength:O.text.length,suggestItem:N}}).filter(N=>N&&N.valid&&N.prefixLength>0),T=(0,n.findFirstMaxBy)(B,(0,i.compareBy)(N=>N.prefixLength,i.numberComparator));return T?T.index:-1}}));let g=!1;const h=()=>{g||(g=!0,this._register(a.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(a.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.update(!1)})),this._register(a.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(L.Event.once(a.model.onDidTrigger)(p=>{h()})),this._register(a.onWillInsertSuggestItem(p=>{const b=this.editor.getPosition(),w=this.editor.getModel();if(!b||!w)return;const E=r.fromSuggestion(a,w,b,p.item,this.isShiftKeyPressed);this.onWillAccept(E)}))}this.update(this._isActive)}update(d){const l=this.getSuggestItemInfo();(this._isActive!==d||!u(this._currentSuggestItemInfo,l))&&(this._isActive=d,this._currentSuggestItemInfo=l,(0,C.transaction)(o=>{this.checkModelVersion(o),this._selectedItem.set(this._isActive?this._currentSuggestItemInfo:void 0,o)}))}getSuggestItemInfo(){const d=v.SuggestController.get(this.editor);if(!d||!this.isSuggestWidgetVisible)return;const l=d.widget.value.getFocusedItem(),o=this.editor.getPosition(),c=this.editor.getModel();if(!(!l||!o||!c))return r.fromSuggestion(d,c,o,l.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const d=v.SuggestController.get(this.editor);d?.stopForceRenderingAbove()}forceRenderingAbove(){const d=v.SuggestController.get(this.editor);d?.forceRenderingAbove()}}e.SuggestWidgetAdaptor=t;class r{static fromSuggestion(d,l,o,c,a){let{insertText:g}=c.completion,h=!1;if(c.completion.insertTextRules&4){const b=new m.SnippetParser().parse(g);b.children.length<100&&_.SnippetSession.adjustWhitespace(l,o,!0,b),g=b.toString(),h=!0}const p=d.getOverwriteInfo(c,a);return new r(D.Range.fromPositions(o.delta(0,-p.overwriteBefore),o.delta(0,Math.max(p.overwriteAfter,0))),g,c.completion.kind,h)}constructor(d,l,o,c){this.range=d,this.insertText=l,this.completionItemKind=o,this.isSnippetText=c}equals(d){return this.range.equalsRange(d.range)&&this.insertText===d.insertText&&this.completionItemKind===d.completionItemKind&&this.isSnippetText===d.isSnippetText}toSelectedSuggestionInfo(){return new S.SelectedSuggestionInfo(this.range,this.insertText,this.completionItemKind,this.isSnippetText)}toSingleTextEdit(){return new s.SingleTextEdit(this.range,this.insertText)}}e.SuggestItemInfo=r;function u(f,d){return f===d?!0:!f||!d?!1:f.equals(d)}}),define(te[256],ie([1,0,45,6,2,40,188,12,74,18,214,751,235,251,913,915,681,156,25,28,15,8,34]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a){"use strict";var g;Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsController=void 0;let h=g=class extends y.Disposable{static get(b){return b.getContribution(g.ID)}constructor(b,w,E,k,M,R,B,T,N){super(),this.editor=b,this.instantiationService=w,this.contextKeyService=E,this.configurationService=k,this.commandService=M,this.debounceService=R,this.languageFeaturesService=B,this.audioCueService=T,this._keybindingService=N,this.model=(0,D.disposableObservableValue)("inlineCompletionModel",void 0),this.textModelVersionId=(0,D.observableValue)(this,-1),this.cursorPosition=(0,D.observableValue)(this,new m.Position(1,1)),this.suggestWidgetAdaptor=this._register(new r.SuggestWidgetAdaptor(this.editor,()=>{var O,x;return(x=(O=this.model.get())===null||O===void 0?void 0:O.selectedInlineCompletion.get())===null||x===void 0?void 0:x.toSingleTextEdit(void 0)},O=>this.updateObservables(O,t.VersionIdChangeReason.Other),O=>{(0,D.transaction)(x=>{var W;this.updateObservables(x,t.VersionIdChangeReason.Other),(W=this.model.get())===null||W===void 0||W.handleSuggestAccepted(O)})})),this._enabled=(0,D.observableFromEvent)(this.editor.onDidChangeConfiguration,()=>this.editor.getOption(62).enabled),this.ghostTextWidget=this._register(this.instantiationService.createInstance(s.GhostTextWidget,this.editor,{ghostText:this.model.map((O,x)=>O?.ghostText.read(x)),minReservedLineCount:(0,D.constObservable)(0),targetTextModel:this.model.map(O=>O?.textModel)})),this._debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:50}),this._register(new i.InlineCompletionContextKeys(this.contextKeyService,this.model)),this._register(I.Event.runAndSubscribe(b.onDidChangeModel,()=>(0,D.transaction)(O=>{this.model.set(void 0,O),this.updateObservables(O,t.VersionIdChangeReason.Other);const x=b.getModel();if(x){const W=w.createInstance(t.InlineCompletionsModel,x,this.suggestWidgetAdaptor.selectedItem,this.cursorPosition,this.textModelVersionId,this._debounceValue,(0,D.observableFromEvent)(b.onDidChangeConfiguration,()=>b.getOption(117).preview),(0,D.observableFromEvent)(b.onDidChangeConfiguration,()=>b.getOption(117).previewMode),(0,D.observableFromEvent)(b.onDidChangeConfiguration,()=>b.getOption(62).mode),this._enabled);this.model.set(W,O)}})));const A=O=>{var x;return O.isUndoing?t.VersionIdChangeReason.Undo:O.isRedoing?t.VersionIdChangeReason.Redo:!((x=this.model.get())===null||x===void 0)&&x.isAcceptingPartially?t.VersionIdChangeReason.AcceptWord:t.VersionIdChangeReason.Other};this._register(b.onDidChangeModelContent(O=>(0,D.transaction)(x=>this.updateObservables(x,A(O))))),this._register(b.onDidChangeCursorPosition(O=>(0,D.transaction)(x=>{var W;this.updateObservables(x,t.VersionIdChangeReason.Other),(O.reason===3||O.source==="api")&&((W=this.model.get())===null||W===void 0||W.stop(x))}))),this._register(b.onDidType(()=>(0,D.transaction)(O=>{var x;this.updateObservables(O,t.VersionIdChangeReason.Other),this._enabled.get()&&((x=this.model.get())===null||x===void 0||x.trigger(O))}))),this._register(this.commandService.onDidExecuteCommand(O=>{new Set([S.CoreEditingCommands.Tab.id,S.CoreEditingCommands.DeleteLeft.id,S.CoreEditingCommands.DeleteRight.id,C.inlineSuggestCommitId,"acceptSelectedSuggestion"]).has(O.commandId)&&b.hasTextFocus()&&this._enabled.get()&&(0,D.transaction)(W=>{var U;(U=this.model.get())===null||U===void 0||U.trigger(W)})})),this._register(this.editor.onDidBlurEditorWidget(()=>{this.contextKeyService.getContextKeyValue("accessibleViewIsShown")||this.configurationService.getValue("editor.inlineSuggest.keepOnBlur")||b.getOption(62).keepOnBlur||n.InlineSuggestionHintsContentWidget.dropDownVisible||(0,D.transaction)(O=>{var x;(x=this.model.get())===null||x===void 0||x.stop(O)})})),this._register((0,D.autorun)(O=>{var x;const W=(x=this.model.read(O))===null||x===void 0?void 0:x.state.read(O);W?.suggestItem?W.ghostText.lineCount>=2&&this.suggestWidgetAdaptor.forceRenderingAbove():this.suggestWidgetAdaptor.stopForceRenderingAbove()})),this._register((0,y.toDisposable)(()=>{this.suggestWidgetAdaptor.stopForceRenderingAbove()}));let P;this._register((0,D.autorun)(O=>{const x=this.model.read(O),W=x?.state.read(O);if(!x||!W||!W.inlineCompletion){P=void 0;return}if(W.inlineCompletion.semanticId!==P){P=W.inlineCompletion.semanticId;const U=x.textModel.getLineContent(W.ghostText.lineNumber);this.audioCueService.playAudioCue(f.AudioCue.inlineSuggestion).then(()=>{this.editor.getOption(8)&&this.provideScreenReaderUpdate(W.ghostText.renderForScreenReader(U))})}})),this._register(new n.InlineCompletionsHintsWidget(this.editor,this.model,this.instantiationService)),this._register(this.configurationService.onDidChangeConfiguration(O=>{O.affectsConfiguration("accessibility.verbosity.inlineCompletions")&&this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})})),this.editor.updateOptions({inlineCompletionsAccessibilityVerbose:this.configurationService.getValue("accessibility.verbosity.inlineCompletions")})}provideScreenReaderUpdate(b){const w=this.contextKeyService.getContextKeyValue("accessibleViewIsShown"),E=this._keybindingService.lookupKeybinding("editor.action.accessibleView");let k;!w&&E&&this.editor.getOption(147)&&(k=(0,u.localize)(0,null,E.getAriaLabel())),k?(0,L.alert)(b+", "+k):(0,L.alert)(b)}updateObservables(b,w){var E,k;const M=this.editor.getModel();this.textModelVersionId.set((E=M?.getVersionId())!==null&&E!==void 0?E:-1,b,w),this.cursorPosition.set((k=this.editor.getPosition())!==null&&k!==void 0?k:new m.Position(1,1),b)}shouldShowHoverAt(b){var w;const E=(w=this.model.get())===null||w===void 0?void 0:w.ghostText.get();return E?E.parts.some(k=>b.containsPosition(new m.Position(E.lineNumber,k.column))):!1}shouldShowHoverAtViewZone(b){return this.ghostTextWidget.ownsViewZone(b)}};e.InlineCompletionsController=h,h.ID="editor.contrib.inlineCompletionsController",e.InlineCompletionsController=h=g=Ie([ge(1,c.IInstantiationService),ge(2,o.IContextKeyService),ge(3,l.IConfigurationService),ge(4,d.ICommandService),ge(5,_.ILanguageFeatureDebounceService),ge(6,v.ILanguageFeaturesService),ge(7,f.IAudioCueService),ge(8,a.IKeybindingService)],h)}),define(te[916],ie([1,0,40,16,22,214,235,256,133,678,30,28,15]),function($,e,L,I,y,D,S,m,_,v,C,s,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ToggleAlwaysShowInlineSuggestionToolbar=e.HideInlineCompletion=e.AcceptInlineCompletion=e.AcceptNextLineOfInlineCompletion=e.AcceptNextWordOfInlineCompletion=e.TriggerInlineSuggestionAction=e.ShowPreviousInlineSuggestionAction=e.ShowNextInlineSuggestionAction=void 0;class n extends I.EditorAction{constructor(){super({id:n.ID,label:v.localize(0,null),alias:"Show Next Inline Suggestion",precondition:i.ContextKeyExpr.and(y.EditorContextKeys.writable,S.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:606}})}run(a,g){var h;return be(this,void 0,void 0,function*(){const p=m.InlineCompletionsController.get(g);(h=p?.model.get())===null||h===void 0||h.next()})}}e.ShowNextInlineSuggestionAction=n,n.ID=D.showNextInlineSuggestionActionId;class t extends I.EditorAction{constructor(){super({id:t.ID,label:v.localize(1,null),alias:"Show Previous Inline Suggestion",precondition:i.ContextKeyExpr.and(y.EditorContextKeys.writable,S.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100,primary:604}})}run(a,g){var h;return be(this,void 0,void 0,function*(){const p=m.InlineCompletionsController.get(g);(h=p?.model.get())===null||h===void 0||h.previous()})}}e.ShowPreviousInlineSuggestionAction=t,t.ID=D.showPreviousInlineSuggestionActionId;class r extends I.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:v.localize(2,null),alias:"Trigger Inline Suggestion",precondition:y.EditorContextKeys.writable})}run(a,g){var h;return be(this,void 0,void 0,function*(){const p=m.InlineCompletionsController.get(g);(h=p?.model.get())===null||h===void 0||h.triggerExplicitly()})}}e.TriggerInlineSuggestionAction=r;class u extends I.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextWord",label:v.localize(3,null),alias:"Accept Next Word Of Inline Suggestion",precondition:i.ContextKeyExpr.and(y.EditorContextKeys.writable,S.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1,primary:2065,kbExpr:i.ContextKeyExpr.and(y.EditorContextKeys.writable,S.InlineCompletionContextKeys.inlineSuggestionVisible)},menuOpts:[{menuId:C.MenuId.InlineSuggestionToolbar,title:v.localize(4,null),group:"primary",order:2}]})}run(a,g){var h;return be(this,void 0,void 0,function*(){const p=m.InlineCompletionsController.get(g);yield(h=p?.model.get())===null||h===void 0?void 0:h.acceptNextWord(p.editor)})}}e.AcceptNextWordOfInlineCompletion=u;class f extends I.EditorAction{constructor(){super({id:"editor.action.inlineSuggest.acceptNextLine",label:v.localize(5,null),alias:"Accept Next Line Of Inline Suggestion",precondition:i.ContextKeyExpr.and(y.EditorContextKeys.writable,S.InlineCompletionContextKeys.inlineSuggestionVisible),kbOpts:{weight:100+1},menuOpts:[{menuId:C.MenuId.InlineSuggestionToolbar,title:v.localize(6,null),group:"secondary",order:2}]})}run(a,g){var h;return be(this,void 0,void 0,function*(){const p=m.InlineCompletionsController.get(g);yield(h=p?.model.get())===null||h===void 0?void 0:h.acceptNextLine(p.editor)})}}e.AcceptNextLineOfInlineCompletion=f;class d extends I.EditorAction{constructor(){super({id:D.inlineSuggestCommitId,label:v.localize(7,null),alias:"Accept Inline Suggestion",precondition:S.InlineCompletionContextKeys.inlineSuggestionVisible,menuOpts:[{menuId:C.MenuId.InlineSuggestionToolbar,title:v.localize(8,null),group:"primary",order:1}],kbOpts:{primary:2,weight:200,kbExpr:i.ContextKeyExpr.and(S.InlineCompletionContextKeys.inlineSuggestionVisible,y.EditorContextKeys.tabMovesFocus.toNegated(),S.InlineCompletionContextKeys.inlineSuggestionHasIndentationLessThanTabSize,_.Context.Visible.toNegated(),y.EditorContextKeys.hoverFocused.toNegated())}})}run(a,g){var h;return be(this,void 0,void 0,function*(){const p=m.InlineCompletionsController.get(g);p&&((h=p.model.get())===null||h===void 0||h.accept(p.editor),p.editor.focus())})}}e.AcceptInlineCompletion=d;class l extends I.EditorAction{constructor(){super({id:l.ID,label:v.localize(9,null),alias:"Hide Inline Suggestion",precondition:S.InlineCompletionContextKeys.inlineSuggestionVisible,kbOpts:{weight:100,primary:9}})}run(a,g){return be(this,void 0,void 0,function*(){const h=m.InlineCompletionsController.get(g);(0,L.transaction)(p=>{var b;(b=h?.model.get())===null||b===void 0||b.stop(p)})})}}e.HideInlineCompletion=l,l.ID="editor.action.inlineSuggest.hide";class o extends C.Action2{constructor(){super({id:o.ID,title:v.localize(10,null),f1:!1,precondition:void 0,menu:[{id:C.MenuId.InlineSuggestionToolbar,group:"secondary",order:10}],toggled:i.ContextKeyExpr.equals("config.editor.inlineSuggest.showToolbar","always")})}run(a,g){return be(this,void 0,void 0,function*(){const h=a.get(s.IConfigurationService),b=h.getValue("editor.inlineSuggest.showToolbar")==="always"?"onHover":"always";h.updateValue("editor.inlineSuggest.showToolbar",b)})}}e.ToggleAlwaysShowInlineSuggestionToolbar=o,o.ID="editor.action.inlineSuggest.toggleAlwaysShowToolbar"}),define(te[917],ie([1,0,7,57,2,40,5,42,99,256,251,116,679,88,8,55,76]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionsHoverParticipant=e.InlineCompletionsHover=void 0;class f{constructor(o,c,a){this.owner=o,this.range=c,this.controller=a}isValidForHoverAnchor(o){return o.type===1&&this.range.startColumn<=o.range.startColumn&&this.range.endColumn>=o.range.endColumn}}e.InlineCompletionsHover=f;let d=class{constructor(o,c,a,g,h,p){this._editor=o,this._languageService=c,this._openerService=a,this.accessibilityService=g,this._instantiationService=h,this._telemetryService=p,this.hoverOrdinal=4}suggestHoverAnchor(o){const c=v.InlineCompletionsController.get(this._editor);if(!c)return null;const a=o.target;if(a.type===8){const g=a.detail;if(c.shouldShowHoverAtViewZone(g.viewZoneId))return new _.HoverForeignElementAnchor(1e3,this,S.Range.fromPositions(this._editor.getModel().validatePosition(g.positionBefore||g.position)),o.event.posx,o.event.posy,!1)}return a.type===7&&c.shouldShowHoverAt(a.range)?new _.HoverForeignElementAnchor(1e3,this,a.range,o.event.posx,o.event.posy,!1):a.type===6&&a.detail.mightBeForeignElement&&c.shouldShowHoverAt(a.range)?new _.HoverForeignElementAnchor(1e3,this,a.range,o.event.posx,o.event.posy,!1):null}computeSync(o,c){if(this._editor.getOption(62).showToolbar==="always")return[];const a=v.InlineCompletionsController.get(this._editor);return a&&a.shouldShowHoverAt(o.range)?[new f(this,o.range,a)]:[]}renderHoverParts(o,c){const a=new y.DisposableStore,g=c[0];this._telemetryService.publicLog2("inlineCompletionHover.shown"),this.accessibilityService.isScreenReaderOptimized()&&!this._editor.getOption(8)&&this.renderScreenReaderText(o,g,a);const h=g.controller.model.get(),p=this._instantiationService.createInstance(C.InlineSuggestionHintsContentWidget,this._editor,!1,(0,D.constObservable)(null),h.selectedInlineCompletionIndex,h.inlineCompletionsCount,h.selectedInlineCompletion.map(b=>{var w;return(w=b?.inlineCompletion.source.inlineCompletions.commands)!==null&&w!==void 0?w:[]}));return o.fragment.appendChild(p.getDomNode()),h.triggerExplicitly(),a.add(p),a}renderScreenReaderText(o,c,a){const g=L.$,h=g("div.hover-row.markdown-hover"),p=L.append(h,g("div.hover-contents",{["aria-live"]:"assertive"})),b=a.add(new s.MarkdownRenderer({editor:this._editor},this._languageService,this._openerService)),w=E=>{a.add(b.onDidRenderAsync(()=>{p.className="hover-contents code-hover-contents",o.onContentsChanged()}));const k=i.localize(0,null),M=a.add(b.render(new I.MarkdownString().appendText(k).appendCodeblock("text",E)));p.replaceChildren(M.element)};a.add((0,D.autorun)(E=>{var k;const M=(k=c.controller.model.read(E))===null||k===void 0?void 0:k.ghostText.read(E);if(M){const R=this._editor.getModel().getLineContent(M.lineNumber);w(M.renderForScreenReader(R))}else L.reset(p)})),o.fragment.appendChild(h)}};e.InlineCompletionsHoverParticipant=d,e.InlineCompletionsHoverParticipant=d=Ie([ge(1,m.ILanguageService),ge(2,r.IOpenerService),ge(3,n.IAccessibilityService),ge(4,t.IInstantiationService),ge(5,u.ITelemetryService)],d)}),define(te[918],ie([1,0,16,99,916,917,256,30]),function($,e,L,I,y,D,S,m){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),(0,L.registerEditorContribution)(S.InlineCompletionsController.ID,S.InlineCompletionsController,3),(0,L.registerEditorAction)(y.TriggerInlineSuggestionAction),(0,L.registerEditorAction)(y.ShowNextInlineSuggestionAction),(0,L.registerEditorAction)(y.ShowPreviousInlineSuggestionAction),(0,L.registerEditorAction)(y.AcceptNextWordOfInlineCompletion),(0,L.registerEditorAction)(y.AcceptNextLineOfInlineCompletion),(0,L.registerEditorAction)(y.AcceptInlineCompletion),(0,L.registerEditorAction)(y.HideInlineCompletion),(0,m.registerAction2)(y.ToggleAlwaysShowInlineSuggestionToolbar),I.HoverParticipantRegistry.register(D.InlineCompletionsHoverParticipant)}),define(te[383],ie([1,0,8]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IWorkspaceTrustManagementService=void 0,e.IWorkspaceTrustManagementService=(0,L.createDecorator)("workspaceTrustManagementService")}),define(te[919],ie([1,0,14,26,57,2,17,10,16,39,37,289,115,42,329,99,247,833,710,28,8,55,67,77,383,469]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowExcludeOptions=e.DisableHighlightingOfNonBasicAsciiCharactersAction=e.DisableHighlightingOfInvisibleCharactersAction=e.DisableHighlightingOfAmbiguousCharactersAction=e.DisableHighlightingInStringsAction=e.DisableHighlightingInCommentsAction=e.UnicodeHighlighterHoverParticipant=e.UnicodeHighlighter=e.warningIcon=void 0,e.warningIcon=(0,g.registerIcon)("extensions-warning-message",I.Codicon.warning,d.localize(0,null));let p=class extends D.Disposable{constructor(se,J,q,H){super(),this._editor=se,this._editorWorkerService=J,this._workspaceTrustService=q,this._highlighter=null,this._bannerClosed=!1,this._updateState=V=>{if(V&&V.hasMore){if(this._bannerClosed)return;const Z=Math.max(V.ambiguousCharacterCount,V.nonBasicAsciiCharacterCount,V.invisibleCharacterCount);let ee;if(V.nonBasicAsciiCharacterCount>=Z)ee={message:d.localize(1,null),command:new W};else if(V.ambiguousCharacterCount>=Z)ee={message:d.localize(2,null),command:new O};else if(V.invisibleCharacterCount>=Z)ee={message:d.localize(3,null),command:new x};else throw new Error("Unreachable");this._bannerController.show({id:"unicodeHighlightBanner",message:ee.message,icon:e.warningIcon,actions:[{label:ee.command.shortLabel,href:`command:${ee.command.id}`}],onClose:()=>{this._bannerClosed=!0}})}else this._bannerController.hide()},this._bannerController=this._register(H.createInstance(f.BannerController,se)),this._register(this._editor.onDidChangeModel(()=>{this._bannerClosed=!1,this._updateHighlighter()})),this._options=se.getOption(124),this._register(q.onDidChangeTrust(V=>{this._updateHighlighter()})),this._register(se.onDidChangeConfiguration(V=>{V.hasChanged(124)&&(this._options=se.getOption(124),this._updateHighlighter())})),this._updateHighlighter()}dispose(){this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),super.dispose()}_updateHighlighter(){if(this._updateState(null),this._highlighter&&(this._highlighter.dispose(),this._highlighter=null),!this._editor.hasModel())return;const se=b(this._workspaceTrustService.isWorkspaceTrusted(),this._options);if([se.nonBasicASCII,se.ambiguousCharacters,se.invisibleCharacters].every(q=>q===!1))return;const J={nonBasicASCII:se.nonBasicASCII,ambiguousCharacters:se.ambiguousCharacters,invisibleCharacters:se.invisibleCharacters,includeComments:se.includeComments,includeStrings:se.includeStrings,allowedCodePoints:Object.keys(se.allowedCharacters).map(q=>q.codePointAt(0)),allowedLocales:Object.keys(se.allowedLocales).map(q=>q==="_os"?new Intl.NumberFormat().resolvedOptions().locale:q==="_vscode"?S.language:q)};this._editorWorkerService.canComputeUnicodeHighlights(this._editor.getModel().uri)?this._highlighter=new w(this._editor,J,this._updateState,this._editorWorkerService):this._highlighter=new E(this._editor,J,this._updateState)}getDecorationInfo(se){return this._highlighter?this._highlighter.getDecorationInfo(se):null}};e.UnicodeHighlighter=p,p.ID="editor.contrib.unicodeHighlighter",e.UnicodeHighlighter=p=Ie([ge(1,i.IEditorWorkerService),ge(2,h.IWorkspaceTrustManagementService),ge(3,o.IInstantiationService)],p);function b(ne,se){return{nonBasicASCII:se.nonBasicASCII===v.inUntrustedWorkspace?!ne:se.nonBasicASCII,ambiguousCharacters:se.ambiguousCharacters,invisibleCharacters:se.invisibleCharacters,includeComments:se.includeComments===v.inUntrustedWorkspace?!ne:se.includeComments,includeStrings:se.includeStrings===v.inUntrustedWorkspace?!ne:se.includeStrings,allowedCharacters:se.allowedCharacters,allowedLocales:se.allowedLocales}}let w=class extends D.Disposable{constructor(se,J,q,H){super(),this._editor=se,this._options=J,this._updateState=q,this._editorWorkerService=H,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new L.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const se=this._model.getVersionId();this._editorWorkerService.computedUnicodeHighlights(this._model.uri,this._options).then(J=>{if(this._model.isDisposed()||this._model.getVersionId()!==se)return;this._updateState(J);const q=[];if(!J.hasMore)for(const H of J.ranges)q.push({range:H,options:N.instance.getDecorationFromOptions(this._options)});this._decorations.set(q)})}getDecorationInfo(se){if(!this._decorations.has(se))return null;const J=this._editor.getModel();if(!(0,t.isModelDecorationVisible)(J,se))return null;const q=J.getValueInRange(se.range);return{reason:T(q,this._options),inComment:(0,t.isModelDecorationInComment)(J,se),inString:(0,t.isModelDecorationInString)(J,se)}}};w=Ie([ge(3,i.IEditorWorkerService)],w);class E extends D.Disposable{constructor(se,J,q){super(),this._editor=se,this._options=J,this._updateState=q,this._model=this._editor.getModel(),this._decorations=this._editor.createDecorationsCollection(),this._updateSoon=this._register(new L.RunOnceScheduler(()=>this._update(),250)),this._register(this._editor.onDidLayoutChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidScrollChange(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeHiddenAreas(()=>{this._updateSoon.schedule()})),this._register(this._editor.onDidChangeModelContent(()=>{this._updateSoon.schedule()})),this._updateSoon.schedule()}dispose(){this._decorations.clear(),super.dispose()}_update(){if(this._model.isDisposed())return;if(!this._model.mightContainNonBasicASCII()){this._decorations.clear();return}const se=this._editor.getVisibleRanges(),J=[],q={ranges:[],ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0,hasMore:!1};for(const H of se){const V=s.UnicodeTextModelHighlighter.computeUnicodeHighlights(this._model,this._options,H);for(const Z of V.ranges)q.ranges.push(Z);q.ambiguousCharacterCount+=q.ambiguousCharacterCount,q.invisibleCharacterCount+=q.invisibleCharacterCount,q.nonBasicAsciiCharacterCount+=q.nonBasicAsciiCharacterCount,q.hasMore=q.hasMore||V.hasMore}if(!q.hasMore)for(const H of q.ranges)J.push({range:H,options:N.instance.getDecorationFromOptions(this._options)});this._updateState(q),this._decorations.set(J)}getDecorationInfo(se){if(!this._decorations.has(se))return null;const J=this._editor.getModel(),q=J.getValueInRange(se.range);return(0,t.isModelDecorationVisible)(J,se)?{reason:T(q,this._options),inComment:(0,t.isModelDecorationInComment)(J,se),inString:(0,t.isModelDecorationInString)(J,se)}:null}}let k=class{constructor(se,J,q){this._editor=se,this._languageService=J,this._openerService=q,this.hoverOrdinal=5}computeSync(se,J){if(!this._editor.hasModel()||se.type!==1)return[];const q=this._editor.getModel(),H=this._editor.getContribution(p.ID);if(!H)return[];const V=[],Z=new Set;let ee=300;for(const le of J){const ue=H.getDecorationInfo(le);if(!ue)continue;const ce=q.getValueInRange(le.range).codePointAt(0),ae=R(ce);let X;switch(ue.reason.kind){case 0:{(0,m.isBasicASCII)(ue.reason.confusableWith)?X=d.localize(4,null,ae,R(ue.reason.confusableWith.codePointAt(0))):X=d.localize(5,null,ae,R(ue.reason.confusableWith.codePointAt(0)));break}case 1:X=d.localize(6,null,ae);break;case 2:X=d.localize(7,null,ae);break}if(Z.has(X))continue;Z.add(X);const K={codePoint:ce,reason:ue.reason,inComment:ue.inComment,inString:ue.inString},z=d.localize(8,null),Q=`command:${U.ID}?${encodeURIComponent(JSON.stringify(K))}`,j=new y.MarkdownString("",!0).appendMarkdown(X).appendText(" ").appendLink(Q,z);V.push(new u.MarkdownHover(this,le.range,[j],!1,ee++))}return V}renderHoverParts(se,J){return(0,u.renderMarkdownHovers)(se,J,this._editor,this._languageService,this._openerService)}};e.UnicodeHighlighterHoverParticipant=k,e.UnicodeHighlighterHoverParticipant=k=Ie([ge(1,n.ILanguageService),ge(2,c.IOpenerService)],k);function M(ne){return`U+${ne.toString(16).padStart(4,"0")}`}function R(ne){let se=`\`${M(ne)}\``;return m.InvisibleCharacters.isInvisibleCharacter(ne)||(se+=` "${`${B(ne)}`}"`),se}function B(ne){return ne===96?"`` ` ``":"`"+String.fromCodePoint(ne)+"`"}function T(ne,se){return s.UnicodeTextModelHighlighter.computeUnicodeHighlightReason(ne,se)}class N{constructor(){this.map=new Map}getDecorationFromOptions(se){return this.getDecoration(!se.includeComments,!se.includeStrings)}getDecoration(se,J){const q=`${se}${J}`;let H=this.map.get(q);return H||(H=C.ModelDecorationOptions.createDynamic({description:"unicode-highlight",stickiness:1,className:"unicode-highlight",showIfCollapsed:!0,overviewRuler:null,minimap:null,hideInCommentTokens:se,hideInStringTokens:J}),this.map.set(q,H)),H}}N.instance=new N;class A extends _.EditorAction{constructor(){super({id:O.ID,label:d.localize(10,null),alias:"Disable highlighting of characters in comments",precondition:void 0}),this.shortLabel=d.localize(9,null)}run(se,J,q){return be(this,void 0,void 0,function*(){const H=se?.get(l.IConfigurationService);H&&this.runAction(H)})}runAction(se){return be(this,void 0,void 0,function*(){yield se.updateValue(v.unicodeHighlightConfigKeys.includeComments,!1,2)})}}e.DisableHighlightingInCommentsAction=A;class P extends _.EditorAction{constructor(){super({id:O.ID,label:d.localize(12,null),alias:"Disable highlighting of characters in strings",precondition:void 0}),this.shortLabel=d.localize(11,null)}run(se,J,q){return be(this,void 0,void 0,function*(){const H=se?.get(l.IConfigurationService);H&&this.runAction(H)})}runAction(se){return be(this,void 0,void 0,function*(){yield se.updateValue(v.unicodeHighlightConfigKeys.includeStrings,!1,2)})}}e.DisableHighlightingInStringsAction=P;class O extends _.EditorAction{constructor(){super({id:O.ID,label:d.localize(14,null),alias:"Disable highlighting of ambiguous characters",precondition:void 0}),this.shortLabel=d.localize(13,null)}run(se,J,q){return be(this,void 0,void 0,function*(){const H=se?.get(l.IConfigurationService);H&&this.runAction(H)})}runAction(se){return be(this,void 0,void 0,function*(){yield se.updateValue(v.unicodeHighlightConfigKeys.ambiguousCharacters,!1,2)})}}e.DisableHighlightingOfAmbiguousCharactersAction=O,O.ID="editor.action.unicodeHighlight.disableHighlightingOfAmbiguousCharacters";class x extends _.EditorAction{constructor(){super({id:x.ID,label:d.localize(16,null),alias:"Disable highlighting of invisible characters",precondition:void 0}),this.shortLabel=d.localize(15,null)}run(se,J,q){return be(this,void 0,void 0,function*(){const H=se?.get(l.IConfigurationService);H&&this.runAction(H)})}runAction(se){return be(this,void 0,void 0,function*(){yield se.updateValue(v.unicodeHighlightConfigKeys.invisibleCharacters,!1,2)})}}e.DisableHighlightingOfInvisibleCharactersAction=x,x.ID="editor.action.unicodeHighlight.disableHighlightingOfInvisibleCharacters";class W extends _.EditorAction{constructor(){super({id:W.ID,label:d.localize(18,null),alias:"Disable highlighting of non basic ASCII characters",precondition:void 0}),this.shortLabel=d.localize(17,null)}run(se,J,q){return be(this,void 0,void 0,function*(){const H=se?.get(l.IConfigurationService);H&&this.runAction(H)})}runAction(se){return be(this,void 0,void 0,function*(){yield se.updateValue(v.unicodeHighlightConfigKeys.nonBasicASCII,!1,2)})}}e.DisableHighlightingOfNonBasicAsciiCharactersAction=W,W.ID="editor.action.unicodeHighlight.disableHighlightingOfNonBasicAsciiCharacters";class U extends _.EditorAction{constructor(){super({id:U.ID,label:d.localize(19,null),alias:"Show Exclude Options",precondition:void 0})}run(se,J,q){return be(this,void 0,void 0,function*(){const{codePoint:H,reason:V,inString:Z,inComment:ee}=q,le=String.fromCodePoint(H),ue=se.get(a.IQuickInputService),de=se.get(l.IConfigurationService);function ce(K){return m.InvisibleCharacters.isInvisibleCharacter(K)?d.localize(20,null,M(K)):d.localize(21,null,`${M(K)} "${le}"`)}const ae=[];if(V.kind===0)for(const K of V.notAmbiguousInLocales)ae.push({label:d.localize(22,null,K),run:()=>be(this,void 0,void 0,function*(){G(de,[K])})});if(ae.push({label:ce(H),run:()=>F(de,[H])}),ee){const K=new A;ae.push({label:K.label,run:()=>be(this,void 0,void 0,function*(){return K.runAction(de)})})}else if(Z){const K=new P;ae.push({label:K.label,run:()=>be(this,void 0,void 0,function*(){return K.runAction(de)})})}if(V.kind===0){const K=new O;ae.push({label:K.label,run:()=>be(this,void 0,void 0,function*(){return K.runAction(de)})})}else if(V.kind===1){const K=new x;ae.push({label:K.label,run:()=>be(this,void 0,void 0,function*(){return K.runAction(de)})})}else if(V.kind===2){const K=new W;ae.push({label:K.label,run:()=>be(this,void 0,void 0,function*(){return K.runAction(de)})})}else Y(V);const X=yield ue.pick(ae,{title:d.localize(23,null)});X&&(yield X.run())})}}e.ShowExcludeOptions=U,U.ID="editor.action.unicodeHighlight.showExcludeOptions";function F(ne,se){return be(this,void 0,void 0,function*(){const J=ne.getValue(v.unicodeHighlightConfigKeys.allowedCharacters);let q;typeof J=="object"&&J?q=J:q={};for(const H of se)q[String.fromCodePoint(H)]=!0;yield ne.updateValue(v.unicodeHighlightConfigKeys.allowedCharacters,q,2)})}function G(ne,se){var J;return be(this,void 0,void 0,function*(){const q=(J=ne.inspect(v.unicodeHighlightConfigKeys.allowedLocales).user)===null||J===void 0?void 0:J.value;let H;typeof q=="object"&&q?H=Object.assign({},q):H={};for(const V of se)H[V]=!0;yield ne.updateValue(v.unicodeHighlightConfigKeys.allowedLocales,H,2)})}function Y(ne){throw new Error(`Unexpected value: ${ne}`)}(0,_.registerEditorAction)(O),(0,_.registerEditorAction)(x),(0,_.registerEditorAction)(W),(0,_.registerEditorAction)(U),(0,_.registerEditorContribution)(p.ID,p,1),r.HoverParticipantRegistry.register(k)}),define(te[920],ie([1,0,188,192,874,795,875,796,797,798,877,879,902,886,799,909,800,880,910,911,369,253,803,804,770,918,254,255,375,373,376,806,904,887,807,808,890,891,809,896,832,857,858,859,811,194,906,382,812,813,784,919,814,897,357,815,810,93,171]),function($,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),define(te[257],ie([1,0,10,7,44,6,118,2,17,98,21,130,240,71,12,5,50,65,185,25,28,349,15,157,8,761,34,340,117,341,762,158,48,85,76,162,132,93,46,33,66,383,58,764,779,866,47,769,115,241,42,852,233,871,868,364,131,763,88,30,790,765,102,758,232,759,186,190,94,768,55,67,89,783,156,766,147,9,238,32,363,342,908,74,853,749]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M,R,B,T,N,A,P,O,x,W,U,F,G,Y,ne,se,J,q,H,V,Z,ee,le,ue,de,ce,ae,X,K,z,Q,j,re,oe,he,me,pe,ve,we,Le,Ee,Ae,Re,Be,ye,De,fe,Ce,Me){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StandaloneServices=e.updateConfigurationService=e.StandaloneConfigurationService=e.StandaloneKeybindingService=e.StandaloneCommandService=e.StandaloneNotificationService=void 0;class Pe{constructor(Ne){this.disposed=!1,this.model=Ne,this._onWillDispose=new D.Emitter}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}let Se=class{constructor(Ne){this.modelService=Ne}createModelReference(Ne){const xe=this.modelService.getModel(Ne);return xe?Promise.resolve(new m.ImmortalReference(new Pe(xe))):Promise.reject(new Error("Model not found"))}};Se=Ie([ge(0,u.IModelService)],Se);class _e{show(){return _e.NULL_PROGRESS_RUNNER}showWhile(Ne,xe){return be(this,void 0,void 0,function*(){yield Ne})}}_e.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class ke{withProgress(Ne,xe,ze){return xe({report:()=>{}})}}class Oe{constructor(){this.isExtensionDevelopment=!1,this.isBuilt=!1}}class We{confirm(Ne){return be(this,void 0,void 0,function*(){return{confirmed:this.doConfirm(Ne.message,Ne.detail),checkboxChecked:!1}})}doConfirm(Ne,xe){let ze=Ne;return xe&&(ze=ze+` - -`+xe),window.confirm(ze)}prompt(Ne){var xe,ze;return be(this,void 0,void 0,function*(){let Ke;if(this.doConfirm(Ne.message,Ne.detail)){const Qe=[...(xe=Ne.buttons)!==null&&xe!==void 0?xe:[]];Ne.cancelButton&&typeof Ne.cancelButton!="string"&&typeof Ne.cancelButton!="boolean"&&Qe.push(Ne.cancelButton),Ke=yield(ze=Qe[0])===null||ze===void 0?void 0:ze.run({checkboxChecked:!1})}return{result:Ke}})}error(Ne,xe){return be(this,void 0,void 0,function*(){yield this.prompt({type:v.default.Error,message:Ne,detail:xe})})}}class qe{info(Ne){return this.notify({severity:v.default.Info,message:Ne})}warn(Ne){return this.notify({severity:v.default.Warning,message:Ne})}error(Ne){return this.notify({severity:v.default.Error,message:Ne})}notify(Ne){switch(Ne.severity){case v.default.Error:console.error(Ne.message);break;case v.default.Warning:console.warn(Ne.message);break;default:console.log(Ne.message);break}return qe.NO_OP}prompt(Ne,xe,ze,Ke){return qe.NO_OP}status(Ne,xe){return m.Disposable.None}}e.StandaloneNotificationService=qe,qe.NO_OP=new B.NoOpNotification;let Ge=class{constructor(Ne){this._onWillExecuteCommand=new D.Emitter,this._onDidExecuteCommand=new D.Emitter,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=Ne}executeCommand(Ne,...xe){const ze=l.CommandsRegistry.getCommand(Ne);if(!ze)return Promise.reject(new Error(`command '${Ne}' not found`));try{this._onWillExecuteCommand.fire({commandId:Ne,args:xe});const Ke=this._instantiationService.invokeFunction.apply(this._instantiationService,[ze.handler,...xe]);return this._onDidExecuteCommand.fire({commandId:Ne,args:xe}),Promise.resolve(Ke)}catch(Ke){return Promise.reject(Ke)}}};e.StandaloneCommandService=Ge,e.StandaloneCommandService=Ge=Ie([ge(0,h.IInstantiationService)],Ge);let je=class extends p.AbstractKeybindingService{constructor(Ne,xe,ze,Ke,Xe,Qe){super(Ne,xe,ze,Ke,Xe),this._cachedResolver=null,this._dynamicKeybindings=[],this._domNodeListeners=[];const rt=lt=>{const wt=new m.DisposableStore;wt.add(I.addDisposableListener(lt,I.EventType.KEY_DOWN,Dt=>{const Lt=new y.StandardKeyboardEvent(Dt);this._dispatch(Lt,Lt.target)&&(Lt.preventDefault(),Lt.stopPropagation())})),wt.add(I.addDisposableListener(lt,I.EventType.KEY_UP,Dt=>{const Lt=new y.StandardKeyboardEvent(Dt);this._singleModifierDispatch(Lt,Lt.target)&&Lt.preventDefault()})),this._domNodeListeners.push(new it(lt,wt))},Je=lt=>{for(let wt=0;wt{lt.getOption(61)||rt(lt.getContainerDomNode())},tt=lt=>{lt.getOption(61)||Je(lt.getContainerDomNode())};this._register(Qe.onCodeEditorAdd(et)),this._register(Qe.onCodeEditorRemove(tt)),Qe.listCodeEditors().forEach(et);const ct=lt=>{rt(lt.getContainerDomNode())},St=lt=>{Je(lt.getContainerDomNode())};this._register(Qe.onDiffEditorAdd(ct)),this._register(Qe.onDiffEditorRemove(St)),Qe.listDiffEditors().forEach(ct)}addDynamicKeybinding(Ne,xe,ze,Ke){return(0,m.combinedDisposable)(l.CommandsRegistry.registerCommand(Ne,ze),this.addDynamicKeybindings([{keybinding:xe,command:Ne,when:Ke}]))}addDynamicKeybindings(Ne){const xe=Ne.map(ze=>{var Ke;return{keybinding:(0,S.decodeKeybinding)(ze.keybinding,_.OS),command:(Ke=ze.command)!==null&&Ke!==void 0?Ke:null,commandArgs:ze.commandArgs,when:ze.when,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}});return this._dynamicKeybindings=this._dynamicKeybindings.concat(xe),this.updateResolver(),(0,m.toDisposable)(()=>{for(let ze=0;zethis._log(ze))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(Ne,xe){const ze=[];let Ke=0;for(const Xe of Ne){const Qe=Xe.when||void 0,rt=Xe.keybinding;if(!rt)ze[Ke++]=new k.ResolvedKeybindingItem(void 0,Xe.command,Xe.commandArgs,Qe,xe,null,!1);else{const Je=M.USLayoutResolvedKeybinding.resolveKeybinding(rt,_.OS);for(const et of Je)ze[Ke++]=new k.ResolvedKeybindingItem(et,Xe.command,Xe.commandArgs,Qe,xe,null,!1)}}return ze}resolveKeyboardEvent(Ne){const xe=new S.KeyCodeChord(Ne.ctrlKey,Ne.shiftKey,Ne.altKey,Ne.metaKey,Ne.keyCode);return new M.USLayoutResolvedKeybinding([xe],_.OS)}};e.StandaloneKeybindingService=je,e.StandaloneKeybindingService=je=Ie([ge(0,a.IContextKeyService),ge(1,l.ICommandService),ge(2,N.ITelemetryService),ge(3,B.INotificationService),ge(4,U.ILogService),ge(5,W.ICodeEditorService)],je);class it extends m.Disposable{constructor(Ne,xe){super(),this.domNode=Ne,this._register(xe)}}function Ze(Ue){return Ue&&typeof Ue=="object"&&(!Ue.overrideIdentifier||typeof Ue.overrideIdentifier=="string")&&(!Ue.resource||Ue.resource instanceof C.URI)}class dt{constructor(){this._onDidChangeConfiguration=new D.Emitter,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event;const Ne=new Be.DefaultConfiguration;this._configuration=new c.Configuration(Ne.reload(),new c.ConfigurationModel,new c.ConfigurationModel,new c.ConfigurationModel),Ne.dispose()}getValue(Ne,xe){const ze=typeof Ne=="string"?Ne:void 0,Ke=Ze(Ne)?Ne:Ze(xe)?xe:{};return this._configuration.getValue(ze,Ke,void 0)}updateValues(Ne){const xe={data:this._configuration.toData()},ze=[];for(const Ke of Ne){const[Xe,Qe]=Ke;this.getValue(Xe)!==Qe&&(this._configuration.updateValue(Xe,Qe),ze.push(Xe))}if(ze.length>0){const Ke=new c.ConfigurationChangeEvent({keys:ze,overrides:[]},xe,this._configuration);Ke.source=8,Ke.sourceConfig=null,this._onDidChangeConfiguration.fire(Ke)}return Promise.resolve()}updateValue(Ne,xe,ze,Ke){return this.updateValues([[Ne,xe]])}inspect(Ne,xe={}){return this._configuration.inspect(Ne,xe,void 0)}}e.StandaloneConfigurationService=dt;let at=class{constructor(Ne,xe,ze){this.configurationService=Ne,this.modelService=xe,this.languageService=ze,this._onDidChangeConfiguration=new D.Emitter,this.configurationService.onDidChangeConfiguration(Ke=>{this._onDidChangeConfiguration.fire({affectedKeys:Ke.affectedKeys,affectsConfiguration:(Xe,Qe)=>Ke.affectsConfiguration(Qe)})})}getValue(Ne,xe,ze){const Ke=t.Position.isIPosition(xe)?xe:null,Xe=Ke?typeof ze=="string"?ze:void 0:typeof xe=="string"?xe:void 0,Qe=Ne?this.getLanguage(Ne,Ke):void 0;return typeof Xe>"u"?this.configurationService.getValue({resource:Ne,overrideIdentifier:Qe}):this.configurationService.getValue(Xe,{resource:Ne,overrideIdentifier:Qe})}getLanguage(Ne,xe){const ze=this.modelService.getModel(Ne);return ze?xe?ze.getLanguageIdAtPosition(xe.lineNumber,xe.column):ze.getLanguageId():this.languageService.guessLanguageIdByFilepathOrFirstLine(Ne)}};at=Ie([ge(0,o.IConfigurationService),ge(1,u.IModelService),ge(2,Z.ILanguageService)],at);let nt=class{constructor(Ne){this.configurationService=Ne}getEOL(Ne,xe){const ze=this.configurationService.getValue("files.eol",{overrideIdentifier:xe,resource:Ne});return ze&&typeof ze=="string"&&ze!=="auto"?ze:_.isLinux||_.isMacintosh?` -`:`\r -`}};nt=Ie([ge(0,o.IConfigurationService)],nt);class Ct{publicLog2(){}}class ht{constructor(){const Ne=C.URI.from({scheme:ht.SCHEME,authority:"model",path:"/"});this.workspace={id:A.STANDALONE_EDITOR_WORKSPACE_ID,folders:[new A.WorkspaceFolder({uri:Ne,name:"",index:0})]}}getWorkspace(){return this.workspace}getWorkspaceFolder(Ne){return Ne&&Ne.scheme===ht.SCHEME?this.workspace.folders[0]:null}}ht.SCHEME="inmemory";function bt(Ue,Ne,xe){if(!Ne||!(Ue instanceof dt))return;const ze=[];Object.keys(Ne).forEach(Ke=>{(0,i.isEditorConfigurationKey)(Ke)&&ze.push([`editor.${Ke}`,Ne[Ke]]),xe&&(0,i.isDiffEditorConfigurationKey)(Ke)&&ze.push([`diffEditor.${Ke}`,Ne[Ke]])}),ze.length>0&&Ue.updateValues(ze)}e.updateConfigurationService=bt;let ft=class{constructor(Ne){this._modelService=Ne}hasPreviewHandler(){return!1}apply(Ne,xe){return be(this,void 0,void 0,function*(){const ze=Array.isArray(Ne)?Ne:s.ResourceEdit.convert(Ne),Ke=new Map;for(const rt of ze){if(!(rt instanceof s.ResourceTextEdit))throw new Error("bad edit - only text edits are supported");const Je=this._modelService.getModel(rt.resource);if(!Je)throw new Error("bad edit - model not found");if(typeof rt.versionId=="number"&&Je.getVersionId()!==rt.versionId)throw new Error("bad state - model changed in the meantime");let et=Ke.get(Je);et||(et=[],Ke.set(Je,et)),et.push(n.EditOperation.replaceMove(r.Range.lift(rt.textEdit.range),rt.textEdit.text))}let Xe=0,Qe=0;for(const[rt,Je]of Ke)rt.pushStackElement(),rt.pushEditOperations([],Je,()=>[]),rt.pushStackElement(),Qe+=1,Xe+=Je.length;return{ariaSummary:L.format(O.StandaloneServicesNLS.bulkEditServiceSummary,Xe,Qe),isApplied:Xe>0}})}};ft=Ie([ge(0,u.IModelService)],ft);class _t{getUriLabel(Ne,xe){return Ne.scheme==="file"?Ne.fsPath:Ne.path}getUriBasenameLabel(Ne){return(0,x.basename)(Ne)}}let He=class extends Y.ContextViewService{constructor(Ne,xe){super(Ne),this._codeEditorService=xe}showContextView(Ne,xe,ze){if(!xe){const Ke=this._codeEditorService.getFocusedCodeEditor()||this._codeEditorService.getActiveCodeEditor();Ke&&(xe=Ke.getContainerDomNode())}return super.showContextView(Ne,xe,ze)}};He=Ie([ge(0,P.ILayoutService),ge(1,W.ICodeEditorService)],He);class Te{constructor(){this._neverEmitter=new D.Emitter,this.onDidChangeTrust=this._neverEmitter.event}isWorkspaceTrusted(){return!0}}class Fe extends ne.LanguageService{constructor(){super()}}class Ve extends De.LogService{constructor(){super(new U.ConsoleLogger)}}let Ye=class extends se.ContextMenuService{constructor(Ne,xe,ze,Ke,Xe,Qe){super(Ne,xe,ze,Ke,Xe,Qe),this.configure({blockMouse:!1})}};Ye=Ie([ge(0,N.ITelemetryService),ge(1,B.INotificationService),ge(2,G.IContextViewService),ge(3,b.IKeybindingService),ge(4,z.IMenuService),ge(5,a.IContextKeyService)],Ye);class st{playAudioCue(Ne,xe){return be(this,void 0,void 0,function*(){})}}(0,J.registerSingleton)(o.IConfigurationService,dt,0),(0,J.registerSingleton)(d.ITextResourceConfigurationService,at,0),(0,J.registerSingleton)(d.ITextResourcePropertiesService,nt,0),(0,J.registerSingleton)(A.IWorkspaceContextService,ht,0),(0,J.registerSingleton)(R.ILabelService,_t,0),(0,J.registerSingleton)(N.ITelemetryService,Ct,0),(0,J.registerSingleton)(g.IDialogService,We,0),(0,J.registerSingleton)(Me.IEnvironmentService,Oe,0),(0,J.registerSingleton)(B.INotificationService,qe,0),(0,J.registerSingleton)(we.IMarkerService,Le.MarkerService,0),(0,J.registerSingleton)(Z.ILanguageService,Fe,0),(0,J.registerSingleton)(ae.IStandaloneThemeService,ce.StandaloneThemeService,0),(0,J.registerSingleton)(U.ILogService,Ve,0),(0,J.registerSingleton)(u.IModelService,ue.ModelService,0),(0,J.registerSingleton)(le.IMarkerDecorationsService,ee.MarkerDecorationsService,0),(0,J.registerSingleton)(a.IContextKeyService,oe.ContextKeyService,0),(0,J.registerSingleton)(T.IProgressService,ke,0),(0,J.registerSingleton)(T.IEditorProgressService,_e,0),(0,J.registerSingleton)(Re.IStorageService,Re.InMemoryStorageService,0),(0,J.registerSingleton)(H.IEditorWorkerService,V.EditorWorkerService,0),(0,J.registerSingleton)(s.IBulkEditService,ft,0),(0,J.registerSingleton)(F.IWorkspaceTrustManagementService,Te,0),(0,J.registerSingleton)(f.ITextModelService,Se,0),(0,J.registerSingleton)(K.IAccessibilityService,X.AccessibilityService,0),(0,J.registerSingleton)(ve.IListService,ve.ListService,0),(0,J.registerSingleton)(l.ICommandService,Ge,0),(0,J.registerSingleton)(b.IKeybindingService,je,0),(0,J.registerSingleton)(Ae.IQuickInputService,de.StandaloneQuickInputService,0),(0,J.registerSingleton)(G.IContextViewService,He,0),(0,J.registerSingleton)(Ee.IOpenerService,q.OpenerService,0),(0,J.registerSingleton)(re.IClipboardService,j.BrowserClipboardService,0),(0,J.registerSingleton)(G.IContextMenuService,Ye,0),(0,J.registerSingleton)(z.IMenuService,Q.MenuService,0),(0,J.registerSingleton)(ye.IAudioCueService,st,0);var ot;(function(Ue){const Ne=new pe.ServiceCollection;for(const[Je,et]of(0,J.getSingletonServiceDescriptors)())Ne.set(Je,et);const xe=new me.InstantiationService(Ne,!0);Ne.set(h.IInstantiationService,xe);function ze(Je){Ke||Qe({});const et=Ne.get(Je);if(!et)throw new Error("Missing service "+Je);return et instanceof he.SyncDescriptor?xe.invokeFunction(tt=>tt.get(Je)):et}Ue.get=ze;let Ke=!1;const Xe=new D.Emitter;function Qe(Je){if(Ke)return xe;Ke=!0;for(const[tt,ct]of(0,J.getSingletonServiceDescriptors)())Ne.get(tt)||Ne.set(tt,ct);for(const tt in Je)if(Je.hasOwnProperty(tt)){const ct=(0,h.createDecorator)(tt);Ne.get(ct)instanceof he.SyncDescriptor&&Ne.set(ct,Je[tt])}const et=(0,fe.getEditorFeatures)();for(const tt of et)try{xe.createInstance(tt)}catch(ct){(0,Ce.onUnexpectedError)(ct)}return Xe.fire(),xe}Ue.initialize=Qe;function rt(Je){if(Ke)return Je();const et=new m.DisposableStore,tt=et.add(Xe.event(()=>{tt.dispose(),et.add(Je())}));return et}Ue.withServices=rt})(ot||(e.StandaloneServices=ot={}))}),define(te[921],ie([1,0,45,2,33,192,280,257,131,30,25,28,15,58,8,34,48,23,88,93,102,85,50,42,363,75,32,18,366,156]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createTextModel=e.StandaloneDiffEditor2=e.StandaloneEditor=e.StandaloneCodeEditor=void 0;let M=0,R=!1;function B(x){if(!x){if(R)return;R=!0}L.setARIAContainer(x||document.body)}let T=class extends D.CodeEditorWidget{constructor(W,U,F,G,Y,ne,se,J,q,H,V,Z){const ee=Object.assign({},U);ee.ariaLabel=ee.ariaLabel||l.StandaloneCodeEditorNLS.editorViewAccessibleLabel,ee.ariaLabel=ee.ariaLabel+";"+l.StandaloneCodeEditorNLS.accessibilityHelpMessage,super(W,ee,{},F,G,Y,ne,J,q,H,V,Z),se instanceof m.StandaloneKeybindingService?this._standaloneKeybindingService=se:this._standaloneKeybindingService=null,B(ee.ariaContainerElement)}addCommand(W,U,F){if(!this._standaloneKeybindingService)return console.warn("Cannot add command because the editor is configured with an unrecognized KeybindingService"),null;const G="DYNAMIC_"+ ++M,Y=i.ContextKeyExpr.deserialize(F);return this._standaloneKeybindingService.addDynamicKeybinding(G,W,U,Y),G}createContextKey(W,U){return this._contextKeyService.createKey(W,U)}addAction(W){if(typeof W.id!="string"||typeof W.label!="string"||typeof W.run!="function")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"),I.Disposable.None;const U=W.id,F=W.label,G=i.ContextKeyExpr.and(i.ContextKeyExpr.equals("editorId",this.getId()),i.ContextKeyExpr.deserialize(W.precondition)),Y=W.keybindings,ne=i.ContextKeyExpr.and(G,i.ContextKeyExpr.deserialize(W.keybindingContext)),se=W.contextMenuGroupId||null,J=W.contextMenuOrder||0,q=(ee,...le)=>Promise.resolve(W.run(this,...le)),H=new I.DisposableStore,V=this.getId()+":"+U;if(H.add(C.CommandsRegistry.registerCommand(V,q)),se){const ee={command:{id:V,title:F},when:G,group:se,order:J};H.add(v.MenuRegistry.appendMenuItem(v.MenuId.EditorContext,ee))}if(Array.isArray(Y))for(const ee of Y)H.add(this._standaloneKeybindingService.addDynamicKeybinding(V,ee,q,ne));const Z=new S.InternalEditorAction(V,F,F,G,(...ee)=>Promise.resolve(W.run(this,...ee)),this._contextKeyService);return this._actions.set(U,Z),H.add((0,I.toDisposable)(()=>{this._actions.delete(U)})),H}_triggerCommand(W,U){if(this._codeEditorService instanceof h.StandaloneCodeEditorService)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(W,U)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(W,U)}};e.StandaloneCodeEditor=T,e.StandaloneCodeEditor=T=Ie([ge(2,t.IInstantiationService),ge(3,y.ICodeEditorService),ge(4,C.ICommandService),ge(5,i.IContextKeyService),ge(6,r.IKeybindingService),ge(7,f.IThemeService),ge(8,u.INotificationService),ge(9,d.IAccessibilityService),ge(10,b.ILanguageConfigurationService),ge(11,w.ILanguageFeaturesService)],T);let N=class extends T{constructor(W,U,F,G,Y,ne,se,J,q,H,V,Z,ee,le,ue){const de=Object.assign({},U);(0,m.updateConfigurationService)(H,de,!1);const ce=J.registerEditorContainer(W);typeof de.theme=="string"&&J.setTheme(de.theme),typeof de.autoDetectHighContrast<"u"&&J.setAutoDetectHighContrast(!!de.autoDetectHighContrast);const ae=de.model;delete de.model,super(W,de,F,G,Y,ne,se,J,q,V,le,ue),this._configurationService=H,this._standaloneThemeService=J,this._register(ce);let X;if(typeof ae>"u"){const K=ee.getLanguageIdByMimeType(de.language)||de.language||p.PLAINTEXT_LANGUAGE_ID;X=P(Z,ee,de.value||"",K,void 0),this._ownsModel=!0}else X=ae,this._ownsModel=!1;if(this._attachModel(X),X){const K={oldModelUrl:null,newModelUrl:X.uri};this._onDidChangeModel.fire(K)}}dispose(){super.dispose()}updateOptions(W){(0,m.updateConfigurationService)(this._configurationService,W,!1),typeof W.theme=="string"&&this._standaloneThemeService.setTheme(W.theme),typeof W.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!W.autoDetectHighContrast),super.updateOptions(W)}_postDetachModelCleanup(W){super._postDetachModelCleanup(W),W&&this._ownsModel&&(W.dispose(),this._ownsModel=!1)}};e.StandaloneEditor=N,e.StandaloneEditor=N=Ie([ge(2,t.IInstantiationService),ge(3,y.ICodeEditorService),ge(4,C.ICommandService),ge(5,i.IContextKeyService),ge(6,r.IKeybindingService),ge(7,_.IStandaloneThemeService),ge(8,u.INotificationService),ge(9,s.IConfigurationService),ge(10,d.IAccessibilityService),ge(11,a.IModelService),ge(12,g.ILanguageService),ge(13,b.ILanguageConfigurationService),ge(14,w.ILanguageFeaturesService)],N);let A=class extends E.DiffEditorWidget{constructor(W,U,F,G,Y,ne,se,J,q,H,V,Z){const ee=Object.assign({},U);(0,m.updateConfigurationService)(J,ee,!0);const le=ne.registerEditorContainer(W);typeof ee.theme=="string"&&ne.setTheme(ee.theme),typeof ee.autoDetectHighContrast<"u"&&ne.setAutoDetectHighContrast(!!ee.autoDetectHighContrast),super(W,ee,{},G,F,Y,Z,H),this._configurationService=J,this._standaloneThemeService=ne,this._register(le)}dispose(){super.dispose()}updateOptions(W){(0,m.updateConfigurationService)(this._configurationService,W,!0),typeof W.theme=="string"&&this._standaloneThemeService.setTheme(W.theme),typeof W.autoDetectHighContrast<"u"&&this._standaloneThemeService.setAutoDetectHighContrast(!!W.autoDetectHighContrast),super.updateOptions(W)}_createInnerEditor(W,U,F){return W.createInstance(T,U,F)}getOriginalEditor(){return super.getOriginalEditor()}getModifiedEditor(){return super.getModifiedEditor()}addCommand(W,U,F){return this.getModifiedEditor().addCommand(W,U,F)}createContextKey(W,U){return this.getModifiedEditor().createContextKey(W,U)}addAction(W){return this.getModifiedEditor().addAction(W)}};e.StandaloneDiffEditor2=A,e.StandaloneDiffEditor2=A=Ie([ge(2,t.IInstantiationService),ge(3,i.IContextKeyService),ge(4,y.ICodeEditorService),ge(5,_.IStandaloneThemeService),ge(6,u.INotificationService),ge(7,s.IConfigurationService),ge(8,n.IContextMenuService),ge(9,c.IEditorProgressService),ge(10,o.IClipboardService),ge(11,k.IAudioCueService)],A);function P(x,W,U,F,G){if(U=U||"",!F){const Y=U.indexOf(` -`);let ne=U;return Y!==-1&&(ne=U.substring(0,Y)),O(x,U,W.createByFilepathOrFirstLine(G||null,ne),G)}return O(x,U,W.createById(F),G)}e.createTextModel=P;function O(x,W,U,F){return x.createModel(W,U,F)}}),define(te[922],ie([1,0,2,10,21,328,16,33,774,39,143,231,174,29,42,32,75,154,49,50,209,753,921,257,131,30,25,15,34,94,55,475]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r,u,f,d,l,o,c,a,g,h,p,b,w,E,k,M){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoEditorAPI=e.registerEditorOpener=e.registerLinkOpener=e.registerCommand=e.remeasureFonts=e.setTheme=e.defineTheme=e.tokenize=e.colorizeModelLine=e.colorize=e.colorizeElement=e.createWebWorker=e.onDidChangeModelLanguage=e.onWillDisposeModel=e.onDidCreateModel=e.getModels=e.getModel=e.onDidChangeMarkers=e.getModelMarkers=e.removeAllMarkers=e.setModelMarkers=e.setModelLanguage=e.createModel=e.addKeybindingRules=e.addKeybindingRule=e.addEditorAction=e.addCommand=e.createDiffEditor=e.getDiffEditors=e.getEditors=e.onDidCreateDiffEditor=e.onDidCreateEditor=e.create=void 0;function R(me,pe,ve){return g.StandaloneServices.initialize(ve||{}).createInstance(a.StandaloneEditor,me,pe)}e.create=R;function B(me){return g.StandaloneServices.get(m.ICodeEditorService).onCodeEditorAdd(ve=>{me(ve)})}e.onDidCreateEditor=B;function T(me){return g.StandaloneServices.get(m.ICodeEditorService).onDiffEditorAdd(ve=>{me(ve)})}e.onDidCreateDiffEditor=T;function N(){return g.StandaloneServices.get(m.ICodeEditorService).listCodeEditors()}e.getEditors=N;function A(){return g.StandaloneServices.get(m.ICodeEditorService).listDiffEditors()}e.getDiffEditors=A;function P(me,pe,ve){return g.StandaloneServices.initialize(ve||{}).createInstance(a.StandaloneDiffEditor2,me,pe)}e.createDiffEditor=P;function O(me){if(typeof me.id!="string"||typeof me.run!="function")throw new Error("Invalid command descriptor, `id` and `run` are required properties!");return b.CommandsRegistry.registerCommand(me.id,me.run)}e.addCommand=O;function x(me){if(typeof me.id!="string"||typeof me.label!="string"||typeof me.run!="function")throw new Error("Invalid action descriptor, `id`, `label` and `run` are required properties!");const pe=w.ContextKeyExpr.deserialize(me.precondition),ve=(Le,...Ee)=>S.EditorCommand.runEditorCommand(Le,Ee,pe,(Ae,Re,Be)=>Promise.resolve(me.run(Re,...Be))),we=new L.DisposableStore;if(we.add(b.CommandsRegistry.registerCommand(me.id,ve)),me.contextMenuGroupId){const Le={command:{id:me.id,title:me.label},when:pe,group:me.contextMenuGroupId,order:me.contextMenuOrder||0};we.add(p.MenuRegistry.appendMenuItem(p.MenuId.EditorContext,Le))}if(Array.isArray(me.keybindings)){const Le=g.StandaloneServices.get(E.IKeybindingService);if(!(Le instanceof g.StandaloneKeybindingService))console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService");else{const Ee=w.ContextKeyExpr.and(pe,w.ContextKeyExpr.deserialize(me.keybindingContext));we.add(Le.addDynamicKeybindings(me.keybindings.map(Ae=>({keybinding:Ae,command:me.id,when:Ee}))))}}return we}e.addEditorAction=x;function W(me){return U([me])}e.addKeybindingRule=W;function U(me){const pe=g.StandaloneServices.get(E.IKeybindingService);return pe instanceof g.StandaloneKeybindingService?pe.addDynamicKeybindings(me.map(ve=>({keybinding:ve.keybinding,command:ve.command,commandArgs:ve.commandArgs,when:w.ContextKeyExpr.deserialize(ve.when)}))):(console.warn("Cannot add keybinding because the editor is configured with an unrecognized KeybindingService"),L.Disposable.None)}e.addKeybindingRules=U;function F(me,pe,ve){const we=g.StandaloneServices.get(t.ILanguageService),Le=we.getLanguageIdByMimeType(pe)||pe;return(0,a.createTextModel)(g.StandaloneServices.get(l.IModelService),we,me,Le,ve)}e.createModel=F;function G(me,pe){const ve=g.StandaloneServices.get(t.ILanguageService),we=ve.getLanguageIdByMimeType(pe)||pe||u.PLAINTEXT_LANGUAGE_ID;me.setLanguage(ve.createById(we))}e.setModelLanguage=G;function Y(me,pe,ve){me&&g.StandaloneServices.get(k.IMarkerService).changeOne(pe,me.uri,ve)}e.setModelMarkers=Y;function ne(me){g.StandaloneServices.get(k.IMarkerService).changeAll(me,[])}e.removeAllMarkers=ne;function se(me){return g.StandaloneServices.get(k.IMarkerService).read(me)}e.getModelMarkers=se;function J(me){return g.StandaloneServices.get(k.IMarkerService).onMarkerChanged(me)}e.onDidChangeMarkers=J;function q(me){return g.StandaloneServices.get(l.IModelService).getModel(me)}e.getModel=q;function H(){return g.StandaloneServices.get(l.IModelService).getModels()}e.getModels=H;function V(me){return g.StandaloneServices.get(l.IModelService).onModelAdded(me)}e.onDidCreateModel=V;function Z(me){return g.StandaloneServices.get(l.IModelService).onModelRemoved(me)}e.onWillDisposeModel=Z;function ee(me){return g.StandaloneServices.get(l.IModelService).onModelLanguageChanged(ve=>{me({model:ve.model,oldLanguage:ve.oldLanguageId})})}e.onDidChangeModelLanguage=ee;function le(me){return(0,_.createWebWorker)(g.StandaloneServices.get(l.IModelService),g.StandaloneServices.get(r.ILanguageConfigurationService),me)}e.createWebWorker=le;function ue(me,pe){const ve=g.StandaloneServices.get(t.ILanguageService),we=g.StandaloneServices.get(h.IStandaloneThemeService);return c.Colorizer.colorizeElement(we,ve,me,pe).then(()=>{we.registerEditorContainer(me)})}e.colorizeElement=ue;function de(me,pe,ve){const we=g.StandaloneServices.get(t.ILanguageService);return g.StandaloneServices.get(h.IStandaloneThemeService).registerEditorContainer(document.body),c.Colorizer.colorize(we,me,pe,ve)}e.colorize=de;function ce(me,pe,ve=4){return g.StandaloneServices.get(h.IStandaloneThemeService).registerEditorContainer(document.body),c.Colorizer.colorizeModelLine(me,pe,ve)}e.colorizeModelLine=ce;function ae(me){const pe=n.TokenizationRegistry.get(me);return pe||{getInitialState:()=>f.NullState,tokenize:(ve,we,Le)=>(0,f.nullTokenize)(me,Le)}}function X(me,pe){n.TokenizationRegistry.getOrCreate(pe);const ve=ae(pe),we=(0,I.splitLines)(me),Le=[];let Ee=ve.getInitialState();for(let Ae=0,Re=we.length;Aebe(this,void 0,void 0,function*(){var Ee;if(!we)return null;const Ae=(Ee=ve.options)===null||Ee===void 0?void 0:Ee.selection;let Re;return Ae&&typeof Ae.endLineNumber=="number"&&typeof Ae.endColumn=="number"?Re=Ae:Ae&&(Re={lineNumber:Ae.startLineNumber,column:Ae.startColumn}),(yield me.openCodeEditor(we,ve.resource,Re))?we:null}))}e.registerEditorOpener=oe;function he(){return{create:R,getEditors:N,getDiffEditors:A,onDidCreateEditor:B,onDidCreateDiffEditor:T,createDiffEditor:P,addCommand:O,addEditorAction:x,addKeybindingRule:W,addKeybindingRules:U,createModel:F,setModelLanguage:G,setModelMarkers:Y,getModelMarkers:se,removeAllMarkers:ne,onDidChangeMarkers:J,getModels:H,getModel:q,onDidCreateModel:V,onWillDisposeModel:Z,onDidChangeModelLanguage:ee,createWebWorker:le,colorizeElement:ue,colorize:de,colorizeModelLine:ce,tokenize:X,defineTheme:K,setTheme:z,remeasureFonts:Q,registerCommand:j,registerLinkOpener:re,registerEditorOpener:oe,AccessibilitySupport:o.AccessibilitySupport,ContentWidgetPositionPreference:o.ContentWidgetPositionPreference,CursorChangeReason:o.CursorChangeReason,DefaultEndOfLine:o.DefaultEndOfLine,EditorAutoIndentStrategy:o.EditorAutoIndentStrategy,EditorOption:o.EditorOption,EndOfLinePreference:o.EndOfLinePreference,EndOfLineSequence:o.EndOfLineSequence,MinimapPosition:o.MinimapPosition,MouseTargetType:o.MouseTargetType,OverlayWidgetPositionPreference:o.OverlayWidgetPositionPreference,OverviewRulerLane:o.OverviewRulerLane,GlyphMarginLane:o.GlyphMarginLane,RenderLineNumbersType:o.RenderLineNumbersType,RenderMinimap:o.RenderMinimap,ScrollbarVisibility:o.ScrollbarVisibility,ScrollType:o.ScrollType,TextEditorCursorBlinkingStyle:o.TextEditorCursorBlinkingStyle,TextEditorCursorStyle:o.TextEditorCursorStyle,TrackedRangeStickiness:o.TrackedRangeStickiness,WrappingIndent:o.WrappingIndent,InjectedTextCursorStops:o.InjectedTextCursorStops,PositionAffinity:o.PositionAffinity,ConfigurationChangedEvent:v.ConfigurationChangedEvent,BareFontInfo:s.BareFontInfo,FontInfo:s.FontInfo,TextModelResolvedOptions:d.TextModelResolvedOptions,FindMatch:d.FindMatch,ApplyUpdateResult:v.ApplyUpdateResult,EditorZoom:C.EditorZoom,EditorType:i.EditorType,EditorOptions:v.EditorOptions}}e.createMonacoEditorAPI=he}),define(te[923],ie([1,0,36,5,29,32,75,42,209,257,553,338,131,94,18,28]),function($,e,L,I,y,D,S,m,_,v,C,s,i,n,t,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMonacoLanguagesAPI=e.registerInlayHintsProvider=e.registerInlineCompletionsProvider=e.registerDocumentRangeSemanticTokensProvider=e.registerDocumentSemanticTokensProvider=e.registerSelectionRangeProvider=e.registerDeclarationProvider=e.registerFoldingRangeProvider=e.registerColorProvider=e.registerCompletionItemProvider=e.registerLinkProvider=e.registerOnTypeFormattingEditProvider=e.registerDocumentRangeFormattingEditProvider=e.registerDocumentFormattingEditProvider=e.registerCodeActionProvider=e.registerCodeLensProvider=e.registerTypeDefinitionProvider=e.registerImplementationProvider=e.registerDefinitionProvider=e.registerLinkedEditingRangeProvider=e.registerDocumentHighlightProvider=e.registerDocumentSymbolProvider=e.registerHoverProvider=e.registerSignatureHelpProvider=e.registerRenameProvider=e.registerReferenceProvider=e.setMonarchTokensProvider=e.setTokensProvider=e.registerTokensProviderFactory=e.setColorMap=e.TokenizationSupportAdapter=e.EncodedTokenizationSupportAdapter=e.setLanguageConfiguration=e.onLanguageEncountered=e.onLanguage=e.getEncodedLanguageId=e.getLanguages=e.register=void 0;function u(K){S.ModesRegistry.registerLanguage(K)}e.register=u;function f(){let K=[];return K=K.concat(S.ModesRegistry.getLanguages()),K}e.getLanguages=f;function d(K){return v.StandaloneServices.get(m.ILanguageService).languageIdCodec.encodeLanguageId(K)}e.getEncodedLanguageId=d;function l(K,z){return v.StandaloneServices.withServices(()=>{const j=v.StandaloneServices.get(m.ILanguageService).onDidRequestRichLanguageFeatures(re=>{re===K&&(j.dispose(),z())});return j})}e.onLanguage=l;function o(K,z){return v.StandaloneServices.withServices(()=>{const j=v.StandaloneServices.get(m.ILanguageService).onDidRequestBasicLanguageFeatures(re=>{re===K&&(j.dispose(),z())});return j})}e.onLanguageEncountered=o;function c(K,z){if(!v.StandaloneServices.get(m.ILanguageService).isRegisteredLanguageId(K))throw new Error(`Cannot set configuration for unknown language ${K}`);return v.StandaloneServices.get(D.ILanguageConfigurationService).register(K,z,100)}e.setLanguageConfiguration=c;class a{constructor(z,Q){this._languageId=z,this._actual=Q}dispose(){}getInitialState(){return this._actual.getInitialState()}tokenize(z,Q,j){if(typeof this._actual.tokenize=="function")return g.adaptTokenize(this._languageId,this._actual,z,j);throw new Error("Not supported!")}tokenizeEncoded(z,Q,j){const re=this._actual.tokenizeEncoded(z,j);return new y.EncodedTokenizationResult(re.tokens,re.endState)}}e.EncodedTokenizationSupportAdapter=a;class g{constructor(z,Q,j,re){this._languageId=z,this._actual=Q,this._languageService=j,this._standaloneThemeService=re}dispose(){}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(z,Q){const j=[];let re=0;for(let oe=0,he=z.length;oe0&&oe[he-1]===Ee)continue;let Ae=Le.startIndex;ve===0?Ae=0:Aebe(this,void 0,void 0,function*(){const j=yield Promise.resolve(z.create());return j?h(j)?E(K,j):new s.MonarchTokenizer(v.StandaloneServices.get(m.ILanguageService),v.StandaloneServices.get(i.IStandaloneThemeService),K,(0,C.compile)(K,j),v.StandaloneServices.get(r.IConfigurationService)):null}));return y.TokenizationRegistry.registerFactory(K,Q)}e.registerTokensProviderFactory=k;function M(K,z){if(!v.StandaloneServices.get(m.ILanguageService).isRegisteredLanguageId(K))throw new Error(`Cannot set tokens provider for unknown language ${K}`);return b(z)?k(K,{create:()=>z}):y.TokenizationRegistry.register(K,E(K,z))}e.setTokensProvider=M;function R(K,z){const Q=j=>new s.MonarchTokenizer(v.StandaloneServices.get(m.ILanguageService),v.StandaloneServices.get(i.IStandaloneThemeService),K,(0,C.compile)(K,j),v.StandaloneServices.get(r.IConfigurationService));return b(z)?k(K,{create:()=>z}):y.TokenizationRegistry.register(K,Q(z))}e.setMonarchTokensProvider=R;function B(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).referenceProvider.register(K,z)}e.registerReferenceProvider=B;function T(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).renameProvider.register(K,z)}e.registerRenameProvider=T;function N(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).signatureHelpProvider.register(K,z)}e.registerSignatureHelpProvider=N;function A(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).hoverProvider.register(K,{provideHover:(j,re,oe)=>{const he=j.getWordAtPosition(re);return Promise.resolve(z.provideHover(j,re,oe)).then(me=>{if(me)return!me.range&&he&&(me.range=new I.Range(re.lineNumber,he.startColumn,re.lineNumber,he.endColumn)),me.range||(me.range=new I.Range(re.lineNumber,re.column,re.lineNumber,re.column)),me})}})}e.registerHoverProvider=A;function P(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentSymbolProvider.register(K,z)}e.registerDocumentSymbolProvider=P;function O(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentHighlightProvider.register(K,z)}e.registerDocumentHighlightProvider=O;function x(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).linkedEditingRangeProvider.register(K,z)}e.registerLinkedEditingRangeProvider=x;function W(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).definitionProvider.register(K,z)}e.registerDefinitionProvider=W;function U(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).implementationProvider.register(K,z)}e.registerImplementationProvider=U;function F(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).typeDefinitionProvider.register(K,z)}e.registerTypeDefinitionProvider=F;function G(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).codeLensProvider.register(K,z)}e.registerCodeLensProvider=G;function Y(K,z,Q){return v.StandaloneServices.get(t.ILanguageFeaturesService).codeActionProvider.register(K,{providedCodeActionKinds:Q?.providedCodeActionKinds,documentation:Q?.documentation,provideCodeActions:(re,oe,he,me)=>{const ve=v.StandaloneServices.get(n.IMarkerService).read({resource:re.uri}).filter(we=>I.Range.areIntersectingOrTouching(we,oe));return z.provideCodeActions(re,oe,{markers:ve,only:he.only,trigger:he.trigger},me)},resolveCodeAction:z.resolveCodeAction})}e.registerCodeActionProvider=Y;function ne(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentFormattingEditProvider.register(K,z)}e.registerDocumentFormattingEditProvider=ne;function se(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentRangeFormattingEditProvider.register(K,z)}e.registerDocumentRangeFormattingEditProvider=se;function J(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).onTypeFormattingEditProvider.register(K,z)}e.registerOnTypeFormattingEditProvider=J;function q(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).linkProvider.register(K,z)}e.registerLinkProvider=q;function H(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).completionProvider.register(K,z)}e.registerCompletionItemProvider=H;function V(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).colorProvider.register(K,z)}e.registerColorProvider=V;function Z(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).foldingRangeProvider.register(K,z)}e.registerFoldingRangeProvider=Z;function ee(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).declarationProvider.register(K,z)}e.registerDeclarationProvider=ee;function le(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).selectionRangeProvider.register(K,z)}e.registerSelectionRangeProvider=le;function ue(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentSemanticTokensProvider.register(K,z)}e.registerDocumentSemanticTokensProvider=ue;function de(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).documentRangeSemanticTokensProvider.register(K,z)}e.registerDocumentRangeSemanticTokensProvider=de;function ce(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).inlineCompletionsProvider.register(K,z)}e.registerInlineCompletionsProvider=ce;function ae(K,z){return v.StandaloneServices.get(t.ILanguageFeaturesService).inlayHintsProvider.register(K,z)}e.registerInlayHintsProvider=ae;function X(){return{register:u,getLanguages:f,onLanguage:l,onLanguageEncountered:o,getEncodedLanguageId:d,setLanguageConfiguration:c,setColorMap:w,registerTokensProviderFactory:k,setTokensProvider:M,setMonarchTokensProvider:R,registerReferenceProvider:B,registerRenameProvider:T,registerCompletionItemProvider:H,registerSignatureHelpProvider:N,registerHoverProvider:A,registerDocumentSymbolProvider:P,registerDocumentHighlightProvider:O,registerLinkedEditingRangeProvider:x,registerDefinitionProvider:W,registerImplementationProvider:U,registerTypeDefinitionProvider:F,registerCodeLensProvider:G,registerCodeActionProvider:Y,registerDocumentFormattingEditProvider:ne,registerDocumentRangeFormattingEditProvider:se,registerOnTypeFormattingEditProvider:J,registerLinkProvider:q,registerColorProvider:V,registerFoldingRangeProvider:Z,registerDeclarationProvider:ee,registerSelectionRangeProvider:le,registerDocumentSemanticTokensProvider:ue,registerDocumentRangeSemanticTokensProvider:de,registerInlineCompletionsProvider:ce,registerInlayHintsProvider:ae,DocumentHighlightKind:_.DocumentHighlightKind,CompletionItemKind:_.CompletionItemKind,CompletionItemTag:_.CompletionItemTag,CompletionItemInsertTextRule:_.CompletionItemInsertTextRule,SymbolKind:_.SymbolKind,SymbolTag:_.SymbolTag,IndentAction:_.IndentAction,CompletionTriggerKind:_.CompletionTriggerKind,SignatureHelpTriggerKind:_.SignatureHelpTriggerKind,InlayHintKind:_.InlayHintKind,InlineCompletionTriggerKind:_.InlineCompletionTriggerKind,CodeActionTriggerType:_.CodeActionTriggerType,FoldingRangeKind:y.FoldingRangeKind,SelectedSuggestionInfo:y.SelectedSuggestionInfo}}e.createMonacoLanguagesAPI=X}),define(te[924],ie([1,0,39,331,922,923,355]),function($,e,L,I,y,D,S){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.languages=e.editor=e.Token=e.Uri=e.MarkerTag=e.MarkerSeverity=e.SelectionDirection=e.Selection=e.Range=e.Position=e.KeyMod=e.KeyCode=e.Emitter=e.CancellationTokenSource=void 0,L.EditorOptions.wrappingIndent.defaultValue=0,L.EditorOptions.glyphMargin.defaultValue=!1,L.EditorOptions.autoIndent.defaultValue=3,L.EditorOptions.overviewRulerLanes.defaultValue=2,S.FormattingConflicts.setFormatterSelector((v,C,s)=>Promise.resolve(v[0]));const m=(0,I.createMonacoBaseAPI)();m.editor=(0,y.createMonacoEditorAPI)(),m.languages=(0,D.createMonacoLanguagesAPI)(),e.CancellationTokenSource=m.CancellationTokenSource,e.Emitter=m.Emitter,e.KeyCode=m.KeyCode,e.KeyMod=m.KeyMod,e.Position=m.Position,e.Range=m.Range,e.Selection=m.Selection,e.SelectionDirection=m.SelectionDirection,e.MarkerSeverity=m.MarkerSeverity,e.MarkerTag=m.MarkerTag,e.Uri=m.Uri,e.Token=m.Token,e.editor=m.editor,e.languages=m.languages;const _=globalThis.MonacoEnvironment;(_?.globalAPI||typeof define=="function"&&define.amd)&&(globalThis.monaco=m),typeof globalThis.require<"u"&&typeof globalThis.require.config=="function"&&globalThis.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"]})});var Ci=this&&this.__createBinding||(Object.create?function($,e,L,I){I===void 0&&(I=L);var y=Object.getOwnPropertyDescriptor(e,L);(!y||("get"in y?!e.__esModule:y.writable||y.configurable))&&(y={enumerable:!0,get:function(){return e[L]}}),Object.defineProperty($,I,y)}:function($,e,L,I){I===void 0&&(I=L),$[I]=e[L]}),bi=this&&this.__exportStar||function($,e){for(var L in $)L!=="default"&&!Object.prototype.hasOwnProperty.call(e,L)&&Ci(e,$,L)};define(te[926],ie([1,0,924,920,816,817,786,861,862,821,907,864]),function($,e,L){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),bi(L,e)})}).call(this); - - -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/basic-languages/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ -var moduleExports=(()=>{var y=Object.create;var g=Object.defineProperty;var x=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var A=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var a=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(r,s)=>(typeof require!="undefined"?require:r)[s]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var D=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var m=(e,r,s,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of q(r))!M.call(e,o)&&o!==s&&g(e,o,{get:()=>r[o],enumerable:!(n=x(r,o))||n.enumerable});return e},p=(e,r,s)=>(m(e,r,"default"),s&&m(s,r,"default")),c=(e,r,s)=>(s=e!=null?y(A(e)):{},m(r||!e||!e.__esModule?g(s,"default",{value:e,enumerable:!0}):s,e));var v=D((w,d)=>{var b=c(a("vs/editor/editor.api"));d.exports=b});var t={};p(t,c(v()));var f={},u={},l=class{static getOrCreate(r){return u[r]||(u[r]=new l(r)),u[r]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(r){this._languageId=r,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise((s,n)=>{this._lazyLoadPromiseResolve=s,this._lazyLoadPromiseReject=n})}load(){return this._loadingTriggered||(this._loadingTriggered=!0,f[this._languageId].loader().then(r=>this._lazyLoadPromiseResolve(r),r=>this._lazyLoadPromiseReject(r))),this._lazyLoadPromise}};function i(e){let r=e.id;f[r]=e,t.languages.register(e);let s=l.getOrCreate(r);t.languages.registerTokensProviderFactory(r,{create:async()=>(await s.load()).language}),t.languages.onLanguageEncountered(r,async()=>{let n=await s.load();t.languages.setLanguageConfiguration(r,n.conf)})}i({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/abap/abap"],e,r)})});i({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/apex/apex"],e,r)})});i({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/azcli/azcli"],e,r)})});i({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bat/bat"],e,r)})});i({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/bicep/bicep"],e,r)})});i({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cameligo/cameligo"],e,r)})});i({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/clojure/clojure"],e,r)})});i({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/coffee/coffee"],e,r)})});i({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cpp/cpp"],e,r)})});i({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csharp/csharp"],e,r)})});i({id:"csp",extensions:[],aliases:["CSP","csp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/csp/csp"],e,r)})});i({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/css/css"],e,r)})});i({id:"cypher",extensions:[".cypher",".cyp"],aliases:["Cypher","OpenCypher"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/cypher/cypher"],e,r)})});i({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dart/dart"],e,r)})});i({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/dockerfile/dockerfile"],e,r)})});i({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ecl/ecl"],e,r)})});i({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/elixir/elixir"],e,r)})});i({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/flow9/flow9"],e,r)})});i({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/fsharp/fsharp"],e,r)})});i({id:"freemarker2",extensions:[".ftl",".ftlh",".ftlx"],aliases:["FreeMarker2","Apache FreeMarker2"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-dollar",aliases:["FreeMarker2 (Angle/Dollar)","Apache FreeMarker2 (Angle/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationDollar)});i({id:"freemarker2.tag-bracket.interpolation-dollar",aliases:["FreeMarker2 (Bracket/Dollar)","Apache FreeMarker2 (Bracket/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationDollar)});i({id:"freemarker2.tag-angle.interpolation-bracket",aliases:["FreeMarker2 (Angle/Bracket)","Apache FreeMarker2 (Angle/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAngleInterpolationBracket)});i({id:"freemarker2.tag-bracket.interpolation-bracket",aliases:["FreeMarker2 (Bracket/Bracket)","Apache FreeMarker2 (Bracket/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagBracketInterpolationBracket)});i({id:"freemarker2.tag-auto.interpolation-dollar",aliases:["FreeMarker2 (Auto/Dollar)","Apache FreeMarker2 (Auto/Dollar)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationDollar)});i({id:"freemarker2.tag-auto.interpolation-bracket",aliases:["FreeMarker2 (Auto/Bracket)","Apache FreeMarker2 (Auto/Bracket)"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/freemarker2/freemarker2"],e,r)}).then(e=>e.TagAutoInterpolationBracket)});i({id:"go",extensions:[".go"],aliases:["Go"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/go/go"],e,r)})});i({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/graphql/graphql"],e,r)})});i({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/handlebars/handlebars"],e,r)})});i({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/hcl/hcl"],e,r)})});i({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/html/html"],e,r)})});i({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ini/ini"],e,r)})});i({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/java/java"],e,r)})});i({id:"javascript",extensions:[".js",".es6",".jsx",".mjs",".cjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/javascript/javascript"],e,r)})});i({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/julia/julia"],e,r)})});i({id:"kotlin",extensions:[".kt",".kts"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/kotlin/kotlin"],e,r)})});i({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/less/less"],e,r)})});i({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lexon/lexon"],e,r)})});i({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/lua/lua"],e,r)})});i({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/liquid/liquid"],e,r)})});i({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/m3/m3"],e,r)})});i({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/markdown/markdown"],e,r)})});i({id:"mdx",extensions:[".mdx"],aliases:["MDX","mdx"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mdx/mdx"],e,r)})});i({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mips/mips"],e,r)})});i({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/msdax/msdax"],e,r)})});i({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/mysql/mysql"],e,r)})});i({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/objective-c/objective-c"],e,r)})});i({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascal/pascal"],e,r)})});i({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pascaligo/pascaligo"],e,r)})});i({id:"perl",extensions:[".pl",".pm"],aliases:["Perl","pl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/perl/perl"],e,r)})});i({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pgsql/pgsql"],e,r)})});i({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/php/php"],e,r)})});i({id:"pla",extensions:[".pla"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pla/pla"],e,r)})});i({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/postiats/postiats"],e,r)})});i({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powerquery/powerquery"],e,r)})});i({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/powershell/powershell"],e,r)})});i({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/protobuf/protobuf"],e,r)})});i({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/pug/pug"],e,r)})});i({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/python/python"],e,r)})});i({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/qsharp/qsharp"],e,r)})});i({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/r/r"],e,r)})});i({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/razor/razor"],e,r)})});i({id:"redis",extensions:[".redis"],aliases:["redis"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redis/redis"],e,r)})});i({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/redshift/redshift"],e,r)})});i({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/restructuredtext/restructuredtext"],e,r)})});i({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/ruby/ruby"],e,r)})});i({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/rust/rust"],e,r)})});i({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sb/sb"],e,r)})});i({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scala/scala"],e,r)})});i({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scheme/scheme"],e,r)})});i({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/scss/scss"],e,r)})});i({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/shell/shell"],e,r)})});i({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/solidity/solidity"],e,r)})});i({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sophia/sophia"],e,r)})});i({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sparql/sparql"],e,r)})});i({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/sql/sql"],e,r)})});i({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib",".TcPOU",".TcDUT",".TcGVL",".TcIO"],aliases:["StructuredText","scl","stl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/st/st"],e,r)})});i({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/swift/swift"],e,r)})});i({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/systemverilog/systemverilog"],e,r)})});i({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/tcl/tcl"],e,r)})});i({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/twig/twig"],e,r)})});i({id:"typescript",extensions:[".ts",".tsx",".cts",".mts"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/typescript/typescript"],e,r)})});i({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/vb/vb"],e,r)})});i({id:"wgsl",extensions:[".wgsl"],aliases:["WebGPU Shading Language","WGSL","wgsl"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/wgsl/wgsl"],e,r)})});i({id:"xml",extensions:[".xml",".xsd",".dtd",".ascx",".csproj",".config",".props",".targets",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xslt",".xsl"],firstLine:"(\\<\\?xml.*)|(\\new Promise((e,r)=>{a(["vs/basic-languages/xml/xml"],e,r)})});i({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>new Promise((e,r)=>{a(["vs/basic-languages/yaml/yaml"],e,r)})});})(); -return moduleExports; -}); - -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/language/css/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ -var moduleExports=(()=>{var C=Object.create;var g=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var l=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,r)=>(typeof require!="undefined"?require:n)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var I=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),M=(e,n)=>{for(var r in n)g(e,r,{get:n[r],enumerable:!0})},s=(e,n,r,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of b(n))!h.call(e,t)&&t!==r&&g(e,t,{get:()=>n[t],enumerable:!(a=S(n,t))||a.enumerable});return e},y=(e,n,r)=>(s(e,n,"default"),r&&s(r,n,"default")),w=(e,n,r)=>(r=e!=null?C(x(e)):{},s(n||!e||!e.__esModule?g(r,"default",{value:e,enumerable:!0}):r,e)),P=e=>s(g({},"__esModule",{value:!0}),e);var v=I((k,D)=>{var O=w(l("vs/editor/editor.api"));D.exports=O});var R={};M(R,{cssDefaults:()=>p,lessDefaults:()=>f,scssDefaults:()=>c});var o={};y(o,w(v()));var i=class{_onDidChange=new o.Emitter;_options;_modeConfiguration;_languageId;constructor(n,r,a){this._languageId=n,this.setOptions(r),this.setModeConfiguration(a)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this.options}get options(){return this._options}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setDiagnosticsOptions(n){this.setOptions(n)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},d={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0},format:{newlineBetweenSelectors:!0,newlineBetweenRules:!0,spaceAroundSelectorSeparator:!1,braceStyle:"collapse",maxPreserveNewLines:void 0,preserveNewLines:!0}},u={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0,documentFormattingEdits:!0,documentRangeFormattingEdits:!0},p=new i("css",d,u),c=new i("scss",d,u),f=new i("less",d,u);o.languages.css={cssDefaults:p,lessDefaults:f,scssDefaults:c};function m(){return new Promise((e,n)=>{l(["vs/language/css/cssMode"],e,n)})}o.languages.onLanguage("less",()=>{m().then(e=>e.setupMode(f))});o.languages.onLanguage("scss",()=>{m().then(e=>e.setupMode(c))});o.languages.onLanguage("css",()=>{m().then(e=>e.setupMode(p))});return P(R);})(); -return moduleExports; -}); - -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/language/html/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ -var moduleExports=(()=>{var w=Object.create;var l=Object.defineProperty;var R=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,_=Object.prototype.hasOwnProperty;var f=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(n,t)=>(typeof require!="undefined"?require:n)[t]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var k=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),T=(e,n)=>{for(var t in n)l(e,t,{get:n[t],enumerable:!0})},d=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of H(n))!_.call(e,o)&&o!==t&&l(e,o,{get:()=>n[o],enumerable:!(r=R(n,o))||r.enumerable});return e},b=(e,n,t)=>(d(e,n,"default"),t&&d(t,n,"default")),v=(e,n,t)=>(t=e!=null?w(O(e)):{},d(n||!e||!e.__esModule?l(t,"default",{value:e,enumerable:!0}):t,e)),A=e=>d(l({},"__esModule",{value:!0}),e);var C=k((z,h)=>{var E=v(f("vs/editor/editor.api"));h.exports=E});var V={};T(V,{handlebarDefaults:()=>M,handlebarLanguageService:()=>m,htmlDefaults:()=>x,htmlLanguageService:()=>c,razorDefaults:()=>I,razorLanguageService:()=>y,registerHTMLLanguageService:()=>s});var a={};b(a,v(C()));var p=class{_onDidChange=new a.Emitter;_options;_modeConfiguration;_languageId;constructor(n,t,r){this._languageId=n,this.setOptions(t),this.setModeConfiguration(r)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get options(){return this._options}get modeConfiguration(){return this._modeConfiguration}setOptions(n){this._options=n||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(n){this._modeConfiguration=n||Object.create(null),this._onDidChange.fire(this)}},F={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:void 0,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},u={format:F,suggest:{},data:{useDefaultDataProvider:!0}};function g(e){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:e===i,documentFormattingEdits:e===i,documentRangeFormattingEdits:e===i}}var i="html",D="handlebars",L="razor",c=s(i,u,g(i)),x=c.defaults,m=s(D,u,g(D)),M=m.defaults,y=s(L,u,g(L)),I=y.defaults;a.languages.html={htmlDefaults:x,razorDefaults:I,handlebarDefaults:M,htmlLanguageService:c,handlebarLanguageService:m,razorLanguageService:y,registerHTMLLanguageService:s};function P(){return new Promise((e,n)=>{f(["vs/language/html/htmlMode"],e,n)})}function s(e,n=u,t=g(e)){let r=new p(e,n,t),o,S=a.languages.onLanguage(e,async()=>{o=(await P()).setupMode(r)});return{defaults:r,dispose(){S.dispose(),o?.dispose(),o=void 0}}}return A(V);})(); -return moduleExports; -}); - -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/language/json/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ -var moduleExports=(()=>{var p=Object.create;var r=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var v=Object.getPrototypeOf,C=Object.prototype.hasOwnProperty;var g=(o=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(o,{get:(e,n)=>(typeof require!="undefined"?require:e)[n]}):o)(function(o){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+o+'" is not supported')});var D=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports),b=(o,e)=>{for(var n in e)r(o,n,{get:e[n],enumerable:!0})},s=(o,e,n,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of h(e))!C.call(o,i)&&i!==n&&r(o,i,{get:()=>e[i],enumerable:!(a=y(e,i))||a.enumerable});return o},u=(o,e,n)=>(s(o,e,"default"),n&&s(n,e,"default")),c=(o,e,n)=>(n=o!=null?p(v(o)):{},s(e||!o||!o.__esModule?r(n,"default",{value:o,enumerable:!0}):n,o)),O=o=>s(r({},"__esModule",{value:!0}),o);var f=D((w,m)=>{var M=c(g("vs/editor/editor.api"));m.exports=M});var R={};b(R,{jsonDefaults:()=>d});var t={};u(t,c(f()));var l=class{_onDidChange=new t.Emitter;_diagnosticsOptions;_modeConfiguration;_languageId;constructor(e,n,a){this._languageId=e,this.setDiagnosticsOptions(n),this.setModeConfiguration(a)}get onDidChange(){return this._onDidChange.event}get languageId(){return this._languageId}get modeConfiguration(){return this._modeConfiguration}get diagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)}},j={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},S={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},d=new l("json",j,S);t.languages.json={jsonDefaults:d};function _(){return new Promise((o,e)=>{g(["vs/language/json/jsonMode"],o,e)})}t.languages.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});t.languages.onLanguage("json",()=>{_().then(o=>o.setupMode(d))});return O(R);})(); -return moduleExports; -}); - -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/language/typescript/monaco.contribution", ["require","require","vs/editor/editor.api"],(require)=>{ -var moduleExports=(()=>{var N=Object.create;var d=Object.defineProperty;var H=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var R=Object.getPrototypeOf,F=Object.prototype.hasOwnProperty;var c=(n=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(n,{get:(e,t)=>(typeof require!="undefined"?require:e)[t]}):n)(function(n){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+n+'" is not supported')});var w=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),A=(n,e)=>{for(var t in e)d(n,t,{get:e[t],enumerable:!0})},g=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of M(e))!F.call(n,r)&&r!==t&&d(n,r,{get:()=>e[r],enumerable:!(i=H(e,r))||i.enumerable});return n},D=(n,e,t)=>(g(n,e,"default"),t&&g(t,e,"default")),C=(n,e,t)=>(t=n!=null?N(R(n)):{},g(e||!n||!n.__esModule?d(t,"default",{value:n,enumerable:!0}):t,n)),W=n=>g(d({},"__esModule",{value:!0}),n);var _=w((B,E)=>{var V=C(c("vs/editor/editor.api"));E.exports=V});var T={};A(T,{JsxEmit:()=>f,ModuleKind:()=>b,ModuleResolutionKind:()=>O,NewLineKind:()=>y,ScriptTarget:()=>h,getJavaScriptWorker:()=>k,getTypeScriptWorker:()=>P,javascriptDefaults:()=>v,typescriptDefaults:()=>x,typescriptVersion:()=>I});var L="5.0.2";var l={};D(l,C(_()));var b=(s=>(s[s.None=0]="None",s[s.CommonJS=1]="CommonJS",s[s.AMD=2]="AMD",s[s.UMD=3]="UMD",s[s.System=4]="System",s[s.ES2015=5]="ES2015",s[s.ESNext=99]="ESNext",s))(b||{}),f=(a=>(a[a.None=0]="None",a[a.Preserve=1]="Preserve",a[a.React=2]="React",a[a.ReactNative=3]="ReactNative",a[a.ReactJSX=4]="ReactJSX",a[a.ReactJSXDev=5]="ReactJSXDev",a))(f||{}),y=(t=>(t[t.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",t[t.LineFeed=1]="LineFeed",t))(y||{}),h=(o=>(o[o.ES3=0]="ES3",o[o.ES5=1]="ES5",o[o.ES2015=2]="ES2015",o[o.ES2016=3]="ES2016",o[o.ES2017=4]="ES2017",o[o.ES2018=5]="ES2018",o[o.ES2019=6]="ES2019",o[o.ES2020=7]="ES2020",o[o.ESNext=99]="ESNext",o[o.JSON=100]="JSON",o[o.Latest=99]="Latest",o))(h||{}),O=(t=>(t[t.Classic=1]="Classic",t[t.NodeJs=2]="NodeJs",t))(O||{}),m=class{_onDidChange=new l.Emitter;_onDidExtraLibsChange=new l.Emitter;_extraLibs;_removedExtraLibs;_eagerModelSync;_compilerOptions;_diagnosticsOptions;_workerOptions;_onDidExtraLibsChangeTimeout;_inlayHintsOptions;_modeConfiguration;constructor(e,t,i,r,p){this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(r),this.setModeConfiguration(p),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(typeof t>"u"?i=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:i=t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let r=1;return this._removedExtraLibs[i]&&(r=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(r=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let p=this._extraLibs[i];!p||p.version===r&&(delete this._extraLibs[i],this._removedExtraLibs[i]=r,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let t of e){let i=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,r=t.content,p=1;this._removedExtraLibs[i]&&(p=this._removedExtraLibs[i]+1),this._extraLibs[i]={content:r,version:p}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},I=L,S={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},x=new m({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},S),v=new m({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},S),P=()=>u().then(n=>n.getTypeScriptWorker()),k=()=>u().then(n=>n.getJavaScriptWorker());l.languages.typescript={ModuleKind:b,JsxEmit:f,NewLineKind:y,ScriptTarget:h,ModuleResolutionKind:O,typescriptVersion:I,typescriptDefaults:x,javascriptDefaults:v,getTypeScriptWorker:P,getJavaScriptWorker:k};function u(){return new Promise((n,e)=>{c(["vs/language/typescript/tsMode"],n,e)})}l.languages.onLanguage("typescript",()=>u().then(n=>n.setupTypeScript(x)));l.languages.onLanguage("javascript",()=>u().then(n=>n.setupJavaScript(v)));return W(T);})(); -return moduleExports; -}); - -define("vs/editor/editor.main", ["vs/editor/edcore.main","vs/basic-languages/monaco.contribution","vs/language/css/monaco.contribution","vs/language/html/monaco.contribution","vs/language/json/monaco.contribution","vs/language/typescript/monaco.contribution"], function(api) { return api; }); -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.de.js b/lib/vs/editor/editor.main.nls.de.js deleted file mode 100644 index 3456e26..0000000 --- a/lib/vs/editor/editor.main.nls.de.js +++ /dev/null @@ -1,31 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.de",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["Eingabe"],"vs/base/browser/ui/findinput/findInputToggles":["Gro\xDF-/Kleinschreibung beachten","Nur ganzes Wort suchen","Regul\xE4ren Ausdruck verwenden"],"vs/base/browser/ui/findinput/replaceInput":["Eingabe","Gro\xDF-/Kleinschreibung beibehalten"],"vs/base/browser/ui/hover/hoverWidget":['\xDCberpr\xFCfen Sie dies in der barrierefreien Ansicht mit "{0}".','\xDCberpr\xFCfen Sie dies in der barrierefreien Ansicht \xFCber den Befehl "Barrierefreie Ansicht \xF6ffnen", der zurzeit nicht \xFCber eine Tastenzuordnung ausgel\xF6st werden kann.'],"vs/base/browser/ui/iconLabel/iconLabelHover":["Wird geladen..."],"vs/base/browser/ui/inputbox/inputBox":["Fehler: {0}","Warnung: {0}","Info: {0}","f\xFCr Verlauf","Gel\xF6schte Eingabe"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["Ungebunden"],"vs/base/browser/ui/selectBox/selectBoxCustom":["Auswahlfeld"],"vs/base/browser/ui/toolbar/toolbar":["Weitere Aktionen..."],"vs/base/browser/ui/tree/abstractTree":["Filter","Fuzzy\xFCbereinstimmung","Zum Filtern Text eingeben","Zum Suchen eingeben","Zum Suchen eingeben","Schlie\xDFen","Kein Element gefunden."],"vs/base/common/actions":["(leer)"],"vs/base/common/errorMessage":["{0}: {1}","Ein Systemfehler ist aufgetreten ({0}).","Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.","Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll.","{0} ({1} Fehler gesamt)","Ein unbekannter Fehler ist aufgetreten. Weitere Details dazu finden Sie im Protokoll."],"vs/base/common/keybindingLabels":["STRG","UMSCHALTTASTE","ALT","Windows","STRG","UMSCHALTTASTE","ALT","Super","Steuern","UMSCHALTTASTE","Option","Befehl","Steuern","UMSCHALTTASTE","ALT","Windows","Steuern","UMSCHALTTASTE","ALT","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["Editor","Auf den Editor kann zurzeit nicht zugegriffen werden.","{0} Um den f\xFCr die Sprachausgabe optimierten Modus zu aktivieren, verwenden Sie {1}",'{0} Um den f\xFCr die Sprachausgabe optimierten Modus zu aktivieren, \xF6ffnen Sie die Schnellauswahl mit {1}, und f\xFChren Sie den Befehl "Barrierefreiheitsmodus der Bildschirmsprachausgabe umschalten" aus, der derzeit nicht \xFCber die Tastatur ausgel\xF6st werden kann.','{0} Weisen Sie eine Tastenzuordnung f\xFCr den Befehl "Barrierefreiheitsmodus der Sprachausgabe umschalten" zu, indem Sie mit auf den Editor f\xFCr Tastenzuordnungen zugreifen {1} und ihn ausf\xFChren.'],"vs/editor/browser/coreCommands":["Auch bei l\xE4ngeren Zeilen am Ende bleiben","Auch bei l\xE4ngeren Zeilen am Ende bleiben","Sekund\xE4re Cursor entfernt"],"vs/editor/browser/editorExtensions":["&&R\xFCckg\xE4ngig","R\xFCckg\xE4ngig","&&Wiederholen","Wiederholen","&&Alles ausw\xE4hlen","Alle ausw\xE4hlen"],"vs/editor/browser/widget/codeEditorWidget":["Die Anzahl der Cursor wurde auf {0} beschr\xE4nkt. Erw\xE4gen Sie die Verwendung von [Suchen und Ersetzen](https://code.visualstudio.com/docs/editor/codebasics#_find-und-ersetzen) f\xFCr gr\xF6\xDFere \xC4nderungen, oder erh\xF6hen Sie die Multicursorbegrenzungseinstellung des Editors.","Erh\xF6hen des Grenzwerts f\xFCr mehrere Cursor"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":['Symbol f\xFCr "Einf\xFCgen" im barrierefreien Diff-Viewer.','Symbol f\xFCr "Entfernen" im barrierefreien Diff-Viewer.','Symbol f\xFCr "Schlie\xDFen" im barrierefreien Diff-Viewer.',"Schlie\xDFen","Barrierefreier Diff-Viewer. Verwenden Sie den Pfeil nach oben und unten, um zu navigieren.","keine ge\xE4nderten Zeilen","1 Zeile ge\xE4ndert","{0} Zeilen ge\xE4ndert","Unterschied {0} von {1}: urspr\xFCngliche Zeile {2}, {3}, ge\xE4nderte Zeile {4}, {5}","leer","{0}: unver\xE4nderte Zeile {1}","{0} urspr\xFCngliche Zeile {1} ge\xE4nderte Zeile {2}","+ {0} ge\xE4nderte Zeile(n) {1}","\u2013 {0} Originalzeile {1}"],"vs/editor/browser/widget/diffEditor/colors":["Die Rahmenfarbe f\xFCr Text, der im Diff-Editor verschoben wurde.","Die aktive Rahmenfarbe f\xFCr Text, der im Diff-Editor verschoben wurde."],"vs/editor/browser/widget/diffEditor/decorations":["Zeilenformatierung f\xFCr Einf\xFCgungen im Diff-Editor","Zeilenformatierung f\xFCr Entfernungen im Diff-Editor","Klicken Sie, um die \xC4nderung r\xFCckg\xE4ngig zu machen"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":['"Unver\xE4nderte Bereiche reduzieren" umschalten','"Verschobene Codebl\xF6cke anzeigen" umschalten','"Bei eingeschr\xE4nktem Speicherplatz Inlineansicht verwenden" umschalten',"Bei eingeschr\xE4nktem Speicherplatz Inlineansicht verwenden","Verschobene Codebl\xF6cke anzeigen","Diff-Editor","Seite wechseln","Vergleichsmodus beenden","Alle unver\xE4nderten Regionen reduzieren","Alle unver\xE4nderten Regionen anzeigen","Barrierefreier Diff-Viewer","Zum n\xE4chsten Unterschied wechseln","Barrierefreien Diff-Viewer \xF6ffnen","Zum vorherigen Unterschied wechseln"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" verwenden Sie {0}, um die Hilfe zur Barrierefreiheit zu \xF6ffnen."],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["Unver\xE4nderten Bereich falten","Klicken oder ziehen Sie, um oben mehr anzuzeigen.","Alle anzeigen","Klicken oder ziehen Sie, um unten mehr anzuzeigen.","{0} ausgeblendete Linien","Zum Auffalten doppelklicken"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["Gel\xF6schte Zeilen kopieren","Gel\xF6schte Zeile kopieren","Ge\xE4nderte Zeilen kopieren","Ge\xE4nderte Zeile kopieren","Gel\xF6schte Zeile kopieren ({0})","Ge\xE4nderte Zeile ({0}) kopieren","Diese \xC4nderung r\xFCckg\xE4ngig machen"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["Code mit \xC4nderungen in Zeile {0}-{1} verschoben","Code mit \xC4nderungen aus Zeile {0}-{1} verschoben","Code in Zeile {0}-{1} verschoben","Code aus Zeile {0}-{1} verschoben"],"vs/editor/common/config/editorConfigurationSchema":["Editor","Die Anzahl der Leerzeichen, denen ein Tabstopp entspricht. Diese Einstellung wird basierend auf dem Inhalt der Datei \xFCberschrieben, wenn {0} aktiviert ist.","Die Anzahl von Leerzeichen, die f\xFCr den Einzug oder \u201EtabSize\u201C verwendet werden, um den Wert aus \u201E#editor.tabSize#\u201C zu verwenden. Diese Einstellung wird basierend auf dem Dateiinhalt \xFCberschrieben, wenn \u201E#editor.detectIndentation#\u201C aktiviert ist.","F\xFCgt beim Dr\xFCcken der TAB-Taste Leerzeichen ein. Diese Einstellung wird basierend auf dem Inhalt der Datei \xFCberschrieben, wenn {0} aktiviert ist.","Steuert, ob {0} und {1} automatisch erkannt werden, wenn eine Datei basierend auf dem Dateiinhalt ge\xF6ffnet wird.","Nachfolgende automatisch eingef\xFCgte Leerzeichen entfernen","Spezielle Behandlung f\xFCr gro\xDFe Dateien zum Deaktivieren bestimmter speicherintensiver Funktionen.","Steuert, ob Vervollst\xE4ndigungen auf Grundlage der W\xF6rter im Dokument berechnet werden sollen.","Nur W\xF6rter aus dem aktiven Dokument vorschlagen","W\xF6rter aus allen ge\xF6ffneten Dokumenten derselben Sprache vorschlagen","W\xF6rter aus allen ge\xF6ffneten Dokumenten vorschlagen","Steuert, aus welchen Dokumenten wortbasierte Vervollst\xE4ndigungen berechnet werden.","Die semantische Hervorhebung ist f\xFCr alle Farbdesigns aktiviert.","Die semantische Hervorhebung ist f\xFCr alle Farbdesigns deaktiviert.",'Die semantische Hervorhebung wird durch die Einstellung "semanticHighlighting" des aktuellen Farbdesigns konfiguriert.',"Steuert, ob die semantische Hervorhebung f\xFCr die Sprachen angezeigt wird, die sie unterst\xFCtzen.","Lassen Sie Peek-Editoren ge\xF6ffnet, auch wenn Sie auf ihren Inhalt doppelklicken oder auf die ESCAPETASTE klicken.","Zeilen, die diese L\xE4nge \xFCberschreiten, werden aus Leistungsgr\xFCnden nicht tokenisiert","Steuert, ob die Tokenisierung asynchron auf einem Webworker erfolgen soll.","Steuert, ob die asynchrone Tokenisierung protokolliert werden soll. Nur zum Debuggen.","Steuert, ob die asynchrone Tokenisierung anhand der Legacy-Hintergrundtokenisierung \xFCberpr\xFCft werden soll. Die Tokenisierung kann verlangsamt werden. Nur zum Debuggen.","Definiert die Klammersymbole, die den Einzug vergr\xF6\xDFern oder verkleinern.","Das \xF6ffnende Klammerzeichen oder die Zeichenfolgensequenz.","Das schlie\xDFende Klammerzeichen oder die Zeichenfolgensequenz.","Definiert die Klammerpaare, die durch ihre Schachtelungsebene farbig formatiert werden, wenn die Farbgebung f\xFCr das Klammerpaar aktiviert ist.","Das \xF6ffnende Klammerzeichen oder die Zeichenfolgensequenz.","Das schlie\xDFende Klammerzeichen oder die Zeichenfolgensequenz.","Timeout in Millisekunden, nach dem die Diff-Berechnung abgebrochen wird. Bei 0 wird kein Timeout verwendet.","Maximale Dateigr\xF6\xDFe in MB, f\xFCr die Diffs berechnet werden sollen. Verwenden Sie 0, um keinen Grenzwert zu setzen.","Steuert, ob der Diff-Editor die Unterschiede nebeneinander oder im Text anzeigt.","Wenn die Breite des Diff-Editors unter diesem Wert liegt, wird die Inlineansicht verwendet.","Wenn diese Option aktiviert ist und die Breite des Editors nicht ausreicht, wird die Inlineansicht verwendet.","Wenn diese Option aktiviert ist, zeigt der Diff-Editor Pfeile in seinem Glyphenrand an, um \xC4nderungen r\xFCckg\xE4ngig zu machen.","Wenn aktiviert, ignoriert der Diff-Editor \xC4nderungen an voran- oder nachgestellten Leerzeichen.",'Steuert, ob der Diff-Editor die Indikatoren "+" und "-" f\xFCr hinzugef\xFCgte/entfernte \xC4nderungen anzeigt.',"Steuert, ob der Editor CodeLens anzeigt.","Zeilenumbr\xFCche erfolgen nie.","Der Zeilenumbruch erfolgt an der Breite des Anzeigebereichs.","Zeilen werden gem\xE4\xDF der Einstellung \u201E{0}\u201C umbrochen.","Verwendet den Legacyvergleichsalgorithmus.","Verwendet den erweiterten Vergleichsalgorithmus.","Steuert, ob der Diff-Editor unver\xE4nderte Regionen anzeigt.","Steuert, wie viele Zeilen f\xFCr unver\xE4nderte Regionen verwendet werden.","Steuert, wie viele Zeilen als Mindestwert f\xFCr unver\xE4nderte Regionen verwendet werden.","Steuert, wie viele Zeilen beim Vergleich unver\xE4nderter Regionen als Kontext verwendet werden.","Steuert, ob der Diff-Editor erkannte Codeverschiebevorg\xE4nge anzeigen soll.","Steuert, ob der diff-Editor leere Dekorationen anzeigt, um anzuzeigen, wo Zeichen eingef\xFCgt oder gel\xF6scht wurden."],"vs/editor/common/config/editorOptions":["Plattform-APIs verwenden, um zu erkennen, wenn eine Sprachausgabe angef\xFCgt ist","F\xFCr die Verwendung mit einer Sprachausgabe optimieren","Annehmen, dass keine Sprachausgabe angef\xFCgt ist","Steuert, ob die Benutzeroberfl\xE4che in einem Modus ausgef\xFChrt werden soll, in dem sie f\xFCr Sprachausgaben optimiert ist.","Steuert, ob beim Kommentieren ein Leerzeichen eingef\xFCgt wird.","Steuert, ob leere Zeilen bei Umschalt-, Hinzuf\xFCgungs- oder Entfernungsaktionen f\xFCr Zeilenkommentare ignoriert werden sollen.","Steuert, ob ein Kopiervorgang ohne Auswahl die aktuelle Zeile kopiert.","Steuert, ob der Cursor bei der Suche nach \xDCbereinstimmungen w\xE4hrend der Eingabe springt.","Suchzeichenfolge niemals aus der Editorauswahl seeden.","Suchzeichenfolge immer aus der Editorauswahl seeden, einschlie\xDFlich Wort an Cursorposition.","Suchzeichenfolge nur aus der Editorauswahl seeden.",'Steuert, ob f\xFCr die Suchzeichenfolge im Widget "Suche" ein Seeding aus der Auswahl des Editors ausgef\xFChrt wird.','"In Auswahl suchen" niemals automatisch aktivieren (Standard).','"In Auswahl suchen" immer automatisch aktivieren.','"In Auswahl suchen" automatisch aktivieren, wenn mehrere Inhaltszeilen ausgew\xE4hlt sind.','Steuert die Bedingung zum automatischen Aktivieren von "In Auswahl suchen".','Steuert, ob das Widget "Suche" die freigegebene Suchzwischenablage unter macOS lesen oder bearbeiten soll.','Steuert, ob das Suchwidget zus\xE4tzliche Zeilen im oberen Bereich des Editors hinzuf\xFCgen soll. Wenn die Option auf "true" festgelegt ist, k\xF6nnen Sie \xFCber die erste Zeile hinaus scrollen, wenn das Suchwidget angezeigt wird.',"Steuert, ob die Suche automatisch am Anfang (oder am Ende) neu gestartet wird, wenn keine weiteren \xDCbereinstimmungen gefunden werden.",'Hiermit werden Schriftligaturen (Schriftartfeatures "calt" und "liga") aktiviert/deaktiviert. \xC4ndern Sie diesen Wert in eine Zeichenfolge, um die CSS-Eigenschaft "font-feature-settings" detailliert zu steuern.','Explizite CSS-Eigenschaft "font-feature-settings". Stattdessen kann ein boolescher Wert \xFCbergeben werden, wenn nur Ligaturen aktiviert/deaktiviert werden m\xFCssen.','Hiermit werden Schriftligaturen oder Schriftartfeatures konfiguriert. Hierbei kann es sich entweder um einen booleschen Wert zum Aktivieren oder Deaktivieren von Ligaturen oder um eine Zeichenfolge f\xFCr den Wert der CSS-Eigenschaft "font-feature-settings" handeln.',"Aktiviert/deaktiviert die \xDCbersetzung von \u201Efont-weight\u201C in \u201Efont-variation-settings\u201C. \xC4ndern Sie dies in eine Zeichenfolge f\xFCr eine differenzierte Steuerung der CSS-Eigenschaft \u201Efont-variation-settings\u201C.","Explizite CSS-Eigenschaft \u201Efont-variation-settings\u201C. Stattdessen kann ein boolescher Wert eingeben werden, wenn nur \u201Efont-weight\u201C in \u201Efont-variation-settings\u201C \xFCbersetzt werden muss.","Konfiguriert Variationen der Schriftart. Kann entweder ein boolescher Wert zum Aktivieren/Deaktivieren der \xDCbersetzung von \u201Efont-weight\u201C in \u201Efont-variation-settings\u201C oder eine Zeichenfolge f\xFCr den Wert der CSS-Eigenschaft \u201Efont-variation-settings\u201C sein.","Legt die Schriftgr\xF6\xDFe in Pixeln fest.",'Es sind nur die Schl\xFCsselw\xF6rter "normal" und "bold" sowie Zahlen zwischen 1 und 1000 zul\xE4ssig.','Steuert die Schriftbreite. Akzeptiert die Schl\xFCsselw\xF6rter "normal" und "bold" sowie Zahlen zwischen 1 und 1000.',"Vorschauansicht der Ergebnisse anzeigen (Standardeinstellung)","Zum Hauptergebnis gehen und Vorschauansicht anzeigen","Wechseln Sie zum prim\xE4ren Ergebnis, und aktivieren Sie die Navigation ohne Vorschau zu anderen Ergebnissen.",'Diese Einstellung ist veraltet. Verwenden Sie stattdessen separate Einstellungen wie "editor.editor.gotoLocation.multipleDefinitions" oder "editor.editor.gotoLocation.multipleImplementations".','Legt das Verhalten des Befehls "Gehe zu Definition" fest, wenn mehrere Zielpositionen vorhanden sind','Legt das Verhalten des Befehls "Gehe zur Typdefinition" fest, wenn mehrere Zielpositionen vorhanden sind.','Legt das Verhalten des Befehls "Gehe zu Deklaration" fest, wenn mehrere Zielpositionen vorhanden sind.','Legt das Verhalten des Befehls "Gehe zu Implementierungen", wenn mehrere Zielspeicherorte vorhanden sind','Legt das Verhalten des Befehls "Gehe zu Verweisen" fest, wenn mehrere Zielpositionen vorhanden sind','Die alternative Befehls-ID, die ausgef\xFChrt wird, wenn das Ergebnis von "Gehe zu Definition" die aktuelle Position ist.','Die alternative Befehls-ID, die ausgef\xFChrt wird, wenn das Ergebnis von "Gehe zu Typdefinition" die aktuelle Position ist.','Die alternative Befehls-ID, die ausgef\xFChrt wird, wenn das Ergebnis von "Gehe zu Deklaration" der aktuelle Speicherort ist.','Die alternative Befehls-ID, die ausgef\xFChrt wird, wenn das Ergebnis von "Gehe zu Implementatierung" der aktuelle Speicherort ist.','Die alternative Befehls-ID, die ausgef\xFChrt wird, wenn das Ergebnis von "Gehe zu Verweis" die aktuelle Position ist.',"Steuert, ob die Hovermarkierung angezeigt wird.","Steuert die Verz\xF6gerung in Millisekunden, nach der die Hovermarkierung angezeigt wird.","Steuert, ob die Hovermarkierung sichtbar bleiben soll, wenn der Mauszeiger dar\xFCber bewegt wird.",'Steuert die Verz\xF6gerung in Millisekunden, nach der die Hovermarkierung ausgeblendet wird. Erfordert die Aktivierung von "editor.hover.sticky".',"Zeigen Sie den Mauszeiger lieber \xFCber der Linie an, wenn Platz vorhanden ist.","Es wird angenommen, dass alle Zeichen gleich breit sind. Dies ist ein schneller Algorithmus, der f\xFCr Festbreitenschriftarten und bestimmte Alphabete (wie dem lateinischen), bei denen die Glyphen gleich breit sind, korrekt funktioniert.","Delegiert die Berechnung von Umbruchpunkten an den Browser. Dies ist ein langsamer Algorithmus, der bei gro\xDFen Dateien Code Freezes verursachen kann, aber in allen F\xE4llen korrekt funktioniert.",'Steuert den Algorithmus, der Umbruchpunkte berechnet. Beachten Sie, dass "advanced" im Barrierefreiheitsmodus f\xFCr eine optimale Benutzererfahrung verwendet wird.',"Aktiviert das Gl\xFChlampensymbol f\xFCr Codeaktionen im Editor.","Zeigt die geschachtelten aktuellen Bereiche w\xE4hrend des Bildlaufs am oberen Rand des Editors an.","Definiert die maximale Anzahl fixierter Zeilen, die angezeigt werden sollen.","Legt das Modell fest, das zur Bestimmung der zu fixierenden Zeilen verwendet wird. Existiert das Gliederungsmodell nicht, wird auf das Modell des Folding Providers zur\xFCckgegriffen, der wiederum auf das Einr\xFCckungsmodell zur\xFCckgreift. Diese Reihenfolge wird in allen drei F\xE4llen beachtet.","Aktiviert das Scrollen des Widgets f\xFCr den fixierten Bildlauf mit der horizontalen Scrollleiste des Editors.","Aktiviert die Inlay-Hinweise im Editor.","Inlay-Hinweise sind aktiviert","Inlay-Hinweise werden standardm\xE4\xDFig angezeigt und ausgeblendet, wenn Sie {0} gedr\xFCckt halten","Inlayhinweise sind standardm\xE4\xDFig ausgeblendet. Sie werden angezeigt, wenn {0} gedr\xFCckt gehalten wird.","Inlay-Hinweise sind deaktiviert","Steuert den Schriftgrad von Einlapphinweisen im Editor. Standardm\xE4\xDFig wird die {0} verwendet, wenn der konfigurierte Wert kleiner als {1} oder gr\xF6\xDFer als der Schriftgrad des Editors ist.",'Steuert die Schriftartfamilie von Einlapphinweisen im Editor. Bei Festlegung auf "leer" wird die {0} verwendet.',"Aktiviert den Abstand um die Inlay-Hinweise im Editor.",`Steuert die Zeilenh\xF6he. \r - \u2013 Verwenden Sie 0, um die Zeilenh\xF6he automatisch anhand des Schriftgrads zu berechnen.\r - \u2013 Werte zwischen 0 und 8 werden als Multiplikator mit dem Schriftgrad verwendet.\r - \u2013 Werte gr\xF6\xDFer oder gleich 8 werden als effektive Werte verwendet.`,"Steuert, ob die Minimap angezeigt wird.","Steuert, ob die Minimap automatisch ausgeblendet wird.","Die Minimap hat die gleiche Gr\xF6\xDFe wie der Editor-Inhalt (und kann scrollen).","Die Minimap wird bei Bedarf vergr\xF6\xDFert oder verkleinert, um die H\xF6he des Editors zu f\xFCllen (kein Scrollen).","Die Minimap wird bei Bedarf verkleinert, damit sie nicht gr\xF6\xDFer als der Editor ist (kein Scrollen).","Legt die Gr\xF6\xDFe der Minimap fest.","Steuert die Seite, wo die Minimap gerendert wird.","Steuert, wann der Schieberegler f\xFCr die Minimap angezeigt wird.","Ma\xDFstab des in der Minimap gezeichneten Inhalts: 1, 2 oder 3.","Die tats\xE4chlichen Zeichen in einer Zeile rendern im Gegensatz zu Farbbl\xF6cken.","Begrenzen Sie die Breite der Minimap, um nur eine bestimmte Anzahl von Spalten zu rendern.","Steuert den Abstand zwischen dem oberen Rand des Editors und der ersten Zeile.","Steuert den Abstand zwischen dem unteren Rand des Editors und der letzten Zeile.","Aktiviert ein Pop-up, das Dokumentation und Typ eines Parameters anzeigt w\xE4hrend Sie tippen.","Steuert, ob das Men\xFC mit Parameterhinweisen zyklisch ist oder sich am Ende der Liste schlie\xDFt.","Schnelle Vorschl\xE4ge werden im Vorschlagswidget angezeigt","Schnelle Vorschl\xE4ge werden als inaktiver Text angezeigt","Schnelle Vorschl\xE4ge sind deaktiviert","Schnellvorschl\xE4ge innerhalb von Zeichenfolgen aktivieren.","Schnellvorschl\xE4ge innerhalb von Kommentaren aktivieren.","Schnellvorschl\xE4ge au\xDFerhalb von Zeichenfolgen und Kommentaren aktivieren.","Steuert, ob Vorschl\xE4ge w\xE4hrend des Tippens automatisch angezeigt werden sollen. Dies kann bei der Eingabe von Kommentaren, Zeichenketten und anderem Code kontrolliert werden. Schnellvorschl\xE4ge k\xF6nnen so konfiguriert werden, dass sie als Geistertext oder mit dem Vorschlags-Widget angezeigt werden. Beachten Sie auch die '{0}'-Einstellung, die steuert, ob Vorschl\xE4ge durch Sonderzeichen ausgel\xF6st werden.","Zeilennummern werden nicht dargestellt.","Zeilennummern werden als absolute Zahl dargestellt.","Zeilennummern werden als Abstand in Zeilen an Cursorposition dargestellt.","Zeilennummern werden alle 10 Zeilen dargestellt.","Steuert die Anzeige von Zeilennummern.","Anzahl der Zeichen aus Festbreitenschriftarten, ab der dieses Editor-Lineal gerendert wird.","Farbe dieses Editor-Lineals.","Vertikale Linien nach einer bestimmten Anzahl von Monospacezeichen rendern. Verwenden Sie mehrere Werte f\xFCr mehrere Linien. Wenn das Array leer ist, werden keine Linien gerendert.","Die vertikale Bildlaufleiste wird nur bei Bedarf angezeigt.","Die vertikale Bildlaufleiste ist immer sichtbar.","Die vertikale Bildlaufleiste wird immer ausgeblendet.","Steuert die Sichtbarkeit der vertikalen Bildlaufleiste.","Die horizontale Bildlaufleiste wird nur bei Bedarf angezeigt.","Die horizontale Bildlaufleiste ist immer sichtbar.","Die horizontale Bildlaufleiste wird immer ausgeblendet.","Steuert die Sichtbarkeit der horizontalen Bildlaufleiste.","Die Breite der vertikalen Bildlaufleiste.","Die H\xF6he der horizontalen Bildlaufleiste.","Steuert, ob Klicks nach Seite scrollen oder zur Klickposition springen.","Legt fest, ob alle nicht einfachen ASCII-Zeichen hervorgehoben werden. Nur Zeichen zwischen U+0020 und U+007E, Tabulator, Zeilenvorschub und Wagenr\xFCcklauf gelten als einfache ASCII-Zeichen.","Legt fest, ob Zeichen, die nur als Platzhalter dienen oder \xFCberhaupt keine Breite haben, hervorgehoben werden.","Legt fest, ob Zeichen hervorgehoben werden, die mit einfachen ASCII-Zeichen verwechselt werden k\xF6nnen, mit Ausnahme derjenigen, die im aktuellen Gebietsschema des Benutzers \xFCblich sind.","Steuert, ob Zeichen in Kommentaren auch mit Unicode-Hervorhebung versehen werden sollen.","Steuert, ob Zeichen in Zeichenfolgen auch mit Unicode-Hervorhebung versehen werden sollen.","Definiert zul\xE4ssige Zeichen, die nicht hervorgehoben werden.","Unicodezeichen, die in zul\xE4ssigen Gebietsschemas \xFCblich sind, werden nicht hervorgehoben.","Steuert, ob Inline-Vorschl\xE4ge automatisch im Editor angezeigt werden.","Die Symbolleiste \u201EInline-Vorschlag\u201C anzeigen, wenn ein Inline-Vorschlag angezeigt wird.","Die Symbolleiste \u201EInline-Vorschlag\u201C anzeigen, wenn Sie mit dem Mauszeiger auf einen Inline-Vorschlag zeigen.","Steuert, wann die Inlinevorschlagssymbolleiste angezeigt werden soll.","Steuert, wie Inlinevorschl\xE4ge mit dem Vorschlagswidget interagieren. Wenn diese Option aktiviert ist, wird das Vorschlagswidget nicht automatisch angezeigt, wenn Inlinevorschl\xE4ge verf\xFCgbar sind.","Steuert, ob die Klammerpaar-Farbgebung aktiviert ist oder nicht. Verwenden Sie {0}, um die Hervorhebungsfarben der Klammer zu \xFCberschreiben.","Steuert, ob jeder Klammertyp \xFCber einen eigenen unabh\xE4ngigen Farbpool verf\xFCgt.","Aktiviert Klammernpaarf\xFChrungslinien.","Aktiviert Klammernpaarf\xFChrungslinien nur f\xFCr das aktive Klammerpaar.","Deaktiviert Klammernpaarf\xFChrungslinien.","Steuert, ob F\xFChrungslinien f\xFCr Klammerpaare aktiviert sind oder nicht.","Aktiviert horizontale F\xFChrungslinien als Erg\xE4nzung zu vertikalen Klammernpaarf\xFChrungslinien.","Aktiviert horizontale F\xFChrungslinien nur f\xFCr das aktive Klammerpaar.","Deaktiviert horizontale F\xFChrungslinien f\xFCr Klammernpaare.","Steuert, ob horizontale F\xFChrungslinien f\xFCr Klammernpaare aktiviert sind oder nicht.","Steuert, ob der Editor das aktive Klammerpaar hervorheben soll.","Steuert, ob der Editor Einzugsf\xFChrungslinien rendern soll.","Hebt die aktive Einzugsf\xFChrung hervor.","Hebt die aktive Einzugshilfslinie hervor, selbst wenn Klammerhilfslinien hervorgehoben sind.","Heben Sie die aktive Einzugshilfslinie nicht hervor.","Steuert, ob der Editor die aktive Einzugsf\xFChrungslinie hevorheben soll.","Vorschlag einf\xFCgen, ohne den Text auf der rechten Seite des Cursors zu \xFCberschreiben","Vorschlag einf\xFCgen und Text auf der rechten Seite des Cursors \xFCberschreiben","Legt fest, ob W\xF6rter beim Akzeptieren von Vervollst\xE4ndigungen \xFCberschrieben werden. Beachten Sie, dass dies von Erweiterungen abh\xE4ngt, die f\xFCr dieses Features aktiviert sind.","Steuert, ob Filter- und Suchvorschl\xE4ge geringf\xFCgige Tippfehler ber\xFCcksichtigen.","Steuert, ob bei der Sortierung W\xF6rter priorisiert werden, die in der N\xE4he des Cursors stehen.",'Steuert, ob gespeicherte Vorschlagauswahlen in verschiedenen Arbeitsbereichen und Fenstern gemeinsam verwendet werden (daf\xFCr ist "#editor.suggestSelection#" erforderlich).',"W\xE4hlen Sie immer einen Vorschlag aus, wenn IntelliSense automatisch ausgel\xF6st wird.","W\xE4hlen Sie niemals einen Vorschlag aus, wenn IntelliSense automatisch ausgel\xF6st wird.","W\xE4hlen Sie einen Vorschlag nur aus, wenn IntelliSense aus einem Triggerzeichen ausgel\xF6st wird.","W\xE4hlen Sie einen Vorschlag nur aus, wenn Sie IntelliSense w\xE4hrend der Eingabe ausl\xF6sen.",'Steuert, ob ein Vorschlag ausgew\xE4hlt wird, wenn das Widget angezeigt wird. Beachten Sie, dass dies nur f\xFCr automatisch ausgel\xF6ste Vorschl\xE4ge gilt ("#editor.quickSuggestions#" und "#editor.suggestOnTriggerCharacters#"), und dass ein Vorschlag immer ausgew\xE4hlt wird, wenn er explizit aufgerufen wird, z. B. \xFCber STRG+LEERTASTE.','Steuert, ob ein aktiver Schnipsel verhindert, dass der Bereich "Schnelle Vorschl\xE4ge" angezeigt wird.',"Steuert, ob Symbole in Vorschl\xE4gen ein- oder ausgeblendet werden.","Steuert die Sichtbarkeit der Statusleiste unten im Vorschlagswidget.","Steuert, ob das Ergebnis des Vorschlags im Editor in der Vorschau angezeigt werden soll.","Steuert, ob Vorschlagsdetails inline mit der Bezeichnung oder nur im Detailwidget angezeigt werden.","Diese Einstellung ist veraltet. Die Gr\xF6\xDFe des Vorschlagswidgets kann jetzt ge\xE4ndert werden.",'Diese Einstellung ist veraltet. Verwenden Sie stattdessen separate Einstellungen wie "editor.suggest.showKeywords" oder "editor.suggest.showSnippets".','Wenn aktiviert, zeigt IntelliSense "method"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "funktions"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "constructor"-Vorschl\xE4ge an.',"Wenn IntelliSense aktiviert ist, werden \u201Everaltete\u201C Vorschl\xE4ge angezeigt.","Wenn dies aktiviert ist, erfordert die IntelliSense-Filterung, dass das erste Zeichen mit einem Wortanfang \xFCbereinstimmt, z.\xA0B. \u201Ec\u201C in \u201EConsole\u201C oder \u201EWebContext\u201C, aber _nicht_ bei \u201Edescription\u201C. Wenn diese Option deaktiviert ist, zeigt IntelliSense mehr Ergebnisse an, sortiert sie aber weiterhin nach der \xDCbereinstimmungsqualit\xE4t.",'Wenn aktiviert, zeigt IntelliSense "field"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "variable"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "class"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "struct"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "interface"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "module"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "property"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "event"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "operator"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "unit"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "value"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "constant"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "enum"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "enumMember"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "keyword"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "text"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "color"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "file"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "reference"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "customcolor"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "folder"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "typeParameter"-Vorschl\xE4ge an.','Wenn aktiviert, zeigt IntelliSense "snippet"-Vorschl\xE4ge an.',"Wenn aktiviert, zeigt IntelliSense user-Vorschl\xE4ge an.","Wenn aktiviert, zeigt IntelliSense issues-Vorschl\xE4ge an.","Gibt an, ob f\xFChrende und nachstehende Leerzeichen immer ausgew\xE4hlt werden sollen.",'Gibt an, ob Unterw\xF6rter (z.\xA0B. "foo" in "fooBar" oder "foo_bar") ausgew\xE4hlt werden sollen.',"Kein Einzug. Umbrochene Zeilen beginnen bei Spalte 1.","Umbrochene Zeilen erhalten den gleichen Einzug wie das \xFCbergeordnete Element.","Umbrochene Zeilen erhalten + 1 Einzug auf das \xFCbergeordnete Element.","Umgebrochene Zeilen werden im Vergleich zum \xFCbergeordneten Element +2 einger\xFCckt.","Steuert die Einr\xFCckung der umbrochenen Zeilen.","Steuert, ob Sie eine Datei in einen Editor ziehen und ablegen k\xF6nnen, indem Sie die UMSCHALTTASTE gedr\xFCckt halten (anstatt die Datei in einem Editor zu \xF6ffnen).","Steuert, ob beim Ablegen von Dateien im Editor ein Widget angezeigt wird. Mit diesem Widget k\xF6nnen Sie steuern, wie die Datei ablegt wird.","Zeigt das Widget f\xFCr die Dropdownauswahl an, nachdem eine Datei im Editor abgelegt wurde.","Das Widget f\xFCr die Ablageauswahl wird nie angezeigt. Stattdessen wird immer der Standardablageanbieter verwendet.","Steuert, ob Sie Inhalte auf unterschiedliche Weise einf\xFCgen k\xF6nnen.","Steuert, ob beim Einf\xFCgen von Inhalt im Editor ein Widget angezeigt wird. Mit diesem Widget k\xF6nnen Sie steuern, wie die Datei eingef\xFCgt wird.","Das Widget f\xFCr die Einf\xFCgeauswahl anzeigen, nachdem der Inhalt in den Editor eingef\xFCgt wurde.","Das Widget f\xFCr die Einf\xFCgeauswahl wird nie angezeigt. Stattdessen wird immer das Standardeinf\xFCgeverhalten verwendet.",'Steuert, ob Vorschl\xE4ge \xFCber Commitzeichen angenommen werden sollen. In JavaScript kann ein Semikolon (";") beispielsweise ein Commitzeichen sein, das einen Vorschlag annimmt und dieses Zeichen eingibt.',"Einen Vorschlag nur mit der EINGABETASTE akzeptieren, wenn dieser eine \xC4nderung am Text vornimmt.","Steuert, ob Vorschl\xE4ge mit der EINGABETASTE (zus\xE4tzlich zur TAB-Taste) akzeptiert werden sollen. Vermeidet Mehrdeutigkeit zwischen dem Einf\xFCgen neuer Zeilen oder dem Annehmen von Vorschl\xE4gen.","Steuert die Anzahl von Zeilen im Editor, die von einer Sprachausgabe in einem Arbeitsschritt gelesen werden k\xF6nnen. Wenn eine Sprachausgabe erkannt wird, wird der Standardwert automatisch auf 500 festgelegt. Warnung: Ein Wert h\xF6her als der Standardwert, kann sich auf die Leistung auswirken.","Editor-Inhalt","Steuern Sie, ob Inlinevorschl\xE4ge von einer Sprachausgabe angek\xFCndigt werden.","Verwenden Sie Sprachkonfigurationen, um zu bestimmen, wann Klammern automatisch geschlossen werden sollen.","Schlie\xDFe Klammern nur automatisch, wenn der Cursor sich links von einem Leerzeichen befindet.","Steuert, ob der Editor automatisch Klammern schlie\xDFen soll, nachdem der Benutzer eine \xF6ffnende Klammer hinzugef\xFCgt hat.","Verwenden Sie Sprachkonfigurationen, um festzulegen, wann Kommentare automatisch geschlossen werden sollen.","Kommentare werden nur dann automatisch geschlossen, wenn sich der Cursor links von einem Leerraum befindet.","Steuert, ob der Editor Kommentare automatisch schlie\xDFen soll, nachdem die Benutzer*innen einen ersten Kommentar hinzugef\xFCgt haben.","Angrenzende schlie\xDFende Anf\xFChrungszeichen oder Klammern werden nur \xFCberschrieben, wenn sie automatisch eingef\xFCgt wurden.","Steuert, ob der Editor angrenzende schlie\xDFende Anf\xFChrungszeichen oder Klammern beim L\xF6schen entfernen soll.","Schlie\xDFende Anf\xFChrungszeichen oder Klammern werden nur \xFCberschrieben, wenn sie automatisch eingef\xFCgt wurden.","Steuert, ob der Editor schlie\xDFende Anf\xFChrungszeichen oder Klammern \xFCberschreiben soll.","Verwende die Sprachkonfiguration, um zu ermitteln, wann Anf\xFChrungsstriche automatisch geschlossen werden.","Schlie\xDFende Anf\xFChrungszeichen nur dann automatisch erg\xE4nzen, wenn der Cursor sich links von einem Leerzeichen befindet.","Steuert, ob der Editor Anf\xFChrungszeichen automatisch schlie\xDFen soll, nachdem der Benutzer ein \xF6ffnendes Anf\xFChrungszeichen hinzugef\xFCgt hat.","Der Editor f\xFCgt den Einzug nicht automatisch ein.","Der Editor beh\xE4lt den Einzug der aktuellen Zeile bei.","Der Editor beh\xE4lt den in der aktuellen Zeile definierten Einzug bei und beachtet f\xFCr Sprachen definierte Klammern.","Der Editor beh\xE4lt den Einzug der aktuellen Zeile bei, beachtet von Sprachen definierte Klammern und ruft spezielle onEnterRules-Regeln auf, die von Sprachen definiert wurden.","Der Editor beh\xE4lt den Einzug der aktuellen Zeile bei, beachtet die von Sprachen definierten Klammern, ruft von Sprachen definierte spezielle onEnterRules-Regeln auf und beachtet von Sprachen definierte indentationRules-Regeln.","Legt fest, ob der Editor den Einzug automatisch anpassen soll, wenn Benutzer Zeilen eingeben, einf\xFCgen, verschieben oder einr\xFCcken","Sprachkonfigurationen verwenden, um zu bestimmen, wann eine Auswahl automatisch umschlossen werden soll.","Mit Anf\xFChrungszeichen, nicht mit Klammern umschlie\xDFen.","Mit Klammern, nicht mit Anf\xFChrungszeichen umschlie\xDFen.","Steuert, ob der Editor die Auswahl beim Eingeben von Anf\xFChrungszeichen oder Klammern automatisch umschlie\xDFt.","Emuliert das Auswahlverhalten von Tabstoppzeichen, wenn Leerzeichen f\xFCr den Einzug verwendet werden. Die Auswahl wird an Tabstopps ausgerichtet.","Steuert, ob der Editor CodeLens anzeigt.","Steuert die Schriftfamilie f\xFCr CodeLens.","Steuert den Schriftgrad in Pixeln f\xFCr CodeLens. Bei Festlegung auf \u201E0, 90\xA0% von \u201E#editor.fontSize#\u201C verwendet.","Steuert, ob der Editor die Inline-Farbdecorators und die Farbauswahl rendern soll.","Farbauswahl sowohl beim Klicken als auch beim Daraufzeigen des Farbdekorators anzeigen","Farbauswahl beim Draufzeigen auf den Farbdekorator anzeigen","Farbauswahl beim Klicken auf den Farbdekorator anzeigen","Steuert die Bedingung, damit eine Farbauswahl aus einem Farbdekorator angezeigt wird.","Steuert die maximale Anzahl von Farb-Decorators, die in einem Editor gleichzeitig gerendert werden k\xF6nnen.","Zulassen, dass die Auswahl per Maus und Tasten die Spaltenauswahl durchf\xFChrt.","Steuert, ob Syntax-Highlighting in die Zwischenablage kopiert wird.","Steuert den Cursoranimationsstil.","Die Smooth Caret-Animation ist deaktiviert.","Die Smooth Caret-Animation ist nur aktiviert, wenn der Benutzer den Cursor mit einer expliziten Geste bewegt.","Die Smooth Caret-Animation ist immer aktiviert.","Steuert, ob die weiche Cursoranimation aktiviert werden soll.","Steuert den Cursor-Stil.","Steuert die Mindestanzahl sichtbarer f\xFChrender Zeilen\xA0(mindestens\xA00) und nachfolgender Zeilen\xA0(mindestens\xA01) um den Cursor. Dies wird in einigen anderen Editoren als \u201EscrollOff\u201C oder \u201EscrollOffset\u201C bezeichnet.",'"cursorSurroundingLines" wird nur erzwungen, wenn die Ausl\xF6sung \xFCber die Tastatur oder API erfolgt.','"cursorSurroundingLines" wird immer erzwungen.','Steuert, wann "#cursorSurroundingLines#" erzwungen werden soll.',"Steuert die Breite des Cursors, wenn `#editor.cursorStyle#` auf `line` festgelegt ist.","Steuert, ob der Editor das Verschieben einer Auswahl per Drag and Drop zul\xE4sst.","Verwenden Sie eine neue Rendering-Methode mit SVGs.","Verwenden Sie eine neue Rendering-Methode mit Schriftartzeichen.","Verwenden Sie die stabile Rendering-Methode.","Steuert, ob Leerzeichen mit einer neuen experimentellen Methode gerendert werden.","Multiplikator f\xFCr Scrollgeschwindigkeit bei Dr\xFCcken von ALT.","Steuert, ob Codefaltung im Editor aktiviert ist.","Verwenden Sie eine sprachspezifische Faltstrategie, falls verf\xFCgbar. Andernfalls wird eine einzugsbasierte verwendet.","Einzugsbasierte Faltstrategie verwenden.","Steuert die Strategie f\xFCr die Berechnung von Faltbereichen.","Steuert, ob der Editor eingefaltete Bereiche hervorheben soll.","Steuert, ob der Editor Importbereiche automatisch reduziert.","Die maximale Anzahl von faltbaren Regionen. Eine Erh\xF6hung dieses Werts kann dazu f\xFChren, dass der Editor weniger reaktionsf\xE4hig wird, wenn die aktuelle Quelle eine gro\xDFe Anzahl von faltbaren Regionen aufweist.","Steuert, ob eine Zeile aufgefaltet wird, wenn nach einer gefalteten Zeile auf den leeren Inhalt geklickt wird.","Steuert die Schriftfamilie.","Steuert, ob der Editor den eingef\xFCgten Inhalt automatisch formatieren soll. Es muss ein Formatierer vorhanden sein, der in der Lage ist, auch Dokumentbereiche zu formatieren.","Steuert, ob der Editor die Zeile nach der Eingabe automatisch formatieren soll.","Steuert, ob der Editor den vertikalen Glyphenrand rendert. Der Glyphenrand wird haupts\xE4chlich zum Debuggen verwendet.","Steuert, ob der Cursor im \xDCbersichtslineal ausgeblendet werden soll.","Legt den Abstand der Buchstaben in Pixeln fest.","Steuert, ob die verkn\xFCpfte Bearbeitung im Editor aktiviert ist. Abh\xE4ngig von der Sprache werden zugeh\xF6rige Symbole, z.\xA0B. HTML-Tags, w\xE4hrend der Bearbeitung aktualisiert.","Steuert, ob der Editor Links erkennen und anklickbar machen soll.","Passende Klammern hervorheben",'Ein Multiplikator, der f\xFCr die Mausrad-Bildlaufereignisse "deltaX" und "deltaY" verwendet werden soll.',"Schriftart des Editors vergr\xF6\xDFern, wenn das Mausrad verwendet und die STRG-TASTE gedr\xFCckt wird.","Mehrere Cursor zusammenf\xFChren, wenn sie sich \xFCberlappen.","Ist unter Windows und Linux der STRG-Taste und unter macOS der Befehlstaste zugeordnet.","Ist unter Windows und Linux der ALT-Taste und unter macOS der Wahltaste zugeordnet.",'Der Modifizierer, der zum Hinzuf\xFCgen mehrerer Cursor mit der Maus verwendet werden soll. Die Mausgesten "Gehe zu Definition" und "Link \xF6ffnen" werden so angepasst, dass sie nicht mit dem [Multicursormodifizierer](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-Modifizierer) in Konflikt stehen.',"Jeder Cursor f\xFCgt eine Textzeile ein.","Jeder Cursor f\xFCgt den vollst\xE4ndigen Text ein.","Steuert das Einf\xFCgen, wenn die Zeilenanzahl des Einf\xFCgetexts der Cursor-Anzahl entspricht.","Steuert die maximale Anzahl von Cursorn, die sich gleichzeitig in einem aktiven Editor befindet.","Steuert, ob der Editor das Vorkommen semantischer Symbole hervorheben soll.","Steuert, ob um das \xDCbersichtslineal ein Rahmen gezeichnet werden soll.","Struktur beim \xD6ffnen des Peek-Editors fokussieren","Editor fokussieren, wenn Sie den Peek-Editor \xF6ffnen","Steuert, ob der Inline-Editor oder die Struktur im Peek-Widget fokussiert werden soll.",'Steuert, ob die Mausgeste "Gehe zu Definition" immer das Vorschauwidget \xF6ffnet.',"Steuert die Verz\xF6gerung in Millisekunden nach der Schnellvorschl\xE4ge angezeigt werden.","Steuert, ob der Editor bei Eingabe automatisch eine Umbenennung vornimmt.",'Veraltet. Verwenden Sie stattdessen "editor.linkedEditing".',"Steuert, ob der Editor Steuerzeichen rendern soll.","Letzte Zeilennummer rendern, wenn die Datei mit einem Zeilenumbruch endet.","Hebt den Bundsteg und die aktuelle Zeile hervor.","Steuert, wie der Editor die aktuelle Zeilenhervorhebung rendern soll.","Steuert, ob der Editor die aktuelle Zeilenhervorhebung nur dann rendern soll, wenn der Fokus auf dem Editor liegt.","Leerraumzeichen werden gerendert mit Ausnahme der einzelnen Leerzeichen zwischen W\xF6rtern.","Hiermit werden Leerraumzeichen nur f\xFCr ausgew\xE4hlten Text gerendert.","Nur nachstehende Leerzeichen rendern","Steuert, wie der Editor Leerzeichen rendern soll.","Steuert, ob eine Auswahl abgerundete Ecken aufweisen soll.","Steuert die Anzahl der zus\xE4tzlichen Zeichen, nach denen der Editor horizontal scrollt.","Steuert, ob der Editor jenseits der letzten Zeile scrollen wird.","Nur entlang der vorherrschenden Achse scrollen, wenn gleichzeitig vertikal und horizontal gescrollt wird. Dadurch wird ein horizontaler Versatz beim vertikalen Scrollen auf einem Trackpad verhindert.","Steuert, ob die prim\xE4re Linux-Zwischenablage unterst\xFCtzt werden soll.","Steuert, ob der Editor \xDCbereinstimmungen hervorheben soll, die der Auswahl \xE4hneln.","Steuerelemente f\xFCr die Codefaltung immer anzeigen.","Zeigen Sie niemals die Faltungssteuerelemente an, und verringern Sie die Gr\xF6\xDFe des Bundstegs.","Steuerelemente f\xFCr die Codefaltung nur anzeigen, wenn sich die Maus \xFCber dem Bundsteg befindet.","Steuert, wann die Steuerungselemente f\xFCr die Codefaltung am Bundsteg angezeigt werden.","Steuert das Ausblenden von nicht verwendetem Code.","Steuert durchgestrichene veraltete Variablen.","Zeige Schnipselvorschl\xE4ge \xFCber den anderen Vorschl\xE4gen.","Schnipselvorschl\xE4ge unter anderen Vorschl\xE4gen anzeigen.","Zeige Schnipselvorschl\xE4ge mit anderen Vorschl\xE4gen.","Keine Schnipselvorschl\xE4ge anzeigen.","Steuert, ob Codeschnipsel mit anderen Vorschl\xE4gen angezeigt und wie diese sortiert werden.","Legt fest, ob der Editor Bildl\xE4ufe animiert ausf\xFChrt.","Steuert, ob f\xFCr Benutzer*innen, die eine Sprachausgabe nutzen, bei Anzeige einer Inlinevervollst\xE4ndigung ein Hinweis zur Barrierefreiheit angezeigt werden soll.","Schriftgrad f\xFCr das Vorschlagswidget. Bei Festlegung auf {0} wird der Wert von {1} verwendet.","Zeilenh\xF6he f\xFCr das Vorschlagswidget. Bei Festlegung auf {0} wird der Wert von {1} verwendet. Der Mindestwert ist 8.","Steuert, ob Vorschl\xE4ge automatisch angezeigt werden sollen, wenn Triggerzeichen eingegeben werden.","Immer den ersten Vorschlag ausw\xE4hlen.",'W\xE4hlen Sie die aktuellsten Vorschl\xE4ge aus, es sei denn, es wird ein Vorschlag durch eine weitere Eingabe ausgew\xE4hlt, z.B. "console.| -> console.log", weil "log" vor Kurzem abgeschlossen wurde.','W\xE4hlen Sie Vorschl\xE4ge basierend auf fr\xFCheren Pr\xE4fixen aus, die diese Vorschl\xE4ge abgeschlossen haben, z.B. "co -> console" und "con ->" const".',"Steuert, wie Vorschl\xE4ge bei Anzeige der Vorschlagsliste vorab ausgew\xE4hlt werden.","Die Tab-Vervollst\xE4ndigung f\xFCgt den passendsten Vorschlag ein, wenn auf Tab gedr\xFCckt wird.","Tab-Vervollst\xE4ndigungen deaktivieren.",'Codeschnipsel per Tab vervollst\xE4ndigen, wenn die Pr\xE4fixe \xFCbereinstimmen. Funktioniert am besten, wenn "quickSuggestions" deaktiviert sind.',"Tab-Vervollst\xE4ndigungen aktivieren.","Ungew\xF6hnliche Zeilenabschlusszeichen werden automatisch entfernt.","Ungew\xF6hnliche Zeilenabschlusszeichen werden ignoriert.","Zum Entfernen ungew\xF6hnlicher Zeilenabschlusszeichen wird eine Eingabeaufforderung angezeigt.","Entfernen Sie un\xFCbliche Zeilenabschlusszeichen, die Probleme verursachen k\xF6nnen.","Das Einf\xFCgen und L\xF6schen von Leerzeichen erfolgt nach Tabstopps.","Verwenden Sie die Standardregel f\xFCr Zeilenumbr\xFCche.","Trennstellen d\xFCrfen nicht f\xFCr Texte in Chinesisch/Japanisch/Koreanisch (CJK) verwendet werden. Das Verhalten von Nicht-CJK-Texten ist mit dem f\xFCr normales Verhalten identisch.","Steuert die Regeln f\xFCr Trennstellen, die f\xFCr Texte in Chinesisch/Japanisch/Koreanisch (CJK) verwendet werden.","Zeichen, die als Worttrennzeichen verwendet werden, wenn wortbezogene Navigationen oder Vorg\xE4nge ausgef\xFChrt werden.","Zeilenumbr\xFCche erfolgen nie.","Der Zeilenumbruch erfolgt an der Breite des Anzeigebereichs.",'Der Zeilenumbruch erfolgt bei "#editor.wordWrapColumn#".','Der Zeilenumbruch erfolgt beim Mindestanzeigebereich und "#editor.wordWrapColumn".',"Steuert, wie der Zeilenumbruch durchgef\xFChrt werden soll.",'Steuert die umschlie\xDFende Spalte des Editors, wenn "#editor.wordWrap#" den Wert "wordWrapColumn" oder "bounded" aufweist.',"Steuert, ob Inlinefarbdekorationen mithilfe des Standard-Dokumentfarbanbieters angezeigt werden sollen.","Steuert, ob der Editor Registerkarten empf\xE4ngt oder zur Navigation zur Workbench zur\xFCckgibt."],"vs/editor/common/core/editorColorRegistry":["Hintergrundfarbe zur Hervorhebung der Zeile an der Cursorposition.","Hintergrundfarbe f\xFCr den Rahmen um die Zeile an der Cursorposition.","Hintergrundfarbe der markierten Bereiche, wie z.B. Quick Open oder die Suche. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrundfarbe f\xFCr den Rahmen um hervorgehobene Bereiche.",'Hintergrundfarbe des hervorgehobenen Symbols, z. B. "Gehe zu Definition" oder "Gehe zu n\xE4chster/vorheriger". Die Farbe darf nicht undurchsichtig sein, um zugrunde liegende Dekorationen nicht zu verbergen.',"Hintergrundfarbe des Rahmens um hervorgehobene Symbole","Farbe des Cursors im Editor.","Hintergrundfarbe vom Editor-Cursor. Erlaubt die Anpassung der Farbe von einem Zeichen, welches von einem Block-Cursor \xFCberdeckt wird.","Farbe der Leerzeichen im Editor.","Zeilennummernfarbe im Editor.","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im Editor.",'"editorIndentGuide.background" ist veraltet. Verwenden Sie stattdessen "editorIndentGuide.background1".',"Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im aktiven Editor.",'"editorIndentGuide.activeBackground" ist veraltet. Verwenden Sie stattdessen "editorIndentGuide.activeBackground1".',"Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im Editor (1).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im Editor (2).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im Editor (3).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im Editor (4).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im Editor (5).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im Editor (6).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im aktiven Editor (1).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im aktiven Editor (2).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im aktiven Editor (3).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im aktiven Editor (4).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im aktiven Editor (5).","Farbe der F\xFChrungslinien f\xFCr Einz\xFCge im aktiven Editor (6).","Zeilennummernfarbe der aktiven Editorzeile.",'Die ID ist veraltet. Verwenden Sie stattdessen "editorLineNumber.activeForeground".',"Zeilennummernfarbe der aktiven Editorzeile.","Die Farbe der letzten Editor-Zeile, wenn \u201Eeditor.renderFinalNewline\u201C auf \u201Eabgeblendet\u201C festgelegt ist.","Farbe des Editor-Lineals.","Vordergrundfarbe der CodeLens-Links im Editor","Hintergrundfarbe f\xFCr zusammengeh\xF6rige Klammern","Farbe f\xFCr zusammengeh\xF6rige Klammern","Farbe des Rahmens f\xFCr das \xDCbersicht-Lineal.","Hintergrundfarbe des Editor-\xDCbersichtslineals.","Hintergrundfarbe der Editorleiste. Die Leiste enth\xE4lt die Glyphenr\xE4nder und die Zeilennummern.","Rahmenfarbe unn\xF6tigen (nicht genutzten) Quellcodes im Editor.",'Deckkraft des unn\xF6tigen (nicht genutzten) Quellcodes im Editor. "#000000c0" rendert z.B. den Code mit einer Deckkraft von 75%. Verwenden Sie f\xFCr Designs mit hohem Kontrast das Farbdesign "editorUnnecessaryCode.border", um unn\xF6tigen Code zu unterstreichen statt ihn abzublenden.',"Rahmenfarbe des Ghost-Texts im Editor.","Vordergrundfarbe des Ghost-Texts im Editor.","Hintergrundfarbe des Ghost-Texts im Editor.","\xDCbersichtslinealmarkerfarbe f\xFCr das Hervorheben von Bereichen. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","\xDCbersichtslineal-Markierungsfarbe f\xFCr Fehler.","\xDCbersichtslineal-Markierungsfarbe f\xFCr Warnungen.","\xDCbersichtslineal-Markierungsfarbe f\xFCr Informationen.","Vordergrundfarbe der Klammern (1). Erfordert die Aktivierung der Farbgebung des Klammerpaars.","Vordergrundfarbe der Klammern (2). Erfordert die Aktivierung der Farbgebung des Klammerpaars.","Vordergrundfarbe der Klammern (3). Erfordert die Aktivierung der Farbgebung des Klammerpaars.","Vordergrundfarbe der Klammern (4). Erfordert die Aktivierung der Farbgebung des Klammerpaars.","Vordergrundfarbe der Klammern (5). Erfordert die Aktivierung der Farbgebung des Klammerpaars.","Vordergrundfarbe der Klammern (6). Erfordert die Aktivierung der Farbgebung des Klammerpaars.","Vordergrundfarbe der unerwarteten Klammern.","Hintergrundfarbe der inaktiven Klammerpaar-Hilfslinien (1). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der inaktiven Klammerpaar-Hilfslinien (2). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der inaktiven Klammerpaar-Hilfslinien (3). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der inaktiven Klammerpaar-Hilfslinien (4). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der inaktiven Klammerpaar-Hilfslinien (5). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der inaktiven Klammerpaar-Hilfslinien (6). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der aktiven Klammerpaar-Hilfslinien (1). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der aktiven Klammerpaar-Hilfslinien (2). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der aktiven Klammerpaar-Hilfslinien (3). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der aktiven Klammerpaar-Hilfslinien (4). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der aktiven Klammerpaar-Hilfslinien (5). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Hintergrundfarbe der aktiven Klammerpaar-Hilfslinien (6). Erfordert das Aktivieren von Klammerpaar-Hilfslinien.","Rahmenfarbe, die zum Hervorheben von Unicode-Zeichen verwendet wird.","Hintergrundfarbe, die zum Hervorheben von Unicode-Zeichen verwendet wird."],"vs/editor/common/editorContextKeys":["Gibt an, ob der Editor-Text den Fokus besitzt (Cursor blinkt).","Gibt an, ob der Editor oder ein Editor-Widget den Fokus besitzt (z.\xA0B. ob der Fokus sich im Suchwidget befindet).","Gibt an, ob ein Editor oder eine Rich-Text-Eingabe den Fokus besitzt (Cursor blinkt).","Gibt an, ob der Editor schreibgesch\xFCtzt ist","Gibt an, ob der Kontext ein Diff-Editor ist.","Gibt an, ob der Kontext ein eingebetteter Diff-Editor ist.","Gibt an, ob ein verschobener Codeblock f\xFCr den Vergleich ausgew\xE4hlt wird.","Gibt an, ob der barrierefreie Diff-Viewer sichtbar ist.",'Gibt an, ob f\xFCr den Diff-Editor der Breakpoint f\xFCr das Rendern im Modus "Parallel" oder "Inline" erreicht wurde.','Gibt an, ob "editor.columnSelection" aktiviert ist.',"Gibt an, ob im Editor Text ausgew\xE4hlt ist.","Gibt an, ob der Editor \xFCber Mehrfachauswahl verf\xFCgt.","Gibt an, ob die TAB-TASTE den Fokus aus dem Editor verschiebt.","Gibt an, ob Hover im Editor sichtbar ist.","Gibt an, ob Daraufzeigen im Editor fokussiert ist.","Gibt an, ob der Fokus auf dem Fixierten Bildlauf liegt.","Gibt an, ob der Fixierte Bildlauf sichtbar ist.","Gibt an, ob der eigenst\xE4ndige Farbw\xE4hler sichtbar ist.","Gibt an, ob der eigenst\xE4ndige Farbw\xE4hler fokussiert ist.","Gibt an, ob der Editor Bestandteil eines gr\xF6\xDFeren Editors ist (z.\xA0B. Notebooks).","Der Sprachbezeichner des Editors.","Gibt an, ob der Editor \xFCber einen Vervollst\xE4ndigungselementanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Codeaktionsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen CodeLens-Anbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Definitionsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Deklarationsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Implementierungsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Typdefinitionsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Hoveranbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Dokumenthervorhebungsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Dokumentsymbolanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Verweisanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Umbenennungsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Signaturhilfeanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Inlinehinweisanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Dokumentformatierungsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber einen Anbieter f\xFCr Dokumentauswahlformatierung verf\xFCgt.","Gibt an, ob der Editor \xFCber mehrere Dokumentformatierungsanbieter verf\xFCgt.","Gibt an, ob der Editor \xFCber mehrere Anbieter f\xFCr Dokumentauswahlformatierung verf\xFCgt."],"vs/editor/common/languages":["Array","Boolescher Wert","Klasse","Konstante","Konstruktor","Enumeration","Enumerationsmember","Ereignis","Feld","Datei","Funktion","Schnittstelle","Schl\xFCssel","Methode","Modul","Namespace","NULL","Zahl","Objekt","Operator","Paket","Eigenschaft","Zeichenfolge","Struktur","Typparameter","Variable","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["Nur-Text"],"vs/editor/common/model/editStack":["Eingabe"],"vs/editor/common/standaloneStrings":["Entwickler: Token \xFCberpr\xFCfen","Gehe zu Zeile/Spalte...","Alle Anbieter f\xFCr den Schnellzugriff anzeigen","Befehlspalette","Befehle anzeigen und ausf\xFChren","Gehe zu Symbol...","Gehe zu Symbol nach Kategorie...","Editor-Inhalt","Dr\xFCcken Sie ALT + F1, um die Barrierefreiheitsoptionen aufzurufen.","Zu Design mit hohem Kontrast umschalten","{0} Bearbeitungen in {1} Dateien durchgef\xFChrt"],"vs/editor/common/viewLayout/viewLineRenderer":["Mehr anzeigen ({0})","{0} Zeichen"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["Auswahlanker",'Anker festgelegt bei "{0}:{1}"',"Auswahlanker festlegen","Zu Auswahlanker wechseln","Auswahl von Anker zu Cursor","Auswahlanker abbrechen"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["\xDCbersichtslineal-Markierungsfarbe f\xFCr zusammengeh\xF6rige Klammern.","Gehe zu Klammer","Ausw\xE4hlen bis Klammer","Klammern entfernen","Gehe zu &&Klammer"],"vs/editor/contrib/caretOperations/browser/caretOperations":["Ausgew\xE4hlten Text nach links verschieben","Ausgew\xE4hlten Text nach rechts verschieben"],"vs/editor/contrib/caretOperations/browser/transpose":["Buchstaben austauschen"],"vs/editor/contrib/clipboard/browser/clipboard":["&&Ausschneiden","Ausschneiden","Ausschneiden","Ausschneiden","&&Kopieren","Kopieren","Kopieren","Kopieren","Kopieren als","Kopieren als","Freigeben","Freigeben","Freigeben","&&Einf\xFCgen","Einf\xFCgen","Einf\xFCgen","Einf\xFCgen","Mit Syntaxhervorhebung kopieren"],"vs/editor/contrib/codeAction/browser/codeAction":["Beim Anwenden der Code-Aktion ist ein unbekannter Fehler aufgetreten"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["Art der auszuf\xFChrenden Codeaktion","Legt fest, wann die zur\xFCckgegebenen Aktionen angewendet werden","Die erste zur\xFCckgegebene Codeaktion immer anwenden","Die erste zur\xFCckgegebene Codeaktion anwenden, wenn nur eine vorhanden ist","Zur\xFCckgegebene Codeaktionen nicht anwenden","Legt fest, ob nur bevorzugte Codeaktionen zur\xFCckgegeben werden sollen","Schnelle Problembehebung ...","Keine Codeaktionen verf\xFCgbar",'Keine bevorzugten Codeaktionen f\xFCr "{0}" verf\xFCgbar','Keine Codeaktionen f\xFCr "{0}" verf\xFCgbar',"Keine bevorzugten Codeaktionen verf\xFCgbar","Keine Codeaktionen verf\xFCgbar","Refactoring durchf\xFChren...",'Keine bevorzugten Refactorings f\xFCr "{0}" verf\xFCgbar','Keine Refactorings f\xFCr "{0}" verf\xFCgbar',"Keine bevorzugten Refactorings verf\xFCgbar","Keine Refactorings verf\xFCgbar","Quellaktion...",'Keine bevorzugten Quellaktionen f\xFCr "{0}" verf\xFCgbar','Keine Quellaktionen f\xFCr "{0}" verf\xFCgbar',"Keine bevorzugten Quellaktionen verf\xFCgbar","Keine Quellaktionen verf\xFCgbar","Importe organisieren","Keine Aktion zum Organisieren von Importen verf\xFCgbar","Alle korrigieren",'Aktion "Alle korrigieren" nicht verf\xFCgbar',"Automatisch korrigieren...","Keine automatischen Korrekturen verf\xFCgbar"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["Aktivieren/Deaktivieren Sie die Anzeige von Gruppenheadern im Codeaktionsmen\xFC.","Aktivieren/deaktivieren Sie die Anzeige der n\xE4chstgelegenen schnellen Problembehebung innerhalb einer Zeile, wenn derzeit keine Diagnose durchgef\xFChrt wird."],"vs/editor/contrib/codeAction/browser/codeActionController":["Kontext: {0} in Zeile {1} und Spalte {2}.","Deaktivierte Elemente ausblenden","Deaktivierte Elemente anzeigen"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["Weitere Aktionen...","Schnelle Problembehebung","Extrahieren","Inline","Erneut generieren","Verschieben","Umgeben mit","Quellaktion"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["Zeigt Codeaktionen an. Bevorzugte Schnellkorrektur verf\xFCgbar ({0})","Codeaktionen anzeigen ({0})","Codeaktionen anzeigen"],"vs/editor/contrib/codelens/browser/codelensController":["CodeLens-Befehle f\xFCr aktuelle Zeile anzeigen","Befehl ausw\xE4hlen"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["Zum Umschalten zwischen Farboptionen (rgb/hsl/hex) klicken","Symbol zum Schlie\xDFen des Farbw\xE4hlers"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["Eigenst\xE4ndige Farbw\xE4hler anzeigen oder konzentrieren","&&Eigenst\xE4ndige Farbw\xE4hler anzeigen oder fokussieren","Farbw\xE4hler ausblenden","Farbe mit eigenst\xE4ndigem Farbw\xE4hler einf\xFCgen"],"vs/editor/contrib/comment/browser/comment":["Zeilenkommentar umschalten","Zeilenkommen&&tar umschalten","Zeilenkommentar hinzuf\xFCgen","Zeilenkommentar entfernen","Blockkommentar umschalten","&&Blockkommentar umschalten"],"vs/editor/contrib/contextmenu/browser/contextmenu":["Minimap","Zeichen rendern","Vertikale Gr\xF6\xDFe","Proportional","Ausf\xFCllen","Anpassen","Schieberegler","Maus \xFCber","Immer","Editor-Kontextmen\xFC anzeigen"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["Mit Cursor r\xFCckg\xE4ngig machen","Wiederholen mit Cursor"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["Einf\xFCgen als...","Die ID der Einf\xFCgebearbeitung, die angewendet werden soll. Wenn keine Angabe erfolgt, zeigt der Editor eine Auswahl an."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["Gibt an, ob das Einf\xFCgewidget angezeigt wird.","Einf\xFCgeoptionen anzeigen...","Einf\xFCgehandler werden ausgef\xFChrt. Klicken Sie hier, um den Vorgang abzubrechen.","Einf\xFCgeaktion ausw\xE4hlen","Einf\xFCgehandler werden ausgef\xFChrt"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["Integriert","Nur-Text einf\xFCgen","URI einf\xFCgen","URI einf\xFCgen","Pfade einf\xFCgen","Pfad einf\xFCgen","Relative Pfade einf\xFCgen","Relativen Pfad einf\xFCgen"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["Konfiguriert den Standardablageanbieter f\xFCr den Inhalt eines vorgegebenen MIME-Typs."],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["Gibt an, ob das Ablagewidget angezeigt wird.","Ablageoptionen anzeigen...","Drophandler werden ausgef\xFChrt. Klicken Sie hier, um den Vorgang abzubrechen."],"vs/editor/contrib/editorState/browser/keybindingCancellation":['Gibt an, ob der Editor einen abbrechbaren Vorgang ausf\xFChrt, z.\xA0B. "Verweisvorschau".'],"vs/editor/contrib/find/browser/findController":["Die Datei ist zu gro\xDF, um einen Vorgang zum Ersetzen aller Elemente auszuf\xFChren.","Suchen","&&Suchen",`\xDCberschreibt das Flag \u201EUse Regular Expression\u201C.\r -Das Flag wird f\xFCr die Zukunft nicht gespeichert.\r -0:\xA0Nichts unternehmen\r -1:\xA0TRUE\r -2:\xA0FALSE`,`\xDCberschreibt das Flag \u201EMatch Whole Word\u201C.\r -Das Flag wird f\xFCr die Zukunft nicht gespeichert.\r -0:\xA0Nichts unternehmen\r -1:\xA0TRUE\r -2:\xA0FALSE`,`\xDCberschreibt das Flag \u201EMath Case\u201C.\r -Das Flag wird f\xFCr die Zukunft nicht gespeichert.\r -0:\xA0Nichts unternehmen\r -1:\xA0TRUE\r -2:\xA0FALSE`,`\xDCberschreibt das Flag \u201EPreserve Case\u201C.\r -Das Flag wird f\xFCr die Zukunft nicht gespeichert.\r -0:\xA0Nichts unternehmen\r -1:\xA0TRUE\r -2:\xA0FALSE`,"Mit Argumenten suchen","Mit Auswahl suchen","Weitersuchen","Vorheriges Element suchen","Zu \xDCbereinstimmung wechseln\xA0...","Keine \xDCbereinstimmungen. Versuchen Sie, nach etwas anderem zu suchen.","Geben Sie eine Zahl ein, um zu einer bestimmten \xDCbereinstimmung zu wechseln (zwischen\xA01 und {0}).","Zahl zwischen\xA01 und {0} eingeben","Zahl zwischen\xA01 und {0} eingeben","N\xE4chste Auswahl suchen","Vorherige Auswahl suchen","Ersetzen","&&Ersetzen"],"vs/editor/contrib/find/browser/findWidget":['Symbol f\xFCr "In Auswahl suchen" im Editor-Such-Widget.',"Symbol f\xFCr die Anzeige, dass das Editor-Such-Widget zugeklappt wurde.","Symbol f\xFCr die Anzeige, dass das Editor-Such-Widget aufgeklappt wurde.",'Symbol f\xFCr "Ersetzen" im Editor-Such-Widget.','Symbol f\xFCr "Alle ersetzen" im Editor-Such-Widget.','Symbol f\xFCr "Vorheriges Element suchen" im Editor-Such-Widget.','Symbol f\xFCr "N\xE4chstes Element suchen" im Editor-Such-Widget.',"Suchen/Ersetzen","Suchen","Suchen","Vorherige \xDCbereinstimmung","N\xE4chste \xDCbereinstimmung","In Auswahl suchen","Schlie\xDFen","Ersetzen","Ersetzen","Ersetzen","Alle ersetzen","Ersetzen umschalten","Nur die ersten {0} Ergebnisse wurden hervorgehoben, aber alle Suchoperationen werden auf dem gesamten Text durchgef\xFChrt.","{0} von {1}","Keine Ergebnisse","{0} gefunden",'{0} f\xFCr "{1}" gefunden','{0} f\xFCr "{1}" gefunden, bei {2}','{0} f\xFCr "{1}" gefunden','STRG+EINGABE f\xFCgt jetzt einen Zeilenumbruch ein, statt alles zu ersetzen. Sie k\xF6nnen die Tastenzuordnung f\xFCr "editor.action.replaceAll" \xE4ndern, um dieses Verhalten au\xDFer Kraft zu setzen.'],"vs/editor/contrib/folding/browser/folding":["Auffalten","Faltung rekursiv aufheben","Falten","Einklappung umschalten","Rekursiv falten","Alle Blockkommentare falten","Alle Regionen falten","Alle Regionen auffalten","Alle bis auf ausgew\xE4hlte falten","Alle bis auf ausgew\xE4hlte auffalten","Alle falten","Alle auffalten","Zur \xFCbergeordneten Reduzierung wechseln","Zum vorherigen Faltbereich wechseln","Zum n\xE4chsten Faltbereich wechseln","Faltungsbereich aus Auswahl erstellen","Manuelle Faltbereiche entfernen","Faltebene {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["Hintergrundfarbe hinter gefalteten Bereichen. Die Farbe darf nicht deckend sein, sodass zugrunde liegende Dekorationen nicht ausgeblendet werden.","Farbe des Faltsteuerelements im Editor-Bundsteg.","Symbol f\xFCr aufgeklappte Bereiche im Editor-Glyphenrand.","Symbol f\xFCr zugeklappte Bereiche im Editor-Glyphenrand.","Symbol f\xFCr manuell reduzierte Bereiche im Glyphenrand des Editors.","Symbol f\xFCr manuell erweiterte Bereiche im Glyphenrand des Editors."],"vs/editor/contrib/fontZoom/browser/fontZoom":["Editorschriftart vergr\xF6\xDFern","Editorschriftart verkleinern","Editor Schriftart Vergr\xF6\xDFerung zur\xFCcksetzen"],"vs/editor/contrib/format/browser/format":["1 Formatierung in Zeile {0} vorgenommen","{0} Formatierungen in Zeile {1} vorgenommen","1 Formatierung zwischen Zeilen {0} und {1} vorgenommen","{0} Formatierungen zwischen Zeilen {1} und {2} vorgenommen"],"vs/editor/contrib/format/browser/formatActions":["Dokument formatieren","Auswahl formatieren"],"vs/editor/contrib/gotoError/browser/gotoError":["Gehe zu n\xE4chstem Problem (Fehler, Warnung, Information)","Symbol f\xFCr den Marker zum Wechseln zum n\xE4chsten Element.","Gehe zu vorigem Problem (Fehler, Warnung, Information)","Symbol f\xFCr den Marker zum Wechseln zum vorherigen Element.","Gehe zu dem n\xE4chsten Problem in den Dateien (Fehler, Warnung, Info)","N\xE4chstes &&Problem","Gehe zu dem vorherigen Problem in den Dateien (Fehler, Warnung, Info)","Vorheriges &&Problem"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["Fehler","Warnung","Info","Hinweis","{0} bei {1}. ","{0} von {1} Problemen","{0} von {1} Problemen","Editormarkierung: Farbe bei Fehler des Navigationswidgets.","Hintergrund der Fehler\xFCberschrift des Markernavigationswidgets im Editor.","Editormarkierung: Farbe bei Warnung des Navigationswidgets.","Hintergrund der Warnungs\xFCberschrift des Markernavigationswidgets im Editor.","Editormarkierung: Farbe bei Information des Navigationswidgets.","Hintergrund der Informations\xFCberschrift des Markernavigationswidgets im Editor.","Editormarkierung: Hintergrund des Navigationswidgets."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["Vorschau","Definitionen",'Keine Definition gefunden f\xFCr "{0}".',"Keine Definition gefunden","Gehe zu Definition","Gehe &&zu Definition","Definition an der Seite \xF6ffnen","Definition einsehen","Deklarationen",'Keine Deklaration f\xFCr "{0}" gefunden.',"Keine Deklaration gefunden.","Zur Deklaration wechseln","Gehe zu &&Deklaration",'Keine Deklaration f\xFCr "{0}" gefunden.',"Keine Deklaration gefunden.","Vorschau f\xFCr Deklaration anzeigen","Typdefinitionen",'Keine Typendefinition gefunden f\xFCr "{0}"',"Keine Typendefinition gefunden","Zur Typdefinition wechseln","Zur &&Typdefinition wechseln","Vorschau der Typdefinition anzeigen","Implementierungen",'Keine Implementierung gefunden f\xFCr "{0}"',"Keine Implementierung gefunden","Gehe zu Implementierungen","Gehe zu &&Implementierungen","Vorschau f\xFCr Implementierungen anzeigen",'F\xFCr "{0}" wurden keine Verweise gefunden.',"Keine Referenzen gefunden","Gehe zu Verweisen","Gehe zu &&Verweisen","Verweise","Vorschau f\xFCr Verweise anzeigen","Verweise","Zum beliebigem Symbol wechseln","Speicherorte",'Keine Ergebnisse f\xFCr "{0}"',"Verweise"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["Klicken Sie, um {0} Definitionen anzuzeigen."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":['Gibt an, ob die Verweisvorschau sichtbar ist, z.\xA0B. "Verweisvorschau" oder "Definition einsehen".',"Wird geladen...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} Verweise","{0} Verweis","Verweise"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["Keine Vorschau verf\xFCgbar.","Keine Ergebnisse","Verweise"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["in {0} in Zeile {1} in Spalte {2}","{0} in {1} in Zeile {2} in Spalte {3}","1 Symbol in {0}, vollst\xE4ndiger Pfad {1}","{0} Symbole in {1}, vollst\xE4ndiger Pfad {2}","Es wurden keine Ergebnisse gefunden.","1 Symbol in {0} gefunden","{0} Symbole in {1} gefunden","{0} Symbole in {1} Dateien gefunden"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["Gibt an, ob Symbolpositionen vorliegen, bei denen die Navigation nur \xFCber die Tastatur m\xF6glich ist.","Symbol {0} von {1}, {2} f\xFCr n\xE4chstes","Symbol {0} von {1}"],"vs/editor/contrib/hover/browser/hover":["Anzeigen oder Fokus beim Daraufzeigen","Definitionsvorschauhover anzeigen","Bildlauf nach oben beim Daraufzeigen","Bildlauf nach unten beim Daraufzeigen","Bildlauf nach links beim Daraufzeigen","Bildlauf nach rechts beim Daraufzeigen","Eine Seite nach oben beim Daraufzeigen","Eine Seite nach unten beim Daraufzeigen","Gehe nach oben beim Daraufzeigen","Gehe nach unten beim Daraufzeigen"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["Wird geladen...","Das Rendering langer Zeilen wurde aus Leistungsgr\xFCnden angehalten. Dies kann \xFCber \u201Eeditor.stopRenderingLineAfter\u201C konfiguriert werden.","Die Tokenisierung wird bei langen Zeilen aus Leistungsgr\xFCnden \xFCbersprungen. Dies kann \xFCber \u201Eeditor.maxTokenizationLineLength\u201C konfiguriert werden."],"vs/editor/contrib/hover/browser/markerHoverParticipant":["Problem anzeigen","Keine Schnellkorrekturen verf\xFCgbar","Es wird nach Schnellkorrekturen gesucht...","Keine Schnellkorrekturen verf\xFCgbar","Schnelle Problembehebung ..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["Durch vorherigen Wert ersetzen","Durch n\xE4chsten Wert ersetzen"],"vs/editor/contrib/indentation/browser/indentation":["Einzug in Leerzeichen konvertieren","Einzug in Tabstopps konvertieren","Konfigurierte Tabulatorgr\xF6\xDFe","Standardregisterkartengr\xF6\xDFe","Aktuelle Registerkartengr\xF6\xDFe","Tabulatorgr\xF6\xDFe f\xFCr aktuelle Datei ausw\xE4hlen","Einzug mithilfe von Tabstopps","Einzug mithilfe von Leerzeichen","Anzeigegr\xF6\xDFe der Registerkarte \xE4ndern","Einzug aus Inhalt erkennen","Neuen Einzug f\xFCr Zeilen festlegen","Gew\xE4hlte Zeilen zur\xFCckziehen"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["Zum Einf\xFCgen doppelklicken","BEFEHL + Klicken","STRG + Klicken","OPTION + Klicken","ALT + Klicken","Wechseln Sie zu Definition ({0}), klicken Sie mit der rechten Maustaste, um weitere Informationen zu finden.","Gehe zu Definition ({0})","Befehl ausf\xFChren"],"vs/editor/contrib/inlineCompletions/browser/commands":["N\xE4chsten Inline-Vorschlag anzeigen","Vorherigen Inline-Vorschlag anzeigen","Inline-Vorschlag ausl\xF6sen","N\xE4chstes Wort des Inline-Vorschlags annehmen","Wort annehmen","N\xE4chste Zeile des Inlinevorschlags akzeptieren","Zeile annehmen","Inline-Vorschlag annehmen","Annehmen","Inlinevorschlag ausblenden","Symbolleiste immer anzeigen"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["Vorschlag:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["Gibt an, ob ein Inline-Vorschlag sichtbar ist.","Gibt an, ob der Inline-Vorschlag mit Leerzeichen beginnt.","Ob der Inline-Vorschlag mit Leerzeichen beginnt, das kleiner ist als das, was durch die Tabulatortaste eingef\xFCgt werden w\xFCrde","Gibt an, ob Vorschl\xE4ge f\xFCr den aktuellen Vorschlag unterdr\xFCckt werden sollen"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["\xDCberpr\xFCfen Sie dies in der barrierefreien Ansicht ({0})."],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["Symbol f\xFCr die Anzeige des n\xE4chsten Parameterhinweises.","Symbol f\xFCr die Anzeige des vorherigen Parameterhinweises.","{0} ({1})","Zur\xFCck","Weiter"],"vs/editor/contrib/lineSelection/browser/lineSelection":["Zeilenauswahl erweitern"],"vs/editor/contrib/linesOperations/browser/linesOperations":["Zeile nach oben kopieren","Zeile nach oben &&kopieren","Zeile nach unten kopieren","Zeile nach unten ko&&pieren","Auswahl duplizieren","&&Auswahl duplizieren","Zeile nach oben verschieben","Zeile nach oben &&verschieben","Zeile nach unten verschieben","Zeile nach &&unten verschieben","Zeilen aufsteigend sortieren","Zeilen absteigend sortieren","Doppelte Zeilen l\xF6schen","Nachgestelltes Leerzeichen k\xFCrzen","Zeile l\xF6schen","Zeileneinzug","Zeile ausr\xFCcken","Zeile oben einf\xFCgen","Zeile unten einf\xFCgen","Alle \xFCbrigen l\xF6schen","Alle rechts l\xF6schen","Zeilen verkn\xFCpfen","Zeichen um den Cursor herum transponieren","In Gro\xDFbuchstaben umwandeln","In Kleinbuchstaben umwandeln","In gro\xDFe Anfangsbuchstaben umwandeln","In Snake Case umwandeln","In Camel-Fall transformieren","Verwandle dich in eine Kebab-H\xFClle"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["Verkn\xFCpfte Bearbeitung starten","Hintergrundfarbe, wenn der Editor automatisch nach Typ umbenennt."],"vs/editor/contrib/links/browser/links":["Fehler beim \xD6ffnen dieses Links, weil er nicht wohlgeformt ist: {0}","Fehler beim \xD6ffnen dieses Links, weil das Ziel fehlt.","Befehl ausf\xFChren","Link folgen","BEFEHL + Klicken","STRG + Klicken","OPTION + Klicken","alt + klicken",'F\xFChren Sie den Befehl "{0}" aus.',"Link \xF6ffnen"],"vs/editor/contrib/message/browser/messageController":["Gibt an, ob der Editor zurzeit eine Inlinenachricht anzeigt."],"vs/editor/contrib/multicursor/browser/multicursor":["Hinzugef\xFCgter Cursor: {0}","Hinzugef\xFCgte Cursor: {0}","Cursor oberhalb hinzuf\xFCgen","Cursor oberh&&alb hinzuf\xFCgen","Cursor unterhalb hinzuf\xFCgen","Cursor unterhal&&b hinzuf\xFCgen","Cursor an Zeilenenden hinzuf\xFCgen","C&&ursor an Zeilenenden hinzuf\xFCgen","Cursor am Ende hinzuf\xFCgen","Cursor am Anfang hinzuf\xFCgen","Auswahl zur n\xE4chsten \xDCbereinstimmungssuche hinzuf\xFCgen","&&N\xE4chstes Vorkommen hinzuf\xFCgen","Letzte Auswahl zu vorheriger \xDCbereinstimmungssuche hinzuf\xFCgen","Vo&&rheriges Vorkommen hinzuf\xFCgen","Letzte Auswahl in n\xE4chste \xDCbereinstimmungssuche verschieben","Letzte Auswahl in vorherige \xDCbereinstimmungssuche verschieben","Alle Vorkommen ausw\xE4hlen und \xDCbereinstimmung suchen","Alle V&&orkommen ausw\xE4hlen","Alle Vorkommen \xE4ndern","Fokus auf n\xE4chsten Cursor","Fokussiert den n\xE4chsten Cursor","Fokus auf vorherigen Cursor","Fokussiert den vorherigen Cursor"],"vs/editor/contrib/parameterHints/browser/parameterHints":["Parameterhinweise ausl\xF6sen"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["Symbol f\xFCr die Anzeige des n\xE4chsten Parameterhinweises.","Symbol f\xFCr die Anzeige des vorherigen Parameterhinweises.","{0}, Hinweis","Vordergrundfarbe des aktiven Elements im Parameterhinweis."],"vs/editor/contrib/peekView/browser/peekView":["Gibt an, ob der aktuelle Code-Editor in der Vorschau eingebettet ist.","Schlie\xDFen","Hintergrundfarbe des Titelbereichs der Peek-Ansicht.","Farbe des Titels in der Peek-Ansicht.","Farbe der Titelinformationen in der Peek-Ansicht.","Farbe der Peek-Ansichtsr\xE4nder und des Pfeils.","Hintergrundfarbe der Ergebnisliste in der Peek-Ansicht.","Vordergrundfarbe f\xFCr Zeilenknoten in der Ergebnisliste der Peek-Ansicht.","Vordergrundfarbe f\xFCr Dateiknoten in der Ergebnisliste der Peek-Ansicht.","Hintergrundfarbe des ausgew\xE4hlten Eintrags in der Ergebnisliste der Peek-Ansicht.","Vordergrundfarbe des ausgew\xE4hlten Eintrags in der Ergebnisliste der Peek-Ansicht.","Hintergrundfarbe des Peek-Editors.","Hintergrundfarbe der Leiste im Peek-Editor.","Die Hintergrundfarbe f\xFCr den \u201ESticky\u201C-Bildlaufeffekt im Editor f\xFCr die \u201EPeek\u201C-Ansicht.","Farbe f\xFCr \xDCbereinstimmungsmarkierungen in der Ergebnisliste der Peek-Ansicht.","Farbe f\xFCr \xDCbereinstimmungsmarkierungen im Peek-Editor.","Rahmen f\xFCr \xDCbereinstimmungsmarkierungen im Peek-Editor."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["\xD6ffnen Sie zuerst einen Text-Editor, um zu einer Zeile zu wechseln.","Wechseln Sie zu Zeile {0} und Zeichen {1}.","Zu Zeile {0} wechseln.","Aktuelle Zeile: {0}, Zeichen: {1}. Geben Sie eine Zeilennummer zwischen 1 und {2} ein, zu der Sie navigieren m\xF6chten.","Aktuelle Zeile: {0}, Zeichen: {1}. Geben Sie eine Zeilennummer ein, zu der Sie navigieren m\xF6chten."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["\xD6ffnen Sie zun\xE4chst einen Text-Editor mit Symbolinformationen, um zu einem Symbol zu navigieren.","Der aktive Text-Editor stellt keine Symbolinformationen bereit.","Keine \xFCbereinstimmenden Editorsymbole.","Keine Editorsymbole.","An der Seite \xF6ffnen","Unten \xF6ffnen","Symbole ({0})","Eigenschaften ({0})","Methoden ({0})","Funktionen ({0})","Konstruktoren ({0})","Variablen ({0})","Klassen ({0})","Strukturen ({0})","Ereignisse ({0})","Operatoren ({0})","Schnittstellen ({0})","Namespaces ({0})","Pakete ({0})","Typparameter ({0})","Module ({0})","Eigenschaften ({0})","Enumerationen ({0})","Enumerationsmember ({0})","Zeichenfolgen ({0})","Dateien ({0})","Arrays ({0})","Zahlen ({0})","Boolesche Werte ({0})","Objekte ({0})","Schl\xFCssel ({0})","Felder ({0})","Konstanten ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["Bearbeitung von schreibgesch\xFCtzter Eingabe nicht m\xF6glich","Ein Bearbeiten ist im schreibgesch\xFCtzten Editor nicht m\xF6glich"],"vs/editor/contrib/rename/browser/rename":["Kein Ergebnis.","Ein unbekannter Fehler ist beim Aufl\xF6sen der Umbenennung eines Ortes aufgetreten.","'{0}' wird in '{1}' umbenannt","{0} wird in {1} umbenannt.",'"{0}" erfolgreich in "{1}" umbenannt. Zusammenfassung: {2}',"Die rename-Funktion konnte die \xC4nderungen nicht anwenden.","Die rename-Funktion konnte die \xC4nderungen nicht berechnen.","Symbol umbenennen","M\xF6glichkeit aktivieren/deaktivieren, \xC4nderungen vor dem Umbenennen als Vorschau anzeigen zu lassen"],"vs/editor/contrib/rename/browser/renameInputField":["Gibt an, ob das Widget zum Umbenennen der Eingabe sichtbar ist.","Benennen Sie die Eingabe um. Geben Sie einen neuen Namen ein, und dr\xFCcken Sie die EINGABETASTE, um den Commit auszuf\xFChren.","{0} zur Umbenennung, {1} zur Vorschau"],"vs/editor/contrib/smartSelect/browser/smartSelect":["Auswahl aufklappen","Auswahl &&erweitern","Markierung verkleinern","Au&&swahl verkleinern"],"vs/editor/contrib/snippet/browser/snippetController2":["Gibt an, ob der Editor sich zurzeit im Schnipselmodus befindet.","Gibt an, ob ein n\xE4chster Tabstopp im Schnipselmodus vorhanden ist.","Gibt an, ob ein vorheriger Tabstopp im Schnipselmodus vorhanden ist.","Zum n\xE4chsten Platzhalter wechseln..."],"vs/editor/contrib/snippet/browser/snippetVariables":["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","So","Mo","Di","Mi","Do","Fr","Sa","Januar","Februar","M\xE4rz","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember","Jan","Feb","M\xE4r","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["Fixierten Bildlauf umschalten","Fixierten Bildlauf &&umschalten","Fixierter Bildlauf","&&Fixierter Bildlauf","Fokus auf Fixierten Bildlauf","&&Fokus fixierter Bildlauf","N\xE4chste fixierte Zeile ausw\xE4hlen","Zuletzt gew\xE4hlte fixierte Zeile ausw\xE4hlen","Gehe zur fokussierten fixierten Zeile","Editor ausw\xE4hlen"],"vs/editor/contrib/suggest/browser/suggest":["Gibt an, ob ein Vorschlag fokussiert ist","Gibt an, ob Vorschlagsdetails sichtbar sind.","Gibt an, ob mehrere Vorschl\xE4ge zur Auswahl stehen.","Gibt an, ob das Einf\xFCgen des aktuellen Vorschlags zu einer \xC4nderung f\xFChrt oder ob bereits alles eingegeben wurde.","Gibt an, ob Vorschl\xE4ge durch Dr\xFCcken der EINGABETASTE eingef\xFCgt werden.","Gibt an, ob der aktuelle Vorschlag Verhalten zum Einf\xFCgen und Ersetzen aufweist.","Gibt an, ob Einf\xFCgen oder Ersetzen als Standardverhalten verwendet wird.","Gibt an, ob der aktuelle Vorschlag die Aufl\xF6sung weiterer Details unterst\xFCtzt."],"vs/editor/contrib/suggest/browser/suggestController":['Das Akzeptieren von "{0}" ergab {1} zus\xE4tzliche Bearbeitungen.',"Vorschlag ausl\xF6sen","Einf\xFCgen","Einf\xFCgen","Ersetzen","Ersetzen","Einf\xFCgen","weniger anzeigen","mehr anzeigen","Gr\xF6\xDFe des Vorschlagswidgets zur\xFCcksetzen"],"vs/editor/contrib/suggest/browser/suggestWidget":["Hintergrundfarbe des Vorschlagswidgets.","Rahmenfarbe des Vorschlagswidgets.","Vordergrundfarbe des Vorschlagswidgets.","Die Vordergrundfarbe des ausgew\xE4hlten Eintrags im Vorschlagswidget.","Die Vordergrundfarbe des Symbols des ausgew\xE4hlten Eintrags im Vorschlagswidget.","Hintergrundfarbe des ausgew\xE4hlten Eintrags im Vorschlagswidget.","Farbe der Trefferhervorhebung im Vorschlagswidget.","Die Farbe des Treffers wird im Vorschlagswidget hervorgehoben, wenn ein Element fokussiert wird.","Vordergrundfarbe des Status des Vorschlagswidgets.","Wird geladen...","Keine Vorschl\xE4ge.","Vorschlagen","{0} {1}, {2}","{0} {1}","{0}, {1}","{0}, Dokumente: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["Schlie\xDFen","Wird geladen..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["Symbol f\xFCr weitere Informationen im Vorschlags-Widget.","Weitere Informationen"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["Die Vordergrundfarbe f\xFCr Arraysymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr boolesche Symbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Klassensymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Farbsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr konstante Symbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Konstruktorsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Enumeratorsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Enumeratormembersymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Ereignissymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Feldsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Dateisymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Ordnersymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Funktionssymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Schnittstellensymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Schl\xFCsselsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Schl\xFCsselwortsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Methodensymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Modulsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Namespacesymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr NULL-Symbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Zahlensymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Objektsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Operatorsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Paketsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Eigenschaftensymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Referenzsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Codeschnipselsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Zeichenfolgensymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Struktursymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Textsymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Typparametersymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr Einheitensymbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt.","Die Vordergrundfarbe f\xFCr variable Symbole. Diese Symbole werden in den Widgets f\xFCr Gliederung, Breadcrumbs und Vorschl\xE4ge angezeigt."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["TAB-Umschalttaste verschiebt Fokus","Beim Dr\xFCcken auf Tab wird der Fokus jetzt auf das n\xE4chste fokussierbare Element verschoben","Beim Dr\xFCcken von Tab wird jetzt das Tabulator-Zeichen eingef\xFCgt"],"vs/editor/contrib/tokenization/browser/tokenization":["Entwickler: Force Retokenize"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["Symbol, das mit einer Warnmeldung im Erweiterungs-Editor angezeigt wird.","Dieses Dokument enth\xE4lt viele nicht einfache ASCII-Unicode-Zeichen.","Dieses Dokument enth\xE4lt viele mehrdeutige Unicode-Zeichen.","Dieses Dokument enth\xE4lt viele unsichtbare Unicode-Zeichen.","Das Zeichen {0} kann mit dem Zeichen {1} verwechselt werden, was im Quellcode h\xE4ufiger vorkommt.","Das Zeichen {0} kann mit dem Zeichen {1} verwechselt werden, was im Quellcode h\xE4ufiger vorkommt.","Das Zeichen {0} ist nicht sichtbar.","Das Zeichen {0} ist kein einfaches ASCII-Zeichen.","Einstellungen anpassen","Hervorhebung in Kommentaren deaktivieren","Deaktivieren der Hervorhebung von Zeichen in Kommentaren","Hervorhebung in Zeichenfolgen deaktivieren","Deaktivieren der Hervorhebung von Zeichen in Zeichenfolgen","Mehrdeutige Hervorhebung deaktivieren","Deaktivieren der Hervorhebung von mehrdeutigen Zeichen","Unsichtbare Hervorhebung deaktivieren","Deaktivieren der Hervorhebung unsichtbarer Zeichen","Nicht-ASCII-Hervorhebung deaktivieren","Deaktivieren der Hervorhebung von nicht einfachen ASCII-Zeichen","Ausschlussoptionen anzeigen","{0} (unsichtbares Zeichen) von der Hervorhebung ausschlie\xDFen","{0} nicht hervorheben","Unicodezeichen zulassen, die in der Sprache \u201E{0}\u201C h\xE4ufiger vorkommen.","Konfigurieren der Optionen f\xFCr die Unicode-Hervorhebung"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["Ungew\xF6hnliche Zeilentrennzeichen","Ungew\xF6hnliche Zeilentrennzeichen erkannt",`Die Datei "{0}" enth\xE4lt mindestens ein ungew\xF6hnliches Zeilenabschlusszeichen, z. B. Zeilentrennzeichen (LS) oder Absatztrennzeichen (PS).\r -\r -Es wird empfohlen, sie aus der Datei zu entfernen. Dies kann \xFCber "editor.unusualLineTerminators" konfiguriert werden.`,"&&Ungew\xF6hnliche Zeilenabschlusszeichen entfernen","Ignorieren"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["Hintergrundfarbe eines Symbols beim Lesezugriff, z.B. beim Lesen einer Variablen. Die Farbe darf nicht deckend sein, damit sie nicht die zugrunde liegenden Dekorationen verdeckt.","Hintergrundfarbe eines Symbols bei Schreibzugriff, z.B. beim Schreiben in eine Variable. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Die Hintergrundfarbe eines Textteils f\xFCr ein Symbol. Die Farbe darf nicht deckend sein, um zugrunde liegende Dekorationen nicht auszublenden.","Randfarbe eines Symbols beim Lesezugriff, wie etwa beim Lesen einer Variablen.","Randfarbe eines Symbols beim Schreibzugriff, wie etwa beim Schreiben einer Variablen.","Die Rahmenfarbe eines Textteils f\xFCr ein Symbol.","\xDCbersichtslinealmarkerfarbd f\xFCr das Hervorheben von Symbolen. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","\xDCbersichtslinealmarkerfarbe f\xFCr Symbolhervorhebungen bei Schreibzugriff. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Die Markierungsfarbe des \xDCbersichtslineals eines Textteils f\xFCr ein Symbol. Die Farbe darf nicht deckend sein, um zugrunde liegende Dekorationen nicht auszublenden."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["Gehe zur n\xE4chsten Symbolhervorhebungen","Gehe zur vorherigen Symbolhervorhebungen","Symbol-Hervorhebung ein-/ausschalten"],"vs/editor/contrib/wordOperations/browser/wordOperations":["Wort l\xF6schen"],"vs/platform/action/common/actionCommonCategories":["Ansehen","Hilfe","Test","Datei","Einstellungen","Entwickler"],"vs/platform/actionWidget/browser/actionList":["{0} zum Anwenden, {1} f\xFCr die Vorschau","{0} zum Anwenden","{0} deaktiviert, Grund: {1}","Aktionswidget"],"vs/platform/actionWidget/browser/actionWidget":["Hintergrundfarbe f\xFCr umgeschaltete Aktionselemente in der Aktionsleiste.","Gibt an, ob die Aktionswidgetliste sichtbar ist.","Codeaktionswidget ausblenden","Vorherige Aktion ausw\xE4hlen","N\xE4chste Aktion ausw\xE4hlen","Ausgew\xE4hlte Aktion akzeptieren","Vorschau f\xFCr ausgew\xE4hlte Elemente anzeigen"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["Ausblenden","Men\xFC zur\xFCcksetzen"],"vs/platform/actions/common/menuService":['"{0}" ausblenden'],"vs/platform/audioCues/browser/audioCueService":["Fehler in der Zeile","Warnung in der Zeile","Gefalteter Bereich in der Zeile","Haltepunkt in der Zeile","Inlinevorschlag in der Zeile","Terminale schnelle Problembehebung","Debugger auf Haltepunkt beendet","Keine Inlay-Hinweise in der Zeile","Aufgabe abgeschlossen","Aufgabe fehlgeschlagen","Terminalbefehl fehlgeschlagen","Terminalglocke","Notebookzelle abgeschlossen","Notebookzelle fehlgeschlagen","Vergleichslinie eingef\xFCgt","Vergleichslinie gel\xF6scht","Vergleichslinie ge\xE4ndert","Chatanfrage gesendet","Chatantwort empfangen","Chatantwort ausstehend"],"vs/platform/configuration/common/configurationRegistry":["Au\xDFerkraftsetzungen f\xFCr die Standardsprachkonfiguration","Konfigurieren Sie Einstellungen, die f\xFCr die Sprache {0} \xFCberschrieben werden sollen.","Zu \xFCberschreibende Editor-Einstellungen f\xFCr eine Sprache konfigurieren.","Diese Einstellung unterst\xFCtzt keine sprachspezifische Konfiguration.","Zu \xFCberschreibende Editor-Einstellungen f\xFCr eine Sprache konfigurieren.","Diese Einstellung unterst\xFCtzt keine sprachspezifische Konfiguration.","Eine leere Eigenschaft kann nicht registriert werden.",'"{0}" kann nicht registriert werden. Stimmt mit dem Eigenschaftsmuster "\\\\[.*\\\\]$" zum Beschreiben sprachspezifischer Editor-Einstellungen \xFCberein. Verwenden Sie den Beitrag "configurationDefaults".','{0}" kann nicht registriert werden. Diese Eigenschaft ist bereits registriert.','"{0}" kann nicht registriert werden. Die zugeordnete Richtlinie {1} ist bereits bei {2} registriert.'],"vs/platform/contextkey/browser/contextKeyService":["Ein Befehl, der Informationen zu Kontextschl\xFCsseln zur\xFCckgibt"],"vs/platform/contextkey/common/contextkey":["Leerer Kontextschl\xFCsselausdruck","Haben Sie vergessen, einen Ausdruck zu schreiben? Sie k\xF6nnen auch \u201Efalse\u201C oder \u201Etrue\u201C festlegen, um immer auf \u201Efalse\u201C oder \u201Etrue\u201C auszuwerten.","\u201Ein\u201C nach \u201Enot\u201C.","schlie\xDFende Klammer \u201E)\u201C","Unerwartetes Token","Haben Sie vergessen, && oder || vor dem Token einzuf\xFCgen?","Unerwartetes Ende des Ausdrucks.","Haben Sie vergessen, einen Kontextschl\xFCssel zu setzen?",`Erwartet: {0}\r -Empfangen: \u201E{1}\u201C.`],"vs/platform/contextkey/common/contextkeys":["Gibt an, ob macOS als Betriebssystem verwendet wird.","Gibt an, ob Linux als Betriebssystem verwendet wird.","Gibt an, ob Windows als Betriebssystem verwendet wird.","Gibt an, ob es sich bei der Plattform um einen Webbrowser handelt.","Gibt an, ob macOS auf einer Nicht-Browser-Plattform als Betriebssystem verwendet wird.","Gibt an, ob iOS als Betriebssystem verwendet wird.","Gibt an, ob es sich bei der Plattform um einen mobilen Webbrowser handelt.","Qualit\xE4tstyp des VS Codes","Gibt an, ob sich der Tastaturfokus in einem Eingabefeld befindet."],"vs/platform/contextkey/common/scanner":["Meinten Sie {0}?","Meinten Sie {0} oder {1}?","Meinten Sie {0}, {1} oder {2}?","Haben Sie vergessen, das Anf\xFChrungszeichen zu \xF6ffnen oder zu schlie\xDFen?","Haben Sie vergessen, das Zeichen \u201E/\u201C (Schr\xE4gstrich) zu escapen? Setzen Sie zwei Backslashes davor, um es zu escapen, z. B. \u201E\\\\/\u201C."],"vs/platform/history/browser/contextScopedHistoryWidget":["Gibt an, ob Vorschl\xE4ge sichtbar sind."],"vs/platform/keybinding/common/abstractKeybindingService":["({0}) wurde gedr\xFCckt. Es wird auf die zweite Taste in der Kombination gewartet...","({0}) wurde gedr\xFCckt. Es wird auf die zweite Taste in der Kombination gewartet...","Die Tastenkombination ({0}, {1}) ist kein Befehl.","Die Tastenkombination ({0}, {1}) ist kein Befehl."],"vs/platform/list/browser/listService":["Workbench","Ist unter Windows und Linux der STRG-Taste und unter macOS der Befehlstaste zugeordnet.","Ist unter Windows und Linux der ALT-Taste und unter macOS der Wahltaste zugeordnet.",'Der Modifizierer zum Hinzuf\xFCgen eines Elements in B\xE4umen und Listen zu einer Mehrfachauswahl mit der Maus (zum Beispiel im Explorer, in ge\xF6ffneten Editoren und in der SCM-Ansicht). Die Mausbewegung "Seitlich \xF6ffnen" wird \u2013 sofern unterst\xFCtzt \u2013 so angepasst, dass kein Konflikt mit dem Modifizierer f\xFCr Mehrfachauswahl entsteht.',"Steuert, wie Elemente in Strukturen und Listen mithilfe der Maus ge\xF6ffnet werden (sofern unterst\xFCtzt). Bei \xFCbergeordneten Elementen, deren untergeordnete Elemente sich in Strukturen befinden, steuert diese Einstellung, ob ein Einfachklick oder ein Doppelklick das \xFCbergeordnete Elemente erweitert. Beachten Sie, dass einige Strukturen und Listen diese Einstellung ggf. ignorieren, wenn sie nicht zutrifft.","Steuert, ob Listen und Strukturen ein horizontales Scrollen in der Workbench unterst\xFCtzen. Warnung: Das Aktivieren dieser Einstellung kann sich auf die Leistung auswirken.","Steuert, ob Klicks in der Bildlaufleiste Seite f\xFCr Seite scrollen.","Steuert den Struktureinzug in Pixeln.","Steuert, ob die Struktur Einzugsf\xFChrungslinien rendern soll.","Steuert, ob Listen und Strukturen einen optimierten Bildlauf verwenden.",'Ein Multiplikator, der f\xFCr die Mausrad-Bildlaufereignisse "deltaX" und "deltaY" verwendet werden soll.',"Multiplikator f\xFCr Scrollgeschwindigkeit bei Dr\xFCcken von ALT.","Elemente beim Suchen hervorheben. Die Navigation nach oben und unten durchl\xE4uft dann nur die markierten Elemente.","Filterelemente bei der Suche.","Steuert den Standardsuchmodus f\xFCr Listen und Strukturen in der Workbench.","Bei der einfachen Tastaturnavigation werden Elemente in den Fokus genommen, die mit der Tastatureingabe \xFCbereinstimmen. Die \xDCbereinstimmungen gelten nur f\xFCr Pr\xE4fixe.","Hervorheben von Tastaturnavigationshervorgebungselemente, die mit der Tastatureingabe \xFCbereinstimmen. Beim nach oben und nach unten Navigieren werden nur die hervorgehobenen Elemente durchlaufen.","Durch das Filtern der Tastaturnavigation werden alle Elemente herausgefiltert und ausgeblendet, die nicht mit der Tastatureingabe \xFCbereinstimmen.",'Steuert die Tastaturnavigation in Listen und Strukturen in der Workbench. Kann "simple" (einfach), "highlight" (hervorheben) und "filter" (filtern) sein.',"Bitte verwenden Sie stattdessen \u201Eworkbench.list.defaultFindMode\u201C und \u201Eworkbench.list.typeNavigationMode\u201C.","Verwenden Sie bei der Suche eine Fuzzy\xFCbereinstimmung.","Verwenden Sie bei der Suche eine zusammenh\xE4ngende \xDCbereinstimmung.","Steuert den Typ der \xDCbereinstimmung, der beim Durchsuchen von Listen und Strukturen in der Workbench verwendet wird.","Steuert, wie Strukturordner beim Klicken auf die Ordnernamen erweitert werden. Beachten Sie, dass einige Strukturen und Listen diese Einstellung ggf. ignorieren, wenn sie nicht zutrifft.",'Steuert die Funktionsweise der Typnavigation in Listen und Strukturen in der Workbench. Bei einer Festlegung auf "trigger" beginnt die Typnavigation, sobald der Befehl "list.triggerTypeNavigation" ausgef\xFChrt wird.'],"vs/platform/markers/common/markers":["Fehler","Warnung","Info"],"vs/platform/quickinput/browser/commandsQuickAccess":["zuletzt verwendet","\xE4hnliche Befehle","h\xE4ufig verwendet","andere Befehle","\xE4hnliche Befehle","{0}, {1}",'Der Befehl "{0}" hat zu einem Fehler gef\xFChrt.'],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["Zur\xFCck","Dr\xFCcken Sie die EINGABETASTE, um Ihre Eingabe zu best\xE4tigen, oder ESC, um den Vorgang abzubrechen.","{0}/{1}","Nehmen Sie eine Eingabe vor, um die Ergebnisse einzugrenzen."],"vs/platform/quickinput/browser/quickInputController":["Aktivieren Sie alle Kontrollk\xE4stchen","{0} Ergebnisse","{0} ausgew\xE4hlt","OK","Benutzerdefiniert","Zur\xFCck ({0})","Zur\xFCck"],"vs/platform/quickinput/browser/quickInputList":["Schnelleingabe"],"vs/platform/quickinput/browser/quickInputUtils":['Klicken, um den Befehl "{0}" auszuf\xFChren'],"vs/platform/theme/common/colorRegistry":["Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente \xFCberschrieben wird.","Allgemeine Vordergrundfarbe. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente \xFCberschrieben wird.","Allgemeine Vordergrundfarbe f\xFCr Fehlermeldungen. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente \xFCberschrieben wird.","Vordergrundfarbe f\xFCr Beschreibungstexte, die weitere Informationen anzeigen, z.B. f\xFCr eine Beschriftung.","Die f\xFCr Symbole in der Workbench verwendete Standardfarbe.","Allgemeine Rahmenfarbe f\xFCr fokussierte Elemente. Diese Farbe wird nur verwendet, wenn sie nicht durch eine Komponente \xFCberschrieben wird.","Ein zus\xE4tzlicher Rahmen um Elemente, mit dem diese von anderen getrennt werden, um einen gr\xF6\xDFeren Kontrast zu erreichen.","Ein zus\xE4tzlicher Rahmen um aktive Elemente, mit dem diese von anderen getrennt werden, um einen gr\xF6\xDFeren Kontrast zu erreichen.","Hintergrundfarbe der Textauswahl in der Workbench (z.B. f\xFCr Eingabefelder oder Textbereiche). Diese Farbe gilt nicht f\xFCr die Auswahl im Editor.","Farbe f\xFCr Text-Trennzeichen.","Vordergrundfarbe f\xFCr Links im Text.","Vordergrundfarbe f\xFCr angeklickte Links im Text und beim Zeigen darauf mit der Maus.","Vordergrundfarbe f\xFCr vorformatierte Textsegmente.","Hintergrundfarbe f\xFCr Blockzitate im Text.","Rahmenfarbe f\xFCr blockquote-Elemente im Text.","Hintergrundfarbe f\xFCr Codebl\xF6cke im Text.","Schattenfarbe von Widgets wie zum Beispiel Suchen/Ersetzen innerhalb des Editors.","Die Rahmenfarbe von Widgets, z.\xA0B. Suchen/Ersetzen im Editor.","Hintergrund f\xFCr Eingabefeld.","Vordergrund f\xFCr Eingabefeld.","Rahmen f\xFCr Eingabefeld.","Rahmenfarbe f\xFCr aktivierte Optionen in Eingabefeldern.","Hintergrundfarbe f\xFCr aktivierte Optionen in Eingabefeldern.","Hintergrundfarbe beim Daraufzeigen f\xFCr Optionen in Eingabefeldern.","Vordergrundfarbe f\xFCr aktivierte Optionen in Eingabefeldern.","Eingabefeld-Vordergrundfarbe f\xFCr Platzhaltertext.","Hintergrundfarbe bei der Eingabevalidierung f\xFCr den Schweregrad der Information.","Vordergrundfarbe bei der Eingabevalidierung f\xFCr den Schweregrad der Information.","Rahmenfarbe bei der Eingabevalidierung f\xFCr den Schweregrad der Information.","Hintergrundfarbe bei der Eingabevalidierung f\xFCr den Schweregrad der Warnung.","Vordergrundfarbe bei der Eingabevalidierung f\xFCr den Schweregrad der Warnung.","Rahmenfarbe bei der Eingabevalidierung f\xFCr den Schweregrad der Warnung.","Hintergrundfarbe bei der Eingabevalidierung f\xFCr den Schweregrad des Fehlers.","Vordergrundfarbe bei der Eingabevalidierung f\xFCr den Schweregrad des Fehlers.","Rahmenfarbe bei der Eingabevalidierung f\xFCr den Schweregrad des Fehlers.","Hintergrund f\xFCr Dropdown.","Hintergrund f\xFCr Dropdownliste.","Vordergrund f\xFCr Dropdown.","Rahmen f\xFCr Dropdown.","Vordergrundfarbe der Schaltfl\xE4che.","Farbe des Schaltfl\xE4chentrennzeichens.","Hintergrundfarbe der Schaltfl\xE4che.","Hintergrundfarbe der Schaltfl\xE4che, wenn darauf gezeigt wird.","Rahmenfarbe der Schaltfl\xE4che.","Sekund\xE4re Vordergrundfarbe der Schaltfl\xE4che.","Hintergrundfarbe der sekund\xE4ren Schaltfl\xE4che.","Hintergrundfarbe der sekund\xE4ren Schaltfl\xE4che beim Daraufzeigen.","Hintergrundfarbe f\xFCr Badge. Badges sind kurze Info-Texte, z.B. f\xFCr Anzahl Suchergebnisse.","Vordergrundfarbe f\xFCr Badge. Badges sind kurze Info-Texte, z.B. f\xFCr Anzahl Suchergebnisse.","Schatten der Scrollleiste, um anzuzeigen, dass die Ansicht gescrollt wird.","Hintergrundfarbe vom Scrollbar-Schieber","Hintergrundfarbe des Schiebereglers, wenn darauf gezeigt wird.","Hintergrundfarbe des Schiebereglers, wenn darauf geklickt wird.","Hintergrundfarbe des Fortschrittbalkens, der f\xFCr zeitintensive Vorg\xE4nge angezeigt werden kann.","Hintergrundfarbe f\xFCr Fehlertext im Editor. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Vordergrundfarbe von Fehlerunterstreichungen im Editor.","Wenn festgelegt, wird die Farbe doppelter Unterstreichungen f\xFCr Fehler im Editor angezeigt.","Hintergrundfarbe f\xFCr Warnungstext im Editor. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Vordergrundfarbe von Warnungsunterstreichungen im Editor.","Wenn festgelegt, wird die Farbe doppelter Unterstreichungen f\xFCr Warnungen im Editor angezeigt.","Hintergrundfarbe f\xFCr Infotext im Editor. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Vordergrundfarbe von Informationsunterstreichungen im Editor.","Wenn festgelegt, wird die Farbe doppelter Unterstreichungen f\xFCr Infos im Editor angezeigt.","Vordergrundfarbe der Hinweisunterstreichungen im Editor.","Wenn festgelegt, wird die Farbe doppelter Unterstreichungen f\xFCr Hinweise im Editor angezeigt.","Rahmenfarbe aktiver Trennleisten.","Hintergrundfarbe des Editors.","Standardvordergrundfarbe des Editors.","Einrastfunktion der Hintergrundfarbe f\xFCr den Editor","Einrastfunktion beim Daraufzeigen der Hintergrundfarbe f\xFCr den Editor","Hintergrundfarbe von Editor-Widgets wie zum Beispiel Suchen/Ersetzen.","Vordergrundfarbe f\xFCr Editorwidgets wie Suchen/Ersetzen.","Rahmenfarbe von Editorwigdets. Die Farbe wird nur verwendet, wenn f\xFCr das Widget ein Rahmen verwendet wird und die Farbe nicht von einem Widget \xFCberschrieben wird.","Rahmenfarbe der Gr\xF6\xDFenanpassungsleiste von Editorwigdets. Die Farbe wird nur verwendet, wenn f\xFCr das Widget ein Gr\xF6\xDFenanpassungsrahmen verwendet wird und die Farbe nicht von einem Widget au\xDFer Kraft gesetzt wird.","Schnellauswahl der Hintergrundfarbe. Im Widget f\xFCr die Schnellauswahl sind Auswahlelemente wie die Befehlspalette enthalten.","Vordergrundfarbe der Schnellauswahl. Im Widget f\xFCr die Schnellauswahl sind Auswahlelemente wie die Befehlspalette enthalten.","Hintergrundfarbe f\xFCr den Titel der Schnellauswahl. Im Widget f\xFCr die Schnellauswahl sind Auswahlelemente wie die Befehlspalette enthalten.","Schnellauswahlfarbe f\xFCr das Gruppieren von Bezeichnungen.","Schnellauswahlfarbe f\xFCr das Gruppieren von Rahmen.","Die Hintergrundfarbe der Tastenbindungsbeschriftung. Die Tastenbindungsbeschriftung wird verwendet, um eine Tastenkombination darzustellen.","Die Vordergrundfarbe der Tastenbindungsbeschriftung. Die Tastenbindungsbeschriftung wird verwendet, um eine Tastenkombination darzustellen.","Die Rahmenfarbe der Tastenbindungsbeschriftung. Die Tastenbindungsbeschriftung wird verwendet, um eine Tastenkombination darzustellen.","Die Rahmenfarbe der Schaltfl\xE4che der Tastenbindungsbeschriftung. Die Tastenbindungsbeschriftung wird verwendet, um eine Tastenkombination darzustellen.","Farbe der Editor-Auswahl.","Farbe des gew\xE4hlten Text f\xFCr einen hohen Kontrast","Die Farbe der Auswahl befindet sich in einem inaktiven Editor. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegende Dekorationen verdeckt.","Farbe f\xFCr Bereiche mit dem gleichen Inhalt wie die Auswahl. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Randfarbe f\xFCr Bereiche, deren Inhalt der Auswahl entspricht.","Farbe des aktuellen Suchergebnisses.","Farbe der anderen Suchergebnisse. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Farbe des Bereichs, der die Suche eingrenzt. Die Farbe darf nicht deckend sein, damit sie nicht die zugrunde liegenden Dekorationen verdeckt.","Randfarbe des aktuellen Suchergebnisses.","Randfarbe der anderen Suchtreffer.","Rahmenfarbe des Bereichs, der die Suche eingrenzt. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Farbe der Abfrage\xFCbereinstimmungen des Such-Editors","Rahmenfarbe der Abfrage\xFCbereinstimmungen des Such-Editors","Farbe des Texts in der Abschlussmeldung des Such-Viewlets.","Hervorhebung unterhalb des Worts, f\xFCr das ein Hoverelement angezeigt wird. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrundfarbe des Editor-Mauszeigers.","Vordergrundfarbe des Editor-Mauszeigers","Rahmenfarbe des Editor-Mauszeigers.","Hintergrundfarbe der Hoverstatusleiste des Editors.","Farbe der aktiven Links.","Vordergrundfarbe f\xFCr Inlinehinweise","Hintergrundfarbe f\xFCr Inlinehinweise","Vordergrundfarbe von Inlinehinweisen f\xFCr Typen","Hintergrundfarbe von Inlinehinweisen f\xFCr Typen","Vordergrundfarbe von Inlinehinweisen f\xFCr Parameter","Hintergrundfarbe von Inlinehinweisen f\xFCr Parameter",'Die f\xFCr das Aktionssymbol "Gl\xFChbirne" verwendete Farbe.','Die f\xFCr das Aktionssymbol "Automatische Gl\xFChbirnenkorrektur" verwendete Farbe.',"Hintergrundfarbe f\xFCr eingef\xFCgten Text. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrundfarbe f\xFCr Text, der entfernt wurde. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrundfarbe f\xFCr eingef\xFCgte Zeilen. Die Farbe darf nicht deckend sein, um zugrunde liegende Dekorationen nicht auszublenden.","Hintergrundfarbe f\xFCr Zeilen, die entfernt wurden. Die Farbe darf nicht deckend sein, um zugrunde liegende Dekorationen nicht auszublenden.","Hintergrundfarbe f\xFCr den Rand, an dem Zeilen eingef\xFCgt wurden.","Hintergrundfarbe f\xFCr den Rand, an dem die Zeilen entfernt wurden.","Vordergrund des Diff-\xDCbersichtslineals f\xFCr eingef\xFCgten Inhalt.","Vordergrund des Diff-\xDCbersichtslineals f\xFCr entfernten Inhalt.","Konturfarbe f\xFCr eingef\xFCgten Text.","Konturfarbe f\xFCr entfernten Text.","Die Rahmenfarbe zwischen zwei Text-Editoren.","Farbe der diagonalen F\xFCllung des Vergleichs-Editors. Die diagonale F\xFCllung wird in Ansichten mit parallelem Vergleich verwendet.","Die Hintergrundfarbe von unver\xE4nderten Bl\xF6cken im Diff-Editor.","Die Vordergrundfarbe von unver\xE4nderten Bl\xF6cken im Diff-Editor.","Die Hintergrundfarbe des unver\xE4nderten Codes im Diff-Editor.","Hintergrundfarbe der Liste/Struktur f\xFCr das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Vordergrundfarbe der Liste/Struktur f\xFCr das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Konturfarbe der Liste/Struktur f\xFCr das fokussierte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Umrissfarbe der Liste/des Baums f\xFCr das fokussierte Element, wenn die Liste/der Baum aktiv und ausgew\xE4hlt ist. Eine aktive Liste/Baum hat Tastaturfokus, eine inaktive nicht.","Hintergrundfarbe der Liste/Struktur f\xFCr das ausgew\xE4hlte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Vordergrundfarbe der Liste/Struktur f\xFCr das ausgew\xE4hlte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Vordergrundfarbe des Symbols der Liste/Struktur f\xFCr das ausgew\xE4hlte Element, wenn die Liste/Struktur aktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Hintergrundfarbe der Liste/Struktur f\xFCr das ausgew\xE4hlte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Vordergrundfarbe der Liste/Struktur f\xFCr das ausgew\xE4hlte Element, wenn die Liste/Baumstruktur inaktiv ist. Eine aktive Liste/Baumstruktur hat Tastaturfokus, eine inaktive hingegen nicht.","Vordergrundfarbe des Symbols der Liste/Struktur f\xFCr das ausgew\xE4hlte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Hintergrundfarbe der Liste/Struktur f\xFCr das fokussierte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Konturfarbe der Liste/Struktur f\xFCr das fokussierte Element, wenn die Liste/Struktur inaktiv ist. Eine aktive Liste/Struktur hat Tastaturfokus, eine inaktive hingegen nicht.","Hintergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.","Vordergrund der Liste/Struktur, wenn mit der Maus auf Elemente gezeigt wird.","Drag & Drop-Hintergrund der Liste/Struktur, wenn Elemente mithilfe der Maus verschoben werden.","Vordergrundfarbe der Liste/Struktur zur Trefferhervorhebung beim Suchen innerhalb der Liste/Struktur.","Die Vordergrundfarbe der Liste/Struktur des Treffers hebt aktiv fokussierte Elemente hervor, wenn innerhalb der Liste / der Struktur gesucht wird.","Vordergrundfarbe einer Liste/Struktur f\xFCr ung\xFCltige Elemente, z.B. ein nicht ausgel\xF6ster Stamm im Explorer.","Vordergrundfarbe f\xFCr Listenelemente, die Fehler enthalten.","Vordergrundfarbe f\xFCr Listenelemente, die Warnungen enthalten.","Hintergrundfarbe des Typfilterwidgets in Listen und Strukturen.","Konturfarbe des Typfilterwidgets in Listen und Strukturen.","Konturfarbe des Typfilterwidgets in Listen und Strukturen, wenn es keine \xDCbereinstimmungen gibt.","Schattenfarbe des Typfilterwidgets in Listen und Strukturen.","Hintergrundfarbe der gefilterten \xDCbereinstimmung","Rahmenfarbe der gefilterten \xDCbereinstimmung","Strukturstrichfarbe f\xFCr die Einzugsf\xFChrungslinien.","Strukturstrichfarbe f\xFCr die Einzugslinien, die nicht aktiv sind.","Tabellenrahmenfarbe zwischen Spalten.","Hintergrundfarbe f\xFCr ungerade Tabellenzeilen.","Hintergrundfarbe f\xFCr nicht hervorgehobene Listen-/Strukturelemente.","Hintergrundfarbe von Kontrollk\xE4stchenwidget.","Hintergrundfarbe des Kontrollk\xE4stchenwidgets, wenn das Element ausgew\xE4hlt ist, in dem es sich befindet.","Vordergrundfarbe von Kontrollk\xE4stchenwidget.","Rahmenfarbe von Kontrollk\xE4stchenwidget.","Rahmenfarbe des Kontrollk\xE4stchenwidgets, wenn das Element ausgew\xE4hlt ist, in dem es sich befindet.",'Verwenden Sie stattdessen "quickInputList.focusBackground".',"Die Hintergrundfarbe der Schnellauswahl f\xFCr das fokussierte Element.","Die Vordergrundfarbe des Symbols der Schnellauswahl f\xFCr das fokussierte Element.","Die Hintergrundfarbe der Schnellauswahl f\xFCr das fokussierte Element.","Rahmenfarbe von Men\xFCs.","Vordergrundfarbe von Men\xFCelementen.","Hintergrundfarbe von Men\xFCelementen.","Vordergrundfarbe des ausgew\xE4hlten Men\xFCelements im Men\xFC.","Hintergrundfarbe des ausgew\xE4hlten Men\xFCelements im Men\xFC.","Rahmenfarbe des ausgew\xE4hlten Men\xFCelements im Men\xFC.","Farbe eines Trenner-Men\xFCelements in Men\xFCs.","Symbolleistenhintergrund beim Bewegen der Maus \xFCber Aktionen","Symbolleistengliederung beim Bewegen der Maus \xFCber Aktionen","Symbolleistenhintergrund beim Halten der Maus \xFCber Aktionen","Hervorhebungs-Hintergrundfarbe eines Codeschnipsel-Tabstopps.","Hervorhebungs-Rahmenfarbe eines Codeschnipsel-Tabstopps.","Hervorhebungs-Hintergrundfarbe des letzten Tabstopps eines Codeschnipsels.","Rahmenfarbe zur Hervorhebung des letzten Tabstopps eines Codeschnipsels.","Farbe der Breadcrumb-Elemente, die den Fokus haben.","Hintergrundfarbe der Breadcrumb-Elemente.","Farbe der Breadcrumb-Elemente, die den Fokus haben.","Die Farbe der ausgew\xE4hlten Breadcrumb-Elemente.","Hintergrundfarbe des Breadcrumb-Auswahltools.","Hintergrund des aktuellen Headers in Inlinezusammenf\xFChrungskonflikten. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrund f\xFCr den aktuellen Inhalt in Inlinezusammenf\xFChrungskonflikten. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrund f\xFCr eingehende Header in Inlinezusammenf\xFChrungskonflikten. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrund f\xFCr eingehenden Inhalt in Inlinezusammenf\xFChrungskonflikten. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Headerhintergrund f\xFCr gemeinsame Vorg\xE4ngerelemente in Inlinezusammenf\xFChrungskonflikten. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Hintergrund des Inhalts gemeinsamer Vorg\xE4ngerelemente in Inlinezusammenf\xFChrungskonflikt. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Rahmenfarbe f\xFCr Kopfzeilen und die Aufteilung in Inline-Mergingkonflikten.","Aktueller \xDCbersichtslineal-Vordergrund f\xFCr Inline-Mergingkonflikte.","Eingehender \xDCbersichtslineal-Vordergrund f\xFCr Inline-Mergingkonflikte.","Hintergrund des \xDCbersichtslineals des gemeinsamen \xFCbergeordneten Elements bei Inlinezusammenf\xFChrungskonflikten.","\xDCbersichtslinealmarkerfarbe f\xFCr das Suchen von \xDCbereinstimmungen. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","\xDCbersichtslinealmarkerfarbe f\xFCr das Hervorheben der Auswahl. Die Farbe darf nicht deckend sein, weil sie sonst die zugrunde liegenden Dekorationen verdeckt.","Minimap-Markerfarbe f\xFCr gefundene \xDCbereinstimmungen.","Minimap-Markerfarbe f\xFCr wiederholte Editorauswahlen.","Minimap-Markerfarbe f\xFCr die Editorauswahl.","Minimapmarkerfarbe f\xFCr Informationen.","Minimapmarkerfarbe f\xFCr Warnungen","Minimapmarkerfarbe f\xFCr Fehler","Hintergrundfarbe der Minimap.","Deckkraft von Vordergrundelementen, die in der Minimap gerendert werden. Beispiel: \u201E#000000c0\u201C wird die Elemente mit einer Deckkraft von 75 % rendern.","Hintergrundfarbe des Minimap-Schiebereglers.","Hintergrundfarbe des Minimap-Schiebereglers beim Daraufzeigen.","Hintergrundfarbe des Minimap-Schiebereglers, wenn darauf geklickt wird.","Die Farbe, die f\xFCr das Problemfehlersymbol verwendet wird.","Die Farbe, die f\xFCr das Problemwarnsymbol verwendet wird.","Die Farbe, die f\xFCr das Probleminfosymbol verwendet wird.","Die in Diagrammen verwendete Vordergrundfarbe.","Die f\xFCr horizontale Linien in Diagrammen verwendete Farbe.","Die in Diagrammvisualisierungen verwendete Farbe Rot.","Die in Diagrammvisualisierungen verwendete Farbe Blau.","Die in Diagrammvisualisierungen verwendete Farbe Gelb.","Die in Diagrammvisualisierungen verwendete Farbe Orange.","Die in Diagrammvisualisierungen verwendete Farbe Gr\xFCn.","Die in Diagrammvisualisierungen verwendete Farbe Violett."],"vs/platform/theme/common/iconRegistry":["Die ID der zu verwendenden Schriftart. Sofern nicht festgelegt, wird die zuerst definierte Schriftart verwendet.","Das der Symboldefinition zugeordnete Schriftzeichen.","Symbol f\xFCr Aktion zum Schlie\xDFen in Widgets","Symbol f\xFCr den Wechsel zur vorherigen Editor-Position.","Symbol f\xFCr den Wechsel zur n\xE4chsten Editor-Position."],"vs/platform/undoRedo/common/undoRedoService":["Die folgenden Dateien wurden geschlossen und auf dem Datentr\xE4ger ge\xE4ndert: {0}.","Die folgenden Dateien wurden auf inkompatible Weise ge\xE4ndert: {0}.",'"{0}" konnte nicht f\xFCr alle Dateien r\xFCckg\xE4ngig gemacht werden. {1}','"{0}" konnte nicht f\xFCr alle Dateien r\xFCckg\xE4ngig gemacht werden. {1}','"{0}" konnte nicht f\xFCr alle Dateien r\xFCckg\xE4ngig gemacht werden, da \xC4nderungen an {1} vorgenommen wurden.','"{0}" konnte nicht f\xFCr alle Dateien r\xFCckg\xE4ngig gemacht werden, weil bereits ein Vorgang zum R\xFCckg\xE4ngigmachen oder Wiederholen f\xFCr "{1}" durchgef\xFChrt wird.','"{0}" konnte nicht f\xFCr alle Dateien r\xFCckg\xE4ngig gemacht werden, weil in der Zwischenzeit bereits ein Vorgang zum R\xFCckg\xE4ngigmachen oder Wiederholen durchgef\xFChrt wurde.','M\xF6chten Sie "{0}" f\xFCr alle Dateien r\xFCckg\xE4ngig machen?',"&&In {0} Dateien r\xFCckg\xE4ngig machen","&&Datei r\xFCckg\xE4ngig machen",'"{0}" konnte nicht r\xFCckg\xE4ngig gemacht werden, weil bereits ein Vorgang zum R\xFCckg\xE4ngigmachen oder Wiederholen durchgef\xFChrt wird.','M\xF6chten Sie "{0}" r\xFCckg\xE4ngig machen?',"&&Ja","Nein",'"{0}" konnte nicht in allen Dateien wiederholt werden. {1}','"{0}" konnte nicht in allen Dateien wiederholt werden. {1}','"{0}" konnte nicht in allen Dateien wiederholt werden, da \xC4nderungen an {1} vorgenommen wurden.','"{0}" konnte nicht f\xFCr alle Dateien wiederholt werden, weil bereits ein Vorgang zum R\xFCckg\xE4ngigmachen oder Wiederholen f\xFCr "{1}" durchgef\xFChrt wird.','"{0}" konnte nicht f\xFCr alle Dateien wiederholt werden, weil in der Zwischenzeit bereits ein Vorgang zum R\xFCckg\xE4ngigmachen oder Wiederholen durchgef\xFChrt wurde.','"{0}" konnte nicht wiederholt werden, weil bereits ein Vorgang zum R\xFCckg\xE4ngigmachen oder Wiederholen durchgef\xFChrt wird.'],"vs/platform/workspace/common/workspace":["Codearbeitsbereich"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.de.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.es.js b/lib/vs/editor/editor.main.nls.es.js deleted file mode 100644 index 0b9effd..0000000 --- a/lib/vs/editor/editor.main.nls.es.js +++ /dev/null @@ -1,31 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.es",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["entrada"],"vs/base/browser/ui/findinput/findInputToggles":["Coincidir may\xFAsculas y min\xFAsculas","Solo palabras completas","Usar expresi\xF3n regular"],"vs/base/browser/ui/findinput/replaceInput":["entrada","Conservar may/min"],"vs/base/browser/ui/hover/hoverWidget":["Inspeccione esto en la vista accesible con {0}.","Inspeccione esto en la vista accesible mediante el comando Abrir vista accesible, que actualmente no se puede desencadenar mediante el enlace de teclado."],"vs/base/browser/ui/iconLabel/iconLabelHover":["Cargando..."],"vs/base/browser/ui/inputbox/inputBox":["Error: {0}","Advertencia: {0}","Informaci\xF3n: {0}","para el historial","Entrada borrada"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["Sin enlazar"],"vs/base/browser/ui/selectBox/selectBoxCustom":["Seleccionar cuadro"],"vs/base/browser/ui/toolbar/toolbar":["M\xE1s Acciones..."],"vs/base/browser/ui/tree/abstractTree":["Filtrar","Coincidencia aproximada","Escriba texto para filtrar","Escriba texto para buscar","Escriba texto para buscar","Cerrar","No se encontraron elementos."],"vs/base/common/actions":["(vac\xEDo)"],"vs/base/common/errorMessage":["{0}: {1}","Error del sistema ({0})","Se ha producido un error desconocido. Consulte el registro para obtener m\xE1s detalles.","Se ha producido un error desconocido. Consulte el registro para obtener m\xE1s detalles.","{0} ({1} errores en total)","Se ha producido un error desconocido. Consulte el registro para obtener m\xE1s detalles."],"vs/base/common/keybindingLabels":["Ctrl","May\xFAs","Alt","Windows","Ctrl","May\xFAs","Alt","Super","Control","May\xFAs","Opci\xF3n","Comando","Control","May\xFAs","Alt","Windows","Control","May\xFAs","Alt","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["editor","No se puede acceder al editor en este momento.","{0} Para habilitar el modo optimizado para lectores de pantalla, use {1}","{0} Para habilitar el modo optimizado para lector de pantalla, abra la selecci\xF3n r\xE1pida con {1} y ejecute el comando Alternar modo de accesibilidad del lector de pantalla, que actualmente no se puede desencadenar mediante el teclado.","{0} Para asignar un enlace de teclado para el comando Alternar modo de accesibilidad del lector de pantalla, acceda al editor de enlaces de teclado con {1} y ejec\xFAtelo."],"vs/editor/browser/coreCommands":["Anclar al final incluso cuando se vayan a l\xEDneas m\xE1s largas","Anclar al final incluso cuando se vayan a l\xEDneas m\xE1s largas","Cursores secundarios quitados"],"vs/editor/browser/editorExtensions":["&&Deshacer","Deshacer","&&Rehacer","Rehacer","&&Seleccionar todo","Seleccionar todo"],"vs/editor/browser/widget/codeEditorWidget":["El n\xFAmero de cursores se ha limitado a {0}. Considere la posibilidad de usar [buscar y reemplazar](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) para realizar cambios mayores o aumentar la configuraci\xF3n del l\xEDmite de varios cursores del editor.","Aumentar el l\xEDmite de varios cursores"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":['Icono de "Insertar" en el visor de diferencias accesible.','Icono de "Quitar" en el visor de diferencias accesible.','Icono de "Cerrar" en el visor de diferencias accesible.',"Cerrar","Visor de diferencias accesible. Utilice la flecha hacia arriba y hacia abajo para navegar.","no se han cambiado l\xEDneas","1 l\xEDnea cambiada","{0} l\xEDneas cambiadas","Diferencia {0} de {1}: l\xEDnea original {2}, {3}, l\xEDnea modificada {4}, {5}","vac\xEDo","{0} l\xEDnea sin cambios {1}","{0} l\xEDnea original {1} l\xEDnea modificada {2}","+ {0} l\xEDnea modificada {1}","- {0} l\xEDnea original {1}"],"vs/editor/browser/widget/diffEditor/colors":["Color del borde del texto que se movi\xF3 en el editor de diferencias.","Color del borde de texto activo que se movi\xF3 en el editor de diferencias."],"vs/editor/browser/widget/diffEditor/decorations":["Decoraci\xF3n de l\xEDnea para las inserciones en el editor de diferencias.","Decoraci\xF3n de l\xEDnea para las eliminaciones en el editor de diferencias.","Haga clic para revertir el cambio"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["Alternar contraer regiones sin cambios","Alternar Mostrar bloques de c\xF3digo movidos","Alternar el uso de la vista insertada cuando el espacio es limitado","Uso de la vista insertada cuando el espacio es limitado","Mostrar bloques de c\xF3digo movidos","Editor de diferencias","Lado del conmutador","Salir de la comparaci\xF3n de movimientos","Contraer todas las regiones sin cambios","Mostrar todas las regiones sin cambios","Visor de diferencias accesibles","Ir a la siguiente diferencia","Abrir visor de diferencias accesibles","Ir a la diferencia anterior"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" use {0} para abrir la ayuda de accesibilidad."],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["Plegar la regi\xF3n sin cambios","Haga clic o arrastre para mostrar m\xE1s arriba","Mostrar todo","Hacer clic o arrastrar para mostrar m\xE1s abajo","{0} l\xEDneas ocultas","Doble clic para desplegar"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["Copiar l\xEDneas eliminadas","Copiar l\xEDnea eliminada","Copiar l\xEDneas cambiadas","Copiar l\xEDnea cambiada","Copiar la l\xEDnea eliminada ({0})","Copiar l\xEDnea cambiada ({0})","Revertir este cambio"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["C\xF3digo movido con cambios en la l\xEDnea {0}-{1}","C\xF3digo movido con cambios de la l\xEDnea {0}-{1}","C\xF3digo movido a la l\xEDnea {0}-{1}","C\xF3digo movido de la l\xEDnea {0}-{1}"],"vs/editor/common/config/editorConfigurationSchema":["Editor","El n\xFAmero de espacios a los que equivale una tabulaci\xF3n. Este valor se invalida en funci\xF3n del contenido del archivo cuando {0} est\xE1 activado.",'N\xFAmero de espacios usados para la sangr\xEDa o "tabSize" para usar el valor de "#editor.tabSize#". Esta configuraci\xF3n se invalida en funci\xF3n del contenido del archivo cuando "#editor.detectIndentation#" est\xE1 activado.','Insertar espacios al presionar "TAB". Este valor se invalida en funci\xF3n del contenido del archivo cuando {0} est\xE1 activado.',"Controla si {0} y {1} se detectan autom\xE1ticamente al abrir un archivo en funci\xF3n del contenido de este.","Quitar el espacio en blanco final autoinsertado.","Manejo especial para archivos grandes para desactivar ciertas funciones de memoria intensiva.","Habilita sugerencias basadas en palabras.","Sugerir palabras solo del documento activo.","Sugerir palabras de todos los documentos abiertos del mismo idioma.","Sugerir palabras de todos los documentos abiertos.","Controla de qu\xE9 documentos se calculan las finalizaciones basadas en palabras.","El resaltado sem\xE1ntico est\xE1 habilitado para todos los temas de color.","El resaltado sem\xE1ntico est\xE1 deshabilitado para todos los temas de color.",'El resaltado sem\xE1ntico est\xE1 configurado con el valor "semanticHighlighting" del tema de color actual.',"Controla si se muestra semanticHighlighting para los idiomas que lo admiten.",'Mantiene abiertos los editores interactivos, incluso al hacer doble clic en su contenido o presionar "Escape".',"Las lineas por encima de esta longitud no se tokenizar\xE1n por razones de rendimiento.","Controla si la tokenizaci\xF3n debe producirse de forma asincr\xF3nica en un rol de trabajo.","Controla si se debe registrar la tokenizaci\xF3n asincr\xF3nica. Solo para depuraci\xF3n.","Controla si se debe comprobar la tokenizaci\xF3n asincr\xF3nica con la tokenizaci\xF3n en segundo plano heredada. Puede ralentizar la tokenizaci\xF3n. Solo para depuraci\xF3n.","Define los corchetes que aumentan o reducen la sangr\xEDa.","Secuencia de cadena o corchete de apertura.","Secuencia de cadena o corchete de cierre.","Define los pares de corchetes coloreados por su nivel de anidamiento si est\xE1 habilitada la coloraci\xF3n de par de corchetes.","Secuencia de cadena o corchete de apertura.","Secuencia de cadena o corchete de cierre.","Tiempo de espera en milisegundos despu\xE9s del cual se cancela el c\xE1lculo de diferencias. Utilice 0 para no usar tiempo de espera.","Tama\xF1o m\xE1ximo de archivo en MB para el que calcular diferencias. Use 0 para no limitar.","Controla si el editor de diferencias muestra las diferencias en paralelo o alineadas.","Si el ancho del editor de diferencias es menor que este valor, se usa la vista insertada.","Si est\xE1 habilitada y el ancho del editor es demasiado peque\xF1o, se usa la vista en l\xEDnea.","Cuando est\xE1 habilitado, el editor de diferencias muestra flechas en su margen de glifo para revertir los cambios.","Cuando est\xE1 habilitado, el editor de diferencias omite los cambios en los espacios en blanco iniciales o finales.","Controla si el editor de diferencias muestra los indicadores +/- para los cambios agregados o quitados.","Controla si el editor muestra CodeLens.","Las l\xEDneas no se ajustar\xE1n nunca.","Las l\xEDneas se ajustar\xE1n en el ancho de la ventanilla.","Las l\xEDneas se ajustar\xE1n en funci\xF3n de la configuraci\xF3n de {0}.","Usa el algoritmo de diferenciaci\xF3n heredado.","Usa el algoritmo de diferenciaci\xF3n avanzada.","Controla si el editor de diferencias muestra las regiones sin cambios.","Controla cu\xE1ntas l\xEDneas se usan para las regiones sin cambios.","Controla cu\xE1ntas l\xEDneas se usan como m\xEDnimo para las regiones sin cambios.","Controla cu\xE1ntas l\xEDneas se usan como contexto al comparar regiones sin cambios.","Controlar si el editor de diferencias debe mostrar los movimientos de c\xF3digo detectados.","Controla si el editor de diferencias muestra decoraciones vac\xEDas para ver d\xF3nde se insertan o eliminan los caracteres."],"vs/editor/common/config/editorOptions":["Usar las API de la plataforma para detectar cu\xE1ndo se conecta un lector de pantalla","Optimizar para usar con un lector de pantalla","Supongamos que no hay un lector de pantalla conectado","Controla si la interfaz de usuario debe ejecutarse en un modo en el que est\xE9 optimizada para lectores de pantalla.","Controla si se inserta un car\xE1cter de espacio al comentar.","Controla si las l\xEDneas vac\xEDas deben ignorarse con la opci\xF3n de alternar, agregar o quitar acciones para los comentarios de l\xEDnea.","Controla si al copiar sin selecci\xF3n se copia la l\xEDnea actual.","Controla si el cursor debe saltar para buscar coincidencias mientras se escribe.","Nunca inicializar la cadena de b\xFAsqueda desde la selecci\xF3n del editor.","Siempre inicializar la cadena de b\xFAsqueda desde la selecci\xF3n del editor, incluida la palabra en la posici\xF3n del cursor.","Solo inicializar la cadena de b\xFAsqueda desde la selecci\xF3n del editor.","Controla si la cadena de b\xFAsqueda del widget de b\xFAsqueda se inicializa desde la selecci\xF3n del editor.","No activar nunca Buscar en selecci\xF3n autom\xE1ticamente (predeterminado).","Activar siempre Buscar en selecci\xF3n autom\xE1ticamente.","Activar Buscar en la selecci\xF3n autom\xE1ticamente cuando se seleccionen varias l\xEDneas de contenido.","Controla la condici\xF3n para activar la b\xFAsqueda en la selecci\xF3n de forma autom\xE1tica.","Controla si el widget de b\xFAsqueda debe leer o modificar el Portapapeles de b\xFAsqueda compartido en macOS.","Controla si Encontrar widget debe agregar m\xE1s l\xEDneas en la parte superior del editor. Si es true, puede desplazarse m\xE1s all\xE1 de la primera l\xEDnea cuando Encontrar widget est\xE1 visible.","Controla si la b\xFAsqueda se reinicia autom\xE1ticamente desde el principio (o el final) cuando no se encuentran m\xE1s coincidencias.",'Habilita o deshabilita las ligaduras tipogr\xE1ficas (caracter\xEDsticas de fuente "calt" y "liga"). C\xE1mbielo a una cadena para el control espec\xEDfico de la propiedad de CSS "font-feature-settings".','Propiedad de CSS "font-feature-settings" expl\xEDcita. En su lugar, puede pasarse un valor booleano si solo es necesario activar o desactivar las ligaduras.','Configura las ligaduras tipogr\xE1ficas o las caracter\xEDsticas de fuente. Puede ser un valor booleano para habilitar o deshabilitar las ligaduras o bien una cadena para el valor de la propiedad "font-feature-settings" de CSS.',"Habilita o deshabilita la traducci\xF3n del grosor de font-weight a font-variation-settings. Cambie esto a una cadena para el control espec\xEDfico de la propiedad CSS 'font-variation-settings'.","Propiedad CSS expl\xEDcita 'font-variation-settings'. En su lugar, se puede pasar un valor booleano si solo es necesario traducir font-weight a font-variation-settings.","Configura variaciones de fuente. Puede ser un booleano para habilitar o deshabilitar la traducci\xF3n de font-weight a font-variation-settings o una cadena para el valor de la propiedad CSS 'font-variation-settings'.","Controla el tama\xF1o de fuente en p\xEDxeles.",'Solo se permiten las palabras clave "normal" y "negrita" o los n\xFAmeros entre 1 y 1000.','Controla el grosor de la fuente. Acepta las palabras clave "normal" y "negrita" o los n\xFAmeros entre 1 y 1000.',"Mostrar vista de inspecci\xF3n de los resultados (predeterminado)","Ir al resultado principal y mostrar una vista de inspecci\xF3n","Vaya al resultado principal y habilite la navegaci\xF3n sin peek para otros",'Esta configuraci\xF3n est\xE1 en desuso. Use configuraciones separadas como "editor.editor.gotoLocation.multipleDefinitions" o "editor.editor.gotoLocation.multipleImplementations" en su lugar.','Controla el comportamiento del comando "Ir a definici\xF3n" cuando existen varias ubicaciones de destino.','Controla el comportamiento del comando "Ir a definici\xF3n de tipo" cuando existen varias ubicaciones de destino.','Controla el comportamiento del comando "Ir a declaraci\xF3n" cuando existen varias ubicaciones de destino.','Controla el comportamiento del comando "Ir a implementaciones" cuando existen varias ubicaciones de destino.','Controla el comportamiento del comando "Ir a referencias" cuando existen varias ubicaciones de destino.','Identificador de comando alternativo que se ejecuta cuando el resultado de "Ir a definici\xF3n" es la ubicaci\xF3n actual.','Id. de comando alternativo que se est\xE1 ejecutando cuando el resultado de "Ir a definici\xF3n de tipo" es la ubicaci\xF3n actual.','Id. de comando alternativo que se est\xE1 ejecutando cuando el resultado de "Ir a declaraci\xF3n" es la ubicaci\xF3n actual.','Id. de comando alternativo que se est\xE1 ejecutando cuando el resultado de "Ir a implementaci\xF3n" es la ubicaci\xF3n actual.','Identificador de comando alternativo que se ejecuta cuando el resultado de "Ir a referencia" es la ubicaci\xF3n actual.',"Controla si se muestra la informaci\xF3n al mantener el puntero sobre un elemento.","Controla el retardo en milisegundos despu\xE9s del cual se muestra la informaci\xF3n al mantener el puntero sobre un elemento.","Controla si la informaci\xF3n que aparece al mantener el puntero sobre un elemento permanece visible al mover el mouse sobre este.",'Controla el retardo en milisegundos despu\xE9s del cual se oculta la informaci\xF3n al mantener el puntero sobre un elemento. Requiere que se habilite "editor.hover.sticky".',"Preferir mostrar los desplazamientos por encima de la l\xEDnea, si hay espacio.","Se supone que todos los caracteres son del mismo ancho. Este es un algoritmo r\xE1pido que funciona correctamente para fuentes monoespaciales y ciertos scripts (como caracteres latinos) donde los glifos tienen el mismo ancho.","Delega el c\xE1lculo de puntos de ajuste en el explorador. Es un algoritmo lento, que podr\xEDa causar bloqueos para archivos grandes, pero funciona correctamente en todos los casos.","Controla el algoritmo que calcula los puntos de ajuste. Tenga en cuenta que, en el modo de accesibilidad, se usar\xE1 el modo avanzado para obtener la mejor experiencia.","Habilita la bombilla de acci\xF3n de c\xF3digo en el editor.","Muestra los \xE1mbitos actuales anidados durante el desplazamiento en la parte superior del editor.","Define el n\xFAmero m\xE1ximo de l\xEDneas r\xE1pidas que se mostrar\xE1n.","Define el modelo que se va a usar para determinar qu\xE9 l\xEDneas se van a pegar. Si el modelo de esquema no existe, recurrir\xE1 al modelo del proveedor de plegado que recurre al modelo de sangr\xEDa. Este orden se respeta en los tres casos.","Habilite el desplazamiento del widget de desplazamiento r\xE1pido con la barra de desplazamiento horizontal del editor.","Habilita las sugerencias de incrustaci\xF3n en el editor.","Las sugerencias de incrustaci\xF3n est\xE1n habilitadas","Las sugerencias de incrustaci\xF3n se muestran de forma predeterminada y se ocultan cuando se mantiene presionado {0}","Las sugerencias de incrustaci\xF3n est\xE1n ocultas de forma predeterminada y se muestran al mantener presionado {0}","Las sugerencias de incrustaci\xF3n est\xE1n deshabilitadas","Controla el tama\xF1o de fuente de las sugerencias de incrustaci\xF3n en el editor. Como valor predeterminado, se usa {0} cuando el valor configurado es menor que {1} o mayor que el tama\xF1o de fuente del editor.","Controla la familia de fuentes de sugerencias de incrustaci\xF3n en el editor. Cuando se establece en vac\xEDo, se usa el {0}.","Habilita el relleno alrededor de las sugerencias de incrustaci\xF3n en el editor.",`Controla el alto de l\xEDnea. \r - - Use 0 para calcular autom\xE1ticamente el alto de l\xEDnea a partir del tama\xF1o de la fuente.\r - - Los valores entre 0 y 8 se usar\xE1n como multiplicador con el tama\xF1o de fuente.\r - - Los valores mayores o igual que 8 se usar\xE1n como valores efectivos.`,"Controla si se muestra el minimapa.","Controla si el minimapa se oculta autom\xE1ticamente.","El minimapa tiene el mismo tama\xF1o que el contenido del editor (y podr\xEDa desplazarse).","El minimapa se estirar\xE1 o reducir\xE1 seg\xFAn sea necesario para ocupar la altura del editor (sin desplazamiento).","El minimapa se reducir\xE1 seg\xFAn sea necesario para no ser nunca m\xE1s grande que el editor (sin desplazamiento).","Controla el tama\xF1o del minimapa.","Controla en qu\xE9 lado se muestra el minimapa.","Controla cu\xE1ndo se muestra el control deslizante del minimapa.","Escala del contenido dibujado en el minimapa: 1, 2 o 3.","Represente los caracteres reales en una l\xEDnea, por oposici\xF3n a los bloques de color.","Limite el ancho del minimapa para representar como mucho un n\xFAmero de columnas determinado.","Controla la cantidad de espacio entre el borde superior del editor y la primera l\xEDnea.","Controla el espacio entre el borde inferior del editor y la \xFAltima l\xEDnea.","Habilita un elemento emergente que muestra documentaci\xF3n de los par\xE1metros e informaci\xF3n de los tipos mientras escribe.","Controla si el men\xFA de sugerencias de par\xE1metros se cicla o se cierra al llegar al final de la lista.","Las sugerencias r\xE1pidas se muestran dentro del widget de sugerencias","Las sugerencias r\xE1pidas se muestran como texto fantasma","Las sugerencias r\xE1pidas est\xE1n deshabilitadas","Habilita sugerencias r\xE1pidas en las cadenas.","Habilita sugerencias r\xE1pidas en los comentarios.","Habilita sugerencias r\xE1pidas fuera de las cadenas y los comentarios.","Controla si las sugerencias deben mostrarse autom\xE1ticamente al escribir. Puede controlarse para la escritura en comentarios, cadenas y otro c\xF3digo. Las sugerencias r\xE1pidas pueden configurarse para mostrarse como texto fantasma o con el widget de sugerencias. Tenga tambi\xE9n en cuenta la configuraci\xF3n '{0}' que controla si las sugerencias son desencadenadas por caracteres especiales.","Los n\xFAmeros de l\xEDnea no se muestran.","Los n\xFAmeros de l\xEDnea se muestran como un n\xFAmero absoluto.","Los n\xFAmeros de l\xEDnea se muestran como distancia en l\xEDneas a la posici\xF3n del cursor.","Los n\xFAmeros de l\xEDnea se muestran cada 10 l\xEDneas.","Controla la visualizaci\xF3n de los n\xFAmeros de l\xEDnea.","N\xFAmero de caracteres monoespaciales en los que se representar\xE1 esta regla del editor.","Color de esta regla del editor.","Muestra reglas verticales despu\xE9s de un cierto n\xFAmero de caracteres monoespaciados. Usa m\xFAltiples valores para mostrar m\xFAltiples reglas. Si la matriz est\xE1 vac\xEDa, no se muestran reglas.","La barra de desplazamiento vertical estar\xE1 visible solo cuando sea necesario.","La barra de desplazamiento vertical estar\xE1 siempre visible.","La barra de desplazamiento vertical estar\xE1 siempre oculta.","Controla la visibilidad de la barra de desplazamiento vertical.","La barra de desplazamiento horizontal estar\xE1 visible solo cuando sea necesario.","La barra de desplazamiento horizontal estar\xE1 siempre visible.","La barra de desplazamiento horizontal estar\xE1 siempre oculta.","Controla la visibilidad de la barra de desplazamiento horizontal.","Ancho de la barra de desplazamiento vertical.","Altura de la barra de desplazamiento horizontal.","Controla si al hacer clic se desplaza por p\xE1gina o salta a la posici\xF3n donde se hace clic.","Controla si se resaltan todos los caracteres ASCII no b\xE1sicos. Solo los caracteres entre U+0020 y U+007E, tabulaci\xF3n, avance de l\xEDnea y retorno de carro se consideran ASCII b\xE1sicos.","Controla si se resaltan los caracteres que solo reservan espacio o que no tienen ancho.","Controla si se resaltan caracteres que se pueden confundir con caracteres ASCII b\xE1sicos, excepto los que son comunes en la configuraci\xF3n regional del usuario actual.","Controla si los caracteres de los comentarios tambi\xE9n deben estar sujetos al resaltado Unicode.","Controla si los caracteres de las cadenas tambi\xE9n deben estar sujetos al resaltado Unicode.","Define los caracteres permitidos que no se resaltan.","Los caracteres Unicode que son comunes en las configuraciones regionales permitidas no se resaltan.","Controla si se deben mostrar autom\xE1ticamente las sugerencias alineadas en el editor.","Muestra la barra de herramientas de sugerencias insertadas cada vez que se muestra una sugerencia insertada.","Muestra la barra de herramientas de sugerencias insertadas al mantener el puntero sobre una sugerencia insertada.","Controla cu\xE1ndo mostrar la barra de herramientas de sugerencias insertadas.","Controla c\xF3mo interact\xFAan las sugerencias insertadas con el widget de sugerencias. Si se habilita, el widget de sugerencias no se muestra autom\xE1ticamente cuando hay sugerencias insertadas disponibles.","Controla si est\xE1 habilitada o no la coloraci\xF3n de pares de corchetes. Use {0} para invalidar los colores de resaltado de corchete.","Controla si cada tipo de corchete tiene su propio grupo de colores independiente.","Habilita gu\xEDas de par de corchetes.","Habilita gu\xEDas de par de corchetes solo para el par de corchetes activo.","Deshabilita las gu\xEDas de par de corchetes.","Controla si est\xE1n habilitadas las gu\xEDas de pares de corchetes.","Habilita gu\xEDas horizontales como adici\xF3n a gu\xEDas de par de corchetes verticales.","Habilita gu\xEDas horizontales solo para el par de corchetes activo.","Deshabilita las gu\xEDas de par de corchetes horizontales.","Controla si est\xE1n habilitadas las gu\xEDas de pares de corchetes horizontales.","Controla si el editor debe resaltar el par de corchetes activo.","Controla si el editor debe representar gu\xEDas de sangr\xEDa.","Resalta la gu\xEDa de sangr\xEDa activa.","Resalta la gu\xEDa de sangr\xEDa activa incluso si se resaltan las gu\xEDas de corchetes.","No resalta la gu\xEDa de sangr\xEDa activa.","Controla si el editor debe resaltar la gu\xEDa de sangr\xEDa activa.","Inserte la sugerencia sin sobrescribir el texto a la derecha del cursor.","Inserte la sugerencia y sobrescriba el texto a la derecha del cursor.","Controla si las palabras se sobrescriben al aceptar la finalizaci\xF3n. Tenga en cuenta que esto depende de las extensiones que participan en esta caracter\xEDstica.","Controla si el filtrado y la ordenaci\xF3n de sugerencias se tienen en cuenta para los errores ortogr\xE1ficos peque\xF1os.","Controla si la ordenaci\xF3n mejora las palabras que aparecen cerca del cursor.",'Controla si las selecciones de sugerencias recordadas se comparten entre m\xFAltiples \xE1reas de trabajo y ventanas (necesita "#editor.suggestSelection#").',"Seleccione siempre una sugerencia cuando se desencadene IntelliSense autom\xE1ticamente.","Nunca seleccione una sugerencia cuando desencadene IntelliSense autom\xE1ticamente.","Seleccione una sugerencia solo cuando desencadene IntelliSense desde un car\xE1cter de desencadenador.","Seleccione una sugerencia solo cuando desencadene IntelliSense mientras escribe.","Controla si se selecciona una sugerencia cuando se muestra el widget. Tenga en cuenta que esto solo se aplica a las sugerencias desencadenadas autom\xE1ticamente (`#editor.quickSuggestions#` y `#editor.suggestOnTriggerCharacters#`) y que siempre se selecciona una sugerencia cuando se invoca expl\xEDcitamente, por ejemplo, a trav\xE9s de 'Ctrl+Espacio'.","Controla si un fragmento de c\xF3digo activo impide sugerencias r\xE1pidas.","Controla si mostrar u ocultar iconos en sugerencias.","Controla la visibilidad de la barra de estado en la parte inferior del widget de sugerencias.","Controla si se puede obtener una vista previa del resultado de la sugerencia en el editor.","Controla si los detalles de sugerencia se muestran incorporados con la etiqueta o solo en el widget de detalles.","La configuraci\xF3n est\xE1 en desuso. Ahora puede cambiarse el tama\xF1o del widget de sugerencias.",'Esta configuraci\xF3n est\xE1 en desuso. Use configuraciones separadas como "editor.suggest.showKeyword" o "editor.suggest.showSnippets" en su lugar.','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "method".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de "funci\xF3n".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "constructor".','Cuando se activa IntelliSense muestra sugerencias "obsoletas".','Cuando se activa el filtro IntelliSense se requiere que el primer car\xE1cter coincida con el inicio de una palabra. Por ejemplo, "c" en "Consola" o "WebContext" but _not_ on "descripci\xF3n". Si se desactiva, IntelliSense mostrar\xE1 m\xE1s resultados, pero los ordenar\xE1 seg\xFAn la calidad de la coincidencia.','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "field".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "variable".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "class".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "struct".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "interface".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "module".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "property".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "event".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "operator".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "unit".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de "value".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "constant".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "enum".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "enumMember".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "keyword".','Si est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "text".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de "color".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "file".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "reference".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "customcolor".','Si est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "folder".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "typeParameter".','Cuando est\xE1 habilitado, IntelliSense muestra sugerencias de tipo "snippet".',"Cuando est\xE1 habilitado, IntelliSense muestra sugerencias del usuario.","Cuando est\xE1 habilitado IntelliSense muestra sugerencias para problemas.","Indica si los espacios en blanco iniciales y finales deben seleccionarse siempre.",'Indica si se deben seleccionar las subpalabras (como "foo" en "fooBar" o "foo_bar").',"No hay sangr\xEDa. Las l\xEDneas ajustadas comienzan en la columna 1.","A las l\xEDneas ajustadas se les aplica la misma sangr\xEDa que al elemento primario.","A las l\xEDneas ajustadas se les aplica una sangr\xEDa de +1 respecto al elemento primario.","A las l\xEDneas ajustadas se les aplica una sangr\xEDa de +2 respecto al elemento primario.","Controla la sangr\xEDa de las l\xEDneas ajustadas.","Controla si puede arrastrar y colocar un archivo en un editor de texto manteniendo presionada la tecla `may\xFAs` (en lugar de abrir el archivo en un editor).","Controla si se muestra un widget al colocar archivos en el editor. Este widget le permite controlar c\xF3mo se coloca el archivo.","Muestra el widget del selector de colocaci\xF3n despu\xE9s de colocar un archivo en el editor.","No mostrar nunca el widget del selector de colocaci\xF3n. En su lugar, siempre se usa el proveedor de colocaci\xF3n predeterminado.","Controla si se puede pegar contenido de distintas formas.","Controla si se muestra un widget al pegar contenido en el editor. Este widget le permite controlar c\xF3mo se pega el archivo.","Muestra el widget del selector de pegado despu\xE9s de pegar contenido en el editor.","No mostrar nunca el widget del selector de pegado. En su lugar, siempre se usa el comportamiento de pegado predeterminado.",'Controla si se deben aceptar sugerencias en los caracteres de confirmaci\xF3n. Por ejemplo, en Javascript, el punto y coma (";") puede ser un car\xE1cter de confirmaci\xF3n que acepta una sugerencia y escribe ese car\xE1cter.','Aceptar solo una sugerencia con "Entrar" cuando realiza un cambio textual.','Controla si las sugerencias deben aceptarse con "Entrar", adem\xE1s de "TAB". Ayuda a evitar la ambig\xFCedad entre insertar nuevas l\xEDneas o aceptar sugerencias.',"Controla el n\xFAmero de l\xEDneas del editor que pueden ser le\xEDdas por un lector de pantalla a la vez. Cuando detectamos un lector de pantalla, fijamos autom\xE1ticamente el valor por defecto en 500. Advertencia: esto tiene una implicaci\xF3n de rendimiento para n\xFAmeros mayores que el predeterminado.","Contenido del editor","Controlar si un lector de pantalla anuncia sugerencias insertadas.","Utilizar las configuraciones del lenguaje para determinar cu\xE1ndo cerrar los corchetes autom\xE1ticamente.","Cerrar autom\xE1ticamente los corchetes cuando el cursor est\xE9 a la izquierda de un espacio en blanco.","Controla si el editor debe cerrar autom\xE1ticamente los corchetes despu\xE9s de que el usuario agregue un corchete de apertura.","Utilice las configuraciones de idioma para determinar cu\xE1ndo cerrar los comentarios autom\xE1ticamente.","Cerrar autom\xE1ticamente los comentarios solo cuando el cursor est\xE9 a la izquierda de un espacio en blanco.","Controla si el editor debe cerrar autom\xE1ticamente los comentarios despu\xE9s de que el usuario agregue un comentario de apertura.","Quite los corchetes o las comillas de cierre adyacentes solo si se insertaron autom\xE1ticamente.","Controla si el editor debe quitar los corchetes o las comillas de cierre adyacentes al eliminar.","Escriba en las comillas o los corchetes solo si se insertaron autom\xE1ticamente.","Controla si el editor debe escribir entre comillas o corchetes.","Utilizar las configuraciones del lenguaje para determinar cu\xE1ndo cerrar las comillas autom\xE1ticamente. ","Cerrar autom\xE1ticamente las comillas cuando el cursor est\xE9 a la izquierda de un espacio en blanco. ","Controla si el editor debe cerrar autom\xE1ticamente las comillas despu\xE9s de que el usuario agrega uma comilla de apertura.","El editor no insertar\xE1 la sangr\xEDa autom\xE1ticamente.","El editor mantendr\xE1 la sangr\xEDa de la l\xEDnea actual.","El editor respetar\xE1 la sangr\xEDa de la l\xEDnea actual y los corchetes definidos por el idioma.","El editor mantendr\xE1 la sangr\xEDa de la l\xEDnea actual, respetar\xE1 los corchetes definidos por el idioma e invocar\xE1 onEnterRules especiales definidos por idiomas.","El editor respetar\xE1 la sangr\xEDa de la l\xEDnea actual, los corchetes definidos por idiomas y las reglas indentationRules definidas por idiomas, adem\xE1s de invocar reglas onEnterRules especiales.","Controla si el editor debe ajustar autom\xE1ticamente la sangr\xEDa mientras los usuarios escriben, pegan, mueven o sangran l\xEDneas.","Use las configuraciones de idioma para determinar cu\xE1ndo delimitar las selecciones autom\xE1ticamente.","Envolver con comillas, pero no con corchetes.","Envolver con corchetes, pero no con comillas.","Controla si el editor debe rodear autom\xE1ticamente las selecciones al escribir comillas o corchetes.","Emula el comportamiento de selecci\xF3n de los caracteres de tabulaci\xF3n al usar espacios para la sangr\xEDa. La selecci\xF3n se aplicar\xE1 a las tabulaciones.","Controla si el editor muestra CodeLens.","Controla la familia de fuentes para CodeLens.",'Controla el tama\xF1o de fuente de CodeLens en p\xEDxeles. Cuando se establece en 0, se usa el 90\xA0% de "#editor.fontSize#".',"Controla si el editor debe representar el Selector de colores y los elementos Decorator de color en l\xEDnea.","Hacer que el selector de colores aparezca tanto al hacer clic como al mantener el puntero sobre el decorador de color","Hacer que el selector de colores aparezca al pasar el puntero sobre el decorador de color","Hacer que el selector de colores aparezca al hacer clic en el decorador de color","Controla la condici\xF3n para que un selector de colores aparezca de un decorador de color","Controla el n\xFAmero m\xE1ximo de decoradores de color que se pueden representar en un editor a la vez.","Habilite que la selecci\xF3n con el mouse y las teclas est\xE9 realizando la selecci\xF3n de columnas.","Controla si el resaltado de sintaxis debe ser copiado al portapapeles.","Controla el estilo de animaci\xF3n del cursor.","La animaci\xF3n del s\xEDmbolo de intercalaci\xF3n suave est\xE1 deshabilitada.","La animaci\xF3n de s\xEDmbolo de intercalaci\xF3n suave solo se habilita cuando el usuario mueve el cursor con un gesto expl\xEDcito.","La animaci\xF3n de s\xEDmbolo de intercalaci\xF3n suave siempre est\xE1 habilitada.","Controla si la animaci\xF3n suave del cursor debe estar habilitada.","Controla el estilo del cursor.",'Controla el n\xFAmero m\xEDnimo de l\xEDneas iniciales visibles (m\xEDnimo 0) y l\xEDneas finales (m\xEDnimo 1) que rodean el cursor. Se conoce como "scrollOff" o "scrollOffset" en otros editores.','Solo se aplica "cursorSurroundingLines" cuando se desencadena mediante el teclado o la API.','"cursorSurroundingLines" se aplica siempre.','Controla cuando se debe aplicar "#cursorSurroundingLines#".','Controla el ancho del cursor cuando "#editor.cursorStyle#" se establece en "line".',"Controla si el editor debe permitir mover las selecciones mediante arrastrar y colocar.","Use un nuevo m\xE9todo de representaci\xF3n con svgs.","Use un nuevo m\xE9todo de representaci\xF3n con caracteres de fuente.","Use el m\xE9todo de representaci\xF3n estable.","Controla si los espacios en blanco se representan con un nuevo m\xE9todo experimental.",'Multiplicador de la velocidad de desplazamiento al presionar "Alt".',"Controla si el editor tiene el plegado de c\xF3digo habilitado.","Utilice una estrategia de plegado espec\xEDfica del idioma, si est\xE1 disponible, de lo contrario la basada en sangr\xEDa.","Utilice la estrategia de plegado basada en sangr\xEDa.","Controla la estrategia para calcular rangos de plegado.","Controla si el editor debe destacar los rangos plegados.","Permite controlar si el editor contrae autom\xE1ticamente los rangos de importaci\xF3n.","N\xFAmero m\xE1ximo de regiones plegables. Si aumenta este valor, es posible que el editor tenga menos capacidad de respuesta cuando el origen actual tiene un gran n\xFAmero de regiones plegables.","Controla si al hacer clic en el contenido vac\xEDo despu\xE9s de una l\xEDnea plegada se desplegar\xE1 la l\xEDnea.","Controla la familia de fuentes.","Controla si el editor debe dar formato autom\xE1ticamente al contenido pegado. Debe haber disponible un formateador capaz de aplicar formato a un rango dentro de un documento. ","Controla si el editor debe dar formato a la l\xEDnea autom\xE1ticamente despu\xE9s de escribirla.","Controla si el editor debe representar el margen de glifo vertical. El margen de glifo se usa, principalmente, para depuraci\xF3n.","Controla si el cursor debe ocultarse en la regla de informaci\xF3n general.","Controla el espacio entre letras en p\xEDxeles.","Controla si el editor tiene habilitada la edici\xF3n vinculada. Dependiendo del lenguaje, los s\xEDmbolos relacionados (por ejemplo, las etiquetas HTML) se actualizan durante la edici\xF3n.","Controla si el editor debe detectar v\xEDnculos y hacerlos interactivos.","Resaltar par\xE9ntesis coincidentes.",'Se usar\xE1 un multiplicador en los eventos de desplazamiento de la rueda del mouse "deltaX" y "deltaY". ','Ampliar la fuente del editor cuando se use la rueda del mouse mientras se presiona "Ctrl".',"Combinar varios cursores cuando se solapan.",'Se asigna a "Control" en Windows y Linux y a "Comando" en macOS.','Se asigna a "Alt" en Windows y Linux y a "Opci\xF3n" en macOS.',"El modificador que se usar\xE1 para agregar varios cursores con el mouse. Los gestos del mouse Ir a definici\xF3n y Abrir v\xEDnculo se adaptar\xE1n de modo que no entren en conflicto con el [modificador multicursor](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).","Cada cursor pega una \xFAnica l\xEDnea del texto.","Cada cursor pega el texto completo.","Controla el pegado cuando el recuento de l\xEDneas del texto pegado coincide con el recuento de cursores.","Controla el n\xFAmero m\xE1ximo de cursores que puede haber en un editor activo a la vez.","Controla si el editor debe resaltar las apariciones de s\xEDmbolos sem\xE1nticos.","Controla si debe dibujarse un borde alrededor de la regla de informaci\xF3n general.","Enfocar el \xE1rbol al abrir la inspecci\xF3n","Enfocar el editor al abrir la inspecci\xF3n","Controla si se debe enfocar el editor en l\xEDnea o el \xE1rbol en el widget de vista.","Controla si el gesto del mouse Ir a definici\xF3n siempre abre el widget interactivo.","Controla el retraso, en milisegundos, tras el cual aparecer\xE1n sugerencias r\xE1pidas.","Controla si el editor cambia el nombre autom\xE1ticamente en el tipo.",'En desuso. Utilice "editor.linkedEditing" en su lugar.',"Controla si el editor debe representar caracteres de control.","Representar el n\xFAmero de la \xFAltima l\xEDnea cuando el archivo termina con un salto de l\xEDnea.","Resalta el medianil y la l\xEDnea actual.","Controla c\xF3mo debe representar el editor el resaltado de l\xEDnea actual.","Controla si el editor debe representar el resaltado de la l\xEDnea actual solo cuando el editor est\xE1 enfocado.","Representa caracteres de espacio en blanco, excepto los espacios individuales entre palabras.","Represente los caracteres de espacio en blanco solo en el texto seleccionado.","Representa solo los caracteres de espacio en blanco al final.","Controla la forma en que el editor debe representar los caracteres de espacio en blanco.","Controla si las selecciones deber\xEDan tener las esquinas redondeadas.","Controla el n\xFAmero de caracteres adicionales a partir del cual el editor se desplazar\xE1 horizontalmente.","Controla si el editor seguir\xE1 haciendo scroll despu\xE9s de la \xFAltima l\xEDnea.","Despl\xE1cese solo a lo largo del eje predominante cuando se desplace vertical y horizontalmente al mismo tiempo. Evita la deriva horizontal cuando se desplaza verticalmente en un trackpad.","Controla si el portapapeles principal de Linux debe admitirse.","Controla si el editor debe destacar las coincidencias similares a la selecci\xF3n.","Mostrar siempre los controles de plegado.","No mostrar nunca los controles de plegado y reducir el tama\xF1o del medianil.","Mostrar solo los controles de plegado cuando el mouse est\xE1 sobre el medianil.","Controla cu\xE1ndo se muestran los controles de plegado en el medianil.","Controla el fundido de salida del c\xF3digo no usado.","Controla las variables en desuso tachadas.","Mostrar sugerencias de fragmentos de c\xF3digo por encima de otras sugerencias.","Mostrar sugerencias de fragmentos de c\xF3digo por debajo de otras sugerencias.","Mostrar sugerencias de fragmentos de c\xF3digo con otras sugerencias.","No mostrar sugerencias de fragmentos de c\xF3digo.","Controla si se muestran los fragmentos de c\xF3digo con otras sugerencias y c\xF3mo se ordenan.","Controla si el editor se desplazar\xE1 con una animaci\xF3n.","Controla si se debe proporcionar la sugerencia de accesibilidad a los usuarios del lector de pantalla cuando se muestra una finalizaci\xF3n insertada.","Tama\xF1o de fuente del widget de sugerencias. Cuando se establece en {0}, se usa el valor de {1}.","Alto de l\xEDnea para el widget de sugerencias. Cuando se establece en {0}, se usa el valor de {1}. El valor m\xEDnimo es 8.","Controla si deben aparecer sugerencias de forma autom\xE1tica al escribir caracteres desencadenadores.","Seleccionar siempre la primera sugerencia.",'Seleccione sugerencias recientes a menos que al escribir m\xE1s se seleccione una, por ejemplo, "console.| -> console.log" porque "log" se ha completado recientemente.','Seleccione sugerencias basadas en prefijos anteriores que han completado esas sugerencias, por ejemplo, "co -> console" y "con -> const".',"Controla c\xF3mo se preseleccionan las sugerencias cuando se muestra la lista,","La pesta\xF1a se completar\xE1 insertando la mejor sugerencia de coincidencia encontrada al presionar la pesta\xF1a","Deshabilitar los complementos para pesta\xF1as.","La pesta\xF1a se completa con fragmentos de c\xF3digo cuando su prefijo coincide. Funciona mejor cuando las 'quickSuggestions' no est\xE1n habilitadas.","Habilita completar pesta\xF1as.","Los terminadores de l\xEDnea no habituales se quitan autom\xE1ticamente.","Los terminadores de l\xEDnea no habituales se omiten.","Advertencia de terminadores de l\xEDnea inusuales que se quitar\xE1n.","Quite los terminadores de l\xEDnea inusuales que podr\xEDan provocar problemas.","La inserci\xF3n y eliminaci\xF3n del espacio en blanco sigue a las tabulaciones.","Use la regla de salto de l\xEDnea predeterminada.","Los saltos de palabra no deben usarse para texto chino, japon\xE9s o coreano (CJK). El comportamiento del texto distinto a CJK es el mismo que el normal.","Controla las reglas de salto de palabra usadas para texto chino, japon\xE9s o coreano (CJK).","Caracteres que se usar\xE1n como separadores de palabras al realizar operaciones o navegaciones relacionadas con palabras.","Las l\xEDneas no se ajustar\xE1n nunca.","Las l\xEDneas se ajustar\xE1n en el ancho de la ventanilla.",'Las l\xEDneas se ajustar\xE1n al valor de "#editor.wordWrapColumn#". ','Las l\xEDneas se ajustar\xE1n al valor que sea inferior: el tama\xF1o de la ventanilla o el valor de "#editor.wordWrapColumn#".',"Controla c\xF3mo deben ajustarse las l\xEDneas.",'Controla la columna de ajuste del editor cuando "#editor.wordWrap#" es "wordWrapColumn" o "bounded".',"Controla si las decoraciones de color en l\xEDnea deben mostrarse con el proveedor de colores del documento predeterminado.","Controla si el editor recibe las pesta\xF1as o las aplaza al \xE1rea de trabajo para la navegaci\xF3n."],"vs/editor/common/core/editorColorRegistry":["Color de fondo para la l\xEDnea resaltada en la posici\xF3n del cursor.","Color de fondo del borde alrededor de la l\xEDnea en la posici\xF3n del cursor.","Color de fondo de rangos resaltados, como en abrir r\xE1pido y encontrar caracter\xEDsticas. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de fondo del borde alrededor de los intervalos resaltados.","Color de fondo del s\xEDmbolo destacado, como Ir a definici\xF3n o Ir al siguiente/anterior s\xEDmbolo. El color no debe ser opaco para no ocultar la decoraci\xF3n subyacente.","Color de fondo del borde alrededor de los s\xEDmbolos resaltados.","Color del cursor del editor.","Color de fondo del cursor de edici\xF3n. Permite personalizar el color del caracter solapado por el bloque del cursor.","Color de los caracteres de espacio en blanco del editor.","Color de n\xFAmeros de l\xEDnea del editor.","Color de las gu\xEDas de sangr\xEDa del editor.",'"editorIndentGuide.background" est\xE1 en desuso. Use "editorIndentGuide.background1" en su lugar.',"Color de las gu\xEDas de sangr\xEDa activas del editor.",'"editorIndentGuide.activeBackground" est\xE1 en desuso. Use "editorIndentGuide.activeBackground1" en su lugar.',"Color de las gu\xEDas de sangr\xEDa del editor (1).","Color de las gu\xEDas de sangr\xEDa del editor (2).","Color de las gu\xEDas de sangr\xEDa del editor (3).","Color de las gu\xEDas de sangr\xEDa del editor (4).","Color de las gu\xEDas de sangr\xEDa del editor (5).","Color de las gu\xEDas de sangr\xEDa del editor (6).","Color de las gu\xEDas de sangr\xEDa del editor activo (1).","Color de las gu\xEDas de sangr\xEDa del editor activo (2).","Color de las gu\xEDas de sangr\xEDa del editor activo (3).","Color de las gu\xEDas de sangr\xEDa del editor activo (4).","Color de las gu\xEDas de sangr\xEDa del editor activo (5).","Color de las gu\xEDas de sangr\xEDa del editor activo (6).","Color del n\xFAmero de l\xEDnea activa en el editor","ID es obsoleto. Usar en lugar 'editorLineNumber.activeForeground'. ","Color del n\xFAmero de l\xEDnea activa en el editor","Color de la l\xEDnea final del editor cuando editor.renderFinalNewline se establece en atenuado.","Color de las reglas del editor","Color principal de lentes de c\xF3digo en el editor","Color de fondo tras corchetes coincidentes","Color de bloques con corchetes coincidentes","Color del borde de la regla de visi\xF3n general.","Color de fondo de la regla de informaci\xF3n general del editor.","Color de fondo del margen del editor. Este espacio contiene los m\xE1rgenes de glifos y los n\xFAmeros de l\xEDnea.","Color del borde de c\xF3digo fuente innecesario (sin usar) en el editor.",`Opacidad de c\xF3digo fuente innecesario (sin usar) en el editor. Por ejemplo, "#000000c0" representar\xE1 el c\xF3digo con un 75 % de opacidad. Para temas de alto contraste, utilice el color del tema 'editorUnnecessaryCode.border' para resaltar el c\xF3digo innecesario en vez de atenuarlo.`,"Color del borde del texto fantasma en el editor.","Color de primer plano del texto fantasma en el editor.","Color de fondo del texto fantasma en el editor.","Color de marcador de regla general para los destacados de rango. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de marcador de regla de informaci\xF3n general para errores. ","Color de marcador de regla de informaci\xF3n general para advertencias.","Color de marcador de regla de informaci\xF3n general para mensajes informativos. ","Color de primer plano de los corchetes (1). Requiere que se habilite la coloraci\xF3n del par de corchetes.","Color de primer plano de los corchetes (2). Requiere que se habilite la coloraci\xF3n del par de corchetes.","Color de primer plano de los corchetes (3). Requiere que se habilite la coloraci\xF3n del par de corchetes.","Color de primer plano de los corchetes (4). Requiere que se habilite la coloraci\xF3n del par de corchetes.","Color de primer plano de los corchetes (5). Requiere que se habilite la coloraci\xF3n del par de corchetes.","Color de primer plano de los corchetes (6). Requiere que se habilite la coloraci\xF3n del par de corchetes.","Color de primer plano de corchetes inesperados.","Color de fondo de las gu\xEDas de par de corchetes inactivos (1). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes inactivos (2). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes inactivos (3). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes inactivos (4). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes inactivos (5). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes inactivos (6). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de pares de corchetes activos (1). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes activos (2). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de pares de corchetes activos (3). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes activos (4). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes activos (5). Requiere habilitar gu\xEDas de par de corchetes.","Color de fondo de las gu\xEDas de par de corchetes activos (6). Requiere habilitar gu\xEDas de par de corchetes.","Color de borde usado para resaltar caracteres Unicode.","Color de borde usado para resaltar caracteres unicode."],"vs/editor/common/editorContextKeys":["Si el texto del editor tiene el foco (el cursor parpadea)","Si el editor o un widget del editor tiene el foco (por ejemplo, el foco est\xE1 en el widget de b\xFAsqueda)","Si un editor o una entrada de texto enriquecido tienen el foco (el cursor parpadea)","Si el editor es de solo lectura","Si el contexto es un editor de diferencias","Si el contexto es un editor de diferencias incrustado","Indica si se selecciona un bloque de c\xF3digo movido para la comparaci\xF3n","Si el visor de diferencias accesible est\xE1 visible","Indica si se alcanza el punto de interrupci\xF3n insertado en paralelo del editor de diferencias",'Si "editor.columnSelection" se ha habilitado',"Si el editor tiene texto seleccionado","Si el editor tiene varias selecciones",'Si "Tabulaci\xF3n" mover\xE1 el foco fuera del editor',"Si el mantenimiento del puntero del editor es visible","Si se centra el desplazamiento del editor","Si el desplazamiento permanente est\xE1 centrado","Si el desplazamiento permanente est\xE1 visible","Si el selector de colores independiente est\xE1 visible","Si el selector de colores independiente est\xE1 centrado","Si el editor forma parte de otro m\xE1s grande (por ejemplo, blocs de notas)","Identificador de idioma del editor","Si el editor tiene un proveedor de elementos de finalizaci\xF3n","Si el editor tiene un proveedor de acciones de c\xF3digo","Si el editor tiene un proveedor de CodeLens","Si el editor tiene un proveedor de definiciones","Si el editor tiene un proveedor de declaraciones","Si el editor tiene un proveedor de implementaci\xF3n","Si el editor tiene un proveedor de definiciones de tipo","Si el editor tiene un proveedor de contenido con mantenimiento del puntero","Si el editor tiene un proveedor de resaltado de documentos","Si el editor tiene un proveedor de s\xEDmbolos de documentos","Si el editor tiene un proveedor de referencia","Si el editor tiene un proveedor de cambio de nombre","Si el editor tiene un proveedor de ayuda de signatura","Si el editor tiene un proveedor de sugerencias insertadas","Si el editor tiene un proveedor de formatos de documento","Si el editor tiene un proveedor de formatos de selecci\xF3n de documentos","Si el editor tiene varios proveedores de formatos del documento","Si el editor tiene varios proveedores de formato de la selecci\xF3n de documentos"],"vs/editor/common/languages":["matriz","booleano","clase","constante","constructor","enumeraci\xF3n","miembro de la enumeraci\xF3n","evento","campo","archivo","funci\xF3n","interfaz","clave","m\xE9todo","m\xF3dulo","espacio de nombres","NULL","n\xFAmero","objeto","operador","paquete","propiedad","cadena","estructura","par\xE1metro de tipo","variable","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["Texto sin formato"],"vs/editor/common/model/editStack":["Escribiendo"],"vs/editor/common/standaloneStrings":["Desarrollador: inspeccionar tokens","Vaya a L\xEDnea/Columna...","Mostrar todos los proveedores de acceso r\xE1pido","Paleta de comandos","Mostrar y ejecutar comandos","Ir a s\xEDmbolo...","Ir a s\xEDmbolo por categor\xEDa...","Contenido del editor","Presione Alt+F1 para ver las opciones de accesibilidad.","Alternar tema de contraste alto","{0} ediciones realizadas en {1} archivos"],"vs/editor/common/viewLayout/viewLineRenderer":["Mostrar m\xE1s ({0})","{0} caracteres"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["Delimitador de la selecci\xF3n","Delimitador establecido en {0}:{1}","Establecer el delimitador de la selecci\xF3n","Ir al delimitador de la selecci\xF3n","Seleccionar desde el delimitador hasta el cursor","Cancelar el delimitador de la selecci\xF3n"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["Resumen color de marcador de regla para corchetes.","Ir al corchete","Seleccionar para corchete","Quitar corchetes","Ir al &&corchete"],"vs/editor/contrib/caretOperations/browser/caretOperations":["Mover el texto seleccionado a la izquierda","Mover el texto seleccionado a la derecha"],"vs/editor/contrib/caretOperations/browser/transpose":["Transponer letras"],"vs/editor/contrib/clipboard/browser/clipboard":["Cor&&tar","Cortar","Cortar","Cortar","&&Copiar","Copiar","Copiar","Copiar","Copiar como","Copiar como","Compartir","Compartir","Compartir","&&Pegar","Pegar","Pegar","Pegar","Copiar con resaltado de sintaxis"],"vs/editor/contrib/codeAction/browser/codeAction":["Se ha producido un error desconocido al aplicar la acci\xF3n de c\xF3digo"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["Tipo de la acci\xF3n de c\xF3digo que se va a ejecutar.","Controla cu\xE1ndo se aplican las acciones devueltas.","Aplicar siempre la primera acci\xF3n de c\xF3digo devuelto.","Aplicar la primera acci\xF3n de c\xF3digo devuelta si solo hay una.","No aplique las acciones de c\xF3digo devuelto.","Controla si solo se deben devolver las acciones de c\xF3digo preferidas.","Correcci\xF3n R\xE1pida","No hay acciones de c\xF3digo disponibles",'No hay acciones de c\xF3digo preferidas para "{0}" disponibles','No hay ninguna acci\xF3n de c\xF3digo para "{0}" disponible.',"No hay acciones de c\xF3digo preferidas disponibles","No hay acciones de c\xF3digo disponibles","Refactorizar...",'No hay refactorizaciones preferidas de "{0}" disponibles','No hay refactorizaciones de "{0}" disponibles',"No hay ninguna refactorizaci\xF3n favorita disponible.","No hay refactorizaciones disponibles","Acci\xF3n de c\xF3digo fuente...",'No hay acciones de origen preferidas para "{0}" disponibles','No hay ninguna acci\xF3n de c\xF3digo fuente para "{0}" disponible.',"No hay ninguna acci\xF3n de c\xF3digo fuente favorita disponible.","No hay acciones de origen disponibles","Organizar Importaciones","No hay acciones de importaci\xF3n disponibles","Corregir todo","No est\xE1 disponible la acci\xF3n de corregir todo","Corregir autom\xE1ticamente...","No hay autocorrecciones disponibles"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["Activar/desactivar la visualizaci\xF3n de los encabezados de los grupos en el men\xFA de Acci\xF3n de c\xF3digo.","Habilita o deshabilita la visualizaci\xF3n de la correcci\xF3n r\xE1pida m\xE1s cercana dentro de una l\xEDnea cuando no est\xE1 actualmente en un diagn\xF3stico."],"vs/editor/contrib/codeAction/browser/codeActionController":["Contexto: {0} en la l\xEDnea {1} y columna {2}.","Ocultar deshabilitado","Mostrar elementos deshabilitados"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["M\xE1s Acciones...","Correcci\xF3n r\xE1pida","Extraer","Insertado","Reescribir","Mover","Delimitar con","Acci\xF3n de origen"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["Mostrar acciones de c\xF3digo. Correcci\xF3n r\xE1pida preferida disponible ({0})","Mostrar acciones de c\xF3digo ({0})","Mostrar acciones de c\xF3digo"],"vs/editor/contrib/codelens/browser/codelensController":["Mostrar comandos de lente de c\xF3digo para la l\xEDnea actual","Seleccionar un comando"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["Haga clic para alternar las opciones de color (rgb/hsl/hex)","Icono para cerrar el selector de colores"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["Mostrar o centrar Selector de colores independientes","&Mostrar o centrar Selector de colores independientes","Ocultar la Selector de colores","Insertar color con Selector de colores independiente"],"vs/editor/contrib/comment/browser/comment":["Alternar comentario de l\xEDnea","&&Alternar comentario de l\xEDnea","Agregar comentario de l\xEDnea","Quitar comentario de l\xEDnea","Alternar comentario de bloque","Alternar &&bloque de comentario"],"vs/editor/contrib/contextmenu/browser/contextmenu":["Minimapa","Representar caracteres","Tama\xF1o vertical","Proporcional","Relleno","Ajustar","Control deslizante","Pasar el mouse","Siempre","Mostrar men\xFA contextual del editor"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["Cursor Deshacer","Cursor Rehacer"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["Pegar como...","Id. de la edici\xF3n pegada que se intenta aplicar. Si no se proporciona, el editor mostrar\xE1 un selector."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["Si se muestra el widget de pegado","Mostrar opciones de pegado...","Ejecutando controladores de pegado. Haga clic para cancelar.","Seleccionar acci\xF3n pegar","Ejecutando controladores de pegado"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["Integrado","Insertar texto sin formato","Insertar URIs","Insertar URI","Insertar rutas de acceso","Insertar ruta de acceso","Insertar rutas de acceso relativas","Insertar ruta de acceso relativa"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["Configura el proveedor de colocaci\xF3n predeterminado que se usar\xE1 para el contenido de un tipo MIME determinado."],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["Si se muestra el widget de colocaci\xF3n","Mostrar opciones de colocaci\xF3n...","Ejecutando controladores de colocaci\xF3n. Haga clic para cancelar."],"vs/editor/contrib/editorState/browser/keybindingCancellation":['Indica si el editor ejecuta una operaci\xF3n que se puede cancelar como, por ejemplo, "Inspeccionar referencias"'],"vs/editor/contrib/find/browser/findController":["El archivo es demasiado grande para realizar una operaci\xF3n de reemplazar todo.","Buscar","&&Buscar",`Invalida la marca "Usar expresi\xF3n regular".\r -La marca no se guardar\xE1 para el futuro.\r -0: No hacer nada\r -1: True\r -2: False`,`Invalida la marca "Hacer coincidir palabra completa\u201D.\r -La marca no se guardar\xE1 para el futuro.\r -0: No hacer nada\r -1: True\r -2: False`,`Invalida la marca "Caso matem\xE1tico".\r -La marca no se guardar\xE1 para el futuro.\r -0: No hacer nada\r -1: True\r -2: False`,`Invalida la marca "Conservar may\xFAsculas y min\xFAsculas.\r -La marca no se guardar\xE1 para el futuro.\r -0: No hacer nada\r -1: True\r -2: False`,"B\xFAsqueda con argumentos","Buscar con selecci\xF3n","Buscar siguiente","Buscar anterior","Ir a Coincidencia...","No hay coincidencias. Intente buscar otra cosa.","Escriba un n\xFAmero para ir a una coincidencia espec\xEDfica (entre 1 y {0})","Escriba un n\xFAmero entre 1 y {0}","Escriba un n\xFAmero entre 1 y {0}","Buscar selecci\xF3n siguiente","Buscar selecci\xF3n anterior","Reemplazar","&&Reemplazar"],"vs/editor/contrib/find/browser/findWidget":['Icono para "Buscar en selecci\xF3n" en el widget de b\xFAsqueda del editor.',"Icono para indicar que el widget de b\xFAsqueda del editor est\xE1 contra\xEDdo.","Icono para indicar que el widget de b\xFAsqueda del editor est\xE1 expandido.",'Icono para "Reemplazar" en el widget de b\xFAsqueda del editor.','Icono para "Reemplazar todo" en el widget de b\xFAsqueda del editor.','Icono para "Buscar anterior" en el widget de b\xFAsqueda del editor.','Icono para "Buscar siguiente" en el widget de b\xFAsqueda del editor.',"Buscar y reemplazar","Buscar","Buscar","Coincidencia anterior","Coincidencia siguiente","Buscar en selecci\xF3n","Cerrar","Reemplazar","Reemplazar","Reemplazar","Reemplazar todo","Alternar reemplazar","S\xF3lo los primeros {0} resultados son resaltados, pero todas las operaciones de b\xFAsqueda trabajan en todo el texto.","{0} de {1}","No hay resultados","Encontrados: {0}",'{0} encontrado para "{1}"','{0} encontrado para "{1}", en {2}','{0} encontrado para "{1}"',"Ctrl+Entrar ahora inserta un salto de l\xEDnea en lugar de reemplazar todo. Puede modificar el enlace de claves para editor.action.replaceAll para invalidar este comportamiento."],"vs/editor/contrib/folding/browser/folding":["Desplegar","Desplegar de forma recursiva","Plegar","Alternar plegado","Plegar de forma recursiva","Cerrar todos los comentarios de bloque","Plegar todas las regiones","Desplegar Todas las Regiones","Plegar todas excepto las seleccionadas","Desplegar todas excepto las seleccionadas","Plegar todo","Desplegar todo","Ir al plegado primario","Ir al rango de plegado anterior","Ir al rango de plegado siguiente","Crear rango de plegado a partir de la selecci\xF3n","Quitar rangos de plegado manuales","Nivel de plegamiento {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["Color de fondo detr\xE1s de los rangos plegados. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color del control plegable en el medianil del editor.","Icono de rangos expandidos en el margen de glifo del editor.","Icono de rangos contra\xEDdos en el margen de glifo del editor.","Icono de intervalos contra\xEDdos manualmente en el margen del glifo del editor.","Icono de intervalos expandidos manualmente en el margen del glifo del editor."],"vs/editor/contrib/fontZoom/browser/fontZoom":["Acercarse a la tipograf\xEDa del editor","Alejarse de la tipograf\xEDa del editor","Restablecer alejamiento de la tipograf\xEDa del editor"],"vs/editor/contrib/format/browser/format":["1 edici\xF3n de formato en la l\xEDnea {0}","{0} ediciones de formato en la l\xEDnea {1}","1 edici\xF3n de formato entre las l\xEDneas {0} y {1}","{0} ediciones de formato entre las l\xEDneas {1} y {2}"],"vs/editor/contrib/format/browser/formatActions":["Dar formato al documento","Dar formato a la selecci\xF3n"],"vs/editor/contrib/gotoError/browser/gotoError":["Ir al siguiente problema (Error, Advertencia, Informaci\xF3n)","Icono para ir al marcador siguiente.","Ir al problema anterior (Error, Advertencia, Informaci\xF3n)","Icono para ir al marcador anterior.","Ir al siguiente problema en Archivos (Error, Advertencia, Informaci\xF3n)","Siguiente &&problema","Ir al problema anterior en Archivos (Error, Advertencia, Informaci\xF3n)","Anterior &&problema"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["Error","Advertencia","Informaci\xF3n","Sugerencia","{0} en {1}. ","{0} de {1} problemas","{0} de {1} problema","Color de los errores del widget de navegaci\xF3n de marcadores del editor.","Fondo del encabezado del error del widget de navegaci\xF3n del marcador de editor.","Color de las advertencias del widget de navegaci\xF3n de marcadores del editor.","Fondo del encabezado de la advertencia del widget de navegaci\xF3n del marcador de editor.","Color del widget informativo marcador de navegaci\xF3n en el editor.","Fondo del encabezado de informaci\xF3n del widget de navegaci\xF3n del marcador de editor.","Fondo del widget de navegaci\xF3n de marcadores del editor."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["Ver","Definiciones",'No se encontr\xF3 ninguna definici\xF3n para "{0}"',"No se encontr\xF3 ninguna definici\xF3n","Ir a definici\xF3n","Ir a &&definici\xF3n","Abrir definici\xF3n en el lateral","Ver la definici\xF3n sin salir","Declaraciones","No se encontr\xF3 ninguna definici\xF3n para '{0}'","No se encontr\xF3 ninguna declaraci\xF3n","Ir a Definici\xF3n","Ir a &&declaraci\xF3n","No se encontr\xF3 ninguna definici\xF3n para '{0}'","No se encontr\xF3 ninguna declaraci\xF3n","Inspeccionar Definici\xF3n","Definiciones de tipo",'No se encontr\xF3 ninguna definici\xF3n de tipo para "{0}"',"No se encontr\xF3 ninguna definici\xF3n de tipo","Ir a la definici\xF3n de tipo","Ir a la definici\xF3n de &&tipo","Inspeccionar definici\xF3n de tipo","Implementaciones",'No se encontr\xF3 ninguna implementaci\xF3n para "{0}"',"No se encontr\xF3 ninguna implementaci\xF3n","Ir a Implementaciones","Ir a &&implementaciones","Inspeccionar implementaciones",'No se ha encontrado ninguna referencia para "{0}".',"No se encontraron referencias","Ir a Referencias","Ir a &&referencias","Referencias","Inspeccionar Referencias","Referencias","Ir a cualquier s\xEDmbolo","Ubicaciones",'No hay resultados para "{0}"',"Referencias"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["Haga clic para mostrar {0} definiciones."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":['Indica si est\xE1 visible la inspecci\xF3n de referencias, como "Inspecci\xF3n de referencias" o "Ver la definici\xF3n sin salir".',"Cargando...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} referencias","{0} referencia","Referencias"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["vista previa no disponible","No hay resultados","Referencias"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["en {0} en la l\xEDnea {1} en la columna {2}","{0} en {1} en la l\xEDnea {2} en la columna {3}","1 s\xEDmbolo en {0}, ruta de acceso completa {1}","{0} s\xEDmbolos en {1}, ruta de acceso completa {2}","No se encontraron resultados","Encontr\xF3 1 s\xEDmbolo en {0}","Encontr\xF3 {0} s\xEDmbolos en {1}","Encontr\xF3 {0} s\xEDmbolos en {1} archivos"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["Indica si hay ubicaciones de s\xEDmbolos a las que se pueda navegar solo con el teclado.","S\xEDmbolo {0} de {1}, {2} para el siguiente","S\xEDmbolo {0} de {1}"],"vs/editor/contrib/hover/browser/hover":["Mostrar o centrarse al mantener el puntero","Mostrar vista previa de la definici\xF3n que aparece al mover el puntero","Desplazar hacia arriba al mantener el puntero","Desplazar hacia abajo al mantener el puntero","Desplazar al mantener el puntero a la izquierda","Desplazar al mantener el puntero a la derecha","Desplazamiento de p\xE1gina hacia arriba","Desplazamiento de p\xE1gina hacia abajo","Ir al puntero superior","Ir a la parte inferior al mantener el puntero"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["Cargando...",'Representaci\xF3n en pausa durante una l\xEDnea larga por motivos de rendimiento. Esto se puede configurar mediante "editor.stopRenderingLineAfter".','Por motivos de rendimiento, la tokenizaci\xF3n se omite con filas largas. Esta opci\xF3n se puede configurar con "editor.maxTokenizationLineLength".'],"vs/editor/contrib/hover/browser/markerHoverParticipant":["Ver el problema","No hay correcciones r\xE1pidas disponibles","Buscando correcciones r\xE1pidas...","No hay correcciones r\xE1pidas disponibles","Correcci\xF3n R\xE1pida"],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["Reemplazar con el valor anterior","Reemplazar con el valor siguiente"],"vs/editor/contrib/indentation/browser/indentation":["Convertir sangr\xEDa en espacios","Convertir sangr\xEDa en tabulaciones","Tama\xF1o de tabulaci\xF3n configurado","Tama\xF1o de tabulaci\xF3n predeterminado","Tama\xF1o de tabulaci\xF3n actual","Seleccionar tama\xF1o de tabulaci\xF3n para el archivo actual","Aplicar sangr\xEDa con tabulaciones","Aplicar sangr\xEDa con espacios","Cambiar tama\xF1o de visualizaci\xF3n de tabulaci\xF3n","Detectar sangr\xEDa del contenido","Volver a aplicar sangr\xEDa a l\xEDneas","Volver a aplicar sangr\xEDa a l\xEDneas seleccionadas"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["Haga doble clic para insertar","cmd + clic","ctrl + clic","opci\xF3n + clic","alt + clic","Ir a Definici\xF3n ({0}), haga clic con el bot\xF3n derecho para obtener m\xE1s informaci\xF3n","Ir a Definici\xF3n ({0})","Ejecutar comando"],"vs/editor/contrib/inlineCompletions/browser/commands":["Mostrar sugerencia alineada siguiente","Mostrar sugerencia alineada anterior","Desencadenar sugerencia alineada","Aceptar la siguiente palabra de sugerencia insertada","Aceptar palabra","Aceptar la siguiente l\xEDnea de sugerencia insertada","Aceptar l\xEDnea","Aceptar la sugerencia insertada","Aceptar","Ocultar la sugerencia insertada","Mostrar siempre la barra de herramientas"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["Sugerencia:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["Si una sugerencia alineada est\xE1 visible","Si la sugerencia alineada comienza con un espacio en blanco","Si la sugerencia insertada comienza con un espacio en blanco menor que lo que se insertar\xEDa mediante tabulaci\xF3n","Si las sugerencias deben suprimirse para la sugerencia actual"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["Inspeccionar esto en la vista accesible ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["Icono para mostrar la sugerencia de par\xE1metro siguiente.","Icono para mostrar la sugerencia de par\xE1metro anterior.","{0} ({1})","Anterior","Siguiente"],"vs/editor/contrib/lineSelection/browser/lineSelection":["Expandir selecci\xF3n de l\xEDnea"],"vs/editor/contrib/linesOperations/browser/linesOperations":["Copiar l\xEDnea arriba","&&Copiar l\xEDnea arriba","Copiar l\xEDnea abajo","Co&&piar l\xEDnea abajo","Selecci\xF3n duplicada","&&Duplicar selecci\xF3n","Mover l\xEDnea hacia arriba","Mo&&ver l\xEDnea arriba","Mover l\xEDnea hacia abajo","Mover &&l\xEDnea abajo","Ordenar l\xEDneas en orden ascendente","Ordenar l\xEDneas en orden descendente","Eliminar l\xEDneas duplicadas","Recortar espacio final","Eliminar l\xEDnea","Sangr\xEDa de l\xEDnea","Anular sangr\xEDa de l\xEDnea","Insertar l\xEDnea arriba","Insertar l\xEDnea debajo","Eliminar todo a la izquierda","Eliminar todo lo que est\xE1 a la derecha","Unir l\xEDneas","Transponer caracteres alrededor del cursor","Transformar a may\xFAsculas","Transformar a min\xFAsculas","Transformar en Title Case","Transformar en Snake Case","Transformar a may\xFAsculas y min\xFAsculas Camel","Transformar en caso Kebab"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["Iniciar edici\xF3n vinculada","Color de fondo cuando el editor cambia el nombre autom\xE1ticamente al escribir."],"vs/editor/contrib/links/browser/links":["No se pudo abrir este v\xEDnculo porque no tiene un formato correcto: {0}","No se pudo abrir este v\xEDnculo porque falta el destino.","Ejecutar comando","Seguir v\xEDnculo","cmd + clic","ctrl + clic","opci\xF3n + clic","alt + clic","Ejecutar el comando {0}","Abrir v\xEDnculo"],"vs/editor/contrib/message/browser/messageController":["Indica si el editor muestra actualmente un mensaje insertado"],"vs/editor/contrib/multicursor/browser/multicursor":["Cursor agregado: {0}","Cursores agregados: {0}","Agregar cursor arriba","&&Agregar cursor arriba","Agregar cursor debajo","A&&gregar cursor abajo","A\xF1adir cursores a finales de l\xEDnea","Agregar c&&ursores a extremos de l\xEDnea","A\xF1adir cursores a la parte inferior","A\xF1adir cursores a la parte superior","Agregar selecci\xF3n hasta la siguiente coincidencia de b\xFAsqueda","Agregar &&siguiente repetici\xF3n","Agregar selecci\xF3n hasta la anterior coincidencia de b\xFAsqueda","Agregar r&&epetici\xF3n anterior","Mover \xFAltima selecci\xF3n hasta la siguiente coincidencia de b\xFAsqueda","Mover \xFAltima selecci\xF3n hasta la anterior coincidencia de b\xFAsqueda","Seleccionar todas las repeticiones de coincidencia de b\xFAsqueda","Seleccionar todas las &&repeticiones","Cambiar todas las ocurrencias","Enfocar el siguiente cursor","Centra el cursor siguiente","Enfocar cursor anterior","Centra el cursor anterior"],"vs/editor/contrib/parameterHints/browser/parameterHints":["Sugerencias para par\xE1metros Trigger"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["Icono para mostrar la sugerencia de par\xE1metro siguiente.","Icono para mostrar la sugerencia de par\xE1metro anterior.","{0}, sugerencia","Color de primer plano del elemento activo en la sugerencia de par\xE1metro."],"vs/editor/contrib/peekView/browser/peekView":["Indica si el editor de c\xF3digo actual est\xE1 incrustado en la inspecci\xF3n.","Cerrar","Color de fondo del \xE1rea de t\xEDtulo de la vista de inspecci\xF3n.","Color del t\xEDtulo de la vista de inpecci\xF3n.","Color de la informaci\xF3n del t\xEDtulo de la vista de inspecci\xF3n.","Color de los bordes y la flecha de la vista de inspecci\xF3n.","Color de fondo de la lista de resultados de vista de inspecci\xF3n.","Color de primer plano de los nodos de inspecci\xF3n en la lista de resultados.","Color de primer plano de los archivos de inspecci\xF3n en la lista de resultados.","Color de fondo de la entrada seleccionada en la lista de resultados de vista de inspecci\xF3n.","Color de primer plano de la entrada seleccionada en la lista de resultados de vista de inspecci\xF3n.","Color de fondo del editor de vista de inspecci\xF3n.","Color de fondo del margen en el editor de vista de inspecci\xF3n.","Color de fondo del desplazamiento permanente en el editor de vista de inspecci\xF3n.","Buscar coincidencia con el color de resaltado de la lista de resultados de vista de inspecci\xF3n.","Buscar coincidencia del color de resultado del editor de vista de inspecci\xF3n.","Hacer coincidir el borde resaltado en el editor de vista previa."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["Abra primero un editor de texto para ir a una l\xEDnea.","Vaya a la l\xEDnea {0} y al car\xE1cter {1}.","Ir a la l\xEDnea {0}.","L\xEDnea actual: {0}, Car\xE1cter: {1}. Escriba un n\xFAmero de l\xEDnea entre 1 y {2} a los que navegar.","L\xEDnea actual: {0}, Car\xE1cter: {1}. Escriba un n\xFAmero de l\xEDnea al que navegar."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["Para ir a un s\xEDmbolo, primero abra un editor de texto con informaci\xF3n de s\xEDmbolo.","El editor de texto activo no proporciona informaci\xF3n de s\xEDmbolos.","No hay ning\xFAn s\xEDmbolo del editor coincidente.","No hay s\xEDmbolos del editor.","Abrir en el lateral","Abrir en la parte inferior","s\xEDmbolos ({0})","propiedades ({0})","m\xE9todos ({0})","funciones ({0})","constructores ({0})","variables ({0})","clases ({0})","estructuras ({0})","eventos ({0})","operadores ({0})","interfaces ({0})","espacios de nombres ({0})","paquetes ({0})","par\xE1metros de tipo ({0})","m\xF3dulos ({0})","propiedades ({0})","enumeraciones ({0})","miembros de enumeraci\xF3n ({0})","cadenas ({0})","archivos ({0})","matrices ({0})","n\xFAmeros ({0})","booleanos ({0})","objetos ({0})","claves ({0})","campos ({0})","constantes ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["No se puede editar en la entrada de solo lectura","No se puede editar en un editor de s\xF3lo lectura"],"vs/editor/contrib/rename/browser/rename":["No hay ning\xFAn resultado.","Error desconocido al resolver el cambio de nombre de la ubicaci\xF3n","Cambiando el nombre de '{0}' a '{1}'","Cambiar el nombre de {0} a {1}","Nombre cambiado correctamente de '{0}' a '{1}'. Resumen: {2}","No se pudo cambiar el nombre a las ediciones de aplicaci\xF3n","No se pudo cambiar el nombre de las ediciones de c\xE1lculo","Cambiar el nombre del s\xEDmbolo","Activar/desactivar la capacidad de previsualizar los cambios antes de cambiar el nombre"],"vs/editor/contrib/rename/browser/renameInputField":["Indica si el widget de cambio de nombre de entrada est\xE1 visible.","Cambie el nombre de la entrada. Escriba el nuevo nombre y presione Entrar para confirmar.","{0} para cambiar de nombre, {1} para obtener una vista previa"],"vs/editor/contrib/smartSelect/browser/smartSelect":["Expandir selecci\xF3n","&&Expandir selecci\xF3n","Reducir la selecci\xF3n","&&Reducir selecci\xF3n"],"vs/editor/contrib/snippet/browser/snippetController2":["Indica si el editor actual est\xE1 en modo de fragmentos de c\xF3digo.","Indica si hay una tabulaci\xF3n siguiente cuando se est\xE1 en modo de fragmentos de c\xF3digo.","Si hay una tabulaci\xF3n anterior cuando se est\xE1 en modo de fragmentos de c\xF3digo.","Ir al marcador de posici\xF3n siguiente..."],"vs/editor/contrib/snippet/browser/snippetVariables":["Domingo","Lunes","Martes","Mi\xE9rcoles","Jueves","Viernes","S\xE1bado","Dom","Lun","Mar","Mi\xE9","Jue","Vie","S\xE1b","Enero","Febrero","Marzo","Abril","May","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre","Ene","Feb","Mar","Abr","May","Jun","Jul","Ago","Sep","Oct","Nov","Dic"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["Alternar desplazamiento permanente","&&Alternar desplazamiento permanente","Desplazamiento permanente","&&Desplazamiento permanente","Desplazamiento permanente de foco","&&Desplazamiento permanente de foco","Seleccionar la siguiente l\xEDnea de desplazamiento r\xE1pida","Seleccionar la l\xEDnea de desplazamiento r\xE1pida anterior","Ir a la l\xEDnea de desplazamiento r\xE1pida con foco","Seleccionar el Editor"],"vs/editor/contrib/suggest/browser/suggest":["Si alguna sugerencia tiene el foco","Indica si los detalles de las sugerencias est\xE1n visibles.","Indica si hay varias sugerencias para elegir.","Indica si la inserci\xF3n de la sugerencia actual genera un cambio o si ya se ha escrito todo.","Indica si se insertan sugerencias al presionar Entrar.","Indica si la sugerencia actual tiene el comportamiento de inserci\xF3n y reemplazo.","Indica si el comportamiento predeterminado es insertar o reemplazar.","Indica si la sugerencia actual admite la resoluci\xF3n de m\xE1s detalles."],"vs/editor/contrib/suggest/browser/suggestController":['Aceptando "{0}" ediciones adicionales de {1} realizadas',"Sugerencias para Trigger","Insertar","Insertar","Reemplazar","Reemplazar","Insertar","mostrar menos","mostrar m\xE1s","Restablecer tama\xF1o del widget de sugerencias"],"vs/editor/contrib/suggest/browser/suggestWidget":["Color de fondo del widget sugerido.","Color de borde del widget sugerido.","Color de primer plano del widget sugerido.","Color de primer plano de le entrada seleccionada del widget de sugerencias.","Color de primer plano del icono de la entrada seleccionada en el widget de sugerencias.","Color de fondo de la entrada seleccionada del widget sugerido.","Color del resaltado coincidido en el widget sugerido.","Color de los resaltados de coincidencia en el widget de sugerencias cuando se enfoca un elemento.","Color de primer plano del estado del widget sugerido.","Cargando...","No hay sugerencias.","Sugerir","{0} {1}, {2}","{0} {1}","{0}, {1}","{0}, documentos: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["Cerrar","Cargando..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["Icono para obtener m\xE1s informaci\xF3n en el widget de sugerencias.","Leer m\xE1s"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["Color de primer plano de los s\xEDmbolos de matriz. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos booleanos. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de clase. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de color. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos constantes. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de constructor. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de enumerador. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de miembro del enumerador. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de evento. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de campo. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de archivo. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de carpeta. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de funci\xF3n. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de interfaz. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de claves. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de palabra clave. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de m\xE9todo. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de m\xF3dulo. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de espacio de nombres. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos nulos. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano para los s\xEDmbolos num\xE9ricos. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de objeto. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano para los s\xEDmbolos del operador. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de paquete. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de propiedad. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de referencia. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de fragmento de c\xF3digo. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de cadena. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de estructura. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de texto. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano para los s\xEDmbolos de par\xE1metro de tipo. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos de unidad. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias.","Color de primer plano de los s\xEDmbolos variables. Estos s\xEDmbolos aparecen en el contorno, la ruta de navegaci\xF3n y el widget de sugerencias."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["Alternar tecla de tabulaci\xF3n para mover el punto de atenci\xF3n","Presionando la pesta\xF1a ahora mover\xE1 el foco al siguiente elemento enfocable.","Presionando la pesta\xF1a ahora insertar\xE1 el car\xE1cter de tabulaci\xF3n"],"vs/editor/contrib/tokenization/browser/tokenization":["Desarrollador: forzar nueva aplicaci\xF3n de token"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["Icono que se muestra con un mensaje de advertencia en el editor de extensiones.","Este documento contiene muchos caracteres Unicode ASCII no b\xE1sicos","Este documento contiene muchos caracteres Unicode ambiguos","Este documento contiene muchos caracteres Unicode invisibles","El car\xE1cter {0} podr\xEDa confundirse con el car\xE1cter ASCII {1}, que es m\xE1s com\xFAn en el c\xF3digo fuente.","El car\xE1cter {0} podr\xEDa confundirse con el car\xE1cter {1}, que es m\xE1s com\xFAn en el c\xF3digo fuente.","El car\xE1cter {0} es invisible.","El car\xE1cter {0} no es un car\xE1cter ASCII b\xE1sico.","Ajustar la configuraci\xF3n","Deshabilitar resaltado en comentarios","Deshabilitar resaltado de caracteres en comentarios","Deshabilitar resaltado en cadenas","Deshabilitar resaltado de caracteres en cadenas","Deshabilitar resaltado ambiguo","Deshabilitar el resaltado de caracteres ambiguos","Deshabilitar resaltado invisible","Deshabilitar el resaltado de caracteres invisibles","Deshabilitar resaltado que no es ASCII","Deshabilitar el resaltado de caracteres ASCII no b\xE1sicos","Mostrar opciones de exclusi\xF3n","Excluir {0} (car\xE1cter invisible) de que se resalte","Excluir {0} de ser resaltado",'Permite caracteres Unicode m\xE1s comunes en el idioma "{0}".',"Configurar opciones de resaltado Unicode"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["Terminadores de l\xEDnea inusuales","Se han detectado terminadores de l\xEDnea inusuales",`Este archivo "{0}" contiene uno o m\xE1s caracteres de terminaci\xF3n de l\xEDnea inusuales, como el separador de l\xEDnea (LS) o el separador de p\xE1rrafo (PS).\r -\r -Se recomienda eliminarlos del archivo. Esto puede configurarse mediante "editor.unusualLineTerminators".`,"&&Quitar terminadores de l\xEDnea inusuales","Omitir"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["Color de fondo de un s\xEDmbolo durante el acceso de lectura, como la lectura de una variable. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de fondo de un s\xEDmbolo durante el acceso de escritura, como escribir en una variable. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de fondo de la presencia textual para un s\xEDmbolo. Para evitar ocultar cualquier decoraci\xF3n subyacente, el color no debe ser opaco.","Color de fondo de un s\xEDmbolo durante el acceso de lectura; por ejemplo, cuando se lee una variable.","Color de fondo de un s\xEDmbolo durante el acceso de escritura; por ejemplo, cuando se escribe una variable.","Color de borde de una repetici\xF3n textual de un s\xEDmbolo.","Color del marcador de regla general para destacados de s\xEDmbolos. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de marcador de regla general para destacados de s\xEDmbolos de acceso de escritura. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color del marcador de regla de informaci\xF3n general de una repetici\xF3n textual de un s\xEDmbolo. El color no debe ser opaco para no ocultar las decoraciones subyacentes."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["Ir al siguiente s\xEDmbolo destacado","Ir al s\xEDmbolo destacado anterior","Desencadenar los s\xEDmbolos destacados"],"vs/editor/contrib/wordOperations/browser/wordOperations":["Eliminar palabra"],"vs/platform/action/common/actionCommonCategories":["Ver","Ayuda","Probar","archivo","Preferencias","Desarrollador"],"vs/platform/actionWidget/browser/actionList":["{0} para aplicar, {1} para previsualizar","{0} para aplicar","{0}, Motivo de deshabilitaci\xF3n: {1}","Widget de acci\xF3n"],"vs/platform/actionWidget/browser/actionWidget":["Color de fondo de los elementos de acci\xF3n alternados en la barra de acciones.","Si la lista de widgets de acci\xF3n es visible","Ocultar el widget de acci\xF3n","Seleccione la acci\xF3n anterior","Seleccione la siguiente acci\xF3n","Aceptar la acci\xF3n seleccionada","Vista previa de la acci\xF3n seleccionada"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["Ocultar","Men\xFA Restablecer"],"vs/platform/actions/common/menuService":['Ocultar "{0}"'],"vs/platform/audioCues/browser/audioCueService":["Error en la l\xEDnea","Advertencia en la l\xEDnea","\xC1rea doblada en la l\xEDnea","Punto de interrupci\xF3n en la l\xEDnea","Sugerencia insertada en la l\xEDnea","Correcci\xF3n r\xE1pida del terminal","Depurador detenido en el punto de interrupci\xF3n","No hay sugerencias de incrustaci\xF3n en la l\xEDnea","Tarea completada.","Error en la tarea","Error del comando de terminal","Campana de terminal","Celda del bloc de notas completada","Error en la celda del bloc de notas","L\xEDnea de diferencia insertada","L\xEDnea de diferencia eliminada","L\xEDnea de diferencia modificada","Se envi\xF3 una solicitud de chat","Respuesta de chat recibida","Respuesta de chat pendiente"],"vs/platform/configuration/common/configurationRegistry":["La configuraci\xF3n del lenguaje predeterminada se reemplaza","Configure los valores que se invalidar\xE1n para el idioma {0}.","Establecer los valores de configuraci\xF3n que se reemplazar\xE1n para un lenguaje.","Esta configuraci\xF3n no admite la configuraci\xF3n por idioma.","Establecer los valores de configuraci\xF3n que se reemplazar\xE1n para un lenguaje.","Esta configuraci\xF3n no admite la configuraci\xF3n por idioma.","No se puede registrar una propiedad vac\xEDa.",`No se puede registrar "{0}". Coincide con el patr\xF3n de propiedad '\\\\[.*\\\\]$' para describir la configuraci\xF3n del editor espec\xEDfica del lenguaje. Utilice la contribuci\xF3n "configurationDefaults".`,'No se puede registrar "{0}". Esta propiedad ya est\xE1 registrada.','No se puede registrar "{0}". La directiva asociada {1} ya est\xE1 registrada con {2}.'],"vs/platform/contextkey/browser/contextKeyService":["Comando que devuelve informaci\xF3n sobre las claves de contexto"],"vs/platform/contextkey/common/contextkey":["Expresi\xF3n de clave de contexto vac\xEDa",'\xBFHa olvidado escribir una expresi\xF3n? tambi\xE9n puede poner "false" o "true" para evaluar siempre como false o true, respectivamente.',"'in' despu\xE9s de 'not'.","par\xE9ntesis de cierre ')'","Token inesperado","\xBFHa olvidado poner && o || antes del token?","Final de expresi\xF3n inesperado","\xBFHa olvidado poner una clave de contexto?",`Esperado: {0}\r -recibido: '{1}'.`],"vs/platform/contextkey/common/contextkeys":["Si el sistema operativo es macOS","Si el sistema operativo es Linux","Si el sistema operativo es Windows","Si la plataforma es un explorador web","Si el sistema operativo es macOS en una plataforma que no es de explorador","Si el sistema operativo es IOS","Si la plataforma es un explorador web m\xF3vil","Tipo de calidad de VS Code","Si el foco del teclado est\xE1 dentro de un cuadro de entrada"],"vs/platform/contextkey/common/scanner":["\xBFQuiso decir {0}?","\xBFQuiso decir {0} o {1}?","\xBFQuiso decir {0}, {1} o {2}?","\xBFHa olvidado abrir o cerrar la cita?",`\xBFHa olvidado escapar el car\xE1cter "/" (barra diagonal)?Coloque dos barras diagonales inversas antes de que escape, por ejemplo, '\\\\/'.`],"vs/platform/history/browser/contextScopedHistoryWidget":["Indica si las sugerencias est\xE1n visibles."],"vs/platform/keybinding/common/abstractKeybindingService":["Se presion\xF3 ({0}). Esperando la siguiente tecla...","Se ha presionado ({0}). Esperando la siguiente tecla...","La combinaci\xF3n de claves ({0}, {1}) no es un comando.","La combinaci\xF3n de claves ({0}, {1}) no es un comando."],"vs/platform/list/browser/listService":["\xC1rea de trabajo",'Se asigna a "Control" en Windows y Linux y a "Comando" en macOS.','Se asigna a "Alt" en Windows y Linux y a "Opci\xF3n" en macOS.',"El modificador que se utilizar\xE1 para agregar un elemento en los \xE1rboles y listas para una selecci\xF3n m\xFAltiple con el rat\xF3n (por ejemplo en el explorador, abiertos editores y vista de scm). Los gestos de rat\xF3n 'Abrir hacia' - si est\xE1n soportados - se adaptar\xE1n de forma tal que no tenga conflicto con el modificador m\xFAltiple.","Controla c\xF3mo abrir elementos en los \xE1rboles y las listas mediante el mouse (si se admite). Tenga en cuenta que algunos \xE1rboles y listas pueden optar por ignorar esta configuraci\xF3n si no es aplicable.","Controla si las listas y los \xE1rboles admiten el desplazamiento horizontal en el \xE1rea de trabajo. Advertencia: La activaci\xF3n de esta configuraci\xF3n repercute en el rendimiento.","Controla si los clics en la barra de desplazamiento se desplazan p\xE1gina por p\xE1gina.","Controla la sangr\xEDa de \xE1rbol en p\xEDxeles.","Controla si el \xE1rbol debe representar gu\xEDas de sangr\xEDa.","Controla si las listas y los \xE1rboles tienen un desplazamiento suave.",'Se usar\xE1 un multiplicador en los eventos de desplazamiento de la rueda del mouse "deltaX" y "deltaY". ','Multiplicador de la velocidad de desplazamiento al presionar "Alt".',"Resalta elementos al buscar. Navegar m\xE1s arriba o abajo pasar\xE1 solo por los elementos resaltados.","Filtre elementos al buscar.","Controla el modo de b\xFAsqueda predeterminado para listas y \xE1rboles en el \xE1rea de trabajo.","La navegaci\xF3n simple del teclado se centra en elementos que coinciden con la entrada del teclado. El emparejamiento se hace solo en prefijos.","Destacar la navegaci\xF3n del teclado resalta los elementos que coinciden con la entrada del teclado. M\xE1s arriba y abajo la navegaci\xF3n atravesar\xE1 solo los elementos destacados.","La navegaci\xF3n mediante el teclado de filtro filtrar\xE1 y ocultar\xE1 todos los elementos que no coincidan con la entrada del teclado.","Controla el estilo de navegaci\xF3n del teclado para listas y \xE1rboles en el \xE1rea de trabajo. Puede ser simple, resaltar y filtrar.",'Use "workbench.list.defaultFindMode" y "workbench.list.typeNavigationMode" en su lugar.',"Usar coincidencias aproximadas al buscar.","Use coincidencias contiguas al buscar.","Controla el tipo de coincidencia que se usa al buscar listas y \xE1rboles en el \xE1rea de trabajo.","Controla c\xF3mo se expanden las carpetas de \xE1rbol al hacer clic en sus nombres. Tenga en cuenta que algunos \xE1rboles y listas pueden optar por omitir esta configuraci\xF3n si no es aplicable.",'Controla el funcionamiento de la navegaci\xF3n por tipos en listas y \xE1rboles del \xE1rea de trabajo. Cuando se establece en "trigger", la navegaci\xF3n por tipos comienza una vez que se ejecuta el comando "list.triggerTypeNavigation".'],"vs/platform/markers/common/markers":["Error","Advertencia","Informaci\xF3n"],"vs/platform/quickinput/browser/commandsQuickAccess":["usado recientemente","comandos similares","usados habitualmente","otros comandos","comandos similares","{0}, {1}",'El comando "{0}" ha dado lugar a un error'],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["Atr\xE1s",'Presione "Entrar" para confirmar su entrada o "Esc" para cancelar',"{0}/{1}","Escriba para restringir los resultados."],"vs/platform/quickinput/browser/quickInputController":["Activar o desactivar todas las casillas","{0} resultados","{0} seleccionados","Aceptar","Personalizado","Atr\xE1s ({0})","Atr\xE1s"],"vs/platform/quickinput/browser/quickInputList":["Entrada r\xE1pida"],"vs/platform/quickinput/browser/quickInputUtils":['Haga clic en para ejecutar el comando "{0}"'],"vs/platform/theme/common/colorRegistry":["Color de primer plano general. Este color solo se usa si un componente no lo invalida.","Primer plano general de los elementos deshabilitados. Este color solo se usa si un componente no lo reemplaza.","Color de primer plano general para los mensajes de erroe. Este color solo se usa si un componente no lo invalida.","Color de primer plano para el texto descriptivo que proporciona informaci\xF3n adicional, por ejemplo para una etiqueta.","El color predeterminado para los iconos en el \xE1rea de trabajo.","Color de borde de los elementos con foco. Este color solo se usa si un componente no lo invalida.","Un borde adicional alrededor de los elementos para separarlos unos de otros y as\xED mejorar el contraste.","Un borde adicional alrededor de los elementos activos para separarlos unos de otros y as\xED mejorar el contraste.","El color de fondo del texto seleccionado en el \xE1rea de trabajo (por ejemplo, campos de entrada o \xE1reas de texto). Esto no se aplica a las selecciones dentro del editor.","Color para los separadores de texto.","Color de primer plano para los v\xEDnculos en el texto.","Color de primer plano para los enlaces de texto, al hacer clic o pasar el mouse sobre ellos.","Color de primer plano para los segmentos de texto con formato previo.","Color de fondo para los bloques en texto.","Color de borde para los bloques en texto.","Color de fondo para los bloques de c\xF3digo en el texto.","Color de sombra de los widgets dentro del editor, como buscar/reemplazar","Color de borde de los widgets dentro del editor, como buscar/reemplazar","Fondo de cuadro de entrada.","Primer plano de cuadro de entrada.","Borde de cuadro de entrada.","Color de borde de opciones activadas en campos de entrada.","Color de fondo de las opciones activadas en los campos de entrada.","Color de fondo al pasar por encima de las opciones en los campos de entrada.","Color de primer plano de las opciones activadas en los campos de entrada.","Color de primer plano para el marcador de posici\xF3n de texto","Color de fondo de validaci\xF3n de entrada para gravedad de informaci\xF3n.","Color de primer plano de validaci\xF3n de entrada para informaci\xF3n de gravedad.","Color de borde de validaci\xF3n de entrada para gravedad de informaci\xF3n.","Color de fondo de validaci\xF3n de entrada para gravedad de advertencia.","Color de primer plano de validaci\xF3n de entrada para informaci\xF3n de advertencia.","Color de borde de validaci\xF3n de entrada para gravedad de advertencia.","Color de fondo de validaci\xF3n de entrada para gravedad de error.","Color de primer plano de validaci\xF3n de entrada para informaci\xF3n de error.","Color de borde de valdaci\xF3n de entrada para gravedad de error.","Fondo de lista desplegable.","Fondo de la lista desplegable.","Primer plano de lista desplegable.","Borde de lista desplegable.","Color de primer plano del bot\xF3n.","Color del separador de botones.","Color de fondo del bot\xF3n.","Color de fondo del bot\xF3n al mantener el puntero.","Color del borde del bot\xF3n","Color de primer plano del bot\xF3n secundario.","Color de fondo del bot\xF3n secundario.","Color de fondo del bot\xF3n secundario al mantener el mouse.","Color de fondo de la insignia. Las insignias son peque\xF1as etiquetas de informaci\xF3n, por ejemplo los resultados de un n\xFAmero de resultados.","Color de primer plano de la insignia. Las insignias son peque\xF1as etiquetas de informaci\xF3n, por ejemplo los resultados de un n\xFAmero de resultados.","Sombra de la barra de desplazamiento indica que la vista se ha despazado.","Color de fondo de control deslizante de barra de desplazamiento.","Color de fondo de barra de desplazamiento cursor cuando se pasar sobre el control.","Color de fondo de la barra de desplazamiento al hacer clic.","Color de fondo para la barra de progreso que se puede mostrar para las operaciones de larga duraci\xF3n.","Color de fondo del texto de error del editor. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de primer plano de squigglies de error en el editor.","Si se establece, color de subrayados dobles para errores en el editor.","Color de fondo del texto de advertencia del editor. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de primer plano de squigglies de advertencia en el editor.","Si se establece, color de subrayados dobles para advertencias en el editor.","Color de fondo del texto de informaci\xF3n del editor. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de primer plano de los subrayados ondulados informativos en el editor.","Si se establece, color de subrayados dobles para informaciones en el editor.","Color de primer plano de pista squigglies en el editor.","Si se establece, color de subrayados dobles para sugerencias en el editor.","Color de borde de los marcos activos.","Color de fondo del editor.","Color de primer plano predeterminado del editor.","Color de fondo de desplazamiento permanente para el editor","Desplazamiento permanente al mantener el mouse sobre el color de fondo del editor","Color de fondo del editor de widgets como buscar/reemplazar","Color de primer plano de los widgets del editor, como buscar y reemplazar.","Color de borde de los widgets del editor. El color solo se usa si el widget elige tener un borde y no invalida el color.","Color del borde de la barra de cambio de tama\xF1o de los widgets del editor. El color se utiliza solo si el widget elige tener un borde de cambio de tama\xF1o y si un widget no invalida el color.","Color de fondo del selector r\xE1pido. El widget del selector r\xE1pido es el contenedor para selectores como la paleta de comandos.","Color de primer plano del selector r\xE1pido. El widget del selector r\xE1pido es el contenedor para selectores como la paleta de comandos.","Color de fondo del t\xEDtulo del selector r\xE1pido. El widget del selector r\xE1pido es el contenedor para selectores como la paleta de comandos.","Selector de color r\xE1pido para la agrupaci\xF3n de etiquetas.","Selector de color r\xE1pido para la agrupaci\xF3n de bordes.","Color de fondo de etiqueta de enlace de teclado. La etiqueta enlace de teclado se usa para representar un m\xE9todo abreviado de teclado.","Color de primer plano de etiqueta de enlace de teclado. La etiqueta enlace de teclado se usa para representar un m\xE9todo abreviado de teclado.","Color del borde de la etiqueta de enlace de teclado. La etiqueta enlace de teclado se usa para representar un m\xE9todo abreviado de teclado.","Color del borde inferior de la etiqueta de enlace de teclado. La etiqueta enlace de teclado se usa para representar un m\xE9todo abreviado de teclado.","Color de la selecci\xF3n del editor.","Color del texto seleccionado para alto contraste.","Color de la selecci\xF3n en un editor inactivo. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color en las regiones con el mismo contenido que la selecci\xF3n. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de borde de las regiones con el mismo contenido que la selecci\xF3n.","Color de la coincidencia de b\xFAsqueda actual.","Color de los otros resultados de la b\xFAsqueda. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de la gama que limita la b\xFAsqueda. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de borde de la coincidencia de b\xFAsqueda actual.","Color de borde de otra b\xFAsqueda que coincide.","Color del borde de la gama que limita la b\xFAsqueda. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de las consultas coincidentes del Editor de b\xFAsqueda.","Color de borde de las consultas coincidentes del Editor de b\xFAsqueda.","Color del texto en el mensaje de finalizaci\xF3n del viewlet de b\xFAsqueda.","Destacar debajo de la palabra para la que se muestra un mensaje al mantener el mouse. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de fondo al mantener el puntero en el editor.","Color de primer plano al mantener el puntero en el editor.","Color del borde al mantener el puntero en el editor.","Color de fondo de la barra de estado al mantener el puntero en el editor.","Color de los v\xEDnculos activos.","Color de primer plano de las sugerencias insertadas","Color de fondo de las sugerencias insertadas","Color de primer plano de las sugerencias insertadas para los tipos de letra","Color de fondo de las sugerencias insertadas para los tipos de letra","Color de primer plano de las sugerencias insertadas para los par\xE1metros","Color de fondo de las sugerencias insertadas para los par\xE1metros","El color utilizado para el icono de bombilla de acciones.","El color utilizado para el icono de la bombilla de acciones de correcci\xF3n autom\xE1tica.","Color de fondo para el texto que se insert\xF3. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de fondo para el texto que se elimin\xF3. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Color de fondo de las l\xEDneas insertadas. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de fondo de las l\xEDneas que se quitaron. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de fondo del margen donde se insertaron las l\xEDneas.","Color de fondo del margen donde se quitaron las l\xEDneas.","Primer plano de la regla de informaci\xF3n general de diferencias para el contenido insertado.","Primer plano de la regla de informaci\xF3n general de diferencias para el contenido quitado.","Color de contorno para el texto insertado.","Color de contorno para el texto quitado.","Color del borde entre ambos editores de texto.","Color de relleno diagonal del editor de diferencias. El relleno diagonal se usa en las vistas de diferencias en paralelo.","Color de fondo de los bloques sin modificar en el editor de diferencias.","Color de primer plano de los bloques sin modificar en el editor de diferencias.","Color de fondo del c\xF3digo sin modificar en el editor de diferencias.","Color de fondo de la lista o el \xE1rbol del elemento con el foco cuando la lista o el \xE1rbol est\xE1n activos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, cuando est\xE1n inactivos no.","Color de primer plano de la lista o el \xE1rbol del elemento con el foco cuando la lista o el \xE1rbol est\xE1n activos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, cuando est\xE1n inactivos no.","Color de contorno de la lista o el \xE1rbol del elemento con el foco cuando la lista o el \xE1rbol est\xE1n activos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, pero no cuando est\xE1n inactivos.","Color de contorno de la lista o el \xE1rbol del elemento con el foco cuando la lista o el \xE1rbol est\xE1n activos y seleccionados. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, pero no cuando est\xE1n inactivos.","Color de fondo de la lista o el \xE1rbol del elemento seleccionado cuando la lista o el \xE1rbol est\xE1n activos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, cuando est\xE1n inactivos no.","Color de primer plano de la lista o el \xE1rbol del elemento seleccionado cuando la lista o el \xE1rbol est\xE1n activos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, cuando est\xE1n inactivos no.","Color de primer plano del icono de lista o \xE1rbol del elemento seleccionado cuando la lista o el \xE1rbol est\xE1n activos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, cuando est\xE1n inactivos no.","Color de fondo de la lista o el \xE1rbol del elemento seleccionado cuando la lista o el \xE1rbol est\xE1n inactivos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, cuando est\xE1n inactivos no.","Color de primer plano de la lista o el \xE1rbol del elemento con el foco cuando la lista o el \xE1rbol esta inactiva. Una lista o un \xE1rbol tiene el foco del teclado cuando est\xE1 activo, cuando esta inactiva no.","Color de primer plano del icono de lista o \xE1rbol del elemento seleccionado cuando la lista o el \xE1rbol est\xE1n inactivos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, cuando est\xE1n inactivos no.","Color de fondo de la lista o el \xE1rbol del elemento con el foco cuando la lista o el \xE1rbol est\xE1n inactivos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, pero no cuando est\xE1n inactivos.","Color de contorno de la lista o el \xE1rbol del elemento con el foco cuando la lista o el \xE1rbol est\xE1n inactivos. Una lista o un \xE1rbol tienen el foco del teclado cuando est\xE1n activos, pero no cuando est\xE1n inactivos.","Fondo de la lista o el \xE1rbol al mantener el mouse sobre los elementos.","Color de primer plano de la lista o el \xE1rbol al pasar por encima de los elementos con el rat\xF3n.","Fondo de arrastrar y colocar la lista o el \xE1rbol al mover los elementos con el mouse.","Color de primer plano de la lista o el \xE1rbol de las coincidencias resaltadas al buscar dentro de la lista o el \xE1bol.","Color de primer plano de la lista o \xE1rbol de los elementos coincidentes en los elementos enfocados activamente cuando se busca dentro de la lista o \xE1rbol.","Color de primer plano de una lista o \xE1rbol para los elementos inv\xE1lidos, por ejemplo una raiz sin resolver en el explorador.","Color del primer plano de elementos de lista que contienen errores.","Color del primer plano de elementos de lista que contienen advertencias.","Color de fondo del widget de filtro de tipo en listas y \xE1rboles.","Color de contorno del widget de filtro de tipo en listas y \xE1rboles.","Color de contorno del widget de filtro de tipo en listas y \xE1rboles, cuando no hay coincidencias.","Color de sombra del widget de filtrado de escritura en listas y \xE1rboles.","Color de fondo de la coincidencia filtrada.","Color de borde de la coincidencia filtrada.","Color de trazo de \xE1rbol para las gu\xEDas de sangr\xEDa.","Color de trazo de \xE1rbol para las gu\xEDas de sangr\xEDa que no est\xE1n activas.","Color de borde de la tabla entre columnas.","Color de fondo para las filas de tabla impares.","Color de primer plano de lista/\xE1rbol para los elementos no enfatizados.","Color de fondo de la casilla de verificaci\xF3n del widget.","Color de fondo del widget de la casilla cuando se selecciona el elemento en el que se encuentra.","Color de primer plano del widget de la casilla de verificaci\xF3n.","Color del borde del widget de la casilla de verificaci\xF3n.","Color de borde del widget de la casilla cuando se selecciona el elemento en el que se encuentra.","Use quickInputList.focusBackground en su lugar.","Selector r\xE1pido del color de primer plano para el elemento con el foco.","Color de primer plano del icono del selector r\xE1pido para el elemento con el foco.","Color de fondo del selector r\xE1pido para el elemento con el foco.","Color del borde de los men\xFAs.","Color de primer plano de los elementos de men\xFA.","Color de fondo de los elementos de men\xFA.","Color de primer plano del menu para el elemento del men\xFA seleccionado.","Color de fondo del menu para el elemento del men\xFA seleccionado.","Color del borde del elemento seleccionado en los men\xFAs.","Color del separador del menu para un elemento del men\xFA.","El fondo de la barra de herramientas se perfila al pasar por encima de las acciones con el mouse.","La barra de herramientas se perfila al pasar por encima de las acciones con el mouse.","Fondo de la barra de herramientas al mantener el mouse sobre las acciones","Resaltado del color de fondo para una ficha de un fragmento de c\xF3digo.","Resaltado del color del borde para una ficha de un fragmento de c\xF3digo.","Resaltado del color de fondo para la \xFAltima ficha de un fragmento de c\xF3digo.","Resaltado del color del borde para la \xFAltima tabulaci\xF3n de un fragmento de c\xF3digo.","Color de los elementos de ruta de navegaci\xF3n que reciben el foco.","Color de fondo de los elementos de ruta de navegaci\xF3n","Color de los elementos de ruta de navegaci\xF3n que reciben el foco.","Color de los elementos de ruta de navegaci\xF3n seleccionados.","Color de fondo del selector de elementos de ruta de navegaci\xF3n.","Fondo del encabezado actual en los conflictos de combinaci\xF3n en l\xEDnea. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Fondo de contenido actual en los conflictos de combinaci\xF3n en l\xEDnea. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Fondo de encabezado entrante en los conflictos de combinaci\xF3n en l\xEDnea. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Fondo de contenido entrante en los conflictos de combinaci\xF3n en l\xEDnea. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Fondo de cabecera de elemento antecesor com\xFAn en conflictos de fusi\xF3n en l\xEDnea. El color no debe ser opaco para no ocultar decoraciones subyacentes.","Fondo de contenido antecesor com\xFAn en conflictos de combinaci\xF3n en l\xEDnea. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color del borde en los encabezados y el divisor en conflictos de combinaci\xF3n alineados.","Primer plano de la regla de visi\xF3n general actual para conflictos de combinaci\xF3n alineados.","Primer plano de regla de visi\xF3n general de entrada para conflictos de combinaci\xF3n alineados.","Primer plano de la regla de visi\xF3n general de ancestros comunes para conflictos de combinaci\xF3n alineados.","Color del marcador de regla general para buscar actualizaciones. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color del marcador de la regla general para los destacados de la selecci\xF3n. El color no debe ser opaco para no ocultar las decoraciones subyacentes.","Color de marcador de minimapa para coincidencias de b\xFAsqueda.","Color de marcador de minimapa para las selecciones del editor que se repiten.","Color del marcador de minimapa para la selecci\xF3n del editor.","Color del marcador de minimapa para informaci\xF3n.","Color del marcador de minimapa para advertencias.","Color del marcador de minimapa para errores.","Color de fondo del minimapa.",'Opacidad de los elementos de primer plano representados en el minimapa. Por ejemplo, "#000000c0" representar\xE1 los elementos con 75% de opacidad.',"Color de fondo del deslizador del minimapa.","Color de fondo del deslizador del minimapa al pasar el puntero.","Color de fondo del deslizador de minimapa al hacer clic en \xE9l.","Color utilizado para el icono de error de problemas.","Color utilizado para el icono de advertencia de problemas.","Color utilizado para el icono de informaci\xF3n de problemas.","Color de primer plano que se usa en los gr\xE1ficos.","Color que se usa para las l\xEDneas horizontales en los gr\xE1ficos.","Color rojo que se usa en las visualizaciones de gr\xE1ficos.","Color azul que se usa en las visualizaciones de gr\xE1ficos.","Color amarillo que se usa en las visualizaciones de gr\xE1ficos.","Color naranja que se usa en las visualizaciones de gr\xE1ficos.","Color verde que se usa en las visualizaciones de gr\xE1ficos.","Color p\xFArpura que se usa en las visualizaciones de gr\xE1ficos."],"vs/platform/theme/common/iconRegistry":["Identificador de la fuente que se va a usar. Si no se establece, se usa la fuente definida en primer lugar.","Car\xE1cter de fuente asociado a la definici\xF3n del icono.","Icono de la acci\xF3n de cierre en los widgets.","Icono para ir a la ubicaci\xF3n del editor anterior.","Icono para ir a la ubicaci\xF3n del editor siguiente."],"vs/platform/undoRedo/common/undoRedoService":["Se han cerrado los siguientes archivos y se han modificado en el disco: {0}.","Los siguientes archivos se han modificado de forma incompatible: {0}.",'No se pudo deshacer "{0}" en todos los archivos. {1}','No se pudo deshacer "{0}" en todos los archivos. {1}','No se pudo deshacer "{0}" en todos los archivos porque se realizaron cambios en {1}','No se pudo deshacer "{0}" en todos los archivos porque ya hay una operaci\xF3n de deshacer o rehacer en ejecuci\xF3n en {1}','No se pudo deshacer "{0}" en todos los archivos porque se produjo una operaci\xF3n de deshacer o rehacer mientras tanto','\xBFDesea deshacer "{0}" en todos los archivos?',"&&Deshacer en {0} archivos","Deshacer este &&archivo",'No se pudo deshacer "{0}" porque ya hay una operaci\xF3n de deshacer o rehacer en ejecuci\xF3n.','\xBFQuiere deshacer "{0}"?',"&&S\xED","No",'No se pudo rehacer "{0}" en todos los archivos. {1}','No se pudo rehacer "{0}" en todos los archivos. {1}','No se pudo volver a hacer "{0}" en todos los archivos porque se realizaron cambios en {1}','No se pudo rehacer "{0}" en todos los archivos porque ya hay una operaci\xF3n de deshacer o rehacer en ejecuci\xF3n en {1}','No se pudo rehacer "{0}" en todos los archivos porque se produjo una operaci\xF3n de deshacer o rehacer mientras tanto','No se pudo rehacer "{0}" porque ya hay una operaci\xF3n de deshacer o rehacer en ejecuci\xF3n.'],"vs/platform/workspace/common/workspace":["\xC1rea de trabajo de c\xF3digo"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.es.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.fr.js b/lib/vs/editor/editor.main.nls.fr.js deleted file mode 100644 index 089b593..0000000 --- a/lib/vs/editor/editor.main.nls.fr.js +++ /dev/null @@ -1,29 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.fr",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["entr\xE9e"],"vs/base/browser/ui/findinput/findInputToggles":["Respecter la casse","Mot entier","Utiliser une expression r\xE9guli\xE8re"],"vs/base/browser/ui/findinput/replaceInput":["entr\xE9e","Pr\xE9server la casse"],"vs/base/browser/ui/hover/hoverWidget":["Inspectez ceci dans l\u2019affichage accessible avec {0}.","Inspectez ceci dans l\u2019affichage accessible via la commande Open Accessible View qui ne peut pas \xEAtre d\xE9clench\xE9e via une combinaison de touches pour l\u2019instant."],"vs/base/browser/ui/iconLabel/iconLabelHover":["Chargement..."],"vs/base/browser/ui/inputbox/inputBox":["Erreur\xA0: {0}","Avertissement\xA0: {0}","Info\xA0: {0}","pour l\u2019historique","Entr\xE9e effac\xE9e"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["Ind\xE9pendant"],"vs/base/browser/ui/selectBox/selectBoxCustom":["Zone de s\xE9lection"],"vs/base/browser/ui/toolbar/toolbar":["Plus d'actions..."],"vs/base/browser/ui/tree/abstractTree":["Filtrer","Correspondance approximative","Type \xE0 filtrer","Entrer le texte \xE0 rechercher","Entrer le texte \xE0 rechercher","Fermer","Aucun \xE9l\xE9ment trouv\xE9."],"vs/base/common/actions":["(vide)"],"vs/base/common/errorMessage":["{0}: {1}","Une erreur syst\xE8me s'est produite ({0})","Une erreur inconnue s\u2019est produite. Veuillez consulter le journal pour plus de d\xE9tails.","Une erreur inconnue s\u2019est produite. Veuillez consulter le journal pour plus de d\xE9tails.","{0} ({1}\xA0erreurs au total)","Une erreur inconnue s\u2019est produite. Veuillez consulter le journal pour plus de d\xE9tails."],"vs/base/common/keybindingLabels":["Ctrl","Maj","Alt","Windows","Ctrl","Maj","Alt","Super","Contr\xF4le","Maj","Option","Commande","Contr\xF4le","Maj","Alt","Windows","Contr\xF4le","Maj","Alt","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["\xE9diteur","L\u2019\xE9diteur n\u2019est pas accessible pour le moment.","{0} Pour activer le mode optimis\xE9 du lecteur d\u2019\xE9cran, utilisez {1}","{0} Pour activer le mode optimis\xE9 du lecteur d\u2019\xE9cran, ouvrez la s\xE9lection rapide avec {1} et ex\xE9cutez la commande Activer/D\xE9sactiver le mode d\u2019accessibilit\xE9 du lecteur d\u2019\xE9cran, qui n\u2019est pas d\xE9clenchable via le clavier pour le moment.","{0} Attribuez une combinaison de touches \xE0 la commande Activer/D\xE9sactiver le mode d\u2019accessibilit\xE9 du lecteur d\u2019\xE9cran en acc\xE9dant \xE0 l\u2019\xE9diteur de combinaisons de touches avec {1} et ex\xE9cutez-la."],"vs/editor/browser/coreCommands":["Aligner par rapport \xE0 la fin m\xEAme en cas de passage \xE0 des lignes plus longues","Aligner par rapport \xE0 la fin m\xEAme en cas de passage \xE0 des lignes plus longues","Curseurs secondaires supprim\xE9s"],"vs/editor/browser/editorExtensions":["Ann&&uler","Annuler","&&R\xE9tablir","R\xE9tablir","&&S\xE9lectionner tout","Tout s\xE9lectionner"],"vs/editor/browser/widget/codeEditorWidget":["Le nombre de curseurs a \xE9t\xE9 limit\xE9 \xE0 {0}. Envisagez d\u2019utiliser [rechercher et remplacer](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) pour les modifications plus importantes ou augmentez la limite du nombre de curseurs multiples du param\xE8tre.","Augmenter la limite de curseurs multiples"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":["Ic\xF4ne \xAB Ins\xE9rer \xBB dans la visionneuse diff accessible.","Ic\xF4ne \xAB Supprimer \xBB dans la visionneuse diff accessible.","Ic\xF4ne de \xAB Fermer \xBB dans la visionneuse diff accessible.","Fermer","Visionneuse diff accessible. Utilisez les fl\xE8ches haut et bas pour naviguer.","aucune ligne chang\xE9e","1\xA0ligne chang\xE9e","{0}\xA0lignes chang\xE9es","Diff\xE9rence\xA0{0} sur\xA0{1}\xA0: ligne d'origine {2}, {3}, ligne modifi\xE9e {4}, {5}","vide","{0} ligne inchang\xE9e {1}","{0}\xA0ligne d'origine {1}\xA0ligne modifi\xE9e {2}","+ {0}\xA0ligne modifi\xE9e {1}","- {0} ligne d'origine {1}"],"vs/editor/browser/widget/diffEditor/colors":["Couleur de bordure du texte d\xE9plac\xE9 dans l\u2019\xE9diteur de diff.","Couleur de bordure active du texte d\xE9plac\xE9 dans l\u2019\xE9diteur de diff\xE9rences."],"vs/editor/browser/widget/diffEditor/decorations":["\xC9l\xE9ment d\xE9coratif de ligne pour les insertions dans l'\xE9diteur de diff\xE9rences.","\xC9l\xE9ment d\xE9coratif de ligne pour les suppressions dans l'\xE9diteur de diff\xE9rences.","Cliquez pour r\xE9tablir la modification"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["Activer/d\xE9sactiver r\xE9duire les r\xE9gions inchang\xE9es","Activer/d\xE9sactiver l\u2019affichage des blocs de code d\xE9plac\xE9s","Activer/d\xE9sactiver Utiliser la vue inline lorsque l'espace est limit\xE9","Utiliser la vue inline lorsque l'espace est limit\xE9","Afficher les blocs de code d\xE9plac\xE9s","\xC9diteur de diff\xE9rences","Changer de c\xF4t\xE9","Quitter Comparer le d\xE9placement","R\xE9duire toutes les r\xE9gions inchang\xE9es","Afficher toutes les r\xE9gions inchang\xE9es","Visionneuse Diff accessible","Acc\xE9der \xE0 la diff\xE9rence suivante","Ouvrir la visionneuse diff accessible","Acc\xE9der la diff\xE9rence pr\xE9c\xE9dente"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" utilisez {0} pour ouvrir l\u2019aide sur l\u2019accessibilit\xE9."],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["Replier la r\xE9gion inchang\xE9e","Cliquez ou faites glisser pour afficher plus d'\xE9l\xE9ments au-dessus","Tout afficher","Cliquez ou faites glisser pour afficher plus d'\xE9l\xE9ments en dessous","{0} lignes masqu\xE9es","Double-cliquer pour d\xE9plier"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["Copier les lignes supprim\xE9es","Copier la ligne supprim\xE9e","Copier les lignes modifi\xE9es","Copier la ligne modifi\xE9e","Copier la ligne supprim\xE9e ({0})","Copier la ligne modifi\xE9e ({0})","Annuler la modification"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["Code d\xE9plac\xE9 avec des modifications vers la ligne {0}-{1}","Code d\xE9plac\xE9 avec des modifications \xE0 partir de la ligne {0}-{1}","Code d\xE9plac\xE9 vers la ligne {0}-{1}","Code d\xE9plac\xE9 \xE0 partir de la ligne {0}-{1}"],"vs/editor/common/config/editorConfigurationSchema":["\xC9diteur","Le nombre d\u2019espaces auxquels une tabulation est \xE9gale. Ce param\xE8tre est substitu\xE9 bas\xE9 sur le contenu du fichier lorsque {0} est activ\xE9.",'Nombre d\u2019espaces utilis\xE9s pour la mise en retrait ou `"tabSize"` pour utiliser la valeur de `#editor.tabSize#`. Ce param\xE8tre est remplac\xE9 en fonction du contenu du fichier quand `#editor.detectIndentation#` est activ\xE9.',"Espaces ins\xE9r\xE9s quand vous appuyez sur la touche Tab. Ce param\xE8tre est remplac\xE9 en fonction du contenu du fichier quand {0} est activ\xE9.","Contr\xF4le si {0} et {1} sont automatiquement d\xE9tect\xE9s lors de l\u2019ouverture d\u2019un fichier en fonction de son contenu.","Supprimer l'espace blanc de fin ins\xE9r\xE9 automatiquement.","Traitement sp\xE9cial des fichiers volumineux pour d\xE9sactiver certaines fonctionnalit\xE9s utilisant beaucoup de m\xE9moire.","Contr\xF4le si la saisie semi-automatique doit \xEAtre calcul\xE9e en fonction des mots pr\xE9sents dans le document.","Sugg\xE8re uniquement des mots dans le document actif.","Sugg\xE8re des mots dans tous les documents ouverts du m\xEAme langage.","Sugg\xE8re des mots dans tous les documents ouverts.","Contr\xF4le la fa\xE7on dont sont calcul\xE9es les compl\xE9tions bas\xE9es sur des mots dans les documents.","Coloration s\xE9mantique activ\xE9e pour tous les th\xE8mes de couleur.","Coloration s\xE9mantique d\xE9sactiv\xE9e pour tous les th\xE8mes de couleur.","La coloration s\xE9mantique est configur\xE9e par le param\xE8tre 'semanticHighlighting' du th\xE8me de couleur actuel.","Contr\xF4le si semanticHighlighting est affich\xE9 pour les langages qui le prennent en charge.","Maintenir les \xE9diteurs d'aper\xE7u ouverts m\xEAme si l'utilisateur double-clique sur son contenu ou appuie sur la touche \xC9chap.","Les lignes plus longues que cette valeur ne sont pas tokenis\xE9es pour des raisons de performances","Contr\xF4le si la cr\xE9ation de jetons doit se produire de mani\xE8re asynchrone sur un worker web.","Contr\xF4le si la cr\xE9ation de jetons asynchrones doit \xEAtre journalis\xE9e. Pour le d\xE9bogage uniquement.","Contr\xF4le si la segmentation du texte en unit\xE9s lexicales asynchrones doit \xEAtre v\xE9rifi\xE9e par rapport \xE0 la segmentation du texte en unit\xE9s lexicales en arri\xE8re-plan h\xE9rit\xE9e. Peut ralentir la segmentation du texte en unit\xE9s lexicales. Pour le d\xE9bogage uniquement.","D\xE9finit les symboles de type crochet qui augmentent ou diminuent le retrait.","S\xE9quence de cha\xEEnes ou de caract\xE8res de crochets ouvrants.","S\xE9quence de cha\xEEnes ou de caract\xE8res de crochets fermants.","D\xE9finit les paires de crochets qui sont coloris\xE9es par leur niveau d\u2019imbrication si la colorisation des paires de crochets est activ\xE9e.","S\xE9quence de cha\xEEnes ou de caract\xE8res de crochets ouvrants.","S\xE9quence de cha\xEEnes ou de caract\xE8res de crochets fermants.","D\xE9lai d'expiration en millisecondes avant annulation du calcul de diff. Utilisez\xA00 pour supprimer le d\xE9lai d'expiration.","Taille de fichier maximale en Mo pour laquelle calculer les diff\xE9rences. Utilisez 0 pour ne pas avoir de limite.","Contr\xF4le si l'\xE9diteur de diff\xE9rences affiche les diff\xE9rences en mode c\xF4te \xE0 c\xF4te ou inline.","Si l'\xE9diteur de diff\xE9rences est moins large que cette valeur, la vue inline est utilis\xE9e.","Si cette option est activ\xE9e et que la largeur de l'\xE9diteur est trop \xE9troite, la vue inline est utilis\xE9e.","Lorsqu\u2019il est activ\xE9, l\u2019\xE9diteur de diff\xE9rences affiche des fl\xE8ches dans sa marge de glyphe pour r\xE9tablir les modifications.","Quand il est activ\xE9, l'\xE9diteur de diff\xE9rences ignore les changements d'espace blanc de d\xE9but ou de fin.","Contr\xF4le si l'\xE9diteur de diff\xE9rences affiche les indicateurs +/- pour les changements ajout\xE9s/supprim\xE9s .","Contr\xF4le si l'\xE9diteur affiche CodeLens.","Le retour automatique \xE0 la ligne n'est jamais effectu\xE9.","Le retour automatique \xE0 la ligne s'effectue en fonction de la largeur de la fen\xEAtre d'affichage.","Le retour automatique \xE0 la ligne d\xE9pend du param\xE8tre {0}.","Utilise l\u2019algorithme de comparaison h\xE9rit\xE9.","Utilise l\u2019algorithme de comparaison avanc\xE9.","Contr\xF4le si l'\xE9diteur de diff\xE9rences affiche les r\xE9gions inchang\xE9es.","Contr\xF4le le nombre de lignes utilis\xE9es pour les r\xE9gions inchang\xE9es.","Contr\xF4le le nombre de lignes utilis\xE9es comme minimum pour les r\xE9gions inchang\xE9es.","Contr\xF4le le nombre de lignes utilis\xE9es comme contexte lors de la comparaison des r\xE9gions inchang\xE9es.","Contr\xF4le si l\u2019\xE9diteur de diff\xE9rences doit afficher les d\xE9placements de code d\xE9tect\xE9s.","Contr\xF4le si l\u2019\xE9diteur de diff\xE9rences affiche des d\xE9corations vides pour voir o\xF9 les caract\xE8res ont \xE9t\xE9 ins\xE9r\xE9s ou supprim\xE9s."],"vs/editor/common/config/editorOptions":["Utiliser les API de la plateforme pour d\xE9tecter si un lecteur d'\xE9cran est attach\xE9","Optimiser pour l\u2019utilisation avec un lecteur d\u2019\xE9cran","Supposer qu\u2019un lecteur d\u2019\xE9cran n\u2019est pas attach\xE9","Contr\xF4le si l\u2019interface utilisateur doit s\u2019ex\xE9cuter dans un mode o\xF9 elle est optimis\xE9e pour les lecteurs d\u2019\xE9cran.","Contr\xF4le si un espace est ins\xE9r\xE9 pour les commentaires.","Contr\xF4le si les lignes vides doivent \xEAtre ignor\xE9es avec des actions d'activation/de d\xE9sactivation, d'ajout ou de suppression des commentaires de ligne.","Contr\xF4le si la copie sans s\xE9lection permet de copier la ligne actuelle.","Contr\xF4le si le curseur doit sauter pour rechercher les correspondances lors de la saisie.","Ne lancez jamais la cha\xEEne de recherche dans la s\xE9lection de l\u2019\xE9diteur.","Toujours amorcer la cha\xEEne de recherche \xE0 partir de la s\xE9lection de l\u2019\xE9diteur, y compris le mot \xE0 la position du curseur.","Cha\xEEne de recherche initiale uniquement dans la s\xE9lection de l\u2019\xE9diteur.","D\xE9termine si la cha\xEEne de recherche dans le Widget Recherche est initialis\xE9e avec la s\xE9lection de l\u2019\xE9diteur.","Ne jamais activer automatiquement la recherche dans la s\xE9lection (par d\xE9faut).","Toujours activer automatiquement la recherche dans la s\xE9lection.","Activez Rechercher automatiquement dans la s\xE9lection quand plusieurs lignes de contenu sont s\xE9lectionn\xE9es.","Contr\xF4le la condition d'activation automatique de la recherche dans la s\xE9lection.","D\xE9termine si le Widget Recherche devrait lire ou modifier le presse-papiers de recherche partag\xE9 sur macOS.","Contr\xF4le si le widget Recherche doit ajouter des lignes suppl\xE9mentaires en haut de l'\xE9diteur. Quand la valeur est true, vous pouvez faire d\xE9filer au-del\xE0 de la premi\xE8re ligne si le widget Recherche est visible.","Contr\xF4le si la recherche red\xE9marre automatiquement depuis le d\xE9but (ou la fin) quand il n'existe aucune autre correspondance.","Active/d\xE9sactive les ligatures de police (fonctionnalit\xE9s de police 'calt' et 'liga'). Remplacez ceci par une cha\xEEne pour contr\xF4ler de mani\xE8re pr\xE9cise la propri\xE9t\xE9 CSS 'font-feature-settings'.","Propri\xE9t\xE9 CSS 'font-feature-settings' explicite. Vous pouvez passer une valeur bool\xE9enne \xE0 la place si vous devez uniquement activer/d\xE9sactiver les ligatures.","Configure les ligatures de police ou les fonctionnalit\xE9s de police. Il peut s'agir d'une valeur bool\xE9enne permettant d'activer/de d\xE9sactiver les ligatures, ou d'une cha\xEEne correspondant \xE0 la valeur de la propri\xE9t\xE9 CSS 'font-feature-settings'.","Active/d\xE9sactive la traduction de font-weight en font-variation-settings. Remplacez ce param\xE8tre par une cha\xEEne pour un contr\xF4le affin\xE9 de la propri\xE9t\xE9 CSS 'font-variation-settings'.","Propri\xE9t\xE9 CSS 'font-variation-settings' explicite. Une valeur bool\xE9enne peut \xEAtre pass\xE9e \xE0 la place si une seule valeur doit traduire font-weight en font-variation-settings.","Configure les variations de la police. Il peut s\u2019agir d\u2019une valeur bool\xE9enne pour activer/d\xE9sactiver la traduction de font-weight en font-variation-settings ou d\u2019une cha\xEEne pour la valeur de la propri\xE9t\xE9 CSS 'font-variation-settings'.","Contr\xF4le la taille de police en pixels.",'Seuls les mots cl\xE9s "normal" et "bold", ou les nombres compris entre\xA01 et\xA01\xA0000 sont autoris\xE9s.',`Contr\xF4le l'\xE9paisseur de police. Accepte les mots cl\xE9s "normal" et "bold", ou les nombres compris entre\xA01 et\xA01\xA0000.`,"Montrer l\u2019aper\xE7u des r\xE9sultats (par d\xE9faut)","Acc\xE9der au r\xE9sultat principal et montrer un aper\xE7u","Acc\xE9der au r\xE9sultat principal et activer l\u2019acc\xE8s sans aper\xE7u pour les autres","Ce param\xE8tre est d\xE9pr\xE9ci\xE9, utilisez des param\xE8tres distincts comme 'editor.editor.gotoLocation.multipleDefinitions' ou 'editor.editor.gotoLocation.multipleImplementations' \xE0 la place.","Contr\xF4le le comportement de la commande 'Atteindre la d\xE9finition' quand plusieurs emplacements cibles existent.","Contr\xF4le le comportement de la commande 'Atteindre la d\xE9finition de type' quand plusieurs emplacements cibles existent.","Contr\xF4le le comportement de la commande 'Atteindre la d\xE9claration' quand plusieurs emplacements cibles existent.","Contr\xF4le le comportement de la commande 'Atteindre les impl\xE9mentations' quand plusieurs emplacements cibles existent.","Contr\xF4le le comportement de la commande 'Atteindre les r\xE9f\xE9rences' quand plusieurs emplacements cibles existent.","ID de commande alternatif ex\xE9cut\xE9 quand le r\xE9sultat de 'Atteindre la d\xE9finition' est l'emplacement actuel.","ID de commande alternatif ex\xE9cut\xE9 quand le r\xE9sultat de 'Atteindre la d\xE9finition de type' est l'emplacement actuel.","ID de commande alternatif ex\xE9cut\xE9 quand le r\xE9sultat de 'Atteindre la d\xE9claration' est l'emplacement actuel.","ID de commande alternatif ex\xE9cut\xE9 quand le r\xE9sultat de 'Atteindre l'impl\xE9mentation' est l'emplacement actuel.","ID de commande alternatif ex\xE9cut\xE9 quand le r\xE9sultat de 'Atteindre la r\xE9f\xE9rence' est l'emplacement actuel.","Contr\xF4le si le pointage est affich\xE9.","Contr\xF4le le d\xE9lai en millisecondes, apr\xE8s lequel le survol est affich\xE9.","Contr\xF4le si le pointage doit rester visible quand la souris est d\xE9plac\xE9e au-dessus.","Contr\xF4le le d\xE9lai en millisecondes, apr\xE8s lequel le pointage est masqu\xE9. Demande d'activer 'editor.hover.sticky'.","Pr\xE9f\xE9rez afficher les points au-dessus de la ligne, s\u2019il y a de l\u2019espace.","Suppose que tous les caract\xE8res ont la m\xEAme largeur. Il s'agit d'un algorithme rapide qui fonctionne correctement pour les polices \xE0 espacement fixe et certains scripts (comme les caract\xE8res latins) o\xF9 les glyphes ont la m\xEAme largeur.","D\xE9l\xE8gue le calcul des points de wrapping au navigateur. Il s'agit d'un algorithme lent qui peut provoquer le gel des grands fichiers, mais qui fonctionne correctement dans tous les cas.","Contr\xF4le l\u2019algorithme qui calcule les points d\u2019habillage. Notez qu\u2019en mode d\u2019accessibilit\xE9, les options avanc\xE9es sont utilis\xE9es pour une exp\xE9rience optimale.","Active l\u2019ampoule d\u2019action de code dans l\u2019\xE9diteur.","Affiche les \xE9tendues actives imbriqu\xE9s pendant le d\xE9filement en haut de l\u2019\xE9diteur.","D\xE9finit le nombre maximal de lignes r\xE9manentes \xE0 afficher.","D\xE9finit le mod\xE8le \xE0 utiliser pour d\xE9terminer les lignes \xE0 coller. Si le mod\xE8le hi\xE9rarchique n\u2019existe pas, il revient au mod\xE8le de fournisseur de pliage qui revient au mod\xE8le de mise en retrait. Cette demande est respect\xE9e dans les trois cas.","Activez le d\xE9filement du widget Sticky Scroll avec la barre de d\xE9filement horizontale de l'\xE9diteur.","Active les indicateurs inlay dans l\u2019\xE9diteur.","Les indicateurs d\u2019inlay sont activ\xE9s.","Les indicateurs d\u2019inlay sont affich\xE9s par d\xE9faut et masqu\xE9s lors de la conservation {0}","Les indicateurs d\u2019inlay sont masqu\xE9s par d\xE9faut et s\u2019affichent lorsque vous maintenez {0}","Les indicateurs d\u2019inlay sont d\xE9sactiv\xE9s.","Contr\xF4le la taille de police des indicateurs d\u2019inlay dans l\u2019\xE9diteur. Par d\xE9faut, le {0} est utilis\xE9 lorsque la valeur configur\xE9e est inf\xE9rieure \xE0 {1} ou sup\xE9rieure \xE0 la taille de police de l\u2019\xE9diteur.","Contr\xF4le la famille de polices des indicateurs d\u2019inlay dans l\u2019\xE9diteur. Lorsqu\u2019il est d\xE9fini sur vide, le {0} est utilis\xE9.","Active le remplissage autour des indicateurs d\u2019inlay dans l\u2019\xE9diteur.",`Contr\xF4le la hauteur de ligne. \r - - Utilisez 0 pour calculer automatiquement la hauteur de ligne \xE0 partir de la taille de police.\r - : les valeurs comprises entre 0 et 8 sont utilis\xE9es comme multiplicateur avec la taille de police.\r - : les valeurs sup\xE9rieures ou \xE9gales \xE0 8 seront utilis\xE9es comme valeurs effectives.`,"Contr\xF4le si la minimap est affich\xE9e.","Contr\xF4le si la minimap est masqu\xE9e automatiquement.","Le minimap a la m\xEAme taille que le contenu de l'\xE9diteur (d\xE9filement possible).","Le minimap s'agrandit ou se r\xE9duit selon les besoins pour remplir la hauteur de l'\xE9diteur (pas de d\xE9filement).","Le minimap est r\xE9duit si n\xE9cessaire pour ne jamais d\xE9passer la taille de l'\xE9diteur (pas de d\xE9filement).","Contr\xF4le la taille du minimap.","Contr\xF4le le c\xF4t\xE9 o\xF9 afficher la minimap.","Contr\xF4le quand afficher le curseur du minimap.","\xC9chelle du contenu dessin\xE9 dans le minimap\xA0: 1, 2\xA0ou\xA03.","Afficher les caract\xE8res r\xE9els sur une ligne par opposition aux blocs de couleur.","Limiter la largeur de la minimap pour afficher au plus un certain nombre de colonnes.","Contr\xF4le la quantit\xE9 d\u2019espace entre le bord sup\xE9rieur de l\u2019\xE9diteur et la premi\xE8re ligne.","Contr\xF4le la quantit\xE9 d'espace entre le bord inf\xE9rieur de l'\xE9diteur et la derni\xE8re ligne.","Active une fen\xEAtre contextuelle qui affiche de la documentation sur les param\xE8tres et des informations sur les types \xE0 mesure que vous tapez.","D\xE9termine si le menu de suggestions de param\xE8tres se ferme ou reviens au d\xE9but lorsque la fin de la liste est atteinte.","Des suggestions rapides s\u2019affichent dans le widget de suggestion","Les suggestions rapides s\u2019affichent sous forme de texte fant\xF4me","Les suggestions rapides sont d\xE9sactiv\xE9es","Activez les suggestions rapides dans les cha\xEEnes.","Activez les suggestions rapides dans les commentaires.","Activez les suggestions rapides en dehors des cha\xEEnes et des commentaires.","Contr\xF4le si les suggestions doivent s\u2019afficher automatiquement lors de la saisie. Cela peut \xEAtre contr\xF4l\xE9 pour la saisie dans des commentaires, des cha\xEEnes et d\u2019autres codes. Vous pouvez configurer la suggestion rapide pour qu\u2019elle s\u2019affiche sous forme de texte fant\xF4me ou avec le widget de suggestion. Tenez \xE9galement compte du param\xE8tre '{0}' qui contr\xF4le si des suggestions sont d\xE9clench\xE9es par des caract\xE8res sp\xE9ciaux.","Les num\xE9ros de ligne ne sont pas affich\xE9s.","Les num\xE9ros de ligne sont affich\xE9s en nombre absolu.","Les num\xE9ros de ligne sont affich\xE9s sous la forme de distance en lignes \xE0 la position du curseur.","Les num\xE9ros de ligne sont affich\xE9s toutes les 10 lignes.","Contr\xF4le l'affichage des num\xE9ros de ligne.","Nombre de caract\xE8res monospace auxquels cette r\xE8gle d'\xE9diteur effectue le rendu.","Couleur de cette r\xE8gle d'\xE9diteur.","Rendre les r\xE8gles verticales apr\xE8s un certain nombre de caract\xE8res \xE0 espacement fixe. Utiliser plusieurs valeurs pour plusieurs r\xE8gles. Aucune r\xE8gle n'est dessin\xE9e si le tableau est vide.","La barre de d\xE9filement verticale sera visible uniquement lorsque cela est n\xE9cessaire.","La barre de d\xE9filement verticale est toujours visible.","La barre de d\xE9filement verticale est toujours masqu\xE9e.","Contr\xF4le la visibilit\xE9 de la barre de d\xE9filement verticale.","La barre de d\xE9filement horizontale sera visible uniquement lorsque cela est n\xE9cessaire.","La barre de d\xE9filement horizontale est toujours visible.","La barre de d\xE9filement horizontale est toujours masqu\xE9e.","Contr\xF4le la visibilit\xE9 de la barre de d\xE9filement horizontale.","Largeur de la barre de d\xE9filement verticale.","Hauteur de la barre de d\xE9filement horizontale.","Contr\xF4le si les clics permettent de faire d\xE9filer par page ou d\u2019acc\xE9der \xE0 la position de clic.","Contr\xF4le si tous les caract\xE8res ASCII non basiques sont mis en surbrillance. Seuls les caract\xE8res compris entre U+0020 et U+007E, tabulation, saut de ligne et retour chariot sont consid\xE9r\xE9s comme des ASCII de base.","Contr\xF4le si les caract\xE8res qui r\xE9servent de l\u2019espace ou qui n\u2019ont pas de largeur sont mis en surbrillance.","Contr\xF4le si les caract\xE8res mis en surbrillance peuvent \xEAtre d\xE9concert\xE9s avec des caract\xE8res ASCII de base, \xE0 l\u2019exception de ceux qui sont courants dans les param\xE8tres r\xE9gionaux utilisateur actuels.","Contr\xF4le si les caract\xE8res des commentaires doivent \xE9galement faire l\u2019objet d\u2019une mise en surbrillance Unicode.","Contr\xF4le si les caract\xE8res des cha\xEEnes de texte doivent \xE9galement faire l\u2019objet d\u2019une mise en surbrillance Unicode.","D\xE9finit les caract\xE8res autoris\xE9s qui ne sont pas mis en surbrillance.","Les caract\xE8res Unicode communs aux param\xE8tres r\xE9gionaux autoris\xE9s ne sont pas mis en surbrillance.","Contr\xF4le si les suggestions en ligne doivent \xEAtre affich\xE9es automatiquement dans l\u2019\xE9diteur.","Afficher la barre d\u2019outils de suggestion en ligne chaque fois qu\u2019une suggestion inline est affich\xE9e.","Afficher la barre d\u2019outils de suggestion en ligne lorsque vous pointez sur une suggestion incluse.","Contr\xF4le quand afficher la barre d\u2019outils de suggestion incluse.","Contr\xF4le la fa\xE7on dont les suggestions inline interagissent avec le widget de suggestion. Si cette option est activ\xE9e, le widget de suggestion n\u2019est pas affich\xE9 automatiquement lorsque des suggestions inline sont disponibles.","Contr\xF4le si la colorisation des paires de crochets est activ\xE9e ou non. Utilisez {0} pour remplacer les couleurs de surbrillance des crochets.","Contr\xF4le si chaque type de crochet poss\xE8de son propre pool de couleurs ind\xE9pendant.","D\xE9sactive les rep\xE8res de paire de crochets.","Active les rep\xE8res de paire de crochets uniquement pour la paire de crochets actifs.","D\xE9sactive les rep\xE8res de paire de crochets.","Contr\xF4le si les guides de la paire de crochets sont activ\xE9s ou non.","Active les rep\xE8res horizontaux en plus des rep\xE8res de paire de crochets verticaux.","Active les rep\xE8res horizontaux uniquement pour la paire de crochets actifs.","D\xE9sactive les rep\xE8res de paire de crochets horizontaux.","Contr\xF4le si les guides de la paire de crochets horizontaux sont activ\xE9s ou non.","Contr\xF4le si l\u2019\xE9diteur doit mettre en surbrillance la paire de crochets actifs.","Contr\xF4le si l\u2019\xE9diteur doit afficher les guides de mise en retrait.","Met en surbrillance le guide de retrait actif.","Met en surbrillance le rep\xE8re de retrait actif m\xEAme si les rep\xE8res de crochet sont mis en surbrillance.","Ne mettez pas en surbrillance le rep\xE8re de retrait actif.","Contr\xF4le si l\u2019\xE9diteur doit mettre en surbrillance le guide de mise en retrait actif.","Ins\xE9rez une suggestion sans remplacer le texte \xE0 droite du curseur.","Ins\xE9rez une suggestion et remplacez le texte \xE0 droite du curseur.","Contr\xF4le si les mots sont remplac\xE9s en cas d'acceptation de la saisie semi-automatique. Notez que cela d\xE9pend des extensions adh\xE9rant \xE0 cette fonctionnalit\xE9.","D\xE9termine si le filtre et le tri des suggestions doivent prendre en compte les fautes de frappes mineures.","Contr\xF4le si le tri favorise les mots qui apparaissent \xE0 proximit\xE9 du curseur.","Contr\xF4le si les s\xE9lections de suggestion m\xE9moris\xE9es sont partag\xE9es entre plusieurs espaces de travail et fen\xEAtres (n\xE9cessite '#editor.suggestSelection#').","Toujours s\xE9lectionner une suggestion lors du d\xE9clenchement automatique d\u2019IntelliSense.","Ne jamais s\xE9lectionner une suggestion lors du d\xE9clenchement automatique d\u2019IntelliSense.","S\xE9lectionnez une suggestion uniquement lors du d\xE9clenchement d\u2019IntelliSense \xE0 partir d\u2019un caract\xE8re d\xE9clencheur.","S\xE9lectionnez une suggestion uniquement lors du d\xE9clenchement d\u2019IntelliSense au cours de la frappe.","Contr\xF4le si une suggestion est s\xE9lectionn\xE9e lorsque le widget s\u2019affiche. Notez que cela s\u2019applique uniquement aux suggestions d\xE9clench\xE9es automatiquement ('#editor.quickSuggestions#' et '#editor.suggestOnTriggerCharacters#') et qu\u2019une suggestion est toujours s\xE9lectionn\xE9e lorsqu\u2019elle est appel\xE9e explicitement, par exemple via 'Ctrl+Espace'.","Contr\xF4le si un extrait de code actif emp\xEAche les suggestions rapides.","Contr\xF4le s'il faut montrer ou masquer les ic\xF4nes dans les suggestions.","Contr\xF4le la visibilit\xE9 de la barre d'\xE9tat en bas du widget de suggestion.","Contr\xF4le si la sortie de la suggestion doit \xEAtre affich\xE9e en aper\xE7u dans l\u2019\xE9diteur.","D\xE9termine si les d\xE9tails du widget de suggestion sont inclus dans l\u2019\xE9tiquette ou uniquement dans le widget de d\xE9tails.","Ce param\xE8tre est d\xE9pr\xE9ci\xE9. Le widget de suggestion peut d\xE9sormais \xEAtre redimensionn\xE9.","Ce param\xE8tre est d\xE9pr\xE9ci\xE9, veuillez utiliser des param\xE8tres distincts comme 'editor.suggest.showKeywords' ou 'editor.suggest.showSnippets' \xE0 la place.","Si activ\xE9, IntelliSense montre des suggestions de type 'method'.","Si activ\xE9, IntelliSense montre des suggestions de type 'function'.","Si activ\xE9, IntelliSense montre des suggestions de type 'constructor'.","Si cette option est activ\xE9e, IntelliSense montre des suggestions `d\xE9pr\xE9ci\xE9es`.","Quand le filtrage IntelliSense est activ\xE9, le premier caract\xE8re correspond \xE0 un d\xE9but de mot, par exemple 'c' sur 'Console' ou 'WebContext', mais _not_ sur 'description'. Si d\xE9sactiv\xE9, IntelliSense affiche plus de r\xE9sultats, mais les trie toujours par qualit\xE9 de correspondance.","Si activ\xE9, IntelliSense montre des suggestions de type 'field'.","Si activ\xE9, IntelliSense montre des suggestions de type 'variable'.","Si activ\xE9, IntelliSense montre des suggestions de type 'class'.","Si activ\xE9, IntelliSense montre des suggestions de type 'struct'.","Si activ\xE9, IntelliSense montre des suggestions de type 'interface'.","Si activ\xE9, IntelliSense montre des suggestions de type 'module'.","Si activ\xE9, IntelliSense montre des suggestions de type 'property'.","Si activ\xE9, IntelliSense montre des suggestions de type 'event'.","Si activ\xE9, IntelliSense montre des suggestions de type 'operator'.","Si activ\xE9, IntelliSense montre des suggestions de type 'unit'.","Si activ\xE9, IntelliSense montre des suggestions de type 'value'.","Si activ\xE9, IntelliSense montre des suggestions de type 'constant'.","Si activ\xE9, IntelliSense montre des suggestions de type 'enum'.","Si activ\xE9, IntelliSense montre des suggestions de type 'enumMember'.","Si activ\xE9, IntelliSense montre des suggestions de type 'keyword'.","Si activ\xE9, IntelliSense montre des suggestions de type 'text'.","Si activ\xE9, IntelliSense montre des suggestions de type 'color'.","Si activ\xE9, IntelliSense montre des suggestions de type 'file'.","Si activ\xE9, IntelliSense montre des suggestions de type 'reference'.","Si activ\xE9, IntelliSense montre des suggestions de type 'customcolor'.","Si activ\xE9, IntelliSense montre des suggestions de type 'folder'.","Si activ\xE9, IntelliSense montre des suggestions de type 'typeParameter'.","Si activ\xE9, IntelliSense montre des suggestions de type 'snippet'.","Si activ\xE9, IntelliSense montre des suggestions de type 'utilisateur'.","Si activ\xE9, IntelliSense montre des suggestions de type 'probl\xE8mes'.","Indique si les espaces blancs de d\xE9but et de fin doivent toujours \xEAtre s\xE9lectionn\xE9s.","Indique si les sous-mots (tels que \xAB foo \xBB dans \xAB fooBar \xBB ou \xAB foo_bar \xBB) doivent \xEAtre s\xE9lectionn\xE9s.","Aucune mise en retrait. Les lignes envelopp\xE9es commencent \xE0 la colonne 1.","Les lignes envelopp\xE9es obtiennent la m\xEAme mise en retrait que le parent.","Les lignes justifi\xE9es obtiennent une mise en retrait +1 vers le parent.","Les lignes justifi\xE9es obtiennent une mise en retrait +2 vers le parent. ","Contr\xF4le la mise en retrait des lignes justifi\xE9es.","Contr\xF4le si vous pouvez faire glisser et d\xE9poser un fichier dans un \xE9diteur de texte en maintenant la touche Maj enfonc\xE9e (au lieu d\u2019ouvrir le fichier dans un \xE9diteur).","Contr\xF4le si un widget est affich\xE9 lors de l\u2019annulation de fichiers dans l\u2019\xE9diteur. Ce widget vous permet de contr\xF4ler la fa\xE7on dont le fichier est annul\xE9.","Afficher le widget du s\xE9lecteur de d\xE9p\xF4t apr\xE8s la suppression d\u2019un fichier dans l\u2019\xE9diteur.","Ne jamais afficher le widget du s\xE9lecteur de d\xE9p\xF4t. \xC0 la place, le fournisseur de d\xE9p\xF4t par d\xE9faut est toujours utilis\xE9.","Contr\xF4le si vous pouvez coller le contenu de diff\xE9rentes mani\xE8res.","Contr\xF4le l\u2019affichage d\u2019un widget lors du collage de contenu dans l\u2019\xE9diteur. Ce widget vous permet de contr\xF4ler la mani\xE8re dont le fichier est coll\xE9.","Afficher le widget du s\xE9lecteur de collage une fois le contenu coll\xE9 dans l\u2019\xE9diteur.","Ne jamais afficher le widget de s\xE9lection de collage. Au lieu de cela, le comportement de collage par d\xE9faut est toujours utilis\xE9.","Contr\xF4le si les suggestions doivent \xEAtre accept\xE9es sur les caract\xE8res de validation. Par exemple, en JavaScript, le point-virgule (`;`) peut \xEAtre un caract\xE8re de validation qui accepte une suggestion et tape ce caract\xE8re.","Accepter uniquement une suggestion avec 'Entr\xE9e' quand elle effectue une modification textuelle.","Contr\xF4le si les suggestions sont accept\xE9es apr\xE8s appui sur 'Entr\xE9e', en plus de 'Tab'. Permet d\u2019\xE9viter toute ambigu\xEFt\xE9 entre l\u2019insertion de nouvelles lignes et l'acceptation de suggestions.","Contr\xF4le le nombre de lignes de l\u2019\xE9diteur qu\u2019un lecteur d\u2019\xE9cran peut lire en une seule fois. Quand nous d\xE9tectons un lecteur d\u2019\xE9cran, nous d\xE9finissons automatiquement la valeur par d\xE9faut \xE0 500. Attention\xA0: Les valeurs sup\xE9rieures \xE0 la valeur par d\xE9faut peuvent avoir un impact important sur les performances.","Contenu de l'\xE9diteur","Contr\xF4lez si les suggestions incluses sont annonc\xE9es par un lecteur d\u2019\xE9cran.","Utilisez les configurations de langage pour d\xE9terminer quand fermer automatiquement les parenth\xE8ses.","Fermer automatiquement les parenth\xE8ses uniquement lorsque le curseur est \xE0 gauche de l\u2019espace.","Contr\xF4le si l\u2019\xE9diteur doit fermer automatiquement les parenth\xE8ses quand l\u2019utilisateur ajoute une parenth\xE8se ouvrante.","Utilisez les configurations de langage pour d\xE9terminer quand fermer automatiquement les commentaires.","Fermez automatiquement les commentaires seulement si le curseur est \xE0 gauche de l'espace.","Contr\xF4le si l'\xE9diteur doit fermer automatiquement les commentaires quand l'utilisateur ajoute un commentaire ouvrant.","Supprimez les guillemets ou crochets fermants adjacents uniquement s'ils ont \xE9t\xE9 ins\xE9r\xE9s automatiquement.","Contr\xF4le si l'\xE9diteur doit supprimer les guillemets ou crochets fermants adjacents au moment de la suppression.","Tapez avant les guillemets ou les crochets fermants uniquement s'ils sont automatiquement ins\xE9r\xE9s.","Contr\xF4le si l'\xE9diteur doit taper avant les guillemets ou crochets fermants.","Utilisez les configurations de langage pour d\xE9terminer quand fermer automatiquement les guillemets.","Fermer automatiquement les guillemets uniquement lorsque le curseur est \xE0 gauche de l\u2019espace.","Contr\xF4le si l\u2019\xE9diteur doit fermer automatiquement les guillemets apr\xE8s que l\u2019utilisateur ajoute un guillemet ouvrant.","L'\xE9diteur n'ins\xE8re pas de retrait automatiquement.","L'\xE9diteur conserve le retrait de la ligne actuelle.","L'\xE9diteur conserve le retrait de la ligne actuelle et honore les crochets d\xE9finis par le langage.","L'\xE9diteur conserve le retrait de la ligne actuelle, honore les crochets d\xE9finis par le langage et appelle des objets onEnterRules sp\xE9ciaux d\xE9finis par les langages.","L'\xE9diteur conserve le retrait de la ligne actuelle, honore les crochets d\xE9finis par le langage, appelle des objets onEnterRules sp\xE9ciaux d\xE9finis par les langages et honore les objets indentationRules d\xE9finis par les langages.","Contr\xF4le si l'\xE9diteur doit ajuster automatiquement le retrait quand les utilisateurs tapent, collent, d\xE9placent ou mettent en retrait des lignes.","Utilisez les configurations de langue pour d\xE9terminer quand entourer automatiquement les s\xE9lections.","Entourez avec des guillemets et non des crochets.","Entourez avec des crochets et non des guillemets.","Contr\xF4le si l'\xE9diteur doit automatiquement entourer les s\xE9lections quand l'utilisateur tape des guillemets ou des crochets.","\xC9mule le comportement des tabulations pour la s\xE9lection quand des espaces sont utilis\xE9s \xE0 des fins de mise en retrait. La s\xE9lection respecte les taquets de tabulation.","Contr\xF4le si l'\xE9diteur affiche CodeLens.","Contr\xF4le la famille de polices pour CodeLens.","Contr\xF4le la taille de police en pixels pour CodeLens. Quand la valeur est 0, 90\xA0% de '#editor.fontSize#' est utilis\xE9.","Contr\xF4le si l'\xE9diteur doit afficher les \xE9l\xE9ments d\xE9coratifs de couleurs inline et le s\xE9lecteur de couleurs.","Faire appara\xEEtre le s\xE9lecteur de couleurs au clic et au pointage de l\u2019\xE9l\xE9ment d\xE9coratif de couleurs","Faire appara\xEEtre le s\xE9lecteur de couleurs en survolant l\u2019\xE9l\xE9ment d\xE9coratif de couleurs","Faire appara\xEEtre le s\xE9lecteur de couleurs en cliquant sur l\u2019\xE9l\xE9ment d\xE9coratif de couleurs","Contr\xF4le la condition pour faire appara\xEEtre un s\xE9lecteur de couleurs \xE0 partir d\u2019un \xE9l\xE9ment d\xE9coratif de couleurs","Contr\xF4le le nombre maximal d\u2019\xE9l\xE9ments d\xE9coratifs de couleur qui peuvent \xEAtre rendus simultan\xE9ment dans un \xE9diteur.","Autoriser l'utilisation de la souris et des touches pour s\xE9lectionner des colonnes.","Contr\xF4le si la coloration syntaxique doit \xEAtre copi\xE9e dans le presse-papiers.","Contr\xF4ler le style d\u2019animation du curseur.","L\u2019animation de caret fluide est d\xE9sactiv\xE9e.","L\u2019animation de caret fluide est activ\xE9e uniquement lorsque l\u2019utilisateur d\xE9place le curseur avec un mouvement explicite.","L\u2019animation de caret fluide est toujours activ\xE9e.","Contr\xF4le si l'animation du point d'insertion doit \xEAtre activ\xE9e.","Contr\xF4le le style du curseur.","Contr\xF4le le nombre minimal de lignes de d\xE9but (0 minimum) et de fin (1 minimum) visibles autour du curseur. \xC9galement appel\xE9 \xAB\xA0scrollOff\xA0\xBB ou \xAB\xA0scrollOffset\xA0\xBB dans d'autres \xE9diteurs.","'cursorSurroundingLines' est appliqu\xE9 seulement s'il est d\xE9clench\xE9 via le clavier ou une API.","'cursorSurroundingLines' est toujours appliqu\xE9.","Contr\xF4le le moment o\xF9 #cursorSurroundingLines# doit \xEAtre appliqu\xE9.","D\xE9termine la largeur du curseur lorsque `#editor.cursorStyle#` est \xE0 `line`.","Contr\xF4le si l\u2019\xE9diteur autorise le d\xE9placement de s\xE9lections par glisser-d\xE9placer.","Utilisez une nouvelle m\xE9thode de rendu avec des SVG.","Utilisez une nouvelle m\xE9thode de rendu avec des caract\xE8res de police.","Utilisez la m\xE9thode de rendu stable.","Contr\xF4le si les espaces blancs sont rendus avec une nouvelle m\xE9thode exp\xE9rimentale.","Multiplicateur de vitesse de d\xE9filement quand vous appuyez sur 'Alt'.","Contr\xF4le si l'\xE9diteur a le pliage de code activ\xE9.","Utilisez une strat\xE9gie de pliage propre \xE0 la langue, si disponible, sinon utilisez la strat\xE9gie bas\xE9e sur le retrait.","Utilisez la strat\xE9gie de pliage bas\xE9e sur le retrait.","Contr\xF4le la strat\xE9gie de calcul des plages de pliage.","Contr\xF4le si l'\xE9diteur doit mettre en \xE9vidence les plages pli\xE9es.","Contr\xF4le si l\u2019\xE9diteur r\xE9duit automatiquement les plages d\u2019importation.","Nombre maximal de r\xE9gions pliables. L\u2019augmentation de cette valeur peut r\xE9duire la r\xE9activit\xE9 de l\u2019\xE9diteur lorsque la source actuelle comprend un grand nombre de r\xE9gions pliables.","Contr\xF4le si le fait de cliquer sur le contenu vide apr\xE8s une ligne pli\xE9e d\xE9plie la ligne.","Contr\xF4le la famille de polices.","D\xE9termine si l\u2019\xE9diteur doit automatiquement mettre en forme le contenu coll\xE9. Un formateur doit \xEAtre disponible et \xEAtre capable de mettre en forme une plage dans un document.","Contr\xF4le si l\u2019\xE9diteur doit mettre automatiquement en forme la ligne apr\xE8s la saisie.","Contr\xF4le si l'\xE9diteur doit afficher la marge de glyphes verticale. La marge de glyphes sert principalement au d\xE9bogage.","Contr\xF4le si le curseur doit \xEAtre masqu\xE9 dans la r\xE8gle de la vue d\u2019ensemble.","Contr\xF4le l'espacement des lettres en pixels.","Contr\xF4le si la modification li\xE9e est activ\xE9e dans l\u2019\xE9diteur. En fonction du langage, les symboles associ\xE9s, par exemple les balises HTML, sont mis \xE0 jour durant le processus de modification.","Contr\xF4le si l\u2019\xE9diteur doit d\xE9tecter les liens et les rendre cliquables.","Mettez en surbrillance les crochets correspondants.","Un multiplicateur \xE0 utiliser sur les `deltaX` et `deltaY` des \xE9v\xE9nements de d\xE9filement de roulette de souris.","Faire un zoom sur la police de l'\xE9diteur quand l'utilisateur fait tourner la roulette de la souris tout en maintenant la touche 'Ctrl' enfonc\xE9e.","Fusionnez plusieurs curseurs quand ils se chevauchent.","Mappe vers 'Contr\xF4le' dans Windows et Linux, et vers 'Commande' dans macOS.","Mappe vers 'Alt' dans Windows et Linux, et vers 'Option' dans macOS.","Modificateur \xE0 utiliser pour ajouter plusieurs curseurs avec la souris. Les mouvements de la souris Atteindre la d\xE9finition et Ouvrir le lien s\u2019adaptent afin qu\u2019ils ne soient pas en conflit avec le [modificateur multicurseur](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modificateur).","Chaque curseur colle une seule ligne de texte.","Chaque curseur colle le texte en entier.","Contr\xF4le le collage quand le nombre de lignes du texte coll\xE9 correspond au nombre de curseurs.","Contr\xF4le le nombre maximal de curseurs pouvant se trouver dans un \xE9diteur actif \xE0 la fois.","Contr\xF4le si l'\xE9diteur doit mettre en surbrillance les occurrences de symboles s\xE9mantiques.","Contr\xF4le si une bordure doit \xEAtre dessin\xE9e autour de la r\xE8gle de la vue d'ensemble.","Focus sur l'arborescence \xE0 l'ouverture de l'aper\xE7u","Placer le focus sur l'\xE9diteur \xE0 l'ouverture de l'aper\xE7u","Contr\xF4le s'il faut mettre le focus sur l'\xE9diteur inline ou sur l'arborescence dans le widget d'aper\xE7u.","Contr\xF4le si le geste de souris Acc\xE9der \xE0 la d\xE9finition ouvre toujours le widget d'aper\xE7u.","Contr\xF4le le d\xE9lai en millisecondes apr\xE8s lequel des suggestions rapides sont affich\xE9es.","Contr\xF4le si l'\xE9diteur renomme automatiquement selon le type.","D\xE9pr\xE9ci\xE9. Utilisez 'editor.linkedEditing' \xE0 la place.","Contr\xF4le si l\u2019\xE9diteur doit afficher les caract\xE8res de contr\xF4le.","Affichez le dernier num\xE9ro de ligne quand le fichier se termine par un saut de ligne.","Met en surbrillance la goutti\xE8re et la ligne actuelle.","Contr\xF4le la fa\xE7on dont l\u2019\xE9diteur doit afficher la mise en surbrillance de la ligne actuelle.","Contr\xF4le si l'\xE9diteur doit afficher la mise en surbrillance de la ligne actuelle uniquement quand il a le focus.","Affiche les espaces blancs \xE0 l'exception des espaces uniques entre les mots.","Afficher les espaces blancs uniquement sur le texte s\xE9lectionn\xE9.","Affiche uniquement les caract\xE8res correspondant aux espaces blancs de fin.","Contr\xF4le la fa\xE7on dont l\u2019\xE9diteur doit restituer les caract\xE8res espaces.","Contr\xF4le si les s\xE9lections doivent avoir des angles arrondis.","Contr\xF4le le nombre de caract\xE8res suppl\xE9mentaires, au-del\xE0 duquel l\u2019\xE9diteur d\xE9file horizontalement.","Contr\xF4le si l\u2019\xE9diteur d\xE9file au-del\xE0 de la derni\xE8re ligne.","Faites d\xE9filer uniquement le long de l'axe pr\xE9dominant quand le d\xE9filement est \xE0 la fois vertical et horizontal. Emp\xEAche la d\xE9rive horizontale en cas de d\xE9filement vertical sur un pav\xE9 tactile.","Contr\xF4le si le presse-papiers principal Linux doit \xEAtre pris en charge.","Contr\xF4le si l'\xE9diteur doit mettre en surbrillance les correspondances similaires \xE0 la s\xE9lection.","Affichez toujours les contr\xF4les de pliage.","N\u2019affichez jamais les contr\xF4les de pliage et r\xE9duisez la taille de la marge.","Affichez uniquement les contr\xF4les de pliage quand la souris est au-dessus de la reliure.","Contr\xF4le quand afficher les contr\xF4les de pliage sur la reliure.","Contr\xF4le la disparition du code inutile.","Contr\xF4le les variables d\xE9pr\xE9ci\xE9es barr\xE9es.","Afficher des suggestions d\u2019extraits au-dessus d\u2019autres suggestions.","Afficher des suggestions d\u2019extraits en-dessous d\u2019autres suggestions.","Afficher des suggestions d\u2019extraits avec d\u2019autres suggestions.","Ne pas afficher de suggestions d\u2019extrait de code.","Contr\xF4le si les extraits de code s'affichent en m\xEAme temps que d'autres suggestions, ainsi que leur mode de tri.","Contr\xF4le si l'\xE9diteur d\xE9file en utilisant une animation.","Contr\xF4le si l'indicateur d'accessibilit\xE9 doit \xEAtre fourni aux utilisateurs du lecteur d'\xE9cran lorsqu'une compl\xE9tion inline est affich\xE9e.","Taille de police pour le widget suggest. Lorsqu\u2019elle est d\xE9finie sur {0}, la valeur de {1} est utilis\xE9e.","Hauteur de ligne pour le widget suggest. Lorsqu\u2019elle est d\xE9finie sur {0}, la valeur de {1} est utilis\xE9e. La valeur minimale est 8.","Contr\xF4le si les suggestions devraient automatiquement s\u2019afficher lorsque vous tapez les caract\xE8res de d\xE9clencheur.","S\xE9lectionnez toujours la premi\xE8re suggestion.","S\xE9lectionnez les suggestions r\xE9centes sauf si une entr\xE9e ult\xE9rieure en a s\xE9lectionn\xE9 une, par ex., 'console.| -> console.log', car 'log' a \xE9t\xE9 effectu\xE9 r\xE9cemment.","S\xE9lectionnez des suggestions en fonction des pr\xE9fixes pr\xE9c\xE9dents qui ont compl\xE9t\xE9 ces suggestions, par ex., 'co -> console' et 'con -> const'.","Contr\xF4le comment les suggestions sont pr\xE9-s\xE9lectionn\xE9s lors de l\u2019affichage de la liste de suggestion.","La compl\xE9tion par tabulation ins\xE9rera la meilleure suggestion lorsque vous appuyez sur tab.","D\xE9sactiver les compl\xE9tions par tabulation.","Compl\xE9ter les extraits de code par tabulation lorsque leur pr\xE9fixe correspond. Fonctionne mieux quand les 'quickSuggestions' ne sont pas activ\xE9es.","Active les compl\xE9tions par tabulation","Les marques de fin de ligne inhabituelles sont automatiquement supprim\xE9es.","Les marques de fin de ligne inhabituelles sont ignor\xE9es.","Les marques de fin de ligne inhabituelles demandent \xE0 \xEAtre supprim\xE9es.","Supprimez les marques de fin de ligne inhabituelles susceptibles de causer des probl\xE8mes.","L'insertion et la suppression des espaces blancs suit les taquets de tabulation.","Utilisez la r\xE8gle de saut de ligne par d\xE9faut.","Les sauts de mots ne doivent pas \xEAtre utilis\xE9s pour le texte chinois/japonais/cor\xE9en (CJC). Le comportement du texte non CJC est identique \xE0 celui du texte normal.","Contr\xF4le les r\xE8gles de s\xE9parateur de mots utilis\xE9es pour le texte chinois/japonais/cor\xE9en (CJC).","Caract\xE8res utilis\xE9s comme s\xE9parateurs de mots durant la navigation ou les op\xE9rations bas\xE9es sur les mots","Le retour automatique \xE0 la ligne n'est jamais effectu\xE9.","Le retour automatique \xE0 la ligne s'effectue en fonction de la largeur de la fen\xEAtre d'affichage.","Les lignes seront termin\xE9es \xE0 `#editor.wordWrapColumn#`.","Les lignes seront termin\xE9es au minimum du viewport et `#editor.wordWrapColumn#`.","Contr\xF4le comment les lignes doivent \xEAtre limit\xE9es.","Contr\xF4le la colonne de terminaison de l\u2019\xE9diteur lorsque `#editor.wordWrap#` est \xE0 `wordWrapColumn` ou `bounded`.","Contr\xF4le si les d\xE9corations de couleur inline doivent \xEAtre affich\xE9es \xE0 l\u2019aide du fournisseur de couleurs de document par d\xE9faut","Contr\xF4le si l\u2019\xE9diteur re\xE7oit des onglets ou les reporte au banc d\u2019essai pour la navigation."],"vs/editor/common/core/editorColorRegistry":["Couleur d'arri\xE8re-plan de la mise en surbrillance de la ligne \xE0 la position du curseur.","Couleur d'arri\xE8re-plan de la bordure autour de la ligne \xE0 la position du curseur.","Couleur d'arri\xE8re-plan des plages mises en surbrillance, comme par les fonctionnalit\xE9s de recherche et Quick Open. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d'arri\xE8re-plan de la bordure autour des plages mises en surbrillance.","Couleur d'arri\xE8re-plan du symbole mis en surbrillance, comme le symbole Atteindre la d\xE9finition ou Suivant/Pr\xE9c\xE9dent. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les d\xE9corations sous-jacentes.","Couleur d'arri\xE8re-plan de la bordure autour des symboles mis en surbrillance.","Couleur du curseur de l'\xE9diteur.","La couleur de fond du curseur de l'\xE9diteur. Permet de personnaliser la couleur d'un caract\xE8re survol\xE9 par un curseur de bloc.","Couleur des espaces blancs dans l'\xE9diteur.","Couleur des num\xE9ros de ligne de l'\xE9diteur.","Couleur des rep\xE8res de retrait de l'\xE9diteur.","'editorIndentGuide.background' est d\xE9conseill\xE9. Utilisez 'editorIndentGuide.background1' \xE0 la place.","Couleur des guides d'indentation de l'\xE9diteur actif","'editorIndentGuide.activeBackground' est d\xE9conseill\xE9. Utilisez 'editorIndentGuide.activeBackground1' \xE0 la place.","Couleur des rep\xE8res de retrait de l'\xE9diteur (1).","Couleur des rep\xE8res de retrait de l'\xE9diteur (2).","Couleur des rep\xE8res de retrait de l'\xE9diteur (3).","Couleur des rep\xE8res de retrait de l'\xE9diteur (4).","Couleur des rep\xE8res de retrait de l'\xE9diteur (5).","Couleur des rep\xE8res de retrait de l'\xE9diteur (6).","Couleur des repaires de retrait de l'\xE9diteur actifs (1).","Couleur des repaires de retrait de l'\xE9diteur actifs (2).","Couleur des repaires de retrait de l'\xE9diteur actifs (3).","Couleur des repaires de retrait de l'\xE9diteur actifs (4).","Couleur des repaires de retrait de l'\xE9diteur actifs (5).","Couleur des repaires de retrait de l'\xE9diteur actifs (6).","Couleur des num\xE9ros de lignes actives de l'\xE9diteur","L\u2019ID est d\xE9pr\xE9ci\xE9. Utilisez \xE0 la place 'editorLineNumber.activeForeground'.","Couleur des num\xE9ros de lignes actives de l'\xE9diteur","Couleur de la ligne finale de l\u2019\xE9diteur lorsque editor.renderFinalNewline est d\xE9fini sur gris\xE9.","Couleur des r\xE8gles de l'\xE9diteur","Couleur pour les indicateurs CodeLens","Couleur d'arri\xE8re-plan pour les accolades associ\xE9es","Couleur pour le contour des accolades associ\xE9es","Couleur de la bordure de la r\xE8gle d'aper\xE7u.","Couleur d\u2019arri\xE8re-plan de la r\xE8gle de vue d\u2019ensemble de l\u2019\xE9diteur.","Couleur de fond pour la bordure de l'\xE9diteur. La bordure contient les marges pour les symboles et les num\xE9ros de ligne.","Couleur de bordure du code source inutile (non utilis\xE9) dans l'\xE9diteur.","Opacit\xE9 du code source inutile (non utilis\xE9) dans l'\xE9diteur. Par exemple, '#000000c0' affiche le code avec une opacit\xE9 de 75\xA0%. Pour les th\xE8mes \xE0 fort contraste, utilisez la couleur de th\xE8me 'editorUnnecessaryCode.border' pour souligner le code inutile au lieu d'utiliser la transparence.","Couleur de bordure du texte fant\xF4me dans l\u2019\xE9diteur.","Couleur de premier plan du texte fant\xF4me dans l\u2019\xE9diteur.","Couleur de l\u2019arri\xE8re-plan du texte fant\xF4me dans l\u2019\xE9diteur","Couleur de marqueur de la r\xE8gle d'aper\xE7u pour la mise en surbrillance des plages. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur du marqueur de la r\xE8gle d'aper\xE7u pour les erreurs.","Couleur du marqueur de la r\xE8gle d'aper\xE7u pour les avertissements.","Couleur du marqueur de la r\xE8gle d'aper\xE7u pour les informations.","Couleur de premier plan des crochets (1). N\xE9cessite l\u2019activation de la coloration de la paire de crochets.","Couleur de premier plan des crochets (2). N\xE9cessite l\u2019activation de la coloration de la paire de crochets.","Couleur de premier plan des crochets (3). N\xE9cessite l\u2019activation de la coloration de la paire de crochets.","Couleur de premier plan des crochets (4). N\xE9cessite l\u2019activation de la coloration de la paire de crochets.","Couleur de premier plan des crochets (5). N\xE9cessite l\u2019activation de la coloration de la paire de crochets.","Couleur de premier plan des crochets (6). N\xE9cessite l\u2019activation de la coloration de la paire de crochets.","Couleur de premier plan des parenth\xE8ses inattendues","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets inactifs (1). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets inactifs (2). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets inactifs (3). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets inactifs (4). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets inactifs (5). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets inactifs (6). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets actifs (1). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets actifs (2). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets actifs (3). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets actifs (4). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets actifs (5). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur d\u2019arri\xE8re-plan des rep\xE8res de paire de crochets actifs (6). N\xE9cessite l\u2019activation des rep\xE8res de paire de crochets.","Couleur de bordure utilis\xE9e pour mettre en surbrillance les caract\xE8res Unicode","Couleur de fond utilis\xE9e pour mettre en \xE9vidence les caract\xE8res unicode"],"vs/editor/common/editorContextKeys":["Indique si le texte de l'\xE9diteur a le focus (le curseur clignote)","Indique si l'\xE9diteur ou un widget de l'\xE9diteur a le focus (par exemple, le focus se trouve sur le widget de recherche)","Indique si un \xE9diteur ou une entr\xE9e de texte mis en forme a le focus (le curseur clignote)","Indique si l\u2019\xE9diteur est en lecture seule","Indique si le contexte est celui d'un \xE9diteur de diff\xE9rences","Indique si le contexte est celui d\u2019un \xE9diteur de diff\xE9rences int\xE9gr\xE9","Indique si un bloc de code d\xE9plac\xE9 est s\xE9lectionn\xE9 pour \xEAtre compar\xE9","Indique si la visionneuse diff accessible est visible","Indique si le point d'arr\xEAt Render Side by Side ou inline de l'\xE9diteur de diff\xE9rences est atteint","Indique si 'editor.columnSelection' est activ\xE9","Indique si du texte est s\xE9lectionn\xE9 dans l'\xE9diteur","Indique si l'\xE9diteur a plusieurs s\xE9lections","Indique si la touche Tab permet de d\xE9placer le focus hors de l'\xE9diteur","Indique si le pointage de l'\xE9diteur est visible","Indique si le pointage de l\u2019\xE9diteur est cibl\xE9","Indique si le d\xE9filement du pense-b\xEAte a le focus","Indique si le d\xE9filement du pense-b\xEAte est visible","Indique si le s\xE9lecteur de couleurs autonome est visible","Indique si le s\xE9lecteur de couleurs autonome est prioritaire","Indique si l'\xE9diteur fait partie d'un \xE9diteur plus important (par exemple Notebooks)","Identificateur de langage de l'\xE9diteur","Indique si l'\xE9diteur a un fournisseur d'\xE9l\xE9ments de compl\xE9tion","Indique si l'\xE9diteur a un fournisseur d'actions de code","Indique si l'\xE9diteur a un fournisseur d'informations CodeLens","Indique si l'\xE9diteur a un fournisseur de d\xE9finitions","Indique si l'\xE9diteur a un fournisseur de d\xE9clarations","Indique si l'\xE9diteur a un fournisseur d'impl\xE9mentation","Indique si l'\xE9diteur a un fournisseur de d\xE9finitions de type","Indique si l'\xE9diteur a un fournisseur de pointage","Indique si l'\xE9diteur a un fournisseur de mise en surbrillance pour les documents","Indique si l'\xE9diteur a un fournisseur de symboles pour les documents","Indique si l'\xE9diteur a un fournisseur de r\xE9f\xE9rence","Indique si l'\xE9diteur a un fournisseur de renommage","Indique si l'\xE9diteur a un fournisseur d'aide sur les signatures","Indique si l'\xE9diteur a un fournisseur d'indicateurs inline","Indique si l'\xE9diteur a un fournisseur de mise en forme pour les documents","Indique si l'\xE9diteur a un fournisseur de mise en forme de s\xE9lection pour les documents","Indique si l'\xE9diteur a plusieurs fournisseurs de mise en forme pour les documents","Indique si l'\xE9diteur a plusieurs fournisseurs de mise en forme de s\xE9lection pour les documents"],"vs/editor/common/languages":["tableau","bool\xE9en","classe","constante","constructeur","\xE9num\xE9ration","membre d'\xE9num\xE9ration","\xE9v\xE9nement","champ","fichier","fonction","interface","cl\xE9","m\xE9thode","module","espace de noms","NULL","nombre","objet","op\xE9rateur","package","propri\xE9t\xE9","cha\xEEne","struct","param\xE8tre de type","variable","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["Texte brut"],"vs/editor/common/model/editStack":["Frappe en cours"],"vs/editor/common/standaloneStrings":["D\xE9veloppeur\xA0: Inspecter les jetons","Acc\xE9der \xE0 la ligne/colonne...","Afficher tous les fournisseurs d'acc\xE8s rapide","Palette de commandes","Commandes d'affichage et d'ex\xE9cution","Acc\xE9der au symbole...","Acc\xE9der au symbole par cat\xE9gorie...","Contenu de l'\xE9diteur","Appuyez sur Alt+F1 pour voir les options d'accessibilit\xE9.","Activer/d\xE9sactiver le th\xE8me \xE0 contraste \xE9lev\xE9","{0} modifications dans {1} fichiers"],"vs/editor/common/viewLayout/viewLineRenderer":["Afficher plus\xA0({0})","{0}\xA0caract\xE8res"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["Ancre de s\xE9lection","Ancre d\xE9finie sur {0}:{1}","D\xE9finir l'ancre de s\xE9lection","Atteindre l'ancre de s\xE9lection","S\xE9lectionner de l'ancre au curseur","Annuler l'ancre de s\xE9lection"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["Couleur du marqueur de la r\xE8gle d'aper\xE7u pour rechercher des parenth\xE8ses.","Atteindre le crochet","S\xE9lectionner jusqu'au crochet","Supprimer les crochets","Acc\xE9der au &&crochet"],"vs/editor/contrib/caretOperations/browser/caretOperations":["D\xE9placer le texte s\xE9lectionn\xE9 \xE0 gauche","D\xE9placer le texte s\xE9lectionn\xE9 \xE0 droite"],"vs/editor/contrib/caretOperations/browser/transpose":["Transposer les lettres"],"vs/editor/contrib/clipboard/browser/clipboard":["Co&&uper","Couper","Couper","Couper","&&Copier","Copier","Copier","Copier","Copier en tant que","Copier en tant que","Partager","Partager","Partager","Co&&ller","Coller","Coller","Coller","Copier avec la coloration syntaxique"],"vs/editor/contrib/codeAction/browser/codeAction":["Une erreur inconnue s'est produite \xE0 l'application de l'action du code"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["Type d'action de code \xE0 ex\xE9cuter.","Contr\xF4le quand les actions retourn\xE9es sont appliqu\xE9es.","Appliquez toujours la premi\xE8re action de code retourn\xE9e.","Appliquez la premi\xE8re action de code retourn\xE9e si elle est la seule.","N'appliquez pas les actions de code retourn\xE9es.","Contr\xF4le si seules les actions de code par d\xE9faut doivent \xEAtre retourn\xE9es.","Correction rapide...","Aucune action de code disponible","Aucune action de code pr\xE9f\xE9r\xE9e n'est disponible pour '{0}'","Aucune action de code disponible pour '{0}'","Aucune action de code par d\xE9faut disponible","Aucune action de code disponible","Remanier...","Aucune refactorisation par d\xE9faut disponible pour '{0}'","Aucune refactorisation disponible pour '{0}'","Aucune refactorisation par d\xE9faut disponible","Aucune refactorisation disponible","Action de la source","Aucune action source par d\xE9faut disponible pour '{0}'","Aucune action source disponible pour '{0}'","Aucune action source par d\xE9faut disponible","Aucune action n'est disponible","Organiser les importations","Aucune action organiser les imports disponible","Tout corriger","Aucune action Tout corriger disponible","Corriger automatiquement...","Aucun correctif automatique disponible"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["Activez/d\xE9sactivez l\u2019affichage des en-t\xEAtes de groupe dans le menu d\u2019action du code.","Activez/d\xE9sactivez l\u2019affichage du correctif rapide le plus proche dans une ligne lorsqu\u2019il n\u2019est pas sur un diagnostic."],"vs/editor/contrib/codeAction/browser/codeActionController":["Contexte\xA0: {0} \xE0 la ligne {1} et \xE0 la colonne {2}.","Masquer d\xE9sactiv\xE9","Afficher les \xE9l\xE9ments d\xE9sactiv\xE9s"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["Plus d\u2019actions...","Correctif rapide","Extraire","Inline","R\xE9\xE9crire","D\xE9placer","Entourer de","Action source"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["Afficher les actions de code. Correctif rapide disponible par d\xE9faut ({0})","Afficher les actions de code ({0})","Afficher les actions de code"],"vs/editor/contrib/codelens/browser/codelensController":["Afficher les commandes Code Lens de la ligne actuelle","S\xE9lectionner une commande"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["Cliquez pour activer/d\xE9sactiver les options de couleur (rgb/hsl/hexad\xE9cimal).","Ic\xF4ne pour fermer le s\xE9lecteur de couleurs"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["Afficher ou mettre le focus sur le s\xE9lecteur de couleurs autonome","&&Afficher ou mettre le focus sur le s\xE9lecteur de couleurs autonome","Masquer le s\xE9lecteur de couleurs","Ins\xE9rer une couleur avec un s\xE9lecteur de couleurs autonome"],"vs/editor/contrib/comment/browser/comment":["Activer/d\xE9sactiver le commentaire de ligne","Afficher/masquer le commen&&taire de ligne","Ajouter le commentaire de ligne","Supprimer le commentaire de ligne","Activer/d\xE9sactiver le commentaire de bloc","Afficher/masquer le commentaire de &&bloc"],"vs/editor/contrib/contextmenu/browser/contextmenu":["Minimap","Afficher les caract\xE8res","Taille verticale","Proportionnel","Remplissage","Ajuster","Curseur","Pointer la souris","Toujours","Afficher le menu contextuel de l'\xE9diteur"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["Annulation du curseur","Restauration du curseur"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["Coller en tant que...","ID de la modification de collage \xE0 appliquer. S\u2019il n\u2019est pas fourni, l\u2019\xE9diteur affiche un s\xE9lecteur."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["Si le widget de collage est affich\xE9","Afficher les options de collage...","Ex\xE9cution des gestionnaires de collage. Cliquez pour annuler","S\xE9lectionner l\u2019action Coller","Ex\xE9cution des gestionnaires de collage"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["Int\xE9gr\xE9","Ins\xE9rer du texte brut","Ins\xE9rer des URI","Ins\xE9rer un URI","Ins\xE9rer des chemins d\u2019acc\xE8s","Ins\xE9rer un chemin d\u2019acc\xE8s","Ins\xE9rer des chemins d\u2019acc\xE8s relatifs","Ins\xE9rer un chemin d\u2019acc\xE8s relatif"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["Configure le fournisseur de d\xE9p\xF4t par d\xE9faut \xE0 utiliser pour le contenu d\u2019un type MIME donn\xE9."],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["Indique si le widget de suppression s\u2019affiche","Afficher les options de suppression...","Ex\xE9cution des gestionnaires de d\xE9p\xF4t. Cliquez pour annuler"],"vs/editor/contrib/editorState/browser/keybindingCancellation":["Indique si l'\xE9diteur ex\xE9cute une op\xE9ration annulable, par exemple 'Avoir un aper\xE7u des r\xE9f\xE9rences'"],"vs/editor/contrib/find/browser/findController":["Le fichier est trop volumineux pour effectuer une op\xE9ration Tout remplacer.","Rechercher","&&Rechercher",`Remplace l\u2019indicateur \xAB Utiliser une expression r\xE9guli\xE8re \xBB.\r -L\u2019indicateur ne sera pas enregistr\xE9 \xE0 l\u2019avenir.\r -0 : Ne rien faire\r -1 : Vrai\r -2 : Faux`,`Remplace l\u2019indicateur \xAB Match Whole Word \xBB.\r -L\u2019indicateur ne sera pas enregistr\xE9 \xE0 l\u2019avenir.\r -0 : Ne rien faire\r -1 : Vrai\r -2 : Faux`,`Remplace l\u2019indicateur \xAB Cas math\xE9matiques \xBB.\r -L\u2019indicateur ne sera pas enregistr\xE9 \xE0 l\u2019avenir.\r -0 : Ne rien faire\r -1 : Vrai\r -2 : Faux`,`Remplace l\u2019indicateur \xAB Preserve Case \xBB.\r -L\u2019indicateur ne sera pas enregistr\xE9 \xE0 l\u2019avenir.\r -0 : Ne rien faire\r -1 : Vrai\r -2 : Faux`,"Trouver avec des arguments","Rechercher dans la s\xE9lection","Rechercher suivant","Rechercher pr\xE9c\xE9dent","Acc\xE9der \xE0 la correspondance...","Aucune correspondance. Essayez de rechercher autre chose.","Tapez un nombre pour acc\xE9der \xE0 une correspondance sp\xE9cifique (entre 1 et {0})","Veuillez entrer un nombre compris entre 1 et {0}","Veuillez entrer un nombre compris entre 1 et {0}","S\xE9lection suivante","S\xE9lection pr\xE9c\xE9dente","Remplacer","&&Remplacer"],"vs/editor/contrib/find/browser/findWidget":["Ic\xF4ne de l'option Rechercher dans la s\xE9lection dans le widget de recherche de l'\xE9diteur.","Ic\xF4ne permettant d'indiquer que le widget de recherche de l'\xE9diteur est r\xE9duit.","Ic\xF4ne permettant d'indiquer que le widget de recherche de l'\xE9diteur est d\xE9velopp\xE9.","Ic\xF4ne de l'option Remplacer dans le widget de recherche de l'\xE9diteur.","Ic\xF4ne de l'option Tout remplacer dans le widget de recherche de l'\xE9diteur.","Ic\xF4ne de l'option Rechercher pr\xE9c\xE9dent dans le widget de recherche de l'\xE9diteur.","Ic\xF4ne de l'option Rechercher suivant dans le widget de recherche de l'\xE9diteur.","Rechercher/remplacer","Rechercher","Rechercher","Correspondance pr\xE9c\xE9dente","Correspondance suivante","Rechercher dans la s\xE9lection","Fermer","Remplacer","Remplacer","Remplacer","Tout remplacer","Activer/d\xE9sactiver le remplacement","Seuls les {0} premiers r\xE9sultats sont mis en \xE9vidence, mais toutes les op\xE9rations de recherche fonctionnent sur l\u2019ensemble du texte.","{0} sur {1}","Aucun r\xE9sultat","{0} trouv\xE9(s)","{0} trouv\xE9 pour '{1}'","{0} trouv\xE9 pour '{1}', sur {2}","{0} trouv\xE9 pour '{1}'","La combinaison Ctrl+Entr\xE9e permet d\xE9sormais d'ajouter un saut de ligne au lieu de tout remplacer. Vous pouvez modifier le raccourci clavier de editor.action.replaceAll pour red\xE9finir le comportement."],"vs/editor/contrib/folding/browser/folding":["D\xE9plier","D\xE9plier de mani\xE8re r\xE9cursive","Plier","Activer/d\xE9sactiver le pliage","Plier de mani\xE8re r\xE9cursive","Replier tous les commentaires de bloc","Replier toutes les r\xE9gions","D\xE9plier toutes les r\xE9gions","Plier tout, sauf les \xE9l\xE9ments s\xE9lectionn\xE9s","D\xE9plier tout, sauf les \xE9l\xE9ments s\xE9lectionn\xE9s","Plier tout","D\xE9plier tout","Atteindre le pli parent","Acc\xE9der \xE0 la plage de pliage pr\xE9c\xE9dente","Acc\xE9der \xE0 la plage de pliage suivante","Cr\xE9er une plage de pliage \xE0 partir de la s\xE9lection","Supprimer les plages de pliage manuelles","Niveau de pliage {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["Couleur d'arri\xE8re-plan des gammes pli\xE9es. La couleur ne doit pas \xEAtre opaque pour ne pas cacher les d\xE9corations sous-jacentes.","Couleur du contr\xF4le de pliage dans la marge de l'\xE9diteur.","Ic\xF4ne des plages d\xE9velopp\xE9es dans la marge de glyphes de l'\xE9diteur.","Ic\xF4ne des plages r\xE9duites dans la marge de glyphes de l'\xE9diteur.","Ic\xF4ne pour les plages r\xE9duites manuellement dans la marge de glyphe de l\u2019\xE9diteur.","Ic\xF4ne pour les plages d\xE9velopp\xE9es manuellement dans la marge de glyphe de l\u2019\xE9diteur."],"vs/editor/contrib/fontZoom/browser/fontZoom":["Agrandissement de l'\xE9diteur de polices de caract\xE8res","R\xE9tr\xE9cissement de l'\xE9diteur de polices de caract\xE8res","Remise \xE0 niveau du zoom de l'\xE9diteur de polices de caract\xE8res"],"vs/editor/contrib/format/browser/format":["1\xA0modification de format effectu\xE9e \xE0 la ligne {0}","{0} modifications de format effectu\xE9es \xE0 la ligne {1}","1\xA0modification de format effectu\xE9e entre les lignes {0} et {1}","{0} modifications de format effectu\xE9es entre les lignes {1} et {2}"],"vs/editor/contrib/format/browser/formatActions":["Mettre le document en forme","Mettre la s\xE9lection en forme"],"vs/editor/contrib/gotoError/browser/gotoError":["Aller au probl\xE8me suivant (Erreur, Avertissement, Info)","Ic\xF4ne du prochain marqueur goto.","Aller au probl\xE8me pr\xE9c\xE9dent (Erreur, Avertissement, Info)","Ic\xF4ne du pr\xE9c\xE9dent marqueur goto.","Aller au probl\xE8me suivant dans Fichiers (Erreur, Avertissement, Info)","&&Probl\xE8me suivant","Aller au probl\xE8me pr\xE9c\xE9dent dans Fichiers (Erreur, Avertissement, Info)","&&Probl\xE8me pr\xE9c\xE9dent"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["Erreur","Avertissement","Info","Conseil","{0} \xE0 {1}. ","{0}\xA0probl\xE8mes sur\xA0{1}","{0}\xA0probl\xE8me(s) sur {1}","Couleur d'erreur du widget de navigation dans les marqueurs de l'\xE9diteur.","Arri\xE8re-plan du titre d\u2019erreur du widget de navigation dans les marqueurs de l\u2019\xE9diteur.","Couleur d'avertissement du widget de navigation dans les marqueurs de l'\xE9diteur.","Arri\xE8re-plan du titre d\u2019erreur du widget de navigation dans les marqueurs de l\u2019\xE9diteur.","Couleur d\u2019information du widget de navigation du marqueur de l'\xE9diteur.","Arri\xE8re-plan du titre des informations du widget de navigation dans les marqueurs de l\u2019\xE9diteur.","Arri\xE8re-plan du widget de navigation dans les marqueurs de l'\xE9diteur."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["Aper\xE7u","D\xE9finitions","D\xE9finition introuvable pour '{0}'","D\xE9finition introuvable","Atteindre la d\xE9finition","Atteindre la &&d\xE9finition","Ouvrir la d\xE9finition sur le c\xF4t\xE9","Aper\xE7u de la d\xE9finition","D\xE9clarations","Aucune d\xE9claration pour '{0}'","Aucune d\xE9claration","Acc\xE9der \xE0 la d\xE9claration","Atteindre la &&d\xE9claration","Aucune d\xE9claration pour '{0}'","Aucune d\xE9claration","Aper\xE7u de la d\xE9claration","D\xE9finitions de type","D\xE9finition de type introuvable pour '{0}'","D\xE9finition de type introuvable","Atteindre la d\xE9finition du type","Acc\xE9der \xE0 la d\xE9finition de &&type","Aper\xE7u de la d\xE9finition du type","Impl\xE9mentations","Impl\xE9mentation introuvable pour '{0}'","Impl\xE9mentation introuvable","Atteindre les impl\xE9mentations","Atteindre les &&impl\xE9mentations","Aper\xE7u des impl\xE9mentations","Aucune r\xE9f\xE9rence pour '{0}'","Aucune r\xE9f\xE9rence","Atteindre les r\xE9f\xE9rences","Atteindre les &&r\xE9f\xE9rences","R\xE9f\xE9rences","Aper\xE7u des r\xE9f\xE9rences","R\xE9f\xE9rences","Atteindre un symbole","Emplacements","Aucun r\xE9sultat pour \xAB\xA0{0}\xA0\xBB","R\xE9f\xE9rences"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["Cliquez pour afficher {0}\xA0d\xE9finitions."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["Indique si l'aper\xE7u des r\xE9f\xE9rences est visible, par exemple via 'Avoir un aper\xE7u des r\xE9f\xE9rences' ou 'Faire un peek de la d\xE9finition'","Chargement en cours...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} r\xE9f\xE9rences","{0} r\xE9f\xE9rence","R\xE9f\xE9rences"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["aper\xE7u non disponible","Aucun r\xE9sultat","R\xE9f\xE9rences"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["dans {0} \xE0 la ligne {1} \xE0 la colonne {2}","{0}dans {1} \xE0 la ligne {2} \xE0 la colonne {3}","1 symbole dans {0}, chemin complet {1}","{0} symboles dans {1}, chemin complet {2}","R\xE9sultats introuvables","1\xA0symbole dans {0}","{0}\xA0symboles dans {1}","{0}\xA0symboles dans {1} fichiers"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["Indique s'il existe des emplacements de symboles que vous pouvez parcourir \xE0 l'aide du clavier uniquement.","Symbole {0} sur {1}, {2} pour le suivant","Symbole {0} sur {1}"],"vs/editor/contrib/hover/browser/hover":["Afficher ou focus sur pointer","Afficher le pointeur de l'aper\xE7u de d\xE9finition","Faire d\xE9filer le pointage vers le haut","Faire d\xE9filer le pointage vers le bas","Faire d\xE9filer vers la gauche au pointage","Faire d\xE9filer le pointage vers la droite","Pointer vers le haut de la page","Pointer vers le bas de la page","Atteindre le pointage sup\xE9rieur","Pointer vers le bas"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["Chargement en cours...","Rendu suspendu pour une longue ligne pour des raisons de performances. Cela peut \xEAtre configur\xE9 via 'editor.stopRenderingLineAfter'.","La tokenisation des lignes longues est ignor\xE9e pour des raisons de performances. Cela peut \xEAtre configur\xE9e via 'editor.maxTokenizationLineLength'."],"vs/editor/contrib/hover/browser/markerHoverParticipant":["Voir le probl\xE8me","Aucune solution disponible dans l'imm\xE9diat","Recherche de correctifs rapides...","Aucune solution disponible dans l'imm\xE9diat","Correction rapide..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["Remplacer par la valeur pr\xE9c\xE9dente","Remplacer par la valeur suivante"],"vs/editor/contrib/indentation/browser/indentation":["Convertir les retraits en espaces","Convertir les retraits en tabulations","Taille des tabulations configur\xE9e","Taille d\u2019onglet par d\xE9faut","Taille actuelle de l\u2019onglet","S\xE9lectionner la taille des tabulations pour le fichier actuel","Mettre en retrait avec des tabulations","Mettre en retrait avec des espaces","Modifier la taille d\u2019affichage de l\u2019onglet","D\xE9tecter la mise en retrait \xE0 partir du contenu","Remettre en retrait les lignes","R\xE9indenter les lignes s\xE9lectionn\xE9es"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["Double-cliquer pour ins\xE9rer","cmd + clic","ctrl + clic","option + clic","alt + clic","Acc\xE9dez \xE0 D\xE9finition ({0}), cliquez avec le bouton droit pour en savoir plus.","Acc\xE9der \xE0 D\xE9finition ({0})","Ex\xE9cuter la commande"],"vs/editor/contrib/inlineCompletions/browser/commands":["Afficher la suggestion en ligne suivante","Afficher la suggestion en ligne pr\xE9c\xE9dente","D\xE9clencher la suggestion en ligne","Accepter le mot suivant de la suggestion inline","Accepter le mot","Accepter la ligne suivante d\u2019une suggestion en ligne","Accepter la ligne","Accepter la suggestion inline","Accepter","Masquer la suggestion inlined","Toujours afficher la barre d\u2019outils"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["Suggestion :"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["Indique si une suggestion en ligne est visible","Indique si la suggestion en ligne commence par un espace blanc","Indique si la suggestion incluse commence par un espace blanc inf\xE9rieur \xE0 ce qui serait ins\xE9r\xE9 par l\u2019onglet.","Indique si les suggestions doivent \xEAtre supprim\xE9es pour la suggestion actuelle"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["Inspecter ceci dans l\u2019affichage accessible ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["Ic\xF4ne d'affichage du prochain conseil de param\xE8tre.","Ic\xF4ne d'affichage du pr\xE9c\xE9dent conseil de param\xE8tre.","{0} ({1})","Pr\xE9c\xE9dent","Suivant"],"vs/editor/contrib/lineSelection/browser/lineSelection":["D\xE9velopper la s\xE9lection de ligne"],"vs/editor/contrib/linesOperations/browser/linesOperations":["Copier la ligne en haut","&&Copier la ligne en haut","Copier la ligne en bas","Co&&pier la ligne en bas","Dupliquer la s\xE9lection","&&Dupliquer la s\xE9lection","D\xE9placer la ligne vers le haut","D\xE9placer la ligne &&vers le haut","D\xE9placer la ligne vers le bas","D\xE9placer la &&ligne vers le bas","Trier les lignes dans l'ordre croissant","Trier les lignes dans l'ordre d\xE9croissant","Supprimer les lignes dupliqu\xE9es","D\xE9couper l'espace blanc de fin","Supprimer la ligne","Mettre en retrait la ligne","Ajouter un retrait n\xE9gatif \xE0 la ligne","Ins\xE9rer une ligne au-dessus","Ins\xE9rer une ligne sous","Supprimer tout ce qui est \xE0 gauche","Supprimer tout ce qui est \xE0 droite","Joindre les lignes","Transposer des caract\xE8res autour du curseur","Transformer en majuscule","Transformer en minuscule",'Appliquer la casse "1re lettre des mots en majuscule"',"Transformer en snake case","Transformer en casse mixte","Transformer en kebab case"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["D\xE9marrer la modification li\xE9e","Couleur d'arri\xE8re-plan quand l'\xE9diteur renomme automatiquement le type."],"vs/editor/contrib/links/browser/links":["\xC9chec de l'ouverture de ce lien, car il n'est pas bien form\xE9\xA0: {0}","\xC9chec de l'ouverture de ce lien, car sa cible est manquante.","Ex\xE9cuter la commande","suivre le lien","cmd + clic","ctrl + clic","option + clic","alt + clic","Ex\xE9cuter la commande {0}","Ouvrir le lien"],"vs/editor/contrib/message/browser/messageController":["Indique si l'\xE9diteur affiche un message inline"],"vs/editor/contrib/multicursor/browser/multicursor":["Curseur ajout\xE9\xA0: {0}","Curseurs ajout\xE9s\xA0: {0}","Ajouter un curseur au-dessus","&&Ajouter un curseur au-dessus","Ajouter un curseur en dessous","Aj&&outer un curseur en dessous","Ajouter des curseurs \xE0 la fin des lignes","Ajouter des c&&urseurs \xE0 la fin des lignes","Ajouter des curseurs en bas","Ajouter des curseurs en haut","Ajouter la s\xE9lection \xE0 la correspondance de recherche suivante","Ajouter l'occurrence suiva&&nte","Ajouter la s\xE9lection \xE0 la correspondance de recherche pr\xE9c\xE9dente","Ajouter l'occurrence p&&r\xE9c\xE9dente","D\xE9placer la derni\xE8re s\xE9lection vers la correspondance de recherche suivante","D\xE9placer la derni\xE8re s\xE9lection \xE0 la correspondance de recherche pr\xE9c\xE9dente","S\xE9lectionner toutes les occurrences des correspondances de la recherche","S\xE9lectionner toutes les &&occurrences","Modifier toutes les occurrences","Focus sur le curseur suivant","Concentre le curseur suivant","Focus sur le curseur pr\xE9c\xE9dent","Concentre le curseur pr\xE9c\xE9dent"],"vs/editor/contrib/parameterHints/browser/parameterHints":["Indicateurs des param\xE8tres Trigger"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["Ic\xF4ne d'affichage du prochain conseil de param\xE8tre.","Ic\xF4ne d'affichage du pr\xE9c\xE9dent conseil de param\xE8tre.","{0}, conseil","Couleur de premier plan de l\u2019\xE9l\xE9ment actif dans l\u2019indicateur de param\xE8tre."],"vs/editor/contrib/peekView/browser/peekView":["Indique si l'\xE9diteur de code actuel est int\xE9gr\xE9 \xE0 l'aper\xE7u","Fermer","Couleur d'arri\xE8re-plan de la zone de titre de l'affichage d'aper\xE7u.","Couleur du titre de l'affichage d'aper\xE7u.","Couleur des informations sur le titre de l'affichage d'aper\xE7u.","Couleur des bordures et de la fl\xE8che de l'affichage d'aper\xE7u.","Couleur d'arri\xE8re-plan de la liste des r\xE9sultats de l'affichage d'aper\xE7u.","Couleur de premier plan des noeuds de lignes dans la liste des r\xE9sultats de l'affichage d'aper\xE7u.","Couleur de premier plan des noeuds de fichiers dans la liste des r\xE9sultats de l'affichage d'aper\xE7u.","Couleur d'arri\xE8re-plan de l'entr\xE9e s\xE9lectionn\xE9e dans la liste des r\xE9sultats de l'affichage d'aper\xE7u.","Couleur de premier plan de l'entr\xE9e s\xE9lectionn\xE9e dans la liste des r\xE9sultats de l'affichage d'aper\xE7u.","Couleur d'arri\xE8re-plan de l'\xE9diteur d'affichage d'aper\xE7u.","Couleur d'arri\xE8re-plan de la bordure de l'\xE9diteur d'affichage d'aper\xE7u.","Couleur d\u2019arri\xE8re-plan du d\xE9filement r\xE9manent dans l\u2019\xE9diteur d\u2019affichage d\u2019aper\xE7u.","Couleur de mise en surbrillance d'une correspondance dans la liste des r\xE9sultats de l'affichage d'aper\xE7u.","Couleur de mise en surbrillance d'une correspondance dans l'\xE9diteur de l'affichage d'aper\xE7u.","Bordure de mise en surbrillance d'une correspondance dans l'\xE9diteur de l'affichage d'aper\xE7u."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["Ouvrez d'abord un \xE9diteur de texte pour acc\xE9der \xE0 une ligne.","Atteindre la ligne {0} et le caract\xE8re {1}.","Acc\xE9dez \xE0 la ligne {0}.","Ligne actuelle\xA0: {0}, caract\xE8re\xA0: {1}. Tapez un num\xE9ro de ligne entre\xA01 et\xA0{2} auquel acc\xE9der.","Ligne actuelle\xA0: {0}, caract\xE8re\xA0: {1}. Tapez un num\xE9ro de ligne auquel acc\xE9der."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["Pour acc\xE9der \xE0 un symbole, ouvrez d'abord un \xE9diteur de texte avec des informations de symbole.","L'\xE9diteur de texte actif ne fournit pas les informations de symbole.","Aucun symbole d'\xE9diteur correspondant","Aucun symbole d'\xE9diteur","Ouvrir sur le c\xF4t\xE9","Ouvrir en bas","symboles ({0})","propri\xE9t\xE9s ({0})","m\xE9thodes ({0})","fonctions ({0})","constructeurs ({0})","variables ({0})","classes ({0})","structs ({0})","\xE9v\xE9nements ({0})","op\xE9rateurs ({0})","interfaces ({0})","espaces de noms ({0})","packages ({0})","param\xE8tres de type ({0})","modules ({0})","propri\xE9t\xE9s ({0})","\xE9num\xE9rations ({0})","membres d'\xE9num\xE9ration ({0})","cha\xEEnes ({0})","fichiers ({0})","tableaux ({0})","nombres ({0})","bool\xE9ens ({0})","objets ({0})","cl\xE9s ({0})","champs ({0})","constantes ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["Impossible de modifier dans l\u2019entr\xE9e en lecture seule","Impossible de modifier dans l\u2019\xE9diteur en lecture seule"],"vs/editor/contrib/rename/browser/rename":["Aucun r\xE9sultat.","Une erreur inconnue s'est produite lors de la r\xE9solution de l'emplacement de renommage","Renommage de '{0}' en '{1}'","Changement du nom de {0} en {1}","'{0}' renomm\xE9 en '{1}'. R\xE9capitulatif : {2}","Le renommage n'a pas pu appliquer les modifications","Le renommage n'a pas pu calculer les modifications","Renommer le symbole","Activer/d\xE9sactiver la possibilit\xE9 d'afficher un aper\xE7u des changements avant le renommage"],"vs/editor/contrib/rename/browser/renameInputField":["Indique si le widget de renommage d'entr\xE9e est visible","Renommez l'entr\xE9e. Tapez le nouveau nom et appuyez sur Entr\xE9e pour valider.","{0} pour renommer, {1} pour afficher un aper\xE7u"],"vs/editor/contrib/smartSelect/browser/smartSelect":["\xC9tendre la s\xE9lection","D\xE9v&&elopper la s\xE9lection","R\xE9duire la s\xE9lection","&&R\xE9duire la s\xE9lection"],"vs/editor/contrib/snippet/browser/snippetController2":["Indique si l'\xE9diteur est actualis\xE9 en mode extrait","Indique s'il existe un taquet de tabulation suivant en mode extrait","Indique s'il existe un taquet de tabulation pr\xE9c\xE9dent en mode extrait","Acc\xE9der \xE0 l\u2019espace r\xE9serv\xE9 suivant..."],"vs/editor/contrib/snippet/browser/snippetVariables":["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi","Dim","Lun","Mar","Mer","Jeu","Ven","Sam","Janvier","F\xE9vrier","Mars","Avril","Mai","Juin","Juillet","Ao\xFBt","Septembre","Octobre","Novembre","D\xE9cembre","Jan","F\xE9v","Mar","Avr","Mai","Juin","Jul","Ao\xFB","Sept","Oct","Nov","D\xE9c"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["Activer/d\xE9sactiver le d\xE9filement \xE9pingl\xE9","&&Activer/d\xE9sactiver le d\xE9filement \xE9pingl\xE9","D\xE9filement \xE9pingl\xE9","&&D\xE9filement \xE9pingl\xE9","Focus sur le d\xE9filement du pense-b\xEAte","&&Focus sur le d\xE9filement du pense-b\xEAte","S\xE9lectionner la ligne de d\xE9filement du pense-b\xEAte suivante","S\xE9lectionner la ligne de d\xE9filement du pense-b\xEAte pr\xE9c\xE9dente","Atteindre la ligne de d\xE9filement pense-b\xEAte prioritaire","S\xE9lectionner l'\xE9diteur"],"vs/editor/contrib/suggest/browser/suggest":["Indique si une suggestion a le focus","Indique si les d\xE9tails des suggestions sont visibles","Indique s'il existe plusieurs suggestions au choix","Indique si l'insertion de la suggestion actuelle entra\xEEne un changement ou si tout a d\xE9j\xE0 \xE9t\xE9 tap\xE9","Indique si les suggestions sont ins\xE9r\xE9es quand vous appuyez sur Entr\xE9e","Indique si la suggestion actuelle a un comportement d'insertion et de remplacement","Indique si le comportement par d\xE9faut consiste \xE0 ins\xE9rer ou \xE0 remplacer","Indique si la suggestion actuelle prend en charge la r\xE9solution des d\xE9tails suppl\xE9mentaires"],"vs/editor/contrib/suggest/browser/suggestController":["L'acceptation de '{0}' a entra\xEEn\xE9 {1}\xA0modifications suppl\xE9mentaires","Suggestions pour Trigger","Ins\xE9rer","Ins\xE9rer","Remplacer","Remplacer","Ins\xE9rer","afficher moins","afficher plus","R\xE9initialiser la taille du widget de suggestion"],"vs/editor/contrib/suggest/browser/suggestWidget":["Couleur d'arri\xE8re-plan du widget de suggestion.","Couleur de bordure du widget de suggestion.","Couleur de premier plan du widget de suggestion.","Couleur de premier plan de l\u2019entr\xE9e s\xE9lectionn\xE9e dans le widget de suggestion.","Couleur de premier plan de l\u2019ic\xF4ne de l\u2019entr\xE9e s\xE9lectionn\xE9e dans le widget de suggestion.","Couleur d'arri\xE8re-plan de l'entr\xE9e s\xE9lectionn\xE9e dans le widget de suggestion.","Couleur de la surbrillance des correspondances dans le widget de suggestion.","Couleur des mises en surbrillance dans le widget de suggestion lorsqu\u2019un \xE9l\xE9ment a le focus.","Couleur de premier plan du statut du widget de suggestion.","Chargement en cours...","Pas de suggestions.","Sugg\xE9rer","{0} {1}, {2}","{0} {1}","{0}, {1}","{0}, documents\xA0: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["Fermer","Chargement en cours..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["Ic\xF4ne d'affichage d'informations suppl\xE9mentaires dans le widget de suggestion.","Lire la suite"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["Couleur de premier plan des symboles de tableau. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles bool\xE9ens. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de classe. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de couleur. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan pour les symboles de constante. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de constructeur. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'\xE9num\xE9rateur. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de membre d'\xE9num\xE9rateur. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'\xE9v\xE9nement. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de champ. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de fichier. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de dossier. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de fonction. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'interface. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de cl\xE9. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de mot cl\xE9. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de m\xE9thode. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de module. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'espace de noms. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles null. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de nombre. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'objet. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'op\xE9rateur. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de package. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de propri\xE9t\xE9. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de r\xE9f\xE9rence. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'extrait de code. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de cha\xEEne. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de struct. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de texte. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de param\xE8tre de type. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles d'unit\xE9. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion.","Couleur de premier plan des symboles de variable. Ces symboles apparaissent dans le plan, la barre de navigation et le widget de suggestion."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["Activer/d\xE9sactiver l'utilisation de la touche Tab pour d\xE9placer le focus","Appuyer sur Tab d\xE9placera le focus vers le prochain \xE9l\xE9ment pouvant \xEAtre d\xE9sign\xE9 comme \xE9l\xE9ment actif","Appuyer sur Tab ins\xE9rera le caract\xE8re de tabulation"],"vs/editor/contrib/tokenization/browser/tokenization":["D\xE9veloppeur\xA0: forcer la retokenisation"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["Ic\xF4ne affich\xE9e avec un message d'avertissement dans l'\xE9diteur d'extensions.","Ce document contient de nombreux caract\xE8res Unicode ASCII non basiques.","Ce document contient de nombreux caract\xE8res Unicode ambigus.","Ce document contient de nombreux caract\xE8res Unicode invisibles.","Le caract\xE8re {0} peut \xEAtre confondu avec le caract\xE8re ASCII {1}, qui est plus courant dans le code source.","Le caract\xE8re {0} peut \xEAtre confus avec le caract\xE8re {1}, ce qui est plus courant dans le code source.","Le caract\xE8re {0} est invisible.","Le caract\xE8re {0} n\u2019est pas un caract\xE8re ASCII de base.","Ajuster les param\xE8tres","D\xE9sactiver la mise en surbrillance dans les commentaires","D\xE9sactiver la mise en surbrillance des caract\xE8res dans les commentaires","D\xE9sactiver la mise en surbrillance dans les cha\xEEnes","D\xE9sactiver la mise en surbrillance des caract\xE8res dans les cha\xEEnes","D\xE9sactiver la mise en surbrillance ambigu\xEB","D\xE9sactiver la mise en surbrillance des caract\xE8res ambigus","D\xE9sactiver le surlignage invisible","D\xE9sactiver la mise en surbrillance des caract\xE8res invisibles","D\xE9sactiver la mise en surbrillance non ASCII","D\xE9sactiver la mise en surbrillance des caract\xE8res ASCII non de base","Afficher les options d\u2019exclusion","Exclure la mise en surbrillance des {0} (caract\xE8re invisible)","Exclure {0} de la mise en surbrillance",'Autoriser les caract\xE8res Unicode plus courants dans le langage "{0}"',"Configurer les options de surlignage Unicode"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["Marques de fin de ligne inhabituelles","Marques de fin de ligne inhabituelles d\xE9tect\xE9es","Le fichier \xAB\xA0{0}\xA0\xBBcontient un ou plusieurs caract\xE8res de fin de ligne inhabituels, par exemple le s\xE9parateur de ligne (LS) ou le s\xE9parateur de paragraphe (PS).\r\n\r\nIl est recommand\xE9 de les supprimer du fichier. Vous pouvez configurer ce comportement par le biais de `editor.unusualLineTerminators`.","&&Supprimer les marques de fin de ligne inhabituelles","Ignorer"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["Couleur d'arri\xE8re-plan d'un symbole pendant l'acc\xE8s en lecture, comme la lecture d'une variable. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d'arri\xE8re-plan d'un symbole pendant l'acc\xE8s en \xE9criture, comme l'\xE9criture d'une variable. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d\u2019arri\xE8re-plan d\u2019une occurrence textuelle d\u2019un symbole. La couleur ne doit pas \xEAtre opaque afin de ne pas masquer les d\xE9corations sous-jacentes.","Couleur de bordure d'un symbole durant l'acc\xE8s en lecture, par exemple la lecture d'une variable.","Couleur de bordure d'un symbole durant l'acc\xE8s en \xE9criture, par exemple l'\xE9criture dans une variable.","Couleur de bordure d\u2019une occurrence textuelle pour un symbole.","Couleur de marqueur de la r\xE8gle d'aper\xE7u pour la mise en surbrillance des symboles. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de marqueur de la r\xE8gle d'aper\xE7u pour la mise en surbrillance des symboles d'acc\xE8s en \xE9criture. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de marqueur de r\xE8gle d\u2019aper\xE7u d\u2019une occurrence textuelle pour un symbole. La couleur ne doit pas \xEAtre opaque afin de ne pas masquer les d\xE9corations sous-jacentes."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["Aller \xE0 la prochaine mise en \xE9vidence de symbole","Aller \xE0 la mise en \xE9vidence de symbole pr\xE9c\xE9dente","D\xE9clencher la mise en \xE9vidence de symbole"],"vs/editor/contrib/wordOperations/browser/wordOperations":["Supprimer le mot"],"vs/platform/action/common/actionCommonCategories":["Afficher","Aide","Test","fichier","Pr\xE9f\xE9rences","D\xE9veloppeur"],"vs/platform/actionWidget/browser/actionList":["{0} \xE0 appliquer, {1} \xE0 afficher un aper\xE7u","{0} pour appliquer","{0}, raison d\xE9sactiv\xE9e : {1}","Widget d\u2019action"],"vs/platform/actionWidget/browser/actionWidget":["Couleur d'arri\xE8re-plan des \xE9l\xE9ments d'action activ\xE9s dans la barre d'action.","Indique si la liste des widgets d\u2019action est visible","Masquer le widget d\u2019action","S\xE9lectionner l\u2019action pr\xE9c\xE9dente","S\xE9lectionner l\u2019action suivante","Accepter l\u2019action s\xE9lectionn\xE9e","Aper\xE7u de l\u2019action s\xE9lectionn\xE9e"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["Masquer","R\xE9initialiser le menu"],"vs/platform/actions/common/menuService":["Masquer \xAB{0}\xBB"],"vs/platform/audioCues/browser/audioCueService":["Erreur sur la ligne","Avertissement sur la ligne","Zone pli\xE9e sur la ligne","Point d\u2019arr\xEAt sur ligne","Suggestion inline sur la ligne","Correctif rapide de terminal","D\xE9bogueur arr\xEAt\xE9 sur le point d\u2019arr\xEAt","Aucun indicateur d\u2019inlay sur la ligne","T\xE2che termin\xE9e","\xC9chec de la t\xE2che","\xC9chec de la commande de terminal","Cloche de terminal","Cellule de bloc-notes termin\xE9e","\xC9chec de la cellule de bloc-notes","Ligne de diffusion ins\xE9r\xE9e","Ligne de diffusion supprim\xE9e","Ligne diff modifi\xE9e","Demande de conversation envoy\xE9e","R\xE9ponse de conversation re\xE7ue","R\xE9ponse de conversation en attente"],"vs/platform/configuration/common/configurationRegistry":["Substitutions de configuration du langage par d\xE9faut","Configurez les param\xE8tres \xE0 remplacer pour le langage {0}.","Configurez les param\xE8tres d'\xE9diteur \xE0 remplacer pour un langage.","Ce param\xE8tre ne prend pas en charge la configuration par langage.","Configurez les param\xE8tres d'\xE9diteur \xE0 remplacer pour un langage.","Ce param\xE8tre ne prend pas en charge la configuration par langage.","Impossible d'inscrire une propri\xE9t\xE9 vide","Impossible d'inscrire '{0}'. Ceci correspond au mod\xE8le de propri\xE9t\xE9 '\\\\[.*\\\\]$' permettant de d\xE9crire les param\xE8tres d'\xE9diteur sp\xE9cifiques \xE0 un langage. Utilisez la contribution 'configurationDefaults'.","Impossible d'inscrire '{0}'. Cette propri\xE9t\xE9 est d\xE9j\xE0 inscrite.","Impossible d\u2019inscrire '{0}'. Le {1} de strat\xE9gie associ\xE9 est d\xE9j\xE0 inscrit aupr\xE8s de {2}."],"vs/platform/contextkey/browser/contextKeyService":["Commande qui retourne des informations sur les cl\xE9s de contexte"],"vs/platform/contextkey/common/contextkey":["Expression de cl\xE9 de contexte vide","Avez-vous oubli\xE9 d\u2019\xE9crire une expression ? Vous pouvez \xE9galement placer 'false' ou 'true' pour toujours donner la valeur false ou true, respectivement.","'in' apr\xE8s 'not'.","parenth\xE8se fermante ')'","Jeton inattendu","Avez-vous oubli\xE9 de placer && ou || avant le jeton ?","Fin d\u2019expression inattendue","Avez-vous oubli\xE9 de placer une cl\xE9 de contexte ?",`Attendu : {0}\r -Re\xE7u : '{1}'.`],"vs/platform/contextkey/common/contextkeys":["Indique si le syst\xE8me d'exploitation est macOS","Indique si le syst\xE8me d'exploitation est Linux","Indique si le syst\xE8me d'exploitation est Windows","Indique si la plateforme est un navigateur web","Indique si le syst\xE8me d'exploitation est macOS sur une plateforme qui n'est pas un navigateur","Indique si le syst\xE8me d\u2019exploitation est Linux","Indique si la plateforme est un navigateur web mobile","Type de qualit\xE9 de VS Code","Indique si le focus clavier se trouve dans une zone d'entr\xE9e"],"vs/platform/contextkey/common/scanner":["Voulez-vous dire {0}?","Voulez-vous dire {0} ou {1}?","Voulez-vous dire {0}, {1} ou {2}?","Avez-vous oubli\xE9 d\u2019ouvrir ou de fermer le devis ?","Avez-vous oubli\xE9 d\u2019\xE9chapper le caract\xE8re \xAB / \xBB (barre oblique) ? Placez deux barre obliques inverses avant d\u2019y \xE9chapper, par ex., \xAB \\\\/ \xBB."],"vs/platform/history/browser/contextScopedHistoryWidget":["Indique si les suggestions sont visibles"],"vs/platform/keybinding/common/abstractKeybindingService":["Touche ({0}) utilis\xE9e. En attente d'une seconde touche...","({0}) a \xE9t\xE9 enfonc\xE9. En attente de la touche suivante de la pression...","La combinaison de touches ({0}, {1}) n\u2019est pas une commande.","La combinaison de touches ({0}, {1}) n\u2019est pas une commande."],"vs/platform/list/browser/listService":["Banc d'essai","Mappe vers 'Contr\xF4le' dans Windows et Linux, et vers 'Commande' dans macOS.","Mappe vers 'Alt' dans Windows et Linux, et vers 'Option' dans macOS.","Le modificateur \xE0 utiliser pour ajouter un \xE9l\xE9ment dans les arbres et listes pour une s\xE9lection multiple avec la souris (par exemple dans l\u2019Explorateur, les \xE9diteurs ouverts et la vue scm). Les mouvements de la souris 'Ouvrir \xE0 c\xF4t\xE9' (si pris en charge) s'adapteront tels qu\u2019ils n'entrent pas en conflit avec le modificateur multiselect.","Contr\xF4le l'ouverture des \xE9l\xE9ments dans les arborescences et les listes \xE0 l'aide de la souris (si cela est pris en charge). Notez que certaines arborescences et listes peuvent choisir d'ignorer ce param\xE8tre, s'il est non applicable.","Contr\xF4le si les listes et les arborescences prennent en charge le d\xE9filement horizontal dans le banc d'essai. Avertissement : L'activation de ce param\xE8tre a un impact sur les performances.","Contr\xF4le si les clics dans la barre de d\xE9filement page par page.","Contr\xF4le la mise en retrait de l'arborescence, en pixels.","Contr\xF4le si l'arborescence doit afficher les rep\xE8res de mise en retrait.","D\xE9termine si les listes et les arborescences ont un d\xE9filement fluide.","Un multiplicateur \xE0 utiliser sur les `deltaX` et `deltaY` des \xE9v\xE9nements de d\xE9filement de roulette de souris.","Multiplicateur de vitesse de d\xE9filement quand vous appuyez sur 'Alt'.","Mettez en surbrillance les \xE9l\xE9ments lors de la recherche. La navigation vers le haut et le bas traverse uniquement les \xE9l\xE9ments en surbrillance.","Filtrez des \xE9l\xE9ments lors de la recherche.","Contr\xF4le le mode de recherche par d\xE9faut pour les listes et les arborescences dans Workbench.","La navigation au clavier Simple place le focus sur les \xE9l\xE9ments qui correspondent \xE0 l'entr\xE9e de clavier. La mise en correspondance est effectu\xE9e sur les pr\xE9fixes uniquement.","La navigation de mise en surbrillance au clavier met en surbrillance les \xE9l\xE9ments qui correspondent \xE0 l'entr\xE9e de clavier. La navigation ult\xE9rieure vers le haut ou vers le bas parcourt uniquement les \xE9l\xE9ments mis en surbrillance.","La navigation au clavier Filtrer filtre et masque tous les \xE9l\xE9ments qui ne correspondent pas \xE0 l'entr\xE9e de clavier.","Contr\xF4le le style de navigation au clavier pour les listes et les arborescences dans le banc d'essai. Les options sont Simple, Mise en surbrillance et Filtrer.","Utilisez 'workbench.list.defaultFindMode' et 'workbench.list.typeNavigationMode' \xE0 la place.","Utilisez la correspondance approximative lors de la recherche.","Utilisez des correspondances contigu\xEBs lors de la recherche.","Contr\xF4le le type de correspondance utilis\xE9 lors de la recherche de listes et d\u2019arborescences dans le banc d\u2019essai.","Contr\xF4le la fa\xE7on dont les dossiers de l'arborescence sont d\xE9velopp\xE9s quand vous cliquez sur les noms de dossiers. Notez que certaines arborescences et listes peuvent choisir d'ignorer ce param\xE8tre, s'il est non applicable.","Contr\xF4le le fonctionnement de la navigation de type dans les listes et les arborescences du banc d'essai. Quand la valeur est 'trigger', la navigation de type commence une fois que la commande 'list.triggerTypeNavigation' est ex\xE9cut\xE9e."],"vs/platform/markers/common/markers":["Erreur","Avertissement","Info"],"vs/platform/quickinput/browser/commandsQuickAccess":["r\xE9cemment utilis\xE9es","commandes similaires","utilis\xE9s le plus souvent","autres commandes","commandes similaires","{0}, {1}","La commande \xAB\xA0{0}\xA0\xBB a entra\xEEn\xE9 une erreur"],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["Pr\xE9c\xE9dent","Appuyez sur 'Entr\xE9e' pour confirmer votre saisie, ou sur '\xC9chap' pour l'annuler","{0}/{1}","Taper pour affiner les r\xE9sultats."],"vs/platform/quickinput/browser/quickInputController":["Activer/d\xE9sactiver toutes les cases \xE0 cocher","{0}\xA0r\xE9sultats","{0} S\xE9lectionn\xE9s","OK","Personnalis\xE9","Pr\xE9c\xE9dent ({0})","Retour"],"vs/platform/quickinput/browser/quickInputList":["Entr\xE9e rapide"],"vs/platform/quickinput/browser/quickInputUtils":["Cliquer pour ex\xE9cuter la commande '{0}'"],"vs/platform/theme/common/colorRegistry":["Couleur de premier plan globale. Cette couleur est utilis\xE9e si elle n'est pas remplac\xE9e par un composant.","Premier plan globale pour les \xE9l\xE9ments d\xE9sactiv\xE9s. Cette couleur est utilis\xE9e si elle n'est pas remplac\xE9e par un composant.","Couleur principale de premier plan pour les messages d'erreur. Cette couleur est utilis\xE9e uniquement si elle n'est pas red\xE9finie par un composant.","Couleur de premier plan du texte descriptif fournissant des informations suppl\xE9mentaires, par exemple pour un label.","Couleur par d\xE9faut des ic\xF4nes du banc d'essai.","Couleur de bordure globale des \xE9l\xE9ments ayant le focus. Cette couleur est utilis\xE9e si elle n'est pas remplac\xE9e par un composant.","Bordure suppl\xE9mentaire autour des \xE9l\xE9ments pour les s\xE9parer des autres et obtenir un meilleur contraste.","Bordure suppl\xE9mentaire autour des \xE9l\xE9ments actifs pour les s\xE9parer des autres et obtenir un meilleur contraste.","La couleur d'arri\xE8re-plan des s\xE9lections de texte dans le banc d'essai (par ex., pour les champs d'entr\xE9e ou les zones de texte). Notez que cette couleur ne s'applique pas aux s\xE9lections dans l'\xE9diteur et le terminal.","Couleur pour les s\xE9parateurs de texte.","Couleur des liens dans le texte.","Couleur de premier plan pour les liens dans le texte lorsqu'ils sont cliqu\xE9s ou survol\xE9s.","Couleur des segments de texte pr\xE9format\xE9s.","Couleur d'arri\xE8re-plan des citations dans le texte.","Couleur de bordure des citations dans le texte.","Couleur d'arri\xE8re-plan des blocs de code dans le texte.","Couleur de l'ombre des widgets, comme rechercher/remplacer, au sein de l'\xE9diteur.","Couleur de bordure des widgets, comme rechercher/remplacer au sein de l'\xE9diteur.","Arri\xE8re-plan de la zone d'entr\xE9e.","Premier plan de la zone d'entr\xE9e.","Bordure de la zone d'entr\xE9e.","Couleur de la bordure des options activ\xE9es dans les champs d'entr\xE9e.","Couleur d'arri\xE8re-plan des options activ\xE9es dans les champs d'entr\xE9e.","Couleur de pointage d\u2019arri\xE8re-plan des options dans les champs d\u2019entr\xE9e.","Couleur de premier plan des options activ\xE9es dans les champs d'entr\xE9e.","Couleur de premier plan de la zone d'entr\xE9e pour le texte d'espace r\xE9serv\xE9.","Couleur d'arri\xE8re-plan de la validation d'entr\xE9e pour la gravit\xE9 des informations.","Couleur de premier plan de validation de saisie pour la s\xE9v\xE9rit\xE9 Information.","Couleur de bordure de la validation d'entr\xE9e pour la gravit\xE9 des informations.","Couleur d'arri\xE8re-plan de la validation d'entr\xE9e pour la gravit\xE9 de l'avertissement.","Couleur de premier plan de la validation de la saisie pour la s\xE9v\xE9rit\xE9 Avertissement.","Couleur de bordure de la validation d'entr\xE9e pour la gravit\xE9 de l'avertissement.","Couleur d'arri\xE8re-plan de la validation d'entr\xE9e pour la gravit\xE9 de l'erreur.","Couleur de premier plan de la validation de saisie pour la s\xE9v\xE9rit\xE9 Erreur.","Couleur de bordure de la validation d'entr\xE9e pour la gravit\xE9 de l'erreur. ","Arri\xE8re-plan de la liste d\xE9roulante.","Arri\xE8re-plan de la liste d\xE9roulante.","Premier plan de la liste d\xE9roulante.","Bordure de la liste d\xE9roulante.","Couleur de premier plan du bouton.","Couleur du s\xE9parateur de boutons.","Couleur d'arri\xE8re-plan du bouton.","Couleur d'arri\xE8re-plan du bouton pendant le pointage.","Couleur de bordure du bouton.","Couleur de premier plan du bouton secondaire.","Couleur d'arri\xE8re-plan du bouton secondaire.","Couleur d'arri\xE8re-plan du bouton secondaire au moment du pointage.","Couleur de fond des badges. Les badges sont de courts libell\xE9s d'information, ex. le nombre de r\xE9sultats de recherche.","Couleur des badges. Les badges sont de courts libell\xE9s d'information, ex. le nombre de r\xE9sultats de recherche.","Ombre de la barre de d\xE9filement pour indiquer que la vue d\xE9file.","Couleur de fond du curseur de la barre de d\xE9filement.","Couleur de fond du curseur de la barre de d\xE9filement lors du survol.","Couleur d\u2019arri\xE8re-plan de la barre de d\xE9filement lorsqu'on clique dessus.","Couleur de fond pour la barre de progression qui peut s'afficher lors d'op\xE9rations longues.","Couleur d'arri\xE8re-plan du texte d'erreur dans l'\xE9diteur. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les d\xE9corations sous-jacentes.","Couleur de premier plan de la ligne ondul\xE9e marquant les erreurs dans l'\xE9diteur.","Si cette option est d\xE9finie, couleur des doubles soulignements pour les erreurs dans l\u2019\xE9diteur.","Couleur d'arri\xE8re-plan du texte d'avertissement dans l'\xE9diteur. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les d\xE9corations sous-jacentes.","Couleur de premier plan de la ligne ondul\xE9e marquant les avertissements dans l'\xE9diteur.","Si cette option est d\xE9finie, couleur des doubles soulignements pour les avertissements dans l\u2019\xE9diteur.","Couleur d'arri\xE8re-plan du texte d'information dans l'\xE9diteur. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les d\xE9corations sous-jacentes.","Couleur de premier plan de la ligne ondul\xE9e marquant les informations dans l'\xE9diteur.","Si cette option est d\xE9finie, couleur des doubles soulignements pour les informations dans l\u2019\xE9diteur.","Couleur de premier plan de la ligne ondul\xE9e d'indication dans l'\xE9diteur.","Si cette option est d\xE9finie, couleur des doubles soulignements pour les conseils dans l\u2019\xE9diteur.","Couleur de bordure des fen\xEAtres coulissantes.","Couleur d'arri\xE8re-plan de l'\xE9diteur.","Couleur de premier plan par d\xE9faut de l'\xE9diteur.","Couleur d\u2019arri\xE8re-plan du d\xE9filement pense-b\xEAte pour l\u2019\xE9diteur","Faire d\xE9filer l\u2019\xE9cran sur la couleur d\u2019arri\xE8re-plan du pointage pour l\u2019\xE9diteur","Couleur d'arri\xE8re-plan des gadgets de l'\xE9diteur tels que rechercher/remplacer.","Couleur de premier plan des widgets de l'\xE9diteur, notamment Rechercher/remplacer.","Couleur de bordure des widgets de l'\xE9diteur. La couleur est utilis\xE9e uniquement si le widget choisit d'avoir une bordure et si la couleur n'est pas remplac\xE9e par un widget.","Couleur de bordure de la barre de redimensionnement des widgets de l'\xE9diteur. La couleur est utilis\xE9e uniquement si le widget choisit une bordure de redimensionnement et si la couleur n'est pas remplac\xE9e par un widget.","Couleur d'arri\xE8re-plan du s\xE9lecteur rapide. Le widget de s\xE9lecteur rapide est le conteneur de s\xE9lecteurs comme la palette de commandes.","Couleur de premier plan du s\xE9lecteur rapide. Le widget de s\xE9lecteur rapide est le conteneur de s\xE9lecteurs comme la palette de commandes.","Couleur d'arri\xE8re-plan du titre du s\xE9lecteur rapide. Le widget de s\xE9lecteur rapide est le conteneur de s\xE9lecteurs comme la palette de commandes.","Couleur du s\xE9lecteur rapide pour les \xE9tiquettes de regroupement.","Couleur du s\xE9lecteur rapide pour les bordures de regroupement.","Couleur d\u2019arri\xE8re-plan d\u2019\xE9tiquette de combinaison de touches. L\u2019\xE9tiquette est utilis\xE9e pour repr\xE9senter un raccourci clavier.","Couleur de premier plan d\u2019\xE9tiquette de combinaison de touches. L\u2019\xE9tiquette est utilis\xE9e pour repr\xE9senter un raccourci clavier.","Couleur de bordure de la combinaison de touches. L\u2019\xE9tiquette est utilis\xE9e pour repr\xE9senter un raccourci clavier.","Couleur de bordure du bas d\u2019\xE9tiquette de combinaison de touches. L\u2019\xE9tiquette est utilis\xE9e pour repr\xE9senter un raccourci clavier.","Couleur de la s\xE9lection de l'\xE9diteur.","Couleur du texte s\xE9lectionn\xE9 pour le contraste \xE9lev\xE9.","Couleur de la s\xE9lection dans un \xE9diteur inactif. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur des r\xE9gions dont le contenu est le m\xEAme que celui de la s\xE9lection. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de bordure des r\xE9gions dont le contenu est identique \xE0 la s\xE9lection.","Couleur du r\xE9sultat de recherche actif.","Couleur des autres correspondances de recherche. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de la plage limitant la recherche. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de bordure du r\xE9sultat de recherche actif.","Couleur de bordure des autres r\xE9sultats de recherche.","Couleur de bordure de la plage limitant la recherche. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur des correspondances de requ\xEAte de l'\xE9diteur de recherche.","Couleur de bordure des correspondances de requ\xEAte de l'\xE9diteur de recherche.","Couleur du texte dans le message d\u2019ach\xE8vement de la viewlet de recherche.","Surlignage sous le mot s\xE9lectionn\xE9 par pointage. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d'arri\xE8re-plan du pointage de l'\xE9diteur.","Couleur de premier plan du pointage de l'\xE9diteur.","Couleur de bordure du pointage de l'\xE9diteur.","Couleur d'arri\xE8re-plan de la barre d'\xE9tat du pointage de l'\xE9diteur.","Couleur des liens actifs.","Couleur de premier plan des indicateurs inline","Couleur d'arri\xE8re-plan des indicateurs inline","Couleur de premier plan des indicateurs inline pour les types","Couleur d'arri\xE8re-plan des indicateurs inline pour les types","Couleur de premier plan des indicateurs inline pour les param\xE8tres","Couleur d'arri\xE8re-plan des indicateurs inline pour les param\xE8tres","Couleur utilis\xE9e pour l'ic\xF4ne d'ampoule sugg\xE9rant des actions.","Couleur utilis\xE9e pour l'ic\xF4ne d'ampoule sugg\xE9rant des actions de correction automatique.","Couleur d'arri\xE8re-plan du texte ins\xE9r\xE9. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d'arri\xE8re-plan du texte supprim\xE9. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d'arri\xE8re-plan des lignes ins\xE9r\xE9es. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d'arri\xE8re-plan des lignes supprim\xE9es. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur d\u2019arri\xE8re-plan de la marge o\xF9 les lignes ont \xE9t\xE9 ins\xE9r\xE9es","Couleur d\u2019arri\xE8re-plan de la marge o\xF9 les lignes ont \xE9t\xE9 supprim\xE9es","Premier plan de la r\xE8gle de vue d\u2019ensemble des diff\xE9rences pour le contenu ins\xE9r\xE9","Premier plan de la r\xE8gle de vue d\u2019ensemble des diff\xE9rences pour le contenu supprim\xE9","Couleur de contour du texte ins\xE9r\xE9.","Couleur de contour du texte supprim\xE9.","Couleur de bordure entre les deux \xE9diteurs de texte.","Couleur du remplissage diagonal de l'\xE9diteur de diff\xE9rences. Le remplissage diagonal est utilis\xE9 dans les vues de diff\xE9rences c\xF4te \xE0 c\xF4te.","Couleur d\u2019arri\xE8re-plan des blocs inchang\xE9s dans l\u2019\xE9diteur de diff\xE9rences.","Couleur de premier plan des blocs inchang\xE9s dans l\u2019\xE9diteur de diff\xE9rences.","Couleur d\u2019arri\xE8re-plan du code inchang\xE9 dans l\u2019\xE9diteur de diff\xE9rences.","Couleur d'arri\xE8re-plan de la liste/l'arborescence pour l'\xE9l\xE9ment ayant le focus quand la liste/l'arborescence est active. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur de premier plan de la liste/l'arborescence pour l'\xE9l\xE9ment ayant le focus quand la liste/l'arborescence est active. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur de contour de la liste/l'arborescence pour l'\xE9l\xE9ment ayant le focus quand la liste/l'arborescence est active. Une liste/arborescence active a le focus clavier, contrairement \xE0 une liste/arborescence inactive.","Couleur de contour de liste/arborescence pour l\u2019\xE9l\xE9ment cibl\xE9 lorsque la liste/l\u2019arborescence est active et s\xE9lectionn\xE9e. Une liste/arborescence active dispose d\u2019un focus clavier, ce qui n\u2019est pas le cas d\u2019une arborescence inactive.","Couleur d'arri\xE8re-plan de la liste/l'arborescence de l'\xE9l\xE9ment s\xE9lectionn\xE9 quand la liste/l'arborescence est active. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur de premier plan de la liste/l'arborescence pour l'\xE9l\xE9ment s\xE9lectionn\xE9 quand la liste/l'arborescence est active. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur de premier plan de l\u2019ic\xF4ne Liste/l'arborescence pour l'\xE9l\xE9ment s\xE9lectionn\xE9 quand la liste/l'arborescence est active. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur d'arri\xE8re-plan de la liste/l'arborescence pour l'\xE9l\xE9ment s\xE9lectionn\xE9 quand la liste/l'arborescence est inactive. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur de premier plan de la liste/l'arborescence pour l'\xE9l\xE9ment s\xE9lectionn\xE9 quand la liste/l'arborescence est inactive. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur de premier plan de l\u2019ic\xF4ne Liste/l'arborescence pour l'\xE9l\xE9ment s\xE9lectionn\xE9 quand la liste/l'arborescence est inactive. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier, elle ne l'est pas quand elle est inactive.","Couleur d'arri\xE8re-plan de la liste/l'arborescence pour l'\xE9l\xE9ment ayant le focus quand la liste/l'arborescence est active. Une liste/arborescence active peut \xEAtre s\xE9lectionn\xE9e au clavier (elle ne l'est pas quand elle est inactive).","Couleur de contour de la liste/l'arborescence pour l'\xE9l\xE9ment ayant le focus quand la liste/l'arborescence est inactive. Une liste/arborescence active a le focus clavier, contrairement \xE0 une liste/arborescence inactive.","Arri\xE8re-plan de la liste/l'arborescence pendant le pointage sur des \xE9l\xE9ments avec la souris.","Premier plan de la liste/l'arborescence pendant le pointage sur des \xE9l\xE9ments avec la souris.","Arri\xE8re-plan de l'op\xE9ration de glisser-d\xE9placer dans une liste/arborescence pendant le d\xE9placement d'\xE9l\xE9ments avec la souris.","Couleur de premier plan dans la liste/l'arborescence pour la surbrillance des correspondances pendant la recherche dans une liste/arborescence.","Couleur de premier plan de la liste ou l\u2019arborescence pour la surbrillance des correspondances sur les \xE9l\xE9ments ayant le focus pendant la recherche dans une liste/arborescence.","Couleur de premier plan de liste/arbre pour les \xE9l\xE9ments non valides, par exemple une racine non r\xE9solue dans l\u2019Explorateur.","Couleur de premier plan des \xE9l\xE9ments de la liste contenant des erreurs.","Couleur de premier plan des \xE9l\xE9ments de liste contenant des avertissements.","Couleur d'arri\xE8re-plan du widget de filtre de type dans les listes et les arborescences.","Couleur de contour du widget de filtre de type dans les listes et les arborescences.","Couleur de contour du widget de filtre de type dans les listes et les arborescences, en l'absence de correspondance.","Appliquez une ombre \xE0 la couleur du widget filtre de type dans les listes et les arborescences.","Couleur d'arri\xE8re-plan de la correspondance filtr\xE9e.","Couleur de bordure de la correspondance filtr\xE9e.","Couleur de trait de l'arborescence pour les rep\xE8res de mise en retrait.","Couleur de trait d\u2019arborescence pour les rep\xE8res de mise en retrait qui ne sont pas actifs.","Couleur de la bordure du tableau entre les colonnes.","Couleur d'arri\xE8re-plan pour les lignes de tableau impaires.","Couleur de premier plan de la liste/l'arborescence des \xE9l\xE9ments att\xE9nu\xE9s.","Couleur de fond du widget Case \xE0 cocher.","Couleur d\u2019arri\xE8re-plan du widget de case \xE0 cocher lorsque l\u2019\xE9l\xE9ment dans lequel il se trouve est s\xE9lectionn\xE9.","Couleur de premier plan du widget Case \xE0 cocher.","Couleur de bordure du widget Case \xE0 cocher.","Couleur de bordure du widget de case \xE0 cocher lorsque l\u2019\xE9l\xE9ment dans lequel il se trouve est s\xE9lectionn\xE9.","Utilisez quickInputList.focusBackground \xE0 la place","Couleur de premier plan du s\xE9lecteur rapide pour l\u2019\xE9l\xE9ment ayant le focus.","Couleur de premier plan de l\u2019ic\xF4ne du s\xE9lecteur rapide pour l\u2019\xE9l\xE9ment ayant le focus.","Couleur d'arri\xE8re-plan du s\xE9lecteur rapide pour l'\xE9l\xE9ment ayant le focus.","Couleur de bordure des menus.","Couleur de premier plan des \xE9l\xE9ments de menu.","Couleur d'arri\xE8re-plan des \xE9l\xE9ments de menu.","Couleur de premier plan de l'\xE9l\xE9ment de menu s\xE9lectionn\xE9 dans les menus.","Couleur d'arri\xE8re-plan de l'\xE9l\xE9ment de menu s\xE9lectionn\xE9 dans les menus.","Couleur de bordure de l'\xE9l\xE9ment de menu s\xE9lectionn\xE9 dans les menus.","Couleur d'un \xE9l\xE9ment de menu s\xE9parateur dans les menus.","Arri\xE8re-plan de la barre d\u2019outils lors du survol des actions \xE0 l\u2019aide de la souris","Contour de la barre d\u2019outils lors du survol des actions \xE0 l\u2019aide de la souris","Arri\xE8re-plan de la barre d\u2019outils quand la souris est maintenue sur des actions","Couleur d\u2019arri\xE8re-plan de mise en surbrillance d\u2019un extrait tabstop.","Couleur de bordure de mise en surbrillance d\u2019un extrait tabstop.","Couleur d\u2019arri\xE8re-plan de mise en surbrillance du tabstop final d\u2019un extrait.","Mettez en surbrillance la couleur de bordure du dernier taquet de tabulation d'un extrait de code.","Couleur des \xE9l\xE9ments de navigation avec le focus.","Couleur de fond des \xE9l\xE9ments de navigation.","Couleur des \xE9l\xE9ments de navigation avec le focus.","Couleur des \xE9l\xE9ments de navigation s\xE9lectionn\xE9s.","Couleur de fond du s\xE9lecteur d\u2019\xE9l\xE9ment de navigation.","Arri\xE8re-plan d'en-t\xEAte actuel dans les conflits de fusion inline. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Arri\xE8re-plan de contenu actuel dans les conflits de fusion inline. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Arri\xE8re-plan d'en-t\xEAte entrant dans les conflits de fusion inline. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Arri\xE8re-plan de contenu entrant dans les conflits de fusion inline. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Arri\xE8re-plan d'en-t\xEAte de l'anc\xEAtre commun dans les conflits de fusion inline. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Arri\xE8re-plan de contenu de l'anc\xEAtre commun dans les conflits de fusion inline. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de bordure des en-t\xEAtes et du s\xE9parateur dans les conflits de fusion inline.","Premier plan de la r\xE8gle d'aper\xE7u actuelle pour les conflits de fusion inline.","Premier plan de la r\xE8gle d'aper\xE7u entrante pour les conflits de fusion inline.","Arri\xE8re-plan de la r\xE8gle d'aper\xE7u de l'anc\xEAtre commun dans les conflits de fusion inline.","Couleur de marqueur de la r\xE8gle d'aper\xE7u pour rechercher les correspondances. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de marqueur de la r\xE8gle d'aper\xE7u pour la mise en surbrillance des s\xE9lections. La couleur ne doit pas \xEAtre opaque pour ne pas masquer les ornements sous-jacents.","Couleur de marqueur de la minimap pour les correspondances.","Couleur de marqueur minimap pour les s\xE9lections r\xE9p\xE9t\xE9es de l\u2019\xE9diteur.","Couleur de marqueur du minimap pour la s\xE9lection de l'\xE9diteur.","Couleur de marqueur de minimap pour les informations.","Couleur de marqueur de minimap pour les avertissements.","Couleur de marqueur de minimap pour les erreurs.","Couleur d'arri\xE8re-plan du minimap.","Opacit\xE9 des \xE9l\xE9ments de premier plan rendus dans la minimap. Par exemple, \xAB #000000c0 \xBB affiche les \xE9l\xE9ments avec une opacit\xE9 de 75 %.","Couleur d'arri\xE8re-plan du curseur de minimap.","Couleur d'arri\xE8re-plan du curseur de minimap pendant le survol.","Couleur d'arri\xE8re-plan du curseur de minimap pendant un clic.","Couleur utilis\xE9e pour l'ic\xF4ne d'erreur des probl\xE8mes.","Couleur utilis\xE9e pour l'ic\xF4ne d'avertissement des probl\xE8mes.","Couleur utilis\xE9e pour l'ic\xF4ne d'informations des probl\xE8mes.","Couleur de premier plan utilis\xE9e dans les graphiques.","Couleur utilis\xE9e pour les lignes horizontales dans les graphiques.","Couleur rouge utilis\xE9e dans les visualisations de graphiques.","Couleur bleue utilis\xE9e dans les visualisations de graphiques.","Couleur jaune utilis\xE9e dans les visualisations de graphiques.","Couleur orange utilis\xE9e dans les visualisations de graphiques.","Couleur verte utilis\xE9e dans les visualisations de graphiques.","Couleur violette utilis\xE9e dans les visualisations de graphiques."],"vs/platform/theme/common/iconRegistry":["ID de la police \xE0 utiliser. Si aucune valeur n'est d\xE9finie, la police d\xE9finie en premier est utilis\xE9e.","Caract\xE8re de police associ\xE9 \xE0 la d\xE9finition d'ic\xF4ne.","Ic\xF4ne de l'action de fermeture dans les widgets.","Ic\xF4ne d'acc\xE8s \xE0 l'emplacement pr\xE9c\xE9dent de l'\xE9diteur.","Ic\xF4ne d'acc\xE8s \xE0 l'emplacement suivant de l'\xE9diteur."],"vs/platform/undoRedo/common/undoRedoService":["Les fichiers suivants ont \xE9t\xE9 ferm\xE9s et modifi\xE9s sur le disque\xA0: {0}.","Les fichiers suivants ont \xE9t\xE9 modifi\xE9s de mani\xE8re incompatible : {0}.","Impossible d'annuler '{0}' dans tous les fichiers. {1}","Impossible d'annuler '{0}' dans tous les fichiers. {1}","Impossible d'annuler '{0}' dans tous les fichiers, car des modifications ont \xE9t\xE9 apport\xE9es \xE0 {1}","Impossible d'annuler '{0}' dans tous les fichiers, car une op\xE9ration d'annulation ou de r\xE9tablissement est d\xE9j\xE0 en cours d'ex\xE9cution sur {1}","Impossible d'annuler '{0}' dans tous les fichiers, car une op\xE9ration d'annulation ou de r\xE9tablissement s'est produite dans l'intervalle","Souhaitez-vous annuler '{0}' dans tous les fichiers\xA0?","&&Annuler dans {0} fichiers","Annuler ce &&fichier","Impossible d'annuler '{0}', car une op\xE9ration d'annulation ou de r\xE9tablissement est d\xE9j\xE0 en cours d'ex\xE9cution.","Voulez-vous annuler '{0}'\xA0?","&&Oui","Non","Impossible de r\xE9p\xE9ter '{0}' dans tous les fichiers. {1}","Impossible de r\xE9p\xE9ter '{0}' dans tous les fichiers. {1}","Impossible de r\xE9p\xE9ter '{0}' dans tous les fichiers, car des modifications ont \xE9t\xE9 apport\xE9es \xE0 {1}","Impossible de r\xE9tablir '{0}' dans tous les fichiers, car une op\xE9ration d'annulation ou de r\xE9tablissement est d\xE9j\xE0 en cours d'ex\xE9cution pour {1}","Impossible de r\xE9tablir '{0}' dans tous les fichiers, car une op\xE9ration d'annulation ou de r\xE9tablissement s'est produite dans l'intervalle","Impossible de r\xE9tablir '{0}', car une op\xE9ration d'annulation ou de r\xE9tablissement est d\xE9j\xE0 en cours d'ex\xE9cution."],"vs/platform/workspace/common/workspace":["Espace de travail de code"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.fr.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.it.js b/lib/vs/editor/editor.main.nls.it.js deleted file mode 100644 index 59ff1c5..0000000 --- a/lib/vs/editor/editor.main.nls.it.js +++ /dev/null @@ -1,29 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.it",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["input"],"vs/base/browser/ui/findinput/findInputToggles":["Maiuscole/minuscole","Parola intera","Usa espressione regolare"],"vs/base/browser/ui/findinput/replaceInput":["input","Mantieni maiuscole/minuscole"],"vs/base/browser/ui/hover/hoverWidget":["Ispezionarlo nella visualizzazione accessibile con {0}.","Ispezionarlo nella visualizzazione accessibile tramite il comando Apri visualizzazione accessibile che attualmente non \xE8 attivabile tramite il tasto di scelta rapida."],"vs/base/browser/ui/iconLabel/iconLabelHover":["Caricamento..."],"vs/base/browser/ui/inputbox/inputBox":["Errore: {0}","Avviso: {0}","Info: {0}","per la cronologia","Input cancellato"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["Non associato"],"vs/base/browser/ui/selectBox/selectBoxCustom":["Casella di selezione"],"vs/base/browser/ui/toolbar/toolbar":["Altre azioni..."],"vs/base/browser/ui/tree/abstractTree":["Filtro","Corrispondenza fuzzy","Digitare per filtrare","Digitare per la ricerca","Digitare per la ricerca","Chiudi","Non sono stati trovati elementi."],"vs/base/common/actions":["(vuoto)"],"vs/base/common/errorMessage":["{0}: {1}","Si \xE8 verificato un errore di sistema ({0})","Si \xE8 verificato un errore sconosciuto. Per altri dettagli, vedere il log.","Si \xE8 verificato un errore sconosciuto. Per altri dettagli, vedere il log.","{0} ({1} errori in totale)","Si \xE8 verificato un errore sconosciuto. Per altri dettagli, vedere il log."],"vs/base/common/keybindingLabels":["CTRL","MAIUSC","ALT","Windows","CTRL","MAIUSC","ALT","Super","CTRL","MAIUSC","Opzione","Comando","CTRL","MAIUSC","ALT","Windows","CTRL","MAIUSC","ALT","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["editor","L'editor non \xE8 accessibile in questo momento.","{0} Per abilitare la modalit\xE0 ottimizzata per l'utilit\xE0 per la lettura dello schermo usare {1}","{0} Per abilitare la modalit\xE0 ottimizzata per l'utilit\xE0 per la lettura dello schermo, aprire la selezione rapida con {1} ed eseguire il comando Attiva/Disattiva modalit\xE0 di accessibilit\xE0 dell'utilit\xE0 per la lettura dello schermo, attualmente non attivabile tramite tastiera.","{0} Assegnare un tasto di scelta rapida per il comando Attiva/Disattiva modalit\xE0 di accessibilit\xE0 dell'utilit\xE0 per la lettura dello schermo accedendo all'editor dei tasti di scelta rapida con {1} ed eseguirlo."],"vs/editor/browser/coreCommands":["Si attiene alla fine anche quando si passa a righe pi\xF9 lunghe","Si attiene alla fine anche quando si passa a righe pi\xF9 lunghe","Cursori secondari rimossi"],"vs/editor/browser/editorExtensions":["&&Annulla","Annulla azione","&&Ripeti","Ripeti","&&Seleziona tutto","Seleziona tutto"],"vs/editor/browser/widget/codeEditorWidget":["Il numero di cursori \xE8 stato limitato a {0}. Provare a usare [Trova e sostituisci](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) per modifiche di dimensioni maggiori o aumentare l'impostazione del limite di pi\xF9 cursori dell'editor.","Aumentare limite multi-cursore"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":['Icona per "Inserisci" nel visualizzatore differenze accessibile.','Icona per "Rimuovi" nel visualizzatore differenze accessibile.','Icona per "Chiudi" nel visualizzatore differenze accessibile.',"Chiudi","Visualizzatore differenze accessibile. Usare le frecce SU e GI\xD9 per spostarsi.","nessuna riga modificata","1 riga modificata","{0} righe modificate","Differenza {0} di {1}: riga originale {2}, {3}, riga modificata {4}, {5}","vuota","{0} riga non modificata {1}","{0} riga originale {1} riga modificata {2}","+ {0} riga modificata {1}","- {0} riga originale {1}"],"vs/editor/browser/widget/diffEditor/colors":["Colore del bordo per il testo spostato nell'editor diff.","Colore del bordo attivo per il testo spostato nell'editor diff."],"vs/editor/browser/widget/diffEditor/decorations":["Effetto di riga per gli inserimenti nell'editor diff.","Effetto di riga per le rimozioni nell'editor diff.","Fare clic per annullare la modifica"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["Attiva/Disattiva comprimi aree non modificate","Attiva/Disattiva mostra blocchi di codice spostati","Attiva/disattiva la visualizzazione inline quando lo spazio \xE8 limitato","Usa la visualizzazione inline quando lo spazio \xE8 limitato","Mostra blocchi di codice spostati","Editor diff","Interruttore laterale","Esci da Sposta confronto","Comprimi tutte le aree non modificate","Mostra tutte le aree non modificate","Visualizzatore differenze accessibile","Vai alla differenza successiva","Apri Visualizzatore differenze accessibile","Vai alla differenza precedente"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" utilizzare {0} per aprire la Guida all'accessibilit\xE0."],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["Ridurre area non modificata","Fai clic o trascina per visualizzare altri elementi sopra","Mostra tutto","Fai clic o trascina per visualizzare altri elementi sotto","{0} righe nascoste","Fare doppio clic per espandere"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["Copia le righe eliminate","Copia la riga eliminata","Copia righe modificate","Copia riga modificata","Copia la riga eliminata ({0})","Copia riga modificata ({0})","Ripristina questa modifica"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["Codice spostato con modifiche alla riga {0}-{1}","Codice spostato con modifiche dalla riga {0}-{1}","Codice spostato alla riga {0}-{1}","Codice spostato dalla riga {0}-{1}"],"vs/editor/common/config/editorConfigurationSchema":["Editor","Numero di spazi a cui \xE8 uguale una scheda. Questa impostazione viene sottoposta a override in base al contenuto del file quando {0} \xE8 attivo.",'Numero di spazi utilizzati per il rientro o `"tabSize"` per usare il valore di `#editor.tabSize#`. Questa impostazione viene sostituita in base al contenuto del file quando `#editor.detectIndentation#` \xE8 attivo.',"Inserire spazi quando si preme 'TAB'. Questa impostazione viene sottoposta a override in base al contenuto del file quando {0} \xE8 attivo.","Controlla se {0} e {1} verranno rilevati automaticamente quando un file viene aperto in base al contenuto del file.","Rimuovi gli spazi finali inseriti automaticamente.","Gestione speciale dei file di grandi dimensioni per disabilitare alcune funzionalit\xE0 che fanno un uso intensivo della memoria.","Controlla se calcolare i completamenti in base alle parole presenti nel documento.","Suggerisci parole solo dal documento attivo.","Suggerisci parole da tutti i documenti aperti della stessa lingua.","Suggerisci parole da tutti i documenti aperti.","Controlla i documenti da cui vengono calcolati i completamenti basati su parole.","L'evidenziazione semantica \xE8 abilitata per tutti i temi colore.","L'evidenziazione semantica \xE8 disabilitata per tutti i temi colore.","La configurazione dell'evidenziazione semantica \xE8 gestita tramite l'impostazione `semanticHighlighting` del tema colori corrente.","Controlla se l'evidenziazione semanticHighlighting \xE8 visualizzata per i linguaggi che la supportano.","Consente di mantenere aperti gli editor rapidi anche quando si fa doppio clic sul contenuto o si preme 'ESC'.","Per motivi di prestazioni le righe di lunghezza superiore non verranno tokenizzate","Controlla se la tokenizzazione deve essere eseguita in modo asincrono in un web worker.","Controlla se deve essere registrata la tokenizzazione asincrona. Solo per il debug.","Controlla se la tokenizzazione asincrona deve essere verificata rispetto alla tokenizzazione legacy in background. Potrebbe rallentare la tokenizzazione. Solo per il debug.","Definisce i simboli di parentesi quadra che aumentano o riducono il rientro.","Sequenza di stringa o carattere parentesi quadra di apertura.","Sequenza di stringa o carattere parentesi quadra di chiusura.","Definisce le coppie di bracket colorate in base al livello di annidamento se \xE8 abilitata la colorazione delle coppie di bracket.","Sequenza di stringa o carattere parentesi quadra di apertura.","Sequenza di stringa o carattere parentesi quadra di chiusura.","Timeout in millisecondi dopo il quale il calcolo delle differenze viene annullato. Usare 0 per indicare nessun timeout.","Dimensioni massime del file in MB per cui calcolare le differenze. Usare 0 per nessun limite.","Controlla se l'editor diff mostra le differenze affiancate o incorporate.","Se la larghezza dell'editor diff \xE8 inferiore a questo valore, verr\xE0 utilizzata la visualizzazione inline.","Se questa opzione \xE8 abilitata e la larghezza dell'editor \xE8 troppo piccola, verr\xE0 usata la visualizzazione inline.","Se questa opzione \xE8 abilitata, l'editor diff mostra le frecce nel margine del glifo per ripristinare le modifiche.","Se abilitato, l'editor differenze ignora le modifiche relative a spazi vuoti iniziali e finali.","Controlla se l'editor diff mostra gli indicatori +/- per le modifiche aggiunte/rimosse.","Controlla se l'editor visualizza CodeLens.","Il ritorno a capo automatico delle righe non viene mai applicato.","Il ritorno a capo automatico delle righe viene applicato in corrispondenza della larghezza del viewport.","Le righe andranno a capo in base all'impostazione {0}.","Usare l'algoritmo diffing legacy.","Usare l'algoritmo diffing avanzato.","Controlla se l'editor diff mostra aree non modificate.","Controlla il numero di righe usate per le aree non modificate.","Controlla il numero minimo di righe usate per le aree non modificate.","Controlla il numero di righe usate come contesto durante il confronto delle aree non modificate.","Controlla se l'editor diff deve mostrare gli spostamenti di codice rilevati.","Controlla se l'editor diff mostra decorazioni vuote per vedere dove sono stati inseriti o eliminati caratteri."],"vs/editor/common/config/editorOptions":["Usare le API della piattaforma per rilevare quando viene collegata un'utilit\xE0 per la lettura dello schermo","Ottimizzare l'utilizzo con un'utilit\xE0 per la lettura dello schermo","Si presuppone che un'utilit\xE0 per la lettura dello schermo non sia collegata","Controllare se l'interfaccia utente deve essere eseguito in una modalit\xE0 ottimizzata per le utilit\xE0 per la lettura dello schermo.","Consente di controllare se viene inserito uno spazio quando si aggiungono commenti.","Controlla se ignorare le righe vuote con le opzioni per attivare/disattivare, aggiungere o rimuovere relative ai commenti di riga.","Controlla se, quando si copia senza aver effettuato una selezione, viene copiata la riga corrente.","Controlla se il cursore deve passare direttamente alla ricerca delle corrispondenze durante la digitazione.","Non fornire mai la stringa di ricerca dalla selezione dell'editor.","Fornisci sempre la stringa di ricerca dalla selezione dell'editor, inclusa la parola alla posizione del cursore.","Fornisci la stringa di ricerca solo dalla selezione dell'editor.","Controlla se inizializzare la stringa di ricerca nel Widget Trova con il testo selezionato nell'editor.","Non attivare mai automaticamente la funzione Trova nella selezione (impostazione predefinita).","Attiva sempre automaticamente la funzione Trova nella selezione.","Attiva automaticamente la funzione Trova nella selezione quando sono selezionate pi\xF9 righe di contenuto.","Controlla la condizione per attivare automaticamente la funzione Trova nella selezione.","Controlla se il widget Trova deve leggere o modificare gli appunti di ricerca condivisi in macOS.","Controlla se il widget Trova deve aggiungere altre righe nella parte superiore dell'editor. Quando \xE8 true, \xE8 possibile scorrere oltre la prima riga quando il widget Trova \xE8 visibile.","Controlla se la ricerca viene riavviata automaticamente dall'inizio o dalla fine quando non \xE8 possibile trovare ulteriori corrispondenze.","Abilita/Disabilita i caratteri legatura (funzionalit\xE0 dei tipi di carattere 'calt' e 'liga'). Impostare su una stringa per un controllo pi\xF9 specifico sulla propriet\xE0 CSS 'font-feature-settings'.","Propriet\xE0 CSS 'font-feature-settings' esplicita. Se \xE8 necessario solo attivare/disattivare le legature, \xE8 possibile passare un valore booleano.","Consente di configurare i caratteri legatura o le funzionalit\xE0 dei tipi di carattere. Pu\xF2 essere un valore booleano per abilitare/disabilitare le legature o una stringa per il valore della propriet\xE0 CSS 'font-feature-settings'.","Abilita/disabilita la conversione dada font-weight a font-variation-settings. Modificare questa impostazione in una stringa per il controllo con granularit\xE0 fine della propriet\xE0 CSS Font-variation.","Propriet\xE0 CSS esplicita 'font-variation-settings'. \xC8 invece possibile passare un valore booleano se \xE8 sufficiente convertire font-weight in font-variation-settings.","Configura le varianti di carattere. Pu\xF2 essere un valore booleano per abilitare/disabilitare la conversione da font-weight a font-variation-settings o una stringa per il valore della propriet\xE0 'font-variation-settings' CSS.","Controlla le dimensioni del carattere in pixel.",'Sono consentiti solo le parole chiave "normal" e "bold" o i numeri compresi tra 1 e 1000.','Controlla lo spessore del carattere. Accetta le parole chiave "normal" e "bold" o i numeri compresi tra 1 e 1000.',"Mostra la visualizzazione in anteprima dei risultati (impostazione predefinita)","Passa al risultato principale e mostra una visualizzazione in anteprima","Passa al risultato principale e abilita l'esplorazione senza anteprima per gli altri","Questa impostazione \xE8 deprecata. In alternativa, usare impostazioni diverse, come 'editor.editor.gotoLocation.multipleDefinitions' o 'editor.editor.gotoLocation.multipleImplementations'.","Controlla il comportamento del comando 'Vai alla definizione' quando esistono pi\xF9 posizioni di destinazione.","Controlla il comportamento del comando 'Vai alla definizione di tipo' quando esistono pi\xF9 posizioni di destinazione.","Controlla il comportamento del comando 'Vai a dichiarazione' quando esistono pi\xF9 posizioni di destinazione.","Controlla il comportamento del comando 'Vai a implementazioni' quando esistono pi\xF9 posizioni di destinazione.","Controlla il comportamento del comando 'Vai a riferimenti' quando esistono pi\xF9 posizioni di destinazione.","ID comando alternativo eseguito quando il risultato di 'Vai alla definizione' \xE8 la posizione corrente.","ID comando alternativo eseguito quando il risultato di 'Vai alla definizione di tipo' \xE8 la posizione corrente.","ID comando alternativo eseguito quando il risultato di 'Vai a dichiarazione' \xE8 la posizione corrente.","ID comando alternativo eseguito quando il risultato di 'Vai a implementazione' \xE8 la posizione corrente.","ID comando alternativo eseguito quando il risultato di 'Vai a riferimento' \xE8 la posizione corrente.","Controlla se mostrare l'area sensibile al passaggio del mouse.","Controlla il ritardo in millisecondi dopo il quale viene mostrato il passaggio del mouse.","Controlla se l'area sensibile al passaggio del mouse deve rimanere visibile quando vi si passa sopra con il puntatore del mouse.","Controlla il ritardo in millisecondi dopo il quale viene nascosto il passaggio del mouse. Richiede l'abilitazione di `editor.hover.sticky`.","Preferisci la visualizzazione al passaggio del mouse sopra la riga, se c'\xE8 spazio.","Presuppone che la larghezza sia identica per tutti caratteri. Si tratta di un algoritmo veloce che funziona correttamente per i tipi di carattere a spaziatura fissa e determinati script (come i caratteri latini) in cui i glifi hanno larghezza identica.","Delega il calcolo dei punti di ritorno a capo al browser. Si tratta di un algoritmo lento che potrebbe causare blocchi con file di grandi dimensioni, ma funziona correttamente in tutti gli altri casi.","Controlla l'algoritmo che calcola i punti di wrapping. Si noti che quando \xE8 attiva la modalit\xE0 di accessibilit\xE0, la modalit\xE0 avanzata verr\xE0 usata per un'esperienza ottimale.","Abilita la lampadina delle azioni codice nell'editor.","Mostra gli ambiti correnti annidati durante lo scorrimento nella parte superiore dell'editor.","Definisce il numero massimo di righe permanenti da mostrare.","Definisce il modello da utilizzare per determinare quali linee applicare. Se il modello di struttura non esiste, verr\xE0 eseguito il fallback sul modello del provider di riduzione che rientra nel modello di rientro. Questo ordine viene rispettato in tutti e tre i casi.","Abilitare lo scorrimento del widget di scorrimento permanente con la barra di scorrimento orizzontale dell'editor.","Abilita i suggerimenti incorporati nell'Editor.","Gli hint di inlay sono abilitati","Gli hint di inlay vengono visualizzati per impostazione predefinita e vengono nascosti quando si tiene premuto {0}","Gli hint di inlay sono nascosti per impostazione predefinita e vengono visualizzati solo quando si tiene premuto {0}","Gli hint di inlay sono disabilitati","Controlla le dimensioni del carattere dei suggerimenti di inlay nell'editor. Per impostazione predefinita, {0} viene usato quando il valore configurato \xE8 minore di {1} o maggiore delle dimensioni del carattere dell'editor.","Controlla la famiglia di caratteri dei suggerimenti inlay nell'editor. Se impostato su vuoto, viene usato {0}.","Abilita il riempimento attorno ai suggerimenti incorporati nell'editor.",`Controlla l'altezza della riga. \r - - Usare 0 per calcolare automaticamente l'altezza della riga dalle dimensioni del carattere.\r - - I valori compresi tra 0 e 8 verranno usati come moltiplicatore con le dimensioni del carattere.\r - - I valori maggiori o uguali a 8 verranno usati come valori effettivi.`,"Controlla se la minimappa \xE8 visualizzata.","Controlla se la minimappa viene nascosta automaticamente.","La minimappa ha le stesse dimensioni del contenuto dell'editor (e potrebbe supportare lo scorrimento).","Se necessario, la minimappa si ridurr\xE0 o si ingrandir\xE0 in modo da adattarsi all'altezza dell'editor (nessuno scorrimento).","Se necessario, la minimappa si ridurr\xE0 in modo che la larghezza non superi mai quella dell'editor (nessuno scorrimento).","Controlla le dimensioni della minimappa.","Definisce il lato in cui eseguire il rendering della minimappa.","Controlla se il dispositivo di scorrimento della minimappa \xE8 visualizzato.","Scala del contenuto disegnato nella minimappa: 1, 2 o 3.","Esegue il rendering dei caratteri effettivi di una riga in contrapposizione ai blocchi colore.","Limita la larghezza della minimappa in modo da eseguire il rendering al massimo di un certo numero di colonne.","Controlla la quantit\xE0 di spazio tra il bordo superiore dell'editor e la prima riga.","Controlla la quantit\xE0 di spazio tra il bordo inferiore dell'editor e l'ultima riga.","Abilita un popup che mostra documentazione sui parametri e informazioni sui tipi mentre si digita.","Controlla se il menu dei suggerimenti per i parametri esegue un ciclo o si chiude quando viene raggiunta la fine dell'elenco.","I suggerimenti rapidi vengono visualizzati all'interno del widget dei suggerimenti","I suggerimenti rapidi vengono visualizzati come testo fantasma","I suggerimenti rapidi sono disabilitati","Abilita i suggerimenti rapidi all'interno di stringhe.","Abilita i suggerimenti rapidi all'interno di commenti.","Abilita i suggerimenti rapidi all'esterno di stringhe e commenti.","Controlla se i suggerimenti devono essere visualizzati automaticamente durante la digitazione. Pu\xF2 essere controllato per la digitazione in commenti, stringhe e altro codice. Il suggerimento rapido pu\xF2 essere configurato per essere visualizzato come testo fantasma o con il widget dei suggerimenti. Tenere anche conto dell'impostazione '{0}' che controlla se i suggerimenti vengono attivati dai caratteri speciali.","I numeri di riga non vengono visualizzati.","I numeri di riga vengono visualizzati come numeri assoluti.","I numeri di riga vengono visualizzati come distanza in linee alla posizione del cursore.","I numeri di riga vengono visualizzati ogni 10 righe.","Controlla la visualizzazione dei numeri di riga.","Numero di caratteri a spaziatura fissa in corrispondenza del quale verr\xE0 eseguito il rendering di questo righello dell'editor.","Colore di questo righello dell'editor.","Esegue il rendering dei righelli verticali dopo un certo numero di caratteri a spaziatura fissa. Usare pi\xF9 valori per pi\xF9 righelli. Se la matrice \xE8 vuota, non viene disegnato alcun righello.","La barra di scorrimento verticale sar\xE0 visibile solo quando necessario.","La barra di scorrimento verticale sar\xE0 sempre visibile.","La barra di scorrimento verticale sar\xE0 sempre nascosta.","Controlla la visibilit\xE0 della barra di scorrimento verticale.","La barra di scorrimento orizzontale sar\xE0 visibile solo quando necessario.","La barra di scorrimento orizzontale sar\xE0 sempre visibile.","La barra di scorrimento orizzontale sar\xE0 sempre nascosta.","Controlla la visibilit\xE0 della barra di scorrimento orizzontale.","Larghezza della barra di scorrimento verticale.","Altezza della barra di scorrimento orizzontale.","Controlla se i clic consentono di attivare lo scorrimento per pagina o di passare direttamente alla posizione di clic.","Controlla se tutti i caratteri ASCII non di base sono evidenziati. Solo i caratteri compresi tra U+0020 e U+007E, tabulazione, avanzamento riga e ritorno a capo sono considerati ASCII di base.","Controlla se i caratteri che riservano spazio o non hanno larghezza sono evidenziati.","Controlla se i caratteri che possono essere confusi con i caratteri ASCII di base sono evidenziati, ad eccezione di quelli comuni nelle impostazioni locali dell'utente corrente.","Controlla se anche i caratteri nei commenti devono essere soggetti a evidenziazione Unicode.","Controlla se anche i caratteri nelle stringhe devono essere soggetti all'evidenziazione Unicode.","Definisce i caratteri consentiti che non vengono evidenziati.","I caratteri Unicode comuni nelle impostazioni locali consentite non vengono evidenziati.","Controlla se visualizzare automaticamente i suggerimenti inline nell'Editor.","Mostra la barra degli strumenti dei suggerimenti in linea ogni volta che viene visualizzato un suggerimento in linea.","Mostra la barra degli strumenti dei suggerimenti in linea quando al passaggio del mouse su un suggerimento in linea.","Controlla quando mostrare la barra dei suggerimenti in linea.","Controlla la modalit\xE0 di interazione dei suggerimenti inline con il widget dei suggerimenti. Se questa opzione \xE8 abilitata, il widget dei suggerimenti non viene visualizzato automaticamente quando sono disponibili suggerimenti inline.","Controlla se la colorazione delle coppie di parentesi \xE8 abilitata. Usare {0} per eseguire l'override dei colori di evidenziazione delle parentesi.","Controlla se ogni tipo di parentesi ha un pool di colori indipendente.","Abilita le guide per coppie di parentesi quadre.","Abilita le guide delle coppie di parentesi solo per la coppia di parentesi attive.","Disabilita le guide per coppie di parentesi quadre.","Controlla se le guide delle coppie di parentesi sono abilitate o meno.","Abilita le guide orizzontali come aggiunta alle guide per coppie di parentesi verticali.","Abilita le guide orizzontali solo per la coppia di parentesi attive.","Disabilita le guide per coppie di parentesi orizzontali.","Controlla se le guide orizzontali delle coppie di parentesi sono abilitate o meno.","Controlla se l'editor debba evidenziare la coppia di parentesi attive.","Controlla se l'editor deve eseguire il rendering delle guide con rientro.","Evidenzia la guida di rientro attiva.","Evidenzia la guida di rientro attiva anche se le guide delle parentesi quadre sono evidenziate.","Non evidenziare la guida di rientro attiva.","Controlla se l'editor deve evidenziare la guida con rientro attiva.","Inserisce il suggerimento senza sovrascrivere il testo a destra del cursore.","Inserisce il suggerimento e sovrascrive il testo a destra del cursore.","Controlla se le parole vengono sovrascritte quando si accettano i completamenti. Tenere presente che questa opzione dipende dalle estensioni che accettano esplicitamente questa funzionalit\xE0.","Controlla se i suggerimenti di filtro e ordinamento valgono per piccoli errori di battitura.","Controlla se l'ordinamento privilegia le parole che appaiono pi\xF9 vicine al cursore.","Controlla se condividere le selezioni dei suggerimenti memorizzati tra aree di lavoro e finestre (richiede `#editor.suggestSelection#`).","Selezionare sempre un suggerimento quando si attiva automaticamente IntelliSense.","Non selezionare mai un suggerimento quando si attiva automaticamente IntelliSense.","Selezionare un suggerimento solo quando si attiva IntelliSense da un carattere di trigger.","Selezionare un suggerimento solo quando si attiva IntelliSense durante la digitazione.","Controlla se viene selezionato un suggerimento quando viene visualizzato il widget. Si noti che questo si applica solo ai suggerimenti attivati automaticamente ('#editor.quickSuggestions#' e '#editor.suggestOnTriggerCharacters#') e che un suggerimento viene sempre selezionato quando viene richiamato in modo esplicito, ad esempio tramite 'CTRL+BARRA SPAZIATRICE'.","Controlla se un frammento attivo impedisce i suggerimenti rapidi.","Controlla se mostrare o nascondere le icone nei suggerimenti.","Controlla la visibilit\xE0 della barra di stato nella parte inferiore del widget dei suggerimenti.","Controlla se visualizzare in anteprima il risultato del suggerimento nell'Editor.","Controlla se i dettagli del suggerimento vengono visualizzati inline con l'etichetta o solo nel widget dei dettagli.","Questa impostazione \xE8 deprecata. Il widget dei suggerimenti pu\xF2 ora essere ridimensionato.","Questa impostazione \xE8 deprecata. In alternativa, usare impostazioni diverse, come 'editor.suggest.showKeywords' o 'editor.suggest.showSnippets'.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `method`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `function`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `constructor`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `deprecated`.","Quando \xE8 abilitato, il filtro IntelliSense richiede che il primo carattere corrisponda all'inizio di una parola, ad esempio 'c' per 'Console' o 'WebContext' ma _non_ per 'description'. Quando \xE8 disabilitato, IntelliSense mostra pi\xF9 risultati, ma li ordina comunque in base alla qualit\xE0 della corrispondenza.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `field`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `variable`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `class`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `struct`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `interface`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `module`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `property`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `event`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `operator`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `unit`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `value`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `constant`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `enum`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `enumMember`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `keyword`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `text`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `color`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `file`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `reference`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `customcolor`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `folder`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `typeParameter`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `snippet`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `user`.","Se \xE8 abilitata, IntelliSense mostra i suggerimenti relativi a `issues`.","Indica se gli spazi vuoti iniziali e finali devono essere sempre selezionati.","Indica se \xE8 necessario selezionare le sottoparole ( come 'foo' in 'fooBar' o 'foo_bar').","Nessun rientro. Le righe con ritorno a capo iniziano dalla colonna 1. ","Le righe con ritorno a capo hanno lo stesso rientro della riga padre.","Le righe con ritorno a capo hanno un rientro di +1 rispetto alla riga padre.","Le righe con ritorno a capo hanno un rientro di +2 rispetto alla riga padre.","Controlla il rientro delle righe con ritorno a capo.","Controlla se \xE8 possibile trascinare un file in un editor di testo tenendo premuto MAIUSC (invece di aprire il file in un editor).","Controlla se viene visualizzato un widget quando si rilasciano file nell'editor. Questo widget consente di controllare la modalit\xE0 di rilascio del file.","Mostra il widget del selettore di rilascio dopo il rilascio di un file nell'editor.","Non visualizzare mai il widget del selettore di rilascio. Usare sempre il provider di rilascio predefinito.","Controlla se \xE8 possibile incollare il contenuto in modi diversi.","Controlla se viene visualizzato un widget quando si incolla il contenuto nell'editor. Questo widget consente di controllare il modo in cui il file viene incollato.","Mostra il widget del selettore dell'operazione Incolla dopo che il contenuto \xE8 stato incollato nell'editor.","Non visualizzare mai il widget del selettore dell'operazione Incolla. Usare sempre il comportamento dell'operazione Incolla predefinito.","Controlla se accettare i suggerimenti con i caratteri di commit. Ad esempio, in JavaScript il punto e virgola (';') pu\xF2 essere un carattere di commit che accetta un suggerimento e digita tale carattere.","Accetta un suggerimento con 'Invio' solo quando si apporta una modifica al testo.","Controlla se i suggerimenti devono essere accettati con 'INVIO' in aggiunta a 'TAB'. In questo modo \xE8 possibile evitare ambiguit\xE0 tra l'inserimento di nuove righe e l'accettazione di suggerimenti.","Controlla il numero di righe nell'Editor che possono essere lette alla volta da un utilit\xE0 per la lettura dello schermo. Quando viene rilevata un'utilit\xE0 per la lettura dello schermo, questo valore viene impostato su 500 per impostazione predefinita. Avviso: questa opzione pu\xF2 influire sulle prestazioni se il numero di righe \xE8 superiore a quello predefinito.","Contenuto editor","Controllare se i suggerimenti inline vengono annunciati da un'utilit\xE0 per la lettura dello schermo.","Usa le configurazioni del linguaggio per determinare la chiusura automatica delle parentesi.","Chiudi automaticamente le parentesi solo quando il cursore si trova alla sinistra di uno spazio vuoto.","Controlla se l'editor deve chiudere automaticamente le parentesi quadre dopo che sono state aperte.","Usare le configurazioni del linguaggio per determinare la chiusura automatica dei commenti.","Chiudere automaticamente i commenti solo quando il cursore si trova alla sinistra di uno spazio vuoto.","Controlla se l'editor deve chiudere automaticamente i commenti dopo che sono stati aperti.","Rimuove le virgolette o le parentesi quadre di chiusura adiacenti solo se sono state inserite automaticamente.","Controlla se l'editor deve rimuovere le virgolette o le parentesi quadre di chiusura adiacenti durante l'eliminazione.","Digita sopra le virgolette o le parentesi quadre di chiusura solo se sono state inserite automaticamente.","Controlla se l'editor deve digitare su virgolette o parentesi quadre.","Usa le configurazioni del linguaggio per determinare la chiusura automatica delle virgolette.","Chiudi automaticamente le virgolette solo quando il cursore si trova alla sinistra di uno spazio vuoto.","Controlla se l'editor deve chiudere automaticamente le citazioni dopo che sono state aperte.","L'editor non inserir\xE0 automaticamente il rientro.","L'editor manterr\xE0 il rientro della riga corrente.","L'editor manterr\xE0 il rientro della riga corrente e rispetter\xE0 le parentesi definite dalla lingua.","L'editor manterr\xE0 il rientro della riga corrente, rispetter\xE0 le parentesi definite dalla lingua e richiamer\xE0 le regole onEnterRules speciali definite dalle lingue.","L'editor manterr\xE0 il rientro della riga corrente, rispetter\xE0 le parentesi definite dalla lingua, richiamer\xE0 le regole onEnterRules speciali definite dalle lingue e rispetter\xE0 le regole indentationRules definite dalle lingue.","Controlla se l'editor deve regolare automaticamente il rientro quando gli utenti digitano, incollano, spostano le righe o applicano il rientro.","Usa le configurazioni del linguaggio per determinare quando racchiudere automaticamente le selezioni tra parentesi quadre o virgolette.","Racchiude la selezione tra virgolette ma non tra parentesi quadre.","Racchiude la selezione tra parentesi quadre ma non tra virgolette.","Controlla se l'editor deve racchiudere automaticamente le selezioni quando si digitano virgolette o parentesi quadre.","Emula il comportamento di selezione dei caratteri di tabulazione quando si usano gli spazi per il rientro. La selezione verr\xE0 applicata alle tabulazioni.","Controlla se l'editor visualizza CodeLens.","Controlla la famiglia di caratteri per CodeLens.","Controlla le dimensioni del carattere in pixel per CodeLens. Quando \xE8 impostata su 0, viene usato il 90% del valore di '#editor.fontSize#'.","Controlla se l'editor deve eseguire il rendering della selezione colori e degli elementi Decorator di tipo colore inline.","Fare in modo che la selezione colori venga visualizzata sia al clic che al passaggio del mouse sull\u2019elemento Decorator colore","Fare in modo che la selezione colori venga visualizzata al passaggio del mouse sull'elemento Decorator colore","Fare in modo che la selezione colori venga visualizzata quando si fa clic sull'elemento Decorator colore","Controlla la condizione in modo che venga visualizzata la selezione colori da un elemento Decorator colore.","Controlla il numero massimo di elementi Decorator a colori di cui \xE8 possibile eseguire il rendering in un editor contemporaneamente.","Abilita l'uso di mouse e tasti per la selezione delle colonne.","Controlla se l'evidenziazione della sintassi deve essere copiata negli Appunti.","Controllo dello stile di animazione del cursore.","L'animazione con cursore arrotondato \xE8 disabilitata.","L'animazione con cursore uniforme \xE8 abilitata solo quando l'utente sposta il cursore con un movimento esplicito.","L'animazione con cursore uniforme \xE8 sempre abilitata.","Controlla se l'animazione del cursore con anti-aliasing deve essere abilitata.","Controlla lo stile del cursore.","Controllare il numero minimo di linee iniziali visibili (minimo 0) e finali (minimo 1) visibili che circondano il cursore. Noto come 'scrollOff' o 'scrollOffset' in altri editor.","`cursorSurroundingLines` viene applicato solo quando \xE8 attivato tramite la tastiera o l'API.","`cursorSurroundingLines` viene sempre applicato.","Controlla quando deve essere applicato `cursorSurroundingLines`.","Controlla la larghezza del cursore quando `#editor.cursorStyle#` \xE8 impostato su `line`.","Controlla se l'editor deve consentire lo spostamento di selezioni tramite trascinamento della selezione.","Usare un nuovo metodo di rendering con svgs.","Usare un nuovo metodo di rendering con tipi di caratteri.","Usare il metodo di rendering stabile.","Controlla se viene eseguito il rendering degli spazi vuoti con un nuovo metodo sperimentale.","Moltiplicatore della velocit\xE0 di scorrimento quando si preme `Alt`.","Controlla se per l'editor \xE8 abilitata la riduzione del codice.","Usa una strategia di riduzione specifica della lingua, se disponibile; altrimenti ne usa una basata sui rientri.","Usa la strategia di riduzione basata sui rientri.","Controlla la strategia per il calcolo degli intervalli di riduzione.","Controlla se l'editor deve evidenziare gli intervalli con riduzione del codice.","Controlla se l'editor comprime automaticamente gli intervalli di importazione.","Numero massimo di aree riducibili. Se si aumenta questo valore, l'editor potrebbe diventare meno reattivo quando l'origine corrente contiene un numero elevato di aree riducibili.","Controlla se, facendo clic sul contenuto vuoto dopo una riga ridotta, la riga viene espansa.","Controlla la famiglia di caratteri.","Controlla se l'editor deve formattare automaticamente il contenuto incollato. Deve essere disponibile un formattatore che deve essere in grado di formattare un intervallo in un documento.","Controlla se l'editor deve formattare automaticamente la riga dopo la digitazione.","Controlla se l'editor deve eseguire il rendering del margine verticale del glifo. Il margine del glifo viene usato principalmente per il debug.","Controlla se il cursore deve essere nascosto nel righello delle annotazioni.","Controlla la spaziatura tra le lettere in pixel.","Controlla se la modifica collegata \xE8 abilitata per l'editor. A seconda del linguaggio, i simboli correlati, ad esempio i tag HTML, vengono aggiornati durante la modifica.","Controlla se l'editor deve individuare i collegamenti e renderli selezionabili.","Evidenzia le parentesi graffe corrispondenti.","Moltiplicatore da usare sui valori `deltaX` e `deltaY` degli eventi di scorrimento della rotellina del mouse.","Ingrandisce il carattere dell'editor quando si usa la rotellina del mouse e si tiene premuto 'CTRL'.","Unire i cursori multipli se sovrapposti.","Rappresenta il tasto 'Control' in Windows e Linux e il tasto 'Comando' in macOS.","Rappresenta il tasto 'Alt' in Windows e Linux e il tasto 'Opzione' in macOS.","Modificatore da usare per aggiungere pi\xF9 cursori con il mouse. I movimenti del mouse Vai alla definizione e Apri collegamento si adatteranno in modo da non entrare in conflitto con il [modificatore di selezione multipla](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).","Ogni cursore incolla una singola riga del testo.","Ogni cursore incolla il testo completo.","Controlla l'operazione Incolla quando il conteggio delle righe del testo incollato corrisponde al conteggio dei cursori.","Controlla il numero massimo di cursori che possono essere presenti in un editor attivo contemporaneamente.","Controlla se l'editor deve evidenziare le occorrenze di simboli semantici.","Controlla se deve essere disegnato un bordo intorno al righello delle annotazioni.","Sposta lo stato attivo sull'albero quando si apre l'anteprima","Sposta lo stato attivo sull'editor quando si apre l'anteprima","Controlla se spostare lo stato attivo sull'editor inline o sull'albero nel widget di anteprima.","Controlla se il movimento del mouse Vai alla definizione consente sempre di aprire il widget di anteprima.","Controlla il ritardo in millisecondi dopo il quale verranno visualizzati i suggerimenti rapidi.","Controlla se l'editor viene rinominato automaticamente in base al tipo.","Deprecata. In alternativa, usare `editor.linkedEditing`.","Controlla se l'editor deve eseguire il rendering dei caratteri di controllo.","Esegue il rendering dell'ultimo numero di riga quando il file termina con un carattere di nuova riga.","Mette in evidenza sia la barra di navigazione sia la riga corrente.","Controlla in che modo l'editor deve eseguire il rendering dell'evidenziazione di riga corrente.","Controlla se l'editor deve eseguire il rendering dell'evidenziazione della riga corrente solo quando l'editor ha lo stato attivo.","Esegue il rendering dei caratteri di spazio vuoto ad eccezione dei singoli spazi tra le parole.","Esegui il rendering dei caratteri di spazio vuoto solo nel testo selezionato.","Esegui il rendering solo dei caratteri di spazio vuoto finali.","Controlla in che modo l'editor deve eseguire il rendering dei caratteri di spazio vuoto.","Controlla se le selezioni devono avere gli angoli arrotondati.","Controlla il numero di caratteri aggiuntivi oltre i quali l'editor scorrer\xE0 orizzontalmente.","Controlla se l'editor scorrer\xE0 oltre l'ultima riga.","Scorre solo lungo l'asse predominante durante lo scorrimento verticale e orizzontale simultaneo. Impedisce la deviazione orizzontale quando si scorre in verticale su un trackpad.","Controlla se gli appunti primari di Linux devono essere supportati.","Controlla se l'editor deve evidenziare gli elementi corrispondenti simili alla selezione.","Mostra sempre i comandi di riduzione.","Non visualizzare mai i controlli di riduzione e diminuire le dimensioni della barra di navigazione.","Mostra i comandi di riduzione solo quando il mouse \xE8 posizionato sul margine della barra di scorrimento.","Controlla se i controlli di riduzione sul margine della barra di scorrimento vengono visualizzati.","Controllo dissolvenza del codice inutilizzato.","Controlla le variabili deprecate barrate.","Visualizza i suggerimenti del frammento prima degli altri suggerimenti.","Visualizza i suggerimenti del frammento dopo gli altri suggerimenti.","Visualizza i suggerimenti del frammento insieme agli altri suggerimenti.","Non mostrare i suggerimenti del frammento.","Controlla se i frammenti di codice sono visualizzati con altri suggerimenti e il modo in cui sono ordinati.","Controlla se per lo scorrimento dell'editor verr\xE0 usata un'animazione.","Controlla se l'hint di accessibilit\xE0 deve essere fornito agli utenti dell'utilit\xE0 per la lettura dello schermo quando viene visualizzato un completamento inline.","Dimensioni del carattere per il widget dei suggerimenti. Se impostato su {0}, viene usato il valore di {1}.","Altezza della riga per il widget dei suggerimenti. Se impostato su {0}, viene usato il valore {1}. Il valore minimo \xE8 8.","Controlla se i suggerimenti devono essere visualizzati automaticamente durante la digitazione dei caratteri trigger.","Consente di selezionare sempre il primo suggerimento.","Consente di selezionare suggerimenti recenti a meno che continuando a digitare non ne venga selezionato uno, ad esempio `console.| ->; console.log` perch\xE9 `log` \xE8 stato completato di recente.","Consente di selezionare i suggerimenti in base a prefissi precedenti che hanno completato tali suggerimenti, ad esempio `co ->; console` e `con -> const`.","Controlla la modalit\xE0 di preselezione dei suggerimenti durante la visualizzazione dell'elenco dei suggerimenti.","La funzionalit\xE0 di completamento con tasto TAB inserir\xE0 il migliore suggerimento alla pressione del tasto TAB.","Disabilita le funzionalit\xE0 di completamento con tasto TAB.","Completa i frammenti con il tasto TAB quando i rispettivi prefissi corrispondono. Funziona in modo ottimale quando 'quickSuggestions' non \xE8 abilitato.","Abilit\xE0 la funzionalit\xE0 di completamento con tasto TAB.","I caratteri di terminazione di riga insoliti vengono rimossi automaticamente.","I caratteri di terminazione di riga insoliti vengono ignorati.","Prompt per i caratteri di terminazione di riga insoliti da rimuovere.","Rimuovi caratteri di terminazione di riga insoliti che potrebbero causare problemi.","Inserimento ed eliminazione dello spazio vuoto dopo le tabulazioni.","Usare la regola di interruzione di riga predefinita.","Le interruzioni di parola non devono essere usate per il testo cinese/giapponese/coreano (CJK). Il comportamento del testo non CJK \xE8 uguale a quello normale.","Controlla le regole di interruzione delle parole usate per il testo cinese/giapponese/coreano (CJK).","Caratteri che verranno usati come separatori di parola quando si eseguono operazioni o spostamenti correlati a parole.","Il ritorno a capo automatico delle righe non viene mai applicato.","Il ritorno a capo automatico delle righe viene applicato in corrispondenza della larghezza del viewport.","Il ritorno a capo automatico delle righe viene applicato in corrispondenza di `#editor.wordWrapColumn#`.","Il ritorno a capo automatico delle righe viene applicato in corrispondenza della larghezza minima del viewport e di `#editor.wordWrapColumn#`.","Controlla il ritorno a capo automatico delle righe.","Controlla la colonna per il ritorno a capo automatico dell'editor quando il valore di `#editor.wordWrap#` \xE8 `wordWrapColumn` o `bounded`.","Controllare se visualizzare le decorazioni colori incorporate usando il provider colori predefinito del documento","Controlla se l'editor riceve le schede o le rinvia al workbench per lo spostamento."],"vs/editor/common/core/editorColorRegistry":["Colore di sfondo per l'evidenziazione della riga alla posizione del cursore.","Colore di sfondo per il bordo intorno alla riga alla posizione del cursore.","Colore di sfondo degli intervalli evidenziati, ad esempio dalle funzionalit\xE0 Quick Open e Trova. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo del bordo intorno agli intervalli selezionati.","Colore di sfondo del simbolo evidenziato, ad esempio per passare alla definizione o al simbolo successivo/precedente. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo del bordo intorno ai simboli selezionati.","Colore del cursore dell'editor.","Colore di sfondo del cursore editor. Permette di personalizzare il colore di un carattere quando sovrapposto da un blocco cursore.","Colore dei caratteri di spazio vuoto nell'editor.","Colore dei numeri di riga dell'editor.","Colore delle guide per i rientri dell'editor.","'editorIndentGuide.background' \xE8 deprecato. Usare 'editorIndentGuide.background1'.","Colore delle guide di indentazione dell'editor attivo","'editorIndentGuide.activeBackground' \xE8 deprecato. Usare 'editorIndentGuide.activeBackground1'.","Colore delle guide per i rientri dell'editor (1).","Colore delle guide per i rientri dell'editor (2).","Colore delle guide per i rientri dell'editor (3).","Colore delle guide per i rientri dell'editor (4).","Colore delle guide per i rientri dell'editor (5).","Colore delle guide per i rientri dell'editor (6).","Colore delle guide di indentazione dell'editor attivo (1).","Colore delle guide di indentazione dell'editor attivo (2).","Colore delle guide di indentazione dell'editor attivo (3).","Colore delle guide di indentazione dell'editor attivo (4).","Colore delle guide di indentazione dell'editor attivo (5).","Colore delle guide di indentazione dell'editor attivo (6).","Colore del numero di riga attivo dell'editor","Id \xE8 deprecato. In alternativa usare 'editorLineNumber.activeForeground'.","Colore del numero di riga attivo dell'editor","Colore della riga dell'editor finale quando editor.renderFinalNewline \xE8 impostato su in grigio.","Colore dei righelli dell'editor.","Colore primo piano delle finestre di CodeLens dell'editor","Colore di sfondo delle parentesi corrispondenti","Colore delle caselle di parentesi corrispondenti","Colore del bordo del righello delle annotazioni.","Colore di sfondo del righello delle annotazioni dell'editor.","Colore di sfondo della barra di navigazione dell'editor. La barra contiene i margini di glifo e i numeri di riga.","Colore del bordo del codice sorgente non necessario (non usato) nell'editor.",`Opacit\xE0 del codice sorgente non necessario (non usato) nell'editor. Ad esempio, con "#000000c0" il rendering del codice verr\xE0 eseguito con il 75% di opacit\xE0. Per i temi a contrasto elevato, usare il colore del tema 'editorUnnecessaryCode.border' per sottolineare il codice non necessario invece di opacizzarlo.`,"Colore del bordo del testo fantasma nell'Editor.","Colore primo piano del testo fantasma nell'Editor.","Colore di sfondo del testo fantasma nell'editor.","Colore del marcatore del righello delle annotazioni per le evidenziazioni degli intervalli. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del marcatore del righello delle annotazioni per gli errori.","Colore del marcatore del righello delle annotazioni per gli avvisi.","Colore del marcatore del righello delle annotazioni per i messaggi di tipo informativo.","Colore primo piano delle parentesi quadre (1). Richiede l'abilitazione della colorazione delle coppie di parentesi quadre.","Colore primo piano delle parentesi quadre (2). Richiede l'abilitazione della colorazione delle coppie di parentesi quadre.","Colore primo piano delle parentesi quadre (3). Richiede l'abilitazione della colorazione delle coppie di parentesi quadre.","Colore primo piano delle parentesi quadre (4). Richiede l'abilitazione della colorazione delle coppie di parentesi quadre.","Colore primo piano delle parentesi quadre (5). Richiede l'abilitazione della colorazione delle coppie di parentesi quadre.","Colore primo piano delle parentesi quadre (6). Richiede l'abilitazione della colorazione delle coppie di parentesi quadre.","Colore di primo piano delle parentesi impreviste.","Colore di sfondo delle guide per coppie di parentesi inattive (1). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi inattive (2). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi inattive (3). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi inattive (4). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi inattive (5). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi inattive (6). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi attive (1). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi attive (2). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi attive (3). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi attive (4). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi attive (5). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore di sfondo delle guide per coppie di parentesi attive (6). Richiede l'abilitazione delle guide per coppie di parentesi.","Colore del bordo utilizzato per evidenziare i caratteri Unicode.","Colore di sfondo usato per evidenziare i caratteri Unicode."],"vs/editor/common/editorContextKeys":["Indica se il testo dell'editor ha lo stato attivo (il cursore lampeggia)","Indica se l'editor o un widget dell'editor ha lo stato attivo (ad esempio, lo stato attivo si trova nel widget di ricerca)","Indica se un editor o un input RTF ha lo stato attivo (il cursore lampeggia)","Indica se l'editor \xE8 di sola lettura","Indica se il contesto \xE8 un editor diff","Indica se il contesto \xE8 un editor diff incorporato","Indica se un blocco di codice spostato \xE8 selezionato per il confronto","Indica se il visualizzatore differenze accessibile \xE8 visibile","Indica se viene raggiunto il punto di interruzione inline side-by-side per il rendering dell'editor diff","Indica se `editor.columnSelection` \xE8 abilitato","Indica se per l'editor esiste testo selezionato","Indica se per l'editor esistono pi\xF9 selezioni","Indica se premendo `TAB`, lo stato attivo verr\xE0 spostato all'esterno dell'editor","Indica se il passaggio del puntatore nell'editor \xE8 visibile","Indica se l'area sensibile al passaggio del mouse dell'edito \xE8 attivata","Indica se lo scorrimento permanente \xE8 attivo","Indica se lo scorrimento permanente \xE8 visibile","Indicare se la selezione colori autonoma \xE8 visibile","Indicare se la selezione colori autonoma \xE8 evidenziata","Indica se l'editor fa parte di un editor pi\xF9 esteso (ad esempio notebook)","Identificatore lingua dell'editor","Indica se per l'editor esiste un provider di voci di completamento","Indica se per l'editor esiste un provider di azioni codice","Indica se per l'editor esiste un provider di CodeLens","Indica se per l'editor esiste un provider di definizioni","Indica se per l'editor esiste un provider di dichiarazioni","Indica se per l'editor esiste un provider di implementazioni","Indica se per l'editor esiste un provider di definizioni di tipo","Indica se per l'editor esiste un provider di passaggi del mouse","Indica se per l'editor esiste un provider di evidenziazione documenti","Indica se per l'editor esiste un provider di simboli di documenti","Indica se per l'editor esiste un provider di riferimenti","Indica se per l'editor esiste un provider di ridenominazione","Indica se per l'editor esiste un provider della guida per la firma","Indica se per l'editor esiste un provider di suggerimenti inline","Indica se per l'editor esiste un provider di formattazione documenti","Indica se per l'editor esiste un provider di formattazione di selezioni documento","Indica se per l'editor esistono pi\xF9 provider di formattazione documenti","Indica se per l'editor esistono pi\xF9 provider di formattazione di selezioni documento"],"vs/editor/common/languages":["matrice","valore booleano","classe","costante","costruttore","enumerazione","membro di enumerazione","evento","campo","file","funzione","interfaccia","chiave","metodo","modulo","spazio dei nomi","Null","numero","oggetto","operatore","pacchetto","propriet\xE0","stringa","struct","parametro di tipo","variabile","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["Testo normale"],"vs/editor/common/model/editStack":["Digitazione"],"vs/editor/common/standaloneStrings":["Sviluppatore: Controlla token","Vai a Riga/Colonna...","Mostra tutti i provider di accesso rapido","Riquadro comandi","Mostra ed esegui comandi","Vai al simbolo...","Vai al simbolo per categoria...","Contenuto editor","Premere ALT+F1 per le opzioni di accessibilit\xE0.","Attiva/disattiva tema a contrasto elevato","Effettuate {0} modifiche in {1} file"],"vs/editor/common/viewLayout/viewLineRenderer":["Mostra di pi\xF9 ({0})","{0} caratteri"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["Ancoraggio della selezione","Ancoraggio impostato alla posizione {0}:{1}","Imposta ancoraggio della selezione","Vai ad ancoraggio della selezione","Seleziona da ancoraggio a cursore","Annulla ancoraggio della selezione"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["Colore del marcatore del righello delle annotazioni per la corrispondenza delle parentesi.","Vai alla parentesi quadra","Seleziona fino alla parentesi","Rimuovi parentesi quadre","Vai alla parentesi &&quadra"],"vs/editor/contrib/caretOperations/browser/caretOperations":["Sposta testo selezionato a sinistra","Sposta testo selezionato a destra"],"vs/editor/contrib/caretOperations/browser/transpose":["Trasponi lettere"],"vs/editor/contrib/clipboard/browser/clipboard":["&&Taglia","Taglia","Taglia","Taglia","&&Copia","Copia","Copia","Copia","Copia con nome","Copia con nome","Condividi","Condividi","Condividi","&&Incolla","Incolla","Incolla","Incolla","Copia con evidenziazione sintassi"],"vs/editor/contrib/codeAction/browser/codeAction":["Si \xE8 verificato un errore sconosciuto durante l'applicazione dell'azione del codice"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["Tipo dell'azione codice da eseguire.","Controlla quando vengono applicate le azioni restituite.","Applica sempre la prima azione codice restituita.","Applica la prima azione codice restituita se \xE8 l'unica.","Non applicare le azioni codice restituite.","Controlla se devono essere restituite solo le azioni codice preferite.","Correzione rapida...","Azioni codice non disponibili","Non sono disponibili azioni codice preferite per '{0}'","Non sono disponibili azioni codice per '{0}'","Non sono disponibili azioni codice preferite","Azioni codice non disponibili","Effettua refactoring...","Non sono disponibili refactoring preferiti per '{0}'","Non sono disponibili refactoring per '{0}'","Non sono disponibili refactoring preferiti","Refactoring non disponibili","Azione origine...","Non sono disponibili azioni origine preferite per '{0}'","Non sono disponibili azioni origine per '{0}'","Non sono disponibili azioni origine preferite","Azioni origine non disponibili","Organizza import","Azioni di organizzazione Imports non disponibili","Correggi tutto","Non \xE8 disponibile alcuna azione Correggi tutto","Correzione automatica...","Non sono disponibili correzioni automatiche"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["Abilita/disabilita la visualizzazione delle intestazioni gruppo nel menu Azione codice.","Abilita/disabilita la visualizzazione del quickfix pi\xF9 vicino all'interno di una riga quando non \xE8 attualmente in una diagnostica."],"vs/editor/contrib/codeAction/browser/codeActionController":["Contesto: {0} alla riga {1} e alla colonna {2}.","Nascondi elementi disabilitati","Mostra elementi disabilitati"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["Altre azioni...","Correzione rapida","Estrai","Inline","Riscrivi","Sposta","Racchiudi tra","Azione di origine"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["Mostra azioni codice. Correzione rapida preferita disponibile ({0})","Mostra Azioni codice ({0})","Mostra Azioni codice"],"vs/editor/contrib/codelens/browser/codelensController":["Mostra comandi di CodeLens per la riga corrente","Selezionare un comando"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["Fare clic per attivare/disattivare le opzioni di colore (rgb/hsl/hex)","Icona per chiudere la selezione colori"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["Mostra o sposta lo stato attivo su Selezione colori autonomo","&&Mostra o sposta lo stato attivo su Selezione colori autonomo","Nascondere la Selezione colori","Inserire colore con Selezione colori autonomo"],"vs/editor/contrib/comment/browser/comment":["Attiva/disattiva commento per la riga","Attiva/Disattiva commento per la &&riga","Aggiungi commento per la riga","Rimuovi commento per la riga","Attiva/Disattiva commento per il blocco","Attiva/Disattiva commento per il &&blocco"],"vs/editor/contrib/contextmenu/browser/contextmenu":["Minimappa","Esegui rendering dei caratteri","Dimensioni verticali","Proporzionale","Riempimento","Adatta","Dispositivo di scorrimento","Passaggio del mouse","Sempre","Mostra il menu di scelta rapida editor"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["Cursore - Annulla","Cursore - Ripeti"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["Incolla come...","ID della modifica dell'operazione Incolla da provare ad applicare. Se non viene specificato, l'editor mostrer\xE0 un controllo di selezione."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["Indica se il widget dell'operazione Incolla viene visualizzato","Mostra opzioni operazione Incolla...","Esecuzione dei gestori del comando Incolla. Fare clic per annullare","Seleziona azione Incolla","Esecuzione dei gestori Incolla in corso"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["Predefinita","Inserire testo normale","Inserire l'URL","Inserire l'Uri","Inserire percorsi","Inserire percorso","Inserire percorsi relativi","Inserire percorso relativo"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["Configura il provider di eliminazione predefinito da usare per il contenuto di un tipo MIME specifico."],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["Indica se il widget di rilascio viene visualizzato","Mostra opzioni di rilascio...","Esecuzione dei gestori di rilascio. Fare clic per annullare"],"vs/editor/contrib/editorState/browser/keybindingCancellation":["Indica se l'editor esegue un'operazione annullabile, ad esempio 'Anteprima riferimenti'"],"vs/editor/contrib/find/browser/findController":["Il file \xE8 troppo grande per eseguire un'operazione di sostituzione.","Trova","&&Trova",`Esegue l'override del contrassegno "Usa espressione regolare".\r -Il contrassegno non verr\xE0 salvato per il futuro.\r -0: Non eseguire alcuna operazione\r -1: Vero\r -2: Falso`,`Esegue l'override del contrassegno "Corrispondenza parola intera".\r -Il contrassegno non verr\xE0 salvato per il futuro.\r -0: Non eseguire alcuna operazione\r -1: Vero\r -2: Falso`,`Esegue l'override del contrassegno "Fai corrispondere maiuscole/minuscole".\r -Il contrassegno non verr\xE0 salvato per il futuro.\r -0: Non eseguire alcuna operazione\r -1: Vero\r -2: Falso`,`Esegue l'override del contrassegno "Mantieni maiuscole/minuscole".\r -Il contrassegno non verr\xE0 salvato per il futuro.\r -0: Non eseguire alcuna operazione\r -1: Vero\r -2: Falso`,"Trova con gli argomenti","Trova con selezione","Trova successivo","Trova precedente","Andare a Corrispondenza...","Nessuna corrispondenza. Provare a cercare qualcos'altro.","Digitare un numero per passare a una corrispondenza specifica (tra 1 e {0})","Digitare un numero compreso tra 1 e {0}","Digitare un numero compreso tra 1 e {0}","Trova selezione successiva","Trova selezione precedente","Sostituisci","&&Sostituisci"],"vs/editor/contrib/find/browser/findWidget":["Icona per 'Trova nella selezione' nel widget di ricerca dell'editor.","Icona per indicare che il widget di ricerca dell'editor \xE8 compresso.","Icona per indicare che il widget di ricerca dell'editor \xE8 espanso.","Icona per 'Sostituisci' nel widget di ricerca dell'editor.","Icona per 'Sostituisci tutto' nel widget di ricerca dell'editor.","Icona per 'Trova precedente' nel widget di ricerca dell'editor.","Icona per 'Trova successivo' nel widget di ricerca dell'editor.","Trova/Sostituisci","Trova","Trova","Risultato precedente","Risultato successivo","Trova nella selezione","Chiudi","Sostituisci","Sostituisci","Sostituisci","Sostituisci tutto","Attiva/Disattiva sostituzione","Solo i primi {0} risultati vengono evidenziati, ma tutte le operazioni di ricerca funzionano su tutto il testo.","{0} di {1}","Nessun risultato","{0} trovato","{0} trovati per '{1}'","{0} trovati per '{1}' alla posizione {2}","{0} trovati per '{1}'","Il tasto di scelta rapida CTRL+INVIO ora consente di inserire l'interruzione di linea invece di sostituire tutto. Per eseguire l'override di questo comportamento, \xE8 possibile modificare il tasto di scelta rapida per editor.action.replaceAll."],"vs/editor/contrib/folding/browser/folding":["Espandi","Espandi in modo ricorsivo","Riduci","Attiva/Disattiva riduzione","Riduci in modo ricorsivo","Riduci tutti i blocchi commento","Riduci tutte le regioni","Espandi tutte le regioni","Riduci tutto tranne selezionato","Espandi tutto tranne selezionato","Riduci tutto","Espandi tutto","Vai alla cartella principale","Passa all'intervallo di riduzione precedente","Passa all'intervallo di riduzione successivo","Creare intervallo di riduzione dalla selezione","Rimuovi intervalli di riduzione manuale","Livello riduzione {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["Colore di sfondo degli intervalli con riduzione. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del controllo di riduzione nella barra di navigazione dell'editor.","Icona per gli intervalli espansi nel margine del glifo dell'editor.","Icona per gli intervalli compressi nel margine del glifo dell'editor.","Icona per gli intervalli compressi nel margine del glifo dell'editor.","Icona per gli intervalli espansi manualmente nel margine del glifo dell'editor."],"vs/editor/contrib/fontZoom/browser/fontZoom":["Zoom avanti tipo di carattere editor","Zoom indietro tipo di carattere editor","Reimpostazione zoom tipo di carattere editor"],"vs/editor/contrib/format/browser/format":["\xC8 stata apportata 1 modifica di formattazione a riga {0}","Sono state apportate {0} modifiche di formattazione a riga {1}","\xC8 stata apportata 1 modifica di formattazione tra le righe {0} e {1}","Sono state apportate {0} modifiche di formattazione tra le righe {1} e {2}"],"vs/editor/contrib/format/browser/formatActions":["Formatta documento","Formatta selezione"],"vs/editor/contrib/gotoError/browser/gotoError":["Vai al problema successivo (Errore, Avviso, Informazioni)","Icona per il marcatore Vai a successivo.","Vai al problema precedente (Errore, Avviso, Informazioni)","Icona per il marcatore Vai a precedente.","Vai al problema successivo nei file (Errore, Avviso, Informazioni)","&&Problema successivo","Vai al problema precedente nei file (Errore, Avviso, Informazioni)","&&Problema precedente"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["Errore","Avviso","Info","Suggerimento","{0} a {1}. ","{0} di {1} problemi","{0} di {1} problema","Colore per gli errori del widget di spostamento tra marcatori dell'editor.","Intestazione errore per lo sfondo del widget di spostamento tra marcatori dell'editor.","Colore per gli avvisi del widget di spostamento tra marcatori dell'editor.","Intestazione avviso per lo sfondo del widget di spostamento tra marcatori dell'editor.","Colore delle informazioni del widget di navigazione marcatori dell'editor.","Intestazione informativa per lo sfondo del widget di spostamento tra marcatori dell'editor.","Sfondo del widget di spostamento tra marcatori dell'editor."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["Anteprima","Definizioni","Non \xE8 stata trovata alcuna definizione per '{0}'","Non \xE8 stata trovata alcuna definizione","Vai alla definizione","Vai alla &&definizione","Apri definizione lateralmente","Visualizza in anteprima la definizione","Dichiarazioni","Non \xE8 stata trovata alcuna dichiarazione per '{0}'","Dichiarazione non trovata","Vai a dichiarazione","Vai a &&dichiarazione","Non \xE8 stata trovata alcuna dichiarazione per '{0}'","Dichiarazione non trovata","Anteprima dichiarazione","Definizioni di tipo","Non sono state trovate definizioni di tipi per '{0}'","Non sono state trovate definizioni di tipi","Vai alla definizione di tipo","Vai alla &&definizione di tipo","Anteprima definizione di tipo","Implementazioni","Non sono state trovate implementazioni per '{0}'","Non sono state trovate implementazioni","Vai a implementazioni","Vai a &&Implementazioni","Visualizza implementazioni","Non sono stati trovati riferimenti per '{0}'","Non sono stati trovati riferimenti","Vai a Riferimenti","Vai a &&riferimenti","Riferimenti","Anteprima riferimenti","Riferimenti","Vai a qualsiasi simbolo","Posizioni","Nessun risultato per '{0}'","Riferimenti"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["Fare clic per visualizzare {0} definizioni."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["Indica se l'anteprima riferimenti \xE8 visibile, come 'Visualizza in anteprima riferimenti' o 'Visualizza in anteprima la definizione'","Caricamento...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} riferimenti","{0} riferimento","Riferimenti"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["anteprima non disponibile","Nessun risultato","Riferimenti"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["in {0} alla riga {1} della colonna {2}","{0} in {1} alla riga {2} della colonna {3}","1 simbolo in {0}, percorso completo {1}","{0} simboli in {1}, percorso completo {2}","Non sono stati trovati risultati","Trovato 1 simbolo in {0}","Trovati {0} simboli in {1}","Trovati {0} simboli in {1} file"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["Indica se sono presenti posizioni dei simboli a cui \xE8 possibile passare solo tramite la tastiera.","Simbolo {0} di {1}, {2} per il successivo","Simbolo {0} di {1}"],"vs/editor/contrib/hover/browser/hover":["Mostra o sposta lo stato attivo al passaggio del mouse","Mostra anteprima definizione al passaggio del mouse","Scorri verso l'alto al passaggio del mouse","Scorri verso il basso al passaggio del mouse","Scorri a sinistra al passaggio del mouse","Scorri a destra al passaggio del mouse","Vai alla pagina precedente al passaggio del mouse","Vai alla pagina successiva al passaggio del mouse","Vai in alto al passaggio del mouse","Vai in basso al passaggio del mouse"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["Caricamento...","Rendering sospeso per una linea lunga per motivi di prestazioni. Pu\xF2 essere configurato tramite 'editor.stopRenderingLineAfter'.","Per motivi di prestazioni la tokenizzazione viene ignorata per le righe lunghe. \xC8 possibile effettuare questa configurazione tramite `editor.maxTokenizationLineLength`."],"vs/editor/contrib/hover/browser/markerHoverParticipant":["Visualizza problema","Non sono disponibili correzioni rapide","Verifica disponibilit\xE0 correzioni rapide...","Non sono disponibili correzioni rapide","Correzione rapida..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["Sostituisci con il valore precedente","Sostituisci con il valore successivo"],"vs/editor/contrib/indentation/browser/indentation":["Converti rientro in spazi","Converti rientro in tabulazioni","Dimensione tabulazione configurata","Dimensioni predefinite della scheda","Dimensioni della scheda corrente","Seleziona dimensione tabulazione per il file corrente","Imposta rientro con tabulazioni","Imposta rientro con spazi","Modifica dimensioni visualizzazione scheda","Rileva rientro dal contenuto","Imposta nuovo rientro per righe","Re-Indenta le Linee Selezionate"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["Fare doppio clic per inserire","CMD+clic","CTRL+clic","Opzione+clic","ALT+clic","Vai alla definizione ({0}), fai clic con il pulsante destro del mouse per altre informazioni","Vai alla definizione ({0})","Esegui il comando"],"vs/editor/contrib/inlineCompletions/browser/commands":["Mostrare suggerimento inline successivo","Mostrare suggerimento inline precedente","Trigger del suggerimento inline","Accettare suggerimento inline per la parola successiva","Accetta parola","Accetta la riga successiva del suggerimento in linea","Accetta riga","Accetta il suggerimento in linea","Accetta","Nascondi suggerimento inline","Mostra sempre la barra degli strumenti"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["Suggerimento:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["Se \xE8 visibile un suggerimento inline","Se il suggerimento in linea inizia con spazi vuoti","Indica se il suggerimento inline inizia con uno spazio vuoto minore di quello che verrebbe inserito dalla tabulazione","Indica se i suggerimenti devono essere eliminati per il suggerimento corrente"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["Ispezionarlo nella visualizzazione accessibile ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["Icona per visualizzare il suggerimento del parametro successivo.","Icona per visualizzare il suggerimento del parametro precedente.","{0} ({1})","Indietro","Avanti"],"vs/editor/contrib/lineSelection/browser/lineSelection":["Espandere selezione riga"],"vs/editor/contrib/linesOperations/browser/linesOperations":["Copia la riga in alto","&&Copia la riga in alto","Copia la riga in basso","Co&&pia la riga in basso","Duplica selezione","&&Duplica selezione","Sposta la riga in alto","Sposta la riga in &&alto","Sposta la riga in basso","Sposta la riga in &&basso","Ordinamento righe crescente","Ordinamento righe decrescente","Elimina righe duplicate","Taglia spazio vuoto finale","Elimina riga","Imposta un rientro per la riga","Riduci il rientro per la riga","Inserisci la riga sopra","Inserisci la riga sotto","Elimina tutto a sinistra","Elimina tutto a destra","Unisci righe","Trasponi caratteri intorno al cursore","Converti in maiuscolo","Converti in minuscolo","Trasforma in Tutte Iniziali Maiuscole","Trasforma in snake case","Trasforma in caso Camel","Trasformare in caso Kebab"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["Avvia modifica collegata","Colore di sfondo quando l'editor viene rinominato automaticamente in base al tipo."],"vs/editor/contrib/links/browser/links":["Non \xE8 stato possibile aprire questo collegamento perch\xE9 il formato non \xE8 valido: {0}","Non \xE8 stato possibile aprire questo collegamento perch\xE9 manca la destinazione.","Esegui il comando","Visita il collegamento","CMD+clic","CTRL+clic","Opzione+clic","ALT+clic","Esegue il comando {0}","Apri collegamento"],"vs/editor/contrib/message/browser/messageController":["Indica se l'editor visualizza attualmente un messaggio inline"],"vs/editor/contrib/multicursor/browser/multicursor":["Cursore aggiunto: {0}","Cursori aggiunti: {0}","Aggiungi cursore sopra","&&Aggiungi cursore sopra","Aggiungi cursore sotto","A&&ggiungi cursore sotto","Aggiungi cursori a fine riga","Aggiungi c&&ursori a fine riga","Aggiungi cursori alla fine","Aggiungi cursori all'inizio","Aggiungi selezione a risultato ricerca successivo","Aggiungi &&occorrenza successiva","Aggiungi selezione a risultato ricerca precedente","Aggiungi occorrenza &&precedente","Sposta ultima selezione a risultato ricerca successivo","Sposta ultima selezione a risultato ricerca precedente","Seleziona tutte le occorrenze del risultato ricerca","Seleziona &&tutte le occorrenze","Cambia tutte le occorrenze","Attival cursore successivo","Attiva il cursore successivo","Cursore precedente stato attivo","Imposta lo stato attivo sul cursore precedente"],"vs/editor/contrib/parameterHints/browser/parameterHints":["Attiva i suggerimenti per i parametri"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["Icona per visualizzare il suggerimento del parametro successivo.","Icona per visualizzare il suggerimento del parametro precedente.","{0}, suggerimento","Colore di primo piano dell\u2019articolo attivo nel suggerimento di parametro."],"vs/editor/contrib/peekView/browser/peekView":["Indica se l'editor di codice corrente \xE8 incorporato nell'anteprima","Chiudi","Colore di sfondo dell'area del titolo della visualizzazione rapida.","Colore del titolo della visualizzazione rapida.","Colore delle informazioni del titolo della visualizzazione rapida.","Colore dei bordi e della freccia della visualizzazione rapida.","Colore di sfondo dell'elenco risultati della visualizzazione rapida.","Colore primo piano dei nodi riga nell'elenco risultati della visualizzazione rapida.","Colore primo piano dei nodi file nell'elenco risultati della visualizzazione rapida.","Colore di sfondo della voce selezionata nell'elenco risultati della visualizzazione rapida.","Colore primo piano della voce selezionata nell'elenco risultati della visualizzazione rapida.","Colore di sfondo dell'editor di visualizzazioni rapide.","Colore di sfondo della barra di navigazione nell'editor visualizzazione rapida.","Colore di sfondo della barra di scorrimento permanente nell'editor visualizzazione rapida.","Colore dell'evidenziazione delle corrispondenze nell'elenco risultati della visualizzazione rapida.","Colore dell'evidenziazione delle corrispondenze nell'editor di visualizzazioni rapide.","Bordo dell'evidenziazione delle corrispondenze nell'editor di visualizzazioni rapide."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["Aprire prima un editor di testo per passare a una riga.","Vai a riga {0} e carattere {1}.","Vai alla riga {0}.","Riga corrente: {0}, carattere: {1}. Digitare un numero di riga a cui passare compreso tra 1 e {2}.","Riga corrente: {0}, Carattere: {1}. Digitare un numero di riga a cui passare."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["Per passare a un simbolo, aprire prima un editor di testo con informazioni sui simboli.","L'editor di testo attivo non fornisce informazioni sui simboli.","Non ci sono simboli dell'editor corrispondenti","Non ci sono simboli dell'editor","Apri lateralmente","Apri in basso","simboli ({0})","propriet\xE0 ({0})","metodi ({0})","funzioni ({0})","costruttori ({0})","variabili ({0})","classi ({0})","struct ({0})","eventi ({0})","operatori ({0})","interfacce ({0})","spazi dei nomi ({0})","pacchetti ({0})","parametri di tipo ({0})","moduli ({0})","propriet\xE0 ({0})","enumerazioni ({0})","membri di enumerazione ({0})","stringhe ({0})","file ({0})","matrici ({0})","numeri ({0})","valori booleani ({0})","oggetti ({0})","chiavi ({0})","campi ({0})","costanti ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["Non \xE8 possibile modificare nell'input di sola lettura","Non \xE8 possibile modificare nell'editor di sola lettura"],"vs/editor/contrib/rename/browser/rename":["Nessun risultato.","Si \xE8 verificato un errore sconosciuto durante la risoluzione del percorso di ridenominazione","Ridenominazione di '{0}' in '{1}'","Ridenominazione di {0} in {1}","Correttamente rinominato '{0}' in '{1}'. Sommario: {2}","La ridenominazione non \xE8 riuscita ad applicare le modifiche","La ridenominazione non \xE8 riuscita a calcolare le modifiche","Rinomina simbolo","Abilita/Disabilita l'opzione per visualizzare le modifiche in anteprima prima della ridenominazione"],"vs/editor/contrib/rename/browser/renameInputField":["Indica se il widget di ridenominazione input \xE8 visibile","Consente di rinominare l'input. Digitare il nuovo nome e premere INVIO per eseguire il commit.","{0} per rinominare, {1} per visualizzare in anteprima"],"vs/editor/contrib/smartSelect/browser/smartSelect":["Espandi selezione","Espan&&di selezione","Riduci selezione","&&Riduci selezione"],"vs/editor/contrib/snippet/browser/snippetController2":["Indica se l'editor \xE8 quello corrente nella modalit\xE0 frammenti","Indica se \xE8 presente una tabulazione successiva in modalit\xE0 frammenti","Indica se \xE8 presente una tabulazione precedente in modalit\xE0 frammenti","Vai al segnaposto successivo..."],"vs/editor/contrib/snippet/browser/snippetVariables":["Domenica","Luned\xEC","Marted\xEC","Mercoled\xEC","Gioved\xEC","Venerd\xEC","Sabato","Dom","Lun","Mar","Mer","Gio","Ven","Sab","Gennaio","Febbraio","Marzo","Aprile","Mag","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre","Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["Alternanza scorrimento permanente","&&Alternanza scorrimento permanente","Scorrimento permanente","&&Scorrimento permanente","Sposta stato attivo su Scorrimento permanente","&&Sposta stato attivo su Scorrimento permanente","Seleziona la riga di scorrimento permanente successiva","Seleziona riga di scorrimento permanente precedente","Vai alla linea di scorrimento permanente attiva","Selezionare l'editor"],"vs/editor/contrib/suggest/browser/suggest":["Indica se i suggerimenti sono evidenziati","Indica se i dettagli dei suggerimenti sono visibili","Indica se sono presenti pi\xF9 suggerimenti da cui scegliere","Indica se l'inserimento del suggerimento corrente comporta una modifica oppure se completa gi\xE0 l'input","Indica se i suggerimenti vengono inseriti quando si preme INVIO","Indica se il suggerimento corrente include il comportamento di inserimento e sostituzione","Indica se il comportamento predefinito \xE8 quello di inserimento o sostituzione","Indica se il suggerimento corrente supporta la risoluzione di ulteriori dettagli"],"vs/editor/contrib/suggest/browser/suggestController":["In seguito all'accettazione di '{0}' sono state apportate altre {1} modifiche","Attiva suggerimento","Inserisci","Inserisci","Sostituisci","Sostituisci","Inserisci","nascondi dettagli","mostra dettagli","Reimposta le dimensioni del widget dei suggerimenti"],"vs/editor/contrib/suggest/browser/suggestWidget":["Colore di sfondo del widget dei suggerimenti.","Colore del bordo del widget dei suggerimenti.","Colore primo piano del widget dei suggerimenti.","Colore primo piano della voce selezionata del widget dei suggerimenti.","Colore primo piano dell\u2019icona della voce selezionata del widget dei suggerimenti.","Colore di sfondo della voce selezionata del widget dei suggerimenti.","Colore delle evidenziazioni corrispondenze nel widget dei suggerimenti.","Colore delle evidenziazioni corrispondenze nel widget dei suggerimenti quando lo stato attivo si trova su un elemento.","Colore primo piano dello stato del widget dei suggerimenti.","Caricamento...","Non ci sono suggerimenti.","Suggerisci","{0} {1}, {2}","{0} {1}","{0}, {1}","{0}, documenti: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["Chiudi","Caricamento..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["Icona per visualizzare altre informazioni nel widget dei suggerimenti.","Altre informazioni"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["Colore primo piano per i simboli di matrice. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli booleani. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di classe. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di colore. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di costante. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di costruttore. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di enumeratore. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di membro di enumeratore. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di evento. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di campo. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di file. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di cartella. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di funzione. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di interfaccia. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di chiave. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di parola chiave. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di metodo. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di modulo. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di spazio dei nomi. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli Null. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli numerici. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di oggetto. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di operatore. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di pacchetto. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di propriet\xE0. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di riferimento. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di frammento. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di stringa. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di struct. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di testo. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di parametro di tipo. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di unit\xE0. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti.","Colore primo piano per i simboli di variabile. Questi simboli vengono visualizzati nella struttura, nell'elemento di navigazione e nel widget dei suggerimenti."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["Attiva/Disattiva l'uso di TAB per spostare lo stato attivo","Se si preme TAB, lo stato attivo verr\xE0 spostato sull'elemento con stato attivabile successivo.","Se si preme TAB, verr\xE0 inserito il carattere di tabulazione"],"vs/editor/contrib/tokenization/browser/tokenization":["Sviluppatore: Forza retokenizzazione"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["Icona visualizzata con un messaggio di avviso nell'editor delle estensioni.","Questo documento contiene molti caratteri Unicode ASCII non di base","Il documento contiene molti caratteri Unicode ambigui","Questo documento contiene molti caratteri Unicode invisibili","Il carattere {0} potrebbe essere confuso con il carattere ASCII {1}, che \xE8 pi\xF9 comune nel codice sorgente.","Il carattere {0} potrebbe essere confuso con il carattere {1}, che \xE8 pi\xF9 comune nel codice sorgente.","Il carattere {0} \xE8 invisibile.","Il carattere {0} non \xE8 un carattere ASCII di base.","Modificare impostazioni","Disabilita evidenziazione nei commenti","Disabilita l'evidenziazione dei caratteri nei commenti","Disabilita evidenziazione nelle stringhe","Disabilita l'evidenziazione dei caratteri nelle stringhe","Disabilitare evidenziazione ambigua","Disabilitare l'evidenziazione dei caratteri ambigui","Disabilitare evidenziazione invisibile","Disabilitare l'evidenziazione dei caratteri invisibili","Disabilitare evidenziazione non ASCII","Disabilitare l'evidenziazione di caratteri ASCII non di base","Mostrare opzioni di esclusione","Escludere {0} (carattere invisibile) dall'evidenziazione","Escludere {0} dall\u2019essere evidenziata",'Consentire i caratteri Unicode pi\xF9 comuni nel linguaggio "{0}".',"Configurare opzioni evidenziazione Unicode"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["Caratteri di terminazione di riga insoliti","Sono stati rilevati caratteri di terminazione di riga insoliti",'Il file "\r\n" contiene uno o pi\xF9 caratteri di terminazione di riga insoliti, ad esempio separatore di riga (LS) o separatore di paragrafo (PS).{0}\r\n\xC8 consigliabile rimuoverli dal file. \xC8 possibile configurare questa opzione tramite `editor.unusualLineTerminators`.',"&&Rimuovi i caratteri di terminazione di riga insoliti","Ignora"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["Colore di sfondo di un simbolo durante l'accesso in lettura, ad esempio durante la lettura di una variabile. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo di un simbolo durante l'accesso in scrittura, ad esempio durante la scrittura in una variabile. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo di un'occorrenza testuale per un simbolo. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del bordo di un simbolo durante l'accesso in lettura, ad esempio durante la lettura di una variabile.","Colore del bordo di un simbolo durante l'accesso in scrittura, ad esempio durante la scrittura in una variabile.","Colore del bordo di un'occorrenza testuale per un simbolo.","Colore del marcatore del righello delle annotazioni per le evidenziazioni dei simboli. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del marcatore del righello delle annotazioni per le evidenziazioni dei simboli di accesso in scrittura. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del marcatore del righello delle annotazioni di un'occorrenza testuale per un simbolo. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["Vai al prossimo simbolo evidenziato","Vai al precedente simbolo evidenziato","Attiva/disattiva evidenziazione simbolo"],"vs/editor/contrib/wordOperations/browser/wordOperations":["Elimina parola"],"vs/platform/action/common/actionCommonCategories":["Visualizza","Guida","Test","FILE","Preferenze","Sviluppatore"],"vs/platform/actionWidget/browser/actionList":["{0} per Applica, {1} per Anteprima","{0} da applicare","{0}, Motivo disabilitato: {1}","Widget azione"],"vs/platform/actionWidget/browser/actionWidget":["Colore di sfondo per le azioni attivate o disattivate nella barra delle azioni.","Indica se l'elenco di widget azione \xE8 visibile","Nascondi widget azione","Seleziona azione precedente","Seleziona azione successiva","Accetta l'azione selezionata","Anteprima azione selezionata"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["Nascondi","Reimposta menu"],"vs/platform/actions/common/menuService":["Nascondi '{0}'"],"vs/platform/audioCues/browser/audioCueService":["Errore sulla riga","Avviso sulla riga","Area piegata sulla linea","Punto di interruzione sulla riga","Suggerimento inline sulla riga","Correzione rapida terminale","Debugger arrestato sul punto di interruzione","Nessun suggerimento per l'inlay nella riga","Attivit\xE0 completata","Attivit\xE0 non riuscita","Comando terminale non riuscito","Campanello terminale","Cella del notebook completata","La cella del notebook ha avuto esito negativo","Riga diff inserita","Riga diff eliminata","Riga diff modificata","Richiesta chat inviata","Risposta chat ricevuta","Risposta chat in sospeso"],"vs/platform/configuration/common/configurationRegistry":["Override configurazione predefinita del linguaggio","Consente di configurare le impostazioni di cui eseguire l'override per il linguaggio {0}.","Consente di configurare le impostazioni dell'editor di cui eseguire l'override per un linguaggio.","Questa impostazione non supporta la configurazione per lingua.","Consente di configurare le impostazioni dell'editor di cui eseguire l'override per un linguaggio.","Questa impostazione non supporta la configurazione per lingua.","Non \xE8 possibile registrare una propriet\xE0 vuota","Non \xE8 possibile registrare '{0}'. Corrisponde al criterio di propriet\xE0 '\\\\[.*\\\\]$' per la descrizione delle impostazioni dell'editor specifiche del linguaggio. Usare il contributo 'configurationDefaults'.","Non \xE8 possibile registrare '{0}'. Questa propriet\xE0 \xE8 gi\xE0 registrata.","Impossibile registrare '{0}'. Il {1} dei criteri associato \xE8 gi\xE0 registrato con {2}."],"vs/platform/contextkey/browser/contextKeyService":["Comando che restituisce informazioni sulle chiavi di contesto"],"vs/platform/contextkey/common/contextkey":["Espressione chiave di contesto vuota","Si \xE8 dimenticato di scrivere un'espressione? \xC8 anche possibile inserire 'false' o 'true' per restituire sempre rispettivamente false o true.","'in' dopo 'not'.","Parentesi chiusa ')'","Token imprevisto","Si \xE8 dimenticato di inserire && o || prima del token?","Fine imprevista dell'espressione","Si \xE8 dimenticato di inserire una chiave di contesto?",`Previsto: {0}\r -Ricevuto: '{1}'.`],"vs/platform/contextkey/common/contextkeys":["Indica se il sistema operativo \xE8 macOS","Indica se il sistema operativo \xE8 Linux","Indica se il sistema operativo \xE8 Windows","Indica se la piattaforma \xE8 un Web browser","Indica se il sistema operativo \xE8 macOS in una piattaforma non basata su browser","Indica se il sistema operativo \xE8 iOS","Indica se la piattaforma \xE8 un Web browser per dispositivi mobili","Tipo di qualit\xE0 del VS Code","Indica se lo stato attivo della tastiera si trova all'interno di una casella di input"],"vs/platform/contextkey/common/scanner":["Si intendeva {0}?","Si intendeva {0} o {1}?","Si intendeva {0}, {1} o {2}?","Si \xE8 dimenticato di aprire o chiudere la citazione?","Si \xE8 dimenticato di eseguire il carattere di escape '/' (slash)? Inserire due barre rovesciate prima del carattere di escape, ad esempio '\\\\/'."],"vs/platform/history/browser/contextScopedHistoryWidget":["Indica se i suggerimenti sono visibili"],"vs/platform/keybinding/common/abstractKeybindingService":["\xC8 stato premuto ({0}). In attesa del secondo tasto...","\xC8 stato premuto ({0}). In attesa del prossimo tasto...","La combinazione di tasti ({0}, {1}) non \xE8 un comando.","La combinazione di tasti ({0}, {1}) non \xE8 un comando."],"vs/platform/list/browser/listService":["Workbench","Rappresenta il tasto 'Control' in Windows e Linux e il tasto 'Comando' in macOS.","Rappresenta il tasto 'Alt' in Windows e Linux e il tasto 'Opzione' in macOS.","Il modificatore da utilizzare per aggiungere un elemento di alberi e liste ad una selezione multipla con il mouse (ad esempio in Esplora Risorse, apre gli editor e le viste scm). Le gesture del mouse 'Apri a lato' - se supportate - si adatteranno in modo da non creare conflitti con il modificatore di selezione multipla.","Controlla l'apertura degli elementi di alberi ed elenchi tramite il mouse (se supportato). Tenere presente che alcuni alberi ed elenchi potrebbero scegliere di ignorare questa impostazione se non \xE8 applicabile.","Controlla se elenchi e alberi supportano lo scorrimento orizzontale nell'area di lavoro. Avviso: l'attivazione di questa impostazione pu\xF2 influire sulle prestazioni.","Controlla se i clic nella barra di scorrimento scorrono pagina per pagina.","Controlla il rientro dell'albero in pixel.","Controlla se l'albero deve eseguire il rendering delle guide per i rientri.","Controlla se elenchi e alberi prevedono lo scorrimento uniforme.","Moltiplicatore da usare sui valori `deltaX` e `deltaY` degli eventi di scorrimento della rotellina del mouse.","Moltiplicatore della velocit\xE0 di scorrimento quando si preme `Alt`.","Evidenziare gli elementi durante la ricerca. L'ulteriore spostamento verso l'alto e verso il basso attraverser\xE0 solo gli elementi evidenziati.","Filtra gli elementi durante la ricerca.","Controlla la modalit\xE0 di ricerca predefinita per elenchi e alberi nel workbench.","Con lo stile di spostamento da tastiera simple lo stato attivo si trova sugli elementi che corrispondono all'input da tastiera. L'abbinamento viene effettuato solo in base ai prefissi.","Con lo stile di spostamento da tastiera highlight vengono evidenziati gli elementi corrispondenti all'input da tastiera. Spostandosi ulteriormente verso l'alto o verso il basso ci si sposter\xE0 solo negli elementi evidenziati.","Con lo stile di spostamento da tastiera filter verranno filtrati e nascosti tutti gli elementi che non corrispondono all'input da tastiera.","Controlla lo stile di spostamento da tastiera per elenchi e alberi nel workbench. Le opzioni sono: simple, highlight e filter.","In alternativa, usare 'workbench.list.defaultFindMode' e 'workbench.list.typeNavigationMode'.","Usa la corrispondenza fuzzy durante la ricerca.","Usa corrispondenza contigua durante la ricerca.","Controlla il tipo di corrispondenza usato per la ricerca di elenchi e alberi nel workbench.","Controlla l'espansione delle cartelle di alberi quando si fa clic sui nomi delle cartelle. Tenere presente che alcuni alberi ed elenchi potrebbero scegliere di ignorare questa impostazione se non \xE8 applicabile.","Controlla il funzionamento dello spostamento dei tipi in elenchi e alberi nel workbench. Se impostato su 'trigger', l'esplorazione del tipo inizia dopo l'esecuzione del comando 'list.triggerTypeNavigation'."],"vs/platform/markers/common/markers":["Errore","Avviso","Info"],"vs/platform/quickinput/browser/commandsQuickAccess":["usate di recente","comandi simili","pi\xF9 usato","altri comandi","comandi simili","{0}, {1}","Il comando '{0}' ha restituito un errore"],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["Indietro","Premere 'INVIO' per confermare l'input oppure 'ESC' per annullare","{0}/{1}","Digitare per ridurre il numero di risultati."],"vs/platform/quickinput/browser/quickInputController":["Attivare/Disattivare tutte le caselle di controllo","{0} risultati","{0} selezionati","OK","Personalizzato","Indietro ({0})","Indietro"],"vs/platform/quickinput/browser/quickInputList":["Input rapido"],"vs/platform/quickinput/browser/quickInputUtils":["Fare clic per eseguire il comando '{0}'"],"vs/platform/theme/common/colorRegistry":["Colore primo piano generale. Questo colore viene usato solo se non \xE8 sostituito da quello di un componente.","Primo piano generale per gli elementi disabilitati. Questo colore viene usato solo e non \xE8 sostituito da quello di un componente.","Colore primo piano globale per i messaggi di errore. Questo colore viene usato solo se non \xE8 sostituito da quello di un componente.","Colore primo piano del testo che fornisce informazioni aggiuntive, ad esempio per un'etichetta di testo.","Colore predefinito per le icone nel workbench.","Colore del bordo globale per gli elementi evidenziati. Questo colore viene usato solo se non \xE8 sostituito da quello di un componente.","Un bordo supplementare attorno agli elementi per contrastarli maggiormente rispetto agli altri.","Un bordo supplementare intorno agli elementi attivi per contrastarli maggiormente rispetto agli altri.","Il colore di sfondo delle selezioni di testo in workbench (ad esempio per i campi di input o aree di testo). Si noti che questo non si applica alle selezioni all'interno dell'editor.","Colore dei separatori di testo.","Colore primo piano dei link nel testo.","Colore primo piano per i collegamenti nel testo quando vengono selezionati o al passaggio del mouse.","Colore primo piano dei segmenti di testo preformattato.","Colore di sfondo per le citazioni nel testo.","Colore del bordo per le citazioni nel testo.","Colore di sfondo per i blocchi di codice nel testo.","Colore ombreggiatura dei widget, ad es. Trova/Sostituisci all'interno dell'editor.","Colore del bordo dei widget, ad es. Trova/Sostituisci all'interno dell'editor.","Sfondo della casella di input.","Primo piano della casella di input.","Bordo della casella di input.","Colore del bordo di opzioni attivate nei campi di input.","Colore di sfondo di opzioni attivate nei campi di input.","Colore di sfondo al passaggio del mouse delle opzioni nei campi di input.","Colore primo piano di opzioni attivate nei campi di input.","Colore primo piano di casella di input per il testo segnaposto.","Colore di sfondo di convalida dell'input di tipo Informazione.","Colore primo piano di convalida dell'input di tipo Informazione.","Colore del bordo della convalida dell'input di tipo Informazione.","Colore di sfondo di convalida dell'input di tipo Avviso.","Colore primo piano di convalida dell'input di tipo Avviso.","Colore del bordo della convalida dell'input di tipo Avviso.","Colore di sfondo di convalida dell'input di tipo Errore.","Colore primo piano di convalida dell'input di tipo Errore.","Colore del bordo della convalida dell'input di tipo Errore.","Sfondo dell'elenco a discesa.","Sfondo dell'elenco a discesa.","Primo piano dell'elenco a discesa.","Bordo dell'elenco a discesa.","Colore primo piano del pulsante.","Colore del separatore pulsante.","Colore di sfondo del pulsante.","Colore di sfondo del pulsante al passaggio del mouse.","Colore del bordo del pulsante.","Colore primo piano secondario del pulsante.","Colore di sfondo secondario del pulsante.","Colore di sfondo secondario del pulsante al passaggio del mouse.","Colore di sfondo del badge. I badge sono piccole etichette informative, ad esempio per mostrare il conteggio dei risultati della ricerca.","Colore primo piano del badge. I badge sono piccole etichette informative, ad esempio per mostrare il conteggio dei risultati di una ricerca.","Ombra della barra di scorrimento per indicare lo scorrimento della visualizzazione.","Colore di sfondo del cursore della barra di scorrimento.","Colore di sfondo del cursore della barra di scorrimento al passaggio del mouse.","Colore di sfondo del cursore della barra di scorrimento quando si fa clic con il mouse.","Colore di sfondo dell'indicatore di stato che pu\xF2 essere mostrato per operazioni a esecuzione prolungata.","Colore di sfondo del testo dell'errore nell'editor. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore primo piano degli indicatori di errore nell'editor.","Se impostato, colore delle doppie sottolineature per gli errori nell'editor.","Colore di sfondo del testo dell'avviso nell'editor. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore primo piano degli indicatori di avviso nell'editor.","Se impostato, colore delle doppie sottolineature per gli avvisi nell'editor.","Colore di sfondo del testo delle informazioni nell'editor. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore primo piano degli indicatori di informazioni nell'editor.","Se impostato, colore delle doppie sottolineature per i messaggi informativi nell'editor.","Colore primo piano degli indicatori di suggerimento nell'editor.","Se impostato, colore delle doppie sottolineature per i suggerimenti nell'editor.","Colore dei bordi di ridimensionamento attivi.","Colore di sfondo dell'editor.","Colore primo piano predefinito dell'editor.","Colore di sfondo dello scorrimento permanente per l'editor","Colore di sfondo dello scorrimento permanente al passaggio del mouse per l'editor","Colore di sfondo dei widget dell'editor, ad esempio Trova/Sostituisci.","Colore primo piano dei widget dell'editor, ad esempio Trova/Sostituisci.","Colore del bordo dei widget dell'editor. Il colore viene usato solo se il widget sceglie di avere un bordo e se il colore non \xE8 sottoposto a override da un widget.","Colore del bordo della barra di ridimensionamento dei widget dell'editor. Il colore viene usato solo se il widget sceglie di avere un bordo di ridimensionamento e se il colore non \xE8 sostituito da quello di un widget.","Colore di sfondo di Selezione rapida. Il widget Selezione rapida \xE8 il contenitore di selezioni quali il riquadro comandi.","Colore primo piano di Selezione rapida. Il widget Selezione rapida \xE8 il contenitore di selezioni quali il riquadro comandi.","Colore di sfondo del titolo di Selezione rapida. Il widget Selezione rapida \xE8 il contenitore di selezioni quali il riquadro comandi.","Colore di selezione rapida per il raggruppamento delle etichette.","Colore di selezione rapida per il raggruppamento dei bordi.","Colore di sfondo dell'etichetta del tasto di scelta rapida. L'etichetta del tasto di scelta rapida viene usata per rappresentare una scelta rapida da tastiera.","Colore primo piano dell'etichetta del tasto di scelta rapida. L'etichetta del tasto di scelta rapida viene usata per rappresentare una scelta rapida da tastiera.","Colore del bordo dell'etichetta del tasto di scelta rapida. L'etichetta del tasto di scelta rapida viene usata per rappresentare una scelta rapida da tastiera.","Colore inferiore del bordo dell'etichetta del tasto di scelta rapida. L'etichetta del tasto di scelta rapida viene usata per rappresentare una scelta rapida da tastiera.","Colore della selezione dell'editor.","Colore del testo selezionato per il contrasto elevato.","Colore della selezione in un editor inattivo. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore delle aree con lo stesso contenuto della selezione. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del bordo delle regioni con lo stesso contenuto della selezione.","Colore della corrispondenza di ricerca corrente.","Colore degli altri risultati della ricerca. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore dell'intervallo di limite della ricerca. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del bordo della corrispondenza della ricerca corrente.","Colore del bordo delle altre corrispondenze della ricerca.","Colore del bordo dell'intervallo che limita la ricerca. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore delle corrispondenze query dell'editor della ricerca.","Colore del bordo delle corrispondenze query dell'editor della ricerca.","Colore del testo nel messaggio di completamento del viewlet di ricerca.","Evidenziazione sotto la parola per cui \xE8 visualizzata un'area sensibile al passaggio del mouse. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo dell'area sensibile al passaggio del mouse dell'editor.","Colore primo piano dell'area sensibile al passaggio del mouse dell'editor.","Colore del bordo dell'area sensibile al passaggio del mouse dell'editor.","Colore di sfondo della barra di stato sensibile al passaggio del mouse dell'editor.","Colore dei collegamenti attivi.","Colore primo piano dei suggerimenti inline","Colore di sfondo dei suggerimenti inline","Colore primo piano dei suggerimenti inline per i tipi","Colore di sfondo dei suggerimenti inline per i tipi","Colore primo piano dei suggerimenti inline per i parametri","Colore di sfondo dei suggerimenti inline per i parametri","Colore usato per l'icona delle azioni con lampadina.","Colore usato per l'icona delle azioni di correzione automatica con lampadina.","Colore di sfondo per il testo che \xE8 stato inserito. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo per il testo che \xE8 stato rimosso. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo per le righe che sono state inserite. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo per le righe che sono state rimosse. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore di sfondo per il margine in cui sono state inserite le righe.","Colore di sfondo per il margine in cui sono state rimosse le righe.","Primo piano del righello delle annotazioni delle differenze per il contenuto inserito.","Primo piano del righello delle annotazioni delle differenze per il contenuto rimosso.","Colore del contorno del testo che \xE8 stato inserito.","Colore del contorno del testo che \xE8 stato rimosso.","Colore del bordo tra due editor di testo.","Colore del riempimento diagonale dell'editor diff. Il riempimento diagonale viene usato nelle visualizzazioni diff affiancate.","Colore di sfondo dei blocchi non modificati nell'editor diff.","Colore di primo piano dei blocchi non modificati nell'editor diff.","Colore di sfondo del codice non modificato nell'editor diff.","Colore di sfondo dell'elenco/albero per l'elemento con lo stato attivo quando l'elenco/albero \xE8 attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore primo piano dell'elenco/albero per l'elemento con lo stato attivo quando l'elenco/albero \xE8 attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore del contorno dell'elenco/albero per l'elemento con lo stato attivo quando l'elenco/albero \xE8 attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore del contorno dell'elenco/albero per l'elemento con lo stato attivo quando l'elenco/albero \xE8 attivo e selezionato. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore di sfondo dell'elenco/albero per l'elemento selezionato quando l'elenco/albero \xE8 attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore primo piano dell'elenco/albero per l'elemento selezionato quando l'elenco/albero \xE8 attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore primo piano dell\u2019icona dell'elenco/albero per l'elemento selezionato quando l'elenco/albero \xE8 attivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore di sfondo dell'elenco/albero per l'elemento selezionato quando l'elenco/albero \xE8 inattivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore primo piano dell'elenco/albero per l'elemento selezionato quando l'elenco/albero \xE8 inattivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore primo piano dell\u2019icona dell'elenco/albero per l'elemento selezionato quando l'elenco/albero \xE8 inattivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Colore di sfondo dell'elenco/albero per l'elemento con lo stato attivo quando l'elenco/albero \xE8 inattivo. Un elenco/albero attivo ha lo stato attivo della tastiera, uno inattivo no.","Colore del contorno dell'elenco/albero per l'elemento con lo stato attivo quando l'elenco/albero \xE8 inattivo. Un elenco/albero attivo ha lo stato attivo della tastiera, a differenza di uno inattivo.","Sfondo dell'elenco/albero al passaggio del mouse sugli elementi.","Primo piano dell'elenco/albero al passaggio del mouse sugli elementi.","Sfondo dell'elenco/albero durante il trascinamento degli elementi selezionati.","Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate durante la ricerca nell'Elenco/Struttura ad albero.","Colore primo piano Elenco/Struttura ad albero delle occorrenze trovate in elementi con lo stato attivo durante la ricerca nell'Elenco/Struttura ad albero.","Colore primo piano dell'elenco/albero delle occorrenze trovate durante la ricerca nell'elenco/albero.","Colore primo piano delle voci di elenco contenenti errori.","Colore primo piano delle voci di elenco contenenti avvisi.","Colore di sfondo del widget del filtro per tipo in elenchi e alberi.","Colore del contorno del widget del filtro per tipo in elenchi e alberi.","Colore del contorno del widget del filtro per tipo in elenchi e alberi quando non sono presenti corrispondenze.","Colore ombreggiatura del widget del filtro sul tipo negli elenchi e alberi.","Colore di sfondo della corrispondenza filtrata.","Colore del bordo della corrispondenza filtrata.","Colore del tratto dell'albero per le guide per i rientri.","Colore del tratto dell'albero per le guide di rientro non attive.","Colore del bordo della tabella tra le colonne.","Colore di sfondo per le righe di tabella dispari.","Colore primo piano dell'elenco/albero per gli elementi non evidenziati.","Colore di sfondo del widget della casella di controllo.","Colore di sfondo del widget della casella di controllo quando \xE8 selezionato l'elemento in cui si trova.","Colore primo piano del widget della casella di controllo.","Colore del bordo del widget della casella di controllo.","Colore del bordo del widget della casella di controllo quando \xE8 selezionato l'elemento in cui si trova.","In alternativa, usare quickInputList.focusBackground","Colore primo piano di Selezione rapida per l'elemento con lo stato attivo.","Colore primo piano dell\u2019icona di Selezione rapida per l'elemento con lo stato attivo.","Colore di sfondo di Selezione rapida per l'elemento con lo stato attivo.","Colore del bordo del menu.","Colore primo piano delle voci di menu.","Colore di sfondo delle voci di menu.","Colore primo piano della voce di menu selezionata nei menu.","Colore di sfondo della voce di menu selezionata nei menu.","Colore del bordo della voce di menu selezionata nei menu.","Colore di un elemento separatore delle voci di menu.","Sfondo della barra degli strumenti al passaggio del mouse sulle azioni","Contorno della barra degli strumenti al passaggio del mouse sulle azioni","Sfondo della barra degli strumenti quando si tiene premuto il mouse sulle azioni","Colore di sfondo dell'evidenziazione della tabulazione di un frammento.","Colore del bordo dell'evidenziazione della tabulazione di un frammento.","Colore di sfondo dell'evidenziazione della tabulazione finale di un frammento.","Colore del bordo dell'evidenziazione della tabulazione finale di un frammento.","Colore degli elementi di navigazione in evidenza.","Colore di sfondo degli elementi di navigazione.","Colore degli elementi di navigazione in evidenza.","Colore degli elementi di navigazione selezionati.","Colore di sfondo del controllo di selezione elementi di navigazione.","Sfondo dell'intestazione delle modifiche correnti nei conflitti di merge inline. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Sfondo del contenuto delle modifiche correnti nei conflitti di merge inline. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Sfondo dell'intestazione delle modifiche in ingresso nei conflitti di merge inline. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Sfondo del contenuto delle modifiche in ingresso nei conflitti di merge inline. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Sfondo dell'intestazione del predecessore comune nei conflitti di merge inline. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Sfondo del contenuto del predecessore comune nei conflitti di merge inline. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del bordo nelle intestazioni e sulla barra di divisione di conflitti di merge in linea.","Colore primo piano del righello delle annotazioni delle modifiche correnti per i conflitti di merge inline.","Colore primo piano del righello delle annotazioni delle modifiche in ingresso per i conflitti di merge inline.","Colore primo piano del righello delle annotazioni del predecessore comune per i conflitti di merge inline.","Colore del marcatore del righello delle annotazioni per la ricerca di corrispondenze. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del marcatore del righello delle annotazioni per le evidenziazioni delle selezioni. Il colore non deve essere opaco per evitare di nascondere le decorazioni sottostanti.","Colore del marcatore della minimappa per la ricerca delle corrispondenze.","Colore del marcatore della minimappa per le selezioni ripetute dell'editor.","Colore del marcatore della minimappa per la selezione dell'editor.","Colore del marcatore della minimappa per le informazioni.","Colore del marcatore della minimappa per gli avvisi.","Colore del marcatore della minimappa per gli errori.","Colore di sfondo della minimappa.",'Opacit\xE0 degli elementi in primo piano di cui \xE8 stato eseguito il rendering nella minimappa. Ad esempio, con "#000000c0" il rendering degli elementi verr\xE0 eseguito con il 75% di opacit\xE0.',"Colore di sfondo del dispositivo di scorrimento della minimappa.","Colore di sfondo del dispositivo di scorrimento della minimappa al passaggio del mouse.","Colore di sfondo del dispositivo di scorrimento della minimappa quando si fa clic con il mouse.","Colore usato per l'icona di errore dei problemi.","Colore usato per l'icona di avviso dei problemi.","Colore usato per l'icona informazioni dei problemi.","Colore primo piano usato nei grafici.","Colore usato per le linee orizzontali nei grafici.","Colore rosso usato nelle visualizzazioni grafico.","Colore blu usato nelle visualizzazioni grafico.","Colore giallo usato nelle visualizzazioni grafico.","Colore arancione usato nelle visualizzazioni grafico.","Colore verde usato nelle visualizzazioni grafico.","Colore viola usato nelle visualizzazioni grafico."],"vs/platform/theme/common/iconRegistry":["ID del tipo di carattere da usare. Se non \xE8 impostato, viene usato il tipo di carattere definito per primo.","Tipo di carattere associato alla definizione di icona.","Icona dell'azione di chiusura nei widget.","Icona per la posizione di Vai a editor precedente.","Icona per la posizione di Vai a editor successivo."],"vs/platform/undoRedo/common/undoRedoService":["I file seguenti sono stati chiusi e modificati nel disco: {0}.","I file seguenti sono stati modificati in modo incompatibile: {0}.","Non \xE8 stato possibile annullare '{0}' in tutti i file. {1}","Non \xE8 stato possibile annullare '{0}' in tutti i file. {1}","Non \xE8 stato possibile annullare '{0}' in tutti i file perch\xE9 sono state apportate modifiche a {1}","Non \xE8 stato possibile annullare '{0}' su tutti i file perch\xE9 \xE8 gi\xE0 in esecuzione un'operazione di annullamento o ripetizione su {1}","Non \xE8 stato possibile annullare '{0}' su tutti i file perch\xE9 nel frattempo \xE8 stata eseguita un'operazione di annullamento o ripetizione","Annullare '{0}' in tutti i file?","&&Annulla in {0} file","Annulla questo &&file","Non \xE8 stato possibile annullare '{0}' perch\xE9 \xE8 gi\xE0 in esecuzione un'operazione di annullamento o ripetizione.","Annullare '{0}'?","&&S\xEC","No","Non \xE8 stato possibile ripetere '{0}' in tutti i file. {1}","Non \xE8 stato possibile ripetere '{0}' in tutti i file. {1}","Non \xE8 stato possibile ripetere '{0}' in tutti i file perch\xE9 sono state apportate modifiche a {1}","Non \xE8 stato possibile ripetere l'operazione '{0}' su tutti i file perch\xE9 \xE8 gi\xE0 in esecuzione un'operazione di annullamento o ripetizione sull'elenco di file {1}","Non \xE8 stato possibile ripetere '{0}' su tutti i file perch\xE9 nel frattempo \xE8 stata eseguita un'operazione di annullamento o ripetizione","Non \xE8 stato possibile ripetere '{0}' perch\xE9 \xE8 gi\xE0 in esecuzione un'operazione di annullamento o ripetizione."],"vs/platform/workspace/common/workspace":["Area di lavoro del codice"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.it.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.ja.js b/lib/vs/editor/editor.main.nls.ja.js deleted file mode 100644 index e7f319e..0000000 --- a/lib/vs/editor/editor.main.nls.ja.js +++ /dev/null @@ -1,31 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.ja",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["\u5165\u529B"],"vs/base/browser/ui/findinput/findInputToggles":["\u5927\u6587\u5B57\u3068\u5C0F\u6587\u5B57\u3092\u533A\u5225\u3059\u308B","\u5358\u8A9E\u5358\u4F4D\u3067\u691C\u7D22\u3059\u308B","\u6B63\u898F\u8868\u73FE\u3092\u4F7F\u7528\u3059\u308B"],"vs/base/browser/ui/findinput/replaceInput":["\u5165\u529B","\u4FDD\u6301\u3059\u308B"],"vs/base/browser/ui/hover/hoverWidget":["{0} \u3092\u4F7F\u7528\u3057\u3066\u3001\u30E6\u30FC\u30B6\u30FC\u88DC\u52A9\u5BFE\u5FDC\u306E\u30D3\u30E5\u30FC\u3067\u3053\u308C\u3092\u691C\u67FB\u3057\u307E\u3059\u3002","\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9\u3092\u4ECB\u3057\u3066\u73FE\u5728\u30C8\u30EA\u30AC\u30FC\u3067\u304D\u306A\u3044 [\u30E6\u30FC\u30B6\u30FC\u88DC\u52A9\u5BFE\u5FDC\u306E\u30D3\u30E5\u30FC\u3092\u958B\u304F] \u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u3001\u30E6\u30FC\u30B6\u30FC\u88DC\u52A9\u5BFE\u5FDC\u306E\u30D3\u30E5\u30FC\u3067\u3053\u308C\u3092\u691C\u67FB\u3057\u307E\u3059\u3002"],"vs/base/browser/ui/iconLabel/iconLabelHover":["\u8AAD\u307F\u8FBC\u307F\u4E2D..."],"vs/base/browser/ui/inputbox/inputBox":["\u30A8\u30E9\u30FC: {0}","\u8B66\u544A: {0}","\u60C5\u5831: {0}","\u5C65\u6B74\u5BFE\u8C61","\u30AF\u30EA\u30A2\u3055\u308C\u305F\u5165\u529B"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["\u30D0\u30A4\u30F3\u30C9\u306A\u3057"],"vs/base/browser/ui/selectBox/selectBoxCustom":["\u30DC\u30C3\u30AF\u30B9\u3092\u9078\u629E"],"vs/base/browser/ui/toolbar/toolbar":["\u305D\u306E\u4ED6\u306E\u64CD\u4F5C..."],"vs/base/browser/ui/tree/abstractTree":["\u30D5\u30A3\u30EB\u30BF\u30FC","\u3042\u3044\u307E\u3044\u4E00\u81F4","\u5165\u529B\u3057\u3066\u30D5\u30A3\u30EB\u30BF\u30FC","\u5165\u529B\u3057\u3066\u691C\u7D22","\u5165\u529B\u3057\u3066\u691C\u7D22","\u9589\u3058\u308B","\u8981\u7D20\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002"],"vs/base/common/actions":["(\u7A7A)"],"vs/base/common/errorMessage":["{0}: {1}","\u30B7\u30B9\u30C6\u30E0 \u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F ({0})","\u4E0D\u660E\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30ED\u30B0\u3067\u8A73\u7D30\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u4E0D\u660E\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30ED\u30B0\u3067\u8A73\u7D30\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002","{0} (\u5408\u8A08 {1} \u30A8\u30E9\u30FC)","\u4E0D\u660E\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30ED\u30B0\u3067\u8A73\u7D30\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002"],"vs/base/common/keybindingLabels":["Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","Super","Control","Shift","\u30AA\u30D7\u30B7\u30E7\u30F3","\u30B3\u30DE\u30F3\u30C9","Control","Shift","Alt","Windows","Control","Shift","Alt","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["\u30A8\u30C7\u30A3\u30BF\u30FC","\u3053\u306E\u6642\u70B9\u3067\u306F\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\u3002","{0} \u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u6700\u9069\u5316\u30E2\u30FC\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001{1} \u3092\u4F7F\u7528\u3057\u307E\u3059","{0} \u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u6700\u9069\u5316\u30E2\u30FC\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u306B\u306F\u3001{1} \u3067\u30AF\u30A4\u30C3\u30AF \u30D4\u30C3\u30AF\u3092\u958B\u304D\u3001[\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC \u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3 \u30E2\u30FC\u30C9\u306E\u5207\u308A\u66FF\u3048] \u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u73FE\u5728\u30AD\u30FC\u30DC\u30FC\u30C9\u304B\u3089\u30C8\u30EA\u30AC\u30FC\u3067\u304D\u307E\u305B\u3093\u3002","{0} {1} \u3067\u30AD\u30FC\u30D0\u30A4\u30F3\u30C9 \u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30A2\u30AF\u30BB\u30B9\u3057\u3001\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC \u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3 \u30E2\u30FC\u30C9\u306E\u5207\u308A\u66FF\u3048\u30B3\u30DE\u30F3\u30C9\u306B\u30AD\u30FC\u30D0\u30A4\u30F3\u30C9\u3092\u5272\u308A\u5F53\u3066\u3066\u5B9F\u884C\u3057\u3066\u304F\u3060\u3055\u3044\u3002"],"vs/editor/browser/coreCommands":["\u9577\u3044\u884C\u306B\u79FB\u52D5\u3057\u3066\u3082\u884C\u672B\u306B\u4F4D\u7F6E\u3057\u307E\u3059","\u9577\u3044\u884C\u306B\u79FB\u52D5\u3057\u3066\u3082\u884C\u672B\u306B\u4F4D\u7F6E\u3057\u307E\u3059","\u30BB\u30AB\u30F3\u30C0\u30EA \u30AB\u30FC\u30BD\u30EB\u304C\u524A\u9664\u3055\u308C\u307E\u3057\u305F"],"vs/editor/browser/editorExtensions":["\u5143\u306B\u623B\u3059(&&U)","\u5143\u306B\u623B\u3059","\u3084\u308A\u76F4\u3057(&&R)","\u3084\u308A\u76F4\u3057","\u3059\u3079\u3066\u9078\u629E(&&S)","\u3059\u3079\u3066\u3092\u9078\u629E"],"vs/editor/browser/widget/codeEditorWidget":["\u30AB\u30FC\u30BD\u30EB\u306E\u6570\u306F {0} \u306B\u5236\u9650\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u5927\u304D\u306A\u5909\u66F4\u3092\u884C\u3046\u5834\u5408\u306F\u3001[\u691C\u7D22\u3068\u7F6E\u63DB](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) \u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u3092\u691C\u8A0E\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u30DE\u30EB\u30C1 \u30AB\u30FC\u30BD\u30EB\u306E\u4E0A\u9650\u3092\u5897\u3084\u3059"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":["\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u9AD8\u3044\u5DEE\u5206\u30D3\u30E5\u30FC\u30A2\u30FC\u306E [\u633F\u5165] \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u9AD8\u3044\u5DEE\u5206\u30D3\u30E5\u30FC\u30A2\u30FC\u306E [\u524A\u9664] \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u9AD8\u3044\u5DEE\u5206\u30D3\u30E5\u30FC\u30A2\u30FC\u306E [\u9589\u3058\u308B] \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u9589\u3058\u308B","\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A Diff Viewer\u3002\u4E0A\u4E0B\u65B9\u5411\u30AD\u30FC\u3092\u4F7F\u7528\u3057\u3066\u79FB\u52D5\u3057\u307E\u3059\u3002","\u5909\u66F4\u3055\u308C\u305F\u884C\u306F\u3042\u308A\u307E\u305B\u3093","1 \u884C\u304C\u5909\u66F4\u3055\u308C\u307E\u3057\u305F","{0} \u884C\u304C\u5909\u66F4\u3055\u308C\u307E\u3057\u305F","\u76F8\u9055 {0}/{1}: \u5143\u306E\u884C {2}\u3001{3}\u3002\u5909\u66F4\u3055\u308C\u305F\u884C {4}\u3001{5}","\u7A7A\u767D","{0} \u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u884C {1}","{0} \u5143\u306E\u884C {1} \u5909\u66F4\u3055\u308C\u305F\u884C {2}","+ {0} \u5909\u66F4\u3055\u308C\u305F\u884C {1}","- {0} \u5143\u306E\u884C {1}"],"vs/editor/browser/widget/diffEditor/colors":["\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u79FB\u52D5\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u79FB\u52D5\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u5883\u754C\u7DDA\u306E\u8272\u3002"],"vs/editor/browser/widget/diffEditor/decorations":["\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u633F\u5165\u3092\u793A\u3059\u884C\u306E\u88C5\u98FE\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u524A\u9664\u3092\u793A\u3059\u884C\u306E\u88C5\u98FE\u3002","\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u5909\u66F4\u3092\u5143\u306B\u623B\u3059"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u9818\u57DF\u306E\u6298\u308A\u305F\u305F\u307F\u306E\u5207\u308A\u66FF\u3048","\u79FB\u52D5\u3057\u305F\u30B3\u30FC\u30C9 \u30D6\u30ED\u30C3\u30AF\u306E\u8868\u793A\u306E\u5207\u308A\u66FF\u3048","\u30B9\u30DA\u30FC\u30B9\u304C\u5236\u9650\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306B [\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D3\u30E5\u30FC\u306E\u4F7F\u7528] \u3092\u5207\u308A\u66FF\u3048\u308B","\u30B9\u30DA\u30FC\u30B9\u304C\u5236\u9650\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D3\u30E5\u30FC\u3092\u4F7F\u7528\u3059\u308B","\u79FB\u52D5\u3055\u308C\u305F\u30B3\u30FC\u30C9 \u30D6\u30ED\u30C3\u30AF\u306E\u8868\u793A","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC","\u30B5\u30A4\u30C9\u306E\u5207\u308A\u66FF\u3048","\u6BD4\u8F03\u79FB\u52D5\u306E\u7D42\u4E86","\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u3059\u3079\u3066\u306E\u30EA\u30FC\u30B8\u30E7\u30F3\u3092\u6298\u308A\u305F\u305F\u3080","\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u3059\u3079\u3066\u306E\u30EA\u30FC\u30B8\u30E7\u30F3\u3092\u8868\u793A\u3059\u308B","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u9AD8\u3044\u5DEE\u5206\u30D3\u30E5\u30FC\u30A2\u30FC","\u6B21\u306E\u5DEE\u5206\u306B\u79FB\u52D5","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u9AD8\u3044\u5DEE\u5206\u30D3\u30E5\u30FC\u30A2\u30FC\u3092\u958B\u304F","\u524D\u306E\u5DEE\u5206\u306B\u79FB\u52D5"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" {0}\u3092\u4F7F\u7528\u3057\u3066\u3001\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u30D8\u30EB\u30D7\u3092\u958B\u304D\u307E\u3059\u3002"],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u9818\u57DF\u3092\u6298\u308A\u305F\u305F\u3080","\u30AF\u30EA\u30C3\u30AF\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u4E0A\u306B\u3082\u3063\u3068\u8868\u793A\u3059\u308B","\u3059\u3079\u3066\u3092\u8868\u793A","\u30AF\u30EA\u30C3\u30AF\u307E\u305F\u306F\u30C9\u30E9\u30C3\u30B0\u3057\u3066\u4E0B\u306B\u3082\u3063\u3068\u8868\u793A\u3059\u308B","\u975E\u8868\u793A {0} \u884C","\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u5C55\u958B\u3059\u308B"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["\u524A\u9664\u3055\u308C\u305F\u884C\u306E\u30B3\u30D4\u30FC","\u524A\u9664\u3055\u308C\u305F\u884C\u306E\u30B3\u30D4\u30FC","\u5909\u66F4\u3055\u308C\u305F\u884C\u306E\u30B3\u30D4\u30FC","\u5909\u66F4\u3055\u308C\u305F\u884C\u306E\u30B3\u30D4\u30FC","\u524A\u9664\u3055\u308C\u305F\u884C\u306E\u30B3\u30D4\u30FC ({0})","\u5909\u66F4\u3055\u308C\u305F\u884C\u306E\u30B3\u30D4\u30FC ({0})","\u3053\u306E\u5909\u66F4\u3092\u5143\u306B\u623B\u3059"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["\u884C {0}-{1} \u306B\u5909\u66F4\u3092\u52A0\u3048\u3066\u30B3\u30FC\u30C9\u3092\u79FB\u52D5\u3057\u307E\u3057\u305F","\u884C {0}-{1} \u304B\u3089\u5909\u66F4\u3092\u52A0\u3048\u3066\u30B3\u30FC\u30C9\u304C\u79FB\u52D5\u3055\u308C\u307E\u3057\u305F","\u30B3\u30FC\u30C9\u3092\u884C {0}-{1} \u306B\u79FB\u52D5\u3057\u307E\u3057\u305F","\u884C {0}-{1} \u304B\u3089\u79FB\u52D5\u3055\u308C\u305F\u30B3\u30FC\u30C9"],"vs/editor/common/config/editorConfigurationSchema":["\u30A8\u30C7\u30A3\u30BF\u30FC","1 \u3064\u306E\u30BF\u30D6\u306B\u76F8\u5F53\u3059\u308B\u30B9\u30DA\u30FC\u30B9\u306E\u6570\u3002{0} \u304C\u30AA\u30F3\u306E\u5834\u5408\u3001\u3053\u306E\u8A2D\u5B9A\u306F\u30D5\u30A1\u30A4\u30EB \u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u57FA\u3065\u3044\u3066\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059\u3002",'\u30A4\u30F3\u30C7\u30F3\u30C8\u307E\u305F\u306F `"tabSize"` \u3067 `#editor.tabSize#` \u306E\u5024\u3092\u4F7F\u7528\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308B\u30B9\u30DA\u30FC\u30B9\u306E\u6570\u3002\u3053\u306E\u8A2D\u5B9A\u306F\u3001 `#editor.detectIndentation#` \u304C\u30AA\u30F3\u306E\u5834\u5408\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u5185\u5BB9\u306B\u57FA\u3065\u3044\u3066\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u307E\u3059\u3002',"`Tab` \u30AD\u30FC\u3092\u62BC\u3059\u3068\u30B9\u30DA\u30FC\u30B9\u304C\u633F\u5165\u3055\u308C\u307E\u3059\u3002{0} \u304C\u30AA\u30F3\u306E\u5834\u5408\u3001\u3053\u306E\u8A2D\u5B9A\u306F\u30D5\u30A1\u30A4\u30EB \u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u57FA\u3065\u3044\u3066\u4E0A\u66F8\u304D\u3055\u308C\u307E\u3059\u3002","\u30D5\u30A1\u30A4\u30EB\u304C\u30D5\u30A1\u30A4\u30EB\u306E\u5185\u5BB9\u306B\u57FA\u3065\u3044\u3066\u958B\u304B\u308C\u308B\u5834\u5408\u3001{0} \u3068 {1} \u3092\u81EA\u52D5\u7684\u306B\u691C\u51FA\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u81EA\u52D5\u633F\u5165\u3055\u308C\u305F\u672B\u5C3E\u306E\u7A7A\u767D\u3092\u524A\u9664\u3057\u307E\u3059\u3002","\u5927\u304D\u306A\u30D5\u30A1\u30A4\u30EB\u3067\u30E1\u30E2\u30EA\u304C\u96C6\u4E2D\u3059\u308B\u7279\u5B9A\u306E\u6A5F\u80FD\u3092\u7121\u52B9\u306B\u3059\u308B\u305F\u3081\u306E\u7279\u5225\u306A\u51E6\u7406\u3002","\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306E\u5358\u8A9E\u306B\u57FA\u3065\u3044\u3066\u5165\u529B\u5019\u88DC\u3092\u8A08\u7B97\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304B\u3089\u306E\u307F\u5358\u8A9E\u306E\u5019\u88DC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u540C\u3058\u8A00\u8A9E\u306E\u958B\u3044\u3066\u3044\u308B\u3059\u3079\u3066\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304B\u3089\u5358\u8A9E\u306E\u5019\u88DC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u958B\u3044\u3066\u3044\u308B\u3059\u3079\u3066\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u304B\u3089\u5358\u8A9E\u306E\u5019\u88DC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u5358\u8A9E\u30D9\u30FC\u30B9\u306E\u5165\u529B\u5019\u88DC\u304C\u8A08\u7B97\u3055\u308C\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30BB\u30DE\u30F3\u30C6\u30A3\u30C3\u30AF\u306E\u5F37\u8ABF\u8868\u793A\u304C\u3059\u3079\u3066\u306E\u914D\u8272\u30C6\u30FC\u30DE\u306B\u3064\u3044\u3066\u6709\u52B9\u306B\u306A\u308A\u307E\u3057\u305F\u3002","\u30BB\u30DE\u30F3\u30C6\u30A3\u30C3\u30AF\u306E\u5F37\u8ABF\u8868\u793A\u304C\u3059\u3079\u3066\u306E\u914D\u8272\u30C6\u30FC\u30DE\u306B\u3064\u3044\u3066\u7121\u52B9\u306B\u306A\u308A\u307E\u3057\u305F\u3002","\u30BB\u30DE\u30F3\u30C6\u30A3\u30C3\u30AF\u306E\u5F37\u8ABF\u8868\u793A\u306F\u3001\u73FE\u5728\u306E\u914D\u8272\u30C6\u30FC\u30DE\u306E 'semanticHighlighting' \u8A2D\u5B9A\u306B\u3088\u3063\u3066\u69CB\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002","semanticHighlighting \u3092\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u308B\u8A00\u8A9E\u3067\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u304B\u3001`Escape` \u30AD\u30FC\u3092\u62BC\u3057\u3066\u3082\u3001\u30D4\u30FC\u30AF \u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u958B\u3044\u305F\u307E\u307E\u306B\u3057\u307E\u3059\u3002","\u3053\u306E\u9577\u3055\u3092\u8D8A\u3048\u308B\u884C\u306F\u3001\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u4E0A\u306E\u7406\u7531\u306B\u3088\u308A\u30C8\u30FC\u30AF\u30F3\u5316\u3055\u308C\u307E\u305B\u3093\u3002","Web \u30EF\u30FC\u30AB\u30FC\u3067\u30C8\u30FC\u30AF\u30F3\u5316\u3092\u975E\u540C\u671F\u7684\u306B\u884C\u3046\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u975E\u540C\u671F\u30C8\u30FC\u30AF\u30F3\u5316\u3092\u30ED\u30B0\u306B\u8A18\u9332\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u30C7\u30D0\u30C3\u30B0\u7528\u306E\u307F\u3002","\u5F93\u6765\u306E\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9 \u30C8\u30FC\u30AF\u30F3\u5316\u306B\u5BFE\u3057\u3066\u975E\u540C\u671F\u30C8\u30FC\u30AF\u30F3\u5316\u3092\u691C\u8A3C\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30F3\u5316\u304C\u9045\u304F\u306A\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002\u30C7\u30D0\u30C3\u30B0\u5C02\u7528\u3067\u3059\u3002","\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u5897\u6E1B\u3059\u308B\u89D2\u304B\u3063\u3053\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002","\u5DE6\u89D2\u304B\u3063\u3053\u307E\u305F\u306F\u6587\u5B57\u5217\u30B7\u30FC\u30B1\u30F3\u30B9\u3002","\u53F3\u89D2\u304B\u3063\u3053\u307E\u305F\u306F\u6587\u5B57\u5217\u30B7\u30FC\u30B1\u30F3\u30B9\u3002","\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u5834\u5408\u3001\u5165\u308C\u5B50\u306E\u30EC\u30D9\u30EB\u306B\u3088\u3063\u3066\u8272\u4ED8\u3051\u3055\u308C\u308B\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002","\u5DE6\u89D2\u304B\u3063\u3053\u307E\u305F\u306F\u6587\u5B57\u5217\u30B7\u30FC\u30B1\u30F3\u30B9\u3002","\u53F3\u89D2\u304B\u3063\u3053\u307E\u305F\u306F\u6587\u5B57\u5217\u30B7\u30FC\u30B1\u30F3\u30B9\u3002","\u5DEE\u5206\u8A08\u7B97\u304C\u53D6\u308A\u6D88\u3055\u308C\u305F\u5F8C\u306E\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8 (\u30DF\u30EA\u79D2\u5358\u4F4D)\u3002\u30BF\u30A4\u30E0\u30A2\u30A6\u30C8\u306A\u3057\u306B\u306F 0 \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u5DEE\u5206\u3092\u8A08\u7B97\u3059\u308B\u5834\u5408\u306E\u6700\u5927\u30D5\u30A1\u30A4\u30EB \u30B5\u30A4\u30BA (MB)\u3002\u5236\u9650\u306A\u3057\u306E\u5834\u5408\u306F 0 \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u5DEE\u5206\u3092\u6A2A\u306B\u4E26\u3079\u3066\u8868\u793A\u3059\u308B\u304B\u3001\u884C\u5185\u306B\u8868\u793A\u3059\u308B\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u5E45\u304C\u3053\u306E\u5024\u3088\u308A\u5C0F\u3055\u3044\u5834\u5408\u306F\u3001\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D3\u30E5\u30FC\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u3068\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u5E45\u304C\u5C0F\u3055\u3059\u304E\u308B\u5834\u5408\u306F\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D3\u30E5\u30FC\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30B0\u30EA\u30D5\u4F59\u767D\u306B\u3001\u5909\u66F4\u3092\u5143\u306B\u623B\u3059\u305F\u3081\u306E\u77E2\u5370\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u306F\u5148\u982D\u307E\u305F\u306F\u672B\u5C3E\u306E\u7A7A\u767D\u6587\u5B57\u306E\u5909\u66F4\u3092\u7121\u8996\u3057\u307E\u3059\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u8FFD\u52A0/\u524A\u9664\u3055\u308C\u305F\u5909\u66F4\u306B +/- \u30A4\u30F3\u30B8\u30B1\u30FC\u30BF\u30FC\u3092\u793A\u3059\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067 CodeLens \u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u884C\u3092\u6298\u308A\u8FD4\u3057\u307E\u305B\u3093\u3002","\u884C\u3092\u30D3\u30E5\u30FC\u30DD\u30FC\u30C8\u306E\u5E45\u3067\u6298\u308A\u8FD4\u3057\u307E\u3059\u3002","\u884C\u306F\u3001{0} \u306E\u8A2D\u5B9A\u306B\u5F93\u3063\u3066\u6298\u308A\u8FD4\u3055\u308C\u307E\u3059\u3002","\u5F93\u6765\u306E\u5DEE\u5206\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u9AD8\u5EA6\u306A\u5DEE\u5206\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u9818\u57DF\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u672A\u5909\u66F4\u306E\u9818\u57DF\u306B\u4F7F\u7528\u3055\u308C\u308B\u7DDA\u306E\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u9818\u57DF\u306E\u6700\u5C0F\u5024\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u308B\u7DDA\u306E\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u9818\u57DF\u3092\u6BD4\u8F03\u3059\u308B\u3068\u304D\u306B\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u308B\u884C\u306E\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u691C\u51FA\u3055\u308C\u305F\u30B3\u30FC\u30C9\u306E\u79FB\u52D5\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u6587\u5B57\u304C\u633F\u5165\u307E\u305F\u306F\u524A\u9664\u3055\u308C\u305F\u5834\u6240\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u3001\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u7A7A\u306E\u88C5\u98FE\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002"],"vs/editor/common/config/editorOptions":["\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0 API \u3092\u4F7F\u7528\u3057\u3066\u3001\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u304C\u3044\u3064\u63A5\u7D9A\u3055\u308C\u305F\u304B\u3092\u691C\u51FA\u3059\u308B","\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u3067\u306E\u4F7F\u7528\u306B\u6700\u9069\u5316\u3059\u308B","\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u304C\u63A5\u7D9A\u3055\u308C\u3066\u3044\u306A\u3044\u3068\u4EEE\u5B9A\u3059\u308B","\u3053\u306E UI \u3092\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u306B\u6700\u9069\u5316\u3055\u308C\u305F\u30E2\u30FC\u30C9\u3067\u5B9F\u884C\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30B3\u30E1\u30F3\u30C8\u6642\u306B\u7A7A\u767D\u6587\u5B57\u3092\u633F\u5165\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u884C\u30B3\u30E1\u30F3\u30C8\u306E\u8FFD\u52A0\u307E\u305F\u306F\u524A\u9664\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u5207\u308A\u66FF\u3048\u3067\u3001\u7A7A\u306E\u884C\u3092\u7121\u8996\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u9078\u629E\u7BC4\u56F2\u3092\u6307\u5B9A\u3057\u306A\u3044\u3067\u30B3\u30D4\u30FC\u3059\u308B\u5834\u5408\u306B\u73FE\u5728\u306E\u884C\u3092\u30B3\u30D4\u30FC\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5165\u529B\u4E2D\u306B\u4E00\u81F4\u3092\u691C\u7D22\u3059\u308B\u305F\u3081\u306B\u30AB\u30FC\u30BD\u30EB\u3092\u30B8\u30E3\u30F3\u30D7\u3055\u305B\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9078\u629E\u7BC4\u56F2\u304B\u3089\u691C\u7D22\u6587\u5B57\u5217\u3092\u30B7\u30FC\u30C9\u3057\u307E\u305B\u3093\u3002","\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E\u306B\u3042\u308B\u5358\u8A9E\u3092\u542B\u3081\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9078\u629E\u7BC4\u56F2\u304B\u3089\u691C\u7D22\u6587\u5B57\u5217\u3092\u5E38\u306B\u30B7\u30FC\u30C9\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9078\u629E\u7BC4\u56F2\u304B\u3089\u691C\u7D22\u6587\u5B57\u5217\u306E\u307F\u3092\u30B7\u30FC\u30C9\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9078\u629E\u7BC4\u56F2\u304B\u3089\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u306E\u691C\u7D22\u6587\u5B57\u5217\u3092\u4E0E\u3048\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","[\u9078\u629E\u7BC4\u56F2\u3092\u691C\u7D22] \u3092\u81EA\u52D5\u7684\u306B\u30AA\u30F3\u306B\u3057\u307E\u305B\u3093 (\u65E2\u5B9A)\u3002","[\u9078\u629E\u7BC4\u56F2\u3092\u691C\u7D22] \u3092\u5E38\u306B\u81EA\u52D5\u7684\u306B\u30AA\u30F3\u306B\u3057\u307E\u3059\u3002","\u8907\u6570\u884C\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306F\u3001[\u9078\u629E\u7BC4\u56F2\u3092\u691C\u7D22] \u3092\u81EA\u52D5\u7684\u306B\u30AA\u30F3\u306B\u3057\u307E\u3059\u3002","[\u9078\u629E\u7BC4\u56F2\u3092\u691C\u7D22] \u3092\u81EA\u52D5\u7684\u306B\u30AA\u30F3\u306B\u3059\u308B\u6761\u4EF6\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","macOS \u3067\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u5171\u6709\u306E\u691C\u7D22\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u3092\u8AAD\u307F\u53D6\u308A\u307E\u305F\u306F\u5909\u66F4\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4E0A\u306B\u884C\u3092\u3055\u3089\u306B\u8FFD\u52A0\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002true \u306E\u5834\u5408\u3001\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u3068\u304D\u306B\u6700\u521D\u306E\u884C\u3092\u8D85\u3048\u3066\u30B9\u30AF\u30ED\u30FC\u30EB\u3067\u304D\u307E\u3059\u3002","\u4EE5\u964D\u3067\u4E00\u81F4\u304C\u898B\u3064\u304B\u3089\u306A\u3044\u5834\u5408\u306B\u3001\u691C\u7D22\u3092\u5148\u982D\u304B\u3089 (\u307E\u305F\u306F\u672B\u5C3E\u304B\u3089) \u81EA\u52D5\u7684\u306B\u518D\u5B9F\u884C\u3059\u308B\u304B\u3069\u3046\u304B\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30D5\u30A9\u30F3\u30C8\u306E\u5408\u5B57 ('calt' \u304A\u3088\u3073 'liga' \u30D5\u30A9\u30F3\u30C8\u306E\u6A5F\u80FD) \u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002'font-feature-settings' CSS \u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u8A73\u7D30\u306B\u5236\u5FA1\u3059\u308B\u306B\u306F\u3001\u3053\u308C\u3092\u6587\u5B57\u5217\u306B\u5909\u66F4\u3057\u307E\u3059\u3002","\u660E\u793A\u7684\u306A 'font-feature-settings' CSS \u30D7\u30ED\u30D1\u30C6\u30A3\u3002\u5408\u5B57\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u306E\u304C 1 \u3064\u3060\u3051\u3067\u3042\u308B\u5834\u5408\u306F\u3001\u4EE3\u308F\u308A\u306B\u30D6\u30FC\u30EB\u5024\u3092\u6E21\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002","\u30D5\u30A9\u30F3\u30C8\u306E\u5408\u5B57\u3084\u30D5\u30A9\u30F3\u30C8\u306E\u6A5F\u80FD\u3092\u69CB\u6210\u3057\u307E\u3059\u3002\u5408\u5B57\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B\u30D6\u30FC\u30EB\u5024\u307E\u305F\u306F CSS 'font-feature-settings' \u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u306E\u6587\u5B57\u5217\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002","font-weight \u304B\u3089 font-variation-settings \u3078\u306E\u5909\u63DB\u3092\u6709\u52B9/\u7121\u52B9\u306B\u3057\u307E\u3059\u3002'font-variation-settings' CSS \u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u7D30\u304B\u304F\u5236\u5FA1\u3059\u308B\u305F\u3081\u306B\u3001\u3053\u308C\u3092\u6587\u5B57\u5217\u306B\u5909\u66F4\u3057\u307E\u3059\u3002","\u660E\u793A\u7684\u306A 'font-variation-settings' CSS \u30D7\u30ED\u30D1\u30C6\u30A3\u3002font-weight \u3092 font-variation-settings \u306B\u5909\u63DB\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u3060\u3051\u3067\u3042\u308C\u3070\u3001\u4EE3\u308F\u308A\u306B\u30D6\u30FC\u30EB\u5024\u3092\u6E21\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002","\u30D5\u30A9\u30F3\u30C8\u306E\u30D0\u30EA\u30A8\u30FC\u30B7\u30E7\u30F3\u3092\u69CB\u6210\u3057\u307E\u3059\u3002font-weight \u304B\u3089 font-variation-settings \u3078\u306E\u5909\u63DB\u3092\u6709\u52B9/\u7121\u52B9\u306B\u3059\u308B\u30D6\u30FC\u30EB\u5024\u3001\u307E\u305F\u306F CSS 'font-variation-settings' \u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u306E\u6587\u5B57\u5217\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002","\u30D5\u30A9\u30F3\u30C8 \u30B5\u30A4\u30BA (\u30D4\u30AF\u30BB\u30EB\u5358\u4F4D) \u3092\u5236\u5FA1\u3057\u307E\u3059\u3002",'\u4F7F\u7528\u3067\u304D\u308B\u306E\u306F "\u6A19\u6E96" \u304A\u3088\u3073 "\u592A\u5B57" \u306E\u30AD\u30FC\u30EF\u30FC\u30C9\u307E\u305F\u306F 1 \uFF5E 1000 \u306E\u6570\u5B57\u306E\u307F\u3067\u3059\u3002','\u30D5\u30A9\u30F3\u30C8\u306E\u592A\u3055\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002"\u6A19\u6E96" \u304A\u3088\u3073 "\u592A\u5B57" \u306E\u30AD\u30FC\u30EF\u30FC\u30C9\u307E\u305F\u306F 1 \uFF5E 1000 \u306E\u6570\u5B57\u3092\u53D7\u3051\u5165\u308C\u307E\u3059\u3002',"\u7D50\u679C\u306E\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u3092\u8868\u793A (\u65E2\u5B9A)","\u4E3B\u306A\u7D50\u679C\u306B\u79FB\u52D5\u3057\u3001\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u3092\u8868\u793A\u3057\u307E\u3059","\u30D7\u30E9\u30A4\u30DE\u30EA\u7D50\u679C\u306B\u79FB\u52D5\u3057\u3001\u4ED6\u306E\u30E6\u30FC\u30B6\u30FC\u3078\u306E\u30D4\u30FC\u30AF\u30EC\u30B9 \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3057\u307E\u3059","\u3053\u306E\u8A2D\u5B9A\u306F\u975E\u63A8\u5968\u3067\u3059\u3002\u4EE3\u308F\u308A\u306B\u3001'editor.editor.gotoLocation.multipleDefinitions' \u3084 'editor.editor.gotoLocation.multipleImplementations' \u306A\u3069\u306E\u500B\u5225\u306E\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u8907\u6570\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u5834\u6240\u304C\u3042\u308B\u3068\u304D\u306E '\u5B9A\u7FA9\u3078\u79FB\u52D5' \u30B3\u30DE\u30F3\u30C9\u306E\u52D5\u4F5C\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8907\u6570\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u5834\u6240\u304C\u3042\u308B\u3068\u304D\u306E '\u578B\u5B9A\u7FA9\u3078\u79FB\u52D5' \u30B3\u30DE\u30F3\u30C9\u306E\u52D5\u4F5C\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8907\u6570\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u5834\u6240\u304C\u3042\u308B\u3068\u304D\u306E '\u5BA3\u8A00\u3078\u79FB\u52D5' \u30B3\u30DE\u30F3\u30C9\u306E\u52D5\u4F5C\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8907\u6570\u306E\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u5834\u6240\u304C\u3042\u308B\u3068\u304D\u306E '\u5B9F\u88C5\u306B\u79FB\u52D5' \u30B3\u30DE\u30F3\u30C9\u306E\u52D5\u4F5C\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30BF\u30FC\u30B2\u30C3\u30C8\u306E\u5834\u6240\u304C\u8907\u6570\u5B58\u5728\u3059\u308B\u5834\u5408\u306E '\u53C2\u7167\u3078\u79FB\u52D5' \u30B3\u30DE\u30F3\u30C9\u306E\u52D5\u4F5C\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","'\u5B9A\u7FA9\u3078\u79FB\u52D5' \u306E\u7D50\u679C\u304C\u73FE\u5728\u306E\u5834\u6240\u3067\u3042\u308B\u5834\u5408\u306B\u5B9F\u884C\u3055\u308C\u308B\u4EE3\u66FF\u30B3\u30DE\u30F3\u30C9 ID\u3002","'\u578B\u5B9A\u7FA9\u3078\u79FB\u52D5' \u306E\u7D50\u679C\u304C\u73FE\u5728\u306E\u5834\u6240\u3067\u3042\u308B\u5834\u5408\u306B\u5B9F\u884C\u3055\u308C\u308B\u4EE3\u66FF\u30B3\u30DE\u30F3\u30C9 ID\u3002","'\u5BA3\u8A00\u3078\u79FB\u52D5' \u306E\u7D50\u679C\u304C\u73FE\u5728\u306E\u5834\u6240\u3067\u3042\u308B\u5834\u5408\u306B\u5B9F\u884C\u3055\u308C\u308B\u4EE3\u66FF\u30B3\u30DE\u30F3\u30C9 ID\u3002","'\u5B9F\u88C5\u3078\u79FB\u52D5' \u306E\u7D50\u679C\u304C\u73FE\u5728\u306E\u5834\u6240\u3067\u3042\u308B\u5834\u5408\u306B\u5B9F\u884C\u3055\u308C\u308B\u4EE3\u66FF\u30B3\u30DE\u30F3\u30C9 ID\u3002","'\u53C2\u7167\u3078\u79FB\u52D5' \u306E\u7D50\u679C\u304C\u73FE\u5728\u306E\u5834\u6240\u3067\u3042\u308B\u5834\u5408\u306B\u5B9F\u884C\u3055\u308C\u308B\u4EE3\u66FF\u30B3\u30DE\u30F3\u30C9 ID\u3002","\u30DB\u30D0\u30FC\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DB\u30D0\u30FC\u3092\u8868\u793A\u5F8C\u306E\u5F85\u3061\u6642\u9593 (\u30DF\u30EA\u79D2) \u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DB\u30D0\u30FC\u306B\u30DE\u30A6\u30B9\u3092\u79FB\u52D5\u3057\u305F\u3068\u304D\u306B\u3001\u30DB\u30D0\u30FC\u3092\u8868\u793A\u3057\u7D9A\u3051\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DB\u30D0\u30FC\u3092\u975E\u8868\u793A\u306B\u3057\u305F\u5F8C\u306E\u9045\u5EF6\u3092\u30DF\u30EA\u79D2\u5358\u4F4D\u3067\u5236\u5FA1\u3057\u307E\u3059\u3002`editor.hover.sticky` \u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u30B9\u30DA\u30FC\u30B9\u304C\u3042\u308B\u5834\u5408\u306F\u3001\u884C\u306E\u4E0A\u306B\u30DE\u30A6\u30B9 \u30AB\u30FC\u30BD\u30EB\u3092\u88AB\u305B\u3066\u8868\u793A\u3059\u308B\u3002","\u3059\u3079\u3066\u306E\u6587\u5B57\u306E\u5E45\u304C\u540C\u3058\u3067\u3042\u308B\u3068\u4EEE\u5B9A\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30E2\u30CE\u30B9\u30DA\u30FC\u30B9 \u30D5\u30A9\u30F3\u30C8\u3084\u3001\u30B0\u30EA\u30D5\u306E\u5E45\u304C\u7B49\u3057\u3044\u7279\u5B9A\u306E\u30B9\u30AF\u30EA\u30D7\u30C8 (\u30E9\u30C6\u30F3\u6587\u5B57\u306A\u3069) \u3067\u6B63\u3057\u304F\u52D5\u4F5C\u3059\u308B\u9AD8\u901F\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3067\u3059\u3002","\u6298\u308A\u8FD4\u3057\u30DD\u30A4\u30F3\u30C8\u306E\u8A08\u7B97\u3092\u30D6\u30E9\u30A6\u30B6\u30FC\u306B\u30C7\u30EA\u30B2\u30FC\u30C8\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u5927\u304D\u306A\u30D5\u30A1\u30A4\u30EB\u306E\u30D5\u30EA\u30FC\u30BA\u3092\u5F15\u304D\u8D77\u3053\u3059\u53EF\u80FD\u6027\u304C\u3042\u308B\u3082\u306E\u306E\u3001\u3059\u3079\u3066\u306E\u30B1\u30FC\u30B9\u3067\u6B63\u3057\u304F\u52D5\u4F5C\u3059\u308B\u4F4E\u901F\u306A\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3067\u3059\u3002","\u6298\u308A\u8FD4\u3057\u30DD\u30A4\u30F3\u30C8\u3092\u8A08\u7B97\u3059\u308B\u30A2\u30EB\u30B4\u30EA\u30BA\u30E0\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3 \u30E2\u30FC\u30C9\u3067\u306F\u3001\u6700\u9AD8\u306E\u30A8\u30AF\u30B9\u30DA\u30EA\u30A8\u30F3\u30B9\u3092\u5B9F\u73FE\u3059\u308B\u305F\u3081\u306B\u8A73\u7D30\u8A2D\u5B9A\u304C\u4F7F\u7528\u3055\u308C\u308B\u3053\u3068\u306B\u3054\u6CE8\u610F\u304F\u3060\u3055\u3044\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u96FB\u7403\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u30B9\u30AF\u30ED\u30FC\u30EB\u4E2D\u306B\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4E0A\u90E8\u306B\u5165\u308C\u5B50\u306B\u306A\u3063\u305F\u73FE\u5728\u306E\u30B9\u30B3\u30FC\u30D7\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u8868\u793A\u3059\u308B\u8FFD\u5F93\u884C\u306E\u6700\u5927\u6570\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002","\u56FA\u5B9A\u3059\u308B\u884C\u3092\u6C7A\u5B9A\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u30E2\u30C7\u30EB\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3 \u30E2\u30C7\u30EB\u304C\u5B58\u5728\u3057\u306A\u3044\u5834\u5408\u3001\u30A4\u30F3\u30C7\u30F3\u30C8 \u30E2\u30C7\u30EB\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF\u3059\u308B\u6298\u308A\u305F\u305F\u307F\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC \u30E2\u30C7\u30EB\u306B\u30D5\u30A9\u30FC\u30EB\u30D0\u30C3\u30AF\u3057\u307E\u3059\u3002\u3053\u306E\u9806\u5E8F\u306F\u30013 \u3064\u306E\u30B1\u30FC\u30B9\u3059\u3079\u3066\u3067\u512A\u5148\u3055\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u6C34\u5E73\u30B9\u30AF\u30ED\u30FC\u30EB \u30D0\u30FC\u3092\u4F7F\u7528\u3057\u3066\u3001\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30B9\u30AF\u30ED\u30FC\u30EB\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30A4\u30F3\u30EC\u30FC \u30D2\u30F3\u30C8\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30EC\u30A4 \u30D2\u30F3\u30C8\u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059","\u30A4\u30F3\u30EC\u30A4 \u30D2\u30F3\u30C8\u306F\u65E2\u5B9A\u3067\u8868\u793A\u3055\u308C\u3001{0} \u3092\u62BC\u3057\u305F\u307E\u307E\u306B\u3059\u308B\u3068\u975E\u8868\u793A\u306B\u306A\u308A\u307E\u3059","\u30A4\u30F3\u30EC\u30A4 \u30D2\u30F3\u30C8\u306F\u65E2\u5B9A\u3067\u306F\u975E\u8868\u793A\u306B\u306A\u308A\u3001{0} \u3092\u62BC\u3057\u305F\u307E\u307E\u306B\u3059\u308B\u3068\u8868\u793A\u3055\u308C\u307E\u3059","\u30A4\u30F3\u30EC\u30A4 \u30D2\u30F3\u30C8\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u306E\u89E3\u8AAC\u30D2\u30F3\u30C8\u306E\u30D5\u30A9\u30F3\u30C8 \u30B5\u30A4\u30BA\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u65E2\u5B9A\u3067\u306F\u3001{0} \u306F\u3001\u69CB\u6210\u3055\u308C\u305F\u5024\u304C {1} \u3088\u308A\u5C0F\u3055\u3044\u304B\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30D5\u30A9\u30F3\u30C8 \u30B5\u30A4\u30BA\u3088\u308A\u5927\u304D\u3044\u5834\u5408\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u89E3\u8AAC\u30D2\u30F3\u30C8\u306E\u30D5\u30A9\u30F3\u30C8 \u30D5\u30A1\u30DF\u30EA\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u7A7A\u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001 {0} \u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u306E\u30A4\u30F3\u30EC\u30A4 \u30D2\u30F3\u30C8\u306B\u95A2\u3059\u308B\u30D1\u30C7\u30A3\u30F3\u30B0\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002",`\u884C\u306E\u9AD8\u3055\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\r - - 0 \u3092\u4F7F\u7528\u3057\u3066\u30D5\u30A9\u30F3\u30C8 \u30B5\u30A4\u30BA\u304B\u3089\u884C\u306E\u9AD8\u3055\u3092\u81EA\u52D5\u7684\u306B\u8A08\u7B97\u3057\u307E\u3059\u3002\r - - 0 \u304B\u3089 8 \u307E\u3067\u306E\u5024\u306F\u3001\u30D5\u30A9\u30F3\u30C8 \u30B5\u30A4\u30BA\u306E\u4E57\u6570\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\r - - 8 \u4EE5\u4E0A\u306E\u5024\u306F\u6709\u52B9\u5024\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002`,"\u30DF\u30CB\u30DE\u30C3\u30D7\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u3092\u81EA\u52D5\u7684\u306B\u975E\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u306E\u30B5\u30A4\u30BA\u306F\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u3068\u540C\u3058\u3067\u3059 (\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u5834\u5408\u304C\u3042\u308A\u307E\u3059)\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u306F\u3001\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9AD8\u3055\u3092\u57CB\u3081\u308B\u305F\u3081\u3001\u62E1\u5927\u307E\u305F\u306F\u7E2E\u5C0F\u3057\u307E\u3059 (\u30B9\u30AF\u30ED\u30FC\u30EB\u3057\u307E\u305B\u3093)\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u306F\u5FC5\u8981\u306B\u5FDC\u3058\u3066\u7E2E\u5C0F\u3057\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u3088\u308A\u5927\u304D\u304F\u306A\u308B\u3053\u3068\u306F\u3042\u308A\u307E\u305B\u3093 (\u30B9\u30AF\u30ED\u30FC\u30EB\u3057\u307E\u305B\u3093)\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u306E\u30B5\u30A4\u30BA\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u3092\u8868\u793A\u3059\u308B\u5834\u6240\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7 \u30B9\u30E9\u30A4\u30C0\u30FC\u3092\u8868\u793A\u3059\u308B\u30BF\u30A4\u30DF\u30F3\u30B0\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u306B\u63CF\u753B\u3055\u308C\u308B\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u30B9\u30B1\u30FC\u30EB: 1\u30012\u3001\u307E\u305F\u306F 3\u3002","\u884C\u306B\u30AB\u30E9\u30FC \u30D6\u30ED\u30C3\u30AF\u3067\u306F\u306A\u304F\u5B9F\u969B\u306E\u6587\u5B57\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u8868\u793A\u3059\u308B\u30DF\u30CB\u30DE\u30C3\u30D7\u306E\u6700\u5927\u5E45\u3092\u7279\u5B9A\u306E\u5217\u6570\u306B\u5236\u9650\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4E0A\u7AEF\u3068\u6700\u521D\u306E\u884C\u306E\u9593\u306E\u4F59\u767D\u306E\u5927\u304D\u3055\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4E0B\u7AEF\u3068\u6700\u5F8C\u306E\u884C\u306E\u9593\u306E\u4F59\u767D\u306E\u5927\u304D\u3055\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5165\u529B\u6642\u306B\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3068\u578B\u60C5\u5831\u3092\u8868\u793A\u3059\u308B\u30DD\u30C3\u30D7\u30A2\u30C3\u30D7\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30D2\u30F3\u30C8 \u30E1\u30CB\u30E5\u30FC\u3092\u5468\u56DE\u3059\u308B\u304B\u3001\u30EA\u30B9\u30C8\u306E\u6700\u5F8C\u3067\u9589\u3058\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u63D0\u6848\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u306B\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u308B","\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u304C\u30B4\u30FC\u30B9\u30C8 \u30C6\u30AD\u30B9\u30C8\u3068\u3057\u3066\u8868\u793A\u3055\u308C\u308B","\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059","\u6587\u5B57\u5217\u5185\u3067\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u30B3\u30E1\u30F3\u30C8\u5185\u3067\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u6587\u5B57\u5217\u304A\u3088\u3073\u30B3\u30E1\u30F3\u30C8\u5916\u3067\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u5165\u529B\u4E2D\u306B\u5019\u88DC\u3092\u81EA\u52D5\u7684\u306B\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u30B3\u30E1\u30F3\u30C8\u3001\u6587\u5B57\u5217\u3001\u305D\u306E\u4ED6\u30B3\u30FC\u30C9\u306E\u5165\u529B\u7528\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u3059\u3002\u30AF\u30A4\u30C3\u30AF\u63D0\u6848\u306F\u3001\u30B4\u30FC\u30B9\u30C8 \u30C6\u30AD\u30B9\u30C8\u3068\u3057\u3066\u8868\u793A\u3059\u308B\u304B\u3001\u63D0\u6848\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3067\u8868\u793A\u3059\u308B\u3088\u3046\u306B\u69CB\u6210\u3067\u304D\u307E\u3059\u3002\u307E\u305F\u3001'{0}' \u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u3053\u308C\u306F\u3001\u63D0\u6848\u304C\u7279\u6B8A\u6587\u5B57\u306B\u3088\u3063\u3066\u30C8\u30EA\u30AC\u30FC\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3059\u308B\u8A2D\u5B9A\u3067\u3059\u3002","\u884C\u756A\u53F7\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002","\u884C\u756A\u53F7\u306F\u3001\u7D76\u5BFE\u5024\u3068\u3057\u3066\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u884C\u756A\u53F7\u306F\u3001\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E\u307E\u3067\u306E\u884C\u6570\u3068\u3057\u3066\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u884C\u756A\u53F7\u306F 10 \u884C\u3054\u3068\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u884C\u756A\u53F7\u306E\u8868\u793A\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u3053\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30EB\u30FC\u30E9\u30FC\u304C\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3059\u308B\u5358\u4E00\u9818\u57DF\u306E\u6587\u5B57\u6570\u3002","\u3053\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30EB\u30FC\u30E9\u30FC\u306E\u8272\u3067\u3059\u3002","\u7279\u5B9A\u306E\u7B49\u5E45\u6587\u5B57\u6570\u306E\u5F8C\u306B\u5782\u76F4\u30EB\u30FC\u30E9\u30FC\u3092\u8868\u793A\u3057\u307E\u3059\u3002\u8907\u6570\u306E\u30EB\u30FC\u30E9\u30FC\u306B\u306F\u8907\u6570\u306E\u5024\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u914D\u5217\u304C\u7A7A\u306E\u5834\u5408\u306F\u30EB\u30FC\u30E9\u30FC\u3092\u8868\u793A\u3057\u307E\u305B\u3093\u3002","\u5782\u76F4\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306F\u3001\u5FC5\u8981\u306A\u5834\u5408\u306B\u306E\u307F\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u5782\u76F4\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306F\u5E38\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u5782\u76F4\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306F\u5E38\u306B\u975E\u8868\u793A\u306B\u306A\u308A\u307E\u3059\u3002","\u5782\u76F4\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306E\u8868\u793A\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u6C34\u5E73\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306F\u3001\u5FC5\u8981\u306A\u5834\u5408\u306B\u306E\u307F\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6C34\u5E73\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306F\u5E38\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6C34\u5E73\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306F\u5E38\u306B\u975E\u8868\u793A\u306B\u306A\u308A\u307E\u3059\u3002","\u6C34\u5E73\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306E\u8868\u793A\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5782\u76F4\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306E\u5E45\u3002","\u6C34\u5E73\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306E\u9AD8\u3055\u3002","\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u30DA\u30FC\u30B8\u5358\u4F4D\u3067\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u304B\u3001\u30AF\u30EA\u30C3\u30AF\u4F4D\u7F6E\u306B\u30B8\u30E3\u30F3\u30D7\u3059\u308B\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u57FA\u672C ASCII \u4EE5\u5916\u306E\u3059\u3079\u3066\u306E\u6587\u5B57\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002U+0020 \u304B\u3089 U+007E \u306E\u9593\u306E\u6587\u5B57\u3001\u30BF\u30D6\u3001\u6539\u884C (LF)\u3001\u884C\u982D\u5FA9\u5E30\u306E\u307F\u304C\u57FA\u672C ASCII \u3068\u898B\u306A\u3055\u308C\u307E\u3059\u3002","\u7A7A\u767D\u3092\u5360\u3081\u308B\u3060\u3051\u306E\u6587\u5B57\u3084\u5E45\u304C\u307E\u3063\u305F\u304F\u306A\u3044\u6587\u5B57\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u73FE\u5728\u306E\u30E6\u30FC\u30B6\u30FC \u30ED\u30B1\u30FC\u30EB\u3067\u4E00\u822C\u7684\u306A\u6587\u5B57\u3092\u9664\u304D\u3001\u57FA\u672C\u7684\u306A ASCII \u6587\u5B57\u3068\u6DF7\u540C\u3055\u308C\u308B\u53EF\u80FD\u6027\u306E\u3042\u308B\u6587\u5B57\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30B3\u30E1\u30F3\u30C8\u5185\u306E\u6587\u5B57\u3092 Unicode \u5F37\u8ABF\u8868\u793A\u306E\u5BFE\u8C61\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u6587\u5B57\u5217\u5185\u306E\u6587\u5B57\u3092 Unicode \u5F37\u8ABF\u8868\u793A\u306E\u5BFE\u8C61\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5F37\u8ABF\u8868\u793A\u305B\u305A\u8A31\u53EF\u3055\u308C\u308B\u6587\u5B57\u3092\u5B9A\u7FA9\u3057\u307E\u3059\u3002","\u8A31\u53EF\u3055\u308C\u3066\u3044\u308B\u30ED\u30B1\u30FC\u30EB\u3067\u4E00\u822C\u7684\u306A Unicode \u6587\u5B57\u306F\u5F37\u8ABF\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u3092\u81EA\u52D5\u7684\u306B\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u308B\u305F\u3073\u306B\u3001\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u30C4\u30FC\u30EB \u30D0\u30FC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u306B\u30AB\u30FC\u30BD\u30EB\u3092\u5408\u308F\u305B\u308B\u305F\u3073\u306B\u3001\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u30C4\u30FC\u30EB \u30D0\u30FC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u30C4\u30FC\u30EB \u30D0\u30FC\u3092\u8868\u793A\u3059\u308B\u30BF\u30A4\u30DF\u30F3\u30B0\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3\u63D0\u6848\u3068\u63D0\u6848\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u76F8\u4E92\u4F5C\u7528\u306E\u65B9\u6CD5\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u6709\u52B9\u3059\u308B\u3068\u3001\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u304C\u4F7F\u7528\u53EF\u80FD\u306A\u5834\u5408\u306F\u3001\u63D0\u6848\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u81EA\u52D5\u7684\u306B\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002","\u30D6\u30E9\u30B1\u30C3\u30C8\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u304C\u6709\u52B9\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002 {0} \u3092\u4F7F\u7528\u3057\u3066\u3001\u30D6\u30E9\u30B1\u30C3\u30C8\u306E\u5F37\u8ABF\u8868\u793A\u306E\u8272\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059\u3002","\u62EC\u5F27\u306E\u5404\u7A2E\u5225\u304C\u3001\u500B\u5225\u306E\u30AB\u30E9\u30FC \u30D7\u30FC\u30EB\u3092\u4FDD\u6301\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2\u306B\u5BFE\u3057\u3066\u306E\u307F\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\u3002","\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2\u306E\u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u7E26\u306E\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2\u306E\u30AC\u30A4\u30C9\u306B\u52A0\u3048\u3066\u3001\u540C\u3058\u304F\u6C34\u5E73\u306E\u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2\u306B\u5BFE\u3057\u3066\u306E\u307F\u3001\u6C34\u5E73\u306E\u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u6C34\u5E73\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\u3002","\u6C34\u5E73\u65B9\u5411\u306E\u30D6\u30E9\u30B1\u30C3\u30C8 \u30DA\u30A2\u306E\u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u89D2\u304B\u3063\u3053\u30AC\u30A4\u30C9\u304C\u5F37\u8ABF\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3067\u3082\u3001\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u3092\u5F37\u8ABF\u8868\u793A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A4\u30F3\u30C7\u30F3\u30C8\u306E\u30AC\u30A4\u30C9\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u306E\u53F3\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u4E0A\u66F8\u304D\u305B\u305A\u306B\u5019\u88DC\u3092\u633F\u5165\u3057\u307E\u3059\u3002","\u5019\u88DC\u3092\u633F\u5165\u3057\u3001\u30AB\u30FC\u30BD\u30EB\u306E\u53F3\u306E\u30C6\u30AD\u30B9\u30C8\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3059\u3002","\u5165\u529B\u5019\u88DC\u3092\u53D7\u3051\u5165\u308C\u308B\u3068\u304D\u306B\u5358\u8A9E\u3092\u4E0A\u66F8\u304D\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u3053\u308C\u306F\u3001\u3053\u306E\u6A5F\u80FD\u306E\u5229\u7528\u3092\u9078\u629E\u3059\u308B\u62E1\u5F35\u6A5F\u80FD\u306B\u4F9D\u5B58\u3059\u308B\u3053\u3068\u306B\u3054\u6CE8\u610F\u304F\u3060\u3055\u3044\u3002","\u5019\u88DC\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u51E6\u7406\u3068\u4E26\u3073\u66FF\u3048\u3067\u3055\u3055\u3044\u306A\u5165\u529B\u30DF\u30B9\u3092\u8003\u616E\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u4E26\u3079\u66FF\u3048\u304C\u30AB\u30FC\u30BD\u30EB\u4ED8\u8FD1\u306B\u8868\u793A\u3055\u308C\u308B\u5358\u8A9E\u3092\u512A\u5148\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u4FDD\u5B58\u3055\u308C\u305F\u5019\u88DC\u30BB\u30AF\u30B7\u30E7\u30F3\u3092\u8907\u6570\u306E\u30EF\u30FC\u30AF\u30D7\u30EC\u30FC\u30B9\u3068\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u5171\u6709\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059 (`#editor.suggestSelection#` \u304C\u5FC5\u8981)\u3002","IntelliSense \u3092\u81EA\u52D5\u3067\u30C8\u30EA\u30AC\u30FC\u3059\u308B\u5834\u5408\u306B\u3001\u5E38\u306B\u5019\u88DC\u3092\u9078\u629E\u3057\u307E\u3059\u3002","IntelliSense \u3092\u81EA\u52D5\u3067\u30C8\u30EA\u30AC\u30FC\u3059\u308B\u5834\u5408\u306B\u3001\u5019\u88DC\u3092\u9078\u629E\u3057\u307E\u305B\u3093\u3002","\u30C8\u30EA\u30AC\u30FC\u6587\u5B57\u304B\u3089 IntelliSense \u3092\u30C8\u30EA\u30AC\u30FC\u3059\u308B\u5834\u5408\u306B\u306E\u307F\u3001\u5019\u88DC\u3092\u9078\u629E\u3057\u307E\u3059\u3002","\u5165\u529B\u6642\u306B IntelliSense \u3092\u30C8\u30EA\u30AC\u30FC\u3059\u308B\u5834\u5408\u306B\u306E\u307F\u3001\u5019\u88DC\u3092\u9078\u629E\u3057\u307E\u3059\u3002","\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u8868\u793A\u3059\u308B\u969B\u306B\u5019\u88DC\u3092\u9078\u629E\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u3053\u3061\u3089\u306F\u81EA\u52D5\u7684\u306B\u30C8\u30EA\u30AC\u30FC\u3055\u308C\u308B\u5019\u88DC ('#editor.quickSuggestions#' \u3068 '#editor.suggestOnTriggerCharacters#') \u306B\u306E\u307F\u9069\u7528\u3055\u308C\u3001('Ctrl+Space' \u306A\u3069\u3092\u901A\u3058\u3066) \u660E\u793A\u7684\u306B\u547C\u3073\u51FA\u3055\u308C\u308B\u969B\u306B\u306F\u5E38\u306B\u5019\u88DC\u304C\u9078\u629E\u3055\u308C\u308B\u3053\u3068\u306B\u3054\u6CE8\u610F\u304F\u3060\u3055\u3044\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6 \u30B9\u30CB\u30DA\u30C3\u30C8\u304C\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u3092\u9632\u6B62\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u63D0\u6848\u306E\u30A2\u30A4\u30B3\u30F3\u3092\u8868\u793A\u3059\u308B\u304B\u3001\u975E\u8868\u793A\u306B\u3059\u308B\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u4E0B\u90E8\u306B\u3042\u308B\u30B9\u30C6\u30FC\u30BF\u30B9 \u30D0\u30FC\u306E\u8868\u793A\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u63D0\u6848\u306E\u7D50\u679C\u3092\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5019\u88DC\u306E\u8A73\u7D30\u3092\u30E9\u30D9\u30EB\u4ED8\u304D\u306E\u30A4\u30F3\u30E9\u30A4\u30F3\u3067\u8868\u793A\u3059\u308B\u304B\u3001\u8A73\u7D30\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u306E\u307F\u8868\u793A\u3059\u308B\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u3053\u306E\u8A2D\u5B9A\u306F\u975E\u63A8\u5968\u3067\u3059\u3002\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30B5\u30A4\u30BA\u5909\u66F4\u304C\u3067\u304D\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002","\u3053\u306E\u8A2D\u5B9A\u306F\u975E\u63A8\u5968\u3067\u3059\u3002\u4EE3\u308F\u308A\u306B\u3001'editor.suggest.showKeywords' \u3084 'editor.suggest.showSnippets' \u306A\u3069\u306E\u500B\u5225\u306E\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30E1\u30BD\u30C3\u30C9` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u95A2\u6570` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FC` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u975E\u63A8\u5968` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u51E6\u7406\u3067\u306F\u3001\u5358\u8A9E\u306E\u5148\u982D\u3067\u6700\u521D\u306E\u6587\u5B57\u304C\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001`Console` \u3084 `WebContext` \u306E\u5834\u5408\u306F `c`\u3001`description` \u306E\u5834\u5408\u306F _not_ \u3067\u3059\u3002\u7121\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306F\u3088\u308A\u591A\u304F\u306E\u7D50\u679C\u3092\u8868\u793A\u3057\u307E\u3059\u304C\u3001\u4E00\u81F4\u54C1\u8CEA\u3067\u4E26\u3079\u66FF\u3048\u3089\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30D5\u30A3\u30FC\u30EB\u30C9` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u5909\u6570` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B '\u30AF\u30E9\u30B9' \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u69CB\u9020\u4F53` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30E2\u30B8\u30E5\u30FC\u30EB` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30D7\u30ED\u30D1\u30C6\u30A3` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30A4\u30D9\u30F3\u30C8` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u6F14\u7B97\u5B50` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30E6\u30CB\u30C3\u30C8` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u5024` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u5B9A\u6570` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u5217\u6319\u578B` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `enumMember` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30AD\u30FC\u30EF\u30FC\u30C9` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B '\u30C6\u30AD\u30B9\u30C8' -\u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u8272` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B '\u30D5\u30A1\u30A4\u30EB' \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u53C2\u7167` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `customcolor` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30D5\u30A9\u30EB\u30C0\u30FC` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `typeParameter` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B `\u30B9\u30CB\u30DA\u30C3\u30C8` \u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306A\u5834\u5408\u3001IntelliSense \u306B\u3088\u3063\u3066 '\u30E6\u30FC\u30B6\u30FC' \u5019\u88DC\u304C\u793A\u3055\u308C\u307E\u3059\u3002","\u6709\u52B9\u306B\u3059\u308B\u3068\u3001IntelliSense \u306B\u3088\u3063\u3066 '\u554F\u984C' \u5019\u88DC\u304C\u793A\u3055\u308C\u307E\u3059\u3002","\u5148\u982D\u3068\u672B\u5C3E\u306E\u7A7A\u767D\u3092\u5E38\u306B\u9078\u629E\u3059\u308B\u304B\u3069\u3046\u304B\u3002","\u30B5\u30D6\u30EF\u30FC\u30C9 ('fooBar' \u306E 'foo' \u307E\u305F\u306F 'foo_bar' \u306A\u3069) \u3092\u9078\u629E\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u3069\u3046\u304B\u3002","\u30A4\u30F3\u30C7\u30F3\u30C8\u3057\u307E\u305B\u3093\u3002 \u6298\u308A\u8FD4\u3057\u884C\u306F\u5217 1 \u304B\u3089\u59CB\u307E\u308A\u307E\u3059\u3002","\u6298\u308A\u8FD4\u3057\u884C\u306F\u3001\u89AA\u3068\u540C\u3058\u30A4\u30F3\u30C7\u30F3\u30C8\u306B\u306A\u308A\u307E\u3059\u3002","\u6298\u308A\u8FD4\u3057\u884C\u306F\u3001\u89AA +1 \u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u306B\u306A\u308A\u307E\u3059\u3002","\u6298\u308A\u8FD4\u3057\u884C\u306F\u3001\u89AA +2 \u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u306B\u306A\u308A\u307E\u3059\u3002","\u6298\u308A\u8FD4\u3057\u884C\u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","(\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30D5\u30A1\u30A4\u30EB\u3092\u958B\u304F\u4EE3\u308F\u308A\u306B) 'shift' \u3092\u62BC\u3057\u306A\u304C\u3089\u30C6\u30AD\u30B9\u30C8 \u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30E9\u30C3\u30B0 \u30A2\u30F3\u30C9 \u30C9\u30ED\u30C3\u30D7\u3067\u304D\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30D5\u30A1\u30A4\u30EB\u3092\u30C9\u30ED\u30C3\u30D7\u3059\u308B\u3068\u304D\u306B\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u3053\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3067\u306F\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u30C9\u30ED\u30C3\u30D7\u65B9\u6CD5\u3092\u5236\u5FA1\u3067\u304D\u307E\u3059\u3002","\u30D5\u30A1\u30A4\u30EB\u304C\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30C9\u30ED\u30C3\u30D7\u3055\u308C\u305F\u5F8C\u306B\u3001\u30C9\u30ED\u30C3\u30D7 \u30BB\u30EC\u30AF\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u30C9\u30ED\u30C3\u30D7 \u30BB\u30EC\u30AF\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u8868\u793A\u3057\u307E\u305B\u3093\u3002\u4EE3\u308F\u308A\u306B\u3001\u65E2\u5B9A\u306E\u30C9\u30ED\u30C3\u30D7 \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u5E38\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u3055\u307E\u3056\u307E\u306A\u65B9\u6CD5\u3067\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8CBC\u308A\u4ED8\u3051\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u8CBC\u308A\u4ED8\u3051\u308B\u3068\u304D\u306B\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u3053\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30D5\u30A1\u30A4\u30EB\u306E\u8CBC\u308A\u4ED8\u3051\u65B9\u6CD5\u3092\u5236\u5FA1\u3067\u304D\u307E\u3059\u3002","\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u8CBC\u308A\u4ED8\u3051\u305F\u5F8C\u3001\u8CBC\u308A\u4ED8\u3051\u30BB\u30EC\u30AF\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u8CBC\u308A\u4ED8\u3051\u30BB\u30EC\u30AF\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u8868\u793A\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u4EE3\u308F\u308A\u306B\u3001\u65E2\u5B9A\u306E\u8CBC\u308A\u4ED8\u3051\u52D5\u4F5C\u304C\u5E38\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30B3\u30DF\u30C3\u30C8\u6587\u5B57\u3067\u5019\u88DC\u3092\u53D7\u3051\u5165\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001JavaScript \u3067\u306F\u30BB\u30DF\u30B3\u30ED\u30F3 (`;`) \u3092\u30B3\u30DF\u30C3\u30C8\u6587\u5B57\u306B\u3057\u3066\u3001\u5019\u88DC\u3092\u53D7\u3051\u5165\u308C\u3066\u305D\u306E\u6587\u5B57\u3092\u5165\u529B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u307E\u3059\u3002","\u30C6\u30AD\u30B9\u30C8\u306E\u5909\u66F4\u3092\u884C\u3046\u3068\u304D\u3001`Enter` \u3092\u4F7F\u7528\u3059\u308B\u5834\u5408\u306B\u306E\u307F\u5019\u88DC\u3092\u53D7\u3051\u4ED8\u3051\u307E\u3059\u3002","`Tab` \u30AD\u30FC\u306B\u52A0\u3048\u3066 `Enter` \u30AD\u30FC\u3067\u5019\u88DC\u3092\u53D7\u3051\u5165\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u6539\u884C\u306E\u633F\u5165\u3084\u5019\u88DC\u306E\u53CD\u6620\u306E\u9593\u3067\u3042\u3044\u307E\u3044\u3055\u3092\u89E3\u6D88\u3059\u308B\u306E\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002","\u4E00\u5EA6\u306B\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u306B\u3088\u3063\u3066\u8AAD\u307F\u4E0A\u3052\u308B\u3053\u3068\u304C\u3067\u304D\u308B\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u884C\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u304C\u691C\u51FA\u3055\u308C\u308B\u3068\u3001\u65E2\u5B9A\u5024\u304C 500 \u306B\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u8B66\u544A: \u65E2\u5B9A\u5024\u3088\u308A\u5927\u304D\u3044\u6570\u5024\u306E\u5834\u5408\u306F\u3001\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u306B\u5F71\u97FF\u304C\u3042\u308A\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B3\u30F3\u30C6\u30F3\u30C4","\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC\u306B\u3088\u3063\u3066\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u304C\u8AAD\u307F\u4E0A\u3052\u3089\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8A00\u8A9E\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u3001\u3044\u3064\u304B\u3063\u3053\u3092\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u3059\u308B\u304B\u6C7A\u5B9A\u3057\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u304C\u7A7A\u767D\u6587\u5B57\u306E\u5DE6\u306B\u3042\u308B\u3068\u304D\u3060\u3051\u3001\u304B\u3063\u3053\u3092\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u5DE6\u89D2\u304B\u3063\u3053\u3092\u8FFD\u52A0\u3057\u305F\u5F8C\u306B\u81EA\u52D5\u7684\u306B\u53F3\u89D2\u304B\u3063\u3053\u3092\u633F\u5165\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8A00\u8A9E\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u3001\u3044\u3064\u304B\u3063\u3053\u3092\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u3059\u308B\u304B\u6C7A\u5B9A\u3057\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u304C\u7A7A\u767D\u6587\u5B57\u306E\u5DE6\u306B\u3042\u308B\u3068\u304D\u3060\u3051\u3001\u30B3\u30E1\u30F3\u30C8\u3092\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u5DE6\u89D2\u304B\u3063\u3053\u3092\u8FFD\u52A0\u3057\u305F\u5F8C\u306B\u81EA\u52D5\u7684\u306B\u53F3\u89D2\u304B\u3063\u3053\u3092\u633F\u5165\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u96A3\u63A5\u3059\u308B\u7D42\u308F\u308A\u5F15\u7528\u7B26\u307E\u305F\u306F\u62EC\u5F27\u304C\u81EA\u52D5\u7684\u306B\u633F\u5165\u3055\u308C\u305F\u5834\u5408\u306B\u306E\u307F\u3001\u305D\u308C\u3089\u3092\u524A\u9664\u3057\u307E\u3059\u3002","\u524A\u9664\u6642\u306B\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u96A3\u63A5\u3059\u308B\u7D42\u308F\u308A\u5F15\u7528\u7B26\u307E\u305F\u306F\u62EC\u5F27\u3092\u524A\u9664\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u7D42\u308F\u308A\u5F15\u7528\u7B26\u307E\u305F\u306F\u62EC\u5F27\u304C\u81EA\u52D5\u7684\u306B\u633F\u5165\u3055\u308C\u305F\u5834\u5408\u306B\u306E\u307F\u3001\u305D\u308C\u3089\u3092\u4E0A\u66F8\u304D\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u7D42\u308F\u308A\u5F15\u7528\u7B26\u307E\u305F\u306F\u62EC\u5F27\u3092\u4E0A\u66F8\u304D\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8A00\u8A9E\u8A2D\u5B9A\u3092\u4F7F\u7528\u3057\u3066\u3001\u3044\u3064\u5F15\u7528\u7B26\u3092\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u3059\u308B\u304B\u6C7A\u5B9A\u3057\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u304C\u7A7A\u767D\u6587\u5B57\u306E\u5DE6\u306B\u3042\u308B\u3068\u304D\u3060\u3051\u3001\u5F15\u7528\u7B26\u3092\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u3057\u307E\u3059\u3002","\u30E6\u30FC\u30B6\u30FC\u304C\u958B\u59CB\u5F15\u7528\u7B26\u3092\u8FFD\u52A0\u3057\u305F\u5F8C\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u81EA\u52D5\u7684\u306B\u5F15\u7528\u7B26\u3092\u9589\u3058\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306F\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u81EA\u52D5\u7684\u306B\u633F\u5165\u3057\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306F\u3001\u73FE\u5728\u306E\u884C\u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u4FDD\u6301\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306F\u3001\u73FE\u5728\u306E\u884C\u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u4FDD\u6301\u3057\u3001\u8A00\u8A9E\u304C\u5B9A\u7FA9\u3055\u308C\u305F\u304B\u3063\u3053\u3092\u512A\u5148\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306F\u3001\u73FE\u5728\u306E\u884C\u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u4FDD\u6301\u3057\u3001\u8A00\u8A9E\u304C\u5B9A\u7FA9\u3055\u308C\u305F\u304B\u3063\u3053\u3092\u512A\u5148\u3057\u3001\u8A00\u8A9E\u3067\u5B9A\u7FA9\u3055\u308C\u305F\u7279\u5225\u306A onEnterRules \u3092\u547C\u3073\u51FA\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306F\u3001\u73FE\u5728\u306E\u884C\u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u4FDD\u6301\u3057\u3001\u8A00\u8A9E\u304C\u5B9A\u7FA9\u3055\u308C\u305F\u304B\u3063\u3053\u3092\u512A\u5148\u3057\u3001\u8A00\u8A9E\u3067\u5B9A\u7FA9\u3055\u308C\u305F\u7279\u5225\u306A onEnterRules \u3092\u547C\u3073\u51FA\u3057\u3001\u8A00\u8A9E\u3067\u5B9A\u7FA9\u3055\u308C\u305F indentationRules \u3092\u512A\u5148\u3057\u307E\u3059\u3002","\u30E6\u30FC\u30B6\u30FC\u304C\u884C\u3092\u5165\u529B\u3001\u8CBC\u308A\u4ED8\u3051\u3001\u79FB\u52D5\u3001\u307E\u305F\u306F\u30A4\u30F3\u30C7\u30F3\u30C8\u3059\u308B\u3068\u304D\u306B\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u81EA\u52D5\u7684\u306B\u8ABF\u6574\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8A00\u8A9E\u69CB\u6210\u3092\u4F7F\u7528\u3057\u3066\u3001\u9078\u629E\u7BC4\u56F2\u3092\u3044\u3064\u81EA\u52D5\u7684\u306B\u56F2\u3080\u304B\u3092\u5224\u65AD\u3057\u307E\u3059\u3002","\u89D2\u304B\u3063\u3053\u3067\u306F\u306A\u304F\u3001\u5F15\u7528\u7B26\u3067\u56F2\u307F\u307E\u3059\u3002","\u5F15\u7528\u7B26\u3067\u306F\u306A\u304F\u3001\u89D2\u304B\u3063\u3053\u3067\u56F2\u307F\u307E\u3059\u3002","\u5F15\u7528\u7B26\u307E\u305F\u306F\u89D2\u304B\u3063\u3053\u3092\u5165\u529B\u3059\u308B\u3068\u304D\u306B\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u9078\u629E\u7BC4\u56F2\u3092\u81EA\u52D5\u7684\u306B\u56F2\u3080\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30C7\u30F3\u30C8\u306B\u30B9\u30DA\u30FC\u30B9\u3092\u4F7F\u7528\u3059\u308B\u3068\u304D\u306F\u3001\u30BF\u30D6\u6587\u5B57\u306E\u9078\u629E\u52D5\u4F5C\u3092\u30A8\u30DF\u30E5\u30EC\u30FC\u30C8\u3057\u307E\u3059\u3002\u9078\u629E\u7BC4\u56F2\u306F\u30BF\u30D6\u4F4D\u7F6E\u306B\u7559\u307E\u308A\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067 CodeLens \u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","CodeLens \u306E\u30D5\u30A9\u30F3\u30C8 \u30D5\u30A1\u30DF\u30EA\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","CodeLens \u306E\u30D5\u30A9\u30F3\u30C8 \u30B5\u30A4\u30BA\u3092\u30D4\u30AF\u30BB\u30EB\u5358\u4F4D\u3067\u5236\u5FA1\u3057\u307E\u3059\u30020 \u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001`#editor.fontSize#` \u306E 90% \u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30A4\u30F3\u30E9\u30A4\u30F3 \u30AB\u30E9\u30FC \u30C7\u30B3\u30EC\u30FC\u30BF\u30FC\u3068\u8272\u306E\u9078\u629E\u3092\u8868\u793A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30AB\u30E9\u30FC \u30C7\u30B3\u30EC\u30FC\u30BF\u30FC\u306E\u30AF\u30EA\u30C3\u30AF\u6642\u3068\u30DD\u30A4\u30F3\u30C8\u6642\u306E\u4E21\u65B9\u306B\u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3092\u8868\u793A\u3059\u308B","\u30AB\u30E9\u30FC \u30C7\u30B3\u30EC\u30FC\u30BF\u30FC\u306E\u30DD\u30A4\u30F3\u30C8\u6642\u306B\u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3092\u8868\u793A\u3059\u308B","\u30AB\u30E9\u30FC \u30C7\u30B3\u30EC\u30FC\u30BF\u30FC\u306E\u30AF\u30EA\u30C3\u30AF\u6642\u306B\u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3092\u8868\u793A\u3059\u308B","\u30AB\u30E9\u30FC \u30C7\u30B3\u30EC\u30FC\u30BF\u30FC\u304B\u3089\u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3092\u8868\u793A\u3059\u308B\u6761\u4EF6\u3092\u5236\u5FA1\u3057\u307E\u3059","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u4E00\u5EA6\u306B\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3067\u304D\u308B\u30AB\u30E9\u30FC \u30C7\u30B3\u30EC\u30FC\u30BF\u30FC\u306E\u6700\u5927\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DE\u30A6\u30B9\u3068\u30AD\u30FC\u3067\u306E\u9078\u629E\u306B\u3088\u308A\u5217\u306E\u9078\u629E\u3092\u5B9F\u884C\u3067\u304D\u308B\u3088\u3046\u306B\u3057\u307E\u3059\u3002","\u69CB\u6587\u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u306B\u30B3\u30D4\u30FC\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u306E\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u65B9\u5F0F\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30B9\u30E0\u30FC\u30BA \u30AD\u30E3\u30EC\u30C3\u30C8 \u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002","\u30B9\u30E0\u30FC\u30BA \u30AD\u30E3\u30EC\u30C3\u30C8 \u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u306F\u3001\u30E6\u30FC\u30B6\u30FC\u304C\u660E\u793A\u7684\u306A\u30B8\u30A7\u30B9\u30C1\u30E3\u3067\u30AB\u30FC\u30BD\u30EB\u3092\u79FB\u52D5\u3057\u305F\u5834\u5408\u306B\u306E\u307F\u6709\u52B9\u306B\u306A\u308A\u307E\u3059\u3002","\u30B9\u30E0\u30FC\u30BA \u30AD\u30E3\u30EC\u30C3\u30C8 \u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u306F\u5E38\u306B\u6709\u52B9\u3067\u3059\u3002","\u6ED1\u3089\u304B\u306A\u30AD\u30E3\u30EC\u30C3\u30C8\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u3092\u6709\u52B9\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u306E\u30B9\u30BF\u30A4\u30EB\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u524D\u5F8C\u306E\u8868\u793A\u53EF\u80FD\u306A\u5148\u982D\u306E\u884C (\u6700\u5C0F 0) \u3068\u672B\u5C3E\u306E\u884C (\u6700\u5C0F 1) \u306E\u6700\u5C0F\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u4ED6\u306E\u4E00\u90E8\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u306F 'scrollOff' \u307E\u305F\u306F 'scrollOffset' \u3068\u547C\u3070\u308C\u307E\u3059\u3002","`cursorSurroundingLines` \u306F\u3001\u30AD\u30FC\u30DC\u30FC\u30C9\u307E\u305F\u306F API \u3067\u30C8\u30EA\u30AC\u30FC\u3055\u308C\u305F\u5834\u5408\u306B\u306E\u307F\u5F37\u5236\u3055\u308C\u307E\u3059\u3002","`cursorSurroundingLines` \u306F\u5E38\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002","`#cursorSurroundingLines#` \u3092\u9069\u7528\u3059\u308B\u30BF\u30A4\u30DF\u30F3\u30B0\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","`#editor.cursorStyle#` \u304C `line` \u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30AB\u30FC\u30BD\u30EB\u306E\u5E45\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30C9\u30E9\u30C3\u30B0 \u30A2\u30F3\u30C9 \u30C9\u30ED\u30C3\u30D7\u306B\u3088\u308B\u9078\u629E\u7BC4\u56F2\u306E\u79FB\u52D5\u3092\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u8A31\u53EF\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","SVGS \u3067\u65B0\u3057\u3044\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u65B9\u6CD5\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u30D5\u30A9\u30F3\u30C8\u6587\u5B57\u306B\u65B0\u3057\u3044\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u65B9\u6CD5\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u5B89\u5B9A\u3057\u305F\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u65B9\u6CD5\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u65B0\u3057\u3044\u8A66\u9A13\u7684\u306A\u30E1\u30BD\u30C3\u30C9\u3092\u4F7F\u7528\u3057\u3066\u7A7A\u767D\u3092\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","`Alt` \u3092\u62BC\u3059\u3068\u3001\u30B9\u30AF\u30ED\u30FC\u30EB\u901F\u5EA6\u304C\u500D\u5897\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30B3\u30FC\u30C9\u306E\u6298\u308A\u305F\u305F\u307F\u3092\u6709\u52B9\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5229\u7528\u53EF\u80FD\u306A\u5834\u5408\u306F\u8A00\u8A9E\u56FA\u6709\u306E\u6298\u308A\u305F\u305F\u307F\u65B9\u6CD5\u3092\u4F7F\u7528\u3057\u3001\u5229\u7528\u53EF\u80FD\u3067\u306F\u306A\u3044\u5834\u5408\u306F\u30A4\u30F3\u30C7\u30F3\u30C8\u30D9\u30FC\u30B9\u306E\u65B9\u6CD5\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30C7\u30F3\u30C8\u30D9\u30FC\u30B9\u306E\u6298\u308A\u305F\u305F\u307F\u65B9\u6CD5\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u6298\u308A\u305F\u305F\u307F\u7BC4\u56F2\u306E\u8A08\u7B97\u65B9\u6CD5\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u6298\u308A\u305F\u305F\u307E\u308C\u305F\u7BC4\u56F2\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u30A4\u30F3\u30DD\u30FC\u30C8\u7BC4\u56F2\u3092\u81EA\u52D5\u7684\u306B\u6298\u308A\u305F\u305F\u3080\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u6298\u308A\u305F\u305F\u307F\u53EF\u80FD\u306A\u9818\u57DF\u306E\u6700\u5927\u6570\u3067\u3059\u3002\u3053\u306E\u5024\u3092\u5927\u304D\u304F\u3059\u308B\u3068\u3001\u73FE\u5728\u306E\u30BD\u30FC\u30B9\u306B\u591A\u6570\u306E\u6298\u308A\u305F\u305F\u307F\u53EF\u80FD\u306A\u9818\u57DF\u304C\u3042\u308B\u5834\u5408\u306B\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u5FDC\u7B54\u6027\u304C\u4F4E\u4E0B\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002","\u6298\u308A\u305F\u305F\u307E\u308C\u305F\u884C\u306E\u5F8C\u306E\u7A7A\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u884C\u304C\u5C55\u958B\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30D5\u30A9\u30F3\u30C8 \u30D5\u30A1\u30DF\u30EA\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u8CBC\u308A\u4ED8\u3051\u305F\u5185\u5BB9\u304C\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u3088\u308A\u81EA\u52D5\u7684\u306B\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u30D5\u30A9\u30FC\u30DE\u30C3\u30BF\u3092\u4F7F\u7528\u53EF\u80FD\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u307E\u305F\u3001\u30D5\u30A9\u30FC\u30DE\u30C3\u30BF\u304C\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306E\u7BC4\u56F2\u3092\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3067\u304D\u306A\u3051\u308C\u3070\u306A\u308A\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u5165\u529B\u5F8C\u306B\u81EA\u52D5\u7684\u306B\u884C\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u3092\u884C\u3046\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u7E26\u306E\u30B0\u30EA\u30D5\u4F59\u767D\u304C\u8868\u793A\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u307B\u3068\u3093\u3069\u306E\u5834\u5408\u3001\u30B0\u30EA\u30D5\u4F59\u767D\u306F\u30C7\u30D0\u30C3\u30B0\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u3067\u30AB\u30FC\u30BD\u30EB\u3092\u975E\u8868\u793A\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u6587\u5B57\u9593\u9694 (\u30D4\u30AF\u30BB\u30EB\u5358\u4F4D) \u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30EA\u30F3\u30AF\u3055\u308C\u305F\u7DE8\u96C6\u304C\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u6709\u52B9\u306B\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u8A00\u8A9E\u306B\u3088\u3063\u3066\u306F\u3001\u7DE8\u96C6\u4E2D\u306B HTML \u30BF\u30B0\u306A\u3069\u306E\u95A2\u9023\u3059\u308B\u8A18\u53F7\u304C\u66F4\u65B0\u3055\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u30EA\u30F3\u30AF\u3092\u691C\u51FA\u3057\u3066\u30AF\u30EA\u30C3\u30AF\u53EF\u80FD\u306A\u72B6\u614B\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5BFE\u5FDC\u3059\u308B\u304B\u3063\u3053\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u30DE\u30A6\u30B9 \u30DB\u30A4\u30FC\u30EB \u30B9\u30AF\u30ED\u30FC\u30EB \u30A4\u30D9\u30F3\u30C8\u306E `deltaX` \u3068 `deltaY` \u3067\u4F7F\u7528\u3055\u308C\u308B\u4E57\u6570\u3002","`Ctrl` \u30AD\u30FC\u3092\u62BC\u3057\u306A\u304C\u3089\u30DE\u30A6\u30B9 \u30DB\u30A4\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u3066\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30D5\u30A9\u30F3\u30C8\u3092\u30BA\u30FC\u30E0\u3057\u307E\u3059\u3002","\u8907\u6570\u306E\u30AB\u30FC\u30BD\u30EB\u304C\u91CD\u306A\u3063\u3066\u3044\u308B\u3068\u304D\u306F\u3001\u30DE\u30FC\u30B8\u3057\u307E\u3059\u3002","Windows \u304A\u3088\u3073 Linux \u4E0A\u306E `Control` \u30AD\u30FC\u3068 macOS \u4E0A\u306E `Command` \u30AD\u30FC\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002","Windows \u304A\u3088\u3073 Linux \u4E0A\u306E `Alt` \u30AD\u30FC\u3068 macOS \u4E0A\u306E `Option` \u30AD\u30FC\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002","\u30DE\u30A6\u30B9\u3092\u4F7F\u7528\u3057\u3066\u8907\u6570\u306E\u30AB\u30FC\u30BD\u30EB\u3092\u8FFD\u52A0\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3059\u308B\u4FEE\u98FE\u5B50\u3002[\u5B9A\u7FA9\u306B\u79FB\u52D5] \u304A\u3088\u3073 [\u30EA\u30F3\u30AF\u3092\u958B\u304F] \u30DE\u30A6\u30B9 \u30B8\u30A7\u30B9\u30C1\u30E3\u306F\u3001[multicursor \u4FEE\u98FE\u5B50](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier) \u3068\u7AF6\u5408\u3057\u306A\u3044\u3088\u3046\u306B\u8ABF\u6574\u3055\u308C\u307E\u3059\u3002","\u30AB\u30FC\u30BD\u30EB\u3054\u3068\u306B\u30C6\u30AD\u30B9\u30C8\u3092 1 \u884C\u305A\u3064\u8CBC\u308A\u4ED8\u3051\u307E\u3059\u3002","\u5404\u30AB\u30FC\u30BD\u30EB\u306F\u5168\u6587\u3092\u8CBC\u308A\u4ED8\u3051\u307E\u3059\u3002","\u8CBC\u308A\u4ED8\u3051\u305F\u30C6\u30AD\u30B9\u30C8\u306E\u884C\u6570\u304C\u30AB\u30FC\u30BD\u30EB\u6570\u3068\u4E00\u81F4\u3059\u308B\u5834\u5408\u306E\u8CBC\u308A\u4ED8\u3051\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u4E00\u5EA6\u306B\u914D\u7F6E\u3067\u304D\u308B\u30AB\u30FC\u30BD\u30EB\u306E\u6700\u5927\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30BB\u30DE\u30F3\u30C6\u30A3\u30C3\u30AF \u30B7\u30F3\u30DC\u30EB\u306E\u51FA\u73FE\u7B87\u6240\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u5468\u56F2\u306B\u5883\u754C\u7DDA\u304C\u63CF\u753B\u3055\u308C\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30D4\u30FC\u30AF\u3092\u958B\u304F\u3068\u304D\u306B\u30C4\u30EA\u30FC\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u3059\u308B","\u30D4\u30FC\u30AF\u3092\u958B\u304F\u3068\u304D\u306B\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u3059\u308B","\u30D4\u30FC\u30AF \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30A4\u30F3\u30E9\u30A4\u30F3 \u30A8\u30C7\u30A3\u30BF\u30FC\u307E\u305F\u306F\u30C4\u30EA\u30FC\u3092\u30D5\u30A9\u30FC\u30AB\u30B9\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","[\u5B9A\u7FA9\u3078\u79FB\u52D5] \u30DE\u30A6\u30B9 \u30B8\u30A7\u30B9\u30C1\u30E3\u30FC\u3067\u3001\u5E38\u306B\u30D4\u30FC\u30AF \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u958B\u304F\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30AF\u30A4\u30C3\u30AF\u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u308B\u307E\u3067\u306E\u30DF\u30EA\u79D2\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u306E\u578B\u306E\u81EA\u52D5\u540D\u524D\u5909\u66F4\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u975E\u63A8\u5968\u3067\u3059\u3002\u4EE3\u308F\u308A\u306B\u3001`editor.linkedEditing` \u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u5236\u5FA1\u6587\u5B57\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30D5\u30A1\u30A4\u30EB\u306E\u672B\u5C3E\u304C\u6539\u884C\u306E\u5834\u5408\u306F\u3001\u6700\u5F8C\u306E\u884C\u756A\u53F7\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u4F59\u767D\u3068\u73FE\u5728\u306E\u884C\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u73FE\u5728\u306E\u884C\u3092\u3069\u306E\u3088\u3046\u306B\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308B\u5834\u5408\u306B\u306E\u307F\u73FE\u5728\u306E\u884C\u3092\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u5F37\u8ABF\u8868\u793A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5358\u8A9E\u9593\u306E\u5358\u4E00\u30B9\u30DA\u30FC\u30B9\u4EE5\u5916\u306E\u7A7A\u767D\u6587\u5B57\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u9078\u629E\u3057\u305F\u30C6\u30AD\u30B9\u30C8\u306B\u306E\u307F\u7A7A\u767D\u6587\u5B57\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u672B\u5C3E\u306E\u7A7A\u767D\u6587\u5B57\u306E\u307F\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u7A7A\u767D\u6587\u5B57\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u9078\u629E\u7BC4\u56F2\u306E\u89D2\u3092\u4E38\u304F\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u6C34\u5E73\u65B9\u5411\u306B\u4F59\u5206\u306B\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u6587\u5B57\u6570\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u6700\u5F8C\u306E\u884C\u3092\u8D8A\u3048\u3066\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5782\u76F4\u304A\u3088\u3073\u6C34\u5E73\u65B9\u5411\u306E\u4E21\u65B9\u306B\u540C\u6642\u306B\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u5834\u5408\u306F\u3001\u4E3B\u8981\u306A\u8EF8\u306B\u6CBF\u3063\u3066\u30B9\u30AF\u30ED\u30FC\u30EB\u3057\u307E\u3059\u3002\u30C8\u30E9\u30C3\u30AF\u30D1\u30C3\u30C9\u4E0A\u3067\u5782\u76F4\u65B9\u5411\u306B\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u5834\u5408\u306F\u3001\u6C34\u5E73\u30C9\u30EA\u30D5\u30C8\u3092\u9632\u6B62\u3057\u307E\u3059\u3002","Linux \u306E PRIMARY \u30AF\u30EA\u30C3\u30D7\u30DC\u30FC\u30C9\u3092\u30B5\u30DD\u30FC\u30C8\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u9078\u629E\u9805\u76EE\u3068\u985E\u4F3C\u306E\u4E00\u81F4\u9805\u76EE\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5E38\u306B\u6298\u308A\u305F\u305F\u307F\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u6298\u308A\u305F\u305F\u307F\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8868\u793A\u305B\u305A\u3001\u4F59\u767D\u306E\u30B5\u30A4\u30BA\u3092\u5C0F\u3055\u304F\u3057\u307E\u3059\u3002","\u30DE\u30A6\u30B9\u304C\u3068\u3058\u3057\u308D\u306E\u4E0A\u306B\u3042\u308B\u3068\u304D\u306B\u306E\u307F\u3001\u6298\u308A\u305F\u305F\u307F\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u3068\u3058\u3057\u308D\u306E\u6298\u308A\u305F\u305F\u307F\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8868\u793A\u3059\u308B\u30BF\u30A4\u30DF\u30F3\u30B0\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u4F7F\u7528\u3055\u308C\u3066\u3044\u306A\u3044\u30B3\u30FC\u30C9\u306E\u30D5\u30A7\u30FC\u30C9\u30A2\u30A6\u30C8\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u975E\u63A8\u5968\u306E\u5909\u6570\u306E\u53D6\u308A\u6D88\u3057\u7DDA\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u4ED6\u306E\u5019\u88DC\u306E\u4E0A\u306B\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u5019\u88DC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u4ED6\u306E\u5019\u88DC\u306E\u4E0B\u306B\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u5019\u88DC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u4ED6\u306E\u5019\u88DC\u3068\u4E00\u7DD2\u306B\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u5019\u88DC\u3092\u8868\u793A\u3057\u307E\u3059\u3002","\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u5019\u88DC\u3092\u8868\u793A\u3057\u307E\u305B\u3093\u3002","\u4ED6\u306E\u4FEE\u6B63\u5019\u88DC\u3068\u4E00\u7DD2\u306B\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3001\u304A\u3088\u3073\u305D\u306E\u4E26\u3073\u66FF\u3048\u306E\u65B9\u6CD5\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A2\u30CB\u30E1\u30FC\u30B7\u30E7\u30F3\u3067\u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3\u5165\u529B\u5019\u88DC\u304C\u8868\u793A\u3055\u308C\u305F\u3068\u304D\u306B\u3001\u30B9\u30AF\u30EA\u30FC\u30F3 \u30EA\u30FC\u30C0\u30FC \u30E6\u30FC\u30B6\u30FC\u306B\u30E6\u30FC\u30B6\u30FC\u88DC\u52A9\u30D2\u30F3\u30C8\u3092\u63D0\u4F9B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30D5\u30A9\u30F3\u30C8 \u30B5\u30A4\u30BA\u3002{0} \u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001\u5024 {1} \u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u884C\u306E\u9AD8\u3055\u3002{0} \u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001{1} \u306E\u5024\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002\u6700\u5C0F\u5024\u306F 8 \u3067\u3059\u3002","\u30C8\u30EA\u30AC\u30FC\u6587\u5B57\u306E\u5165\u529B\u6642\u306B\u5019\u88DC\u304C\u81EA\u52D5\u7684\u306B\u8868\u793A\u3055\u308C\u308B\u3088\u3046\u306B\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5E38\u306B\u6700\u521D\u306E\u5019\u88DC\u3092\u9078\u629E\u3057\u307E\u3059\u3002","`console.| -> console.log` \u306A\u3069\u3068\u9078\u629E\u5BFE\u8C61\u306B\u95A2\u3057\u3066\u5165\u529B\u3057\u306A\u3044\u9650\u308A\u306F\u3001\u6700\u8FD1\u306E\u5019\u88DC\u3092\u9078\u629E\u3057\u307E\u3059\u3002`log` \u306F\u6700\u8FD1\u5B8C\u4E86\u3057\u305F\u305F\u3081\u3067\u3059\u3002","\u3053\u308C\u3089\u306E\u5019\u88DC\u3092\u5B8C\u4E86\u3057\u305F\u4EE5\u524D\u306E\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u306B\u57FA\u3065\u3044\u3066\u5019\u88DC\u3092\u9078\u629E\u3057\u307E\u3059\u3002\u4F8B: `co -> console` \u304A\u3088\u3073 `con -> const`\u3002","\u5019\u88DC\u30EA\u30B9\u30C8\u3092\u8868\u793A\u3059\u308B\u3068\u304D\u306B\u5019\u88DC\u3092\u4E8B\u524D\u306B\u9078\u629E\u3059\u308B\u65B9\u6CD5\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30BF\u30D6\u88DC\u5B8C\u306F\u3001tab \u30AD\u30FC\u3092\u62BC\u3057\u305F\u3068\u304D\u306B\u6700\u9069\u306A\u5019\u88DC\u3092\u633F\u5165\u3057\u307E\u3059\u3002","\u30BF\u30D6\u88DC\u5B8C\u3092\u7121\u52B9\u306B\u3057\u307E\u3059\u3002","\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u304C\u4E00\u81F4\u3059\u308B\u5834\u5408\u306B\u3001\u30BF\u30D6\u3067\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u88DC\u5B8C\u3057\u307E\u3059\u3002'quickSuggestions' \u304C\u7121\u52B9\u306A\u5834\u5408\u306B\u6700\u9069\u3067\u3059\u3002","\u30BF\u30D6\u88DC\u5B8C\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\u3002","\u901A\u5E38\u3068\u306F\u7570\u306A\u308B\u884C\u306E\u7D42\u7AEF\u6587\u5B57\u306F\u81EA\u52D5\u7684\u306B\u524A\u9664\u3055\u308C\u308B\u3002","\u901A\u5E38\u3068\u306F\u7570\u306A\u308B\u884C\u306E\u7D42\u7AEF\u6587\u5B57\u306F\u7121\u8996\u3055\u308C\u308B\u3002","\u901A\u5E38\u3068\u306F\u7570\u306A\u308B\u884C\u306E\u7D42\u7AEF\u6587\u5B57\u306E\u524A\u9664\u30D7\u30ED\u30F3\u30D7\u30C8\u304C\u8868\u793A\u3055\u308C\u308B\u3002","\u554F\u984C\u3092\u8D77\u3053\u3059\u53EF\u80FD\u6027\u304C\u3042\u308B\u3001\u666E\u901A\u3067\u306F\u306A\u3044\u884C\u7D42\u7AEF\u8A18\u53F7\u306F\u524A\u9664\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u7A7A\u767D\u306E\u633F\u5165\u3084\u524A\u9664\u306F\u30BF\u30D6\u4F4D\u7F6E\u306B\u5F93\u3063\u3066\u884C\u308F\u308C\u307E\u3059\u3002","\u65E2\u5B9A\u306E\u6539\u884C\u30EB\u30FC\u30EB\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u4E2D\u56FD\u8A9E/\u65E5\u672C\u8A9E/\u97D3\u56FD\u8A9E (CJK) \u306E\u30C6\u30AD\u30B9\u30C8\u306B\u306F\u5358\u8A9E\u533A\u5207\u308A\u3092\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002CJK \u4EE5\u5916\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u52D5\u4F5C\u306F\u3001\u901A\u5E38\u306E\u5834\u5408\u3068\u540C\u3058\u3067\u3059\u3002","\u4E2D\u56FD\u8A9E/\u65E5\u672C\u8A9E/\u97D3\u56FD\u8A9E (CJK) \u30C6\u30AD\u30B9\u30C8\u306B\u4F7F\u7528\u3055\u308C\u308B\u5358\u8A9E\u533A\u5207\u308A\u898F\u5247\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u5358\u8A9E\u306B\u95A2\u9023\u3057\u305F\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u307E\u305F\u306F\u64CD\u4F5C\u3092\u5B9F\u884C\u3059\u308B\u3068\u304D\u306B\u3001\u5358\u8A9E\u306E\u533A\u5207\u308A\u6587\u5B57\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u308B\u6587\u5B57\u3002","\u884C\u3092\u6298\u308A\u8FD4\u3057\u307E\u305B\u3093\u3002","\u884C\u3092\u30D3\u30E5\u30FC\u30DD\u30FC\u30C8\u306E\u5E45\u3067\u6298\u308A\u8FD4\u3057\u307E\u3059\u3002","`#editor.wordWrapColumn#` \u3067\u884C\u3092\u6298\u308A\u8FD4\u3057\u307E\u3059\u3002","\u30D3\u30E5\u30FC\u30DD\u30FC\u30C8\u3068 `#editor.wordWrapColumn#` \u306E\u6700\u5C0F\u5024\u3067\u884C\u3092\u6298\u308A\u8FD4\u3057\u307E\u3059\u3002","\u884C\u306E\u6298\u308A\u8FD4\u3057\u65B9\u6CD5\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","`#editor.wordWrap#` \u304C `wordWrapColumn` \u307E\u305F\u306F `bounded` \u306E\u5834\u5408\u306B\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u6298\u308A\u8FD4\u3057\u6841\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u65E2\u5B9A\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8 \u30AB\u30E9\u30FC \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u3092\u4F7F\u7528\u3057\u3066\u30A4\u30F3\u30E9\u30A4\u30F3\u306E\u8272\u306E\u88C5\u98FE\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u30BF\u30D6\u3092\u53D7\u3051\u53D6\u308B\u304B\u3001\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u306B\u59D4\u306D\u3066\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3059\u308B\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002"],"vs/editor/common/core/editorColorRegistry":["\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E\u306E\u884C\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u80CC\u666F\u8272\u3002","\u30AB\u30FC\u30BD\u30EB\u4F4D\u7F6E\u306E\u884C\u306E\u5883\u754C\u7DDA\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u80CC\u666F\u8272\u3002","(Quick Open \u3084\u691C\u51FA\u6A5F\u80FD\u306A\u3069\u306B\u3088\u308A) \u5F37\u8ABF\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u7BC4\u56F2\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u5F37\u8ABF\u8868\u793A\u3055\u308C\u305F\u7BC4\u56F2\u306E\u5883\u754C\u7DDA\u306E\u80CC\u666F\u8272\u3002","\u5F37\u8ABF\u8868\u793A\u3055\u308C\u305F\u8A18\u53F7\u306E\u80CC\u666F\u8272 (\u5B9A\u7FA9\u3078\u79FB\u52D5\u3001\u6B21\u307E\u305F\u306F\u524D\u306E\u8A18\u53F7\u3078\u79FB\u52D5\u306A\u3069)\u3002\u57FA\u306B\u306A\u308B\u88C5\u98FE\u304C\u8986\u308F\u308C\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u305F\u3081\u3001\u8272\u3092\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u5F37\u8ABF\u8868\u793A\u3055\u308C\u305F\u8A18\u53F7\u306E\u5468\u308A\u306E\u5883\u754C\u7DDA\u306E\u80CC\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30AB\u30FC\u30BD\u30EB\u306E\u8272\u3002","\u9078\u629E\u3055\u308C\u305F\u6587\u5B57\u5217\u306E\u80CC\u666F\u8272\u3067\u3059\u3002\u9078\u629E\u3055\u308C\u305F\u6587\u5B57\u5217\u306E\u80CC\u666F\u8272\u3092\u30AB\u30B9\u30BF\u30DE\u30A4\u30BA\u51FA\u6765\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B9\u30DA\u30FC\u30B9\u6587\u5B57\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u884C\u756A\u53F7\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272\u3002","'editorIndentGuide.background' \u306F\u975E\u63A8\u5968\u3067\u3059\u3002\u4EE3\u308F\u308A\u306B 'editorIndentGuide.background1' \u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272\u3002","'editorIndentGuide.activeBackground' \u306F\u975E\u63A8\u5968\u3067\u3059\u3002\u4EE3\u308F\u308A\u306B 'editorIndentGuide.activeBackground1' \u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (1)\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (2)\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (3)\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (4)\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (5)\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (6)\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (1)\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (2)\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (3)\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (4)\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (5)\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u8272 (6)\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A2\u30AF\u30C6\u30A3\u30D6\u884C\u756A\u53F7\u306E\u8272","id \u306F\u4F7F\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002\u4EE3\u308F\u308A\u306B 'EditorLineNumber.activeForeground' \u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30A2\u30AF\u30C6\u30A3\u30D6\u884C\u756A\u53F7\u306E\u8272","editor.renderFinalNewline \u304C dimmed \u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u6700\u7D42\u884C\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30EB\u30FC\u30E9\u30FC\u306E\u8272\u3002","CodeLens \u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u524D\u666F\u8272\u3002","\u4E00\u81F4\u3059\u308B\u304B\u3063\u3053\u306E\u80CC\u666F\u8272","\u4E00\u81F4\u3059\u308B\u304B\u3063\u3053\u5185\u306E\u30DC\u30C3\u30AF\u30B9\u306E\u8272","\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u5883\u754C\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4F59\u767D\u306E\u80CC\u666F\u8272\u3002\u4F59\u767D\u306B\u306F\u30B0\u30EA\u30D5 \u30DE\u30FC\u30B8\u30F3\u3068\u884C\u756A\u53F7\u304C\u542B\u307E\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u306E\u4E0D\u8981\u306A (\u672A\u4F7F\u7528\u306E) \u30BD\u30FC\u30B9 \u30B3\u30FC\u30C9\u306E\u7F6B\u7DDA\u306E\u8272\u3002",`\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u4E0D\u8981\u306A (\u672A\u4F7F\u7528\u306E) \u30BD\u30FC\u30B9 \u30B3\u30FC\u30C9\u306E\u4E0D\u900F\u660E\u5EA6\u3002\u305F\u3068\u3048\u3070\u3001"#000000c0" \u306F\u4E0D\u900F\u660E\u5EA6 75% \u3067\u30B3\u30FC\u30C9\u3092\u8868\u793A\u3057\u307E\u3059\u3002\u30CF\u30A4 \u30B3\u30F3\u30C8\u30E9\u30B9\u30C8\u306E\u30C6\u30FC\u30DE\u306E\u5834\u5408\u3001'editorUnnecessaryCode.border' \u30C6\u30FC\u30DE\u8272\u3092\u4F7F\u7528\u3057\u3066\u3001\u4E0D\u8981\u306A\u30B3\u30FC\u30C9\u3092\u30D5\u30A7\u30FC\u30C9\u30A2\u30A6\u30C8\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u4E0B\u7DDA\u3092\u4ED8\u3051\u307E\u3059\u3002`,"\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u900F\u304B\u3057\u6587\u5B57\u306E\u5883\u754C\u7DDA\u306E\u8272\u3067\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u900F\u304B\u3057\u6587\u5B57\u306E\u524D\u666F\u8272\u3067\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B4\u30FC\u30B9\u30C8 \u30C6\u30AD\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002","\u7BC4\u56F2\u5F37\u8ABF\u8868\u793A\u306E\u305F\u3081\u306E\u6982\u8981\u30EB\u30FC\u30E9\u30FC \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A8\u30E9\u30FC\u3092\u793A\u3059\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u30DE\u30FC\u30AB\u30FC\u8272\u3002","\u8B66\u544A\u3092\u793A\u3059\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u30DE\u30FC\u30AB\u30FC\u8272\u3002","\u60C5\u5831\u3092\u793A\u3059\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u30DE\u30FC\u30AB\u30FC\u8272\u3002","\u89D2\u304B\u3063\u3053 (1) \u306E\u524D\u666F\u8272\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u89D2\u304B\u3063\u3053 (2) \u306E\u524D\u666F\u8272\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u89D2\u304B\u3063\u3053 (3) \u306E\u524D\u666F\u8272\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u89D2\u304B\u3063\u3053 (4) \u306E\u524D\u666F\u8272\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u89D2\u304B\u3063\u3053 (5) \u306E\u524D\u666F\u8272\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u89D2\u304B\u3063\u3053 (6) \u306E\u524D\u666F\u8272\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2\u306E\u8272\u4ED8\u3051\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u4E88\u671F\u3057\u306A\u3044\u30D6\u30E9\u30B1\u30C3\u30C8\u306E\u524D\u666F\u8272\u3002","\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (1)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (2)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (3)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (4)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (5)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (6)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (1)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (2)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (3)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (4)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (5)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u306E\u80CC\u666F\u8272 (6)\u3002\u89D2\u304B\u3063\u3053\u306E\u30DA\u30A2 \u30AC\u30A4\u30C9\u3092\u6709\u52B9\u306B\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002","Unicode \u6587\u5B57\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308B\u5883\u754C\u7DDA\u306E\u8272\u3002","Unicode \u6587\u5B57\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u308B\u80CC\u666F\u8272\u3002"],"vs/editor/common/editorContextKeys":["\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30C6\u30AD\u30B9\u30C8\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308B (\u30AB\u30FC\u30BD\u30EB\u304C\u70B9\u6EC5\u3057\u3066\u3044\u308B) \u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u307E\u305F\u306F\u30A8\u30C7\u30A3\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308B (\u4F8B: \u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308B) \u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u307E\u305F\u306F\u30EA\u30C3\u30C1 \u30C6\u30AD\u30B9\u30C8\u5165\u529B\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308B (\u30AB\u30FC\u30BD\u30EB\u304C\u70B9\u6EC5\u3057\u3066\u3044\u308B) \u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u8AAD\u307F\u53D6\u308A\u5C02\u7528\u304B\u3069\u3046\u304B","\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u304C\u57CB\u3081\u8FBC\u307F\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u79FB\u52D5\u3055\u308C\u305F\u30B3\u30FC\u30C9 \u30D6\u30ED\u30C3\u30AF\u304C\u6BD4\u8F03\u5BFE\u8C61\u3068\u3057\u3066\u9078\u629E\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u9AD8\u3044\u5DEE\u5206\u30D3\u30E5\u30FC\u30A2\u30FC\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u3092\u4E26\u3079\u3066\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3059\u308B\u304B\u3069\u3046\u304B","`editor.columnSelection` \u304C\u6709\u52B9\u306B\u306A\u3063\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30C6\u30AD\u30B9\u30C8\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u8907\u6570\u306E\u9078\u629E\u7BC4\u56F2\u304C\u3042\u308B\u304B\u3069\u3046\u304B","`Tab` \u306B\u3088\u3063\u3066\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u5916\u306B\u79FB\u52D5\u3059\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DB\u30D0\u30FC\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DB\u30D0\u30FC\u304C\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u304C\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3 \u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B","\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3 \u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u304C\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u3088\u308A\u5927\u304D\u306A\u30A8\u30C7\u30A3\u30BF\u30FC (\u4F8B: Notebooks) \u306E\u4E00\u90E8\u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u8A00\u8A9E\u8B58\u5225\u5B50","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u5165\u529B\u5019\u88DC\u9805\u76EE\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3 \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30B3\u30FC\u30C9 \u30EC\u30F3\u30BA \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u5B9A\u7FA9\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u5BA3\u8A00\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u5B9F\u88C5\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u578B\u5B9A\u7FA9\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30DB\u30D0\u30FC \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5F37\u8ABF\u8868\u793A\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8 \u30B7\u30F3\u30DC\u30EB \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u53C2\u7167\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u540D\u524D\u5909\u66F4\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30B7\u30B0\u30CD\u30C1\u30E3 \u30D8\u30EB\u30D7 \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D2\u30F3\u30C8 \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F8\u5F0F\u8A2D\u5B9A\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u9078\u629E\u66F8\u5F0F\u8A2D\u5B9A\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u8907\u6570\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u66F8\u5F0F\u8A2D\u5B9A\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u8907\u6570\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u9078\u629E\u66F8\u5F0F\u8A2D\u5B9A\u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u304C\u3042\u308B\u304B\u3069\u3046\u304B"],"vs/editor/common/languages":["\u914D\u5217","\u30D6\u30FC\u30EB\u5024","\u30AF\u30E9\u30B9","\u5B9A\u6570","\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FC","\u5217\u6319\u578B","\u5217\u6319\u578B\u30E1\u30F3\u30D0\u30FC","\u30A4\u30D9\u30F3\u30C8","\u30D5\u30A3\u30FC\u30EB\u30C9","\u30D5\u30A1\u30A4\u30EB","\u95A2\u6570","\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9","\u30AD\u30FC","\u30E1\u30BD\u30C3\u30C9","\u30E2\u30B8\u30E5\u30FC\u30EB","\u540D\u524D\u7A7A\u9593","NULL","\u6570\u5024","\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8","\u6F14\u7B97\u5B50","\u30D1\u30C3\u30B1\u30FC\u30B8","\u30D7\u30ED\u30D1\u30C6\u30A3","\u6587\u5B57\u5217","\u69CB\u9020\u4F53","\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC","\u5909\u6570","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["\u30D7\u30EC\u30FC\u30F3\u30C6\u30AD\u30B9\u30C8"],"vs/editor/common/model/editStack":["\u5165\u529B\u3057\u3066\u3044\u307E\u3059"],"vs/editor/common/standaloneStrings":["\u958B\u767A\u8005: \u30C8\u30FC\u30AF\u30F3\u306E\u691C\u67FB","\u884C/\u5217\u306B\u79FB\u52D5\u3059\u308B...","\u3059\u3079\u3066\u306E\u30AF\u30A4\u30C3\u30AF \u30A2\u30AF\u30BB\u30B9 \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u3092\u8868\u793A","\u30B3\u30DE\u30F3\u30C9 \u30D1\u30EC\u30C3\u30C8","\u30B3\u30DE\u30F3\u30C9\u306E\u8868\u793A\u3068\u5B9F\u884C","\u30B7\u30F3\u30DC\u30EB\u306B\u79FB\u52D5...","\u30AB\u30C6\u30B4\u30EA\u5225\u306E\u30B7\u30F3\u30DC\u30EB\u3078\u79FB\u52D5...","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B3\u30F3\u30C6\u30F3\u30C4","\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8868\u793A\u3059\u308B\u306B\u306F\u3001Alt+F1 \u30AD\u30FC\u3092\u62BC\u3057\u307E\u3059\u3002","\u30CF\u30A4 \u30B3\u30F3\u30C8\u30E9\u30B9\u30C8 \u30C6\u30FC\u30DE\u306E\u5207\u308A\u66FF\u3048","{1} \u500B\u306E\u30D5\u30A1\u30A4\u30EB\u306B {0} \u500B\u306E\u7DE8\u96C6\u304C\u884C\u308F\u308C\u307E\u3057\u305F"],"vs/editor/common/viewLayout/viewLineRenderer":["\u8868\u793A\u6570\u3092\u5897\u3084\u3059 ({0})","{0} \u6587\u5B57"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["\u9078\u629E\u30A2\u30F3\u30AB\u30FC","\u30A2\u30F3\u30AB\u30FC\u304C {0}:{1} \u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3057\u305F","\u9078\u629E\u30A2\u30F3\u30AB\u30FC\u306E\u8A2D\u5B9A","\u9078\u629E\u30A2\u30F3\u30AB\u30FC\u3078\u79FB\u52D5","\u30A2\u30F3\u30AB\u30FC\u304B\u3089\u30AB\u30FC\u30BD\u30EB\u3078\u9078\u629E","\u9078\u629E\u30A2\u30F3\u30AB\u30FC\u306E\u53D6\u308A\u6D88\u3057"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["\u4E00\u81F4\u3059\u308B\u30D6\u30E9\u30B1\u30C3\u30C8\u3092\u793A\u3059\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u30DE\u30FC\u30AB\u30FC\u8272\u3002","\u30D6\u30E9\u30B1\u30C3\u30C8\u3078\u79FB\u52D5","\u30D6\u30E9\u30B1\u30C3\u30C8\u306B\u9078\u629E","\u304B\u3063\u3053\u3092\u5916\u3059","\u30D6\u30E9\u30B1\u30C3\u30C8\u306B\u79FB\u52D5(&&B)"],"vs/editor/contrib/caretOperations/browser/caretOperations":["\u9078\u629E\u3057\u305F\u30C6\u30AD\u30B9\u30C8\u3092\u5DE6\u306B\u79FB\u52D5","\u9078\u629E\u3057\u305F\u30C6\u30AD\u30B9\u30C8\u3092\u53F3\u306B\u79FB\u52D5"],"vs/editor/contrib/caretOperations/browser/transpose":["\u6587\u5B57\u306E\u5165\u308C\u66FF\u3048"],"vs/editor/contrib/clipboard/browser/clipboard":["\u5207\u308A\u53D6\u308A(&&T)","\u5207\u308A\u53D6\u308A","\u5207\u308A\u53D6\u308A","\u5207\u308A\u53D6\u308A","\u30B3\u30D4\u30FC(&&C)","\u30B3\u30D4\u30FC","\u30B3\u30D4\u30FC","\u30B3\u30D4\u30FC","\u5F62\u5F0F\u3092\u6307\u5B9A\u3057\u3066\u30B3\u30D4\u30FC","\u5F62\u5F0F\u3092\u6307\u5B9A\u3057\u3066\u30B3\u30D4\u30FC","\u5171\u6709","\u5171\u6709","\u5171\u6709","\u8CBC\u308A\u4ED8\u3051(&&P)","\u8CBC\u308A\u4ED8\u3051","\u8CBC\u308A\u4ED8\u3051","\u8CBC\u308A\u4ED8\u3051","\u69CB\u6587\u3092\u5F37\u8ABF\u8868\u793A\u3057\u3066\u30B3\u30D4\u30FC"],"vs/editor/contrib/codeAction/browser/codeAction":["\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u9069\u7528\u4E2D\u306B\u4E0D\u660E\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["\u5B9F\u884C\u3059\u308B\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u7A2E\u985E\u3002","\u8FD4\u3055\u308C\u305F\u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u9069\u7528\u3055\u308C\u308B\u30BF\u30A4\u30DF\u30F3\u30B0\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u6700\u521D\u306B\u8FD4\u3055\u308C\u305F\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u5E38\u306B\u9069\u7528\u3057\u307E\u3059\u3002","\u6700\u521D\u306B\u8FD4\u3055\u308C\u305F\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u4EE5\u5916\u306B\u8FD4\u3055\u308C\u305F\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u306A\u3044\u5834\u5408\u306F\u3001\u305D\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u9069\u7528\u3057\u307E\u3059\u3002","\u8FD4\u3055\u308C\u305F\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u9069\u7528\u3057\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002","\u512A\u5148\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u307F\u3092\u8FD4\u3059\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30AF\u30A4\u30C3\u30AF \u30D5\u30A3\u30C3\u30AF\u30B9...","\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u3042\u308A\u307E\u305B\u3093","'{0}' \u306B\u5BFE\u3057\u3066\u4F7F\u7528\u3067\u304D\u308B\u512A\u5148\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093","{0}' \u306B\u5BFE\u3057\u3066\u4F7F\u7528\u3067\u304D\u308B\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093","\u4F7F\u7528\u3067\u304D\u308B\u512A\u5148\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093","\u5229\u7528\u53EF\u80FD\u306A\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u3042\u308A\u307E\u305B\u3093","\u30EA\u30D5\u30A1\u30AF\u30BF\u30FC...","'{0}' \u306B\u5BFE\u3057\u3066\u4F7F\u7528\u3067\u304D\u308B\u512A\u5148\u30EA\u30D5\u30A1\u30AF\u30BF\u30EA\u30F3\u30B0\u304C\u3042\u308A\u307E\u305B\u3093","'{0}' \u306B\u5BFE\u3057\u3066\u4F7F\u7528\u3067\u304D\u308B\u30EA\u30D5\u30A1\u30AF\u30BF\u30EA\u30F3\u30B0\u304C\u3042\u308A\u307E\u305B\u3093","\u4F7F\u7528\u3067\u304D\u308B\u512A\u5148\u30EA\u30D5\u30A1\u30AF\u30BF\u30EA\u30F3\u30B0\u304C\u3042\u308A\u307E\u305B\u3093","\u5229\u7528\u53EF\u80FD\u306A\u30EA\u30D5\u30A1\u30AF\u30BF\u30EA\u30F3\u30B0\u306F\u3042\u308A\u307E\u305B\u3093","\u30BD\u30FC\u30B9 \u30A2\u30AF\u30B7\u30E7\u30F3...","'{0}' \u306B\u5BFE\u3057\u3066\u4F7F\u7528\u3067\u304D\u308B\u512A\u5148\u30BD\u30FC\u30B9 \u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093","'{0}' \u306B\u5BFE\u3057\u3066\u4F7F\u7528\u3067\u304D\u308B\u30BD\u30FC\u30B9 \u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093","\u4F7F\u7528\u3067\u304D\u308B\u512A\u5148\u30BD\u30FC\u30B9 \u30A2\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093","\u5229\u7528\u53EF\u80FD\u306A\u30BD\u30FC\u30B9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u3042\u308A\u307E\u305B\u3093","\u30A4\u30F3\u30DD\u30FC\u30C8\u3092\u6574\u7406","\u5229\u7528\u53EF\u80FD\u306A\u30A4\u30F3\u30DD\u30FC\u30C8\u306E\u6574\u7406\u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u3042\u308A\u307E\u305B\u3093","\u3059\u3079\u3066\u4FEE\u6B63","\u3059\u3079\u3066\u3092\u4FEE\u6B63\u3059\u308B\u30A2\u30AF\u30B7\u30E7\u30F3\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093","\u81EA\u52D5\u4FEE\u6B63...","\u5229\u7528\u53EF\u80FD\u306A\u81EA\u52D5\u4FEE\u6B63\u306F\u3042\u308A\u307E\u305B\u3093"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3 \u30E1\u30CB\u30E5\u30FC\u3067\u306E\u30B0\u30EB\u30FC\u30D7 \u30D8\u30C3\u30C0\u30FC\u306E\u8868\u793A\u306E\u6709\u52B9/\u7121\u52B9\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002","\u73FE\u5728\u8A3A\u65AD\u3092\u884C\u3063\u3066\u3044\u306A\u3044\u5834\u5408\u306B\u3001\u884C\u5185\u3067\u6700\u3082\u8FD1\u3044\u30AF\u30A4\u30C3\u30AF\u4FEE\u6B63\u3092\u8868\u793A\u3059\u308B\u6A5F\u80FD\u3092\u6709\u52B9/\u7121\u52B9\u306B\u3057\u307E\u3059\u3002"],"vs/editor/contrib/codeAction/browser/codeActionController":["\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8: {1} \u884C {2} \u5217 \u306E {0}\u3002","\u7121\u52B9\u306A\u3082\u306E\u3092\u975E\u8868\u793A","\u7121\u52B9\u3092\u8868\u793A"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["\u305D\u306E\u4ED6\u306E\u64CD\u4F5C...","\u30AF\u30A4\u30C3\u30AF\u4FEE\u6B63","\u62BD\u51FA","\u30A4\u30F3\u30E9\u30A4\u30F3","\u518D\u66F8\u304D\u8FBC\u307F\u3059\u308B","\u79FB\u52D5","\u30D6\u30ED\u30C3\u30AF\u306E\u633F\u5165","\u30BD\u30FC\u30B9 \u30A2\u30AF\u30B7\u30E7\u30F3..."],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["\u30B3\u30FC\u30C9\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u8868\u793A\u3057\u307E\u3059\u3002\u4F7F\u7528\u53EF\u80FD\u306A\u512A\u5148\u306E\u30AF\u30A4\u30C3\u30AF\u4FEE\u6B63 ({0})","\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u8868\u793A ({0})","\u30B3\u30FC\u30C9 \u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u8868\u793A"],"vs/editor/contrib/codelens/browser/codelensController":["\u73FE\u5728\u306E\u884C\u306E\u30B3\u30FC\u30C9 \u30EC\u30F3\u30BA \u30B3\u30DE\u30F3\u30C9\u3092\u8868\u793A","\u30B3\u30DE\u30F3\u30C9\u306E\u9078\u629E"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u8272\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u5207\u308A\u66FF\u3048\u307E\u3059 (rgb/hsl/hex)","\u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3092\u9589\u3058\u308B\u30A2\u30A4\u30B3\u30F3"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3 \u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u306E\u8868\u793A\u307E\u305F\u306F\u30D5\u30A9\u30FC\u30AB\u30B9","\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3 \u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u306E\u8868\u793A\u307E\u305F\u306F\u30D5\u30A9\u30FC\u30AB\u30B9(&S)","\u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3092\u975E\u8868\u793A\u306B\u3059\u308B","\u30B9\u30BF\u30F3\u30C9\u30A2\u30ED\u30F3 \u30AB\u30E9\u30FC \u30D4\u30C3\u30AB\u30FC\u3067\u8272\u3092\u633F\u5165"],"vs/editor/contrib/comment/browser/comment":["\u884C\u30B3\u30E1\u30F3\u30C8\u306E\u5207\u308A\u66FF\u3048","\u884C\u30B3\u30E1\u30F3\u30C8\u306E\u5207\u308A\u66FF\u3048(&&T)","\u884C\u30B3\u30E1\u30F3\u30C8\u306E\u8FFD\u52A0","\u884C\u30B3\u30E1\u30F3\u30C8\u306E\u524A\u9664","\u30D6\u30ED\u30C3\u30AF \u30B3\u30E1\u30F3\u30C8\u306E\u5207\u308A\u66FF\u3048","\u30D6\u30ED\u30C3\u30AF \u30B3\u30E1\u30F3\u30C8\u306E\u5207\u308A\u66FF\u3048(&&B)"],"vs/editor/contrib/contextmenu/browser/contextmenu":["\u30DF\u30CB\u30DE\u30C3\u30D7","\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u6587\u5B57","\u5782\u76F4\u65B9\u5411\u306E\u30B5\u30A4\u30BA","\u5747\u7B49","\u5857\u308A\u3064\u3076\u3057","\u30B5\u30A4\u30BA\u306B\u5408\u308F\u305B\u3066\u8ABF\u6574","\u30B9\u30E9\u30A4\u30C0\u30FC","\u30DE\u30A6\u30B9 \u30AA\u30FC\u30D0\u30FC","\u5E38\u306B","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8 \u30E1\u30CB\u30E5\u30FC\u306E\u8868\u793A"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["\u30AB\u30FC\u30BD\u30EB\u3092\u5143\u306B\u623B\u3059","\u30AB\u30FC\u30BD\u30EB\u306E\u3084\u308A\u76F4\u3057"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["\u8CBC\u308A\u4ED8\u3051\u306E\u30AA\u30D7\u30B7\u30E7\u30F3...","\u9069\u7528\u3057\u3088\u3046\u3068\u3059\u308B\u8CBC\u308A\u4ED8\u3051\u7DE8\u96C6\u306E ID\u3002\u6307\u5B9A\u3057\u306A\u3044\u5834\u5408\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u30D4\u30C3\u30AB\u30FC\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["\u8CBC\u308A\u4ED8\u3051\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u8CBC\u308A\u4ED8\u3051\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8868\u793A...","\u8CBC\u308A\u4ED8\u3051\u30CF\u30F3\u30C9\u30E9\u30FC\u3092\u5B9F\u884C\u3057\u3066\u3044\u307E\u3059\u3002\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3059","\u8CBC\u308A\u4ED8\u3051\u64CD\u4F5C\u306E\u9078\u629E","\u8CBC\u308A\u4ED8\u3051\u30CF\u30F3\u30C9\u30E9\u30FC\u3092\u5B9F\u884C\u3057\u3066\u3044\u307E\u3059..."],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["\u30D3\u30EB\u30C8\u30A4\u30F3","\u30D7\u30EC\u30FC\u30F3\u30C6\u30AD\u30B9\u30C8\u306E\u633F\u5165","URI \u306E\u633F\u5165","URI \u306E\u633F\u5165","\u30D1\u30B9\u306E\u633F\u5165","\u30D1\u30B9\u306E\u633F\u5165","\u76F8\u5BFE\u30D1\u30B9\u306E\u633F\u5165","\u76F8\u5BFE\u30D1\u30B9\u306E\u633F\u5165"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["\u7279\u5B9A\u306E MIME \u30BF\u30A4\u30D7\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u4F7F\u7528\u3059\u308B\u65E2\u5B9A\u306E\u30C9\u30ED\u30C3\u30D7 \u30D7\u30ED\u30D0\u30A4\u30C0\u30FC\u3092\u69CB\u6210\u3057\u307E\u3059\u3002"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["\u30C9\u30ED\u30C3\u30D7 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u30C9\u30ED\u30C3\u30D7 \u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8868\u793A...","\u30C9\u30ED\u30C3\u30D7 \u30CF\u30F3\u30C9\u30E9\u30FC\u3092\u5B9F\u884C\u3057\u3066\u3044\u307E\u3059\u3002\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u30AD\u30E3\u30F3\u30BB\u30EB\u3057\u307E\u3059"],"vs/editor/contrib/editorState/browser/keybindingCancellation":["\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u53D6\u308A\u6D88\u3057\u53EF\u80FD\u306A\u64CD\u4F5C ('\u53C2\u7167\u3092\u3053\u3053\u306B\u8868\u793A' \u306A\u3069) \u3092\u5B9F\u884C\u3059\u308B\u304B\u3069\u3046\u304B"],"vs/editor/contrib/find/browser/findController":["\u30D5\u30A1\u30A4\u30EB\u304C\u5927\u304D\u3059\u304E\u308B\u305F\u3081\u3001\u3059\u3079\u3066\u306E\u7F6E\u63DB\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3002","\u691C\u7D22","\u691C\u7D22(&&F)",`"\u6B63\u898F\u8868\u73FE\u3092\u4F7F\u7528\u3059\u308B" \u30D5\u30E9\u30B0\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059\u3002\r -\u30D5\u30E9\u30B0\u306F\u4ECA\u5F8C\u4FDD\u5B58\u3055\u308C\u307E\u305B\u3093\u3002\r -0: \u4F55\u3082\u3057\u306A\u3044\r -1: True\r -2: False`,`"\u5358\u8A9E\u5358\u4F4D\u3067\u691C\u7D22\u3059\u308B" \u30D5\u30E9\u30B0\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059\u3002\r -\u30D5\u30E9\u30B0\u306F\u4ECA\u5F8C\u4FDD\u5B58\u3055\u308C\u307E\u305B\u3093\u3002\r -0: \u4F55\u3082\u3057\u306A\u3044\r -1: True\r -2: False`,`"\u6570\u5F0F\u30B1\u30FC\u30B9" \u30D5\u30E9\u30B0\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059\u3002\r -\u30D5\u30E9\u30B0\u306F\u4ECA\u5F8C\u4FDD\u5B58\u3055\u308C\u307E\u305B\u3093\u3002\r -0: \u4F55\u3082\u3057\u306A\u3044\r -1: True\r -2: False`,`"\u30B1\u30FC\u30B9\u306E\u4FDD\u6301" \u30D5\u30E9\u30B0\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059\u3002\r -\u30D5\u30E9\u30B0\u306F\u4ECA\u5F8C\u4FDD\u5B58\u3055\u308C\u307E\u305B\u3093\u3002\r -0: \u4F55\u3082\u3057\u306A\u3044\r -1: True\r -2: False`,"\u5F15\u6570\u3092\u4F7F\u7528\u3057\u305F\u691C\u7D22","\u9078\u629E\u7BC4\u56F2\u3067\u691C\u7D22","\u6B21\u3092\u691C\u7D22","\u524D\u3092\u691C\u7D22","[\u4E00\u81F4] \u306B\u79FB\u52D5...","\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u4ED6\u306E\u9805\u76EE\u3092\u691C\u7D22\u3057\u3066\u307F\u3066\u304F\u3060\u3055\u3044\u3002","\u7279\u5B9A\u306E\u4E00\u81F4\u306B\u79FB\u52D5\u3059\u308B\u6570\u5024\u3092\u5165\u529B\u3057\u307E\u3059 (1 \u304B\u3089 {0})","1 ~ {0} \u306E\u6570\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002","1 ~ {0} \u306E\u6570\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u6B21\u306E\u9078\u629E\u9805\u76EE\u3092\u691C\u7D22","\u524D\u306E\u9078\u629E\u9805\u76EE\u3092\u691C\u7D22","\u7F6E\u63DB","\u7F6E\u63DB(&&R)"],"vs/editor/contrib/find/browser/findWidget":["\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u306E '\u9078\u629E\u7BC4\u56F2\u3092\u691C\u7D22' \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u6298\u308A\u305F\u305F\u307E\u308C\u3066\u3044\u308B\u3053\u3068\u3092\u793A\u3059\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u5C55\u958B\u3055\u308C\u3066\u3044\u308B\u3053\u3068\u3092\u793A\u3059\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u306E '\u7F6E\u63DB' \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u306E '\u3059\u3079\u3066\u7F6E\u63DB' \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u306E '\u524D\u3092\u691C\u7D22' \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u691C\u7D22\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u306E '\u6B21\u3092\u691C\u7D22' \u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u691C\u7D22/\u7F6E\u63DB","\u691C\u7D22","\u691C\u7D22","\u524D\u306E\u4E00\u81F4\u9805\u76EE","\u6B21\u306E\u4E00\u81F4\u9805\u76EE","\u9078\u629E\u7BC4\u56F2\u3092\u691C\u7D22","\u9589\u3058\u308B","\u7F6E\u63DB","\u7F6E\u63DB","\u7F6E\u63DB","\u3059\u3079\u3066\u7F6E\u63DB","\u7F6E\u63DB\u306E\u5207\u308A\u66FF\u3048","\u6700\u521D\u306E {0} \u4EF6\u306E\u7D50\u679C\u3060\u3051\u304C\u5F37\u8ABF\u8868\u793A\u3055\u308C\u307E\u3059\u304C\u3001\u3059\u3079\u3066\u306E\u691C\u7D22\u64CD\u4F5C\u306F\u30C6\u30AD\u30B9\u30C8\u5168\u4F53\u3067\u6A5F\u80FD\u3057\u307E\u3059\u3002","{0} / {1} \u4EF6","\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093\u3002","{0} \u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F","{0} \u304C '{1}' \u3067\u898B\u3064\u304B\u308A\u307E\u3057\u305F","{0} \u306F '{1}' \u3067 {2} \u306B\u898B\u3064\u304B\u308A\u307E\u3057\u305F","{0} \u304C '{1}' \u3067\u898B\u3064\u304B\u308A\u307E\u3057\u305F","Ctrl + Enter \u30AD\u30FC\u3092\u62BC\u3059\u3068\u3001\u3059\u3079\u3066\u7F6E\u63DB\u3059\u308B\u306E\u3067\u306F\u306A\u304F\u3001\u6539\u884C\u304C\u633F\u5165\u3055\u308C\u308B\u3088\u3046\u306B\u306A\u308A\u307E\u3057\u305F\u3002editor.action.replaceAll \u306E\u30AD\u30FC\u30D0\u30A4\u30F3\u30C9\u3092\u5909\u66F4\u3057\u3066\u3001\u3053\u306E\u52D5\u4F5C\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3067\u304D\u307E\u3059\u3002"],"vs/editor/contrib/folding/browser/folding":["\u5C55\u958B","\u518D\u5E30\u7684\u306B\u5C55\u958B\u3059\u308B","\u6298\u308A\u305F\u305F\u307F","\u6298\u308A\u305F\u305F\u307F\u306E\u5207\u308A\u66FF\u3048","\u518D\u5E30\u7684\u306B\u6298\u308A\u305F\u305F\u3080","\u3059\u3079\u3066\u306E\u30D6\u30ED\u30C3\u30AF \u30B3\u30E1\u30F3\u30C8\u306E\u6298\u308A\u305F\u305F\u307F","\u3059\u3079\u3066\u306E\u9818\u57DF\u3092\u6298\u308A\u305F\u305F\u3080","\u3059\u3079\u3066\u306E\u9818\u57DF\u3092\u5C55\u958B","\u9078\u629E\u3057\u305F\u9805\u76EE\u3092\u9664\u304F\u3059\u3079\u3066\u6298\u308A\u305F\u305F\u307F","\u9078\u629E\u3057\u305F\u9805\u76EE\u3092\u9664\u304F\u3059\u3079\u3066\u5C55\u958B","\u3059\u3079\u3066\u6298\u308A\u305F\u305F\u307F","\u3059\u3079\u3066\u5C55\u958B","\u89AA\u30D5\u30A9\u30FC\u30EB\u30C9\u306B\u79FB\u52D5\u3059\u308B","\u524D\u306E\u30D5\u30A9\u30FC\u30EB\u30C7\u30A3\u30F3\u30B0\u7BC4\u56F2\u306B\u79FB\u52D5\u3059\u308B","\u6B21\u306E\u30D5\u30A9\u30FC\u30EB\u30C7\u30A3\u30F3\u30B0\u7BC4\u56F2\u306B\u79FB\u52D5\u3059\u308B","\u9078\u629E\u7BC4\u56F2\u304B\u3089\u6298\u308A\u305F\u305F\u307F\u7BC4\u56F2\u3092\u4F5C\u6210\u3059\u308B","\u624B\u52D5\u6298\u308A\u305F\u305F\u307F\u7BC4\u56F2\u3092\u524A\u9664\u3059\u308B","\u30EC\u30D9\u30EB {0} \u3067\u6298\u308A\u305F\u305F\u3080"],"vs/editor/contrib/folding/browser/foldingDecorations":["\u6298\u308A\u66F2\u3052\u308B\u7BC4\u56F2\u306E\u80CC\u666F\u8272\u3002\u57FA\u306E\u88C5\u98FE\u3092\u96A0\u3055\u306A\u3044\u3088\u3046\u306B\u3001\u8272\u306F\u4E0D\u900F\u660E\u3067\u3042\u3063\u3066\u306F\u306A\u308A\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4F59\u767D\u306B\u3042\u308B\u6298\u308A\u305F\u305F\u307F\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B0\u30EA\u30D5\u4F59\u767D\u5185\u306E\u5C55\u958B\u3055\u308C\u305F\u7BC4\u56F2\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B0\u30EA\u30D5\u4F59\u767D\u5185\u306E\u6298\u308A\u305F\u305F\u307E\u308C\u305F\u7BC4\u56F2\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B0\u30EA\u30D5\u4F59\u767D\u5185\u306E\u6298\u308A\u305F\u305F\u307E\u308C\u305F\u7BC4\u56F2\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30B0\u30EA\u30D5\u4F59\u767D\u5185\u3067\u624B\u52D5\u3067\u5C55\u958B\u3055\u308C\u305F\u7BC4\u56F2\u306E\u30A2\u30A4\u30B3\u30F3\u3002"],"vs/editor/contrib/fontZoom/browser/fontZoom":["\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30D5\u30A9\u30F3\u30C8\u3092\u62E1\u5927","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30D5\u30A9\u30F3\u30C8\u3092\u7E2E\u5C0F","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30D5\u30A9\u30F3\u30C8\u306E\u30BA\u30FC\u30E0\u3092\u30EA\u30BB\u30C3\u30C8"],"vs/editor/contrib/format/browser/format":["\u884C {0} \u3067 1 \u3064\u306E\u66F8\u5F0F\u8A2D\u5B9A\u3092\u7DE8\u96C6","\u884C {1} \u3067 {0} \u500B\u306E\u66F8\u5F0F\u8A2D\u5B9A\u3092\u7DE8\u96C6","\u884C {0} \u3068 {1} \u306E\u9593\u3067 1 \u3064\u306E\u66F8\u5F0F\u8A2D\u5B9A\u3092\u7DE8\u96C6","\u884C {1} \u3068 {2} \u306E\u9593\u3067 {0} \u500B\u306E\u66F8\u5F0F\u8A2D\u5B9A\u3092\u7DE8\u96C6"],"vs/editor/contrib/format/browser/formatActions":["\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8","\u9078\u629E\u7BC4\u56F2\u306E\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8"],"vs/editor/contrib/gotoError/browser/gotoError":["\u6B21\u306E\u554F\u984C (\u30A8\u30E9\u30FC\u3001\u8B66\u544A\u3001\u60C5\u5831) \u3078\u79FB\u52D5","\u6B21\u306E\u30DE\u30FC\u30AB\u30FC\u3078\u79FB\u52D5\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u524D\u306E\u554F\u984C (\u30A8\u30E9\u30FC\u3001\u8B66\u544A\u3001\u60C5\u5831) \u3078\u79FB\u52D5","\u524D\u306E\u30DE\u30FC\u30AB\u30FC\u3078\u79FB\u52D5\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u30D5\u30A1\u30A4\u30EB\u5185\u306E\u6B21\u306E\u554F\u984C (\u30A8\u30E9\u30FC\u3001\u8B66\u544A\u3001\u60C5\u5831) \u3078\u79FB\u52D5","\u6B21\u306E\u554F\u984C\u7B87\u6240(&&P)","\u30D5\u30A1\u30A4\u30EB\u5185\u306E\u524D\u306E\u554F\u984C (\u30A8\u30E9\u30FC\u3001\u8B66\u544A\u3001\u60C5\u5831) \u3078\u79FB\u52D5","\u524D\u306E\u554F\u984C\u7B87\u6240(&&P)"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["\u30A8\u30E9\u30FC","\u8B66\u544A","\u60C5\u5831","\u30D2\u30F3\u30C8","{0} ({1})\u3002","{1} \u4EF6\u4E2D {0} \u4EF6\u306E\u554F\u984C","\u554F\u984C {0} / {1}","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DE\u30FC\u30AB\u30FC \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30A8\u30E9\u30FC\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DE\u30FC\u30AB\u30FC \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8 \u30A8\u30E9\u30FC\u306E\u898B\u51FA\u3057\u306E\u80CC\u666F\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DE\u30FC\u30AB\u30FC \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u8B66\u544A\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DE\u30FC\u30AB\u30FC \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u8B66\u544A\u306E\u898B\u51FA\u3057\u306E\u80CC\u666F\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DE\u30FC\u30AB\u30FC \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u60C5\u5831\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DE\u30FC\u30AB\u30FC \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u60C5\u5831\u306E\u898B\u51FA\u3057\u306E\u80CC\u666F\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DE\u30FC\u30AB\u30FC \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u80CC\u666F\u3002"],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["\u30D4\u30FC\u30AF","\u5B9A\u7FA9","'{0}' \u306E\u5B9A\u7FA9\u306F\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5B9A\u7FA9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5B9A\u7FA9\u3078\u79FB\u52D5","\u5B9A\u7FA9\u306B\u79FB\u52D5(&&D)","\u5B9A\u7FA9\u3092\u6A2A\u306B\u958B\u304F","\u5B9A\u7FA9\u3092\u3053\u3053\u306B\u8868\u793A","\u5BA3\u8A00","'{0}' \u306E\u5BA3\u8A00\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5BA3\u8A00\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5BA3\u8A00\u3078\u79FB\u52D5","\u5BA3\u8A00\u3078\u79FB\u52D5(&&D)","'{0}' \u306E\u5BA3\u8A00\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5BA3\u8A00\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5BA3\u8A00\u3092\u3053\u3053\u306B\u8868\u793A","\u578B\u5B9A\u7FA9","'{0}' \u306E\u578B\u5B9A\u7FA9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u578B\u5B9A\u7FA9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u578B\u5B9A\u7FA9\u3078\u79FB\u52D5","\u578B\u5B9A\u7FA9\u306B\u79FB\u52D5(&&T)","\u578B\u5B9A\u7FA9\u3092\u8868\u793A","\u5B9F\u88C5","'{0}' \u306E\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5B9F\u88C5\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u5B9F\u88C5\u3078\u79FB\u52D5","\u5B9F\u88C5\u7B87\u6240\u306B\u79FB\u52D5(&&I)","\u5B9F\u88C5\u306E\u30D4\u30FC\u30AF","'{0}' \u306E\u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093","\u53C2\u7167\u3078\u79FB\u52D5","\u53C2\u7167\u3078\u79FB\u52D5(&&R)","\u53C2\u7167","\u53C2\u7167\u3092\u3053\u3053\u306B\u8868\u793A","\u53C2\u7167","\u4EFB\u610F\u306E\u30B7\u30F3\u30DC\u30EB\u3078\u79FB\u52D5","\u5834\u6240","'{0}' \u306B\u4E00\u81F4\u3059\u308B\u7D50\u679C\u306F\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F","\u53C2\u7167"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u3001{0} \u306E\u5B9A\u7FA9\u3092\u8868\u793A\u3057\u307E\u3059\u3002"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["\u53C2\u7167\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u304C\u8868\u793A\u3055\u308C\u308B\u304B\u3069\u3046\u304B ('\u53C2\u7167\u306E\u30D7\u30EC\u30D3\u30E5\u30FC' \u307E\u305F\u306F '\u5B9A\u7FA9\u3092\u3053\u3053\u306B\u8868\u793A' \u306A\u3069)","\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} \u500B\u306E\u53C2\u7167","{0} \u500B\u306E\u53C2\u7167","\u53C2\u7167\u8A2D\u5B9A"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u8868\u793A\u3067\u304D\u307E\u305B\u3093","\u7D50\u679C\u306F\u3042\u308A\u307E\u305B\u3093\u3002","\u53C2\u7167\u8A2D\u5B9A"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["\u5217 {2} \u306E\u884C {1} \u306E {0}","\u5217 {3} \u306E\u884C {2} \u306E {1} \u306B {0}","{0} \u306B 1 \u500B\u306E\u30B7\u30F3\u30DC\u30EB\u3001\u5B8C\u5168\u306A\u30D1\u30B9 {1}","{1} \u306B {0} \u500B\u306E\u30B7\u30F3\u30DC\u30EB\u3001\u5B8C\u5168\u306A\u30D1\u30B9 {2}","\u4E00\u81F4\u3059\u308B\u9805\u76EE\u306F\u3042\u308A\u307E\u305B\u3093","{0} \u306B 1 \u500B\u306E\u30B7\u30F3\u30DC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F","{1} \u306B {0} \u500B\u306E\u30B7\u30F3\u30DC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F","{1} \u500B\u306E\u30D5\u30A1\u30A4\u30EB\u306B {0} \u500B\u306E\u30B7\u30F3\u30DC\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["\u30AD\u30FC\u30DC\u30FC\u30C9\u306E\u307F\u3067\u79FB\u52D5\u3067\u304D\u308B\u30B7\u30F3\u30DC\u30EB\u306E\u5834\u6240\u304C\u3042\u308B\u304B\u3069\u3046\u304B\u3002","{1} \u306E\u30B7\u30F3\u30DC\u30EB {0}\u3001\u6B21\u306B {2}","\u30B7\u30F3\u30DC\u30EB {0}/{1}"],"vs/editor/contrib/hover/browser/hover":["[\u8868\u793A\u307E\u305F\u306F\u30D5\u30A9\u30FC\u30AB\u30B9] \u30DB\u30D0\u30FC","\u5B9A\u7FA9\u30D7\u30EC\u30D3\u30E5\u30FC\u306E\u30DB\u30D0\u30FC\u3092\u8868\u793A\u3059\u308B","[\u4E0A\u306B\u30B9\u30AF\u30ED\u30FC\u30EB] \u30DB\u30D0\u30FC","[\u4E0B\u306B\u30B9\u30AF\u30ED\u30FC\u30EB] \u30DB\u30D0\u30FC","[\u5DE6\u306B\u30B9\u30AF\u30ED\u30FC\u30EB] \u30DB\u30D0\u30FC","[\u53F3\u306B\u30B9\u30AF\u30ED\u30FC\u30EB] \u30DB\u30D0\u30FC","[\u30DA\u30FC\u30B8\u3092\u4E0A\u306B] \u30DB\u30D0\u30FC","[\u30DA\u30FC\u30B8\u3092\u4E0B\u306B] \u30DB\u30D0\u30FC","[\u4E0A\u306B\u79FB\u52D5] \u30DB\u30D0\u30FC","[\u4E0B\u306B\u79FB\u52D5] \u30DB\u30D0\u30FC"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...","\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u4E0A\u306E\u7406\u7531\u304B\u3089\u3001\u9577\u3044\u884C\u306E\u305F\u3081\u306B\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u304C\u4E00\u6642\u505C\u6B62\u3055\u308C\u307E\u3057\u305F\u3002\u3053\u308C\u306F `editor.stopRenderingLineAfter` \u3067\u8A2D\u5B9A\u3067\u304D\u307E\u3059\u3002","\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u4E0A\u306E\u7406\u7531\u304B\u3089\u30C8\u30FC\u30AF\u30F3\u5316\u306F\u30B9\u30AD\u30C3\u30D7\u3055\u308C\u307E\u3059\u3002\u305D\u306E\u9577\u3044\u884C\u306E\u9577\u3055\u306F `editor.maxTokenizationLineLength` \u3067\u69CB\u6210\u3067\u304D\u307E\u3059\u3002"],"vs/editor/contrib/hover/browser/markerHoverParticipant":["\u554F\u984C\u306E\u8868\u793A","\u5229\u7528\u3067\u304D\u308B\u30AF\u30A4\u30C3\u30AF\u30D5\u30A3\u30C3\u30AF\u30B9\u306F\u3042\u308A\u307E\u305B\u3093","\u30AF\u30A4\u30C3\u30AF\u30D5\u30A3\u30C3\u30AF\u30B9\u3092\u78BA\u8A8D\u3057\u3066\u3044\u307E\u3059...","\u5229\u7528\u3067\u304D\u308B\u30AF\u30A4\u30C3\u30AF\u30D5\u30A3\u30C3\u30AF\u30B9\u306F\u3042\u308A\u307E\u305B\u3093","\u30AF\u30A4\u30C3\u30AF \u30D5\u30A3\u30C3\u30AF\u30B9..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["\u524D\u306E\u5024\u306B\u7F6E\u63DB","\u6B21\u306E\u5024\u306B\u7F6E\u63DB"],"vs/editor/contrib/indentation/browser/indentation":["\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u30B9\u30DA\u30FC\u30B9\u306B\u5909\u63DB","\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u30BF\u30D6\u306B\u5909\u63DB","\u69CB\u6210\u3055\u308C\u305F\u30BF\u30D6\u306E\u30B5\u30A4\u30BA","\u65E2\u5B9A\u306E\u30BF\u30D6 \u30B5\u30A4\u30BA","\u73FE\u5728\u306E\u30BF\u30D6 \u30B5\u30A4\u30BA","\u73FE\u5728\u306E\u30D5\u30A1\u30A4\u30EB\u306E\u30BF\u30D6\u306E\u30B5\u30A4\u30BA\u3092\u9078\u629E","\u30BF\u30D6\u306B\u3088\u308B\u30A4\u30F3\u30C7\u30F3\u30C8","\u30B9\u30DA\u30FC\u30B9\u306B\u3088\u308B\u30A4\u30F3\u30C7\u30F3\u30C8","\u30BF\u30D6\u306E\u8868\u793A\u30B5\u30A4\u30BA\u306E\u5909\u66F4","\u5185\u5BB9\u304B\u3089\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u691C\u51FA","\u884C\u306E\u518D\u30A4\u30F3\u30C7\u30F3\u30C8","\u9078\u629E\u884C\u3092\u518D\u30A4\u30F3\u30C7\u30F3\u30C8"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["\u30C0\u30D6\u30EB\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u633F\u5165\u3059\u308B","cmd \u30AD\u30FC\u3092\u62BC\u3057\u306A\u304C\u3089\u30AF\u30EA\u30C3\u30AF","ctrl \u30AD\u30FC\u3092\u62BC\u3057\u306A\u304C\u3089 \u30AF\u30EA\u30C3\u30AF","option \u30AD\u30FC\u3092\u62BC\u3057\u306A\u304C\u3089\u30AF\u30EA\u30C3\u30AF","alt \u30AD\u30FC\u3092\u62BC\u3057\u306A\u304C\u3089\u30AF\u30EA\u30C3\u30AF","[\u5B9A\u7FA9] ({0}) \u306B\u79FB\u52D5\u3057\u3001\u53F3\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u8A73\u7D30\u3092\u8868\u793A\u3057\u307E\u3059","\u5B9A\u7FA9\u306B\u79FB\u52D5 ({0})","\u30B3\u30DE\u30F3\u30C9\u306E\u5B9F\u884C"],"vs/editor/contrib/inlineCompletions/browser/commands":["\u6B21\u306E\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u3092\u8868\u793A\u3059\u308B","\u524D\u306E\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u3092\u8868\u793A\u3059\u308B","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u3092\u30C8\u30EA\u30AC\u30FC\u3059\u308B","\u30A4\u30F3\u30E9\u30A4\u30F3\u63D0\u6848\u306E\u6B21\u306E\u5358\u8A9E\u3092\u627F\u8AFE\u3059\u308B","\u30EF\u30FC\u30C9\u3092\u627F\u8AFE\u3059\u308B","\u30A4\u30F3\u30E9\u30A4\u30F3\u63D0\u6848\u306E\u6B21\u306E\u884C\u3092\u627F\u8AFE\u3059\u308B","\u884C\u3092\u627F\u8AFE\u3059\u308B","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u3092\u627F\u8AFE\u3059\u308B","\u627F\u8AFE\u3059\u308B","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u3092\u975E\u8868\u793A\u306B\u3059\u308B","\u5E38\u306B\u30C4\u30FC\u30EB \u30D0\u30FC\u3092\u8868\u793A\u3059\u308B"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["\u304A\u3059\u3059\u3081:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u304C\u30B9\u30DA\u30FC\u30B9\u3067\u59CB\u307E\u308B\u304B\u3069\u3046\u304B","\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC\u304C\u3001\u30BF\u30D6\u3067\u633F\u5165\u3055\u308C\u308B\u3082\u306E\u3088\u308A\u3082\u5C0F\u3055\u3044\u30B9\u30DA\u30FC\u30B9\u3067\u59CB\u307E\u308B\u304B\u3069\u3046\u304B","\u73FE\u5728\u306E\u5019\u88DC\u306B\u3064\u3044\u3066\u5019\u88DC\u8868\u793A\u3092\u6B62\u3081\u308B\u304B\u3069\u3046\u304B"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["\u30E6\u30FC\u30B6\u30FC\u88DC\u52A9\u5BFE\u5FDC\u306E\u30D3\u30E5\u30FC\u3067\u3053\u308C\u3092\u691C\u67FB\u3057\u307E\u3059 ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["\u6B21\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30D2\u30F3\u30C8\u3092\u8868\u793A\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u524D\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30D2\u30F3\u30C8\u3092\u8868\u793A\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002","{0} ({1})","\u524D\u3078","\u6B21\u3078"],"vs/editor/contrib/lineSelection/browser/lineSelection":["\u884C\u5168\u4F53\u3092\u9078\u629E\u3059\u308B"],"vs/editor/contrib/linesOperations/browser/linesOperations":["\u884C\u3092\u4E0A\u3078\u30B3\u30D4\u30FC","\u884C\u3092\u4E0A\u3078\u30B3\u30D4\u30FC(&&C)","\u884C\u3092\u4E0B\u3078\u30B3\u30D4\u30FC","\u884C\u3092\u4E0B\u3078\u30B3\u30D4\u30FC(&&P)","\u9078\u629E\u7BC4\u56F2\u306E\u8907\u88FD","\u9078\u629E\u7BC4\u56F2\u306E\u8907\u88FD(&&D)","\u884C\u3092\u4E0A\u3078\u79FB\u52D5","\u884C\u3092\u4E0A\u3078\u79FB\u52D5(&&V)","\u884C\u3092\u4E0B\u3078\u79FB\u52D5","\u884C\u3092\u4E0B\u3078\u79FB\u52D5(&&L)","\u884C\u3092\u6607\u9806\u306B\u4E26\u3079\u66FF\u3048","\u884C\u3092\u964D\u9806\u306B\u4E26\u3079\u66FF\u3048","\u91CD\u8907\u3059\u308B\u884C\u3092\u524A\u9664","\u672B\u5C3E\u306E\u7A7A\u767D\u306E\u30C8\u30EA\u30DF\u30F3\u30B0","\u884C\u306E\u524A\u9664","\u884C\u306E\u30A4\u30F3\u30C7\u30F3\u30C8","\u884C\u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u89E3\u9664","\u884C\u3092\u4E0A\u306B\u633F\u5165","\u884C\u3092\u4E0B\u306B\u633F\u5165","\u5DE6\u5074\u3092\u3059\u3079\u3066\u524A\u9664","\u53F3\u5074\u3092\u3059\u3079\u3066\u524A\u9664","\u884C\u3092\u3064\u306A\u3052\u308B","\u30AB\u30FC\u30BD\u30EB\u306E\u5468\u56F2\u306E\u6587\u5B57\u3092\u5165\u308C\u66FF\u3048\u308B","\u5927\u6587\u5B57\u306B\u5909\u63DB","\u5C0F\u6587\u5B57\u306B\u5909\u63DB","\u5148\u982D\u6587\u5B57\u3092\u5927\u6587\u5B57\u306B\u5909\u63DB\u3059\u308B","\u30B9\u30CD\u30FC\u30AF \u30B1\u30FC\u30B9\u306B\u5909\u63DB\u3059\u308B","\u30AD\u30E3\u30E1\u30EB \u30B1\u30FC\u30B9\u306B\u5909\u63DB\u3059\u308B","Kebab \u30B1\u30FC\u30B9\u3078\u306E\u5909\u63DB"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["\u30EA\u30F3\u30AF\u3055\u308C\u305F\u7DE8\u96C6\u306E\u958B\u59CB","\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u578B\u306E\u540D\u524D\u306E\u81EA\u52D5\u5909\u66F4\u3092\u884C\u3046\u3068\u304D\u306E\u80CC\u666F\u8272\u3067\u3059\u3002"],"vs/editor/contrib/links/browser/links":["\u3053\u306E\u30EA\u30F3\u30AF\u306F\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u306A\u3044\u305F\u3081\u958B\u304F\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {0}","\u3053\u306E\u30EA\u30F3\u30AF\u306F\u30BF\u30FC\u30B2\u30C3\u30C8\u304C\u5B58\u5728\u3057\u306A\u3044\u305F\u3081\u958B\u304F\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002","\u30B3\u30DE\u30F3\u30C9\u306E\u5B9F\u884C","\u30EA\u30F3\u30AF\u5148\u3092\u8868\u793A","cmd + \u30AF\u30EA\u30C3\u30AF","ctrl + \u30AF\u30EA\u30C3\u30AF","option + \u30AF\u30EA\u30C3\u30AF","alt + \u30AF\u30EA\u30C3\u30AF","\u30B3\u30DE\u30F3\u30C9 {0} \u306E\u5B9F\u884C","\u30EA\u30F3\u30AF\u3092\u958B\u304F"],"vs/editor/contrib/message/browser/messageController":["\u30A8\u30C7\u30A3\u30BF\u30FC\u306B\u73FE\u5728\u30A4\u30F3\u30E9\u30A4\u30F3 \u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B"],"vs/editor/contrib/multicursor/browser/multicursor":["\u8FFD\u52A0\u3055\u308C\u305F\u30AB\u30FC\u30BD\u30EB: {0}","\u8FFD\u52A0\u3055\u308C\u305F\u30AB\u30FC\u30BD\u30EB: {0}","\u30AB\u30FC\u30BD\u30EB\u3092\u4E0A\u306B\u633F\u5165","\u30AB\u30FC\u30BD\u30EB\u3092\u4E0A\u306B\u633F\u5165(&&A)","\u30AB\u30FC\u30BD\u30EB\u3092\u4E0B\u306B\u633F\u5165","\u30AB\u30FC\u30BD\u30EB\u3092\u4E0B\u306B\u633F\u5165(&&D)","\u30AB\u30FC\u30BD\u30EB\u3092\u884C\u672B\u306B\u633F\u5165","\u30AB\u30FC\u30BD\u30EB\u3092\u884C\u672B\u306B\u633F\u5165(&&U)","\u30AB\u30FC\u30BD\u30EB\u3092\u4E0B\u306B\u633F\u5165","\u30AB\u30FC\u30BD\u30EB\u3092\u4E0A\u306B\u633F\u5165","\u9078\u629E\u3057\u305F\u9805\u76EE\u3092\u6B21\u306E\u4E00\u81F4\u9805\u76EE\u306B\u8FFD\u52A0","\u6B21\u306E\u51FA\u73FE\u500B\u6240\u3092\u8FFD\u52A0(&&N)","\u9078\u629E\u9805\u76EE\u3092\u6B21\u306E\u4E00\u81F4\u9805\u76EE\u306B\u8FFD\u52A0","\u524D\u306E\u51FA\u73FE\u7B87\u6240\u3092\u8FFD\u52A0(&&R)","\u6700\u5F8C\u306B\u9078\u629E\u3057\u305F\u9805\u76EE\u3092\u6B21\u306E\u4E00\u81F4\u9805\u76EE\u306B\u79FB\u52D5","\u6700\u5F8C\u306B\u9078\u3093\u3060\u9805\u76EE\u3092\u524D\u306E\u4E00\u81F4\u9805\u76EE\u306B\u79FB\u52D5\u3059\u308B","\u4E00\u81F4\u3059\u308B\u3059\u3079\u3066\u306E\u51FA\u73FE\u7B87\u6240\u3092\u9078\u629E\u3057\u307E\u3059","\u3059\u3079\u3066\u306E\u51FA\u73FE\u7B87\u6240\u3092\u9078\u629E(&&O)","\u3059\u3079\u3066\u306E\u51FA\u73FE\u7B87\u6240\u3092\u5909\u66F4","\u6B21\u306E\u30AB\u30FC\u30BD\u30EB\u306B\u30D5\u30A9\u30FC\u30AB\u30B9","\u6B21\u306E\u30AB\u30FC\u30BD\u30EB\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u3092\u5408\u308F\u305B\u308B","\u524D\u306E\u30AB\u30FC\u30BD\u30EB\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u3059\u308B","\u524D\u306E\u30AB\u30FC\u30BD\u30EB\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u3092\u5408\u308F\u305B\u308B"],"vs/editor/contrib/parameterHints/browser/parameterHints":["\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30D2\u30F3\u30C8\u3092\u30C8\u30EA\u30AC\u30FC"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["\u6B21\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30D2\u30F3\u30C8\u3092\u8868\u793A\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u524D\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30D2\u30F3\u30C8\u3092\u8868\u793A\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002","{0}\u3001\u30D2\u30F3\u30C8","\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC \u30D2\u30F3\u30C8\u5185\u306E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u9805\u76EE\u306E\u524D\u666F\u8272\u3002"],"vs/editor/contrib/peekView/browser/peekView":["\u73FE\u5728\u306E\u30B3\u30FC\u30C9 \u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u30D7\u30EC\u30D3\u30E5\u30FC\u5185\u306B\u57CB\u3081\u8FBC\u307E\u308C\u308B\u304B\u3069\u3046\u304B","\u9589\u3058\u308B","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u306E\u30BF\u30A4\u30C8\u30EB\u9818\u57DF\u306E\u80CC\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC \u30BF\u30A4\u30C8\u30EB\u306E\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u306E\u30BF\u30A4\u30C8\u30EB\u60C5\u5831\u306E\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u306E\u5883\u754C\u3068\u77E2\u5370\u306E\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u7D50\u679C\u30EA\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u7D50\u679C\u30EA\u30B9\u30C8\u306E\u30E9\u30A4\u30F3 \u30CE\u30FC\u30C9\u306E\u524D\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u7D50\u679C\u30EA\u30B9\u30C8\u306E\u30D5\u30A1\u30A4\u30EB \u30CE\u30FC\u30C9\u306E\u524D\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u7D50\u679C\u30EA\u30B9\u30C8\u306E\u9078\u629E\u6E08\u307F\u30A8\u30F3\u30C8\u30EA\u306E\u80CC\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u7D50\u679C\u30EA\u30B9\u30C8\u306E\u9078\u629E\u6E08\u307F\u30A8\u30F3\u30C8\u30EA\u306E\u524D\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC \u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC \u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4F59\u767D\u306E\u80CC\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC \u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u306E\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u306E\u80CC\u666F\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC\u7D50\u679C\u30EA\u30B9\u30C8\u306E\u4E00\u81F4\u3057\u305F\u5F37\u8ABF\u8868\u793A\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC \u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4E00\u81F4\u3057\u305F\u5F37\u8ABF\u8868\u793A\u8272\u3002","\u30D4\u30FC\u30AF \u30D3\u30E5\u30FC \u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u4E00\u81F4\u3057\u305F\u5F37\u8ABF\u5883\u754C\u8272\u3002"],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["\u6700\u521D\u306B\u30C6\u30AD\u30B9\u30C8 \u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u958B\u3044\u3066\u3001\u884C\u306B\u79FB\u52D5\u3057\u307E\u3059\u3002","\u884C {0}\u3001\u6587\u5B57 {1} \u306B\u79FB\u52D5\u3057\u307E\u3059\u3002","{0} \u884C\u306B\u79FB\u52D5\u3057\u307E\u3059\u3002","\u73FE\u5728\u306E\u884C: {0}\u3001\u6587\u5B57: {1}\u3002\u79FB\u52D5\u5148\u3068\u306A\u308B\u30011 \u304B\u3089 {2} \u307E\u3067\u306E\u884C\u756A\u53F7\u3092\u5165\u529B\u3057\u307E\u3059\u3002","\u73FE\u5728\u306E\u884C: {0}\u3001\u6587\u5B57: {1}\u3002\u79FB\u52D5\u5148\u306E\u884C\u756A\u53F7\u3092\u5165\u529B\u3057\u307E\u3059\u3002"],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["\u30B7\u30F3\u30DC\u30EB\u306B\u79FB\u52D5\u3059\u308B\u306B\u306F\u3001\u307E\u305A\u30B7\u30F3\u30DC\u30EB\u60C5\u5831\u3092\u542B\u3080\u30C6\u30AD\u30B9\u30C8 \u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u958B\u304D\u307E\u3059\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C6\u30AD\u30B9\u30C8 \u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u306F\u3001\u30B7\u30F3\u30DC\u30EB\u60C5\u5831\u306F\u8868\u793A\u3055\u308C\u307E\u305B\u3093\u3002","\u4E00\u81F4\u3059\u308B\u30A8\u30C7\u30A3\u30BF\u30FC \u30B7\u30F3\u30DC\u30EB\u304C\u3042\u308A\u307E\u305B\u3093","\u30A8\u30C7\u30A3\u30BF\u30FC \u30B7\u30F3\u30DC\u30EB\u304C\u3042\u308A\u307E\u305B\u3093","\u6A2A\u306B\u4E26\u3079\u3066\u958B\u304F","\u4E00\u756A\u4E0B\u3067\u958B\u304F","\u30B7\u30F3\u30DC\u30EB ({0})","\u30D7\u30ED\u30D1\u30C6\u30A3 ({0})","\u30E1\u30BD\u30C3\u30C9 ({0})","\u95A2\u6570 ({0})","\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FC ({0})","\u5909\u6570 ({0})","\u30AF\u30E9\u30B9 ({0})","\u69CB\u9020\u4F53 ({0})","\u30A4\u30D9\u30F3\u30C8 ({0})","\u6F14\u7B97\u5B50 ({0})","\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9 ({0})","\u540D\u524D\u7A7A\u9593 ({0})","\u30D1\u30C3\u30B1\u30FC\u30B8 ({0})","\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC ({0})","\u30E2\u30B8\u30E5\u30FC\u30EB ({0})","\u30D7\u30ED\u30D1\u30C6\u30A3 ({0})","\u5217\u6319\u578B ({0})","\u5217\u6319\u578B\u30E1\u30F3\u30D0\u30FC ({0})","\u6587\u5B57\u5217 ({0})","\u30D5\u30A1\u30A4\u30EB ({0})","\u914D\u5217 ({0})","\u6570\u5024 ({0})","\u30D6\u30FC\u30EB\u5024 ({0})","\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8 ({0})","\u30AD\u30FC ({0})","\u30D5\u30A3\u30FC\u30EB\u30C9 ({0})","\u5B9A\u6570 ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["\u8AAD\u307F\u53D6\u308A\u5C02\u7528\u306E\u5165\u529B\u3067\u306F\u7DE8\u96C6\u3067\u304D\u307E\u305B\u3093","\u8AAD\u307F\u53D6\u308A\u5C02\u7528\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u306F\u7DE8\u96C6\u3067\u304D\u307E\u305B\u3093"],"vs/editor/contrib/rename/browser/rename":["\u7D50\u679C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u540D\u524D\u5909\u66F4\u306E\u5834\u6240\u3092\u89E3\u6C7A\u3057\u3088\u3046\u3068\u3057\u3066\u4E0D\u660E\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F","\u540D\u524D\u3092 '{0}' \u304B\u3089 '{1}' \u306B\u5909\u66F4\u3057\u3066\u3044\u307E\u3059","{0} \u306E\u540D\u524D\u3092 {1} \u306B\u5909\u66F4\u3057\u3066\u3044\u307E\u3059","'{0}' \u304B\u3089 '{1}' \u3078\u306E\u540D\u524D\u5909\u66F4\u304C\u6B63\u5E38\u306B\u5B8C\u4E86\u3057\u307E\u3057\u305F\u3002\u6982\u8981: {2}","\u540D\u524D\u306E\u5909\u66F4\u3067\u7DE8\u96C6\u3092\u9069\u7528\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F","\u540D\u524D\u306E\u5909\u66F4\u306B\u3088\u3063\u3066\u7DE8\u96C6\u306E\u8A08\u7B97\u306B\u5931\u6557\u3057\u307E\u3057\u305F","\u30B7\u30F3\u30DC\u30EB\u306E\u540D\u524D\u5909\u66F4","\u540D\u524D\u3092\u5909\u66F4\u3059\u308B\u524D\u306B\u5909\u66F4\u3092\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B\u6A5F\u80FD\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B"],"vs/editor/contrib/rename/browser/renameInputField":["\u540D\u524D\u306E\u5909\u66F4\u5165\u529B\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u304C\u8868\u793A\u3055\u308C\u308B\u304B\u3069\u3046\u304B","\u540D\u524D\u5909\u66F4\u5165\u529B\u3002\u65B0\u3057\u3044\u540D\u524D\u3092\u5165\u529B\u3057\u3001Enter \u30AD\u30FC\u3092\u62BC\u3057\u3066\u30B3\u30DF\u30C3\u30C8\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u540D\u524D\u3092\u5909\u66F4\u3059\u308B\u306B\u306F {0}\u3001\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B\u306B\u306F {1}"],"vs/editor/contrib/smartSelect/browser/smartSelect":["\u9078\u629E\u7BC4\u56F2\u3092\u62E1\u5F35","\u9078\u629E\u7BC4\u56F2\u306E\u5C55\u958B(&&E)","\u9078\u629E\u7BC4\u56F2\u3092\u7E2E\u5C0F","\u9078\u629E\u7BC4\u56F2\u306E\u7E2E\u5C0F(&&S)"],"vs/editor/contrib/snippet/browser/snippetController2":["\u73FE\u5728\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u304C\u30B9\u30CB\u30DA\u30C3\u30C8 \u30E2\u30FC\u30C9\u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30B9\u30CB\u30DA\u30C3\u30C8 \u30E2\u30FC\u30C9\u306E\u3068\u304D\u306B\u3001\u6B21\u306E\u30BF\u30D6\u4F4D\u7F6E\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u30B9\u30CB\u30DA\u30C3\u30C8 \u30E2\u30FC\u30C9\u306E\u3068\u304D\u306B\u3001\u524D\u306E\u30BF\u30D6\u4F4D\u7F6E\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u6B21\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306B\u79FB\u52D5..."],"vs/editor/contrib/snippet/browser/snippetVariables":["\u65E5\u66DC\u65E5","\u6708\u66DC\u65E5","\u706B\u66DC\u65E5","\u6C34\u66DC\u65E5","\u6728\u66DC\u65E5","\u91D1\u66DC\u65E5","\u571F\u66DC\u65E5","\u65E5","\u6708","\u706B","\u6C34","\u6728","\u91D1","\u571F","1 \u6708","2 \u6708","3 \u6708","4 \u6708","5 \u6708","6 \u6708","7 \u6708","8 \u6708","9 \u6708","10 \u6708","11 \u6708","12 \u6708","1 \u6708","2 \u6708","3 \u6708","4 \u6708","5 \u6708","6 \u6708","7 \u6708","8 \u6708","9 \u6708","10 \u6708","11 \u6708","12 \u6708"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u306E\u5207\u308A\u66FF\u3048","\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u306E\u5207\u308A\u66FF\u3048(&&T)","\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB","\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB(&&)","\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u3078\u306E\u30D5\u30A9\u30FC\u30AB\u30B9","\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u3078\u306E\u30D5\u30A9\u30FC\u30AB\u30B9(&F)","\u6B21\u306E\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u884C\u3092\u9078\u629E","\u524D\u306E\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u884C\u3092\u9078\u629E","\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u884C\u306B\u79FB\u52D5","\u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u9078\u629E"],"vs/editor/contrib/suggest/browser/suggest":["\u5019\u88DC\u304C\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u3066\u3044\u308B\u304B\u3069\u3046\u304B","\u5019\u88DC\u306E\u8A73\u7D30\u304C\u8868\u793A\u3055\u308C\u308B\u304B\u3069\u3046\u304B","\u9078\u629E\u3059\u308B\u8907\u6570\u306E\u5019\u88DC\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u73FE\u5728\u306E\u5019\u88DC\u3092\u633F\u5165\u3057\u305F\u3068\u304D\u3001\u5909\u66F4\u3092\u884C\u3046\u304B\u3001\u307E\u305F\u306F\u65E2\u306B\u5165\u529B\u3057\u305F\u5185\u5BB9\u3092\u3059\u3079\u3066\u5165\u529B\u3059\u308B\u304B\u3069\u3046\u304B","Enter \u30AD\u30FC\u3092\u62BC\u3057\u305F\u3068\u304D\u306B\u5019\u88DC\u3092\u633F\u5165\u3059\u308B\u304B\u3069\u3046\u304B","\u73FE\u5728\u306E\u5019\u88DC\u306B\u633F\u5165\u3068\u7F6E\u63DB\u306E\u52D5\u4F5C\u304C\u3042\u308B\u304B\u3069\u3046\u304B","\u65E2\u5B9A\u306E\u52D5\u4F5C\u304C\u633F\u5165\u307E\u305F\u306F\u7F6E\u63DB\u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u73FE\u5728\u306E\u5019\u88DC\u304B\u3089\u306E\u8A73\u7D30\u306E\u89E3\u6C7A\u3092\u30B5\u30DD\u30FC\u30C8\u3059\u308B\u304B\u3069\u3046\u304B"],"vs/editor/contrib/suggest/browser/suggestController":["{1} \u304C\u8FFD\u52A0\u7DE8\u96C6\u3057\u305F '{0}' \u3092\u53D7\u3051\u5165\u308C\u308B","\u5019\u88DC\u3092\u30C8\u30EA\u30AC\u30FC","\u633F\u5165","\u633F\u5165","\u7F6E\u63DB","\u7F6E\u63DB","\u633F\u5165","\u8868\u793A\u3092\u6E1B\u3089\u3059","\u3055\u3089\u306B\u8868\u793A","\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30B5\u30A4\u30BA\u3092\u30EA\u30BB\u30C3\u30C8"],"vs/editor/contrib/suggest/browser/suggestWidget":["\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u80CC\u666F\u8272\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u5883\u754C\u7DDA\u8272\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u524D\u666F\u8272\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u3067\u9078\u629E\u6E08\u307F\u5165\u529B\u306E\u524D\u666F\u8272\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u3067\u9078\u629E\u6E08\u307F\u5165\u529B\u306E\u30A2\u30A4\u30B3\u30F3\u524D\u666F\u8272\u3002","\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u3067\u9078\u629E\u6E08\u307F\u30A8\u30F3\u30C8\u30EA\u306E\u80CC\u666F\u8272\u3002","\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u5185\u3067\u4E00\u81F4\u3057\u305F\u30CF\u30A4\u30E9\u30A4\u30C8\u306E\u8272\u3002","\u9805\u76EE\u304C\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306B\u3001\u5019\u88DC\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3067\u306E\u4E00\u81F4\u306E\u5F37\u8ABF\u8868\u793A\u306E\u8272\u3067\u3059\u3002","\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u72B6\u614B\u306E\u63D0\u6848\u306E\u524D\u666F\u8272\u3002","\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059...","\u5019\u88DC\u306F\u3042\u308A\u307E\u305B\u3093\u3002","\u63D0\u6848","{0} {1}\u3001{2}","{0} {1}","{0}\u3001 {1}","{0}\u3001\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["\u9589\u3058\u308B","\u8AAD\u307F\u8FBC\u3093\u3067\u3044\u307E\u3059..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["\u63D0\u6848\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u8A73\u7D30\u60C5\u5831\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u8A73\u7D30\u3092\u53C2\u7167"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["\u914D\u5217\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30D6\u30FC\u30EB\u5024\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30AF\u30E9\u30B9\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u8272\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u5B9A\u6570\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FC\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u5217\u6319\u5B50\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u5217\u6319\u5B50\u30E1\u30F3\u30D0\u30FC\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30A4\u30D9\u30F3\u30C8\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30D5\u30A3\u30FC\u30EB\u30C9\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30D5\u30A1\u30A4\u30EB\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30D5\u30A9\u30EB\u30C0\u30FC\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u95A2\u6570\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30A4\u30F3\u30BF\u30FC\u30D5\u30A7\u30A4\u30B9\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30AD\u30FC\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30AD\u30FC\u30EF\u30FC\u30C9\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30E1\u30BD\u30C3\u30C9\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30E2\u30B8\u30E5\u30FC\u30EB\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u540D\u524D\u7A7A\u9593\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","Null \u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6570\u5024\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30AA\u30D6\u30B8\u30A7\u30AF\u30C8\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6F14\u7B97\u5B50\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30D1\u30C3\u30B1\u30FC\u30B8\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30D7\u30ED\u30D1\u30C6\u30A3\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u53C2\u7167\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30B9\u30CB\u30DA\u30C3\u30C8\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u6587\u5B57\u5217\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u69CB\u9020\u4F53\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30C6\u30AD\u30B9\u30C8\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u5358\u4F4D\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002","\u5909\u6570\u8A18\u53F7\u306E\u524D\u666F\u8272\u3002\u3053\u308C\u3089\u306E\u8A18\u53F7\u306F\u3001\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u3001\u968E\u5C64\u30EA\u30F3\u30AF\u3001\u304A\u3088\u3073\u5019\u88DC\u306E\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u8868\u793A\u3055\u308C\u307E\u3059\u3002"],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["Tab \u30AD\u30FC\u3092\u5207\u308A\u66FF\u3048\u308B\u3068\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u79FB\u52D5\u3057\u307E\u3059","Tab \u30AD\u30FC\u3092\u62BC\u3059\u3068\u3001\u6B21\u306E\u30D5\u30A9\u30FC\u30AB\u30B9\u53EF\u80FD\u306A\u8981\u7D20\u306B\u30D5\u30A9\u30FC\u30AB\u30B9\u3092\u79FB\u52D5\u3057\u307E\u3059","Tab \u30AD\u30FC\u3092\u62BC\u3059\u3068\u3001\u30BF\u30D6\u6587\u5B57\u304C\u633F\u5165\u3055\u308C\u307E\u3059"],"vs/editor/contrib/tokenization/browser/tokenization":["\u958B\u767A\u8005: \u30C8\u30FC\u30AF\u30F3\u518D\u4F5C\u6210\u306E\u5F37\u5236"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["\u62E1\u5F35\u6A5F\u80FD\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u8B66\u544A\u30E1\u30C3\u30BB\u30FC\u30B8\u3068\u5171\u306B\u8868\u793A\u3055\u308C\u308B\u30A2\u30A4\u30B3\u30F3\u3002","\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001\u57FA\u672C ASCII \u5916\u306E Unicode \u6587\u5B57\u304C\u591A\u6570\u542B\u307E\u308C\u3066\u3044\u307E\u3059","\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u307E\u304E\u3089\u308F\u3057\u3044 Unicode \u6587\u5B57\u304C\u591A\u6570\u542B\u307E\u308C\u3066\u3044\u307E\u3059","\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u4E0D\u53EF\u8996\u306E Unicode \u6587\u5B57\u304C\u591A\u6570\u542B\u307E\u308C\u3066\u3044\u307E\u3059","\u6587\u5B57 {0} \u306F\u3001\u30BD\u30FC\u30B9 \u30B3\u30FC\u30C9\u3067\u3088\u308A\u4E00\u822C\u7684\u306A ASCII \u6587\u5B57 {1} \u3068\u6DF7\u540C\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002","\u6587\u5B57 {0}\u306F\u3001\u30BD\u30FC\u30B9 \u30B3\u30FC\u30C9\u3067\u3088\u308A\u4E00\u822C\u7684\u306A\u6587\u5B57{1}\u3068\u6DF7\u540C\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002","\u6587\u5B57 {0}\u306F\u975E\u8868\u793A\u3067\u3059\u3002","\u6587\u5B57 {0} \u306F\u57FA\u672C ASCII \u6587\u5B57\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002","\u8A2D\u5B9A\u306E\u8ABF\u6574","\u30B3\u30E1\u30F3\u30C8\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u30B3\u30E1\u30F3\u30C8\u306E\u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u6587\u5B57\u5217\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u6587\u5B57\u5217\u306E\u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u307E\u304E\u3089\u308F\u3057\u3044\u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u307E\u304E\u3089\u308F\u3057\u3044\u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u4E0D\u53EF\u8996\u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u4E0D\u53EF\u8996\u306E\u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u975E ASCII \u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u57FA\u672C ASCII \u4EE5\u5916\u306E\u6587\u5B57\u306E\u5F37\u8ABF\u8868\u793A\u3092\u7121\u52B9\u306B\u3059\u308B","\u9664\u5916\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u8868\u793A","{0} (\u4E0D\u53EF\u8996\u306E\u6587\u5B57) \u3092\u5F37\u8ABF\u8868\u793A\u304B\u3089\u9664\u5916\u3059\u308B","\u5F37\u8ABF\u8868\u793A\u304B\u3089 {0} \u3092\u9664\u5916\u3057\u307E\u3059",'\u8A00\u8A9E "{0}" \u3067\u3088\u308A\u4E00\u822C\u7684\u306A Unicode \u6587\u5B57\u3092\u8A31\u53EF\u3057\u307E\u3059\u3002',"Unicode \u306E\u5F37\u8ABF\u8868\u793A\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u69CB\u6210\u3059\u308B"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["\u666E\u901A\u3067\u306F\u306A\u3044\u884C\u7D42\u7AEF\u8A18\u53F7","\u666E\u901A\u3067\u306F\u306A\u3044\u884C\u7D42\u7AEF\u8A18\u53F7\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F",`\u3053\u306E\u30D5\u30A1\u30A4\u30EB '{0}' \u306B\u306F\u3001\u884C\u533A\u5207\u308A\u6587\u5B57 (LS) \u3084\u6BB5\u843D\u533A\u5207\u308A\u8A18\u53F7 (PS) \u306A\u3069\u306E\u7279\u6B8A\u306A\u884C\u306E\u7D42\u7AEF\u6587\u5B57\u304C 1 \u3064\u4EE5\u4E0A\u542B\u307E\u308C\u3066\u3044\u307E\u3059\u3002\r -\r -\u305D\u308C\u3089\u3092\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u524A\u9664\u3059\u308B\u3053\u3068\u3092\u304A\u52E7\u3081\u3057\u307E\u3059\u3002\u3053\u308C\u306F 'editor.unusualLineTerminators' \u3092\u4F7F\u7528\u3057\u3066\u69CB\u6210\u3067\u304D\u307E\u3059\u3002`,"\u7279\u6B8A\u306A\u884C\u306E\u7D42\u7AEF\u8A18\u53F7\u3092\u524A\u9664\u3059\u308B(&&R)","\u7121\u8996\u3059\u308B"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["\u5909\u6570\u306E\u8AAD\u307F\u53D6\u308A\u306A\u3069\u3001\u8AAD\u307F\u53D6\u308A\u30A2\u30AF\u30BB\u30B9\u4E2D\u306E\u30B7\u30F3\u30DC\u30EB\u306E\u80CC\u666F\u8272\u3002\u4E0B\u306B\u3042\u308B\u88C5\u98FE\u3092\u96A0\u3055\u306A\u3044\u305F\u3081\u306B\u3001\u8272\u306F\u4E0D\u900F\u904E\u3067\u3042\u3063\u3066\u306F\u306A\u308A\u307E\u305B\u3093\u3002","\u5909\u6570\u3078\u306E\u66F8\u304D\u8FBC\u307F\u306A\u3069\u3001\u66F8\u304D\u8FBC\u307F\u30A2\u30AF\u30BB\u30B9\u4E2D\u306E\u30B7\u30F3\u30DC\u30EB\u80CC\u666F\u8272\u3002\u4E0B\u306B\u3042\u308B\u88C5\u98FE\u3092\u96A0\u3055\u306A\u3044\u305F\u3081\u306B\u3001\u8272\u306F\u4E0D\u900F\u904E\u3067\u3042\u3063\u3066\u306F\u306A\u308A\u307E\u305B\u3093\u3002","\u8A18\u53F7\u306E\u30C6\u30AD\u30B9\u30C8\u51FA\u73FE\u306E\u80CC\u666F\u8272\u3002\u57FA\u306B\u306A\u308B\u88C5\u98FE\u304C\u975E\u8868\u793A\u306A\u3089\u306A\u3044\u3088\u3046\u306B\u3001\u3053\u306E\u8272\u3092\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u5909\u6570\u306E\u8AAD\u307F\u53D6\u308A\u306A\u3069\u8AAD\u307F\u53D6\u308A\u30A2\u30AF\u30BB\u30B9\u4E2D\u306E\u30B7\u30F3\u30DC\u30EB\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u5909\u6570\u3078\u306E\u66F8\u304D\u8FBC\u307F\u306A\u3069\u66F8\u304D\u8FBC\u307F\u30A2\u30AF\u30BB\u30B9\u4E2D\u306E\u30B7\u30F3\u30DC\u30EB\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u8A18\u53F7\u306E\u30C6\u30AD\u30B9\u30C8\u51FA\u73FE\u7B87\u6240\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u30B7\u30F3\u30DC\u30EB\u306B\u3088\u3063\u3066\u5F37\u8ABF\u8868\u793A\u3055\u308C\u308B\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002\u30DE\u30FC\u30AB\u30FC\u306E\u8272\u306F\u3001\u57FA\u306B\u306A\u308B\u88C5\u98FE\u3092\u96A0\u3055\u306A\u3044\u3088\u3046\u306B\u4E0D\u900F\u660E\u4EE5\u5916\u306B\u3057\u307E\u3059\u3002","\u66F8\u304D\u8FBC\u307F\u30A2\u30AF\u30BB\u30B9 \u30B7\u30F3\u30DC\u30EB\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u306E\u30DE\u30FC\u30AB\u30FC\u8272\u3002\u4E0B\u306B\u3042\u308B\u88C5\u98FE\u3092\u96A0\u3055\u306A\u3044\u305F\u3081\u306B\u3001\u8272\u306F\u4E0D\u900F\u904E\u3067\u3042\u3063\u3066\u306F\u306A\u308A\u307E\u305B\u3093\u3002","\u8A18\u53F7\u306E\u30C6\u30AD\u30B9\u30C8\u51FA\u73FE\u306E\u6982\u8981\u30EB\u30FC\u30EB \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002\u57FA\u306B\u306A\u308B\u88C5\u98FE\u304C\u975E\u8868\u793A\u306A\u3089\u306A\u3044\u3088\u3046\u306B\u3001\u3053\u306E\u8272\u3092\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002"],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["\u6B21\u306E\u30B7\u30F3\u30DC\u30EB \u30CF\u30A4\u30E9\u30A4\u30C8\u306B\u79FB\u52D5","\u524D\u306E\u30B7\u30F3\u30DC\u30EB \u30CF\u30A4\u30E9\u30A4\u30C8\u306B\u79FB\u52D5","\u30B7\u30F3\u30DC\u30EB \u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u30C8\u30EA\u30AC\u30FC"],"vs/editor/contrib/wordOperations/browser/wordOperations":["\u5358\u8A9E\u306E\u524A\u9664"],"vs/platform/action/common/actionCommonCategories":["\u8868\u793A","\u30D8\u30EB\u30D7","\u30C6\u30B9\u30C8","\u30D5\u30A1\u30A4\u30EB","\u57FA\u672C\u8A2D\u5B9A","\u958B\u767A\u8005"],"vs/platform/actionWidget/browser/actionList":["{0} \u3067\u9069\u7528\u3059\u308B\u3001{1} \u3067\u30D7\u30EC\u30D3\u30E5\u30FC\u3059\u308B","\u9069\u7528\u3059\u308B\u306B\u306F {0}","{0}\u3001\u7121\u52B9\u306B\u306A\u3063\u305F\u7406\u7531: {1}","\u30A2\u30AF\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8"],"vs/platform/actionWidget/browser/actionWidget":["\u30A2\u30AF\u30B7\u30E7\u30F3 \u30D0\u30FC\u306E\u5207\u308A\u66FF\u3048\u6E08\u307F\u30A2\u30AF\u30B7\u30E7\u30F3\u9805\u76EE\u306E\u80CC\u666F\u8272\u3002","\u30A2\u30AF\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u4E00\u89A7\u304C\u8868\u793A\u3055\u308C\u308B\u304B\u3069\u3046\u304B","\u30A2\u30AF\u30B7\u30E7\u30F3 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u975E\u8868\u793A\u306B\u3059\u308B","\u524D\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u9078\u629E","\u6B21\u306E\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u9078\u629E","\u9078\u629E\u3057\u305F\u64CD\u4F5C\u3092\u627F\u8AFE","\u9078\u629E\u3057\u305F\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u30D7\u30EC\u30D3\u30E5\u30FC"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["\u975E\u8868\u793A","\u30E1\u30CB\u30E5\u30FC\u306E\u30EA\u30BB\u30C3\u30C8"],"vs/platform/actions/common/menuService":["'{0}' \u306E\u975E\u8868\u793A"],"vs/platform/audioCues/browser/audioCueService":["\u884C\u306E\u30A8\u30E9\u30FC","\u884C\u306E\u8B66\u544A","\u884C\u306E\u6298\u308A\u305F\u305F\u307E\u308C\u305F\u9762","\u884C\u306E\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8","\u884C\u306E\u30A4\u30F3\u30E9\u30A4\u30F3\u5019\u88DC","\u30BF\u30FC\u30DF\u30CA\u30EB \u30AF\u30A4\u30C3\u30AF\u4FEE\u6B63","\u30D6\u30EC\u30FC\u30AF\u30DD\u30A4\u30F3\u30C8\u3067\u30C7\u30D0\u30C3\u30AC\u30FC\u304C\u505C\u6B62\u3057\u307E\u3057\u305F","\u884C\u306B\u30A4\u30F3\u30EC\u30A4 \u30D2\u30F3\u30C8\u304C\u3042\u308A\u307E\u305B\u3093","\u30BF\u30B9\u30AF\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F","\u30BF\u30B9\u30AF\u304C\u5931\u6557\u3057\u307E\u3057\u305F","\u30BF\u30FC\u30DF\u30CA\u30EB \u30B3\u30DE\u30F3\u30C9\u304C\u5931\u6557\u3057\u307E\u3057\u305F","\u30BF\u30FC\u30DF\u30CA\u30EB \u30D9\u30EB","\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF \u30BB\u30EB\u304C\u5B8C\u4E86\u3057\u307E\u3057\u305F","\u30CE\u30FC\u30C8\u30D6\u30C3\u30AF \u30BB\u30EB\u304C\u5931\u6557\u3057\u307E\u3057\u305F","\u5DEE\u5206\u884C\u304C\u633F\u5165\u3055\u308C\u307E\u3057\u305F","\u5DEE\u5206\u884C\u304C\u524A\u9664\u3055\u308C\u307E\u3057\u305F","\u5909\u66F4\u3055\u308C\u305F\u5DEE\u5206\u884C","\u30C1\u30E3\u30C3\u30C8\u8981\u6C42\u304C\u9001\u4FE1\u3055\u308C\u307E\u3057\u305F","\u30C1\u30E3\u30C3\u30C8\u5FDC\u7B54\u3092\u53D7\u4FE1\u3057\u307E\u3057\u305F","\u30C1\u30E3\u30C3\u30C8\u306E\u5FDC\u7B54\u3092\u4FDD\u7559\u4E2D"],"vs/platform/configuration/common/configurationRegistry":["\u65E2\u5B9A\u306E\u8A00\u8A9E\u69CB\u6210\u306E\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9","{0} \u8A00\u8A9E\u304C\u512A\u5148\u3055\u308C\u308B\u8A2D\u5B9A\u3092\u69CB\u6210\u3057\u307E\u3059\u3002","\u8A00\u8A9E\u306B\u5BFE\u3057\u3066\u4E0A\u66F8\u304D\u3055\u308C\u308B\u30A8\u30C7\u30A3\u30BF\u30FC\u8A2D\u5B9A\u3092\u69CB\u6210\u3057\u307E\u3059\u3002","\u3053\u306E\u8A2D\u5B9A\u3067\u306F\u3001\u8A00\u8A9E\u3054\u3068\u306E\u69CB\u6210\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002","\u8A00\u8A9E\u306B\u5BFE\u3057\u3066\u4E0A\u66F8\u304D\u3055\u308C\u308B\u30A8\u30C7\u30A3\u30BF\u30FC\u8A2D\u5B9A\u3092\u69CB\u6210\u3057\u307E\u3059\u3002","\u3053\u306E\u8A2D\u5B9A\u3067\u306F\u3001\u8A00\u8A9E\u3054\u3068\u306E\u69CB\u6210\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002","\u7A7A\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u767B\u9332\u3067\u304D\u307E\u305B\u3093","'{0}' \u3092\u767B\u9332\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u308C\u306F\u3001\u8A00\u8A9E\u56FA\u6709\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u8A2D\u5B9A\u3092\u8A18\u8FF0\u3059\u308B\u30D7\u30ED\u30D1\u30C6\u30A3 \u30D1\u30BF\u30FC\u30F3 '\\\\[.*\\\\]$' \u306B\u4E00\u81F4\u3057\u3066\u3044\u307E\u3059\u3002'configurationDefaults' \u30B3\u30F3\u30C8\u30EA\u30D3\u30E5\u30FC\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","'{0}' \u3092\u767B\u9332\u3067\u304D\u307E\u305B\u3093\u3002\u3053\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u306F\u65E2\u306B\u767B\u9332\u3055\u308C\u3066\u3044\u307E\u3059\u3002","'{0}' \u3092\u767B\u9332\u3067\u304D\u307E\u305B\u3093\u3002\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30DD\u30EA\u30B7\u30FC {1} \u306F\u65E2\u306B {2} \u306B\u767B\u9332\u3055\u308C\u3066\u3044\u307E\u3059\u3002"],"vs/platform/contextkey/browser/contextKeyService":["\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8 \u30AD\u30FC\u306B\u95A2\u3059\u308B\u60C5\u5831\u3092\u8FD4\u3059\u30B3\u30DE\u30F3\u30C9"],"vs/platform/contextkey/common/contextkey":["\u7A7A\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8 \u30AD\u30FC\u5F0F","\u5F0F\u3092\u66F8\u304D\u5FD8\u308C\u307E\u3057\u305F\u304B? 'false' \u307E\u305F\u306F 'true' \u3092\u6307\u5B9A\u3059\u308B\u3068\u3001\u305D\u308C\u305E\u308C\u5E38\u306B false \u307E\u305F\u306F true \u3068\u8A55\u4FA1\u3067\u304D\u307E\u3059\u3002","'not' \u306E\u5F8C\u306B 'in' \u304C\u3042\u308A\u307E\u3059\u3002","\u7D42\u308F\u308A\u304B\u3063\u3053 ')'","\u4E88\u671F\u3057\u306A\u3044\u30C8\u30FC\u30AF\u30F3","\u30C8\u30FC\u30AF\u30F3\u306E\u524D\u306B && \u307E\u305F\u306F || \u3092\u6307\u5B9A\u3057\u5FD8\u308C\u307E\u3057\u305F\u304B?","\u4E88\u671F\u3057\u306A\u3044\u5F0F\u306E\u7D42\u308F\u308A","\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8 \u30AD\u30FC\u3092\u6307\u5B9A\u3057\u5FD8\u308C\u307E\u3057\u305F\u304B?",`\u671F\u5F85\u5024: {0}\r -\u53D7\u53D6\u6E08\u307F: '{1}'\u3002`],"vs/platform/contextkey/common/contextkeys":["\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0 \u30B7\u30B9\u30C6\u30E0\u304C macOS \u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0 \u30B7\u30B9\u30C6\u30E0\u304C Linux \u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0 \u30B7\u30B9\u30C6\u30E0\u304C Windows \u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u304C Web \u30D6\u30E9\u30A6\u30B6\u30FC\u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0 \u30B7\u30B9\u30C6\u30E0\u304C\u975E\u30D6\u30E9\u30A6\u30B6\u30FC \u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u4E0A\u306E macOS \u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30AA\u30DA\u30EC\u30FC\u30C6\u30A3\u30F3\u30B0 \u30B7\u30B9\u30C6\u30E0\u304C iOS \u3067\u3042\u308B\u304B\u3069\u3046\u304B","\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u304C\u30E2\u30D0\u30A4\u30EB Web \u30D6\u30E9\u30A6\u30B6\u30FC\u3067\u3042\u308B\u304B\u3069\u3046\u304B","VS Code \u306E\u54C1\u8CEA\u306E\u7A2E\u985E","\u30AD\u30FC\u30DC\u30FC\u30C9\u306E\u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u5165\u529B\u30DC\u30C3\u30AF\u30B9\u5185\u306B\u3042\u308B\u304B\u3069\u3046\u304B"],"vs/platform/contextkey/common/scanner":["{0} \u3092\u610F\u56F3\u3057\u3066\u3044\u307E\u3057\u305F\u304B?","{0} \u307E\u305F\u306F {1} \u3092\u610F\u56F3\u3057\u3066\u3044\u307E\u3057\u305F\u304B?","{0}\u3001{1}\u3001\u307E\u305F\u306F {2} \u3092\u610F\u56F3\u3057\u3066\u3044\u307E\u3057\u305F\u304B?","\u898B\u7A4D\u3082\u308A\u3092\u958B\u3044\u305F\u308A\u9589\u3058\u305F\u308A\u3057\u5FD8\u308C\u307E\u3057\u305F\u304B?","'/' (\u30B9\u30E9\u30C3\u30B7\u30E5) \u6587\u5B57\u3092\u30A8\u30B9\u30B1\u30FC\u30D7\u3057\u5FD8\u308C\u307E\u3057\u305F\u304B? \u30A8\u30B9\u30B1\u30FC\u30D7\u3059\u308B\u524D\u306B '\\\\/' \u306A\u3069\u306E 2 \u3064\u306E\u5186\u8A18\u53F7\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002"],"vs/platform/history/browser/contextScopedHistoryWidget":["\u5019\u88DC\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B"],"vs/platform/keybinding/common/abstractKeybindingService":["({0}) \u304C\u6E21\u3055\u308C\u307E\u3057\u305F\u30022 \u756A\u76EE\u306E\u30AD\u30FC\u3092\u5F85\u3063\u3066\u3044\u307E\u3059...","({0}) \u304C\u6E21\u3055\u308C\u307E\u3057\u305F\u3002\u6B21\u306E\u30AD\u30FC\u3092\u5F85\u3063\u3066\u3044\u307E\u3059...","\u30AD\u30FC\u306E\u7D44\u307F\u5408\u308F\u305B ({0}\u3001{1}) \u306F\u30B3\u30DE\u30F3\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002","\u30AD\u30FC\u306E\u7D44\u307F\u5408\u308F\u305B ({0}\u3001{1}) \u306F\u30B3\u30DE\u30F3\u30C9\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002"],"vs/platform/list/browser/listService":["\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1","Windows \u304A\u3088\u3073 Linux \u4E0A\u306E `Control` \u30AD\u30FC\u3068 macOS \u4E0A\u306E `Command` \u30AD\u30FC\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002","Windows \u304A\u3088\u3073 Linux \u4E0A\u306E `Alt` \u30AD\u30FC\u3068 macOS \u4E0A\u306E `Option` \u30AD\u30FC\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002","\u30DE\u30A6\u30B9\u3092\u4F7F\u7528\u3057\u3066\u9805\u76EE\u3092\u8907\u6570\u9078\u629E\u3059\u308B\u3068\u304D\u306B\u4F7F\u7528\u3059\u308B\u4FEE\u98FE\u30AD\u30FC\u3067\u3059 (\u305F\u3068\u3048\u3070\u3001\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u30FC\u3067\u30A8\u30C7\u30A3\u30BF\u30FC\u3068 scm \u30D3\u30E5\u30FC\u3092\u958B\u304F\u306A\u3069)\u3002'\u6A2A\u306B\u4E26\u3079\u3066\u958B\u304F' \u30DE\u30A6\u30B9 \u30B8\u30A7\u30B9\u30C1\u30E3\u30FC (\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u5834\u5408) \u306F\u3001\u8907\u6570\u9078\u629E\u306E\u4FEE\u98FE\u30AD\u30FC\u3068\u7AF6\u5408\u3057\u306A\u3044\u3088\u3046\u306B\u8ABF\u6574\u3055\u308C\u307E\u3059\u3002","\u30DE\u30A6\u30B9\u3092\u4F7F\u7528\u3057\u3066\u3001\u30C4\u30EA\u30FC\u3068\u30EA\u30B9\u30C8\u5185\u306E\u9805\u76EE\u3092\u958B\u304F\u65B9\u6CD5\u3092\u5236\u5FA1\u3057\u307E\u3059 (\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u308B\u5834\u5408)\u3002\u9069\u7528\u3067\u304D\u306A\u3044\u5834\u5408\u3001\u4E00\u90E8\u306E\u30C4\u30EA\u30FC\u3084\u30EA\u30B9\u30C8\u3067\u306F\u3053\u306E\u8A2D\u5B9A\u304C\u7121\u8996\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002","\u30EA\u30B9\u30C8\u3068\u30C4\u30EA\u30FC\u304C\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u3067\u6C34\u5E73\u30B9\u30AF\u30ED\u30FC\u30EB\u3092\u30B5\u30DD\u30FC\u30C8\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u8B66\u544A: \u3053\u306E\u8A2D\u5B9A\u3092\u30AA\u30F3\u306B\u3059\u308B\u3068\u3001\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u306B\u5F71\u97FF\u304C\u3042\u308A\u307E\u3059\u3002","\u30B9\u30AF\u30ED\u30FC\u30EB\u30D0\u30FC\u306E\u30AF\u30EA\u30C3\u30AF\u3067\u30DA\u30FC\u30B8\u3054\u3068\u306B\u30B9\u30AF\u30ED\u30FC\u30EB\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30C4\u30EA\u30FC\u306E\u30A4\u30F3\u30C7\u30F3\u30C8\u3092\u30D4\u30AF\u30BB\u30EB\u5358\u4F4D\u3067\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30C4\u30EA\u30FC\u3067\u30A4\u30F3\u30C7\u30F3\u30C8\u306E\u30AC\u30A4\u30C9\u3092\u8868\u793A\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30EA\u30B9\u30C8\u3068\u30C4\u30EA\u30FC\u3067\u30B9\u30E0\u30FC\u30BA \u30B9\u30AF\u30ED\u30FC\u30EB\u3092\u4F7F\u7528\u3059\u308B\u304B\u3069\u3046\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30DE\u30A6\u30B9 \u30DB\u30A4\u30FC\u30EB \u30B9\u30AF\u30ED\u30FC\u30EB \u30A4\u30D9\u30F3\u30C8\u306E `deltaX` \u3068 `deltaY` \u3067\u4F7F\u7528\u3055\u308C\u308B\u4E57\u6570\u3002","`Alt` \u3092\u62BC\u3059\u3068\u3001\u30B9\u30AF\u30ED\u30FC\u30EB\u901F\u5EA6\u304C\u500D\u5897\u3057\u307E\u3059\u3002","\u691C\u7D22\u6642\u306B\u8981\u7D20\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002\u3055\u3089\u306B\u4E0A\u4E0B\u306E\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u3067\u306F\u3001\u5F37\u8ABF\u8868\u793A\u3055\u308C\u305F\u8981\u7D20\u306E\u307F\u304C\u30B9\u30AD\u30E3\u30F3\u3055\u308C\u307E\u3059\u3002","\u691C\u7D22\u6642\u306B\u8981\u7D20\u3092\u30D5\u30A3\u30EB\u30BF\u30FC\u51E6\u7406\u3057\u307E\u3059\u3002","\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u306E\u30EA\u30B9\u30C8\u3068\u30C4\u30EA\u30FC\u306E\u65E2\u5B9A\u306E\u691C\u7D22\u30E2\u30FC\u30C9\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u7C21\u5358\u306A\u30AD\u30FC\u30DC\u30FC\u30C9 \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306F\u3001\u30AD\u30FC\u30DC\u30FC\u30C9\u5165\u529B\u306B\u4E00\u81F4\u3059\u308B\u8981\u7D20\u306B\u7126\u70B9\u3092\u5F53\u3066\u307E\u3059\u3002\u4E00\u81F4\u51E6\u7406\u306F\u30D7\u30EC\u30D5\u30A3\u30C3\u30AF\u30B9\u3067\u306E\u307F\u5B9F\u884C\u3055\u308C\u307E\u3059\u3002","\u30AD\u30FC\u30DC\u30FC\u30C9 \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306E\u5F37\u8ABF\u8868\u793A\u3092\u4F7F\u7528\u3059\u308B\u3068\u3001\u30AD\u30FC\u30DC\u30FC\u30C9\u5165\u529B\u306B\u4E00\u81F4\u3059\u308B\u8981\u7D20\u304C\u5F37\u8ABF\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4E0A\u304A\u3088\u3073\u4E0B\u3078\u306E\u79FB\u52D5\u306F\u3001\u5F37\u8ABF\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u8981\u7D20\u306E\u307F\u3092\u79FB\u52D5\u3057\u307E\u3059\u3002","\u30AD\u30FC\u30DC\u30FC\u30C9 \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u306E\u30D5\u30A3\u30EB\u30BF\u30FC\u3067\u306F\u3001\u30AD\u30FC\u30DC\u30FC\u30C9\u5165\u529B\u306B\u4E00\u81F4\u3057\u306A\u3044\u3059\u3079\u3066\u306E\u8981\u7D20\u304C\u30D5\u30A3\u30EB\u30BF\u30FC\u51E6\u7406\u3055\u308C\u3001\u975E\u8868\u793A\u306B\u306A\u308A\u307E\u3059\u3002","\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073\u30C4\u30EA\u30FC\u306E\u30AD\u30FC\u30DC\u30FC\u30C9 \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3 \u30B9\u30BF\u30A4\u30EB\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u5358\u7D14\u3001\u5F37\u8ABF\u8868\u793A\u3001\u30D5\u30A3\u30EB\u30BF\u30FC\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002","\u4EE3\u308F\u308A\u306B 'workbench.list.defaultFindMode' \u3068 'workbench.list.typeNavigationMode' \u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u691C\u7D22\u6642\u306B\u3042\u3044\u307E\u3044\u4E00\u81F4\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u691C\u7D22\u6642\u306B\u9023\u7D9A\u4E00\u81F4\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002","\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u3067\u30EA\u30B9\u30C8\u3068\u30C4\u30EA\u30FC\u3092\u691C\u7D22\u3059\u308B\u3068\u304D\u306B\u4F7F\u7528\u3055\u308C\u308B\u4E00\u81F4\u306E\u7A2E\u985E\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002","\u30D5\u30A9\u30EB\u30C0\u30FC\u540D\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u305F\u3068\u304D\u306B\u30C4\u30EA\u30FC \u30D5\u30A9\u30EB\u30C0\u30FC\u304C\u5C55\u958B\u3055\u308C\u308B\u65B9\u6CD5\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002\u9069\u7528\u3067\u304D\u306A\u3044\u5834\u5408\u3001\u4E00\u90E8\u306E\u30C4\u30EA\u30FC\u3084\u30EA\u30B9\u30C8\u3067\u306F\u3053\u306E\u8A2D\u5B9A\u304C\u7121\u8996\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002","\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u306E\u30EA\u30B9\u30C8\u3068\u30C4\u30EA\u30FC\u3067\u578B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u304C\u3069\u306E\u3088\u3046\u306B\u6A5F\u80FD\u3059\u308B\u304B\u3092\u5236\u5FA1\u3057\u307E\u3059\u3002`trigger` \u306B\u8A2D\u5B9A\u3059\u308B\u3068\u3001`list.triggerTypeNavigation` \u30B3\u30DE\u30F3\u30C9\u306E\u5B9F\u884C\u5F8C\u306B\u578B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u304C\u958B\u59CB\u3055\u308C\u307E\u3059\u3002"],"vs/platform/markers/common/markers":["\u30A8\u30E9\u30FC","\u8B66\u544A","\u60C5\u5831"],"vs/platform/quickinput/browser/commandsQuickAccess":["\u6700\u8FD1\u4F7F\u7528\u3057\u305F\u3082\u306E","\u540C\u69D8\u306E\u30B3\u30DE\u30F3\u30C9","\u3088\u304F\u4F7F\u7528\u3059\u308B\u3082\u306E","\u305D\u306E\u4ED6\u306E\u30B3\u30DE\u30F3\u30C9","\u540C\u69D8\u306E\u30B3\u30DE\u30F3\u30C9","{0}, {1}","\u30B3\u30DE\u30F3\u30C9 '{0}' \u3067\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F"],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["\u623B\u308B","'Enter' \u3092\u62BC\u3057\u3066\u5165\u529B\u3092\u78BA\u8A8D\u3059\u308B\u304B 'Escape' \u3092\u62BC\u3057\u3066\u53D6\u308A\u6D88\u3057\u307E\u3059","{0}/{1}","\u5165\u529B\u3059\u308B\u3068\u7D50\u679C\u304C\u7D5E\u308A\u8FBC\u307E\u308C\u307E\u3059\u3002"],"vs/platform/quickinput/browser/quickInputController":["\u3059\u3079\u3066\u306E\u30C1\u30A7\u30C3\u30AF \u30DC\u30C3\u30AF\u30B9\u3092\u5207\u308A\u66FF\u3048\u308B","{0} \u4EF6\u306E\u7D50\u679C","{0} \u500B\u9078\u629E\u6E08\u307F","OK","\u30AB\u30B9\u30BF\u30E0","\u623B\u308B ({0})","\u623B\u308B"],"vs/platform/quickinput/browser/quickInputList":["\u30AF\u30A4\u30C3\u30AF\u5165\u529B"],"vs/platform/quickinput/browser/quickInputUtils":["\u30AF\u30EA\u30C3\u30AF\u3057\u3066 '{0}' \u30B3\u30DE\u30F3\u30C9\u3092\u5B9F\u884C"],"vs/platform/theme/common/colorRegistry":["\u5168\u4F53\u306E\u524D\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3088\u3063\u3066\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\u306E\u307F\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u7121\u52B9\u306A\u8981\u7D20\u306E\u5168\u4F53\u7684\u306A\u524D\u666F\u3002\u3053\u306E\u8272\u306F\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3088\u3063\u3066\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3055\u308C\u306A\u3044\u5834\u5408\u306B\u306E\u307F\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30A8\u30E9\u30FC \u30E1\u30C3\u30BB\u30FC\u30B8\u5168\u4F53\u306E\u524D\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3088\u3063\u3066\u4E0A\u66F8\u304D\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\u306E\u307F\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u8FFD\u52A0\u60C5\u5831\u3092\u63D0\u4F9B\u3059\u308B\u8AAC\u660E\u6587\u306E\u524D\u666F\u8272\u3001\u4F8B:\u30E9\u30D9\u30EB\u3002","\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u306E\u30A2\u30A4\u30B3\u30F3\u306E\u65E2\u5B9A\u306E\u8272\u3002","\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u8981\u7D20\u306E\u5883\u754C\u7DDA\u5168\u4F53\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306B\u3088\u3063\u3066\u4E0A\u66F8\u304D\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306B\u306E\u307F\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8\u3092\u5F37\u3081\u308B\u305F\u3081\u306B\u3001\u4ED6\u306E\u8981\u7D20\u3068\u9694\u3066\u308B\u8FFD\u52A0\u306E\u5883\u754C\u7DDA\u3002","\u30B3\u30F3\u30C8\u30E9\u30B9\u30C8\u3092\u5F37\u3081\u308B\u305F\u3081\u306B\u3001\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u4ED6\u8981\u7D20\u3068\u9694\u3066\u308B\u8FFD\u52A0\u306E\u5883\u754C\u7DDA\u3002","\u30EF\u30FC\u30AF\u30D9\u30F3\u30C1\u5185\u306E\u30C6\u30AD\u30B9\u30C8\u9078\u629E\u306E\u80CC\u666F\u8272 (\u4F8B: \u5165\u529B\u30D5\u30A3\u30FC\u30EB\u30C9\u3084\u30C6\u30AD\u30B9\u30C8\u30A8\u30EA\u30A2)\u3002\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u9078\u629E\u306B\u306F\u9069\u7528\u3055\u308C\u306A\u3044\u3053\u3068\u306B\u6CE8\u610F\u3057\u3066\u304F\u3060\u3055\u3044\u3002","\u30C6\u30AD\u30B9\u30C8\u306E\u533A\u5207\u308A\u6587\u5B57\u306E\u8272\u3002","\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u30EA\u30F3\u30AF\u306E\u524D\u666F\u8272\u3002","\u30AF\u30EA\u30C3\u30AF\u3055\u308C\u305F\u3068\u304D\u3068\u30DE\u30A6\u30B9\u3092\u30DB\u30D0\u30FC\u3057\u305F\u3068\u304D\u306E\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u30EA\u30F3\u30AF\u306E\u524D\u666F\u8272\u3002","\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8\u6E08\u307F\u30C6\u30AD\u30B9\u30C8 \u30BB\u30B0\u30E1\u30F3\u30C8\u306E\u524D\u666F\u8272\u3002","\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u30D6\u30ED\u30C3\u30AF\u5F15\u7528\u306E\u80CC\u666F\u8272\u3002","\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u30D6\u30ED\u30C3\u30AF\u5F15\u7528\u306E\u5883\u754C\u7DDA\u8272\u3002","\u30C6\u30AD\u30B9\u30C8\u5185\u306E\u30B3\u30FC\u30C9 \u30D6\u30ED\u30C3\u30AF\u306E\u80CC\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u691C\u7D22/\u7F6E\u63DB\u7A93\u306A\u3069\u3001\u30A8\u30C7\u30A3\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u5F71\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u691C\u7D22/\u7F6E\u63DB\u7A93\u306A\u3069\u3001\u30A8\u30C7\u30A3\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u5165\u529B\u30DC\u30C3\u30AF\u30B9\u306E\u80CC\u666F\u3002","\u5165\u529B\u30DC\u30C3\u30AF\u30B9\u306E\u524D\u666F\u3002","\u5165\u529B\u30DC\u30C3\u30AF\u30B9\u306E\u5883\u754C\u7DDA\u3002","\u5165\u529B\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30A2\u30AF\u30C6\u30A3\u30D6 \u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u5165\u529B\u30D5\u30A3\u30FC\u30EB\u30C9\u3067\u30A2\u30AF\u30C6\u30A3\u30D6\u5316\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u80CC\u666F\u8272\u3002","\u5165\u529B\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u80CC\u666F\u306E\u30DB\u30D0\u30FC\u8272\u3002","\u5165\u529B\u30D5\u30A3\u30FC\u30EB\u30C9\u3067\u30A2\u30AF\u30C6\u30A3\u30D6\u5316\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u524D\u666F\u8272\u3002","\u5165\u529B\u30DC\u30C3\u30AF\u30B9\u306E\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC \u30C6\u30AD\u30B9\u30C8\u306E\u524D\u666F\u8272\u3002","\u60C5\u5831\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u80CC\u666F\u8272\u3002","\u60C5\u5831\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u524D\u666F\u8272\u3002","\u60C5\u5831\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u5883\u754C\u7DDA\u8272\u3002","\u8B66\u544A\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u80CC\u666F\u8272\u3002","\u8B66\u544A\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u524D\u666F\u8272\u3002","\u8B66\u544A\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u5883\u754C\u7DDA\u8272\u3002","\u30A8\u30E9\u30FC\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u80CC\u666F\u8272\u3002","\u30A8\u30E9\u30FC\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u524D\u666F\u8272\u3002","\u30A8\u30E9\u30FC\u306E\u91CD\u5927\u5EA6\u3092\u793A\u3059\u5165\u529B\u691C\u8A3C\u306E\u5883\u754C\u7DDA\u8272\u3002","\u30C9\u30ED\u30C3\u30D7\u30C0\u30A6\u30F3\u306E\u80CC\u666F\u3002","\u30C9\u30ED\u30C3\u30D7\u30C0\u30A6\u30F3 \u30EA\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002","\u30C9\u30ED\u30C3\u30D7\u30C0\u30A6\u30F3\u306E\u524D\u666F\u3002","\u30C9\u30ED\u30C3\u30D7\u30C0\u30A6\u30F3\u306E\u5883\u754C\u7DDA\u3002","\u30DC\u30BF\u30F3\u306E\u524D\u666F\u8272\u3002","\u30DC\u30BF\u30F3\u306E\u533A\u5207\u308A\u8A18\u53F7\u306E\u8272\u3002","\u30DC\u30BF\u30F3\u306E\u80CC\u666F\u8272\u3002","\u30DB\u30D0\u30FC\u6642\u306E\u30DC\u30BF\u30F3\u80CC\u666F\u8272\u3002","\u30DC\u30BF\u30F3\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u30DC\u30BF\u30F3\u306E 2 \u6B21\u7684\u306A\u524D\u666F\u8272\u3002","\u30DC\u30BF\u30F3\u306E 2 \u6B21\u7684\u306A\u80CC\u666F\u8272\u3002","\u30DB\u30D0\u30FC\u6642\u306E\u30DC\u30BF\u30F3\u306E 2 \u6B21\u7684\u306A\u80CC\u666F\u8272\u3002","\u30D0\u30C3\u30B8\u306E\u80CC\u666F\u8272\u3002\u30D0\u30C3\u30B8\u3068\u306F\u5C0F\u3055\u306A\u60C5\u5831\u30E9\u30D9\u30EB\u306E\u3053\u3068\u3067\u3059\u3002\u4F8B:\u691C\u7D22\u7D50\u679C\u306E\u6570","\u30D0\u30C3\u30B8\u306E\u524D\u666F\u8272\u3002\u30D0\u30C3\u30B8\u3068\u306F\u5C0F\u3055\u306A\u60C5\u5831\u30E9\u30D9\u30EB\u306E\u3053\u3068\u3067\u3059\u3002\u4F8B:\u691C\u7D22\u7D50\u679C\u306E\u6570","\u30D3\u30E5\u30FC\u304C\u30B9\u30AF\u30ED\u30FC\u30EB\u3055\u308C\u305F\u3053\u3068\u3092\u793A\u3059\u30B9\u30AF\u30ED\u30FC\u30EB \u30D0\u30FC\u306E\u5F71\u3002","\u30B9\u30AF\u30ED\u30FC\u30EB \u30D0\u30FC\u306E\u30B9\u30E9\u30A4\u30C0\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30DB\u30D0\u30FC\u6642\u306E\u30B9\u30AF\u30ED\u30FC\u30EB \u30D0\u30FC \u30B9\u30E9\u30A4\u30C0\u30FC\u80CC\u666F\u8272\u3002","\u30AF\u30EA\u30C3\u30AF\u6642\u306E\u30B9\u30AF\u30ED\u30FC\u30EB \u30D0\u30FC \u30B9\u30E9\u30A4\u30C0\u30FC\u80CC\u666F\u8272\u3002","\u6642\u9593\u306E\u304B\u304B\u308B\u64CD\u4F5C\u3067\u8868\u793A\u3059\u308B\u30D7\u30ED\u30B0\u30EC\u30B9 \u30D0\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u30A8\u30E9\u30FC \u30C6\u30AD\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30A8\u30E9\u30FC\u3092\u793A\u3059\u6CE2\u7DDA\u306E\u524D\u666F\u8272\u3002","\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u30A8\u30E9\u30FC\u306E\u4E8C\u91CD\u4E0B\u7DDA\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u8B66\u544A\u30C6\u30AD\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u8B66\u544A\u3092\u793A\u3059\u6CE2\u7DDA\u306E\u524D\u666F\u8272\u3002","\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u8B66\u544A\u306E\u4E8C\u91CD\u4E0B\u7DDA\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u60C5\u5831\u30C6\u30AD\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u60C5\u5831\u3092\u793A\u3059\u6CE2\u7DDA\u306E\u524D\u666F\u8272\u3002","\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u60C5\u5831\u306E\u4E8C\u91CD\u4E0B\u7DDA\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3067\u30D2\u30F3\u30C8\u3092\u793A\u3059\u6CE2\u7DDA\u306E\u524D\u666F\u8272\u3002","\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u3001\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u30D2\u30F3\u30C8\u306E\u4E8C\u91CD\u4E0B\u7DDA\u306E\u8272\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u67A0\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u65E2\u5B9A\u306E\u524D\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u306E\u80CC\u666F\u8272","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u56FA\u5B9A\u30B9\u30AF\u30ED\u30FC\u30EB\u306E\u30DB\u30D0\u30FC\u80CC\u666F\u8272","\u691C\u7D22/\u7F6E\u63DB\u7A93\u306A\u3069\u3001\u30A8\u30C7\u30A3\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u80CC\u666F\u8272\u3002","\u691C\u7D22/\u7F6E\u63DB\u306A\u3069\u3092\u884C\u3046\u30A8\u30C7\u30A3\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u524D\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u5883\u754C\u7DDA\u8272\u3002\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u5883\u754C\u7DDA\u304C\u3042\u308A\u3001\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u3088\u3063\u3066\u914D\u8272\u3092\u4E0A\u66F8\u304D\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u3067\u306E\u307F\u3053\u306E\u914D\u8272\u306F\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30B5\u30A4\u30BA\u5909\u66F4\u30D0\u30FC\u306E\u5883\u754C\u7DDA\u8272\u3002\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u30B5\u30A4\u30BA\u5909\u66F4\u306E\u5883\u754C\u7DDA\u304C\u3042\u308A\u3001\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u3088\u3063\u3066\u914D\u8272\u3092\u4E0A\u66F8\u304D\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u3067\u306E\u307F\u3053\u306E\u914D\u8272\u306F\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30AF\u30A4\u30C3\u30AF \u30D4\u30C3\u30AB\u30FC\u306E\u80CC\u666F\u8272\u3002\u30AF\u30A4\u30C3\u30AF \u30D4\u30C3\u30AB\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306F\u3001\u30B3\u30DE\u30F3\u30C9 \u30D1\u30EC\u30C3\u30C8\u306E\u3088\u3046\u306A\u30D4\u30C3\u30AB\u30FC\u306E\u30B3\u30F3\u30C6\u30CA\u30FC\u3067\u3059\u3002","\u30AF\u30A4\u30C3\u30AF \u30D4\u30C3\u30AB\u30FC\u306E\u524D\u666F\u8272\u3002\u30AF\u30A4\u30C3\u30AF \u30D4\u30C3\u30AB\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306F\u3001\u30B3\u30DE\u30F3\u30C9 \u30D1\u30EC\u30C3\u30C8\u306E\u3088\u3046\u306A\u30D4\u30C3\u30AB\u30FC\u306E\u30B3\u30F3\u30C6\u30CA\u30FC\u3067\u3059\u3002","\u30AF\u30A4\u30C3\u30AF \u30D4\u30C3\u30AB\u30FC \u306E\u30BF\u30A4\u30C8\u30EB\u306E\u80CC\u666F\u8272\u3002\u30AF\u30A4\u30C3\u30AF \u30D4\u30C3\u30AB\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306F\u3001\u30B3\u30DE\u30F3\u30C9 \u30D1\u30EC\u30C3\u30C8\u306E\u3088\u3046\u306A\u30D4\u30C3\u30AB\u30FC\u306E\u30B3\u30F3\u30C6\u30CA\u30FC\u3067\u3059\u3002","\u30E9\u30D9\u30EB\u3092\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u305F\u3081\u306E\u30AF\u30EA\u30C3\u30AF\u9078\u629E\u306E\u8272\u3002","\u5883\u754C\u7DDA\u3092\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\u305F\u3081\u306E\u30AF\u30A4\u30C3\u30AF\u9078\u629E\u306E\u8272\u3002","\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306E\u80CC\u666F\u8272\u3067\u3059\u3002\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u8868\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306E\u524D\u666F\u8272\u3067\u3059\u3002\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u8868\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306E\u5883\u754C\u7DDA\u306E\u8272\u3067\u3059\u3002\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u8868\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306E\u4E0B\u306E\u5883\u754C\u7DDA\u306E\u8272\u3067\u3059\u3002\u30AD\u30FC \u30D0\u30A4\u30F3\u30C9 \u30E9\u30D9\u30EB\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30B7\u30E7\u30FC\u30C8\u30AB\u30C3\u30C8\u3092\u8868\u3059\u305F\u3081\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9078\u629E\u7BC4\u56F2\u306E\u8272\u3002","\u30CF\u30A4 \u30B3\u30F3\u30C8\u30E9\u30B9\u30C8\u306E\u9078\u629E\u6E08\u307F\u30C6\u30AD\u30B9\u30C8\u306E\u8272\u3002","\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9078\u629E\u7BC4\u56F2\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u9078\u629E\u7BC4\u56F2\u306E\u540C\u3058\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u9818\u57DF\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u9078\u629E\u7BC4\u56F2\u3068\u540C\u3058\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u73FE\u5728\u306E\u691C\u7D22\u4E00\u81F4\u9805\u76EE\u306E\u8272\u3002","\u305D\u306E\u4ED6\u306E\u691C\u7D22\u6761\u4EF6\u306B\u4E00\u81F4\u3059\u308B\u9805\u76EE\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u691C\u7D22\u3092\u5236\u9650\u3059\u308B\u7BC4\u56F2\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u73FE\u5728\u306E\u691C\u7D22\u4E00\u81F4\u9805\u76EE\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u4ED6\u306E\u691C\u7D22\u4E00\u81F4\u9805\u76EE\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u691C\u7D22\u3092\u5236\u9650\u3059\u308B\u7BC4\u56F2\u306E\u5883\u754C\u7DDA\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u691C\u7D22\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30AF\u30A8\u30EA\u306E\u8272\u304C\u4E00\u81F4\u3057\u307E\u3059\u3002","\u691C\u7D22\u30A8\u30C7\u30A3\u30BF\u30FC \u30AF\u30A8\u30EA\u306E\u5883\u754C\u7DDA\u306E\u8272\u304C\u4E00\u81F4\u3057\u307E\u3059\u3002","\u691C\u7D22\u30D3\u30E5\u30FC\u30EC\u30C3\u30C8\u306E\u5B8C\u4E86\u30E1\u30C3\u30BB\u30FC\u30B8\u5185\u306E\u30C6\u30AD\u30B9\u30C8\u306E\u8272\u3002","\u30DB\u30D0\u30FC\u304C\u8868\u793A\u3055\u308C\u3066\u3044\u308B\u8A9E\u306E\u4E0B\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30DB\u30D0\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30DB\u30D0\u30FC\u306E\u524D\u666F\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC \u30DB\u30D0\u30FC\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u30DB\u30D0\u30FC\u306E\u30B9\u30C6\u30FC\u30BF\u30B9 \u30D0\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30EA\u30F3\u30AF\u306E\u8272\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D2\u30F3\u30C8\u306E\u524D\u666F\u8272","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D2\u30F3\u30C8\u306E\u80CC\u666F\u8272","\u7A2E\u985E\u306E\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D2\u30F3\u30C8\u306E\u524D\u666F\u8272","\u7A2E\u985E\u306E\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D2\u30F3\u30C8\u306E\u80CC\u666F\u8272","\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D2\u30F3\u30C8\u306E\u524D\u666F\u8272","\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u30A4\u30F3\u30E9\u30A4\u30F3 \u30D2\u30F3\u30C8\u306E\u80CC\u666F\u8272","\u96FB\u7403\u30A2\u30AF\u30B7\u30E7\u30F3 \u30A2\u30A4\u30B3\u30F3\u306B\u4F7F\u7528\u3059\u308B\u8272\u3002","\u81EA\u52D5\u4FEE\u6B63\u306E\u96FB\u7403\u30A2\u30AF\u30B7\u30E7\u30F3 \u30A2\u30A4\u30B3\u30F3\u3068\u3057\u3066\u4F7F\u7528\u3055\u308C\u308B\u8272\u3002","\u633F\u5165\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u524A\u9664\u3057\u305F\u30C6\u30AD\u30B9\u30C8\u306E\u80CC\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u633F\u5165\u3055\u308C\u305F\u884C\u306E\u80CC\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u524A\u9664\u3057\u305F\u884C\u306E\u80CC\u666F\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u633F\u5165\u3055\u308C\u305F\u884C\u306E\u4F59\u767D\u306E\u80CC\u666F\u8272\u3002","\u524A\u9664\u3055\u308C\u305F\u884C\u306E\u4F59\u767D\u306E\u80CC\u666F\u8272\u3002","\u633F\u5165\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u3064\u3044\u3066\u3001\u5DEE\u5206\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u3092\u524D\u9762\u306B\u7F6E\u304D\u307E\u3059\u3002","\u524A\u9664\u3055\u308C\u305F\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u3064\u3044\u3066\u3001\u5DEE\u5206\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u3092\u524D\u9762\u306B\u7F6E\u304D\u307E\u3059\u3002","\u633F\u5165\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306E\u8F2A\u90ED\u306E\u8272\u3002","\u524A\u9664\u3055\u308C\u305F\u30C6\u30AD\u30B9\u30C8\u306E\u8F2A\u90ED\u306E\u8272\u3002","2 \u3064\u306E\u30C6\u30AD\u30B9\u30C8 \u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9593\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u5BFE\u89D2\u7DDA\u306E\u5857\u308A\u3064\u3076\u3057\u8272\u3002\u5BFE\u89D2\u7DDA\u306E\u5857\u308A\u3064\u3076\u3057\u306F\u3001\u6A2A\u306B\u4E26\u3079\u3066\u6BD4\u8F03\u3059\u308B\u30D3\u30E5\u30FC\u3067\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u30D6\u30ED\u30C3\u30AF\u306E\u80CC\u666F\u8272\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u30D6\u30ED\u30C3\u30AF\u306E\u524D\u666F\u8272\u3002","\u5DEE\u5206\u30A8\u30C7\u30A3\u30BF\u30FC\u5185\u306E\u5909\u66F4\u3055\u308C\u3066\u3044\u306A\u3044\u30B3\u30FC\u30C9\u306E\u80CC\u666F\u8272\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u80CC\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u524D\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30EA\u30B9\u30C8\u3084\u30C4\u30EA\u30FC\u304C\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u5834\u5408\u306E\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30EA\u30B9\u30C8\u3084\u30C4\u30EA\u30FC\u306E\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30EA\u30B9\u30C8\u3084\u30C4\u30EA\u30FC\u306B\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306B\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30EA\u30B9\u30C8/\u30C4\u30EA\u30FC\u304C\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u9078\u629E\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306E\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u30A2\u30A4\u30C6\u30E0\u306E\u30EA\u30B9\u30C8/\u30C4\u30EA\u30FC \u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u306E\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30EA\u30B9\u30C8/\u30C4\u30EA\u30FC\u306B\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u5834\u5408\u306F\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u9078\u629E\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u80CC\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u9078\u629E\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u524D\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u9078\u629E\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306E\u30A2\u30A4\u30B3\u30F3\u524D\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u9078\u629E\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u80CC\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u9078\u629E\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u524D\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u9078\u629E\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306E\u30A2\u30A4\u30B3\u30F3\u524D\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u304C\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306E\u3068\u304D\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u80CC\u666F\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30EA\u30B9\u30C8\u3084\u30C4\u30EA\u30FC\u304C\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u5834\u5408\u306E\u3001\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30EA\u30B9\u30C8\u3084\u30C4\u30EA\u30FC\u306E\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u8272\u3002\u30A2\u30AF\u30C6\u30A3\u30D6\u306A\u30EA\u30B9\u30C8\u3084\u30C4\u30EA\u30FC\u306B\u306F\u30AD\u30FC\u30DC\u30FC\u30C9 \u30D5\u30A9\u30FC\u30AB\u30B9\u304C\u3042\u308A\u3001\u975E\u30A2\u30AF\u30C6\u30A3\u30D6\u306B\u306F\u3053\u308C\u304C\u3042\u308A\u307E\u305B\u3093\u3002","\u30DE\u30A6\u30B9\u64CD\u4F5C\u3067\u9805\u76EE\u3092\u30DB\u30D0\u30FC\u3059\u308B\u3068\u304D\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u80CC\u666F\u3002","\u30DE\u30A6\u30B9\u64CD\u4F5C\u3067\u9805\u76EE\u3092\u30DB\u30D0\u30FC\u3059\u308B\u3068\u304D\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u524D\u666F\u3002","\u30DE\u30A6\u30B9\u64CD\u4F5C\u3067\u9805\u76EE\u3092\u79FB\u52D5\u3059\u308B\u3068\u304D\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8 \u30C9\u30E9\u30C3\u30B0 \u30A2\u30F3\u30C9 \u30C9\u30ED\u30C3\u30D7\u306E\u80CC\u666F\u3002","\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u5185\u3092\u691C\u7D22\u3057\u3066\u3044\u308B\u3068\u304D\u3001\u4E00\u81F4\u3057\u305F\u5F37\u8ABF\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u524D\u666F\u8272\u3002","\u30C4\u30EA\u30FC/\u30EA\u30B9\u30C8\u5185\u3092\u691C\u7D22\u3057\u3066\u3044\u308B\u3068\u304D\u3001\u4E00\u81F4\u3057\u305F\u5F37\u8ABF\u306E\u30C4\u30EA\u30FC/\u30EA\u30B9\u30C8\u306E\u524D\u666F\u8272\u3002","\u7121\u52B9\u306A\u9805\u76EE\u306E\u30C4\u30EA\u30FC\u30EA\u30B9\u30C8\u306E\u524D\u666F\u8272\u3002\u305F\u3068\u3048\u3070\u30A8\u30AF\u30B9\u30D7\u30ED\u30FC\u30E9\u30FC\u306E\u672A\u89E3\u6C7A\u306A\u30EB\u30FC\u30C8\u3002","\u30A8\u30E9\u30FC\u3092\u542B\u3080\u30EA\u30B9\u30C8\u9805\u76EE\u306E\u524D\u666F\u8272\u3002","\u8B66\u544A\u304C\u542B\u307E\u308C\u308B\u30EA\u30B9\u30C8\u9805\u76EE\u306E\u524D\u666F\u8272\u3002","\u30EA\u30B9\u30C8\u304A\u3088\u3073\u30C4\u30EA\u30FC\u306E\u578B\u30D5\u30A3\u30EB\u30BF\u30FC \u30A6\u30A7\u30B8\u30A7\u30C3\u30C8\u306E\u80CC\u666F\u8272\u3002","\u30EA\u30B9\u30C8\u304A\u3088\u3073\u30C4\u30EA\u30FC\u306E\u578B\u30D5\u30A3\u30EB\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u8272\u3002","\u4E00\u81F4\u9805\u76EE\u304C\u306A\u3044\u5834\u5408\u306E\u3001\u30EA\u30B9\u30C8\u304A\u3088\u3073\u30C4\u30EA\u30FC\u306E\u578B\u30D5\u30A3\u30EB\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3\u8272\u3002","\u30EA\u30B9\u30C8\u304A\u3088\u3073\u30C4\u30EA\u30FC\u306E\u578B\u30D5\u30A3\u30EB\u30BF\u30FC \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u5F71\u306E\u8272\u3002","\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0\u3055\u308C\u305F\u4E00\u81F4\u306E\u80CC\u666F\u8272\u3002","\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0\u3055\u308C\u305F\u4E00\u81F4\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u30C4\u30EA\u30FC \u30B9\u30C8\u30ED\u30FC\u30AF\u306E\u8272\u3002","\u30A2\u30AF\u30C6\u30A3\u30D6\u3067\u306A\u3044\u30A4\u30F3\u30C7\u30F3\u30C8 \u30AC\u30A4\u30C9\u306E\u30C4\u30EA\u30FC \u30B9\u30C8\u30ED\u30FC\u30AF\u306E\u8272\u3002","\u5217\u9593\u306E\u8868\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u5947\u6570\u30C6\u30FC\u30D6\u30EB\u884C\u306E\u80CC\u666F\u8272\u3002","\u5F37\u8ABF\u8868\u793A\u3055\u308C\u3066\u3044\u306A\u3044\u9805\u76EE\u306E\u30EA\u30B9\u30C8/\u30C4\u30EA\u30FC\u524D\u666F\u8272\u3002 ","\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u80CC\u666F\u8272\u3002","\u8981\u7D20\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306E\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u80CC\u666F\u8272\u3002","\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u524D\u666F\u8272\u3002","\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u8981\u7D20\u304C\u9078\u629E\u3055\u308C\u3066\u3044\u308B\u5834\u5408\u306E\u30C1\u30A7\u30C3\u30AF\u30DC\u30C3\u30AF\u30B9 \u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u4EE3\u308F\u308A\u306B quickInputList.focusBackground \u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044","\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30AF\u30A4\u30C3\u30AF\u9078\u629E\u306E\u524D\u666F\u8272\u3002","\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30AF\u30A4\u30C3\u30AF\u9078\u629E\u306E\u30A2\u30A4\u30B3\u30F3\u524D\u666F\u8272\u3002","\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u9805\u76EE\u306E\u30AF\u30A4\u30C3\u30AF\u9078\u629E\u306E\u80CC\u666F\u8272\u3002","\u30E1\u30CB\u30E5\u30FC\u306E\u5883\u754C\u7DDA\u8272\u3002","\u30E1\u30CB\u30E5\u30FC\u9805\u76EE\u306E\u524D\u666F\u8272\u3002","\u30E1\u30CB\u30E5\u30FC\u9805\u76EE\u306E\u80CC\u666F\u8272\u3002","\u30E1\u30CB\u30E5\u30FC\u3067\u9078\u629E\u3055\u308C\u305F\u30E1\u30CB\u30E5\u30FC\u9805\u76EE\u306E\u524D\u666F\u8272\u3002","\u30E1\u30CB\u30E5\u30FC\u3067\u9078\u629E\u3055\u308C\u305F\u30E1\u30CB\u30E5\u30FC\u9805\u76EE\u306E\u80CC\u666F\u8272\u3002","\u30E1\u30CB\u30E5\u30FC\u3067\u9078\u629E\u3055\u308C\u305F\u30E1\u30CB\u30E5\u30FC\u9805\u76EE\u306E\u5883\u754C\u7DDA\u8272\u3002","\u30E1\u30CB\u30E5\u30FC\u5185\u306E\u30E1\u30CB\u30E5\u30FC\u9805\u76EE\u306E\u5883\u754C\u7DDA\u8272\u3002","\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u4E0A\u306B\u30DE\u30A6\u30B9 \u30DD\u30A4\u30F3\u30BF\u30FC\u3092\u5408\u308F\u305B\u305F\u3068\u304D\u306E\u30C4\u30FC\u30EB \u30D0\u30FC\u306E\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3","\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u4E0A\u306B\u30DE\u30A6\u30B9 \u30DD\u30A4\u30F3\u30BF\u30FC\u3092\u5408\u308F\u305B\u305F\u3068\u304D\u306E\u30C4\u30FC\u30EB \u30D0\u30FC\u306E\u30A2\u30A6\u30C8\u30E9\u30A4\u30F3","\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u4E0A\u306B\u30DE\u30A6\u30B9 \u30DD\u30A4\u30F3\u30BF\u30FC\u3092\u5408\u308F\u305B\u308B\u3068\u30C4\u30FC\u30EB \u30D0\u30FC\u306E\u80CC\u666F\u304C\u8868\u793A\u3055\u308C\u308B","\u30B9\u30CB\u30DA\u30C3\u30C8 tabstop \u306E\u80CC\u666F\u8272\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u30B9\u30CB\u30DA\u30C3\u30C8 tabstop \u306E\u5883\u754C\u7DDA\u306E\u8272\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u6700\u5F8C\u306E tabstop \u306E\u80CC\u666F\u8272\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u30B9\u30CB\u30DA\u30C3\u30C8\u306E\u6700\u5F8C\u306E\u30BF\u30D6\u30B9\u30C8\u30C3\u30D7\u3067\u5883\u754C\u7DDA\u306E\u8272\u3092\u5F37\u8ABF\u8868\u793A\u3057\u307E\u3059\u3002","\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u968E\u5C64\u30EA\u30F3\u30AF\u306E\u9805\u76EE\u306E\u8272\u3002","\u968E\u5C64\u30EA\u30F3\u30AF\u306E\u9805\u76EE\u306E\u80CC\u666F\u8272\u3002","\u30D5\u30A9\u30FC\u30AB\u30B9\u3055\u308C\u305F\u968E\u5C64\u30EA\u30F3\u30AF\u306E\u9805\u76EE\u306E\u8272\u3002","\u9078\u629E\u3055\u308C\u305F\u968E\u5C64\u30EA\u30F3\u30AF\u306E\u9805\u76EE\u306E\u8272\u3002","\u968E\u5C64\u9805\u76EE\u30D4\u30C3\u30AB\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u73FE\u5728\u306E\u30D8\u30C3\u30C0\u30FC\u306E\u80CC\u666F\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u73FE\u5728\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u80CC\u666F\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u7740\u4FE1\u30D8\u30C3\u30C0\u30FC\u306E\u80CC\u666F\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u7740\u4FE1\u30B3\u30F3\u30C6\u30F3\u30C4\u306E\u80CC\u666F\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u5171\u901A\u306E\u5148\u7956\u306E\u30D8\u30C3\u30C0\u30FC\u80CC\u666F\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u30A4\u30F3\u30E9\u30A4\u30F3 \u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u5171\u901A\u306E\u5148\u7956\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u80CC\u666F\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u884C\u5185\u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u30D8\u30C3\u30C0\u30FC\u3068\u30B9\u30D7\u30EA\u30C3\u30BF\u30FC\u306E\u5883\u754C\u7DDA\u306E\u8272\u3002","\u884C\u5185\u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u73FE\u5728\u306E\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u524D\u666F\u8272\u3002","\u884C\u5185\u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u5165\u529B\u5074\u306E\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u524D\u666F\u8272\u3002","\u884C\u5185\u30DE\u30FC\u30B8\u7AF6\u5408\u306E\u5171\u901A\u306E\u7956\u5148\u6982\u8981\u30EB\u30FC\u30E9\u30FC\u524D\u666F\u8272\u3002","\u691C\u51FA\u3055\u308C\u305F\u4E00\u81F4\u9805\u76EE\u306E\u6982\u8981\u30EB\u30FC\u30E9\u30FC \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u9078\u629E\u7BC4\u56F2\u3092\u5F37\u8ABF\u8868\u793A\u3059\u308B\u305F\u3081\u306E\u6982\u8981\u30EB\u30FC\u30E9\u30FC \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002\u3053\u306E\u8272\u306F\u3001\u57FA\u672C\u88C5\u98FE\u304C\u975E\u8868\u793A\u306B\u306A\u3089\u306A\u3044\u3088\u3046\u4E0D\u900F\u660E\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002","\u4E00\u81F4\u3092\u691C\u7D22\u3059\u308B\u305F\u3081\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u3092\u7E70\u308A\u8FD4\u3057\u9078\u629E\u3059\u308B\u7BC4\u56F2\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002","\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u9078\u629E\u7BC4\u56F2\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002","\u60C5\u5831\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002","\u8B66\u544A\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002","\u30A8\u30E9\u30FC\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30DE\u30FC\u30AB\u30FC\u306E\u8272\u3002","\u30DF\u30CB\u30DE\u30C3\u30D7\u306E\u80CC\u666F\u8272\u3002",'\u30DF\u30CB\u30DE\u30C3\u30D7\u306B\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3055\u308C\u308B\u524D\u666F\u8981\u7D20\u306E\u4E0D\u900F\u660E\u5EA6\u3002\u305F\u3068\u3048\u3070\u3001"#000000c0" \u3067\u306F\u300175% \u306E\u4E0D\u900F\u660E\u5EA6\u3067\u8981\u7D20\u3092\u30EC\u30F3\u30C0\u30EA\u30F3\u30B0\u3057\u307E\u3059\u3002',"\u30DF\u30CB\u30DE\u30C3\u30D7 \u30B9\u30E9\u30A4\u30C0\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30DB\u30D0\u30FC\u30EA\u30F3\u30B0\u6642\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30B9\u30E9\u30A4\u30C0\u30FC\u306E\u80CC\u666F\u8272\u3002","\u30AF\u30EA\u30C3\u30AF\u3057\u305F\u3068\u304D\u306E\u30DF\u30CB\u30DE\u30C3\u30D7 \u30B9\u30E9\u30A4\u30C0\u30FC\u306E\u80CC\u666F\u8272\u3002","\u554F\u984C\u306E\u30A8\u30E9\u30FC \u30A2\u30A4\u30B3\u30F3\u306B\u4F7F\u7528\u3055\u308C\u308B\u8272\u3002","\u554F\u984C\u306E\u8B66\u544A\u30A2\u30A4\u30B3\u30F3\u306B\u4F7F\u7528\u3055\u308C\u308B\u8272\u3002","\u554F\u984C\u60C5\u5831\u30A2\u30A4\u30B3\u30F3\u306B\u4F7F\u7528\u3055\u308C\u308B\u8272\u3002","\u30B0\u30E9\u30D5\u3067\u4F7F\u7528\u3055\u308C\u308B\u524D\u666F\u8272\u3002","\u30B0\u30E9\u30D5\u306E\u6C34\u5E73\u7DDA\u306B\u4F7F\u7528\u3055\u308C\u308B\u8272\u3002","\u30B0\u30E9\u30D5\u306E\u8996\u899A\u5316\u306B\u4F7F\u7528\u3055\u308C\u308B\u8D64\u8272\u3002","\u30B0\u30E9\u30D5\u306E\u8996\u899A\u5316\u306B\u4F7F\u7528\u3055\u308C\u308B\u9752\u8272\u3002","\u30B0\u30E9\u30D5\u306E\u8996\u899A\u5316\u306B\u4F7F\u7528\u3055\u308C\u308B\u9EC4\u8272\u3002","\u30B0\u30E9\u30D5\u306E\u8996\u899A\u5316\u306B\u4F7F\u7528\u3055\u308C\u308B\u30AA\u30EC\u30F3\u30B8\u8272\u3002","\u30B0\u30E9\u30D5\u306E\u8996\u899A\u5316\u306B\u4F7F\u7528\u3055\u308C\u308B\u7DD1\u8272\u3002","\u30B0\u30E9\u30D5\u306E\u8996\u899A\u5316\u306B\u4F7F\u7528\u3055\u308C\u308B\u7D2B\u8272\u3002"],"vs/platform/theme/common/iconRegistry":["\u4F7F\u7528\u3059\u308B\u30D5\u30A9\u30F3\u30C8\u306E ID\u3002\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u3001\u6700\u521D\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u308B\u30D5\u30A9\u30F3\u30C8\u304C\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002","\u30A2\u30A4\u30B3\u30F3\u5B9A\u7FA9\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30D5\u30A9\u30F3\u30C8\u6587\u5B57\u3002","\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u306B\u3042\u308B\u9589\u3058\u308B\u30A2\u30AF\u30B7\u30E7\u30F3\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u524D\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u5834\u6240\u306B\u79FB\u52D5\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002","\u6B21\u306E\u30A8\u30C7\u30A3\u30BF\u30FC\u306E\u5834\u6240\u306B\u79FB\u52D5\u3059\u308B\u305F\u3081\u306E\u30A2\u30A4\u30B3\u30F3\u3002"],"vs/platform/undoRedo/common/undoRedoService":["\u6B21\u306E\u30D5\u30A1\u30A4\u30EB\u304C\u9589\u3058\u3089\u308C\u3001\u30C7\u30A3\u30B9\u30AF\u4E0A\u3067\u5909\u66F4\u3055\u308C\u307E\u3057\u305F: {0}\u3002","\u4EE5\u4E0B\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u4E92\u63DB\u6027\u306E\u306A\u3044\u65B9\u6CD5\u3067\u5909\u66F4\u3055\u308C\u307E\u3057\u305F: {0}\u3002","\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3067 '{0}' \u3092\u5143\u306B\u623B\u305B\u307E\u305B\u3093\u3067\u3057\u305F\u3002{1}","\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3067 '{0}' \u3092\u5143\u306B\u623B\u305B\u307E\u305B\u3093\u3067\u3057\u305F\u3002{1}","{1} \u306B\u5909\u66F4\u304C\u52A0\u3048\u3089\u308C\u305F\u305F\u3081\u3001\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3067 '{0}' \u3092\u5143\u306B\u623B\u305B\u307E\u305B\u3093\u3067\u3057\u305F","{1} \u3067\u5143\u306B\u623B\u3059\u307E\u305F\u306F\u3084\u308A\u76F4\u3057\u64CD\u4F5C\u304C\u65E2\u306B\u5B9F\u884C\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u5BFE\u3057\u3066 '{0}' \u3092\u5143\u306B\u623B\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F","\u5143\u306B\u623B\u3059\u307E\u305F\u306F\u3084\u308A\u76F4\u3057\u64CD\u4F5C\u304C\u305D\u306E\u671F\u9593\u306B\u5B9F\u884C\u4E2D\u3067\u3042\u3063\u305F\u305F\u3081\u3001\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u5BFE\u3057\u3066 '{0}' \u3092\u5143\u306B\u623B\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F","\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3067 '{0}' \u3092\u5143\u306B\u623B\u3057\u307E\u3059\u304B?","{0} \u500B\u306E\u30D5\u30A1\u30A4\u30EB\u3067\u5143\u306B\u623B\u3059(&&U)","\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u5143\u306B\u623B\u3059","\u5143\u306B\u623B\u3059\u307E\u305F\u306F\u3084\u308A\u76F4\u3057\u64CD\u4F5C\u304C\u65E2\u306B\u5B9F\u884C\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001'{0}' \u3092\u5143\u306B\u623B\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002","'{0}' \u3092\u5143\u306B\u623B\u3057\u307E\u3059\u304B?","\u306F\u3044(&&Y)","\u3044\u3044\u3048","\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3067 '{0}' \u3092\u3084\u308A\u76F4\u3057\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002{1}","\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3067 '{0}' \u3092\u3084\u308A\u76F4\u3057\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002{1}","{1} \u306B\u5909\u66F4\u304C\u52A0\u3048\u3089\u308C\u305F\u305F\u3081\u3001\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u3067 '{0}' \u3092\u518D\u5B9F\u884C\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F","{1} \u3067\u5143\u306B\u623B\u3059\u307E\u305F\u306F\u3084\u308A\u76F4\u3057\u64CD\u4F5C\u304C\u65E2\u306B\u5B9F\u884C\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u5BFE\u3057\u3066 '{0}' \u3092\u3084\u308A\u76F4\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F","\u5143\u306B\u623B\u3059\u307E\u305F\u306F\u3084\u308A\u76F4\u3057\u64CD\u4F5C\u304C\u305D\u306E\u671F\u9593\u306B\u5B9F\u884C\u4E2D\u3067\u3042\u3063\u305F\u305F\u3081\u3001\u3059\u3079\u3066\u306E\u30D5\u30A1\u30A4\u30EB\u306B\u5BFE\u3057\u3066 '{0}' \u3092\u3084\u308A\u76F4\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F","\u5143\u306B\u623B\u3059\u307E\u305F\u306F\u3084\u308A\u76F4\u3057\u64CD\u4F5C\u304C\u65E2\u306B\u5B9F\u884C\u3055\u308C\u3066\u3044\u308B\u305F\u3081\u3001'{0}' \u3092\u3084\u308A\u76F4\u3059\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002"],"vs/platform/workspace/common/workspace":["\u30B3\u30FC\u30C9 \u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.ja.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.js b/lib/vs/editor/editor.main.nls.js deleted file mode 100644 index 77ca6c0..0000000 --- a/lib/vs/editor/editor.main.nls.js +++ /dev/null @@ -1,29 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["input"],"vs/base/browser/ui/findinput/findInputToggles":["Match Case","Match Whole Word","Use Regular Expression"],"vs/base/browser/ui/findinput/replaceInput":["input","Preserve Case"],"vs/base/browser/ui/hover/hoverWidget":["Inspect this in the accessible view with {0}.","Inspect this in the accessible view via the command Open Accessible View which is currently not triggerable via keybinding."],"vs/base/browser/ui/iconLabel/iconLabelHover":["Loading..."],"vs/base/browser/ui/inputbox/inputBox":["Error: {0}","Warning: {0}","Info: {0}","for history","Cleared Input"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["Unbound"],"vs/base/browser/ui/selectBox/selectBoxCustom":["Select Box"],"vs/base/browser/ui/toolbar/toolbar":["More Actions..."],"vs/base/browser/ui/tree/abstractTree":["Filter","Fuzzy Match","Type to filter","Type to search","Type to search","Close","No elements found."],"vs/base/common/actions":["(empty)"],"vs/base/common/errorMessage":["{0}: {1}","A system error occurred ({0})","An unknown error occurred. Please consult the log for more details.","An unknown error occurred. Please consult the log for more details.","{0} ({1} errors in total)","An unknown error occurred. Please consult the log for more details."],"vs/base/common/keybindingLabels":["Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","Super","Control","Shift","Option","Command","Control","Shift","Alt","Windows","Control","Shift","Alt","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["editor","The editor is not accessible at this time.","{0} To enable screen reader optimized mode, use {1}","{0} To enable screen reader optimized mode, open the quick pick with {1} and run the command Toggle Screen Reader Accessibility Mode, which is currently not triggerable via keyboard.","{0} Please assign a keybinding for the command Toggle Screen Reader Accessibility Mode by accessing the keybindings editor with {1} and run it."],"vs/editor/browser/coreCommands":["Stick to the end even when going to longer lines","Stick to the end even when going to longer lines","Removed secondary cursors"],"vs/editor/browser/editorExtensions":["&&Undo","Undo","&&Redo","Redo","&&Select All","Select All"],"vs/editor/browser/widget/codeEditorWidget":["The number of cursors has been limited to {0}. Consider using [find and replace](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) for larger changes or increase the editor multi cursor limit setting.","Increase Multi Cursor Limit"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":["Icon for 'Insert' in accessible diff viewer.","Icon for 'Remove' in accessible diff viewer.","Icon for 'Close' in accessible diff viewer.","Close","Accessible Diff Viewer. Use arrow up and down to navigate.","no lines changed","1 line changed","{0} lines changed","Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}","blank","{0} unchanged line {1}","{0} original line {1} modified line {2}","+ {0} modified line {1}","- {0} original line {1}"],"vs/editor/browser/widget/diffEditor/colors":["The border color for text that got moved in the diff editor.","The active border color for text that got moved in the diff editor."],"vs/editor/browser/widget/diffEditor/decorations":["Line decoration for inserts in the diff editor.","Line decoration for removals in the diff editor.","Click to revert change"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["Toggle Collapse Unchanged Regions","Toggle Show Moved Code Blocks","Toggle Use Inline View When Space Is Limited","Use Inline View When Space Is Limited","Show Moved Code Blocks","Diff Editor","Switch Side","Exit Compare Move","Collapse All Unchanged Regions","Show All Unchanged Regions","Accessible Diff Viewer","Go to Next Difference","Open Accessible Diff Viewer","Go to Previous Difference"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" use {0} to open the accessibility help."],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["Fold Unchanged Region","Click or drag to show more above","Show all","Click or drag to show more below","{0} hidden lines","Double click to unfold"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["Copy deleted lines","Copy deleted line","Copy changed lines","Copy changed line","Copy deleted line ({0})","Copy changed line ({0})","Revert this change"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["Code moved with changes to line {0}-{1}","Code moved with changes from line {0}-{1}","Code moved to line {0}-{1}","Code moved from line {0}-{1}"],"vs/editor/common/config/editorConfigurationSchema":["Editor","The number of spaces a tab is equal to. This setting is overridden based on the file contents when {0} is on.",'The number of spaces used for indentation or `"tabSize"` to use the value from `#editor.tabSize#`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.',"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when {0} is on.","Controls whether {0} and {1} will be automatically detected when a file is opened based on the file contents.","Remove trailing auto inserted whitespace.","Special handling for large files to disable certain memory intensive features.","Controls whether completions should be computed based on words in the document.","Only suggest words from the active document.","Suggest words from all open documents of the same language.","Suggest words from all open documents.","Controls from which documents word based completions are computed.","Semantic highlighting enabled for all color themes.","Semantic highlighting disabled for all color themes.","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.","Controls whether the semanticHighlighting is shown for the languages that support it.","Keep peek editors open even when double-clicking their content or when hitting `Escape`.","Lines above this length will not be tokenized for performance reasons","Controls whether the tokenization should happen asynchronously on a web worker.","Controls whether async tokenization should be logged. For debugging only.","Controls whether async tokenization should be verified against legacy background tokenization. Might slow down tokenization. For debugging only.","Defines the bracket symbols that increase or decrease the indentation.","The opening bracket character or string sequence.","The closing bracket character or string sequence.","Defines the bracket pairs that are colorized by their nesting level if bracket pair colorization is enabled.","The opening bracket character or string sequence.","The closing bracket character or string sequence.","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.","Maximum file size in MB for which to compute diffs. Use 0 for no limit.","Controls whether the diff editor shows the diff side by side or inline.","If the diff editor width is smaller than this value, the inline view is used.","If enabled and the editor width is too small, the inline view is used.","When enabled, the diff editor shows arrows in its glyph margin to revert changes.","When enabled, the diff editor ignores changes in leading or trailing whitespace.","Controls whether the diff editor shows +/- indicators for added/removed changes.","Controls whether the editor shows CodeLens.","Lines will never wrap.","Lines will wrap at the viewport width.","Lines will wrap according to the {0} setting.","Uses the legacy diffing algorithm.","Uses the advanced diffing algorithm.","Controls whether the diff editor shows unchanged regions.","Controls how many lines are used for unchanged regions.","Controls how many lines are used as a minimum for unchanged regions.","Controls how many lines are used as context when comparing unchanged regions.","Controls whether the diff editor should show detected code moves.","Controls whether the diff editor shows empty decorations to see where characters got inserted or deleted."],"vs/editor/common/config/editorOptions":["Use platform APIs to detect when a Screen Reader is attached","Optimize for usage with a Screen Reader","Assume a screen reader is not attached","Controls if the UI should run in a mode where it is optimized for screen readers.","Controls whether a space character is inserted when commenting.","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.","Controls whether copying without a selection copies the current line.","Controls whether the cursor should jump to find matches while typing.","Never seed search string from the editor selection.","Always seed search string from the editor selection, including word at cursor position.","Only seed search string from the editor selection.","Controls whether the search string in the Find Widget is seeded from the editor selection.","Never turn on Find in Selection automatically (default).","Always turn on Find in Selection automatically.","Turn on Find in Selection automatically when multiple lines of content are selected.","Controls the condition for turning on Find in Selection automatically.","Controls whether the Find Widget should read or modify the shared find clipboard on macOS.","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.","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property.","Enables/Disables the translation from font-weight to font-variation-settings. Change this to a string for fine-grained control of the 'font-variation-settings' CSS property.","Explicit 'font-variation-settings' CSS property. A boolean can be passed instead if one only needs to translate font-weight to font-variation-settings.","Configures font variations. Can be either a boolean to enable/disable the translation from font-weight to font-variation-settings or a string for the value of the CSS 'font-variation-settings' property.","Controls the font size in pixels.",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.','Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.',"Show Peek view of the results (default)","Go to the primary result and show a Peek view","Go to the primary result and enable Peek-less navigation to others","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.","Controls the behavior the 'Go to References'-command when multiple target locations exist.","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.","Controls whether the hover is shown.","Controls the delay in milliseconds after which the hover is shown.","Controls whether the hover should remain visible when mouse is moved over it.","Controls the delay in milliseconds after thich the hover is hidden. Requires `editor.hover.sticky` to be enabled.","Prefer showing hovers above the line, if there's space.","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.","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.","Controls the algorithm that computes wrapping points. Note that when in accessibility mode, advanced will be used for the best experience.","Enables the Code Action lightbulb in the editor.","Shows the nested current scopes during the scroll at the top of the editor.","Defines the maximum number of sticky lines to show.","Defines the model to use for determining which lines to stick. If the outline model does not exist, it will fall back on the folding provider model which falls back on the indentation model. This order is respected in all three cases.","Enable scrolling of the sticky scroll widget with the editor's horizontal scrollbar.","Enables the inlay hints in the editor.","Inlay hints are enabled","Inlay hints are showing by default and hide when holding {0}","Inlay hints are hidden by default and show when holding {0}","Inlay hints are disabled","Controls font size of inlay hints in the editor. As default the {0} is used when the configured value is less than {1} or greater than the editor font size.","Controls font family of inlay hints in the editor. When set to empty, the {0} is used.","Enables the padding around the inlay hints in the editor.",`Controls the line height. - - Use 0 to automatically compute the line height from the font size. - - Values between 0 and 8 will be used as a multiplier with the font size. - - Values greater than or equal to 8 will be used as effective values.`,"Controls whether the minimap is shown.","Controls whether the minimap is hidden automatically.","The minimap has the same size as the editor contents (and might scroll).","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling).","The minimap will shrink as necessary to never be larger than the editor (no scrolling).","Controls the size of the minimap.","Controls the side where to render the minimap.","Controls when the minimap slider is shown.","Scale of content drawn in the minimap: 1, 2 or 3.","Render the actual characters on a line as opposed to color blocks.","Limit the width of the minimap to render at most a certain number of columns.","Controls the amount of space between the top edge of the editor and the first line.","Controls the amount of space between the bottom edge of the editor and the last line.","Enables a pop-up that shows parameter documentation and type information as you type.","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.","Quick suggestions show inside the suggest widget","Quick suggestions show as ghost text","Quick suggestions are disabled","Enable quick suggestions inside strings.","Enable quick suggestions inside comments.","Enable quick suggestions outside of strings and comments.","Controls whether suggestions should automatically show up while typing. This can be controlled for typing in comments, strings, and other code. Quick suggestion can be configured to show as ghost text or with the suggest widget. Also be aware of the '{0}'-setting which controls if suggestions are triggered by special characters.","Line numbers are not rendered.","Line numbers are rendered as absolute number.","Line numbers are rendered as distance in lines to cursor position.","Line numbers are rendered every 10 lines.","Controls the display of line numbers.","Number of monospace characters at which this editor ruler will render.","Color of this editor ruler.","Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.","The vertical scrollbar will be visible only when necessary.","The vertical scrollbar will always be visible.","The vertical scrollbar will always be hidden.","Controls the visibility of the vertical scrollbar.","The horizontal scrollbar will be visible only when necessary.","The horizontal scrollbar will always be visible.","The horizontal scrollbar will always be hidden.","Controls the visibility of the horizontal scrollbar.","The width of the vertical scrollbar.","The height of the horizontal scrollbar.","Controls whether clicks scroll by page or jump to click position.","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.","Controls whether characters that just reserve space or have no width at all are highlighted.","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.","Controls whether characters in comments should also be subject to Unicode highlighting.","Controls whether characters in strings should also be subject to Unicode highlighting.","Defines allowed characters that are not being highlighted.","Unicode characters that are common in allowed locales are not being highlighted.","Controls whether to automatically show inline suggestions in the editor.","Show the inline suggestion toolbar whenever an inline suggestion is shown.","Show the inline suggestion toolbar when hovering over an inline suggestion.","Controls when to show the inline suggestion toolbar.","Controls how inline suggestions interact with the suggest widget. If enabled, the suggest widget is not shown automatically when inline suggestions are available.","Controls whether bracket pair colorization is enabled or not. Use {0} to override the bracket highlight colors.","Controls whether each bracket type has its own independent color pool.","Enables bracket pair guides.","Enables bracket pair guides only for the active bracket pair.","Disables bracket pair guides.","Controls whether bracket pair guides are enabled or not.","Enables horizontal guides as addition to vertical bracket pair guides.","Enables horizontal guides only for the active bracket pair.","Disables horizontal bracket pair guides.","Controls whether horizontal bracket pair guides are enabled or not.","Controls whether the editor should highlight the active bracket pair.","Controls whether the editor should render indent guides.","Highlights the active indent guide.","Highlights the active indent guide even if bracket guides are highlighted.","Do not highlight the active indent guide.","Controls whether the editor should highlight the active indent guide.","Insert suggestion without overwriting text right of the cursor.","Insert suggestion and overwrite text right of the cursor.","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.","Controls whether filtering and sorting suggestions accounts for small typos.","Controls whether sorting favors words that appear close to the cursor.","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).","Always select a suggestion when automatically triggering IntelliSense.","Never select a suggestion when automatically triggering IntelliSense.","Select a suggestion only when triggering IntelliSense from a trigger character.","Select a suggestion only when triggering IntelliSense as you type.","Controls whether a suggestion is selected when the widget shows. Note that this only applies to automatically triggered suggestions (`#editor.quickSuggestions#` and `#editor.suggestOnTriggerCharacters#`) and that a suggestion is always selected when explicitly invoked, e.g via `Ctrl+Space`.","Controls whether an active snippet prevents quick suggestions.","Controls whether to show or hide icons in suggestions.","Controls the visibility of the status bar at the bottom of the suggest widget.","Controls whether to preview the suggestion outcome in the editor.","Controls whether suggest details show inline with the label or only in the details widget.","This setting is deprecated. The suggest widget can now be resized.","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.","When enabled IntelliSense shows `method`-suggestions.","When enabled IntelliSense shows `function`-suggestions.","When enabled IntelliSense shows `constructor`-suggestions.","When enabled IntelliSense shows `deprecated`-suggestions.","When enabled IntelliSense filtering requires that the first character matches on a word start. For example, `c` on `Console` or `WebContext` but _not_ on `description`. When disabled IntelliSense will show more results but still sorts them by match quality.","When enabled IntelliSense shows `field`-suggestions.","When enabled IntelliSense shows `variable`-suggestions.","When enabled IntelliSense shows `class`-suggestions.","When enabled IntelliSense shows `struct`-suggestions.","When enabled IntelliSense shows `interface`-suggestions.","When enabled IntelliSense shows `module`-suggestions.","When enabled IntelliSense shows `property`-suggestions.","When enabled IntelliSense shows `event`-suggestions.","When enabled IntelliSense shows `operator`-suggestions.","When enabled IntelliSense shows `unit`-suggestions.","When enabled IntelliSense shows `value`-suggestions.","When enabled IntelliSense shows `constant`-suggestions.","When enabled IntelliSense shows `enum`-suggestions.","When enabled IntelliSense shows `enumMember`-suggestions.","When enabled IntelliSense shows `keyword`-suggestions.","When enabled IntelliSense shows `text`-suggestions.","When enabled IntelliSense shows `color`-suggestions.","When enabled IntelliSense shows `file`-suggestions.","When enabled IntelliSense shows `reference`-suggestions.","When enabled IntelliSense shows `customcolor`-suggestions.","When enabled IntelliSense shows `folder`-suggestions.","When enabled IntelliSense shows `typeParameter`-suggestions.","When enabled IntelliSense shows `snippet`-suggestions.","When enabled IntelliSense shows `user`-suggestions.","When enabled IntelliSense shows `issues`-suggestions.","Whether leading and trailing whitespace should always be selected.","Whether subwords (like 'foo' in 'fooBar' or 'foo_bar') should be selected.","No indentation. Wrapped lines begin at column 1.","Wrapped lines get the same indentation as the parent.","Wrapped lines get +1 indentation toward the parent.","Wrapped lines get +2 indentation toward the parent.","Controls the indentation of wrapped lines.","Controls whether you can drag and drop a file into a text editor by holding down `shift` (instead of opening the file in an editor).","Controls if a widget is shown when dropping files into the editor. This widget lets you control how the file is dropped.","Show the drop selector widget after a file is dropped into the editor.","Never show the drop selector widget. Instead the default drop provider is always used.","Controls whether you can paste content in different ways.","Controls if a widget is shown when pasting content in to the editor. This widget lets you control how the file is pasted.","Show the paste selector widget after content is pasted into the editor.","Never show the paste selector widget. Instead the default pasting behavior is always used.","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.","Only accept a suggestion with `Enter` when it makes a textual change.","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.","Editor content","Control whether inline suggestions are announced by a screen reader.","Use language configurations to determine when to autoclose brackets.","Autoclose brackets only when the cursor is to the left of whitespace.","Controls whether the editor should automatically close brackets after the user adds an opening bracket.","Use language configurations to determine when to autoclose comments.","Autoclose comments only when the cursor is to the left of whitespace.","Controls whether the editor should automatically close comments after the user adds an opening comment.","Remove adjacent closing quotes or brackets only if they were automatically inserted.","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.","Type over closing quotes or brackets only if they were automatically inserted.","Controls whether the editor should type over closing quotes or brackets.","Use language configurations to determine when to autoclose quotes.","Autoclose quotes only when the cursor is to the left of whitespace.","Controls whether the editor should automatically close quotes after the user adds an opening quote.","The editor will not insert indentation automatically.","The editor will keep the current line's indentation.","The editor will keep the current line's indentation and honor language defined brackets.","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages.","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.","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.","Use language configurations to determine when to automatically surround selections.","Surround with quotes but not brackets.","Surround with brackets but not quotes.","Controls whether the editor should automatically surround selections when typing quotes or brackets.","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.","Controls whether the editor shows CodeLens.","Controls the font family for CodeLens.","Controls the font size in pixels for CodeLens. When set to 0, 90% of `#editor.fontSize#` is used.","Controls whether the editor should render the inline color decorators and color picker.","Make the color picker appear both on click and hover of the color decorator","Make the color picker appear on hover of the color decorator","Make the color picker appear on click of the color decorator","Controls the condition to make a color picker appear from a color decorator","Controls the max number of color decorators that can be rendered in an editor at once.","Enable that the selection with the mouse and keys is doing column selection.","Controls whether syntax highlighting should be copied into the clipboard.","Control the cursor animation style.","Smooth caret animation is disabled.","Smooth caret animation is enabled only when the user moves the cursor with an explicit gesture.","Smooth caret animation is always enabled.","Controls whether the smooth caret animation should be enabled.","Controls the cursor style.","Controls the minimal number of visible leading lines (minimum 0) and trailing lines (minimum 1) surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API.","`cursorSurroundingLines` is enforced always.","Controls when `#cursorSurroundingLines#` should be enforced.","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.","Controls whether the editor should allow moving selections via drag and drop.","Use a new rendering method with svgs.","Use a new rendering method with font characters.","Use the stable rendering method.","Controls whether whitespace is rendered with a new, experimental method.","Scrolling speed multiplier when pressing `Alt`.","Controls whether the editor has code folding enabled.","Use a language-specific folding strategy if available, else the indentation-based one.","Use the indentation-based folding strategy.","Controls the strategy for computing folding ranges.","Controls whether the editor should highlight folded ranges.","Controls whether the editor automatically collapses import ranges.","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.","Controls whether clicking on the empty content after a folded line will unfold the line.","Controls the font family.","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.","Controls whether the editor should automatically format the line after typing.","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.","Controls whether the cursor should be hidden in the overview ruler.","Controls the letter spacing in pixels.","Controls whether the editor has linked editing enabled. Depending on the language, related symbols such as HTML tags, are updated while editing.","Controls whether the editor should detect links and make them clickable.","Highlight matching brackets.","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.","Merge multiple cursors when they are overlapping.","Maps to `Control` on Windows and Linux and to `Command` on macOS.","Maps to `Alt` on Windows and Linux and to `Option` on macOS.","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](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).","Each cursor pastes a single line of the text.","Each cursor pastes the full text.","Controls pasting when the line count of the pasted text matches the cursor count.","Controls the max number of cursors that can be in an active editor at once.","Controls whether the editor should highlight semantic symbol occurrences.","Controls whether a border should be drawn around the overview ruler.","Focus the tree when opening peek","Focus the editor when opening peek","Controls whether to focus the inline editor or the tree in the peek widget.","Controls whether the Go to Definition mouse gesture always opens the peek widget.","Controls the delay in milliseconds after which quick suggestions will show up.","Controls whether the editor auto renames on type.","Deprecated, use `editor.linkedEditing` instead.","Controls whether the editor should render control characters.","Render last line number when the file ends with a newline.","Highlights both the gutter and the current line.","Controls how the editor should render the current line highlight.","Controls if the editor should render the current line highlight only when the editor is focused.","Render whitespace characters except for single spaces between words.","Render whitespace characters only on selected text.","Render only trailing whitespace characters.","Controls how the editor should render whitespace characters.","Controls whether selections should have rounded corners.","Controls the number of extra characters beyond which the editor will scroll horizontally.","Controls whether the editor will scroll beyond the last line.","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.","Controls whether the Linux primary clipboard should be supported.","Controls whether the editor should highlight matches similar to the selection.","Always show the folding controls.","Never show the folding controls and reduce the gutter size.","Only show the folding controls when the mouse is over the gutter.","Controls when the folding controls on the gutter are shown.","Controls fading out of unused code.","Controls strikethrough deprecated variables.","Show snippet suggestions on top of other suggestions.","Show snippet suggestions below other suggestions.","Show snippets suggestions with other suggestions.","Do not show snippet suggestions.","Controls whether snippets are shown with other suggestions and how they are sorted.","Controls whether the editor will scroll using an animation.","Controls whether the accessibility hint should be provided to screen reader users when an inline completion is shown.","Font size for the suggest widget. When set to {0}, the value of {1} is used.","Line height for the suggest widget. When set to {0}, the value of {1} is used. The minimum value is 8.","Controls whether suggestions should automatically show up when typing trigger characters.","Always select the first suggestion.","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.","Controls how suggestions are pre-selected when showing the suggest list.","Tab complete will insert the best matching suggestion when pressing tab.","Disable tab completions.","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.","Enables tab completions.","Unusual line terminators are automatically removed.","Unusual line terminators are ignored.","Unusual line terminators prompt to be removed.","Remove unusual line terminators that might cause problems.","Inserting and deleting whitespace follows tab stops.","Use the default line break rule.","Word breaks should not be used for Chinese/Japanese/Korean (CJK) text. Non-CJK text behavior is the same as for normal.","Controls the word break rules used for Chinese/Japanese/Korean (CJK) text.","Characters that will be used as word separators when doing word related navigations or operations.","Lines will never wrap.","Lines will wrap at the viewport width.","Lines will wrap at `#editor.wordWrapColumn#`.","Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.","Controls how lines should wrap.","Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.","Controls whether inline color decorations should be shown using the default document color provider","Controls whether the editor receives tabs or defers them to the workbench for navigation."],"vs/editor/common/core/editorColorRegistry":["Background color for the highlight of line at the cursor position.","Background color for the border around the line at the cursor position.","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.","Background color of the border around highlighted ranges.","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.","Background color of the border around highlighted symbols.","Color of the editor cursor.","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.","Color of whitespace characters in the editor.","Color of editor line numbers.","Color of the editor indentation guides.","'editorIndentGuide.background' is deprecated. Use 'editorIndentGuide.background1' instead.","Color of the active editor indentation guides.","'editorIndentGuide.activeBackground' is deprecated. Use 'editorIndentGuide.activeBackground1' instead.","Color of the editor indentation guides (1).","Color of the editor indentation guides (2).","Color of the editor indentation guides (3).","Color of the editor indentation guides (4).","Color of the editor indentation guides (5).","Color of the editor indentation guides (6).","Color of the active editor indentation guides (1).","Color of the active editor indentation guides (2).","Color of the active editor indentation guides (3).","Color of the active editor indentation guides (4).","Color of the active editor indentation guides (5).","Color of the active editor indentation guides (6).","Color of editor active line number","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.","Color of editor active line number","Color of the final editor line when editor.renderFinalNewline is set to dimmed.","Color of the editor rulers.","Foreground color of editor CodeLens","Background color behind matching brackets","Color for matching brackets boxes","Color of the overview ruler border.","Background color of the editor overview ruler.","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.","Border color of unnecessary (unused) source code in the editor.",`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.`,"Border color of ghost text in the editor.","Foreground color of the ghost text in the editor.","Background color of the ghost text in the editor.","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color for errors.","Overview ruler marker color for warnings.","Overview ruler marker color for infos.","Foreground color of brackets (1). Requires enabling bracket pair colorization.","Foreground color of brackets (2). Requires enabling bracket pair colorization.","Foreground color of brackets (3). Requires enabling bracket pair colorization.","Foreground color of brackets (4). Requires enabling bracket pair colorization.","Foreground color of brackets (5). Requires enabling bracket pair colorization.","Foreground color of brackets (6). Requires enabling bracket pair colorization.","Foreground color of unexpected brackets.","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.","Background color of active bracket pair guides (6). Requires enabling bracket pair guides.","Border color used to highlight unicode characters.","Background color used to highlight unicode characters."],"vs/editor/common/editorContextKeys":["Whether the editor text has focus (cursor is blinking)","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)","Whether an editor or a rich text input has focus (cursor is blinking)","Whether the editor is read-only","Whether the context is a diff editor","Whether the context is an embedded diff editor","Whether a moved code block is selected for comparison","Whether the accessible diff viewer is visible","Whether the diff editor render side by side inline breakpoint is reached","Whether `editor.columnSelection` is enabled","Whether the editor has text selected","Whether the editor has multiple selections","Whether `Tab` will move focus out of the editor","Whether the editor hover is visible","Whether the editor hover is focused","Whether the sticky scroll is focused","Whether the sticky scroll is visible","Whether the standalone color picker is visible","Whether the standalone color picker is focused","Whether the editor is part of a larger editor (e.g. notebooks)","The language identifier of the editor","Whether the editor has a completion item provider","Whether the editor has a code actions provider","Whether the editor has a code lens provider","Whether the editor has a definition provider","Whether the editor has a declaration provider","Whether the editor has an implementation provider","Whether the editor has a type definition provider","Whether the editor has a hover provider","Whether the editor has a document highlight provider","Whether the editor has a document symbol provider","Whether the editor has a reference provider","Whether the editor has a rename provider","Whether the editor has a signature help provider","Whether the editor has an inline hints provider","Whether the editor has a document formatting provider","Whether the editor has a document selection formatting provider","Whether the editor has multiple document formatting providers","Whether the editor has multiple document selection formatting providers"],"vs/editor/common/languages":["array","boolean","class","constant","constructor","enumeration","enumeration member","event","field","file","function","interface","key","method","module","namespace","null","number","object","operator","package","property","string","struct","type parameter","variable","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["Plain Text"],"vs/editor/common/model/editStack":["Typing"],"vs/editor/common/standaloneStrings":["Developer: Inspect Tokens","Go to Line/Column...","Show all Quick Access Providers","Command Palette","Show And Run Commands","Go to Symbol...","Go to Symbol by Category...","Editor content","Press Alt+F1 for Accessibility Options.","Toggle High Contrast Theme","Made {0} edits in {1} files"],"vs/editor/common/viewLayout/viewLineRenderer":["Show more ({0})","{0} chars"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["Selection Anchor","Anchor set at {0}:{1}","Set Selection Anchor","Go to Selection Anchor","Select from Anchor to Cursor","Cancel Selection Anchor"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["Overview ruler marker color for matching brackets.","Go to Bracket","Select to Bracket","Remove Brackets","Go to &&Bracket"],"vs/editor/contrib/caretOperations/browser/caretOperations":["Move Selected Text Left","Move Selected Text Right"],"vs/editor/contrib/caretOperations/browser/transpose":["Transpose Letters"],"vs/editor/contrib/clipboard/browser/clipboard":["Cu&&t","Cut","Cut","Cut","&&Copy","Copy","Copy","Copy","Copy As","Copy As","Share","Share","Share","&&Paste","Paste","Paste","Paste","Copy With Syntax Highlighting"],"vs/editor/contrib/codeAction/browser/codeAction":["An unknown error occurred while applying the code action"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["Kind of the code action to run.","Controls when the returned actions are applied.","Always apply the first returned code action.","Apply the first returned code action if it is the only one.","Do not apply the returned code actions.","Controls if only preferred code actions should be returned.","Quick Fix...","No code actions available","No preferred code actions for '{0}' available","No code actions for '{0}' available","No preferred code actions available","No code actions available","Refactor...","No preferred refactorings for '{0}' available","No refactorings for '{0}' available","No preferred refactorings available","No refactorings available","Source Action...","No preferred source actions for '{0}' available","No source actions for '{0}' available","No preferred source actions available","No source actions available","Organize Imports","No organize imports action available","Fix All","No fix all action available","Auto Fix...","No auto fixes available"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["Enable/disable showing group headers in the Code Action menu.","Enable/disable showing nearest quickfix within a line when not currently on a diagnostic."],"vs/editor/contrib/codeAction/browser/codeActionController":["Context: {0} at line {1} and column {2}.","Hide Disabled","Show Disabled"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["More Actions...","Quick Fix","Extract","Inline","Rewrite","Move","Surround With","Source Action"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["Show Code Actions. Preferred Quick Fix Available ({0})","Show Code Actions ({0})","Show Code Actions"],"vs/editor/contrib/codelens/browser/codelensController":["Show CodeLens Commands For Current Line","Select a command"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["Click to toggle color options (rgb/hsl/hex)","Icon to close the color picker"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["Show or Focus Standalone Color Picker","&&Show or Focus Standalone Color Picker","Hide the Color Picker","Insert Color with Standalone Color Picker"],"vs/editor/contrib/comment/browser/comment":["Toggle Line Comment","&&Toggle Line Comment","Add Line Comment","Remove Line Comment","Toggle Block Comment","Toggle &&Block Comment"],"vs/editor/contrib/contextmenu/browser/contextmenu":["Minimap","Render Characters","Vertical size","Proportional","Fill","Fit","Slider","Mouse Over","Always","Show Editor Context Menu"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["Cursor Undo","Cursor Redo"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["Paste As...","The id of the paste edit to try applying. If not provided, the editor will show a picker."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["Whether the paste widget is showing","Show paste options...","Running paste handlers. Click to cancel","Select Paste Action","Running paste handlers"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["Built-in","Insert Plain Text","Insert Uris","Insert Uri","Insert Paths","Insert Path","Insert Relative Paths","Insert Relative Path"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["Configures the default drop provider to use for content of a given mime type."],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["Whether the drop widget is showing","Show drop options...","Running drop handlers. Click to cancel"],"vs/editor/contrib/editorState/browser/keybindingCancellation":["Whether the editor runs a cancellable operation, e.g. like 'Peek References'"],"vs/editor/contrib/find/browser/findController":["The file is too large to perform a replace all operation.","Find","&&Find",`Overrides "Use Regular Expression" flag. -The flag will not be saved for the future. -0: Do Nothing -1: True -2: False`,`Overrides "Match Whole Word" flag. -The flag will not be saved for the future. -0: Do Nothing -1: True -2: False`,`Overrides "Math Case" flag. -The flag will not be saved for the future. -0: Do Nothing -1: True -2: False`,`Overrides "Preserve Case" flag. -The flag will not be saved for the future. -0: Do Nothing -1: True -2: False`,"Find With Arguments","Find With Selection","Find Next","Find Previous","Go to Match...","No matches. Try searching for something else.","Type a number to go to a specific match (between 1 and {0})","Please type a number between 1 and {0}","Please type a number between 1 and {0}","Find Next Selection","Find Previous Selection","Replace","&&Replace"],"vs/editor/contrib/find/browser/findWidget":["Icon for 'Find in Selection' in the editor find widget.","Icon to indicate that the editor find widget is collapsed.","Icon to indicate that the editor find widget is expanded.","Icon for 'Replace' in the editor find widget.","Icon for 'Replace All' in the editor find widget.","Icon for 'Find Previous' in the editor find widget.","Icon for 'Find Next' in the editor find widget.","Find / Replace","Find","Find","Previous Match","Next Match","Find in Selection","Close","Replace","Replace","Replace","Replace All","Toggle Replace","Only the first {0} results are highlighted, but all find operations work on the entire text.","{0} of {1}","No results","{0} found","{0} found for '{1}'","{0} found for '{1}', at {2}","{0} found for '{1}'","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior."],"vs/editor/contrib/folding/browser/folding":["Unfold","Unfold Recursively","Fold","Toggle Fold","Fold Recursively","Fold All Block Comments","Fold All Regions","Unfold All Regions","Fold All Except Selected","Unfold All Except Selected","Fold All","Unfold All","Go to Parent Fold","Go to Previous Folding Range","Go to Next Folding Range","Create Folding Range from Selection","Remove Manual Folding Ranges","Fold Level {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.","Color of the folding control in the editor gutter.","Icon for expanded ranges in the editor glyph margin.","Icon for collapsed ranges in the editor glyph margin.","Icon for manually collapsed ranges in the editor glyph margin.","Icon for manually expanded ranges in the editor glyph margin."],"vs/editor/contrib/fontZoom/browser/fontZoom":["Editor Font Zoom In","Editor Font Zoom Out","Editor Font Zoom Reset"],"vs/editor/contrib/format/browser/format":["Made 1 formatting edit on line {0}","Made {0} formatting edits on line {1}","Made 1 formatting edit between lines {0} and {1}","Made {0} formatting edits between lines {1} and {2}"],"vs/editor/contrib/format/browser/formatActions":["Format Document","Format Selection"],"vs/editor/contrib/gotoError/browser/gotoError":["Go to Next Problem (Error, Warning, Info)","Icon for goto next marker.","Go to Previous Problem (Error, Warning, Info)","Icon for goto previous marker.","Go to Next Problem in Files (Error, Warning, Info)","Next &&Problem","Go to Previous Problem in Files (Error, Warning, Info)","Previous &&Problem"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["Error","Warning","Info","Hint","{0} at {1}. ","{0} of {1} problems","{0} of {1} problem","Editor marker navigation widget error color.","Editor marker navigation widget error heading background.","Editor marker navigation widget warning color.","Editor marker navigation widget warning heading background.","Editor marker navigation widget info color.","Editor marker navigation widget info heading background.","Editor marker navigation widget background."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["Peek","Definitions","No definition found for '{0}'","No definition found","Go to Definition","Go to &&Definition","Open Definition to the Side","Peek Definition","Declarations","No declaration found for '{0}'","No declaration found","Go to Declaration","Go to &&Declaration","No declaration found for '{0}'","No declaration found","Peek Declaration","Type Definitions","No type definition found for '{0}'","No type definition found","Go to Type Definition","Go to &&Type Definition","Peek Type Definition","Implementations","No implementation found for '{0}'","No implementation found","Go to Implementations","Go to &&Implementations","Peek Implementations","No references found for '{0}'","No references found","Go to References","Go to &&References","References","Peek References","References","Go to Any Symbol","Locations","No results for '{0}'","References"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["Click to show {0} definitions."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["Whether reference peek is visible, like 'Peek References' or 'Peek Definition'","Loading...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} references","{0} reference","References"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["no preview available","No results","References"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["in {0} on line {1} at column {2}","{0} in {1} on line {2} at column {3}","1 symbol in {0}, full path {1}","{0} symbols in {1}, full path {2}","No results found","Found 1 symbol in {0}","Found {0} symbols in {1}","Found {0} symbols in {1} files"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["Whether there are symbol locations that can be navigated via keyboard-only.","Symbol {0} of {1}, {2} for next","Symbol {0} of {1}"],"vs/editor/contrib/hover/browser/hover":["Show or Focus Hover","Show Definition Preview Hover","Scroll Up Hover","Scroll Down Hover","Scroll Left Hover","Scroll Right Hover","Page Up Hover","Page Down Hover","Go To Top Hover","Go To Bottom Hover"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["Loading...","Rendering paused for long line for performance reasons. This can be configured via `editor.stopRenderingLineAfter`.","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`."],"vs/editor/contrib/hover/browser/markerHoverParticipant":["View Problem","No quick fixes available","Checking for quick fixes...","No quick fixes available","Quick Fix..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["Replace with Previous Value","Replace with Next Value"],"vs/editor/contrib/indentation/browser/indentation":["Convert Indentation to Spaces","Convert Indentation to Tabs","Configured Tab Size","Default Tab Size","Current Tab Size","Select Tab Size for Current File","Indent Using Tabs","Indent Using Spaces","Change Tab Display Size","Detect Indentation from Content","Reindent Lines","Reindent Selected Lines"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["Double-click to insert","cmd + click","ctrl + click","option + click","alt + click","Go to Definition ({0}), right click for more","Go to Definition ({0})","Execute Command"],"vs/editor/contrib/inlineCompletions/browser/commands":["Show Next Inline Suggestion","Show Previous Inline Suggestion","Trigger Inline Suggestion","Accept Next Word Of Inline Suggestion","Accept Word","Accept Next Line Of Inline Suggestion","Accept Line","Accept Inline Suggestion","Accept","Hide Inline Suggestion","Always Show Toolbar"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["Suggestion:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["Whether an inline suggestion is visible","Whether the inline suggestion starts with whitespace","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab","Whether suggestions should be suppressed for the current suggestion"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["Inspect this in the accessible view ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["Icon for show next parameter hint.","Icon for show previous parameter hint.","{0} ({1})","Previous","Next"],"vs/editor/contrib/lineSelection/browser/lineSelection":["Expand Line Selection"],"vs/editor/contrib/linesOperations/browser/linesOperations":["Copy Line Up","&&Copy Line Up","Copy Line Down","Co&&py Line Down","Duplicate Selection","&&Duplicate Selection","Move Line Up","Mo&&ve Line Up","Move Line Down","Move &&Line Down","Sort Lines Ascending","Sort Lines Descending","Delete Duplicate Lines","Trim Trailing Whitespace","Delete Line","Indent Line","Outdent Line","Insert Line Above","Insert Line Below","Delete All Left","Delete All Right","Join Lines","Transpose Characters around the Cursor","Transform to Uppercase","Transform to Lowercase","Transform to Title Case","Transform to Snake Case","Transform to Camel Case","Transform to Kebab Case"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["Start Linked Editing","Background color when the editor auto renames on type."],"vs/editor/contrib/links/browser/links":["Failed to open this link because it is not well-formed: {0}","Failed to open this link because its target is missing.","Execute command","Follow link","cmd + click","ctrl + click","option + click","alt + click","Execute command {0}","Open Link"],"vs/editor/contrib/message/browser/messageController":["Whether the editor is currently showing an inline message"],"vs/editor/contrib/multicursor/browser/multicursor":["Cursor added: {0}","Cursors added: {0}","Add Cursor Above","&&Add Cursor Above","Add Cursor Below","A&&dd Cursor Below","Add Cursors to Line Ends","Add C&&ursors to Line Ends","Add Cursors To Bottom","Add Cursors To Top","Add Selection To Next Find Match","Add &&Next Occurrence","Add Selection To Previous Find Match","Add P&&revious Occurrence","Move Last Selection To Next Find Match","Move Last Selection To Previous Find Match","Select All Occurrences of Find Match","Select All &&Occurrences","Change All Occurrences","Focus Next Cursor","Focuses the next cursor","Focus Previous Cursor","Focuses the previous cursor"],"vs/editor/contrib/parameterHints/browser/parameterHints":["Trigger Parameter Hints"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["Icon for show next parameter hint.","Icon for show previous parameter hint.","{0}, hint","Foreground color of the active item in the parameter hint."],"vs/editor/contrib/peekView/browser/peekView":["Whether the current code editor is embedded inside peek","Close","Background color of the peek view title area.","Color of the peek view title.","Color of the peek view title info.","Color of the peek view borders and arrow.","Background color of the peek view result list.","Foreground color for line nodes in the peek view result list.","Foreground color for file nodes in the peek view result list.","Background color of the selected entry in the peek view result list.","Foreground color of the selected entry in the peek view result list.","Background color of the peek view editor.","Background color of the gutter in the peek view editor.","Background color of sticky scroll in the peek view editor.","Match highlight color in the peek view result list.","Match highlight color in the peek view editor.","Match highlight border in the peek view editor."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["Open a text editor first to go to a line.","Go to line {0} and character {1}.","Go to line {0}.","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.","Current Line: {0}, Character: {1}. Type a line number to navigate to."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["To go to a symbol, first open a text editor with symbol information.","The active text editor does not provide symbol information.","No matching editor symbols","No editor symbols","Open to the Side","Open to the Bottom","symbols ({0})","properties ({0})","methods ({0})","functions ({0})","constructors ({0})","variables ({0})","classes ({0})","structs ({0})","events ({0})","operators ({0})","interfaces ({0})","namespaces ({0})","packages ({0})","type parameters ({0})","modules ({0})","properties ({0})","enumerations ({0})","enumeration members ({0})","strings ({0})","files ({0})","arrays ({0})","numbers ({0})","booleans ({0})","objects ({0})","keys ({0})","fields ({0})","constants ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["Cannot edit in read-only input","Cannot edit in read-only editor"],"vs/editor/contrib/rename/browser/rename":["No result.","An unknown error occurred while resolving rename location","Renaming '{0}' to '{1}'","Renaming {0} to {1}","Successfully renamed '{0}' to '{1}'. Summary: {2}","Rename failed to apply edits","Rename failed to compute edits","Rename Symbol","Enable/disable the ability to preview changes before renaming"],"vs/editor/contrib/rename/browser/renameInputField":["Whether the rename input widget is visible","Rename input. Type new name and press Enter to commit.","{0} to Rename, {1} to Preview"],"vs/editor/contrib/smartSelect/browser/smartSelect":["Expand Selection","&&Expand Selection","Shrink Selection","&&Shrink Selection"],"vs/editor/contrib/snippet/browser/snippetController2":["Whether the editor in current in snippet mode","Whether there is a next tab stop when in snippet mode","Whether there is a previous tab stop when in snippet mode","Go to next placeholder..."],"vs/editor/contrib/snippet/browser/snippetVariables":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sun","Mon","Tue","Wed","Thu","Fri","Sat","January","February","March","April","May","June","July","August","September","October","November","December","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["Toggle Sticky Scroll","&&Toggle Sticky Scroll","Sticky Scroll","&&Sticky Scroll","Focus Sticky Scroll","&&Focus Sticky Scroll","Select next sticky scroll line","Select previous sticky scroll line","Go to focused sticky scroll line","Select Editor"],"vs/editor/contrib/suggest/browser/suggest":["Whether any suggestion is focused","Whether suggestion details are visible","Whether there are multiple suggestions to pick from","Whether inserting the current suggestion yields in a change or has everything already been typed","Whether suggestions are inserted when pressing Enter","Whether the current suggestion has insert and replace behaviour","Whether the default behaviour is to insert or replace","Whether the current suggestion supports to resolve further details"],"vs/editor/contrib/suggest/browser/suggestController":["Accepting '{0}' made {1} additional edits","Trigger Suggest","Insert","Insert","Replace","Replace","Insert","show less","show more","Reset Suggest Widget Size"],"vs/editor/contrib/suggest/browser/suggestWidget":["Background color of the suggest widget.","Border color of the suggest widget.","Foreground color of the suggest widget.","Foreground color of the selected entry in the suggest widget.","Icon foreground color of the selected entry in the suggest widget.","Background color of the selected entry in the suggest widget.","Color of the match highlights in the suggest widget.","Color of the match highlights in the suggest widget when an item is focused.","Foreground color of the suggest widget status.","Loading...","No suggestions.","Suggest","{0} {1}, {2}","{0} {1}","{0}, {1}","{0}, docs: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["Close","Loading..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["Icon for more information in the suggest widget.","Read More"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["Toggle Tab Key Moves Focus","Pressing Tab will now move focus to the next focusable element","Pressing Tab will now insert the tab character"],"vs/editor/contrib/tokenization/browser/tokenization":["Developer: Force Retokenize"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["Icon shown with a warning message in the extensions editor.","This document contains many non-basic ASCII unicode characters","This document contains many ambiguous unicode characters","This document contains many invisible unicode characters","The character {0} could be confused with the ASCII character {1}, which is more common in source code.","The character {0} could be confused with the character {1}, which is more common in source code.","The character {0} is invisible.","The character {0} is not a basic ASCII character.","Adjust settings","Disable Highlight In Comments","Disable highlighting of characters in comments","Disable Highlight In Strings","Disable highlighting of characters in strings","Disable Ambiguous Highlight","Disable highlighting of ambiguous characters","Disable Invisible Highlight","Disable highlighting of invisible characters","Disable Non ASCII Highlight","Disable highlighting of non basic ASCII characters","Show Exclude Options","Exclude {0} (invisible character) from being highlighted","Exclude {0} from being highlighted",'Allow unicode characters that are more common in the language "{0}".',"Configure Unicode Highlight Options"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["Unusual Line Terminators","Detected unusual line terminators","The file '{0}' 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`.","&&Remove Unusual Line Terminators","Ignore"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["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.","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.","Background color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations.","Border color of a symbol during read-access, like reading a variable.","Border color of a symbol during write-access, like writing to a variable.","Border color of a textual occurrence for a symbol.","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color of a textual occurrence for a symbol. The color must not be opaque so as not to hide underlying decorations."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["Go to Next Symbol Highlight","Go to Previous Symbol Highlight","Trigger Symbol Highlight"],"vs/editor/contrib/wordOperations/browser/wordOperations":["Delete Word"],"vs/platform/action/common/actionCommonCategories":["View","Help","Test","File","Preferences","Developer"],"vs/platform/actionWidget/browser/actionList":["{0} to apply, {1} to preview","{0} to apply","{0}, Disabled Reason: {1}","Action Widget"],"vs/platform/actionWidget/browser/actionWidget":["Background color for toggled action items in action bar.","Whether the action widget list is visible","Hide action widget","Select previous action","Select next action","Accept selected action","Preview selected action"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0} -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["Hide","Reset Menu"],"vs/platform/actions/common/menuService":["Hide '{0}'"],"vs/platform/audioCues/browser/audioCueService":["Error on Line","Warning on Line","Folded Area on Line","Breakpoint on Line","Inline Suggestion on Line","Terminal Quick Fix","Debugger Stopped on Breakpoint","No Inlay Hints on Line","Task Completed","Task Failed","Terminal Command Failed","Terminal Bell","Notebook Cell Completed","Notebook Cell Failed","Diff Line Inserted","Diff Line Deleted","Diff Line Modified","Chat Request Sent","Chat Response Received","Chat Response Pending"],"vs/platform/configuration/common/configurationRegistry":["Default Language Configuration Overrides","Configure settings to be overridden for the {0} language.","Configure editor settings to be overridden for a language.","This setting does not support per-language configuration.","Configure editor settings to be overridden for a language.","This setting does not support per-language configuration.","Cannot register an empty property","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.","Cannot register '{0}'. This property is already registered.","Cannot register '{0}'. The associated policy {1} is already registered with {2}."],"vs/platform/contextkey/browser/contextKeyService":["A command that returns information about context keys"],"vs/platform/contextkey/common/contextkey":["Empty context key expression","Did you forget to write an expression? You can also put 'false' or 'true' to always evaluate to false or true, respectively.","'in' after 'not'.","closing parenthesis ')'","Unexpected token","Did you forget to put && or || before the token?","Unexpected end of expression","Did you forget to put a context key?",`Expected: {0} -Received: '{1}'.`],"vs/platform/contextkey/common/contextkeys":["Whether the operating system is macOS","Whether the operating system is Linux","Whether the operating system is Windows","Whether the platform is a web browser","Whether the operating system is macOS on a non-browser platform","Whether the operating system is iOS","Whether the platform is a mobile web browser","Quality type of VS Code","Whether keyboard focus is inside an input box"],"vs/platform/contextkey/common/scanner":["Did you mean {0}?","Did you mean {0} or {1}?","Did you mean {0}, {1} or {2}?","Did you forget to open or close the quote?","Did you forget to escape the '/' (slash) character? Put two backslashes before it to escape, e.g., '\\\\/'."],"vs/platform/history/browser/contextScopedHistoryWidget":["Whether suggestion are visible"],"vs/platform/keybinding/common/abstractKeybindingService":["({0}) was pressed. Waiting for second key of chord...","({0}) was pressed. Waiting for next key of chord...","The key combination ({0}, {1}) is not a command.","The key combination ({0}, {1}) is not a command."],"vs/platform/list/browser/listService":["Workbench","Maps to `Control` on Windows and Linux and to `Command` on macOS.","Maps to `Alt` on Windows and Linux and to `Option` on macOS.","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.","Controls how to open items in trees and lists using the mouse (if supported). Note that some trees and lists might choose to ignore this setting if it is not applicable.","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.","Controls whether clicks in the scrollbar scroll page by page.","Controls tree indentation in pixels.","Controls whether the tree should render indent guides.","Controls whether lists and trees have smooth scrolling.","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.","Scrolling speed multiplier when pressing `Alt`.","Highlight elements when searching. Further up and down navigation will traverse only the highlighted elements.","Filter elements when searching.","Controls the default find mode for lists and trees in the workbench.","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes.","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements.","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.","Please use 'workbench.list.defaultFindMode' and 'workbench.list.typeNavigationMode' instead.","Use fuzzy matching when searching.","Use contiguous matching when searching.","Controls the type of matching used when searching lists and trees in the workbench.","Controls how tree folders are expanded when clicking the folder names. Note that some trees and lists might choose to ignore this setting if it is not applicable.","Controls how type navigation works in lists and trees in the workbench. When set to `trigger`, type navigation begins once the `list.triggerTypeNavigation` command is run."],"vs/platform/markers/common/markers":["Error","Warning","Info"],"vs/platform/quickinput/browser/commandsQuickAccess":["recently used","similar commands","commonly used","other commands","similar commands","{0}, {1}","Command '{0}' resulted in an error"],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["Back","Press 'Enter' to confirm your input or 'Escape' to cancel","{0}/{1}","Type to narrow down results."],"vs/platform/quickinput/browser/quickInputController":["Toggle all checkboxes","{0} Results","{0} Selected","OK","Custom","Back ({0})","Back"],"vs/platform/quickinput/browser/quickInputList":["Quick Input"],"vs/platform/quickinput/browser/quickInputUtils":["Click to execute command '{0}'"],"vs/platform/theme/common/colorRegistry":["Overall foreground color. This color is only used if not overridden by a component.","Overall foreground for disabled elements. This color is only used if not overridden by a component.","Overall foreground color for error messages. This color is only used if not overridden by a component.","Foreground color for description text providing additional information, for example for a label.","The default color for icons in the workbench.","Overall border color for focused elements. This color is only used if not overridden by a component.","An extra border around elements to separate them from others for greater contrast.","An extra border around active elements to separate them from others for greater contrast.","The background color of text selections in the workbench (e.g. for input fields or text areas). Note that this does not apply to selections within the editor.","Color for text separators.","Foreground color for links in text.","Foreground color for links in text when clicked on and on mouse hover.","Foreground color for preformatted text segments.","Background color for block quotes in text.","Border color for block quotes in text.","Background color for code blocks in text.","Shadow color of widgets such as find/replace inside the editor.","Border color of widgets such as find/replace inside the editor.","Input box background.","Input box foreground.","Input box border.","Border color of activated options in input fields.","Background color of activated options in input fields.","Background hover color of options in input fields.","Foreground color of activated options in input fields.","Input box foreground color for placeholder text.","Input validation background color for information severity.","Input validation foreground color for information severity.","Input validation border color for information severity.","Input validation background color for warning severity.","Input validation foreground color for warning severity.","Input validation border color for warning severity.","Input validation background color for error severity.","Input validation foreground color for error severity.","Input validation border color for error severity.","Dropdown background.","Dropdown list background.","Dropdown foreground.","Dropdown border.","Button foreground color.","Button separator color.","Button background color.","Button background color when hovering.","Button border color.","Secondary button foreground color.","Secondary button background color.","Secondary button background color when hovering.","Badge background color. Badges are small information labels, e.g. for search results count.","Badge foreground color. Badges are small information labels, e.g. for search results count.","Scrollbar shadow to indicate that the view is scrolled.","Scrollbar slider background color.","Scrollbar slider background color when hovering.","Scrollbar slider background color when clicked on.","Background color of the progress bar that can show for long running operations.","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations.","Foreground color of error squigglies in the editor.","If set, color of double underlines for errors in the editor.","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.","Foreground color of warning squigglies in the editor.","If set, color of double underlines for warnings in the editor.","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.","Foreground color of info squigglies in the editor.","If set, color of double underlines for infos in the editor.","Foreground color of hint squigglies in the editor.","If set, color of double underlines for hints in the editor.","Border color of active sashes.","Editor background color.","Editor default foreground color.","Sticky scroll background color for the editor","Sticky scroll on hover background color for the editor","Background color of editor widgets, such as find/replace.","Foreground color of editor widgets, such as find/replace.","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.","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.","Quick picker background color. The quick picker widget is the container for pickers like the command palette.","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.","Quick picker color for grouping labels.","Quick picker color for grouping borders.","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.","Color of the editor selection.","Color of the selected text for high contrast.","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations.","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations.","Border color for regions with the same content as the selection.","Color of the current search match.","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations.","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.","Border color of the current search match.","Border color of the other search matches.","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.","Color of the Search Editor query matches.","Border color of the Search Editor query matches.","Color of the text in the search viewlet's completion message.","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations.","Background color of the editor hover.","Foreground color of the editor hover.","Border color of the editor hover.","Background color of the editor hover status bar.","Color of active links.","Foreground color of inline hints","Background color of inline hints","Foreground color of inline hints for types","Background color of inline hints for types","Foreground color of inline hints for parameters","Background color of inline hints for parameters","The color used for the lightbulb actions icon.","The color used for the lightbulb auto fix actions icon.","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.","Background color for lines that got inserted. The color must not be opaque so as not to hide underlying decorations.","Background color for lines that got removed. The color must not be opaque so as not to hide underlying decorations.","Background color for the margin where lines got inserted.","Background color for the margin where lines got removed.","Diff overview ruler foreground for inserted content.","Diff overview ruler foreground for removed content.","Outline color for the text that got inserted.","Outline color for text that got removed.","Border color between the two text editors.","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.","The background color of unchanged blocks in the diff editor.","The foreground color of unchanged blocks in the diff editor.","The background color of unchanged code in the diff editor.","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.","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.","List/Tree outline color for the focused item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","List/Tree outline color for the focused item when the list/tree is active and selected. An active list/tree has keyboard focus, an inactive does not.","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.","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.","List/Tree icon foreground color for the selected item when the list/tree is active. An active list/tree has keyboard focus, an inactive does not.","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.","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.","List/Tree icon foreground color for the selected item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","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.","List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.","List/Tree background when hovering over items using the mouse.","List/Tree foreground when hovering over items using the mouse.","List/Tree drag and drop background when moving items around using the mouse.","List/Tree foreground color of the match highlights when searching inside the list/tree.","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.","List/Tree foreground color for invalid items, for example an unresolved root in explorer.","Foreground color of list items containing errors.","Foreground color of list items containing warnings.","Background color of the type filter widget in lists and trees.","Outline color of the type filter widget in lists and trees.","Outline color of the type filter widget in lists and trees, when there are no matches.","Shadow color of the type filter widget in lists and trees.","Background color of the filtered match.","Border color of the filtered match.","Tree stroke color for the indentation guides.","Tree stroke color for the indentation guides that are not active.","Table border color between columns.","Background color for odd table rows.","List/Tree foreground color for items that are deemphasized. ","Background color of checkbox widget.","Background color of checkbox widget when the element it's in is selected.","Foreground color of checkbox widget.","Border color of checkbox widget.","Border color of checkbox widget when the element it's in is selected.","Please use quickInputList.focusBackground instead","Quick picker foreground color for the focused item.","Quick picker icon foreground color for the focused item.","Quick picker background color for the focused item.","Border color of menus.","Foreground color of menu items.","Background color of menu items.","Foreground color of the selected menu item in menus.","Background color of the selected menu item in menus.","Border color of the selected menu item in menus.","Color of a separator menu item in menus.","Toolbar background when hovering over actions using the mouse","Toolbar outline when hovering over actions using the mouse","Toolbar background when holding the mouse over actions","Highlight background color of a snippet tabstop.","Highlight border color of a snippet tabstop.","Highlight background color of the final tabstop of a snippet.","Highlight border color of the final tabstop of a snippet.","Color of focused breadcrumb items.","Background color of breadcrumb items.","Color of focused breadcrumb items.","Color of selected breadcrumb items.","Background color of breadcrumb item picker.","Current header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Current content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Incoming header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Incoming content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Common ancestor header background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Common ancestor content background in inline merge-conflicts. The color must not be opaque so as not to hide underlying decorations.","Border color on headers and the splitter in inline merge-conflicts.","Current overview ruler foreground for inline merge-conflicts.","Incoming overview ruler foreground for inline merge-conflicts.","Common ancestor overview ruler foreground for inline merge-conflicts.","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.","Minimap marker color for find matches.","Minimap marker color for repeating editor selections.","Minimap marker color for the editor selection.","Minimap marker color for infos.","Minimap marker color for warnings.","Minimap marker color for errors.","Minimap background color.",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.',"Minimap slider background color.","Minimap slider background color when hovering.","Minimap slider background color when clicked on.","The color used for the problems error icon.","The color used for the problems warning icon.","The color used for the problems info icon.","The foreground color used in charts.","The color used for horizontal lines in charts.","The red color used in chart visualizations.","The blue color used in chart visualizations.","The yellow color used in chart visualizations.","The orange color used in chart visualizations.","The green color used in chart visualizations.","The purple color used in chart visualizations."],"vs/platform/theme/common/iconRegistry":["The id of the font to use. If not set, the font that is defined first is used.","The font character associated with the icon definition.","Icon for the close action in widgets.","Icon for goto previous editor location.","Icon for goto next editor location."],"vs/platform/undoRedo/common/undoRedoService":["The following files have been closed and modified on disk: {0}.","The following files have been modified in an incompatible way: {0}.","Could not undo '{0}' across all files. {1}","Could not undo '{0}' across all files. {1}","Could not undo '{0}' across all files because changes were made to {1}","Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}","Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime","Would you like to undo '{0}' across all files?","&&Undo in {0} Files","Undo this &&File","Could not undo '{0}' because there is already an undo or redo operation running.","Would you like to undo '{0}'?","&&Yes","No","Could not redo '{0}' across all files. {1}","Could not redo '{0}' across all files. {1}","Could not redo '{0}' across all files because changes were made to {1}","Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}","Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime","Could not redo '{0}' because there is already an undo or redo operation running."],"vs/platform/workspace/common/workspace":["Code Workspace"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.ko.js b/lib/vs/editor/editor.main.nls.ko.js deleted file mode 100644 index 5bce3c8..0000000 --- a/lib/vs/editor/editor.main.nls.ko.js +++ /dev/null @@ -1,29 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.ko",{"vs/base/browser/ui/actionbar/actionViewItems":["{0}({1})"],"vs/base/browser/ui/findinput/findInput":["\uC785\uB825"],"vs/base/browser/ui/findinput/findInputToggles":["\uB300/\uC18C\uBB38\uC790 \uAD6C\uBD84","\uB2E8\uC5B4 \uB2E8\uC704\uB85C","\uC815\uADDC\uC2DD \uC0AC\uC6A9"],"vs/base/browser/ui/findinput/replaceInput":["\uC785\uB825","\uB300/\uC18C\uBB38\uC790 \uBCF4\uC874"],"vs/base/browser/ui/hover/hoverWidget":["{0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uC811\uADFC\uC131 \uBCF4\uAE30\uC5D0\uC11C \uC774\uB97C \uAC80\uC0AC\uD569\uB2C8\uB2E4.","\uD604\uC7AC \uD0A4 \uBC14\uC778\uB529\uC744 \uD1B5\uD574 \uD2B8\uB9AC\uAC70\uD560 \uC218 \uC5C6\uB294 \uC811\uADFC\uC131 \uBCF4\uAE30 \uC5F4\uAE30 \uBA85\uB839\uC744 \uD1B5\uD574 \uC811\uADFC\uC131 \uBCF4\uAE30\uC5D0\uC11C \uC774\uB97C \uAC80\uC0AC\uD569\uB2C8\uB2E4."],"vs/base/browser/ui/iconLabel/iconLabelHover":["\uB85C\uB4DC \uC911..."],"vs/base/browser/ui/inputbox/inputBox":["\uC624\uB958: {0}","\uACBD\uACE0: {0}","\uC815\uBCF4: {0}","\uAE30\uB85D\uC6A9","\uC785\uB825\uC774 \uC9C0\uC6CC\uC9D0"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["\uBC14\uC778\uB529 \uC548 \uB428"],"vs/base/browser/ui/selectBox/selectBoxCustom":["Box \uC120\uD0DD"],"vs/base/browser/ui/toolbar/toolbar":["\uAE30\uD0C0 \uC791\uC5C5..."],"vs/base/browser/ui/tree/abstractTree":["\uD544\uD130","\uC720\uC0AC \uD56D\uBAA9 \uC77C\uCE58","\uD544\uD130\uB9C1\uD560 \uD615\uC2DD","\uC785\uB825\uD558\uC5EC \uAC80\uC0C9","\uC785\uB825\uD558\uC5EC \uAC80\uC0C9","\uB2EB\uAE30","\uCC3E\uC740 \uC694\uC18C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."],"vs/base/common/actions":["(\uBE44\uC5B4 \uC788\uC74C)"],"vs/base/common/errorMessage":["{0}: {1}","\uC2DC\uC2A4\uD15C \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4({0}).","\uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uB85C\uADF8\uB97C \uCC38\uC870\uD558\uC138\uC694.","\uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uB85C\uADF8\uB97C \uCC38\uC870\uD558\uC138\uC694.","{0}(\uCD1D {1}\uAC1C\uC758 \uC624\uB958)","\uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uC790\uC138\uD55C \uB0B4\uC6A9\uC740 \uB85C\uADF8\uB97C \uCC38\uC870\uD558\uC138\uC694."],"vs/base/common/keybindingLabels":["Ctrl","Shift","","Windows","Ctrl","Shift","","\uC288\uD37C","Ctrl","Shift","\uC635\uC158","\uBA85\uB839","Ctrl","Shift","","Windows","Ctrl","Shift","","\uC288\uD37C"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["\uD3B8\uC9D1\uAE30","\uD604\uC7AC \uD3B8\uC9D1\uAE30\uC5D0 \uC561\uC138\uC2A4\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","{0} \uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8 \uCD5C\uC801\uD654 \uBAA8\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uB824\uBA74 {1}","{0} \uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8 \uCD5C\uC801\uD654 \uBAA8\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uB824\uBA74 {1}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uBE60\uB978 \uC120\uD0DD\uC744 \uC5F4\uACE0 \uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8 \uC811\uADFC\uC131 \uBAA8\uB4DC \uD1A0\uAE00 \uBA85\uB839\uC744 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uC774 \uBA85\uB839\uC740 \uD604\uC7AC \uD0A4\uBCF4\uB4DC\uB97C \uD1B5\uD574 \uD2B8\uB9AC\uAC70\uD560 \uC218 \uC5C6\uC74C).","{0} {1}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uD0A4 \uBC14\uC778\uB529 \uD3B8\uC9D1\uAE30\uC5D0 \uC561\uC138\uC2A4\uD558\uC5EC \uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8 \uC811\uADFC\uC131 \uBAA8\uB4DC \uD1A0\uAE00 \uBA85\uB839\uC5D0 \uB300\uD55C \uD0A4 \uBC14\uC778\uB529\uC744 \uD560\uB2F9\uD558\uACE0 \uC2E4\uD589\uD558\uC138\uC694."],"vs/editor/browser/coreCommands":["\uB354 \uAE34 \uC904\uB85C \uC774\uB3D9\uD558\uB294 \uACBD\uC6B0\uC5D0\uB3C4 \uB05D\uC5D0 \uACE0\uC815","\uB354 \uAE34 \uC904\uB85C \uC774\uB3D9\uD558\uB294 \uACBD\uC6B0\uC5D0\uB3C4 \uB05D\uC5D0 \uACE0\uC815","\uBCF4\uC870 \uCEE4\uC11C\uAC00 \uC81C\uAC70\uB428"],"vs/editor/browser/editorExtensions":["\uC2E4\uD589 \uCDE8\uC18C(&&U)","\uC2E4\uD589 \uCDE8\uC18C","\uB2E4\uC2DC \uC2E4\uD589(&&R)","\uB2E4\uC2DC \uC2E4\uD589","\uBAA8\uB450 \uC120\uD0DD(&&S)","\uBAA8\uB450 \uC120\uD0DD"],"vs/editor/browser/widget/codeEditorWidget":["\uCEE4\uC11C \uC218\uB97C {0}\uAC1C\uB85C \uC81C\uD55C\uD588\uC2B5\uB2C8\uB2E4. \uB354 \uD070 \uBCC0\uACBD \uB0B4\uC6A9\uC744 \uC704\uD574\uC11C\uB294 [\uCC3E\uC544\uC11C \uAD50\uCCB4](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace)\uB97C \uC0AC\uC6A9\uD558\uAC70\uB098 \uD3B8\uC9D1\uAE30 \uB2E4\uC911 \uCEE4\uC11C \uC81C\uD55C \uC124\uC815\uC744 \uB298\uB9AC\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4.","\uB2E4\uC911 \uCEE4\uC11C \uC81C\uD55C \uB298\uB9AC\uAE30"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":["\uC561\uC138\uC2A4 \uAC00\uB2A5\uD55C Diff \uBDF0\uC5B4\uC758 '\uC0BD\uC785' \uC544\uC774\uCF58.","\uC561\uC138\uC2A4 \uAC00\uB2A5\uD55C Diff \uBDF0\uC5B4\uC758 '\uC81C\uAC70' \uC544\uC774\uCF58.","\uC811\uADFC \uAC00\uB2A5\uD55C Diff \uBDF0\uC5B4\uC758 '\uB2EB\uAE30' \uC544\uC774\uCF58.","\uB2EB\uAE30","\uC561\uC138\uC2A4 \uAC00\uB2A5\uD55C Diff \uBDF0\uC5B4\uC785\uB2C8\uB2E4. \uD0D0\uC0C9\uD558\uB824\uBA74 \uC704\uCABD \uBC0F \uC544\uB798\uCABD \uD654\uC0B4\uD45C\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uBCC0\uACBD\uB41C \uC904 \uC5C6\uC74C","\uC120 1\uAC1C \uBCC0\uACBD\uB428","\uC904 {0}\uAC1C \uBCC0\uACBD\uB428","\uCC28\uC774 {0}/{1}: \uC6D0\uB798 \uC904 {2}, {3}, \uC218\uC815\uB41C \uC904 {4}, {5}","\uBE44\uC5B4 \uC788\uC74C","{0} \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uC904 {1}","{0} \uC6D0\uB798 \uC904 {1} \uC218\uC815\uB41C \uC904 {2}","+ {0} \uC218\uC815\uB41C \uC904 {1}","- {0} \uC6D0\uB798 \uC904 {1}"],"vs/editor/browser/widget/diffEditor/colors":["diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC774\uB3D9\uB41C \uD14D\uC2A4\uD2B8\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC774\uB3D9\uB41C \uD14D\uC2A4\uD2B8\uC758 \uD65C\uC131 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4."],"vs/editor/browser/widget/diffEditor/decorations":["diff \uD3B8\uC9D1\uAE30\uC758 \uC0BD\uC785\uC5D0 \uB300\uD55C \uC904 \uB370\uCF54\uB808\uC774\uC158\uC785\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC758 \uC81C\uAC70\uC5D0 \uB300\uD55C \uC904 \uB370\uCF54\uB808\uC774\uC158\uC785\uB2C8\uB2E4.","\uBCC0\uACBD \uB0B4\uC6A9\uC744 \uB418\uB3CC\uB9AC\uB824\uBA74 \uD074\uB9AD"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["\uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uC601\uC5ED \uCD95\uC18C \uD1A0\uAE00","\uC774\uB3D9\uB41C \uCF54\uB4DC \uBE14\uB85D \uD45C\uC2DC \uD1A0\uAE00","\uACF5\uAC04\uC774 \uC81C\uD55C\uB41C \uACBD\uC6B0 \uC778\uB77C\uC778 \uBCF4\uAE30 \uC0AC\uC6A9 \uC124\uC815/\uD574\uC81C","\uACF5\uAC04\uC774 \uC81C\uD55C\uB41C \uACBD\uC6B0 \uC778\uB77C\uC778 \uBCF4\uAE30 \uC0AC\uC6A9","\uC774\uB3D9\uB41C \uCF54\uB4DC \uBE14\uB85D \uD45C\uC2DC","diff \uD3B8\uC9D1\uAE30","\uC2A4\uC704\uCE58 \uCABD","\uBE44\uAD50 \uC774\uB3D9 \uC885\uB8CC","\uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uC601\uC5ED \uCD95\uC18C","\uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uBAA8\uB4E0 \uC601\uC5ED \uD45C\uC2DC","\uC561\uC138\uC2A4 \uAC00\uB2A5\uD55C Diff \uBDF0\uC5B4","\uB2E4\uC74C \uB2E4\uB978 \uD56D\uBAA9\uC73C\uB85C \uC774\uB3D9","\uC561\uC138\uC2A4 \uAC00\uB2A5\uD55C Diff \uBDF0\uC5B4 \uC5F4\uAE30","\uB2E4\uC74C \uB2E4\uB978 \uD56D\uBAA9\uC73C\uB85C \uC774\uB3D9"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" {0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uC811\uADFC\uC131 \uB3C4\uC6C0\uB9D0\uC744 \uC5FD\uB2C8\uB2E4."],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["\uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uC601\uC5ED \uC811\uAE30","\uC704\uC5D0 \uC790\uC138\uD788 \uD45C\uC2DC\uD558\uB824\uBA74 \uD074\uB9AD\uD558\uAC70\uB098 \uB04C\uC5B4\uB2E4 \uB193\uAE30","\uBAA8\uB450 \uD45C\uC2DC","\uC544\uB798\uC5D0 \uC790\uC138\uD788 \uD45C\uC2DC\uD558\uB824\uBA74 \uD074\uB9AD\uD558\uAC70\uB098 \uB04C\uC5B4\uB2E4 \uB193\uAE30","\uC228\uACA8\uC9C4 \uC120 {0}\uAC1C","\uB450 \uBC88 \uD074\uB9AD\uD558\uC5EC \uD3BC\uCE58\uAE30"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["\uC0AD\uC81C\uB41C \uC904 \uBCF5\uC0AC","\uC0AD\uC81C\uB41C \uC904 \uBCF5\uC0AC","\uBCC0\uACBD\uB41C \uC904 \uBCF5\uC0AC","\uBCC0\uACBD\uB41C \uC904 \uBCF5\uC0AC","\uC0AD\uC81C\uB41C \uC904 \uBCF5\uC0AC({0})","\uBCC0\uACBD\uB41C \uC904({0}) \uBCF5\uC0AC","\uC774 \uBCC0\uACBD \uB0B4\uC6A9 \uB418\uB3CC\uB9AC\uAE30"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["\uBCC0\uACBD \uC0AC\uD56D\uACFC \uD568\uAED8 \uCF54\uB4DC\uAC00 {0} - {1}\uC904\uB85C \uC774\uB3D9\uB428","\uBCC0\uACBD \uC0AC\uD56D\uACFC \uD568\uAED8 \uCF54\uB4DC\uAC00 {0} - {1}\uC904\uC5D0\uC11C \uC774\uB3D9\uB428","\uCF54\uB4DC\uAC00 {0} - {1}\uC904\uB85C \uC774\uB3D9\uB428","\uCF54\uB4DC\uAC00 {0} - {1}\uC904\uC5D0\uC11C \uC774\uB3D9\uB428"],"vs/editor/common/config/editorConfigurationSchema":["\uD3B8\uC9D1\uAE30","\uD0ED\uC774 \uAC19\uC740 \uACF5\uBC31\uC758 \uC218\uC785\uB2C8\uB2E4. \uC774 \uC124\uC815\uC740 {0}\uC774(\uAC00) \uCF1C\uC838 \uC788\uC744 \uB54C \uD30C\uC77C \uB0B4\uC6A9\uC744 \uAE30\uBC18\uC73C\uB85C \uC7AC\uC815\uC758\uB429\uB2C8\uB2E4.",`\uB4E4\uC5EC\uC4F0\uAE30 \uB610\uB294 \`"tabSize"\uC5D0\uC11C '#editor.tabSize#'\uC758 \uAC12\uC744 \uC0AC\uC6A9\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uACF5\uBC31 \uC218\uC785\uB2C8\uB2E4. \uC774 \uC124\uC815\uC740 '#editor.detectIndentation#'\uC774 \uCF1C\uC838 \uC788\uB294 \uACBD\uC6B0 \uD30C\uC77C \uB0B4\uC6A9\uC5D0 \uB530\uB77C \uC7AC\uC815\uC758\uB429\uB2C8\uB2E4.`,"`Tab`\uC744 \uB204\uB97C \uB54C \uACF5\uBC31\uC744 \uC0BD\uC785\uD558\uC138\uC694. \uC774 \uC124\uC815\uC740 {0}\uC774(\uAC00) \uCF1C\uC838 \uC788\uC744 \uB54C \uD30C\uC77C \uB0B4\uC6A9\uC744 \uAE30\uBC18\uC73C\uB85C \uC7AC\uC815\uC758\uB429\uB2C8\uB2E4.","\uD30C\uC77C \uB0B4\uC6A9\uC744 \uAE30\uBC18\uC73C\uB85C \uD30C\uC77C\uC744 \uC5F4 \uB54C {0} \uBC0F {1}\uC744(\uB97C) \uC790\uB3D9\uC73C\uB85C \uAC10\uC9C0\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB05D\uC5D0 \uC790\uB3D9 \uC0BD\uC785\uB41C \uACF5\uBC31\uC744 \uC81C\uAC70\uD569\uB2C8\uB2E4.","\uD070 \uD30C\uC77C\uC5D0 \uB300\uD55C \uD2B9\uC218 \uCC98\uB9AC\uB85C, \uBA54\uBAA8\uB9AC\uB97C \uB9CE\uC774 \uC0AC\uC6A9\uD558\uB294 \uD2B9\uC815 \uAE30\uB2A5\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uBB38\uC11C \uB0B4 \uB2E8\uC5B4\uB97C \uAE30\uBC18\uC73C\uB85C \uC644\uC131\uC744 \uACC4\uC0B0\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD65C\uC131 \uBB38\uC11C\uC5D0\uC11C\uB9CC \uB2E8\uC5B4\uB97C \uC81C\uC548\uD569\uB2C8\uB2E4.","\uAC19\uC740 \uC5B8\uC5B4\uC758 \uBAA8\uB4E0 \uC5F4\uB9B0 \uBB38\uC11C\uC5D0\uC11C \uB2E8\uC5B4\uB97C \uC81C\uC548\uD569\uB2C8\uB2E4.","\uBAA8\uB4E0 \uC5F4\uB9B0 \uBB38\uC11C\uC5D0\uC11C \uB2E8\uC5B4\uB97C \uC81C\uC548\uD569\uB2C8\uB2E4.","\uB2E8\uC5B4 \uAE30\uBC18 \uC644\uC131\uC774 \uCEF4\uD4E8\uD305\uB418\uB294 \uBB38\uC11C\uC5D0\uC11C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBAA8\uB4E0 \uC0C9 \uD14C\uB9C8\uC5D0 \uB300\uD574 \uC758\uBBF8 \uCCB4\uACC4 \uAC15\uC870 \uD45C\uC2DC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uBAA8\uB4E0 \uC0C9 \uD14C\uB9C8\uC5D0 \uB300\uD574 \uC758\uBBF8 \uCCB4\uACC4 \uAC15\uC870 \uD45C\uC2DC\uB97C \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC758\uBBF8 \uCCB4\uACC4 \uAC15\uC870 \uD45C\uC2DC\uB294 \uD604\uC7AC \uC0C9 \uD14C\uB9C8\uC758 `semanticHighlighting` \uC124\uC815\uC5D0 \uB530\uB77C \uAD6C\uC131\uB429\uB2C8\uB2E4.","semanticHighlighting\uC774 \uC9C0\uC6D0\uD558\uB294 \uC5B8\uC5B4\uC5D0 \uB300\uD574 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD574\uB2F9 \uCF58\uD150\uCE20\uB97C \uB450 \uBC88 \uD074\uB9AD\uD558\uAC70\uB098 'Esc' \uD0A4\uB97C \uB204\uB974\uB354\uB77C\uB3C4 Peek \uD3B8\uC9D1\uAE30\uB97C \uC5F4\uB9B0 \uC0C1\uD0DC\uB85C \uC720\uC9C0\uD569\uB2C8\uB2E4.","\uC774 \uAE38\uC774\uB97C \uCD08\uACFC\uD558\uB294 \uC904\uC740 \uC131\uB2A5\uC0C1\uC758 \uC774\uC720\uB85C \uD1A0\uD070\uD654\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC6F9 \uC791\uC5C5\uC790\uC5D0\uC11C \uD1A0\uD070\uD654\uAC00 \uBE44\uB3D9\uAE30\uC801\uC73C\uB85C \uC218\uD589\uB418\uC5B4\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBE44\uB3D9\uAE30 \uD1A0\uD070\uD654\uAC00 \uAE30\uB85D\uB418\uC5B4\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uB514\uBC84\uAE45 \uC804\uC6A9\uC785\uB2C8\uB2E4.","\uB808\uAC70\uC2DC \uBC31\uADF8\uB77C\uC6B4\uB4DC \uD1A0\uD070\uD654\uC5D0 \uB300\uD574 \uBE44\uB3D9\uAE30 \uD1A0\uD070\uD654\uB97C \uD655\uC778\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uD1A0\uD070\uD654 \uC18D\uB3C4\uAC00 \uB290\uB824\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB514\uBC84\uAE45 \uC804\uC6A9\uC785\uB2C8\uB2E4.","\uB4E4\uC5EC\uC4F0\uAE30\uB97C \uB298\uB9AC\uAC70\uB098 \uC904\uC774\uB294 \uB300\uAD04\uD638 \uAE30\uD638\uB97C \uC815\uC758\uD569\uB2C8\uB2E4.","\uC5EC\uB294 \uB300\uAD04\uD638 \uBB38\uC790 \uB610\uB294 \uBB38\uC790\uC5F4 \uC2DC\uD000\uC2A4\uC785\uB2C8\uB2E4.","\uB2EB\uB294 \uB300\uAD04\uD638 \uBB38\uC790 \uB610\uB294 \uBB38\uC790\uC5F4 \uC2DC\uD000\uC2A4\uC785\uB2C8\uB2E4.","\uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uB294 \uACBD\uC6B0 \uC911\uCCA9 \uC218\uC900\uC5D0 \uB530\uB77C \uC0C9\uC774 \uC9C0\uC815\uB41C \uB300\uAD04\uD638 \uC30D\uC744 \uC815\uC758\uD569\uB2C8\uB2E4.","\uC5EC\uB294 \uB300\uAD04\uD638 \uBB38\uC790 \uB610\uB294 \uBB38\uC790\uC5F4 \uC2DC\uD000\uC2A4\uC785\uB2C8\uB2E4.","\uB2EB\uB294 \uB300\uAD04\uD638 \uBB38\uC790 \uB610\uB294 \uBB38\uC790\uC5F4 \uC2DC\uD000\uC2A4\uC785\uB2C8\uB2E4.","diff \uACC4\uC0B0\uC774 \uCDE8\uC18C\uB41C \uD6C4 \uBC00\uB9AC\uCD08 \uB2E8\uC704\uB85C \uC2DC\uAC04\uC744 \uC81C\uD55C\uD569\uB2C8\uB2E4. \uC81C\uD55C \uC2DC\uAC04\uC774 \uC5C6\uB294 \uACBD\uC6B0 0\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uCC28\uC774\uB97C \uACC4\uC0B0\uD560 \uCD5C\uB300 \uD30C\uC77C \uD06C\uAE30(MB)\uC785\uB2C8\uB2E4. \uC81C\uD55C\uC774 \uC5C6\uC73C\uBA74 0\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C diff\uB97C \uB098\uB780\uD788 \uD45C\uC2DC\uD560\uC9C0 \uC778\uB77C\uC778\uC73C\uB85C \uD45C\uC2DC\uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30 \uB108\uBE44\uAC00 \uC774 \uAC12\uBCF4\uB2E4 \uC791\uC73C\uBA74 \uC778\uB77C\uC778 \uBDF0\uAC00 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uACE0 \uD3B8\uC9D1\uAE30 \uB108\uBE44\uAC00 \uB108\uBB34 \uC791\uC744 \uACBD\uC6B0 \uC778\uB77C\uC778 \uBCF4\uAE30\uAC00 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD65C\uC131\uD654\uB418\uBA74 diff \uD3B8\uC9D1\uAE30\uB294 \uBCC0\uACBD \uB0B4\uC6A9\uC744 \uB418\uB3CC\uB9AC\uAE30 \uC704\uD574 \uAE00\uB9AC\uD504 \uC5EC\uBC31\uC5D0 \uD654\uC0B4\uD45C\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uBA74 Diff \uD3B8\uC9D1\uAE30\uAC00 \uC120\uD589 \uB610\uB294 \uD6C4\uD589 \uACF5\uBC31\uC758 \uBCC0\uACBD \uB0B4\uC6A9\uC744 \uBB34\uC2DC\uD569\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uCD94\uAC00/\uC81C\uAC70\uB41C \uBCC0\uACBD \uB0B4\uC6A9\uC5D0 \uB300\uD574 +/- \uD45C\uC2DC\uAE30\uB97C \uD45C\uC2DC\uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C CodeLens\uB97C \uD45C\uC2DC\uD560 \uAC83\uC778\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC904\uC774 \uBC14\uB00C\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uBDF0\uD3EC\uD2B8 \uB108\uBE44\uC5D0\uC11C \uC904\uC774 \uBC14\uB01D\uB2C8\uB2E4.","\uC904\uC740 {0} \uC124\uC815\uC5D0 \uB530\uB77C \uC904 \uBC14\uAFC8\uB429\uB2C8\uB2E4.","\uB808\uAC70\uC2DC \uBE44\uAD50 \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uACE0\uAE09 \uBE44\uAD50 \uC54C\uACE0\uB9AC\uC998\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0 \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uC601\uC5ED\uC774 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uC601\uC5ED\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC904 \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uC601\uC5ED\uC758 \uCD5C\uC18C\uAC12\uC73C\uB85C \uC0AC\uC6A9\uB418\uB294 \uC904 \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uC601\uC5ED\uC744 \uBE44\uAD50\uD560 \uB54C \uCEE8\uD14D\uC2A4\uD2B8\uB85C \uC0AC\uC6A9\uB418\uB294 \uC904 \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uAC10\uC9C0\uB41C \uCF54\uB4DC \uC774\uB3D9\uC744 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBB38\uC790\uAC00 \uC0BD\uC785\uB418\uAC70\uB098 \uC0AD\uC81C\uB41C \uC704\uCE58\uB97C \uBCFC \uC218 \uC788\uB3C4\uB85D diff \uD3B8\uC9D1\uAE30\uC5D0 \uBE48 \uC7A5\uC2DD\uC801 \uC694\uC18C\uB97C \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4."],"vs/editor/common/config/editorOptions":["\uD50C\uB7AB\uD3FC API\uB97C \uC0AC\uC6A9\uD558\uC5EC \uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC774 \uC5F0\uACB0\uB41C \uACBD\uC6B0 \uAC10\uC9C0","\uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC0AC\uC6A9 \uCD5C\uC801\uD654","\uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC774 \uC5F0\uACB0\uB418\uC5B4 \uC788\uC9C0 \uC54A\uB2E4\uACE0 \uAC00\uC815","\uD654\uBA74 \uD310\uB3C5\uAE30\uC5D0 \uCD5C\uC801\uD654\uB41C \uBAA8\uB4DC\uC5D0\uC11C UI\uB97C \uC2E4\uD589\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC8FC\uC11D\uC744 \uB2EC \uB54C \uACF5\uBC31 \uBB38\uC790\uB97C \uC0BD\uC785\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBE48 \uC904\uC744 \uC904 \uC8FC\uC11D\uC5D0 \uB300\uD55C \uD1A0\uAE00, \uCD94\uAC00 \uB610\uB294 \uC81C\uAC70 \uC791\uC5C5\uC73C\uB85C \uBB34\uC2DC\uD574\uC57C \uD558\uB294\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC120\uD0DD \uC601\uC5ED \uC5C6\uC774 \uD604\uC7AC \uC904 \uBCF5\uC0AC \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC785\uB825\uD558\uB294 \uB3D9\uC548 \uC77C\uCE58 \uD56D\uBAA9\uC744 \uCC3E\uAE30 \uC704\uD55C \uCEE4\uC11C \uC774\uB3D9 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uAC80\uC0C9 \uBB38\uC790\uC5F4\uC744 \uC2DC\uB4DC\uD558\uC9C0 \uB9C8\uC138\uC694.","\uCEE4\uC11C \uC704\uCE58\uC758 \uB2E8\uC5B4\uB97C \uD3EC\uD568\uD558\uC5EC \uD56D\uC0C1 \uD3B8\uC9D1\uAE30 \uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uAC80\uC0C9 \uBB38\uC790\uC5F4\uC744 \uC2DC\uB4DC\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C\uB9CC \uAC80\uC0C9 \uBB38\uC790\uC5F4\uC744 \uC2DC\uB4DC\uD558\uC138\uC694.","\uD3B8\uC9D1\uAE30 \uC120\uD0DD\uC5D0\uC11C Find Widget\uC758 \uAC80\uC0C9 \uBB38\uC790\uC5F4\uC744 \uC2DC\uB529\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uCC3E\uAE30\uB97C \uC790\uB3D9\uC73C\uB85C \uCF1C\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4(\uAE30\uBCF8\uAC12).","\uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uCC3E\uAE30\uB97C \uD56D\uC0C1 \uC790\uB3D9\uC73C\uB85C \uCF2D\uB2C8\uB2E4.","\uC5EC\uB7EC \uC904\uC758 \uCF58\uD150\uCE20\uB97C \uC120\uD0DD\uD558\uBA74 \uC120\uD0DD \uD56D\uBAA9\uC5D0\uC11C \uCC3E\uAE30\uAC00 \uC790\uB3D9\uC73C\uB85C \uCF1C\uC9D1\uB2C8\uB2E4.","\uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uCC3E\uAE30\uB97C \uC790\uB3D9\uC73C\uB85C \uC124\uC815\uD558\uB294 \uC870\uAC74\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","macOS\uC5D0\uC11C Find Widget\uC774 \uACF5\uC720 \uD074\uB9BD\uBCF4\uB4DC \uCC3E\uAE30\uB97C \uC77D\uC744\uC9C0 \uC218\uC815\uD560\uC9C0 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC704\uC82F \uCC3E\uAE30\uC5D0\uC11C \uD3B8\uC9D1\uAE30 \uB9E8 \uC704\uC5D0 \uC904\uC744 \uCD94\uAC00\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. true\uC778 \uACBD\uC6B0 \uC704\uC82F \uCC3E\uAE30\uAC00 \uD45C\uC2DC\uB418\uBA74 \uCCAB \uBC88\uC9F8 \uC904 \uC704\uB85C \uC2A4\uD06C\uB864\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uB354 \uC774\uC0C1 \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC744 \uB54C \uAC80\uC0C9\uC744 \uCC98\uC74C\uC774\uB098 \uB05D\uC5D0\uC11C \uC790\uB3D9\uC73C\uB85C \uB2E4\uC2DC \uC2DC\uC791\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAE00\uAF34 \uD569\uC790('calt' \uBC0F 'liga' \uAE00\uAF34 \uAE30\uB2A5)\uB97C \uC0AC\uC6A9\uD558\uAC70\uB098 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4. 'font-feature-settings' CSS \uC18D\uC131\uC758 \uC138\uBD84\uD654\uB41C \uC81C\uC5B4\uB97C \uC704\uD574 \uBB38\uC790\uC5F4\uB85C \uBCC0\uACBD\uD569\uB2C8\uB2E4.","\uBA85\uC2DC\uC801 'font-feature-settings' CSS \uC18D\uC131\uC785\uB2C8\uB2E4. \uD569\uC790\uB97C \uCF1C\uAC70\uB098 \uAEBC\uC57C \uD558\uB294 \uACBD\uC6B0\uC5D0\uB9CC \uBD80\uC6B8\uC744 \uB300\uC2E0 \uC804\uB2EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uAE00\uAF34 \uD569\uC790 \uB610\uB294 \uAE00\uAF34 \uAE30\uB2A5\uC744 \uAD6C\uC131\uD569\uB2C8\uB2E4. CSS 'font-feature-settings' \uC18D\uC131\uC758 \uAC12\uC5D0 \uB300\uD574 \uD569\uC790 \uB610\uB294 \uBB38\uC790\uC5F4\uC744 \uC0AC\uC6A9\uD558\uAC70\uB098 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB3C4\uB85D \uC124\uC815\uD558\uAE30 \uC704\uD55C \uBD80\uC6B8\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.","font-weight\uC5D0\uC11C font-variation-settings\uB85C \uBCC0\uD658\uC744 \uC0AC\uC6A9/\uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. 'font-variation-settings' CSS \uC18D\uC131\uC758 \uC138\uBD84\uD654\uB41C \uCEE8\uD2B8\uB864\uC744 \uC704\uD574 \uC774\uB97C \uBB38\uC790\uC5F4\uB85C \uBCC0\uACBD\uD569\uB2C8\uB2E4.","\uBA85\uC2DC\uC801 'font-variation-settings' CSS \uC18D\uC131\uC785\uB2C8\uB2E4. font-weight\uB9CC font-variation-settings\uB85C \uBCC0\uD658\uD574\uC57C \uD558\uB294 \uACBD\uC6B0 \uBD80\uC6B8\uC744 \uB300\uC2E0 \uC804\uB2EC\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uAE00\uAF34 \uBCC0\uD615\uC744 \uAD6C\uC131\uD569\uB2C8\uB2E4. font-weight\uC5D0\uC11C font-variation-settings\uB85C \uBCC0\uD658\uC744 \uC0AC\uC6A9/\uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB3C4\uB85D \uC124\uC815\uD558\uB294 \uBD80\uC6B8\uC774\uAC70\uB098 CSS 'font-variation-settings' \uC18D\uC131 \uAC12\uC5D0 \uB300\uD55C \uBB38\uC790\uC5F4\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uAE00\uAF34 \uD06C\uAE30(\uD53D\uC140)\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.",'"\uD45C\uC900" \uBC0F "\uAD75\uAC8C" \uD0A4\uC6CC\uB4DC \uB610\uB294 1~1000 \uC0AC\uC774\uC758 \uC22B\uC790\uB9CC \uD5C8\uC6A9\uB429\uB2C8\uB2E4.','\uAE00\uAF34 \uB450\uAED8\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. "\uD45C\uC900" \uBC0F "\uAD75\uAC8C" \uD0A4\uC6CC\uB4DC \uB610\uB294 1~1000 \uC0AC\uC774\uC758 \uC22B\uC790\uB97C \uD5C8\uC6A9\uD569\uB2C8\uB2E4.',"\uACB0\uACFC\uC758 Peek \uBCF4\uAE30 \uD45C\uC2DC(\uAE30\uBCF8\uAC12)","\uAE30\uBCF8 \uACB0\uACFC\uB85C \uC774\uB3D9\uD558\uC5EC Peek \uBCF4\uAE30\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uAE30\uBCF8 \uACB0\uACFC\uB85C \uC774\uB3D9\uD558\uC5EC \uB2E4\uB978 \uD56D\uBAA9\uC5D0 \uB300\uD574 Peek \uC5C6\uB294 \uD0D0\uC0C9\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uC774 \uC124\uC815\uC740 \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 'editor.editor.gotoLocation.multipleDefinitions' \uB610\uB294 'editor.editor.gotoLocation.multipleImplementations'\uC640 \uAC19\uC740 \uBCC4\uB3C4\uC758 \uC124\uC815\uC744 \uC0AC\uC6A9\uD558\uC138\uC694.","\uC5EC\uB7EC \uB300\uC0C1 \uC704\uCE58\uAC00 \uC788\uB294 \uACBD\uC6B0 '\uC815\uC758\uB85C \uC774\uB3D9' \uBA85\uB839 \uB3D9\uC791\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5EC\uB7EC \uB300\uC0C1 \uC704\uCE58\uAC00 \uC788\uB294 \uACBD\uC6B0 '\uC720\uD615 \uC815\uC758\uB85C \uC774\uB3D9' \uBA85\uB839 \uB3D9\uC791\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5EC\uB7EC \uB300\uC0C1 \uC704\uCE58\uAC00 \uC788\uB294 \uACBD\uC6B0 'Go to Declaration' \uBA85\uB839 \uB3D9\uC791\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5EC\uB7EC \uB300\uC0C1 \uC704\uCE58\uAC00 \uC788\uB294 \uACBD\uC6B0 '\uAD6C\uD604\uC73C\uB85C \uC774\uB3D9' \uBA85\uB839 \uB3D9\uC791\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5EC\uB7EC \uB300\uC0C1 \uC704\uCE58\uAC00 \uC788\uB294 \uACBD\uC6B0 '\uCC38\uC870\uB85C \uC774\uB3D9' \uBA85\uB839 \uB3D9\uC791\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","'\uC815\uC758\uB85C \uC774\uB3D9'\uC758 \uACB0\uACFC\uAC00 \uD604\uC7AC \uC704\uCE58\uC77C \uB54C \uC2E4\uD589\uB418\uB294 \uB300\uCCB4 \uBA85\uB839 ID\uC785\uB2C8\uB2E4.","'\uD615\uC2DD \uC815\uC758\uB85C \uC774\uB3D9'\uC758 \uACB0\uACFC\uAC00 \uD604\uC7AC \uC704\uCE58\uC77C \uB54C \uC2E4\uD589\uB418\uB294 \uB300\uCCB4 \uBA85\uB839 ID\uC785\uB2C8\uB2E4.","'\uC120\uC5B8\uC73C\uB85C \uC774\uB3D9'\uC758 \uACB0\uACFC\uAC00 \uD604\uC7AC \uC704\uCE58\uC77C \uB54C \uC2E4\uD589\uB418\uB294 \uB300\uCCB4 \uBA85\uB839 ID\uC785\uB2C8\uB2E4.","'\uAD6C\uD604\uC73C\uB85C \uC774\uB3D9'\uC758 \uACB0\uACFC\uAC00 \uD604\uC7AC \uC704\uCE58\uC77C \uB54C \uC2E4\uD589\uB418\uB294 \uB300\uCCB4 \uBA85\uB839 ID\uC785\uB2C8\uB2E4.","'\uCC38\uC870\uB85C \uC774\uB3D9'\uC758 \uACB0\uACFC\uAC00 \uD604\uC7AC \uC704\uCE58\uC77C \uB54C \uC2E4\uD589\uB418\uB294 \uB300\uCCB4 \uBA85\uB839 ID\uC785\uB2C8\uB2E4.","\uD638\uBC84 \uD45C\uC2DC \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD638\uBC84\uAC00 \uD45C\uC2DC\uB418\uAE30 \uC804\uAE4C\uC9C0\uC758 \uC9C0\uC5F0 \uC2DC\uAC04(\uBC00\uB9AC\uCD08)\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB97C \uD574\uB2F9 \uD56D\uBAA9 \uC704\uB85C \uC774\uB3D9\uD560 \uB54C \uD638\uBC84\uB97C \uACC4\uC18D \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAC00\uB9AC\uD0A4\uAE30\uAC00 \uC228\uACA8\uC9C0\uB294 \uC9C0\uC5F0 \uC2DC\uAC04(\uBC00\uB9AC\uCD08)\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4. 'editor.hover.sticky'\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uACF5\uBC31\uC774 \uC788\uB294 \uACBD\uC6B0 \uC120 \uC704\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uAC00\uC838\uAC00\uB294 \uAC83\uC744 \uD45C\uC2DC\uD558\uB294 \uAC83\uC744 \uC120\uD638\uD569\uB2C8\uB2E4.","\uBAA8\uB4E0 \uBB38\uC790\uAC00 \uB3D9\uC77C\uD55C \uB108\uBE44\uB77C\uACE0 \uAC00\uC815\uD569\uB2C8\uB2E4. \uC774 \uC54C\uACE0\uB9AC\uC998\uC740 \uACE0\uC815 \uD3ED \uAE00\uAF34\uACFC \uBB38\uC790 \uBAA8\uC591\uC758 \uB108\uBE44\uAC00 \uAC19\uC740 \uD2B9\uC815 \uC2A4\uD06C\uB9BD\uD2B8(\uC608: \uB77C\uD2F4 \uBB38\uC790)\uC5D0 \uC801\uC808\uD788 \uC791\uB3D9\uD558\uB294 \uBE60\uB978 \uC54C\uACE0\uB9AC\uC998\uC785\uB2C8\uB2E4.","\uB798\uD551 \uC810 \uACC4\uC0B0\uC744 \uBE0C\uB77C\uC6B0\uC800\uC5D0 \uC704\uC784\uD569\uB2C8\uB2E4. \uC774 \uC54C\uACE0\uB9AC\uC998\uC740 \uB9E4\uC6B0 \uB290\uB824\uC11C \uB300\uC6A9\uB7C9 \uD30C\uC77C\uC758 \uACBD\uC6B0 \uC911\uB2E8\uB420 \uC218 \uC788\uC9C0\uB9CC \uBAA8\uB4E0 \uACBD\uC6B0\uC5D0 \uC801\uC808\uD788 \uC791\uB3D9\uD569\uB2C8\uB2E4.","\uB798\uD551 \uC9C0\uC810\uC744 \uACC4\uC0B0\uD558\uB294 \uC54C\uACE0\uB9AC\uC998\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC811\uADFC\uC131 \uBAA8\uB4DC\uC5D0\uC11C\uB294 \uCD5C\uC0C1\uC758 \uD658\uACBD\uC744 \uC704\uD574 \uACE0\uAE09 \uAE30\uB2A5\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uCF54\uB4DC \uB3D9\uC791 \uC804\uAD6C\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC704\uCABD\uC5D0\uC11C \uC2A4\uD06C\uB864\uD558\uB294 \uB3D9\uC548 \uC911\uCCA9\uB41C \uD604\uC7AC \uBC94\uC704\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uD45C\uC2DC\uD560 \uCD5C\uB300 \uACE0\uC815 \uC120 \uC218\uB97C \uC815\uC758\uD569\uB2C8\uB2E4.","\uACE0\uC815\uD560 \uC904\uC744 \uACB0\uC815\uD558\uB294 \uB370 \uC0AC\uC6A9\uD560 \uBAA8\uB378\uC744 \uC815\uC758\uD569\uB2C8\uB2E4. \uAC1C\uC694 \uBAA8\uB378\uC774 \uC5C6\uC73C\uBA74 \uB4E4\uC5EC\uC4F0\uAE30 \uBAA8\uB378\uC5D0 \uD574\uB2F9\uD558\uB294 \uC811\uAE30 \uACF5\uAE09\uC790 \uBAA8\uB378\uC5D0\uC11C \uB300\uCCB4\uB429\uB2C8\uB2E4. \uC774 \uC21C\uC11C\uB294 \uC138 \uAC00\uC9C0 \uACBD\uC6B0 \uBAA8\uB450 \uC801\uC6A9\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC758 \uAC00\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uB97C \uC0AC\uC6A9\uD558\uC5EC \uACE0\uC815 \uC2A4\uD06C\uB864 \uC704\uC82F\uC758 \uC2A4\uD06C\uB864\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC778\uB808\uC774 \uD78C\uD2B8\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uC778\uB808\uC774 \uD78C\uD2B8\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC74C","\uC778\uB808\uC774 \uD78C\uD2B8\uB294 \uAE30\uBCF8\uC801\uC73C\uB85C \uD45C\uC2DC\uB418\uACE0 {0}\uC744(\uB97C) \uAE38\uAC8C \uB204\uB97C \uB54C \uC228\uACA8\uC9D1\uB2C8\uB2E4.","\uC778\uB808\uC774 \uD78C\uD2B8\uB294 \uAE30\uBCF8\uAC12\uC73C\uB85C \uC228\uACA8\uC838 \uC788\uC73C\uBA70 {0}\uC744(\uB97C) \uAE38\uAC8C \uB204\uB974\uBA74 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC778\uB808\uC774 \uD78C\uD2B8\uB294 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC778\uB808\uC774 \uD78C\uD2B8\uC758 \uAE00\uAF34 \uD06C\uAE30\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uAE30\uBCF8\uC801\uC73C\uB85C {0}\uC740(\uB294) \uAD6C\uC131\uB41C \uAC12\uC774 {1}\uBCF4\uB2E4 \uC791\uAC70\uB098 \uD3B8\uC9D1\uAE30 \uAE00\uAF34 \uD06C\uAE30\uBCF4\uB2E4 \uD070 \uACBD\uC6B0\uC5D0 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC778\uB808\uC774 \uD78C\uD2B8\uC758 \uAE00\uAF34 \uD328\uBC00\uB9AC\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uBE44\uC6CC \uB450\uBA74 {0}\uC774(\uAC00) \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC778\uB808\uC774 \uD78C\uD2B8 \uC8FC\uC704\uC758 \uD328\uB529\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.",`\uC120 \uB192\uC774\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \r - - 0\uC744 \uC0AC\uC6A9\uD558\uC5EC \uAE00\uAF34 \uD06C\uAE30\uC5D0\uC11C \uC904 \uB192\uC774\uB97C \uC790\uB3D9\uC73C\uB85C \uACC4\uC0B0\uD569\uB2C8\uB2E4.\r - - 0\uC5D0\uC11C 8 \uC0AC\uC774\uC758 \uAC12\uC740 \uAE00\uAF34 \uD06C\uAE30\uC758 \uC2B9\uC218\uB85C \uC0AC\uC6A9\uB429\uB2C8\uB2E4.\r - - 8\uBCF4\uB2E4 \uD06C\uAC70\uB098 \uAC19\uC740 \uAC12\uC774 \uC720\uD6A8 \uAC12\uC73C\uB85C \uC0AC\uC6A9\uB429\uB2C8\uB2E4.`,"\uBBF8\uB2C8\uB9F5 \uD45C\uC2DC \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBBF8\uB2C8\uB9F5\uC744 \uC790\uB3D9\uC73C\uB85C \uC228\uAE38\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBBF8\uB2C8\uB9F5\uC758 \uD06C\uAE30\uB294 \uD3B8\uC9D1\uAE30 \uB0B4\uC6A9\uACFC \uB3D9\uC77C\uD558\uBA70 \uC2A4\uD06C\uB864\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC758 \uB192\uC774\uB97C \uB9DE\uCD94\uAE30 \uC704\uD574 \uD544\uC694\uC5D0 \uB530\uB77C \uBBF8\uB2C8\uB9F5\uC774 \uD655\uC7A5\uB418\uAC70\uB098 \uCD95\uC18C\uB429\uB2C8\uB2E4(\uC2A4\uD06C\uB864 \uC5C6\uC74C).","\uBBF8\uB2C8\uB9F5\uC744 \uD3B8\uC9D1\uAE30\uBCF4\uB2E4 \uC791\uAC8C \uC720\uC9C0\uD560 \uC218 \uC788\uB3C4\uB85D \uD544\uC694\uC5D0 \uB530\uB77C \uBBF8\uB2C8\uB9F5\uC774 \uCD95\uC18C\uB429\uB2C8\uB2E4(\uC2A4\uD06C\uB864 \uC5C6\uC74C).","\uBBF8\uB2C8\uB9F5\uC758 \uD06C\uAE30\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBBF8\uB2C8\uB9F5\uC744 \uB80C\uB354\uB9C1\uD560 \uCE21\uBA74\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBBF8\uB2C8\uB9F5 \uC2AC\uB77C\uC774\uB354\uAC00 \uD45C\uC2DC\uB418\uB294 \uC2DC\uAE30\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBBF8\uB2C8\uB9F5\uC5D0 \uADF8\uB824\uC9C4 \uCF58\uD150\uCE20\uC758 \uBC30\uC728: 1, 2 \uB610\uB294 3.","\uC904\uC758 \uC2E4\uC81C \uBB38\uC790(\uC0C9 \uBE14\uB85D \uC544\uB2D8)\uB97C \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4.","\uCD5C\uB300 \uD2B9\uC815 \uC218\uC758 \uC5F4\uC744 \uB80C\uB354\uB9C1\uD558\uB3C4\uB85D \uBBF8\uB2C8\uB9F5\uC758 \uB108\uBE44\uB97C \uC81C\uD55C\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC758 \uC704\uCABD \uAC00\uC7A5\uC790\uB9AC\uC640 \uCCAB \uBC88\uC9F8 \uC904 \uC0AC\uC774\uC758 \uACF5\uBC31\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC758 \uC544\uB798\uCABD \uAC00\uC7A5\uC790\uB9AC\uC640 \uB9C8\uC9C0\uB9C9 \uC904 \uC0AC\uC774\uC758 \uACF5\uBC31\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC785\uB825\uACFC \uB3D9\uC2DC\uC5D0 \uB9E4\uAC1C\uBCC0\uC218 \uBB38\uC11C\uC640 \uC720\uD615 \uC815\uBCF4\uB97C \uD45C\uC2DC\uD558\uB294 \uD31D\uC5C5\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uB9E4\uAC1C\uBCC0\uC218 \uD78C\uD2B8 \uBA54\uB274\uC758 \uC8FC\uAE30 \uD639\uC740 \uBAA9\uB85D\uC758 \uB05D\uC5D0 \uB3C4\uB2EC\uD558\uC600\uC744\uB54C \uC885\uB8CC\uD560 \uAC83\uC778\uC9C0 \uC5EC\uBD80\uB97C \uACB0\uC815\uD569\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F \uB0B4\uBD80\uC5D0 \uBE60\uB978 \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uBE60\uB978 \uC81C\uC548\uC774 \uC720\uB839 \uD14D\uC2A4\uD2B8\uB85C \uD45C\uC2DC\uB428","\uBE60\uB978 \uC81C\uC548\uC774 \uC0AC\uC6A9 \uC911\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4.","\uBB38\uC790\uC5F4 \uB0B4\uC5D0\uC11C \uBE60\uB978 \uC81C\uC548\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uC8FC\uC11D \uB0B4\uC5D0\uC11C \uBE60\uB978 \uC81C\uC548\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uBB38\uC790\uC5F4 \uBC0F \uC8FC\uC11D \uC678\uBD80\uC5D0\uC11C \uBE60\uB978 \uC81C\uC548\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uC785\uB825\uD558\uB294 \uB3D9\uC548 \uC81C\uC548\uC744 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC8FC\uC11D, \uBB38\uC790\uC5F4 \uBC0F \uAE30\uD0C0 \uCF54\uB4DC\uB97C \uC785\uB825\uD558\uAE30 \uC704\uD574 \uC81C\uC5B4\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBE60\uB978 \uC81C\uC548\uC740 \uACE0\uC2A4\uD2B8 \uD14D\uC2A4\uD2B8 \uB610\uB294 \uC81C\uC548 \uC704\uC82F\uC73C\uB85C \uD45C\uC2DC\uD558\uB3C4\uB85D \uAD6C\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB610\uD55C \uC81C\uC548\uC774 \uD2B9\uC218 \uBB38\uC790\uC5D0 \uC758\uD574 \uC2E4\uD589\uB418\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD558\uB294 '{0}'-\uC124\uC815\uC5D0 \uC720\uC758\uD558\uC138\uC694.","\uC904 \uBC88\uD638\uB294 \uB80C\uB354\uB9C1\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC904 \uBC88\uD638\uB294 \uC808\uB300\uAC12\uC73C\uB85C \uB80C\uB354\uB9C1 \uB429\uB2C8\uB2E4.","\uC904 \uBC88\uD638\uB294 \uCEE4\uC11C \uC704\uCE58\uC5D0\uC11C \uC904 \uAC04\uACA9 \uAC70\uB9AC\uB85C \uB80C\uB354\uB9C1 \uB429\uB2C8\uB2E4.","\uC904 \uBC88\uD638\uB294 \uB9E4 10 \uC904\uB9C8\uB2E4 \uB80C\uB354\uB9C1\uC774 \uC774\uB8E8\uC5B4\uC9D1\uB2C8\uB2E4.","\uC904 \uBC88\uD638\uC758 \uD45C\uC2DC \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC774 \uD3B8\uC9D1\uAE30 \uB208\uAE08\uC790\uC5D0\uC11C \uB80C\uB354\uB9C1\uD560 \uACE0\uC815 \uD3ED \uBB38\uC790 \uC218\uC785\uB2C8\uB2E4.","\uC774 \uD3B8\uC9D1\uAE30 \uB208\uAE08\uC790\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uD2B9\uC815 \uC218\uC758 \uACE0\uC815 \uD3ED \uBB38\uC790 \uB4A4\uC5D0 \uC138\uB85C \uB208\uAE08\uC790\uB97C \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4. \uC5EC\uB7EC \uB208\uAE08\uC790\uC758 \uACBD\uC6B0 \uC5EC\uB7EC \uAC12\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uBC30\uC5F4\uC774 \uBE44\uC5B4 \uC788\uB294 \uACBD\uC6B0 \uB208\uAE08\uC790\uAC00 \uADF8\uB824\uC9C0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC138\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uB294 \uD544\uC694\uD55C \uACBD\uC6B0\uC5D0\uB9CC \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC138\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uAC00 \uD56D\uC0C1 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC138\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uB97C \uD56D\uC0C1 \uC228\uAE41\uB2C8\uB2E4.","\uC138\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uC758 \uD45C\uC2DC \uC720\uD615\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAC00\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uB294 \uD544\uC694\uD55C \uACBD\uC6B0\uC5D0\uB9CC \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uAC00\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uAC00 \uD56D\uC0C1 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uAC00\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uB97C \uD56D\uC0C1 \uC228\uAE41\uB2C8\uB2E4.","\uAC00\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uC758 \uD45C\uC2DC \uC720\uD615\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC138\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uC758 \uB108\uBE44\uC785\uB2C8\uB2E4.","\uAC00\uB85C \uC2A4\uD06C\uB864 \uB9C9\uB300\uC758 \uB192\uC774\uC785\uB2C8\uB2E4.","\uD074\uB9AD\uC774 \uD398\uC774\uC9C0\uBCC4\uB85C \uC2A4\uD06C\uB864\uB418\uB294\uC9C0 \uB610\uB294 \uD074\uB9AD \uC704\uCE58\uB85C \uC774\uB3D9\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAE30\uBCF8\uC774 \uC544\uB2CC \uBAA8\uB4E0 ASCII \uBB38\uC790\uB97C \uAC15\uC870 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. U+0020\uACFC U+007E \uC0AC\uC774\uC758 \uBB38\uC790, \uD0ED, \uC904 \uBC14\uAFC8 \uBC0F \uCE90\uB9AC\uC9C0 \uB9AC\uD134\uB9CC \uAE30\uBCF8 ASCII\uB85C \uAC04\uC8FC\uB429\uB2C8\uB2E4.","\uACF5\uBC31\uB9CC \uC608\uC57D\uD558\uAC70\uB098 \uB108\uBE44\uAC00 \uC804\uD600 \uC5C6\uB294 \uBB38\uC790\uB97C \uAC15\uC870 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD604\uC7AC \uC0AC\uC6A9\uC790 \uB85C\uCE98\uC5D0\uC11C \uACF5\uD1B5\uB418\uB294 \uBB38\uC790\uB97C \uC81C\uC678\uD55C \uAE30\uBCF8 ASCII \uBB38\uC790\uC640 \uD63C\uB3D9\uD560 \uC218 \uC788\uB294 \uBB38\uC790\uB97C \uAC15\uC870 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC8FC\uC11D\uC758 \uBB38\uC790\uC5D0\uB3C4 \uC720\uB2C8\uCF54\uB4DC \uAC15\uC870 \uD45C\uC2DC\uB97C \uC801\uC6A9\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBB38\uC790\uC5F4\uC758 \uBB38\uC790\uC5D0\uB3C4 \uC720\uB2C8\uCF54\uB4DC \uAC15\uC870 \uD45C\uC2DC\uB97C \uC801\uC6A9\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAC15\uC870 \uD45C\uC2DC\uB418\uC9C0 \uC54A\uB294 \uD5C8\uC6A9\uB41C \uBB38\uC790\uB97C \uC815\uC758\uD569\uB2C8\uB2E4.","\uD5C8\uC6A9\uB41C \uB85C\uCE98\uC5D0\uC11C \uACF5\uD1B5\uC801\uC778 \uC720\uB2C8\uCF54\uB4DC \uBB38\uC790\uB294 \uAC15\uC870 \uD45C\uC2DC\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC778\uB77C\uC778 \uC81C\uC548\uC744 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uCD94\uCC9C\uC744 \uD45C\uC2DC\uD790 \uB54C\uB9C8\uB2E4 \uC778\uB77C\uC778 \uCD94\uCC9C \uB3C4\uAD6C \uBAA8\uC74C\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uCD94\uCC9C\uC744 \uB9C8\uC6B0\uC2A4\uB85C \uAC00\uB9AC\uD0A4\uBA74 \uC778\uB77C\uC778 \uCD94\uCC9C \uB3C4\uAD6C \uBAA8\uC74C\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uCD94\uCC9C \uB3C4\uAD6C \uBAA8\uC74C\uC744 \uD45C\uC2DC\uD560 \uC2DC\uAE30\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uC81C\uC548\uC774 \uC81C\uC548 \uC704\uC82F\uACFC \uC0C1\uD638 \uC791\uC6A9\uD558\uB294 \uBC29\uBC95\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uBA74 \uC778\uB77C\uC778 \uC81C\uC548\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC788\uC744 \uB54C \uC81C\uC548 \uC704\uC82F\uC774 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. {0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC5EC \uB300\uAD04\uD638 \uAC15\uC870 \uC0C9\uC744 \uC7AC\uC815\uC758\uD569\uB2C8\uB2E4.","\uAC01 \uB300\uAD04\uD638 \uD615\uC2DD\uC5D0 \uACE0\uC720\uD55C \uB3C5\uB9BD\uC801\uC778 \uC0C9 \uD480\uC774 \uC788\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638 \uC30D \uAC00\uC774\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D\uC5D0 \uB300\uD574\uC11C\uB9CC \uB300\uAD04\uD638 \uC30D \uAC00\uC774\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638 \uC30D \uAC00\uC774\uB4DC\uB97C \uBE44\uD65C\uC131\uD654\uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uC0AC\uC6A9 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC218\uC9C1 \uB300\uAD04\uD638 \uC30D \uAC00\uC774\uB4DC\uC5D0 \uCD94\uAC00\uD558\uC5EC \uC218\uD3C9 \uAC00\uC774\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D\uC5D0 \uB300\uD574\uC11C\uB9CC \uC218\uD3C9 \uAC00\uC774\uB4DC\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uC218\uD3C9 \uB300\uAD04\uD638 \uC30D \uAC00\uC774\uB4DC\uB97C \uBE44\uD65C\uC131\uD654\uD569\uB2C8\uB2E4.","\uAC00\uB85C \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uC0AC\uC6A9 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uAC00 \uD65C\uC131 \uBE0C\uB798\uD0B7 \uC30D\uC744 \uAC15\uC870 \uD45C\uC2DC\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB4E4\uC5EC\uC4F0\uAE30 \uAC00\uC774\uB4DC\uB97C \uB80C\uB354\uB9C1\uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120\uC744 \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uBE0C\uB798\uD0B7 \uC548\uB0B4\uC120\uC774 \uAC15\uC870 \uD45C\uC2DC\uB41C \uACBD\uC6B0\uC5D0\uB3C4 \uD65C\uC131 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120\uC744 \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120\uC744 \uAC15\uC870 \uD45C\uC2DC\uD558\uC9C0 \uB9C8\uC138\uC694.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD65C\uC131 \uB4E4\uC5EC\uC4F0\uAE30 \uAC00\uC774\uB4DC\uB97C \uAC15\uC870 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uCEE4\uC11C\uC758 \uD14D\uC2A4\uD2B8 \uC624\uB978\uCABD\uC744 \uB36E\uC5B4 \uC4F0\uC9C0\uC54A\uACE0 \uC81C\uC548\uC744 \uC0BD\uC785\uD569\uB2C8\uB2E4.","\uC81C\uC548\uC744 \uC0BD\uC785\uD558\uACE0 \uCEE4\uC11C\uC758 \uC624\uB978\uCABD \uD14D\uC2A4\uD2B8\uB97C \uB36E\uC5B4\uC501\uB2C8\uB2E4.","\uC644\uB8CC\uB97C \uC218\uB77D\uD560 \uB54C \uB2E8\uC5B4\uB97C \uB36E\uC5B4\uC4F8\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC774\uAC83\uC740 \uC774 \uAE30\uB2A5\uC744 \uC120\uD0DD\uD558\uB294 \uD655\uC7A5\uC5D0 \uB530\uB77C \uB2E4\uB985\uB2C8\uB2E4.","\uC81C\uC548 \uD544\uD130\uB9C1 \uBC0F \uC815\uB82C\uC5D0\uC11C \uC791\uC740 \uC624\uD0C0\uB97C \uC124\uBA85\uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC815\uB82C\uD560 \uB54C \uCEE4\uC11C \uADFC\uCC98\uC5D0 \uD45C\uC2DC\uB418\uB294 \uB2E8\uC5B4\uB97C \uC6B0\uC120\uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC800\uC7A5\uB41C \uC81C\uC548 \uC0AC\uD56D \uC120\uD0DD \uD56D\uBAA9\uC744 \uC5EC\uB7EC \uC791\uC5C5 \uC601\uC5ED \uBC0F \uCC3D\uC5D0\uC11C \uACF5\uC720\uD560 \uAC83\uC778\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4(`#editor.suggestSelection#` \uD544\uC694).","IntelliSense\uB97C \uC790\uB3D9\uC73C\uB85C \uD2B8\uB9AC\uAC70\uD560 \uB54C \uD56D\uC0C1 \uC81C\uC548\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.","IntelliSense\uB97C \uC790\uB3D9\uC73C\uB85C \uD2B8\uB9AC\uAC70\uD560 \uB54C \uC81C\uC548\uC744 \uC120\uD0DD\uD558\uC9C0 \uB9C8\uC138\uC694.","\uD2B8\uB9AC\uAC70 \uBB38\uC790\uC5D0\uC11C IntelliSense\uB97C \uD2B8\uB9AC\uAC70\uD560 \uB54C\uB9CC \uC81C\uC548\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.","\uC785\uB825\uD560 \uB54C IntelliSense\uB97C \uD2B8\uB9AC\uAC70\uD560 \uB54C\uB9CC \uC81C\uC548\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.","\uC704\uC82F\uC774 \uD45C\uC2DC\uB420 \uB54C \uC81C\uC548\uC744 \uC120\uD0DD\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC774\uB294 \uC790\uB3D9\uC73C\uB85C \uD2B8\uB9AC\uAC70\uB41C \uC81C\uC548('#editor.quickSuggestions#' \uBC0F '#editor.suggestOnTriggerCharacters#')\uC5D0\uB9CC \uC801\uC6A9\uB418\uBA70, \uC81C\uC548\uC774 \uBA85\uC2DC\uC801\uC73C\uB85C \uD638\uCD9C\uB420 \uB54C \uD56D\uC0C1 \uC120\uD0DD\uB429\uB2C8\uB2E4(\uC608: 'Ctrl+Space'\uB97C \uD1B5\uD574).","\uD65C\uC131 \uCF54\uB4DC \uC870\uAC01\uC774 \uBE60\uB978 \uC81C\uC548\uC744 \uBC29\uC9C0\uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC81C\uC548\uC758 \uC544\uC774\uCF58\uC744 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F \uD558\uB2E8\uC758 \uC0C1\uD0DC \uD45C\uC2DC\uC904 \uAC00\uC2DC\uC131\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC81C\uC548 \uACB0\uACFC\uB97C \uBBF8\uB9AC\uBCFC\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC81C\uC548 \uC138\uBD80 \uC815\uBCF4\uAC00 \uB808\uC774\uBE14\uACFC \uD568\uAED8 \uC778\uB77C\uC778\uC5D0 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC544\uB2C8\uBA74 \uC138\uBD80 \uC815\uBCF4 \uC704\uC82F\uC5D0\uB9CC \uD45C\uC2DC\uB418\uB294\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC774 \uC124\uC815\uC740 \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC774\uC81C \uC81C\uC548 \uC704\uC82F\uC758 \uD06C\uAE30\uB97C \uC870\uC815\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC774 \uC124\uC815\uC740 \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 'editor.suggest.showKeywords'\uB610\uB294 'editor.suggest.showSnippets'\uC640 \uAC19\uC740 \uBCC4\uB3C4\uC758 \uC124\uC815\uC744 \uC0AC\uC6A9\uD558\uC138\uC694.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 `\uBA54\uC11C\uB4DC` \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uD568\uC218' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC0DD\uC131\uC790' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC74C' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","IntelliSense \uD544\uD130\uB9C1\uC744 \uD65C\uC131\uD654\uD558\uBA74 \uCCAB \uBC88\uC9F8 \uBB38\uC790\uAC00 \uB2E8\uC5B4 \uC2DC\uC791 \uBD80\uBD84\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4(\uC608: `c`\uC758 \uACBD\uC6B0 `Console` \uB610\uB294 `WebContext`\uAC00 \uB420 \uC218 \uC788\uC73C\uBA70 `description`\uC740 _\uC548 \uB428_). \uBE44\uD65C\uC131\uD654\uD558\uBA74 IntelliSense\uAC00 \uB354 \uB9CE\uC740 \uACB0\uACFC\uB97C \uD45C\uC2DC\uD558\uC9C0\uB9CC \uC5EC\uC804\uD788 \uC77C\uCE58 \uD488\uC9C8\uC744 \uAE30\uC900\uC73C\uB85C \uC815\uB82C\uD569\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uD544\uB4DC' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uBCC0\uC218' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uD074\uB798\uC2A4' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uAD6C\uC870' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC778\uD130\uD398\uC774\uC2A4' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uBAA8\uB4C8' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC18D\uC131' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC774\uBCA4\uD2B8' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 `\uC5F0\uC0B0\uC790` \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uB2E8\uC704' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uAC12' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC0C1\uC218' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC5F4\uAC70\uD615' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 `enumMember` \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uD0A4\uC6CC\uB4DC' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uD14D\uC2A4\uD2B8' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC0C9' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 `\uD30C\uC77C` \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uCC38\uC870' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uC0AC\uC6A9\uC790 \uC9C0\uC815 \uC0C9' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uD3F4\uB354' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB41C \uACBD\uC6B0 IntelliSense\uC5D0 'typeParameter' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uBA74 IntelliSense\uC5D0 '\uCF54\uB4DC \uC870\uAC01' \uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","IntelliSense\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD558\uBA74 `user`-\uC81C\uC548\uC774 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","IntelliSense\uB97C \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD55C \uACBD\uC6B0 `issues`-\uC81C\uC548\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC120\uD589 \uBC0F \uD6C4\uD589 \uACF5\uBC31\uC744 \uD56D\uC0C1 \uC120\uD0DD\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uC785\uB2C8\uB2E4.","\uD558\uC704 \uB2E8\uC5B4(\uC608: 'fooBar'\uC758 'foo' \uB610\uB294 'foo_bar')\uB97C \uC120\uD0DD\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uC785\uB2C8\uB2E4.","\uB4E4\uC5EC\uC4F0\uAE30\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC904 \uBC14\uAFC8 \uD589\uC774 \uC5F4 1\uC5D0\uC11C \uC2DC\uC791\uB429\uB2C8\uB2E4.","\uC904 \uBC14\uAFC8 \uD589\uC758 \uB4E4\uC5EC\uC4F0\uAE30\uAC00 \uBD80\uBAA8\uC640 \uB3D9\uC77C\uD569\uB2C8\uB2E4.","\uC904 \uBC14\uAFC8 \uD589\uC774 \uBD80\uBAA8 \uCABD\uC73C\uB85C +1\uB9CC\uD07C \uB4E4\uC5EC\uC4F0\uAE30\uB429\uB2C8\uB2E4.","\uC904 \uBC14\uAFC8 \uD589\uC774 \uBD80\uBAA8 \uCABD\uC73C\uB85C +2\uB9CC\uD07C \uB4E4\uC5EC\uC4F0\uAE30\uB429\uB2C8\uB2E4.","\uC904 \uBC14\uAFC8 \uD589\uC758 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD30C\uC77C\uC744 \uC5EC\uB294 \uB300\uC2E0 `shift`\uB97C \uB204\uB978 \uCC44 \uD30C\uC77C\uC744 \uD14D\uC2A4\uD2B8 \uD3B8\uC9D1\uAE30\uB85C \uB04C\uC5B4\uC11C \uB193\uC744 \uC218 \uC788\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0 \uD30C\uC77C\uC744 \uB04C\uC5B4 \uB193\uC744 \uB54C \uC704\uC82F\uC744 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC774 \uC704\uC82F\uC744 \uC0AC\uC6A9\uD558\uBA74 \uD30C\uC77C\uC744 \uB4DC\uB86D\uD558\uB294 \uBC29\uBC95\uC744 \uC81C\uC5B4\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uD30C\uC77C\uC774 \uD3B8\uC9D1\uAE30\uC5D0 \uB4DC\uB86D\uB41C \uD6C4 \uB4DC\uB86D \uC120\uD0DD\uAE30 \uC704\uC82F\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uB4DC\uB86D \uC120\uD0DD\uAE30 \uC704\uC82F\uC744 \uD45C\uC2DC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 \uAE30\uBCF8 \uB4DC\uB86D \uACF5\uAE09\uC790\uAC00 \uD56D\uC0C1 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uCF58\uD150\uCE20\uB97C \uB2E4\uB978 \uBC29\uBC95\uC73C\uB85C \uBD99\uC5EC\uB123\uC744 \uC218 \uC788\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uCF58\uD150\uCE20\uB97C \uD3B8\uC9D1\uAE30\uC5D0 \uBD99\uC5EC\uB123\uC744 \uB54C \uC704\uC82F\uC744 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC774 \uC704\uC82F\uC744 \uC0AC\uC6A9\uD558\uC5EC \uD30C\uC77C\uC744 \uBD99\uC5EC\uB123\uB294 \uBC29\uBC95\uC744 \uC81C\uC5B4\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uCF58\uD150\uCE20\uB97C \uD3B8\uC9D1\uAE30\uC5D0 \uBD99\uC5EC\uB123\uC740 \uD6C4 \uBD99\uC5EC\uB123\uAE30 \uC120\uD0DD\uAE30 \uC704\uC82F\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uBD99\uC5EC\uB123\uAE30 \uC120\uD0DD\uAE30 \uC704\uC82F\uC744 \uD45C\uC2DC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 \uAE30\uBCF8 \uBD99\uC5EC\uB123\uAE30 \uB3D9\uC791\uC774 \uD56D\uC0C1 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uCEE4\uBC0B \uBB38\uC790\uC5D0 \uB300\uD55C \uC81C\uC548\uC744 \uD5C8\uC6A9\uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4 JavaScript\uC5D0\uC11C\uB294 \uC138\uBBF8\uCF5C\uB860(';')\uC774 \uC81C\uC548\uC744 \uD5C8\uC6A9\uD558\uACE0 \uD574\uB2F9 \uBB38\uC790\uB97C \uC785\uB825\uD558\uB294 \uCEE4\uBC0B \uBB38\uC790\uC77C \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uD14D\uC2A4\uD2B8\uB97C \uBCC0\uACBD\uD560 \uB54C `Enter` \uD0A4\uB97C \uC0AC\uC6A9\uD55C \uC81C\uC548\uB9CC \uD5C8\uC6A9\uD569\uB2C8\uB2E4.","'Tab' \uD0A4 \uC678\uC5D0 'Enter' \uD0A4\uC5D0 \uB300\uD55C \uC81C\uC548\uB3C4 \uD5C8\uC6A9\uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC0C8 \uC904\uC744 \uC0BD\uC785\uD558\uB294 \uB3D9\uC791\uACFC \uC81C\uC548\uC744 \uD5C8\uC6A9\uD558\uB294 \uB3D9\uC791 \uAC04\uC758 \uBAA8\uD638\uD568\uC744 \uC5C6\uC568 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uD55C \uBC88\uC5D0 \uC77D\uC744 \uC218 \uC788\uB294 \uD3B8\uC9D1\uAE30 \uC904 \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC744 \uAC80\uC0C9\uD558\uBA74 \uAE30\uBCF8\uAC12\uC774 500\uC73C\uB85C \uC790\uB3D9 \uC124\uC815\uB429\uB2C8\uB2E4. \uACBD\uACE0: \uAE30\uBCF8\uAC12\uBCF4\uB2E4 \uD070 \uC218\uC758 \uACBD\uC6B0 \uC131\uB2A5\uC5D0 \uC601\uD5A5\uC744 \uBBF8\uCE69\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCF58\uD150\uCE20","\uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8\uC5D0\uC11C \uC778\uB77C\uC778 \uC81C\uC548\uC744 \uBC1C\uD45C\uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5B8\uC5B4 \uAD6C\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB300\uAD04\uD638\uB97C \uC790\uB3D9\uC73C\uB85C \uB2EB\uC744 \uACBD\uC6B0\uB97C \uACB0\uC815\uD569\uB2C8\uB2E4.","\uCEE4\uC11C\uAC00 \uACF5\uBC31\uC758 \uC67C\uCABD\uC5D0 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC \uB300\uAD04\uD638\uB97C \uC790\uB3D9\uC73C\uB85C \uB2EB\uC2B5\uB2C8\uB2E4.","\uC0AC\uC6A9\uC790\uAC00 \uC5EC\uB294 \uAD04\uD638\uB97C \uCD94\uAC00\uD55C \uD6C4 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uAD04\uD638\uB97C \uC790\uB3D9\uC73C\uB85C \uB2EB\uC744\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5B8\uC5B4 \uAD6C\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC8FC\uC11D\uC744 \uC790\uB3D9\uC73C\uB85C \uB2EB\uC744 \uACBD\uC6B0\uB97C \uACB0\uC815\uD569\uB2C8\uB2E4.","\uCEE4\uC11C\uAC00 \uACF5\uBC31\uC758 \uC67C\uCABD\uC5D0 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC \uC8FC\uC11D\uC744 \uC790\uB3D9\uC73C\uB85C \uB2EB\uC2B5\uB2C8\uB2E4.","\uC0AC\uC6A9\uC790\uAC00 \uC5EC\uB294 \uC8FC\uC11D\uC744 \uCD94\uAC00\uD55C \uD6C4 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC8FC\uC11D\uC744 \uC790\uB3D9\uC73C\uB85C \uB2EB\uC744\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC778\uC811\uD55C \uB2EB\uB294 \uB530\uC634\uD45C \uB610\uB294 \uB300\uAD04\uD638\uAC00 \uC790\uB3D9\uC73C\uB85C \uC0BD\uC785\uB41C \uACBD\uC6B0\uC5D0\uB9CC \uC81C\uAC70\uD569\uB2C8\uB2E4.","\uC0AD\uC81C\uD560 \uB54C \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC778\uC811\uD55C \uB2EB\uB294 \uB530\uC634\uD45C \uB610\uB294 \uB300\uAD04\uD638\uB97C \uC81C\uAC70\uD574\uC57C \uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB2EB\uAE30 \uB530\uC634\uD45C \uB610\uB294 \uB300\uAD04\uD638\uAC00 \uC790\uB3D9\uC73C\uB85C \uC0BD\uC785\uB41C \uACBD\uC6B0\uC5D0\uB9CC \uD574\uB2F9 \uD56D\uBAA9 \uC704\uC5D0 \uC785\uB825\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uC790\uAC00 \uB2EB\uB294 \uB530\uC634\uD45C \uB610\uB294 \uB300\uAD04\uD638 \uC704\uC5D0 \uC785\uB825\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5B8\uC5B4 \uAD6C\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uB530\uC634\uD45C\uB97C \uC790\uB3D9\uC73C\uB85C \uB2EB\uC744 \uACBD\uC6B0\uB97C \uACB0\uC815\uD569\uB2C8\uB2E4.","\uCEE4\uC11C\uAC00 \uACF5\uBC31\uC758 \uC67C\uCABD\uC5D0 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC \uB530\uC634\uD45C\uB97C \uC790\uB3D9\uC73C\uB85C \uB2EB\uC2B5\uB2C8\uB2E4.","\uC0AC\uC6A9\uC790\uAC00 \uC5EC\uB294 \uB530\uC634\uD45C\uB97C \uCD94\uAC00\uD55C \uD6C4 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB530\uC634\uD45C\uB97C \uC790\uB3D9\uC73C\uB85C \uB2EB\uC744\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uB294 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC790\uB3D9\uC73C\uB85C \uC0BD\uC785\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uB294 \uD604\uC7AC \uC904\uC758 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC720\uC9C0\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uB294 \uD604\uC7AC \uC904\uC758 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC720\uC9C0\uD558\uACE0 \uC5B8\uC5B4 \uC815\uC758 \uB300\uAD04\uD638\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uB294 \uD604\uC7AC \uC904\uC758 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC720\uC9C0\uD558\uACE0 \uC5B8\uC5B4 \uC815\uC758 \uB300\uAD04\uD638\uB97C \uC874\uC911\uD558\uBA70 \uC5B8\uC5B4\uBCC4\uB85C \uC815\uC758\uB41C \uD2B9\uBCC4 EnterRules\uB97C \uD638\uCD9C\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uB294 \uD604\uC7AC \uC904\uC758 \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC720\uC9C0\uD558\uACE0, \uC5B8\uC5B4 \uC815\uC758 \uB300\uAD04\uD638\uB97C \uC874\uC911\uD558\uACE0, \uC5B8\uC5B4\uC5D0 \uC758\uD574 \uC815\uC758\uB41C \uD2B9\uBCC4 EnterRules\uB97C \uD638\uCD9C\uD558\uACE0, \uC5B8\uC5B4\uC5D0 \uC758\uD574 \uC815\uC758\uB41C \uB4E4\uC5EC\uC4F0\uAE30 \uADDC\uCE59\uC744 \uC874\uC911\uD569\uB2C8\uB2E4.","\uC0AC\uC6A9\uC790\uAC00 \uC904\uC744 \uC785\uB825, \uBD99\uC5EC\uB123\uAE30, \uC774\uB3D9 \uB610\uB294 \uB4E4\uC5EC\uC4F0\uAE30 \uD560 \uB54C \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uC790\uB3D9\uC73C\uB85C \uC870\uC815\uD558\uB3C4\uB85D \uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC5B8\uC5B4 \uAD6C\uC131\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC120\uD0DD \uD56D\uBAA9\uC744 \uC790\uB3D9\uC73C\uB85C \uB458\uB7EC\uC300 \uACBD\uC6B0\uB97C \uACB0\uC815\uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638\uAC00 \uC544\uB2CC \uB530\uC634\uD45C\uB85C \uB458\uB7EC\uC309\uB2C8\uB2E4.","\uB530\uC634\uD45C\uAC00 \uC544\uB2CC \uB300\uAD04\uD638\uB85C \uB458\uB7EC\uC309\uB2C8\uB2E4.","\uB530\uC634\uD45C \uB610\uB294 \uB300\uAD04\uD638 \uC785\uB825 \uC2DC \uD3B8\uC9D1\uAE30\uAC00 \uC790\uB3D9\uC73C\uB85C \uC120\uD0DD \uC601\uC5ED\uC744 \uB458\uB7EC\uC300\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB4E4\uC5EC\uC4F0\uAE30\uC5D0 \uACF5\uBC31\uC744 \uC0AC\uC6A9\uD560 \uB54C \uD0ED \uBB38\uC790\uC758 \uC120\uD0DD \uB3D9\uC791\uC744 \uC5D0\uBBAC\uB808\uC774\uD2B8\uD569\uB2C8\uB2E4. \uC120\uD0DD \uC601\uC5ED\uC774 \uD0ED \uC815\uC9C0\uC5D0 \uACE0\uC815\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C CodeLens\uB97C \uD45C\uC2DC\uD560 \uAC83\uC778\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","CodeLens\uC758 \uAE00\uAF34 \uD328\uBC00\uB9AC\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","CodeLens\uC758 \uAE00\uAF34 \uD06C\uAE30(\uD53D\uC140)\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. 0\uC73C\uB85C \uC124\uC815\uD558\uBA74 `#editor.fontSize#`\uC758 90%\uAC00 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC778\uB77C\uC778 \uC0C9 \uB370\uCF54\uB808\uC774\uD130 \uBC0F \uC0C9 \uC120\uD0DD\uC744 \uB80C\uB354\uB9C1\uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC0C9 \uB370\uCF54\uB808\uC774\uD130\uB97C \uD074\uB9AD\uD558\uACE0 \uB9C8\uC6B0\uC2A4\uB85C \uAC00\uB9AC\uD0AC \uB54C \uC0C9 \uC120\uD0DD\uAE30\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC0C9 \uB370\uCF54\uB808\uC774\uD130\uB97C \uB9C8\uC6B0\uC2A4\uB85C \uAC00\uB9AC\uD0A4\uBA74 \uC0C9 \uC120\uD0DD\uAE30\uAC00 \uD45C\uC2DC\uB418\uB3C4\uB85D \uC124\uC815","\uC0C9 \uB370\uCF54\uB808\uC774\uD130\uB97C \uD074\uB9AD\uD560 \uB54C \uC0C9 \uC120\uD0DD\uAE30\uB97C \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC0C9 \uB370\uCF54\uB808\uC774\uD130\uC5D0\uC11C \uC0C9 \uC120\uD0DD\uAE30\uB97C \uD45C\uC2DC\uD558\uB3C4\uB85D \uC870\uAC74\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD55C \uBC88\uC5D0 \uB80C\uB354\uB9C1\uD560 \uC218 \uC788\uB294 \uCD5C\uB300 \uC0C9 \uB370\uCF54\uB808\uC774\uD130 \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uC640 \uD0A4\uB85C \uC120\uD0DD\uD55C \uC601\uC5ED\uC5D0\uC11C \uC5F4\uC744 \uC120\uD0DD\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uAD6C\uBB38 \uAC15\uC870 \uD45C\uC2DC\uB97C \uD074\uB9BD\uBCF4\uB4DC\uB85C \uBCF5\uC0AC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uCEE4\uC11C \uC560\uB2C8\uBA54\uC774\uC158 \uC2A4\uD0C0\uC77C\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBD80\uB4DC\uB7EC\uC6B4 \uCE90\uB7FF \uC560\uB2C8\uBA54\uC774\uC158\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBD80\uB4DC\uB7EC\uC6B4 \uCE90\uB7FF \uC560\uB2C8\uBA54\uC774\uC158\uC740 \uC0AC\uC6A9\uC790\uAC00 \uBA85\uC2DC\uC801 \uC81C\uC2A4\uCC98\uB97C \uC0AC\uC6A9\uD558\uC5EC \uCEE4\uC11C\uB97C \uC774\uB3D9\uD560 \uB54C\uB9CC \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uBD80\uB4DC\uB7EC\uC6B4 \uCE90\uB7FF \uC560\uB2C8\uBA54\uC774\uC158\uC740 \uD56D\uC0C1 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uB9E4\uB044\uB7EC\uC6B4 \uCE90\uB7FF \uC560\uB2C8\uBA54\uC774\uC158\uC758 \uC0AC\uC6A9 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uCEE4\uC11C \uC2A4\uD0C0\uC77C\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uCEE4\uC11C \uC8FC\uBCC0\uC5D0 \uD45C\uC2DC\uB418\uB294 \uC120\uD589 \uC904(\uCD5C\uC18C 0)\uACFC \uD6C4\uD589 \uC904(\uCD5C\uC18C 1)\uC758 \uCD5C\uC18C \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC77C\uBD80 \uB2E4\uB978 \uD3B8\uC9D1\uAE30\uC5D0\uC11C\uB294 'scrollOff' \uB610\uB294 'scrollOffset'\uC73C\uB85C \uC54C\uB824\uC838 \uC788\uC2B5\uB2C8\uB2E4.","'cursorSurroundingLines'\uB294 \uD0A4\uBCF4\uB4DC \uB098 API\uB97C \uD1B5\uD574 \uD2B8\uB9AC\uAC70\uB420 \uB54C\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4.","`cursorSurroundingLines`\uB294 \uD56D\uC0C1 \uC801\uC6A9\uB429\uB2C8\uB2E4.","'#cursorSurroundingLines#'\uB97C \uC801\uC6A9\uD574\uC57C \uD558\uB294 \uACBD\uC6B0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","`#editor.cursorStyle#` \uC124\uC815\uC774 'line'\uC73C\uB85C \uC124\uC815\uB418\uC5B4 \uC788\uC744 \uB54C \uCEE4\uC11C\uC758 \uB113\uC774\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB04C\uC5B4\uC11C \uB193\uAE30\uB85C \uC120\uD0DD \uC601\uC5ED\uC744 \uC774\uB3D9\uD560 \uC218 \uC788\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","svgs\uC640 \uD568\uAED8 \uC0C8 \uB80C\uB354\uB9C1 \uBA54\uC11C\uB4DC\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uAE00\uAF34 \uBB38\uC790\uC640 \uD568\uAED8 \uC0C8 \uB80C\uB354\uB9C1 \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uC548\uC815\uC801\uC778 \uB80C\uB354\uB9C1 \uBC29\uBC95\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uACF5\uBC31\uC774 \uC0C8\uB85C\uC6B4 \uC2E4\uD5D8\uC801 \uBA54\uC11C\uB4DC\uB85C \uB80C\uB354\uB9C1\uB418\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","'Alt' \uD0A4\uB97C \uB204\uB97C \uB54C \uC2A4\uD06C\uB864 \uC18D\uB3C4 \uC2B9\uC218\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0 \uCF54\uB4DC \uC811\uAE30\uAC00 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uACBD\uC6B0 \uC5B8\uC5B4\uBCC4 \uC811\uAE30 \uC804\uB7B5\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4. \uADF8\uB807\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uB4E4\uC5EC\uC4F0\uAE30 \uAE30\uBC18 \uC804\uB7B5\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uB4E4\uC5EC\uC4F0\uAE30 \uAE30\uBC18 \uC811\uAE30 \uC804\uB7B5\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uC811\uAE30 \uBC94\uC704\uB97C \uACC4\uC0B0\uD558\uAE30 \uC704\uD55C \uC804\uB7B5\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC811\uD78C \uBC94\uC704\uB97C \uAC15\uC870 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uAC00\uC838\uC624\uAE30 \uBC94\uC704\uB97C \uC790\uB3D9\uC73C\uB85C \uCD95\uC18C\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3F4\uB354\uBE14 \uC601\uC5ED\uC758 \uCD5C\uB300 \uC218\uC785\uB2C8\uB2E4. \uD604\uC7AC \uC6D0\uBCF8\uC5D0 \uD3F4\uB354\uBE14 \uC601\uC5ED\uC774 \uB9CE\uC744 \uB54C \uC774 \uAC12\uC744 \uB298\uB9AC\uBA74 \uD3B8\uC9D1\uAE30\uC758 \uBC18\uC751\uC774 \uB5A8\uC5B4\uC9C8 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC811\uD78C \uC904\uC774 \uC904\uC744 \uD3BC\uCE5C \uD6C4 \uBE48 \uCF58\uD150\uCE20\uB97C \uD074\uB9AD\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAE00\uAF34 \uD328\uBC00\uB9AC\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBD99\uC5EC\uB123\uC740 \uCF58\uD150\uCE20\uC758 \uC11C\uC2DD\uC744 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC790\uB3D9\uC73C\uB85C \uC9C0\uC815\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uD3EC\uB9F7\uD130\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC788\uC5B4\uC57C \uD558\uBA70 \uD3EC\uB9F7\uD130\uAC00 \uBB38\uC11C\uC5D0\uC11C \uBC94\uC704\uC758 \uC11C\uC2DD\uC744 \uC9C0\uC815\uD560 \uC218 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.","\uC785\uB825 \uD6C4 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC790\uB3D9\uC73C\uB85C \uC904\uC758 \uC11C\uC2DD\uC744 \uC9C0\uC815\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC138\uB85C \uBB38\uC790 \uBAA8\uC591 \uC5EC\uBC31\uC744 \uB80C\uB354\uB9C1\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uBB38\uC790 \uBAA8\uC591 \uC5EC\uBC31\uC740 \uC8FC\uB85C \uB514\uBC84\uAE45\uC5D0 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uCEE4\uC11C\uAC00 \uAC1C\uC694 \uB208\uAE08\uC790\uC5D0\uC11C \uAC00\uB824\uC838\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBB38\uC790 \uAC04\uACA9(\uD53D\uC140)\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC5F0\uACB0\uB41C \uD3B8\uC9D1\uC774 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uC5C8\uB294\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC5B8\uC5B4\uC5D0 \uB530\uB77C \uAD00\uB828 \uAE30\uD638(\uC608: HTML \uD0DC\uADF8)\uAC00 \uD3B8\uC9D1 \uC911\uC5D0 \uC5C5\uB370\uC774\uD2B8\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB9C1\uD06C\uB97C \uAC10\uC9C0\uD558\uACE0 \uD074\uB9AD\uD560 \uC218 \uC788\uAC8C \uB9CC\uB4E4\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC77C\uCE58\uD558\uB294 \uB300\uAD04\uD638\uB97C \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4 \uD720 \uC2A4\uD06C\uB864 \uC774\uBCA4\uD2B8\uC758 `deltaX` \uBC0F `deltaY`\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC2B9\uC218\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4 \uD720\uC744 \uC0AC\uC6A9\uD560 \uB54C 'Ctrl' \uD0A4\uB97C \uB204\uB974\uACE0 \uC788\uC73C\uBA74 \uD3B8\uC9D1\uAE30\uC758 \uAE00\uAF34\uC744 \uD655\uB300/\uCD95\uC18C\uD569\uB2C8\uB2E4.","\uC5EC\uB7EC \uCEE4\uC11C\uAC00 \uACB9\uCE58\uB294 \uACBD\uC6B0 \uCEE4\uC11C\uB97C \uBCD1\uD569\uD569\uB2C8\uB2E4.","Windows\uC640 Linux\uC758 'Control'\uC744 macOS\uC758 'Command'\uB85C \uB9E4\uD551\uD569\uB2C8\uB2E4.","Windows\uC640 Linux\uC758 'Alt'\uB97C macOS\uC758 'Option'\uC73C\uB85C \uB9E4\uD551\uD569\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uC5EC\uB7EC \uCEE4\uC11C\uB97C \uCD94\uAC00\uD560 \uB54C \uC0AC\uC6A9\uD560 \uC218\uC815\uC790\uC785\uB2C8\uB2E4. [\uC815\uC758\uB85C \uC774\uB3D9] \uBC0F [\uB9C1\uD06C \uC5F4\uAE30] \uB9C8\uC6B0\uC2A4 \uC81C\uC2A4\uCC98\uAC00 [\uBA40\uD2F0\uCEE4\uC11C \uC218\uC815\uC790\uC640](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier) \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uB3C4\uB85D \uC870\uC815\uB429\uB2C8\uB2E4.","\uAC01 \uCEE4\uC11C\uB294 \uD14D\uC2A4\uD2B8 \uD55C \uC904\uC744 \uBD99\uC5EC\uB123\uC2B5\uB2C8\uB2E4.","\uAC01 \uCEE4\uC11C\uB294 \uC804\uCCB4 \uD14D\uC2A4\uD2B8\uB97C \uBD99\uC5EC\uB123\uC2B5\uB2C8\uB2E4.","\uBD99\uC5EC\uB123\uC740 \uD14D\uC2A4\uD2B8\uC758 \uC904 \uC218\uAC00 \uCEE4\uC11C \uC218\uC640 \uC77C\uCE58\uD558\uB294 \uACBD\uC6B0 \uBD99\uC5EC\uB123\uAE30\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD55C \uBC88\uC5D0 \uD65C\uC131 \uD3B8\uC9D1\uAE30\uC5D0 \uC788\uC744 \uC218 \uC788\uB294 \uCD5C\uB300 \uCEE4\uC11C \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC758\uBBF8 \uCCB4\uACC4 \uAE30\uD638 \uD56D\uBAA9\uC744 \uAC15\uC870 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAC1C\uC694 \uB208\uAE08\uC790 \uC8FC\uC704\uC5D0 \uD14C\uB450\uB9AC\uB97C \uADF8\uB9B4\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","Peek\uB97C \uC5EC\uB294 \uB3D9\uC548 \uD2B8\uB9AC\uC5D0 \uD3EC\uCEE4\uC2A4","\uBBF8\uB9AC \uBCF4\uAE30\uB97C \uC5F4 \uB54C \uD3B8\uC9D1\uAE30\uC5D0 \uD3EC\uCEE4\uC2A4","\uBBF8\uB9AC \uBCF4\uAE30 \uC704\uC82F\uC5D0\uC11C \uC778\uB77C\uC778 \uD3B8\uC9D1\uAE30\uC5D0 \uD3EC\uCEE4\uC2A4\uB97C \uB458\uC9C0 \uB610\uB294 \uD2B8\uB9AC\uC5D0 \uD3EC\uCEE4\uC2A4\uB97C \uB458\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC774\uB3D9 \uC815\uC758 \uB9C8\uC6B0\uC2A4 \uC81C\uC2A4\uCC98\uAC00 \uD56D\uC0C1 \uBBF8\uB9AC \uBCF4\uAE30 \uC704\uC82F\uC744 \uC5F4\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBE60\uB978 \uC81C\uC548\uC744 \uD45C\uC2DC\uD558\uAE30 \uC804\uAE4C\uC9C0\uC758 \uC9C0\uC5F0 \uC2DC\uAC04(\uBC00\uB9AC\uCD08)\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uAC00 \uC720\uD615\uC5D0 \uB530\uB77C \uC790\uB3D9\uC73C\uB85C \uC774\uB984\uC744 \uBC14\uAFC0\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 `editor.linkedEditing`\uC744 \uC0AC\uC6A9\uD558\uC138\uC694.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC81C\uC5B4 \uBB38\uC790\uB97C \uB80C\uB354\uB9C1\uD560\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD30C\uC77C\uC774 \uC904 \uBC14\uAFC8\uC73C\uB85C \uB05D\uB098\uBA74 \uB9C8\uC9C0\uB9C9 \uC904 \uBC88\uD638\uB97C \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4.","\uC81C\uBCF8\uC6A9 \uC5EC\uBC31\uACFC \uD604\uC7AC \uC904\uC744 \uBAA8\uB450 \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uAC00 \uD604\uC7AC \uC904 \uAC15\uC870 \uD45C\uC2DC\uB97C \uB80C\uB354\uB9C1\uD558\uB294 \uBC29\uC2DD\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uACBD\uC6B0\uC5D0\uB9CC \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD604\uC7AC \uC904 \uAC15\uC870 \uD45C\uC2DC\uB97C \uB80C\uB354\uB9C1\uD574\uC57C \uD558\uB294\uC9C0 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB2E8\uC5B4 \uC0AC\uC774\uC758 \uACF5\uBC31 \uD558\uB098\uB97C \uC81C\uC678\uD55C \uACF5\uBC31 \uBB38\uC790\uB97C \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4.","\uC120\uD0DD\uD55C \uD14D\uC2A4\uD2B8\uC5D0\uC11C\uB9CC \uACF5\uBC31 \uBB38\uC790\uB97C \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4.","\uD6C4\uD589 \uACF5\uBC31 \uBB38\uC790\uB9CC \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uACF5\uBC31 \uBB38\uC790\uB97C \uB80C\uB354\uB9C1\uD560 \uBC29\uBC95\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC120\uD0DD \uD56D\uBAA9\uC758 \uBAA8\uC11C\uB9AC\uB97C \uB465\uAE00\uAC8C \uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uAC00\uB85C\uB85C \uC2A4\uD06C\uB864\uB418\uB294 \uBC94\uC704\uB97C \uBC97\uC5B4\uB098\uB294 \uCD94\uAC00 \uBB38\uC790\uC758 \uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB9C8\uC9C0\uB9C9 \uC904 \uC774\uD6C4\uB85C \uC2A4\uD06C\uB864\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC138\uB85C\uC640 \uAC00\uB85C\uB85C \uB3D9\uC2DC\uC5D0 \uC2A4\uD06C\uB864\uD560 \uB54C\uC5D0\uB9CC \uC8FC\uCD95\uC744 \uB530\uB77C\uC11C \uC2A4\uD06C\uB864\uD569\uB2C8\uB2E4. \uD2B8\uB799\uD328\uB4DC\uC5D0\uC11C \uC138\uB85C\uB85C \uC2A4\uD06C\uB864\uD560 \uB54C \uAC00\uB85C \uB4DC\uB9AC\uD504\uD2B8\uB97C \uBC29\uC9C0\uD569\uB2C8\uB2E4.","Linux \uC8FC \uD074\uB9BD\uBCF4\uB4DC\uC758 \uC9C0\uC6D0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uAC00 \uC120\uD0DD \uD56D\uBAA9\uACFC \uC720\uC0AC\uD55C \uC77C\uCE58 \uD56D\uBAA9\uC744 \uAC15\uC870 \uD45C\uC2DC\uD574\uC57C\uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC811\uAE30 \uCEE8\uD2B8\uB864\uC744 \uD56D\uC0C1 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC811\uAE30 \uCEE8\uD2B8\uB864\uC744 \uD45C\uC2DC\uD558\uC9C0 \uC54A\uACE0 \uC5EC\uBC31 \uD06C\uAE30\uB97C \uC904\uC774\uC138\uC694.","\uB9C8\uC6B0\uC2A4\uAC00 \uC5EC\uBC31 \uC704\uC5D0 \uC788\uC744 \uB54C\uC5D0\uB9CC \uC811\uAE30 \uCEE8\uD2B8\uB864\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC5EC\uBC31\uC758 \uC811\uAE30 \uCEE8\uD2B8\uB864\uC774 \uD45C\uC2DC\uB418\uB294 \uC2DC\uAE30\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB294 \uCF54\uB4DC\uC758 \uD398\uC774\uB4DC \uC544\uC6C3\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uCDE8\uC18C\uC120 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uB294 \uBCC0\uC218\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB2E4\uB978 \uC81C\uC548 \uC704\uC5D0 \uC870\uAC01 \uC81C\uC548\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uB2E4\uB978 \uC81C\uC548 \uC544\uB798\uC5D0 \uC870\uAC01 \uC81C\uC548\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uB2E4\uB978 \uC81C\uC548\uACFC \uD568\uAED8 \uC870\uAC01 \uC81C\uC548\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uCF54\uB4DC \uC870\uAC01 \uC81C\uC548\uC744 \uD45C\uC2DC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uCF54\uB4DC \uC870\uAC01\uC774 \uB2E4\uB978 \uCD94\uCC9C\uACFC \uD568\uAED8 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80 \uBC0F \uC815\uB82C \uBC29\uBC95\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC560\uB2C8\uBA54\uC774\uC158\uC744 \uC0AC\uC6A9\uD558\uC5EC \uC2A4\uD06C\uB864\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uC644\uC131\uC774 \uD45C\uC2DC\uB420 \uB54C \uD654\uBA74 \uC77D\uAE30 \uD504\uB85C\uADF8\uB7A8 \uC0AC\uC6A9\uC790\uC5D0\uAC8C \uC811\uADFC\uC131 \uD78C\uD2B8\uB97C \uC81C\uACF5\uD574\uC57C \uD558\uB294\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F\uC758 \uAE00\uAF34 \uD06C\uAE30\uC785\uB2C8\uB2E4. {0}(\uC73C)\uB85C \uC124\uC815\uD558\uBA74 {1} \uAC12\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F\uC758 \uC904 \uB192\uC774\uC785\uB2C8\uB2E4. {0}(\uC73C)\uB85C \uC124\uC815\uD558\uBA74 {1} \uAC12\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4. \uCD5C\uC18C\uAC12\uC740 8\uC785\uB2C8\uB2E4.","\uD2B8\uB9AC\uAC70 \uBB38\uC790\uB97C \uC785\uB825\uD560 \uB54C \uC81C\uC548\uC744 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD56D\uC0C1 \uCCAB \uBC88\uC9F8 \uC81C\uC548\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4.","`log`\uAC00 \uCD5C\uADFC\uC5D0 \uC644\uB8CC\uB418\uC5C8\uC73C\uBBC0\uB85C \uCD94\uAC00 \uC785\uB825\uC5D0\uC11C \uC81C\uC548\uC744 \uC120\uD0DD\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0 \uCD5C\uADFC \uC81C\uC548\uC744 \uC120\uD0DD\uD558\uC138\uC694(\uC608: `console.| -> console.log`).","\uD574\uB2F9 \uC81C\uC548\uC744 \uC644\uB8CC\uD55C \uC774\uC804 \uC811\uB450\uC0AC\uC5D0 \uB530\uB77C \uC81C\uC548\uC744 \uC120\uD0DD\uD569\uB2C8\uB2E4(\uC608: `co -> console` \uBC0F `con -> const`).","\uC81C\uC548 \uBAA9\uB85D\uC744 \uD45C\uC2DC\uD560 \uB54C \uC81C\uD55C\uC774 \uBBF8\uB9AC \uC120\uD0DD\uB418\uB294 \uBC29\uC2DD\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD0ED \uC644\uB8CC\uB294 \uD0ED\uC744 \uB204\uB97C \uB54C \uAC00\uC7A5 \uC77C\uCE58\uD558\uB294 \uC81C\uC548\uC744 \uC0BD\uC785\uD569\uB2C8\uB2E4.","\uD0ED \uC644\uC131\uC744 \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uC811\uB450\uC0AC\uAC00 \uC77C\uCE58\uD558\uB294 \uACBD\uC6B0 \uCF54\uB4DC \uC870\uAC01\uC744 \uD0ED \uC644\uB8CC\uD569\uB2C8\uB2E4. 'quickSuggestions'\uB97C \uC0AC\uC6A9\uD558\uC9C0 \uC54A\uC744 \uB54C \uAC00\uC7A5 \uC798 \uC791\uB3D9\uD569\uB2C8\uB2E4.","\uD0ED \uC644\uC131\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD569\uB2C8\uB2E4.","\uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790\uAC00 \uC790\uB3D9\uC73C\uB85C \uC81C\uAC70\uB429\uB2C8\uB2E4.","\uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790\uAC00 \uBB34\uC2DC\uB429\uB2C8\uB2E4.","\uC81C\uAC70\uD560 \uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790 \uD504\uB86C\uD504\uD2B8\uC785\uB2C8\uB2E4.","\uBB38\uC81C\uB97C \uC77C\uC73C\uD0AC \uC218 \uC788\uB294 \uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790\uB97C \uC81C\uAC70\uD569\uB2C8\uB2E4.","\uD0ED \uC815\uC9C0 \uB4A4\uC5D0 \uACF5\uBC31\uC744 \uC0BD\uC785 \uBC0F \uC0AD\uC81C\uD569\uB2C8\uB2E4.","\uAE30\uBCF8 \uC904 \uBC14\uAFC8 \uADDC\uCE59\uC744 \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uB2E8\uC5B4 \uBD84\uB9AC\uB294 \uC911\uAD6D\uC5B4/\uC77C\uBCF8\uC5B4/\uD55C\uAD6D\uC5B4(CJK) \uD14D\uC2A4\uD2B8\uC5D0 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CJK\uAC00 \uC544\uB2CC \uD14D\uC2A4\uD2B8 \uB3D9\uC791\uC740 \uC77C\uBC18 \uD14D\uC2A4\uD2B8 \uB3D9\uC791\uACFC \uAC19\uC2B5\uB2C8\uB2E4.","\uC911\uAD6D\uC5B4/\uC77C\uBCF8\uC5B4/\uD55C\uAD6D\uC5B4(CJK) \uD14D\uC2A4\uD2B8\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uB2E8\uC5B4 \uBD84\uB9AC \uADDC\uCE59\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB2E8\uC5B4 \uAD00\uB828 \uD0D0\uC0C9 \uB610\uB294 \uC791\uC5C5\uC744 \uC218\uD589\uD560 \uB54C \uB2E8\uC5B4 \uAD6C\uBD84 \uAE30\uD638\uB85C \uC0AC\uC6A9\uD560 \uBB38\uC790\uC785\uB2C8\uB2E4.","\uC904\uC774 \uBC14\uB00C\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uBDF0\uD3EC\uD2B8 \uB108\uBE44\uC5D0\uC11C \uC904\uC774 \uBC14\uB01D\uB2C8\uB2E4.","`#editor.wordWrapColumn#`\uC5D0\uC11C \uC904\uC774 \uBC14\uB01D\uB2C8\uB2E4.","\uBDF0\uD3EC\uD2B8\uC758 \uCD5C\uC18C\uAC12 \uBC0F `#editor.wordWrapColumn#`\uC5D0\uC11C \uC904\uC774 \uBC14\uB01D\uB2C8\uB2E4.","\uC904 \uBC14\uAFC8 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","`#editor.wordWrap#`\uC774 `wordWrapColumn` \uB610\uB294 'bounded'\uC778 \uACBD\uC6B0 \uD3B8\uC9D1\uAE30\uC758 \uC5F4 \uC904 \uBC14\uAFC8\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAE30\uBCF8 \uBB38\uC11C \uC0C9 \uACF5\uAE09\uC790\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC778\uB77C\uC778 \uC0C9 \uC7A5\uC2DD\uC744 \uD45C\uC2DC\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD0ED\uC744 \uBC1B\uC744\uC9C0 \uB610\uB294 \uD0D0\uC0C9\uC744 \uC704\uD574 \uC6CC\uD06C\uBCA4\uCE58\uB85C \uBBF8\uB8F0\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4."],"vs/editor/common/core/editorColorRegistry":["\uCEE4\uC11C \uC704\uCE58\uC758 \uC904 \uAC15\uC870 \uD45C\uC2DC\uC5D0 \uB300\uD55C \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uCEE4\uC11C \uC704\uCE58\uC758 \uC904 \uD14C\uB450\uB9AC\uC5D0 \uB300\uD55C \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBE60\uB978 \uC5F4\uAE30 \uBC0F \uCC3E\uAE30 \uAE30\uB2A5 \uB4F1\uC744 \uD1B5\uD574 \uAC15\uC870 \uD45C\uC2DC\uB41C \uC601\uC5ED\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uAC15\uC870 \uC601\uC5ED \uC8FC\uBCC0\uC758 \uD14C\uB450\uB9AC\uC5D0 \uB300\uD55C \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4","\uAC15\uC870 \uD45C\uC2DC\uB41C \uAE30\uD638(\uC608: \uC815\uC758\uB85C \uC774\uB3D9 \uB610\uB294 \uB2E4\uC74C/\uC774\uC804 \uAE30\uD638\uB85C \uC774\uB3D9)\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774 \uC0C9\uC0C1\uC740 \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uAC15\uC870 \uD45C\uC2DC\uB41C \uAE30\uD638 \uC8FC\uC704\uC758 \uD14C\uB450\uB9AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCEE4\uC11C \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCEE4\uC11C\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBE14\uB85D \uCEE4\uC11C\uC640 \uACB9\uCE58\uB294 \uAE00\uC790\uC758 \uC0C9\uC0C1\uC744 \uC0AC\uC6A9\uC790 \uC815\uC758\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC758 \uACF5\uBC31 \uBB38\uC790 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC904 \uBC88\uD638 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9\uC785\uB2C8\uB2E4.","'editorIndentGuide.background'\uB294 \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 'editorIndentGuide.background1'\uC744 \uC0AC\uC6A9\uD558\uC138\uC694.","\uD65C\uC131 \uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9\uC785\uB2C8\uB2E4.","'editorIndentGuide.activeBackground'\uB294 \uB354 \uC774\uC0C1 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 'editorIndentGuide.activeBackground1'\uC744 \uC0AC\uC6A9\uD558\uC138\uC694.","\uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(1).","\uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(2).","\uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(3).","\uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(4).","\uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(5).","\uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(6).","\uD65C\uC131 \uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(1).","\uD65C\uC131 \uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(2).","\uD65C\uC131 \uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(3).","\uD65C\uC131 \uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(4).","\uD65C\uC131 \uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(5).","\uD65C\uC131 \uD3B8\uC9D1\uAE30 \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120 \uC0C9(6).","\uD3B8\uC9D1\uAE30 \uD65C\uC131 \uC601\uC5ED \uC904\uBC88\uD638 \uC0C9\uC0C1","ID\uB294 \uC0AC\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB300\uC2E0 'editorLineNumber.activeForeground'\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.","\uD3B8\uC9D1\uAE30 \uD65C\uC131 \uC601\uC5ED \uC904\uBC88\uD638 \uC0C9\uC0C1","editor.renderFinalNewline\uC774 \uD750\uB9AC\uAC8C \uC124\uC815\uB41C \uACBD\uC6B0 \uCD5C\uC885 \uD3B8\uC9D1\uAE30 \uC904\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB208\uAE08\uC758 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCF54\uB4DC \uB80C\uC988\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC77C\uCE58\uD558\uB294 \uAD04\uD638 \uB4A4\uC758 \uBC30\uACBD\uC0C9","\uC77C\uCE58\uD558\uB294 \uBE0C\uB798\uD0B7 \uBC15\uC2A4\uC758 \uC0C9\uC0C1","\uAC1C\uC694 \uB208\uAE08 \uACBD\uACC4\uC758 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uAC1C\uC694 \uB208\uAE08\uC790\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uAC70\uD130\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAC70\uD130\uC5D0\uB294 \uAE00\uB9AC\uD504 \uC5EC\uBC31\uACFC \uD589 \uC218\uAC00 \uC788\uC2B5\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC758 \uBD88\uD544\uC694\uD55C(\uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB294) \uC18C\uC2A4 \uCF54\uB4DC \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.",`\uD3B8\uC9D1\uAE30\uC758 \uBD88\uD544\uC694\uD55C(\uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB294) \uC18C\uC2A4 \uCF54\uB4DC \uBD88\uD22C\uBA85\uB3C4\uC785\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4 "#000000c0"\uC740 75% \uBD88\uD22C\uBA85\uB3C4\uB85C \uCF54\uB4DC\uB97C \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4. \uACE0\uB300\uBE44 \uD14C\uB9C8\uC758 \uACBD\uC6B0 \uD398\uC774\uB4DC \uC544\uC6C3\uD558\uC9C0 \uC54A\uACE0 'editorUnnecessaryCode.border' \uD14C\uB9C8 \uC0C9\uC744 \uC0AC\uC6A9\uD558\uC5EC \uBD88\uD544\uC694\uD55C \uCF54\uB4DC\uC5D0 \uBC11\uC904\uC744 \uADF8\uC73C\uC138\uC694.`,"\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uACE0\uC2A4\uD2B8 \uD14D\uC2A4\uD2B8\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uACE0\uC2A4\uD2B8 \uD14D\uC2A4\uD2B8\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uACE0\uC2A4\uD2B8 \uD14D\uC2A4\uD2B8\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBC94\uC704\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uD45C\uC2DD \uC0C9\uC774 \uAC15\uC870 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC624\uB958\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uB9C8\uCEE4 \uC0C9\uC785\uB2C8\uB2E4.","\uACBD\uACE0\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uB9C8\uCEE4 \uC0C9\uC785\uB2C8\uB2E4.","\uC815\uBCF4\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uB9C8\uCEE4 \uC0C9\uC785\uB2C8\uB2E4.","\uB300\uAD04\uD638\uC758 \uC804\uACBD\uC0C9(1)\uC785\uB2C8\uB2E4. \uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638\uC758 \uC804\uACBD\uC0C9(2)\uC785\uB2C8\uB2E4. \uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638\uC758 \uC804\uACBD\uC0C9(3)\uC785\uB2C8\uB2E4. \uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638\uC758 \uC804\uACBD\uC0C9(4)\uC785\uB2C8\uB2E4. \uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638\uC758 \uC804\uACBD\uC0C9(5)\uC785\uB2C8\uB2E4. \uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638\uC758 \uC804\uACBD\uC0C9(6)\uC785\uB2C8\uB2E4. \uB300\uAD04\uD638 \uC30D \uC0C9 \uC9C0\uC815\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uC608\uAE30\uCE58 \uC54A\uC740 \uB300\uAD04\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBE44\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(1). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uBE44\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(2). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uBE44\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(3). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uBE44\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(4). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uBE44\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(5). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uBE44\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(6). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(1). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(2). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(3). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(4). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(5). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uD65C\uC131 \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4(6). \uB300\uAD04\uD638 \uC30D \uC548\uB0B4\uC120\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.","\uC720\uB2C8\uCF54\uB4DC \uBB38\uC790\uB97C \uAC15\uC870 \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uC720\uB2C8\uCF54\uB4DC \uBB38\uC790\uB97C \uAC15\uC870 \uD45C\uC2DC\uD558\uB294 \uB370 \uC0AC\uC6A9\uB418\uB294 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4."],"vs/editor/common/editorContextKeys":["\uD3B8\uC9D1\uAE30 \uD14D\uC2A4\uD2B8\uC5D0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80(\uCEE4\uC11C\uAC00 \uAE5C\uBC15\uC784)","\uD3B8\uC9D1\uAE30 \uB610\uB294 \uD3B8\uC9D1\uAE30 \uC704\uC82F\uC5D0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80(\uC608: \uD3EC\uCEE4\uC2A4\uAC00 \uCC3E\uAE30 \uC704\uC82F\uC5D0 \uC788\uC74C)","\uD3B8\uC9D1\uAE30 \uB610\uB294 \uC11C\uC2DD \uC788\uB294 \uD14D\uC2A4\uD2B8 \uC785\uB825\uC5D0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80(\uCEE4\uC11C\uAC00 \uAE5C\uBC15\uC784)","\uD3B8\uC9D1\uAE30\uAC00 \uC77D\uAE30 \uC804\uC6A9\uC778\uC9C0 \uC5EC\uBD80","\uCEE8\uD14D\uC2A4\uD2B8\uAC00 diff \uD3B8\uC9D1\uAE30\uC778\uC9C0 \uC5EC\uBD80","\uCEE8\uD14D\uC2A4\uD2B8\uAC00 \uD3EC\uD568\uB41C diff \uD3B8\uC9D1\uAE30\uC778\uC9C0 \uC5EC\uBD80","\uC774\uB3D9\uB41C \uCF54\uB4DC \uBE14\uB85D\uC774 \uBE44\uAD50\uB97C \uC704\uD574 \uC120\uD0DD\uB418\uC5C8\uB294\uC9C0 \uC5EC\uBD80","\uC561\uC138\uC2A4 \uAC00\uB2A5\uD55C Diff \uBDF0\uC5B4 \uD45C\uC2DC \uC5EC\uBD80","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uB098\uB780\uD788 \uC778\uB77C\uC778 \uC911\uB2E8\uC810\uC5D0 \uC5F0\uACB0\uD560\uC9C0 \uC5EC\uBD80","'editor.columnSelection'\uC744 \uC0AC\uC6A9\uD558\uB3C4\uB85D \uC124\uC815\uB418\uC5B4 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC5EC\uB7EC \uAC1C\uC758 \uC120\uD0DD \uD56D\uBAA9\uC774 \uC788\uB294\uC9C0 \uC5EC\uBD80","'Tab' \uD0A4\uB97C \uB204\uB974\uBA74 \uD3B8\uC9D1\uAE30 \uBC16\uC73C\uB85C \uD3EC\uCEE4\uC2A4\uAC00 \uC774\uB3D9\uD558\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30 \uD638\uBC84\uAC00 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30 \uAC00\uB9AC\uD0A4\uAE30\uC5D0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uC2A4\uD2F0\uD0A4 \uC2A4\uD06C\uB864\uC758 \uD3EC\uCEE4\uC2A4 \uC5EC\uBD80","\uC2A4\uD2F0\uD0A4 \uC2A4\uD06C\uB864\uC758 \uAC00\uC2DC\uC131 \uC5EC\uBD80","\uB3C5\uB9BD \uC2E4\uD589\uD615 \uC0C9 \uD3B8\uC9D1\uAE30\uAC00 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80","\uB3C5\uB9BD \uC2E4\uD589\uD615 \uC0C9 \uD3B8\uC9D1\uAE30\uAC00 \uD3EC\uCEE4\uC2A4\uB418\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uAC00 \uB354 \uD070 \uD3B8\uC9D1\uAE30(\uC608: \uC804\uC790 \uD544\uAE30\uC7A5)\uC5D0 \uC18D\uD574 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC758 \uC5B8\uC5B4 \uC2DD\uBCC4\uC790","\uD3B8\uC9D1\uAE30\uC5D0 \uC644\uC131 \uD56D\uBAA9 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uCF54\uB4DC \uC791\uC5C5 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 CodeLens \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC815\uC758 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC120\uC5B8 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uAD6C\uD604 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uD615\uC2DD \uC815\uC758 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uD638\uBC84 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uBB38\uC11C \uAC15\uC870 \uD45C\uC2DC \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uBB38\uC11C \uAE30\uD638 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uCC38\uC870 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC774\uB984 \uBC14\uAFB8\uAE30 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC2DC\uADF8\uB2C8\uCC98 \uB3C4\uC6C0\uB9D0 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC778\uB77C\uC778 \uD78C\uD2B8 \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uBB38\uC11C \uC11C\uC2DD \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uBB38\uC11C \uC120\uD0DD \uC11C\uC2DD \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC5EC\uB7EC \uAC1C\uC758 \uBB38\uC11C \uC11C\uC2DD \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD3B8\uC9D1\uAE30\uC5D0 \uC5EC\uB7EC \uAC1C\uC758 \uBB38\uC11C \uC120\uD0DD \uC11C\uC2DD \uACF5\uAE09\uC790\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80"],"vs/editor/common/languages":["\uBC30\uC5F4","\uBD80\uC6B8","\uD074\uB798\uC2A4","\uC0C1\uC218","\uC0DD\uC131\uC790","\uC5F4\uAC70\uD615","\uC5F4\uAC70\uD615 \uBA64\uBC84","\uC774\uBCA4\uD2B8","\uD544\uB4DC","\uD30C\uC77C","\uD568\uC218","\uC778\uD130\uD398\uC774\uC2A4","\uD0A4","\uBA54\uC11C\uB4DC","\uBAA8\uB4C8","\uB124\uC784\uC2A4\uD398\uC774\uC2A4","Null","\uC22B\uC790","\uAC1C\uCCB4","\uC5F0\uC0B0\uC790","\uD328\uD0A4\uC9C0","\uC18D\uC131","\uBB38\uC790\uC5F4","\uAD6C\uC870\uCCB4","\uD615\uC2DD \uB9E4\uAC1C \uBCC0\uC218","\uBCC0\uC218","{0}({1})"],"vs/editor/common/languages/modesRegistry":["\uC77C\uBC18 \uD14D\uC2A4\uD2B8"],"vs/editor/common/model/editStack":["\uC785\uB825\uD558\uB294 \uC911"],"vs/editor/common/standaloneStrings":["\uAC1C\uBC1C\uC790: \uAC80\uC0AC \uD1A0\uD070","\uC904/\uC5F4\uB85C \uC774\uB3D9...","\uBE60\uB978 \uC561\uC138\uC2A4 \uACF5\uAE09\uC790 \uBAA8\uB450 \uD45C\uC2DC","\uBA85\uB839 \uD314\uB808\uD2B8","\uBA85\uB839 \uD45C\uC2DC \uBC0F \uC2E4\uD589","\uAE30\uD638\uB85C \uAC00\uC11C...","\uBC94\uC8FC\uBCC4 \uAE30\uD638\uB85C \uC774\uB3D9...","\uD3B8\uC9D1\uAE30 \uCF58\uD150\uCE20","\uC811\uADFC\uC131 \uC635\uC158\uC740 Alt+F1\uC744 \uB20C\uB7EC\uC5EC \uD569\uB2C8\uB2E4.","\uACE0\uB300\uBE44 \uD14C\uB9C8\uB85C \uC804\uD658","{1} \uD30C\uC77C\uC5D0\uC11C \uD3B8\uC9D1\uC744 {0}\uAC1C \uD588\uC2B5\uB2C8\uB2E4."],"vs/editor/common/viewLayout/viewLineRenderer":["\uC790\uC138\uD788 \uD45C\uC2DC({0})","{0}\uC790"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["\uC120\uD0DD \uC575\uCEE4 \uC9C0\uC810","{0}\uC5D0 \uC124\uC815\uB41C \uC575\uCEE4: {1}","\uC120\uD0DD \uC575\uCEE4 \uC9C0\uC810 \uC124\uC815","\uC120\uD0DD \uC575\uCEE4 \uC9C0\uC810\uC73C\uB85C \uC774\uB3D9","\uC575\uCEE4\uC5D0\uC11C \uCEE4\uC11C\uB85C \uC120\uD0DD","\uC120\uD0DD \uC575\uCEE4 \uC9C0\uC810 \uCDE8\uC18C"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["\uAD04\uD638\uC5D0 \uD574\uB2F9\uD558\uB294 \uC601\uC5ED\uC744 \uD45C\uC2DC\uC790\uC5D0 \uCC44\uC0C9\uD558\uC5EC \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uB300\uAD04\uD638\uB85C \uC774\uB3D9","\uAD04\uD638\uAE4C\uC9C0 \uC120\uD0DD","\uB300\uAD04\uD638 \uC81C\uAC70","\uB300\uAD04\uD638\uB85C \uC774\uB3D9(&&B)"],"vs/editor/contrib/caretOperations/browser/caretOperations":["\uC120\uD0DD\uD55C \uD14D\uC2A4\uD2B8\uB97C \uC67C\uCABD\uC73C\uB85C \uC774\uB3D9","\uC120\uD0DD\uD55C \uD14D\uC2A4\uD2B8\uB97C \uC624\uB978\uCABD\uC73C\uB85C \uC774\uB3D9"],"vs/editor/contrib/caretOperations/browser/transpose":["\uBB38\uC790 \uBC14\uAFB8\uAE30"],"vs/editor/contrib/clipboard/browser/clipboard":["\uC798\uB77C\uB0B4\uAE30(&&T)","\uC798\uB77C\uB0B4\uAE30","\uC798\uB77C\uB0B4\uAE30","\uC798\uB77C\uB0B4\uAE30","\uBCF5\uC0AC(&&C)","\uBCF5\uC0AC","\uBCF5\uC0AC","\uBCF5\uC0AC","\uB2E4\uC74C\uC73C\uB85C \uBCF5\uC0AC","\uB2E4\uC74C\uC73C\uB85C \uBCF5\uC0AC","\uACF5\uC720","\uACF5\uC720","\uACF5\uC720","\uBD99\uC5EC\uB123\uAE30(&&P)","\uBD99\uC5EC\uB123\uAE30","\uBD99\uC5EC\uB123\uAE30","\uBD99\uC5EC\uB123\uAE30","\uAD6C\uBB38\uC744 \uAC15\uC870 \uD45C\uC2DC\uD558\uC5EC \uBCF5\uC0AC"],"vs/editor/contrib/codeAction/browser/codeAction":["\uCF54\uB4DC \uC791\uC5C5\uC744 \uC801\uC6A9\uD558\uB294 \uC911 \uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."],"vs/editor/contrib/codeAction/browser/codeActionCommands":["\uC2E4\uD589\uD560 \uCF54\uB4DC \uC791\uC5C5\uC758 \uC885\uB958\uC785\uB2C8\uB2E4.","\uBC18\uD658\uB41C \uC791\uC5C5\uC774 \uC801\uC6A9\uB418\uB294 \uACBD\uC6B0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD56D\uC0C1 \uBC18\uD658\uB41C \uCCAB \uBC88\uC9F8 \uCF54\uB4DC \uC791\uC5C5\uC744 \uC801\uC6A9\uD569\uB2C8\uB2E4.","\uCCAB \uBC88\uC9F8 \uBC18\uD658\uB41C \uCF54\uB4DC \uC791\uC5C5\uC744 \uC801\uC6A9\uD569\uB2C8\uB2E4(\uC774 \uC791\uC5C5\uB9CC \uC788\uB294 \uACBD\uC6B0).","\uBC18\uD658\uB41C \uCF54\uB4DC \uC791\uC5C5\uC744 \uC801\uC6A9\uD558\uC9C0 \uB9C8\uC138\uC694.","\uAE30\uBCF8 \uCF54\uB4DC \uC791\uC5C5\uB9CC \uBC18\uD658\uB418\uB3C4\uB85D \uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBE60\uB978 \uC218\uC815...","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCF54\uB4DC \uB3D9\uC791\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.","'{0}'\uC5D0 \uB300\uD55C \uAE30\uBCF8 \uCF54\uB4DC \uC791\uC5C5\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","'{0}'\uC5D0 \uB300\uD55C \uCF54\uB4DC \uC791\uC5C5\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","\uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uAE30\uBCF8 \uCF54\uB4DC \uC791\uC5C5 \uC5C6\uC74C","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uCF54\uB4DC \uB3D9\uC791\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.","\uB9AC\uD329\uD130\uB9C1...","'{0}'\uC5D0 \uB300\uD55C \uAE30\uBCF8 \uB9AC\uD329\uD130\uB9C1 \uC5C6\uC74C","'{0}'\uC5D0 \uB300\uD55C \uB9AC\uD329\uD130\uB9C1 \uC5C6\uC74C","\uAE30\uBCF8 \uC124\uC815 \uB9AC\uD329\uD130\uB9C1\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uB9AC\uD399\uD130\uB9C1\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.","\uC18C\uC2A4 \uC791\uC5C5...","'{0}'\uC5D0 \uB300\uD55C \uAE30\uBCF8 \uC18C\uC2A4 \uC791\uC5C5\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","'{0}'\uC5D0 \uB300\uD55C \uC18C\uC2A4 \uC791\uC5C5\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","\uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uAE30\uBCF8 \uC6D0\uBCF8 \uC791\uC5C5 \uC5C6\uC74C","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uC18C\uC2A4 \uC791\uC5C5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.","\uAC00\uC838\uC624\uAE30 \uAD6C\uC131","\uC0AC\uC6A9 \uAC00\uB2A5\uD55C \uAC00\uC838\uC624\uAE30 \uAD6C\uC131 \uC791\uC5C5\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA8\uB450 \uC218\uC815","\uBAA8\uB4E0 \uC791\uC5C5 \uC218\uC815 \uC0AC\uC6A9 \uBD88\uAC00","\uC790\uB3D9 \uC218\uC815...","\uC0AC\uC6A9\uD560 \uC218 \uC788\uB294 \uC790\uB3D9 \uC218\uC815 \uC5C6\uC74C"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["\uCF54\uB4DC \uC791\uC5C5 \uBA54\uB274\uC5D0 \uADF8\uB8F9 \uD5E4\uB354 \uD45C\uC2DC\uB97C \uD65C\uC131\uD654/\uBE44\uD65C\uC131\uD654\uD569\uB2C8\uB2E4.","\uD604\uC7AC \uC9C4\uB2E8 \uC911\uC774 \uC544\uB2D0 \uB54C \uC904 \uB0B4\uC5D0\uC11C \uAC00\uC7A5 \uAC00\uAE4C\uC6B4 \uBE60\uB978 \uC811\uB450\uC0AC \uD45C\uC2DC\uB97C \uC0AC\uC6A9/\uC0AC\uC6A9 \uC548 \uD568\uC73C\uB85C \uC124\uC815\uD569\uB2C8\uB2E4."],"vs/editor/contrib/codeAction/browser/codeActionController":["\uCEE8\uD14D\uC2A4\uD2B8: \uC904 {1} \uBC0F \uC5F4 {2}\uC758 {0}\uC785\uB2C8\uB2E4.","\uC0AC\uC6A9\uD558\uC9C0 \uC54A\uB294 \uD56D\uBAA9 \uC228\uAE30\uAE30","\uBE44\uD65C\uC131\uD654\uB41C \uD56D\uBAA9 \uD45C\uC2DC"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["\uCD94\uAC00 \uC791\uC5C5...","\uBE60\uB978 \uC218\uC815","\uCD94\uCD9C","\uC778\uB77C\uC778","\uC7AC\uC791\uC131","\uC774\uB3D9","\uCF54\uB4DC \uAC10\uC2F8\uAE30","\uC18C\uC2A4 \uC791\uC5C5"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["\uCF54\uB4DC \uC791\uC5C5 \uD45C\uC2DC. \uAE30\uBCF8 \uC124\uC815 \uBE60\uB978 \uC218\uC815 \uC0AC\uC6A9 \uAC00\uB2A5({0})","\uCF54\uB4DC \uC791\uC5C5 \uD45C\uC2DC({0})","\uCF54\uB4DC \uC791\uC5C5 \uD45C\uC2DC"],"vs/editor/contrib/codelens/browser/codelensController":["\uD604\uC7AC \uC904\uC5D0 \uB300\uD55C \uCF54\uB4DC \uB80C\uC988 \uBA85\uB839 \uD45C\uC2DC","\uBA85\uB839 \uC120\uD0DD"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["\uC0C9 \uC635\uC158\uC744 \uD1A0\uAE00\uD558\uB824\uBA74 \uD074\uB9AD\uD558\uC138\uC694(rgb/hsl/hex).","\uC0C9 \uD3B8\uC9D1\uAE30\uB97C \uB2EB\uB294 \uC544\uC774\uCF58"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["\uB3C5\uB9BD \uC2E4\uD589\uD615 \uC0C9 \uD3B8\uC9D1\uAE30 \uD45C\uC2DC \uB610\uB294 \uD3EC\uCEE4\uC2A4","\uB3C5\uB9BD \uC2E4\uD589\uD615 \uC0C9 \uD3B8\uC9D1\uAE30 \uD45C\uC2DC \uB610\uB294 \uD3EC\uCEE4\uC2A4(&&S)","\uC0C9 \uD3B8\uC9D1\uAE30 \uC228\uAE30\uAE30","\uB3C5\uB9BD \uC2E4\uD589\uD615 \uC0C9 \uD3B8\uC9D1\uAE30\uB85C \uC0C9 \uC0BD\uC785"],"vs/editor/contrib/comment/browser/comment":["\uC904 \uC8FC\uC11D \uC124\uC815/\uD574\uC81C","\uC904 \uC8FC\uC11D \uC124\uC815/\uD574\uC81C(&&T)","\uC904 \uC8FC\uC11D \uCD94\uAC00","\uC904 \uC8FC\uC11D \uC81C\uAC70","\uBE14\uB85D \uC8FC\uC11D \uC124\uC815/\uD574\uC81C","\uBE14\uB85D \uC8FC\uC11D \uC124\uC815/\uD574\uC81C(&&B)"],"vs/editor/contrib/contextmenu/browser/contextmenu":["\uBBF8\uB2C8\uB9F5","\uBB38\uC790 \uB80C\uB354\uB9C1","\uC138\uB85C \uD06C\uAE30","\uBE44\uB840","\uCC44\uC6B0\uAE30","\uB9DE\uCDA4","\uC2AC\uB77C\uC774\uB354","\uB9C8\uC6B0\uC2A4 \uC704\uB85C","\uD56D\uC0C1","\uD3B8\uC9D1\uAE30 \uC0C1\uD669\uC5D0 \uB9DE\uB294 \uBA54\uB274 \uD45C\uC2DC"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["\uCEE4\uC11C \uC2E4\uD589 \uCDE8\uC18C","\uCEE4\uC11C \uB2E4\uC2DC \uC2E4\uD589"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["\uB2E4\uB978 \uC774\uB984\uC73C\uB85C \uBD99\uC5EC\uB123\uAE30...","\uC801\uC6A9\uD560 \uBD99\uC5EC\uB123\uAE30 \uD3B8\uC9D1\uC758 ID\uC785\uB2C8\uB2E4. \uC81C\uACF5\uD558\uC9C0 \uC54A\uC73C\uBA74 \uD3B8\uC9D1\uAE30\uC5D0 \uC120\uD0DD\uAE30\uAC00 \uD45C\uC2DC\uB429\uB2C8\uB2E4."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["\uBD99\uC5EC\uB123\uAE30 \uC704\uC82F\uC774 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80","\uBD99\uC5EC\uB123\uAE30 \uC635\uC158 \uD45C\uC2DC...","\uBD99\uC5EC\uB123\uAE30 \uCC98\uB9AC\uAE30\uB97C \uC2E4\uD589\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uCDE8\uC18C\uD558\uB824\uBA74 \uD074\uB9AD\uD558\uC138\uC694.","\uBD99\uC5EC\uB123\uAE30 \uC791\uC5C5 \uC120\uD0DD","\uBD99\uC5EC\uB123\uAE30 \uCC98\uB9AC\uAE30\uB97C \uC2E4\uD589\uD558\uB294 \uC911"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["\uAE30\uBCF8 \uC81C\uACF5","\uC77C\uBC18 \uD14D\uC2A4\uD2B8 \uC0BD\uC785","URI \uC0BD\uC785","URI \uC0BD\uC785","\uACBD\uB85C \uC0BD\uC785","\uACBD\uB85C \uC0BD\uC785","\uC0C1\uB300 \uACBD\uB85C \uC0BD\uC785","\uC0C1\uB300 \uACBD\uB85C \uC0BD\uC785"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["\uC9C0\uC815\uB41C MIME \uD615\uC2DD\uC758 \uCF58\uD150\uCE20\uC5D0 \uC0AC\uC6A9\uD560 \uAE30\uBCF8 \uB4DC\uB86D \uACF5\uAE09\uC790\uB97C \uAD6C\uC131\uD569\uB2C8\uB2E4."],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["\uB4DC\uB86D \uC704\uC82F\uC774 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80","\uB4DC\uB86D \uC635\uC158 \uD45C\uC2DC...","\uB4DC\uB86D \uCC98\uB9AC\uAE30\uB97C \uC2E4\uD589\uD558\uB294 \uC911\uC785\uB2C8\uB2E4. \uCDE8\uC18C\uD558\uB824\uBA74 \uD074\uB9AD\uD558\uC138\uC694."],"vs/editor/contrib/editorState/browser/keybindingCancellation":["\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uCDE8\uC18C \uAC00\uB2A5\uD55C \uC791\uC5C5(\uC608: '\uCC38\uC870 \uD53C\uD0B9')\uC744 \uC2E4\uD589\uD558\uB294\uC9C0 \uC5EC\uBD80"],"vs/editor/contrib/find/browser/findController":["\uD30C\uC77C\uC774 \uB108\uBB34 \uCEE4\uC11C \uBAA8\uB450 \uBC14\uAFB8\uAE30 \uC791\uC5C5\uC744 \uC218\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uCC3E\uAE30","\uCC3E\uAE30(&&F)",`"\uC815\uADDC\uC2DD \uC0AC\uC6A9" \uD50C\uB798\uADF8\uB97C \uC7AC\uC815\uC758\uD569\uB2C8\uB2E4.\r -\uD50C\uB798\uADF8\uB294 \uBBF8\uB798\uB97C \uC704\uD574 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\r -0: \uC544\uBB34\uAC83\uB3C4 \uD558\uC9C0 \uC54A\uC74C\r -1: True\r -2: False`,`"\uC804\uCCB4 \uB2E8\uC5B4 \uC77C\uCE58" \uD50C\uB798\uADF8\uB97C \uC7AC\uC815\uC758\uD569\uB2C8\uB2E4.\r -\uD50C\uB798\uADF8\uB294 \uBBF8\uB798\uB97C \uC704\uD574 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\r -0: \uC544\uBB34\uAC83\uB3C4 \uD558\uC9C0 \uC54A\uC74C\r -1: True\r -2: False`,`"Math Case" \uD50C\uB798\uADF8\uB97C \uC7AC\uC815\uC758\uD569\uB2C8\uB2E4.\r -\uD50C\uB798\uADF8\uB294 \uBBF8\uB798\uB97C \uC704\uD574 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\r -0: \uC544\uBB34\uAC83\uB3C4 \uD558\uC9C0 \uC54A\uC74C\r -1: True\r -2: False`,`"\uCF00\uC774\uC2A4 \uBCF4\uC874" \uD50C\uB798\uADF8\uB97C \uC7AC\uC815\uC758\uD569\uB2C8\uB2E4.\r -\uD50C\uB798\uADF8\uB294 \uBBF8\uB798\uB97C \uC704\uD574 \uC800\uC7A5\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.\r -0: \uC544\uBB34\uAC83\uB3C4 \uD558\uC9C0 \uC54A\uC74C\r -1: True\r -2: False`,"\uC778\uC218\uB85C \uCC3E\uAE30","\uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uCC3E\uAE30","\uB2E4\uC74C \uCC3E\uAE30","\uC774\uC804 \uCC3E\uAE30","\uC77C\uCE58 \uD56D\uBAA9\uC73C\uB85C \uC774\uB3D9...","\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uB0B4\uC6A9\uC73C\uB85C \uAC80\uC0C9\uD574 \uBCF4\uC138\uC694.","\uD2B9\uC815 \uC77C\uCE58 \uD56D\uBAA9\uC73C\uB85C \uC774\uB3D9\uD558\uB824\uBA74 \uC22B\uC790\uB97C \uC785\uB825\uD558\uC138\uC694(1~{0} \uC0AC\uC774).","1\uC5D0\uC11C {0} \uC0AC\uC774\uC758 \uC22B\uC790\uB97C \uC785\uB825\uD558\uC138\uC694","1\uC5D0\uC11C {0} \uC0AC\uC774\uC758 \uC22B\uC790\uB97C \uC785\uB825\uD558\uC138\uC694","\uB2E4\uC74C \uC120\uD0DD \uCC3E\uAE30","\uC774\uC804 \uC120\uD0DD \uCC3E\uAE30","\uBC14\uAFB8\uAE30","\uBC14\uAFB8\uAE30(&&R)"],"vs/editor/contrib/find/browser/findWidget":["\uD3B8\uC9D1\uAE30 \uCC3E\uAE30 \uC704\uC82F\uC5D0\uC11C '\uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uCC3E\uAE30'\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCC3E\uAE30 \uC704\uC82F\uC774 \uCD95\uC18C\uB418\uC5C8\uC74C\uC744 \uB098\uD0C0\uB0B4\uB294 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCC3E\uAE30 \uC704\uC82F\uC774 \uD655\uC7A5\uB418\uC5C8\uC74C\uC744 \uB098\uD0C0\uB0B4\uB294 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCC3E\uAE30 \uC704\uC82F\uC5D0\uC11C '\uBC14\uAFB8\uAE30'\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCC3E\uAE30 \uC704\uC82F\uC5D0\uC11C '\uBAA8\uB450 \uBC14\uAFB8\uAE30'\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCC3E\uAE30 \uC704\uC82F\uC5D0\uC11C '\uC774\uC804 \uCC3E\uAE30'\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uCC3E\uAE30 \uC704\uC82F\uC5D0\uC11C '\uB2E4\uC74C \uCC3E\uAE30'\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uCC3E\uAE30/\uBC14\uAFB8\uAE30","\uCC3E\uAE30","\uCC3E\uAE30","\uC774\uC804 \uAC80\uC0C9 \uACB0\uACFC","\uB2E4\uC74C \uAC80\uC0C9 \uACB0\uACFC","\uC120\uD0DD \uD56D\uBAA9\uC5D0\uC11C \uCC3E\uAE30","\uB2EB\uAE30","\uBC14\uAFB8\uAE30","\uBC14\uAFB8\uAE30","\uBC14\uAFB8\uAE30","\uBAA8\uB450 \uBC14\uAFB8\uAE30","\uBC14\uAFB8\uAE30 \uC124\uC815/\uD574\uC81C","\uCC98\uC74C {0}\uAC1C\uC758 \uACB0\uACFC\uAC00 \uAC15\uC870 \uD45C\uC2DC\uB418\uC9C0\uB9CC \uBAA8\uB4E0 \uCC3E\uAE30 \uC791\uC5C5\uC740 \uC804\uCCB4 \uD14D\uC2A4\uD2B8\uC5D0 \uB300\uD574 \uC218\uD589\uB429\uB2C8\uB2E4.","{1}\uC758 {0}","\uACB0\uACFC \uC5C6\uC74C","{0}\uAC1C \uCC3E\uC74C","'{1}'\uC5D0 \uB300\uD55C {0}\uC744(\uB97C) \uCC3E\uC74C","{2}\uC5D0\uC11C '{1}'\uC5D0 \uB300\uD55C {0}\uC744(\uB97C) \uCC3E\uC74C","'{1}'\uC5D0 \uB300\uD55C {0}\uC744(\uB97C) \uCC3E\uC74C","Ctrl+Enter\uB97C \uB204\uB974\uBA74 \uC774\uC81C \uBAA8\uB4E0 \uD56D\uBAA9\uC744 \uBC14\uAFB8\uC9C0 \uC54A\uACE0 \uC904 \uBC14\uAFC8\uC744 \uC0BD\uC785\uD569\uB2C8\uB2E4. editor.action.replaceAll\uC758 \uD0A4 \uBC14\uC778\uB529\uC744 \uC218\uC815\uD558\uC5EC \uC774 \uB3D9\uC791\uC744 \uC7AC\uC815\uC758\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."],"vs/editor/contrib/folding/browser/folding":["\uD3BC\uCE58\uAE30","\uC7AC\uADC0\uC801\uC73C\uB85C \uD3BC\uCE58\uAE30","\uC811\uAE30","\uC811\uAE30 \uC804\uD658","\uC7AC\uADC0\uC801\uC73C\uB85C \uC811\uAE30","\uBAA8\uB4E0 \uBE14\uB85D \uCF54\uBA58\uD2B8\uB97C \uC811\uAE30","\uBAA8\uB4E0 \uC601\uC5ED \uC811\uAE30","\uBAA8\uB4E0 \uC601\uC5ED \uD3BC\uCE58\uAE30","\uC120\uD0DD\uD55C \uD56D\uBAA9\uC744 \uC81C\uC678\uD55C \uBAA8\uB4E0 \uD56D\uBAA9 \uC811\uAE30","\uC120\uD0DD\uD55C \uD56D\uBAA9\uC744 \uC81C\uC678\uD55C \uBAA8\uB4E0 \uD56D\uBAA9 \uD45C\uC2DC","\uBAA8\uB450 \uC811\uAE30","\uBAA8\uB450 \uD3BC\uCE58\uAE30","\uBD80\uBAA8 \uD3F4\uB529\uC73C\uB85C \uC774\uB3D9","\uC774\uC804 \uC811\uAE30 \uBC94\uC704\uB85C \uC774\uB3D9","\uB2E4\uC74C \uC811\uAE30 \uBC94\uC704\uB85C \uC774\uB3D9","\uC120\uD0DD \uC601\uC5ED\uC5D0\uC11C \uC811\uAE30 \uBC94\uC704 \uB9CC\uB4E4\uAE30","\uC218\uB3D9 \uD3F4\uB529 \uBC94\uC704 \uC81C\uAC70","\uC218\uC900 {0} \uC811\uAE30"],"vs/editor/contrib/folding/browser/foldingDecorations":["\uC811\uD78C \uBC94\uC704\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC0C9\uC740 \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uAE30 \uC704\uD574 \uBD88\uD22C\uBA85\uD574\uC11C\uB294 \uC548 \uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC5EC\uBC31\uC758 \uC811\uAE30 \uCEE8\uD2B8\uB864 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uBB38\uC790 \uBAA8\uC591 \uC5EC\uBC31\uC5D0\uC11C \uD655\uC7A5\uB41C \uBC94\uC704\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uBB38\uC790 \uBAA8\uC591 \uC5EC\uBC31\uC5D0\uC11C \uCD95\uC18C\uB41C \uBC94\uC704\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uBB38\uC790 \uBAA8\uC591 \uC5EC\uBC31\uC5D0\uC11C \uC218\uB3D9\uC73C\uB85C \uCD95\uC18C\uB41C \uBC94\uC704\uC5D0 \uB300\uD55C \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uBB38\uC790 \uBAA8\uC591 \uC5EC\uBC31\uC5D0\uC11C \uC218\uB3D9\uC73C\uB85C \uD655\uC7A5\uB41C \uBC94\uC704\uC5D0 \uB300\uD55C \uC544\uC774\uCF58\uC785\uB2C8\uB2E4."],"vs/editor/contrib/fontZoom/browser/fontZoom":["\uD3B8\uC9D1\uAE30 \uAE00\uAF34 \uD655\uB300","\uD3B8\uC9D1\uAE30 \uAE00\uAF34 \uCD95\uC18C","\uD3B8\uC9D1\uAE30 \uAE00\uAF34 \uD655\uB300/\uCD95\uC18C \uB2E4\uC2DC \uC124\uC815"],"vs/editor/contrib/format/browser/format":["\uC904 {0}\uC5D0\uC11C 1\uAC1C \uC11C\uC2DD \uD3B8\uC9D1\uC744 \uC218\uD589\uD588\uC2B5\uB2C8\uB2E4.","\uC904 {1}\uC5D0\uC11C {0}\uAC1C \uC11C\uC2DD \uD3B8\uC9D1\uC744 \uC218\uD589\uD588\uC2B5\uB2C8\uB2E4.","\uC904 {0}\uACFC(\uC640) {1} \uC0AC\uC774\uC5D0\uC11C 1\uAC1C \uC11C\uC2DD \uD3B8\uC9D1\uC744 \uC218\uD589\uD588\uC2B5\uB2C8\uB2E4.","\uC904 {1}\uACFC(\uC640) {2} \uC0AC\uC774\uC5D0\uC11C {0}\uAC1C \uC11C\uC2DD \uD3B8\uC9D1\uC744 \uC218\uD589\uD588\uC2B5\uB2C8\uB2E4."],"vs/editor/contrib/format/browser/formatActions":["\uBB38\uC11C \uC11C\uC2DD","\uC120\uD0DD \uC601\uC5ED \uC11C\uC2DD"],"vs/editor/contrib/gotoError/browser/gotoError":["\uB2E4\uC74C \uBB38\uC81C\uB85C \uC774\uB3D9 (\uC624\uB958, \uACBD\uACE0, \uC815\uBCF4)","\uB2E4\uC74C \uB9C8\uCEE4\uB85C \uC774\uB3D9\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uC774\uC804 \uBB38\uC81C\uB85C \uC774\uB3D9 (\uC624\uB958, \uACBD\uACE0, \uC815\uBCF4)","\uC774\uC804 \uB9C8\uCEE4\uB85C \uC774\uB3D9\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uD30C\uC77C\uC758 \uB2E4\uC74C \uBB38\uC81C\uB85C \uC774\uB3D9 (\uC624\uB958, \uACBD\uACE0, \uC815\uBCF4)","\uB2E4\uC74C \uBB38\uC81C(&&P)","\uD30C\uC77C\uC758 \uC774\uC804 \uBB38\uC81C\uB85C \uC774\uB3D9 (\uC624\uB958, \uACBD\uACE0, \uC815\uBCF4)","\uC774\uC804 \uBB38\uC81C(&&P)"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["\uC624\uB958","\uACBD\uACE0","\uC815\uBCF4","\uD78C\uD2B8","{1}\uC758 {0}\uC785\uB2C8\uB2E4. ","\uBB38\uC81C {1}\uAC1C \uC911 {0}\uAC1C","\uBB38\uC81C {1}\uAC1C \uC911 {0}\uAC1C","\uD3B8\uC9D1\uAE30 \uD45C\uC2DD \uD0D0\uC0C9 \uC704\uC82F \uC624\uB958 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB9C8\uCEE4 \uD0D0\uC0C9 \uC704\uC82F \uC624\uB958 \uC81C\uBAA9 \uBC30\uACBD.","\uD3B8\uC9D1\uAE30 \uD45C\uC2DD \uD0D0\uC0C9 \uC704\uC82F \uACBD\uACE0 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB9C8\uCEE4 \uD0D0\uC0C9 \uC704\uC82F \uACBD\uACE0 \uC81C\uBAA9 \uBC30\uACBD.","\uD3B8\uC9D1\uAE30 \uD45C\uC2DD \uD0D0\uC0C9 \uC704\uC82F \uC815\uBCF4 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB9C8\uCEE4 \uD0D0\uC0C9 \uC704\uC82F \uC815\uBCF4 \uC81C\uBAA9 \uBC30\uACBD.","\uD3B8\uC9D1\uAE30 \uD45C\uC2DD \uD0D0\uC0C9 \uC704\uC82F \uBC30\uACBD\uC785\uB2C8\uB2E4."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["\uD53C\uD0B9","\uC815\uC758","'{0}'\uC5D0 \uB300\uD55C \uC815\uC758\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uC815\uC758\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C","\uC815\uC758\uB85C \uC774\uB3D9","\uC815\uC758\uB85C \uC774\uB3D9(&&D)","\uCE21\uBA74\uC5D0\uC11C \uC815\uC758 \uC5F4\uAE30","\uC815\uC758 \uD53C\uD0B9","\uC120\uC5B8","'{0}'\uC5D0 \uB300\uD55C \uC120\uC5B8\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C","\uC120\uC5B8\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C","\uC120\uC5B8\uC73C\uB85C \uC774\uB3D9","\uC120\uC5B8\uC73C\uB85C \uC774\uB3D9(&&D)","'{0}'\uC5D0 \uB300\uD55C \uC120\uC5B8\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C","\uC120\uC5B8\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC74C","\uC120\uC5B8 \uBBF8\uB9AC \uBCF4\uAE30","\uD615\uC2DD \uC815\uC758","'{0}'\uC5D0 \uB300\uD55C \uD615\uC2DD \uC815\uC758\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uD615\uC2DD \uC815\uC758\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uD615\uC2DD \uC815\uC758\uB85C \uC774\uB3D9","\uD615\uC2DD \uC815\uC758\uB85C \uC774\uB3D9(&&T)","\uD615\uC2DD \uC815\uC758 \uBBF8\uB9AC \uBCF4\uAE30","\uAD6C\uD604","'{0}'\uC5D0 \uB300\uD55C \uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uAD6C\uD604\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uAD6C\uD604\uC73C\uB85C \uC774\uB3D9","\uAD6C\uD604\uC73C\uB85C \uC774\uB3D9(&&I)","\uD53C\uD0B9 \uAD6C\uD604","'{0}'\uC5D0 \uB300\uD55C \uCC38\uC870\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uCC38\uC870\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uCC38\uC870\uB85C \uC774\uB3D9","\uCC38\uC870\uB85C \uC774\uB3D9(&&R)","\uCC38\uC870","\uCC38\uC870 \uBBF8\uB9AC \uBCF4\uAE30","\uCC38\uC870","\uC784\uC758\uC758 \uAE30\uD638\uB85C \uC774\uB3D9","\uC704\uCE58","'{0}'\uC5D0 \uB300\uD55C \uAC80\uC0C9 \uACB0\uACFC\uAC00 \uC5C6\uC74C","\uCC38\uC870"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["{0}\uAC1C \uC815\uC758\uB97C \uD45C\uC2DC\uD558\uB824\uBA74 \uD074\uB9AD\uD558\uC138\uC694."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["'\uCC38\uC870 \uD53C\uD0B9' \uB610\uB294 '\uC815\uC758 \uD53C\uD0B9'\uACFC \uAC19\uC774 \uCC38\uC870 \uD53C\uD0B9\uC774 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80","\uB85C\uB4DC \uC911...","{0}({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["\uCC38\uC870 {0}\uAC1C","\uCC38\uC870 {0}\uAC1C","\uCC38\uC870"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["\uBBF8\uB9AC \uBCF4\uAE30\uB97C \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","\uACB0\uACFC \uC5C6\uC74C","\uCC38\uC870"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["{2} \uC5F4\uC5D0 \uC788\uB294 {1} \uD589\uC758 {0}\uC5D0","{3} \uC5F4\uC5D0\uC11C {2} \uD589\uC758 {1}\uC5D0 {0}","{0}\uC758 \uAE30\uD638 1\uAC1C, \uC804\uCCB4 \uACBD\uB85C {1}","{1}\uC758 \uAE30\uD638 {0}\uAC1C, \uC804\uCCB4 \uACBD\uB85C {2}","\uACB0\uACFC \uC5C6\uC74C","{0}\uC5D0\uC11C \uAE30\uD638 1\uAC1C\uB97C \uCC3E\uC558\uC2B5\uB2C8\uB2E4.","{1}\uC5D0\uC11C \uAE30\uD638 {0}\uAC1C\uB97C \uCC3E\uC558\uC2B5\uB2C8\uB2E4.","{1}\uAC1C \uD30C\uC77C\uC5D0\uC11C \uAE30\uD638 {0}\uAC1C\uB97C \uCC3E\uC558\uC2B5\uB2C8\uB2E4."],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["\uD0A4\uBCF4\uB4DC\uB9CC\uC73C\uB85C \uD0D0\uC0C9\uD560 \uC218 \uC788\uB294 \uAE30\uD638 \uC704\uCE58\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","{1}\uC758 {0} \uAE30\uD638, \uB2E4\uC74C\uC758 \uACBD\uC6B0 {2}","{1}\uC758 \uAE30\uD638 {0}"],"vs/editor/contrib/hover/browser/hover":["\uAC00\uB9AC\uD0A4\uAE30 \uB610\uB294 \uD3EC\uCEE4\uC2A4 \uD45C\uC2DC","\uC815\uC758 \uBBF8\uB9AC \uBCF4\uAE30 \uAC00\uB9AC\uD0A8 \uD56D\uBAA9 \uD45C\uC2DC","\uC704\uB85C \uC2A4\uD06C\uB864 \uAC00\uB9AC\uD0A4\uAE30","\uC544\uB798\uB85C \uC2A4\uD06C\uB864 \uAC00\uB9AC\uD0A4\uAE30","\uC67C\uCABD\uC73C\uB85C \uC2A4\uD06C\uB864 \uAC00\uB9AC\uD0A4\uAE30","\uC624\uB978\uCABD\uC73C\uB85C \uC2A4\uD06C\uB864 \uAC00\uB9AC\uD0A4\uAE30","\uD398\uC774\uC9C0 \uC704\uB85C \uAC00\uB9AC\uD0A4\uAE30","\uD398\uC774\uC9C0 \uC544\uB798\uCABD \uAC00\uB9AC\uD0A4\uAE30","\uC704\uCABD \uAC00\uB9AC\uD0A4\uAE30\uB85C \uC774\uB3D9","\uC544\uB798\uCABD \uAC00\uB9AC\uD0A4\uAE30\uB85C \uC774\uB3D9"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["\uB85C\uB4DC \uC911...","\uC131\uB2A5\uC0C1\uC758 \uC774\uC720\uB85C \uAE34 \uC904\uB85C \uC778\uD574 \uB80C\uB354\uB9C1\uC774 \uC77C\uC2DC \uC911\uC9C0\uB418\uC5C8\uC2B5\uB2C8\uB2E4. `editor.stopRenderingLineAfter`\uB97C \uD1B5\uD574 \uAD6C\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC131\uB2A5\uC0C1\uC758 \uC774\uC720\uB85C \uAE34 \uC904\uC758 \uACBD\uC6B0 \uD1A0\uD070\uD654\uB97C \uAC74\uB108\uB701\uB2C8\uB2E4. \uC774 \uD56D\uBAA9\uC740 'editor.maxTokenizationLineLength'\uB97C \uD1B5\uD574 \uAD6C\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."],"vs/editor/contrib/hover/browser/markerHoverParticipant":["\uBB38\uC81C \uBCF4\uAE30","\uBE60\uB978 \uC218\uC815\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","\uBE60\uB978 \uC218\uC815\uC744 \uD655\uC778\uD558\uB294 \uC911...","\uBE60\uB978 \uC218\uC815\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC74C","\uBE60\uB978 \uC218\uC815..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["\uC774\uC804 \uAC12\uC73C\uB85C \uBC14\uAFB8\uAE30","\uB2E4\uC74C \uAC12\uC73C\uB85C \uBC14\uAFB8\uAE30"],"vs/editor/contrib/indentation/browser/indentation":["\uB4E4\uC5EC\uC4F0\uAE30\uB97C \uACF5\uBC31\uC73C\uB85C \uBCC0\uD658","\uB4E4\uC5EC\uC4F0\uAE30\uB97C \uD0ED\uC73C\uB85C \uBCC0\uD658","\uAD6C\uC131\uB41C \uD0ED \uD06C\uAE30","\uAE30\uBCF8 \uD0ED \uD06C\uAE30","\uD604\uC7AC \uD0ED \uD06C\uAE30","\uD604\uC7AC \uD30C\uC77C\uC758 \uD0ED \uD06C\uAE30 \uC120\uD0DD","\uD0ED\uC744 \uC0AC\uC6A9\uD55C \uB4E4\uC5EC\uC4F0\uAE30","\uACF5\uBC31\uC744 \uC0AC\uC6A9\uD55C \uB4E4\uC5EC\uC4F0\uAE30","\uD0ED \uD45C\uC2DC \uD06C\uAE30 \uBCC0\uACBD","\uCF58\uD150\uCE20\uC5D0\uC11C \uB4E4\uC5EC\uC4F0\uAE30 \uAC10\uC9C0","\uC904 \uB2E4\uC2DC \uB4E4\uC5EC\uC4F0\uAE30","\uC120\uD0DD\uD55C \uC904 \uB2E4\uC2DC \uB4E4\uC5EC\uC4F0\uAE30"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["\uC0BD\uC785\uD558\uB824\uBA74 \uB450 \uBC88 \uD074\uB9AD","Cmd+\uD074\uB9AD","Ctrl+\uD074\uB9AD","Option+\uD074\uB9AD","Alt+\uD074\uB9AD","\uC815\uC758({0})\uB85C \uC774\uB3D9\uD558\uC5EC \uC790\uC138\uD788 \uC54C\uC544\uBCF4\uB824\uBA74 \uB9C8\uC6B0\uC2A4 \uC624\uB978\uCABD \uB2E8\uCD94\uB97C \uD074\uB9AD\uD569\uB2C8\uB2E4.","\uC815\uC758\uB85C \uC774\uB3D9({0})","\uBA85\uB839 \uC2E4\uD589"],"vs/editor/contrib/inlineCompletions/browser/commands":["\uB2E4\uC74C \uC778\uB77C\uC778 \uC81C\uC548 \uD45C\uC2DC","\uC774\uC804 \uC778\uB77C\uC778 \uC81C\uC548 \uD45C\uC2DC","\uC778\uB77C\uC778 \uC81C\uC548 \uD2B8\uB9AC\uAC70","\uC778\uB77C\uC778 \uC81C\uC548\uC758 \uB2E4\uC74C \uB2E8\uC5B4 \uC218\uB77D","\uB2E8\uC5B4 \uC218\uB77D","\uC778\uB77C\uC778 \uC81C\uC548\uC758 \uB2E4\uC74C \uC904 \uC218\uB77D","\uC904 \uC218\uB77D","\uC778\uB77C\uC778 \uCD94\uCC9C \uC218\uB77D","\uC218\uB77D","\uC778\uB77C\uC778 \uC81C\uC548 \uC228\uAE30\uAE30","\uD56D\uC0C1 \uB3C4\uAD6C \uBAA8\uC74C \uD45C\uC2DC"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["\uC81C\uC548:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["\uC778\uB77C\uC778 \uC81C\uC548 \uD45C\uC2DC \uC5EC\uBD80","\uC778\uB77C\uC778 \uC81C\uC548\uC774 \uACF5\uBC31\uC73C\uB85C \uC2DC\uC791\uD558\uB294\uC9C0 \uC5EC\uBD80","\uC778\uB77C\uC778 \uC81C\uC548\uC774 \uD0ED\uC5D0 \uC758\uD574 \uC0BD\uC785\uB418\uB294 \uAC83\uBCF4\uB2E4 \uC791\uC740 \uACF5\uBC31\uC73C\uB85C \uC2DC\uC791\uD558\uB294\uC9C0 \uC5EC\uBD80","\uD604\uC7AC \uC81C\uC548\uC5D0 \uB300\uD55C \uC81C\uC548 \uD45C\uC2DC \uC5EC\uBD80"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["\uC811\uADFC\uC131 \uBCF4\uAE30\uC5D0\uC11C \uC774\uB97C \uAC80\uC0AC({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["\uB2E4\uC74C \uB9E4\uAC1C \uBCC0\uC218 \uD78C\uD2B8 \uD45C\uC2DC\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uC774\uC804 \uB9E4\uAC1C \uBCC0\uC218 \uD78C\uD2B8 \uD45C\uC2DC\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","{0}({1})","\uC774\uC804","\uB2E4\uC74C"],"vs/editor/contrib/lineSelection/browser/lineSelection":["\uC120 \uC120\uD0DD \uC601\uC5ED \uD655\uC7A5"],"vs/editor/contrib/linesOperations/browser/linesOperations":["\uC704\uC5D0 \uC904 \uBCF5\uC0AC","\uC704\uC5D0 \uC904 \uBCF5\uC0AC(&&C)","\uC544\uB798\uC5D0 \uC904 \uBCF5\uC0AC","\uC544\uB798\uC5D0 \uC904 \uBCF5\uC0AC(&&P)","\uC911\uBCF5\uB41C \uC120\uD0DD \uC601\uC5ED","\uC911\uBCF5\uB41C \uC120\uD0DD \uC601\uC5ED(&&D)","\uC904 \uC704\uB85C \uC774\uB3D9","\uC904 \uC704\uB85C \uC774\uB3D9(&&V)","\uC904 \uC544\uB798\uB85C \uC774\uB3D9","\uC904 \uC544\uB798\uB85C \uC774\uB3D9(&&L)","\uC904\uC744 \uC624\uB984\uCC28\uC21C \uC815\uB82C","\uC904\uC744 \uB0B4\uB9BC\uCC28\uC21C\uC73C\uB85C \uC815\uB82C","\uC911\uBCF5 \uB77C\uC778 \uC0AD\uC81C","\uD6C4\uD589 \uACF5\uBC31 \uC790\uB974\uAE30","\uC904 \uC0AD\uC81C","\uC904 \uB4E4\uC5EC\uC4F0\uAE30","\uC904 \uB0B4\uC5B4\uC4F0\uAE30","\uC704\uC5D0 \uC904 \uC0BD\uC785","\uC544\uB798\uC5D0 \uC904 \uC0BD\uC785","\uC67C\uCABD \uBAA8\uB450 \uC0AD\uC81C","\uC6B0\uCE21\uC5D0 \uC788\uB294 \uD56D\uBAA9 \uC0AD\uC81C","\uC904 \uC5F0\uACB0","\uCEE4\uC11C \uC8FC\uC704 \uBB38\uC790 \uBC14\uAFB8\uAE30","\uB300\uBB38\uC790\uB85C \uBCC0\uD658","\uC18C\uBB38\uC790\uB85C \uBCC0\uD658","\uB2E8\uC5B4\uC758 \uCCAB \uAE00\uC790\uB97C \uB300\uBB38\uC790\uB85C \uBCC0\uD658","\uC2A4\uB124\uC774\uD06C \uD45C\uAE30\uBC95\uC73C\uB85C \uBCC0\uD658","Camel Case\uB85C \uBCC0\uD658","Kebab \uC0AC\uB840\uB85C \uBCC0\uD658"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["\uC5F0\uACB0\uB41C \uD3B8\uC9D1 \uC2DC\uC791","\uD615\uC2DD\uC758 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC790\uB3D9\uC73C\uB85C \uC774\uB984\uC744 \uBC14\uAFC0 \uB54C\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4."],"vs/editor/contrib/links/browser/links":["{0} \uD615\uC2DD\uC774 \uC62C\uBC14\uB974\uC9C0 \uC54A\uC73C\uBBC0\uB85C \uC774 \uB9C1\uD06C\uB97C \uC5F4\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4","\uB300\uC0C1\uC774 \uC5C6\uC73C\uBBC0\uB85C \uC774 \uB9C1\uD06C\uB97C \uC5F4\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.","\uBA85\uB839 \uC2E4\uD589","\uB9C1\uD06C\uB85C \uC774\uB3D9","Cmd+\uD074\uB9AD","Ctrl+\uD074\uB9AD","Option+\uD074\uB9AD","Alt+\uD074\uB9AD","\uBA85\uB839 {0} \uC2E4\uD589","\uB9C1\uD06C \uC5F4\uAE30"],"vs/editor/contrib/message/browser/messageController":["\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD604\uC7AC \uC778\uB77C\uC778 \uBA54\uC2DC\uC9C0\uB97C \uD45C\uC2DC\uD558\uB294\uC9C0 \uC5EC\uBD80"],"vs/editor/contrib/multicursor/browser/multicursor":["\uCEE4\uC11C\uAC00 \uCD94\uAC00\uB428: {0}","\uCEE4\uC11C\uAC00 \uCD94\uAC00\uB428: {0}","\uC704\uC5D0 \uCEE4\uC11C \uCD94\uAC00","\uC704\uC5D0 \uCEE4\uC11C \uCD94\uAC00(&&A)","\uC544\uB798\uC5D0 \uCEE4\uC11C \uCD94\uAC00","\uC544\uB798\uC5D0 \uCEE4\uC11C \uCD94\uAC00(&&D)","\uC904 \uB05D\uC5D0 \uCEE4\uC11C \uCD94\uAC00","\uC904 \uB05D\uC5D0 \uCEE4\uC11C \uCD94\uAC00(&&U)","\uB9E8 \uC544\uB798\uC5D0 \uCEE4\uC11C \uCD94\uAC00","\uB9E8 \uC704\uC5D0 \uCEE4\uC11C \uCD94\uAC00","\uB2E4\uC74C \uC77C\uCE58 \uD56D\uBAA9 \uCC3E\uAE30\uC5D0 \uC120\uD0DD \uD56D\uBAA9 \uCD94\uAC00","\uB2E4\uC74C \uD56D\uBAA9 \uCD94\uAC00(&&N)","\uC774\uC804 \uC77C\uCE58 \uD56D\uBAA9 \uCC3E\uAE30\uC5D0 \uC120\uD0DD \uD56D\uBAA9 \uCD94\uAC00","\uC774\uC804 \uD56D\uBAA9 \uCD94\uAC00(&&R)","\uB2E4\uC74C \uC77C\uCE58 \uD56D\uBAA9 \uCC3E\uAE30\uB85C \uB9C8\uC9C0\uB9C9 \uC120\uD0DD \uD56D\uBAA9 \uC774\uB3D9","\uB9C8\uC9C0\uB9C9 \uC120\uD0DD \uD56D\uBAA9\uC744 \uC774\uC804 \uC77C\uCE58 \uD56D\uBAA9 \uCC3E\uAE30\uB85C \uC774\uB3D9","\uC77C\uCE58 \uD56D\uBAA9 \uCC3E\uAE30\uC758 \uBAA8\uB4E0 \uD56D\uBAA9 \uC120\uD0DD","\uBAA8\uB4E0 \uD56D\uBAA9 \uC120\uD0DD(&&O)","\uBAA8\uB4E0 \uD56D\uBAA9 \uBCC0\uACBD","\uB2E4\uC74C \uCEE4\uC11C \uD3EC\uCEE4\uC2A4","\uB2E4\uC74C \uCEE4\uC11C\uC5D0 \uD3EC\uCEE4\uC2A4\uB97C \uB9DE\uCDA5\uB2C8\uB2E4.","\uC774\uC804 \uCEE4\uC11C \uD3EC\uCEE4\uC2A4","\uC774\uC804 \uCEE4\uC11C\uC5D0 \uD3EC\uCEE4\uC2A4\uB97C \uB9DE\uCDA5\uB2C8\uB2E4."],"vs/editor/contrib/parameterHints/browser/parameterHints":["\uB9E4\uAC1C \uBCC0\uC218 \uD78C\uD2B8 \uD2B8\uB9AC\uAC70"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["\uB2E4\uC74C \uB9E4\uAC1C \uBCC0\uC218 \uD78C\uD2B8 \uD45C\uC2DC\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uC774\uC804 \uB9E4\uAC1C \uBCC0\uC218 \uD78C\uD2B8 \uD45C\uC2DC\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","{0}, \uD78C\uD2B8","\uB9E4\uAC1C \uBCC0\uC218 \uD78C\uD2B8\uC5D0 \uC788\uB294 \uD65C\uC131 \uD56D\uBAA9\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4."],"vs/editor/contrib/peekView/browser/peekView":["\uD604\uC7AC \uCF54\uB4DC \uD3B8\uC9D1\uAE30\uAC00 \uD53C\uD0B9 \uB0B4\uBD80\uC5D0 \uD3EC\uD568\uB418\uC5C8\uB294\uC9C0 \uC5EC\uBD80","\uB2EB\uAE30","Peek \uBDF0 \uC81C\uBAA9 \uC601\uC5ED\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uC81C\uBAA9 \uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uC81C\uBAA9 \uC815\uBCF4 \uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uD14C\uB450\uB9AC \uBC0F \uD654\uC0B4\uD45C \uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uACB0\uACFC \uBAA9\uB85D\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uACB0\uACFC \uBAA9\uB85D\uC5D0\uC11C \uB77C\uC778 \uB178\uB4DC\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uACB0\uACFC \uBAA9\uB85D\uC5D0\uC11C \uD30C\uC77C \uB178\uB4DC\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uACB0\uACFC \uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD\uB41C \uD56D\uBAA9\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uACB0\uACFC \uBAA9\uB85D\uC5D0\uC11C \uC120\uD0DD\uB41C \uD56D\uBAA9\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uD3B8\uC9D1\uAE30\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uD3B8\uC9D1\uAE30\uC758 \uAC70\uD130 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD53C\uD0B9 \uBDF0 \uD3B8\uC9D1\uAE30\uC758 \uACE0\uC815 \uC2A4\uD06C\uB864 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uACB0\uACFC \uBAA9\uB85D\uC758 \uC77C\uCE58 \uD56D\uBAA9 \uAC15\uC870 \uD45C\uC2DC \uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uD3B8\uC9D1\uAE30\uC758 \uC77C\uCE58 \uD56D\uBAA9 \uAC15\uC870 \uD45C\uC2DC \uC0C9\uC785\uB2C8\uB2E4.","Peek \uBDF0 \uD3B8\uC9D1\uAE30\uC758 \uC77C\uCE58 \uD56D\uBAA9 \uAC15\uC870 \uD45C\uC2DC \uD14C\uB450\uB9AC\uC785\uB2C8\uB2E4."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["\uC6B0\uC120 \uD14D\uC2A4\uD2B8 \uD3B8\uC9D1\uAE30\uB97C \uC5F4\uACE0 \uC904\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","\uC904 {0} \uBC0F \uBB38\uC790 {1}(\uC73C)\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","{0} \uC904\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","\uD604\uC7AC \uC904: {0}, \uBB38\uC790: {1} \uC774\uB3D9\uD560 \uC904 1~{2} \uC0AC\uC774\uC758 \uBC88\uD638\uB97C \uC785\uB825\uD569\uB2C8\uB2E4.","\uD604\uC7AC \uC904: {0}, \uBB38\uC790: {1}. \uC774\uB3D9\uD560 \uC904 \uBC88\uD638\uB97C \uC785\uB825\uD569\uB2C8\uB2E4."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["\uAE30\uD638\uB85C \uC774\uB3D9\uD558\uB824\uBA74 \uBA3C\uC800 \uAE30\uD638 \uC815\uBCF4\uAC00 \uC788\uB294 \uD14D\uC2A4\uD2B8 \uD3B8\uC9D1\uAE30\uB97C \uC5FD\uB2C8\uB2E4.","\uD65C\uC131 \uC0C1\uD0DC\uC758 \uD14D\uC2A4\uD2B8 \uD3B8\uC9D1\uAE30\uB294 \uAE30\uD638 \uC815\uBCF4\uB97C \uC81C\uACF5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC77C\uCE58\uD558\uB294 \uD3B8\uC9D1\uAE30 \uAE30\uD638 \uC5C6\uC74C","\uD3B8\uC9D1\uAE30 \uAE30\uD638 \uC5C6\uC74C","\uCE21\uBA74\uC5D0\uC11C \uC5F4\uAE30","\uD558\uB2E8\uC5D0 \uC5F4\uAE30","\uAE30\uD638({0})","\uC18D\uC131({0})","\uBA54\uC11C\uB4DC({0})","\uD568\uC218({0})","\uC0DD\uC131\uC790({0})","\uBCC0\uC218({0})","\uD074\uB798\uC2A4({0})","\uAD6C\uC870\uCCB4({0})","\uC774\uBCA4\uD2B8({0})","\uC5F0\uC0B0\uC790({0})","\uC778\uD130\uD398\uC774\uC2A4({0})","\uB124\uC784\uC2A4\uD398\uC774\uC2A4({0})","\uD328\uD0A4\uC9C0({0})","\uD615\uC2DD \uB9E4\uAC1C \uBCC0\uC218({0})","\uBAA8\uB4C8({0})","\uC18D\uC131({0})","\uC5F4\uAC70\uD615({0})","\uC5F4\uAC70\uD615 \uBA64\uBC84({0})","\uBB38\uC790\uC5F4({0})","\uD30C\uC77C({0})","\uBC30\uC5F4({0})","\uC22B\uC790({0})","\uBD80\uC6B8({0})","\uAC1C\uCCB4({0})","\uD0A4({0})","\uD544\uB4DC({0})","\uC0C1\uC218({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["\uC77D\uAE30 \uC804\uC6A9 \uC785\uB825\uC5D0\uC11C\uB294 \uD3B8\uC9D1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uC77D\uAE30 \uC804\uC6A9 \uD3B8\uC9D1\uAE30\uC5D0\uC11C\uB294 \uD3B8\uC9D1\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."],"vs/editor/contrib/rename/browser/rename":["\uACB0\uACFC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uC704\uCE58 \uC774\uB984\uC744 \uBC14\uAFB8\uB294 \uC911 \uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4.","'{0}'\uC5D0\uC11C '{1}'(\uC73C)\uB85C \uC774\uB984\uC744 \uBC14\uAFB8\uB294 \uC911","{1}\uC5D0 {0} \uC774\uB984 \uBC14\uAFB8\uAE30","'{0}'\uC744(\uB97C) '{1}'(\uC73C)\uB85C \uC774\uB984\uC744 \uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4. \uC694\uC57D: {2}","\uC774\uB984 \uBC14\uAFB8\uAE30\uB97C \uD1B5\uD574 \uD3B8\uC9D1 \uB0B4\uC6A9\uC744 \uC801\uC6A9\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.","\uC774\uB984 \uBC14\uAFB8\uAE30\uB97C \uD1B5\uD574 \uD3B8\uC9D1 \uB0B4\uC6A9\uC744 \uACC4\uC0B0\uD558\uC9C0 \uBABB\uD588\uC2B5\uB2C8\uB2E4.","\uAE30\uD638 \uC774\uB984 \uBC14\uAFB8\uAE30","\uC774\uB984\uC744 \uBC14\uAFB8\uAE30 \uC804\uC5D0 \uBCC0\uACBD \uB0B4\uC6A9\uC744 \uBBF8\uB9AC \uBCFC \uC218 \uC788\uB294 \uAE30\uB2A5 \uC0AC\uC6A9/\uC0AC\uC6A9 \uC548 \uD568"],"vs/editor/contrib/rename/browser/renameInputField":["\uC785\uB825 \uC774\uB984 \uBC14\uAFB8\uAE30 \uC704\uC82F\uC774 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80","\uC785\uB825 \uC774\uB984\uC744 \uBC14\uAFB8\uC138\uC694. \uC0C8 \uC774\uB984\uC744 \uC785\uB825\uD55C \uB2E4\uC74C [Enter] \uD0A4\uB97C \uB20C\uB7EC \uCEE4\uBC0B\uD558\uC138\uC694.","\uC774\uB984 \uBC14\uAFB8\uAE30 {0}, \uBBF8\uB9AC \uBCF4\uAE30 {1}"],"vs/editor/contrib/smartSelect/browser/smartSelect":["\uC120\uD0DD \uC601\uC5ED \uD655\uC7A5","\uC120\uD0DD \uC601\uC5ED \uD655\uC7A5(&&E)","\uC120\uD0DD \uC601\uC5ED \uCD95\uC18C","\uC120\uD0DD \uC601\uC5ED \uCD95\uC18C(&&S)"],"vs/editor/contrib/snippet/browser/snippetController2":["\uD604\uC7AC \uD3B8\uC9D1\uAE30\uAC00 \uCF54\uB4DC \uC870\uAC01 \uBAA8\uB4DC\uC778\uC9C0 \uC5EC\uBD80","\uCF54\uB4DC \uC870\uAC01 \uBAA8\uB4DC\uC77C \uB54C \uB2E4\uC74C \uD0ED \uC815\uC9C0\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uCF54\uB4DC \uC870\uAC01 \uBAA8\uB4DC\uC77C \uB54C \uC774\uC804 \uD0ED \uC815\uC9C0\uAC00 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uB2E4\uC74C \uC790\uB9AC \uD45C\uC2DC\uC790\uB85C \uC774\uB3D9..."],"vs/editor/contrib/snippet/browser/snippetVariables":["\uC77C\uC694\uC77C","\uC6D4\uC694\uC77C","\uD654\uC694\uC77C","\uC218\uC694\uC77C","\uBAA9\uC694\uC77C","\uAE08\uC694\uC77C","\uD1A0\uC694\uC77C","\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0","1\uC6D4","2\uC6D4","3\uC6D4","4\uC6D4","5\uC6D4","6\uC6D4","7\uC6D4","8\uC6D4","9\uC6D4","10\uC6D4","11\uC6D4","12\uC6D4","1\uC6D4","2\uC6D4","3\uC6D4","4\uC6D4","5\uC6D4","6\uC6D4","7\uC6D4","8\uC6D4","9\uC6D4","10\uC6D4","11\uC6D4","12\uC6D4"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["\uACE0\uC815 \uC2A4\uD06C\uB864 \uD1A0\uAE00","\uACE0\uC815 \uC2A4\uD06C\uB864 \uD1A0\uAE00(&&T)","\uACE0\uC815 \uC2A4\uD06C\uB864","\uACE0\uC815 \uC2A4\uD06C\uB864(&&S)","\uACE0\uC815 \uC2A4\uD06C\uB864 \uD3EC\uCEE4\uC2A4","\uACE0\uC815 \uC2A4\uD06C\uB864 \uD3EC\uCEE4\uC2A4(&&F)","\uB2E4\uC74C \uACE0\uC815 \uC2A4\uD06C\uB864 \uC120 \uC120\uD0DD","\uC774\uC804 \uACE0\uC815 \uC2A4\uD06C\uB864 \uC120 \uC120\uD0DD","\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uACE0\uC815 \uC2A4\uD06C\uB864 \uC120\uC73C\uB85C \uC774\uB3D9","\uD3B8\uC9D1\uAE30 \uC120\uD0DD"],"vs/editor/contrib/suggest/browser/suggest":["\uC81C\uC548\uC5D0 \uCD08\uC810\uC744 \uB9DE\uCD94\uB294\uC9C0 \uC5EC\uBD80","\uC81C\uC548 \uC138\uBD80 \uC815\uBCF4\uAC00 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80","\uC120\uD0DD\uD560 \uC218 \uC788\uB294 \uC5EC\uB7EC \uC81C\uC548\uC774 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uD604\uC7AC \uC81C\uC548\uC744 \uC0BD\uC785\uD558\uBA74 \uBCC0\uACBD \uB0B4\uC6A9\uC774 \uC0DD\uC131\uB418\uB294\uC9C0 \uB610\uB294 \uBAA8\uB4E0 \uD56D\uBAA9\uC774 \uC774\uBBF8 \uC785\uB825\uB418\uC5C8\uB294\uC9C0 \uC5EC\uBD80"," \uD0A4\uB97C \uB204\uB97C \uB54C \uC81C\uC548\uC774 \uC0BD\uC785\uB418\uB294\uC9C0 \uC5EC\uBD80","\uD604\uC7AC \uC81C\uC548\uC5D0 \uC0BD\uC785 \uBC0F \uBC14\uAFB8\uAE30 \uB3D9\uC791\uC774 \uC788\uB294\uC9C0 \uC5EC\uBD80","\uAE30\uBCF8 \uB3D9\uC791\uC774 \uC0BD\uC785\uC778\uC9C0 \uB610\uB294 \uBC14\uAFB8\uAE30\uC778\uC9C0 \uC5EC\uBD80","\uD604\uC7AC \uC81C\uC548\uC5D0\uC11C \uCD94\uAC00 \uC138\uBD80 \uC815\uBCF4\uB97C \uD655\uC778\uD558\uB3C4\uB85D \uC9C0\uC6D0\uD558\uB294\uC9C0 \uC5EC\uBD80"],"vs/editor/contrib/suggest/browser/suggestController":["{0}\uC758 {1}\uAC1C\uC758 \uC218\uC815\uC0AC\uD56D\uC744 \uC218\uB77D\uD558\uB294 \uC911","\uC81C\uC548 \uD56D\uBAA9 \uD2B8\uB9AC\uAC70","\uC0BD\uC785","\uC0BD\uC785","\uBC14\uAFB8\uAE30","\uBC14\uAFB8\uAE30","\uC0BD\uC785","\uAC04\uB2E8\uD788 \uD45C\uC2DC","\uB354 \uBCF4\uAE30","\uC81C\uC548 \uC704\uC82F \uD06C\uAE30 \uB2E4\uC2DC \uC124\uC815"],"vs/editor/contrib/suggest/browser/suggestWidget":["\uC81C\uC548 \uC704\uC82F\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC81C\uD55C \uC704\uC82F\uC5D0\uC11C \uC120\uD0DD\uB41C \uD56D\uBAA9\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC81C\uD55C \uC704\uC82F\uC5D0\uC11C \uC120\uD0DD\uB41C \uD56D\uBAA9\uC758 \uC544\uC774\uCF58 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC81C\uD55C \uC704\uC82F\uC5D0\uC11C \uC120\uD0DD\uB41C \uD56D\uBAA9\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F\uC758 \uC77C\uCE58 \uD56D\uBAA9 \uAC15\uC870 \uD45C\uC2DC \uC0C9\uC785\uB2C8\uB2E4.","\uD56D\uBAA9\uC5D0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uC744 \uB54C \uCD94\uCC9C \uC704\uC82F\uC5D0\uC11C \uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC758 \uC0C9\uC774 \uAC15\uC870 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC81C\uC548 \uC704\uC82F \uC0C1\uD0DC\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uB85C\uB4DC \uC911...","\uC81C\uC548 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.","\uC81C\uC548","{0} {1}, {2}","{0} {1}","{0}, {1}","{0}, \uBB38\uC11C: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["\uB2EB\uAE30","\uB85C\uB4DC \uC911..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["\uC81C\uC548 \uC704\uC82F\uC5D0\uC11C \uC790\uC138\uD55C \uC815\uBCF4\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uC790\uC138\uD55C \uC815\uBCF4"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0}({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["\uBC30\uC5F4 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uBD80\uC6B8 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uD074\uB798\uC2A4 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uC0C9 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC0C1\uC218 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uC0DD\uC131\uC790 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC5F4\uAC70\uC790 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uC5F4\uAC70\uC790 \uBA64\uBC84 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uC774\uBCA4\uD2B8 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uD544\uB4DC \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uD30C\uC77C \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uD3F4\uB354 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uD568\uC218 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uC778\uD130\uD398\uC774\uC2A4 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uD0A4 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uD0A4\uC6CC\uB4DC \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uBA54\uC11C\uB4DC \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uBAA8\uB4C8 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","null \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uC22B\uC790 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uAC1C\uCCB4 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uC5F0\uC0B0\uC790 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uD328\uD0A4\uC9C0 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uC18D\uC131 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uCC38\uC870 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uCF54\uB4DC \uC870\uAC01 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uBB38\uC790\uC5F4 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uAD6C\uC870 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uD14D\uC2A4\uD2B8 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uB098\uD0C0\uB0A9\uB2C8\uB2E4.","\uD615\uC2DD \uB9E4\uAC1C\uBCC0\uC218 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uB2E8\uC704 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4.","\uBCC0\uC218 \uAE30\uD638\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774\uB7EC\uD55C \uAE30\uD638\uB294 \uAC1C\uC694, \uC774\uB3D9 \uACBD\uB85C \uBC0F \uC81C\uC548 \uC704\uC82F\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":[" \uD0A4\uB85C \uD3EC\uCEE4\uC2A4 \uC774\uB3D9 \uC124\uC815/\uD574\uC81C","\uC774\uC81C \uD0A4\uB97C \uB204\uB974\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uB2E4\uC74C \uD3EC\uCEE4\uC2A4 \uAC00\uB2A5\uD55C \uC694\uC18C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.","\uC774\uC81C \uD0A4\uB97C \uB204\uB974\uBA74 \uD0ED \uBB38\uC790\uAC00 \uC0BD\uC785\uB429\uB2C8\uB2E4."],"vs/editor/contrib/tokenization/browser/tokenization":["\uAC1C\uBC1C\uC790: \uAC15\uC81C\uB85C \uB2E4\uC2DC \uD1A0\uD070\uD654"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["\uD655\uC7A5 \uD3B8\uC9D1\uAE30\uC5D0 \uACBD\uACE0 \uBA54\uC2DC\uC9C0\uC640 \uD568\uAED8 \uD45C\uC2DC\uB418\uB294 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uC774 \uBB38\uC11C\uC5D0\uB294 \uAE30\uBCF8 ASCII \uC720\uB2C8\uCF54\uB4DC \uBB38\uC790\uAC00 \uC544\uB2CC \uBB38\uC790\uAC00 \uB9CE\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.","\uC774 \uBB38\uC11C\uC5D0\uB294 \uBAA8\uD638\uD55C \uC720\uB2C8\uCF54\uB4DC \uBB38\uC790\uAC00 \uB9CE\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.","\uC774 \uBB38\uC11C\uC5D0\uB294 \uBCF4\uC774\uC9C0 \uC54A\uB294 \uC720\uB2C8\uCF54\uB4DC \uBB38\uC790\uAC00 \uB9CE\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.","\uBB38\uC790 {0}\uC740(\uB294) \uC18C\uC2A4 \uCF54\uB4DC\uC5D0\uC11C \uB354 \uC77C\uBC18\uC801\uC778 ASCII \uBB38\uC790 {1}\uACFC(\uC640) \uD63C\uB3D9\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","{0} \uBB38\uC790\uB294 \uC18C\uC2A4 \uCF54\uB4DC\uC5D0\uC11C \uB354 \uC77C\uBC18\uC801\uC778 {1} \uBB38\uC790\uC640 \uD63C\uB3D9\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","{0} \uBB38\uC790\uAC00 \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","{0} \uBB38\uC790\uB294 \uAE30\uBCF8 ASCII \uBB38\uC790\uAC00 \uC544\uB2D9\uB2C8\uB2E4.","\uC124\uC815 \uC870\uC815","\uBA54\uBAA8\uC5D0\uC11C \uAC15\uC870 \uD45C\uC2DC \uC0AC\uC6A9 \uC548 \uD568","\uBA54\uBAA8\uC5D0\uC11C \uBB38\uC790 \uAC15\uC870 \uD45C\uC2DC \uC0AC\uC6A9 \uC548 \uD568","\uBB38\uC790\uC5F4\uC5D0\uC11C \uAC15\uC870 \uD45C\uC2DC \uC0AC\uC6A9 \uC548 \uD568","\uBB38\uC790\uC5F4\uC5D0\uC11C \uBB38\uC790 \uAC15\uC870 \uD45C\uC2DC \uC0AC\uC6A9 \uC548 \uD568","\uBAA8\uD638\uD55C \uAC15\uC870 \uC0AC\uC6A9 \uC548 \uD568","\uBAA8\uD638\uD55C \uBB38\uC790 \uAC15\uC870 \uD45C\uC2DC \uC0AC\uC6A9 \uC548 \uD568","\uBCF4\uC774\uC9C0 \uC54A\uB294 \uAC15\uC870 \uC0AC\uC6A9 \uC548 \uD568","\uBCF4\uC774\uC9C0 \uC54A\uB294 \uBB38\uC790 \uAC15\uC870 \uD45C\uC2DC \uC0AC\uC6A9 \uC548 \uD568","ASCII\uAC00 \uBB38\uC790\uAC00 \uC544\uB2CC \uAC15\uC870 \uC0AC\uC6A9 \uC548 \uD568","\uAE30\uBCF8\uC774 \uC544\uB2CC ASCII \uBB38\uC790 \uAC15\uC870 \uD45C\uC2DC \uC0AC\uC6A9 \uC548 \uD568","\uC81C\uC678 \uC635\uC158 \uD45C\uC2DC","{0}(\uBCF4\uC774\uC9C0 \uC54A\uB294 \uBB38\uC790)\uC774(\uAC00) \uAC15\uC870 \uD45C\uC2DC\uB418\uC9C0 \uC54A\uB3C4\uB85D \uC81C\uC678","\uAC15\uC870 \uD45C\uC2DC\uC5D0\uC11C {0} \uC81C\uC678",'\uC5B8\uC5B4 "{0}"\uC5D0\uC11C \uB354 \uC77C\uBC18\uC801\uC778 \uC720\uB2C8\uCF54\uB4DC \uBB38\uC790\uB97C \uD5C8\uC6A9\uD569\uB2C8\uB2E4.',"\uC720\uB2C8\uCF54\uB4DC \uAC15\uC870 \uD45C\uC2DC \uC635\uC158 \uAD6C\uC131"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["\uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790","\uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790\uAC00 \uAC80\uC0C9\uB428","\uC774 \uD30C\uC77C \u2018\r\n\u2019\uC5D0 LS(\uC904 \uAD6C\uBD84 \uAE30\uD638) \uB610\uB294 PS(\uB2E8\uB77D \uAD6C\uBD84 \uAE30\uD638) \uAC19\uC740 \uD558\uB098 \uC774\uC0C1\uC758 \uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790 \uBB38\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.{0}\r\n\uD30C\uC77C\uC5D0\uC11C \uC81C\uAC70\uD558\uB294 \uAC83\uC774 \uC88B\uC2B5\uB2C8\uB2E4. `editor.unusualLineTerminators`\uB97C \uD1B5\uD574 \uAD6C\uC131\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uBE44\uC815\uC0C1\uC801\uC778 \uC904 \uC885\uACB0\uC790 \uC81C\uAC70(&&R)","\uBB34\uC2DC"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["\uBCC0\uC218 \uC77D\uAE30\uC640 \uAC19\uC740 \uC77D\uAE30 \uC561\uC138\uC2A4 \uC911 \uAE30\uD638\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uBCC0\uC218\uC5D0 \uC4F0\uAE30\uC640 \uAC19\uC740 \uC4F0\uAE30 \uC561\uC138\uC2A4 \uC911 \uAE30\uD638\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uAE30\uD638\uC5D0 \uB300\uD55C \uD14D\uC2A4\uD2B8 \uD56D\uBAA9\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uBCC0\uC218 \uC77D\uAE30\uC640 \uAC19\uC740 \uC77D\uAE30 \uC561\uC138\uC2A4 \uC911 \uAE30\uD638\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uBCC0\uC218\uC5D0 \uC4F0\uAE30\uC640 \uAC19\uC740 \uC4F0\uAE30 \uC561\uC138\uC2A4 \uC911 \uAE30\uD638\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uAE30\uD638\uC5D0 \uB300\uD55C \uD14D\uC2A4\uD2B8 \uD56D\uBAA9\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uAE30\uD638 \uAC15\uC870 \uD45C\uC2DC\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uD45C\uC2DD \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC4F0\uAE30 \uC561\uC138\uC2A4 \uAE30\uD638\uC5D0 \uB300\uD55C \uAC1C\uC694 \uB208\uAE08\uC790 \uD45C\uC2DD \uC0C9\uC774 \uAC15\uC870 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uAE30\uD638\uC5D0 \uB300\uD55C \uD14D\uC2A4\uD2B8 \uD56D\uBAA9\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uB9C8\uCEE4 \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["\uB2E4\uC74C \uAC15\uC870 \uAE30\uD638\uB85C \uC774\uB3D9","\uC774\uC804 \uAC15\uC870 \uAE30\uD638\uB85C \uC774\uB3D9","\uAE30\uD638 \uAC15\uC870 \uD45C\uC2DC \uD2B8\uB9AC\uAC70"],"vs/editor/contrib/wordOperations/browser/wordOperations":["\uB2E8\uC5B4 \uC0AD\uC81C"],"vs/platform/action/common/actionCommonCategories":["\uBCF4\uAE30","\uB3C4\uC6C0\uB9D0","\uD14C\uC2A4\uD2B8","\uD30C\uC77C","\uAE30\uBCF8 \uC124\uC815","\uAC1C\uBC1C\uC790"],"vs/platform/actionWidget/browser/actionList":["\uC801\uC6A9\uD558\uB824\uBA74 {0}, \uBBF8\uB9AC \uBCF4\uAE30\uB97C \uBCF4\uB824\uBA74 {1}","\uC2E0\uCCAD\uD558\uB824\uBA74 {0}","{0}, \uC0AC\uC6A9 \uC548 \uD568 \uC774\uC720: {1}","\uC791\uC5C5 \uC704\uC82F"],"vs/platform/actionWidget/browser/actionWidget":["\uC791\uC5C5 \uD45C\uC2DC\uC904\uC5D0\uC11C \uD1A0\uAE00\uB41C \uC791\uC5C5 \uD56D\uBAA9\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC791\uC5C5 \uC704\uC82F \uBAA9\uB85D \uD45C\uC2DC \uC5EC\uBD80","\uC791\uC5C5 \uC704\uC82F \uC228\uAE30\uAE30","\uC774\uC804 \uC791\uC5C5 \uC120\uD0DD","\uB2E4\uC74C \uC791\uC5C5 \uC120\uD0DD","\uC120\uD0DD\uD55C \uC791\uC5C5 \uC218\uB77D","\uC120\uD0DD\uD55C \uC791\uC5C5 \uBBF8\uB9AC \uBCF4\uAE30"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0}({1})","{0}({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["\uC228\uAE30\uAE30","\uBA54\uB274 \uB2E4\uC2DC \uC124\uC815"],"vs/platform/actions/common/menuService":["'{0}' \uC228\uAE30\uAE30"],"vs/platform/audioCues/browser/audioCueService":["\uC904\uC5D0 \uB300\uD55C \uC624\uB958","\uC904\uC5D0 \uB300\uD55C \uACBD\uACE0","\uC904\uC758 \uC811\uD78C \uBD80\uBD84","\uC904\uC758 \uC911\uB2E8\uC810","\uC904\uC758 \uC778\uB77C\uC778 \uC81C\uC548","\uD130\uBBF8\uB110 \uBE60\uB978 \uC218\uC815","\uC911\uB2E8\uC810\uC5D0\uC11C \uC911\uC9C0\uB41C \uB514\uBC84\uAC70","\uC904\uC758 \uC778\uB808\uC774 \uD78C\uD2B8 \uC5C6\uC74C","\uC644\uB8CC\uB41C \uC791\uC5C5","\uC791\uC5C5 \uC2E4\uD328","\uD130\uBBF8\uB110 \uBA85\uB839 \uC2E4\uD328","\uD130\uBBF8\uB110 \uBCA8","Notebook \uC140 \uC644\uB8CC\uB428","Notebook \uC140 \uC2E4\uD328","Diff \uC904 \uC0BD\uC785\uB428","Diff \uC904 \uC0AD\uC81C\uB428","Diff \uC904 \uC218\uC815\uB428","\uCC44\uD305 \uC694\uCCAD \uC804\uC1A1\uB428","\uCC44\uD305 \uC751\uB2F5 \uC218\uC2E0\uB428","\uCC44\uD305 \uC751\uB2F5 \uB300\uAE30 \uC911"],"vs/platform/configuration/common/configurationRegistry":["\uAE30\uBCF8 \uC5B8\uC5B4 \uAD6C\uC131 \uC7AC\uC815\uC758","{0}\uC5D0\uC11C \uC7AC\uC815\uC758\uD560 \uC124\uC815\uC744 \uAD6C\uC131\uD569\uB2C8\uB2E4.","\uC5B8\uC5B4\uC5D0 \uB300\uD574 \uC7AC\uC815\uC758\uD560 \uD3B8\uC9D1\uAE30 \uC124\uC815\uC744 \uAD6C\uC131\uD569\uB2C8\uB2E4.","\uC774 \uC124\uC815\uC740 \uC5B8\uC5B4\uBCC4 \uAD6C\uC131\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uC5B8\uC5B4\uC5D0 \uB300\uD574 \uC7AC\uC815\uC758\uD560 \uD3B8\uC9D1\uAE30 \uC124\uC815\uC744 \uAD6C\uC131\uD569\uB2C8\uB2E4.","\uC774 \uC124\uC815\uC740 \uC5B8\uC5B4\uBCC4 \uAD6C\uC131\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uBE48 \uC18D\uC131\uC744 \uB4F1\uB85D\uD560 \uC218 \uC5C6\uC74C","'{0}'\uC744(\uB97C) \uB4F1\uB85D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uB294 \uC5B8\uC5B4\uBCC4 \uD3B8\uC9D1\uAE30 \uC124\uC815\uC744 \uC124\uBA85\uD558\uB294 \uC18D\uC131 \uD328\uD134\uC778 '\\\\[.*\\\\]$'\uACFC(\uC640) \uC77C\uCE58\uD569\uB2C8\uB2E4. 'configurationDefaults' \uAE30\uC5EC\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.","'{0}'\uC744(\uB97C) \uB4F1\uB85D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774 \uC18D\uC131\uC740 \uC774\uBBF8 \uB4F1\uB85D\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4.","'{0}'\uC744(\uB97C) \uB4F1\uB85D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC5F0\uACB0\uB41C \uC815\uCC45 {1}\uC774(\uAC00) \uC774\uBBF8 {2}\uC5D0 \uB4F1\uB85D\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4."],"vs/platform/contextkey/browser/contextKeyService":["\uCEE8\uD14D\uC2A4\uD2B8 \uD0A4\uC5D0 \uB300\uD55C \uC815\uBCF4\uB97C \uBC18\uD658\uD558\uB294 \uBA85\uB839"],"vs/platform/contextkey/common/contextkey":["\uBE48 \uCEE8\uD14D\uC2A4\uD2B8 \uD0A4 \uC2DD","\uC2DD \uC4F0\uB294 \uAC83\uC744 \uC78A\uC73C\uC168\uB098\uC694? \uD56D\uC0C1 'false' \uB610\uB294 'true'\uB97C \uB123\uC5B4 \uAC01\uAC01 false \uB610\uB294 true\uB85C \uD3C9\uAC00\uD560 \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4.","'not' \uB4A4\uC5D0 'in'\uC774 \uC788\uC2B5\uB2C8\uB2E4.","\uB2EB\uB294 \uAD04\uD638 ')'","\uC608\uAE30\uCE58 \uC54A\uC740 \uD1A0\uD070","\uD1A0\uD070 \uC55E\uC5D0 && \uB610\uB294 ||\uB97C \uC785\uB825\uD558\uB294 \uAC83\uC744 \uC78A\uC73C\uC168\uB098\uC694?","\uD544\uC694\uD558\uC9C0 \uC54A\uC740 \uC2DD\uC758 \uB05D","\uCEE8\uD14D\uC2A4\uD2B8 \uD0A4\uB97C \uC785\uB825\uD558\uB294 \uAC83\uC744 \uC78A\uC73C\uC168\uB098\uC694?",`\uC608\uC0C1: {0}\r -\uC218\uC2E0\uB428: '{1}'.`],"vs/platform/contextkey/common/contextkeys":["\uC6B4\uC601 \uCCB4\uC81C\uAC00 macOS\uC778\uC9C0 \uC5EC\uBD80","\uC6B4\uC601 \uCCB4\uC81C\uAC00 Linux\uC778\uC9C0 \uC5EC\uBD80","\uC6B4\uC601 \uCCB4\uC81C\uAC00 Windows\uC778\uC9C0 \uC5EC\uBD80","\uD50C\uB7AB\uD3FC\uC774 \uC6F9 \uBE0C\uB77C\uC6B0\uC800\uC778\uC9C0 \uC5EC\uBD80","\uBE0C\uB77C\uC6B0\uC800 \uAE30\uBC18\uC774 \uC544\uB2CC \uD50C\uB7AB\uD3FC\uC5D0\uC11C \uC6B4\uC601 \uCCB4\uC81C\uAC00 macOS\uC778\uC9C0 \uC5EC\uBD80","\uC6B4\uC601 \uCCB4\uC81C\uAC00 iOS\uC778\uC9C0 \uC5EC\uBD80","\uD50C\uB7AB\uD3FC\uC774 \uBAA8\uBC14\uC77C \uC6F9 \uBE0C\uB77C\uC6B0\uC800\uC778\uC9C0 \uC5EC\uBD80","VS \uCF54\uB4DC\uC758 \uD488\uC9C8 \uC720\uD615","\uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uAC00 \uC785\uB825 \uC0C1\uC790 \uB0B4\uC5D0 \uC788\uB294\uC9C0 \uC5EC\uBD80"],"vs/platform/contextkey/common/scanner":["{0}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","{0} \uB610\uB294 {1}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","{0}, {1} \uB610\uB294 {2}\uC744(\uB97C) \uC0AC\uC6A9\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","\uACAC\uC801\uC744 \uC5F4\uAC70\uB098 \uB2EB\uB294 \uAC83\uC744 \uC78A\uC73C\uC168\uB098\uC694?","'/'(\uC2AC\uB798\uC2DC) \uBB38\uC790\uB97C \uC774\uC2A4\uCF00\uC774\uD504\uD558\uB294 \uAC83\uC744 \uC78A\uC73C\uC168\uB098\uC694? \uC774\uC2A4\uCF00\uC774\uD504\uD558\uB824\uBA74 \uC55E\uC5D0 \uBC31\uC2AC\uB77C\uC2DC \uB450 \uAC1C(\uC608: '\\\\/')\uB97C \uB123\uC2B5\uB2C8\uB2E4."],"vs/platform/history/browser/contextScopedHistoryWidget":["\uC81C\uC548\uC774 \uD45C\uC2DC\uB418\uB294\uC9C0 \uC5EC\uBD80"],"vs/platform/keybinding/common/abstractKeybindingService":["({0})\uC744(\uB97C) \uB20C\uB800\uC2B5\uB2C8\uB2E4. \uB458\uC9F8 \uD0A4\uB294 \uC7A0\uC2DC \uAE30\uB2E4\uB838\uB2E4\uAC00 \uB204\uB974\uC2ED\uC2DC\uC624...","({0})\uC744(\uB97C) \uB20C\uB800\uC2B5\uB2C8\uB2E4. \uCF54\uB4DC\uC758 \uB2E4\uC74C \uD0A4\uB97C \uAE30\uB2E4\uB9AC\uB294 \uC911...","\uD0A4 \uC870\uD569({0}, {1})\uC740 \uBA85\uB839\uC774 \uC544\uB2D9\uB2C8\uB2E4.","\uD0A4 \uC870\uD569({0}, {1})\uC740 \uBA85\uB839\uC774 \uC544\uB2D9\uB2C8\uB2E4."],"vs/platform/list/browser/listService":["\uC6CC\uD06C\uBCA4\uCE58","Windows\uC640 Linux\uC758 'Control'\uC744 macOS\uC758 'Command'\uB85C \uB9E4\uD551\uD569\uB2C8\uB2E4.","Windows\uC640 Linux\uC758 'Alt'\uB97C macOS\uC758 'Option'\uC73C\uB85C \uB9E4\uD551\uD569\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uD2B8\uB9AC\uC640 \uBAA9\uB85D\uC758 \uD56D\uBAA9\uC744 \uB2E4\uC911 \uC120\uD0DD\uC5D0 \uCD94\uAC00\uD560 \uB54C \uC0AC\uC6A9\uD560 \uD55C\uC815\uC790\uC785\uB2C8\uB2E4(\uC608\uB97C \uB4E4\uC5B4 \uD0D0\uC0C9\uAE30\uC5D0\uC11C \uD3B8\uC9D1\uAE30\uC640 SCM \uBCF4\uAE30\uB97C \uC5EC\uB294 \uACBD\uC6B0). '\uC606\uC5D0\uC11C \uC5F4\uAE30' \uB9C8\uC6B0\uC2A4 \uC81C\uC2A4\uCC98(\uC9C0\uC6D0\uB418\uB294 \uACBD\uC6B0)\uB294 \uB2E4\uC911 \uC120\uD0DD \uD55C\uC815\uC790\uC640 \uCDA9\uB3CC\uD558\uC9C0 \uC54A\uB3C4\uB85D \uC870\uC815\uB429\uB2C8\uB2E4.","\uD2B8\uB9AC\uC640 \uBAA9\uB85D\uC5D0\uC11C \uB9C8\uC6B0\uC2A4\uB97C \uC0AC\uC6A9\uD558\uC5EC \uD56D\uBAA9\uC744 \uC5EC\uB294 \uBC29\uBC95\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4(\uC9C0\uC6D0\uB418\uB294 \uACBD\uC6B0). \uC77C\uBD80 \uD2B8\uB9AC\uC640 \uBAA9\uB85D\uC5D0\uC11C\uB294 \uC774 \uC124\uC815\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uACBD\uC6B0 \uBB34\uC2DC\uD558\uB3C4\uB85D \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC6CC\uD06C\uBCA4\uCE58\uC5D0\uC11C \uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uC758 \uAC00\uB85C \uC2A4\uD06C\uB864 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uACBD\uACE0: \uC774 \uC124\uC815\uC744 \uCF1C\uBA74 \uC131\uB2A5\uC5D0 \uC601\uD5A5\uC744 \uBBF8\uCE69\uB2C8\uB2E4.","\uC2A4\uD06C\uB864 \uB9C9\uB300 \uC2A4\uD06C\uB864 \uD398\uC774\uC9C0\uC758 \uD398\uC774\uC9C0\uBCC4 \uD074\uB9AD \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD2B8\uB9AC \uB4E4\uC5EC\uC4F0\uAE30\uB97C \uD53D\uC140 \uB2E8\uC704\uB85C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD2B8\uB9AC\uC5D0\uC11C \uB4E4\uC5EC\uC4F0\uAE30 \uAC00\uC774\uB4DC\uB97C \uB80C\uB354\uB9C1\uD560\uC9C0 \uC5EC\uBD80\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uBAA9\uB85D\uACFC \uD2B8\uB9AC\uC5D0 \uBD80\uB4DC\uB7EC\uC6B4 \uD654\uBA74 \uC774\uB3D9 \uAE30\uB2A5\uC774 \uC788\uB294\uC9C0\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4 \uD720 \uC2A4\uD06C\uB864 \uC774\uBCA4\uD2B8\uC758 `deltaX` \uBC0F `deltaY`\uC5D0\uC11C \uC0AC\uC6A9\uD560 \uC2B9\uC218\uC785\uB2C8\uB2E4.","'Alt' \uD0A4\uB97C \uB204\uB97C \uB54C \uC2A4\uD06C\uB864 \uC18D\uB3C4 \uC2B9\uC218\uC785\uB2C8\uB2E4.","\uAC80\uC0C9\uD560 \uB54C \uC694\uC18C\uB97C \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4. \uCD94\uAC00 \uC704\uC544\uB798 \uD0D0\uC0C9\uC740 \uAC15\uC870 \uD45C\uC2DC\uB41C \uC694\uC18C\uB9CC \uD0D0\uC0C9\uD569\uB2C8\uB2E4.","\uAC80\uC0C9\uD560 \uB54C \uC694\uC18C\uB97C \uD544\uD130\uB9C1\uD569\uB2C8\uB2E4.","\uC6CC\uD06C\uBCA4\uCE58\uC5D0\uC11C \uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uC758 \uAE30\uBCF8 \uCC3E\uAE30 \uBAA8\uB4DC\uB97C \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uAC04\uB2E8\uD55C \uD0A4\uBCF4\uB4DC \uD0D0\uC0C9\uC5D0\uC11C\uB294 \uD0A4\uBCF4\uB4DC \uC785\uB825\uACFC \uC77C\uCE58\uD558\uB294 \uC694\uC18C\uC5D0 \uC9D1\uC911\uD569\uB2C8\uB2E4. \uC77C\uCE58\uB294 \uC811\uB450\uC0AC\uC5D0\uC11C\uB9CC \uC218\uD589\uB429\uB2C8\uB2E4.","\uD0A4\uBCF4\uB4DC \uD0D0\uC0C9 \uAC15\uC870 \uD45C\uC2DC\uC5D0\uC11C\uB294 \uD0A4\uBCF4\uB4DC \uC785\uB825\uACFC \uC77C\uCE58\uD558\uB294 \uC694\uC18C\uB97C \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4. \uC774\uD6C4\uB85C \uD0D0\uC0C9\uC5D0\uC11C \uC704 \uBC0F \uC544\uB798\uB85C \uC774\uB3D9\uD558\uB294 \uACBD\uC6B0 \uAC15\uC870 \uD45C\uC2DC\uB41C \uC694\uC18C\uB9CC \uD2B8\uB798\uBC84\uC2A4\uD569\uB2C8\uB2E4.","\uD0A4\uBCF4\uB4DC \uD0D0\uC0C9 \uD544\uD130\uB9C1\uC5D0\uC11C\uB294 \uD0A4\uBCF4\uB4DC \uC785\uB825\uACFC \uC77C\uCE58\uD558\uC9C0 \uC54A\uB294 \uC694\uC18C\uB97C \uBAA8\uB450 \uD544\uD130\uB9C1\uD558\uC5EC \uC228\uAE41\uB2C8\uB2E4.","\uC6CC\uD06C\uBCA4\uCE58\uC758 \uBAA9\uB85D \uBC0F \uD2B8\uB9AC \uD0A4\uBCF4\uB4DC \uD0D0\uC0C9 \uC2A4\uD0C0\uC77C\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uAC04\uC18C\uD654\uD558\uACE0, \uAC15\uC870 \uD45C\uC2DC\uD558\uACE0, \uD544\uD130\uB9C1\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uB300\uC2E0 'workbench.list.defaultFindMode' \uBC0F 'workbench.list.typeNavigationMode'\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.","\uAC80\uC0C9\uD560 \uB54C \uC720\uC0AC \uD56D\uBAA9 \uC77C\uCE58\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uAC80\uC0C9\uD560 \uB54C \uC5F0\uC18D \uC77C\uCE58\uB97C \uC0AC\uC6A9\uD569\uB2C8\uB2E4.","\uC6CC\uD06C\uBCA4\uCE58\uC5D0\uC11C \uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uB97C \uAC80\uC0C9\uD560 \uB54C \uC0AC\uC6A9\uD558\uB294 \uC77C\uCE58 \uC720\uD615\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4.","\uD3F4\uB354 \uC774\uB984\uC744 \uD074\uB9AD\uD560 \uB54C \uD2B8\uB9AC \uD3F4\uB354\uAC00 \uD655\uC7A5\uB418\uB294 \uBC29\uBC95\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4. \uC77C\uBD80 \uD2B8\uB9AC\uC640 \uBAA9\uB85D\uC5D0\uC11C\uB294 \uC774 \uC124\uC815\uC744 \uC801\uC6A9\uD560 \uC218 \uC5C6\uB294 \uACBD\uC6B0 \uBB34\uC2DC\uD558\uB3C4\uB85D \uC120\uD0DD\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC6CC\uD06C\uBCA4\uCE58\uC758 \uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uC5D0\uC11C \uD615\uC2DD \uD0D0\uC0C9\uC774 \uC791\uB3D9\uD558\uB294 \uBC29\uC2DD\uC744 \uC81C\uC5B4\uD569\uB2C8\uB2E4. 'trigger'\uB85C \uC124\uC815 \uC2DC 'list.triggerTypeNavigation' \uBA85\uB839\uC774 \uC2E4\uD589\uB418\uBA74 \uD615\uC2DD \uD0D0\uC0C9\uC774 \uC2DC\uC791\uB429\uB2C8\uB2E4."],"vs/platform/markers/common/markers":["\uC624\uB958","\uACBD\uACE0","\uC815\uBCF4"],"vs/platform/quickinput/browser/commandsQuickAccess":["\uCD5C\uADFC\uC5D0 \uC0AC\uC6A9\uD55C \uD56D\uBAA9","\uC720\uC0AC\uD55C \uBA85\uB839","\uC77C\uBC18\uC801\uC73C\uB85C \uC0AC\uC6A9\uB428","\uAE30\uD0C0 \uBA85\uB839","\uC720\uC0AC\uD55C \uBA85\uB839","{0}, {1}","'{0}' \uBA85\uB839\uC5D0\uC11C \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["\uB4A4\uB85C","\uC785\uB825\uC744 \uD655\uC778\uD558\uB824\uBA74 'Enter' \uD0A4\uB97C \uB204\uB974\uACE0, \uCDE8\uC18C\uD558\uB824\uBA74 'Esc' \uD0A4\uB97C \uB204\uB974\uC138\uC694.","{0} / {1}","\uACB0\uACFC\uC758 \uBC94\uC704\uB97C \uCD95\uC18C\uD558\uB824\uBA74 \uC785\uB825\uD558\uC138\uC694."],"vs/platform/quickinput/browser/quickInputController":["\uBAA8\uB4E0 \uD655\uC778\uB780 \uC120\uD0DD/\uD574\uC81C","{0}\uAC1C \uACB0\uACFC","{0} \uC120\uD0DD\uB428","\uD655\uC778","\uC0AC\uC6A9\uC790 \uC9C0\uC815","\uB4A4\uB85C({0})","\uB4A4\uB85C"],"vs/platform/quickinput/browser/quickInputList":["\uBE60\uB978 \uC785\uB825"],"vs/platform/quickinput/browser/quickInputUtils":["'{0}' \uBA85\uB839\uC744 \uC2E4\uD589\uD558\uB824\uBA74 \uD074\uB9AD"],"vs/platform/theme/common/colorRegistry":["\uC804\uCCB4 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774 \uC0C9\uC740 \uAD6C\uC131 \uC694\uC18C\uC5D0\uC11C \uC7AC\uC815\uC758\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB9CC \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uBE44\uD65C\uC131\uD654\uB41C \uC694\uC18C\uC758 \uC804\uCCB4 \uC804\uACBD\uC785\uB2C8\uB2E4. \uC774 \uC0C9\uC740 \uAD6C\uC131 \uC694\uC18C\uC5D0\uC11C \uC7AC\uC815\uC758\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0\uC5D0\uB9CC \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uC624\uB958 \uBA54\uC2DC\uC9C0\uC5D0 \uB300\uD55C \uC804\uCCB4 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC774 \uC0C9\uC740 \uAD6C\uC131 \uC694\uC18C\uC5D0\uC11C \uC7AC\uC815\uC758\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB9CC \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uB808\uC774\uBE14\uACFC \uAC19\uC774 \uCD94\uAC00 \uC815\uBCF4\uB97C \uC81C\uACF5\uD558\uB294 \uC124\uBA85 \uD14D\uC2A4\uD2B8\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC6CC\uD06C\uBCA4\uCE58 \uC544\uC774\uCF58\uC758 \uAE30\uBCF8 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uC694\uC18C\uC758 \uC804\uCCB4 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4. \uC774 \uC0C9\uC740 \uAD6C\uC131 \uC694\uC18C\uC5D0\uC11C \uC7AC\uC815\uC758\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB9CC \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uB354 \uB69C\uB837\uC774 \uB300\uBE44\uB418\uB3C4\uB85D \uC694\uC18C\uB97C \uB2E4\uB978 \uC694\uC18C\uC640 \uAD6C\uBD84\uD558\uB294 \uC694\uC18C \uC8FC\uC704\uC758 \uCD94\uAC00 \uD14C\uB450\uB9AC\uC785\uB2C8\uB2E4.","\uB354 \uB69C\uB837\uC774 \uB300\uBE44\uB418\uB3C4\uB85D \uC694\uC18C\uB97C \uB2E4\uB978 \uC694\uC18C\uC640 \uAD6C\uBD84\uD558\uB294 \uD65C\uC131 \uC694\uC18C \uC8FC\uC704\uC758 \uCD94\uAC00 \uD14C\uB450\uB9AC\uC785\uB2C8\uB2E4.","\uC6CC\uD06C\uBCA4\uCE58\uC758 \uD14D\uC2A4\uD2B8 \uC120\uD0DD(\uC608: \uC785\uB825 \uD544\uB4DC \uB610\uB294 \uD14D\uC2A4\uD2B8 \uC601\uC5ED) \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uD3B8\uC9D1\uAE30 \uB0B4\uC758 \uC120\uD0DD\uC5D0\uB294 \uC801\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uD14D\uC2A4\uD2B8 \uAD6C\uBD84\uC790 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uD14D\uC2A4\uD2B8 \uB0B4 \uB9C1\uD06C\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD074\uB9AD\uD558\uACE0 \uB9C8\uC6B0\uC2A4\uAC00 \uC62C\uB77C\uAC04 \uC0C1\uD0DC\uC758 \uD14D\uC2A4\uD2B8 \uB0B4 \uB9C1\uD06C\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBBF8\uB9AC \uC11C\uC2DD\uC774 \uC9C0\uC815\uB41C \uD14D\uC2A4\uD2B8 \uC138\uADF8\uBA3C\uD2B8\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD14D\uC2A4\uD2B8 \uB0B4 \uBE14\uB85D \uC778\uC6A9\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD14D\uC2A4\uD2B8 \uB0B4 \uBE14\uB85D \uC778\uC6A9\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uD14D\uC2A4\uD2B8 \uB0B4 \uCF54\uB4DC \uBE14\uB85D\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB0B4\uC5D0\uC11C \uCC3E\uAE30/\uBC14\uAFB8\uAE30 \uAC19\uC740 \uC704\uC82F\uC758 \uADF8\uB9BC\uC790 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB0B4\uC5D0\uC11C \uCC3E\uAE30/\uBC14\uAFB8\uAE30\uC640 \uAC19\uC740 \uC704\uC82F\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uC785\uB825 \uC0C1\uC790 \uBC30\uACBD\uC785\uB2C8\uB2E4.","\uC785\uB825 \uC0C1\uC790 \uC804\uACBD\uC785\uB2C8\uB2E4.","\uC785\uB825 \uC0C1\uC790 \uD14C\uB450\uB9AC\uC785\uB2C8\uB2E4.","\uC785\uB825 \uD544\uB4DC\uC5D0\uC11C \uD65C\uC131\uD654\uB41C \uC635\uC158\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uC785\uB825 \uD544\uB4DC\uC5D0\uC11C \uD65C\uC131\uD654\uB41C \uC635\uC158\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC785\uB825 \uD544\uB4DC\uC5D0 \uC788\uB294 \uC635\uC158\uC758 \uBC30\uACBD \uAC00\uB9AC\uD0A4\uAE30 \uC0C9\uC785\uB2C8\uB2E4.","\uC785\uB825 \uD544\uB4DC\uC5D0\uC11C \uD65C\uC131\uD654\uB41C \uC635\uC158\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC704\uCE58 \uD45C\uC2DC\uC790 \uD14D\uC2A4\uD2B8\uC5D0 \uB300\uD55C \uC785\uB825 \uC0C1\uC790 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC815\uBCF4 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC815\uBCF4 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC815\uBCF4 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uACBD\uACE0 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uACBD\uACE0 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uACBD\uACE0 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uC624\uB958 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC624\uB958 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC624\uB958 \uC2EC\uAC01\uB3C4\uC758 \uC785\uB825 \uC720\uD6A8\uC131 \uAC80\uC0AC \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uB4DC\uB86D\uB2E4\uC6B4 \uBC30\uACBD\uC785\uB2C8\uB2E4.","\uB4DC\uB86D\uB2E4\uC6B4 \uBAA9\uB85D \uBC30\uACBD\uC785\uB2C8\uB2E4.","\uB4DC\uB86D\uB2E4\uC6B4 \uC804\uACBD\uC785\uB2C8\uB2E4.","\uB4DC\uB86D\uB2E4\uC6B4 \uD14C\uB450\uB9AC\uC785\uB2C8\uB2E4.","\uB2E8\uCD94 \uAE30\uBCF8 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uB2E8\uCD94 \uAD6C\uBD84 \uAE30\uD638 \uC0C9\uC785\uB2C8\uB2E4.","\uB2E8\uCD94 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uAC00\uB9AC\uD0AC \uB54C \uB2E8\uCD94 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBC84\uD2BC \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uBCF4\uC870 \uB2E8\uCD94 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBCF4\uC870 \uB2E8\uCD94 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uAC00\uB9AC\uD0AC \uB54C \uBCF4\uC870 \uB2E8\uCD94 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBC30\uC9C0 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBC30\uC9C0\uB294 \uAC80\uC0C9 \uACB0\uACFC \uC218\uC640 \uAC19\uC740 \uC18C\uB7C9\uC758 \uC815\uBCF4 \uB808\uC774\uBE14\uC785\uB2C8\uB2E4.","\uBC30\uC9C0 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBC30\uC9C0\uB294 \uAC80\uC0C9 \uACB0\uACFC \uC218\uC640 \uAC19\uC740 \uC18C\uB7C9\uC758 \uC815\uBCF4 \uB808\uC774\uBE14\uC785\uB2C8\uB2E4.","\uC2A4\uD06C\uB864\uB418\uB294 \uBCF4\uAE30\uB97C \uB098\uD0C0\uB0B4\uB294 \uC2A4\uD06C\uB864 \uB9C9\uB300 \uADF8\uB9BC\uC790\uC785\uB2C8\uB2E4.","\uC2A4\uD06C\uB864 \uB9C9\uB300 \uC2AC\uB77C\uC774\uBC84 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uAC00\uB9AC\uD0AC \uB54C \uC2A4\uD06C\uB864 \uB9C9\uB300 \uC2AC\uB77C\uC774\uB354 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD074\uB9AD\uB41C \uC0C1\uD0DC\uC77C \uB54C \uC2A4\uD06C\uB864 \uB9C9\uB300 \uC2AC\uB77C\uC774\uB354 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC7A5\uAE30 \uC791\uC5C5\uC744 \uB300\uC0C1\uC73C\uB85C \uD45C\uC2DC\uB420 \uC218 \uC788\uB294 \uC9C4\uD589\uB960 \uD45C\uC2DC\uC904\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC624\uB958 \uD14D\uC2A4\uD2B8\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB0B4 \uC624\uB958 \uD45C\uC2DC\uC120\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC124\uC815\uB41C \uACBD\uC6B0 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC624\uB958\uB97C \uB098\uD0C0\uB0B4\uB294 \uC774\uC911 \uBC11\uC904\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uACBD\uACE0 \uD14D\uC2A4\uD2B8\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB0B4 \uACBD\uACE0 \uD45C\uC2DC\uC120\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC124\uC815\uB41C \uACBD\uC6B0 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uACBD\uACE0\uB97C \uB098\uD0C0\uB0B4\uB294 \uC774\uC911 \uBC11\uC904\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC815\uBCF4 \uD14D\uC2A4\uD2B8\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uB0B4 \uC815\uBCF4 \uD45C\uC2DC\uC120\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC124\uC815\uB41C \uACBD\uC6B0 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uC815\uBCF4\uB97C \uB098\uD0C0\uB0B4\uB294 \uC774\uC911 \uBC11\uC904 \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD78C\uD2B8 \uD45C\uC2DC\uC120\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC124\uC815\uB41C \uACBD\uC6B0 \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uD78C\uD2B8\uB97C \uB098\uD0C0\uB0B4\uB294 \uC774\uC911 \uBC11\uC904 \uC0C9\uC785\uB2C8\uB2E4.","\uD65C\uC131 \uC100\uC2DC\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uAE30\uBCF8 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30\uC758 \uACE0\uC815 \uC2A4\uD06C\uB864 \uBC30\uACBD\uC0C9","\uD3B8\uC9D1\uAE30\uC758 \uAC00\uB9AC\uD0A8 \uD56D\uBAA9 \uBC30\uACBD\uC0C9\uC5D0 \uACE0\uC815 \uC2A4\uD06C\uB864","\uCC3E\uAE30/\uBC14\uAFB8\uAE30 \uAC19\uC740 \uD3B8\uC9D1\uAE30 \uC704\uC82F\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uCC3E\uAE30/\uBC14\uAFB8\uAE30\uC640 \uAC19\uC740 \uD3B8\uC9D1\uAE30 \uC704\uC82F\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC704\uC82F\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4. \uC704\uC82F\uC5D0 \uD14C\uB450\uB9AC\uAC00 \uC788\uACE0 \uC704\uC82F\uC774 \uC0C9\uC0C1\uC744 \uBB34\uC2DC\uD558\uC9C0 \uC54A\uC744 \uB54C\uB9CC \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC704\uC82F \uD06C\uAE30 \uC870\uC815 \uB9C9\uB300\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4. \uC774 \uC0C9\uC740 \uC704\uC82F\uC5D0\uC11C \uD06C\uAE30 \uC870\uC815 \uB9C9\uB300\uB97C \uD45C\uC2DC\uD558\uB3C4\uB85D \uC120\uD0DD\uD558\uACE0 \uC704\uC82F\uC5D0\uC11C \uC0C9\uC744 \uC7AC\uC9C0\uC815\uD558\uC9C0 \uC54A\uB294 \uACBD\uC6B0\uC5D0\uB9CC \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uBE60\uB978 \uC120\uD0DD\uAE30 \uBC30\uACBD\uC0C9. \uBE60\uB978 \uC120\uD0DD\uAE30 \uC704\uC82F\uC740 \uBA85\uB839 \uD314\uB808\uD2B8\uC640 \uAC19\uC740 \uC120\uD0DD\uAE30\uB97C \uC704\uD55C \uCEE8\uD14C\uC774\uB108\uC785\uB2C8\uB2E4.","\uBE60\uB978 \uC120\uD0DD\uAE30 \uC804\uACBD\uC0C9. \uC774 \uBE60\uB978 \uC120\uD0DD\uAE30 \uC704\uC82F\uC740 \uBA85\uB839 \uD314\uB808\uD2B8\uC640 \uAC19\uC740 \uC120\uD0DD\uAE30\uB97C \uC704\uD55C \uCEE8\uD14C\uC774\uB108\uC785\uB2C8\uB2E4.","\uBE60\uB978 \uC120\uD0DD\uAE30 \uC81C\uBAA9 \uBC30\uACBD\uC0C9. \uC774 \uBE60\uB978 \uC120\uD0DD\uAE30 \uC704\uC82F\uC740 \uBA85\uB839 \uD314\uB808\uD2B8\uC640 \uAC19\uC740 \uC120\uD0DD\uAE30\uB97C \uC704\uD55C \uCEE8\uD14C\uC774\uB108\uC785\uB2C8\uB2E4.","\uADF8\uB8F9\uD654 \uB808\uC774\uBE14\uC5D0 \uB300\uD55C \uBE60\uB978 \uC120\uD0DD\uAE30 \uC0C9\uC785\uB2C8\uB2E4.","\uADF8\uB8F9\uD654 \uD14C\uB450\uB9AC\uC5D0 \uB300\uD55C \uBE60\uB978 \uC120\uD0DD\uAE30 \uC0C9\uC785\uB2C8\uB2E4.","\uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14\uC740 \uBC14\uB85C \uAC00\uAE30 \uD0A4\uB97C \uB098\uD0C0\uB0B4\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14\uC740 \uBC14\uB85C \uAC00\uAE30 \uD0A4\uB97C \uB098\uD0C0\uB0B4\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4. \uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14\uC740 \uBC14\uB85C \uAC00\uAE30 \uD0A4\uB97C \uB098\uD0C0\uB0B4\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14 \uD14C\uB450\uB9AC \uC544\uB798\uCABD \uC0C9\uC785\uB2C8\uB2E4. \uD0A4 \uBC14\uC778\uB529 \uB808\uC774\uBE14\uC740 \uBC14\uB85C \uAC00\uAE30 \uD0A4\uB97C \uB098\uD0C0\uB0B4\uB294 \uB370 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC120\uD0DD \uC601\uC5ED\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uACE0\uB300\uBE44\uB97C \uC704\uD55C \uC120\uD0DD \uD14D\uC2A4\uD2B8\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uBE44\uD65C\uC131 \uD3B8\uC9D1\uAE30\uC758 \uC120\uD0DD \uD56D\uBAA9 \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC120\uD0DD \uC601\uC5ED\uACFC \uB3D9\uC77C\uD55C \uCF58\uD150\uCE20\uAC00 \uC788\uB294 \uC601\uC5ED\uC758 \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC120\uD0DD \uC601\uC5ED\uACFC \uB3D9\uC77C\uD55C \uCF58\uD150\uCE20\uAC00 \uC788\uB294 \uC601\uC5ED\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uD604\uC7AC \uAC80\uC0C9 \uC77C\uCE58 \uD56D\uBAA9\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uAE30\uD0C0 \uAC80\uC0C9 \uC77C\uCE58 \uD56D\uBAA9\uC758 \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uAC80\uC0C9\uC744 \uC81C\uD55C\uD558\uB294 \uBC94\uC704\uC758 \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uD604\uC7AC \uAC80\uC0C9\uACFC \uC77C\uCE58\uD558\uB294 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uB2E4\uB978 \uAC80\uC0C9\uACFC \uC77C\uCE58\uD558\uB294 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uAC80\uC0C9\uC744 \uC81C\uD55C\uD558\uB294 \uBC94\uC704\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uAC80\uC0C9 \uD3B8\uC9D1\uAE30 \uCFFC\uB9AC\uC758 \uC0C9\uC0C1\uC774 \uC77C\uCE58\uD569\uB2C8\uB2E4.","\uAC80\uC0C9 \uD3B8\uC9D1\uAE30 \uCFFC\uB9AC\uC758 \uD14C\uB450\uB9AC \uC0C9\uC0C1\uC774 \uC77C\uCE58\uD569\uB2C8\uB2E4.","\uAC80\uC0C9 \uBDF0\uB81B \uC644\uB8CC \uBA54\uC2DC\uC9C0\uC758 \uD14D\uC2A4\uD2B8 \uC0C9\uC785\uB2C8\uB2E4.","\uD638\uBC84\uAC00 \uD45C\uC2DC\uB41C \uB2E8\uC5B4 \uC544\uB798\uB97C \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uD638\uBC84\uC758 \uBC30\uACBD\uC0C9.","\uD3B8\uC9D1\uAE30 \uD638\uBC84\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uD638\uBC84\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uD638\uBC84 \uC0C1\uD0DC \uD45C\uC2DC\uC904\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD65C\uC131 \uB9C1\uD06C\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uD78C\uD2B8\uC758 \uC804\uACBD\uC0C9","\uC778\uB77C\uC778 \uD78C\uD2B8\uC758 \uBC30\uACBD\uC0C9","\uD615\uC2DD\uC5D0 \uB300\uD55C \uC778\uB77C\uC778 \uD78C\uD2B8\uC758 \uC804\uACBD\uC0C9","\uD615\uC2DD\uC5D0 \uB300\uD55C \uC778\uB77C\uC778 \uD78C\uD2B8\uC758 \uBC30\uACBD\uC0C9","\uB9E4\uAC1C \uBCC0\uC218\uC5D0 \uB300\uD55C \uC778\uB77C\uC778 \uD78C\uD2B8\uC758 \uC804\uACBD\uC0C9","\uB9E4\uAC1C \uBCC0\uC218\uC5D0 \uB300\uD55C \uC778\uB77C\uC778 \uD78C\uD2B8\uC758 \uBC30\uACBD\uC0C9","\uC804\uAD6C \uC791\uC5C5 \uC544\uC774\uCF58\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uC804\uAD6C \uC790\uB3D9 \uC218\uC815 \uC791\uC5C5 \uC544\uC774\uCF58\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uC0BD\uC785\uB41C \uD14D\uC2A4\uD2B8\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC81C\uAC70\uB41C \uD14D\uC2A4\uD2B8 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC0BD\uC785\uB41C \uC904\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC81C\uAC70\uB41C \uC904\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uC0C9\uC0C1\uC740 \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC904\uC774 \uC0BD\uC785\uB41C \uC5EC\uBC31\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC904\uC774 \uC81C\uAC70\uB41C \uC5EC\uBC31\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC0BD\uC785\uB41C \uCF58\uD150\uCE20\uC5D0 \uB300\uD55C \uCC28\uB4F1 \uAC1C\uC694 \uB208\uAE08\uC790 \uC804\uACBD\uC785\uB2C8\uB2E4.","\uC81C\uAC70\uB41C \uCF58\uD150\uCE20\uC5D0 \uB300\uD55C \uCC28\uB4F1 \uAC1C\uC694 \uB208\uAE08\uC790 \uC804\uACBD\uC785\uB2C8\uB2E4.","\uC0BD\uC785\uB41C \uD14D\uC2A4\uD2B8\uC758 \uC724\uACFD\uC120 \uC0C9\uC785\uB2C8\uB2E4.","\uC81C\uAC70\uB41C \uD14D\uC2A4\uD2B8\uC758 \uC724\uACFD\uC120 \uC0C9\uC785\uB2C8\uB2E4.","\uB450 \uD14D\uC2A4\uD2B8 \uD3B8\uC9D1\uAE30 \uC0AC\uC774\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC758 \uB300\uAC01\uC120 \uCC44\uC6B0\uAE30 \uC0C9\uC785\uB2C8\uB2E4. \uB300\uAC01\uC120 \uCC44\uC6B0\uAE30\uB294 diff \uB098\uB780\uD788 \uBCF4\uAE30\uC5D0\uC11C \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uBE14\uB85D\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uBE14\uB85D\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","diff \uD3B8\uC9D1\uAE30\uC5D0\uC11C \uBCC0\uACBD\uB418\uC9C0 \uC54A\uC740 \uCF54\uB4DC\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC724\uACFD\uC120 \uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131\uD654\uB418\uACE0 \uC120\uD0DD\uB418\uC5C8\uC744 \uB54C \uCD08\uC810\uC774 \uB9DE\uCDB0\uC9C4 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC724\uACFD\uC120 \uC0C9\uC0C1\uC785\uB2C8\uB2E4. \uD65C\uC131 \uBAA9\uB85D/\uD2B8\uB9AC\uC5D0\uB294 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uACE0 \uBE44\uD65C\uC131\uC5D0\uB294 \uADF8\uB807\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uC120\uD0DD\uD55C \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uC120\uD0DD\uD55C \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uC120\uD0DD\uD55C \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC544\uC774\uCF58 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uC120\uD0DD\uD55C \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uC120\uD0DD\uD55C \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uC120\uD0DD\uD55C \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC544\uC774\uCF58 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC778 \uACBD\uC6B0 \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC724\uACFD\uC120 \uC0C9\uC785\uB2C8\uB2E4. \uBAA9\uB85D/\uD2B8\uB9AC\uAC00 \uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD0A4\uBCF4\uB4DC \uD3EC\uCEE4\uC2A4\uB97C \uAC00\uC9C0\uBA70, \uBE44\uD65C\uC131 \uC0C1\uD0DC\uC774\uBA74 \uD3EC\uCEE4\uC2A4\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uD56D\uBAA9\uC744 \uAC00\uB9AC\uD0AC \uB54C \uBAA9\uB85D/\uD2B8\uB9AC \uBC30\uACBD\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uD56D\uBAA9\uC744 \uAC00\uB9AC\uD0AC \uB54C \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uD56D\uBAA9\uC744 \uC774\uB3D9\uD560 \uB54C \uBAA9\uB85D/\uD2B8\uB9AC \uB04C\uC5B4\uC11C \uB193\uAE30 \uBC30\uACBD\uC785\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC \uB0B4\uC5D0\uC11C \uAC80\uC0C9\uD560 \uB54C \uC77C\uCE58 \uD56D\uBAA9 \uAC15\uC870 \uD45C\uC2DC\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBAA9\uB85D/\uD2B8\uB9AC \uB0B4\uC5D0\uC11C \uAC80\uC0C9\uD560 \uB54C \uC77C\uCE58 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD\uC0C9\uC774 \uB2A5\uB3D9\uC801\uC73C\uB85C \uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC744 \uAC15\uC870 \uD45C\uC2DC\uD569\uB2C8\uB2E4.","\uC798\uBABB\uB41C \uD56D\uBAA9\uC5D0 \uB300\uD55C \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD \uC0C9(\uC608: \uD0D0\uC0C9\uAE30\uC758 \uD655\uC778\uD560 \uC218 \uC5C6\uB294 \uB8E8\uD2B8).","\uC624\uB958\uB97C \uD3EC\uD568\uD558\uB294 \uBAA9\uB85D \uD56D\uBAA9\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uACBD\uACE0\uB97C \uD3EC\uD568\uD558\uB294 \uBAA9\uB85D \uD56D\uBAA9\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uC5D0\uC11C \uD615\uC2DD \uD544\uD130 \uC704\uC82F\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uC5D0\uC11C \uD615\uC2DD \uD544\uD130 \uC704\uC82F\uC758 \uC724\uACFD\uC120 \uC0C9\uC785\uB2C8\uB2E4.","\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC774 \uC5C6\uC744 \uB54C \uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uC5D0\uC11C \uD45C\uC2DC\uB418\uB294 \uD615\uC2DD \uD544\uD130 \uC704\uC82F\uC758 \uC724\uACFD\uC120 \uC0C9\uC785\uB2C8\uB2E4.","\uBAA9\uB85D \uBC0F \uD2B8\uB9AC\uC5D0\uC11C \uC720\uD615 \uD544\uD130 \uC704\uC82F\uC758 \uADF8\uB9BC\uC790 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uD544\uD130\uB9C1\uB41C \uC77C\uCE58 \uD56D\uBAA9\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD544\uD130\uB9C1\uB41C \uC77C\uCE58 \uD56D\uBAA9\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uB4E4\uC5EC\uC4F0\uAE30 \uAC00\uC774\uB4DC\uC758 \uD2B8\uB9AC \uC2A4\uD2B8\uB85C\uD06C \uC0C9\uC785\uB2C8\uB2E4.","\uD65C\uC131 \uC0C1\uD0DC\uAC00 \uC544\uB2CC \uB4E4\uC5EC\uC4F0\uAE30 \uC548\uB0B4\uC120\uC758 \uD2B8\uB9AC \uC2A4\uD2B8\uB85C\uD06C \uC0C9\uC785\uB2C8\uB2E4.","\uC5F4 \uC0AC\uC774\uC758 \uD45C \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uD640\uC218 \uD14C\uC774\uBE14 \uD589\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uAC15\uC870\uB418\uC9C0 \uC54A\uC740 \uD56D\uBAA9\uC758 \uBAA9\uB85D/\uD2B8\uB9AC \uC804\uACBD\uC0C9. ","\uD655\uC778\uB780 \uC704\uC82F\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD655\uC778\uB780 \uC704\uC82F\uC774 \uD3EC\uD568\uB41C \uC694\uC18C\uAC00 \uC120\uD0DD\uB41C \uACBD\uC6B0\uC758 \uD655\uC778\uB780 \uC704\uC82F \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD655\uC778\uB780 \uC704\uC82F\uC758 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD655\uC778\uB780 \uC704\uC82F\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uD655\uC778\uB780 \uC704\uC82F\uC774 \uD3EC\uD568\uB41C \uC694\uC18C\uAC00 \uC120\uD0DD\uB41C \uACBD\uC6B0\uC758 \uD655\uC778\uB780 \uC704\uC82F \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uB300\uC2E0 quickInputList.focusBackground\uB97C \uC0AC\uC6A9\uD558\uC138\uC694.","\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBE60\uB978 \uC120\uD0DD\uAE30 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBE60\uB978 \uC120\uD0DD\uAE30 \uC544\uC774\uCF58 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uD56D\uBAA9\uC758 \uBE60\uB978 \uC120\uD0DD\uAE30 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBA54\uB274 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uBA54\uB274 \uD56D\uBAA9 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBA54\uB274 \uD56D\uBAA9 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBA54\uB274\uC758 \uC120\uD0DD\uB41C \uBA54\uB274 \uD56D\uBAA9 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBA54\uB274\uC758 \uC120\uD0DD\uB41C \uBA54\uB274 \uD56D\uBAA9 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBA54\uB274\uC758 \uC120\uD0DD\uB41C \uBA54\uB274 \uD56D\uBAA9 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uBA54\uB274\uC5D0\uC11C \uAD6C\uBD84 \uAE30\uD638 \uBA54\uB274 \uD56D\uBAA9\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uC704\uB85C \uB9C8\uC6B0\uC2A4\uB97C \uAC00\uC838\uAC00\uB294 \uACBD\uC6B0 \uB3C4\uAD6C \uBAA8\uC74C \uBC30\uACBD","\uB9C8\uC6B0\uC2A4\uB97C \uC0AC\uC6A9\uD558\uC5EC \uC791\uC5C5 \uC704\uB85C \uB9C8\uC6B0\uC2A4\uB97C \uAC00\uC838\uAC00\uB294 \uACBD\uC6B0 \uB3C4\uAD6C \uBAA8\uC74C \uC724\uACFD\uC120","\uC791\uC5C5 \uC704\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uB193\uC558\uC744 \uB54C \uB3C4\uAD6C \uBAA8\uC74C \uBC30\uACBD","\uCF54\uB4DC \uC870\uAC01 \uD0ED \uC815\uC9C0\uC758 \uAC15\uC870 \uD45C\uC2DC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uCF54\uB4DC \uC870\uAC01 \uD0ED \uC815\uC9C0\uC758 \uAC15\uC870 \uD45C\uC2DC \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uCF54\uB4DC \uC870\uAC01 \uB9C8\uC9C0\uB9C9 \uD0ED \uC815\uC9C0\uC758 \uAC15\uC870 \uD45C\uC2DC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uCF54\uB4DC \uC870\uAC01 \uB9C8\uC9C0\uB9C9 \uD0ED \uC815\uC9C0\uC758 \uAC15\uC870 \uD45C\uC2DC \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uC774\uB3D9 \uACBD\uB85C \uD56D\uBAA9\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uC774\uB3D9 \uACBD\uB85C \uD56D\uBAA9\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD3EC\uCEE4\uC2A4\uAC00 \uC788\uB294 \uC774\uB3D9 \uACBD\uB85C \uD56D\uBAA9\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uC120\uD0DD\uD55C \uC774\uB3D9 \uACBD\uB85C \uD56D\uBAA9\uC758 \uC0C9\uC785\uB2C8\uB2E4.","\uC774\uB3D9 \uACBD\uB85C \uD56D\uBAA9 \uC120\uD0DD\uAE30\uC758 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC758 \uD604\uC7AC \uD5E4\uB354 \uBC30\uACBD\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC758 \uD604\uC7AC \uCF58\uD150\uCE20 \uBC30\uACBD\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC758 \uB4E4\uC5B4\uC624\uB294 \uD5E4\uB354 \uBC30\uACBD\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC758 \uB4E4\uC5B4\uC624\uB294 \uCF58\uD150\uCE20 \uBC30\uACBD\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC758 \uACF5\uD1B5 \uC0C1\uC704 \uD5E4\uB354 \uBC30\uACBD\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC758 \uACF5\uD1B5 \uC0C1\uC704 \uCF58\uD150\uCE20 \uBC30\uACBD\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC5D0\uC11C \uD5E4\uB354 \uBC0F \uC2A4\uD50C\uB9AC\uD130\uC758 \uD14C\uB450\uB9AC \uC0C9\uC785\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC5D0\uC11C \uD604\uC7AC \uAC1C\uC694 \uB208\uAE08 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC5D0\uC11C \uC218\uC2E0 \uAC1C\uC694 \uB208\uAE08 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC778\uB77C\uC778 \uBCD1\uD569 \uCDA9\uB3CC\uC5D0\uC11C \uACF5\uD1B5 \uACFC\uAC70 \uAC1C\uC694 \uB208\uAE08 \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uC77C\uCE58 \uD56D\uBAA9 \uCC3E\uAE30\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uD45C\uC2DD \uC0C9\uC785\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC120\uD0DD \uD56D\uBAA9\uC758 \uAC1C\uC694 \uB208\uAE08\uC790 \uD45C\uC2DD \uC0C9\uC774 \uAC15\uC870 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uAE30\uBCF8 \uC7A5\uC2DD\uC744 \uC228\uAE30\uC9C0 \uC54A\uB3C4\uB85D \uC0C9\uC740 \uBD88\uD22C\uBA85\uD558\uC9C0 \uC54A\uC544\uC57C \uD569\uB2C8\uB2E4.","\uC77C\uCE58\uD558\uB294 \uD56D\uBAA9\uC744 \uCC3E\uAE30 \uC704\uD55C \uBBF8\uB2C8\uB9F5 \uD45C\uC2DD \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC120\uD0DD\uC744 \uBC18\uBCF5\uD558\uAE30 \uC704\uD55C \uBBF8\uB2C8\uB9F5 \uD45C\uC2DD \uC0C9\uC785\uB2C8\uB2E4.","\uD3B8\uC9D1\uAE30 \uC120\uD0DD \uC791\uC5C5\uC744 \uC704\uD55C \uBBF8\uB2C8\uB9F5 \uB9C8\uCEE4 \uC0C9\uC785\uB2C8\uB2E4.","\uC815\uBCF4\uC5D0 \uB300\uD55C \uBBF8\uB2C8\uB9F5 \uB9C8\uCEE4 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uACBD\uACE0\uC758 \uBBF8\uB2C8\uB9F5 \uB9C8\uCEE4 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uC624\uB958\uC5D0 \uB300\uD55C \uBBF8\uB2C8\uB9F5 \uB9C8\uCEE4 \uC0C9\uC0C1\uC785\uB2C8\uB2E4.","\uBBF8\uB2C8\uB9F5 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.",'\uBBF8\uB2C8\uB9F5\uC5D0\uC11C \uB80C\uB354\uB9C1\uB41C \uC804\uACBD \uC694\uC18C\uC758 \uBD88\uD22C\uBA85\uB3C4\uC785\uB2C8\uB2E4. \uC608\uB97C \uB4E4\uC5B4, "#000000c0"\uC740 \uBD88\uD22C\uBA85\uB3C4 75%\uB85C \uC694\uC18C\uB97C \uB80C\uB354\uB9C1\uD569\uB2C8\uB2E4.',"\uBBF8\uB2C8\uB9F5 \uC2AC\uB77C\uC774\uB354 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uB9C8\uC6B0\uC2A4\uB85C \uAC00\uB9AC\uD0AC \uB54C \uBBF8\uB2C8\uB9F5 \uC2AC\uB77C\uC774\uB354 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uD074\uB9AD\uD588\uC744 \uB54C \uBBF8\uB2C8\uB9F5 \uC2AC\uB77C\uC774\uB354 \uBC30\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uBB38\uC81C \uC624\uB958 \uC544\uC774\uCF58\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC0C9\uC785\uB2C8\uB2E4.","\uBB38\uC81C \uACBD\uACE0 \uC544\uC774\uCF58\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC0C9\uC785\uB2C8\uB2E4.","\uBB38\uC81C \uC815\uBCF4 \uC544\uC774\uCF58\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8\uC5D0 \uC0AC\uC6A9\uB41C \uC804\uACBD\uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8 \uAC00\uB85C\uC904\uC5D0 \uC0AC\uC6A9\uB41C \uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8 \uC2DC\uAC01\uD654\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uBE68\uAC04\uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8 \uC2DC\uAC01\uD654\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uD30C\uB780\uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8 \uC2DC\uAC01\uD654\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uB178\uB780\uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8 \uC2DC\uAC01\uD654\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC8FC\uD669\uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8 \uC2DC\uAC01\uD654\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uB179\uC0C9\uC785\uB2C8\uB2E4.","\uCC28\uD2B8 \uC2DC\uAC01\uD654\uC5D0 \uC0AC\uC6A9\uB418\uB294 \uC790\uC8FC\uC0C9\uC785\uB2C8\uB2E4."],"vs/platform/theme/common/iconRegistry":["\uC0AC\uC6A9\uD560 \uAE00\uAF34\uC758 ID\uC785\uB2C8\uB2E4. \uC124\uC815\uD558\uC9C0 \uC54A\uC73C\uBA74 \uCCAB \uBC88\uC9F8\uB85C \uC815\uC758\uD55C \uAE00\uAF34\uC774 \uC0AC\uC6A9\uB429\uB2C8\uB2E4.","\uC544\uC774\uCF58 \uC815\uC758\uC640 \uC5F0\uACB0\uB41C \uAE00\uAF34 \uBB38\uC790\uC785\uB2C8\uB2E4.","\uC704\uC82F\uC5D0\uC11C \uB2EB\uAE30 \uC791\uC5C5\uC758 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uC774\uC804 \uD3B8\uC9D1\uAE30 \uC704\uCE58\uB85C \uC774\uB3D9 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4.","\uB2E4\uC74C \uD3B8\uC9D1\uAE30 \uC704\uCE58\uB85C \uC774\uB3D9 \uC544\uC774\uCF58\uC785\uB2C8\uB2E4."],"vs/platform/undoRedo/common/undoRedoService":["{0} \uD30C\uC77C\uC774 \uB2EB\uD788\uACE0 \uB514\uC2A4\uD06C\uC5D0\uC11C \uC218\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.","{0} \uD30C\uC77C\uC740 \uD638\uD658\uB418\uC9C0 \uC54A\uB294 \uBC29\uC2DD\uC73C\uB85C \uC218\uC815\uB418\uC5C8\uC2B5\uB2C8\uB2E4.","\uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {1}","\uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {1}","{1}\uC5D0 \uBCC0\uACBD \uB0B4\uC6A9\uC774 \uC801\uC6A9\uB418\uC5C8\uC73C\uBBC0\uB85C \uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","{1}\uC5D0\uC11C \uC2E4\uD589 \uCDE8\uC18C \uB610\uB294 \uB2E4\uC2DC \uC2E4\uD589 \uC791\uC5C5\uC774 \uC774\uBBF8 \uC2E4\uD589 \uC911\uC774\uBBC0\uB85C \uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uADF8\uB3D9\uC548 \uC2E4\uD589 \uCDE8\uC18C \uB610\uB294 \uB2E4\uC2DC \uC2E4\uD589 \uC791\uC5C5\uC774 \uBC1C\uC0DD\uD588\uAE30 \uB54C\uBB38\uC5D0 \uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","\uD30C\uC77C {0}\uAC1C\uC5D0\uC11C \uC2E4\uD589 \uCDE8\uC18C(&&U)","\uC774 \uD30C\uC77C \uC2E4\uD589 \uCDE8\uC18C(&&F)","\uC2E4\uD589 \uCDE8\uC18C \uB610\uB294 \uB2E4\uC2DC \uC2E4\uD589 \uC791\uC5C5\uC774 \uC774\uBBF8 \uC2E4\uD589 \uC911\uC774\uBBC0\uB85C '{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","'{0}'\uC744(\uB97C) \uC2E4\uD589 \uCDE8\uC18C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?","\uC608(&&Y)","\uC544\uB2C8\uC694","\uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uB2E4\uC2DC \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {1}","\uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uB2E4\uC2DC \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. {1}","{1}\uC5D0 \uBCC0\uACBD \uB0B4\uC6A9\uC774 \uC801\uC6A9\uB418\uC5C8\uC73C\uBBC0\uB85C \uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uB2E4\uC2DC \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","{1}\uC5D0\uC11C \uC2E4\uD589 \uCDE8\uC18C \uB610\uB294 \uB2E4\uC2DC \uC2E4\uD589 \uC791\uC5C5\uC774 \uC774\uBBF8 \uC2E4\uD589 \uC911\uC774\uBBC0\uB85C \uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uB2E4\uC2DC \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uADF8\uB3D9\uC548 \uC2E4\uD589 \uCDE8\uC18C \uB610\uB294 \uB2E4\uC2DC \uC2E4\uD589 \uC791\uC5C5\uC774 \uBC1C\uC0DD\uD588\uAE30 \uB54C\uBB38\uC5D0 \uBAA8\uB4E0 \uD30C\uC77C\uC5D0\uC11C '{0}'\uC744(\uB97C) \uB2E4\uC2DC \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.","\uC2E4\uD589 \uCDE8\uC18C \uB610\uB294 \uB2E4\uC2DC \uC2E4\uD589 \uC791\uC5C5\uC774 \uC774\uBBF8 \uC2E4\uD589 \uC911\uC774\uBBC0\uB85C '{0}'\uC744(\uB97C) \uB2E4\uC2DC \uC2E4\uD589\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."],"vs/platform/workspace/common/workspace":["\uCF54\uB4DC \uC791\uC5C5 \uC601\uC5ED"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.ko.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.ru.js b/lib/vs/editor/editor.main.nls.ru.js deleted file mode 100644 index dc347f7..0000000 --- a/lib/vs/editor/editor.main.nls.ru.js +++ /dev/null @@ -1,31 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.ru",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["\u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"],"vs/base/browser/ui/findinput/findInputToggles":["\u0421 \u0443\u0447\u0435\u0442\u043E\u043C \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430","\u0421\u043B\u043E\u0432\u043E \u0446\u0435\u043B\u0438\u043A\u043E\u043C","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0440\u0435\u0433\u0443\u043B\u044F\u0440\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435"],"vs/base/browser/ui/findinput/replaceInput":["\u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435","\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440"],"vs/base/browser/ui/hover/hoverWidget":["\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u044D\u0442\u043E\u0442 \u0430\u0441\u043F\u0435\u043A\u0442 \u0432 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u043C \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E {0}.",'\u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u044D\u0442\u043E\u0442 \u0430\u0441\u043F\u0435\u043A\u0442 \u0432 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439", \u043A\u043E\u0442\u043E\u0440\u0443\u044E \u0432 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u0435 \u0432\u0440\u0435\u043C\u044F \u043D\u0435\u043B\u044C\u0437\u044F \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448.'],"vs/base/browser/ui/iconLabel/iconLabelHover":["\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\u2026"],"vs/base/browser/ui/inputbox/inputBox":["\u041E\u0448\u0438\u0431\u043A\u0430: {0}","\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435: {0}","\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F: {0}","\u0434\u043B\u044F \u0436\u0443\u0440\u043D\u0430\u043B\u0430","\u041E\u0447\u0438\u0449\u0435\u043D\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["\u0441\u0432\u043E\u0431\u043E\u0434\u043D\u044B\u0439"],"vs/base/browser/ui/selectBox/selectBoxCustom":["\u041F\u043E\u043B\u0435 \u0432\u044B\u0431\u043E\u0440\u0430"],"vs/base/browser/ui/toolbar/toolbar":["\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F..."],"vs/base/browser/ui/tree/abstractTree":["\u0424\u0438\u043B\u044C\u0442\u0440","\u041D\u0435\u0447\u0435\u0442\u043A\u043E\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442 \u0434\u043B\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430","\u0412\u0432\u043E\u0434 \u0434\u043B\u044F \u043F\u043E\u0438\u0441\u043A\u0430","\u0412\u0432\u043E\u0434 \u0434\u043B\u044F \u043F\u043E\u0438\u0441\u043A\u0430","\u0417\u0430\u043A\u0440\u044B\u0442\u044C","\u042D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B."],"vs/base/common/actions":["(\u043F\u0443\u0441\u0442\u043E)"],"vs/base/common/errorMessage":["{0}: {1}","\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430 ({0})","\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430. \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u044B\u0435 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0441\u043C. \u0432 \u0436\u0443\u0440\u043D\u0430\u043B\u0435.","\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430. \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u044B\u0435 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0441\u043C. \u0432 \u0436\u0443\u0440\u043D\u0430\u043B\u0435.","{0} (\u0432\u0441\u0435\u0433\u043E \u043E\u0448\u0438\u0431\u043E\u043A: {1})","\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430. \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u044B\u0435 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0441\u043C. \u0432 \u0436\u0443\u0440\u043D\u0430\u043B\u0435."],"vs/base/common/keybindingLabels":["CTRL","SHIFT","ALT","Windows","CTRL","SHIFT","ALT","Super","CTRL","SHIFT","\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440","\u041A\u043E\u043C\u0430\u043D\u0434\u0430","CTRL","SHIFT","ALT","Windows","CTRL","SHIFT","ALT","Super"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["\u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440","\u0421\u0435\u0439\u0447\u0430\u0441 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D.","{0} \u0427\u0442\u043E\u0431\u044B \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C \u0447\u0438\u0442\u0430\u0442\u0435\u043B\u044F, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 {1}",'{0} \u0427\u0442\u043E\u0431\u044B \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C \u0447\u0438\u0442\u0430\u0442\u0435\u043B\u044F, \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0431\u044B\u0441\u0442\u0440\u044B\u0439 \u0432\u044B\u0431\u043E\u0440 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E {1} \u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0443 "\u0410\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u044F \u0440\u0435\u0436\u0438\u043C\u0430 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0434\u043B\u044F \u0447\u0438\u0442\u0430\u0442\u0435\u043B\u044F", \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0441\u0435\u0439\u0447\u0430\u0441 \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B.','{0} \u041D\u0430\u0437\u043D\u0430\u0447\u044C\u0442\u0435 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448 \u0434\u043B\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u0410\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u044F \u0440\u0435\u0436\u0438\u043C\u0430 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0434\u043B\u044F \u0447\u0438\u0442\u0430\u0442\u0435\u043B\u044F", \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u044B\u0445 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0439 \u043A\u043B\u0430\u0432\u0438\u0448 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E {1} \u0438 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043E.'],"vs/editor/browser/coreCommands":["\u0420\u0430\u0437\u043C\u0435\u0449\u0430\u0442\u044C \u043D\u0430 \u043A\u043E\u043D\u0446\u0435 \u0434\u0430\u0436\u0435 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u0434\u043B\u0438\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A","\u0420\u0430\u0437\u043C\u0435\u0449\u0430\u0442\u044C \u043D\u0430 \u043A\u043E\u043D\u0446\u0435 \u0434\u0430\u0436\u0435 \u0434\u043B\u044F \u0431\u043E\u043B\u0435\u0435 \u0434\u043B\u0438\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A","\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043A\u0443\u0440\u0441\u043E\u0440\u044B \u0443\u0434\u0430\u043B\u0435\u043D\u044B."],"vs/editor/browser/editorExtensions":["&&\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C","\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C","&&\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C","\u0412\u0435\u0440\u043D\u0443\u0442\u044C","&&\u0412\u044B\u0434\u0435\u043B\u0438\u0442\u044C \u0432\u0441\u0435","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435"],"vs/editor/browser/widget/codeEditorWidget":["\u0427\u0438\u0441\u043B\u043E \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u0432 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043E {0}. \u0414\u043B\u044F \u043F\u0440\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043A\u0440\u0443\u043F\u043D\u044B\u0445 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C [\u043F\u043E\u0438\u0441\u043A \u0438 \u0437\u0430\u043C\u0435\u043D\u0443](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) \u0438\u043B\u0438 \u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u044F \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u0432 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u044F \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u0432"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":['\u0417\u043D\u0430\u0447\u043E\u043A "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C" \u0432 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0439','\u0417\u043D\u0430\u0447\u043E\u043A "\u0423\u0434\u0430\u043B\u0438\u0442\u044C" \u0432 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0439','\u0417\u043D\u0430\u0447\u043E\u043A "\u0417\u0430\u043A\u0440\u044B\u0442\u044C" \u0432 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0439',"\u0417\u0430\u043A\u0440\u044B\u0442\u044C","\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0435 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044F. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0421\u0422\u0420\u0415\u041B\u041A\u0410 \u0412\u0412\u0415\u0420\u0425 \u0438 \u0421\u0422\u0420\u0415\u041B\u041A\u0410 \u0412\u041D\u0418\u0417 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F.","\u043D\u0435\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A","1 \u0441\u0442\u0440\u043E\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0430","\u0421\u0442\u0440\u043E\u043A \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E: {0}","\u0420\u0430\u0437\u043B\u0438\u0447\u0438\u0435 {0} \u0438\u0437 {1}: \u0438\u0441\u0445\u043E\u0434\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 {2}, {3}, \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 {4}, {5}","\u043F\u0443\u0441\u0442\u043E\u0439","{0} \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 {1}","{0} \u0438\u0441\u0445\u043E\u0434\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 {1} \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 {2}","+ {0} \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 {1}","- {0} \u0438\u0441\u0445\u043E\u0434\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 {1}"],"vs/editor/browser/widget/diffEditor/colors":["\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430, \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043D\u043E\u0433\u043E \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430, \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043D\u043E\u0433\u043E \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439."],"vs/editor/browser/widget/diffEditor/decorations":["\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u041E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0439 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u044C \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u0440\u0435\u0433\u0438\u043E\u043D\u043E\u0432","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u043B\u0438 \u0441\u043A\u0440\u044B\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043D\u044B\u0435 \u0431\u043B\u043E\u043A\u0438 \u043A\u043E\u0434\u0430",'\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0442\u0435\u043B\u044C "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u043C \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0435"',"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u043D\u043E\u043C \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0435","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043D\u044B\u0435 \u0431\u043B\u043E\u043A\u0438 \u043A\u043E\u0434\u0430","\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439","\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0442\u043E\u0440\u043E\u043D\u0443","\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044F","\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u0438","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u0438","\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u0439","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C\u0443 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u044E","\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0439","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u044E"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 {0}, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u043A\u0443 \u043F\u043E \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u043C \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044F\u043C."],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u0443\u044E \u043E\u0431\u043B\u0430\u0441\u0442\u044C","\u0429\u0435\u043B\u043A\u043D\u0438\u0442\u0435 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435 \u0432\u044B\u0448\u0435","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435","\u0429\u0435\u043B\u043A\u043D\u0438\u0442\u0435 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0449\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0438\u0436\u0435","\u0421\u043A\u0440\u044B\u0442\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 ({0})","\u0414\u0432\u0430\u0436\u0434\u044B \u0449\u0435\u043B\u043A\u043D\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0440\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 ({0})","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 ({0})","\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["\u041A\u043E\u0434 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D \u0441 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F\u043C\u0438 \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 {0}-{1}","\u041A\u043E\u0434 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D \u0441 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F\u043C\u0438 \u0438\u0437 \u0441\u0442\u0440\u043E\u043A\u0438 {0}-{1}","\u041A\u043E\u0434 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 {0}-{1}","\u041A\u043E\u0434 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D \u0438\u0437 \u0441\u0442\u0440\u043E\u043A\u0438 {0}-{1}"],"vs/editor/common/config/editorConfigurationSchema":["\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440","\u0427\u0438\u0441\u043B\u043E \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0435\u0435 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438. \u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430, \u0435\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 {0}.",'\u0427\u0438\u0441\u043B\u043E \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u0430, \u043B\u0438\u0431\u043E `"tabSize"` \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0438\u0437 "#editor.tabSize#". \u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430, \u0435\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 "#editor.detectIndentation#".',"\u0412\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043F\u0440\u043E\u0431\u0435\u043B\u044B \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 TAB. \u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430, \u0435\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 {0}.","\u041D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0444\u0430\u0439\u043B\u0430 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0443\u0442 \u043B\u0438 {0} \u0438 {1} \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u0444\u0430\u0439\u043B\u0430.","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u043C\u044B\u0439 \u043A\u043E\u043D\u0435\u0447\u043D\u044B\u0439 \u043F\u0440\u043E\u0431\u0435\u043B.","\u0421\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u0430\u044F \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0430 \u0434\u043B\u044F \u0431\u043E\u043B\u044C\u0448\u0438\u0445 \u0444\u0430\u0439\u043B\u043E\u0432 \u0441 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435\u043C \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0444\u0443\u043D\u043A\u0446\u0438\u0439, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0438\u043D\u0442\u0435\u043D\u0441\u0438\u0432\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442 \u043F\u0430\u043C\u044F\u0442\u044C.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u043E\u0446\u0435\u043D\u0438\u0432\u0430\u0442\u044C \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u0441\u043B\u043E\u0432 \u0432 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0435.","\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u043E\u0432 \u0442\u043E\u043B\u044C\u043A\u043E \u0438\u0437 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0433\u043E \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430.","\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u043E\u0432 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u043D\u0430 \u043E\u0434\u043D\u043E\u043C \u044F\u0437\u044B\u043A\u0435.","\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0441\u043B\u043E\u0432 \u0438\u0437 \u0432\u0441\u0435\u0445 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0438\u0437 \u043A\u0430\u043A\u0438\u0445 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u0431\u0443\u0434\u0443\u0442 \u0432\u044B\u0447\u0438\u0441\u043B\u044F\u0442\u044C\u0441\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u0441\u043B\u043E\u0432.","\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0446\u0432\u0435\u0442\u043E\u0432\u044B\u0445 \u0442\u0435\u043C.","\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0446\u0432\u0435\u0442\u043E\u0432\u044B\u0445 \u0442\u0435\u043C.",'\u0421\u0435\u043C\u0430\u043D\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 "semanticHighlighting" \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0446\u0432\u0435\u0442\u043E\u0432\u043E\u0439 \u0442\u0435\u043C\u044B.',"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043F\u043E\u043A\u0430\u0437 \u0441\u0435\u043C\u0430\u043D\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u0438 \u0434\u043B\u044F \u044F\u0437\u044B\u043A\u043E\u0432, \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0449\u0438\u0445 \u0435\u0435.","\u041E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u0431\u044B\u0441\u0442\u0440\u044B\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u043C \u0434\u0430\u0436\u0435 \u043F\u0440\u0438 \u0434\u0432\u043E\u0439\u043D\u043E\u043C \u0449\u0435\u043B\u0447\u043A\u0435 \u043F\u043E \u0435\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u043C\u0443 \u0438 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 ESC.","\u0421\u0442\u0440\u043E\u043A\u0438, \u0434\u043B\u0438\u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043F\u0440\u0435\u0432\u044B\u0448\u0430\u0435\u0442 \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435, \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0437\u043C\u0435\u0447\u0435\u043D\u044B \u0438\u0437 \u0441\u043E\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u0430 \u043B\u0438 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u043F\u0440\u043E\u0438\u0441\u0445\u043E\u0434\u0438\u0442\u044C \u0430\u0441\u0438\u043D\u0445\u0440\u043E\u043D\u043D\u043E \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u0440\u043E\u043B\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0430\u0441\u0438\u043D\u0445\u0440\u043E\u043D\u043D\u0443\u044E \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0443. \u0422\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u043E\u0442\u043B\u0430\u0434\u043A\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u0430 \u043B\u0438 \u0430\u0441\u0438\u043D\u0445\u0440\u043E\u043D\u043D\u0430\u044F \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C\u0441\u044F \u043F\u043E \u043E\u0442\u043D\u043E\u0448\u0435\u043D\u0438\u044E \u043A \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0439 \u0444\u043E\u043D\u043E\u0432\u043E\u0439 \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0435. \u041C\u043E\u0436\u0435\u0442 \u0437\u0430\u043C\u0435\u0434\u043B\u0438\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0443. \u0422\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u043E\u0442\u043B\u0430\u0434\u043A\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0441\u043A\u043E\u0431\u043E\u043A, \u0443\u0432\u0435\u043B\u0438\u0447\u0438\u0432\u0430\u044E\u0449\u0438\u0435 \u0438\u043B\u0438 \u0443\u043C\u0435\u043D\u044C\u0448\u0430\u044E\u0449\u0438\u0435 \u043E\u0442\u0441\u0442\u0443\u043F.","\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B \u0441\u043A\u043E\u0431\u043A\u0438 \u0438\u043B\u0438 \u0441\u0442\u0440\u043E\u043A\u043E\u0432\u0430\u044F \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C.","\u0417\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B \u0441\u043A\u043E\u0431\u043A\u0438 \u0438\u043B\u0438 \u0441\u0442\u0440\u043E\u043A\u043E\u0432\u0430\u044F \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043F\u0430\u0440\u044B \u0441\u043A\u043E\u0431\u043E\u043A, \u0446\u0432\u0435\u0442 \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043E\u0442 \u0438\u0445 \u0443\u0440\u043E\u0432\u043D\u044F \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F, \u0435\u0441\u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u043E\u043F\u0446\u0438\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0446\u0432\u0435\u0442\u043E\u043C.","\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B \u0441\u043A\u043E\u0431\u043A\u0438 \u0438\u043B\u0438 \u0441\u0442\u0440\u043E\u043A\u043E\u0432\u0430\u044F \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C.","\u0417\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0439 \u0441\u0438\u043C\u0432\u043E\u043B \u0441\u043A\u043E\u0431\u043A\u0438 \u0438\u043B\u0438 \u0441\u0442\u0440\u043E\u043A\u043E\u0432\u0430\u044F \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C.","\u0412\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F \u0432 \u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430\u0445, \u043F\u043E \u0438\u0441\u0442\u0435\u0447\u0435\u043D\u0438\u0438 \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043E\u0442\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F. \u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 0, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0432\u0440\u0435\u043C\u044F \u043E\u0436\u0438\u0434\u0430\u043D\u0438\u044F.","\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0444\u0430\u0439\u043B\u0430 \u0432 \u041C\u0411 \u0434\u043B\u044F \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u0439. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 0 \u0431\u0435\u0437 \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0435\u043D\u0438\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u0430\u043A \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043E\u0442\u043B\u0438\u0447\u0438\u044F: \u0440\u044F\u0434\u043E\u043C \u0438\u043B\u0438 \u0432 \u0442\u0435\u043A\u0441\u0442\u0435.","\u0415\u0441\u043B\u0438 \u0448\u0438\u0440\u0438\u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043C\u0435\u043D\u044C\u0448\u0435 \u044D\u0442\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435.","\u0415\u0441\u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D \u0438 \u0448\u0438\u0440\u0438\u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435.","\u0415\u0441\u043B\u0438 \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0430 \u043F\u043E\u043B\u0435 \u0433\u043B\u0438\u0444\u0430 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0441\u0442\u0440\u0435\u043B\u043A\u0438 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439.","\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u0443\u0435\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0438\u043B\u0438 \u043A\u043E\u043D\u0435\u0447\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0431\u0435\u043B\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0438\u043D\u0434\u0438\u043A\u0430\u0442\u043E\u0440\u044B +/- \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0445 \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u044B\u0445 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 CodeLens \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0421\u0442\u0440\u043E\u043A\u0438 \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u044C\u0441\u044F \u043D\u0438\u043A\u043E\u0433\u0434\u0430.","\u0421\u0442\u0440\u043E\u043A\u0438 \u0431\u0443\u0434\u0443\u0442 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u044C\u0441\u044F \u043F\u043E \u0448\u0438\u0440\u0438\u043D\u0435 \u043E\u043A\u043D\u0430 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430.","\u0421\u0442\u0440\u043E\u043A\u0438 \u0431\u0443\u0434\u0443\u0442 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u044C\u0441\u044F \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u043E\u0439 {0}.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442 \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0439 \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044F.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0439 \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044F.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0434\u043B\u044F \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0442\u0440\u043E\u043A \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u0440\u0438 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0438 \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0435 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u044F \u043A\u043E\u0434\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043F\u0443\u0441\u0442\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F, \u0447\u0442\u043E\u0431\u044B \u0443\u0432\u0438\u0434\u0435\u0442\u044C, \u0433\u0434\u0435 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0441\u0438\u043C\u0432\u043E\u043B\u044B."],"vs/editor/common/config/editorOptions":["\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C API-\u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044B \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u044B, \u0447\u0442\u043E\u0431\u044B \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0442\u044C, \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043B\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0447\u0442\u0435\u043D\u0438\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u0430","\u041E\u043F\u0442\u0438\u043C\u0438\u0437\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0441\u043E \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E\u043C \u0447\u0442\u0435\u043D\u0438\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u0430","\u041F\u0440\u0435\u0434\u043F\u043E\u043B\u0430\u0433\u0430\u0442\u044C, \u0447\u0442\u043E \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0447\u0442\u0435\u043D\u0438\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u0430 \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0437\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u0441\u043A\u0438\u0439 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u043E\u043F\u0442\u0438\u043C\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u043B\u044F \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0447\u0442\u0435\u043D\u0438\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u043F\u0440\u043E\u0431\u0435\u043B \u043F\u0440\u0438 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u043F\u0443\u0441\u0442\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F, \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432 \u043A \u0441\u0442\u0440\u043E\u043A\u0430\u043C.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043A\u043E\u043F\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430 \u043F\u0440\u0438 \u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438 \u0431\u0435\u0437 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u043A\u0443\u0440\u0441\u043E\u0440 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u043F\u043E\u0438\u0441\u043A\u0430 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435.","\u041D\u0438\u043A\u043E\u0433\u0434\u0430 \u043D\u0435 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u043E\u0438\u0441\u043A\u0430 \u0438\u0437 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0412\u0441\u0435\u0433\u0434\u0430 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u043E\u0438\u0441\u043A\u0430 \u0438\u0437 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u0432\u043A\u043B\u044E\u0447\u0430\u044F \u0441\u043B\u043E\u0432\u0430 \u0432 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u0412\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0432 \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u043E\u0438\u0441\u043A\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u0438\u0437 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043C\u043E\u0436\u043D\u043E \u043B\u0438 \u043F\u0435\u0440\u0435\u0434\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u0438\u0437 \u0442\u0435\u043A\u0441\u0442\u0430, \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u041D\u0438\u043A\u043E\u0433\u0434\u0430 \u043D\u0435 \u0432\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \xAB\u041D\u0430\u0439\u0442\u0438 \u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0438\xBB \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 (\u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E).","\u0412\u0441\u0435\u0433\u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0430\u0442\u044C \u0444\u0443\u043D\u043A\u0446\u0438\u044E \xAB\u041D\u0430\u0439\u0442\u0438 \u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0438\xBB \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.","\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0444\u0443\u043D\u043A\u0446\u0438\u0438 \xAB\u041D\u0430\u0439\u0442\u0438 \u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0438\xBB \u043F\u0440\u0438 \u0432\u044B\u0431\u043E\u0440\u0435 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u0441\u0442\u0440\u043E\u043A \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0443\u0441\u043B\u043E\u0432\u0438\u0435\u043C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0444\u0443\u043D\u043A\u0446\u0438\u0438 \xAB\u041D\u0430\u0439\u0442\u0438 \u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0438\xBB.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u043E \u043B\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u0441\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u0438\u043B\u0438 \u0438\u0437\u043C\u0435\u043D\u044F\u0442\u044C \u043E\u0431\u0449\u0438\u0439 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 macOS.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u043E \u043B\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u043D\u0430\u0447\u0430\u043B\u0435 \u043E\u043A\u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430. \u0415\u0441\u043B\u0438 \u0437\u0430\u0434\u0430\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 true, \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u043F\u0435\u0440\u0432\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u0440\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u043E\u043C \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 \u043F\u043E\u0438\u0441\u043A \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0443\u0441\u043A\u0430\u0442\u044C\u0441\u044F \u0441 \u043D\u0430\u0447\u0430\u043B\u0430 (\u0438\u043B\u0438 \u0441 \u043A\u043E\u043D\u0446\u0430), \u0435\u0441\u043B\u0438 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043D\u0438\u043A\u0430\u043A\u0438\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439.",'\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u043B\u0438\u0433\u0430\u0442\u0443\u0440\u044B \u0448\u0440\u0438\u0444\u0442\u043E\u0432 (\u0445\u0430\u0440\u0430\u043A\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043A\u0438 \u0448\u0440\u0438\u0444\u0442\u0430 "calt" \u0438 "liga"). \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u0435 \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0443 \u0434\u043B\u044F \u0434\u0435\u0442\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u043E\u043C CSS "font-feature-settings".','\u042F\u0432\u043D\u043E\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u043E CSS "font-feature-settings". \u0415\u0441\u043B\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0442\u043E\u043B\u044C\u043A\u043E \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043B\u0438\u0433\u0430\u0442\u0443\u0440\u044B, \u0432\u043C\u0435\u0441\u0442\u043E \u043D\u0435\u0433\u043E \u043C\u043E\u0436\u043D\u043E \u043F\u0435\u0440\u0435\u0434\u0430\u0442\u044C \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435.','\u041D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043B\u0438\u0433\u0430\u0442\u0443\u0440\u044B \u0438\u043B\u0438 \u0445\u0430\u0440\u0430\u043A\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043A\u0438 \u0448\u0440\u0438\u0444\u0442\u0430. \u041C\u043E\u0436\u043D\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u044C \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435, \u0447\u0442\u043E\u0431\u044B \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043B\u0438\u0433\u0430\u0442\u0443\u0440\u044B, \u0438\u043B\u0438 \u0441\u0442\u0440\u043E\u043A\u0443 \u0434\u043B\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 CSS "font-feature-settings".',"\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u0435 \u0438\u0437 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 font-weight \u0432 font-variation-settings. \u0418\u0437\u043C\u0435\u043D\u0438\u0442\u0435 \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0443 \u0434\u043B\u044F \u0434\u0435\u0442\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u043E\u043C CSS font-variation-settings.","\u042F\u0432\u043D\u043E\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u043E CSS font-variation-settings. \u0415\u0441\u043B\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043B\u0438\u0448\u044C \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 font-weight \u0432 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 font-variation-settings, \u0432\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 \u043C\u043E\u0436\u043D\u043E \u043F\u0435\u0440\u0435\u0434\u0430\u0442\u044C \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435.","\u041D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0448\u0440\u0438\u0444\u0442\u043E\u0432. \u041C\u043E\u0436\u0435\u0442 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u0441\u043E\u0431\u043E\u0439 \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0434\u043B\u044F \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u043D\u0438\u044F \u0438\u0437 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 font-weight \u0432 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 font-variation-settings \u0438\u043B\u0438 \u0441\u0442\u0440\u043E\u043A\u0443, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0443\u044E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 CSS font-variation-settings.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u043C\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0432 \u043F\u0438\u043A\u0441\u0435\u043B\u044F\u0445.",'\u0414\u043E\u043F\u0443\u0441\u043A\u0430\u044E\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043A\u043B\u044E\u0447\u0435\u0432\u044B\u0435 \u0441\u043B\u043E\u0432\u0430 "normal" \u0438\u043B\u0438 "bold" \u0438 \u0447\u0438\u0441\u043B\u0430 \u0432 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0435 \u043E\u0442 1 \u0434\u043E 1000.','\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043D\u0430\u0441\u044B\u0449\u0435\u043D\u043D\u043E\u0441\u0442\u044C\u044E \u0448\u0440\u0438\u0444\u0442\u0430. \u0414\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F: \u043A\u043B\u044E\u0447\u0435\u0432\u044B\u0435 \u0441\u043B\u043E\u0432\u0430 "normal" \u0438\u043B\u0438 "bold", \u0430 \u0442\u0430\u043A\u0436\u0435 \u0447\u0438\u0441\u043B\u0430 \u0432 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0435 \u043E\u0442 1 \u0434\u043E 1000.',"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B (\u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E)","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u043C\u0443 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0443 \u0438 \u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u044B\u0441\u0442\u0440\u044B\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u043C\u0443 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0443 \u0438 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0431\u044B\u0441\u0442\u0440\u0443\u044E \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044E \u0434\u043B\u044F \u043E\u0441\u0442\u0430\u043B\u044C\u043D\u044B\u0445","\u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0443\u0441\u0442\u0430\u0440\u0435\u043B. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0432\u043C\u0435\u0441\u0442\u043E \u043D\u0435\u0433\u043E \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, 'editor.editor.gotoLocation.multipleDefinitions' \u0438\u043B\u0438 'editor.editor.gotoLocation.multipleImplementations'.",'\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E" \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u0446\u0435\u043B\u0435\u0432\u044B\u0445 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0439.','\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E \u0442\u0438\u043F\u0430" \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u0446\u0435\u043B\u0435\u0432\u044B\u0445 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0439.','\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044E" \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u0446\u0435\u043B\u0435\u0432\u044B\u0445 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0439.','\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u043C" \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u0446\u0435\u043B\u0435\u0432\u044B\u0445 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0439.','\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0441\u044B\u043B\u043A\u0430\u043C" \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u0446\u0435\u043B\u0435\u0432\u044B\u0445 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0439.','\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0430\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u043E\u0439 \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u043A\u043E\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u043C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.','\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0430\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B, \u043A\u043E\u0442\u043E\u0440\u0430\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u043C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E \u0442\u0438\u043F\u0430" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.','\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0430\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u044B\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u043E\u0439 \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u043A\u043E\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u043C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044E" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.','\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0430\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u044B\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u043E\u0439, \u043A\u043E\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u043C \u043A\u043E\u043C\u0430\u043D\u0434\u044B "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.','\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0430\u043B\u044C\u0442\u0435\u0440\u043D\u0430\u0442\u0438\u0432\u043D\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C\u043E\u0439 \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u043A\u043E\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u043C \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0441\u044B\u043B\u043A\u0435" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435.',"\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0432\u0440\u0435\u043C\u044F \u0437\u0430\u0434\u0435\u0440\u0436\u043A\u0438 \u0432 \u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430\u0445 \u043F\u0435\u0440\u0435\u0434 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435\u043C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u044F.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u0434\u043E\u043B\u0436\u043D\u043E \u043B\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u043E\u0441\u0442\u0430\u0432\u0430\u0442\u044C\u0441\u044F \u0432\u0438\u0434\u0438\u043C\u044B\u043C \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043D\u0430 \u043D\u0435\u0433\u043E \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u043C\u044B\u0448\u0438.",'\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0432\u0440\u0435\u043C\u044F \u0437\u0430\u0434\u0435\u0440\u0436\u043A\u0438 \u0432 \u043C\u0438\u043B\u043B\u0438\u0441\u0435\u043A\u0443\u043D\u0434\u0430\u0445 \u043F\u0435\u0440\u0435\u0434 \u0441\u043A\u0440\u044B\u0442\u0438\u0435\u043C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u044F. \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C "editor.hover.sticky".',"\u041F\u0440\u0435\u0434\u043F\u043E\u0447\u0438\u0442\u0430\u0442\u044C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u043D\u0430\u0434 \u0441\u0442\u0440\u043E\u043A\u043E\u0439, \u0435\u0441\u043B\u0438 \u0435\u0441\u0442\u044C \u043C\u0435\u0441\u0442\u043E.","\u041F\u0440\u0435\u0434\u043F\u043E\u043B\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043E \u0432\u0441\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0438\u043C\u0435\u044E\u0442 \u043E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u0443\u044E \u0448\u0438\u0440\u0438\u043D\u0443. \u042D\u0442\u043E \u0431\u044B\u0441\u0442\u0440\u044B\u0439 \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E \u0434\u043B\u044F \u043C\u043E\u043D\u043E\u0448\u0438\u0440\u0438\u043D\u043D\u044B\u0445 \u0448\u0440\u0438\u0444\u0442\u043E\u0432 \u0438 \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0441\u043A\u0440\u0438\u043F\u0442\u043E\u0432 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043B\u0430\u0442\u0438\u043D\u0441\u043A\u0438\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432), \u0433\u0434\u0435 \u0433\u043B\u0438\u0444\u044B \u0438\u043C\u0435\u044E\u0442 \u043E\u0434\u0438\u043D\u0430\u043A\u043E\u0432\u0443\u044E \u0448\u0438\u0440\u0438\u043D\u0443.","\u0414\u0435\u043B\u0435\u0433\u0438\u0440\u0443\u0435\u0442 \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u0435 \u0442\u043E\u0447\u0435\u043A \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0443. \u042D\u0442\u043E \u043C\u0435\u0434\u043B\u0435\u043D\u043D\u044B\u0439 \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043C\u043E\u0436\u0435\u0442 \u043F\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043A \u0437\u0430\u0432\u0438\u0441\u0430\u043D\u0438\u044F\u043C \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435 \u0431\u043E\u043B\u044C\u0448\u0438\u0445 \u0444\u0430\u0439\u043B\u043E\u0432, \u043D\u043E \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u043E \u0432\u043E \u0432\u0441\u0435\u0445 \u0441\u043B\u0443\u0447\u0430\u044F\u0445.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C\u043E\u043C, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0432\u044B\u0447\u0438\u0441\u043B\u044F\u0435\u0442 \u0442\u043E\u0447\u043A\u0438 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0430. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435, \u0447\u0442\u043E \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u043D\u044B\u0439 \u0430\u043B\u0433\u043E\u0440\u0438\u0442\u043C, \u0447\u0442\u043E\u0431\u044B \u043E\u0431\u0435\u0441\u043F\u0435\u0447\u0438\u0442\u044C \u043D\u0430\u0438\u0431\u043E\u043B\u044C\u0448\u0435\u0435 \u0443\u0434\u043E\u0431\u0441\u0442\u0432\u043E \u0440\u0430\u0431\u043E\u0442\u044B.","\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0437\u043D\u0430\u0447\u043E\u043A \u043B\u0430\u043C\u043F\u043E\u0447\u043A\u0438 \u0434\u043B\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0442\u0435\u043A\u0443\u0449\u0438\u0435 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432 \u0432\u0435\u0440\u0445\u043D\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u0437\u0430\u043B\u0438\u043F\u0430\u044E\u0449\u0438\u0445 \u043B\u0438\u043D\u0438\u0439 \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043C\u043E\u0434\u0435\u043B\u044C, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u0443\u044E \u0434\u043B\u044F \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u044F. \u0415\u0441\u043B\u0438 \u043C\u043E\u0434\u0435\u043B\u044C \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u044B \u043D\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442, \u043E\u043D\u0430 \u043E\u0442\u043A\u0430\u0442\u0438\u0442\u0441\u044F \u043A \u043C\u043E\u0434\u0435\u043B\u0438 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430 \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F, \u043A\u043E\u0442\u043E\u0440\u0430\u044F \u043E\u0442\u043A\u0430\u0442\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u043A \u043C\u043E\u0434\u0435\u043B\u0438 \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432. \u042D\u0442\u043E\u0442 \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0441\u043E\u0431\u043B\u044E\u0434\u0430\u0435\u0442\u0441\u044F \u0432\u043E \u0432\u0441\u0435\u0445 \u0442\u0440\u0435\u0445 \u0441\u043B\u0443\u0447\u0430\u044F\u0445.","\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0443 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0439 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u044F \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u044B.","\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0438 \u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0443\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0435\u043C \u043A\u043B\u0430\u0432\u0438\u0448 {0}.","\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0441\u043A\u0440\u044B\u0442\u044B \u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0438 \u0443\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0438 {0}.","\u0412\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u044B.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u0448\u0440\u0438\u0444\u0442\u0430 \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E {0} \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F, \u043A\u043E\u0433\u0434\u0430 \u0441\u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043C\u0435\u043D\u044C\u0448\u0435 {1} \u0438\u043B\u0438 \u0431\u043E\u043B\u044C\u0448\u0435 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u0435\u043C\u0435\u0439\u0441\u0442\u0432\u043E\u043C \u0448\u0440\u0438\u0444\u0442\u043E\u0432 \u0434\u043B\u044F \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u0415\u0441\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u0437\u0430\u0434\u0430\u043D\u043E, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F {0}.","\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u043F\u043E\u043B\u044F \u0432\u043E\u043A\u0440\u0443\u0433 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.",`\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0432\u044B\u0441\u043E\u0442\u0443 \u0441\u0442\u0440\u043E\u043A\u0438. \r -\u2013 \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 0, \u0447\u0442\u043E\u0431\u044B \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0432\u044B\u0447\u0438\u0441\u043B\u0438\u0442\u044C \u0432\u044B\u0441\u043E\u0442\u0443 \u0441\u0442\u0440\u043E\u043A\u0438 \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430.\r -\u2013 \u0417\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043E\u0442 0 \u0434\u043E 8 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043C\u043D\u043E\u0436\u0438\u0442\u0435\u043B\u044F \u0434\u043B\u044F \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430.\r -\u2013 \u0417\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0431\u043E\u043B\u044C\u0448\u0435 \u0438\u043B\u0438 \u0440\u0430\u0432\u043D\u044B\u0435 8 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439.`,"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043A\u0440\u044B\u0442\u0430 \u043B\u0438 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0430 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.","\u041C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0430 \u0438\u043C\u0435\u0435\u0442 \u0442\u0430\u043A\u043E\u0439 \u0436\u0435 \u0440\u0430\u0437\u043C\u0435\u0440, \u0447\u0442\u043E \u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0430).","\u041C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0442\u044F\u0433\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u0438\u043B\u0438 \u0441\u0436\u0438\u043C\u0430\u0442\u044C\u0441\u044F \u043F\u043E \u043C\u0435\u0440\u0435 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043F\u043E \u0432\u044B\u0441\u043E\u0442\u0435 (\u0431\u0435\u0437 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438).","\u041C\u0438\u043D\u0438\u043A\u0430\u0440\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u043C\u0435\u043D\u044C\u0448\u0430\u0442\u044C\u0441\u044F \u043F\u043E \u043C\u0435\u0440\u0435 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u043D\u0438\u043A\u043E\u0433\u0434\u0430 \u043D\u0435 \u0431\u044B\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435, \u0447\u0435\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 (\u0431\u0435\u0437 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438).","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u043C\u0435\u0440\u043E\u043C \u043C\u0438\u043D\u0438\u043A\u0430\u0440\u0442\u044B.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441 \u043A\u0430\u043A\u043E\u0439 \u0441\u0442\u043E\u0440\u043E\u043D\u044B \u0431\u0443\u0434\u0435\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u043E\u0433\u0434\u0430 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043F\u043E\u043B\u0437\u0443\u043D\u043E\u043A \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B.","\u041C\u0430\u0441\u0448\u0442\u0430\u0431 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E, \u043D\u0430\u0440\u0438\u0441\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u043D\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0435: 1, 2 \u0438\u043B\u0438 3.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0444\u0430\u043A\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 \u0432\u043C\u0435\u0441\u0442\u043E \u0446\u0432\u0435\u0442\u043D\u044B\u0445 \u0431\u043B\u043E\u043A\u043E\u0432.","\u041E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u0448\u0438\u0440\u0438\u043D\u0443 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B, \u0447\u0442\u043E\u0431\u044B \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u044B\u0445 \u0441\u0442\u043E\u043B\u0431\u0446\u043E\u0432 \u043D\u0435 \u043F\u0440\u0435\u0432\u044B\u0448\u0430\u043B\u043E \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E.","\u0417\u0430\u0434\u0430\u0435\u0442 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u043C\u0435\u0436\u0434\u0443 \u0432\u0435\u0440\u0445\u043D\u0438\u043C \u043A\u0440\u0430\u0435\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0438 \u043F\u0435\u0440\u0432\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439.","\u0417\u0430\u0434\u0430\u0435\u0442 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u043C\u0435\u0436\u0434\u0443 \u043D\u0438\u0436\u043D\u0438\u043C \u043A\u0440\u0430\u0435\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0438 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439.","\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0432\u0441\u043F\u043B\u044B\u0432\u0430\u044E\u0449\u0435\u0435 \u043E\u043A\u043D\u043E \u0441 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u0435\u0439 \u043F\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0443 \u0438 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F\u043C\u0438 \u043E \u0442\u0438\u043F\u0435, \u043A\u043E\u0442\u043E\u0440\u043E\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u043D\u0430\u0431\u043E\u0440\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043C\u0435\u043D\u044E \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A \u043E\u0441\u0442\u0430\u0435\u0442\u0441\u044F \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u043C \u0438\u043B\u0438 \u0437\u0430\u043A\u0440\u043E\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u0434\u043E\u0441\u0442\u0438\u0436\u0435\u043D\u0438\u0438 \u043A\u043E\u043D\u0446\u0430 \u0441\u043F\u0438\u0441\u043A\u0430.","\u042D\u043A\u0441\u043F\u0440\u0435\u0441\u0441-\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u0439","\u042D\u043A\u0441\u043F\u0440\u0435\u0441\u0441-\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043A\u0430\u043A \u0435\u0434\u0432\u0430 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u043C\u044B\u0439 \u0442\u0435\u043A\u0441\u0442","\u042D\u043A\u0441\u043F\u0440\u0435\u0441\u0441-\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u044B","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043A\u0440\u0430\u0442\u043A\u0438\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0432 \u0441\u0442\u0440\u043E\u043A\u0430\u0445.","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043A\u0440\u0430\u0442\u043A\u0438\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0432 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F\u0445.","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u043A\u0440\u0430\u0442\u043A\u0438\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0432\u043D\u0435 \u0441\u0442\u0440\u043E\u043A \u0438 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435. \u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043C\u043E\u0436\u043D\u043E \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u043F\u0440\u0438\u043C\u0435\u0447\u0430\u043D\u0438\u0439, \u0441\u0442\u0440\u043E\u043A \u0438 \u0434\u0440\u0443\u0433\u043E\u0433\u043E \u043A\u043E\u0434\u0430. \u0411\u044B\u0441\u0442\u0440\u044B\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u0432 \u0432\u0438\u0434\u0435 \u0444\u0430\u043D\u0442\u043E\u043C\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0438\u043B\u0438 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439. \u041D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0442\u0430\u043A\u0436\u0435 \u043F\u043E\u043C\u043D\u0438\u0442\u044C \u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0435 {0}, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u043C\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u0430\u043C\u0438.","\u041D\u043E\u043C\u0435\u0440\u0430 \u0441\u0442\u0440\u043E\u043A \u043D\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0430\u0431\u0441\u043E\u043B\u044E\u0442\u043D\u044B\u0435 \u043D\u043E\u043C\u0435\u0440\u0430 \u0441\u0442\u0440\u043E\u043A.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u044B\u0435 \u043D\u043E\u043C\u0435\u0440\u0430 \u0441\u0442\u0440\u043E\u043A \u0432\u044B\u0447\u0438\u0441\u043B\u044F\u044E\u0442\u0441\u044F \u043A\u0430\u043A \u0440\u0430\u0441\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u0432 \u0441\u0442\u0440\u043E\u043A\u0430\u0445 \u0434\u043E \u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u041D\u043E\u043C\u0435\u0440\u0430 \u0441\u0442\u0440\u043E\u043A \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043A\u0430\u0436\u0434\u044B\u0435 10 \u0441\u0442\u0440\u043E\u043A.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435\u043C \u043D\u043E\u043C\u0435\u0440\u043E\u0432 \u0441\u0442\u0440\u043E\u043A.","\u0427\u0438\u0441\u043B\u043E \u043C\u043E\u043D\u043E\u0448\u0438\u0440\u0438\u043D\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432, \u043F\u0440\u0438 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u0431\u0443\u0434\u0435\u0442 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u044B\u0432\u0430\u0442\u044C\u0441\u044F \u043B\u0438\u043D\u0435\u0439\u043A\u0430 \u044D\u0442\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u044D\u0442\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u043F\u043E\u0441\u043B\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0447\u0438\u0441\u043B\u0430 \u043C\u043E\u043D\u043E\u0448\u0438\u0440\u0438\u043D\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432. \u0414\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u043B\u0438\u043D\u0435\u0435\u043A \u0443\u043A\u0430\u0436\u0438\u0442\u0435 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0439. \u0415\u0441\u043B\u0438 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E \u043D\u0438 \u043E\u0434\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F, \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0435 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u043D\u0435 \u0431\u0443\u0434\u0443\u0442.","\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043B\u043E\u0441\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438.","\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043B\u043E\u0441\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043D\u0430.","\u0412\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043B\u043E\u0441\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043A\u0440\u044B\u0442\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0432\u0438\u0434\u0438\u043C\u043E\u0441\u0442\u044C\u044E \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0439 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438.","\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043B\u043E\u0441\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043D\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438.","\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043B\u043E\u0441\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u043D\u0430.","\u0413\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u043B\u043E\u0441\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043A\u0440\u044B\u0442\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0432\u0438\u0434\u0438\u043C\u043E\u0441\u0442\u044C\u044E \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0439 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438.","\u0428\u0438\u0440\u0438\u043D\u0430 \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u043E\u0439 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438.","\u0412\u044B\u0441\u043E\u0442\u0430 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0439 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u043E\u0439 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u043E\u043C \u043A \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u0449\u0435\u043B\u0447\u043A\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435\u043C \u0432\u0441\u0435\u0445 \u043D\u0435\u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 ASCII. \u0411\u0430\u0437\u043E\u0432\u044B\u043C\u0438 ASCII \u0441\u0447\u0438\u0442\u0430\u044E\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043C\u0435\u0436\u0434\u0443 U+0020 \u0438 U+007E, \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u044F, \u043F\u0435\u0440\u0435\u0432\u043E\u0434 \u0441\u0442\u0440\u043E\u043A\u0438 \u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0442 \u043A\u0430\u0440\u0435\u0442\u043A\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u044B\u0434\u0435\u043B\u044F\u044E\u0442\u0441\u044F \u043B\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043F\u0440\u043E\u0441\u0442\u043E \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u0443\u044E\u0442 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u0438\u043B\u0438 \u0432\u043E\u043E\u0431\u0449\u0435 \u043D\u0435 \u0438\u043C\u0435\u044E\u0442 \u0448\u0438\u0440\u0438\u043D\u044B.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435\u043C \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0436\u043D\u043E \u0441\u043F\u0443\u0442\u0430\u0442\u044C \u0441 \u043E\u0441\u043D\u043E\u0432\u043D\u044B\u043C\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u0430\u043C\u0438 ASCII, \u043A\u0440\u043E\u043C\u0435 \u0442\u0435\u0445, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u044F\u0432\u043B\u044F\u044E\u0442\u0441\u044F \u043E\u0431\u0449\u0438\u043C\u0438 \u0432 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u044F\u0437\u044B\u043A\u043E\u0432\u043E\u043C \u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0432 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F\u0445 \u0442\u0430\u043A\u0436\u0435 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C\u0441\u044F \u0432 \u042E\u043D\u0438\u043A\u043E\u0434\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0432 \u0441\u0442\u0440\u043E\u043A\u0430\u0445 \u0442\u0430\u043A\u0436\u0435 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C\u0441\u044F \u0432 \u042E\u043D\u0438\u043A\u043E\u0434\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043D\u0435 \u0432\u044B\u0434\u0435\u043B\u044F\u044E\u0442\u0441\u044F.","\u0421\u0438\u043C\u0432\u043E\u043B\u044B \u042E\u043D\u0438\u043A\u043E\u0434\u0430, \u0440\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u043D\u044B\u0435 \u0432 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043D\u044B\u0445 \u044F\u0437\u044B\u043A\u0430\u0445, \u043D\u0435 \u0432\u044B\u0434\u0435\u043B\u044F\u044E\u0442\u0441\u044F.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0438 \u043A\u0430\u0436\u0434\u043E\u043C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0438 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043C\u044B\u0448\u0438 \u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u043E\u0433\u0434\u0430 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u0443\u044E \u043F\u0430\u043D\u0435\u043B\u044C \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0432\u0437\u0430\u0438\u043C\u043E\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0441 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439. \u0415\u0441\u043B\u0438 \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u043D\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438, \u043A\u043E\u0433\u0434\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u043B\u0438 \u0440\u0430\u0441\u043A\u0440\u0430\u0441\u043A\u0430 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 {0} \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0446\u0432\u0435\u0442\u043E\u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u043A\u043E\u0431\u043E\u043A.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0438\u043C\u0435\u0435\u0442 \u043B\u0438 \u043A\u0430\u0436\u0434\u044B\u0439 \u0442\u0438\u043F \u0441\u043A\u043E\u0431\u043E\u043A \u0441\u043E\u0431\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u043D\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043C\u044B\u0439 \u043F\u0443\u043B \u0446\u0432\u0435\u0442\u043E\u0432.","\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u043F\u0430\u0440\u044B \u0441\u043A\u043E\u0431\u043E\u043A.","\u041E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u044B \u043B\u0438 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0432 \u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u043C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u043C \u0434\u043B\u044F \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u043F\u0430\u0440\u044B \u0441\u043A\u043E\u0431\u043E\u043A.","\u041E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u044B \u043B\u0438 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u0434\u043B\u044F \u0441\u043A\u043E\u0431\u043E\u043A.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u0434\u043E\u043B\u0436\u043D\u0430 \u043B\u0438 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C\u0441\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u0430\u044F \u043F\u0430\u0440\u0430 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043E\u0442\u0441\u0442\u0443\u043F\u0430.","\u0412\u044B\u0434\u0435\u043B\u044F\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u0443\u044E \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0443\u044E \u043E\u0442\u0441\u0442\u0443\u043F\u0430.","\u0412\u044B\u0434\u0435\u043B\u044F\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u0443\u044E \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0443\u044E \u043E\u0442\u0441\u0442\u0443\u043F\u0430, \u0434\u0430\u0436\u0435 \u0435\u0441\u043B\u0438 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u044B \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u0441\u043A\u043E\u0431\u043E\u043A.","\u041D\u0435 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C \u0430\u043A\u0442\u0438\u0432\u043D\u0443\u044E \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0443\u044E \u043E\u0442\u0441\u0442\u0443\u043F\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u0434\u043E\u043B\u0436\u043D\u0430 \u043B\u0438 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C\u0441\u044F \u0430\u043A\u0442\u0438\u0432\u043D\u0430\u044F \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0430\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u0435\u0437 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u0438 \u0442\u0435\u043A\u0441\u0442\u0430 \u0441\u043F\u0440\u0430\u0432\u0430 \u043E\u0442 \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0438 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u0441\u043F\u0440\u0430\u0432\u0430 \u043E\u0442 \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0443\u0442 \u043B\u0438 \u043F\u0435\u0440\u0435\u0437\u0430\u043F\u0438\u0441\u044B\u0432\u0430\u0442\u044C\u0441\u044F \u0441\u043B\u043E\u0432\u0430 \u043F\u0440\u0438 \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u0438 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435, \u0447\u0442\u043E \u044D\u0442\u043E \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043E\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0449\u0438\u0445 \u044D\u0442\u0443 \u0444\u0443\u043D\u043A\u0446\u0438\u044E.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u0434\u043E\u043F\u0443\u0441\u043A\u0430\u044E\u0442\u0441\u044F \u043B\u0438 \u043D\u0435\u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u043E\u043F\u0435\u0447\u0430\u0442\u043A\u0438 \u0432 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u0445 \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u0438 \u0438 \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0443\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0438 \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0435 \u0441\u043B\u043E\u0432\u0430, \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0440\u044F\u0434\u043E\u043C \u0441 \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u043C.",'\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442\u0441\u044F \u043B\u0438 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043D\u044B\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u0432\u044B\u0431\u043E\u0440\u0430 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0441\u043E\u0432\u043C\u0435\u0441\u0442\u043D\u043E \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u043C\u0438 \u0440\u0430\u0431\u043E\u0447\u0438\u043C\u0438 \u043E\u0431\u043B\u0430\u0441\u0442\u044F\u043C\u0438 \u0438 \u043E\u043A\u043D\u0430\u043C\u0438 (\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F "#editor.suggestSelection#").',"\u0412\u0441\u0435\u0433\u0434\u0430 \u0432\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u0430\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u0438 IntelliSense.","\u041D\u0438\u043A\u043E\u0433\u0434\u0430 \u043D\u0435 \u0432\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0439 \u0430\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u0438 IntelliSense.","\u0412\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u0430\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u0438 IntelliSense \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043D\u043E\u0433\u043E \u0441\u0438\u043C\u0432\u043E\u043B\u0430.","\u0412\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u0430\u043A\u0442\u0438\u0432\u0430\u0446\u0438\u0438 IntelliSense \u043F\u043E \u043C\u0435\u0440\u0435 \u0432\u0432\u043E\u0434\u0430.",'\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435, \u0447\u0442\u043E \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043A \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u043C ("#editor.quickSuggestions#" \u0438 "#editor.suggestOnTriggerCharacters#"), \u0438 \u0447\u0442\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u044B\u0431\u0438\u0440\u0430\u0435\u0442\u0441\u044F \u043F\u0440\u0438 \u044F\u0432\u043D\u043E\u043C \u0432\u044B\u0437\u043E\u0432\u0435, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448 "CTRL+\u041F\u0420\u041E\u0411\u0415\u041B".',"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0437\u0430\u043F\u0440\u0435\u0449\u0430\u0435\u0442 \u043B\u0438 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 \u043A\u043E\u0434\u0430 \u044D\u043A\u0441\u043F\u0440\u0435\u0441\u0441-\u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F.","\u0423\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442, \u043D\u0443\u0436\u043D\u043E \u043B\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0437\u043D\u0430\u0447\u043A\u0438 \u0432 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u0445.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0432\u0438\u0434\u0438\u043C\u043E\u0441\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0438 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u0432 \u043D\u0438\u0436\u043D\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u043F\u0440\u043E\u0441\u043C\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043B\u0438 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 \u0432\u043C\u0435\u0441\u0442\u0435 \u0441 \u043C\u0435\u0442\u043A\u043E\u0439 \u0438\u043B\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u0439.","\u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0435\u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u043C\u044B\u043C. \u0422\u0435\u043F\u0435\u0440\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u043C\u043E\u0436\u043D\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C.","\u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0443\u0441\u0442\u0430\u0440\u0435\u043B. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0432\u043C\u0435\u0441\u0442\u043E \u043D\u0435\u0433\u043E \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, 'editor.suggest.showKeywords' \u0438\u043B\u0438 'editor.suggest.showSnippets'.",'\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "method".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "function".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "constructor".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "deprecated".','\u041F\u0440\u0438 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0438 \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u0438 IntelliSense \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E, \u0447\u0442\u043E\u0431\u044B \u043F\u0435\u0440\u0432\u044B\u0439 \u0441\u0438\u043C\u0432\u043E\u043B \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u043B \u0432 \u043D\u0430\u0447\u0430\u043B\u0435 \u0441\u043B\u043E\u0432\u0430, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 "c" \u0432 "Console" \u0438\u043B\u0438 "WebContext", \u043D\u043E _\u043D\u0435_ \u0432 "description". \u0415\u0441\u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D, IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u0431\u043E\u043B\u044C\u0448\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432, \u043D\u043E \u043F\u043E-\u043F\u0440\u0435\u0436\u043D\u0435\u043C\u0443 \u0441\u043E\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0438\u0445 \u043F\u043E \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0443 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044F.','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "field".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "variable".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "class".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "struct".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "interface".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "module".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "property".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "event".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "operator".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "unit".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "value".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "constant".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "enum".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "enumMember".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "keyword".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "text".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "color".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "file".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "reference".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "customcolor".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "folder".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "typeParameter".','\u041A\u043E\u0433\u0434\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0432\u043A\u043B\u044E\u0447\u0435\u043D, \u0432 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F "snippet".','\u0412\u043E \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u043E\u043C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438 IntelliSense \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0442\u0438\u043F\u0430 "\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438".','\u0412\u043E \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u043E\u043C \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0438 IntelliSense \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0442\u0438\u043F\u0430 "\u043F\u0440\u043E\u0431\u043B\u0435\u043C\u044B".',"\u0414\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044B\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u044B \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0439 \u0438 \u043A\u043E\u043D\u0435\u0447\u043D\u044B\u0439 \u043F\u0440\u043E\u0431\u0435\u043B\u044B.",'\u0421\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0432\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u0432\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0441\u043B\u043E\u0432\u0430 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, "foo" \u0432 "fooBar" \u0438\u043B\u0438 "foo_bar").',"\u0411\u0435\u0437 \u043E\u0442\u0441\u0442\u0443\u043F\u0430. \u041F\u0435\u0440\u0435\u043D\u043E\u0441 \u0441\u0442\u0440\u043E\u043A \u043D\u0430\u0447\u0438\u043D\u0430\u0435\u0442\u0441\u044F \u0441\u043E \u0441\u0442\u043E\u043B\u0431\u0446\u0430 1.","\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u043F\u043E\u043B\u0443\u0447\u0430\u0442 \u0442\u043E\u0442 \u0436\u0435 \u043E\u0442\u0441\u0442\u0443\u043F, \u0447\u0442\u043E \u0438 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430.","\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u043F\u043E\u043B\u0443\u0447\u0430\u0442 \u043E\u0442\u0441\u0442\u0443\u043F, \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u043D\u044B\u0439 \u043D\u0430 \u0435\u0434\u0438\u043D\u0438\u0446\u0443 \u043F\u043E \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044E \u0441 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439. ","\u041F\u0435\u0440\u0435\u043D\u0435\u0441\u0435\u043D\u043D\u044B\u0435 \u0441\u0442\u0440\u043E\u043A\u0438 \u043F\u043E\u043B\u0443\u0447\u0430\u0442 \u043E\u0442\u0441\u0442\u0443\u043F, \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u043D\u044B\u0439 \u043D\u0430 \u0434\u0432\u0430 \u043F\u043E \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044E \u0441 \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u043C \u0441\u0442\u0440\u043E\u043A \u0441 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u043E\u043C \u043F\u043E \u0441\u043B\u043E\u0432\u0430\u043C.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043C\u043E\u0436\u043D\u043E \u043B\u0438 \u043F\u0435\u0440\u0435\u0442\u0430\u0441\u043A\u0438\u0432\u0430\u0442\u044C \u0444\u0430\u0439\u043B \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440, \u0443\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044F \u043D\u0430\u0436\u0430\u0442\u043E\u0439 \u043A\u043B\u0430\u0432\u0438\u0448\u0443 SHIFT (\u0432\u043C\u0435\u0441\u0442\u043E \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u044F \u0444\u0430\u0439\u043B\u0430 \u0432 \u0441\u0430\u043C\u043E\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435).","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u0441\u0431\u0440\u043E\u0441\u0435 \u0444\u0430\u0439\u043B\u043E\u0432 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440. \u042D\u0442\u043E \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u0442\u0435\u043C, \u043A\u0430\u043A \u0441\u0431\u0440\u0430\u0441\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0444\u0430\u0439\u043B.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0431\u0440\u043E\u0441\u0430 \u043F\u043E\u0441\u043B\u0435 \u0441\u0431\u0440\u043E\u0441\u0430 \u0444\u0430\u0439\u043B\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440.","\u041D\u0438\u043A\u043E\u0433\u0434\u0430 \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0441\u0431\u0440\u043E\u0441\u0430. \u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0441\u0431\u0440\u043E\u0441\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043C\u043E\u0436\u043D\u043E \u043B\u0438 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0440\u0430\u0437\u043B\u0438\u0447\u043D\u044B\u043C\u0438 \u0441\u043F\u043E\u0441\u043E\u0431\u0430\u043C\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u0432\u0441\u0442\u0430\u0432\u043A\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440. \u042D\u0442\u043E \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u0442\u044C \u0442\u0435\u043C, \u043A\u0430\u043A \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0444\u0430\u0439\u043B.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u043F\u043E\u0441\u043B\u0435 \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440.","\u041D\u0438\u043A\u043E\u0433\u0434\u0430 \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0432\u044B\u0431\u043E\u0440\u0430 \u0432\u0441\u0442\u0430\u0432\u043A\u0438. \u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0432\u0441\u0435\u0433\u0434\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.",'\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0443\u0442 \u043B\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0442\u044C\u0441\u044F \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0444\u0438\u043A\u0441\u0430\u0446\u0438\u0438. \u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0432 JavaScript \u0442\u043E\u0447\u043A\u0430 \u0441 \u0437\u0430\u043F\u044F\u0442\u043E\u0439 (";") \u043C\u043E\u0436\u0435\u0442 \u0431\u044B\u0442\u044C \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C \u0444\u0438\u043A\u0441\u0430\u0446\u0438\u0438, \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0435\u0442\u0441\u044F.',"\u041F\u0440\u0438\u043D\u0438\u043C\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0412\u0412\u041E\u0414 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043E\u043D\u043E \u0438\u0437\u043C\u0435\u043D\u044F\u0435\u0442 \u0442\u0435\u043A\u0441\u0442.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0443\u0442 \u043B\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0438\u043D\u0438\u043C\u0430\u0442\u044C\u0441\u044F \u043A\u043B\u0430\u0432\u0438\u0448\u0435\u0439 \u0412\u0412\u041E\u0414 \u0432 \u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A \u043A\u043B\u0430\u0432\u0438\u0448\u0435 TAB. \u042D\u0442\u043E \u043F\u043E\u043C\u043E\u0433\u0430\u0435\u0442 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044C \u043D\u0435\u043E\u0434\u043D\u043E\u0437\u043D\u0430\u0447\u043D\u043E\u0441\u0442\u0438 \u043C\u0435\u0436\u0434\u0443 \u0432\u0441\u0442\u0430\u0432\u043A\u043E\u0439 \u043D\u043E\u0432\u044B\u0445 \u0441\u0442\u0440\u043E\u043A \u0438 \u043F\u0440\u0438\u043D\u044F\u0442\u0438\u0435\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0447\u0438\u0441\u043B\u043E\u043C \u0441\u0442\u0440\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0433\u0443\u0442 \u0431\u044B\u0442\u044C \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D\u044B \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E\u043C \u0447\u0442\u0435\u043D\u0438\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u0430 \u0437\u0430 \u043E\u0434\u0438\u043D \u0440\u0430\u0437. \u041F\u0440\u0438 \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u0438\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0447\u0442\u0435\u043D\u0438\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u0430 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0443\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E 500. \u0412\u043D\u0438\u043C\u0430\u043D\u0438\u0435! \u041F\u0440\u0438 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0438 \u0447\u0438\u0441\u043B\u0430 \u0441\u0442\u0440\u043E\u043A, \u043F\u0440\u0435\u0432\u044B\u0448\u0430\u044E\u0449\u0435\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E, \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0441\u043D\u0438\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438.","\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0439\u0442\u0435 \u0442\u0435\u043C, \u043E\u0431\u044A\u044F\u0432\u043B\u044F\u044E\u0442\u0441\u044F \u043B\u0438 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E\u043C \u0447\u0442\u0435\u043D\u0438\u044F \u044D\u043A\u0440\u0430\u043D\u0430.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044F\u0437\u044B\u043A\u0430 \u0434\u043B\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u0441\u043A\u043E\u0431\u043E\u043A.","\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0441\u043A\u043E\u0431\u043A\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043A\u0443\u0440\u0441\u043E\u0440 \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0441\u043B\u0435\u0432\u0430 \u043E\u0442 \u043F\u0440\u043E\u0431\u0435\u043B\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0443\u044E \u0441\u043A\u043E\u0431\u043A\u0443 \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u043C \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0439 \u0441\u043A\u043E\u0431\u043A\u0438.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044F\u0437\u044B\u043A\u0430 \u0434\u043B\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432.","\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043A\u0443\u0440\u0441\u043E\u0440 \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0441\u043B\u0435\u0432\u0430 \u043E\u0442 \u043F\u0440\u043E\u0431\u0435\u043B\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 \u043F\u0440\u0438 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0435\u043C \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F.","\u0423\u0434\u0430\u043B\u044F\u0442\u044C \u0441\u043E\u0441\u0435\u0434\u043D\u0438\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0438 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u0435 \u0441\u043A\u043E\u0431\u043A\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043E\u043D\u0438 \u0431\u044B\u043B\u0438 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0443\u0434\u0430\u043B\u044F\u0442\u044C \u0441\u043E\u0441\u0435\u0434\u043D\u0438\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0438\u043B\u0438 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u0435 \u0441\u043A\u043E\u0431\u043A\u0438 \u043F\u0440\u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0438.","\u0417\u0430\u043C\u0435\u043D\u044F\u0442\u044C \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0438 \u0441\u043A\u043E\u0431\u043A\u0438 \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0438\u043B\u0438 \u0441\u043A\u043E\u0431\u043A\u0438 \u0431\u044B\u043B\u0438 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0437\u0430\u043C\u0435\u043D\u044F\u0442\u044C\u0441\u044F \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0438\u0435 \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0438\u043B\u0438 \u0441\u043A\u043E\u0431\u043A\u0438 \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044F\u0437\u044B\u043A\u0430 \u0434\u043B\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u043A\u0430\u0432\u044B\u0447\u0435\u043A.","\u0410\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043A\u0430\u0432\u044B\u0447\u043A\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043A\u0443\u0440\u0441\u043E\u0440 \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0441\u043B\u0435\u0432\u0430 \u043E\u0442 \u043F\u0440\u043E\u0431\u0435\u043B\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043A\u0430\u0432\u044B\u0447\u043A\u0438, \u0435\u0441\u043B\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u0434\u043E\u0431\u0430\u0432\u0438\u043B \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0443\u044E \u043A\u0430\u0432\u044B\u0447\u043A\u0443.","\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F\u044B \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438.","\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438.","\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F\u044B \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0438 \u0443\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u0441\u043A\u043E\u0431\u043A\u0438 \u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441\u043E\u043C \u044F\u0437\u044B\u043A\u0430.","\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438, \u0443\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0435 \u044F\u0437\u044B\u043A\u043E\u043C \u0441\u043A\u043E\u0431\u043A\u0438 \u0438 \u0432\u044B\u0437\u044B\u0432\u0430\u0442\u044C \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u0440\u0430\u0432\u0438\u043B\u0430 onEnterRules, \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0435 \u044F\u0437\u044B\u043A\u0430\u043C\u0438.","\u0420\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u044F\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438, \u0443\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0435 \u044F\u0437\u044B\u043A\u043E\u043C \u0441\u043A\u043E\u0431\u043A\u0438, \u0432\u044B\u0437\u044B\u0432\u0430\u0442\u044C \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u0440\u0430\u0432\u0438\u043B\u0430 onEnterRules, \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0435 \u044F\u0437\u044B\u043A\u0430\u043C\u0438 \u0438 \u0443\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u043F\u0440\u0430\u0432\u0438\u043B\u0430 \u043E\u0442\u0441\u0442\u0443\u043F\u0430 indentationRules, \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0435 \u044F\u0437\u044B\u043A\u0430\u043C\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0438\u0437\u043C\u0435\u043D\u044F\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F\u044B, \u043A\u043E\u0433\u0434\u0430 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438 \u0432\u0432\u043E\u0434\u044F\u0442, \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u044E\u0442 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0430\u044E\u0442 \u0442\u0435\u043A\u0441\u0442 \u0438\u043B\u0438 \u0438\u0437\u043C\u0435\u043D\u044F\u044E\u0442 \u043E\u0442\u0441\u0442\u0443\u043F\u044B \u0441\u0442\u0440\u043E\u043A.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044F\u0437\u044B\u043A\u0430 \u0434\u043B\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u043E\u0431\u0440\u0430\u043C\u043B\u0435\u043D\u0438\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0439.","\u041E\u0431\u0440\u0430\u043C\u043B\u044F\u0442\u044C \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u0430\u0432\u044B\u0447\u0435\u043A, \u0430 \u043D\u0435 \u0441\u043A\u043E\u0431\u043E\u043A.","\u041E\u0431\u0440\u0430\u043C\u043B\u044F\u0442\u044C \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0441\u043A\u043E\u0431\u043E\u043A, \u0430 \u043D\u0435 \u043A\u0430\u0432\u044B\u0447\u0435\u043A.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043E\u0431\u0440\u0430\u043C\u043B\u044F\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u043A\u0430\u0432\u044B\u0447\u0435\u043A \u0438\u043B\u0438 \u043A\u0432\u0430\u0434\u0440\u0430\u0442\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u042D\u043C\u0443\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u043F\u0440\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0438 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u0430. \u0412\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u043E \u043A \u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043C \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 CodeLens \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u0435\u043C\u0435\u0439\u0441\u0442\u0432\u043E\u043C \u0448\u0440\u0438\u0444\u0442\u043E\u0432 \u0434\u043B\u044F CodeLens.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0440\u0430\u0437\u043C\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0432 \u043F\u0438\u043A\u0441\u0435\u043B\u044F\u0445 \u0434\u043B\u044F CodeLens. \u0415\u0441\u043B\u0438 \u0437\u0430\u0434\u0430\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 0, \u0442\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F 90% \u043E\u0442 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 #editor.fontSize#.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0435 \u0434\u0435\u043A\u043E\u0440\u0430\u0442\u043E\u0440\u044B \u0446\u0432\u0435\u0442\u0430 \u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0446\u0432\u0435\u0442\u0430.","\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u0430\u043B\u0438\u0442\u0440\u0443 \u043F\u0440\u0438 \u0449\u0435\u043B\u0447\u043A\u0435 \u0438 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0434\u0435\u043A\u043E\u0440\u0430\u0442\u043E\u0440 \u0446\u0432\u0435\u0442\u0430","\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u0430\u043B\u0438\u0442\u0440\u0443 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0434\u0435\u043A\u043E\u0440\u0430\u0442\u043E\u0440 \u0446\u0432\u0435\u0442\u0430","\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u0430\u043B\u0438\u0442\u0440\u0443 \u043F\u0440\u0438 \u0449\u0435\u043B\u0447\u043A\u0435 \u0434\u0435\u043A\u043E\u0440\u0430\u0442\u043E\u0440\u0430 \u0446\u0432\u0435\u0442\u0430","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0443\u0441\u043B\u043E\u0432\u0438\u0435\u043C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u044B \u0432 \u0434\u0435\u043A\u043E\u0440\u0430\u0442\u043E\u0440\u0435 \u0446\u0432\u0435\u0442\u0430","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u043C \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\u043C \u0446\u0432\u0435\u0442\u043E\u0432\u044B\u0445 \u0434\u0435\u043A\u043E\u0440\u0430\u0442\u043E\u0440\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0436\u043D\u043E \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u0430\u0442\u044C \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E.","\u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0442\u043E\u0433\u043E, \u0447\u0442\u043E \u0432\u044B\u0431\u043E\u0440 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0438 \u043C\u044B\u0448\u0438 \u043F\u0440\u0438\u0432\u043E\u0434\u0438\u0442 \u043A \u0432\u044B\u0431\u043E\u0440\u0443 \u0441\u0442\u043E\u043B\u0431\u0446\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 \u0442\u0435\u043A\u0441\u0442 \u0441\u043A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D \u0432 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430 \u0441 \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u043E\u0439 \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u0442\u0438\u043B\u0435\u043C \u0430\u043D\u0438\u043C\u0430\u0446\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u041F\u043B\u0430\u0432\u043D\u0430\u044F \u0430\u043D\u0438\u043C\u0430\u0446\u0438\u044F \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0430.","\u041F\u043B\u0430\u0432\u043D\u0430\u044F \u0430\u043D\u0438\u043C\u0430\u0446\u0438\u044F \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430, \u0442\u043E\u043B\u044C\u043A\u043E \u0435\u0441\u043B\u0438 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0430\u0435\u0442 \u043A\u0443\u0440\u0441\u043E\u0440 \u044F\u0432\u043D\u044B\u043C \u0436\u0435\u0441\u0442\u043E\u043C.","\u041F\u043B\u0430\u0432\u043D\u0430\u044F \u0430\u043D\u0438\u043C\u0430\u0446\u0438\u044F \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043B\u0430\u0432\u043D\u0443\u044E \u0430\u043D\u0438\u043C\u0430\u0446\u0438\u044E \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u0442\u0438\u043B\u0435\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u0430.",'\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E \u0432\u0438\u0434\u0438\u043C\u044B\u0445 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u044B\u0445 \u043B\u0438\u043D\u0438\u0439 (\u043C\u0438\u043D\u0438\u043C\u0443\u043C 0) \u0438 \u043A\u043E\u043D\u0435\u0447\u043D\u044B\u0445 \u043B\u0438\u043D\u0438\u0439 (\u043C\u0438\u043D\u0438\u043C\u0443\u043C 1), \u043E\u043A\u0440\u0443\u0436\u0430\u044E\u0449\u0438\u0445 \u043A\u0443\u0440\u0441\u043E\u0440. \u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0438\u043C\u0435\u0435\u0442 \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 "scrollOff" \u0438\u043B\u0438 "scrollOffset" \u0432 \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430\u0445.','"cursorSurroundingLines" \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438 \u0437\u0430\u043F\u0443\u0441\u043A\u0435 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0438\u043B\u0438 API.','"cursorSurroundingLines" \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u0432\u043E \u0432\u0441\u0435\u0445 \u0441\u043B\u0443\u0447\u0430\u044F\u0445.','\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u043E\u0433\u0434\u0430 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0442\u044C "#cursorSurroundingLines#".',`\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0448\u0438\u0440\u0438\u043D\u043E\u0439 \u043A\u0443\u0440\u0441\u043E\u0440\u0430, \u043A\u043E\u0433\u0434\u0430 \u0434\u043B\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 "#editor.cursorStyle#" \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 'line'`,"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0443 \u0440\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u044C \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043F\u0435\u0440\u0435\u0442\u0430\u0441\u043A\u0438\u0432\u0430\u043D\u0438\u044F.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043C\u0435\u0442\u043E\u0434 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0438 \u0441 SVG.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043D\u043E\u0432\u044B\u0439 \u043C\u0435\u0442\u043E\u0434 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0438 \u0441 \u0441\u0438\u043C\u0432\u043E\u043B\u0430\u043C\u0438 \u0448\u0440\u0438\u0444\u0442\u0430.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0430\u0431\u0438\u043B\u044C\u043D\u044B\u0439 \u043C\u0435\u0442\u043E\u0434 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043F\u0440\u043E\u0431\u0435\u043B \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043D\u043E\u0432\u043E\u0433\u043E \u044D\u043A\u0441\u043F\u0435\u0440\u0438\u043C\u0435\u043D\u0442\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043C\u0435\u0442\u043E\u0434\u0430.","\u041A\u043E\u044D\u0444\u0444\u0438\u0446\u0438\u0435\u043D\u0442 \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u044F \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 ALT.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043B\u0438 \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435 \u043A\u043E\u0434\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044E \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F \u0434\u043B\u044F \u043A\u043E\u043D\u043A\u0440\u0435\u0442\u043D\u043E\u0433\u043E \u044F\u0437\u044B\u043A\u0430, \u0435\u0441\u043B\u0438 \u043E\u043D\u0430 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430, \u0432 \u043F\u0440\u043E\u0442\u0438\u0432\u043D\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044E \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u044E \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F \u043D\u0430 \u043E\u0441\u043D\u043E\u0432\u0435 \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u0442\u0440\u0430\u0442\u0435\u0433\u0438\u0435\u0439 \u0434\u043B\u044F \u0432\u044B\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u0435\u043C\u044B\u0445 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C \u0441\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u044B.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0441\u0432\u043E\u0440\u0430\u0447\u0438\u0432\u0430\u0442\u044C \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u044B \u0438\u043C\u043F\u043E\u0440\u0442\u0430.","\u041C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u0435\u043C\u044B\u0445 \u0440\u0435\u0433\u0438\u043E\u043D\u043E\u0432. \u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043C\u043E\u0436\u0435\u0442 \u043F\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043A \u0441\u043D\u0438\u0436\u0435\u043D\u0438\u044E \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u0438 \u043E\u0442\u043A\u043B\u0438\u043A\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u0435\u0441\u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u0435\u043C\u044B\u0445 \u0440\u0435\u0433\u0438\u043E\u043D\u043E\u0432.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 \u0449\u0435\u043B\u0447\u043E\u043A \u043F\u0443\u0441\u0442\u043E\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u043F\u043E\u0441\u043B\u0435 \u0441\u0432\u0435\u0440\u043D\u0443\u0442\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u0442\u044C \u0435\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0441\u0435\u043C\u0435\u0439\u0441\u0442\u0432\u043E \u0448\u0440\u0438\u0444\u0442\u043E\u0432.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435. \u041C\u043E\u0434\u0443\u043B\u044C \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u0438 \u0438\u043C\u0435\u0442\u044C \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044C \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D \u0432 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0435.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u043C, \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u044E\u0449\u0438\u043C, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u043F\u043E\u0441\u043B\u0435 \u0432\u0432\u043E\u0434\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435\u043C \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u044C\u043D\u044B\u0445 \u043F\u043E\u043B\u0435\u0439 \u0433\u043B\u0438\u0444\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u041F\u043E\u043B\u044F \u0433\u043B\u0438\u0444\u0430 \u0432 \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u043C \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442\u0441\u044F \u0434\u043B\u044F \u043E\u0442\u043B\u0430\u0434\u043A\u0438.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u043A\u0440\u044B\u0442\u0438\u0435\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u0432 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0435.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0438\u043D\u0442\u0435\u0440\u0432\u0430\u043B\u043E\u043C \u043C\u0435\u0436\u0434\u0443 \u0431\u0443\u043A\u0432\u0430\u043C\u0438 \u0432 \u043F\u0438\u043A\u0441\u0435\u043B\u044F\u0445.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430 \u043B\u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u0430 \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043C\u043E\u0441\u0442\u0438 \u043E\u0442 \u044F\u0437\u044B\u043A\u0430, \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 \u0442\u0435\u0433\u0438 HTML, \u043E\u0431\u043D\u043E\u0432\u043B\u044F\u044E\u0442\u0441\u044F \u043F\u0440\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0438 \u0438 \u0434\u0435\u043B\u0430\u0442\u044C \u0438\u0445 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C\u0438 \u0434\u043B\u044F \u0449\u0435\u043B\u0447\u043A\u0430.","\u0412\u044B\u0434\u0435\u043B\u044F\u0442\u044C \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0441\u043A\u043E\u0431\u043A\u0438.","\u041C\u043D\u043E\u0436\u0438\u0442\u0435\u043B\u044C, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 deltaX \u0438 deltaY \u0441\u043E\u0431\u044B\u0442\u0438\u0439 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u043A\u043E\u043B\u0435\u0441\u0438\u043A\u0430 \u043C\u044B\u0448\u0438.","\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0448\u0440\u0438\u0444\u0442\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u043E\u0439 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 CTRL \u0438 \u0434\u0432\u0438\u0436\u0435\u043D\u0438\u0438 \u043A\u043E\u043B\u0435\u0441\u0438\u043A\u0430 \u043C\u044B\u0448\u0438.","\u041E\u0431\u044A\u0435\u0434\u0438\u043D\u0438\u0442\u044C \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u0432, \u043A\u043E\u0433\u0434\u0430 \u043E\u043D\u0438 \u043F\u0435\u0440\u0435\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F.","\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 CTRL \u0432 Windows \u0438 Linux \u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 COMMAND \u0432 macOS.","\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 ALT \u0432 Windows \u0438 Linux \u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 OPTION \u0432 macOS.",'\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u0438\u0445 \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u0432 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043C\u044B\u0448\u0438. \u0416\u0435\u0441\u0442\u044B \u043C\u044B\u0448\u0438 "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E" \u0438 "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443" \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B \u0442\u0430\u043A, \u0447\u0442\u043E\u0431\u044B \u043E\u043D\u0438 \u043D\u0435 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u043E\u0432\u0430\u043B\u0438 c [multicursor modifier](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).',"\u041A\u0430\u0436\u0434\u044B\u0439 \u043A\u0443\u0440\u0441\u043E\u0440 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 \u043E\u0434\u043D\u0443 \u0441\u0442\u0440\u043E\u043A\u0443 \u0442\u0435\u043A\u0441\u0442\u0430.","\u041A\u0430\u0436\u0434\u044B\u0439 \u043A\u0443\u0440\u0441\u043E\u0440 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u043E\u043B\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043A\u043E\u0439, \u043A\u043E\u0433\u0434\u0430 \u0447\u0438\u0441\u043B\u043E \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u043C\u044B\u0445 \u0441\u0442\u0440\u043E\u043A \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0447\u0438\u0441\u043B\u0443 \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u0432.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043C\u0430\u043A\u0441\u0438\u043C\u0430\u043B\u044C\u043D\u044B\u043C \u0447\u0438\u0441\u043B\u043E\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0433\u0443\u0442 \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0432 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C \u044D\u043A\u0437\u0435\u043C\u043F\u043B\u044F\u0440\u044B \u0441\u0435\u043C\u0430\u043D\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u0430 \u043B\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u0430 \u043D\u0430 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0435.","\u0424\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u043A\u0430 \u043D\u0430 \u0434\u0435\u0440\u0435\u0432\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u043E\u0431\u0437\u043E\u0440\u0430","\u0424\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u043A\u0430 \u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u0440\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0438 \u043E\u0431\u0437\u043E\u0440\u0430","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0438\u043B\u0438 \u0434\u0435\u0440\u0435\u0432\u043E \u0432 \u0432\u0438\u0434\u0436\u0435\u0442\u0435 \u043E\u0431\u0437\u043E\u0440\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u0441\u0435\u0433\u0434\u0430 \u043B\u0438 \u0436\u0435\u0441\u0442 \u043C\u044B\u0448\u044C\u044E \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\u044E \u0437\u0430\u0434\u0435\u0440\u0436\u043A\u0438 (\u0432 \u043C\u0441) \u043F\u0435\u0440\u0435\u0434 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435\u043C \u043A\u0440\u0430\u0442\u043A\u0438\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442 \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043F\u043E \u0442\u0438\u043F\u0443.",'\u041D\u0435 \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F; \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0432\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 "editor.linkedEditing".',"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0443\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043D\u043E\u043C\u0435\u0440\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438, \u043A\u043E\u0433\u0434\u0430 \u0444\u0430\u0439\u043B \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043D\u043E\u0432\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439.","\u0412\u044B\u0434\u0435\u043B\u044F\u0435\u0442 \u043F\u043E\u043B\u0435 \u0438 \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C \u0442\u0435\u043A\u0443\u0449\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u044B\u0432\u0430\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438, \u0442\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u0433\u0434\u0430 \u043E\u043D \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435.","\u041E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0430 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432, \u043A\u0440\u043E\u043C\u0435 \u043E\u0434\u0438\u043D\u043E\u0447\u043D\u044B\u0445 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432 \u043C\u0435\u0436\u0434\u0443 \u0441\u043B\u043E\u0432\u0430\u043C\u0438.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0440\u043E\u0431\u0435\u043B\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u043C \u0442\u0435\u043A\u0441\u0442\u0435.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043A\u043E\u043D\u0435\u0447\u043D\u044B\u0435 \u043F\u0440\u043E\u0431\u0435\u043B\u044B.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u043F\u0440\u043E\u0431\u0435\u043B\u044B.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043B\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0441\u043A\u0440\u0443\u0433\u043B\u0435\u043D\u043D\u044B\u0435 \u0443\u0433\u043B\u044B \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\u043C \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432, \u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u043E\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0431\u0443\u0434\u0435\u0442 \u043F\u0440\u043E\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043F\u043E \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u0438.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043F\u0440\u043E\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u0437\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u044E\u044E \u0441\u0442\u0440\u043E\u043A\u0443.","\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0430 \u0442\u043E\u043B\u044C\u043A\u043E \u0432\u0434\u043E\u043B\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u043E\u0441\u0438 \u043F\u0440\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0435 \u043F\u043E \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u0438 \u0438 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u0438 \u043E\u0434\u043D\u043E\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u043E. \u041F\u0440\u0435\u0434\u043E\u0442\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043C\u0435\u0449\u0435\u043D\u0438\u0435 \u043F\u043E \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u0438 \u043F\u0440\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0435 \u043F\u043E \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u0438 \u043D\u0430 \u0442\u0440\u0435\u043A\u043F\u0430\u0434\u0435.","\u041A\u043E\u043D\u0442\u0440\u043E\u043B\u0438\u0440\u0443\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u0438\u0447\u043D\u044B\u0439 \u0431\u0443\u0444\u0435\u0440 \u043E\u0431\u043C\u0435\u043D\u0430 Linux.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u0435\u043D \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F, \u0430\u043D\u0430\u043B\u043E\u0433\u0438\u0447\u043D\u044B\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u043C\u0443 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0443.","\u0412\u0441\u0435\u0433\u0434\u0430 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u0435\u043C\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F.","\u041D\u0438\u043A\u043E\u0433\u0434\u0430 \u043D\u0435 \u043F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435\u043C \u0438 \u0443\u043C\u0435\u043D\u044C\u0448\u0430\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u043F\u0435\u0440\u0435\u043F\u043B\u0435\u0442\u0430.","\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F, \u043A\u043E\u0433\u0434\u0430 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044C \u043C\u044B\u0448\u0438 \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043D\u0430\u0434 \u043F\u0435\u0440\u0435\u043F\u043B\u0435\u0442\u043E\u043C.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043D\u0430 \u043F\u0435\u0440\u0435\u043F\u043B\u0435\u0442\u0435.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u043A\u0440\u044B\u0442\u0438\u0435\u043C \u043D\u0435\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u043E\u0433\u043E \u043A\u043E\u0434\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u0435\u0440\u0435\u0447\u0435\u0440\u043A\u0438\u0432\u0430\u043D\u0438\u0435\u043C \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0445 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0445.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u043E\u0432\u0435\u0440\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u043E\u0434 \u0434\u0440\u0443\u0433\u0438\u043C\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u043C\u0438.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432 \u0440\u044F\u0434\u043E\u043C \u0441 \u0434\u0440\u0443\u0433\u0438\u043C\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u043C\u0438.","\u041D\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435\u043C \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432 \u0432\u043C\u0435\u0441\u0442\u0435 \u0441 \u0434\u0440\u0443\u0433\u0438\u043C\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u043C\u0438 \u0438 \u0438\u0445 \u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u043E\u0439.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0431\u0443\u0434\u0435\u0442 \u043B\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0430\u043D\u0438\u043C\u0430\u0446\u0438\u044F \u043F\u0440\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0442\u044C \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0435 \u043E \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044F\u0445 \u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u044F\u043C \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0447\u0442\u0435\u043D\u0438\u044F \u0441 \u044D\u043A\u0440\u0430\u043D\u0430 \u043F\u0440\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0438 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F.","\u0420\u0430\u0437\u043C\u0435\u0440 \u0448\u0440\u0438\u0444\u0442\u0430 \u0434\u043B\u044F \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439. \u0415\u0441\u043B\u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E {0}, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 {1}.","\u0412\u044B\u0441\u043E\u0442\u0430 \u0441\u0442\u0440\u043E\u043A\u0438 \u0434\u043B\u044F \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439. \u0415\u0441\u043B\u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E {0}, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 {1}. \u041C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u2014 8.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u043F\u0440\u0438 \u0432\u0432\u043E\u0434\u0435 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F.","\u0412\u0441\u0435\u0433\u0434\u0430 \u0432\u044B\u0431\u0438\u0440\u0430\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435.",'\u0412\u044B\u0431\u043E\u0440 \u043D\u0435\u0434\u0430\u0432\u043D\u0438\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439, \u0435\u0441\u043B\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u0430\u043B\u044C\u043D\u0435\u0439\u0448\u0438\u0439 \u0432\u0432\u043E\u0434 \u043D\u0435 \u043F\u0440\u0438\u0432\u043E\u0434\u0438\u0442 \u043A \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044E \u043E\u0434\u043D\u043E\u0433\u043E \u0438\u0437 \u043D\u0438\u0445, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 "console.| -> console.log", \u0442\u0430\u043A \u043A\u0430\u043A "log" \u043D\u0435\u0434\u0430\u0432\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043B\u0441\u044F \u0434\u043B\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F.','\u0412\u044B\u0431\u043E\u0440 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0441 \u0443\u0447\u0435\u0442\u043E\u043C \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0445 \u043F\u0440\u0435\u0444\u0438\u043A\u0441\u043E\u0432, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u0434\u043B\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u044D\u0442\u0438\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 "co -> console" \u0438 "con -> const".',"\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u043C \u0432\u044B\u0431\u043E\u0440\u043E\u043C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u043F\u0440\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0438 \u0441\u043F\u0438\u0441\u043A\u0430 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u041F\u0440\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0438 \u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043F\u043E TAB \u0431\u0443\u0434\u0435\u0442 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0442\u044C\u0441\u044F \u043D\u0430\u0438\u043B\u0443\u0447\u0448\u0435\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 TAB.","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043F\u043E TAB.",'\u0412\u0441\u0442\u0430\u0432\u043A\u0430 \u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0439 \u043F\u043E TAB \u043F\u0440\u0438 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0438 \u0438\u0445 \u043F\u0440\u0435\u0444\u0438\u043A\u0441\u043E\u0432. \u0424\u0443\u043D\u043A\u0446\u0438\u044F \u0440\u0430\u0431\u043E\u0442\u0430\u0435\u0442 \u043E\u043F\u0442\u0438\u043C\u0430\u043B\u044C\u043D\u043E, \u0435\u0441\u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 "quickSuggestions" \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D.',"\u0412\u043A\u043B\u044E\u0447\u0430\u0435\u0442 \u0434\u043E\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043F\u043E TAB.","\u041D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438 \u0443\u0434\u0430\u043B\u044F\u044E\u0442\u0441\u044F.","\u041D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u0443\u044E\u0442\u0441\u044F.","\u0414\u043B\u044F \u043D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438 \u0437\u0430\u043F\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435.","\u0423\u0434\u0430\u043B\u0438\u0442\u0435 \u043D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043C\u043E\u0433\u0443\u0442 \u0432\u044B\u0437\u0432\u0430\u0442\u044C \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u044B.","\u0412\u0441\u0442\u0430\u0432\u043A\u0430 \u0438 \u0443\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432 \u043F\u043E\u0441\u043B\u0435 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043F\u0440\u0430\u0432\u0438\u043B\u043E \u0440\u0430\u0437\u0440\u044B\u0432\u0430 \u0441\u0442\u0440\u043E\u043A \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.","\u041D\u0435 \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0440\u0430\u0437\u0440\u044B\u0432\u044B \u0441\u043B\u043E\u0432 \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430 \u043D\u0430 \u043A\u0438\u0442\u0430\u0439\u0441\u043A\u043E\u043C, \u044F\u043F\u043E\u043D\u0441\u043A\u043E\u043C \u0438\u043B\u0438 \u043A\u043E\u0440\u0435\u0439\u0441\u043A\u043E\u043C \u044F\u0437\u044B\u043A\u0435 (CJK). \u0414\u043B\u044F \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0435\u043A\u0441\u0442\u043E\u0432 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043E\u0431\u044B\u0447\u043D\u043E\u0435 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u043F\u0440\u0430\u0432\u0438\u043B\u0430\u043C\u0438 \u0440\u0430\u0437\u0431\u0438\u0435\u043D\u0438\u044F \u043F\u043E \u0441\u043B\u043E\u0432\u0430\u043C, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u043C\u0438 \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430 \u043D\u0430 \u043A\u0438\u0442\u0430\u0439\u0441\u043A\u043E\u043C,\u044F\u043F\u043E\u043D\u0441\u043A\u043E\u043C \u0438 \u043A\u043E\u0440\u0435\u0439\u0441\u043A\u043E\u043C \u044F\u0437\u044B\u043A\u0435 (CJK).","\u0421\u0438\u043C\u0432\u043E\u043B\u044B, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u043A\u0430\u043A \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u0438 \u0441\u043B\u043E\u0432 \u043F\u0440\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0439, \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u0445 \u0441\u043E \u0441\u043B\u043E\u0432\u0430\u043C\u0438.","\u0421\u0442\u0440\u043E\u043A\u0438 \u043D\u0435 \u0431\u0443\u0434\u0443\u0442 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u044C\u0441\u044F \u043D\u0438\u043A\u043E\u0433\u0434\u0430.","\u0421\u0442\u0440\u043E\u043A\u0438 \u0431\u0443\u0434\u0443\u0442 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u044C\u0441\u044F \u043F\u043E \u0448\u0438\u0440\u0438\u043D\u0435 \u043E\u043A\u043D\u0430 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430.",'\u0421\u0442\u0440\u043E\u043A\u0438 \u0431\u0443\u0434\u0443\u0442 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u044C\u0441\u044F \u043F\u043E "#editor.wordWrapColumn#".','\u0421\u0442\u0440\u043E\u043A\u0438 \u0431\u0443\u0434\u0443\u0442 \u043F\u0435\u0440\u0435\u043D\u0435\u0441\u0435\u043D\u044B \u043F\u043E \u043C\u0438\u043D\u0438\u043C\u0430\u043B\u044C\u043D\u043E\u043C\u0443 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044E \u0438\u0437 \u0434\u0432\u0443\u0445: \u0448\u0438\u0440\u0438\u043D\u0430 \u043E\u043A\u043D\u0430 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0438 "#editor.wordWrapColumn#".',"\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043A\u0430\u043A \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0438.",'\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0441\u0442\u043E\u043B\u0431\u0435\u0446 \u043F\u0435\u0440\u0435\u043D\u043E\u0441\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u0435\u0441\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 "#editor.wordWrap#" \u2014 "wordWrapColumn" \u0438\u043B\u0438 "bounded".',"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0434\u043E\u043B\u0436\u043D\u044B \u043B\u0438 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u043E\u0432\u044B\u0435 \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430 \u0446\u0432\u0435\u0442\u0430 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043F\u043E\u043B\u0443\u0447\u0430\u0435\u0442 \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0432\u043A\u043B\u0430\u0434\u043A\u0438 \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u0430\u0434\u044B\u0432\u0430\u0435\u0442 \u043B\u0438 \u0438\u0445 \u0432 \u0440\u0430\u0431\u043E\u0447\u0443\u044E \u0441\u0440\u0435\u0434\u0443 \u0434\u043B\u044F \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438."],"vs/editor/common/core/editorColorRegistry":["\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0433\u0440\u0430\u043D\u0438\u0446 \u0432\u043E\u043A\u0440\u0443\u0433 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0445 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 \u043F\u0440\u0438 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0438 \u0444\u0443\u043D\u043A\u0446\u0438\u0439 Quick Open \u0438\u043B\u0438 \u043F\u043E\u0438\u0441\u043A\u0430. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043E\u0431\u0432\u043E\u0434\u043A\u0438 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F.",'\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0441\u0438\u043C\u0432\u043E\u043B\u0430, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0432 \u0444\u0443\u043D\u043A\u0446\u0438\u044F\u0445 "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E" \u0438\u043B\u0438 "\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C\u0443/\u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u0441\u0438\u043C\u0432\u043E\u043B\u0443". \u0426\u0432\u0435\u0442 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u0435 \u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u043E\u0434 \u043D\u0438\u043C.',"\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0432\u043E\u043A\u0440\u0443\u0433 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432.","\u0426\u0432\u0435\u0442 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430. \u041F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044C \u0446\u0432\u0435\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u0430, \u043F\u0435\u0440\u0435\u043A\u0440\u044B\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u043F\u0440\u044F\u043C\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u044B\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u043E\u043C.","\u0426\u0432\u0435\u0442 \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u043D\u043E\u043C\u0435\u0440\u043E\u0432 \u0441\u0442\u0440\u043E\u043A \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.",'\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u043E "editorIndentGuide.background" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0435\u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u043C\u044B\u043C. \u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 "editorIndentGuide.background1".',"\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.",'\u0421\u0432\u043E\u0439\u0441\u0442\u0432\u043E "editorIndentGuide.activeBackground" \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043D\u0435\u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u043C\u044B\u043C. \u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 "editorIndentGuide.activeBackground1".',"\u0426\u0432\u0435\u0442 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (1).","\u0426\u0432\u0435\u0442 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (2).","\u0426\u0432\u0435\u0442 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (3).","\u0426\u0432\u0435\u0442 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (4).","\u0426\u0432\u0435\u0442 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (5).","\u0426\u0432\u0435\u0442 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (6).","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (1).","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (2).","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (3).","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (4).","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (5).","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u0434\u043B\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (6).","\u0426\u0432\u0435\u0442 \u043D\u043E\u043C\u0435\u0440\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 'Id' \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u043C. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0432\u043C\u0435\u0441\u0442\u043E \u043D\u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 'editorLineNumber.activeForeground'.","\u0426\u0432\u0435\u0442 \u043D\u043E\u043C\u0435\u0440\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u0426\u0432\u0435\u0442 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u043A\u043E\u0433\u0434\u0430 editor.renderFinalNewline \u0438\u043C\u0435\u0435\u0442 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 dimmed.","\u0426\u0432\u0435\u0442 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 CodeLens \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A","\u0426\u0432\u0435\u0442 \u043F\u0440\u044F\u043C\u043E\u0443\u0433\u043E\u043B\u044C\u043D\u0438\u043A\u043E\u0432 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0432 \u043E\u043A\u043D\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u043B\u044F \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u0412 \u043F\u043E\u043B\u0435 \u0440\u0430\u0437\u043C\u0435\u0449\u0430\u044E\u0442\u0441\u044F \u043E\u0442\u0441\u0442\u0443\u043F\u044B \u0433\u043B\u0438\u0444\u043E\u0432 \u0438 \u043D\u043E\u043C\u0435\u0440\u0430 \u0441\u0442\u0440\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u043D\u0435\u043D\u0443\u0436\u043D\u043E\u0433\u043E (\u043D\u0435\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u043E\u0433\u043E) \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.",'\u041D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u043E\u0441\u0442\u044C \u043D\u0435\u043D\u0443\u0436\u043D\u043E\u0433\u043E (\u043D\u0435\u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u043E\u0433\u043E) \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, "#000000c0" \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u043A\u043E\u0434 \u0441 \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u043E\u0441\u0442\u044C\u044E 75 %. \u0412 \u0432\u044B\u0441\u043E\u043A\u043E\u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442\u043D\u044B\u0445 \u0442\u0435\u043C\u0430\u0445 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043D\u0435\u043D\u0443\u0436\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430 \u0432\u043C\u0435\u0441\u0442\u043E \u0437\u0430\u0442\u0435\u043D\u0435\u043D\u0438\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0446\u0432\u0435\u0442 \u0442\u0435\u043C\u044B "editorUnnecessaryCode.border".',"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u0435\u0434\u0432\u0430 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u043C\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0435\u0434\u0432\u0430 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u043C\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0435\u0434\u0432\u0430 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u043C\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u043C\u0435\u0442\u043A\u0438 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0432 \u043E\u043A\u043D\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0434\u043B\u044F \u043E\u0448\u0438\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043C\u0435\u0442\u043A\u0438 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0432 \u043E\u043A\u043D\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043C\u0435\u0442\u043A\u0438 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0432 \u043E\u043A\u043D\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0434\u043B\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043A\u043E\u0431\u043E\u043A (1). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u0430\u0441\u043A\u0440\u0430\u0441\u043A\u0443 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043A\u043E\u0431\u043E\u043A (2). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u0430\u0441\u043A\u0440\u0430\u0441\u043A\u0443 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043A\u043E\u0431\u043E\u043A (3). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u0430\u0441\u043A\u0440\u0430\u0441\u043A\u0443 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043A\u043E\u0431\u043E\u043A (4). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u0430\u0441\u043A\u0440\u0430\u0441\u043A\u0443 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043A\u043E\u0431\u043E\u043A (5). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u0430\u0441\u043A\u0440\u0430\u0441\u043A\u0443 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043A\u043E\u0431\u043E\u043A (6). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0440\u0430\u0441\u043A\u0440\u0430\u0441\u043A\u0443 \u043F\u0430\u0440\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u044B\u0445 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (1). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (2). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (3). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (4). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (5). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (6). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (1). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (2). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (3). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (4). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (5). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A (6). \u0422\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044F \u0432\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u042E\u043D\u0438\u043A\u043E\u0434\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u042E\u043D\u0438\u043A\u043E\u0434\u0430."],"vs/editor/common/editorContextKeys":["\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u0444\u043E\u043A\u0443\u0441 \u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u0435 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 (\u043A\u0443\u0440\u0441\u043E\u0440 \u043C\u0438\u0433\u0430\u0435\u0442)","\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u0444\u043E\u043A\u0443\u0441 \u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0438\u043B\u0438 \u043D\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0444\u043E\u043A\u0443\u0441 \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043D\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430)","\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u0444\u043E\u043A\u0443\u0441 \u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0438\u043B\u0438 \u043D\u0430 \u043F\u043E\u043B\u0435 \u0432\u0432\u043E\u0434\u0430 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 (\u043A\u0443\u0440\u0441\u043E\u0440 \u043C\u0438\u0433\u0430\u0435\u0442)","\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u043C \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F","\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u043E\u043C \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439","\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442 \u0432\u043D\u0435\u0434\u0440\u0435\u043D\u043D\u044B\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u043E\u043C \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439","\u0412\u044B\u0431\u0440\u0430\u043D \u043B\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u043D\u044B\u0439 \u0431\u043B\u043E\u043A \u043A\u043E\u0434\u0430 \u0434\u043B\u044F \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u044F","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u0430 \u0441\u0440\u0430\u0432\u043D\u0435\u043D\u0438\u0439","\u0414\u043E\u0441\u0442\u0438\u0433\u043D\u0443\u0442\u0430 \u043B\u0438 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u0430\u044F \u0442\u043E\u0447\u043A\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0430 \u043F\u0430\u0440\u0430\u043B\u043B\u0435\u043B\u044C\u043D\u043E\u0439 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439",'\u0412\u043A\u043B\u044E\u0447\u0435\u043D \u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 "editor.columnSelection"',"\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043C\u043D\u043E\u0436\u0435\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439 \u0432\u044B\u0431\u043E\u0440","\u041F\u0435\u0440\u0435\u043C\u0435\u0449\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u0444\u043E\u043A\u0443\u0441 \u0441 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 TAB","\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0432\u0438\u0434\u0438\u043C\u044B\u043C","\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435","\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432 \u0444\u043E\u043A\u0443\u0441\u0435","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","\u0412\u0438\u0434\u043D\u0430 \u043B\u0438 \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u0430\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432","\u0421\u0444\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u0430 \u043B\u0438 \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u0430\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u0446\u0432\u0435\u0442\u043E\u0432","\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0447\u0430\u0441\u0442\u044C\u044E \u0431\u043E\u043B\u044C\u0448\u0435\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0437\u0430\u043F\u0438\u0441\u043D\u044B\u0445 \u043A\u043D\u0438\u0436\u0435\u043A)","\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u044F\u0437\u044B\u043A\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u043A\u043E\u0434\u043E\u043C","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A CodeLens","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0439","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0439","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0439 \u0442\u0438\u043F\u043E\u0432","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u044F","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0441\u0441\u044B\u043B\u043E\u043A","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u044F","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0441\u043F\u0440\u0430\u0432\u043A\u0438 \u043F\u043E \u0441\u0438\u0433\u043D\u0430\u0442\u0443\u0440\u0430\u043C","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u043E\u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432","\u0415\u0441\u0442\u044C \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u043E\u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u043E\u0432"],"vs/editor/common/languages":["\u043C\u0430\u0441\u0441\u0438\u0432","\u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435","\u043A\u043B\u0430\u0441\u0441","\u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u0430","\u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440","\u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u0435","\u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F","\u0441\u043E\u0431\u044B\u0442\u0438\u0435","\u043F\u043E\u043B\u0435","\u0444\u0430\u0439\u043B","\u0444\u0443\u043D\u043A\u0446\u0438\u044F","\u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441","\u043A\u043B\u044E\u0447","\u043C\u0435\u0442\u043E\u0434","\u043C\u043E\u0434\u0443\u043B\u044C","\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u043E \u0438\u043C\u0435\u043D","NULL","\u0447\u0438\u0441\u043B\u043E","\u043E\u0431\u044A\u0435\u043A\u0442","\u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440","\u043F\u0430\u043A\u0435\u0442","\u0441\u0432\u043E\u0439\u0441\u0442\u0432\u043E","\u0441\u0442\u0440\u043E\u043A\u0430","\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0430","\u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u0442\u0438\u043F\u0430","\u041F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0430\u044F","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["\u041F\u0440\u043E\u0441\u0442\u043E\u0439 \u0442\u0435\u043A\u0441\u0442"],"vs/editor/common/model/editStack":["\u0412\u0432\u043E\u0434"],"vs/editor/common/standaloneStrings":["\u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A: \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0442\u043E\u043A\u0435\u043D\u044B","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u043E\u043A\u0435/\u0441\u0442\u043E\u043B\u0431\u0446\u0443...","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435\u0445 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u043E\u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0434\u043E\u0441\u0442\u0443\u043F\u0430","\u041F\u0430\u043B\u0438\u0442\u0440\u0430 \u043A\u043E\u043C\u0430\u043D\u0434","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u044B","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0438\u043C\u0432\u043E\u043B\u0443...","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0438\u043C\u0432\u043E\u043B\u0443 \u043F\u043E \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F\u043C...","\u0421\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u041D\u0430\u0436\u043C\u0438\u0442\u0435 ALT+F1 \u0434\u043B\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439.","\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0441\u043E\u043A\u043E\u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442\u043D\u0443\u044E \u0442\u0435\u043C\u0443","\u0412\u043D\u0435\u0441\u0435\u043D\u043E \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0432 \u0444\u0430\u0439\u043B\u0430\u0445 ({1}): {0}."],"vs/editor/common/viewLayout/viewLineRenderer":["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435 ({0})","\u0421\u0438\u043C\u0432\u043E\u043B\u044B: {0}"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["\u041D\u0430\u0447\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u043E\u0447\u043A\u0430 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F","\u041D\u0430\u0447\u0430\u043B\u044C\u043D\u0430\u044F \u0442\u043E\u0447\u043A\u0430 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430 \u0432 {0}:{1}","\u0423\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u0443\u044E \u0442\u043E\u0447\u043A\u0443 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0439 \u0442\u043E\u0447\u043A\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F","\u0412\u044B\u0434\u0435\u043B\u0438\u0442\u044C \u0442\u0435\u043A\u0441\u0442 \u043E\u0442 \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u043E\u0439 \u0442\u043E\u0447\u043A\u0438 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0434\u043E \u043A\u0443\u0440\u0441\u043E\u0440\u0430","\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0430\u0447\u0430\u043B\u044C\u043D\u0443\u044E \u0442\u043E\u0447\u043A\u0443 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["\u0426\u0432\u0435\u0442 \u043C\u0435\u0442\u043A\u0438 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0432 \u043E\u043A\u043D\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0434\u043B\u044F \u043F\u0430\u0440 \u0441\u043A\u043E\u0431\u043E\u043A.","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043A\u043E\u0431\u043A\u0435","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043A\u043E\u0431\u043A\u0443","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u043A\u043E\u0431\u043A\u0438","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A &&\u0441\u043A\u043E\u0431\u043A\u0435"],"vs/editor/contrib/caretOperations/browser/caretOperations":["\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442 \u0432\u043B\u0435\u0432\u043E","\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442 \u0432\u043F\u0440\u0430\u0432\u043E"],"vs/editor/contrib/caretOperations/browser/transpose":["\u0422\u0440\u0430\u043D\u0441\u043F\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0431\u0443\u043A\u0432\u044B"],"vs/editor/contrib/clipboard/browser/clipboard":["&&\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C","\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C","\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C","\u0412\u044B\u0440\u0435\u0437\u0430\u0442\u044C","&&\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u0430\u043A","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043A\u0430\u043A","\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F","\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F","\u041F\u043E\u0434\u0435\u043B\u0438\u0442\u044C\u0441\u044F","&&\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435\u043C \u0441\u0438\u043D\u0442\u0430\u043A\u0441\u0438\u0441\u0430"],"vs/editor/contrib/codeAction/browser/codeAction":["\u041F\u0440\u0438 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430 \u043F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["\u0422\u0438\u043F \u0437\u0430\u043F\u0443\u0441\u043A\u0430\u0435\u043C\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043A\u043E\u0433\u0434\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u044E\u0442\u0441\u044F \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F.","\u0412\u0441\u0435\u0433\u0434\u0430 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u043D\u043E\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u043A\u043E\u0434\u0430.","\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0435\u0440\u0432\u043E\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430, \u0435\u0441\u043B\u0438 \u043E\u043D\u043E \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0435\u0434\u0438\u043D\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u043C.","\u041D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430.","\u0411\u044B\u0441\u0442\u0440\u043E\u0435 \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435...","\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442",'\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043A\u043E\u0434\u0430 \u0434\u043B\u044F "{0}".','\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430 \u0434\u043B\u044F "{0}" \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B',"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043A\u043E\u0434\u0430","\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442","\u0420\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433...",'\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0440\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433\u043E\u0432 \u0434\u043B\u044F "{0}"','\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0440\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433\u0430 \u0434\u043B\u044F "{0}"',"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0440\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433\u043E\u0432","\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0440\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433\u0430 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442","\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u043C \u043A\u043E\u0434\u043E\u043C...","\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u0434\u043B\u044F '{0}'",'\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0434\u043B\u044F "{0}"',"\u041F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B","\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442","\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F \u0438\u043C\u043F\u043E\u0440\u0442\u043E\u0432","\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0434\u043B\u044F \u0443\u043F\u043E\u0440\u044F\u0434\u043E\u0447\u0435\u043D\u0438\u044F \u0438\u043C\u043F\u043E\u0440\u0442\u043E\u0432 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442","\u0418\u0441\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0432\u0441\u0435","\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043F\u043E \u043E\u0431\u0449\u0435\u043C\u0443 \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044E","\u0410\u0432\u0442\u043E\u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435...","\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0445 \u0430\u0432\u0442\u043E\u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0439"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u043E\u0432 \u0433\u0440\u0443\u043F\u043F \u0432 \u043C\u0435\u043D\u044E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043A\u043E\u0434\u0430.","\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0433\u043E \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0432 \u0441\u0442\u0440\u043E\u043A\u0435, \u0435\u0441\u043B\u0438 \u0432 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u0435 \u0432\u0440\u0435\u043C\u044F \u043D\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u0434\u0438\u0430\u0433\u043D\u043E\u0441\u0442\u0438\u043A\u0430."],"vs/editor/contrib/codeAction/browser/codeActionController":["\u041A\u043E\u043D\u0442\u0435\u043A\u0441\u0442: {0} \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 {1} \u0438 \u0441\u0442\u043E\u043B\u0431\u0446\u0435 {2}.","\u0421\u043A\u0440\u044B\u0442\u044C \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u0435","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u0435"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F...","\u0411\u044B\u0441\u0442\u0440\u043E\u0435 \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435","\u0418\u0437\u0432\u043B\u0435\u0447\u044C","\u0412\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0439","\u041F\u0435\u0440\u0435\u043F\u0438\u0441\u0430\u0442\u044C","\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C","\u0420\u0430\u0437\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0432\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0435","\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0441 \u0438\u0441\u0445\u043E\u0434\u043D\u044B\u043C \u043A\u043E\u0434\u043E\u043C"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430. \u0414\u043E\u0441\u0442\u0443\u043F\u043D\u043E \u043F\u0440\u0435\u0434\u043F\u043E\u0447\u0442\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0435 \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 ({0})","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430 ({0})","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u043E\u0434\u0430"],"vs/editor/contrib/codelens/browser/codelensController":["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u044B CodeLens \u0434\u043B\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0439 \u0441\u0442\u0440\u043E\u043A\u0438","\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0443"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["\u0429\u0435\u043B\u043A\u043D\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0446\u0432\u0435\u0442\u0430 (RGB/HSL/HEX)","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u043F\u0430\u043B\u0438\u0442\u0440\u044B"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u043B\u0438 \u0432\u044B\u0434\u0435\u043B\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u044B\u0439 \u0432\u044B\u0431\u043E\u0440 \u0446\u0432\u0435\u0442\u0430","&&\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0438\u043B\u0438 \u0432\u044B\u0434\u0435\u043B\u0438\u0442\u044C \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u044B\u0439 \u0432\u044B\u0431\u043E\u0440 \u0446\u0432\u0435\u0442\u0430","\u0421\u043A\u0440\u044B\u0442\u044C \u043F\u0430\u043B\u0438\u0442\u0440\u0443 \u0446\u0432\u0435\u0442\u043E\u0432","\u0412\u0441\u0442\u0430\u0432\u043A\u0430 \u0446\u0432\u0435\u0442\u0430 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u0430\u0432\u0442\u043E\u043D\u043E\u043C\u043D\u043E\u0439 \u043F\u0430\u043B\u0438\u0442\u0440\u044B \u0446\u0432\u0435\u0442\u043E\u0432"],"vs/editor/contrib/comment/browser/comment":["\u0417\u0430\u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u043B\u0438 \u0440\u0430\u0441\u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443","\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 &&\u0441\u0442\u0440\u043E\u043A\u0438","\u0417\u0430\u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443","\u0420\u0430\u0441\u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443","\u0417\u0430\u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0438\u043B\u0438 \u0440\u0430\u0441\u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0431\u043B\u043E\u043A","\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439 &&\u0431\u043B\u043E\u043A\u0430"],"vs/editor/contrib/contextmenu/browser/contextmenu":["\u041C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0430","\u041E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0430 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432","\u0420\u0430\u0437\u043C\u0435\u0440 \u043F\u043E \u0432\u0435\u0440\u0442\u0438\u043A\u0430\u043B\u0438","\u041F\u0440\u043E\u043F\u043E\u0440\u0446\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E","\u0417\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u044C","\u041F\u043E\u0434\u043E\u0433\u043D\u0430\u0442\u044C","\u041F\u043E\u043B\u0437\u0443\u043D\u043E\u043A","\u041D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043C\u044B\u0448\u0438","\u0412\u0441\u0435\u0433\u0434\u0430","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u043D\u043E\u0435 \u043C\u0435\u043D\u044E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["\u041E\u0442\u043C\u0435\u043D\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u0443\u0440\u0441\u043E\u0440\u0430","\u041F\u043E\u0432\u0442\u043E\u0440 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u043A\u0443\u0440\u0441\u043E\u0440\u0430"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043A\u0430\u043A...","\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432\u0441\u0442\u0430\u0432\u043A\u0438 \u0434\u043B\u044F \u043F\u043E\u043F\u044B\u0442\u043A\u0438 \u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u0415\u0441\u043B\u0438 \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D, \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043E \u0432\u044B\u0431\u043E\u0440\u0430."],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0432\u0441\u0442\u0430\u0432\u043A\u0438","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0432\u0441\u0442\u0430\u0432\u043A\u0438...","\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u044E\u0442\u0441\u044F \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A\u0438 \u0432\u0441\u0442\u0430\u0432\u043A\u0438. \u0429\u0435\u043B\u043A\u043D\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B","\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432\u0441\u0442\u0430\u0432\u043A\u0438","\u0417\u0430\u043F\u0443\u0441\u043A \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A\u043E\u0432 \u0432\u0441\u0442\u0430\u0432\u043A\u0438"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["\u0412\u0441\u0442\u0440\u043E\u0435\u043D\u043E","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0431\u044B\u0447\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C URI","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C URI","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0443\u0442\u0438","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043F\u0443\u0442\u044C","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0443\u0442\u0438","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u043D\u043E\u0441\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0443\u0442\u044C"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["\u041D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0441\u0431\u0440\u043E\u0441\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0434\u043B\u044F \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u0442\u0438\u043F\u0430 MIME."],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0441\u0431\u0440\u043E\u0441\u0430","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0441\u0431\u0440\u043E\u0441\u0430...","\u0417\u0430\u043F\u0443\u0441\u043A\u0430\u044E\u0442\u0441\u044F \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A\u0438 \u0441\u0431\u0440\u043E\u0441\u0430. \u0429\u0435\u043B\u043A\u043D\u0438\u0442\u0435 \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B"],"vs/editor/contrib/editorState/browser/keybindingCancellation":['\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u044E\u0442\u0441\u044F \u043B\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438, \u0434\u043E\u043F\u0443\u0441\u043A\u0430\u044E\u0449\u0438\u0435 \u043E\u0442\u043C\u0435\u043D\u0443, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, "\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0438"'],"vs/editor/contrib/find/browser/findController":["\u0424\u0430\u0439\u043B \u0441\u043B\u0438\u0448\u043A\u043E\u043C \u0432\u0435\u043B\u0438\u043A \u0434\u043B\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043C\u0435\u043D\u044B \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432.","\u041D\u0430\u0439\u0442\u0438","&&\u041D\u0430\u0439\u0442\u0438",`\u041F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0444\u043B\u0430\u0433 "\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u0440\u0435\u0433\u0443\u043B\u044F\u0440\u043D\u043E\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435".\r -\u042D\u0442\u043E\u0442 \u0444\u043B\u0430\u0433 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D \u043D\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435.\r -0: \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\r -1: true\r -2: false`,`\u041F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0444\u043B\u0430\u0433 "\u0421\u043B\u043E\u0432\u043E \u0446\u0435\u043B\u0438\u043A\u043E\u043C".\r -\u042D\u0442\u043E\u0442 \u0444\u043B\u0430\u0433 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D \u043D\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435.\r -0: \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\r -1: true\r -2: false`,`\u041F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0444\u043B\u0430\u0433 "\u0423\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440".\r -\u042D\u0442\u043E\u0442 \u0444\u043B\u0430\u0433 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D \u043D\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435.\r -0: \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\r -1: true\r -2: false`,`\u041F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u0444\u043B\u0430\u0433 "\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u0440\u0435\u0433\u0438\u0441\u0442\u0440".\r -\u042D\u0442\u043E\u0442 \u0444\u043B\u0430\u0433 \u043D\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043E\u0445\u0440\u0430\u043D\u0435\u043D \u043D\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435.\r -0: \u0431\u0435\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\r -1: true\r -2: false`,"\u041D\u0430\u0439\u0442\u0438 \u0441 \u0430\u0440\u0433\u0443\u043C\u0435\u043D\u0442\u0430\u043C\u0438","\u041D\u0430\u0439\u0442\u0438 \u0432 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u043C","\u041D\u0430\u0439\u0442\u0438 \u0434\u0430\u043B\u0435\u0435","\u041D\u0430\u0439\u0442\u0438 \u0440\u0430\u043D\u0435\u0435","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044E...","\u041D\u0435\u0442 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u043D\u0430\u0439\u0442\u0438 \u0447\u0442\u043E-\u043D\u0438\u0431\u0443\u0434\u044C \u0434\u0440\u0443\u0433\u043E\u0435.","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043B\u043E, \u0447\u0442\u043E\u0431\u044B \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u043C\u0443 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044E (\u043E\u0442 1 \u0434\u043E {0})","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043B\u043E \u043E\u0442 1 \u0434\u043E {0}","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043B\u043E \u043E\u0442 1 \u0434\u043E {0}","\u041D\u0430\u0439\u0442\u0438 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435","\u041D\u0430\u0439\u0442\u0438 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C","&&\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C"],"vs/editor/contrib/find/browser/findWidget":['\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043A\u043D\u043E\u043F\u043A\u0438 "\u041D\u0430\u0439\u0442\u0438 \u0432 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u043C" \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.',"\u0417\u043D\u0430\u0447\u043E\u043A, \u0443\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0449\u0438\u0439, \u0447\u0442\u043E \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0441\u0432\u0435\u0440\u043D\u0443\u0442\u043E.","\u0417\u043D\u0430\u0447\u043E\u043A, \u0443\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0449\u0438\u0439, \u0447\u0442\u043E \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u043E.",'\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043A\u043D\u043E\u043F\u043A\u0438 "\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C" \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.','\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043A\u043D\u043E\u043F\u043A\u0438 "\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435" \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.','\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043A\u043D\u043E\u043F\u043A\u0438 "\u041D\u0430\u0439\u0442\u0438 \u0440\u0430\u043D\u0435\u0435" \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.','\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043A\u043D\u043E\u043F\u043A\u0438 "\u041D\u0430\u0439\u0442\u0438 \u0434\u0430\u043B\u0435\u0435" \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.',"\u041F\u043E\u0438\u0441\u043A \u0438 \u0437\u0430\u043C\u0435\u043D\u0430","\u041D\u0430\u0439\u0442\u0438","\u041D\u0430\u0439\u0442\u0438","\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435","\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435","\u041D\u0430\u0439\u0442\u0438 \u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0438","\u0417\u0430\u043A\u0440\u044B\u0442\u044C","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435","\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0437\u0430\u043C\u0435\u043D\u044B","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0435\u0440\u0432\u044B\u0435 {0} \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432, \u043D\u043E \u0432\u0441\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u043F\u043E\u0438\u0441\u043A\u0430 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u044E\u0442\u0441\u044F \u0441\u043E \u0432\u0441\u0435\u043C \u0442\u0435\u043A\u0441\u0442\u043E\u043C.","{0} \u0438\u0437 {1}","\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442","{0} \u043E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E",'{0} \u043D\u0430\u0439\u0434\u0435\u043D \u0434\u043B\u044F "{1}"','{0} \u043D\u0430\u0439\u0434\u0435\u043D \u0434\u043B\u044F "{1}", \u0432 {2}','{0} \u043D\u0430\u0439\u0434\u0435\u043D \u0434\u043B\u044F "{1}"',"\u0422\u0435\u043F\u0435\u0440\u044C \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448 CTRL+\u0412\u0412\u041E\u0414 \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0441\u0438\u043C\u0432\u043E\u043B \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430 \u043D\u0430 \u043D\u043E\u0432\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 \u0432\u043C\u0435\u0441\u0442\u043E \u0437\u0430\u043C\u0435\u043D\u044B \u0432\u0441\u0435\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430. \u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0438\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448 editor.action.replaceAll, \u0447\u0442\u043E\u0431\u044B \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438\u0442\u044C \u044D\u0442\u043E \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435."],"vs/editor/contrib/folding/browser/folding":["\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C","\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0440\u0435\u043A\u0443\u0440\u0441\u0438\u0432\u043D\u043E","\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C","\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435","\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0440\u0435\u043A\u0443\u0440\u0441\u0438\u0432\u043D\u043E","\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435 \u0431\u043B\u043E\u043A\u0438 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0435\u0432","\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435 \u0440\u0435\u0433\u0438\u043E\u043D\u044B","\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435 \u0440\u0435\u0433\u0438\u043E\u043D\u044B","\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435 \u043A\u0440\u043E\u043C\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445","\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435 \u043A\u0440\u043E\u043C\u0435 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445","\u0421\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435","\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u0441\u0435","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0440\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u0441\u043A\u043E\u043C\u0443 \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044E","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0443 \u0441\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C\u0443 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0443 \u0441\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445","\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F \u0438\u0437 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u044B \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u044F \u0432\u0440\u0443\u0447\u043D\u0443\u044E","\u0423\u0440\u043E\u0432\u0435\u043D\u044C \u043F\u0430\u043F\u043A\u0438 {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0437\u0430 \u0441\u0432\u0435\u0440\u043D\u0443\u0442\u044B\u043C\u0438 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0430\u043C\u0438. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u0434\u0435\u043A\u043E\u0440\u0430\u0442\u0438\u0432\u043D\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B.","\u0426\u0432\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0441\u0432\u0435\u0440\u0442\u044B\u0432\u0430\u043D\u0438\u0435\u043C \u0432\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u043C \u043F\u043E\u043B\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u0440\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044B\u0445 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432 \u043D\u0430 \u043F\u043E\u043B\u0435 \u0433\u043B\u0438\u0444\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u0441\u0432\u0435\u0440\u043D\u0443\u0442\u044B\u0445 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432 \u043D\u0430 \u043F\u043E\u043B\u0435 \u0433\u043B\u0438\u0444\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u0441\u0432\u0435\u0440\u043D\u0443\u0442\u044B\u0445 \u0432\u0440\u0443\u0447\u043D\u0443\u044E \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432 \u043D\u0430 \u043F\u043E\u043B\u044F\u0445 \u0433\u043B\u0438\u0444\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u0440\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044B\u0445 \u0432\u0440\u0443\u0447\u043D\u0443\u044E \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u043E\u0432 \u043D\u0430 \u043F\u043E\u043B\u044F\u0445 \u0433\u043B\u0438\u0444\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430."],"vs/editor/contrib/fontZoom/browser/fontZoom":["\u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C \u0448\u0440\u0438\u0444\u0442 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u0423\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C \u0448\u0440\u0438\u0444\u0442 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043C\u0430\u0441\u0448\u0442\u0430\u0431 \u0448\u0440\u0438\u0444\u0442\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430"],"vs/editor/contrib/format/browser/format":["\u0412\u043D\u0435\u0441\u0435\u043D\u0430 \u043E\u0434\u043D\u0430 \u043F\u0440\u0430\u0432\u043A\u0430 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 {0}.","\u0412\u043D\u0435\u0441\u0435\u043D\u044B \u043F\u0440\u0430\u0432\u043A\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F ({0}) \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 {1}.","\u0412\u043D\u0435\u0441\u0435\u043D\u0430 \u043E\u0434\u043D\u0430 \u043F\u0440\u0430\u0432\u043A\u0430 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F \u043C\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u043E\u043A\u0430\u043C\u0438 {0} \u0438 {1}.","\u0412\u043D\u0435\u0441\u0435\u043D\u044B \u043F\u0440\u0430\u0432\u043A\u0438 \u0444\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u044F ({0}) \u043C\u0435\u0436\u0434\u0443 \u0441\u0442\u0440\u043E\u043A\u0430\u043C\u0438 {1} \u0438 {2}."],"vs/editor/contrib/format/browser/formatActions":["\u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442","\u0424\u043E\u0440\u043C\u0430\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442"],"vs/editor/contrib/gotoError/browser/gotoError":["\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439 \u041F\u0440\u043E\u0431\u043B\u0435\u043C\u0435 (\u041E\u0448\u0438\u0431\u043A\u0435, \u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044E, \u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438)","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C\u0443 \u043C\u0430\u0440\u043A\u0435\u0440\u0443.","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0439 \u041F\u0440\u043E\u0431\u043B\u0435\u043C\u0435 (\u041E\u0448\u0438\u0431\u043A\u0435, \u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044E, \u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438)","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430 \u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u043C\u0430\u0440\u043A\u0435\u0440\u0443.","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0435 \u0432 \u0444\u0430\u0439\u043B\u0430\u0445 (\u043E\u0448\u0438\u0431\u043A\u0438, \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F, \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F)","\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F &&\u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0439 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0435 \u0432 \u0444\u0430\u0439\u043B\u0430\u0445 (\u043E\u0448\u0438\u0431\u043A\u0438, \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F, \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F)","\u041F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F &&\u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["\u041E\u0448\u0438\u0431\u043A\u0430","\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435","\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F","\u0423\u043A\u0430\u0437\u0430\u043D\u0438\u0435","{0} \u0432 {1}. ","\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B: {0} \u0438\u0437 {1}","\u041F\u0440\u043E\u0431\u043B\u0435\u043C\u044B: {0} \u0438\u0437 {1}","\u0426\u0432\u0435\u0442 \u043E\u0448\u0438\u0431\u043A\u0438 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0442\u043A\u0430\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0424\u043E\u043D \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043E\u0448\u0438\u0431\u043A\u0438 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0442\u043A\u0430\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0442\u043A\u0430\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0424\u043E\u043D \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0442\u043A\u0430\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0442\u043A\u0430\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0424\u043E\u043D \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0442\u043A\u0430\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0424\u043E\u043D \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u043C\u0435\u0442\u043A\u0430\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430."],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["\u041E\u0431\u0437\u043E\u0440","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F",'\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0434\u043B\u044F "{0}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.',"\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B.","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A &&\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E","\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0441\u0431\u043E\u043A\u0443","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435","\u041E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044F",'\u041E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u0434\u043B\u044F "{0}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.',"\u041E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044E","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A &&\u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u044E",'\u041E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u0434\u043B\u044F "{0}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E.',"\u041E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E","\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043E\u0431\u044A\u044F\u0432\u043B\u0435\u043D\u0438\u0435","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0442\u0438\u043F\u043E\u0432",'\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430 \u0434\u043B\u044F "{0}".',"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430.","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E \u0442\u0438\u043F\u0430","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A &&\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E \u0442\u0438\u043F\u0430","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0442\u0438\u043F\u0430","\u0420\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438",'\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043B\u044F "{0}".',"\u041D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F.","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u043C","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A &&\u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u043C","\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0440\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u0438",'\u0421\u0441\u044B\u043B\u043A\u0438 \u0434\u043B\u044F "{0}" \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B',"\u0421\u0441\u044B\u043B\u043A\u0438 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0441\u044B\u043B\u043A\u0430\u043C","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A &&\u0441\u0441\u044B\u043B\u043A\u0430\u043C","\u0421\u0441\u044B\u043B\u043A\u0438","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0438","\u0421\u0441\u044B\u043B\u043A\u0438","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043B\u044E\u0431\u043E\u043C\u0443 \u0441\u0438\u043C\u0432\u043E\u043B\u0443","\u0420\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044F",'\u041D\u0435\u0442 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0434\u043B\u044F "{0}"',"\u0421\u0441\u044B\u043B\u043A\u0438"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["\u0429\u0435\u043B\u043A\u043D\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0437\u0438\u0442\u044C \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F ({0})."],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":['\u041E\u0442\u043A\u0440\u044B\u0442\u043E \u043B\u0438 \u043E\u043A\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0441\u0441\u044B\u043B\u043E\u043A, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, "\u0421\u0441\u044B\u043B\u043A\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430" \u0438\u043B\u0438 "\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430"',"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["\u0421\u0441\u044B\u043B\u043E\u043A: {0}","{0} \u0441\u0441\u044B\u043B\u043A\u0430","\u0421\u0441\u044B\u043B\u043A\u0438"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["\u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D","\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442","\u0421\u0441\u044B\u043B\u043A\u0438"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["\u0432 {0} \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 {1} \u0432 \u0441\u0442\u043E\u043B\u0431\u0446\u0435 {2}","{0} \u0432 {1} \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 {2} \u0432 \u0441\u0442\u043E\u043B\u0431\u0446\u0435 {3}","1 \u0441\u0438\u043C\u0432\u043E\u043B \u0432 {0}, \u043F\u043E\u043B\u043D\u044B\u0439 \u043F\u0443\u0442\u044C: {1}","{0} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0432 {1}, \u043F\u043E\u043B\u043D\u044B\u0439 \u043F\u0443\u0442\u044C: {2} ","\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B","\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D 1 \u0441\u0438\u043C\u0432\u043E\u043B \u0432 {0}","\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E {0} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0432 {1}","\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u043E {0} \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0432 {1} \u0444\u0430\u0439\u043B\u0430\u0445"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044E\u0442 \u043B\u0438 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432, \u043A \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043C\u043E\u0436\u043D\u043E \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u0442\u043E\u043B\u044C\u043A\u043E \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B","\u0421\u0438\u043C\u0432\u043E\u043B {0} \u0438\u0437 {1}, {2} \u0434\u043B\u044F \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E","\u0421\u0438\u043C\u0432\u043E\u043B {0} \u0438\u0437 {1}"],"vs/editor/contrib/hover/browser/hover":["\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043D\u0430 \u043D\u0435\u0433\u043E \u0444\u043E\u043A\u0443\u0441","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u043C\u044B\u0448\u0438","\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0432\u0432\u0435\u0440\u0445","\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0432\u043D\u0438\u0437","\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0432\u043B\u0435\u0432\u043E","\u041F\u0440\u043E\u043A\u0440\u0443\u0442\u0438\u0442\u044C \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u0432\u043F\u0440\u0430\u0432\u043E","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0432\u0432\u0435\u0440\u0445 \u0432 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043D\u0430 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443 \u0432\u043D\u0438\u0437 \u0432 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0432\u0435\u0440\u0445\u043D\u0435\u043C\u0443 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u044E","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043D\u0438\u0436\u043D\u0435\u043C\u0443 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u044E"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...","\u041E\u0442\u0440\u0438\u0441\u043E\u0432\u043A\u0430 \u043F\u0440\u0438\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430 \u0434\u043B\u044F \u0434\u043B\u0438\u043D\u043D\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0438 \u0438\u0437 \u0441\u043E\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438. \u042D\u0442\u043E \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 editor.stopRenderingLineAfter.",'\u0420\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u043F\u0440\u043E\u043F\u0443\u0441\u043A\u0430\u0435\u0442\u0441\u044F \u0434\u043B\u044F \u0434\u043B\u0438\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A \u0438\u0437 \u0441\u043E\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0439 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438. \u042D\u0442\u043E \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E "editor.maxTokenizationLineLength".'],"vs/editor/contrib/hover/browser/markerHoverParticipant":["\u041F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0443","\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B","\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043D\u0430\u043B\u0438\u0447\u0438\u044F \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0439...","\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u044B","\u0411\u044B\u0441\u0442\u0440\u043E\u0435 \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u043C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\u043C","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u043C \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435\u043C"],"vs/editor/contrib/indentation/browser/indentation":["\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F \u0432 \u043F\u0440\u043E\u0431\u0435\u043B\u044B","\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F \u0432 \u0448\u0430\u0433\u0438 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438","\u041D\u0430\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0448\u0430\u0433\u0430 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438","\u0420\u0430\u0437\u043C\u0435\u0440 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0440\u0430\u0437\u043C\u0435\u0440 \u0448\u0430\u0433\u0430 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u0434\u043B\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0444\u0430\u0439\u043B\u0430","\u041E\u0442\u0441\u0442\u0443\u043F \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438","\u041E\u0442\u0441\u0442\u0443\u043F \u0441 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u0435\u043C \u043F\u0440\u043E\u0431\u0435\u043B\u043E\u0432","\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u044B\u0439 \u0440\u0430\u0437\u043C\u0435\u0440 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043E\u0442\u0441\u0442\u0443\u043F\u0430 \u043E\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E","\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F\u044B \u0441\u0442\u0440\u043E\u043A","\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E \u0440\u0430\u0441\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F\u044B \u0434\u043B\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["\u0414\u0432\u0430\u0436\u0434\u044B \u0449\u0435\u043B\u043A\u043D\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044C","CMD + \u0449\u0435\u043B\u0447\u043E\u043A","CTRL + \u0449\u0435\u043B\u0447\u043E\u043A","OPTION + \u0449\u0435\u043B\u0447\u043E\u043A","ALT + \u0449\u0435\u043B\u0447\u043E\u043A","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E ({0}), \u0449\u0435\u043B\u043A\u043D\u0438\u0442\u0435 \u043F\u0440\u0430\u0432\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u043E\u0439 \u043C\u044B\u0448\u0438 \u0434\u043B\u044F \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u0439","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044E ({0})","\u0412\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443"],"vs/editor/contrib/inlineCompletions/browser/commands":["\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435","\u0410\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435","\u041F\u0440\u0438\u043D\u044F\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0441\u043B\u043E\u0432\u043E \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F","\u041F\u0440\u0438\u043D\u044F\u0442\u044C Word","\u041F\u0440\u0438\u043D\u044F\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F","\u041F\u0440\u0438\u043D\u044F\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443","\u041F\u0440\u0438\u043D\u044F\u0442\u044C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435","\u041F\u0440\u0438\u043D\u044F\u0442\u044C","\u0421\u043A\u0440\u044B\u0442\u044C \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435","\u0412\u0441\u0435\u0433\u0434\u0430 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043F\u0430\u043D\u0435\u043B\u044C \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435","\u041D\u0430\u0447\u0438\u043D\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0441 \u043F\u0440\u043E\u0431\u0435\u043B\u0430","\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u0442, \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u043F\u0440\u043E\u0431\u0435\u043B \u043F\u0435\u0440\u0435\u0434 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u043E\u0439 \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u0435\u0439 \u043A\u043E\u0440\u043E\u0447\u0435, \u0447\u0435\u043C \u0442\u0435\u043A\u0441\u0442, \u0432\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u043C\u044B\u0439 \u043A\u043B\u0430\u0432\u0438\u0448\u0435\u0439 TAB","\u0421\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u043F\u043E\u0434\u0430\u0432\u043B\u044F\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u044D\u0442\u043E\u0442 \u0430\u0441\u043F\u0435\u043A\u0442 \u0432 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0438 \u0441 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u043A\u043E\u0439 \u0441\u043F\u0435\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0445 \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u0435\u0439 ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430.","{0} ({1})","\u041D\u0430\u0437\u0430\u0434","\u0414\u0430\u043B\u0435\u0435"],"vs/editor/contrib/lineSelection/browser/lineSelection":["\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0441\u0442\u0440\u043E\u043A\u0438"],"vs/editor/contrib/linesOperations/browser/linesOperations":["\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u0432\u0435\u0440\u0445\u0443","&&\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0443 \u0432\u044B\u0448\u0435","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0441\u043D\u0438\u0437\u0443","\u041A\u043E\u043F\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0443 &&\u043D\u0438\u0436\u0435","\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435","&&\u0414\u0443\u0431\u043B\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435","\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0432\u0432\u0435\u0440\u0445","\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u043D\u0430 \u0441&&\u0442\u0440\u043E\u043A\u0443 \u0432\u044B\u0448\u0435","\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0432\u043D\u0438\u0437","&&\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0443 \u043D\u0438\u0436\u0435","\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0441\u0442\u0440\u043E\u043A \u043F\u043E \u0432\u043E\u0437\u0440\u0430\u0441\u0442\u0430\u043D\u0438\u044E","\u0421\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u043A\u0430 \u0441\u0442\u0440\u043E\u043A \u043F\u043E \u0443\u0431\u044B\u0432\u0430\u043D\u0438\u044E","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0434\u0443\u0431\u043B\u0438\u0440\u0443\u044E\u0449\u0438\u0435\u0441\u044F \u0441\u0442\u0440\u043E\u043A\u0438","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u043E\u043D\u0435\u0447\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B-\u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u0438","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443","\u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F","\u0423\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C \u043E\u0442\u0441\u0442\u0443\u043F","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u0432\u044B\u0448\u0435","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0443 \u043D\u0438\u0436\u0435","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0441\u043B\u0435\u0432\u0430","\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0432\u0441\u0435 \u0441\u043F\u0440\u0430\u0432\u0430","_\u041E\u0431\u044A\u0435\u0434\u0438\u043D\u0438\u0442\u044C \u0441\u0442\u0440\u043E\u043A\u0438","\u0422\u0440\u0430\u043D\u0441\u043F\u043E\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0432\u043E\u043A\u0440\u0443\u0433 \u043A\u0443\u0440\u0441\u043E\u0440\u0430","\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0432\u0435\u0440\u0445\u043D\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440","\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u043D\u0438\u0436\u043D\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440","\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u0437\u0430\u0433\u043B\u0430\u0432\u043D\u044B\u0435 \u0431\u0443\u043A\u0432\u044B","\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u043D\u0430\u043F\u0438\u0441\u0430\u043D\u0438\u0435 \u0441 \u043F\u043E\u0434\u0447\u0435\u0440\u043A\u0438\u0432\u0430\u043D\u0438\u044F\u043C\u0438",'\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0432 "\u0432\u0435\u0440\u0431\u043B\u044E\u0436\u0438\u0439" \u0441\u0442\u0438\u043B\u044C',"\u041F\u0440\u0435\u043E\u0431\u0440\u0430\u0437\u043E\u0432\u0430\u0442\u044C \u0432 \u043A\u0435\u0431\u0430\u0431-\u043A\u0435\u0439\u0441"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["\u0417\u0430\u043F\u0443\u0441\u0442\u0438\u0442\u044C \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u043E\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u0438\u0435","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u0440\u0438 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u043C \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0438 \u0442\u0438\u043F\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u043E\u043C."],"vs/editor/contrib/links/browser/links":["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443, \u0442\u0430\u043A \u043A\u0430\u043A \u043E\u043D\u0430 \u0438\u043C\u0435\u0435\u0442 \u043D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0439 \u0444\u043E\u0440\u043C\u0430\u0442: {0}","\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443, \u0443 \u043D\u0435\u0435 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043B\u0435\u0432\u043E\u0439 \u043E\u0431\u044A\u0435\u043A\u0442.","\u0412\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443","\u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u043F\u043E \u0441\u0441\u044B\u043B\u043A\u0435","\u041A\u043D\u043E\u043F\u043A\u0430 CMD \u0438 \u0449\u0435\u043B\u0447\u043E\u043A \u043B\u0435\u0432\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u043E\u0439 \u043C\u044B\u0448\u0438","\u041A\u043D\u043E\u043F\u043A\u0430 CTRL \u0438 \u0449\u0435\u043B\u0447\u043E\u043A \u043B\u0435\u0432\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u043E\u0439 \u043C\u044B\u0448\u0438","\u041A\u043D\u043E\u043F\u043A\u0430 OPTION \u0438 \u0449\u0435\u043B\u0447\u043E\u043A \u043B\u0435\u0432\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u043E\u0439 \u043C\u044B\u0448\u0438","\u041A\u043D\u043E\u043F\u043A\u0430 ALT \u0438 \u0449\u0435\u043B\u0447\u043E\u043A \u043B\u0435\u0432\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u043E\u0439 \u043C\u044B\u0448\u0438","\u0412\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B {0}","\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0441\u044B\u043B\u043A\u0443"],"vs/editor/contrib/message/browser/messageController":["\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0435\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435"],"vs/editor/contrib/multicursor/browser/multicursor":["\u041A\u0443\u0440\u0441\u043E\u0440 \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D: {0}","\u041A\u0443\u0440\u0441\u043E\u0440\u044B \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u044B: {0}","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440 \u0432\u044B\u0448\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440 &&\u0432\u044B\u0448\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440 \u043D\u0438\u0436\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440 &&\u043D\u0438\u0436\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440\u044B \u043A \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F\u043C \u0441\u0442\u0440\u043E\u043A","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440\u044B \u0432 &&\u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440\u044B \u043D\u0438\u0436\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043A\u0443\u0440\u0441\u043E\u0440\u044B \u0432\u044B\u0448\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C &&\u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 \u0432 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435","\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C &&\u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u0435","\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0432 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435","\u041F\u0435\u0440\u0435\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0439 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442 \u0432 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u043E\u0435 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0435","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 \u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u044F \u043D\u0430\u0439\u0434\u0435\u043D\u043D\u044B\u0445 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0432\u0441\u0435 &&\u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u044F","\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u0432\u0441\u0435 \u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u044F","\u0424\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u043A\u0430 \u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u0435","\u0424\u043E\u043A\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u0435","\u0424\u043E\u043A\u0443\u0441\u0438\u0440\u043E\u0432\u043A\u0430 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u0435","\u0424\u043E\u043A\u0443\u0441\u0438\u0440\u0443\u0435\u0442\u0441\u044F \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C \u043A\u0443\u0440\u0441\u043E\u0440\u0435"],"vs/editor/contrib/parameterHints/browser/parameterHints":["\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u043A \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430\u043C"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430.","{0}, \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0435","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u0432 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430."],"vs/editor/contrib/peekView/browser/peekView":["\u0412\u0441\u0442\u0440\u043E\u0435\u043D \u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043A\u043E\u0434\u0430 \u0432 \u043E\u043A\u043D\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430","\u0417\u0430\u043A\u0440\u044B\u0442\u044C","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u0439 \u043E \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u0438 \u043C\u0430\u0441\u0441\u0438\u0432\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0443\u0437\u043B\u043E\u0432 \u0441\u0442\u0440\u043E\u043A\u0438 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0443\u0437\u043B\u043E\u0432 \u0444\u0430\u0439\u043B\u0430 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u043B\u044F \u0432 \u043E\u043A\u043D\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0432 \u043E\u043A\u043D\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0413\u0440\u0430\u043D\u0438\u0446\u0430 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u0432 \u0431\u044B\u0441\u0442\u0440\u043E\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435."],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["\u0427\u0442\u043E\u0431\u044B \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u043E\u043A\u0435, \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440.","\u041F\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043A \u0441\u0442\u0440\u043E\u043A\u0435 {0} \u0438 \u0441\u0442\u043E\u043B\u0431\u0446\u0443 {1}.","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u043E\u043A\u0435 {0}.","\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: {0}, \u0441\u0438\u043C\u0432\u043E\u043B: {1}. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440 \u0441\u0442\u0440\u043E\u043A\u0438 \u043C\u0435\u0436\u0434\u0443 1 \u0438 {2} \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430.","\u0422\u0435\u043A\u0443\u0449\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: {0}, \u0441\u0438\u043C\u0432\u043E\u043B: {1}. \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u043C\u0435\u0440 \u0441\u0442\u0440\u043E\u043A\u0438 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430."],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["\u0427\u0442\u043E\u0431\u044B \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0438\u043C\u0432\u043E\u043B\u0443, \u0441\u043D\u0430\u0447\u0430\u043B\u0430 \u043E\u0442\u043A\u0440\u043E\u0439\u0442\u0435 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0441 \u0441\u0438\u043C\u0432\u043E\u043B\u044C\u043D\u043E\u0439 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0435\u0439.","\u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u043D\u0435 \u043F\u0440\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u044C\u043D\u0443\u044E \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044E.","\u041D\u0435\u0442 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u044E\u0449\u0438\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u041D\u0435\u0442 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430","\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0431\u043E\u043A\u0443","\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u043D\u0438\u0437\u0443","\u0441\u0438\u043C\u0432\u043E\u043B\u044B ({0})","\u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 ({0})","\u043C\u0435\u0442\u043E\u0434\u044B ({0})","\u0444\u0443\u043D\u043A\u0446\u0438\u0438 ({0})","\u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u044B ({0})","\u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 ({0})","\u043A\u043B\u0430\u0441\u0441\u044B ({0})","\u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u044B ({0})","\u0441\u043E\u0431\u044B\u0442\u0438\u044F ({0})","\u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u044B ({0})","\u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u044B ({0})","\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430 \u0438\u043C\u0435\u043D ({0})","\u043F\u0430\u043A\u0435\u0442\u044B ({0})","\u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0442\u0438\u043F\u0430 ({0})","\u043C\u043E\u0434\u0443\u043B\u0438 ({0})","\u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 ({0})","\u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F ({0})","\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0435\u043D\u0438\u044F ({0})","\u0441\u0442\u0440\u043E\u043A\u0438 ({0})","\u0444\u0430\u0439\u043B\u044B ({0})","\u043C\u0430\u0441\u0441\u0438\u0432\u044B ({0})","\u0447\u0438\u0441\u043B\u0430 ({0})","\u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u0438\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F ({0})","\u043E\u0431\u044A\u0435\u043A\u0442\u044B ({0})","\u043A\u043B\u044E\u0447\u0438 ({0})","\u043F\u043E\u043B\u044F ({0})","\u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u044B ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["\u041D\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044F \u0432\u043D\u0435\u0441\u0442\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432\u043E \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F","\u041D\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044F \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0435 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u0434\u043B\u044F \u0447\u0442\u0435\u043D\u0438\u044F"],"vs/editor/contrib/rename/browser/rename":["\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442.","\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043D\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043D\u0430\u044F \u043E\u0448\u0438\u0431\u043A\u0430 \u043F\u0440\u0438 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0438 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u043E\u0441\u043B\u0435 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u044F",'\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 "{0}" \u0432 "{1}"',"\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 {0} \u0432 {1}","\xAB{0}\xBB \u0443\u0441\u043F\u0435\u0448\u043D\u043E \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D \u0432 \xAB{1}\xBB. \u0421\u0432\u043E\u0434\u043A\u0430: {2}","\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0440\u0430\u0432\u043A\u0438","\u041E\u043F\u0435\u0440\u0430\u0446\u0438\u0438 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0432\u044B\u0447\u0438\u0441\u043B\u0438\u0442\u044C \u043F\u0440\u0430\u0432\u043A\u0438","\u041F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u0442\u044C \u0441\u0438\u043C\u0432\u043E\u043B","\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C/\u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\u0441\u0442\u044C \u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043F\u0435\u0440\u0435\u0434 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435\u043C"],"vs/editor/contrib/rename/browser/renameInputField":["\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u044F \u0432\u0445\u043E\u0434\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043D\u043E\u0432\u043E\u0435 \u0438\u043C\u044F \u0434\u043B\u044F \u0432\u0445\u043E\u0434\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445 \u0438 \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0443 \u0412\u0412\u041E\u0414 \u0434\u043B\u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F.","\u041D\u0430\u0436\u043C\u0438\u0442\u0435 {0} \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u044F, {1} \u0434\u043B\u044F \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430."],"vs/editor/contrib/smartSelect/browser/smartSelect":["\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u0439 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442","&&\u0420\u0430\u0437\u0432\u0435\u0440\u043D\u0443\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435","\u0423\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442","&&\u0421\u0436\u0430\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435"],"vs/editor/contrib/snippet/browser/snippetController2":["\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440 \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432","\u0423\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043B\u0438 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0430\u044F \u043F\u043E\u0437\u0438\u0446\u0438\u044F \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432","\u0423\u043A\u0430\u0437\u044B\u0432\u0430\u0435\u0442, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043B\u0438 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0430\u044F \u043F\u043E\u0437\u0438\u0446\u0438\u044F \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u0432","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C\u0443 \u0437\u0430\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044E..."],"vs/editor/contrib/snippet/browser/snippetVariables":["\u0432\u043E\u0441\u043A\u0440\u0435\u0441\u0435\u043D\u044C\u0435","\u043F\u043E\u043D\u0435\u0434\u0435\u043B\u044C\u043D\u0438\u043A","\u0432\u0442\u043E\u0440\u043D\u0438\u043A","\u0441\u0440\u0435\u0434\u0430","\u0447\u0435\u0442\u0432\u0435\u0440\u0433","\u043F\u044F\u0442\u043D\u0438\u0446\u0430","\u0441\u0443\u0431\u0431\u043E\u0442\u0430","\u0412\u0441","\u041F\u043D","\u0412\u0442","\u0421\u0440","\u0427\u0442","\u041F\u0442","\u0421\u0431","\u042F\u043D\u0432\u0430\u0440\u044C","\u0424\u0435\u0432\u0440\u0430\u043B\u044C","\u041C\u0430\u0440\u0442","\u0410\u043F\u0440\u0435\u043B\u044C","\u041C\u0430\u0439","\u0418\u044E\u043D\u044C","\u0418\u044E\u043B\u044C","\u0410\u0432\u0433\u0443\u0441\u0442","\u0421\u0435\u043D\u0442\u044F\u0431\u0440\u044C","\u041E\u043A\u0442\u044F\u0431\u0440\u044C","\u041D\u043E\u044F\u0431\u0440\u044C","\u0414\u0435\u043A\u0430\u0431\u0440\u044C","\u042F\u043D\u0432","\u0424\u0435\u0432","\u041C\u0430\u0440","\u0410\u043F\u0440","\u041C\u0430\u0439","\u0418\u044E\u043D","\u0418\u044E\u043B","\u0410\u0432\u0433","\u0421\u0435\u043D","\u041E\u043A\u0442","\u041D\u043E\u044F","\u0414\u0435\u043A"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","&&\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","\u0417\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","&&\u0417\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","\u0424\u043E\u043A\u0443\u0441 \u043D\u0430 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","&&\u0424\u043E\u043A\u0443\u0441 \u043D\u0430 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0443\u044E \u0441\u0442\u0440\u043E\u043A\u0443 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u0442\u0440\u043E\u043A\u0435 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438, \u043A\u043E\u0442\u043E\u0440\u0430\u044F \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435","\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440"],"vs/editor/contrib/suggest/browser/suggest":["\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u043A\u0430\u043A\u043E\u0435-\u043B\u0438\u0431\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0432 \u0444\u043E\u043A\u0443\u0441\u0435","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043B\u0438 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u0445","\u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043B\u0438 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0434\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430","\u041F\u0440\u0438\u0432\u043E\u0434\u0438\u0442 \u043B\u0438 \u0432\u0441\u0442\u0430\u0432\u043A\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043A \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044E \u0438\u043B\u0438 \u0432\u0441\u0435 \u0443\u0436\u0435 \u0431\u044B\u043B\u043E \u0432\u0432\u0435\u0434\u0435\u043D\u043E","\u0412\u0441\u0442\u0430\u0432\u043B\u044F\u044E\u0442\u0441\u044F \u043B\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0412\u0412\u041E\u0414",'\u0415\u0441\u0442\u044C \u043B\u0438 \u0443 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u044F "\u0432\u0441\u0442\u0430\u0432\u043A\u0430" \u0438 "\u0437\u0430\u043C\u0435\u043D\u0430"','\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435 \u043F\u043E\u0432\u0435\u0434\u0435\u043D\u0438\u0435\u043C "\u0432\u0441\u0442\u0430\u0432\u043A\u0430" \u0438\u043B\u0438 "\u0437\u0430\u043C\u0435\u043D\u0430"',"\u041F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043B\u0438 \u0442\u0435\u043A\u0443\u0449\u0435\u0435 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u0439"],"vs/editor/contrib/suggest/browser/suggestController":['\u041F\u0440\u0438\u043D\u044F\u0442\u0438\u0435 "{0}" \u043F\u0440\u0438\u0432\u0435\u043B\u043E \u043A \u0432\u043D\u0435\u0441\u0435\u043D\u0438\u044E \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u043F\u0440\u0430\u0432\u043E\u043A ({1})',"\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0435","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C","\u0417\u0430\u043C\u0435\u043D\u0438\u0442\u044C","\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044C","\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043C\u0435\u043D\u044C\u0448\u0435","\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0431\u043E\u043B\u044C\u0448\u0435","\u0421\u0431\u0440\u043E\u0441 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F"],"vs/editor/contrib/suggest/browser/suggestWidget":["\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0437\u043D\u0430\u0447\u043A\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0439 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F \u0432\u044B\u0434\u0435\u043B\u044F\u0435\u0442\u0441\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u0445 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F.","\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430...","\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0442.","\u041F\u0440\u0435\u0434\u043B\u043E\u0436\u0438\u0442\u044C","{0} {1}, {2}","{0} {1}","{0}, {1}","{0}, \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u044B: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["\u0417\u0430\u043A\u0440\u044B\u0442\u044C","\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u0439 \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u041F\u043E\u0434\u0440\u043E\u0431\u043D\u0435\u0435"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043C\u0430\u0441\u0441\u0438\u0432\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u043B\u043E\u0433\u0438\u0447\u0435\u0441\u043A\u0438\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043A\u043B\u0430\u0441\u0441\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0446\u0432\u0435\u0442\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043A\u043E\u043D\u0441\u0442\u0430\u043D\u0442\u044B. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043A\u043E\u043D\u0441\u0442\u0440\u0443\u043A\u0442\u043E\u0440\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0438\u0442\u0435\u043B\u044F. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0447\u043B\u0435\u043D\u0430 \u043F\u0435\u0440\u0435\u0447\u0438\u0441\u043B\u0438\u0442\u0435\u043B\u044F. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0441\u043E\u0431\u044B\u0442\u0438\u044F. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043F\u043E\u043B\u044F. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0444\u0430\u0439\u043B\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043F\u0430\u043F\u043A\u0438. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0444\u0443\u043D\u043A\u0446\u0438\u0438. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0438\u043D\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043A\u043B\u044E\u0447\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043A\u043B\u044E\u0447\u0435\u0432\u043E\u0433\u043E \u0441\u043B\u043E\u0432\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043C\u0435\u0442\u043E\u0434\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043C\u043E\u0434\u0443\u043B\u044F. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0441\u0442\u0432\u0430 \u0438\u043C\u0435\u043D. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 NULL. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0447\u0438\u0441\u043B\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043E\u0431\u044A\u0435\u043A\u0442\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043E\u043F\u0435\u0440\u0430\u0442\u043E\u0440\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043F\u0430\u043A\u0435\u0442\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0441\u0441\u044B\u043B\u043A\u0438. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430 \u043A\u043E\u0434\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0441\u0442\u0440\u043E\u043A\u0438. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u044B. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0442\u0435\u043A\u0441\u0442\u0430. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0442\u0438\u043F\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0435\u0434\u0438\u043D\u0438\u0446. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439. \u042D\u0442\u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u0432 \u0441\u0442\u0440\u0443\u043A\u0442\u0443\u0440\u0435, \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u0439."],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 TAB \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0430\u0435\u0442 \u0444\u043E\u043A\u0443\u0441.","\u041F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 TAB \u0444\u043E\u043A\u0443\u0441 \u043F\u0435\u0440\u0435\u0439\u0434\u0435\u0442 \u043D\u0430 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u044D\u043B\u0435\u043C\u0435\u043D\u0442, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043C\u043E\u0436\u0435\u0442 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C \u0444\u043E\u043A\u0443\u0441","\u0422\u0435\u043F\u0435\u0440\u044C \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 TAB \u0431\u0443\u0434\u0435\u0442 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D \u0441\u0438\u043C\u0432\u043E\u043B \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438"],"vs/editor/contrib/tokenization/browser/tokenization":["\u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A: \u043F\u0440\u0438\u043D\u0443\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u043D\u0430\u044F \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 \u0442\u043E\u043A\u0435\u043D\u043E\u0432"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["\u0417\u043D\u0430\u0447\u043E\u043A, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u044B\u0439 \u0441 \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435\u043C \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u0439.","\u042D\u0442\u043E\u0442 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043C\u043D\u043E\u0433\u043E \u043D\u0435\u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u042E\u043D\u0438\u043A\u043E\u0434\u0430 ASCII","\u042D\u0442\u043E\u0442 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043C\u043D\u043E\u0433\u043E \u043D\u0435\u043E\u0434\u043D\u043E\u0437\u043D\u0430\u0447\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u042E\u043D\u0438\u043A\u043E\u0434\u0430","\u042D\u0442\u043E\u0442 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043C\u043D\u043E\u0433\u043E \u043D\u0435\u0432\u0438\u0434\u0438\u043C\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u042E\u043D\u0438\u043A\u043E\u0434\u0430","\u0421\u0438\u043C\u0432\u043E\u043B {0} \u043C\u043E\u0436\u043D\u043E \u0441\u043F\u0443\u0442\u0430\u0442\u044C \u0441 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C ASCII {1}, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0447\u0430\u0449\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044F \u0432 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u043C \u043A\u043E\u0434\u0435.","\u0421\u0438\u043C\u0432\u043E\u043B {0} \u043C\u043E\u0436\u043D\u043E \u0441\u043F\u0443\u0442\u0430\u0442\u044C \u0441 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C {1}, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0447\u0430\u0449\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044F \u0432 \u0438\u0441\u0445\u043E\u0434\u043D\u043E\u043C \u043A\u043E\u0434\u0435.","\u0421\u0438\u043C\u0432\u043E\u043B {0} \u043D\u0435\u0432\u0438\u0434\u0438\u043C.","\u0421\u0438\u043C\u0432\u043E\u043B {0} \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0431\u0430\u0437\u043E\u0432\u044B\u043C \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C ASCII.","\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0432 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F\u0445","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0432 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u044F\u0445","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0432 \u0441\u0442\u0440\u043E\u043A\u0430\u0445","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0432 \u0441\u0442\u0440\u043E\u043A\u0430\u0445","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0435\u043E\u0434\u043D\u043E\u0437\u043D\u0430\u0447\u043D\u043E\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u043E\u0434\u043D\u043E\u0437\u043D\u0430\u0447\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u043D\u0435\u0432\u0438\u0434\u0438\u043C\u043E\u0435 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u0432\u0438\u0434\u0438\u043C\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435, \u043E\u0442\u043B\u0438\u0447\u043D\u043E\u0435 \u043E\u0442 ASCII","\u041E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043D\u0435\u0441\u0442\u0430\u043D\u0434\u0430\u0440\u0442\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 ASCII","\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F","\u0418\u0441\u043A\u043B\u044E\u0447\u0438\u0442\u044C {0} (\u043D\u0435\u0432\u0438\u0434\u0438\u043C\u044B\u0439 \u0441\u0438\u043C\u0432\u043E\u043B) \u0438\u0437 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F","\u0418\u0441\u043A\u043B\u044E\u0447\u0438\u0442\u044C {0} \u0438\u0437 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F",'\u0420\u0430\u0437\u0440\u0435\u0448\u0438\u0442\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u042E\u043D\u0438\u043A\u043E\u0434\u0430, \u0431\u043E\u043B\u0435\u0435 \u0440\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u0435\u043D\u043D\u044B\u0435 \u0432 \u044F\u0437\u044B\u043A\u0435 "{0}".',"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u042E\u043D\u0438\u043A\u043E\u0434\u0430"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["\u041D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438","\u041E\u0431\u043D\u0430\u0440\u0443\u0436\u0435\u043D\u044B \u043D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438",`\u0424\u0430\u0439\u043B "{0}" \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u0442 \u043E\u0434\u0438\u043D \u0438\u043B\u0438 \u043D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u043D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438, \u0442\u0430\u043A\u0438\u0445 \u043A\u0430\u043A \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u0441\u0442\u0440\u043E\u043A (LS) \u0438\u043B\u0438 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044C \u0430\u0431\u0437\u0430\u0446\u0435\u0432 (PS).\r -\r -\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F \u0443\u0434\u0430\u043B\u0438\u0442\u044C \u0438\u0445 \u0438\u0437 \u0444\u0430\u0439\u043B\u0430. \u0423\u0434\u0430\u043B\u0435\u043D\u0438\u0435 \u044D\u0442\u0438\u0445 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u043C\u043E\u0436\u043D\u043E \u043D\u0430\u0441\u0442\u0440\u043E\u0438\u0442\u044C \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 "editor.unusualLineTerminators".`,"&&\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043D\u0435\u043E\u0431\u044B\u0447\u043D\u044B\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0441\u0442\u0440\u043E\u043A\u0438","\u041F\u0440\u043E\u043F\u0443\u0441\u0442\u0438\u0442\u044C"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0441\u0438\u043C\u0432\u043E\u043B\u0430 \u043F\u0440\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0435 \u043D\u0430 \u0447\u0442\u0435\u043D\u0438\u0435, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043F\u0440\u0438 \u0447\u0442\u0435\u043D\u0438\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u0430 \u0432\u043E \u0432\u0440\u0435\u043C\u044F \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043D\u0430 \u0437\u0430\u043F\u0438\u0441\u044C, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 \u043F\u0440\u0438 \u0437\u0430\u043F\u0438\u0441\u0438 \u0432 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u0443\u044E. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u043E\u0433\u043E \u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u0430. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0441\u0438\u043C\u0432\u043E\u043B\u0430 \u043F\u0440\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0435 \u043D\u0430 \u0447\u0442\u0435\u043D\u0438\u0435, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043F\u0440\u0438 \u0441\u0447\u0438\u0442\u044B\u0432\u0430\u043D\u0438\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0441\u0438\u043C\u0432\u043E\u043B\u0430 \u043F\u0440\u0438 \u0434\u043E\u0441\u0442\u0443\u043F\u0435 \u043D\u0430 \u0437\u0430\u043F\u0438\u0441\u044C, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043F\u0440\u0438 \u0437\u0430\u043F\u0438\u0441\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u043E\u0439. ","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u043E\u0433\u043E \u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u0430.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043D\u0430 \u0437\u0430\u043F\u0438\u0441\u044C. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u043E\u0433\u043E \u0432\u0445\u043E\u0436\u0434\u0435\u043D\u0438\u044F \u0441\u0438\u043C\u0432\u043E\u043B\u0430. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F."],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C\u0443 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044E \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432","\u041F\u0435\u0440\u0435\u0439\u0442\u0438 \u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044E \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432","\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"],"vs/editor/contrib/wordOperations/browser/wordOperations":["\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0441\u043B\u043E\u0432\u043E"],"vs/platform/action/common/actionCommonCategories":["\u041F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435","\u0421\u043F\u0440\u0430\u0432\u043A\u0430","\u0422\u0435\u0441\u0442","\u0424\u0430\u0439\u043B","\u041F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B","\u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0447\u0438\u043A"],"vs/platform/actionWidget/browser/actionList":["{0}, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C, {1} \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0433\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430","{0}, \u0447\u0442\u043E\u0431\u044B \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C","{0}, \u043F\u0440\u0438\u0447\u0438\u043D\u0430 \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F: {1}","\u041C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439"],"vs/platform/actionWidget/browser/actionWidget":["\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043D\u0430 \u043F\u0430\u043D\u0435\u043B\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439.","\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043B\u0438 \u0441\u043F\u0438\u0441\u043E\u043A \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439","\u0421\u043A\u0440\u044B\u0442\u044C \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435","\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435","\u041F\u0440\u0438\u043D\u044F\u0442\u044C \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435","\u041F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["\u0421\u043A\u0440\u044B\u0442\u044C","\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C \u043C\u0435\u043D\u044E"],"vs/platform/actions/common/menuService":['\u0421\u043A\u0440\u044B\u0442\u044C "{0}"'],"vs/platform/audioCues/browser/audioCueService":["\u041E\u0448\u0438\u0431\u043A\u0430 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435","\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435","\u0421\u043B\u043E\u0436\u0435\u043D\u043D\u0430\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u0432 \u0441\u0442\u0440\u043E\u043A\u0435","\u0422\u043E\u0447\u043A\u0430 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0430 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435","\u0412\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u0430\u044F \u0440\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u044F \u0432 \u0441\u0442\u0440\u043E\u043A\u0435","\u0411\u044B\u0441\u0442\u0440\u043E\u0435 \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430","\u041E\u0442\u043B\u0430\u0434\u0447\u0438\u043A \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D \u0432 \u0442\u043E\u0447\u043A\u0435 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0430","\u041E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A \u0432 \u0441\u0442\u0440\u043E\u043A\u0435","\u0417\u0430\u0434\u0430\u0447\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430","\u0421\u0431\u043E\u0439 \u0437\u0430\u0434\u0430\u0447\u0438","\u0421\u0431\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430","\u0417\u0432\u043E\u043D\u043E\u043A \u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B\u0430","\u042F\u0447\u0435\u0439\u043A\u0430 \u0437\u0430\u043F\u0438\u0441\u043D\u043E\u0439 \u043A\u043D\u0438\u0436\u043A\u0438 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0430","\u0421\u0431\u043E\u0439 \u044F\u0447\u0435\u0439\u043A\u0438 \u0437\u0430\u043F\u0438\u0441\u043D\u043E\u0439 \u043A\u043D\u0438\u0436\u043A\u0438","\u0412\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0430 \u0440\u0430\u0437\u043D\u043E\u0441\u0442\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430","\u0423\u0434\u0430\u043B\u0435\u043D\u0430 \u0440\u0430\u0437\u043D\u043E\u0441\u0442\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430","\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0430 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u0439","\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0437\u0430\u043F\u0440\u043E\u0441 \u043D\u0430 \u0447\u0430\u0442","\u041F\u043E\u043B\u0443\u0447\u0435\u043D \u043E\u0442\u0432\u0435\u0442 \u0447\u0430\u0442\u0430","\u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043E\u0442\u0432\u0435\u0442\u0430 \u0447\u0430\u0442\u0430"],"vs/platform/configuration/common/configurationRegistry":["\u041F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u044F\u0437\u044B\u043A\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E","\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0445 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0434\u043B\u044F \u044F\u0437\u044B\u043A\u0430 {0}.","\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0445 \u0434\u043B\u044F \u044F\u0437\u044B\u043A\u0430.","\u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u0434\u043B\u044F \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0445 \u044F\u0437\u044B\u043A\u043E\u0432.","\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0445 \u0434\u043B\u044F \u044F\u0437\u044B\u043A\u0430.","\u042D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0443 \u0434\u043B\u044F \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0445 \u044F\u0437\u044B\u043A\u043E\u0432.","\u041D\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044F \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u043F\u0443\u0441\u0442\u043E\u0435 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u043E",`\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C "{0}". \u041E\u043D\u043E \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u0430 '\\\\[.*\\\\]$' \u0434\u043B\u044F \u043E\u043F\u0438\u0441\u0430\u043D\u0438\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u043C\u044B\u0445 \u044F\u0437\u044B\u043A\u043E\u043C. \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 configurationDefaults.`,'\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C "{0}". \u042D\u0442\u043E \u0441\u0432\u043E\u0439\u0441\u0442\u0432\u043E \u0443\u0436\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D\u043E.','\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C "{0}". \u0423\u0436\u0435 \u0438\u043C\u0435\u0435\u0442\u0441\u044F \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044F {2} \u0434\u043B\u044F \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u043E\u0439 \u043F\u043E\u043B\u0438\u0442\u0438\u043A\u0438 {1}.'],"vs/platform/contextkey/browser/contextKeyService":["\u041A\u043E\u043C\u0430\u043D\u0434\u0430, \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u044E\u0449\u0430\u044F \u0441\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043E \u043A\u043B\u044E\u0447\u0430\u0445 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430"],"vs/platform/contextkey/common/contextkey":["\u041F\u0443\u0441\u0442\u043E\u0435 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435 \u043A\u043B\u044E\u0447\u0430 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430",'\u0412\u044B \u0437\u0430\u0431\u044B\u043B\u0438 \u0437\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u0435? \u0412\u044B \u0442\u0430\u043A\u0436\u0435 \u043C\u043E\u0436\u0435\u0442\u0435 \u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C "false" \u0438\u043B\u0438 "true", \u0447\u0442\u043E\u0431\u044B \u0432\u0441\u0435\u0433\u0434\u0430 \u043E\u0446\u0435\u043D\u0438\u0432\u0430\u0442\u044C \u043F\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044E false \u0438\u043B\u0438 true \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E.','"in" \u043F\u043E\u0441\u043B\u0435 "not".','\u0437\u0430\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0430\u044F \u043A\u0440\u0443\u0433\u043B\u0430\u044F \u0441\u043A\u043E\u0431\u043A\u0430 ")"',"\u041D\u0435\u043F\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u043D\u043D\u044B\u0439 \u043C\u0430\u0440\u043A\u0435\u0440","\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0432\u044B \u0437\u0430\u0431\u044B\u043B\u0438 \u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C && \u0438\u043B\u0438 || \u043F\u0435\u0440\u0435\u0434 \u043C\u0430\u0440\u043A\u0435\u0440\u043E\u043C?","\u041D\u0435\u043E\u0436\u0438\u0434\u0430\u043D\u043D\u044B\u0439 \u043A\u043E\u043D\u0435\u0446 \u0432\u044B\u0440\u0430\u0436\u0435\u043D\u0438\u044F","\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E, \u0432\u044B \u0437\u0430\u0431\u044B\u043B\u0438 \u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u044C \u043A\u043B\u044E\u0447 \u043A\u043E\u043D\u0442\u0435\u043A\u0441\u0442\u0430?",`\u041E\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044F: {0}\r -\u041F\u043E\u043B\u0443\u0447\u0435\u043D\u043E: "{1}".`],"vs/platform/contextkey/common/contextkeys":["\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043B\u0438 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430 macOS","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043B\u0438 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430 Linux","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043B\u0438 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430 Windows","\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043D\u043E\u0439","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043B\u0438 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430 macOS \u043D\u0430 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0435, \u043E\u0442\u043B\u0438\u0447\u043D\u043E\u0439 \u043E\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043D\u043E\u0439","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043B\u0438 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u043E\u043D\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430 IOS","\u042F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043B\u0438 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0430 \u043C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u043C \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043E\u043C","\u0422\u0438\u043F \u043A\u0430\u0447\u0435\u0441\u0442\u0432\u0430 VS Code","\u041D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0432 \u043F\u043E\u043B\u0435 \u0432\u0432\u043E\u0434\u0430"],"vs/platform/contextkey/common/scanner":["\u0412\u044B \u0438\u043C\u0435\u043B\u0438 \u0432 \u0432\u0438\u0434\u0443 {0}?","\u0412\u044B \u0438\u043C\u0435\u043B\u0438 \u0432 \u0432\u0438\u0434\u0443 {0} \u0438\u043B\u0438 {1}?","\u0412\u044B \u0438\u043C\u0435\u043B\u0438 \u0432 \u0432\u0438\u0434\u0443 {0}, {1} \u0438\u043B\u0438 {2}?","\u0412\u044B \u0437\u0430\u0431\u044B\u043B\u0438 \u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0438\u043B\u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u044C \u0446\u0438\u0442\u0430\u0442\u0443?",'\u0412\u044B \u0437\u0430\u0431\u044B\u043B\u0438 \u044D\u043A\u0440\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0441\u0438\u043C\u0432\u043E\u043B "/" (\u043A\u043E\u0441\u0430\u044F \u0447\u0435\u0440\u0442\u0430)? \u0427\u0442\u043E\u0431\u044B \u044D\u043A\u0440\u0430\u043D\u0438\u0440\u043E\u0432\u0430\u0442\u044C, \u043F\u043E\u043C\u0435\u0441\u0442\u0438\u0442\u0435 \u043F\u0435\u0440\u0435\u0434 \u0441\u0438\u043C\u0432\u043E\u043B\u043E\u043C \u0434\u0432\u0435 \u043E\u0431\u0440\u0430\u0442\u043D\u044B\u0435 \u043A\u043E\u0441\u044B\u0435 \u0447\u0435\u0440\u0442\u044B, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 "\\\\/".'],"vs/platform/history/browser/contextScopedHistoryWidget":["\u041E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0442\u0441\u044F \u043B\u0438 \u043F\u0440\u0435\u0434\u043B\u043E\u0436\u0435\u043D\u0438\u044F"],"vs/platform/keybinding/common/abstractKeybindingService":["\u0411\u044B\u043B\u0430 \u043D\u0430\u0436\u0430\u0442\u0430 \u043A\u043B\u0430\u0432\u0438\u0448\u0430 {0}. \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043D\u0430\u0436\u0430\u0442\u0438\u044F \u0432\u0442\u043E\u0440\u043E\u0439 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F...","\u0411\u044B\u043B\u0430 \u043D\u0430\u0436\u0430\u0442\u0430 \u043A\u043B\u0430\u0432\u0438\u0448\u0430 ({0}). \u041E\u0436\u0438\u0434\u0430\u043D\u0438\u0435 \u043D\u0430\u0436\u0430\u0442\u0438\u044F \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0439 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F...","\u0421\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448 ({0} \u0438 {1}) \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439.","\u0421\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u0435 \u043A\u043B\u0430\u0432\u0438\u0448 ({0} \u0438 {1}) \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u043E\u0439."],"vs/platform/list/browser/listService":["\u0420\u0430\u0431\u043E\u0447\u0435\u0435 \u043C\u0435\u0441\u0442\u043E","\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 CTRL \u0432 Windows \u0438 Linux \u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 COMMAND \u0432 macOS.","\u0421\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 ALT \u0432 Windows \u0438 Linux \u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0435 OPTION \u0432 macOS.",'\u041C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0432 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445 \u0438 \u0441\u043F\u0438\u0441\u043A\u0430\u0445 \u0432 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 \u043C\u043D\u043E\u0436\u0435\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043C\u044B\u0448\u0438 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0432 \u043F\u0440\u043E\u0432\u043E\u0434\u043D\u0438\u043A\u0435, \u0432 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430\u0445 \u0438 \u0432 \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0438 scm). \u0416\u0435\u0441\u0442\u044B \u043C\u044B\u0448\u0438 "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u0431\u043E\u043A\u0443" (\u0435\u0441\u043B\u0438 \u043E\u043D\u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442\u0441\u044F) \u0431\u0443\u0434\u0443\u0442 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B \u0442\u0430\u043A\u0438\u043C \u043E\u0431\u0440\u0430\u0437\u043E\u043C, \u0447\u0442\u043E\u0431\u044B \u043E\u043D\u0438 \u043D\u0435 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u043E\u0432\u0430\u043B\u0438 \u0441 \u043C\u043E\u0434\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 \u043C\u043D\u043E\u0436\u0435\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430.',"\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043A\u0430\u043A \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0432 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445 \u0438 \u0441\u043F\u0438\u0441\u043A\u0430\u0445 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043C\u044B\u0448\u0438 (\u0435\u0441\u043B\u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F). \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435, \u0447\u0442\u043E \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043C\u043E\u0436\u0435\u0442 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445 \u0438 \u0441\u043F\u0438\u0441\u043A\u0430\u0445, \u0435\u0441\u043B\u0438 \u043E\u043D \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u043A \u043D\u0438\u043C.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044E\u0442 \u043B\u0438 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u0443\u044E \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0443 \u0441\u043F\u0438\u0441\u043A\u0438 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u044F \u043D\u0430 \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435. \u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435! \u0412\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u044D\u0442\u043E\u0433\u043E \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u043C\u043E\u0436\u0435\u0442 \u043F\u043E\u0432\u043B\u0438\u044F\u0442\u044C \u043D\u0430 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u0441\u043B\u0435\u0434\u0443\u0435\u0442 \u043B\u0438 \u0449\u0435\u043B\u043A\u0430\u0442\u044C \u043F\u043E\u043B\u043E\u0441\u0443 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u043F\u043E\u0441\u0442\u0440\u0430\u043D\u0438\u0447\u043D\u043E.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043E\u0442\u0441\u0442\u0443\u043F \u0434\u043B\u044F \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u043F\u0438\u043A\u0441\u0435\u043B\u044F\u0445.","\u041E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442, \u043D\u0443\u0436\u043D\u043E \u043B\u0438 \u0432 \u0434\u0435\u0440\u0435\u0432\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0435 \u043E\u0442\u0441\u0442\u0443\u043F\u0430.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u043B\u0438 \u043F\u043B\u0430\u0432\u043D\u0430\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0430 \u0434\u043B\u044F \u0441\u043F\u0438\u0441\u043A\u043E\u0432 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u0435\u0432.","\u041C\u043D\u043E\u0436\u0438\u0442\u0435\u043B\u044C, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 deltaX \u0438 deltaY \u0441\u043E\u0431\u044B\u0442\u0438\u0439 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u043A\u043E\u043B\u0435\u0441\u0438\u043A\u0430 \u043C\u044B\u0448\u0438.","\u041A\u043E\u044D\u0444\u0444\u0438\u0446\u0438\u0435\u043D\u0442 \u0443\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u0438\u044F \u0441\u043A\u043E\u0440\u043E\u0441\u0442\u0438 \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043A\u043B\u0430\u0432\u0438\u0448\u0438 ALT.","\u041F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u0432\u044B\u0434\u0435\u043B\u044F\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B. \u041F\u0440\u0438 \u0434\u0430\u043B\u044C\u043D\u0435\u0439\u0448\u0435\u0439 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432\u0432\u0435\u0440\u0445 \u0438 \u0432\u043D\u0438\u0437 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u043E\u0431\u0445\u043E\u0434 \u0442\u043E\u043B\u044C\u043A\u043E \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432.","\u0424\u0438\u043B\u044C\u0442\u0440\u0443\u0439\u0442\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0440\u0435\u0436\u0438\u043C\u043E\u043C \u043F\u043E\u0438\u0441\u043A\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0434\u043B\u044F \u0441\u043F\u0438\u0441\u043A\u043E\u0432 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u0435\u0432 \u0432 Workbench.","\u041F\u0440\u043E \u043F\u0440\u043E\u0441\u0442\u043E\u0439 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0432\u044B\u0431\u0438\u0440\u0430\u044E\u0442\u0441\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0432\u0432\u043E\u0434\u0438\u043C\u044B\u043C \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0434\u0430\u043D\u043D\u044B\u043C. \u0421\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u043E \u043F\u0440\u0435\u0444\u0438\u043A\u0441\u0430\u043C.","\u0424\u0443\u043D\u043A\u0446\u0438\u044F \u043F\u043E\u0434\u0441\u0432\u0435\u0442\u043A\u0438 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0432\u044B\u0434\u0435\u043B\u044F\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0432\u0432\u043E\u0434\u0438\u043C\u044B\u043C \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0434\u0430\u043D\u043D\u044B\u043C. \u041F\u0440\u0438 \u0434\u0430\u043B\u044C\u043D\u0435\u0439\u0448\u0435\u0439 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0432\u0432\u0435\u0440\u0445 \u0438 \u0432\u043D\u0438\u0437 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u043E\u0431\u0445\u043E\u0434 \u0442\u043E\u043B\u044C\u043A\u043E \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432.","\u0424\u0438\u043B\u044C\u0442\u0440 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u043F\u043E\u0437\u0432\u043E\u043B\u044F\u0435\u0442 \u043E\u0442\u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u0442\u044C \u0438 \u0441\u043A\u0440\u044B\u0442\u044C \u0432\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u043D\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0432\u0432\u043E\u0434\u0438\u043C\u044B\u043C \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0434\u0430\u043D\u043D\u044B\u043C.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0441\u0442\u0438\u043B\u0435\u043C \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B \u0434\u043B\u044F \u0441\u043F\u0438\u0441\u043A\u043E\u0432 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u0435\u0432 \u0432 Workbench. \u0414\u043E\u0441\u0442\u0443\u043F\u0435\u043D \u043F\u0440\u043E\u0441\u0442\u043E\u0439 \u0440\u0435\u0436\u0438\u043C, \u0440\u0435\u0436\u0438\u043C \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0438 \u0440\u0435\u0436\u0438\u043C \u0444\u0438\u043B\u044C\u0442\u0440\u0430\u0446\u0438\u0438.",'\u0412\u043C\u0435\u0441\u0442\u043E \u044D\u0442\u043E\u0433\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0439\u0442\u0435 "workbench.list.defaultFindMode" \u0438 "workbench.list.typeNavigationMode".',"\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043D\u0435\u0447\u0435\u0442\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435.","\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C \u043D\u0435\u043F\u0440\u0435\u0440\u044B\u0432\u043D\u043E\u0435 \u0441\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0438\u043F\u043E\u043C \u0441\u043E\u043F\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u043C \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435 \u0441\u043F\u0438\u0441\u043A\u043E\u0432 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u0435\u0432 \u0432 Workbench.","\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0442\u0435\u043C, \u043A\u0430\u043A \u043F\u0430\u043F\u043A\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 \u0440\u0430\u0437\u0432\u043E\u0440\u0430\u0447\u0438\u0432\u0430\u044E\u0442\u0441\u044F \u043F\u0440\u0438 \u043D\u0430\u0436\u0430\u0442\u0438\u0438 \u043D\u0430 \u0438\u043C\u0435\u043D\u0430 \u043F\u0430\u043F\u043E\u043A. \u041E\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043D\u0438\u043C\u0430\u043D\u0438\u0435, \u0447\u0442\u043E \u044D\u0442\u043E\u0442 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043C\u043E\u0436\u0435\u0442 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0432 \u043D\u0435\u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445 \u0438 \u0441\u043F\u0438\u0441\u043A\u0430\u0445, \u0435\u0441\u043B\u0438 \u043E\u043D \u043D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u043A \u043D\u0438\u043C.",'\u0423\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442 \u0440\u0430\u0431\u043E\u0442\u043E\u0439 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438 \u043F\u043E \u0442\u0438\u043F\u0430\u043C \u0432 \u0441\u043F\u0438\u0441\u043A\u0430\u0445 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u0441\u0440\u0435\u0434\u0435. \u0415\u0441\u043B\u0438 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u043E \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 "trigger", \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044F \u043F\u043E \u0442\u0438\u043F\u0443 \u043D\u0430\u0447\u0438\u043D\u0430\u0435\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u0437\u0430\u043F\u0443\u0441\u043A\u0430 \u043A\u043E\u043C\u0430\u043D\u0434\u044B "list.triggerTypeNavigation".'],"vs/platform/markers/common/markers":["\u041E\u0448\u0438\u0431\u043A\u0430","\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435","\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F"],"vs/platform/quickinput/browser/commandsQuickAccess":["\u043D\u0435\u0434\u0430\u0432\u043D\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u044B\u0435","\u043F\u043E\u0445\u043E\u0436\u0438\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B","\u0447\u0430\u0441\u0442\u043E \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0435","\u0434\u0440\u0443\u0433\u0438\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B","\u043F\u043E\u0445\u043E\u0436\u0438\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u044B","{0}, {1}",'\u041A\u043E\u043C\u0430\u043D\u0434\u0430 "{0}" \u043F\u0440\u0438\u0432\u0435\u043B\u0430 \u043A \u043E\u0448\u0438\u0431\u043A\u0435'],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["\u041D\u0430\u0437\u0430\u0434","\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043A\u043B\u0430\u0432\u0438\u0448\u0443 \u0412\u0412\u041E\u0414, \u0447\u0442\u043E\u0431\u044B \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C \u0432\u0432\u0435\u0434\u0435\u043D\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435, \u0438\u043B\u0438 ESCAPE \u0434\u043B\u044F \u043E\u0442\u043C\u0435\u043D\u044B","{0} / {1}","\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043A\u0441\u0442, \u0447\u0442\u043E\u0431\u044B \u0443\u043C\u0435\u043D\u044C\u0448\u0438\u0442\u044C \u0447\u0438\u0441\u043B\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432."],"vs/platform/quickinput/browser/quickInputController":["\u041F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u0442\u044C \u0432\u0441\u0435 \u0444\u043B\u0430\u0436\u043A\u0438","\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u044B: {0}","{0} \u0432\u044B\u0431\u0440\u0430\u043D\u043E","\u041E\u041A","\u0414\u0440\u0443\u0433\u043E\u0439","\u041D\u0430\u0437\u0430\u0434 ({0})","\u041D\u0430\u0437\u0430\u0434"],"vs/platform/quickinput/browser/quickInputList":["\u0411\u044B\u0441\u0442\u0440\u044B\u0439 \u0432\u0432\u043E\u0434"],"vs/platform/quickinput/browser/quickInputUtils":['\u0429\u0435\u043B\u043A\u043D\u0438\u0442\u0435, \u0447\u0442\u043E\u0431\u044B \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u044C \u043A\u043E\u043C\u0430\u043D\u0434\u0443 "{0}"'],"vs/platform/theme/common/colorRegistry":["\u041E\u0431\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F, \u0442\u043E\u043B\u044C\u043A\u043E \u0435\u0441\u043B\u0438 \u0435\u0433\u043E \u043D\u0435 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0438\u0442 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442.","\u041E\u0431\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u043E\u0442\u043A\u043B\u044E\u0447\u0435\u043D\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043E\u043D \u043D\u0435 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u043E\u043C.","\u041E\u0431\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u043E\u0431 \u043E\u0448\u0438\u0431\u043A\u0430\u0445. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0435\u0441\u043B\u0438 \u0435\u0433\u043E \u043D\u0435 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u044F\u0435\u0442 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0433\u043E \u043F\u043E\u044F\u0441\u043D\u0435\u043D\u0438\u044F, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0434\u043B\u044F \u043C\u0435\u0442\u043A\u0438.","\u0426\u0432\u0435\u0442 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0434\u043B\u044F \u0437\u043D\u0430\u0447\u043A\u043E\u0432 \u043D\u0430 \u0440\u0430\u0431\u043E\u0447\u0435\u043C \u043C\u0435\u0441\u0442\u0435.","\u041E\u0431\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446 \u0434\u043B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0441 \u0444\u043E\u043A\u0443\u0441\u043E\u043C. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u043D\u0435 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D \u0432 \u043A\u043E\u043C\u043F\u043E\u043D\u0435\u043D\u0442\u0435.","\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u0430 \u0432\u043E\u043A\u0440\u0443\u0433 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u0430\u044F \u043E\u0442\u0434\u0435\u043B\u044F\u0435\u0442 \u0438\u0445 \u043E\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0434\u043B\u044F \u0443\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u044F \u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442\u0430.","\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u0430\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u0430 \u0432\u043E\u043A\u0440\u0443\u0433 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432, \u043A\u043E\u0442\u043E\u0440\u0430\u044F \u043E\u0442\u0434\u0435\u043B\u044F\u0435\u0442 \u0438\u0445 \u043E\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0434\u043B\u044F \u0443\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u044F \u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u0440\u0430\u0431\u043E\u0447\u0435\u0439 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 (\u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0432 \u043F\u043E\u043B\u044F\u0445 \u0432\u0432\u043E\u0434\u0430 \u0438\u043B\u0438 \u0432 \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u0445 \u043F\u043E\u043B\u044F\u0445). \u041D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F \u043A \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u043C\u0443 \u0442\u0435\u043A\u0441\u0442\u0443 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u0434\u043B\u044F \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u0435\u0439 \u0442\u0435\u043A\u0441\u0442\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0441\u044B\u043B\u043E\u043A \u0432 \u0442\u0435\u043A\u0441\u0442\u0435.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0441\u044B\u043B\u043E\u043A \u0432 \u0442\u0435\u043A\u0441\u0442\u0435 \u043F\u0440\u0438 \u0449\u0435\u043B\u0447\u043A\u0435 \u0438 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u043C\u044B\u0448\u0438.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u0444\u0438\u043A\u0441\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0444\u043E\u0440\u043C\u0430\u0442\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0431\u043B\u043E\u043A\u043E\u0432 \u0441 \u0446\u0438\u0442\u0430\u0442\u0430\u043C\u0438 \u0432 \u0442\u0435\u043A\u0441\u0442\u0435.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446 \u0434\u043B\u044F \u0431\u043B\u043E\u043A\u043E\u0432 \u0441 \u0446\u0438\u0442\u0430\u0442\u0430\u043C\u0438 \u0432 \u0442\u0435\u043A\u0441\u0442\u0435.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430 \u0432 \u0442\u0435\u043A\u0441\u0442\u0435.",'\u0426\u0432\u0435\u0442 \u0442\u0435\u043D\u0438 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u0442\u0430\u043A\u0438\u0445 \u043A\u0430\u043A "\u041D\u0430\u0439\u0442\u0438/\u0437\u0430\u043C\u0435\u043D\u0438\u0442\u044C".','\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u0442\u0430\u043A\u0438\u0445 \u043A\u0430\u043A "\u041D\u0430\u0439\u0442\u0438/\u0437\u0430\u043C\u0435\u043D\u0438\u0442\u044C".',"\u0424\u043E\u043D \u043F\u043E\u043B\u044F \u0432\u0432\u043E\u0434\u0430.","\u041F\u0435\u0440\u0435\u0434\u043D\u0438\u0439 \u043F\u043B\u0430\u043D \u043F\u043E\u043B\u044F \u0432\u0432\u043E\u0434\u0430.","\u0413\u0440\u0430\u043D\u0438\u0446\u0430 \u043F\u043E\u043B\u044F \u0432\u0432\u043E\u0434\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446 \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0432 \u043F\u043E\u043B\u044F\u0445 \u0432\u0432\u043E\u0434\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0432 \u043F\u043E\u043B\u044F\u0445 \u0432\u0432\u043E\u0434\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u043E\u0432\u043E\u0433\u043E \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0432 \u043F\u043E\u043B\u044F\u0445 \u0432\u0432\u043E\u0434\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0430\u043A\u0442\u0438\u0432\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0445 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u0432 \u043F\u043E\u043B\u044F\u0445 \u0432\u0432\u043E\u0434\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u044F\u0441\u043D\u044F\u044E\u0449\u0435\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 \u0432\u0432\u043E\u0434\u0430.",'\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F".','\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F".','\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u0421\u0432\u0435\u0434\u0435\u043D\u0438\u044F".','\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435".','\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435".','\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435".','\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u041E\u0448\u0438\u0431\u043A\u0430".','\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043E\u0431\u043B\u0430\u0441\u0442\u0438 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u041E\u0448\u0438\u0431\u043A\u0430".','\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0438 \u0432\u0432\u043E\u0434\u0430 \u0434\u043B\u044F \u0443\u0440\u043E\u0432\u043D\u044F \u0441\u0435\u0440\u044C\u0435\u0437\u043D\u043E\u0441\u0442\u0438 "\u041E\u0448\u0438\u0431\u043A\u0430".',"\u0424\u043E\u043D \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E\u0441\u044F \u0441\u043F\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E\u0441\u044F \u0441\u043F\u0438\u0441\u043A\u0430.","\u041F\u0435\u0440\u0435\u0434\u043D\u0438\u0439 \u043F\u043B\u0430\u043D \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E\u0441\u044F \u0441\u043F\u0438\u0441\u043A\u0430.","\u0413\u0440\u0430\u043D\u0438\u0446\u0430 \u0440\u0430\u0441\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E\u0441\u044F \u0441\u043F\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0438.","\u0426\u0432\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043A\u043D\u043E\u043F\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0438 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043A\u043D\u043E\u043F\u043A\u0438.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u0442\u043E\u0440\u0438\u0447\u043D\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0442\u043E\u0440\u0438\u0447\u043D\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0442\u043E\u0440\u0438\u0447\u043D\u043E\u0439 \u043A\u043D\u043E\u043F\u043A\u0438 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u043C\u044B\u0448\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0431\u044D\u0434\u0436\u0430. \u0411\u044D\u0434\u0436\u0438 - \u043D\u0435\u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0449\u0438\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u043E\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u0431\u044D\u0434\u0436\u0430. \u0411\u044D\u0434\u0436\u0438 - \u043D\u0435\u0431\u043E\u043B\u044C\u0448\u0438\u0435 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u044E\u0449\u0438\u0435 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u043E\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043D\u0438 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438, \u043A\u043E\u0442\u043E\u0440\u0430\u044F \u0441\u0432\u0438\u0434\u0435\u0442\u0435\u043B\u044C\u0441\u0442\u0432\u0443\u0435\u0442 \u043E \u0442\u043E\u043C, \u0447\u0442\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043F\u0440\u043E\u043A\u0440\u0443\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043F\u043E\u043B\u0437\u0443\u043D\u043A\u0430 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u043B\u0437\u0443\u043D\u043A\u0430 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u043B\u0437\u0443\u043D\u043A\u0430 \u043F\u043E\u043B\u043E\u0441\u044B \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u043F\u0440\u0438 \u0449\u0435\u043B\u0447\u043A\u0435 \u043F\u043E \u043D\u0435\u043C\u0443.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0438\u043D\u0434\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F, \u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u043C\u043E\u0436\u0435\u0442 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C\u0441\u044F \u0434\u043B\u044F \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0445 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430 \u043E\u0448\u0438\u0431\u043A\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0432\u043E\u043B\u043D\u0438\u0441\u0442\u043E\u0439 \u043B\u0438\u043D\u0438\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043E\u0448\u0438\u0431\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0415\u0441\u043B\u0438 \u0437\u0430\u0434\u0430\u043D\u043E, \u0446\u0432\u0435\u0442 \u0434\u0432\u043E\u0439\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u0447\u0435\u0440\u043A\u0438\u0432\u0430\u043D\u0438\u044F \u043E\u0448\u0438\u0431\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430 \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0432\u043E\u043B\u043D\u0438\u0441\u0442\u043E\u0439 \u043B\u0438\u043D\u0438\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0415\u0441\u043B\u0438 \u0437\u0430\u0434\u0430\u043D\u043E, \u0446\u0432\u0435\u0442 \u0434\u0432\u043E\u0439\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u0447\u0435\u0440\u043A\u0438\u0432\u0430\u043D\u0438\u044F \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0442\u0435\u043A\u0441\u0442\u0430 \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0432\u043E\u043B\u043D\u0438\u0441\u0442\u043E\u0439 \u043B\u0438\u043D\u0438\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0415\u0441\u043B\u0438 \u0437\u0430\u0434\u0430\u043D\u043E, \u0446\u0432\u0435\u0442 \u0434\u0432\u043E\u0439\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u0447\u0435\u0440\u043A\u0438\u0432\u0430\u043D\u0438\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u044B\u0445 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0439 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u0432\u043E\u043B\u043D\u0438\u0441\u0442\u043E\u0439 \u043B\u0438\u043D\u0438\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043E\u043A \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0415\u0441\u043B\u0438 \u0437\u0430\u0434\u0430\u043D\u043E, \u0446\u0432\u0435\u0442 \u0434\u0432\u043E\u0439\u043D\u043E\u0433\u043E \u043F\u043E\u0434\u0447\u0435\u0440\u043A\u0438\u0432\u0430\u043D\u0438\u044F \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043B\u0435\u043D\u0442.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0441 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435\u043C \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043F\u0440\u043E\u043A\u0440\u0443\u0442\u043A\u0438 \u0441 \u0437\u0430\u043B\u0438\u043F\u0430\u043D\u0438\u0435\u043C \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u043E\u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u0442\u0430\u043A\u0438\u0445 \u043A\u0430\u043A \u043D\u0430\u0439\u0442\u0438/\u0437\u0430\u043C\u0435\u043D\u0438\u0442\u044C.",'\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430, \u0442\u0430\u043A\u0438\u0445 \u043A\u0430\u043A "\u041F\u043E\u0438\u0441\u043A/\u0437\u0430\u043C\u0435\u043D\u0430".',"\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u0443 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0435\u0441\u0442\u044C \u0433\u0440\u0430\u043D\u0438\u0446\u0430 \u0438 \u0435\u0441\u043B\u0438 \u044D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u043D\u0435 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430. \u042D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u0442\u043E\u043C \u0441\u043B\u0443\u0447\u0430\u0435, \u0435\u0441\u043B\u0438 \u0443 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0435\u0441\u0442\u044C \u0433\u0440\u0430\u043D\u0438\u0446\u0430 \u0434\u043B\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0438 \u0435\u0441\u043B\u0438 \u044D\u0442\u043E\u0442 \u0446\u0432\u0435\u0442 \u043D\u0435 \u043F\u0435\u0440\u0435\u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435\u043C.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430. \u041C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u043E\u043C \u0434\u043B\u044F \u0442\u0430\u043A\u0438\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0432\u044B\u0431\u043E\u0440\u0430, \u043A\u0430\u043A \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u043A\u043E\u043C\u0430\u043D\u0434.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430. \u041C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u043E\u043C \u0434\u043B\u044F \u0442\u0430\u043A\u0438\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0432\u044B\u0431\u043E\u0440\u0430, \u043A\u0430\u043A \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u043A\u043E\u043C\u0430\u043D\u0434.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430. \u041C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043A\u043E\u043D\u0442\u0435\u0439\u043D\u0435\u0440\u043E\u043C \u0434\u043B\u044F \u0442\u0430\u043A\u0438\u0445 \u0441\u0440\u0435\u0434\u0441\u0442\u0432 \u0432\u044B\u0431\u043E\u0440\u0430, \u043A\u0430\u043A \u043F\u0430\u043B\u0438\u0442\u0440\u0430 \u043A\u043E\u043C\u0430\u043D\u0434.","\u0426\u0432\u0435\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0434\u043B\u044F \u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u043A\u0438 \u043C\u0435\u0442\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0434\u043B\u044F \u0433\u0440\u0443\u043F\u043F\u0438\u0440\u043E\u0432\u043A\u0438 \u0433\u0440\u0430\u043D\u0438\u0446.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043C\u0435\u0442\u043A\u0438 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448. \u041C\u0435\u0442\u043A\u0430 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0434\u043B\u044F \u043E\u0431\u043E\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043C\u0435\u0442\u043A\u0438 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448. \u041C\u0435\u0442\u043A\u0430 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0434\u043B\u044F \u043E\u0431\u043E\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043C\u0435\u0442\u043A\u0438 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448. \u041C\u0435\u0442\u043A\u0430 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0434\u043B\u044F \u043E\u0431\u043E\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448.","\u0426\u0432\u0435\u0442 \u043D\u0438\u0436\u043D\u0435\u0439 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043C\u0435\u0442\u043A\u0438 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448. \u041C\u0435\u0442\u043A\u0430 \u043D\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043C\u043E\u0433\u043E \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0434\u043B\u044F \u043E\u0431\u043E\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0441\u043E\u0447\u0435\u0442\u0430\u043D\u0438\u044F \u043A\u043B\u0430\u0432\u0438\u0448.","\u0426\u0432\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u0440\u0435\u0436\u0438\u043C\u0435 \u0432\u044B\u0441\u043E\u043A\u043E\u0433\u043E \u043A\u043E\u043D\u0442\u0440\u0430\u0441\u0442\u0430.","\u0426\u0432\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0432 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0434\u043B\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439, \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0435 \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u044B\u043C \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u043E\u043C. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0440\u0435\u0433\u0438\u043E\u043D\u043E\u0432 \u0441 \u0442\u0435\u043C \u0436\u0435 \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u044B\u043C, \u0447\u0442\u043E \u0438 \u0432 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0438.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u043F\u043E\u0438\u0441\u043A\u0430 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0430, \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043F\u043E\u0438\u0441\u043A. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0430 \u043F\u043E\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u043E\u0432 \u043F\u043E\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D\u0430, \u043E\u0433\u0440\u0430\u043D\u0438\u0447\u0438\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043F\u043E\u0438\u0441\u043A. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u0434\u043B\u044F \u0437\u0430\u043F\u0440\u043E\u0441\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0445 \u0437\u0430\u043F\u0440\u043E\u0441\u043E\u0432 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043F\u043E\u0438\u0441\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432 \u043F\u043E\u0438\u0441\u043A\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0438\u044F \u0432\u044C\u044E\u043B\u0435\u0442\u0430.","\u0412\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043F\u043E\u0434 \u0441\u043B\u043E\u0432\u043E\u043C, \u0434\u043B\u044F \u043A\u043E\u0442\u043E\u0440\u043E\u0433\u043E \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442\u0441\u044F \u043C\u0435\u043D\u044E \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u044F \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043D\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0438 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u044F \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0426\u0432\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u0441\u0441\u044B\u043B\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0434\u043B\u044F \u0448\u0440\u0438\u0444\u0442\u043E\u0432","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0434\u043B\u044F \u0448\u0440\u0438\u0444\u0442\u043E\u0432","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0434\u043B\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0441\u0442\u0440\u043E\u0435\u043D\u043D\u044B\u0445 \u0443\u043A\u0430\u0437\u0430\u043D\u0438\u0439 \u0434\u043B\u044F \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432","\u0426\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u0437\u043D\u0430\u0447\u043A\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0432 \u043C\u0435\u043D\u044E \u043B\u0430\u043C\u043F\u043E\u0447\u043A\u0438.","\u0426\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u0437\u043D\u0430\u0447\u043A\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u043E\u0433\u043E \u0438\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u0432 \u043C\u0435\u043D\u044E \u043B\u0430\u043C\u043F\u043E\u0447\u043A\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0442\u0435\u043A\u0441\u0442\u0430. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043F\u043E\u043B\u044F, \u0433\u0434\u0435 \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u044B \u0441\u0442\u0440\u043E\u043A\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043F\u043E\u043B\u044F, \u0433\u0434\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u044B \u0441\u0442\u0440\u043E\u043A\u0438.","\u041F\u0435\u0440\u0435\u0434\u043D\u0438\u0439 \u043F\u043B\u0430\u043D \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u0439 \u0434\u043B\u044F \u0432\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E.","\u041F\u0435\u0440\u0435\u0434\u043D\u0438\u0439 \u043F\u043B\u0430\u043D \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0440\u0430\u0437\u043B\u0438\u0447\u0438\u0439 \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E.","\u0426\u0432\u0435\u0442 \u043A\u043E\u043D\u0442\u0443\u0440\u0430 \u0434\u043B\u044F \u0434\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A.","\u0426\u0432\u0435\u0442 \u043A\u043E\u043D\u0442\u0443\u0440\u0430 \u0434\u043B\u044F \u0443\u0434\u0430\u043B\u0435\u043D\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043C\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043C\u044F \u0442\u0435\u043A\u0441\u0442\u043E\u0432\u044B\u043C\u0438 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430\u043C\u0438.","\u0426\u0432\u0435\u0442 \u0434\u0438\u0430\u0433\u043E\u043D\u0430\u043B\u044C\u043D\u043E\u0439 \u0437\u0430\u043B\u0438\u0432\u043A\u0438 \u0434\u043B\u044F \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439. \u0414\u0438\u0430\u0433\u043E\u043D\u0430\u043B\u044C\u043D\u0430\u044F \u0437\u0430\u043B\u0438\u0432\u043A\u0430 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432 \u0440\u0430\u0437\u043C\u0435\u0449\u0430\u0435\u043C\u044B\u0445 \u0440\u044F\u0434\u043E\u043C \u043F\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u0438\u044F\u0445 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u0431\u043B\u043E\u043A\u043E\u0432 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u044B\u0445 \u0431\u043B\u043E\u043A\u043E\u0432 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043D\u0435\u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u043E\u0434\u0430 \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435 \u043D\u0435\u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u043A\u043E\u043D\u0442\u0443\u0440\u0430 \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C\xA0\u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u043A\u043E\u043D\u0442\u0443\u0440\u0430 \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u0430\u043A\u0442\u0438\u0432\u0435\u043D \u0438 \u0432\u044B\u0431\u0440\u0430\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0437\u043D\u0430\u0447\u043A\u0430 \u0441\u043F\u0438\u0441\u043A\u0430 \u0438\u043B\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043B\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u043A\u043E\u0433\u0434\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u0438\u043B\u0438 \u0434\u0435\u0440\u0435\u0432\u043E \u0430\u043A\u0442\u0438\u0432\u043D\u044B. \u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0438\u043B\u0438 \u0434\u0435\u0440\u0435\u0432\u043E \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u2014 \u043D\u0435\u0442.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043A\u0441\u0442\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0437\u043D\u0430\u0447\u043A\u0430 \u0441\u043F\u0438\u0441\u043A\u0430 \u0438\u043B\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043B\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u043A\u043E\u0433\u0434\u0430 \u0441\u043F\u0438\u0441\u043E\u043A \u0438\u043B\u0438 \u0434\u0435\u0440\u0435\u0432\u043E \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B. \u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u0438\u043B\u0438 \u0434\u0435\u0440\u0435\u0432\u043E \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u2014 \u043D\u0435\u0442.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u043D\u0435 \u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u2014 \u043D\u0435\u0442.","\u0426\u0432\u0435\u0442 \u043A\u043E\u043D\u0442\u0443\u0440\u0430 \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430 List/Tree, \u043A\u043E\u0433\u0434\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442 List/Tree \u043D\u0435 \u0430\u043A\u0442\u0438\u0432\u0435\u043D. \u041D\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0435 List/Tree \u0435\u0441\u0442\u044C \u0444\u043E\u043A\u0443\u0441 \u043A\u043B\u0430\u0432\u0438\u0430\u0442\u0443\u0440\u044B, \u043D\u0430 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u043E\u043C\xA0\u2014 \u043D\u0435\u0442.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 List/Tree \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u043C\u044B\u0448\u0438.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 List/Tree \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043A\u0443\u0440\u0441\u043E\u0440\u0430 \u043C\u044B\u0448\u0438.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 List/Tree \u043F\u0440\u0438 \u043F\u0435\u0440\u0435\u043C\u0435\u0449\u0435\u043D\u0438\u0438 \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043C\u044B\u0448\u0438.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044F \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435 \u043F\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0443 List/Tree.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435 \u043F\u043E \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0443 List/Tree.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0441\u043F\u0438\u0441\u043A\u0430/\u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0434\u043B\u044F \u043D\u0435\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u043D\u043E\u0433\u043E \u043A\u043E\u0440\u043D\u0435\u0432\u043E\u0433\u043E \u0443\u0437\u043B\u0430 \u0432 \u043F\u0440\u043E\u0432\u043E\u0434\u043D\u0438\u043A\u0435.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0441\u043F\u0438\u0441\u043A\u0430, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043E\u0448\u0438\u0431\u043A\u0438.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u0441\u043F\u0438\u0441\u043A\u0430, \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0445 \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u0442\u0438\u043F\u043E\u0432 \u0432 \u0441\u043F\u0438\u0441\u043A\u0430\u0445 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445.","\u0426\u0432\u0435\u0442 \u043A\u043E\u043D\u0442\u0443\u0440\u0430 \u0434\u043B\u044F \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u0442\u0438\u043F\u043E\u0432 \u0432 \u0441\u043F\u0438\u0441\u043A\u0430\u0445 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445.","\u0426\u0432\u0435\u0442 \u043A\u043E\u043D\u0442\u0443\u0440\u0430 \u0434\u043B\u044F \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u0442\u0438\u043F\u043E\u0432 \u0432 \u0441\u043F\u0438\u0441\u043A\u0430\u0445 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445 \u043F\u0440\u0438 \u043E\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0438 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u0442\u0435\u043D\u0438 \u0434\u043B\u044F \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u0438\u043B\u044C\u0442\u0440\u0430 \u0442\u0438\u043F\u043E\u0432 \u0432 \u0441\u043F\u0438\u0441\u043A\u0430\u0445 \u0438 \u0434\u0435\u0440\u0435\u0432\u044C\u044F\u0445.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043E\u0442\u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u043E\u0442\u0444\u0438\u043B\u044C\u0442\u0440\u043E\u0432\u0430\u043D\u043D\u043E\u0433\u043E \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0448\u0442\u0440\u0438\u0445\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043B\u044F \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043E\u0442\u0441\u0442\u0443\u043F\u0430.","\u0426\u0432\u0435\u0442 \u0448\u0442\u0440\u0438\u0445\u0430 \u0434\u0435\u0440\u0435\u0432\u0430 \u0434\u043B\u044F \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u044F\u044E\u0449\u0438\u0445 \u043E\u0442\u0441\u0442\u0443\u043F\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0442\u0430\u0431\u043B\u0438\u0446\u044B \u043C\u0435\u0436\u0434\u0443 \u0441\u0442\u043E\u043B\u0431\u0446\u0430\u043C\u0438.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u043D\u0435\u0447\u0435\u0442\u043D\u044B\u0445 \u0441\u0442\u0440\u043E\u043A \u0442\u0430\u0431\u043B\u0438\u0446\u044B.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432 \u0441\u043F\u0438\u0441\u043A\u0435/\u0434\u0435\u0440\u0435\u0432\u0435 \u0434\u043B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432, \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u043A\u043E\u0442\u043E\u0440\u044B\u0445 \u043E\u0442\u043C\u0435\u043D\u0435\u043D\u043E.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u043B\u0430\u0436\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0444\u043B\u0430\u0436\u043A\u0430 \u043F\u0440\u0438 \u0432\u044B\u0431\u043E\u0440\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u0432 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u043E\u043D \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u043B\u0430\u0436\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u0444\u043B\u0430\u0436\u043A\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0432\u0438\u0434\u0436\u0435\u0442\u0430 \u0444\u043B\u0430\u0436\u043A\u0430, \u043A\u043E\u0433\u0434\u0430 \u0432\u044B\u0431\u0440\u0430\u043D \u044D\u043B\u0435\u043C\u0435\u043D\u0442, \u0432 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u043E\u043D \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F.","\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0443\u0435\u0442\u0441\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C quickInputList.focusBackground.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0434\u043B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0444\u043E\u043A\u0443\u0441.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0437\u043D\u0430\u0447\u043A\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0434\u043B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0444\u043E\u043A\u0443\u0441.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0431\u044B\u0441\u0442\u0440\u043E\u0433\u043E \u0432\u044B\u0431\u043E\u0440\u0430 \u0434\u043B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430, \u043D\u0430 \u043A\u043E\u0442\u043E\u0440\u043E\u043C \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u0444\u043E\u043A\u0443\u0441.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446 \u043C\u0435\u043D\u044E.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043F\u0443\u043D\u043A\u0442\u043E\u0432 \u043C\u0435\u043D\u044E.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u0443\u043D\u043A\u0442\u043E\u0432 \u043C\u0435\u043D\u044E.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0443\u043D\u043A\u0442\u0430 \u043C\u0435\u043D\u044E \u0432 \u043C\u0435\u043D\u044E.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0434\u043B\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0443\u043D\u043A\u0442\u0430 \u0432 \u043C\u0435\u043D\u044E.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0434\u043B\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u043F\u0443\u043D\u043A\u0442\u0430 \u0432 \u043C\u0435\u043D\u044E.","\u0426\u0432\u0435\u0442 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u043C\u0435\u043D\u044E \u0432 \u043C\u0435\u043D\u044E.","\u0424\u043E\u043D \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043C\u044B\u0448\u0438 \u043D\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F","\u041A\u043E\u043D\u0442\u0443\u0440 \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043C\u044B\u0448\u0438 \u043D\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F","\u0424\u043E\u043D \u043F\u0430\u043D\u0435\u043B\u0438 \u0438\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u0440\u0438 \u0443\u0434\u0435\u0440\u0436\u0430\u043D\u0438\u0438 \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F \u043C\u044B\u0448\u0438 \u043D\u0430\u0434 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F\u043C\u0438","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0432 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0432 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0432 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430.","\u0412\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0435 \u0446\u0432\u0435\u0442\u043E\u043C \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0432 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0439 \u043F\u043E\u0437\u0438\u0446\u0438\u0438 \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430.","\u0426\u0432\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438, \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0438\u0445\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.","\u0426\u0432\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438, \u043D\u0430\u0445\u043E\u0434\u044F\u0449\u0438\u0445\u0441\u044F \u0432 \u0444\u043E\u043A\u0443\u0441\u0435.","\u0426\u0432\u0435\u0442 \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0445 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.","\u0424\u043E\u043D\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0432\u044B\u0431\u043E\u0440\u0430 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043D\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u0438.","\u0422\u0435\u043A\u0443\u0449\u0438\u0439 \u0446\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043F\u0440\u0438 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0424\u043E\u043D \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u043F\u0440\u0438 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0424\u043E\u043D \u0432\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043F\u0440\u0438 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u043E\u0431\u044A\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u044F. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0424\u043E\u043D \u0432\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u043F\u0440\u0438 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0424\u043E\u043D \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u0430 \u043E\u0431\u0449\u0435\u0433\u043E \u043F\u0440\u0435\u0434\u043A\u0430 \u0432\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0424\u043E\u043D \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u043E\u0431\u0449\u0435\u0433\u043E \u043F\u0440\u0435\u0434\u043A\u0430 \u0432\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u0433\u0440\u0430\u043D\u0438\u0446\u044B \u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043A\u043E\u0432 \u0438 \u0440\u0430\u0437\u0434\u0435\u043B\u0438\u0442\u0435\u043B\u044F \u0432\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0442\u0435\u043A\u0443\u0449\u0435\u0433\u043E \u043E\u043A\u043D\u0430 \u0432\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0432\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E \u043E\u043A\u043D\u0430 \u0432\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u0434\u043B\u044F \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0434\u043B\u044F \u043E\u0431\u0449\u0435\u0433\u043E \u043F\u0440\u0435\u0434\u043A\u0430 \u0432\u043E \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0445 \u043A\u043E\u043D\u0444\u043B\u0438\u043A\u0442\u0430\u0445 \u0441\u043B\u0438\u044F\u043D\u0438\u044F. ","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0434\u043B\u044F \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043F\u0440\u0438 \u043F\u043E\u0438\u0441\u043A\u0435. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u041C\u0430\u0440\u043A\u0435\u0440 \u043E\u0431\u0437\u043E\u0440\u043D\u043E\u0439 \u043B\u0438\u043D\u0435\u0439\u043A\u0438 \u0434\u043B\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u044F \u0432\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442\u0430. \u0426\u0432\u0435\u0442 \u043D\u0435 \u0434\u043E\u043B\u0436\u0435\u043D \u0431\u044B\u0442\u044C \u043D\u0435\u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u044B\u043C, \u0447\u0442\u043E\u0431\u044B \u043D\u0435 \u0441\u043A\u0440\u044B\u0442\u044C \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u043D\u044B\u0435 \u043D\u0438\u0436\u0435 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u043E\u0444\u043E\u0440\u043C\u043B\u0435\u043D\u0438\u044F.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B \u0434\u043B\u044F \u043F\u043E\u0438\u0441\u043A\u0430 \u0441\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B \u0434\u043B\u044F \u043F\u043E\u0432\u0442\u043E\u0440\u044F\u044E\u0449\u0438\u0445\u0441\u044F \u0432\u044B\u0434\u0435\u043B\u0435\u043D\u0438\u0439 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B \u0434\u043B\u044F \u0432\u044B\u0431\u043E\u0440\u0430 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0430.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043D\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0435 \u0434\u043B\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u0438.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043C\u0438\u043D\u0438\u043A\u0430\u0440\u0442\u044B \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0439.","\u0426\u0432\u0435\u0442 \u043C\u0430\u0440\u043A\u0435\u0440\u0430 \u043C\u0438\u043D\u0438\u043A\u0430\u0440\u0442\u044B \u0434\u043B\u044F \u043E\u0448\u0438\u0431\u043E\u043A.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B.",'\u041F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u043E\u0441\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430, \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u043C\u0430\u044F \u0433\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u0435. \u041D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, "#000000c0" \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0435\u0442 \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B \u0441 \u043F\u0440\u043E\u0437\u0440\u0430\u0447\u043D\u043E\u0441\u0442\u044C\u044E 75%.',"\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u043B\u0437\u0443\u043D\u043A\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u043B\u0437\u0443\u043D\u043A\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B \u043F\u0440\u0438 \u043D\u0430\u0432\u0435\u0434\u0435\u043D\u0438\u0438 \u043D\u0430 \u043D\u0435\u0433\u043E \u0443\u043A\u0430\u0437\u0430\u0442\u0435\u043B\u044F.","\u0426\u0432\u0435\u0442 \u0444\u043E\u043D\u0430 \u043F\u043E\u043B\u0437\u0443\u043D\u043A\u0430 \u043C\u0438\u043D\u0438-\u043A\u0430\u0440\u0442\u044B \u043F\u0440\u0438 \u0435\u0433\u043E \u0449\u0435\u043B\u0447\u043A\u0435.","\u0426\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u0437\u043D\u0430\u0447\u043A\u0430 \u043E\u0448\u0438\u0431\u043A\u0438, \u0443\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043D\u0430 \u043D\u0430\u043B\u0438\u0447\u0438\u0435 \u043F\u0440\u043E\u0431\u043B\u0435\u043C.","\u0426\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0430\u044E\u0449\u0435\u0433\u043E \u0437\u043D\u0430\u0447\u043A\u0430, \u0443\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043D\u0430 \u043D\u0430\u043B\u0438\u0447\u0438\u0435 \u043F\u0440\u043E\u0431\u043B\u0435\u043C.","\u0426\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0434\u043B\u044F \u0438\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u043E\u043D\u043D\u043E\u0433\u043E \u0437\u043D\u0430\u0447\u043A\u0430, \u0443\u043A\u0430\u0437\u044B\u0432\u0430\u044E\u0449\u0435\u0433\u043E \u043D\u0430 \u043D\u0430\u043B\u0438\u0447\u0438\u0435 \u043F\u0440\u043E\u0431\u043B\u0435\u043C.","\u0426\u0432\u0435\u0442 \u043F\u0435\u0440\u0435\u0434\u043D\u0435\u0433\u043E \u043F\u043B\u0430\u043D\u0430 \u043D\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430\u0445.","\u0426\u0432\u0435\u0442 \u0433\u043E\u0440\u0438\u0437\u043E\u043D\u0442\u0430\u043B\u044C\u043D\u044B\u0445 \u043B\u0438\u043D\u0438\u0439 \u043D\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C\u0430\u0445.","\u041A\u0440\u0430\u0441\u043D\u044B\u0439 \u0446\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u0432\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C.","\u0421\u0438\u043D\u0438\u0439 \u0446\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u0432\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C.","\u0416\u0435\u043B\u0442\u044B\u0439 \u0446\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u0432\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C.","\u041E\u0440\u0430\u043D\u0436\u0435\u0432\u044B\u0439 \u0446\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u0432\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C.","\u0417\u0435\u043B\u0435\u043D\u044B\u0439 \u0446\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u0432\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C.","\u041B\u0438\u043B\u043E\u0432\u044B\u0439 \u0446\u0432\u0435\u0442, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u044B\u0439 \u0432 \u0432\u0438\u0437\u0443\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F\u0445 \u0434\u0438\u0430\u0433\u0440\u0430\u043C\u043C."],"vs/platform/theme/common/iconRegistry":["\u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u043C\u043E\u0433\u043E \u0448\u0440\u0438\u0444\u0442\u0430. \u0415\u0441\u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 \u043D\u0435 \u0437\u0430\u0434\u0430\u043D, \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0448\u0440\u0438\u0444\u0442, \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u043D\u044B\u0439 \u043F\u0435\u0440\u0432\u044B\u043C.","\u0421\u0438\u043C\u0432\u043E\u043B \u0448\u0440\u0438\u0444\u0442\u0430, \u0441\u0432\u044F\u0437\u0430\u043D\u043D\u044B\u0439 \u0441 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0435\u043D\u0438\u0435\u043C \u0437\u043D\u0430\u0447\u043A\u0430.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0437\u0430\u043A\u0440\u044B\u0442\u0438\u044F \u0432 \u043C\u0438\u043D\u0438-\u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F\u0445.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430 \u043A \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0435\u043C\u0443 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435.","\u0417\u043D\u0430\u0447\u043E\u043A \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u0445\u043E\u0434\u0430 \u043A \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u043C\u0443 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u044E \u0432 \u0440\u0435\u0434\u0430\u043A\u0442\u043E\u0440\u0435."],"vs/platform/undoRedo/common/undoRedoService":["\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 \u0444\u0430\u0439\u043B\u044B \u0431\u044B\u043B\u0438 \u0437\u0430\u043A\u0440\u044B\u0442\u044B \u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B \u043D\u0430 \u0434\u0438\u0441\u043A\u0435: {0}.","\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 \u0444\u0430\u0439\u043B\u044B \u0431\u044B\u043B\u0438 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u044B \u043D\u0435\u0441\u043E\u0432\u043C\u0435\u0441\u0442\u0438\u043C\u044B\u043C \u043E\u0431\u0440\u0430\u0437\u043E\u043C: {0}.",'\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432. {1}','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432. {1}','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432, \u0442\u0430\u043A \u043A\u0430\u043A \u0431\u044B\u043B\u0438 \u0432\u043D\u0435\u0441\u0435\u043D\u044B \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432 {1}','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432, \u0442\u0430\u043A \u043A\u0430\u043A \u0432 {1} \u0443\u0436\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u043B\u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432, \u0442\u0430\u043A \u043A\u0430\u043A \u0443\u0436\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u043B\u0430\u0441\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u043B\u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F','\u0412\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432?',"&&\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 \u0432 \u0444\u0430\u0439\u043B\u0430\u0445 {0}","\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u044D\u0442\u043E\u0442 &&\u0444\u0430\u0439\u043B",'\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 "{0}", \u0442\u0430\u043A \u043A\u0430\u043A \u0443\u0436\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u043B\u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F','\u0412\u044B \u0445\u043E\u0442\u0438\u0442\u0435 \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C "{0}"?',"&&\u0414\u0430","\u041D\u0435\u0442",'\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432. {1}','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432. {1}','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044E "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432, \u0442\u0430\u043A \u043A\u0430\u043A \u0431\u044B\u043B\u0438 \u0432\u043D\u0435\u0441\u0435\u043D\u044B \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \u0432 {1}','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432, \u0442\u0430\u043A \u043A\u0430\u043A \u0434\u043B\u044F {1} \u0443\u0436\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u043B\u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F.','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 "{0}" \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043B\u043E\u0432, \u0442\u0430\u043A \u043A\u0430\u043A \u0443\u0436\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u043B\u0430\u0441\u044C \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u043B\u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F','\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u043F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 "{0}", \u0442\u0430\u043A \u043A\u0430\u043A \u0443\u0436\u0435 \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u0442\u0441\u044F \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u044F \u043E\u0442\u043C\u0435\u043D\u044B \u0438\u043B\u0438 \u043F\u043E\u0432\u0442\u043E\u0440\u0430 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044F'],"vs/platform/workspace/common/workspace":["\u0420\u0430\u0431\u043E\u0447\u0430\u044F \u043E\u0431\u043B\u0430\u0441\u0442\u044C \u043A\u043E\u0434\u0430"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.ru.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.zh-cn.js b/lib/vs/editor/editor.main.nls.zh-cn.js deleted file mode 100644 index e5d8cbf..0000000 --- a/lib/vs/editor/editor.main.nls.zh-cn.js +++ /dev/null @@ -1,31 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.zh-cn",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["\u8F93\u5165"],"vs/base/browser/ui/findinput/findInputToggles":["\u533A\u5206\u5927\u5C0F\u5199","\u5168\u5B57\u5339\u914D","\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F"],"vs/base/browser/ui/findinput/replaceInput":["\u8F93\u5165","\u4FDD\u7559\u5927\u5C0F\u5199"],"vs/base/browser/ui/hover/hoverWidget":["\u5728\u8F85\u52A9\u89C6\u56FE\u4E2D\u7528 {0} \u68C0\u67E5\u6B64\u9879\u3002","\u901A\u8FC7\u547D\u4EE4\u201C\u6253\u5F00\u8F85\u52A9\u89C6\u56FE\u201D\u5728\u8F85\u52A9\u89C6\u56FE\u4E2D\u68C0\u67E5\u6B64\u9879\uFF0C\u8BE5\u547D\u4EE4\u5F53\u524D\u65E0\u6CD5\u901A\u8FC7\u952E\u7ED1\u5B9A\u89E6\u53D1\u3002"],"vs/base/browser/ui/iconLabel/iconLabelHover":["\u6B63\u5728\u52A0\u8F7D\u2026"],"vs/base/browser/ui/inputbox/inputBox":["\u9519\u8BEF: {0}","\u8B66\u544A: {0}","\u4FE1\u606F: {0}","\u5BF9\u4E8E\u5386\u53F2\u8BB0\u5F55","\u6E05\u9664\u7684\u8F93\u5165"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["\u672A\u7ED1\u5B9A"],"vs/base/browser/ui/selectBox/selectBoxCustom":["\u9009\u62E9\u6846"],"vs/base/browser/ui/toolbar/toolbar":["\u66F4\u591A\u64CD\u4F5C..."],"vs/base/browser/ui/tree/abstractTree":["\u7B5B\u9009\u5668","\u6A21\u7CCA\u5339\u914D","\u8981\u7B5B\u9009\u7684\u7C7B\u578B","\u8981\u641C\u7D22\u7684\u7C7B\u578B","\u8981\u641C\u7D22\u7684\u7C7B\u578B","\u5173\u95ED","\u672A\u627E\u5230\u5143\u7D20\u3002"],"vs/base/common/actions":["(\u7A7A)"],"vs/base/common/errorMessage":["{0}: {1}","\u53D1\u751F\u4E86\u7CFB\u7EDF\u9519\u8BEF ({0})","\u51FA\u73B0\u672A\u77E5\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u8BF7\u53C2\u9605\u65E5\u5FD7\u3002","\u51FA\u73B0\u672A\u77E5\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u8BF7\u53C2\u9605\u65E5\u5FD7\u3002","{0} \u4E2A(\u5171 {1} \u4E2A\u9519\u8BEF)","\u51FA\u73B0\u672A\u77E5\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u8BF7\u53C2\u9605\u65E5\u5FD7\u3002"],"vs/base/common/keybindingLabels":["Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","\u8D85\u952E","Control","Shift","\u9009\u9879","Command","Control","Shift","Alt","Windows","Control","Shift","Alt","\u8D85\u952E"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["\u7F16\u8F91\u5668","\u73B0\u5728\u65E0\u6CD5\u8BBF\u95EE\u7F16\u8F91\u5668\u3002","{0} \u82E5\u8981\u542F\u7528\u5C4F\u5E55\u9605\u8BFB\u5668\u4F18\u5316\u6A21\u5F0F\uFF0C\u8BF7\u4F7F\u7528 {1}","{0} \u82E5\u8981\u542F\u7528\u5C4F\u5E55\u9605\u8BFB\u5668\u4F18\u5316\u6A21\u5F0F\uFF0C\u8BF7\u4F7F\u7528 {1} \u6253\u5F00\u5FEB\u901F\u9009\u53D6\uFF0C\u7136\u540E\u8FD0\u884C\u201C\u5207\u6362\u5C4F\u5E55\u9605\u8BFB\u5668\u8F85\u52A9\u529F\u80FD\u6A21\u5F0F\u201D\u547D\u4EE4\uFF1B\u5F53\u524D\u65E0\u6CD5\u901A\u8FC7\u952E\u76D8\u89E6\u53D1\u6B64\u547D\u4EE4\u3002","{0} \u8BF7\u901A\u8FC7\u4F7F\u7528 {1} \u8BBF\u95EE\u952E\u7ED1\u5B9A\u7F16\u8F91\u5668\u5E76\u8FD0\u884C\u5B83\uFF0C\u4E3A\u201C\u5207\u6362\u5C4F\u5E55\u9605\u8BFB\u5668\u8F85\u52A9\u529F\u80FD\u6A21\u5F0F\u201D\u547D\u4EE4\u5206\u914D\u952E\u7ED1\u5B9A\u3002"],"vs/editor/browser/coreCommands":["\u5373\u4F7F\u8F6C\u5230\u8F83\u957F\u7684\u884C\uFF0C\u4E5F\u4E00\u76F4\u5230\u672B\u5C3E","\u5373\u4F7F\u8F6C\u5230\u8F83\u957F\u7684\u884C\uFF0C\u4E5F\u4E00\u76F4\u5230\u672B\u5C3E","\u5DF2\u5220\u9664\u8F85\u52A9\u6E38\u6807"],"vs/editor/browser/editorExtensions":["\u64A4\u6D88(&&U)","\u64A4\u6D88","\u6062\u590D(&&R)","\u6062\u590D","\u5168\u9009(&&S)","\u9009\u62E9\u5168\u90E8"],"vs/editor/browser/widget/codeEditorWidget":["\u5DF2\u5C06\u5149\u6807\u6570\u9650\u5236\u4E3A {0}\u3002\u8BF7\u8003\u8651\u4F7F\u7528 [\u67E5\u627E\u548C\u66FF\u6362](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace)\u8FDB\u884C\u8F83\u5927\u7684\u66F4\u6539\u6216\u589E\u52A0\u7F16\u8F91\u5668\u591A\u5149\u6807\u9650\u5236\u8BBE\u7F6E\u3002","\u589E\u52A0\u591A\u5149\u6807\u9650\u5236"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":["\u53EF\u8BBF\u95EE\u5DEE\u5F02\u67E5\u770B\u5668\u4E2D\u201C\u63D2\u5165\u201D\u7684\u56FE\u6807\u3002","\u53EF\u8BBF\u95EE\u5DEE\u5F02\u67E5\u770B\u5668\u4E2D\u201C\u5220\u9664\u201D\u7684\u56FE\u6807\u3002","\u53EF\u8BBF\u95EE\u5DEE\u5F02\u67E5\u770B\u5668\u4E2D\u201C\u5173\u95ED\u201D\u7684\u56FE\u6807\u3002","\u5173\u95ED","\u53EF\u8BBF\u95EE\u7684\u5DEE\u5F02\u67E5\u770B\u5668\u3002\u4F7F\u7528\u5411\u4E0A\u548C\u5411\u4E0B\u7BAD\u5934\u5BFC\u822A\u3002","\u672A\u66F4\u6539\u884C","\u66F4\u6539\u4E86 1 \u884C","\u66F4\u6539\u4E86 {0} \u884C","\u5DEE\u5F02 {0}/ {1}: \u539F\u59CB\u884C {2}\uFF0C{3}\uFF0C\u4FEE\u6539\u540E\u7684\u884C {4}\uFF0C{5}","\u7A7A\u767D","{0} \u672A\u66F4\u6539\u7684\u884C {1}","{0}\u539F\u59CB\u884C{1}\u4FEE\u6539\u7684\u884C{2}","+ {0}\u4FEE\u6539\u7684\u884C{1}","- {0}\u539F\u59CB\u884C{1}"],"vs/editor/browser/widget/diffEditor/colors":["\u5728\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u79FB\u52A8\u7684\u6587\u672C\u7684\u8FB9\u6846\u989C\u8272\u3002","\u5728\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u79FB\u52A8\u7684\u6587\u672C\u7684\u6D3B\u52A8\u8FB9\u6846\u989C\u8272\u3002"],"vs/editor/browser/widget/diffEditor/decorations":["\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u63D2\u5165\u9879\u7684\u7EBF\u6761\u4FEE\u9970\u3002","\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u5220\u9664\u9879\u7684\u7EBF\u6761\u4FEE\u9970\u3002","\u5355\u51FB\u4EE5\u8FD8\u539F\u66F4\u6539"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["\u5207\u6362\u6298\u53E0\u672A\u66F4\u6539\u7684\u533A\u57DF","\u5207\u6362\u663E\u793A\u79FB\u52A8\u7684\u4EE3\u7801\u5757","\u5728\u7A7A\u95F4\u53D7\u9650\u65F6\u5207\u6362\u4F7F\u7528\u5185\u8054\u89C6\u56FE","\u7A7A\u95F4\u53D7\u9650\u65F6\u4F7F\u7528\u5185\u8054\u89C6\u56FE","\u663E\u793A\u79FB\u52A8\u7684\u4EE3\u7801\u5757","\u5DEE\u5F02\u7F16\u8F91\u5668","\u5207\u6362\u4FA7\u9762","\u9000\u51FA\u6BD4\u8F83\u79FB\u52A8","\u6298\u53E0\u6240\u6709\u672A\u66F4\u6539\u7684\u533A\u57DF","\u663E\u793A\u6240\u6709\u672A\u66F4\u6539\u7684\u533A\u57DF","\u53EF\u8BBF\u95EE\u7684\u5DEE\u5F02\u67E5\u770B\u5668","\u8F6C\u81F3\u4E0B\u4E00\u4E2A\u5DEE\u5F02","\u6253\u5F00\u53EF\u8BBF\u95EE\u5DEE\u5F02\u67E5\u770B\u5668","\u8F6C\u81F3\u4E0A\u4E00\u4E2A\u5DEE\u5F02"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" \u4F7F\u7528 {0} \u6253\u5F00\u8F85\u52A9\u529F\u80FD\u5E2E\u52A9\u3002"],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["\u6298\u53E0\u672A\u66F4\u6539\u7684\u533A\u57DF","\u5355\u51FB\u6216\u62D6\u52A8\u53EF\u5728\u4E0A\u9762\u663E\u793A\u66F4\u591A\u5185\u5BB9","\u5168\u90E8\u663E\u793A","\u5355\u51FB\u6216\u62D6\u52A8\u53EF\u5728\u4E0B\u65B9\u663E\u793A\u66F4\u591A\u5185\u5BB9","{0} \u4E2A\u9690\u85CF\u7684\u884C","\u53CC\u51FB\u5C55\u5F00"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C","\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C","\u590D\u5236\u66F4\u6539\u7684\u884C","\u590D\u5236\u66F4\u6539\u7684\u884C","\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C({0})","\u590D\u5236\u66F4\u6539\u7684\u884C({0})","\u8FD8\u539F\u6B64\u66F4\u6539"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["\u4EE3\u7801\u5DF2\u79FB\u52A8\u81F3\u884C {0}-{1}\uFF0C\u6709\u66F4\u6539","\u4EE3\u7801\u5DF2\u4ECE\u884C {0}-{1} \u79FB\u52A8\uFF0C\u6709\u66F4\u6539","\u4EE3\u7801\u5DF2\u79FB\u52A8\u5230\u884C {0} {1}","\u4EE3\u7801\u5DF2\u4ECE\u884C {0}-{1} \u79FB\u52A8"],"vs/editor/common/config/editorConfigurationSchema":["\u7F16\u8F91\u5668","\u4E00\u4E2A\u5236\u8868\u7B26\u7B49\u4E8E\u7684\u7A7A\u683C\u6570\u3002\u5F53 {0} \u6253\u5F00\u65F6\uFF0C\u5C06\u6839\u636E\u6587\u4EF6\u5185\u5BB9\u66FF\u4EE3\u6B64\u8BBE\u7F6E\u3002",'\u7528\u4E8E\u7F29\u8FDB\u6216 `"tabSize"` \u7684\u7A7A\u683C\u6570\uFF0C\u53EF\u4F7F\u7528 `#editor.tabSize#` \u4E2D\u7684\u503C\u3002\u5F53 `#editor.detectIndentation#` \u5904\u4E8E\u6253\u5F00\u72B6\u6001\u65F6\uFF0C\u5C06\u6839\u636E\u6587\u4EF6\u5185\u5BB9\u66FF\u4EE3\u6B64\u8BBE\u7F6E\u3002',"\u6309 `Tab` \u65F6\u63D2\u5165\u7A7A\u683C\u3002\u5F53 {0} \u6253\u5F00\u65F6\uFF0C\u5C06\u6839\u636E\u6587\u4EF6\u5185\u5BB9\u66FF\u4EE3\u6B64\u8BBE\u7F6E\u3002","\u63A7\u5236\u5728\u57FA\u4E8E\u6587\u4EF6\u5185\u5BB9\u6253\u5F00\u6587\u4EF6\u65F6\u662F\u5426\u81EA\u52A8\u68C0\u6D4B {0} \u548C {1}\u3002","\u5220\u9664\u81EA\u52A8\u63D2\u5165\u7684\u5C3E\u968F\u7A7A\u767D\u7B26\u53F7\u3002","\u5BF9\u5927\u578B\u6587\u4EF6\u8FDB\u884C\u7279\u6B8A\u5904\u7406\uFF0C\u7981\u7528\u67D0\u4E9B\u5185\u5B58\u5BC6\u96C6\u578B\u529F\u80FD\u3002","\u63A7\u5236\u662F\u5426\u6839\u636E\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u8BA1\u7B97\u81EA\u52A8\u8865\u5168\u5217\u8868\u3002","\u4EC5\u5EFA\u8BAE\u6D3B\u52A8\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","\u5EFA\u8BAE\u4F7F\u7528\u540C\u4E00\u8BED\u8A00\u7684\u6240\u6709\u6253\u5F00\u7684\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","\u5EFA\u8BAE\u6240\u6709\u6253\u5F00\u7684\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","\u63A7\u5236\u901A\u8FC7\u54EA\u4E9B\u6587\u6863\u8BA1\u7B97\u57FA\u4E8E\u5B57\u8BCD\u7684\u8865\u5168\u3002","\u5BF9\u6240\u6709\u989C\u8272\u4E3B\u9898\u542F\u7528\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","\u5BF9\u6240\u6709\u989C\u8272\u4E3B\u9898\u7981\u7528\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002",'\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u662F\u7531\u5F53\u524D\u989C\u8272\u4E3B\u9898\u7684 "semanticHighlighting" \u8BBE\u7F6E\u914D\u7F6E\u7684\u3002',"\u63A7\u5236\u662F\u5426\u4E3A\u652F\u6301\u5B83\u7684\u8BED\u8A00\u663E\u793A\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","\u4FDD\u6301\u901F\u89C8\u7F16\u8F91\u5668\u5904\u4E8E\u6253\u5F00\u72B6\u6001\uFF0C\u5373\u4F7F\u53CC\u51FB\u5176\u4E2D\u7684\u5185\u5BB9\u6216\u8005\u70B9\u51FB `Escape` \u952E\u4E5F\u662F\u5982\u6B64\u3002","\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u7684\u884C\u5C06\u4E0D\u4F1A\u88AB\u6807\u8BB0","\u63A7\u5236\u662F\u5426\u5E94\u5728 Web \u8F85\u52A9\u8FDB\u7A0B\u4E0A\u5F02\u6B65\u8FDB\u884C\u6807\u8BB0\u5316\u3002","\u63A7\u5236\u662F\u5426\u5E94\u8BB0\u5F55\u5F02\u6B65\u8BCD\u6C47\u5207\u5206\u3002\u4EC5\u7528\u4E8E\u8C03\u8BD5\u3002","\u63A7\u5236\u662F\u5426\u5E94\u5BF9\u65E7\u7248\u540E\u53F0\u4EE4\u724C\u5316\u9A8C\u8BC1\u5F02\u6B65\u4EE4\u724C\u5316\u3002\u53EF\u80FD\u4F1A\u51CF\u6162\u4EE4\u724C\u5316\u901F\u5EA6\u3002\u4EC5\u7528\u4E8E\u8C03\u8BD5\u3002","\u5B9A\u4E49\u589E\u52A0\u548C\u51CF\u5C11\u7F29\u8FDB\u7684\u62EC\u53F7\u3002","\u5DE6\u65B9\u62EC\u53F7\u5B57\u7B26\u6216\u5B57\u7B26\u4E32\u5E8F\u5217\u3002","\u53F3\u65B9\u62EC\u53F7\u5B57\u7B26\u6216\u5B57\u7B26\u4E32\u5E8F\u5217\u3002","\u5982\u679C\u542F\u7528\u65B9\u62EC\u53F7\u5BF9\u7740\u8272\uFF0C\u5219\u6309\u7167\u5176\u5D4C\u5957\u7EA7\u522B\u5B9A\u4E49\u5DF2\u7740\u8272\u7684\u65B9\u62EC\u53F7\u5BF9\u3002","\u5DE6\u65B9\u62EC\u53F7\u5B57\u7B26\u6216\u5B57\u7B26\u4E32\u5E8F\u5217\u3002","\u53F3\u65B9\u62EC\u53F7\u5B57\u7B26\u6216\u5B57\u7B26\u4E32\u5E8F\u5217\u3002","\u8D85\u65F6(\u4EE5\u6BEB\u79D2\u4E3A\u5355\u4F4D)\uFF0C\u4E4B\u540E\u5C06\u53D6\u6D88\u5DEE\u5F02\u8BA1\u7B97\u3002\u4F7F\u75280\u8868\u793A\u6CA1\u6709\u8D85\u65F6\u3002","\u8981\u4E3A\u5176\u8BA1\u7B97\u5DEE\u5F02\u7684\u6700\u5927\u6587\u4EF6\u5927\u5C0F(MB)\u3002\u4F7F\u7528 0 \u8868\u793A\u65E0\u9650\u5236\u3002","\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u663E\u793A\u65B9\u5F0F\u662F\u5E76\u6392\u8FD8\u662F\u5185\u8054\u3002","\u5982\u679C\u5DEE\u5F02\u7F16\u8F91\u5668\u5BBD\u5EA6\u5C0F\u4E8E\u6B64\u503C\uFF0C\u5219\u4F7F\u7528\u5185\u8054\u89C6\u56FE\u3002","\u5982\u679C\u542F\u7528\u5E76\u4E14\u7F16\u8F91\u5668\u5BBD\u5EA6\u592A\u5C0F\uFF0C\u5219\u4F7F\u7528\u5185\u8054\u89C6\u56FE\u3002","\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u4F1A\u5728\u5176\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u663E\u793A\u7BAD\u5934\u4EE5\u8FD8\u539F\u66F4\u6539\u3002","\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u5C06\u5FFD\u7565\u524D\u5BFC\u7A7A\u683C\u6216\u5C3E\u968F\u7A7A\u683C\u4E2D\u7684\u66F4\u6539\u3002","\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u662F\u5426\u4E3A\u6DFB\u52A0/\u5220\u9664\u7684\u66F4\u6539\u663E\u793A +/- \u6307\u793A\u7B26\u53F7\u3002","\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","\u6C38\u4E0D\u6362\u884C\u3002","\u5C06\u5728\u89C6\u533A\u5BBD\u5EA6\u5904\u6362\u884C\u3002","\u884C\u5C06\u6839\u636E {0} \u8BBE\u7F6E\u8FDB\u884C\u6362\u884C\u3002","\u4F7F\u7528\u65E7\u5DEE\u5F02\u7B97\u6CD5\u3002","\u4F7F\u7528\u9AD8\u7EA7\u5DEE\u5F02\u7B97\u6CD5\u3002","\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u672A\u66F4\u6539\u7684\u533A\u57DF\u3002","\u63A7\u5236\u7528\u4E8E\u672A\u66F4\u6539\u533A\u57DF\u7684\u884C\u6570\u3002","\u63A7\u5236\u5C06\u591A\u5C11\u884C\u7528\u4F5C\u672A\u66F4\u6539\u533A\u57DF\u7684\u6700\u5C0F\u503C\u3002","\u63A7\u5236\u5728\u6BD4\u8F83\u672A\u6539\u53D8\u7684\u533A\u57DF\u65F6\u4F7F\u7528\u591A\u5C11\u884C\u4F5C\u4E3A\u4E0A\u4E0B\u6587\u3002","\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u662F\u5426\u5E94\u663E\u793A\u68C0\u6D4B\u5230\u7684\u4EE3\u7801\u79FB\u52A8\u3002","\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7A7A\u4FEE\u9970\uFF0C\u4EE5\u67E5\u770B\u63D2\u5165\u6216\u5220\u9664\u5B57\u7B26\u7684\u4F4D\u7F6E\u3002"],"vs/editor/common/config/editorOptions":["\u8FDE\u63A5\u5C4F\u5E55\u9605\u8BFB\u5668\u540E\u4F7F\u7528\u5E73\u53F0 API \u8FDB\u884C\u68C0\u6D4B","\u9488\u5BF9\u5C4F\u5E55\u9605\u8BFB\u5668\u7684\u4F7F\u7528\u8FDB\u884C\u4F18\u5316","\u5047\u5B9A\u672A\u8FDE\u63A5\u5C4F\u5E55\u9605\u8BFB\u5668","\u63A7\u5236 UI \u662F\u5426\u5E94\u5728\u5DF2\u9488\u5BF9\u5C4F\u5E55\u9605\u8BFB\u5668\u8FDB\u884C\u4F18\u5316\u7684\u6A21\u5F0F\u4E0B\u8FD0\u884C\u3002","\u63A7\u5236\u5728\u6CE8\u91CA\u65F6\u662F\u5426\u63D2\u5165\u7A7A\u683C\u5B57\u7B26\u3002","\u63A7\u5236\u5728\u5BF9\u884C\u6CE8\u91CA\u6267\u884C\u5207\u6362\u3001\u6DFB\u52A0\u6216\u5220\u9664\u64CD\u4F5C\u65F6\uFF0C\u662F\u5426\u5E94\u5FFD\u7565\u7A7A\u884C\u3002","\u63A7\u5236\u5728\u6CA1\u6709\u9009\u62E9\u5185\u5BB9\u65F6\u8FDB\u884C\u590D\u5236\u662F\u5426\u590D\u5236\u5F53\u524D\u884C\u3002","\u63A7\u5236\u5728\u952E\u5165\u65F6\u5149\u6807\u662F\u5426\u5E94\u8DF3\u8F6C\u4EE5\u67E5\u627E\u5339\u914D\u9879\u3002","\u5207\u52FF\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\u3002","\u59CB\u7EC8\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\uFF0C\u5305\u62EC\u5149\u6807\u4F4D\u7F6E\u7684\u5B57\u8BCD\u3002","\u4EC5\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\u3002","\u63A7\u5236\u662F\u5426\u5C06\u7F16\u8F91\u5668\u9009\u4E2D\u5185\u5BB9\u4F5C\u4E3A\u641C\u7D22\u8BCD\u586B\u5165\u5230\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u3002","\u4ECE\u4E0D\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D(\u9ED8\u8BA4)\u3002","\u59CB\u7EC8\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u3002","\u9009\u62E9\u591A\u884C\u5185\u5BB9\u65F6\uFF0C\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u3002","\u63A7\u5236\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u7684\u6761\u4EF6\u3002","\u63A7\u5236\u201C\u67E5\u627E\u201D\u5C0F\u7EC4\u4EF6\u662F\u5426\u8BFB\u53D6\u6216\u4FEE\u6539 macOS \u7684\u5171\u4EAB\u67E5\u627E\u526A\u8D34\u677F\u3002",'\u63A7\u5236 "\u67E5\u627E\u5C0F\u90E8\u4EF6" \u662F\u5426\u5E94\u5728\u7F16\u8F91\u5668\u9876\u90E8\u6DFB\u52A0\u989D\u5916\u7684\u884C\u3002\u5982\u679C\u4E3A true, \u5219\u53EF\u4EE5\u5728 "\u67E5\u627E\u5C0F\u5DE5\u5177" \u53EF\u89C1\u65F6\u6EDA\u52A8\u5230\u7B2C\u4E00\u884C\u4E4B\u5916\u3002',"\u63A7\u5236\u5728\u627E\u4E0D\u5230\u5176\u4ED6\u5339\u914D\u9879\u65F6\uFF0C\u662F\u5426\u81EA\u52A8\u4ECE\u5F00\u5934(\u6216\u7ED3\u5C3E)\u91CD\u65B0\u5F00\u59CB\u641C\u7D22\u3002",'\u542F\u7528/\u7981\u7528\u5B57\u4F53\u8FDE\u5B57("calt" \u548C "liga" \u5B57\u4F53\u7279\u6027)\u3002\u5C06\u6B64\u66F4\u6539\u4E3A\u5B57\u7B26\u4E32\uFF0C\u53EF\u5BF9 "font-feature-settings" CSS \u5C5E\u6027\u8FDB\u884C\u7CBE\u7EC6\u63A7\u5236\u3002','\u663E\u5F0F "font-feature-settings" CSS \u5C5E\u6027\u3002\u5982\u679C\u53EA\u9700\u6253\u5F00/\u5173\u95ED\u8FDE\u5B57\uFF0C\u53EF\u4EE5\u6539\u4E3A\u4F20\u9012\u5E03\u5C14\u503C\u3002','\u914D\u7F6E\u5B57\u4F53\u8FDE\u5B57\u6216\u5B57\u4F53\u7279\u6027\u3002\u53EF\u4EE5\u662F\u7528\u4E8E\u542F\u7528/\u7981\u7528\u8FDE\u5B57\u7684\u5E03\u5C14\u503C\uFF0C\u6216\u7528\u4E8E\u8BBE\u7F6E CSS "font-feature-settings" \u5C5E\u6027\u503C\u7684\u5B57\u7B26\u4E32\u3002',"\u542F\u7528/\u7981\u7528\u4ECE font-weight \u5230 font-variation-settings \u7684\u8F6C\u6362\u3002\u5C06\u6B64\u9879\u66F4\u6539\u4E3A\u5B57\u7B26\u4E32\uFF0C\u4EE5\u4FBF\u5BF9\u201Cfont-variation-settings\u201DCSS \u5C5E\u6027\u8FDB\u884C\u7EC6\u5316\u63A7\u5236\u3002","\u663E\u5F0F\u201Cfont-variation-settings\u201DCSS \u5C5E\u6027\u3002\u5982\u679C\u53EA\u9700\u5C06 font-weight \u8F6C\u6362\u4E3A font-variation-settings\uFF0C\u5219\u53EF\u4EE5\u6539\u4E3A\u4F20\u9012\u5E03\u5C14\u503C\u3002","\u914D\u7F6E\u5B57\u4F53\u53D8\u4F53\u3002\u53EF\u4EE5\u662F\u7528\u4E8E\u542F\u7528/\u7981\u7528\u4ECE font-weight \u5230 font-variation-settings \u7684\u8F6C\u6362\u7684\u5E03\u5C14\u503C\uFF0C\u4E5F\u53EF\u4EE5\u662F CSS\u201Cfont-variation-settings\u201D\u5C5E\u6027\u503C\u7684\u5B57\u7B26\u4E32\u3002","\u63A7\u5236\u5B57\u4F53\u5927\u5C0F(\u50CF\u7D20)\u3002","\u4EC5\u5141\u8BB8\u4F7F\u7528\u5173\u952E\u5B57\u201C\u6B63\u5E38\u201D\u548C\u201C\u52A0\u7C97\u201D\uFF0C\u6216\u4F7F\u7528\u4ECB\u4E8E 1 \u81F3 1000 \u4E4B\u95F4\u7684\u6570\u5B57\u3002","\u63A7\u5236\u5B57\u4F53\u7C97\u7EC6\u3002\u63A5\u53D7\u5173\u952E\u5B57\u201C\u6B63\u5E38\u201D\u548C\u201C\u52A0\u7C97\u201D\uFF0C\u6216\u8005\u63A5\u53D7\u4ECB\u4E8E 1 \u81F3 1000 \u4E4B\u95F4\u7684\u6570\u5B57\u3002","\u663E\u793A\u7ED3\u679C\u7684\u901F\u89C8\u89C6\u56FE(\u9ED8\u8BA4)","\u8F6C\u5230\u4E3B\u7ED3\u679C\u5E76\u663E\u793A\u901F\u89C8\u89C6\u56FE","\u8F6C\u5230\u4E3B\u7ED3\u679C\uFF0C\u5E76\u5BF9\u5176\u4ED6\u7ED3\u679C\u542F\u7528\u65E0\u901F\u89C8\u5BFC\u822A",'\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528\u5355\u72EC\u7684\u8BBE\u7F6E\uFF0C\u5982"editor.editor.gotoLocation.multipleDefinitions"\u6216"editor.editor.gotoLocation.multipleImplementations"\u3002','\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5B9A\u4E49"\u547D\u4EE4\u7684\u884C\u4E3A\u3002','\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49"\u547D\u4EE4\u7684\u884C\u4E3A\u3002','\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u58F0\u660E"\u547D\u4EE4\u7684\u884C\u4E3A\u3002','\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5B9E\u73B0"\u547D\u4EE4\u7684\u884C\u4E3A\u3002','\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5F15\u7528"\u547D\u4EE4\u7684\u884C\u4E3A\u3002','\u5F53"\u8F6C\u5230\u5B9A\u4E49"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002','\u5F53"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49"\u7684\u7ED3\u679C\u662F\u5F53\u524D\u4F4D\u7F6E\u65F6\u6B63\u5728\u6267\u884C\u7684\u5907\u7528\u547D\u4EE4 ID\u3002','\u5F53"\u8F6C\u5230\u58F0\u660E"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002','\u5F53"\u8F6C\u5230\u5B9E\u73B0"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002','\u5F53"\u8F6C\u5230\u5F15\u7528"\u7684\u7ED3\u679C\u662F\u5F53\u524D\u4F4D\u7F6E\u65F6\u6B63\u5728\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4 ID\u3002',"\u63A7\u5236\u662F\u5426\u663E\u793A\u60AC\u505C\u63D0\u793A\u3002","\u63A7\u5236\u663E\u793A\u60AC\u505C\u63D0\u793A\u524D\u7684\u7B49\u5F85\u65F6\u95F4 (\u6BEB\u79D2)\u3002","\u63A7\u5236\u5F53\u9F20\u6807\u79FB\u52A8\u5230\u60AC\u505C\u63D0\u793A\u4E0A\u65F6\uFF0C\u5176\u662F\u5426\u4FDD\u6301\u53EF\u89C1\u3002","\u63A7\u5236\u9690\u85CF\u60AC\u505C\u540E\u7684\u5EF6\u8FDF\u65F6\u95F4(\u6BEB\u79D2)\u3002\u9700\u8981\u542F\u7528 `editor.hover.sticky`\u3002","\u5982\u679C\u6709\u7A7A\u95F4\uFF0C\u9996\u9009\u5728\u7EBF\u6761\u4E0A\u65B9\u663E\u793A\u60AC\u505C\u3002","\u5047\u5B9A\u6240\u6709\u5B57\u7B26\u7684\u5BBD\u5EA6\u76F8\u540C\u3002\u8FD9\u662F\u4E00\u79CD\u5FEB\u901F\u7B97\u6CD5\uFF0C\u9002\u7528\u4E8E\u7B49\u5BBD\u5B57\u4F53\u548C\u67D0\u4E9B\u5B57\u5F62\u5BBD\u5EA6\u76F8\u7B49\u7684\u6587\u5B57(\u5982\u62C9\u4E01\u5B57\u7B26)\u3002","\u5C06\u5305\u88C5\u70B9\u8BA1\u7B97\u59D4\u6258\u7ED9\u6D4F\u89C8\u5668\u3002\u8FD9\u662F\u4E00\u4E2A\u7F13\u6162\u7B97\u6CD5\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u5927\u578B\u6587\u4EF6\u88AB\u51BB\u7ED3\uFF0C\u4F46\u5B83\u5728\u6240\u6709\u60C5\u51B5\u4E0B\u90FD\u6B63\u5E38\u5DE5\u4F5C\u3002","\u63A7\u5236\u8BA1\u7B97\u5305\u88C5\u70B9\u7684\u7B97\u6CD5\u3002\u8BF7\u6CE8\u610F\uFF0C\u5728\u8F85\u52A9\u529F\u80FD\u6A21\u5F0F\u4E0B\uFF0C\u9AD8\u7EA7\u7248\u5C06\u7528\u4E8E\u63D0\u4F9B\u6700\u4F73\u4F53\u9A8C\u3002","\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u64CD\u4F5C\u5C0F\u706F\u6CE1\u63D0\u793A\u3002","\u5728\u7F16\u8F91\u5668\u9876\u90E8\u7684\u6EDA\u52A8\u8FC7\u7A0B\u4E2D\u663E\u793A\u5D4C\u5957\u7684\u5F53\u524D\u4F5C\u7528\u57DF\u3002","\u5B9A\u4E49\u8981\u663E\u793A\u7684\u6700\u5927\u7C98\u6EDE\u884C\u6570\u3002","\u5B9A\u4E49\u7528\u4E8E\u786E\u5B9A\u8981\u7C98\u8D34\u7684\u884C\u7684\u6A21\u578B\u3002\u5982\u679C\u5927\u7EB2\u6A21\u578B\u4E0D\u5B58\u5728\uFF0C\u5B83\u5C06\u56DE\u9000\u5230\u56DE\u9000\u5230\u7F29\u8FDB\u6A21\u578B\u7684\u6298\u53E0\u63D0\u4F9B\u7A0B\u5E8F\u6A21\u578B\u4E0A\u3002\u5728\u6240\u6709\u4E09\u79CD\u60C5\u51B5\u4E0B\u90FD\u9075\u5FAA\u6B64\u987A\u5E8F\u3002","\u4F7F\u7528\u7F16\u8F91\u5668\u7684\u6C34\u5E73\u6EDA\u52A8\u6761\u542F\u7528\u7C98\u6EDE\u6EDA\u52A8\u5C0F\u7EC4\u4EF6\u6EDA\u52A8\u3002","\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u5185\u8054\u63D0\u793A\u3002","\u5DF2\u542F\u7528\u5185\u5D4C\u63D0\u793A","\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u663E\u793A\u5185\u5D4C\u63D0\u793A\uFF0C\u5E76\u5728\u6309\u4F4F {0} \u65F6\u9690\u85CF","\u9ED8\u8BA4\u60C5\u51B5\u4E0B\u9690\u85CF\u5185\u5D4C\u63D0\u793A\uFF0C\u5E76\u5728\u6309\u4F4F {0} \u65F6\u663E\u793A","\u5DF2\u7981\u7528\u5185\u5D4C\u63D0\u793A","\u63A7\u5236\u7F16\u8F91\u5668\u4E2D\u5D4C\u5165\u63D0\u793A\u7684\u5B57\u53F7\u3002\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0C\u5F53\u914D\u7F6E\u7684\u503C\u5C0F\u4E8E {1} \u6216\u5927\u4E8E\u7F16\u8F91\u5668\u5B57\u53F7\u65F6\uFF0C\u5C06\u4F7F\u7528 {0}\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u4E2D\u5D4C\u5165\u63D0\u793A\u7684\u5B57\u4F53\u7CFB\u5217\u3002\u8BBE\u7F6E\u4E3A\u7A7A\u65F6\uFF0C\u5C06\u4F7F\u7528 {0}\u3002","\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u53E0\u52A0\u63D0\u793A\u5468\u56F4\u7684\u586B\u5145\u3002",`\u63A7\u5236\u884C\u9AD8\u3002\r - - \u4F7F\u7528 0 \u6839\u636E\u5B57\u53F7\u81EA\u52A8\u8BA1\u7B97\u884C\u9AD8\u3002\r - - \u4ECB\u4E8E 0 \u548C 8 \u4E4B\u95F4\u7684\u503C\u5C06\u7528\u4F5C\u5B57\u53F7\u7684\u4E58\u6570\u3002\r - - \u5927\u4E8E\u6216\u7B49\u4E8E 8 \u7684\u503C\u5C06\u7528\u4F5C\u6709\u6548\u503C\u3002`,"\u63A7\u5236\u662F\u5426\u663E\u793A\u7F29\u7565\u56FE\u3002","\u63A7\u5236\u662F\u5426\u81EA\u52A8\u9690\u85CF\u7F29\u7565\u56FE\u3002","\u8FF7\u4F60\u5730\u56FE\u7684\u5927\u5C0F\u4E0E\u7F16\u8F91\u5668\u5185\u5BB9\u76F8\u540C(\u5E76\u4E14\u53EF\u80FD\u6EDA\u52A8)\u3002","\u8FF7\u4F60\u5730\u56FE\u5C06\u6839\u636E\u9700\u8981\u62C9\u4F38\u6216\u7F29\u5C0F\u4EE5\u586B\u5145\u7F16\u8F91\u5668\u7684\u9AD8\u5EA6(\u4E0D\u6EDA\u52A8)\u3002","\u8FF7\u4F60\u5730\u56FE\u5C06\u6839\u636E\u9700\u8981\u7F29\u5C0F\uFF0C\u6C38\u8FDC\u4E0D\u4F1A\u5927\u4E8E\u7F16\u8F91\u5668(\u4E0D\u6EDA\u52A8)\u3002","\u63A7\u5236\u8FF7\u4F60\u5730\u56FE\u7684\u5927\u5C0F\u3002","\u63A7\u5236\u5728\u54EA\u4E00\u4FA7\u663E\u793A\u7F29\u7565\u56FE\u3002","\u63A7\u5236\u4F55\u65F6\u663E\u793A\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u3002","\u5728\u8FF7\u4F60\u5730\u56FE\u4E2D\u7ED8\u5236\u7684\u5185\u5BB9\u6BD4\u4F8B: 1\u30012 \u6216 3\u3002","\u6E32\u67D3\u6BCF\u884C\u7684\u5B9E\u9645\u5B57\u7B26\uFF0C\u800C\u4E0D\u662F\u8272\u5757\u3002","\u9650\u5236\u7F29\u7565\u56FE\u7684\u5BBD\u5EA6\uFF0C\u63A7\u5236\u5176\u6700\u591A\u663E\u793A\u7684\u5217\u6570\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u7684\u9876\u8FB9\u548C\u7B2C\u4E00\u884C\u4E4B\u95F4\u7684\u95F4\u8DDD\u91CF\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5E95\u8FB9\u548C\u6700\u540E\u4E00\u884C\u4E4B\u95F4\u7684\u95F4\u8DDD\u91CF\u3002","\u5728\u8F93\u5165\u65F6\u663E\u793A\u542B\u6709\u53C2\u6570\u6587\u6863\u548C\u7C7B\u578B\u4FE1\u606F\u7684\u5C0F\u9762\u677F\u3002","\u63A7\u5236\u53C2\u6570\u63D0\u793A\u83DC\u5355\u5728\u5230\u8FBE\u5217\u8868\u672B\u5C3E\u65F6\u8FDB\u884C\u5FAA\u73AF\u8FD8\u662F\u5173\u95ED\u3002","\u5FEB\u901F\u5EFA\u8BAE\u663E\u793A\u5728\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u5185","\u5FEB\u901F\u5EFA\u8BAE\u663E\u793A\u4E3A\u865A\u5F71\u6587\u672C","\u5DF2\u7981\u7528\u5FEB\u901F\u5EFA\u8BAE","\u5728\u5B57\u7B26\u4E32\u5185\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","\u5728\u6CE8\u91CA\u5185\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","\u5728\u5B57\u7B26\u4E32\u548C\u6CE8\u91CA\u5916\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","\u63A7\u5236\u952E\u5165\u65F6\u662F\u5426\u5E94\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002\u8FD9\u53EF\u4EE5\u7528\u4E8E\u5728\u6CE8\u91CA\u3001\u5B57\u7B26\u4E32\u548C\u5176\u4ED6\u4EE3\u7801\u4E2D\u952E\u5165\u65F6\u8FDB\u884C\u63A7\u5236\u3002\u53EF\u914D\u7F6E\u5FEB\u901F\u5EFA\u8BAE\u4EE5\u663E\u793A\u4E3A\u865A\u5F71\u6587\u672C\u6216\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u3002\u53E6\u8BF7\u6CE8\u610F\u63A7\u5236\u5EFA\u8BAE\u662F\u5426\u7531\u7279\u6B8A\u5B57\u7B26\u89E6\u53D1\u7684\u201C{0}\u201D\u8BBE\u7F6E\u3002","\u4E0D\u663E\u793A\u884C\u53F7\u3002","\u5C06\u884C\u53F7\u663E\u793A\u4E3A\u7EDD\u5BF9\u884C\u6570\u3002","\u5C06\u884C\u53F7\u663E\u793A\u4E3A\u4E0E\u5149\u6807\u76F8\u9694\u7684\u884C\u6570\u3002","\u6BCF 10 \u884C\u663E\u793A\u4E00\u6B21\u884C\u53F7\u3002","\u63A7\u5236\u884C\u53F7\u7684\u663E\u793A\u3002","\u6B64\u7F16\u8F91\u5668\u6807\u5C3A\u5C06\u6E32\u67D3\u7684\u7B49\u5BBD\u5B57\u7B26\u6570\u3002","\u6B64\u7F16\u8F91\u5668\u6807\u5C3A\u7684\u989C\u8272\u3002","\u5728\u4E00\u5B9A\u6570\u91CF\u7684\u7B49\u5BBD\u5B57\u7B26\u540E\u663E\u793A\u5782\u76F4\u6807\u5C3A\u3002\u8F93\u5165\u591A\u4E2A\u503C\uFF0C\u663E\u793A\u591A\u4E2A\u6807\u5C3A\u3002\u82E5\u6570\u7EC4\u4E3A\u7A7A\uFF0C\u5219\u4E0D\u7ED8\u5236\u6807\u5C3A\u3002","\u5782\u76F4\u6EDA\u52A8\u6761\u4EC5\u5728\u5FC5\u8981\u65F6\u53EF\u89C1\u3002","\u5782\u76F4\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u53EF\u89C1\u3002","\u5782\u76F4\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u9690\u85CF\u3002","\u63A7\u5236\u5782\u76F4\u6EDA\u52A8\u6761\u7684\u53EF\u89C1\u6027\u3002","\u6C34\u5E73\u6EDA\u52A8\u6761\u4EC5\u5728\u5FC5\u8981\u65F6\u53EF\u89C1\u3002","\u6C34\u5E73\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u53EF\u89C1\u3002","\u6C34\u5E73\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u9690\u85CF\u3002","\u63A7\u5236\u6C34\u5E73\u6EDA\u52A8\u6761\u7684\u53EF\u89C1\u6027\u3002","\u5782\u76F4\u6EDA\u52A8\u6761\u7684\u5BBD\u5EA6\u3002","\u6C34\u5E73\u6EDA\u52A8\u6761\u7684\u9AD8\u5EA6\u3002","\u63A7\u5236\u5355\u51FB\u6309\u9875\u6EDA\u52A8\u8FD8\u662F\u8DF3\u8F6C\u5230\u5355\u51FB\u4F4D\u7F6E\u3002","\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u6240\u6709\u975E\u57FA\u672C ASCII \u5B57\u7B26\u3002\u53EA\u6709\u4ECB\u4E8E U+0020 \u5230 U+007E \u4E4B\u95F4\u7684\u5B57\u7B26\u3001\u5236\u8868\u7B26\u3001\u6362\u884C\u7B26\u548C\u56DE\u8F66\u7B26\u624D\u88AB\u89C6\u4E3A\u57FA\u672C ASCII\u3002","\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u4EC5\u4FDD\u7559\u7A7A\u683C\u6216\u5B8C\u5168\u6CA1\u6709\u5BBD\u5EA6\u7684\u5B57\u7B26\u3002","\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u53EF\u80FD\u4E0E\u57FA\u672C ASCII \u5B57\u7B26\u6DF7\u6DC6\u7684\u5B57\u7B26\uFF0C\u4F46\u5F53\u524D\u7528\u6237\u533A\u57DF\u8BBE\u7F6E\u4E2D\u5E38\u89C1\u7684\u5B57\u7B26\u9664\u5916\u3002","\u63A7\u5236\u6CE8\u91CA\u4E2D\u7684\u5B57\u7B26\u662F\u5426\u4E5F\u5E94\u8FDB\u884C Unicode \u7A81\u51FA\u663E\u793A\u3002","\u63A7\u5236\u5B57\u7B26\u4E32\u4E2D\u7684\u5B57\u7B26\u662F\u5426\u4E5F\u5E94\u8FDB\u884C Unicode \u7A81\u51FA\u663E\u793A\u3002","\u5B9A\u4E49\u672A\u7A81\u51FA\u663E\u793A\u7684\u5141\u8BB8\u5B57\u7B26\u3002","\u672A\u7A81\u51FA\u663E\u793A\u5728\u5141\u8BB8\u533A\u57DF\u8BBE\u7F6E\u4E2D\u5E38\u89C1\u7684 Unicode \u5B57\u7B26\u3002","\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","\u6BCF\u5F53\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u65F6\uFF0C\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","\u5C06\u9F20\u6807\u60AC\u505C\u5728\u5185\u8054\u5EFA\u8BAE\u4E0A\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","\u63A7\u5236\u4F55\u65F6\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u5DE5\u5177\u680F\u3002","\u63A7\u5236\u5185\u8054\u5EFA\u8BAE\u5982\u4F55\u4E0E\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4EA4\u4E92\u3002\u5982\u679C\u542F\u7528\uFF0C\u5F53\u5185\u8054\u5EFA\u8BAE\u53EF\u7528\u65F6\uFF0C\u4E0D\u4F1A\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u3002","\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002\u8BF7\u4F7F\u7528 {0} \u91CD\u5199\u62EC\u53F7\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","\u63A7\u5236\u6BCF\u4E2A\u65B9\u62EC\u53F7\u7C7B\u578B\u662F\u5426\u5177\u6709\u81EA\u5DF1\u7684\u72EC\u7ACB\u989C\u8272\u6C60\u3002","\u542F\u7528\u62EC\u53F7\u5BF9\u53C2\u8003\u7EBF\u3002","\u4EC5\u4E3A\u6D3B\u52A8\u62EC\u53F7\u5BF9\u542F\u7528\u62EC\u53F7\u5BF9\u53C2\u8003\u7EBF\u3002","\u7981\u7528\u62EC\u53F7\u5BF9\u53C2\u8003\u7EBF\u3002","\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u542F\u7528\u6C34\u5E73\u53C2\u8003\u7EBF\u4F5C\u4E3A\u5782\u76F4\u62EC\u53F7\u5BF9\u53C2\u8003\u7EBF\u7684\u6DFB\u52A0\u9879\u3002","\u4EC5\u4E3A\u6D3B\u52A8\u62EC\u53F7\u5BF9\u542F\u7528\u6C34\u5E73\u53C2\u8003\u7EBF\u3002","\u7981\u7528\u6C34\u5E73\u62EC\u53F7\u5BF9\u53C2\u8003\u7EBF\u3002","\u63A7\u5236\u662F\u5426\u542F\u7528\u6C34\u5E73\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u7A81\u51FA\u663E\u793A\u6D3B\u52A8\u7684\u62EC\u53F7\u5BF9\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","\u7A81\u51FA\u663E\u793A\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","\u7A81\u51FA\u663E\u793A\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF\uFF0C\u5373\u4F7F\u7A81\u51FA\u663E\u793A\u4E86\u62EC\u53F7\u53C2\u8003\u7EBF\u3002","\u4E0D\u8981\u7A81\u51FA\u663E\u793A\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u7F16\u8F91\u5668\u4E2D\u6D3B\u52A8\u7684\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","\u63D2\u5165\u5EFA\u8BAE\u800C\u4E0D\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","\u63D2\u5165\u5EFA\u8BAE\u5E76\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","\u63A7\u5236\u63A5\u53D7\u8865\u5168\u65F6\u662F\u5426\u8986\u76D6\u5355\u8BCD\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u6269\u5C55\u9009\u62E9\u4F7F\u7528\u6B64\u529F\u80FD\u3002","\u63A7\u5236\u5BF9\u5EFA\u8BAE\u7684\u7B5B\u9009\u548C\u6392\u5E8F\u662F\u5426\u8003\u8651\u5C0F\u7684\u62FC\u5199\u9519\u8BEF\u3002","\u63A7\u5236\u6392\u5E8F\u65F6\u662F\u5426\u9996\u9009\u5149\u6807\u9644\u8FD1\u7684\u5B57\u8BCD\u3002","\u63A7\u5236\u662F\u5426\u5728\u591A\u4E2A\u5DE5\u4F5C\u533A\u548C\u7A97\u53E3\u95F4\u5171\u4EAB\u8BB0\u5FC6\u7684\u5EFA\u8BAE\u9009\u9879(\u9700\u8981 `#editor.suggestSelection#`)\u3002","\u81EA\u52A8\u89E6\u53D1 IntelliSense \u65F6\u59CB\u7EC8\u9009\u62E9\u5EFA\u8BAE\u3002","\u81EA\u52A8\u89E6\u53D1 IntelliSense \u65F6\uFF0C\u5207\u52FF\u9009\u62E9\u5EFA\u8BAE\u3002","\u4EC5\u5F53\u4ECE\u89E6\u53D1\u5668\u5B57\u7B26\u89E6\u53D1 IntelliSense \u65F6\uFF0C\u624D\u9009\u62E9\u5EFA\u8BAE\u3002","\u4EC5\u5728\u952E\u5165\u65F6\u89E6\u53D1 IntelliSense \u65F6\u624D\u9009\u62E9\u5EFA\u8BAE\u3002","\u63A7\u5236\u5728\u663E\u793A\u5C0F\u7EC4\u4EF6\u65F6\u662F\u5426\u9009\u62E9\u5EFA\u8BAE\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u4EC5\u9002\u7528\u4E8E(\u201C#editor.quickSuggestions#\u201D\u548C\u201C#editor.suggestOnTriggerCharacters#\u201D)\u81EA\u52A8\u89E6\u53D1\u7684\u5EFA\u8BAE\uFF0C\u5E76\u4E14\u59CB\u7EC8\u5728\u663E\u5F0F\u8C03\u7528\u65F6\u9009\u62E9\u5EFA\u8BAE\uFF0C\u4F8B\u5982\u901A\u8FC7\u201CCtrl+Space\u201D\u3002","\u63A7\u5236\u6D3B\u52A8\u4EE3\u7801\u6BB5\u662F\u5426\u963B\u6B62\u5FEB\u901F\u5EFA\u8BAE\u3002","\u63A7\u5236\u662F\u5426\u5728\u5EFA\u8BAE\u4E2D\u663E\u793A\u6216\u9690\u85CF\u56FE\u6807\u3002","\u63A7\u5236\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u5E95\u90E8\u7684\u72B6\u6001\u680F\u7684\u53EF\u89C1\u6027\u3002","\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u9884\u89C8\u5EFA\u8BAE\u7ED3\u679C\u3002","\u63A7\u5236\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u968F\u6807\u7B7E\u5185\u8054\u663E\u793A\u8FD8\u662F\u4EC5\u663E\u793A\u5728\u8BE6\u7EC6\u4FE1\u606F\u5C0F\u7EC4\u4EF6\u4E2D\u3002","\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\u3002\u73B0\u5728\u53EF\u4EE5\u8C03\u6574\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5927\u5C0F\u3002",'\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528\u5355\u72EC\u7684\u8BBE\u7F6E\uFF0C\u5982"editor.suggest.showKeywords"\u6216"editor.suggest.showSnippets"\u3002',"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u65B9\u6CD5\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6784\u9020\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A`\u5DF2\u5F03\u7528`\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u7B5B\u9009\u8981\u6C42\u7B2C\u4E00\u4E2A\u5B57\u7B26\u5728\u5355\u8BCD\u5F00\u5934\u5339\u914D\uFF0C\u4F8B\u5982 \u201CConsole\u201D \u6216 \u201CWebContext\u201D \u4E0A\u7684 \u201Cc\u201D\uFF0C\u4F46 \u201Cdescription\u201D \u4E0A\u7684 _not_\u3002\u7981\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u66F4\u591A\u7ED3\u679C\uFF0C\u4F46\u4ECD\u6309\u5339\u914D\u8D28\u91CF\u5BF9\u5176\u8FDB\u884C\u6392\u5E8F\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5B57\u6BB5\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53D8\u91CF\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7C7B\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7ED3\u6784\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u63A5\u53E3\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6A21\u5757\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5C5E\u6027\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u4E8B\u4EF6\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u64CD\u4F5C\u7B26\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5355\u4F4D\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u503C\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5E38\u91CF\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u679A\u4E3E\u201D\u5EFA\u8BAE\u3002",'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "enumMember" \u5EFA\u8BAE\u3002',"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5173\u952E\u5B57\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u672C\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u989C\u8272\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53C2\u8003\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u81EA\u5B9A\u4E49\u989C\u8272\u201D\u5EFA\u8BAE\u3002","\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u5939\u201D\u5EFA\u8BAE\u3002",'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "typeParameter" \u5EFA\u8BAE\u3002',"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7247\u6BB5\u201D\u5EFA\u8BAE\u3002",'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u7528\u6237"\u5EFA\u8BAE\u3002','\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u95EE\u9898"\u5EFA\u8BAE\u3002',"\u662F\u5426\u5E94\u59CB\u7EC8\u9009\u62E9\u524D\u5BFC\u548C\u5C3E\u968F\u7A7A\u683C\u3002","\u662F\u5426\u5E94\u9009\u62E9\u5B50\u5B57(\u5982\u201CfooBar\u201D\u6216\u201Cfoo_bar\u201D\u4E2D\u7684\u201Cfoo\u201D)\u3002","\u6CA1\u6709\u7F29\u8FDB\u3002\u6298\u884C\u4ECE\u7B2C 1 \u5217\u5F00\u59CB\u3002","\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u4E0E\u5176\u7236\u7EA7\u76F8\u540C\u3002","\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u6BD4\u5176\u7236\u7EA7\u591A 1\u3002","\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u6BD4\u5176\u7236\u7EA7\u591A 2\u3002","\u63A7\u5236\u6298\u884C\u7684\u7F29\u8FDB\u3002","\u63A7\u5236\u662F\u5426\u53EF\u4EE5\u901A\u8FC7\u6309\u4F4F `Shift` (\u800C\u4E0D\u662F\u5728\u7F16\u8F91\u5668\u4E2D\u6253\u5F00\u6587\u4EF6)\u5C06\u6587\u4EF6\u62D6\u653E\u5230\u7F16\u8F91\u5668\u4E2D\u3002","\u63A7\u5236\u5C06\u6587\u4EF6\u653E\u5165\u7F16\u8F91\u5668\u65F6\u662F\u5426\u663E\u793A\u5C0F\u7EC4\u4EF6\u3002\u4F7F\u7528\u6B64\u5C0F\u7EC4\u4EF6\u53EF\u4EE5\u63A7\u5236\u6587\u4EF6\u7684\u5220\u9664\u65B9\u5F0F\u3002","\u5C06\u6587\u4EF6\u653E\u5165\u7F16\u8F91\u5668\u540E\u663E\u793A\u653E\u7F6E\u9009\u62E9\u5668\u5C0F\u7EC4\u4EF6\u3002","\u5207\u52FF\u663E\u793A\u653E\u7F6E\u9009\u62E9\u5668\u5C0F\u7EC4\u4EF6\u3002\u800C\u662F\u59CB\u7EC8\u4F7F\u7528\u9ED8\u8BA4\u5220\u9664\u63D0\u4F9B\u7A0B\u5E8F\u3002","\u63A7\u5236\u662F\u5426\u53EF\u4EE5\u4EE5\u4E0D\u540C\u7684\u65B9\u5F0F\u7C98\u8D34\u5185\u5BB9\u3002","\u63A7\u5236\u5C06\u5185\u5BB9\u7C98\u8D34\u5230\u7F16\u8F91\u5668\u65F6\u662F\u5426\u663E\u793A\u5C0F\u7EC4\u4EF6\u3002\u4F7F\u7528\u6B64\u5C0F\u7EC4\u4EF6\u53EF\u4EE5\u63A7\u5236\u6587\u4EF6\u7684\u7C98\u8D34\u65B9\u5F0F\u3002","\u5C06\u5185\u5BB9\u7C98\u8D34\u5230\u7F16\u8F91\u5668\u540E\u663E\u793A\u7C98\u8D34\u9009\u62E9\u5668\u5C0F\u7EC4\u4EF6\u3002","\u5207\u52FF\u663E\u793A\u7C98\u8D34\u9009\u62E9\u5668\u5C0F\u7EC4\u4EF6\u3002\u800C\u662F\u59CB\u7EC8\u4F7F\u7528\u9ED8\u8BA4\u7C98\u8D34\u884C\u4E3A\u3002","\u63A7\u5236\u662F\u5426\u5E94\u5728\u9047\u5230\u63D0\u4EA4\u5B57\u7B26\u65F6\u63A5\u53D7\u5EFA\u8BAE\u3002\u4F8B\u5982\uFF0C\u5728 JavaScript \u4E2D\uFF0C\u534A\u89D2\u5206\u53F7 (`;`) \u53EF\u4EE5\u4E3A\u63D0\u4EA4\u5B57\u7B26\uFF0C\u80FD\u591F\u5728\u63A5\u53D7\u5EFA\u8BAE\u7684\u540C\u65F6\u952E\u5165\u8BE5\u5B57\u7B26\u3002","\u4EC5\u5F53\u5EFA\u8BAE\u5305\u542B\u6587\u672C\u6539\u52A8\u65F6\u624D\u53EF\u4F7F\u7528 `Enter` \u952E\u8FDB\u884C\u63A5\u53D7\u3002","\u63A7\u5236\u9664\u4E86 `Tab` \u952E\u4EE5\u5916\uFF0C `Enter` \u952E\u662F\u5426\u540C\u6837\u53EF\u4EE5\u63A5\u53D7\u5EFA\u8BAE\u3002\u8FD9\u80FD\u51CF\u5C11\u201C\u63D2\u5165\u65B0\u884C\u201D\u548C\u201C\u63A5\u53D7\u5EFA\u8BAE\u201D\u547D\u4EE4\u4E4B\u95F4\u7684\u6B67\u4E49\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u4E2D\u53EF\u7531\u5C4F\u5E55\u9605\u8BFB\u5668\u4E00\u6B21\u8BFB\u51FA\u7684\u884C\u6570\u3002\u6211\u4EEC\u68C0\u6D4B\u5230\u5C4F\u5E55\u9605\u8BFB\u5668\u65F6\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9ED8\u8BA4\u503C\u8BBE\u7F6E\u4E3A 500\u3002\u8B66\u544A: \u5982\u679C\u884C\u6570\u5927\u4E8E\u9ED8\u8BA4\u503C\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u6027\u80FD\u3002","\u7F16\u8F91\u5668\u5185\u5BB9","\u63A7\u5236\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u7531\u5C4F\u5E55\u9605\u8BFB\u5668\u516C\u5E03\u3002","\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u95ED\u5408\u62EC\u53F7\u3002","\u4EC5\u5F53\u5149\u6807\u4F4D\u4E8E\u7A7A\u767D\u5B57\u7B26\u5DE6\u4FA7\u65F6\uFF0C\u624D\u81EA\u52A8\u95ED\u5408\u62EC\u53F7\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5728\u5DE6\u62EC\u53F7\u540E\u81EA\u52A8\u63D2\u5165\u53F3\u62EC\u53F7\u3002","\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u5173\u95ED\u6CE8\u91CA\u3002","\u4EC5\u5F53\u5149\u6807\u4F4D\u4E8E\u7A7A\u683C\u5DE6\u4FA7\u65F6\u81EA\u52A8\u5173\u95ED\u6CE8\u91CA\u3002","\u63A7\u5236\u5728\u7528\u6237\u6DFB\u52A0\u6253\u5F00\u6CE8\u91CA\u540E\u7F16\u8F91\u5668\u662F\u5426\u5E94\u81EA\u52A8\u5173\u95ED\u6CE8\u91CA\u3002","\u4EC5\u5728\u81EA\u52A8\u63D2\u5165\u65F6\u624D\u5220\u9664\u76F8\u90BB\u7684\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","\u63A7\u5236\u5728\u5220\u9664\u65F6\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5220\u9664\u76F8\u90BB\u7684\u53F3\u5F15\u53F7\u6216\u53F3\u65B9\u62EC\u53F7\u3002","\u4EC5\u5728\u81EA\u52A8\u63D2\u5165\u65F6\u624D\u6539\u5199\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u6539\u5199\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u95ED\u5408\u5F15\u53F7\u3002","\u4EC5\u5F53\u5149\u6807\u4F4D\u4E8E\u7A7A\u767D\u5B57\u7B26\u5DE6\u4FA7\u65F6\uFF0C\u624D\u81EA\u52A8\u95ED\u5408\u5F15\u53F7\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5728\u5DE6\u5F15\u53F7\u540E\u81EA\u52A8\u63D2\u5165\u53F3\u5F15\u53F7\u3002","\u7F16\u8F91\u5668\u4E0D\u4F1A\u81EA\u52A8\u63D2\u5165\u7F29\u8FDB\u3002","\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u3002","\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u5E76\u9075\u5FAA\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\u3002","\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u3001\u4F7F\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\u5E76\u8C03\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u7279\u5B9A onEnterRules\u3002","\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\uFF0C\u4F7F\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\uFF0C\u8C03\u7528\u7531\u8BED\u8A00\u5B9A\u4E49\u7684\u7279\u6B8A\u8F93\u5165\u89C4\u5219\uFF0C\u5E76\u9075\u5FAA\u7531\u8BED\u8A00\u5B9A\u4E49\u7684\u7F29\u8FDB\u89C4\u5219\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5728\u7528\u6237\u952E\u5165\u3001\u7C98\u8D34\u3001\u79FB\u52A8\u6216\u7F29\u8FDB\u884C\u65F6\u81EA\u52A8\u8C03\u6574\u7F29\u8FDB\u3002","\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","\u4F7F\u7528\u5F15\u53F7\u800C\u975E\u62EC\u53F7\u6765\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","\u4F7F\u7528\u62EC\u53F7\u800C\u975E\u5F15\u53F7\u6765\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","\u63A7\u5236\u5728\u952E\u5165\u5F15\u53F7\u6216\u65B9\u62EC\u53F7\u65F6\uFF0C\u7F16\u8F91\u5668\u662F\u5426\u5E94\u81EA\u52A8\u5C06\u6240\u9009\u5185\u5BB9\u62EC\u8D77\u6765\u3002","\u5728\u4F7F\u7528\u7A7A\u683C\u8FDB\u884C\u7F29\u8FDB\u65F6\u6A21\u62DF\u5236\u8868\u7B26\u7684\u9009\u62E9\u884C\u4E3A\u3002\u6240\u9009\u5185\u5BB9\u5C06\u59CB\u7EC8\u4F7F\u7528\u5236\u8868\u7B26\u505C\u6B62\u4F4D\u3002","\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","\u63A7\u5236 CodeLens \u7684\u5B57\u4F53\u7CFB\u5217\u3002","\u63A7\u5236 CodeLens \u7684\u5B57\u53F7(\u4EE5\u50CF\u7D20\u4E3A\u5355\u4F4D)\u3002\u8BBE\u7F6E\u4E3A 0 \u65F6\uFF0C\u5C06\u4F7F\u7528 90% \u7684 `#editor.fontSize#`\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u5185\u8054\u989C\u8272\u4FEE\u9970\u5668\u548C\u989C\u8272\u9009\u53D6\u5668\u3002","\u5728\u989C\u8272\u4FEE\u9970\u5668\u5355\u51FB\u548C\u60AC\u505C\u65F6\u4F7F\u989C\u8272\u9009\u53D6\u5668\u540C\u65F6\u663E\u793A","\u4F7F\u989C\u8272\u9009\u53D6\u5668\u5728\u989C\u8272\u4FEE\u9970\u5668\u60AC\u505C\u65F6\u663E\u793A","\u5355\u51FB\u989C\u8272\u4FEE\u9970\u5668\u65F6\u663E\u793A\u989C\u8272\u9009\u53D6\u5668","\u63A7\u5236\u4ECE\u989C\u8272\u4FEE\u9970\u5668\u663E\u793A\u989C\u8272\u9009\u53D6\u5668\u7684\u6761\u4EF6","\u63A7\u5236\u53EF\u4E00\u6B21\u6027\u5728\u7F16\u8F91\u5668\u4E2D\u5448\u73B0\u7684\u6700\u5927\u989C\u8272\u4FEE\u9970\u5668\u6570\u3002","\u542F\u7528\u4F7F\u7528\u9F20\u6807\u548C\u952E\u8FDB\u884C\u5217\u9009\u62E9\u3002","\u63A7\u5236\u5728\u590D\u5236\u65F6\u662F\u5426\u540C\u65F6\u590D\u5236\u8BED\u6CD5\u9AD8\u4EAE\u3002","\u63A7\u5236\u5149\u6807\u7684\u52A8\u753B\u6837\u5F0F\u3002","\u5DF2\u7981\u7528\u5E73\u6ED1\u8131\u5B57\u53F7\u52A8\u753B\u3002","\u4EC5\u5F53\u7528\u6237\u4F7F\u7528\u663E\u5F0F\u624B\u52BF\u79FB\u52A8\u5149\u6807\u65F6\uFF0C\u624D\u542F\u7528\u5E73\u6ED1\u8131\u5B57\u53F7\u52A8\u753B\u3002","\u59CB\u7EC8\u542F\u7528\u5E73\u6ED1\u8131\u5B57\u53F7\u52A8\u753B\u3002","\u63A7\u5236\u662F\u5426\u542F\u7528\u5E73\u6ED1\u63D2\u5165\u52A8\u753B\u3002","\u63A7\u5236\u5149\u6807\u6837\u5F0F\u3002","\u63A7\u5236\u5149\u6807\u5468\u56F4\u53EF\u89C1\u7684\u524D\u7F6E\u884C(\u6700\u5C0F\u503C\u4E3A 0)\u548C\u5C3E\u968F\u884C(\u6700\u5C0F\u503C\u4E3A 1)\u7684\u6700\u5C0F\u6570\u76EE\u3002\u5728\u5176\u4ED6\u4E00\u4E9B\u7F16\u8F91\u5668\u4E2D\u79F0\u4E3A \u201CscrollOff\u201D \u6216 \u201CscrollOffset\u201D\u3002",'\u4EC5\u5F53\u901A\u8FC7\u952E\u76D8\u6216 API \u89E6\u53D1\u65F6\uFF0C\u624D\u4F1A\u5F3A\u5236\u6267\u884C"\u5149\u6807\u73AF\u7ED5\u884C"\u3002','\u59CB\u7EC8\u5F3A\u5236\u6267\u884C "cursorSurroundingLines"','\u63A7\u5236\u4F55\u65F6\u5E94\u5F3A\u5236\u6267\u884C"#\u5149\u6807\u73AF\u7ED5\u884C#"\u3002',"\u5F53 `#editor.cursorStyle#` \u8BBE\u7F6E\u4E3A `line` \u65F6\uFF0C\u63A7\u5236\u5149\u6807\u7684\u5BBD\u5EA6\u3002","\u63A7\u5236\u5728\u7F16\u8F91\u5668\u4E2D\u662F\u5426\u5141\u8BB8\u901A\u8FC7\u62D6\u653E\u6765\u79FB\u52A8\u9009\u4E2D\u5185\u5BB9\u3002","\u5C06\u65B0\u7684\u5448\u73B0\u65B9\u6CD5\u4E0E svg \u914D\u5408\u4F7F\u7528\u3002","\u4F7F\u7528\u5305\u542B\u5B57\u4F53\u5B57\u7B26\u7684\u65B0\u5448\u73B0\u65B9\u6CD5\u3002","\u4F7F\u7528\u7A33\u5B9A\u5448\u73B0\u65B9\u6CD5\u3002","\u63A7\u5236\u662F\u5426\u4F7F\u7528\u65B0\u7684\u5B9E\u9A8C\u6027\u65B9\u6CD5\u5448\u73B0\u7A7A\u683C\u3002",'\u6309\u4E0B"Alt"\u65F6\u6EDA\u52A8\u901F\u5EA6\u500D\u589E\u3002',"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u542F\u7528\u4E86\u4EE3\u7801\u6298\u53E0\u3002","\u4F7F\u7528\u7279\u5B9A\u4E8E\u8BED\u8A00\u7684\u6298\u53E0\u7B56\u7565(\u5982\u679C\u53EF\u7528)\uFF0C\u5426\u5219\u4F7F\u7528\u57FA\u4E8E\u7F29\u8FDB\u7684\u7B56\u7565\u3002","\u4F7F\u7528\u57FA\u4E8E\u7F29\u8FDB\u7684\u6298\u53E0\u7B56\u7565\u3002","\u63A7\u5236\u8BA1\u7B97\u6298\u53E0\u8303\u56F4\u7684\u7B56\u7565\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u7A81\u51FA\u663E\u793A\u6298\u53E0\u8303\u56F4\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u6298\u53E0\u5BFC\u5165\u8303\u56F4\u3002","\u53EF\u6298\u53E0\u533A\u57DF\u7684\u6700\u5927\u6570\u91CF\u3002\u5982\u679C\u5F53\u524D\u6E90\u5177\u6709\u5927\u91CF\u53EF\u6298\u53E0\u533A\u57DF\uFF0C\u90A3\u4E48\u589E\u52A0\u6B64\u503C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u7F16\u8F91\u5668\u7684\u54CD\u5E94\u901F\u5EA6\u53D8\u6162\u3002","\u63A7\u5236\u5355\u51FB\u5DF2\u6298\u53E0\u7684\u884C\u540E\u9762\u7684\u7A7A\u5185\u5BB9\u662F\u5426\u4F1A\u5C55\u5F00\u8BE5\u884C\u3002","\u63A7\u5236\u5B57\u4F53\u7CFB\u5217\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u7C98\u8D34\u7684\u5185\u5BB9\u3002\u683C\u5F0F\u5316\u7A0B\u5E8F\u5FC5\u987B\u53EF\u7528\uFF0C\u5E76\u4E14\u80FD\u9488\u5BF9\u6587\u6863\u4E2D\u7684\u67D0\u4E00\u8303\u56F4\u8FDB\u884C\u683C\u5F0F\u5316\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u5728\u952E\u5165\u4E00\u884C\u540E\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u8BE5\u884C\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5448\u73B0\u5782\u76F4\u5B57\u5F62\u8FB9\u8DDD\u3002\u5B57\u5F62\u8FB9\u8DDD\u6700\u5E38\u7528\u4E8E\u8C03\u8BD5\u3002","\u63A7\u5236\u662F\u5426\u5728\u6982\u89C8\u6807\u5C3A\u4E2D\u9690\u85CF\u5149\u6807\u3002","\u63A7\u5236\u5B57\u6BCD\u95F4\u8DDD(\u50CF\u7D20)\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5DF2\u542F\u7528\u94FE\u63A5\u7F16\u8F91\u3002\u76F8\u5173\u7B26\u53F7(\u5982 HTML \u6807\u8BB0)\u5C06\u5728\u7F16\u8F91\u65F6\u8FDB\u884C\u66F4\u65B0\uFF0C\u5177\u4F53\u53D6\u51B3\u4E8E\u8BED\u8A00\u3002","\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u68C0\u6D4B\u94FE\u63A5\u5E76\u4F7F\u5176\u53EF\u88AB\u70B9\u51FB\u3002","\u7A81\u51FA\u663E\u793A\u5339\u914D\u7684\u62EC\u53F7\u3002","\u5BF9\u9F20\u6807\u6EDA\u8F6E\u6EDA\u52A8\u4E8B\u4EF6\u7684 `deltaX` \u548C `deltaY` \u4E58\u4E0A\u7684\u7CFB\u6570\u3002","\u6309\u4F4F `Ctrl` \u952E\u5E76\u6EDA\u52A8\u9F20\u6807\u6EDA\u8F6E\u65F6\u5BF9\u7F16\u8F91\u5668\u5B57\u4F53\u5927\u5C0F\u8FDB\u884C\u7F29\u653E\u3002","\u5F53\u591A\u4E2A\u5149\u6807\u91CD\u53E0\u65F6\u8FDB\u884C\u5408\u5E76\u3002","\u6620\u5C04\u4E3A `Ctrl` (Windows \u548C Linux) \u6216 `Command` (macOS)\u3002","\u6620\u5C04\u4E3A `Alt` (Windows \u548C Linux) \u6216 `Option` (macOS)\u3002","\u7528\u4E8E\u4F7F\u7528\u9F20\u6807\u6DFB\u52A0\u591A\u4E2A\u6E38\u6807\u7684\u4FEE\u9970\u7B26\u3002\u201C\u8F6C\u5230\u5B9A\u4E49\u201D\u548C\u201C\u6253\u5F00\u94FE\u63A5\u201D\u9F20\u6807\u624B\u52BF\u5C06\u8FDB\u884C\u8C03\u6574\uFF0C\u4F7F\u5176\u4E0D\u4E0E [\u591A\u5149\u6807\u4FEE\u9970\u7B26](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier)\u51B2\u7A81\u3002","\u6BCF\u4E2A\u5149\u6807\u7C98\u8D34\u4E00\u884C\u6587\u672C\u3002","\u6BCF\u4E2A\u5149\u6807\u7C98\u8D34\u5168\u6587\u3002","\u63A7\u5236\u7C98\u8D34\u65F6\u7C98\u8D34\u6587\u672C\u7684\u884C\u8BA1\u6570\u4E0E\u5149\u6807\u8BA1\u6570\u76F8\u5339\u914D\u3002","\u63A7\u5236\u4E00\u6B21\u53EF\u4EE5\u5728\u6D3B\u52A8\u7F16\u8F91\u5668\u4E2D\u663E\u793A\u7684\u6700\u5927\u6E38\u6807\u6570\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u7A81\u51FA\u663E\u793A\u8BED\u4E49\u7B26\u53F7\u7684\u5339\u914D\u9879\u3002","\u63A7\u5236\u662F\u5426\u5728\u6982\u89C8\u6807\u5C3A\u5468\u56F4\u7ED8\u5236\u8FB9\u6846\u3002","\u6253\u5F00\u901F\u89C8\u65F6\u805A\u7126\u6811","\u6253\u5F00\u9884\u89C8\u65F6\u5C06\u7126\u70B9\u653E\u5728\u7F16\u8F91\u5668\u4E0A","\u63A7\u5236\u662F\u5C06\u7126\u70B9\u653E\u5728\u5185\u8054\u7F16\u8F91\u5668\u4E0A\u8FD8\u662F\u653E\u5728\u9884\u89C8\u5C0F\u90E8\u4EF6\u4E2D\u7684\u6811\u4E0A\u3002",'\u63A7\u5236"\u8F6C\u5230\u5B9A\u4E49"\u9F20\u6807\u624B\u52BF\u662F\u5426\u59CB\u7EC8\u6253\u5F00\u9884\u89C8\u5C0F\u90E8\u4EF6\u3002',"\u63A7\u5236\u663E\u793A\u5FEB\u901F\u5EFA\u8BAE\u524D\u7684\u7B49\u5F85\u65F6\u95F4 (\u6BEB\u79D2)\u3002","\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u8F93\u5165\u65F6\u81EA\u52A8\u91CD\u547D\u540D\u3002",'\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528 "editor.linkedEditing"\u3002',"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u63A7\u5236\u5B57\u7B26\u3002","\u5F53\u6587\u4EF6\u4EE5\u6362\u884C\u7B26\u7ED3\u675F\u65F6, \u5448\u73B0\u6700\u540E\u4E00\u884C\u7684\u884C\u53F7\u3002","\u540C\u65F6\u7A81\u51FA\u663E\u793A\u5BFC\u822A\u7EBF\u548C\u5F53\u524D\u884C\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5F53\u524D\u884C\u8FDB\u884C\u9AD8\u4EAE\u663E\u793A\u7684\u65B9\u5F0F\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4EC5\u5728\u7126\u70B9\u5728\u7F16\u8F91\u5668\u65F6\u7A81\u51FA\u663E\u793A\u5F53\u524D\u884C\u3002","\u5448\u73B0\u7A7A\u683C\u5B57\u7B26(\u5B57\u8BCD\u4E4B\u95F4\u7684\u5355\u4E2A\u7A7A\u683C\u9664\u5916)\u3002","\u4EC5\u5728\u9009\u5B9A\u6587\u672C\u4E0A\u5448\u73B0\u7A7A\u767D\u5B57\u7B26\u3002","\u4EC5\u5448\u73B0\u5C3E\u968F\u7A7A\u683C\u5B57\u7B26\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u5728\u7A7A\u767D\u5B57\u7B26\u4E0A\u663E\u793A\u7B26\u53F7\u7684\u65B9\u5F0F\u3002","\u63A7\u5236\u9009\u533A\u662F\u5426\u6709\u5706\u89D2\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u6C34\u5E73\u6EDA\u52A8\u65F6\u53EF\u4EE5\u8D85\u8FC7\u8303\u56F4\u7684\u5B57\u7B26\u6570\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u53EF\u4EE5\u6EDA\u52A8\u5230\u6700\u540E\u4E00\u884C\u4E4B\u540E\u3002","\u540C\u65F6\u5782\u76F4\u548C\u6C34\u5E73\u6EDA\u52A8\u65F6\uFF0C\u4EC5\u6CBF\u4E3B\u8F74\u6EDA\u52A8\u3002\u5728\u89E6\u63A7\u677F\u4E0A\u5782\u76F4\u6EDA\u52A8\u65F6\uFF0C\u53EF\u9632\u6B62\u6C34\u5E73\u6F02\u79FB\u3002","\u63A7\u5236\u662F\u5426\u652F\u6301 Linux \u4E3B\u526A\u8D34\u677F\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u7A81\u51FA\u663E\u793A\u4E0E\u6240\u9009\u5185\u5BB9\u7C7B\u4F3C\u7684\u5339\u914D\u9879\u3002","\u59CB\u7EC8\u663E\u793A\u6298\u53E0\u63A7\u4EF6\u3002","\u5207\u52FF\u663E\u793A\u6298\u53E0\u63A7\u4EF6\u5E76\u51CF\u5C0F\u88C5\u8BA2\u7EBF\u5927\u5C0F\u3002","\u4EC5\u5728\u9F20\u6807\u4F4D\u4E8E\u88C5\u8BA2\u7EBF\u4E0A\u65B9\u65F6\u663E\u793A\u6298\u53E0\u63A7\u4EF6\u3002","\u63A7\u5236\u4F55\u65F6\u663E\u793A\u884C\u53F7\u69FD\u4E0A\u7684\u6298\u53E0\u63A7\u4EF6\u3002","\u63A7\u5236\u662F\u5426\u6DE1\u5316\u672A\u4F7F\u7528\u7684\u4EE3\u7801\u3002","\u63A7\u5236\u52A0\u5220\u9664\u7EBF\u88AB\u5F03\u7528\u7684\u53D8\u91CF\u3002","\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E0A\u65B9\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E0B\u65B9\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E2D\u7A7F\u63D2\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","\u4E0D\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","\u63A7\u5236\u4EE3\u7801\u7247\u6BB5\u662F\u5426\u4E0E\u5176\u4ED6\u5EFA\u8BAE\u4E00\u8D77\u663E\u793A\u53CA\u5176\u6392\u5217\u7684\u4F4D\u7F6E\u3002","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4F7F\u7528\u52A8\u753B\u6EDA\u52A8\u3002","\u63A7\u5236\u5728\u663E\u793A\u5185\u8054\u5B8C\u6210\u65F6\u662F\u5426\u5E94\u5411\u5C4F\u5E55\u9605\u8BFB\u5668\u7528\u6237\u63D0\u4F9B\u8F85\u52A9\u529F\u80FD\u63D0\u793A\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5B57\u53F7\u3002\u8BBE\u7F6E\u4E3A {0} \u65F6\uFF0C\u5C06\u4F7F\u7528 {1} \u7684\u503C\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u884C\u9AD8\u3002\u8BBE\u7F6E\u4E3A {0} \u65F6\uFF0C\u5C06\u4F7F\u7528 {1} \u7684\u503C\u3002\u6700\u5C0F\u503C\u4E3A 8\u3002","\u63A7\u5236\u5728\u952E\u5165\u89E6\u53D1\u5B57\u7B26\u540E\u662F\u5426\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","\u59CB\u7EC8\u9009\u62E9\u7B2C\u4E00\u4E2A\u5EFA\u8BAE\u3002","\u9009\u62E9\u6700\u8FD1\u7684\u5EFA\u8BAE\uFF0C\u9664\u975E\u8FDB\u4E00\u6B65\u952E\u5165\u9009\u62E9\u5176\u4ED6\u9879\u3002\u4F8B\u5982 `console. -> console.log`\uFF0C\u56E0\u4E3A\u6700\u8FD1\u8865\u5168\u8FC7 `log`\u3002","\u6839\u636E\u4E4B\u524D\u8865\u5168\u8FC7\u7684\u5EFA\u8BAE\u7684\u524D\u7F00\u6765\u8FDB\u884C\u9009\u62E9\u3002\u4F8B\u5982\uFF0C`co -> console`\u3001`con -> const`\u3002","\u63A7\u5236\u5728\u5EFA\u8BAE\u5217\u8868\u4E2D\u5982\u4F55\u9884\u5148\u9009\u62E9\u5EFA\u8BAE\u3002","\u5728\u6309\u4E0B Tab \u952E\u65F6\u8FDB\u884C Tab \u8865\u5168\uFF0C\u5C06\u63D2\u5165\u6700\u4F73\u5339\u914D\u5EFA\u8BAE\u3002","\u7981\u7528 Tab \u8865\u5168\u3002",'\u5728\u524D\u7F00\u5339\u914D\u65F6\u8FDB\u884C Tab \u8865\u5168\u3002\u5728 "quickSuggestions" \u672A\u542F\u7528\u65F6\u4F53\u9A8C\u6700\u597D\u3002',"\u542F\u7528 Tab \u8865\u5168\u3002","\u81EA\u52A8\u5220\u9664\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","\u5FFD\u7565\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","\u63D0\u793A\u5220\u9664\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","\u5220\u9664\u53EF\u80FD\u5BFC\u81F4\u95EE\u9898\u7684\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26\u3002","\u6839\u636E\u5236\u8868\u4F4D\u63D2\u5165\u548C\u5220\u9664\u7A7A\u683C\u3002","\u4F7F\u7528\u9ED8\u8BA4\u6362\u884C\u89C4\u5219\u3002","\u4E2D\u6587/\u65E5\u8BED/\u97E9\u8BED(CJK)\u6587\u672C\u4E0D\u5E94\u4F7F\u7528\u65AD\u5B57\u529F\u80FD\u3002\u975E CJK \u6587\u672C\u884C\u4E3A\u4E0E\u666E\u901A\u6587\u672C\u884C\u4E3A\u76F8\u540C\u3002","\u63A7\u5236\u4E2D\u6587/\u65E5\u8BED/\u97E9\u8BED(CJK)\u6587\u672C\u4F7F\u7528\u7684\u65AD\u5B57\u89C4\u5219\u3002","\u6267\u884C\u5355\u8BCD\u76F8\u5173\u7684\u5BFC\u822A\u6216\u64CD\u4F5C\u65F6\u4F5C\u4E3A\u5355\u8BCD\u5206\u9694\u7B26\u7684\u5B57\u7B26\u3002","\u6C38\u4E0D\u6362\u884C\u3002","\u5C06\u5728\u89C6\u533A\u5BBD\u5EA6\u5904\u6362\u884C\u3002","\u5728 `#editor.wordWrapColumn#` \u5904\u6298\u884C\u3002","\u5728\u89C6\u533A\u5BBD\u5EA6\u548C `#editor.wordWrapColumn#` \u4E2D\u7684\u8F83\u5C0F\u503C\u5904\u6298\u884C\u3002","\u63A7\u5236\u6298\u884C\u7684\u65B9\u5F0F\u3002","\u5728 `#editor.wordWrap#` \u4E3A `wordWrapColumn` \u6216 `bounded` \u65F6\uFF0C\u63A7\u5236\u7F16\u8F91\u5668\u7684\u6298\u884C\u5217\u3002","\u63A7\u5236\u662F\u5426\u5E94\u4F7F\u7528\u9ED8\u8BA4\u6587\u6863\u989C\u8272\u63D0\u4F9B\u7A0B\u5E8F\u663E\u793A\u5185\u8054\u989C\u8272\u4FEE\u9970","\u63A7\u5236\u7F16\u8F91\u5668\u662F\u63A5\u6536\u9009\u9879\u5361\u8FD8\u662F\u5C06\u5176\u5EF6\u8FDF\u5230\u5DE5\u4F5C\u53F0\u8FDB\u884C\u5BFC\u822A\u3002"],"vs/editor/common/core/editorColorRegistry":["\u5149\u6807\u6240\u5728\u884C\u9AD8\u4EAE\u5185\u5BB9\u7684\u80CC\u666F\u989C\u8272\u3002","\u5149\u6807\u6240\u5728\u884C\u56DB\u5468\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","\u80CC\u666F\u989C\u8272\u7684\u9AD8\u4EAE\u8303\u56F4\uFF0C\u559C\u6B22\u901A\u8FC7\u5FEB\u901F\u6253\u5F00\u548C\u67E5\u627E\u529F\u80FD\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u9AD8\u4EAE\u533A\u57DF\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","\u9AD8\u4EAE\u663E\u793A\u7B26\u53F7\u7684\u80CC\u666F\u989C\u8272\uFF0C\u4F8B\u5982\u8F6C\u5230\u5B9A\u4E49\u6216\u8F6C\u5230\u4E0B\u4E00\u4E2A/\u4E0A\u4E00\u4E2A\u7B26\u53F7\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u9AD8\u4EAE\u663E\u793A\u7B26\u53F7\u5468\u56F4\u7684\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","\u7F16\u8F91\u5668\u5149\u6807\u989C\u8272\u3002","\u7F16\u8F91\u5668\u5149\u6807\u7684\u80CC\u666F\u8272\u3002\u53EF\u4EE5\u81EA\u5B9A\u4E49\u5757\u578B\u5149\u6807\u8986\u76D6\u5B57\u7B26\u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u4E2D\u7A7A\u767D\u5B57\u7B26\u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u884C\u53F7\u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u989C\u8272\u3002","\u201CeditorIndentGuide.background\u201D \u5DF2\u5F03\u7528\u3002\u8BF7\u6539\u7528 \u201CeditorIndentGuide.background1\u201D\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u989C\u8272\u3002","\u201CeditorIndentGuide.activeBackground\u201D \u5DF2\u5F03\u7528\u3002\u8BF7\u6539\u7528 \u201CeditorIndentGuide.activeBackground1\u201D\u3002","\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF (1) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF (2) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF (3) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF (4) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF (5) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF (6) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF (1) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF (2) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF (3) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF (4) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF (5) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF (6) \u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6D3B\u52A8\u884C\u53F7\u7684\u989C\u8272",'"Id" \u5DF2\u88AB\u5F03\u7528\uFF0C\u8BF7\u6539\u7528 "editorLineNumber.activeForeground"\u3002',"\u7F16\u8F91\u5668\u6D3B\u52A8\u884C\u53F7\u7684\u989C\u8272","\u5C06 editor.renderFinalNewline \u8BBE\u7F6E\u4E3A\u7070\u8272\u65F6\u6700\u7EC8\u7F16\u8F91\u5668\u884C\u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6807\u5C3A\u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668 CodeLens \u7684\u524D\u666F\u8272","\u5339\u914D\u62EC\u53F7\u7684\u80CC\u666F\u8272","\u5339\u914D\u62EC\u53F7\u5916\u6846\u7684\u989C\u8272","\u6982\u89C8\u6807\u5C3A\u8FB9\u6846\u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6982\u8FF0\u6807\u5C3A\u7684\u80CC\u666F\u8272\u3002","\u7F16\u8F91\u5668\u5BFC\u822A\u7EBF\u7684\u80CC\u666F\u8272\u3002\u5BFC\u822A\u7EBF\u5305\u62EC\u8FB9\u7F18\u7B26\u53F7\u548C\u884C\u53F7\u3002","\u7F16\u8F91\u5668\u4E2D\u4E0D\u5FC5\u8981(\u672A\u4F7F\u7528)\u7684\u6E90\u4EE3\u7801\u7684\u8FB9\u6846\u989C\u8272\u3002",'\u975E\u5FC5\u987B(\u672A\u4F7F\u7528)\u4EE3\u7801\u7684\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A\u7684\u4E0D\u900F\u660E\u5EA6\u3002\u4F8B\u5982\uFF0C"#000000c0" \u5C06\u4EE5 75% \u7684\u4E0D\u900F\u660E\u5EA6\u663E\u793A\u4EE3\u7801\u3002\u5BF9\u4E8E\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898\uFF0C\u8BF7\u4F7F\u7528 \u201DeditorUnnecessaryCode.border\u201C \u4E3B\u9898\u6765\u4E3A\u975E\u5FC5\u987B\u4EE3\u7801\u6DFB\u52A0\u4E0B\u5212\u7EBF\uFF0C\u4EE5\u907F\u514D\u989C\u8272\u6DE1\u5316\u3002',"\u7F16\u8F91\u5668\u4E2D\u865A\u5F71\u6587\u672C\u7684\u8FB9\u6846\u989C\u8272\u3002","\u7F16\u8F91\u5668\u4E2D\u865A\u5F71\u6587\u672C\u7684\u524D\u666F\u8272\u3002","\u7F16\u8F91\u5668\u4E2D\u865A\u5F71\u6587\u672C\u7684\u80CC\u666F\u8272\u3002","\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u8303\u56F4\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u6982\u89C8\u6807\u5C3A\u4E2D\u9519\u8BEF\u6807\u8BB0\u7684\u989C\u8272\u3002","\u6982\u89C8\u6807\u5C3A\u4E2D\u8B66\u544A\u6807\u8BB0\u7684\u989C\u8272\u3002","\u6982\u89C8\u6807\u5C3A\u4E2D\u4FE1\u606F\u6807\u8BB0\u7684\u989C\u8272\u3002","\u62EC\u53F7\u7684\u524D\u666F\u8272(1)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","\u62EC\u53F7\u7684\u524D\u666F\u8272(2)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","\u62EC\u53F7\u7684\u524D\u666F\u8272(3)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","\u62EC\u53F7\u7684\u524D\u666F\u8272(4)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","\u62EC\u53F7\u7684\u524D\u666F\u8272(5)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","\u62EC\u53F7\u7684\u524D\u666F\u8272(6)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","\u65B9\u62EC\u53F7\u51FA\u73B0\u610F\u5916\u7684\u524D\u666F\u8272\u3002","\u975E\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(1)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u975E\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(2)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u975E\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(3)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u975E\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(4)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u975E\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(5)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u975E\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(6)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(1)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(2)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(3)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(4)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(5)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u6D3B\u52A8\u62EC\u53F7\u5BF9\u6307\u5357\u7684\u80CC\u666F\u8272(6)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u6307\u5357\u3002","\u7528\u4E8E\u7A81\u51FA\u663E\u793A Unicode \u5B57\u7B26\u7684\u8FB9\u6846\u989C\u8272\u3002","\u7528\u4E8E\u7A81\u51FA\u663E\u793A Unicode \u5B57\u7B26\u7684\u80CC\u666F\u989C\u8272\u3002"],"vs/editor/common/editorContextKeys":["\u7F16\u8F91\u5668\u6587\u672C\u662F\u5426\u5177\u6709\u7126\u70B9(\u5149\u6807\u662F\u5426\u95EA\u70C1)","\u7F16\u8F91\u5668\u6216\u7F16\u8F91\u5668\u5C0F\u7EC4\u4EF6\u662F\u5426\u5177\u6709\u7126\u70B9(\u4F8B\u5982\u7126\u70B9\u5728\u201C\u67E5\u627E\u201D\u5C0F\u7EC4\u4EF6\u4E2D)","\u7F16\u8F91\u5668\u6216 RTF \u8F93\u5165\u662F\u5426\u6709\u7126\u70B9(\u5149\u6807\u662F\u5426\u95EA\u70C1)","\u7F16\u8F91\u5668\u662F\u5426\u4E3A\u53EA\u8BFB","\u4E0A\u4E0B\u6587\u662F\u5426\u4E3A\u5DEE\u5F02\u7F16\u8F91\u5668","\u4E0A\u4E0B\u6587\u662F\u5426\u4E3A\u5D4C\u5165\u5F0F\u5DEE\u5F02\u7F16\u8F91\u5668","\u662F\u5426\u9009\u62E9\u79FB\u52A8\u7684\u4EE3\u7801\u5757\u8FDB\u884C\u6BD4\u8F83","\u53EF\u8BBF\u95EE\u5DEE\u5F02\u67E5\u770B\u5668\u662F\u5426\u53EF\u89C1","\u662F\u5426\u5DF2\u5230\u8FBE\u5DEE\u5F02\u7F16\u8F91\u5668\u5E76\u6392\u5448\u73B0\u5185\u8054\u65AD\u70B9",'\u662F\u5426\u5DF2\u542F\u7528 "editor.columnSelection"',"\u7F16\u8F91\u5668\u662F\u5426\u5DF2\u9009\u5B9A\u6587\u672C","\u7F16\u8F91\u5668\u662F\u5426\u6709\u591A\u4E2A\u9009\u62E9",'"Tab" \u662F\u5426\u5C06\u7126\u70B9\u79FB\u51FA\u7F16\u8F91\u5668',"\u7F16\u8F91\u5668\u8F6F\u952E\u76D8\u662F\u5426\u53EF\u89C1","\u662F\u5426\u805A\u7126\u7F16\u8F91\u5668\u60AC\u505C","\u662F\u5426\u805A\u7126\u7C98\u6027\u6EDA\u52A8","\u7C98\u6027\u6EDA\u52A8\u662F\u5426\u53EF\u89C1","\u72EC\u7ACB\u989C\u8272\u9009\u53D6\u5668\u662F\u5426\u53EF\u89C1","\u72EC\u7ACB\u989C\u8272\u9009\u53D6\u5668\u662F\u5426\u805A\u7126","\u8BE5\u7F16\u8F91\u5668\u662F\u5426\u662F\u66F4\u5927\u7684\u7F16\u8F91\u5668(\u4F8B\u5982\u7B14\u8BB0\u672C)\u7684\u4E00\u90E8\u5206","\u7F16\u8F91\u5668\u7684\u8BED\u8A00\u6807\u8BC6\u7B26","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u8865\u5168\u9879\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u4EE3\u7801\u64CD\u4F5C\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709 CodeLens \u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5B9A\u4E49\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u58F0\u660E\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5B9E\u73B0\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u7C7B\u578B\u5B9A\u4E49\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u60AC\u505C\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u7A81\u51FA\u663E\u793A\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u7B26\u53F7\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5F15\u7528\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u91CD\u547D\u540D\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u7B7E\u540D\u5E2E\u52A9\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5185\u8054\u63D0\u793A\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u9009\u62E9\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u591A\u4E2A\u6587\u6863\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","\u7F16\u8F91\u5668\u662F\u5426\u6709\u591A\u4E2A\u6587\u6863\u9009\u62E9\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F"],"vs/editor/common/languages":["\u6570\u7EC4","\u5E03\u5C14\u503C","\u7C7B","\u5E38\u6570","\u6784\u9020\u51FD\u6570","\u679A\u4E3E","\u679A\u4E3E\u6210\u5458","\u4E8B\u4EF6","\u5B57\u6BB5","\u6587\u4EF6","\u51FD\u6570","\u63A5\u53E3","\u952E","\u65B9\u6CD5","\u6A21\u5757","\u547D\u540D\u7A7A\u95F4","Null","\u6570\u5B57","\u5BF9\u8C61","\u8FD0\u7B97\u7B26","\u5305","\u5C5E\u6027","\u5B57\u7B26\u4E32","\u7ED3\u6784","\u7C7B\u578B\u53C2\u6570","\u53D8\u91CF","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["\u7EAF\u6587\u672C"],"vs/editor/common/model/editStack":["\u8F93\u5165"],"vs/editor/common/standaloneStrings":["\u5F00\u53D1\u4EBA\u5458: \u68C0\u67E5\u4EE4\u724C","\u8F6C\u5230\u884C/\u5217...","\u663E\u793A\u6240\u6709\u5FEB\u901F\u8BBF\u95EE\u63D0\u4F9B\u7A0B\u5E8F","\u547D\u4EE4\u9762\u677F","\u663E\u793A\u5E76\u8FD0\u884C\u547D\u4EE4","\u8F6C\u5230\u7B26\u53F7...","\u6309\u7C7B\u522B\u8F6C\u5230\u7B26\u53F7...","\u7F16\u8F91\u5668\u5185\u5BB9","\u6309 Alt+F1 \u53EF\u6253\u5F00\u8F85\u52A9\u529F\u80FD\u9009\u9879\u3002","\u5207\u6362\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898","\u5728 {1} \u4E2A\u6587\u4EF6\u4E2D\u8FDB\u884C\u4E86 {0} \u6B21\u7F16\u8F91"],"vs/editor/common/viewLayout/viewLineRenderer":["\u663E\u793A\u66F4\u591A({0})","{0} \u5B57\u7B26"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["\u9009\u62E9\u5B9A\u4F4D\u70B9","\u5B9A\u4F4D\u70B9\u8BBE\u7F6E\u4E3A {0}:{1}","\u8BBE\u7F6E\u9009\u62E9\u5B9A\u4F4D\u70B9","\u8F6C\u5230\u9009\u62E9\u5B9A\u4F4D\u70B9","\u9009\u62E9\u4ECE\u5B9A\u4F4D\u70B9\u5230\u5149\u6807","\u53D6\u6D88\u9009\u62E9\u5B9A\u4F4D\u70B9"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["\u6982\u89C8\u6807\u5C3A\u4E0A\u8868\u793A\u5339\u914D\u62EC\u53F7\u7684\u6807\u8BB0\u989C\u8272\u3002","\u8F6C\u5230\u62EC\u53F7","\u9009\u62E9\u62EC\u53F7\u6240\u6709\u5185\u5BB9","\u5220\u9664\u62EC\u53F7","\u8F6C\u5230\u62EC\u53F7(&&B)"],"vs/editor/contrib/caretOperations/browser/caretOperations":["\u5411\u5DE6\u79FB\u52A8\u6240\u9009\u6587\u672C","\u5411\u53F3\u79FB\u52A8\u6240\u9009\u6587\u672C"],"vs/editor/contrib/caretOperations/browser/transpose":["\u8F6C\u7F6E\u5B57\u6BCD"],"vs/editor/contrib/clipboard/browser/clipboard":["\u526A\u5207(&&T)","\u526A\u5207","\u526A\u5207","\u526A\u5207","\u590D\u5236(&&C)","\u590D\u5236","\u590D\u5236","\u590D\u5236","\u590D\u5236\u4E3A","\u590D\u5236\u4E3A","\u5171\u4EAB","\u5171\u4EAB","\u5171\u4EAB","\u7C98\u8D34(&&P)","\u7C98\u8D34","\u7C98\u8D34","\u7C98\u8D34","\u590D\u5236\u5E76\u7A81\u51FA\u663E\u793A\u8BED\u6CD5"],"vs/editor/contrib/codeAction/browser/codeAction":["\u5E94\u7528\u4EE3\u7801\u64CD\u4F5C\u65F6\u53D1\u751F\u672A\u77E5\u9519\u8BEF"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["\u8981\u8FD0\u884C\u7684\u4EE3\u7801\u64CD\u4F5C\u7684\u79CD\u7C7B\u3002","\u63A7\u5236\u4F55\u65F6\u5E94\u7528\u8FD4\u56DE\u7684\u64CD\u4F5C\u3002","\u59CB\u7EC8\u5E94\u7528\u7B2C\u4E00\u4E2A\u8FD4\u56DE\u7684\u4EE3\u7801\u64CD\u4F5C\u3002","\u5982\u679C\u4EC5\u8FD4\u56DE\u7684\u7B2C\u4E00\u4E2A\u4EE3\u7801\u64CD\u4F5C\uFF0C\u5219\u5E94\u7528\u8BE5\u64CD\u4F5C\u3002","\u4E0D\u8981\u5E94\u7528\u8FD4\u56DE\u7684\u4EE3\u7801\u64CD\u4F5C\u3002","\u5982\u679C\u53EA\u5E94\u8FD4\u56DE\u9996\u9009\u4EE3\u7801\u64CD\u4F5C\uFF0C\u5219\u5E94\u8FD4\u56DE\u63A7\u4EF6\u3002","\u5FEB\u901F\u4FEE\u590D...","\u6CA1\u6709\u53EF\u7528\u7684\u4EE3\u7801\u64CD\u4F5C",'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u4EE3\u7801\u64CD\u4F5C','\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u4EE3\u7801\u64CD\u4F5C',"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u4EE3\u7801\u64CD\u4F5C","\u6CA1\u6709\u53EF\u7528\u7684\u4EE3\u7801\u64CD\u4F5C","\u91CD\u6784...",'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u91CD\u6784','\u6CA1\u6709\u53EF\u7528\u7684"{0}"\u91CD\u6784',"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u91CD\u6784","\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u6784\u64CD\u4F5C","\u6E90\u4EE3\u7801\u64CD\u4F5C...",'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u6E90\u64CD\u4F5C',"\u6CA1\u6709\u9002\u7528\u4E8E\u201C {0}\u201D\u7684\u6E90\u64CD\u4F5C","\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u6E90\u64CD\u4F5C","\u6CA1\u6709\u53EF\u7528\u7684\u6E90\u4EE3\u7801\u64CD\u4F5C","\u6574\u7406 import \u8BED\u53E5","\u6CA1\u6709\u53EF\u7528\u7684\u6574\u7406 import \u8BED\u53E5\u64CD\u4F5C","\u5168\u90E8\u4FEE\u590D","\u6CA1\u6709\u53EF\u7528\u7684\u201C\u5168\u90E8\u4FEE\u590D\u201D\u64CD\u4F5C","\u81EA\u52A8\u4FEE\u590D...","\u6CA1\u6709\u53EF\u7528\u7684\u81EA\u52A8\u4FEE\u590D\u7A0B\u5E8F"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["\u542F\u7528/\u7981\u7528\u5728\u4EE3\u7801\u64CD\u4F5C\u83DC\u5355\u4E2D\u663E\u793A\u7EC4\u6807\u5934\u3002","\u542F\u7528/\u7981\u7528\u5728\u5F53\u524D\u672A\u8FDB\u884C\u8BCA\u65AD\u65F6\u663E\u793A\u884C\u5185\u6700\u8FD1\u7684\u5FEB\u901F\u914D\u7F6E\u3002"],"vs/editor/contrib/codeAction/browser/codeActionController":["\u4E0A\u4E0B\u6587: {0} \u4F4D\u4E8E\u884C {1} \u548C\u5217 {2}\u3002","\u9690\u85CF\u5DF2\u7981\u7528\u9879","\u663E\u793A\u5DF2\u7981\u7528\u9879"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["\u66F4\u591A\u64CD\u4F5C...","\u5FEB\u901F\u4FEE\u590D","\u63D0\u53D6","\u5185\u8054","\u91CD\u5199","\u79FB\u52A8","\u5916\u4FA7\u4EE3\u7801","\u6E90\u4EE3\u7801\u64CD\u4F5C"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u3002\u9996\u9009\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u590D({0})","\u663E\u793A\u4EE3\u7801\u64CD\u4F5C({0})","\u663E\u793A\u4EE3\u7801\u64CD\u4F5C"],"vs/editor/contrib/codelens/browser/codelensController":["\u663E\u793A\u5F53\u524D\u884C\u7684 Code Lens \u547D\u4EE4","\u9009\u62E9\u547D\u4EE4"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["\u5355\u51FB\u4EE5\u5207\u6362\u989C\u8272\u9009\u9879 (rgb/hsl/hex)","\u7528\u4E8E\u5173\u95ED\u989C\u8272\u9009\u53D6\u5668\u7684\u56FE\u6807"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["\u663E\u793A\u6216\u805A\u7126\u72EC\u7ACB\u989C\u8272\u9009\u53D6\u5668","&&\u663E\u793A\u6216\u805A\u7126\u72EC\u7ACB\u989C\u8272\u9009\u53D6\u5668","\u9690\u85CF\u989C\u8272\u9009\u53D6\u5668","\u4F7F\u7528\u72EC\u7ACB\u989C\u8272\u9009\u53D6\u5668\u63D2\u5165\u989C\u8272"],"vs/editor/contrib/comment/browser/comment":["\u5207\u6362\u884C\u6CE8\u91CA","\u5207\u6362\u884C\u6CE8\u91CA(&&T)","\u6DFB\u52A0\u884C\u6CE8\u91CA","\u5220\u9664\u884C\u6CE8\u91CA","\u5207\u6362\u5757\u6CE8\u91CA","\u5207\u6362\u5757\u6CE8\u91CA(&&B)"],"vs/editor/contrib/contextmenu/browser/contextmenu":["\u7F29\u7565\u56FE","\u5448\u73B0\u5B57\u7B26","\u5782\u76F4\u5927\u5C0F","\u6210\u6BD4\u4F8B","\u586B\u5145","\u9002\u5E94","\u6ED1\u5757","\u9F20\u6807\u60AC\u505C","\u59CB\u7EC8","\u663E\u793A\u7F16\u8F91\u5668\u4E0A\u4E0B\u6587\u83DC\u5355"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["\u5149\u6807\u64A4\u6D88","\u5149\u6807\u91CD\u505A"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["\u7C98\u8D34\u4E3A...","\u8981\u5C1D\u8BD5\u5E94\u7528\u7684\u7C98\u8D34\u7F16\u8F91\u7684 ID\u3002\u5982\u679C\u672A\u63D0\u4F9B\uFF0C\u7F16\u8F91\u5668\u5C06\u663E\u793A\u9009\u53D6\u5668\u3002"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["\u662F\u5426\u663E\u793A\u7C98\u8D34\u5C0F\u7EC4\u4EF6","\u663E\u793A\u7C98\u8D34\u9009\u9879...","\u6B63\u5728\u8FD0\u884C\u7C98\u8D34\u5904\u7406\u7A0B\u5E8F\u3002\u5355\u51FB\u4EE5\u53D6\u6D88","\u9009\u62E9\u7C98\u8D34\u64CD\u4F5C","\u6B63\u5728\u8FD0\u884C\u7C98\u8D34\u5904\u7406\u7A0B\u5E8F"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["\u5185\u7F6E","\u63D2\u5165\u7EAF\u6587\u672C","\u63D2\u5165 URI","\u63D2\u5165 URI","\u63D2\u5165\u8DEF\u5F84","\u63D2\u5165\u8DEF\u5F84","\u63D2\u5165\u76F8\u5BF9\u8DEF\u5F84","\u63D2\u5165\u76F8\u5BF9\u8DEF\u5F84"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["\u5C06\u9ED8\u8BA4\u653E\u7F6E\u63D0\u4F9B\u7A0B\u5E8F\u914D\u7F6E\u4E3A\u7528\u4E8E\u7ED9\u5B9A MIME \u7C7B\u578B\u7684\u5185\u5BB9\u3002"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["\u662F\u5426\u663E\u793A\u653E\u7F6E\u5C0F\u7EC4\u4EF6","\u663E\u793A\u653E\u7F6E\u9009\u9879...","\u6B63\u5728\u8FD0\u884C\u653E\u7F6E\u5904\u7406\u7A0B\u5E8F\u3002\u5355\u51FB\u4EE5\u53D6\u6D88"],"vs/editor/contrib/editorState/browser/keybindingCancellation":["\u7F16\u8F91\u5668\u662F\u5426\u8FD0\u884C\u53EF\u53D6\u6D88\u7684\u64CD\u4F5C\uFF0C\u4F8B\u5982\u201C\u9884\u89C8\u5F15\u7528\u201D"],"vs/editor/contrib/find/browser/findController":["\u6587\u4EF6\u592A\u5927\uFF0C\u65E0\u6CD5\u6267\u884C\u5168\u90E8\u66FF\u6362\u64CD\u4F5C\u3002","\u67E5\u627E","\u67E5\u627E(&&F)",`\u91CD\u5199\u201C\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u201D\u6807\u8BB0\u3002\r -\u5C06\u4E0D\u4F1A\u4FDD\u7559\u8BE5\u6807\u8BB0\u4F9B\u5C06\u6765\u4F7F\u7528\u3002\r -0: \u4E0D\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\r -1: True\r -2: False`,`\u91CD\u5199\u201C\u5339\u914D\u6574\u4E2A\u5B57\u8BCD\u201D\u6807\u8BB0\u3002\r -\u5C06\u4E0D\u4F1A\u4FDD\u7559\u8BE5\u6807\u8BB0\u4F9B\u5C06\u6765\u4F7F\u7528\u3002\r -0: \u4E0D\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\r -1: True\r -2: False`,`\u91CD\u5199\u201C\u6570\u5B66\u6848\u4F8B\u201D\u6807\u8BB0\u3002\r -\u5C06\u4E0D\u4F1A\u4FDD\u7559\u8BE5\u6807\u8BB0\u4F9B\u5C06\u6765\u4F7F\u7528\u3002\r -0: \u4E0D\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\r -1: True\r -2: False`,`\u91CD\u5199\u201C\u4FDD\u7559\u670D\u52A1\u6848\u4F8B\u201D\u6807\u8BB0\u3002\r -\u5C06\u4E0D\u4F1A\u4FDD\u7559\u8BE5\u6807\u8BB0\u4F9B\u5C06\u6765\u4F7F\u7528\u3002\r -0: \u4E0D\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\r -1: True\r -2: False`,"\u4F7F\u7528\u53C2\u6570\u67E5\u627E","\u67E5\u627E\u9009\u5B9A\u5185\u5BB9","\u67E5\u627E\u4E0B\u4E00\u4E2A","\u67E5\u627E\u4E0A\u4E00\u4E2A","\u8F6C\u5230\u201C\u5339\u914D\u201D...","\u65E0\u5339\u914D\u9879\u3002\u8BF7\u5C1D\u8BD5\u641C\u7D22\u5176\u4ED6\u5185\u5BB9\u3002","\u952E\u5165\u6570\u5B57\u4EE5\u8F6C\u5230\u7279\u5B9A\u5339\u914D\u9879(\u4ECB\u4E8E 1 \u548C {0} \u4E4B\u95F4)","\u8BF7\u952E\u5165\u4ECB\u4E8E 1 \u548C {0} \u4E4B\u95F4\u7684\u6570\u5B57","\u8BF7\u952E\u5165\u4ECB\u4E8E 1 \u548C {0} \u4E4B\u95F4\u7684\u6570\u5B57","\u67E5\u627E\u4E0B\u4E00\u4E2A\u9009\u62E9","\u67E5\u627E\u4E0A\u4E00\u4E2A\u9009\u62E9","\u66FF\u6362","\u66FF\u6362(&&R)"],"vs/editor/contrib/find/browser/findWidget":["\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u56FE\u6807\u3002","\u7528\u4E8E\u6307\u793A\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u5DF2\u6298\u53E0\u7684\u56FE\u6807\u3002","\u7528\u4E8E\u6307\u793A\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u5DF2\u5C55\u5F00\u7684\u56FE\u6807\u3002","\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u66FF\u6362\u201D\u56FE\u6807\u3002","\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u5168\u90E8\u66FF\u6362\u201D\u56FE\u6807\u3002","\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u67E5\u627E\u4E0A\u4E00\u4E2A\u201D\u56FE\u6807\u3002","\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u67E5\u627E\u4E0B\u4E00\u4E2A\u201D\u56FE\u6807\u3002","\u67E5\u627E/\u66FF\u6362","\u67E5\u627E","\u67E5\u627E","\u4E0A\u4E00\u4E2A\u5339\u914D\u9879","\u4E0B\u4E00\u4E2A\u5339\u914D\u9879","\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E","\u5173\u95ED","\u66FF\u6362","\u66FF\u6362","\u66FF\u6362","\u5168\u90E8\u66FF\u6362","\u5207\u6362\u66FF\u6362","\u4EC5\u9AD8\u4EAE\u4E86\u524D {0} \u4E2A\u7ED3\u679C\uFF0C\u4F46\u6240\u6709\u67E5\u627E\u64CD\u4F5C\u5747\u9488\u5BF9\u5168\u6587\u3002","\u7B2C {0} \u9879\uFF0C\u5171 {1} \u9879","\u65E0\u7ED3\u679C","\u627E\u5230 {0}","\u4E3A\u201C{1}\u201D\u627E\u5230 {0}","\u5728 {2} \u5904\u627E\u5230\u201C{1}\u201D\u7684 {0}","\u4E3A\u201C{1}\u201D\u627E\u5230 {0}","Ctrl+Enter \u73B0\u5728\u7531\u5168\u90E8\u66FF\u6362\u6539\u4E3A\u63D2\u5165\u6362\u884C\u3002\u4F60\u53EF\u4EE5\u4FEE\u6539editor.action.replaceAll \u7684\u6309\u952E\u7ED1\u5B9A\u4EE5\u8986\u76D6\u6B64\u884C\u4E3A\u3002"],"vs/editor/contrib/folding/browser/folding":["\u5C55\u5F00","\u4EE5\u9012\u5F52\u65B9\u5F0F\u5C55\u5F00","\u6298\u53E0","\u5207\u6362\u6298\u53E0","\u4EE5\u9012\u5F52\u65B9\u5F0F\u6298\u53E0","\u6298\u53E0\u6240\u6709\u5757\u6CE8\u91CA","\u6298\u53E0\u6240\u6709\u533A\u57DF","\u5C55\u5F00\u6240\u6709\u533A\u57DF","\u6298\u53E0\u9664\u9009\u5B9A\u9879\u4EE5\u5916\u7684\u6240\u6709\u9879","\u5C55\u5F00\u9664\u6240\u9009\u533A\u57DF\u4E4B\u5916\u7684\u6240\u6709\u533A\u57DF","\u5168\u90E8\u6298\u53E0","\u5168\u90E8\u5C55\u5F00","\u8DF3\u8F6C\u5230\u7236\u7EA7\u6298\u53E0","\u8F6C\u5230\u4E0A\u4E00\u4E2A\u6298\u53E0\u8303\u56F4","\u8F6C\u5230\u4E0B\u4E00\u4E2A\u6298\u53E0\u8303\u56F4","\u6839\u636E\u6240\u9009\u5185\u5BB9\u521B\u5EFA\u6298\u53E0\u8303\u56F4","\u5220\u9664\u624B\u52A8\u6298\u53E0\u8303\u56F4","\u6298\u53E0\u7EA7\u522B {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["\u6298\u53E0\u8303\u56F4\u540E\u9762\u7684\u80CC\u666F\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u8BBE\u4E3A\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","\u7F16\u8F91\u5668\u88C5\u8BA2\u7EBF\u4E2D\u6298\u53E0\u63A7\u4EF6\u7684\u989C\u8272\u3002","\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u5DF2\u5C55\u5F00\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002","\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u5DF2\u6298\u53E0\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002","\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u624B\u52A8\u6298\u53E0\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002","\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u624B\u52A8\u5C55\u5F00\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002"],"vs/editor/contrib/fontZoom/browser/fontZoom":["\u653E\u5927\u7F16\u8F91\u5668\u5B57\u4F53","\u7F29\u5C0F\u7F16\u8F91\u5668\u5B57\u4F53","\u91CD\u7F6E\u7F16\u8F91\u5668\u5B57\u4F53\u5927\u5C0F"],"vs/editor/contrib/format/browser/format":["\u5728\u7B2C {0} \u884C\u8FDB\u884C\u4E86 1 \u6B21\u683C\u5F0F\u7F16\u8F91","\u5728\u7B2C {1} \u884C\u8FDB\u884C\u4E86 {0} \u6B21\u683C\u5F0F\u7F16\u8F91","\u7B2C {0} \u884C\u5230\u7B2C {1} \u884C\u95F4\u8FDB\u884C\u4E86 1 \u6B21\u683C\u5F0F\u7F16\u8F91","\u7B2C {1} \u884C\u5230\u7B2C {2} \u884C\u95F4\u8FDB\u884C\u4E86 {0} \u6B21\u683C\u5F0F\u7F16\u8F91"],"vs/editor/contrib/format/browser/formatActions":["\u683C\u5F0F\u5316\u6587\u6863","\u683C\u5F0F\u5316\u9009\u5B9A\u5185\u5BB9"],"vs/editor/contrib/gotoError/browser/gotoError":["\u8F6C\u5230\u4E0B\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","\u201C\u8F6C\u5230\u4E0B\u4E00\u4E2A\u201D\u6807\u8BB0\u7684\u56FE\u6807\u3002","\u8F6C\u5230\u4E0A\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","\u201C\u8F6C\u5230\u4E0A\u4E00\u4E2A\u201D\u6807\u8BB0\u7684\u56FE\u6807\u3002","\u8F6C\u5230\u6587\u4EF6\u4E2D\u7684\u4E0B\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","\u4E0B\u4E00\u4E2A\u95EE\u9898(&&P)","\u8F6C\u5230\u6587\u4EF6\u4E2D\u7684\u4E0A\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","\u4E0A\u4E00\u4E2A\u95EE\u9898(&&P)"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["\u9519\u8BEF","\u8B66\u544A","\u4FE1\u606F","\u63D0\u793A","{1} \u4E2D\u7684 {0}","{0} \u4E2A\u95EE\u9898(\u5171 {1} \u4E2A)","{0} \u4E2A\u95EE\u9898(\u5171 {1} \u4E2A)","\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u9519\u8BEF\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u9519\u8BEF\u6807\u9898\u80CC\u666F\u8272\u3002","\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u8B66\u544A\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u8B66\u544A\u6807\u9898\u80CC\u666F\u8272\u3002","\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u4FE1\u606F\u989C\u8272\u3002","\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u4FE1\u606F\u6807\u9898\u80CC\u666F\u8272\u3002","\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u80CC\u666F\u8272\u3002"],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["\u5FEB\u901F\u67E5\u770B","\u5B9A\u4E49","\u672A\u627E\u5230\u201C{0}\u201D\u7684\u4EFB\u4F55\u5B9A\u4E49","\u627E\u4E0D\u5230\u5B9A\u4E49","\u8F6C\u5230\u5B9A\u4E49","\u8F6C\u5230\u5B9A\u4E49(&&D)","\u6253\u5F00\u4FA7\u8FB9\u7684\u5B9A\u4E49","\u901F\u89C8\u5B9A\u4E49","\u58F0\u660E","\u672A\u627E\u5230\u201C{0}\u201D\u7684\u58F0\u660E","\u672A\u627E\u5230\u58F0\u660E","\u8F6C\u5230\u58F0\u660E","\u8F6C\u5230\u58F0\u660E(&&D)","\u672A\u627E\u5230\u201C{0}\u201D\u7684\u58F0\u660E","\u672A\u627E\u5230\u58F0\u660E","\u67E5\u770B\u58F0\u660E","\u7C7B\u578B\u5B9A\u4E49","\u672A\u627E\u5230\u201C{0}\u201D\u7684\u7C7B\u578B\u5B9A\u4E49","\u672A\u627E\u5230\u7C7B\u578B\u5B9A\u4E49","\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49","\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49(&&T)","\u5FEB\u901F\u67E5\u770B\u7C7B\u578B\u5B9A\u4E49","\u5B9E\u73B0","\u672A\u627E\u5230\u201C{0}\u201D\u7684\u5B9E\u73B0","\u672A\u627E\u5230\u5B9E\u73B0","\u8F6C\u5230\u5B9E\u73B0","\u8F6C\u5230\u5B9E\u73B0(&&I)","\u67E5\u770B\u5B9E\u73B0",'\u672A\u627E\u5230"{0}"\u7684\u5F15\u7528',"\u672A\u627E\u5230\u5F15\u7528","\u8F6C\u5230\u5F15\u7528","\u8F6C\u5230\u5F15\u7528(&&R)","\u5F15\u7528","\u67E5\u770B\u5F15\u7528","\u5F15\u7528","\u8F6C\u5230\u4EFB\u4F55\u7B26\u53F7","\u4F4D\u7F6E","\u65E0\u201C{0}\u201D\u7684\u7ED3\u679C","\u5F15\u7528"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["\u5355\u51FB\u663E\u793A {0} \u4E2A\u5B9A\u4E49\u3002"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["\u5F15\u7528\u901F\u89C8\u662F\u5426\u53EF\u89C1\uFF0C\u4F8B\u5982\u201C\u901F\u89C8\u5F15\u7528\u201D\u6216\u201C\u901F\u89C8\u5B9A\u4E49\u201D","\u6B63\u5728\u52A0\u8F7D...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} \u4E2A\u5F15\u7528","{0} \u4E2A\u5F15\u7528","\u5F15\u7528"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["\u65E0\u53EF\u7528\u9884\u89C8","\u65E0\u7ED3\u679C","\u5F15\u7528"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["\u5728\u5217 {2} \u884C {1} \u7684 {0} \u4E2D","\u5728\u5217 {3} \u884C {2} \u7684 {1} \u4E2D\u7684 {0}","{0} \u4E2D\u6709 1 \u4E2A\u7B26\u53F7\uFF0C\u5B8C\u6574\u8DEF\u5F84: {1}","{1} \u4E2D\u6709 {0} \u4E2A\u7B26\u53F7\uFF0C\u5B8C\u6574\u8DEF\u5F84: {2}","\u672A\u627E\u5230\u7ED3\u679C","\u5728 {0} \u4E2D\u627E\u5230 1 \u4E2A\u7B26\u53F7","\u5728 {1} \u4E2D\u627E\u5230 {0} \u4E2A\u7B26\u53F7","\u5728 {1} \u4E2A\u6587\u4EF6\u4E2D\u627E\u5230 {0} \u4E2A\u7B26\u53F7"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["\u662F\u5426\u5B58\u5728\u53EA\u80FD\u901A\u8FC7\u952E\u76D8\u5BFC\u822A\u7684\u7B26\u53F7\u4F4D\u7F6E\u3002","{1} \u7684\u7B26\u53F7 {0}\uFF0C\u4E0B\u4E00\u4E2A\u4F7F\u7528 {2}","{1} \u7684\u7B26\u53F7 {0}"],"vs/editor/contrib/hover/browser/hover":["\u663E\u793A\u6216\u805A\u7126\u60AC\u505C","\u663E\u793A\u5B9A\u4E49\u9884\u89C8\u60AC\u505C","\u5411\u4E0A\u6EDA\u52A8\u60AC\u505C","\u5411\u4E0B\u6EDA\u52A8\u60AC\u505C","\u5411\u5DE6\u6EDA\u52A8\u60AC\u505C","\u5411\u53F3\u6EDA\u52A8\u60AC\u505C","\u5411\u4E0A\u7FFB\u9875\u60AC\u505C","\u5411\u4E0B\u7FFB\u9875\u60AC\u505C","\u8F6C\u5230\u9876\u90E8\u60AC\u505C","\u8F6C\u5230\u5E95\u90E8\u60AC\u505C"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["\u6B63\u5728\u52A0\u8F7D...","\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u957F\u7EBF\u7684\u5448\u73B0\u5DF2\u6682\u505C\u3002\u53EF\u901A\u8FC7`editor.stopRenderingLineAfter`\u914D\u7F6E\u6B64\u8BBE\u7F6E\u3002","\u51FA\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u672A\u5BF9\u957F\u884C\u8FDB\u884C\u89E3\u6790\u3002\u89E3\u6790\u957F\u5EA6\u9608\u503C\u53EF\u901A\u8FC7\u201Ceditor.maxTokenizationLineLength\u201D\u8FDB\u884C\u914D\u7F6E\u3002"],"vs/editor/contrib/hover/browser/markerHoverParticipant":["\u67E5\u770B\u95EE\u9898","\u6CA1\u6709\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u590D","\u6B63\u5728\u68C0\u67E5\u5FEB\u901F\u4FEE\u590D...","\u6CA1\u6709\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u590D","\u5FEB\u901F\u4FEE\u590D..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["\u66FF\u6362\u4E3A\u4E0A\u4E00\u4E2A\u503C","\u66FF\u6362\u4E3A\u4E0B\u4E00\u4E2A\u503C"],"vs/editor/contrib/indentation/browser/indentation":["\u5C06\u7F29\u8FDB\u8F6C\u6362\u4E3A\u7A7A\u683C","\u5C06\u7F29\u8FDB\u8F6C\u6362\u4E3A\u5236\u8868\u7B26","\u5DF2\u914D\u7F6E\u5236\u8868\u7B26\u5927\u5C0F","\u9ED8\u8BA4\u9009\u9879\u5361\u5927\u5C0F","\u5F53\u524D\u9009\u9879\u5361\u5927\u5C0F","\u9009\u62E9\u5F53\u524D\u6587\u4EF6\u7684\u5236\u8868\u7B26\u5927\u5C0F","\u4F7F\u7528\u5236\u8868\u7B26\u7F29\u8FDB","\u4F7F\u7528\u7A7A\u683C\u7F29\u8FDB","\u66F4\u6539\u5236\u8868\u7B26\u663E\u793A\u5927\u5C0F","\u4ECE\u5185\u5BB9\u4E2D\u68C0\u6D4B\u7F29\u8FDB\u65B9\u5F0F","\u91CD\u65B0\u7F29\u8FDB\u884C","\u91CD\u65B0\u7F29\u8FDB\u6240\u9009\u884C"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["\u53CC\u51FB\u4EE5\u63D2\u5165","cmd + \u70B9\u51FB","ctrl + \u70B9\u51FB","option + \u70B9\u51FB","alt + \u70B9\u51FB","\u8F6C\u5230\u5B9A\u4E49 ({0})\uFF0C\u70B9\u51FB\u53F3\u952E\u4EE5\u67E5\u770B\u8BE6\u7EC6\u4FE1\u606F","\u8F6C\u5230\u5B9A\u4E49\uFF08{0}\uFF09","\u6267\u884C\u547D\u4EE4"],"vs/editor/contrib/inlineCompletions/browser/commands":["\u663E\u793A\u4E0B\u4E00\u4E2A\u5185\u8054\u5EFA\u8BAE","\u663E\u793A\u4E0A\u4E00\u4E2A\u5185\u8054\u5EFA\u8BAE","\u89E6\u53D1\u5185\u8054\u5EFA\u8BAE","\u63A5\u53D7\u5185\u8054\u5EFA\u8BAE\u7684\u4E0B\u4E00\u4E2A\u5B57","\u63A5\u53D7 Word","\u63A5\u53D7\u5185\u8054\u5EFA\u8BAE\u7684\u4E0B\u4E00\u884C","\u63A5\u53D7\u884C","\u63A5\u53D7\u5185\u8054\u5EFA\u8BAE","\u63A5\u53D7","\u9690\u85CF\u5185\u8054\u5EFA\u8BAE","\u59CB\u7EC8\u663E\u793A\u5DE5\u5177\u680F"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["\u5EFA\u8BAE:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u53EF\u89C1","\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u4EE5\u7A7A\u767D\u5F00\u5934","\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u4EE5\u5C0F\u4E8E\u9009\u9879\u5361\u63D2\u5165\u5185\u5BB9\u7684\u7A7A\u683C\u5F00\u5934","\u662F\u5426\u5E94\u6291\u5236\u5F53\u524D\u5EFA\u8BAE"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["\u5728\u8F85\u52A9\u89C6\u56FE\u4E2D\u68C0\u67E5\u6B64\u9879 ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["\u201C\u663E\u793A\u4E0B\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","\u201C\u663E\u793A\u4E0A\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","{0} ({1})","\u4E0A\u4E00\u4E2A","\u4E0B\u4E00\u4E2A"],"vs/editor/contrib/lineSelection/browser/lineSelection":["\u5C55\u5F00\u884C\u9009\u62E9"],"vs/editor/contrib/linesOperations/browser/linesOperations":["\u5411\u4E0A\u590D\u5236\u884C","\u5411\u4E0A\u590D\u5236\u4E00\u884C(&&C)","\u5411\u4E0B\u590D\u5236\u884C","\u5411\u4E0B\u590D\u5236\u4E00\u884C(&&P)","\u91CD\u590D\u9009\u62E9","\u91CD\u590D\u9009\u62E9(&&D)","\u5411\u4E0A\u79FB\u52A8\u884C","\u5411\u4E0A\u79FB\u52A8\u4E00\u884C(&&V)","\u5411\u4E0B\u79FB\u52A8\u884C","\u5411\u4E0B\u79FB\u52A8\u4E00\u884C(&&L)","\u6309\u5347\u5E8F\u6392\u5217\u884C","\u6309\u964D\u5E8F\u6392\u5217\u884C","\u5220\u9664\u91CD\u590D\u884C","\u88C1\u526A\u5C3E\u968F\u7A7A\u683C","\u5220\u9664\u884C","\u884C\u7F29\u8FDB","\u884C\u51CF\u5C11\u7F29\u8FDB","\u5728\u4E0A\u9762\u63D2\u5165\u884C","\u5728\u4E0B\u9762\u63D2\u5165\u884C","\u5220\u9664\u5DE6\u4FA7\u6240\u6709\u5185\u5BB9","\u5220\u9664\u53F3\u4FA7\u6240\u6709\u5185\u5BB9","\u5408\u5E76\u884C","\u8F6C\u7F6E\u5149\u6807\u5904\u7684\u5B57\u7B26","\u8F6C\u6362\u4E3A\u5927\u5199","\u8F6C\u6362\u4E3A\u5C0F\u5199","\u8F6C\u6362\u4E3A\u8BCD\u9996\u5B57\u6BCD\u5927\u5199","\u8F6C\u6362\u4E3A\u86C7\u5F62\u547D\u540D\u6CD5","\u8F6C\u6362\u4E3A\u9A7C\u5CF0\u5F0F\u5927\u5C0F\u5199","\u8F6C\u6362\u4E3A Kebab \u6848\u4F8B"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["\u542F\u52A8\u94FE\u63A5\u7F16\u8F91","\u7F16\u8F91\u5668\u6839\u636E\u7C7B\u578B\u81EA\u52A8\u91CD\u547D\u540D\u65F6\u7684\u80CC\u666F\u8272\u3002"],"vs/editor/contrib/links/browser/links":["\u6B64\u94FE\u63A5\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u65E0\u6CD5\u6253\u5F00: {0}","\u6B64\u94FE\u63A5\u76EE\u6807\u5DF2\u4E22\u5931\uFF0C\u65E0\u6CD5\u6253\u5F00\u3002","\u6267\u884C\u547D\u4EE4","\u6253\u5F00\u94FE\u63A5","cmd + \u5355\u51FB","ctrl + \u5355\u51FB","option + \u5355\u51FB","alt + \u5355\u51FB","\u6267\u884C\u547D\u4EE4 {0}","\u6253\u5F00\u94FE\u63A5"],"vs/editor/contrib/message/browser/messageController":["\u7F16\u8F91\u5668\u5F53\u524D\u662F\u5426\u6B63\u5728\u663E\u793A\u5185\u8054\u6D88\u606F"],"vs/editor/contrib/multicursor/browser/multicursor":["\u6DFB\u52A0\u7684\u5149\u6807: {0}","\u6DFB\u52A0\u7684\u6E38\u6807: {0}","\u5728\u4E0A\u9762\u6DFB\u52A0\u5149\u6807","\u5728\u4E0A\u9762\u6DFB\u52A0\u5149\u6807(&&A)","\u5728\u4E0B\u9762\u6DFB\u52A0\u5149\u6807","\u5728\u4E0B\u9762\u6DFB\u52A0\u5149\u6807(&&D)","\u5728\u884C\u5C3E\u6DFB\u52A0\u5149\u6807","\u5728\u884C\u5C3E\u6DFB\u52A0\u5149\u6807(&&U)","\u5728\u5E95\u90E8\u6DFB\u52A0\u5149\u6807","\u5728\u9876\u90E8\u6DFB\u52A0\u5149\u6807","\u5C06\u4E0B\u4E00\u4E2A\u67E5\u627E\u5339\u914D\u9879\u6DFB\u52A0\u5230\u9009\u62E9","\u6DFB\u52A0\u4E0B\u4E00\u4E2A\u5339\u914D\u9879(&&N)","\u5C06\u9009\u62E9\u5185\u5BB9\u6DFB\u52A0\u5230\u4E0A\u4E00\u67E5\u627E\u5339\u914D\u9879","\u6DFB\u52A0\u4E0A\u4E00\u4E2A\u5339\u914D\u9879(&&R)","\u5C06\u4E0A\u6B21\u9009\u62E9\u79FB\u52A8\u5230\u4E0B\u4E00\u4E2A\u67E5\u627E\u5339\u914D\u9879","\u5C06\u4E0A\u4E2A\u9009\u62E9\u5185\u5BB9\u79FB\u52A8\u5230\u4E0A\u4E00\u67E5\u627E\u5339\u914D\u9879","\u9009\u62E9\u6240\u6709\u627E\u5230\u7684\u67E5\u627E\u5339\u914D\u9879","\u9009\u62E9\u6240\u6709\u5339\u914D\u9879(&&O)","\u66F4\u6539\u6240\u6709\u5339\u914D\u9879","\u805A\u7126\u4E0B\u4E00\u4E2A\u5149\u6807","\u805A\u7126\u4E0B\u4E00\u4E2A\u5149\u6807","\u805A\u7126\u4E0A\u4E00\u4E2A\u5149\u6807","\u805A\u7126\u4E0A\u4E00\u4E2A\u5149\u6807"],"vs/editor/contrib/parameterHints/browser/parameterHints":["\u89E6\u53D1\u53C2\u6570\u63D0\u793A"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["\u201C\u663E\u793A\u4E0B\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","\u201C\u663E\u793A\u4E0A\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","{0}\uFF0C\u63D0\u793A","\u53C2\u6570\u63D0\u793A\u4E2D\u6D3B\u52A8\u9879\u7684\u524D\u666F\u8272\u3002"],"vs/editor/contrib/peekView/browser/peekView":["\u901F\u89C8\u4E2D\u662F\u5426\u5D4C\u5165\u4E86\u5F53\u524D\u4EE3\u7801\u7F16\u8F91\u5668","\u5173\u95ED","\u901F\u89C8\u89C6\u56FE\u6807\u9898\u533A\u57DF\u80CC\u666F\u989C\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u6807\u9898\u989C\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u6807\u9898\u4FE1\u606F\u989C\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u8FB9\u6846\u548C\u7BAD\u5934\u989C\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u80CC\u666F\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u884C\u8282\u70B9\u7684\u524D\u666F\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6587\u4EF6\u8282\u70B9\u7684\u524D\u666F\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6240\u9009\u6761\u76EE\u7684\u80CC\u666F\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6240\u9009\u6761\u76EE\u7684\u524D\u666F\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u80CC\u666F\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u88C5\u8BA2\u7EBF\u7684\u80CC\u666F\u8272\u3002","\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u7C98\u6EDE\u6EDA\u52A8\u7684\u80CC\u666F\u8272\u3002","\u5728\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u5339\u914D\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","\u5728\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u5339\u914D\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","\u5728\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u5339\u914D\u9879\u7684\u7A81\u51FA\u663E\u793A\u8FB9\u6846\u3002"],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["\u5148\u6253\u5F00\u6587\u672C\u7F16\u8F91\u5668\u7136\u540E\u8DF3\u8F6C\u5230\u884C\u3002","\u8F6C\u5230\u7B2C {0} \u884C\u7B2C {1} \u4E2A\u5B57\u7B26\u3002","\u8F6C\u5230\u884C {0}\u3002","\u5F53\u524D\u884C: {0}\uFF0C\u5B57\u7B26: {1}\u3002\u952E\u5165\u8981\u5BFC\u822A\u5230\u7684\u884C\u53F7(\u4ECB\u4E8E 1 \u81F3 {2} \u4E4B\u95F4)\u3002","\u5F53\u524D\u884C: {0}\uFF0C\u5B57\u7B26: {1}\u3002 \u952E\u5165\u8981\u5BFC\u822A\u5230\u7684\u884C\u53F7\u3002"],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["\u8981\u8F6C\u5230\u7B26\u53F7\uFF0C\u9996\u5148\u6253\u5F00\u5177\u6709\u7B26\u53F7\u4FE1\u606F\u7684\u6587\u672C\u7F16\u8F91\u5668\u3002","\u6D3B\u52A8\u6587\u672C\u7F16\u8F91\u5668\u4E0D\u63D0\u4F9B\u7B26\u53F7\u4FE1\u606F\u3002","\u6CA1\u6709\u5339\u914D\u7684\u7F16\u8F91\u5668\u7B26\u53F7","\u6CA1\u6709\u7F16\u8F91\u5668\u7B26\u53F7","\u5728\u4FA7\u8FB9\u6253\u5F00","\u5728\u5E95\u90E8\u6253\u5F00","\u7B26\u53F7({0})","\u5C5E\u6027({0})","\u65B9\u6CD5({0})","\u51FD\u6570({0})","\u6784\u9020\u51FD\u6570 ({0})","\u53D8\u91CF({0})","\u7C7B({0})","\u7ED3\u6784({0})","\u4E8B\u4EF6({0})","\u8FD0\u7B97\u7B26({0})","\u63A5\u53E3({0})","\u547D\u540D\u7A7A\u95F4({0})","\u5305({0})","\u7C7B\u578B\u53C2\u6570({0})","\u6A21\u5757({0})","\u5C5E\u6027({0})","\u679A\u4E3E({0})","\u679A\u4E3E\u6210\u5458({0})","\u5B57\u7B26\u4E32({0})","\u6587\u4EF6({0})","\u6570\u7EC4({0})","\u6570\u5B57({0})","\u5E03\u5C14\u503C({0})","\u5BF9\u8C61({0})","\u952E({0})","\u5B57\u6BB5({0})","\u5E38\u91CF({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["\u65E0\u6CD5\u5728\u53EA\u8BFB\u8F93\u5165\u4E2D\u7F16\u8F91","\u65E0\u6CD5\u5728\u53EA\u8BFB\u7F16\u8F91\u5668\u4E2D\u7F16\u8F91"],"vs/editor/contrib/rename/browser/rename":["\u65E0\u7ED3\u679C\u3002","\u89E3\u6790\u91CD\u547D\u540D\u4F4D\u7F6E\u65F6\u53D1\u751F\u672A\u77E5\u9519\u8BEF","\u6B63\u5728\u5C06\u201C{0}\u201D\u91CD\u547D\u540D\u4E3A\u201C{1}\u201D","\u5C06 {0} \u91CD\u547D\u540D\u4E3A {1}","\u6210\u529F\u5C06\u201C{0}\u201D\u91CD\u547D\u540D\u4E3A\u201C{1}\u201D\u3002\u6458\u8981: {2}","\u91CD\u547D\u540D\u65E0\u6CD5\u5E94\u7528\u4FEE\u6539","\u91CD\u547D\u540D\u65E0\u6CD5\u8BA1\u7B97\u4FEE\u6539","\u91CD\u547D\u540D\u7B26\u53F7","\u542F\u7528/\u7981\u7528\u91CD\u547D\u540D\u4E4B\u524D\u9884\u89C8\u66F4\u6539\u7684\u529F\u80FD"],"vs/editor/contrib/rename/browser/renameInputField":["\u91CD\u547D\u540D\u8F93\u5165\u5C0F\u7EC4\u4EF6\u662F\u5426\u53EF\u89C1",'\u91CD\u547D\u540D\u8F93\u5165\u3002\u952E\u5165\u65B0\u540D\u79F0\u5E76\u6309 "Enter" \u63D0\u4EA4\u3002',"\u6309 {0} \u8FDB\u884C\u91CD\u547D\u540D\uFF0C\u6309 {1} \u8FDB\u884C\u9884\u89C8"],"vs/editor/contrib/smartSelect/browser/smartSelect":["\u5C55\u5F00\u9009\u62E9","\u6269\u5927\u9009\u533A(&&E)","\u6536\u8D77\u9009\u62E9","\u7F29\u5C0F\u9009\u533A(&&S)"],"vs/editor/contrib/snippet/browser/snippetController2":["\u7F16\u8F91\u5668\u76EE\u524D\u662F\u5426\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B","\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B\u65F6\u662F\u5426\u5B58\u5728\u4E0B\u4E00\u5236\u8868\u4F4D","\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B\u65F6\u662F\u5426\u5B58\u5728\u4E0A\u4E00\u5236\u8868\u4F4D","\u8F6C\u5230\u4E0B\u4E00\u4E2A\u5360\u4F4D\u7B26..."],"vs/editor/contrib/snippet/browser/snippetVariables":["\u661F\u671F\u5929","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D","\u5468\u65E5","\u5468\u4E00","\u5468\u4E8C","\u5468\u4E09","\u5468\u56DB","\u5468\u4E94","\u5468\u516D","\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","5\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708","1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11 \u6708","12\u6708"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["\u5207\u6362\u7C98\u6EDE\u6EDA\u52A8","\u5207\u6362\u7C98\u6EDE\u6EDA\u52A8(&&T)","\u7C98\u6EDE\u6EDA\u52A8","\u7C98\u6EDE\u6EDA\u52A8(&&S)","\u805A\u7126\u7C98\u6027\u6EDA\u52A8","\u805A\u7126\u7C98\u6027\u6EDA\u52A8(&&F)","\u9009\u62E9\u4E0B\u4E00\u4E2A\u7C98\u6027\u6EDA\u52A8\u884C","\u9009\u62E9\u4E0A\u4E00\u4E2A\u7C98\u6027\u6EDA\u52A8\u884C","\u8F6C\u5230\u805A\u7126\u7684\u7C98\u6027\u6EDA\u52A8\u884C","\u9009\u62E9\u7F16\u8F91\u5668"],"vs/editor/contrib/suggest/browser/suggest":["\u662F\u5426\u4EE5\u4EFB\u4F55\u5EFA\u8BAE\u4E3A\u4E2D\u5FC3","\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u5426\u53EF\u89C1","\u662F\u5426\u5B58\u5728\u591A\u6761\u5EFA\u8BAE\u53EF\u4F9B\u9009\u62E9","\u63D2\u5165\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u4F1A\u5BFC\u81F4\u66F4\u6539\u6216\u5BFC\u81F4\u5DF2\u952E\u5165\u6240\u6709\u5185\u5BB9","\u6309 Enter \u65F6\u662F\u5426\u4F1A\u63D2\u5165\u5EFA\u8BAE","\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u5177\u6709\u63D2\u5165\u548C\u66FF\u6362\u884C\u4E3A","\u9ED8\u8BA4\u884C\u4E3A\u662F\u5426\u662F\u63D2\u5165\u6216\u66FF\u6362","\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u652F\u6301\u89E3\u6790\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F"],"vs/editor/contrib/suggest/browser/suggestController":["\u9009\u62E9\u201C{0}\u201D\u540E\u8FDB\u884C\u4E86\u5176\u4ED6 {1} \u6B21\u7F16\u8F91","\u89E6\u53D1\u5EFA\u8BAE","\u63D2\u5165","\u63D2\u5165","\u66FF\u6362","\u66FF\u6362","\u63D2\u5165","\u663E\u793A\u66F4\u5C11","\u663E\u793A\u66F4\u591A","\u91CD\u7F6E\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u5927\u5C0F"],"vs/editor/contrib/suggest/browser/suggestWidget":["\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u80CC\u666F\u8272\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u524D\u666F\u8272\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u524D\u666F\u8272\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u56FE\u6807\u524D\u666F\u8272\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u80CC\u666F\u8272\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u5339\u914D\u5185\u5BB9\u7684\u9AD8\u4EAE\u989C\u8272\u3002","\u5F53\u67D0\u9879\u83B7\u5F97\u7126\u70B9\u65F6\uFF0C\u5728\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u7A81\u51FA\u663E\u793A\u7684\u5339\u914D\u9879\u7684\u989C\u8272\u3002","\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u72B6\u6001\u7684\u524D\u666F\u8272\u3002","\u6B63\u5728\u52A0\u8F7D...","\u65E0\u5EFA\u8BAE\u3002","\u5EFA\u8BAE","{0} {1}\uFF0C{2}","{0} {1}","{0}\uFF0C{1}","{0}\uFF0C\u6587\u6863: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["\u5173\u95ED","\u6B63\u5728\u52A0\u8F7D\u2026"],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u8BE6\u7EC6\u4FE1\u606F\u7684\u56FE\u6807\u3002","\u4E86\u89E3\u8BE6\u7EC6\u4FE1\u606F"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["\u6570\u7EC4\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u5C06\u663E\u793A\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","\u5E03\u5C14\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u7C7B\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u989C\u8272\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5E38\u91CF\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u6784\u9020\u51FD\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u679A\u4E3E\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u679A\u4E3E\u5668\u6210\u5458\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u4E8B\u4EF6\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5B57\u6BB5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u6587\u4EF6\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u6587\u4EF6\u5939\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u51FD\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u63A5\u53E3\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u5C06\u663E\u793A\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","\u952E\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5173\u952E\u5B57\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u65B9\u6CD5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u6A21\u5757\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u547D\u540D\u7A7A\u95F4\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u8F6E\u5ED3\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u7A7A\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u6570\u5B57\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5BF9\u8C61\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u8FD0\u7B97\u7B26\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5305\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5C5E\u6027\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","\u53C2\u8003\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u7247\u6BB5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5B57\u7B26\u4E32\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u8F6E\u5ED3\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u7ED3\u6784\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u6587\u672C\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u7C7B\u578B\u53C2\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u5355\u4F4D\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","\u53D8\u91CF\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002"],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["\u5207\u6362 Tab \u952E\u79FB\u52A8\u7126\u70B9","Tab \u952E\u5C06\u79FB\u52A8\u5230\u4E0B\u4E00\u53EF\u805A\u7126\u7684\u5143\u7D20","Tab \u952E\u5C06\u63D2\u5165\u5236\u8868\u7B26"],"vs/editor/contrib/tokenization/browser/tokenization":["\u5F00\u53D1\u4EBA\u5458: \u5F3A\u5236\u91CD\u65B0\u8FDB\u884C\u6807\u8BB0"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["\u6269\u5C55\u7F16\u8F91\u5668\u4E2D\u968F\u8B66\u544A\u6D88\u606F\u4E00\u540C\u663E\u793A\u7684\u56FE\u6807\u3002","\u672C\u6587\u6863\u5305\u542B\u8BB8\u591A\u975E\u57FA\u672C ASCII unicode \u5B57\u7B26","\u672C\u6587\u6863\u5305\u542B\u8BB8\u591A\u4E0D\u660E\u786E\u7684 unicode \u5B57\u7B26","\u672C\u6587\u6863\u5305\u542B\u8BB8\u591A\u4E0D\u53EF\u89C1\u7684 unicode \u5B57\u7B26","\u5B57\u7B26 {0} \u53EF\u80FD\u4F1A\u4E0E ASCII \u5B57\u7B26 {1} \u6DF7\u6DC6\uFF0C\u540E\u8005\u5728\u6E90\u4EE3\u7801\u4E2D\u66F4\u4E3A\u5E38\u89C1\u3002","\u5B57\u7B26 {0} \u53EF\u80FD\u4F1A\u4E0E\u5B57\u7B26 {1} \u6DF7\u6DC6\uFF0C\u540E\u8005\u5728\u6E90\u4EE3\u7801\u4E2D\u66F4\u4E3A\u5E38\u89C1\u3002","\u5B57\u7B26 {0} \u4E0D\u53EF\u89C1\u3002","\u5B57\u7B26 {0} \u4E0D\u662F\u57FA\u672C ASCII \u5B57\u7B26\u3002","\u8C03\u6574\u8BBE\u7F6E","\u7981\u7528\u6279\u6CE8\u4E2D\u7684\u7A81\u51FA\u663E\u793A","\u7981\u7528\u6279\u6CE8\u4E2D\u5B57\u7B26\u7684\u7A81\u51FA\u663E\u793A","\u7981\u7528\u5B57\u7B26\u4E32\u4E2D\u7684\u7A81\u51FA\u663E\u793A","\u7981\u7528\u5B57\u7B26\u4E32\u4E2D\u5B57\u7B26\u7684\u7A81\u51FA\u663E\u793A","\u7981\u7528\u4E0D\u660E\u786E\u7684\u7A81\u51FA\u663E\u793A","\u7981\u6B62\u7A81\u51FA\u663E\u793A\u6B67\u4E49\u5B57\u7B26","\u7981\u7528\u4E0D\u53EF\u89C1\u7A81\u51FA\u663E\u793A","\u7981\u6B62\u7A81\u51FA\u663E\u793A\u4E0D\u53EF\u89C1\u5B57\u7B26","\u7981\u7528\u975E ASCII \u7A81\u51FA\u663E\u793A","\u7981\u6B62\u7A81\u51FA\u663E\u793A\u975E\u57FA\u672C ASCII \u5B57\u7B26","\u663E\u793A\u6392\u9664\u9009\u9879","\u4E0D\u7A81\u51FA\u663E\u793A {0} (\u4E0D\u53EF\u89C1\u5B57\u7B26)","\u5728\u7A81\u51FA\u663E\u793A\u5185\u5BB9\u4E2D\u6392\u9664{0}","\u5141\u8BB8\u8BED\u8A00\u201C{0}\u201D\u4E2D\u66F4\u5E38\u89C1\u7684 unicode \u5B57\u7B26\u3002","\u914D\u7F6E Unicode \u7A81\u51FA\u663E\u793A\u9009\u9879"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26","\u68C0\u6D4B\u5230\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26",`\u6587\u4EF6\u201C{0}\u201D\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\uFF0C\u4F8B\u5982\u884C\u5206\u9694\u7B26(LS)\u6216\u6BB5\u843D\u5206\u9694\u7B26(PS)\u3002\r -\r -\u5EFA\u8BAE\u4ECE\u6587\u4EF6\u4E2D\u5220\u9664\u5B83\u4EEC\u3002\u53EF\u901A\u8FC7\u201Ceditor.unusualLineTerminators\u201D\u8FDB\u884C\u914D\u7F6E\u3002`,"\u5220\u9664\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26(&&R)","\u5FFD\u7565"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["\u8BFB\u53D6\u8BBF\u95EE\u671F\u95F4\u7B26\u53F7\u7684\u80CC\u666F\u8272\uFF0C\u4F8B\u5982\u8BFB\u53D6\u53D8\u91CF\u65F6\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5199\u5165\u8BBF\u95EE\u8FC7\u7A0B\u4E2D\u7B26\u53F7\u7684\u80CC\u666F\u8272\uFF0C\u4F8B\u5982\u5199\u5165\u53D8\u91CF\u65F6\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7B26\u53F7\u5728\u6587\u672C\u4E2D\u51FA\u73B0\u65F6\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u5C42\u7684\u4FEE\u9970\u3002","\u7B26\u53F7\u5728\u8FDB\u884C\u8BFB\u53D6\u8BBF\u95EE\u64CD\u4F5C\u65F6\u7684\u8FB9\u6846\u989C\u8272\uFF0C\u4F8B\u5982\u8BFB\u53D6\u53D8\u91CF\u3002","\u7B26\u53F7\u5728\u8FDB\u884C\u5199\u5165\u8BBF\u95EE\u64CD\u4F5C\u65F6\u7684\u8FB9\u6846\u989C\u8272\uFF0C\u4F8B\u5982\u5199\u5165\u53D8\u91CF\u3002","\u7B26\u53F7\u5728\u6587\u672C\u4E2D\u51FA\u73B0\u65F6\u7684\u8FB9\u6846\u989C\u8272\u3002","\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u7B26\u53F7\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u5199\u6743\u9650\u7B26\u53F7\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7B26\u53F7\u5728\u6587\u672C\u4E2D\u51FA\u73B0\u65F6\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u5C42\u7684\u4FEE\u9970\u3002"],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["\u8F6C\u5230\u4E0B\u4E00\u4E2A\u7A81\u51FA\u663E\u793A\u7684\u7B26\u53F7","\u8F6C\u5230\u4E0A\u4E00\u4E2A\u7A81\u51FA\u663E\u793A\u7684\u7B26\u53F7","\u89E6\u53D1\u7B26\u53F7\u9AD8\u4EAE"],"vs/editor/contrib/wordOperations/browser/wordOperations":["\u5220\u9664 Word"],"vs/platform/action/common/actionCommonCategories":["\u67E5\u770B","\u5E2E\u52A9","\u6D4B\u8BD5","\u6587\u4EF6","\u9996\u9009\u9879","\u5F00\u53D1\u4EBA\u5458"],"vs/platform/actionWidget/browser/actionList":["\u6309 {0} \u4EE5\u5E94\u7528\uFF0C\u6309 {1} \u4EE5\u9884\u89C8","\u6309 {0} \u4EE5\u5E94\u7528","{0}\uFF0C\u7981\u7528\u539F\u56E0: {1}","\u64CD\u4F5C\u5C0F\u7EC4\u4EF6"],"vs/platform/actionWidget/browser/actionWidget":["\u64CD\u4F5C\u680F\u4E2D\u5207\u6362\u7684\u64CD\u4F5C\u9879\u7684\u80CC\u666F\u8272\u3002","\u64CD\u4F5C\u5C0F\u7EC4\u4EF6\u5217\u8868\u662F\u5426\u53EF\u89C1","\u9690\u85CF\u64CD\u4F5C\u5C0F\u7EC4\u4EF6","\u9009\u62E9\u4E0A\u4E00\u4E2A\u64CD\u4F5C","\u9009\u62E9\u4E0B\u4E00\u4E2A\u64CD\u4F5C","\u63A5\u53D7\u6240\u9009\u64CD\u4F5C","\u9884\u89C8\u6240\u9009\u64CD\u4F5C"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["\u9690\u85CF","\u91CD\u7F6E\u83DC\u5355"],"vs/platform/actions/common/menuService":["\u9690\u85CF\u201C{0}\u201D"],"vs/platform/audioCues/browser/audioCueService":["\u884C\u4E0A\u7684\u9519\u8BEF","\u884C\u4E0A\u7684\u8B66\u544A","\u884C\u4E0A\u7684\u6298\u53E0\u533A\u57DF","\u884C\u4E0A\u7684\u65AD\u70B9","\u884C\u4E0A\u7684\u5185\u8054\u5EFA\u8BAE","\u7EC8\u7AEF\u5FEB\u901F\u4FEE\u590D","\u8C03\u8BD5\u7A0B\u5E8F\u5DF2\u5728\u65AD\u70B9\u5904\u505C\u6B62","\u884C\u4E0A\u65E0\u5D4C\u5165\u63D0\u793A","\u4EFB\u52A1\u5DF2\u5B8C\u6210","\u4EFB\u52A1\u5931\u8D25","\u7EC8\u7AEF\u547D\u4EE4\u5931\u8D25","\u7EC8\u7AEF\u949F","\u7B14\u8BB0\u672C\u5355\u5143\u683C\u5DF2\u5B8C\u6210","\u7B14\u8BB0\u672C\u5355\u5143\u683C\u5931\u8D25","\u5DF2\u63D2\u5165\u5DEE\u5F02\u7EBF","\u5DF2\u5220\u9664\u5DEE\u5F02\u884C","\u5DEE\u5F02\u884C\u5DF2\u4FEE\u6539","\u5DF2\u53D1\u9001\u804A\u5929\u8BF7\u6C42","\u5DF2\u6536\u5230\u804A\u5929\u54CD\u5E94","\u804A\u5929\u54CD\u5E94\u6302\u8D77"],"vs/platform/configuration/common/configurationRegistry":["\u9ED8\u8BA4\u8BED\u8A00\u914D\u7F6E\u66FF\u4EE3","\u914D\u7F6E\u8981\u4E3A {0} \u8BED\u8A00\u66FF\u4EE3\u7684\u8BBE\u7F6E\u3002","\u9488\u5BF9\u67D0\u79CD\u8BED\u8A00\uFF0C\u914D\u7F6E\u66FF\u4EE3\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002","\u6B64\u8BBE\u7F6E\u4E0D\u652F\u6301\u6309\u8BED\u8A00\u914D\u7F6E\u3002","\u9488\u5BF9\u67D0\u79CD\u8BED\u8A00\uFF0C\u914D\u7F6E\u66FF\u4EE3\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002","\u6B64\u8BBE\u7F6E\u4E0D\u652F\u6301\u6309\u8BED\u8A00\u914D\u7F6E\u3002","\u65E0\u6CD5\u6CE8\u518C\u7A7A\u5C5E\u6027",'\u65E0\u6CD5\u6CE8\u518C\u201C{0}\u201D\u3002\u5176\u7B26\u5408\u63CF\u8FF0\u7279\u5B9A\u8BED\u8A00\u7F16\u8F91\u5668\u8BBE\u7F6E\u7684\u8868\u8FBE\u5F0F "\\\\[.*\\\\]$"\u3002\u8BF7\u4F7F\u7528 "configurationDefaults"\u3002',"\u65E0\u6CD5\u6CE8\u518C\u201C{0}\u201D\u3002\u6B64\u5C5E\u6027\u5DF2\u6CE8\u518C\u3002",'\u65E0\u6CD5\u6CE8\u518C "{0}"\u3002\u5173\u8054\u7684\u7B56\u7565 {1} \u5DF2\u5411 {2} \u6CE8\u518C\u3002'],"vs/platform/contextkey/browser/contextKeyService":["\u7528\u4E8E\u8FD4\u56DE\u4E0A\u4E0B\u6587\u952E\u7684\u76F8\u5173\u4FE1\u606F\u7684\u547D\u4EE4"],"vs/platform/contextkey/common/contextkey":["\u4E0A\u4E0B\u6587\u952E\u8868\u8FBE\u5F0F\u4E3A\u7A7A",'\u5FD8\u8BB0\u5199\u5165\u8868\u8FBE\u5F0F\u4E86\u5417? \u8FD8\u53EF\u4EE5\u653E\u7F6E "false" \u6216 "true" \u4EE5\u59CB\u7EC8\u5206\u522B\u8BC4\u4F30\u4E3A false \u6216 true\u3002','"not" \u540E\u9762\u7684 "in"\u3002','\u53F3\u62EC\u53F7 ")"',"\u610F\u5916\u7684\u4EE4\u724C","\u5FD8\u8BB0\u5728\u4EE4\u724C\u4E4B\u524D\u653E\u7F6E && \u6216 || \u4E86\u5417?","\u610F\u5916\u7684\u8868\u8FBE\u5F0F\u7ED3\u5C3E","\u5FD8\u8BB0\u653E\u7F6E\u4E0A\u4E0B\u6587\u952E\u4E86\u5417?",`\u5E94\u4E3A: {0}\r -\u6536\u5230\u7684: "{1}"\u3002`],"vs/platform/contextkey/common/contextkeys":["\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5426 macOS","\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5426\u4E3A Linux","\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5426\u4E3A Windows","\u5E73\u53F0\u662F\u5426\u4E3A Web \u6D4F\u89C8\u5668","\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5426\u662F\u975E\u6D4F\u89C8\u5668\u5E73\u53F0\u4E0A\u7684 macOS","\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5426\u4E3A iOS","\u5E73\u53F0\u662F\u5426\u4E3A Web \u6D4F\u89C8\u5668","VS Code \u7684\u8D28\u91CF\u7C7B\u578B","\u952E\u76D8\u7126\u70B9\u662F\u5426\u5728\u8F93\u5165\u6846\u4E2D"],"vs/platform/contextkey/common/scanner":["\u4F60\u6307\u7684\u662F {0} \u5417?","\u4F60\u6307\u7684\u662F {0} \u8FD8\u662F {1}?","\u4F60\u6307\u7684\u662F {0}\u3001{1} \u8FD8\u662F {2}?","\u5FD8\u8BB0\u5DE6\u5F15\u53F7\u6216\u53F3\u5F15\u53F7\u4E86\u5417?",'\u5FD8\u8BB0\u8F6C\u4E49 "/"(\u659C\u6760)\u5B57\u7B26\u4E86\u5417? \u5728\u8BE5\u5B57\u7B26\u524D\u653E\u7F6E\u4E24\u4E2A\u53CD\u659C\u6760\u4EE5\u8FDB\u884C\u8F6C\u4E49\uFF0C\u4F8B\u5982 "\\\\/"\u3002'],"vs/platform/history/browser/contextScopedHistoryWidget":["\u5EFA\u8BAE\u662F\u5426\u53EF\u89C1"],"vs/platform/keybinding/common/abstractKeybindingService":["({0})\u5DF2\u6309\u4E0B\u3002\u6B63\u5728\u7B49\u5F85\u6309\u4E0B\u7B2C\u4E8C\u4E2A\u952E...","\u5DF2\u6309\u4E0B({0})\u3002\u6B63\u5728\u7B49\u5F85\u7B2C\u4E8C\u4E2A\u952E...","\u7EC4\u5408\u952E({0}\uFF0C{1})\u4E0D\u662F\u547D\u4EE4\u3002","\u7EC4\u5408\u952E({0}\uFF0C{1})\u4E0D\u662F\u547D\u4EE4\u3002"],"vs/platform/list/browser/listService":["\u5DE5\u4F5C\u53F0","\u6620\u5C04\u4E3A `Ctrl` (Windows \u548C Linux) \u6216 `Command` (macOS)\u3002","\u6620\u5C04\u4E3A `Alt` (Windows \u548C Linux) \u6216 `Option` (macOS)\u3002","\u5728\u901A\u8FC7\u9F20\u6807\u591A\u9009\u6811\u548C\u5217\u8868\u6761\u76EE\u65F6\u4F7F\u7528\u7684\u4FEE\u6539\u952E (\u4F8B\u5982\u201C\u8D44\u6E90\u7BA1\u7406\u5668\u201D\u3001\u201C\u6253\u5F00\u7684\u7F16\u8F91\u5668\u201D\u548C\u201C\u6E90\u4EE3\u7801\u7BA1\u7406\u201D\u89C6\u56FE)\u3002\u201C\u5728\u4FA7\u8FB9\u6253\u5F00\u201D\u529F\u80FD\u6240\u9700\u7684\u9F20\u6807\u52A8\u4F5C (\u82E5\u53EF\u7528) \u5C06\u4F1A\u76F8\u5E94\u8C03\u6574\uFF0C\u4E0D\u4E0E\u591A\u9009\u4FEE\u6539\u952E\u51B2\u7A81\u3002","\u63A7\u5236\u5982\u4F55\u4F7F\u7528\u9F20\u6807\u6253\u5F00\u6811\u548C\u5217\u8868\u4E2D\u7684\u9879(\u82E5\u652F\u6301)\u3002\u8BF7\u6CE8\u610F\uFF0C\u5982\u679C\u6B64\u8BBE\u7F6E\u4E0D\u9002\u7528\uFF0C\u67D0\u4E9B\u6811\u548C\u5217\u8868\u53EF\u80FD\u4F1A\u9009\u62E9\u5FFD\u7565\u5B83\u3002","\u63A7\u5236\u5DE5\u4F5C\u53F0\u4E0A\u7684\u5217\u8868\u548C\u6811\u662F\u5426\u652F\u6301\u6C34\u5E73\u6EDA\u52A8\u3002\u8B66\u544A: \u6253\u5F00\u6B64\u8BBE\u7F6E\u4F1A\u5F71\u54CD\u6027\u80FD\u3002","\u63A7\u5236\u5728\u6EDA\u52A8\u6761\u4E2D\u5355\u51FB\u65F6\u662F\u5426\u9010\u9875\u5355\u51FB\u3002","\u63A7\u5236\u6811\u7F29\u8FDB(\u4EE5\u50CF\u7D20\u4E3A\u5355\u4F4D)\u3002","\u63A7\u5236\u6811\u662F\u5426\u5E94\u5448\u73B0\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","\u63A7\u5236\u5217\u8868\u548C\u6811\u662F\u5426\u5177\u6709\u5E73\u6ED1\u6EDA\u52A8\u6548\u679C\u3002","\u5BF9\u9F20\u6807\u6EDA\u8F6E\u6EDA\u52A8\u4E8B\u4EF6\u7684 `deltaX` \u548C `deltaY` \u4E58\u4E0A\u7684\u7CFB\u6570\u3002",'\u6309\u4E0B"Alt"\u65F6\u6EDA\u52A8\u901F\u5EA6\u500D\u589E\u3002',"\u641C\u7D22\u65F6\u7A81\u51FA\u663E\u793A\u5143\u7D20\u3002\u8FDB\u4E00\u6B65\u5411\u4E0A\u548C\u5411\u4E0B\u5BFC\u822A\u5C06\u4EC5\u904D\u5386\u7A81\u51FA\u663E\u793A\u7684\u5143\u7D20\u3002","\u641C\u7D22\u65F6\u7B5B\u9009\u5143\u7D20\u3002","\u63A7\u5236\u5DE5\u4F5C\u53F0\u4E2D\u5217\u8868\u548C\u6811\u7684\u9ED8\u8BA4\u67E5\u627E\u6A21\u5F0F\u3002","\u7B80\u5355\u952E\u76D8\u5BFC\u822A\u805A\u7126\u4E0E\u952E\u76D8\u8F93\u5165\u76F8\u5339\u914D\u7684\u5143\u7D20\u3002\u4EC5\u5BF9\u524D\u7F00\u8FDB\u884C\u5339\u914D\u3002","\u9AD8\u4EAE\u952E\u76D8\u5BFC\u822A\u4F1A\u7A81\u51FA\u663E\u793A\u4E0E\u952E\u76D8\u8F93\u5165\u76F8\u5339\u914D\u7684\u5143\u7D20\u3002\u8FDB\u4E00\u6B65\u5411\u4E0A\u548C\u5411\u4E0B\u5BFC\u822A\u5C06\u4EC5\u904D\u5386\u7A81\u51FA\u663E\u793A\u7684\u5143\u7D20\u3002","\u7B5B\u9009\u5668\u952E\u76D8\u5BFC\u822A\u5C06\u7B5B\u9009\u51FA\u5E76\u9690\u85CF\u4E0E\u952E\u76D8\u8F93\u5165\u4E0D\u5339\u914D\u7684\u6240\u6709\u5143\u7D20\u3002","\u63A7\u5236\u5DE5\u4F5C\u53F0\u4E2D\u7684\u5217\u8868\u548C\u6811\u7684\u952E\u76D8\u5BFC\u822A\u6837\u5F0F\u3002\u5B83\u53EF\u4E3A\u201C\u7B80\u5355\u201D\u3001\u201C\u7A81\u51FA\u663E\u793A\u201D\u6216\u201C\u7B5B\u9009\u201D\u3002",'\u8BF7\u6539\u7528 "workbench.list.defaultFindMode" \u548C "workbench.list.typeNavigationMode"\u3002',"\u5728\u641C\u7D22\u65F6\u4F7F\u7528\u6A21\u7CCA\u5339\u914D\u3002","\u5728\u641C\u7D22\u65F6\u4F7F\u7528\u8FDE\u7EED\u5339\u914D\u3002","\u63A7\u5236\u5728\u5DE5\u4F5C\u53F0\u4E2D\u641C\u7D22\u5217\u8868\u548C\u6811\u65F6\u4F7F\u7528\u7684\u5339\u914D\u7C7B\u578B\u3002","\u63A7\u5236\u5728\u5355\u51FB\u6587\u4EF6\u5939\u540D\u79F0\u65F6\u5982\u4F55\u6269\u5C55\u6811\u6587\u4EF6\u5939\u3002\u8BF7\u6CE8\u610F\uFF0C\u5982\u679C\u4E0D\u9002\u7528\uFF0C\u67D0\u4E9B\u6811\u548C\u5217\u8868\u53EF\u80FD\u4F1A\u9009\u62E9\u5FFD\u7565\u6B64\u8BBE\u7F6E\u3002","\u63A7\u5236\u7C7B\u578B\u5BFC\u822A\u5728\u5DE5\u4F5C\u53F0\u7684\u5217\u8868\u548C\u6811\u4E2D\u7684\u5DE5\u4F5C\u65B9\u5F0F\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A`trigger`\uFF0C\u5219\u5728\u8FD0\u884C `list.triggerTypeNavigation` \u547D\u4EE4\u540E\uFF0C\u7C7B\u578B\u5BFC\u822A\u5C06\u5F00\u59CB\u3002"],"vs/platform/markers/common/markers":["\u9519\u8BEF","\u8B66\u544A","\u4FE1\u606F"],"vs/platform/quickinput/browser/commandsQuickAccess":["\u6700\u8FD1\u4F7F\u7528","\u7C7B\u4F3C\u547D\u4EE4","\u5E38\u7528","\u5176\u4ED6\u547D\u4EE4","\u7C7B\u4F3C\u547D\u4EE4","{0}, {1}",'\u547D\u4EE4 "{0}" \u5BFC\u81F4\u9519\u8BEF'],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["\u4E0A\u4E00\u6B65",'\u6309 "Enter" \u4EE5\u786E\u8BA4\u6216\u6309 "Esc" \u4EE5\u53D6\u6D88',"{0}/{1}","\u5728\u6B64\u8F93\u5165\u53EF\u7F29\u5C0F\u7ED3\u679C\u8303\u56F4\u3002"],"vs/platform/quickinput/browser/quickInputController":["\u5207\u6362\u6240\u6709\u590D\u9009\u6846","{0} \u4E2A\u7ED3\u679C","\u5DF2\u9009 {0} \u9879","\u786E\u5B9A","\u81EA\u5B9A\u4E49","\u540E\u9000 ({0})","\u4E0A\u4E00\u6B65"],"vs/platform/quickinput/browser/quickInputList":["\u5FEB\u901F\u8F93\u5165"],"vs/platform/quickinput/browser/quickInputUtils":['\u5355\u51FB\u4EE5\u6267\u884C\u547D\u4EE4 "{0}"'],"vs/platform/theme/common/colorRegistry":["\u6574\u4F53\u524D\u666F\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","\u5DF2\u7981\u7528\u5143\u7D20\u7684\u6574\u4F53\u524D\u666F\u8272\u3002\u4EC5\u5728\u672A\u7531\u7EC4\u4EF6\u66FF\u4EE3\u65F6\u624D\u80FD\u4F7F\u7528\u6B64\u989C\u8272\u3002","\u9519\u8BEF\u4FE1\u606F\u7684\u6574\u4F53\u524D\u666F\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","\u63D0\u4F9B\u5176\u4ED6\u4FE1\u606F\u7684\u8BF4\u660E\u6587\u672C\u7684\u524D\u666F\u8272\uFF0C\u4F8B\u5982\u6807\u7B7E\u6587\u672C\u3002","\u5DE5\u4F5C\u53F0\u4E2D\u56FE\u6807\u7684\u9ED8\u8BA4\u989C\u8272\u3002","\u7126\u70B9\u5143\u7D20\u7684\u6574\u4F53\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u5176\u4ED6\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","\u5728\u5143\u7D20\u5468\u56F4\u989D\u5916\u7684\u4E00\u5C42\u8FB9\u6846\uFF0C\u7528\u6765\u63D0\u9AD8\u5BF9\u6BD4\u5EA6\u4ECE\u800C\u533A\u522B\u5176\u4ED6\u5143\u7D20\u3002","\u5728\u6D3B\u52A8\u5143\u7D20\u5468\u56F4\u989D\u5916\u7684\u4E00\u5C42\u8FB9\u6846\uFF0C\u7528\u6765\u63D0\u9AD8\u5BF9\u6BD4\u5EA6\u4ECE\u800C\u533A\u522B\u5176\u4ED6\u5143\u7D20\u3002","\u5DE5\u4F5C\u53F0\u6240\u9009\u6587\u672C\u7684\u80CC\u666F\u989C\u8272(\u4F8B\u5982\u8F93\u5165\u5B57\u6BB5\u6216\u6587\u672C\u533A\u57DF)\u3002\u6CE8\u610F\uFF0C\u672C\u8BBE\u7F6E\u4E0D\u9002\u7528\u4E8E\u7F16\u8F91\u5668\u3002","\u6587\u5B57\u5206\u9694\u7B26\u7684\u989C\u8272\u3002","\u6587\u672C\u4E2D\u94FE\u63A5\u7684\u524D\u666F\u8272\u3002","\u6587\u672C\u4E2D\u94FE\u63A5\u5728\u70B9\u51FB\u6216\u9F20\u6807\u60AC\u505C\u65F6\u7684\u524D\u666F\u8272 \u3002","\u9884\u683C\u5F0F\u5316\u6587\u672C\u6BB5\u7684\u524D\u666F\u8272\u3002","\u6587\u672C\u4E2D\u5757\u5F15\u7528\u7684\u80CC\u666F\u989C\u8272\u3002","\u6587\u672C\u4E2D\u5757\u5F15\u7528\u7684\u8FB9\u6846\u989C\u8272\u3002","\u6587\u672C\u4E2D\u4EE3\u7801\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","\u7F16\u8F91\u5668\u5185\u5C0F\u7EC4\u4EF6(\u5982\u67E5\u627E/\u66FF\u6362)\u7684\u9634\u5F71\u989C\u8272\u3002","\u7F16\u8F91\u5668\u5185\u5C0F\u7EC4\u4EF6(\u5982\u67E5\u627E/\u66FF\u6362)\u7684\u8FB9\u6846\u989C\u8272\u3002","\u8F93\u5165\u6846\u80CC\u666F\u8272\u3002","\u8F93\u5165\u6846\u524D\u666F\u8272\u3002","\u8F93\u5165\u6846\u8FB9\u6846\u3002","\u8F93\u5165\u5B57\u6BB5\u4E2D\u5DF2\u6FC0\u6D3B\u9009\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","\u8F93\u5165\u5B57\u6BB5\u4E2D\u6FC0\u6D3B\u9009\u9879\u7684\u80CC\u666F\u989C\u8272\u3002","\u8F93\u5165\u5B57\u6BB5\u4E2D\u9009\u9879\u7684\u80CC\u666F\u60AC\u505C\u989C\u8272\u3002","\u8F93\u5165\u5B57\u6BB5\u4E2D\u5DF2\u6FC0\u6D3B\u7684\u9009\u9879\u7684\u524D\u666F\u8272\u3002","\u8F93\u5165\u6846\u4E2D\u5360\u4F4D\u7B26\u7684\u524D\u666F\u8272\u3002","\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u4FE1\u606F\u7EA7\u522B\u65F6\u7684\u80CC\u666F\u8272\u3002","\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u4FE1\u606F\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","\u4E25\u91CD\u6027\u4E3A\u4FE1\u606F\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","\u4E25\u91CD\u6027\u4E3A\u8B66\u544A\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u80CC\u666F\u8272\u3002","\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u8B66\u544A\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","\u4E25\u91CD\u6027\u4E3A\u8B66\u544A\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u9519\u8BEF\u7EA7\u522B\u65F6\u7684\u80CC\u666F\u8272\u3002","\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u9519\u8BEF\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","\u4E25\u91CD\u6027\u4E3A\u9519\u8BEF\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","\u4E0B\u62C9\u5217\u8868\u80CC\u666F\u8272\u3002","\u4E0B\u62C9\u5217\u8868\u80CC\u666F\u8272\u3002","\u4E0B\u62C9\u5217\u8868\u524D\u666F\u8272\u3002","\u4E0B\u62C9\u5217\u8868\u8FB9\u6846\u3002","\u6309\u94AE\u524D\u666F\u8272\u3002","\u6309\u94AE\u5206\u9694\u7B26\u989C\u8272\u3002","\u6309\u94AE\u80CC\u666F\u8272\u3002","\u6309\u94AE\u5728\u60AC\u505C\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002","\u6309\u94AE\u8FB9\u6846\u989C\u8272\u3002","\u8F85\u52A9\u6309\u94AE\u524D\u666F\u8272\u3002","\u8F85\u52A9\u6309\u94AE\u80CC\u666F\u8272\u3002","\u60AC\u505C\u65F6\u7684\u8F85\u52A9\u6309\u94AE\u80CC\u666F\u8272\u3002","Badge \u80CC\u666F\u8272\u3002Badge \u662F\u5C0F\u578B\u7684\u4FE1\u606F\u6807\u7B7E\uFF0C\u5982\u8868\u793A\u641C\u7D22\u7ED3\u679C\u6570\u91CF\u7684\u6807\u7B7E\u3002","Badge \u524D\u666F\u8272\u3002Badge \u662F\u5C0F\u578B\u7684\u4FE1\u606F\u6807\u7B7E\uFF0C\u5982\u8868\u793A\u641C\u7D22\u7ED3\u679C\u6570\u91CF\u7684\u6807\u7B7E\u3002","\u8868\u793A\u89C6\u56FE\u88AB\u6EDA\u52A8\u7684\u6EDA\u52A8\u6761\u9634\u5F71\u3002","\u6EDA\u52A8\u6761\u6ED1\u5757\u80CC\u666F\u8272","\u6EDA\u52A8\u6761\u6ED1\u5757\u5728\u60AC\u505C\u65F6\u7684\u80CC\u666F\u8272","\u6EDA\u52A8\u6761\u6ED1\u5757\u5728\u88AB\u70B9\u51FB\u65F6\u7684\u80CC\u666F\u8272\u3002","\u8868\u793A\u957F\u65F6\u95F4\u64CD\u4F5C\u7684\u8FDB\u5EA6\u6761\u7684\u80CC\u666F\u8272\u3002","\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","\u5982\u679C\u8BBE\u7F6E\uFF0C\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u7684\u53CC\u4E0B\u5212\u7EBF\u989C\u8272\u3002","\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","\u5982\u679C\u8BBE\u7F6E\uFF0C\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u7684\u53CC\u4E0B\u5212\u7EBF\u989C\u8272\u3002","\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","\u5982\u679C\u8BBE\u7F6E\uFF0C\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u7684\u53CC\u4E0B\u5212\u7EBF\u989C\u8272\u3002","\u7F16\u8F91\u5668\u4E2D\u63D0\u793A\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","\u5982\u679C\u8BBE\u7F6E\uFF0C\u7F16\u8F91\u5668\u4E2D\u63D0\u793A\u7684\u53CC\u4E0B\u5212\u7EBF\u989C\u8272\u3002","\u6D3B\u52A8\u6846\u683C\u7684\u8FB9\u6846\u989C\u8272\u3002","\u7F16\u8F91\u5668\u80CC\u666F\u8272\u3002","\u7F16\u8F91\u5668\u9ED8\u8BA4\u524D\u666F\u8272\u3002","\u7F16\u8F91\u5668\u7684\u7C98\u6EDE\u6EDA\u52A8\u80CC\u666F\u8272","\u7F16\u8F91\u5668\u60AC\u505C\u80CC\u666F\u8272\u4E0A\u7684\u7C98\u6EDE\u6EDA\u52A8","\u7F16\u8F91\u5668\u7EC4\u4EF6(\u5982\u67E5\u627E/\u66FF\u6362)\u80CC\u666F\u989C\u8272\u3002","\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u7684\u524D\u666F\u8272\uFF0C\u5982\u67E5\u627E/\u66FF\u6362\u3002","\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u5C0F\u90E8\u4EF6\u6709\u8FB9\u6846\u4E14\u4E0D\u88AB\u5C0F\u90E8\u4EF6\u91CD\u5199\u65F6\u9002\u7528\u3002","\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u5927\u5C0F\u8C03\u6574\u6761\u7684\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u5C0F\u90E8\u4EF6\u6709\u8C03\u6574\u8FB9\u6846\u4E14\u4E0D\u88AB\u5C0F\u90E8\u4EF6\u989C\u8272\u8986\u76D6\u65F6\u4F7F\u7528\u3002","\u80CC\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u9009\u53D6\u5668(\u5982\u547D\u4EE4\u8C03\u8272\u677F)\u7684\u5BB9\u5668\u3002","\u524D\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u547D\u4EE4\u8C03\u8272\u677F\u7B49\u9009\u53D6\u5668\u7684\u5BB9\u5668\u3002","\u6807\u9898\u80CC\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u547D\u4EE4\u8C03\u8272\u677F\u7B49\u9009\u53D6\u5668\u7684\u5BB9\u5668\u3002","\u5FEB\u901F\u9009\u53D6\u5668\u5206\u7EC4\u6807\u7B7E\u7684\u989C\u8272\u3002","\u5FEB\u901F\u9009\u53D6\u5668\u5206\u7EC4\u8FB9\u6846\u7684\u989C\u8272\u3002","\u952E\u7ED1\u5B9A\u6807\u7B7E\u80CC\u666F\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","\u952E\u7ED1\u5B9A\u6807\u7B7E\u524D\u666F\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","\u952E\u7ED1\u5B9A\u6807\u7B7E\u8FB9\u6846\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","\u952E\u7ED1\u5B9A\u6807\u7B7E\u8FB9\u6846\u5E95\u90E8\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","\u7F16\u8F91\u5668\u6240\u9009\u5185\u5BB9\u7684\u989C\u8272\u3002","\u7528\u4EE5\u5F70\u663E\u9AD8\u5BF9\u6BD4\u5EA6\u7684\u6240\u9009\u6587\u672C\u7684\u989C\u8272\u3002","\u975E\u6D3B\u52A8\u7F16\u8F91\u5668\u4E2D\u6240\u9009\u5185\u5BB9\u7684\u989C\u8272\uFF0C\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u88C5\u9970\u6548\u679C\u3002","\u5177\u6709\u4E0E\u6240\u9009\u9879\u76F8\u5173\u5185\u5BB9\u7684\u533A\u57DF\u7684\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u4E0E\u6240\u9009\u9879\u5185\u5BB9\u76F8\u540C\u7684\u533A\u57DF\u7684\u8FB9\u6846\u989C\u8272\u3002","\u5F53\u524D\u641C\u7D22\u5339\u914D\u9879\u7684\u989C\u8272\u3002","\u5176\u4ED6\u641C\u7D22\u5339\u914D\u9879\u7684\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u9650\u5236\u641C\u7D22\u8303\u56F4\u7684\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5F53\u524D\u641C\u7D22\u5339\u914D\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","\u5176\u4ED6\u641C\u7D22\u5339\u914D\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","\u9650\u5236\u641C\u7D22\u7684\u8303\u56F4\u7684\u8FB9\u6846\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u641C\u7D22\u7F16\u8F91\u5668\u67E5\u8BE2\u5339\u914D\u7684\u989C\u8272\u3002","\u641C\u7D22\u7F16\u8F91\u5668\u67E5\u8BE2\u5339\u914D\u7684\u8FB9\u6846\u989C\u8272\u3002","\u641C\u7D22 Viewlet \u5B8C\u6210\u6D88\u606F\u4E2D\u6587\u672C\u7684\u989C\u8272\u3002","\u5728\u4E0B\u9762\u7A81\u51FA\u663E\u793A\u60AC\u505C\u7684\u5B57\u8BCD\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7F16\u8F91\u5668\u60AC\u505C\u63D0\u793A\u7684\u80CC\u666F\u989C\u8272\u3002","\u7F16\u8F91\u5668\u60AC\u505C\u7684\u524D\u666F\u989C\u8272\u3002","\u5149\u6807\u60AC\u505C\u65F6\u7F16\u8F91\u5668\u7684\u8FB9\u6846\u989C\u8272\u3002","\u7F16\u8F91\u5668\u60AC\u505C\u72B6\u6001\u680F\u7684\u80CC\u666F\u8272\u3002","\u6D3B\u52A8\u94FE\u63A5\u989C\u8272\u3002","\u5185\u8054\u63D0\u793A\u7684\u524D\u666F\u8272","\u5185\u8054\u63D0\u793A\u7684\u80CC\u666F\u8272","\u7C7B\u578B\u5185\u8054\u63D0\u793A\u7684\u524D\u666F\u8272","\u7C7B\u578B\u5185\u8054\u63D0\u793A\u7684\u80CC\u666F\u8272","\u53C2\u6570\u5185\u8054\u63D0\u793A\u7684\u524D\u666F\u8272","\u53C2\u6570\u5185\u8054\u63D0\u793A\u7684\u80CC\u666F\u8272","\u7528\u4E8E\u706F\u6CE1\u64CD\u4F5C\u56FE\u6807\u7684\u989C\u8272\u3002","\u7528\u4E8E\u706F\u6CE1\u81EA\u52A8\u4FEE\u590D\u64CD\u4F5C\u56FE\u6807\u7684\u989C\u8272\u3002","\u5DF2\u63D2\u5165\u7684\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5DF2\u5220\u9664\u7684\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5DF2\u63D2\u5165\u7684\u884C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5DF2\u5220\u9664\u7684\u884C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u63D2\u5165\u884C\u7684\u8FB9\u8DDD\u7684\u80CC\u666F\u8272\u3002","\u5220\u9664\u884C\u7684\u8FB9\u8DDD\u7684\u80CC\u666F\u8272\u3002","\u63D2\u5165\u5185\u5BB9\u7684\u5DEE\u5F02\u6982\u8FF0\u6807\u5C3A\u524D\u666F\u3002","\u5220\u9664\u5185\u5BB9\u7684\u5DEE\u5F02\u6982\u8FF0\u6807\u5C3A\u524D\u666F\u3002","\u63D2\u5165\u7684\u6587\u672C\u7684\u8F6E\u5ED3\u989C\u8272\u3002","\u88AB\u5220\u9664\u6587\u672C\u7684\u8F6E\u5ED3\u989C\u8272\u3002","\u4E24\u4E2A\u6587\u672C\u7F16\u8F91\u5668\u4E4B\u95F4\u7684\u8FB9\u6846\u989C\u8272\u3002","\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u5BF9\u89D2\u7EBF\u586B\u5145\u989C\u8272\u3002\u5BF9\u89D2\u7EBF\u586B\u5145\u7528\u4E8E\u5E76\u6392\u5DEE\u5F02\u89C6\u56FE\u3002","\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u672A\u66F4\u6539\u5757\u7684\u80CC\u666F\u8272\u3002","\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u672A\u66F4\u6539\u5757\u7684\u524D\u666F\u8272\u3002","\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u672A\u66F4\u6539\u4EE3\u7801\u7684\u80CC\u666F\u8272\u3002","\u7126\u70B9\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u7126\u70B9\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u5217\u8868/\u6811\u6D3B\u52A8\u65F6\uFF0C\u7126\u70B9\u9879\u76EE\u7684\u5217\u8868/\u6811\u8FB9\u6846\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u5F53\u5217\u8868/\u6811\u5904\u4E8E\u6D3B\u52A8\u72B6\u6001\u4E14\u5DF2\u9009\u62E9\u65F6\uFF0C\u91CD\u70B9\u9879\u7684\u5217\u8868/\u6811\u8FB9\u6846\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u4F46\u975E\u6D3B\u52A8\u7684\u5219\u6CA1\u6709\u3002","\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u5DF2\u9009\u9879\u5728\u5217\u8868/\u6811\u6D3B\u52A8\u65F6\u7684\u5217\u8868/\u6811\u56FE\u6807\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u5219\u6CA1\u6709\u3002","\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u5DF2\u9009\u9879\u5728\u5217\u8868/\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u56FE\u6807\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u5219\u6CA1\u6709\u3002","\u975E\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u63A7\u4EF6\u4E2D\u7126\u70B9\u9879\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u5217\u8868/\u6570\u975E\u6D3B\u52A8\u65F6\uFF0C\u7126\u70B9\u9879\u76EE\u7684\u5217\u8868/\u6811\u8FB9\u6846\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","\u4F7F\u7528\u9F20\u6807\u79FB\u52A8\u9879\u76EE\u65F6\uFF0C\u5217\u8868\u6216\u6811\u7684\u80CC\u666F\u989C\u8272\u3002","\u9F20\u6807\u5728\u9879\u76EE\u4E0A\u60AC\u505C\u65F6\uFF0C\u5217\u8868\u6216\u6811\u7684\u524D\u666F\u989C\u8272\u3002","\u4F7F\u7528\u9F20\u6807\u79FB\u52A8\u9879\u76EE\u65F6\uFF0C\u5217\u8868\u6216\u6811\u8FDB\u884C\u62D6\u653E\u7684\u80CC\u666F\u989C\u8272\u3002","\u5728\u5217\u8868\u6216\u6811\u4E2D\u641C\u7D22\u65F6\uFF0C\u5176\u4E2D\u5339\u914D\u5185\u5BB9\u7684\u9AD8\u4EAE\u989C\u8272\u3002","\u5728\u5217\u8868\u6216\u6811\u4E2D\u641C\u7D22\u65F6\uFF0C\u5339\u914D\u6D3B\u52A8\u805A\u7126\u9879\u7684\u7A81\u51FA\u663E\u793A\u5185\u5BB9\u7684\u5217\u8868/\u6811\u524D\u666F\u8272\u3002","\u5217\u8868\u6216\u6811\u4E2D\u65E0\u6548\u9879\u7684\u524D\u666F\u8272\uFF0C\u4F8B\u5982\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u6CA1\u6709\u89E3\u6790\u7684\u6839\u76EE\u5F55\u3002","\u5305\u542B\u9519\u8BEF\u7684\u5217\u8868\u9879\u7684\u524D\u666F\u989C\u8272\u3002","\u5305\u542B\u8B66\u544A\u7684\u5217\u8868\u9879\u7684\u524D\u666F\u989C\u8272\u3002","\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u80CC\u666F\u8272\u3002","\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u8F6E\u5ED3\u989C\u8272\u3002","\u5F53\u6CA1\u6709\u5339\u914D\u9879\u65F6\uFF0C\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u8F6E\u5ED3\u989C\u8272\u3002","\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u9634\u5F71\u989C\u8272\u3002","\u7B5B\u9009\u540E\u7684\u5339\u914D\u9879\u7684\u80CC\u666F\u989C\u8272\u3002","\u7B5B\u9009\u540E\u7684\u5339\u914D\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u6811\u63CF\u8FB9\u989C\u8272\u3002","\u975E\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u6811\u63CF\u8FB9\u989C\u8272\u3002","\u5217\u4E4B\u95F4\u7684\u8868\u8FB9\u6846\u989C\u8272\u3002","\u5947\u6570\u8868\u884C\u7684\u80CC\u666F\u8272\u3002","\u53D6\u6D88\u5F3A\u8C03\u7684\u9879\u76EE\u7684\u5217\u8868/\u6811\u524D\u666F\u989C\u8272\u3002","\u590D\u9009\u6846\u5C0F\u90E8\u4EF6\u7684\u80CC\u666F\u989C\u8272\u3002","\u9009\u62E9\u590D\u9009\u6846\u5C0F\u7EC4\u4EF6\u6240\u5728\u7684\u5143\u7D20\u65F6\u8BE5\u5C0F\u7EC4\u4EF6\u7684\u80CC\u666F\u8272\u3002","\u590D\u9009\u6846\u5C0F\u90E8\u4EF6\u7684\u524D\u666F\u8272\u3002","\u590D\u9009\u6846\u5C0F\u90E8\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002","\u9009\u62E9\u590D\u9009\u6846\u5C0F\u7EC4\u4EF6\u6240\u5728\u7684\u5143\u7D20\u65F6\u8BE5\u5C0F\u7EC4\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002","\u8BF7\u6539\u7528 quickInputList.focusBackground","\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u62E9\u5668\u524D\u666F\u8272\u3002","\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u53D6\u5668\u56FE\u6807\u524D\u666F\u8272\u3002","\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u62E9\u5668\u80CC\u666F\u8272\u3002","\u83DC\u5355\u7684\u8FB9\u6846\u989C\u8272\u3002","\u83DC\u5355\u9879\u7684\u524D\u666F\u989C\u8272\u3002","\u83DC\u5355\u9879\u7684\u80CC\u666F\u989C\u8272\u3002","\u83DC\u5355\u4E2D\u9009\u5B9A\u83DC\u5355\u9879\u7684\u524D\u666F\u8272\u3002","\u83DC\u5355\u4E2D\u6240\u9009\u83DC\u5355\u9879\u7684\u80CC\u666F\u8272\u3002","\u83DC\u5355\u4E2D\u6240\u9009\u83DC\u5355\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","\u83DC\u5355\u4E2D\u5206\u9694\u7EBF\u7684\u989C\u8272\u3002","\u4F7F\u7528\u9F20\u6807\u60AC\u505C\u5728\u64CD\u4F5C\u4E0A\u65F6\u663E\u793A\u5DE5\u5177\u680F\u80CC\u666F","\u4F7F\u7528\u9F20\u6807\u60AC\u505C\u5728\u64CD\u4F5C\u4E0A\u65F6\u663E\u793A\u5DE5\u5177\u680F\u8F6E\u5ED3","\u5C06\u9F20\u6807\u60AC\u505C\u5728\u64CD\u4F5C\u4E0A\u65F6\u7684\u5DE5\u5177\u680F\u80CC\u666F","\u4EE3\u7801\u7247\u6BB5 Tab \u4F4D\u7684\u9AD8\u4EAE\u80CC\u666F\u8272\u3002","\u4EE3\u7801\u7247\u6BB5 Tab \u4F4D\u7684\u9AD8\u4EAE\u8FB9\u6846\u989C\u8272\u3002","\u4EE3\u7801\u7247\u6BB5\u4E2D\u6700\u540E\u7684 Tab \u4F4D\u7684\u9AD8\u4EAE\u80CC\u666F\u8272\u3002","\u4EE3\u7801\u7247\u6BB5\u4E2D\u6700\u540E\u7684\u5236\u8868\u4F4D\u7684\u9AD8\u4EAE\u8FB9\u6846\u989C\u8272\u3002","\u7126\u70B9\u5BFC\u822A\u8DEF\u5F84\u7684\u989C\u8272","\u5BFC\u822A\u8DEF\u5F84\u9879\u7684\u80CC\u666F\u8272\u3002","\u7126\u70B9\u5BFC\u822A\u8DEF\u5F84\u7684\u989C\u8272","\u5DF2\u9009\u5BFC\u822A\u8DEF\u5F84\u9879\u7684\u989C\u8272\u3002","\u5BFC\u822A\u8DEF\u5F84\u9879\u9009\u62E9\u5668\u7684\u80CC\u666F\u8272\u3002","\u5F53\u524D\u6807\u9898\u80CC\u666F\u7684\u5185\u8054\u5408\u5E76\u51B2\u7A81\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u7684\u5F53\u524D\u5185\u5BB9\u80CC\u666F\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u7684\u4F20\u5165\u6807\u9898\u80CC\u666F\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u7684\u4F20\u5165\u5185\u5BB9\u80CC\u666F\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u7684\u5E38\u89C1\u7956\u5148\u6807\u5934\u80CC\u666F\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u7684\u5E38\u89C1\u7956\u5148\u5185\u5BB9\u80CC\u666F\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u6807\u5934\u548C\u5206\u5272\u7EBF\u7684\u8FB9\u6846\u989C\u8272\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u5F53\u524D\u7248\u672C\u533A\u57DF\u7684\u6982\u89C8\u6807\u5C3A\u524D\u666F\u8272\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u4F20\u5165\u7684\u7248\u672C\u533A\u57DF\u7684\u6982\u89C8\u6807\u5C3A\u524D\u666F\u8272\u3002","\u5185\u8054\u5408\u5E76\u51B2\u7A81\u4E2D\u5171\u540C\u7956\u5148\u533A\u57DF\u7684\u6982\u89C8\u6807\u5C3A\u524D\u666F\u8272\u3002","\u7528\u4E8E\u67E5\u627E\u5339\u914D\u9879\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u6240\u9009\u5185\u5BB9\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","\u7528\u4E8E\u67E5\u627E\u5339\u914D\u9879\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","\u7528\u4E8E\u91CD\u590D\u7F16\u8F91\u5668\u9009\u62E9\u7684\u7F29\u7565\u56FE\u6807\u8BB0\u989C\u8272\u3002","\u7F16\u8F91\u5668\u9009\u533A\u5728\u8FF7\u4F60\u5730\u56FE\u4E2D\u5BF9\u5E94\u7684\u6807\u8BB0\u989C\u8272\u3002","\u4FE1\u606F\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","\u7528\u4E8E\u8B66\u544A\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","\u7528\u4E8E\u9519\u8BEF\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","\u8FF7\u4F60\u5730\u56FE\u80CC\u666F\u989C\u8272\u3002",'\u5728\u7F29\u7565\u56FE\u4E2D\u5448\u73B0\u7684\u524D\u666F\u5143\u7D20\u7684\u4E0D\u900F\u660E\u5EA6\u3002\u4F8B\u5982\uFF0C"#000000c0" \u5C06\u5448\u73B0\u4E0D\u900F\u660E\u5EA6\u4E3A 75% \u7684\u5143\u7D20\u3002',"\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u80CC\u666F\u989C\u8272\u3002","\u60AC\u505C\u65F6\uFF0C\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","\u5355\u51FB\u65F6\uFF0C\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","\u7528\u4E8E\u95EE\u9898\u9519\u8BEF\u56FE\u6807\u7684\u989C\u8272\u3002","\u7528\u4E8E\u95EE\u9898\u8B66\u544A\u56FE\u6807\u7684\u989C\u8272\u3002","\u7528\u4E8E\u95EE\u9898\u4FE1\u606F\u56FE\u6807\u7684\u989C\u8272\u3002","\u56FE\u8868\u4E2D\u4F7F\u7528\u7684\u524D\u666F\u989C\u8272\u3002","\u7528\u4E8E\u56FE\u8868\u4E2D\u7684\u6C34\u5E73\u7EBF\u6761\u7684\u989C\u8272\u3002","\u56FE\u8868\u53EF\u89C6\u5316\u6548\u679C\u4E2D\u4F7F\u7528\u7684\u7EA2\u8272\u3002","\u56FE\u8868\u53EF\u89C6\u5316\u6548\u679C\u4E2D\u4F7F\u7528\u7684\u84DD\u8272\u3002","\u56FE\u8868\u53EF\u89C6\u5316\u6548\u679C\u4E2D\u4F7F\u7528\u7684\u9EC4\u8272\u3002","\u56FE\u8868\u53EF\u89C6\u5316\u6548\u679C\u4E2D\u4F7F\u7528\u7684\u6A59\u8272\u3002","\u56FE\u8868\u53EF\u89C6\u5316\u6548\u679C\u4E2D\u4F7F\u7528\u7684\u7EFF\u8272\u3002","\u56FE\u8868\u53EF\u89C6\u5316\u6548\u679C\u4E2D\u4F7F\u7528\u7684\u7D2B\u8272\u3002"],"vs/platform/theme/common/iconRegistry":["\u8981\u4F7F\u7528\u7684\u5B57\u4F53\u7684 ID\u3002\u5982\u679C\u672A\u8BBE\u7F6E\uFF0C\u5219\u4F7F\u7528\u6700\u5148\u5B9A\u4E49\u7684\u5B57\u4F53\u3002","\u4E0E\u56FE\u6807\u5B9A\u4E49\u5173\u8054\u7684\u5B57\u4F53\u5B57\u7B26\u3002","\u5C0F\u7EC4\u4EF6\u4E2D\u201C\u5173\u95ED\u201D\u64CD\u4F5C\u7684\u56FE\u6807\u3002","\u201C\u8F6C\u5230\u4E0A\u4E00\u4E2A\u7F16\u8F91\u5668\u4F4D\u7F6E\u201D\u56FE\u6807\u3002","\u201C\u8F6C\u5230\u4E0B\u4E00\u4E2A\u7F16\u8F91\u5668\u4F4D\u7F6E\u201D\u56FE\u6807\u3002"],"vs/platform/undoRedo/common/undoRedoService":["\u4EE5\u4E0B\u6587\u4EF6\u5DF2\u5173\u95ED\u5E76\u4E14\u5DF2\u5728\u78C1\u76D8\u4E0A\u4FEE\u6539: {0}\u3002","\u4EE5\u4E0B\u6587\u4EF6\u5DF2\u4EE5\u4E0D\u517C\u5BB9\u7684\u65B9\u5F0F\u4FEE\u6539: {0}\u3002","\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u64A4\u6D88\u201C{0}\u201D\u3002{1}","\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u64A4\u6D88\u201C{0}\u201D\u3002{1}","\u65E0\u6CD5\u64A4\u6D88\u6240\u6709\u6587\u4EF6\u7684\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u66F4\u6539 {1}","\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A {1} \u4E0A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C","\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u540C\u65F6\u53D1\u751F\u4E86\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C","\u662F\u5426\u8981\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u64A4\u6D88\u201C{0}\u201D?","\u5728 {0} \u4E2A\u6587\u4EF6\u4E2D\u64A4\u6D88(&&U)","\u64A4\u6D88\u6B64\u6587\u4EF6(&&F)","\u65E0\u6CD5\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C\u3002","\u662F\u5426\u8981\u64A4\u6D88\u201C{0}\u201D?","\u662F(&&Y)","\u5426","\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u91CD\u505A\u201C{0}\u201D\u3002{1}","\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u91CD\u505A\u201C{0}\u201D\u3002{1}","\u65E0\u6CD5\u5BF9\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u66F4\u6539 {1}","\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A {1} \u4E0A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C","\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u540C\u65F6\u53D1\u751F\u4E86\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C","\u65E0\u6CD5\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C\u3002"],"vs/platform/workspace/common/workspace":["Code \u5DE5\u4F5C\u533A"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.zh-cn.js.map \ No newline at end of file diff --git a/lib/vs/editor/editor.main.nls.zh-tw.js b/lib/vs/editor/editor.main.nls.zh-tw.js deleted file mode 100644 index 1de4ef4..0000000 --- a/lib/vs/editor/editor.main.nls.zh-tw.js +++ /dev/null @@ -1,29 +0,0 @@ -/*!----------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/vscode/blob/main/LICENSE.txt - *-----------------------------------------------------------*/define("vs/editor/editor.main.nls.zh-tw",{"vs/base/browser/ui/actionbar/actionViewItems":["{0} ({1})"],"vs/base/browser/ui/findinput/findInput":["\u8F38\u5165"],"vs/base/browser/ui/findinput/findInputToggles":["\u5927\u5C0F\u5BEB\u9808\u76F8\u7B26","\u5168\u5B57\u62FC\u5BEB\u9808\u76F8\u7B26","\u4F7F\u7528\u898F\u5247\u904B\u7B97\u5F0F"],"vs/base/browser/ui/findinput/replaceInput":["\u8F38\u5165","\u4FDD\u7559\u6848\u4F8B"],"vs/base/browser/ui/hover/hoverWidget":["\u4F7F\u7528 {0} \u5728\u53EF\u5B58\u53D6\u6AA2\u8996\u4E2D\u6AA2\u67E5\u6B64\u9805\u76EE\u3002","\u900F\u904E\u76EE\u524D\u7121\u6CD5\u900F\u904E\u6309\u9375\u7E6B\u7D50\u95DC\u4FC2\u89F8\u767C\u7684\u958B\u555F\u53EF\u5B58\u53D6\u6AA2\u8996\u547D\u4EE4\uFF0C\u5728\u53EF\u5B58\u53D6\u6AA2\u8996\u4E2D\u6AA2\u67E5\u6B64\u9805\u76EE\u3002"],"vs/base/browser/ui/iconLabel/iconLabelHover":["\u6B63\u5728\u8F09\u5165..."],"vs/base/browser/ui/inputbox/inputBox":["\u932F\u8AA4: {0}","\u8B66\u544A: {0}","\u8CC7\u8A0A: {0}","\u6B77\u7A0B\u8A18\u9304","\u5DF2\u6E05\u9664\u8F38\u5165"],"vs/base/browser/ui/keybindingLabel/keybindingLabel":["\u672A\u7E6B\u7D50"],"vs/base/browser/ui/selectBox/selectBoxCustom":["\u9078\u53D6\u65B9\u584A"],"vs/base/browser/ui/toolbar/toolbar":["\u66F4\u591A\u64CD\u4F5C"],"vs/base/browser/ui/tree/abstractTree":["\u7BE9\u9078","\u6A21\u7CCA\u6BD4\u5C0D","\u8981\u7BE9\u9078\u7684\u985E\u578B","\u8981\u641C\u5C0B\u7684\u985E\u578B","\u8981\u641C\u5C0B\u7684\u985E\u578B","\u95DC\u9589","\u627E\u4E0D\u5230\u4EFB\u4F55\u5143\u7D20\u3002"],"vs/base/common/actions":["(\u7A7A\u7684)"],"vs/base/common/errorMessage":["{0}: {1}","\u767C\u751F\u7CFB\u7D71\u932F\u8AA4 ({0})","\u767C\u751F\u672A\u77E5\u7684\u932F\u8AA4\u3002\u5982\u9700\u8A73\u7D30\u8CC7\u8A0A\uFF0C\u8ACB\u53C3\u95B1\u8A18\u9304\u6A94\u3002","\u767C\u751F\u672A\u77E5\u7684\u932F\u8AA4\u3002\u5982\u9700\u8A73\u7D30\u8CC7\u8A0A\uFF0C\u8ACB\u53C3\u95B1\u8A18\u9304\u6A94\u3002","{0} (\u7E3D\u8A08 {1} \u500B\u932F\u8AA4)","\u767C\u751F\u672A\u77E5\u7684\u932F\u8AA4\u3002\u5982\u9700\u8A73\u7D30\u8CC7\u8A0A\uFF0C\u8ACB\u53C3\u95B1\u8A18\u9304\u6A94\u3002"],"vs/base/common/keybindingLabels":["Ctrl","Shift","Alt","Windows","Ctrl","Shift","Alt","\u8D85\u7D1A\u9375","Control","Shift","\u9078\u9805","\u547D\u4EE4","Control","Shift","Alt","Windows","Control","Shift","Alt","\u8D85\u7D1A\u9375"],"vs/base/common/platform":["_"],"vs/editor/browser/controller/textAreaHandler":["\u7DE8\u8F2F\u5668","\u76EE\u524D\u7121\u6CD5\u5B58\u53D6\u6B64\u7DE8\u8F2F\u5668\u3002","{0} \u82E5\u8981\u555F\u7528\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u6700\u4F73\u5316\u6A21\u5F0F\uFF0C\u8ACB\u4F7F\u7528 {1}","{0} \u82E5\u8981\u555F\u7528\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u6700\u4F73\u5316\u6A21\u5F0F\uFF0C\uFF0C\u8ACB\u4F7F\u7528 {1} \u958B\u555F\u5FEB\u901F\u6311\u9078\uFF0C\u7136\u5F8C\u57F7\u884C [\u5207\u63DB\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u5354\u52A9\u5DE5\u5177\u6A21\u5F0F] \u547D\u4EE4\uFF0C\u8A72\u6A21\u5F0F\u76EE\u524D\u7121\u6CD5\u900F\u904E\u9375\u76E4\u89F8\u767C\u3002","{0} \u8ACB\u4F7F\u7528 {1} \u5B58\u53D6\u6309\u9375\u7E6B\u7D50\u95DC\u4FC2\u7DE8\u8F2F\u5668\u4E26\u52A0\u4EE5\u57F7\u884C\uFF0C\u4EE5\u70BA [\u5207\u63DB\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u5354\u52A9\u5DE5\u5177\u6A21\u5F0F] \u547D\u4EE4\u6307\u6D3E\u6309\u9375\u7E6B\u7D50\u95DC\u4FC2\u3002"],"vs/editor/browser/coreCommands":["\u5373\u4F7F\u884C\u7684\u9577\u5EA6\u904E\u9577\uFF0C\u4ECD\u8981\u5805\u6301\u81F3\u7D50\u5C3E","\u5373\u4F7F\u884C\u7684\u9577\u5EA6\u904E\u9577\uFF0C\u4ECD\u8981\u5805\u6301\u81F3\u7D50\u5C3E","\u5DF2\u79FB\u9664\u6B21\u8981\u8CC7\u6599\u6307\u6A19"],"vs/editor/browser/editorExtensions":["\u5FA9\u539F(&&U)","\u5FA9\u539F","\u53D6\u6D88\u5FA9\u539F(&&R)","\u91CD\u505A","\u5168\u9078(&&S)","\u5168\u9078"],"vs/editor/browser/widget/codeEditorWidget":["\u6E38\u6A19\u6578\u76EE\u5DF2\u9650\u5236\u70BA {0}\u3002\u8ACB\u8003\u616E\u4F7F\u7528 [\u5C0B\u627E\u548C\u53D6\u4EE3](https://code.visualstudio.com/docs/editor/codebasics#_find-and-replace) \u9032\u884C\u8F03\u5927\u578B\u7684\u8B8A\u66F4\uFF0C\u6216\u589E\u52A0\u7DE8\u8F2F\u5668\u7684\u591A\u91CD\u6E38\u6A19\u9650\u5236\u8A2D\u5B9A\u3002","\u589E\u52A0\u591A\u91CD\u6E38\u6A19\u9650\u5236"],"vs/editor/browser/widget/diffEditor/accessibleDiffViewer":["\u6613\u5B58\u53D6\u5DEE\u7570\u6AA2\u8996\u5668\u4E2D\u7684 [\u63D2\u5165] \u5716\u793A\u3002","\u6613\u5B58\u53D6\u5DEE\u7570\u6AA2\u8996\u5668\u4E2D\u7684 [\u79FB\u9664] \u5716\u793A\u3002","\u6613\u5B58\u53D6\u5DEE\u7570\u6AA2\u8996\u5668\u4E2D\u7684 [\u95DC\u9589] \u5716\u793A\u3002","\u95DC\u9589","\u53EF\u5B58\u53D6\u7684 Diff \u6AA2\u8996\u5668\u3002\u4F7F\u7528\u5411\u4E0A\u548C\u5411\u4E0B\u7BAD\u982D\u4F86\u700F\u89BD\u3002","\u672A\u8B8A\u66F4\u4EFB\u4E00\u884C","\u5DF2\u8B8A\u66F4 1 \u884C","\u5DF2\u8B8A\u66F4 {0} \u884C","{1} \u9805\u5DEE\u7570\u4E2D\u7684\u7B2C {0} \u9805: \u539F\u59CB\u884C {2}\u3001{3}\uFF0C\u4FEE\u6539\u884C {4}\u3001{5}","\u7A7A\u767D","{0} \u672A\u8B8A\u66F4\u884C {1}","{0} \u539F\u59CB\u884C {1} \u4FEE\u6539\u7684\u884C {2}","+ {0} \u4FEE\u6539\u884C {1}","- {0} \u539F\u59CB\u884C {1}"],"vs/editor/browser/widget/diffEditor/colors":["\u5728 Diff \u7DE8\u8F2F\u5668\u4E2D\u79FB\u52D5\u7684\u6587\u5B57\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u5728 Diff \u7DE8\u8F2F\u5668\u4E2D\u79FB\u52D5\u7684\u6587\u5B57\u7684\u4F5C\u7528\u4E2D\u6846\u7DDA\u8272\u5F69\u3002"],"vs/editor/browser/widget/diffEditor/decorations":["Diff \u7DE8\u8F2F\u5668\u4E2D\u7528\u65BC\u63D2\u5165\u7684\u7DDA\u689D\u88DD\u98FE\u3002","Diff \u7DE8\u8F2F\u5668\u4E2D\u7528\u65BC\u79FB\u9664\u7684\u7DDA\u689D\u88DD\u98FE\u3002","\u6309\u4E00\u4E0B\u4EE5\u9084\u539F\u8B8A\u66F4"],"vs/editor/browser/widget/diffEditor/diffEditor.contribution":["\u5207\u63DB\u647A\u758A\u672A\u8B8A\u66F4\u7684\u5340\u57DF","\u5207\u63DB\u986F\u793A\u79FB\u52D5\u7684\u7A0B\u5F0F\u78BC\u5340\u584A","\u7576\u7A7A\u9593\u6709\u9650\u6642\u5207\u63DB\u4F7F\u7528\u5167\u5D4C\u6AA2\u8996","\u7A7A\u9593\u6709\u9650\u6642\u4F7F\u7528\u5167\u5D4C\u6AA2\u8996","\u986F\u793A\u79FB\u52D5\u7684\u7A0B\u5F0F\u78BC\u5340\u584A","Diff \u7DE8\u8F2F\u5668","\u5207\u63DB\u5074\u908A","\u7D50\u675F\u6BD4\u8F03\u79FB\u52D5","\u647A\u758A\u6240\u6709\u672A\u8B8A\u66F4\u7684\u5340\u57DF","\u986F\u793A\u6240\u6709\u672A\u8B8A\u66F4\u7684\u5340\u57DF","\u53EF\u5B58\u53D6\u7684 Diff \u6AA2\u8996\u5668","\u79FB\u81F3\u4E0B\u4E00\u500B\u5DEE\u7570","\u958B\u555F\u6613\u5B58\u53D6\u5DEE\u7570\u6AA2\u8996\u5668","\u79FB\u81F3\u4E0A\u4E00\u500B\u5DEE\u7570"],"vs/editor/browser/widget/diffEditor/diffEditorEditors":[" \u4F7F\u7528 {0} \u4EE5\u958B\u555F\u5354\u52A9\u5DE5\u5177\u8AAA\u660E\u3002"],"vs/editor/browser/widget/diffEditor/hideUnchangedRegionsFeature":["\u647A\u758A\u672A\u8B8A\u66F4\u7684\u5340\u57DF","\u6309\u4E00\u4E0B\u6216\u62D6\u66F3\u4EE5\u5728\u4E0A\u65B9\u986F\u793A\u66F4\u591A\u5167\u5BB9","\u5168\u90E8\u986F\u793A","\u6309\u4E00\u4E0B\u6216\u62D6\u66F3\u4EE5\u5728\u4E0B\u65B9\u986F\u793A\u66F4\u591A\u5167\u5BB9","{0} \u689D\u96B1\u85CF\u884C","\u6309\u5169\u4E0B\u4EE5\u5C55\u958B"],"vs/editor/browser/widget/diffEditor/inlineDiffDeletedCodeMargin":["\u8907\u88FD\u5DF2\u522A\u9664\u7684\u884C","\u8907\u88FD\u5DF2\u522A\u9664\u7684\u884C","\u8907\u88FD\u8B8A\u66F4\u7684\u884C","\u8907\u88FD\u8B8A\u66F4\u7684\u884C","\u8907\u88FD\u5DF2\u522A\u9664\u7684\u884C \uFF08{0}\uFF09","\u8907\u88FD\u8B8A\u66F4\u7684\u884C ({0})","\u9084\u539F\u6B64\u8B8A\u66F4"],"vs/editor/browser/widget/diffEditor/movedBlocksLines":["\u884C {0}-{1} \u7684\u7A0B\u5F0F\u78BC\u5DF2\u79FB\u52D5\uFF0C\u4E14\u6709\u6240\u8B8A\u66F4","\u884C {0}-{1} \u7684\u7A0B\u5F0F\u78BC\u5DF2\u79FB\u52D5\uFF0C\u4E14\u6709\u6240\u8B8A\u66F4","\u7A0B\u5F0F\u78BC\u5DF2\u79FB\u81F3\u884C {0}-{1}","\u884C {0}-{1} \u7684\u7A0B\u5F0F\u78BC\u5DF2\u79FB\u52D5"],"vs/editor/common/config/editorConfigurationSchema":["\u7DE8\u8F2F\u5668","\u8207 Tab \u76F8\u7B49\u7684\u7A7A\u683C\u6578\u91CF\u3002\u7576 {0} \u5DF2\u958B\u555F\u6642\uFF0C\u6703\u6839\u64DA\u6A94\u6848\u5167\u5BB9\u8986\u5BEB\u6B64\u8A2D\u5B9A\u3002","\u7528\u65BC\u7E2E\u6392\u6216 'tabSize' \u4F7F\u7528 `\"editor.tabSize\"` \u503C\u7684\u7A7A\u683C\u6578\u76EE\u3002\u7576 '#editor.detectIndentation#' \u958B\u555F\u6642\uFF0C\u6703\u6839\u64DA\u6A94\u6848\u5167\u5BB9\u8986\u5BEB\u9019\u500B\u8A2D\u5B9A\u3002","\u5728\u6309 `Tab` \u6642\u63D2\u5165\u7A7A\u683C\u3002\u7576 {0} \u958B\u555F\u6642\uFF0C\u6703\u6839\u64DA\u6A94\u6848\u5167\u5BB9\u8986\u5BEB\u6B64\u8A2D\u5B9A\u3002","\u6839\u64DA\u6A94\u6848\u5167\u5BB9\uFF0C\u63A7\u5236\u7576\u6A94\u6848\u958B\u555F\u6642\uFF0C\u662F\u5426\u81EA\u52D5\u5075\u6E2C {0} \u548C {1}\u3002","\u79FB\u9664\u5C3E\u7AEF\u81EA\u52D5\u63D2\u5165\u7684\u7A7A\u767D\u5B57\u5143\u3002","\u91DD\u5C0D\u5927\u578B\u6A94\u6848\u505C\u7528\u90E8\u5206\u9AD8\u8A18\u61B6\u9AD4\u9700\u6C42\u529F\u80FD\u7684\u7279\u6B8A\u8655\u7406\u65B9\u5F0F\u3002","\u63A7\u5236\u662F\u5426\u61C9\u6839\u64DA\u6587\u4EF6\u4E2D\u7684\u55AE\u5B57\u8A08\u7B97\u81EA\u52D5\u5B8C\u6210\u3002","\u50C5\u5EFA\u8B70\u4F86\u81EA\u4F7F\u7528\u4E2D\u6587\u4EF6\u4E2D\u7684\u5B57\u7D44\u3002","\u5EFA\u8B70\u4F86\u81EA\u6240\u6709\u5DF2\u958B\u555F\u6587\u4EF6\u4E2D\uFF0C\u8A9E\u8A00\u76F8\u540C\u7684\u5B57\u7D44\u3002","\u5EFA\u8B70\u4F86\u81EA\u6240\u6709\u5DF2\u958B\u555F\u6587\u4EF6\u4E2D\u7684\u5B57\u7D44\u3002","\u63A7\u5236\u8981\u5F9E\u54EA\u4E9B\u6587\u4EF6\u8A08\u7B97\u4EE5\u5B57\u7D44\u70BA\u57FA\u790E\u7684\u5B8C\u6210\u4F5C\u696D\u3002","\u6240\u6709\u5F69\u8272\u4E3B\u984C\u7686\u5DF2\u555F\u7528\u8A9E\u610F\u9192\u76EE\u63D0\u793A\u3002","\u6240\u6709\u5F69\u8272\u4E3B\u984C\u7686\u5DF2\u505C\u7528\u8A9E\u610F\u9192\u76EE\u63D0\u793A\u3002","\u8A9E\u610F\u9192\u76EE\u63D0\u793A\u7531\u76EE\u524D\u4E4B\u5F69\u8272\u4F48\u666F\u4E3B\u984C\u7684 'semanticHighlighting' \u8A2D\u5B9A\u6240\u8A2D\u5B9A\u3002","\u63A7\u5236 semanticHighlighting \u662F\u5426\u6703\u70BA\u652F\u63F4\u7684\u8A9E\u8A00\u986F\u793A\u3002","\u5373\u4F7F\u6309\u5169\u4E0B\u5167\u5BB9\u6216\u6309 `Escape`\uFF0C\u4ECD\u4FDD\u6301\u7784\u5B54\u7DE8\u8F2F\u5668\u958B\u555F\u3002","\u56E0\u6548\u80FD\u7684\u7DE3\u6545\uFF0C\u4E0D\u6703\u5C07\u8D85\u904E\u6B64\u9AD8\u5EA6\u7684\u884C Token \u5316","\u63A7\u5236\u6B0A\u6756\u5316\u662F\u5426\u61C9\u8A72\u5728 Web \u5DE5\u4F5C\u8005\u4E0A\u975E\u540C\u6B65\u9032\u884C\u3002","\u63A7\u5236\u662F\u5426\u61C9\u8A72\u8A18\u9304\u975E\u540C\u6B65\u6B0A\u6756\u5316\u3002\u50C5\u9069\u7528\u5075\u932F\u3002","\u63A7\u5236\u662F\u5426\u61C9\u4F7F\u7528\u820A\u7248\u80CC\u666F Token \u5316\u4F86\u9A57\u8B49\u975E\u540C\u6B65 Token \u5316\u3002\u53EF\u80FD\u6703\u6E1B\u6162 Token \u5316\u7684\u901F\u5EA6\u3002\u50C5\u7528\u65BC\u5075\u932F\u3002","\u5B9A\u7FA9\u589E\u52A0\u6216\u6E1B\u5C11\u7E2E\u6392\u7684\u62EC\u5F27\u7B26\u865F\u3002","\u5DE6\u62EC\u5F27\u5B57\u5143\u6216\u5B57\u4E32\u9806\u5E8F\u3002","\u53F3\u62EC\u5F27\u5B57\u5143\u6216\u5B57\u4E32\u9806\u5E8F\u3002","\u5B9A\u7FA9\u7576\u62EC\u5F27\u914D\u5C0D\u8457\u8272\u5DF2\u555F\u7528\u6642\uFF0C\u7531\u5176\u5DE2\u72C0\u5C64\u7D1A\u8457\u8272\u7684\u62EC\u5F27\u914D\u5C0D\u3002","\u5DE6\u62EC\u5F27\u5B57\u5143\u6216\u5B57\u4E32\u9806\u5E8F\u3002","\u53F3\u62EC\u5F27\u5B57\u5143\u6216\u5B57\u4E32\u9806\u5E8F\u3002","\u53D6\u6D88 Diff \u8A08\u7B97\u524D\u7684\u903E\u6642\u9650\u5236 (\u6BEB\u79D2)\u3002\u82E5\u7121\u903E\u6642\uFF0C\u8ACB\u4F7F\u7528 0\u3002","\u8981\u8A08\u7B97\u5DEE\u7570\u7684\u6A94\u6848\u5927\u5C0F\u4E0A\u9650 (MB)\u3002\u4F7F\u7528 0 \u8868\u793A\u7121\u9650\u5236\u3002","\u63A7\u5236 Diff \u7DE8\u8F2F\u5668\u8981\u4E26\u6392\u6216\u5167\u5D4C\u986F\u793A Diff\u3002","\u5982\u679C\u5DEE\u7570\u7DE8\u8F2F\u5668\u5BEC\u5EA6\u5C0F\u65BC\u6B64\u503C\uFF0C\u5247\u4F7F\u7528\u5167\u5D4C\u6AA2\u8996\u3002","\u5982\u679C\u555F\u7528\u4E14\u7DE8\u8F2F\u5668\u5BEC\u5EA6\u592A\u5C0F\uFF0C\u5247\u6703\u4F7F\u7528\u5167\u5D4C\u6AA2\u8996\u3002","\u555F\u7528\u6642\uFF0CDiff \u7DE8\u8F2F\u5668\u6703\u5728\u5176\u5B57\u5143\u908A\u7DE3\u986F\u793A\u7BAD\u982D\uFF0C\u4EE5\u9084\u539F\u8B8A\u66F4\u3002","\u555F\u7528\u6642\uFF0CDiff \u7DE8\u8F2F\u5668\u6703\u5FFD\u7565\u524D\u7F6E\u6216\u5F8C\u7F6E\u7A7A\u683C\u7684\u8B8A\u66F4\u3002","\u63A7\u5236 Diff \u7DE8\u8F2F\u5668\u662F\u5426\u8981\u70BA\u65B0\u589E/\u79FB\u9664\u7684\u8B8A\u66F4\u986F\u793A +/- \u6A19\u8A18\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u986F\u793A codelens\u3002","\u4E00\u5F8B\u4E0D\u63DB\u884C\u3002","\u4F9D\u6AA2\u8996\u5340\u5BEC\u5EA6\u63DB\u884C\u3002","\u5C07\u4F9D\u64DA {0} \u8A2D\u5B9A\u81EA\u52D5\u63DB\u884C\u3002","\u4F7F\u7528\u820A\u7248\u5DEE\u7570\u6F14\u7B97\u6CD5\u3002","\u4F7F\u7528\u9032\u968E\u7248\u5DEE\u7570\u6F14\u7B97\u6CD5\u3002","\u63A7\u5236\u5DEE\u7570\u7DE8\u8F2F\u5668\u662F\u5426\u986F\u793A\u672A\u8B8A\u66F4\u7684\u5340\u57DF\u3002","\u63A7\u5236\u672A\u8B8A\u66F4\u5340\u57DF\u7684\u4F7F\u7528\u884C\u6578\u3002","\u63A7\u5236\u672A\u8B8A\u66F4\u5340\u57DF\u7684\u6700\u5C0F\u4F7F\u7528\u884C\u6578\u3002","\u63A7\u5236\u6BD4\u8F03\u672A\u8B8A\u66F4\u7684\u5340\u57DF\u6642\uFF0C\u8981\u4F7F\u7528\u591A\u5C11\u884C\u4F5C\u70BA\u5167\u5BB9\u3002","\u63A7\u5236 Diff \u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u8A72\u986F\u793A\u5075\u6E2C\u5230\u7684\u7A0B\u5F0F\u78BC\u79FB\u52D5\u3002","\u63A7\u5236\u5DEE\u7570\u7DE8\u8F2F\u5668\u662F\u5426\u986F\u793A\u7A7A\u767D\u88DD\u98FE\u9805\u76EE\uFF0C\u4EE5\u67E5\u770B\u63D2\u5165\u6216\u522A\u9664\u5B57\u5143\u7684\u4F4D\u7F6E\u3002"],"vs/editor/common/config/editorOptions":["\u4F7F\u7528\u5E73\u53F0 API \u4EE5\u5075\u6E2C\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u9644\u52A0","\u4F7F\u7528\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u6700\u4F73\u5316\u4F7F\u7528\u65B9\u5F0F","\u5047\u8A2D\u672A\u9644\u52A0\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F","\u63A7\u5236 UI \u662F\u5426\u61C9\u65BC\u5DF2\u70BA\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u6700\u4F73\u5316\u7684\u6A21\u5F0F\u4E2D\u57F7\u884C\u3002","\u63A7\u5236\u662F\u5426\u8981\u5728\u8A3B\u89E3\u6642\u63D2\u5165\u7A7A\u767D\u5B57\u5143\u3002","\u63A7\u5236\u662F\u5426\u61C9\u4EE5\u884C\u8A3B\u89E3\u7684\u5207\u63DB\u3001\u65B0\u589E\u6216\u79FB\u9664\u52D5\u4F5C\uFF0C\u5FFD\u7565\u7A7A\u767D\u7684\u884C\u3002","\u63A7\u5236\u8907\u88FD\u6642\u4E0D\u9078\u53D6\u4EFB\u4F55\u9805\u76EE\u662F\u5426\u6703\u8907\u88FD\u76EE\u524D\u7A0B\u5F0F\u884C\u3002","\u63A7\u5236\u5728\u8F38\u5165\u671F\u9593\u662F\u5426\u8981\u8DF3\u904E\u6E38\u6A19\u4F86\u5C0B\u627E\u76F8\u7B26\u7684\u9805\u76EE\u3002","\u6C38\u4E0D\u5F9E\u7DE8\u8F2F\u5668\u9078\u53D6\u7BC4\u570D\u4E2D\u690D\u5165\u641C\u5C0B\u5B57\u4E32\u3002","\u4E00\u5F8B\u5F9E\u7DE8\u8F2F\u5668\u9078\u53D6\u7BC4\u570D\u4E2D\u690D\u5165\u641C\u5C0B\u5B57\u4E32\uFF0C\u5305\u62EC\u6E38\u6A19\u4F4D\u7F6E\u7684\u5B57\u3002","\u53EA\u6709\u4F86\u81EA\u7DE8\u8F2F\u5668\u9078\u53D6\u7BC4\u570D\u4E2D\u7684\u690D\u5165\u641C\u5C0B\u5B57\u4E32\u3002","\u63A7\u5236 [\u5C0B\u627E\u5C0F\u5DE5\u5177] \u4E2D\u7684\u641C\u5C0B\u5B57\u4E32\u662F\u5426\u4F86\u81EA\u7DE8\u8F2F\u5668\u9078\u53D6\u9805\u76EE\u3002","\u6C38\u4E0D\u81EA\u52D5\u958B\u555F [\u5728\u9078\u53D6\u7BC4\u570D\u4E2D\u5C0B\u627E] (\u9810\u8A2D)\u3002","\u4E00\u5F8B\u81EA\u52D5\u958B\u555F [\u5728\u9078\u53D6\u7BC4\u570D\u4E2D\u5C0B\u627E]\u3002","\u9078\u53D6\u591A\u884C\u5167\u5BB9\u6642\uFF0C\u81EA\u52D5\u958B\u555F [\u5728\u9078\u53D6\u7BC4\u570D\u4E2D\u5C0B\u627E]\u3002","\u63A7\u5236\u81EA\u52D5\u958B\u555F [\u5728\u9078\u53D6\u7BC4\u570D\u4E2D\u5C0B\u627E] \u7684\u689D\u4EF6\u3002","\u63A7\u5236\u5C0B\u627E\u5C0F\u5DE5\u5177\u662F\u5426\u5728 macOS \u4E0A\u8B80\u53D6\u6216\u4FEE\u6539\u5171\u7528\u5C0B\u627E\u526A\u8CBC\u7C3F\u3002","\u63A7\u5236\u5C0B\u627E\u5C0F\u5DE5\u5177\u662F\u5426\u61C9\u5728\u7DE8\u8F2F\u5668\u9802\u7AEF\u984D\u5916\u65B0\u589E\u884C\u3002\u82E5\u70BA true\uFF0C\u7576\u60A8\u53EF\u770B\u5230\u5C0B\u627E\u5C0F\u5DE5\u5177\u6642\uFF0C\u60A8\u7684\u6372\u52D5\u7BC4\u570D\u6703\u8D85\u904E\u7B2C\u4E00\u884C\u3002","\u7576\u518D\u4E5F\u627E\u4E0D\u5230\u5176\u4ED6\u76F8\u7B26\u9805\u76EE\u6642\uFF0C\u63A7\u5236\u662F\u5426\u81EA\u52D5\u5F9E\u958B\u982D (\u6216\u7D50\u5C3E) \u91CD\u65B0\u958B\u59CB\u641C\u5C0B\u3002","\u555F\u7528/\u505C\u7528\u9023\u5B57\u5B57\u578B ('calt' \u548C 'liga' \u5B57\u578B\u529F\u80FD)\u3002\u5C07\u6B64\u9805\u8B8A\u66F4\u70BA\u5B57\u4E32\uFF0C\u4EE5\u7CBE\u78BA\u63A7\u5236 'font-feature-settings' CSS \u5C6C\u6027\u3002","\u660E\u78BA\u7684 'font-feature-settings' CSS \u5C6C\u6027\u3002\u5982\u679C\u53EA\u9700\u8981\u958B\u555F/\u95DC\u9589\u9023\u5B57\uFF0C\u53EF\u4EE5\u6539\u70BA\u50B3\u905E\u5E03\u6797\u503C\u3002","\u8A2D\u5B9A\u9023\u5B57\u5B57\u578B\u6216\u5B57\u578B\u529F\u80FD\u3002\u53EF\u4EE5\u662F\u5E03\u6797\u503C\u4EE5\u555F\u7528/\u505C\u7528\u9023\u5B57\uFF0C\u6216\u4EE3\u8868 CSS 'font-feature-settings' \u5C6C\u6027\u7684\u5B57\u4E32\u3002","\u555F\u7528/\u505C\u7528\u5F9E font-weight \u5230 font-variation-settings \u7684\u8F49\u63DB\u3002\u5C07\u6B64\u8A2D\u5B9A\u8B8A\u66F4\u70BA\u5B57\u4E32\uFF0C\u4EE5\u66F4\u7CBE\u7D30\u5730\u63A7\u5236 'font-variation-settings' CSS \u5C6C\u6027\u3002","\u660E\u78BA\u7684 'font-variation-settings' CSS \u5C6C\u6027\u3002\u5982\u679C\u53EA\u9700\u8981\u5C07 font-weight \u8F49\u63DB\u70BA font-variation-settings\uFF0C\u53EF\u4EE5\u6539\u70BA\u50B3\u905E\u5E03\u6797\u503C\u3002","\u8A2D\u5B9A\u5B57\u578B\u8B8A\u5316\u3002\u53EF\u4EE5\u662F\u5E03\u6797\u503C\uFF0C\u4EE5\u555F\u7528/\u505C\u7528\u5F9E font-weight \u5230 font-variation-settings \u7684\u8F49\u63DB\uFF0C\u6216\u662F\u5B57\u4E32\uFF0C\u505A\u70BA CSS 'font-variation-settings' \u5C6C\u6027\u7684\u503C\u3002","\u63A7\u5236\u5B57\u578B\u5927\u5C0F (\u50CF\u7D20)\u3002","\u53EA\u5141\u8A31\u300C\u4E00\u822C\u300D\u53CA\u300C\u7C97\u9AD4\u300D\u95DC\u9375\u5B57\uFF0C\u6216\u4ECB\u65BC 1 \u5230 1000 \u4E4B\u9593\u7684\u6578\u503C\u3002","\u63A7\u5236\u5B57\u578B\u7C97\u7D30\u3002\u63A5\u53D7\u300C\u4E00\u822C\u300D\u53CA\u300C\u7C97\u9AD4\u300D\u95DC\u9375\u5B57\uFF0C\u6216\u4ECB\u65BC 1 \u5230 1000 \u4E4B\u9593\u7684\u6578\u503C\u3002","\u986F\u793A\u7D50\u679C\u7684\u9810\u89BD\u6AA2\u8996 (\u9810\u8A2D)","\u79FB\u81F3\u4E3B\u8981\u7D50\u679C\u4E26\u986F\u793A\u9810\u89BD\u6AA2\u8996","\u524D\u5F80\u4E3B\u8981\u7D50\u679C\uFF0C\u4E26\u5C0D\u5176\u4ED6\u4EBA\u555F\u7528\u7121\u9810\u89BD\u700F\u89BD","\u6B64\u8A2D\u5B9A\u5DF2\u6DD8\u6C70\uFF0C\u8ACB\u6539\u7528 'editor.editor.gotoLocation.multipleDefinitions' \u6216 'editor.editor.gotoLocation.multipleImplementations' \u7B49\u55AE\u7368\u8A2D\u5B9A\u3002","\u63A7\u5236 'Go to Definition' \u547D\u4EE4\u5728\u6709\u591A\u500B\u76EE\u6A19\u4F4D\u7F6E\u5B58\u5728\u6642\u7684\u884C\u70BA\u3002","\u63A7\u5236 'Go to Type Definition' \u547D\u4EE4\u5728\u6709\u591A\u500B\u76EE\u6A19\u4F4D\u7F6E\u5B58\u5728\u6642\u7684\u884C\u70BA\u3002","\u63A7\u5236 'Go to Declaration' \u547D\u4EE4\u5728\u6709\u591A\u500B\u76EE\u6A19\u4F4D\u7F6E\u5B58\u5728\u6642\u7684\u884C\u70BA\u3002","\u63A7\u5236 'Go to Implementations' \u547D\u4EE4\u5728\u6709\u591A\u500B\u76EE\u6A19\u4F4D\u7F6E\u5B58\u5728\u6642\u7684\u884C\u70BA\u3002","\u63A7\u5236 'Go to References' \u547D\u4EE4\u5728\u6709\u591A\u500B\u76EE\u6A19\u4F4D\u7F6E\u5B58\u5728\u6642\u7684\u884C\u70BA\u3002","\u7576 'Go to Definition' \u7684\u7D50\u679C\u70BA\u76EE\u524D\u4F4D\u7F6E\u6642\uFF0C\u6B63\u5728\u57F7\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u8B58\u5225\u78BC\u3002","\u7576 'Go to Type Definition' \u7684\u7D50\u679C\u70BA\u76EE\u524D\u4F4D\u7F6E\u6642\uFF0C\u6B63\u5728\u57F7\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u8B58\u5225\u78BC\u3002","\u7576 'Go to Declaration' \u7684\u7D50\u679C\u70BA\u76EE\u524D\u4F4D\u7F6E\u6642\uFF0C\u6B63\u5728\u57F7\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u8B58\u5225\u78BC\u3002","\u7576 'Go to Implementation' \u7684\u7D50\u679C\u70BA\u76EE\u524D\u4F4D\u7F6E\u6642\uFF0C\u6B63\u5728\u57F7\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u8B58\u5225\u78BC\u3002","\u7576 'Go to Reference' \u7684\u7D50\u679C\u70BA\u76EE\u524D\u4F4D\u7F6E\u6642\uFF0C\u6B63\u5728\u57F7\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u8B58\u5225\u78BC\u3002","\u63A7\u5236\u662F\u5426\u986F\u793A\u66AB\u7559\u3002","\u63A7\u5236\u66AB\u7559\u986F\u793A\u7684\u5EF6\u9072\u6642\u9593 (\u4EE5\u6BEB\u79D2\u70BA\u55AE\u4F4D)\u3002","\u63A7\u5236\u7576\u6ED1\u9F20\u79FB\u904E\u6642\uFF0C\u662F\u5426\u61C9\u4FDD\u6301\u986F\u793A\u66AB\u7559\u3002","\u63A7\u5236\u96B1\u85CF\u66AB\u7559\u4E4B\u5F8C\u7684\u5EF6\u9072\u6BEB\u79D2\u3002\u9700\u8981\u555F\u7528 'editor.hover.sticky'\u3002","\u5982\u679C\u6709\u7A7A\u9593\uFF0C\u5247\u504F\u597D\u5728\u884C\u4E0A\u65B9\u986F\u793A\u6E38\u6A19\u3002","\u5047\u8A2D\u6240\u6709\u5B57\u5143\u7684\u5BEC\u5EA6\u5747\u76F8\u540C\u3002\u9019\u662F\u4E00\u7A2E\u5FEB\u901F\u7684\u6F14\u7B97\u6CD5\uFF0C\u9069\u7528\u65BC\u7B49\u5BEC\u5B57\u578B\uFF0C\u4EE5\u53CA\u5B57\u7B26\u5BEC\u5EA6\u76F8\u540C\u7684\u90E8\u5206\u6307\u4EE4\u78BC (\u4F8B\u5982\u62C9\u4E01\u6587\u5B57\u5143)\u3002","\u5C07\u5916\u570D\u9EDE\u8A08\u7B97\u59D4\u6D3E\u7D66\u700F\u89BD\u5668\u3002\u9019\u662F\u7DE9\u6162\u7684\u6F14\u7B97\u6CD5\uFF0C\u5982\u679C\u6A94\u6848\u8F03\u5927\u53EF\u80FD\u6703\u5C0E\u81F4\u51CD\u7D50\uFF0C\u4F46\u5728\u6240\u6709\u60C5\u6CC1\u4E0B\u90FD\u6B63\u5E38\u904B\u4F5C\u3002","\u63A7\u5236\u8A08\u7B97\u5916\u570D\u9EDE\u7684\u6F14\u7B97\u6CD5\u3002\u8ACB\u6CE8\u610F\uFF0C\u5728\u5354\u52A9\u5DE5\u5177\u6A21\u5F0F\u4E2D\uFF0C\u6703\u4F7F\u7528\u9032\u968E\u4F86\u7372\u5F97\u6700\u4F73\u9AD4\u9A57\u3002","\u5728\u7DE8\u8F2F\u5668\u4E2D\u555F\u7528\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u71C8\u6CE1\u3002","\u5728\u7DE8\u8F2F\u5668\u9802\u7AEF\u6372\u52D5\u671F\u9593\u986F\u793A\u5DE2\u72C0\u7684\u76EE\u524D\u7BC4\u570D\u3002","\u5B9A\u7FA9\u8981\u986F\u793A\u7684\u81EA\u9ECF\u7DDA\u6578\u76EE\u4E0A\u9650\u3002","\u5B9A\u7FA9\u8981\u7528\u65BC\u5224\u65B7\u8981\u9ECF\u4F4F\u7684\u7DDA\u689D\u7684\u6A21\u578B\u3002\u5982\u679C\u5927\u7DB1\u6A21\u578B\u4E0D\u5B58\u5728\uFF0C\u5247\u6703\u56DE\u5230\u647A\u758A\u63D0\u4F9B\u8005\u6A21\u578B\uFF0C\u5176\u6703\u56DE\u5230\u7E2E\u6392\u6A21\u578B\u3002\u9019\u4E09\u7A2E\u60C5\u6CC1\u4E2D\u6703\u9075\u5B88\u6B64\u9806\u5E8F\u3002","\u4F7F\u7528\u7DE8\u8F2F\u5668\u7684\u6C34\u5E73\u6372\u8EF8\uFF0C\u555F\u7528\u81EA\u9ECF\u6372\u52D5\u5C0F\u5DE5\u5177\u7684\u6372\u52D5\u3002","\u555F\u7528\u7DE8\u8F2F\u5668\u4E2D\u7684\u5167\u5D4C\u63D0\u793A\u3002","\u5DF2\u555F\u7528\u5167\u5D4C\u63D0\u793A","\u9810\u8A2D\u6703\u986F\u793A\u5167\u5D4C\u63D0\u793A\uFF0C\u4E26\u5728\u6309\u4F4F {0} \u6642\u96B1\u85CF","\u9810\u8A2D\u6703\u96B1\u85CF\u5167\u5D4C\u63D0\u793A\uFF0C\u4E26\u5728\u6309\u4F4F {0} \u6642\u986F\u793A","\u5DF2\u505C\u7528\u5167\u5D4C\u63D0\u793A","\u63A7\u5236\u7DE8\u8F2F\u5668\u4E2D\u5167\u5D4C\u63D0\u793A\u7684\u5B57\u578B\u5927\u5C0F\u3002\u7576\u8A2D\u5B9A\u7684\u503C\u5C0F\u65BC {1} \u6216\u5927\u65BC\u7DE8\u8F2F\u5668\u5B57\u578B\u5927\u5C0F\u6642\uFF0C\u5247\u6703\u4F7F\u7528{0} \u9810\u8A2D\u503C\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u4E2D\uFF0C\u5167\u5D4C\u63D0\u793A\u7684\u5B57\u578B\u5BB6\u65CF\u3002\u8A2D\u5B9A\u70BA\u7A7A\u767D\u6642\uFF0C\u5247\u6703\u4F7F\u7528 {0}\u3002","\u5728\u7DE8\u8F2F\u5668\u4E2D\u555F\u7528\u7684\u5167\u5D4C\u63D0\u793A\u5468\u570D\u7684\u586B\u88DC\u3002",`\u63A7\u5236\u884C\u9AD8\u3002\r - - \u4F7F\u7528 0 \u5F9E\u5B57\u578B\u5927\u5C0F\u81EA\u52D5\u8A08\u7B97\u884C\u9AD8\u3002\r - - \u4F7F\u7528\u4ECB\u65BC 0 \u548C 8 \u4E4B\u9593\u7684\u503C\u4F5C\u70BA\u5B57\u578B\u5927\u5C0F\u7684\u4E58\u6578\u3002\r - - \u5927\u65BC\u6216\u7B49\u65BC 8 \u7684\u503C\u5C07\u7528\u4F86\u4F5C\u70BA\u6709\u6548\u503C\u3002`,"\u63A7\u5236\u662F\u5426\u6703\u986F\u793A\u7E2E\u5716","\u63A7\u5236\u662F\u5426\u6703\u81EA\u52D5\u96B1\u85CF\u7E2E\u5716\u3002","\u7E2E\u5716\u5927\u5C0F\u8207\u7DE8\u8F2F\u5668\u5167\u5BB9\u76F8\u540C (\u4E14\u53EF\u80FD\u6703\u6372\u52D5)\u3002","\u7E2E\u5716\u6703\u8996\u9700\u8981\u4F38\u7E2E\uFF0C\u4EE5\u586B\u6EFF\u8A72\u7DE8\u8F2F\u5668\u7684\u9AD8\u5EA6 (\u7121\u6372\u52D5)\u3002","\u7E2E\u5716\u5C07\u8996\u9700\u8981\u7E2E\u5C0F\uFF0C\u4E00\u5F8B\u4E0D\u6703\u5927\u65BC\u8A72\u7DE8\u8F2F\u5668 (\u7121\u6372\u52D5)\u3002","\u63A7\u5236\u7E2E\u5716\u7684\u5927\u5C0F\u3002","\u63A7\u5236\u8981\u5728\u54EA\u7AEF\u5448\u73FE\u7E2E\u5716\u3002","\u63A7\u5236\u4F55\u6642\u986F\u793A\u8FF7\u4F60\u5730\u5716\u6ED1\u687F\u3002","\u7E2E\u5716\u5167\u6240\u7E6A\u88FD\u7684\u5167\u5BB9\u5927\u5C0F: 1\u30012 \u6216 3\u3002","\u986F\u793A\u884C\u4E2D\u7684\u5BE6\u969B\u5B57\u5143\uFF0C\u800C\u4E0D\u662F\u8272\u5F69\u5340\u584A\u3002","\u9650\u5236\u7E2E\u5716\u7684\u5BEC\u5EA6\uFF0C\u6700\u591A\u986F\u793A\u67D0\u500B\u6578\u76EE\u7684\u5217\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u4E0A\u908A\u7DE3\u8207\u7B2C\u4E00\u884C\u4E4B\u9593\u7684\u7A7A\u683C\u6578\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u4E0B\u908A\u7DE3\u8207\u6700\u5F8C\u4E00\u884C\u4E4B\u9593\u7684\u7A7A\u683C\u6578\u3002","\u555F\u7528\u5FEB\u986F\uFF0C\u5728\u60A8\u9375\u5165\u7684\u540C\u6642\u986F\u793A\u53C3\u6578\u6587\u4EF6\u548C\u985E\u578B\u8CC7\u8A0A\u3002","\u63A7\u5236\u63D0\u793A\u529F\u80FD\u8868\u662F\u5426\u5728\u6E05\u55AE\u7D50\u5C3E\u6642\u5FAA\u74B0\u6216\u95DC\u9589\u3002","\u5FEB\u901F\u5EFA\u8B70\u6703\u986F\u793A\u5728\u5EFA\u8B70\u5C0F\u5DE5\u5177\u5167","\u5FEB\u901F\u5EFA\u8B70\u6703\u986F\u793A\u70BA\u6D6E\u6C34\u5370\u6587\u5B57","\u5DF2\u505C\u7528\u5FEB\u901F\u5EFA\u8B70","\u5141\u8A31\u5728\u5B57\u4E32\u5167\u986F\u793A\u5373\u6642\u5EFA\u8B70\u3002","\u5141\u8A31\u5728\u8A3B\u89E3\u4E2D\u986F\u793A\u5373\u6642\u5EFA\u8B70\u3002","\u5141\u8A31\u5728\u5B57\u4E32\u8207\u8A3B\u89E3\u4EE5\u5916\u4E4B\u8655\u986F\u793A\u5373\u6642\u5EFA\u8B70\u3002","\u63A7\u5236\u8F38\u5165\u6642\u662F\u5426\u61C9\u81EA\u52D5\u986F\u793A\u5EFA\u8B70\u3002\u9019\u53EF\u63A7\u5236\u5728\u8A3B\u89E3\u3001\u5B57\u4E32\u53CA\u5176\u4ED6\u7A0B\u5F0F\u78BC\u4E2D\u7684\u8F38\u5165\u3002\u53EF\u8A2D\u5B9A\u5FEB\u901F\u5EFA\u8B70\u4EE5\u96B1\u5F62\u6D6E\u51FA\u6587\u5B57\u6216\u5EFA\u8B70\u5C0F\u5DE5\u5177\u986F\u793A\u3002\u53E6\u5916\u4E5F\u8ACB\u6CE8\u610F '{0}'-\u8A2D\u5B9A\uFF0C\u5176\u6703\u63A7\u5236\u5EFA\u8B70\u662F\u5426\u7531\u7279\u6B8A\u5B57\u5143\u6240\u89F8\u767C\u3002","\u4E0D\u986F\u793A\u884C\u865F\u3002","\u884C\u865F\u4EE5\u7D55\u5C0D\u503C\u986F\u793A\u3002","\u884C\u865F\u4EE5\u76EE\u524D\u6E38\u6A19\u7684\u76F8\u5C0D\u503C\u986F\u793A\u3002","\u6BCF 10 \u884C\u986F\u793A\u884C\u865F\u3002","\u63A7\u5236\u884C\u865F\u7684\u986F\u793A\u3002","\u9019\u500B\u7DE8\u8F2F\u5668\u5C3A\u898F\u6703\u8F49\u8B6F\u7684\u7B49\u5BEC\u5B57\u5143\u6578\u3002","\u6B64\u7DE8\u8F2F\u5668\u5C3A\u898F\u7684\u8272\u5F69\u3002","\u5728\u67D0\u500B\u6578\u76EE\u7684\u7B49\u5BEC\u5B57\u5143\u4E4B\u5F8C\u986F\u793A\u5782\u76F4\u5C3A\u898F\u3002\u5982\u6709\u591A\u500B\u5C3A\u898F\uFF0C\u5C31\u6703\u4F7F\u7528\u591A\u500B\u503C\u3002\u82E5\u9663\u5217\u7A7A\u767D\uFF0C\u5C31\u4E0D\u6703\u7E6A\u88FD\u4EFB\u4F55\u5C3A\u898F\u3002","\u5782\u76F4\u6372\u8EF8\u53EA\u6709\u5728\u5FC5\u8981\u6642\u624D\u53EF\u898B\u3002","\u5782\u76F4\u6372\u8EF8\u6C38\u9060\u53EF\u898B\u3002","\u5782\u76F4\u6372\u8EF8\u6C38\u9060\u96B1\u85CF\u3002","\u63A7\u5236\u9805\u5782\u76F4\u6372\u8EF8\u7684\u53EF\u898B\u5EA6\u3002","\u6C34\u5E73\u6372\u8EF8\u53EA\u6709\u5728\u5FC5\u8981\u6642\u624D\u53EF\u898B\u3002","\u6C34\u5E73\u6372\u8EF8\u6C38\u9060\u53EF\u898B\u3002","\u6C34\u5E73\u6372\u8EF8\u6C38\u9060\u96B1\u85CF\u3002","\u63A7\u5236\u9805\u6C34\u5E73\u6372\u8EF8\u7684\u53EF\u898B\u5EA6\u3002","\u5782\u76F4\u6372\u8EF8\u7684\u5BEC\u5EA6\u3002","\u6C34\u5E73\u6372\u8EF8\u7684\u9AD8\u5EA6\u3002","\u63A7\u5236\u9805\u6309\u4E00\u4E0B\u662F\u5426\u6309\u9801\u9762\u6EFE\u52D5\u6216\u8DF3\u5230\u6309\u4E00\u4E0B\u4F4D\u7F6E\u3002","\u63A7\u5236\u662F\u5426\u9192\u76EE\u63D0\u793A\u6240\u6709\u975E\u57FA\u672C\u7684 ASCII \u5B57\u5143\u3002\u53EA\u6709\u4ECB\u65BC U+0020\u548C U+007E\u3001tab\u3001\u63DB\u884C\u548C\u6B78\u4F4D\u5B57\u5143\u4E4B\u9593\u7684\u5B57\u5143\u6703\u8996\u70BA\u57FA\u672C ASCII\u3002","\u63A7\u5236\u662F\u5426\u53EA\u4FDD\u7559\u7A7A\u683C\u6216\u5B8C\u5168\u6C92\u6709\u5BEC\u5EA6\u4E4B\u5B57\u5143\u7684\u9192\u76EE\u63D0\u793A\u3002","\u63A7\u5236\u662F\u5426\u9192\u76EE\u63D0\u793A\u8207\u57FA\u672C ASCII \u5B57\u5143\u6DF7\u6DC6\u7684\u5B57\u5143\uFF0C\u4F46\u76EE\u524D\u4F7F\u7528\u8005\u5730\u5340\u8A2D\u5B9A\u4E2D\u901A\u7528\u7684\u5B57\u5143\u9664\u5916\u3002","\u63A7\u5236\u8A3B\u89E3\u4E2D\u7684\u5B57\u5143\u662F\u5426\u4E5F\u61C9\u53D7\u5230 Unicode \u9192\u76EE\u63D0\u793A\u3002","\u63A7\u5236\u5B57\u4E32\u4E2D\u7684\u5B57\u5143\u662F\u5426\u4E5F\u61C9\u53D7\u5230 Unicode \u9192\u76EE\u63D0\u793A\u3002","\u5B9A\u7FA9\u672A\u9192\u76EE\u63D0\u793A\u7684\u5141\u8A31\u5B57\u5143\u3002","\u4E0D\u6703\u5C07\u5141\u8A31\u5730\u5340\u8A2D\u7F6E\u4E2D\u5E38\u898B\u7684 Unicode \u5B57\u5143\u5F37\u8ABF\u986F\u793A\u3002","\u63A7\u5236\u662F\u5426\u8981\u5728\u7DE8\u8F2F\u5668\u4E2D\u81EA\u52D5\u986F\u793A\u5167\u5D4C\u5EFA\u8B70\u3002","\u6BCF\u7576\u986F\u793A\u5167\u5D4C\u5EFA\u8B70\u6642\uFF0C\u986F\u793A\u5167\u5D4C\u5EFA\u8B70\u5DE5\u5177\u5217\u3002","\u6BCF\u7576\u6E38\u6A19\u505C\u7559\u5728\u5167\u5D4C\u5EFA\u8B70\u4E0A\u65B9\u6642\uFF0C\u986F\u793A\u5167\u5D4C\u5EFA\u8B70\u5DE5\u5177\u5217\u3002","\u63A7\u5236\u4F55\u6642\u986F\u793A\u5167\u5D4C\u5EFA\u8B70\u5DE5\u5177\u5217\u3002","\u63A7\u5236\u5167\u5D4C\u5EFA\u8B70\u5982\u4F55\u8207\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E92\u52D5\u3002\u5982\u679C\u555F\u7528\uFF0C\u6709\u53EF\u7528\u7684\u5167\u5D4C\u5EFA\u8B70\u6642\uFF0C\u4E0D\u6703\u81EA\u52D5\u986F\u793A\u5EFA\u8B70\u5C0F\u5DE5\u5177\u3002","\u63A7\u5236\u662F\u5426\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u8457\u8272\u3002\u4F7F\u7528 {0} \u8986\u5BEB\u62EC\u5F27\u4EAE\u986F\u984F\u8272\u3002","\u63A7\u5236\u6BCF\u500B\u62EC\u5F27\u985E\u578B\u662F\u5426\u6709\u81EA\u5DF1\u7684\u7368\u7ACB\u8272\u5F69\u96C6\u5340\u3002","\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u53EA\u555F\u7528\u4F7F\u7528\u4E2D\u62EC\u5F27\u7D44\u7684\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u505C\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u63A7\u5236\u662F\u5426\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u6307\u5357\u3002","\u555F\u7528\u6C34\u5E73\u8F14\u52A9\u7DDA\u4F5C\u70BA\u5782\u76F4\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u7684\u65B0\u589E\u529F\u80FD\u3002","\u53EA\u555F\u7528\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u7684\u6C34\u5E73\u8F14\u52A9\u7DDA\u3002","\u505C\u7528\u6C34\u5E73\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u63A7\u5236\u662F\u5426\u555F\u7528\u6C34\u5E73\u6210\u5C0D\u65B9\u62EC\u5F27\u8F14\u52A9\u7DDA\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u9192\u76EE\u63D0\u793A\u4F7F\u7528\u4E2D\u7684\u6210\u5C0D\u62EC\u5F27\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u986F\u793A\u7E2E\u6392\u8F14\u52A9\u7DDA\u3002","\u9192\u76EE\u63D0\u793A\u4F7F\u7528\u4E2D\u7684\u7E2E\u6392\u8F14\u52A9\u7DDA\u3002","\u5373\u4F7F\u9192\u76EE\u63D0\u793A\u62EC\u5F27\u8F14\u52A9\u7DDA\uFF0C\u4ECD\u9192\u76EE\u63D0\u793A\u4F7F\u7528\u4E2D\u7684\u7E2E\u6392\u8F14\u52A9\u7DDA\u3002","\u4E0D\u8981\u9192\u76EE\u63D0\u793A\u4F7F\u7528\u4E2D\u7684\u7E2E\u6392\u8F14\u52A9\u7DDA\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u9192\u76EE\u63D0\u793A\u4F7F\u7528\u4E2D\u7684\u7E2E\u6392\u8F14\u52A9\u7DDA\u3002","\u63D2\u5165\u5EFA\u8B70\u800C\u4E0D\u8986\u5BEB\u6E38\u6A19\u65C1\u7684\u6587\u5B57\u3002","\u63D2\u5165\u5EFA\u8B70\u4E26\u8986\u5BEB\u6E38\u6A19\u65C1\u7684\u6587\u5B57\u3002","\u63A7\u5236\u662F\u5426\u8981\u5728\u63A5\u53D7\u5B8C\u6210\u6642\u8986\u5BEB\u5B57\u7D44\u3002\u8ACB\u6CE8\u610F\uFF0C\u9019\u53D6\u6C7A\u65BC\u52A0\u5165\u6B64\u529F\u80FD\u7684\u5EF6\u4F38\u6A21\u7D44\u3002","\u63A7\u5236\u5C0D\u65BC\u62DA\u932F\u5B57\u662F\u5426\u9032\u884C\u7BE9\u9078\u548C\u6392\u5E8F\u5176\u5EFA\u8B70","\u63A7\u5236\u6392\u5E8F\u662F\u5426\u504F\u597D\u6E38\u6A19\u9644\u8FD1\u7684\u5B57\u7D44\u3002","\u63A7\u5236\u8A18\u9304\u7684\u5EFA\u8B70\u9078\u53D6\u9805\u76EE\u662F\u5426\u5728\u591A\u500B\u5DE5\u4F5C\u5340\u548C\u8996\u7A97\u9593\u5171\u7528 (\u9700\u8981 `#editor.suggestSelection#`)\u3002","\u81EA\u52D5\u89F8\u767C IntelliSense \u6642\u4E00\u5F8B\u9078\u53D6\u5EFA\u8B70\u3002","\u81EA\u52D5\u89F8\u767C IntelliSense \u6642\u6C38\u4E0D\u9078\u53D6\u5EFA\u8B70\u3002","\u53EA\u6709\u5728\u5F9E\u89F8\u767C\u5B57\u5143\u89F8\u767C IntelliSense \u6642\uFF0C\u624D\u9078\u53D6\u5EFA\u8B70\u3002","\u53EA\u6709\u5728\u60A8\u8F38\u5165\u6642\u89F8\u767C IntelliSense \u6642\uFF0C\u624D\u9078\u53D6\u5EFA\u8B70\u3002","\u63A7\u5236\u5C0F\u5DE5\u5177\u986F\u793A\u6642\u662F\u5426\u9078\u53D6\u5EFA\u8B70\u3002\u8ACB\u6CE8\u610F\uFF0C\u9019\u53EA\u9069\u7528\u65BC('#editor.quickSuggestions#' \u548C '#editor.suggestOnTriggerCharacters#') \u81EA\u52D5\u89F8\u767C\u7684\u5EFA\u8B70\uFF0C\u800C\u4E14\u4E00\u5F8B\u6703\u5728\u660E\u78BA\u53EB\u7528\u6642\u9078\u53D6\u5EFA\u8B70\uFF0C\u4F8B\u5982\u900F\u904E 'Ctrl+Space'\u3002","\u63A7\u5236\u6B63\u5728\u4F7F\u7528\u7684\u7A0B\u5F0F\u78BC\u7247\u6BB5\u662F\u5426\u6703\u907F\u514D\u5FEB\u901F\u5EFA\u8B70\u3002","\u63A7\u5236\u8981\u5728\u5EFA\u8B70\u4E2D\u986F\u793A\u6216\u96B1\u85CF\u5716\u793A\u3002","\u63A7\u5236\u5EFA\u8B70\u5C0F\u5DE5\u5177\u5E95\u4E0B\u7684\u72C0\u614B\u5217\u53EF\u898B\u5EA6\u3002","\u63A7\u5236\u662F\u5426\u8981\u5728\u7DE8\u8F2F\u5668\u4E2D\u9810\u89BD\u5EFA\u8B70\u7D50\u679C\u3002","\u63A7\u5236\u5EFA\u8B70\u8A73\u7D30\u8CC7\u6599\u662F\u4EE5\u5167\u5D4C\u65BC\u6A19\u7C64\u7684\u65B9\u5F0F\u986F\u793A\uFF0C\u9084\u662F\u53EA\u5728\u8A73\u7D30\u8CC7\u6599\u5C0F\u5DE5\u5177\u4E2D\u986F\u793A\u3002","\u6B64\u8A2D\u5B9A\u5DF2\u6DD8\u6C70\u3002\u5EFA\u8B70\u5C0F\u5DE5\u5177\u73FE\u53EF\u8ABF\u6574\u5927\u5C0F\u3002","\u6B64\u8A2D\u5B9A\u5DF2\u6DD8\u6C70\uFF0C\u8ACB\u6539\u7528 'editor.suggest.showKeywords' \u6216 'editor.suggest.showSnippets' \u7B49\u55AE\u7368\u8A2D\u5B9A\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u65B9\u6CD5\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u51FD\u5F0F\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u5EFA\u69CB\u51FD\u5F0F\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u5DF2\u53D6\u4EE3\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u7BE9\u9078\u6703\u8981\u6C42\u7B2C\u4E00\u500B\u5B57\u5143\u7B26\u5408\u6587\u5B57\u958B\u982D\uFF0C\u4F8B\u5982 `Console` \u6216 `WebCoNtext` \u4E0A\u7684 `c`\uFF0C\u4F46\u4E0D\u662F `description` \u4E0A\u7684 _not_\u3002\u505C\u7528\u6642\uFF0CIntelliSense \u6703\u986F\u793A\u66F4\u591A\u7D50\u679C\uFF0C\u4F46\u4ECD\u6703\u4F9D\u76F8\u7B26\u54C1\u8CEA\u6392\u5E8F\u7D50\u679C\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u6B04\u4F4D\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u8B8A\u6578\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u985E\u5225\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u7D50\u69CB\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u4ECB\u9762\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u6A21\u7D44\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u5C6C\u6027\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u4E8B\u4EF6\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u904B\u7B97\u5B50\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u55AE\u4F4D\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u503C\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u5E38\u6578\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u5217\u8209\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300CenumMember\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u95DC\u9375\u5B57\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u6587\u5B57\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u8272\u5F69\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u6A94\u6848\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u53C3\u8003\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300Ccustomcolor\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u8CC7\u6599\u593E\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300CtypeParameter\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u986F\u793A\u300C\u7A0B\u5F0F\u78BC\u7247\u6BB5\u300D\u5EFA\u8B70\u3002","\u555F\u7528\u4E4B\u5F8C\uFF0CIntelliSense \u6703\u986F\u793A `user`-suggestions\u3002","\u555F\u7528\u6642\uFF0CIntelliSense \u6703\u986F\u793A `issues`-suggestions\u3002","\u662F\u5426\u61C9\u4E00\u5F8B\u9078\u53D6\u524D\u7F6E\u548C\u5F8C\u7F6E\u7684\u7A7A\u767D\u5B57\u5143\u3002","\u662F\u5426\u61C9\u8A72\u9078\u53D6\u5B50\u8A5E (\u4F8B\u5982 'fooBar' \u6216 'foo_bar' \u4E2D\u7684 'foo')\u3002","\u7121\u7E2E\u6392\u3002\u63DB\u884C\u5F9E\u7B2C 1 \u5217\u958B\u59CB\u3002","\u63DB\u884C\u7684\u7E2E\u6392\u6703\u8207\u7236\u884C\u76F8\u540C\u3002","\u63DB\u884C\u7684\u7E2E\u6392\u70BA\u7236\u884C +1\u3002","\u63DB\u884C\u7E2E\u6392\u70BA\u7236\u884C +2\u3002","\u63A7\u5236\u63DB\u884C\u7684\u7E2E\u6392\u3002","\u63A7\u5236\u60A8\u662F\u5426\u53EF\u4EE5\u6309\u4F4F `shift` \u9375 (\u800C\u975E\u5728\u7DE8\u8F2F\u5668\u4E2D\u958B\u555F\u6A94\u6848)\uFF0C\u5C07\u6A94\u6848\u62D6\u653E\u5230\u6587\u5B57\u7DE8\u8F2F\u5668\u4E2D\u3002","\u63A7\u5236\u5C07\u6A94\u6848\u653E\u5165\u7DE8\u8F2F\u5668\u6642\u662F\u5426\u986F\u793A\u5C0F\u5DE5\u5177\u3002\u6B64\u5C0F\u5DE5\u5177\u53EF\u8B93\u60A8\u63A7\u5236\u6A94\u6848\u7684\u7F6E\u653E\u65B9\u5F0F\u3002","\u5C07\u6A94\u6848\u653E\u5165\u7DE8\u8F2F\u5668\u5F8C\u986F\u793A\u7F6E\u653E\u9078\u53D6\u5668\u5C0F\u5DE5\u5177\u3002","\u6C38\u4E0D\u986F\u793A\u7F6E\u653E\u9078\u53D6\u5668\u5C0F\u5DE5\u5177\u3002\u6539\u70BA\u4E00\u5F8B\u4F7F\u7528\u9810\u8A2D\u7F6E\u653E\u63D0\u4F9B\u8005\u3002","\u63A7\u5236\u662F\u5426\u53EF\u4EE5\u4EE5\u4E0D\u540C\u65B9\u5F0F\u8CBC\u4E0A\u5167\u5BB9\u3002","\u63A7\u5236\u5C07\u5167\u5BB9\u8CBC\u4E0A\u81F3\u7DE8\u8F2F\u5668\u6642\u662F\u5426\u986F\u793A\u5C0F\u5DE5\u5177\u3002\u6B64\u5C0F\u5DE5\u5177\u53EF\u8B93\u60A8\u63A7\u5236\u6A94\u6848\u7684\u8CBC\u4E0A\u65B9\u5F0F\u3002","\u5C07\u5167\u5BB9\u8CBC\u4E0A\u7DE8\u8F2F\u5668\u5F8C\u986F\u793A\u8CBC\u4E0A\u9078\u53D6\u5668\u5C0F\u5DE5\u5177\u3002","\u6C38\u4E0D\u986F\u793A\u8CBC\u4E0A\u9078\u53D6\u5668\u5C0F\u5DE5\u5177\u3002\u800C\u662F\u4E00\u5F8B\u4F7F\u7528\u9810\u8A2D\u7684\u8CBC\u4E0A\u884C\u70BA\u3002","\u63A7\u5236\u662F\u5426\u900F\u904E\u63D0\u4EA4\u5B57\u5143\u63A5\u53D7\u5EFA\u8B70\u3002\u4F8B\u5982\u5728 JavaScript \u4E2D\uFF0C\u5206\u865F (';') \u53EF\u4EE5\u662F\u63A5\u53D7\u5EFA\u8B70\u4E26\u9375\u5165\u8A72\u5B57\u5143\u7684\u63D0\u4EA4\u5B57\u5143\u3002","\u5728\u5EFA\u8B70\u9032\u884C\u6587\u5B57\u8B8A\u66F4\u6642\uFF0C\u50C5\u900F\u904E `Enter` \u63A5\u53D7\u5EFA\u8B70\u3002","\u63A7\u5236\u9664\u4E86 'Tab' \u5916\uFF0C\u662F\u5426\u4E5F\u900F\u904E 'Enter' \u63A5\u53D7\u5EFA\u8B70\u3002\u9019\u6709\u52A9\u65BC\u907F\u514D\u6DF7\u6DC6\u8981\u63D2\u5165\u65B0\u884C\u6216\u63A5\u53D7\u5EFA\u8B70\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u4E2D\u53EF\u4E00\u6B21\u7531\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u8B80\u51FA\u7684\u884C\u6578\u3002\u5075\u6E2C\u5230\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u6642\u6703\u81EA\u52D5\u9810\u8A2D\u70BA 500\u3002\u8B66\u544A: \u82E5\u6578\u5B57\u8D85\u904E\u9810\u8A2D\uFF0C\u53EF\u80FD\u6703\u5C0D\u6548\u80FD\u6709\u6240\u5F71\u97FF\u3002","\u7DE8\u8F2F\u5668\u5167\u5BB9","\u63A7\u5236\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u662F\u5426\u5BA3\u544A\u5167\u5D4C\u5EFA\u8B70\u3002","\u4F7F\u7528\u8A9E\u8A00\u914D\u7F6E\u78BA\u5B9A\u4F55\u6642\u81EA\u52D5\u95DC\u9589\u62EC\u865F\u3002","\u50C5\u7576\u6E38\u6A19\u4F4D\u65BC\u7A7A\u767D\u7684\u5DE6\u5074\u6642\u81EA\u52D5\u95DC\u9589\u62EC\u865F\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5728\u4F7F\u7528\u8005\u65B0\u589E\u5DE6\u62EC\u5F27\u5F8C\uFF0C\u81EA\u52D5\u52A0\u4E0A\u53F3\u62EC\u5F27\u3002","\u4F7F\u7528\u8A9E\u8A00\u914D\u7F6E\u78BA\u5B9A\u4F55\u6642\u81EA\u52D5\u95DC\u9589\u8A3B\u89E3\u3002","\u50C5\u7576\u6E38\u6A19\u4F4D\u65BC\u7A7A\u767D\u7684\u5DE6\u5074\u6642\u81EA\u52D5\u95DC\u9589\u8A3B\u89E3\u3002","\u63A7\u5236\u4F7F\u7528\u8005\u65B0\u589E\u958B\u555F\u7684\u8A3B\u89E3\u4E4B\u5F8C\uFF0C\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u8A72\u81EA\u52D5\u95DC\u9589\u8A3B\u89E3\u3002","\u50C5\u5728\u81EA\u52D5\u63D2\u5165\u76F8\u9130\u7684\u53F3\u5F15\u865F\u6216\u62EC\u5F27\u6642\uFF0C\u624D\u5C07\u5176\u79FB\u9664\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5728\u522A\u9664\u6642\u79FB\u9664\u76F8\u9130\u7684\u53F3\u5F15\u865F\u6216\u62EC\u5F27\u3002","\u50C5\u5728\u81EA\u52D5\u63D2\u5165\u53F3\u5F15\u865F\u6216\u62EC\u865F\u6642\uFF0C\u624D\u5728\u5176\u4E0A\u65B9\u9375\u5165\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5728\u53F3\u5F15\u865F\u6216\u62EC\u865F\u4E0A\u9375\u5165\u3002","\u4F7F\u7528\u8A9E\u8A00\u914D\u7F6E\u78BA\u5B9A\u4F55\u6642\u81EA\u52D5\u95DC\u9589\u5F15\u865F\u3002","\u50C5\u7576\u6E38\u6A19\u4F4D\u65BC\u7A7A\u767D\u7684\u5DE6\u5074\u6642\u81EA\u52D5\u95DC\u9589\u5F15\u865F\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5728\u4F7F\u7528\u8005\u65B0\u589E\u958B\u59CB\u5F15\u865F\u5F8C\uFF0C\u81EA\u52D5\u52A0\u4E0A\u95DC\u9589\u5F15\u865F\u3002","\u7DE8\u8F2F\u5668\u4E0D\u6703\u81EA\u52D5\u63D2\u5165\u7E2E\u6392\u3002","\u7DE8\u8F2F\u5668\u6703\u4FDD\u7559\u76EE\u524D\u884C\u7684\u7E2E\u6392\u3002","\u7DE8\u8F2F\u5668\u6703\u4FDD\u7559\u76EE\u524D\u884C\u7684\u7E2E\u6392\u4E26\u63A5\u53D7\u8A9E\u8A00\u5B9A\u7FA9\u7684\u62EC\u865F\u3002","\u7DE8\u8F2F\u5668\u6703\u76EE\u524D\u884C\u7684\u7E2E\u6392\u3001\u63A5\u53D7\u8A9E\u8A00\u5B9A\u7FA9\u7684\u62EC\u865F\u4E26\u53EB\u7528\u8A9E\u8A00\u5B9A\u7FA9\u7684\u7279\u6B8A onEnterRules\u3002","\u7DE8\u8F2F\u5668\u6703\u4FDD\u7559\u76EE\u524D\u884C\u7684\u7E2E\u6392\u3001\u63A5\u53D7\u8A9E\u8A00\u5B9A\u7FA9\u7684\u62EC\u865F\u4E26\u53EB\u7528\u8A9E\u8A00\u5B9A\u7FA9\u7684\u7279\u6B8A onEnterRules \u4E26\u63A5\u53D7\u8A9E\u8A00\u5B9A\u7FA9\u7684 indentationRules\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5728\u4F7F\u7528\u8005\u9375\u5165\u3001\u8CBC\u4E0A\u3001\u79FB\u52D5\u6216\u7E2E\u6392\u884C\u6642\u81EA\u52D5\u8ABF\u6574\u7E2E\u6392\u3002","\u4F7F\u7528\u8A9E\u8A00\u7D44\u614B\u4F86\u6C7A\u5B9A\u4F55\u6642\u81EA\u52D5\u74B0\u7E5E\u9078\u53D6\u9805\u76EE\u3002","\u7528\u5F15\u865F\u62EC\u4F4F\uFF0C\u800C\u975E\u4F7F\u7528\u62EC\u5F27\u3002","\u7528\u62EC\u5F27\u62EC\u4F4F\uFF0C\u800C\u975E\u4F7F\u7528\u5F15\u865F\u3002 ","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5728\u9375\u5165\u5F15\u865F\u6216\u62EC\u5F27\u6642\u81EA\u52D5\u5305\u570D\u9078\u53D6\u7BC4\u570D\u3002","\u7576\u4F7F\u7528\u7A7A\u683C\u9032\u884C\u7E2E\u6392\u6642\uFF0C\u6703\u6A21\u64EC\u5B9A\u4F4D\u5B57\u5143\u7684\u9078\u53D6\u8868\u73FE\u65B9\u5F0F\u3002\u9078\u53D6\u7BC4\u570D\u6703\u4F9D\u5FAA\u5B9A\u4F4D\u505C\u99D0\u9EDE\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u986F\u793A codelens\u3002","\u63A7\u5236 CodeLens \u7684\u5B57\u578B\u5BB6\u65CF\u3002","\u63A7\u5236 CodeLens \u7684\u5B57\u578B\u5927\u5C0F (\u50CF\u7D20)\u3002\u8A2D\u5B9A\u70BA 0 \u6642\uFF0C\u6703\u4F7F\u7528 90% \u7684 `#editor.fontSize#`\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u8F49\u8B6F\u5167\u5D4C\u8272\u5F69\u88DD\u98FE\u9805\u76EE\u8207\u8272\u5F69\u9078\u64C7\u5668\u3002","\u8B93\u8272\u5F69\u9078\u64C7\u5668\u5728\u6309\u4E00\u4E0B\u548C\u505C\u99D0\u8272\u5F69\u5728\u88DD\u98FE\u9805\u76EE\u4E0A\u6642\u51FA\u73FE","\u8B93\u8272\u5F69\u9078\u64C7\u5668\u5728\u505C\u99D0\u8272\u5F69\u88DD\u98FE\u9805\u76EE\u6642\u51FA\u73FE","\u8B93\u8272\u5F69\u9078\u64C7\u5668\u5728\u6309\u4E00\u4E0B\u8272\u5F69\u88DD\u98FE\u9805\u76EE\u6642\u51FA\u73FE","\u63A7\u5236\u689D\u4EF6\uFF0C\u8B93\u8272\u5F69\u9078\u64C7\u5668\u5F9E\u8272\u5F69\u88DD\u98FE\u9805\u76EE\u51FA\u73FE","\u63A7\u5236\u4E00\u6B21\u53EF\u5728\u7DE8\u8F2F\u5668\u4E2D\u5448\u73FE\u7684\u8272\u5F69\u88DD\u98FE\u9805\u76EE\u6700\u5927\u6578\u76EE\u3002","\u555F\u7528\u5373\u53EF\u4EE5\u6ED1\u9F20\u8207\u6309\u9375\u9078\u53D6\u9032\u884C\u8CC7\u6599\u884C\u9078\u53D6\u3002","\u63A7\u5236\u8A9E\u6CD5\u9192\u76EE\u63D0\u793A\u662F\u5426\u61C9\u8907\u88FD\u5230\u526A\u8CBC\u7C3F\u3002","\u63A7\u5236\u8CC7\u6599\u6307\u6A19\u52D5\u756B\u6A23\u5F0F\u3002","\u5E73\u6ED1\u63D2\u5165\u865F\u52D5\u756B\u5DF2\u505C\u7528\u3002","\u53EA\u6709\u7576\u4F7F\u7528\u8005\u4F7F\u7528\u660E\u78BA\u624B\u52E2\u79FB\u52D5\u6E38\u6A19\u6642\uFF0C\u624D\u6703\u555F\u7528\u5E73\u6ED1\u63D2\u5165\u865F\u52D5\u756B\u3002","\u6C38\u9060\u555F\u7528\u5E73\u6ED1\u63D2\u5165\u865F\u52D5\u756B\u3002","\u63A7\u5236\u662F\u5426\u61C9\u555F\u7528\u5E73\u6ED1\u63D2\u5165\u9EDE\u52D5\u756B\u3002 ","\u63A7\u5236\u8CC7\u6599\u6307\u6A19\u6A23\u5F0F\u3002","\u63A7\u5236\u6E38\u6A19\u4E0A\u4E0B\u5468\u570D\u53EF\u986F\u793A\u7684\u524D\u7F6E\u7DDA (\u6700\u5C0F\u70BA 0) \u548C\u5F8C\u7F6E\u7DDA (\u6700\u5C0F\u70BA 1) \u7684\u6700\u5C0F\u6578\u76EE\u3002\u5728\u67D0\u4E9B\u7DE8\u8F2F\u5668\u4E2D\u7A31\u70BA 'scrollOff' \u6216 'scrollOffset'\u3002","\u53EA\u6709\u901A\u904E\u9375\u76E4\u6216 API \u89F8\u767C\u6642\uFF0C\u624D\u6703\u65BD\u884C `cursorSurroundingLines`\u3002","\u4E00\u5F8B\u5F37\u5236\u57F7\u884C `cursorSurroundingLines`","\u63A7\u5236\u61C9\u5F37\u5236\u57F7\u884C `#cursorSurroundingLines#` \u7684\u6642\u6A5F\u3002","\u63A7\u5236\u6E38\u6A19\u5BEC\u5EA6\uFF0C\u7576 `#editor.cursorStyle#` \u8A2D\u5B9A\u70BA `line` \u6642\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u5141\u8A31\u900F\u904E\u62D6\u653E\u4F86\u79FB\u52D5\u9078\u53D6\u9805\u76EE\u3002","\u4F7F\u7528\u65B0\u7684 svg \u8F49\u8B6F\u65B9\u6CD5\u3002","\u4F7F\u7528\u5177\u6709\u5B57\u578B\u5B57\u5143\u7684\u65B0\u8F49\u8B6F\u65B9\u6CD5\u3002","\u4F7F\u7528\u7A69\u5B9A\u8F49\u8B6F\u65B9\u6CD5\u3002","\u63A7\u5236\u662F\u5426\u4F7F\u7528\u65B0\u7684\u5BE6\u9A57\u6027\u65B9\u6CD5\u4F86\u5448\u73FE\u7A7A\u767D\u5B57\u5143\u3002","\u6309\u4E0B `Alt` \u6642\u7684\u6372\u52D5\u901F\u5EA6\u4E58\u6578\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u555F\u7528\u7A0B\u5F0F\u78BC\u647A\u758A\u529F\u80FD\u3002","\u4F7F\u7528\u8A9E\u8A00\u7279\u5B9A\u647A\u758A\u7B56\u7565 (\u5982\u679C\u53EF\u7528)\uFF0C\u5426\u5247\u4F7F\u7528\u7E2E\u6392\u5F0F\u7B56\u7565\u3002","\u4F7F\u7528\u7E2E\u6392\u5F0F\u647A\u758A\u7B56\u7565\u3002","\u63A7\u5236\u8A08\u7B97\u8CC7\u6599\u593E\u7BC4\u570D\u7684\u7B56\u7565\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5C07\u6298\u758A\u7684\u7BC4\u570D\u9192\u76EE\u63D0\u793A\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u6703\u81EA\u52D5\u647A\u758A\u532F\u5165\u7BC4\u570D\u3002","\u53EF\u647A\u758A\u5340\u57DF\u7684\u6578\u76EE\u4E0A\u9650\u3002\u589E\u52A0\u6B64\u503C\u53EF\u80FD\u6703\u9020\u6210\u7576\u76EE\u524D\u7684\u4F86\u6E90\u6709\u5927\u91CF\u53EF\u647A\u758A\u5340\u57DF\u6642\uFF0C\u7DE8\u8F2F\u5668\u7684\u56DE\u61C9\u901F\u5EA6\u8B8A\u6162\u3002","\u63A7\u5236\u6309\u4E00\u4E0B\u5DF2\u6298\u758A\u884C\u5F8C\u65B9\u7684\u7A7A\u767D\u5167\u5BB9\u662F\u5426\u6703\u5C55\u958B\u884C\u3002","\u63A7\u5236\u5B57\u578B\u5BB6\u65CF\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u81EA\u52D5\u70BA\u8CBC\u4E0A\u7684\u5167\u5BB9\u8A2D\u5B9A\u683C\u5F0F\u3002\u5FC5\u9808\u6709\u53EF\u7528\u7684\u683C\u5F0F\u5668\uFF0C\u800C\u4E14\u683C\u5F0F\u5668\u61C9\u80FD\u5920\u70BA\u6587\u4EF6\u4E2D\u7684\u4E00\u500B\u7BC4\u570D\u8A2D\u5B9A\u683C\u5F0F\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u81EA\u52D5\u5728\u9375\u5165\u5F8C\u8A2D\u5B9A\u884C\u7684\u683C\u5F0F\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u8F49\u8B6F\u5782\u76F4\u5B57\u7B26\u908A\u754C\u3002\u5B57\u7B26\u908A\u754C\u6700\u5E38\u7528\u4F86\u9032\u884C\u5075\u932F\u3002","\u63A7\u5236\u6E38\u6A19\u662F\u5426\u61C9\u96B1\u85CF\u5728\u6982\u89C0\u5C3A\u898F\u4E2D\u3002","\u63A7\u5236\u5B57\u6BCD\u9593\u8DDD (\u50CF\u7D20)\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u5DF2\u555F\u7528\u9023\u7D50\u7DE8\u8F2F\u3002\u76F8\u95DC\u7B26\u865F (\u4F8B\u5982 HTML \u6A19\u7C64) \u6703\u6839\u64DA\u8A9E\u8A00\u5728\u7DE8\u8F2F\u6642\u66F4\u65B0\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u5075\u6E2C\u9023\u7D50\u4E26\u4F7F\u5176\u53EF\u4F9B\u9EDE\u9078\u3002","\u5C07\u7B26\u5408\u7684\u62EC\u865F\u9192\u76EE\u63D0\u793A\u3002","\u8981\u7528\u65BC\u6ED1\u9F20\u6EFE\u8F2A\u6372\u52D5\u4E8B\u4EF6 `deltaX` \u548C `deltaY` \u7684\u4E58\u6578\u3002","\u4F7F\u7528\u6ED1\u9F20\u6EFE\u8F2A\u4E26\u6309\u4F4F `Ctrl` \u6642\uFF0C\u7E2E\u653E\u7DE8\u8F2F\u5668\u7684\u5B57\u578B","\u5728\u591A\u500B\u6E38\u6A19\u91CD\u758A\u6642\u5C07\u5176\u5408\u4F75\u3002","\u5C0D\u61C9Windows\u548CLinux\u7684'Control'\u8207\u5C0D\u61C9 macOS \u7684'Command'\u3002","\u5C0D\u61C9Windows\u548CLinux\u7684'Alt'\u8207\u5C0D\u61C9macOS\u7684'Option'\u3002","\u7528\u65BC\u5728\u6ED1\u9F20\u65B0\u589E\u591A\u500B\u6E38\u6A19\u7684\u4FEE\u98FE\u5143\u3002[\u79FB\u81F3\u5B9A\u7FA9] \u548C [\u958B\u555F\u9023\u7D50] \u6ED1\u9F20\u624B\u52E2\u6703\u52A0\u4EE5\u9069\u61C9\uFF0C\u4EE5\u907F\u514D\u8207 [\u591A\u500B\u6E38\u6A19\u7684\u4FEE\u98FE\u5143](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier) \u76F8\u885D\u7A81\u3002","\u6BCF\u500B\u6E38\u6A19\u90FD\u6703\u8CBC\u4E0A\u4E00\u884C\u6587\u5B57\u3002","\u6BCF\u500B\u6E38\u6A19\u90FD\u6703\u8CBC\u4E0A\u5168\u6587\u3002","\u7576\u5DF2\u8CBC\u4E0A\u6587\u5B57\u7684\u884C\u6578\u8207\u6E38\u6A19\u6578\u76F8\u7B26\u6642\u63A7\u5236\u8CBC\u4E0A\u529F\u80FD\u3002","\u63A7\u5236\u4E00\u6B21\u53EF\u5728\u4F5C\u7528\u4E2D\u7DE8\u8F2F\u5668\u4E2D\u7684\u6E38\u6A19\u6578\u76EE\u4E0A\u9650\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u9192\u76EE\u986F\u793A\u51FA\u73FE\u7684\u8A9E\u610F\u7B26\u865F\u3002","\u63A7\u5236\u662F\u5426\u61C9\u5728\u6982\u89C0\u5C3A\u898F\u5468\u570D\u7E6A\u88FD\u6846\u7DDA\u3002","\u958B\u555F\u9810\u89BD\u6642\u7126\u9EDE\u6A39\u72C0","\u958B\u555F\u6642\u805A\u7126\u7DE8\u8F2F\u5668","\u63A7\u5236\u8981\u805A\u7126\u5167\u5D4C\u7DE8\u8F2F\u5668\u6216\u9810\u89BD\u5C0F\u5DE5\u5177\u4E2D\u7684\u6A39\u7CFB\u3002","\u63A7\u5236\u300C\u524D\u5F80\u5B9A\u7FA9\u300D\u6ED1\u9F20\u624B\u52E2\uFF0C\u662F\u5426\u4E00\u5F8B\u958B\u555F\u7784\u6838\u5C0F\u5DE5\u5177\u3002","\u63A7\u5236\u5728\u5FEB\u901F\u5EFA\u8B70\u986F\u793A\u5F8C\u7684\u5EF6\u9072 (\u4EE5\u6BEB\u79D2\u70BA\u55AE\u4F4D)\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u6703\u81EA\u52D5\u4F9D\u985E\u578B\u91CD\u65B0\u547D\u540D\u3002","\u5DF2\u6DD8\u6C70\uFF0C\u8ACB\u6539\u7528 `editor.linkedEditing`\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u986F\u793A\u63A7\u5236\u5B57\u5143\u3002","\u5728\u6A94\u6848\u7D50\u5C3E\u70BA\u65B0\u884C\u6642\uFF0C\u5448\u73FE\u6700\u5F8C\u4E00\u884C\u7684\u865F\u78BC\u3002","\u9192\u76EE\u63D0\u793A\u88DD\u8A02\u908A\u548C\u76EE\u524D\u7684\u884C\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u5982\u4F55\u986F\u793A\u76EE\u524D\u884C\u7684\u9192\u76EE\u63D0\u793A\u3002","\u63A7\u5236\u7576\u805A\u7126\u65BC\u7DE8\u8F2F\u5668\u6642\uFF0C\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u50C5\u8F49\u8B6F\u76EE\u524D\u884C\u7684\u9192\u76EE\u63D0\u793A\u3002","\u8F49\u8B6F\u7A7A\u767D\u5B57\u5143\uFF0C\u4F46\u6587\u5B57\u4E4B\u9593\u7684\u55AE\u4E00\u7A7A\u683C\u9664\u5916\u3002","\u53EA\u8F49\u8B6F\u6240\u9078\u6587\u5B57\u7684\u7A7A\u767D\u5B57\u5143\u3002","\u53EA\u8F49\u8B6F\u7D50\u5C3E\u7A7A\u767D\u5B57\u5143\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u61C9\u5982\u4F55\u8F49\u8B6F\u7A7A\u767D\u5B57\u5143\u3002","\u63A7\u5236\u9078\u53D6\u7BC4\u570D\u662F\u5426\u6709\u5713\u89D2","\u63A7\u5236\u7DE8\u8F2F\u5668\u6C34\u5E73\u6372\u52D5\u7684\u984D\u5916\u5B57\u5143\u6578\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u6372\u52D5\u5230\u6700\u5F8C\u4E00\u884C\u4E4B\u5916\u3002","\u540C\u6642\u9032\u884C\u5782\u76F4\u8207\u6C34\u5E73\u6372\u52D5\u6642\uFF0C\u50C5\u6CBF\u4E3B\u8EF8\u6372\u52D5\u3002\u907F\u514D\u5728\u8ECC\u8DE1\u677F\u4E0A\u9032\u884C\u5782\u76F4\u6372\u52D5\u6642\u767C\u751F\u6C34\u5E73\u6F02\u79FB\u3002","\u63A7\u5236\u662F\u5426\u652F\u63F4 Linux \u4E3B\u8981\u526A\u8CBC\u7C3F\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u61C9\u9192\u76EE\u63D0\u793A\u8207\u9078\u53D6\u9805\u76EE\u985E\u4F3C\u7684\u76F8\u7B26\u9805\u76EE\u3002","\u4E00\u5F8B\u986F\u793A\u647A\u758A\u63A7\u5236\u9805\u3002","\u6C38\u4E0D\u986F\u793A\u647A\u758A\u63A7\u5236\u9805\u8207\u6E1B\u5C11\u88DD\u8A02\u908A\u5927\u5C0F\u3002","\u50C5\u7576\u6ED1\u9F20\u61F8\u505C\u5728\u6D3B\u52D5\u5217\u4E0A\u6642\uFF0C\u624D\u986F\u793A\u6298\u758A\u529F\u80FD\u3002","\u63A7\u5236\u647A\u758A\u63A7\u5236\u9805\u5728\u88DD\u8A02\u908A\u4E0A\u7684\u986F\u793A\u6642\u6A5F\u3002","\u63A7\u5236\u672A\u4F7F\u7528\u7A0B\u5F0F\u78BC\u7684\u6DE1\u51FA\u3002","\u63A7\u5236\u5DF2\u522A\u9664\u7684\u6DD8\u6C70\u8B8A\u6578\u3002","\u5C07\u7A0B\u5F0F\u78BC\u7247\u6BB5\u5EFA\u8B70\u986F\u793A\u65BC\u5176\u4ED6\u5EFA\u8B70\u7684\u9802\u7AEF\u3002","\u5C07\u7A0B\u5F0F\u78BC\u7247\u6BB5\u5EFA\u8B70\u986F\u793A\u65BC\u5176\u4ED6\u5EFA\u8B70\u7684\u4E0B\u65B9\u3002","\u5C07\u7A0B\u5F0F\u78BC\u7247\u6BB5\u5EFA\u8B70\u8207\u5176\u4ED6\u5EFA\u8B70\u4E00\u540C\u986F\u793A\u3002","\u4E0D\u986F\u793A\u7A0B\u5F0F\u78BC\u7247\u6BB5\u5EFA\u8B70\u3002","\u63A7\u5236\u7A0B\u5F0F\u78BC\u7247\u6BB5\u662F\u5426\u96A8\u5176\u4ED6\u5EFA\u8B70\u986F\u793A\uFF0C\u4EE5\u53CA\u5176\u6392\u5E8F\u65B9\u5F0F\u3002","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u6703\u4F7F\u7528\u52D5\u756B\u6372\u52D5","\u63A7\u5236\u7576\u986F\u793A\u5167\u5D4C\u5B8C\u6210\u6642\uFF0C\u662F\u5426\u61C9\u63D0\u4F9B\u5354\u52A9\u5DE5\u5177\u63D0\u793A\u7D66\u87A2\u5E55\u52A9\u8B80\u7A0B\u5F0F\u4F7F\u7528\u8005\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u7684\u5B57\u578B\u5927\u5C0F\u3002\u7576\u8A2D\u5B9A\u70BA {0} \u6642\uFF0C\u5247\u6703\u4F7F\u7528 {1} \u7684\u503C\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u7684\u884C\u9AD8\u3002\u7576\u8A2D\u5B9A\u70BA {0} \u6642\uFF0C\u5247\u6703\u4F7F\u7528 {1} \u7684\u503C\u3002\u6700\u5C0F\u503C\u70BA 8\u3002","\u63A7\u5236\u5EFA\u8B70\u662F\u5426\u61C9\u5728\u9375\u5165\u89F8\u767C\u5B57\u5143\u6642\u81EA\u52D5\u986F\u793A\u3002","\u4E00\u5F8B\u9078\u53D6\u7B2C\u4E00\u500B\u5EFA\u8B70\u3002","\u9664\u975E\u9032\u4E00\u6B65\u9375\u5165\u9078\u53D6\u4E86\u5EFA\u8B70\uFF0C\u5426\u5247\u9078\u53D6\u6700\u8FD1\u7684\u5EFA\u8B70\uFF0C\u4F8B\u5982 `console.| -> console.log`\uFF0C\u539F\u56E0\u662F\u6700\u8FD1\u5B8C\u6210\u4E86 `log`\u3002","\u6839\u64DA\u5148\u524D\u5DF2\u5B8C\u6210\u8A72\u5EFA\u8B70\u7684\u524D\u7F6E\u8A5E\u9078\u53D6\u5EFA\u8B70\uFF0C\u4F8B\u5982 `co -> console` \u548C `con -> const`\u3002","\u63A7\u5236\u5728\u986F\u793A\u5EFA\u8B70\u6E05\u55AE\u6642\u5982\u4F55\u9810\u5148\u9078\u53D6\u5EFA\u8B70\u3002","\u6309 Tab \u6642\uFF0CTab \u5B8C\u6210\u6703\u63D2\u5165\u6700\u7B26\u5408\u7684\u5EFA\u8B70\u3002","\u505C\u7528 tab \u9375\u81EA\u52D5\u5B8C\u6210\u3002","\u5728\u7A0B\u5F0F\u78BC\u7247\u6BB5\u7684\u9996\u78BC\u76F8\u7B26\u6642\u4F7F\u7528 Tab \u5B8C\u6210\u3002\u672A\u555F\u7528 'quickSuggestions' \u6642\u6548\u679C\u6700\u4F73\u3002","\u555F\u7528 tab \u9375\u81EA\u52D5\u5B8C\u6210\u3002","\u81EA\u52D5\u79FB\u9664\u7570\u5E38\u7684\u884C\u7D50\u675F\u5B57\u5143\u3002","\u5FFD\u7565\u7570\u5E38\u7684\u884C\u7D50\u675F\u5B57\u5143\u3002","\u8981\u79FB\u9664\u4E4B\u7570\u5E38\u7684\u884C\u7D50\u675F\u5B57\u5143\u63D0\u793A\u3002","\u79FB\u9664\u53EF\u80FD\u5C0E\u81F4\u554F\u984C\u7684\u7570\u5E38\u884C\u7D50\u675F\u5B57\u5143\u3002","\u63D2\u5165\u548C\u522A\u9664\u63A5\u5728\u5B9A\u4F4D\u505C\u99D0\u9EDE\u5F8C\u7684\u7A7A\u767D\u5B57\u5143\u3002","\u4F7F\u7528\u9810\u8A2D\u7684\u5206\u884C\u7B26\u865F\u898F\u5247\u3002","\u4E2D\u6587/\u65E5\u6587/\u97D3\u6587 (CJK) \u6587\u5B57\u4E0D\u61C9\u8A72\u4F7F\u7528\u65B7\u5B57\u3002\u975E\u4E2D\u65E5\u97D3\u7684\u6587\u5B57\u884C\u70BA\u8207\u4E00\u822C\u6587\u5B57\u76F8\u540C\u3002","\u63A7\u5236\u7528\u65BC\u4E2D\u6587/\u65E5\u6587/\u97D3\u6587 (CJK) \u6587\u5B57\u7684\u65B7\u5B57\u898F\u5247\u3002","\u5728\u57F7\u884C\u6587\u5B57\u76F8\u95DC\u5C0E\u89BD\u6216\u4F5C\u696D\u6642\u8981\u7528\u4F5C\u6587\u5B57\u5206\u9694\u7B26\u865F\u7684\u5B57\u5143","\u4E00\u5F8B\u4E0D\u63DB\u884C\u3002","\u4F9D\u6AA2\u8996\u5340\u5BEC\u5EA6\u63DB\u884C\u3002","\u65BC '#editor.wordWrapColumn#' \u63DB\u884C\u3002","\u7576\u6AA2\u8996\u5340\u7E2E\u81F3\u6700\u5C0F\u4E26\u8A2D\u5B9A '#editor.wordWrapColumn#' \u6642\u63DB\u884C\u3002","\u63A7\u5236\u5982\u4F55\u63DB\u884C\u3002","\u7576 `#editor.wordWrap#` \u70BA `wordWrapColumn` \u6216 `bounded` \u6642\uFF0C\u63A7\u5236\u7DE8\u8F2F\u5668\u4E2D\u7684\u8CC7\u6599\u884C\u63DB\u884C\u3002","\u63A7\u5236\u662F\u5426\u61C9\u4F7F\u7528\u9810\u8A2D\u7684\u6587\u4EF6\u8272\u5F69\u63D0\u4F9B\u8005\u986F\u793A\u5167\u5D4C\u8272\u5F69\u88DD\u98FE","\u63A7\u5236\u7DE8\u8F2F\u5668\u662F\u5426\u63A5\u6536\u7D22\u5F15\u6A19\u7C64\uFF0C\u6216\u5C07\u5176\u5EF6\u9072\u81F3\u5DE5\u4F5C\u53F0\u9032\u884C\u6D41\u89BD\u3002"],"vs/editor/common/core/editorColorRegistry":["\u76EE\u524D\u6E38\u6A19\u4F4D\u7F6E\u884C\u7684\u53CD\u767D\u986F\u793A\u80CC\u666F\u8272\u5F69\u3002","\u76EE\u524D\u6E38\u6A19\u4F4D\u7F6E\u884C\u4E4B\u5468\u570D\u6846\u7DDA\u7684\u80CC\u666F\u8272\u5F69\u3002","\u9192\u76EE\u63D0\u793A\u7BC4\u570D\u7684\u80CC\u666F\u8272\u5F69\uFF0C\u4F8B\u5982\u5FEB\u901F\u958B\u555F\u4E26\u5C0B\u627E\u529F\u80FD\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u53CD\u767D\u986F\u793A\u7BC4\u570D\u5468\u570D\u908A\u6846\u7684\u80CC\u666F\u984F\u8272\u3002","\u9192\u76EE\u63D0\u793A\u7B26\u865F\u7684\u80CC\u666F\u8272\u5F69\uFF0C\u76F8\u4F3C\u65BC\u524D\u5F80\u4E0B\u4E00\u500B\u5B9A\u7FA9\u6216\u524D\u5F80\u4E0B\u4E00\u500B/\u4E0A\u4E00\u500B\u7B26\u865F\u3002\u8272\u5F69\u5FC5\u9808\u900F\u660E\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u9192\u76EE\u63D0\u793A\u5468\u570D\u7684\u908A\u754C\u80CC\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u6E38\u6A19\u7684\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u6E38\u6A19\u7684\u80CC\u666F\u8272\u5F69\u3002\u5141\u8A31\u81EA\u8A02\u5340\u584A\u6E38\u6A19\u91CD\u758A\u7684\u5B57\u5143\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u4E2D\u7A7A\u767D\u5B57\u5143\u7684\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u884C\u865F\u7684\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69\u3002","'editorIndentGuide.background' \u5DF2\u88AB\u53D6\u4EE3\u3002\u8ACB\u6539\u7528 'editorIndentGuide.background1'\u3002","\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69\u3002","'editorIndentGuide.activeBackground' \u5DF2\u88AB\u53D6\u4EE3\u3002\u8ACB\u6539\u7528 'editorIndentGuide.activeBackground1'\u3002","\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (1)\u3002","\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (2)\u3002","\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (3)\u3002","\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (4)\u3002","\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (5)\u3002","\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (6)\u3002","\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (1)\u3002","\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (2)\u3002","\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (3)\u3002","\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (4)\u3002","\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (5)\u3002","\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u8272\u5F69 (6)\u3002","\u7DE8\u8F2F\u5668\u4F7F\u7528\u4E2D\u884C\u865F\u7684\u8272\u5F69","Id \u5DF2\u53D6\u4EE3\u3002\u8ACB\u6539\u7528 'editorLineNumber.activeForeground' \u3002","\u7DE8\u8F2F\u5668\u4F7F\u7528\u4E2D\u884C\u865F\u7684\u8272\u5F69","editor.renderFinalNewline \u8A2D\u5B9A\u70BA\u6697\u7070\u8272\u6642\uFF0C\u6700\u7D42\u7DE8\u8F2F\u5668\u7DDA\u689D\u7684\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u5C3A\u898F\u7684\u8272\u5F69","\u7DE8\u8F2F\u5668\u7A0B\u5F0F\u78BC\u6FFE\u93E1\u7684\u524D\u666F\u8272\u5F69","\u6210\u5C0D\u62EC\u865F\u80CC\u666F\u8272\u5F69","\u6210\u5C0D\u62EC\u865F\u908A\u6846\u8272\u5F69","\u9810\u89BD\u6AA2\u8996\u7DE8\u8F2F\u5668\u5C3A\u898F\u7684\u908A\u6846\u8272\u5F69.","\u7DE8\u8F2F\u5668\u6982\u89C0\u5C3A\u898F\u7684\u80CC\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u908A\u6846\u7684\u80CC\u666F\u984F\u8272,\u5305\u542B\u884C\u865F\u8207\u5B57\u5F62\u5716\u793A\u7684\u908A\u6846.","\u7DE8\u8F2F\u5668\u4E2D\u4E0D\u5FC5\u8981 (\u672A\u4F7F\u7528) \u539F\u59CB\u7A0B\u5F0F\u78BC\u7684\u6846\u7DDA\u8272\u5F69\u3002",`\u7DE8\u8F2F\u5668\u4E2D\u4E0D\u5FC5\u8981 (\u672A\u4F7F\u7528) \u539F\u59CB\u7A0B\u5F0F\u78BC\u7684\u4E0D\u900F\u660E\u5EA6\u3002\u4F8B\u5982 "#000000c0\u201D \u6703\u4EE5 75% \u7684\u4E0D\u900F\u660E\u5EA6\u8F49\u8B6F\u7A0B\u5F0F\u78BC\u3002\u91DD\u5C0D\u9AD8\u5C0D\u6BD4\u4E3B\u984C\uFF0C\u4F7F\u7528 'editorUnnecessaryCode.border' \u4E3B\u984C\u8272\u5F69\u53EF\u70BA\u4E0D\u5FC5\u8981\u7684\u7A0B\u5F0F\u78BC\u52A0\u4E0A\u5E95\u7DDA\uFF0C\u800C\u4E0D\u662F\u5C07\u5176\u8B8A\u6DE1\u3002`,"\u7DE8\u8F2F\u5668\u4E2D\u6D6E\u6C34\u5370\u6587\u5B57\u7684\u908A\u6846\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u4E2D\u6D6E\u6C34\u5370\u6587\u5B57\u7684\u524D\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u4E2D\u6D6E\u6C34\u5370\u6587\u5B57\u7684\u80CC\u666F\u8272\u5F69\u3002","\u7BC4\u570D\u9192\u76EE\u63D0\u793A\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u932F\u8AA4\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002","\u8B66\u793A\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002","\u8CC7\u8A0A\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002","\u62EC\u5F27 (1) \u7684\u524D\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u8457\u8272\u3002","\u62EC\u5F27 (2) \u7684\u524D\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u8457\u8272\u3002","\u62EC\u5F27 (3) \u7684\u524D\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u8457\u8272\u3002","\u62EC\u5F27 (4) \u7684\u524D\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u8457\u8272\u3002","\u62EC\u5F27 (5) \u7684\u524D\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u8457\u8272\u3002","\u62EC\u5F27 (6) \u7684\u524D\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u6210\u5C0D\u65B9\u62EC\u5F27\u8457\u8272\u3002","\u672A\u9810\u671F\u62EC\u5F27\u7684\u524D\u666F\u8272\u5F69\u3002","\u975E\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (1) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u975E\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (2) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u975E\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (3) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u975E\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (4) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u975E\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (5) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u975E\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (6) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (1) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (2) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (3) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (4) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (5) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u4F7F\u7528\u4E2D\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA (6) \u7684\u80CC\u666F\u8272\u5F69\u3002\u9700\u8981\u555F\u7528\u62EC\u5F27\u914D\u5C0D\u8F14\u52A9\u7DDA\u3002","\u7528\u4F86\u9192\u76EE\u63D0\u793A Unicode \u5B57\u5143\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u7528\u4F86\u9192\u76EE\u63D0\u793A Unicode \u5B57\u5143\u7684\u80CC\u666F\u8272\u5F69\u3002"],"vs/editor/common/editorContextKeys":["\u7DE8\u8F2F\u5668\u6587\u5B57\u662F\u5426\u6709\u7126\u9EDE (\u6E38\u6A19\u9583\u720D)","\u7DE8\u8F2F\u5668\u6216\u7DE8\u8F2F\u5668\u5C0F\u5DE5\u5177\u662F\u5426\u6709\u7126\u9EDE (\u4F8B\u5982\u7126\u9EDE\u4F4D\u65BC [\u5C0B\u627E] \u5C0F\u5DE5\u5177\u4E2D)","\u7DE8\u8F2F\u5668\u6216 RTF \u8F38\u5165\u662F\u5426\u6709\u7126\u9EDE (\u6E38\u6A19\u9583\u720D)","\u7DE8\u8F2F\u5668\u662F\u5426\u70BA\u552F\u8B80","\u5167\u5BB9\u662F\u5426\u70BA Diff \u7DE8\u8F2F\u5668","\u5167\u5BB9\u662F\u5426\u70BA\u5167\u5D4C Diff \u7DE8\u8F2F\u5668","\u662F\u5426\u9078\u53D6\u79FB\u52D5\u7684\u7A0B\u5F0F\u78BC\u5340\u584A\u9032\u884C\u6BD4\u8F03","\u662F\u5426\u986F\u793A\u6613\u5B58\u53D6\u5DEE\u7570\u6AA2\u8996\u5668","\u662F\u5426\u5DF2\u9054\u5230\u5DEE\u7570\u7DE8\u8F2F\u5668\u4E26\u6392\u5448\u73FE\u5167\u5D4C\u4E2D\u65B7\u9EDE","'editor.columnSelection' \u662F\u5426\u5DF2\u555F\u7528","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u9078\u53D6\u6587\u5B57","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u591A\u500B\u9078\u53D6\u9805\u76EE","'Tab' \u662F\u5426\u6703\u5C07\u7126\u9EDE\u79FB\u51FA\u7DE8\u8F2F\u5668","\u7DE8\u8F2F\u5668\u66AB\u7559\u662F\u5426\u986F\u793A","\u7DE8\u8F2F\u5668\u66AB\u7559\u662F\u5426\u805A\u7126","\u81EA\u9ECF\u6372\u52D5\u662F\u5426\u805A\u7126","\u81EA\u9ECF\u6372\u52D5\u662F\u5426\u986F\u793A","\u662F\u5426\u986F\u793A\u7368\u7ACB\u7684\u984F\u8272\u9078\u64C7\u5668","\u7368\u7ACB\u7684\u984F\u8272\u9078\u64C7\u5668\u662F\u5426\u805A\u7126","\u7DE8\u8F2F\u5668\u662F\u5426\u70BA\u8F03\u5927\u7DE8\u8F2F\u5668\u7684\u4E00\u90E8\u5206 (\u4F8B\u5982\u7B46\u8A18\u672C)","\u7DE8\u8F2F\u5668\u7684\u8A9E\u8A00\u8B58\u5225\u78BC","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u5B8C\u6210\u9805\u76EE\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709 CodeLens \u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u5B9A\u7FA9\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u5BA3\u544A\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u5BE6\u4F5C\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u578B\u5225\u5B9A\u7FA9\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u66AB\u7559\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u6587\u4EF6\u9192\u76EE\u63D0\u793A\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u6587\u4EF6\u7B26\u865F\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u53C3\u8003\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u91CD\u65B0\u547D\u540D\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u7C3D\u7AE0\u8AAA\u660E\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u5167\u5D4C\u63D0\u793A\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u6587\u4EF6\u683C\u5F0F\u5316\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u6587\u4EF6\u9078\u53D6\u9805\u76EE\u683C\u5F0F\u5316\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u591A\u500B\u6587\u4EF6\u683C\u5F0F\u5316\u63D0\u4F9B\u8005","\u7DE8\u8F2F\u5668\u662F\u5426\u6709\u591A\u500B\u6587\u4EF6\u9078\u53D6\u9805\u76EE\u683C\u5F0F\u5316\u63D0\u4F9B\u8005"],"vs/editor/common/languages":["\u9663\u5217","\u5E03\u6797\u503C","\u985E\u5225","\u5E38\u6578","\u5EFA\u69CB\u51FD\u5F0F","\u5217\u8209","\u5217\u8209\u6210\u54E1","\u4E8B\u4EF6","\u6B04\u4F4D","\u6A94\u6848","\u51FD\u5F0F","\u4ECB\u9762","\u7D22\u5F15\u9375","\u65B9\u6CD5","\u6A21\u7D44","\u547D\u540D\u7A7A\u9593","null","\u6578\u5B57","\u7269\u4EF6","\u904B\u7B97\u5B50","\u5957\u4EF6","\u5C6C\u6027","\u5B57\u4E32","\u7D50\u69CB","\u578B\u5225\u53C3\u6578","\u8B8A\u6578","{0} ({1})"],"vs/editor/common/languages/modesRegistry":["\u7D14\u6587\u5B57"],"vs/editor/common/model/editStack":["\u6B63\u5728\u9375\u5165"],"vs/editor/common/standaloneStrings":["\u958B\u767C\u4EBA\u54E1: \u6AA2\u67E5\u6B0A\u6756","\u524D\u5F80\u884C/\u6B04...","\u986F\u793A\u6240\u6709\u5FEB\u901F\u5B58\u53D6\u63D0\u4F9B\u8005","\u547D\u4EE4\u9078\u64C7\u5340","\u986F\u793A\u4E26\u57F7\u884C\u547D\u4EE4","\u79FB\u81F3\u7B26\u865F...","\u524D\u5F80\u7B26\u865F (\u4F9D\u985E\u5225)...","\u7DE8\u8F2F\u5668\u5167\u5BB9","\u6309 Alt+F1 \u53EF\u53D6\u5F97\u5354\u52A9\u5DE5\u5177\u9078\u9805\u3002","\u5207\u63DB\u9AD8\u5C0D\u6BD4\u4F48\u666F\u4E3B\u984C","\u5DF2\u5728 {1} \u6A94\u6848\u4E2D\u9032\u884C {0} \u9805\u7DE8\u8F2F"],"vs/editor/common/viewLayout/viewLineRenderer":["\u986F\u793A\u66F4\u591A ({0})","{0} chars"],"vs/editor/contrib/anchorSelect/browser/anchorSelect":["\u9078\u53D6\u7BC4\u570D\u9328\u9EDE","\u8A2D\u5B9A\u9328\u9EDE\u70BA {0}:{1}","\u8A2D\u5B9A\u9078\u53D6\u7BC4\u570D\u9328\u9EDE","\u524D\u5F80\u9078\u53D6\u7BC4\u570D\u9328\u9EDE","\u9078\u53D6\u5F9E\u9328\u9EDE\u5230\u6E38\u6A19\u4E4B\u9593\u7684\u7BC4\u570D","\u53D6\u6D88\u9078\u53D6\u7BC4\u570D\u9328\u9EDE"],"vs/editor/contrib/bracketMatching/browser/bracketMatching":["\u6210\u5C0D\u62EC\u5F27\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002","\u79FB\u81F3\u65B9\u62EC\u5F27","\u9078\u53D6\u81F3\u62EC\u5F27","\u79FB\u9664\u62EC\u5F27","\u524D\u5F80\u62EC\u5F27(&&B)"],"vs/editor/contrib/caretOperations/browser/caretOperations":["\u5C07\u6240\u9078\u6587\u5B57\u5411\u5DE6\u79FB\u52D5","\u5C07\u6240\u9078\u6587\u5B57\u5411\u53F3\u79FB\u52D5"],"vs/editor/contrib/caretOperations/browser/transpose":["\u8ABF\u63DB\u5B57\u6BCD"],"vs/editor/contrib/clipboard/browser/clipboard":["\u526A\u4E0B(&&T)","\u526A\u4E0B","\u526A\u4E0B","\u526A\u4E0B","\u8907\u88FD(&&C)","\u8907\u88FD","\u8907\u88FD","\u8907\u88FD","\u8907\u88FD\u70BA","\u8907\u88FD\u70BA","\u5171\u7528","\u5171\u7528","\u5171\u7528","\u8CBC\u4E0A(&&P)","\u8CBC\u4E0A","\u8CBC\u4E0A","\u8CBC\u4E0A","\u96A8\u8A9E\u6CD5\u9192\u76EE\u63D0\u793A\u8907\u88FD"],"vs/editor/contrib/codeAction/browser/codeAction":["\u5957\u7528\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u6642\u767C\u751F\u672A\u77E5\u7684\u932F\u8AA4"],"vs/editor/contrib/codeAction/browser/codeActionCommands":["\u8981\u57F7\u884C\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u7684\u7A2E\u985E\u3002","\u63A7\u5236\u8981\u5957\u7528\u50B3\u56DE\u52D5\u4F5C\u7684\u6642\u6A5F\u3002","\u4E00\u5F8B\u5957\u7528\u7B2C\u4E00\u500B\u50B3\u56DE\u7684\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u3002","\u5982\u679C\u50B3\u56DE\u7684\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u662F\u552F\u4E00\u52D5\u4F5C\uFF0C\u5247\u52A0\u4EE5\u5957\u7528\u3002","\u4E0D\u8981\u5957\u7528\u50B3\u56DE\u7684\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u3002","\u63A7\u5236\u662F\u5426\u50C5\u61C9\u50B3\u56DE\u504F\u597D\u7684\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u3002","\u5FEB\u901F\u4FEE\u5FA9...","\u6C92\u6709\u53EF\u7528\u7684\u7A0B\u5F0F\u78BC\u64CD\u4F5C",'\u6C92\u6709 "{0}" \u7684\u504F\u597D\u7A0B\u5F0F\u78BC\u52D5\u4F5C','\u6C92\u6709 "{0}" \u53EF\u7528\u7684\u7A0B\u5F0F\u78BC\u52D5\u4F5C',"\u6C92\u6709\u53EF\u7528\u7684\u504F\u597D\u7A0B\u5F0F\u78BC\u52D5\u4F5C","\u6C92\u6709\u53EF\u7528\u7684\u7A0B\u5F0F\u78BC\u64CD\u4F5C","\u91CD\u69CB...","\u6C92\u6709\u9069\u7528\u65BC '{0}' \u7684\u504F\u597D\u91CD\u69CB\u3002",'\u6C92\u6709\u53EF\u7528\u7684 "{0}" \u91CD\u69CB',"\u6C92\u6709\u53EF\u7528\u7684\u504F\u597D\u91CD\u69CB","\u6C92\u6709\u53EF\u7528\u7684\u91CD\u69CB","\u4F86\u6E90\u52D5\u4F5C...","\u6C92\u6709\u9069\u7528\u65BC '{0}' \u7684\u504F\u597D\u4F86\u6E90\u52D5\u4F5C",'\u6C92\u6709 "{0}" \u53EF\u7528\u7684\u4F86\u6E90\u52D5\u4F5C',"\u6C92\u6709\u53EF\u7528\u7684\u504F\u597D\u4F86\u6E90\u52D5\u4F5C","\u6C92\u6709\u53EF\u7528\u7684\u4F86\u6E90\u52D5\u4F5C","\u7D44\u7E54\u532F\u5165","\u6C92\u6709\u4EFB\u4F55\u53EF\u7528\u7684\u7D44\u7E54\u532F\u5165\u52D5\u4F5C","\u5168\u90E8\u4FEE\u6B63","\u6C92\u6709\u5168\u90E8\u4FEE\u6B63\u52D5\u4F5C\u53EF\u7528","\u81EA\u52D5\u4FEE\u6B63...","\u6C92\u6709\u53EF\u7528\u7684\u81EA\u52D5\u4FEE\u6B63"],"vs/editor/contrib/codeAction/browser/codeActionContributions":["\u555F\u7528/\u505C\u7528\u5728 [\u7A0B\u5F0F\u78BC\u52D5\u4F5C] \u529F\u80FD\u8868\u4E2D\u986F\u793A\u7FA4\u7D44\u6A19\u982D\u3002","\u555F\u7528/\u505C\u7528\u76EE\u524D\u4E0D\u5728\u8A3A\u65B7\u6642\u986F\u793A\u884C\u5167\u6700\u63A5\u8FD1\u7684 Quickfix\u3002"],"vs/editor/contrib/codeAction/browser/codeActionController":["\u5167\u5BB9: {0} \u5728\u884C {1} \u548C\u6B04 {2}\u3002","\u96B1\u85CF\u5DF2\u505C\u7528\u9805\u76EE","\u986F\u793A\u5DF2\u505C\u7528\u9805\u76EE"],"vs/editor/contrib/codeAction/browser/codeActionMenu":["\u66F4\u591A\u52D5\u4F5C...","\u5FEB\u901F\u4FEE\u6B63","\u64F7\u53D6","\u5167\u5D4C","\u91CD\u5BEB","\u79FB\u52D5","\u7BC4\u570D\u9673\u8FF0\u5F0F","\u4F86\u6E90\u52D5\u4F5C"],"vs/editor/contrib/codeAction/browser/lightBulbWidget":["\u986F\u793A\u7A0B\u5F0F\u78BC\u52D5\u4F5C\u3002\u504F\u597D\u7684\u5FEB\u901F\u4FEE\u6B63\u53EF\u7528 ({0})","\u986F\u793A\u7A0B\u5F0F\u78BC\u52D5\u4F5C ({0})","\u986F\u793A\u7A0B\u5F0F\u78BC\u52D5\u4F5C"],"vs/editor/contrib/codelens/browser/codelensController":["\u986F\u793A\u76EE\u524D\u884C\u7684 Code Lens \u547D\u4EE4","\u9078\u53D6\u547D\u4EE4"],"vs/editor/contrib/colorPicker/browser/colorPickerWidget":["\u6309\u4E00\u4E0B\u4EE5\u5207\u63DB\u8272\u5F69\u9078\u9805 (rgb/hsl/hex)","\u8981\u95DC\u9589\u984F\u8272\u9078\u64C7\u5668\u7684\u5716\u793A"],"vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions":["\u986F\u793A\u6216\u805A\u7126\u7368\u7ACB\u7684\u984F\u8272\u9078\u64C7\u5668","&&\u986F\u793A\u6216\u805A\u7126\u7368\u7ACB\u7684\u984F\u8272\u9078\u64C7\u5668","\u96B1\u85CF\u984F\u8272\u9078\u64C7\u5668","\u4F7F\u7528\u7368\u7ACB\u7684\u984F\u8272\u9078\u64C7\u5668\u63D2\u5165\u984F\u8272"],"vs/editor/contrib/comment/browser/comment":["\u5207\u63DB\u884C\u8A3B\u89E3","\u5207\u63DB\u884C\u8A3B\u89E3(&&T)","\u52A0\u5165\u884C\u8A3B\u89E3","\u79FB\u9664\u884C\u8A3B\u89E3","\u5207\u63DB\u5340\u584A\u8A3B\u89E3","\u5207\u63DB\u5340\u584A\u8A3B\u89E3(&&B)"],"vs/editor/contrib/contextmenu/browser/contextmenu":["\u7E2E\u5716","\u8F49\u8B6F\u5B57\u5143","\u5782\u76F4\u5927\u5C0F","\u6309\u6BD4\u4F8B","\u586B\u6EFF","\u6700\u9069\u5927\u5C0F","\u6ED1\u687F","\u6ED1\u9F20\u79FB\u81F3\u4E0A\u65B9","\u4E00\u5F8B","\u986F\u793A\u7DE8\u8F2F\u5668\u5167\u5BB9\u529F\u80FD\u8868"],"vs/editor/contrib/cursorUndo/browser/cursorUndo":["\u6E38\u6A19\u5FA9\u539F","\u6E38\u6A19\u91CD\u505A"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteContribution":["\u8CBC\u4E0A\u70BA...","\u8981\u5617\u8A66\u5957\u7528\u7684\u8CBC\u4E0A\u7DE8\u8F2F\u7684\u8B58\u5225\u78BC\u3002\u5982\u679C\u672A\u63D0\u4F9B\uFF0C\u7DE8\u8F2F\u5668\u5C07\u986F\u793A\u9078\u64C7\u5668\u3002"],"vs/editor/contrib/dropOrPasteInto/browser/copyPasteController":["\u662F\u5426\u986F\u793A\u8CBC\u4E0A\u5C0F\u5DE5\u5177","\u986F\u793A\u8CBC\u4E0A\u9078\u9805...","\u6B63\u5728\u57F7\u884C\u8CBC\u4E0A\u8655\u7406\u5E38\u5F0F\u3002\u6309\u4E00\u4E0B\u4EE5\u53D6\u6D88","\u9078\u53D6\u8CBC\u4E0A\u52D5\u4F5C","\u57F7\u884C\u8CBC\u4E0A\u8655\u7406\u5E38\u5F0F"],"vs/editor/contrib/dropOrPasteInto/browser/defaultProviders":["\u5167\u5EFA","\u63D2\u5165\u7D14\u6587\u5B57","\u63D2\u5165 URI","\u63D2\u5165 URI","\u63D2\u5165\u8DEF\u5F91","\u63D2\u5165\u8DEF\u5F91","\u63D2\u5165\u76F8\u5C0D\u8DEF\u5F91","\u63D2\u5165\u76F8\u5C0D\u8DEF\u5F91"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorContribution":["\u8A2D\u5B9A\u9810\u8A2D\u5378\u8F09\u63D0\u4F9B\u8005\uFF0C\u4EE5\u7528\u65BC\u6307\u5B9A MIME \u985E\u578B\u7684\u5167\u5BB9\u3002"],"vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController":["\u662F\u5426\u986F\u793A\u5378\u9664\u5C0F\u5DE5\u5177","\u986F\u793A\u5378\u9664\u9078\u9805...","\u6B63\u5728\u57F7\u884C\u7F6E\u653E\u8655\u7406\u5E38\u5F0F\u3002\u6309\u4E00\u4E0B\u4EE5\u53D6\u6D88"],"vs/editor/contrib/editorState/browser/keybindingCancellation":["\u7DE8\u8F2F\u5668\u662F\u5426\u57F7\u884C\u53EF\u53D6\u6D88\u7684\u4F5C\u696D\uFF0C\u4F8B\u5982\u300C\u9810\u89BD\u53C3\u8003\u300D"],"vs/editor/contrib/find/browser/findController":["\u6A94\u6848\u592A\u5927\uFF0C\u7121\u6CD5\u57F7\u884C\u53D6\u4EE3\u6240\u6709\u4F5C\u696D\u3002","\u5C0B\u627E","\u5C0B\u627E(&&F)",`\u8986\u5BEB "Use Regular Expression" \u65D7\u6A19\u3002\r -\u65E5\u5F8C\u5C07\u4E0D\u6703\u5132\u5B58\u6B64\u65D7\u6A19\u3002\r -0: \u4E0D\u57F7\u884C\u4EFB\u4F55\u52D5\u4F5C\r -1: True\r -2: False`,`\u8986\u5BEB "Match Whole Word" \u65D7\u6A19\u3002\r -\u65E5\u5F8C\u5C07\u4E0D\u6703\u5132\u5B58\u6B64\u65D7\u6A19\u3002\r -0: \u4E0D\u57F7\u884C\u4EFB\u4F55\u52D5\u4F5C\r -1: True\r -2: False`,`\u8986\u5BEB "Math Case" \u65D7\u6A19\u3002\r -\u65E5\u5F8C\u5C07\u4E0D\u6703\u5132\u5B58\u6B64\u65D7\u6A19\u3002\r -0: \u4E0D\u57F7\u884C\u4EFB\u4F55\u52D5\u4F5C\r -1: True\r -2: False`,`\u8986\u5BEB "Preserve Case" \u65D7\u6A19\u3002\r -\u65E5\u5F8C\u5C07\u4E0D\u6703\u5132\u5B58\u6B64\u65D7\u6A19\u3002\r -0: \u4E0D\u57F7\u884C\u4EFB\u4F55\u52D5\u4F5C\r -1: True\r -2: False`,"\u4F7F\u7528\u5F15\u6578\u5C0B\u627E","\u5C0B\u627E\u9078\u53D6\u9805\u76EE","\u5C0B\u627E\u4E0B\u4E00\u500B","\u5C0B\u627E\u4E0A\u4E00\u500B","\u79FB\u81F3\u76F8\u7B26\u9805\u76EE...","\u6C92\u6709\u76F8\u7B26\u9805\u76EE\u3002\u5617\u8A66\u641C\u5C0B\u5176\u4ED6\u9805\u76EE\u3002","\u8F38\u5165\u6578\u5B57\u4EE5\u524D\u5F80\u7279\u5B9A\u76F8\u7B26\u9805\u76EE (\u4ECB\u65BC 1 \u5230 {0})","\u8ACB\u8F38\u5165\u4ECB\u65BC 1 \u548C {0} \u4E4B\u9593\u7684\u6578\u5B57\u3002","\u8ACB\u8F38\u5165\u4ECB\u65BC 1 \u548C {0} \u4E4B\u9593\u7684\u6578\u5B57\u3002","\u5C0B\u627E\u4E0B\u4E00\u500B\u9078\u53D6\u9805\u76EE","\u5C0B\u627E\u4E0A\u4E00\u500B\u9078\u53D6\u9805\u76EE","\u53D6\u4EE3","\u53D6\u4EE3(&&R)"],"vs/editor/contrib/find/browser/findWidget":["\u7DE8\u8F2F\u5668\u5C0B\u627E\u5C0F\u5DE5\u5177\u4E2D [\u5728\u9078\u53D6\u7BC4\u570D\u4E2D\u5C0B\u627E] \u7684\u5716\u793A\u3002","\u8868\u793A\u7DE8\u8F2F\u5668\u5C0B\u627E\u5C0F\u5DE5\u5177\u5DF2\u647A\u758A\u7684\u5716\u793A\u3002","\u8868\u793A\u7DE8\u8F2F\u5668\u5C0B\u627E\u5C0F\u5DE5\u5177\u5DF2\u5C55\u958B\u7684\u5716\u793A\u3002","\u7DE8\u8F2F\u5668\u5C0B\u627E\u5C0F\u5DE5\u5177\u4E2D [\u53D6\u4EE3] \u7684\u5716\u793A\u3002","\u7DE8\u8F2F\u5668\u5C0B\u627E\u5C0F\u5DE5\u5177\u4E2D [\u5168\u90E8\u53D6\u4EE3] \u7684\u5716\u793A\u3002","\u7DE8\u8F2F\u5668\u5C0B\u627E\u5C0F\u5DE5\u5177\u4E2D [\u5C0B\u627E\u4E0A\u4E00\u500B] \u7684\u5716\u793A\u3002","\u7DE8\u8F2F\u5668\u5C0B\u627E\u5C0F\u5DE5\u5177\u4E2D [\u5C0B\u627E\u4E0B\u4E00\u500B] \u7684\u5716\u793A\u3002","\u5C0B\u627E/\u53D6\u4EE3","\u5C0B\u627E","\u5C0B\u627E","\u4E0A\u4E00\u500B\u76F8\u7B26\u9805\u76EE","\u4E0B\u4E00\u500B\u76F8\u7B26\u9805\u76EE","\u5728\u9078\u53D6\u7BC4\u570D\u4E2D\u5C0B\u627E","\u95DC\u9589","\u53D6\u4EE3","\u53D6\u4EE3","\u53D6\u4EE3","\u5168\u90E8\u53D6\u4EE3","\u5207\u63DB\u53D6\u4EE3","\u50C5\u53CD\u767D\u986F\u793A\u524D {0} \u7B46\u7D50\u679C\uFF0C\u4F46\u6240\u6709\u5C0B\u627E\u4F5C\u696D\u6703\u5728\u5B8C\u6574\u6587\u5B57\u4E0A\u57F7\u884C\u3002","{1} \u7684 {0}","\u67E5\u7121\u7D50\u679C","\u627E\u5230 {0}","\u4EE5 '{1}' \u627E\u5230 {0}","\u4EE5 '{1}' \u627E\u5230 {0}\uFF0C\u4F4D\u65BC {2}","\u5DF2\u4EE5 '{1}' \u627E\u5230 {0}","Ctrl+Enter \u73FE\u5728\u6703\u63D2\u5165\u5206\u884C\u7B26\u865F\uFF0C\u800C\u4E0D\u6703\u5168\u90E8\u53D6\u4EE3\u3002\u60A8\u53EF\u4EE5\u4FEE\u6539 editor.action.replaceAll \u7684\u6309\u9375\u7E6B\u7D50\u95DC\u4FC2\uFF0C\u4EE5\u8986\u5BEB\u6B64\u884C\u70BA\u3002"],"vs/editor/contrib/folding/browser/folding":["\u5C55\u958B","\u4EE5\u905E\u8FF4\u65B9\u5F0F\u5C55\u958B","\u647A\u758A","\u5207\u63DB\u647A\u758A","\u4EE5\u905E\u8FF4\u65B9\u5F0F\u647A\u758A","\u647A\u758A\u5168\u90E8\u5340\u584A\u8A3B\u89E3","\u647A\u758A\u6240\u6709\u5340\u57DF","\u5C55\u958B\u6240\u6709\u5340\u57DF","\u647A\u758A\u6240\u9078\u5340\u57DF\u4EE5\u5916\u7684\u6240\u6709\u5340\u57DF","\u5C55\u958B\u6240\u9078\u5340\u57DF\u4EE5\u5916\u7684\u6240\u6709\u5340\u57DF","\u5168\u90E8\u647A\u758A","\u5168\u90E8\u5C55\u958B","\u79FB\u81F3\u7236\u4EE3\u647A\u758A","\u79FB\u81F3\u4E0A\u4E00\u500B\u647A\u758A\u7BC4\u570D","\u79FB\u81F3\u4E0B\u4E00\u500B\u647A\u758A\u7BC4\u570D","\u5F9E\u9078\u53D6\u7BC4\u570D\u5EFA\u7ACB\u647A\u758A\u7BC4\u570D","\u79FB\u9664\u624B\u52D5\u6298\u758A\u7BC4\u570D","\u647A\u758A\u5C64\u7D1A {0}"],"vs/editor/contrib/folding/browser/foldingDecorations":["\u5DF2\u647A\u758A\u7BC4\u570D\u5F8C\u7684\u80CC\u666F\u8272\u5F69\u3002\u8272\u5F69\u4E0D\u5F97\u8655\u65BC\u4E0D\u900F\u660E\u72C0\u614B\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7DE8\u8F2F\u5668\u88DD\u8A02\u908A\u7684\u647A\u758A\u63A7\u5236\u9805\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u5B57\u7B26\u908A\u754C\u4E2D [\u5C55\u958B\u7684\u7BC4\u570D] \u7684\u5716\u793A\u3002","\u7DE8\u8F2F\u5668\u5B57\u7B26\u908A\u754C\u4E2D [\u647A\u758A\u7684\u7BC4\u570D] \u7684\u5716\u793A\u3002","\u7DE8\u8F2F\u5668\u5B57\u7B26\u908A\u754C\u4E2D\u624B\u52D5\u647A\u758A\u7BC4\u570D\u7684\u5716\u793A\u3002","\u7DE8\u8F2F\u5668\u5B57\u7B26\u908A\u754C\u4E2D\u624B\u52D5\u5C55\u958B\u7BC4\u570D\u7684\u5716\u793A\u3002"],"vs/editor/contrib/fontZoom/browser/fontZoom":["\u7DE8\u8F2F\u5668\u5B57\u9AD4\u653E\u5927","\u7DE8\u8F2F\u5668\u5B57\u578B\u7E2E\u5C0F","\u7DE8\u8F2F\u5668\u5B57\u9AD4\u91CD\u8A2D\u7E2E\u653E"],"vs/editor/contrib/format/browser/format":["\u5728\u884C {0} \u7DE8\u8F2F\u4E86 1 \u9805\u683C\u5F0F","\u5728\u884C {1} \u7DE8\u8F2F\u4E86 {0} \u9805\u683C\u5F0F","\u5728\u884C {0} \u8207\u884C {1} \u4E4B\u9593\u7DE8\u8F2F\u4E86 1 \u9805\u683C\u5F0F","\u5728\u884C {1} \u8207\u884C {2} \u4E4B\u9593\u7DE8\u8F2F\u4E86 {0} \u9805\u683C\u5F0F"],"vs/editor/contrib/format/browser/formatActions":["\u683C\u5F0F\u5316\u6587\u4EF6","\u683C\u5F0F\u5316\u9078\u53D6\u7BC4\u570D"],"vs/editor/contrib/gotoError/browser/gotoError":["\u79FB\u81F3\u4E0B\u4E00\u500B\u554F\u984C (\u932F\u8AA4, \u8B66\u544A, \u8CC7\u8A0A)","[\u524D\u5F80\u4E0B\u4E00\u500B\u6A19\u8A18] \u7684\u5716\u793A\u3002","\u79FB\u81F3\u4E0A\u4E00\u500B\u554F\u984C (\u932F\u8AA4, \u8B66\u544A, \u8CC7\u8A0A)","[\u524D\u5F80\u4E0A\u4E00\u500B\u6A19\u8A18] \u7684\u5716\u793A\u3002","\u79FB\u81F3\u6A94\u6848\u88E1\u9762\u7684\u4E0B\u4E00\u500B\u554F\u984C (\u932F\u8AA4, \u8B66\u544A, \u8CC7\u8A0A)","\u4E0B\u4E00\u500B\u554F\u984C(&&P)","\u79FB\u81F3\u6A94\u6848\u88E1\u9762\u7684\u4E0A\u4E00\u500B\u554F\u984C (\u932F\u8AA4, \u8B66\u544A, \u8CC7\u8A0A)","\u524D\u4E00\u500B\u554F\u984C(&&P)"],"vs/editor/contrib/gotoError/browser/gotoErrorWidget":["\u932F\u8AA4","\u8B66\u544A","\u8CC7\u8A0A","\u63D0\u793A","{0} \u65BC {1}\u3002","{0} \u500B\u554F\u984C (\u5171 {1} \u500B)","{0} \u500B\u554F\u984C (\u5171 {1} \u500B)","\u7DE8\u8F2F\u5668\u6A19\u8A18\u5C0E\u89BD\u5C0F\u5DE5\u5177\u932F\u8AA4\u7684\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u6A19\u8A18\u5C0E\u89BD\u5C0F\u5DE5\u5177\u932F\u8AA4\u6A19\u984C\u80CC\u666F\u3002","\u7DE8\u8F2F\u5668\u6A19\u8A18\u5C0E\u89BD\u5C0F\u5DE5\u5177\u8B66\u544A\u7684\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u6A19\u8A18\u5C0E\u89BD\u5C0F\u5DE5\u5177\u8B66\u544A\u6A19\u984C\u80CC\u666F\u3002","\u7DE8\u8F2F\u5668\u6A19\u8A18\u5C0E\u89BD\u5C0F\u5DE5\u5177\u8CC7\u8A0A\u7684\u8272\u5F69","\u7DE8\u8F2F\u5668\u6A19\u8A18\u5C0E\u89BD\u5C0F\u5DE5\u5177\u8CC7\u8A0A\u6A19\u984C\u80CC\u666F\u3002","\u7DE8\u8F2F\u5668\u6A19\u8A18\u5C0E\u89BD\u5C0F\u5DE5\u5177\u7684\u80CC\u666F\u3002"],"vs/editor/contrib/gotoSymbol/browser/goToCommands":["\u67E5\u770B","\u5B9A\u7FA9","\u627E\u4E0D\u5230 '{0}' \u7684\u5B9A\u7FA9","\u627E\u4E0D\u5230\u4EFB\u4F55\u5B9A\u7FA9","\u79FB\u81F3\u5B9A\u7FA9","\u79FB\u81F3\u5B9A\u7FA9(&&D)","\u5728\u4E00\u5074\u958B\u555F\u5B9A\u7FA9","\u7784\u6838\u5B9A\u7FA9","\u5BA3\u544A","\u627E\u4E0D\u5230 '{0}' \u7684\u5BA3\u544A ","\u627E\u4E0D\u5230\u4EFB\u4F55\u5BA3\u544A","\u79FB\u81F3\u5BA3\u544A","\u524D\u5F80\u5BA3\u544A(&&D)","\u627E\u4E0D\u5230 '{0}' \u7684\u5BA3\u544A ","\u627E\u4E0D\u5230\u4EFB\u4F55\u5BA3\u544A","\u9810\u89BD\u5BA3\u544A","\u985E\u578B\u5B9A\u7FA9","\u627E\u4E0D\u5230 '{0}' \u7684\u4EFB\u4F55\u985E\u578B\u5B9A\u7FA9","\u627E\u4E0D\u5230\u4EFB\u4F55\u985E\u578B\u5B9A\u7FA9","\u79FB\u81F3\u985E\u578B\u5B9A\u7FA9","\u524D\u5F80\u985E\u578B\u5B9A\u7FA9(&&T)","\u9810\u89BD\u985E\u578B\u5B9A\u7FA9","\u5BE6\u4F5C","\u627E\u4E0D\u5230 '{0}' \u7684\u4EFB\u4F55\u5BE6\u4F5C","\u627E\u4E0D\u5230\u4EFB\u4F55\u5BE6\u4F5C","\u524D\u5F80\u5BE6\u4F5C","\u524D\u5F80\u5BE6\u4F5C(&&I)","\u67E5\u770B\u5BE6\u4F5C",'\u672A\u627E\u5230 "{0}" \u7684\u53C3\u8003',"\u672A\u627E\u5230\u53C3\u8003","\u524D\u5F80\u53C3\u8003","\u524D\u5F80\u53C3\u8003(&&R)","\u53C3\u8003","\u9810\u89BD\u53C3\u8003","\u53C3\u8003","\u524D\u5F80\u4EFB\u4F55\u7B26\u865F","\u4F4D\u7F6E","'{0}' \u6C92\u6709\u7D50\u679C","\u53C3\u8003"],"vs/editor/contrib/gotoSymbol/browser/link/goToDefinitionAtPosition":["\u6309\u4E00\u4E0B\u4EE5\u986F\u793A {0} \u9805\u5B9A\u7FA9\u3002"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesController":["\u662F\u5426\u986F\u793A\u53C3\u8003\u7784\u6838\uFF0C\u4F8B\u5982\u300C\u7784\u6838\u53C3\u8003\u300D\u6216\u300C\u7784\u6838\u5B9A\u7FA9\u300D","\u6B63\u5728\u8F09\u5165...","{0} ({1})"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesTree":["{0} \u500B\u53C3\u8003","{0} \u500B\u53C3\u8003","\u53C3\u8003"],"vs/editor/contrib/gotoSymbol/browser/peek/referencesWidget":["\u7121\u6CD5\u9810\u89BD","\u67E5\u7121\u7D50\u679C","\u53C3\u8003"],"vs/editor/contrib/gotoSymbol/browser/referencesModel":["\u5728\u8CC7\u6599\u884C {2} \u884C {1} \u7684 {0} \u4E2D","\u5728\u8CC7\u6599\u884C {3} \u884C {2} \u7684 {1} \u7684 {0} \u4E2D","1 \u500B\u7B26\u865F\u4F4D\u65BC {0}, \u5B8C\u6574\u8DEF\u5F91 {1}","{0} \u500B\u7B26\u865F\u4F4D\u65BC {1}, \u5B8C\u6574\u8DEF\u5F91 {2}","\u627E\u4E0D\u5230\u7D50\u679C","\u5728 {0} \u4E2D\u627E\u5230 1 \u500B\u7B26\u865F","\u5728 {1} \u4E2D\u627E\u5230 {0} \u500B\u7B26\u865F","\u5728 {1} \u500B\u6A94\u6848\u4E2D\u627E\u5230 {0} \u500B\u7B26\u865F"],"vs/editor/contrib/gotoSymbol/browser/symbolNavigation":["\u662F\u5426\u6709\u53EA\u80FD\u900F\u904E\u9375\u76E4\u700F\u89BD\u7684\u7B26\u865F\u4F4D\u7F6E\u3002","{1} \u7684\u7B26\u865F {0}\uFF0C{2} \u70BA\u4E0B\u4E00\u500B","{1} \u7684\u7B26\u865F {0}"],"vs/editor/contrib/hover/browser/hover":["\u986F\u793A\u6216\u805A\u7126\u66AB\u7559","\u986F\u793A\u5B9A\u7FA9\u9810\u89BD\u61F8\u505C","\u5411\u4E0A\u6372\u52D5\u66AB\u7559","\u5411\u4E0B\u6372\u52D5\u66AB\u7559","\u5411\u5DE6\u6372\u52D5\u66AB\u7559","\u5411\u53F3\u6372\u52D5\u66AB\u7559","\u4E0A\u4E00\u9801\u66AB\u7559","\u4E0B\u4E00\u9801\u66AB\u7559","\u79FB\u81F3\u4E0A\u65B9\u66AB\u7559","\u79FB\u81F3\u4E0B\u65B9\u66AB\u7559"],"vs/editor/contrib/hover/browser/markdownHoverParticipant":["\u6B63\u5728\u8F09\u5165...","\u7531\u65BC\u6548\u80FD\u539F\u56E0\uFF0C\u5DF2\u66AB\u505C\u8F49\u8B6F\u3002\u9019\u53EF\u900F\u904E `editor.stopRenderingLineAfter` \u9032\u884C\u8A2D\u5B9A\u3002","\u56E0\u6548\u80FD\u7684\u7DE3\u6545\uFF0C\u5DF2\u8DF3\u904E\u5C07\u9577\u7684\u884C Token \u5316\u3002\u60A8\u53EF\u900F\u904E `editor.maxTokenizationLineLength` \u8A2D\u5B9A\u3002"],"vs/editor/contrib/hover/browser/markerHoverParticipant":["\u6AA2\u8996\u554F\u984C","\u6C92\u6709\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u6B63","\u6B63\u5728\u6AA2\u67E5\u5FEB\u901F\u4FEE\u6B63...","\u6C92\u6709\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u6B63","\u5FEB\u901F\u4FEE\u5FA9..."],"vs/editor/contrib/inPlaceReplace/browser/inPlaceReplace":["\u4EE5\u4E0A\u4E00\u500B\u503C\u53D6\u4EE3","\u4EE5\u4E0B\u4E00\u500B\u503C\u53D6\u4EE3"],"vs/editor/contrib/indentation/browser/indentation":["\u5C07\u7E2E\u6392\u8F49\u63DB\u6210\u7A7A\u683C","\u5C07\u7E2E\u6392\u8F49\u63DB\u6210\u5B9A\u4F4D\u9EDE","\u5DF2\u8A2D\u5B9A\u7684\u5B9A\u4F4D\u9EDE\u5927\u5C0F","\u9810\u8A2D\u7D22\u5F15\u6A19\u7C64\u5927\u5C0F","\u76EE\u524D\u7684\u7D22\u5F15\u6A19\u7C64\u5927\u5C0F","\u9078\u53D6\u76EE\u524D\u6A94\u6848\u7684\u5B9A\u4F4D\u9EDE\u5927\u5C0F","\u4F7F\u7528 Tab \u9032\u884C\u7E2E\u6392","\u4F7F\u7528\u7A7A\u683C\u9375\u9032\u884C\u7E2E\u6392","\u8B8A\u66F4\u7D22\u5F15\u6A19\u7C64\u986F\u793A\u5927\u5C0F","\u5075\u6E2C\u5167\u5BB9\u4E2D\u7684\u7E2E\u6392","\u91CD\u65B0\u5C07\u884C\u7E2E\u6392","\u91CD\u65B0\u5C07\u9078\u53D6\u7684\u884C\u7E2E\u6392"],"vs/editor/contrib/inlayHints/browser/inlayHintsHover":["\u6309\u5169\u4E0B\u4EE5\u63D2\u5165","cmd + \u6309\u4E00\u4E0B","ctrl + \u6309\u4E00\u4E0B","\u9078\u9805 + \u6309\u4E00\u4E0B","alt + \u6309\u4E00\u4E0B","\u524D\u5F80 [\u5B9A\u7FA9] ({0})\uFF0C\u6309\u4E00\u4E0B\u6ED1\u9F20\u53F3\u9375\u4EE5\u4E86\u89E3\u66F4\u591A","\u79FB\u81F3\u5B9A\u7FA9 ({0})","\u57F7\u884C\u547D\u4EE4"],"vs/editor/contrib/inlineCompletions/browser/commands":["\u986F\u793A\u4E0B\u4E00\u500B\u5167\u5D4C\u5EFA\u8B70","\u986F\u793A\u4E0A\u4E00\u500B\u5167\u5D4C\u5EFA\u8B70","\u89F8\u767C\u5167\u5D4C\u5EFA\u8B70","\u63A5\u53D7\u4E0B\u4E00\u500B\u5167\u5D4C\u5EFA\u8B70\u5B57\u7D44","\u63A5\u53D7\u5B57\u7D44","\u63A5\u53D7\u4E0B\u4E00\u500B\u5167\u5D4C\u5EFA\u8B70\u884C","\u63A5\u53D7\u884C","\u63A5\u53D7\u5167\u5D4C\u5EFA\u8B70","\u63A5\u53D7","\u96B1\u85CF\u5167\u5D4C\u5EFA\u8B70","\u6C38\u9060\u986F\u793A\u5DE5\u5177\u5217"],"vs/editor/contrib/inlineCompletions/browser/hoverParticipant":["\u5EFA\u8B70:"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys":["\u662F\u5426\u986F\u793A\u5167\u5D4C\u5EFA\u8B70","\u5167\u5D4C\u5EFA\u8B70\u662F\u5426\u4EE5\u7A7A\u767D\u5B57\u5143\u958B\u982D","\u5167\u5D4C\u5EFA\u8B70\u7684\u958B\u982D\u662F\u5426\u70BA\u7A7A\u767D\uFF0C\u4E14\u6BD4 Tab \u80FD\u63D2\u5165\u7684\u5B57\u5143\u8981\u5C0F","\u662F\u5426\u61C9\u96B1\u85CF\u76EE\u524D\u5EFA\u8B70\u7684\u5176\u4ED6\u5EFA\u8B70"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController":["\u5728\u53EF\u5B58\u53D6\u6AA2\u8996\u4E2D\u6AA2\u67E5\u6B64\u9805\u76EE ({0})"],"vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget":["[\u986F\u793A\u4E0B\u4E00\u500B\u53C3\u6578\u63D0\u793A] \u7684\u5716\u793A\u3002","[\u986F\u793A\u4E0A\u4E00\u500B\u53C3\u6578\u63D0\u793A] \u7684\u5716\u793A\u3002","{0} ({1})","\u4E0A\u4E00\u6B65","\u4E0B\u4E00\u6B65"],"vs/editor/contrib/lineSelection/browser/lineSelection":["\u5C55\u958B\u7DDA\u689D\u9078\u53D6\u7BC4\u570D"],"vs/editor/contrib/linesOperations/browser/linesOperations":["\u5C07\u884C\u5411\u4E0A\u8907\u88FD","\u5C07\u884C\u5411\u4E0A\u8907\u88FD(&&C)","\u5C07\u884C\u5411\u4E0B\u8907\u88FD","\u5C07\u884C\u5411\u4E0B\u8907\u88FD(&&P)","\u91CD\u8907\u9078\u53D6\u9805\u76EE","\u91CD\u8907\u9078\u53D6\u9805\u76EE(&&D)","\u4E0A\u79FB\u4E00\u884C","\u4E0A\u79FB\u4E00\u884C(&&V)","\u4E0B\u79FB\u4E00\u884C","\u4E0B\u79FB\u4E00\u884C(&&L)","\u905E\u589E\u6392\u5E8F\u884C","\u905E\u6E1B\u6392\u5E8F\u884C","\u522A\u9664\u91CD\u8907\u7684\u884C","\u4FEE\u526A\u5C3E\u7AEF\u7A7A\u767D","\u522A\u9664\u884C","\u7E2E\u6392\u884C","\u51F8\u6392\u884C","\u5728\u4E0A\u65B9\u63D2\u5165\u884C","\u5728\u4E0B\u65B9\u63D2\u5165\u884C","\u5DE6\u908A\u5168\u90E8\u522A\u9664","\u522A\u9664\u6240\u6709\u53F3\u65B9\u9805\u76EE","\u9023\u63A5\u7DDA","\u8F49\u7F6E\u6E38\u6A19\u5468\u570D\u7684\u5B57\u5143\u6578","\u8F49\u63DB\u5230\u5927\u5BEB","\u8F49\u63DB\u5230\u5C0F\u5BEB","\u8F49\u63DB\u70BA\u5B57\u9996\u5927\u5BEB","\u8F49\u63DB\u70BA\u5E95\u7DDA\u9023\u63A5\u5B57","\u8F49\u63DB\u70BA Camel \u6848\u4F8B","\u8F49\u63DB\u6210 Kebab Case"],"vs/editor/contrib/linkedEditing/browser/linkedEditing":["\u958B\u59CB\u9023\u7D50\u7684\u7DE8\u8F2F","\u7576\u7DE8\u8F2F\u5668\u81EA\u52D5\u91CD\u65B0\u547D\u540D\u985E\u578B\u6642\u7684\u80CC\u666F\u8272\u5F69\u3002"],"vs/editor/contrib/links/browser/links":["\u56E0\u70BA\u6B64\u9023\u7D50\u7684\u683C\u5F0F\u4E0D\u6B63\u78BA\uFF0C\u6240\u4EE5\u7121\u6CD5\u958B\u555F: {0}","\u56E0\u70BA\u6B64\u9023\u7D50\u76EE\u6A19\u907A\u5931\uFF0C\u6240\u4EE5\u7121\u6CD5\u958B\u555F\u3002","\u57F7\u884C\u547D\u4EE4","\u8FFD\u8E64\u9023\u7D50","cmd + \u6309\u4E00\u4E0B","ctrl + \u6309\u4E00\u4E0B","\u9078\u9805 + \u6309\u4E00\u4E0B","alt + \u6309\u4E00\u4E0B","\u57F7\u884C\u547D\u4EE4 {0}","\u958B\u555F\u9023\u7D50"],"vs/editor/contrib/message/browser/messageController":["\u7DE8\u8F2F\u5668\u76EE\u524D\u662F\u5426\u6B63\u5728\u986F\u793A\u5167\u5D4C\u8A0A\u606F"],"vs/editor/contrib/multicursor/browser/multicursor":["\u65B0\u589E\u7684\u8CC7\u6599\u6307\u6A19: {0}","\u65B0\u589E\u7684\u8CC7\u6599\u6307\u6A19: {0}","\u5728\u4E0A\u65B9\u52A0\u5165\u6E38\u6A19","\u5728\u4E0A\u65B9\u65B0\u589E\u6E38\u6A19(&&A)","\u5728\u4E0B\u65B9\u52A0\u5165\u6E38\u6A19","\u5728\u4E0B\u65B9\u65B0\u589E\u6E38\u6A19(&&D)","\u5728\u884C\u5C3E\u65B0\u589E\u6E38\u6A19","\u5728\u884C\u5C3E\u65B0\u589E\u6E38\u6A19(&&U)","\u5C07\u6E38\u6A19\u65B0\u589E\u5230\u5E95\u90E8 ","\u5C07\u6E38\u6A19\u65B0\u589E\u5230\u9802\u90E8","\u5C07\u9078\u53D6\u9805\u76EE\u52A0\u5165\u4E0B\u4E00\u500B\u627E\u5230\u7684\u76F8\u7B26\u9805","\u65B0\u589E\u4E0B\u4E00\u500B\u9805\u76EE(&&N)","\u5C07\u9078\u53D6\u9805\u76EE\u52A0\u5165\u524D\u4E00\u500B\u627E\u5230\u7684\u76F8\u7B26\u9805\u4E2D","\u65B0\u589E\u4E0A\u4E00\u500B\u9805\u76EE(&&R)","\u5C07\u6700\u5F8C\u4E00\u500B\u9078\u64C7\u9805\u76EE\u79FB\u81F3\u4E0B\u4E00\u500B\u627E\u5230\u7684\u76F8\u7B26\u9805","\u5C07\u6700\u5F8C\u4E00\u500B\u9078\u64C7\u9805\u76EE\u79FB\u81F3\u524D\u4E00\u500B\u627E\u5230\u7684\u76F8\u7B26\u9805","\u9078\u53D6\u6240\u6709\u627E\u5230\u7684\u76F8\u7B26\u9805\u76EE","\u9078\u53D6\u6240\u6709\u9805\u76EE(&&O)","\u8B8A\u66F4\u6240\u6709\u767C\u751F\u6B21\u6578","\u805A\u7126\u4E0B\u4E00\u500B\u6E38\u6A19","\u805A\u7126\u4E0B\u4E00\u500B\u6E38\u6A19","\u805A\u7126\u4E0A\u4E00\u500B\u6E38\u6A19","\u805A\u7126\u524D\u4E00\u500B\u6E38\u6A19"],"vs/editor/contrib/parameterHints/browser/parameterHints":["\u89F8\u767C\u53C3\u6578\u63D0\u793A"],"vs/editor/contrib/parameterHints/browser/parameterHintsWidget":["[\u986F\u793A\u4E0B\u4E00\u500B\u53C3\u6578\u63D0\u793A] \u7684\u5716\u793A\u3002","[\u986F\u793A\u4E0A\u4E00\u500B\u53C3\u6578\u63D0\u793A] \u7684\u5716\u793A\u3002","{0}\uFF0C\u63D0\u793A","\u53C3\u6578\u63D0\u793A\u4E2D\u4F7F\u7528\u4E2D\u9805\u76EE\u7684\u524D\u666F\u8272\u5F69\u3002"],"vs/editor/contrib/peekView/browser/peekView":["\u76EE\u524D\u7684\u7A0B\u5F0F\u78BC\u7DE8\u8F2F\u5668\u662F\u5426\u5167\u5D4C\u65BC\u7784\u6838\u5167","\u95DC\u9589","\u9810\u89BD\u6AA2\u8996\u6A19\u984C\u5340\u57DF\u7684\u80CC\u666F\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u6A19\u984C\u7684\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u6A19\u984C\u8CC7\u8A0A\u7684\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u4E4B\u6846\u7DDA\u8207\u7BAD\u982D\u7684\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u4E2D\u7D50\u679C\u6E05\u55AE\u7684\u80CC\u666F\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u7D50\u679C\u5217\u8868\u4E2D\u884C\u7BC0\u9EDE\u7684\u524D\u666F\u8272\u5F69","\u9810\u89BD\u6AA2\u8996\u7D50\u679C\u5217\u8868\u4E2D\u6A94\u6848\u7BC0\u9EDE\u7684\u524D\u666F\u8272\u5F69","\u5728\u9810\u89BD\u6AA2\u8996\u4E4B\u7D50\u679C\u6E05\u55AE\u4E2D\u9078\u53D6\u9805\u76EE\u6642\u7684\u80CC\u666F\u8272\u5F69\u3002","\u5728\u9810\u89BD\u6AA2\u8996\u4E4B\u7D50\u679C\u6E05\u55AE\u4E2D\u9078\u53D6\u9805\u76EE\u6642\u7684\u524D\u666F\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u7DE8\u8F2F\u5668\u7684\u80CC\u666F\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u7DE8\u8F2F\u5668\u908A\u6846(\u542B\u884C\u865F\u6216\u5B57\u5F62\u5716\u793A)\u7684\u80CC\u666F\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u7DE8\u8F2F\u5668\u4E2D\u9ECF\u6027\u6EFE\u52D5\u7684\u80CC\u666F\u8272\u5F69\u3002","\u5728\u9810\u89BD\u6AA2\u8996\u7DE8\u8F2F\u5668\u4E2D\u6BD4\u5C0D\u6642\u7684\u53CD\u767D\u986F\u793A\u8272\u5F69\u3002","\u9810\u89BD\u6AA2\u8996\u7DE8\u8F2F\u5668\u4E2D\u6BD4\u5C0D\u6642\u7684\u53CD\u767D\u986F\u793A\u8272\u5F69\u3002","\u5728\u9810\u89BD\u6AA2\u8996\u7DE8\u8F2F\u5668\u4E2D\u6BD4\u5C0D\u6642\u7684\u53CD\u767D\u986F\u793A\u908A\u754C\u3002"],"vs/editor/contrib/quickAccess/browser/gotoLineQuickAccess":["\u5148\u958B\u555F\u6587\u5B57\u7DE8\u8F2F\u5668\uFF0C\u524D\u5F80\u67D0\u4E00\u884C\u3002","\u524D\u5F80\u7B2C {0} \u884C\u7684\u7B2C {1} \u500B\u5B57\u5143\u3002","\u524D\u5F80\u7B2C {0} \u884C\u3002","\u76EE\u524D\u884C: {0}\uFF0C\u5B57\u5143: {1}\u3002\u8ACB\u9375\u5165\u4ECB\u65BC 1 \u5230 {2} \u4E4B\u9593\u884C\u865F\uFF0C\u5C0E\u89BD\u81F3\u8A72\u884C\u3002","\u76EE\u524D\u884C: {0}\uFF0C\u5B57\u5143: {1}\u3002\u8ACB\u9375\u5165\u8981\u5C0E\u89BD\u81F3\u7684\u884C\u865F\u3002"],"vs/editor/contrib/quickAccess/browser/gotoSymbolQuickAccess":["\u82E5\u8981\u524D\u5F80\u7B26\u865F\uFF0C\u8ACB\u5148\u958B\u555F\u5305\u542B\u7B26\u865F\u8CC7\u8A0A\u7684\u6587\u5B57\u7DE8\u8F2F\u5668\u3002","\u4F7F\u7528\u4E2D\u7684\u6587\u5B57\u7DE8\u8F2F\u5668\u4E0D\u63D0\u4F9B\u7B26\u865F\u8CC7\u8A0A\u3002","\u6C92\u6709\u76F8\u7B26\u7684\u7DE8\u8F2F\u5668\u7B26\u865F","\u6C92\u6709\u7DE8\u8F2F\u5668\u7B26\u865F","\u958B\u81F3\u5074\u908A","\u958B\u555F\u5230\u5E95\u90E8","\u7B26\u865F ({0})","\u5C6C\u6027 ({0})","\u65B9\u6CD5 ({0})","\u51FD\u5F0F ({0})","\u5EFA\u69CB\u51FD\u5F0F ({0})","\u8B8A\u6578 ({0})","\u985E\u5225 ({0})","\u7D50\u69CB ({0})","\u4E8B\u4EF6 ({0})","\u904B\u7B97\u5B50 ({0})","\u4ECB\u9762 ({0})","\u547D\u540D\u7A7A\u9593 ({0})","\u5957\u4EF6 ({0})","\u578B\u5225\u53C3\u6578 ({0})","\u6A21\u7D44 ({0})","\u5C6C\u6027 ({0})","\u5217\u8209 ({0})","\u5217\u8209\u6210\u54E1 ({0})","\u5B57\u4E32 ({0})","\u6A94\u6848 ({0})","\u9663\u5217 ({0})","\u6578\u5B57 ({0})","\u5E03\u6797\u503C ({0})","\u7269\u4EF6 ({0})","\u7D22\u5F15\u9375 ({0})","\u6B04\u4F4D ({0})","\u5E38\u6578 ({0})"],"vs/editor/contrib/readOnlyMessage/browser/contribution":["\u7121\u6CD5\u5728\u552F\u8B80\u8F38\u5165\u4E2D\u7DE8\u8F2F","\u7121\u6CD5\u5728\u552F\u8B80\u7DE8\u8F2F\u5668\u4E2D\u7DE8\u8F2F"],"vs/editor/contrib/rename/browser/rename":["\u6C92\u6709\u7D50\u679C\u3002","\u89E3\u6790\u91CD\u65B0\u547D\u540D\u4F4D\u7F6E\u6642\u767C\u751F\u672A\u77E5\u7684\u932F\u8AA4","\u6B63\u5728\u5C07 '{0}' \u91CD\u65B0\u547D\u540D\u70BA '{1}'","\u6B63\u5728\u5C07 {0} \u91CD\u65B0\u547D\u540D\u70BA {1}","\u5DF2\u6210\u529F\u5C07 '{0}' \u91CD\u65B0\u547D\u540D\u70BA '{1}'\u3002\u6458\u8981: {2}","\u91CD\u547D\u540D\u7121\u6CD5\u5957\u7528\u7DE8\u8F2F","\u91CD\u65B0\u547D\u540D\u7121\u6CD5\u8A08\u7B97\u7DE8\u8F2F","\u91CD\u65B0\u547D\u540D\u7B26\u865F","\u555F\u7528/\u505C\u7528\u91CD\u65B0\u547D\u540D\u524D\u5148\u9810\u89BD\u8B8A\u66F4\u7684\u529F\u80FD"],"vs/editor/contrib/rename/browser/renameInputField":["\u662F\u5426\u986F\u793A\u91CD\u65B0\u547D\u540D\u8F38\u5165\u5C0F\u5DE5\u5177","\u70BA\u8F38\u5165\u91CD\u65B0\u547D\u540D\u3002\u8ACB\u9375\u5165\u65B0\u540D\u7A31\uFF0C\u7136\u5F8C\u6309 Enter \u4EE5\u63D0\u4EA4\u3002","\u6309 {0} \u9032\u884C\u91CD\u65B0\u547D\u540D\uFF0C\u6309 {1} \u9032\u884C\u9810\u89BD"],"vs/editor/contrib/smartSelect/browser/smartSelect":["\u5C55\u958B\u9078\u53D6\u9805\u76EE","\u5C55\u958B\u9078\u53D6\u7BC4\u570D(&&E)","\u7E2E\u5C0F\u9078\u53D6\u9805\u76EE","\u58D3\u7E2E\u9078\u53D6\u7BC4\u570D(&&S)"],"vs/editor/contrib/snippet/browser/snippetController2":["\u7DE8\u8F2F\u5668\u76EE\u524D\u662F\u5426\u5728\u7A0B\u5F0F\u78BC\u7247\u6BB5\u6A21\u5F0F\u4E2D","\u5728\u7A0B\u5F0F\u78BC\u7247\u6BB5\u6A21\u5F0F\u4E2D\u662F\u5426\u6709\u4E0B\u4E00\u500B\u5B9A\u4F4D\u505C\u99D0\u9EDE","\u5728\u7A0B\u5F0F\u78BC\u7247\u6BB5\u6A21\u5F0F\u4E2D\u662F\u5426\u6709\u4E0A\u4E00\u500B\u5B9A\u4F4D\u505C\u99D0\u9EDE","\u79FB\u81F3\u4E0B\u4E00\u500B\u9810\u7559\u4F4D\u7F6E..."],"vs/editor/contrib/snippet/browser/snippetVariables":["\u661F\u671F\u5929","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D","\u9031\u65E5","\u9031\u4E00","\u9031\u4E8C","\u9031\u4E09","\u9031\u56DB","\u9031\u4E94","\u9031\u516D","\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708","1\u6708","2\u6708","3 \u6708","4\u6708","\u4E94\u6708","6\u6708","7 \u6708","8 \u6708","9 \u6708","10 \u6708","11 \u6708","12 \u6708"],"vs/editor/contrib/stickyScroll/browser/stickyScrollActions":["\u5207\u63DB\u81EA\u9ECF\u6372\u52D5","\u5207\u63DB\u81EA\u9ECF\u6372\u52D5(&&T)","\u81EA\u9ECF\u6372\u52D5","\u81EA\u9ECF\u6372\u52D5(&&S)","\u805A\u7126\u81EA\u9ECF\u6372\u52D5","\u7126\u9EDE\u81EA\u9ECF\u6372\u52D5(&&F)","\u9078\u53D6\u4E0B\u4E00\u500B\u81EA\u9ECF\u6372\u52D5\u884C","\u9078\u53D6\u4E0A\u4E00\u500B\u81EA\u9ECF\u6372\u52D5\u884C","\u79FB\u81F3\u805A\u7126\u7684\u81EA\u9ECF\u6372\u52D5\u884C","\u9078\u53D6\u7DE8\u8F2F\u5668"],"vs/editor/contrib/suggest/browser/suggest":["\u662F\u5426\u805A\u7126\u4EFB\u4F55\u5EFA\u8B70","\u662F\u5426\u986F\u793A\u5EFA\u8B70\u8A73\u7D30\u8CC7\u6599","\u662F\u5426\u6709\u591A\u500B\u5EFA\u8B70\u53EF\u4EE5\u6311\u9078","\u63D2\u5165\u76EE\u524D\u7684\u5EFA\u8B70\u6703\u7522\u751F\u8B8A\u66F4\uFF0C\u6216\u5DF2\u9375\u5165\u6240\u6709\u9805\u76EE","\u662F\u5426\u5728\u6309\u4E0B Enter \u6642\u63D2\u5165\u5EFA\u8B70","\u76EE\u524D\u7684\u5EFA\u8B70\u662F\u5426\u6709\u63D2\u5165\u548C\u53D6\u4EE3\u884C\u70BA","\u9810\u8A2D\u884C\u70BA\u662F\u63D2\u5165\u6216\u53D6\u4EE3","\u76EE\u524D\u7684\u5EFA\u8B70\u662F\u5426\u652F\u63F4\u89E3\u6C7A\u66F4\u591A\u8A73\u7D30\u8CC7\u6599"],"vs/editor/contrib/suggest/browser/suggestController":["\u63A5\u53D7 \u2018{0}\u2019 \u9032\u884C\u4E86\u5176\u4ED6 {1} \u9805\u7DE8\u8F2F","\u89F8\u767C\u5EFA\u8B70","\u63D2\u5165","\u63D2\u5165","\u53D6\u4EE3","\u53D6\u4EE3","\u63D2\u5165","\u986F\u793A\u66F4\u5C11","\u986F\u793A\u66F4\u591A","\u91CD\u8A2D\u5EFA\u8B70\u5C0F\u5DE5\u5177\u5927\u5C0F"],"vs/editor/contrib/suggest/browser/suggestWidget":["\u5EFA\u8B70\u5C0F\u5DE5\u5177\u7684\u80CC\u666F\u8272\u5F69\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u7684\u908A\u754C\u8272\u5F69\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u7684\u524D\u666F\u8272\u5F69\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u6240\u9078\u9805\u76EE\u7684\u524D\u666F\u8272\u5F69\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u6240\u9078\u9805\u76EE\u7684\u5716\u793A\u524D\u666F\u8272\u5F69\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u6240\u9078\u9805\u76EE\u7684\u80CC\u666F\u8272\u5F69\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u76F8\u7B26\u9192\u76EE\u63D0\u793A\u7684\u8272\u5F69\u3002","\u7576\u9805\u76EE\u6210\u70BA\u7126\u9EDE\u6642\uFF0C\u76F8\u7B26\u9805\u76EE\u7684\u8272\u5F69\u5728\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u6703\u9192\u76EE\u986F\u793A\u3002","\u5EFA\u8B70\u5C0F\u5DE5\u5177\u72C0\u614B\u7684\u524D\u666F\u8272\u5F69\u3002","\u6B63\u5728\u8F09\u5165...","\u7121\u5EFA\u8B70\u3002","\u5EFA\u8B70","{0} {1}\uFF0C{2}","{0} {1}","{0}\uFF0C{1}","{0}\uFF0C\u6587\u4EF6: {1}"],"vs/editor/contrib/suggest/browser/suggestWidgetDetails":["\u95DC\u9589","\u6B63\u5728\u8F09\u5165..."],"vs/editor/contrib/suggest/browser/suggestWidgetRenderer":["\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D [\u66F4\u591A\u8A73\u7D30\u8CC7\u8A0A] \u7684\u5716\u793A\u3002","\u95B1\u8B80\u66F4\u591A"],"vs/editor/contrib/suggest/browser/suggestWidgetStatus":["{0} ({1})"],"vs/editor/contrib/symbolIcons/browser/symbolIcons":["\u9663\u5217\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5E03\u6797\u503C\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u985E\u5225\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u8272\u5F69\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5E38\u6578\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5EFA\u69CB\u51FD\u5F0F\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5217\u8209\u503C\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5217\u8209\u503C\u6210\u54E1\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u4E8B\u4EF6\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u6B04\u4F4D\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u6A94\u6848\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u8CC7\u6599\u593E\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u51FD\u5F0F\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u4ECB\u9762\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u7D22\u5F15\u9375\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u95DC\u9375\u5B57\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u65B9\u6CD5\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u6A21\u7D44\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u547D\u540D\u7A7A\u9593\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","Null \u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u6578\u5B57\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u7269\u4EF6\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u904B\u7B97\u5B50\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5957\u4EF6\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5C6C\u6027\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u53C3\u8003\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u7A0B\u5F0F\u78BC\u7247\u6BB5\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u5B57\u4E32\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u7D50\u69CB\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u6587\u5B57\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u578B\u5225\u53C3\u6578\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u55AE\u4F4D\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002","\u8B8A\u6578\u7B26\u865F\u7684\u524D\u666F\u8272\u5F69\u3002\u9019\u4E9B\u7B26\u865F\u6703\u51FA\u73FE\u5728\u5927\u7DB1\u3001\u968E\u5C64\u9023\u7D50\u548C\u5EFA\u8B70\u5C0F\u5DE5\u5177\u4E2D\u3002"],"vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode":["\u5207\u63DB TAB \u9375\u79FB\u52D5\u7126\u9EDE","\u6309 Tab \u73FE\u5728\u6703\u5C07\u7126\u9EDE\u79FB\u81F3\u4E0B\u4E00\u500B\u53EF\u8A2D\u5B9A\u7126\u9EDE\u7684\u5143\u7D20\u3002","\u6309 Tab \u73FE\u5728\u6703\u63D2\u5165\u5B9A\u4F4D\u5B57\u5143\u3002"],"vs/editor/contrib/tokenization/browser/tokenization":["\u958B\u767C\u4EBA\u54E1: \u5F37\u5236\u91CD\u65B0\u7F6E\u653E"],"vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter":["\u5EF6\u4F38\u6A21\u7D44\u7DE8\u8F2F\u5668\u4E2D\u986F\u793A\u542B\u6709\u8B66\u544A\u8A0A\u606F\u7684\u5716\u793A\u3002","\u6B64\u6587\u4EF6\u5305\u542B\u8A31\u591A\u975E\u57FA\u672C ASCII Unicode \u5B57\u5143","\u6B64\u6587\u4EF6\u5305\u542B\u8A31\u591A\u4E0D\u660E\u78BA\u7684 Unicode \u5B57\u5143","\u6B64\u6587\u4EF6\u5305\u542B\u8A31\u591A\u96B1\u85CF\u7684 Unicode \u5B57\u5143","\u5B57\u5143 {0} \u53EF\u80FD\u8207 ASCII \u5B57\u5143 {1} \u6DF7\u6DC6\uFF0C\u9019\u5728\u539F\u59CB\u7A0B\u5F0F\u78BC\u4E2D\u6BD4\u8F03\u5E38\u898B\u3002","\u5B57\u5143 {0} \u53EF\u80FD\u8207\u5B57\u5143 {1} \u6DF7\u6DC6\uFF0C\u9019\u5728\u539F\u59CB\u7A0B\u5F0F\u78BC\u4E2D\u6BD4\u8F03\u5E38\u898B\u3002","\u5B57\u5143 {0} \u96B1\u85CF\u3002","\u5B57\u5143 {0} \u4E0D\u662F\u57FA\u672C\u7684 ASCII \u5B57\u5143\u3002","\u8ABF\u6574\u8A2D\u5B9A","\u505C\u7528\u8A3B\u89E3\u4E2D\u7684\u9192\u76EE\u63D0\u793A","\u505C\u7528\u8A3B\u89E3\u4E2D\u5B57\u5143\u7684\u9192\u76EE\u63D0\u793A","\u505C\u7528\u5B57\u4E32\u4E2D\u7684\u9192\u76EE\u63D0\u793A","\u505C\u7528\u5B57\u4E32\u4E2D\u5B57\u5143\u7684\u9192\u76EE\u63D0\u793A","\u505C\u7528\u4E0D\u660E\u78BA\u7684\u9192\u76EE\u63D0\u793A","\u505C\u7528\u4E0D\u660E\u78BA\u5B57\u5143\u7684\u9192\u76EE\u63D0\u793A","\u505C\u7528\u96B1\u85CF\u9192\u76EE\u63D0\u793A","\u505C\u7528\u96B1\u85CF\u5B57\u5143\u7684\u9192\u76EE\u63D0\u793A","\u505C\u7528\u975E ASCII \u9192\u76EE\u63D0\u793A","\u505C\u7528\u975E\u57FA\u672C ASCII \u5B57\u5143\u7684\u9192\u76EE\u63D0\u793A","\u986F\u793A\u6392\u9664\u9078\u9805","\u6392\u9664 {0} (\u96B1\u85CF\u5B57\u5143) \u7684\u53CD\u767D\u986F\u793A","\u5C07 {0} \u6392\u9664\u5728\u5DF2\u9192\u76EE\u63D0\u793A","\u5141\u8A31\u5728\u8A9E\u8A00\u300C{0}\u300D\u4E2D\u8F03\u5E38\u7528\u7684 Unicode \u5B57\u5143\u3002","\u8A2D\u5B9A Unicode \u9192\u76EE\u63D0\u793A\u9078\u9805"],"vs/editor/contrib/unusualLineTerminators/browser/unusualLineTerminators":["\u7570\u5E38\u7684\u884C\u7D50\u675F\u5B57\u5143","\u5075\u6E2C\u5230\u7570\u5E38\u7684\u884C\u7D50\u675F\u5B57\u5143","\u6A94\u6848 '{0}' \u5305\u542B\u4E00\u6216\u591A\u500B\u7570\u5E38\u7684\u884C\u7D50\u675F\u5B57\u5143\uFF0C\u4F8B\u5982\u884C\u5206\u9694\u7B26\u865F (LS) \u6216\u6BB5\u843D\u5206\u9694\u7B26\u865F (PS)\u3002\r\n\r\n\u5EFA\u8B70\u60A8\u5C07\u5176\u5F9E\u6A94\u6848\u4E2D\u79FB\u9664\u3002\u9019\u53EF\u4EE5\u900F\u904E `editor.unusualLineTerminators` \u9032\u884C\u8A2D\u5B9A\u3002","\u79FB\u9664\u7570\u5E38\u7684\u884C\u7D50\u675F\u5B57\u5143(&&R)","\u5FFD\u7565"],"vs/editor/contrib/wordHighlighter/browser/highlightDecorations":["\u8B80\u53D6\u6B0A\u9650\u671F\u9593 (\u5982\u8B80\u53D6\u8B8A\u6578) \u7B26\u865F\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5BEB\u5165\u6B0A\u9650\u671F\u9593 (\u5982\u5BEB\u5165\u8B8A\u6578) \u7B26\u865F\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7B26\u865F\u6587\u5B57\u51FA\u73FE\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u8B80\u53D6\u5B58\u53D6\u671F\u9593 (\u4F8B\u5982\u8B80\u53D6\u8B8A\u6578\u6642) \u7B26\u865F\u7684\u908A\u6846\u984F\u8272\u3002","\u5BEB\u5165\u5B58\u53D6\u671F\u9593 (\u4F8B\u5982\u5BEB\u5165\u8B8A\u6578\u6642) \u7B26\u865F\u7684\u908A\u6846\u984F\u8272\u3002 ","\u7B26\u865F\u6587\u5B57\u51FA\u73FE\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u7B26\u865F\u9192\u76EE\u63D0\u793A\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5BEB\u5165\u6B0A\u9650\u7B26\u865F\u9192\u76EE\u63D0\u793A\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7B26\u865F\u6587\u5B57\u51FA\u73FE\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002"],"vs/editor/contrib/wordHighlighter/browser/wordHighlighter":["\u79FB\u81F3\u4E0B\u4E00\u500B\u53CD\u767D\u7B26\u865F","\u79FB\u81F3\u4E0A\u4E00\u500B\u53CD\u767D\u7B26\u865F","\u89F8\u767C\u7B26\u865F\u53CD\u767D\u986F\u793A"],"vs/editor/contrib/wordOperations/browser/wordOperations":["\u522A\u9664\u5B57\u7D44"],"vs/platform/action/common/actionCommonCategories":["\u6AA2\u8996","\u8AAA\u660E","\u6E2C\u8A66","\u6A94\u6848","\u559C\u597D\u8A2D\u5B9A","\u958B\u767C\u4EBA\u54E1"],"vs/platform/actionWidget/browser/actionList":["{0} \u4EE5\u5957\u7528\uFF0C{1} \u4EE5\u9810\u89BD","{0} \u4EE5\u7533\u8ACB","{0}\uFF0C\u505C\u7528\u539F\u56E0: {1}","\u52D5\u4F5C\u5C0F\u5DE5\u5177"],"vs/platform/actionWidget/browser/actionWidget":["\u52D5\u4F5C\u5217\u4E2D\u5207\u63DB\u52D5\u4F5C\u9805\u76EE\u7684\u80CC\u666F\u8272\u5F69\u3002","\u662F\u5426\u986F\u793A\u52D5\u4F5C\u5C0F\u5DE5\u5177\u6E05\u55AE","\u96B1\u85CF\u52D5\u4F5C\u5C0F\u5DE5\u5177","\u9078\u53D6\u4E0A\u4E00\u500B\u52D5\u4F5C","\u9078\u53D6\u4E0B\u4E00\u500B\u52D5\u4F5C","\u63A5\u53D7\u9078\u53D6\u7684\u52D5\u4F5C","\u9810\u89BD\u9078\u53D6\u7684\u52D5\u4F5C"],"vs/platform/actions/browser/menuEntryActionViewItem":["{0} ({1})","{0} ({1})",`{0}\r -[{1}] {2}`],"vs/platform/actions/browser/toolbar":["\u96B1\u85CF","\u91CD\u8A2D\u529F\u80FD\u8868"],"vs/platform/actions/common/menuService":["\u96B1\u85CF '{0}'"],"vs/platform/audioCues/browser/audioCueService":["\u884C\u4E0A\u767C\u751F\u932F\u8AA4","\u884C\u4E0A\u7684\u8B66\u544A","\u884C\u4E0A\u7684\u647A\u758A\u5340\u57DF","\u884C\u4E0A\u7684\u4E2D\u65B7\u9EDE","\u884C\u4E0A\u7684\u5167\u5D4C\u5EFA\u8B70","\u7D42\u7AEF\u6A5F\u5FEB\u901F\u4FEE\u6B63","\u5728\u4E2D\u65B7\u9EDE\u505C\u6B62\u5075\u932F\u5DE5\u5177","\u884C\u4E0A\u6C92\u6709\u5D4C\u5165\u63D0\u793A","\u5DE5\u4F5C\u5B8C\u6210","\u5DE5\u4F5C\u5931\u6557","\u7D42\u7AEF\u6A5F\u547D\u4EE4\u5931\u6557","\u7D42\u7AEF\u9234","Notebook \u5132\u5B58\u683C\u5DF2\u5B8C\u6210","Notebook \u5132\u5B58\u683C\u5931\u6557","\u5DEE\u7570\u884C\u5DF2\u63D2\u5165","\u5DEE\u7570\u884C\u5DF2\u522A\u9664","\u5DEE\u7570\u884C\u5DF2\u4FEE\u6539","\u804A\u5929\u8981\u6C42\u5DF2\u50B3\u9001","\u804A\u5929\u56DE\u61C9\u5DF2\u63A5\u6536","\u804A\u5929\u56DE\u61C9\u64F1\u7F6E\u4E2D"],"vs/platform/configuration/common/configurationRegistry":["\u9810\u8A2D\u8A9E\u8A00\u7D44\u614B\u8986\u5BEB","\u8A2D\u5B9A\u8981\u91DD\u5C0D {0} \u8A9E\u8A00\u8986\u5BEB\u7684\u8A2D\u5B9A\u3002","\u8A2D\u5B9A\u8981\u91DD\u5C0D\u8A9E\u8A00\u8986\u5BEB\u7684\u7DE8\u8F2F\u5668\u8A2D\u5B9A\u3002","\u9019\u500B\u8A2D\u5B9A\u4E0D\u652F\u63F4\u4EE5\u8A9E\u8A00\u70BA\u6839\u64DA\u7684\u7D44\u614B\u3002","\u8A2D\u5B9A\u8981\u91DD\u5C0D\u8A9E\u8A00\u8986\u5BEB\u7684\u7DE8\u8F2F\u5668\u8A2D\u5B9A\u3002","\u9019\u500B\u8A2D\u5B9A\u4E0D\u652F\u63F4\u4EE5\u8A9E\u8A00\u70BA\u6839\u64DA\u7684\u7D44\u614B\u3002","\u7121\u6CD5\u8A3B\u518A\u7A7A\u767D\u5C6C\u6027","\u7121\u6CD5\u8A3B\u518A '{0}'\u3002\u9019\u7B26\u5408\u7528\u65BC\u63CF\u8FF0\u8A9E\u8A00\u5C08\u7528\u7DE8\u8F2F\u5668\u8A2D\u5B9A\u7684\u5C6C\u6027\u6A21\u5F0F '\\\\[.*\\\\]$'\u3002\u8ACB\u4F7F\u7528 'configurationDefaults' \u8CA2\u737B\u3002","\u7121\u6CD5\u8A3B\u518A '{0}'\u3002\u6B64\u5C6C\u6027\u5DF2\u7D93\u8A3B\u518A\u3002","\u7121\u6CD5\u8A3B\u518A '{0}'\u3002\u5DF2\u5411 {2} \u8A3B\u518A\u95DC\u806F\u7684\u539F\u5247 {1}\u3002"],"vs/platform/contextkey/browser/contextKeyService":["\u50B3\u56DE\u6709\u95DC\u5167\u5BB9\u7D22\u5F15\u9375\u8CC7\u8A0A\u7684\u547D\u4EE4"],"vs/platform/contextkey/common/contextkey":["\u7A7A\u7684\u5167\u5BB9\u7D22\u5F15\u9375\u904B\u7B97\u5F0F","\u60A8\u662F\u5426\u5FD8\u8A18\u64B0\u5BEB\u904B\u7B97\u5F0F? \u60A8\u4E5F\u53EF\u4EE5\u5206\u5225\u653E\u7F6E 'false' \u6216 'true'\uFF0C\u4EE5\u4E00\u5F8B\u8A55\u4F30\u70BA False \u6216 True\u3002","'not' \u5F8C\u70BA 'in'\u3002","\u53F3\u62EC\u5F27 ')'","\u672A\u9810\u671F\u7684\u6B0A\u6756","\u60A8\u662F\u5426\u5FD8\u8A18\u5728\u6B0A\u6756\u4E4B\u524D\u653E\u7F6E && \u6216 ||?","\u904B\u7B97\u5F0F\u672A\u9810\u671F\u7684\u7D50\u5C3E","\u60A8\u662F\u5426\u5FD8\u8A18\u653E\u7F6E\u5167\u5BB9\u91D1\u9470?",`\u9810\u671F: {0}\r -\u6536\u5230: '{1}'\u3002`],"vs/platform/contextkey/common/contextkeys":["\u4F5C\u696D\u7CFB\u7D71\u662F\u5426\u70BA macOS","\u4F5C\u696D\u7CFB\u7D71\u662F\u5426\u70BA Linux","\u4F5C\u696D\u7CFB\u7D71\u662F\u5426\u70BA Windows","\u5E73\u53F0\u662F\u5426\u70BA\u7DB2\u9801\u700F\u89BD\u5668","\u975E\u700F\u89BD\u5668\u5E73\u53F0\u4E0A\u7684\u4F5C\u696D\u7CFB\u7D71\u662F\u5426\u70BA macOS","\u4F5C\u696D\u7CFB\u7D71\u662F\u5426\u70BA iOS","\u5E73\u81FA\u662F\u5426\u70BA\u884C\u52D5\u7DB2\u9801\u700F\u89BD\u5668","VS Code \u7684\u54C1\u8CEA\u985E\u578B","\u9375\u76E4\u7126\u9EDE\u662F\u5426\u4F4D\u65BC\u8F38\u5165\u65B9\u584A\u5167"],"vs/platform/contextkey/common/scanner":["\u60A8\u662F\u6307 '{0}'?","\u60A8\u662F\u6307 {0} \u6216 {1}?","\u60A8\u662F\u6307 {0}\u3001{1} \u6216 {2}?","\u60A8\u662F\u5426\u5FD8\u8A18\u5DE6\u62EC\u5F27\u6216\u53F3\u62EC\u5F27?","\u60A8\u662F\u5426\u5FD8\u8A18\u9038\u51FA '/' (\u659C\u7DDA) \u5B57\u5143? \u5728\u53CD\u659C\u7DDA\u524D\u653E\u5169\u500B\u53CD\u659C\u7DDA\u4EE5\u9038\u51FA\uFF0C\u4F8B\u5982 '\\\\/'\u3002"],"vs/platform/history/browser/contextScopedHistoryWidget":["\u662F\u5426\u986F\u793A\u5EFA\u8B70"],"vs/platform/keybinding/common/abstractKeybindingService":["\u5DF2\u6309\u4E0B ({0})\u3002\u7B49\u5F85\u7B2C\u4E8C\u500B\u5957\u7D22\u9375...","({0}) \u5DF2\u6309\u4E0B\u3002\u6B63\u5728\u7B49\u5F85\u4E0B\u4E00\u500B\u5957\u7D22\u9375...","\u6309\u9375\u7D44\u5408 ({0}, {1}) \u4E0D\u662F\u547D\u4EE4\u3002","\u6309\u9375\u7D44\u5408 ({0}, {1}) \u4E0D\u662F\u547D\u4EE4\u3002"],"vs/platform/list/browser/listService":["\u5DE5\u4F5C\u53F0","\u5C0D\u61C9Windows\u548CLinux\u7684'Control'\u8207\u5C0D\u61C9 macOS \u7684'Command'\u3002","\u5C0D\u61C9Windows\u548CLinux\u7684'Alt'\u8207\u5C0D\u61C9macOS\u7684'Option'\u3002","\u900F\u904E\u6ED1\u9F20\u591A\u9078\uFF0C\u7528\u65BC\u5728\u6A39\u72C0\u76EE\u9304\u8207\u6E05\u55AE\u4E2D\u65B0\u589E\u9805\u76EE\u7684\u8F14\u52A9\u6309\u9375 (\u4F8B\u5982\u5728\u7E3D\u7BA1\u4E2D\u958B\u555F\u7DE8\u8F2F\u5668 \u53CA SCM \u6AA2\u8996)\u3002'\u5728\u5074\u908A\u958B\u555F' \u6ED1\u9F20\u624B\u52E2 (\u82E5\u652F\u63F4) \u5C07\u6703\u9069\u61C9\u4EE5\u907F\u514D\u548C\u591A\u9078\u8F14\u52A9\u6309\u9375\u885D\u7A81\u3002","\u63A7\u5236\u5982\u4F55\u4F7F\u7528\u6ED1\u9F20 (\u5982\u652F\u63F4\u6B64\u7528\u6CD5) \u958B\u555F\u6A39\u72C0\u76EE\u9304\u8207\u6E05\u55AE\u4E2D\u7684\u9805\u76EE\u3002\u82E5\u4E0D\u9069\u7528\uFF0C\u67D0\u4E9B\u6A39\u72C0\u76EE\u9304\u8207\u6E05\u55AE\u53EF\u80FD\u6703\u9078\u64C7\u5FFD\u7565\u6B64\u8A2D\u5B9A\u3002","\u63A7\u5236\u5728\u5DE5\u4F5C\u53F0\u4E2D\uFF0C\u6E05\u55AE\u8207\u6A39\u72C0\u7D50\u69CB\u662F\u5426\u652F\u63F4\u6C34\u5E73\u6372\u52D5\u3002\u8B66\u544A: \u958B\u555F\u6B64\u8A2D\u5B9A\u5C07\u6703\u5F71\u97FF\u6548\u80FD\u3002","\u63A7\u5236\u6309\u4E00\u4E0B\u6372\u8EF8\u662F\u5426\u9010\u9801\u6372\u52D5\u3002","\u63A7\u5236\u6A39\u72C0\u7D50\u69CB\u7E2E\u6392 (\u50CF\u7D20)\u3002","\u63A7\u5236\u6A39\u7CFB\u662F\u5426\u61C9\u8F49\u8B6F\u7E2E\u6392\u8F14\u52A9\u7DDA\u3002","\u63A7\u5236\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u662F\u5426\u5177\u6709\u5E73\u6ED1\u6372\u52D5\u3002","\u8981\u7528\u65BC\u6ED1\u9F20\u6EFE\u8F2A\u6372\u52D5\u4E8B\u4EF6 `deltaX` \u548C `deltaY` \u7684\u4E58\u6578\u3002","\u6309\u4E0B `Alt` \u6642\u7684\u6372\u52D5\u901F\u5EA6\u4E58\u6578\u3002","\u641C\u5C0B\u6642\u6703\u9192\u76EE\u63D0\u793A\u5143\u7D20\u3002\u9032\u4E00\u6B65\u7684\u5411\u4E0A\u548C\u5411\u4E0B\u700F\u89BD\u53EA\u6703\u5468\u904A\u5DF2\u9192\u76EE\u63D0\u793A\u7684\u5143\u7D20\u3002","\u641C\u5C0B\u6642\u7BE9\u9078\u5143\u7D20\u3002","\u63A7\u5236 Workbench \u4E2D\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u7684\u9810\u8A2D\u5C0B\u627E\u6A21\u5F0F\u3002","\u6BD4\u5C0D\u6309\u9375\u8F38\u5165\u7684\u7C21\u6613\u6309\u9375\u700F\u89BD\u7126\u9EDE\u5143\u7D20\u3002\u50C5\u6BD4\u5C0D\u524D\u7F6E\u8A5E\u3002","\u9192\u76EE\u63D0\u793A\u9375\u76E4\u700F\u89BD\u6703\u9192\u76EE\u63D0\u793A\u7B26\u5408\u9375\u76E4\u8F38\u5165\u7684\u5143\u7D20\u3002\u9032\u4E00\u6B65\u5411\u4E0A\u6216\u5411\u4E0B\u700F\u89BD\u53EA\u6703\u5468\u904A\u9192\u76EE\u63D0\u793A\u7684\u5143\u7D20\u3002","\u7BE9\u9078\u9375\u76E4\u700F\u89BD\u6703\u7BE9\u6389\u4E26\u96B1\u85CF\u4E0D\u7B26\u5408\u9375\u76E4\u8F38\u5165\u7684\u6240\u6709\u5143\u7D20\u3002","\u63A7\u5236 Workbench \u4E2D\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u7684\u9375\u76E4\u700F\u89BD\u6A23\u5F0F\u3002\u53EF\u4EE5\u662F\u7C21\u6613\u7684\u3001\u9192\u76EE\u63D0\u793A\u548C\u7BE9\u9078\u3002","\u8ACB\u6539\u70BA\u4F7F\u7528 'workbench.list.defaultFindMode' \u548C 'workbench.list.typeNavigationMode'\u3002","\u641C\u5C0B\u6642\u4F7F\u7528\u6A21\u7CCA\u6BD4\u5C0D\u3002","\u641C\u5C0B\u6642\u4F7F\u7528\u9023\u7E8C\u6BD4\u5C0D\u3002","\u63A7\u5236\u5728\u5DE5\u4F5C\u53F0\u4E2D\u641C\u5C0B\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u6642\u6240\u4F7F\u7528\u7684\u6BD4\u5C0D\u985E\u578B\u3002","\u63A7\u5236\u7576\u6309\u4E0B\u8CC7\u6599\u593E\u540D\u7A31\u6642\uFF0C\u6A39\u72C0\u76EE\u9304\u8CC7\u6599\u593E\u7684\u5C55\u958B\u65B9\u5F0F\u3002\u8ACB\u6CE8\u610F\uFF0C\u82E5\u4E0D\u9069\u7528\uFF0C\u67D0\u4E9B\u6A39\u72C0\u76EE\u9304\u548C\u6E05\u55AE\u53EF\u80FD\u6703\u9078\u64C7\u5FFD\u7565\u6B64\u8A2D\u5B9A\u3002","\u63A7\u5236\u5DE5\u4F5C\u53F0\u4E2D\u6E05\u55AE\u548C\u6A39\u72C0\u76EE\u9304\u7684\u985E\u578B\u700F\u89BD\u904B\u4F5C\u65B9\u5F0F\u3002\u8A2D\u5B9A\u70BA 'trigger' \u6642\uFF0C\u985E\u578B\u700F\u89BD\u6703\u5728\u57F7\u884C 'list.triggerTypeNavigation' \u547D\u4EE4\u6642\u96A8\u5373\u958B\u59CB\u3002"],"vs/platform/markers/common/markers":["\u932F\u8AA4","\u8B66\u544A","\u8CC7\u8A0A"],"vs/platform/quickinput/browser/commandsQuickAccess":["\u6700\u8FD1\u4F7F\u7528\u7684","\u985E\u4F3C\u7684\u547D\u4EE4","\u7D93\u5E38\u4F7F\u7528","\u5176\u4ED6\u547D\u4EE4","\u985E\u4F3C\u7684\u547D\u4EE4","{0}, {1}","\u547D\u4EE4 '{0}' \u9020\u6210\u932F\u8AA4"],"vs/platform/quickinput/browser/helpQuickAccess":["{0}, {1}"],"vs/platform/quickinput/browser/quickInput":["\u4E0A\u4E00\u9801","\u6309 'Enter' \u9375\u78BA\u8A8D\u60A8\u7684\u8F38\u5165\u6216\u6309 'Esc' \u9375\u53D6\u6D88","{0}/{1}","\u8F38\u5165\u4EE5\u7E2E\u5C0F\u7D50\u679C\u7BC4\u570D\u3002"],"vs/platform/quickinput/browser/quickInputController":["\u5207\u63DB\u6240\u6709\u6838\u53D6\u65B9\u584A","{0} \u500B\u7D50\u679C","\u5DF2\u9078\u64C7 {0}","\u78BA\u5B9A","\u81EA\u8A02","\u80CC\u9762 ({0})","\u8FD4\u56DE"],"vs/platform/quickinput/browser/quickInputList":["\u5FEB\u901F\u8F38\u5165"],"vs/platform/quickinput/browser/quickInputUtils":["\u6309\u4E00\u4E0B\u4EE5\u57F7\u884C\u547D\u4EE4 \u2018{0}\u2019"],"vs/platform/theme/common/colorRegistry":["\u6574\u9AD4\u7684\u524D\u666F\u8272\u5F69\u3002\u50C5\u7576\u672A\u88AB\u4EFB\u4F55\u5143\u4EF6\u8986\u758A\u6642\uFF0C\u624D\u6703\u4F7F\u7528\u6B64\u8272\u5F69\u3002","\u5DF2\u505C\u7528\u5143\u7D20\u7684\u6574\u9AD4\u524D\u666F\u3002\u53EA\u6709\u5728\u5143\u4EF6\u672A\u8986\u84CB\u6642\uFF0C\u624D\u80FD\u4F7F\u7528\u9019\u500B\u8272\u5F69\u3002","\u6574\u9AD4\u932F\u8AA4\u8A0A\u606F\u7684\u524D\u666F\u8272\u5F69\u3002\u50C5\u7576\u672A\u88AB\u4EFB\u4F55\u5143\u4EF6\u8986\u84CB\u6642\uFF0C\u624D\u6703\u4F7F\u7528\u6B64\u8272\u5F69\u3002","\u63D0\u4F9B\u9644\u52A0\u8A0A\u606F\u7684\u524D\u666F\u984F\u8272,\u4F8B\u5982\u6A19\u7C64","\u5DE5\u4F5C\u53F0\u4E2D\u5716\u793A\u7684\u9810\u8A2D\u8272\u5F69\u3002","\u7126\u9EDE\u9805\u76EE\u7684\u6574\u9AD4\u6846\u7DDA\u8272\u5F69\u3002\u53EA\u5728\u6C92\u6709\u4EFB\u4F55\u5143\u4EF6\u8986\u5BEB\u6B64\u8272\u5F69\u6642\uFF0C\u624D\u6703\u52A0\u4EE5\u4F7F\u7528\u3002","\u9805\u76EE\u5468\u570D\u7684\u984D\u5916\u6846\u7DDA\uFF0C\u53EF\u5C07\u9805\u76EE\u5F9E\u5176\u4ED6\u9805\u76EE\u4E2D\u5340\u9694\u51FA\u4F86\u4EE5\u63D0\u9AD8\u5C0D\u6BD4\u3002","\u4F7F\u7528\u4E2D\u9805\u76EE\u5468\u570D\u7684\u984D\u5916\u908A\u754C\uFF0C\u53EF\u5C07\u9805\u76EE\u5F9E\u5176\u4ED6\u9805\u76EE\u4E2D\u5340\u9694\u51FA\u4F86\u4EE5\u63D0\u9AD8\u5C0D\u6BD4\u3002","\u4F5C\u696D\u5340\u57DF\u9078\u53D6\u7684\u80CC\u666F\u984F\u8272(\u4F8B\u5982\u8F38\u5165\u6216\u6587\u5B57\u5340\u57DF)\u3002\u8ACB\u6CE8\u610F\uFF0C\u9019\u4E0D\u9069\u7528\u65BC\u7DE8\u8F2F\u5668\u4E2D\u7684\u9078\u53D6\u3002","\u6587\u5B57\u5206\u9694\u7B26\u865F\u7684\u984F\u8272\u3002","\u5167\u6587\u9023\u7D50\u7684\u524D\u666F\u8272\u5F69","\u7576\u6ED1\u9F20\u9EDE\u64CA\u6216\u61F8\u505C\u6642\uFF0C\u6587\u5B57\u4E2D\u9023\u7D50\u7684\u524D\u666F\u8272\u5F69\u3002","\u63D0\u793A\u53CA\u5EFA\u8B70\u6587\u5B57\u7684\u524D\u666F\u8272\u5F69\u3002","\u6587\u5167\u5F15\u7528\u5340\u584A\u80CC\u666F\u8272\u5F69\u3002","\u5F15\u7528\u6587\u5B57\u7684\u6846\u7DDA\u984F\u8272\u3002","\u6587\u5B57\u5340\u584A\u7684\u80CC\u666F\u984F\u8272\u3002","\u5C0F\u5DE5\u5177\u7684\u9670\u5F71\u8272\u5F69\uFF0C\u4F8B\u5982\u7DE8\u8F2F\u5668\u4E2D\u7684\u5C0B\u627E/\u53D6\u4EE3\u3002","\u5C0F\u5DE5\u5177\u7684\u6846\u7DDA\u8272\u5F69\uFF0C\u4F8B\u5982\u7DE8\u8F2F\u5668\u4E2D\u7684\u5C0B\u627E/\u53D6\u4EE3\u3002","\u8F38\u5165\u65B9\u584A\u7684\u80CC\u666F\u3002","\u8F38\u5165\u65B9\u584A\u7684\u524D\u666F\u3002","\u8F38\u5165\u65B9\u584A\u7684\u6846\u7DDA\u3002","\u8F38\u5165\u6B04\u4F4D\u4E2D\u53EF\u4F7F\u7528\u4E4B\u9805\u76EE\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u5728\u8F38\u5165\u6B04\u4F4D\u4E2D\u6240\u555F\u52D5\u9078\u9805\u7684\u80CC\u666F\u8272\u5F69\u3002","\u8F38\u5165\u6B04\u4F4D\u4E2D\u9078\u9805\u7684\u80CC\u666F\u66AB\u7559\u8272\u5F69\u3002","\u5728\u8F38\u5165\u6B04\u4F4D\u4E2D\u6240\u555F\u52D5\u9078\u9805\u7684\u524D\u666F\u8272\u5F69\u3002","\u6587\u5B57\u8F38\u5165\u66FF\u4EE3\u5B57\u7B26\u7684\u524D\u666F\u984F\u8272\u3002","\u8CC7\u8A0A\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u80CC\u666F\u8272\u5F69\u3002","\u8CC7\u8A0A\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u524D\u666F\u8272\u5F69\u3002","\u8CC7\u8A0A\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u908A\u754C\u8272\u5F69\u3002","\u8B66\u544A\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u80CC\u666F\u8272\u5F69\u3002","\u8B66\u544A\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u524D\u666F\u8272\u5F69\u3002","\u8B66\u544A\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u908A\u754C\u8272\u5F69\u3002","\u932F\u8AA4\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u80CC\u666F\u8272\u5F69\u3002","\u932F\u8AA4\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u524D\u666F\u8272\u5F69\u3002","\u932F\u8AA4\u56B4\u91CD\u6027\u7684\u8F38\u5165\u9A57\u8B49\u908A\u754C\u8272\u5F69\u3002","\u4E0B\u62C9\u5F0F\u6E05\u55AE\u7684\u80CC\u666F\u3002","\u4E0B\u62C9\u5F0F\u6E05\u55AE\u7684\u80CC\u666F\u3002","\u4E0B\u62C9\u5F0F\u6E05\u55AE\u7684\u524D\u666F\u3002","\u4E0B\u62C9\u5F0F\u6E05\u55AE\u7684\u6846\u7DDA\u3002","\u6309\u9215\u524D\u666F\u8272\u5F69\u3002","\u5206\u9694\u7DDA\u8272\u5F69\u6309\u9215\u3002","\u6309\u9215\u80CC\u666F\u8272\u5F69\u3002","\u66AB\u7559\u6642\u7684\u6309\u9215\u80CC\u666F\u8272\u5F69\u3002","\u6309\u9215\u6846\u7DDA\u8272\u5F69\u3002","\u6B21\u8981\u6309\u9215\u524D\u666F\u8272\u5F69\u3002","\u6B21\u8981\u6309\u9215\u80CC\u666F\u8272\u5F69\u3002","\u6ED1\u9F20\u66AB\u7559\u6642\u7684\u6B21\u8981\u6309\u9215\u80CC\u666F\u8272\u5F69\u3002","\u6A19\u8A18\u7684\u80CC\u666F\u984F\u8272\u3002\u6A19\u8A18\u70BA\u5C0F\u578B\u7684\u8A0A\u606F\u6A19\u7C64,\u4F8B\u5982\u641C\u5C0B\u7D50\u679C\u7684\u6578\u91CF\u3002","\u6A19\u8A18\u7684\u524D\u666F\u984F\u8272\u3002\u6A19\u8A18\u70BA\u5C0F\u578B\u7684\u8A0A\u606F\u6A19\u7C64,\u4F8B\u5982\u641C\u5C0B\u7D50\u679C\u7684\u6578\u91CF\u3002","\u6307\u51FA\u5728\u6372\u52D5\u8A72\u6AA2\u8996\u7684\u6372\u8EF8\u9670\u5F71\u3002","\u6372\u8EF8\u6ED1\u687F\u7684\u80CC\u666F\u984F\u8272\u3002","\u52D5\u614B\u986F\u793A\u6642\u6372\u8EF8\u6ED1\u687F\u7684\u80CC\u666F\u984F\u8272\u3002","\u7576\u9EDE\u64CA\u6642\u6372\u8EF8\u6ED1\u687F\u7684\u80CC\u666F\u984F\u8272\u3002","\u9577\u6642\u9593\u904B\u884C\u9032\u5EA6\u689D\u7684\u80CC\u666F\u8272\u5F69.","\u7DE8\u8F2F\u5668\u4E2D\u932F\u8AA4\u6587\u5B57\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7DE8\u8F2F\u5668\u5167\u932F\u8AA4\u63D0\u793A\u7DDA\u7684\u524D\u666F\u8272\u5F69.","\u5982\u679C\u8A2D\u5B9A\uFF0C\u7DE8\u8F2F\u5668\u4E2D\u7684\u932F\u8AA4\u6703\u986F\u793A\u96D9\u5E95\u7DDA\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u4E2D\u8B66\u544A\u6587\u5B57\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7DE8\u8F2F\u5668\u5167\u8B66\u544A\u63D0\u793A\u7DDA\u7684\u524D\u666F\u8272\u5F69.","\u5982\u679C\u8A2D\u5B9A\uFF0C\u7DE8\u8F2F\u5668\u4E2D\u7684\u8B66\u544A\u6703\u986F\u793A\u96D9\u5E95\u7DDA\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u4E2D\u8CC7\u8A0A\u6587\u5B57\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7DE8\u8F2F\u5668\u5167\u8CC7\u8A0A\u63D0\u793A\u7DDA\u7684\u524D\u666F\u8272\u5F69","\u5982\u679C\u8A2D\u5B9A\uFF0C\u7DE8\u8F2F\u5668\u4E2D\u7684\u63D0\u793A\u6703\u986F\u793A\u96D9\u5E95\u7DDA\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u5167\u63D0\u793A\u8A0A\u606F\u7684\u63D0\u793A\u7DDA\u524D\u666F\u8272\u5F69","\u5982\u679C\u8A2D\u5B9A\uFF0C\u7DE8\u8F2F\u5668\u4E2D\u7684\u63D0\u793A\u6703\u986F\u793A\u96D9\u5E95\u7DDA\u8272\u5F69\u3002","\u4F7F\u7528\u4E2D\u98FE\u5E36\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u7684\u80CC\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u7684\u9810\u8A2D\u524D\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u7684\u9ECF\u6EEF\u5377\u8EF8\u80CC\u666F\u8272\u5F69","\u7DE8\u8F2F\u5668\u7684\u6E38\u6A19\u80CC\u666F\u8272\u5F69\u4E0A\u7684\u9ECF\u6EEF\u5377\u8EF8","\u7DE8\u8F2F\u5668\u5C0F\u5DE5\u5177\u7684\u80CC\u666F\u8272\u5F69\uFF0C\u4F8B\u5982\u5C0B\u627E/\u53D6\u4EE3\u3002","\u7DE8\u8F2F\u5668\u5C0F\u5DE5\u5177 (\u4F8B\u5982\u5C0B\u627E/\u53D6\u4EE3) \u7684\u524D\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u5C0F\u5DE5\u5177\u7684\u908A\u754C\u8272\u5F69\u3002\u5C0F\u5DE5\u5177\u9078\u64C7\u64C1\u6709\u908A\u754C\u6216\u8272\u5F69\u672A\u88AB\u5C0F\u5DE5\u5177\u8986\u5BEB\u6642\uFF0C\u624D\u6703\u4F7F\u7528\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u5C0F\u5DE5\u5177\u4E4B\u8ABF\u6574\u5927\u5C0F\u5217\u7684\u908A\u754C\u8272\u5F69\u3002\u53EA\u5728\u5C0F\u5DE5\u5177\u9078\u64C7\u5177\u6709\u8ABF\u6574\u5927\u5C0F\u908A\u754C\u4E14\u672A\u8986\u5BEB\u8A72\u8272\u5F69\u6642\uFF0C\u624D\u4F7F\u7528\u8A72\u8272\u5F69\u3002","\u5FEB\u901F\u9078\u64C7\u5668\u80CC\u666F\u8272\u5F69\u3002\u8A72\u5FEB\u901F\u9078\u64C7\u5668\u5C0F\u5DE5\u5177\u662F\u985E\u4F3C\u547D\u4EE4\u9078\u64C7\u5340\u7684\u9078\u64C7\u5668\u5BB9\u5668\u3002","\u5FEB\u901F\u9078\u64C7\u5668\u524D\u666F\u8272\u5F69\u3002\u5FEB\u901F\u9078\u64C7\u5668\u5C0F\u5DE5\u5177\u662F\u985E\u4F3C\u547D\u4EE4\u9078\u64C7\u5340\u7B49\u9078\u64C7\u5668\u7684\u5BB9\u5668\u3002","\u5FEB\u901F\u9078\u64C7\u5668\u6A19\u984C\u80CC\u666F\u8272\u5F69\u3002\u5FEB\u901F\u9078\u64C7\u5668\u5C0F\u5DE5\u5177\u662F\u985E\u4F3C\u547D\u4EE4\u9078\u64C7\u5340\u7684\u9078\u64C7\u5668\u5BB9\u5668\u3002","\u5206\u7D44\u6A19\u7C64\u7684\u5FEB\u901F\u9078\u64C7\u5668\u8272\u5F69\u3002","\u5206\u7D44\u908A\u754C\u7684\u5FEB\u901F\u9078\u64C7\u5668\u8272\u5F69\u3002","\u91D1\u9470\u7D81\u5B9A\u6A19\u7C64\u80CC\u666F\u8272\u5F69\u3002\u6309\u9375\u7D81\u5B9A\u6A19\u7C64\u7528\u4F86\u4EE3\u8868\u9375\u76E4\u5FEB\u901F\u9375\u3002","\u91D1\u9470\u7D81\u5B9A\u6A19\u7C64\u524D\u666F\u8272\u5F69\u3002\u6309\u9375\u7D81\u5B9A\u6A19\u7C64\u7528\u4F86\u4EE3\u8868\u9375\u76E4\u5FEB\u901F\u9375\u3002","\u91D1\u9470\u7D81\u5B9A\u6A19\u7C64\u908A\u6846\u8272\u5F69\u3002\u6309\u9375\u7D81\u5B9A\u6A19\u7C64\u7528\u4F86\u4EE3\u8868\u9375\u76E4\u5FEB\u901F\u9375\u3002","\u91D1\u9470\u7D81\u5B9A\u6A19\u7C64\u908A\u6846\u5E95\u90E8\u8272\u5F69\u3002\u6309\u9375\u7D81\u5B9A\u6A19\u7C64\u7528\u4F86\u4EE3\u8868\u9375\u76E4\u5FEB\u901F\u9375\u3002","\u7DE8\u8F2F\u5668\u9078\u53D6\u7BC4\u570D\u7684\u8272\u5F69\u3002","\u70BA\u9078\u53D6\u7684\u6587\u5B57\u984F\u8272\u9AD8\u5C0D\u6BD4\u5316","\u975E\u4F7F\u7528\u4E2D\u7DE8\u8F2F\u5668\u5167\u7684\u9078\u53D6\u9805\u76EE\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u8207\u9078\u53D6\u9805\u76EE\u5167\u5BB9\u76F8\u540C\u4E4B\u5340\u57DF\u7684\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u9078\u53D6\u6642\uFF0C\u5167\u5BB9\u76F8\u540C\u4E4B\u5340\u57DF\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u7B26\u5408\u76EE\u524D\u641C\u5C0B\u7684\u8272\u5F69\u3002","\u5176\u4ED6\u641C\u5C0B\u76F8\u7B26\u9805\u76EE\u7684\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u9650\u5236\u641C\u5C0B\u4E4B\u7BC4\u570D\u7684\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7B26\u5408\u76EE\u524D\u641C\u5C0B\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u7B26\u5408\u5176\u4ED6\u641C\u5C0B\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u9650\u5236\u641C\u5C0B\u4E4B\u7BC4\u570D\u7684\u6846\u7DDA\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u641C\u5C0B\u7DE8\u8F2F\u5668\u67E5\u8A62\u7B26\u5408\u7684\u8272\u5F69\u3002","\u641C\u7D22\u7DE8\u8F2F\u5668\u67E5\u8A62\u7B26\u5408\u7684\u908A\u6846\u8272\u5F69\u3002","\u641C\u5C0B Viewlet \u5B8C\u6210\u8A0A\u606F\u4E2D\u6587\u5B57\u7684\u8272\u5F69\u3002","\u5728\u986F\u793A\u52D5\u614B\u986F\u793A\u7684\u6587\u5B57\u4E0B\u9192\u76EE\u63D0\u793A\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7DE8\u8F2F\u5668\u52D5\u614B\u986F\u793A\u7684\u80CC\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u52D5\u614B\u986F\u793A\u7684\u524D\u666F\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u52D5\u614B\u986F\u793A\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u66AB\u7559\u72C0\u614B\u5217\u7684\u80CC\u666F\u8272\u5F69\u3002","\u4F7F\u7528\u4E2D\u4E4B\u9023\u7D50\u7684\u8272\u5F69\u3002","\u5167\u5D4C\u63D0\u793A\u7684\u524D\u666F\u8272\u5F69","\u5167\u5D4C\u63D0\u793A\u7684\u80CC\u666F\u8272\u5F69","\u985E\u578B\u5167\u5D4C\u63D0\u793A\u7684\u524D\u666F\u8272\u5F69","\u985E\u578B\u5167\u5D4C\u63D0\u793A\u7684\u80CC\u666F\u8272\u5F69","\u53C3\u6578\u5167\u5D4C\u63D0\u793A\u7684\u524D\u666F\u8272\u5F69","\u53C3\u6578\u5167\u5D4C\u63D0\u793A\u7684\u80CC\u666F\u8272\u5F69","\u7528\u65BC\u71C8\u6CE1\u52D5\u4F5C\u5716\u793A\u7684\u8272\u5F69\u3002","\u7528\u65BC\u71C8\u6CE1\u81EA\u52D5\u4FEE\u6B63\u52D5\u4F5C\u5716\u793A\u7684\u8272\u5F69\u3002","\u5DF2\u63D2\u5165\u6587\u5B57\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5DF2\u79FB\u9664\u6587\u5B57\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5DF2\u63D2\u5165\u7A0B\u5F0F\u884C\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5DF2\u79FB\u9664\u7A0B\u5F0F\u884C\u7684\u80CC\u666F\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u63D2\u5165\u7A0B\u5F0F\u884C\u6240\u5728\u908A\u754C\u7684\u80CC\u666F\u8272\u5F69\u3002","\u79FB\u9664\u7A0B\u5F0F\u884C\u6240\u5728\u908A\u754C\u7684\u80CC\u666F\u8272\u5F69\u3002","\u63D2\u5165\u5167\u5BB9\u7684\u5DEE\u7570\u6982\u89C0\u5C3A\u898F\u524D\u666F\u3002","\u79FB\u9664\u5167\u5BB9\u7684\u5DEE\u7570\u6982\u89C0\u5C3A\u898F\u524D\u666F\u3002","\u63D2\u5165\u7684\u6587\u5B57\u5916\u6846\u8272\u5F69\u3002","\u79FB\u9664\u7684\u6587\u5B57\u5916\u6846\u8272\u5F69\u3002","\u5169\u500B\u6587\u5B57\u7DE8\u8F2F\u5668\u4E4B\u9593\u7684\u6846\u7DDA\u8272\u5F69\u3002","Diff \u7DE8\u8F2F\u5668\u7684\u659C\u7D0B\u586B\u6EFF\u8272\u5F69\u3002\u659C\u7D0B\u586B\u6EFF\u7528\u65BC\u4E26\u6392 Diff \u6AA2\u8996\u3002","Diff \u7DE8\u8F2F\u5668\u4E2D\u672A\u8B8A\u66F4\u5340\u584A\u7684\u80CC\u666F\u8272\u5F69\u3002","Diff \u7DE8\u8F2F\u5668\u4E2D\u672A\u8B8A\u66F4\u5340\u584A\u7684\u524D\u666F\u8272\u5F69\u3002","Diff \u7DE8\u8F2F\u5668\u4E2D\u672A\u8B8A\u66F4\u7A0B\u5F0F\u78BC\u7684\u80CC\u666F\u8272\u5F69\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u7126\u9EDE\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u80CC\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u7126\u9EDE\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u524D\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u7126\u9EDE\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u5916\u6846\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u4E26\u5DF2\u9078\u53D6\u6642\uFF0C\u7126\u9EDE\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u5916\u6846\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u5177\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u6240\u9078\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u80CC\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u6240\u9078\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u524D\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u6240\u9078\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u5716\u793A\u524D\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u975E\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u6240\u9078\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u80CC\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u6240\u9078\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u524D\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u975E\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u6240\u9078\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u5716\u793A\u524D\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u70BA\u975E\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u7126\u9EDE\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u80CC\u666F\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u7576\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u70BA\u975E\u4F7F\u7528\u4E2D\u72C0\u614B\u6642\uFF0C\u7126\u9EDE\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u5916\u6846\u8272\u5F69\u3002\u4F7F\u7528\u4E2D\u7684\u6E05\u55AE/\u6A39\u72C0\u76EE\u9304\u6709\u9375\u76E4\u7126\u9EDE\uFF0C\u975E\u4F7F\u7528\u4E2D\u8005\u5247\u6C92\u6709\u3002","\u4F7F\u7528\u6ED1\u9F20\u66AB\u7559\u5728\u9805\u76EE\u6642\u7684\u6E05\u55AE/\u6A39\u72C0\u80CC\u666F\u3002","\u6ED1\u9F20\u66AB\u7559\u5728\u9805\u76EE\u6642\u7684\u6E05\u55AE/\u6A39\u72C0\u524D\u666F\u3002","\u4F7F\u7528\u6ED1\u9F20\u56DB\u8655\u79FB\u52D5\u9805\u76EE\u6642\u7684\u6E05\u55AE/\u6A39\u72C0\u62D6\u653E\u80CC\u666F\u3002","\u5728\u6E05\u55AE/\u6A39\u72C0\u5167\u641C\u5C0B\u6642\uFF0C\u76F8\u7B26\u9192\u76EE\u63D0\u793A\u7684\u6E05\u55AE/\u6A39\u72C0\u524D\u666F\u8272\u5F69\u3002","\u5728\u6E05\u55AE/\u6A39\u72C0\u5167\u641C\u5C0B\u6642\uFF0C\u76F8\u7B26\u9805\u76EE\u7684\u6E05\u55AE/\u6A39\u72C0\u7D50\u69CB\u524D\u666F\u8272\u5F69\u6703\u91DD\u5C0D\u4E3B\u52D5\u7126\u9EDE\u9805\u76EE\u9032\u884C\u5F37\u8ABF\u986F\u793A\u3002","\u5217\u8868/\u6A39\u72C0 \u7121\u6548\u9805\u76EE\u7684\u524D\u666F\u8272\u5F69\uFF0C\u4F8B\u5982\u5728\u700F\u89BD\u8996\u7A97\u7121\u6CD5\u89E3\u6790\u7684\u6839\u76EE\u9304","\u5305\u542B\u932F\u8AA4\u6E05\u55AE\u9805\u76EE\u7684\u524D\u666F\u8272\u5F69","\u5305\u542B\u8B66\u544A\u6E05\u55AE\u9805\u76EE\u7684\u524D\u666F\u8272\u5F69","\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u4E2D\u985E\u578B\u7BE9\u9078\u5C0F\u5DE5\u5177\u7684\u80CC\u666F\u8272\u5F69\u3002","\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u4E2D\u985E\u578B\u7BE9\u9078\u5C0F\u5DE5\u5177\u7684\u5927\u7DB1\u8272\u5F69\u3002","\u5728\u6C92\u6709\u76F8\u7B26\u9805\u76EE\u6642\uFF0C\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u4E2D\u985E\u578B\u7BE9\u9078\u5C0F\u5DE5\u5177\u7684\u5927\u7DB1\u8272\u5F69\u3002","\u6E05\u55AE\u548C\u6A39\u72C0\u7D50\u69CB\u4E2D\u985E\u578B\u7BE9\u9078\u5C0F\u5DE5\u5177\u7684\u9670\u5F71\u8272\u5F69\u3002","\u5DF2\u7BE9\u9078\u76F8\u7B26\u9805\u7684\u80CC\u666F\u8272\u5F69\u3002","\u5DF2\u7BE9\u9078\u76F8\u7B26\u9805\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u6A39\u72C0\u7B46\u89F8\u8272\u5F69\u3002","\u975E\u4F7F\u7528\u4E2D\u7E2E\u6392\u8F14\u52A9\u7DDA\u7684\u6A39\u72C0\u7B46\u89F8\u8272\u5F69\u3002","\u8CC7\u6599\u884C\u4E4B\u9593\u7684\u8CC7\u6599\u8868\u908A\u754C\u8272\u5F69\u3002","\u5947\u6578\u8CC7\u6599\u8868\u8CC7\u6599\u5217\u7684\u80CC\u666F\u8272\u5F69\u3002","\u5DF2\u53D6\u6D88\u5F37\u8ABF\u7684\u6E05\u55AE/\u6A39\u72C0\u7D50\u69CB\u524D\u666F\u8272\u5F69\u3002","\u6838\u53D6\u65B9\u584A\u5C0F\u5DE5\u5177\u7684\u80CC\u666F\u8272\u5F69\u3002","\u9078\u53D6\u5176\u6240\u8655\u5143\u7D20\u6642\uFF0C\u6838\u53D6\u65B9\u584A\u5C0F\u5DE5\u5177\u7684\u80CC\u666F\u8272\u5F69\u3002","\u6838\u53D6\u65B9\u584A\u5C0F\u5DE5\u5177\u7684\u524D\u666F\u8272\u5F69\u3002","\u6838\u53D6\u65B9\u584A\u5C0F\u5DE5\u5177\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u9078\u53D6\u5176\u6240\u8655\u5143\u7D20\u6642\uFF0C\u6838\u53D6\u65B9\u584A\u5C0F\u5DE5\u5177\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u8ACB\u6539\u7528 quickInputList.focusBackground","\u7126\u9EDE\u9805\u76EE\u7684\u5FEB\u901F\u9078\u64C7\u5668\u524D\u666F\u8272\u5F69\u3002","\u7126\u9EDE\u9805\u76EE\u7684\u5FEB\u901F\u9078\u64C7\u5668\u5716\u793A\u524D\u666F\u8272\u5F69\u3002","\u7126\u9EDE\u9805\u76EE\u7684\u5FEB\u901F\u9078\u64C7\u5668\u80CC\u666F\u8272\u5F69\u3002","\u529F\u80FD\u8868\u7684\u908A\u6846\u8272\u5F69\u3002","\u529F\u80FD\u8868\u9805\u76EE\u7684\u524D\u666F\u8272\u5F69\u3002","\u529F\u80FD\u8868\u9805\u76EE\u7684\u80CC\u666F\u8272\u5F69\u3002","\u529F\u80FD\u8868\u4E2D\u6240\u9078\u529F\u80FD\u8868\u9805\u76EE\u7684\u524D\u666F\u8272\u5F69\u3002","\u529F\u80FD\u8868\u4E2D\u6240\u9078\u529F\u80FD\u8868\u9805\u76EE\u7684\u80CC\u666F\u8272\u5F69\u3002","\u529F\u80FD\u8868\u4E2D\u6240\u9078\u529F\u80FD\u8868\u9805\u76EE\u7684\u6846\u7DDA\u8272\u5F69\u3002","\u529F\u80FD\u8868\u4E2D\u5206\u9694\u7DDA\u529F\u80FD\u8868\u9805\u76EE\u7684\u8272\u5F69\u3002","\u4F7F\u7528\u6ED1\u9F20\u5C07\u6E38\u6A19\u505C\u7559\u5728\u52D5\u4F5C\u4E0A\u65B9\u6642\u7684\u5DE5\u5177\u5217\u80CC\u666F","\u4F7F\u7528\u6ED1\u9F20\u5C07\u6E38\u6A19\u505C\u7559\u5728\u52D5\u4F5C\u4E0A\u65B9\u6642\u7684\u5DE5\u5177\u5217\u5916\u6846","\u5C07\u6ED1\u9F20\u79FB\u5230\u52D5\u4F5C\u4E0A\u65B9\u6642\u7684\u5DE5\u5177\u5217\u80CC\u666F","\u7A0B\u5F0F\u78BC\u7247\u6BB5\u5B9A\u4F4D\u505C\u99D0\u9EDE\u7684\u53CD\u767D\u986F\u793A\u80CC\u666F\u8272\u5F69\u3002","\u7A0B\u5F0F\u78BC\u7247\u6BB5\u5B9A\u4F4D\u505C\u99D0\u9EDE\u7684\u53CD\u767D\u986F\u793A\u908A\u754C\u8272\u5F69\u3002","\u7A0B\u5F0F\u78BC\u7247\u6BB5\u6700\u7D42\u5B9A\u4F4D\u505C\u99D0\u9EDE\u7684\u53CD\u767D\u986F\u793A\u80CC\u666F\u8272\u5F69\u3002","\u7A0B\u5F0F\u78BC\u7247\u6BB5\u6700\u7D42\u5B9A\u4F4D\u505C\u99D0\u9EDE\u7684\u9192\u76EE\u63D0\u793A\u6846\u7DDA\u8272\u5F69\u3002","\u7126\u9EDE\u968E\u5C64\u9023\u7D50\u9805\u76EE\u7684\u8272\u5F69\u3002","\u968E\u5C64\u9023\u7D50\u7684\u80CC\u666F\u8272\u3002","\u7126\u9EDE\u968E\u5C64\u9023\u7D50\u9805\u76EE\u7684\u8272\u5F69\u3002","\u6240\u9078\u968E\u5C64\u9023\u7D50\u9805\u76EE\u7684\u8272\u5F69\u3002","\u968E\u5C64\u9023\u7D50\u9805\u76EE\u9078\u64C7\u5668\u7684\u80CC\u666F\u8272\u5F69\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u76EE\u524D\u7684\u6A19\u982D\u80CC\u666F\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u7684\u76EE\u524D\u5167\u5BB9\u80CC\u666F\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u7684\u50B3\u5165\u6A19\u982D\u80CC\u666F\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u7684\u50B3\u5165\u5167\u5BB9\u80CC\u666F\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u7684\u4E00\u822C\u4E0A\u968E\u6A19\u982D\u80CC\u666F\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u7684\u4E00\u822C\u4E0A\u968E\u5167\u5BB9\u80CC\u666F\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u6A19\u982D\u53CA\u5206\u9694\u5668\u7684\u908A\u754C\u8272\u5F69\u3002","\u76EE\u524D\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u7684\u6982\u89C0\u5C3A\u898F\u524D\u666F\u3002","\u50B3\u5165\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u7684\u6982\u89C0\u5C3A\u898F\u524D\u666F\u3002","\u5167\u5D4C\u5408\u4F75\u885D\u7A81\u4E2D\u7684\u5171\u540C\u4E0A\u968E\u6982\u89C0\u5C3A\u898F\u524D\u666F\u3002","\u5C0B\u627E\u76F8\u7B26\u9805\u76EE\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u8272\u5F69\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u9078\u53D6\u9805\u76EE\u9192\u76EE\u63D0\u793A\u7684\u6982\u89C0\u5C3A\u898F\u6A19\u8A18\u3002\u5176\u4E0D\u5F97\u70BA\u4E0D\u900F\u660E\u8272\u5F69\uFF0C\u4EE5\u514D\u96B1\u85CF\u5E95\u5C64\u88DD\u98FE\u3002","\u7528\u65BC\u5C0B\u627E\u76F8\u7B26\u9805\u76EE\u7684\u7E2E\u5716\u6A19\u8A18\u8272\u5F69\u3002","\u91CD\u8907\u7DE8\u8F2F\u5668\u9078\u53D6\u9805\u76EE\u7684\u7E2E\u5716\u6A19\u8A18\u8272\u5F69\u3002","\u7DE8\u8F2F\u5668\u9078\u53D6\u7BC4\u570D\u7684\u8FF7\u4F60\u5730\u5716\u6A19\u8A18\u8272\u5F69\u3002","\u8CC7\u8A0A\u7684\u7E2E\u5716\u6A19\u8A18\u8272\u5F69\u3002","\u8B66\u544A\u7684\u7E2E\u5716\u6A19\u8A18\u8272\u5F69\u3002","\u932F\u8AA4\u7684\u7E2E\u5716\u6A19\u8A18\u8272\u5F69\u3002","\u7E2E\u5716\u80CC\u666F\u8272\u5F69\u3002",'\u5728\u7E2E\u5716\u4E2D\u5448\u73FE\u7684\u524D\u666F\u5143\u7D20\u4E0D\u900F\u660E\u5EA6\u3002\u4F8B\u5982\uFF0C"#000000c0" \u6703\u4EE5\u4E0D\u900F\u660E\u5EA6 75% \u8F49\u8B6F\u5143\u7D20\u3002',"\u7E2E\u5716\u6ED1\u687F\u80CC\u666F\u8272\u5F69\u3002","\u66AB\u7559\u6642\u7684\u7E2E\u5716\u6ED1\u687F\u80CC\u666F\u8272\u5F69\u3002","\u6309\u4E00\u4E0B\u6642\u7684\u7E2E\u5716\u6ED1\u687F\u80CC\u666F\u8272\u5F69\u3002","\u7528\u65BC\u554F\u984C\u932F\u8AA4\u5716\u793A\u7684\u8272\u5F69\u3002","\u7528\u65BC\u554F\u984C\u8B66\u544A\u5716\u793A\u7684\u8272\u5F69\u3002","\u7528\u65BC\u554F\u984C\u8CC7\u8A0A\u5716\u793A\u7684\u8272\u5F69\u3002","\u5716\u8868\u4E2D\u4F7F\u7528\u7684\u524D\u666F\u8272\u5F69\u3002","\u7528\u65BC\u5716\u8868\u4E2D\u6C34\u5E73\u7DDA\u7684\u8272\u5F69\u3002","\u5716\u8868\u8996\u89BA\u6548\u679C\u4E2D\u6240\u4F7F\u7528\u7684\u7D05\u8272\u3002","\u5716\u8868\u8996\u89BA\u6548\u679C\u4E2D\u6240\u4F7F\u7528\u7684\u85CD\u8272\u3002","\u5716\u8868\u8996\u89BA\u6548\u679C\u4E2D\u6240\u4F7F\u7528\u7684\u9EC3\u8272\u3002","\u5716\u8868\u8996\u89BA\u6548\u679C\u4E2D\u6240\u4F7F\u7528\u7684\u6A59\u8272\u3002","\u5716\u8868\u8996\u89BA\u6548\u679C\u4E2D\u6240\u4F7F\u7528\u7684\u7DA0\u8272\u3002","\u5716\u8868\u8996\u89BA\u6548\u679C\u4E2D\u6240\u4F7F\u7528\u7684\u7D2B\u8272\u3002"],"vs/platform/theme/common/iconRegistry":["\u8981\u4F7F\u7528\u7684\u5B57\u578B\u8B58\u5225\u78BC\u3002\u5982\u672A\u8A2D\u5B9A\uFF0C\u5C31\u6703\u4F7F\u7528\u6700\u5148\u5B9A\u7FA9\u7684\u5B57\u578B\u3002","\u8207\u5716\u793A\u5B9A\u7FA9\u5EFA\u7ACB\u95DC\u806F\u7684\u5B57\u578B\u5B57\u5143\u3002","\u5C0F\u5DE5\u5177\u4E2D\u95DC\u9589\u52D5\u4F5C\u7684\u5716\u793A\u3002","\u79FB\u81F3\u4E0A\u4E00\u500B\u7DE8\u8F2F\u5668\u4F4D\u7F6E\u7684\u5716\u793A\u3002","\u79FB\u81F3\u4E0B\u4E00\u500B\u7DE8\u8F2F\u5668\u4F4D\u7F6E\u7684\u5716\u793A\u3002"],"vs/platform/undoRedo/common/undoRedoService":["\u5DF2\u5728\u78C1\u789F\u4E0A\u95DC\u9589\u4E26\u4FEE\u6539\u4EE5\u4E0B\u6A94\u6848: {0}\u3002","\u4E0B\u5217\u6A94\u6848\u5DF2\u4F7F\u7528\u4E0D\u76F8\u5BB9\u7684\u65B9\u5F0F\u4FEE\u6539: {0}\u3002","\u7121\u6CD5\u5FA9\u539F\u6240\u6709\u6A94\u6848\u7684 '{0}'\u3002{1}","\u7121\u6CD5\u5FA9\u539F\u6240\u6709\u6A94\u6848\u7684 '{0}'\u3002{1}","\u56E0\u70BA\u5DF2\u5C0D {1} \u9032\u884C\u8B8A\u66F4\uFF0C\u6240\u4EE5\u7121\u6CD5\u5FA9\u539F\u6240\u6709\u6A94\u6848\u7684 '{0}'","\u56E0\u70BA {1} \u4E2D\u5DF2\u7D93\u6709\u6B63\u5728\u57F7\u884C\u7684\u5FA9\u539F\u6216\u91CD\u505A\u4F5C\u696D\uFF0C\u6240\u4EE5\u7121\u6CD5\u70BA\u6240\u6709\u6A94\u6848\u5FA9\u539F '{0}'","\u56E0\u70BA\u540C\u6642\u767C\u751F\u5176\u4ED6\u5FA9\u539F\u6216\u91CD\u505A\u4F5C\u696D\uFF0C\u6240\u4EE5\u7121\u6CD5\u70BA\u6240\u6709\u6A94\u6848\u5FA9\u539F '{0}'","\u8981\u5FA9\u539F\u6240\u6709\u6A94\u6848\u7684 '{0}' \u55CE?","\u5728 {0} \u500B\u6A94\u6848\u4E2D\u5FA9\u539F(&&U)","\u5FA9\u539F\u6B64\u6A94\u6848(&&F)","\u56E0\u70BA\u5DF2\u7D93\u6709\u6B63\u5728\u57F7\u884C\u7684\u5FA9\u539F\u6216\u91CD\u505A\u4F5C\u696D\uFF0C\u6240\u4EE5\u7121\u6CD5\u5FA9\u539F '{0}'\u3002","\u8981\u5FA9\u539F '{0}' \u55CE?","\u662F(&&Y)","\u5426","\u7121\u6CD5\u5FA9\u539F\u6240\u6709\u6A94\u6848\u7684 '{0}'\u3002{1}","\u7121\u6CD5\u5FA9\u539F\u6240\u6709\u6A94\u6848\u7684 '{0}'\u3002{1}","\u56E0\u70BA\u5DF2\u5C0D {1} \u9032\u884C\u8B8A\u66F4\uFF0C\u6240\u4EE5\u7121\u6CD5\u5FA9\u539F\u6240\u6709\u6A94\u6848\u7684 '{0}'","\u56E0\u70BA {1} \u4E2D\u5DF2\u7D93\u6709\u6B63\u5728\u57F7\u884C\u7684\u5FA9\u539F\u6216\u91CD\u505A\u4F5C\u696D\uFF0C\u6240\u4EE5\u7121\u6CD5\u70BA\u6240\u6709\u6A94\u6848\u91CD\u505A '{0}'","\u56E0\u70BA\u540C\u6642\u767C\u751F\u5176\u4ED6\u5FA9\u539F\u6216\u91CD\u505A\u4F5C\u696D\uFF0C\u6240\u4EE5\u7121\u6CD5\u70BA\u6240\u6709\u6A94\u6848\u91CD\u505A '{0}'","\u56E0\u70BA\u5DF2\u7D93\u6709\u6B63\u5728\u57F7\u884C\u7684\u5FA9\u539F\u6216\u91CD\u505A\u4F5C\u696D\uFF0C\u6240\u4EE5\u7121\u6CD5\u91CD\u505A '{0}'\u3002"],"vs/platform/workspace/common/workspace":["Code \u5DE5\u4F5C\u5340"]}); - -//# sourceMappingURL=../../../min-maps/vs/editor/editor.main.nls.zh-tw.js.map \ No newline at end of file diff --git a/lib/vs/language/css/cssMode.js b/lib/vs/language/css/cssMode.js deleted file mode 100644 index 79877c2..0000000 --- a/lib/vs/language/css/cssMode.js +++ /dev/null @@ -1,13 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/language/css/cssMode", ["require","require"],(require)=>{ -var moduleExports=(()=>{var en=Object.create;var Y=Object.defineProperty;var nn=Object.getOwnPropertyDescriptor;var tn=Object.getOwnPropertyNames;var rn=Object.getPrototypeOf,on=Object.prototype.hasOwnProperty;var sn=(n=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(n,{get:(t,i)=>(typeof require!="undefined"?require:t)[i]}):n)(function(n){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+n+'" is not supported')});var an=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),un=(n,t)=>{for(var i in t)Y(n,i,{get:t[i],enumerable:!0})},J=(n,t,i,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let e of tn(t))!on.call(n,e)&&e!==i&&Y(n,e,{get:()=>t[e],enumerable:!(r=nn(t,e))||r.enumerable});return n},pe=(n,t,i)=>(J(n,t,"default"),i&&J(i,t,"default")),he=(n,t,i)=>(i=n!=null?en(rn(n)):{},J(t||!n||!n.__esModule?Y(i,"default",{value:n,enumerable:!0}):i,n)),dn=n=>J(Y({},"__esModule",{value:!0}),n);var ve=an((Pn,me)=>{var cn=he(sn("vs/editor/editor.api"));me.exports=cn});var En={};un(En,{CompletionAdapter:()=>H,DefinitionAdapter:()=>O,DiagnosticsAdapter:()=>K,DocumentColorAdapter:()=>$,DocumentFormattingEditProvider:()=>X,DocumentHighlightAdapter:()=>j,DocumentLinkAdapter:()=>le,DocumentRangeFormattingEditProvider:()=>B,DocumentSymbolAdapter:()=>z,FoldingRangeAdapter:()=>q,HoverAdapter:()=>U,ReferenceAdapter:()=>N,RenameAdapter:()=>V,SelectionRangeAdapter:()=>Q,WorkerManager:()=>E,fromPosition:()=>_,fromRange:()=>ge,setupMode:()=>wn,toRange:()=>T,toTextEdit:()=>W});var d={};pe(d,he(ve()));var ln=2*60*1e3,E=class{_defaults;_idleCheckInterval;_lastUsedTime;_configChangeListener;_worker;_client;constructor(t){this._defaults=t,this._worker=null,this._client=null,this._idleCheckInterval=window.setInterval(()=>this._checkIfIdle(),30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(()=>this._stopWorker())}_stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null}dispose(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()}_checkIfIdle(){if(!this._worker)return;Date.now()-this._lastUsedTime>ln&&this._stopWorker()}_getClient(){return this._lastUsedTime=Date.now(),this._client||(this._worker=d.editor.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client}getLanguageServiceWorker(...t){let i;return this._getClient().then(r=>{i=r}).then(r=>{if(this._worker)return this._worker.withSyncedResources(t)}).then(r=>i)}};var ye;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647})(ye||(ye={}));var ee;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647})(ee||(ee={}));var x;(function(n){function t(r,e){return r===Number.MAX_VALUE&&(r=ee.MAX_VALUE),e===Number.MAX_VALUE&&(e=ee.MAX_VALUE),{line:r,character:e}}n.create=t;function i(r){var e=r;return a.objectLiteral(e)&&a.uinteger(e.line)&&a.uinteger(e.character)}n.is=i})(x||(x={}));var v;(function(n){function t(r,e,o,s){if(a.uinteger(r)&&a.uinteger(e)&&a.uinteger(o)&&a.uinteger(s))return{start:x.create(r,e),end:x.create(o,s)};if(x.is(r)&&x.is(e))return{start:r,end:e};throw new Error("Range#create called with invalid arguments["+r+", "+e+", "+o+", "+s+"]")}n.create=t;function i(r){var e=r;return a.objectLiteral(e)&&x.is(e.start)&&x.is(e.end)}n.is=i})(v||(v={}));var se;(function(n){function t(r,e){return{uri:r,range:e}}n.create=t;function i(r){var e=r;return a.defined(e)&&v.is(e.range)&&(a.string(e.uri)||a.undefined(e.uri))}n.is=i})(se||(se={}));var Te;(function(n){function t(r,e,o,s){return{targetUri:r,targetRange:e,targetSelectionRange:o,originSelectionRange:s}}n.create=t;function i(r){var e=r;return a.defined(e)&&v.is(e.targetRange)&&a.string(e.targetUri)&&(v.is(e.targetSelectionRange)||a.undefined(e.targetSelectionRange))&&(v.is(e.originSelectionRange)||a.undefined(e.originSelectionRange))}n.is=i})(Te||(Te={}));var ae;(function(n){function t(r,e,o,s){return{red:r,green:e,blue:o,alpha:s}}n.create=t;function i(r){var e=r;return a.numberRange(e.red,0,1)&&a.numberRange(e.green,0,1)&&a.numberRange(e.blue,0,1)&&a.numberRange(e.alpha,0,1)}n.is=i})(ae||(ae={}));var xe;(function(n){function t(r,e){return{range:r,color:e}}n.create=t;function i(r){var e=r;return v.is(e.range)&&ae.is(e.color)}n.is=i})(xe||(xe={}));var ke;(function(n){function t(r,e,o){return{label:r,textEdit:e,additionalTextEdits:o}}n.create=t;function i(r){var e=r;return a.string(e.label)&&(a.undefined(e.textEdit)||C.is(e))&&(a.undefined(e.additionalTextEdits)||a.typedArray(e.additionalTextEdits,C.is))}n.is=i})(ke||(ke={}));var P;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(P||(P={}));var Ie;(function(n){function t(r,e,o,s,u){var l={startLine:r,endLine:e};return a.defined(o)&&(l.startCharacter=o),a.defined(s)&&(l.endCharacter=s),a.defined(u)&&(l.kind=u),l}n.create=t;function i(r){var e=r;return a.uinteger(e.startLine)&&a.uinteger(e.startLine)&&(a.undefined(e.startCharacter)||a.uinteger(e.startCharacter))&&(a.undefined(e.endCharacter)||a.uinteger(e.endCharacter))&&(a.undefined(e.kind)||a.string(e.kind))}n.is=i})(Ie||(Ie={}));var ue;(function(n){function t(r,e){return{location:r,message:e}}n.create=t;function i(r){var e=r;return a.defined(e)&&se.is(e.location)&&a.string(e.message)}n.is=i})(ue||(ue={}));var b;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(b||(b={}));var Ce;(function(n){n.Unnecessary=1,n.Deprecated=2})(Ce||(Ce={}));var _e;(function(n){function t(i){var r=i;return r!=null&&a.string(r.href)}n.is=t})(_e||(_e={}));var ne;(function(n){function t(r,e,o,s,u,l){var f={range:r,message:e};return a.defined(o)&&(f.severity=o),a.defined(s)&&(f.code=s),a.defined(u)&&(f.source=u),a.defined(l)&&(f.relatedInformation=l),f}n.create=t;function i(r){var e,o=r;return a.defined(o)&&v.is(o.range)&&a.string(o.message)&&(a.number(o.severity)||a.undefined(o.severity))&&(a.integer(o.code)||a.string(o.code)||a.undefined(o.code))&&(a.undefined(o.codeDescription)||a.string((e=o.codeDescription)===null||e===void 0?void 0:e.href))&&(a.string(o.source)||a.undefined(o.source))&&(a.undefined(o.relatedInformation)||a.typedArray(o.relatedInformation,ue.is))}n.is=i})(ne||(ne={}));var D;(function(n){function t(r,e){for(var o=[],s=2;s0&&(u.arguments=o),u}n.create=t;function i(r){var e=r;return a.defined(e)&&a.string(e.title)&&a.string(e.command)}n.is=i})(D||(D={}));var C;(function(n){function t(o,s){return{range:o,newText:s}}n.replace=t;function i(o,s){return{range:{start:o,end:o},newText:s}}n.insert=i;function r(o){return{range:o,newText:""}}n.del=r;function e(o){var s=o;return a.objectLiteral(s)&&a.string(s.newText)&&v.is(s.range)}n.is=e})(C||(C={}));var R;(function(n){function t(r,e,o){var s={label:r};return e!==void 0&&(s.needsConfirmation=e),o!==void 0&&(s.description=o),s}n.create=t;function i(r){var e=r;return e!==void 0&&a.objectLiteral(e)&&a.string(e.label)&&(a.boolean(e.needsConfirmation)||e.needsConfirmation===void 0)&&(a.string(e.description)||e.description===void 0)}n.is=i})(R||(R={}));var y;(function(n){function t(i){var r=i;return typeof r=="string"}n.is=t})(y||(y={}));var I;(function(n){function t(o,s,u){return{range:o,newText:s,annotationId:u}}n.replace=t;function i(o,s,u){return{range:{start:o,end:o},newText:s,annotationId:u}}n.insert=i;function r(o,s){return{range:o,newText:"",annotationId:s}}n.del=r;function e(o){var s=o;return C.is(s)&&(R.is(s.annotationId)||y.is(s.annotationId))}n.is=e})(I||(I={}));var te;(function(n){function t(r,e){return{textDocument:r,edits:e}}n.create=t;function i(r){var e=r;return a.defined(e)&&re.is(e.textDocument)&&Array.isArray(e.edits)}n.is=i})(te||(te={}));var L;(function(n){function t(r,e,o){var s={kind:"create",uri:r};return e!==void 0&&(e.overwrite!==void 0||e.ignoreIfExists!==void 0)&&(s.options=e),o!==void 0&&(s.annotationId=o),s}n.create=t;function i(r){var e=r;return e&&e.kind==="create"&&a.string(e.uri)&&(e.options===void 0||(e.options.overwrite===void 0||a.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||a.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||y.is(e.annotationId))}n.is=i})(L||(L={}));var F;(function(n){function t(r,e,o,s){var u={kind:"rename",oldUri:r,newUri:e};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(u.options=o),s!==void 0&&(u.annotationId=s),u}n.create=t;function i(r){var e=r;return e&&e.kind==="rename"&&a.string(e.oldUri)&&a.string(e.newUri)&&(e.options===void 0||(e.options.overwrite===void 0||a.boolean(e.options.overwrite))&&(e.options.ignoreIfExists===void 0||a.boolean(e.options.ignoreIfExists)))&&(e.annotationId===void 0||y.is(e.annotationId))}n.is=i})(F||(F={}));var M;(function(n){function t(r,e,o){var s={kind:"delete",uri:r};return e!==void 0&&(e.recursive!==void 0||e.ignoreIfNotExists!==void 0)&&(s.options=e),o!==void 0&&(s.annotationId=o),s}n.create=t;function i(r){var e=r;return e&&e.kind==="delete"&&a.string(e.uri)&&(e.options===void 0||(e.options.recursive===void 0||a.boolean(e.options.recursive))&&(e.options.ignoreIfNotExists===void 0||a.boolean(e.options.ignoreIfNotExists)))&&(e.annotationId===void 0||y.is(e.annotationId))}n.is=i})(M||(M={}));var de;(function(n){function t(i){var r=i;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(e){return a.string(e.kind)?L.is(e)||F.is(e)||M.is(e):te.is(e)}))}n.is=t})(de||(de={}));var Z=function(){function n(t,i){this.edits=t,this.changeAnnotations=i}return n.prototype.insert=function(t,i,r){var e,o;if(r===void 0?e=C.insert(t,i):y.is(r)?(o=r,e=I.insert(t,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),e=I.insert(t,i,o)),this.edits.push(e),o!==void 0)return o},n.prototype.replace=function(t,i,r){var e,o;if(r===void 0?e=C.replace(t,i):y.is(r)?(o=r,e=I.replace(t,i,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),e=I.replace(t,i,o)),this.edits.push(e),o!==void 0)return o},n.prototype.delete=function(t,i){var r,e;if(i===void 0?r=C.del(t):y.is(i)?(e=i,r=I.del(t,i)):(this.assertChangeAnnotations(this.changeAnnotations),e=this.changeAnnotations.manage(i),r=I.del(t,e)),this.edits.push(r),e!==void 0)return e},n.prototype.add=function(t){this.edits.push(t)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),be=function(){function n(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(t,i){var r;if(y.is(t)?r=t:(r=this.nextId(),i=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=i,this._size++,r},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}(),Mn=function(){function n(t){var i=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new be(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(te.is(r)){var e=new Z(r.edits,i._changeAnnotations);i._textEditChanges[r.textDocument.uri]=e}})):t.changes&&Object.keys(t.changes).forEach(function(r){var e=new Z(t.changes[r]);i._textEditChanges[r]=e})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(t){if(re.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:t.uri,version:t.version},r=this._textEditChanges[i.uri];if(!r){var e=[],o={textDocument:i,edits:e};this._workspaceEdit.documentChanges.push(o),r=new Z(e,this._changeAnnotations),this._textEditChanges[i.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var e=[];this._workspaceEdit.changes[t]=e,r=new Z(e),this._textEditChanges[t]=r}return r}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new be,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(i)||y.is(i)?e=i:r=i;var o,s;if(e===void 0?o=L.create(t,r):(s=y.is(e)?e:this._changeAnnotations.manage(e),o=L.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n.prototype.renameFile=function(t,i,r,e){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;R.is(r)||y.is(r)?o=r:e=r;var s,u;if(o===void 0?s=F.create(t,i,e):(u=y.is(o)?o:this._changeAnnotations.manage(o),s=F.create(t,i,e,u)),this._workspaceEdit.documentChanges.push(s),u!==void 0)return u},n.prototype.deleteFile=function(t,i,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var e;R.is(i)||y.is(i)?e=i:r=i;var o,s;if(e===void 0?o=M.create(t,r):(s=y.is(e)?e:this._changeAnnotations.manage(e),o=M.create(t,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n}();var we;(function(n){function t(r){return{uri:r}}n.create=t;function i(r){var e=r;return a.defined(e)&&a.string(e.uri)}n.is=i})(we||(we={}));var Ee;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function i(r){var e=r;return a.defined(e)&&a.string(e.uri)&&a.integer(e.version)}n.is=i})(Ee||(Ee={}));var re;(function(n){function t(r,e){return{uri:r,version:e}}n.create=t;function i(r){var e=r;return a.defined(e)&&a.string(e.uri)&&(e.version===null||a.integer(e.version))}n.is=i})(re||(re={}));var Re;(function(n){function t(r,e,o,s){return{uri:r,languageId:e,version:o,text:s}}n.create=t;function i(r){var e=r;return a.defined(e)&&a.string(e.uri)&&a.string(e.languageId)&&a.integer(e.version)&&a.string(e.text)}n.is=i})(Re||(Re={}));var A;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(A||(A={}));(function(n){function t(i){var r=i;return r===n.PlainText||r===n.Markdown}n.is=t})(A||(A={}));var ce;(function(n){function t(i){var r=i;return a.objectLiteral(i)&&A.is(r.kind)&&a.string(r.value)}n.is=t})(ce||(ce={}));var p;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(p||(p={}));var ie;(function(n){n.PlainText=1,n.Snippet=2})(ie||(ie={}));var Pe;(function(n){n.Deprecated=1})(Pe||(Pe={}));var Se;(function(n){function t(r,e,o){return{newText:r,insert:e,replace:o}}n.create=t;function i(r){var e=r;return e&&a.string(e.newText)&&v.is(e.insert)&&v.is(e.replace)}n.is=i})(Se||(Se={}));var We;(function(n){n.asIs=1,n.adjustIndentation=2})(We||(We={}));var De;(function(n){function t(i){return{label:i}}n.create=t})(De||(De={}));var Le;(function(n){function t(i,r){return{items:i||[],isIncomplete:!!r}}n.create=t})(Le||(Le={}));var oe;(function(n){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=t;function i(r){var e=r;return a.string(e)||a.objectLiteral(e)&&a.string(e.language)&&a.string(e.value)}n.is=i})(oe||(oe={}));var Fe;(function(n){function t(i){var r=i;return!!r&&a.objectLiteral(r)&&(ce.is(r.contents)||oe.is(r.contents)||a.typedArray(r.contents,oe.is))&&(i.range===void 0||v.is(i.range))}n.is=t})(Fe||(Fe={}));var Me;(function(n){function t(i,r){return r?{label:i,documentation:r}:{label:i}}n.create=t})(Me||(Me={}));var Ae;(function(n){function t(i,r){for(var e=[],o=2;o=0;g--){var m=l[g],k=o.offsetAt(m.range.start),c=o.offsetAt(m.range.end);if(c<=f)u=u.substring(0,k)+m.newText+u.substring(c,u.length);else throw new Error("Overlapping edit");f=k}return u}n.applyEdits=r;function e(o,s){if(o.length<=1)return o;var u=o.length/2|0,l=o.slice(0,u),f=o.slice(u);e(l,s),e(f,s);for(var g=0,m=0,k=0;g0&&t.push(i.length),this._lineOffsets=t}return this._lineOffsets},n.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var i=this.getLineOffsets(),r=0,e=i.length;if(e===0)return x.create(0,t);for(;rt?e=o:r=o+1}var s=r-1;return x.create(s,t-i[s])},n.prototype.offsetAt=function(t){var i=this.getLineOffsets();if(t.line>=i.length)return this._content.length;if(t.line<0)return 0;var r=i[t.line],e=t.line+1"u"}n.undefined=r;function e(c){return c===!0||c===!1}n.boolean=e;function o(c){return t.call(c)==="[object String]"}n.string=o;function s(c){return t.call(c)==="[object Number]"}n.number=s;function u(c,w,G){return t.call(c)==="[object Number]"&&w<=c&&c<=G}n.numberRange=u;function l(c){return t.call(c)==="[object Number]"&&-2147483648<=c&&c<=2147483647}n.integer=l;function f(c){return t.call(c)==="[object Number]"&&0<=c&&c<=2147483647}n.uinteger=f;function g(c){return t.call(c)==="[object Function]"}n.func=g;function m(c){return c!==null&&typeof c=="object"}n.objectLiteral=m;function k(c,w){return Array.isArray(c)&&c.every(w)}n.typedArray=k})(a||(a={}));var K=class{constructor(t,i,r){this._languageId=t;this._worker=i;let e=s=>{let u=s.getLanguageId();if(u!==this._languageId)return;let l;this._listener[s.uri.toString()]=s.onDidChangeContent(()=>{window.clearTimeout(l),l=window.setTimeout(()=>this._doValidate(s.uri,u),500)}),this._doValidate(s.uri,u)},o=s=>{d.editor.setModelMarkers(s,this._languageId,[]);let u=s.uri.toString(),l=this._listener[u];l&&(l.dispose(),delete this._listener[u])};this._disposables.push(d.editor.onDidCreateModel(e)),this._disposables.push(d.editor.onWillDisposeModel(o)),this._disposables.push(d.editor.onDidChangeModelLanguage(s=>{o(s.model),e(s.model)})),this._disposables.push(r(s=>{d.editor.getModels().forEach(u=>{u.getLanguageId()===this._languageId&&(o(u),e(u))})})),this._disposables.push({dispose:()=>{d.editor.getModels().forEach(o);for(let s in this._listener)this._listener[s].dispose()}}),d.editor.getModels().forEach(e)}_disposables=[];_listener=Object.create(null);dispose(){this._disposables.forEach(t=>t&&t.dispose()),this._disposables.length=0}_doValidate(t,i){this._worker(t).then(r=>r.doValidation(t.toString())).then(r=>{let e=r.map(s=>hn(t,s)),o=d.editor.getModel(t);o&&o.getLanguageId()===i&&d.editor.setModelMarkers(o,i,e)}).then(void 0,r=>{console.error(r)})}};function pn(n){switch(n){case b.Error:return d.MarkerSeverity.Error;case b.Warning:return d.MarkerSeverity.Warning;case b.Information:return d.MarkerSeverity.Info;case b.Hint:return d.MarkerSeverity.Hint;default:return d.MarkerSeverity.Info}}function hn(n,t){let i=typeof t.code=="number"?String(t.code):t.code;return{severity:pn(t.severity),startLineNumber:t.range.start.line+1,startColumn:t.range.start.character+1,endLineNumber:t.range.end.line+1,endColumn:t.range.end.character+1,message:t.message,code:i,source:t.source}}var H=class{constructor(t,i){this._worker=t;this._triggerCharacters=i}get triggerCharacters(){return this._triggerCharacters}provideCompletionItems(t,i,r,e){let o=t.uri;return this._worker(o).then(s=>s.doComplete(o.toString(),_(i))).then(s=>{if(!s)return;let u=t.getWordUntilPosition(i),l=new d.Range(i.lineNumber,u.startColumn,i.lineNumber,u.endColumn),f=s.items.map(g=>{let m={label:g.label,insertText:g.insertText||g.label,sortText:g.sortText,filterText:g.filterText,documentation:g.documentation,detail:g.detail,command:yn(g.command),range:l,kind:vn(g.kind)};return g.textEdit&&(mn(g.textEdit)?m.range={insert:T(g.textEdit.insert),replace:T(g.textEdit.replace)}:m.range=T(g.textEdit.range),m.insertText=g.textEdit.newText),g.additionalTextEdits&&(m.additionalTextEdits=g.additionalTextEdits.map(W)),g.insertTextFormat===ie.Snippet&&(m.insertTextRules=d.languages.CompletionItemInsertTextRule.InsertAsSnippet),m});return{isIncomplete:s.isIncomplete,suggestions:f}})}};function _(n){if(!!n)return{character:n.column-1,line:n.lineNumber-1}}function ge(n){if(!!n)return{start:{line:n.startLineNumber-1,character:n.startColumn-1},end:{line:n.endLineNumber-1,character:n.endColumn-1}}}function T(n){if(!!n)return new d.Range(n.start.line+1,n.start.character+1,n.end.line+1,n.end.character+1)}function mn(n){return typeof n.insert<"u"&&typeof n.replace<"u"}function vn(n){let t=d.languages.CompletionItemKind;switch(n){case p.Text:return t.Text;case p.Method:return t.Method;case p.Function:return t.Function;case p.Constructor:return t.Constructor;case p.Field:return t.Field;case p.Variable:return t.Variable;case p.Class:return t.Class;case p.Interface:return t.Interface;case p.Module:return t.Module;case p.Property:return t.Property;case p.Unit:return t.Unit;case p.Value:return t.Value;case p.Enum:return t.Enum;case p.Keyword:return t.Keyword;case p.Snippet:return t.Snippet;case p.Color:return t.Color;case p.File:return t.File;case p.Reference:return t.Reference}return t.Property}function W(n){if(!!n)return{range:T(n.range),text:n.newText}}function yn(n){return n&&n.command==="editor.action.triggerSuggest"?{id:n.command,title:n.title,arguments:n.arguments}:void 0}var U=class{constructor(t){this._worker=t}provideHover(t,i,r){let e=t.uri;return this._worker(e).then(o=>o.doHover(e.toString(),_(i))).then(o=>{if(!!o)return{range:T(o.range),contents:xn(o.contents)}})}};function Tn(n){return n&&typeof n=="object"&&typeof n.kind=="string"}function Qe(n){return typeof n=="string"?{value:n}:Tn(n)?n.kind==="plaintext"?{value:n.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:n.value}:{value:"```"+n.language+` -`+n.value+"\n```\n"}}function xn(n){if(!!n)return Array.isArray(n)?n.map(Qe):[Qe(n)]}var j=class{constructor(t){this._worker=t}provideDocumentHighlights(t,i,r){let e=t.uri;return this._worker(e).then(o=>o.findDocumentHighlights(e.toString(),_(i))).then(o=>{if(!!o)return o.map(s=>({range:T(s.range),kind:kn(s.kind)}))})}};function kn(n){switch(n){case S.Read:return d.languages.DocumentHighlightKind.Read;case S.Write:return d.languages.DocumentHighlightKind.Write;case S.Text:return d.languages.DocumentHighlightKind.Text}return d.languages.DocumentHighlightKind.Text}var O=class{constructor(t){this._worker=t}provideDefinition(t,i,r){let e=t.uri;return this._worker(e).then(o=>o.findDefinition(e.toString(),_(i))).then(o=>{if(!!o)return[Ge(o)]})}};function Ge(n){return{uri:d.Uri.parse(n.uri),range:T(n.range)}}var N=class{constructor(t){this._worker=t}provideReferences(t,i,r,e){let o=t.uri;return this._worker(o).then(s=>s.findReferences(o.toString(),_(i))).then(s=>{if(!!s)return s.map(Ge)})}},V=class{constructor(t){this._worker=t}provideRenameEdits(t,i,r,e){let o=t.uri;return this._worker(o).then(s=>s.doRename(o.toString(),_(i),r)).then(s=>In(s))}};function In(n){if(!n||!n.changes)return;let t=[];for(let i in n.changes){let r=d.Uri.parse(i);for(let e of n.changes[i])t.push({resource:r,versionId:void 0,textEdit:{range:T(e.range),text:e.newText}})}return{edits:t}}var z=class{constructor(t){this._worker=t}provideDocumentSymbols(t,i){let r=t.uri;return this._worker(r).then(e=>e.findDocumentSymbols(r.toString())).then(e=>{if(!!e)return e.map(o=>({name:o.name,detail:"",containerName:o.containerName,kind:Cn(o.kind),range:T(o.location.range),selectionRange:T(o.location.range),tags:[]}))})}};function Cn(n){let t=d.languages.SymbolKind;switch(n){case h.File:return t.Array;case h.Module:return t.Module;case h.Namespace:return t.Namespace;case h.Package:return t.Package;case h.Class:return t.Class;case h.Method:return t.Method;case h.Property:return t.Property;case h.Field:return t.Field;case h.Constructor:return t.Constructor;case h.Enum:return t.Enum;case h.Interface:return t.Interface;case h.Function:return t.Function;case h.Variable:return t.Variable;case h.Constant:return t.Constant;case h.String:return t.String;case h.Number:return t.Number;case h.Boolean:return t.Boolean;case h.Array:return t.Array}return t.Function}var le=class{constructor(t){this._worker=t}provideLinks(t,i){let r=t.uri;return this._worker(r).then(e=>e.findDocumentLinks(r.toString())).then(e=>{if(!!e)return{links:e.map(o=>({range:T(o.range),url:o.target}))}})}},X=class{constructor(t){this._worker=t}provideDocumentFormattingEdits(t,i,r){let e=t.uri;return this._worker(e).then(o=>o.format(e.toString(),null,Je(i)).then(s=>{if(!(!s||s.length===0))return s.map(W)}))}},B=class{constructor(t){this._worker=t}canFormatMultipleRanges=!1;provideDocumentRangeFormattingEdits(t,i,r,e){let o=t.uri;return this._worker(o).then(s=>s.format(o.toString(),ge(i),Je(r)).then(u=>{if(!(!u||u.length===0))return u.map(W)}))}};function Je(n){return{tabSize:n.tabSize,insertSpaces:n.insertSpaces}}var $=class{constructor(t){this._worker=t}provideDocumentColors(t,i){let r=t.uri;return this._worker(r).then(e=>e.findDocumentColors(r.toString())).then(e=>{if(!!e)return e.map(o=>({color:o.color,range:T(o.range)}))})}provideColorPresentations(t,i,r){let e=t.uri;return this._worker(e).then(o=>o.getColorPresentations(e.toString(),i.color,ge(i.range))).then(o=>{if(!!o)return o.map(s=>{let u={label:s.label};return s.textEdit&&(u.textEdit=W(s.textEdit)),s.additionalTextEdits&&(u.additionalTextEdits=s.additionalTextEdits.map(W)),u})})}},q=class{constructor(t){this._worker=t}provideFoldingRanges(t,i,r){let e=t.uri;return this._worker(e).then(o=>o.getFoldingRanges(e.toString(),i)).then(o=>{if(!!o)return o.map(s=>{let u={start:s.startLine+1,end:s.endLine+1};return typeof s.kind<"u"&&(u.kind=_n(s.kind)),u})})}};function _n(n){switch(n){case P.Comment:return d.languages.FoldingRangeKind.Comment;case P.Imports:return d.languages.FoldingRangeKind.Imports;case P.Region:return d.languages.FoldingRangeKind.Region}}var Q=class{constructor(t){this._worker=t}provideSelectionRanges(t,i,r){let e=t.uri;return this._worker(e).then(o=>o.getSelectionRanges(e.toString(),i.map(_))).then(o=>{if(!!o)return o.map(s=>{let u=[];for(;s;)u.push({range:T(s.range)}),s=s.parent;return u})})}};function wn(n){let t=[],i=[],r=new E(n);t.push(r);let e=(...s)=>r.getLanguageServiceWorker(...s);function o(){let{languageId:s,modeConfiguration:u}=n;Ze(i),u.completionItems&&i.push(d.languages.registerCompletionItemProvider(s,new H(e,["/","-",":"]))),u.hovers&&i.push(d.languages.registerHoverProvider(s,new U(e))),u.documentHighlights&&i.push(d.languages.registerDocumentHighlightProvider(s,new j(e))),u.definitions&&i.push(d.languages.registerDefinitionProvider(s,new O(e))),u.references&&i.push(d.languages.registerReferenceProvider(s,new N(e))),u.documentSymbols&&i.push(d.languages.registerDocumentSymbolProvider(s,new z(e))),u.rename&&i.push(d.languages.registerRenameProvider(s,new V(e))),u.colors&&i.push(d.languages.registerColorProvider(s,new $(e))),u.foldingRanges&&i.push(d.languages.registerFoldingRangeProvider(s,new q(e))),u.diagnostics&&i.push(new K(s,e,n.onDidChange)),u.selectionRanges&&i.push(d.languages.registerSelectionRangeProvider(s,new Q(e))),u.documentFormattingEdits&&i.push(d.languages.registerDocumentFormattingEditProvider(s,new X(e))),u.documentRangeFormattingEdits&&i.push(d.languages.registerDocumentRangeFormattingEditProvider(s,new B(e)))}return o(),t.push(Ye(i)),Ye(t)}function Ye(n){return{dispose:()=>Ze(n)}}function Ze(n){for(;n.length;)n.pop().dispose()}return dn(En);})(); -return moduleExports; -}); diff --git a/lib/vs/language/css/cssWorker.js b/lib/vs/language/css/cssWorker.js deleted file mode 100644 index bdd83a7..0000000 --- a/lib/vs/language/css/cssWorker.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict";/*!----------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Version: 0.44.0(3e047efd345ff102c8c61b5398fb30845aaac166) - * Released under the MIT license - * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt - *-----------------------------------------------------------------------------*/ -define("vs/language/css/cssWorker", ["require","require"],(require)=>{ -var moduleExports=(()=>{var $n=Object.defineProperty;var ds=Object.getOwnPropertyDescriptor;var hs=Object.getOwnPropertyNames;var ps=Object.prototype.hasOwnProperty;var us=(n,e)=>{for(var t in e)$n(n,t,{get:e[t],enumerable:!0})},ms=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of hs(e))!ps.call(n,i)&&i!==t&&$n(n,i,{get:()=>e[i],enumerable:!(r=ds(e,i))||r.enumerable});return n};var fs=n=>ms($n({},"__esModule",{value:!0}),n);var sl={};us(sl,{CSSWorker:()=>Vn,create:()=>ol});var d;(function(n){n[n.Ident=0]="Ident",n[n.AtKeyword=1]="AtKeyword",n[n.String=2]="String",n[n.BadString=3]="BadString",n[n.UnquotedString=4]="UnquotedString",n[n.Hash=5]="Hash",n[n.Num=6]="Num",n[n.Percentage=7]="Percentage",n[n.Dimension=8]="Dimension",n[n.UnicodeRange=9]="UnicodeRange",n[n.CDO=10]="CDO",n[n.CDC=11]="CDC",n[n.Colon=12]="Colon",n[n.SemiColon=13]="SemiColon",n[n.CurlyL=14]="CurlyL",n[n.CurlyR=15]="CurlyR",n[n.ParenthesisL=16]="ParenthesisL",n[n.ParenthesisR=17]="ParenthesisR",n[n.BracketL=18]="BracketL",n[n.BracketR=19]="BracketR",n[n.Whitespace=20]="Whitespace",n[n.Includes=21]="Includes",n[n.Dashmatch=22]="Dashmatch",n[n.SubstringOperator=23]="SubstringOperator",n[n.PrefixOperator=24]="PrefixOperator",n[n.SuffixOperator=25]="SuffixOperator",n[n.Delim=26]="Delim",n[n.EMS=27]="EMS",n[n.EXS=28]="EXS",n[n.Length=29]="Length",n[n.Angle=30]="Angle",n[n.Time=31]="Time",n[n.Freq=32]="Freq",n[n.Exclamation=33]="Exclamation",n[n.Resolution=34]="Resolution",n[n.Comma=35]="Comma",n[n.Charset=36]="Charset",n[n.EscapedJavaScript=37]="EscapedJavaScript",n[n.BadEscapedJavaScript=38]="BadEscapedJavaScript",n[n.Comment=39]="Comment",n[n.SingleLineComment=40]="SingleLineComment",n[n.EOF=41]="EOF",n[n.CustomToken=42]="CustomToken"})(d||(d={}));var Kr=function(){function n(e){this.source=e,this.len=e.length,this.position=0}return n.prototype.substring=function(e,t){return t===void 0&&(t=this.position),this.source.substring(e,t)},n.prototype.eos=function(){return this.len<=this.position},n.prototype.pos=function(){return this.position},n.prototype.goBackTo=function(e){this.position=e},n.prototype.goBack=function(e){this.position-=e},n.prototype.advance=function(e){this.position+=e},n.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},n.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},n.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},n.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},n.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t=kt&&t<=Ct?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(r){return r>=kt&&r<=Ct||e===0&&r===ti}),!0):!1},n.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case lt:case Ft:case at:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===lt&&this.stream.advanceIfChar(at)&&e.push(` -`),!0}return!1},n.prototype._escape=function(e,t){var r=this.stream.peekChar();if(r===Kn){this.stream.advance(1),r=this.stream.peekChar();for(var i=0;i<6&&(r>=kt&&r<=Ct||r>=nn&&r<=Gr||r>=rn&&r<=Jr);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{var o=parseInt(this.stream.substring(this.stream.pos()-i),16);o&&e.push(String.fromCharCode(o))}catch{}return r===Gn||r===Hn?this.stream.advance(1):this._newline([]),!0}if(r!==lt&&r!==Ft&&r!==at)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(t)return this._newline(e)}return!1},n.prototype._stringChar=function(e,t){var r=this.stream.peekChar();return r!==0&&r!==e&&r!==Kn&&r!==lt&&r!==Ft&&r!==at?(this.stream.advance(1),t.push(String.fromCharCode(r)),!0):!1},n.prototype._string=function(e){if(this.stream.peekChar()===ei||this.stream.peekChar()===Zr){var t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),d.String):d.BadString}return null},n.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return t!==0&&t!==Kn&&t!==ei&&t!==Zr&&t!==ri&&t!==ii&&t!==Gn&&t!==Hn&&t!==at&&t!==Ft&&t!==lt?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},n.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(t){return t===Gn||t===Hn||t===at||t===Ft||t===lt});return e>0},n.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},n.prototype.ident=function(e){var t=this.stream.pos(),r=this._minus(e);if(r){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1},n.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return t===Yr||t>=nn&&t<=Hr||t>=rn&&t<=Xr||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._minus=function(e){var t=this.stream.peekChar();return t===Ye?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._identChar=function(e){var t=this.stream.peekChar();return t===Yr||t===Ye||t>=nn&&t<=Hr||t>=rn&&t<=Xr||t>=kt&&t<=Ct||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},n.prototype._unicodeRange=function(){if(this.stream.advanceIfChar(Ts)){var e=function(i){return i>=kt&&i<=Ct||i>=nn&&i<=Gr||i>=rn&&i<=Jr},t=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(function(i){return i===Ms});if(t>=1&&t<=6)if(this.stream.advanceIfChar(Ye)){var r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1},n}();function q(n,e){if(n.length0?n.lastIndexOf(e)===t:t===0?n===e:!1}function oi(n,e,t){t===void 0&&(t=4);var r=Math.abs(n.length-e.length);if(r>t)return 0;var i=[],o=[],s,a;for(s=0;s0;)(e&1)===1&&(t+=n),n+=n,e=e>>>1;return t}var E=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),u;(function(n){n[n.Undefined=0]="Undefined",n[n.Identifier=1]="Identifier",n[n.Stylesheet=2]="Stylesheet",n[n.Ruleset=3]="Ruleset",n[n.Selector=4]="Selector",n[n.SimpleSelector=5]="SimpleSelector",n[n.SelectorInterpolation=6]="SelectorInterpolation",n[n.SelectorCombinator=7]="SelectorCombinator",n[n.SelectorCombinatorParent=8]="SelectorCombinatorParent",n[n.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",n[n.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",n[n.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",n[n.Page=12]="Page",n[n.PageBoxMarginBox=13]="PageBoxMarginBox",n[n.ClassSelector=14]="ClassSelector",n[n.IdentifierSelector=15]="IdentifierSelector",n[n.ElementNameSelector=16]="ElementNameSelector",n[n.PseudoSelector=17]="PseudoSelector",n[n.AttributeSelector=18]="AttributeSelector",n[n.Declaration=19]="Declaration",n[n.Declarations=20]="Declarations",n[n.Property=21]="Property",n[n.Expression=22]="Expression",n[n.BinaryExpression=23]="BinaryExpression",n[n.Term=24]="Term",n[n.Operator=25]="Operator",n[n.Value=26]="Value",n[n.StringLiteral=27]="StringLiteral",n[n.URILiteral=28]="URILiteral",n[n.EscapedValue=29]="EscapedValue",n[n.Function=30]="Function",n[n.NumericValue=31]="NumericValue",n[n.HexColorValue=32]="HexColorValue",n[n.RatioValue=33]="RatioValue",n[n.MixinDeclaration=34]="MixinDeclaration",n[n.MixinReference=35]="MixinReference",n[n.VariableName=36]="VariableName",n[n.VariableDeclaration=37]="VariableDeclaration",n[n.Prio=38]="Prio",n[n.Interpolation=39]="Interpolation",n[n.NestedProperties=40]="NestedProperties",n[n.ExtendsReference=41]="ExtendsReference",n[n.SelectorPlaceholder=42]="SelectorPlaceholder",n[n.Debug=43]="Debug",n[n.If=44]="If",n[n.Else=45]="Else",n[n.For=46]="For",n[n.Each=47]="Each",n[n.While=48]="While",n[n.MixinContentReference=49]="MixinContentReference",n[n.MixinContentDeclaration=50]="MixinContentDeclaration",n[n.Media=51]="Media",n[n.Keyframe=52]="Keyframe",n[n.FontFace=53]="FontFace",n[n.Import=54]="Import",n[n.Namespace=55]="Namespace",n[n.Invocation=56]="Invocation",n[n.FunctionDeclaration=57]="FunctionDeclaration",n[n.ReturnStatement=58]="ReturnStatement",n[n.MediaQuery=59]="MediaQuery",n[n.MediaCondition=60]="MediaCondition",n[n.MediaFeature=61]="MediaFeature",n[n.FunctionParameter=62]="FunctionParameter",n[n.FunctionArgument=63]="FunctionArgument",n[n.KeyframeSelector=64]="KeyframeSelector",n[n.ViewPort=65]="ViewPort",n[n.Document=66]="Document",n[n.AtApplyRule=67]="AtApplyRule",n[n.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",n[n.CustomPropertySet=69]="CustomPropertySet",n[n.ListEntry=70]="ListEntry",n[n.Supports=71]="Supports",n[n.SupportsCondition=72]="SupportsCondition",n[n.NamespacePrefix=73]="NamespacePrefix",n[n.GridLine=74]="GridLine",n[n.Plugin=75]="Plugin",n[n.UnknownAtRule=76]="UnknownAtRule",n[n.Use=77]="Use",n[n.ModuleConfiguration=78]="ModuleConfiguration",n[n.Forward=79]="Forward",n[n.ForwardVisibility=80]="ForwardVisibility",n[n.Module=81]="Module",n[n.UnicodeRange=82]="UnicodeRange"})(u||(u={}));var A;(function(n){n[n.Mixin=0]="Mixin",n[n.Rule=1]="Rule",n[n.Variable=2]="Variable",n[n.Function=3]="Function",n[n.Keyframe=4]="Keyframe",n[n.Unknown=5]="Unknown",n[n.Module=6]="Module",n[n.Forward=7]="Forward",n[n.ForwardVisibility=8]="ForwardVisibility"})(A||(A={}));function sn(n,e){var t=null;return!n||en.end?null:(n.accept(function(r){return r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(t?r.length<=t.length&&(t=r):t=r,!0):!1}),t)}function ct(n,e){for(var t=sn(n,e),r=[];t;)r.unshift(t),t=t.parent;return r}function ai(n){var e=n.findParent(u.Declaration),t=e&&e.getValue();return t&&t.encloses(n)?e:null}var F=function(){function n(e,t,r){e===void 0&&(e=-1),t===void 0&&(t=-1),this.parent=null,this.offset=e,this.length=t,r&&(this.nodeType=r)}return Object.defineProperty(n.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"type",{get:function(){return this.nodeType||u.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),n.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},n.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},n.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},n.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},n.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},n.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,r=this.children;t=0&&e.parent.children.splice(r,1)}e.parent=this;var i=this.children;return i||(i=this.children=[]),t!==-1?i.splice(t,0,e):i.push(e),e},n.prototype.attachTo=function(e,t){return t===void 0&&(t=-1),e&&e.adoptChild(this,t),this},n.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},n.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},n.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(t){return t.getRule()===e})},n.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(t){return t.isErroneous(!0)})},n.prototype.setNode=function(e,t,r){return r===void 0&&(r=-1),t?(t.attachTo(this,r),this[e]=t,!0):!1},n.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},n.prototype.updateOffsetAndLength=function(e){(e.offsetthis.end||this.length===-1)&&(this.length=t-this.offset)},n.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},n.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},n.prototype.getChild=function(e){return this.children&&e=0;r--)if(t=this.children[r],t.offset<=e)return t}return null},n.prototype.findChildAtOffset=function(e,t){var r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?t&&r.findChildAtOffset(e,!0)||r:null},n.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},n.prototype.getParent=function(){for(var e=this.parent;e instanceof ee;)e=e.parent;return e},n.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},n.prototype.findAParent=function(){for(var e=[],t=0;t{let o=i[0];return typeof e[o]<"u"?e[o]:r}),t}function js(n,e,...t){return Us(e,t)}function H(n){return js}var U=H(),j=function(){function n(e,t){this.id=e,this.message=t}return n}();var f={NumberExpected:new j("css-numberexpected",U("expected.number","number expected")),ConditionExpected:new j("css-conditionexpected",U("expected.condt","condition expected")),RuleOrSelectorExpected:new j("css-ruleorselectorexpected",U("expected.ruleorselector","at-rule or selector expected")),DotExpected:new j("css-dotexpected",U("expected.dot","dot expected")),ColonExpected:new j("css-colonexpected",U("expected.colon","colon expected")),SemiColonExpected:new j("css-semicolonexpected",U("expected.semicolon","semi-colon expected")),TermExpected:new j("css-termexpected",U("expected.term","term expected")),ExpressionExpected:new j("css-expressionexpected",U("expected.expression","expression expected")),OperatorExpected:new j("css-operatorexpected",U("expected.operator","operator expected")),IdentifierExpected:new j("css-identifierexpected",U("expected.ident","identifier expected")),PercentageExpected:new j("css-percentageexpected",U("expected.percentage","percentage expected")),URIOrStringExpected:new j("css-uriorstringexpected",U("expected.uriorstring","uri or string expected")),URIExpected:new j("css-uriexpected",U("expected.uri","URI expected")),VariableNameExpected:new j("css-varnameexpected",U("expected.varname","variable name expected")),VariableValueExpected:new j("css-varvalueexpected",U("expected.varvalue","variable value expected")),PropertyValueExpected:new j("css-propertyvalueexpected",U("expected.propvalue","property value expected")),LeftCurlyExpected:new j("css-lcurlyexpected",U("expected.lcurly","{ expected")),RightCurlyExpected:new j("css-rcurlyexpected",U("expected.rcurly","} expected")),LeftSquareBracketExpected:new j("css-rbracketexpected",U("expected.lsquare","[ expected")),RightSquareBracketExpected:new j("css-lbracketexpected",U("expected.rsquare","] expected")),LeftParenthesisExpected:new j("css-lparentexpected",U("expected.lparen","( expected")),RightParenthesisExpected:new j("css-rparentexpected",U("expected.rparent",") expected")),CommaExpected:new j("css-commaexpected",U("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new j("css-pagedirordeclexpected",U("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new j("css-unknownatrule",U("unknown.atrule","at-rule unknown")),UnknownKeyword:new j("css-unknownkeyword",U("unknown.keyword","unknown keyword")),SelectorExpected:new j("css-selectorexpected",U("expected.selector","selector expected")),StringLiteralExpected:new j("css-stringliteralexpected",U("expected.stringliteral","string literal expected")),WhitespaceExpected:new j("css-whitespaceexpected",U("expected.whitespace","whitespace expected")),MediaQueryExpected:new j("css-mediaqueryexpected",U("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new j("css-idorwildcardexpected",U("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new j("css-wildcardexpected",U("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new j("css-idorvarexpected",U("expected.idorvar","identifier or variable expected"))};var Oi;(function(n){n.MIN_VALUE=-2147483648,n.MAX_VALUE=2147483647})(Oi||(Oi={}));var bn;(function(n){n.MIN_VALUE=0,n.MAX_VALUE=2147483647})(bn||(bn={}));var Q;(function(n){function e(r,i){return r===Number.MAX_VALUE&&(r=bn.MAX_VALUE),i===Number.MAX_VALUE&&(i=bn.MAX_VALUE),{line:r,character:i}}n.create=e;function t(r){var i=r;return v.objectLiteral(i)&&v.uinteger(i.line)&&v.uinteger(i.character)}n.is=t})(Q||(Q={}));var W;(function(n){function e(r,i,o,s){if(v.uinteger(r)&&v.uinteger(i)&&v.uinteger(o)&&v.uinteger(s))return{start:Q.create(r,i),end:Q.create(o,s)};if(Q.is(r)&&Q.is(i))return{start:r,end:i};throw new Error("Range#create called with invalid arguments["+r+", "+i+", "+o+", "+s+"]")}n.create=e;function t(r){var i=r;return v.objectLiteral(i)&&Q.is(i.start)&&Q.is(i.end)}n.is=t})(W||(W={}));var tt;(function(n){function e(r,i){return{uri:r,range:i}}n.create=e;function t(r){var i=r;return v.defined(i)&&W.is(i.range)&&(v.string(i.uri)||v.undefined(i.uri))}n.is=t})(tt||(tt={}));var Wi;(function(n){function e(r,i,o,s){return{targetUri:r,targetRange:i,targetSelectionRange:o,originSelectionRange:s}}n.create=e;function t(r){var i=r;return v.defined(i)&&W.is(i.targetRange)&&v.string(i.targetUri)&&(W.is(i.targetSelectionRange)||v.undefined(i.targetSelectionRange))&&(W.is(i.originSelectionRange)||v.undefined(i.originSelectionRange))}n.is=t})(Wi||(Wi={}));var vn;(function(n){function e(r,i,o,s){return{red:r,green:i,blue:o,alpha:s}}n.create=e;function t(r){var i=r;return v.numberRange(i.red,0,1)&&v.numberRange(i.green,0,1)&&v.numberRange(i.blue,0,1)&&v.numberRange(i.alpha,0,1)}n.is=t})(vn||(vn={}));var er;(function(n){function e(r,i){return{range:r,color:i}}n.create=e;function t(r){var i=r;return W.is(i.range)&&vn.is(i.color)}n.is=t})(er||(er={}));var tr;(function(n){function e(r,i,o){return{label:r,textEdit:i,additionalTextEdits:o}}n.create=e;function t(r){var i=r;return v.string(i.label)&&(v.undefined(i.textEdit)||T.is(i))&&(v.undefined(i.additionalTextEdits)||v.typedArray(i.additionalTextEdits,T.is))}n.is=t})(tr||(tr={}));var nr;(function(n){n.Comment="comment",n.Imports="imports",n.Region="region"})(nr||(nr={}));var rr;(function(n){function e(r,i,o,s,a){var l={startLine:r,endLine:i};return v.defined(o)&&(l.startCharacter=o),v.defined(s)&&(l.endCharacter=s),v.defined(a)&&(l.kind=a),l}n.create=e;function t(r){var i=r;return v.uinteger(i.startLine)&&v.uinteger(i.startLine)&&(v.undefined(i.startCharacter)||v.uinteger(i.startCharacter))&&(v.undefined(i.endCharacter)||v.uinteger(i.endCharacter))&&(v.undefined(i.kind)||v.string(i.kind))}n.is=t})(rr||(rr={}));var ir;(function(n){function e(r,i){return{location:r,message:i}}n.create=e;function t(r){var i=r;return v.defined(i)&&tt.is(i.location)&&v.string(i.message)}n.is=t})(ir||(ir={}));var ft;(function(n){n.Error=1,n.Warning=2,n.Information=3,n.Hint=4})(ft||(ft={}));var Li;(function(n){n.Unnecessary=1,n.Deprecated=2})(Li||(Li={}));var Ui;(function(n){function e(t){var r=t;return r!=null&&v.string(r.href)}n.is=e})(Ui||(Ui={}));var Mt;(function(n){function e(r,i,o,s,a,l){var c={range:r,message:i};return v.defined(o)&&(c.severity=o),v.defined(s)&&(c.code=s),v.defined(a)&&(c.source=a),v.defined(l)&&(c.relatedInformation=l),c}n.create=e;function t(r){var i,o=r;return v.defined(o)&&W.is(o.range)&&v.string(o.message)&&(v.number(o.severity)||v.undefined(o.severity))&&(v.integer(o.code)||v.string(o.code)||v.undefined(o.code))&&(v.undefined(o.codeDescription)||v.string((i=o.codeDescription)===null||i===void 0?void 0:i.href))&&(v.string(o.source)||v.undefined(o.source))&&(v.undefined(o.relatedInformation)||v.typedArray(o.relatedInformation,ir.is))}n.is=t})(Mt||(Mt={}));var Ge;(function(n){function e(r,i){for(var o=[],s=2;s0&&(a.arguments=o),a}n.create=e;function t(r){var i=r;return v.defined(i)&&v.string(i.title)&&v.string(i.command)}n.is=t})(Ge||(Ge={}));var T;(function(n){function e(o,s){return{range:o,newText:s}}n.replace=e;function t(o,s){return{range:{start:o,end:o},newText:s}}n.insert=t;function r(o){return{range:o,newText:""}}n.del=r;function i(o){var s=o;return v.objectLiteral(s)&&v.string(s.newText)&&W.is(s.range)}n.is=i})(T||(T={}));var mt;(function(n){function e(r,i,o){var s={label:r};return i!==void 0&&(s.needsConfirmation=i),o!==void 0&&(s.description=o),s}n.create=e;function t(r){var i=r;return i!==void 0&&v.objectLiteral(i)&&v.string(i.label)&&(v.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(v.string(i.description)||i.description===void 0)}n.is=t})(mt||(mt={}));var le;(function(n){function e(t){var r=t;return typeof r=="string"}n.is=e})(le||(le={}));var Ke;(function(n){function e(o,s,a){return{range:o,newText:s,annotationId:a}}n.replace=e;function t(o,s,a){return{range:{start:o,end:o},newText:s,annotationId:a}}n.insert=t;function r(o,s){return{range:o,newText:"",annotationId:s}}n.del=r;function i(o){var s=o;return T.is(s)&&(mt.is(s.annotationId)||le.is(s.annotationId))}n.is=i})(Ke||(Ke={}));var nt;(function(n){function e(r,i){return{textDocument:r,edits:i}}n.create=e;function t(r){var i=r;return v.defined(i)&&wn.is(i.textDocument)&&Array.isArray(i.edits)}n.is=t})(nt||(nt={}));var Tt;(function(n){function e(r,i,o){var s={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(r){var i=r;return i&&i.kind==="create"&&v.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||v.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||v.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||le.is(i.annotationId))}n.is=t})(Tt||(Tt={}));var Pt;(function(n){function e(r,i,o,s){var a={kind:"rename",oldUri:r,newUri:i};return o!==void 0&&(o.overwrite!==void 0||o.ignoreIfExists!==void 0)&&(a.options=o),s!==void 0&&(a.annotationId=s),a}n.create=e;function t(r){var i=r;return i&&i.kind==="rename"&&v.string(i.oldUri)&&v.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||v.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||v.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||le.is(i.annotationId))}n.is=t})(Pt||(Pt={}));var At;(function(n){function e(r,i,o){var s={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(s.options=i),o!==void 0&&(s.annotationId=o),s}n.create=e;function t(r){var i=r;return i&&i.kind==="delete"&&v.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||v.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||v.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||le.is(i.annotationId))}n.is=t})(At||(At={}));var yn;(function(n){function e(t){var r=t;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return v.string(i.kind)?Tt.is(i)||Pt.is(i)||At.is(i):nt.is(i)}))}n.is=e})(yn||(yn={}));var gn=function(){function n(e,t){this.edits=e,this.changeAnnotations=t}return n.prototype.insert=function(e,t,r){var i,o;if(r===void 0?i=T.insert(e,t):le.is(r)?(o=r,i=Ke.insert(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Ke.insert(e,t,o)),this.edits.push(i),o!==void 0)return o},n.prototype.replace=function(e,t,r){var i,o;if(r===void 0?i=T.replace(e,t):le.is(r)?(o=r,i=Ke.replace(e,t,r)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(r),i=Ke.replace(e,t,o)),this.edits.push(i),o!==void 0)return o},n.prototype.delete=function(e,t){var r,i;if(t===void 0?r=T.del(e):le.is(t)?(i=t,r=Ke.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(t),r=Ke.del(e,i)),this.edits.push(r),i!==void 0)return i},n.prototype.add=function(e){this.edits.push(e)},n.prototype.all=function(){return this.edits},n.prototype.clear=function(){this.edits.splice(0,this.edits.length)},n.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},n}(),ji=function(){function n(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return n.prototype.all=function(){return this._annotations},Object.defineProperty(n.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),n.prototype.manage=function(e,t){var r;if(le.is(e)?r=e:(r=this.nextId(),t=e),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=t,this._size++,r},n.prototype.nextId=function(){return this._counter++,this._counter.toString()},n}(),ul=function(){function n(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new ji(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(r){if(nt.is(r)){var i=new gn(r.edits,t._changeAnnotations);t._textEditChanges[r.textDocument.uri]=i}})):e.changes&&Object.keys(e.changes).forEach(function(r){var i=new gn(e.changes[r]);t._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(n.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),n.prototype.getTextEditChange=function(e){if(wn.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},r=this._textEditChanges[t.uri];if(!r){var i=[],o={textDocument:t,edits:i};this._workspaceEdit.documentChanges.push(o),r=new gn(i,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[e];if(!r){var i=[];this._workspaceEdit.changes[e]=i,r=new gn(i),this._textEditChanges[e]=r}return r}},n.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new ji,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},n.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},n.prototype.createFile=function(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;mt.is(t)||le.is(t)?i=t:r=t;var o,s;if(i===void 0?o=Tt.create(e,r):(s=le.is(i)?i:this._changeAnnotations.manage(i),o=Tt.create(e,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n.prototype.renameFile=function(e,t,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var o;mt.is(r)||le.is(r)?o=r:i=r;var s,a;if(o===void 0?s=Pt.create(e,t,i):(a=le.is(o)?o:this._changeAnnotations.manage(o),s=Pt.create(e,t,i,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},n.prototype.deleteFile=function(e,t,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;mt.is(t)||le.is(t)?i=t:r=t;var o,s;if(i===void 0?o=At.create(e,r):(s=le.is(i)?i:this._changeAnnotations.manage(i),o=At.create(e,r,s)),this._workspaceEdit.documentChanges.push(o),s!==void 0)return s},n}();var Vi;(function(n){function e(r){return{uri:r}}n.create=e;function t(r){var i=r;return v.defined(i)&&v.string(i.uri)}n.is=t})(Vi||(Vi={}));var Nt;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){var i=r;return v.defined(i)&&v.string(i.uri)&&v.integer(i.version)}n.is=t})(Nt||(Nt={}));var wn;(function(n){function e(r,i){return{uri:r,version:i}}n.create=e;function t(r){var i=r;return v.defined(i)&&v.string(i.uri)&&(i.version===null||v.integer(i.version))}n.is=t})(wn||(wn={}));var Bi;(function(n){function e(r,i,o,s){return{uri:r,languageId:i,version:o,text:s}}n.create=e;function t(r){var i=r;return v.defined(i)&&v.string(i.uri)&&v.string(i.languageId)&&v.integer(i.version)&&v.string(i.text)}n.is=t})(Bi||(Bi={}));var ce;(function(n){n.PlainText="plaintext",n.Markdown="markdown"})(ce||(ce={}));(function(n){function e(t){var r=t;return r===n.PlainText||r===n.Markdown}n.is=e})(ce||(ce={}));var xn;(function(n){function e(t){var r=t;return v.objectLiteral(t)&&ce.is(r.kind)&&v.string(r.value)}n.is=e})(xn||(xn={}));var R;(function(n){n.Text=1,n.Method=2,n.Function=3,n.Constructor=4,n.Field=5,n.Variable=6,n.Class=7,n.Interface=8,n.Module=9,n.Property=10,n.Unit=11,n.Value=12,n.Enum=13,n.Keyword=14,n.Snippet=15,n.Color=16,n.File=17,n.Reference=18,n.Folder=19,n.EnumMember=20,n.Constant=21,n.Struct=22,n.Event=23,n.Operator=24,n.TypeParameter=25})(R||(R={}));var re;(function(n){n.PlainText=1,n.Snippet=2})(re||(re={}));var Ne;(function(n){n.Deprecated=1})(Ne||(Ne={}));var $i;(function(n){function e(r,i,o){return{newText:r,insert:i,replace:o}}n.create=e;function t(r){var i=r;return i&&v.string(i.newText)&&W.is(i.insert)&&W.is(i.replace)}n.is=t})($i||($i={}));var qi;(function(n){n.asIs=1,n.adjustIndentation=2})(qi||(qi={}));var or;(function(n){function e(t){return{label:t}}n.create=e})(or||(or={}));var sr;(function(n){function e(t,r){return{items:t||[],isIncomplete:!!r}}n.create=e})(sr||(sr={}));var Ot;(function(n){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}n.fromPlainText=e;function t(r){var i=r;return v.string(i)||v.objectLiteral(i)&&v.string(i.language)&&v.string(i.value)}n.is=t})(Ot||(Ot={}));var ar;(function(n){function e(t){var r=t;return!!r&&v.objectLiteral(r)&&(xn.is(r.contents)||Ot.is(r.contents)||v.typedArray(r.contents,Ot.is))&&(t.range===void 0||W.is(t.range))}n.is=e})(ar||(ar={}));var Ki;(function(n){function e(t,r){return r?{label:t,documentation:r}:{label:t}}n.create=e})(Ki||(Ki={}));var Gi;(function(n){function e(t,r){for(var i=[],o=2;o=0;h--){var p=l[h],m=o.offsetAt(p.range.start),g=o.offsetAt(p.range.end);if(g<=c)a=a.substring(0,m)+p.newText+a.substring(g,a.length);else throw new Error("Overlapping edit");c=m}return a}n.applyEdits=r;function i(o,s){if(o.length<=1)return o;var a=o.length/2|0,l=o.slice(0,a),c=o.slice(a);i(l,s),i(c,s);for(var h=0,p=0,m=0;h0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},n.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),r=0,i=t.length;if(i===0)return Q.create(0,e);for(;re?i=o:r=o+1}var s=r-1;return Q.create(s,e-t[s])},n.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var r=t[e.line],i=e.line+1"u"}n.undefined=r;function i(g){return g===!0||g===!1}n.boolean=i;function o(g){return e.call(g)==="[object String]"}n.string=o;function s(g){return e.call(g)==="[object Number]"}n.number=s;function a(g,w,x){return e.call(g)==="[object Number]"&&w<=g&&g<=x}n.numberRange=a;function l(g){return e.call(g)==="[object Number]"&&-2147483648<=g&&g<=2147483647}n.integer=l;function c(g){return e.call(g)==="[object Number]"&&0<=g&&g<=2147483647}n.uinteger=c;function h(g){return e.call(g)==="[object Function]"}n.func=h;function p(g){return g!==null&&typeof g=="object"}n.objectLiteral=p;function m(g,w){return Array.isArray(g)&&g.every(w)}n.typedArray=m})(v||(v={}));var rt=class{constructor(e,t,r,i){this._uri=e,this._languageId=t,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(t,r)}return this._content}update(e,t){for(let r of e)if(rt.isIncremental(r)){let i=Zi(r.range),o=this.offsetAt(i.start),s=this.offsetAt(i.end);this._content=this._content.substring(0,o)+r.text+this._content.substring(s,this._content.length);let a=Math.max(i.start.line,0),l=Math.max(i.end.line,0),c=this._lineOffsets,h=Qi(r.text,!1,o);if(l-a===h.length)for(let m=0,g=h.length;me?i=s:r=s+1}let o=r-1;return{line:o,character:e-t[o]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1{let m=h.range.start.line-p.range.start.line;return m===0?h.range.start.character-p.range.start.character:m}),l=0,c=[];for(let h of a){let p=i.offsetAt(h.range.start);if(pl&&c.push(s.substring(l,p)),h.newText.length&&c.push(h.newText),l=i.offsetAt(h.range.end)}return c.push(s.substr(l)),c.join("")}n.applyEdits=r})(Ut||(Ut={}));function ur(n,e){if(n.length<=1)return n;let t=n.length/2|0,r=n.slice(0,t),i=n.slice(t);ur(r,e),ur(i,e);let o=0,s=0,a=0;for(;ot.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:n}function Bs(n){let e=Zi(n.range);return e!==n.range?{newText:n.newText,range:e}:n}var eo;(function(n){n.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[ce.Markdown,ce.PlainText]}},hover:{contentFormat:[ce.Markdown,ce.PlainText]}}}})(eo||(eo={}));var it;(function(n){n[n.Unknown=0]="Unknown",n[n.File=1]="File",n[n.Directory=2]="Directory",n[n.SymbolicLink=64]="SymbolicLink"})(it||(it={}));var to={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function no(n){switch(n){case"experimental":return`\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F - -`;case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it. - -`;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it. - -`;default:return""}}function ze(n,e,t){var r;if(e?r={kind:"markdown",value:qs(n,t)}:r={kind:"plaintext",value:$s(n,t)},r.value!=="")return r}function Sn(n){return n=n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),n.replace(//g,">")}function $s(n,e){if(!n.description||n.description==="")return"";if(typeof n.description!="string")return n.description.value;var t="";if(e?.documentation!==!1){n.status&&(t+=no(n.status)),t+=n.description;var r=ro(n.browsers);r&&(t+=` -(`+r+")"),"syntax"in n&&(t+=` - -Syntax: `.concat(n.syntax))}return n.references&&n.references.length>0&&e?.references!==!1&&(t.length>0&&(t+=` - -`),t+=n.references.map(function(i){return"".concat(i.name,": ").concat(i.url)}).join(" | ")),t}function qs(n,e){if(!n.description||n.description==="")return"";var t="";if(e?.documentation!==!1){n.status&&(t+=no(n.status)),typeof n.description=="string"?t+=Sn(n.description):t+=n.description.kind===ce.Markdown?n.description.value:Sn(n.description.value);var r=ro(n.browsers);r&&(t+=` - -(`+Sn(r)+")"),"syntax"in n&&n.syntax&&(t+=` - -Syntax: `.concat(Sn(n.syntax)))}return n.references&&n.references.length>0&&e?.references!==!1&&(t.length>0&&(t+=` - -`),t+=n.references.map(function(i){return"[".concat(i.name,"](").concat(i.url,")")}).join(" | ")),t}function ro(n){return n===void 0&&(n=[]),n.length===0?null:n.map(function(e){var t="",r=e.match(/([A-Z]+)(\d+)?/),i=r[1],o=r[2];return i in to&&(t+=to[i]),o&&(t+=" "+o),t}).join(", ")}var jt=H(),ao=[{func:"rgb($red, $green, $blue)",desc:jt("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:jt("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:jt("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:jt("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")},{func:"hwb($hue $white $black)",desc:jt("css.builtin.hwb","Creates a Color from hue, white and black.")}],Vt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},mr={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."};function Je(n,e){var t=n.getText(),r=t.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);var i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function io(n){var e=n.getText(),t=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(t)switch(t[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof t[2]>"u")return parseFloat(e)%360}throw new Error}function lo(n){var e=n.getName();return e?/^(rgb|rgba|hsl|hsla|hwb)$/gi.test(e):!1}var oo=48,Ks=57,Gs=65;var kn=97,Hs=102;function J(n){return n=kn&&n<=Hs?n-kn+10:0)}function so(n){if(n[0]!=="#")return null;switch(n.length){case 4:return{red:J(n.charCodeAt(1))*17/255,green:J(n.charCodeAt(2))*17/255,blue:J(n.charCodeAt(3))*17/255,alpha:1};case 5:return{red:J(n.charCodeAt(1))*17/255,green:J(n.charCodeAt(2))*17/255,blue:J(n.charCodeAt(3))*17/255,alpha:J(n.charCodeAt(4))*17/255};case 7:return{red:(J(n.charCodeAt(1))*16+J(n.charCodeAt(2)))/255,green:(J(n.charCodeAt(3))*16+J(n.charCodeAt(4)))/255,blue:(J(n.charCodeAt(5))*16+J(n.charCodeAt(6)))/255,alpha:1};case 9:return{red:(J(n.charCodeAt(1))*16+J(n.charCodeAt(2)))/255,green:(J(n.charCodeAt(3))*16+J(n.charCodeAt(4)))/255,blue:(J(n.charCodeAt(5))*16+J(n.charCodeAt(6)))/255,alpha:(J(n.charCodeAt(7))*16+J(n.charCodeAt(8)))/255}}return null}function co(n,e,t,r){if(r===void 0&&(r=1),n=n/60,e===0)return{red:t,green:t,blue:t,alpha:r};var i=function(a,l,c){for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-a)*c+a:c<3?l:c<4?(l-a)*(4-c)+a:a},o=t<=.5?t*(e+1):t+e-t*e,s=t*2-o;return{red:i(s,o,n+2),green:i(s,o,n),blue:i(s,o,n-2),alpha:r}}function fr(n){var e=n.red,t=n.green,r=n.blue,i=n.alpha,o=Math.max(e,t,r),s=Math.min(e,t,r),a=0,l=0,c=(s+o)/2,h=o-s;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),o){case e:a=(t-r)/h+(t=1){var i=e/(e+t);return{red:i,green:i,blue:i,alpha:r}}var o=co(n,1,.5,r),s=o.red;s*=1-e-t,s+=e;var a=o.green;a*=1-e-t,a+=e;var l=o.blue;return l*=1-e-t,l+=e,{red:s,green:a,blue:l,alpha:r}}function ho(n){var e=fr(n),t=Math.min(n.red,n.green,n.blue),r=1-Math.max(n.red,n.green,n.blue);return{h:e.h,w:t,b:r,a:e.a}}function po(n){if(n.type===u.HexColorValue){var e=n.getText();return so(e)}else if(n.type===u.Function){var t=n,r=t.getName(),i=t.getArguments().getChildren();if(i.length===1){var o=i[0].getChildren();if(o.length===1&&o[0].type===u.Expression&&(i=o[0].getChildren(),i.length===3)){var s=i[2];if(s instanceof pt){var a=s.getLeft(),l=s.getRight(),c=s.getOperator();a&&l&&c&&c.matches("/")&&(i=[i[0],i[1],a,l])}}}if(!r||i.length<3||i.length>4)return null;try{var h=i.length===4?Je(i[3],1):1;if(r==="rgb"||r==="rgba")return{red:Je(i[0],255),green:Je(i[1],255),blue:Je(i[2],255),alpha:h};if(r==="hsl"||r==="hsla"){var p=io(i[0]),m=Je(i[1],100),g=Je(i[2],100);return co(p,m,g,h)}else if(r==="hwb"){var p=io(i[0]),w=Je(i[1],100),x=Je(i[2],100);return Js(p,w,x,h)}}catch{return null}}else if(n.type===u.Identifier){if(n.parent&&n.parent.type!==u.Term)return null;var y=n.parent;if(y&&y.parent&&y.parent.type===u.BinaryExpression){var D=y.parent;if(D.parent&&D.parent.type===u.ListEntry&&D.parent.key===D)return null}var M=n.getText().toLowerCase();if(M==="none")return null;var z=Vt[M];if(z)return so(z)}return null}var gr={bottom:"Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.",left:"Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},br={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to \u2018repeat no-repeat\u2019.","repeat-y":"Computes to \u2018no-repeat repeat\u2019.",round:"Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},vr={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},uo=["medium","thick","thin"],yr={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},wr={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},xr={initial:"Represents the value specified as the property\u2019s initial value.",inherit:"Represents the computed value of the property on the element\u2019s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},Sr={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},kr={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position."},Cr={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value \u201Cstart\u201D or \u201Cend\u201D.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},_r={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Cn={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},mo=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","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","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],fo=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],go=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function Bt(n){return Object.keys(n).map(function(e){return n[e]})}function he(n){return typeof n<"u"}var bo=function(n,e,t){if(t||arguments.length===2)for(var r=0,i=e.length,o;re.offset?o-e.offset:0}return e},n.prototype.markError=function(e,t,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new fn(e,t,ne.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)},n.prototype.parseStylesheet=function(e){var t=e.version,r=e.getText(),i=function(o,s){if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(o,s)};return this.internalParse(r,this._parseStylesheet,i)},n.prototype.internalParse=function(e,t,r){this.scanner.setSource(e),this.token=this.scanner.scan();var i=t.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=function(o,s){return e.substr(o,s)}),i},n.prototype._parseStylesheet=function(){for(var e=this.create(ci);e.addChild(this._parseStylesheetStart()););var t=!1;do{var r=!1;do{r=!1;var i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,t=!1,!this.peek(d.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(d.SemiColon)&&this.markError(e,f.SemiColonExpected));this.accept(d.SemiColon)||this.accept(d.CDO)||this.accept(d.CDC);)r=!0,t=!1}while(r);if(this.peek(d.EOF))break;t||(this.peek(d.AtKeyword)?this.markError(e,f.UnknownAtRule):this.markError(e,f.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(d.EOF));return this.finish(e)},n.prototype._parseStylesheetStart=function(){return this._parseCharset()},n.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(d.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},n.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},n.prototype._tryParseRuleset=function(e){var t=this.mark();if(this._parseSelector(e)){for(;this.accept(d.Comma)&&this._parseSelector(e););if(this.accept(d.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null},n.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var t=this.create(Te),r=t.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(d.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(t,f.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},n.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},n.prototype._parseRuleSetDeclaration=function(){return this.peek(d.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},n.prototype._needsSemicolonAfter=function(e){switch(e.type){case u.Keyframe:case u.ViewPort:case u.Media:case u.Ruleset:case u.Namespace:case u.If:case u.For:case u.Each:case u.While:case u.MixinDeclaration:case u.FunctionDeclaration:case u.MixinContentDeclaration:return!1;case u.ExtendsReference:case u.MixinContentReference:case u.ReturnStatement:case u.MediaQuery:case u.Debug:case u.Import:case u.AtApplyRule:case u.CustomPropertyDeclaration:return!0;case u.VariableDeclaration:return e.needsSemicolon;case u.MixinReference:return!e.getContent();case u.Declaration:return!e.getNestedProperties()}return!1},n.prototype._parseDeclarations=function(e){var t=this.create(Et);if(!this.accept(d.CurlyL))return null;for(var r=e();t.addChild(r)&&!this.peek(d.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(d.SemiColon))return this.finish(t,f.SemiColonExpected,[d.SemiColon,d.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===d.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(d.SemiColon););r=e()}return this.accept(d.CurlyR)?this.finish(t):this.finish(t,f.RightCurlyExpected,[d.CurlyR,d.SemiColon])},n.prototype._parseBody=function(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,f.LeftCurlyExpected,[d.CurlyR,d.SemiColon])},n.prototype._parseSelector=function(e){var t=this.create(Ee),r=!1;for(e&&(r=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)r=!0,t.addChild(this._parseCombinator());return r?this.finish(t):null},n.prototype._parseDeclaration=function(e){var t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;var r=this.create(ae);return r.setProperty(this._parseProperty())?this.accept(d.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(d.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,f.PropertyValueExpected)):this.finish(r,f.ColonExpected,[d.Colon],e||[d.SemiColon]):null},n.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(d.Ident,/^--/))return null;var t=this.create(hi);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(d.Colon))return this.finish(t,f.ColonExpected,[d.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);var r=this.mark();if(this.peek(d.CurlyL)){var i=this.create(di),o=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(i.setDeclarations(o)&&!o.isErroneous(!0)&&(i.addChild(this._parsePrio()),this.peek(d.SemiColon)))return this.finish(i),t.setPropertySet(i),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(r)}var s=this._parseExpr();return s&&!s.isErroneous(!0)&&(this._parsePrio(),this.peekOne.apply(this,bo(bo([],e||[],!1),[d.SemiColon,d.EOF],!1)))?(t.setValue(s),this.peek(d.SemiColon)&&(t.semicolonPosition=this.token.offset),this.finish(t)):(this.restoreAtMark(r),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),he(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,f.PropertyValueExpected):this.finish(t))},n.prototype._parseCustomPropertyValue=function(e){var t=this;e===void 0&&(e=[d.CurlyR]);var r=this.create(F),i=function(){return s===0&&a===0&&l===0},o=function(){return e.indexOf(t.token.type)!==-1},s=0,a=0,l=0;e:for(;;){switch(this.token.type){case d.SemiColon:if(i())break e;break;case d.Exclamation:if(i())break e;break;case d.CurlyL:s++;break;case d.CurlyR:if(s--,s<0){if(o()&&a===0&&l===0)break e;return this.finish(r,f.LeftCurlyExpected)}break;case d.ParenthesisL:a++;break;case d.ParenthesisR:if(a--,a<0){if(o()&&l===0&&s===0)break e;return this.finish(r,f.LeftParenthesisExpected)}break;case d.BracketL:l++;break;case d.BracketR:if(l--,l<0)return this.finish(r,f.LeftSquareBracketExpected);break;case d.BadString:break e;case d.EOF:var c=f.RightCurlyExpected;return l>0?c=f.RightSquareBracketExpected:a>0&&(c=f.RightParenthesisExpected),this.finish(r,c)}this.consumeToken()}return this.finish(r)},n.prototype._tryToParseDeclaration=function(e){var t=this.mark();return this._parseProperty()&&this.accept(d.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)},n.prototype._parseProperty=function(){var e=this.create(dt),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},n.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},n.prototype._parseCharset=function(){if(!this.peek(d.Charset))return null;var e=this.create(F);return this.consumeToken(),this.accept(d.String)?this.accept(d.SemiColon)?this.finish(e):this.finish(e,f.SemiColonExpected):this.finish(e,f.IdentifierExpected)},n.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(ht);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,f.URIOrStringExpected):(!this.peek(d.SemiColon)&&!this.peek(d.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},n.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Si);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,f.URIExpected,[d.SemiColon]):this.accept(d.SemiColon)?this.finish(e):this.finish(e,f.SemiColonExpected)},n.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(ln);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},n.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(bi);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},n.prototype._parseKeyframe=function(){if(!this.peekRegExp(d.AtKeyword,this.keyframeRegex))return null;var e=this.create(cn),t=this.create(F);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,f.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,f.IdentifierExpected,[d.CurlyR])},n.prototype._parseKeyframeIdent=function(){return this._parseIdent([A.Keyframe])},n.prototype._parseKeyframeSelector=function(){var e=this.create(Qn);if(!e.addChild(this._parseIdent())&&!this.accept(d.Percentage))return null;for(;this.accept(d.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(d.Percentage))return this.finish(e,f.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},n.prototype._tryParseKeyframeSelector=function(){var e=this.create(Qn),t=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(d.Percentage))return null;for(;this.accept(d.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(d.Percentage))return this.restoreAtMark(t),null;return this.peek(d.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)},n.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var t=this.create(Dt);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))},n.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},n.prototype._parseSupportsCondition=function(){var e=this.create(Ze);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(d.Ident,/^(and|or)$/i))for(var t=this.token.text.toLowerCase();this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},n.prototype._parseSupportsConditionInParens=function(){var e=this.create(Ze);if(this.accept(d.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([d.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,f.ConditionExpected):this.accept(d.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,f.RightParenthesisExpected,[d.ParenthesisR],[]);if(this.peek(d.Ident)){var t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(d.ParenthesisL)){for(var r=1;this.token.type!==d.EOF&&r!==0;)this.token.type===d.ParenthesisL?r++:this.token.type===d.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(t)}return this.finish(e,f.LeftParenthesisExpected,[],[d.ParenthesisL])},n.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},n.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var t=this.create(dn);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,f.MediaQueryExpected)},n.prototype._parseMediaQueryList=function(){var e=this.create(hn);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,f.MediaQueryExpected);for(;this.accept(d.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,f.MediaQueryExpected);return this.finish(e)},n.prototype._parseMediaQuery=function(){var e=this.create(pn),t=this.mark();if(this.acceptIdent("not"),this.peek(d.ParenthesisL))this.restoreAtMark(t),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)},n.prototype._parseRatio=function(){var e=this.mark(),t=this.create(Ri);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(t):this.finish(t,f.NumberExpected):(this.restoreAtMark(e),null):null},n.prototype._parseMediaCondition=function(){var e=this.create(Ci);this.acceptIdent("not");for(var t=!0;t;){if(!this.accept(d.ParenthesisL))return this.finish(e,f.LeftParenthesisExpected,[],[d.CurlyL]);if(this.peek(d.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(d.ParenthesisR))return this.finish(e,f.RightParenthesisExpected,[],[d.CurlyL]);t=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)},n.prototype._parseMediaFeature=function(){var e=this,t=[d.ParenthesisR],r=this.create(_i),i=function(){return e.acceptDelim("<")||e.acceptDelim(">")?(e.hasWhitespace()||e.acceptDelim("="),!0):!!e.acceptDelim("=")};if(r.addChild(this._parseMediaFeatureName())){if(this.accept(d.Colon)){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,f.TermExpected,[],t)}else if(i()){if(!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,f.TermExpected,[],t);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,f.TermExpected,[],t)}}else if(r.addChild(this._parseMediaFeatureValue())){if(!i())return this.finish(r,f.OperatorExpected,[],t);if(!r.addChild(this._parseMediaFeatureName()))return this.finish(r,f.IdentifierExpected,[],t);if(i()&&!r.addChild(this._parseMediaFeatureValue()))return this.finish(r,f.TermExpected,[],t)}else return this.finish(r,f.IdentifierExpected,[],t);return this.finish(r)},n.prototype._parseMediaFeatureName=function(){return this._parseIdent()},n.prototype._parseMediaFeatureValue=function(){return this._parseRatio()||this._parseTermExpression()},n.prototype._parseMedium=function(){var e=this.create(F);return e.addChild(this._parseIdent())?this.finish(e):null},n.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},n.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(Fi);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(d.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,f.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},n.prototype._parsePageMarginBox=function(){if(!this.peek(d.AtKeyword))return null;var e=this.create(Ei);return this.acceptOneKeyword(go)||this.markError(e,f.UnknownAtRule,[],[d.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},n.prototype._parsePageSelector=function(){if(!this.peek(d.Ident)&&!this.peek(d.Colon))return null;var e=this.create(F);return e.addChild(this._parseIdent()),this.accept(d.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,f.IdentifierExpected):this.finish(e)},n.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(ki);return this.consumeToken(),this.resync([],[d.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},n.prototype._parseUnknownAtRule=function(){if(!this.peek(d.AtKeyword))return null;var e=this.create(mn);e.addChild(this._parseUnknownAtRuleName());var t=function(){return i===0&&o===0&&s===0},r=0,i=0,o=0,s=0;e:for(;;){switch(this.token.type){case d.SemiColon:if(t())break e;break;case d.EOF:return i>0?this.finish(e,f.RightCurlyExpected):s>0?this.finish(e,f.RightSquareBracketExpected):o>0?this.finish(e,f.RightParenthesisExpected):this.finish(e);case d.CurlyL:r++,i++;break;case d.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),s>0)return this.finish(e,f.RightSquareBracketExpected);if(o>0)return this.finish(e,f.RightParenthesisExpected);break e}if(i<0){if(o===0&&s===0)break e;return this.finish(e,f.LeftCurlyExpected)}break;case d.ParenthesisL:o++;break;case d.ParenthesisR:if(o--,o<0)return this.finish(e,f.LeftParenthesisExpected);break;case d.BracketL:s++;break;case d.BracketR:if(s--,s<0)return this.finish(e,f.LeftSquareBracketExpected);break}this.consumeToken()}return e},n.prototype._parseUnknownAtRuleName=function(){var e=this.create(F);return this.accept(d.AtKeyword)?this.finish(e):e},n.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(d.Dashmatch)||this.peek(d.Includes)||this.peek(d.SubstringOperator)||this.peek(d.PrefixOperator)||this.peek(d.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(u.Operator);return this.consumeToken(),this.finish(e)}else return null},n.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(F);return this.consumeToken(),this.finish(e)},n.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(F);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=u.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=u.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(F);return this.consumeToken(),e.type=u.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(F);return this.consumeToken(),e.type=u.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(F);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=u.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null},n.prototype._parseSimpleSelector=function(){var e=this.create(De),t=0;for(e.addChild(this._parseElementName())&&t++;(t===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null},n.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},n.prototype._parseSelectorIdent=function(){return this._parseIdent()},n.prototype._parseHash=function(){if(!this.peek(d.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(u.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,f.IdentifierExpected)}else this.consumeToken();return this.finish(e)},n.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(u.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,f.IdentifierExpected):this.finish(e)},n.prototype._parseElementName=function(){var e=this.mark(),t=this.createNode(u.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),!t.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(t)},n.prototype._parseNamespacePrefix=function(){var e=this.mark(),t=this.createNode(u.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)},n.prototype._parseAttrib=function(){if(!this.peek(d.BracketL))return null;var e=this.create(zi);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(d.BracketR)?this.finish(e):this.finish(e,f.RightSquareBracketExpected)):this.finish(e,f.IdentifierExpected)},n.prototype._parsePseudo=function(){var e=this,t=this._tryParsePseudoIdentifier();if(t){if(!this.hasWhitespace()&&this.accept(d.ParenthesisL)){var r=function(){var i=e.create(F);if(!i.addChild(e._parseSelector(!1)))return null;for(;e.accept(d.Comma)&&i.addChild(e._parseSelector(!1)););return e.peek(d.ParenthesisR)?e.finish(i):null};if(t.addChild(this.try(r)||this._parseBinaryExpr()),!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected)}return this.finish(t)}return null},n.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(d.Colon))return null;var e=this.mark(),t=this.createNode(u.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(d.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,f.IdentifierExpected):this.finish(t))},n.prototype._tryParsePrio=function(){var e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)},n.prototype._parsePrio=function(){if(!this.peek(d.Exclamation))return null;var e=this.createNode(u.Prio);return this.accept(d.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},n.prototype._parseExpr=function(e){e===void 0&&(e=!1);var t=this.create(un);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(d.Comma)){if(e)return this.finish(t);this.consumeToken()}else if(!this.hasWhitespace())break;if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},n.prototype._parseUnicodeRange=function(){if(!this.peekIdent("u"))return null;var e=this.create(li);return this.acceptUnicodeRange()?this.finish(e):null},n.prototype._parseNamedLine=function(){if(!this.peek(d.BracketL))return null;var e=this.createNode(u.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(d.BracketR)?this.finish(e):this.finish(e,f.RightSquareBracketExpected)},n.prototype._parseBinaryExpr=function(e,t){var r=this.create(pt);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(t||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,f.TermExpected);r=this.finish(r);var i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)},n.prototype._parseTerm=function(){var e=this.create(Di);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},n.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},n.prototype._parseOperation=function(){if(!this.peek(d.ParenthesisL))return null;var e=this.create(F);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(d.ParenthesisR)?this.finish(e):this.finish(e,f.RightParenthesisExpected)},n.prototype._parseNumeric=function(){if(this.peek(d.Num)||this.peek(d.Percentage)||this.peek(d.Resolution)||this.peek(d.Length)||this.peek(d.EMS)||this.peek(d.EXS)||this.peek(d.Angle)||this.peek(d.Time)||this.peek(d.Dimension)||this.peek(d.Freq)){var e=this.create(Rt);return this.consumeToken(),this.finish(e)}return null},n.prototype._parseStringLiteral=function(){if(!this.peek(d.String)&&!this.peek(d.BadString))return null;var e=this.createNode(u.StringLiteral);return this.consumeToken(),this.finish(e)},n.prototype._parseURILiteral=function(){if(!this.peekRegExp(d.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),t=this.createNode(u.URILiteral);return this.accept(d.Ident),this.hasWhitespace()||!this.peek(d.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(d.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected))},n.prototype._parseURLArgument=function(){var e=this.create(F);return!this.accept(d.String)&&!this.accept(d.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},n.prototype._parseIdent=function(e){if(!this.peek(d.Ident))return null;var t=this.create(te);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(d.Ident,/^--/),this.consumeToken(),this.finish(t)},n.prototype._parseFunction=function(){var e=this.mark(),t=this.create(Pe);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(d.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,f.ExpressionExpected);return this.accept(d.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected)},n.prototype._parseFunctionIdentifier=function(){if(!this.peek(d.Ident))return null;var e=this.create(te);if(e.referenceTypes=[A.Function],this.acceptIdent("progid")){if(this.accept(d.Colon))for(;this.accept(d.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},n.prototype._parseFunctionArgument=function(){var e=this.create(we);return e.setValue(this._parseExpr(!0))?this.finish(e):null},n.prototype._parseHexColor=function(){if(this.peekRegExp(d.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(zt);return this.consumeToken(),this.finish(e)}else return null},n}();function yo(n,e){var t=0,r=n.length;if(r===0)return 0;for(;te+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},n.prototype.findInScope=function(e,t){t===void 0&&(t=0);var r=e+t,i=yo(this.children,function(s){return s.offset>r});if(i===0)return this;var o=this.children[i-1];return o.offset<=e&&o.offset+o.length>=e+t?o.findInScope(e,t):this},n.prototype.addSymbol=function(e){this.symbols.push(e)},n.prototype.getSymbol=function(e,t){for(var r=0;r{"use strict";var n={470:r=>{function i(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function o(a,l){for(var c,h="",p=0,m=-1,g=0,w=0;w<=a.length;++w){if(w2){var x=h.lastIndexOf("/");if(x!==h.length-1){x===-1?(h="",p=0):p=(h=h.slice(0,x)).length-1-h.lastIndexOf("/"),m=w,g=0;continue}}else if(h.length===2||h.length===1){h="",p=0,m=w,g=0;continue}}l&&(h.length>0?h+="/..":h="..",p=2)}else h.length>0?h+="/"+a.slice(m+1,w):h=a.slice(m+1,w),p=w-m-1;m=w,g=0}else c===46&&g!==-1?++g:g=-1}return h}var s={resolve:function(){for(var a,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var p;h>=0?p=arguments[h]:(a===void 0&&(a=process.cwd()),p=a),i(p),p.length!==0&&(l=p+"/"+l,c=p.charCodeAt(0)===47)}return l=o(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(i(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=o(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return i(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":s.normalize(a)},relative:function(a,l){if(i(a),i(l),a===l||(a=s.resolve(a))===(l=s.resolve(l)))return"";for(var c=1;cw){if(l.charCodeAt(m+y)===47)return l.slice(m+y+1);if(y===0)return l.slice(m+y)}else p>w&&(a.charCodeAt(c+y)===47?x=y:y===0&&(x=0));break}var D=a.charCodeAt(c+y);if(D!==l.charCodeAt(m+y))break;D===47&&(x=y)}var M="";for(y=c+x+1;y<=h;++y)y!==h&&a.charCodeAt(y)!==47||(M.length===0?M+="..":M+="/..");return M.length>0?M+l.slice(m+x):(m+=x,l.charCodeAt(m)===47&&++m,l.slice(m))},_makeLong:function(a){return a},dirname:function(a){if(i(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,h=-1,p=!0,m=a.length-1;m>=1;--m)if((l=a.charCodeAt(m))===47){if(!p){h=m;break}}else p=!1;return h===-1?c?"/":".":c&&h===1?"//":a.slice(0,h)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');i(a);var c,h=0,p=-1,m=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var g=l.length-1,w=-1;for(c=a.length-1;c>=0;--c){var x=a.charCodeAt(c);if(x===47){if(!m){h=c+1;break}}else w===-1&&(m=!1,w=c+1),g>=0&&(x===l.charCodeAt(g)?--g==-1&&(p=c):(g=-1,p=w))}return h===p?p=w:p===-1&&(p=a.length),a.slice(h,p)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!m){h=c+1;break}}else p===-1&&(m=!1,p=c+1);return p===-1?"":a.slice(h,p)},extname:function(a){i(a);for(var l=-1,c=0,h=-1,p=!0,m=0,g=a.length-1;g>=0;--g){var w=a.charCodeAt(g);if(w!==47)h===-1&&(p=!1,h=g+1),w===46?l===-1?l=g:m!==1&&(m=1):l!==-1&&(m=-1);else if(!p){c=g+1;break}}return l===-1||h===-1||m===0||m===1&&l===h-1&&l===c+1?"":a.slice(l,h)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var h=c.dir||c.root,p=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+p:h+"/"+p:p}(0,a)},parse:function(a){i(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,h=a.charCodeAt(0),p=h===47;p?(l.root="/",c=1):c=0;for(var m=-1,g=0,w=-1,x=!0,y=a.length-1,D=0;y>=c;--y)if((h=a.charCodeAt(y))!==47)w===-1&&(x=!1,w=y+1),h===46?m===-1?m=y:D!==1&&(D=1):m!==-1&&(D=-1);else if(!x){g=y+1;break}return m===-1||w===-1||D===0||D===1&&m===w-1&&m===g+1?w!==-1&&(l.base=l.name=g===0&&p?a.slice(1,w):a.slice(g,w)):(g===0&&p?(l.name=a.slice(1,m),l.base=a.slice(1,w)):(l.name=a.slice(g,m),l.base=a.slice(g,w)),l.ext=a.slice(m,w)),g>0?l.dir=a.slice(0,g-1):p&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};s.posix=s,r.exports=s},447:(r,i,o)=>{var s;if(o.r(i),o.d(i,{URI:()=>M,Utils:()=>pe}),typeof process=="object")s=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;s=a.indexOf("Windows")>=0}var l,c,h=(l=function(C,b){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(k,_){k.__proto__=_}||function(k,_){for(var N in _)Object.prototype.hasOwnProperty.call(_,N)&&(k[N]=_[N])})(C,b)},function(C,b){if(typeof b!="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function k(){this.constructor=C}l(C,b),C.prototype=b===null?Object.create(b):(k.prototype=b.prototype,new k)}),p=/^\w[\w\d+.-]*$/,m=/^\//,g=/^\/\//;function w(C,b){if(!C.scheme&&b)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'.concat(C.authority,'", path: "').concat(C.path,'", query: "').concat(C.query,'", fragment: "').concat(C.fragment,'"}'));if(C.scheme&&!p.test(C.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(C.path){if(C.authority){if(!m.test(C.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(g.test(C.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}var x="",y="/",D=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,M=function(){function C(b,k,_,N,O,B){B===void 0&&(B=!1),typeof b=="object"?(this.scheme=b.scheme||x,this.authority=b.authority||x,this.path=b.path||x,this.query=b.query||x,this.fragment=b.fragment||x):(this.scheme=function(Ce,se){return Ce||se?Ce:"file"}(b,B),this.authority=k||x,this.path=function(Ce,se){switch(Ce){case"https":case"http":case"file":se?se[0]!==y&&(se=y+se):se=y}return se}(this.scheme,_||x),this.query=N||x,this.fragment=O||x,w(this,B))}return C.isUri=function(b){return b instanceof C||!!b&&typeof b.authority=="string"&&typeof b.fragment=="string"&&typeof b.path=="string"&&typeof b.query=="string"&&typeof b.scheme=="string"&&typeof b.fsPath=="string"&&typeof b.with=="function"&&typeof b.toString=="function"},Object.defineProperty(C.prototype,"fsPath",{get:function(){return oe(this,!1)},enumerable:!1,configurable:!0}),C.prototype.with=function(b){if(!b)return this;var k=b.scheme,_=b.authority,N=b.path,O=b.query,B=b.fragment;return k===void 0?k=this.scheme:k===null&&(k=x),_===void 0?_=this.authority:_===null&&(_=x),N===void 0?N=this.path:N===null&&(N=x),O===void 0?O=this.query:O===null&&(O=x),B===void 0?B=this.fragment:B===null&&(B=x),k===this.scheme&&_===this.authority&&N===this.path&&O===this.query&&B===this.fragment?this:new P(k,_,N,O,B)},C.parse=function(b,k){k===void 0&&(k=!1);var _=D.exec(b);return _?new P(_[2]||x,ke(_[4]||x),ke(_[5]||x),ke(_[7]||x),ke(_[9]||x),k):new P(x,x,x,x,x)},C.file=function(b){var k=x;if(s&&(b=b.replace(/\\/g,y)),b[0]===y&&b[1]===y){var _=b.indexOf(y,2);_===-1?(k=b.substring(2),b=y):(k=b.substring(2,_),b=b.substring(_)||y)}return new P("file",k,b,x,x)},C.from=function(b){var k=new P(b.scheme,b.authority,b.path,b.query,b.fragment);return w(k,!0),k},C.prototype.toString=function(b){return b===void 0&&(b=!1),me(this,b)},C.prototype.toJSON=function(){return this},C.revive=function(b){if(b){if(b instanceof C)return b;var k=new P(b);return k._formatted=b.external,k._fsPath=b._sep===z?b.fsPath:null,k}return b},C}(),z=s?1:void 0,P=function(C){function b(){var k=C!==null&&C.apply(this,arguments)||this;return k._formatted=null,k._fsPath=null,k}return h(b,C),Object.defineProperty(b.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=oe(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),b.prototype.toString=function(k){return k===void 0&&(k=!1),k?me(this,!0):(this._formatted||(this._formatted=me(this,!1)),this._formatted)},b.prototype.toJSON=function(){var k={$mid:1};return this._fsPath&&(k.fsPath=this._fsPath,k._sep=z),this._formatted&&(k.external=this._formatted),this.path&&(k.path=this.path),this.scheme&&(k.scheme=this.scheme),this.authority&&(k.authority=this.authority),this.query&&(k.query=this.query),this.fragment&&(k.fragment=this.fragment),k},b}(M),L=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function $(C,b){for(var k=void 0,_=-1,N=0;N=97&&O<=122||O>=65&&O<=90||O>=48&&O<=57||O===45||O===46||O===95||O===126||b&&O===47)_!==-1&&(k+=encodeURIComponent(C.substring(_,N)),_=-1),k!==void 0&&(k+=C.charAt(N));else{k===void 0&&(k=C.substr(0,N));var B=L[O];B!==void 0?(_!==-1&&(k+=encodeURIComponent(C.substring(_,N)),_=-1),k+=B):_===-1&&(_=N)}}return _!==-1&&(k+=encodeURIComponent(C.substring(_))),k!==void 0?k:C}function ue(C){for(var b=void 0,k=0;k1&&C.scheme==="file"?"//".concat(C.authority).concat(C.path):C.path.charCodeAt(0)===47&&(C.path.charCodeAt(1)>=65&&C.path.charCodeAt(1)<=90||C.path.charCodeAt(1)>=97&&C.path.charCodeAt(1)<=122)&&C.path.charCodeAt(2)===58?b?C.path.substr(1):C.path[1].toLowerCase()+C.path.substr(2):C.path,s&&(k=k.replace(/\//g,"\\")),k}function me(C,b){var k=b?ue:$,_="",N=C.scheme,O=C.authority,B=C.path,Ce=C.query,se=C.fragment;if(N&&(_+=N,_+=":"),(O||N==="file")&&(_+=y,_+=y),O){var ge=O.indexOf("@");if(ge!==-1){var Xe=O.substr(0,ge);O=O.substr(ge+1),(ge=Xe.indexOf(":"))===-1?_+=k(Xe,!1):(_+=k(Xe.substr(0,ge),!1),_+=":",_+=k(Xe.substr(ge+1),!1)),_+="@"}(ge=(O=O.toLowerCase()).indexOf(":"))===-1?_+=k(O,!1):(_+=k(O.substr(0,ge),!1),_+=O.substr(ge))}if(B){if(B.length>=3&&B.charCodeAt(0)===47&&B.charCodeAt(2)===58)(Me=B.charCodeAt(1))>=65&&Me<=90&&(B="/".concat(String.fromCharCode(Me+32),":").concat(B.substr(3)));else if(B.length>=2&&B.charCodeAt(1)===58){var Me;(Me=B.charCodeAt(0))>=65&&Me<=90&&(B="".concat(String.fromCharCode(Me+32),":").concat(B.substr(2)))}_+=k(B,!0)}return Ce&&(_+="?",_+=k(Ce,!1)),se&&(_+="#",_+=b?se:$(se,!1)),_}function ve(C){try{return decodeURIComponent(C)}catch{return C.length>3?C.substr(0,3)+ve(C.substr(3)):C}}var ye=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ke(C){return C.match(ye)?C.replace(ye,function(b){return ve(b)}):C}var pe,G=o(470),Ie=function(C,b,k){if(k||arguments.length===2)for(var _,N=0,O=b.length;N{for(var o in i)t.o(i,o)&&!t.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:i[o]})},t.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),t.r=r=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},t(447)})();var{URI:Kt,Utils:En}=xo;var ea=function(n,e,t){if(t||arguments.length===2)for(var r=0,i=e.length,o;r0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=0;s--){var a=this.nodePath[s];if(a instanceof dt)this.getCompletionsForDeclarationProperty(a.getParent(),o);else if(a instanceof un)a.parent instanceof It?this.getVariableProposals(null,o):this.getCompletionsForExpression(a,o);else if(a instanceof De){var l=a.findAParent(u.ExtendsReference,u.Ruleset);if(l)if(l.type===u.ExtendsReference)this.getCompletionsForExtendsReference(l,a,o);else{var c=l;this.getCompletionsForSelector(c,c&&c.isNested(),o)}}else if(a instanceof we)this.getCompletionsForFunctionArgument(a,a.getParent(),o);else if(a instanceof Et)this.getCompletionsForDeclarations(a,o);else if(a instanceof $e)this.getCompletionsForVariableDeclaration(a,o);else if(a instanceof Te)this.getCompletionsForRuleSet(a,o);else if(a instanceof It)this.getCompletionsForInterpolation(a,o);else if(a instanceof Qe)this.getCompletionsForFunctionDeclaration(a,o);else if(a instanceof et)this.getCompletionsForMixinReference(a,o);else if(a instanceof Pe)this.getCompletionsForFunctionArgument(null,a,o);else if(a instanceof Dt)this.getCompletionsForSupports(a,o);else if(a instanceof Ze)this.getCompletionsForSupportsCondition(a,o);else if(a instanceof qe)this.getCompletionsForExtendsReference(a,null,o);else if(a.type===u.URILiteral)this.getCompletionForUriLiteralValue(a,o);else if(a.parent===null)this.getCompletionForTopLevel(o);else if(a.type===u.StringLiteral&&this.isImportPathParent(a.parent.type))this.getCompletionForImportPath(a,o);else continue;if(o.items.length>0||this.offset>a.offset)return this.finalize(o)}return this.getCompletionsForStylesheet(o),o.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,o),this.finalize(o)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},n.prototype.isImportPathParent=function(e){return e===u.Import},n.prototype.finalize=function(e){return e},n.prototype.findInNodePath=function(){for(var e=[],t=0;t=0;r--){var i=this.nodePath[r];if(e.indexOf(i.type)!==-1)return i}return null},n.prototype.getCompletionsForDeclarationProperty=function(e,t){return this.getPropertyProposals(e,t)},n.prototype.getPropertyProposals=function(e,t){var r=this,i=this.isTriggerPropertyValueCompletionEnabled,o=this.isCompletePropertyWithSemicolonEnabled,s=this.cssDataManager.getProperties();return s.forEach(function(a){var l,c,h=!1;e?(l=r.getCompletionRange(e.getProperty()),c=a.name,he(e.colonPosition)||(c+=": ",h=!0)):(l=r.getCompletionRange(null),c=a.name+": ",h=!0),!e&&o&&(c+="$0;"),e&&!e.semicolonPosition&&o&&r.offset>=r.textDocument.offsetAt(l.end)&&(c+="$0;");var p={label:a.name,documentation:ze(a,r.doesSupportMarkdown()),tags:Ht(a)?[Ne.Deprecated]:[],textEdit:T.replace(l,c),insertTextFormat:re.Snippet,kind:R.Property};a.restrictions||(h=!1),i&&h&&(p.command=_o);var m=typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50,g=(255-m).toString(16),w=q(a.name,"-")?Re.VendorPrefixed:Re.Normal;p.sortText=w+"_"+g,t.items.push(p)}),this.completionParticipants.forEach(function(a){a.onCssProperty&&a.onCssProperty({propertyName:r.currentWord,range:r.defaultReplaceRange})}),t},Object.defineProperty(n.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),n.prototype.getCompletionsForDeclarationValue=function(e,t){for(var r=this,i=e.getFullPropertyName(),o=this.cssDataManager.getProperty(i),s=e.getValue()||null;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(w){w.onCssPropertyValue&&w.onCssPropertyValue({propertyName:i,propertyValue:r.currentWord,range:r.getCompletionRange(s)})}),o){if(o.restrictions)for(var a=0,l=o.restrictions;a=e.offset+2&&this.getVariableProposals(null,t),t},n.prototype.getVariableProposals=function(e,t){for(var r=this.getSymbolContext().findSymbolsAtOffset(this.offset,A.Variable),i=0,o=r;i0){var o=this.currentWord.match(/^-?\d[\.\d+]*/);o&&(i=o[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(t&&t.parent&&t.parent.type===u.Term&&(t=t.getParent()),e.restrictions)for(var s=0,a=e.restrictions;s=r.end;if(i)return this.getCompletionForTopLevel(t);var o=!r||this.offset<=r.offset;return o?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},n.prototype.getCompletionsForSelector=function(e,t,r){var i=this,o=this.findInNodePath(u.PseudoSelector,u.IdentifierSelector,u.ClassSelector,u.ElementNameSelector);!o&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=W.create(Q.create(this.position.line,this.position.character-this.currentWord.length),this.position));var s=this.cssDataManager.getPseudoClasses();s.forEach(function(y){var D=vt(y.name),M={label:y.name,textEdit:T.replace(i.getCompletionRange(o),D),documentation:ze(y,i.doesSupportMarkdown()),tags:Ht(y)?[Ne.Deprecated]:[],kind:R.Function,insertTextFormat:y.name!==D?We:void 0};q(y.name,":-")&&(M.sortText=Re.VendorPrefixed),r.items.push(M)});var a=this.cssDataManager.getPseudoElements();if(a.forEach(function(y){var D=vt(y.name),M={label:y.name,textEdit:T.replace(i.getCompletionRange(o),D),documentation:ze(y,i.doesSupportMarkdown()),tags:Ht(y)?[Ne.Deprecated]:[],kind:R.Function,insertTextFormat:y.name!==D?We:void 0};q(y.name,"::-")&&(M.sortText=Re.VendorPrefixed),r.items.push(M)}),!t){for(var l=0,c=mo;l0){var D=w.substr(y.offset,y.length);return D.charAt(0)==="."&&!g[D]&&(g[D]=!0,r.items.push({label:D,textEdit:T.replace(i.getCompletionRange(o),D),kind:R.Keyword})),!1}return!0}),e&&e.isNested()){var x=e.getSelectors().findFirstChildBeforeOffset(this.offset);x&&e.getSelectors().getChildren().indexOf(x)===0&&this.getPropertyProposals(null,r)}return r},n.prototype.getCompletionsForDeclarations=function(e,t){if(!e||this.offset===e.offset)return t;var r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,t);if(r instanceof an){var i=r;if(!he(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,t);if(he(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue(),t),t},n.prototype.getCompletionsForExpression=function(e,t){var r=e.getParent();if(r instanceof we)return this.getCompletionsForFunctionArgument(r,r.getParent(),t),t;var i=e.findParent(u.Declaration);if(!i)return this.getTermProposals(void 0,null,t),t;var o=e.findChildAtOffset(this.offset,!0);return o?o instanceof Rt||o instanceof te?this.getCompletionsForDeclarationValue(i,t):t:this.getCompletionsForDeclarationValue(i,t)},n.prototype.getCompletionsForFunctionArgument=function(e,t,r){var i=t.getIdentifier();return i&&i.matches("var")&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r},n.prototype.getCompletionsForFunctionDeclaration=function(e,t){var r=e.getDeclarations();return r&&this.offset>r.offset&&this.offsete.lParent&&(!he(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t},n.prototype.getCompletionsForSupports=function(e,t){var r=e.getDeclarations(),i=!r||this.offset<=r.offset;if(i){var o=e.findFirstChildBeforeOffset(this.offset);return o instanceof Ze?this.getCompletionsForSupportsCondition(o,t):t}return this.getCompletionForTopLevel(t)},n.prototype.getCompletionsForExtendsReference=function(e,t,r){return r},n.prototype.getCompletionForUriLiteralValue=function(e,t){var r,i,o;if(e.hasChildren()){var a=e.getChild(0);r=a.getText(),i=this.position,o=this.getCompletionRange(a)}else{r="",i=this.position;var s=this.textDocument.positionAt(e.offset+4);o=W.create(s,s)}return this.completionParticipants.forEach(function(l){l.onCssURILiteralValue&&l.onCssURILiteralValue({uriValue:r,position:i,range:o})}),t},n.prototype.getCompletionForImportPath=function(e,t){var r=this;return this.completionParticipants.forEach(function(i){i.onCssImportPath&&i.onCssImportPath({pathValue:e.getText(),position:r.position,range:r.getCompletionRange(e)})}),t},n.prototype.hasCharacterAtPosition=function(e,t){var r=this.textDocument.getText();return e>=0&&e=0&&` -\r":{[()]},*>+`.indexOf(r.charAt(t))===-1;)t--;return r.substring(t+1,e)}function Fo(n){return n.toLowerCase()in Vt||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(n)}var zo=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),pa=H(),Rr=function(){function n(){this.parent=null,this.children=null,this.attributes=null}return n.prototype.findAttribute=function(e){if(this.attributes)for(var t=0,r=this.attributes;t"),this.writeLine(t,i.join(""))},n}(),Le;(function(n){function e(r,i){return i+t(r)+i}n.ensure=e;function t(r){var i=r.match(/^['"](.*)["']$/);return i?i[1]:r}n.remove=t})(Le||(Le={}));var Do=function(){function n(){this.id=0,this.attr=0,this.tag=0}return n}();function Ro(n,e){for(var t=new Rr,r=0,i=n.getChildren();r1){var c=e.cloneWithParent();t.addChild(c.findRoot()),t=c}t.append(s[l])}}break;case u.SelectorPlaceholder:if(o.matches("@at-root"))return t;case u.ElementNameSelector:var h=o.getText();t.addAttr("name",h==="*"?"element":be(h));break;case u.ClassSelector:t.addAttr("class",be(o.getText().substring(1)));break;case u.IdentifierSelector:t.addAttr("id",be(o.getText().substring(1)));break;case u.MixinDeclaration:t.addAttr("class",o.getName());break;case u.PseudoSelector:t.addAttr(be(o.getText()),"");break;case u.AttributeSelector:var p=o,m=p.getIdentifier();if(m){var g=p.getValue(),w=p.getOperator(),x=void 0;if(g&&w)switch(be(w.getText())){case"|=":x="".concat(Le.remove(be(g.getText())),"-\u2026");break;case"^=":x="".concat(Le.remove(be(g.getText())),"\u2026");break;case"$=":x="\u2026".concat(Le.remove(be(g.getText())));break;case"~=":x=" \u2026 ".concat(Le.remove(be(g.getText()))," \u2026 ");break;case"*=":x="\u2026".concat(Le.remove(be(g.getText())),"\u2026");break;default:x=Le.remove(be(g.getText()));break}t.addAttr(be(m.getText()),x)}break}}return t}function be(n){var e=new Fe;e.setSource(n);var t=e.scanUnquotedString();return t?t.text:n}var Io=function(){function n(e){this.cssDataManager=e}return n.prototype.selectorToMarkedString=function(e){var t=fa(e);if(t){var r=new Eo('"').print(t);return r.push(this.selectorToSpecificityMarkedString(e)),r}else return[]},n.prototype.simpleSelectorToMarkedString=function(e){var t=Ro(e),r=new Eo('"').print(t);return r.push(this.selectorToSpecificityMarkedString(e)),r},n.prototype.isPseudoElementIdentifier=function(e){var t=e.match(/^::?([\w-]+)/);return t?!!this.cssDataManager.getPseudoElement("::"+t[1]):!1},n.prototype.selectorToSpecificityMarkedString=function(e){var t=this,r=function(o){var s=new Do;e:for(var a=0,l=o.getChildren();a0){for(var p=new Do,m=0,g=c.getChildren();mp.id){p=z;continue}else if(z.idp.attr){p=z;continue}else if(z.attrp.tag){p=z;continue}}}s.id+=p.id,s.attr+=p.attr,s.tag+=p.tag;continue e}s.attr++;break}if(c.getChildren().length>0){var z=r(c);s.id+=z.id,s.attr+=z.attr,s.tag+=z.tag}}return s},i=r(e);return pa("specificity","[Selector Specificity](https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity): ({0}, {1}, {2})",i.id,i.attr,i.tag)},n}();var ua=function(){function n(e){this.prev=null,this.element=e}return n.prototype.processSelector=function(e){var t=null;if(!(this.element instanceof wt)&&e.getChildren().some(function(h){return h.hasChildren()&&h.getChild(0).type===u.SelectorCombinator})){var r=this.element.findRoot();r.parent instanceof wt&&(t=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(var i=0,o=e.getChildren();i=0;s--){var a=t[s].getSelectors().getChild(0);a&&o.processSelector(a)}return o.processSelector(n),e}var In=function(){function n(e,t){this.clientCapabilities=e,this.cssDataManager=t,this.selectorPrinting=new Io(t)}return n.prototype.configure=function(e){this.defaultSettings=e},n.prototype.doHover=function(e,t,r,i){i===void 0&&(i=this.defaultSettings);function o(y){return W.create(e.positionAt(y.offset),e.positionAt(y.end))}for(var s=e.offsetAt(t),a=ct(r,s),l=null,c=0;c0&&o[o.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]=o.length/2&&s.push({property:D.name,score:M})}),s.sort(function(D,M){return M.score-D.score||D.property.localeCompare(M.property)});for(var a=3,l=0,c=s;l=0;l--){var c=a[l];if(c instanceof ae){var h=c.getProperty();if(h&&h.offset===o&&h.end===s){this.getFixesForUnknownProperty(e,h,r,i);return}}}},n}();var Uo=function(){function n(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}return n}();function Qt(n,e,t,r){var i=n[e];i.value=t,t&&(Fr(i.properties,r)||i.properties.push(r))}function xa(n,e,t){Qt(n,"top",e,t),Qt(n,"right",e,t),Qt(n,"bottom",e,t),Qt(n,"left",e,t)}function ie(n,e,t,r){e==="top"||e==="right"||e==="bottom"||e==="left"?Qt(n,e,t,r):xa(n,t,r)}function Ir(n,e,t){switch(e.length){case 1:ie(n,void 0,e[0],t);break;case 2:ie(n,"top",e[0],t),ie(n,"bottom",e[0],t),ie(n,"right",e[1],t),ie(n,"left",e[1],t);break;case 3:ie(n,"top",e[0],t),ie(n,"right",e[1],t),ie(n,"left",e[1],t),ie(n,"bottom",e[2],t);break;case 4:ie(n,"top",e[0],t),ie(n,"right",e[1],t),ie(n,"bottom",e[2],t),ie(n,"left",e[3],t);break}}function Mr(n,e){for(var t=0,r=e;t"u"))switch(i.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=i;break;case"height":e.height=i;break;default:var s=i.fullPropertyName.split("-");switch(s[0]){case"border":switch(s[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(s[2]){case void 0:ie(e,s[1],ka(o),i);break;case"width":ie(e,s[1],Zt(o,!1),i);break;case"style":ie(e,s[1],Tn(o,!0),i);break}break;case"width":Ir(e,Lo(o.getChildren(),!1),i);break;case"style":Ir(e,Sa(o.getChildren(),!0),i);break}break;case"padding":s.length===1?Ir(e,Lo(o.getChildren(),!0),i):ie(e,s[1],Zt(o,!0),i);break}break}}return e}var Ue=H(),jo=function(){function n(){this.data={}}return n.prototype.add=function(e,t,r){var i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(t),r&&i.nodes.push(r)},n}(),Vo=function(){function n(e,t,r){var i=this;this.cssDataManager=r,this.warnings=[],this.settings=t,this.documentText=e.getText(),this.keyframes=new jo,this.validProperties={};var o=t.getSetting(Oo.ValidProperties);Array.isArray(o)&&o.forEach(function(s){if(typeof s=="string"){var a=s.trim().toLowerCase();a.length&&(i.validProperties[a]=!0)}})}return n.entries=function(e,t,r,i,o){var s=new n(t,r,i);return e.acceptVisitor(s),s.completeValidations(),s.getEntries(o)},n.prototype.isValidPropertyDeclaration=function(e){var t=e.fullPropertyName;return this.validProperties[t]},n.prototype.fetch=function(e,t){for(var r=[],i=0,o=e;i0)for(var x=this.fetch(r,"float"),y=0;y0)for(var x=this.fetch(r,"vertical-align"),y=0;y1)for(var $=0;$")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var t=this.createNode(u.Operator);return this.consumeToken(),this.finish(t)}return n.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var t=this.create(F);return this.consumeToken(),this.finish(t)}return n.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(d.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||n.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||n.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(t){var r=this._tryParseCustomPropertyDeclaration(t);if(r)return r;var i=this.create(ae);if(!i.setProperty(this._parseProperty()))return null;if(!this.accept(d.Colon))return this.finish(i,f.ColonExpected,[d.Colon],t||[d.SemiColon]);this.prevToken&&(i.colonPosition=this.prevToken.offset);var o=!1;if(i.setValue(this._parseExpr())&&(o=!0,i.addChild(this._parsePrio())),this.peek(d.CurlyL))i.setNestedProperties(this._parseNestedProperties());else if(!o)return this.finish(i,f.PropertyValueExpected);return this.peek(d.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseNestedProperties=function(){var t=this.create(Yn);return this._parseBody(t,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var t=this.create(qe);if(this.consumeToken(),!t.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(t,f.SelectorExpected);for(;this.accept(d.Comma);)t.getSelectors().addChild(this._parseSimpleSelector());return this.accept(d.Exclamation)&&!this.acceptIdent("optional")?this.finish(t,f.UnknownKeyword):this.finish(t)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||n.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(u.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(d.Num)||this.accept(d.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var t=this.createNode(u.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(t)}else if(this.peekKeyword("@at-root")){var t=this.createNode(u.SelectorPlaceholder);return this.consumeToken(),this.finish(t)}return null},e.prototype._parseElementName=function(){var t=this.mark(),r=n.prototype._parseElementName.call(this);return r&&!this.hasWhitespace()&&this.peek(d.ParenthesisL)?(this.restoreAtMark(t),null):r},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||n.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var t=this.createNode(u.Debug);return this.consumeToken(),t.addChild(this._parseExpr()),this.finish(t)},e.prototype._parseControlStatement=function(t){return t===void 0&&(t=this._parseRuleSetDeclaration.bind(this)),this.peek(d.AtKeyword)?this._parseIfStatement(t)||this._parseForStatement(t)||this._parseEachStatement(t)||this._parseWhileStatement(t):null},e.prototype._parseIfStatement=function(t){return this.peekKeyword("@if")?this._internalParseIfStatement(t):null},e.prototype._internalParseIfStatement=function(t){var r=this.create(pi);if(this.consumeToken(),!r.setExpression(this._parseExpr(!0)))return this.finish(r,f.ExpressionExpected);if(this._parseBody(r,t),this.acceptKeyword("@else")){if(this.peekIdent("if"))r.setElseClause(this._internalParseIfStatement(t));else if(this.peek(d.CurlyL)){var i=this.create(gi);this._parseBody(i,t),r.setElseClause(i)}}return this.finish(r)},e.prototype._parseForStatement=function(t){if(!this.peekKeyword("@for"))return null;var r=this.create(ui);return this.consumeToken(),r.setVariable(this._parseVariable())?this.acceptIdent("from")?r.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(r,On.ThroughOrToExpected,[d.CurlyR]):r.addChild(this._parseBinaryExpr())?this._parseBody(r,t):this.finish(r,f.ExpressionExpected,[d.CurlyR]):this.finish(r,f.ExpressionExpected,[d.CurlyR]):this.finish(r,On.FromExpected,[d.CurlyR]):this.finish(r,f.VariableNameExpected,[d.CurlyR])},e.prototype._parseEachStatement=function(t){if(!this.peekKeyword("@each"))return null;var r=this.create(mi);this.consumeToken();var i=r.getVariables();if(!i.addChild(this._parseVariable()))return this.finish(r,f.VariableNameExpected,[d.CurlyR]);for(;this.accept(d.Comma);)if(!i.addChild(this._parseVariable()))return this.finish(r,f.VariableNameExpected,[d.CurlyR]);return this.finish(i),this.acceptIdent("in")?r.addChild(this._parseExpr())?this._parseBody(r,t):this.finish(r,f.ExpressionExpected,[d.CurlyR]):this.finish(r,On.InExpected,[d.CurlyR])},e.prototype._parseWhileStatement=function(t){if(!this.peekKeyword("@while"))return null;var r=this.create(fi);return this.consumeToken(),r.addChild(this._parseBinaryExpr())?this._parseBody(r,t):this.finish(r,f.ExpressionExpected,[d.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var t=this.create(Qe);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([A.Function])))return this.finish(t,f.IdentifierExpected,[d.CurlyR]);if(!this.accept(d.ParenthesisL))return this.finish(t,f.LeftParenthesisExpected,[d.CurlyR]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,f.VariableNameExpected)}return this.accept(d.ParenthesisR)?this._parseBody(t,this._parseFunctionBodyDeclaration.bind(this)):this.finish(t,f.RightParenthesisExpected,[d.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var t=this.createNode(u.ReturnStatement);return this.consumeToken(),t.addChild(this._parseExpr())?this.finish(t):this.finish(t,f.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var t=this.create(Ae);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([A.Mixin])))return this.finish(t,f.IdentifierExpected,[d.CurlyR]);if(this.accept(d.ParenthesisL)){if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,f.VariableNameExpected)}if(!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected,[d.CurlyR])}return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var t=this.create(Be);return t.setIdentifier(this._parseVariable())?(this.accept(tn),this.accept(d.Colon)&&!t.setDefaultValue(this._parseExpr(!0))?this.finish(t,f.VariableValueExpected,[],[d.Comma,d.ParenthesisR]):this.finish(t)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var t=this.create(Ii);if(this.consumeToken(),this.accept(d.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,f.ExpressionExpected)}if(!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected)}return this.finish(t)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var t=this.create(et);this.consumeToken();var r=this._parseIdent([A.Mixin]);if(!t.setIdentifier(r))return this.finish(t,f.IdentifierExpected,[d.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var i=this._parseIdent([A.Mixin]);if(!i)return this.finish(t,f.IdentifierExpected,[d.CurlyR]);var o=this.create(Zn);r.referenceTypes=[A.Module],o.setIdentifier(r),t.setIdentifier(i),t.addChild(o)}if(this.accept(d.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,f.ExpressionExpected)}if(!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(d.CurlyL))&&t.setContent(this._parseMixinContentDeclaration()),this.finish(t)},e.prototype._parseMixinContentDeclaration=function(){var t=this.create(Mi);if(this.acceptIdent("using")){if(!this.accept(d.ParenthesisL))return this.finish(t,f.LeftParenthesisExpected,[d.CurlyL]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,f.VariableNameExpected)}if(!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected,[d.CurlyL])}return this.peek(d.CurlyL)&&this._parseBody(t,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(t)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var t=this.create(we),r=this.mark(),i=this._parseVariable();if(i)if(this.accept(d.Colon))t.setIdentifier(i);else{if(this.accept(tn))return t.setValue(i),this.finish(t);this.restoreAtMark(r)}return t.setValue(this._parseExpr(!0))?(this.accept(tn),t.addChild(this._parsePrio()),this.finish(t)):t.setValue(this._tryParsePrio())?this.finish(t):null},e.prototype._parseURLArgument=function(){var t=this.mark(),r=n.prototype._parseURLArgument.call(this);if(!r||!this.peek(d.ParenthesisR)){this.restoreAtMark(t);var i=this.create(F);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e.prototype._parseOperation=function(){if(!this.peek(d.ParenthesisL))return null;var t=this.create(F);for(this.consumeToken();t.addChild(this._parseListElement());)this.accept(d.Comma);return this.accept(d.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected)},e.prototype._parseListElement=function(){var t=this.create(Ti),r=this._parseBinaryExpr();if(!r)return null;if(this.accept(d.Colon)){if(t.setKey(r),!t.setValue(this._parseBinaryExpr()))return this.finish(t,f.ExpressionExpected)}else t.setValue(r);return this.finish(t)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var t=this.create(vi);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,f.StringLiteralExpected);if(!this.peek(d.SemiColon)&&!this.peek(d.EOF)){if(!this.peekRegExp(d.Ident,/as|with/))return this.finish(t,f.UnknownKeyword);if(this.acceptIdent("as")&&!t.setIdentifier(this._parseIdent([A.Module]))&&!this.acceptDelim("*"))return this.finish(t,f.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(d.ParenthesisL))return this.finish(t,f.LeftParenthesisExpected,[d.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,f.VariableNameExpected);for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,f.VariableNameExpected);if(!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected)}}return!this.accept(d.SemiColon)&&!this.accept(d.EOF)?this.finish(t,f.SemiColonExpected):this.finish(t)},e.prototype._parseModuleConfigDeclaration=function(){var t=this.create(yi);return t.setIdentifier(this._parseVariable())?!this.accept(d.Colon)||!t.setValue(this._parseExpr(!0))?this.finish(t,f.VariableValueExpected,[],[d.Comma,d.ParenthesisR]):this.accept(d.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(t,f.UnknownKeyword):this.finish(t):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var t=this.create(wi);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,f.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(d.ParenthesisL))return this.finish(t,f.LeftParenthesisExpected,[d.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,f.VariableNameExpected);for(;this.accept(d.Comma)&&!this.peek(d.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,f.VariableNameExpected);if(!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected)}if(!this.peek(d.SemiColon)&&!this.peek(d.EOF)){if(!this.peekRegExp(d.Ident,/as|hide|show/))return this.finish(t,f.UnknownKeyword);if(this.acceptIdent("as")){var r=this._parseIdent([A.Forward]);if(!t.setIdentifier(r))return this.finish(t,f.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(t,f.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!t.addChild(this._parseForwardVisibility()))return this.finish(t,f.IdentifierOrVariableExpected)}return!this.accept(d.SemiColon)&&!this.accept(d.EOF)?this.finish(t,f.SemiColonExpected):this.finish(t)},e.prototype._parseForwardVisibility=function(){var t=this.create(xi);for(t.setIdentifier(this._parseIdent());t.addChild(this._parseVariable()||this._parseIdent());)this.accept(d.Comma);return t.getChildren().length>1?t:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||n.prototype._parseSupportsCondition.call(this)},e}(bt);var Na=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),S=H(),Ko=function(n){Na(e,n);function e(t,r){var i=n.call(this,"$",t,r)||this;return qo(e.scssModuleLoaders),qo(e.scssModuleBuiltIns),i}return e.prototype.isImportPathParent=function(t){return t===u.Forward||t===u.Use||n.prototype.isImportPathParent.call(this,t)},e.prototype.getCompletionForImportPath=function(t,r){var i=t.getParent().type;if(i===u.Forward||i===u.Use)for(var o=0,s=e.scssModuleBuiltIns;o0){var t=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+=` - -`,t.value+=e.references.map(function(r){return"[".concat(r.name,"](").concat(r.url,")")}).join(" | "),e.documentation=t}})}var Oa=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Go="/".charCodeAt(0),Wa=` -`.charCodeAt(0),La="\r".charCodeAt(0),Ua="\f".charCodeAt(0),jr="`".charCodeAt(0),Vr=".".charCodeAt(0),ja=d.CustomToken,Wn=ja++,Ln=function(n){Oa(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.scanNext=function(t){var r=this.escapedJavaScript();return r!==null?this.finishToken(t,r):this.stream.advanceIfChars([Vr,Vr,Vr])?this.finishToken(t,Wn):n.prototype.scanNext.call(this,t)},e.prototype.comment=function(){return n.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([Go,Go])?(this.stream.advanceWhileChar(function(t){switch(t){case Wa:case La:case Ua:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var t=this.stream.peekChar();return t===jr?(this.stream.advance(1),this.stream.advanceWhileChar(function(r){return r!==jr}),this.stream.advanceIfChar(jr)?d.EscapedJavaScript:d.BadEscapedJavaScript):null},e}(Fe);var Ba=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),Ho=function(n){Ba(e,n);function e(){return n.call(this,new Ln)||this}return e.prototype._parseStylesheetStatement=function(t){return t===void 0&&(t=!1),this.peek(d.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||n.prototype._parseStylesheetAtStatement.call(this,t):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var t=this.create(ht);if(this.consumeToken(),this.accept(d.ParenthesisL)){if(!this.accept(d.Ident))return this.finish(t,f.IdentifierExpected,[d.SemiColon]);do if(!this.accept(d.Comma))break;while(this.accept(d.Ident));if(!this.accept(d.ParenthesisR))return this.finish(t,f.RightParenthesisExpected,[d.SemiColon])}return!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral())?this.finish(t,f.URIOrStringExpected,[d.SemiColon]):(!this.peek(d.SemiColon)&&!this.peek(d.EOF)&&t.setMedialist(this._parseMediaQueryList()),this.finish(t))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var t=this.createNode(u.Plugin);return this.consumeToken(),t.addChild(this._parseStringLiteral())?this.accept(d.SemiColon)?this.finish(t):this.finish(t,f.SemiColonExpected):this.finish(t,f.StringLiteralExpected)},e.prototype._parseMediaQuery=function(){var t=n.prototype._parseMediaQuery.call(this);if(!t){var r=this.create(pn);return r.addChild(this._parseVariable())?this.finish(r):null}return t},e.prototype._parseMediaDeclaration=function(t){return t===void 0&&(t=!1),this._tryParseRuleset(t)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(t)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(t){t===void 0&&(t=[]);var r=this.create($e),i=this.mark();if(!r.setVariable(this._parseVariable(!0)))return null;if(this.accept(d.Colon)){if(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseDetachedRuleSet()))r.needsSemicolon=!1;else if(!r.setValue(this._parseExpr()))return this.finish(r,f.VariableValueExpected,[],t);r.addChild(this._parsePrio())}else return this.restoreAtMark(i),null;return this.peek(d.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)},e.prototype._parseDetachedRuleSet=function(){var t=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(d.ParenthesisL)){var r=this.create(Ae);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,f.IdentifierExpected,[],[d.ParenthesisR]);if(!this.accept(d.ParenthesisR))return this.restoreAtMark(t),null}else return this.restoreAtMark(t),null;if(!this.peek(d.CurlyL))return null;var i=this.create(K);return this._parseBody(i,this._parseDetachedRuleSetBody.bind(this)),this.finish(i)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(t){if(!t.addChild(this._parseLookupValue()))return!1;for(var r=!1;this.peek(d.BracketL)&&(r=!0),!!t.addChild(this._parseLookupValue());)r=!1;return!r},e.prototype._parseLookupValue=function(){var t=this.create(F),r=this.mark();return this.accept(d.BracketL)?(t.addChild(this._parseVariable(!1,!0))||t.addChild(this._parsePropertyIdentifier()))&&this.accept(d.BracketR)||this.accept(d.BracketR)?t:(this.restoreAtMark(r),null):(this.restoreAtMark(r),null)},e.prototype._parseVariable=function(t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var i=!t&&this.peekDelim("$");if(!this.peekDelim("@")&&!i&&!this.peek(d.AtKeyword))return null;for(var o=this.create(ut),s=this.mark();this.acceptDelim("@")||!t&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(d.AtKeyword)&&!this.accept(d.Ident)?(this.restoreAtMark(s),null):!r&&this.peek(d.BracketL)&&!this._addLookupChildren(o)?(this.restoreAtMark(s),null):o},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||n.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(d.EscapedJavaScript)||this.peek(d.BadEscapedJavaScript)){var t=this.createNode(u.EscapedValue);return this.consumeToken(),this.finish(t)}if(this.peekDelim("~")){var t=this.createNode(u.EscapedValue);return this.consumeToken(),this.accept(d.String)||this.accept(d.EscapedJavaScript)?this.finish(t):this.finish(t,f.TermExpected)}return null},e.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t||n.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var t=this.createNode(u.Operator);return this.consumeToken(),this.acceptDelim("="),t}else if(this.peekDelim("=")){var t=this.createNode(u.Operator);return this.consumeToken(),this.acceptDelim("<"),t}else if(this.peekDelim("<")){var t=this.createNode(u.Operator);return this.consumeToken(),this.acceptDelim("="),t}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(d.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||n.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||n.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([A.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||n.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||n.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(t){var r=this.create(Ee),i=!1;for(t&&(i=r.addChild(this._parseCombinator()));r.addChild(this._parseSimpleSelector());){i=!0;var o=this.mark();if(r.addChild(this._parseGuard())&&this.peek(d.CurlyL))break;this.restoreAtMark(o),r.addChild(this._parseCombinator())}return i?this.finish(r):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(u.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(d.Num)||this.accept(d.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var t=this.createNode(u.SelectorInterpolation),r=this._acceptInterpolatedIdent(t);return r?this.finish(t):null},e.prototype._parsePropertyIdentifier=function(t){t===void 0&&(t=!1);var r=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,r))return null;var i=this.mark(),o=this.create(te);o.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var s=!1;return t?o.isCustomProperty?s=o.addChild(this._parseIdent()):s=o.addChild(this._parseRegexp(r)):o.isCustomProperty?s=this._acceptInterpolatedIdent(o):s=this._acceptInterpolatedIdent(o,r),s?(!t&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(o)):(this.restoreAtMark(i),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(d.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(t,r){for(var i=this,o=!1,s=function(){var l=i.mark();return i.acceptDelim("-")&&(i.hasWhitespace()||i.acceptDelim("-"),i.hasWhitespace())?(i.restoreAtMark(l),null):i._parseInterpolation()},a=r?function(){return i.acceptRegexp(r)}:function(){return i.accept(d.Ident)};(a()||t.addChild(this._parseInterpolation()||this.try(s)))&&(o=!0,!this.hasWhitespace()););return o},e.prototype._parseInterpolation=function(){var t=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var r=this.createNode(u.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(d.CurlyL)?(this.restoreAtMark(t),null):r.addChild(this._parseIdent())?this.accept(d.CurlyR)?this.finish(r):this.finish(r,f.RightCurlyExpected):this.finish(r,f.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var t=this.mark(),r=this.create(Ae);if(!r.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(d.ParenthesisL))return this.restoreAtMark(t),null;if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,f.IdentifierExpected,[],[d.ParenthesisR]);return this.accept(d.ParenthesisR)?(r.setGuard(this._parseGuard()),this.peek(d.CurlyL)?this._parseBody(r,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(t),null)):(this.restoreAtMark(t),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var t;if(this.peekDelim("#")||this.peekDelim(".")){if(t=this.create(te),this.consumeToken(),this.hasWhitespace()||!t.addChild(this._parseIdent()))return null}else if(this.peek(d.Hash))t=this.create(te),this.consumeToken();else return null;return t.referenceTypes=[A.Mixin],this.finish(t)},e.prototype._parsePseudo=function(){if(!this.peek(d.Colon))return null;var t=this.mark(),r=this.create(qe);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(r):(this.restoreAtMark(t),n.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var t=this.mark(),r=this.create(qe);return this.consumeToken(),this.hasWhitespace()||!this.accept(d.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(t),null):this._completeExtends(r)},e.prototype._completeExtends=function(t){if(!this.accept(d.ParenthesisL))return this.finish(t,f.LeftParenthesisExpected);var r=t.getSelectors();if(!r.addChild(this._parseSelector(!0)))return this.finish(t,f.SelectorExpected);for(;this.accept(d.Comma);)if(!r.addChild(this._parseSelector(!0)))return this.finish(t,f.SelectorExpected);return this.accept(d.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(d.AtKeyword))return null;var t=this.mark(),r=this.create(et);return r.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(d.ParenthesisL))?(this.restoreAtMark(t),null):this.accept(d.ParenthesisR)?this.finish(r):this.finish(r,f.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(t){t===void 0&&(t=!0);for(var r=this.mark(),i=this.create(et),o=this._parseMixinDeclarationIdentifier();o;){this.acceptDelim(">");var s=this._parseMixinDeclarationIdentifier();if(s)i.getNamespaces().addChild(o),o=s;else break}if(!i.setIdentifier(o))return this.restoreAtMark(r),null;var a=!1;if(this.accept(d.ParenthesisL)){if(a=!0,i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,f.ExpressionExpected)}if(!this.accept(d.ParenthesisR))return this.finish(i,f.RightParenthesisExpected);o.referenceTypes=[A.Mixin]}else o.referenceTypes=[A.Mixin,A.Rule];return this.peek(d.BracketL)?t||this._addLookupChildren(i):i.addChild(this._parsePrio()),!a&&!this.peek(d.SemiColon)&&!this.peek(d.CurlyR)&&!this.peek(d.EOF)?(this.restoreAtMark(r),null):this.finish(i)},e.prototype._parseMixinArgument=function(){var t=this.create(we),r=this.mark(),i=this._parseVariable();return i&&(this.accept(d.Colon)?t.setIdentifier(i):this.restoreAtMark(r)),t.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(t):(this.restoreAtMark(r),null)},e.prototype._parseMixinParameter=function(){var t=this.create(Be);if(this.peekKeyword("@rest")){var r=this.create(F);return this.consumeToken(),this.accept(Wn)?(t.setIdentifier(this.finish(r)),this.finish(t)):this.finish(t,f.DotExpected,[],[d.Comma,d.ParenthesisR])}if(this.peek(Wn)){var i=this.create(F);return this.consumeToken(),t.setIdentifier(this.finish(i)),this.finish(t)}var o=!1;return t.setIdentifier(this._parseVariable())&&(this.accept(d.Colon),o=!0),!t.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!o?null:this.finish(t)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var t=this.create(Pi);if(this.consumeToken(),t.isNegated=this.acceptIdent("not"),!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,f.ConditionExpected);for(;this.acceptIdent("and")||this.accept(d.Comma);)if(!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,f.ConditionExpected);return this.finish(t)},e.prototype._parseGuardCondition=function(){if(!this.peek(d.ParenthesisL))return null;var t=this.create(Ai);return this.consumeToken(),t.addChild(this._parseExpr()),this.accept(d.ParenthesisR)?this.finish(t):this.finish(t,f.RightParenthesisExpected)},e.prototype._parseFunction=function(){var t=this.mark(),r=this.create(Pe);if(!r.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(d.ParenthesisL))return this.restoreAtMark(t),null;if(r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(d.Comma)||this.accept(d.SemiColon))&&!this.peek(d.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,f.ExpressionExpected)}return this.accept(d.ParenthesisR)?this.finish(r):this.finish(r,f.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var t=this.create(te);return t.referenceTypes=[A.Function],this.consumeToken(),this.finish(t)}return n.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var t=this.mark(),r=n.prototype._parseURLArgument.call(this);if(!r||!this.peek(d.ParenthesisR)){this.restoreAtMark(t);var i=this.create(F);return i.addChild(this._parseBinaryExpr()),this.finish(i)}return r},e}(bt);var $a=function(){var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},n(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}}(),I=H(),Jo=function(n){$a(e,n);function e(t,r){return n.call(this,"@",t,r)||this}return e.prototype.createFunctionProposals=function(t,r,i,o){for(var s=0,a=t;s 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:I("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:I("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:I("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:I("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:I("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:I("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:I("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:I("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:I("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:I("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:I("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:I("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:I("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:I("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:I("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:I("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:I("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:I("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:I("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:I("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:I("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:I("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:I("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:I("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:I("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:I("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:I("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:I("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:I("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:I("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:I("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:I("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:I("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:I("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:I("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:I("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:I("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],e}(yt);function Yo(n,e){var t=qa(n);return Ka(t,e)}function qa(n){function e(p){return n.positionAt(p.offset).line}function t(p){return n.positionAt(p.offset+p.len).line}function r(){switch(n.languageId){case"scss":return new Nn;case"less":return new Ln;default:return new Fe}}function i(p,m){var g=e(p),w=t(p);return g!==w?{startLine:g,endLine:w,kind:m}:null}var o=[],s=[],a=r();a.ignoreComment=!1,a.setSource(n.getText());for(var l=a.scan(),c=null,h=function(){switch(l.type){case d.CurlyL:case St:{s.push({line:e(l),type:"brace",isStart:!0});break}case d.CurlyR:{if(s.length!==0){var p=Xo(s,"brace");if(!p)break;var m=t(l);p.type==="brace"&&(c&&t(c)!==m&&m--,p.line!==m&&o.push({startLine:p.line,endLine:m,kind:void 0}))}break}case d.Comment:{var g=function(D){return D==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:t(l),type:"comment",isStart:!1}},w=function(D){var M=D.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(M)return g(M[1]);if(n.languageId==="scss"||n.languageId==="less"){var z=D.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(z)return g(z[1])}return null},x=w(l);if(x)if(x.isStart)s.push(x);else{var p=Xo(s,"comment");if(!p)break;p.type==="comment"&&p.line!==x.line&&o.push({startLine:p.line,endLine:x.line,kind:"region"})}else{var y=i(l,"comment");y&&o.push(y)}break}}c=l,l=a.scan()};l.type!==d.EOF;)h();return o}function Xo(n,e){if(n.length===0)return null;for(var t=n.length-1;t>=0;t--)if(n[t].type===e&&n[t].isStart)return n.splice(t,1)[0];return null}function Ka(n,e){var t=e&&e.rangeLimit||Number.MAX_VALUE,r=n.sort(function(s,a){var l=s.startLine-a.startLine;return l===0&&(l=s.endLine-a.endLine),l}),i=[],o=-1;return r.forEach(function(s){s.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},o.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` -`);c!==-1?this.__character_count=l.length-c:this.__character_count+=l.length},o.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function s(l,c){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),c=c||"",l.indent_level>0&&(c=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}s.prototype.get_indent_size=function(l,c){var h=this.__base_string_length;return c=c||0,l<0&&(h=0),h+=l*this.__indent_size,h+=c,h},s.prototype.get_indent_string=function(l,c){var h=this.__base_string;return c=c||0,l<0&&(l=0,h=""),c+=l*this.__indent_size,this.__ensure_cache(c),h+=this.__cache[c],h},s.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},s.prototype.__add_column=function(){var l=this.__cache.length,c=0,h="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,h=new Array(c+1).join(this.__indent_string)),l&&(h+=new Array(l+1).join(" ")),this.__cache.push(h)};function a(l,c){this.__indent_cache=new s(l,c),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}a.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},a.prototype.get_line_number=function(){return this.__lines.length},a.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},a.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},a.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},a.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},a.prototype.get_code=function(l){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` -`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(` -`);return l!==` -`&&(h=h.replace(/[\n]/g,l)),h},a.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},a.prototype.set_indent=function(l,c){return l=l||0,c=c||0,this.next_line.set_indent(l,c),this.__lines.length>1?(this.current_line.set_indent(l,c),!0):(this.current_line.set_indent(),!1)},a.prototype.add_raw_token=function(l){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},a.prototype.just_added_newline=function(){return this.current_line.is_empty()},a.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},a.prototype.ensure_empty_line_above=function(l,c){for(var h=this.__lines.length-2;h>=0;){var p=this.__lines[h];if(p.is_empty())break;if(p.item(0).indexOf(l)!==0&&p.item(-1)!==c){this.__lines.splice(h+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},i.exports.Output=a},,,,function(i){function o(l,c){this.raw_options=s(l,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(l,c){var h=this.raw_options[l],p=c||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(p=h.concat()):typeof h=="string"&&(p=h.split(/[^a-zA-Z0-9_\/\-]+/)),p},o.prototype._get_boolean=function(l,c){var h=this.raw_options[l],p=h===void 0?!!c:!!h;return p},o.prototype._get_characters=function(l,c){var h=this.raw_options[l],p=c||"";return typeof h=="string"&&(p=h.replace(/\\r/,"\r").replace(/\\n/,` -`).replace(/\\t/," ")),p},o.prototype._get_number=function(l,c){var h=this.raw_options[l];c=parseInt(c,10),isNaN(c)&&(c=0);var p=parseInt(h,10);return isNaN(p)&&(p=c),p},o.prototype._get_selection=function(l,c,h){var p=this._get_selection_list(l,c,h);if(p.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values: -`+c+` -You passed in: '`+this.raw_options[l]+"'");return p[0]},o.prototype._get_selection_list=function(l,c,h){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[c[0]],!this._is_valid_selection(h,c))throw new Error("Invalid Default Value!");var p=this._get_array(l,h);if(!this._is_valid_selection(p,c))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values: -`+c+` -You passed in: '`+this.raw_options[l]+"'");return p},o.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(h){return c.indexOf(h)===-1})};function s(l,c){var h={};l=a(l);var p;for(p in l)p!==c&&(h[p]=l[p]);if(c&&l[c])for(p in l[c])h[p]=l[c][p];return h}function a(l){var c={},h;for(h in l){var p=h.replace(/-/g,"_");c[p]=l[h]}return c}i.exports.Options=o,i.exports.normalizeOpts=a,i.exports.mergeOpts=s},,function(i){var o=RegExp.prototype.hasOwnProperty("sticky");function s(a){this.__input=a||"",this.__input_length=this.__input.length,this.__position=0}s.prototype.restart=function(){this.__position=0},s.prototype.back=function(){this.__position>0&&(this.__position-=1)},s.prototype.hasNext=function(){return this.__position=0&&a=0&&l=a.length&&this.__input.substring(l-a.length,l).toLowerCase()===a},i.exports.InputScanner=s},,,,,function(i){function o(s,a){s=typeof s=="string"?s:s.source,a=typeof a=="string"?a:a.source,this.__directives_block_pattern=new RegExp(s+/ beautify( \w+[:]\w+)+ /.source+a,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(s+/\sbeautify\signore:end\s/.source+a,"g")}o.prototype.get_directives=function(s){if(!s.match(this.__directives_block_pattern))return null;var a={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(s);l;)a[l[1]]=l[2],l=this.__directive_pattern.exec(s);return a},o.prototype.readIgnored=function(s){return s.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=o},,function(i,o,s){var a=s(16).Beautifier,l=s(17).Options;function c(h,p){var m=new a(h,p);return m.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}},function(i,o,s){var a=s(17).Options,l=s(2).Output,c=s(8).InputScanner,h=s(13).Directives,p=new h(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,g=/\r\n|[\r\n]/g,w=/\s/,x=/(?:\s|\n)+/g,y=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,D=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function M(z,P){this._source_text=z||"",this._options=new a(P),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}M.prototype.eatString=function(z){var P="";for(this._ch=this._input.next();this._ch;){if(P+=this._ch,this._ch==="\\")P+=this._input.next();else if(z.indexOf(this._ch)!==-1||this._ch===` -`)break;this._ch=this._input.next()}return P},M.prototype.eatWhitespace=function(z){for(var P=w.test(this._input.peek()),L=0;w.test(this._input.peek());)this._ch=this._input.next(),z&&this._ch===` -`&&(L===0||L0&&this._indentLevel--},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var z=this._source_text,P=this._options.eol;P==="auto"&&(P=` -`,z&&m.test(z||"")&&(P=z.match(m)[0])),z=z.replace(g,` -`);var L=z.match(/^[\t ]*/)[0];this._output=new l(this._options,L),this._input=new c(z),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var $=0,ue=!1,oe=!1,me=!1,ve=!1,ye=!1,ke=this._ch,pe,G,Ie;pe=this._input.read(x),G=pe!=="",Ie=ke,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),ke=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var fe=this._input.read(y),C=p.get_directives(fe);C&&C.ignore==="start"&&(fe+=p.readIgnored(this._input)),this.print_string(fe),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(D)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(G),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var b=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);b.match(/[ :]$/)&&(b=this.eatString(": ").replace(/\s$/,""),this.print_string(b),this._output.space_before_token=!0),b=b.replace(/\s$/,""),b==="extend"?ve=!0:b==="import"&&(ye=!0),b in this.NESTED_AT_RULE?(this._nestedLevel+=1,b in this.CONDITIONAL_GROUP_RULE&&(me=!0)):!ue&&$===0&&b.indexOf(":")!==-1&&(oe=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(G),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(oe&&(oe=!1,this.outdent()),me?(me=!1,ue=this._indentLevel>=this._nestedLevel):ue=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&ue&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),Ie==="{"&&this._output.trim(!0),ye=!1,ve=!1,oe&&(this.outdent(),oe=!1),this.print_string(this._ch),ue=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(ue||me)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!ve&&$===0?(this.print_string(":"),oe||(oe=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(G),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?$===0?(oe&&(this.outdent(),oe=!1),ve=!1,ye=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),$++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),$&&($--,this.outdent()))):(this.preserveSingleSpace(G),this.print_string(this._ch),this.eatWhitespace(),$++,this.indent()):this._ch===")"?($&&($--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!oe&&$===0&&!ye&&!ve?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!oe&&$===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&w.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(G),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),w.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(G),this.print_string(this._ch));var k=this._output.get_code(P);return k},i.exports.Beautifier=M},function(i,o,s){var a=s(6).Options;function l(c){a.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var p=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m0&&ns(r,c-1);)c--;c===0||ts(r,c-1)?l=c:c0){var x=t.insertSpaces?Xn(" ",a*o):Xn(" ",o);w=w.split(` -`).join(` -`+x),e.start.character===0&&(w=x+w)}return[{range:e,newText:w}]}function es(n){return n.replace(/^\s+/,"")}var Ga="{".charCodeAt(0),Ha="}".charCodeAt(0);function Ja(n,e){for(;e>=0;){var t=n.charCodeAt(e);if(t===Ga)return!0;if(t===Ha)return!1;e--}return!1}function Ve(n,e,t){if(n&&n.hasOwnProperty(e)){var r=n[e];if(r!==null)return r}return t}function Xa(n,e,t){for(var r=e,i=0,o=t.tabSize||4;r && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."}],syntax:"normal | | | ? ",relevance:62,description:"Aligns a flex container\u2019s lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",values:[{name:"baseline",description:"If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item\u2019s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"normal | stretch | | [ ? ]",relevance:85,description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:53,description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",values:[{name:"auto",description:"Computes to the value of 'align-items' on the element\u2019s parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"baseline",description:"If the flex item\u2019s inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item\u2019s margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."}],syntax:"auto | normal | stretch | | ? ",relevance:72,description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",syntax:"